summaryrefslogtreecommitdiff
path: root/vendor/k8s.io
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2017-11-01 11:24:59 -0400
committerMatthew Heon <matthew.heon@gmail.com>2017-11-01 11:24:59 -0400
commita031b83a09a8628435317a03f199cdc18b78262f (patch)
treebc017a96769ce6de33745b8b0b1304ccf38e9df0 /vendor/k8s.io
parent2b74391cd5281f6fdf391ff8ad50fd1490f6bf89 (diff)
downloadpodman-a031b83a09a8628435317a03f199cdc18b78262f.tar.gz
podman-a031b83a09a8628435317a03f199cdc18b78262f.tar.bz2
podman-a031b83a09a8628435317a03f199cdc18b78262f.zip
Initial checkin from CRI-O repo
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Diffstat (limited to 'vendor/k8s.io')
-rw-r--r--vendor/k8s.io/apimachinery/LICENSE202
-rw-r--r--vendor/k8s.io/apimachinery/README.md29
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/equality/semantic.go46
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/errors/doc.go18
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/errors/errors.go478
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/meta/default.go51
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/meta/doc.go19
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/meta/errors.go105
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/meta/firsthit_restmapper.go97
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/meta/help.go202
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/meta/interfaces.go146
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/meta/meta.go610
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/meta/multirestmapper.go210
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/meta/priority.go222
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/meta/restmapper.go545
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/meta/unstructured.go31
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/resource/amount.go299
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go77
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto94
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/resource/math.go314
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go792
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go284
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/resource/scale_int.go95
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/resource/suffix.go198
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/validation/doc.go18
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/validation/generic.go85
-rw-r--r--vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.go348
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apimachinery/announced/announced.go99
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apimachinery/announced/group_factory.go252
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apimachinery/doc.go20
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go376
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apimachinery/types.go87
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1/conversion.go264
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1/doc.go22
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go47
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go7516
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto764
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1/group_version.go148
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go234
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1/labels.go75
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go201
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go184
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_proto.go72
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1/register.go95
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time.go180
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time_proto.go85
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go843
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go315
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go752
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go90
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1/watch.go80
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go646
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.defaults.go32
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/doc.go22
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/generated.pb.go633
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/generated.proto55
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/register.go51
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/types.go157
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/types_swagger_doc_generated.go104
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/zz_generated.deepcopy.go164
-rw-r--r--vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/zz_generated.defaults.go32
-rw-r--r--vendor/k8s.io/apimachinery/pkg/conversion/cloner.go249
-rw-r--r--vendor/k8s.io/apimachinery/pkg/conversion/converter.go898
-rw-r--r--vendor/k8s.io/apimachinery/pkg/conversion/deep_equal.go36
-rw-r--r--vendor/k8s.io/apimachinery/pkg/conversion/doc.go24
-rw-r--r--vendor/k8s.io/apimachinery/pkg/conversion/helper.go39
-rw-r--r--vendor/k8s.io/apimachinery/pkg/conversion/queryparams/convert.go188
-rw-r--r--vendor/k8s.io/apimachinery/pkg/conversion/queryparams/doc.go19
-rw-r--r--vendor/k8s.io/apimachinery/pkg/conversion/unstructured/converter.go690
-rw-r--r--vendor/k8s.io/apimachinery/pkg/conversion/unstructured/doc.go19
-rw-r--r--vendor/k8s.io/apimachinery/pkg/fields/doc.go19
-rw-r--r--vendor/k8s.io/apimachinery/pkg/fields/fields.go62
-rw-r--r--vendor/k8s.io/apimachinery/pkg/fields/requirements.go30
-rw-r--r--vendor/k8s.io/apimachinery/pkg/fields/selector.go423
-rw-r--r--vendor/k8s.io/apimachinery/pkg/labels/doc.go19
-rw-r--r--vendor/k8s.io/apimachinery/pkg/labels/labels.go181
-rw-r--r--vendor/k8s.io/apimachinery/pkg/labels/selector.go859
-rw-r--r--vendor/k8s.io/apimachinery/pkg/openapi/common.go161
-rw-r--r--vendor/k8s.io/apimachinery/pkg/openapi/doc.go18
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/codec.go316
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/codec_check.go48
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/conversion.go98
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/doc.go45
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/embedded.go136
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/error.go113
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/extension.go48
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go773
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/generated.proto128
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/helper.go212
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go251
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/register.go61
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go65
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto28
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version.go277
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/schema/interfaces.go40
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/scheme.go577
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/scheme_builder.go48
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_factory.go237
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go245
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/meta.go63
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/serializer/negotiated_codec.go43
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/doc.go18
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf.go448
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf_extension.go48
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/serializer/recognizer/recognizer.go127
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming.go137
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go273
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/swagger_doc_generator.go262
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/types.go133
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/types_proto.go69
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/zz_generated.deepcopy.go83
-rw-r--r--vendor/k8s.io/apimachinery/pkg/selection/operator.go33
-rw-r--r--vendor/k8s.io/apimachinery/pkg/types/doc.go18
-rw-r--r--vendor/k8s.io/apimachinery/pkg/types/namespacedname.go60
-rw-r--r--vendor/k8s.io/apimachinery/pkg/types/nodename.go43
-rw-r--r--vendor/k8s.io/apimachinery/pkg/types/patch.go28
-rw-r--r--vendor/k8s.io/apimachinery/pkg/types/uid.go22
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/cache/cache.go83
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/cache/lruexpirecache.go102
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/clock/clock.go327
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/diff/diff.go280
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/errors/doc.go18
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/errors/errors.go201
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/framer/framer.go167
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/httpstream/doc.go19
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go149
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/connection.go145
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go326
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/upgrade.go107
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go381
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto43
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go177
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/json/json.go107
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/mergepatch/errors.go101
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/mergepatch/util.go133
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/net/http.go401
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/net/interface.go278
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/net/port_range.go113
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/net/port_split.go77
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/net/util.go46
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/rand/rand.go85
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/remotecommand/constants.go53
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go161
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/sets/byte.go203
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/sets/doc.go20
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/sets/empty.go23
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/sets/int.go203
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/sets/int64.go203
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/sets/string.go203
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go2115
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go254
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/validation/field/path.go91
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/validation/validation.go343
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/wait/doc.go19
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/wait/wait.go349
-rw-r--r--vendor/k8s.io/apimachinery/pkg/util/yaml/decoder.go346
-rw-r--r--vendor/k8s.io/apimachinery/pkg/version/doc.go19
-rw-r--r--vendor/k8s.io/apimachinery/pkg/version/types.go37
-rw-r--r--vendor/k8s.io/apimachinery/pkg/watch/doc.go19
-rw-r--r--vendor/k8s.io/apimachinery/pkg/watch/filter.go109
-rw-r--r--vendor/k8s.io/apimachinery/pkg/watch/mux.go257
-rw-r--r--vendor/k8s.io/apimachinery/pkg/watch/streamwatcher.go119
-rw-r--r--vendor/k8s.io/apimachinery/pkg/watch/until.go87
-rw-r--r--vendor/k8s.io/apimachinery/pkg/watch/watch.go269
-rw-r--r--vendor/k8s.io/apimachinery/third_party/forked/golang/json/fields.go513
-rw-r--r--vendor/k8s.io/apimachinery/third_party/forked/golang/netutil/addr.go27
-rw-r--r--vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go388
-rw-r--r--vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/type.go91
-rw-r--r--vendor/k8s.io/apiserver/LICENSE202
-rw-r--r--vendor/k8s.io/apiserver/README.md30
-rw-r--r--vendor/k8s.io/apiserver/pkg/authentication/authenticator/interfaces.go68
-rw-r--r--vendor/k8s.io/apiserver/pkg/authentication/serviceaccount/util.go73
-rw-r--r--vendor/k8s.io/apiserver/pkg/authentication/user/doc.go19
-rw-r--r--vendor/k8s.io/apiserver/pkg/authentication/user/user.go83
-rw-r--r--vendor/k8s.io/apiserver/pkg/features/kube_features.go56
-rw-r--r--vendor/k8s.io/apiserver/pkg/server/httplog/doc.go19
-rw-r--r--vendor/k8s.io/apiserver/pkg/server/httplog/log.go225
-rw-r--r--vendor/k8s.io/apiserver/pkg/util/feature/feature_gate.go211
-rw-r--r--vendor/k8s.io/apiserver/pkg/util/wsstream/conn.go349
-rw-r--r--vendor/k8s.io/apiserver/pkg/util/wsstream/doc.go21
-rw-r--r--vendor/k8s.io/apiserver/pkg/util/wsstream/stream.go177
-rw-r--r--vendor/k8s.io/client-go/LICENSE202
-rw-r--r--vendor/k8s.io/client-go/README.md149
-rw-r--r--vendor/k8s.io/client-go/discovery/discovery_client.go455
-rw-r--r--vendor/k8s.io/client-go/discovery/helper.go121
-rw-r--r--vendor/k8s.io/client-go/discovery/restmapper.go304
-rw-r--r--vendor/k8s.io/client-go/discovery/unstructured.go95
-rw-r--r--vendor/k8s.io/client-go/kubernetes/clientset.go570
-rw-r--r--vendor/k8s.io/client-go/kubernetes/doc.go20
-rw-r--r--vendor/k8s.io/client-go/kubernetes/scheme/doc.go20
-rw-r--r--vendor/k8s.io/client-go/kubernetes/scheme/register.go91
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/admissionregistration_client.go93
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/doc.go20
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/externaladmissionhookconfiguration.go145
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/generated_expansion.go21
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/initializerconfiguration.go145
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/apps_client.go103
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/doc.go20
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/generated_expansion.go25
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/scale.go46
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/authentication_client.go88
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/doc.go20
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/generated_expansion.go17
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview.go44
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview_expansion.go35
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/authentication_client.go88
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/doc.go20
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/generated_expansion.go17
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview.go44
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview_expansion.go35
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/authorization_client.go98
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/doc.go20
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/generated_expansion.go17
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview.go46
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview_expansion.go36
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview.go44
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview_expansion.go35
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview.go44
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview_expansion.go36
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/authorization_client.go98
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/doc.go20
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/generated_expansion.go17
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go46
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview_expansion.go36
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go44
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview_expansion.go35
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go44
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview_expansion.go36
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/autoscaling_client.go88
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/doc.go20
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/autoscaling_client.go88
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/doc.go20
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/horizontalpodautoscaler.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/batch/v1/batch_client.go88
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/batch/v1/doc.go20
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/batch/v1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/batch/v1/job.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/batch_client.go88
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/cronjob.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/doc.go20
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificates_client.go88
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go161
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest_expansion.go37
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/doc.go20
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/generated_expansion.go17
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go145
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/core_client.go163
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/doc.go20
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/event.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/event_expansion.go164
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/generated_expansion.go39
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go161
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace_expansion.go31
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/node.go161
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/node_expansion.go43
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go161
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod_expansion.go45
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/secret.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/service.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/service_expansion.go41
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment_expansion.go29
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/doc.go20
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/extensions_client.go118
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/generated_expansion.go27
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go145
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/scale.go46
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/scale_expansion.go65
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/thirdpartyresource.go145
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/networking/v1/doc.go20
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/networking/v1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networking_client.go88
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/doc.go20
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction.go46
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction_expansion.go38
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go172
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/policy_client.go93
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go145
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go145
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/doc.go20
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/generated_expansion.go25
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rbac_client.go103
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go145
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go145
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/doc.go20
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/generated_expansion.go25
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rbac_client.go103
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/doc.go20
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/podpreset.go155
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/settings_client.go88
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/storage/v1/doc.go20
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/storage/v1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storage_client.go88
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go145
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/doc.go20
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storage_client.go88
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go145
-rw-r--r--vendor/k8s.io/client-go/pkg/api/annotation_key_constants.go113
-rw-r--r--vendor/k8s.io/client-go/pkg/api/doc.go22
-rw-r--r--vendor/k8s.io/client-go/pkg/api/field_constants.go38
-rw-r--r--vendor/k8s.io/client-go/pkg/api/json.go28
-rw-r--r--vendor/k8s.io/client-go/pkg/api/objectreference.go34
-rw-r--r--vendor/k8s.io/client-go/pkg/api/register.go123
-rw-r--r--vendor/k8s.io/client-go/pkg/api/resource.go62
-rw-r--r--vendor/k8s.io/client-go/pkg/api/taint.go36
-rw-r--r--vendor/k8s.io/client-go/pkg/api/toleration.go30
-rw-r--r--vendor/k8s.io/client-go/pkg/api/types.go3989
-rw-r--r--vendor/k8s.io/client-go/pkg/api/v1/annotation_key_constants.go113
-rw-r--r--vendor/k8s.io/client-go/pkg/api/v1/conversion.go776
-rw-r--r--vendor/k8s.io/client-go/pkg/api/v1/defaults.go373
-rw-r--r--vendor/k8s.io/client-go/pkg/api/v1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/pkg/api/v1/generate.go64
-rw-r--r--vendor/k8s.io/client-go/pkg/api/v1/generated.pb.go45110
-rw-r--r--vendor/k8s.io/client-go/pkg/api/v1/generated.proto4117
-rw-r--r--vendor/k8s.io/client-go/pkg/api/v1/meta.go108
-rw-r--r--vendor/k8s.io/client-go/pkg/api/v1/objectreference.go33
-rw-r--r--vendor/k8s.io/client-go/pkg/api/v1/ref/ref.go121
-rw-r--r--vendor/k8s.io/client-go/pkg/api/v1/register.go106
-rw-r--r--vendor/k8s.io/client-go/pkg/api/v1/resource.go63
-rw-r--r--vendor/k8s.io/client-go/pkg/api/v1/taint.go33
-rw-r--r--vendor/k8s.io/client-go/pkg/api/v1/toleration.go56
-rw-r--r--vendor/k8s.io/client-go/pkg/api/v1/types.generated.go76734
-rw-r--r--vendor/k8s.io/client-go/pkg/api/v1/types.go4617
-rw-r--r--vendor/k8s.io/client-go/pkg/api/v1/types_swagger_doc_generated.go2039
-rw-r--r--vendor/k8s.io/client-go/pkg/api/v1/zz_generated.conversion.go5168
-rw-r--r--vendor/k8s.io/client-go/pkg/api/v1/zz_generated.deepcopy.go3770
-rw-r--r--vendor/k8s.io/client-go/pkg/api/v1/zz_generated.defaults.go631
-rw-r--r--vendor/k8s.io/client-go/pkg/api/zz_generated.deepcopy.go3776
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/admissionregistration/doc.go22
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/admissionregistration/register.go53
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/admissionregistration/types.go216
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/defaults.go39
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/doc.go22
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/generated.pb.go2228
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/generated.proto203
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/register.go60
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/types.generated.go4232
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/types.go220
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/types_swagger_doc_generated.go133
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/zz_generated.conversion.go311
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/zz_generated.deepcopy.go254
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/zz_generated.defaults.go70
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/admissionregistration/zz_generated.deepcopy.go254
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/apps/doc.go17
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/apps/register.go60
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/apps/types.go229
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/conversion.go342
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/defaults.go117
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/doc.go17
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.pb.go4934
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.proto441
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/register.go65
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/types.generated.go8414
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/types.go516
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/types_swagger_doc_generated.go257
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.conversion.go322
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go459
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.defaults.go326
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/apps/zz_generated.deepcopy.go208
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authentication/doc.go18
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authentication/register.go50
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authentication/types.go89
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authentication/v1/conversion.go26
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authentication/v1/defaults.go25
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authentication/v1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authentication/v1/generated.pb.go1301
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authentication/v1/generated.proto99
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authentication/v1/register.go58
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authentication/v1/types.go106
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authentication/v1/types_swagger_doc_generated.go72
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authentication/v1/zz_generated.conversion.go153
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authentication/v1/zz_generated.deepcopy.go110
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authentication/v1/zz_generated.defaults.go32
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/conversion.go26
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/defaults.go25
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/generated.pb.go1302
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/generated.proto99
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/register.go58
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/types.generated.go1568
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/types.go91
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/types_swagger_doc_generated.go72
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.conversion.go153
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.deepcopy.go110
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.defaults.go32
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authentication/zz_generated.deepcopy.go110
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authorization/doc.go18
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authorization/register.go52
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authorization/types.go146
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authorization/v1/conversion.go26
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authorization/v1/defaults.go25
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authorization/v1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authorization/v1/generated.pb.go2364
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authorization/v1/generated.proto183
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authorization/v1/register.go61
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authorization/v1/types.generated.go3233
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authorization/v1/types.go176
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authorization/v1/types_swagger_doc_generated.go119
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authorization/v1/zz_generated.conversion.go279
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authorization/v1/zz_generated.deepcopy.go187
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authorization/v1/zz_generated.defaults.go32
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/conversion.go26
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/defaults.go25
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/generated.pb.go2364
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/generated.proto183
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/register.go61
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/types.generated.go3233
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/types.go176
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/types_swagger_doc_generated.go119
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.conversion.go279
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.deepcopy.go187
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.defaults.go32
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/authorization/zz_generated.deepcopy.go187
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/autoscaling/annotations.go34
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/autoscaling/doc.go17
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/autoscaling/register.go53
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/autoscaling/types.go358
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/conversion.go275
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/defaults.go35
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/doc.go17
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/generated.pb.go3787
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/generated.proto321
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/register.go60
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/types.generated.go5633
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/types.go332
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/types_swagger_doc_generated.go218
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.conversion.go506
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.deepcopy.go340
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.defaults.go47
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/defaults.go47
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/doc.go17
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/generated.pb.go3402
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/generated.proto302
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/register.go59
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/types.generated.go5218
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/types.go309
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/types_swagger_doc_generated.go189
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/zz_generated.conversion.go449
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/zz_generated.deepcopy.go319
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/zz_generated.defaults.go47
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/autoscaling/zz_generated.deepcopy.go357
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/batch/doc.go17
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/batch/register.go57
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/batch/types.go285
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/batch/v1/conversion.go84
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/batch/v1/defaults.go44
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/batch/v1/doc.go17
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/batch/v1/generated.pb.go1585
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/batch/v1/generated.proto168
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/batch/v1/register.go59
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/batch/v1/types.generated.go2681
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/batch/v1/types.go168
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/batch/v1/types_swagger_doc_generated.go93
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.conversion.go210
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.deepcopy.go167
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.defaults.go176
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/conversion.go44
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/defaults.go34
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/doc.go17
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/generated.pb.go1511
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/generated.proto133
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/register.go62
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/types.generated.go2525
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/types.go148
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/types_swagger_doc_generated.go96
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.conversion.go239
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go176
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.defaults.go310
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/batch/zz_generated.deepcopy.go302
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/certificates/doc.go18
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/certificates/helpers.go38
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/certificates/register.go52
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/certificates/types.go143
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/conversion.go38
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/defaults.go28
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/generated.pb.go1694
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/generated.proto122
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/helpers.go38
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/register.go66
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/types.generated.go2624
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/types.go152
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/types_swagger_doc_generated.go74
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.conversion.go189
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.deepcopy.go155
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.defaults.go47
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/certificates/zz_generated.deepcopy.go155
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/extensions/doc.go17
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/extensions/helpers.go37
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/extensions/register.go70
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/extensions/types.go1147
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/conversion.go428
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/defaults.go135
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/doc.go17
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/generated.pb.go12108
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/generated.proto1022
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/register.go77
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.generated.go21979
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.go1171
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go631
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.conversion.go1714
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.deepcopy.go1163
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.defaults.go475
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/extensions/zz_generated.deepcopy.go1146
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/networking/doc.go18
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/networking/register.go51
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/networking/types.go115
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/networking/v1/conversion.go195
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/networking/v1/defaults.go34
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/networking/v1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/networking/v1/generated.pb.go1345
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/networking/v1/generated.proto127
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/networking/v1/register.go50
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/networking/v1/types.generated.go2322
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/networking/v1/types.go120
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/networking/v1/types_swagger_doc_generated.go90
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/networking/v1/zz_generated.conversion.go195
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/networking/v1/zz_generated.deepcopy.go182
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/networking/v1/zz_generated.defaults.go51
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/networking/zz_generated.deepcopy.go182
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/policy/doc.go17
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/policy/register.go54
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/policy/types.go120
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/doc.go20
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/generated.pb.go1454
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/generated.proto114
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/register.go61
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/types.generated.go2305
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/types.go111
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/types_swagger_doc_generated.go83
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/zz_generated.conversion.go185
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/zz_generated.deepcopy.go153
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/zz_generated.defaults.go32
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/policy/zz_generated.deepcopy.go153
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/doc.go18
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/helpers.go396
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/register.go58
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/types.go188
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/conversion.go81
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/defaults.go48
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/generated.pb.go2822
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/generated.proto200
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/helpers.go146
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/register.go65
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types.generated.go4879
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types.go209
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go148
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go469
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.deepcopy.go269
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.defaults.go66
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/defaults.go48
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/generated.pb.go2821
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/generated.proto198
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/helpers.go146
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/register.go65
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/types.generated.go4879
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/types.go207
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/types_swagger_doc_generated.go148
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.conversion.go415
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.deepcopy.go269
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.defaults.go66
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/rbac/zz_generated.deepcopy.go269
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/settings/doc.go18
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/settings/register.go52
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/settings/types.go63
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/generated.pb.go929
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/generated.proto75
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/register.go59
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/types.go67
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/types_swagger_doc_generated.go61
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.conversion.go165
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.deepcopy.go127
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.defaults.go98
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/settings/zz_generated.deepcopy.go127
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/storage/doc.go18
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/storage/register.go51
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/storage/types.go60
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/storage/v1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/storage/v1/generated.pb.go746
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/storage/v1/generated.proto62
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/storage/v1/register.go60
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/storage/v1/types.go57
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/storage/v1/types_swagger_doc_generated.go51
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/storage/v1/zz_generated.conversion.go93
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/storage/v1/zz_generated.deepcopy.go82
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/storage/v1/zz_generated.defaults.go32
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/doc.go18
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/generated.pb.go747
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/generated.proto62
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/register.go60
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/types.generated.go985
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/types.go57
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/types_swagger_doc_generated.go51
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.conversion.go93
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.deepcopy.go82
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.defaults.go32
-rw-r--r--vendor/k8s.io/client-go/pkg/apis/storage/zz_generated.deepcopy.go82
-rw-r--r--vendor/k8s.io/client-go/pkg/util/doc.go20
-rw-r--r--vendor/k8s.io/client-go/pkg/util/parsers/parsers.go54
-rw-r--r--vendor/k8s.io/client-go/pkg/util/template.go48
-rw-r--r--vendor/k8s.io/client-go/pkg/util/umask.go27
-rw-r--r--vendor/k8s.io/client-go/pkg/util/umask_windows.go27
-rw-r--r--vendor/k8s.io/client-go/pkg/util/util.go140
-rw-r--r--vendor/k8s.io/client-go/pkg/version/base.go59
-rw-r--r--vendor/k8s.io/client-go/pkg/version/doc.go19
-rw-r--r--vendor/k8s.io/client-go/pkg/version/version.go42
-rw-r--r--vendor/k8s.io/client-go/rest/client.go258
-rw-r--r--vendor/k8s.io/client-go/rest/config.go416
-rw-r--r--vendor/k8s.io/client-go/rest/plugin.go73
-rw-r--r--vendor/k8s.io/client-go/rest/request.go1250
-rw-r--r--vendor/k8s.io/client-go/rest/transport.go99
-rw-r--r--vendor/k8s.io/client-go/rest/url_utils.go90
-rw-r--r--vendor/k8s.io/client-go/rest/urlbackoff.go107
-rw-r--r--vendor/k8s.io/client-go/rest/versions.go88
-rw-r--r--vendor/k8s.io/client-go/rest/watch/decoder.go72
-rw-r--r--vendor/k8s.io/client-go/rest/watch/encoder.go56
-rw-r--r--vendor/k8s.io/client-go/tools/cache/controller.go391
-rw-r--r--vendor/k8s.io/client-go/tools/cache/delta_fifo.go681
-rw-r--r--vendor/k8s.io/client-go/tools/cache/doc.go24
-rw-r--r--vendor/k8s.io/client-go/tools/cache/expiration_cache.go208
-rw-r--r--vendor/k8s.io/client-go/tools/cache/expiration_cache_fakes.go54
-rw-r--r--vendor/k8s.io/client-go/tools/cache/fake_custom_store.go102
-rw-r--r--vendor/k8s.io/client-go/tools/cache/fifo.go358
-rw-r--r--vendor/k8s.io/client-go/tools/cache/index.go87
-rw-r--r--vendor/k8s.io/client-go/tools/cache/listers.go160
-rw-r--r--vendor/k8s.io/client-go/tools/cache/listwatch.go162
-rw-r--r--vendor/k8s.io/client-go/tools/cache/mutation_cache.go261
-rw-r--r--vendor/k8s.io/client-go/tools/cache/mutation_detector.go135
-rw-r--r--vendor/k8s.io/client-go/tools/cache/reflector.go421
-rw-r--r--vendor/k8s.io/client-go/tools/cache/shared_informer.go581
-rwxr-xr-xvendor/k8s.io/client-go/tools/cache/store.go244
-rw-r--r--vendor/k8s.io/client-go/tools/cache/thread_safe_store.go306
-rw-r--r--vendor/k8s.io/client-go/tools/cache/undelta_store.go83
-rw-r--r--vendor/k8s.io/client-go/tools/clientcmd/api/helpers.go183
-rw-r--r--vendor/k8s.io/client-go/tools/clientcmd/api/register.go46
-rw-r--r--vendor/k8s.io/client-go/tools/clientcmd/api/types.go185
-rw-r--r--vendor/k8s.io/client-go/tools/metrics/metrics.go61
-rw-r--r--vendor/k8s.io/client-go/tools/record/doc.go18
-rw-r--r--vendor/k8s.io/client-go/tools/record/event.go318
-rw-r--r--vendor/k8s.io/client-go/tools/record/events_cache.go377
-rw-r--r--vendor/k8s.io/client-go/tools/record/fake.go54
-rw-r--r--vendor/k8s.io/client-go/tools/remotecommand/doc.go20
-rw-r--r--vendor/k8s.io/client-go/tools/remotecommand/errorstream.go55
-rw-r--r--vendor/k8s.io/client-go/tools/remotecommand/remotecommand.go178
-rw-r--r--vendor/k8s.io/client-go/tools/remotecommand/resize.go33
-rw-r--r--vendor/k8s.io/client-go/tools/remotecommand/v1.go160
-rw-r--r--vendor/k8s.io/client-go/tools/remotecommand/v2.go195
-rw-r--r--vendor/k8s.io/client-go/tools/remotecommand/v3.go111
-rw-r--r--vendor/k8s.io/client-go/tools/remotecommand/v4.go119
-rw-r--r--vendor/k8s.io/client-go/transport/cache.go88
-rw-r--r--vendor/k8s.io/client-go/transport/config.go95
-rw-r--r--vendor/k8s.io/client-go/transport/round_trippers.go424
-rw-r--r--vendor/k8s.io/client-go/transport/transport.go141
-rw-r--r--vendor/k8s.io/client-go/util/cert/cert.go215
-rw-r--r--vendor/k8s.io/client-go/util/cert/csr.go75
-rw-r--r--vendor/k8s.io/client-go/util/cert/io.go150
-rw-r--r--vendor/k8s.io/client-go/util/cert/pem.go138
-rw-r--r--vendor/k8s.io/client-go/util/exec/exec.go52
-rw-r--r--vendor/k8s.io/client-go/util/flowcontrol/backoff.go149
-rw-r--r--vendor/k8s.io/client-go/util/flowcontrol/throttle.go148
-rw-r--r--vendor/k8s.io/client-go/util/homedir/homedir.go47
-rw-r--r--vendor/k8s.io/client-go/util/integer/integer.go67
-rw-r--r--vendor/k8s.io/kubernetes/LICENSE202
-rw-r--r--vendor/k8s.io/kubernetes/README.md86
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/annotation_key_constants.go113
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/doc.go24
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/field_constants.go38
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/helper/helpers.go604
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/install/install.go70
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/json.go28
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/objectreference.go34
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/register.go123
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/resource.go62
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/service/util.go148
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/taint.go36
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/toleration.go30
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/types.go3989
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/util/group_version.go48
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/v1/annotation_key_constants.go113
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/v1/conversion.go776
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/v1/defaults.go373
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/v1/doc.go23
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/v1/generate.go64
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/v1/generated.pb.go45117
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/v1/generated.proto4117
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/v1/helper/helpers.go530
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/v1/meta.go108
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/v1/objectreference.go33
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/v1/pod/util.go358
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/v1/ref/ref.go121
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/v1/register.go106
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/v1/resource.go63
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/v1/taint.go33
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/v1/toleration.go56
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/v1/types.generated.go76748
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/v1/types.go4617
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/v1/types_swagger_doc_generated.go2039
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/v1/zz_generated.conversion.go5169
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/v1/zz_generated.deepcopy.go3775
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/v1/zz_generated.defaults.go631
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/validation/doc.go19
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/validation/events.go80
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/validation/schema.go435
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/validation/validation.go4241
-rw-r--r--vendor/k8s.io/kubernetes/pkg/api/zz_generated.deepcopy.go3781
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/doc.go24
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/register.go53
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/types.go216
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/defaults.go39
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/doc.go27
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/generated.pb.go2228
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/generated.proto203
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/register.go60
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/types.generated.go4232
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/types.go220
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/types_swagger_doc_generated.go133
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/zz_generated.conversion.go311
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/zz_generated.deepcopy.go254
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/zz_generated.defaults.go70
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/zz_generated.deepcopy.go254
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/apps/doc.go19
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/apps/install/install.go49
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/apps/register.go60
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/apps/types.go229
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/conversion.go342
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/defaults.go117
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/doc.go22
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/generated.pb.go4934
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/generated.proto441
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/register.go65
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/types.generated.go8414
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/types.go516
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/types_swagger_doc_generated.go257
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/zz_generated.conversion.go322
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go459
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/zz_generated.defaults.go326
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/apps/zz_generated.deepcopy.go208
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authentication/doc.go19
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authentication/install/install.go53
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authentication/register.go50
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authentication/types.go89
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/conversion.go26
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/defaults.go25
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/doc.go22
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/generated.pb.go1301
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/generated.proto99
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/register.go58
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/types.go106
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/types_swagger_doc_generated.go72
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/zz_generated.conversion.go153
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/zz_generated.deepcopy.go110
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/zz_generated.defaults.go32
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/conversion.go26
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/defaults.go25
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/doc.go22
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/generated.pb.go1302
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/generated.proto99
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/register.go58
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/types.generated.go1568
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/types.go91
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/types_swagger_doc_generated.go72
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/zz_generated.conversion.go153
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/zz_generated.deepcopy.go110
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/zz_generated.defaults.go32
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authentication/zz_generated.deepcopy.go110
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/doc.go19
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/install/install.go53
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/register.go52
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/types.go146
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/conversion.go26
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/defaults.go25
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/doc.go23
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/generated.pb.go2364
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/generated.proto183
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/register.go61
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/types.generated.go3233
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/types.go176
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/types_swagger_doc_generated.go119
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/zz_generated.conversion.go279
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/zz_generated.deepcopy.go187
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/zz_generated.defaults.go32
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/conversion.go26
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/defaults.go25
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/doc.go23
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/generated.pb.go2364
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/generated.proto183
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/register.go61
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types.generated.go3233
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types.go176
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types_swagger_doc_generated.go119
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/zz_generated.conversion.go279
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/zz_generated.deepcopy.go187
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/zz_generated.defaults.go32
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/authorization/zz_generated.deepcopy.go187
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/annotations.go34
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/doc.go19
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/install/install.go51
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/register.go53
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/types.go358
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/conversion.go275
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/defaults.go35
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/doc.go22
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.pb.go3787
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.proto321
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/register.go60
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types.generated.go5633
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types.go332
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types_swagger_doc_generated.go218
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/zz_generated.conversion.go506
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/zz_generated.deepcopy.go340
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/zz_generated.defaults.go47
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/defaults.go47
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/doc.go22
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/generated.pb.go3401
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/generated.proto301
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/register.go59
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/types.generated.go5218
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/types.go309
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/types_swagger_doc_generated.go189
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/zz_generated.conversion.go449
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/zz_generated.deepcopy.go319
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/zz_generated.defaults.go47
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/autoscaling/zz_generated.deepcopy.go357
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/doc.go19
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/install/install.go51
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/register.go57
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/types.go285
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/v1/conversion.go84
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/v1/defaults.go44
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/v1/doc.go22
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/v1/generated.pb.go1585
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/v1/generated.proto168
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/v1/register.go59
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types.generated.go2681
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types.go168
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types_swagger_doc_generated.go93
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/v1/zz_generated.conversion.go210
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/v1/zz_generated.deepcopy.go167
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/v1/zz_generated.defaults.go176
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/conversion.go44
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/defaults.go34
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/doc.go22
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.pb.go1511
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.proto133
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/register.go62
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types.generated.go2525
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types.go148
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types_swagger_doc_generated.go96
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/zz_generated.conversion.go239
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go176
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/zz_generated.defaults.go310
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/batch/zz_generated.deepcopy.go302
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/certificates/doc.go19
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/certificates/helpers.go38
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/certificates/install/install.go51
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/certificates/register.go52
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/certificates/types.go143
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/conversion.go38
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/defaults.go28
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/doc.go23
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/generated.pb.go1694
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/generated.proto122
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/helpers.go38
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/register.go66
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/types.generated.go2624
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/types.go152
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/types_swagger_doc_generated.go74
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.conversion.go189
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.deepcopy.go155
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.defaults.go47
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/certificates/zz_generated.deepcopy.go155
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/extensions/doc.go19
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/extensions/helpers.go37
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/extensions/install/install.go51
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/extensions/register.go70
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/extensions/types.go1147
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion.go428
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/defaults.go135
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/doc.go25
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.pb.go12108
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.proto1022
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/register.go77
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types.generated.go21979
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types.go1171
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go631
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/zz_generated.conversion.go1714
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/zz_generated.deepcopy.go1163
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/zz_generated.defaults.go475
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/extensions/zz_generated.deepcopy.go1146
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/networking/doc.go19
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/networking/register.go51
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/networking/types.go115
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/networking/v1/conversion.go195
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/networking/v1/defaults.go34
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/networking/v1/doc.go22
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/networking/v1/generated.pb.go1345
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/networking/v1/generated.proto127
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/networking/v1/register.go50
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/networking/v1/types.generated.go2322
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/networking/v1/types.go120
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/networking/v1/types_swagger_doc_generated.go90
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/networking/v1/zz_generated.conversion.go195
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/networking/v1/zz_generated.deepcopy.go182
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/networking/v1/zz_generated.defaults.go51
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/networking/zz_generated.deepcopy.go182
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/policy/doc.go19
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/policy/install/install.go49
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/policy/register.go54
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/policy/types.go120
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/doc.go25
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.pb.go1454
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.proto114
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/register.go61
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/types.generated.go2305
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/types.go111
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/types_swagger_doc_generated.go83
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/zz_generated.conversion.go185
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/zz_generated.deepcopy.go153
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/zz_generated.defaults.go32
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/policy/zz_generated.deepcopy.go153
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/doc.go19
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/helpers.go399
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/install/install.go53
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/register.go58
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/types.go188
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/conversion.go81
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/defaults.go48
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/doc.go23
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.pb.go2822
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.proto200
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/helpers.go148
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/register.go65
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.generated.go4879
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.go209
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go148
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go469
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/zz_generated.deepcopy.go269
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/zz_generated.defaults.go66
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/defaults.go48
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/doc.go23
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/generated.pb.go2821
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/generated.proto198
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/helpers.go148
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/register.go65
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/types.generated.go4879
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/types.go207
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/types_swagger_doc_generated.go148
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/zz_generated.conversion.go415
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/zz_generated.deepcopy.go269
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/zz_generated.defaults.go66
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/rbac/zz_generated.deepcopy.go269
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/settings/doc.go19
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/settings/install/install.go49
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/settings/register.go52
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/settings/types.go63
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/doc.go23
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/generated.pb.go929
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/generated.proto75
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/register.go59
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/types.go67
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/types_swagger_doc_generated.go61
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/zz_generated.conversion.go165
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/zz_generated.deepcopy.go127
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/zz_generated.defaults.go98
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/settings/zz_generated.deepcopy.go127
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/storage/doc.go19
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/storage/install/install.go53
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/storage/register.go51
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/storage/types.go60
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/storage/v1/doc.go22
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/storage/v1/generated.pb.go746
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/storage/v1/generated.proto62
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/storage/v1/register.go60
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/storage/v1/types.go57
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/storage/v1/types_swagger_doc_generated.go51
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/storage/v1/zz_generated.conversion.go93
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/storage/v1/zz_generated.deepcopy.go82
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/storage/v1/zz_generated.defaults.go32
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/doc.go22
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/generated.pb.go747
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/generated.proto62
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/register.go60
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/types.generated.go985
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/types.go57
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/types_swagger_doc_generated.go51
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/zz_generated.conversion.go93
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/zz_generated.deepcopy.go82
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/zz_generated.defaults.go32
-rw-r--r--vendor/k8s.io/kubernetes/pkg/apis/storage/zz_generated.deepcopy.go82
-rw-r--r--vendor/k8s.io/kubernetes/pkg/capabilities/capabilities.go94
-rw-r--r--vendor/k8s.io/kubernetes/pkg/capabilities/doc.go18
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/clientset.go570
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/doc.go20
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/import_known_versions.go42
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme/doc.go20
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme/register.go91
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/admissionregistration/v1alpha1/admissionregistration_client.go93
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/admissionregistration/v1alpha1/doc.go20
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/admissionregistration/v1alpha1/externaladmissionhookconfiguration.go145
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/admissionregistration/v1alpha1/generated_expansion.go21
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/admissionregistration/v1alpha1/initializerconfiguration.go145
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/apps_client.go103
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/controllerrevision.go155
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/deployment.go172
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/doc.go20
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/generated_expansion.go25
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/scale.go46
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/statefulset.go172
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1/authentication_client.go88
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1/doc.go20
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1/generated_expansion.go17
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1/tokenreview.go44
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1/tokenreview_expansion.go35
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/authentication_client.go88
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/doc.go20
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/generated_expansion.go17
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/tokenreview.go44
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/tokenreview_expansion.go35
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/authorization_client.go98
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/doc.go20
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/generated_expansion.go17
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/localsubjectaccessreview.go46
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/localsubjectaccessreview_expansion.go36
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/selfsubjectaccessreview.go44
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/selfsubjectaccessreview_expansion.go35
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/subjectaccessreview.go44
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/subjectaccessreview_expansion.go36
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/authorization_client.go98
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/doc.go20
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/generated_expansion.go17
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/localsubjectaccessreview.go46
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/localsubjectaccessreview_expansion.go36
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/selfsubjectaccessreview.go44
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/selfsubjectaccessreview_expansion.go35
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/subjectaccessreview.go44
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/subjectaccessreview_expansion.go36
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/autoscaling_client.go88
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/doc.go20
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/horizontalpodautoscaler.go172
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v2alpha1/autoscaling_client.go88
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v2alpha1/doc.go20
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v2alpha1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v2alpha1/horizontalpodautoscaler.go172
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/batch_client.go88
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/doc.go20
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/job.go172
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/batch_client.go88
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/cronjob.go172
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/doc.go20
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificates_client.go88
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificatesigningrequest.go161
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificatesigningrequest_expansion.go37
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/doc.go20
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/generated_expansion.go17
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/componentstatus.go145
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/configmap.go155
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/core_client.go163
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/doc.go20
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/endpoints.go155
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/event.go155
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/event_expansion.go164
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/generated_expansion.go39
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/limitrange.go155
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/namespace.go161
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/namespace_expansion.go31
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/node.go161
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/node_expansion.go43
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/persistentvolume.go161
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/persistentvolumeclaim.go172
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/pod.go172
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/pod_expansion.go45
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/podtemplate.go155
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/replicationcontroller.go172
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/resourcequota.go172
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/secret.go155
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/service.go172
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/service_expansion.go41
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/serviceaccount.go155
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/daemonset.go172
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/deployment.go172
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/deployment_expansion.go29
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/doc.go20
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/extensions_client.go118
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/generated_expansion.go27
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/ingress.go172
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/podsecuritypolicy.go145
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/replicaset.go172
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/scale.go46
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/scale_expansion.go65
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/thirdpartyresource.go145
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/networking/v1/doc.go20
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/networking/v1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/networking/v1/networking_client.go88
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/networking/v1/networkpolicy.go155
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/doc.go20
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/eviction.go46
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/eviction_expansion.go38
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/poddisruptionbudget.go172
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/policy_client.go93
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/clusterrole.go145
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/clusterrolebinding.go145
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/doc.go20
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/generated_expansion.go25
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/rbac_client.go103
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/role.go155
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/rolebinding.go155
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/clusterrole.go145
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/clusterrolebinding.go145
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/doc.go20
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/generated_expansion.go25
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/rbac_client.go103
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/role.go155
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/rolebinding.go155
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/doc.go20
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/podpreset.go155
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/settings_client.go88
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1/doc.go20
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1/storage_client.go88
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1/storageclass.go145
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/doc.go20
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/generated_expansion.go19
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/storage_client.go88
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/storageclass.go145
-rw-r--r--vendor/k8s.io/kubernetes/pkg/client/retry/util.go79
-rw-r--r--vendor/k8s.io/kubernetes/pkg/cloudprovider/README.md16
-rw-r--r--vendor/k8s.io/kubernetes/pkg/cloudprovider/cloud.go186
-rw-r--r--vendor/k8s.io/kubernetes/pkg/cloudprovider/doc.go18
-rw-r--r--vendor/k8s.io/kubernetes/pkg/cloudprovider/plugins.go134
-rw-r--r--vendor/k8s.io/kubernetes/pkg/controller/client_builder.go292
-rw-r--r--vendor/k8s.io/kubernetes/pkg/controller/controller_ref_manager.go515
-rw-r--r--vendor/k8s.io/kubernetes/pkg/controller/controller_utils.go1018
-rw-r--r--vendor/k8s.io/kubernetes/pkg/controller/doc.go19
-rw-r--r--vendor/k8s.io/kubernetes/pkg/controller/lookup_cache.go92
-rw-r--r--vendor/k8s.io/kubernetes/pkg/features/kube_features.go146
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime/api.pb.go24201
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime/api.proto1081
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime/constants.go27
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/container/cache.go199
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/container/container_gc.go84
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/container/container_reference_manager.go62
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/container/helpers.go367
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/container/os.go107
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/container/pty_linux.go30
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/container/pty_unsupported.go28
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/container/ref.go73
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/container/resize.go46
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime.go646
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime_cache.go96
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime_cache_fake.go45
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/container/sync_result.go128
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/events/event.go104
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/leaky/leaky.go25
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/network/hostport/fake_iptables.go331
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/network/hostport/hostport.go200
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/network/hostport/hostport_manager.go329
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/network/hostport/hostport_syncer.go306
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/constants.go23
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/httpstream.go309
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/portforward.go53
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/websocket.go198
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/attach.go59
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/doc.go18
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/exec.go79
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/httpstream.go447
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/websocket.go132
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/errors.go55
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/request_cache.go146
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/server.go344
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/types/constants.go22
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/types/doc.go18
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/types/labels.go40
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/types/pod_update.go153
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/types/types.go93
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/util/format/pod.go72
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/util/format/resources.go36
-rw-r--r--vendor/k8s.io/kubernetes/pkg/kubelet/util/ioutils/ioutils.go37
-rw-r--r--vendor/k8s.io/kubernetes/pkg/proxy/doc.go18
-rw-r--r--vendor/k8s.io/kubernetes/pkg/proxy/healthcheck/doc.go18
-rw-r--r--vendor/k8s.io/kubernetes/pkg/proxy/healthcheck/healthcheck.go333
-rw-r--r--vendor/k8s.io/kubernetes/pkg/proxy/iptables/metrics.go50
-rw-r--r--vendor/k8s.io/kubernetes/pkg/proxy/iptables/proxier.go1732
-rw-r--r--vendor/k8s.io/kubernetes/pkg/proxy/types.go44
-rw-r--r--vendor/k8s.io/kubernetes/pkg/proxy/util/conntrack.go58
-rw-r--r--vendor/k8s.io/kubernetes/pkg/security/apparmor/helpers.go77
-rw-r--r--vendor/k8s.io/kubernetes/pkg/security/apparmor/validate.go228
-rw-r--r--vendor/k8s.io/kubernetes/pkg/security/apparmor/validate_disabled.go24
-rw-r--r--vendor/k8s.io/kubernetes/pkg/serviceaccount/jwt.go314
-rw-r--r--vendor/k8s.io/kubernetes/pkg/serviceaccount/util.go74
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/async/bounded_frequency_runner.go239
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/async/runner.go58
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/dbus/dbus.go133
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/dbus/doc.go18
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/dbus/fake_dbus.go135
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/doc.go20
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/exec/doc.go18
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/exec/exec.go200
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/exec/fake_exec.go145
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/hash/hash.go37
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/interrupt/interrupt.go104
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/io/io.go61
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/io/writer.go80
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/iptables/doc.go18
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/iptables/iptables.go652
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/iptables/iptables_linux.go93
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/iptables/iptables_unsupported.go32
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/iptables/save_restore.go110
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/mount/doc.go18
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/mount/fake.go173
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/mount/mount.go245
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/mount/mount_linux.go432
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/mount/mount_unsupported.go67
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/mount/nsenter_mount.go241
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/mount/nsenter_mount_unsupported.go63
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/net/sets/doc.go28
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/net/sets/ipnet.go119
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/parsers/parsers.go54
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/sysctl/sysctl.go78
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/template.go48
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/term/resize.go132
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/term/resizeevents.go61
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/term/resizeevents_windows.go62
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/term/setsize.go29
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/term/setsize_unsupported.go28
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/term/term.go110
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/term/term_writer.go124
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/umask.go27
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/umask_windows.go27
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/util.go140
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/version/doc.go18
-rw-r--r--vendor/k8s.io/kubernetes/pkg/util/version/version.go236
-rw-r--r--vendor/k8s.io/kubernetes/pkg/volume/doc.go19
-rw-r--r--vendor/k8s.io/kubernetes/pkg/volume/metrics_cached.go74
-rw-r--r--vendor/k8s.io/kubernetes/pkg/volume/metrics_du.go99
-rw-r--r--vendor/k8s.io/kubernetes/pkg/volume/metrics_errors.go77
-rw-r--r--vendor/k8s.io/kubernetes/pkg/volume/metrics_nil.go30
-rw-r--r--vendor/k8s.io/kubernetes/pkg/volume/metrics_statfs.go69
-rw-r--r--vendor/k8s.io/kubernetes/pkg/volume/plugins.go603
-rw-r--r--vendor/k8s.io/kubernetes/pkg/volume/util.go456
-rw-r--r--vendor/k8s.io/kubernetes/pkg/volume/util/atomic_writer.go462
-rw-r--r--vendor/k8s.io/kubernetes/pkg/volume/util/device_util.go31
-rw-r--r--vendor/k8s.io/kubernetes/pkg/volume/util/device_util_linux.go61
-rw-r--r--vendor/k8s.io/kubernetes/pkg/volume/util/device_util_unsupported.go24
-rw-r--r--vendor/k8s.io/kubernetes/pkg/volume/util/doc.go18
-rw-r--r--vendor/k8s.io/kubernetes/pkg/volume/util/fs.go96
-rw-r--r--vendor/k8s.io/kubernetes/pkg/volume/util/fs_unsupported.go38
-rw-r--r--vendor/k8s.io/kubernetes/pkg/volume/util/io_util.go47
-rw-r--r--vendor/k8s.io/kubernetes/pkg/volume/util/util.go213
-rw-r--r--vendor/k8s.io/kubernetes/pkg/volume/volume.go230
-rw-r--r--vendor/k8s.io/kubernetes/pkg/volume/volume_linux.go91
-rw-r--r--vendor/k8s.io/kubernetes/pkg/volume/volume_unsupported.go23
-rw-r--r--vendor/k8s.io/kubernetes/third_party/forked/golang/LICENSE27
-rw-r--r--vendor/k8s.io/kubernetes/third_party/forked/golang/PATENTS22
-rw-r--r--vendor/k8s.io/kubernetes/third_party/forked/golang/expansion/expand.go102
-rw-r--r--vendor/k8s.io/kubernetes/third_party/protobuf/google/protobuf/compiler/plugin.proto150
-rw-r--r--vendor/k8s.io/kubernetes/third_party/protobuf/google/protobuf/descriptor.proto779
1292 files changed, 760935 insertions, 0 deletions
diff --git a/vendor/k8s.io/apimachinery/LICENSE b/vendor/k8s.io/apimachinery/LICENSE
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/k8s.io/apimachinery/README.md b/vendor/k8s.io/apimachinery/README.md
new file mode 100644
index 000000000..98899fb58
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/README.md
@@ -0,0 +1,29 @@
+# apimachinery
+
+Scheme, typing, encoding, decoding, and conversion packages for Kubernetes and Kubernetes-like API objects.
+
+
+## Purpose
+
+This library is a shared dependency for servers and clients to work with Kubernetes API infrastructure without direct
+type dependencies. It's first comsumers are `k8s.io/kubernetes`, `k8s.io/client-go`, and `k8s.io/apiserver`.
+
+
+## Compatibility
+
+There are *NO compatibility guarantees* for this repository. It is in direct support of Kubernetes, so branches
+will track Kubernetes and be compatible with that repo. As we more cleanly separate the layers, we will review the
+compatibility guarantee.
+
+
+## Where does it come from?
+
+`apimachinery` is synced from https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery.
+Code changes are made in that location, merged into `k8s.io/kubernetes` and later synced here.
+
+
+## Things you should *NOT* do
+
+ 1. Add API types to this repo. This is for the machinery, not for the types.
+ 2. Directly modify any files under `pkg` in this repo. Those are driven from `k8s.io/kuberenetes/staging/src/k8s.io/apimachinery`.
+ 3. Expect compatibility. This repo is direct support of Kubernetes and the API isn't yet stable enough for API guarantees. \ No newline at end of file
diff --git a/vendor/k8s.io/apimachinery/pkg/api/equality/semantic.go b/vendor/k8s.io/apimachinery/pkg/api/equality/semantic.go
new file mode 100644
index 000000000..3ebd8c719
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/api/equality/semantic.go
@@ -0,0 +1,46 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package equality
+
+import (
+ "k8s.io/apimachinery/pkg/api/resource"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/conversion"
+ "k8s.io/apimachinery/pkg/fields"
+ "k8s.io/apimachinery/pkg/labels"
+)
+
+// Semantic can do semantic deep equality checks for api objects.
+// Example: apiequality.Semantic.DeepEqual(aPod, aPodWithNonNilButEmptyMaps) == true
+var Semantic = conversion.EqualitiesOrDie(
+ func(a, b resource.Quantity) bool {
+ // Ignore formatting, only care that numeric value stayed the same.
+ // TODO: if we decide it's important, it should be safe to start comparing the format.
+ //
+ // Uninitialized quantities are equivalent to 0 quantities.
+ return a.Cmp(b) == 0
+ },
+ func(a, b metav1.Time) bool {
+ return a.UTC() == b.UTC()
+ },
+ func(a, b labels.Selector) bool {
+ return a.String() == b.String()
+ },
+ func(a, b fields.Selector) bool {
+ return a.String() == b.String()
+ },
+)
diff --git a/vendor/k8s.io/apimachinery/pkg/api/errors/doc.go b/vendor/k8s.io/apimachinery/pkg/api/errors/doc.go
new file mode 100644
index 000000000..167baf680
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/api/errors/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package errors provides detailed error types for api field validation.
+package errors // import "k8s.io/apimachinery/pkg/api/errors"
diff --git a/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go b/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go
new file mode 100644
index 000000000..560c889b9
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go
@@ -0,0 +1,478 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package errors
+
+import (
+ "encoding/json"
+ "fmt"
+ "net/http"
+ "strings"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/util/validation/field"
+)
+
+// HTTP Status codes not in the golang http package.
+const (
+ StatusUnprocessableEntity = 422
+ StatusTooManyRequests = 429
+ // StatusServerTimeout is an indication that a transient server error has
+ // occurred and the client *should* retry, with an optional Retry-After
+ // header to specify the back off window.
+ StatusServerTimeout = 504
+)
+
+// StatusError is an error intended for consumption by a REST API server; it can also be
+// reconstructed by clients from a REST response. Public to allow easy type switches.
+type StatusError struct {
+ ErrStatus metav1.Status
+}
+
+// APIStatus is exposed by errors that can be converted to an api.Status object
+// for finer grained details.
+type APIStatus interface {
+ Status() metav1.Status
+}
+
+var _ error = &StatusError{}
+
+// Error implements the Error interface.
+func (e *StatusError) Error() string {
+ return e.ErrStatus.Message
+}
+
+// Status allows access to e's status without having to know the detailed workings
+// of StatusError.
+func (e *StatusError) Status() metav1.Status {
+ return e.ErrStatus
+}
+
+// DebugError reports extended info about the error to debug output.
+func (e *StatusError) DebugError() (string, []interface{}) {
+ if out, err := json.MarshalIndent(e.ErrStatus, "", " "); err == nil {
+ return "server response object: %s", []interface{}{string(out)}
+ }
+ return "server response object: %#v", []interface{}{e.ErrStatus}
+}
+
+// UnexpectedObjectError can be returned by FromObject if it's passed a non-status object.
+type UnexpectedObjectError struct {
+ Object runtime.Object
+}
+
+// Error returns an error message describing 'u'.
+func (u *UnexpectedObjectError) Error() string {
+ return fmt.Sprintf("unexpected object: %v", u.Object)
+}
+
+// FromObject generates an StatusError from an metav1.Status, if that is the type of obj; otherwise,
+// returns an UnexpecteObjectError.
+func FromObject(obj runtime.Object) error {
+ switch t := obj.(type) {
+ case *metav1.Status:
+ return &StatusError{*t}
+ }
+ return &UnexpectedObjectError{obj}
+}
+
+// NewNotFound returns a new error which indicates that the resource of the kind and the name was not found.
+func NewNotFound(qualifiedResource schema.GroupResource, name string) *StatusError {
+ return &StatusError{metav1.Status{
+ Status: metav1.StatusFailure,
+ Code: http.StatusNotFound,
+ Reason: metav1.StatusReasonNotFound,
+ Details: &metav1.StatusDetails{
+ Group: qualifiedResource.Group,
+ Kind: qualifiedResource.Resource,
+ Name: name,
+ },
+ Message: fmt.Sprintf("%s %q not found", qualifiedResource.String(), name),
+ }}
+}
+
+// NewAlreadyExists returns an error indicating the item requested exists by that identifier.
+func NewAlreadyExists(qualifiedResource schema.GroupResource, name string) *StatusError {
+ return &StatusError{metav1.Status{
+ Status: metav1.StatusFailure,
+ Code: http.StatusConflict,
+ Reason: metav1.StatusReasonAlreadyExists,
+ Details: &metav1.StatusDetails{
+ Group: qualifiedResource.Group,
+ Kind: qualifiedResource.Resource,
+ Name: name,
+ },
+ Message: fmt.Sprintf("%s %q already exists", qualifiedResource.String(), name),
+ }}
+}
+
+// NewUnauthorized returns an error indicating the client is not authorized to perform the requested
+// action.
+func NewUnauthorized(reason string) *StatusError {
+ message := reason
+ if len(message) == 0 {
+ message = "not authorized"
+ }
+ return &StatusError{metav1.Status{
+ Status: metav1.StatusFailure,
+ Code: http.StatusUnauthorized,
+ Reason: metav1.StatusReasonUnauthorized,
+ Message: message,
+ }}
+}
+
+// NewForbidden returns an error indicating the requested action was forbidden
+func NewForbidden(qualifiedResource schema.GroupResource, name string, err error) *StatusError {
+ return &StatusError{metav1.Status{
+ Status: metav1.StatusFailure,
+ Code: http.StatusForbidden,
+ Reason: metav1.StatusReasonForbidden,
+ Details: &metav1.StatusDetails{
+ Group: qualifiedResource.Group,
+ Kind: qualifiedResource.Resource,
+ Name: name,
+ },
+ Message: fmt.Sprintf("%s %q is forbidden: %v", qualifiedResource.String(), name, err),
+ }}
+}
+
+// NewConflict returns an error indicating the item can't be updated as provided.
+func NewConflict(qualifiedResource schema.GroupResource, name string, err error) *StatusError {
+ return &StatusError{metav1.Status{
+ Status: metav1.StatusFailure,
+ Code: http.StatusConflict,
+ Reason: metav1.StatusReasonConflict,
+ Details: &metav1.StatusDetails{
+ Group: qualifiedResource.Group,
+ Kind: qualifiedResource.Resource,
+ Name: name,
+ },
+ Message: fmt.Sprintf("Operation cannot be fulfilled on %s %q: %v", qualifiedResource.String(), name, err),
+ }}
+}
+
+// NewGone returns an error indicating the item no longer available at the server and no forwarding address is known.
+func NewGone(message string) *StatusError {
+ return &StatusError{metav1.Status{
+ Status: metav1.StatusFailure,
+ Code: http.StatusGone,
+ Reason: metav1.StatusReasonGone,
+ Message: message,
+ }}
+}
+
+// NewInvalid returns an error indicating the item is invalid and cannot be processed.
+func NewInvalid(qualifiedKind schema.GroupKind, name string, errs field.ErrorList) *StatusError {
+ causes := make([]metav1.StatusCause, 0, len(errs))
+ for i := range errs {
+ err := errs[i]
+ causes = append(causes, metav1.StatusCause{
+ Type: metav1.CauseType(err.Type),
+ Message: err.ErrorBody(),
+ Field: err.Field,
+ })
+ }
+ return &StatusError{metav1.Status{
+ Status: metav1.StatusFailure,
+ Code: StatusUnprocessableEntity, // RFC 4918: StatusUnprocessableEntity
+ Reason: metav1.StatusReasonInvalid,
+ Details: &metav1.StatusDetails{
+ Group: qualifiedKind.Group,
+ Kind: qualifiedKind.Kind,
+ Name: name,
+ Causes: causes,
+ },
+ Message: fmt.Sprintf("%s %q is invalid: %v", qualifiedKind.String(), name, errs.ToAggregate()),
+ }}
+}
+
+// NewBadRequest creates an error that indicates that the request is invalid and can not be processed.
+func NewBadRequest(reason string) *StatusError {
+ return &StatusError{metav1.Status{
+ Status: metav1.StatusFailure,
+ Code: http.StatusBadRequest,
+ Reason: metav1.StatusReasonBadRequest,
+ Message: reason,
+ }}
+}
+
+// NewServiceUnavailable creates an error that indicates that the requested service is unavailable.
+func NewServiceUnavailable(reason string) *StatusError {
+ return &StatusError{metav1.Status{
+ Status: metav1.StatusFailure,
+ Code: http.StatusServiceUnavailable,
+ Reason: metav1.StatusReasonServiceUnavailable,
+ Message: reason,
+ }}
+}
+
+// NewMethodNotSupported returns an error indicating the requested action is not supported on this kind.
+func NewMethodNotSupported(qualifiedResource schema.GroupResource, action string) *StatusError {
+ return &StatusError{metav1.Status{
+ Status: metav1.StatusFailure,
+ Code: http.StatusMethodNotAllowed,
+ Reason: metav1.StatusReasonMethodNotAllowed,
+ Details: &metav1.StatusDetails{
+ Group: qualifiedResource.Group,
+ Kind: qualifiedResource.Resource,
+ },
+ Message: fmt.Sprintf("%s is not supported on resources of kind %q", action, qualifiedResource.String()),
+ }}
+}
+
+// NewServerTimeout returns an error indicating the requested action could not be completed due to a
+// transient error, and the client should try again.
+func NewServerTimeout(qualifiedResource schema.GroupResource, operation string, retryAfterSeconds int) *StatusError {
+ return &StatusError{metav1.Status{
+ Status: metav1.StatusFailure,
+ Code: http.StatusInternalServerError,
+ Reason: metav1.StatusReasonServerTimeout,
+ Details: &metav1.StatusDetails{
+ Group: qualifiedResource.Group,
+ Kind: qualifiedResource.Resource,
+ Name: operation,
+ RetryAfterSeconds: int32(retryAfterSeconds),
+ },
+ Message: fmt.Sprintf("The %s operation against %s could not be completed at this time, please try again.", operation, qualifiedResource.String()),
+ }}
+}
+
+// NewServerTimeoutForKind should not exist. Server timeouts happen when accessing resources, the Kind is just what we
+// happened to be looking at when the request failed. This delegates to keep code sane, but we should work towards removing this.
+func NewServerTimeoutForKind(qualifiedKind schema.GroupKind, operation string, retryAfterSeconds int) *StatusError {
+ return NewServerTimeout(schema.GroupResource{Group: qualifiedKind.Group, Resource: qualifiedKind.Kind}, operation, retryAfterSeconds)
+}
+
+// NewInternalError returns an error indicating the item is invalid and cannot be processed.
+func NewInternalError(err error) *StatusError {
+ return &StatusError{metav1.Status{
+ Status: metav1.StatusFailure,
+ Code: http.StatusInternalServerError,
+ Reason: metav1.StatusReasonInternalError,
+ Details: &metav1.StatusDetails{
+ Causes: []metav1.StatusCause{{Message: err.Error()}},
+ },
+ Message: fmt.Sprintf("Internal error occurred: %v", err),
+ }}
+}
+
+// NewTimeoutError returns an error indicating that a timeout occurred before the request
+// could be completed. Clients may retry, but the operation may still complete.
+func NewTimeoutError(message string, retryAfterSeconds int) *StatusError {
+ return &StatusError{metav1.Status{
+ Status: metav1.StatusFailure,
+ Code: StatusServerTimeout,
+ Reason: metav1.StatusReasonTimeout,
+ Message: fmt.Sprintf("Timeout: %s", message),
+ Details: &metav1.StatusDetails{
+ RetryAfterSeconds: int32(retryAfterSeconds),
+ },
+ }}
+}
+
+// NewGenericServerResponse returns a new error for server responses that are not in a recognizable form.
+func NewGenericServerResponse(code int, verb string, qualifiedResource schema.GroupResource, name, serverMessage string, retryAfterSeconds int, isUnexpectedResponse bool) *StatusError {
+ reason := metav1.StatusReasonUnknown
+ message := fmt.Sprintf("the server responded with the status code %d but did not return more information", code)
+ switch code {
+ case http.StatusConflict:
+ if verb == "POST" {
+ reason = metav1.StatusReasonAlreadyExists
+ } else {
+ reason = metav1.StatusReasonConflict
+ }
+ message = "the server reported a conflict"
+ case http.StatusNotFound:
+ reason = metav1.StatusReasonNotFound
+ message = "the server could not find the requested resource"
+ case http.StatusBadRequest:
+ reason = metav1.StatusReasonBadRequest
+ message = "the server rejected our request for an unknown reason"
+ case http.StatusUnauthorized:
+ reason = metav1.StatusReasonUnauthorized
+ message = "the server has asked for the client to provide credentials"
+ case http.StatusForbidden:
+ reason = metav1.StatusReasonForbidden
+ // the server message has details about who is trying to perform what action. Keep its message.
+ message = serverMessage
+ case http.StatusMethodNotAllowed:
+ reason = metav1.StatusReasonMethodNotAllowed
+ message = "the server does not allow this method on the requested resource"
+ case StatusUnprocessableEntity:
+ reason = metav1.StatusReasonInvalid
+ message = "the server rejected our request due to an error in our request"
+ case StatusServerTimeout:
+ reason = metav1.StatusReasonServerTimeout
+ message = "the server cannot complete the requested operation at this time, try again later"
+ case StatusTooManyRequests:
+ reason = metav1.StatusReasonTimeout
+ message = "the server has received too many requests and has asked us to try again later"
+ default:
+ if code >= 500 {
+ reason = metav1.StatusReasonInternalError
+ message = fmt.Sprintf("an error on the server (%q) has prevented the request from succeeding", serverMessage)
+ }
+ }
+ switch {
+ case !qualifiedResource.Empty() && len(name) > 0:
+ message = fmt.Sprintf("%s (%s %s %s)", message, strings.ToLower(verb), qualifiedResource.String(), name)
+ case !qualifiedResource.Empty():
+ message = fmt.Sprintf("%s (%s %s)", message, strings.ToLower(verb), qualifiedResource.String())
+ }
+ var causes []metav1.StatusCause
+ if isUnexpectedResponse {
+ causes = []metav1.StatusCause{
+ {
+ Type: metav1.CauseTypeUnexpectedServerResponse,
+ Message: serverMessage,
+ },
+ }
+ } else {
+ causes = nil
+ }
+ return &StatusError{metav1.Status{
+ Status: metav1.StatusFailure,
+ Code: int32(code),
+ Reason: reason,
+ Details: &metav1.StatusDetails{
+ Group: qualifiedResource.Group,
+ Kind: qualifiedResource.Resource,
+ Name: name,
+
+ Causes: causes,
+ RetryAfterSeconds: int32(retryAfterSeconds),
+ },
+ Message: message,
+ }}
+}
+
+// IsNotFound returns true if the specified error was created by NewNotFound.
+func IsNotFound(err error) bool {
+ return reasonForError(err) == metav1.StatusReasonNotFound
+}
+
+// IsAlreadyExists determines if the err is an error which indicates that a specified resource already exists.
+func IsAlreadyExists(err error) bool {
+ return reasonForError(err) == metav1.StatusReasonAlreadyExists
+}
+
+// IsConflict determines if the err is an error which indicates the provided update conflicts.
+func IsConflict(err error) bool {
+ return reasonForError(err) == metav1.StatusReasonConflict
+}
+
+// IsInvalid determines if the err is an error which indicates the provided resource is not valid.
+func IsInvalid(err error) bool {
+ return reasonForError(err) == metav1.StatusReasonInvalid
+}
+
+// IsMethodNotSupported determines if the err is an error which indicates the provided action could not
+// be performed because it is not supported by the server.
+func IsMethodNotSupported(err error) bool {
+ return reasonForError(err) == metav1.StatusReasonMethodNotAllowed
+}
+
+// IsBadRequest determines if err is an error which indicates that the request is invalid.
+func IsBadRequest(err error) bool {
+ return reasonForError(err) == metav1.StatusReasonBadRequest
+}
+
+// IsUnauthorized determines if err is an error which indicates that the request is unauthorized and
+// requires authentication by the user.
+func IsUnauthorized(err error) bool {
+ return reasonForError(err) == metav1.StatusReasonUnauthorized
+}
+
+// IsForbidden determines if err is an error which indicates that the request is forbidden and cannot
+// be completed as requested.
+func IsForbidden(err error) bool {
+ return reasonForError(err) == metav1.StatusReasonForbidden
+}
+
+// IsTimeout determines if err is an error which indicates that request times out due to long
+// processing.
+func IsTimeout(err error) bool {
+ return reasonForError(err) == metav1.StatusReasonTimeout
+}
+
+// IsServerTimeout determines if err is an error which indicates that the request needs to be retried
+// by the client.
+func IsServerTimeout(err error) bool {
+ return reasonForError(err) == metav1.StatusReasonServerTimeout
+}
+
+// IsInternalError determines if err is an error which indicates an internal server error.
+func IsInternalError(err error) bool {
+ return reasonForError(err) == metav1.StatusReasonInternalError
+}
+
+// IsTooManyRequests determines if err is an error which indicates that there are too many requests
+// that the server cannot handle.
+// TODO: update IsTooManyRequests() when the TooManyRequests(429) error returned from the API server has a non-empty Reason field
+func IsTooManyRequests(err error) bool {
+ switch t := err.(type) {
+ case APIStatus:
+ return t.Status().Code == StatusTooManyRequests
+ }
+ return false
+}
+
+// IsUnexpectedServerError returns true if the server response was not in the expected API format,
+// and may be the result of another HTTP actor.
+func IsUnexpectedServerError(err error) bool {
+ switch t := err.(type) {
+ case APIStatus:
+ if d := t.Status().Details; d != nil {
+ for _, cause := range d.Causes {
+ if cause.Type == metav1.CauseTypeUnexpectedServerResponse {
+ return true
+ }
+ }
+ }
+ }
+ return false
+}
+
+// IsUnexpectedObjectError determines if err is due to an unexpected object from the master.
+func IsUnexpectedObjectError(err error) bool {
+ _, ok := err.(*UnexpectedObjectError)
+ return err != nil && ok
+}
+
+// SuggestsClientDelay returns true if this error suggests a client delay as well as the
+// suggested seconds to wait, or false if the error does not imply a wait.
+func SuggestsClientDelay(err error) (int, bool) {
+ switch t := err.(type) {
+ case APIStatus:
+ if t.Status().Details != nil {
+ switch t.Status().Reason {
+ case metav1.StatusReasonServerTimeout, metav1.StatusReasonTimeout:
+ return int(t.Status().Details.RetryAfterSeconds), true
+ }
+ }
+ }
+ return 0, false
+}
+
+func reasonForError(err error) metav1.StatusReason {
+ switch t := err.(type) {
+ case APIStatus:
+ return t.Status().Reason
+ }
+ return metav1.StatusReasonUnknown
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/default.go b/vendor/k8s.io/apimachinery/pkg/api/meta/default.go
new file mode 100644
index 000000000..5ea906a2a
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/api/meta/default.go
@@ -0,0 +1,51 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package meta
+
+import (
+ "strings"
+
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/util/sets"
+)
+
+// NewDefaultRESTMapperFromScheme instantiates a DefaultRESTMapper based on types registered in the given scheme.
+func NewDefaultRESTMapperFromScheme(defaultGroupVersions []schema.GroupVersion, interfacesFunc VersionInterfacesFunc,
+ importPathPrefix string, ignoredKinds, rootScoped sets.String, scheme *runtime.Scheme) *DefaultRESTMapper {
+
+ mapper := NewDefaultRESTMapper(defaultGroupVersions, interfacesFunc)
+ // enumerate all supported versions, get the kinds, and register with the mapper how to address
+ // our resources.
+ for _, gv := range defaultGroupVersions {
+ for kind, oType := range scheme.KnownTypes(gv) {
+ gvk := gv.WithKind(kind)
+ // TODO: Remove import path check.
+ // We check the import path because we currently stuff both "api" and "extensions" objects
+ // into the same group within Scheme since Scheme has no notion of groups yet.
+ if !strings.Contains(oType.PkgPath(), importPathPrefix) || ignoredKinds.Has(kind) {
+ continue
+ }
+ scope := RESTScopeNamespace
+ if rootScoped.Has(kind) {
+ scope = RESTScopeRoot
+ }
+ mapper.Add(gvk, scope)
+ }
+ }
+ return mapper
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/doc.go b/vendor/k8s.io/apimachinery/pkg/api/meta/doc.go
new file mode 100644
index 000000000..b6d42acf8
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/api/meta/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package meta provides functions for retrieving API metadata from objects
+// belonging to the Kubernetes API
+package meta // import "k8s.io/apimachinery/pkg/api/meta"
diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/errors.go b/vendor/k8s.io/apimachinery/pkg/api/meta/errors.go
new file mode 100644
index 000000000..1503bd6d8
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/api/meta/errors.go
@@ -0,0 +1,105 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package meta
+
+import (
+ "fmt"
+
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// AmbiguousResourceError is returned if the RESTMapper finds multiple matches for a resource
+type AmbiguousResourceError struct {
+ PartialResource schema.GroupVersionResource
+
+ MatchingResources []schema.GroupVersionResource
+ MatchingKinds []schema.GroupVersionKind
+}
+
+func (e *AmbiguousResourceError) Error() string {
+ switch {
+ case len(e.MatchingKinds) > 0 && len(e.MatchingResources) > 0:
+ return fmt.Sprintf("%v matches multiple resources %v and kinds %v", e.PartialResource, e.MatchingResources, e.MatchingKinds)
+ case len(e.MatchingKinds) > 0:
+ return fmt.Sprintf("%v matches multiple kinds %v", e.PartialResource, e.MatchingKinds)
+ case len(e.MatchingResources) > 0:
+ return fmt.Sprintf("%v matches multiple resources %v", e.PartialResource, e.MatchingResources)
+ }
+ return fmt.Sprintf("%v matches multiple resources or kinds", e.PartialResource)
+}
+
+// AmbiguousKindError is returned if the RESTMapper finds multiple matches for a kind
+type AmbiguousKindError struct {
+ PartialKind schema.GroupVersionKind
+
+ MatchingResources []schema.GroupVersionResource
+ MatchingKinds []schema.GroupVersionKind
+}
+
+func (e *AmbiguousKindError) Error() string {
+ switch {
+ case len(e.MatchingKinds) > 0 && len(e.MatchingResources) > 0:
+ return fmt.Sprintf("%v matches multiple resources %v and kinds %v", e.PartialKind, e.MatchingResources, e.MatchingKinds)
+ case len(e.MatchingKinds) > 0:
+ return fmt.Sprintf("%v matches multiple kinds %v", e.PartialKind, e.MatchingKinds)
+ case len(e.MatchingResources) > 0:
+ return fmt.Sprintf("%v matches multiple resources %v", e.PartialKind, e.MatchingResources)
+ }
+ return fmt.Sprintf("%v matches multiple resources or kinds", e.PartialKind)
+}
+
+func IsAmbiguousError(err error) bool {
+ if err == nil {
+ return false
+ }
+ switch err.(type) {
+ case *AmbiguousResourceError, *AmbiguousKindError:
+ return true
+ default:
+ return false
+ }
+}
+
+// NoResourceMatchError is returned if the RESTMapper can't find any match for a resource
+type NoResourceMatchError struct {
+ PartialResource schema.GroupVersionResource
+}
+
+func (e *NoResourceMatchError) Error() string {
+ return fmt.Sprintf("no matches for %v", e.PartialResource)
+}
+
+// NoKindMatchError is returned if the RESTMapper can't find any match for a kind
+type NoKindMatchError struct {
+ PartialKind schema.GroupVersionKind
+}
+
+func (e *NoKindMatchError) Error() string {
+ return fmt.Sprintf("no matches for %v", e.PartialKind)
+}
+
+func IsNoMatchError(err error) bool {
+ if err == nil {
+ return false
+ }
+ switch err.(type) {
+ case *NoResourceMatchError, *NoKindMatchError:
+ return true
+ default:
+ return false
+ }
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/firsthit_restmapper.go b/vendor/k8s.io/apimachinery/pkg/api/meta/firsthit_restmapper.go
new file mode 100644
index 000000000..fd2210022
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/api/meta/firsthit_restmapper.go
@@ -0,0 +1,97 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package meta
+
+import (
+ "fmt"
+
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ utilerrors "k8s.io/apimachinery/pkg/util/errors"
+)
+
+// FirstHitRESTMapper is a wrapper for multiple RESTMappers which returns the
+// first successful result for the singular requests
+type FirstHitRESTMapper struct {
+ MultiRESTMapper
+}
+
+func (m FirstHitRESTMapper) String() string {
+ return fmt.Sprintf("FirstHitRESTMapper{\n\t%v\n}", m.MultiRESTMapper)
+}
+
+func (m FirstHitRESTMapper) ResourceFor(resource schema.GroupVersionResource) (schema.GroupVersionResource, error) {
+ errors := []error{}
+ for _, t := range m.MultiRESTMapper {
+ ret, err := t.ResourceFor(resource)
+ if err == nil {
+ return ret, nil
+ }
+ errors = append(errors, err)
+ }
+
+ return schema.GroupVersionResource{}, collapseAggregateErrors(errors)
+}
+
+func (m FirstHitRESTMapper) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) {
+ errors := []error{}
+ for _, t := range m.MultiRESTMapper {
+ ret, err := t.KindFor(resource)
+ if err == nil {
+ return ret, nil
+ }
+ errors = append(errors, err)
+ }
+
+ return schema.GroupVersionKind{}, collapseAggregateErrors(errors)
+}
+
+// RESTMapping provides the REST mapping for the resource based on the
+// kind and version. This implementation supports multiple REST schemas and
+// return the first match.
+func (m FirstHitRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (*RESTMapping, error) {
+ errors := []error{}
+ for _, t := range m.MultiRESTMapper {
+ ret, err := t.RESTMapping(gk, versions...)
+ if err == nil {
+ return ret, nil
+ }
+ errors = append(errors, err)
+ }
+
+ return nil, collapseAggregateErrors(errors)
+}
+
+// collapseAggregateErrors returns the minimal errors. it handles empty as nil, handles one item in a list
+// by returning the item, and collapses all NoMatchErrors to a single one (since they should all be the same)
+func collapseAggregateErrors(errors []error) error {
+ if len(errors) == 0 {
+ return nil
+ }
+ if len(errors) == 1 {
+ return errors[0]
+ }
+
+ allNoMatchErrors := true
+ for _, err := range errors {
+ allNoMatchErrors = allNoMatchErrors && IsNoMatchError(err)
+ }
+ if allNoMatchErrors {
+ return errors[0]
+ }
+
+ return utilerrors.NewAggregate(errors)
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/help.go b/vendor/k8s.io/apimachinery/pkg/api/meta/help.go
new file mode 100644
index 000000000..9e0fb152a
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/api/meta/help.go
@@ -0,0 +1,202 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package meta
+
+import (
+ "fmt"
+ "reflect"
+
+ "k8s.io/apimachinery/pkg/conversion"
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+// IsListType returns true if the provided Object has a slice called Items
+func IsListType(obj runtime.Object) bool {
+ // if we're a runtime.Unstructured, check whether this is a list.
+ // TODO: refactor GetItemsPtr to use an interface that returns []runtime.Object
+ if unstructured, ok := obj.(runtime.Unstructured); ok {
+ return unstructured.IsList()
+ }
+
+ _, err := GetItemsPtr(obj)
+ return err == nil
+}
+
+// GetItemsPtr returns a pointer to the list object's Items member.
+// If 'list' doesn't have an Items member, it's not really a list type
+// and an error will be returned.
+// This function will either return a pointer to a slice, or an error, but not both.
+func GetItemsPtr(list runtime.Object) (interface{}, error) {
+ v, err := conversion.EnforcePtr(list)
+ if err != nil {
+ return nil, err
+ }
+
+ items := v.FieldByName("Items")
+ if !items.IsValid() {
+ return nil, fmt.Errorf("no Items field in %#v", list)
+ }
+ switch items.Kind() {
+ case reflect.Interface, reflect.Ptr:
+ target := reflect.TypeOf(items.Interface()).Elem()
+ if target.Kind() != reflect.Slice {
+ return nil, fmt.Errorf("items: Expected slice, got %s", target.Kind())
+ }
+ return items.Interface(), nil
+ case reflect.Slice:
+ return items.Addr().Interface(), nil
+ default:
+ return nil, fmt.Errorf("items: Expected slice, got %s", items.Kind())
+ }
+}
+
+// EachListItem invokes fn on each runtime.Object in the list. Any error immediately terminates
+// the loop.
+func EachListItem(obj runtime.Object, fn func(runtime.Object) error) error {
+ // TODO: Change to an interface call?
+ itemsPtr, err := GetItemsPtr(obj)
+ if err != nil {
+ return err
+ }
+ items, err := conversion.EnforcePtr(itemsPtr)
+ if err != nil {
+ return err
+ }
+ len := items.Len()
+ if len == 0 {
+ return nil
+ }
+ takeAddr := false
+ if elemType := items.Type().Elem(); elemType.Kind() != reflect.Ptr && elemType.Kind() != reflect.Interface {
+ if !items.Index(0).CanAddr() {
+ return fmt.Errorf("unable to take address of items in %T for EachListItem", obj)
+ }
+ takeAddr = true
+ }
+
+ for i := 0; i < len; i++ {
+ raw := items.Index(i)
+ if takeAddr {
+ raw = raw.Addr()
+ }
+ switch item := raw.Interface().(type) {
+ case *runtime.RawExtension:
+ if err := fn(item.Object); err != nil {
+ return err
+ }
+ case runtime.Object:
+ if err := fn(item); err != nil {
+ return err
+ }
+ default:
+ obj, ok := item.(runtime.Object)
+ if !ok {
+ return fmt.Errorf("%v: item[%v]: Expected object, got %#v(%s)", obj, i, raw.Interface(), raw.Kind())
+ }
+ if err := fn(obj); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
+// ExtractList returns obj's Items element as an array of runtime.Objects.
+// Returns an error if obj is not a List type (does not have an Items member).
+func ExtractList(obj runtime.Object) ([]runtime.Object, error) {
+ itemsPtr, err := GetItemsPtr(obj)
+ if err != nil {
+ return nil, err
+ }
+ items, err := conversion.EnforcePtr(itemsPtr)
+ if err != nil {
+ return nil, err
+ }
+ list := make([]runtime.Object, items.Len())
+ for i := range list {
+ raw := items.Index(i)
+ switch item := raw.Interface().(type) {
+ case runtime.RawExtension:
+ switch {
+ case item.Object != nil:
+ list[i] = item.Object
+ case item.Raw != nil:
+ // TODO: Set ContentEncoding and ContentType correctly.
+ list[i] = &runtime.Unknown{Raw: item.Raw}
+ default:
+ list[i] = nil
+ }
+ case runtime.Object:
+ list[i] = item
+ default:
+ var found bool
+ if list[i], found = raw.Addr().Interface().(runtime.Object); !found {
+ return nil, fmt.Errorf("%v: item[%v]: Expected object, got %#v(%s)", obj, i, raw.Interface(), raw.Kind())
+ }
+ }
+ }
+ return list, nil
+}
+
+// objectSliceType is the type of a slice of Objects
+var objectSliceType = reflect.TypeOf([]runtime.Object{})
+
+// SetList sets the given list object's Items member have the elements given in
+// objects.
+// Returns an error if list is not a List type (does not have an Items member),
+// or if any of the objects are not of the right type.
+func SetList(list runtime.Object, objects []runtime.Object) error {
+ itemsPtr, err := GetItemsPtr(list)
+ if err != nil {
+ return err
+ }
+ items, err := conversion.EnforcePtr(itemsPtr)
+ if err != nil {
+ return err
+ }
+ if items.Type() == objectSliceType {
+ items.Set(reflect.ValueOf(objects))
+ return nil
+ }
+ slice := reflect.MakeSlice(items.Type(), len(objects), len(objects))
+ for i := range objects {
+ dest := slice.Index(i)
+ if dest.Type() == reflect.TypeOf(runtime.RawExtension{}) {
+ dest = dest.FieldByName("Object")
+ }
+
+ // check to see if you're directly assignable
+ if reflect.TypeOf(objects[i]).AssignableTo(dest.Type()) {
+ dest.Set(reflect.ValueOf(objects[i]))
+ continue
+ }
+
+ src, err := conversion.EnforcePtr(objects[i])
+ if err != nil {
+ return err
+ }
+ if src.Type().AssignableTo(dest.Type()) {
+ dest.Set(src)
+ } else if src.Type().ConvertibleTo(dest.Type()) {
+ dest.Set(src.Convert(dest.Type()))
+ } else {
+ return fmt.Errorf("item[%d]: can't assign or convert %v into %v", i, src.Type(), dest.Type())
+ }
+ }
+ items.Set(slice)
+ return nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/interfaces.go b/vendor/k8s.io/apimachinery/pkg/api/meta/interfaces.go
new file mode 100644
index 000000000..b2c8c97b1
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/api/meta/interfaces.go
@@ -0,0 +1,146 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package meta
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/types"
+)
+
+// VersionInterfaces contains the interfaces one should use for dealing with types of a particular version.
+type VersionInterfaces struct {
+ runtime.ObjectConvertor
+ MetadataAccessor
+}
+
+type ListMetaAccessor interface {
+ GetListMeta() List
+}
+
+// List lets you work with list metadata from any of the versioned or
+// internal API objects. Attempting to set or retrieve a field on an object that does
+// not support that field will be a no-op and return a default value.
+type List metav1.List
+
+// Type exposes the type and APIVersion of versioned or internal API objects.
+type Type metav1.Type
+
+// MetadataAccessor lets you work with object and list metadata from any of the versioned or
+// internal API objects. Attempting to set or retrieve a field on an object that does
+// not support that field (Name, UID, Namespace on lists) will be a no-op and return
+// a default value.
+//
+// MetadataAccessor exposes Interface in a way that can be used with multiple objects.
+type MetadataAccessor interface {
+ APIVersion(obj runtime.Object) (string, error)
+ SetAPIVersion(obj runtime.Object, version string) error
+
+ Kind(obj runtime.Object) (string, error)
+ SetKind(obj runtime.Object, kind string) error
+
+ Namespace(obj runtime.Object) (string, error)
+ SetNamespace(obj runtime.Object, namespace string) error
+
+ Name(obj runtime.Object) (string, error)
+ SetName(obj runtime.Object, name string) error
+
+ GenerateName(obj runtime.Object) (string, error)
+ SetGenerateName(obj runtime.Object, name string) error
+
+ UID(obj runtime.Object) (types.UID, error)
+ SetUID(obj runtime.Object, uid types.UID) error
+
+ SelfLink(obj runtime.Object) (string, error)
+ SetSelfLink(obj runtime.Object, selfLink string) error
+
+ Labels(obj runtime.Object) (map[string]string, error)
+ SetLabels(obj runtime.Object, labels map[string]string) error
+
+ Annotations(obj runtime.Object) (map[string]string, error)
+ SetAnnotations(obj runtime.Object, annotations map[string]string) error
+
+ runtime.ResourceVersioner
+}
+
+type RESTScopeName string
+
+const (
+ RESTScopeNameNamespace RESTScopeName = "namespace"
+ RESTScopeNameRoot RESTScopeName = "root"
+)
+
+// RESTScope contains the information needed to deal with REST resources that are in a resource hierarchy
+type RESTScope interface {
+ // Name of the scope
+ Name() RESTScopeName
+ // ParamName is the optional name of the parameter that should be inserted in the resource url
+ // If empty, no param will be inserted
+ ParamName() string
+ // ArgumentName is the optional name that should be used for the variable holding the value.
+ ArgumentName() string
+ // ParamDescription is the optional description to use to document the parameter in api documentation
+ ParamDescription() string
+}
+
+// RESTMapping contains the information needed to deal with objects of a specific
+// resource and kind in a RESTful manner.
+type RESTMapping struct {
+ // Resource is a string representing the name of this resource as a REST client would see it
+ Resource string
+
+ GroupVersionKind schema.GroupVersionKind
+
+ // Scope contains the information needed to deal with REST Resources that are in a resource hierarchy
+ Scope RESTScope
+
+ runtime.ObjectConvertor
+ MetadataAccessor
+}
+
+// RESTMapper allows clients to map resources to kind, and map kind and version
+// to interfaces for manipulating those objects. It is primarily intended for
+// consumers of Kubernetes compatible REST APIs as defined in docs/devel/api-conventions.md.
+//
+// The Kubernetes API provides versioned resources and object kinds which are scoped
+// to API groups. In other words, kinds and resources should not be assumed to be
+// unique across groups.
+//
+// TODO: split into sub-interfaces
+type RESTMapper interface {
+ // KindFor takes a partial resource and returns the single match. Returns an error if there are multiple matches
+ KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error)
+
+ // KindsFor takes a partial resource and returns the list of potential kinds in priority order
+ KindsFor(resource schema.GroupVersionResource) ([]schema.GroupVersionKind, error)
+
+ // ResourceFor takes a partial resource and returns the single match. Returns an error if there are multiple matches
+ ResourceFor(input schema.GroupVersionResource) (schema.GroupVersionResource, error)
+
+ // ResourcesFor takes a partial resource and returns the list of potential resource in priority order
+ ResourcesFor(input schema.GroupVersionResource) ([]schema.GroupVersionResource, error)
+
+ // RESTMapping identifies a preferred resource mapping for the provided group kind.
+ RESTMapping(gk schema.GroupKind, versions ...string) (*RESTMapping, error)
+ // RESTMappings returns all resource mappings for the provided group kind if no
+ // version search is provided. Otherwise identifies a preferred resource mapping for
+ // the provided version(s).
+ RESTMappings(gk schema.GroupKind, versions ...string) ([]*RESTMapping, error)
+
+ ResourceSingularizer(resource string) (singular string, err error)
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/meta.go b/vendor/k8s.io/apimachinery/pkg/api/meta/meta.go
new file mode 100644
index 000000000..45d850ea8
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/api/meta/meta.go
@@ -0,0 +1,610 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package meta
+
+import (
+ "fmt"
+ "reflect"
+
+ "github.com/golang/glog"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ metav1alpha1 "k8s.io/apimachinery/pkg/apis/meta/v1alpha1"
+ "k8s.io/apimachinery/pkg/conversion"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/types"
+)
+
+// errNotList is returned when an object implements the Object style interfaces but not the List style
+// interfaces.
+var errNotList = fmt.Errorf("object does not implement the List interfaces")
+
+// ListAccessor returns a List interface for the provided object or an error if the object does
+// not provide List.
+// IMPORTANT: Objects are a superset of lists, so all Objects return List metadata. Do not use this
+// check to determine whether an object *is* a List.
+// TODO: return bool instead of error
+func ListAccessor(obj interface{}) (List, error) {
+ switch t := obj.(type) {
+ case List:
+ return t, nil
+ case metav1.List:
+ return t, nil
+ case ListMetaAccessor:
+ if m := t.GetListMeta(); m != nil {
+ return m, nil
+ }
+ return nil, errNotList
+ case metav1.ListMetaAccessor:
+ if m := t.GetListMeta(); m != nil {
+ return m, nil
+ }
+ return nil, errNotList
+ case metav1.Object:
+ return t, nil
+ case metav1.ObjectMetaAccessor:
+ if m := t.GetObjectMeta(); m != nil {
+ return m, nil
+ }
+ return nil, errNotList
+ default:
+ return nil, errNotList
+ }
+}
+
+// errNotObject is returned when an object implements the List style interfaces but not the Object style
+// interfaces.
+var errNotObject = fmt.Errorf("object does not implement the Object interfaces")
+
+// Accessor takes an arbitrary object pointer and returns meta.Interface.
+// obj must be a pointer to an API type. An error is returned if the minimum
+// required fields are missing. Fields that are not required return the default
+// value and are a no-op if set.
+// TODO: return bool instead of error
+func Accessor(obj interface{}) (metav1.Object, error) {
+ switch t := obj.(type) {
+ case metav1.Object:
+ return t, nil
+ case metav1.ObjectMetaAccessor:
+ if m := t.GetObjectMeta(); m != nil {
+ return m, nil
+ }
+ return nil, errNotObject
+ default:
+ return nil, errNotObject
+ }
+}
+
+// AsPartialObjectMetadata takes the metav1 interface and returns a partial object.
+// TODO: consider making this solely a conversion action.
+func AsPartialObjectMetadata(m metav1.Object) *metav1alpha1.PartialObjectMetadata {
+ switch t := m.(type) {
+ case *metav1.ObjectMeta:
+ return &metav1alpha1.PartialObjectMetadata{ObjectMeta: *t}
+ default:
+ return &metav1alpha1.PartialObjectMetadata{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: m.GetName(),
+ GenerateName: m.GetGenerateName(),
+ Namespace: m.GetNamespace(),
+ SelfLink: m.GetSelfLink(),
+ UID: m.GetUID(),
+ ResourceVersion: m.GetResourceVersion(),
+ Generation: m.GetGeneration(),
+ CreationTimestamp: m.GetCreationTimestamp(),
+ DeletionTimestamp: m.GetDeletionTimestamp(),
+ DeletionGracePeriodSeconds: m.GetDeletionGracePeriodSeconds(),
+ Labels: m.GetLabels(),
+ Annotations: m.GetAnnotations(),
+ OwnerReferences: m.GetOwnerReferences(),
+ Finalizers: m.GetFinalizers(),
+ ClusterName: m.GetClusterName(),
+ Initializers: m.GetInitializers(),
+ },
+ }
+ }
+}
+
+// TypeAccessor returns an interface that allows retrieving and modifying the APIVersion
+// and Kind of an in-memory internal object.
+// TODO: this interface is used to test code that does not have ObjectMeta or ListMeta
+// in round tripping (objects which can use apiVersion/kind, but do not fit the Kube
+// api conventions).
+func TypeAccessor(obj interface{}) (Type, error) {
+ if typed, ok := obj.(runtime.Object); ok {
+ return objectAccessor{typed}, nil
+ }
+ v, err := conversion.EnforcePtr(obj)
+ if err != nil {
+ return nil, err
+ }
+ t := v.Type()
+ if v.Kind() != reflect.Struct {
+ return nil, fmt.Errorf("expected struct, but got %v: %v (%#v)", v.Kind(), t, v.Interface())
+ }
+
+ typeMeta := v.FieldByName("TypeMeta")
+ if !typeMeta.IsValid() {
+ return nil, fmt.Errorf("struct %v lacks embedded TypeMeta type", t)
+ }
+ a := &genericAccessor{}
+ if err := extractFromTypeMeta(typeMeta, a); err != nil {
+ return nil, fmt.Errorf("unable to find type fields on %#v: %v", typeMeta, err)
+ }
+ return a, nil
+}
+
+type objectAccessor struct {
+ runtime.Object
+}
+
+func (obj objectAccessor) GetKind() string {
+ return obj.GetObjectKind().GroupVersionKind().Kind
+}
+
+func (obj objectAccessor) SetKind(kind string) {
+ gvk := obj.GetObjectKind().GroupVersionKind()
+ gvk.Kind = kind
+ obj.GetObjectKind().SetGroupVersionKind(gvk)
+}
+
+func (obj objectAccessor) GetAPIVersion() string {
+ return obj.GetObjectKind().GroupVersionKind().GroupVersion().String()
+}
+
+func (obj objectAccessor) SetAPIVersion(version string) {
+ gvk := obj.GetObjectKind().GroupVersionKind()
+ gv, err := schema.ParseGroupVersion(version)
+ if err != nil {
+ gv = schema.GroupVersion{Version: version}
+ }
+ gvk.Group, gvk.Version = gv.Group, gv.Version
+ obj.GetObjectKind().SetGroupVersionKind(gvk)
+}
+
+// NewAccessor returns a MetadataAccessor that can retrieve
+// or manipulate resource version on objects derived from core API
+// metadata concepts.
+func NewAccessor() MetadataAccessor {
+ return resourceAccessor{}
+}
+
+// resourceAccessor implements ResourceVersioner and SelfLinker.
+type resourceAccessor struct{}
+
+func (resourceAccessor) Kind(obj runtime.Object) (string, error) {
+ return objectAccessor{obj}.GetKind(), nil
+}
+
+func (resourceAccessor) SetKind(obj runtime.Object, kind string) error {
+ objectAccessor{obj}.SetKind(kind)
+ return nil
+}
+
+func (resourceAccessor) APIVersion(obj runtime.Object) (string, error) {
+ return objectAccessor{obj}.GetAPIVersion(), nil
+}
+
+func (resourceAccessor) SetAPIVersion(obj runtime.Object, version string) error {
+ objectAccessor{obj}.SetAPIVersion(version)
+ return nil
+}
+
+func (resourceAccessor) Namespace(obj runtime.Object) (string, error) {
+ accessor, err := Accessor(obj)
+ if err != nil {
+ return "", err
+ }
+ return accessor.GetNamespace(), nil
+}
+
+func (resourceAccessor) SetNamespace(obj runtime.Object, namespace string) error {
+ accessor, err := Accessor(obj)
+ if err != nil {
+ return err
+ }
+ accessor.SetNamespace(namespace)
+ return nil
+}
+
+func (resourceAccessor) Name(obj runtime.Object) (string, error) {
+ accessor, err := Accessor(obj)
+ if err != nil {
+ return "", err
+ }
+ return accessor.GetName(), nil
+}
+
+func (resourceAccessor) SetName(obj runtime.Object, name string) error {
+ accessor, err := Accessor(obj)
+ if err != nil {
+ return err
+ }
+ accessor.SetName(name)
+ return nil
+}
+
+func (resourceAccessor) GenerateName(obj runtime.Object) (string, error) {
+ accessor, err := Accessor(obj)
+ if err != nil {
+ return "", err
+ }
+ return accessor.GetGenerateName(), nil
+}
+
+func (resourceAccessor) SetGenerateName(obj runtime.Object, name string) error {
+ accessor, err := Accessor(obj)
+ if err != nil {
+ return err
+ }
+ accessor.SetGenerateName(name)
+ return nil
+}
+
+func (resourceAccessor) UID(obj runtime.Object) (types.UID, error) {
+ accessor, err := Accessor(obj)
+ if err != nil {
+ return "", err
+ }
+ return accessor.GetUID(), nil
+}
+
+func (resourceAccessor) SetUID(obj runtime.Object, uid types.UID) error {
+ accessor, err := Accessor(obj)
+ if err != nil {
+ return err
+ }
+ accessor.SetUID(uid)
+ return nil
+}
+
+func (resourceAccessor) SelfLink(obj runtime.Object) (string, error) {
+ accessor, err := ListAccessor(obj)
+ if err != nil {
+ return "", err
+ }
+ return accessor.GetSelfLink(), nil
+}
+
+func (resourceAccessor) SetSelfLink(obj runtime.Object, selfLink string) error {
+ accessor, err := ListAccessor(obj)
+ if err != nil {
+ return err
+ }
+ accessor.SetSelfLink(selfLink)
+ return nil
+}
+
+func (resourceAccessor) Labels(obj runtime.Object) (map[string]string, error) {
+ accessor, err := Accessor(obj)
+ if err != nil {
+ return nil, err
+ }
+ return accessor.GetLabels(), nil
+}
+
+func (resourceAccessor) SetLabels(obj runtime.Object, labels map[string]string) error {
+ accessor, err := Accessor(obj)
+ if err != nil {
+ return err
+ }
+ accessor.SetLabels(labels)
+ return nil
+}
+
+func (resourceAccessor) Annotations(obj runtime.Object) (map[string]string, error) {
+ accessor, err := Accessor(obj)
+ if err != nil {
+ return nil, err
+ }
+ return accessor.GetAnnotations(), nil
+}
+
+func (resourceAccessor) SetAnnotations(obj runtime.Object, annotations map[string]string) error {
+ accessor, err := Accessor(obj)
+ if err != nil {
+ return err
+ }
+ accessor.SetAnnotations(annotations)
+ return nil
+}
+
+func (resourceAccessor) ResourceVersion(obj runtime.Object) (string, error) {
+ accessor, err := ListAccessor(obj)
+ if err != nil {
+ return "", err
+ }
+ return accessor.GetResourceVersion(), nil
+}
+
+func (resourceAccessor) SetResourceVersion(obj runtime.Object, version string) error {
+ accessor, err := ListAccessor(obj)
+ if err != nil {
+ return err
+ }
+ accessor.SetResourceVersion(version)
+ return nil
+}
+
+// extractFromOwnerReference extracts v to o. v is the OwnerReferences field of an object.
+func extractFromOwnerReference(v reflect.Value, o *metav1.OwnerReference) error {
+ if err := runtime.Field(v, "APIVersion", &o.APIVersion); err != nil {
+ return err
+ }
+ if err := runtime.Field(v, "Kind", &o.Kind); err != nil {
+ return err
+ }
+ if err := runtime.Field(v, "Name", &o.Name); err != nil {
+ return err
+ }
+ if err := runtime.Field(v, "UID", &o.UID); err != nil {
+ return err
+ }
+ var controllerPtr *bool
+ if err := runtime.Field(v, "Controller", &controllerPtr); err != nil {
+ return err
+ }
+ if controllerPtr != nil {
+ controller := *controllerPtr
+ o.Controller = &controller
+ }
+ var blockOwnerDeletionPtr *bool
+ if err := runtime.Field(v, "BlockOwnerDeletion", &blockOwnerDeletionPtr); err != nil {
+ return err
+ }
+ if blockOwnerDeletionPtr != nil {
+ block := *blockOwnerDeletionPtr
+ o.BlockOwnerDeletion = &block
+ }
+ return nil
+}
+
+// setOwnerReference sets v to o. v is the OwnerReferences field of an object.
+func setOwnerReference(v reflect.Value, o *metav1.OwnerReference) error {
+ if err := runtime.SetField(o.APIVersion, v, "APIVersion"); err != nil {
+ return err
+ }
+ if err := runtime.SetField(o.Kind, v, "Kind"); err != nil {
+ return err
+ }
+ if err := runtime.SetField(o.Name, v, "Name"); err != nil {
+ return err
+ }
+ if err := runtime.SetField(o.UID, v, "UID"); err != nil {
+ return err
+ }
+ if o.Controller != nil {
+ controller := *(o.Controller)
+ if err := runtime.SetField(&controller, v, "Controller"); err != nil {
+ return err
+ }
+ }
+ if o.BlockOwnerDeletion != nil {
+ block := *(o.BlockOwnerDeletion)
+ if err := runtime.SetField(&block, v, "BlockOwnerDeletion"); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// genericAccessor contains pointers to strings that can modify an arbitrary
+// struct and implements the Accessor interface.
+type genericAccessor struct {
+ namespace *string
+ name *string
+ generateName *string
+ uid *types.UID
+ apiVersion *string
+ kind *string
+ resourceVersion *string
+ selfLink *string
+ creationTimestamp *metav1.Time
+ deletionTimestamp **metav1.Time
+ labels *map[string]string
+ annotations *map[string]string
+ ownerReferences reflect.Value
+ finalizers *[]string
+}
+
+func (a genericAccessor) GetNamespace() string {
+ if a.namespace == nil {
+ return ""
+ }
+ return *a.namespace
+}
+
+func (a genericAccessor) SetNamespace(namespace string) {
+ if a.namespace == nil {
+ return
+ }
+ *a.namespace = namespace
+}
+
+func (a genericAccessor) GetName() string {
+ if a.name == nil {
+ return ""
+ }
+ return *a.name
+}
+
+func (a genericAccessor) SetName(name string) {
+ if a.name == nil {
+ return
+ }
+ *a.name = name
+}
+
+func (a genericAccessor) GetGenerateName() string {
+ if a.generateName == nil {
+ return ""
+ }
+ return *a.generateName
+}
+
+func (a genericAccessor) SetGenerateName(generateName string) {
+ if a.generateName == nil {
+ return
+ }
+ *a.generateName = generateName
+}
+
+func (a genericAccessor) GetUID() types.UID {
+ if a.uid == nil {
+ return ""
+ }
+ return *a.uid
+}
+
+func (a genericAccessor) SetUID(uid types.UID) {
+ if a.uid == nil {
+ return
+ }
+ *a.uid = uid
+}
+
+func (a genericAccessor) GetAPIVersion() string {
+ return *a.apiVersion
+}
+
+func (a genericAccessor) SetAPIVersion(version string) {
+ *a.apiVersion = version
+}
+
+func (a genericAccessor) GetKind() string {
+ return *a.kind
+}
+
+func (a genericAccessor) SetKind(kind string) {
+ *a.kind = kind
+}
+
+func (a genericAccessor) GetResourceVersion() string {
+ return *a.resourceVersion
+}
+
+func (a genericAccessor) SetResourceVersion(version string) {
+ *a.resourceVersion = version
+}
+
+func (a genericAccessor) GetSelfLink() string {
+ return *a.selfLink
+}
+
+func (a genericAccessor) SetSelfLink(selfLink string) {
+ *a.selfLink = selfLink
+}
+
+func (a genericAccessor) GetCreationTimestamp() metav1.Time {
+ return *a.creationTimestamp
+}
+
+func (a genericAccessor) SetCreationTimestamp(timestamp metav1.Time) {
+ *a.creationTimestamp = timestamp
+}
+
+func (a genericAccessor) GetDeletionTimestamp() *metav1.Time {
+ return *a.deletionTimestamp
+}
+
+func (a genericAccessor) SetDeletionTimestamp(timestamp *metav1.Time) {
+ *a.deletionTimestamp = timestamp
+}
+
+func (a genericAccessor) GetLabels() map[string]string {
+ if a.labels == nil {
+ return nil
+ }
+ return *a.labels
+}
+
+func (a genericAccessor) SetLabels(labels map[string]string) {
+ *a.labels = labels
+}
+
+func (a genericAccessor) GetAnnotations() map[string]string {
+ if a.annotations == nil {
+ return nil
+ }
+ return *a.annotations
+}
+
+func (a genericAccessor) SetAnnotations(annotations map[string]string) {
+ if a.annotations == nil {
+ emptyAnnotations := make(map[string]string)
+ a.annotations = &emptyAnnotations
+ }
+ *a.annotations = annotations
+}
+
+func (a genericAccessor) GetFinalizers() []string {
+ if a.finalizers == nil {
+ return nil
+ }
+ return *a.finalizers
+}
+
+func (a genericAccessor) SetFinalizers(finalizers []string) {
+ *a.finalizers = finalizers
+}
+
+func (a genericAccessor) GetOwnerReferences() []metav1.OwnerReference {
+ var ret []metav1.OwnerReference
+ s := a.ownerReferences
+ if s.Kind() != reflect.Ptr || s.Elem().Kind() != reflect.Slice {
+ glog.Errorf("expect %v to be a pointer to slice", s)
+ return ret
+ }
+ s = s.Elem()
+ // Set the capacity to one element greater to avoid copy if the caller later append an element.
+ ret = make([]metav1.OwnerReference, s.Len(), s.Len()+1)
+ for i := 0; i < s.Len(); i++ {
+ if err := extractFromOwnerReference(s.Index(i), &ret[i]); err != nil {
+ glog.Errorf("extractFromOwnerReference failed: %v", err)
+ return ret
+ }
+ }
+ return ret
+}
+
+func (a genericAccessor) SetOwnerReferences(references []metav1.OwnerReference) {
+ s := a.ownerReferences
+ if s.Kind() != reflect.Ptr || s.Elem().Kind() != reflect.Slice {
+ glog.Errorf("expect %v to be a pointer to slice", s)
+ }
+ s = s.Elem()
+ newReferences := reflect.MakeSlice(s.Type(), len(references), len(references))
+ for i := 0; i < len(references); i++ {
+ if err := setOwnerReference(newReferences.Index(i), &references[i]); err != nil {
+ glog.Errorf("setOwnerReference failed: %v", err)
+ return
+ }
+ }
+ s.Set(newReferences)
+}
+
+// extractFromTypeMeta extracts pointers to version and kind fields from an object
+func extractFromTypeMeta(v reflect.Value, a *genericAccessor) error {
+ if err := runtime.FieldPtr(v, "APIVersion", &a.apiVersion); err != nil {
+ return err
+ }
+ if err := runtime.FieldPtr(v, "Kind", &a.kind); err != nil {
+ return err
+ }
+ return nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/multirestmapper.go b/vendor/k8s.io/apimachinery/pkg/api/meta/multirestmapper.go
new file mode 100644
index 000000000..679098fe5
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/api/meta/multirestmapper.go
@@ -0,0 +1,210 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package meta
+
+import (
+ "fmt"
+ "strings"
+
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ utilerrors "k8s.io/apimachinery/pkg/util/errors"
+)
+
+// MultiRESTMapper is a wrapper for multiple RESTMappers.
+type MultiRESTMapper []RESTMapper
+
+func (m MultiRESTMapper) String() string {
+ nested := []string{}
+ for _, t := range m {
+ currString := fmt.Sprintf("%v", t)
+ splitStrings := strings.Split(currString, "\n")
+ nested = append(nested, strings.Join(splitStrings, "\n\t"))
+ }
+
+ return fmt.Sprintf("MultiRESTMapper{\n\t%s\n}", strings.Join(nested, "\n\t"))
+}
+
+// ResourceSingularizer converts a REST resource name from plural to singular (e.g., from pods to pod)
+// This implementation supports multiple REST schemas and return the first match.
+func (m MultiRESTMapper) ResourceSingularizer(resource string) (singular string, err error) {
+ for _, t := range m {
+ singular, err = t.ResourceSingularizer(resource)
+ if err == nil {
+ return
+ }
+ }
+ return
+}
+
+func (m MultiRESTMapper) ResourcesFor(resource schema.GroupVersionResource) ([]schema.GroupVersionResource, error) {
+ allGVRs := []schema.GroupVersionResource{}
+ for _, t := range m {
+ gvrs, err := t.ResourcesFor(resource)
+ // ignore "no match" errors, but any other error percolates back up
+ if IsNoMatchError(err) {
+ continue
+ }
+ if err != nil {
+ return nil, err
+ }
+
+ // walk the existing values to de-dup
+ for _, curr := range gvrs {
+ found := false
+ for _, existing := range allGVRs {
+ if curr == existing {
+ found = true
+ break
+ }
+ }
+
+ if !found {
+ allGVRs = append(allGVRs, curr)
+ }
+ }
+ }
+
+ if len(allGVRs) == 0 {
+ return nil, &NoResourceMatchError{PartialResource: resource}
+ }
+
+ return allGVRs, nil
+}
+
+func (m MultiRESTMapper) KindsFor(resource schema.GroupVersionResource) (gvk []schema.GroupVersionKind, err error) {
+ allGVKs := []schema.GroupVersionKind{}
+ for _, t := range m {
+ gvks, err := t.KindsFor(resource)
+ // ignore "no match" errors, but any other error percolates back up
+ if IsNoMatchError(err) {
+ continue
+ }
+ if err != nil {
+ return nil, err
+ }
+
+ // walk the existing values to de-dup
+ for _, curr := range gvks {
+ found := false
+ for _, existing := range allGVKs {
+ if curr == existing {
+ found = true
+ break
+ }
+ }
+
+ if !found {
+ allGVKs = append(allGVKs, curr)
+ }
+ }
+ }
+
+ if len(allGVKs) == 0 {
+ return nil, &NoResourceMatchError{PartialResource: resource}
+ }
+
+ return allGVKs, nil
+}
+
+func (m MultiRESTMapper) ResourceFor(resource schema.GroupVersionResource) (schema.GroupVersionResource, error) {
+ resources, err := m.ResourcesFor(resource)
+ if err != nil {
+ return schema.GroupVersionResource{}, err
+ }
+ if len(resources) == 1 {
+ return resources[0], nil
+ }
+
+ return schema.GroupVersionResource{}, &AmbiguousResourceError{PartialResource: resource, MatchingResources: resources}
+}
+
+func (m MultiRESTMapper) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) {
+ kinds, err := m.KindsFor(resource)
+ if err != nil {
+ return schema.GroupVersionKind{}, err
+ }
+ if len(kinds) == 1 {
+ return kinds[0], nil
+ }
+
+ return schema.GroupVersionKind{}, &AmbiguousResourceError{PartialResource: resource, MatchingKinds: kinds}
+}
+
+// RESTMapping provides the REST mapping for the resource based on the
+// kind and version. This implementation supports multiple REST schemas and
+// return the first match.
+func (m MultiRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (*RESTMapping, error) {
+ allMappings := []*RESTMapping{}
+ errors := []error{}
+
+ for _, t := range m {
+ currMapping, err := t.RESTMapping(gk, versions...)
+ // ignore "no match" errors, but any other error percolates back up
+ if IsNoMatchError(err) {
+ continue
+ }
+ if err != nil {
+ errors = append(errors, err)
+ continue
+ }
+
+ allMappings = append(allMappings, currMapping)
+ }
+
+ // if we got exactly one mapping, then use it even if other requested failed
+ if len(allMappings) == 1 {
+ return allMappings[0], nil
+ }
+ if len(allMappings) > 1 {
+ var kinds []schema.GroupVersionKind
+ for _, m := range allMappings {
+ kinds = append(kinds, m.GroupVersionKind)
+ }
+ return nil, &AmbiguousKindError{PartialKind: gk.WithVersion(""), MatchingKinds: kinds}
+ }
+ if len(errors) > 0 {
+ return nil, utilerrors.NewAggregate(errors)
+ }
+ return nil, &NoKindMatchError{PartialKind: gk.WithVersion("")}
+}
+
+// RESTMappings returns all possible RESTMappings for the provided group kind, or an error
+// if the type is not recognized.
+func (m MultiRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) ([]*RESTMapping, error) {
+ var allMappings []*RESTMapping
+ var errors []error
+
+ for _, t := range m {
+ currMappings, err := t.RESTMappings(gk, versions...)
+ // ignore "no match" errors, but any other error percolates back up
+ if IsNoMatchError(err) {
+ continue
+ }
+ if err != nil {
+ errors = append(errors, err)
+ continue
+ }
+ allMappings = append(allMappings, currMappings...)
+ }
+ if len(errors) > 0 {
+ return nil, utilerrors.NewAggregate(errors)
+ }
+ if len(allMappings) == 0 {
+ return nil, &NoKindMatchError{PartialKind: gk.WithVersion("")}
+ }
+ return allMappings, nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/priority.go b/vendor/k8s.io/apimachinery/pkg/api/meta/priority.go
new file mode 100644
index 000000000..2a14aa7ab
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/api/meta/priority.go
@@ -0,0 +1,222 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package meta
+
+import (
+ "fmt"
+
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+const (
+ AnyGroup = "*"
+ AnyVersion = "*"
+ AnyResource = "*"
+ AnyKind = "*"
+)
+
+// PriorityRESTMapper is a wrapper for automatically choosing a particular Resource or Kind
+// when multiple matches are possible
+type PriorityRESTMapper struct {
+ // Delegate is the RESTMapper to use to locate all the Kind and Resource matches
+ Delegate RESTMapper
+
+ // ResourcePriority is a list of priority patterns to apply to matching resources.
+ // The list of all matching resources is narrowed based on the patterns until only one remains.
+ // A pattern with no matches is skipped. A pattern with more than one match uses its
+ // matches as the list to continue matching against.
+ ResourcePriority []schema.GroupVersionResource
+
+ // KindPriority is a list of priority patterns to apply to matching kinds.
+ // The list of all matching kinds is narrowed based on the patterns until only one remains.
+ // A pattern with no matches is skipped. A pattern with more than one match uses its
+ // matches as the list to continue matching against.
+ KindPriority []schema.GroupVersionKind
+}
+
+func (m PriorityRESTMapper) String() string {
+ return fmt.Sprintf("PriorityRESTMapper{\n\t%v\n\t%v\n\t%v\n}", m.ResourcePriority, m.KindPriority, m.Delegate)
+}
+
+// ResourceFor finds all resources, then passes them through the ResourcePriority patterns to find a single matching hit.
+func (m PriorityRESTMapper) ResourceFor(partiallySpecifiedResource schema.GroupVersionResource) (schema.GroupVersionResource, error) {
+ originalGVRs, err := m.Delegate.ResourcesFor(partiallySpecifiedResource)
+ if err != nil {
+ return schema.GroupVersionResource{}, err
+ }
+ if len(originalGVRs) == 1 {
+ return originalGVRs[0], nil
+ }
+
+ remainingGVRs := append([]schema.GroupVersionResource{}, originalGVRs...)
+ for _, pattern := range m.ResourcePriority {
+ matchedGVRs := []schema.GroupVersionResource{}
+ for _, gvr := range remainingGVRs {
+ if resourceMatches(pattern, gvr) {
+ matchedGVRs = append(matchedGVRs, gvr)
+ }
+ }
+
+ switch len(matchedGVRs) {
+ case 0:
+ // if you have no matches, then nothing matched this pattern just move to the next
+ continue
+ case 1:
+ // one match, return
+ return matchedGVRs[0], nil
+ default:
+ // more than one match, use the matched hits as the list moving to the next pattern.
+ // this way you can have a series of selection criteria
+ remainingGVRs = matchedGVRs
+ }
+ }
+
+ return schema.GroupVersionResource{}, &AmbiguousResourceError{PartialResource: partiallySpecifiedResource, MatchingResources: originalGVRs}
+}
+
+// KindFor finds all kinds, then passes them through the KindPriority patterns to find a single matching hit.
+func (m PriorityRESTMapper) KindFor(partiallySpecifiedResource schema.GroupVersionResource) (schema.GroupVersionKind, error) {
+ originalGVKs, err := m.Delegate.KindsFor(partiallySpecifiedResource)
+ if err != nil {
+ return schema.GroupVersionKind{}, err
+ }
+ if len(originalGVKs) == 1 {
+ return originalGVKs[0], nil
+ }
+
+ remainingGVKs := append([]schema.GroupVersionKind{}, originalGVKs...)
+ for _, pattern := range m.KindPriority {
+ matchedGVKs := []schema.GroupVersionKind{}
+ for _, gvr := range remainingGVKs {
+ if kindMatches(pattern, gvr) {
+ matchedGVKs = append(matchedGVKs, gvr)
+ }
+ }
+
+ switch len(matchedGVKs) {
+ case 0:
+ // if you have no matches, then nothing matched this pattern just move to the next
+ continue
+ case 1:
+ // one match, return
+ return matchedGVKs[0], nil
+ default:
+ // more than one match, use the matched hits as the list moving to the next pattern.
+ // this way you can have a series of selection criteria
+ remainingGVKs = matchedGVKs
+ }
+ }
+
+ return schema.GroupVersionKind{}, &AmbiguousResourceError{PartialResource: partiallySpecifiedResource, MatchingKinds: originalGVKs}
+}
+
+func resourceMatches(pattern schema.GroupVersionResource, resource schema.GroupVersionResource) bool {
+ if pattern.Group != AnyGroup && pattern.Group != resource.Group {
+ return false
+ }
+ if pattern.Version != AnyVersion && pattern.Version != resource.Version {
+ return false
+ }
+ if pattern.Resource != AnyResource && pattern.Resource != resource.Resource {
+ return false
+ }
+
+ return true
+}
+
+func kindMatches(pattern schema.GroupVersionKind, kind schema.GroupVersionKind) bool {
+ if pattern.Group != AnyGroup && pattern.Group != kind.Group {
+ return false
+ }
+ if pattern.Version != AnyVersion && pattern.Version != kind.Version {
+ return false
+ }
+ if pattern.Kind != AnyKind && pattern.Kind != kind.Kind {
+ return false
+ }
+
+ return true
+}
+
+func (m PriorityRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (mapping *RESTMapping, err error) {
+ mappings, err := m.Delegate.RESTMappings(gk)
+ if err != nil {
+ return nil, err
+ }
+
+ // any versions the user provides take priority
+ priorities := m.KindPriority
+ if len(versions) > 0 {
+ priorities = make([]schema.GroupVersionKind, 0, len(m.KindPriority)+len(versions))
+ for _, version := range versions {
+ gv := schema.GroupVersion{
+ Version: version,
+ Group: gk.Group,
+ }
+ priorities = append(priorities, gv.WithKind(AnyKind))
+ }
+ priorities = append(priorities, m.KindPriority...)
+ }
+
+ remaining := append([]*RESTMapping{}, mappings...)
+ for _, pattern := range priorities {
+ var matching []*RESTMapping
+ for _, m := range remaining {
+ if kindMatches(pattern, m.GroupVersionKind) {
+ matching = append(matching, m)
+ }
+ }
+
+ switch len(matching) {
+ case 0:
+ // if you have no matches, then nothing matched this pattern just move to the next
+ continue
+ case 1:
+ // one match, return
+ return matching[0], nil
+ default:
+ // more than one match, use the matched hits as the list moving to the next pattern.
+ // this way you can have a series of selection criteria
+ remaining = matching
+ }
+ }
+ if len(remaining) == 1 {
+ return remaining[0], nil
+ }
+
+ var kinds []schema.GroupVersionKind
+ for _, m := range mappings {
+ kinds = append(kinds, m.GroupVersionKind)
+ }
+ return nil, &AmbiguousKindError{PartialKind: gk.WithVersion(""), MatchingKinds: kinds}
+}
+
+func (m PriorityRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) ([]*RESTMapping, error) {
+ return m.Delegate.RESTMappings(gk, versions...)
+}
+
+func (m PriorityRESTMapper) ResourceSingularizer(resource string) (singular string, err error) {
+ return m.Delegate.ResourceSingularizer(resource)
+}
+
+func (m PriorityRESTMapper) ResourcesFor(partiallySpecifiedResource schema.GroupVersionResource) ([]schema.GroupVersionResource, error) {
+ return m.Delegate.ResourcesFor(partiallySpecifiedResource)
+}
+
+func (m PriorityRESTMapper) KindsFor(partiallySpecifiedResource schema.GroupVersionResource) (gvk []schema.GroupVersionKind, err error) {
+ return m.Delegate.KindsFor(partiallySpecifiedResource)
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/restmapper.go b/vendor/k8s.io/apimachinery/pkg/api/meta/restmapper.go
new file mode 100644
index 000000000..c6b2597dd
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/api/meta/restmapper.go
@@ -0,0 +1,545 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// TODO: move everything in this file to pkg/api/rest
+package meta
+
+import (
+ "fmt"
+ "sort"
+ "strings"
+
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// Implements RESTScope interface
+type restScope struct {
+ name RESTScopeName
+ paramName string
+ argumentName string
+ paramDescription string
+}
+
+func (r *restScope) Name() RESTScopeName {
+ return r.name
+}
+func (r *restScope) ParamName() string {
+ return r.paramName
+}
+func (r *restScope) ArgumentName() string {
+ return r.argumentName
+}
+func (r *restScope) ParamDescription() string {
+ return r.paramDescription
+}
+
+var RESTScopeNamespace = &restScope{
+ name: RESTScopeNameNamespace,
+ paramName: "namespaces",
+ argumentName: "namespace",
+ paramDescription: "object name and auth scope, such as for teams and projects",
+}
+
+var RESTScopeRoot = &restScope{
+ name: RESTScopeNameRoot,
+}
+
+// DefaultRESTMapper exposes mappings between the types defined in a
+// runtime.Scheme. It assumes that all types defined the provided scheme
+// can be mapped with the provided MetadataAccessor and Codec interfaces.
+//
+// The resource name of a Kind is defined as the lowercase,
+// English-plural version of the Kind string.
+// When converting from resource to Kind, the singular version of the
+// resource name is also accepted for convenience.
+//
+// TODO: Only accept plural for some operations for increased control?
+// (`get pod bar` vs `get pods bar`)
+type DefaultRESTMapper struct {
+ defaultGroupVersions []schema.GroupVersion
+
+ resourceToKind map[schema.GroupVersionResource]schema.GroupVersionKind
+ kindToPluralResource map[schema.GroupVersionKind]schema.GroupVersionResource
+ kindToScope map[schema.GroupVersionKind]RESTScope
+ singularToPlural map[schema.GroupVersionResource]schema.GroupVersionResource
+ pluralToSingular map[schema.GroupVersionResource]schema.GroupVersionResource
+
+ interfacesFunc VersionInterfacesFunc
+}
+
+func (m *DefaultRESTMapper) String() string {
+ return fmt.Sprintf("DefaultRESTMapper{kindToPluralResource=%v}", m.kindToPluralResource)
+}
+
+var _ RESTMapper = &DefaultRESTMapper{}
+
+// VersionInterfacesFunc returns the appropriate typer, and metadata accessor for a
+// given api version, or an error if no such api version exists.
+type VersionInterfacesFunc func(version schema.GroupVersion) (*VersionInterfaces, error)
+
+// NewDefaultRESTMapper initializes a mapping between Kind and APIVersion
+// to a resource name and back based on the objects in a runtime.Scheme
+// and the Kubernetes API conventions. Takes a group name, a priority list of the versions
+// to search when an object has no default version (set empty to return an error),
+// and a function that retrieves the correct metadata for a given version.
+func NewDefaultRESTMapper(defaultGroupVersions []schema.GroupVersion, f VersionInterfacesFunc) *DefaultRESTMapper {
+ resourceToKind := make(map[schema.GroupVersionResource]schema.GroupVersionKind)
+ kindToPluralResource := make(map[schema.GroupVersionKind]schema.GroupVersionResource)
+ kindToScope := make(map[schema.GroupVersionKind]RESTScope)
+ singularToPlural := make(map[schema.GroupVersionResource]schema.GroupVersionResource)
+ pluralToSingular := make(map[schema.GroupVersionResource]schema.GroupVersionResource)
+ // TODO: verify name mappings work correctly when versions differ
+
+ return &DefaultRESTMapper{
+ resourceToKind: resourceToKind,
+ kindToPluralResource: kindToPluralResource,
+ kindToScope: kindToScope,
+ defaultGroupVersions: defaultGroupVersions,
+ singularToPlural: singularToPlural,
+ pluralToSingular: pluralToSingular,
+ interfacesFunc: f,
+ }
+}
+
+func (m *DefaultRESTMapper) Add(kind schema.GroupVersionKind, scope RESTScope) {
+ plural, singular := UnsafeGuessKindToResource(kind)
+
+ m.singularToPlural[singular] = plural
+ m.pluralToSingular[plural] = singular
+
+ m.resourceToKind[singular] = kind
+ m.resourceToKind[plural] = kind
+
+ m.kindToPluralResource[kind] = plural
+ m.kindToScope[kind] = scope
+}
+
+// unpluralizedSuffixes is a list of resource suffixes that are the same plural and singular
+// This is only is only necessary because some bits of code are lazy and don't actually use the RESTMapper like they should.
+// TODO eliminate this so that different callers can correctly map to resources. This probably means updating all
+// callers to use the RESTMapper they mean.
+var unpluralizedSuffixes = []string{
+ "endpoints",
+}
+
+// UnsafeGuessKindToResource converts Kind to a resource name.
+// Broken. This method only "sort of" works when used outside of this package. It assumes that Kinds and Resources match
+// and they aren't guaranteed to do so.
+func UnsafeGuessKindToResource(kind schema.GroupVersionKind) ( /*plural*/ schema.GroupVersionResource /*singular*/, schema.GroupVersionResource) {
+ kindName := kind.Kind
+ if len(kindName) == 0 {
+ return schema.GroupVersionResource{}, schema.GroupVersionResource{}
+ }
+ singularName := strings.ToLower(kindName)
+ singular := kind.GroupVersion().WithResource(singularName)
+
+ for _, skip := range unpluralizedSuffixes {
+ if strings.HasSuffix(singularName, skip) {
+ return singular, singular
+ }
+ }
+
+ switch string(singularName[len(singularName)-1]) {
+ case "s":
+ return kind.GroupVersion().WithResource(singularName + "es"), singular
+ case "y":
+ return kind.GroupVersion().WithResource(strings.TrimSuffix(singularName, "y") + "ies"), singular
+ }
+
+ return kind.GroupVersion().WithResource(singularName + "s"), singular
+}
+
+// ResourceSingularizer implements RESTMapper
+// It converts a resource name from plural to singular (e.g., from pods to pod)
+func (m *DefaultRESTMapper) ResourceSingularizer(resourceType string) (string, error) {
+ partialResource := schema.GroupVersionResource{Resource: resourceType}
+ resources, err := m.ResourcesFor(partialResource)
+ if err != nil {
+ return resourceType, err
+ }
+
+ singular := schema.GroupVersionResource{}
+ for _, curr := range resources {
+ currSingular, ok := m.pluralToSingular[curr]
+ if !ok {
+ continue
+ }
+ if singular.Empty() {
+ singular = currSingular
+ continue
+ }
+
+ if currSingular.Resource != singular.Resource {
+ return resourceType, fmt.Errorf("multiple possible singular resources (%v) found for %v", resources, resourceType)
+ }
+ }
+
+ if singular.Empty() {
+ return resourceType, fmt.Errorf("no singular of resource %v has been defined", resourceType)
+ }
+
+ return singular.Resource, nil
+}
+
+// coerceResourceForMatching makes the resource lower case and converts internal versions to unspecified (legacy behavior)
+func coerceResourceForMatching(resource schema.GroupVersionResource) schema.GroupVersionResource {
+ resource.Resource = strings.ToLower(resource.Resource)
+ if resource.Version == runtime.APIVersionInternal {
+ resource.Version = ""
+ }
+
+ return resource
+}
+
+func (m *DefaultRESTMapper) ResourcesFor(input schema.GroupVersionResource) ([]schema.GroupVersionResource, error) {
+ resource := coerceResourceForMatching(input)
+
+ hasResource := len(resource.Resource) > 0
+ hasGroup := len(resource.Group) > 0
+ hasVersion := len(resource.Version) > 0
+
+ if !hasResource {
+ return nil, fmt.Errorf("a resource must be present, got: %v", resource)
+ }
+
+ ret := []schema.GroupVersionResource{}
+ switch {
+ case hasGroup && hasVersion:
+ // fully qualified. Find the exact match
+ for plural, singular := range m.pluralToSingular {
+ if singular == resource {
+ ret = append(ret, plural)
+ break
+ }
+ if plural == resource {
+ ret = append(ret, plural)
+ break
+ }
+ }
+
+ case hasGroup:
+ // given a group, prefer an exact match. If you don't find one, resort to a prefix match on group
+ foundExactMatch := false
+ requestedGroupResource := resource.GroupResource()
+ for plural, singular := range m.pluralToSingular {
+ if singular.GroupResource() == requestedGroupResource {
+ foundExactMatch = true
+ ret = append(ret, plural)
+ }
+ if plural.GroupResource() == requestedGroupResource {
+ foundExactMatch = true
+ ret = append(ret, plural)
+ }
+ }
+
+ // if you didn't find an exact match, match on group prefixing. This allows storageclass.storage to match
+ // storageclass.storage.k8s.io
+ if !foundExactMatch {
+ for plural, singular := range m.pluralToSingular {
+ if !strings.HasPrefix(plural.Group, requestedGroupResource.Group) {
+ continue
+ }
+ if singular.Resource == requestedGroupResource.Resource {
+ ret = append(ret, plural)
+ }
+ if plural.Resource == requestedGroupResource.Resource {
+ ret = append(ret, plural)
+ }
+ }
+
+ }
+
+ case hasVersion:
+ for plural, singular := range m.pluralToSingular {
+ if singular.Version == resource.Version && singular.Resource == resource.Resource {
+ ret = append(ret, plural)
+ }
+ if plural.Version == resource.Version && plural.Resource == resource.Resource {
+ ret = append(ret, plural)
+ }
+ }
+
+ default:
+ for plural, singular := range m.pluralToSingular {
+ if singular.Resource == resource.Resource {
+ ret = append(ret, plural)
+ }
+ if plural.Resource == resource.Resource {
+ ret = append(ret, plural)
+ }
+ }
+ }
+
+ if len(ret) == 0 {
+ return nil, &NoResourceMatchError{PartialResource: resource}
+ }
+
+ sort.Sort(resourceByPreferredGroupVersion{ret, m.defaultGroupVersions})
+ return ret, nil
+}
+
+func (m *DefaultRESTMapper) ResourceFor(resource schema.GroupVersionResource) (schema.GroupVersionResource, error) {
+ resources, err := m.ResourcesFor(resource)
+ if err != nil {
+ return schema.GroupVersionResource{}, err
+ }
+ if len(resources) == 1 {
+ return resources[0], nil
+ }
+
+ return schema.GroupVersionResource{}, &AmbiguousResourceError{PartialResource: resource, MatchingResources: resources}
+}
+
+func (m *DefaultRESTMapper) KindsFor(input schema.GroupVersionResource) ([]schema.GroupVersionKind, error) {
+ resource := coerceResourceForMatching(input)
+
+ hasResource := len(resource.Resource) > 0
+ hasGroup := len(resource.Group) > 0
+ hasVersion := len(resource.Version) > 0
+
+ if !hasResource {
+ return nil, fmt.Errorf("a resource must be present, got: %v", resource)
+ }
+
+ ret := []schema.GroupVersionKind{}
+ switch {
+ // fully qualified. Find the exact match
+ case hasGroup && hasVersion:
+ kind, exists := m.resourceToKind[resource]
+ if exists {
+ ret = append(ret, kind)
+ }
+
+ case hasGroup:
+ foundExactMatch := false
+ requestedGroupResource := resource.GroupResource()
+ for currResource, currKind := range m.resourceToKind {
+ if currResource.GroupResource() == requestedGroupResource {
+ foundExactMatch = true
+ ret = append(ret, currKind)
+ }
+ }
+
+ // if you didn't find an exact match, match on group prefixing. This allows storageclass.storage to match
+ // storageclass.storage.k8s.io
+ if !foundExactMatch {
+ for currResource, currKind := range m.resourceToKind {
+ if !strings.HasPrefix(currResource.Group, requestedGroupResource.Group) {
+ continue
+ }
+ if currResource.Resource == requestedGroupResource.Resource {
+ ret = append(ret, currKind)
+ }
+ }
+
+ }
+
+ case hasVersion:
+ for currResource, currKind := range m.resourceToKind {
+ if currResource.Version == resource.Version && currResource.Resource == resource.Resource {
+ ret = append(ret, currKind)
+ }
+ }
+
+ default:
+ for currResource, currKind := range m.resourceToKind {
+ if currResource.Resource == resource.Resource {
+ ret = append(ret, currKind)
+ }
+ }
+ }
+
+ if len(ret) == 0 {
+ return nil, &NoResourceMatchError{PartialResource: input}
+ }
+
+ sort.Sort(kindByPreferredGroupVersion{ret, m.defaultGroupVersions})
+ return ret, nil
+}
+
+func (m *DefaultRESTMapper) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) {
+ kinds, err := m.KindsFor(resource)
+ if err != nil {
+ return schema.GroupVersionKind{}, err
+ }
+ if len(kinds) == 1 {
+ return kinds[0], nil
+ }
+
+ return schema.GroupVersionKind{}, &AmbiguousResourceError{PartialResource: resource, MatchingKinds: kinds}
+}
+
+type kindByPreferredGroupVersion struct {
+ list []schema.GroupVersionKind
+ sortOrder []schema.GroupVersion
+}
+
+func (o kindByPreferredGroupVersion) Len() int { return len(o.list) }
+func (o kindByPreferredGroupVersion) Swap(i, j int) { o.list[i], o.list[j] = o.list[j], o.list[i] }
+func (o kindByPreferredGroupVersion) Less(i, j int) bool {
+ lhs := o.list[i]
+ rhs := o.list[j]
+ if lhs == rhs {
+ return false
+ }
+
+ if lhs.GroupVersion() == rhs.GroupVersion() {
+ return lhs.Kind < rhs.Kind
+ }
+
+ // otherwise, the difference is in the GroupVersion, so we need to sort with respect to the preferred order
+ lhsIndex := -1
+ rhsIndex := -1
+
+ for i := range o.sortOrder {
+ if o.sortOrder[i] == lhs.GroupVersion() {
+ lhsIndex = i
+ }
+ if o.sortOrder[i] == rhs.GroupVersion() {
+ rhsIndex = i
+ }
+ }
+
+ if rhsIndex == -1 {
+ return true
+ }
+
+ return lhsIndex < rhsIndex
+}
+
+type resourceByPreferredGroupVersion struct {
+ list []schema.GroupVersionResource
+ sortOrder []schema.GroupVersion
+}
+
+func (o resourceByPreferredGroupVersion) Len() int { return len(o.list) }
+func (o resourceByPreferredGroupVersion) Swap(i, j int) { o.list[i], o.list[j] = o.list[j], o.list[i] }
+func (o resourceByPreferredGroupVersion) Less(i, j int) bool {
+ lhs := o.list[i]
+ rhs := o.list[j]
+ if lhs == rhs {
+ return false
+ }
+
+ if lhs.GroupVersion() == rhs.GroupVersion() {
+ return lhs.Resource < rhs.Resource
+ }
+
+ // otherwise, the difference is in the GroupVersion, so we need to sort with respect to the preferred order
+ lhsIndex := -1
+ rhsIndex := -1
+
+ for i := range o.sortOrder {
+ if o.sortOrder[i] == lhs.GroupVersion() {
+ lhsIndex = i
+ }
+ if o.sortOrder[i] == rhs.GroupVersion() {
+ rhsIndex = i
+ }
+ }
+
+ if rhsIndex == -1 {
+ return true
+ }
+
+ return lhsIndex < rhsIndex
+}
+
+// RESTMapping returns a struct representing the resource path and conversion interfaces a
+// RESTClient should use to operate on the provided group/kind in order of versions. If a version search
+// order is not provided, the search order provided to DefaultRESTMapper will be used to resolve which
+// version should be used to access the named group/kind.
+func (m *DefaultRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (*RESTMapping, error) {
+ mappings, err := m.RESTMappings(gk, versions...)
+ if err != nil {
+ return nil, err
+ }
+ if len(mappings) == 0 {
+ return nil, &NoKindMatchError{PartialKind: gk.WithVersion("")}
+ }
+ // since we rely on RESTMappings method
+ // take the first match and return to the caller
+ // as this was the existing behavior.
+ return mappings[0], nil
+}
+
+// RESTMappings returns the RESTMappings for the provided group kind. If a version search order
+// is not provided, the search order provided to DefaultRESTMapper will be used.
+func (m *DefaultRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) ([]*RESTMapping, error) {
+ mappings := make([]*RESTMapping, 0)
+ potentialGVK := make([]schema.GroupVersionKind, 0)
+ hadVersion := false
+
+ // Pick an appropriate version
+ for _, version := range versions {
+ if len(version) == 0 || version == runtime.APIVersionInternal {
+ continue
+ }
+ currGVK := gk.WithVersion(version)
+ hadVersion = true
+ if _, ok := m.kindToPluralResource[currGVK]; ok {
+ potentialGVK = append(potentialGVK, currGVK)
+ break
+ }
+ }
+ // Use the default preferred versions
+ if !hadVersion && len(potentialGVK) == 0 {
+ for _, gv := range m.defaultGroupVersions {
+ if gv.Group != gk.Group {
+ continue
+ }
+ potentialGVK = append(potentialGVK, gk.WithVersion(gv.Version))
+ }
+ }
+
+ if len(potentialGVK) == 0 {
+ return nil, &NoKindMatchError{PartialKind: gk.WithVersion("")}
+ }
+
+ for _, gvk := range potentialGVK {
+ //Ensure we have a REST mapping
+ res, ok := m.kindToPluralResource[gvk]
+ if !ok {
+ continue
+ }
+
+ // Ensure we have a REST scope
+ scope, ok := m.kindToScope[gvk]
+ if !ok {
+ return nil, fmt.Errorf("the provided version %q and kind %q cannot be mapped to a supported scope", gvk.GroupVersion(), gvk.Kind)
+ }
+
+ interfaces, err := m.interfacesFunc(gvk.GroupVersion())
+ if err != nil {
+ return nil, fmt.Errorf("the provided version %q has no relevant versions: %v", gvk.GroupVersion().String(), err)
+ }
+
+ mappings = append(mappings, &RESTMapping{
+ Resource: res.Resource,
+ GroupVersionKind: gvk,
+ Scope: scope,
+
+ ObjectConvertor: interfaces.ObjectConvertor,
+ MetadataAccessor: interfaces.MetadataAccessor,
+ })
+ }
+
+ if len(mappings) == 0 {
+ return nil, &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Group: gk.Group, Resource: gk.Kind}}
+ }
+ return mappings, nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/unstructured.go b/vendor/k8s.io/apimachinery/pkg/api/meta/unstructured.go
new file mode 100644
index 000000000..3ebf24815
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/api/meta/unstructured.go
@@ -0,0 +1,31 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package meta
+
+import (
+ "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// InterfacesForUnstructured returns VersionInterfaces suitable for
+// dealing with unstructured.Unstructured objects.
+func InterfacesForUnstructured(schema.GroupVersion) (*VersionInterfaces, error) {
+ return &VersionInterfaces{
+ ObjectConvertor: &unstructured.UnstructuredObjectConverter{},
+ MetadataAccessor: NewAccessor(),
+ }, nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/amount.go b/vendor/k8s.io/apimachinery/pkg/api/resource/amount.go
new file mode 100644
index 000000000..a8866a43e
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/api/resource/amount.go
@@ -0,0 +1,299 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package resource
+
+import (
+ "math/big"
+ "strconv"
+
+ inf "gopkg.in/inf.v0"
+)
+
+// Scale is used for getting and setting the base-10 scaled value.
+// Base-2 scales are omitted for mathematical simplicity.
+// See Quantity.ScaledValue for more details.
+type Scale int32
+
+// infScale adapts a Scale value to an inf.Scale value.
+func (s Scale) infScale() inf.Scale {
+ return inf.Scale(-s) // inf.Scale is upside-down
+}
+
+const (
+ Nano Scale = -9
+ Micro Scale = -6
+ Milli Scale = -3
+ Kilo Scale = 3
+ Mega Scale = 6
+ Giga Scale = 9
+ Tera Scale = 12
+ Peta Scale = 15
+ Exa Scale = 18
+)
+
+var (
+ Zero = int64Amount{}
+
+ // Used by quantity strings - treat as read only
+ zeroBytes = []byte("0")
+)
+
+// int64Amount represents a fixed precision numerator and arbitrary scale exponent. It is faster
+// than operations on inf.Dec for values that can be represented as int64.
+// +k8s:openapi-gen=true
+type int64Amount struct {
+ value int64
+ scale Scale
+}
+
+// Sign returns 0 if the value is zero, -1 if it is less than 0, or 1 if it is greater than 0.
+func (a int64Amount) Sign() int {
+ switch {
+ case a.value == 0:
+ return 0
+ case a.value > 0:
+ return 1
+ default:
+ return -1
+ }
+}
+
+// AsInt64 returns the current amount as an int64 at scale 0, or false if the value cannot be
+// represented in an int64 OR would result in a loss of precision. This method is intended as
+// an optimization to avoid calling AsDec.
+func (a int64Amount) AsInt64() (int64, bool) {
+ if a.scale == 0 {
+ return a.value, true
+ }
+ if a.scale < 0 {
+ // TODO: attempt to reduce factors, although it is assumed that factors are reduced prior
+ // to the int64Amount being created.
+ return 0, false
+ }
+ return positiveScaleInt64(a.value, a.scale)
+}
+
+// AsScaledInt64 returns an int64 representing the value of this amount at the specified scale,
+// rounding up, or false if that would result in overflow. (1e20).AsScaledInt64(1) would result
+// in overflow because 1e19 is not representable as an int64. Note that setting a scale larger
+// than the current value may result in loss of precision - i.e. (1e-6).AsScaledInt64(0) would
+// return 1, because 0.000001 is rounded up to 1.
+func (a int64Amount) AsScaledInt64(scale Scale) (result int64, ok bool) {
+ if a.scale < scale {
+ result, _ = negativeScaleInt64(a.value, scale-a.scale)
+ return result, true
+ }
+ return positiveScaleInt64(a.value, a.scale-scale)
+}
+
+// AsDec returns an inf.Dec representation of this value.
+func (a int64Amount) AsDec() *inf.Dec {
+ var base inf.Dec
+ base.SetUnscaled(a.value)
+ base.SetScale(inf.Scale(-a.scale))
+ return &base
+}
+
+// Cmp returns 0 if a and b are equal, 1 if a is greater than b, or -1 if a is less than b.
+func (a int64Amount) Cmp(b int64Amount) int {
+ switch {
+ case a.scale == b.scale:
+ // compare only the unscaled portion
+ case a.scale > b.scale:
+ result, remainder, exact := divideByScaleInt64(b.value, a.scale-b.scale)
+ if !exact {
+ return a.AsDec().Cmp(b.AsDec())
+ }
+ if result == a.value {
+ switch {
+ case remainder == 0:
+ return 0
+ case remainder > 0:
+ return -1
+ default:
+ return 1
+ }
+ }
+ b.value = result
+ default:
+ result, remainder, exact := divideByScaleInt64(a.value, b.scale-a.scale)
+ if !exact {
+ return a.AsDec().Cmp(b.AsDec())
+ }
+ if result == b.value {
+ switch {
+ case remainder == 0:
+ return 0
+ case remainder > 0:
+ return 1
+ default:
+ return -1
+ }
+ }
+ a.value = result
+ }
+
+ switch {
+ case a.value == b.value:
+ return 0
+ case a.value < b.value:
+ return -1
+ default:
+ return 1
+ }
+}
+
+// Add adds two int64Amounts together, matching scales. It will return false and not mutate
+// a if overflow or underflow would result.
+func (a *int64Amount) Add(b int64Amount) bool {
+ switch {
+ case b.value == 0:
+ return true
+ case a.value == 0:
+ a.value = b.value
+ a.scale = b.scale
+ return true
+ case a.scale == b.scale:
+ c, ok := int64Add(a.value, b.value)
+ if !ok {
+ return false
+ }
+ a.value = c
+ case a.scale > b.scale:
+ c, ok := positiveScaleInt64(a.value, a.scale-b.scale)
+ if !ok {
+ return false
+ }
+ c, ok = int64Add(c, b.value)
+ if !ok {
+ return false
+ }
+ a.scale = b.scale
+ a.value = c
+ default:
+ c, ok := positiveScaleInt64(b.value, b.scale-a.scale)
+ if !ok {
+ return false
+ }
+ c, ok = int64Add(a.value, c)
+ if !ok {
+ return false
+ }
+ a.value = c
+ }
+ return true
+}
+
+// Sub removes the value of b from the current amount, or returns false if underflow would result.
+func (a *int64Amount) Sub(b int64Amount) bool {
+ return a.Add(int64Amount{value: -b.value, scale: b.scale})
+}
+
+// AsScale adjusts this amount to set a minimum scale, rounding up, and returns true iff no precision
+// was lost. (1.1e5).AsScale(5) would return 1.1e5, but (1.1e5).AsScale(6) would return 1e6.
+func (a int64Amount) AsScale(scale Scale) (int64Amount, bool) {
+ if a.scale >= scale {
+ return a, true
+ }
+ result, exact := negativeScaleInt64(a.value, scale-a.scale)
+ return int64Amount{value: result, scale: scale}, exact
+}
+
+// AsCanonicalBytes accepts a buffer to write the base-10 string value of this field to, and returns
+// either that buffer or a larger buffer and the current exponent of the value. The value is adjusted
+// until the exponent is a multiple of 3 - i.e. 1.1e5 would return "110", 3.
+func (a int64Amount) AsCanonicalBytes(out []byte) (result []byte, exponent int32) {
+ mantissa := a.value
+ exponent = int32(a.scale)
+
+ amount, times := removeInt64Factors(mantissa, 10)
+ exponent += int32(times)
+
+ // make sure exponent is a multiple of 3
+ var ok bool
+ switch exponent % 3 {
+ case 1, -2:
+ amount, ok = int64MultiplyScale10(amount)
+ if !ok {
+ return infDecAmount{a.AsDec()}.AsCanonicalBytes(out)
+ }
+ exponent = exponent - 1
+ case 2, -1:
+ amount, ok = int64MultiplyScale100(amount)
+ if !ok {
+ return infDecAmount{a.AsDec()}.AsCanonicalBytes(out)
+ }
+ exponent = exponent - 2
+ }
+ return strconv.AppendInt(out, amount, 10), exponent
+}
+
+// AsCanonicalBase1024Bytes accepts a buffer to write the base-1024 string value of this field to, and returns
+// either that buffer or a larger buffer and the current exponent of the value. 2048 is 2 * 1024 ^ 1 and would
+// return []byte("2048"), 1.
+func (a int64Amount) AsCanonicalBase1024Bytes(out []byte) (result []byte, exponent int32) {
+ value, ok := a.AsScaledInt64(0)
+ if !ok {
+ return infDecAmount{a.AsDec()}.AsCanonicalBase1024Bytes(out)
+ }
+ amount, exponent := removeInt64Factors(value, 1024)
+ return strconv.AppendInt(out, amount, 10), exponent
+}
+
+// infDecAmount implements common operations over an inf.Dec that are specific to the quantity
+// representation.
+type infDecAmount struct {
+ *inf.Dec
+}
+
+// AsScale adjusts this amount to set a minimum scale, rounding up, and returns true iff no precision
+// was lost. (1.1e5).AsScale(5) would return 1.1e5, but (1.1e5).AsScale(6) would return 1e6.
+func (a infDecAmount) AsScale(scale Scale) (infDecAmount, bool) {
+ tmp := &inf.Dec{}
+ tmp.Round(a.Dec, scale.infScale(), inf.RoundUp)
+ return infDecAmount{tmp}, tmp.Cmp(a.Dec) == 0
+}
+
+// AsCanonicalBytes accepts a buffer to write the base-10 string value of this field to, and returns
+// either that buffer or a larger buffer and the current exponent of the value. The value is adjusted
+// until the exponent is a multiple of 3 - i.e. 1.1e5 would return "110", 3.
+func (a infDecAmount) AsCanonicalBytes(out []byte) (result []byte, exponent int32) {
+ mantissa := a.Dec.UnscaledBig()
+ exponent = int32(-a.Dec.Scale())
+ amount := big.NewInt(0).Set(mantissa)
+ // move all factors of 10 into the exponent for easy reasoning
+ amount, times := removeBigIntFactors(amount, bigTen)
+ exponent += times
+
+ // make sure exponent is a multiple of 3
+ for exponent%3 != 0 {
+ amount.Mul(amount, bigTen)
+ exponent--
+ }
+
+ return append(out, amount.String()...), exponent
+}
+
+// AsCanonicalBase1024Bytes accepts a buffer to write the base-1024 string value of this field to, and returns
+// either that buffer or a larger buffer and the current exponent of the value. 2048 is 2 * 1024 ^ 1 and would
+// return []byte("2048"), 1.
+func (a infDecAmount) AsCanonicalBase1024Bytes(out []byte) (result []byte, exponent int32) {
+ tmp := &inf.Dec{}
+ tmp.Round(a.Dec, 0, inf.RoundUp)
+ amount, exponent := removeBigIntFactors(tmp.UnscaledBig(), big1024)
+ return append(out, amount.String()...), exponent
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go
new file mode 100644
index 000000000..8b2e338a7
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go
@@ -0,0 +1,77 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package resource is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto
+
+ It has these top-level messages:
+ Quantity
+*/
+package resource
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *Quantity) Reset() { *m = Quantity{} }
+func (*Quantity) ProtoMessage() {}
+func (*Quantity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func init() {
+ proto.RegisterType((*Quantity)(nil), "k8s.io.apimachinery.pkg.api.resource.Quantity")
+}
+
+func init() {
+ proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 255 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x8f, 0xa1, 0x4e, 0x03, 0x41,
+ 0x10, 0x86, 0x77, 0x0d, 0x29, 0x95, 0x0d, 0x21, 0xa4, 0x62, 0xaf, 0x21, 0x08, 0x0c, 0x3b, 0x02,
+ 0xd3, 0x20, 0xf1, 0x08, 0x90, 0xb8, 0xbb, 0xeb, 0xb0, 0xdd, 0x1c, 0xdd, 0xbd, 0xcc, 0xce, 0x92,
+ 0xd4, 0x55, 0x22, 0x2b, 0x91, 0xbd, 0xb7, 0xa9, 0xac, 0xac, 0x40, 0x70, 0xcb, 0x8b, 0x90, 0x5e,
+ 0xdb, 0x84, 0x90, 0xe0, 0xe6, 0xfb, 0x27, 0xdf, 0xe4, 0x9f, 0xfe, 0x43, 0x35, 0x0e, 0xda, 0x7a,
+ 0xa8, 0x62, 0x81, 0xe4, 0x90, 0x31, 0xc0, 0x1b, 0xba, 0x89, 0x27, 0x38, 0x2c, 0xf2, 0xda, 0xce,
+ 0xf2, 0x72, 0x6a, 0x1d, 0xd2, 0x1c, 0xea, 0xca, 0xec, 0x02, 0x20, 0x0c, 0x3e, 0x52, 0x89, 0x60,
+ 0xd0, 0x21, 0xe5, 0x8c, 0x13, 0x5d, 0x93, 0x67, 0x3f, 0xb8, 0xda, 0x5b, 0xfa, 0xb7, 0xa5, 0xeb,
+ 0xca, 0xec, 0x02, 0x7d, 0xb4, 0x86, 0x37, 0xc6, 0xf2, 0x34, 0x16, 0xba, 0xf4, 0x33, 0x30, 0xde,
+ 0x78, 0xe8, 0xe4, 0x22, 0xbe, 0x74, 0xd4, 0x41, 0x37, 0xed, 0x8f, 0x0e, 0x6f, 0xff, 0xab, 0x12,
+ 0xd9, 0xbe, 0x82, 0x75, 0x1c, 0x98, 0xfe, 0x36, 0xb9, 0x1c, 0xf7, 0x7b, 0x8f, 0x31, 0x77, 0x6c,
+ 0x79, 0x3e, 0x38, 0xef, 0x9f, 0x04, 0x26, 0xeb, 0xcc, 0x85, 0x1c, 0xc9, 0xeb, 0xd3, 0xa7, 0x03,
+ 0xdd, 0x9d, 0x7d, 0xac, 0x32, 0xf1, 0xde, 0x64, 0x62, 0xd9, 0x64, 0x62, 0xd5, 0x64, 0x62, 0xf1,
+ 0x39, 0x12, 0xf7, 0x7a, 0xdd, 0x2a, 0xb1, 0x69, 0x95, 0xd8, 0xb6, 0x4a, 0x2c, 0x92, 0x92, 0xeb,
+ 0xa4, 0xe4, 0x26, 0x29, 0xb9, 0x4d, 0x4a, 0x7e, 0x25, 0x25, 0x97, 0xdf, 0x4a, 0x3c, 0xf7, 0x8e,
+ 0xdf, 0xfc, 0x04, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x5e, 0xda, 0xf9, 0x43, 0x01, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto b/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto
new file mode 100644
index 000000000..608299da4
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto
@@ -0,0 +1,94 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.apimachinery.pkg.api.resource;
+
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "resource";
+
+// Quantity is a fixed-point representation of a number.
+// It provides convenient marshaling/unmarshaling in JSON and YAML,
+// in addition to String() and Int64() accessors.
+//
+// The serialization format is:
+//
+// <quantity> ::= <signedNumber><suffix>
+// (Note that <suffix> may be empty, from the "" case in <decimalSI>.)
+// <digit> ::= 0 | 1 | ... | 9
+// <digits> ::= <digit> | <digit><digits>
+// <number> ::= <digits> | <digits>.<digits> | <digits>. | .<digits>
+// <sign> ::= "+" | "-"
+// <signedNumber> ::= <number> | <sign><number>
+// <suffix> ::= <binarySI> | <decimalExponent> | <decimalSI>
+// <binarySI> ::= Ki | Mi | Gi | Ti | Pi | Ei
+// (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)
+// <decimalSI> ::= m | "" | k | M | G | T | P | E
+// (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)
+// <decimalExponent> ::= "e" <signedNumber> | "E" <signedNumber>
+//
+// No matter which of the three exponent forms is used, no quantity may represent
+// a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal
+// places. Numbers larger or more precise will be capped or rounded up.
+// (E.g.: 0.1m will rounded up to 1m.)
+// This may be extended in the future if we require larger or smaller quantities.
+//
+// When a Quantity is parsed from a string, it will remember the type of suffix
+// it had, and will use the same type again when it is serialized.
+//
+// Before serializing, Quantity will be put in "canonical form".
+// This means that Exponent/suffix will be adjusted up or down (with a
+// corresponding increase or decrease in Mantissa) such that:
+// a. No precision is lost
+// b. No fractional digits will be emitted
+// c. The exponent (or suffix) is as large as possible.
+// The sign will be omitted unless the number is negative.
+//
+// Examples:
+// 1.5 will be serialized as "1500m"
+// 1.5Gi will be serialized as "1536Mi"
+//
+// NOTE: We reserve the right to amend this canonical format, perhaps to
+// allow 1.5 to be canonical.
+// TODO: Remove above disclaimer after all bikeshedding about format is over,
+// or after March 2015.
+//
+// Note that the quantity will NEVER be internally represented by a
+// floating point number. That is the whole point of this exercise.
+//
+// Non-canonical values will still parse as long as they are well formed,
+// but will be re-emitted in their canonical form. (So always use canonical
+// form, or don't diff.)
+//
+// This format is intended to make it difficult to use these numbers without
+// writing some sort of special handling code in the hopes that that will
+// cause implementors to also use a fixed point implementation.
+//
+// +protobuf=true
+// +protobuf.embed=string
+// +protobuf.options.marshal=false
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+// +k8s:openapi-gen=true
+message Quantity {
+ optional string string = 1;
+}
+
diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/math.go b/vendor/k8s.io/apimachinery/pkg/api/resource/math.go
new file mode 100644
index 000000000..72d3880c0
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/api/resource/math.go
@@ -0,0 +1,314 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package resource
+
+import (
+ "math/big"
+
+ inf "gopkg.in/inf.v0"
+)
+
+const (
+ // maxInt64Factors is the highest value that will be checked when removing factors of 10 from an int64.
+ // It is also the maximum decimal digits that can be represented with an int64.
+ maxInt64Factors = 18
+)
+
+var (
+ // Commonly needed big.Int values-- treat as read only!
+ bigTen = big.NewInt(10)
+ bigZero = big.NewInt(0)
+ bigOne = big.NewInt(1)
+ bigThousand = big.NewInt(1000)
+ big1024 = big.NewInt(1024)
+
+ // Commonly needed inf.Dec values-- treat as read only!
+ decZero = inf.NewDec(0, 0)
+ decOne = inf.NewDec(1, 0)
+ decMinusOne = inf.NewDec(-1, 0)
+ decThousand = inf.NewDec(1000, 0)
+ dec1024 = inf.NewDec(1024, 0)
+ decMinus1024 = inf.NewDec(-1024, 0)
+
+ // Largest (in magnitude) number allowed.
+ maxAllowed = infDecAmount{inf.NewDec((1<<63)-1, 0)} // == max int64
+
+ // The maximum value we can represent milli-units for.
+ // Compare with the return value of Quantity.Value() to
+ // see if it's safe to use Quantity.MilliValue().
+ MaxMilliValue = int64(((1 << 63) - 1) / 1000)
+)
+
+const mostNegative = -(mostPositive + 1)
+const mostPositive = 1<<63 - 1
+
+// int64Add returns a+b, or false if that would overflow int64.
+func int64Add(a, b int64) (int64, bool) {
+ c := a + b
+ switch {
+ case a > 0 && b > 0:
+ if c < 0 {
+ return 0, false
+ }
+ case a < 0 && b < 0:
+ if c > 0 {
+ return 0, false
+ }
+ if a == mostNegative && b == mostNegative {
+ return 0, false
+ }
+ }
+ return c, true
+}
+
+// int64Multiply returns a*b, or false if that would overflow or underflow int64.
+func int64Multiply(a, b int64) (int64, bool) {
+ if a == 0 || b == 0 || a == 1 || b == 1 {
+ return a * b, true
+ }
+ if a == mostNegative || b == mostNegative {
+ return 0, false
+ }
+ c := a * b
+ return c, c/b == a
+}
+
+// int64MultiplyScale returns a*b, assuming b is greater than one, or false if that would overflow or underflow int64.
+// Use when b is known to be greater than one.
+func int64MultiplyScale(a int64, b int64) (int64, bool) {
+ if a == 0 || a == 1 {
+ return a * b, true
+ }
+ if a == mostNegative && b != 1 {
+ return 0, false
+ }
+ c := a * b
+ return c, c/b == a
+}
+
+// int64MultiplyScale10 multiplies a by 10, or returns false if that would overflow. This method is faster than
+// int64Multiply(a, 10) because the compiler can optimize constant factor multiplication.
+func int64MultiplyScale10(a int64) (int64, bool) {
+ if a == 0 || a == 1 {
+ return a * 10, true
+ }
+ if a == mostNegative {
+ return 0, false
+ }
+ c := a * 10
+ return c, c/10 == a
+}
+
+// int64MultiplyScale100 multiplies a by 100, or returns false if that would overflow. This method is faster than
+// int64Multiply(a, 100) because the compiler can optimize constant factor multiplication.
+func int64MultiplyScale100(a int64) (int64, bool) {
+ if a == 0 || a == 1 {
+ return a * 100, true
+ }
+ if a == mostNegative {
+ return 0, false
+ }
+ c := a * 100
+ return c, c/100 == a
+}
+
+// int64MultiplyScale1000 multiplies a by 1000, or returns false if that would overflow. This method is faster than
+// int64Multiply(a, 1000) because the compiler can optimize constant factor multiplication.
+func int64MultiplyScale1000(a int64) (int64, bool) {
+ if a == 0 || a == 1 {
+ return a * 1000, true
+ }
+ if a == mostNegative {
+ return 0, false
+ }
+ c := a * 1000
+ return c, c/1000 == a
+}
+
+// positiveScaleInt64 multiplies base by 10^scale, returning false if the
+// value overflows. Passing a negative scale is undefined.
+func positiveScaleInt64(base int64, scale Scale) (int64, bool) {
+ switch scale {
+ case 0:
+ return base, true
+ case 1:
+ return int64MultiplyScale10(base)
+ case 2:
+ return int64MultiplyScale100(base)
+ case 3:
+ return int64MultiplyScale1000(base)
+ case 6:
+ return int64MultiplyScale(base, 1000000)
+ case 9:
+ return int64MultiplyScale(base, 1000000000)
+ default:
+ value := base
+ var ok bool
+ for i := Scale(0); i < scale; i++ {
+ if value, ok = int64MultiplyScale(value, 10); !ok {
+ return 0, false
+ }
+ }
+ return value, true
+ }
+}
+
+// negativeScaleInt64 reduces base by the provided scale, rounding up, until the
+// value is zero or the scale is reached. Passing a negative scale is undefined.
+// The value returned, if not exact, is rounded away from zero.
+func negativeScaleInt64(base int64, scale Scale) (result int64, exact bool) {
+ if scale == 0 {
+ return base, true
+ }
+
+ value := base
+ var fraction bool
+ for i := Scale(0); i < scale; i++ {
+ if !fraction && value%10 != 0 {
+ fraction = true
+ }
+ value = value / 10
+ if value == 0 {
+ if fraction {
+ if base > 0 {
+ return 1, false
+ }
+ return -1, false
+ }
+ return 0, true
+ }
+ }
+ if fraction {
+ if base > 0 {
+ value += 1
+ } else {
+ value += -1
+ }
+ }
+ return value, !fraction
+}
+
+func pow10Int64(b int64) int64 {
+ switch b {
+ case 0:
+ return 1
+ case 1:
+ return 10
+ case 2:
+ return 100
+ case 3:
+ return 1000
+ case 4:
+ return 10000
+ case 5:
+ return 100000
+ case 6:
+ return 1000000
+ case 7:
+ return 10000000
+ case 8:
+ return 100000000
+ case 9:
+ return 1000000000
+ case 10:
+ return 10000000000
+ case 11:
+ return 100000000000
+ case 12:
+ return 1000000000000
+ case 13:
+ return 10000000000000
+ case 14:
+ return 100000000000000
+ case 15:
+ return 1000000000000000
+ case 16:
+ return 10000000000000000
+ case 17:
+ return 100000000000000000
+ case 18:
+ return 1000000000000000000
+ default:
+ return 0
+ }
+}
+
+// negativeScaleInt64 returns the result of dividing base by scale * 10 and the remainder, or
+// false if no such division is possible. Dividing by negative scales is undefined.
+func divideByScaleInt64(base int64, scale Scale) (result, remainder int64, exact bool) {
+ if scale == 0 {
+ return base, 0, true
+ }
+ // the max scale representable in base 10 in an int64 is 18 decimal places
+ if scale >= 18 {
+ return 0, base, false
+ }
+ divisor := pow10Int64(int64(scale))
+ return base / divisor, base % divisor, true
+}
+
+// removeInt64Factors divides in a loop; the return values have the property that
+// value == result * base ^ scale
+func removeInt64Factors(value int64, base int64) (result int64, times int32) {
+ times = 0
+ result = value
+ negative := result < 0
+ if negative {
+ result = -result
+ }
+ switch base {
+ // allow the compiler to optimize the common cases
+ case 10:
+ for result >= 10 && result%10 == 0 {
+ times++
+ result = result / 10
+ }
+ // allow the compiler to optimize the common cases
+ case 1024:
+ for result >= 1024 && result%1024 == 0 {
+ times++
+ result = result / 1024
+ }
+ default:
+ for result >= base && result%base == 0 {
+ times++
+ result = result / base
+ }
+ }
+ if negative {
+ result = -result
+ }
+ return result, times
+}
+
+// removeBigIntFactors divides in a loop; the return values have the property that
+// d == result * factor ^ times
+// d may be modified in place.
+// If d == 0, then the return values will be (0, 0)
+func removeBigIntFactors(d, factor *big.Int) (result *big.Int, times int32) {
+ q := big.NewInt(0)
+ m := big.NewInt(0)
+ for d.Cmp(bigZero) != 0 {
+ q.DivMod(d, factor, m)
+ if m.Cmp(bigZero) != 0 {
+ break
+ }
+ times++
+ d, q = q, d
+ }
+ return d, times
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go
new file mode 100644
index 000000000..3a9560882
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go
@@ -0,0 +1,792 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package resource
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "math/big"
+ "regexp"
+ "strconv"
+ "strings"
+
+ flag "github.com/spf13/pflag"
+
+ "github.com/go-openapi/spec"
+ inf "gopkg.in/inf.v0"
+ "k8s.io/apimachinery/pkg/openapi"
+)
+
+// Quantity is a fixed-point representation of a number.
+// It provides convenient marshaling/unmarshaling in JSON and YAML,
+// in addition to String() and Int64() accessors.
+//
+// The serialization format is:
+//
+// <quantity> ::= <signedNumber><suffix>
+// (Note that <suffix> may be empty, from the "" case in <decimalSI>.)
+// <digit> ::= 0 | 1 | ... | 9
+// <digits> ::= <digit> | <digit><digits>
+// <number> ::= <digits> | <digits>.<digits> | <digits>. | .<digits>
+// <sign> ::= "+" | "-"
+// <signedNumber> ::= <number> | <sign><number>
+// <suffix> ::= <binarySI> | <decimalExponent> | <decimalSI>
+// <binarySI> ::= Ki | Mi | Gi | Ti | Pi | Ei
+// (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)
+// <decimalSI> ::= m | "" | k | M | G | T | P | E
+// (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)
+// <decimalExponent> ::= "e" <signedNumber> | "E" <signedNumber>
+//
+// No matter which of the three exponent forms is used, no quantity may represent
+// a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal
+// places. Numbers larger or more precise will be capped or rounded up.
+// (E.g.: 0.1m will rounded up to 1m.)
+// This may be extended in the future if we require larger or smaller quantities.
+//
+// When a Quantity is parsed from a string, it will remember the type of suffix
+// it had, and will use the same type again when it is serialized.
+//
+// Before serializing, Quantity will be put in "canonical form".
+// This means that Exponent/suffix will be adjusted up or down (with a
+// corresponding increase or decrease in Mantissa) such that:
+// a. No precision is lost
+// b. No fractional digits will be emitted
+// c. The exponent (or suffix) is as large as possible.
+// The sign will be omitted unless the number is negative.
+//
+// Examples:
+// 1.5 will be serialized as "1500m"
+// 1.5Gi will be serialized as "1536Mi"
+//
+// NOTE: We reserve the right to amend this canonical format, perhaps to
+// allow 1.5 to be canonical.
+// TODO: Remove above disclaimer after all bikeshedding about format is over,
+// or after March 2015.
+//
+// Note that the quantity will NEVER be internally represented by a
+// floating point number. That is the whole point of this exercise.
+//
+// Non-canonical values will still parse as long as they are well formed,
+// but will be re-emitted in their canonical form. (So always use canonical
+// form, or don't diff.)
+//
+// This format is intended to make it difficult to use these numbers without
+// writing some sort of special handling code in the hopes that that will
+// cause implementors to also use a fixed point implementation.
+//
+// +protobuf=true
+// +protobuf.embed=string
+// +protobuf.options.marshal=false
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+// +k8s:openapi-gen=true
+type Quantity struct {
+ // i is the quantity in int64 scaled form, if d.Dec == nil
+ i int64Amount
+ // d is the quantity in inf.Dec form if d.Dec != nil
+ d infDecAmount
+ // s is the generated value of this quantity to avoid recalculation
+ s string
+
+ // Change Format at will. See the comment for Canonicalize for
+ // more details.
+ Format
+}
+
+// CanonicalValue allows a quantity amount to be converted to a string.
+type CanonicalValue interface {
+ // AsCanonicalBytes returns a byte array representing the string representation
+ // of the value mantissa and an int32 representing its exponent in base-10. Callers may
+ // pass a byte slice to the method to avoid allocations.
+ AsCanonicalBytes(out []byte) ([]byte, int32)
+ // AsCanonicalBase1024Bytes returns a byte array representing the string representation
+ // of the value mantissa and an int32 representing its exponent in base-1024. Callers
+ // may pass a byte slice to the method to avoid allocations.
+ AsCanonicalBase1024Bytes(out []byte) ([]byte, int32)
+}
+
+// Format lists the three possible formattings of a quantity.
+type Format string
+
+const (
+ DecimalExponent = Format("DecimalExponent") // e.g., 12e6
+ BinarySI = Format("BinarySI") // e.g., 12Mi (12 * 2^20)
+ DecimalSI = Format("DecimalSI") // e.g., 12M (12 * 10^6)
+)
+
+// MustParse turns the given string into a quantity or panics; for tests
+// or others cases where you know the string is valid.
+func MustParse(str string) Quantity {
+ q, err := ParseQuantity(str)
+ if err != nil {
+ panic(fmt.Errorf("cannot parse '%v': %v", str, err))
+ }
+ return q
+}
+
+const (
+ // splitREString is used to separate a number from its suffix; as such,
+ // this is overly permissive, but that's OK-- it will be checked later.
+ splitREString = "^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$"
+)
+
+var (
+ // splitRE is used to get the various parts of a number.
+ splitRE = regexp.MustCompile(splitREString)
+
+ // Errors that could happen while parsing a string.
+ ErrFormatWrong = errors.New("quantities must match the regular expression '" + splitREString + "'")
+ ErrNumeric = errors.New("unable to parse numeric part of quantity")
+ ErrSuffix = errors.New("unable to parse quantity's suffix")
+)
+
+// parseQuantityString is a fast scanner for quantity values.
+func parseQuantityString(str string) (positive bool, value, num, denom, suffix string, err error) {
+ positive = true
+ pos := 0
+ end := len(str)
+
+ // handle leading sign
+ if pos < end {
+ switch str[0] {
+ case '-':
+ positive = false
+ pos++
+ case '+':
+ pos++
+ }
+ }
+
+ // strip leading zeros
+Zeroes:
+ for i := pos; ; i++ {
+ if i >= end {
+ num = "0"
+ value = num
+ return
+ }
+ switch str[i] {
+ case '0':
+ pos++
+ default:
+ break Zeroes
+ }
+ }
+
+ // extract the numerator
+Num:
+ for i := pos; ; i++ {
+ if i >= end {
+ num = str[pos:end]
+ value = str[0:end]
+ return
+ }
+ switch str[i] {
+ case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
+ default:
+ num = str[pos:i]
+ pos = i
+ break Num
+ }
+ }
+
+ // if we stripped all numerator positions, always return 0
+ if len(num) == 0 {
+ num = "0"
+ }
+
+ // handle a denominator
+ if pos < end && str[pos] == '.' {
+ pos++
+ Denom:
+ for i := pos; ; i++ {
+ if i >= end {
+ denom = str[pos:end]
+ value = str[0:end]
+ return
+ }
+ switch str[i] {
+ case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
+ default:
+ denom = str[pos:i]
+ pos = i
+ break Denom
+ }
+ }
+ // TODO: we currently allow 1.G, but we may not want to in the future.
+ // if len(denom) == 0 {
+ // err = ErrFormatWrong
+ // return
+ // }
+ }
+ value = str[0:pos]
+
+ // grab the elements of the suffix
+ suffixStart := pos
+ for i := pos; ; i++ {
+ if i >= end {
+ suffix = str[suffixStart:end]
+ return
+ }
+ if !strings.ContainsAny(str[i:i+1], "eEinumkKMGTP") {
+ pos = i
+ break
+ }
+ }
+ if pos < end {
+ switch str[pos] {
+ case '-', '+':
+ pos++
+ }
+ }
+Suffix:
+ for i := pos; ; i++ {
+ if i >= end {
+ suffix = str[suffixStart:end]
+ return
+ }
+ switch str[i] {
+ case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
+ default:
+ break Suffix
+ }
+ }
+ // we encountered a non decimal in the Suffix loop, but the last character
+ // was not a valid exponent
+ err = ErrFormatWrong
+ return
+}
+
+// ParseQuantity turns str into a Quantity, or returns an error.
+func ParseQuantity(str string) (Quantity, error) {
+ if len(str) == 0 {
+ return Quantity{}, ErrFormatWrong
+ }
+ if str == "0" {
+ return Quantity{Format: DecimalSI, s: str}, nil
+ }
+
+ positive, value, num, denom, suf, err := parseQuantityString(str)
+ if err != nil {
+ return Quantity{}, err
+ }
+
+ base, exponent, format, ok := quantitySuffixer.interpret(suffix(suf))
+ if !ok {
+ return Quantity{}, ErrSuffix
+ }
+
+ precision := int32(0)
+ scale := int32(0)
+ mantissa := int64(1)
+ switch format {
+ case DecimalExponent, DecimalSI:
+ scale = exponent
+ precision = maxInt64Factors - int32(len(num)+len(denom))
+ case BinarySI:
+ scale = 0
+ switch {
+ case exponent >= 0 && len(denom) == 0:
+ // only handle positive binary numbers with the fast path
+ mantissa = int64(int64(mantissa) << uint64(exponent))
+ // 1Mi (2^20) has ~6 digits of decimal precision, so exponent*3/10 -1 is roughly the precision
+ precision = 15 - int32(len(num)) - int32(float32(exponent)*3/10) - 1
+ default:
+ precision = -1
+ }
+ }
+
+ if precision >= 0 {
+ // if we have a denominator, shift the entire value to the left by the number of places in the
+ // denominator
+ scale -= int32(len(denom))
+ if scale >= int32(Nano) {
+ shifted := num + denom
+
+ var value int64
+ value, err := strconv.ParseInt(shifted, 10, 64)
+ if err != nil {
+ return Quantity{}, ErrNumeric
+ }
+ if result, ok := int64Multiply(value, int64(mantissa)); ok {
+ if !positive {
+ result = -result
+ }
+ // if the number is in canonical form, reuse the string
+ switch format {
+ case BinarySI:
+ if exponent%10 == 0 && (value&0x07 != 0) {
+ return Quantity{i: int64Amount{value: result, scale: Scale(scale)}, Format: format, s: str}, nil
+ }
+ default:
+ if scale%3 == 0 && !strings.HasSuffix(shifted, "000") && shifted[0] != '0' {
+ return Quantity{i: int64Amount{value: result, scale: Scale(scale)}, Format: format, s: str}, nil
+ }
+ }
+ return Quantity{i: int64Amount{value: result, scale: Scale(scale)}, Format: format}, nil
+ }
+ }
+ }
+
+ amount := new(inf.Dec)
+ if _, ok := amount.SetString(value); !ok {
+ return Quantity{}, ErrNumeric
+ }
+
+ // So that no one but us has to think about suffixes, remove it.
+ if base == 10 {
+ amount.SetScale(amount.Scale() + Scale(exponent).infScale())
+ } else if base == 2 {
+ // numericSuffix = 2 ** exponent
+ numericSuffix := big.NewInt(1).Lsh(bigOne, uint(exponent))
+ ub := amount.UnscaledBig()
+ amount.SetUnscaledBig(ub.Mul(ub, numericSuffix))
+ }
+
+ // Cap at min/max bounds.
+ sign := amount.Sign()
+ if sign == -1 {
+ amount.Neg(amount)
+ }
+
+ // This rounds non-zero values up to the minimum representable value, under the theory that
+ // if you want some resources, you should get some resources, even if you asked for way too small
+ // of an amount. Arguably, this should be inf.RoundHalfUp (normal rounding), but that would have
+ // the side effect of rounding values < .5n to zero.
+ if v, ok := amount.Unscaled(); v != int64(0) || !ok {
+ amount.Round(amount, Nano.infScale(), inf.RoundUp)
+ }
+
+ // The max is just a simple cap.
+ // TODO: this prevents accumulating quantities greater than int64, for instance quota across a cluster
+ if format == BinarySI && amount.Cmp(maxAllowed.Dec) > 0 {
+ amount.Set(maxAllowed.Dec)
+ }
+
+ if format == BinarySI && amount.Cmp(decOne) < 0 && amount.Cmp(decZero) > 0 {
+ // This avoids rounding and hopefully confusion, too.
+ format = DecimalSI
+ }
+ if sign == -1 {
+ amount.Neg(amount)
+ }
+
+ return Quantity{d: infDecAmount{amount}, Format: format}, nil
+}
+
+// DeepCopy returns a deep-copy of the Quantity value. Note that the method
+// receiver is a value, so we can mutate it in-place and return it.
+func (q Quantity) DeepCopy() Quantity {
+ if q.d.Dec != nil {
+ tmp := &inf.Dec{}
+ q.d.Dec = tmp.Set(q.d.Dec)
+ }
+ return q
+}
+
+// OpenAPIDefinition returns openAPI definition for this type.
+func (_ Quantity) OpenAPIDefinition() openapi.OpenAPIDefinition {
+ return openapi.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ }
+}
+
+// CanonicalizeBytes returns the canonical form of q and its suffix (see comment on Quantity).
+//
+// Note about BinarySI:
+// * If q.Format is set to BinarySI and q.Amount represents a non-zero value between
+// -1 and +1, it will be emitted as if q.Format were DecimalSI.
+// * Otherwise, if q.Format is set to BinarySI, frational parts of q.Amount will be
+// rounded up. (1.1i becomes 2i.)
+func (q *Quantity) CanonicalizeBytes(out []byte) (result, suffix []byte) {
+ if q.IsZero() {
+ return zeroBytes, nil
+ }
+
+ var rounded CanonicalValue
+ format := q.Format
+ switch format {
+ case DecimalExponent, DecimalSI:
+ case BinarySI:
+ if q.CmpInt64(-1024) > 0 && q.CmpInt64(1024) < 0 {
+ // This avoids rounding and hopefully confusion, too.
+ format = DecimalSI
+ } else {
+ var exact bool
+ if rounded, exact = q.AsScale(0); !exact {
+ // Don't lose precision-- show as DecimalSI
+ format = DecimalSI
+ }
+ }
+ default:
+ format = DecimalExponent
+ }
+
+ // TODO: If BinarySI formatting is requested but would cause rounding, upgrade to
+ // one of the other formats.
+ switch format {
+ case DecimalExponent, DecimalSI:
+ number, exponent := q.AsCanonicalBytes(out)
+ suffix, _ := quantitySuffixer.constructBytes(10, exponent, format)
+ return number, suffix
+ default:
+ // format must be BinarySI
+ number, exponent := rounded.AsCanonicalBase1024Bytes(out)
+ suffix, _ := quantitySuffixer.constructBytes(2, exponent*10, format)
+ return number, suffix
+ }
+}
+
+// AsInt64 returns a representation of the current value as an int64 if a fast conversion
+// is possible. If false is returned, callers must use the inf.Dec form of this quantity.
+func (q *Quantity) AsInt64() (int64, bool) {
+ if q.d.Dec != nil {
+ return 0, false
+ }
+ return q.i.AsInt64()
+}
+
+// ToDec promotes the quantity in place to use an inf.Dec representation and returns itself.
+func (q *Quantity) ToDec() *Quantity {
+ if q.d.Dec == nil {
+ q.d.Dec = q.i.AsDec()
+ q.i = int64Amount{}
+ }
+ return q
+}
+
+// AsDec returns the quantity as represented by a scaled inf.Dec.
+func (q *Quantity) AsDec() *inf.Dec {
+ if q.d.Dec != nil {
+ return q.d.Dec
+ }
+ q.d.Dec = q.i.AsDec()
+ q.i = int64Amount{}
+ return q.d.Dec
+}
+
+// AsCanonicalBytes returns the canonical byte representation of this quantity as a mantissa
+// and base 10 exponent. The out byte slice may be passed to the method to avoid an extra
+// allocation.
+func (q *Quantity) AsCanonicalBytes(out []byte) (result []byte, exponent int32) {
+ if q.d.Dec != nil {
+ return q.d.AsCanonicalBytes(out)
+ }
+ return q.i.AsCanonicalBytes(out)
+}
+
+// IsZero returns true if the quantity is equal to zero.
+func (q *Quantity) IsZero() bool {
+ if q.d.Dec != nil {
+ return q.d.Dec.Sign() == 0
+ }
+ return q.i.value == 0
+}
+
+// Sign returns 0 if the quantity is zero, -1 if the quantity is less than zero, or 1 if the
+// quantity is greater than zero.
+func (q *Quantity) Sign() int {
+ if q.d.Dec != nil {
+ return q.d.Dec.Sign()
+ }
+ return q.i.Sign()
+}
+
+// AsScaled returns the current value, rounded up to the provided scale, and returns
+// false if the scale resulted in a loss of precision.
+func (q *Quantity) AsScale(scale Scale) (CanonicalValue, bool) {
+ if q.d.Dec != nil {
+ return q.d.AsScale(scale)
+ }
+ return q.i.AsScale(scale)
+}
+
+// RoundUp updates the quantity to the provided scale, ensuring that the value is at
+// least 1. False is returned if the rounding operation resulted in a loss of precision.
+// Negative numbers are rounded away from zero (-9 scale 1 rounds to -10).
+func (q *Quantity) RoundUp(scale Scale) bool {
+ if q.d.Dec != nil {
+ q.s = ""
+ d, exact := q.d.AsScale(scale)
+ q.d = d
+ return exact
+ }
+ // avoid clearing the string value if we have already calculated it
+ if q.i.scale >= scale {
+ return true
+ }
+ q.s = ""
+ i, exact := q.i.AsScale(scale)
+ q.i = i
+ return exact
+}
+
+// Add adds the provide y quantity to the current value. If the current value is zero,
+// the format of the quantity will be updated to the format of y.
+func (q *Quantity) Add(y Quantity) {
+ q.s = ""
+ if q.d.Dec == nil && y.d.Dec == nil {
+ if q.i.value == 0 {
+ q.Format = y.Format
+ }
+ if q.i.Add(y.i) {
+ return
+ }
+ } else if q.IsZero() {
+ q.Format = y.Format
+ }
+ q.ToDec().d.Dec.Add(q.d.Dec, y.AsDec())
+}
+
+// Sub subtracts the provided quantity from the current value in place. If the current
+// value is zero, the format of the quantity will be updated to the format of y.
+func (q *Quantity) Sub(y Quantity) {
+ q.s = ""
+ if q.IsZero() {
+ q.Format = y.Format
+ }
+ if q.d.Dec == nil && y.d.Dec == nil && q.i.Sub(y.i) {
+ return
+ }
+ q.ToDec().d.Dec.Sub(q.d.Dec, y.AsDec())
+}
+
+// Cmp returns 0 if the quantity is equal to y, -1 if the quantity is less than y, or 1 if the
+// quantity is greater than y.
+func (q *Quantity) Cmp(y Quantity) int {
+ if q.d.Dec == nil && y.d.Dec == nil {
+ return q.i.Cmp(y.i)
+ }
+ return q.AsDec().Cmp(y.AsDec())
+}
+
+// CmpInt64 returns 0 if the quantity is equal to y, -1 if the quantity is less than y, or 1 if the
+// quantity is greater than y.
+func (q *Quantity) CmpInt64(y int64) int {
+ if q.d.Dec != nil {
+ return q.d.Dec.Cmp(inf.NewDec(y, inf.Scale(0)))
+ }
+ return q.i.Cmp(int64Amount{value: y})
+}
+
+// Neg sets quantity to be the negative value of itself.
+func (q *Quantity) Neg() {
+ q.s = ""
+ if q.d.Dec == nil {
+ q.i.value = -q.i.value
+ return
+ }
+ q.d.Dec.Neg(q.d.Dec)
+}
+
+// int64QuantityExpectedBytes is the expected width in bytes of the canonical string representation
+// of most Quantity values.
+const int64QuantityExpectedBytes = 18
+
+// String formats the Quantity as a string, caching the result if not calculated.
+// String is an expensive operation and caching this result significantly reduces the cost of
+// normal parse / marshal operations on Quantity.
+func (q *Quantity) String() string {
+ if len(q.s) == 0 {
+ result := make([]byte, 0, int64QuantityExpectedBytes)
+ number, suffix := q.CanonicalizeBytes(result)
+ number = append(number, suffix...)
+ q.s = string(number)
+ }
+ return q.s
+}
+
+// MarshalJSON implements the json.Marshaller interface.
+func (q Quantity) MarshalJSON() ([]byte, error) {
+ if len(q.s) > 0 {
+ out := make([]byte, len(q.s)+2)
+ out[0], out[len(out)-1] = '"', '"'
+ copy(out[1:], q.s)
+ return out, nil
+ }
+ result := make([]byte, int64QuantityExpectedBytes, int64QuantityExpectedBytes)
+ result[0] = '"'
+ number, suffix := q.CanonicalizeBytes(result[1:1])
+ // if the same slice was returned to us that we passed in, avoid another allocation by copying number into
+ // the source slice and returning that
+ if len(number) > 0 && &number[0] == &result[1] && (len(number)+len(suffix)+2) <= int64QuantityExpectedBytes {
+ number = append(number, suffix...)
+ number = append(number, '"')
+ return result[:1+len(number)], nil
+ }
+ // if CanonicalizeBytes needed more space than our slice provided, we may need to allocate again so use
+ // append
+ result = result[:1]
+ result = append(result, number...)
+ result = append(result, suffix...)
+ result = append(result, '"')
+ return result, nil
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface.
+// TODO: Remove support for leading/trailing whitespace
+func (q *Quantity) UnmarshalJSON(value []byte) error {
+ l := len(value)
+ if l == 4 && bytes.Equal(value, []byte("null")) {
+ q.d.Dec = nil
+ q.i = int64Amount{}
+ return nil
+ }
+ if l >= 2 && value[0] == '"' && value[l-1] == '"' {
+ value = value[1 : l-1]
+ }
+
+ parsed, err := ParseQuantity(strings.TrimSpace(string(value)))
+ if err != nil {
+ return err
+ }
+
+ // This copy is safe because parsed will not be referred to again.
+ *q = parsed
+ return nil
+}
+
+// NewQuantity returns a new Quantity representing the given
+// value in the given format.
+func NewQuantity(value int64, format Format) *Quantity {
+ return &Quantity{
+ i: int64Amount{value: value},
+ Format: format,
+ }
+}
+
+// NewMilliQuantity returns a new Quantity representing the given
+// value * 1/1000 in the given format. Note that BinarySI formatting
+// will round fractional values, and will be changed to DecimalSI for
+// values x where (-1 < x < 1) && (x != 0).
+func NewMilliQuantity(value int64, format Format) *Quantity {
+ return &Quantity{
+ i: int64Amount{value: value, scale: -3},
+ Format: format,
+ }
+}
+
+// NewScaledQuantity returns a new Quantity representing the given
+// value * 10^scale in DecimalSI format.
+func NewScaledQuantity(value int64, scale Scale) *Quantity {
+ return &Quantity{
+ i: int64Amount{value: value, scale: scale},
+ Format: DecimalSI,
+ }
+}
+
+// Value returns the value of q; any fractional part will be lost.
+func (q *Quantity) Value() int64 {
+ return q.ScaledValue(0)
+}
+
+// MilliValue returns the value of ceil(q * 1000); this could overflow an int64;
+// if that's a concern, call Value() first to verify the number is small enough.
+func (q *Quantity) MilliValue() int64 {
+ return q.ScaledValue(Milli)
+}
+
+// ScaledValue returns the value of ceil(q * 10^scale); this could overflow an int64.
+// To detect overflow, call Value() first and verify the expected magnitude.
+func (q *Quantity) ScaledValue(scale Scale) int64 {
+ if q.d.Dec == nil {
+ i, _ := q.i.AsScaledInt64(scale)
+ return i
+ }
+ dec := q.d.Dec
+ return scaledValue(dec.UnscaledBig(), int(dec.Scale()), int(scale.infScale()))
+}
+
+// Set sets q's value to be value.
+func (q *Quantity) Set(value int64) {
+ q.SetScaled(value, 0)
+}
+
+// SetMilli sets q's value to be value * 1/1000.
+func (q *Quantity) SetMilli(value int64) {
+ q.SetScaled(value, Milli)
+}
+
+// SetScaled sets q's value to be value * 10^scale
+func (q *Quantity) SetScaled(value int64, scale Scale) {
+ q.s = ""
+ q.d.Dec = nil
+ q.i = int64Amount{value: value, scale: scale}
+}
+
+// Copy is a convenience function that makes a deep copy for you. Non-deep
+// copies of quantities share pointers and you will regret that.
+func (q *Quantity) Copy() *Quantity {
+ if q.d.Dec == nil {
+ return &Quantity{
+ s: q.s,
+ i: q.i,
+ Format: q.Format,
+ }
+ }
+ tmp := &inf.Dec{}
+ return &Quantity{
+ s: q.s,
+ d: infDecAmount{tmp.Set(q.d.Dec)},
+ Format: q.Format,
+ }
+}
+
+// qFlag is a helper type for the Flag function
+type qFlag struct {
+ dest *Quantity
+}
+
+// Sets the value of the internal Quantity. (used by flag & pflag)
+func (qf qFlag) Set(val string) error {
+ q, err := ParseQuantity(val)
+ if err != nil {
+ return err
+ }
+ // This copy is OK because q will not be referenced again.
+ *qf.dest = q
+ return nil
+}
+
+// Converts the value of the internal Quantity to a string. (used by flag & pflag)
+func (qf qFlag) String() string {
+ return qf.dest.String()
+}
+
+// States the type of flag this is (Quantity). (used by pflag)
+func (qf qFlag) Type() string {
+ return "quantity"
+}
+
+// QuantityFlag is a helper that makes a quantity flag (using standard flag package).
+// Will panic if defaultValue is not a valid quantity.
+func QuantityFlag(flagName, defaultValue, description string) *Quantity {
+ q := MustParse(defaultValue)
+ flag.Var(NewQuantityFlagValue(&q), flagName, description)
+ return &q
+}
+
+// NewQuantityFlagValue returns an object that can be used to back a flag,
+// pointing at the given Quantity variable.
+func NewQuantityFlagValue(q *Quantity) flag.Value {
+ return qFlag{q}
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go
new file mode 100644
index 000000000..74dfb4e4b
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go
@@ -0,0 +1,284 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package resource
+
+import (
+ "fmt"
+ "io"
+
+ "github.com/gogo/protobuf/proto"
+)
+
+var _ proto.Sizer = &Quantity{}
+
+func (m *Quantity) Marshal() (data []byte, err error) {
+ size := m.Size()
+ data = make([]byte, size)
+ n, err := m.MarshalTo(data)
+ if err != nil {
+ return nil, err
+ }
+ return data[:n], nil
+}
+
+// MarshalTo is a customized version of the generated Protobuf unmarshaler for a struct
+// with a single string field.
+func (m *Quantity) MarshalTo(data []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+
+ data[i] = 0xa
+ i++
+ // BEGIN CUSTOM MARSHAL
+ out := m.String()
+ i = encodeVarintGenerated(data, i, uint64(len(out)))
+ i += copy(data[i:], out)
+ // END CUSTOM MARSHAL
+
+ return i, nil
+}
+
+func encodeVarintGenerated(data []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ data[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ data[offset] = uint8(v)
+ return offset + 1
+}
+
+func (m *Quantity) Size() (n int) {
+ var l int
+ _ = l
+
+ // BEGIN CUSTOM SIZE
+ l = len(m.String())
+ // END CUSTOM SIZE
+
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+
+// Unmarshal is a customized version of the generated Protobuf unmarshaler for a struct
+// with a single string field.
+func (m *Quantity) Unmarshal(data []byte) error {
+ l := len(data)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Quantity: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Quantity: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := string(data[iNdEx:postIndex])
+
+ // BEGIN CUSTOM DECODE
+ p, err := ParseQuantity(s)
+ if err != nil {
+ return err
+ }
+ *m = p
+ // END CUSTOM DECODE
+
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(data[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+
+func skipGenerated(data []byte) (n int, err error) {
+ l := len(data)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if data[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := data[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(data[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/scale_int.go b/vendor/k8s.io/apimachinery/pkg/api/resource/scale_int.go
new file mode 100644
index 000000000..55e177b0e
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/api/resource/scale_int.go
@@ -0,0 +1,95 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package resource
+
+import (
+ "math"
+ "math/big"
+ "sync"
+)
+
+var (
+ // A sync pool to reduce allocation.
+ intPool sync.Pool
+ maxInt64 = big.NewInt(math.MaxInt64)
+)
+
+func init() {
+ intPool.New = func() interface{} {
+ return &big.Int{}
+ }
+}
+
+// scaledValue scales given unscaled value from scale to new Scale and returns
+// an int64. It ALWAYS rounds up the result when scale down. The final result might
+// overflow.
+//
+// scale, newScale represents the scale of the unscaled decimal.
+// The mathematical value of the decimal is unscaled * 10**(-scale).
+func scaledValue(unscaled *big.Int, scale, newScale int) int64 {
+ dif := scale - newScale
+ if dif == 0 {
+ return unscaled.Int64()
+ }
+
+ // Handle scale up
+ // This is an easy case, we do not need to care about rounding and overflow.
+ // If any intermediate operation causes overflow, the result will overflow.
+ if dif < 0 {
+ return unscaled.Int64() * int64(math.Pow10(-dif))
+ }
+
+ // Handle scale down
+ // We have to be careful about the intermediate operations.
+
+ // fast path when unscaled < max.Int64 and exp(10,dif) < max.Int64
+ const log10MaxInt64 = 19
+ if unscaled.Cmp(maxInt64) < 0 && dif < log10MaxInt64 {
+ divide := int64(math.Pow10(dif))
+ result := unscaled.Int64() / divide
+ mod := unscaled.Int64() % divide
+ if mod != 0 {
+ return result + 1
+ }
+ return result
+ }
+
+ // We should only convert back to int64 when getting the result.
+ divisor := intPool.Get().(*big.Int)
+ exp := intPool.Get().(*big.Int)
+ result := intPool.Get().(*big.Int)
+ defer func() {
+ intPool.Put(divisor)
+ intPool.Put(exp)
+ intPool.Put(result)
+ }()
+
+ // divisor = 10^(dif)
+ // TODO: create loop up table if exp costs too much.
+ divisor.Exp(bigTen, exp.SetInt64(int64(dif)), nil)
+ // reuse exp
+ remainder := exp
+
+ // result = unscaled / divisor
+ // remainder = unscaled % divisor
+ result.DivMod(unscaled, divisor, remainder)
+ if remainder.Sign() != 0 {
+ return result.Int64() + 1
+ }
+
+ return result.Int64()
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/suffix.go b/vendor/k8s.io/apimachinery/pkg/api/resource/suffix.go
new file mode 100644
index 000000000..5ed7abe66
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/api/resource/suffix.go
@@ -0,0 +1,198 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package resource
+
+import (
+ "strconv"
+)
+
+type suffix string
+
+// suffixer can interpret and construct suffixes.
+type suffixer interface {
+ interpret(suffix) (base, exponent int32, fmt Format, ok bool)
+ construct(base, exponent int32, fmt Format) (s suffix, ok bool)
+ constructBytes(base, exponent int32, fmt Format) (s []byte, ok bool)
+}
+
+// quantitySuffixer handles suffixes for all three formats that quantity
+// can handle.
+var quantitySuffixer = newSuffixer()
+
+type bePair struct {
+ base, exponent int32
+}
+
+type listSuffixer struct {
+ suffixToBE map[suffix]bePair
+ beToSuffix map[bePair]suffix
+ beToSuffixBytes map[bePair][]byte
+}
+
+func (ls *listSuffixer) addSuffix(s suffix, pair bePair) {
+ if ls.suffixToBE == nil {
+ ls.suffixToBE = map[suffix]bePair{}
+ }
+ if ls.beToSuffix == nil {
+ ls.beToSuffix = map[bePair]suffix{}
+ }
+ if ls.beToSuffixBytes == nil {
+ ls.beToSuffixBytes = map[bePair][]byte{}
+ }
+ ls.suffixToBE[s] = pair
+ ls.beToSuffix[pair] = s
+ ls.beToSuffixBytes[pair] = []byte(s)
+}
+
+func (ls *listSuffixer) lookup(s suffix) (base, exponent int32, ok bool) {
+ pair, ok := ls.suffixToBE[s]
+ if !ok {
+ return 0, 0, false
+ }
+ return pair.base, pair.exponent, true
+}
+
+func (ls *listSuffixer) construct(base, exponent int32) (s suffix, ok bool) {
+ s, ok = ls.beToSuffix[bePair{base, exponent}]
+ return
+}
+
+func (ls *listSuffixer) constructBytes(base, exponent int32) (s []byte, ok bool) {
+ s, ok = ls.beToSuffixBytes[bePair{base, exponent}]
+ return
+}
+
+type suffixHandler struct {
+ decSuffixes listSuffixer
+ binSuffixes listSuffixer
+}
+
+type fastLookup struct {
+ *suffixHandler
+}
+
+func (l fastLookup) interpret(s suffix) (base, exponent int32, format Format, ok bool) {
+ switch s {
+ case "":
+ return 10, 0, DecimalSI, true
+ case "n":
+ return 10, -9, DecimalSI, true
+ case "u":
+ return 10, -6, DecimalSI, true
+ case "m":
+ return 10, -3, DecimalSI, true
+ case "k":
+ return 10, 3, DecimalSI, true
+ case "M":
+ return 10, 6, DecimalSI, true
+ case "G":
+ return 10, 9, DecimalSI, true
+ }
+ return l.suffixHandler.interpret(s)
+}
+
+func newSuffixer() suffixer {
+ sh := &suffixHandler{}
+
+ // IMPORTANT: if you change this section you must change fastLookup
+
+ sh.binSuffixes.addSuffix("Ki", bePair{2, 10})
+ sh.binSuffixes.addSuffix("Mi", bePair{2, 20})
+ sh.binSuffixes.addSuffix("Gi", bePair{2, 30})
+ sh.binSuffixes.addSuffix("Ti", bePair{2, 40})
+ sh.binSuffixes.addSuffix("Pi", bePair{2, 50})
+ sh.binSuffixes.addSuffix("Ei", bePair{2, 60})
+ // Don't emit an error when trying to produce
+ // a suffix for 2^0.
+ sh.decSuffixes.addSuffix("", bePair{2, 0})
+
+ sh.decSuffixes.addSuffix("n", bePair{10, -9})
+ sh.decSuffixes.addSuffix("u", bePair{10, -6})
+ sh.decSuffixes.addSuffix("m", bePair{10, -3})
+ sh.decSuffixes.addSuffix("", bePair{10, 0})
+ sh.decSuffixes.addSuffix("k", bePair{10, 3})
+ sh.decSuffixes.addSuffix("M", bePair{10, 6})
+ sh.decSuffixes.addSuffix("G", bePair{10, 9})
+ sh.decSuffixes.addSuffix("T", bePair{10, 12})
+ sh.decSuffixes.addSuffix("P", bePair{10, 15})
+ sh.decSuffixes.addSuffix("E", bePair{10, 18})
+
+ return fastLookup{sh}
+}
+
+func (sh *suffixHandler) construct(base, exponent int32, fmt Format) (s suffix, ok bool) {
+ switch fmt {
+ case DecimalSI:
+ return sh.decSuffixes.construct(base, exponent)
+ case BinarySI:
+ return sh.binSuffixes.construct(base, exponent)
+ case DecimalExponent:
+ if base != 10 {
+ return "", false
+ }
+ if exponent == 0 {
+ return "", true
+ }
+ return suffix("e" + strconv.FormatInt(int64(exponent), 10)), true
+ }
+ return "", false
+}
+
+func (sh *suffixHandler) constructBytes(base, exponent int32, format Format) (s []byte, ok bool) {
+ switch format {
+ case DecimalSI:
+ return sh.decSuffixes.constructBytes(base, exponent)
+ case BinarySI:
+ return sh.binSuffixes.constructBytes(base, exponent)
+ case DecimalExponent:
+ if base != 10 {
+ return nil, false
+ }
+ if exponent == 0 {
+ return nil, true
+ }
+ result := make([]byte, 8, 8)
+ result[0] = 'e'
+ number := strconv.AppendInt(result[1:1], int64(exponent), 10)
+ if &result[1] == &number[0] {
+ return result[:1+len(number)], true
+ }
+ result = append(result[:1], number...)
+ return result, true
+ }
+ return nil, false
+}
+
+func (sh *suffixHandler) interpret(suffix suffix) (base, exponent int32, fmt Format, ok bool) {
+ // Try lookup tables first
+ if b, e, ok := sh.decSuffixes.lookup(suffix); ok {
+ return b, e, DecimalSI, true
+ }
+ if b, e, ok := sh.binSuffixes.lookup(suffix); ok {
+ return b, e, BinarySI, true
+ }
+
+ if len(suffix) > 1 && (suffix[0] == 'E' || suffix[0] == 'e') {
+ parsed, err := strconv.ParseInt(string(suffix[1:]), 10, 64)
+ if err != nil {
+ return 0, 0, DecimalExponent, false
+ }
+ return 10, int32(parsed), DecimalExponent, true
+ }
+
+ return 0, 0, DecimalExponent, false
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/validation/doc.go b/vendor/k8s.io/apimachinery/pkg/api/validation/doc.go
new file mode 100644
index 000000000..9f20152e4
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/api/validation/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package validation contains generic api type validation functions.
+package validation // import "k8s.io/apimachinery/pkg/api/validation"
diff --git a/vendor/k8s.io/apimachinery/pkg/api/validation/generic.go b/vendor/k8s.io/apimachinery/pkg/api/validation/generic.go
new file mode 100644
index 000000000..348cdc087
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/api/validation/generic.go
@@ -0,0 +1,85 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package validation
+
+import (
+ "strings"
+
+ "k8s.io/apimachinery/pkg/util/validation"
+ "k8s.io/apimachinery/pkg/util/validation/field"
+)
+
+const IsNegativeErrorMsg string = `must be greater than or equal to 0`
+
+// ValidateNameFunc validates that the provided name is valid for a given resource type.
+// Not all resources have the same validation rules for names. Prefix is true
+// if the name will have a value appended to it. If the name is not valid,
+// this returns a list of descriptions of individual characteristics of the
+// value that were not valid. Otherwise this returns an empty list or nil.
+type ValidateNameFunc func(name string, prefix bool) []string
+
+// NameIsDNSSubdomain is a ValidateNameFunc for names that must be a DNS subdomain.
+func NameIsDNSSubdomain(name string, prefix bool) []string {
+ if prefix {
+ name = maskTrailingDash(name)
+ }
+ return validation.IsDNS1123Subdomain(name)
+}
+
+// NameIsDNSLabel is a ValidateNameFunc for names that must be a DNS 1123 label.
+func NameIsDNSLabel(name string, prefix bool) []string {
+ if prefix {
+ name = maskTrailingDash(name)
+ }
+ return validation.IsDNS1123Label(name)
+}
+
+// NameIsDNS1035Label is a ValidateNameFunc for names that must be a DNS 952 label.
+func NameIsDNS1035Label(name string, prefix bool) []string {
+ if prefix {
+ name = maskTrailingDash(name)
+ }
+ return validation.IsDNS1035Label(name)
+}
+
+// ValidateNamespaceName can be used to check whether the given namespace name is valid.
+// Prefix indicates this name will be used as part of generation, in which case
+// trailing dashes are allowed.
+var ValidateNamespaceName = NameIsDNSLabel
+
+// ValidateServiceAccountName can be used to check whether the given service account name is valid.
+// Prefix indicates this name will be used as part of generation, in which case
+// trailing dashes are allowed.
+var ValidateServiceAccountName = NameIsDNSSubdomain
+
+// maskTrailingDash replaces the final character of a string with a subdomain safe
+// value if is a dash.
+func maskTrailingDash(name string) string {
+ if strings.HasSuffix(name, "-") {
+ return name[:len(name)-2] + "a"
+ }
+ return name
+}
+
+// Validates that given value is not negative.
+func ValidateNonnegativeField(value int64, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if value < 0 {
+ allErrs = append(allErrs, field.Invalid(fldPath, value, IsNegativeErrorMsg))
+ }
+ return allErrs
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.go b/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.go
new file mode 100644
index 000000000..84bd9cded
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.go
@@ -0,0 +1,348 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package validation
+
+import (
+ "fmt"
+ "strings"
+
+ apiequality "k8s.io/apimachinery/pkg/api/equality"
+ "k8s.io/apimachinery/pkg/api/meta"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ v1validation "k8s.io/apimachinery/pkg/apis/meta/v1/validation"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/util/sets"
+ "k8s.io/apimachinery/pkg/util/validation"
+ "k8s.io/apimachinery/pkg/util/validation/field"
+)
+
+// TODO: delete this global variable when we enable the validation of common
+// fields by default.
+var RepairMalformedUpdates bool = true
+
+const FieldImmutableErrorMsg string = `field is immutable`
+
+const totalAnnotationSizeLimitB int = 256 * (1 << 10) // 256 kB
+
+// BannedOwners is a black list of object that are not allowed to be owners.
+var BannedOwners = map[schema.GroupVersionKind]struct{}{
+ {Group: "", Version: "v1", Kind: "Event"}: {},
+}
+
+// ValidateClusterName can be used to check whether the given cluster name is valid.
+var ValidateClusterName = NameIsDNS1035Label
+
+// ValidateAnnotations validates that a set of annotations are correctly defined.
+func ValidateAnnotations(annotations map[string]string, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ var totalSize int64
+ for k, v := range annotations {
+ for _, msg := range validation.IsQualifiedName(strings.ToLower(k)) {
+ allErrs = append(allErrs, field.Invalid(fldPath, k, msg))
+ }
+ totalSize += (int64)(len(k)) + (int64)(len(v))
+ }
+ if totalSize > (int64)(totalAnnotationSizeLimitB) {
+ allErrs = append(allErrs, field.TooLong(fldPath, "", totalAnnotationSizeLimitB))
+ }
+ return allErrs
+}
+
+func validateOwnerReference(ownerReference metav1.OwnerReference, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ gvk := schema.FromAPIVersionAndKind(ownerReference.APIVersion, ownerReference.Kind)
+ // gvk.Group is empty for the legacy group.
+ if len(gvk.Version) == 0 {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("apiVersion"), ownerReference.APIVersion, "version must not be empty"))
+ }
+ if len(gvk.Kind) == 0 {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("kind"), ownerReference.Kind, "kind must not be empty"))
+ }
+ if len(ownerReference.Name) == 0 {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("name"), ownerReference.Name, "name must not be empty"))
+ }
+ if len(ownerReference.UID) == 0 {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("uid"), ownerReference.UID, "uid must not be empty"))
+ }
+ if _, ok := BannedOwners[gvk]; ok {
+ allErrs = append(allErrs, field.Invalid(fldPath, ownerReference, fmt.Sprintf("%s is disallowed from being an owner", gvk)))
+ }
+ return allErrs
+}
+
+func ValidateOwnerReferences(ownerReferences []metav1.OwnerReference, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ controllerName := ""
+ for _, ref := range ownerReferences {
+ allErrs = append(allErrs, validateOwnerReference(ref, fldPath)...)
+ if ref.Controller != nil && *ref.Controller {
+ if controllerName != "" {
+ allErrs = append(allErrs, field.Invalid(fldPath, ownerReferences,
+ fmt.Sprintf("Only one reference can have Controller set to true. Found \"true\" in references for %v and %v", controllerName, ref.Name)))
+ } else {
+ controllerName = ref.Name
+ }
+ }
+ }
+ return allErrs
+}
+
+// Validate finalizer names
+func ValidateFinalizerName(stringValue string, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ for _, msg := range validation.IsQualifiedName(stringValue) {
+ allErrs = append(allErrs, field.Invalid(fldPath, stringValue, msg))
+ }
+
+ return allErrs
+}
+
+func ValidateNoNewFinalizers(newFinalizers []string, oldFinalizers []string, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ extra := sets.NewString(newFinalizers...).Difference(sets.NewString(oldFinalizers...))
+ if len(extra) != 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath, fmt.Sprintf("no new finalizers can be added if the object is being deleted, found new finalizers %#v", extra.List())))
+ }
+ return allErrs
+}
+
+func ValidateImmutableField(newVal, oldVal interface{}, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if !apiequality.Semantic.DeepEqual(oldVal, newVal) {
+ allErrs = append(allErrs, field.Invalid(fldPath, newVal, FieldImmutableErrorMsg))
+ }
+ return allErrs
+}
+
+// ValidateObjectMeta validates an object's metadata on creation. It expects that name generation has already
+// been performed.
+// It doesn't return an error for rootscoped resources with namespace, because namespace should already be cleared before.
+func ValidateObjectMeta(objMeta *metav1.ObjectMeta, requiresNamespace bool, nameFn ValidateNameFunc, fldPath *field.Path) field.ErrorList {
+ metadata, err := meta.Accessor(objMeta)
+ if err != nil {
+ allErrs := field.ErrorList{}
+ allErrs = append(allErrs, field.Invalid(fldPath, objMeta, err.Error()))
+ return allErrs
+ }
+ return ValidateObjectMetaAccessor(metadata, requiresNamespace, nameFn, fldPath)
+}
+
+// ValidateObjectMeta validates an object's metadata on creation. It expects that name generation has already
+// been performed.
+// It doesn't return an error for rootscoped resources with namespace, because namespace should already be cleared before.
+func ValidateObjectMetaAccessor(meta metav1.Object, requiresNamespace bool, nameFn ValidateNameFunc, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ if len(meta.GetGenerateName()) != 0 {
+ for _, msg := range nameFn(meta.GetGenerateName(), true) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("generateName"), meta.GetGenerateName(), msg))
+ }
+ }
+ // If the generated name validates, but the calculated value does not, it's a problem with generation, and we
+ // report it here. This may confuse users, but indicates a programming bug and still must be validated.
+ // If there are multiple fields out of which one is required then add an or as a separator
+ if len(meta.GetName()) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("name"), "name or generateName is required"))
+ } else {
+ for _, msg := range nameFn(meta.GetName(), false) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("name"), meta.GetName(), msg))
+ }
+ }
+ if requiresNamespace {
+ if len(meta.GetNamespace()) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("namespace"), ""))
+ } else {
+ for _, msg := range ValidateNamespaceName(meta.GetNamespace(), false) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("namespace"), meta.GetNamespace(), msg))
+ }
+ }
+ } else {
+ if len(meta.GetNamespace()) != 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("namespace"), "not allowed on this type"))
+ }
+ }
+ if len(meta.GetClusterName()) != 0 {
+ for _, msg := range ValidateClusterName(meta.GetClusterName(), false) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("clusterName"), meta.GetClusterName(), msg))
+ }
+ }
+ allErrs = append(allErrs, ValidateNonnegativeField(meta.GetGeneration(), fldPath.Child("generation"))...)
+ allErrs = append(allErrs, v1validation.ValidateLabels(meta.GetLabels(), fldPath.Child("labels"))...)
+ allErrs = append(allErrs, ValidateAnnotations(meta.GetAnnotations(), fldPath.Child("annotations"))...)
+ allErrs = append(allErrs, ValidateOwnerReferences(meta.GetOwnerReferences(), fldPath.Child("ownerReferences"))...)
+ allErrs = append(allErrs, ValidateInitializers(meta.GetInitializers(), fldPath.Child("initializers"))...)
+ allErrs = append(allErrs, ValidateFinalizers(meta.GetFinalizers(), fldPath.Child("finalizers"))...)
+ return allErrs
+}
+
+func ValidateInitializers(initializers *metav1.Initializers, fldPath *field.Path) field.ErrorList {
+ var allErrs field.ErrorList
+ if initializers == nil {
+ return allErrs
+ }
+ for i, initializer := range initializers.Pending {
+ for _, msg := range validation.IsQualifiedName(initializer.Name) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("pending").Index(i), initializer.Name, msg))
+ }
+ }
+ allErrs = append(allErrs, validateInitializersResult(initializers.Result, fldPath.Child("result"))...)
+ if len(initializers.Pending) == 0 && initializers.Result == nil {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("pending"), nil, "must be non-empty when result is not set"))
+ }
+ return allErrs
+}
+
+func validateInitializersResult(result *metav1.Status, fldPath *field.Path) field.ErrorList {
+ var allErrs field.ErrorList
+ if result == nil {
+ return allErrs
+ }
+ switch result.Status {
+ case metav1.StatusFailure:
+ default:
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("status"), result.Status, "must be 'Failure'"))
+ }
+ return allErrs
+}
+
+// ValidateFinalizers tests if the finalizers name are valid, and if there are conflicting finalizers.
+func ValidateFinalizers(finalizers []string, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ hasFinalizerOrphanDependents := false
+ hasFinalizerDeleteDependents := false
+ for _, finalizer := range finalizers {
+ allErrs = append(allErrs, ValidateFinalizerName(finalizer, fldPath)...)
+ if finalizer == metav1.FinalizerOrphanDependents {
+ hasFinalizerOrphanDependents = true
+ }
+ if finalizer == metav1.FinalizerDeleteDependents {
+ hasFinalizerDeleteDependents = true
+ }
+ }
+ if hasFinalizerDeleteDependents && hasFinalizerOrphanDependents {
+ allErrs = append(allErrs, field.Invalid(fldPath, finalizers, fmt.Sprintf("finalizer %s and %s cannot be both set", metav1.FinalizerOrphanDependents, metav1.FinalizerDeleteDependents)))
+ }
+ return allErrs
+}
+
+// ValidateObjectMetaUpdate validates an object's metadata when updated
+func ValidateObjectMetaUpdate(newMeta, oldMeta *metav1.ObjectMeta, fldPath *field.Path) field.ErrorList {
+ newMetadata, err := meta.Accessor(newMeta)
+ if err != nil {
+ allErrs := field.ErrorList{}
+ allErrs = append(allErrs, field.Invalid(fldPath, newMeta, err.Error()))
+ return allErrs
+ }
+ oldMetadata, err := meta.Accessor(oldMeta)
+ if err != nil {
+ allErrs := field.ErrorList{}
+ allErrs = append(allErrs, field.Invalid(fldPath, oldMeta, err.Error()))
+ return allErrs
+ }
+ return ValidateObjectMetaAccessorUpdate(newMetadata, oldMetadata, fldPath)
+}
+
+func ValidateObjectMetaAccessorUpdate(newMeta, oldMeta metav1.Object, fldPath *field.Path) field.ErrorList {
+ var allErrs field.ErrorList
+
+ if !RepairMalformedUpdates && newMeta.GetUID() != oldMeta.GetUID() {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("uid"), newMeta.GetUID(), "field is immutable"))
+ }
+ // in the event it is left empty, set it, to allow clients more flexibility
+ // TODO: remove the following code that repairs the update request when we retire the clients that modify the immutable fields.
+ // Please do not copy this pattern elsewhere; validation functions should not be modifying the objects they are passed!
+ if RepairMalformedUpdates {
+ if len(newMeta.GetUID()) == 0 {
+ newMeta.SetUID(oldMeta.GetUID())
+ }
+ // ignore changes to timestamp
+ if oldCreationTime := oldMeta.GetCreationTimestamp(); oldCreationTime.IsZero() {
+ oldMeta.SetCreationTimestamp(newMeta.GetCreationTimestamp())
+ } else {
+ newMeta.SetCreationTimestamp(oldMeta.GetCreationTimestamp())
+ }
+ // an object can never remove a deletion timestamp or clear/change grace period seconds
+ if !oldMeta.GetDeletionTimestamp().IsZero() {
+ newMeta.SetDeletionTimestamp(oldMeta.GetDeletionTimestamp())
+ }
+ if oldMeta.GetDeletionGracePeriodSeconds() != nil && newMeta.GetDeletionGracePeriodSeconds() == nil {
+ newMeta.SetDeletionGracePeriodSeconds(oldMeta.GetDeletionGracePeriodSeconds())
+ }
+ }
+
+ // TODO: needs to check if newMeta==nil && oldMeta !=nil after the repair logic is removed.
+ if newMeta.GetDeletionGracePeriodSeconds() != nil && (oldMeta.GetDeletionGracePeriodSeconds() == nil || *newMeta.GetDeletionGracePeriodSeconds() != *oldMeta.GetDeletionGracePeriodSeconds()) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("deletionGracePeriodSeconds"), newMeta.GetDeletionGracePeriodSeconds(), "field is immutable; may only be changed via deletion"))
+ }
+ if newMeta.GetDeletionTimestamp() != nil && (oldMeta.GetDeletionTimestamp() == nil || !newMeta.GetDeletionTimestamp().Equal(*oldMeta.GetDeletionTimestamp())) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("deletionTimestamp"), newMeta.GetDeletionTimestamp(), "field is immutable; may only be changed via deletion"))
+ }
+
+ // Finalizers cannot be added if the object is already being deleted.
+ if oldMeta.GetDeletionTimestamp() != nil {
+ allErrs = append(allErrs, ValidateNoNewFinalizers(newMeta.GetFinalizers(), oldMeta.GetFinalizers(), fldPath.Child("finalizers"))...)
+ }
+
+ // Reject updates that don't specify a resource version
+ if len(newMeta.GetResourceVersion()) == 0 {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("resourceVersion"), newMeta.GetResourceVersion(), "must be specified for an update"))
+ }
+
+ // Generation shouldn't be decremented
+ if newMeta.GetGeneration() < oldMeta.GetGeneration() {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("generation"), newMeta.GetGeneration(), "must not be decremented"))
+ }
+
+ allErrs = append(allErrs, ValidateInitializersUpdate(newMeta.GetInitializers(), oldMeta.GetInitializers(), fldPath.Child("initializers"))...)
+
+ allErrs = append(allErrs, ValidateImmutableField(newMeta.GetName(), oldMeta.GetName(), fldPath.Child("name"))...)
+ allErrs = append(allErrs, ValidateImmutableField(newMeta.GetNamespace(), oldMeta.GetNamespace(), fldPath.Child("namespace"))...)
+ allErrs = append(allErrs, ValidateImmutableField(newMeta.GetUID(), oldMeta.GetUID(), fldPath.Child("uid"))...)
+ allErrs = append(allErrs, ValidateImmutableField(newMeta.GetCreationTimestamp(), oldMeta.GetCreationTimestamp(), fldPath.Child("creationTimestamp"))...)
+ allErrs = append(allErrs, ValidateImmutableField(newMeta.GetClusterName(), oldMeta.GetClusterName(), fldPath.Child("clusterName"))...)
+
+ allErrs = append(allErrs, v1validation.ValidateLabels(newMeta.GetLabels(), fldPath.Child("labels"))...)
+ allErrs = append(allErrs, ValidateAnnotations(newMeta.GetAnnotations(), fldPath.Child("annotations"))...)
+ allErrs = append(allErrs, ValidateOwnerReferences(newMeta.GetOwnerReferences(), fldPath.Child("ownerReferences"))...)
+
+ return allErrs
+}
+
+// ValidateInitializersUpdate checks the update of the metadata initializers field
+func ValidateInitializersUpdate(newInit, oldInit *metav1.Initializers, fldPath *field.Path) field.ErrorList {
+ var allErrs field.ErrorList
+ switch {
+ case oldInit == nil && newInit != nil:
+ // Initializers may not be set on new objects
+ allErrs = append(allErrs, field.Invalid(fldPath, nil, "field is immutable once initialization has completed"))
+ case oldInit != nil && newInit == nil:
+ // this is a valid transition and means initialization was successful
+ case oldInit != nil && newInit != nil:
+ // validate changes to initializers
+ switch {
+ case oldInit.Result == nil && newInit.Result != nil:
+ // setting a result is allowed
+ allErrs = append(allErrs, validateInitializersResult(newInit.Result, fldPath.Child("result"))...)
+ case oldInit.Result != nil:
+ // setting Result implies permanent failure, and all future updates will be prevented
+ allErrs = append(allErrs, ValidateImmutableField(newInit.Result, oldInit.Result, fldPath.Child("result"))...)
+ default:
+ // leaving the result nil is allowed
+ }
+ }
+ return allErrs
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/apimachinery/announced/announced.go b/vendor/k8s.io/apimachinery/pkg/apimachinery/announced/announced.go
new file mode 100644
index 000000000..2c8568c1f
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apimachinery/announced/announced.go
@@ -0,0 +1,99 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package announced contains tools for announcing API group factories. This is
+// distinct from registration (in the 'registered' package) in that it's safe
+// to announce every possible group linked in, but only groups requested at
+// runtime should be registered. This package contains both a registry, and
+// factory code (which was formerly copy-pasta in every install package).
+package announced
+
+import (
+ "fmt"
+
+ "k8s.io/apimachinery/pkg/apimachinery/registered"
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+// APIGroupFactoryRegistry allows for groups and versions to announce themselves,
+// which simply makes them available and doesn't take other actions. Later,
+// users of the registry can select which groups and versions they'd actually
+// like to register with an APIRegistrationManager.
+//
+// (Right now APIRegistrationManager has separate 'registration' and 'enabled'
+// concepts-- APIGroupFactory is going to take over the former function;
+// they will overlap untill the refactoring is finished.)
+//
+// The key is the group name. After initialization, this should be treated as
+// read-only. It is implemented as a map from group name to group factory, and
+// it is safe to use this knowledge to manually pick out groups to register
+// (e.g., for testing).
+type APIGroupFactoryRegistry map[string]*GroupMetaFactory
+
+func (gar APIGroupFactoryRegistry) group(groupName string) *GroupMetaFactory {
+ gmf, ok := gar[groupName]
+ if !ok {
+ gmf = &GroupMetaFactory{VersionArgs: map[string]*GroupVersionFactoryArgs{}}
+ gar[groupName] = gmf
+ }
+ return gmf
+}
+
+// AnnounceGroupVersion adds the particular arguments for this group version to the group factory.
+func (gar APIGroupFactoryRegistry) AnnounceGroupVersion(gvf *GroupVersionFactoryArgs) error {
+ gmf := gar.group(gvf.GroupName)
+ if _, ok := gmf.VersionArgs[gvf.VersionName]; ok {
+ return fmt.Errorf("version %q in group %q has already been announced", gvf.VersionName, gvf.GroupName)
+ }
+ gmf.VersionArgs[gvf.VersionName] = gvf
+ return nil
+}
+
+// AnnounceGroup adds the group-wide arguments to the group factory.
+func (gar APIGroupFactoryRegistry) AnnounceGroup(args *GroupMetaFactoryArgs) error {
+ gmf := gar.group(args.GroupName)
+ if gmf.GroupArgs != nil {
+ return fmt.Errorf("group %q has already been announced", args.GroupName)
+ }
+ gmf.GroupArgs = args
+ return nil
+}
+
+// RegisterAndEnableAll throws every factory at the specified API registration
+// manager, and lets it decide which to register. (If you want to do this a la
+// cart, you may look through gar itself-- it's just a map.)
+func (gar APIGroupFactoryRegistry) RegisterAndEnableAll(m *registered.APIRegistrationManager, scheme *runtime.Scheme) error {
+ for groupName, gmf := range gar {
+ if err := gmf.Register(m); err != nil {
+ return fmt.Errorf("error registering %v: %v", groupName, err)
+ }
+ if err := gmf.Enable(m, scheme); err != nil {
+ return fmt.Errorf("error enabling %v: %v", groupName, err)
+ }
+ }
+ return nil
+}
+
+// AnnouncePreconstructedFactory announces a factory which you've manually assembled.
+// You may call this instead of calling AnnounceGroup and AnnounceGroupVersion.
+func (gar APIGroupFactoryRegistry) AnnouncePreconstructedFactory(gmf *GroupMetaFactory) error {
+ name := gmf.GroupArgs.GroupName
+ if _, exists := gar[name]; exists {
+ return fmt.Errorf("the group %q has already been announced.", name)
+ }
+ gar[name] = gmf
+ return nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/apimachinery/announced/group_factory.go b/vendor/k8s.io/apimachinery/pkg/apimachinery/announced/group_factory.go
new file mode 100644
index 000000000..c469eebcd
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apimachinery/announced/group_factory.go
@@ -0,0 +1,252 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package announced
+
+import (
+ "fmt"
+
+ "github.com/golang/glog"
+
+ "k8s.io/apimachinery/pkg/api/meta"
+ "k8s.io/apimachinery/pkg/apimachinery"
+ "k8s.io/apimachinery/pkg/apimachinery/registered"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/util/sets"
+)
+
+type SchemeFunc func(*runtime.Scheme) error
+type VersionToSchemeFunc map[string]SchemeFunc
+
+// GroupVersionFactoryArgs contains all the per-version parts of a GroupMetaFactory.
+type GroupVersionFactoryArgs struct {
+ GroupName string
+ VersionName string
+
+ AddToScheme SchemeFunc
+}
+
+// GroupMetaFactoryArgs contains the group-level args of a GroupMetaFactory.
+type GroupMetaFactoryArgs struct {
+ // GroupName is the name of the API-Group
+ //
+ // example: 'servicecatalog.k8s.io'
+ GroupName string
+ VersionPreferenceOrder []string
+ // ImportPrefix is the base go package of the API-Group
+ //
+ // example: 'k8s.io/kubernetes/pkg/apis/autoscaling'
+ ImportPrefix string
+ // RootScopedKinds are resources that are not namespaced.
+ RootScopedKinds sets.String // nil is allowed
+ IgnoredKinds sets.String // nil is allowed
+
+ // May be nil if there are no internal objects.
+ AddInternalObjectsToScheme SchemeFunc
+}
+
+// NewGroupMetaFactory builds the args for you. This is for if you're
+// constructing a factory all at once and not using the registry.
+func NewGroupMetaFactory(groupArgs *GroupMetaFactoryArgs, versions VersionToSchemeFunc) *GroupMetaFactory {
+ gmf := &GroupMetaFactory{
+ GroupArgs: groupArgs,
+ VersionArgs: map[string]*GroupVersionFactoryArgs{},
+ }
+ for v, f := range versions {
+ gmf.VersionArgs[v] = &GroupVersionFactoryArgs{
+ GroupName: groupArgs.GroupName,
+ VersionName: v,
+ AddToScheme: f,
+ }
+ }
+ return gmf
+}
+
+// Announce adds this Group factory to the global factory registry. It should
+// only be called if you constructed the GroupMetaFactory yourself via
+// NewGroupMetaFactory.
+// Note that this will panic on an error, since it's expected that you'll be
+// calling this at initialization time and any error is a result of a
+// programmer importing the wrong set of packages. If this assumption doesn't
+// work for you, just call DefaultGroupFactoryRegistry.AnnouncePreconstructedFactory
+// yourself.
+func (gmf *GroupMetaFactory) Announce(groupFactoryRegistry APIGroupFactoryRegistry) *GroupMetaFactory {
+ if err := groupFactoryRegistry.AnnouncePreconstructedFactory(gmf); err != nil {
+ panic(err)
+ }
+ return gmf
+}
+
+// GroupMetaFactory has the logic for actually assembling and registering a group.
+//
+// There are two ways of obtaining one of these.
+// 1. You can announce your group and versions separately, and then let the
+// GroupFactoryRegistry assemble this object for you. (This allows group and
+// versions to be imported separately, without referencing each other, to
+// keep import trees small.)
+// 2. You can call NewGroupMetaFactory(), which is mostly a drop-in replacement
+// for the old, bad way of doing things. You can then call .Announce() to
+// announce your constructed factory to any code that would like to do
+// things the new, better way.
+//
+// Note that GroupMetaFactory actually does construct GroupMeta objects, but
+// currently it does so in a way that's very entangled with an
+// APIRegistrationManager. It's a TODO item to cleanly separate that interface.
+type GroupMetaFactory struct {
+ GroupArgs *GroupMetaFactoryArgs
+ // map of version name to version factory
+ VersionArgs map[string]*GroupVersionFactoryArgs
+
+ // assembled by Register()
+ prioritizedVersionList []schema.GroupVersion
+}
+
+// Register constructs the finalized prioritized version list and sanity checks
+// the announced group & versions. Then it calls register.
+func (gmf *GroupMetaFactory) Register(m *registered.APIRegistrationManager) error {
+ if gmf.GroupArgs == nil {
+ return fmt.Errorf("partially announced groups are not allowed, only got versions: %#v", gmf.VersionArgs)
+ }
+ if len(gmf.VersionArgs) == 0 {
+ return fmt.Errorf("group %v announced but no versions announced", gmf.GroupArgs.GroupName)
+ }
+
+ pvSet := sets.NewString(gmf.GroupArgs.VersionPreferenceOrder...)
+ if pvSet.Len() != len(gmf.GroupArgs.VersionPreferenceOrder) {
+ return fmt.Errorf("preference order for group %v has duplicates: %v", gmf.GroupArgs.GroupName, gmf.GroupArgs.VersionPreferenceOrder)
+ }
+ prioritizedVersions := []schema.GroupVersion{}
+ for _, v := range gmf.GroupArgs.VersionPreferenceOrder {
+ prioritizedVersions = append(
+ prioritizedVersions,
+ schema.GroupVersion{
+ Group: gmf.GroupArgs.GroupName,
+ Version: v,
+ },
+ )
+ }
+
+ // Go through versions that weren't explicitly prioritized.
+ unprioritizedVersions := []schema.GroupVersion{}
+ for _, v := range gmf.VersionArgs {
+ if v.GroupName != gmf.GroupArgs.GroupName {
+ return fmt.Errorf("found %v/%v in group %v?", v.GroupName, v.VersionName, gmf.GroupArgs.GroupName)
+ }
+ if pvSet.Has(v.VersionName) {
+ pvSet.Delete(v.VersionName)
+ continue
+ }
+ unprioritizedVersions = append(unprioritizedVersions, schema.GroupVersion{Group: v.GroupName, Version: v.VersionName})
+ }
+ if len(unprioritizedVersions) > 1 {
+ glog.Warningf("group %v has multiple unprioritized versions: %#v. They will have an arbitrary preference order!", gmf.GroupArgs.GroupName, unprioritizedVersions)
+ }
+ if pvSet.Len() != 0 {
+ return fmt.Errorf("group %v has versions in the priority list that were never announced: %s", gmf.GroupArgs.GroupName, pvSet)
+ }
+ prioritizedVersions = append(prioritizedVersions, unprioritizedVersions...)
+ m.RegisterVersions(prioritizedVersions)
+ gmf.prioritizedVersionList = prioritizedVersions
+ return nil
+}
+
+func (gmf *GroupMetaFactory) newRESTMapper(scheme *runtime.Scheme, externalVersions []schema.GroupVersion, groupMeta *apimachinery.GroupMeta) meta.RESTMapper {
+ // the list of kinds that are scoped at the root of the api hierarchy
+ // if a kind is not enumerated here, it is assumed to have a namespace scope
+ rootScoped := sets.NewString()
+ if gmf.GroupArgs.RootScopedKinds != nil {
+ rootScoped = gmf.GroupArgs.RootScopedKinds
+ }
+ ignoredKinds := sets.NewString()
+ if gmf.GroupArgs.IgnoredKinds != nil {
+ ignoredKinds = gmf.GroupArgs.IgnoredKinds
+ }
+
+ return meta.NewDefaultRESTMapperFromScheme(
+ externalVersions,
+ groupMeta.InterfacesFor,
+ gmf.GroupArgs.ImportPrefix,
+ ignoredKinds,
+ rootScoped,
+ scheme,
+ )
+}
+
+// Enable enables group versions that are allowed, adds methods to the scheme, etc.
+func (gmf *GroupMetaFactory) Enable(m *registered.APIRegistrationManager, scheme *runtime.Scheme) error {
+ externalVersions := []schema.GroupVersion{}
+ for _, v := range gmf.prioritizedVersionList {
+ if !m.IsAllowedVersion(v) {
+ continue
+ }
+ externalVersions = append(externalVersions, v)
+ if err := m.EnableVersions(v); err != nil {
+ return err
+ }
+ gmf.VersionArgs[v.Version].AddToScheme(scheme)
+ }
+ if len(externalVersions) == 0 {
+ glog.V(4).Infof("No version is registered for group %v", gmf.GroupArgs.GroupName)
+ return nil
+ }
+
+ if gmf.GroupArgs.AddInternalObjectsToScheme != nil {
+ gmf.GroupArgs.AddInternalObjectsToScheme(scheme)
+ }
+
+ preferredExternalVersion := externalVersions[0]
+ accessor := meta.NewAccessor()
+
+ groupMeta := &apimachinery.GroupMeta{
+ GroupVersion: preferredExternalVersion,
+ GroupVersions: externalVersions,
+ SelfLinker: runtime.SelfLinker(accessor),
+ }
+ for _, v := range externalVersions {
+ gvf := gmf.VersionArgs[v.Version]
+ if err := groupMeta.AddVersionInterfaces(
+ schema.GroupVersion{Group: gvf.GroupName, Version: gvf.VersionName},
+ &meta.VersionInterfaces{
+ ObjectConvertor: scheme,
+ MetadataAccessor: accessor,
+ },
+ ); err != nil {
+ return err
+ }
+ }
+ groupMeta.InterfacesFor = groupMeta.DefaultInterfacesFor
+ groupMeta.RESTMapper = gmf.newRESTMapper(scheme, externalVersions, groupMeta)
+
+ if err := m.RegisterGroup(*groupMeta); err != nil {
+ return err
+ }
+ return nil
+}
+
+// RegisterAndEnable is provided only to allow this code to get added in multiple steps.
+// It's really bad that this is called in init() methods, but supporting this
+// temporarily lets us do the change incrementally.
+func (gmf *GroupMetaFactory) RegisterAndEnable(registry *registered.APIRegistrationManager, scheme *runtime.Scheme) error {
+ if err := gmf.Register(registry); err != nil {
+ return err
+ }
+ if err := gmf.Enable(registry, scheme); err != nil {
+ return err
+ }
+
+ return nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/apimachinery/doc.go b/vendor/k8s.io/apimachinery/pkg/apimachinery/doc.go
new file mode 100644
index 000000000..b238454b2
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apimachinery/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package apimachinery contains the generic API machinery code that
+// is common to both server and clients.
+// This package should never import specific API objects.
+package apimachinery // import "k8s.io/apimachinery/pkg/apimachinery"
diff --git a/vendor/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go b/vendor/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go
new file mode 100644
index 000000000..f2e32c88c
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go
@@ -0,0 +1,376 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package to keep track of API Versions that can be registered and are enabled in api.Scheme.
+package registered
+
+import (
+ "fmt"
+ "sort"
+ "strings"
+
+ "github.com/golang/glog"
+
+ "k8s.io/apimachinery/pkg/api/meta"
+ "k8s.io/apimachinery/pkg/apimachinery"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/util/sets"
+)
+
+// APIRegistrationManager provides the concept of what API groups are enabled.
+//
+// TODO: currently, it also provides a "registered" concept. But it's wrong to
+// have both concepts in the same object. Therefore the "announced" package is
+// going to take over the registered concept. After all the install packages
+// are switched to using the announce package instead of this package, then we
+// can combine the registered/enabled concepts in this object. Simplifying this
+// isn't easy right now because there are so many callers of this package.
+type APIRegistrationManager struct {
+ // registeredGroupVersions stores all API group versions for which RegisterGroup is called.
+ registeredVersions map[schema.GroupVersion]struct{}
+
+ // thirdPartyGroupVersions are API versions which are dynamically
+ // registered (and unregistered) via API calls to the apiserver
+ thirdPartyGroupVersions []schema.GroupVersion
+
+ // enabledVersions represents all enabled API versions. It should be a
+ // subset of registeredVersions. Please call EnableVersions() to add
+ // enabled versions.
+ enabledVersions map[schema.GroupVersion]struct{}
+
+ // map of group meta for all groups.
+ groupMetaMap map[string]*apimachinery.GroupMeta
+
+ // envRequestedVersions represents the versions requested via the
+ // KUBE_API_VERSIONS environment variable. The install package of each group
+ // checks this list before add their versions to the latest package and
+ // Scheme. This list is small and order matters, so represent as a slice
+ envRequestedVersions []schema.GroupVersion
+}
+
+// NewAPIRegistrationManager constructs a new manager. The argument ought to be
+// the value of the KUBE_API_VERSIONS env var, or a value of this which you
+// wish to test.
+func NewAPIRegistrationManager(kubeAPIVersions string) (*APIRegistrationManager, error) {
+ m := &APIRegistrationManager{
+ registeredVersions: map[schema.GroupVersion]struct{}{},
+ thirdPartyGroupVersions: []schema.GroupVersion{},
+ enabledVersions: map[schema.GroupVersion]struct{}{},
+ groupMetaMap: map[string]*apimachinery.GroupMeta{},
+ envRequestedVersions: []schema.GroupVersion{},
+ }
+
+ if len(kubeAPIVersions) != 0 {
+ for _, version := range strings.Split(kubeAPIVersions, ",") {
+ gv, err := schema.ParseGroupVersion(version)
+ if err != nil {
+ return nil, fmt.Errorf("invalid api version: %s in KUBE_API_VERSIONS: %s.",
+ version, kubeAPIVersions)
+ }
+ m.envRequestedVersions = append(m.envRequestedVersions, gv)
+ }
+ }
+ return m, nil
+}
+
+func NewOrDie(kubeAPIVersions string) *APIRegistrationManager {
+ m, err := NewAPIRegistrationManager(kubeAPIVersions)
+ if err != nil {
+ glog.Fatalf("Could not construct version manager: %v (KUBE_API_VERSIONS=%q)", err, kubeAPIVersions)
+ }
+ return m
+}
+
+// RegisterVersions adds the given group versions to the list of registered group versions.
+func (m *APIRegistrationManager) RegisterVersions(availableVersions []schema.GroupVersion) {
+ for _, v := range availableVersions {
+ m.registeredVersions[v] = struct{}{}
+ }
+}
+
+// RegisterGroup adds the given group to the list of registered groups.
+func (m *APIRegistrationManager) RegisterGroup(groupMeta apimachinery.GroupMeta) error {
+ groupName := groupMeta.GroupVersion.Group
+ if _, found := m.groupMetaMap[groupName]; found {
+ return fmt.Errorf("group %q is already registered in groupsMap: %v", groupName, m.groupMetaMap)
+ }
+ m.groupMetaMap[groupName] = &groupMeta
+ return nil
+}
+
+// EnableVersions adds the versions for the given group to the list of enabled versions.
+// Note that the caller should call RegisterGroup before calling this method.
+// The caller of this function is responsible to add the versions to scheme and RESTMapper.
+func (m *APIRegistrationManager) EnableVersions(versions ...schema.GroupVersion) error {
+ var unregisteredVersions []schema.GroupVersion
+ for _, v := range versions {
+ if _, found := m.registeredVersions[v]; !found {
+ unregisteredVersions = append(unregisteredVersions, v)
+ }
+ m.enabledVersions[v] = struct{}{}
+ }
+ if len(unregisteredVersions) != 0 {
+ return fmt.Errorf("Please register versions before enabling them: %v", unregisteredVersions)
+ }
+ return nil
+}
+
+// IsAllowedVersion returns if the version is allowed by the KUBE_API_VERSIONS
+// environment variable. If the environment variable is empty, then it always
+// returns true.
+func (m *APIRegistrationManager) IsAllowedVersion(v schema.GroupVersion) bool {
+ if len(m.envRequestedVersions) == 0 {
+ return true
+ }
+ for _, envGV := range m.envRequestedVersions {
+ if v == envGV {
+ return true
+ }
+ }
+ return false
+}
+
+// IsEnabledVersion returns if a version is enabled.
+func (m *APIRegistrationManager) IsEnabledVersion(v schema.GroupVersion) bool {
+ _, found := m.enabledVersions[v]
+ return found
+}
+
+// EnabledVersions returns all enabled versions. Groups are randomly ordered, but versions within groups
+// are priority order from best to worst
+func (m *APIRegistrationManager) EnabledVersions() []schema.GroupVersion {
+ ret := []schema.GroupVersion{}
+ for _, groupMeta := range m.groupMetaMap {
+ for _, version := range groupMeta.GroupVersions {
+ if m.IsEnabledVersion(version) {
+ ret = append(ret, version)
+ }
+ }
+ }
+ return ret
+}
+
+// EnabledVersionsForGroup returns all enabled versions for a group in order of best to worst
+func (m *APIRegistrationManager) EnabledVersionsForGroup(group string) []schema.GroupVersion {
+ groupMeta, ok := m.groupMetaMap[group]
+ if !ok {
+ return []schema.GroupVersion{}
+ }
+
+ ret := []schema.GroupVersion{}
+ for _, version := range groupMeta.GroupVersions {
+ if m.IsEnabledVersion(version) {
+ ret = append(ret, version)
+ }
+ }
+ return ret
+}
+
+// Group returns the metadata of a group if the group is registered, otherwise
+// an error is returned.
+func (m *APIRegistrationManager) Group(group string) (*apimachinery.GroupMeta, error) {
+ groupMeta, found := m.groupMetaMap[group]
+ if !found {
+ return nil, fmt.Errorf("group %v has not been registered", group)
+ }
+ groupMetaCopy := *groupMeta
+ return &groupMetaCopy, nil
+}
+
+// IsRegistered takes a string and determines if it's one of the registered groups
+func (m *APIRegistrationManager) IsRegistered(group string) bool {
+ _, found := m.groupMetaMap[group]
+ return found
+}
+
+// IsRegisteredVersion returns if a version is registered.
+func (m *APIRegistrationManager) IsRegisteredVersion(v schema.GroupVersion) bool {
+ _, found := m.registeredVersions[v]
+ return found
+}
+
+// RegisteredGroupVersions returns all registered group versions.
+func (m *APIRegistrationManager) RegisteredGroupVersions() []schema.GroupVersion {
+ ret := []schema.GroupVersion{}
+ for groupVersion := range m.registeredVersions {
+ ret = append(ret, groupVersion)
+ }
+ return ret
+}
+
+// IsThirdPartyAPIGroupVersion returns true if the api version is a user-registered group/version.
+func (m *APIRegistrationManager) IsThirdPartyAPIGroupVersion(gv schema.GroupVersion) bool {
+ for ix := range m.thirdPartyGroupVersions {
+ if m.thirdPartyGroupVersions[ix] == gv {
+ return true
+ }
+ }
+ return false
+}
+
+// AddThirdPartyAPIGroupVersions sets the list of third party versions,
+// registers them in the API machinery and enables them.
+// Skips GroupVersions that are already registered.
+// Returns the list of GroupVersions that were skipped.
+func (m *APIRegistrationManager) AddThirdPartyAPIGroupVersions(gvs ...schema.GroupVersion) []schema.GroupVersion {
+ filteredGVs := []schema.GroupVersion{}
+ skippedGVs := []schema.GroupVersion{}
+ for ix := range gvs {
+ if !m.IsRegisteredVersion(gvs[ix]) {
+ filteredGVs = append(filteredGVs, gvs[ix])
+ } else {
+ glog.V(3).Infof("Skipping %s, because its already registered", gvs[ix].String())
+ skippedGVs = append(skippedGVs, gvs[ix])
+ }
+ }
+ if len(filteredGVs) == 0 {
+ return skippedGVs
+ }
+ m.RegisterVersions(filteredGVs)
+ m.EnableVersions(filteredGVs...)
+ m.thirdPartyGroupVersions = append(m.thirdPartyGroupVersions, filteredGVs...)
+
+ return skippedGVs
+}
+
+// InterfacesFor is a union meta.VersionInterfacesFunc func for all registered types
+func (m *APIRegistrationManager) InterfacesFor(version schema.GroupVersion) (*meta.VersionInterfaces, error) {
+ groupMeta, err := m.Group(version.Group)
+ if err != nil {
+ return nil, err
+ }
+ return groupMeta.InterfacesFor(version)
+}
+
+// TODO: This is an expedient function, because we don't check if a Group is
+// supported throughout the code base. We will abandon this function and
+// checking the error returned by the Group() function.
+func (m *APIRegistrationManager) GroupOrDie(group string) *apimachinery.GroupMeta {
+ groupMeta, found := m.groupMetaMap[group]
+ if !found {
+ if group == "" {
+ panic("The legacy v1 API is not registered.")
+ } else {
+ panic(fmt.Sprintf("Group %s is not registered.", group))
+ }
+ }
+ groupMetaCopy := *groupMeta
+ return &groupMetaCopy
+}
+
+// RESTMapper returns a union RESTMapper of all known types with priorities chosen in the following order:
+// 1. if KUBE_API_VERSIONS is specified, then KUBE_API_VERSIONS in order, OR
+// 1. legacy kube group preferred version, extensions preferred version, metrics perferred version, legacy
+// kube any version, extensions any version, metrics any version, all other groups alphabetical preferred version,
+// all other groups alphabetical.
+func (m *APIRegistrationManager) RESTMapper(versionPatterns ...schema.GroupVersion) meta.RESTMapper {
+ unionMapper := meta.MultiRESTMapper{}
+ unionedGroups := sets.NewString()
+ for enabledVersion := range m.enabledVersions {
+ if !unionedGroups.Has(enabledVersion.Group) {
+ unionedGroups.Insert(enabledVersion.Group)
+ groupMeta := m.groupMetaMap[enabledVersion.Group]
+ unionMapper = append(unionMapper, groupMeta.RESTMapper)
+ }
+ }
+
+ if len(versionPatterns) != 0 {
+ resourcePriority := []schema.GroupVersionResource{}
+ kindPriority := []schema.GroupVersionKind{}
+ for _, versionPriority := range versionPatterns {
+ resourcePriority = append(resourcePriority, versionPriority.WithResource(meta.AnyResource))
+ kindPriority = append(kindPriority, versionPriority.WithKind(meta.AnyKind))
+ }
+
+ return meta.PriorityRESTMapper{Delegate: unionMapper, ResourcePriority: resourcePriority, KindPriority: kindPriority}
+ }
+
+ if len(m.envRequestedVersions) != 0 {
+ resourcePriority := []schema.GroupVersionResource{}
+ kindPriority := []schema.GroupVersionKind{}
+
+ for _, versionPriority := range m.envRequestedVersions {
+ resourcePriority = append(resourcePriority, versionPriority.WithResource(meta.AnyResource))
+ kindPriority = append(kindPriority, versionPriority.WithKind(meta.AnyKind))
+ }
+
+ return meta.PriorityRESTMapper{Delegate: unionMapper, ResourcePriority: resourcePriority, KindPriority: kindPriority}
+ }
+
+ prioritizedGroups := []string{"", "extensions", "metrics"}
+ resourcePriority, kindPriority := m.prioritiesForGroups(prioritizedGroups...)
+
+ prioritizedGroupsSet := sets.NewString(prioritizedGroups...)
+ remainingGroups := sets.String{}
+ for enabledVersion := range m.enabledVersions {
+ if !prioritizedGroupsSet.Has(enabledVersion.Group) {
+ remainingGroups.Insert(enabledVersion.Group)
+ }
+ }
+
+ remainingResourcePriority, remainingKindPriority := m.prioritiesForGroups(remainingGroups.List()...)
+ resourcePriority = append(resourcePriority, remainingResourcePriority...)
+ kindPriority = append(kindPriority, remainingKindPriority...)
+
+ return meta.PriorityRESTMapper{Delegate: unionMapper, ResourcePriority: resourcePriority, KindPriority: kindPriority}
+}
+
+// prioritiesForGroups returns the resource and kind priorities for a PriorityRESTMapper, preferring the preferred version of each group first,
+// then any non-preferred version of the group second.
+func (m *APIRegistrationManager) prioritiesForGroups(groups ...string) ([]schema.GroupVersionResource, []schema.GroupVersionKind) {
+ resourcePriority := []schema.GroupVersionResource{}
+ kindPriority := []schema.GroupVersionKind{}
+
+ for _, group := range groups {
+ availableVersions := m.EnabledVersionsForGroup(group)
+ if len(availableVersions) > 0 {
+ resourcePriority = append(resourcePriority, availableVersions[0].WithResource(meta.AnyResource))
+ kindPriority = append(kindPriority, availableVersions[0].WithKind(meta.AnyKind))
+ }
+ }
+ for _, group := range groups {
+ resourcePriority = append(resourcePriority, schema.GroupVersionResource{Group: group, Version: meta.AnyVersion, Resource: meta.AnyResource})
+ kindPriority = append(kindPriority, schema.GroupVersionKind{Group: group, Version: meta.AnyVersion, Kind: meta.AnyKind})
+ }
+
+ return resourcePriority, kindPriority
+}
+
+// AllPreferredGroupVersions returns the preferred versions of all registered
+// groups in the form of "group1/version1,group2/version2,..."
+func (m *APIRegistrationManager) AllPreferredGroupVersions() string {
+ if len(m.groupMetaMap) == 0 {
+ return ""
+ }
+ var defaults []string
+ for _, groupMeta := range m.groupMetaMap {
+ defaults = append(defaults, groupMeta.GroupVersion.String())
+ }
+ sort.Strings(defaults)
+ return strings.Join(defaults, ",")
+}
+
+// ValidateEnvRequestedVersions returns a list of versions that are requested in
+// the KUBE_API_VERSIONS environment variable, but not enabled.
+func (m *APIRegistrationManager) ValidateEnvRequestedVersions() []schema.GroupVersion {
+ var missingVersions []schema.GroupVersion
+ for _, v := range m.envRequestedVersions {
+ if _, found := m.enabledVersions[v]; !found {
+ missingVersions = append(missingVersions, v)
+ }
+ }
+ return missingVersions
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/apimachinery/types.go b/vendor/k8s.io/apimachinery/pkg/apimachinery/types.go
new file mode 100644
index 000000000..213e34bc0
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apimachinery/types.go
@@ -0,0 +1,87 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package apimachinery
+
+import (
+ "fmt"
+
+ "k8s.io/apimachinery/pkg/api/meta"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupMeta stores the metadata of a group.
+type GroupMeta struct {
+ // GroupVersion represents the preferred version of the group.
+ GroupVersion schema.GroupVersion
+
+ // GroupVersions is Group + all versions in that group.
+ GroupVersions []schema.GroupVersion
+
+ // SelfLinker can set or get the SelfLink field of all API types.
+ // TODO: when versioning changes, make this part of each API definition.
+ // TODO(lavalamp): Combine SelfLinker & ResourceVersioner interfaces, force all uses
+ // to go through the InterfacesFor method below.
+ SelfLinker runtime.SelfLinker
+
+ // RESTMapper provides the default mapping between REST paths and the objects declared in api.Scheme and all known
+ // versions.
+ RESTMapper meta.RESTMapper
+
+ // InterfacesFor returns the default Codec and ResourceVersioner for a given version
+ // string, or an error if the version is not known.
+ // TODO: make this stop being a func pointer and always use the default
+ // function provided below once every place that populates this field has been changed.
+ InterfacesFor func(version schema.GroupVersion) (*meta.VersionInterfaces, error)
+
+ // InterfacesByVersion stores the per-version interfaces.
+ InterfacesByVersion map[schema.GroupVersion]*meta.VersionInterfaces
+}
+
+// DefaultInterfacesFor returns the default Codec and ResourceVersioner for a given version
+// string, or an error if the version is not known.
+// TODO: Remove the "Default" prefix.
+func (gm *GroupMeta) DefaultInterfacesFor(version schema.GroupVersion) (*meta.VersionInterfaces, error) {
+ if v, ok := gm.InterfacesByVersion[version]; ok {
+ return v, nil
+ }
+ return nil, fmt.Errorf("unsupported storage version: %s (valid: %v)", version, gm.GroupVersions)
+}
+
+// AddVersionInterfaces adds the given version to the group. Only call during
+// init, after that GroupMeta objects should be immutable. Not thread safe.
+// (If you use this, be sure to set .InterfacesFor = .DefaultInterfacesFor)
+// TODO: remove the "Interfaces" suffix and make this also maintain the
+// .GroupVersions member.
+func (gm *GroupMeta) AddVersionInterfaces(version schema.GroupVersion, interfaces *meta.VersionInterfaces) error {
+ if e, a := gm.GroupVersion.Group, version.Group; a != e {
+ return fmt.Errorf("got a version in group %v, but am in group %v", a, e)
+ }
+ if gm.InterfacesByVersion == nil {
+ gm.InterfacesByVersion = make(map[schema.GroupVersion]*meta.VersionInterfaces)
+ }
+ gm.InterfacesByVersion[version] = interfaces
+
+ // TODO: refactor to make the below error not possible, this function
+ // should *set* GroupVersions rather than depend on it.
+ for _, v := range gm.GroupVersions {
+ if v == version {
+ return nil
+ }
+ }
+ return fmt.Errorf("added a version interface without the corresponding version %v being in the list %#v", version, gm.GroupVersions)
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/conversion.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/conversion.go
new file mode 100644
index 000000000..b9a8fd02d
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/conversion.go
@@ -0,0 +1,264 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "fmt"
+ "strconv"
+ "strings"
+
+ "k8s.io/apimachinery/pkg/api/resource"
+ "k8s.io/apimachinery/pkg/conversion"
+ "k8s.io/apimachinery/pkg/fields"
+ "k8s.io/apimachinery/pkg/labels"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/intstr"
+)
+
+func AddConversionFuncs(scheme *runtime.Scheme) error {
+ return scheme.AddConversionFuncs(
+ Convert_v1_TypeMeta_To_v1_TypeMeta,
+
+ Convert_unversioned_ListMeta_To_unversioned_ListMeta,
+
+ Convert_intstr_IntOrString_To_intstr_IntOrString,
+
+ Convert_unversioned_Time_To_unversioned_Time,
+
+ Convert_Slice_string_To_unversioned_Time,
+
+ Convert_resource_Quantity_To_resource_Quantity,
+
+ Convert_string_To_labels_Selector,
+ Convert_labels_Selector_To_string,
+
+ Convert_string_To_fields_Selector,
+ Convert_fields_Selector_To_string,
+
+ Convert_Pointer_bool_To_bool,
+ Convert_bool_To_Pointer_bool,
+
+ Convert_Pointer_string_To_string,
+ Convert_string_To_Pointer_string,
+
+ Convert_Pointer_int64_To_int,
+ Convert_int_To_Pointer_int64,
+
+ Convert_Pointer_int32_To_int32,
+ Convert_int32_To_Pointer_int32,
+
+ Convert_Pointer_float64_To_float64,
+ Convert_float64_To_Pointer_float64,
+
+ Convert_map_to_unversioned_LabelSelector,
+ Convert_unversioned_LabelSelector_to_map,
+
+ Convert_Slice_string_To_Slice_int32,
+ )
+}
+
+func Convert_Pointer_float64_To_float64(in **float64, out *float64, s conversion.Scope) error {
+ if *in == nil {
+ *out = 0
+ return nil
+ }
+ *out = float64(**in)
+ return nil
+}
+
+func Convert_float64_To_Pointer_float64(in *float64, out **float64, s conversion.Scope) error {
+ temp := float64(*in)
+ *out = &temp
+ return nil
+}
+
+func Convert_Pointer_int32_To_int32(in **int32, out *int32, s conversion.Scope) error {
+ if *in == nil {
+ *out = 0
+ return nil
+ }
+ *out = int32(**in)
+ return nil
+}
+
+func Convert_int32_To_Pointer_int32(in *int32, out **int32, s conversion.Scope) error {
+ temp := int32(*in)
+ *out = &temp
+ return nil
+}
+
+func Convert_Pointer_int64_To_int(in **int64, out *int, s conversion.Scope) error {
+ if *in == nil {
+ *out = 0
+ return nil
+ }
+ *out = int(**in)
+ return nil
+}
+
+func Convert_int_To_Pointer_int64(in *int, out **int64, s conversion.Scope) error {
+ temp := int64(*in)
+ *out = &temp
+ return nil
+}
+
+func Convert_Pointer_string_To_string(in **string, out *string, s conversion.Scope) error {
+ if *in == nil {
+ *out = ""
+ return nil
+ }
+ *out = **in
+ return nil
+}
+
+func Convert_string_To_Pointer_string(in *string, out **string, s conversion.Scope) error {
+ if in == nil {
+ stringVar := ""
+ *out = &stringVar
+ return nil
+ }
+ *out = in
+ return nil
+}
+
+func Convert_Pointer_bool_To_bool(in **bool, out *bool, s conversion.Scope) error {
+ if *in == nil {
+ *out = false
+ return nil
+ }
+ *out = **in
+ return nil
+}
+
+func Convert_bool_To_Pointer_bool(in *bool, out **bool, s conversion.Scope) error {
+ if in == nil {
+ boolVar := false
+ *out = &boolVar
+ return nil
+ }
+ *out = in
+ return nil
+}
+
+// +k8s:conversion-fn=drop
+func Convert_v1_TypeMeta_To_v1_TypeMeta(in, out *TypeMeta, s conversion.Scope) error {
+ // These values are explicitly not copied
+ //out.APIVersion = in.APIVersion
+ //out.Kind = in.Kind
+ return nil
+}
+
+// +k8s:conversion-fn=copy-only
+func Convert_unversioned_ListMeta_To_unversioned_ListMeta(in, out *ListMeta, s conversion.Scope) error {
+ *out = *in
+ return nil
+}
+
+// +k8s:conversion-fn=copy-only
+func Convert_intstr_IntOrString_To_intstr_IntOrString(in, out *intstr.IntOrString, s conversion.Scope) error {
+ *out = *in
+ return nil
+}
+
+// +k8s:conversion-fn=copy-only
+func Convert_unversioned_Time_To_unversioned_Time(in *Time, out *Time, s conversion.Scope) error {
+ // Cannot deep copy these, because time.Time has unexported fields.
+ *out = *in
+ return nil
+}
+
+// Convert_Slice_string_To_unversioned_Time allows converting a URL query parameter value
+func Convert_Slice_string_To_unversioned_Time(input *[]string, out *Time, s conversion.Scope) error {
+ str := ""
+ if len(*input) > 0 {
+ str = (*input)[0]
+ }
+ return out.UnmarshalQueryParameter(str)
+}
+
+func Convert_string_To_labels_Selector(in *string, out *labels.Selector, s conversion.Scope) error {
+ selector, err := labels.Parse(*in)
+ if err != nil {
+ return err
+ }
+ *out = selector
+ return nil
+}
+
+func Convert_string_To_fields_Selector(in *string, out *fields.Selector, s conversion.Scope) error {
+ selector, err := fields.ParseSelector(*in)
+ if err != nil {
+ return err
+ }
+ *out = selector
+ return nil
+}
+
+func Convert_labels_Selector_To_string(in *labels.Selector, out *string, s conversion.Scope) error {
+ if *in == nil {
+ return nil
+ }
+ *out = (*in).String()
+ return nil
+}
+
+func Convert_fields_Selector_To_string(in *fields.Selector, out *string, s conversion.Scope) error {
+ if *in == nil {
+ return nil
+ }
+ *out = (*in).String()
+ return nil
+}
+
+// +k8s:conversion-fn=copy-only
+func Convert_resource_Quantity_To_resource_Quantity(in *resource.Quantity, out *resource.Quantity, s conversion.Scope) error {
+ *out = *in
+ return nil
+}
+
+func Convert_map_to_unversioned_LabelSelector(in *map[string]string, out *LabelSelector, s conversion.Scope) error {
+ if in == nil {
+ return nil
+ }
+ out = new(LabelSelector)
+ for labelKey, labelValue := range *in {
+ AddLabelToSelector(out, labelKey, labelValue)
+ }
+ return nil
+}
+
+func Convert_unversioned_LabelSelector_to_map(in *LabelSelector, out *map[string]string, s conversion.Scope) error {
+ var err error
+ *out, err = LabelSelectorAsMap(in)
+ return err
+}
+
+// Convert_Slice_string_To_Slice_int32 converts multiple query parameters or
+// a single query parameter with a comma delimited value to multiple int32.
+// This is used for port forwarding which needs the ports as int32.
+func Convert_Slice_string_To_Slice_int32(in *[]string, out *[]int32, s conversion.Scope) error {
+ for _, s := range *in {
+ for _, v := range strings.Split(s, ",") {
+ x, err := strconv.ParseUint(v, 10, 16)
+ if err != nil {
+ return fmt.Errorf("cannot convert to []int32: %v", err)
+ }
+ *out = append(*out, int32(x))
+ }
+ }
+ return nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/doc.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/doc.go
new file mode 100644
index 000000000..52273240f
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/doc.go
@@ -0,0 +1,22 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package
+// +k8s:openapi-gen=true
+// +k8s:defaulter-gen=TypeMeta
+
+// +groupName=meta.k8s.io
+package v1
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go
new file mode 100644
index 000000000..fea458dfb
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go
@@ -0,0 +1,47 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "encoding/json"
+ "time"
+)
+
+// Duration is a wrapper around time.Duration which supports correct
+// marshaling to YAML and JSON. In particular, it marshals into strings, which
+// can be used as map keys in json.
+type Duration struct {
+ time.Duration `protobuf:"varint,1,opt,name=duration,casttype=time.Duration"`
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface.
+func (d *Duration) UnmarshalJSON(b []byte) error {
+ var str string
+ json.Unmarshal(b, &str)
+
+ pd, err := time.ParseDuration(str)
+ if err != nil {
+ return err
+ }
+ d.Duration = pd
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaler interface.
+func (d Duration) MarshalJSON() ([]byte, error) {
+ return json.Marshal(d.Duration.String())
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go
new file mode 100644
index 000000000..9e2b289da
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go
@@ -0,0 +1,7516 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto
+
+ It has these top-level messages:
+ APIGroup
+ APIGroupList
+ APIResource
+ APIResourceList
+ APIVersions
+ DeleteOptions
+ Duration
+ ExportOptions
+ GetOptions
+ GroupKind
+ GroupResource
+ GroupVersion
+ GroupVersionForDiscovery
+ GroupVersionKind
+ GroupVersionResource
+ Initializer
+ Initializers
+ LabelSelector
+ LabelSelectorRequirement
+ ListMeta
+ ListOptions
+ MicroTime
+ ObjectMeta
+ OwnerReference
+ Preconditions
+ RootPaths
+ ServerAddressByClientCIDR
+ Status
+ StatusCause
+ StatusDetails
+ Time
+ Timestamp
+ TypeMeta
+ Verbs
+ WatchEvent
+*/
+package v1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import time "time"
+import k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types"
+
+import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+var _ = time.Kitchen
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *APIGroup) Reset() { *m = APIGroup{} }
+func (*APIGroup) ProtoMessage() {}
+func (*APIGroup) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *APIGroupList) Reset() { *m = APIGroupList{} }
+func (*APIGroupList) ProtoMessage() {}
+func (*APIGroupList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *APIResource) Reset() { *m = APIResource{} }
+func (*APIResource) ProtoMessage() {}
+func (*APIResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
+
+func (m *APIResourceList) Reset() { *m = APIResourceList{} }
+func (*APIResourceList) ProtoMessage() {}
+func (*APIResourceList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
+
+func (m *APIVersions) Reset() { *m = APIVersions{} }
+func (*APIVersions) ProtoMessage() {}
+func (*APIVersions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
+
+func (m *DeleteOptions) Reset() { *m = DeleteOptions{} }
+func (*DeleteOptions) ProtoMessage() {}
+func (*DeleteOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
+
+func (m *Duration) Reset() { *m = Duration{} }
+func (*Duration) ProtoMessage() {}
+func (*Duration) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
+
+func (m *ExportOptions) Reset() { *m = ExportOptions{} }
+func (*ExportOptions) ProtoMessage() {}
+func (*ExportOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
+
+func (m *GetOptions) Reset() { *m = GetOptions{} }
+func (*GetOptions) ProtoMessage() {}
+func (*GetOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
+
+func (m *GroupKind) Reset() { *m = GroupKind{} }
+func (*GroupKind) ProtoMessage() {}
+func (*GroupKind) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
+
+func (m *GroupResource) Reset() { *m = GroupResource{} }
+func (*GroupResource) ProtoMessage() {}
+func (*GroupResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
+
+func (m *GroupVersion) Reset() { *m = GroupVersion{} }
+func (*GroupVersion) ProtoMessage() {}
+func (*GroupVersion) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} }
+
+func (m *GroupVersionForDiscovery) Reset() { *m = GroupVersionForDiscovery{} }
+func (*GroupVersionForDiscovery) ProtoMessage() {}
+func (*GroupVersionForDiscovery) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{12}
+}
+
+func (m *GroupVersionKind) Reset() { *m = GroupVersionKind{} }
+func (*GroupVersionKind) ProtoMessage() {}
+func (*GroupVersionKind) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} }
+
+func (m *GroupVersionResource) Reset() { *m = GroupVersionResource{} }
+func (*GroupVersionResource) ProtoMessage() {}
+func (*GroupVersionResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} }
+
+func (m *Initializer) Reset() { *m = Initializer{} }
+func (*Initializer) ProtoMessage() {}
+func (*Initializer) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} }
+
+func (m *Initializers) Reset() { *m = Initializers{} }
+func (*Initializers) ProtoMessage() {}
+func (*Initializers) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} }
+
+func (m *LabelSelector) Reset() { *m = LabelSelector{} }
+func (*LabelSelector) ProtoMessage() {}
+func (*LabelSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} }
+
+func (m *LabelSelectorRequirement) Reset() { *m = LabelSelectorRequirement{} }
+func (*LabelSelectorRequirement) ProtoMessage() {}
+func (*LabelSelectorRequirement) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{18}
+}
+
+func (m *ListMeta) Reset() { *m = ListMeta{} }
+func (*ListMeta) ProtoMessage() {}
+func (*ListMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} }
+
+func (m *ListOptions) Reset() { *m = ListOptions{} }
+func (*ListOptions) ProtoMessage() {}
+func (*ListOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{20} }
+
+func (m *MicroTime) Reset() { *m = MicroTime{} }
+func (*MicroTime) ProtoMessage() {}
+func (*MicroTime) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{21} }
+
+func (m *ObjectMeta) Reset() { *m = ObjectMeta{} }
+func (*ObjectMeta) ProtoMessage() {}
+func (*ObjectMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{22} }
+
+func (m *OwnerReference) Reset() { *m = OwnerReference{} }
+func (*OwnerReference) ProtoMessage() {}
+func (*OwnerReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{23} }
+
+func (m *Preconditions) Reset() { *m = Preconditions{} }
+func (*Preconditions) ProtoMessage() {}
+func (*Preconditions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{24} }
+
+func (m *RootPaths) Reset() { *m = RootPaths{} }
+func (*RootPaths) ProtoMessage() {}
+func (*RootPaths) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} }
+
+func (m *ServerAddressByClientCIDR) Reset() { *m = ServerAddressByClientCIDR{} }
+func (*ServerAddressByClientCIDR) ProtoMessage() {}
+func (*ServerAddressByClientCIDR) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{26}
+}
+
+func (m *Status) Reset() { *m = Status{} }
+func (*Status) ProtoMessage() {}
+func (*Status) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{27} }
+
+func (m *StatusCause) Reset() { *m = StatusCause{} }
+func (*StatusCause) ProtoMessage() {}
+func (*StatusCause) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{28} }
+
+func (m *StatusDetails) Reset() { *m = StatusDetails{} }
+func (*StatusDetails) ProtoMessage() {}
+func (*StatusDetails) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{29} }
+
+func (m *Time) Reset() { *m = Time{} }
+func (*Time) ProtoMessage() {}
+func (*Time) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{30} }
+
+func (m *Timestamp) Reset() { *m = Timestamp{} }
+func (*Timestamp) ProtoMessage() {}
+func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{31} }
+
+func (m *TypeMeta) Reset() { *m = TypeMeta{} }
+func (*TypeMeta) ProtoMessage() {}
+func (*TypeMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{32} }
+
+func (m *Verbs) Reset() { *m = Verbs{} }
+func (*Verbs) ProtoMessage() {}
+func (*Verbs) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{33} }
+
+func (m *WatchEvent) Reset() { *m = WatchEvent{} }
+func (*WatchEvent) ProtoMessage() {}
+func (*WatchEvent) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{34} }
+
+func init() {
+ proto.RegisterType((*APIGroup)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIGroup")
+ proto.RegisterType((*APIGroupList)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIGroupList")
+ proto.RegisterType((*APIResource)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIResource")
+ proto.RegisterType((*APIResourceList)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIResourceList")
+ proto.RegisterType((*APIVersions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIVersions")
+ proto.RegisterType((*DeleteOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.DeleteOptions")
+ proto.RegisterType((*Duration)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Duration")
+ proto.RegisterType((*ExportOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ExportOptions")
+ proto.RegisterType((*GetOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GetOptions")
+ proto.RegisterType((*GroupKind)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GroupKind")
+ proto.RegisterType((*GroupResource)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GroupResource")
+ proto.RegisterType((*GroupVersion)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersion")
+ proto.RegisterType((*GroupVersionForDiscovery)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionForDiscovery")
+ proto.RegisterType((*GroupVersionKind)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionKind")
+ proto.RegisterType((*GroupVersionResource)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionResource")
+ proto.RegisterType((*Initializer)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Initializer")
+ proto.RegisterType((*Initializers)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Initializers")
+ proto.RegisterType((*LabelSelector)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector")
+ proto.RegisterType((*LabelSelectorRequirement)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement")
+ proto.RegisterType((*ListMeta)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta")
+ proto.RegisterType((*ListOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ListOptions")
+ proto.RegisterType((*MicroTime)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime")
+ proto.RegisterType((*ObjectMeta)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta")
+ proto.RegisterType((*OwnerReference)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.OwnerReference")
+ proto.RegisterType((*Preconditions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Preconditions")
+ proto.RegisterType((*RootPaths)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.RootPaths")
+ proto.RegisterType((*ServerAddressByClientCIDR)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ServerAddressByClientCIDR")
+ proto.RegisterType((*Status)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Status")
+ proto.RegisterType((*StatusCause)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.StatusCause")
+ proto.RegisterType((*StatusDetails)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.StatusDetails")
+ proto.RegisterType((*Time)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Time")
+ proto.RegisterType((*Timestamp)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Timestamp")
+ proto.RegisterType((*TypeMeta)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.TypeMeta")
+ proto.RegisterType((*Verbs)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Verbs")
+ proto.RegisterType((*WatchEvent)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.WatchEvent")
+}
+func (m *APIGroup) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *APIGroup) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ if len(m.Versions) > 0 {
+ for _, msg := range m.Versions {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PreferredVersion.Size()))
+ n1, err := m.PreferredVersion.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ if len(m.ServerAddressByClientCIDRs) > 0 {
+ for _, msg := range m.ServerAddressByClientCIDRs {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *APIGroupList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *APIGroupList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Groups) > 0 {
+ for _, msg := range m.Groups {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *APIResource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *APIResource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x10
+ i++
+ if m.Namespaced {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
+ i += copy(dAtA[i:], m.Kind)
+ if m.Verbs != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Verbs.Size()))
+ n2, err := m.Verbs.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ }
+ if len(m.ShortNames) > 0 {
+ for _, s := range m.ShortNames {
+ dAtA[i] = 0x2a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.SingularName)))
+ i += copy(dAtA[i:], m.SingularName)
+ if len(m.Categories) > 0 {
+ for _, s := range m.Categories {
+ dAtA[i] = 0x3a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *APIResourceList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *APIResourceList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.GroupVersion)))
+ i += copy(dAtA[i:], m.GroupVersion)
+ if len(m.APIResources) > 0 {
+ for _, msg := range m.APIResources {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *APIVersions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *APIVersions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Versions) > 0 {
+ for _, s := range m.Versions {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.ServerAddressByClientCIDRs) > 0 {
+ for _, msg := range m.ServerAddressByClientCIDRs {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *DeleteOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeleteOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.GracePeriodSeconds != nil {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.GracePeriodSeconds))
+ }
+ if m.Preconditions != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Preconditions.Size()))
+ n3, err := m.Preconditions.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ }
+ if m.OrphanDependents != nil {
+ dAtA[i] = 0x18
+ i++
+ if *m.OrphanDependents {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if m.PropagationPolicy != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.PropagationPolicy)))
+ i += copy(dAtA[i:], *m.PropagationPolicy)
+ }
+ return i, nil
+}
+
+func (m *Duration) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Duration) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Duration))
+ return i, nil
+}
+
+func (m *ExportOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExportOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ if m.Export {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x10
+ i++
+ if m.Exact {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *GetOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *GetOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceVersion)))
+ i += copy(dAtA[i:], m.ResourceVersion)
+ dAtA[i] = 0x10
+ i++
+ if m.IncludeUninitialized {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *GroupKind) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *GroupKind) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group)))
+ i += copy(dAtA[i:], m.Group)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
+ i += copy(dAtA[i:], m.Kind)
+ return i, nil
+}
+
+func (m *GroupResource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *GroupResource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group)))
+ i += copy(dAtA[i:], m.Group)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource)))
+ i += copy(dAtA[i:], m.Resource)
+ return i, nil
+}
+
+func (m *GroupVersion) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *GroupVersion) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group)))
+ i += copy(dAtA[i:], m.Group)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version)))
+ i += copy(dAtA[i:], m.Version)
+ return i, nil
+}
+
+func (m *GroupVersionForDiscovery) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *GroupVersionForDiscovery) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.GroupVersion)))
+ i += copy(dAtA[i:], m.GroupVersion)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version)))
+ i += copy(dAtA[i:], m.Version)
+ return i, nil
+}
+
+func (m *GroupVersionKind) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *GroupVersionKind) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group)))
+ i += copy(dAtA[i:], m.Group)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version)))
+ i += copy(dAtA[i:], m.Version)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
+ i += copy(dAtA[i:], m.Kind)
+ return i, nil
+}
+
+func (m *GroupVersionResource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *GroupVersionResource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group)))
+ i += copy(dAtA[i:], m.Group)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version)))
+ i += copy(dAtA[i:], m.Version)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource)))
+ i += copy(dAtA[i:], m.Resource)
+ return i, nil
+}
+
+func (m *Initializer) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Initializer) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ return i, nil
+}
+
+func (m *Initializers) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Initializers) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Pending) > 0 {
+ for _, msg := range m.Pending {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.Result != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Result.Size()))
+ n4, err := m.Result.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ }
+ return i, nil
+}
+
+func (m *LabelSelector) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LabelSelector) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.MatchLabels) > 0 {
+ keysForMatchLabels := make([]string, 0, len(m.MatchLabels))
+ for k := range m.MatchLabels {
+ keysForMatchLabels = append(keysForMatchLabels, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForMatchLabels)
+ for _, k := range keysForMatchLabels {
+ dAtA[i] = 0xa
+ i++
+ v := m.MatchLabels[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ if len(m.MatchExpressions) > 0 {
+ for _, msg := range m.MatchExpressions {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *LabelSelectorRequirement) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LabelSelectorRequirement) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key)))
+ i += copy(dAtA[i:], m.Key)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Operator)))
+ i += copy(dAtA[i:], m.Operator)
+ if len(m.Values) > 0 {
+ for _, s := range m.Values {
+ dAtA[i] = 0x1a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *ListMeta) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ListMeta) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.SelfLink)))
+ i += copy(dAtA[i:], m.SelfLink)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceVersion)))
+ i += copy(dAtA[i:], m.ResourceVersion)
+ return i, nil
+}
+
+func (m *ListOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ListOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.LabelSelector)))
+ i += copy(dAtA[i:], m.LabelSelector)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FieldSelector)))
+ i += copy(dAtA[i:], m.FieldSelector)
+ dAtA[i] = 0x18
+ i++
+ if m.Watch {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceVersion)))
+ i += copy(dAtA[i:], m.ResourceVersion)
+ if m.TimeoutSeconds != nil {
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.TimeoutSeconds))
+ }
+ dAtA[i] = 0x30
+ i++
+ if m.IncludeUninitialized {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *ObjectMeta) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ObjectMeta) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.GenerateName)))
+ i += copy(dAtA[i:], m.GenerateName)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
+ i += copy(dAtA[i:], m.Namespace)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.SelfLink)))
+ i += copy(dAtA[i:], m.SelfLink)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID)))
+ i += copy(dAtA[i:], m.UID)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceVersion)))
+ i += copy(dAtA[i:], m.ResourceVersion)
+ dAtA[i] = 0x38
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Generation))
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CreationTimestamp.Size()))
+ n5, err := m.CreationTimestamp.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ if m.DeletionTimestamp != nil {
+ dAtA[i] = 0x4a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.DeletionTimestamp.Size()))
+ n6, err := m.DeletionTimestamp.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ }
+ if m.DeletionGracePeriodSeconds != nil {
+ dAtA[i] = 0x50
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.DeletionGracePeriodSeconds))
+ }
+ if len(m.Labels) > 0 {
+ keysForLabels := make([]string, 0, len(m.Labels))
+ for k := range m.Labels {
+ keysForLabels = append(keysForLabels, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
+ for _, k := range keysForLabels {
+ dAtA[i] = 0x5a
+ i++
+ v := m.Labels[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ if len(m.Annotations) > 0 {
+ keysForAnnotations := make([]string, 0, len(m.Annotations))
+ for k := range m.Annotations {
+ keysForAnnotations = append(keysForAnnotations, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations)
+ for _, k := range keysForAnnotations {
+ dAtA[i] = 0x62
+ i++
+ v := m.Annotations[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ if len(m.OwnerReferences) > 0 {
+ for _, msg := range m.OwnerReferences {
+ dAtA[i] = 0x6a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Finalizers) > 0 {
+ for _, s := range m.Finalizers {
+ dAtA[i] = 0x72
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ dAtA[i] = 0x7a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ClusterName)))
+ i += copy(dAtA[i:], m.ClusterName)
+ if m.Initializers != nil {
+ dAtA[i] = 0x82
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Initializers.Size()))
+ n7, err := m.Initializers.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ }
+ return i, nil
+}
+
+func (m *OwnerReference) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *OwnerReference) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
+ i += copy(dAtA[i:], m.Kind)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID)))
+ i += copy(dAtA[i:], m.UID)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion)))
+ i += copy(dAtA[i:], m.APIVersion)
+ if m.Controller != nil {
+ dAtA[i] = 0x30
+ i++
+ if *m.Controller {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if m.BlockOwnerDeletion != nil {
+ dAtA[i] = 0x38
+ i++
+ if *m.BlockOwnerDeletion {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ return i, nil
+}
+
+func (m *Preconditions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Preconditions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.UID != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.UID)))
+ i += copy(dAtA[i:], *m.UID)
+ }
+ return i, nil
+}
+
+func (m *RootPaths) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RootPaths) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Paths) > 0 {
+ for _, s := range m.Paths {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *ServerAddressByClientCIDR) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ServerAddressByClientCIDR) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ClientCIDR)))
+ i += copy(dAtA[i:], m.ClientCIDR)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ServerAddress)))
+ i += copy(dAtA[i:], m.ServerAddress)
+ return i, nil
+}
+
+func (m *Status) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Status) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n8, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n8
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
+ i += copy(dAtA[i:], m.Status)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ if m.Details != nil {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Details.Size()))
+ n9, err := m.Details.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n9
+ }
+ dAtA[i] = 0x30
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Code))
+ return i, nil
+}
+
+func (m *StatusCause) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StatusCause) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Field)))
+ i += copy(dAtA[i:], m.Field)
+ return i, nil
+}
+
+func (m *StatusDetails) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StatusDetails) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group)))
+ i += copy(dAtA[i:], m.Group)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
+ i += copy(dAtA[i:], m.Kind)
+ if len(m.Causes) > 0 {
+ for _, msg := range m.Causes {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RetryAfterSeconds))
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID)))
+ i += copy(dAtA[i:], m.UID)
+ return i, nil
+}
+
+func (m *Timestamp) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Timestamp) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Seconds))
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Nanos))
+ return i, nil
+}
+
+func (m *TypeMeta) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *TypeMeta) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
+ i += copy(dAtA[i:], m.Kind)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion)))
+ i += copy(dAtA[i:], m.APIVersion)
+ return i, nil
+}
+
+func (m Verbs) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m Verbs) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m) > 0 {
+ for _, s := range m {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *WatchEvent) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *WatchEvent) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Object.Size()))
+ n10, err := m.Object.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n10
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *APIGroup) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Versions) > 0 {
+ for _, e := range m.Versions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = m.PreferredVersion.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.ServerAddressByClientCIDRs) > 0 {
+ for _, e := range m.ServerAddressByClientCIDRs {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *APIGroupList) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Groups) > 0 {
+ for _, e := range m.Groups {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *APIResource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ l = len(m.Kind)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Verbs != nil {
+ l = m.Verbs.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if len(m.ShortNames) > 0 {
+ for _, s := range m.ShortNames {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.SingularName)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Categories) > 0 {
+ for _, s := range m.Categories {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *APIResourceList) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.GroupVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.APIResources) > 0 {
+ for _, e := range m.APIResources {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *APIVersions) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Versions) > 0 {
+ for _, s := range m.Versions {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.ServerAddressByClientCIDRs) > 0 {
+ for _, e := range m.ServerAddressByClientCIDRs {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *DeleteOptions) Size() (n int) {
+ var l int
+ _ = l
+ if m.GracePeriodSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.GracePeriodSeconds))
+ }
+ if m.Preconditions != nil {
+ l = m.Preconditions.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.OrphanDependents != nil {
+ n += 2
+ }
+ if m.PropagationPolicy != nil {
+ l = len(*m.PropagationPolicy)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *Duration) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Duration))
+ return n
+}
+
+func (m *ExportOptions) Size() (n int) {
+ var l int
+ _ = l
+ n += 2
+ n += 2
+ return n
+}
+
+func (m *GetOptions) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.ResourceVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ return n
+}
+
+func (m *GroupKind) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Group)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Kind)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *GroupResource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Group)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Resource)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *GroupVersion) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Group)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Version)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *GroupVersionForDiscovery) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.GroupVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Version)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *GroupVersionKind) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Group)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Version)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Kind)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *GroupVersionResource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Group)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Version)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Resource)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Initializer) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Initializers) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Pending) > 0 {
+ for _, e := range m.Pending {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.Result != nil {
+ l = m.Result.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *LabelSelector) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.MatchLabels) > 0 {
+ for k, v := range m.MatchLabels {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ if len(m.MatchExpressions) > 0 {
+ for _, e := range m.MatchExpressions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *LabelSelectorRequirement) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Key)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Operator)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Values) > 0 {
+ for _, s := range m.Values {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ListMeta) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.SelfLink)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ResourceVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ListOptions) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.LabelSelector)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FieldSelector)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ l = len(m.ResourceVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.TimeoutSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.TimeoutSeconds))
+ }
+ n += 2
+ return n
+}
+
+func (m *ObjectMeta) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.GenerateName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Namespace)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.SelfLink)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.UID)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ResourceVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.Generation))
+ l = m.CreationTimestamp.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.DeletionTimestamp != nil {
+ l = m.DeletionTimestamp.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.DeletionGracePeriodSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.DeletionGracePeriodSeconds))
+ }
+ if len(m.Labels) > 0 {
+ for k, v := range m.Labels {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ if len(m.Annotations) > 0 {
+ for k, v := range m.Annotations {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ if len(m.OwnerReferences) > 0 {
+ for _, e := range m.OwnerReferences {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Finalizers) > 0 {
+ for _, s := range m.Finalizers {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.ClusterName)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Initializers != nil {
+ l = m.Initializers.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *OwnerReference) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Kind)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.UID)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.APIVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Controller != nil {
+ n += 2
+ }
+ if m.BlockOwnerDeletion != nil {
+ n += 2
+ }
+ return n
+}
+
+func (m *Preconditions) Size() (n int) {
+ var l int
+ _ = l
+ if m.UID != nil {
+ l = len(*m.UID)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *RootPaths) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Paths) > 0 {
+ for _, s := range m.Paths {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ServerAddressByClientCIDR) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.ClientCIDR)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ServerAddress)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Status) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Status)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Details != nil {
+ l = m.Details.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ n += 1 + sovGenerated(uint64(m.Code))
+ return n
+}
+
+func (m *StatusCause) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Field)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *StatusDetails) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Group)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Kind)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Causes) > 0 {
+ for _, e := range m.Causes {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ n += 1 + sovGenerated(uint64(m.RetryAfterSeconds))
+ l = len(m.UID)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Timestamp) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Seconds))
+ n += 1 + sovGenerated(uint64(m.Nanos))
+ return n
+}
+
+func (m *TypeMeta) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Kind)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.APIVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m Verbs) Size() (n int) {
+ var l int
+ _ = l
+ if len(m) > 0 {
+ for _, s := range m {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *WatchEvent) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Object.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *APIGroup) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&APIGroup{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Versions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Versions), "GroupVersionForDiscovery", "GroupVersionForDiscovery", 1), `&`, ``, 1) + `,`,
+ `PreferredVersion:` + strings.Replace(strings.Replace(this.PreferredVersion.String(), "GroupVersionForDiscovery", "GroupVersionForDiscovery", 1), `&`, ``, 1) + `,`,
+ `ServerAddressByClientCIDRs:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ServerAddressByClientCIDRs), "ServerAddressByClientCIDR", "ServerAddressByClientCIDR", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *APIGroupList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&APIGroupList{`,
+ `Groups:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Groups), "APIGroup", "APIGroup", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *APIResource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&APIResource{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Namespaced:` + fmt.Sprintf("%v", this.Namespaced) + `,`,
+ `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
+ `Verbs:` + strings.Replace(fmt.Sprintf("%v", this.Verbs), "Verbs", "Verbs", 1) + `,`,
+ `ShortNames:` + fmt.Sprintf("%v", this.ShortNames) + `,`,
+ `SingularName:` + fmt.Sprintf("%v", this.SingularName) + `,`,
+ `Categories:` + fmt.Sprintf("%v", this.Categories) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *APIResourceList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&APIResourceList{`,
+ `GroupVersion:` + fmt.Sprintf("%v", this.GroupVersion) + `,`,
+ `APIResources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.APIResources), "APIResource", "APIResource", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeleteOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeleteOptions{`,
+ `GracePeriodSeconds:` + valueToStringGenerated(this.GracePeriodSeconds) + `,`,
+ `Preconditions:` + strings.Replace(fmt.Sprintf("%v", this.Preconditions), "Preconditions", "Preconditions", 1) + `,`,
+ `OrphanDependents:` + valueToStringGenerated(this.OrphanDependents) + `,`,
+ `PropagationPolicy:` + valueToStringGenerated(this.PropagationPolicy) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Duration) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Duration{`,
+ `Duration:` + fmt.Sprintf("%v", this.Duration) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ExportOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ExportOptions{`,
+ `Export:` + fmt.Sprintf("%v", this.Export) + `,`,
+ `Exact:` + fmt.Sprintf("%v", this.Exact) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *GetOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&GetOptions{`,
+ `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`,
+ `IncludeUninitialized:` + fmt.Sprintf("%v", this.IncludeUninitialized) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *GroupVersionForDiscovery) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&GroupVersionForDiscovery{`,
+ `GroupVersion:` + fmt.Sprintf("%v", this.GroupVersion) + `,`,
+ `Version:` + fmt.Sprintf("%v", this.Version) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Initializer) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Initializer{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Initializers) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Initializers{`,
+ `Pending:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Pending), "Initializer", "Initializer", 1), `&`, ``, 1) + `,`,
+ `Result:` + strings.Replace(fmt.Sprintf("%v", this.Result), "Status", "Status", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *LabelSelector) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForMatchLabels := make([]string, 0, len(this.MatchLabels))
+ for k := range this.MatchLabels {
+ keysForMatchLabels = append(keysForMatchLabels, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForMatchLabels)
+ mapStringForMatchLabels := "map[string]string{"
+ for _, k := range keysForMatchLabels {
+ mapStringForMatchLabels += fmt.Sprintf("%v: %v,", k, this.MatchLabels[k])
+ }
+ mapStringForMatchLabels += "}"
+ s := strings.Join([]string{`&LabelSelector{`,
+ `MatchLabels:` + mapStringForMatchLabels + `,`,
+ `MatchExpressions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.MatchExpressions), "LabelSelectorRequirement", "LabelSelectorRequirement", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *LabelSelectorRequirement) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&LabelSelectorRequirement{`,
+ `Key:` + fmt.Sprintf("%v", this.Key) + `,`,
+ `Operator:` + fmt.Sprintf("%v", this.Operator) + `,`,
+ `Values:` + fmt.Sprintf("%v", this.Values) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ListMeta) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ListMeta{`,
+ `SelfLink:` + fmt.Sprintf("%v", this.SelfLink) + `,`,
+ `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ListOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ListOptions{`,
+ `LabelSelector:` + fmt.Sprintf("%v", this.LabelSelector) + `,`,
+ `FieldSelector:` + fmt.Sprintf("%v", this.FieldSelector) + `,`,
+ `Watch:` + fmt.Sprintf("%v", this.Watch) + `,`,
+ `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`,
+ `TimeoutSeconds:` + valueToStringGenerated(this.TimeoutSeconds) + `,`,
+ `IncludeUninitialized:` + fmt.Sprintf("%v", this.IncludeUninitialized) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ObjectMeta) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForLabels := make([]string, 0, len(this.Labels))
+ for k := range this.Labels {
+ keysForLabels = append(keysForLabels, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
+ mapStringForLabels := "map[string]string{"
+ for _, k := range keysForLabels {
+ mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
+ }
+ mapStringForLabels += "}"
+ keysForAnnotations := make([]string, 0, len(this.Annotations))
+ for k := range this.Annotations {
+ keysForAnnotations = append(keysForAnnotations, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations)
+ mapStringForAnnotations := "map[string]string{"
+ for _, k := range keysForAnnotations {
+ mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k])
+ }
+ mapStringForAnnotations += "}"
+ s := strings.Join([]string{`&ObjectMeta{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `GenerateName:` + fmt.Sprintf("%v", this.GenerateName) + `,`,
+ `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
+ `SelfLink:` + fmt.Sprintf("%v", this.SelfLink) + `,`,
+ `UID:` + fmt.Sprintf("%v", this.UID) + `,`,
+ `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`,
+ `Generation:` + fmt.Sprintf("%v", this.Generation) + `,`,
+ `CreationTimestamp:` + strings.Replace(strings.Replace(this.CreationTimestamp.String(), "Time", "Time", 1), `&`, ``, 1) + `,`,
+ `DeletionTimestamp:` + strings.Replace(fmt.Sprintf("%v", this.DeletionTimestamp), "Time", "Time", 1) + `,`,
+ `DeletionGracePeriodSeconds:` + valueToStringGenerated(this.DeletionGracePeriodSeconds) + `,`,
+ `Labels:` + mapStringForLabels + `,`,
+ `Annotations:` + mapStringForAnnotations + `,`,
+ `OwnerReferences:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.OwnerReferences), "OwnerReference", "OwnerReference", 1), `&`, ``, 1) + `,`,
+ `Finalizers:` + fmt.Sprintf("%v", this.Finalizers) + `,`,
+ `ClusterName:` + fmt.Sprintf("%v", this.ClusterName) + `,`,
+ `Initializers:` + strings.Replace(fmt.Sprintf("%v", this.Initializers), "Initializers", "Initializers", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *OwnerReference) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&OwnerReference{`,
+ `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `UID:` + fmt.Sprintf("%v", this.UID) + `,`,
+ `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`,
+ `Controller:` + valueToStringGenerated(this.Controller) + `,`,
+ `BlockOwnerDeletion:` + valueToStringGenerated(this.BlockOwnerDeletion) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Preconditions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Preconditions{`,
+ `UID:` + valueToStringGenerated(this.UID) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RootPaths) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RootPaths{`,
+ `Paths:` + fmt.Sprintf("%v", this.Paths) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ServerAddressByClientCIDR) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ServerAddressByClientCIDR{`,
+ `ClientCIDR:` + fmt.Sprintf("%v", this.ClientCIDR) + `,`,
+ `ServerAddress:` + fmt.Sprintf("%v", this.ServerAddress) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Status) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Status{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "ListMeta", 1), `&`, ``, 1) + `,`,
+ `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Details:` + strings.Replace(fmt.Sprintf("%v", this.Details), "StatusDetails", "StatusDetails", 1) + `,`,
+ `Code:` + fmt.Sprintf("%v", this.Code) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StatusCause) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StatusCause{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `Field:` + fmt.Sprintf("%v", this.Field) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StatusDetails) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StatusDetails{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Group:` + fmt.Sprintf("%v", this.Group) + `,`,
+ `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
+ `Causes:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Causes), "StatusCause", "StatusCause", 1), `&`, ``, 1) + `,`,
+ `RetryAfterSeconds:` + fmt.Sprintf("%v", this.RetryAfterSeconds) + `,`,
+ `UID:` + fmt.Sprintf("%v", this.UID) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Timestamp) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Timestamp{`,
+ `Seconds:` + fmt.Sprintf("%v", this.Seconds) + `,`,
+ `Nanos:` + fmt.Sprintf("%v", this.Nanos) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *TypeMeta) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&TypeMeta{`,
+ `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
+ `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *WatchEvent) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&WatchEvent{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Object:` + strings.Replace(strings.Replace(this.Object.String(), "RawExtension", "k8s_io_apimachinery_pkg_runtime.RawExtension", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *APIGroup) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: APIGroup: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: APIGroup: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Versions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Versions = append(m.Versions, GroupVersionForDiscovery{})
+ if err := m.Versions[len(m.Versions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PreferredVersion", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.PreferredVersion.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ServerAddressByClientCIDRs", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ServerAddressByClientCIDRs = append(m.ServerAddressByClientCIDRs, ServerAddressByClientCIDR{})
+ if err := m.ServerAddressByClientCIDRs[len(m.ServerAddressByClientCIDRs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *APIGroupList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: APIGroupList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: APIGroupList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Groups = append(m.Groups, APIGroup{})
+ if err := m.Groups[len(m.Groups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *APIResource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: APIResource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: APIResource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Namespaced", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Namespaced = bool(v != 0)
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Kind = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Verbs == nil {
+ m.Verbs = Verbs{}
+ }
+ if err := m.Verbs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ShortNames", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ShortNames = append(m.ShortNames, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SingularName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SingularName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Categories", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Categories = append(m.Categories, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *APIResourceList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: APIResourceList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: APIResourceList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field GroupVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.GroupVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIResources", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIResources = append(m.APIResources, APIResource{})
+ if err := m.APIResources[len(m.APIResources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *APIVersions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: APIVersions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: APIVersions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Versions", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Versions = append(m.Versions, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ServerAddressByClientCIDRs", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ServerAddressByClientCIDRs = append(m.ServerAddressByClientCIDRs, ServerAddressByClientCIDR{})
+ if err := m.ServerAddressByClientCIDRs[len(m.ServerAddressByClientCIDRs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeleteOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeleteOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeleteOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field GracePeriodSeconds", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.GracePeriodSeconds = &v
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Preconditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Preconditions == nil {
+ m.Preconditions = &Preconditions{}
+ }
+ if err := m.Preconditions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OrphanDependents", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.OrphanDependents = &b
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PropagationPolicy", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := DeletionPropagation(dAtA[iNdEx:postIndex])
+ m.PropagationPolicy = &s
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Duration) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Duration: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Duration: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType)
+ }
+ m.Duration = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Duration |= (time.Duration(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExportOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExportOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExportOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Export", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Export = bool(v != 0)
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Exact", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Exact = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *GetOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: GetOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: GetOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ResourceVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IncludeUninitialized", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.IncludeUninitialized = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *GroupKind) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: GroupKind: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: GroupKind: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Group = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Kind = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *GroupResource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: GroupResource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: GroupResource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Group = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Resource = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *GroupVersion) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: GroupVersion: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: GroupVersion: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Group = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Version = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *GroupVersionForDiscovery) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: GroupVersionForDiscovery: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: GroupVersionForDiscovery: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field GroupVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.GroupVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Version = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *GroupVersionKind) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: GroupVersionKind: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: GroupVersionKind: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Group = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Version = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Kind = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *GroupVersionResource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: GroupVersionResource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: GroupVersionResource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Group = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Version = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Resource = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Initializer) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Initializer: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Initializer: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Initializers) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Initializers: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Initializers: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Pending", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Pending = append(m.Pending, Initializer{})
+ if err := m.Pending[len(m.Pending)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Result == nil {
+ m.Result = &Status{}
+ }
+ if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LabelSelector) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LabelSelector: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LabelSelector: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MatchLabels", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.MatchLabels == nil {
+ m.MatchLabels = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.MatchLabels[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.MatchLabels[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MatchExpressions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MatchExpressions = append(m.MatchExpressions, LabelSelectorRequirement{})
+ if err := m.MatchExpressions[len(m.MatchExpressions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LabelSelectorRequirement) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LabelSelectorRequirement: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LabelSelectorRequirement: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Key = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Operator = LabelSelectorOperator(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Values = append(m.Values, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ListMeta) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ListMeta: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ListMeta: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SelfLink", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SelfLink = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ResourceVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ListOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ListOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ListOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.LabelSelector = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FieldSelector", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FieldSelector = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Watch", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Watch = bool(v != 0)
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ResourceVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TimeoutSeconds", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.TimeoutSeconds = &v
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IncludeUninitialized", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.IncludeUninitialized = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ObjectMeta) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ObjectMeta: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ObjectMeta: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field GenerateName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.GenerateName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Namespace = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SelfLink", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SelfLink = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ResourceVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Generation", wireType)
+ }
+ m.Generation = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Generation |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CreationTimestamp", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.CreationTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DeletionTimestamp", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.DeletionTimestamp == nil {
+ m.DeletionTimestamp = &Time{}
+ }
+ if err := m.DeletionTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 10:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DeletionGracePeriodSeconds", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.DeletionGracePeriodSeconds = &v
+ case 11:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Labels == nil {
+ m.Labels = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Labels[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Labels[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 12:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Annotations == nil {
+ m.Annotations = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Annotations[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Annotations[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 13:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OwnerReferences", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OwnerReferences = append(m.OwnerReferences, OwnerReference{})
+ if err := m.OwnerReferences[len(m.OwnerReferences)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 14:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Finalizers", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Finalizers = append(m.Finalizers, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 15:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ClusterName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ClusterName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 16:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Initializers", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Initializers == nil {
+ m.Initializers = &Initializers{}
+ }
+ if err := m.Initializers.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *OwnerReference) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: OwnerReference: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: OwnerReference: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Kind = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Controller = &b
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field BlockOwnerDeletion", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.BlockOwnerDeletion = &b
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Preconditions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Preconditions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Preconditions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex])
+ m.UID = &s
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RootPaths) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RootPaths: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RootPaths: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Paths = append(m.Paths, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ServerAddressByClientCIDR) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ServerAddressByClientCIDR: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ServerAddressByClientCIDR: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ClientCIDR", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ClientCIDR = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ServerAddress", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ServerAddress = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Status) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Status: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Status: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Status = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = StatusReason(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Details == nil {
+ m.Details = &StatusDetails{}
+ }
+ if err := m.Details.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
+ }
+ m.Code = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Code |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StatusCause) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StatusCause: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StatusCause: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = CauseType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Field = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StatusDetails) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StatusDetails: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StatusDetails: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Group = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Kind = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Causes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Causes = append(m.Causes, StatusCause{})
+ if err := m.Causes[len(m.Causes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RetryAfterSeconds", wireType)
+ }
+ m.RetryAfterSeconds = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.RetryAfterSeconds |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Timestamp) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Timestamp: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Timestamp: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Seconds", wireType)
+ }
+ m.Seconds = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Seconds |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Nanos", wireType)
+ }
+ m.Nanos = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Nanos |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *TypeMeta) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: TypeMeta: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: TypeMeta: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Kind = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Verbs) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Verbs: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Verbs: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ *m = append(*m, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *WatchEvent) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: WatchEvent: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: WatchEvent: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 2351 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0xcd, 0x6f, 0x1b, 0xc7,
+ 0x15, 0xd7, 0x52, 0x22, 0x45, 0x3e, 0x8a, 0xfa, 0x98, 0xc8, 0x2d, 0x23, 0xb4, 0xa4, 0xb2, 0x29,
+ 0x02, 0xa5, 0x75, 0xc8, 0x4a, 0x69, 0x03, 0xd7, 0x6d, 0xdd, 0x6a, 0x45, 0xd9, 0x10, 0x62, 0xd9,
+ 0xc4, 0x28, 0x76, 0x51, 0xd7, 0x28, 0xba, 0x5a, 0x8e, 0xa8, 0xad, 0x96, 0xbb, 0x9b, 0x99, 0xa1,
+ 0x6c, 0x35, 0x87, 0xe6, 0xd0, 0x02, 0x3d, 0x14, 0x85, 0x8f, 0x3d, 0x15, 0x31, 0xda, 0xbf, 0xa0,
+ 0x7f, 0x40, 0x4f, 0x05, 0xea, 0x63, 0x80, 0x5e, 0x72, 0x28, 0x88, 0x98, 0x39, 0xf4, 0x14, 0xf4,
+ 0x2e, 0xa0, 0x40, 0x31, 0xb3, 0xb3, 0x5f, 0xa4, 0x18, 0x2d, 0xe3, 0xa0, 0xc8, 0x49, 0xdc, 0xf7,
+ 0xf1, 0x7b, 0x6f, 0x66, 0xde, 0xbc, 0xf7, 0xe6, 0x09, 0xf6, 0x4f, 0xae, 0xb1, 0x86, 0xed, 0x35,
+ 0x4f, 0xfa, 0x87, 0x84, 0xba, 0x84, 0x13, 0xd6, 0x3c, 0x25, 0x6e, 0xc7, 0xa3, 0x4d, 0xc5, 0x30,
+ 0x7d, 0xbb, 0x67, 0x5a, 0xc7, 0xb6, 0x4b, 0xe8, 0x59, 0xd3, 0x3f, 0xe9, 0x0a, 0x02, 0x6b, 0xf6,
+ 0x08, 0x37, 0x9b, 0xa7, 0x9b, 0xcd, 0x2e, 0x71, 0x09, 0x35, 0x39, 0xe9, 0x34, 0x7c, 0xea, 0x71,
+ 0x0f, 0x7d, 0x23, 0xd0, 0x6a, 0x24, 0xb5, 0x1a, 0xfe, 0x49, 0x57, 0x10, 0x58, 0x43, 0x68, 0x35,
+ 0x4e, 0x37, 0xd7, 0xde, 0xe8, 0xda, 0xfc, 0xb8, 0x7f, 0xd8, 0xb0, 0xbc, 0x5e, 0xb3, 0xeb, 0x75,
+ 0xbd, 0xa6, 0x54, 0x3e, 0xec, 0x1f, 0xc9, 0x2f, 0xf9, 0x21, 0x7f, 0x05, 0xa0, 0x6b, 0x13, 0x5d,
+ 0xa1, 0x7d, 0x97, 0xdb, 0x3d, 0x32, 0xea, 0xc5, 0xda, 0x5b, 0x97, 0x29, 0x30, 0xeb, 0x98, 0xf4,
+ 0xcc, 0x31, 0xbd, 0x37, 0x27, 0xe9, 0xf5, 0xb9, 0xed, 0x34, 0x6d, 0x97, 0x33, 0x4e, 0x47, 0x95,
+ 0xf4, 0x7f, 0xcc, 0x42, 0x71, 0xbb, 0xbd, 0x77, 0x8b, 0x7a, 0x7d, 0x1f, 0xad, 0xc3, 0x9c, 0x6b,
+ 0xf6, 0x48, 0x55, 0x5b, 0xd7, 0x36, 0x4a, 0xc6, 0xc2, 0xb3, 0x41, 0x7d, 0x66, 0x38, 0xa8, 0xcf,
+ 0xdd, 0x31, 0x7b, 0x04, 0x4b, 0x0e, 0x72, 0xa0, 0x78, 0x4a, 0x28, 0xb3, 0x3d, 0x97, 0x55, 0x73,
+ 0xeb, 0xb3, 0x1b, 0xe5, 0xad, 0x1b, 0x8d, 0x2c, 0x9b, 0xd6, 0x90, 0x06, 0xee, 0x07, 0xaa, 0x37,
+ 0x3d, 0xda, 0xb2, 0x99, 0xe5, 0x9d, 0x12, 0x7a, 0x66, 0x2c, 0x2b, 0x2b, 0x45, 0xc5, 0x64, 0x38,
+ 0xb2, 0x80, 0x7e, 0xa3, 0xc1, 0xb2, 0x4f, 0xc9, 0x11, 0xa1, 0x94, 0x74, 0x14, 0xbf, 0x3a, 0xbb,
+ 0xae, 0x7d, 0x01, 0x66, 0xab, 0xca, 0xec, 0x72, 0x7b, 0x04, 0x1f, 0x8f, 0x59, 0x44, 0x7f, 0xd6,
+ 0x60, 0x8d, 0x11, 0x7a, 0x4a, 0xe8, 0x76, 0xa7, 0x43, 0x09, 0x63, 0xc6, 0xd9, 0x8e, 0x63, 0x13,
+ 0x97, 0xef, 0xec, 0xb5, 0x30, 0xab, 0xce, 0xc9, 0x7d, 0xf8, 0x51, 0x36, 0x87, 0x0e, 0x26, 0xe1,
+ 0x18, 0xba, 0xf2, 0x68, 0x6d, 0xa2, 0x08, 0xc3, 0x9f, 0xe1, 0x86, 0x7e, 0x04, 0x0b, 0xe1, 0x41,
+ 0xde, 0xb6, 0x19, 0x47, 0xf7, 0xa1, 0xd0, 0x15, 0x1f, 0xac, 0xaa, 0x49, 0x07, 0x1b, 0xd9, 0x1c,
+ 0x0c, 0x31, 0x8c, 0x45, 0xe5, 0x4f, 0x41, 0x7e, 0x32, 0xac, 0xd0, 0xf4, 0x4f, 0x73, 0x50, 0xde,
+ 0x6e, 0xef, 0x61, 0xc2, 0xbc, 0x3e, 0xb5, 0x48, 0x86, 0xa0, 0xd9, 0x02, 0x10, 0x7f, 0x99, 0x6f,
+ 0x5a, 0xa4, 0x53, 0xcd, 0xad, 0x6b, 0x1b, 0x45, 0x03, 0x29, 0x39, 0xb8, 0x13, 0x71, 0x70, 0x42,
+ 0x4a, 0xa0, 0x9e, 0xd8, 0x6e, 0x47, 0x9e, 0x76, 0x02, 0xf5, 0x6d, 0xdb, 0xed, 0x60, 0xc9, 0x41,
+ 0xb7, 0x21, 0x7f, 0x4a, 0xe8, 0xa1, 0xd8, 0x7f, 0x11, 0x10, 0xdf, 0xca, 0xb6, 0xbc, 0xfb, 0x42,
+ 0xc5, 0x28, 0x0d, 0x07, 0xf5, 0xbc, 0xfc, 0x89, 0x03, 0x10, 0xd4, 0x00, 0x60, 0xc7, 0x1e, 0xe5,
+ 0xd2, 0x9d, 0x6a, 0x7e, 0x7d, 0x76, 0xa3, 0x64, 0x2c, 0x0a, 0xff, 0x0e, 0x22, 0x2a, 0x4e, 0x48,
+ 0xa0, 0x6b, 0xb0, 0xc0, 0x6c, 0xb7, 0xdb, 0x77, 0x4c, 0x2a, 0x08, 0xd5, 0x82, 0xf4, 0x73, 0x55,
+ 0xf9, 0xb9, 0x70, 0x90, 0xe0, 0xe1, 0x94, 0xa4, 0xb0, 0x64, 0x99, 0x9c, 0x74, 0x3d, 0x6a, 0x13,
+ 0x56, 0x9d, 0x8f, 0x2d, 0xed, 0x44, 0x54, 0x9c, 0x90, 0xd0, 0xff, 0xaa, 0xc1, 0x52, 0x62, 0xbf,
+ 0xe5, 0xd9, 0x5e, 0x83, 0x85, 0x6e, 0x22, 0xb2, 0xd5, 0xde, 0x47, 0xd6, 0x93, 0x51, 0x8f, 0x53,
+ 0x92, 0x88, 0x40, 0x89, 0x2a, 0xa4, 0xf0, 0x06, 0x6f, 0x66, 0x0e, 0x8c, 0xd0, 0x87, 0xd8, 0x52,
+ 0x82, 0xc8, 0x70, 0x8c, 0xac, 0xff, 0x5b, 0x93, 0x41, 0x12, 0xde, 0x69, 0xb4, 0x91, 0xc8, 0x1b,
+ 0x9a, 0x5c, 0xf2, 0xc2, 0x84, 0x3b, 0x7f, 0xc9, 0x65, 0xcb, 0x7d, 0x29, 0x2e, 0xdb, 0xf5, 0xe2,
+ 0x1f, 0x3f, 0xa8, 0xcf, 0xbc, 0xff, 0xaf, 0xf5, 0x19, 0xfd, 0x93, 0x1c, 0x54, 0x5a, 0xc4, 0x21,
+ 0x9c, 0xdc, 0xf5, 0xb9, 0x5c, 0xc1, 0x4d, 0x40, 0x5d, 0x6a, 0x5a, 0xa4, 0x4d, 0xa8, 0xed, 0x75,
+ 0x0e, 0x88, 0xe5, 0xb9, 0x1d, 0x26, 0x8f, 0x68, 0xd6, 0xf8, 0xca, 0x70, 0x50, 0x47, 0xb7, 0xc6,
+ 0xb8, 0xf8, 0x02, 0x0d, 0xe4, 0x40, 0xc5, 0xa7, 0xf2, 0xb7, 0xcd, 0x55, 0xc2, 0x15, 0x81, 0xfe,
+ 0x66, 0xb6, 0xb5, 0xb7, 0x93, 0xaa, 0xc6, 0xca, 0x70, 0x50, 0xaf, 0xa4, 0x48, 0x38, 0x0d, 0x8e,
+ 0x7e, 0x0c, 0xcb, 0x1e, 0xf5, 0x8f, 0x4d, 0xb7, 0x45, 0x7c, 0xe2, 0x76, 0x88, 0xcb, 0x99, 0xbc,
+ 0x7c, 0x45, 0x63, 0x55, 0xa4, 0xc9, 0xbb, 0x23, 0x3c, 0x3c, 0x26, 0x8d, 0x1e, 0xc0, 0x8a, 0x4f,
+ 0x3d, 0xdf, 0xec, 0x9a, 0x02, 0xb1, 0xed, 0x39, 0xb6, 0x75, 0x26, 0x2f, 0x67, 0xc9, 0xb8, 0x3a,
+ 0x1c, 0xd4, 0x57, 0xda, 0xa3, 0xcc, 0xf3, 0x41, 0xfd, 0x25, 0xb9, 0x75, 0x82, 0x12, 0x33, 0xf1,
+ 0x38, 0x8c, 0xbe, 0x07, 0xc5, 0x56, 0x9f, 0x4a, 0x0a, 0xfa, 0x21, 0x14, 0x3b, 0xea, 0xb7, 0xda,
+ 0xd5, 0x57, 0xc2, 0x1a, 0x12, 0xca, 0x9c, 0x0f, 0xea, 0x15, 0x51, 0x2a, 0x1b, 0x21, 0x01, 0x47,
+ 0x2a, 0xfa, 0x43, 0xa8, 0xec, 0x3e, 0xf6, 0x3d, 0xca, 0xc3, 0xf3, 0x7a, 0x0d, 0x0a, 0x44, 0x12,
+ 0x24, 0x5a, 0x31, 0x4e, 0x7c, 0x81, 0x18, 0x56, 0x5c, 0xf4, 0x2a, 0xe4, 0xc9, 0x63, 0xd3, 0xe2,
+ 0x2a, 0x83, 0x55, 0x94, 0x58, 0x7e, 0x57, 0x10, 0x71, 0xc0, 0xd3, 0x9f, 0x6a, 0x00, 0xb7, 0x48,
+ 0x84, 0xbd, 0x0d, 0x4b, 0xe1, 0xa5, 0x48, 0xdf, 0xd5, 0xaf, 0x2a, 0xed, 0x25, 0x9c, 0x66, 0xe3,
+ 0x51, 0x79, 0xd4, 0x86, 0x55, 0xdb, 0xb5, 0x9c, 0x7e, 0x87, 0xdc, 0x73, 0x6d, 0xd7, 0xe6, 0xb6,
+ 0xe9, 0xd8, 0xbf, 0x8a, 0xf2, 0xe8, 0xd7, 0x14, 0xce, 0xea, 0xde, 0x05, 0x32, 0xf8, 0x42, 0x4d,
+ 0xfd, 0x21, 0x94, 0x64, 0x86, 0x10, 0xc9, 0x54, 0xac, 0x4a, 0x26, 0x08, 0xe5, 0x57, 0xb4, 0x2a,
+ 0x29, 0x81, 0x03, 0x5e, 0x94, 0x8d, 0x73, 0x93, 0xb2, 0x71, 0xe2, 0x42, 0x38, 0x50, 0x09, 0x74,
+ 0xc3, 0x02, 0x91, 0xc9, 0xc2, 0x55, 0x28, 0x86, 0x0b, 0x57, 0x56, 0xa2, 0xc6, 0x20, 0x04, 0xc2,
+ 0x91, 0x44, 0xc2, 0xda, 0x31, 0xa4, 0xb2, 0x5d, 0x36, 0x63, 0xaf, 0xc3, 0xbc, 0xca, 0x37, 0xca,
+ 0xd6, 0x92, 0x12, 0x9b, 0x0f, 0x4f, 0x21, 0xe4, 0x27, 0x2c, 0xfd, 0x1a, 0xaa, 0x93, 0xba, 0x89,
+ 0x17, 0xc8, 0xc7, 0xd9, 0x5d, 0xd1, 0xff, 0xa0, 0xc1, 0x72, 0x12, 0x29, 0xfb, 0xf1, 0x65, 0x37,
+ 0x72, 0x79, 0xdd, 0x4d, 0xec, 0xc8, 0x9f, 0x34, 0x58, 0x4d, 0x2d, 0x6d, 0xaa, 0x13, 0x9f, 0xc2,
+ 0xa9, 0x64, 0x70, 0xcc, 0x4e, 0x11, 0x1c, 0x4d, 0x28, 0xef, 0x45, 0x71, 0x4f, 0x2f, 0xef, 0x54,
+ 0xf4, 0xbf, 0x69, 0xb0, 0x90, 0xd0, 0x60, 0xe8, 0x21, 0xcc, 0x8b, 0xfc, 0x66, 0xbb, 0x5d, 0xd5,
+ 0x45, 0x65, 0x2c, 0x96, 0x09, 0x90, 0x78, 0x5d, 0xed, 0x00, 0x09, 0x87, 0x90, 0xa8, 0x0d, 0x05,
+ 0x4a, 0x58, 0xdf, 0xe1, 0x2a, 0xb5, 0x5f, 0xcd, 0x58, 0xd6, 0xb8, 0xc9, 0xfb, 0xcc, 0x00, 0x91,
+ 0xa3, 0xb0, 0xd4, 0xc7, 0x0a, 0x47, 0xff, 0x67, 0x0e, 0x2a, 0xb7, 0xcd, 0x43, 0xe2, 0x1c, 0x10,
+ 0x87, 0x58, 0xdc, 0xa3, 0xe8, 0x3d, 0x28, 0xf7, 0x4c, 0x6e, 0x1d, 0x4b, 0x6a, 0xd8, 0x0b, 0xb6,
+ 0xb2, 0x19, 0x4a, 0x21, 0x35, 0xf6, 0x63, 0x98, 0x5d, 0x97, 0xd3, 0x33, 0xe3, 0x25, 0xb5, 0xb0,
+ 0x72, 0x82, 0x83, 0x93, 0xd6, 0x64, 0x03, 0x2f, 0xbf, 0x77, 0x1f, 0xfb, 0xa2, 0x88, 0x4e, 0xff,
+ 0x6e, 0x48, 0xb9, 0x80, 0xc9, 0xbb, 0x7d, 0x9b, 0x92, 0x1e, 0x71, 0x79, 0xdc, 0xc0, 0xef, 0x8f,
+ 0xe0, 0xe3, 0x31, 0x8b, 0x6b, 0x37, 0x60, 0x79, 0xd4, 0x79, 0xb4, 0x0c, 0xb3, 0x27, 0xe4, 0x2c,
+ 0x88, 0x05, 0x2c, 0x7e, 0xa2, 0x55, 0xc8, 0x9f, 0x9a, 0x4e, 0x5f, 0xe5, 0x1f, 0x1c, 0x7c, 0x5c,
+ 0xcf, 0x5d, 0xd3, 0xf4, 0xbf, 0x68, 0x50, 0x9d, 0xe4, 0x08, 0xfa, 0x7a, 0x02, 0xc8, 0x28, 0x2b,
+ 0xaf, 0x66, 0xdf, 0x26, 0x67, 0x01, 0xea, 0x2e, 0x14, 0x3d, 0x5f, 0x3c, 0xb9, 0x3c, 0xaa, 0xe2,
+ 0xfc, 0xf5, 0x30, 0x76, 0xef, 0x2a, 0xfa, 0xf9, 0xa0, 0x7e, 0x25, 0x05, 0x1f, 0x32, 0x70, 0xa4,
+ 0x8a, 0x74, 0x28, 0x48, 0x7f, 0x44, 0x51, 0x16, 0xed, 0x93, 0x3c, 0xfc, 0xfb, 0x92, 0x82, 0x15,
+ 0x47, 0x7f, 0x0f, 0x8a, 0xa2, 0x3b, 0xdc, 0x27, 0xdc, 0x14, 0x57, 0x86, 0x11, 0xe7, 0xe8, 0xb6,
+ 0xed, 0x9e, 0x28, 0xd7, 0xa2, 0x2b, 0x73, 0xa0, 0xe8, 0x38, 0x92, 0xb8, 0xa8, 0x4c, 0xe5, 0xa6,
+ 0x2b, 0x53, 0xfa, 0x7f, 0x73, 0x50, 0x16, 0xd6, 0xc3, 0xca, 0xf7, 0x7d, 0xa8, 0x38, 0xc9, 0x35,
+ 0x29, 0x2f, 0xae, 0x28, 0xc0, 0x74, 0x94, 0xe2, 0xb4, 0xac, 0x50, 0x3e, 0xb2, 0x89, 0xd3, 0x89,
+ 0x94, 0x73, 0x69, 0xe5, 0x9b, 0x49, 0x26, 0x4e, 0xcb, 0x8a, 0xec, 0xf3, 0x48, 0x9c, 0xb6, 0x6a,
+ 0x5f, 0xa2, 0xec, 0xf3, 0x13, 0x41, 0xc4, 0x01, 0xef, 0xa2, 0x15, 0xcf, 0x4d, 0x59, 0x98, 0xaf,
+ 0xc3, 0xa2, 0xe8, 0x31, 0xbc, 0x3e, 0x0f, 0x7b, 0xbc, 0xbc, 0xec, 0x46, 0xd0, 0x70, 0x50, 0x5f,
+ 0x7c, 0x27, 0xc5, 0xc1, 0x23, 0x92, 0x13, 0x8b, 0x7a, 0xe1, 0x73, 0x17, 0xf5, 0x77, 0xa1, 0xb4,
+ 0x6f, 0x5b, 0xd4, 0x13, 0x86, 0x45, 0x6e, 0x65, 0xa9, 0xbe, 0x33, 0xca, 0x41, 0xa1, 0x43, 0x21,
+ 0x5f, 0xec, 0x96, 0x6b, 0xba, 0x5e, 0xd0, 0x5d, 0xe6, 0xe3, 0xdd, 0xba, 0x23, 0x88, 0x38, 0xe0,
+ 0x5d, 0x5f, 0x15, 0x29, 0xf5, 0x77, 0x4f, 0xeb, 0x33, 0x4f, 0x9e, 0xd6, 0x67, 0x3e, 0x78, 0xaa,
+ 0xd2, 0xeb, 0xa7, 0x00, 0x70, 0xf7, 0xf0, 0x97, 0xc4, 0x0a, 0x42, 0xee, 0xf2, 0x87, 0xa0, 0x28,
+ 0x93, 0x6a, 0xfe, 0x20, 0x1f, 0x4d, 0xb9, 0x91, 0x32, 0x99, 0xe0, 0xe1, 0x94, 0x24, 0x6a, 0x42,
+ 0x29, 0x7a, 0x1c, 0xaa, 0x12, 0xb0, 0xa2, 0xd4, 0x4a, 0xd1, 0x0b, 0x12, 0xc7, 0x32, 0xa9, 0xf8,
+ 0x9f, 0xbb, 0x34, 0xfe, 0x0d, 0x98, 0xed, 0xdb, 0x1d, 0x79, 0x7e, 0x25, 0xe3, 0xdb, 0xe1, 0x1d,
+ 0xbe, 0xb7, 0xd7, 0x3a, 0x1f, 0xd4, 0x5f, 0x99, 0x34, 0x56, 0xe1, 0x67, 0x3e, 0x61, 0x8d, 0x7b,
+ 0x7b, 0x2d, 0x2c, 0x94, 0x2f, 0x8a, 0xa8, 0xc2, 0x94, 0x11, 0xb5, 0x05, 0xa0, 0x56, 0x2d, 0xb4,
+ 0xe7, 0x83, 0x68, 0x0a, 0x1f, 0xca, 0xb7, 0x22, 0x0e, 0x4e, 0x48, 0x21, 0x06, 0x2b, 0x16, 0x25,
+ 0xf2, 0xb7, 0x38, 0x7a, 0xc6, 0xcd, 0x9e, 0x5f, 0x2d, 0xca, 0x72, 0xf2, 0xcd, 0x6c, 0x29, 0x56,
+ 0xa8, 0x19, 0x2f, 0x2b, 0x33, 0x2b, 0x3b, 0xa3, 0x60, 0x78, 0x1c, 0x1f, 0x79, 0xb0, 0xd2, 0x51,
+ 0x8d, 0x7b, 0x6c, 0xb4, 0x34, 0xb5, 0xd1, 0x2b, 0xc2, 0x60, 0x6b, 0x14, 0x08, 0x8f, 0x63, 0xa3,
+ 0x9f, 0xc3, 0x5a, 0x48, 0x1c, 0x7f, 0x3d, 0x55, 0x41, 0xee, 0x54, 0x4d, 0xbc, 0xe7, 0x5a, 0x13,
+ 0xa5, 0xf0, 0x67, 0x20, 0xa0, 0x0e, 0x14, 0x9c, 0xa0, 0x40, 0x96, 0x65, 0x75, 0xfa, 0x41, 0xb6,
+ 0x55, 0xc4, 0xd1, 0xdf, 0x48, 0x16, 0xc6, 0xe8, 0x05, 0xa1, 0x6a, 0xa2, 0xc2, 0x46, 0x8f, 0xa1,
+ 0x6c, 0xba, 0xae, 0xc7, 0xcd, 0xe0, 0x3d, 0xb7, 0x20, 0x4d, 0x6d, 0x4f, 0x6d, 0x6a, 0x3b, 0xc6,
+ 0x18, 0x29, 0xc4, 0x09, 0x0e, 0x4e, 0x9a, 0x42, 0x8f, 0x60, 0xc9, 0x7b, 0xe4, 0x12, 0x8a, 0xc9,
+ 0x11, 0xa1, 0xc4, 0x15, 0x8f, 0xff, 0x8a, 0xb4, 0xfe, 0x9d, 0x8c, 0xd6, 0x53, 0xca, 0x71, 0x48,
+ 0xa7, 0xe9, 0x0c, 0x8f, 0x5a, 0x41, 0x0d, 0x80, 0x23, 0xdb, 0x55, 0xed, 0x54, 0x75, 0x31, 0x9e,
+ 0x76, 0xdc, 0x8c, 0xa8, 0x38, 0x21, 0x81, 0xbe, 0x0b, 0x65, 0xcb, 0xe9, 0x33, 0x4e, 0x82, 0xb1,
+ 0xca, 0x92, 0xbc, 0x41, 0xd1, 0xfa, 0x76, 0x62, 0x16, 0x4e, 0xca, 0xa1, 0x63, 0x58, 0xb0, 0x13,
+ 0x7d, 0x5b, 0x75, 0x59, 0xc6, 0xe2, 0xd6, 0xd4, 0xcd, 0x1a, 0x33, 0x96, 0x45, 0x26, 0x4a, 0x52,
+ 0x70, 0x0a, 0x79, 0xed, 0x7b, 0x50, 0xfe, 0x9c, 0x6d, 0x84, 0x68, 0x43, 0x46, 0x8f, 0x6e, 0xaa,
+ 0x36, 0xe4, 0xef, 0x39, 0x58, 0x4c, 0x6f, 0x78, 0xd4, 0xae, 0x6b, 0x13, 0xc7, 0x64, 0x61, 0x56,
+ 0x9e, 0x9d, 0x98, 0x95, 0x55, 0xf2, 0x9b, 0x7b, 0x91, 0xe4, 0xb7, 0x05, 0x60, 0xfa, 0x76, 0x98,
+ 0xf7, 0x82, 0x3c, 0x1a, 0x65, 0xae, 0x78, 0x10, 0x84, 0x13, 0x52, 0x72, 0x10, 0xe6, 0xb9, 0x9c,
+ 0x7a, 0x8e, 0x43, 0xa8, 0xaa, 0x7c, 0xc1, 0x20, 0x2c, 0xa2, 0xe2, 0x84, 0x04, 0xba, 0x09, 0xe8,
+ 0xd0, 0xf1, 0xac, 0x13, 0xb9, 0x05, 0xe1, 0x3d, 0x97, 0x59, 0xb2, 0x18, 0xcc, 0x55, 0x8c, 0x31,
+ 0x2e, 0xbe, 0x40, 0x43, 0xbf, 0x0b, 0xe9, 0x49, 0x08, 0xba, 0x11, 0x6c, 0x80, 0x16, 0x8d, 0x2a,
+ 0xa6, 0x5b, 0xbc, 0x7e, 0x15, 0x4a, 0xd8, 0xf3, 0x78, 0xdb, 0xe4, 0xc7, 0x0c, 0xd5, 0x21, 0xef,
+ 0x8b, 0x1f, 0x6a, 0xcc, 0x25, 0x27, 0x8d, 0x92, 0x83, 0x03, 0xba, 0xfe, 0x7b, 0x0d, 0x5e, 0x9e,
+ 0x38, 0x75, 0x12, 0x1b, 0x69, 0x45, 0x5f, 0xca, 0xa5, 0x68, 0x23, 0x63, 0x39, 0x9c, 0x90, 0x12,
+ 0xdd, 0x52, 0x6a, 0x54, 0x35, 0xda, 0x2d, 0xa5, 0xac, 0xe1, 0xb4, 0xac, 0xfe, 0x9f, 0x1c, 0x14,
+ 0x82, 0x07, 0x05, 0x7a, 0x08, 0x45, 0x71, 0x25, 0x3a, 0x26, 0x37, 0xa5, 0xe5, 0xcc, 0x33, 0xe3,
+ 0xb0, 0xeb, 0x8c, 0x6b, 0x6c, 0x48, 0xc1, 0x11, 0x22, 0x7a, 0x0d, 0x0a, 0x4c, 0xda, 0x51, 0xee,
+ 0x45, 0x49, 0x32, 0xb0, 0x8e, 0x15, 0x57, 0xf4, 0x2e, 0x3d, 0xc2, 0x98, 0xd9, 0x0d, 0x63, 0x36,
+ 0xea, 0x5d, 0xf6, 0x03, 0x32, 0x0e, 0xf9, 0xe8, 0x2d, 0xf1, 0x7e, 0x32, 0x59, 0xd4, 0xbb, 0xd5,
+ 0x42, 0x48, 0x2c, 0xa9, 0xe7, 0x83, 0xfa, 0x82, 0x02, 0x97, 0xdf, 0x58, 0x49, 0xa3, 0x07, 0x30,
+ 0xdf, 0x21, 0xdc, 0xb4, 0x9d, 0xa0, 0x65, 0xcb, 0x3c, 0x53, 0x0b, 0xc0, 0x5a, 0x81, 0xaa, 0x51,
+ 0x16, 0x3e, 0xa9, 0x0f, 0x1c, 0x02, 0x8a, 0xfb, 0x66, 0x79, 0x9d, 0x60, 0x20, 0x9c, 0x8f, 0xef,
+ 0xdb, 0x8e, 0xd7, 0x21, 0x58, 0x72, 0xf4, 0x27, 0x1a, 0x94, 0x03, 0xa4, 0x1d, 0xb3, 0xcf, 0x08,
+ 0xda, 0x8c, 0x56, 0x11, 0x1c, 0x77, 0x58, 0x8a, 0xe7, 0xde, 0x39, 0xf3, 0xc9, 0xf9, 0xa0, 0x5e,
+ 0x92, 0x62, 0xe2, 0x23, 0x5a, 0x40, 0x62, 0x8f, 0x72, 0x97, 0xec, 0xd1, 0xab, 0x90, 0x97, 0xed,
+ 0xb1, 0xda, 0xcc, 0xa8, 0xbf, 0x93, 0x2d, 0x34, 0x0e, 0x78, 0xfa, 0xc7, 0x39, 0xa8, 0xa4, 0x16,
+ 0x97, 0xa1, 0x99, 0x8b, 0x1e, 0xf9, 0xb9, 0x0c, 0x83, 0xa3, 0xc9, 0x63, 0xfc, 0x9f, 0x42, 0xc1,
+ 0x12, 0xeb, 0x0b, 0xff, 0x8f, 0xb2, 0x39, 0xcd, 0x51, 0xc8, 0x9d, 0x89, 0x23, 0x49, 0x7e, 0x32,
+ 0xac, 0x00, 0xd1, 0x2d, 0x58, 0xa1, 0x84, 0xd3, 0xb3, 0xed, 0x23, 0x4e, 0x68, 0xb2, 0x47, 0xcf,
+ 0xc7, 0xed, 0x0e, 0x1e, 0x15, 0xc0, 0xe3, 0x3a, 0x61, 0x86, 0x2c, 0xbc, 0x40, 0x86, 0xd4, 0x1d,
+ 0x98, 0xfb, 0x3f, 0xb6, 0xe6, 0x3f, 0x83, 0x52, 0xdc, 0x3c, 0x7d, 0xc1, 0x26, 0xf5, 0x5f, 0x40,
+ 0x51, 0x44, 0x63, 0xd8, 0xf4, 0x5f, 0x52, 0x80, 0xd2, 0xa5, 0x21, 0x97, 0xa5, 0x34, 0xe8, 0x5b,
+ 0x10, 0xfc, 0x77, 0x46, 0x64, 0x53, 0x9b, 0x93, 0x5e, 0x2a, 0x9b, 0xee, 0x09, 0x02, 0x0e, 0xe8,
+ 0x89, 0x61, 0xcf, 0x6f, 0x35, 0x00, 0xf9, 0xc4, 0xdb, 0x3d, 0x15, 0xcf, 0xf2, 0x75, 0x98, 0x13,
+ 0x27, 0x30, 0xea, 0x98, 0xbc, 0x46, 0x92, 0x83, 0xee, 0x41, 0xc1, 0x93, 0x4d, 0x95, 0x9a, 0xbe,
+ 0xbc, 0x31, 0x31, 0xf2, 0xd4, 0x3f, 0x5e, 0x1b, 0xd8, 0x7c, 0xb4, 0xfb, 0x98, 0x13, 0x57, 0xf8,
+ 0x18, 0x47, 0x5d, 0xd0, 0x99, 0x61, 0x05, 0x66, 0x6c, 0x3c, 0x7b, 0x5e, 0x9b, 0xf9, 0xf0, 0x79,
+ 0x6d, 0xe6, 0xa3, 0xe7, 0xb5, 0x99, 0xf7, 0x87, 0x35, 0xed, 0xd9, 0xb0, 0xa6, 0x7d, 0x38, 0xac,
+ 0x69, 0x1f, 0x0d, 0x6b, 0xda, 0xc7, 0xc3, 0x9a, 0xf6, 0xe4, 0x93, 0xda, 0xcc, 0x83, 0xdc, 0xe9,
+ 0xe6, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x80, 0x43, 0x11, 0x41, 0xbe, 0x1e, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto
new file mode 100644
index 000000000..a6be57a87
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto
@@ -0,0 +1,764 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.apimachinery.pkg.apis.meta.v1;
+
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1";
+
+// APIGroup contains the name, the supported versions, and the preferred version
+// of a group.
+message APIGroup {
+ // name is the name of the group.
+ optional string name = 1;
+
+ // versions are the versions supported in this group.
+ repeated GroupVersionForDiscovery versions = 2;
+
+ // preferredVersion is the version preferred by the API server, which
+ // probably is the storage version.
+ // +optional
+ optional GroupVersionForDiscovery preferredVersion = 3;
+
+ // a map of client CIDR to server address that is serving this group.
+ // This is to help clients reach servers in the most network-efficient way possible.
+ // Clients can use the appropriate server address as per the CIDR that they match.
+ // In case of multiple matches, clients should use the longest matching CIDR.
+ // The server returns only those CIDRs that it thinks that the client can match.
+ // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP.
+ // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.
+ repeated ServerAddressByClientCIDR serverAddressByClientCIDRs = 4;
+}
+
+// APIGroupList is a list of APIGroup, to allow clients to discover the API at
+// /apis.
+message APIGroupList {
+ // groups is a list of APIGroup.
+ repeated APIGroup groups = 1;
+}
+
+// APIResource specifies the name of a resource and whether it is namespaced.
+message APIResource {
+ // name is the plural name of the resource.
+ optional string name = 1;
+
+ // singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely.
+ // The singularName is more correct for reporting status on a single item and both singular and plural are allowed
+ // from the kubectl CLI interface.
+ optional string singularName = 6;
+
+ // namespaced indicates if a resource is namespaced or not.
+ optional bool namespaced = 2;
+
+ // kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')
+ optional string kind = 3;
+
+ // verbs is a list of supported kube verbs (this includes get, list, watch, create,
+ // update, patch, delete, deletecollection, and proxy)
+ optional Verbs verbs = 4;
+
+ // shortNames is a list of suggested short names of the resource.
+ repeated string shortNames = 5;
+
+ // categories is a list of the grouped resources this resource belongs to (e.g. 'all')
+ repeated string categories = 7;
+}
+
+// APIResourceList is a list of APIResource, it is used to expose the name of the
+// resources supported in a specific group and version, and if the resource
+// is namespaced.
+message APIResourceList {
+ // groupVersion is the group and version this APIResourceList is for.
+ optional string groupVersion = 1;
+
+ // resources contains the name of the resources and if they are namespaced.
+ repeated APIResource resources = 2;
+}
+
+// APIVersions lists the versions that are available, to allow clients to
+// discover the API at /api, which is the root path of the legacy v1 API.
+//
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+message APIVersions {
+ // versions are the api versions that are available.
+ repeated string versions = 1;
+
+ // a map of client CIDR to server address that is serving this group.
+ // This is to help clients reach servers in the most network-efficient way possible.
+ // Clients can use the appropriate server address as per the CIDR that they match.
+ // In case of multiple matches, clients should use the longest matching CIDR.
+ // The server returns only those CIDRs that it thinks that the client can match.
+ // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP.
+ // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.
+ repeated ServerAddressByClientCIDR serverAddressByClientCIDRs = 2;
+}
+
+// DeleteOptions may be provided when deleting an API object.
+message DeleteOptions {
+ // The duration in seconds before the object should be deleted. Value must be non-negative integer.
+ // The value zero indicates delete immediately. If this value is nil, the default grace period for the
+ // specified type will be used.
+ // Defaults to a per object value if not specified. zero means delete immediately.
+ // +optional
+ optional int64 gracePeriodSeconds = 1;
+
+ // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be
+ // returned.
+ // +optional
+ optional Preconditions preconditions = 2;
+
+ // Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7.
+ // Should the dependent objects be orphaned. If true/false, the "orphan"
+ // finalizer will be added to/removed from the object's finalizers list.
+ // Either this field or PropagationPolicy may be set, but not both.
+ // +optional
+ optional bool orphanDependents = 3;
+
+ // Whether and how garbage collection will be performed.
+ // Either this field or OrphanDependents may be set, but not both.
+ // The default policy is decided by the existing finalizer set in the
+ // metadata.finalizers and the resource-specific default policy.
+ // +optional
+ optional string propagationPolicy = 4;
+}
+
+// Duration is a wrapper around time.Duration which supports correct
+// marshaling to YAML and JSON. In particular, it marshals into strings, which
+// can be used as map keys in json.
+message Duration {
+ optional int64 duration = 1;
+}
+
+// ExportOptions is the query options to the standard REST get call.
+message ExportOptions {
+ // Should this value be exported. Export strips fields that a user can not specify.
+ optional bool export = 1;
+
+ // Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.
+ optional bool exact = 2;
+}
+
+// GetOptions is the standard query options to the standard REST get call.
+message GetOptions {
+ // When specified:
+ // - if unset, then the result is returned from remote storage based on quorum-read flag;
+ // - if it's 0, then we simply return what we currently have in cache, no guarantee;
+ // - if set to non zero, then the result is at least as fresh as given rv.
+ optional string resourceVersion = 1;
+
+ // If true, partially initialized resources are included in the response.
+ // +optional
+ optional bool includeUninitialized = 2;
+}
+
+// GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying
+// concepts during lookup stages without having partially valid types
+//
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+message GroupKind {
+ optional string group = 1;
+
+ optional string kind = 2;
+}
+
+// GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying
+// concepts during lookup stages without having partially valid types
+//
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+message GroupResource {
+ optional string group = 1;
+
+ optional string resource = 2;
+}
+
+// GroupVersion contains the "group" and the "version", which uniquely identifies the API.
+//
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+message GroupVersion {
+ optional string group = 1;
+
+ optional string version = 2;
+}
+
+// GroupVersion contains the "group/version" and "version" string of a version.
+// It is made a struct to keep extensibility.
+message GroupVersionForDiscovery {
+ // groupVersion specifies the API group and version in the form "group/version"
+ optional string groupVersion = 1;
+
+ // version specifies the version in the form of "version". This is to save
+ // the clients the trouble of splitting the GroupVersion.
+ optional string version = 2;
+}
+
+// GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion
+// to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling
+//
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+message GroupVersionKind {
+ optional string group = 1;
+
+ optional string version = 2;
+
+ optional string kind = 3;
+}
+
+// GroupVersionResource unambiguously identifies a resource. It doesn't anonymously include GroupVersion
+// to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling
+//
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+message GroupVersionResource {
+ optional string group = 1;
+
+ optional string version = 2;
+
+ optional string resource = 3;
+}
+
+// Initializer is information about an initializer that has not yet completed.
+message Initializer {
+ // name of the process that is responsible for initializing this object.
+ optional string name = 1;
+}
+
+// Initializers tracks the progress of initialization.
+message Initializers {
+ // Pending is a list of initializers that must execute in order before this object is visible.
+ // When the last pending initializer is removed, and no failing result is set, the initializers
+ // struct will be set to nil and the object is considered as initialized and visible to all
+ // clients.
+ repeated Initializer pending = 1;
+
+ // If result is set with the Failure field, the object will be persisted to storage and then deleted,
+ // ensuring that other clients can observe the deletion.
+ optional Status result = 2;
+}
+
+// A label selector is a label query over a set of resources. The result of matchLabels and
+// matchExpressions are ANDed. An empty label selector matches all objects. A null
+// label selector matches no objects.
+message LabelSelector {
+ // matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ // map is equivalent to an element of matchExpressions, whose key field is "key", the
+ // operator is "In", and the values array contains only "value". The requirements are ANDed.
+ // +optional
+ map<string, string> matchLabels = 1;
+
+ // matchExpressions is a list of label selector requirements. The requirements are ANDed.
+ // +optional
+ repeated LabelSelectorRequirement matchExpressions = 2;
+}
+
+// A label selector requirement is a selector that contains values, a key, and an operator that
+// relates the key and values.
+message LabelSelectorRequirement {
+ // key is the label key that the selector applies to.
+ // +patchMergeKey=key
+ // +patchStrategy=merge
+ optional string key = 1;
+
+ // operator represents a key's relationship to a set of values.
+ // Valid operators ard In, NotIn, Exists and DoesNotExist.
+ optional string operator = 2;
+
+ // values is an array of string values. If the operator is In or NotIn,
+ // the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ // the values array must be empty. This array is replaced during a strategic
+ // merge patch.
+ // +optional
+ repeated string values = 3;
+}
+
+// ListMeta describes metadata that synthetic resources must have, including lists and
+// various status objects. A resource may have only one of {ObjectMeta, ListMeta}.
+message ListMeta {
+ // SelfLink is a URL representing this object.
+ // Populated by the system.
+ // Read-only.
+ // +optional
+ optional string selfLink = 1;
+
+ // String that identifies the server's internal version of this object that
+ // can be used by clients to determine when objects have changed.
+ // Value must be treated as opaque by clients and passed unmodified back to the server.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
+ // +optional
+ optional string resourceVersion = 2;
+}
+
+// ListOptions is the query options to a standard REST list call.
+message ListOptions {
+ // A selector to restrict the list of returned objects by their labels.
+ // Defaults to everything.
+ // +optional
+ optional string labelSelector = 1;
+
+ // A selector to restrict the list of returned objects by their fields.
+ // Defaults to everything.
+ // +optional
+ optional string fieldSelector = 2;
+
+ // If true, partially initialized resources are included in the response.
+ // +optional
+ optional bool includeUninitialized = 6;
+
+ // Watch for changes to the described resources and return them as a stream of
+ // add, update, and remove notifications. Specify resourceVersion.
+ // +optional
+ optional bool watch = 3;
+
+ // When specified with a watch call, shows changes that occur after that particular version of a resource.
+ // Defaults to changes from the beginning of history.
+ // When specified for list:
+ // - if unset, then the result is returned from remote storage based on quorum-read flag;
+ // - if it's 0, then we simply return what we currently have in cache, no guarantee;
+ // - if set to non zero, then the result is at least as fresh as given rv.
+ // +optional
+ optional string resourceVersion = 4;
+
+ // Timeout for the list/watch call.
+ // +optional
+ optional int64 timeoutSeconds = 5;
+}
+
+// MicroTime is version of Time with microsecond level precision.
+//
+// +protobuf.options.marshal=false
+// +protobuf.as=Timestamp
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+message MicroTime {
+ // Represents seconds of UTC time since Unix epoch
+ // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
+ // 9999-12-31T23:59:59Z inclusive.
+ optional int64 seconds = 1;
+
+ // Non-negative fractions of a second at nanosecond resolution. Negative
+ // second values with fractions must still have non-negative nanos values
+ // that count forward in time. Must be from 0 to 999,999,999
+ // inclusive. This field may be limited in precision depending on context.
+ optional int32 nanos = 2;
+}
+
+// ObjectMeta is metadata that all persisted resources must have, which includes all objects
+// users must create.
+message ObjectMeta {
+ // Name must be unique within a namespace. Is required when creating resources, although
+ // some resources may allow a client to request the generation of an appropriate name
+ // automatically. Name is primarily intended for creation idempotence and configuration
+ // definition.
+ // Cannot be updated.
+ // More info: http://kubernetes.io/docs/user-guide/identifiers#names
+ // +optional
+ optional string name = 1;
+
+ // GenerateName is an optional prefix, used by the server, to generate a unique
+ // name ONLY IF the Name field has not been provided.
+ // If this field is used, the name returned to the client will be different
+ // than the name passed. This value will also be combined with a unique suffix.
+ // The provided value has the same validation rules as the Name field,
+ // and may be truncated by the length of the suffix required to make the value
+ // unique on the server.
+ //
+ // If this field is specified and the generated name exists, the server will
+ // NOT return a 409 - instead, it will either return 201 Created or 500 with Reason
+ // ServerTimeout indicating a unique name could not be found in the time allotted, and the client
+ // should retry (optionally after the time indicated in the Retry-After header).
+ //
+ // Applied only if Name is not specified.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency
+ // +optional
+ optional string generateName = 2;
+
+ // Namespace defines the space within each name must be unique. An empty namespace is
+ // equivalent to the "default" namespace, but "default" is the canonical representation.
+ // Not all objects are required to be scoped to a namespace - the value of this field for
+ // those objects will be empty.
+ //
+ // Must be a DNS_LABEL.
+ // Cannot be updated.
+ // More info: http://kubernetes.io/docs/user-guide/namespaces
+ // +optional
+ optional string namespace = 3;
+
+ // SelfLink is a URL representing this object.
+ // Populated by the system.
+ // Read-only.
+ // +optional
+ optional string selfLink = 4;
+
+ // UID is the unique in time and space value for this object. It is typically generated by
+ // the server on successful creation of a resource and is not allowed to change on PUT
+ // operations.
+ //
+ // Populated by the system.
+ // Read-only.
+ // More info: http://kubernetes.io/docs/user-guide/identifiers#uids
+ // +optional
+ optional string uid = 5;
+
+ // An opaque value that represents the internal version of this object that can
+ // be used by clients to determine when objects have changed. May be used for optimistic
+ // concurrency, change detection, and the watch operation on a resource or set of resources.
+ // Clients must treat these values as opaque and passed unmodified back to the server.
+ // They may only be valid for a particular resource or set of resources.
+ //
+ // Populated by the system.
+ // Read-only.
+ // Value must be treated as opaque by clients and .
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
+ // +optional
+ optional string resourceVersion = 6;
+
+ // A sequence number representing a specific generation of the desired state.
+ // Populated by the system. Read-only.
+ // +optional
+ optional int64 generation = 7;
+
+ // CreationTimestamp is a timestamp representing the server time when this object was
+ // created. It is not guaranteed to be set in happens-before order across separate operations.
+ // Clients may not set this value. It is represented in RFC3339 form and is in UTC.
+ //
+ // Populated by the system.
+ // Read-only.
+ // Null for lists.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional Time creationTimestamp = 8;
+
+ // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This
+ // field is set by the server when a graceful deletion is requested by the user, and is not
+ // directly settable by a client. The resource is expected to be deleted (no longer visible
+ // from resource lists, and not reachable by name) after the time in this field. Once set,
+ // this value may not be unset or be set further into the future, although it may be shortened
+ // or the resource may be deleted prior to this time. For example, a user may request that
+ // a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination
+ // signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard
+ // termination signal (SIGKILL) to the container and after cleanup, remove the pod from the
+ // API. In the presence of network partitions, this object may still exist after this
+ // timestamp, until an administrator or automated process can determine the resource is
+ // fully terminated.
+ // If not set, graceful deletion of the object has not been requested.
+ //
+ // Populated by the system when a graceful deletion is requested.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional Time deletionTimestamp = 9;
+
+ // Number of seconds allowed for this object to gracefully terminate before
+ // it will be removed from the system. Only set when deletionTimestamp is also set.
+ // May only be shortened.
+ // Read-only.
+ // +optional
+ optional int64 deletionGracePeriodSeconds = 10;
+
+ // Map of string keys and values that can be used to organize and categorize
+ // (scope and select) objects. May match selectors of replication controllers
+ // and services.
+ // More info: http://kubernetes.io/docs/user-guide/labels
+ // +optional
+ map<string, string> labels = 11;
+
+ // Annotations is an unstructured key value map stored with a resource that may be
+ // set by external tools to store and retrieve arbitrary metadata. They are not
+ // queryable and should be preserved when modifying objects.
+ // More info: http://kubernetes.io/docs/user-guide/annotations
+ // +optional
+ map<string, string> annotations = 12;
+
+ // List of objects depended by this object. If ALL objects in the list have
+ // been deleted, this object will be garbage collected. If this object is managed by a controller,
+ // then an entry in this list will point to this controller, with the controller field set to true.
+ // There cannot be more than one managing controller.
+ // +optional
+ // +patchMergeKey=uid
+ // +patchStrategy=merge
+ repeated OwnerReference ownerReferences = 13;
+
+ // An initializer is a controller which enforces some system invariant at object creation time.
+ // This field is a list of initializers that have not yet acted on this object. If nil or empty,
+ // this object has been completely initialized. Otherwise, the object is considered uninitialized
+ // and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to
+ // observe uninitialized objects.
+ //
+ // When an object is created, the system will populate this list with the current set of initializers.
+ // Only privileged users may set or modify this list. Once it is empty, it may not be modified further
+ // by any user.
+ optional Initializers initializers = 16;
+
+ // Must be empty before the object is deleted from the registry. Each entry
+ // is an identifier for the responsible component that will remove the entry
+ // from the list. If the deletionTimestamp of the object is non-nil, entries
+ // in this list can only be removed.
+ // +optional
+ // +patchStrategy=merge
+ repeated string finalizers = 14;
+
+ // The name of the cluster which the object belongs to.
+ // This is used to distinguish resources with same name and namespace in different clusters.
+ // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.
+ // +optional
+ optional string clusterName = 15;
+}
+
+// OwnerReference contains enough information to let you identify an owning
+// object. Currently, an owning object must be in the same namespace, so there
+// is no namespace field.
+message OwnerReference {
+ // API version of the referent.
+ optional string apiVersion = 5;
+
+ // Kind of the referent.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ optional string kind = 1;
+
+ // Name of the referent.
+ // More info: http://kubernetes.io/docs/user-guide/identifiers#names
+ optional string name = 3;
+
+ // UID of the referent.
+ // More info: http://kubernetes.io/docs/user-guide/identifiers#uids
+ optional string uid = 4;
+
+ // If true, this reference points to the managing controller.
+ // +optional
+ optional bool controller = 6;
+
+ // If true, AND if the owner has the "foregroundDeletion" finalizer, then
+ // the owner cannot be deleted from the key-value store until this
+ // reference is removed.
+ // Defaults to false.
+ // To set this field, a user needs "delete" permission of the owner,
+ // otherwise 422 (Unprocessable Entity) will be returned.
+ // +optional
+ optional bool blockOwnerDeletion = 7;
+}
+
+// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
+message Preconditions {
+ // Specifies the target UID.
+ // +optional
+ optional string uid = 1;
+}
+
+// RootPaths lists the paths available at root.
+// For example: "/healthz", "/apis".
+message RootPaths {
+ // paths are the paths available at root.
+ repeated string paths = 1;
+}
+
+// ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.
+message ServerAddressByClientCIDR {
+ // The CIDR with which clients can match their IP to figure out the server address that they should use.
+ optional string clientCIDR = 1;
+
+ // Address of this server, suitable for a client that matches the above CIDR.
+ // This can be a hostname, hostname:port, IP or IP:port.
+ optional string serverAddress = 2;
+}
+
+// Status is a return value for calls that don't return other objects.
+message Status {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional ListMeta metadata = 1;
+
+ // Status of the operation.
+ // One of: "Success" or "Failure".
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional string status = 2;
+
+ // A human-readable description of the status of this operation.
+ // +optional
+ optional string message = 3;
+
+ // A machine-readable description of why this operation is in the
+ // "Failure" status. If this value is empty there
+ // is no information available. A Reason clarifies an HTTP status
+ // code but does not override it.
+ // +optional
+ optional string reason = 4;
+
+ // Extended data associated with the reason. Each reason may define its
+ // own extended details. This field is optional and the data returned
+ // is not guaranteed to conform to any schema except that defined by
+ // the reason type.
+ // +optional
+ optional StatusDetails details = 5;
+
+ // Suggested HTTP return code for this status, 0 if not set.
+ // +optional
+ optional int32 code = 6;
+}
+
+// StatusCause provides more information about an api.Status failure, including
+// cases when multiple errors are encountered.
+message StatusCause {
+ // A machine-readable description of the cause of the error. If this value is
+ // empty there is no information available.
+ // +optional
+ optional string reason = 1;
+
+ // A human-readable description of the cause of the error. This field may be
+ // presented as-is to a reader.
+ // +optional
+ optional string message = 2;
+
+ // The field of the resource that has caused this error, as named by its JSON
+ // serialization. May include dot and postfix notation for nested attributes.
+ // Arrays are zero-indexed. Fields may appear more than once in an array of
+ // causes due to fields having multiple errors.
+ // Optional.
+ //
+ // Examples:
+ // "name" - the field "name" on the current resource
+ // "items[0].name" - the field "name" on the first array entry in "items"
+ // +optional
+ optional string field = 3;
+}
+
+// StatusDetails is a set of additional properties that MAY be set by the
+// server to provide additional information about a response. The Reason
+// field of a Status object defines what attributes will be set. Clients
+// must ignore fields that do not match the defined type of each attribute,
+// and should assume that any attribute may be empty, invalid, or under
+// defined.
+message StatusDetails {
+ // The name attribute of the resource associated with the status StatusReason
+ // (when there is a single name which can be described).
+ // +optional
+ optional string name = 1;
+
+ // The group attribute of the resource associated with the status StatusReason.
+ // +optional
+ optional string group = 2;
+
+ // The kind attribute of the resource associated with the status StatusReason.
+ // On some operations may differ from the requested resource Kind.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional string kind = 3;
+
+ // UID of the resource.
+ // (when there is a single resource which can be described).
+ // More info: http://kubernetes.io/docs/user-guide/identifiers#uids
+ // +optional
+ optional string uid = 6;
+
+ // The Causes array includes more details associated with the StatusReason
+ // failure. Not all StatusReasons may provide detailed causes.
+ // +optional
+ repeated StatusCause causes = 4;
+
+ // If specified, the time in seconds before the operation should be retried.
+ // +optional
+ optional int32 retryAfterSeconds = 5;
+}
+
+// Time is a wrapper around time.Time which supports correct
+// marshaling to YAML and JSON. Wrappers are provided for many
+// of the factory methods that the time package offers.
+//
+// +protobuf.options.marshal=false
+// +protobuf.as=Timestamp
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+message Time {
+ // Represents seconds of UTC time since Unix epoch
+ // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
+ // 9999-12-31T23:59:59Z inclusive.
+ optional int64 seconds = 1;
+
+ // Non-negative fractions of a second at nanosecond resolution. Negative
+ // second values with fractions must still have non-negative nanos values
+ // that count forward in time. Must be from 0 to 999,999,999
+ // inclusive. This field may be limited in precision depending on context.
+ optional int32 nanos = 2;
+}
+
+// Timestamp is a struct that is equivalent to Time, but intended for
+// protobuf marshalling/unmarshalling. It is generated into a serialization
+// that matches Time. Do not use in Go structs.
+message Timestamp {
+ // Represents seconds of UTC time since Unix epoch
+ // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
+ // 9999-12-31T23:59:59Z inclusive.
+ optional int64 seconds = 1;
+
+ // Non-negative fractions of a second at nanosecond resolution. Negative
+ // second values with fractions must still have non-negative nanos values
+ // that count forward in time. Must be from 0 to 999,999,999
+ // inclusive. This field may be limited in precision depending on context.
+ optional int32 nanos = 2;
+}
+
+// TypeMeta describes an individual object in an API response or request
+// with strings representing the type of the object and its API schema version.
+// Structures that are versioned or persisted should inline TypeMeta.
+message TypeMeta {
+ // Kind is a string value representing the REST resource this object represents.
+ // Servers may infer this from the endpoint the client submits requests to.
+ // Cannot be updated.
+ // In CamelCase.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional string kind = 1;
+
+ // APIVersion defines the versioned schema of this representation of an object.
+ // Servers should convert recognized schemas to the latest internal value, and
+ // may reject unrecognized values.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources
+ // +optional
+ optional string apiVersion = 2;
+}
+
+// Verbs masks the value so protobuf can generate
+//
+// +protobuf.nullable=true
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+message Verbs {
+ // items, if empty, will result in an empty slice
+
+ repeated string items = 1;
+}
+
+// Event represents a single event to a watched resource.
+//
+// +protobuf=true
+message WatchEvent {
+ optional string type = 1;
+
+ // Object is:
+ // * If Type is Added or Modified: the new state of the object.
+ // * If Type is Deleted: the state of the object immediately before deletion.
+ // * If Type is Error: *Status is recommended; other types may make sense
+ // depending on context.
+ optional k8s.io.apimachinery.pkg.runtime.RawExtension object = 2;
+}
+
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/group_version.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/group_version.go
new file mode 100644
index 000000000..bd4c6d9b5
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/group_version.go
@@ -0,0 +1,148 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "encoding/json"
+ "fmt"
+ "strings"
+
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying
+// concepts during lookup stages without having partially valid types
+//
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+type GroupResource struct {
+ Group string `json:"group" protobuf:"bytes,1,opt,name=group"`
+ Resource string `json:"resource" protobuf:"bytes,2,opt,name=resource"`
+}
+
+func (gr *GroupResource) String() string {
+ if len(gr.Group) == 0 {
+ return gr.Resource
+ }
+ return gr.Resource + "." + gr.Group
+}
+
+// GroupVersionResource unambiguously identifies a resource. It doesn't anonymously include GroupVersion
+// to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling
+//
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+type GroupVersionResource struct {
+ Group string `json:"group" protobuf:"bytes,1,opt,name=group"`
+ Version string `json:"version" protobuf:"bytes,2,opt,name=version"`
+ Resource string `json:"resource" protobuf:"bytes,3,opt,name=resource"`
+}
+
+func (gvr *GroupVersionResource) String() string {
+ return strings.Join([]string{gvr.Group, "/", gvr.Version, ", Resource=", gvr.Resource}, "")
+}
+
+// GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying
+// concepts during lookup stages without having partially valid types
+//
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+type GroupKind struct {
+ Group string `json:"group" protobuf:"bytes,1,opt,name=group"`
+ Kind string `json:"kind" protobuf:"bytes,2,opt,name=kind"`
+}
+
+func (gk *GroupKind) String() string {
+ if len(gk.Group) == 0 {
+ return gk.Kind
+ }
+ return gk.Kind + "." + gk.Group
+}
+
+// GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion
+// to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling
+//
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+type GroupVersionKind struct {
+ Group string `json:"group" protobuf:"bytes,1,opt,name=group"`
+ Version string `json:"version" protobuf:"bytes,2,opt,name=version"`
+ Kind string `json:"kind" protobuf:"bytes,3,opt,name=kind"`
+}
+
+func (gvk GroupVersionKind) String() string {
+ return gvk.Group + "/" + gvk.Version + ", Kind=" + gvk.Kind
+}
+
+// GroupVersion contains the "group" and the "version", which uniquely identifies the API.
+//
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+type GroupVersion struct {
+ Group string `json:"group" protobuf:"bytes,1,opt,name=group"`
+ Version string `json:"version" protobuf:"bytes,2,opt,name=version"`
+}
+
+// Empty returns true if group and version are empty
+func (gv GroupVersion) Empty() bool {
+ return len(gv.Group) == 0 && len(gv.Version) == 0
+}
+
+// String puts "group" and "version" into a single "group/version" string. For the legacy v1
+// it returns "v1".
+func (gv GroupVersion) String() string {
+ // special case the internal apiVersion for the legacy kube types
+ if gv.Empty() {
+ return ""
+ }
+
+ // special case of "v1" for backward compatibility
+ if len(gv.Group) == 0 && gv.Version == "v1" {
+ return gv.Version
+ }
+ if len(gv.Group) > 0 {
+ return gv.Group + "/" + gv.Version
+ }
+ return gv.Version
+}
+
+// MarshalJSON implements the json.Marshaller interface.
+func (gv GroupVersion) MarshalJSON() ([]byte, error) {
+ s := gv.String()
+ if strings.Count(s, "/") > 1 {
+ return []byte{}, fmt.Errorf("illegal GroupVersion %v: contains more than one /", s)
+ }
+ return json.Marshal(s)
+}
+
+func (gv *GroupVersion) unmarshal(value []byte) error {
+ var s string
+ if err := json.Unmarshal(value, &s); err != nil {
+ return err
+ }
+ parsed, err := schema.ParseGroupVersion(s)
+ if err != nil {
+ return err
+ }
+ gv.Group, gv.Version = parsed.Group, parsed.Version
+ return nil
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface.
+func (gv *GroupVersion) UnmarshalJSON(value []byte) error {
+ return gv.unmarshal(value)
+}
+
+// UnmarshalTEXT implements the Ugorji's encoding.TextUnmarshaler interface.
+func (gv *GroupVersion) UnmarshalText(value []byte) error {
+ return gv.unmarshal(value)
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go
new file mode 100644
index 000000000..d845d7b0f
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go
@@ -0,0 +1,234 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "fmt"
+
+ "k8s.io/apimachinery/pkg/fields"
+ "k8s.io/apimachinery/pkg/labels"
+ "k8s.io/apimachinery/pkg/selection"
+ "k8s.io/apimachinery/pkg/types"
+)
+
+// LabelSelectorAsSelector converts the LabelSelector api type into a struct that implements
+// labels.Selector
+// Note: This function should be kept in sync with the selector methods in pkg/labels/selector.go
+func LabelSelectorAsSelector(ps *LabelSelector) (labels.Selector, error) {
+ if ps == nil {
+ return labels.Nothing(), nil
+ }
+ if len(ps.MatchLabels)+len(ps.MatchExpressions) == 0 {
+ return labels.Everything(), nil
+ }
+ selector := labels.NewSelector()
+ for k, v := range ps.MatchLabels {
+ r, err := labels.NewRequirement(k, selection.Equals, []string{v})
+ if err != nil {
+ return nil, err
+ }
+ selector = selector.Add(*r)
+ }
+ for _, expr := range ps.MatchExpressions {
+ var op selection.Operator
+ switch expr.Operator {
+ case LabelSelectorOpIn:
+ op = selection.In
+ case LabelSelectorOpNotIn:
+ op = selection.NotIn
+ case LabelSelectorOpExists:
+ op = selection.Exists
+ case LabelSelectorOpDoesNotExist:
+ op = selection.DoesNotExist
+ default:
+ return nil, fmt.Errorf("%q is not a valid pod selector operator", expr.Operator)
+ }
+ r, err := labels.NewRequirement(expr.Key, op, append([]string(nil), expr.Values...))
+ if err != nil {
+ return nil, err
+ }
+ selector = selector.Add(*r)
+ }
+ return selector, nil
+}
+
+// LabelSelectorAsMap converts the LabelSelector api type into a map of strings, ie. the
+// original structure of a label selector. Operators that cannot be converted into plain
+// labels (Exists, DoesNotExist, NotIn, and In with more than one value) will result in
+// an error.
+func LabelSelectorAsMap(ps *LabelSelector) (map[string]string, error) {
+ if ps == nil {
+ return nil, nil
+ }
+ selector := map[string]string{}
+ for k, v := range ps.MatchLabels {
+ selector[k] = v
+ }
+ for _, expr := range ps.MatchExpressions {
+ switch expr.Operator {
+ case LabelSelectorOpIn:
+ if len(expr.Values) != 1 {
+ return selector, fmt.Errorf("operator %q without a single value cannot be converted into the old label selector format", expr.Operator)
+ }
+ // Should we do anything in case this will override a previous key-value pair?
+ selector[expr.Key] = expr.Values[0]
+ case LabelSelectorOpNotIn, LabelSelectorOpExists, LabelSelectorOpDoesNotExist:
+ return selector, fmt.Errorf("operator %q cannot be converted into the old label selector format", expr.Operator)
+ default:
+ return selector, fmt.Errorf("%q is not a valid selector operator", expr.Operator)
+ }
+ }
+ return selector, nil
+}
+
+// ParseToLabelSelector parses a string representing a selector into a LabelSelector object.
+// Note: This function should be kept in sync with the parser in pkg/labels/selector.go
+func ParseToLabelSelector(selector string) (*LabelSelector, error) {
+ reqs, err := labels.ParseToRequirements(selector)
+ if err != nil {
+ return nil, fmt.Errorf("couldn't parse the selector string \"%s\": %v", selector, err)
+ }
+
+ labelSelector := &LabelSelector{
+ MatchLabels: map[string]string{},
+ MatchExpressions: []LabelSelectorRequirement{},
+ }
+ for _, req := range reqs {
+ var op LabelSelectorOperator
+ switch req.Operator() {
+ case selection.Equals, selection.DoubleEquals:
+ vals := req.Values()
+ if vals.Len() != 1 {
+ return nil, fmt.Errorf("equals operator must have exactly one value")
+ }
+ val, ok := vals.PopAny()
+ if !ok {
+ return nil, fmt.Errorf("equals operator has exactly one value but it cannot be retrieved")
+ }
+ labelSelector.MatchLabels[req.Key()] = val
+ continue
+ case selection.In:
+ op = LabelSelectorOpIn
+ case selection.NotIn:
+ op = LabelSelectorOpNotIn
+ case selection.Exists:
+ op = LabelSelectorOpExists
+ case selection.DoesNotExist:
+ op = LabelSelectorOpDoesNotExist
+ case selection.GreaterThan, selection.LessThan:
+ // Adding a separate case for these operators to indicate that this is deliberate
+ return nil, fmt.Errorf("%q isn't supported in label selectors", req.Operator())
+ default:
+ return nil, fmt.Errorf("%q is not a valid label selector operator", req.Operator())
+ }
+ labelSelector.MatchExpressions = append(labelSelector.MatchExpressions, LabelSelectorRequirement{
+ Key: req.Key(),
+ Operator: op,
+ Values: req.Values().List(),
+ })
+ }
+ return labelSelector, nil
+}
+
+// SetAsLabelSelector converts the labels.Set object into a LabelSelector api object.
+func SetAsLabelSelector(ls labels.Set) *LabelSelector {
+ if ls == nil {
+ return nil
+ }
+
+ selector := &LabelSelector{
+ MatchLabels: make(map[string]string),
+ }
+ for label, value := range ls {
+ selector.MatchLabels[label] = value
+ }
+
+ return selector
+}
+
+// FormatLabelSelector convert labelSelector into plain string
+func FormatLabelSelector(labelSelector *LabelSelector) string {
+ selector, err := LabelSelectorAsSelector(labelSelector)
+ if err != nil {
+ return "<error>"
+ }
+
+ l := selector.String()
+ if len(l) == 0 {
+ l = "<none>"
+ }
+ return l
+}
+
+func ExtractGroupVersions(l *APIGroupList) []string {
+ var groupVersions []string
+ for _, g := range l.Groups {
+ for _, gv := range g.Versions {
+ groupVersions = append(groupVersions, gv.GroupVersion)
+ }
+ }
+ return groupVersions
+}
+
+// HasAnnotation returns a bool if passed in annotation exists
+func HasAnnotation(obj ObjectMeta, ann string) bool {
+ _, found := obj.Annotations[ann]
+ return found
+}
+
+// SetMetaDataAnnotation sets the annotation and value
+func SetMetaDataAnnotation(obj *ObjectMeta, ann string, value string) {
+ if obj.Annotations == nil {
+ obj.Annotations = make(map[string]string)
+ }
+ obj.Annotations[ann] = value
+}
+
+// SingleObject returns a ListOptions for watching a single object.
+func SingleObject(meta ObjectMeta) ListOptions {
+ return ListOptions{
+ FieldSelector: fields.OneTermEqualSelector("metadata.name", meta.Name).String(),
+ ResourceVersion: meta.ResourceVersion,
+ }
+}
+
+// NewDeleteOptions returns a DeleteOptions indicating the resource should
+// be deleted within the specified grace period. Use zero to indicate
+// immediate deletion. If you would prefer to use the default grace period,
+// use &metav1.DeleteOptions{} directly.
+func NewDeleteOptions(grace int64) *DeleteOptions {
+ return &DeleteOptions{GracePeriodSeconds: &grace}
+}
+
+// NewPreconditionDeleteOptions returns a DeleteOptions with a UID precondition set.
+func NewPreconditionDeleteOptions(uid string) *DeleteOptions {
+ u := types.UID(uid)
+ p := Preconditions{UID: &u}
+ return &DeleteOptions{Preconditions: &p}
+}
+
+// NewUIDPreconditions returns a Preconditions with UID set.
+func NewUIDPreconditions(uid string) *Preconditions {
+ u := types.UID(uid)
+ return &Preconditions{UID: &u}
+}
+
+// HasObjectMetaSystemFieldValues returns true if fields that are managed by the system on ObjectMeta have values.
+func HasObjectMetaSystemFieldValues(meta Object) bool {
+ return !meta.GetCreationTimestamp().Time.IsZero() ||
+ len(meta.GetUID()) != 0
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/labels.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/labels.go
new file mode 100644
index 000000000..8b4c0423e
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/labels.go
@@ -0,0 +1,75 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+// Clones the given selector and returns a new selector with the given key and value added.
+// Returns the given selector, if labelKey is empty.
+func CloneSelectorAndAddLabel(selector *LabelSelector, labelKey, labelValue string) *LabelSelector {
+ if labelKey == "" {
+ // Don't need to add a label.
+ return selector
+ }
+
+ // Clone.
+ newSelector := new(LabelSelector)
+
+ // TODO(madhusudancs): Check if you can use deepCopy_extensions_LabelSelector here.
+ newSelector.MatchLabels = make(map[string]string)
+ if selector.MatchLabels != nil {
+ for key, val := range selector.MatchLabels {
+ newSelector.MatchLabels[key] = val
+ }
+ }
+ newSelector.MatchLabels[labelKey] = labelValue
+
+ if selector.MatchExpressions != nil {
+ newMExps := make([]LabelSelectorRequirement, len(selector.MatchExpressions))
+ for i, me := range selector.MatchExpressions {
+ newMExps[i].Key = me.Key
+ newMExps[i].Operator = me.Operator
+ if me.Values != nil {
+ newMExps[i].Values = make([]string, len(me.Values))
+ copy(newMExps[i].Values, me.Values)
+ } else {
+ newMExps[i].Values = nil
+ }
+ }
+ newSelector.MatchExpressions = newMExps
+ } else {
+ newSelector.MatchExpressions = nil
+ }
+
+ return newSelector
+}
+
+// AddLabelToSelector returns a selector with the given key and value added to the given selector's MatchLabels.
+func AddLabelToSelector(selector *LabelSelector, labelKey, labelValue string) *LabelSelector {
+ if labelKey == "" {
+ // Don't need to add a label.
+ return selector
+ }
+ if selector.MatchLabels == nil {
+ selector.MatchLabels = make(map[string]string)
+ }
+ selector.MatchLabels[labelKey] = labelValue
+ return selector
+}
+
+// SelectorHasLabel checks if the given selector contains the given label key in its MatchLabels
+func SelectorHasLabel(selector *LabelSelector, labelKey string) bool {
+ return len(selector.MatchLabels[labelKey]) > 0
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go
new file mode 100644
index 000000000..0ee7d99ca
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go
@@ -0,0 +1,201 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/types"
+)
+
+// TODO: move this, Object, List, and Type to a different package
+type ObjectMetaAccessor interface {
+ GetObjectMeta() Object
+}
+
+// Object lets you work with object metadata from any of the versioned or
+// internal API objects. Attempting to set or retrieve a field on an object that does
+// not support that field (Name, UID, Namespace on lists) will be a no-op and return
+// a default value.
+type Object interface {
+ GetNamespace() string
+ SetNamespace(namespace string)
+ GetName() string
+ SetName(name string)
+ GetGenerateName() string
+ SetGenerateName(name string)
+ GetUID() types.UID
+ SetUID(uid types.UID)
+ GetResourceVersion() string
+ SetResourceVersion(version string)
+ GetGeneration() int64
+ SetGeneration(generation int64)
+ GetSelfLink() string
+ SetSelfLink(selfLink string)
+ GetCreationTimestamp() Time
+ SetCreationTimestamp(timestamp Time)
+ GetDeletionTimestamp() *Time
+ SetDeletionTimestamp(timestamp *Time)
+ GetDeletionGracePeriodSeconds() *int64
+ SetDeletionGracePeriodSeconds(*int64)
+ GetLabels() map[string]string
+ SetLabels(labels map[string]string)
+ GetAnnotations() map[string]string
+ SetAnnotations(annotations map[string]string)
+ GetInitializers() *Initializers
+ SetInitializers(initializers *Initializers)
+ GetFinalizers() []string
+ SetFinalizers(finalizers []string)
+ GetOwnerReferences() []OwnerReference
+ SetOwnerReferences([]OwnerReference)
+ GetClusterName() string
+ SetClusterName(clusterName string)
+}
+
+// ListMetaAccessor retrieves the list interface from an object
+type ListMetaAccessor interface {
+ GetListMeta() List
+}
+
+// List lets you work with list metadata from any of the versioned or
+// internal API objects. Attempting to set or retrieve a field on an object that does
+// not support that field will be a no-op and return a default value.
+// TODO: move this, and TypeMeta and ListMeta, to a different package
+type List interface {
+ GetResourceVersion() string
+ SetResourceVersion(version string)
+ GetSelfLink() string
+ SetSelfLink(selfLink string)
+}
+
+// Type exposes the type and APIVersion of versioned or internal API objects.
+// TODO: move this, and TypeMeta and ListMeta, to a different package
+type Type interface {
+ GetAPIVersion() string
+ SetAPIVersion(version string)
+ GetKind() string
+ SetKind(kind string)
+}
+
+func (meta *ListMeta) GetResourceVersion() string { return meta.ResourceVersion }
+func (meta *ListMeta) SetResourceVersion(version string) { meta.ResourceVersion = version }
+func (meta *ListMeta) GetSelfLink() string { return meta.SelfLink }
+func (meta *ListMeta) SetSelfLink(selfLink string) { meta.SelfLink = selfLink }
+
+func (obj *TypeMeta) GetObjectKind() schema.ObjectKind { return obj }
+
+// SetGroupVersionKind satisfies the ObjectKind interface for all objects that embed TypeMeta
+func (obj *TypeMeta) SetGroupVersionKind(gvk schema.GroupVersionKind) {
+ obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind()
+}
+
+// GroupVersionKind satisfies the ObjectKind interface for all objects that embed TypeMeta
+func (obj *TypeMeta) GroupVersionKind() schema.GroupVersionKind {
+ return schema.FromAPIVersionAndKind(obj.APIVersion, obj.Kind)
+}
+
+func (obj *ListMeta) GetListMeta() List { return obj }
+
+func (obj *ObjectMeta) GetObjectMeta() Object { return obj }
+
+// Namespace implements metav1.Object for any object with an ObjectMeta typed field. Allows
+// fast, direct access to metadata fields for API objects.
+func (meta *ObjectMeta) GetNamespace() string { return meta.Namespace }
+func (meta *ObjectMeta) SetNamespace(namespace string) { meta.Namespace = namespace }
+func (meta *ObjectMeta) GetName() string { return meta.Name }
+func (meta *ObjectMeta) SetName(name string) { meta.Name = name }
+func (meta *ObjectMeta) GetGenerateName() string { return meta.GenerateName }
+func (meta *ObjectMeta) SetGenerateName(generateName string) { meta.GenerateName = generateName }
+func (meta *ObjectMeta) GetUID() types.UID { return meta.UID }
+func (meta *ObjectMeta) SetUID(uid types.UID) { meta.UID = uid }
+func (meta *ObjectMeta) GetResourceVersion() string { return meta.ResourceVersion }
+func (meta *ObjectMeta) SetResourceVersion(version string) { meta.ResourceVersion = version }
+func (meta *ObjectMeta) GetGeneration() int64 { return meta.Generation }
+func (meta *ObjectMeta) SetGeneration(generation int64) { meta.Generation = generation }
+func (meta *ObjectMeta) GetSelfLink() string { return meta.SelfLink }
+func (meta *ObjectMeta) SetSelfLink(selfLink string) { meta.SelfLink = selfLink }
+func (meta *ObjectMeta) GetCreationTimestamp() Time { return meta.CreationTimestamp }
+func (meta *ObjectMeta) SetCreationTimestamp(creationTimestamp Time) {
+ meta.CreationTimestamp = creationTimestamp
+}
+func (meta *ObjectMeta) GetDeletionTimestamp() *Time { return meta.DeletionTimestamp }
+func (meta *ObjectMeta) SetDeletionTimestamp(deletionTimestamp *Time) {
+ meta.DeletionTimestamp = deletionTimestamp
+}
+func (meta *ObjectMeta) GetDeletionGracePeriodSeconds() *int64 { return meta.DeletionGracePeriodSeconds }
+func (meta *ObjectMeta) SetDeletionGracePeriodSeconds(deletionGracePeriodSeconds *int64) {
+ meta.DeletionGracePeriodSeconds = deletionGracePeriodSeconds
+}
+func (meta *ObjectMeta) GetLabels() map[string]string { return meta.Labels }
+func (meta *ObjectMeta) SetLabels(labels map[string]string) { meta.Labels = labels }
+func (meta *ObjectMeta) GetAnnotations() map[string]string { return meta.Annotations }
+func (meta *ObjectMeta) SetAnnotations(annotations map[string]string) { meta.Annotations = annotations }
+func (meta *ObjectMeta) GetInitializers() *Initializers { return meta.Initializers }
+func (meta *ObjectMeta) SetInitializers(initializers *Initializers) { meta.Initializers = initializers }
+func (meta *ObjectMeta) GetFinalizers() []string { return meta.Finalizers }
+func (meta *ObjectMeta) SetFinalizers(finalizers []string) { meta.Finalizers = finalizers }
+
+func (meta *ObjectMeta) GetOwnerReferences() []OwnerReference {
+ if meta.OwnerReferences == nil {
+ return nil
+ }
+ ret := make([]OwnerReference, len(meta.OwnerReferences))
+ for i := 0; i < len(meta.OwnerReferences); i++ {
+ ret[i].Kind = meta.OwnerReferences[i].Kind
+ ret[i].Name = meta.OwnerReferences[i].Name
+ ret[i].UID = meta.OwnerReferences[i].UID
+ ret[i].APIVersion = meta.OwnerReferences[i].APIVersion
+ if meta.OwnerReferences[i].Controller != nil {
+ value := *meta.OwnerReferences[i].Controller
+ ret[i].Controller = &value
+ }
+ if meta.OwnerReferences[i].BlockOwnerDeletion != nil {
+ value := *meta.OwnerReferences[i].BlockOwnerDeletion
+ ret[i].BlockOwnerDeletion = &value
+ }
+ }
+ return ret
+}
+
+func (meta *ObjectMeta) SetOwnerReferences(references []OwnerReference) {
+ if references == nil {
+ meta.OwnerReferences = nil
+ return
+ }
+ newReferences := make([]OwnerReference, len(references))
+ for i := 0; i < len(references); i++ {
+ newReferences[i].Kind = references[i].Kind
+ newReferences[i].Name = references[i].Name
+ newReferences[i].UID = references[i].UID
+ newReferences[i].APIVersion = references[i].APIVersion
+ if references[i].Controller != nil {
+ value := *references[i].Controller
+ newReferences[i].Controller = &value
+ }
+ if references[i].BlockOwnerDeletion != nil {
+ value := *references[i].BlockOwnerDeletion
+ newReferences[i].BlockOwnerDeletion = &value
+ }
+ }
+ meta.OwnerReferences = newReferences
+}
+
+func (meta *ObjectMeta) GetClusterName() string {
+ return meta.ClusterName
+}
+func (meta *ObjectMeta) SetClusterName(clusterName string) {
+ meta.ClusterName = clusterName
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go
new file mode 100644
index 000000000..d55f446b0
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go
@@ -0,0 +1,184 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "encoding/json"
+ "time"
+
+ "k8s.io/apimachinery/pkg/openapi"
+
+ "github.com/go-openapi/spec"
+ "github.com/google/gofuzz"
+)
+
+const RFC3339Micro = "2006-01-02T15:04:05.000000Z07:00"
+
+// MicroTime is version of Time with microsecond level precision.
+//
+// +protobuf.options.marshal=false
+// +protobuf.as=Timestamp
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+type MicroTime struct {
+ time.Time `protobuf:"-"`
+}
+
+// DeepCopy returns a deep-copy of the MicroTime value. The underlying time.Time
+// type is effectively immutable in the time API, so it is safe to
+// copy-by-assign, despite the presence of (unexported) Pointer fields.
+func (t MicroTime) DeepCopy() MicroTime {
+ return t
+}
+
+// String returns the representation of the time.
+func (t MicroTime) String() string {
+ return t.Time.String()
+}
+
+// NewMicroTime returns a wrapped instance of the provided time
+func NewMicroTime(time time.Time) MicroTime {
+ return MicroTime{time}
+}
+
+// DateMicro returns the MicroTime corresponding to the supplied parameters
+// by wrapping time.Date.
+func DateMicro(year int, month time.Month, day, hour, min, sec, nsec int, loc *time.Location) MicroTime {
+ return MicroTime{time.Date(year, month, day, hour, min, sec, nsec, loc)}
+}
+
+// NowMicro returns the current local time.
+func NowMicro() MicroTime {
+ return MicroTime{time.Now()}
+}
+
+// IsZero returns true if the value is nil or time is zero.
+func (t *MicroTime) IsZero() bool {
+ if t == nil {
+ return true
+ }
+ return t.Time.IsZero()
+}
+
+// Before reports whether the time instant t is before u.
+func (t MicroTime) Before(u MicroTime) bool {
+ return t.Time.Before(u.Time)
+}
+
+// Equal reports whether the time instant t is equal to u.
+func (t MicroTime) Equal(u MicroTime) bool {
+ return t.Time.Equal(u.Time)
+}
+
+// BeforeTime reports whether the time instant t is before second-lever precision u.
+func (t MicroTime) BeforeTime(u Time) bool {
+ return t.Time.Before(u.Time)
+}
+
+// EqualTime reports whether the time instant t is equal to second-lever precision u.
+func (t MicroTime) EqualTime(u Time) bool {
+ return t.Time.Equal(u.Time)
+}
+
+// UnixMicro returns the local time corresponding to the given Unix time
+// by wrapping time.Unix.
+func UnixMicro(sec int64, nsec int64) MicroTime {
+ return MicroTime{time.Unix(sec, nsec)}
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface.
+func (t *MicroTime) UnmarshalJSON(b []byte) error {
+ if len(b) == 4 && string(b) == "null" {
+ t.Time = time.Time{}
+ return nil
+ }
+
+ var str string
+ json.Unmarshal(b, &str)
+
+ pt, err := time.Parse(RFC3339Micro, str)
+ if err != nil {
+ return err
+ }
+
+ t.Time = pt.Local()
+ return nil
+}
+
+// UnmarshalQueryParameter converts from a URL query parameter value to an object
+func (t *MicroTime) UnmarshalQueryParameter(str string) error {
+ if len(str) == 0 {
+ t.Time = time.Time{}
+ return nil
+ }
+ // Tolerate requests from older clients that used JSON serialization to build query params
+ if len(str) == 4 && str == "null" {
+ t.Time = time.Time{}
+ return nil
+ }
+
+ pt, err := time.Parse(RFC3339Micro, str)
+ if err != nil {
+ return err
+ }
+
+ t.Time = pt.Local()
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaler interface.
+func (t MicroTime) MarshalJSON() ([]byte, error) {
+ if t.IsZero() {
+ // Encode unset/nil objects as JSON's "null".
+ return []byte("null"), nil
+ }
+
+ return json.Marshal(t.UTC().Format(RFC3339Micro))
+}
+
+func (_ MicroTime) OpenAPIDefinition() openapi.OpenAPIDefinition {
+ return openapi.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Type: []string{"string"},
+ Format: "date-time",
+ },
+ },
+ }
+}
+
+// MarshalQueryParameter converts to a URL query parameter value
+func (t MicroTime) MarshalQueryParameter() (string, error) {
+ if t.IsZero() {
+ // Encode unset/nil objects as an empty string
+ return "", nil
+ }
+
+ return t.UTC().Format(RFC3339Micro), nil
+}
+
+// Fuzz satisfies fuzz.Interface.
+func (t *MicroTime) Fuzz(c fuzz.Continue) {
+ if t == nil {
+ return
+ }
+ // Allow for about 1000 years of randomness. Leave off nanoseconds
+ // because JSON doesn't represent them so they can't round-trip
+ // properly.
+ t.Time = time.Unix(c.Rand.Int63n(1000*365*24*60*60*1000*1000), 0)
+}
+
+var _ fuzz.Interface = &MicroTime{}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_proto.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_proto.go
new file mode 100644
index 000000000..14841be51
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_proto.go
@@ -0,0 +1,72 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "time"
+)
+
+// Timestamp is declared in time_proto.go
+
+// Timestamp returns the Time as a new Timestamp value.
+func (m *MicroTime) ProtoMicroTime() *Timestamp {
+ if m == nil {
+ return &Timestamp{}
+ }
+ return &Timestamp{
+ Seconds: m.Time.Unix(),
+ Nanos: int32(m.Time.Nanosecond()),
+ }
+}
+
+// Size implements the protobuf marshalling interface.
+func (m *MicroTime) Size() (n int) {
+ if m == nil || m.Time.IsZero() {
+ return 0
+ }
+ return m.ProtoMicroTime().Size()
+}
+
+// Reset implements the protobuf marshalling interface.
+func (m *MicroTime) Unmarshal(data []byte) error {
+ if len(data) == 0 {
+ m.Time = time.Time{}
+ return nil
+ }
+ p := Timestamp{}
+ if err := p.Unmarshal(data); err != nil {
+ return err
+ }
+ m.Time = time.Unix(p.Seconds, int64(p.Nanos)).Local()
+ return nil
+}
+
+// Marshal implements the protobuf marshalling interface.
+func (m *MicroTime) Marshal() (data []byte, err error) {
+ if m == nil || m.Time.IsZero() {
+ return nil, nil
+ }
+ return m.ProtoMicroTime().Marshal()
+}
+
+// MarshalTo implements the protobuf marshalling interface.
+func (m *MicroTime) MarshalTo(data []byte) (int, error) {
+ if m == nil || m.Time.IsZero() {
+ return 0, nil
+ }
+ return m.ProtoMicroTime().MarshalTo(data)
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/register.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/register.go
new file mode 100644
index 000000000..6e449a436
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/register.go
@@ -0,0 +1,95 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name for this API.
+const GroupName = "meta.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
+
+// Unversioned is group version for unversioned API objects
+// TODO: this should be v1 probably
+var Unversioned = schema.GroupVersion{Group: "", Version: "v1"}
+
+// WatchEventKind is name reserved for serializing watch events.
+const WatchEventKind = "WatchEvent"
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// AddToGroupVersion registers common meta types into schemas.
+func AddToGroupVersion(scheme *runtime.Scheme, groupVersion schema.GroupVersion) {
+ scheme.AddKnownTypeWithName(groupVersion.WithKind(WatchEventKind), &WatchEvent{})
+ scheme.AddKnownTypeWithName(
+ schema.GroupVersion{Group: groupVersion.Group, Version: runtime.APIVersionInternal}.WithKind(WatchEventKind),
+ &InternalEvent{},
+ )
+ // Supports legacy code paths, most callers should use metav1.ParameterCodec for now
+ scheme.AddKnownTypes(groupVersion,
+ &ListOptions{},
+ &ExportOptions{},
+ &GetOptions{},
+ &DeleteOptions{},
+ )
+ scheme.AddConversionFuncs(
+ Convert_versioned_Event_to_watch_Event,
+ Convert_versioned_InternalEvent_to_versioned_Event,
+ Convert_watch_Event_to_versioned_Event,
+ Convert_versioned_Event_to_versioned_InternalEvent,
+ )
+
+ // Register Unversioned types under their own special group
+ scheme.AddUnversionedTypes(Unversioned,
+ &Status{},
+ &APIVersions{},
+ &APIGroupList{},
+ &APIGroup{},
+ &APIResourceList{},
+ )
+
+ // register manually. This usually goes through the SchemeBuilder, which we cannot use here.
+ scheme.AddGeneratedDeepCopyFuncs(GetGeneratedDeepCopyFuncs()...)
+ AddConversionFuncs(scheme)
+ RegisterDefaults(scheme)
+}
+
+// scheme is the registry for the common types that adhere to the meta v1 API spec.
+var scheme = runtime.NewScheme()
+
+// ParameterCodec knows about query parameters used with the meta v1 API spec.
+var ParameterCodec = runtime.NewParameterCodec(scheme)
+
+func init() {
+ scheme.AddUnversionedTypes(SchemeGroupVersion,
+ &ListOptions{},
+ &ExportOptions{},
+ &GetOptions{},
+ &DeleteOptions{},
+ )
+
+ // register manually. This usually goes through the SchemeBuilder, which we cannot use here.
+ scheme.AddGeneratedDeepCopyFuncs(GetGeneratedDeepCopyFuncs()...)
+ RegisterDefaults(scheme)
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time.go
new file mode 100644
index 000000000..a1e01f344
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time.go
@@ -0,0 +1,180 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "encoding/json"
+ "time"
+
+ "k8s.io/apimachinery/pkg/openapi"
+
+ "github.com/go-openapi/spec"
+ "github.com/google/gofuzz"
+)
+
+// Time is a wrapper around time.Time which supports correct
+// marshaling to YAML and JSON. Wrappers are provided for many
+// of the factory methods that the time package offers.
+//
+// +protobuf.options.marshal=false
+// +protobuf.as=Timestamp
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+type Time struct {
+ time.Time `protobuf:"-"`
+}
+
+// DeepCopy returns a deep-copy of the Time value. The underlying time.Time
+// type is effectively immutable in the time API, so it is safe to
+// copy-by-assign, despite the presence of (unexported) Pointer fields.
+func (t Time) DeepCopy() Time {
+ return t
+}
+
+// String returns the representation of the time.
+func (t Time) String() string {
+ return t.Time.String()
+}
+
+// NewTime returns a wrapped instance of the provided time
+func NewTime(time time.Time) Time {
+ return Time{time}
+}
+
+// Date returns the Time corresponding to the supplied parameters
+// by wrapping time.Date.
+func Date(year int, month time.Month, day, hour, min, sec, nsec int, loc *time.Location) Time {
+ return Time{time.Date(year, month, day, hour, min, sec, nsec, loc)}
+}
+
+// Now returns the current local time.
+func Now() Time {
+ return Time{time.Now()}
+}
+
+// IsZero returns true if the value is nil or time is zero.
+func (t *Time) IsZero() bool {
+ if t == nil {
+ return true
+ }
+ return t.Time.IsZero()
+}
+
+// Before reports whether the time instant t is before u.
+func (t Time) Before(u Time) bool {
+ return t.Time.Before(u.Time)
+}
+
+// Equal reports whether the time instant t is equal to u.
+func (t Time) Equal(u Time) bool {
+ return t.Time.Equal(u.Time)
+}
+
+// Unix returns the local time corresponding to the given Unix time
+// by wrapping time.Unix.
+func Unix(sec int64, nsec int64) Time {
+ return Time{time.Unix(sec, nsec)}
+}
+
+// Rfc3339Copy returns a copy of the Time at second-level precision.
+func (t Time) Rfc3339Copy() Time {
+ copied, _ := time.Parse(time.RFC3339, t.Format(time.RFC3339))
+ return Time{copied}
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface.
+func (t *Time) UnmarshalJSON(b []byte) error {
+ if len(b) == 4 && string(b) == "null" {
+ t.Time = time.Time{}
+ return nil
+ }
+
+ var str string
+ json.Unmarshal(b, &str)
+
+ pt, err := time.Parse(time.RFC3339, str)
+ if err != nil {
+ return err
+ }
+
+ t.Time = pt.Local()
+ return nil
+}
+
+// UnmarshalQueryParameter converts from a URL query parameter value to an object
+func (t *Time) UnmarshalQueryParameter(str string) error {
+ if len(str) == 0 {
+ t.Time = time.Time{}
+ return nil
+ }
+ // Tolerate requests from older clients that used JSON serialization to build query params
+ if len(str) == 4 && str == "null" {
+ t.Time = time.Time{}
+ return nil
+ }
+
+ pt, err := time.Parse(time.RFC3339, str)
+ if err != nil {
+ return err
+ }
+
+ t.Time = pt.Local()
+ return nil
+}
+
+// MarshalJSON implements the json.Marshaler interface.
+func (t Time) MarshalJSON() ([]byte, error) {
+ if t.IsZero() {
+ // Encode unset/nil objects as JSON's "null".
+ return []byte("null"), nil
+ }
+
+ return json.Marshal(t.UTC().Format(time.RFC3339))
+}
+
+func (_ Time) OpenAPIDefinition() openapi.OpenAPIDefinition {
+ return openapi.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Type: []string{"string"},
+ Format: "date-time",
+ },
+ },
+ }
+}
+
+// MarshalQueryParameter converts to a URL query parameter value
+func (t Time) MarshalQueryParameter() (string, error) {
+ if t.IsZero() {
+ // Encode unset/nil objects as an empty string
+ return "", nil
+ }
+
+ return t.UTC().Format(time.RFC3339), nil
+}
+
+// Fuzz satisfies fuzz.Interface.
+func (t *Time) Fuzz(c fuzz.Continue) {
+ if t == nil {
+ return
+ }
+ // Allow for about 1000 years of randomness. Leave off nanoseconds
+ // because JSON doesn't represent them so they can't round-trip
+ // properly.
+ t.Time = time.Unix(c.Rand.Int63n(1000*365*24*60*60), 0)
+}
+
+var _ fuzz.Interface = &Time{}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time_proto.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time_proto.go
new file mode 100644
index 000000000..5520529dd
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time_proto.go
@@ -0,0 +1,85 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "time"
+)
+
+// Timestamp is a struct that is equivalent to Time, but intended for
+// protobuf marshalling/unmarshalling. It is generated into a serialization
+// that matches Time. Do not use in Go structs.
+type Timestamp struct {
+ // Represents seconds of UTC time since Unix epoch
+ // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
+ // 9999-12-31T23:59:59Z inclusive.
+ Seconds int64 `json:"seconds" protobuf:"varint,1,opt,name=seconds"`
+ // Non-negative fractions of a second at nanosecond resolution. Negative
+ // second values with fractions must still have non-negative nanos values
+ // that count forward in time. Must be from 0 to 999,999,999
+ // inclusive. This field may be limited in precision depending on context.
+ Nanos int32 `json:"nanos" protobuf:"varint,2,opt,name=nanos"`
+}
+
+// Timestamp returns the Time as a new Timestamp value.
+func (m *Time) ProtoTime() *Timestamp {
+ if m == nil {
+ return &Timestamp{}
+ }
+ return &Timestamp{
+ Seconds: m.Time.Unix(),
+ Nanos: int32(m.Time.Nanosecond()),
+ }
+}
+
+// Size implements the protobuf marshalling interface.
+func (m *Time) Size() (n int) {
+ if m == nil || m.Time.IsZero() {
+ return 0
+ }
+ return m.ProtoTime().Size()
+}
+
+// Reset implements the protobuf marshalling interface.
+func (m *Time) Unmarshal(data []byte) error {
+ if len(data) == 0 {
+ m.Time = time.Time{}
+ return nil
+ }
+ p := Timestamp{}
+ if err := p.Unmarshal(data); err != nil {
+ return err
+ }
+ m.Time = time.Unix(p.Seconds, int64(p.Nanos)).Local()
+ return nil
+}
+
+// Marshal implements the protobuf marshalling interface.
+func (m *Time) Marshal() (data []byte, err error) {
+ if m == nil || m.Time.IsZero() {
+ return nil, nil
+ }
+ return m.ProtoTime().Marshal()
+}
+
+// MarshalTo implements the protobuf marshalling interface.
+func (m *Time) MarshalTo(data []byte) (int, error) {
+ if m == nil || m.Time.IsZero() {
+ return 0, nil
+ }
+ return m.ProtoTime().MarshalTo(data)
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go
new file mode 100644
index 000000000..c5ac31f79
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go
@@ -0,0 +1,843 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package unversioned contains API types that are common to all versions.
+//
+// The package contains two categories of types:
+// - external (serialized) types that lack their own version (e.g TypeMeta)
+// - internal (never-serialized) types that are needed by several different
+// api groups, and so live here, to avoid duplication and/or import loops
+// (e.g. LabelSelector).
+// In the future, we will probably move these categories of objects into
+// separate packages.
+package v1
+
+import (
+ "fmt"
+ "strings"
+
+ "k8s.io/apimachinery/pkg/types"
+)
+
+// TypeMeta describes an individual object in an API response or request
+// with strings representing the type of the object and its API schema version.
+// Structures that are versioned or persisted should inline TypeMeta.
+type TypeMeta struct {
+ // Kind is a string value representing the REST resource this object represents.
+ // Servers may infer this from the endpoint the client submits requests to.
+ // Cannot be updated.
+ // In CamelCase.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ Kind string `json:"kind,omitempty" protobuf:"bytes,1,opt,name=kind"`
+
+ // APIVersion defines the versioned schema of this representation of an object.
+ // Servers should convert recognized schemas to the latest internal value, and
+ // may reject unrecognized values.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources
+ // +optional
+ APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,2,opt,name=apiVersion"`
+}
+
+// ListMeta describes metadata that synthetic resources must have, including lists and
+// various status objects. A resource may have only one of {ObjectMeta, ListMeta}.
+type ListMeta struct {
+ // SelfLink is a URL representing this object.
+ // Populated by the system.
+ // Read-only.
+ // +optional
+ SelfLink string `json:"selfLink,omitempty" protobuf:"bytes,1,opt,name=selfLink"`
+
+ // String that identifies the server's internal version of this object that
+ // can be used by clients to determine when objects have changed.
+ // Value must be treated as opaque by clients and passed unmodified back to the server.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
+ // +optional
+ ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,2,opt,name=resourceVersion"`
+}
+
+// These are internal finalizer values for Kubernetes-like APIs, must be qualified name unless defined here
+const (
+ FinalizerOrphanDependents string = "orphan"
+ FinalizerDeleteDependents string = "foregroundDeletion"
+)
+
+// ObjectMeta is metadata that all persisted resources must have, which includes all objects
+// users must create.
+type ObjectMeta struct {
+ // Name must be unique within a namespace. Is required when creating resources, although
+ // some resources may allow a client to request the generation of an appropriate name
+ // automatically. Name is primarily intended for creation idempotence and configuration
+ // definition.
+ // Cannot be updated.
+ // More info: http://kubernetes.io/docs/user-guide/identifiers#names
+ // +optional
+ Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
+
+ // GenerateName is an optional prefix, used by the server, to generate a unique
+ // name ONLY IF the Name field has not been provided.
+ // If this field is used, the name returned to the client will be different
+ // than the name passed. This value will also be combined with a unique suffix.
+ // The provided value has the same validation rules as the Name field,
+ // and may be truncated by the length of the suffix required to make the value
+ // unique on the server.
+ //
+ // If this field is specified and the generated name exists, the server will
+ // NOT return a 409 - instead, it will either return 201 Created or 500 with Reason
+ // ServerTimeout indicating a unique name could not be found in the time allotted, and the client
+ // should retry (optionally after the time indicated in the Retry-After header).
+ //
+ // Applied only if Name is not specified.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency
+ // +optional
+ GenerateName string `json:"generateName,omitempty" protobuf:"bytes,2,opt,name=generateName"`
+
+ // Namespace defines the space within each name must be unique. An empty namespace is
+ // equivalent to the "default" namespace, but "default" is the canonical representation.
+ // Not all objects are required to be scoped to a namespace - the value of this field for
+ // those objects will be empty.
+ //
+ // Must be a DNS_LABEL.
+ // Cannot be updated.
+ // More info: http://kubernetes.io/docs/user-guide/namespaces
+ // +optional
+ Namespace string `json:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"`
+
+ // SelfLink is a URL representing this object.
+ // Populated by the system.
+ // Read-only.
+ // +optional
+ SelfLink string `json:"selfLink,omitempty" protobuf:"bytes,4,opt,name=selfLink"`
+
+ // UID is the unique in time and space value for this object. It is typically generated by
+ // the server on successful creation of a resource and is not allowed to change on PUT
+ // operations.
+ //
+ // Populated by the system.
+ // Read-only.
+ // More info: http://kubernetes.io/docs/user-guide/identifiers#uids
+ // +optional
+ UID types.UID `json:"uid,omitempty" protobuf:"bytes,5,opt,name=uid,casttype=k8s.io/kubernetes/pkg/types.UID"`
+
+ // An opaque value that represents the internal version of this object that can
+ // be used by clients to determine when objects have changed. May be used for optimistic
+ // concurrency, change detection, and the watch operation on a resource or set of resources.
+ // Clients must treat these values as opaque and passed unmodified back to the server.
+ // They may only be valid for a particular resource or set of resources.
+ //
+ // Populated by the system.
+ // Read-only.
+ // Value must be treated as opaque by clients and .
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
+ // +optional
+ ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,6,opt,name=resourceVersion"`
+
+ // A sequence number representing a specific generation of the desired state.
+ // Populated by the system. Read-only.
+ // +optional
+ Generation int64 `json:"generation,omitempty" protobuf:"varint,7,opt,name=generation"`
+
+ // CreationTimestamp is a timestamp representing the server time when this object was
+ // created. It is not guaranteed to be set in happens-before order across separate operations.
+ // Clients may not set this value. It is represented in RFC3339 form and is in UTC.
+ //
+ // Populated by the system.
+ // Read-only.
+ // Null for lists.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ CreationTimestamp Time `json:"creationTimestamp,omitempty" protobuf:"bytes,8,opt,name=creationTimestamp"`
+
+ // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This
+ // field is set by the server when a graceful deletion is requested by the user, and is not
+ // directly settable by a client. The resource is expected to be deleted (no longer visible
+ // from resource lists, and not reachable by name) after the time in this field. Once set,
+ // this value may not be unset or be set further into the future, although it may be shortened
+ // or the resource may be deleted prior to this time. For example, a user may request that
+ // a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination
+ // signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard
+ // termination signal (SIGKILL) to the container and after cleanup, remove the pod from the
+ // API. In the presence of network partitions, this object may still exist after this
+ // timestamp, until an administrator or automated process can determine the resource is
+ // fully terminated.
+ // If not set, graceful deletion of the object has not been requested.
+ //
+ // Populated by the system when a graceful deletion is requested.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ DeletionTimestamp *Time `json:"deletionTimestamp,omitempty" protobuf:"bytes,9,opt,name=deletionTimestamp"`
+
+ // Number of seconds allowed for this object to gracefully terminate before
+ // it will be removed from the system. Only set when deletionTimestamp is also set.
+ // May only be shortened.
+ // Read-only.
+ // +optional
+ DeletionGracePeriodSeconds *int64 `json:"deletionGracePeriodSeconds,omitempty" protobuf:"varint,10,opt,name=deletionGracePeriodSeconds"`
+
+ // Map of string keys and values that can be used to organize and categorize
+ // (scope and select) objects. May match selectors of replication controllers
+ // and services.
+ // More info: http://kubernetes.io/docs/user-guide/labels
+ // +optional
+ Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,11,rep,name=labels"`
+
+ // Annotations is an unstructured key value map stored with a resource that may be
+ // set by external tools to store and retrieve arbitrary metadata. They are not
+ // queryable and should be preserved when modifying objects.
+ // More info: http://kubernetes.io/docs/user-guide/annotations
+ // +optional
+ Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,12,rep,name=annotations"`
+
+ // List of objects depended by this object. If ALL objects in the list have
+ // been deleted, this object will be garbage collected. If this object is managed by a controller,
+ // then an entry in this list will point to this controller, with the controller field set to true.
+ // There cannot be more than one managing controller.
+ // +optional
+ // +patchMergeKey=uid
+ // +patchStrategy=merge
+ OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" patchStrategy:"merge" patchMergeKey:"uid" protobuf:"bytes,13,rep,name=ownerReferences"`
+
+ // An initializer is a controller which enforces some system invariant at object creation time.
+ // This field is a list of initializers that have not yet acted on this object. If nil or empty,
+ // this object has been completely initialized. Otherwise, the object is considered uninitialized
+ // and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to
+ // observe uninitialized objects.
+ //
+ // When an object is created, the system will populate this list with the current set of initializers.
+ // Only privileged users may set or modify this list. Once it is empty, it may not be modified further
+ // by any user.
+ Initializers *Initializers `json:"initializers,omitempty" protobuf:"bytes,16,opt,name=initializers"`
+
+ // Must be empty before the object is deleted from the registry. Each entry
+ // is an identifier for the responsible component that will remove the entry
+ // from the list. If the deletionTimestamp of the object is non-nil, entries
+ // in this list can only be removed.
+ // +optional
+ // +patchStrategy=merge
+ Finalizers []string `json:"finalizers,omitempty" patchStrategy:"merge" protobuf:"bytes,14,rep,name=finalizers"`
+
+ // The name of the cluster which the object belongs to.
+ // This is used to distinguish resources with same name and namespace in different clusters.
+ // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.
+ // +optional
+ ClusterName string `json:"clusterName,omitempty" protobuf:"bytes,15,opt,name=clusterName"`
+}
+
+// Initializers tracks the progress of initialization.
+type Initializers struct {
+ // Pending is a list of initializers that must execute in order before this object is visible.
+ // When the last pending initializer is removed, and no failing result is set, the initializers
+ // struct will be set to nil and the object is considered as initialized and visible to all
+ // clients.
+ Pending []Initializer `json:"pending" protobuf:"bytes,1,rep,name=pending"`
+ // If result is set with the Failure field, the object will be persisted to storage and then deleted,
+ // ensuring that other clients can observe the deletion.
+ Result *Status `json:"result,omitempty" protobuf:"bytes,2,opt,name=result"`
+}
+
+// Initializer is information about an initializer that has not yet completed.
+type Initializer struct {
+ // name of the process that is responsible for initializing this object.
+ Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
+}
+
+const (
+ // NamespaceDefault means the object is in the default namespace which is applied when not specified by clients
+ NamespaceDefault string = "default"
+ // NamespaceAll is the default argument to specify on a context when you want to list or filter resources across all namespaces
+ NamespaceAll string = ""
+ // NamespaceNone is the argument for a context when there is no namespace.
+ NamespaceNone string = ""
+ // NamespaceSystem is the system namespace where we place system components.
+ NamespaceSystem string = "kube-system"
+ // NamespacePublic is the namespace where we place public info (ConfigMaps)
+ NamespacePublic string = "kube-public"
+)
+
+// OwnerReference contains enough information to let you identify an owning
+// object. Currently, an owning object must be in the same namespace, so there
+// is no namespace field.
+type OwnerReference struct {
+ // API version of the referent.
+ APIVersion string `json:"apiVersion" protobuf:"bytes,5,opt,name=apiVersion"`
+ // Kind of the referent.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
+ // Name of the referent.
+ // More info: http://kubernetes.io/docs/user-guide/identifiers#names
+ Name string `json:"name" protobuf:"bytes,3,opt,name=name"`
+ // UID of the referent.
+ // More info: http://kubernetes.io/docs/user-guide/identifiers#uids
+ UID types.UID `json:"uid" protobuf:"bytes,4,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"`
+ // If true, this reference points to the managing controller.
+ // +optional
+ Controller *bool `json:"controller,omitempty" protobuf:"varint,6,opt,name=controller"`
+ // If true, AND if the owner has the "foregroundDeletion" finalizer, then
+ // the owner cannot be deleted from the key-value store until this
+ // reference is removed.
+ // Defaults to false.
+ // To set this field, a user needs "delete" permission of the owner,
+ // otherwise 422 (Unprocessable Entity) will be returned.
+ // +optional
+ BlockOwnerDeletion *bool `json:"blockOwnerDeletion,omitempty" protobuf:"varint,7,opt,name=blockOwnerDeletion"`
+}
+
+// ListOptions is the query options to a standard REST list call.
+type ListOptions struct {
+ TypeMeta `json:",inline"`
+
+ // A selector to restrict the list of returned objects by their labels.
+ // Defaults to everything.
+ // +optional
+ LabelSelector string `json:"labelSelector,omitempty" protobuf:"bytes,1,opt,name=labelSelector"`
+ // A selector to restrict the list of returned objects by their fields.
+ // Defaults to everything.
+ // +optional
+ FieldSelector string `json:"fieldSelector,omitempty" protobuf:"bytes,2,opt,name=fieldSelector"`
+ // If true, partially initialized resources are included in the response.
+ // +optional
+ IncludeUninitialized bool `json:"includeUninitialized,omitempty" protobuf:"varint,6,opt,name=includeUninitialized"`
+ // Watch for changes to the described resources and return them as a stream of
+ // add, update, and remove notifications. Specify resourceVersion.
+ // +optional
+ Watch bool `json:"watch,omitempty" protobuf:"varint,3,opt,name=watch"`
+ // When specified with a watch call, shows changes that occur after that particular version of a resource.
+ // Defaults to changes from the beginning of history.
+ // When specified for list:
+ // - if unset, then the result is returned from remote storage based on quorum-read flag;
+ // - if it's 0, then we simply return what we currently have in cache, no guarantee;
+ // - if set to non zero, then the result is at least as fresh as given rv.
+ // +optional
+ ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,4,opt,name=resourceVersion"`
+ // Timeout for the list/watch call.
+ // +optional
+ TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty" protobuf:"varint,5,opt,name=timeoutSeconds"`
+}
+
+// ExportOptions is the query options to the standard REST get call.
+type ExportOptions struct {
+ TypeMeta `json:",inline"`
+ // Should this value be exported. Export strips fields that a user can not specify.
+ Export bool `json:"export" protobuf:"varint,1,opt,name=export"`
+ // Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.
+ Exact bool `json:"exact" protobuf:"varint,2,opt,name=exact"`
+}
+
+// GetOptions is the standard query options to the standard REST get call.
+type GetOptions struct {
+ TypeMeta `json:",inline"`
+ // When specified:
+ // - if unset, then the result is returned from remote storage based on quorum-read flag;
+ // - if it's 0, then we simply return what we currently have in cache, no guarantee;
+ // - if set to non zero, then the result is at least as fresh as given rv.
+ ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,1,opt,name=resourceVersion"`
+ // If true, partially initialized resources are included in the response.
+ // +optional
+ IncludeUninitialized bool `json:"includeUninitialized,omitempty" protobuf:"varint,2,opt,name=includeUninitialized"`
+}
+
+// DeletionPropagation decides if a deletion will propagate to the dependents of
+// the object, and how the garbage collector will handle the propagation.
+type DeletionPropagation string
+
+const (
+ // Orphans the dependents.
+ DeletePropagationOrphan DeletionPropagation = "Orphan"
+ // Deletes the object from the key-value store, the garbage collector will
+ // delete the dependents in the background.
+ DeletePropagationBackground DeletionPropagation = "Background"
+ // The object exists in the key-value store until the garbage collector
+ // deletes all the dependents whose ownerReference.blockOwnerDeletion=true
+ // from the key-value store. API sever will put the "foregroundDeletion"
+ // finalizer on the object, and sets its deletionTimestamp. This policy is
+ // cascading, i.e., the dependents will be deleted with Foreground.
+ DeletePropagationForeground DeletionPropagation = "Foreground"
+)
+
+// DeleteOptions may be provided when deleting an API object.
+type DeleteOptions struct {
+ TypeMeta `json:",inline"`
+
+ // The duration in seconds before the object should be deleted. Value must be non-negative integer.
+ // The value zero indicates delete immediately. If this value is nil, the default grace period for the
+ // specified type will be used.
+ // Defaults to a per object value if not specified. zero means delete immediately.
+ // +optional
+ GracePeriodSeconds *int64 `json:"gracePeriodSeconds,omitempty" protobuf:"varint,1,opt,name=gracePeriodSeconds"`
+
+ // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be
+ // returned.
+ // +optional
+ Preconditions *Preconditions `json:"preconditions,omitempty" protobuf:"bytes,2,opt,name=preconditions"`
+
+ // Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7.
+ // Should the dependent objects be orphaned. If true/false, the "orphan"
+ // finalizer will be added to/removed from the object's finalizers list.
+ // Either this field or PropagationPolicy may be set, but not both.
+ // +optional
+ OrphanDependents *bool `json:"orphanDependents,omitempty" protobuf:"varint,3,opt,name=orphanDependents"`
+
+ // Whether and how garbage collection will be performed.
+ // Either this field or OrphanDependents may be set, but not both.
+ // The default policy is decided by the existing finalizer set in the
+ // metadata.finalizers and the resource-specific default policy.
+ // +optional
+ PropagationPolicy *DeletionPropagation `json:"propagationPolicy,omitempty" protobuf:"varint,4,opt,name=propagationPolicy"`
+}
+
+// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
+type Preconditions struct {
+ // Specifies the target UID.
+ // +optional
+ UID *types.UID `json:"uid,omitempty" protobuf:"bytes,1,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"`
+}
+
+// Status is a return value for calls that don't return other objects.
+type Status struct {
+ TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Status of the operation.
+ // One of: "Success" or "Failure".
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status string `json:"status,omitempty" protobuf:"bytes,2,opt,name=status"`
+ // A human-readable description of the status of this operation.
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"`
+ // A machine-readable description of why this operation is in the
+ // "Failure" status. If this value is empty there
+ // is no information available. A Reason clarifies an HTTP status
+ // code but does not override it.
+ // +optional
+ Reason StatusReason `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason,casttype=StatusReason"`
+ // Extended data associated with the reason. Each reason may define its
+ // own extended details. This field is optional and the data returned
+ // is not guaranteed to conform to any schema except that defined by
+ // the reason type.
+ // +optional
+ Details *StatusDetails `json:"details,omitempty" protobuf:"bytes,5,opt,name=details"`
+ // Suggested HTTP return code for this status, 0 if not set.
+ // +optional
+ Code int32 `json:"code,omitempty" protobuf:"varint,6,opt,name=code"`
+}
+
+// StatusDetails is a set of additional properties that MAY be set by the
+// server to provide additional information about a response. The Reason
+// field of a Status object defines what attributes will be set. Clients
+// must ignore fields that do not match the defined type of each attribute,
+// and should assume that any attribute may be empty, invalid, or under
+// defined.
+type StatusDetails struct {
+ // The name attribute of the resource associated with the status StatusReason
+ // (when there is a single name which can be described).
+ // +optional
+ Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
+ // The group attribute of the resource associated with the status StatusReason.
+ // +optional
+ Group string `json:"group,omitempty" protobuf:"bytes,2,opt,name=group"`
+ // The kind attribute of the resource associated with the status StatusReason.
+ // On some operations may differ from the requested resource Kind.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ Kind string `json:"kind,omitempty" protobuf:"bytes,3,opt,name=kind"`
+ // UID of the resource.
+ // (when there is a single resource which can be described).
+ // More info: http://kubernetes.io/docs/user-guide/identifiers#uids
+ // +optional
+ UID types.UID `json:"uid,omitempty" protobuf:"bytes,6,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"`
+ // The Causes array includes more details associated with the StatusReason
+ // failure. Not all StatusReasons may provide detailed causes.
+ // +optional
+ Causes []StatusCause `json:"causes,omitempty" protobuf:"bytes,4,rep,name=causes"`
+ // If specified, the time in seconds before the operation should be retried.
+ // +optional
+ RetryAfterSeconds int32 `json:"retryAfterSeconds,omitempty" protobuf:"varint,5,opt,name=retryAfterSeconds"`
+}
+
+// Values of Status.Status
+const (
+ StatusSuccess = "Success"
+ StatusFailure = "Failure"
+)
+
+// StatusReason is an enumeration of possible failure causes. Each StatusReason
+// must map to a single HTTP status code, but multiple reasons may map
+// to the same HTTP status code.
+// TODO: move to apiserver
+type StatusReason string
+
+const (
+ // StatusReasonUnknown means the server has declined to indicate a specific reason.
+ // The details field may contain other information about this error.
+ // Status code 500.
+ StatusReasonUnknown StatusReason = ""
+
+ // StatusReasonUnauthorized means the server can be reached and understood the request, but requires
+ // the user to present appropriate authorization credentials (identified by the WWW-Authenticate header)
+ // in order for the action to be completed. If the user has specified credentials on the request, the
+ // server considers them insufficient.
+ // Status code 401
+ StatusReasonUnauthorized StatusReason = "Unauthorized"
+
+ // StatusReasonForbidden means the server can be reached and understood the request, but refuses
+ // to take any further action. It is the result of the server being configured to deny access for some reason
+ // to the requested resource by the client.
+ // Details (optional):
+ // "kind" string - the kind attribute of the forbidden resource
+ // on some operations may differ from the requested
+ // resource.
+ // "id" string - the identifier of the forbidden resource
+ // Status code 403
+ StatusReasonForbidden StatusReason = "Forbidden"
+
+ // StatusReasonNotFound means one or more resources required for this operation
+ // could not be found.
+ // Details (optional):
+ // "kind" string - the kind attribute of the missing resource
+ // on some operations may differ from the requested
+ // resource.
+ // "id" string - the identifier of the missing resource
+ // Status code 404
+ StatusReasonNotFound StatusReason = "NotFound"
+
+ // StatusReasonAlreadyExists means the resource you are creating already exists.
+ // Details (optional):
+ // "kind" string - the kind attribute of the conflicting resource
+ // "id" string - the identifier of the conflicting resource
+ // Status code 409
+ StatusReasonAlreadyExists StatusReason = "AlreadyExists"
+
+ // StatusReasonConflict means the requested operation cannot be completed
+ // due to a conflict in the operation. The client may need to alter the
+ // request. Each resource may define custom details that indicate the
+ // nature of the conflict.
+ // Status code 409
+ StatusReasonConflict StatusReason = "Conflict"
+
+ // StatusReasonGone means the item is no longer available at the server and no
+ // forwarding address is known.
+ // Status code 410
+ StatusReasonGone StatusReason = "Gone"
+
+ // StatusReasonInvalid means the requested create or update operation cannot be
+ // completed due to invalid data provided as part of the request. The client may
+ // need to alter the request. When set, the client may use the StatusDetails
+ // message field as a summary of the issues encountered.
+ // Details (optional):
+ // "kind" string - the kind attribute of the invalid resource
+ // "id" string - the identifier of the invalid resource
+ // "causes" - one or more StatusCause entries indicating the data in the
+ // provided resource that was invalid. The code, message, and
+ // field attributes will be set.
+ // Status code 422
+ StatusReasonInvalid StatusReason = "Invalid"
+
+ // StatusReasonServerTimeout means the server can be reached and understood the request,
+ // but cannot complete the action in a reasonable time. The client should retry the request.
+ // This is may be due to temporary server load or a transient communication issue with
+ // another server. Status code 500 is used because the HTTP spec provides no suitable
+ // server-requested client retry and the 5xx class represents actionable errors.
+ // Details (optional):
+ // "kind" string - the kind attribute of the resource being acted on.
+ // "id" string - the operation that is being attempted.
+ // "retryAfterSeconds" int32 - the number of seconds before the operation should be retried
+ // Status code 500
+ StatusReasonServerTimeout StatusReason = "ServerTimeout"
+
+ // StatusReasonTimeout means that the request could not be completed within the given time.
+ // Clients can get this response only when they specified a timeout param in the request,
+ // or if the server cannot complete the operation within a reasonable amount of time.
+ // The request might succeed with an increased value of timeout param. The client *should*
+ // wait at least the number of seconds specified by the retryAfterSeconds field.
+ // Details (optional):
+ // "retryAfterSeconds" int32 - the number of seconds before the operation should be retried
+ // Status code 504
+ StatusReasonTimeout StatusReason = "Timeout"
+
+ // StatusReasonBadRequest means that the request itself was invalid, because the request
+ // doesn't make any sense, for example deleting a read-only object. This is different than
+ // StatusReasonInvalid above which indicates that the API call could possibly succeed, but the
+ // data was invalid. API calls that return BadRequest can never succeed.
+ StatusReasonBadRequest StatusReason = "BadRequest"
+
+ // StatusReasonMethodNotAllowed means that the action the client attempted to perform on the
+ // resource was not supported by the code - for instance, attempting to delete a resource that
+ // can only be created. API calls that return MethodNotAllowed can never succeed.
+ StatusReasonMethodNotAllowed StatusReason = "MethodNotAllowed"
+
+ // StatusReasonInternalError indicates that an internal error occurred, it is unexpected
+ // and the outcome of the call is unknown.
+ // Details (optional):
+ // "causes" - The original error
+ // Status code 500
+ StatusReasonInternalError StatusReason = "InternalError"
+
+ // StatusReasonExpired indicates that the request is invalid because the content you are requesting
+ // has expired and is no longer available. It is typically associated with watches that can't be
+ // serviced.
+ // Status code 410 (gone)
+ StatusReasonExpired StatusReason = "Expired"
+
+ // StatusReasonServiceUnavailable means that the request itself was valid,
+ // but the requested service is unavailable at this time.
+ // Retrying the request after some time might succeed.
+ // Status code 503
+ StatusReasonServiceUnavailable StatusReason = "ServiceUnavailable"
+)
+
+// StatusCause provides more information about an api.Status failure, including
+// cases when multiple errors are encountered.
+type StatusCause struct {
+ // A machine-readable description of the cause of the error. If this value is
+ // empty there is no information available.
+ // +optional
+ Type CauseType `json:"reason,omitempty" protobuf:"bytes,1,opt,name=reason,casttype=CauseType"`
+ // A human-readable description of the cause of the error. This field may be
+ // presented as-is to a reader.
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"`
+ // The field of the resource that has caused this error, as named by its JSON
+ // serialization. May include dot and postfix notation for nested attributes.
+ // Arrays are zero-indexed. Fields may appear more than once in an array of
+ // causes due to fields having multiple errors.
+ // Optional.
+ //
+ // Examples:
+ // "name" - the field "name" on the current resource
+ // "items[0].name" - the field "name" on the first array entry in "items"
+ // +optional
+ Field string `json:"field,omitempty" protobuf:"bytes,3,opt,name=field"`
+}
+
+// CauseType is a machine readable value providing more detail about what
+// occurred in a status response. An operation may have multiple causes for a
+// status (whether Failure or Success).
+type CauseType string
+
+const (
+ // CauseTypeFieldValueNotFound is used to report failure to find a requested value
+ // (e.g. looking up an ID).
+ CauseTypeFieldValueNotFound CauseType = "FieldValueNotFound"
+ // CauseTypeFieldValueRequired is used to report required values that are not
+ // provided (e.g. empty strings, null values, or empty arrays).
+ CauseTypeFieldValueRequired CauseType = "FieldValueRequired"
+ // CauseTypeFieldValueDuplicate is used to report collisions of values that must be
+ // unique (e.g. unique IDs).
+ CauseTypeFieldValueDuplicate CauseType = "FieldValueDuplicate"
+ // CauseTypeFieldValueInvalid is used to report malformed values (e.g. failed regex
+ // match).
+ CauseTypeFieldValueInvalid CauseType = "FieldValueInvalid"
+ // CauseTypeFieldValueNotSupported is used to report valid (as per formatting rules)
+ // values that can not be handled (e.g. an enumerated string).
+ CauseTypeFieldValueNotSupported CauseType = "FieldValueNotSupported"
+ // CauseTypeUnexpectedServerResponse is used to report when the server responded to the client
+ // without the expected return type. The presence of this cause indicates the error may be
+ // due to an intervening proxy or the server software malfunctioning.
+ CauseTypeUnexpectedServerResponse CauseType = "UnexpectedServerResponse"
+)
+
+// APIVersions lists the versions that are available, to allow clients to
+// discover the API at /api, which is the root path of the legacy v1 API.
+//
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+type APIVersions struct {
+ TypeMeta `json:",inline"`
+ // versions are the api versions that are available.
+ Versions []string `json:"versions" protobuf:"bytes,1,rep,name=versions"`
+ // a map of client CIDR to server address that is serving this group.
+ // This is to help clients reach servers in the most network-efficient way possible.
+ // Clients can use the appropriate server address as per the CIDR that they match.
+ // In case of multiple matches, clients should use the longest matching CIDR.
+ // The server returns only those CIDRs that it thinks that the client can match.
+ // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP.
+ // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.
+ ServerAddressByClientCIDRs []ServerAddressByClientCIDR `json:"serverAddressByClientCIDRs" protobuf:"bytes,2,rep,name=serverAddressByClientCIDRs"`
+}
+
+// APIGroupList is a list of APIGroup, to allow clients to discover the API at
+// /apis.
+type APIGroupList struct {
+ TypeMeta `json:",inline"`
+ // groups is a list of APIGroup.
+ Groups []APIGroup `json:"groups" protobuf:"bytes,1,rep,name=groups"`
+}
+
+// APIGroup contains the name, the supported versions, and the preferred version
+// of a group.
+type APIGroup struct {
+ TypeMeta `json:",inline"`
+ // name is the name of the group.
+ Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
+ // versions are the versions supported in this group.
+ Versions []GroupVersionForDiscovery `json:"versions" protobuf:"bytes,2,rep,name=versions"`
+ // preferredVersion is the version preferred by the API server, which
+ // probably is the storage version.
+ // +optional
+ PreferredVersion GroupVersionForDiscovery `json:"preferredVersion,omitempty" protobuf:"bytes,3,opt,name=preferredVersion"`
+ // a map of client CIDR to server address that is serving this group.
+ // This is to help clients reach servers in the most network-efficient way possible.
+ // Clients can use the appropriate server address as per the CIDR that they match.
+ // In case of multiple matches, clients should use the longest matching CIDR.
+ // The server returns only those CIDRs that it thinks that the client can match.
+ // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP.
+ // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.
+ ServerAddressByClientCIDRs []ServerAddressByClientCIDR `json:"serverAddressByClientCIDRs" protobuf:"bytes,4,rep,name=serverAddressByClientCIDRs"`
+}
+
+// ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.
+type ServerAddressByClientCIDR struct {
+ // The CIDR with which clients can match their IP to figure out the server address that they should use.
+ ClientCIDR string `json:"clientCIDR" protobuf:"bytes,1,opt,name=clientCIDR"`
+ // Address of this server, suitable for a client that matches the above CIDR.
+ // This can be a hostname, hostname:port, IP or IP:port.
+ ServerAddress string `json:"serverAddress" protobuf:"bytes,2,opt,name=serverAddress"`
+}
+
+// GroupVersion contains the "group/version" and "version" string of a version.
+// It is made a struct to keep extensibility.
+type GroupVersionForDiscovery struct {
+ // groupVersion specifies the API group and version in the form "group/version"
+ GroupVersion string `json:"groupVersion" protobuf:"bytes,1,opt,name=groupVersion"`
+ // version specifies the version in the form of "version". This is to save
+ // the clients the trouble of splitting the GroupVersion.
+ Version string `json:"version" protobuf:"bytes,2,opt,name=version"`
+}
+
+// APIResource specifies the name of a resource and whether it is namespaced.
+type APIResource struct {
+ // name is the plural name of the resource.
+ Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
+ // singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely.
+ // The singularName is more correct for reporting status on a single item and both singular and plural are allowed
+ // from the kubectl CLI interface.
+ SingularName string `json:"singularName" protobuf:"bytes,6,opt,name=singularName"`
+ // namespaced indicates if a resource is namespaced or not.
+ Namespaced bool `json:"namespaced" protobuf:"varint,2,opt,name=namespaced"`
+ // kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')
+ Kind string `json:"kind" protobuf:"bytes,3,opt,name=kind"`
+ // verbs is a list of supported kube verbs (this includes get, list, watch, create,
+ // update, patch, delete, deletecollection, and proxy)
+ Verbs Verbs `json:"verbs" protobuf:"bytes,4,opt,name=verbs"`
+ // shortNames is a list of suggested short names of the resource.
+ ShortNames []string `json:"shortNames,omitempty" protobuf:"bytes,5,rep,name=shortNames"`
+ // categories is a list of the grouped resources this resource belongs to (e.g. 'all')
+ Categories []string `json:"categories,omitempty" protobuf:"bytes,7,rep,name=categories"`
+}
+
+// Verbs masks the value so protobuf can generate
+//
+// +protobuf.nullable=true
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+type Verbs []string
+
+func (vs Verbs) String() string {
+ return fmt.Sprintf("%v", []string(vs))
+}
+
+// APIResourceList is a list of APIResource, it is used to expose the name of the
+// resources supported in a specific group and version, and if the resource
+// is namespaced.
+type APIResourceList struct {
+ TypeMeta `json:",inline"`
+ // groupVersion is the group and version this APIResourceList is for.
+ GroupVersion string `json:"groupVersion" protobuf:"bytes,1,opt,name=groupVersion"`
+ // resources contains the name of the resources and if they are namespaced.
+ APIResources []APIResource `json:"resources" protobuf:"bytes,2,rep,name=resources"`
+}
+
+// RootPaths lists the paths available at root.
+// For example: "/healthz", "/apis".
+type RootPaths struct {
+ // paths are the paths available at root.
+ Paths []string `json:"paths" protobuf:"bytes,1,rep,name=paths"`
+}
+
+// TODO: remove me when watch is refactored
+func LabelSelectorQueryParam(version string) string {
+ return "labelSelector"
+}
+
+// TODO: remove me when watch is refactored
+func FieldSelectorQueryParam(version string) string {
+ return "fieldSelector"
+}
+
+// String returns available api versions as a human-friendly version string.
+func (apiVersions APIVersions) String() string {
+ return strings.Join(apiVersions.Versions, ",")
+}
+
+func (apiVersions APIVersions) GoString() string {
+ return apiVersions.String()
+}
+
+// Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.
+type Patch struct{}
+
+// Note:
+// There are two different styles of label selectors used in versioned types:
+// an older style which is represented as just a string in versioned types, and a
+// newer style that is structured. LabelSelector is an internal representation for the
+// latter style.
+
+// A label selector is a label query over a set of resources. The result of matchLabels and
+// matchExpressions are ANDed. An empty label selector matches all objects. A null
+// label selector matches no objects.
+type LabelSelector struct {
+ // matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ // map is equivalent to an element of matchExpressions, whose key field is "key", the
+ // operator is "In", and the values array contains only "value". The requirements are ANDed.
+ // +optional
+ MatchLabels map[string]string `json:"matchLabels,omitempty" protobuf:"bytes,1,rep,name=matchLabels"`
+ // matchExpressions is a list of label selector requirements. The requirements are ANDed.
+ // +optional
+ MatchExpressions []LabelSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,2,rep,name=matchExpressions"`
+}
+
+// A label selector requirement is a selector that contains values, a key, and an operator that
+// relates the key and values.
+type LabelSelectorRequirement struct {
+ // key is the label key that the selector applies to.
+ // +patchMergeKey=key
+ // +patchStrategy=merge
+ Key string `json:"key" patchStrategy:"merge" patchMergeKey:"key" protobuf:"bytes,1,opt,name=key"`
+ // operator represents a key's relationship to a set of values.
+ // Valid operators ard In, NotIn, Exists and DoesNotExist.
+ Operator LabelSelectorOperator `json:"operator" protobuf:"bytes,2,opt,name=operator,casttype=LabelSelectorOperator"`
+ // values is an array of string values. If the operator is In or NotIn,
+ // the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ // the values array must be empty. This array is replaced during a strategic
+ // merge patch.
+ // +optional
+ Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"`
+}
+
+// A label selector operator is the set of operators that can be used in a selector requirement.
+type LabelSelectorOperator string
+
+const (
+ LabelSelectorOpIn LabelSelectorOperator = "In"
+ LabelSelectorOpNotIn LabelSelectorOperator = "NotIn"
+ LabelSelectorOpExists LabelSelectorOperator = "Exists"
+ LabelSelectorOpDoesNotExist LabelSelectorOperator = "DoesNotExist"
+)
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..159164d7c
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go
@@ -0,0 +1,315 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_APIGroup = map[string]string{
+ "": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
+ "name": "name is the name of the group.",
+ "versions": "versions are the versions supported in this group.",
+ "preferredVersion": "preferredVersion is the version preferred by the API server, which probably is the storage version.",
+ "serverAddressByClientCIDRs": "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.",
+}
+
+func (APIGroup) SwaggerDoc() map[string]string {
+ return map_APIGroup
+}
+
+var map_APIGroupList = map[string]string{
+ "": "APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.",
+ "groups": "groups is a list of APIGroup.",
+}
+
+func (APIGroupList) SwaggerDoc() map[string]string {
+ return map_APIGroupList
+}
+
+var map_APIResource = map[string]string{
+ "": "APIResource specifies the name of a resource and whether it is namespaced.",
+ "name": "name is the plural name of the resource.",
+ "singularName": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.",
+ "namespaced": "namespaced indicates if a resource is namespaced or not.",
+ "kind": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')",
+ "verbs": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)",
+ "shortNames": "shortNames is a list of suggested short names of the resource.",
+ "categories": "categories is a list of the grouped resources this resource belongs to (e.g. 'all')",
+}
+
+func (APIResource) SwaggerDoc() map[string]string {
+ return map_APIResource
+}
+
+var map_APIResourceList = map[string]string{
+ "": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.",
+ "groupVersion": "groupVersion is the group and version this APIResourceList is for.",
+ "resources": "resources contains the name of the resources and if they are namespaced.",
+}
+
+func (APIResourceList) SwaggerDoc() map[string]string {
+ return map_APIResourceList
+}
+
+var map_APIVersions = map[string]string{
+ "": "APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API.",
+ "versions": "versions are the api versions that are available.",
+ "serverAddressByClientCIDRs": "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.",
+}
+
+func (APIVersions) SwaggerDoc() map[string]string {
+ return map_APIVersions
+}
+
+var map_DeleteOptions = map[string]string{
+ "": "DeleteOptions may be provided when deleting an API object.",
+ "gracePeriodSeconds": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.",
+ "preconditions": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.",
+ "orphanDependents": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.",
+ "propagationPolicy": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.",
+}
+
+func (DeleteOptions) SwaggerDoc() map[string]string {
+ return map_DeleteOptions
+}
+
+var map_ExportOptions = map[string]string{
+ "": "ExportOptions is the query options to the standard REST get call.",
+ "export": "Should this value be exported. Export strips fields that a user can not specify.",
+ "exact": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.",
+}
+
+func (ExportOptions) SwaggerDoc() map[string]string {
+ return map_ExportOptions
+}
+
+var map_GetOptions = map[string]string{
+ "": "GetOptions is the standard query options to the standard REST get call.",
+ "resourceVersion": "When specified: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.",
+ "includeUninitialized": "If true, partially initialized resources are included in the response.",
+}
+
+func (GetOptions) SwaggerDoc() map[string]string {
+ return map_GetOptions
+}
+
+var map_GroupVersionForDiscovery = map[string]string{
+ "": "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.",
+ "groupVersion": "groupVersion specifies the API group and version in the form \"group/version\"",
+ "version": "version specifies the version in the form of \"version\". This is to save the clients the trouble of splitting the GroupVersion.",
+}
+
+func (GroupVersionForDiscovery) SwaggerDoc() map[string]string {
+ return map_GroupVersionForDiscovery
+}
+
+var map_Initializer = map[string]string{
+ "": "Initializer is information about an initializer that has not yet completed.",
+ "name": "name of the process that is responsible for initializing this object.",
+}
+
+func (Initializer) SwaggerDoc() map[string]string {
+ return map_Initializer
+}
+
+var map_Initializers = map[string]string{
+ "": "Initializers tracks the progress of initialization.",
+ "pending": "Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients.",
+ "result": "If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion.",
+}
+
+func (Initializers) SwaggerDoc() map[string]string {
+ return map_Initializers
+}
+
+var map_LabelSelector = map[string]string{
+ "": "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.",
+ "matchLabels": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.",
+ "matchExpressions": "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
+}
+
+func (LabelSelector) SwaggerDoc() map[string]string {
+ return map_LabelSelector
+}
+
+var map_LabelSelectorRequirement = map[string]string{
+ "": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.",
+ "key": "key is the label key that the selector applies to.",
+ "operator": "operator represents a key's relationship to a set of values. Valid operators ard In, NotIn, Exists and DoesNotExist.",
+ "values": "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.",
+}
+
+func (LabelSelectorRequirement) SwaggerDoc() map[string]string {
+ return map_LabelSelectorRequirement
+}
+
+var map_ListMeta = map[string]string{
+ "": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.",
+ "selfLink": "SelfLink is a URL representing this object. Populated by the system. Read-only.",
+ "resourceVersion": "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency",
+}
+
+func (ListMeta) SwaggerDoc() map[string]string {
+ return map_ListMeta
+}
+
+var map_ListOptions = map[string]string{
+ "": "ListOptions is the query options to a standard REST list call.",
+ "labelSelector": "A selector to restrict the list of returned objects by their labels. Defaults to everything.",
+ "fieldSelector": "A selector to restrict the list of returned objects by their fields. Defaults to everything.",
+ "includeUninitialized": "If true, partially initialized resources are included in the response.",
+ "watch": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.",
+ "resourceVersion": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.",
+ "timeoutSeconds": "Timeout for the list/watch call.",
+}
+
+func (ListOptions) SwaggerDoc() map[string]string {
+ return map_ListOptions
+}
+
+var map_ObjectMeta = map[string]string{
+ "": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.",
+ "name": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names",
+ "generateName": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency",
+ "namespace": "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces",
+ "selfLink": "SelfLink is a URL representing this object. Populated by the system. Read-only.",
+ "uid": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids",
+ "resourceVersion": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency",
+ "generation": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.",
+ "creationTimestamp": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "deletionTimestamp": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "deletionGracePeriodSeconds": "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.",
+ "labels": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels",
+ "annotations": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations",
+ "ownerReferences": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.",
+ "initializers": "An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects.\n\nWhen an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user.",
+ "finalizers": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.",
+ "clusterName": "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.",
+}
+
+func (ObjectMeta) SwaggerDoc() map[string]string {
+ return map_ObjectMeta
+}
+
+var map_OwnerReference = map[string]string{
+ "": "OwnerReference contains enough information to let you identify an owning object. Currently, an owning object must be in the same namespace, so there is no namespace field.",
+ "apiVersion": "API version of the referent.",
+ "kind": "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "name": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names",
+ "uid": "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids",
+ "controller": "If true, this reference points to the managing controller.",
+ "blockOwnerDeletion": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.",
+}
+
+func (OwnerReference) SwaggerDoc() map[string]string {
+ return map_OwnerReference
+}
+
+var map_Patch = map[string]string{
+ "": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.",
+}
+
+func (Patch) SwaggerDoc() map[string]string {
+ return map_Patch
+}
+
+var map_Preconditions = map[string]string{
+ "": "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.",
+ "uid": "Specifies the target UID.",
+}
+
+func (Preconditions) SwaggerDoc() map[string]string {
+ return map_Preconditions
+}
+
+var map_RootPaths = map[string]string{
+ "": "RootPaths lists the paths available at root. For example: \"/healthz\", \"/apis\".",
+ "paths": "paths are the paths available at root.",
+}
+
+func (RootPaths) SwaggerDoc() map[string]string {
+ return map_RootPaths
+}
+
+var map_ServerAddressByClientCIDR = map[string]string{
+ "": "ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.",
+ "clientCIDR": "The CIDR with which clients can match their IP to figure out the server address that they should use.",
+ "serverAddress": "Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port.",
+}
+
+func (ServerAddressByClientCIDR) SwaggerDoc() map[string]string {
+ return map_ServerAddressByClientCIDR
+}
+
+var map_Status = map[string]string{
+ "": "Status is a return value for calls that don't return other objects.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "status": "Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+ "message": "A human-readable description of the status of this operation.",
+ "reason": "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.",
+ "details": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.",
+ "code": "Suggested HTTP return code for this status, 0 if not set.",
+}
+
+func (Status) SwaggerDoc() map[string]string {
+ return map_Status
+}
+
+var map_StatusCause = map[string]string{
+ "": "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.",
+ "reason": "A machine-readable description of the cause of the error. If this value is empty there is no information available.",
+ "message": "A human-readable description of the cause of the error. This field may be presented as-is to a reader.",
+ "field": "The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"",
+}
+
+func (StatusCause) SwaggerDoc() map[string]string {
+ return map_StatusCause
+}
+
+var map_StatusDetails = map[string]string{
+ "": "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.",
+ "name": "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).",
+ "group": "The group attribute of the resource associated with the status StatusReason.",
+ "kind": "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "uid": "UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids",
+ "causes": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.",
+ "retryAfterSeconds": "If specified, the time in seconds before the operation should be retried.",
+}
+
+func (StatusDetails) SwaggerDoc() map[string]string {
+ return map_StatusDetails
+}
+
+var map_TypeMeta = map[string]string{
+ "": "TypeMeta describes an individual object in an API response or request with strings representing the type of the object and its API schema version. Structures that are versioned or persisted should inline TypeMeta.",
+ "kind": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "apiVersion": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources",
+}
+
+func (TypeMeta) SwaggerDoc() map[string]string {
+ return map_TypeMeta
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go
new file mode 100644
index 000000000..fed687e9b
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go
@@ -0,0 +1,752 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package unstructured
+
+import (
+ "bytes"
+ gojson "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+ "strings"
+
+ "github.com/golang/glog"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/conversion/unstructured"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/types"
+ "k8s.io/apimachinery/pkg/util/json"
+ utilruntime "k8s.io/apimachinery/pkg/util/runtime"
+)
+
+// Unstructured allows objects that do not have Golang structs registered to be manipulated
+// generically. This can be used to deal with the API objects from a plug-in. Unstructured
+// objects still have functioning TypeMeta features-- kind, version, etc.
+//
+// WARNING: This object has accessors for the v1 standard metadata. You *MUST NOT* use this
+// type if you are dealing with objects that are not in the server meta v1 schema.
+//
+// TODO: make the serialization part of this type distinct from the field accessors.
+type Unstructured struct {
+ // Object is a JSON compatible map with string, float, int, bool, []interface{}, or
+ // map[string]interface{}
+ // children.
+ Object map[string]interface{}
+}
+
+var _ metav1.Object = &Unstructured{}
+var _ runtime.Unstructured = &Unstructured{}
+var _ runtime.Unstructured = &UnstructuredList{}
+
+func (obj *Unstructured) GetObjectKind() schema.ObjectKind { return obj }
+func (obj *UnstructuredList) GetObjectKind() schema.ObjectKind { return obj }
+
+func (obj *Unstructured) IsUnstructuredObject() {}
+func (obj *UnstructuredList) IsUnstructuredObject() {}
+
+func (obj *Unstructured) IsList() bool {
+ if obj.Object != nil {
+ _, ok := obj.Object["items"]
+ return ok
+ }
+ return false
+}
+func (obj *UnstructuredList) IsList() bool { return true }
+
+func (obj *Unstructured) UnstructuredContent() map[string]interface{} {
+ if obj.Object == nil {
+ obj.Object = make(map[string]interface{})
+ }
+ return obj.Object
+}
+
+// UnstructuredContent returns a map contain an overlay of the Items field onto
+// the Object field. Items always overwrites overlay. Changing "items" in the
+// returned object will affect items in the underlying Items field, but changing
+// the "items" slice itself will have no effect.
+// TODO: expose SetUnstructuredContent on runtime.Unstructured that allows
+// items to be changed.
+func (obj *UnstructuredList) UnstructuredContent() map[string]interface{} {
+ out := obj.Object
+ if out == nil {
+ out = make(map[string]interface{})
+ }
+ items := make([]interface{}, len(obj.Items))
+ for i, item := range obj.Items {
+ items[i] = item.Object
+ }
+ out["items"] = items
+ return out
+}
+
+// MarshalJSON ensures that the unstructured object produces proper
+// JSON when passed to Go's standard JSON library.
+func (u *Unstructured) MarshalJSON() ([]byte, error) {
+ var buf bytes.Buffer
+ err := UnstructuredJSONScheme.Encode(u, &buf)
+ return buf.Bytes(), err
+}
+
+// UnmarshalJSON ensures that the unstructured object properly decodes
+// JSON when passed to Go's standard JSON library.
+func (u *Unstructured) UnmarshalJSON(b []byte) error {
+ _, _, err := UnstructuredJSONScheme.Decode(b, nil, u)
+ return err
+}
+
+func getNestedField(obj map[string]interface{}, fields ...string) interface{} {
+ var val interface{} = obj
+ for _, field := range fields {
+ if _, ok := val.(map[string]interface{}); !ok {
+ return nil
+ }
+ val = val.(map[string]interface{})[field]
+ }
+ return val
+}
+
+func getNestedString(obj map[string]interface{}, fields ...string) string {
+ if str, ok := getNestedField(obj, fields...).(string); ok {
+ return str
+ }
+ return ""
+}
+
+func getNestedInt64(obj map[string]interface{}, fields ...string) int64 {
+ if str, ok := getNestedField(obj, fields...).(int64); ok {
+ return str
+ }
+ return 0
+}
+
+func getNestedInt64Pointer(obj map[string]interface{}, fields ...string) *int64 {
+ if str, ok := getNestedField(obj, fields...).(*int64); ok {
+ return str
+ }
+ return nil
+}
+
+func getNestedSlice(obj map[string]interface{}, fields ...string) []string {
+ if m, ok := getNestedField(obj, fields...).([]interface{}); ok {
+ strSlice := make([]string, 0, len(m))
+ for _, v := range m {
+ if str, ok := v.(string); ok {
+ strSlice = append(strSlice, str)
+ }
+ }
+ return strSlice
+ }
+ return nil
+}
+
+func getNestedMap(obj map[string]interface{}, fields ...string) map[string]string {
+ if m, ok := getNestedField(obj, fields...).(map[string]interface{}); ok {
+ strMap := make(map[string]string, len(m))
+ for k, v := range m {
+ if str, ok := v.(string); ok {
+ strMap[k] = str
+ }
+ }
+ return strMap
+ }
+ return nil
+}
+
+func setNestedField(obj map[string]interface{}, value interface{}, fields ...string) {
+ m := obj
+ if len(fields) > 1 {
+ for _, field := range fields[0 : len(fields)-1] {
+ if _, ok := m[field].(map[string]interface{}); !ok {
+ m[field] = make(map[string]interface{})
+ }
+ m = m[field].(map[string]interface{})
+ }
+ }
+ m[fields[len(fields)-1]] = value
+}
+
+func setNestedSlice(obj map[string]interface{}, value []string, fields ...string) {
+ m := make([]interface{}, 0, len(value))
+ for _, v := range value {
+ m = append(m, v)
+ }
+ setNestedField(obj, m, fields...)
+}
+
+func setNestedMap(obj map[string]interface{}, value map[string]string, fields ...string) {
+ m := make(map[string]interface{}, len(value))
+ for k, v := range value {
+ m[k] = v
+ }
+ setNestedField(obj, m, fields...)
+}
+
+func (u *Unstructured) setNestedField(value interface{}, fields ...string) {
+ if u.Object == nil {
+ u.Object = make(map[string]interface{})
+ }
+ setNestedField(u.Object, value, fields...)
+}
+
+func (u *Unstructured) setNestedSlice(value []string, fields ...string) {
+ if u.Object == nil {
+ u.Object = make(map[string]interface{})
+ }
+ setNestedSlice(u.Object, value, fields...)
+}
+
+func (u *Unstructured) setNestedMap(value map[string]string, fields ...string) {
+ if u.Object == nil {
+ u.Object = make(map[string]interface{})
+ }
+ setNestedMap(u.Object, value, fields...)
+}
+
+func extractOwnerReference(src interface{}) metav1.OwnerReference {
+ v := src.(map[string]interface{})
+ // though this field is a *bool, but when decoded from JSON, it's
+ // unmarshalled as bool.
+ var controllerPtr *bool
+ controller, ok := (getNestedField(v, "controller")).(bool)
+ if !ok {
+ controllerPtr = nil
+ } else {
+ controllerCopy := controller
+ controllerPtr = &controllerCopy
+ }
+ var blockOwnerDeletionPtr *bool
+ blockOwnerDeletion, ok := (getNestedField(v, "blockOwnerDeletion")).(bool)
+ if !ok {
+ blockOwnerDeletionPtr = nil
+ } else {
+ blockOwnerDeletionCopy := blockOwnerDeletion
+ blockOwnerDeletionPtr = &blockOwnerDeletionCopy
+ }
+ return metav1.OwnerReference{
+ Kind: getNestedString(v, "kind"),
+ Name: getNestedString(v, "name"),
+ APIVersion: getNestedString(v, "apiVersion"),
+ UID: (types.UID)(getNestedString(v, "uid")),
+ Controller: controllerPtr,
+ BlockOwnerDeletion: blockOwnerDeletionPtr,
+ }
+}
+
+func setOwnerReference(src metav1.OwnerReference) map[string]interface{} {
+ ret := make(map[string]interface{})
+ setNestedField(ret, src.Kind, "kind")
+ setNestedField(ret, src.Name, "name")
+ setNestedField(ret, src.APIVersion, "apiVersion")
+ setNestedField(ret, string(src.UID), "uid")
+ // json.Unmarshal() extracts boolean json fields as bool, not as *bool and hence extractOwnerReference()
+ // expects bool or a missing field, not *bool. So if pointer is nil, fields are omitted from the ret object.
+ // If pointer is non-nil, they are set to the referenced value.
+ if src.Controller != nil {
+ setNestedField(ret, *src.Controller, "controller")
+ }
+ if src.BlockOwnerDeletion != nil {
+ setNestedField(ret, *src.BlockOwnerDeletion, "blockOwnerDeletion")
+ }
+ return ret
+}
+
+func getOwnerReferences(object map[string]interface{}) ([]map[string]interface{}, error) {
+ field := getNestedField(object, "metadata", "ownerReferences")
+ if field == nil {
+ return nil, fmt.Errorf("cannot find field metadata.ownerReferences in %v", object)
+ }
+ ownerReferences, ok := field.([]map[string]interface{})
+ if ok {
+ return ownerReferences, nil
+ }
+ // TODO: This is hacky...
+ interfaces, ok := field.([]interface{})
+ if !ok {
+ return nil, fmt.Errorf("expect metadata.ownerReferences to be a slice in %#v", object)
+ }
+ ownerReferences = make([]map[string]interface{}, 0, len(interfaces))
+ for i := 0; i < len(interfaces); i++ {
+ r, ok := interfaces[i].(map[string]interface{})
+ if !ok {
+ return nil, fmt.Errorf("expect element metadata.ownerReferences to be a map[string]interface{} in %#v", object)
+ }
+ ownerReferences = append(ownerReferences, r)
+ }
+ return ownerReferences, nil
+}
+
+func (u *Unstructured) GetOwnerReferences() []metav1.OwnerReference {
+ original, err := getOwnerReferences(u.Object)
+ if err != nil {
+ glog.V(6).Info(err)
+ return nil
+ }
+ ret := make([]metav1.OwnerReference, 0, len(original))
+ for i := 0; i < len(original); i++ {
+ ret = append(ret, extractOwnerReference(original[i]))
+ }
+ return ret
+}
+
+func (u *Unstructured) SetOwnerReferences(references []metav1.OwnerReference) {
+ var newReferences = make([]map[string]interface{}, 0, len(references))
+ for i := 0; i < len(references); i++ {
+ newReferences = append(newReferences, setOwnerReference(references[i]))
+ }
+ u.setNestedField(newReferences, "metadata", "ownerReferences")
+}
+
+func (u *Unstructured) GetAPIVersion() string {
+ return getNestedString(u.Object, "apiVersion")
+}
+
+func (u *Unstructured) SetAPIVersion(version string) {
+ u.setNestedField(version, "apiVersion")
+}
+
+func (u *Unstructured) GetKind() string {
+ return getNestedString(u.Object, "kind")
+}
+
+func (u *Unstructured) SetKind(kind string) {
+ u.setNestedField(kind, "kind")
+}
+
+func (u *Unstructured) GetNamespace() string {
+ return getNestedString(u.Object, "metadata", "namespace")
+}
+
+func (u *Unstructured) SetNamespace(namespace string) {
+ u.setNestedField(namespace, "metadata", "namespace")
+}
+
+func (u *Unstructured) GetName() string {
+ return getNestedString(u.Object, "metadata", "name")
+}
+
+func (u *Unstructured) SetName(name string) {
+ u.setNestedField(name, "metadata", "name")
+}
+
+func (u *Unstructured) GetGenerateName() string {
+ return getNestedString(u.Object, "metadata", "generateName")
+}
+
+func (u *Unstructured) SetGenerateName(name string) {
+ u.setNestedField(name, "metadata", "generateName")
+}
+
+func (u *Unstructured) GetUID() types.UID {
+ return types.UID(getNestedString(u.Object, "metadata", "uid"))
+}
+
+func (u *Unstructured) SetUID(uid types.UID) {
+ u.setNestedField(string(uid), "metadata", "uid")
+}
+
+func (u *Unstructured) GetResourceVersion() string {
+ return getNestedString(u.Object, "metadata", "resourceVersion")
+}
+
+func (u *Unstructured) SetResourceVersion(version string) {
+ u.setNestedField(version, "metadata", "resourceVersion")
+}
+
+func (u *Unstructured) GetGeneration() int64 {
+ return getNestedInt64(u.Object, "metadata", "generation")
+}
+
+func (u *Unstructured) SetGeneration(generation int64) {
+ u.setNestedField(generation, "metadata", "generation")
+}
+
+func (u *Unstructured) GetSelfLink() string {
+ return getNestedString(u.Object, "metadata", "selfLink")
+}
+
+func (u *Unstructured) SetSelfLink(selfLink string) {
+ u.setNestedField(selfLink, "metadata", "selfLink")
+}
+
+func (u *Unstructured) GetCreationTimestamp() metav1.Time {
+ var timestamp metav1.Time
+ timestamp.UnmarshalQueryParameter(getNestedString(u.Object, "metadata", "creationTimestamp"))
+ return timestamp
+}
+
+func (u *Unstructured) SetCreationTimestamp(timestamp metav1.Time) {
+ ts, _ := timestamp.MarshalQueryParameter()
+ u.setNestedField(ts, "metadata", "creationTimestamp")
+}
+
+func (u *Unstructured) GetDeletionTimestamp() *metav1.Time {
+ var timestamp metav1.Time
+ timestamp.UnmarshalQueryParameter(getNestedString(u.Object, "metadata", "deletionTimestamp"))
+ if timestamp.IsZero() {
+ return nil
+ }
+ return &timestamp
+}
+
+func (u *Unstructured) SetDeletionTimestamp(timestamp *metav1.Time) {
+ if timestamp == nil {
+ u.setNestedField(nil, "metadata", "deletionTimestamp")
+ return
+ }
+ ts, _ := timestamp.MarshalQueryParameter()
+ u.setNestedField(ts, "metadata", "deletionTimestamp")
+}
+
+func (u *Unstructured) GetDeletionGracePeriodSeconds() *int64 {
+ return getNestedInt64Pointer(u.Object, "metadata", "deletionGracePeriodSeconds")
+}
+
+func (u *Unstructured) SetDeletionGracePeriodSeconds(deletionGracePeriodSeconds *int64) {
+ u.setNestedField(deletionGracePeriodSeconds, "metadata", "deletionGracePeriodSeconds")
+}
+
+func (u *Unstructured) GetLabels() map[string]string {
+ return getNestedMap(u.Object, "metadata", "labels")
+}
+
+func (u *Unstructured) SetLabels(labels map[string]string) {
+ u.setNestedMap(labels, "metadata", "labels")
+}
+
+func (u *Unstructured) GetAnnotations() map[string]string {
+ return getNestedMap(u.Object, "metadata", "annotations")
+}
+
+func (u *Unstructured) SetAnnotations(annotations map[string]string) {
+ u.setNestedMap(annotations, "metadata", "annotations")
+}
+
+func (u *Unstructured) SetGroupVersionKind(gvk schema.GroupVersionKind) {
+ u.SetAPIVersion(gvk.GroupVersion().String())
+ u.SetKind(gvk.Kind)
+}
+
+func (u *Unstructured) GroupVersionKind() schema.GroupVersionKind {
+ gv, err := schema.ParseGroupVersion(u.GetAPIVersion())
+ if err != nil {
+ return schema.GroupVersionKind{}
+ }
+ gvk := gv.WithKind(u.GetKind())
+ return gvk
+}
+
+var converter = unstructured.NewConverter(false)
+
+func (u *Unstructured) GetInitializers() *metav1.Initializers {
+ field := getNestedField(u.Object, "metadata", "initializers")
+ if field == nil {
+ return nil
+ }
+ obj, ok := field.(map[string]interface{})
+ if !ok {
+ return nil
+ }
+ out := &metav1.Initializers{}
+ if err := converter.FromUnstructured(obj, out); err != nil {
+ utilruntime.HandleError(fmt.Errorf("unable to retrieve initializers for object: %v", err))
+ }
+ return out
+}
+
+func (u *Unstructured) SetInitializers(initializers *metav1.Initializers) {
+ if initializers == nil {
+ setNestedField(u.Object, nil, "metadata", "initializers")
+ return
+ }
+ out := make(map[string]interface{})
+ if err := converter.ToUnstructured(initializers, &out); err != nil {
+ utilruntime.HandleError(fmt.Errorf("unable to retrieve initializers for object: %v", err))
+ }
+ setNestedField(u.Object, out, "metadata", "initializers")
+}
+
+func (u *Unstructured) GetFinalizers() []string {
+ return getNestedSlice(u.Object, "metadata", "finalizers")
+}
+
+func (u *Unstructured) SetFinalizers(finalizers []string) {
+ u.setNestedSlice(finalizers, "metadata", "finalizers")
+}
+
+func (u *Unstructured) GetClusterName() string {
+ return getNestedString(u.Object, "metadata", "clusterName")
+}
+
+func (u *Unstructured) SetClusterName(clusterName string) {
+ u.setNestedField(clusterName, "metadata", "clusterName")
+}
+
+// UnstructuredList allows lists that do not have Golang structs
+// registered to be manipulated generically. This can be used to deal
+// with the API lists from a plug-in.
+type UnstructuredList struct {
+ Object map[string]interface{}
+
+ // Items is a list of unstructured objects.
+ Items []Unstructured `json:"items"`
+}
+
+// MarshalJSON ensures that the unstructured list object produces proper
+// JSON when passed to Go's standard JSON library.
+func (u *UnstructuredList) MarshalJSON() ([]byte, error) {
+ var buf bytes.Buffer
+ err := UnstructuredJSONScheme.Encode(u, &buf)
+ return buf.Bytes(), err
+}
+
+// UnmarshalJSON ensures that the unstructured list object properly
+// decodes JSON when passed to Go's standard JSON library.
+func (u *UnstructuredList) UnmarshalJSON(b []byte) error {
+ _, _, err := UnstructuredJSONScheme.Decode(b, nil, u)
+ return err
+}
+
+func (u *UnstructuredList) setNestedField(value interface{}, fields ...string) {
+ if u.Object == nil {
+ u.Object = make(map[string]interface{})
+ }
+ setNestedField(u.Object, value, fields...)
+}
+
+func (u *UnstructuredList) GetAPIVersion() string {
+ return getNestedString(u.Object, "apiVersion")
+}
+
+func (u *UnstructuredList) SetAPIVersion(version string) {
+ u.setNestedField(version, "apiVersion")
+}
+
+func (u *UnstructuredList) GetKind() string {
+ return getNestedString(u.Object, "kind")
+}
+
+func (u *UnstructuredList) SetKind(kind string) {
+ u.setNestedField(kind, "kind")
+}
+
+func (u *UnstructuredList) GetResourceVersion() string {
+ return getNestedString(u.Object, "metadata", "resourceVersion")
+}
+
+func (u *UnstructuredList) SetResourceVersion(version string) {
+ u.setNestedField(version, "metadata", "resourceVersion")
+}
+
+func (u *UnstructuredList) GetSelfLink() string {
+ return getNestedString(u.Object, "metadata", "selfLink")
+}
+
+func (u *UnstructuredList) SetSelfLink(selfLink string) {
+ u.setNestedField(selfLink, "metadata", "selfLink")
+}
+
+func (u *UnstructuredList) SetGroupVersionKind(gvk schema.GroupVersionKind) {
+ u.SetAPIVersion(gvk.GroupVersion().String())
+ u.SetKind(gvk.Kind)
+}
+
+func (u *UnstructuredList) GroupVersionKind() schema.GroupVersionKind {
+ gv, err := schema.ParseGroupVersion(u.GetAPIVersion())
+ if err != nil {
+ return schema.GroupVersionKind{}
+ }
+ gvk := gv.WithKind(u.GetKind())
+ return gvk
+}
+
+// UnstructuredJSONScheme is capable of converting JSON data into the Unstructured
+// type, which can be used for generic access to objects without a predefined scheme.
+// TODO: move into serializer/json.
+var UnstructuredJSONScheme runtime.Codec = unstructuredJSONScheme{}
+
+type unstructuredJSONScheme struct{}
+
+func (s unstructuredJSONScheme) Decode(data []byte, _ *schema.GroupVersionKind, obj runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) {
+ var err error
+ if obj != nil {
+ err = s.decodeInto(data, obj)
+ } else {
+ obj, err = s.decode(data)
+ }
+
+ if err != nil {
+ return nil, nil, err
+ }
+
+ gvk := obj.GetObjectKind().GroupVersionKind()
+ if len(gvk.Kind) == 0 {
+ return nil, &gvk, runtime.NewMissingKindErr(string(data))
+ }
+
+ return obj, &gvk, nil
+}
+
+func (unstructuredJSONScheme) Encode(obj runtime.Object, w io.Writer) error {
+ switch t := obj.(type) {
+ case *Unstructured:
+ return json.NewEncoder(w).Encode(t.Object)
+ case *UnstructuredList:
+ items := make([]map[string]interface{}, 0, len(t.Items))
+ for _, i := range t.Items {
+ items = append(items, i.Object)
+ }
+ t.Object["items"] = items
+ defer func() { delete(t.Object, "items") }()
+ return json.NewEncoder(w).Encode(t.Object)
+ case *runtime.Unknown:
+ // TODO: Unstructured needs to deal with ContentType.
+ _, err := w.Write(t.Raw)
+ return err
+ default:
+ return json.NewEncoder(w).Encode(t)
+ }
+}
+
+func (s unstructuredJSONScheme) decode(data []byte) (runtime.Object, error) {
+ type detector struct {
+ Items gojson.RawMessage
+ }
+ var det detector
+ if err := json.Unmarshal(data, &det); err != nil {
+ return nil, err
+ }
+
+ if det.Items != nil {
+ list := &UnstructuredList{}
+ err := s.decodeToList(data, list)
+ return list, err
+ }
+
+ // No Items field, so it wasn't a list.
+ unstruct := &Unstructured{}
+ err := s.decodeToUnstructured(data, unstruct)
+ return unstruct, err
+}
+
+func (s unstructuredJSONScheme) decodeInto(data []byte, obj runtime.Object) error {
+ switch x := obj.(type) {
+ case *Unstructured:
+ return s.decodeToUnstructured(data, x)
+ case *UnstructuredList:
+ return s.decodeToList(data, x)
+ case *runtime.VersionedObjects:
+ o, err := s.decode(data)
+ if err == nil {
+ x.Objects = []runtime.Object{o}
+ }
+ return err
+ default:
+ return json.Unmarshal(data, x)
+ }
+}
+
+func (unstructuredJSONScheme) decodeToUnstructured(data []byte, unstruct *Unstructured) error {
+ m := make(map[string]interface{})
+ if err := json.Unmarshal(data, &m); err != nil {
+ return err
+ }
+
+ unstruct.Object = m
+
+ return nil
+}
+
+func (s unstructuredJSONScheme) decodeToList(data []byte, list *UnstructuredList) error {
+ type decodeList struct {
+ Items []gojson.RawMessage
+ }
+
+ var dList decodeList
+ if err := json.Unmarshal(data, &dList); err != nil {
+ return err
+ }
+
+ if err := json.Unmarshal(data, &list.Object); err != nil {
+ return err
+ }
+
+ // For typed lists, e.g., a PodList, API server doesn't set each item's
+ // APIVersion and Kind. We need to set it.
+ listAPIVersion := list.GetAPIVersion()
+ listKind := list.GetKind()
+ itemKind := strings.TrimSuffix(listKind, "List")
+
+ delete(list.Object, "items")
+ list.Items = nil
+ for _, i := range dList.Items {
+ unstruct := &Unstructured{}
+ if err := s.decodeToUnstructured([]byte(i), unstruct); err != nil {
+ return err
+ }
+ // This is hacky. Set the item's Kind and APIVersion to those inferred
+ // from the List.
+ if len(unstruct.GetKind()) == 0 && len(unstruct.GetAPIVersion()) == 0 {
+ unstruct.SetKind(itemKind)
+ unstruct.SetAPIVersion(listAPIVersion)
+ }
+ list.Items = append(list.Items, *unstruct)
+ }
+ return nil
+}
+
+// UnstructuredObjectConverter is an ObjectConverter for use with
+// Unstructured objects. Since it has no schema or type information,
+// it will only succeed for no-op conversions. This is provided as a
+// sane implementation for APIs that require an object converter.
+type UnstructuredObjectConverter struct{}
+
+func (UnstructuredObjectConverter) Convert(in, out, context interface{}) error {
+ unstructIn, ok := in.(*Unstructured)
+ if !ok {
+ return fmt.Errorf("input type %T in not valid for unstructured conversion", in)
+ }
+
+ unstructOut, ok := out.(*Unstructured)
+ if !ok {
+ return fmt.Errorf("output type %T in not valid for unstructured conversion", out)
+ }
+
+ // maybe deep copy the map? It is documented in the
+ // ObjectConverter interface that this function is not
+ // guaranteeed to not mutate the input. Or maybe set the input
+ // object to nil.
+ unstructOut.Object = unstructIn.Object
+ return nil
+}
+
+func (UnstructuredObjectConverter) ConvertToVersion(in runtime.Object, target runtime.GroupVersioner) (runtime.Object, error) {
+ if kind := in.GetObjectKind().GroupVersionKind(); !kind.Empty() {
+ gvk, ok := target.KindForGroupVersionKinds([]schema.GroupVersionKind{kind})
+ if !ok {
+ // TODO: should this be a typed error?
+ return nil, fmt.Errorf("%v is unstructured and is not suitable for converting to %q", kind, target)
+ }
+ in.GetObjectKind().SetGroupVersionKind(gvk)
+ }
+ return in, nil
+}
+
+func (UnstructuredObjectConverter) ConvertFieldLabel(version, kind, label, value string) (string, string, error) {
+ return "", "", errors.New("unstructured cannot convert field labels")
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go
new file mode 100644
index 000000000..f06f075bf
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go
@@ -0,0 +1,90 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package validation
+
+import (
+ "fmt"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/util/validation"
+ "k8s.io/apimachinery/pkg/util/validation/field"
+)
+
+func ValidateLabelSelector(ps *metav1.LabelSelector, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if ps == nil {
+ return allErrs
+ }
+ allErrs = append(allErrs, ValidateLabels(ps.MatchLabels, fldPath.Child("matchLabels"))...)
+ for i, expr := range ps.MatchExpressions {
+ allErrs = append(allErrs, ValidateLabelSelectorRequirement(expr, fldPath.Child("matchExpressions").Index(i))...)
+ }
+ return allErrs
+}
+
+func ValidateLabelSelectorRequirement(sr metav1.LabelSelectorRequirement, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ switch sr.Operator {
+ case metav1.LabelSelectorOpIn, metav1.LabelSelectorOpNotIn:
+ if len(sr.Values) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("values"), "must be specified when `operator` is 'In' or 'NotIn'"))
+ }
+ case metav1.LabelSelectorOpExists, metav1.LabelSelectorOpDoesNotExist:
+ if len(sr.Values) > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("values"), "may not be specified when `operator` is 'Exists' or 'DoesNotExist'"))
+ }
+ default:
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("operator"), sr.Operator, "not a valid selector operator"))
+ }
+ allErrs = append(allErrs, ValidateLabelName(sr.Key, fldPath.Child("key"))...)
+ return allErrs
+}
+
+// ValidateLabelName validates that the label name is correctly defined.
+func ValidateLabelName(labelName string, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ for _, msg := range validation.IsQualifiedName(labelName) {
+ allErrs = append(allErrs, field.Invalid(fldPath, labelName, msg))
+ }
+ return allErrs
+}
+
+// ValidateLabels validates that a set of labels are correctly defined.
+func ValidateLabels(labels map[string]string, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ for k, v := range labels {
+ allErrs = append(allErrs, ValidateLabelName(k, fldPath)...)
+ for _, msg := range validation.IsValidLabelValue(v) {
+ allErrs = append(allErrs, field.Invalid(fldPath, v, msg))
+ }
+ }
+ return allErrs
+}
+
+func ValidateDeleteOptions(options *metav1.DeleteOptions) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if options.OrphanDependents != nil && options.PropagationPolicy != nil {
+ allErrs = append(allErrs, field.Invalid(field.NewPath(""), options, "OrphanDependents and DeletionPropagation cannot be both set"))
+ }
+ if options.PropagationPolicy != nil &&
+ *options.PropagationPolicy != metav1.DeletePropagationForeground &&
+ *options.PropagationPolicy != metav1.DeletePropagationBackground &&
+ *options.PropagationPolicy != metav1.DeletePropagationOrphan {
+ allErrs = append(allErrs, field.Invalid(field.NewPath(""), options, fmt.Sprintf("DeletionPropagation need to be one of %q, %q, %q or nil", metav1.DeletePropagationForeground, metav1.DeletePropagationBackground, metav1.DeletePropagationOrphan)))
+ }
+ return allErrs
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/watch.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/watch.go
new file mode 100644
index 000000000..a645501a1
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/watch.go
@@ -0,0 +1,80 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/conversion"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/watch"
+)
+
+// Event represents a single event to a watched resource.
+//
+// +protobuf=true
+type WatchEvent struct {
+ Type string `json:"type" protobuf:"bytes,1,opt,name=type"`
+
+ // Object is:
+ // * If Type is Added or Modified: the new state of the object.
+ // * If Type is Deleted: the state of the object immediately before deletion.
+ // * If Type is Error: *Status is recommended; other types may make sense
+ // depending on context.
+ Object runtime.RawExtension `json:"object" protobuf:"bytes,2,opt,name=object"`
+}
+
+func Convert_watch_Event_to_versioned_Event(in *watch.Event, out *WatchEvent, s conversion.Scope) error {
+ out.Type = string(in.Type)
+ switch t := in.Object.(type) {
+ case *runtime.Unknown:
+ // TODO: handle other fields on Unknown and detect type
+ out.Object.Raw = t.Raw
+ case nil:
+ default:
+ out.Object.Object = in.Object
+ }
+ return nil
+}
+
+func Convert_versioned_InternalEvent_to_versioned_Event(in *InternalEvent, out *WatchEvent, s conversion.Scope) error {
+ return Convert_watch_Event_to_versioned_Event((*watch.Event)(in), out, s)
+}
+
+func Convert_versioned_Event_to_watch_Event(in *WatchEvent, out *watch.Event, s conversion.Scope) error {
+ out.Type = watch.EventType(in.Type)
+ if in.Object.Object != nil {
+ out.Object = in.Object.Object
+ } else if in.Object.Raw != nil {
+ // TODO: handle other fields on Unknown and detect type
+ out.Object = &runtime.Unknown{
+ Raw: in.Object.Raw,
+ ContentType: runtime.ContentTypeJSON,
+ }
+ }
+ return nil
+}
+
+func Convert_versioned_Event_to_versioned_InternalEvent(in *WatchEvent, out *InternalEvent, s conversion.Scope) error {
+ return Convert_versioned_Event_to_watch_Event(in, (*watch.Event)(out), s)
+}
+
+// InternalEvent makes watch.Event versioned
+// +protobuf=false
+type InternalEvent watch.Event
+
+func (e *InternalEvent) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind }
+func (e *WatchEvent) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind }
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..6fac96be4
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go
@@ -0,0 +1,646 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1
+
+import (
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ types "k8s.io/apimachinery/pkg/types"
+ reflect "reflect"
+)
+
+// GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them.
+func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc {
+ return []conversion.GeneratedDeepCopyFunc{
+ {Fn: DeepCopy_v1_APIGroup, InType: reflect.TypeOf(&APIGroup{})},
+ {Fn: DeepCopy_v1_APIGroupList, InType: reflect.TypeOf(&APIGroupList{})},
+ {Fn: DeepCopy_v1_APIResource, InType: reflect.TypeOf(&APIResource{})},
+ {Fn: DeepCopy_v1_APIResourceList, InType: reflect.TypeOf(&APIResourceList{})},
+ {Fn: DeepCopy_v1_APIVersions, InType: reflect.TypeOf(&APIVersions{})},
+ {Fn: DeepCopy_v1_DeleteOptions, InType: reflect.TypeOf(&DeleteOptions{})},
+ {Fn: DeepCopy_v1_Duration, InType: reflect.TypeOf(&Duration{})},
+ {Fn: DeepCopy_v1_ExportOptions, InType: reflect.TypeOf(&ExportOptions{})},
+ {Fn: DeepCopy_v1_GetOptions, InType: reflect.TypeOf(&GetOptions{})},
+ {Fn: DeepCopy_v1_GroupKind, InType: reflect.TypeOf(&GroupKind{})},
+ {Fn: DeepCopy_v1_GroupResource, InType: reflect.TypeOf(&GroupResource{})},
+ {Fn: DeepCopy_v1_GroupVersion, InType: reflect.TypeOf(&GroupVersion{})},
+ {Fn: DeepCopy_v1_GroupVersionForDiscovery, InType: reflect.TypeOf(&GroupVersionForDiscovery{})},
+ {Fn: DeepCopy_v1_GroupVersionKind, InType: reflect.TypeOf(&GroupVersionKind{})},
+ {Fn: DeepCopy_v1_GroupVersionResource, InType: reflect.TypeOf(&GroupVersionResource{})},
+ {Fn: DeepCopy_v1_Initializer, InType: reflect.TypeOf(&Initializer{})},
+ {Fn: DeepCopy_v1_Initializers, InType: reflect.TypeOf(&Initializers{})},
+ {Fn: DeepCopy_v1_InternalEvent, InType: reflect.TypeOf(&InternalEvent{})},
+ {Fn: DeepCopy_v1_LabelSelector, InType: reflect.TypeOf(&LabelSelector{})},
+ {Fn: DeepCopy_v1_LabelSelectorRequirement, InType: reflect.TypeOf(&LabelSelectorRequirement{})},
+ {Fn: DeepCopy_v1_ListMeta, InType: reflect.TypeOf(&ListMeta{})},
+ {Fn: DeepCopy_v1_ListOptions, InType: reflect.TypeOf(&ListOptions{})},
+ {Fn: DeepCopy_v1_MicroTime, InType: reflect.TypeOf(&MicroTime{})},
+ {Fn: DeepCopy_v1_ObjectMeta, InType: reflect.TypeOf(&ObjectMeta{})},
+ {Fn: DeepCopy_v1_OwnerReference, InType: reflect.TypeOf(&OwnerReference{})},
+ {Fn: DeepCopy_v1_Patch, InType: reflect.TypeOf(&Patch{})},
+ {Fn: DeepCopy_v1_Preconditions, InType: reflect.TypeOf(&Preconditions{})},
+ {Fn: DeepCopy_v1_RootPaths, InType: reflect.TypeOf(&RootPaths{})},
+ {Fn: DeepCopy_v1_ServerAddressByClientCIDR, InType: reflect.TypeOf(&ServerAddressByClientCIDR{})},
+ {Fn: DeepCopy_v1_Status, InType: reflect.TypeOf(&Status{})},
+ {Fn: DeepCopy_v1_StatusCause, InType: reflect.TypeOf(&StatusCause{})},
+ {Fn: DeepCopy_v1_StatusDetails, InType: reflect.TypeOf(&StatusDetails{})},
+ {Fn: DeepCopy_v1_Time, InType: reflect.TypeOf(&Time{})},
+ {Fn: DeepCopy_v1_Timestamp, InType: reflect.TypeOf(&Timestamp{})},
+ {Fn: DeepCopy_v1_TypeMeta, InType: reflect.TypeOf(&TypeMeta{})},
+ {Fn: DeepCopy_v1_WatchEvent, InType: reflect.TypeOf(&WatchEvent{})},
+ }
+}
+
+// DeepCopy_v1_APIGroup is an autogenerated deepcopy function.
+func DeepCopy_v1_APIGroup(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*APIGroup)
+ out := out.(*APIGroup)
+ *out = *in
+ if in.Versions != nil {
+ in, out := &in.Versions, &out.Versions
+ *out = make([]GroupVersionForDiscovery, len(*in))
+ copy(*out, *in)
+ }
+ if in.ServerAddressByClientCIDRs != nil {
+ in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs
+ *out = make([]ServerAddressByClientCIDR, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_APIGroupList is an autogenerated deepcopy function.
+func DeepCopy_v1_APIGroupList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*APIGroupList)
+ out := out.(*APIGroupList)
+ *out = *in
+ if in.Groups != nil {
+ in, out := &in.Groups, &out.Groups
+ *out = make([]APIGroup, len(*in))
+ for i := range *in {
+ if newVal, err := c.DeepCopy(&(*in)[i]); err != nil {
+ return err
+ } else {
+ (*out)[i] = *newVal.(*APIGroup)
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_APIResource is an autogenerated deepcopy function.
+func DeepCopy_v1_APIResource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*APIResource)
+ out := out.(*APIResource)
+ *out = *in
+ if in.Verbs != nil {
+ in, out := &in.Verbs, &out.Verbs
+ *out = make(Verbs, len(*in))
+ copy(*out, *in)
+ }
+ if in.ShortNames != nil {
+ in, out := &in.ShortNames, &out.ShortNames
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Categories != nil {
+ in, out := &in.Categories, &out.Categories
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_APIResourceList is an autogenerated deepcopy function.
+func DeepCopy_v1_APIResourceList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*APIResourceList)
+ out := out.(*APIResourceList)
+ *out = *in
+ if in.APIResources != nil {
+ in, out := &in.APIResources, &out.APIResources
+ *out = make([]APIResource, len(*in))
+ for i := range *in {
+ if newVal, err := c.DeepCopy(&(*in)[i]); err != nil {
+ return err
+ } else {
+ (*out)[i] = *newVal.(*APIResource)
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_APIVersions is an autogenerated deepcopy function.
+func DeepCopy_v1_APIVersions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*APIVersions)
+ out := out.(*APIVersions)
+ *out = *in
+ if in.Versions != nil {
+ in, out := &in.Versions, &out.Versions
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.ServerAddressByClientCIDRs != nil {
+ in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs
+ *out = make([]ServerAddressByClientCIDR, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_DeleteOptions is an autogenerated deepcopy function.
+func DeepCopy_v1_DeleteOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeleteOptions)
+ out := out.(*DeleteOptions)
+ *out = *in
+ if in.GracePeriodSeconds != nil {
+ in, out := &in.GracePeriodSeconds, &out.GracePeriodSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.Preconditions != nil {
+ in, out := &in.Preconditions, &out.Preconditions
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*Preconditions)
+ }
+ }
+ if in.OrphanDependents != nil {
+ in, out := &in.OrphanDependents, &out.OrphanDependents
+ *out = new(bool)
+ **out = **in
+ }
+ if in.PropagationPolicy != nil {
+ in, out := &in.PropagationPolicy, &out.PropagationPolicy
+ *out = new(DeletionPropagation)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_Duration is an autogenerated deepcopy function.
+func DeepCopy_v1_Duration(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Duration)
+ out := out.(*Duration)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_ExportOptions is an autogenerated deepcopy function.
+func DeepCopy_v1_ExportOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ExportOptions)
+ out := out.(*ExportOptions)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_GetOptions is an autogenerated deepcopy function.
+func DeepCopy_v1_GetOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*GetOptions)
+ out := out.(*GetOptions)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_GroupKind is an autogenerated deepcopy function.
+func DeepCopy_v1_GroupKind(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*GroupKind)
+ out := out.(*GroupKind)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_GroupResource is an autogenerated deepcopy function.
+func DeepCopy_v1_GroupResource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*GroupResource)
+ out := out.(*GroupResource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_GroupVersion is an autogenerated deepcopy function.
+func DeepCopy_v1_GroupVersion(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*GroupVersion)
+ out := out.(*GroupVersion)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_GroupVersionForDiscovery is an autogenerated deepcopy function.
+func DeepCopy_v1_GroupVersionForDiscovery(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*GroupVersionForDiscovery)
+ out := out.(*GroupVersionForDiscovery)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_GroupVersionKind is an autogenerated deepcopy function.
+func DeepCopy_v1_GroupVersionKind(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*GroupVersionKind)
+ out := out.(*GroupVersionKind)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_GroupVersionResource is an autogenerated deepcopy function.
+func DeepCopy_v1_GroupVersionResource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*GroupVersionResource)
+ out := out.(*GroupVersionResource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_Initializer is an autogenerated deepcopy function.
+func DeepCopy_v1_Initializer(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Initializer)
+ out := out.(*Initializer)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_Initializers is an autogenerated deepcopy function.
+func DeepCopy_v1_Initializers(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Initializers)
+ out := out.(*Initializers)
+ *out = *in
+ if in.Pending != nil {
+ in, out := &in.Pending, &out.Pending
+ *out = make([]Initializer, len(*in))
+ copy(*out, *in)
+ }
+ if in.Result != nil {
+ in, out := &in.Result, &out.Result
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*Status)
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_InternalEvent is an autogenerated deepcopy function.
+func DeepCopy_v1_InternalEvent(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*InternalEvent)
+ out := out.(*InternalEvent)
+ *out = *in
+ // in.Object is kind 'Interface'
+ if in.Object != nil {
+ if newVal, err := c.DeepCopy(&in.Object); err != nil {
+ return err
+ } else {
+ out.Object = *newVal.(*runtime.Object)
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_LabelSelector is an autogenerated deepcopy function.
+func DeepCopy_v1_LabelSelector(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LabelSelector)
+ out := out.(*LabelSelector)
+ *out = *in
+ if in.MatchLabels != nil {
+ in, out := &in.MatchLabels, &out.MatchLabels
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ if in.MatchExpressions != nil {
+ in, out := &in.MatchExpressions, &out.MatchExpressions
+ *out = make([]LabelSelectorRequirement, len(*in))
+ for i := range *in {
+ if newVal, err := c.DeepCopy(&(*in)[i]); err != nil {
+ return err
+ } else {
+ (*out)[i] = *newVal.(*LabelSelectorRequirement)
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_LabelSelectorRequirement is an autogenerated deepcopy function.
+func DeepCopy_v1_LabelSelectorRequirement(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LabelSelectorRequirement)
+ out := out.(*LabelSelectorRequirement)
+ *out = *in
+ if in.Values != nil {
+ in, out := &in.Values, &out.Values
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ListMeta is an autogenerated deepcopy function.
+func DeepCopy_v1_ListMeta(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ListMeta)
+ out := out.(*ListMeta)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_ListOptions is an autogenerated deepcopy function.
+func DeepCopy_v1_ListOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ListOptions)
+ out := out.(*ListOptions)
+ *out = *in
+ if in.TimeoutSeconds != nil {
+ in, out := &in.TimeoutSeconds, &out.TimeoutSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_MicroTime is an autogenerated deepcopy function.
+func DeepCopy_v1_MicroTime(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*MicroTime)
+ out := out.(*MicroTime)
+ *out = in.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_ObjectMeta is an autogenerated deepcopy function.
+func DeepCopy_v1_ObjectMeta(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ObjectMeta)
+ out := out.(*ObjectMeta)
+ *out = *in
+ out.CreationTimestamp = in.CreationTimestamp.DeepCopy()
+ if in.DeletionTimestamp != nil {
+ in, out := &in.DeletionTimestamp, &out.DeletionTimestamp
+ *out = new(Time)
+ **out = (*in).DeepCopy()
+ }
+ if in.DeletionGracePeriodSeconds != nil {
+ in, out := &in.DeletionGracePeriodSeconds, &out.DeletionGracePeriodSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.Labels != nil {
+ in, out := &in.Labels, &out.Labels
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ if in.Annotations != nil {
+ in, out := &in.Annotations, &out.Annotations
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ if in.OwnerReferences != nil {
+ in, out := &in.OwnerReferences, &out.OwnerReferences
+ *out = make([]OwnerReference, len(*in))
+ for i := range *in {
+ if newVal, err := c.DeepCopy(&(*in)[i]); err != nil {
+ return err
+ } else {
+ (*out)[i] = *newVal.(*OwnerReference)
+ }
+ }
+ }
+ if in.Initializers != nil {
+ in, out := &in.Initializers, &out.Initializers
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*Initializers)
+ }
+ }
+ if in.Finalizers != nil {
+ in, out := &in.Finalizers, &out.Finalizers
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_OwnerReference is an autogenerated deepcopy function.
+func DeepCopy_v1_OwnerReference(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*OwnerReference)
+ out := out.(*OwnerReference)
+ *out = *in
+ if in.Controller != nil {
+ in, out := &in.Controller, &out.Controller
+ *out = new(bool)
+ **out = **in
+ }
+ if in.BlockOwnerDeletion != nil {
+ in, out := &in.BlockOwnerDeletion, &out.BlockOwnerDeletion
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_Patch is an autogenerated deepcopy function.
+func DeepCopy_v1_Patch(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Patch)
+ out := out.(*Patch)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_Preconditions is an autogenerated deepcopy function.
+func DeepCopy_v1_Preconditions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Preconditions)
+ out := out.(*Preconditions)
+ *out = *in
+ if in.UID != nil {
+ in, out := &in.UID, &out.UID
+ *out = new(types.UID)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_RootPaths is an autogenerated deepcopy function.
+func DeepCopy_v1_RootPaths(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RootPaths)
+ out := out.(*RootPaths)
+ *out = *in
+ if in.Paths != nil {
+ in, out := &in.Paths, &out.Paths
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ServerAddressByClientCIDR is an autogenerated deepcopy function.
+func DeepCopy_v1_ServerAddressByClientCIDR(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServerAddressByClientCIDR)
+ out := out.(*ServerAddressByClientCIDR)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_Status is an autogenerated deepcopy function.
+func DeepCopy_v1_Status(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Status)
+ out := out.(*Status)
+ *out = *in
+ if in.Details != nil {
+ in, out := &in.Details, &out.Details
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*StatusDetails)
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_StatusCause is an autogenerated deepcopy function.
+func DeepCopy_v1_StatusCause(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StatusCause)
+ out := out.(*StatusCause)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_StatusDetails is an autogenerated deepcopy function.
+func DeepCopy_v1_StatusDetails(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StatusDetails)
+ out := out.(*StatusDetails)
+ *out = *in
+ if in.Causes != nil {
+ in, out := &in.Causes, &out.Causes
+ *out = make([]StatusCause, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_Time is an autogenerated deepcopy function.
+func DeepCopy_v1_Time(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Time)
+ out := out.(*Time)
+ *out = in.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_Timestamp is an autogenerated deepcopy function.
+func DeepCopy_v1_Timestamp(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Timestamp)
+ out := out.(*Timestamp)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_TypeMeta is an autogenerated deepcopy function.
+func DeepCopy_v1_TypeMeta(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*TypeMeta)
+ out := out.(*TypeMeta)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_WatchEvent is an autogenerated deepcopy function.
+func DeepCopy_v1_WatchEvent(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*WatchEvent)
+ out := out.(*WatchEvent)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.Object); err != nil {
+ return err
+ } else {
+ out.Object = *newVal.(*runtime.RawExtension)
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.defaults.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.defaults.go
new file mode 100644
index 000000000..6df448eb9
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.defaults.go
@@ -0,0 +1,32 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ return nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/doc.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/doc.go
new file mode 100644
index 000000000..eea67c5c8
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/doc.go
@@ -0,0 +1,22 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package
+// +k8s:openapi-gen=true
+// +k8s:defaulter-gen=TypeMeta
+
+// +groupName=meta.k8s.io
+package v1alpha1
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/generated.pb.go
new file mode 100644
index 000000000..2d43bf94f
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/generated.pb.go
@@ -0,0 +1,633 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1alpha1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/generated.proto
+
+ It has these top-level messages:
+ PartialObjectMetadata
+ PartialObjectMetadataList
+ TableOptions
+*/
+package v1alpha1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *PartialObjectMetadata) Reset() { *m = PartialObjectMetadata{} }
+func (*PartialObjectMetadata) ProtoMessage() {}
+func (*PartialObjectMetadata) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *PartialObjectMetadataList) Reset() { *m = PartialObjectMetadataList{} }
+func (*PartialObjectMetadataList) ProtoMessage() {}
+func (*PartialObjectMetadataList) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{1}
+}
+
+func (m *TableOptions) Reset() { *m = TableOptions{} }
+func (*TableOptions) ProtoMessage() {}
+func (*TableOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
+
+func init() {
+ proto.RegisterType((*PartialObjectMetadata)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1alpha1.PartialObjectMetadata")
+ proto.RegisterType((*PartialObjectMetadataList)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1alpha1.PartialObjectMetadataList")
+ proto.RegisterType((*TableOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1alpha1.TableOptions")
+}
+func (m *PartialObjectMetadata) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PartialObjectMetadata) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ return i, nil
+}
+
+func (m *PartialObjectMetadataList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PartialObjectMetadataList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *TableOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *TableOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.IncludeObject)))
+ i += copy(dAtA[i:], m.IncludeObject)
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *PartialObjectMetadata) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PartialObjectMetadataList) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *TableOptions) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.IncludeObject)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *PartialObjectMetadata) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PartialObjectMetadata{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PartialObjectMetadataList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PartialObjectMetadataList{`,
+ `Items:` + strings.Replace(fmt.Sprintf("%v", this.Items), "PartialObjectMetadata", "PartialObjectMetadata", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *TableOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&TableOptions{`,
+ `IncludeObject:` + fmt.Sprintf("%v", this.IncludeObject) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *PartialObjectMetadata) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PartialObjectMetadata: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PartialObjectMetadata: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PartialObjectMetadataList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PartialObjectMetadataList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PartialObjectMetadataList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, &PartialObjectMetadata{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *TableOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: TableOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: TableOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IncludeObject", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.IncludeObject = IncludeObjectPolicy(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 392 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xbf, 0x6e, 0xd4, 0x40,
+ 0x10, 0x87, 0xbd, 0x42, 0x91, 0x92, 0x0d, 0x69, 0x8c, 0x90, 0xc2, 0x15, 0xeb, 0xe8, 0xaa, 0x08,
+ 0xc1, 0x2e, 0x09, 0x08, 0xd1, 0xe2, 0x2e, 0x12, 0x28, 0x91, 0xa1, 0xa2, 0x62, 0x6d, 0x0f, 0xf6,
+ 0x62, 0x7b, 0xd7, 0xda, 0x1d, 0x47, 0xba, 0x0a, 0x1e, 0x81, 0xc7, 0xba, 0x32, 0x65, 0x2a, 0x8b,
+ 0x33, 0x6f, 0x41, 0x85, 0x6c, 0x5f, 0xc8, 0xbf, 0x3b, 0xe5, 0xba, 0x99, 0xdf, 0xe8, 0xfb, 0x3c,
+ 0xe3, 0xa5, 0x9f, 0x8a, 0x77, 0x8e, 0x2b, 0x23, 0x8a, 0x26, 0x06, 0xab, 0x01, 0xc1, 0x89, 0x73,
+ 0xd0, 0xa9, 0xb1, 0x62, 0x39, 0x90, 0xb5, 0xaa, 0x64, 0x92, 0x2b, 0x0d, 0x76, 0x26, 0xea, 0x22,
+ 0xeb, 0x03, 0x27, 0x2a, 0x40, 0x29, 0xce, 0x8f, 0x64, 0x59, 0xe7, 0xf2, 0x48, 0x64, 0xa0, 0xc1,
+ 0x4a, 0x84, 0x94, 0xd7, 0xd6, 0xa0, 0xf1, 0x9f, 0x8f, 0x2c, 0xbf, 0xc9, 0xf2, 0xba, 0xc8, 0xfa,
+ 0xc0, 0xf1, 0x9e, 0xe5, 0x57, 0xec, 0xe4, 0x65, 0xa6, 0x30, 0x6f, 0x62, 0x9e, 0x98, 0x4a, 0x64,
+ 0x26, 0x33, 0x62, 0x50, 0xc4, 0xcd, 0xb7, 0xa1, 0x1b, 0x9a, 0xa1, 0x1a, 0xd5, 0x93, 0x37, 0x9b,
+ 0xac, 0x75, 0x77, 0xa1, 0xc9, 0xda, 0x63, 0x6c, 0xa3, 0x51, 0x55, 0x70, 0x0f, 0x78, 0xfb, 0x10,
+ 0xe0, 0x92, 0x1c, 0x2a, 0x79, 0x8f, 0x7b, 0xbd, 0x8e, 0x6b, 0x50, 0x95, 0x42, 0x69, 0x74, 0x68,
+ 0xef, 0x42, 0xd3, 0x19, 0x7d, 0x7a, 0x26, 0x2d, 0x2a, 0x59, 0x9e, 0xc6, 0xdf, 0x21, 0xc1, 0x8f,
+ 0x80, 0x32, 0x95, 0x28, 0xfd, 0xaf, 0x74, 0xbb, 0x5a, 0xd6, 0xfb, 0xe4, 0x80, 0x1c, 0xee, 0x1e,
+ 0xbf, 0xe2, 0x9b, 0xfc, 0x5a, 0x7e, 0xed, 0x09, 0xfd, 0x79, 0x1b, 0x78, 0x5d, 0x1b, 0xd0, 0xeb,
+ 0x2c, 0xfa, 0x6f, 0x9d, 0xfe, 0xa0, 0xcf, 0x56, 0x7e, 0xfa, 0x83, 0x72, 0xe8, 0xc7, 0x74, 0x4b,
+ 0x21, 0x54, 0x6e, 0x9f, 0x1c, 0x3c, 0x3a, 0xdc, 0x3d, 0x7e, 0xcf, 0x37, 0x7f, 0x56, 0xbe, 0xd2,
+ 0x1a, 0xee, 0x74, 0x6d, 0xb0, 0x75, 0xd2, 0x3b, 0xa3, 0x51, 0x3d, 0x8d, 0xe9, 0xe3, 0xcf, 0x32,
+ 0x2e, 0xe1, 0xb4, 0x46, 0x65, 0xb4, 0xf3, 0x23, 0xba, 0xa7, 0x74, 0x52, 0x36, 0x29, 0x8c, 0xe8,
+ 0x70, 0xf7, 0x4e, 0xf8, 0x62, 0x79, 0xc5, 0xde, 0xc9, 0xcd, 0xe1, 0xdf, 0x36, 0x78, 0x72, 0x2b,
+ 0x38, 0x33, 0xa5, 0x4a, 0x66, 0xd1, 0x6d, 0x45, 0xc8, 0xe7, 0x0b, 0xe6, 0x5d, 0x2c, 0x98, 0x77,
+ 0xb9, 0x60, 0xde, 0xcf, 0x8e, 0x91, 0x79, 0xc7, 0xc8, 0x45, 0xc7, 0xc8, 0x65, 0xc7, 0xc8, 0xef,
+ 0x8e, 0x91, 0x5f, 0x7f, 0x98, 0xf7, 0x65, 0xfb, 0x6a, 0xf7, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff,
+ 0x97, 0x95, 0xbb, 0xf9, 0x14, 0x03, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/generated.proto b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/generated.proto
new file mode 100644
index 000000000..06833dbd9
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/generated.proto
@@ -0,0 +1,55 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.apimachinery.pkg.apis.meta.v1alpha1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1alpha1";
+
+// PartialObjectMetadata is a generic representation of any object with ObjectMeta. It allows clients
+// to get access to a particular ObjectMeta schema without knowing the details of the version.
+message PartialObjectMetadata {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+}
+
+// PartialObjectMetadataList contains a list of objects containing only their metadata
+message PartialObjectMetadataList {
+ // items contains each of the included items.
+ repeated PartialObjectMetadata items = 1;
+}
+
+// TableOptions are used when a Table is requested by the caller.
+message TableOptions {
+ // includeObject decides whether to include each object along with its columnar information.
+ // Specifying "None" will return no object, specifying "Object" will return the full object contents, and
+ // specifying "Metadata" (the default) will return the object's metadata in the PartialObjectMetadata kind
+ // in version v1alpha1 of the meta.k8s.io API group.
+ optional string includeObject = 1;
+}
+
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/register.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/register.go
new file mode 100644
index 000000000..89f08f383
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/register.go
@@ -0,0 +1,51 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name for this API.
+const GroupName = "meta.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// scheme is the registry for the common types that adhere to the meta v1alpha1 API spec.
+var scheme = runtime.NewScheme()
+
+// ParameterCodec knows about query parameters used with the meta v1alpha1 API spec.
+var ParameterCodec = runtime.NewParameterCodec(scheme)
+
+func init() {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Table{},
+ &TableOptions{},
+ &PartialObjectMetadata{},
+ &PartialObjectMetadataList{},
+ )
+
+ // register manually. This usually goes through the SchemeBuilder, which we cannot use here.
+ //scheme.AddGeneratedDeepCopyFuncs(GetGeneratedDeepCopyFuncs()...)
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/types.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/types.go
new file mode 100644
index 000000000..ef9921806
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/types.go
@@ -0,0 +1,157 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// package v1alpha1 is alpha objects from meta that will be introduced.
+package v1alpha1
+
+import (
+ "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+// TODO: Table does not generate to protobuf because of the interface{} - fix protobuf
+// generation to support a meta type that can accept any valid JSON.
+
+// Table is a tabular representation of a set of API resources. The server transforms the
+// object into a set of preferred columns for quickly reviewing the objects.
+// +protobuf=false
+type Table struct {
+ v1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ v1.ListMeta `json:"metadata,omitempty"`
+
+ // columnDefinitions describes each column in the returned items array. The number of cells per row
+ // will always match the number of column definitions.
+ ColumnDefinitions []TableColumnDefinition `json:"columnDefinitions"`
+ // rows is the list of items in the table.
+ Rows []TableRow `json:"rows"`
+}
+
+// TableColumnDefinition contains information about a column returned in the Table.
+// +protobuf=false
+type TableColumnDefinition struct {
+ // name is a human readable name for the column.
+ Name string `json:"name"`
+ // type is an OpenAPI type definition for this column.
+ // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.
+ Type string `json:"type"`
+ // format is an optional OpenAPI type definition for this column. The 'name' format is applied
+ // to the primary identifier column to assist in clients identifying column is the resource name.
+ // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.
+ Format string `json:"format"`
+ // description is a human readable description of this column.
+ Description string `json:"description"`
+ // priority is an integer defining the relative importance of this column compared to others. Lower
+ // numbers are considered higher priority. Columns that may be omitted in limited space scenarios
+ // should be given a higher priority.
+ Priority int32 `json:"priority"`
+}
+
+// TableRow is an individual row in a table.
+// +protobuf=false
+type TableRow struct {
+ // cells will be as wide as headers and may contain strings, numbers, booleans, simple maps, or lists, or
+ // null. See the type field of the column definition for a more detailed description.
+ Cells []interface{} `json:"cells"`
+ // conditions describe additional status of a row that are relevant for a human user.
+ // +optional
+ Conditions []TableRowCondition `json:"conditions,omitempty"`
+ // This field contains the requested additional information about each object based on the includeObject
+ // policy when requesting the Table. If "None", this field is empty, if "Object" this will be the
+ // default serialization of the object for the current API version, and if "Metadata" (the default) will
+ // contain the object metadata. Check the returned kind and apiVersion of the object before parsing.
+ // +optional
+ Object runtime.RawExtension `json:"object,omitempty"`
+}
+
+// TableRowCondition allows a row to be marked with additional information.
+// +protobuf=false
+type TableRowCondition struct {
+ // Type of row condition.
+ Type RowConditionType `json:"type"`
+ // Status of the condition, one of True, False, Unknown.
+ Status ConditionStatus `json:"status"`
+ // (brief) machine readable reason for the condition's last transition.
+ // +optional
+ Reason string `json:"reason,omitempty"`
+ // Human readable message indicating details about last transition.
+ // +optional
+ Message string `json:"message,omitempty"`
+}
+
+type RowConditionType string
+
+// These are valid conditions of a row. This list is not exhaustive and new conditions may be
+// inculded by other resources.
+const (
+ // RowCompleted means the underlying resource has reached completion and may be given less
+ // visual priority than other resources.
+ RowCompleted RowConditionType = "Completed"
+)
+
+type ConditionStatus string
+
+// These are valid condition statuses. "ConditionTrue" means a resource is in the condition.
+// "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes
+// can't decide if a resource is in the condition or not. In the future, we could add other
+// intermediate conditions, e.g. ConditionDegraded.
+const (
+ ConditionTrue ConditionStatus = "True"
+ ConditionFalse ConditionStatus = "False"
+ ConditionUnknown ConditionStatus = "Unknown"
+)
+
+// IncludeObjectPolicy controls which portion of the object is returned with a Table.
+type IncludeObjectPolicy string
+
+const (
+ // IncludeNone returns no object.
+ IncludeNone IncludeObjectPolicy = "None"
+ // IncludeMetadata serializes the object containing only its metadata field.
+ IncludeMetadata IncludeObjectPolicy = "Metadata"
+ // IncludeObject contains the full object.
+ IncludeObject IncludeObjectPolicy = "Object"
+)
+
+// TableOptions are used when a Table is requested by the caller.
+type TableOptions struct {
+ v1.TypeMeta `json:",inline"`
+ // includeObject decides whether to include each object along with its columnar information.
+ // Specifying "None" will return no object, specifying "Object" will return the full object contents, and
+ // specifying "Metadata" (the default) will return the object's metadata in the PartialObjectMetadata kind
+ // in version v1alpha1 of the meta.k8s.io API group.
+ IncludeObject IncludeObjectPolicy `json:"includeObject,omitempty" protobuf:"bytes,1,opt,name=includeObject,casttype=IncludeObjectPolicy"`
+}
+
+// PartialObjectMetadata is a generic representation of any object with ObjectMeta. It allows clients
+// to get access to a particular ObjectMeta schema without knowing the details of the version.
+type PartialObjectMetadata struct {
+ v1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+}
+
+// PartialObjectMetadataList contains a list of objects containing only their metadata
+type PartialObjectMetadataList struct {
+ v1.TypeMeta `json:",inline"`
+
+ // items contains each of the included items.
+ Items []*PartialObjectMetadata `json:"items" protobuf:"bytes,1,rep,name=items"`
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..e8bb62602
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/types_swagger_doc_generated.go
@@ -0,0 +1,104 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_PartialObjectMetadata = map[string]string{
+ "": "PartialObjectMetadata is a generic representation of any object with ObjectMeta. It allows clients to get access to a particular ObjectMeta schema without knowing the details of the version.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+}
+
+func (PartialObjectMetadata) SwaggerDoc() map[string]string {
+ return map_PartialObjectMetadata
+}
+
+var map_PartialObjectMetadataList = map[string]string{
+ "": "PartialObjectMetadataList contains a list of objects containing only their metadata",
+ "items": "items contains each of the included items.",
+}
+
+func (PartialObjectMetadataList) SwaggerDoc() map[string]string {
+ return map_PartialObjectMetadataList
+}
+
+var map_Table = map[string]string{
+ "": "Table is a tabular representation of a set of API resources. The server transforms the object into a set of preferred columns for quickly reviewing the objects.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "columnDefinitions": "columnDefinitions describes each column in the returned items array. The number of cells per row will always match the number of column definitions.",
+ "rows": "rows is the list of items in the table.",
+}
+
+func (Table) SwaggerDoc() map[string]string {
+ return map_Table
+}
+
+var map_TableColumnDefinition = map[string]string{
+ "": "TableColumnDefinition contains information about a column returned in the Table.",
+ "name": "name is a human readable name for the column.",
+ "type": "type is an OpenAPI type definition for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.",
+ "format": "format is an optional OpenAPI type definition for this column. The 'name' format is applied to the primary identifier column to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.",
+ "description": "description is a human readable description of this column.",
+ "priority": "priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a higher priority.",
+}
+
+func (TableColumnDefinition) SwaggerDoc() map[string]string {
+ return map_TableColumnDefinition
+}
+
+var map_TableOptions = map[string]string{
+ "": "TableOptions are used when a Table is requested by the caller.",
+ "includeObject": "includeObject decides whether to include each object along with its columnar information. Specifying \"None\" will return no object, specifying \"Object\" will return the full object contents, and specifying \"Metadata\" (the default) will return the object's metadata in the PartialObjectMetadata kind in version v1alpha1 of the meta.k8s.io API group.",
+}
+
+func (TableOptions) SwaggerDoc() map[string]string {
+ return map_TableOptions
+}
+
+var map_TableRow = map[string]string{
+ "": "TableRow is an individual row in a table.",
+ "cells": "cells will be as wide as headers and may contain strings, numbers, booleans, simple maps, or lists, or null. See the type field of the column definition for a more detailed description.",
+ "conditions": "conditions describe additional status of a row that are relevant for a human user.",
+ "object": "This field contains the requested additional information about each object based on the includeObject policy when requesting the Table. If \"None\", this field is empty, if \"Object\" this will be the default serialization of the object for the current API version, and if \"Metadata\" (the default) will contain the object metadata. Check the returned kind and apiVersion of the object before parsing.",
+}
+
+func (TableRow) SwaggerDoc() map[string]string {
+ return map_TableRow
+}
+
+var map_TableRowCondition = map[string]string{
+ "": "TableRowCondition allows a row to be marked with additional information.",
+ "type": "Type of row condition.",
+ "status": "Status of the condition, one of True, False, Unknown.",
+ "reason": "(brief) machine readable reason for the condition's last transition.",
+ "message": "Human readable message indicating details about last transition.",
+}
+
+func (TableRowCondition) SwaggerDoc() map[string]string {
+ return map_TableRowCondition
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..ef8a117df
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/zz_generated.deepcopy.go
@@ -0,0 +1,164 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+// GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them.
+func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc {
+ return []conversion.GeneratedDeepCopyFunc{
+ {Fn: DeepCopy_v1alpha1_PartialObjectMetadata, InType: reflect.TypeOf(&PartialObjectMetadata{})},
+ {Fn: DeepCopy_v1alpha1_PartialObjectMetadataList, InType: reflect.TypeOf(&PartialObjectMetadataList{})},
+ {Fn: DeepCopy_v1alpha1_Table, InType: reflect.TypeOf(&Table{})},
+ {Fn: DeepCopy_v1alpha1_TableColumnDefinition, InType: reflect.TypeOf(&TableColumnDefinition{})},
+ {Fn: DeepCopy_v1alpha1_TableOptions, InType: reflect.TypeOf(&TableOptions{})},
+ {Fn: DeepCopy_v1alpha1_TableRow, InType: reflect.TypeOf(&TableRow{})},
+ {Fn: DeepCopy_v1alpha1_TableRowCondition, InType: reflect.TypeOf(&TableRowCondition{})},
+ }
+}
+
+// DeepCopy_v1alpha1_PartialObjectMetadata is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_PartialObjectMetadata(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PartialObjectMetadata)
+ out := out.(*PartialObjectMetadata)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_PartialObjectMetadataList is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_PartialObjectMetadataList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PartialObjectMetadataList)
+ out := out.(*PartialObjectMetadataList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]*PartialObjectMetadata, len(*in))
+ for i := range *in {
+ if newVal, err := c.DeepCopy(&(*in)[i]); err != nil {
+ return err
+ } else {
+ (*out)[i] = *newVal.(**PartialObjectMetadata)
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_Table is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_Table(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Table)
+ out := out.(*Table)
+ *out = *in
+ if in.ColumnDefinitions != nil {
+ in, out := &in.ColumnDefinitions, &out.ColumnDefinitions
+ *out = make([]TableColumnDefinition, len(*in))
+ copy(*out, *in)
+ }
+ if in.Rows != nil {
+ in, out := &in.Rows, &out.Rows
+ *out = make([]TableRow, len(*in))
+ for i := range *in {
+ if newVal, err := c.DeepCopy(&(*in)[i]); err != nil {
+ return err
+ } else {
+ (*out)[i] = *newVal.(*TableRow)
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_TableColumnDefinition is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_TableColumnDefinition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*TableColumnDefinition)
+ out := out.(*TableColumnDefinition)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_TableOptions is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_TableOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*TableOptions)
+ out := out.(*TableOptions)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_TableRow is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_TableRow(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*TableRow)
+ out := out.(*TableRow)
+ *out = *in
+ if in.Cells != nil {
+ in, out := &in.Cells, &out.Cells
+ *out = make([]interface{}, len(*in))
+ for i := range *in {
+ if newVal, err := c.DeepCopy(&(*in)[i]); err != nil {
+ return err
+ } else {
+ (*out)[i] = *newVal.(*interface{})
+ }
+ }
+ }
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]TableRowCondition, len(*in))
+ copy(*out, *in)
+ }
+ if newVal, err := c.DeepCopy(&in.Object); err != nil {
+ return err
+ } else {
+ out.Object = *newVal.(*runtime.RawExtension)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_TableRowCondition is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_TableRowCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*TableRowCondition)
+ out := out.(*TableRowCondition)
+ *out = *in
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/zz_generated.defaults.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/zz_generated.defaults.go
new file mode 100644
index 000000000..7e6df29d4
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1alpha1/zz_generated.defaults.go
@@ -0,0 +1,32 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1alpha1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ return nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/cloner.go b/vendor/k8s.io/apimachinery/pkg/conversion/cloner.go
new file mode 100644
index 000000000..c5dec1f31
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/conversion/cloner.go
@@ -0,0 +1,249 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package conversion
+
+import (
+ "fmt"
+ "reflect"
+)
+
+// Cloner knows how to copy one type to another.
+type Cloner struct {
+ // Map from the type to a function which can do the deep copy.
+ deepCopyFuncs map[reflect.Type]reflect.Value
+ generatedDeepCopyFuncs map[reflect.Type]func(in interface{}, out interface{}, c *Cloner) error
+}
+
+// NewCloner creates a new Cloner object.
+func NewCloner() *Cloner {
+ c := &Cloner{
+ deepCopyFuncs: map[reflect.Type]reflect.Value{},
+ generatedDeepCopyFuncs: map[reflect.Type]func(in interface{}, out interface{}, c *Cloner) error{},
+ }
+ if err := c.RegisterDeepCopyFunc(byteSliceDeepCopy); err != nil {
+ // If one of the deep-copy functions is malformed, detect it immediately.
+ panic(err)
+ }
+ return c
+}
+
+// Prevent recursing into every byte...
+func byteSliceDeepCopy(in *[]byte, out *[]byte, c *Cloner) error {
+ if *in != nil {
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ } else {
+ *out = nil
+ }
+ return nil
+}
+
+// Verifies whether a deep-copy function has a correct signature.
+func verifyDeepCopyFunctionSignature(ft reflect.Type) error {
+ if ft.Kind() != reflect.Func {
+ return fmt.Errorf("expected func, got: %v", ft)
+ }
+ if ft.NumIn() != 3 {
+ return fmt.Errorf("expected three 'in' params, got %v", ft)
+ }
+ if ft.NumOut() != 1 {
+ return fmt.Errorf("expected one 'out' param, got %v", ft)
+ }
+ if ft.In(0).Kind() != reflect.Ptr {
+ return fmt.Errorf("expected pointer arg for 'in' param 0, got: %v", ft)
+ }
+ if ft.In(1) != ft.In(0) {
+ return fmt.Errorf("expected 'in' param 0 the same as param 1, got: %v", ft)
+ }
+ var forClonerType Cloner
+ if expected := reflect.TypeOf(&forClonerType); ft.In(2) != expected {
+ return fmt.Errorf("expected '%v' arg for 'in' param 2, got: '%v'", expected, ft.In(2))
+ }
+ var forErrorType error
+ // This convolution is necessary, otherwise TypeOf picks up on the fact
+ // that forErrorType is nil
+ errorType := reflect.TypeOf(&forErrorType).Elem()
+ if ft.Out(0) != errorType {
+ return fmt.Errorf("expected error return, got: %v", ft)
+ }
+ return nil
+}
+
+// RegisterGeneratedDeepCopyFunc registers a copying func with the Cloner.
+// deepCopyFunc must take three parameters: a type input, a pointer to a
+// type output, and a pointer to Cloner. It should return an error.
+//
+// Example:
+// c.RegisterGeneratedDeepCopyFunc(
+// func(in Pod, out *Pod, c *Cloner) error {
+// // deep copy logic...
+// return nil
+// })
+func (c *Cloner) RegisterDeepCopyFunc(deepCopyFunc interface{}) error {
+ fv := reflect.ValueOf(deepCopyFunc)
+ ft := fv.Type()
+ if err := verifyDeepCopyFunctionSignature(ft); err != nil {
+ return err
+ }
+ c.deepCopyFuncs[ft.In(0)] = fv
+ return nil
+}
+
+// GeneratedDeepCopyFunc bundles an untyped generated deep-copy function of a type
+// with a reflection type object used as a key to lookup the deep-copy function.
+type GeneratedDeepCopyFunc struct {
+ Fn func(in interface{}, out interface{}, c *Cloner) error
+ InType reflect.Type
+}
+
+// Similar to RegisterDeepCopyFunc, but registers deep copy function that were
+// automatically generated.
+func (c *Cloner) RegisterGeneratedDeepCopyFunc(fn GeneratedDeepCopyFunc) error {
+ c.generatedDeepCopyFuncs[fn.InType] = fn.Fn
+ return nil
+}
+
+// DeepCopy will perform a deep copy of a given object.
+func (c *Cloner) DeepCopy(in interface{}) (interface{}, error) {
+ // Can be invalid if we run DeepCopy(X) where X is a nil interface type.
+ // For example, we get an invalid value when someone tries to deep-copy
+ // a nil labels.Selector.
+ // This does not occur if X is nil and is a pointer to a concrete type.
+ if in == nil {
+ return nil, nil
+ }
+ inValue := reflect.ValueOf(in)
+ outValue, err := c.deepCopy(inValue)
+ if err != nil {
+ return nil, err
+ }
+ return outValue.Interface(), nil
+}
+
+func (c *Cloner) deepCopy(src reflect.Value) (reflect.Value, error) {
+ inType := src.Type()
+
+ switch src.Kind() {
+ case reflect.Interface, reflect.Ptr, reflect.Map, reflect.Slice:
+ if src.IsNil() {
+ return src, nil
+ }
+ }
+
+ if fv, ok := c.deepCopyFuncs[inType]; ok {
+ return c.customDeepCopy(src, fv)
+ }
+ if fv, ok := c.generatedDeepCopyFuncs[inType]; ok {
+ var outValue reflect.Value
+ outValue = reflect.New(inType.Elem())
+ err := fv(src.Interface(), outValue.Interface(), c)
+ return outValue, err
+ }
+ return c.defaultDeepCopy(src)
+}
+
+func (c *Cloner) customDeepCopy(src, fv reflect.Value) (reflect.Value, error) {
+ outValue := reflect.New(src.Type().Elem())
+ args := []reflect.Value{src, outValue, reflect.ValueOf(c)}
+ result := fv.Call(args)[0].Interface()
+ // This convolution is necessary because nil interfaces won't convert
+ // to error.
+ if result == nil {
+ return outValue, nil
+ }
+ return outValue, result.(error)
+}
+
+func (c *Cloner) defaultDeepCopy(src reflect.Value) (reflect.Value, error) {
+ switch src.Kind() {
+ case reflect.Chan, reflect.Func, reflect.UnsafePointer, reflect.Uintptr:
+ return src, fmt.Errorf("cannot deep copy kind: %s", src.Kind())
+ case reflect.Array:
+ dst := reflect.New(src.Type())
+ for i := 0; i < src.Len(); i++ {
+ copyVal, err := c.deepCopy(src.Index(i))
+ if err != nil {
+ return src, err
+ }
+ dst.Elem().Index(i).Set(copyVal)
+ }
+ return dst.Elem(), nil
+ case reflect.Interface:
+ if src.IsNil() {
+ return src, nil
+ }
+ return c.deepCopy(src.Elem())
+ case reflect.Map:
+ if src.IsNil() {
+ return src, nil
+ }
+ dst := reflect.MakeMap(src.Type())
+ for _, k := range src.MapKeys() {
+ copyVal, err := c.deepCopy(src.MapIndex(k))
+ if err != nil {
+ return src, err
+ }
+ dst.SetMapIndex(k, copyVal)
+ }
+ return dst, nil
+ case reflect.Ptr:
+ if src.IsNil() {
+ return src, nil
+ }
+ dst := reflect.New(src.Type().Elem())
+ copyVal, err := c.deepCopy(src.Elem())
+ if err != nil {
+ return src, err
+ }
+ dst.Elem().Set(copyVal)
+ return dst, nil
+ case reflect.Slice:
+ if src.IsNil() {
+ return src, nil
+ }
+ dst := reflect.MakeSlice(src.Type(), 0, src.Len())
+ for i := 0; i < src.Len(); i++ {
+ copyVal, err := c.deepCopy(src.Index(i))
+ if err != nil {
+ return src, err
+ }
+ dst = reflect.Append(dst, copyVal)
+ }
+ return dst, nil
+ case reflect.Struct:
+ dst := reflect.New(src.Type())
+ for i := 0; i < src.NumField(); i++ {
+ if !dst.Elem().Field(i).CanSet() {
+ // Can't set private fields. At this point, the
+ // best we can do is a shallow copy. For
+ // example, time.Time is a value type with
+ // private members that can be shallow copied.
+ return src, nil
+ }
+ copyVal, err := c.deepCopy(src.Field(i))
+ if err != nil {
+ return src, err
+ }
+ dst.Elem().Field(i).Set(copyVal)
+ }
+ return dst.Elem(), nil
+
+ default:
+ // Value types like numbers, booleans, and strings.
+ return src, nil
+ }
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/converter.go b/vendor/k8s.io/apimachinery/pkg/conversion/converter.go
new file mode 100644
index 000000000..7854c207c
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/conversion/converter.go
@@ -0,0 +1,898 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package conversion
+
+import (
+ "fmt"
+ "reflect"
+)
+
+type typePair struct {
+ source reflect.Type
+ dest reflect.Type
+}
+
+type typeNamePair struct {
+ fieldType reflect.Type
+ fieldName string
+}
+
+// DebugLogger allows you to get debugging messages if necessary.
+type DebugLogger interface {
+ Logf(format string, args ...interface{})
+}
+
+type NameFunc func(t reflect.Type) string
+
+var DefaultNameFunc = func(t reflect.Type) string { return t.Name() }
+
+type GenericConversionFunc func(a, b interface{}, scope Scope) (bool, error)
+
+// Converter knows how to convert one type to another.
+type Converter struct {
+ // Map from the conversion pair to a function which can
+ // do the conversion.
+ conversionFuncs ConversionFuncs
+ generatedConversionFuncs ConversionFuncs
+
+ // genericConversions are called during normal conversion to offer a "fast-path"
+ // that avoids all reflection. These methods are not called outside of the .Convert()
+ // method.
+ genericConversions []GenericConversionFunc
+
+ // Set of conversions that should be treated as a no-op
+ ignoredConversions map[typePair]struct{}
+
+ // This is a map from a source field type and name, to a list of destination
+ // field type and name.
+ structFieldDests map[typeNamePair][]typeNamePair
+
+ // Allows for the opposite lookup of structFieldDests. So that SourceFromDest
+ // copy flag also works. So this is a map of destination field name, to potential
+ // source field name and type to look for.
+ structFieldSources map[typeNamePair][]typeNamePair
+
+ // Map from an input type to a function which can apply a key name mapping
+ inputFieldMappingFuncs map[reflect.Type]FieldMappingFunc
+
+ // Map from an input type to a set of default conversion flags.
+ inputDefaultFlags map[reflect.Type]FieldMatchingFlags
+
+ // If non-nil, will be called to print helpful debugging info. Quite verbose.
+ Debug DebugLogger
+
+ // nameFunc is called to retrieve the name of a type; this name is used for the
+ // purpose of deciding whether two types match or not (i.e., will we attempt to
+ // do a conversion). The default returns the go type name.
+ nameFunc func(t reflect.Type) string
+}
+
+// NewConverter creates a new Converter object.
+func NewConverter(nameFn NameFunc) *Converter {
+ c := &Converter{
+ conversionFuncs: NewConversionFuncs(),
+ generatedConversionFuncs: NewConversionFuncs(),
+ ignoredConversions: make(map[typePair]struct{}),
+ nameFunc: nameFn,
+ structFieldDests: make(map[typeNamePair][]typeNamePair),
+ structFieldSources: make(map[typeNamePair][]typeNamePair),
+
+ inputFieldMappingFuncs: make(map[reflect.Type]FieldMappingFunc),
+ inputDefaultFlags: make(map[reflect.Type]FieldMatchingFlags),
+ }
+ c.RegisterConversionFunc(Convert_Slice_byte_To_Slice_byte)
+ return c
+}
+
+// AddGenericConversionFunc adds a function that accepts the ConversionFunc call pattern
+// (for two conversion types) to the converter. These functions are checked first during
+// a normal conversion, but are otherwise not called. Use AddConversionFuncs when registering
+// typed conversions.
+func (c *Converter) AddGenericConversionFunc(fn GenericConversionFunc) {
+ c.genericConversions = append(c.genericConversions, fn)
+}
+
+// WithConversions returns a Converter that is a copy of c but with the additional
+// fns merged on top.
+func (c *Converter) WithConversions(fns ConversionFuncs) *Converter {
+ copied := *c
+ copied.conversionFuncs = c.conversionFuncs.Merge(fns)
+ return &copied
+}
+
+// DefaultMeta returns the conversion FieldMappingFunc and meta for a given type.
+func (c *Converter) DefaultMeta(t reflect.Type) (FieldMatchingFlags, *Meta) {
+ return c.inputDefaultFlags[t], &Meta{
+ KeyNameMapping: c.inputFieldMappingFuncs[t],
+ }
+}
+
+// Convert_Slice_byte_To_Slice_byte prevents recursing into every byte
+func Convert_Slice_byte_To_Slice_byte(in *[]byte, out *[]byte, s Scope) error {
+ if *in == nil {
+ *out = nil
+ return nil
+ }
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ return nil
+}
+
+// Scope is passed to conversion funcs to allow them to continue an ongoing conversion.
+// If multiple converters exist in the system, Scope will allow you to use the correct one
+// from a conversion function--that is, the one your conversion function was called by.
+type Scope interface {
+ // Call Convert to convert sub-objects. Note that if you call it with your own exact
+ // parameters, you'll run out of stack space before anything useful happens.
+ Convert(src, dest interface{}, flags FieldMatchingFlags) error
+
+ // DefaultConvert performs the default conversion, without calling a conversion func
+ // on the current stack frame. This makes it safe to call from a conversion func.
+ DefaultConvert(src, dest interface{}, flags FieldMatchingFlags) error
+
+ // SrcTags and DestTags contain the struct tags that src and dest had, respectively.
+ // If the enclosing object was not a struct, then these will contain no tags, of course.
+ SrcTag() reflect.StructTag
+ DestTag() reflect.StructTag
+
+ // Flags returns the flags with which the conversion was started.
+ Flags() FieldMatchingFlags
+
+ // Meta returns any information originally passed to Convert.
+ Meta() *Meta
+}
+
+// FieldMappingFunc can convert an input field value into different values, depending on
+// the value of the source or destination struct tags.
+type FieldMappingFunc func(key string, sourceTag, destTag reflect.StructTag) (source string, dest string)
+
+func NewConversionFuncs() ConversionFuncs {
+ return ConversionFuncs{fns: make(map[typePair]reflect.Value)}
+}
+
+type ConversionFuncs struct {
+ fns map[typePair]reflect.Value
+}
+
+// Add adds the provided conversion functions to the lookup table - they must have the signature
+// `func(type1, type2, Scope) error`. Functions are added in the order passed and will override
+// previously registered pairs.
+func (c ConversionFuncs) Add(fns ...interface{}) error {
+ for _, fn := range fns {
+ fv := reflect.ValueOf(fn)
+ ft := fv.Type()
+ if err := verifyConversionFunctionSignature(ft); err != nil {
+ return err
+ }
+ c.fns[typePair{ft.In(0).Elem(), ft.In(1).Elem()}] = fv
+ }
+ return nil
+}
+
+// Merge returns a new ConversionFuncs that contains all conversions from
+// both other and c, with other conversions taking precedence.
+func (c ConversionFuncs) Merge(other ConversionFuncs) ConversionFuncs {
+ merged := NewConversionFuncs()
+ for k, v := range c.fns {
+ merged.fns[k] = v
+ }
+ for k, v := range other.fns {
+ merged.fns[k] = v
+ }
+ return merged
+}
+
+// Meta is supplied by Scheme, when it calls Convert.
+type Meta struct {
+ // KeyNameMapping is an optional function which may map the listed key (field name)
+ // into a source and destination value.
+ KeyNameMapping FieldMappingFunc
+ // Context is an optional field that callers may use to pass info to conversion functions.
+ Context interface{}
+}
+
+// scope contains information about an ongoing conversion.
+type scope struct {
+ converter *Converter
+ meta *Meta
+ flags FieldMatchingFlags
+
+ // srcStack & destStack are separate because they may not have a 1:1
+ // relationship.
+ srcStack scopeStack
+ destStack scopeStack
+}
+
+type scopeStackElem struct {
+ tag reflect.StructTag
+ value reflect.Value
+ key string
+}
+
+type scopeStack []scopeStackElem
+
+func (s *scopeStack) pop() {
+ n := len(*s)
+ *s = (*s)[:n-1]
+}
+
+func (s *scopeStack) push(e scopeStackElem) {
+ *s = append(*s, e)
+}
+
+func (s *scopeStack) top() *scopeStackElem {
+ return &(*s)[len(*s)-1]
+}
+
+func (s scopeStack) describe() string {
+ desc := ""
+ if len(s) > 1 {
+ desc = "(" + s[1].value.Type().String() + ")"
+ }
+ for i, v := range s {
+ if i < 2 {
+ // First layer on stack is not real; second is handled specially above.
+ continue
+ }
+ if v.key == "" {
+ desc += fmt.Sprintf(".%v", v.value.Type())
+ } else {
+ desc += fmt.Sprintf(".%v", v.key)
+ }
+ }
+ return desc
+}
+
+// Formats src & dest as indices for printing.
+func (s *scope) setIndices(src, dest int) {
+ s.srcStack.top().key = fmt.Sprintf("[%v]", src)
+ s.destStack.top().key = fmt.Sprintf("[%v]", dest)
+}
+
+// Formats src & dest as map keys for printing.
+func (s *scope) setKeys(src, dest interface{}) {
+ s.srcStack.top().key = fmt.Sprintf(`["%v"]`, src)
+ s.destStack.top().key = fmt.Sprintf(`["%v"]`, dest)
+}
+
+// Convert continues a conversion.
+func (s *scope) Convert(src, dest interface{}, flags FieldMatchingFlags) error {
+ return s.converter.Convert(src, dest, flags, s.meta)
+}
+
+// DefaultConvert continues a conversion, performing a default conversion (no conversion func)
+// for the current stack frame.
+func (s *scope) DefaultConvert(src, dest interface{}, flags FieldMatchingFlags) error {
+ return s.converter.DefaultConvert(src, dest, flags, s.meta)
+}
+
+// SrcTag returns the tag of the struct containing the current source item, if any.
+func (s *scope) SrcTag() reflect.StructTag {
+ return s.srcStack.top().tag
+}
+
+// DestTag returns the tag of the struct containing the current dest item, if any.
+func (s *scope) DestTag() reflect.StructTag {
+ return s.destStack.top().tag
+}
+
+// Flags returns the flags with which the current conversion was started.
+func (s *scope) Flags() FieldMatchingFlags {
+ return s.flags
+}
+
+// Meta returns the meta object that was originally passed to Convert.
+func (s *scope) Meta() *Meta {
+ return s.meta
+}
+
+// describe prints the path to get to the current (source, dest) values.
+func (s *scope) describe() (src, dest string) {
+ return s.srcStack.describe(), s.destStack.describe()
+}
+
+// error makes an error that includes information about where we were in the objects
+// we were asked to convert.
+func (s *scope) errorf(message string, args ...interface{}) error {
+ srcPath, destPath := s.describe()
+ where := fmt.Sprintf("converting %v to %v: ", srcPath, destPath)
+ return fmt.Errorf(where+message, args...)
+}
+
+// Verifies whether a conversion function has a correct signature.
+func verifyConversionFunctionSignature(ft reflect.Type) error {
+ if ft.Kind() != reflect.Func {
+ return fmt.Errorf("expected func, got: %v", ft)
+ }
+ if ft.NumIn() != 3 {
+ return fmt.Errorf("expected three 'in' params, got: %v", ft)
+ }
+ if ft.NumOut() != 1 {
+ return fmt.Errorf("expected one 'out' param, got: %v", ft)
+ }
+ if ft.In(0).Kind() != reflect.Ptr {
+ return fmt.Errorf("expected pointer arg for 'in' param 0, got: %v", ft)
+ }
+ if ft.In(1).Kind() != reflect.Ptr {
+ return fmt.Errorf("expected pointer arg for 'in' param 1, got: %v", ft)
+ }
+ scopeType := Scope(nil)
+ if e, a := reflect.TypeOf(&scopeType).Elem(), ft.In(2); e != a {
+ return fmt.Errorf("expected '%v' arg for 'in' param 2, got '%v' (%v)", e, a, ft)
+ }
+ var forErrorType error
+ // This convolution is necessary, otherwise TypeOf picks up on the fact
+ // that forErrorType is nil.
+ errorType := reflect.TypeOf(&forErrorType).Elem()
+ if ft.Out(0) != errorType {
+ return fmt.Errorf("expected error return, got: %v", ft)
+ }
+ return nil
+}
+
+// RegisterConversionFunc registers a conversion func with the
+// Converter. conversionFunc must take three parameters: a pointer to the input
+// type, a pointer to the output type, and a conversion.Scope (which should be
+// used if recursive conversion calls are desired). It must return an error.
+//
+// Example:
+// c.RegisterConversionFunc(
+// func(in *Pod, out *v1.Pod, s Scope) error {
+// // conversion logic...
+// return nil
+// })
+func (c *Converter) RegisterConversionFunc(conversionFunc interface{}) error {
+ return c.conversionFuncs.Add(conversionFunc)
+}
+
+// Similar to RegisterConversionFunc, but registers conversion function that were
+// automatically generated.
+func (c *Converter) RegisterGeneratedConversionFunc(conversionFunc interface{}) error {
+ return c.generatedConversionFuncs.Add(conversionFunc)
+}
+
+// RegisterIgnoredConversion registers a "no-op" for conversion, where any requested
+// conversion between from and to is ignored.
+func (c *Converter) RegisterIgnoredConversion(from, to interface{}) error {
+ typeFrom := reflect.TypeOf(from)
+ typeTo := reflect.TypeOf(to)
+ if reflect.TypeOf(from).Kind() != reflect.Ptr {
+ return fmt.Errorf("expected pointer arg for 'from' param 0, got: %v", typeFrom)
+ }
+ if typeTo.Kind() != reflect.Ptr {
+ return fmt.Errorf("expected pointer arg for 'to' param 1, got: %v", typeTo)
+ }
+ c.ignoredConversions[typePair{typeFrom.Elem(), typeTo.Elem()}] = struct{}{}
+ return nil
+}
+
+// IsConversionIgnored returns true if the specified objects should be dropped during
+// conversion.
+func (c *Converter) IsConversionIgnored(inType, outType reflect.Type) bool {
+ _, found := c.ignoredConversions[typePair{inType, outType}]
+ return found
+}
+
+func (c *Converter) HasConversionFunc(inType, outType reflect.Type) bool {
+ _, found := c.conversionFuncs.fns[typePair{inType, outType}]
+ return found
+}
+
+func (c *Converter) ConversionFuncValue(inType, outType reflect.Type) (reflect.Value, bool) {
+ value, found := c.conversionFuncs.fns[typePair{inType, outType}]
+ return value, found
+}
+
+// SetStructFieldCopy registers a correspondence. Whenever a struct field is encountered
+// which has a type and name matching srcFieldType and srcFieldName, it wil be copied
+// into the field in the destination struct matching destFieldType & Name, if such a
+// field exists.
+// May be called multiple times, even for the same source field & type--all applicable
+// copies will be performed.
+func (c *Converter) SetStructFieldCopy(srcFieldType interface{}, srcFieldName string, destFieldType interface{}, destFieldName string) error {
+ st := reflect.TypeOf(srcFieldType)
+ dt := reflect.TypeOf(destFieldType)
+ srcKey := typeNamePair{st, srcFieldName}
+ destKey := typeNamePair{dt, destFieldName}
+ c.structFieldDests[srcKey] = append(c.structFieldDests[srcKey], destKey)
+ c.structFieldSources[destKey] = append(c.structFieldSources[destKey], srcKey)
+ return nil
+}
+
+// RegisterInputDefaults registers a field name mapping function, used when converting
+// from maps to structs. Inputs to the conversion methods are checked for this type and a mapping
+// applied automatically if the input matches in. A set of default flags for the input conversion
+// may also be provided, which will be used when no explicit flags are requested.
+func (c *Converter) RegisterInputDefaults(in interface{}, fn FieldMappingFunc, defaultFlags FieldMatchingFlags) error {
+ fv := reflect.ValueOf(in)
+ ft := fv.Type()
+ if ft.Kind() != reflect.Ptr {
+ return fmt.Errorf("expected pointer 'in' argument, got: %v", ft)
+ }
+ c.inputFieldMappingFuncs[ft] = fn
+ c.inputDefaultFlags[ft] = defaultFlags
+ return nil
+}
+
+// FieldMatchingFlags contains a list of ways in which struct fields could be
+// copied. These constants may be | combined.
+type FieldMatchingFlags int
+
+const (
+ // Loop through destination fields, search for matching source
+ // field to copy it from. Source fields with no corresponding
+ // destination field will be ignored. If SourceToDest is
+ // specified, this flag is ignored. If neither is specified,
+ // or no flags are passed, this flag is the default.
+ DestFromSource FieldMatchingFlags = 0
+ // Loop through source fields, search for matching dest field
+ // to copy it into. Destination fields with no corresponding
+ // source field will be ignored.
+ SourceToDest FieldMatchingFlags = 1 << iota
+ // Don't treat it as an error if the corresponding source or
+ // dest field can't be found.
+ IgnoreMissingFields
+ // Don't require type names to match.
+ AllowDifferentFieldTypeNames
+)
+
+// IsSet returns true if the given flag or combination of flags is set.
+func (f FieldMatchingFlags) IsSet(flag FieldMatchingFlags) bool {
+ if flag == DestFromSource {
+ // The bit logic doesn't work on the default value.
+ return f&SourceToDest != SourceToDest
+ }
+ return f&flag == flag
+}
+
+// Convert will translate src to dest if it knows how. Both must be pointers.
+// If no conversion func is registered and the default copying mechanism
+// doesn't work on this type pair, an error will be returned.
+// Read the comments on the various FieldMatchingFlags constants to understand
+// what the 'flags' parameter does.
+// 'meta' is given to allow you to pass information to conversion functions,
+// it is not used by Convert() other than storing it in the scope.
+// Not safe for objects with cyclic references!
+func (c *Converter) Convert(src, dest interface{}, flags FieldMatchingFlags, meta *Meta) error {
+ if len(c.genericConversions) > 0 {
+ // TODO: avoid scope allocation
+ s := &scope{converter: c, flags: flags, meta: meta}
+ for _, fn := range c.genericConversions {
+ if ok, err := fn(src, dest, s); ok {
+ return err
+ }
+ }
+ }
+ return c.doConversion(src, dest, flags, meta, c.convert)
+}
+
+// DefaultConvert will translate src to dest if it knows how. Both must be pointers.
+// No conversion func is used. If the default copying mechanism
+// doesn't work on this type pair, an error will be returned.
+// Read the comments on the various FieldMatchingFlags constants to understand
+// what the 'flags' parameter does.
+// 'meta' is given to allow you to pass information to conversion functions,
+// it is not used by DefaultConvert() other than storing it in the scope.
+// Not safe for objects with cyclic references!
+func (c *Converter) DefaultConvert(src, dest interface{}, flags FieldMatchingFlags, meta *Meta) error {
+ return c.doConversion(src, dest, flags, meta, c.defaultConvert)
+}
+
+type conversionFunc func(sv, dv reflect.Value, scope *scope) error
+
+func (c *Converter) doConversion(src, dest interface{}, flags FieldMatchingFlags, meta *Meta, f conversionFunc) error {
+ dv, err := EnforcePtr(dest)
+ if err != nil {
+ return err
+ }
+ if !dv.CanAddr() && !dv.CanSet() {
+ return fmt.Errorf("can't write to dest")
+ }
+ sv, err := EnforcePtr(src)
+ if err != nil {
+ return err
+ }
+ s := &scope{
+ converter: c,
+ flags: flags,
+ meta: meta,
+ }
+ // Leave something on the stack, so that calls to struct tag getters never fail.
+ s.srcStack.push(scopeStackElem{})
+ s.destStack.push(scopeStackElem{})
+ return f(sv, dv, s)
+}
+
+// callCustom calls 'custom' with sv & dv. custom must be a conversion function.
+func (c *Converter) callCustom(sv, dv, custom reflect.Value, scope *scope) error {
+ if !sv.CanAddr() {
+ sv2 := reflect.New(sv.Type())
+ sv2.Elem().Set(sv)
+ sv = sv2
+ } else {
+ sv = sv.Addr()
+ }
+ if !dv.CanAddr() {
+ if !dv.CanSet() {
+ return scope.errorf("can't addr or set dest.")
+ }
+ dvOrig := dv
+ dv := reflect.New(dvOrig.Type())
+ defer func() { dvOrig.Set(dv) }()
+ } else {
+ dv = dv.Addr()
+ }
+ args := []reflect.Value{sv, dv, reflect.ValueOf(scope)}
+ ret := custom.Call(args)[0].Interface()
+ // This convolution is necessary because nil interfaces won't convert
+ // to errors.
+ if ret == nil {
+ return nil
+ }
+ return ret.(error)
+}
+
+// convert recursively copies sv into dv, calling an appropriate conversion function if
+// one is registered.
+func (c *Converter) convert(sv, dv reflect.Value, scope *scope) error {
+ dt, st := dv.Type(), sv.Type()
+ pair := typePair{st, dt}
+
+ // ignore conversions of this type
+ if _, ok := c.ignoredConversions[pair]; ok {
+ if c.Debug != nil {
+ c.Debug.Logf("Ignoring conversion of '%v' to '%v'", st, dt)
+ }
+ return nil
+ }
+
+ // Convert sv to dv.
+ if fv, ok := c.conversionFuncs.fns[pair]; ok {
+ if c.Debug != nil {
+ c.Debug.Logf("Calling custom conversion of '%v' to '%v'", st, dt)
+ }
+ return c.callCustom(sv, dv, fv, scope)
+ }
+ if fv, ok := c.generatedConversionFuncs.fns[pair]; ok {
+ if c.Debug != nil {
+ c.Debug.Logf("Calling generated conversion of '%v' to '%v'", st, dt)
+ }
+ return c.callCustom(sv, dv, fv, scope)
+ }
+
+ return c.defaultConvert(sv, dv, scope)
+}
+
+// defaultConvert recursively copies sv into dv. no conversion function is called
+// for the current stack frame (but conversion functions may be called for nested objects)
+func (c *Converter) defaultConvert(sv, dv reflect.Value, scope *scope) error {
+ dt, st := dv.Type(), sv.Type()
+
+ if !dv.CanSet() {
+ return scope.errorf("Cannot set dest. (Tried to deep copy something with unexported fields?)")
+ }
+
+ if !scope.flags.IsSet(AllowDifferentFieldTypeNames) && c.nameFunc(dt) != c.nameFunc(st) {
+ return scope.errorf(
+ "type names don't match (%v, %v), and no conversion 'func (%v, %v) error' registered.",
+ c.nameFunc(st), c.nameFunc(dt), st, dt)
+ }
+
+ switch st.Kind() {
+ case reflect.Map, reflect.Ptr, reflect.Slice, reflect.Interface, reflect.Struct:
+ // Don't copy these via assignment/conversion!
+ default:
+ // This should handle all simple types.
+ if st.AssignableTo(dt) {
+ dv.Set(sv)
+ return nil
+ }
+ if st.ConvertibleTo(dt) {
+ dv.Set(sv.Convert(dt))
+ return nil
+ }
+ }
+
+ if c.Debug != nil {
+ c.Debug.Logf("Trying to convert '%v' to '%v'", st, dt)
+ }
+
+ scope.srcStack.push(scopeStackElem{value: sv})
+ scope.destStack.push(scopeStackElem{value: dv})
+ defer scope.srcStack.pop()
+ defer scope.destStack.pop()
+
+ switch dv.Kind() {
+ case reflect.Struct:
+ return c.convertKV(toKVValue(sv), toKVValue(dv), scope)
+ case reflect.Slice:
+ if sv.IsNil() {
+ // Don't make a zero-length slice.
+ dv.Set(reflect.Zero(dt))
+ return nil
+ }
+ dv.Set(reflect.MakeSlice(dt, sv.Len(), sv.Cap()))
+ for i := 0; i < sv.Len(); i++ {
+ scope.setIndices(i, i)
+ if err := c.convert(sv.Index(i), dv.Index(i), scope); err != nil {
+ return err
+ }
+ }
+ case reflect.Ptr:
+ if sv.IsNil() {
+ // Don't copy a nil ptr!
+ dv.Set(reflect.Zero(dt))
+ return nil
+ }
+ dv.Set(reflect.New(dt.Elem()))
+ switch st.Kind() {
+ case reflect.Ptr, reflect.Interface:
+ return c.convert(sv.Elem(), dv.Elem(), scope)
+ default:
+ return c.convert(sv, dv.Elem(), scope)
+ }
+ case reflect.Map:
+ if sv.IsNil() {
+ // Don't copy a nil ptr!
+ dv.Set(reflect.Zero(dt))
+ return nil
+ }
+ dv.Set(reflect.MakeMap(dt))
+ for _, sk := range sv.MapKeys() {
+ dk := reflect.New(dt.Key()).Elem()
+ if err := c.convert(sk, dk, scope); err != nil {
+ return err
+ }
+ dkv := reflect.New(dt.Elem()).Elem()
+ scope.setKeys(sk.Interface(), dk.Interface())
+ // TODO: sv.MapIndex(sk) may return a value with CanAddr() == false,
+ // because a map[string]struct{} does not allow a pointer reference.
+ // Calling a custom conversion function defined for the map value
+ // will panic. Example is PodInfo map[string]ContainerStatus.
+ if err := c.convert(sv.MapIndex(sk), dkv, scope); err != nil {
+ return err
+ }
+ dv.SetMapIndex(dk, dkv)
+ }
+ case reflect.Interface:
+ if sv.IsNil() {
+ // Don't copy a nil interface!
+ dv.Set(reflect.Zero(dt))
+ return nil
+ }
+ tmpdv := reflect.New(sv.Elem().Type()).Elem()
+ if err := c.convert(sv.Elem(), tmpdv, scope); err != nil {
+ return err
+ }
+ dv.Set(reflect.ValueOf(tmpdv.Interface()))
+ return nil
+ default:
+ return scope.errorf("couldn't copy '%v' into '%v'; didn't understand types", st, dt)
+ }
+ return nil
+}
+
+var stringType = reflect.TypeOf("")
+
+func toKVValue(v reflect.Value) kvValue {
+ switch v.Kind() {
+ case reflect.Struct:
+ return structAdaptor(v)
+ case reflect.Map:
+ if v.Type().Key().AssignableTo(stringType) {
+ return stringMapAdaptor(v)
+ }
+ }
+
+ return nil
+}
+
+// kvValue lets us write the same conversion logic to work with both maps
+// and structs. Only maps with string keys make sense for this.
+type kvValue interface {
+ // returns all keys, as a []string.
+ keys() []string
+ // Will just return "" for maps.
+ tagOf(key string) reflect.StructTag
+ // Will return the zero Value if the key doesn't exist.
+ value(key string) reflect.Value
+ // Maps require explicit setting-- will do nothing for structs.
+ // Returns false on failure.
+ confirmSet(key string, v reflect.Value) bool
+}
+
+type stringMapAdaptor reflect.Value
+
+func (a stringMapAdaptor) len() int {
+ return reflect.Value(a).Len()
+}
+
+func (a stringMapAdaptor) keys() []string {
+ v := reflect.Value(a)
+ keys := make([]string, v.Len())
+ for i, v := range v.MapKeys() {
+ if v.IsNil() {
+ continue
+ }
+ switch t := v.Interface().(type) {
+ case string:
+ keys[i] = t
+ }
+ }
+ return keys
+}
+
+func (a stringMapAdaptor) tagOf(key string) reflect.StructTag {
+ return ""
+}
+
+func (a stringMapAdaptor) value(key string) reflect.Value {
+ return reflect.Value(a).MapIndex(reflect.ValueOf(key))
+}
+
+func (a stringMapAdaptor) confirmSet(key string, v reflect.Value) bool {
+ return true
+}
+
+type structAdaptor reflect.Value
+
+func (a structAdaptor) len() int {
+ v := reflect.Value(a)
+ return v.Type().NumField()
+}
+
+func (a structAdaptor) keys() []string {
+ v := reflect.Value(a)
+ t := v.Type()
+ keys := make([]string, t.NumField())
+ for i := range keys {
+ keys[i] = t.Field(i).Name
+ }
+ return keys
+}
+
+func (a structAdaptor) tagOf(key string) reflect.StructTag {
+ v := reflect.Value(a)
+ field, ok := v.Type().FieldByName(key)
+ if ok {
+ return field.Tag
+ }
+ return ""
+}
+
+func (a structAdaptor) value(key string) reflect.Value {
+ v := reflect.Value(a)
+ return v.FieldByName(key)
+}
+
+func (a structAdaptor) confirmSet(key string, v reflect.Value) bool {
+ return true
+}
+
+// convertKV can convert things that consist of key/value pairs, like structs
+// and some maps.
+func (c *Converter) convertKV(skv, dkv kvValue, scope *scope) error {
+ if skv == nil || dkv == nil {
+ // TODO: add keys to stack to support really understandable error messages.
+ return fmt.Errorf("Unable to convert %#v to %#v", skv, dkv)
+ }
+
+ lister := dkv
+ if scope.flags.IsSet(SourceToDest) {
+ lister = skv
+ }
+
+ var mapping FieldMappingFunc
+ if scope.meta != nil && scope.meta.KeyNameMapping != nil {
+ mapping = scope.meta.KeyNameMapping
+ }
+
+ for _, key := range lister.keys() {
+ if found, err := c.checkField(key, skv, dkv, scope); found {
+ if err != nil {
+ return err
+ }
+ continue
+ }
+ stag := skv.tagOf(key)
+ dtag := dkv.tagOf(key)
+ skey := key
+ dkey := key
+ if mapping != nil {
+ skey, dkey = scope.meta.KeyNameMapping(key, stag, dtag)
+ }
+
+ df := dkv.value(dkey)
+ sf := skv.value(skey)
+ if !df.IsValid() || !sf.IsValid() {
+ switch {
+ case scope.flags.IsSet(IgnoreMissingFields):
+ // No error.
+ case scope.flags.IsSet(SourceToDest):
+ return scope.errorf("%v not present in dest", dkey)
+ default:
+ return scope.errorf("%v not present in src", skey)
+ }
+ continue
+ }
+ scope.srcStack.top().key = skey
+ scope.srcStack.top().tag = stag
+ scope.destStack.top().key = dkey
+ scope.destStack.top().tag = dtag
+ if err := c.convert(sf, df, scope); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// checkField returns true if the field name matches any of the struct
+// field copying rules. The error should be ignored if it returns false.
+func (c *Converter) checkField(fieldName string, skv, dkv kvValue, scope *scope) (bool, error) {
+ replacementMade := false
+ if scope.flags.IsSet(DestFromSource) {
+ df := dkv.value(fieldName)
+ if !df.IsValid() {
+ return false, nil
+ }
+ destKey := typeNamePair{df.Type(), fieldName}
+ // Check each of the potential source (type, name) pairs to see if they're
+ // present in sv.
+ for _, potentialSourceKey := range c.structFieldSources[destKey] {
+ sf := skv.value(potentialSourceKey.fieldName)
+ if !sf.IsValid() {
+ continue
+ }
+ if sf.Type() == potentialSourceKey.fieldType {
+ // Both the source's name and type matched, so copy.
+ scope.srcStack.top().key = potentialSourceKey.fieldName
+ scope.destStack.top().key = fieldName
+ if err := c.convert(sf, df, scope); err != nil {
+ return true, err
+ }
+ dkv.confirmSet(fieldName, df)
+ replacementMade = true
+ }
+ }
+ return replacementMade, nil
+ }
+
+ sf := skv.value(fieldName)
+ if !sf.IsValid() {
+ return false, nil
+ }
+ srcKey := typeNamePair{sf.Type(), fieldName}
+ // Check each of the potential dest (type, name) pairs to see if they're
+ // present in dv.
+ for _, potentialDestKey := range c.structFieldDests[srcKey] {
+ df := dkv.value(potentialDestKey.fieldName)
+ if !df.IsValid() {
+ continue
+ }
+ if df.Type() == potentialDestKey.fieldType {
+ // Both the dest's name and type matched, so copy.
+ scope.srcStack.top().key = fieldName
+ scope.destStack.top().key = potentialDestKey.fieldName
+ if err := c.convert(sf, df, scope); err != nil {
+ return true, err
+ }
+ dkv.confirmSet(potentialDestKey.fieldName, df)
+ replacementMade = true
+ }
+ }
+ return replacementMade, nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/deep_equal.go b/vendor/k8s.io/apimachinery/pkg/conversion/deep_equal.go
new file mode 100644
index 000000000..f21abe1e5
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/conversion/deep_equal.go
@@ -0,0 +1,36 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package conversion
+
+import (
+ "k8s.io/apimachinery/third_party/forked/golang/reflect"
+)
+
+// The code for this type must be located in third_party, since it forks from
+// go std lib. But for convenience, we expose the type here, too.
+type Equalities struct {
+ reflect.Equalities
+}
+
+// For convenience, panics on errors
+func EqualitiesOrDie(funcs ...interface{}) Equalities {
+ e := Equalities{reflect.Equalities{}}
+ if err := e.AddFuncs(funcs...); err != nil {
+ panic(err)
+ }
+ return e
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/doc.go b/vendor/k8s.io/apimachinery/pkg/conversion/doc.go
new file mode 100644
index 000000000..7415d8164
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/conversion/doc.go
@@ -0,0 +1,24 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package conversion provides go object versioning.
+//
+// Specifically, conversion provides a way for you to define multiple versions
+// of the same object. You may write functions which implement conversion logic,
+// but for the fields which did not change, copying is automated. This makes it
+// easy to modify the structures you use in memory without affecting the format
+// you store on disk or respond to in your external API calls.
+package conversion // import "k8s.io/apimachinery/pkg/conversion"
diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/helper.go b/vendor/k8s.io/apimachinery/pkg/conversion/helper.go
new file mode 100644
index 000000000..4ebc1ebc5
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/conversion/helper.go
@@ -0,0 +1,39 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package conversion
+
+import (
+ "fmt"
+ "reflect"
+)
+
+// EnforcePtr ensures that obj is a pointer of some sort. Returns a reflect.Value
+// of the dereferenced pointer, ensuring that it is settable/addressable.
+// Returns an error if this is not possible.
+func EnforcePtr(obj interface{}) (reflect.Value, error) {
+ v := reflect.ValueOf(obj)
+ if v.Kind() != reflect.Ptr {
+ if v.Kind() == reflect.Invalid {
+ return reflect.Value{}, fmt.Errorf("expected pointer, but got invalid kind")
+ }
+ return reflect.Value{}, fmt.Errorf("expected pointer, but got %v type", v.Type())
+ }
+ if v.IsNil() {
+ return reflect.Value{}, fmt.Errorf("expected pointer, but got nil")
+ }
+ return v.Elem(), nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/convert.go b/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/convert.go
new file mode 100644
index 000000000..30f717b2c
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/convert.go
@@ -0,0 +1,188 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package queryparams
+
+import (
+ "fmt"
+ "net/url"
+ "reflect"
+ "strings"
+)
+
+// Marshaler converts an object to a query parameter string representation
+type Marshaler interface {
+ MarshalQueryParameter() (string, error)
+}
+
+// Unmarshaler converts a string representation to an object
+type Unmarshaler interface {
+ UnmarshalQueryParameter(string) error
+}
+
+func jsonTag(field reflect.StructField) (string, bool) {
+ structTag := field.Tag.Get("json")
+ if len(structTag) == 0 {
+ return "", false
+ }
+ parts := strings.Split(structTag, ",")
+ tag := parts[0]
+ if tag == "-" {
+ tag = ""
+ }
+ omitempty := false
+ parts = parts[1:]
+ for _, part := range parts {
+ if part == "omitempty" {
+ omitempty = true
+ break
+ }
+ }
+ return tag, omitempty
+}
+
+func formatValue(value interface{}) string {
+ return fmt.Sprintf("%v", value)
+}
+
+func isPointerKind(kind reflect.Kind) bool {
+ return kind == reflect.Ptr
+}
+
+func isStructKind(kind reflect.Kind) bool {
+ return kind == reflect.Struct
+}
+
+func isValueKind(kind reflect.Kind) bool {
+ switch kind {
+ case reflect.String, reflect.Bool, reflect.Int, reflect.Int8, reflect.Int16,
+ reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8,
+ reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Float32,
+ reflect.Float64, reflect.Complex64, reflect.Complex128:
+ return true
+ default:
+ return false
+ }
+}
+
+func zeroValue(value reflect.Value) bool {
+ return reflect.DeepEqual(reflect.Zero(value.Type()).Interface(), value.Interface())
+}
+
+func customMarshalValue(value reflect.Value) (reflect.Value, bool) {
+ // Return unless we implement a custom query marshaler
+ if !value.CanInterface() {
+ return reflect.Value{}, false
+ }
+
+ marshaler, ok := value.Interface().(Marshaler)
+ if !ok {
+ return reflect.Value{}, false
+ }
+
+ // Don't invoke functions on nil pointers
+ // If the type implements MarshalQueryParameter, AND the tag is not omitempty, AND the value is a nil pointer, "" seems like a reasonable response
+ if isPointerKind(value.Kind()) && zeroValue(value) {
+ return reflect.ValueOf(""), true
+ }
+
+ // Get the custom marshalled value
+ v, err := marshaler.MarshalQueryParameter()
+ if err != nil {
+ return reflect.Value{}, false
+ }
+ return reflect.ValueOf(v), true
+}
+
+func addParam(values url.Values, tag string, omitempty bool, value reflect.Value) {
+ if omitempty && zeroValue(value) {
+ return
+ }
+ val := ""
+ iValue := fmt.Sprintf("%v", value.Interface())
+
+ if iValue != "<nil>" {
+ val = iValue
+ }
+ values.Add(tag, val)
+}
+
+func addListOfParams(values url.Values, tag string, omitempty bool, list reflect.Value) {
+ for i := 0; i < list.Len(); i++ {
+ addParam(values, tag, omitempty, list.Index(i))
+ }
+}
+
+// Convert takes an object and converts it to a url.Values object using JSON tags as
+// parameter names. Only top-level simple values, arrays, and slices are serialized.
+// Embedded structs, maps, etc. will not be serialized.
+func Convert(obj interface{}) (url.Values, error) {
+ result := url.Values{}
+ if obj == nil {
+ return result, nil
+ }
+ var sv reflect.Value
+ switch reflect.TypeOf(obj).Kind() {
+ case reflect.Ptr, reflect.Interface:
+ sv = reflect.ValueOf(obj).Elem()
+ default:
+ return nil, fmt.Errorf("expecting a pointer or interface")
+ }
+ st := sv.Type()
+ if !isStructKind(st.Kind()) {
+ return nil, fmt.Errorf("expecting a pointer to a struct")
+ }
+
+ // Check all object fields
+ convertStruct(result, st, sv)
+
+ return result, nil
+}
+
+func convertStruct(result url.Values, st reflect.Type, sv reflect.Value) {
+ for i := 0; i < st.NumField(); i++ {
+ field := sv.Field(i)
+ tag, omitempty := jsonTag(st.Field(i))
+ if len(tag) == 0 {
+ continue
+ }
+ ft := field.Type()
+
+ kind := ft.Kind()
+ if isPointerKind(kind) {
+ ft = ft.Elem()
+ kind = ft.Kind()
+ if !field.IsNil() {
+ field = reflect.Indirect(field)
+ }
+ }
+
+ switch {
+ case isValueKind(kind):
+ addParam(result, tag, omitempty, field)
+ case kind == reflect.Array || kind == reflect.Slice:
+ if isValueKind(ft.Elem().Kind()) {
+ addListOfParams(result, tag, omitempty, field)
+ }
+ case isStructKind(kind) && !(zeroValue(field) && omitempty):
+ if marshalValue, ok := customMarshalValue(field); ok {
+ addParam(result, tag, omitempty, marshalValue)
+ } else {
+ convertStruct(result, ft, field)
+ }
+ }
+ }
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/doc.go b/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/doc.go
new file mode 100644
index 000000000..7b763de6f
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package queryparams provides conversion from versioned
+// runtime objects to URL query values
+package queryparams // import "k8s.io/apimachinery/pkg/conversion/queryparams"
diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/unstructured/converter.go b/vendor/k8s.io/apimachinery/pkg/conversion/unstructured/converter.go
new file mode 100644
index 000000000..cf84a6198
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/conversion/unstructured/converter.go
@@ -0,0 +1,690 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package unstructured
+
+import (
+ "bytes"
+ encodingjson "encoding/json"
+ "fmt"
+ "math"
+ "os"
+ "reflect"
+ "strconv"
+ "strings"
+ "sync"
+ "sync/atomic"
+
+ apiequality "k8s.io/apimachinery/pkg/api/equality"
+ "k8s.io/apimachinery/pkg/util/diff"
+ "k8s.io/apimachinery/pkg/util/json"
+ utilruntime "k8s.io/apimachinery/pkg/util/runtime"
+
+ "github.com/golang/glog"
+)
+
+// Converter is an interface for converting between interface{}
+// and map[string]interface representation.
+type Converter interface {
+ ToUnstructured(obj interface{}, u *map[string]interface{}) error
+ FromUnstructured(u map[string]interface{}, obj interface{}) error
+}
+
+type structField struct {
+ structType reflect.Type
+ field int
+}
+
+type fieldInfo struct {
+ name string
+ nameValue reflect.Value
+ omitempty bool
+}
+
+type fieldsCacheMap map[structField]*fieldInfo
+
+type fieldsCache struct {
+ sync.Mutex
+ value atomic.Value
+}
+
+func newFieldsCache() *fieldsCache {
+ cache := &fieldsCache{}
+ cache.value.Store(make(fieldsCacheMap))
+ return cache
+}
+
+var (
+ marshalerType = reflect.TypeOf(new(encodingjson.Marshaler)).Elem()
+ unmarshalerType = reflect.TypeOf(new(encodingjson.Unmarshaler)).Elem()
+ mapStringInterfaceType = reflect.TypeOf(map[string]interface{}{})
+ stringType = reflect.TypeOf(string(""))
+ int64Type = reflect.TypeOf(int64(0))
+ uint64Type = reflect.TypeOf(uint64(0))
+ float64Type = reflect.TypeOf(float64(0))
+ boolType = reflect.TypeOf(bool(false))
+ fieldCache = newFieldsCache()
+ DefaultConverter = NewConverter(parseBool(os.Getenv("KUBE_PATCH_CONVERSION_DETECTOR")))
+)
+
+func parseBool(key string) bool {
+ if len(key) == 0 {
+ return false
+ }
+ value, err := strconv.ParseBool(key)
+ if err != nil {
+ utilruntime.HandleError(fmt.Errorf("Couldn't parse '%s' as bool for unstructured mismatch detection", key))
+ }
+ return value
+}
+
+// ConverterImpl knows how to convert between interface{} and
+// Unstructured in both ways.
+type converterImpl struct {
+ // If true, we will be additionally running conversion via json
+ // to ensure that the result is true.
+ // This is supposed to be set only in tests.
+ mismatchDetection bool
+}
+
+func NewConverter(mismatchDetection bool) Converter {
+ return &converterImpl{
+ mismatchDetection: mismatchDetection,
+ }
+}
+
+func (c *converterImpl) FromUnstructured(u map[string]interface{}, obj interface{}) error {
+ t := reflect.TypeOf(obj)
+ value := reflect.ValueOf(obj)
+ if t.Kind() != reflect.Ptr || value.IsNil() {
+ return fmt.Errorf("FromUnstructured requires a non-nil pointer to an object, got %v", t)
+ }
+ err := fromUnstructured(reflect.ValueOf(u), value.Elem())
+ if c.mismatchDetection {
+ newObj := reflect.New(t.Elem()).Interface()
+ newErr := fromUnstructuredViaJSON(u, newObj)
+ if (err != nil) != (newErr != nil) {
+ glog.Fatalf("FromUnstructured unexpected error for %v: error: %v", u, err)
+ }
+ if err == nil && !apiequality.Semantic.DeepEqual(obj, newObj) {
+ glog.Fatalf("FromUnstructured mismatch for %#v, diff: %v", obj, diff.ObjectReflectDiff(obj, newObj))
+ }
+ }
+ return err
+}
+
+func fromUnstructuredViaJSON(u map[string]interface{}, obj interface{}) error {
+ data, err := json.Marshal(u)
+ if err != nil {
+ return err
+ }
+ return json.Unmarshal(data, obj)
+}
+
+func fromUnstructured(sv, dv reflect.Value) error {
+ sv = unwrapInterface(sv)
+ if !sv.IsValid() {
+ dv.Set(reflect.Zero(dv.Type()))
+ return nil
+ }
+ st, dt := sv.Type(), dv.Type()
+
+ switch dt.Kind() {
+ case reflect.Map, reflect.Slice, reflect.Ptr, reflect.Struct, reflect.Interface:
+ // Those require non-trivial conversion.
+ default:
+ // This should handle all simple types.
+ if st.AssignableTo(dt) {
+ dv.Set(sv)
+ return nil
+ }
+ // We cannot simply use "ConvertibleTo", as JSON doesn't support conversions
+ // between those four groups: bools, integers, floats and string. We need to
+ // do the same.
+ if st.ConvertibleTo(dt) {
+ switch st.Kind() {
+ case reflect.String:
+ switch dt.Kind() {
+ case reflect.String:
+ dv.Set(sv.Convert(dt))
+ return nil
+ }
+ case reflect.Bool:
+ switch dt.Kind() {
+ case reflect.Bool:
+ dv.Set(sv.Convert(dt))
+ return nil
+ }
+ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
+ reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
+ switch dt.Kind() {
+ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
+ reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
+ dv.Set(sv.Convert(dt))
+ return nil
+ }
+ case reflect.Float32, reflect.Float64:
+ switch dt.Kind() {
+ case reflect.Float32, reflect.Float64:
+ dv.Set(sv.Convert(dt))
+ return nil
+ }
+ if sv.Float() == math.Trunc(sv.Float()) {
+ dv.Set(sv.Convert(dt))
+ return nil
+ }
+ }
+ return fmt.Errorf("cannot convert %s to %s", st.String(), dt.String())
+ }
+ }
+
+ // Check if the object has a custom JSON marshaller/unmarshaller.
+ if reflect.PtrTo(dt).Implements(unmarshalerType) {
+ data, err := json.Marshal(sv.Interface())
+ if err != nil {
+ return fmt.Errorf("error encoding %s to json: %v", st.String(), err)
+ }
+ unmarshaler := dv.Addr().Interface().(encodingjson.Unmarshaler)
+ return unmarshaler.UnmarshalJSON(data)
+ }
+
+ switch dt.Kind() {
+ case reflect.Map:
+ return mapFromUnstructured(sv, dv)
+ case reflect.Slice:
+ return sliceFromUnstructured(sv, dv)
+ case reflect.Ptr:
+ return pointerFromUnstructured(sv, dv)
+ case reflect.Struct:
+ return structFromUnstructured(sv, dv)
+ case reflect.Interface:
+ return interfaceFromUnstructured(sv, dv)
+ default:
+ return fmt.Errorf("unrecognized type: %v", dt.Kind())
+ }
+}
+
+func fieldInfoFromField(structType reflect.Type, field int) *fieldInfo {
+ fieldCacheMap := fieldCache.value.Load().(fieldsCacheMap)
+ if info, ok := fieldCacheMap[structField{structType, field}]; ok {
+ return info
+ }
+
+ // Cache miss - we need to compute the field name.
+ info := &fieldInfo{}
+ typeField := structType.Field(field)
+ jsonTag := typeField.Tag.Get("json")
+ if len(jsonTag) == 0 {
+ // Make the first character lowercase.
+ if typeField.Name == "" {
+ info.name = typeField.Name
+ } else {
+ info.name = strings.ToLower(typeField.Name[:1]) + typeField.Name[1:]
+ }
+ } else {
+ items := strings.Split(jsonTag, ",")
+ info.name = items[0]
+ for i := range items {
+ if items[i] == "omitempty" {
+ info.omitempty = true
+ }
+ }
+ }
+ info.nameValue = reflect.ValueOf(info.name)
+
+ fieldCache.Lock()
+ defer fieldCache.Unlock()
+ fieldCacheMap = fieldCache.value.Load().(fieldsCacheMap)
+ newFieldCacheMap := make(fieldsCacheMap)
+ for k, v := range fieldCacheMap {
+ newFieldCacheMap[k] = v
+ }
+ newFieldCacheMap[structField{structType, field}] = info
+ fieldCache.value.Store(newFieldCacheMap)
+ return info
+}
+
+func unwrapInterface(v reflect.Value) reflect.Value {
+ for v.Kind() == reflect.Interface {
+ v = v.Elem()
+ }
+ return v
+}
+
+func mapFromUnstructured(sv, dv reflect.Value) error {
+ st, dt := sv.Type(), dv.Type()
+ if st.Kind() != reflect.Map {
+ return fmt.Errorf("cannot restore map from %v", st.Kind())
+ }
+
+ if !st.Key().AssignableTo(dt.Key()) && !st.Key().ConvertibleTo(dt.Key()) {
+ return fmt.Errorf("cannot copy map with non-assignable keys: %v %v", st.Key(), dt.Key())
+ }
+
+ if sv.IsNil() {
+ dv.Set(reflect.Zero(dt))
+ return nil
+ }
+ dv.Set(reflect.MakeMap(dt))
+ for _, key := range sv.MapKeys() {
+ value := reflect.New(dt.Elem()).Elem()
+ if val := unwrapInterface(sv.MapIndex(key)); val.IsValid() {
+ if err := fromUnstructured(val, value); err != nil {
+ return err
+ }
+ } else {
+ value.Set(reflect.Zero(dt.Elem()))
+ }
+ if st.Key().AssignableTo(dt.Key()) {
+ dv.SetMapIndex(key, value)
+ } else {
+ dv.SetMapIndex(key.Convert(dt.Key()), value)
+ }
+ }
+ return nil
+}
+
+func sliceFromUnstructured(sv, dv reflect.Value) error {
+ st, dt := sv.Type(), dv.Type()
+ if st.Kind() == reflect.String && dt.Elem().Kind() == reflect.Uint8 {
+ // We store original []byte representation as string.
+ // This conversion is allowed, but we need to be careful about
+ // marshaling data appropriately.
+ if len(sv.Interface().(string)) > 0 {
+ marshalled, err := json.Marshal(sv.Interface())
+ if err != nil {
+ return fmt.Errorf("error encoding %s to json: %v", st, err)
+ }
+ // TODO: Is this Unmarshal needed?
+ var data []byte
+ err = json.Unmarshal(marshalled, &data)
+ if err != nil {
+ return fmt.Errorf("error decoding from json: %v", err)
+ }
+ dv.SetBytes(data)
+ } else {
+ dv.Set(reflect.Zero(dt))
+ }
+ return nil
+ }
+ if st.Kind() != reflect.Slice {
+ return fmt.Errorf("cannot restore slice from %v", st.Kind())
+ }
+
+ if sv.IsNil() {
+ dv.Set(reflect.Zero(dt))
+ return nil
+ }
+ dv.Set(reflect.MakeSlice(dt, sv.Len(), sv.Cap()))
+ for i := 0; i < sv.Len(); i++ {
+ if err := fromUnstructured(sv.Index(i), dv.Index(i)); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func pointerFromUnstructured(sv, dv reflect.Value) error {
+ st, dt := sv.Type(), dv.Type()
+
+ if st.Kind() == reflect.Ptr && sv.IsNil() {
+ dv.Set(reflect.Zero(dt))
+ return nil
+ }
+ dv.Set(reflect.New(dt.Elem()))
+ switch st.Kind() {
+ case reflect.Ptr, reflect.Interface:
+ return fromUnstructured(sv.Elem(), dv.Elem())
+ default:
+ return fromUnstructured(sv, dv.Elem())
+ }
+}
+
+func structFromUnstructured(sv, dv reflect.Value) error {
+ st, dt := sv.Type(), dv.Type()
+ if st.Kind() != reflect.Map {
+ return fmt.Errorf("cannot restore struct from: %v", st.Kind())
+ }
+
+ for i := 0; i < dt.NumField(); i++ {
+ fieldInfo := fieldInfoFromField(dt, i)
+ fv := dv.Field(i)
+
+ if len(fieldInfo.name) == 0 {
+ // This field is inlined.
+ if err := fromUnstructured(sv, fv); err != nil {
+ return err
+ }
+ } else {
+ value := unwrapInterface(sv.MapIndex(fieldInfo.nameValue))
+ if value.IsValid() {
+ if err := fromUnstructured(value, fv); err != nil {
+ return err
+ }
+ } else {
+ fv.Set(reflect.Zero(fv.Type()))
+ }
+ }
+ }
+ return nil
+}
+
+func interfaceFromUnstructured(sv, dv reflect.Value) error {
+ // TODO: Is this conversion safe?
+ dv.Set(sv)
+ return nil
+}
+
+func (c *converterImpl) ToUnstructured(obj interface{}, u *map[string]interface{}) error {
+ t := reflect.TypeOf(obj)
+ value := reflect.ValueOf(obj)
+ if t.Kind() != reflect.Ptr || value.IsNil() {
+ return fmt.Errorf("ToUnstructured requires a non-nil pointer to an object, got %v", t)
+ }
+ err := toUnstructured(value.Elem(), reflect.ValueOf(u).Elem())
+ if c.mismatchDetection {
+ newUnstr := &map[string]interface{}{}
+ newErr := toUnstructuredViaJSON(obj, newUnstr)
+ if (err != nil) != (newErr != nil) {
+ glog.Fatalf("ToUnstructured unexpected error for %v: error: %v", obj, err)
+ }
+ if err == nil && !apiequality.Semantic.DeepEqual(u, newUnstr) {
+ glog.Fatalf("ToUnstructured mismatch for %#v, diff: %v", u, diff.ObjectReflectDiff(u, newUnstr))
+ }
+ }
+ return err
+}
+
+func toUnstructuredViaJSON(obj interface{}, u *map[string]interface{}) error {
+ data, err := json.Marshal(obj)
+ if err != nil {
+ return err
+ }
+ return json.Unmarshal(data, u)
+}
+
+func toUnstructured(sv, dv reflect.Value) error {
+ st, dt := sv.Type(), dv.Type()
+
+ // Check if the object has a custom JSON marshaller/unmarshaller.
+ if st.Implements(marshalerType) {
+ if sv.Kind() == reflect.Ptr && sv.IsNil() {
+ // We're done - we don't need to store anything.
+ return nil
+ }
+
+ marshaler := sv.Interface().(encodingjson.Marshaler)
+ data, err := marshaler.MarshalJSON()
+ if err != nil {
+ return err
+ }
+ if bytes.Equal(data, []byte("null")) {
+ // We're done - we don't need to store anything.
+ } else {
+ switch {
+ case len(data) > 0 && data[0] == '"':
+ var result string
+ err := json.Unmarshal(data, &result)
+ if err != nil {
+ return fmt.Errorf("error decoding from json: %v", err)
+ }
+ dv.Set(reflect.ValueOf(result))
+ case len(data) > 0 && data[0] == '{':
+ result := make(map[string]interface{})
+ err := json.Unmarshal(data, &result)
+ if err != nil {
+ return fmt.Errorf("error decoding from json: %v", err)
+ }
+ dv.Set(reflect.ValueOf(result))
+ default:
+ var result int64
+ err := json.Unmarshal(data, &result)
+ if err != nil {
+ return fmt.Errorf("error decoding from json: %v", err)
+ }
+ dv.Set(reflect.ValueOf(result))
+ }
+ }
+ return nil
+ }
+
+ switch st.Kind() {
+ case reflect.String:
+ if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 {
+ dv.Set(reflect.New(stringType))
+ }
+ dv.Set(reflect.ValueOf(sv.String()))
+ return nil
+ case reflect.Bool:
+ if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 {
+ dv.Set(reflect.New(boolType))
+ }
+ dv.Set(reflect.ValueOf(sv.Bool()))
+ return nil
+ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+ if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 {
+ dv.Set(reflect.New(int64Type))
+ }
+ dv.Set(reflect.ValueOf(sv.Int()))
+ return nil
+ case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
+ if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 {
+ dv.Set(reflect.New(uint64Type))
+ }
+ dv.Set(reflect.ValueOf(sv.Uint()))
+ return nil
+ case reflect.Float32, reflect.Float64:
+ if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 {
+ dv.Set(reflect.New(float64Type))
+ }
+ dv.Set(reflect.ValueOf(sv.Float()))
+ return nil
+ case reflect.Map:
+ return mapToUnstructured(sv, dv)
+ case reflect.Slice:
+ return sliceToUnstructured(sv, dv)
+ case reflect.Ptr:
+ return pointerToUnstructured(sv, dv)
+ case reflect.Struct:
+ return structToUnstructured(sv, dv)
+ case reflect.Interface:
+ return interfaceToUnstructured(sv, dv)
+ default:
+ return fmt.Errorf("unrecognized type: %v", st.Kind())
+ }
+}
+
+func mapToUnstructured(sv, dv reflect.Value) error {
+ st, dt := sv.Type(), dv.Type()
+ if sv.IsNil() {
+ dv.Set(reflect.Zero(dt))
+ return nil
+ }
+ if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 {
+ if st.Key().Kind() == reflect.String {
+ switch st.Elem().Kind() {
+ // TODO It should be possible to reuse the slice for primitive types.
+ // However, it is panicing in the following form.
+ // case reflect.String, reflect.Bool,
+ // reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
+ // reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
+ // sv.Set(sv)
+ // return nil
+ default:
+ // We need to do a proper conversion.
+ }
+ }
+ dv.Set(reflect.MakeMap(mapStringInterfaceType))
+ dv = dv.Elem()
+ dt = dv.Type()
+ }
+ if dt.Kind() != reflect.Map {
+ return fmt.Errorf("cannot convert struct to: %v", dt.Kind())
+ }
+
+ if !st.Key().AssignableTo(dt.Key()) && !st.Key().ConvertibleTo(dt.Key()) {
+ return fmt.Errorf("cannot copy map with non-assignable keys: %v %v", st.Key(), dt.Key())
+ }
+
+ for _, key := range sv.MapKeys() {
+ value := reflect.New(dt.Elem()).Elem()
+ if err := toUnstructured(sv.MapIndex(key), value); err != nil {
+ return err
+ }
+ if st.Key().AssignableTo(dt.Key()) {
+ dv.SetMapIndex(key, value)
+ } else {
+ dv.SetMapIndex(key.Convert(dt.Key()), value)
+ }
+ }
+ return nil
+}
+
+func sliceToUnstructured(sv, dv reflect.Value) error {
+ st, dt := sv.Type(), dv.Type()
+ if sv.IsNil() {
+ dv.Set(reflect.Zero(dt))
+ return nil
+ }
+ if st.Elem().Kind() == reflect.Uint8 {
+ dv.Set(reflect.New(stringType))
+ data, err := json.Marshal(sv.Bytes())
+ if err != nil {
+ return err
+ }
+ var result string
+ if err = json.Unmarshal(data, &result); err != nil {
+ return err
+ }
+ dv.Set(reflect.ValueOf(result))
+ return nil
+ }
+ if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 {
+ switch st.Elem().Kind() {
+ // TODO It should be possible to reuse the slice for primitive types.
+ // However, it is panicing in the following form.
+ // case reflect.String, reflect.Bool,
+ // reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
+ // reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
+ // sv.Set(sv)
+ // return nil
+ default:
+ // We need to do a proper conversion.
+ dv.Set(reflect.MakeSlice(reflect.SliceOf(dt), sv.Len(), sv.Cap()))
+ dv = dv.Elem()
+ dt = dv.Type()
+ }
+ }
+ if dt.Kind() != reflect.Slice {
+ return fmt.Errorf("cannot convert slice to: %v", dt.Kind())
+ }
+ for i := 0; i < sv.Len(); i++ {
+ if err := toUnstructured(sv.Index(i), dv.Index(i)); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func pointerToUnstructured(sv, dv reflect.Value) error {
+ if sv.IsNil() {
+ // We're done - we don't need to store anything.
+ return nil
+ }
+ return toUnstructured(sv.Elem(), dv)
+}
+
+func isZero(v reflect.Value) bool {
+ switch v.Kind() {
+ case reflect.Array, reflect.String:
+ return v.Len() == 0
+ case reflect.Bool:
+ return !v.Bool()
+ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+ return v.Int() == 0
+ case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
+ return v.Uint() == 0
+ case reflect.Float32, reflect.Float64:
+ return v.Float() == 0
+ case reflect.Map, reflect.Slice:
+ // TODO: It seems that 0-len maps are ignored in it.
+ return v.IsNil() || v.Len() == 0
+ case reflect.Ptr, reflect.Interface:
+ return v.IsNil()
+ }
+ return false
+}
+
+func structToUnstructured(sv, dv reflect.Value) error {
+ st, dt := sv.Type(), dv.Type()
+ if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 {
+ dv.Set(reflect.MakeMap(mapStringInterfaceType))
+ dv = dv.Elem()
+ dt = dv.Type()
+ }
+ if dt.Kind() != reflect.Map {
+ return fmt.Errorf("cannot convert struct to: %v", dt.Kind())
+ }
+ realMap := dv.Interface().(map[string]interface{})
+
+ for i := 0; i < st.NumField(); i++ {
+ fieldInfo := fieldInfoFromField(st, i)
+ fv := sv.Field(i)
+
+ if fieldInfo.name == "-" {
+ // This field should be skipped.
+ continue
+ }
+ if fieldInfo.omitempty && isZero(fv) {
+ // omitempty fields should be ignored.
+ continue
+ }
+ if len(fieldInfo.name) == 0 {
+ // This field is inlined.
+ if err := toUnstructured(fv, dv); err != nil {
+ return err
+ }
+ continue
+ }
+ switch fv.Type().Kind() {
+ case reflect.String:
+ realMap[fieldInfo.name] = fv.String()
+ case reflect.Bool:
+ realMap[fieldInfo.name] = fv.Bool()
+ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+ realMap[fieldInfo.name] = fv.Int()
+ case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
+ realMap[fieldInfo.name] = fv.Uint()
+ case reflect.Float32, reflect.Float64:
+ realMap[fieldInfo.name] = fv.Float()
+ default:
+ subv := reflect.New(dt.Elem()).Elem()
+ if err := toUnstructured(fv, subv); err != nil {
+ return err
+ }
+ dv.SetMapIndex(fieldInfo.nameValue, subv)
+ }
+ }
+ return nil
+}
+
+func interfaceToUnstructured(sv, dv reflect.Value) error {
+ if !sv.IsValid() || sv.IsNil() {
+ dv.Set(reflect.Zero(dv.Type()))
+ return nil
+ }
+ return toUnstructured(sv.Elem(), dv)
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/unstructured/doc.go b/vendor/k8s.io/apimachinery/pkg/conversion/unstructured/doc.go
new file mode 100644
index 000000000..cd40e74be
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/conversion/unstructured/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package unstructured provides conversion from runtime objects
+// to map[string]interface{} representation.
+package unstructured // import "k8s.io/apimachinery/pkg/conversion/unstructured"
diff --git a/vendor/k8s.io/apimachinery/pkg/fields/doc.go b/vendor/k8s.io/apimachinery/pkg/fields/doc.go
new file mode 100644
index 000000000..c39b8039a
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/fields/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package fields implements a simple field system, parsing and matching
+// selectors with sets of fields.
+package fields // import "k8s.io/apimachinery/pkg/fields"
diff --git a/vendor/k8s.io/apimachinery/pkg/fields/fields.go b/vendor/k8s.io/apimachinery/pkg/fields/fields.go
new file mode 100644
index 000000000..623b27e95
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/fields/fields.go
@@ -0,0 +1,62 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package fields
+
+import (
+ "sort"
+ "strings"
+)
+
+// Fields allows you to present fields independently from their storage.
+type Fields interface {
+ // Has returns whether the provided field exists.
+ Has(field string) (exists bool)
+
+ // Get returns the value for the provided field.
+ Get(field string) (value string)
+}
+
+// Set is a map of field:value. It implements Fields.
+type Set map[string]string
+
+// String returns all fields listed as a human readable string.
+// Conveniently, exactly the format that ParseSelector takes.
+func (ls Set) String() string {
+ selector := make([]string, 0, len(ls))
+ for key, value := range ls {
+ selector = append(selector, key+"="+value)
+ }
+ // Sort for determinism.
+ sort.StringSlice(selector).Sort()
+ return strings.Join(selector, ",")
+}
+
+// Has returns whether the provided field exists in the map.
+func (ls Set) Has(field string) bool {
+ _, exists := ls[field]
+ return exists
+}
+
+// Get returns the value in the map for the provided field.
+func (ls Set) Get(field string) string {
+ return ls[field]
+}
+
+// AsSelector converts fields into a selectors.
+func (ls Set) AsSelector() Selector {
+ return SelectorFromSet(ls)
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/fields/requirements.go b/vendor/k8s.io/apimachinery/pkg/fields/requirements.go
new file mode 100644
index 000000000..70d94ded8
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/fields/requirements.go
@@ -0,0 +1,30 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package fields
+
+import "k8s.io/apimachinery/pkg/selection"
+
+// Requirements is AND of all requirements.
+type Requirements []Requirement
+
+// Requirement contains a field, a value, and an operator that relates the field and value.
+// This is currently for reading internal selection information of field selector.
+type Requirement struct {
+ Operator selection.Operator
+ Field string
+ Value string
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/fields/selector.go b/vendor/k8s.io/apimachinery/pkg/fields/selector.go
new file mode 100644
index 000000000..1305dde08
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/fields/selector.go
@@ -0,0 +1,423 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package fields
+
+import (
+ "bytes"
+ "fmt"
+ "sort"
+ "strings"
+
+ "k8s.io/apimachinery/pkg/selection"
+)
+
+// Selector represents a field selector.
+type Selector interface {
+ // Matches returns true if this selector matches the given set of fields.
+ Matches(Fields) bool
+
+ // Empty returns true if this selector does not restrict the selection space.
+ Empty() bool
+
+ // RequiresExactMatch allows a caller to introspect whether a given selector
+ // requires a single specific field to be set, and if so returns the value it
+ // requires.
+ RequiresExactMatch(field string) (value string, found bool)
+
+ // Transform returns a new copy of the selector after TransformFunc has been
+ // applied to the entire selector, or an error if fn returns an error.
+ // If for a given requirement both field and value are transformed to empty
+ // string, the requirement is skipped.
+ Transform(fn TransformFunc) (Selector, error)
+
+ // Requirements converts this interface to Requirements to expose
+ // more detailed selection information.
+ Requirements() Requirements
+
+ // String returns a human readable string that represents this selector.
+ String() string
+}
+
+// Everything returns a selector that matches all fields.
+func Everything() Selector {
+ return andTerm{}
+}
+
+type hasTerm struct {
+ field, value string
+}
+
+func (t *hasTerm) Matches(ls Fields) bool {
+ return ls.Get(t.field) == t.value
+}
+
+func (t *hasTerm) Empty() bool {
+ return false
+}
+
+func (t *hasTerm) RequiresExactMatch(field string) (value string, found bool) {
+ if t.field == field {
+ return t.value, true
+ }
+ return "", false
+}
+
+func (t *hasTerm) Transform(fn TransformFunc) (Selector, error) {
+ field, value, err := fn(t.field, t.value)
+ if err != nil {
+ return nil, err
+ }
+ if len(field) == 0 && len(value) == 0 {
+ return Everything(), nil
+ }
+ return &hasTerm{field, value}, nil
+}
+
+func (t *hasTerm) Requirements() Requirements {
+ return []Requirement{{
+ Field: t.field,
+ Operator: selection.Equals,
+ Value: t.value,
+ }}
+}
+
+func (t *hasTerm) String() string {
+ return fmt.Sprintf("%v=%v", t.field, EscapeValue(t.value))
+}
+
+type notHasTerm struct {
+ field, value string
+}
+
+func (t *notHasTerm) Matches(ls Fields) bool {
+ return ls.Get(t.field) != t.value
+}
+
+func (t *notHasTerm) Empty() bool {
+ return false
+}
+
+func (t *notHasTerm) RequiresExactMatch(field string) (value string, found bool) {
+ return "", false
+}
+
+func (t *notHasTerm) Transform(fn TransformFunc) (Selector, error) {
+ field, value, err := fn(t.field, t.value)
+ if err != nil {
+ return nil, err
+ }
+ if len(field) == 0 && len(value) == 0 {
+ return Everything(), nil
+ }
+ return &notHasTerm{field, value}, nil
+}
+
+func (t *notHasTerm) Requirements() Requirements {
+ return []Requirement{{
+ Field: t.field,
+ Operator: selection.NotEquals,
+ Value: t.value,
+ }}
+}
+
+func (t *notHasTerm) String() string {
+ return fmt.Sprintf("%v!=%v", t.field, EscapeValue(t.value))
+}
+
+type andTerm []Selector
+
+func (t andTerm) Matches(ls Fields) bool {
+ for _, q := range t {
+ if !q.Matches(ls) {
+ return false
+ }
+ }
+ return true
+}
+
+func (t andTerm) Empty() bool {
+ if t == nil {
+ return true
+ }
+ if len([]Selector(t)) == 0 {
+ return true
+ }
+ for i := range t {
+ if !t[i].Empty() {
+ return false
+ }
+ }
+ return true
+}
+
+func (t andTerm) RequiresExactMatch(field string) (string, bool) {
+ if t == nil || len([]Selector(t)) == 0 {
+ return "", false
+ }
+ for i := range t {
+ if value, found := t[i].RequiresExactMatch(field); found {
+ return value, found
+ }
+ }
+ return "", false
+}
+
+func (t andTerm) Transform(fn TransformFunc) (Selector, error) {
+ next := make([]Selector, 0, len([]Selector(t)))
+ for _, s := range []Selector(t) {
+ n, err := s.Transform(fn)
+ if err != nil {
+ return nil, err
+ }
+ if !n.Empty() {
+ next = append(next, n)
+ }
+ }
+ return andTerm(next), nil
+}
+
+func (t andTerm) Requirements() Requirements {
+ reqs := make([]Requirement, 0, len(t))
+ for _, s := range []Selector(t) {
+ rs := s.Requirements()
+ reqs = append(reqs, rs...)
+ }
+ return reqs
+}
+
+func (t andTerm) String() string {
+ var terms []string
+ for _, q := range t {
+ terms = append(terms, q.String())
+ }
+ return strings.Join(terms, ",")
+}
+
+// SelectorFromSet returns a Selector which will match exactly the given Set. A
+// nil Set is considered equivalent to Everything().
+func SelectorFromSet(ls Set) Selector {
+ if ls == nil {
+ return Everything()
+ }
+ items := make([]Selector, 0, len(ls))
+ for field, value := range ls {
+ items = append(items, &hasTerm{field: field, value: value})
+ }
+ if len(items) == 1 {
+ return items[0]
+ }
+ return andTerm(items)
+}
+
+// valueEscaper prefixes \,= characters with a backslash
+var valueEscaper = strings.NewReplacer(
+ // escape \ characters
+ `\`, `\\`,
+ // then escape , and = characters to allow unambiguous parsing of the value in a fieldSelector
+ `,`, `\,`,
+ `=`, `\=`,
+)
+
+// EscapeValue escapes an arbitrary literal string for use as a fieldSelector value
+func EscapeValue(s string) string {
+ return valueEscaper.Replace(s)
+}
+
+// InvalidEscapeSequence indicates an error occurred unescaping a field selector
+type InvalidEscapeSequence struct {
+ sequence string
+}
+
+func (i InvalidEscapeSequence) Error() string {
+ return fmt.Sprintf("invalid field selector: invalid escape sequence: %s", i.sequence)
+}
+
+// UnescapedRune indicates an error occurred unescaping a field selector
+type UnescapedRune struct {
+ r rune
+}
+
+func (i UnescapedRune) Error() string {
+ return fmt.Sprintf("invalid field selector: unescaped character in value: %v", i.r)
+}
+
+// UnescapeValue unescapes a fieldSelector value and returns the original literal value.
+// May return the original string if it contains no escaped or special characters.
+func UnescapeValue(s string) (string, error) {
+ // if there's no escaping or special characters, just return to avoid allocation
+ if !strings.ContainsAny(s, `\,=`) {
+ return s, nil
+ }
+
+ v := bytes.NewBuffer(make([]byte, 0, len(s)))
+ inSlash := false
+ for _, c := range s {
+ if inSlash {
+ switch c {
+ case '\\', ',', '=':
+ // omit the \ for recognized escape sequences
+ v.WriteRune(c)
+ default:
+ // error on unrecognized escape sequences
+ return "", InvalidEscapeSequence{sequence: string([]rune{'\\', c})}
+ }
+ inSlash = false
+ continue
+ }
+
+ switch c {
+ case '\\':
+ inSlash = true
+ case ',', '=':
+ // unescaped , and = characters are not allowed in field selector values
+ return "", UnescapedRune{r: c}
+ default:
+ v.WriteRune(c)
+ }
+ }
+
+ // Ending with a single backslash is an invalid sequence
+ if inSlash {
+ return "", InvalidEscapeSequence{sequence: "\\"}
+ }
+
+ return v.String(), nil
+}
+
+// ParseSelectorOrDie takes a string representing a selector and returns an
+// object suitable for matching, or panic when an error occur.
+func ParseSelectorOrDie(s string) Selector {
+ selector, err := ParseSelector(s)
+ if err != nil {
+ panic(err)
+ }
+ return selector
+}
+
+// ParseSelector takes a string representing a selector and returns an
+// object suitable for matching, or an error.
+func ParseSelector(selector string) (Selector, error) {
+ return parseSelector(selector,
+ func(lhs, rhs string) (newLhs, newRhs string, err error) {
+ return lhs, rhs, nil
+ })
+}
+
+// ParseAndTransformSelector parses the selector and runs them through the given TransformFunc.
+func ParseAndTransformSelector(selector string, fn TransformFunc) (Selector, error) {
+ return parseSelector(selector, fn)
+}
+
+// TransformFunc transforms selectors.
+type TransformFunc func(field, value string) (newField, newValue string, err error)
+
+// splitTerms returns the comma-separated terms contained in the given fieldSelector.
+// Backslash-escaped commas are treated as data instead of delimiters, and are included in the returned terms, with the leading backslash preserved.
+func splitTerms(fieldSelector string) []string {
+ if len(fieldSelector) == 0 {
+ return nil
+ }
+
+ terms := make([]string, 0, 1)
+ startIndex := 0
+ inSlash := false
+ for i, c := range fieldSelector {
+ switch {
+ case inSlash:
+ inSlash = false
+ case c == '\\':
+ inSlash = true
+ case c == ',':
+ terms = append(terms, fieldSelector[startIndex:i])
+ startIndex = i + 1
+ }
+ }
+
+ terms = append(terms, fieldSelector[startIndex:])
+
+ return terms
+}
+
+const (
+ notEqualOperator = "!="
+ doubleEqualOperator = "=="
+ equalOperator = "="
+)
+
+// termOperators holds the recognized operators supported in fieldSelectors.
+// doubleEqualOperator and equal are equivalent, but doubleEqualOperator is checked first
+// to avoid leaving a leading = character on the rhs value.
+var termOperators = []string{notEqualOperator, doubleEqualOperator, equalOperator}
+
+// splitTerm returns the lhs, operator, and rhs parsed from the given term, along with an indicator of whether the parse was successful.
+// no escaping of special characters is supported in the lhs value, so the first occurance of a recognized operator is used as the split point.
+// the literal rhs is returned, and the caller is responsible for applying any desired unescaping.
+func splitTerm(term string) (lhs, op, rhs string, ok bool) {
+ for i := range term {
+ remaining := term[i:]
+ for _, op := range termOperators {
+ if strings.HasPrefix(remaining, op) {
+ return term[0:i], op, term[i+len(op):], true
+ }
+ }
+ }
+ return "", "", "", false
+}
+
+func parseSelector(selector string, fn TransformFunc) (Selector, error) {
+ parts := splitTerms(selector)
+ sort.StringSlice(parts).Sort()
+ var items []Selector
+ for _, part := range parts {
+ if part == "" {
+ continue
+ }
+ lhs, op, rhs, ok := splitTerm(part)
+ if !ok {
+ return nil, fmt.Errorf("invalid selector: '%s'; can't understand '%s'", selector, part)
+ }
+ unescapedRHS, err := UnescapeValue(rhs)
+ if err != nil {
+ return nil, err
+ }
+ switch op {
+ case notEqualOperator:
+ items = append(items, &notHasTerm{field: lhs, value: unescapedRHS})
+ case doubleEqualOperator:
+ items = append(items, &hasTerm{field: lhs, value: unescapedRHS})
+ case equalOperator:
+ items = append(items, &hasTerm{field: lhs, value: unescapedRHS})
+ default:
+ return nil, fmt.Errorf("invalid selector: '%s'; can't understand '%s'", selector, part)
+ }
+ }
+ if len(items) == 1 {
+ return items[0].Transform(fn)
+ }
+ return andTerm(items).Transform(fn)
+}
+
+// OneTermEqualSelector returns an object that matches objects where one field/field equals one value.
+// Cannot return an error.
+func OneTermEqualSelector(k, v string) Selector {
+ return &hasTerm{field: k, value: v}
+}
+
+// AndSelectors creates a selector that is the logical AND of all the given selectors
+func AndSelectors(selectors ...Selector) Selector {
+ return andTerm(selectors)
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/labels/doc.go b/vendor/k8s.io/apimachinery/pkg/labels/doc.go
new file mode 100644
index 000000000..82de0051b
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/labels/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package labels implements a simple label system, parsing and matching
+// selectors with sets of labels.
+package labels // import "k8s.io/apimachinery/pkg/labels"
diff --git a/vendor/k8s.io/apimachinery/pkg/labels/labels.go b/vendor/k8s.io/apimachinery/pkg/labels/labels.go
new file mode 100644
index 000000000..32db4d96f
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/labels/labels.go
@@ -0,0 +1,181 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package labels
+
+import (
+ "fmt"
+ "sort"
+ "strings"
+)
+
+// Labels allows you to present labels independently from their storage.
+type Labels interface {
+ // Has returns whether the provided label exists.
+ Has(label string) (exists bool)
+
+ // Get returns the value for the provided label.
+ Get(label string) (value string)
+}
+
+// Set is a map of label:value. It implements Labels.
+type Set map[string]string
+
+// String returns all labels listed as a human readable string.
+// Conveniently, exactly the format that ParseSelector takes.
+func (ls Set) String() string {
+ selector := make([]string, 0, len(ls))
+ for key, value := range ls {
+ selector = append(selector, key+"="+value)
+ }
+ // Sort for determinism.
+ sort.StringSlice(selector).Sort()
+ return strings.Join(selector, ",")
+}
+
+// Has returns whether the provided label exists in the map.
+func (ls Set) Has(label string) bool {
+ _, exists := ls[label]
+ return exists
+}
+
+// Get returns the value in the map for the provided label.
+func (ls Set) Get(label string) string {
+ return ls[label]
+}
+
+// AsSelector converts labels into a selectors.
+func (ls Set) AsSelector() Selector {
+ return SelectorFromSet(ls)
+}
+
+// AsSelectorPreValidated converts labels into a selector, but
+// assumes that labels are already validated and thus don't
+// preform any validation.
+// According to our measurements this is significantly faster
+// in codepaths that matter at high scale.
+func (ls Set) AsSelectorPreValidated() Selector {
+ return SelectorFromValidatedSet(ls)
+}
+
+// FormatLabels convert label map into plain string
+func FormatLabels(labelMap map[string]string) string {
+ l := Set(labelMap).String()
+ if l == "" {
+ l = "<none>"
+ }
+ return l
+}
+
+// Conflicts takes 2 maps and returns true if there a key match between
+// the maps but the value doesn't match, and returns false in other cases
+func Conflicts(labels1, labels2 Set) bool {
+ small := labels1
+ big := labels2
+ if len(labels2) < len(labels1) {
+ small = labels2
+ big = labels1
+ }
+
+ for k, v := range small {
+ if val, match := big[k]; match {
+ if val != v {
+ return true
+ }
+ }
+ }
+
+ return false
+}
+
+// Merge combines given maps, and does not check for any conflicts
+// between the maps. In case of conflicts, second map (labels2) wins
+func Merge(labels1, labels2 Set) Set {
+ mergedMap := Set{}
+
+ for k, v := range labels1 {
+ mergedMap[k] = v
+ }
+ for k, v := range labels2 {
+ mergedMap[k] = v
+ }
+ return mergedMap
+}
+
+// Equals returns true if the given maps are equal
+func Equals(labels1, labels2 Set) bool {
+ if len(labels1) != len(labels2) {
+ return false
+ }
+
+ for k, v := range labels1 {
+ value, ok := labels2[k]
+ if !ok {
+ return false
+ }
+ if value != v {
+ return false
+ }
+ }
+ return true
+}
+
+// AreLabelsInWhiteList verifies if the provided label list
+// is in the provided whitelist and returns true, otherwise false.
+func AreLabelsInWhiteList(labels, whitelist Set) bool {
+ if len(whitelist) == 0 {
+ return true
+ }
+
+ for k, v := range labels {
+ value, ok := whitelist[k]
+ if !ok {
+ return false
+ }
+ if value != v {
+ return false
+ }
+ }
+ return true
+}
+
+// ConvertSelectorToLabelsMap converts selector string to labels map
+// and validates keys and values
+func ConvertSelectorToLabelsMap(selector string) (Set, error) {
+ labelsMap := Set{}
+
+ if len(selector) == 0 {
+ return labelsMap, nil
+ }
+
+ labels := strings.Split(selector, ",")
+ for _, label := range labels {
+ l := strings.Split(label, "=")
+ if len(l) != 2 {
+ return labelsMap, fmt.Errorf("invalid selector: %s", l)
+ }
+ key := strings.TrimSpace(l[0])
+ if err := validateLabelKey(key); err != nil {
+ return labelsMap, err
+ }
+ value := strings.TrimSpace(l[1])
+ if err := validateLabelValue(value); err != nil {
+ return labelsMap, err
+ }
+ labelsMap[key] = value
+ }
+ return labelsMap, nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/labels/selector.go b/vendor/k8s.io/apimachinery/pkg/labels/selector.go
new file mode 100644
index 000000000..50b41f99d
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/labels/selector.go
@@ -0,0 +1,859 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package labels
+
+import (
+ "bytes"
+ "fmt"
+ "sort"
+ "strconv"
+ "strings"
+
+ "github.com/golang/glog"
+ "k8s.io/apimachinery/pkg/selection"
+ "k8s.io/apimachinery/pkg/util/sets"
+ "k8s.io/apimachinery/pkg/util/validation"
+)
+
+// Requirements is AND of all requirements.
+type Requirements []Requirement
+
+// Selector represents a label selector.
+type Selector interface {
+ // Matches returns true if this selector matches the given set of labels.
+ Matches(Labels) bool
+
+ // Empty returns true if this selector does not restrict the selection space.
+ Empty() bool
+
+ // String returns a human readable string that represents this selector.
+ String() string
+
+ // Add adds requirements to the Selector
+ Add(r ...Requirement) Selector
+
+ // Requirements converts this interface into Requirements to expose
+ // more detailed selection information.
+ // If there are querying parameters, it will return converted requirements and selectable=true.
+ // If this selector doesn't want to select anything, it will return selectable=false.
+ Requirements() (requirements Requirements, selectable bool)
+}
+
+// Everything returns a selector that matches all labels.
+func Everything() Selector {
+ return internalSelector{}
+}
+
+type nothingSelector struct{}
+
+func (n nothingSelector) Matches(_ Labels) bool { return false }
+func (n nothingSelector) Empty() bool { return false }
+func (n nothingSelector) String() string { return "" }
+func (n nothingSelector) Add(_ ...Requirement) Selector { return n }
+func (n nothingSelector) Requirements() (Requirements, bool) { return nil, false }
+
+// Nothing returns a selector that matches no labels
+func Nothing() Selector {
+ return nothingSelector{}
+}
+
+// NewSelector returns a nil selector
+func NewSelector() Selector {
+ return internalSelector(nil)
+}
+
+type internalSelector []Requirement
+
+// ByKey sorts requirements by key to obtain deterministic parser
+type ByKey []Requirement
+
+func (a ByKey) Len() int { return len(a) }
+
+func (a ByKey) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
+
+func (a ByKey) Less(i, j int) bool { return a[i].key < a[j].key }
+
+// Requirement contains values, a key, and an operator that relates the key and values.
+// The zero value of Requirement is invalid.
+// Requirement implements both set based match and exact match
+// Requirement should be initialized via NewRequirement constructor for creating a valid Requirement.
+type Requirement struct {
+ key string
+ operator selection.Operator
+ // In huge majority of cases we have at most one value here.
+ // It is generally faster to operate on a single-element slice
+ // than on a single-element map, so we have a slice here.
+ strValues []string
+}
+
+// NewRequirement is the constructor for a Requirement.
+// If any of these rules is violated, an error is returned:
+// (1) The operator can only be In, NotIn, Equals, DoubleEquals, NotEquals, Exists, or DoesNotExist.
+// (2) If the operator is In or NotIn, the values set must be non-empty.
+// (3) If the operator is Equals, DoubleEquals, or NotEquals, the values set must contain one value.
+// (4) If the operator is Exists or DoesNotExist, the value set must be empty.
+// (5) If the operator is Gt or Lt, the values set must contain only one value, which will be interpreted as an integer.
+// (6) The key is invalid due to its length, or sequence
+// of characters. See validateLabelKey for more details.
+//
+// The empty string is a valid value in the input values set.
+func NewRequirement(key string, op selection.Operator, vals []string) (*Requirement, error) {
+ if err := validateLabelKey(key); err != nil {
+ return nil, err
+ }
+ switch op {
+ case selection.In, selection.NotIn:
+ if len(vals) == 0 {
+ return nil, fmt.Errorf("for 'in', 'notin' operators, values set can't be empty")
+ }
+ case selection.Equals, selection.DoubleEquals, selection.NotEquals:
+ if len(vals) != 1 {
+ return nil, fmt.Errorf("exact-match compatibility requires one single value")
+ }
+ case selection.Exists, selection.DoesNotExist:
+ if len(vals) != 0 {
+ return nil, fmt.Errorf("values set must be empty for exists and does not exist")
+ }
+ case selection.GreaterThan, selection.LessThan:
+ if len(vals) != 1 {
+ return nil, fmt.Errorf("for 'Gt', 'Lt' operators, exactly one value is required")
+ }
+ for i := range vals {
+ if _, err := strconv.ParseInt(vals[i], 10, 64); err != nil {
+ return nil, fmt.Errorf("for 'Gt', 'Lt' operators, the value must be an integer")
+ }
+ }
+ default:
+ return nil, fmt.Errorf("operator '%v' is not recognized", op)
+ }
+
+ for i := range vals {
+ if err := validateLabelValue(vals[i]); err != nil {
+ return nil, err
+ }
+ }
+ sort.Strings(vals)
+ return &Requirement{key: key, operator: op, strValues: vals}, nil
+}
+
+func (r *Requirement) hasValue(value string) bool {
+ for i := range r.strValues {
+ if r.strValues[i] == value {
+ return true
+ }
+ }
+ return false
+}
+
+// Matches returns true if the Requirement matches the input Labels.
+// There is a match in the following cases:
+// (1) The operator is Exists and Labels has the Requirement's key.
+// (2) The operator is In, Labels has the Requirement's key and Labels'
+// value for that key is in Requirement's value set.
+// (3) The operator is NotIn, Labels has the Requirement's key and
+// Labels' value for that key is not in Requirement's value set.
+// (4) The operator is DoesNotExist or NotIn and Labels does not have the
+// Requirement's key.
+// (5) The operator is GreaterThanOperator or LessThanOperator, and Labels has
+// the Requirement's key and the corresponding value satisfies mathematical inequality.
+func (r *Requirement) Matches(ls Labels) bool {
+ switch r.operator {
+ case selection.In, selection.Equals, selection.DoubleEquals:
+ if !ls.Has(r.key) {
+ return false
+ }
+ return r.hasValue(ls.Get(r.key))
+ case selection.NotIn, selection.NotEquals:
+ if !ls.Has(r.key) {
+ return true
+ }
+ return !r.hasValue(ls.Get(r.key))
+ case selection.Exists:
+ return ls.Has(r.key)
+ case selection.DoesNotExist:
+ return !ls.Has(r.key)
+ case selection.GreaterThan, selection.LessThan:
+ if !ls.Has(r.key) {
+ return false
+ }
+ lsValue, err := strconv.ParseInt(ls.Get(r.key), 10, 64)
+ if err != nil {
+ glog.V(10).Infof("ParseInt failed for value %+v in label %+v, %+v", ls.Get(r.key), ls, err)
+ return false
+ }
+
+ // There should be only one strValue in r.strValues, and can be converted to a integer.
+ if len(r.strValues) != 1 {
+ glog.V(10).Infof("Invalid values count %+v of requirement %#v, for 'Gt', 'Lt' operators, exactly one value is required", len(r.strValues), r)
+ return false
+ }
+
+ var rValue int64
+ for i := range r.strValues {
+ rValue, err = strconv.ParseInt(r.strValues[i], 10, 64)
+ if err != nil {
+ glog.V(10).Infof("ParseInt failed for value %+v in requirement %#v, for 'Gt', 'Lt' operators, the value must be an integer", r.strValues[i], r)
+ return false
+ }
+ }
+ return (r.operator == selection.GreaterThan && lsValue > rValue) || (r.operator == selection.LessThan && lsValue < rValue)
+ default:
+ return false
+ }
+}
+
+// Key returns requirement key
+func (r *Requirement) Key() string {
+ return r.key
+}
+
+// Operator returns requirement operator
+func (r *Requirement) Operator() selection.Operator {
+ return r.operator
+}
+
+// Values returns requirement values
+func (r *Requirement) Values() sets.String {
+ ret := sets.String{}
+ for i := range r.strValues {
+ ret.Insert(r.strValues[i])
+ }
+ return ret
+}
+
+// Empty returns true if the internalSelector doesn't restrict selection space
+func (lsel internalSelector) Empty() bool {
+ if lsel == nil {
+ return true
+ }
+ return len(lsel) == 0
+}
+
+// String returns a human-readable string that represents this
+// Requirement. If called on an invalid Requirement, an error is
+// returned. See NewRequirement for creating a valid Requirement.
+func (r *Requirement) String() string {
+ var buffer bytes.Buffer
+ if r.operator == selection.DoesNotExist {
+ buffer.WriteString("!")
+ }
+ buffer.WriteString(r.key)
+
+ switch r.operator {
+ case selection.Equals:
+ buffer.WriteString("=")
+ case selection.DoubleEquals:
+ buffer.WriteString("==")
+ case selection.NotEquals:
+ buffer.WriteString("!=")
+ case selection.In:
+ buffer.WriteString(" in ")
+ case selection.NotIn:
+ buffer.WriteString(" notin ")
+ case selection.GreaterThan:
+ buffer.WriteString(">")
+ case selection.LessThan:
+ buffer.WriteString("<")
+ case selection.Exists, selection.DoesNotExist:
+ return buffer.String()
+ }
+
+ switch r.operator {
+ case selection.In, selection.NotIn:
+ buffer.WriteString("(")
+ }
+ if len(r.strValues) == 1 {
+ buffer.WriteString(r.strValues[0])
+ } else { // only > 1 since == 0 prohibited by NewRequirement
+ buffer.WriteString(strings.Join(r.strValues, ","))
+ }
+
+ switch r.operator {
+ case selection.In, selection.NotIn:
+ buffer.WriteString(")")
+ }
+ return buffer.String()
+}
+
+// Add adds requirements to the selector. It copies the current selector returning a new one
+func (lsel internalSelector) Add(reqs ...Requirement) Selector {
+ var sel internalSelector
+ for ix := range lsel {
+ sel = append(sel, lsel[ix])
+ }
+ for _, r := range reqs {
+ sel = append(sel, r)
+ }
+ sort.Sort(ByKey(sel))
+ return sel
+}
+
+// Matches for a internalSelector returns true if all
+// its Requirements match the input Labels. If any
+// Requirement does not match, false is returned.
+func (lsel internalSelector) Matches(l Labels) bool {
+ for ix := range lsel {
+ if matches := lsel[ix].Matches(l); !matches {
+ return false
+ }
+ }
+ return true
+}
+
+func (lsel internalSelector) Requirements() (Requirements, bool) { return Requirements(lsel), true }
+
+// String returns a comma-separated string of all
+// the internalSelector Requirements' human-readable strings.
+func (lsel internalSelector) String() string {
+ var reqs []string
+ for ix := range lsel {
+ reqs = append(reqs, lsel[ix].String())
+ }
+ return strings.Join(reqs, ",")
+}
+
+// Token represents constant definition for lexer token
+type Token int
+
+const (
+ // ErrorToken represents scan error
+ ErrorToken Token = iota
+ // EndOfStringToken represents end of string
+ EndOfStringToken
+ // ClosedParToken represents close parenthesis
+ ClosedParToken
+ // CommaToken represents the comma
+ CommaToken
+ // DoesNotExistToken represents logic not
+ DoesNotExistToken
+ // DoubleEqualsToken represents double equals
+ DoubleEqualsToken
+ // EqualsToken represents equal
+ EqualsToken
+ // GreaterThanToken represents greater than
+ GreaterThanToken
+ // IdentifierToken represents identifier, e.g. keys and values
+ IdentifierToken
+ // InToken represents in
+ InToken
+ // LessThanToken represents less than
+ LessThanToken
+ // NotEqualsToken represents not equal
+ NotEqualsToken
+ // NotInToken represents not in
+ NotInToken
+ // OpenParToken represents open parenthesis
+ OpenParToken
+)
+
+// string2token contains the mapping between lexer Token and token literal
+// (except IdentifierToken, EndOfStringToken and ErrorToken since it makes no sense)
+var string2token = map[string]Token{
+ ")": ClosedParToken,
+ ",": CommaToken,
+ "!": DoesNotExistToken,
+ "==": DoubleEqualsToken,
+ "=": EqualsToken,
+ ">": GreaterThanToken,
+ "in": InToken,
+ "<": LessThanToken,
+ "!=": NotEqualsToken,
+ "notin": NotInToken,
+ "(": OpenParToken,
+}
+
+// ScannedItem contains the Token and the literal produced by the lexer.
+type ScannedItem struct {
+ tok Token
+ literal string
+}
+
+// isWhitespace returns true if the rune is a space, tab, or newline.
+func isWhitespace(ch byte) bool {
+ return ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n'
+}
+
+// isSpecialSymbol detect if the character ch can be an operator
+func isSpecialSymbol(ch byte) bool {
+ switch ch {
+ case '=', '!', '(', ')', ',', '>', '<':
+ return true
+ }
+ return false
+}
+
+// Lexer represents the Lexer struct for label selector.
+// It contains necessary informationt to tokenize the input string
+type Lexer struct {
+ // s stores the string to be tokenized
+ s string
+ // pos is the position currently tokenized
+ pos int
+}
+
+// read return the character currently lexed
+// increment the position and check the buffer overflow
+func (l *Lexer) read() (b byte) {
+ b = 0
+ if l.pos < len(l.s) {
+ b = l.s[l.pos]
+ l.pos++
+ }
+ return b
+}
+
+// unread 'undoes' the last read character
+func (l *Lexer) unread() {
+ l.pos--
+}
+
+// scanIDOrKeyword scans string to recognize literal token (for example 'in') or an identifier.
+func (l *Lexer) scanIDOrKeyword() (tok Token, lit string) {
+ var buffer []byte
+IdentifierLoop:
+ for {
+ switch ch := l.read(); {
+ case ch == 0:
+ break IdentifierLoop
+ case isSpecialSymbol(ch) || isWhitespace(ch):
+ l.unread()
+ break IdentifierLoop
+ default:
+ buffer = append(buffer, ch)
+ }
+ }
+ s := string(buffer)
+ if val, ok := string2token[s]; ok { // is a literal token?
+ return val, s
+ }
+ return IdentifierToken, s // otherwise is an identifier
+}
+
+// scanSpecialSymbol scans string starting with special symbol.
+// special symbol identify non literal operators. "!=", "==", "="
+func (l *Lexer) scanSpecialSymbol() (Token, string) {
+ lastScannedItem := ScannedItem{}
+ var buffer []byte
+SpecialSymbolLoop:
+ for {
+ switch ch := l.read(); {
+ case ch == 0:
+ break SpecialSymbolLoop
+ case isSpecialSymbol(ch):
+ buffer = append(buffer, ch)
+ if token, ok := string2token[string(buffer)]; ok {
+ lastScannedItem = ScannedItem{tok: token, literal: string(buffer)}
+ } else if lastScannedItem.tok != 0 {
+ l.unread()
+ break SpecialSymbolLoop
+ }
+ default:
+ l.unread()
+ break SpecialSymbolLoop
+ }
+ }
+ if lastScannedItem.tok == 0 {
+ return ErrorToken, fmt.Sprintf("error expected: keyword found '%s'", buffer)
+ }
+ return lastScannedItem.tok, lastScannedItem.literal
+}
+
+// skipWhiteSpaces consumes all blank characters
+// returning the first non blank character
+func (l *Lexer) skipWhiteSpaces(ch byte) byte {
+ for {
+ if !isWhitespace(ch) {
+ return ch
+ }
+ ch = l.read()
+ }
+}
+
+// Lex returns a pair of Token and the literal
+// literal is meaningfull only for IdentifierToken token
+func (l *Lexer) Lex() (tok Token, lit string) {
+ switch ch := l.skipWhiteSpaces(l.read()); {
+ case ch == 0:
+ return EndOfStringToken, ""
+ case isSpecialSymbol(ch):
+ l.unread()
+ return l.scanSpecialSymbol()
+ default:
+ l.unread()
+ return l.scanIDOrKeyword()
+ }
+}
+
+// Parser data structure contains the label selector parser data structure
+type Parser struct {
+ l *Lexer
+ scannedItems []ScannedItem
+ position int
+}
+
+// ParserContext represents context during parsing:
+// some literal for example 'in' and 'notin' can be
+// recognized as operator for example 'x in (a)' but
+// it can be recognized as value for example 'value in (in)'
+type ParserContext int
+
+const (
+ // KeyAndOperator represents key and operator
+ KeyAndOperator ParserContext = iota
+ // Values represents values
+ Values
+)
+
+// lookahead func returns the current token and string. No increment of current position
+func (p *Parser) lookahead(context ParserContext) (Token, string) {
+ tok, lit := p.scannedItems[p.position].tok, p.scannedItems[p.position].literal
+ if context == Values {
+ switch tok {
+ case InToken, NotInToken:
+ tok = IdentifierToken
+ }
+ }
+ return tok, lit
+}
+
+// consume returns current token and string. Increments the the position
+func (p *Parser) consume(context ParserContext) (Token, string) {
+ p.position++
+ tok, lit := p.scannedItems[p.position-1].tok, p.scannedItems[p.position-1].literal
+ if context == Values {
+ switch tok {
+ case InToken, NotInToken:
+ tok = IdentifierToken
+ }
+ }
+ return tok, lit
+}
+
+// scan runs through the input string and stores the ScannedItem in an array
+// Parser can now lookahead and consume the tokens
+func (p *Parser) scan() {
+ for {
+ token, literal := p.l.Lex()
+ p.scannedItems = append(p.scannedItems, ScannedItem{token, literal})
+ if token == EndOfStringToken {
+ break
+ }
+ }
+}
+
+// parse runs the left recursive descending algorithm
+// on input string. It returns a list of Requirement objects.
+func (p *Parser) parse() (internalSelector, error) {
+ p.scan() // init scannedItems
+
+ var requirements internalSelector
+ for {
+ tok, lit := p.lookahead(Values)
+ switch tok {
+ case IdentifierToken, DoesNotExistToken:
+ r, err := p.parseRequirement()
+ if err != nil {
+ return nil, fmt.Errorf("unable to parse requirement: %v", err)
+ }
+ requirements = append(requirements, *r)
+ t, l := p.consume(Values)
+ switch t {
+ case EndOfStringToken:
+ return requirements, nil
+ case CommaToken:
+ t2, l2 := p.lookahead(Values)
+ if t2 != IdentifierToken && t2 != DoesNotExistToken {
+ return nil, fmt.Errorf("found '%s', expected: identifier after ','", l2)
+ }
+ default:
+ return nil, fmt.Errorf("found '%s', expected: ',' or 'end of string'", l)
+ }
+ case EndOfStringToken:
+ return requirements, nil
+ default:
+ return nil, fmt.Errorf("found '%s', expected: !, identifier, or 'end of string'", lit)
+ }
+ }
+}
+
+func (p *Parser) parseRequirement() (*Requirement, error) {
+ key, operator, err := p.parseKeyAndInferOperator()
+ if err != nil {
+ return nil, err
+ }
+ if operator == selection.Exists || operator == selection.DoesNotExist { // operator found lookahead set checked
+ return NewRequirement(key, operator, []string{})
+ }
+ operator, err = p.parseOperator()
+ if err != nil {
+ return nil, err
+ }
+ var values sets.String
+ switch operator {
+ case selection.In, selection.NotIn:
+ values, err = p.parseValues()
+ case selection.Equals, selection.DoubleEquals, selection.NotEquals, selection.GreaterThan, selection.LessThan:
+ values, err = p.parseExactValue()
+ }
+ if err != nil {
+ return nil, err
+ }
+ return NewRequirement(key, operator, values.List())
+
+}
+
+// parseKeyAndInferOperator parse literals.
+// in case of no operator '!, in, notin, ==, =, !=' are found
+// the 'exists' operator is inferred
+func (p *Parser) parseKeyAndInferOperator() (string, selection.Operator, error) {
+ var operator selection.Operator
+ tok, literal := p.consume(Values)
+ if tok == DoesNotExistToken {
+ operator = selection.DoesNotExist
+ tok, literal = p.consume(Values)
+ }
+ if tok != IdentifierToken {
+ err := fmt.Errorf("found '%s', expected: identifier", literal)
+ return "", "", err
+ }
+ if err := validateLabelKey(literal); err != nil {
+ return "", "", err
+ }
+ if t, _ := p.lookahead(Values); t == EndOfStringToken || t == CommaToken {
+ if operator != selection.DoesNotExist {
+ operator = selection.Exists
+ }
+ }
+ return literal, operator, nil
+}
+
+// parseOperator return operator and eventually matchType
+// matchType can be exact
+func (p *Parser) parseOperator() (op selection.Operator, err error) {
+ tok, lit := p.consume(KeyAndOperator)
+ switch tok {
+ // DoesNotExistToken shouldn't be here because it's a unary operator, not a binary operator
+ case InToken:
+ op = selection.In
+ case EqualsToken:
+ op = selection.Equals
+ case DoubleEqualsToken:
+ op = selection.DoubleEquals
+ case GreaterThanToken:
+ op = selection.GreaterThan
+ case LessThanToken:
+ op = selection.LessThan
+ case NotInToken:
+ op = selection.NotIn
+ case NotEqualsToken:
+ op = selection.NotEquals
+ default:
+ return "", fmt.Errorf("found '%s', expected: '=', '!=', '==', 'in', notin'", lit)
+ }
+ return op, nil
+}
+
+// parseValues parses the values for set based matching (x,y,z)
+func (p *Parser) parseValues() (sets.String, error) {
+ tok, lit := p.consume(Values)
+ if tok != OpenParToken {
+ return nil, fmt.Errorf("found '%s' expected: '('", lit)
+ }
+ tok, lit = p.lookahead(Values)
+ switch tok {
+ case IdentifierToken, CommaToken:
+ s, err := p.parseIdentifiersList() // handles general cases
+ if err != nil {
+ return s, err
+ }
+ if tok, _ = p.consume(Values); tok != ClosedParToken {
+ return nil, fmt.Errorf("found '%s', expected: ')'", lit)
+ }
+ return s, nil
+ case ClosedParToken: // handles "()"
+ p.consume(Values)
+ return sets.NewString(""), nil
+ default:
+ return nil, fmt.Errorf("found '%s', expected: ',', ')' or identifier", lit)
+ }
+}
+
+// parseIdentifiersList parses a (possibly empty) list of
+// of comma separated (possibly empty) identifiers
+func (p *Parser) parseIdentifiersList() (sets.String, error) {
+ s := sets.NewString()
+ for {
+ tok, lit := p.consume(Values)
+ switch tok {
+ case IdentifierToken:
+ s.Insert(lit)
+ tok2, lit2 := p.lookahead(Values)
+ switch tok2 {
+ case CommaToken:
+ continue
+ case ClosedParToken:
+ return s, nil
+ default:
+ return nil, fmt.Errorf("found '%s', expected: ',' or ')'", lit2)
+ }
+ case CommaToken: // handled here since we can have "(,"
+ if s.Len() == 0 {
+ s.Insert("") // to handle (,
+ }
+ tok2, _ := p.lookahead(Values)
+ if tok2 == ClosedParToken {
+ s.Insert("") // to handle ,) Double "" removed by StringSet
+ return s, nil
+ }
+ if tok2 == CommaToken {
+ p.consume(Values)
+ s.Insert("") // to handle ,, Double "" removed by StringSet
+ }
+ default: // it can be operator
+ return s, fmt.Errorf("found '%s', expected: ',', or identifier", lit)
+ }
+ }
+}
+
+// parseExactValue parses the only value for exact match style
+func (p *Parser) parseExactValue() (sets.String, error) {
+ s := sets.NewString()
+ tok, lit := p.lookahead(Values)
+ if tok == EndOfStringToken || tok == CommaToken {
+ s.Insert("")
+ return s, nil
+ }
+ tok, lit = p.consume(Values)
+ if tok == IdentifierToken {
+ s.Insert(lit)
+ return s, nil
+ }
+ return nil, fmt.Errorf("found '%s', expected: identifier", lit)
+}
+
+// Parse takes a string representing a selector and returns a selector
+// object, or an error. This parsing function differs from ParseSelector
+// as they parse different selectors with different syntaxes.
+// The input will cause an error if it does not follow this form:
+//
+// <selector-syntax> ::= <requirement> | <requirement> "," <selector-syntax>
+// <requirement> ::= [!] KEY [ <set-based-restriction> | <exact-match-restriction> ]
+// <set-based-restriction> ::= "" | <inclusion-exclusion> <value-set>
+// <inclusion-exclusion> ::= <inclusion> | <exclusion>
+// <exclusion> ::= "notin"
+// <inclusion> ::= "in"
+// <value-set> ::= "(" <values> ")"
+// <values> ::= VALUE | VALUE "," <values>
+// <exact-match-restriction> ::= ["="|"=="|"!="] VALUE
+//
+// KEY is a sequence of one or more characters following [ DNS_SUBDOMAIN "/" ] DNS_LABEL. Max length is 63 characters.
+// VALUE is a sequence of zero or more characters "([A-Za-z0-9_-\.])". Max length is 63 characters.
+// Delimiter is white space: (' ', '\t')
+// Example of valid syntax:
+// "x in (foo,,baz),y,z notin ()"
+//
+// Note:
+// (1) Inclusion - " in " - denotes that the KEY exists and is equal to any of the
+// VALUEs in its requirement
+// (2) Exclusion - " notin " - denotes that the KEY is not equal to any
+// of the VALUEs in its requirement or does not exist
+// (3) The empty string is a valid VALUE
+// (4) A requirement with just a KEY - as in "y" above - denotes that
+// the KEY exists and can be any VALUE.
+// (5) A requirement with just !KEY requires that the KEY not exist.
+//
+func Parse(selector string) (Selector, error) {
+ parsedSelector, err := parse(selector)
+ if err == nil {
+ return parsedSelector, nil
+ }
+ return nil, err
+}
+
+// parse parses the string representation of the selector and returns the internalSelector struct.
+// The callers of this method can then decide how to return the internalSelector struct to their
+// callers. This function has two callers now, one returns a Selector interface and the other
+// returns a list of requirements.
+func parse(selector string) (internalSelector, error) {
+ p := &Parser{l: &Lexer{s: selector, pos: 0}}
+ items, err := p.parse()
+ if err != nil {
+ return nil, err
+ }
+ sort.Sort(ByKey(items)) // sort to grant determistic parsing
+ return internalSelector(items), err
+}
+
+func validateLabelKey(k string) error {
+ if errs := validation.IsQualifiedName(k); len(errs) != 0 {
+ return fmt.Errorf("invalid label key %q: %s", k, strings.Join(errs, "; "))
+ }
+ return nil
+}
+
+func validateLabelValue(v string) error {
+ if errs := validation.IsValidLabelValue(v); len(errs) != 0 {
+ return fmt.Errorf("invalid label value: %q: %s", v, strings.Join(errs, "; "))
+ }
+ return nil
+}
+
+// SelectorFromSet returns a Selector which will match exactly the given Set. A
+// nil and empty Sets are considered equivalent to Everything().
+func SelectorFromSet(ls Set) Selector {
+ if ls == nil || len(ls) == 0 {
+ return internalSelector{}
+ }
+ var requirements internalSelector
+ for label, value := range ls {
+ r, err := NewRequirement(label, selection.Equals, []string{value})
+ if err == nil {
+ requirements = append(requirements, *r)
+ } else {
+ //TODO: double check errors when input comes from serialization?
+ return internalSelector{}
+ }
+ }
+ // sort to have deterministic string representation
+ sort.Sort(ByKey(requirements))
+ return requirements
+}
+
+// SelectorFromValidatedSet returns a Selector which will match exactly the given Set.
+// A nil and empty Sets are considered equivalent to Everything().
+// It assumes that Set is already validated and doesn't do any validation.
+func SelectorFromValidatedSet(ls Set) Selector {
+ if ls == nil || len(ls) == 0 {
+ return internalSelector{}
+ }
+ var requirements internalSelector
+ for label, value := range ls {
+ requirements = append(requirements, Requirement{key: label, operator: selection.Equals, strValues: []string{value}})
+ }
+ // sort to have deterministic string representation
+ sort.Sort(ByKey(requirements))
+ return requirements
+}
+
+// ParseToRequirements takes a string representing a selector and returns a list of
+// requirements. This function is suitable for those callers that perform additional
+// processing on selector requirements.
+// See the documentation for Parse() function for more details.
+// TODO: Consider exporting the internalSelector type instead.
+func ParseToRequirements(selector string) ([]Requirement, error) {
+ return parse(selector)
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/openapi/common.go b/vendor/k8s.io/apimachinery/pkg/openapi/common.go
new file mode 100644
index 000000000..bfab64a1c
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/openapi/common.go
@@ -0,0 +1,161 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package openapi
+
+import (
+ "github.com/emicklei/go-restful"
+ "github.com/go-openapi/spec"
+ "strings"
+)
+
+// OpenAPIDefinition describes single type. Normally these definitions are auto-generated using gen-openapi.
+type OpenAPIDefinition struct {
+ Schema spec.Schema
+ Dependencies []string
+}
+
+type ReferenceCallback func(path string) spec.Ref
+
+// OpenAPIDefinitions is collection of all definitions.
+type GetOpenAPIDefinitions func(ReferenceCallback) map[string]OpenAPIDefinition
+
+// OpenAPIDefinitionGetter gets openAPI definitions for a given type. If a type implements this interface,
+// the definition returned by it will be used, otherwise the auto-generated definitions will be used. See
+// GetOpenAPITypeFormat for more information about trade-offs of using this interface or GetOpenAPITypeFormat method when
+// possible.
+type OpenAPIDefinitionGetter interface {
+ OpenAPIDefinition() *OpenAPIDefinition
+}
+
+// Config is set of configuration for openAPI spec generation.
+type Config struct {
+ // List of supported protocols such as https, http, etc.
+ ProtocolList []string
+
+ // Info is general information about the API.
+ Info *spec.Info
+
+ // DefaultResponse will be used if an operation does not have any responses listed. It
+ // will show up as ... "responses" : {"default" : $DefaultResponse} in the spec.
+ DefaultResponse *spec.Response
+
+ // CommonResponses will be added as a response to all operation specs. This is a good place to add common
+ // responses such as authorization failed.
+ CommonResponses map[int]spec.Response
+
+ // List of webservice's path prefixes to ignore
+ IgnorePrefixes []string
+
+ // OpenAPIDefinitions should provide definition for all models used by routes. Failure to provide this map
+ // or any of the models will result in spec generation failure.
+ GetDefinitions GetOpenAPIDefinitions
+
+ // GetOperationIDAndTags returns operation id and tags for a restful route. It is an optional function to customize operation IDs.
+ GetOperationIDAndTags func(r *restful.Route) (string, []string, error)
+
+ // GetDefinitionName returns a friendly name for a definition base on the serving path. parameter `name` is the full name of the definition.
+ // It is an optional function to customize model names.
+ GetDefinitionName func(name string) (string, spec.Extensions)
+
+ // PostProcessSpec runs after the spec is ready to serve. It allows a final modification to the spec before serving.
+ PostProcessSpec func(*spec.Swagger) (*spec.Swagger, error)
+
+ // SecurityDefinitions is list of all security definitions for OpenAPI service. If this is not nil, the user of config
+ // is responsible to provide DefaultSecurity and (maybe) add unauthorized response to CommonResponses.
+ SecurityDefinitions *spec.SecurityDefinitions
+
+ // DefaultSecurity for all operations. This will pass as spec.SwaggerProps.Security to OpenAPI.
+ // For most cases, this will be list of acceptable definitions in SecurityDefinitions.
+ DefaultSecurity []map[string][]string
+}
+
+// This function is a reference for converting go (or any custom type) to a simple open API type,format pair. There are
+// two ways to customize spec for a type. If you add it here, a type will be converted to a simple type and the type
+// comment (the comment that is added before type definition) will be lost. The spec will still have the property
+// comment. The second way is to implement OpenAPIDefinitionGetter interface. That function can customize the spec (so
+// the spec does not need to be simple type,format) or can even return a simple type,format (e.g. IntOrString). For simple
+// type formats, the benefit of adding OpenAPIDefinitionGetter interface is to keep both type and property documentation.
+// Example:
+// type Sample struct {
+// ...
+// // port of the server
+// port IntOrString
+// ...
+// }
+// // IntOrString documentation...
+// type IntOrString { ... }
+//
+// Adding IntOrString to this function:
+// "port" : {
+// format: "string",
+// type: "int-or-string",
+// Description: "port of the server"
+// }
+//
+// Implement OpenAPIDefinitionGetter for IntOrString:
+//
+// "port" : {
+// $Ref: "#/definitions/IntOrString"
+// Description: "port of the server"
+// }
+// ...
+// definitions:
+// {
+// "IntOrString": {
+// format: "string",
+// type: "int-or-string",
+// Description: "IntOrString documentation..." // new
+// }
+// }
+//
+func GetOpenAPITypeFormat(typeName string) (string, string) {
+ schemaTypeFormatMap := map[string][]string{
+ "uint": {"integer", "int32"},
+ "uint8": {"integer", "byte"},
+ "uint16": {"integer", "int32"},
+ "uint32": {"integer", "int64"},
+ "uint64": {"integer", "int64"},
+ "int": {"integer", "int32"},
+ "int8": {"integer", "byte"},
+ "int16": {"integer", "int32"},
+ "int32": {"integer", "int32"},
+ "int64": {"integer", "int64"},
+ "byte": {"integer", "byte"},
+ "float64": {"number", "double"},
+ "float32": {"number", "float"},
+ "bool": {"boolean", ""},
+ "time.Time": {"string", "date-time"},
+ "string": {"string", ""},
+ "integer": {"integer", ""},
+ "number": {"number", ""},
+ "boolean": {"boolean", ""},
+ "[]byte": {"string", "byte"}, // base64 encoded characters
+ "interface{}": {"object", ""},
+ }
+ mapped, ok := schemaTypeFormatMap[typeName]
+ if !ok {
+ return "", ""
+ }
+ return mapped[0], mapped[1]
+}
+
+func EscapeJsonPointer(p string) string {
+ // Escaping reference name using rfc6901
+ p = strings.Replace(p, "~", "~0", -1)
+ p = strings.Replace(p, "/", "~1", -1)
+ return p
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/openapi/doc.go b/vendor/k8s.io/apimachinery/pkg/openapi/doc.go
new file mode 100644
index 000000000..5ed572cc1
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/openapi/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// package openapi holds shared codes and types between open API code generator and spec generator.
+package openapi
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/codec.go b/vendor/k8s.io/apimachinery/pkg/runtime/codec.go
new file mode 100644
index 000000000..d9748f066
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/codec.go
@@ -0,0 +1,316 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package runtime
+
+import (
+ "bytes"
+ "encoding/base64"
+ "fmt"
+ "io"
+ "net/url"
+ "reflect"
+
+ "k8s.io/apimachinery/pkg/conversion/queryparams"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// codec binds an encoder and decoder.
+type codec struct {
+ Encoder
+ Decoder
+}
+
+// NewCodec creates a Codec from an Encoder and Decoder.
+func NewCodec(e Encoder, d Decoder) Codec {
+ return codec{e, d}
+}
+
+// Encode is a convenience wrapper for encoding to a []byte from an Encoder
+func Encode(e Encoder, obj Object) ([]byte, error) {
+ // TODO: reuse buffer
+ buf := &bytes.Buffer{}
+ if err := e.Encode(obj, buf); err != nil {
+ return nil, err
+ }
+ return buf.Bytes(), nil
+}
+
+// Decode is a convenience wrapper for decoding data into an Object.
+func Decode(d Decoder, data []byte) (Object, error) {
+ obj, _, err := d.Decode(data, nil, nil)
+ return obj, err
+}
+
+// DecodeInto performs a Decode into the provided object.
+func DecodeInto(d Decoder, data []byte, into Object) error {
+ out, gvk, err := d.Decode(data, nil, into)
+ if err != nil {
+ return err
+ }
+ if out != into {
+ return fmt.Errorf("unable to decode %s into %v", gvk, reflect.TypeOf(into))
+ }
+ return nil
+}
+
+// EncodeOrDie is a version of Encode which will panic instead of returning an error. For tests.
+func EncodeOrDie(e Encoder, obj Object) string {
+ bytes, err := Encode(e, obj)
+ if err != nil {
+ panic(err)
+ }
+ return string(bytes)
+}
+
+// DefaultingSerializer invokes defaulting after decoding.
+type DefaultingSerializer struct {
+ Defaulter ObjectDefaulter
+ Decoder Decoder
+ // Encoder is optional to allow this type to be used as both a Decoder and an Encoder
+ Encoder
+}
+
+// Decode performs a decode and then allows the defaulter to act on the provided object.
+func (d DefaultingSerializer) Decode(data []byte, defaultGVK *schema.GroupVersionKind, into Object) (Object, *schema.GroupVersionKind, error) {
+ obj, gvk, err := d.Decoder.Decode(data, defaultGVK, into)
+ if err != nil {
+ return obj, gvk, err
+ }
+ d.Defaulter.Default(obj)
+ return obj, gvk, nil
+}
+
+// UseOrCreateObject returns obj if the canonical ObjectKind returned by the provided typer matches gvk, or
+// invokes the ObjectCreator to instantiate a new gvk. Returns an error if the typer cannot find the object.
+func UseOrCreateObject(t ObjectTyper, c ObjectCreater, gvk schema.GroupVersionKind, obj Object) (Object, error) {
+ if obj != nil {
+ kinds, _, err := t.ObjectKinds(obj)
+ if err != nil {
+ return nil, err
+ }
+ for _, kind := range kinds {
+ if gvk == kind {
+ return obj, nil
+ }
+ }
+ }
+ return c.New(gvk)
+}
+
+// NoopEncoder converts an Decoder to a Serializer or Codec for code that expects them but only uses decoding.
+type NoopEncoder struct {
+ Decoder
+}
+
+var _ Serializer = NoopEncoder{}
+
+func (n NoopEncoder) Encode(obj Object, w io.Writer) error {
+ return fmt.Errorf("encoding is not allowed for this codec: %v", reflect.TypeOf(n.Decoder))
+}
+
+// NoopDecoder converts an Encoder to a Serializer or Codec for code that expects them but only uses encoding.
+type NoopDecoder struct {
+ Encoder
+}
+
+var _ Serializer = NoopDecoder{}
+
+func (n NoopDecoder) Decode(data []byte, gvk *schema.GroupVersionKind, into Object) (Object, *schema.GroupVersionKind, error) {
+ return nil, nil, fmt.Errorf("decoding is not allowed for this codec: %v", reflect.TypeOf(n.Encoder))
+}
+
+// NewParameterCodec creates a ParameterCodec capable of transforming url values into versioned objects and back.
+func NewParameterCodec(scheme *Scheme) ParameterCodec {
+ return &parameterCodec{
+ typer: scheme,
+ convertor: scheme,
+ creator: scheme,
+ }
+}
+
+// parameterCodec implements conversion to and from query parameters and objects.
+type parameterCodec struct {
+ typer ObjectTyper
+ convertor ObjectConvertor
+ creator ObjectCreater
+}
+
+var _ ParameterCodec = &parameterCodec{}
+
+// DecodeParameters converts the provided url.Values into an object of type From with the kind of into, and then
+// converts that object to into (if necessary). Returns an error if the operation cannot be completed.
+func (c *parameterCodec) DecodeParameters(parameters url.Values, from schema.GroupVersion, into Object) error {
+ if len(parameters) == 0 {
+ return nil
+ }
+ targetGVKs, _, err := c.typer.ObjectKinds(into)
+ if err != nil {
+ return err
+ }
+ for i := range targetGVKs {
+ if targetGVKs[i].GroupVersion() == from {
+ return c.convertor.Convert(&parameters, into, nil)
+ }
+ }
+ input, err := c.creator.New(from.WithKind(targetGVKs[0].Kind))
+ if err != nil {
+ return err
+ }
+ if err := c.convertor.Convert(&parameters, input, nil); err != nil {
+ return err
+ }
+ return c.convertor.Convert(input, into, nil)
+}
+
+// EncodeParameters converts the provided object into the to version, then converts that object to url.Values.
+// Returns an error if conversion is not possible.
+func (c *parameterCodec) EncodeParameters(obj Object, to schema.GroupVersion) (url.Values, error) {
+ gvks, _, err := c.typer.ObjectKinds(obj)
+ if err != nil {
+ return nil, err
+ }
+ gvk := gvks[0]
+ if to != gvk.GroupVersion() {
+ out, err := c.convertor.ConvertToVersion(obj, to)
+ if err != nil {
+ return nil, err
+ }
+ obj = out
+ }
+ return queryparams.Convert(obj)
+}
+
+type base64Serializer struct {
+ Encoder
+ Decoder
+}
+
+func NewBase64Serializer(e Encoder, d Decoder) Serializer {
+ return &base64Serializer{e, d}
+}
+
+func (s base64Serializer) Encode(obj Object, stream io.Writer) error {
+ e := base64.NewEncoder(base64.StdEncoding, stream)
+ err := s.Encoder.Encode(obj, e)
+ e.Close()
+ return err
+}
+
+func (s base64Serializer) Decode(data []byte, defaults *schema.GroupVersionKind, into Object) (Object, *schema.GroupVersionKind, error) {
+ out := make([]byte, base64.StdEncoding.DecodedLen(len(data)))
+ n, err := base64.StdEncoding.Decode(out, data)
+ if err != nil {
+ return nil, nil, err
+ }
+ return s.Decoder.Decode(out[:n], defaults, into)
+}
+
+// SerializerInfoForMediaType returns the first info in types that has a matching media type (which cannot
+// include media-type parameters), or the first info with an empty media type, or false if no type matches.
+func SerializerInfoForMediaType(types []SerializerInfo, mediaType string) (SerializerInfo, bool) {
+ for _, info := range types {
+ if info.MediaType == mediaType {
+ return info, true
+ }
+ }
+ for _, info := range types {
+ if len(info.MediaType) == 0 {
+ return info, true
+ }
+ }
+ return SerializerInfo{}, false
+}
+
+var (
+ // InternalGroupVersioner will always prefer the internal version for a given group version kind.
+ InternalGroupVersioner GroupVersioner = internalGroupVersioner{}
+ // DisabledGroupVersioner will reject all kinds passed to it.
+ DisabledGroupVersioner GroupVersioner = disabledGroupVersioner{}
+)
+
+type internalGroupVersioner struct{}
+
+// KindForGroupVersionKinds returns an internal Kind if one is found, or converts the first provided kind to the internal version.
+func (internalGroupVersioner) KindForGroupVersionKinds(kinds []schema.GroupVersionKind) (schema.GroupVersionKind, bool) {
+ for _, kind := range kinds {
+ if kind.Version == APIVersionInternal {
+ return kind, true
+ }
+ }
+ for _, kind := range kinds {
+ return schema.GroupVersionKind{Group: kind.Group, Version: APIVersionInternal, Kind: kind.Kind}, true
+ }
+ return schema.GroupVersionKind{}, false
+}
+
+type disabledGroupVersioner struct{}
+
+// KindForGroupVersionKinds returns false for any input.
+func (disabledGroupVersioner) KindForGroupVersionKinds(kinds []schema.GroupVersionKind) (schema.GroupVersionKind, bool) {
+ return schema.GroupVersionKind{}, false
+}
+
+// GroupVersioners implements GroupVersioner and resolves to the first exact match for any kind.
+type GroupVersioners []GroupVersioner
+
+// KindForGroupVersionKinds returns the first match of any of the group versioners, or false if no match occured.
+func (gvs GroupVersioners) KindForGroupVersionKinds(kinds []schema.GroupVersionKind) (schema.GroupVersionKind, bool) {
+ for _, gv := range gvs {
+ target, ok := gv.KindForGroupVersionKinds(kinds)
+ if !ok {
+ continue
+ }
+ return target, true
+ }
+ return schema.GroupVersionKind{}, false
+}
+
+// Assert that schema.GroupVersion and GroupVersions implement GroupVersioner
+var _ GroupVersioner = schema.GroupVersion{}
+var _ GroupVersioner = schema.GroupVersions{}
+var _ GroupVersioner = multiGroupVersioner{}
+
+type multiGroupVersioner struct {
+ target schema.GroupVersion
+ acceptedGroupKinds []schema.GroupKind
+}
+
+// NewMultiGroupVersioner returns the provided group version for any kind that matches one of the provided group kinds.
+// Kind may be empty in the provided group kind, in which case any kind will match.
+func NewMultiGroupVersioner(gv schema.GroupVersion, groupKinds ...schema.GroupKind) GroupVersioner {
+ if len(groupKinds) == 0 || (len(groupKinds) == 1 && groupKinds[0].Group == gv.Group) {
+ return gv
+ }
+ return multiGroupVersioner{target: gv, acceptedGroupKinds: groupKinds}
+}
+
+// KindForGroupVersionKinds returns the target group version if any kind matches any of the original group kinds. It will
+// use the originating kind where possible.
+func (v multiGroupVersioner) KindForGroupVersionKinds(kinds []schema.GroupVersionKind) (schema.GroupVersionKind, bool) {
+ for _, src := range kinds {
+ for _, kind := range v.acceptedGroupKinds {
+ if kind.Group != src.Group {
+ continue
+ }
+ if len(kind.Kind) > 0 && kind.Kind != src.Kind {
+ continue
+ }
+ return v.target.WithKind(src.Kind), true
+ }
+ }
+ return schema.GroupVersionKind{}, false
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/codec_check.go b/vendor/k8s.io/apimachinery/pkg/runtime/codec_check.go
new file mode 100644
index 000000000..510444a4d
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/codec_check.go
@@ -0,0 +1,48 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package runtime
+
+import (
+ "fmt"
+ "reflect"
+
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// CheckCodec makes sure that the codec can encode objects like internalType,
+// decode all of the external types listed, and also decode them into the given
+// object. (Will modify internalObject.) (Assumes JSON serialization.)
+// TODO: verify that the correct external version is chosen on encode...
+func CheckCodec(c Codec, internalType Object, externalTypes ...schema.GroupVersionKind) error {
+ if _, err := Encode(c, internalType); err != nil {
+ return fmt.Errorf("Internal type not encodable: %v", err)
+ }
+ for _, et := range externalTypes {
+ exBytes := []byte(fmt.Sprintf(`{"kind":"%v","apiVersion":"%v"}`, et.Kind, et.GroupVersion().String()))
+ obj, err := Decode(c, exBytes)
+ if err != nil {
+ return fmt.Errorf("external type %s not interpretable: %v", et, err)
+ }
+ if reflect.TypeOf(obj) != reflect.TypeOf(internalType) {
+ return fmt.Errorf("decode of external type %s produced: %#v", et, obj)
+ }
+ if err = DecodeInto(c, exBytes, internalType); err != nil {
+ return fmt.Errorf("external type %s not convertible to internal type: %v", et, err)
+ }
+ }
+ return nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/conversion.go b/vendor/k8s.io/apimachinery/pkg/runtime/conversion.go
new file mode 100644
index 000000000..8eedffc9c
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/conversion.go
@@ -0,0 +1,98 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Defines conversions between generic types and structs to map query strings
+// to struct objects.
+package runtime
+
+import (
+ "reflect"
+ "strconv"
+ "strings"
+
+ "k8s.io/apimachinery/pkg/conversion"
+)
+
+// JSONKeyMapper uses the struct tags on a conversion to determine the key value for
+// the other side. Use when mapping from a map[string]* to a struct or vice versa.
+func JSONKeyMapper(key string, sourceTag, destTag reflect.StructTag) (string, string) {
+ if s := destTag.Get("json"); len(s) > 0 {
+ return strings.SplitN(s, ",", 2)[0], key
+ }
+ if s := sourceTag.Get("json"); len(s) > 0 {
+ return key, strings.SplitN(s, ",", 2)[0]
+ }
+ return key, key
+}
+
+// DefaultStringConversions are helpers for converting []string and string to real values.
+var DefaultStringConversions = []interface{}{
+ Convert_Slice_string_To_string,
+ Convert_Slice_string_To_int,
+ Convert_Slice_string_To_bool,
+ Convert_Slice_string_To_int64,
+}
+
+func Convert_Slice_string_To_string(input *[]string, out *string, s conversion.Scope) error {
+ if len(*input) == 0 {
+ *out = ""
+ }
+ *out = (*input)[0]
+ return nil
+}
+
+func Convert_Slice_string_To_int(input *[]string, out *int, s conversion.Scope) error {
+ if len(*input) == 0 {
+ *out = 0
+ }
+ str := (*input)[0]
+ i, err := strconv.Atoi(str)
+ if err != nil {
+ return err
+ }
+ *out = i
+ return nil
+}
+
+// Conver_Slice_string_To_bool will convert a string parameter to boolean.
+// Only the absence of a value, a value of "false", or a value of "0" resolve to false.
+// Any other value (including empty string) resolves to true.
+func Convert_Slice_string_To_bool(input *[]string, out *bool, s conversion.Scope) error {
+ if len(*input) == 0 {
+ *out = false
+ return nil
+ }
+ switch strings.ToLower((*input)[0]) {
+ case "false", "0":
+ *out = false
+ default:
+ *out = true
+ }
+ return nil
+}
+
+func Convert_Slice_string_To_int64(input *[]string, out *int64, s conversion.Scope) error {
+ if len(*input) == 0 {
+ *out = 0
+ }
+ str := (*input)[0]
+ i, err := strconv.ParseInt(str, 10, 64)
+ if err != nil {
+ return err
+ }
+ *out = i
+ return nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/doc.go b/vendor/k8s.io/apimachinery/pkg/runtime/doc.go
new file mode 100644
index 000000000..06b45df66
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/doc.go
@@ -0,0 +1,45 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package runtime includes helper functions for working with API objects
+// that follow the kubernetes API object conventions, which are:
+//
+// 0. Your API objects have a common metadata struct member, TypeMeta.
+// 1. Your code refers to an internal set of API objects.
+// 2. In a separate package, you have an external set of API objects.
+// 3. The external set is considered to be versioned, and no breaking
+// changes are ever made to it (fields may be added but not changed
+// or removed).
+// 4. As your api evolves, you'll make an additional versioned package
+// with every major change.
+// 5. Versioned packages have conversion functions which convert to
+// and from the internal version.
+// 6. You'll continue to support older versions according to your
+// deprecation policy, and you can easily provide a program/library
+// to update old versions into new versions because of 5.
+// 7. All of your serializations and deserializations are handled in a
+// centralized place.
+//
+// Package runtime provides a conversion helper to make 5 easy, and the
+// Encode/Decode/DecodeInto trio to accomplish 7. You can also register
+// additional "codecs" which use a version of your choice. It's
+// recommended that you register your types with runtime in your
+// package's init function.
+//
+// As a bonus, a few common types useful from all api objects and versions
+// are provided in types.go.
+
+package runtime // import "k8s.io/apimachinery/pkg/runtime"
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/embedded.go b/vendor/k8s.io/apimachinery/pkg/runtime/embedded.go
new file mode 100644
index 000000000..e8825a787
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/embedded.go
@@ -0,0 +1,136 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package runtime
+
+import (
+ "errors"
+
+ "k8s.io/apimachinery/pkg/conversion"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+type encodable struct {
+ E Encoder `json:"-"`
+ obj Object
+ versions []schema.GroupVersion
+}
+
+func (e encodable) GetObjectKind() schema.ObjectKind { return e.obj.GetObjectKind() }
+
+// NewEncodable creates an object that will be encoded with the provided codec on demand.
+// Provided as a convenience for test cases dealing with internal objects.
+func NewEncodable(e Encoder, obj Object, versions ...schema.GroupVersion) Object {
+ if _, ok := obj.(*Unknown); ok {
+ return obj
+ }
+ return encodable{e, obj, versions}
+}
+
+func (re encodable) UnmarshalJSON(in []byte) error {
+ return errors.New("runtime.encodable cannot be unmarshalled from JSON")
+}
+
+// Marshal may get called on pointers or values, so implement MarshalJSON on value.
+// http://stackoverflow.com/questions/21390979/custom-marshaljson-never-gets-called-in-go
+func (re encodable) MarshalJSON() ([]byte, error) {
+ return Encode(re.E, re.obj)
+}
+
+// NewEncodableList creates an object that will be encoded with the provided codec on demand.
+// Provided as a convenience for test cases dealing with internal objects.
+func NewEncodableList(e Encoder, objects []Object, versions ...schema.GroupVersion) []Object {
+ out := make([]Object, len(objects))
+ for i := range objects {
+ if _, ok := objects[i].(*Unknown); ok {
+ out[i] = objects[i]
+ continue
+ }
+ out[i] = NewEncodable(e, objects[i], versions...)
+ }
+ return out
+}
+
+func (re *Unknown) UnmarshalJSON(in []byte) error {
+ if re == nil {
+ return errors.New("runtime.Unknown: UnmarshalJSON on nil pointer")
+ }
+ re.TypeMeta = TypeMeta{}
+ re.Raw = append(re.Raw[0:0], in...)
+ re.ContentEncoding = ""
+ re.ContentType = ContentTypeJSON
+ return nil
+}
+
+// Marshal may get called on pointers or values, so implement MarshalJSON on value.
+// http://stackoverflow.com/questions/21390979/custom-marshaljson-never-gets-called-in-go
+func (re Unknown) MarshalJSON() ([]byte, error) {
+ // If ContentType is unset, we assume this is JSON.
+ if re.ContentType != "" && re.ContentType != ContentTypeJSON {
+ return nil, errors.New("runtime.Unknown: MarshalJSON on non-json data")
+ }
+ if re.Raw == nil {
+ return []byte("null"), nil
+ }
+ return re.Raw, nil
+}
+
+func Convert_runtime_Object_To_runtime_RawExtension(in *Object, out *RawExtension, s conversion.Scope) error {
+ if in == nil {
+ out.Raw = []byte("null")
+ return nil
+ }
+ obj := *in
+ if unk, ok := obj.(*Unknown); ok {
+ if unk.Raw != nil {
+ out.Raw = unk.Raw
+ return nil
+ }
+ obj = out.Object
+ }
+ if obj == nil {
+ out.Raw = nil
+ return nil
+ }
+ out.Object = obj
+ return nil
+}
+
+func Convert_runtime_RawExtension_To_runtime_Object(in *RawExtension, out *Object, s conversion.Scope) error {
+ if in.Object != nil {
+ *out = in.Object
+ return nil
+ }
+ data := in.Raw
+ if len(data) == 0 || (len(data) == 4 && string(data) == "null") {
+ *out = nil
+ return nil
+ }
+ *out = &Unknown{
+ Raw: data,
+ // TODO: Set ContentEncoding and ContentType appropriately.
+ // Currently we set ContentTypeJSON to make tests passing.
+ ContentType: ContentTypeJSON,
+ }
+ return nil
+}
+
+func DefaultEmbeddedConversions() []interface{} {
+ return []interface{}{
+ Convert_runtime_Object_To_runtime_RawExtension,
+ Convert_runtime_RawExtension_To_runtime_Object,
+ }
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/error.go b/vendor/k8s.io/apimachinery/pkg/runtime/error.go
new file mode 100644
index 000000000..21a355707
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/error.go
@@ -0,0 +1,113 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package runtime
+
+import (
+ "fmt"
+ "reflect"
+
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+type notRegisteredErr struct {
+ gvk schema.GroupVersionKind
+ target GroupVersioner
+ t reflect.Type
+}
+
+func NewNotRegisteredErrForKind(gvk schema.GroupVersionKind) error {
+ return &notRegisteredErr{gvk: gvk}
+}
+
+func NewNotRegisteredErrForType(t reflect.Type) error {
+ return &notRegisteredErr{t: t}
+}
+
+func NewNotRegisteredErrForTarget(t reflect.Type, target GroupVersioner) error {
+ return &notRegisteredErr{t: t, target: target}
+}
+
+func (k *notRegisteredErr) Error() string {
+ if k.t != nil && k.target != nil {
+ return fmt.Sprintf("%v is not suitable for converting to %q", k.t, k.target)
+ }
+ if k.t != nil {
+ return fmt.Sprintf("no kind is registered for the type %v", k.t)
+ }
+ if len(k.gvk.Kind) == 0 {
+ return fmt.Sprintf("no version %q has been registered", k.gvk.GroupVersion())
+ }
+ if k.gvk.Version == APIVersionInternal {
+ return fmt.Sprintf("no kind %q is registered for the internal version of group %q", k.gvk.Kind, k.gvk.Group)
+ }
+
+ return fmt.Sprintf("no kind %q is registered for version %q", k.gvk.Kind, k.gvk.GroupVersion())
+}
+
+// IsNotRegisteredError returns true if the error indicates the provided
+// object or input data is not registered.
+func IsNotRegisteredError(err error) bool {
+ if err == nil {
+ return false
+ }
+ _, ok := err.(*notRegisteredErr)
+ return ok
+}
+
+type missingKindErr struct {
+ data string
+}
+
+func NewMissingKindErr(data string) error {
+ return &missingKindErr{data}
+}
+
+func (k *missingKindErr) Error() string {
+ return fmt.Sprintf("Object 'Kind' is missing in '%s'", k.data)
+}
+
+// IsMissingKind returns true if the error indicates that the provided object
+// is missing a 'Kind' field.
+func IsMissingKind(err error) bool {
+ if err == nil {
+ return false
+ }
+ _, ok := err.(*missingKindErr)
+ return ok
+}
+
+type missingVersionErr struct {
+ data string
+}
+
+// IsMissingVersion returns true if the error indicates that the provided object
+// is missing a 'Version' field.
+func NewMissingVersionErr(data string) error {
+ return &missingVersionErr{data}
+}
+
+func (k *missingVersionErr) Error() string {
+ return fmt.Sprintf("Object 'apiVersion' is missing in '%s'", k.data)
+}
+
+func IsMissingVersion(err error) bool {
+ if err == nil {
+ return false
+ }
+ _, ok := err.(*missingVersionErr)
+ return ok
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/extension.go b/vendor/k8s.io/apimachinery/pkg/runtime/extension.go
new file mode 100644
index 000000000..4d23ee9ee
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/extension.go
@@ -0,0 +1,48 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package runtime
+
+import (
+ "encoding/json"
+ "errors"
+)
+
+func (re *RawExtension) UnmarshalJSON(in []byte) error {
+ if re == nil {
+ return errors.New("runtime.RawExtension: UnmarshalJSON on nil pointer")
+ }
+ re.Raw = append(re.Raw[0:0], in...)
+ return nil
+}
+
+// Marshal may get called on pointers or values, so implement MarshalJSON on value.
+// http://stackoverflow.com/questions/21390979/custom-marshaljson-never-gets-called-in-go
+func (re RawExtension) MarshalJSON() ([]byte, error) {
+ if re.Raw == nil {
+ // TODO: this is to support legacy behavior of JSONPrinter and YAMLPrinter, which
+ // expect to call json.Marshal on arbitrary versioned objects (even those not in
+ // the scheme). pkg/kubectl/resource#AsVersionedObjects and its interaction with
+ // kubectl get on objects not in the scheme needs to be updated to ensure that the
+ // objects that are not part of the scheme are correctly put into the right form.
+ if re.Object != nil {
+ return json.Marshal(re.Object)
+ }
+ return []byte("null"), nil
+ }
+ // TODO: Check whether ContentType is actually JSON before returning it.
+ return re.Raw, nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go
new file mode 100644
index 000000000..bce8336a8
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go
@@ -0,0 +1,773 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package runtime is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto
+
+ It has these top-level messages:
+ RawExtension
+ TypeMeta
+ Unknown
+*/
+package runtime
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *RawExtension) Reset() { *m = RawExtension{} }
+func (*RawExtension) ProtoMessage() {}
+func (*RawExtension) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *TypeMeta) Reset() { *m = TypeMeta{} }
+func (*TypeMeta) ProtoMessage() {}
+func (*TypeMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *Unknown) Reset() { *m = Unknown{} }
+func (*Unknown) ProtoMessage() {}
+func (*Unknown) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
+
+func init() {
+ proto.RegisterType((*RawExtension)(nil), "k8s.io.apimachinery.pkg.runtime.RawExtension")
+ proto.RegisterType((*TypeMeta)(nil), "k8s.io.apimachinery.pkg.runtime.TypeMeta")
+ proto.RegisterType((*Unknown)(nil), "k8s.io.apimachinery.pkg.runtime.Unknown")
+}
+func (m *RawExtension) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RawExtension) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Raw != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Raw)))
+ i += copy(dAtA[i:], m.Raw)
+ }
+ return i, nil
+}
+
+func (m *TypeMeta) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *TypeMeta) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion)))
+ i += copy(dAtA[i:], m.APIVersion)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
+ i += copy(dAtA[i:], m.Kind)
+ return i, nil
+}
+
+func (m *Unknown) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Unknown) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.TypeMeta.Size()))
+ n1, err := m.TypeMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ if m.Raw != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Raw)))
+ i += copy(dAtA[i:], m.Raw)
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ContentEncoding)))
+ i += copy(dAtA[i:], m.ContentEncoding)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ContentType)))
+ i += copy(dAtA[i:], m.ContentType)
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *RawExtension) Size() (n int) {
+ var l int
+ _ = l
+ if m.Raw != nil {
+ l = len(m.Raw)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *TypeMeta) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.APIVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Kind)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Unknown) Size() (n int) {
+ var l int
+ _ = l
+ l = m.TypeMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Raw != nil {
+ l = len(m.Raw)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ l = len(m.ContentEncoding)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ContentType)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *RawExtension) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RawExtension{`,
+ `Raw:` + valueToStringGenerated(this.Raw) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *TypeMeta) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&TypeMeta{`,
+ `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`,
+ `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Unknown) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Unknown{`,
+ `TypeMeta:` + strings.Replace(strings.Replace(this.TypeMeta.String(), "TypeMeta", "TypeMeta", 1), `&`, ``, 1) + `,`,
+ `Raw:` + valueToStringGenerated(this.Raw) + `,`,
+ `ContentEncoding:` + fmt.Sprintf("%v", this.ContentEncoding) + `,`,
+ `ContentType:` + fmt.Sprintf("%v", this.ContentType) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *RawExtension) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RawExtension: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RawExtension: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Raw", wireType)
+ }
+ var byteLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ byteLen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if byteLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + byteLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Raw = append(m.Raw[:0], dAtA[iNdEx:postIndex]...)
+ if m.Raw == nil {
+ m.Raw = []byte{}
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *TypeMeta) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: TypeMeta: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: TypeMeta: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Kind = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Unknown) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Unknown: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Unknown: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TypeMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.TypeMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Raw", wireType)
+ }
+ var byteLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ byteLen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if byteLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + byteLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Raw = append(m.Raw[:0], dAtA[iNdEx:postIndex]...)
+ if m.Raw == nil {
+ m.Raw = []byte{}
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ContentEncoding", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ContentEncoding = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ContentType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ContentType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 395 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x90, 0x4f, 0x6f, 0xd3, 0x30,
+ 0x18, 0xc6, 0xe3, 0xb5, 0x52, 0x87, 0x5b, 0x69, 0xc8, 0x1c, 0x08, 0x3b, 0x38, 0x53, 0x4f, 0xec,
+ 0x30, 0x5b, 0x1a, 0x42, 0xe2, 0xba, 0x4c, 0x93, 0x40, 0x08, 0x09, 0x59, 0xfc, 0x91, 0x38, 0xe1,
+ 0x26, 0x26, 0xb3, 0x42, 0x5f, 0x47, 0x8e, 0x43, 0xd8, 0x8d, 0x8f, 0xc0, 0xc7, 0xea, 0x71, 0xc7,
+ 0x9e, 0x2a, 0x1a, 0x3e, 0x04, 0x57, 0x54, 0xd7, 0x2d, 0xa5, 0x08, 0xed, 0x16, 0xbf, 0xcf, 0xf3,
+ 0x7b, 0xde, 0xe7, 0x0d, 0x7e, 0x5e, 0x3e, 0xab, 0x99, 0x36, 0xbc, 0x6c, 0x26, 0xca, 0x82, 0x72,
+ 0xaa, 0xe6, 0x5f, 0x14, 0xe4, 0xc6, 0xf2, 0x20, 0xc8, 0x4a, 0x4f, 0x65, 0x76, 0xad, 0x41, 0xd9,
+ 0x1b, 0x5e, 0x95, 0x05, 0xb7, 0x0d, 0x38, 0x3d, 0x55, 0xbc, 0x50, 0xa0, 0xac, 0x74, 0x2a, 0x67,
+ 0x95, 0x35, 0xce, 0x90, 0x64, 0x0d, 0xb0, 0x5d, 0x80, 0x55, 0x65, 0xc1, 0x02, 0x70, 0x7c, 0x56,
+ 0x68, 0x77, 0xdd, 0x4c, 0x58, 0x66, 0xa6, 0xbc, 0x30, 0x85, 0xe1, 0x9e, 0x9b, 0x34, 0x9f, 0xfc,
+ 0xcb, 0x3f, 0xfc, 0xd7, 0x3a, 0xef, 0xf8, 0xc9, 0xff, 0x0a, 0x34, 0x4e, 0x7f, 0xe6, 0x1a, 0x5c,
+ 0xed, 0xec, 0x7e, 0x89, 0xf1, 0x29, 0x1e, 0x09, 0xd9, 0x5e, 0x7d, 0x75, 0x0a, 0x6a, 0x6d, 0x80,
+ 0x3c, 0xc2, 0x3d, 0x2b, 0xdb, 0x18, 0x9d, 0xa0, 0xc7, 0xa3, 0x74, 0xd0, 0x2d, 0x92, 0x9e, 0x90,
+ 0xad, 0x58, 0xcd, 0xc6, 0x1f, 0xf1, 0xe1, 0x9b, 0x9b, 0x4a, 0xbd, 0x52, 0x4e, 0x92, 0x73, 0x8c,
+ 0x65, 0xa5, 0xdf, 0x29, 0xbb, 0x82, 0xbc, 0xfb, 0x5e, 0x4a, 0x66, 0x8b, 0x24, 0xea, 0x16, 0x09,
+ 0xbe, 0x78, 0xfd, 0x22, 0x28, 0x62, 0xc7, 0x45, 0x4e, 0x70, 0xbf, 0xd4, 0x90, 0xc7, 0x07, 0xde,
+ 0x3d, 0x0a, 0xee, 0xfe, 0x4b, 0x0d, 0xb9, 0xf0, 0xca, 0xf8, 0x17, 0xc2, 0x83, 0xb7, 0x50, 0x82,
+ 0x69, 0x81, 0xbc, 0xc7, 0x87, 0x2e, 0x6c, 0xf3, 0xf9, 0xc3, 0xf3, 0x53, 0x76, 0xc7, 0x0f, 0x63,
+ 0x9b, 0x7a, 0xe9, 0xfd, 0x10, 0xbe, 0x2d, 0x2c, 0xb6, 0x61, 0x9b, 0x0b, 0x0f, 0xfe, 0xbd, 0x90,
+ 0x5c, 0xe0, 0xa3, 0xcc, 0x80, 0x53, 0xe0, 0xae, 0x20, 0x33, 0xb9, 0x86, 0x22, 0xee, 0xf9, 0xb2,
+ 0x0f, 0x43, 0xde, 0xd1, 0xe5, 0xdf, 0xb2, 0xd8, 0xf7, 0x93, 0xa7, 0x78, 0x18, 0x46, 0xab, 0xd5,
+ 0x71, 0xdf, 0xe3, 0x0f, 0x02, 0x3e, 0xbc, 0xfc, 0x23, 0x89, 0x5d, 0x5f, 0x7a, 0x36, 0x5b, 0xd2,
+ 0xe8, 0x76, 0x49, 0xa3, 0xf9, 0x92, 0x46, 0xdf, 0x3a, 0x8a, 0x66, 0x1d, 0x45, 0xb7, 0x1d, 0x45,
+ 0xf3, 0x8e, 0xa2, 0x1f, 0x1d, 0x45, 0xdf, 0x7f, 0xd2, 0xe8, 0xc3, 0x20, 0x1c, 0xfa, 0x3b, 0x00,
+ 0x00, 0xff, 0xff, 0x3f, 0x1e, 0x24, 0x09, 0x85, 0x02, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto b/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto
new file mode 100644
index 000000000..57fc84078
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto
@@ -0,0 +1,128 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.apimachinery.pkg.runtime;
+
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "runtime";
+
+// RawExtension is used to hold extensions in external versions.
+//
+// To use this, make a field which has RawExtension as its type in your external, versioned
+// struct, and Object in your internal struct. You also need to register your
+// various plugin types.
+//
+// // Internal package:
+// type MyAPIObject struct {
+// runtime.TypeMeta `json:",inline"`
+// MyPlugin runtime.Object `json:"myPlugin"`
+// }
+// type PluginA struct {
+// AOption string `json:"aOption"`
+// }
+//
+// // External package:
+// type MyAPIObject struct {
+// runtime.TypeMeta `json:",inline"`
+// MyPlugin runtime.RawExtension `json:"myPlugin"`
+// }
+// type PluginA struct {
+// AOption string `json:"aOption"`
+// }
+//
+// // On the wire, the JSON will look something like this:
+// {
+// "kind":"MyAPIObject",
+// "apiVersion":"v1",
+// "myPlugin": {
+// "kind":"PluginA",
+// "aOption":"foo",
+// },
+// }
+//
+// So what happens? Decode first uses json or yaml to unmarshal the serialized data into
+// your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked.
+// The next step is to copy (using pkg/conversion) into the internal struct. The runtime
+// package's DefaultScheme has conversion functions installed which will unpack the
+// JSON stored in RawExtension, turning it into the correct object type, and storing it
+// in the Object. (TODO: In the case where the object is of an unknown type, a
+// runtime.Unknown object will be created and stored.)
+//
+// +k8s:deepcopy-gen=true
+// +protobuf=true
+// +k8s:openapi-gen=true
+message RawExtension {
+ // Raw is the underlying serialization of this object.
+ //
+ // TODO: Determine how to detect ContentType and ContentEncoding of 'Raw' data.
+ optional bytes raw = 1;
+}
+
+// TypeMeta is shared by all top level objects. The proper way to use it is to inline it in your type,
+// like this:
+// type MyAwesomeAPIObject struct {
+// runtime.TypeMeta `json:",inline"`
+// ... // other fields
+// }
+// func (obj *MyAwesomeAPIObject) SetGroupVersionKind(gvk *metav1.GroupVersionKind) { metav1.UpdateTypeMeta(obj,gvk) }; GroupVersionKind() *GroupVersionKind
+//
+// TypeMeta is provided here for convenience. You may use it directly from this package or define
+// your own with the same fields.
+//
+// +k8s:deepcopy-gen=true
+// +protobuf=true
+// +k8s:openapi-gen=true
+message TypeMeta {
+ // +optional
+ optional string apiVersion = 1;
+
+ // +optional
+ optional string kind = 2;
+}
+
+// Unknown allows api objects with unknown types to be passed-through. This can be used
+// to deal with the API objects from a plug-in. Unknown objects still have functioning
+// TypeMeta features-- kind, version, etc.
+// TODO: Make this object have easy access to field based accessors and settors for
+// metadata and field mutatation.
+//
+// +k8s:deepcopy-gen=true
+// +protobuf=true
+// +k8s:openapi-gen=true
+message Unknown {
+ optional TypeMeta typeMeta = 1;
+
+ // Raw will hold the complete serialized object which couldn't be matched
+ // with a registered type. Most likely, nothing should be done with this
+ // except for passing it through the system.
+ optional bytes raw = 2;
+
+ // ContentEncoding is encoding used to encode 'Raw' data.
+ // Unspecified means no encoding.
+ optional string contentEncoding = 3;
+
+ // ContentType is serialization method used to serialize 'Raw'.
+ // Unspecified means ContentTypeJSON.
+ optional string contentType = 4;
+}
+
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/helper.go b/vendor/k8s.io/apimachinery/pkg/runtime/helper.go
new file mode 100644
index 000000000..a6c1a8d34
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/helper.go
@@ -0,0 +1,212 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package runtime
+
+import (
+ "fmt"
+ "io"
+ "reflect"
+
+ "k8s.io/apimachinery/pkg/conversion"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/util/errors"
+)
+
+// unsafeObjectConvertor implements ObjectConvertor using the unsafe conversion path.
+type unsafeObjectConvertor struct {
+ *Scheme
+}
+
+var _ ObjectConvertor = unsafeObjectConvertor{}
+
+// ConvertToVersion converts in to the provided outVersion without copying the input first, which
+// is only safe if the output object is not mutated or reused.
+func (c unsafeObjectConvertor) ConvertToVersion(in Object, outVersion GroupVersioner) (Object, error) {
+ return c.Scheme.UnsafeConvertToVersion(in, outVersion)
+}
+
+// UnsafeObjectConvertor performs object conversion without copying the object structure,
+// for use when the converted object will not be reused or mutated. Primarily for use within
+// versioned codecs, which use the external object for serialization but do not return it.
+func UnsafeObjectConvertor(scheme *Scheme) ObjectConvertor {
+ return unsafeObjectConvertor{scheme}
+}
+
+// SetField puts the value of src, into fieldName, which must be a member of v.
+// The value of src must be assignable to the field.
+func SetField(src interface{}, v reflect.Value, fieldName string) error {
+ field := v.FieldByName(fieldName)
+ if !field.IsValid() {
+ return fmt.Errorf("couldn't find %v field in %#v", fieldName, v.Interface())
+ }
+ srcValue := reflect.ValueOf(src)
+ if srcValue.Type().AssignableTo(field.Type()) {
+ field.Set(srcValue)
+ return nil
+ }
+ if srcValue.Type().ConvertibleTo(field.Type()) {
+ field.Set(srcValue.Convert(field.Type()))
+ return nil
+ }
+ return fmt.Errorf("couldn't assign/convert %v to %v", srcValue.Type(), field.Type())
+}
+
+// Field puts the value of fieldName, which must be a member of v, into dest,
+// which must be a variable to which this field's value can be assigned.
+func Field(v reflect.Value, fieldName string, dest interface{}) error {
+ field := v.FieldByName(fieldName)
+ if !field.IsValid() {
+ return fmt.Errorf("couldn't find %v field in %#v", fieldName, v.Interface())
+ }
+ destValue, err := conversion.EnforcePtr(dest)
+ if err != nil {
+ return err
+ }
+ if field.Type().AssignableTo(destValue.Type()) {
+ destValue.Set(field)
+ return nil
+ }
+ if field.Type().ConvertibleTo(destValue.Type()) {
+ destValue.Set(field.Convert(destValue.Type()))
+ return nil
+ }
+ return fmt.Errorf("couldn't assign/convert %v to %v", field.Type(), destValue.Type())
+}
+
+// fieldPtr puts the address of fieldName, which must be a member of v,
+// into dest, which must be an address of a variable to which this field's
+// address can be assigned.
+func FieldPtr(v reflect.Value, fieldName string, dest interface{}) error {
+ field := v.FieldByName(fieldName)
+ if !field.IsValid() {
+ return fmt.Errorf("couldn't find %v field in %#v", fieldName, v.Interface())
+ }
+ v, err := conversion.EnforcePtr(dest)
+ if err != nil {
+ return err
+ }
+ field = field.Addr()
+ if field.Type().AssignableTo(v.Type()) {
+ v.Set(field)
+ return nil
+ }
+ if field.Type().ConvertibleTo(v.Type()) {
+ v.Set(field.Convert(v.Type()))
+ return nil
+ }
+ return fmt.Errorf("couldn't assign/convert %v to %v", field.Type(), v.Type())
+}
+
+// EncodeList ensures that each object in an array is converted to a Unknown{} in serialized form.
+// TODO: accept a content type.
+func EncodeList(e Encoder, objects []Object) error {
+ var errs []error
+ for i := range objects {
+ data, err := Encode(e, objects[i])
+ if err != nil {
+ errs = append(errs, err)
+ continue
+ }
+ // TODO: Set ContentEncoding and ContentType.
+ objects[i] = &Unknown{Raw: data}
+ }
+ return errors.NewAggregate(errs)
+}
+
+func decodeListItem(obj *Unknown, decoders []Decoder) (Object, error) {
+ for _, decoder := range decoders {
+ // TODO: Decode based on ContentType.
+ obj, err := Decode(decoder, obj.Raw)
+ if err != nil {
+ if IsNotRegisteredError(err) {
+ continue
+ }
+ return nil, err
+ }
+ return obj, nil
+ }
+ // could not decode, so leave the object as Unknown, but give the decoders the
+ // chance to set Unknown.TypeMeta if it is available.
+ for _, decoder := range decoders {
+ if err := DecodeInto(decoder, obj.Raw, obj); err == nil {
+ return obj, nil
+ }
+ }
+ return obj, nil
+}
+
+// DecodeList alters the list in place, attempting to decode any objects found in
+// the list that have the Unknown type. Any errors that occur are returned
+// after the entire list is processed. Decoders are tried in order.
+func DecodeList(objects []Object, decoders ...Decoder) []error {
+ errs := []error(nil)
+ for i, obj := range objects {
+ switch t := obj.(type) {
+ case *Unknown:
+ decoded, err := decodeListItem(t, decoders)
+ if err != nil {
+ errs = append(errs, err)
+ break
+ }
+ objects[i] = decoded
+ }
+ }
+ return errs
+}
+
+// MultiObjectTyper returns the types of objects across multiple schemes in order.
+type MultiObjectTyper []ObjectTyper
+
+var _ ObjectTyper = MultiObjectTyper{}
+
+func (m MultiObjectTyper) ObjectKinds(obj Object) (gvks []schema.GroupVersionKind, unversionedType bool, err error) {
+ for _, t := range m {
+ gvks, unversionedType, err = t.ObjectKinds(obj)
+ if err == nil {
+ return
+ }
+ }
+ return
+}
+
+func (m MultiObjectTyper) Recognizes(gvk schema.GroupVersionKind) bool {
+ for _, t := range m {
+ if t.Recognizes(gvk) {
+ return true
+ }
+ }
+ return false
+}
+
+// SetZeroValue would set the object of objPtr to zero value of its type.
+func SetZeroValue(objPtr Object) error {
+ v, err := conversion.EnforcePtr(objPtr)
+ if err != nil {
+ return err
+ }
+ v.Set(reflect.Zero(v.Type()))
+ return nil
+}
+
+// DefaultFramer is valid for any stream that can read objects serially without
+// any separation in the stream.
+var DefaultFramer = defaultFramer{}
+
+type defaultFramer struct{}
+
+func (defaultFramer) NewFrameReader(r io.ReadCloser) io.ReadCloser { return r }
+func (defaultFramer) NewFrameWriter(w io.Writer) io.Writer { return w }
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go b/vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go
new file mode 100644
index 000000000..fcb18ba11
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go
@@ -0,0 +1,251 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package runtime
+
+import (
+ "io"
+ "net/url"
+
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+const (
+ // APIVersionInternal may be used if you are registering a type that should not
+ // be considered stable or serialized - it is a convention only and has no
+ // special behavior in this package.
+ APIVersionInternal = "__internal"
+)
+
+// GroupVersioner refines a set of possible conversion targets into a single option.
+type GroupVersioner interface {
+ // KindForGroupVersionKinds returns a desired target group version kind for the given input, or returns ok false if no
+ // target is known. In general, if the return target is not in the input list, the caller is expected to invoke
+ // Scheme.New(target) and then perform a conversion between the current Go type and the destination Go type.
+ // Sophisticated implementations may use additional information about the input kinds to pick a destination kind.
+ KindForGroupVersionKinds(kinds []schema.GroupVersionKind) (target schema.GroupVersionKind, ok bool)
+}
+
+// Encoders write objects to a serialized form
+type Encoder interface {
+ // Encode writes an object to a stream. Implementations may return errors if the versions are
+ // incompatible, or if no conversion is defined.
+ Encode(obj Object, w io.Writer) error
+}
+
+// Decoders attempt to load an object from data.
+type Decoder interface {
+ // Decode attempts to deserialize the provided data using either the innate typing of the scheme or the
+ // default kind, group, and version provided. It returns a decoded object as well as the kind, group, and
+ // version from the serialized data, or an error. If into is non-nil, it will be used as the target type
+ // and implementations may choose to use it rather than reallocating an object. However, the object is not
+ // guaranteed to be populated. The returned object is not guaranteed to match into. If defaults are
+ // provided, they are applied to the data by default. If no defaults or partial defaults are provided, the
+ // type of the into may be used to guide conversion decisions.
+ Decode(data []byte, defaults *schema.GroupVersionKind, into Object) (Object, *schema.GroupVersionKind, error)
+}
+
+// Serializer is the core interface for transforming objects into a serialized format and back.
+// Implementations may choose to perform conversion of the object, but no assumptions should be made.
+type Serializer interface {
+ Encoder
+ Decoder
+}
+
+// Codec is a Serializer that deals with the details of versioning objects. It offers the same
+// interface as Serializer, so this is a marker to consumers that care about the version of the objects
+// they receive.
+type Codec Serializer
+
+// ParameterCodec defines methods for serializing and deserializing API objects to url.Values and
+// performing any necessary conversion. Unlike the normal Codec, query parameters are not self describing
+// and the desired version must be specified.
+type ParameterCodec interface {
+ // DecodeParameters takes the given url.Values in the specified group version and decodes them
+ // into the provided object, or returns an error.
+ DecodeParameters(parameters url.Values, from schema.GroupVersion, into Object) error
+ // EncodeParameters encodes the provided object as query parameters or returns an error.
+ EncodeParameters(obj Object, to schema.GroupVersion) (url.Values, error)
+}
+
+// Framer is a factory for creating readers and writers that obey a particular framing pattern.
+type Framer interface {
+ NewFrameReader(r io.ReadCloser) io.ReadCloser
+ NewFrameWriter(w io.Writer) io.Writer
+}
+
+// SerializerInfo contains information about a specific serialization format
+type SerializerInfo struct {
+ // MediaType is the value that represents this serializer over the wire.
+ MediaType string
+ // EncodesAsText indicates this serializer can be encoded to UTF-8 safely.
+ EncodesAsText bool
+ // Serializer is the individual object serializer for this media type.
+ Serializer Serializer
+ // PrettySerializer, if set, can serialize this object in a form biased towards
+ // readability.
+ PrettySerializer Serializer
+ // StreamSerializer, if set, describes the streaming serialization format
+ // for this media type.
+ StreamSerializer *StreamSerializerInfo
+}
+
+// StreamSerializerInfo contains information about a specific stream serialization format
+type StreamSerializerInfo struct {
+ // EncodesAsText indicates this serializer can be encoded to UTF-8 safely.
+ EncodesAsText bool
+ // Serializer is the top level object serializer for this type when streaming
+ Serializer
+ // Framer is the factory for retrieving streams that separate objects on the wire
+ Framer
+}
+
+// NegotiatedSerializer is an interface used for obtaining encoders, decoders, and serializers
+// for multiple supported media types. This would commonly be accepted by a server component
+// that performs HTTP content negotiation to accept multiple formats.
+type NegotiatedSerializer interface {
+ // SupportedMediaTypes is the media types supported for reading and writing single objects.
+ SupportedMediaTypes() []SerializerInfo
+
+ // EncoderForVersion returns an encoder that ensures objects being written to the provided
+ // serializer are in the provided group version.
+ EncoderForVersion(serializer Encoder, gv GroupVersioner) Encoder
+ // DecoderForVersion returns a decoder that ensures objects being read by the provided
+ // serializer are in the provided group version by default.
+ DecoderToVersion(serializer Decoder, gv GroupVersioner) Decoder
+}
+
+// StorageSerializer is an interface used for obtaining encoders, decoders, and serializers
+// that can read and write data at rest. This would commonly be used by client tools that must
+// read files, or server side storage interfaces that persist restful objects.
+type StorageSerializer interface {
+ // SupportedMediaTypes are the media types supported for reading and writing objects.
+ SupportedMediaTypes() []SerializerInfo
+
+ // UniversalDeserializer returns a Serializer that can read objects in multiple supported formats
+ // by introspecting the data at rest.
+ UniversalDeserializer() Decoder
+
+ // EncoderForVersion returns an encoder that ensures objects being written to the provided
+ // serializer are in the provided group version.
+ EncoderForVersion(serializer Encoder, gv GroupVersioner) Encoder
+ // DecoderForVersion returns a decoder that ensures objects being read by the provided
+ // serializer are in the provided group version by default.
+ DecoderToVersion(serializer Decoder, gv GroupVersioner) Decoder
+}
+
+// NestedObjectEncoder is an optional interface that objects may implement to be given
+// an opportunity to encode any nested Objects / RawExtensions during serialization.
+type NestedObjectEncoder interface {
+ EncodeNestedObjects(e Encoder) error
+}
+
+// NestedObjectDecoder is an optional interface that objects may implement to be given
+// an opportunity to decode any nested Objects / RawExtensions during serialization.
+type NestedObjectDecoder interface {
+ DecodeNestedObjects(d Decoder) error
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// Non-codec interfaces
+
+type ObjectDefaulter interface {
+ // Default takes an object (must be a pointer) and applies any default values.
+ // Defaulters may not error.
+ Default(in Object)
+}
+
+type ObjectVersioner interface {
+ ConvertToVersion(in Object, gv GroupVersioner) (out Object, err error)
+}
+
+// ObjectConvertor converts an object to a different version.
+type ObjectConvertor interface {
+ // Convert attempts to convert one object into another, or returns an error. This method does
+ // not guarantee the in object is not mutated. The context argument will be passed to
+ // all nested conversions.
+ Convert(in, out, context interface{}) error
+ // ConvertToVersion takes the provided object and converts it the provided version. This
+ // method does not guarantee that the in object is not mutated. This method is similar to
+ // Convert() but handles specific details of choosing the correct output version.
+ ConvertToVersion(in Object, gv GroupVersioner) (out Object, err error)
+ ConvertFieldLabel(version, kind, label, value string) (string, string, error)
+}
+
+// ObjectTyper contains methods for extracting the APIVersion and Kind
+// of objects.
+type ObjectTyper interface {
+ // ObjectKinds returns the all possible group,version,kind of the provided object, true if
+ // the object is unversioned, or an error if the object is not recognized
+ // (IsNotRegisteredError will return true).
+ ObjectKinds(Object) ([]schema.GroupVersionKind, bool, error)
+ // Recognizes returns true if the scheme is able to handle the provided version and kind,
+ // or more precisely that the provided version is a possible conversion or decoding
+ // target.
+ Recognizes(gvk schema.GroupVersionKind) bool
+}
+
+// ObjectCreater contains methods for instantiating an object by kind and version.
+type ObjectCreater interface {
+ New(kind schema.GroupVersionKind) (out Object, err error)
+}
+
+// ObjectCopier duplicates an object.
+type ObjectCopier interface {
+ // Copy returns an exact copy of the provided Object, or an error if the
+ // copy could not be completed.
+ Copy(Object) (Object, error)
+}
+
+// ResourceVersioner provides methods for setting and retrieving
+// the resource version from an API object.
+type ResourceVersioner interface {
+ SetResourceVersion(obj Object, version string) error
+ ResourceVersion(obj Object) (string, error)
+}
+
+// SelfLinker provides methods for setting and retrieving the SelfLink field of an API object.
+type SelfLinker interface {
+ SetSelfLink(obj Object, selfLink string) error
+ SelfLink(obj Object) (string, error)
+
+ // Knowing Name is sometimes necessary to use a SelfLinker.
+ Name(obj Object) (string, error)
+ // Knowing Namespace is sometimes necessary to use a SelfLinker
+ Namespace(obj Object) (string, error)
+}
+
+// All API types registered with Scheme must support the Object interface. Since objects in a scheme are
+// expected to be serialized to the wire, the interface an Object must provide to the Scheme allows
+// serializers to set the kind, version, and group the object is represented as. An Object may choose
+// to return a no-op ObjectKindAccessor in cases where it is not expected to be serialized.
+type Object interface {
+ GetObjectKind() schema.ObjectKind
+}
+
+// Unstructured objects store values as map[string]interface{}, with only values that can be serialized
+// to JSON allowed.
+type Unstructured interface {
+ // IsUnstructuredObject is a marker interface to allow objects that can be serialized but not introspected
+ // to bypass conversion.
+ IsUnstructuredObject()
+ // IsList returns true if this type is a list or matches the list convention - has an array called "items".
+ IsList() bool
+ // UnstructuredContent returns a non-nil, mutable map of the contents of this object. Values may be
+ // []interface{}, map[string]interface{}, or any primitive type. Contents are typically serialized to
+ // and from JSON.
+ UnstructuredContent() map[string]interface{}
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/register.go b/vendor/k8s.io/apimachinery/pkg/runtime/register.go
new file mode 100644
index 000000000..2ec6db820
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/register.go
@@ -0,0 +1,61 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package runtime
+
+import "k8s.io/apimachinery/pkg/runtime/schema"
+
+// SetGroupVersionKind satisfies the ObjectKind interface for all objects that embed TypeMeta
+func (obj *TypeMeta) SetGroupVersionKind(gvk schema.GroupVersionKind) {
+ obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind()
+}
+
+// GroupVersionKind satisfies the ObjectKind interface for all objects that embed TypeMeta
+func (obj *TypeMeta) GroupVersionKind() schema.GroupVersionKind {
+ return schema.FromAPIVersionAndKind(obj.APIVersion, obj.Kind)
+}
+
+func (obj *Unknown) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }
+
+// GetObjectKind implements Object for VersionedObjects, returning an empty ObjectKind
+// interface if no objects are provided, or the ObjectKind interface of the object in the
+// highest array position.
+func (obj *VersionedObjects) GetObjectKind() schema.ObjectKind {
+ last := obj.Last()
+ if last == nil {
+ return schema.EmptyObjectKind
+ }
+ return last.GetObjectKind()
+}
+
+// First returns the leftmost object in the VersionedObjects array, which is usually the
+// object as serialized on the wire.
+func (obj *VersionedObjects) First() Object {
+ if len(obj.Objects) == 0 {
+ return nil
+ }
+ return obj.Objects[0]
+}
+
+// Last is the rightmost object in the VersionedObjects array, which is the object after
+// all transformations have been applied. This is the same object that would be returned
+// by Decode in a normal invocation (without VersionedObjects in the into argument).
+func (obj *VersionedObjects) Last() Object {
+ if len(obj.Objects) == 0 {
+ return nil
+ }
+ return obj.Objects[len(obj.Objects)-1]
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go
new file mode 100644
index 000000000..e2cc12166
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go
@@ -0,0 +1,65 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package schema is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto
+
+ It has these top-level messages:
+*/
+package schema
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func init() {
+ proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 202 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0xce, 0xaf, 0x4e, 0x04, 0x31,
+ 0x10, 0xc7, 0xf1, 0xd6, 0x20, 0x90, 0xc8, 0x13, 0x23, 0x51, 0xd0, 0x11, 0x18, 0x34, 0x2f, 0x80,
+ 0xc7, 0x75, 0xf7, 0x86, 0x6e, 0x53, 0xfa, 0x27, 0xed, 0x94, 0x04, 0xc7, 0x23, 0xf0, 0x58, 0x27,
+ 0x4f, 0xae, 0x64, 0xcb, 0x8b, 0x90, 0xb4, 0x2b, 0x08, 0xc9, 0xb9, 0xfe, 0xd2, 0x7c, 0x26, 0xdf,
+ 0xeb, 0x67, 0xf7, 0x58, 0x94, 0x8d, 0xe8, 0xea, 0x44, 0x39, 0x10, 0x53, 0xc1, 0x77, 0x0a, 0xc7,
+ 0x98, 0x71, 0xff, 0xd0, 0xc9, 0x7a, 0x3d, 0x2f, 0x36, 0x50, 0xfe, 0xc0, 0xe4, 0x0c, 0xe6, 0x1a,
+ 0xd8, 0x7a, 0xc2, 0x32, 0x2f, 0xe4, 0x35, 0x1a, 0x0a, 0x94, 0x35, 0xd3, 0x51, 0xa5, 0x1c, 0x39,
+ 0xde, 0xdc, 0x0e, 0xa7, 0xfe, 0x3a, 0x95, 0x9c, 0x51, 0xbb, 0x53, 0xc3, 0x1d, 0xee, 0x8d, 0xe5,
+ 0xa5, 0x4e, 0x6a, 0x8e, 0x1e, 0x4d, 0x34, 0x11, 0x3b, 0x9f, 0xea, 0x6b, 0x5f, 0x7d, 0xf4, 0xd7,
+ 0x38, 0x7b, 0x78, 0xb8, 0x94, 0x53, 0xd9, 0xbe, 0xa1, 0x0d, 0x5c, 0x38, 0xff, 0x6f, 0x79, 0xba,
+ 0x3b, 0x6d, 0x20, 0xce, 0x1b, 0x88, 0x75, 0x03, 0xf1, 0xd9, 0x40, 0x9e, 0x1a, 0xc8, 0x73, 0x03,
+ 0xb9, 0x36, 0x90, 0xdf, 0x0d, 0xe4, 0xd7, 0x0f, 0x88, 0x97, 0xab, 0x51, 0xf4, 0x1b, 0x00, 0x00,
+ 0xff, 0xff, 0xfd, 0x59, 0x57, 0x93, 0x0b, 0x01, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto b/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto
new file mode 100644
index 000000000..ebc1a263d
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto
@@ -0,0 +1,28 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.apimachinery.pkg.runtime.schema;
+
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "schema";
+
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version.go b/vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version.go
new file mode 100644
index 000000000..1a9bba106
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version.go
@@ -0,0 +1,277 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package schema
+
+import (
+ "fmt"
+ "strings"
+)
+
+// ParseResourceArg takes the common style of string which may be either `resource.group.com` or `resource.version.group.com`
+// and parses it out into both possibilities. This code takes no responsibility for knowing which representation was intended
+// but with a knowledge of all GroupVersions, calling code can take a very good guess. If there are only two segments, then
+// `*GroupVersionResource` is nil.
+// `resource.group.com` -> `group=com, version=group, resource=resource` and `group=group.com, resource=resource`
+func ParseResourceArg(arg string) (*GroupVersionResource, GroupResource) {
+ var gvr *GroupVersionResource
+ if strings.Count(arg, ".") >= 2 {
+ s := strings.SplitN(arg, ".", 3)
+ gvr = &GroupVersionResource{Group: s[2], Version: s[1], Resource: s[0]}
+ }
+
+ return gvr, ParseGroupResource(arg)
+}
+
+// GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying
+// concepts during lookup stages without having partially valid types
+type GroupResource struct {
+ Group string
+ Resource string
+}
+
+func (gr GroupResource) WithVersion(version string) GroupVersionResource {
+ return GroupVersionResource{Group: gr.Group, Version: version, Resource: gr.Resource}
+}
+
+func (gr GroupResource) Empty() bool {
+ return len(gr.Group) == 0 && len(gr.Resource) == 0
+}
+
+func (gr *GroupResource) String() string {
+ if len(gr.Group) == 0 {
+ return gr.Resource
+ }
+ return gr.Resource + "." + gr.Group
+}
+
+// ParseGroupResource turns "resource.group" string into a GroupResource struct. Empty strings are allowed
+// for each field.
+func ParseGroupResource(gr string) GroupResource {
+ if i := strings.Index(gr, "."); i == -1 {
+ return GroupResource{Resource: gr}
+ } else {
+ return GroupResource{Group: gr[i+1:], Resource: gr[:i]}
+ }
+}
+
+// GroupVersionResource unambiguously identifies a resource. It doesn't anonymously include GroupVersion
+// to avoid automatic coercion. It doesn't use a GroupVersion to avoid custom marshalling
+type GroupVersionResource struct {
+ Group string
+ Version string
+ Resource string
+}
+
+func (gvr GroupVersionResource) Empty() bool {
+ return len(gvr.Group) == 0 && len(gvr.Version) == 0 && len(gvr.Resource) == 0
+}
+
+func (gvr GroupVersionResource) GroupResource() GroupResource {
+ return GroupResource{Group: gvr.Group, Resource: gvr.Resource}
+}
+
+func (gvr GroupVersionResource) GroupVersion() GroupVersion {
+ return GroupVersion{Group: gvr.Group, Version: gvr.Version}
+}
+
+func (gvr *GroupVersionResource) String() string {
+ return strings.Join([]string{gvr.Group, "/", gvr.Version, ", Resource=", gvr.Resource}, "")
+}
+
+// GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying
+// concepts during lookup stages without having partially valid types
+type GroupKind struct {
+ Group string
+ Kind string
+}
+
+func (gk GroupKind) Empty() bool {
+ return len(gk.Group) == 0 && len(gk.Kind) == 0
+}
+
+func (gk GroupKind) WithVersion(version string) GroupVersionKind {
+ return GroupVersionKind{Group: gk.Group, Version: version, Kind: gk.Kind}
+}
+
+func (gk *GroupKind) String() string {
+ if len(gk.Group) == 0 {
+ return gk.Kind
+ }
+ return gk.Kind + "." + gk.Group
+}
+
+// GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion
+// to avoid automatic coercion. It doesn't use a GroupVersion to avoid custom marshalling
+type GroupVersionKind struct {
+ Group string
+ Version string
+ Kind string
+}
+
+// Empty returns true if group, version, and kind are empty
+func (gvk GroupVersionKind) Empty() bool {
+ return len(gvk.Group) == 0 && len(gvk.Version) == 0 && len(gvk.Kind) == 0
+}
+
+func (gvk GroupVersionKind) GroupKind() GroupKind {
+ return GroupKind{Group: gvk.Group, Kind: gvk.Kind}
+}
+
+func (gvk GroupVersionKind) GroupVersion() GroupVersion {
+ return GroupVersion{Group: gvk.Group, Version: gvk.Version}
+}
+
+func (gvk GroupVersionKind) String() string {
+ return gvk.Group + "/" + gvk.Version + ", Kind=" + gvk.Kind
+}
+
+// GroupVersion contains the "group" and the "version", which uniquely identifies the API.
+type GroupVersion struct {
+ Group string
+ Version string
+}
+
+// Empty returns true if group and version are empty
+func (gv GroupVersion) Empty() bool {
+ return len(gv.Group) == 0 && len(gv.Version) == 0
+}
+
+// String puts "group" and "version" into a single "group/version" string. For the legacy v1
+// it returns "v1".
+func (gv GroupVersion) String() string {
+ // special case the internal apiVersion for the legacy kube types
+ if gv.Empty() {
+ return ""
+ }
+
+ // special case of "v1" for backward compatibility
+ if len(gv.Group) == 0 && gv.Version == "v1" {
+ return gv.Version
+ }
+ if len(gv.Group) > 0 {
+ return gv.Group + "/" + gv.Version
+ }
+ return gv.Version
+}
+
+// KindForGroupVersionKinds identifies the preferred GroupVersionKind out of a list. It returns ok false
+// if none of the options match the group. It prefers a match to group and version over just group.
+// TODO: Move GroupVersion to a package under pkg/runtime, since it's used by scheme.
+// TODO: Introduce an adapter type between GroupVersion and runtime.GroupVersioner, and use LegacyCodec(GroupVersion)
+// in fewer places.
+func (gv GroupVersion) KindForGroupVersionKinds(kinds []GroupVersionKind) (target GroupVersionKind, ok bool) {
+ for _, gvk := range kinds {
+ if gvk.Group == gv.Group && gvk.Version == gv.Version {
+ return gvk, true
+ }
+ }
+ for _, gvk := range kinds {
+ if gvk.Group == gv.Group {
+ return gv.WithKind(gvk.Kind), true
+ }
+ }
+ return GroupVersionKind{}, false
+}
+
+// ParseGroupVersion turns "group/version" string into a GroupVersion struct. It reports error
+// if it cannot parse the string.
+func ParseGroupVersion(gv string) (GroupVersion, error) {
+ // this can be the internal version for the legacy kube types
+ // TODO once we've cleared the last uses as strings, this special case should be removed.
+ if (len(gv) == 0) || (gv == "/") {
+ return GroupVersion{}, nil
+ }
+
+ switch strings.Count(gv, "/") {
+ case 0:
+ return GroupVersion{"", gv}, nil
+ case 1:
+ i := strings.Index(gv, "/")
+ return GroupVersion{gv[:i], gv[i+1:]}, nil
+ default:
+ return GroupVersion{}, fmt.Errorf("unexpected GroupVersion string: %v", gv)
+ }
+}
+
+// WithKind creates a GroupVersionKind based on the method receiver's GroupVersion and the passed Kind.
+func (gv GroupVersion) WithKind(kind string) GroupVersionKind {
+ return GroupVersionKind{Group: gv.Group, Version: gv.Version, Kind: kind}
+}
+
+// WithResource creates a GroupVersionResource based on the method receiver's GroupVersion and the passed Resource.
+func (gv GroupVersion) WithResource(resource string) GroupVersionResource {
+ return GroupVersionResource{Group: gv.Group, Version: gv.Version, Resource: resource}
+}
+
+// GroupVersions can be used to represent a set of desired group versions.
+// TODO: Move GroupVersions to a package under pkg/runtime, since it's used by scheme.
+// TODO: Introduce an adapter type between GroupVersions and runtime.GroupVersioner, and use LegacyCodec(GroupVersion)
+// in fewer places.
+type GroupVersions []GroupVersion
+
+// KindForGroupVersionKinds identifies the preferred GroupVersionKind out of a list. It returns ok false
+// if none of the options match the group.
+func (gvs GroupVersions) KindForGroupVersionKinds(kinds []GroupVersionKind) (GroupVersionKind, bool) {
+ var targets []GroupVersionKind
+ for _, gv := range gvs {
+ target, ok := gv.KindForGroupVersionKinds(kinds)
+ if !ok {
+ continue
+ }
+ targets = append(targets, target)
+ }
+ if len(targets) == 1 {
+ return targets[0], true
+ }
+ if len(targets) > 1 {
+ return bestMatch(kinds, targets), true
+ }
+ return GroupVersionKind{}, false
+}
+
+// bestMatch tries to pick best matching GroupVersionKind and falls back to the first
+// found if no exact match exists.
+func bestMatch(kinds []GroupVersionKind, targets []GroupVersionKind) GroupVersionKind {
+ for _, gvk := range targets {
+ for _, k := range kinds {
+ if k == gvk {
+ return k
+ }
+ }
+ }
+ return targets[0]
+}
+
+// ToAPIVersionAndKind is a convenience method for satisfying runtime.Object on types that
+// do not use TypeMeta.
+func (gvk *GroupVersionKind) ToAPIVersionAndKind() (string, string) {
+ if gvk == nil {
+ return "", ""
+ }
+ return gvk.GroupVersion().String(), gvk.Kind
+}
+
+// FromAPIVersionAndKind returns a GVK representing the provided fields for types that
+// do not use TypeMeta. This method exists to support test types and legacy serializations
+// that have a distinct group and kind.
+// TODO: further reduce usage of this method.
+func FromAPIVersionAndKind(apiVersion, kind string) GroupVersionKind {
+ if gv, err := ParseGroupVersion(apiVersion); err == nil {
+ return GroupVersionKind{Group: gv.Group, Version: gv.Version, Kind: kind}
+ }
+ return GroupVersionKind{Kind: kind}
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/schema/interfaces.go b/vendor/k8s.io/apimachinery/pkg/runtime/schema/interfaces.go
new file mode 100644
index 000000000..b57066845
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/schema/interfaces.go
@@ -0,0 +1,40 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package schema
+
+// All objects that are serialized from a Scheme encode their type information. This interface is used
+// by serialization to set type information from the Scheme onto the serialized version of an object.
+// For objects that cannot be serialized or have unique requirements, this interface may be a no-op.
+type ObjectKind interface {
+ // SetGroupVersionKind sets or clears the intended serialized kind of an object. Passing kind nil
+ // should clear the current setting.
+ SetGroupVersionKind(kind GroupVersionKind)
+ // GroupVersionKind returns the stored group, version, and kind of an object, or nil if the object does
+ // not expose or provide these fields.
+ GroupVersionKind() GroupVersionKind
+}
+
+// EmptyObjectKind implements the ObjectKind interface as a noop
+var EmptyObjectKind = emptyObjectKind{}
+
+type emptyObjectKind struct{}
+
+// SetGroupVersionKind implements the ObjectKind interface
+func (emptyObjectKind) SetGroupVersionKind(gvk GroupVersionKind) {}
+
+// GroupVersionKind implements the ObjectKind interface
+func (emptyObjectKind) GroupVersionKind() GroupVersionKind { return GroupVersionKind{} }
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go b/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go
new file mode 100644
index 000000000..6c9475fa0
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go
@@ -0,0 +1,577 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package runtime
+
+import (
+ "fmt"
+ "net/url"
+ "reflect"
+
+ "k8s.io/apimachinery/pkg/conversion"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// Scheme defines methods for serializing and deserializing API objects, a type
+// registry for converting group, version, and kind information to and from Go
+// schemas, and mappings between Go schemas of different versions. A scheme is the
+// foundation for a versioned API and versioned configuration over time.
+//
+// In a Scheme, a Type is a particular Go struct, a Version is a point-in-time
+// identifier for a particular representation of that Type (typically backwards
+// compatible), a Kind is the unique name for that Type within the Version, and a
+// Group identifies a set of Versions, Kinds, and Types that evolve over time. An
+// Unversioned Type is one that is not yet formally bound to a type and is promised
+// to be backwards compatible (effectively a "v1" of a Type that does not expect
+// to break in the future).
+//
+// Schemes are not expected to change at runtime and are only threadsafe after
+// registration is complete.
+type Scheme struct {
+ // versionMap allows one to figure out the go type of an object with
+ // the given version and name.
+ gvkToType map[schema.GroupVersionKind]reflect.Type
+
+ // typeToGroupVersion allows one to find metadata for a given go object.
+ // The reflect.Type we index by should *not* be a pointer.
+ typeToGVK map[reflect.Type][]schema.GroupVersionKind
+
+ // unversionedTypes are transformed without conversion in ConvertToVersion.
+ unversionedTypes map[reflect.Type]schema.GroupVersionKind
+
+ // unversionedKinds are the names of kinds that can be created in the context of any group
+ // or version
+ // TODO: resolve the status of unversioned types.
+ unversionedKinds map[string]reflect.Type
+
+ // Map from version and resource to the corresponding func to convert
+ // resource field labels in that version to internal version.
+ fieldLabelConversionFuncs map[string]map[string]FieldLabelConversionFunc
+
+ // defaulterFuncs is an array of interfaces to be called with an object to provide defaulting
+ // the provided object must be a pointer.
+ defaulterFuncs map[reflect.Type]func(interface{})
+
+ // converter stores all registered conversion functions. It also has
+ // default coverting behavior.
+ converter *conversion.Converter
+
+ // cloner stores all registered copy functions. It also has default
+ // deep copy behavior.
+ cloner *conversion.Cloner
+}
+
+// Function to convert a field selector to internal representation.
+type FieldLabelConversionFunc func(label, value string) (internalLabel, internalValue string, err error)
+
+// NewScheme creates a new Scheme. This scheme is pluggable by default.
+func NewScheme() *Scheme {
+ s := &Scheme{
+ gvkToType: map[schema.GroupVersionKind]reflect.Type{},
+ typeToGVK: map[reflect.Type][]schema.GroupVersionKind{},
+ unversionedTypes: map[reflect.Type]schema.GroupVersionKind{},
+ unversionedKinds: map[string]reflect.Type{},
+ cloner: conversion.NewCloner(),
+ fieldLabelConversionFuncs: map[string]map[string]FieldLabelConversionFunc{},
+ defaulterFuncs: map[reflect.Type]func(interface{}){},
+ }
+ s.converter = conversion.NewConverter(s.nameFunc)
+
+ s.AddConversionFuncs(DefaultEmbeddedConversions()...)
+
+ // Enable map[string][]string conversions by default
+ if err := s.AddConversionFuncs(DefaultStringConversions...); err != nil {
+ panic(err)
+ }
+ if err := s.RegisterInputDefaults(&map[string][]string{}, JSONKeyMapper, conversion.AllowDifferentFieldTypeNames|conversion.IgnoreMissingFields); err != nil {
+ panic(err)
+ }
+ if err := s.RegisterInputDefaults(&url.Values{}, JSONKeyMapper, conversion.AllowDifferentFieldTypeNames|conversion.IgnoreMissingFields); err != nil {
+ panic(err)
+ }
+ return s
+}
+
+// nameFunc returns the name of the type that we wish to use to determine when two types attempt
+// a conversion. Defaults to the go name of the type if the type is not registered.
+func (s *Scheme) nameFunc(t reflect.Type) string {
+ // find the preferred names for this type
+ gvks, ok := s.typeToGVK[t]
+ if !ok {
+ return t.Name()
+ }
+
+ for _, gvk := range gvks {
+ internalGV := gvk.GroupVersion()
+ internalGV.Version = "__internal" // this is hacky and maybe should be passed in
+ internalGVK := internalGV.WithKind(gvk.Kind)
+
+ if internalType, exists := s.gvkToType[internalGVK]; exists {
+ return s.typeToGVK[internalType][0].Kind
+ }
+ }
+
+ return gvks[0].Kind
+}
+
+// fromScope gets the input version, desired output version, and desired Scheme
+// from a conversion.Scope.
+func (s *Scheme) fromScope(scope conversion.Scope) *Scheme {
+ return s
+}
+
+// Converter allows access to the converter for the scheme
+func (s *Scheme) Converter() *conversion.Converter {
+ return s.converter
+}
+
+// AddUnversionedTypes registers the provided types as "unversioned", which means that they follow special rules.
+// Whenever an object of this type is serialized, it is serialized with the provided group version and is not
+// converted. Thus unversioned objects are expected to remain backwards compatible forever, as if they were in an
+// API group and version that would never be updated.
+//
+// TODO: there is discussion about removing unversioned and replacing it with objects that are manifest into
+// every version with particular schemas. Resolve this method at that point.
+func (s *Scheme) AddUnversionedTypes(version schema.GroupVersion, types ...Object) {
+ s.AddKnownTypes(version, types...)
+ for _, obj := range types {
+ t := reflect.TypeOf(obj).Elem()
+ gvk := version.WithKind(t.Name())
+ s.unversionedTypes[t] = gvk
+ if old, ok := s.unversionedKinds[gvk.Kind]; ok && t != old {
+ panic(fmt.Sprintf("%v.%v has already been registered as unversioned kind %q - kind name must be unique", old.PkgPath(), old.Name(), gvk))
+ }
+ s.unversionedKinds[gvk.Kind] = t
+ }
+}
+
+// AddKnownTypes registers all types passed in 'types' as being members of version 'version'.
+// All objects passed to types should be pointers to structs. The name that go reports for
+// the struct becomes the "kind" field when encoding. Version may not be empty - use the
+// APIVersionInternal constant if you have a type that does not have a formal version.
+func (s *Scheme) AddKnownTypes(gv schema.GroupVersion, types ...Object) {
+ for _, obj := range types {
+ t := reflect.TypeOf(obj)
+ if t.Kind() != reflect.Ptr {
+ panic("All types must be pointers to structs.")
+ }
+ t = t.Elem()
+ s.AddKnownTypeWithName(gv.WithKind(t.Name()), obj)
+ }
+}
+
+// AddKnownTypeWithName is like AddKnownTypes, but it lets you specify what this type should
+// be encoded as. Useful for testing when you don't want to make multiple packages to define
+// your structs. Version may not be empty - use the APIVersionInternal constant if you have a
+// type that does not have a formal version.
+func (s *Scheme) AddKnownTypeWithName(gvk schema.GroupVersionKind, obj Object) {
+ t := reflect.TypeOf(obj)
+ if len(gvk.Version) == 0 {
+ panic(fmt.Sprintf("version is required on all types: %s %v", gvk, t))
+ }
+ if t.Kind() != reflect.Ptr {
+ panic("All types must be pointers to structs.")
+ }
+ t = t.Elem()
+ if t.Kind() != reflect.Struct {
+ panic("All types must be pointers to structs.")
+ }
+
+ if oldT, found := s.gvkToType[gvk]; found && oldT != t {
+ panic(fmt.Sprintf("Double registration of different types for %v: old=%v.%v, new=%v.%v", gvk, oldT.PkgPath(), oldT.Name(), t.PkgPath(), t.Name()))
+ }
+
+ s.gvkToType[gvk] = t
+
+ for _, existingGvk := range s.typeToGVK[t] {
+ if existingGvk == gvk {
+ return
+ }
+ }
+ s.typeToGVK[t] = append(s.typeToGVK[t], gvk)
+}
+
+// KnownTypes returns the types known for the given version.
+func (s *Scheme) KnownTypes(gv schema.GroupVersion) map[string]reflect.Type {
+ types := make(map[string]reflect.Type)
+ for gvk, t := range s.gvkToType {
+ if gv != gvk.GroupVersion() {
+ continue
+ }
+
+ types[gvk.Kind] = t
+ }
+ return types
+}
+
+// AllKnownTypes returns the all known types.
+func (s *Scheme) AllKnownTypes() map[schema.GroupVersionKind]reflect.Type {
+ return s.gvkToType
+}
+
+// ObjectKind returns the group,version,kind of the go object and true if this object
+// is considered unversioned, or an error if it's not a pointer or is unregistered.
+func (s *Scheme) ObjectKind(obj Object) (schema.GroupVersionKind, bool, error) {
+ gvks, unversionedType, err := s.ObjectKinds(obj)
+ if err != nil {
+ return schema.GroupVersionKind{}, false, err
+ }
+ return gvks[0], unversionedType, nil
+}
+
+// ObjectKinds returns all possible group,version,kind of the go object, true if the
+// object is considered unversioned, or an error if it's not a pointer or is unregistered.
+func (s *Scheme) ObjectKinds(obj Object) ([]schema.GroupVersionKind, bool, error) {
+ v, err := conversion.EnforcePtr(obj)
+ if err != nil {
+ return nil, false, err
+ }
+ t := v.Type()
+
+ gvks, ok := s.typeToGVK[t]
+ if !ok {
+ return nil, false, NewNotRegisteredErrForType(t)
+ }
+ _, unversionedType := s.unversionedTypes[t]
+
+ return gvks, unversionedType, nil
+}
+
+// Recognizes returns true if the scheme is able to handle the provided group,version,kind
+// of an object.
+func (s *Scheme) Recognizes(gvk schema.GroupVersionKind) bool {
+ _, exists := s.gvkToType[gvk]
+ return exists
+}
+
+func (s *Scheme) IsUnversioned(obj Object) (bool, bool) {
+ v, err := conversion.EnforcePtr(obj)
+ if err != nil {
+ return false, false
+ }
+ t := v.Type()
+
+ if _, ok := s.typeToGVK[t]; !ok {
+ return false, false
+ }
+ _, ok := s.unversionedTypes[t]
+ return ok, true
+}
+
+// New returns a new API object of the given version and name, or an error if it hasn't
+// been registered. The version and kind fields must be specified.
+func (s *Scheme) New(kind schema.GroupVersionKind) (Object, error) {
+ if t, exists := s.gvkToType[kind]; exists {
+ return reflect.New(t).Interface().(Object), nil
+ }
+
+ if t, exists := s.unversionedKinds[kind.Kind]; exists {
+ return reflect.New(t).Interface().(Object), nil
+ }
+ return nil, NewNotRegisteredErrForKind(kind)
+}
+
+// AddGenericConversionFunc adds a function that accepts the ConversionFunc call pattern
+// (for two conversion types) to the converter. These functions are checked first during
+// a normal conversion, but are otherwise not called. Use AddConversionFuncs when registering
+// typed conversions.
+func (s *Scheme) AddGenericConversionFunc(fn conversion.GenericConversionFunc) {
+ s.converter.AddGenericConversionFunc(fn)
+}
+
+// Log sets a logger on the scheme. For test purposes only
+func (s *Scheme) Log(l conversion.DebugLogger) {
+ s.converter.Debug = l
+}
+
+// AddIgnoredConversionType identifies a pair of types that should be skipped by
+// conversion (because the data inside them is explicitly dropped during
+// conversion).
+func (s *Scheme) AddIgnoredConversionType(from, to interface{}) error {
+ return s.converter.RegisterIgnoredConversion(from, to)
+}
+
+// AddConversionFuncs adds functions to the list of conversion functions. The given
+// functions should know how to convert between two of your API objects, or their
+// sub-objects. We deduce how to call these functions from the types of their two
+// parameters; see the comment for Converter.Register.
+//
+// Note that, if you need to copy sub-objects that didn't change, you can use the
+// conversion.Scope object that will be passed to your conversion function.
+// Additionally, all conversions started by Scheme will set the SrcVersion and
+// DestVersion fields on the Meta object. Example:
+//
+// s.AddConversionFuncs(
+// func(in *InternalObject, out *ExternalObject, scope conversion.Scope) error {
+// // You can depend on Meta() being non-nil, and this being set to
+// // the source version, e.g., ""
+// s.Meta().SrcVersion
+// // You can depend on this being set to the destination version,
+// // e.g., "v1".
+// s.Meta().DestVersion
+// // Call scope.Convert to copy sub-fields.
+// s.Convert(&in.SubFieldThatMoved, &out.NewLocation.NewName, 0)
+// return nil
+// },
+// )
+//
+// (For more detail about conversion functions, see Converter.Register's comment.)
+//
+// Also note that the default behavior, if you don't add a conversion function, is to
+// sanely copy fields that have the same names and same type names. It's OK if the
+// destination type has extra fields, but it must not remove any. So you only need to
+// add conversion functions for things with changed/removed fields.
+func (s *Scheme) AddConversionFuncs(conversionFuncs ...interface{}) error {
+ for _, f := range conversionFuncs {
+ if err := s.converter.RegisterConversionFunc(f); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// Similar to AddConversionFuncs, but registers conversion functions that were
+// automatically generated.
+func (s *Scheme) AddGeneratedConversionFuncs(conversionFuncs ...interface{}) error {
+ for _, f := range conversionFuncs {
+ if err := s.converter.RegisterGeneratedConversionFunc(f); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// AddDeepCopyFuncs adds a function to the list of deep-copy functions.
+// For the expected format of deep-copy function, see the comment for
+// Copier.RegisterDeepCopyFunction.
+func (s *Scheme) AddDeepCopyFuncs(deepCopyFuncs ...interface{}) error {
+ for _, f := range deepCopyFuncs {
+ if err := s.cloner.RegisterDeepCopyFunc(f); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// Similar to AddDeepCopyFuncs, but registers deep-copy functions that were
+// automatically generated.
+func (s *Scheme) AddGeneratedDeepCopyFuncs(deepCopyFuncs ...conversion.GeneratedDeepCopyFunc) error {
+ for _, fn := range deepCopyFuncs {
+ if err := s.cloner.RegisterGeneratedDeepCopyFunc(fn); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// AddFieldLabelConversionFunc adds a conversion function to convert field selectors
+// of the given kind from the given version to internal version representation.
+func (s *Scheme) AddFieldLabelConversionFunc(version, kind string, conversionFunc FieldLabelConversionFunc) error {
+ if s.fieldLabelConversionFuncs[version] == nil {
+ s.fieldLabelConversionFuncs[version] = map[string]FieldLabelConversionFunc{}
+ }
+
+ s.fieldLabelConversionFuncs[version][kind] = conversionFunc
+ return nil
+}
+
+// AddStructFieldConversion allows you to specify a mechanical copy for a moved
+// or renamed struct field without writing an entire conversion function. See
+// the comment in conversion.Converter.SetStructFieldCopy for parameter details.
+// Call as many times as needed, even on the same fields.
+func (s *Scheme) AddStructFieldConversion(srcFieldType interface{}, srcFieldName string, destFieldType interface{}, destFieldName string) error {
+ return s.converter.SetStructFieldCopy(srcFieldType, srcFieldName, destFieldType, destFieldName)
+}
+
+// RegisterInputDefaults sets the provided field mapping function and field matching
+// as the defaults for the provided input type. The fn may be nil, in which case no
+// mapping will happen by default. Use this method to register a mechanism for handling
+// a specific input type in conversion, such as a map[string]string to structs.
+func (s *Scheme) RegisterInputDefaults(in interface{}, fn conversion.FieldMappingFunc, defaultFlags conversion.FieldMatchingFlags) error {
+ return s.converter.RegisterInputDefaults(in, fn, defaultFlags)
+}
+
+// AddTypeDefaultingFuncs registers a function that is passed a pointer to an
+// object and can default fields on the object. These functions will be invoked
+// when Default() is called. The function will never be called unless the
+// defaulted object matches srcType. If this function is invoked twice with the
+// same srcType, the fn passed to the later call will be used instead.
+func (s *Scheme) AddTypeDefaultingFunc(srcType Object, fn func(interface{})) {
+ s.defaulterFuncs[reflect.TypeOf(srcType)] = fn
+}
+
+// Default sets defaults on the provided Object.
+func (s *Scheme) Default(src Object) {
+ if fn, ok := s.defaulterFuncs[reflect.TypeOf(src)]; ok {
+ fn(src)
+ }
+}
+
+// Copy does a deep copy of an API object.
+func (s *Scheme) Copy(src Object) (Object, error) {
+ dst, err := s.DeepCopy(src)
+ if err != nil {
+ return nil, err
+ }
+ return dst.(Object), nil
+}
+
+// Performs a deep copy of the given object.
+func (s *Scheme) DeepCopy(src interface{}) (interface{}, error) {
+ return s.cloner.DeepCopy(src)
+}
+
+// Convert will attempt to convert in into out. Both must be pointers. For easy
+// testing of conversion functions. Returns an error if the conversion isn't
+// possible. You can call this with types that haven't been registered (for example,
+// a to test conversion of types that are nested within registered types). The
+// context interface is passed to the convertor.
+// TODO: identify whether context should be hidden, or behind a formal context/scope
+// interface
+func (s *Scheme) Convert(in, out interface{}, context interface{}) error {
+ flags, meta := s.generateConvertMeta(in)
+ meta.Context = context
+ if flags == 0 {
+ flags = conversion.AllowDifferentFieldTypeNames
+ }
+ return s.converter.Convert(in, out, flags, meta)
+}
+
+// Converts the given field label and value for an kind field selector from
+// versioned representation to an unversioned one.
+func (s *Scheme) ConvertFieldLabel(version, kind, label, value string) (string, string, error) {
+ if s.fieldLabelConversionFuncs[version] == nil {
+ return "", "", fmt.Errorf("No field label conversion function found for version: %s", version)
+ }
+ conversionFunc, ok := s.fieldLabelConversionFuncs[version][kind]
+ if !ok {
+ return "", "", fmt.Errorf("No field label conversion function found for version %s and kind %s", version, kind)
+ }
+ return conversionFunc(label, value)
+}
+
+// ConvertToVersion attempts to convert an input object to its matching Kind in another
+// version within this scheme. Will return an error if the provided version does not
+// contain the inKind (or a mapping by name defined with AddKnownTypeWithName). Will also
+// return an error if the conversion does not result in a valid Object being
+// returned. Passes target down to the conversion methods as the Context on the scope.
+func (s *Scheme) ConvertToVersion(in Object, target GroupVersioner) (Object, error) {
+ return s.convertToVersion(true, in, target)
+}
+
+// UnsafeConvertToVersion will convert in to the provided target if such a conversion is possible,
+// but does not guarantee the output object does not share fields with the input object. It attempts to be as
+// efficient as possible when doing conversion.
+func (s *Scheme) UnsafeConvertToVersion(in Object, target GroupVersioner) (Object, error) {
+ return s.convertToVersion(false, in, target)
+}
+
+// convertToVersion handles conversion with an optional copy.
+func (s *Scheme) convertToVersion(copy bool, in Object, target GroupVersioner) (Object, error) {
+ // determine the incoming kinds with as few allocations as possible.
+ t := reflect.TypeOf(in)
+ if t.Kind() != reflect.Ptr {
+ return nil, fmt.Errorf("only pointer types may be converted: %v", t)
+ }
+ t = t.Elem()
+ if t.Kind() != reflect.Struct {
+ return nil, fmt.Errorf("only pointers to struct types may be converted: %v", t)
+ }
+ kinds, ok := s.typeToGVK[t]
+ if !ok || len(kinds) == 0 {
+ return nil, NewNotRegisteredErrForType(t)
+ }
+
+ gvk, ok := target.KindForGroupVersionKinds(kinds)
+ if !ok {
+ // try to see if this type is listed as unversioned (for legacy support)
+ // TODO: when we move to server API versions, we should completely remove the unversioned concept
+ if unversionedKind, ok := s.unversionedTypes[t]; ok {
+ if gvk, ok := target.KindForGroupVersionKinds([]schema.GroupVersionKind{unversionedKind}); ok {
+ return copyAndSetTargetKind(copy, s, in, gvk)
+ }
+ return copyAndSetTargetKind(copy, s, in, unversionedKind)
+ }
+
+ return nil, NewNotRegisteredErrForTarget(t, target)
+ }
+
+ // target wants to use the existing type, set kind and return (no conversion necessary)
+ for _, kind := range kinds {
+ if gvk == kind {
+ return copyAndSetTargetKind(copy, s, in, gvk)
+ }
+ }
+
+ // type is unversioned, no conversion necessary
+ if unversionedKind, ok := s.unversionedTypes[t]; ok {
+ if gvk, ok := target.KindForGroupVersionKinds([]schema.GroupVersionKind{unversionedKind}); ok {
+ return copyAndSetTargetKind(copy, s, in, gvk)
+ }
+ return copyAndSetTargetKind(copy, s, in, unversionedKind)
+ }
+
+ out, err := s.New(gvk)
+ if err != nil {
+ return nil, err
+ }
+
+ if copy {
+ copied, err := s.Copy(in)
+ if err != nil {
+ return nil, err
+ }
+ in = copied
+ }
+
+ flags, meta := s.generateConvertMeta(in)
+ meta.Context = target
+ if err := s.converter.Convert(in, out, flags, meta); err != nil {
+ return nil, err
+ }
+
+ setTargetKind(out, gvk)
+ return out, nil
+}
+
+// generateConvertMeta constructs the meta value we pass to Convert.
+func (s *Scheme) generateConvertMeta(in interface{}) (conversion.FieldMatchingFlags, *conversion.Meta) {
+ return s.converter.DefaultMeta(reflect.TypeOf(in))
+}
+
+// copyAndSetTargetKind performs a conditional copy before returning the object, or an error if copy was not successful.
+func copyAndSetTargetKind(copy bool, copier ObjectCopier, obj Object, kind schema.GroupVersionKind) (Object, error) {
+ if copy {
+ copied, err := copier.Copy(obj)
+ if err != nil {
+ return nil, err
+ }
+ obj = copied
+ }
+ setTargetKind(obj, kind)
+ return obj, nil
+}
+
+// setTargetKind sets the kind on an object, taking into account whether the target kind is the internal version.
+func setTargetKind(obj Object, kind schema.GroupVersionKind) {
+ if kind.Version == APIVersionInternal {
+ // internal is a special case
+ // TODO: look at removing the need to special case this
+ obj.GetObjectKind().SetGroupVersionKind(schema.GroupVersionKind{})
+ return
+ }
+ obj.GetObjectKind().SetGroupVersionKind(kind)
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/scheme_builder.go b/vendor/k8s.io/apimachinery/pkg/runtime/scheme_builder.go
new file mode 100644
index 000000000..944db4818
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/scheme_builder.go
@@ -0,0 +1,48 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package runtime
+
+// SchemeBuilder collects functions that add things to a scheme. It's to allow
+// code to compile without explicitly referencing generated types. You should
+// declare one in each package that will have generated deep copy or conversion
+// functions.
+type SchemeBuilder []func(*Scheme) error
+
+// AddToScheme applies all the stored functions to the scheme. A non-nil error
+// indicates that one function failed and the attempt was abandoned.
+func (sb *SchemeBuilder) AddToScheme(s *Scheme) error {
+ for _, f := range *sb {
+ if err := f(s); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// Register adds a scheme setup function to the list.
+func (sb *SchemeBuilder) Register(funcs ...func(*Scheme) error) {
+ for _, f := range funcs {
+ *sb = append(*sb, f)
+ }
+}
+
+// NewSchemeBuilder calls Register for you.
+func NewSchemeBuilder(funcs ...func(*Scheme) error) SchemeBuilder {
+ var sb SchemeBuilder
+ sb.Register(funcs...)
+ return sb
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_factory.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_factory.go
new file mode 100644
index 000000000..65f451124
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_factory.go
@@ -0,0 +1,237 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package serializer
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/runtime/serializer/json"
+ "k8s.io/apimachinery/pkg/runtime/serializer/recognizer"
+ "k8s.io/apimachinery/pkg/runtime/serializer/versioning"
+)
+
+// serializerExtensions are for serializers that are conditionally compiled in
+var serializerExtensions = []func(*runtime.Scheme) (serializerType, bool){}
+
+type serializerType struct {
+ AcceptContentTypes []string
+ ContentType string
+ FileExtensions []string
+ // EncodesAsText should be true if this content type can be represented safely in UTF-8
+ EncodesAsText bool
+
+ Serializer runtime.Serializer
+ PrettySerializer runtime.Serializer
+
+ AcceptStreamContentTypes []string
+ StreamContentType string
+
+ Framer runtime.Framer
+ StreamSerializer runtime.Serializer
+}
+
+func newSerializersForScheme(scheme *runtime.Scheme, mf json.MetaFactory) []serializerType {
+ jsonSerializer := json.NewSerializer(mf, scheme, scheme, false)
+ jsonPrettySerializer := json.NewSerializer(mf, scheme, scheme, true)
+ yamlSerializer := json.NewYAMLSerializer(mf, scheme, scheme)
+
+ serializers := []serializerType{
+ {
+ AcceptContentTypes: []string{"application/json"},
+ ContentType: "application/json",
+ FileExtensions: []string{"json"},
+ EncodesAsText: true,
+ Serializer: jsonSerializer,
+ PrettySerializer: jsonPrettySerializer,
+
+ Framer: json.Framer,
+ StreamSerializer: jsonSerializer,
+ },
+ {
+ AcceptContentTypes: []string{"application/yaml"},
+ ContentType: "application/yaml",
+ FileExtensions: []string{"yaml"},
+ EncodesAsText: true,
+ Serializer: yamlSerializer,
+ },
+ }
+
+ for _, fn := range serializerExtensions {
+ if serializer, ok := fn(scheme); ok {
+ serializers = append(serializers, serializer)
+ }
+ }
+ return serializers
+}
+
+// CodecFactory provides methods for retrieving codecs and serializers for specific
+// versions and content types.
+type CodecFactory struct {
+ scheme *runtime.Scheme
+ serializers []serializerType
+ universal runtime.Decoder
+ accepts []runtime.SerializerInfo
+
+ legacySerializer runtime.Serializer
+}
+
+// NewCodecFactory provides methods for retrieving serializers for the supported wire formats
+// and conversion wrappers to define preferred internal and external versions. In the future,
+// as the internal version is used less, callers may instead use a defaulting serializer and
+// only convert objects which are shared internally (Status, common API machinery).
+// TODO: allow other codecs to be compiled in?
+// TODO: accept a scheme interface
+func NewCodecFactory(scheme *runtime.Scheme) CodecFactory {
+ serializers := newSerializersForScheme(scheme, json.DefaultMetaFactory)
+ return newCodecFactory(scheme, serializers)
+}
+
+// newCodecFactory is a helper for testing that allows a different metafactory to be specified.
+func newCodecFactory(scheme *runtime.Scheme, serializers []serializerType) CodecFactory {
+ decoders := make([]runtime.Decoder, 0, len(serializers))
+ var accepts []runtime.SerializerInfo
+ alreadyAccepted := make(map[string]struct{})
+
+ var legacySerializer runtime.Serializer
+ for _, d := range serializers {
+ decoders = append(decoders, d.Serializer)
+ for _, mediaType := range d.AcceptContentTypes {
+ if _, ok := alreadyAccepted[mediaType]; ok {
+ continue
+ }
+ alreadyAccepted[mediaType] = struct{}{}
+ info := runtime.SerializerInfo{
+ MediaType: d.ContentType,
+ EncodesAsText: d.EncodesAsText,
+ Serializer: d.Serializer,
+ PrettySerializer: d.PrettySerializer,
+ }
+ if d.StreamSerializer != nil {
+ info.StreamSerializer = &runtime.StreamSerializerInfo{
+ Serializer: d.StreamSerializer,
+ EncodesAsText: d.EncodesAsText,
+ Framer: d.Framer,
+ }
+ }
+ accepts = append(accepts, info)
+ if mediaType == runtime.ContentTypeJSON {
+ legacySerializer = d.Serializer
+ }
+ }
+ }
+ if legacySerializer == nil {
+ legacySerializer = serializers[0].Serializer
+ }
+
+ return CodecFactory{
+ scheme: scheme,
+ serializers: serializers,
+ universal: recognizer.NewDecoder(decoders...),
+
+ accepts: accepts,
+
+ legacySerializer: legacySerializer,
+ }
+}
+
+// SupportedMediaTypes returns the RFC2046 media types that this factory has serializers for.
+func (f CodecFactory) SupportedMediaTypes() []runtime.SerializerInfo {
+ return f.accepts
+}
+
+// LegacyCodec encodes output to a given API versions, and decodes output into the internal form from
+// any recognized source. The returned codec will always encode output to JSON. If a type is not
+// found in the list of versions an error will be returned.
+//
+// This method is deprecated - clients and servers should negotiate a serializer by mime-type and
+// invoke CodecForVersions. Callers that need only to read data should use UniversalDecoder().
+//
+// TODO: make this call exist only in pkg/api, and initialize it with the set of default versions.
+// All other callers will be forced to request a Codec directly.
+func (f CodecFactory) LegacyCodec(version ...schema.GroupVersion) runtime.Codec {
+ return versioning.NewDefaultingCodecForScheme(f.scheme, f.legacySerializer, f.universal, schema.GroupVersions(version), runtime.InternalGroupVersioner)
+}
+
+// UniversalDeserializer can convert any stored data recognized by this factory into a Go object that satisfies
+// runtime.Object. It does not perform conversion. It does not perform defaulting.
+func (f CodecFactory) UniversalDeserializer() runtime.Decoder {
+ return f.universal
+}
+
+// UniversalDecoder returns a runtime.Decoder capable of decoding all known API objects in all known formats. Used
+// by clients that do not need to encode objects but want to deserialize API objects stored on disk. Only decodes
+// objects in groups registered with the scheme. The GroupVersions passed may be used to select alternate
+// versions of objects to return - by default, runtime.APIVersionInternal is used. If any versions are specified,
+// unrecognized groups will be returned in the version they are encoded as (no conversion). This decoder performs
+// defaulting.
+//
+// TODO: the decoder will eventually be removed in favor of dealing with objects in their versioned form
+// TODO: only accept a group versioner
+func (f CodecFactory) UniversalDecoder(versions ...schema.GroupVersion) runtime.Decoder {
+ var versioner runtime.GroupVersioner
+ if len(versions) == 0 {
+ versioner = runtime.InternalGroupVersioner
+ } else {
+ versioner = schema.GroupVersions(versions)
+ }
+ return f.CodecForVersions(nil, f.universal, nil, versioner)
+}
+
+// CodecForVersions creates a codec with the provided serializer. If an object is decoded and its group is not in the list,
+// it will default to runtime.APIVersionInternal. If encode is not specified for an object's group, the object is not
+// converted. If encode or decode are nil, no conversion is performed.
+func (f CodecFactory) CodecForVersions(encoder runtime.Encoder, decoder runtime.Decoder, encode runtime.GroupVersioner, decode runtime.GroupVersioner) runtime.Codec {
+ // TODO: these are for backcompat, remove them in the future
+ if encode == nil {
+ encode = runtime.DisabledGroupVersioner
+ }
+ if decode == nil {
+ decode = runtime.InternalGroupVersioner
+ }
+ return versioning.NewDefaultingCodecForScheme(f.scheme, encoder, decoder, encode, decode)
+}
+
+// DecoderToVersion returns a decoder that targets the provided group version.
+func (f CodecFactory) DecoderToVersion(decoder runtime.Decoder, gv runtime.GroupVersioner) runtime.Decoder {
+ return f.CodecForVersions(nil, decoder, nil, gv)
+}
+
+// EncoderForVersion returns an encoder that targets the provided group version.
+func (f CodecFactory) EncoderForVersion(encoder runtime.Encoder, gv runtime.GroupVersioner) runtime.Encoder {
+ return f.CodecForVersions(encoder, nil, gv, nil)
+}
+
+// DirectCodecFactory provides methods for retrieving "DirectCodec"s, which do not do conversion.
+type DirectCodecFactory struct {
+ CodecFactory
+}
+
+// EncoderForVersion returns an encoder that does not do conversion.
+func (f DirectCodecFactory) EncoderForVersion(serializer runtime.Encoder, version runtime.GroupVersioner) runtime.Encoder {
+ return versioning.DirectEncoder{
+ Version: version,
+ Encoder: serializer,
+ ObjectTyper: f.CodecFactory.scheme,
+ }
+}
+
+// DecoderToVersion returns an decoder that does not do conversion. gv is ignored.
+func (f DirectCodecFactory) DecoderToVersion(serializer runtime.Decoder, _ runtime.GroupVersioner) runtime.Decoder {
+ return versioning.DirectDecoder{
+ Decoder: serializer,
+ }
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go
new file mode 100644
index 000000000..28bb91b53
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go
@@ -0,0 +1,245 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package json
+
+import (
+ "encoding/json"
+ "io"
+
+ "github.com/ghodss/yaml"
+ "github.com/ugorji/go/codec"
+
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/runtime/serializer/recognizer"
+ "k8s.io/apimachinery/pkg/util/framer"
+ utilyaml "k8s.io/apimachinery/pkg/util/yaml"
+)
+
+// NewSerializer creates a JSON serializer that handles encoding versioned objects into the proper JSON form. If typer
+// is not nil, the object has the group, version, and kind fields set.
+func NewSerializer(meta MetaFactory, creater runtime.ObjectCreater, typer runtime.ObjectTyper, pretty bool) *Serializer {
+ return &Serializer{
+ meta: meta,
+ creater: creater,
+ typer: typer,
+ yaml: false,
+ pretty: pretty,
+ }
+}
+
+// NewYAMLSerializer creates a YAML serializer that handles encoding versioned objects into the proper YAML form. If typer
+// is not nil, the object has the group, version, and kind fields set. This serializer supports only the subset of YAML that
+// matches JSON, and will error if constructs are used that do not serialize to JSON.
+func NewYAMLSerializer(meta MetaFactory, creater runtime.ObjectCreater, typer runtime.ObjectTyper) *Serializer {
+ return &Serializer{
+ meta: meta,
+ creater: creater,
+ typer: typer,
+ yaml: true,
+ }
+}
+
+type Serializer struct {
+ meta MetaFactory
+ creater runtime.ObjectCreater
+ typer runtime.ObjectTyper
+ yaml bool
+ pretty bool
+}
+
+// Serializer implements Serializer
+var _ runtime.Serializer = &Serializer{}
+var _ recognizer.RecognizingDecoder = &Serializer{}
+
+// Decode attempts to convert the provided data into YAML or JSON, extract the stored schema kind, apply the provided default gvk, and then
+// load that data into an object matching the desired schema kind or the provided into. If into is *runtime.Unknown, the raw data will be
+// extracted and no decoding will be performed. If into is not registered with the typer, then the object will be straight decoded using
+// normal JSON/YAML unmarshalling. If into is provided and the original data is not fully qualified with kind/version/group, the type of
+// the into will be used to alter the returned gvk. On success or most errors, the method will return the calculated schema kind.
+func (s *Serializer) Decode(originalData []byte, gvk *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) {
+ if versioned, ok := into.(*runtime.VersionedObjects); ok {
+ into = versioned.Last()
+ obj, actual, err := s.Decode(originalData, gvk, into)
+ if err != nil {
+ return nil, actual, err
+ }
+ versioned.Objects = []runtime.Object{obj}
+ return versioned, actual, nil
+ }
+
+ data := originalData
+ if s.yaml {
+ altered, err := yaml.YAMLToJSON(data)
+ if err != nil {
+ return nil, nil, err
+ }
+ data = altered
+ }
+
+ actual, err := s.meta.Interpret(data)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ if gvk != nil {
+ // apply kind and version defaulting from provided default
+ if len(actual.Kind) == 0 {
+ actual.Kind = gvk.Kind
+ }
+ if len(actual.Version) == 0 && len(actual.Group) == 0 {
+ actual.Group = gvk.Group
+ actual.Version = gvk.Version
+ }
+ if len(actual.Version) == 0 && actual.Group == gvk.Group {
+ actual.Version = gvk.Version
+ }
+ }
+
+ if unk, ok := into.(*runtime.Unknown); ok && unk != nil {
+ unk.Raw = originalData
+ unk.ContentType = runtime.ContentTypeJSON
+ unk.GetObjectKind().SetGroupVersionKind(*actual)
+ return unk, actual, nil
+ }
+
+ if into != nil {
+ types, _, err := s.typer.ObjectKinds(into)
+ switch {
+ case runtime.IsNotRegisteredError(err):
+ if err := codec.NewDecoderBytes(data, new(codec.JsonHandle)).Decode(into); err != nil {
+ return nil, actual, err
+ }
+ return into, actual, nil
+ case err != nil:
+ return nil, actual, err
+ default:
+ typed := types[0]
+ if len(actual.Kind) == 0 {
+ actual.Kind = typed.Kind
+ }
+ if len(actual.Version) == 0 && len(actual.Group) == 0 {
+ actual.Group = typed.Group
+ actual.Version = typed.Version
+ }
+ if len(actual.Version) == 0 && actual.Group == typed.Group {
+ actual.Version = typed.Version
+ }
+ }
+ }
+
+ if len(actual.Kind) == 0 {
+ return nil, actual, runtime.NewMissingKindErr(string(originalData))
+ }
+ if len(actual.Version) == 0 {
+ return nil, actual, runtime.NewMissingVersionErr(string(originalData))
+ }
+
+ // use the target if necessary
+ obj, err := runtime.UseOrCreateObject(s.typer, s.creater, *actual, into)
+ if err != nil {
+ return nil, actual, err
+ }
+
+ if err := codec.NewDecoderBytes(data, new(codec.JsonHandle)).Decode(obj); err != nil {
+ return nil, actual, err
+ }
+ return obj, actual, nil
+}
+
+// Encode serializes the provided object to the given writer.
+func (s *Serializer) Encode(obj runtime.Object, w io.Writer) error {
+ if s.yaml {
+ json, err := json.Marshal(obj)
+ if err != nil {
+ return err
+ }
+ data, err := yaml.JSONToYAML(json)
+ if err != nil {
+ return err
+ }
+ _, err = w.Write(data)
+ return err
+ }
+
+ if s.pretty {
+ data, err := json.MarshalIndent(obj, "", " ")
+ if err != nil {
+ return err
+ }
+ _, err = w.Write(data)
+ return err
+ }
+ encoder := json.NewEncoder(w)
+ return encoder.Encode(obj)
+}
+
+// RecognizesData implements the RecognizingDecoder interface.
+func (s *Serializer) RecognizesData(peek io.Reader) (ok, unknown bool, err error) {
+ if s.yaml {
+ // we could potentially look for '---'
+ return false, true, nil
+ }
+ _, _, ok = utilyaml.GuessJSONStream(peek, 2048)
+ return ok, false, nil
+}
+
+// Framer is the default JSON framing behavior, with newlines delimiting individual objects.
+var Framer = jsonFramer{}
+
+type jsonFramer struct{}
+
+// NewFrameWriter implements stream framing for this serializer
+func (jsonFramer) NewFrameWriter(w io.Writer) io.Writer {
+ // we can write JSON objects directly to the writer, because they are self-framing
+ return w
+}
+
+// NewFrameReader implements stream framing for this serializer
+func (jsonFramer) NewFrameReader(r io.ReadCloser) io.ReadCloser {
+ // we need to extract the JSON chunks of data to pass to Decode()
+ return framer.NewJSONFramedReader(r)
+}
+
+// Framer is the default JSON framing behavior, with newlines delimiting individual objects.
+var YAMLFramer = yamlFramer{}
+
+type yamlFramer struct{}
+
+// NewFrameWriter implements stream framing for this serializer
+func (yamlFramer) NewFrameWriter(w io.Writer) io.Writer {
+ return yamlFrameWriter{w}
+}
+
+// NewFrameReader implements stream framing for this serializer
+func (yamlFramer) NewFrameReader(r io.ReadCloser) io.ReadCloser {
+ // extract the YAML document chunks directly
+ return utilyaml.NewDocumentDecoder(r)
+}
+
+type yamlFrameWriter struct {
+ w io.Writer
+}
+
+// Write separates each document with the YAML document separator (`---` followed by line
+// break). Writers must write well formed YAML documents (include a final line break).
+func (w yamlFrameWriter) Write(data []byte) (n int, err error) {
+ if _, err := w.w.Write([]byte("---\n")); err != nil {
+ return 0, err
+ }
+ return w.w.Write(data)
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/meta.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/meta.go
new file mode 100644
index 000000000..df3f5f989
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/meta.go
@@ -0,0 +1,63 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package json
+
+import (
+ "encoding/json"
+ "fmt"
+
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// MetaFactory is used to store and retrieve the version and kind
+// information for JSON objects in a serializer.
+type MetaFactory interface {
+ // Interpret should return the version and kind of the wire-format of
+ // the object.
+ Interpret(data []byte) (*schema.GroupVersionKind, error)
+}
+
+// DefaultMetaFactory is a default factory for versioning objects in JSON. The object
+// in memory and in the default JSON serialization will use the "kind" and "apiVersion"
+// fields.
+var DefaultMetaFactory = SimpleMetaFactory{}
+
+// SimpleMetaFactory provides default methods for retrieving the type and version of objects
+// that are identified with an "apiVersion" and "kind" fields in their JSON
+// serialization. It may be parameterized with the names of the fields in memory, or an
+// optional list of base structs to search for those fields in memory.
+type SimpleMetaFactory struct {
+}
+
+// Interpret will return the APIVersion and Kind of the JSON wire-format
+// encoding of an object, or an error.
+func (SimpleMetaFactory) Interpret(data []byte) (*schema.GroupVersionKind, error) {
+ findKind := struct {
+ // +optional
+ APIVersion string `json:"apiVersion,omitempty"`
+ // +optional
+ Kind string `json:"kind,omitempty"`
+ }{}
+ if err := json.Unmarshal(data, &findKind); err != nil {
+ return nil, fmt.Errorf("couldn't get version/kind; json parse error: %v", err)
+ }
+ gv, err := schema.ParseGroupVersion(findKind.APIVersion)
+ if err != nil {
+ return nil, err
+ }
+ return &schema.GroupVersionKind{Group: gv.Group, Version: gv.Version, Kind: findKind.Kind}, nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/negotiated_codec.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/negotiated_codec.go
new file mode 100644
index 000000000..a42b4a41a
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/negotiated_codec.go
@@ -0,0 +1,43 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package serializer
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+// TODO: We should split negotiated serializers that we can change versions on from those we can change
+// serialization formats on
+type negotiatedSerializerWrapper struct {
+ info runtime.SerializerInfo
+}
+
+func NegotiatedSerializerWrapper(info runtime.SerializerInfo) runtime.NegotiatedSerializer {
+ return &negotiatedSerializerWrapper{info}
+}
+
+func (n *negotiatedSerializerWrapper) SupportedMediaTypes() []runtime.SerializerInfo {
+ return []runtime.SerializerInfo{n.info}
+}
+
+func (n *negotiatedSerializerWrapper) EncoderForVersion(e runtime.Encoder, _ runtime.GroupVersioner) runtime.Encoder {
+ return e
+}
+
+func (n *negotiatedSerializerWrapper) DecoderToVersion(d runtime.Decoder, _gv runtime.GroupVersioner) runtime.Decoder {
+ return d
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/doc.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/doc.go
new file mode 100644
index 000000000..72d0ac79b
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package protobuf provides a Kubernetes serializer for the protobuf format.
+package protobuf // import "k8s.io/apimachinery/pkg/runtime/serializer/protobuf"
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf.go
new file mode 100644
index 000000000..8d4ea7118
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf.go
@@ -0,0 +1,448 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package protobuf
+
+import (
+ "bytes"
+ "fmt"
+ "io"
+ "reflect"
+
+ "github.com/gogo/protobuf/proto"
+
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/runtime/serializer/recognizer"
+ "k8s.io/apimachinery/pkg/util/framer"
+)
+
+var (
+ // protoEncodingPrefix serves as a magic number for an encoded protobuf message on this serializer. All
+ // proto messages serialized by this schema will be preceded by the bytes 0x6b 0x38 0x73, with the fourth
+ // byte being reserved for the encoding style. The only encoding style defined is 0x00, which means that
+ // the rest of the byte stream is a message of type k8s.io.kubernetes.pkg.runtime.Unknown (proto2).
+ //
+ // See k8s.io/apimachinery/pkg/runtime/generated.proto for details of the runtime.Unknown message.
+ //
+ // This encoding scheme is experimental, and is subject to change at any time.
+ protoEncodingPrefix = []byte{0x6b, 0x38, 0x73, 0x00}
+)
+
+type errNotMarshalable struct {
+ t reflect.Type
+}
+
+func (e errNotMarshalable) Error() string {
+ return fmt.Sprintf("object %v does not implement the protobuf marshalling interface and cannot be encoded to a protobuf message", e.t)
+}
+
+func IsNotMarshalable(err error) bool {
+ _, ok := err.(errNotMarshalable)
+ return err != nil && ok
+}
+
+// NewSerializer creates a Protobuf serializer that handles encoding versioned objects into the proper wire form. If a typer
+// is passed, the encoded object will have group, version, and kind fields set. If typer is nil, the objects will be written
+// as-is (any type info passed with the object will be used).
+//
+// This encoding scheme is experimental, and is subject to change at any time.
+func NewSerializer(creater runtime.ObjectCreater, typer runtime.ObjectTyper, defaultContentType string) *Serializer {
+ return &Serializer{
+ prefix: protoEncodingPrefix,
+ creater: creater,
+ typer: typer,
+ contentType: defaultContentType,
+ }
+}
+
+type Serializer struct {
+ prefix []byte
+ creater runtime.ObjectCreater
+ typer runtime.ObjectTyper
+ contentType string
+}
+
+var _ runtime.Serializer = &Serializer{}
+var _ recognizer.RecognizingDecoder = &Serializer{}
+
+// Decode attempts to convert the provided data into a protobuf message, extract the stored schema kind, apply the provided default
+// gvk, and then load that data into an object matching the desired schema kind or the provided into. If into is *runtime.Unknown,
+// the raw data will be extracted and no decoding will be performed. If into is not registered with the typer, then the object will
+// be straight decoded using normal protobuf unmarshalling (the MarshalTo interface). If into is provided and the original data is
+// not fully qualified with kind/version/group, the type of the into will be used to alter the returned gvk. On success or most
+// errors, the method will return the calculated schema kind.
+func (s *Serializer) Decode(originalData []byte, gvk *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) {
+ if versioned, ok := into.(*runtime.VersionedObjects); ok {
+ into = versioned.Last()
+ obj, actual, err := s.Decode(originalData, gvk, into)
+ if err != nil {
+ return nil, actual, err
+ }
+ // the last item in versioned becomes into, so if versioned was not originally empty we reset the object
+ // array so the first position is the decoded object and the second position is the outermost object.
+ // if there were no objects in the versioned list passed to us, only add ourselves.
+ if into != nil && into != obj {
+ versioned.Objects = []runtime.Object{obj, into}
+ } else {
+ versioned.Objects = []runtime.Object{obj}
+ }
+ return versioned, actual, err
+ }
+
+ prefixLen := len(s.prefix)
+ switch {
+ case len(originalData) == 0:
+ // TODO: treat like decoding {} from JSON with defaulting
+ return nil, nil, fmt.Errorf("empty data")
+ case len(originalData) < prefixLen || !bytes.Equal(s.prefix, originalData[:prefixLen]):
+ return nil, nil, fmt.Errorf("provided data does not appear to be a protobuf message, expected prefix %v", s.prefix)
+ case len(originalData) == prefixLen:
+ // TODO: treat like decoding {} from JSON with defaulting
+ return nil, nil, fmt.Errorf("empty body")
+ }
+
+ data := originalData[prefixLen:]
+ unk := runtime.Unknown{}
+ if err := unk.Unmarshal(data); err != nil {
+ return nil, nil, err
+ }
+
+ actual := unk.GroupVersionKind()
+ copyKindDefaults(&actual, gvk)
+
+ if intoUnknown, ok := into.(*runtime.Unknown); ok && intoUnknown != nil {
+ *intoUnknown = unk
+ if ok, _, _ := s.RecognizesData(bytes.NewBuffer(unk.Raw)); ok {
+ intoUnknown.ContentType = s.contentType
+ }
+ return intoUnknown, &actual, nil
+ }
+
+ if into != nil {
+ types, _, err := s.typer.ObjectKinds(into)
+ switch {
+ case runtime.IsNotRegisteredError(err):
+ pb, ok := into.(proto.Message)
+ if !ok {
+ return nil, &actual, errNotMarshalable{reflect.TypeOf(into)}
+ }
+ if err := proto.Unmarshal(unk.Raw, pb); err != nil {
+ return nil, &actual, err
+ }
+ return into, &actual, nil
+ case err != nil:
+ return nil, &actual, err
+ default:
+ copyKindDefaults(&actual, &types[0])
+ // if the result of defaulting did not set a version or group, ensure that at least group is set
+ // (copyKindDefaults will not assign Group if version is already set). This guarantees that the group
+ // of into is set if there is no better information from the caller or object.
+ if len(actual.Version) == 0 && len(actual.Group) == 0 {
+ actual.Group = types[0].Group
+ }
+ }
+ }
+
+ if len(actual.Kind) == 0 {
+ return nil, &actual, runtime.NewMissingKindErr(fmt.Sprintf("%#v", unk.TypeMeta))
+ }
+ if len(actual.Version) == 0 {
+ return nil, &actual, runtime.NewMissingVersionErr(fmt.Sprintf("%#v", unk.TypeMeta))
+ }
+
+ return unmarshalToObject(s.typer, s.creater, &actual, into, unk.Raw)
+}
+
+// Encode serializes the provided object to the given writer.
+func (s *Serializer) Encode(obj runtime.Object, w io.Writer) error {
+ prefixSize := uint64(len(s.prefix))
+
+ var unk runtime.Unknown
+ switch t := obj.(type) {
+ case *runtime.Unknown:
+ estimatedSize := prefixSize + uint64(t.Size())
+ data := make([]byte, estimatedSize)
+ i, err := t.MarshalTo(data[prefixSize:])
+ if err != nil {
+ return err
+ }
+ copy(data, s.prefix)
+ _, err = w.Write(data[:prefixSize+uint64(i)])
+ return err
+ default:
+ kind := obj.GetObjectKind().GroupVersionKind()
+ unk = runtime.Unknown{
+ TypeMeta: runtime.TypeMeta{
+ Kind: kind.Kind,
+ APIVersion: kind.GroupVersion().String(),
+ },
+ }
+ }
+
+ switch t := obj.(type) {
+ case bufferedMarshaller:
+ // this path performs a single allocation during write but requires the caller to implement
+ // the more efficient Size and MarshalTo methods
+ encodedSize := uint64(t.Size())
+ estimatedSize := prefixSize + estimateUnknownSize(&unk, encodedSize)
+ data := make([]byte, estimatedSize)
+
+ i, err := unk.NestedMarshalTo(data[prefixSize:], t, encodedSize)
+ if err != nil {
+ return err
+ }
+
+ copy(data, s.prefix)
+
+ _, err = w.Write(data[:prefixSize+uint64(i)])
+ return err
+
+ case proto.Marshaler:
+ // this path performs extra allocations
+ data, err := t.Marshal()
+ if err != nil {
+ return err
+ }
+ unk.Raw = data
+
+ estimatedSize := prefixSize + uint64(unk.Size())
+ data = make([]byte, estimatedSize)
+
+ i, err := unk.MarshalTo(data[prefixSize:])
+ if err != nil {
+ return err
+ }
+
+ copy(data, s.prefix)
+
+ _, err = w.Write(data[:prefixSize+uint64(i)])
+ return err
+
+ default:
+ // TODO: marshal with a different content type and serializer (JSON for third party objects)
+ return errNotMarshalable{reflect.TypeOf(obj)}
+ }
+}
+
+// RecognizesData implements the RecognizingDecoder interface.
+func (s *Serializer) RecognizesData(peek io.Reader) (bool, bool, error) {
+ prefix := make([]byte, 4)
+ n, err := peek.Read(prefix)
+ if err != nil {
+ if err == io.EOF {
+ return false, false, nil
+ }
+ return false, false, err
+ }
+ if n != 4 {
+ return false, false, nil
+ }
+ return bytes.Equal(s.prefix, prefix), false, nil
+}
+
+// copyKindDefaults defaults dst to the value in src if dst does not have a value set.
+func copyKindDefaults(dst, src *schema.GroupVersionKind) {
+ if src == nil {
+ return
+ }
+ // apply kind and version defaulting from provided default
+ if len(dst.Kind) == 0 {
+ dst.Kind = src.Kind
+ }
+ if len(dst.Version) == 0 && len(src.Version) > 0 {
+ dst.Group = src.Group
+ dst.Version = src.Version
+ }
+}
+
+// bufferedMarshaller describes a more efficient marshalling interface that can avoid allocating multiple
+// byte buffers by pre-calculating the size of the final buffer needed.
+type bufferedMarshaller interface {
+ proto.Sizer
+ runtime.ProtobufMarshaller
+}
+
+// estimateUnknownSize returns the expected bytes consumed by a given runtime.Unknown
+// object with a nil RawJSON struct and the expected size of the provided buffer. The
+// returned size will not be correct if RawJSOn is set on unk.
+func estimateUnknownSize(unk *runtime.Unknown, byteSize uint64) uint64 {
+ size := uint64(unk.Size())
+ // protobuf uses 1 byte for the tag, a varint for the length of the array (at most 8 bytes - uint64 - here),
+ // and the size of the array.
+ size += 1 + 8 + byteSize
+ return size
+}
+
+// NewRawSerializer creates a Protobuf serializer that handles encoding versioned objects into the proper wire form. If typer
+// is not nil, the object has the group, version, and kind fields set. This serializer does not provide type information for the
+// encoded object, and thus is not self describing (callers must know what type is being described in order to decode).
+//
+// This encoding scheme is experimental, and is subject to change at any time.
+func NewRawSerializer(creater runtime.ObjectCreater, typer runtime.ObjectTyper, defaultContentType string) *RawSerializer {
+ return &RawSerializer{
+ creater: creater,
+ typer: typer,
+ contentType: defaultContentType,
+ }
+}
+
+// RawSerializer encodes and decodes objects without adding a runtime.Unknown wrapper (objects are encoded without identifying
+// type).
+type RawSerializer struct {
+ creater runtime.ObjectCreater
+ typer runtime.ObjectTyper
+ contentType string
+}
+
+var _ runtime.Serializer = &RawSerializer{}
+
+// Decode attempts to convert the provided data into a protobuf message, extract the stored schema kind, apply the provided default
+// gvk, and then load that data into an object matching the desired schema kind or the provided into. If into is *runtime.Unknown,
+// the raw data will be extracted and no decoding will be performed. If into is not registered with the typer, then the object will
+// be straight decoded using normal protobuf unmarshalling (the MarshalTo interface). If into is provided and the original data is
+// not fully qualified with kind/version/group, the type of the into will be used to alter the returned gvk. On success or most
+// errors, the method will return the calculated schema kind.
+func (s *RawSerializer) Decode(originalData []byte, gvk *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) {
+ if into == nil {
+ return nil, nil, fmt.Errorf("this serializer requires an object to decode into: %#v", s)
+ }
+
+ if versioned, ok := into.(*runtime.VersionedObjects); ok {
+ into = versioned.Last()
+ obj, actual, err := s.Decode(originalData, gvk, into)
+ if err != nil {
+ return nil, actual, err
+ }
+ if into != nil && into != obj {
+ versioned.Objects = []runtime.Object{obj, into}
+ } else {
+ versioned.Objects = []runtime.Object{obj}
+ }
+ return versioned, actual, err
+ }
+
+ if len(originalData) == 0 {
+ // TODO: treat like decoding {} from JSON with defaulting
+ return nil, nil, fmt.Errorf("empty data")
+ }
+ data := originalData
+
+ actual := &schema.GroupVersionKind{}
+ copyKindDefaults(actual, gvk)
+
+ if intoUnknown, ok := into.(*runtime.Unknown); ok && intoUnknown != nil {
+ intoUnknown.Raw = data
+ intoUnknown.ContentEncoding = ""
+ intoUnknown.ContentType = s.contentType
+ intoUnknown.SetGroupVersionKind(*actual)
+ return intoUnknown, actual, nil
+ }
+
+ types, _, err := s.typer.ObjectKinds(into)
+ switch {
+ case runtime.IsNotRegisteredError(err):
+ pb, ok := into.(proto.Message)
+ if !ok {
+ return nil, actual, errNotMarshalable{reflect.TypeOf(into)}
+ }
+ if err := proto.Unmarshal(data, pb); err != nil {
+ return nil, actual, err
+ }
+ return into, actual, nil
+ case err != nil:
+ return nil, actual, err
+ default:
+ copyKindDefaults(actual, &types[0])
+ // if the result of defaulting did not set a version or group, ensure that at least group is set
+ // (copyKindDefaults will not assign Group if version is already set). This guarantees that the group
+ // of into is set if there is no better information from the caller or object.
+ if len(actual.Version) == 0 && len(actual.Group) == 0 {
+ actual.Group = types[0].Group
+ }
+ }
+
+ if len(actual.Kind) == 0 {
+ return nil, actual, runtime.NewMissingKindErr("<protobuf encoded body - must provide default type>")
+ }
+ if len(actual.Version) == 0 {
+ return nil, actual, runtime.NewMissingVersionErr("<protobuf encoded body - must provide default type>")
+ }
+
+ return unmarshalToObject(s.typer, s.creater, actual, into, data)
+}
+
+// unmarshalToObject is the common code between decode in the raw and normal serializer.
+func unmarshalToObject(typer runtime.ObjectTyper, creater runtime.ObjectCreater, actual *schema.GroupVersionKind, into runtime.Object, data []byte) (runtime.Object, *schema.GroupVersionKind, error) {
+ // use the target if necessary
+ obj, err := runtime.UseOrCreateObject(typer, creater, *actual, into)
+ if err != nil {
+ return nil, actual, err
+ }
+
+ pb, ok := obj.(proto.Message)
+ if !ok {
+ return nil, actual, errNotMarshalable{reflect.TypeOf(obj)}
+ }
+ if err := proto.Unmarshal(data, pb); err != nil {
+ return nil, actual, err
+ }
+ return obj, actual, nil
+}
+
+// Encode serializes the provided object to the given writer. Overrides is ignored.
+func (s *RawSerializer) Encode(obj runtime.Object, w io.Writer) error {
+ switch t := obj.(type) {
+ case bufferedMarshaller:
+ // this path performs a single allocation during write but requires the caller to implement
+ // the more efficient Size and MarshalTo methods
+ encodedSize := uint64(t.Size())
+ data := make([]byte, encodedSize)
+
+ n, err := t.MarshalTo(data)
+ if err != nil {
+ return err
+ }
+ _, err = w.Write(data[:n])
+ return err
+
+ case proto.Marshaler:
+ // this path performs extra allocations
+ data, err := t.Marshal()
+ if err != nil {
+ return err
+ }
+ _, err = w.Write(data)
+ return err
+
+ default:
+ return errNotMarshalable{reflect.TypeOf(obj)}
+ }
+}
+
+var LengthDelimitedFramer = lengthDelimitedFramer{}
+
+type lengthDelimitedFramer struct{}
+
+// NewFrameWriter implements stream framing for this serializer
+func (lengthDelimitedFramer) NewFrameWriter(w io.Writer) io.Writer {
+ return framer.NewLengthDelimitedFrameWriter(w)
+}
+
+// NewFrameReader implements stream framing for this serializer
+func (lengthDelimitedFramer) NewFrameReader(r io.ReadCloser) io.ReadCloser {
+ return framer.NewLengthDelimitedFrameReader(r)
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf_extension.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf_extension.go
new file mode 100644
index 000000000..545cf78df
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf_extension.go
@@ -0,0 +1,48 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package serializer
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/serializer/protobuf"
+)
+
+const (
+ // contentTypeProtobuf is the protobuf type exposed for Kubernetes. It is private to prevent others from
+ // depending on it unintentionally.
+ // TODO: potentially move to pkg/api (since it's part of the Kube public API) and pass it in to the
+ // CodecFactory on initialization.
+ contentTypeProtobuf = "application/vnd.kubernetes.protobuf"
+)
+
+func protobufSerializer(scheme *runtime.Scheme) (serializerType, bool) {
+ serializer := protobuf.NewSerializer(scheme, scheme, contentTypeProtobuf)
+ raw := protobuf.NewRawSerializer(scheme, scheme, contentTypeProtobuf)
+ return serializerType{
+ AcceptContentTypes: []string{contentTypeProtobuf},
+ ContentType: contentTypeProtobuf,
+ FileExtensions: []string{"pb"},
+ Serializer: serializer,
+
+ Framer: protobuf.LengthDelimitedFramer,
+ StreamSerializer: raw,
+ }, true
+}
+
+func init() {
+ serializerExtensions = append(serializerExtensions, protobufSerializer)
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/recognizer/recognizer.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/recognizer/recognizer.go
new file mode 100644
index 000000000..38497ab53
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/recognizer/recognizer.go
@@ -0,0 +1,127 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package recognizer
+
+import (
+ "bufio"
+ "bytes"
+ "fmt"
+ "io"
+
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+type RecognizingDecoder interface {
+ runtime.Decoder
+ // RecognizesData should return true if the input provided in the provided reader
+ // belongs to this decoder, or an error if the data could not be read or is ambiguous.
+ // Unknown is true if the data could not be determined to match the decoder type.
+ // Decoders should assume that they can read as much of peek as they need (as the caller
+ // provides) and may return unknown if the data provided is not sufficient to make a
+ // a determination. When peek returns EOF that may mean the end of the input or the
+ // end of buffered input - recognizers should return the best guess at that time.
+ RecognizesData(peek io.Reader) (ok, unknown bool, err error)
+}
+
+// NewDecoder creates a decoder that will attempt multiple decoders in an order defined
+// by:
+//
+// 1. The decoder implements RecognizingDecoder and identifies the data
+// 2. All other decoders, and any decoder that returned true for unknown.
+//
+// The order passed to the constructor is preserved within those priorities.
+func NewDecoder(decoders ...runtime.Decoder) runtime.Decoder {
+ return &decoder{
+ decoders: decoders,
+ }
+}
+
+type decoder struct {
+ decoders []runtime.Decoder
+}
+
+var _ RecognizingDecoder = &decoder{}
+
+func (d *decoder) RecognizesData(peek io.Reader) (bool, bool, error) {
+ var (
+ lastErr error
+ anyUnknown bool
+ )
+ data, _ := bufio.NewReaderSize(peek, 1024).Peek(1024)
+ for _, r := range d.decoders {
+ switch t := r.(type) {
+ case RecognizingDecoder:
+ ok, unknown, err := t.RecognizesData(bytes.NewBuffer(data))
+ if err != nil {
+ lastErr = err
+ continue
+ }
+ anyUnknown = anyUnknown || unknown
+ if !ok {
+ continue
+ }
+ return true, false, nil
+ }
+ }
+ return false, anyUnknown, lastErr
+}
+
+func (d *decoder) Decode(data []byte, gvk *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) {
+ var (
+ lastErr error
+ skipped []runtime.Decoder
+ )
+
+ // try recognizers, record any decoders we need to give a chance later
+ for _, r := range d.decoders {
+ switch t := r.(type) {
+ case RecognizingDecoder:
+ buf := bytes.NewBuffer(data)
+ ok, unknown, err := t.RecognizesData(buf)
+ if err != nil {
+ lastErr = err
+ continue
+ }
+ if unknown {
+ skipped = append(skipped, t)
+ continue
+ }
+ if !ok {
+ continue
+ }
+ return r.Decode(data, gvk, into)
+ default:
+ skipped = append(skipped, t)
+ }
+ }
+
+ // try recognizers that returned unknown or didn't recognize their data
+ for _, r := range skipped {
+ out, actual, err := r.Decode(data, gvk, into)
+ if err != nil {
+ lastErr = err
+ continue
+ }
+ return out, actual, nil
+ }
+
+ if lastErr == nil {
+ lastErr = fmt.Errorf("no serialization format matched the provided data")
+ }
+ return nil, nil, lastErr
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming.go
new file mode 100644
index 000000000..91fd4ed4f
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming.go
@@ -0,0 +1,137 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package streaming implements encoder and decoder for streams
+// of runtime.Objects over io.Writer/Readers.
+package streaming
+
+import (
+ "bytes"
+ "fmt"
+ "io"
+
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// Encoder is a runtime.Encoder on a stream.
+type Encoder interface {
+ // Encode will write the provided object to the stream or return an error. It obeys the same
+ // contract as runtime.VersionedEncoder.
+ Encode(obj runtime.Object) error
+}
+
+// Decoder is a runtime.Decoder from a stream.
+type Decoder interface {
+ // Decode will return io.EOF when no more objects are available.
+ Decode(defaults *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error)
+ // Close closes the underlying stream.
+ Close() error
+}
+
+// Serializer is a factory for creating encoders and decoders that work over streams.
+type Serializer interface {
+ NewEncoder(w io.Writer) Encoder
+ NewDecoder(r io.ReadCloser) Decoder
+}
+
+type decoder struct {
+ reader io.ReadCloser
+ decoder runtime.Decoder
+ buf []byte
+ maxBytes int
+ resetRead bool
+}
+
+// NewDecoder creates a streaming decoder that reads object chunks from r and decodes them with d.
+// The reader is expected to return ErrShortRead if the provided buffer is not large enough to read
+// an entire object.
+func NewDecoder(r io.ReadCloser, d runtime.Decoder) Decoder {
+ return &decoder{
+ reader: r,
+ decoder: d,
+ buf: make([]byte, 1024),
+ maxBytes: 1024 * 1024,
+ }
+}
+
+var ErrObjectTooLarge = fmt.Errorf("object to decode was longer than maximum allowed size")
+
+// Decode reads the next object from the stream and decodes it.
+func (d *decoder) Decode(defaults *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) {
+ base := 0
+ for {
+ n, err := d.reader.Read(d.buf[base:])
+ if err == io.ErrShortBuffer {
+ if n == 0 {
+ return nil, nil, fmt.Errorf("got short buffer with n=0, base=%d, cap=%d", base, cap(d.buf))
+ }
+ if d.resetRead {
+ continue
+ }
+ // double the buffer size up to maxBytes
+ if len(d.buf) < d.maxBytes {
+ base += n
+ d.buf = append(d.buf, make([]byte, len(d.buf))...)
+ continue
+ }
+ // must read the rest of the frame (until we stop getting ErrShortBuffer)
+ d.resetRead = true
+ base = 0
+ return nil, nil, ErrObjectTooLarge
+ }
+ if err != nil {
+ return nil, nil, err
+ }
+ if d.resetRead {
+ // now that we have drained the large read, continue
+ d.resetRead = false
+ continue
+ }
+ base += n
+ break
+ }
+ return d.decoder.Decode(d.buf[:base], defaults, into)
+}
+
+func (d *decoder) Close() error {
+ return d.reader.Close()
+}
+
+type encoder struct {
+ writer io.Writer
+ encoder runtime.Encoder
+ buf *bytes.Buffer
+}
+
+// NewEncoder returns a new streaming encoder.
+func NewEncoder(w io.Writer, e runtime.Encoder) Encoder {
+ return &encoder{
+ writer: w,
+ encoder: e,
+ buf: &bytes.Buffer{},
+ }
+}
+
+// Encode writes the provided object to the nested writer.
+func (e *encoder) Encode(obj runtime.Object) error {
+ if err := e.encoder.Encode(obj, e.buf); err != nil {
+ return err
+ }
+ _, err := e.writer.Write(e.buf.Bytes())
+ e.buf.Reset()
+ return err
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go
new file mode 100644
index 000000000..829d4fa89
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go
@@ -0,0 +1,273 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package versioning
+
+import (
+ "io"
+
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ utilruntime "k8s.io/apimachinery/pkg/util/runtime"
+)
+
+// NewCodecForScheme is a convenience method for callers that are using a scheme.
+func NewCodecForScheme(
+ // TODO: I should be a scheme interface?
+ scheme *runtime.Scheme,
+ encoder runtime.Encoder,
+ decoder runtime.Decoder,
+ encodeVersion runtime.GroupVersioner,
+ decodeVersion runtime.GroupVersioner,
+) runtime.Codec {
+ return NewCodec(encoder, decoder, runtime.UnsafeObjectConvertor(scheme), scheme, scheme, scheme, nil, encodeVersion, decodeVersion)
+}
+
+// NewDefaultingCodecForScheme is a convenience method for callers that are using a scheme.
+func NewDefaultingCodecForScheme(
+ // TODO: I should be a scheme interface?
+ scheme *runtime.Scheme,
+ encoder runtime.Encoder,
+ decoder runtime.Decoder,
+ encodeVersion runtime.GroupVersioner,
+ decodeVersion runtime.GroupVersioner,
+) runtime.Codec {
+ return NewCodec(encoder, decoder, runtime.UnsafeObjectConvertor(scheme), scheme, scheme, scheme, scheme, encodeVersion, decodeVersion)
+}
+
+// NewCodec takes objects in their internal versions and converts them to external versions before
+// serializing them. It assumes the serializer provided to it only deals with external versions.
+// This class is also a serializer, but is generally used with a specific version.
+func NewCodec(
+ encoder runtime.Encoder,
+ decoder runtime.Decoder,
+ convertor runtime.ObjectConvertor,
+ creater runtime.ObjectCreater,
+ copier runtime.ObjectCopier,
+ typer runtime.ObjectTyper,
+ defaulter runtime.ObjectDefaulter,
+ encodeVersion runtime.GroupVersioner,
+ decodeVersion runtime.GroupVersioner,
+) runtime.Codec {
+ internal := &codec{
+ encoder: encoder,
+ decoder: decoder,
+ convertor: convertor,
+ creater: creater,
+ copier: copier,
+ typer: typer,
+ defaulter: defaulter,
+
+ encodeVersion: encodeVersion,
+ decodeVersion: decodeVersion,
+ }
+ return internal
+}
+
+type codec struct {
+ encoder runtime.Encoder
+ decoder runtime.Decoder
+ convertor runtime.ObjectConvertor
+ creater runtime.ObjectCreater
+ copier runtime.ObjectCopier
+ typer runtime.ObjectTyper
+ defaulter runtime.ObjectDefaulter
+
+ encodeVersion runtime.GroupVersioner
+ decodeVersion runtime.GroupVersioner
+}
+
+// Decode attempts a decode of the object, then tries to convert it to the internal version. If into is provided and the decoding is
+// successful, the returned runtime.Object will be the value passed as into. Note that this may bypass conversion if you pass an
+// into that matches the serialized version.
+func (c *codec) Decode(data []byte, defaultGVK *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) {
+ versioned, isVersioned := into.(*runtime.VersionedObjects)
+ if isVersioned {
+ into = versioned.Last()
+ }
+
+ obj, gvk, err := c.decoder.Decode(data, defaultGVK, into)
+ if err != nil {
+ return nil, gvk, err
+ }
+
+ if d, ok := obj.(runtime.NestedObjectDecoder); ok {
+ if err := d.DecodeNestedObjects(DirectDecoder{c.decoder}); err != nil {
+ return nil, gvk, err
+ }
+ }
+
+ // if we specify a target, use generic conversion.
+ if into != nil {
+ if into == obj {
+ if isVersioned {
+ return versioned, gvk, nil
+ }
+ return into, gvk, nil
+ }
+
+ // perform defaulting if requested
+ if c.defaulter != nil {
+ // create a copy to ensure defaulting is not applied to the original versioned objects
+ if isVersioned {
+ copied, err := c.copier.Copy(obj)
+ if err != nil {
+ utilruntime.HandleError(err)
+ copied = obj
+ }
+ versioned.Objects = []runtime.Object{copied}
+ }
+ c.defaulter.Default(obj)
+ } else {
+ if isVersioned {
+ versioned.Objects = []runtime.Object{obj}
+ }
+ }
+
+ if err := c.convertor.Convert(obj, into, c.decodeVersion); err != nil {
+ return nil, gvk, err
+ }
+
+ if isVersioned {
+ versioned.Objects = append(versioned.Objects, into)
+ return versioned, gvk, nil
+ }
+ return into, gvk, nil
+ }
+
+ // Convert if needed.
+ if isVersioned {
+ // create a copy, because ConvertToVersion does not guarantee non-mutation of objects
+ copied, err := c.copier.Copy(obj)
+ if err != nil {
+ utilruntime.HandleError(err)
+ copied = obj
+ }
+ versioned.Objects = []runtime.Object{copied}
+ }
+
+ // perform defaulting if requested
+ if c.defaulter != nil {
+ c.defaulter.Default(obj)
+ }
+
+ out, err := c.convertor.ConvertToVersion(obj, c.decodeVersion)
+ if err != nil {
+ return nil, gvk, err
+ }
+ if isVersioned {
+ if versioned.Last() != out {
+ versioned.Objects = append(versioned.Objects, out)
+ }
+ return versioned, gvk, nil
+ }
+ return out, gvk, nil
+}
+
+// Encode ensures the provided object is output in the appropriate group and version, invoking
+// conversion if necessary. Unversioned objects (according to the ObjectTyper) are output as is.
+func (c *codec) Encode(obj runtime.Object, w io.Writer) error {
+ switch obj.(type) {
+ case *runtime.Unknown, runtime.Unstructured:
+ return c.encoder.Encode(obj, w)
+ }
+
+ gvks, isUnversioned, err := c.typer.ObjectKinds(obj)
+ if err != nil {
+ return err
+ }
+
+ if c.encodeVersion == nil || isUnversioned {
+ if e, ok := obj.(runtime.NestedObjectEncoder); ok {
+ if err := e.EncodeNestedObjects(DirectEncoder{Encoder: c.encoder, ObjectTyper: c.typer}); err != nil {
+ return err
+ }
+ }
+ objectKind := obj.GetObjectKind()
+ old := objectKind.GroupVersionKind()
+ objectKind.SetGroupVersionKind(gvks[0])
+ err = c.encoder.Encode(obj, w)
+ objectKind.SetGroupVersionKind(old)
+ return err
+ }
+
+ // Perform a conversion if necessary
+ objectKind := obj.GetObjectKind()
+ old := objectKind.GroupVersionKind()
+ out, err := c.convertor.ConvertToVersion(obj, c.encodeVersion)
+ if err != nil {
+ return err
+ }
+
+ if e, ok := out.(runtime.NestedObjectEncoder); ok {
+ if err := e.EncodeNestedObjects(DirectEncoder{Encoder: c.encoder, ObjectTyper: c.typer}); err != nil {
+ return err
+ }
+ }
+
+ // Conversion is responsible for setting the proper group, version, and kind onto the outgoing object
+ err = c.encoder.Encode(out, w)
+ // restore the old GVK, in case conversion returned the same object
+ objectKind.SetGroupVersionKind(old)
+ return err
+}
+
+// DirectEncoder serializes an object and ensures the GVK is set.
+type DirectEncoder struct {
+ Version runtime.GroupVersioner
+ runtime.Encoder
+ runtime.ObjectTyper
+}
+
+// Encode does not do conversion. It sets the gvk during serialization.
+func (e DirectEncoder) Encode(obj runtime.Object, stream io.Writer) error {
+ gvks, _, err := e.ObjectTyper.ObjectKinds(obj)
+ if err != nil {
+ if runtime.IsNotRegisteredError(err) {
+ return e.Encoder.Encode(obj, stream)
+ }
+ return err
+ }
+ kind := obj.GetObjectKind()
+ oldGVK := kind.GroupVersionKind()
+ gvk := gvks[0]
+ if e.Version != nil {
+ preferredGVK, ok := e.Version.KindForGroupVersionKinds(gvks)
+ if ok {
+ gvk = preferredGVK
+ }
+ }
+ kind.SetGroupVersionKind(gvk)
+ err = e.Encoder.Encode(obj, stream)
+ kind.SetGroupVersionKind(oldGVK)
+ return err
+}
+
+// DirectDecoder clears the group version kind of a deserialized object.
+type DirectDecoder struct {
+ runtime.Decoder
+}
+
+// Decode does not do conversion. It removes the gvk during deserialization.
+func (d DirectDecoder) Decode(data []byte, defaults *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) {
+ obj, gvk, err := d.Decoder.Decode(data, defaults, into)
+ if obj != nil {
+ kind := obj.GetObjectKind()
+ // clearing the gvk is just a convention of a codec
+ kind.SetGroupVersionKind(schema.GroupVersionKind{})
+ }
+ return obj, gvk, err
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/swagger_doc_generator.go b/vendor/k8s.io/apimachinery/pkg/runtime/swagger_doc_generator.go
new file mode 100644
index 000000000..29722d52e
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/swagger_doc_generator.go
@@ -0,0 +1,262 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package runtime
+
+import (
+ "bytes"
+ "fmt"
+ "go/ast"
+ "go/doc"
+ "go/parser"
+ "go/token"
+ "io"
+ "reflect"
+ "strings"
+)
+
+// Pair of strings. We keed the name of fields and the doc
+type Pair struct {
+ Name, Doc string
+}
+
+// KubeTypes is an array to represent all available types in a parsed file. [0] is for the type itself
+type KubeTypes []Pair
+
+func astFrom(filePath string) *doc.Package {
+ fset := token.NewFileSet()
+ m := make(map[string]*ast.File)
+
+ f, err := parser.ParseFile(fset, filePath, nil, parser.ParseComments)
+ if err != nil {
+ fmt.Println(err)
+ return nil
+ }
+
+ m[filePath] = f
+ apkg, _ := ast.NewPackage(fset, m, nil, nil)
+
+ return doc.New(apkg, "", 0)
+}
+
+func fmtRawDoc(rawDoc string) string {
+ var buffer bytes.Buffer
+ delPrevChar := func() {
+ if buffer.Len() > 0 {
+ buffer.Truncate(buffer.Len() - 1) // Delete the last " " or "\n"
+ }
+ }
+
+ // Ignore all lines after ---
+ rawDoc = strings.Split(rawDoc, "---")[0]
+
+ for _, line := range strings.Split(rawDoc, "\n") {
+ line = strings.TrimRight(line, " ")
+ leading := strings.TrimLeft(line, " ")
+ switch {
+ case len(line) == 0: // Keep paragraphs
+ delPrevChar()
+ buffer.WriteString("\n\n")
+ case strings.HasPrefix(leading, "TODO"): // Ignore one line TODOs
+ case strings.HasPrefix(leading, "+"): // Ignore instructions to go2idl
+ default:
+ if strings.HasPrefix(line, " ") || strings.HasPrefix(line, "\t") {
+ delPrevChar()
+ line = "\n" + line + "\n" // Replace it with newline. This is useful when we have a line with: "Example:\n\tJSON-someting..."
+ } else {
+ line += " "
+ }
+ buffer.WriteString(line)
+ }
+ }
+
+ postDoc := strings.TrimRight(buffer.String(), "\n")
+ postDoc = strings.Replace(postDoc, "\\\"", "\"", -1) // replace user's \" to "
+ postDoc = strings.Replace(postDoc, "\"", "\\\"", -1) // Escape "
+ postDoc = strings.Replace(postDoc, "\n", "\\n", -1)
+ postDoc = strings.Replace(postDoc, "\t", "\\t", -1)
+
+ return postDoc
+}
+
+// fieldName returns the name of the field as it should appear in JSON format
+// "-" indicates that this field is not part of the JSON representation
+func fieldName(field *ast.Field) string {
+ jsonTag := ""
+ if field.Tag != nil {
+ jsonTag = reflect.StructTag(field.Tag.Value[1 : len(field.Tag.Value)-1]).Get("json") // Delete first and last quotation
+ if strings.Contains(jsonTag, "inline") {
+ return "-"
+ }
+ }
+
+ jsonTag = strings.Split(jsonTag, ",")[0] // This can return "-"
+ if jsonTag == "" {
+ if field.Names != nil {
+ return field.Names[0].Name
+ }
+ return field.Type.(*ast.Ident).Name
+ }
+ return jsonTag
+}
+
+// A buffer of lines that will be written.
+type bufferedLine struct {
+ line string
+ indentation int
+}
+
+type buffer struct {
+ lines []bufferedLine
+}
+
+func newBuffer() *buffer {
+ return &buffer{
+ lines: make([]bufferedLine, 0),
+ }
+}
+
+func (b *buffer) addLine(line string, indent int) {
+ b.lines = append(b.lines, bufferedLine{line, indent})
+}
+
+func (b *buffer) flushLines(w io.Writer) error {
+ for _, line := range b.lines {
+ indentation := strings.Repeat("\t", line.indentation)
+ fullLine := fmt.Sprintf("%s%s", indentation, line.line)
+ if _, err := io.WriteString(w, fullLine); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func writeFuncHeader(b *buffer, structName string, indent int) {
+ s := fmt.Sprintf("var map_%s = map[string]string {\n", structName)
+ b.addLine(s, indent)
+}
+
+func writeFuncFooter(b *buffer, structName string, indent int) {
+ b.addLine("}\n", indent) // Closes the map definition
+
+ s := fmt.Sprintf("func (%s) SwaggerDoc() map[string]string {\n", structName)
+ b.addLine(s, indent)
+ s = fmt.Sprintf("return map_%s\n", structName)
+ b.addLine(s, indent+1)
+ b.addLine("}\n", indent) // Closes the function definition
+}
+
+func writeMapBody(b *buffer, kubeType []Pair, indent int) {
+ format := "\"%s\": \"%s\",\n"
+ for _, pair := range kubeType {
+ s := fmt.Sprintf(format, pair.Name, pair.Doc)
+ b.addLine(s, indent+2)
+ }
+}
+
+// ParseDocumentationFrom gets all types' documentation and returns them as an
+// array. Each type is again represented as an array (we have to use arrays as we
+// need to be sure for the order of the fields). This function returns fields and
+// struct definitions that have no documentation as {name, ""}.
+func ParseDocumentationFrom(src string) []KubeTypes {
+ var docForTypes []KubeTypes
+
+ pkg := astFrom(src)
+
+ for _, kubType := range pkg.Types {
+ if structType, ok := kubType.Decl.Specs[0].(*ast.TypeSpec).Type.(*ast.StructType); ok {
+ var ks KubeTypes
+ ks = append(ks, Pair{kubType.Name, fmtRawDoc(kubType.Doc)})
+
+ for _, field := range structType.Fields.List {
+ if n := fieldName(field); n != "-" {
+ fieldDoc := fmtRawDoc(field.Doc.Text())
+ ks = append(ks, Pair{n, fieldDoc})
+ }
+ }
+ docForTypes = append(docForTypes, ks)
+ }
+ }
+
+ return docForTypes
+}
+
+// WriteSwaggerDocFunc writes a declaration of a function as a string. This function is used in
+// Swagger as a documentation source for structs and theirs fields
+func WriteSwaggerDocFunc(kubeTypes []KubeTypes, w io.Writer) error {
+ for _, kubeType := range kubeTypes {
+ structName := kubeType[0].Name
+ kubeType[0].Name = ""
+
+ // Ignore empty documentation
+ docfulTypes := make(KubeTypes, 0, len(kubeType))
+ for _, pair := range kubeType {
+ if pair.Doc != "" {
+ docfulTypes = append(docfulTypes, pair)
+ }
+ }
+
+ if len(docfulTypes) == 0 {
+ continue // If no fields and the struct have documentation, skip the function definition
+ }
+
+ indent := 0
+ buffer := newBuffer()
+
+ writeFuncHeader(buffer, structName, indent)
+ writeMapBody(buffer, docfulTypes, indent)
+ writeFuncFooter(buffer, structName, indent)
+ buffer.addLine("\n", 0)
+
+ if err := buffer.flushLines(w); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+// VerifySwaggerDocsExist writes in a io.Writer a list of structs and fields that
+// are missing of documentation.
+func VerifySwaggerDocsExist(kubeTypes []KubeTypes, w io.Writer) (int, error) {
+ missingDocs := 0
+ buffer := newBuffer()
+
+ for _, kubeType := range kubeTypes {
+ structName := kubeType[0].Name
+ if kubeType[0].Doc == "" {
+ format := "Missing documentation for the struct itself: %s\n"
+ s := fmt.Sprintf(format, structName)
+ buffer.addLine(s, 0)
+ missingDocs++
+ }
+ kubeType = kubeType[1:] // Skip struct definition
+
+ for _, pair := range kubeType { // Iterate only the fields
+ if pair.Doc == "" {
+ format := "In struct: %s, field documentation is missing: %s\n"
+ s := fmt.Sprintf(format, structName, pair.Name)
+ buffer.addLine(s, 0)
+ missingDocs++
+ }
+ }
+ }
+
+ if err := buffer.flushLines(w); err != nil {
+ return -1, err
+ }
+ return missingDocs, nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/types.go b/vendor/k8s.io/apimachinery/pkg/runtime/types.go
new file mode 100644
index 000000000..f972c5e69
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/types.go
@@ -0,0 +1,133 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package runtime
+
+// Note that the types provided in this file are not versioned and are intended to be
+// safe to use from within all versions of every API object.
+
+// TypeMeta is shared by all top level objects. The proper way to use it is to inline it in your type,
+// like this:
+// type MyAwesomeAPIObject struct {
+// runtime.TypeMeta `json:",inline"`
+// ... // other fields
+// }
+// func (obj *MyAwesomeAPIObject) SetGroupVersionKind(gvk *metav1.GroupVersionKind) { metav1.UpdateTypeMeta(obj,gvk) }; GroupVersionKind() *GroupVersionKind
+//
+// TypeMeta is provided here for convenience. You may use it directly from this package or define
+// your own with the same fields.
+//
+// +k8s:deepcopy-gen=true
+// +protobuf=true
+// +k8s:openapi-gen=true
+type TypeMeta struct {
+ // +optional
+ APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty" protobuf:"bytes,1,opt,name=apiVersion"`
+ // +optional
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty" protobuf:"bytes,2,opt,name=kind"`
+}
+
+const (
+ ContentTypeJSON string = "application/json"
+)
+
+// RawExtension is used to hold extensions in external versions.
+//
+// To use this, make a field which has RawExtension as its type in your external, versioned
+// struct, and Object in your internal struct. You also need to register your
+// various plugin types.
+//
+// // Internal package:
+// type MyAPIObject struct {
+// runtime.TypeMeta `json:",inline"`
+// MyPlugin runtime.Object `json:"myPlugin"`
+// }
+// type PluginA struct {
+// AOption string `json:"aOption"`
+// }
+//
+// // External package:
+// type MyAPIObject struct {
+// runtime.TypeMeta `json:",inline"`
+// MyPlugin runtime.RawExtension `json:"myPlugin"`
+// }
+// type PluginA struct {
+// AOption string `json:"aOption"`
+// }
+//
+// // On the wire, the JSON will look something like this:
+// {
+// "kind":"MyAPIObject",
+// "apiVersion":"v1",
+// "myPlugin": {
+// "kind":"PluginA",
+// "aOption":"foo",
+// },
+// }
+//
+// So what happens? Decode first uses json or yaml to unmarshal the serialized data into
+// your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked.
+// The next step is to copy (using pkg/conversion) into the internal struct. The runtime
+// package's DefaultScheme has conversion functions installed which will unpack the
+// JSON stored in RawExtension, turning it into the correct object type, and storing it
+// in the Object. (TODO: In the case where the object is of an unknown type, a
+// runtime.Unknown object will be created and stored.)
+//
+// +k8s:deepcopy-gen=true
+// +protobuf=true
+// +k8s:openapi-gen=true
+type RawExtension struct {
+ // Raw is the underlying serialization of this object.
+ //
+ // TODO: Determine how to detect ContentType and ContentEncoding of 'Raw' data.
+ Raw []byte `protobuf:"bytes,1,opt,name=raw"`
+ // Object can hold a representation of this extension - useful for working with versioned
+ // structs.
+ Object Object `json:"-"`
+}
+
+// Unknown allows api objects with unknown types to be passed-through. This can be used
+// to deal with the API objects from a plug-in. Unknown objects still have functioning
+// TypeMeta features-- kind, version, etc.
+// TODO: Make this object have easy access to field based accessors and settors for
+// metadata and field mutatation.
+//
+// +k8s:deepcopy-gen=true
+// +protobuf=true
+// +k8s:openapi-gen=true
+type Unknown struct {
+ TypeMeta `json:",inline" protobuf:"bytes,1,opt,name=typeMeta"`
+ // Raw will hold the complete serialized object which couldn't be matched
+ // with a registered type. Most likely, nothing should be done with this
+ // except for passing it through the system.
+ Raw []byte `protobuf:"bytes,2,opt,name=raw"`
+ // ContentEncoding is encoding used to encode 'Raw' data.
+ // Unspecified means no encoding.
+ ContentEncoding string `protobuf:"bytes,3,opt,name=contentEncoding"`
+ // ContentType is serialization method used to serialize 'Raw'.
+ // Unspecified means ContentTypeJSON.
+ ContentType string `protobuf:"bytes,4,opt,name=contentType"`
+}
+
+// VersionedObjects is used by Decoders to give callers a way to access all versions
+// of an object during the decoding process.
+type VersionedObjects struct {
+ // Objects is the set of objects retrieved during decoding, in order of conversion.
+ // The 0 index is the object as serialized on the wire. If conversion has occurred,
+ // other objects may be present. The right most object is the same as would be returned
+ // by a normal Decode call.
+ Objects []Object
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/types_proto.go b/vendor/k8s.io/apimachinery/pkg/runtime/types_proto.go
new file mode 100644
index 000000000..ead96ee05
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/types_proto.go
@@ -0,0 +1,69 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package runtime
+
+import (
+ "fmt"
+)
+
+type ProtobufMarshaller interface {
+ MarshalTo(data []byte) (int, error)
+}
+
+// NestedMarshalTo allows a caller to avoid extra allocations during serialization of an Unknown
+// that will contain an object that implements ProtobufMarshaller.
+func (m *Unknown) NestedMarshalTo(data []byte, b ProtobufMarshaller, size uint64) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ data[i] = 0xa
+ i++
+ i = encodeVarintGenerated(data, i, uint64(m.TypeMeta.Size()))
+ n1, err := m.TypeMeta.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+
+ if b != nil {
+ data[i] = 0x12
+ i++
+ i = encodeVarintGenerated(data, i, size)
+ n2, err := b.MarshalTo(data[i:])
+ if err != nil {
+ return 0, err
+ }
+ if uint64(n2) != size {
+ // programmer error: the Size() method for protobuf does not match the results of MarshalTo, which means the proto
+ // struct returned would be wrong.
+ return 0, fmt.Errorf("the Size() value of %T was %d, but NestedMarshalTo wrote %d bytes to data", b, size, n2)
+ }
+ i += n2
+ }
+
+ data[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(data, i, uint64(len(m.ContentEncoding)))
+ i += copy(data[i:], m.ContentEncoding)
+
+ data[i] = 0x22
+ i++
+ i = encodeVarintGenerated(data, i, uint64(len(m.ContentType)))
+ i += copy(data[i:], m.ContentType)
+ return i, nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/zz_generated.deepcopy.go b/vendor/k8s.io/apimachinery/pkg/runtime/zz_generated.deepcopy.go
new file mode 100644
index 000000000..54ce6ad59
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/zz_generated.deepcopy.go
@@ -0,0 +1,83 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package runtime
+
+import (
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ reflect "reflect"
+)
+
+// GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them.
+func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc {
+ return []conversion.GeneratedDeepCopyFunc{
+ {Fn: DeepCopy_runtime_RawExtension, InType: reflect.TypeOf(&RawExtension{})},
+ {Fn: DeepCopy_runtime_TypeMeta, InType: reflect.TypeOf(&TypeMeta{})},
+ {Fn: DeepCopy_runtime_Unknown, InType: reflect.TypeOf(&Unknown{})},
+ }
+}
+
+// DeepCopy_runtime_RawExtension is an autogenerated deepcopy function.
+func DeepCopy_runtime_RawExtension(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RawExtension)
+ out := out.(*RawExtension)
+ *out = *in
+ if in.Raw != nil {
+ in, out := &in.Raw, &out.Raw
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ }
+ // in.Object is kind 'Interface'
+ if in.Object != nil {
+ if newVal, err := c.DeepCopy(&in.Object); err != nil {
+ return err
+ } else {
+ out.Object = *newVal.(*Object)
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_runtime_TypeMeta is an autogenerated deepcopy function.
+func DeepCopy_runtime_TypeMeta(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*TypeMeta)
+ out := out.(*TypeMeta)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_runtime_Unknown is an autogenerated deepcopy function.
+func DeepCopy_runtime_Unknown(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Unknown)
+ out := out.(*Unknown)
+ *out = *in
+ if in.Raw != nil {
+ in, out := &in.Raw, &out.Raw
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/selection/operator.go b/vendor/k8s.io/apimachinery/pkg/selection/operator.go
new file mode 100644
index 000000000..298f798c4
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/selection/operator.go
@@ -0,0 +1,33 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package selection
+
+// Operator represents a key/field's relationship to value(s).
+// See labels.Requirement and fields.Requirement for more details.
+type Operator string
+
+const (
+ DoesNotExist Operator = "!"
+ Equals Operator = "="
+ DoubleEquals Operator = "=="
+ In Operator = "in"
+ NotEquals Operator = "!="
+ NotIn Operator = "notin"
+ Exists Operator = "exists"
+ GreaterThan Operator = "gt"
+ LessThan Operator = "lt"
+)
diff --git a/vendor/k8s.io/apimachinery/pkg/types/doc.go b/vendor/k8s.io/apimachinery/pkg/types/doc.go
new file mode 100644
index 000000000..5667fa992
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/types/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package types implements various generic types used throughout kubernetes.
+package types // import "k8s.io/apimachinery/pkg/types"
diff --git a/vendor/k8s.io/apimachinery/pkg/types/namespacedname.go b/vendor/k8s.io/apimachinery/pkg/types/namespacedname.go
new file mode 100644
index 000000000..1e2130da0
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/types/namespacedname.go
@@ -0,0 +1,60 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package types
+
+import (
+ "fmt"
+ "strings"
+)
+
+// NamespacedName comprises a resource name, with a mandatory namespace,
+// rendered as "<namespace>/<name>". Being a type captures intent and
+// helps make sure that UIDs, namespaced names and non-namespaced names
+// do not get conflated in code. For most use cases, namespace and name
+// will already have been format validated at the API entry point, so we
+// don't do that here. Where that's not the case (e.g. in testing),
+// consider using NamespacedNameOrDie() in testing.go in this package.
+
+type NamespacedName struct {
+ Namespace string
+ Name string
+}
+
+const (
+ Separator = '/'
+)
+
+// String returns the general purpose string representation
+func (n NamespacedName) String() string {
+ return fmt.Sprintf("%s%c%s", n.Namespace, Separator, n.Name)
+}
+
+// NewNamespacedNameFromString parses the provided string and returns a NamespacedName.
+// The expected format is as per String() above.
+// If the input string is invalid, the returned NamespacedName has all empty string field values.
+// This allows a single-value return from this function, while still allowing error checks in the caller.
+// Note that an input string which does not include exactly one Separator is not a valid input (as it could never
+// have neem returned by String() )
+func NewNamespacedNameFromString(s string) NamespacedName {
+ nn := NamespacedName{}
+ result := strings.Split(s, string(Separator))
+ if len(result) == 2 {
+ nn.Namespace = result[0]
+ nn.Name = result[1]
+ }
+ return nn
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/types/nodename.go b/vendor/k8s.io/apimachinery/pkg/types/nodename.go
new file mode 100644
index 000000000..fee348d7e
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/types/nodename.go
@@ -0,0 +1,43 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package types
+
+// NodeName is a type that holds a api.Node's Name identifier.
+// Being a type captures intent and helps make sure that the node name
+// is not confused with similar concepts (the hostname, the cloud provider id,
+// the cloud provider name etc)
+//
+// To clarify the various types:
+//
+// * Node.Name is the Name field of the Node in the API. This should be stored in a NodeName.
+// Unfortunately, because Name is part of ObjectMeta, we can't store it as a NodeName at the API level.
+//
+// * Hostname is the hostname of the local machine (from uname -n).
+// However, some components allow the user to pass in a --hostname-override flag,
+// which will override this in most places. In the absence of anything more meaningful,
+// kubelet will use Hostname as the Node.Name when it creates the Node.
+//
+// * The cloudproviders have the own names: GCE has InstanceName, AWS has InstanceId.
+//
+// For GCE, InstanceName is the Name of an Instance object in the GCE API. On GCE, Instance.Name becomes the
+// Hostname, and thus it makes sense also to use it as the Node.Name. But that is GCE specific, and it is up
+// to the cloudprovider how to do this mapping.
+//
+// For AWS, the InstanceID is not yet suitable for use as a Node.Name, so we actually use the
+// PrivateDnsName for the Node.Name. And this is _not_ always the same as the hostname: if
+// we are using a custom DHCP domain it won't be.
+type NodeName string
diff --git a/vendor/k8s.io/apimachinery/pkg/types/patch.go b/vendor/k8s.io/apimachinery/pkg/types/patch.go
new file mode 100644
index 000000000..d522d1dbd
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/types/patch.go
@@ -0,0 +1,28 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package types
+
+// Similarly to above, these are constants to support HTTP PATCH utilized by
+// both the client and server that didn't make sense for a whole package to be
+// dedicated to.
+type PatchType string
+
+const (
+ JSONPatchType PatchType = "application/json-patch+json"
+ MergePatchType PatchType = "application/merge-patch+json"
+ StrategicMergePatchType PatchType = "application/strategic-merge-patch+json"
+)
diff --git a/vendor/k8s.io/apimachinery/pkg/types/uid.go b/vendor/k8s.io/apimachinery/pkg/types/uid.go
new file mode 100644
index 000000000..869339222
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/types/uid.go
@@ -0,0 +1,22 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package types
+
+// UID is a type that holds unique ID values, including UUIDs. Because we
+// don't ONLY use UUIDs, this is an alias to string. Being a type captures
+// intent and helps make sure that UIDs and names do not get conflated.
+type UID string
diff --git a/vendor/k8s.io/apimachinery/pkg/util/cache/cache.go b/vendor/k8s.io/apimachinery/pkg/util/cache/cache.go
new file mode 100644
index 000000000..9a09fe54d
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/cache/cache.go
@@ -0,0 +1,83 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package cache
+
+import (
+ "sync"
+)
+
+const (
+ shardsCount int = 32
+)
+
+type Cache []*cacheShard
+
+func NewCache(maxSize int) Cache {
+ if maxSize < shardsCount {
+ maxSize = shardsCount
+ }
+ cache := make(Cache, shardsCount)
+ for i := 0; i < shardsCount; i++ {
+ cache[i] = &cacheShard{
+ items: make(map[uint64]interface{}),
+ maxSize: maxSize / shardsCount,
+ }
+ }
+ return cache
+}
+
+func (c Cache) getShard(index uint64) *cacheShard {
+ return c[index%uint64(shardsCount)]
+}
+
+// Returns true if object already existed, false otherwise.
+func (c *Cache) Add(index uint64, obj interface{}) bool {
+ return c.getShard(index).add(index, obj)
+}
+
+func (c *Cache) Get(index uint64) (obj interface{}, found bool) {
+ return c.getShard(index).get(index)
+}
+
+type cacheShard struct {
+ items map[uint64]interface{}
+ sync.RWMutex
+ maxSize int
+}
+
+// Returns true if object already existed, false otherwise.
+func (s *cacheShard) add(index uint64, obj interface{}) bool {
+ s.Lock()
+ defer s.Unlock()
+ _, isOverwrite := s.items[index]
+ if !isOverwrite && len(s.items) >= s.maxSize {
+ var randomKey uint64
+ for randomKey = range s.items {
+ break
+ }
+ delete(s.items, randomKey)
+ }
+ s.items[index] = obj
+ return isOverwrite
+}
+
+func (s *cacheShard) get(index uint64) (obj interface{}, found bool) {
+ s.RLock()
+ defer s.RUnlock()
+ obj, found = s.items[index]
+ return
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/cache/lruexpirecache.go b/vendor/k8s.io/apimachinery/pkg/util/cache/lruexpirecache.go
new file mode 100644
index 000000000..f6b307aa6
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/cache/lruexpirecache.go
@@ -0,0 +1,102 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package cache
+
+import (
+ "sync"
+ "time"
+
+ "github.com/hashicorp/golang-lru"
+)
+
+// Clock defines an interface for obtaining the current time
+type Clock interface {
+ Now() time.Time
+}
+
+// realClock implements the Clock interface by calling time.Now()
+type realClock struct{}
+
+func (realClock) Now() time.Time { return time.Now() }
+
+// LRUExpireCache is a cache that ensures the mostly recently accessed keys are returned with
+// a ttl beyond which keys are forcibly expired.
+type LRUExpireCache struct {
+ // clock is used to obtain the current time
+ clock Clock
+
+ cache *lru.Cache
+ lock sync.Mutex
+}
+
+// NewLRUExpireCache creates an expiring cache with the given size
+func NewLRUExpireCache(maxSize int) *LRUExpireCache {
+ return NewLRUExpireCacheWithClock(maxSize, realClock{})
+}
+
+// NewLRUExpireCacheWithClock creates an expiring cache with the given size, using the specified clock to obtain the current time.
+func NewLRUExpireCacheWithClock(maxSize int, clock Clock) *LRUExpireCache {
+ cache, err := lru.New(maxSize)
+ if err != nil {
+ // if called with an invalid size
+ panic(err)
+ }
+ return &LRUExpireCache{clock: clock, cache: cache}
+}
+
+type cacheEntry struct {
+ value interface{}
+ expireTime time.Time
+}
+
+// Add adds the value to the cache at key with the specified maximum duration.
+func (c *LRUExpireCache) Add(key interface{}, value interface{}, ttl time.Duration) {
+ c.lock.Lock()
+ defer c.lock.Unlock()
+ c.cache.Add(key, &cacheEntry{value, c.clock.Now().Add(ttl)})
+}
+
+// Get returns the value at the specified key from the cache if it exists and is not
+// expired, or returns false.
+func (c *LRUExpireCache) Get(key interface{}) (interface{}, bool) {
+ c.lock.Lock()
+ defer c.lock.Unlock()
+ e, ok := c.cache.Get(key)
+ if !ok {
+ return nil, false
+ }
+ if c.clock.Now().After(e.(*cacheEntry).expireTime) {
+ c.cache.Remove(key)
+ return nil, false
+ }
+ return e.(*cacheEntry).value, true
+}
+
+// Remove removes the specified key from the cache if it exists
+func (c *LRUExpireCache) Remove(key interface{}) {
+ c.lock.Lock()
+ defer c.lock.Unlock()
+ c.cache.Remove(key)
+}
+
+// Keys returns all the keys in the cache, even if they are expired. Subsequent calls to
+// get may return not found. It returns all keys from oldest to newest.
+func (c *LRUExpireCache) Keys() []interface{} {
+ c.lock.Lock()
+ defer c.lock.Unlock()
+ return c.cache.Keys()
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/clock/clock.go b/vendor/k8s.io/apimachinery/pkg/util/clock/clock.go
new file mode 100644
index 000000000..c303a212a
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/clock/clock.go
@@ -0,0 +1,327 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package clock
+
+import (
+ "sync"
+ "time"
+)
+
+// Clock allows for injecting fake or real clocks into code that
+// needs to do arbitrary things based on time.
+type Clock interface {
+ Now() time.Time
+ Since(time.Time) time.Duration
+ After(d time.Duration) <-chan time.Time
+ NewTimer(d time.Duration) Timer
+ Sleep(d time.Duration)
+ Tick(d time.Duration) <-chan time.Time
+}
+
+var (
+ _ = Clock(RealClock{})
+ _ = Clock(&FakeClock{})
+ _ = Clock(&IntervalClock{})
+)
+
+// RealClock really calls time.Now()
+type RealClock struct{}
+
+// Now returns the current time.
+func (RealClock) Now() time.Time {
+ return time.Now()
+}
+
+// Since returns time since the specified timestamp.
+func (RealClock) Since(ts time.Time) time.Duration {
+ return time.Since(ts)
+}
+
+// Same as time.After(d).
+func (RealClock) After(d time.Duration) <-chan time.Time {
+ return time.After(d)
+}
+
+func (RealClock) NewTimer(d time.Duration) Timer {
+ return &realTimer{
+ timer: time.NewTimer(d),
+ }
+}
+
+func (RealClock) Tick(d time.Duration) <-chan time.Time {
+ return time.Tick(d)
+}
+
+func (RealClock) Sleep(d time.Duration) {
+ time.Sleep(d)
+}
+
+// FakeClock implements Clock, but returns an arbitrary time.
+type FakeClock struct {
+ lock sync.RWMutex
+ time time.Time
+
+ // waiters are waiting for the fake time to pass their specified time
+ waiters []fakeClockWaiter
+}
+
+type fakeClockWaiter struct {
+ targetTime time.Time
+ stepInterval time.Duration
+ skipIfBlocked bool
+ destChan chan time.Time
+ fired bool
+}
+
+func NewFakeClock(t time.Time) *FakeClock {
+ return &FakeClock{
+ time: t,
+ }
+}
+
+// Now returns f's time.
+func (f *FakeClock) Now() time.Time {
+ f.lock.RLock()
+ defer f.lock.RUnlock()
+ return f.time
+}
+
+// Since returns time since the time in f.
+func (f *FakeClock) Since(ts time.Time) time.Duration {
+ f.lock.RLock()
+ defer f.lock.RUnlock()
+ return f.time.Sub(ts)
+}
+
+// Fake version of time.After(d).
+func (f *FakeClock) After(d time.Duration) <-chan time.Time {
+ f.lock.Lock()
+ defer f.lock.Unlock()
+ stopTime := f.time.Add(d)
+ ch := make(chan time.Time, 1) // Don't block!
+ f.waiters = append(f.waiters, fakeClockWaiter{
+ targetTime: stopTime,
+ destChan: ch,
+ })
+ return ch
+}
+
+// Fake version of time.NewTimer(d).
+func (f *FakeClock) NewTimer(d time.Duration) Timer {
+ f.lock.Lock()
+ defer f.lock.Unlock()
+ stopTime := f.time.Add(d)
+ ch := make(chan time.Time, 1) // Don't block!
+ timer := &fakeTimer{
+ fakeClock: f,
+ waiter: fakeClockWaiter{
+ targetTime: stopTime,
+ destChan: ch,
+ },
+ }
+ f.waiters = append(f.waiters, timer.waiter)
+ return timer
+}
+
+func (f *FakeClock) Tick(d time.Duration) <-chan time.Time {
+ f.lock.Lock()
+ defer f.lock.Unlock()
+ tickTime := f.time.Add(d)
+ ch := make(chan time.Time, 1) // hold one tick
+ f.waiters = append(f.waiters, fakeClockWaiter{
+ targetTime: tickTime,
+ stepInterval: d,
+ skipIfBlocked: true,
+ destChan: ch,
+ })
+
+ return ch
+}
+
+// Move clock by Duration, notify anyone that's called After, Tick, or NewTimer
+func (f *FakeClock) Step(d time.Duration) {
+ f.lock.Lock()
+ defer f.lock.Unlock()
+ f.setTimeLocked(f.time.Add(d))
+}
+
+// Sets the time.
+func (f *FakeClock) SetTime(t time.Time) {
+ f.lock.Lock()
+ defer f.lock.Unlock()
+ f.setTimeLocked(t)
+}
+
+// Actually changes the time and checks any waiters. f must be write-locked.
+func (f *FakeClock) setTimeLocked(t time.Time) {
+ f.time = t
+ newWaiters := make([]fakeClockWaiter, 0, len(f.waiters))
+ for i := range f.waiters {
+ w := &f.waiters[i]
+ if !w.targetTime.After(t) {
+
+ if w.skipIfBlocked {
+ select {
+ case w.destChan <- t:
+ w.fired = true
+ default:
+ }
+ } else {
+ w.destChan <- t
+ w.fired = true
+ }
+
+ if w.stepInterval > 0 {
+ for !w.targetTime.After(t) {
+ w.targetTime = w.targetTime.Add(w.stepInterval)
+ }
+ newWaiters = append(newWaiters, *w)
+ }
+
+ } else {
+ newWaiters = append(newWaiters, f.waiters[i])
+ }
+ }
+ f.waiters = newWaiters
+}
+
+// Returns true if After has been called on f but not yet satisfied (so you can
+// write race-free tests).
+func (f *FakeClock) HasWaiters() bool {
+ f.lock.RLock()
+ defer f.lock.RUnlock()
+ return len(f.waiters) > 0
+}
+
+func (f *FakeClock) Sleep(d time.Duration) {
+ f.Step(d)
+}
+
+// IntervalClock implements Clock, but each invocation of Now steps the clock forward the specified duration
+type IntervalClock struct {
+ Time time.Time
+ Duration time.Duration
+}
+
+// Now returns i's time.
+func (i *IntervalClock) Now() time.Time {
+ i.Time = i.Time.Add(i.Duration)
+ return i.Time
+}
+
+// Since returns time since the time in i.
+func (i *IntervalClock) Since(ts time.Time) time.Duration {
+ return i.Time.Sub(ts)
+}
+
+// Unimplemented, will panic.
+// TODO: make interval clock use FakeClock so this can be implemented.
+func (*IntervalClock) After(d time.Duration) <-chan time.Time {
+ panic("IntervalClock doesn't implement After")
+}
+
+// Unimplemented, will panic.
+// TODO: make interval clock use FakeClock so this can be implemented.
+func (*IntervalClock) NewTimer(d time.Duration) Timer {
+ panic("IntervalClock doesn't implement NewTimer")
+}
+
+// Unimplemented, will panic.
+// TODO: make interval clock use FakeClock so this can be implemented.
+func (*IntervalClock) Tick(d time.Duration) <-chan time.Time {
+ panic("IntervalClock doesn't implement Tick")
+}
+
+func (*IntervalClock) Sleep(d time.Duration) {
+ panic("IntervalClock doesn't implement Sleep")
+}
+
+// Timer allows for injecting fake or real timers into code that
+// needs to do arbitrary things based on time.
+type Timer interface {
+ C() <-chan time.Time
+ Stop() bool
+ Reset(d time.Duration) bool
+}
+
+var (
+ _ = Timer(&realTimer{})
+ _ = Timer(&fakeTimer{})
+)
+
+// realTimer is backed by an actual time.Timer.
+type realTimer struct {
+ timer *time.Timer
+}
+
+// C returns the underlying timer's channel.
+func (r *realTimer) C() <-chan time.Time {
+ return r.timer.C
+}
+
+// Stop calls Stop() on the underlying timer.
+func (r *realTimer) Stop() bool {
+ return r.timer.Stop()
+}
+
+// Reset calls Reset() on the underlying timer.
+func (r *realTimer) Reset(d time.Duration) bool {
+ return r.timer.Reset(d)
+}
+
+// fakeTimer implements Timer based on a FakeClock.
+type fakeTimer struct {
+ fakeClock *FakeClock
+ waiter fakeClockWaiter
+}
+
+// C returns the channel that notifies when this timer has fired.
+func (f *fakeTimer) C() <-chan time.Time {
+ return f.waiter.destChan
+}
+
+// Stop stops the timer and returns true if the timer has not yet fired, or false otherwise.
+func (f *fakeTimer) Stop() bool {
+ f.fakeClock.lock.Lock()
+ defer f.fakeClock.lock.Unlock()
+
+ newWaiters := make([]fakeClockWaiter, 0, len(f.fakeClock.waiters))
+ for i := range f.fakeClock.waiters {
+ w := &f.fakeClock.waiters[i]
+ if w != &f.waiter {
+ newWaiters = append(newWaiters, *w)
+ }
+ }
+
+ f.fakeClock.waiters = newWaiters
+
+ return !f.waiter.fired
+}
+
+// Reset resets the timer to the fake clock's "now" + d. It returns true if the timer has not yet
+// fired, or false otherwise.
+func (f *fakeTimer) Reset(d time.Duration) bool {
+ f.fakeClock.lock.Lock()
+ defer f.fakeClock.lock.Unlock()
+
+ active := !f.waiter.fired
+
+ f.waiter.fired = false
+ f.waiter.targetTime = f.fakeClock.time.Add(d)
+
+ return active
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/diff/diff.go b/vendor/k8s.io/apimachinery/pkg/util/diff/diff.go
new file mode 100644
index 000000000..0f730875e
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/diff/diff.go
@@ -0,0 +1,280 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package diff
+
+import (
+ "bytes"
+ "encoding/json"
+ "fmt"
+ "reflect"
+ "sort"
+ "strings"
+ "text/tabwriter"
+
+ "github.com/davecgh/go-spew/spew"
+
+ "k8s.io/apimachinery/pkg/util/validation/field"
+)
+
+// StringDiff diffs a and b and returns a human readable diff.
+func StringDiff(a, b string) string {
+ ba := []byte(a)
+ bb := []byte(b)
+ out := []byte{}
+ i := 0
+ for ; i < len(ba) && i < len(bb); i++ {
+ if ba[i] != bb[i] {
+ break
+ }
+ out = append(out, ba[i])
+ }
+ out = append(out, []byte("\n\nA: ")...)
+ out = append(out, ba[i:]...)
+ out = append(out, []byte("\n\nB: ")...)
+ out = append(out, bb[i:]...)
+ out = append(out, []byte("\n\n")...)
+ return string(out)
+}
+
+// ObjectDiff writes the two objects out as JSON and prints out the identical part of
+// the objects followed by the remaining part of 'a' and finally the remaining part of 'b'.
+// For debugging tests.
+func ObjectDiff(a, b interface{}) string {
+ ab, err := json.Marshal(a)
+ if err != nil {
+ panic(fmt.Sprintf("a: %v", err))
+ }
+ bb, err := json.Marshal(b)
+ if err != nil {
+ panic(fmt.Sprintf("b: %v", err))
+ }
+ return StringDiff(string(ab), string(bb))
+}
+
+// ObjectGoPrintDiff is like ObjectDiff, but uses go-spew to print the objects,
+// which shows absolutely everything by recursing into every single pointer
+// (go's %#v formatters OTOH stop at a certain point). This is needed when you
+// can't figure out why reflect.DeepEqual is returning false and nothing is
+// showing you differences. This will.
+func ObjectGoPrintDiff(a, b interface{}) string {
+ s := spew.ConfigState{DisableMethods: true}
+ return StringDiff(
+ s.Sprintf("%#v", a),
+ s.Sprintf("%#v", b),
+ )
+}
+
+func ObjectReflectDiff(a, b interface{}) string {
+ vA, vB := reflect.ValueOf(a), reflect.ValueOf(b)
+ if vA.Type() != vB.Type() {
+ return fmt.Sprintf("type A %T and type B %T do not match", a, b)
+ }
+ diffs := objectReflectDiff(field.NewPath("object"), vA, vB)
+ if len(diffs) == 0 {
+ return "<no diffs>"
+ }
+ out := []string{""}
+ for _, d := range diffs {
+ out = append(out,
+ fmt.Sprintf("%s:", d.path),
+ limit(fmt.Sprintf(" a: %#v", d.a), 80),
+ limit(fmt.Sprintf(" b: %#v", d.b), 80),
+ )
+ }
+ return strings.Join(out, "\n")
+}
+
+func limit(s string, max int) string {
+ if len(s) > max {
+ return s[:max]
+ }
+ return s
+}
+
+func public(s string) bool {
+ if len(s) == 0 {
+ return false
+ }
+ return s[:1] == strings.ToUpper(s[:1])
+}
+
+type diff struct {
+ path *field.Path
+ a, b interface{}
+}
+
+type orderedDiffs []diff
+
+func (d orderedDiffs) Len() int { return len(d) }
+func (d orderedDiffs) Swap(i, j int) { d[i], d[j] = d[j], d[i] }
+func (d orderedDiffs) Less(i, j int) bool {
+ a, b := d[i].path.String(), d[j].path.String()
+ if a < b {
+ return true
+ }
+ return false
+}
+
+func objectReflectDiff(path *field.Path, a, b reflect.Value) []diff {
+ switch a.Type().Kind() {
+ case reflect.Struct:
+ var changes []diff
+ for i := 0; i < a.Type().NumField(); i++ {
+ if !public(a.Type().Field(i).Name) {
+ if reflect.DeepEqual(a.Interface(), b.Interface()) {
+ continue
+ }
+ return []diff{{path: path, a: fmt.Sprintf("%#v", a), b: fmt.Sprintf("%#v", b)}}
+ }
+ if sub := objectReflectDiff(path.Child(a.Type().Field(i).Name), a.Field(i), b.Field(i)); len(sub) > 0 {
+ changes = append(changes, sub...)
+ } else {
+ if !reflect.DeepEqual(a.Field(i).Interface(), b.Field(i).Interface()) {
+ changes = append(changes, diff{path: path, a: a.Field(i).Interface(), b: b.Field(i).Interface()})
+ }
+ }
+ }
+ return changes
+ case reflect.Ptr, reflect.Interface:
+ if a.IsNil() || b.IsNil() {
+ switch {
+ case a.IsNil() && b.IsNil():
+ return nil
+ case a.IsNil():
+ return []diff{{path: path, a: nil, b: b.Interface()}}
+ default:
+ return []diff{{path: path, a: a.Interface(), b: nil}}
+ }
+ }
+ return objectReflectDiff(path, a.Elem(), b.Elem())
+ case reflect.Chan:
+ if !reflect.DeepEqual(a.Interface(), b.Interface()) {
+ return []diff{{path: path, a: a.Interface(), b: b.Interface()}}
+ }
+ return nil
+ case reflect.Slice:
+ lA, lB := a.Len(), b.Len()
+ l := lA
+ if lB < lA {
+ l = lB
+ }
+ if lA == lB && lA == 0 {
+ if a.IsNil() != b.IsNil() {
+ return []diff{{path: path, a: a.Interface(), b: b.Interface()}}
+ }
+ return nil
+ }
+ for i := 0; i < l; i++ {
+ if !reflect.DeepEqual(a.Index(i), b.Index(i)) {
+ return objectReflectDiff(path.Index(i), a.Index(i), b.Index(i))
+ }
+ }
+ var diffs []diff
+ for i := l; i < lA; i++ {
+ diffs = append(diffs, diff{path: path.Index(i), a: a.Index(i), b: nil})
+ }
+ for i := l; i < lB; i++ {
+ diffs = append(diffs, diff{path: path.Index(i), a: nil, b: b.Index(i)})
+ }
+ if len(diffs) == 0 {
+ diffs = append(diffs, diff{path: path, a: a, b: b})
+ }
+ return diffs
+ case reflect.Map:
+ if reflect.DeepEqual(a.Interface(), b.Interface()) {
+ return nil
+ }
+ aKeys := make(map[interface{}]interface{})
+ for _, key := range a.MapKeys() {
+ aKeys[key.Interface()] = a.MapIndex(key).Interface()
+ }
+ var missing []diff
+ for _, key := range b.MapKeys() {
+ if _, ok := aKeys[key.Interface()]; ok {
+ delete(aKeys, key.Interface())
+ if reflect.DeepEqual(a.MapIndex(key).Interface(), b.MapIndex(key).Interface()) {
+ continue
+ }
+ missing = append(missing, objectReflectDiff(path.Key(fmt.Sprintf("%s", key.Interface())), a.MapIndex(key), b.MapIndex(key))...)
+ continue
+ }
+ missing = append(missing, diff{path: path.Key(fmt.Sprintf("%s", key.Interface())), a: nil, b: b.MapIndex(key).Interface()})
+ }
+ for key, value := range aKeys {
+ missing = append(missing, diff{path: path.Key(fmt.Sprintf("%s", key)), a: value, b: nil})
+ }
+ if len(missing) == 0 {
+ missing = append(missing, diff{path: path, a: a.Interface(), b: b.Interface()})
+ }
+ sort.Sort(orderedDiffs(missing))
+ return missing
+ default:
+ if reflect.DeepEqual(a.Interface(), b.Interface()) {
+ return nil
+ }
+ if !a.CanInterface() {
+ return []diff{{path: path, a: fmt.Sprintf("%#v", a), b: fmt.Sprintf("%#v", b)}}
+ }
+ return []diff{{path: path, a: a.Interface(), b: b.Interface()}}
+ }
+}
+
+// ObjectGoPrintSideBySide prints a and b as textual dumps side by side,
+// enabling easy visual scanning for mismatches.
+func ObjectGoPrintSideBySide(a, b interface{}) string {
+ s := spew.ConfigState{
+ Indent: " ",
+ // Extra deep spew.
+ DisableMethods: true,
+ }
+ sA := s.Sdump(a)
+ sB := s.Sdump(b)
+
+ linesA := strings.Split(sA, "\n")
+ linesB := strings.Split(sB, "\n")
+ width := 0
+ for _, s := range linesA {
+ l := len(s)
+ if l > width {
+ width = l
+ }
+ }
+ for _, s := range linesB {
+ l := len(s)
+ if l > width {
+ width = l
+ }
+ }
+ buf := &bytes.Buffer{}
+ w := tabwriter.NewWriter(buf, width, 0, 1, ' ', 0)
+ max := len(linesA)
+ if len(linesB) > max {
+ max = len(linesB)
+ }
+ for i := 0; i < max; i++ {
+ var a, b string
+ if i < len(linesA) {
+ a = linesA[i]
+ }
+ if i < len(linesB) {
+ b = linesB[i]
+ }
+ fmt.Fprintf(w, "%s\t%s\n", a, b)
+ }
+ w.Flush()
+ return buf.String()
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/errors/doc.go b/vendor/k8s.io/apimachinery/pkg/util/errors/doc.go
new file mode 100644
index 000000000..5d4d6250a
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/errors/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package errors implements various utility functions and types around errors.
+package errors // import "k8s.io/apimachinery/pkg/util/errors"
diff --git a/vendor/k8s.io/apimachinery/pkg/util/errors/errors.go b/vendor/k8s.io/apimachinery/pkg/util/errors/errors.go
new file mode 100644
index 000000000..bdea0e16c
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/errors/errors.go
@@ -0,0 +1,201 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package errors
+
+import (
+ "errors"
+ "fmt"
+)
+
+// MessagesgCountMap contains occurance for each error message.
+type MessageCountMap map[string]int
+
+// Aggregate represents an object that contains multiple errors, but does not
+// necessarily have singular semantic meaning.
+type Aggregate interface {
+ error
+ Errors() []error
+}
+
+// NewAggregate converts a slice of errors into an Aggregate interface, which
+// is itself an implementation of the error interface. If the slice is empty,
+// this returns nil.
+// It will check if any of the element of input error list is nil, to avoid
+// nil pointer panic when call Error().
+func NewAggregate(errlist []error) Aggregate {
+ if len(errlist) == 0 {
+ return nil
+ }
+ // In case of input error list contains nil
+ var errs []error
+ for _, e := range errlist {
+ if e != nil {
+ errs = append(errs, e)
+ }
+ }
+ if len(errs) == 0 {
+ return nil
+ }
+ return aggregate(errs)
+}
+
+// This helper implements the error and Errors interfaces. Keeping it private
+// prevents people from making an aggregate of 0 errors, which is not
+// an error, but does satisfy the error interface.
+type aggregate []error
+
+// Error is part of the error interface.
+func (agg aggregate) Error() string {
+ if len(agg) == 0 {
+ // This should never happen, really.
+ return ""
+ }
+ if len(agg) == 1 {
+ return agg[0].Error()
+ }
+ result := fmt.Sprintf("[%s", agg[0].Error())
+ for i := 1; i < len(agg); i++ {
+ result += fmt.Sprintf(", %s", agg[i].Error())
+ }
+ result += "]"
+ return result
+}
+
+// Errors is part of the Aggregate interface.
+func (agg aggregate) Errors() []error {
+ return []error(agg)
+}
+
+// Matcher is used to match errors. Returns true if the error matches.
+type Matcher func(error) bool
+
+// FilterOut removes all errors that match any of the matchers from the input
+// error. If the input is a singular error, only that error is tested. If the
+// input implements the Aggregate interface, the list of errors will be
+// processed recursively.
+//
+// This can be used, for example, to remove known-OK errors (such as io.EOF or
+// os.PathNotFound) from a list of errors.
+func FilterOut(err error, fns ...Matcher) error {
+ if err == nil {
+ return nil
+ }
+ if agg, ok := err.(Aggregate); ok {
+ return NewAggregate(filterErrors(agg.Errors(), fns...))
+ }
+ if !matchesError(err, fns...) {
+ return err
+ }
+ return nil
+}
+
+// matchesError returns true if any Matcher returns true
+func matchesError(err error, fns ...Matcher) bool {
+ for _, fn := range fns {
+ if fn(err) {
+ return true
+ }
+ }
+ return false
+}
+
+// filterErrors returns any errors (or nested errors, if the list contains
+// nested Errors) for which all fns return false. If no errors
+// remain a nil list is returned. The resulting silec will have all
+// nested slices flattened as a side effect.
+func filterErrors(list []error, fns ...Matcher) []error {
+ result := []error{}
+ for _, err := range list {
+ r := FilterOut(err, fns...)
+ if r != nil {
+ result = append(result, r)
+ }
+ }
+ return result
+}
+
+// Flatten takes an Aggregate, which may hold other Aggregates in arbitrary
+// nesting, and flattens them all into a single Aggregate, recursively.
+func Flatten(agg Aggregate) Aggregate {
+ result := []error{}
+ if agg == nil {
+ return nil
+ }
+ for _, err := range agg.Errors() {
+ if a, ok := err.(Aggregate); ok {
+ r := Flatten(a)
+ if r != nil {
+ result = append(result, r.Errors()...)
+ }
+ } else {
+ if err != nil {
+ result = append(result, err)
+ }
+ }
+ }
+ return NewAggregate(result)
+}
+
+// CreateAggregateFromMessageCountMap converts MessageCountMap Aggregate
+func CreateAggregateFromMessageCountMap(m MessageCountMap) Aggregate {
+ if m == nil {
+ return nil
+ }
+ result := make([]error, 0, len(m))
+ for errStr, count := range m {
+ var countStr string
+ if count > 1 {
+ countStr = fmt.Sprintf(" (repeated %v times)", count)
+ }
+ result = append(result, fmt.Errorf("%v%v", errStr, countStr))
+ }
+ return NewAggregate(result)
+}
+
+// Reduce will return err or, if err is an Aggregate and only has one item,
+// the first item in the aggregate.
+func Reduce(err error) error {
+ if agg, ok := err.(Aggregate); ok && err != nil {
+ switch len(agg.Errors()) {
+ case 1:
+ return agg.Errors()[0]
+ case 0:
+ return nil
+ }
+ }
+ return err
+}
+
+// AggregateGoroutines runs the provided functions in parallel, stuffing all
+// non-nil errors into the returned Aggregate.
+// Returns nil if all the functions complete successfully.
+func AggregateGoroutines(funcs ...func() error) Aggregate {
+ errChan := make(chan error, len(funcs))
+ for _, f := range funcs {
+ go func(f func() error) { errChan <- f() }(f)
+ }
+ errs := make([]error, 0)
+ for i := 0; i < cap(errChan); i++ {
+ if err := <-errChan; err != nil {
+ errs = append(errs, err)
+ }
+ }
+ return NewAggregate(errs)
+}
+
+// ErrPreconditionViolated is returned when the precondition is violated
+var ErrPreconditionViolated = errors.New("precondition is violated")
diff --git a/vendor/k8s.io/apimachinery/pkg/util/framer/framer.go b/vendor/k8s.io/apimachinery/pkg/util/framer/framer.go
new file mode 100644
index 000000000..066680f44
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/framer/framer.go
@@ -0,0 +1,167 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package framer implements simple frame decoding techniques for an io.ReadCloser
+package framer
+
+import (
+ "encoding/binary"
+ "encoding/json"
+ "io"
+)
+
+type lengthDelimitedFrameWriter struct {
+ w io.Writer
+ h [4]byte
+}
+
+func NewLengthDelimitedFrameWriter(w io.Writer) io.Writer {
+ return &lengthDelimitedFrameWriter{w: w}
+}
+
+// Write writes a single frame to the nested writer, prepending it with the length in
+// in bytes of data (as a 4 byte, bigendian uint32).
+func (w *lengthDelimitedFrameWriter) Write(data []byte) (int, error) {
+ binary.BigEndian.PutUint32(w.h[:], uint32(len(data)))
+ n, err := w.w.Write(w.h[:])
+ if err != nil {
+ return 0, err
+ }
+ if n != len(w.h) {
+ return 0, io.ErrShortWrite
+ }
+ return w.w.Write(data)
+}
+
+type lengthDelimitedFrameReader struct {
+ r io.ReadCloser
+ remaining int
+}
+
+// NewLengthDelimitedFrameReader returns an io.Reader that will decode length-prefixed
+// frames off of a stream.
+//
+// The protocol is:
+//
+// stream: message ...
+// message: prefix body
+// prefix: 4 byte uint32 in BigEndian order, denotes length of body
+// body: bytes (0..prefix)
+//
+// If the buffer passed to Read is not long enough to contain an entire frame, io.ErrShortRead
+// will be returned along with the number of bytes read.
+func NewLengthDelimitedFrameReader(r io.ReadCloser) io.ReadCloser {
+ return &lengthDelimitedFrameReader{r: r}
+}
+
+// Read attempts to read an entire frame into data. If that is not possible, io.ErrShortBuffer
+// is returned and subsequent calls will attempt to read the last frame. A frame is complete when
+// err is nil.
+func (r *lengthDelimitedFrameReader) Read(data []byte) (int, error) {
+ if r.remaining <= 0 {
+ header := [4]byte{}
+ n, err := io.ReadAtLeast(r.r, header[:4], 4)
+ if err != nil {
+ return 0, err
+ }
+ if n != 4 {
+ return 0, io.ErrUnexpectedEOF
+ }
+ frameLength := int(binary.BigEndian.Uint32(header[:]))
+ r.remaining = frameLength
+ }
+
+ expect := r.remaining
+ max := expect
+ if max > len(data) {
+ max = len(data)
+ }
+ n, err := io.ReadAtLeast(r.r, data[:max], int(max))
+ r.remaining -= n
+ if err == io.ErrShortBuffer || r.remaining > 0 {
+ return n, io.ErrShortBuffer
+ }
+ if err != nil {
+ return n, err
+ }
+ if n != expect {
+ return n, io.ErrUnexpectedEOF
+ }
+
+ return n, nil
+}
+
+func (r *lengthDelimitedFrameReader) Close() error {
+ return r.r.Close()
+}
+
+type jsonFrameReader struct {
+ r io.ReadCloser
+ decoder *json.Decoder
+ remaining []byte
+}
+
+// NewJSONFramedReader returns an io.Reader that will decode individual JSON objects off
+// of a wire.
+//
+// The boundaries between each frame are valid JSON objects. A JSON parsing error will terminate
+// the read.
+func NewJSONFramedReader(r io.ReadCloser) io.ReadCloser {
+ return &jsonFrameReader{
+ r: r,
+ decoder: json.NewDecoder(r),
+ }
+}
+
+// ReadFrame decodes the next JSON object in the stream, or returns an error. The returned
+// byte slice will be modified the next time ReadFrame is invoked and should not be altered.
+func (r *jsonFrameReader) Read(data []byte) (int, error) {
+ // Return whatever remaining data exists from an in progress frame
+ if n := len(r.remaining); n > 0 {
+ if n <= len(data) {
+ data = append(data[0:0], r.remaining...)
+ r.remaining = nil
+ return n, nil
+ }
+
+ n = len(data)
+ data = append(data[0:0], r.remaining[:n]...)
+ r.remaining = r.remaining[n:]
+ return n, io.ErrShortBuffer
+ }
+
+ // RawMessage#Unmarshal appends to data - we reset the slice down to 0 and will either see
+ // data written to data, or be larger than data and a different array.
+ n := len(data)
+ m := json.RawMessage(data[:0])
+ if err := r.decoder.Decode(&m); err != nil {
+ return 0, err
+ }
+
+ // If capacity of data is less than length of the message, decoder will allocate a new slice
+ // and set m to it, which means we need to copy the partial result back into data and preserve
+ // the remaining result for subsequent reads.
+ if len(m) > n {
+ data = append(data[0:0], m[:n]...)
+ r.remaining = m[n:]
+ return n, io.ErrShortBuffer
+ }
+ return len(m), nil
+}
+
+func (r *jsonFrameReader) Close() error {
+ return r.r.Close()
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/httpstream/doc.go b/vendor/k8s.io/apimachinery/pkg/util/httpstream/doc.go
new file mode 100644
index 000000000..5893df5bd
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package httpstream adds multiplexed streaming support to HTTP requests and
+// responses via connection upgrades.
+package httpstream // import "k8s.io/apimachinery/pkg/util/httpstream"
diff --git a/vendor/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go b/vendor/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go
new file mode 100644
index 000000000..7c9b791d4
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/httpstream.go
@@ -0,0 +1,149 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package httpstream
+
+import (
+ "fmt"
+ "io"
+ "net/http"
+ "strings"
+ "time"
+)
+
+const (
+ HeaderConnection = "Connection"
+ HeaderUpgrade = "Upgrade"
+ HeaderProtocolVersion = "X-Stream-Protocol-Version"
+ HeaderAcceptedProtocolVersions = "X-Accepted-Stream-Protocol-Versions"
+)
+
+// NewStreamHandler defines a function that is called when a new Stream is
+// received. If no error is returned, the Stream is accepted; otherwise,
+// the stream is rejected. After the reply frame has been sent, replySent is closed.
+type NewStreamHandler func(stream Stream, replySent <-chan struct{}) error
+
+// NoOpNewStreamHandler is a stream handler that accepts a new stream and
+// performs no other logic.
+func NoOpNewStreamHandler(stream Stream, replySent <-chan struct{}) error { return nil }
+
+// Dialer knows how to open a streaming connection to a server.
+type Dialer interface {
+
+ // Dial opens a streaming connection to a server using one of the protocols
+ // specified (in order of most preferred to least preferred).
+ Dial(protocols ...string) (Connection, string, error)
+}
+
+// UpgradeRoundTripper is a type of http.RoundTripper that is able to upgrade
+// HTTP requests to support multiplexed bidirectional streams. After RoundTrip()
+// is invoked, if the upgrade is successful, clients may retrieve the upgraded
+// connection by calling UpgradeRoundTripper.Connection().
+type UpgradeRoundTripper interface {
+ http.RoundTripper
+ // NewConnection validates the response and creates a new Connection.
+ NewConnection(resp *http.Response) (Connection, error)
+}
+
+// ResponseUpgrader knows how to upgrade HTTP requests and responses to
+// add streaming support to them.
+type ResponseUpgrader interface {
+ // UpgradeResponse upgrades an HTTP response to one that supports multiplexed
+ // streams. newStreamHandler will be called asynchronously whenever the
+ // other end of the upgraded connection creates a new stream.
+ UpgradeResponse(w http.ResponseWriter, req *http.Request, newStreamHandler NewStreamHandler) Connection
+}
+
+// Connection represents an upgraded HTTP connection.
+type Connection interface {
+ // CreateStream creates a new Stream with the supplied headers.
+ CreateStream(headers http.Header) (Stream, error)
+ // Close resets all streams and closes the connection.
+ Close() error
+ // CloseChan returns a channel that is closed when the underlying connection is closed.
+ CloseChan() <-chan bool
+ // SetIdleTimeout sets the amount of time the connection may remain idle before
+ // it is automatically closed.
+ SetIdleTimeout(timeout time.Duration)
+}
+
+// Stream represents a bidirectional communications channel that is part of an
+// upgraded connection.
+type Stream interface {
+ io.ReadWriteCloser
+ // Reset closes both directions of the stream, indicating that neither client
+ // or server can use it any more.
+ Reset() error
+ // Headers returns the headers used to create the stream.
+ Headers() http.Header
+ // Identifier returns the stream's ID.
+ Identifier() uint32
+}
+
+// IsUpgradeRequest returns true if the given request is a connection upgrade request
+func IsUpgradeRequest(req *http.Request) bool {
+ for _, h := range req.Header[http.CanonicalHeaderKey(HeaderConnection)] {
+ if strings.Contains(strings.ToLower(h), strings.ToLower(HeaderUpgrade)) {
+ return true
+ }
+ }
+ return false
+}
+
+func negotiateProtocol(clientProtocols, serverProtocols []string) string {
+ for i := range clientProtocols {
+ for j := range serverProtocols {
+ if clientProtocols[i] == serverProtocols[j] {
+ return clientProtocols[i]
+ }
+ }
+ }
+ return ""
+}
+
+// Handshake performs a subprotocol negotiation. If the client did request a
+// subprotocol, Handshake will select the first common value found in
+// serverProtocols. If a match is found, Handshake adds a response header
+// indicating the chosen subprotocol. If no match is found, HTTP forbidden is
+// returned, along with a response header containing the list of protocols the
+// server can accept.
+func Handshake(req *http.Request, w http.ResponseWriter, serverProtocols []string) (string, error) {
+ clientProtocols := req.Header[http.CanonicalHeaderKey(HeaderProtocolVersion)]
+ if len(clientProtocols) == 0 {
+ // Kube 1.0 clients didn't support subprotocol negotiation.
+ // TODO require clientProtocols once Kube 1.0 is no longer supported
+ return "", nil
+ }
+
+ if len(serverProtocols) == 0 {
+ // Kube 1.0 servers didn't support subprotocol negotiation. This is mainly for testing.
+ // TODO require serverProtocols once Kube 1.0 is no longer supported
+ return "", nil
+ }
+
+ negotiatedProtocol := negotiateProtocol(clientProtocols, serverProtocols)
+ if len(negotiatedProtocol) == 0 {
+ w.WriteHeader(http.StatusForbidden)
+ for i := range serverProtocols {
+ w.Header().Add(HeaderAcceptedProtocolVersions, serverProtocols[i])
+ }
+ fmt.Fprintf(w, "unable to upgrade: unable to negotiate protocol: client supports %v, server accepts %v", clientProtocols, serverProtocols)
+ return "", fmt.Errorf("unable to upgrade: unable to negotiate protocol: client supports %v, server supports %v", clientProtocols, serverProtocols)
+ }
+
+ w.Header().Add(HeaderProtocolVersion, negotiatedProtocol)
+ return negotiatedProtocol, nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/connection.go b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/connection.go
new file mode 100644
index 000000000..3dc8e23ae
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/connection.go
@@ -0,0 +1,145 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package spdy
+
+import (
+ "net"
+ "net/http"
+ "sync"
+ "time"
+
+ "github.com/docker/spdystream"
+ "github.com/golang/glog"
+ "k8s.io/apimachinery/pkg/util/httpstream"
+)
+
+// connection maintains state about a spdystream.Connection and its associated
+// streams.
+type connection struct {
+ conn *spdystream.Connection
+ streams []httpstream.Stream
+ streamLock sync.Mutex
+ newStreamHandler httpstream.NewStreamHandler
+}
+
+// NewClientConnection creates a new SPDY client connection.
+func NewClientConnection(conn net.Conn) (httpstream.Connection, error) {
+ spdyConn, err := spdystream.NewConnection(conn, false)
+ if err != nil {
+ defer conn.Close()
+ return nil, err
+ }
+
+ return newConnection(spdyConn, httpstream.NoOpNewStreamHandler), nil
+}
+
+// NewServerConnection creates a new SPDY server connection. newStreamHandler
+// will be invoked when the server receives a newly created stream from the
+// client.
+func NewServerConnection(conn net.Conn, newStreamHandler httpstream.NewStreamHandler) (httpstream.Connection, error) {
+ spdyConn, err := spdystream.NewConnection(conn, true)
+ if err != nil {
+ defer conn.Close()
+ return nil, err
+ }
+
+ return newConnection(spdyConn, newStreamHandler), nil
+}
+
+// newConnection returns a new connection wrapping conn. newStreamHandler
+// will be invoked when the server receives a newly created stream from the
+// client.
+func newConnection(conn *spdystream.Connection, newStreamHandler httpstream.NewStreamHandler) httpstream.Connection {
+ c := &connection{conn: conn, newStreamHandler: newStreamHandler}
+ go conn.Serve(c.newSpdyStream)
+ return c
+}
+
+// createStreamResponseTimeout indicates how long to wait for the other side to
+// acknowledge the new stream before timing out.
+const createStreamResponseTimeout = 30 * time.Second
+
+// Close first sends a reset for all of the connection's streams, and then
+// closes the underlying spdystream.Connection.
+func (c *connection) Close() error {
+ c.streamLock.Lock()
+ for _, s := range c.streams {
+ // calling Reset instead of Close ensures that all streams are fully torn down
+ s.Reset()
+ }
+ c.streams = make([]httpstream.Stream, 0)
+ c.streamLock.Unlock()
+
+ // now that all streams are fully torn down, it's safe to call close on the underlying connection,
+ // which should be able to terminate immediately at this point, instead of waiting for any
+ // remaining graceful stream termination.
+ return c.conn.Close()
+}
+
+// CreateStream creates a new stream with the specified headers and registers
+// it with the connection.
+func (c *connection) CreateStream(headers http.Header) (httpstream.Stream, error) {
+ stream, err := c.conn.CreateStream(headers, nil, false)
+ if err != nil {
+ return nil, err
+ }
+ if err = stream.WaitTimeout(createStreamResponseTimeout); err != nil {
+ return nil, err
+ }
+
+ c.registerStream(stream)
+ return stream, nil
+}
+
+// registerStream adds the stream s to the connection's list of streams that
+// it owns.
+func (c *connection) registerStream(s httpstream.Stream) {
+ c.streamLock.Lock()
+ c.streams = append(c.streams, s)
+ c.streamLock.Unlock()
+}
+
+// CloseChan returns a channel that, when closed, indicates that the underlying
+// spdystream.Connection has been closed.
+func (c *connection) CloseChan() <-chan bool {
+ return c.conn.CloseChan()
+}
+
+// newSpdyStream is the internal new stream handler used by spdystream.Connection.Serve.
+// It calls connection's newStreamHandler, giving it the opportunity to accept or reject
+// the stream. If newStreamHandler returns an error, the stream is rejected. If not, the
+// stream is accepted and registered with the connection.
+func (c *connection) newSpdyStream(stream *spdystream.Stream) {
+ replySent := make(chan struct{})
+ err := c.newStreamHandler(stream, replySent)
+ rejectStream := (err != nil)
+ if rejectStream {
+ glog.Warningf("Stream rejected: %v", err)
+ stream.Reset()
+ return
+ }
+
+ c.registerStream(stream)
+ stream.SendReply(http.Header{}, rejectStream)
+ close(replySent)
+}
+
+// SetIdleTimeout sets the amount of time the connection may remain idle before
+// it is automatically closed.
+func (c *connection) SetIdleTimeout(timeout time.Duration) {
+ c.conn.SetIdleTimeout(timeout)
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go
new file mode 100644
index 000000000..12bef075d
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go
@@ -0,0 +1,326 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package spdy
+
+import (
+ "bufio"
+ "bytes"
+ "crypto/tls"
+ "encoding/base64"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "net"
+ "net/http"
+ "net/http/httputil"
+ "net/url"
+ "strings"
+
+ apierrors "k8s.io/apimachinery/pkg/api/errors"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/serializer"
+ "k8s.io/apimachinery/pkg/util/httpstream"
+ utilnet "k8s.io/apimachinery/pkg/util/net"
+ "k8s.io/apimachinery/third_party/forked/golang/netutil"
+)
+
+// SpdyRoundTripper knows how to upgrade an HTTP request to one that supports
+// multiplexed streams. After RoundTrip() is invoked, Conn will be set
+// and usable. SpdyRoundTripper implements the UpgradeRoundTripper interface.
+type SpdyRoundTripper struct {
+ //tlsConfig holds the TLS configuration settings to use when connecting
+ //to the remote server.
+ tlsConfig *tls.Config
+
+ /* TODO according to http://golang.org/pkg/net/http/#RoundTripper, a RoundTripper
+ must be safe for use by multiple concurrent goroutines. If this is absolutely
+ necessary, we could keep a map from http.Request to net.Conn. In practice,
+ a client will create an http.Client, set the transport to a new insteace of
+ SpdyRoundTripper, and use it a single time, so this hopefully won't be an issue.
+ */
+ // conn is the underlying network connection to the remote server.
+ conn net.Conn
+
+ // Dialer is the dialer used to connect. Used if non-nil.
+ Dialer *net.Dialer
+
+ // proxier knows which proxy to use given a request, defaults to http.ProxyFromEnvironment
+ // Used primarily for mocking the proxy discovery in tests.
+ proxier func(req *http.Request) (*url.URL, error)
+
+ // followRedirects indicates if the round tripper should examine responses for redirects and
+ // follow them.
+ followRedirects bool
+}
+
+var _ utilnet.TLSClientConfigHolder = &SpdyRoundTripper{}
+var _ httpstream.UpgradeRoundTripper = &SpdyRoundTripper{}
+var _ utilnet.Dialer = &SpdyRoundTripper{}
+
+// NewRoundTripper creates a new SpdyRoundTripper that will use
+// the specified tlsConfig.
+func NewRoundTripper(tlsConfig *tls.Config, followRedirects bool) httpstream.UpgradeRoundTripper {
+ return NewSpdyRoundTripper(tlsConfig, followRedirects)
+}
+
+// NewSpdyRoundTripper creates a new SpdyRoundTripper that will use
+// the specified tlsConfig. This function is mostly meant for unit tests.
+func NewSpdyRoundTripper(tlsConfig *tls.Config, followRedirects bool) *SpdyRoundTripper {
+ return &SpdyRoundTripper{tlsConfig: tlsConfig, followRedirects: followRedirects}
+}
+
+// TLSClientConfig implements pkg/util/net.TLSClientConfigHolder for proper TLS checking during
+// proxying with a spdy roundtripper.
+func (s *SpdyRoundTripper) TLSClientConfig() *tls.Config {
+ return s.tlsConfig
+}
+
+// Dial implements k8s.io/apimachinery/pkg/util/net.Dialer.
+func (s *SpdyRoundTripper) Dial(req *http.Request) (net.Conn, error) {
+ conn, err := s.dial(req)
+ if err != nil {
+ return nil, err
+ }
+
+ if err := req.Write(conn); err != nil {
+ conn.Close()
+ return nil, err
+ }
+
+ return conn, nil
+}
+
+// dial dials the host specified by req, using TLS if appropriate, optionally
+// using a proxy server if one is configured via environment variables.
+func (s *SpdyRoundTripper) dial(req *http.Request) (net.Conn, error) {
+ proxier := s.proxier
+ if proxier == nil {
+ proxier = http.ProxyFromEnvironment
+ }
+ proxyURL, err := proxier(req)
+ if err != nil {
+ return nil, err
+ }
+
+ if proxyURL == nil {
+ return s.dialWithoutProxy(req.URL)
+ }
+
+ // ensure we use a canonical host with proxyReq
+ targetHost := netutil.CanonicalAddr(req.URL)
+
+ // proxying logic adapted from http://blog.h6t.eu/post/74098062923/golang-websocket-with-http-proxy-support
+ proxyReq := http.Request{
+ Method: "CONNECT",
+ URL: &url.URL{},
+ Host: targetHost,
+ }
+
+ if pa := s.proxyAuth(proxyURL); pa != "" {
+ proxyReq.Header = http.Header{}
+ proxyReq.Header.Set("Proxy-Authorization", pa)
+ }
+
+ proxyDialConn, err := s.dialWithoutProxy(proxyURL)
+ if err != nil {
+ return nil, err
+ }
+
+ proxyClientConn := httputil.NewProxyClientConn(proxyDialConn, nil)
+ _, err = proxyClientConn.Do(&proxyReq)
+ if err != nil && err != httputil.ErrPersistEOF {
+ return nil, err
+ }
+
+ rwc, _ := proxyClientConn.Hijack()
+
+ if req.URL.Scheme != "https" {
+ return rwc, nil
+ }
+
+ host, _, err := net.SplitHostPort(targetHost)
+ if err != nil {
+ return nil, err
+ }
+
+ tlsConfig := s.tlsConfig
+ switch {
+ case tlsConfig == nil:
+ tlsConfig = &tls.Config{ServerName: host}
+ case len(tlsConfig.ServerName) == 0:
+ tlsConfig = tlsConfig.Clone()
+ tlsConfig.ServerName = host
+ }
+
+ tlsConn := tls.Client(rwc, tlsConfig)
+
+ // need to manually call Handshake() so we can call VerifyHostname() below
+ if err := tlsConn.Handshake(); err != nil {
+ return nil, err
+ }
+
+ // Return if we were configured to skip validation
+ if tlsConfig.InsecureSkipVerify {
+ return tlsConn, nil
+ }
+
+ if err := tlsConn.VerifyHostname(tlsConfig.ServerName); err != nil {
+ return nil, err
+ }
+
+ return tlsConn, nil
+}
+
+// dialWithoutProxy dials the host specified by url, using TLS if appropriate.
+func (s *SpdyRoundTripper) dialWithoutProxy(url *url.URL) (net.Conn, error) {
+ dialAddr := netutil.CanonicalAddr(url)
+
+ if url.Scheme == "http" {
+ if s.Dialer == nil {
+ return net.Dial("tcp", dialAddr)
+ } else {
+ return s.Dialer.Dial("tcp", dialAddr)
+ }
+ }
+
+ // TODO validate the TLSClientConfig is set up?
+ var conn *tls.Conn
+ var err error
+ if s.Dialer == nil {
+ conn, err = tls.Dial("tcp", dialAddr, s.tlsConfig)
+ } else {
+ conn, err = tls.DialWithDialer(s.Dialer, "tcp", dialAddr, s.tlsConfig)
+ }
+ if err != nil {
+ return nil, err
+ }
+
+ // Return if we were configured to skip validation
+ if s.tlsConfig != nil && s.tlsConfig.InsecureSkipVerify {
+ return conn, nil
+ }
+
+ host, _, err := net.SplitHostPort(dialAddr)
+ if err != nil {
+ return nil, err
+ }
+ if s.tlsConfig != nil && len(s.tlsConfig.ServerName) > 0 {
+ host = s.tlsConfig.ServerName
+ }
+ err = conn.VerifyHostname(host)
+ if err != nil {
+ return nil, err
+ }
+
+ return conn, nil
+}
+
+// proxyAuth returns, for a given proxy URL, the value to be used for the Proxy-Authorization header
+func (s *SpdyRoundTripper) proxyAuth(proxyURL *url.URL) string {
+ if proxyURL == nil || proxyURL.User == nil {
+ return ""
+ }
+ credentials := proxyURL.User.String()
+ encodedAuth := base64.StdEncoding.EncodeToString([]byte(credentials))
+ return fmt.Sprintf("Basic %s", encodedAuth)
+}
+
+// RoundTrip executes the Request and upgrades it. After a successful upgrade,
+// clients may call SpdyRoundTripper.Connection() to retrieve the upgraded
+// connection.
+func (s *SpdyRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
+ header := utilnet.CloneHeader(req.Header)
+ header.Add(httpstream.HeaderConnection, httpstream.HeaderUpgrade)
+ header.Add(httpstream.HeaderUpgrade, HeaderSpdy31)
+
+ var (
+ conn net.Conn
+ rawResponse []byte
+ err error
+ )
+
+ if s.followRedirects {
+ conn, rawResponse, err = utilnet.ConnectWithRedirects(req.Method, req.URL, header, req.Body, s)
+ } else {
+ clone := utilnet.CloneRequest(req)
+ clone.Header = header
+ conn, err = s.Dial(clone)
+ }
+ if err != nil {
+ return nil, err
+ }
+
+ responseReader := bufio.NewReader(
+ io.MultiReader(
+ bytes.NewBuffer(rawResponse),
+ conn,
+ ),
+ )
+
+ resp, err := http.ReadResponse(responseReader, nil)
+ if err != nil {
+ if conn != nil {
+ conn.Close()
+ }
+ return nil, err
+ }
+
+ s.conn = conn
+
+ return resp, nil
+}
+
+// NewConnection validates the upgrade response, creating and returning a new
+// httpstream.Connection if there were no errors.
+func (s *SpdyRoundTripper) NewConnection(resp *http.Response) (httpstream.Connection, error) {
+ connectionHeader := strings.ToLower(resp.Header.Get(httpstream.HeaderConnection))
+ upgradeHeader := strings.ToLower(resp.Header.Get(httpstream.HeaderUpgrade))
+ if (resp.StatusCode != http.StatusSwitchingProtocols) || !strings.Contains(connectionHeader, strings.ToLower(httpstream.HeaderUpgrade)) || !strings.Contains(upgradeHeader, strings.ToLower(HeaderSpdy31)) {
+ defer resp.Body.Close()
+ responseError := ""
+ responseErrorBytes, err := ioutil.ReadAll(resp.Body)
+ if err != nil {
+ responseError = "unable to read error from server response"
+ } else {
+ // TODO: I don't belong here, I should be abstracted from this class
+ if obj, _, err := statusCodecs.UniversalDecoder().Decode(responseErrorBytes, nil, &metav1.Status{}); err == nil {
+ if status, ok := obj.(*metav1.Status); ok {
+ return nil, &apierrors.StatusError{ErrStatus: *status}
+ }
+ }
+ responseError = string(responseErrorBytes)
+ responseError = strings.TrimSpace(responseError)
+ }
+
+ return nil, fmt.Errorf("unable to upgrade connection: %s", responseError)
+ }
+
+ return NewClientConnection(s.conn)
+}
+
+// statusScheme is private scheme for the decoding here until someone fixes the TODO in NewConnection
+var statusScheme = runtime.NewScheme()
+
+// ParameterCodec knows about query parameters used with the meta v1 API spec.
+var statusCodecs = serializer.NewCodecFactory(statusScheme)
+
+func init() {
+ statusScheme.AddUnversionedTypes(metav1.SchemeGroupVersion,
+ &metav1.Status{},
+ )
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/upgrade.go b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/upgrade.go
new file mode 100644
index 000000000..13353988f
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/upgrade.go
@@ -0,0 +1,107 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package spdy
+
+import (
+ "bufio"
+ "fmt"
+ "io"
+ "net"
+ "net/http"
+ "strings"
+ "sync/atomic"
+
+ "k8s.io/apimachinery/pkg/util/httpstream"
+ "k8s.io/apimachinery/pkg/util/runtime"
+)
+
+const HeaderSpdy31 = "SPDY/3.1"
+
+// responseUpgrader knows how to upgrade HTTP responses. It
+// implements the httpstream.ResponseUpgrader interface.
+type responseUpgrader struct {
+}
+
+// connWrapper is used to wrap a hijacked connection and its bufio.Reader. All
+// calls will be handled directly by the underlying net.Conn with the exception
+// of Read and Close calls, which will consider data in the bufio.Reader. This
+// ensures that data already inside the used bufio.Reader instance is also
+// read.
+type connWrapper struct {
+ net.Conn
+ closed int32
+ bufReader *bufio.Reader
+}
+
+func (w *connWrapper) Read(b []byte) (n int, err error) {
+ if atomic.LoadInt32(&w.closed) == 1 {
+ return 0, io.EOF
+ }
+ return w.bufReader.Read(b)
+}
+
+func (w *connWrapper) Close() error {
+ err := w.Conn.Close()
+ atomic.StoreInt32(&w.closed, 1)
+ return err
+}
+
+// NewResponseUpgrader returns a new httpstream.ResponseUpgrader that is
+// capable of upgrading HTTP responses using SPDY/3.1 via the
+// spdystream package.
+func NewResponseUpgrader() httpstream.ResponseUpgrader {
+ return responseUpgrader{}
+}
+
+// UpgradeResponse upgrades an HTTP response to one that supports multiplexed
+// streams. newStreamHandler will be called synchronously whenever the
+// other end of the upgraded connection creates a new stream.
+func (u responseUpgrader) UpgradeResponse(w http.ResponseWriter, req *http.Request, newStreamHandler httpstream.NewStreamHandler) httpstream.Connection {
+ connectionHeader := strings.ToLower(req.Header.Get(httpstream.HeaderConnection))
+ upgradeHeader := strings.ToLower(req.Header.Get(httpstream.HeaderUpgrade))
+ if !strings.Contains(connectionHeader, strings.ToLower(httpstream.HeaderUpgrade)) || !strings.Contains(upgradeHeader, strings.ToLower(HeaderSpdy31)) {
+ w.WriteHeader(http.StatusBadRequest)
+ fmt.Fprintf(w, "unable to upgrade: missing upgrade headers in request: %#v", req.Header)
+ return nil
+ }
+
+ hijacker, ok := w.(http.Hijacker)
+ if !ok {
+ w.WriteHeader(http.StatusInternalServerError)
+ fmt.Fprintf(w, "unable to upgrade: unable to hijack response")
+ return nil
+ }
+
+ w.Header().Add(httpstream.HeaderConnection, httpstream.HeaderUpgrade)
+ w.Header().Add(httpstream.HeaderUpgrade, HeaderSpdy31)
+ w.WriteHeader(http.StatusSwitchingProtocols)
+
+ conn, bufrw, err := hijacker.Hijack()
+ if err != nil {
+ runtime.HandleError(fmt.Errorf("unable to upgrade: error hijacking response: %v", err))
+ return nil
+ }
+
+ connWithBuf := &connWrapper{Conn: conn, bufReader: bufrw.Reader}
+ spdyConn, err := NewServerConnection(connWithBuf, newStreamHandler)
+ if err != nil {
+ runtime.HandleError(fmt.Errorf("unable to upgrade: error creating SPDY server connection: %v", err))
+ return nil
+ }
+
+ return spdyConn
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go
new file mode 100644
index 000000000..433dfa5cd
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go
@@ -0,0 +1,381 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package intstr is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto
+
+ It has these top-level messages:
+ IntOrString
+*/
+package intstr
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *IntOrString) Reset() { *m = IntOrString{} }
+func (*IntOrString) ProtoMessage() {}
+func (*IntOrString) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func init() {
+ proto.RegisterType((*IntOrString)(nil), "k8s.io.apimachinery.pkg.util.intstr.IntOrString")
+}
+func (m *IntOrString) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *IntOrString) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Type))
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.IntVal))
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.StrVal)))
+ i += copy(dAtA[i:], m.StrVal)
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *IntOrString) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Type))
+ n += 1 + sovGenerated(uint64(m.IntVal))
+ l = len(m.StrVal)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (m *IntOrString) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: IntOrString: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: IntOrString: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ m.Type = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Type |= (Type(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IntVal", wireType)
+ }
+ m.IntVal = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.IntVal |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StrVal", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.StrVal = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 292 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x8f, 0x31, 0x4b, 0x33, 0x31,
+ 0x1c, 0xc6, 0x93, 0xb7, 0x7d, 0x8b, 0x9e, 0xe0, 0x50, 0x1c, 0x8a, 0x43, 0x7a, 0x28, 0xc8, 0x0d,
+ 0x9a, 0xac, 0xe2, 0xd8, 0xad, 0x20, 0x08, 0x57, 0x71, 0x70, 0xbb, 0x6b, 0x63, 0x1a, 0xae, 0x4d,
+ 0x42, 0xee, 0x7f, 0xc2, 0x6d, 0xfd, 0x08, 0xba, 0x39, 0xfa, 0x71, 0x6e, 0xec, 0xd8, 0x41, 0x8a,
+ 0x17, 0xbf, 0x85, 0x93, 0x5c, 0xee, 0x40, 0xa7, 0xe4, 0x79, 0x9e, 0xdf, 0x2f, 0x90, 0xe0, 0x36,
+ 0xbb, 0xce, 0xa9, 0xd4, 0x2c, 0x2b, 0x52, 0x6e, 0x15, 0x07, 0x9e, 0xb3, 0x67, 0xae, 0x16, 0xda,
+ 0xb2, 0x6e, 0x48, 0x8c, 0x5c, 0x27, 0xf3, 0xa5, 0x54, 0xdc, 0x96, 0xcc, 0x64, 0x82, 0x15, 0x20,
+ 0x57, 0x4c, 0x2a, 0xc8, 0xc1, 0x32, 0xc1, 0x15, 0xb7, 0x09, 0xf0, 0x05, 0x35, 0x56, 0x83, 0x1e,
+ 0x9e, 0xb7, 0x12, 0xfd, 0x2b, 0x51, 0x93, 0x09, 0xda, 0x48, 0xb4, 0x95, 0x4e, 0xaf, 0x84, 0x84,
+ 0x65, 0x91, 0xd2, 0xb9, 0x5e, 0x33, 0xa1, 0x85, 0x66, 0xde, 0x4d, 0x8b, 0x27, 0x9f, 0x7c, 0xf0,
+ 0xb7, 0xf6, 0xcd, 0xb3, 0x57, 0x1c, 0x1c, 0x4d, 0x15, 0xdc, 0xd9, 0x19, 0x58, 0xa9, 0xc4, 0x30,
+ 0x0a, 0xfa, 0x50, 0x1a, 0x3e, 0xc2, 0x21, 0x8e, 0x7a, 0x93, 0x93, 0x6a, 0x3f, 0x46, 0x6e, 0x3f,
+ 0xee, 0xdf, 0x97, 0x86, 0x7f, 0x77, 0x67, 0xec, 0x89, 0xe1, 0x45, 0x30, 0x90, 0x0a, 0x1e, 0x92,
+ 0xd5, 0xe8, 0x5f, 0x88, 0xa3, 0xff, 0x93, 0xe3, 0x8e, 0x1d, 0x4c, 0x7d, 0x1b, 0x77, 0x6b, 0xc3,
+ 0xe5, 0x60, 0x1b, 0xae, 0x17, 0xe2, 0xe8, 0xf0, 0x97, 0x9b, 0xf9, 0x36, 0xee, 0xd6, 0x9b, 0x83,
+ 0xb7, 0xf7, 0x31, 0xda, 0x7c, 0x84, 0x68, 0x72, 0x59, 0xd5, 0x04, 0x6d, 0x6b, 0x82, 0x76, 0x35,
+ 0x41, 0x1b, 0x47, 0x70, 0xe5, 0x08, 0xde, 0x3a, 0x82, 0x77, 0x8e, 0xe0, 0x4f, 0x47, 0xf0, 0xcb,
+ 0x17, 0x41, 0x8f, 0x83, 0xf6, 0xc3, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x52, 0xa0, 0xb5, 0xc9,
+ 0x64, 0x01, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto b/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto
new file mode 100644
index 000000000..cccaf6f68
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto
@@ -0,0 +1,43 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.apimachinery.pkg.util.intstr;
+
+// Package-wide variables from generator "generated".
+option go_package = "intstr";
+
+// IntOrString is a type that can hold an int32 or a string. When used in
+// JSON or YAML marshalling and unmarshalling, it produces or consumes the
+// inner type. This allows you to have, for example, a JSON field that can
+// accept a name or number.
+// TODO: Rename to Int32OrString
+//
+// +protobuf=true
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+// +k8s:openapi-gen=true
+message IntOrString {
+ optional int64 type = 1;
+
+ optional int32 intVal = 2;
+
+ optional string strVal = 3;
+}
+
diff --git a/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go b/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go
new file mode 100644
index 000000000..02586b348
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go
@@ -0,0 +1,177 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package intstr
+
+import (
+ "encoding/json"
+ "fmt"
+ "math"
+ "runtime/debug"
+ "strconv"
+ "strings"
+
+ "k8s.io/apimachinery/pkg/openapi"
+
+ "github.com/go-openapi/spec"
+ "github.com/golang/glog"
+ "github.com/google/gofuzz"
+)
+
+// IntOrString is a type that can hold an int32 or a string. When used in
+// JSON or YAML marshalling and unmarshalling, it produces or consumes the
+// inner type. This allows you to have, for example, a JSON field that can
+// accept a name or number.
+// TODO: Rename to Int32OrString
+//
+// +protobuf=true
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+// +k8s:openapi-gen=true
+type IntOrString struct {
+ Type Type `protobuf:"varint,1,opt,name=type,casttype=Type"`
+ IntVal int32 `protobuf:"varint,2,opt,name=intVal"`
+ StrVal string `protobuf:"bytes,3,opt,name=strVal"`
+}
+
+// Type represents the stored type of IntOrString.
+type Type int
+
+const (
+ Int Type = iota // The IntOrString holds an int.
+ String // The IntOrString holds a string.
+)
+
+// FromInt creates an IntOrString object with an int32 value. It is
+// your responsibility not to call this method with a value greater
+// than int32.
+// TODO: convert to (val int32)
+func FromInt(val int) IntOrString {
+ if val > math.MaxInt32 || val < math.MinInt32 {
+ glog.Errorf("value: %d overflows int32\n%s\n", val, debug.Stack())
+ }
+ return IntOrString{Type: Int, IntVal: int32(val)}
+}
+
+// FromString creates an IntOrString object with a string value.
+func FromString(val string) IntOrString {
+ return IntOrString{Type: String, StrVal: val}
+}
+
+// Parse the given string and try to convert it to an integer before
+// setting it as a string value.
+func Parse(val string) IntOrString {
+ i, err := strconv.Atoi(val)
+ if err != nil {
+ return FromString(val)
+ }
+ return FromInt(i)
+}
+
+// UnmarshalJSON implements the json.Unmarshaller interface.
+func (intstr *IntOrString) UnmarshalJSON(value []byte) error {
+ if value[0] == '"' {
+ intstr.Type = String
+ return json.Unmarshal(value, &intstr.StrVal)
+ }
+ intstr.Type = Int
+ return json.Unmarshal(value, &intstr.IntVal)
+}
+
+// String returns the string value, or the Itoa of the int value.
+func (intstr *IntOrString) String() string {
+ if intstr.Type == String {
+ return intstr.StrVal
+ }
+ return strconv.Itoa(intstr.IntValue())
+}
+
+// IntValue returns the IntVal if type Int, or if
+// it is a String, will attempt a conversion to int.
+func (intstr *IntOrString) IntValue() int {
+ if intstr.Type == String {
+ i, _ := strconv.Atoi(intstr.StrVal)
+ return i
+ }
+ return int(intstr.IntVal)
+}
+
+// MarshalJSON implements the json.Marshaller interface.
+func (intstr IntOrString) MarshalJSON() ([]byte, error) {
+ switch intstr.Type {
+ case Int:
+ return json.Marshal(intstr.IntVal)
+ case String:
+ return json.Marshal(intstr.StrVal)
+ default:
+ return []byte{}, fmt.Errorf("impossible IntOrString.Type")
+ }
+}
+
+func (_ IntOrString) OpenAPIDefinition() openapi.OpenAPIDefinition {
+ return openapi.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Type: []string{"string"},
+ Format: "int-or-string",
+ },
+ },
+ }
+}
+
+func (intstr *IntOrString) Fuzz(c fuzz.Continue) {
+ if intstr == nil {
+ return
+ }
+ if c.RandBool() {
+ intstr.Type = Int
+ c.Fuzz(&intstr.IntVal)
+ intstr.StrVal = ""
+ } else {
+ intstr.Type = String
+ intstr.IntVal = 0
+ c.Fuzz(&intstr.StrVal)
+ }
+}
+
+func GetValueFromIntOrPercent(intOrPercent *IntOrString, total int, roundUp bool) (int, error) {
+ value, isPercent, err := getIntOrPercentValue(intOrPercent)
+ if err != nil {
+ return 0, fmt.Errorf("invalid value for IntOrString: %v", err)
+ }
+ if isPercent {
+ if roundUp {
+ value = int(math.Ceil(float64(value) * (float64(total)) / 100))
+ } else {
+ value = int(math.Floor(float64(value) * (float64(total)) / 100))
+ }
+ }
+ return value, nil
+}
+
+func getIntOrPercentValue(intOrStr *IntOrString) (int, bool, error) {
+ switch intOrStr.Type {
+ case Int:
+ return intOrStr.IntValue(), false, nil
+ case String:
+ s := strings.Replace(intOrStr.StrVal, "%", "", -1)
+ v, err := strconv.Atoi(s)
+ if err != nil {
+ return 0, false, fmt.Errorf("invalid value %q: %v", intOrStr.StrVal, err)
+ }
+ return int(v), true, nil
+ }
+ return 0, false, fmt.Errorf("invalid type: neither int nor percentage")
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/json/json.go b/vendor/k8s.io/apimachinery/pkg/util/json/json.go
new file mode 100644
index 000000000..e8054a12e
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/json/json.go
@@ -0,0 +1,107 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package json
+
+import (
+ "bytes"
+ "encoding/json"
+ "io"
+)
+
+// NewEncoder delegates to json.NewEncoder
+// It is only here so this package can be a drop-in for common encoding/json uses
+func NewEncoder(w io.Writer) *json.Encoder {
+ return json.NewEncoder(w)
+}
+
+// Marshal delegates to json.Marshal
+// It is only here so this package can be a drop-in for common encoding/json uses
+func Marshal(v interface{}) ([]byte, error) {
+ return json.Marshal(v)
+}
+
+// Unmarshal unmarshals the given data
+// If v is a *map[string]interface{}, numbers are converted to int64 or float64
+func Unmarshal(data []byte, v interface{}) error {
+ switch v := v.(type) {
+ case *map[string]interface{}:
+ // Build a decoder from the given data
+ decoder := json.NewDecoder(bytes.NewBuffer(data))
+ // Preserve numbers, rather than casting to float64 automatically
+ decoder.UseNumber()
+ // Run the decode
+ if err := decoder.Decode(v); err != nil {
+ return err
+ }
+ // If the decode succeeds, post-process the map to convert json.Number objects to int64 or float64
+ return convertMapNumbers(*v)
+
+ default:
+ return json.Unmarshal(data, v)
+ }
+}
+
+// convertMapNumbers traverses the map, converting any json.Number values to int64 or float64.
+// values which are map[string]interface{} or []interface{} are recursively visited
+func convertMapNumbers(m map[string]interface{}) error {
+ var err error
+ for k, v := range m {
+ switch v := v.(type) {
+ case json.Number:
+ m[k], err = convertNumber(v)
+ case map[string]interface{}:
+ err = convertMapNumbers(v)
+ case []interface{}:
+ err = convertSliceNumbers(v)
+ }
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// convertSliceNumbers traverses the slice, converting any json.Number values to int64 or float64.
+// values which are map[string]interface{} or []interface{} are recursively visited
+func convertSliceNumbers(s []interface{}) error {
+ var err error
+ for i, v := range s {
+ switch v := v.(type) {
+ case json.Number:
+ s[i], err = convertNumber(v)
+ case map[string]interface{}:
+ err = convertMapNumbers(v)
+ case []interface{}:
+ err = convertSliceNumbers(v)
+ }
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// convertNumber converts a json.Number to an int64 or float64, or returns an error
+func convertNumber(n json.Number) (interface{}, error) {
+ // Attempt to convert to an int64 first
+ if i, err := n.Int64(); err == nil {
+ return i, nil
+ }
+ // Return a float64 (default json.Decode() behavior)
+ // An overflow will return an error
+ return n.Float64()
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/mergepatch/errors.go b/vendor/k8s.io/apimachinery/pkg/util/mergepatch/errors.go
new file mode 100644
index 000000000..ac3c1e8cf
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/mergepatch/errors.go
@@ -0,0 +1,101 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package mergepatch
+
+import (
+ "errors"
+ "fmt"
+ "reflect"
+)
+
+var (
+ ErrBadJSONDoc = errors.New("invalid JSON document")
+ ErrNoListOfLists = errors.New("lists of lists are not supported")
+ ErrBadPatchFormatForPrimitiveList = errors.New("invalid patch format of primitive list")
+ ErrBadPatchFormatForRetainKeys = errors.New("invalid patch format of retainKeys")
+ ErrBadPatchFormatForSetElementOrderList = errors.New("invalid patch format of setElementOrder list")
+ ErrPatchContentNotMatchRetainKeys = errors.New("patch content doesn't match retainKeys list")
+)
+
+func ErrNoMergeKey(m map[string]interface{}, k string) error {
+ return fmt.Errorf("map: %v does not contain declared merge key: %s", m, k)
+}
+
+func ErrBadArgType(expected, actual interface{}) error {
+ return fmt.Errorf("expected a %s, but received a %s",
+ reflect.TypeOf(expected),
+ reflect.TypeOf(actual))
+}
+
+func ErrBadArgKind(expected, actual interface{}) error {
+ var expectedKindString, actualKindString string
+ if expected == nil {
+ expectedKindString = "nil"
+ } else {
+ expectedKindString = reflect.TypeOf(expected).Kind().String()
+ }
+ if actual == nil {
+ actualKindString = "nil"
+ } else {
+ actualKindString = reflect.TypeOf(actual).Kind().String()
+ }
+ return fmt.Errorf("expected a %s, but received a %s", expectedKindString, actualKindString)
+}
+
+func ErrBadPatchType(t interface{}, m map[string]interface{}) error {
+ return fmt.Errorf("unknown patch type: %s in map: %v", t, m)
+}
+
+// IsPreconditionFailed returns true if the provided error indicates
+// a precondition failed.
+func IsPreconditionFailed(err error) bool {
+ _, ok := err.(ErrPreconditionFailed)
+ return ok
+}
+
+type ErrPreconditionFailed struct {
+ message string
+}
+
+func NewErrPreconditionFailed(target map[string]interface{}) ErrPreconditionFailed {
+ s := fmt.Sprintf("precondition failed for: %v", target)
+ return ErrPreconditionFailed{s}
+}
+
+func (err ErrPreconditionFailed) Error() string {
+ return err.message
+}
+
+type ErrConflict struct {
+ message string
+}
+
+func NewErrConflict(patch, current string) ErrConflict {
+ s := fmt.Sprintf("patch:\n%s\nconflicts with changes made from original to current:\n%s\n", patch, current)
+ return ErrConflict{s}
+}
+
+func (err ErrConflict) Error() string {
+ return err.message
+}
+
+// IsConflict returns true if the provided error indicates
+// a conflict between the patch and the current configuration.
+func IsConflict(err error) bool {
+ _, ok := err.(ErrConflict)
+ return ok
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/mergepatch/util.go b/vendor/k8s.io/apimachinery/pkg/util/mergepatch/util.go
new file mode 100644
index 000000000..9261290a7
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/mergepatch/util.go
@@ -0,0 +1,133 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package mergepatch
+
+import (
+ "fmt"
+ "reflect"
+
+ "github.com/davecgh/go-spew/spew"
+ "github.com/ghodss/yaml"
+)
+
+// PreconditionFunc asserts that an incompatible change is not present within a patch.
+type PreconditionFunc func(interface{}) bool
+
+// RequireKeyUnchanged returns a precondition function that fails if the provided key
+// is present in the patch (indicating that its value has changed).
+func RequireKeyUnchanged(key string) PreconditionFunc {
+ return func(patch interface{}) bool {
+ patchMap, ok := patch.(map[string]interface{})
+ if !ok {
+ return true
+ }
+
+ // The presence of key means that its value has been changed, so the test fails.
+ _, ok = patchMap[key]
+ return !ok
+ }
+}
+
+// RequireMetadataKeyUnchanged creates a precondition function that fails
+// if the metadata.key is present in the patch (indicating its value
+// has changed).
+func RequireMetadataKeyUnchanged(key string) PreconditionFunc {
+ return func(patch interface{}) bool {
+ patchMap, ok := patch.(map[string]interface{})
+ if !ok {
+ return true
+ }
+ patchMap1, ok := patchMap["metadata"]
+ if !ok {
+ return true
+ }
+ patchMap2, ok := patchMap1.(map[string]interface{})
+ if !ok {
+ return true
+ }
+ _, ok = patchMap2[key]
+ return !ok
+ }
+}
+
+func ToYAMLOrError(v interface{}) string {
+ y, err := toYAML(v)
+ if err != nil {
+ return err.Error()
+ }
+
+ return y
+}
+
+func toYAML(v interface{}) (string, error) {
+ y, err := yaml.Marshal(v)
+ if err != nil {
+ return "", fmt.Errorf("yaml marshal failed:%v\n%v\n", err, spew.Sdump(v))
+ }
+
+ return string(y), nil
+}
+
+// HasConflicts returns true if the left and right JSON interface objects overlap with
+// different values in any key. All keys are required to be strings. Since patches of the
+// same Type have congruent keys, this is valid for multiple patch types. This method
+// supports JSON merge patch semantics.
+//
+// NOTE: Numbers with different types (e.g. int(0) vs int64(0)) will be detected as conflicts.
+// Make sure the unmarshaling of left and right are consistent (e.g. use the same library).
+func HasConflicts(left, right interface{}) (bool, error) {
+ switch typedLeft := left.(type) {
+ case map[string]interface{}:
+ switch typedRight := right.(type) {
+ case map[string]interface{}:
+ for key, leftValue := range typedLeft {
+ rightValue, ok := typedRight[key]
+ if !ok {
+ continue
+ }
+ if conflict, err := HasConflicts(leftValue, rightValue); err != nil || conflict {
+ return conflict, err
+ }
+ }
+
+ return false, nil
+ default:
+ return true, nil
+ }
+ case []interface{}:
+ switch typedRight := right.(type) {
+ case []interface{}:
+ if len(typedLeft) != len(typedRight) {
+ return true, nil
+ }
+
+ for i := range typedLeft {
+ if conflict, err := HasConflicts(typedLeft[i], typedRight[i]); err != nil || conflict {
+ return conflict, err
+ }
+ }
+
+ return false, nil
+ default:
+ return true, nil
+ }
+ case string, float64, bool, int, int64, nil:
+ return !reflect.DeepEqual(left, right), nil
+ default:
+ return true, fmt.Errorf("unknown type: %v", reflect.TypeOf(left))
+ }
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/http.go b/vendor/k8s.io/apimachinery/pkg/util/net/http.go
new file mode 100644
index 000000000..adb80813b
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/net/http.go
@@ -0,0 +1,401 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package net
+
+import (
+ "bufio"
+ "bytes"
+ "crypto/tls"
+ "fmt"
+ "io"
+ "net"
+ "net/http"
+ "net/url"
+ "os"
+ "strconv"
+ "strings"
+
+ "github.com/golang/glog"
+ "golang.org/x/net/http2"
+)
+
+// IsProbableEOF returns true if the given error resembles a connection termination
+// scenario that would justify assuming that the watch is empty.
+// These errors are what the Go http stack returns back to us which are general
+// connection closure errors (strongly correlated) and callers that need to
+// differentiate probable errors in connection behavior between normal "this is
+// disconnected" should use the method.
+func IsProbableEOF(err error) bool {
+ if uerr, ok := err.(*url.Error); ok {
+ err = uerr.Err
+ }
+ switch {
+ case err == io.EOF:
+ return true
+ case err.Error() == "http: can't write HTTP request on broken connection":
+ return true
+ case strings.Contains(err.Error(), "connection reset by peer"):
+ return true
+ case strings.Contains(strings.ToLower(err.Error()), "use of closed network connection"):
+ return true
+ }
+ return false
+}
+
+var defaultTransport = http.DefaultTransport.(*http.Transport)
+
+// SetOldTransportDefaults applies the defaults from http.DefaultTransport
+// for the Proxy, Dial, and TLSHandshakeTimeout fields if unset
+func SetOldTransportDefaults(t *http.Transport) *http.Transport {
+ if t.Proxy == nil || isDefault(t.Proxy) {
+ // http.ProxyFromEnvironment doesn't respect CIDRs and that makes it impossible to exclude things like pod and service IPs from proxy settings
+ // ProxierWithNoProxyCIDR allows CIDR rules in NO_PROXY
+ t.Proxy = NewProxierWithNoProxyCIDR(http.ProxyFromEnvironment)
+ }
+ if t.Dial == nil {
+ t.Dial = defaultTransport.Dial
+ }
+ if t.TLSHandshakeTimeout == 0 {
+ t.TLSHandshakeTimeout = defaultTransport.TLSHandshakeTimeout
+ }
+ return t
+}
+
+// SetTransportDefaults applies the defaults from http.DefaultTransport
+// for the Proxy, Dial, and TLSHandshakeTimeout fields if unset
+func SetTransportDefaults(t *http.Transport) *http.Transport {
+ t = SetOldTransportDefaults(t)
+ // Allow clients to disable http2 if needed.
+ if s := os.Getenv("DISABLE_HTTP2"); len(s) > 0 {
+ glog.Infof("HTTP2 has been explicitly disabled")
+ } else {
+ if err := http2.ConfigureTransport(t); err != nil {
+ glog.Warningf("Transport failed http2 configuration: %v", err)
+ }
+ }
+ return t
+}
+
+type RoundTripperWrapper interface {
+ http.RoundTripper
+ WrappedRoundTripper() http.RoundTripper
+}
+
+type DialFunc func(net, addr string) (net.Conn, error)
+
+func DialerFor(transport http.RoundTripper) (DialFunc, error) {
+ if transport == nil {
+ return nil, nil
+ }
+
+ switch transport := transport.(type) {
+ case *http.Transport:
+ return transport.Dial, nil
+ case RoundTripperWrapper:
+ return DialerFor(transport.WrappedRoundTripper())
+ default:
+ return nil, fmt.Errorf("unknown transport type: %v", transport)
+ }
+}
+
+type TLSClientConfigHolder interface {
+ TLSClientConfig() *tls.Config
+}
+
+func TLSClientConfig(transport http.RoundTripper) (*tls.Config, error) {
+ if transport == nil {
+ return nil, nil
+ }
+
+ switch transport := transport.(type) {
+ case *http.Transport:
+ return transport.TLSClientConfig, nil
+ case TLSClientConfigHolder:
+ return transport.TLSClientConfig(), nil
+ case RoundTripperWrapper:
+ return TLSClientConfig(transport.WrappedRoundTripper())
+ default:
+ return nil, fmt.Errorf("unknown transport type: %v", transport)
+ }
+}
+
+func FormatURL(scheme string, host string, port int, path string) *url.URL {
+ return &url.URL{
+ Scheme: scheme,
+ Host: net.JoinHostPort(host, strconv.Itoa(port)),
+ Path: path,
+ }
+}
+
+func GetHTTPClient(req *http.Request) string {
+ if userAgent, ok := req.Header["User-Agent"]; ok {
+ if len(userAgent) > 0 {
+ return userAgent[0]
+ }
+ }
+ return "unknown"
+}
+
+// SourceIPs splits the comma separated X-Forwarded-For header or returns the X-Real-Ip header or req.RemoteAddr,
+// in that order, ignoring invalid IPs. It returns nil if all of these are empty or invalid.
+func SourceIPs(req *http.Request) []net.IP {
+ hdr := req.Header
+ // First check the X-Forwarded-For header for requests via proxy.
+ hdrForwardedFor := hdr.Get("X-Forwarded-For")
+ forwardedForIPs := []net.IP{}
+ if hdrForwardedFor != "" {
+ // X-Forwarded-For can be a csv of IPs in case of multiple proxies.
+ // Use the first valid one.
+ parts := strings.Split(hdrForwardedFor, ",")
+ for _, part := range parts {
+ ip := net.ParseIP(strings.TrimSpace(part))
+ if ip != nil {
+ forwardedForIPs = append(forwardedForIPs, ip)
+ }
+ }
+ }
+ if len(forwardedForIPs) > 0 {
+ return forwardedForIPs
+ }
+
+ // Try the X-Real-Ip header.
+ hdrRealIp := hdr.Get("X-Real-Ip")
+ if hdrRealIp != "" {
+ ip := net.ParseIP(hdrRealIp)
+ if ip != nil {
+ return []net.IP{ip}
+ }
+ }
+
+ // Fallback to Remote Address in request, which will give the correct client IP when there is no proxy.
+ // Remote Address in Go's HTTP server is in the form host:port so we need to split that first.
+ host, _, err := net.SplitHostPort(req.RemoteAddr)
+ if err == nil {
+ if remoteIP := net.ParseIP(host); remoteIP != nil {
+ return []net.IP{remoteIP}
+ }
+ }
+
+ // Fallback if Remote Address was just IP.
+ if remoteIP := net.ParseIP(req.RemoteAddr); remoteIP != nil {
+ return []net.IP{remoteIP}
+ }
+
+ return nil
+}
+
+// Extracts and returns the clients IP from the given request.
+// Looks at X-Forwarded-For header, X-Real-Ip header and request.RemoteAddr in that order.
+// Returns nil if none of them are set or is set to an invalid value.
+func GetClientIP(req *http.Request) net.IP {
+ ips := SourceIPs(req)
+ if len(ips) == 0 {
+ return nil
+ }
+ return ips[0]
+}
+
+// Prepares the X-Forwarded-For header for another forwarding hop by appending the previous sender's
+// IP address to the X-Forwarded-For chain.
+func AppendForwardedForHeader(req *http.Request) {
+ // Copied from net/http/httputil/reverseproxy.go:
+ if clientIP, _, err := net.SplitHostPort(req.RemoteAddr); err == nil {
+ // If we aren't the first proxy retain prior
+ // X-Forwarded-For information as a comma+space
+ // separated list and fold multiple headers into one.
+ if prior, ok := req.Header["X-Forwarded-For"]; ok {
+ clientIP = strings.Join(prior, ", ") + ", " + clientIP
+ }
+ req.Header.Set("X-Forwarded-For", clientIP)
+ }
+}
+
+var defaultProxyFuncPointer = fmt.Sprintf("%p", http.ProxyFromEnvironment)
+
+// isDefault checks to see if the transportProxierFunc is pointing to the default one
+func isDefault(transportProxier func(*http.Request) (*url.URL, error)) bool {
+ transportProxierPointer := fmt.Sprintf("%p", transportProxier)
+ return transportProxierPointer == defaultProxyFuncPointer
+}
+
+// NewProxierWithNoProxyCIDR constructs a Proxier function that respects CIDRs in NO_PROXY and delegates if
+// no matching CIDRs are found
+func NewProxierWithNoProxyCIDR(delegate func(req *http.Request) (*url.URL, error)) func(req *http.Request) (*url.URL, error) {
+ // we wrap the default method, so we only need to perform our check if the NO_PROXY envvar has a CIDR in it
+ noProxyEnv := os.Getenv("NO_PROXY")
+ noProxyRules := strings.Split(noProxyEnv, ",")
+
+ cidrs := []*net.IPNet{}
+ for _, noProxyRule := range noProxyRules {
+ _, cidr, _ := net.ParseCIDR(noProxyRule)
+ if cidr != nil {
+ cidrs = append(cidrs, cidr)
+ }
+ }
+
+ if len(cidrs) == 0 {
+ return delegate
+ }
+
+ return func(req *http.Request) (*url.URL, error) {
+ host := req.URL.Host
+ // for some urls, the Host is already the host, not the host:port
+ if net.ParseIP(host) == nil {
+ var err error
+ host, _, err = net.SplitHostPort(req.URL.Host)
+ if err != nil {
+ return delegate(req)
+ }
+ }
+
+ ip := net.ParseIP(host)
+ if ip == nil {
+ return delegate(req)
+ }
+
+ for _, cidr := range cidrs {
+ if cidr.Contains(ip) {
+ return nil, nil
+ }
+ }
+
+ return delegate(req)
+ }
+}
+
+// Dialer dials a host and writes a request to it.
+type Dialer interface {
+ // Dial connects to the host specified by req's URL, writes the request to the connection, and
+ // returns the opened net.Conn.
+ Dial(req *http.Request) (net.Conn, error)
+}
+
+// ConnectWithRedirects uses dialer to send req, following up to 10 redirects (relative to
+// originalLocation). It returns the opened net.Conn and the raw response bytes.
+func ConnectWithRedirects(originalMethod string, originalLocation *url.URL, header http.Header, originalBody io.Reader, dialer Dialer) (net.Conn, []byte, error) {
+ const (
+ maxRedirects = 10
+ maxResponseSize = 16384 // play it safe to allow the potential for lots of / large headers
+ )
+
+ var (
+ location = originalLocation
+ method = originalMethod
+ intermediateConn net.Conn
+ rawResponse = bytes.NewBuffer(make([]byte, 0, 256))
+ body = originalBody
+ )
+
+ defer func() {
+ if intermediateConn != nil {
+ intermediateConn.Close()
+ }
+ }()
+
+redirectLoop:
+ for redirects := 0; ; redirects++ {
+ if redirects > maxRedirects {
+ return nil, nil, fmt.Errorf("too many redirects (%d)", redirects)
+ }
+
+ req, err := http.NewRequest(method, location.String(), body)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ req.Header = header
+
+ intermediateConn, err = dialer.Dial(req)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ // Peek at the backend response.
+ rawResponse.Reset()
+ respReader := bufio.NewReader(io.TeeReader(
+ io.LimitReader(intermediateConn, maxResponseSize), // Don't read more than maxResponseSize bytes.
+ rawResponse)) // Save the raw response.
+ resp, err := http.ReadResponse(respReader, nil)
+ if err != nil {
+ // Unable to read the backend response; let the client handle it.
+ glog.Warningf("Error reading backend response: %v", err)
+ break redirectLoop
+ }
+
+ switch resp.StatusCode {
+ case http.StatusFound:
+ // Redirect, continue.
+ default:
+ // Don't redirect.
+ break redirectLoop
+ }
+
+ // Redirected requests switch to "GET" according to the HTTP spec:
+ // https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3
+ method = "GET"
+ // don't send a body when following redirects
+ body = nil
+
+ resp.Body.Close() // not used
+
+ // Reset the connection.
+ intermediateConn.Close()
+ intermediateConn = nil
+
+ // Prepare to follow the redirect.
+ redirectStr := resp.Header.Get("Location")
+ if redirectStr == "" {
+ return nil, nil, fmt.Errorf("%d response missing Location header", resp.StatusCode)
+ }
+ // We have to parse relative to the current location, NOT originalLocation. For example,
+ // if we request http://foo.com/a and get back "http://bar.com/b", the result should be
+ // http://bar.com/b. If we then make that request and get back a redirect to "/c", the result
+ // should be http://bar.com/c, not http://foo.com/c.
+ location, err = location.Parse(redirectStr)
+ if err != nil {
+ return nil, nil, fmt.Errorf("malformed Location header: %v", err)
+ }
+ }
+
+ connToReturn := intermediateConn
+ intermediateConn = nil // Don't close the connection when we return it.
+ return connToReturn, rawResponse.Bytes(), nil
+}
+
+// CloneRequest creates a shallow copy of the request along with a deep copy of the Headers.
+func CloneRequest(req *http.Request) *http.Request {
+ r := new(http.Request)
+
+ // shallow clone
+ *r = *req
+
+ // deep copy headers
+ r.Header = CloneHeader(req.Header)
+
+ return r
+}
+
+// CloneHeader creates a deep copy of an http.Header.
+func CloneHeader(in http.Header) http.Header {
+ out := make(http.Header, len(in))
+ for key, values := range in {
+ newValues := make([]string, len(values))
+ copy(newValues, values)
+ out[key] = newValues
+ }
+ return out
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/interface.go b/vendor/k8s.io/apimachinery/pkg/util/net/interface.go
new file mode 100644
index 000000000..a1e53d2e4
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/net/interface.go
@@ -0,0 +1,278 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package net
+
+import (
+ "bufio"
+ "encoding/hex"
+ "fmt"
+ "io"
+ "net"
+ "os"
+
+ "strings"
+
+ "github.com/golang/glog"
+)
+
+type Route struct {
+ Interface string
+ Destination net.IP
+ Gateway net.IP
+ // TODO: add more fields here if needed
+}
+
+func getRoutes(input io.Reader) ([]Route, error) {
+ routes := []Route{}
+ if input == nil {
+ return nil, fmt.Errorf("input is nil")
+ }
+ scanner := bufio.NewReader(input)
+ for {
+ line, err := scanner.ReadString('\n')
+ if err == io.EOF {
+ break
+ }
+ //ignore the headers in the route info
+ if strings.HasPrefix(line, "Iface") {
+ continue
+ }
+ fields := strings.Fields(line)
+ routes = append(routes, Route{})
+ route := &routes[len(routes)-1]
+ route.Interface = fields[0]
+ ip, err := parseIP(fields[1])
+ if err != nil {
+ return nil, err
+ }
+ route.Destination = ip
+ ip, err = parseIP(fields[2])
+ if err != nil {
+ return nil, err
+ }
+ route.Gateway = ip
+ }
+ return routes, nil
+}
+
+func parseIP(str string) (net.IP, error) {
+ if str == "" {
+ return nil, fmt.Errorf("input is nil")
+ }
+ bytes, err := hex.DecodeString(str)
+ if err != nil {
+ return nil, err
+ }
+ //TODO add ipv6 support
+ if len(bytes) != net.IPv4len {
+ return nil, fmt.Errorf("only IPv4 is supported")
+ }
+ bytes[0], bytes[1], bytes[2], bytes[3] = bytes[3], bytes[2], bytes[1], bytes[0]
+ return net.IP(bytes), nil
+}
+
+func isInterfaceUp(intf *net.Interface) bool {
+ if intf == nil {
+ return false
+ }
+ if intf.Flags&net.FlagUp != 0 {
+ glog.V(4).Infof("Interface %v is up", intf.Name)
+ return true
+ }
+ return false
+}
+
+//getFinalIP method receives all the IP addrs of a Interface
+//and returns a nil if the address is Loopback, Ipv6, link-local or nil.
+//It returns a valid IPv4 if an Ipv4 address is found in the array.
+func getFinalIP(addrs []net.Addr) (net.IP, error) {
+ if len(addrs) > 0 {
+ for i := range addrs {
+ glog.V(4).Infof("Checking addr %s.", addrs[i].String())
+ ip, _, err := net.ParseCIDR(addrs[i].String())
+ if err != nil {
+ return nil, err
+ }
+ //Only IPv4
+ //TODO : add IPv6 support
+ if ip.To4() != nil {
+ if !ip.IsLoopback() && !ip.IsLinkLocalMulticast() && !ip.IsLinkLocalUnicast() {
+ glog.V(4).Infof("IP found %v", ip)
+ return ip, nil
+ } else {
+ glog.V(4).Infof("Loopback/link-local found %v", ip)
+ }
+ } else {
+ glog.V(4).Infof("%v is not a valid IPv4 address", ip)
+ }
+
+ }
+ }
+ return nil, nil
+}
+
+func getIPFromInterface(intfName string, nw networkInterfacer) (net.IP, error) {
+ intf, err := nw.InterfaceByName(intfName)
+ if err != nil {
+ return nil, err
+ }
+ if isInterfaceUp(intf) {
+ addrs, err := nw.Addrs(intf)
+ if err != nil {
+ return nil, err
+ }
+ glog.V(4).Infof("Interface %q has %d addresses :%v.", intfName, len(addrs), addrs)
+ finalIP, err := getFinalIP(addrs)
+ if err != nil {
+ return nil, err
+ }
+ if finalIP != nil {
+ glog.V(4).Infof("valid IPv4 address for interface %q found as %v.", intfName, finalIP)
+ return finalIP, nil
+ }
+ }
+
+ return nil, nil
+}
+
+func flagsSet(flags net.Flags, test net.Flags) bool {
+ return flags&test != 0
+}
+
+func flagsClear(flags net.Flags, test net.Flags) bool {
+ return flags&test == 0
+}
+
+func chooseHostInterfaceNativeGo() (net.IP, error) {
+ intfs, err := net.Interfaces()
+ if err != nil {
+ return nil, err
+ }
+ i := 0
+ var ip net.IP
+ for i = range intfs {
+ if flagsSet(intfs[i].Flags, net.FlagUp) && flagsClear(intfs[i].Flags, net.FlagLoopback|net.FlagPointToPoint) {
+ addrs, err := intfs[i].Addrs()
+ if err != nil {
+ return nil, err
+ }
+ if len(addrs) > 0 {
+ for _, addr := range addrs {
+ if addrIP, _, err := net.ParseCIDR(addr.String()); err == nil {
+ if addrIP.To4() != nil {
+ ip = addrIP.To4()
+ if !ip.IsLinkLocalMulticast() && !ip.IsLinkLocalUnicast() {
+ break
+ }
+ }
+ }
+ }
+ if ip != nil {
+ // This interface should suffice.
+ break
+ }
+ }
+ }
+ }
+ if ip == nil {
+ return nil, fmt.Errorf("no acceptable interface from host")
+ }
+ glog.V(4).Infof("Choosing interface %s (IP %v) as default", intfs[i].Name, ip)
+ return ip, nil
+}
+
+//ChooseHostInterface is a method used fetch an IP for a daemon.
+//It uses data from /proc/net/route file.
+//For a node with no internet connection ,it returns error
+//For a multi n/w interface node it returns the IP of the interface with gateway on it.
+func ChooseHostInterface() (net.IP, error) {
+ inFile, err := os.Open("/proc/net/route")
+ if err != nil {
+ if os.IsNotExist(err) {
+ return chooseHostInterfaceNativeGo()
+ }
+ return nil, err
+ }
+ defer inFile.Close()
+ var nw networkInterfacer = networkInterface{}
+ return chooseHostInterfaceFromRoute(inFile, nw)
+}
+
+type networkInterfacer interface {
+ InterfaceByName(intfName string) (*net.Interface, error)
+ Addrs(intf *net.Interface) ([]net.Addr, error)
+}
+
+type networkInterface struct{}
+
+func (_ networkInterface) InterfaceByName(intfName string) (*net.Interface, error) {
+ intf, err := net.InterfaceByName(intfName)
+ if err != nil {
+ return nil, err
+ }
+ return intf, nil
+}
+
+func (_ networkInterface) Addrs(intf *net.Interface) ([]net.Addr, error) {
+ addrs, err := intf.Addrs()
+ if err != nil {
+ return nil, err
+ }
+ return addrs, nil
+}
+
+func chooseHostInterfaceFromRoute(inFile io.Reader, nw networkInterfacer) (net.IP, error) {
+ routes, err := getRoutes(inFile)
+ if err != nil {
+ return nil, err
+ }
+ zero := net.IP{0, 0, 0, 0}
+ var finalIP net.IP
+ for i := range routes {
+ //find interface with gateway
+ if routes[i].Destination.Equal(zero) {
+ glog.V(4).Infof("Default route transits interface %q", routes[i].Interface)
+ finalIP, err := getIPFromInterface(routes[i].Interface, nw)
+ if err != nil {
+ return nil, err
+ }
+ if finalIP != nil {
+ glog.V(4).Infof("Choosing IP %v ", finalIP)
+ return finalIP, nil
+ }
+ }
+ }
+ glog.V(4).Infof("No valid IP found")
+ if finalIP == nil {
+ return nil, fmt.Errorf("Unable to select an IP.")
+ }
+ return nil, nil
+}
+
+// If bind-address is usable, return it directly
+// If bind-address is not usable (unset, 0.0.0.0, or loopback), we will use the host's default
+// interface.
+func ChooseBindAddress(bindAddress net.IP) (net.IP, error) {
+ if bindAddress == nil || bindAddress.IsUnspecified() || bindAddress.IsLoopback() {
+ hostIP, err := ChooseHostInterface()
+ if err != nil {
+ return nil, err
+ }
+ bindAddress = hostIP
+ }
+ return bindAddress, nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/port_range.go b/vendor/k8s.io/apimachinery/pkg/util/net/port_range.go
new file mode 100644
index 000000000..6a50e6186
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/net/port_range.go
@@ -0,0 +1,113 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package net
+
+import (
+ "fmt"
+ "strconv"
+ "strings"
+)
+
+// PortRange represents a range of TCP/UDP ports. To represent a single port,
+// set Size to 1.
+type PortRange struct {
+ Base int
+ Size int
+}
+
+// Contains tests whether a given port falls within the PortRange.
+func (pr *PortRange) Contains(p int) bool {
+ return (p >= pr.Base) && ((p - pr.Base) < pr.Size)
+}
+
+// String converts the PortRange to a string representation, which can be
+// parsed by PortRange.Set or ParsePortRange.
+func (pr PortRange) String() string {
+ if pr.Size == 0 {
+ return ""
+ }
+ return fmt.Sprintf("%d-%d", pr.Base, pr.Base+pr.Size-1)
+}
+
+// Set parses a string of the form "min-max", inclusive at both ends, and
+// sets the PortRange from it. This is part of the flag.Value and pflag.Value
+// interfaces.
+func (pr *PortRange) Set(value string) error {
+ value = strings.TrimSpace(value)
+
+ // TODO: Accept "80" syntax
+ // TODO: Accept "80+8" syntax
+
+ if value == "" {
+ pr.Base = 0
+ pr.Size = 0
+ return nil
+ }
+
+ hyphenIndex := strings.Index(value, "-")
+ if hyphenIndex == -1 {
+ return fmt.Errorf("expected hyphen in port range")
+ }
+
+ var err error
+ var low int
+ var high int
+ low, err = strconv.Atoi(value[:hyphenIndex])
+ if err == nil {
+ high, err = strconv.Atoi(value[hyphenIndex+1:])
+ }
+ if err != nil {
+ return fmt.Errorf("unable to parse port range: %s: %v", value, err)
+ }
+
+ if low > 65535 || high > 65535 {
+ return fmt.Errorf("the port range cannot be greater than 65535: %s", value)
+ }
+
+ if high < low {
+ return fmt.Errorf("end port cannot be less than start port: %s", value)
+ }
+
+ pr.Base = low
+ pr.Size = 1 + high - low
+ return nil
+}
+
+// Type returns a descriptive string about this type. This is part of the
+// pflag.Value interface.
+func (*PortRange) Type() string {
+ return "portRange"
+}
+
+// ParsePortRange parses a string of the form "min-max", inclusive at both
+// ends, and initializs a new PortRange from it.
+func ParsePortRange(value string) (*PortRange, error) {
+ pr := &PortRange{}
+ err := pr.Set(value)
+ if err != nil {
+ return nil, err
+ }
+ return pr, nil
+}
+
+func ParsePortRangeOrDie(value string) *PortRange {
+ pr, err := ParsePortRange(value)
+ if err != nil {
+ panic(fmt.Sprintf("couldn't parse port range %q: %v", value, err))
+ }
+ return pr
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/port_split.go b/vendor/k8s.io/apimachinery/pkg/util/net/port_split.go
new file mode 100644
index 000000000..c0fd4e20f
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/net/port_split.go
@@ -0,0 +1,77 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package net
+
+import (
+ "strings"
+
+ "k8s.io/apimachinery/pkg/util/sets"
+)
+
+var validSchemes = sets.NewString("http", "https", "")
+
+// SplitSchemeNamePort takes a string of the following forms:
+// * "<name>", returns "", "<name>","", true
+// * "<name>:<port>", returns "", "<name>","<port>",true
+// * "<scheme>:<name>:<port>", returns "<scheme>","<name>","<port>",true
+//
+// Name must be non-empty or valid will be returned false.
+// Scheme must be "http" or "https" if specified
+// Port is returned as a string, and it is not required to be numeric (could be
+// used for a named port, for example).
+func SplitSchemeNamePort(id string) (scheme, name, port string, valid bool) {
+ parts := strings.Split(id, ":")
+ switch len(parts) {
+ case 1:
+ name = parts[0]
+ case 2:
+ name = parts[0]
+ port = parts[1]
+ case 3:
+ scheme = parts[0]
+ name = parts[1]
+ port = parts[2]
+ default:
+ return "", "", "", false
+ }
+
+ if len(name) > 0 && validSchemes.Has(scheme) {
+ return scheme, name, port, true
+ } else {
+ return "", "", "", false
+ }
+}
+
+// JoinSchemeNamePort returns a string that specifies the scheme, name, and port:
+// * "<name>"
+// * "<name>:<port>"
+// * "<scheme>:<name>:<port>"
+// None of the parameters may contain a ':' character
+// Name is required
+// Scheme must be "", "http", or "https"
+func JoinSchemeNamePort(scheme, name, port string) string {
+ if len(scheme) > 0 {
+ // Must include three segments to specify scheme
+ return scheme + ":" + name + ":" + port
+ }
+ if len(port) > 0 {
+ // Must include two segments to specify port
+ return name + ":" + port
+ }
+ // Return name alone
+ return name
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/util.go b/vendor/k8s.io/apimachinery/pkg/util/net/util.go
new file mode 100644
index 000000000..461144f0b
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/net/util.go
@@ -0,0 +1,46 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package net
+
+import (
+ "net"
+ "reflect"
+ "syscall"
+)
+
+// IPNetEqual checks if the two input IPNets are representing the same subnet.
+// For example,
+// 10.0.0.1/24 and 10.0.0.0/24 are the same subnet.
+// 10.0.0.1/24 and 10.0.0.0/25 are not the same subnet.
+func IPNetEqual(ipnet1, ipnet2 *net.IPNet) bool {
+ if ipnet1 == nil || ipnet2 == nil {
+ return false
+ }
+ if reflect.DeepEqual(ipnet1.Mask, ipnet2.Mask) && ipnet1.Contains(ipnet2.IP) && ipnet2.Contains(ipnet1.IP) {
+ return true
+ }
+ return false
+}
+
+// Returns if the given err is "connection reset by peer" error.
+func IsConnectionReset(err error) bool {
+ opErr, ok := err.(*net.OpError)
+ if ok && opErr.Err.Error() == syscall.ECONNRESET.Error() {
+ return true
+ }
+ return false
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/rand/rand.go b/vendor/k8s.io/apimachinery/pkg/util/rand/rand.go
new file mode 100644
index 000000000..db109c2cd
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/rand/rand.go
@@ -0,0 +1,85 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package rand provides utilities related to randomization.
+package rand
+
+import (
+ "math/rand"
+ "sync"
+ "time"
+)
+
+var rng = struct {
+ sync.Mutex
+ rand *rand.Rand
+}{
+ rand: rand.New(rand.NewSource(time.Now().UTC().UnixNano())),
+}
+
+// Intn generates an integer in range [0,max).
+// By design this should panic if input is invalid, <= 0.
+func Intn(max int) int {
+ rng.Lock()
+ defer rng.Unlock()
+ return rng.rand.Intn(max)
+}
+
+// IntnRange generates an integer in range [min,max).
+// By design this should panic if input is invalid, <= 0.
+func IntnRange(min, max int) int {
+ rng.Lock()
+ defer rng.Unlock()
+ return rng.rand.Intn(max-min) + min
+}
+
+// IntnRange generates an int64 integer in range [min,max).
+// By design this should panic if input is invalid, <= 0.
+func Int63nRange(min, max int64) int64 {
+ rng.Lock()
+ defer rng.Unlock()
+ return rng.rand.Int63n(max-min) + min
+}
+
+// Seed seeds the rng with the provided seed.
+func Seed(seed int64) {
+ rng.Lock()
+ defer rng.Unlock()
+
+ rng.rand = rand.New(rand.NewSource(seed))
+}
+
+// Perm returns, as a slice of n ints, a pseudo-random permutation of the integers [0,n)
+// from the default Source.
+func Perm(n int) []int {
+ rng.Lock()
+ defer rng.Unlock()
+ return rng.rand.Perm(n)
+}
+
+// We omit vowels from the set of available characters to reduce the chances
+// of "bad words" being formed.
+var alphanums = []rune("bcdfghjklmnpqrstvwxz0123456789")
+
+// String generates a random alphanumeric string, without vowels, which is n
+// characters long. This will panic if n is less than zero.
+func String(length int) string {
+ b := make([]rune, length)
+ for i := range b {
+ b[i] = alphanums[Intn(len(alphanums))]
+ }
+ return string(b)
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/remotecommand/constants.go b/vendor/k8s.io/apimachinery/pkg/util/remotecommand/constants.go
new file mode 100644
index 000000000..acfeb827c
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/remotecommand/constants.go
@@ -0,0 +1,53 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package remotecommand
+
+import (
+ "time"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+const (
+ DefaultStreamCreationTimeout = 30 * time.Second
+
+ // The SPDY subprotocol "channel.k8s.io" is used for remote command
+ // attachment/execution. This represents the initial unversioned subprotocol,
+ // which has the known bugs http://issues.k8s.io/13394 and
+ // http://issues.k8s.io/13395.
+ StreamProtocolV1Name = "channel.k8s.io"
+
+ // The SPDY subprotocol "v2.channel.k8s.io" is used for remote command
+ // attachment/execution. It is the second version of the subprotocol and
+ // resolves the issues present in the first version.
+ StreamProtocolV2Name = "v2.channel.k8s.io"
+
+ // The SPDY subprotocol "v3.channel.k8s.io" is used for remote command
+ // attachment/execution. It is the third version of the subprotocol and
+ // adds support for resizing container terminals.
+ StreamProtocolV3Name = "v3.channel.k8s.io"
+
+ // The SPDY subprotocol "v4.channel.k8s.io" is used for remote command
+ // attachment/execution. It is the 4th version of the subprotocol and
+ // adds support for exit codes.
+ StreamProtocolV4Name = "v4.channel.k8s.io"
+
+ NonZeroExitCodeReason = metav1.StatusReason("NonZeroExitCode")
+ ExitCodeCauseType = metav1.CauseType("ExitCode")
+)
+
+var SupportedStreamingProtocols = []string{StreamProtocolV4Name, StreamProtocolV3Name, StreamProtocolV2Name, StreamProtocolV1Name}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go b/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go
new file mode 100644
index 000000000..748174e19
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go
@@ -0,0 +1,161 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package runtime
+
+import (
+ "fmt"
+ "runtime"
+ "sync"
+ "time"
+
+ "github.com/golang/glog"
+)
+
+var (
+ // ReallyCrash controls the behavior of HandleCrash and now defaults
+ // true. It's still exposed so components can optionally set to false
+ // to restore prior behavior.
+ ReallyCrash = true
+)
+
+// PanicHandlers is a list of functions which will be invoked when a panic happens.
+var PanicHandlers = []func(interface{}){logPanic}
+
+// HandleCrash simply catches a crash and logs an error. Meant to be called via
+// defer. Additional context-specific handlers can be provided, and will be
+// called in case of panic. HandleCrash actually crashes, after calling the
+// handlers and logging the panic message.
+//
+// TODO: remove this function. We are switching to a world where it's safe for
+// apiserver to panic, since it will be restarted by kubelet. At the beginning
+// of the Kubernetes project, nothing was going to restart apiserver and so
+// catching panics was important. But it's actually much simpler for montoring
+// software if we just exit when an unexpected panic happens.
+func HandleCrash(additionalHandlers ...func(interface{})) {
+ if r := recover(); r != nil {
+ for _, fn := range PanicHandlers {
+ fn(r)
+ }
+ for _, fn := range additionalHandlers {
+ fn(r)
+ }
+ if ReallyCrash {
+ // Actually proceed to panic.
+ panic(r)
+ }
+ }
+}
+
+// logPanic logs the caller tree when a panic occurs.
+func logPanic(r interface{}) {
+ callers := getCallers(r)
+ glog.Errorf("Observed a panic: %#v (%v)\n%v", r, r, callers)
+}
+
+func getCallers(r interface{}) string {
+ callers := ""
+ for i := 0; true; i++ {
+ _, file, line, ok := runtime.Caller(i)
+ if !ok {
+ break
+ }
+ callers = callers + fmt.Sprintf("%v:%v\n", file, line)
+ }
+
+ return callers
+}
+
+// ErrorHandlers is a list of functions which will be invoked when an unreturnable
+// error occurs.
+// TODO(lavalamp): for testability, this and the below HandleError function
+// should be packaged up into a testable and reusable object.
+var ErrorHandlers = []func(error){
+ logError,
+ (&rudimentaryErrorBackoff{
+ lastErrorTime: time.Now(),
+ // 1ms was the number folks were able to stomach as a global rate limit.
+ // If you need to log errors more than 1000 times a second you
+ // should probably consider fixing your code instead. :)
+ minPeriod: time.Millisecond,
+ }).OnError,
+}
+
+// HandlerError is a method to invoke when a non-user facing piece of code cannot
+// return an error and needs to indicate it has been ignored. Invoking this method
+// is preferable to logging the error - the default behavior is to log but the
+// errors may be sent to a remote server for analysis.
+func HandleError(err error) {
+ // this is sometimes called with a nil error. We probably shouldn't fail and should do nothing instead
+ if err == nil {
+ return
+ }
+
+ for _, fn := range ErrorHandlers {
+ fn(err)
+ }
+}
+
+// logError prints an error with the call stack of the location it was reported
+func logError(err error) {
+ glog.ErrorDepth(2, err)
+}
+
+type rudimentaryErrorBackoff struct {
+ minPeriod time.Duration // immutable
+ // TODO(lavalamp): use the clock for testability. Need to move that
+ // package for that to be accessible here.
+ lastErrorTimeLock sync.Mutex
+ lastErrorTime time.Time
+}
+
+// OnError will block if it is called more often than the embedded period time.
+// This will prevent overly tight hot error loops.
+func (r *rudimentaryErrorBackoff) OnError(error) {
+ r.lastErrorTimeLock.Lock()
+ defer r.lastErrorTimeLock.Unlock()
+ d := time.Since(r.lastErrorTime)
+ if d < r.minPeriod {
+ time.Sleep(r.minPeriod - d)
+ }
+ r.lastErrorTime = time.Now()
+}
+
+// GetCaller returns the caller of the function that calls it.
+func GetCaller() string {
+ var pc [1]uintptr
+ runtime.Callers(3, pc[:])
+ f := runtime.FuncForPC(pc[0])
+ if f == nil {
+ return fmt.Sprintf("Unable to find caller")
+ }
+ return f.Name()
+}
+
+// RecoverFromPanic replaces the specified error with an error containing the
+// original error, and the call tree when a panic occurs. This enables error
+// handlers to handle errors and panics the same way.
+func RecoverFromPanic(err *error) {
+ if r := recover(); r != nil {
+ callers := getCallers(r)
+
+ *err = fmt.Errorf(
+ "recovered from panic %q. (err=%v) Call stack:\n%v",
+ r,
+ *err,
+ callers)
+ }
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/sets/byte.go b/vendor/k8s.io/apimachinery/pkg/util/sets/byte.go
new file mode 100644
index 000000000..a460e4b1f
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/sets/byte.go
@@ -0,0 +1,203 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by set-gen. Do not edit it manually!
+
+package sets
+
+import (
+ "reflect"
+ "sort"
+)
+
+// sets.Byte is a set of bytes, implemented via map[byte]struct{} for minimal memory consumption.
+type Byte map[byte]Empty
+
+// New creates a Byte from a list of values.
+func NewByte(items ...byte) Byte {
+ ss := Byte{}
+ ss.Insert(items...)
+ return ss
+}
+
+// ByteKeySet creates a Byte from a keys of a map[byte](? extends interface{}).
+// If the value passed in is not actually a map, this will panic.
+func ByteKeySet(theMap interface{}) Byte {
+ v := reflect.ValueOf(theMap)
+ ret := Byte{}
+
+ for _, keyValue := range v.MapKeys() {
+ ret.Insert(keyValue.Interface().(byte))
+ }
+ return ret
+}
+
+// Insert adds items to the set.
+func (s Byte) Insert(items ...byte) {
+ for _, item := range items {
+ s[item] = Empty{}
+ }
+}
+
+// Delete removes all items from the set.
+func (s Byte) Delete(items ...byte) {
+ for _, item := range items {
+ delete(s, item)
+ }
+}
+
+// Has returns true if and only if item is contained in the set.
+func (s Byte) Has(item byte) bool {
+ _, contained := s[item]
+ return contained
+}
+
+// HasAll returns true if and only if all items are contained in the set.
+func (s Byte) HasAll(items ...byte) bool {
+ for _, item := range items {
+ if !s.Has(item) {
+ return false
+ }
+ }
+ return true
+}
+
+// HasAny returns true if any items are contained in the set.
+func (s Byte) HasAny(items ...byte) bool {
+ for _, item := range items {
+ if s.Has(item) {
+ return true
+ }
+ }
+ return false
+}
+
+// Difference returns a set of objects that are not in s2
+// For example:
+// s1 = {a1, a2, a3}
+// s2 = {a1, a2, a4, a5}
+// s1.Difference(s2) = {a3}
+// s2.Difference(s1) = {a4, a5}
+func (s Byte) Difference(s2 Byte) Byte {
+ result := NewByte()
+ for key := range s {
+ if !s2.Has(key) {
+ result.Insert(key)
+ }
+ }
+ return result
+}
+
+// Union returns a new set which includes items in either s1 or s2.
+// For example:
+// s1 = {a1, a2}
+// s2 = {a3, a4}
+// s1.Union(s2) = {a1, a2, a3, a4}
+// s2.Union(s1) = {a1, a2, a3, a4}
+func (s1 Byte) Union(s2 Byte) Byte {
+ result := NewByte()
+ for key := range s1 {
+ result.Insert(key)
+ }
+ for key := range s2 {
+ result.Insert(key)
+ }
+ return result
+}
+
+// Intersection returns a new set which includes the item in BOTH s1 and s2
+// For example:
+// s1 = {a1, a2}
+// s2 = {a2, a3}
+// s1.Intersection(s2) = {a2}
+func (s1 Byte) Intersection(s2 Byte) Byte {
+ var walk, other Byte
+ result := NewByte()
+ if s1.Len() < s2.Len() {
+ walk = s1
+ other = s2
+ } else {
+ walk = s2
+ other = s1
+ }
+ for key := range walk {
+ if other.Has(key) {
+ result.Insert(key)
+ }
+ }
+ return result
+}
+
+// IsSuperset returns true if and only if s1 is a superset of s2.
+func (s1 Byte) IsSuperset(s2 Byte) bool {
+ for item := range s2 {
+ if !s1.Has(item) {
+ return false
+ }
+ }
+ return true
+}
+
+// Equal returns true if and only if s1 is equal (as a set) to s2.
+// Two sets are equal if their membership is identical.
+// (In practice, this means same elements, order doesn't matter)
+func (s1 Byte) Equal(s2 Byte) bool {
+ return len(s1) == len(s2) && s1.IsSuperset(s2)
+}
+
+type sortableSliceOfByte []byte
+
+func (s sortableSliceOfByte) Len() int { return len(s) }
+func (s sortableSliceOfByte) Less(i, j int) bool { return lessByte(s[i], s[j]) }
+func (s sortableSliceOfByte) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
+
+// List returns the contents as a sorted byte slice.
+func (s Byte) List() []byte {
+ res := make(sortableSliceOfByte, 0, len(s))
+ for key := range s {
+ res = append(res, key)
+ }
+ sort.Sort(res)
+ return []byte(res)
+}
+
+// UnsortedList returns the slice with contents in random order.
+func (s Byte) UnsortedList() []byte {
+ res := make([]byte, 0, len(s))
+ for key := range s {
+ res = append(res, key)
+ }
+ return res
+}
+
+// Returns a single element from the set.
+func (s Byte) PopAny() (byte, bool) {
+ for key := range s {
+ s.Delete(key)
+ return key, true
+ }
+ var zeroValue byte
+ return zeroValue, false
+}
+
+// Len returns the size of the set.
+func (s Byte) Len() int {
+ return len(s)
+}
+
+func lessByte(lhs, rhs byte) bool {
+ return lhs < rhs
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/sets/doc.go b/vendor/k8s.io/apimachinery/pkg/util/sets/doc.go
new file mode 100644
index 000000000..28a6a7d5c
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/sets/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by set-gen. Do not edit it manually!
+
+// Package sets has auto-generated set types.
+package sets
diff --git a/vendor/k8s.io/apimachinery/pkg/util/sets/empty.go b/vendor/k8s.io/apimachinery/pkg/util/sets/empty.go
new file mode 100644
index 000000000..cd22b953a
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/sets/empty.go
@@ -0,0 +1,23 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by set-gen. Do not edit it manually!
+
+package sets
+
+// Empty is public since it is used by some internal API objects for conversions between external
+// string arrays and internal sets, and conversion logic requires public types today.
+type Empty struct{}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/sets/int.go b/vendor/k8s.io/apimachinery/pkg/util/sets/int.go
new file mode 100644
index 000000000..0614e9fb0
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/sets/int.go
@@ -0,0 +1,203 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by set-gen. Do not edit it manually!
+
+package sets
+
+import (
+ "reflect"
+ "sort"
+)
+
+// sets.Int is a set of ints, implemented via map[int]struct{} for minimal memory consumption.
+type Int map[int]Empty
+
+// New creates a Int from a list of values.
+func NewInt(items ...int) Int {
+ ss := Int{}
+ ss.Insert(items...)
+ return ss
+}
+
+// IntKeySet creates a Int from a keys of a map[int](? extends interface{}).
+// If the value passed in is not actually a map, this will panic.
+func IntKeySet(theMap interface{}) Int {
+ v := reflect.ValueOf(theMap)
+ ret := Int{}
+
+ for _, keyValue := range v.MapKeys() {
+ ret.Insert(keyValue.Interface().(int))
+ }
+ return ret
+}
+
+// Insert adds items to the set.
+func (s Int) Insert(items ...int) {
+ for _, item := range items {
+ s[item] = Empty{}
+ }
+}
+
+// Delete removes all items from the set.
+func (s Int) Delete(items ...int) {
+ for _, item := range items {
+ delete(s, item)
+ }
+}
+
+// Has returns true if and only if item is contained in the set.
+func (s Int) Has(item int) bool {
+ _, contained := s[item]
+ return contained
+}
+
+// HasAll returns true if and only if all items are contained in the set.
+func (s Int) HasAll(items ...int) bool {
+ for _, item := range items {
+ if !s.Has(item) {
+ return false
+ }
+ }
+ return true
+}
+
+// HasAny returns true if any items are contained in the set.
+func (s Int) HasAny(items ...int) bool {
+ for _, item := range items {
+ if s.Has(item) {
+ return true
+ }
+ }
+ return false
+}
+
+// Difference returns a set of objects that are not in s2
+// For example:
+// s1 = {a1, a2, a3}
+// s2 = {a1, a2, a4, a5}
+// s1.Difference(s2) = {a3}
+// s2.Difference(s1) = {a4, a5}
+func (s Int) Difference(s2 Int) Int {
+ result := NewInt()
+ for key := range s {
+ if !s2.Has(key) {
+ result.Insert(key)
+ }
+ }
+ return result
+}
+
+// Union returns a new set which includes items in either s1 or s2.
+// For example:
+// s1 = {a1, a2}
+// s2 = {a3, a4}
+// s1.Union(s2) = {a1, a2, a3, a4}
+// s2.Union(s1) = {a1, a2, a3, a4}
+func (s1 Int) Union(s2 Int) Int {
+ result := NewInt()
+ for key := range s1 {
+ result.Insert(key)
+ }
+ for key := range s2 {
+ result.Insert(key)
+ }
+ return result
+}
+
+// Intersection returns a new set which includes the item in BOTH s1 and s2
+// For example:
+// s1 = {a1, a2}
+// s2 = {a2, a3}
+// s1.Intersection(s2) = {a2}
+func (s1 Int) Intersection(s2 Int) Int {
+ var walk, other Int
+ result := NewInt()
+ if s1.Len() < s2.Len() {
+ walk = s1
+ other = s2
+ } else {
+ walk = s2
+ other = s1
+ }
+ for key := range walk {
+ if other.Has(key) {
+ result.Insert(key)
+ }
+ }
+ return result
+}
+
+// IsSuperset returns true if and only if s1 is a superset of s2.
+func (s1 Int) IsSuperset(s2 Int) bool {
+ for item := range s2 {
+ if !s1.Has(item) {
+ return false
+ }
+ }
+ return true
+}
+
+// Equal returns true if and only if s1 is equal (as a set) to s2.
+// Two sets are equal if their membership is identical.
+// (In practice, this means same elements, order doesn't matter)
+func (s1 Int) Equal(s2 Int) bool {
+ return len(s1) == len(s2) && s1.IsSuperset(s2)
+}
+
+type sortableSliceOfInt []int
+
+func (s sortableSliceOfInt) Len() int { return len(s) }
+func (s sortableSliceOfInt) Less(i, j int) bool { return lessInt(s[i], s[j]) }
+func (s sortableSliceOfInt) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
+
+// List returns the contents as a sorted int slice.
+func (s Int) List() []int {
+ res := make(sortableSliceOfInt, 0, len(s))
+ for key := range s {
+ res = append(res, key)
+ }
+ sort.Sort(res)
+ return []int(res)
+}
+
+// UnsortedList returns the slice with contents in random order.
+func (s Int) UnsortedList() []int {
+ res := make([]int, 0, len(s))
+ for key := range s {
+ res = append(res, key)
+ }
+ return res
+}
+
+// Returns a single element from the set.
+func (s Int) PopAny() (int, bool) {
+ for key := range s {
+ s.Delete(key)
+ return key, true
+ }
+ var zeroValue int
+ return zeroValue, false
+}
+
+// Len returns the size of the set.
+func (s Int) Len() int {
+ return len(s)
+}
+
+func lessInt(lhs, rhs int) bool {
+ return lhs < rhs
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/sets/int64.go b/vendor/k8s.io/apimachinery/pkg/util/sets/int64.go
new file mode 100644
index 000000000..82e1ba782
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/sets/int64.go
@@ -0,0 +1,203 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by set-gen. Do not edit it manually!
+
+package sets
+
+import (
+ "reflect"
+ "sort"
+)
+
+// sets.Int64 is a set of int64s, implemented via map[int64]struct{} for minimal memory consumption.
+type Int64 map[int64]Empty
+
+// New creates a Int64 from a list of values.
+func NewInt64(items ...int64) Int64 {
+ ss := Int64{}
+ ss.Insert(items...)
+ return ss
+}
+
+// Int64KeySet creates a Int64 from a keys of a map[int64](? extends interface{}).
+// If the value passed in is not actually a map, this will panic.
+func Int64KeySet(theMap interface{}) Int64 {
+ v := reflect.ValueOf(theMap)
+ ret := Int64{}
+
+ for _, keyValue := range v.MapKeys() {
+ ret.Insert(keyValue.Interface().(int64))
+ }
+ return ret
+}
+
+// Insert adds items to the set.
+func (s Int64) Insert(items ...int64) {
+ for _, item := range items {
+ s[item] = Empty{}
+ }
+}
+
+// Delete removes all items from the set.
+func (s Int64) Delete(items ...int64) {
+ for _, item := range items {
+ delete(s, item)
+ }
+}
+
+// Has returns true if and only if item is contained in the set.
+func (s Int64) Has(item int64) bool {
+ _, contained := s[item]
+ return contained
+}
+
+// HasAll returns true if and only if all items are contained in the set.
+func (s Int64) HasAll(items ...int64) bool {
+ for _, item := range items {
+ if !s.Has(item) {
+ return false
+ }
+ }
+ return true
+}
+
+// HasAny returns true if any items are contained in the set.
+func (s Int64) HasAny(items ...int64) bool {
+ for _, item := range items {
+ if s.Has(item) {
+ return true
+ }
+ }
+ return false
+}
+
+// Difference returns a set of objects that are not in s2
+// For example:
+// s1 = {a1, a2, a3}
+// s2 = {a1, a2, a4, a5}
+// s1.Difference(s2) = {a3}
+// s2.Difference(s1) = {a4, a5}
+func (s Int64) Difference(s2 Int64) Int64 {
+ result := NewInt64()
+ for key := range s {
+ if !s2.Has(key) {
+ result.Insert(key)
+ }
+ }
+ return result
+}
+
+// Union returns a new set which includes items in either s1 or s2.
+// For example:
+// s1 = {a1, a2}
+// s2 = {a3, a4}
+// s1.Union(s2) = {a1, a2, a3, a4}
+// s2.Union(s1) = {a1, a2, a3, a4}
+func (s1 Int64) Union(s2 Int64) Int64 {
+ result := NewInt64()
+ for key := range s1 {
+ result.Insert(key)
+ }
+ for key := range s2 {
+ result.Insert(key)
+ }
+ return result
+}
+
+// Intersection returns a new set which includes the item in BOTH s1 and s2
+// For example:
+// s1 = {a1, a2}
+// s2 = {a2, a3}
+// s1.Intersection(s2) = {a2}
+func (s1 Int64) Intersection(s2 Int64) Int64 {
+ var walk, other Int64
+ result := NewInt64()
+ if s1.Len() < s2.Len() {
+ walk = s1
+ other = s2
+ } else {
+ walk = s2
+ other = s1
+ }
+ for key := range walk {
+ if other.Has(key) {
+ result.Insert(key)
+ }
+ }
+ return result
+}
+
+// IsSuperset returns true if and only if s1 is a superset of s2.
+func (s1 Int64) IsSuperset(s2 Int64) bool {
+ for item := range s2 {
+ if !s1.Has(item) {
+ return false
+ }
+ }
+ return true
+}
+
+// Equal returns true if and only if s1 is equal (as a set) to s2.
+// Two sets are equal if their membership is identical.
+// (In practice, this means same elements, order doesn't matter)
+func (s1 Int64) Equal(s2 Int64) bool {
+ return len(s1) == len(s2) && s1.IsSuperset(s2)
+}
+
+type sortableSliceOfInt64 []int64
+
+func (s sortableSliceOfInt64) Len() int { return len(s) }
+func (s sortableSliceOfInt64) Less(i, j int) bool { return lessInt64(s[i], s[j]) }
+func (s sortableSliceOfInt64) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
+
+// List returns the contents as a sorted int64 slice.
+func (s Int64) List() []int64 {
+ res := make(sortableSliceOfInt64, 0, len(s))
+ for key := range s {
+ res = append(res, key)
+ }
+ sort.Sort(res)
+ return []int64(res)
+}
+
+// UnsortedList returns the slice with contents in random order.
+func (s Int64) UnsortedList() []int64 {
+ res := make([]int64, 0, len(s))
+ for key := range s {
+ res = append(res, key)
+ }
+ return res
+}
+
+// Returns a single element from the set.
+func (s Int64) PopAny() (int64, bool) {
+ for key := range s {
+ s.Delete(key)
+ return key, true
+ }
+ var zeroValue int64
+ return zeroValue, false
+}
+
+// Len returns the size of the set.
+func (s Int64) Len() int {
+ return len(s)
+}
+
+func lessInt64(lhs, rhs int64) bool {
+ return lhs < rhs
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/sets/string.go b/vendor/k8s.io/apimachinery/pkg/util/sets/string.go
new file mode 100644
index 000000000..baef7a6a2
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/sets/string.go
@@ -0,0 +1,203 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by set-gen. Do not edit it manually!
+
+package sets
+
+import (
+ "reflect"
+ "sort"
+)
+
+// sets.String is a set of strings, implemented via map[string]struct{} for minimal memory consumption.
+type String map[string]Empty
+
+// New creates a String from a list of values.
+func NewString(items ...string) String {
+ ss := String{}
+ ss.Insert(items...)
+ return ss
+}
+
+// StringKeySet creates a String from a keys of a map[string](? extends interface{}).
+// If the value passed in is not actually a map, this will panic.
+func StringKeySet(theMap interface{}) String {
+ v := reflect.ValueOf(theMap)
+ ret := String{}
+
+ for _, keyValue := range v.MapKeys() {
+ ret.Insert(keyValue.Interface().(string))
+ }
+ return ret
+}
+
+// Insert adds items to the set.
+func (s String) Insert(items ...string) {
+ for _, item := range items {
+ s[item] = Empty{}
+ }
+}
+
+// Delete removes all items from the set.
+func (s String) Delete(items ...string) {
+ for _, item := range items {
+ delete(s, item)
+ }
+}
+
+// Has returns true if and only if item is contained in the set.
+func (s String) Has(item string) bool {
+ _, contained := s[item]
+ return contained
+}
+
+// HasAll returns true if and only if all items are contained in the set.
+func (s String) HasAll(items ...string) bool {
+ for _, item := range items {
+ if !s.Has(item) {
+ return false
+ }
+ }
+ return true
+}
+
+// HasAny returns true if any items are contained in the set.
+func (s String) HasAny(items ...string) bool {
+ for _, item := range items {
+ if s.Has(item) {
+ return true
+ }
+ }
+ return false
+}
+
+// Difference returns a set of objects that are not in s2
+// For example:
+// s1 = {a1, a2, a3}
+// s2 = {a1, a2, a4, a5}
+// s1.Difference(s2) = {a3}
+// s2.Difference(s1) = {a4, a5}
+func (s String) Difference(s2 String) String {
+ result := NewString()
+ for key := range s {
+ if !s2.Has(key) {
+ result.Insert(key)
+ }
+ }
+ return result
+}
+
+// Union returns a new set which includes items in either s1 or s2.
+// For example:
+// s1 = {a1, a2}
+// s2 = {a3, a4}
+// s1.Union(s2) = {a1, a2, a3, a4}
+// s2.Union(s1) = {a1, a2, a3, a4}
+func (s1 String) Union(s2 String) String {
+ result := NewString()
+ for key := range s1 {
+ result.Insert(key)
+ }
+ for key := range s2 {
+ result.Insert(key)
+ }
+ return result
+}
+
+// Intersection returns a new set which includes the item in BOTH s1 and s2
+// For example:
+// s1 = {a1, a2}
+// s2 = {a2, a3}
+// s1.Intersection(s2) = {a2}
+func (s1 String) Intersection(s2 String) String {
+ var walk, other String
+ result := NewString()
+ if s1.Len() < s2.Len() {
+ walk = s1
+ other = s2
+ } else {
+ walk = s2
+ other = s1
+ }
+ for key := range walk {
+ if other.Has(key) {
+ result.Insert(key)
+ }
+ }
+ return result
+}
+
+// IsSuperset returns true if and only if s1 is a superset of s2.
+func (s1 String) IsSuperset(s2 String) bool {
+ for item := range s2 {
+ if !s1.Has(item) {
+ return false
+ }
+ }
+ return true
+}
+
+// Equal returns true if and only if s1 is equal (as a set) to s2.
+// Two sets are equal if their membership is identical.
+// (In practice, this means same elements, order doesn't matter)
+func (s1 String) Equal(s2 String) bool {
+ return len(s1) == len(s2) && s1.IsSuperset(s2)
+}
+
+type sortableSliceOfString []string
+
+func (s sortableSliceOfString) Len() int { return len(s) }
+func (s sortableSliceOfString) Less(i, j int) bool { return lessString(s[i], s[j]) }
+func (s sortableSliceOfString) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
+
+// List returns the contents as a sorted string slice.
+func (s String) List() []string {
+ res := make(sortableSliceOfString, 0, len(s))
+ for key := range s {
+ res = append(res, key)
+ }
+ sort.Sort(res)
+ return []string(res)
+}
+
+// UnsortedList returns the slice with contents in random order.
+func (s String) UnsortedList() []string {
+ res := make([]string, 0, len(s))
+ for key := range s {
+ res = append(res, key)
+ }
+ return res
+}
+
+// Returns a single element from the set.
+func (s String) PopAny() (string, bool) {
+ for key := range s {
+ s.Delete(key)
+ return key, true
+ }
+ var zeroValue string
+ return zeroValue, false
+}
+
+// Len returns the size of the set.
+func (s String) Len() int {
+ return len(s)
+}
+
+func lessString(lhs, rhs string) bool {
+ return lhs < rhs
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go b/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go
new file mode 100644
index 000000000..8884c738e
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go
@@ -0,0 +1,2115 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package strategicpatch
+
+import (
+ "fmt"
+ "reflect"
+ "sort"
+ "strings"
+
+ "k8s.io/apimachinery/pkg/util/json"
+ "k8s.io/apimachinery/pkg/util/mergepatch"
+ forkedjson "k8s.io/apimachinery/third_party/forked/golang/json"
+)
+
+// An alternate implementation of JSON Merge Patch
+// (https://tools.ietf.org/html/rfc7386) which supports the ability to annotate
+// certain fields with metadata that indicates whether the elements of JSON
+// lists should be merged or replaced.
+//
+// For more information, see the PATCH section of docs/devel/api-conventions.md.
+//
+// Some of the content of this package was borrowed with minor adaptations from
+// evanphx/json-patch and openshift/origin.
+
+const (
+ directiveMarker = "$patch"
+ deleteDirective = "delete"
+ replaceDirective = "replace"
+ mergeDirective = "merge"
+
+ retainKeysStrategy = "retainKeys"
+
+ deleteFromPrimitiveListDirectivePrefix = "$deleteFromPrimitiveList"
+ retainKeysDirective = "$" + retainKeysStrategy
+ setElementOrderDirectivePrefix = "$setElementOrder"
+)
+
+// JSONMap is a representations of JSON object encoded as map[string]interface{}
+// where the children can be either map[string]interface{}, []interface{} or
+// primitive type).
+// Operating on JSONMap representation is much faster as it doesn't require any
+// json marshaling and/or unmarshaling operations.
+type JSONMap map[string]interface{}
+
+type DiffOptions struct {
+ // SetElementOrder determines whether we generate the $setElementOrder parallel list.
+ SetElementOrder bool
+ // IgnoreChangesAndAdditions indicates if we keep the changes and additions in the patch.
+ IgnoreChangesAndAdditions bool
+ // IgnoreDeletions indicates if we keep the deletions in the patch.
+ IgnoreDeletions bool
+ // We introduce a new value retainKeys for patchStrategy.
+ // It indicates that all fields needing to be preserved must be
+ // present in the `retainKeys` list.
+ // And the fields that are present will be merged with live object.
+ // All the missing fields will be cleared when patching.
+ BuildRetainKeysDirective bool
+}
+
+type MergeOptions struct {
+ // MergeParallelList indicates if we are merging the parallel list.
+ // We don't merge parallel list when calling mergeMap() in CreateThreeWayMergePatch()
+ // which is called client-side.
+ // We merge parallel list iff when calling mergeMap() in StrategicMergeMapPatch()
+ // which is called server-side
+ MergeParallelList bool
+ // IgnoreUnmatchedNulls indicates if we should process the unmatched nulls.
+ IgnoreUnmatchedNulls bool
+}
+
+// The following code is adapted from github.com/openshift/origin/pkg/util/jsonmerge.
+// Instead of defining a Delta that holds an original, a patch and a set of preconditions,
+// the reconcile method accepts a set of preconditions as an argument.
+
+// CreateTwoWayMergePatch creates a patch that can be passed to StrategicMergePatch from an original
+// document and a modified document, which are passed to the method as json encoded content. It will
+// return a patch that yields the modified document when applied to the original document, or an error
+// if either of the two documents is invalid.
+func CreateTwoWayMergePatch(original, modified []byte, dataStruct interface{}, fns ...mergepatch.PreconditionFunc) ([]byte, error) {
+ originalMap := map[string]interface{}{}
+ if len(original) > 0 {
+ if err := json.Unmarshal(original, &originalMap); err != nil {
+ return nil, mergepatch.ErrBadJSONDoc
+ }
+ }
+
+ modifiedMap := map[string]interface{}{}
+ if len(modified) > 0 {
+ if err := json.Unmarshal(modified, &modifiedMap); err != nil {
+ return nil, mergepatch.ErrBadJSONDoc
+ }
+ }
+
+ patchMap, err := CreateTwoWayMergeMapPatch(originalMap, modifiedMap, dataStruct, fns...)
+ if err != nil {
+ return nil, err
+ }
+
+ return json.Marshal(patchMap)
+}
+
+// CreateTwoWayMergeMapPatch creates a patch from an original and modified JSON objects,
+// encoded JSONMap.
+// The serialized version of the map can then be passed to StrategicMergeMapPatch.
+func CreateTwoWayMergeMapPatch(original, modified JSONMap, dataStruct interface{}, fns ...mergepatch.PreconditionFunc) (JSONMap, error) {
+ t, err := getTagStructType(dataStruct)
+ if err != nil {
+ return nil, err
+ }
+
+ diffOptions := DiffOptions{
+ SetElementOrder: true,
+ }
+ patchMap, err := diffMaps(original, modified, t, diffOptions)
+ if err != nil {
+ return nil, err
+ }
+
+ // Apply the preconditions to the patch, and return an error if any of them fail.
+ for _, fn := range fns {
+ if !fn(patchMap) {
+ return nil, mergepatch.NewErrPreconditionFailed(patchMap)
+ }
+ }
+
+ return patchMap, nil
+}
+
+// Returns a (recursive) strategic merge patch that yields modified when applied to original.
+// Including:
+// - Adding fields to the patch present in modified, missing from original
+// - Setting fields to the patch present in modified and original with different values
+// - Delete fields present in original, missing from modified through
+// - IFF map field - set to nil in patch
+// - IFF list of maps && merge strategy - use deleteDirective for the elements
+// - IFF list of primitives && merge strategy - use parallel deletion list
+// - IFF list of maps or primitives with replace strategy (default) - set patch value to the value in modified
+// - Build $retainKeys directive for fields with retainKeys patch strategy
+func diffMaps(original, modified map[string]interface{}, t reflect.Type, diffOptions DiffOptions) (map[string]interface{}, error) {
+ patch := map[string]interface{}{}
+ // Get the underlying type for pointers
+ if t.Kind() == reflect.Ptr {
+ t = t.Elem()
+ }
+ // This will be used to build the $retainKeys directive sent in the patch
+ retainKeysList := make([]interface{}, 0, len(modified))
+
+ // Compare each value in the modified map against the value in the original map
+ for key, modifiedValue := range modified {
+ // Get the underlying type for pointers
+ if diffOptions.BuildRetainKeysDirective && modifiedValue != nil {
+ retainKeysList = append(retainKeysList, key)
+ }
+
+ originalValue, ok := original[key]
+ if !ok {
+ // Key was added, so add to patch
+ if !diffOptions.IgnoreChangesAndAdditions {
+ patch[key] = modifiedValue
+ }
+ continue
+ }
+
+ // The patch may have a patch directive
+ // TODO: figure out if we need this. This shouldn't be needed by apply. When would the original map have patch directives in it?
+ foundDirectiveMarker, err := handleDirectiveMarker(key, originalValue, modifiedValue, patch)
+ if err != nil {
+ return nil, err
+ }
+ if foundDirectiveMarker {
+ continue
+ }
+
+ if reflect.TypeOf(originalValue) != reflect.TypeOf(modifiedValue) {
+ // Types have changed, so add to patch
+ if !diffOptions.IgnoreChangesAndAdditions {
+ patch[key] = modifiedValue
+ }
+ continue
+ }
+
+ // Types are the same, so compare values
+ switch originalValueTyped := originalValue.(type) {
+ case map[string]interface{}:
+ modifiedValueTyped := modifiedValue.(map[string]interface{})
+ err = handleMapDiff(key, originalValueTyped, modifiedValueTyped, patch, t, diffOptions)
+ case []interface{}:
+ modifiedValueTyped := modifiedValue.([]interface{})
+ err = handleSliceDiff(key, originalValueTyped, modifiedValueTyped, patch, t, diffOptions)
+ default:
+ replacePatchFieldIfNotEqual(key, originalValue, modifiedValue, patch, diffOptions)
+ }
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ updatePatchIfMissing(original, modified, patch, diffOptions)
+ // Insert the retainKeysList iff there are values present in the retainKeysList and
+ // either of the following is true:
+ // - the patch is not empty
+ // - there are additional field in original that need to be cleared
+ if len(retainKeysList) > 0 &&
+ (len(patch) > 0 || hasAdditionalNewField(original, modified)) {
+ patch[retainKeysDirective] = sortScalars(retainKeysList)
+ }
+ return patch, nil
+}
+
+// handleDirectiveMarker handles how to diff directive marker between 2 objects
+func handleDirectiveMarker(key string, originalValue, modifiedValue interface{}, patch map[string]interface{}) (bool, error) {
+ if key == directiveMarker {
+ originalString, ok := originalValue.(string)
+ if !ok {
+ return false, fmt.Errorf("invalid value for special key: %s", directiveMarker)
+ }
+ modifiedString, ok := modifiedValue.(string)
+ if !ok {
+ return false, fmt.Errorf("invalid value for special key: %s", directiveMarker)
+ }
+ if modifiedString != originalString {
+ patch[directiveMarker] = modifiedValue
+ }
+ return true, nil
+ }
+ return false, nil
+}
+
+// handleMapDiff diff between 2 maps `originalValueTyped` and `modifiedValue`,
+// puts the diff in the `patch` associated with `key`
+// key is the key associated with originalValue and modifiedValue.
+// originalValue, modifiedValue are the old and new value respectively.They are both maps
+// patch is the patch map that contains key and the updated value, and it is the parent of originalValue, modifiedValue
+// diffOptions contains multiple options to control how we do the diff.
+func handleMapDiff(key string, originalValue, modifiedValue, patch map[string]interface{},
+ t reflect.Type, diffOptions DiffOptions) error {
+ fieldType, fieldPatchStrategies, _, err := forkedjson.LookupPatchMetadata(t, key)
+ if err != nil {
+ // We couldn't look up metadata for the field
+ // If the values are identical, this doesn't matter, no patch is needed
+ if reflect.DeepEqual(originalValue, modifiedValue) {
+ return nil
+ }
+ // Otherwise, return the error
+ return err
+ }
+ retainKeys, patchStrategy, err := extractRetainKeysPatchStrategy(fieldPatchStrategies)
+ if err != nil {
+ return err
+ }
+ diffOptions.BuildRetainKeysDirective = retainKeys
+ switch patchStrategy {
+ // The patch strategic from metadata tells us to replace the entire object instead of diffing it
+ case replaceDirective:
+ if !diffOptions.IgnoreChangesAndAdditions {
+ patch[key] = modifiedValue
+ }
+ default:
+ patchValue, err := diffMaps(originalValue, modifiedValue, fieldType, diffOptions)
+ if err != nil {
+ return err
+ }
+ // Maps were not identical, use provided patch value
+ if len(patchValue) > 0 {
+ patch[key] = patchValue
+ }
+ }
+ return nil
+}
+
+// handleSliceDiff diff between 2 slices `originalValueTyped` and `modifiedValue`,
+// puts the diff in the `patch` associated with `key`
+// key is the key associated with originalValue and modifiedValue.
+// originalValue, modifiedValue are the old and new value respectively.They are both slices
+// patch is the patch map that contains key and the updated value, and it is the parent of originalValue, modifiedValue
+// diffOptions contains multiple options to control how we do the diff.
+func handleSliceDiff(key string, originalValue, modifiedValue []interface{}, patch map[string]interface{},
+ t reflect.Type, diffOptions DiffOptions) error {
+ fieldType, fieldPatchStrategies, fieldPatchMergeKey, err := forkedjson.LookupPatchMetadata(t, key)
+ if err != nil {
+ // We couldn't look up metadata for the field
+ // If the values are identical, this doesn't matter, no patch is needed
+ if reflect.DeepEqual(originalValue, modifiedValue) {
+ return nil
+ }
+ // Otherwise, return the error
+ return err
+ }
+ retainKeys, patchStrategy, err := extractRetainKeysPatchStrategy(fieldPatchStrategies)
+ if err != nil {
+ return err
+ }
+ switch patchStrategy {
+ // Merge the 2 slices using mergePatchKey
+ case mergeDirective:
+ diffOptions.BuildRetainKeysDirective = retainKeys
+ addList, deletionList, setOrderList, err := diffLists(originalValue, modifiedValue, fieldType.Elem(), fieldPatchMergeKey, diffOptions)
+ if err != nil {
+ return err
+ }
+ if len(addList) > 0 {
+ patch[key] = addList
+ }
+ // generate a parallel list for deletion
+ if len(deletionList) > 0 {
+ parallelDeletionListKey := fmt.Sprintf("%s/%s", deleteFromPrimitiveListDirectivePrefix, key)
+ patch[parallelDeletionListKey] = deletionList
+ }
+ if len(setOrderList) > 0 {
+ parallelSetOrderListKey := fmt.Sprintf("%s/%s", setElementOrderDirectivePrefix, key)
+ patch[parallelSetOrderListKey] = setOrderList
+ }
+ default:
+ replacePatchFieldIfNotEqual(key, originalValue, modifiedValue, patch, diffOptions)
+ }
+ return nil
+}
+
+// replacePatchFieldIfNotEqual updates the patch if original and modified are not deep equal
+// if diffOptions.IgnoreChangesAndAdditions is false.
+// original is the old value, maybe either the live cluster object or the last applied configuration
+// modified is the new value, is always the users new config
+func replacePatchFieldIfNotEqual(key string, original, modified interface{},
+ patch map[string]interface{}, diffOptions DiffOptions) {
+ if diffOptions.IgnoreChangesAndAdditions {
+ // Ignoring changes - do nothing
+ return
+ }
+ if reflect.DeepEqual(original, modified) {
+ // Contents are identical - do nothing
+ return
+ }
+ // Create a patch to replace the old value with the new one
+ patch[key] = modified
+}
+
+// updatePatchIfMissing iterates over `original` when ignoreDeletions is false.
+// Clear the field whose key is not present in `modified`.
+// original is the old value, maybe either the live cluster object or the last applied configuration
+// modified is the new value, is always the users new config
+func updatePatchIfMissing(original, modified, patch map[string]interface{}, diffOptions DiffOptions) {
+ if diffOptions.IgnoreDeletions {
+ // Ignoring deletion - do nothing
+ return
+ }
+ // Add nils for deleted values
+ for key := range original {
+ if _, found := modified[key]; !found {
+ patch[key] = nil
+ }
+ }
+}
+
+// validateMergeKeyInLists checks if each map in the list has the mentryerge key.
+func validateMergeKeyInLists(mergeKey string, lists ...[]interface{}) error {
+ for _, list := range lists {
+ for _, item := range list {
+ m, ok := item.(map[string]interface{})
+ if !ok {
+ return mergepatch.ErrBadArgType(m, item)
+ }
+ if _, ok = m[mergeKey]; !ok {
+ return mergepatch.ErrNoMergeKey(m, mergeKey)
+ }
+ }
+ }
+ return nil
+}
+
+// normalizeElementOrder sort `patch` list by `patchOrder` and sort `serverOnly` list by `serverOrder`.
+// Then it merges the 2 sorted lists.
+// It guarantee the relative order in the patch list and in the serverOnly list is kept.
+// `patch` is a list of items in the patch, and `serverOnly` is a list of items in the live object.
+// `patchOrder` is the order we want `patch` list to have and
+// `serverOrder` is the order we want `serverOnly` list to have.
+// kind is the kind of each item in the lists `patch` and `serverOnly`.
+func normalizeElementOrder(patch, serverOnly, patchOrder, serverOrder []interface{}, mergeKey string, kind reflect.Kind) ([]interface{}, error) {
+ patch, err := normalizeSliceOrder(patch, patchOrder, mergeKey, kind)
+ if err != nil {
+ return nil, err
+ }
+ serverOnly, err = normalizeSliceOrder(serverOnly, serverOrder, mergeKey, kind)
+ if err != nil {
+ return nil, err
+ }
+ all := mergeSortedSlice(serverOnly, patch, serverOrder, mergeKey, kind)
+
+ return all, nil
+}
+
+// mergeSortedSlice merges the 2 sorted lists by serverOrder with best effort.
+// It will insert each item in `left` list to `right` list. In most cases, the 2 lists will be interleaved.
+// The relative order of left and right are guaranteed to be kept.
+// They have higher precedence than the order in the live list.
+// The place for a item in `left` is found by:
+// scan from the place of last insertion in `right` to the end of `right`,
+// the place is before the first item that is greater than the item we want to insert.
+// example usage: using server-only items as left and patch items as right. We insert server-only items
+// to patch list. We use the order of live object as record for comparision.
+func mergeSortedSlice(left, right, serverOrder []interface{}, mergeKey string, kind reflect.Kind) []interface{} {
+ // Returns if l is less than r, and if both have been found.
+ // If l and r both present and l is in front of r, l is less than r.
+ less := func(l, r interface{}) (bool, bool) {
+ li := index(serverOrder, l, mergeKey, kind)
+ ri := index(serverOrder, r, mergeKey, kind)
+ if li >= 0 && ri >= 0 {
+ return li < ri, true
+ } else {
+ return false, false
+ }
+ }
+
+ // left and right should be non-overlapping.
+ size := len(left) + len(right)
+ i, j := 0, 0
+ s := make([]interface{}, size, size)
+
+ for k := 0; k < size; k++ {
+ if i >= len(left) && j < len(right) {
+ // have items left in `right` list
+ s[k] = right[j]
+ j++
+ } else if j >= len(right) && i < len(left) {
+ // have items left in `left` list
+ s[k] = left[i]
+ i++
+ } else {
+ // compare them if i and j are both in bound
+ less, foundBoth := less(left[i], right[j])
+ if foundBoth && less {
+ s[k] = left[i]
+ i++
+ } else {
+ s[k] = right[j]
+ j++
+ }
+ }
+ }
+ return s
+}
+
+// index returns the index of the item in the given items, or -1 if it doesn't exist
+// l must NOT be a slice of slices, this should be checked before calling.
+func index(l []interface{}, valToLookUp interface{}, mergeKey string, kind reflect.Kind) int {
+ var getValFn func(interface{}) interface{}
+ // Get the correct `getValFn` based on item `kind`.
+ // It should return the value of merge key for maps and
+ // return the item for other kinds.
+ switch kind {
+ case reflect.Map:
+ getValFn = func(item interface{}) interface{} {
+ typedItem, ok := item.(map[string]interface{})
+ if !ok {
+ return nil
+ }
+ val := typedItem[mergeKey]
+ return val
+ }
+ default:
+ getValFn = func(item interface{}) interface{} {
+ return item
+ }
+ }
+
+ for i, v := range l {
+ if getValFn(valToLookUp) == getValFn(v) {
+ return i
+ }
+ }
+ return -1
+}
+
+// extractToDeleteItems takes a list and
+// returns 2 lists: one contains items that should be kept and the other contains items to be deleted.
+func extractToDeleteItems(l []interface{}) ([]interface{}, []interface{}, error) {
+ var nonDelete, toDelete []interface{}
+ for _, v := range l {
+ m, ok := v.(map[string]interface{})
+ if !ok {
+ return nil, nil, mergepatch.ErrBadArgType(m, v)
+ }
+
+ directive, foundDirective := m[directiveMarker]
+ if foundDirective && directive == deleteDirective {
+ toDelete = append(toDelete, v)
+ } else {
+ nonDelete = append(nonDelete, v)
+ }
+ }
+ return nonDelete, toDelete, nil
+}
+
+// normalizeSliceOrder sort `toSort` list by `order`
+func normalizeSliceOrder(toSort, order []interface{}, mergeKey string, kind reflect.Kind) ([]interface{}, error) {
+ var toDelete []interface{}
+ if kind == reflect.Map {
+ // make sure each item in toSort, order has merge key
+ err := validateMergeKeyInLists(mergeKey, toSort, order)
+ if err != nil {
+ return nil, err
+ }
+ toSort, toDelete, err = extractToDeleteItems(toSort)
+ }
+
+ sort.SliceStable(toSort, func(i, j int) bool {
+ if ii := index(order, toSort[i], mergeKey, kind); ii >= 0 {
+ if ij := index(order, toSort[j], mergeKey, kind); ij >= 0 {
+ return ii < ij
+ }
+ }
+ return true
+ })
+ toSort = append(toSort, toDelete...)
+ return toSort, nil
+}
+
+// Returns a (recursive) strategic merge patch, a parallel deletion list if necessary and
+// another list to set the order of the list
+// Only list of primitives with merge strategy will generate a parallel deletion list.
+// These two lists should yield modified when applied to original, for lists with merge semantics.
+func diffLists(original, modified []interface{}, t reflect.Type, mergeKey string, diffOptions DiffOptions) ([]interface{}, []interface{}, []interface{}, error) {
+ if len(original) == 0 {
+ // Both slices are empty - do nothing
+ if len(modified) == 0 || diffOptions.IgnoreChangesAndAdditions {
+ return nil, nil, nil, nil
+ }
+
+ // Old slice was empty - add all elements from the new slice
+ return modified, nil, nil, nil
+ }
+
+ elementType, err := sliceElementType(original, modified)
+ if err != nil {
+ return nil, nil, nil, err
+ }
+
+ var patchList, deleteList, setOrderList []interface{}
+ kind := elementType.Kind()
+ switch kind {
+ case reflect.Map:
+ patchList, deleteList, err = diffListsOfMaps(original, modified, t, mergeKey, diffOptions)
+ patchList, err = normalizeSliceOrder(patchList, modified, mergeKey, kind)
+ orderSame, err := isOrderSame(original, modified, mergeKey)
+ if err != nil {
+ return nil, nil, nil, err
+ }
+ // append the deletions to the end of the patch list.
+ patchList = append(patchList, deleteList...)
+ deleteList = nil
+ // generate the setElementOrder list when there are content changes or order changes
+ if diffOptions.SetElementOrder &&
+ ((!diffOptions.IgnoreChangesAndAdditions && (len(patchList) > 0 || !orderSame)) ||
+ (!diffOptions.IgnoreDeletions && len(patchList) > 0)) {
+ // Generate a list of maps that each item contains only the merge key.
+ setOrderList = make([]interface{}, len(modified))
+ for i, v := range modified {
+ typedV := v.(map[string]interface{})
+ setOrderList[i] = map[string]interface{}{
+ mergeKey: typedV[mergeKey],
+ }
+ }
+ }
+ case reflect.Slice:
+ // Lists of Lists are not permitted by the api
+ return nil, nil, nil, mergepatch.ErrNoListOfLists
+ default:
+ patchList, deleteList, err = diffListsOfScalars(original, modified, diffOptions)
+ patchList, err = normalizeSliceOrder(patchList, modified, mergeKey, kind)
+ // generate the setElementOrder list when there are content changes or order changes
+ if diffOptions.SetElementOrder && ((!diffOptions.IgnoreDeletions && len(deleteList) > 0) ||
+ (!diffOptions.IgnoreChangesAndAdditions && !reflect.DeepEqual(original, modified))) {
+ setOrderList = modified
+ }
+ }
+ return patchList, deleteList, setOrderList, err
+}
+
+// isOrderSame checks if the order in a list has changed
+func isOrderSame(original, modified []interface{}, mergeKey string) (bool, error) {
+ if len(original) != len(modified) {
+ return false, nil
+ }
+ for i, modifiedItem := range modified {
+ equal, err := mergeKeyValueEqual(original[i], modifiedItem, mergeKey)
+ if err != nil || !equal {
+ return equal, err
+ }
+ }
+ return true, nil
+}
+
+// diffListsOfScalars returns 2 lists, the first one is addList and the second one is deletionList.
+// Argument diffOptions.IgnoreChangesAndAdditions controls if calculate addList. true means not calculate.
+// Argument diffOptions.IgnoreDeletions controls if calculate deletionList. true means not calculate.
+// original may be changed, but modified is guaranteed to not be changed
+func diffListsOfScalars(original, modified []interface{}, diffOptions DiffOptions) ([]interface{}, []interface{}, error) {
+ modifiedCopy := make([]interface{}, len(modified))
+ copy(modifiedCopy, modified)
+ // Sort the scalars for easier calculating the diff
+ originalScalars := sortScalars(original)
+ modifiedScalars := sortScalars(modifiedCopy)
+
+ originalIndex, modifiedIndex := 0, 0
+ addList := []interface{}{}
+ deletionList := []interface{}{}
+
+ for {
+ originalInBounds := originalIndex < len(originalScalars)
+ modifiedInBounds := modifiedIndex < len(modifiedScalars)
+ if !originalInBounds && !modifiedInBounds {
+ break
+ }
+ // we need to compare the string representation of the scalar,
+ // because the scalar is an interface which doesn't support either < or >
+ // And that's how func sortScalars compare scalars.
+ var originalString, modifiedString string
+ var originalValue, modifiedValue interface{}
+ if originalInBounds {
+ originalValue = originalScalars[originalIndex]
+ originalString = fmt.Sprintf("%v", originalValue)
+ }
+ if modifiedInBounds {
+ modifiedValue = modifiedScalars[modifiedIndex]
+ modifiedString = fmt.Sprintf("%v", modifiedValue)
+ }
+
+ originalV, modifiedV := compareListValuesAtIndex(originalInBounds, modifiedInBounds, originalString, modifiedString)
+ switch {
+ case originalV == nil && modifiedV == nil:
+ originalIndex++
+ modifiedIndex++
+ case originalV != nil && modifiedV == nil:
+ if !diffOptions.IgnoreDeletions {
+ deletionList = append(deletionList, originalValue)
+ }
+ originalIndex++
+ case originalV == nil && modifiedV != nil:
+ if !diffOptions.IgnoreChangesAndAdditions {
+ addList = append(addList, modifiedValue)
+ }
+ modifiedIndex++
+ default:
+ return nil, nil, fmt.Errorf("Unexpected returned value from compareListValuesAtIndex: %v and %v", originalV, modifiedV)
+ }
+ }
+
+ return addList, deduplicateScalars(deletionList), nil
+}
+
+// If first return value is non-nil, list1 contains an element not present in list2
+// If second return value is non-nil, list2 contains an element not present in list1
+func compareListValuesAtIndex(list1Inbounds, list2Inbounds bool, list1Value, list2Value string) (interface{}, interface{}) {
+ bothInBounds := list1Inbounds && list2Inbounds
+ switch {
+ // scalars are identical
+ case bothInBounds && list1Value == list2Value:
+ return nil, nil
+ // only list2 is in bound
+ case !list1Inbounds:
+ fallthrough
+ // list2 has additional scalar
+ case bothInBounds && list1Value > list2Value:
+ return nil, list2Value
+ // only original is in bound
+ case !list2Inbounds:
+ fallthrough
+ // original has additional scalar
+ case bothInBounds && list1Value < list2Value:
+ return list1Value, nil
+ default:
+ return nil, nil
+ }
+}
+
+// diffListsOfMaps takes a pair of lists and
+// returns a (recursive) strategic merge patch list contains additions and changes and
+// a deletion list contains deletions
+func diffListsOfMaps(original, modified []interface{}, t reflect.Type, mergeKey string, diffOptions DiffOptions) ([]interface{}, []interface{}, error) {
+ patch := make([]interface{}, 0, len(modified))
+ deletionList := make([]interface{}, 0, len(original))
+
+ originalSorted, err := sortMergeListsByNameArray(original, t, mergeKey, false)
+ if err != nil {
+ return nil, nil, err
+ }
+ modifiedSorted, err := sortMergeListsByNameArray(modified, t, mergeKey, false)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ originalIndex, modifiedIndex := 0, 0
+ for {
+ originalInBounds := originalIndex < len(originalSorted)
+ modifiedInBounds := modifiedIndex < len(modifiedSorted)
+ bothInBounds := originalInBounds && modifiedInBounds
+ if !originalInBounds && !modifiedInBounds {
+ break
+ }
+
+ var originalElementMergeKeyValueString, modifiedElementMergeKeyValueString string
+ var originalElementMergeKeyValue, modifiedElementMergeKeyValue interface{}
+ var originalElement, modifiedElement map[string]interface{}
+ if originalInBounds {
+ originalElement, originalElementMergeKeyValue, err = getMapAndMergeKeyValueByIndex(originalIndex, mergeKey, originalSorted)
+ if err != nil {
+ return nil, nil, err
+ }
+ originalElementMergeKeyValueString = fmt.Sprintf("%v", originalElementMergeKeyValue)
+ }
+ if modifiedInBounds {
+ modifiedElement, modifiedElementMergeKeyValue, err = getMapAndMergeKeyValueByIndex(modifiedIndex, mergeKey, modifiedSorted)
+ if err != nil {
+ return nil, nil, err
+ }
+ modifiedElementMergeKeyValueString = fmt.Sprintf("%v", modifiedElementMergeKeyValue)
+ }
+
+ switch {
+ case bothInBounds && ItemMatchesOriginalAndModifiedSlice(originalElementMergeKeyValueString, modifiedElementMergeKeyValueString):
+ // Merge key values are equal, so recurse
+ patchValue, err := diffMaps(originalElement, modifiedElement, t, diffOptions)
+ if err != nil {
+ return nil, nil, err
+ }
+ if len(patchValue) > 0 {
+ patchValue[mergeKey] = modifiedElementMergeKeyValue
+ patch = append(patch, patchValue)
+ }
+ originalIndex++
+ modifiedIndex++
+ // only modified is in bound
+ case !originalInBounds:
+ fallthrough
+ // modified has additional map
+ case bothInBounds && ItemAddedToModifiedSlice(originalElementMergeKeyValueString, modifiedElementMergeKeyValueString):
+ if !diffOptions.IgnoreChangesAndAdditions {
+ patch = append(patch, modifiedElement)
+ }
+ modifiedIndex++
+ // only original is in bound
+ case !modifiedInBounds:
+ fallthrough
+ // original has additional map
+ case bothInBounds && ItemRemovedFromModifiedSlice(originalElementMergeKeyValueString, modifiedElementMergeKeyValueString):
+ if !diffOptions.IgnoreDeletions {
+ // Item was deleted, so add delete directive
+ deletionList = append(deletionList, CreateDeleteDirective(mergeKey, originalElementMergeKeyValue))
+ }
+ originalIndex++
+ }
+ }
+
+ return patch, deletionList, nil
+}
+
+// getMapAndMergeKeyValueByIndex return a map in the list and its merge key value given the index of the map.
+func getMapAndMergeKeyValueByIndex(index int, mergeKey string, listOfMaps []interface{}) (map[string]interface{}, interface{}, error) {
+ m, ok := listOfMaps[index].(map[string]interface{})
+ if !ok {
+ return nil, nil, mergepatch.ErrBadArgType(m, listOfMaps[index])
+ }
+
+ val, ok := m[mergeKey]
+ if !ok {
+ return nil, nil, mergepatch.ErrNoMergeKey(m, mergeKey)
+ }
+ return m, val, nil
+}
+
+// StrategicMergePatch applies a strategic merge patch. The patch and the original document
+// must be json encoded content. A patch can be created from an original and a modified document
+// by calling CreateStrategicMergePatch.
+func StrategicMergePatch(original, patch []byte, dataStruct interface{}) ([]byte, error) {
+ originalMap, err := handleUnmarshal(original)
+ if err != nil {
+ return nil, err
+ }
+ patchMap, err := handleUnmarshal(patch)
+ if err != nil {
+ return nil, err
+ }
+
+ result, err := StrategicMergeMapPatch(originalMap, patchMap, dataStruct)
+ if err != nil {
+ return nil, err
+ }
+
+ return json.Marshal(result)
+}
+
+func handleUnmarshal(j []byte) (map[string]interface{}, error) {
+ if j == nil {
+ j = []byte("{}")
+ }
+
+ m := map[string]interface{}{}
+ err := json.Unmarshal(j, &m)
+ if err != nil {
+ return nil, mergepatch.ErrBadJSONDoc
+ }
+ return m, nil
+}
+
+// StrategicMergePatch applies a strategic merge patch. The original and patch documents
+// must be JSONMap. A patch can be created from an original and modified document by
+// calling CreateTwoWayMergeMapPatch.
+// Warning: the original and patch JSONMap objects are mutated by this function and should not be reused.
+func StrategicMergeMapPatch(original, patch JSONMap, dataStruct interface{}) (JSONMap, error) {
+ t, err := getTagStructType(dataStruct)
+ if err != nil {
+ return nil, err
+ }
+ mergeOptions := MergeOptions{
+ MergeParallelList: true,
+ IgnoreUnmatchedNulls: true,
+ }
+ return mergeMap(original, patch, t, mergeOptions)
+}
+
+func getTagStructType(dataStruct interface{}) (reflect.Type, error) {
+ if dataStruct == nil {
+ return nil, mergepatch.ErrBadArgKind(struct{}{}, nil)
+ }
+
+ t := reflect.TypeOf(dataStruct)
+ // Get the underlying type for pointers
+ if t.Kind() == reflect.Ptr {
+ t = t.Elem()
+ }
+
+ if t.Kind() != reflect.Struct {
+ return nil, mergepatch.ErrBadArgKind(struct{}{}, dataStruct)
+ }
+
+ return t, nil
+}
+
+// handleDirectiveInMergeMap handles the patch directive when merging 2 maps.
+func handleDirectiveInMergeMap(directive interface{}, patch map[string]interface{}) (map[string]interface{}, error) {
+ if directive == replaceDirective {
+ // If the patch contains "$patch: replace", don't merge it, just use the
+ // patch directly. Later on, we can add a single level replace that only
+ // affects the map that the $patch is in.
+ delete(patch, directiveMarker)
+ return patch, nil
+ }
+
+ if directive == deleteDirective {
+ // If the patch contains "$patch: delete", don't merge it, just return
+ // an empty map.
+ return map[string]interface{}{}, nil
+ }
+
+ return nil, mergepatch.ErrBadPatchType(directive, patch)
+}
+
+func containsDirectiveMarker(item interface{}) bool {
+ m, ok := item.(map[string]interface{})
+ if ok {
+ if _, foundDirectiveMarker := m[directiveMarker]; foundDirectiveMarker {
+ return true
+ }
+ }
+ return false
+}
+
+func mergeKeyValueEqual(left, right interface{}, mergeKey string) (bool, error) {
+ if len(mergeKey) == 0 {
+ return left == right, nil
+ }
+ typedLeft, ok := left.(map[string]interface{})
+ if !ok {
+ return false, mergepatch.ErrBadArgType(typedLeft, left)
+ }
+ typedRight, ok := right.(map[string]interface{})
+ if !ok {
+ return false, mergepatch.ErrBadArgType(typedRight, right)
+ }
+ mergeKeyLeft, ok := typedLeft[mergeKey]
+ if !ok {
+ return false, mergepatch.ErrNoMergeKey(typedLeft, mergeKey)
+ }
+ mergeKeyRight, ok := typedRight[mergeKey]
+ if !ok {
+ return false, mergepatch.ErrNoMergeKey(typedRight, mergeKey)
+ }
+ return mergeKeyLeft == mergeKeyRight, nil
+}
+
+// extractKey trims the prefix and return the original key
+func extractKey(s, prefix string) (string, error) {
+ substrings := strings.SplitN(s, "/", 2)
+ if len(substrings) <= 1 || substrings[0] != prefix {
+ switch prefix {
+ case deleteFromPrimitiveListDirectivePrefix:
+ return "", mergepatch.ErrBadPatchFormatForPrimitiveList
+ case setElementOrderDirectivePrefix:
+ return "", mergepatch.ErrBadPatchFormatForSetElementOrderList
+ default:
+ return "", fmt.Errorf("fail to find unknown prefix %q in %s\n", prefix, s)
+ }
+ }
+ return substrings[1], nil
+}
+
+// validatePatchUsingSetOrderList verifies:
+// the relative order of any two items in the setOrderList list matches that in the patch list.
+// the items in the patch list must be a subset or the same as the $setElementOrder list (deletions are ignored).
+func validatePatchWithSetOrderList(patchList, setOrderList interface{}, mergeKey string) error {
+ typedSetOrderList, ok := setOrderList.([]interface{})
+ if !ok {
+ return mergepatch.ErrBadPatchFormatForSetElementOrderList
+ }
+ typedPatchList, ok := patchList.([]interface{})
+ if !ok {
+ return mergepatch.ErrBadPatchFormatForSetElementOrderList
+ }
+ if len(typedSetOrderList) == 0 || len(typedPatchList) == 0 {
+ return nil
+ }
+
+ var nonDeleteList, toDeleteList []interface{}
+ var err error
+ if len(mergeKey) > 0 {
+ nonDeleteList, toDeleteList, err = extractToDeleteItems(typedPatchList)
+ if err != nil {
+ return err
+ }
+ } else {
+ nonDeleteList = typedPatchList
+ }
+
+ patchIndex, setOrderIndex := 0, 0
+ for patchIndex < len(nonDeleteList) && setOrderIndex < len(typedSetOrderList) {
+ if containsDirectiveMarker(nonDeleteList[patchIndex]) {
+ patchIndex++
+ continue
+ }
+ mergeKeyEqual, err := mergeKeyValueEqual(nonDeleteList[patchIndex], typedSetOrderList[setOrderIndex], mergeKey)
+ if err != nil {
+ return err
+ }
+ if mergeKeyEqual {
+ patchIndex++
+ }
+ setOrderIndex++
+ }
+ // If patchIndex is inbound but setOrderIndex if out of bound mean there are items mismatching between the patch list and setElementOrder list.
+ // the second check is is a sanity check, and should always be true if the first is true.
+ if patchIndex < len(nonDeleteList) && setOrderIndex >= len(typedSetOrderList) {
+ return fmt.Errorf("The order in patch list:\n%v\n doesn't match %s list:\n%v\n", typedPatchList, setElementOrderDirectivePrefix, setOrderList)
+ }
+ typedPatchList = append(nonDeleteList, toDeleteList...)
+ return nil
+}
+
+// preprocessDeletionListForMerging preprocesses the deletion list.
+// it returns shouldContinue, isDeletionList, noPrefixKey
+func preprocessDeletionListForMerging(key string, original map[string]interface{},
+ patchVal interface{}, mergeDeletionList bool) (bool, bool, string, error) {
+ // If found a parallel list for deletion and we are going to merge the list,
+ // overwrite the key to the original key and set flag isDeleteList
+ foundParallelListPrefix := strings.HasPrefix(key, deleteFromPrimitiveListDirectivePrefix)
+ if foundParallelListPrefix {
+ if !mergeDeletionList {
+ original[key] = patchVal
+ return true, false, "", nil
+ }
+ originalKey, err := extractKey(key, deleteFromPrimitiveListDirectivePrefix)
+ return false, true, originalKey, err
+ }
+ return false, false, "", nil
+}
+
+// applyRetainKeysDirective looks for a retainKeys directive and applies to original
+// - if no directive exists do nothing
+// - if directive is found, clear keys in original missing from the directive list
+// - validate that all keys present in the patch are present in the retainKeys directive
+// note: original may be another patch request, e.g. applying the add+modified patch to the deletions patch. In this case it may have directives
+func applyRetainKeysDirective(original, patch map[string]interface{}, options MergeOptions) error {
+ retainKeysInPatch, foundInPatch := patch[retainKeysDirective]
+ if !foundInPatch {
+ return nil
+ }
+ // cleanup the directive
+ delete(patch, retainKeysDirective)
+
+ if !options.MergeParallelList {
+ // If original is actually a patch, make sure the retainKeys directives are the same in both patches if present in both.
+ // If not present in the original patch, copy from the modified patch.
+ retainKeysInOriginal, foundInOriginal := original[retainKeysDirective]
+ if foundInOriginal {
+ if !reflect.DeepEqual(retainKeysInOriginal, retainKeysInPatch) {
+ // This error actually should never happen.
+ return fmt.Errorf("%v and %v are not deep equal: this may happen when calculating the 3-way diff patch", retainKeysInOriginal, retainKeysInPatch)
+ }
+ } else {
+ original[retainKeysDirective] = retainKeysInPatch
+ }
+ return nil
+ }
+
+ retainKeysList, ok := retainKeysInPatch.([]interface{})
+ if !ok {
+ return mergepatch.ErrBadPatchFormatForRetainKeys
+ }
+
+ // validate patch to make sure all fields in the patch are present in the retainKeysList.
+ // The map is used only as a set, the value is never referenced
+ m := map[interface{}]struct{}{}
+ for _, v := range retainKeysList {
+ m[v] = struct{}{}
+ }
+ for k, v := range patch {
+ if v == nil || strings.HasPrefix(k, deleteFromPrimitiveListDirectivePrefix) ||
+ strings.HasPrefix(k, setElementOrderDirectivePrefix) {
+ continue
+ }
+ // If there is an item present in the patch but not in the retainKeys list,
+ // the patch is invalid.
+ if _, found := m[k]; !found {
+ return mergepatch.ErrBadPatchFormatForRetainKeys
+ }
+ }
+
+ // clear not present fields
+ for k := range original {
+ if _, found := m[k]; !found {
+ delete(original, k)
+ }
+ }
+ return nil
+}
+
+// mergePatchIntoOriginal processes $setElementOrder list.
+// When not merging the directive, it will make sure $setElementOrder list exist only in original.
+// When merging the directive, it will try to find the $setElementOrder list and
+// its corresponding patch list, validate it and merge it.
+// Then, sort them by the relative order in setElementOrder, patch list and live list.
+// The precedence is $setElementOrder > order in patch list > order in live list.
+// This function will delete the item after merging it to prevent process it again in the future.
+// Ref: https://git.k8s.io/community/contributors/design-proposals/preserve-order-in-strategic-merge-patch.md
+func mergePatchIntoOriginal(original, patch map[string]interface{}, t reflect.Type, mergeOptions MergeOptions) error {
+ for key, patchV := range patch {
+ // Do nothing if there is no ordering directive
+ if !strings.HasPrefix(key, setElementOrderDirectivePrefix) {
+ continue
+ }
+
+ setElementOrderInPatch := patchV
+ // Copies directive from the second patch (`patch`) to the first patch (`original`)
+ // and checks they are equal and delete the directive in the second patch
+ if !mergeOptions.MergeParallelList {
+ setElementOrderListInOriginal, ok := original[key]
+ if ok {
+ // check if the setElementOrder list in original and the one in patch matches
+ if !reflect.DeepEqual(setElementOrderListInOriginal, setElementOrderInPatch) {
+ return mergepatch.ErrBadPatchFormatForSetElementOrderList
+ }
+ } else {
+ // move the setElementOrder list from patch to original
+ original[key] = setElementOrderInPatch
+ }
+ }
+ delete(patch, key)
+
+ var (
+ ok bool
+ originalFieldValue, patchFieldValue, merged []interface{}
+ patchStrategy, mergeKey string
+ patchStrategies []string
+ fieldType reflect.Type
+ )
+ typedSetElementOrderList, ok := setElementOrderInPatch.([]interface{})
+ if !ok {
+ return mergepatch.ErrBadArgType(typedSetElementOrderList, setElementOrderInPatch)
+ }
+ // Trim the setElementOrderDirectivePrefix to get the key of the list field in original.
+ originalKey, err := extractKey(key, setElementOrderDirectivePrefix)
+ if err != nil {
+ return err
+ }
+ // try to find the list with `originalKey` in `original` and `modified` and merge them.
+ originalList, foundOriginal := original[originalKey]
+ patchList, foundPatch := patch[originalKey]
+ if foundOriginal {
+ originalFieldValue, ok = originalList.([]interface{})
+ if !ok {
+ return mergepatch.ErrBadArgType(originalFieldValue, originalList)
+ }
+ }
+ if foundPatch {
+ patchFieldValue, ok = patchList.([]interface{})
+ if !ok {
+ return mergepatch.ErrBadArgType(patchFieldValue, patchList)
+ }
+ }
+ fieldType, patchStrategies, mergeKey, err = forkedjson.LookupPatchMetadata(t, originalKey)
+ if err != nil {
+ return err
+ }
+ _, patchStrategy, err = extractRetainKeysPatchStrategy(patchStrategies)
+ if err != nil {
+ return err
+ }
+ // Check for consistency between the element order list and the field it applies to
+ err = validatePatchWithSetOrderList(patchFieldValue, typedSetElementOrderList, mergeKey)
+ if err != nil {
+ return err
+ }
+
+ switch {
+ case foundOriginal && !foundPatch:
+ // no change to list contents
+ merged = originalFieldValue
+ case !foundOriginal && foundPatch:
+ // list was added
+ merged = patchFieldValue
+ case foundOriginal && foundPatch:
+ merged, err = mergeSliceHandler(originalList, patchList, fieldType,
+ patchStrategy, mergeKey, false, mergeOptions)
+ if err != nil {
+ return err
+ }
+ case !foundOriginal && !foundPatch:
+ continue
+ }
+
+ // Split all items into patch items and server-only items and then enforce the order.
+ var patchItems, serverOnlyItems []interface{}
+ if len(mergeKey) == 0 {
+ // Primitives doesn't need merge key to do partitioning.
+ patchItems, serverOnlyItems = partitionPrimitivesByPresentInList(merged, typedSetElementOrderList)
+
+ } else {
+ // Maps need merge key to do partitioning.
+ patchItems, serverOnlyItems, err = partitionMapsByPresentInList(merged, typedSetElementOrderList, mergeKey)
+ if err != nil {
+ return err
+ }
+ }
+
+ elementType, err := sliceElementType(originalFieldValue, patchFieldValue)
+ if err != nil {
+ return err
+ }
+ kind := elementType.Kind()
+ // normalize merged list
+ // typedSetElementOrderList contains all the relative order in typedPatchList,
+ // so don't need to use typedPatchList
+ both, err := normalizeElementOrder(patchItems, serverOnlyItems, typedSetElementOrderList, originalFieldValue, mergeKey, kind)
+ if err != nil {
+ return err
+ }
+ original[originalKey] = both
+ // delete patch list from patch to prevent process again in the future
+ delete(patch, originalKey)
+ }
+ return nil
+}
+
+// partitionPrimitivesByPresentInList partitions elements into 2 slices, the first containing items present in partitionBy, the other not.
+func partitionPrimitivesByPresentInList(original, partitionBy []interface{}) ([]interface{}, []interface{}) {
+ patch := make([]interface{}, 0, len(original))
+ serverOnly := make([]interface{}, 0, len(original))
+ inPatch := map[interface{}]bool{}
+ for _, v := range partitionBy {
+ inPatch[v] = true
+ }
+ for _, v := range original {
+ if !inPatch[v] {
+ serverOnly = append(serverOnly, v)
+ } else {
+ patch = append(patch, v)
+ }
+ }
+ return patch, serverOnly
+}
+
+// partitionMapsByPresentInList partitions elements into 2 slices, the first containing items present in partitionBy, the other not.
+func partitionMapsByPresentInList(original, partitionBy []interface{}, mergeKey string) ([]interface{}, []interface{}, error) {
+ patch := make([]interface{}, 0, len(original))
+ serverOnly := make([]interface{}, 0, len(original))
+ for _, v := range original {
+ typedV, ok := v.(map[string]interface{})
+ if !ok {
+ return nil, nil, mergepatch.ErrBadArgType(typedV, v)
+ }
+ mergeKeyValue, foundMergeKey := typedV[mergeKey]
+ if !foundMergeKey {
+ return nil, nil, mergepatch.ErrNoMergeKey(typedV, mergeKey)
+ }
+ _, _, found, err := findMapInSliceBasedOnKeyValue(partitionBy, mergeKey, mergeKeyValue)
+ if err != nil {
+ return nil, nil, err
+ }
+ if !found {
+ serverOnly = append(serverOnly, v)
+ } else {
+ patch = append(patch, v)
+ }
+ }
+ return patch, serverOnly, nil
+}
+
+// Merge fields from a patch map into the original map. Note: This may modify
+// both the original map and the patch because getting a deep copy of a map in
+// golang is highly non-trivial.
+// flag mergeOptions.MergeParallelList controls if using the parallel list to delete or keeping the list.
+// If patch contains any null field (e.g. field_1: null) that is not
+// present in original, then to propagate it to the end result use
+// mergeOptions.IgnoreUnmatchedNulls == false.
+func mergeMap(original, patch map[string]interface{}, t reflect.Type, mergeOptions MergeOptions) (map[string]interface{}, error) {
+ if v, ok := patch[directiveMarker]; ok {
+ return handleDirectiveInMergeMap(v, patch)
+ }
+
+ // nil is an accepted value for original to simplify logic in other places.
+ // If original is nil, replace it with an empty map and then apply the patch.
+ if original == nil {
+ original = map[string]interface{}{}
+ }
+
+ err := applyRetainKeysDirective(original, patch, mergeOptions)
+ if err != nil {
+ return nil, err
+ }
+
+ // Process $setElementOrder list and other lists sharing the same key.
+ // When not merging the directive, it will make sure $setElementOrder list exist only in original.
+ // When merging the directive, it will process $setElementOrder and its patch list together.
+ // This function will delete the merged elements from patch so they will not be reprocessed
+ err = mergePatchIntoOriginal(original, patch, t, mergeOptions)
+ if err != nil {
+ return nil, err
+ }
+
+ // Start merging the patch into the original.
+ for k, patchV := range patch {
+ skipProcessing, isDeleteList, noPrefixKey, err := preprocessDeletionListForMerging(k, original, patchV, mergeOptions.MergeParallelList)
+ if err != nil {
+ return nil, err
+ }
+ if skipProcessing {
+ continue
+ }
+ if len(noPrefixKey) > 0 {
+ k = noPrefixKey
+ }
+
+ // If the value of this key is null, delete the key if it exists in the
+ // original. Otherwise, check if we want to preserve it or skip it.
+ // Preserving the null value is useful when we want to send an explicit
+ // delete to the API server.
+ if patchV == nil {
+ if _, ok := original[k]; ok {
+ delete(original, k)
+ }
+ if mergeOptions.IgnoreUnmatchedNulls {
+ continue
+ }
+ }
+
+ _, ok := original[k]
+ if !ok {
+ // If it's not in the original document, just take the patch value.
+ original[k] = patchV
+ continue
+ }
+
+ // If the data type is a pointer, resolve the element.
+ if t.Kind() == reflect.Ptr {
+ t = t.Elem()
+ }
+
+ originalType := reflect.TypeOf(original[k])
+ patchType := reflect.TypeOf(patchV)
+ if originalType != patchType {
+ original[k] = patchV
+ continue
+ }
+ // If they're both maps or lists, recurse into the value.
+ // First find the fieldPatchStrategy and fieldPatchMergeKey.
+ fieldType, fieldPatchStrategies, fieldPatchMergeKey, err := forkedjson.LookupPatchMetadata(t, k)
+ if err != nil {
+ return nil, err
+ }
+ _, patchStrategy, err := extractRetainKeysPatchStrategy(fieldPatchStrategies)
+ if err != nil {
+ return nil, err
+ }
+
+ switch originalType.Kind() {
+ case reflect.Map:
+
+ original[k], err = mergeMapHandler(original[k], patchV, fieldType, patchStrategy, mergeOptions)
+ case reflect.Slice:
+ original[k], err = mergeSliceHandler(original[k], patchV, fieldType, patchStrategy, fieldPatchMergeKey, isDeleteList, mergeOptions)
+ default:
+ original[k] = patchV
+ }
+ if err != nil {
+ return nil, err
+ }
+ }
+ return original, nil
+}
+
+// mergeMapHandler handles how to merge `patchV` whose key is `key` with `original` respecting
+// fieldPatchStrategy and mergeOptions.
+func mergeMapHandler(original, patch interface{}, fieldType reflect.Type,
+ fieldPatchStrategy string, mergeOptions MergeOptions) (map[string]interface{}, error) {
+ typedOriginal, typedPatch, err := mapTypeAssertion(original, patch)
+ if err != nil {
+ return nil, err
+ }
+
+ if fieldPatchStrategy != replaceDirective {
+ return mergeMap(typedOriginal, typedPatch, fieldType, mergeOptions)
+ } else {
+ return typedPatch, nil
+ }
+}
+
+// mergeSliceHandler handles how to merge `patchV` whose key is `key` with `original` respecting
+// fieldPatchStrategy, fieldPatchMergeKey, isDeleteList and mergeOptions.
+func mergeSliceHandler(original, patch interface{}, fieldType reflect.Type,
+ fieldPatchStrategy, fieldPatchMergeKey string, isDeleteList bool, mergeOptions MergeOptions) ([]interface{}, error) {
+ typedOriginal, typedPatch, err := sliceTypeAssertion(original, patch)
+ if err != nil {
+ return nil, err
+ }
+
+ if fieldPatchStrategy == mergeDirective {
+ elemType := fieldType.Elem()
+ return mergeSlice(typedOriginal, typedPatch, elemType, fieldPatchMergeKey, mergeOptions, isDeleteList)
+ } else {
+ return typedPatch, nil
+ }
+}
+
+// Merge two slices together. Note: This may modify both the original slice and
+// the patch because getting a deep copy of a slice in golang is highly
+// non-trivial.
+func mergeSlice(original, patch []interface{}, elemType reflect.Type, mergeKey string, mergeOptions MergeOptions, isDeleteList bool) ([]interface{}, error) {
+ if len(original) == 0 && len(patch) == 0 {
+ return original, nil
+ }
+
+ // All the values must be of the same type, but not a list.
+ t, err := sliceElementType(original, patch)
+ if err != nil {
+ return nil, err
+ }
+
+ var merged []interface{}
+ kind := t.Kind()
+ // If the elements are not maps, merge the slices of scalars.
+ if kind != reflect.Map {
+ if mergeOptions.MergeParallelList && isDeleteList {
+ return deleteFromSlice(original, patch), nil
+ }
+ // Maybe in the future add a "concat" mode that doesn't
+ // deduplicate.
+ both := append(original, patch...)
+ merged = deduplicateScalars(both)
+
+ } else {
+ if mergeKey == "" {
+ return nil, fmt.Errorf("cannot merge lists without merge key for type %s", elemType.Kind().String())
+ }
+
+ original, patch, err = mergeSliceWithSpecialElements(original, patch, mergeKey)
+ if err != nil {
+ return nil, err
+ }
+
+ merged, err = mergeSliceWithoutSpecialElements(original, patch, mergeKey, elemType, mergeOptions)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ // enforce the order
+ var patchItems, serverOnlyItems []interface{}
+ if len(mergeKey) == 0 {
+ patchItems, serverOnlyItems = partitionPrimitivesByPresentInList(merged, patch)
+ } else {
+ patchItems, serverOnlyItems, err = partitionMapsByPresentInList(merged, patch, mergeKey)
+ if err != nil {
+ return nil, err
+ }
+ }
+ return normalizeElementOrder(patchItems, serverOnlyItems, patch, original, mergeKey, kind)
+}
+
+// mergeSliceWithSpecialElements handles special elements with directiveMarker
+// before merging the slices. It returns a updated `original` and a patch without special elements.
+// original and patch must be slices of maps, they should be checked before calling this function.
+func mergeSliceWithSpecialElements(original, patch []interface{}, mergeKey string) ([]interface{}, []interface{}, error) {
+ patchWithoutSpecialElements := []interface{}{}
+ replace := false
+ for _, v := range patch {
+ typedV := v.(map[string]interface{})
+ patchType, ok := typedV[directiveMarker]
+ if !ok {
+ patchWithoutSpecialElements = append(patchWithoutSpecialElements, v)
+ } else {
+ switch patchType {
+ case deleteDirective:
+ mergeValue, ok := typedV[mergeKey]
+ if ok {
+ var err error
+ original, err = deleteMatchingEntries(original, mergeKey, mergeValue)
+ if err != nil {
+ return nil, nil, err
+ }
+ } else {
+ return nil, nil, mergepatch.ErrNoMergeKey(typedV, mergeKey)
+ }
+ case replaceDirective:
+ replace = true
+ // Continue iterating through the array to prune any other $patch elements.
+ case mergeDirective:
+ return nil, nil, fmt.Errorf("merging lists cannot yet be specified in the patch")
+ default:
+ return nil, nil, mergepatch.ErrBadPatchType(patchType, typedV)
+ }
+ }
+ }
+ if replace {
+ return patchWithoutSpecialElements, nil, nil
+ }
+ return original, patchWithoutSpecialElements, nil
+}
+
+// delete all matching entries (based on merge key) from a merging list
+func deleteMatchingEntries(original []interface{}, mergeKey string, mergeValue interface{}) ([]interface{}, error) {
+ for {
+ _, originalKey, found, err := findMapInSliceBasedOnKeyValue(original, mergeKey, mergeValue)
+ if err != nil {
+ return nil, err
+ }
+
+ if !found {
+ break
+ }
+ // Delete the element at originalKey.
+ original = append(original[:originalKey], original[originalKey+1:]...)
+ }
+ return original, nil
+}
+
+// mergeSliceWithoutSpecialElements merges slices with non-special elements.
+// original and patch must be slices of maps, they should be checked before calling this function.
+func mergeSliceWithoutSpecialElements(original, patch []interface{}, mergeKey string, elemType reflect.Type, mergeOptions MergeOptions) ([]interface{}, error) {
+ for _, v := range patch {
+ typedV := v.(map[string]interface{})
+ mergeValue, ok := typedV[mergeKey]
+ if !ok {
+ return nil, mergepatch.ErrNoMergeKey(typedV, mergeKey)
+ }
+
+ // If we find a value with this merge key value in original, merge the
+ // maps. Otherwise append onto original.
+ originalMap, originalKey, found, err := findMapInSliceBasedOnKeyValue(original, mergeKey, mergeValue)
+ if err != nil {
+ return nil, err
+ }
+
+ if found {
+ var mergedMaps interface{}
+ var err error
+ // Merge into original.
+ mergedMaps, err = mergeMap(originalMap, typedV, elemType, mergeOptions)
+ if err != nil {
+ return nil, err
+ }
+
+ original[originalKey] = mergedMaps
+ } else {
+ original = append(original, v)
+ }
+ }
+ return original, nil
+}
+
+// deleteFromSlice uses the parallel list to delete the items in a list of scalars
+func deleteFromSlice(current, toDelete []interface{}) []interface{} {
+ toDeleteMap := map[interface{}]interface{}{}
+ processed := make([]interface{}, 0, len(current))
+ for _, v := range toDelete {
+ toDeleteMap[v] = true
+ }
+ for _, v := range current {
+ if _, found := toDeleteMap[v]; !found {
+ processed = append(processed, v)
+ }
+ }
+ return processed
+}
+
+// This method no longer panics if any element of the slice is not a map.
+func findMapInSliceBasedOnKeyValue(m []interface{}, key string, value interface{}) (map[string]interface{}, int, bool, error) {
+ for k, v := range m {
+ typedV, ok := v.(map[string]interface{})
+ if !ok {
+ return nil, 0, false, fmt.Errorf("value for key %v is not a map.", k)
+ }
+
+ valueToMatch, ok := typedV[key]
+ if ok && valueToMatch == value {
+ return typedV, k, true, nil
+ }
+ }
+
+ return nil, 0, false, nil
+}
+
+// This function takes a JSON map and sorts all the lists that should be merged
+// by key. This is needed by tests because in JSON, list order is significant,
+// but in Strategic Merge Patch, merge lists do not have significant order.
+// Sorting the lists allows for order-insensitive comparison of patched maps.
+func sortMergeListsByName(mapJSON []byte, dataStruct interface{}) ([]byte, error) {
+ var m map[string]interface{}
+ err := json.Unmarshal(mapJSON, &m)
+ if err != nil {
+ return nil, err
+ }
+
+ newM, err := sortMergeListsByNameMap(m, reflect.TypeOf(dataStruct))
+ if err != nil {
+ return nil, err
+ }
+
+ return json.Marshal(newM)
+}
+
+// Function sortMergeListsByNameMap recursively sorts the merge lists by its mergeKey in a map.
+func sortMergeListsByNameMap(s map[string]interface{}, t reflect.Type) (map[string]interface{}, error) {
+ newS := map[string]interface{}{}
+ for k, v := range s {
+ if k == retainKeysDirective {
+ typedV, ok := v.([]interface{})
+ if !ok {
+ return nil, mergepatch.ErrBadPatchFormatForRetainKeys
+ }
+ v = sortScalars(typedV)
+ } else if strings.HasPrefix(k, deleteFromPrimitiveListDirectivePrefix) {
+ typedV, ok := v.([]interface{})
+ if !ok {
+ return nil, mergepatch.ErrBadPatchFormatForPrimitiveList
+ }
+ v = sortScalars(typedV)
+ } else if strings.HasPrefix(k, setElementOrderDirectivePrefix) {
+ _, ok := v.([]interface{})
+ if !ok {
+ return nil, mergepatch.ErrBadPatchFormatForSetElementOrderList
+ }
+ } else if k != directiveMarker {
+ fieldType, fieldPatchStrategies, fieldPatchMergeKey, err := forkedjson.LookupPatchMetadata(t, k)
+ if err != nil {
+ return nil, err
+ }
+ _, patchStrategy, err := extractRetainKeysPatchStrategy(fieldPatchStrategies)
+ if err != nil {
+ return nil, err
+ }
+
+ // If v is a map or a merge slice, recurse.
+ if typedV, ok := v.(map[string]interface{}); ok {
+ var err error
+ v, err = sortMergeListsByNameMap(typedV, fieldType)
+ if err != nil {
+ return nil, err
+ }
+ } else if typedV, ok := v.([]interface{}); ok {
+ if patchStrategy == mergeDirective {
+ var err error
+ v, err = sortMergeListsByNameArray(typedV, fieldType.Elem(), fieldPatchMergeKey, true)
+ if err != nil {
+ return nil, err
+ }
+ }
+ }
+ }
+
+ newS[k] = v
+ }
+
+ return newS, nil
+}
+
+// Function sortMergeListsByNameMap recursively sorts the merge lists by its mergeKey in an array.
+func sortMergeListsByNameArray(s []interface{}, elemType reflect.Type, mergeKey string, recurse bool) ([]interface{}, error) {
+ if len(s) == 0 {
+ return s, nil
+ }
+
+ // We don't support lists of lists yet.
+ t, err := sliceElementType(s)
+ if err != nil {
+ return nil, err
+ }
+
+ // If the elements are not maps...
+ if t.Kind() != reflect.Map {
+ // Sort the elements, because they may have been merged out of order.
+ return deduplicateAndSortScalars(s), nil
+ }
+
+ // Elements are maps - if one of the keys of the map is a map or a
+ // list, we may need to recurse into it.
+ newS := []interface{}{}
+ for _, elem := range s {
+ if recurse {
+ typedElem := elem.(map[string]interface{})
+ newElem, err := sortMergeListsByNameMap(typedElem, elemType)
+ if err != nil {
+ return nil, err
+ }
+
+ newS = append(newS, newElem)
+ } else {
+ newS = append(newS, elem)
+ }
+ }
+
+ // Sort the maps.
+ newS = sortMapsBasedOnField(newS, mergeKey)
+ return newS, nil
+}
+
+func sortMapsBasedOnField(m []interface{}, fieldName string) []interface{} {
+ mapM := mapSliceFromSlice(m)
+ ss := SortableSliceOfMaps{mapM, fieldName}
+ sort.Sort(ss)
+ newS := sliceFromMapSlice(ss.s)
+ return newS
+}
+
+func mapSliceFromSlice(m []interface{}) []map[string]interface{} {
+ newM := []map[string]interface{}{}
+ for _, v := range m {
+ vt := v.(map[string]interface{})
+ newM = append(newM, vt)
+ }
+
+ return newM
+}
+
+func sliceFromMapSlice(s []map[string]interface{}) []interface{} {
+ newS := []interface{}{}
+ for _, v := range s {
+ newS = append(newS, v)
+ }
+
+ return newS
+}
+
+type SortableSliceOfMaps struct {
+ s []map[string]interface{}
+ k string // key to sort on
+}
+
+func (ss SortableSliceOfMaps) Len() int {
+ return len(ss.s)
+}
+
+func (ss SortableSliceOfMaps) Less(i, j int) bool {
+ iStr := fmt.Sprintf("%v", ss.s[i][ss.k])
+ jStr := fmt.Sprintf("%v", ss.s[j][ss.k])
+ return sort.StringsAreSorted([]string{iStr, jStr})
+}
+
+func (ss SortableSliceOfMaps) Swap(i, j int) {
+ tmp := ss.s[i]
+ ss.s[i] = ss.s[j]
+ ss.s[j] = tmp
+}
+
+func deduplicateAndSortScalars(s []interface{}) []interface{} {
+ s = deduplicateScalars(s)
+ return sortScalars(s)
+}
+
+func sortScalars(s []interface{}) []interface{} {
+ ss := SortableSliceOfScalars{s}
+ sort.Sort(ss)
+ return ss.s
+}
+
+func deduplicateScalars(s []interface{}) []interface{} {
+ // Clever algorithm to deduplicate.
+ length := len(s) - 1
+ for i := 0; i < length; i++ {
+ for j := i + 1; j <= length; j++ {
+ if s[i] == s[j] {
+ s[j] = s[length]
+ s = s[0:length]
+ length--
+ j--
+ }
+ }
+ }
+
+ return s
+}
+
+type SortableSliceOfScalars struct {
+ s []interface{}
+}
+
+func (ss SortableSliceOfScalars) Len() int {
+ return len(ss.s)
+}
+
+func (ss SortableSliceOfScalars) Less(i, j int) bool {
+ iStr := fmt.Sprintf("%v", ss.s[i])
+ jStr := fmt.Sprintf("%v", ss.s[j])
+ return sort.StringsAreSorted([]string{iStr, jStr})
+}
+
+func (ss SortableSliceOfScalars) Swap(i, j int) {
+ tmp := ss.s[i]
+ ss.s[i] = ss.s[j]
+ ss.s[j] = tmp
+}
+
+// Returns the type of the elements of N slice(s). If the type is different,
+// another slice or undefined, returns an error.
+func sliceElementType(slices ...[]interface{}) (reflect.Type, error) {
+ var prevType reflect.Type
+ for _, s := range slices {
+ // Go through elements of all given slices and make sure they are all the same type.
+ for _, v := range s {
+ currentType := reflect.TypeOf(v)
+ if prevType == nil {
+ prevType = currentType
+ // We don't support lists of lists yet.
+ if prevType.Kind() == reflect.Slice {
+ return nil, mergepatch.ErrNoListOfLists
+ }
+ } else {
+ if prevType != currentType {
+ return nil, fmt.Errorf("list element types are not identical: %v", fmt.Sprint(slices))
+ }
+ prevType = currentType
+ }
+ }
+ }
+
+ if prevType == nil {
+ return nil, fmt.Errorf("no elements in any of the given slices")
+ }
+
+ return prevType, nil
+}
+
+// MergingMapsHaveConflicts returns true if the left and right JSON interface
+// objects overlap with different values in any key. All keys are required to be
+// strings. Since patches of the same Type have congruent keys, this is valid
+// for multiple patch types. This method supports strategic merge patch semantics.
+func MergingMapsHaveConflicts(left, right map[string]interface{}, dataStruct interface{}) (bool, error) {
+ t, err := getTagStructType(dataStruct)
+ if err != nil {
+ return true, err
+ }
+
+ return mergingMapFieldsHaveConflicts(left, right, t, "", "")
+}
+
+func mergingMapFieldsHaveConflicts(
+ left, right interface{},
+ fieldType reflect.Type,
+ fieldPatchStrategy, fieldPatchMergeKey string,
+) (bool, error) {
+ switch leftType := left.(type) {
+ case map[string]interface{}:
+ rightType, ok := right.(map[string]interface{})
+ if !ok {
+ return true, nil
+ }
+ leftMarker, okLeft := leftType[directiveMarker]
+ rightMarker, okRight := rightType[directiveMarker]
+ // if one or the other has a directive marker,
+ // then we need to consider that before looking at the individual keys,
+ // since a directive operates on the whole map.
+ if okLeft || okRight {
+ // if one has a directive marker and the other doesn't,
+ // then we have a conflict, since one is deleting or replacing the whole map,
+ // and the other is doing things to individual keys.
+ if okLeft != okRight {
+ return true, nil
+ }
+ // if they both have markers, but they are not the same directive,
+ // then we have a conflict because they're doing different things to the map.
+ if leftMarker != rightMarker {
+ return true, nil
+ }
+ }
+ if fieldPatchStrategy == replaceDirective {
+ return false, nil
+ }
+ // Check the individual keys.
+ return mapsHaveConflicts(leftType, rightType, fieldType)
+
+ case []interface{}:
+ rightType, ok := right.([]interface{})
+ if !ok {
+ return true, nil
+ }
+ return slicesHaveConflicts(leftType, rightType, fieldType, fieldPatchStrategy, fieldPatchMergeKey)
+
+ case string, float64, bool, int, int64, nil:
+ return !reflect.DeepEqual(left, right), nil
+ default:
+ return true, fmt.Errorf("unknown type: %v", reflect.TypeOf(left))
+ }
+}
+
+func mapsHaveConflicts(typedLeft, typedRight map[string]interface{}, structType reflect.Type) (bool, error) {
+ for key, leftValue := range typedLeft {
+ if key != directiveMarker && key != retainKeysDirective {
+ if rightValue, ok := typedRight[key]; ok {
+ fieldType, fieldPatchStrategies, fieldPatchMergeKey, err := forkedjson.LookupPatchMetadata(structType, key)
+ if err != nil {
+ return true, err
+ }
+ _, patchStrategy, err := extractRetainKeysPatchStrategy(fieldPatchStrategies)
+ if err != nil {
+ return true, err
+ }
+
+ if hasConflicts, err := mergingMapFieldsHaveConflicts(leftValue, rightValue,
+ fieldType, patchStrategy, fieldPatchMergeKey); hasConflicts {
+ return true, err
+ }
+ }
+ }
+ }
+
+ return false, nil
+}
+
+func slicesHaveConflicts(
+ typedLeft, typedRight []interface{},
+ fieldType reflect.Type,
+ fieldPatchStrategy, fieldPatchMergeKey string,
+) (bool, error) {
+ elementType, err := sliceElementType(typedLeft, typedRight)
+ if err != nil {
+ return true, err
+ }
+
+ valueType := fieldType.Elem()
+ if fieldPatchStrategy == mergeDirective {
+ // Merging lists of scalars have no conflicts by definition
+ // So we only need to check further if the elements are maps
+ if elementType.Kind() != reflect.Map {
+ return false, nil
+ }
+
+ // Build a map for each slice and then compare the two maps
+ leftMap, err := sliceOfMapsToMapOfMaps(typedLeft, fieldPatchMergeKey)
+ if err != nil {
+ return true, err
+ }
+
+ rightMap, err := sliceOfMapsToMapOfMaps(typedRight, fieldPatchMergeKey)
+ if err != nil {
+ return true, err
+ }
+
+ return mapsOfMapsHaveConflicts(leftMap, rightMap, valueType)
+ }
+
+ // Either we don't have type information, or these are non-merging lists
+ if len(typedLeft) != len(typedRight) {
+ return true, nil
+ }
+
+ // Sort scalar slices to prevent ordering issues
+ // We have no way to sort non-merging lists of maps
+ if elementType.Kind() != reflect.Map {
+ typedLeft = deduplicateAndSortScalars(typedLeft)
+ typedRight = deduplicateAndSortScalars(typedRight)
+ }
+
+ // Compare the slices element by element in order
+ // This test will fail if the slices are not sorted
+ for i := range typedLeft {
+ if hasConflicts, err := mergingMapFieldsHaveConflicts(typedLeft[i], typedRight[i], valueType, "", ""); hasConflicts {
+ return true, err
+ }
+ }
+
+ return false, nil
+}
+
+func sliceOfMapsToMapOfMaps(slice []interface{}, mergeKey string) (map[string]interface{}, error) {
+ result := make(map[string]interface{}, len(slice))
+ for _, value := range slice {
+ typedValue, ok := value.(map[string]interface{})
+ if !ok {
+ return nil, fmt.Errorf("invalid element type in merging list:%v", slice)
+ }
+
+ mergeValue, ok := typedValue[mergeKey]
+ if !ok {
+ return nil, fmt.Errorf("cannot find merge key `%s` in merging list element:%v", mergeKey, typedValue)
+ }
+
+ result[fmt.Sprintf("%s", mergeValue)] = typedValue
+ }
+
+ return result, nil
+}
+
+func mapsOfMapsHaveConflicts(typedLeft, typedRight map[string]interface{}, structType reflect.Type) (bool, error) {
+ for key, leftValue := range typedLeft {
+ if rightValue, ok := typedRight[key]; ok {
+ if hasConflicts, err := mergingMapFieldsHaveConflicts(leftValue, rightValue, structType, "", ""); hasConflicts {
+ return true, err
+ }
+ }
+ }
+
+ return false, nil
+}
+
+// CreateThreeWayMergePatch reconciles a modified configuration with an original configuration,
+// while preserving any changes or deletions made to the original configuration in the interim,
+// and not overridden by the current configuration. All three documents must be passed to the
+// method as json encoded content. It will return a strategic merge patch, or an error if any
+// of the documents is invalid, or if there are any preconditions that fail against the modified
+// configuration, or, if overwrite is false and there are conflicts between the modified and current
+// configurations. Conflicts are defined as keys changed differently from original to modified
+// than from original to current. In other words, a conflict occurs if modified changes any key
+// in a way that is different from how it is changed in current (e.g., deleting it, changing its
+// value). We also propagate values fields that do not exist in original but are explicitly
+// defined in modified.
+func CreateThreeWayMergePatch(original, modified, current []byte, dataStruct interface{}, overwrite bool, fns ...mergepatch.PreconditionFunc) ([]byte, error) {
+ originalMap := map[string]interface{}{}
+ if len(original) > 0 {
+ if err := json.Unmarshal(original, &originalMap); err != nil {
+ return nil, mergepatch.ErrBadJSONDoc
+ }
+ }
+
+ modifiedMap := map[string]interface{}{}
+ if len(modified) > 0 {
+ if err := json.Unmarshal(modified, &modifiedMap); err != nil {
+ return nil, mergepatch.ErrBadJSONDoc
+ }
+ }
+
+ currentMap := map[string]interface{}{}
+ if len(current) > 0 {
+ if err := json.Unmarshal(current, &currentMap); err != nil {
+ return nil, mergepatch.ErrBadJSONDoc
+ }
+ }
+
+ t, err := getTagStructType(dataStruct)
+ if err != nil {
+ return nil, err
+ }
+
+ // The patch is the difference from current to modified without deletions, plus deletions
+ // from original to modified. To find it, we compute deletions, which are the deletions from
+ // original to modified, and delta, which is the difference from current to modified without
+ // deletions, and then apply delta to deletions as a patch, which should be strictly additive.
+ deltaMapDiffOptions := DiffOptions{
+ IgnoreDeletions: true,
+ SetElementOrder: true,
+ }
+ deltaMap, err := diffMaps(currentMap, modifiedMap, t, deltaMapDiffOptions)
+ if err != nil {
+ return nil, err
+ }
+ deletionsMapDiffOptions := DiffOptions{
+ SetElementOrder: true,
+ IgnoreChangesAndAdditions: true,
+ }
+ deletionsMap, err := diffMaps(originalMap, modifiedMap, t, deletionsMapDiffOptions)
+ if err != nil {
+ return nil, err
+ }
+
+ mergeOptions := MergeOptions{}
+ patchMap, err := mergeMap(deletionsMap, deltaMap, t, mergeOptions)
+ if err != nil {
+ return nil, err
+ }
+
+ // Apply the preconditions to the patch, and return an error if any of them fail.
+ for _, fn := range fns {
+ if !fn(patchMap) {
+ return nil, mergepatch.NewErrPreconditionFailed(patchMap)
+ }
+ }
+
+ // If overwrite is false, and the patch contains any keys that were changed differently,
+ // then return a conflict error.
+ if !overwrite {
+ changeMapDiffOptions := DiffOptions{}
+ changedMap, err := diffMaps(originalMap, currentMap, t, changeMapDiffOptions)
+ if err != nil {
+ return nil, err
+ }
+
+ hasConflicts, err := MergingMapsHaveConflicts(patchMap, changedMap, dataStruct)
+ if err != nil {
+ return nil, err
+ }
+
+ if hasConflicts {
+ return nil, mergepatch.NewErrConflict(mergepatch.ToYAMLOrError(patchMap), mergepatch.ToYAMLOrError(changedMap))
+ }
+ }
+
+ return json.Marshal(patchMap)
+}
+
+func ItemAddedToModifiedSlice(original, modified string) bool { return original > modified }
+
+func ItemRemovedFromModifiedSlice(original, modified string) bool { return original < modified }
+
+func ItemMatchesOriginalAndModifiedSlice(original, modified string) bool { return original == modified }
+
+func CreateDeleteDirective(mergeKey string, mergeKeyValue interface{}) map[string]interface{} {
+ return map[string]interface{}{mergeKey: mergeKeyValue, directiveMarker: deleteDirective}
+}
+
+func mapTypeAssertion(original, patch interface{}) (map[string]interface{}, map[string]interface{}, error) {
+ typedOriginal, ok := original.(map[string]interface{})
+ if !ok {
+ return nil, nil, mergepatch.ErrBadArgType(typedOriginal, original)
+ }
+ typedPatch, ok := patch.(map[string]interface{})
+ if !ok {
+ return nil, nil, mergepatch.ErrBadArgType(typedPatch, patch)
+ }
+ return typedOriginal, typedPatch, nil
+}
+
+func sliceTypeAssertion(original, patch interface{}) ([]interface{}, []interface{}, error) {
+ typedOriginal, ok := original.([]interface{})
+ if !ok {
+ return nil, nil, mergepatch.ErrBadArgType(typedOriginal, original)
+ }
+ typedPatch, ok := patch.([]interface{})
+ if !ok {
+ return nil, nil, mergepatch.ErrBadArgType(typedPatch, patch)
+ }
+ return typedOriginal, typedPatch, nil
+}
+
+// extractRetainKeysPatchStrategy process patch strategy, which is a string may contains multiple
+// patch strategies seperated by ",". It returns a boolean var indicating if it has
+// retainKeys strategies and a string for the other strategy.
+func extractRetainKeysPatchStrategy(strategies []string) (bool, string, error) {
+ switch len(strategies) {
+ case 0:
+ return false, "", nil
+ case 1:
+ singleStrategy := strategies[0]
+ switch singleStrategy {
+ case retainKeysStrategy:
+ return true, "", nil
+ default:
+ return false, singleStrategy, nil
+ }
+ case 2:
+ switch {
+ case strategies[0] == retainKeysStrategy:
+ return true, strategies[1], nil
+ case strategies[1] == retainKeysStrategy:
+ return true, strategies[0], nil
+ default:
+ return false, "", fmt.Errorf("unexpected patch strategy: %v", strategies)
+ }
+ default:
+ return false, "", fmt.Errorf("unexpected patch strategy: %v", strategies)
+ }
+}
+
+// hasAdditionalNewField returns if original map has additional key with non-nil value than modified.
+func hasAdditionalNewField(original, modified map[string]interface{}) bool {
+ for k, v := range original {
+ if v == nil {
+ continue
+ }
+ if _, found := modified[k]; !found {
+ return true
+ }
+ }
+ return false
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go b/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go
new file mode 100644
index 000000000..43c779a11
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go
@@ -0,0 +1,254 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package field
+
+import (
+ "fmt"
+ "reflect"
+ "strings"
+
+ utilerrors "k8s.io/apimachinery/pkg/util/errors"
+ "k8s.io/apimachinery/pkg/util/sets"
+)
+
+// Error is an implementation of the 'error' interface, which represents a
+// field-level validation error.
+type Error struct {
+ Type ErrorType
+ Field string
+ BadValue interface{}
+ Detail string
+}
+
+var _ error = &Error{}
+
+// Error implements the error interface.
+func (v *Error) Error() string {
+ return fmt.Sprintf("%s: %s", v.Field, v.ErrorBody())
+}
+
+// ErrorBody returns the error message without the field name. This is useful
+// for building nice-looking higher-level error reporting.
+func (v *Error) ErrorBody() string {
+ var s string
+ switch v.Type {
+ case ErrorTypeRequired, ErrorTypeForbidden, ErrorTypeTooLong, ErrorTypeInternal:
+ s = fmt.Sprintf("%s", v.Type)
+ default:
+ value := v.BadValue
+ valueType := reflect.TypeOf(value)
+ if value == nil || valueType == nil {
+ value = "null"
+ } else if valueType.Kind() == reflect.Ptr {
+ if reflectValue := reflect.ValueOf(value); reflectValue.IsNil() {
+ value = "null"
+ } else {
+ value = reflectValue.Elem().Interface()
+ }
+ }
+ switch t := value.(type) {
+ case int64, int32, float64, float32, bool:
+ // use simple printer for simple types
+ s = fmt.Sprintf("%s: %v", v.Type, value)
+ case string:
+ s = fmt.Sprintf("%s: %q", v.Type, t)
+ case fmt.Stringer:
+ // anything that defines String() is better than raw struct
+ s = fmt.Sprintf("%s: %s", v.Type, t.String())
+ default:
+ // fallback to raw struct
+ // TODO: internal types have panic guards against json.Marshalling to prevent
+ // accidental use of internal types in external serialized form. For now, use
+ // %#v, although it would be better to show a more expressive output in the future
+ s = fmt.Sprintf("%s: %#v", v.Type, value)
+ }
+ }
+ if len(v.Detail) != 0 {
+ s += fmt.Sprintf(": %s", v.Detail)
+ }
+ return s
+}
+
+// ErrorType is a machine readable value providing more detail about why
+// a field is invalid. These values are expected to match 1-1 with
+// CauseType in api/types.go.
+type ErrorType string
+
+// TODO: These values are duplicated in api/types.go, but there's a circular dep. Fix it.
+const (
+ // ErrorTypeNotFound is used to report failure to find a requested value
+ // (e.g. looking up an ID). See NotFound().
+ ErrorTypeNotFound ErrorType = "FieldValueNotFound"
+ // ErrorTypeRequired is used to report required values that are not
+ // provided (e.g. empty strings, null values, or empty arrays). See
+ // Required().
+ ErrorTypeRequired ErrorType = "FieldValueRequired"
+ // ErrorTypeDuplicate is used to report collisions of values that must be
+ // unique (e.g. unique IDs). See Duplicate().
+ ErrorTypeDuplicate ErrorType = "FieldValueDuplicate"
+ // ErrorTypeInvalid is used to report malformed values (e.g. failed regex
+ // match, too long, out of bounds). See Invalid().
+ ErrorTypeInvalid ErrorType = "FieldValueInvalid"
+ // ErrorTypeNotSupported is used to report unknown values for enumerated
+ // fields (e.g. a list of valid values). See NotSupported().
+ ErrorTypeNotSupported ErrorType = "FieldValueNotSupported"
+ // ErrorTypeForbidden is used to report valid (as per formatting rules)
+ // values which would be accepted under some conditions, but which are not
+ // permitted by the current conditions (such as security policy). See
+ // Forbidden().
+ ErrorTypeForbidden ErrorType = "FieldValueForbidden"
+ // ErrorTypeTooLong is used to report that the given value is too long.
+ // This is similar to ErrorTypeInvalid, but the error will not include the
+ // too-long value. See TooLong().
+ ErrorTypeTooLong ErrorType = "FieldValueTooLong"
+ // ErrorTypeInternal is used to report other errors that are not related
+ // to user input. See InternalError().
+ ErrorTypeInternal ErrorType = "InternalError"
+)
+
+// String converts a ErrorType into its corresponding canonical error message.
+func (t ErrorType) String() string {
+ switch t {
+ case ErrorTypeNotFound:
+ return "Not found"
+ case ErrorTypeRequired:
+ return "Required value"
+ case ErrorTypeDuplicate:
+ return "Duplicate value"
+ case ErrorTypeInvalid:
+ return "Invalid value"
+ case ErrorTypeNotSupported:
+ return "Unsupported value"
+ case ErrorTypeForbidden:
+ return "Forbidden"
+ case ErrorTypeTooLong:
+ return "Too long"
+ case ErrorTypeInternal:
+ return "Internal error"
+ default:
+ panic(fmt.Sprintf("unrecognized validation error: %q", string(t)))
+ }
+}
+
+// NotFound returns a *Error indicating "value not found". This is
+// used to report failure to find a requested value (e.g. looking up an ID).
+func NotFound(field *Path, value interface{}) *Error {
+ return &Error{ErrorTypeNotFound, field.String(), value, ""}
+}
+
+// Required returns a *Error indicating "value required". This is used
+// to report required values that are not provided (e.g. empty strings, null
+// values, or empty arrays).
+func Required(field *Path, detail string) *Error {
+ return &Error{ErrorTypeRequired, field.String(), "", detail}
+}
+
+// Duplicate returns a *Error indicating "duplicate value". This is
+// used to report collisions of values that must be unique (e.g. names or IDs).
+func Duplicate(field *Path, value interface{}) *Error {
+ return &Error{ErrorTypeDuplicate, field.String(), value, ""}
+}
+
+// Invalid returns a *Error indicating "invalid value". This is used
+// to report malformed values (e.g. failed regex match, too long, out of bounds).
+func Invalid(field *Path, value interface{}, detail string) *Error {
+ return &Error{ErrorTypeInvalid, field.String(), value, detail}
+}
+
+// NotSupported returns a *Error indicating "unsupported value".
+// This is used to report unknown values for enumerated fields (e.g. a list of
+// valid values).
+func NotSupported(field *Path, value interface{}, validValues []string) *Error {
+ detail := ""
+ if validValues != nil && len(validValues) > 0 {
+ detail = "supported values: " + strings.Join(validValues, ", ")
+ }
+ return &Error{ErrorTypeNotSupported, field.String(), value, detail}
+}
+
+// Forbidden returns a *Error indicating "forbidden". This is used to
+// report valid (as per formatting rules) values which would be accepted under
+// some conditions, but which are not permitted by current conditions (e.g.
+// security policy).
+func Forbidden(field *Path, detail string) *Error {
+ return &Error{ErrorTypeForbidden, field.String(), "", detail}
+}
+
+// TooLong returns a *Error indicating "too long". This is used to
+// report that the given value is too long. This is similar to
+// Invalid, but the returned error will not include the too-long
+// value.
+func TooLong(field *Path, value interface{}, maxLength int) *Error {
+ return &Error{ErrorTypeTooLong, field.String(), value, fmt.Sprintf("must have at most %d characters", maxLength)}
+}
+
+// InternalError returns a *Error indicating "internal error". This is used
+// to signal that an error was found that was not directly related to user
+// input. The err argument must be non-nil.
+func InternalError(field *Path, err error) *Error {
+ return &Error{ErrorTypeInternal, field.String(), nil, err.Error()}
+}
+
+// ErrorList holds a set of Errors. It is plausible that we might one day have
+// non-field errors in this same umbrella package, but for now we don't, so
+// we can keep it simple and leave ErrorList here.
+type ErrorList []*Error
+
+// NewErrorTypeMatcher returns an errors.Matcher that returns true
+// if the provided error is a Error and has the provided ErrorType.
+func NewErrorTypeMatcher(t ErrorType) utilerrors.Matcher {
+ return func(err error) bool {
+ if e, ok := err.(*Error); ok {
+ return e.Type == t
+ }
+ return false
+ }
+}
+
+// ToAggregate converts the ErrorList into an errors.Aggregate.
+func (list ErrorList) ToAggregate() utilerrors.Aggregate {
+ errs := make([]error, 0, len(list))
+ errorMsgs := sets.NewString()
+ for _, err := range list {
+ msg := fmt.Sprintf("%v", err)
+ if errorMsgs.Has(msg) {
+ continue
+ }
+ errorMsgs.Insert(msg)
+ errs = append(errs, err)
+ }
+ return utilerrors.NewAggregate(errs)
+}
+
+func fromAggregate(agg utilerrors.Aggregate) ErrorList {
+ errs := agg.Errors()
+ list := make(ErrorList, len(errs))
+ for i := range errs {
+ list[i] = errs[i].(*Error)
+ }
+ return list
+}
+
+// Filter removes items from the ErrorList that match the provided fns.
+func (list ErrorList) Filter(fns ...utilerrors.Matcher) ErrorList {
+ err := utilerrors.FilterOut(list.ToAggregate(), fns...)
+ if err == nil {
+ return nil
+ }
+ // FilterOut takes an Aggregate and returns an Aggregate
+ return fromAggregate(err.(utilerrors.Aggregate))
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/validation/field/path.go b/vendor/k8s.io/apimachinery/pkg/util/validation/field/path.go
new file mode 100644
index 000000000..2efc8eec7
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/validation/field/path.go
@@ -0,0 +1,91 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package field
+
+import (
+ "bytes"
+ "fmt"
+ "strconv"
+)
+
+// Path represents the path from some root to a particular field.
+type Path struct {
+ name string // the name of this field or "" if this is an index
+ index string // if name == "", this is a subscript (index or map key) of the previous element
+ parent *Path // nil if this is the root element
+}
+
+// NewPath creates a root Path object.
+func NewPath(name string, moreNames ...string) *Path {
+ r := &Path{name: name, parent: nil}
+ for _, anotherName := range moreNames {
+ r = &Path{name: anotherName, parent: r}
+ }
+ return r
+}
+
+// Root returns the root element of this Path.
+func (p *Path) Root() *Path {
+ for ; p.parent != nil; p = p.parent {
+ // Do nothing.
+ }
+ return p
+}
+
+// Child creates a new Path that is a child of the method receiver.
+func (p *Path) Child(name string, moreNames ...string) *Path {
+ r := NewPath(name, moreNames...)
+ r.Root().parent = p
+ return r
+}
+
+// Index indicates that the previous Path is to be subscripted by an int.
+// This sets the same underlying value as Key.
+func (p *Path) Index(index int) *Path {
+ return &Path{index: strconv.Itoa(index), parent: p}
+}
+
+// Key indicates that the previous Path is to be subscripted by a string.
+// This sets the same underlying value as Index.
+func (p *Path) Key(key string) *Path {
+ return &Path{index: key, parent: p}
+}
+
+// String produces a string representation of the Path.
+func (p *Path) String() string {
+ // make a slice to iterate
+ elems := []*Path{}
+ for ; p != nil; p = p.parent {
+ elems = append(elems, p)
+ }
+
+ // iterate, but it has to be backwards
+ buf := bytes.NewBuffer(nil)
+ for i := range elems {
+ p := elems[len(elems)-1-i]
+ if p.parent != nil && len(p.name) > 0 {
+ // This is either the root or it is a subscript.
+ buf.WriteString(".")
+ }
+ if len(p.name) > 0 {
+ buf.WriteString(p.name)
+ } else {
+ fmt.Fprintf(buf, "[%s]", p.index)
+ }
+ }
+ return buf.String()
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go b/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go
new file mode 100644
index 000000000..b1fcc5708
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go
@@ -0,0 +1,343 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package validation
+
+import (
+ "fmt"
+ "math"
+ "net"
+ "regexp"
+ "strings"
+)
+
+const qnameCharFmt string = "[A-Za-z0-9]"
+const qnameExtCharFmt string = "[-A-Za-z0-9_.]"
+const qualifiedNameFmt string = "(" + qnameCharFmt + qnameExtCharFmt + "*)?" + qnameCharFmt
+const qualifiedNameErrMsg string = "must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character"
+const qualifiedNameMaxLength int = 63
+
+var qualifiedNameRegexp = regexp.MustCompile("^" + qualifiedNameFmt + "$")
+
+// IsQualifiedName tests whether the value passed is what Kubernetes calls a
+// "qualified name". This is a format used in various places throughout the
+// system. If the value is not valid, a list of error strings is returned.
+// Otherwise an empty list (or nil) is returned.
+func IsQualifiedName(value string) []string {
+ var errs []string
+ parts := strings.Split(value, "/")
+ var name string
+ switch len(parts) {
+ case 1:
+ name = parts[0]
+ case 2:
+ var prefix string
+ prefix, name = parts[0], parts[1]
+ if len(prefix) == 0 {
+ errs = append(errs, "prefix part "+EmptyError())
+ } else if msgs := IsDNS1123Subdomain(prefix); len(msgs) != 0 {
+ errs = append(errs, prefixEach(msgs, "prefix part ")...)
+ }
+ default:
+ return append(errs, "a qualified name "+RegexError(qualifiedNameErrMsg, qualifiedNameFmt, "MyName", "my.name", "123-abc")+
+ " with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')")
+ }
+
+ if len(name) == 0 {
+ errs = append(errs, "name part "+EmptyError())
+ } else if len(name) > qualifiedNameMaxLength {
+ errs = append(errs, "name part "+MaxLenError(qualifiedNameMaxLength))
+ }
+ if !qualifiedNameRegexp.MatchString(name) {
+ errs = append(errs, "name part "+RegexError(qualifiedNameErrMsg, qualifiedNameFmt, "MyName", "my.name", "123-abc"))
+ }
+ return errs
+}
+
+const labelValueFmt string = "(" + qualifiedNameFmt + ")?"
+const labelValueErrMsg string = "a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character"
+const LabelValueMaxLength int = 63
+
+var labelValueRegexp = regexp.MustCompile("^" + labelValueFmt + "$")
+
+// IsValidLabelValue tests whether the value passed is a valid label value. If
+// the value is not valid, a list of error strings is returned. Otherwise an
+// empty list (or nil) is returned.
+func IsValidLabelValue(value string) []string {
+ var errs []string
+ if len(value) > LabelValueMaxLength {
+ errs = append(errs, MaxLenError(LabelValueMaxLength))
+ }
+ if !labelValueRegexp.MatchString(value) {
+ errs = append(errs, RegexError(labelValueErrMsg, labelValueFmt, "MyValue", "my_value", "12345"))
+ }
+ return errs
+}
+
+const dns1123LabelFmt string = "[a-z0-9]([-a-z0-9]*[a-z0-9])?"
+const dns1123LabelErrMsg string = "a DNS-1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character"
+const DNS1123LabelMaxLength int = 63
+
+var dns1123LabelRegexp = regexp.MustCompile("^" + dns1123LabelFmt + "$")
+
+// IsDNS1123Label tests for a string that conforms to the definition of a label in
+// DNS (RFC 1123).
+func IsDNS1123Label(value string) []string {
+ var errs []string
+ if len(value) > DNS1123LabelMaxLength {
+ errs = append(errs, MaxLenError(DNS1123LabelMaxLength))
+ }
+ if !dns1123LabelRegexp.MatchString(value) {
+ errs = append(errs, RegexError(dns1123LabelErrMsg, dns1123LabelFmt, "my-name", "123-abc"))
+ }
+ return errs
+}
+
+const dns1123SubdomainFmt string = dns1123LabelFmt + "(\\." + dns1123LabelFmt + ")*"
+const dns1123SubdomainErrorMsg string = "a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character"
+const DNS1123SubdomainMaxLength int = 253
+
+var dns1123SubdomainRegexp = regexp.MustCompile("^" + dns1123SubdomainFmt + "$")
+
+// IsDNS1123Subdomain tests for a string that conforms to the definition of a
+// subdomain in DNS (RFC 1123).
+func IsDNS1123Subdomain(value string) []string {
+ var errs []string
+ if len(value) > DNS1123SubdomainMaxLength {
+ errs = append(errs, MaxLenError(DNS1123SubdomainMaxLength))
+ }
+ if !dns1123SubdomainRegexp.MatchString(value) {
+ errs = append(errs, RegexError(dns1123SubdomainErrorMsg, dns1123SubdomainFmt, "example.com"))
+ }
+ return errs
+}
+
+const dns1035LabelFmt string = "[a-z]([-a-z0-9]*[a-z0-9])?"
+const dns1035LabelErrMsg string = "a DNS-1035 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character"
+const DNS1035LabelMaxLength int = 63
+
+var dns1035LabelRegexp = regexp.MustCompile("^" + dns1035LabelFmt + "$")
+
+// IsDNS1035Label tests for a string that conforms to the definition of a label in
+// DNS (RFC 1035).
+func IsDNS1035Label(value string) []string {
+ var errs []string
+ if len(value) > DNS1035LabelMaxLength {
+ errs = append(errs, MaxLenError(DNS1035LabelMaxLength))
+ }
+ if !dns1035LabelRegexp.MatchString(value) {
+ errs = append(errs, RegexError(dns1035LabelErrMsg, dns1035LabelFmt, "my-name", "abc-123"))
+ }
+ return errs
+}
+
+// wildcard definition - RFC 1034 section 4.3.3.
+// examples:
+// - valid: *.bar.com, *.foo.bar.com
+// - invalid: *.*.bar.com, *.foo.*.com, *bar.com, f*.bar.com, *
+const wildcardDNS1123SubdomainFmt = "\\*\\." + dns1123SubdomainFmt
+const wildcardDNS1123SubdomainErrMsg = "a wildcard DNS-1123 subdomain must start with '*.', followed by a valid DNS subdomain, which must consist of lower case alphanumeric characters, '-' or '.' and end with an alphanumeric character"
+
+// IsWildcardDNS1123Subdomain tests for a string that conforms to the definition of a
+// wildcard subdomain in DNS (RFC 1034 section 4.3.3).
+func IsWildcardDNS1123Subdomain(value string) []string {
+ wildcardDNS1123SubdomainRegexp := regexp.MustCompile("^" + wildcardDNS1123SubdomainFmt + "$")
+
+ var errs []string
+ if len(value) > DNS1123SubdomainMaxLength {
+ errs = append(errs, MaxLenError(DNS1123SubdomainMaxLength))
+ }
+ if !wildcardDNS1123SubdomainRegexp.MatchString(value) {
+ errs = append(errs, RegexError(wildcardDNS1123SubdomainErrMsg, wildcardDNS1123SubdomainFmt, "*.example.com"))
+ }
+ return errs
+}
+
+const cIdentifierFmt string = "[A-Za-z_][A-Za-z0-9_]*"
+const identifierErrMsg string = "a valid C identifier must start with alphabetic character or '_', followed by a string of alphanumeric characters or '_'"
+
+var cIdentifierRegexp = regexp.MustCompile("^" + cIdentifierFmt + "$")
+
+// IsCIdentifier tests for a string that conforms the definition of an identifier
+// in C. This checks the format, but not the length.
+func IsCIdentifier(value string) []string {
+ if !cIdentifierRegexp.MatchString(value) {
+ return []string{RegexError(identifierErrMsg, cIdentifierFmt, "my_name", "MY_NAME", "MyName")}
+ }
+ return nil
+}
+
+// IsValidPortNum tests that the argument is a valid, non-zero port number.
+func IsValidPortNum(port int) []string {
+ if 1 <= port && port <= 65535 {
+ return nil
+ }
+ return []string{InclusiveRangeError(1, 65535)}
+}
+
+// Now in libcontainer UID/GID limits is 0 ~ 1<<31 - 1
+// TODO: once we have a type for UID/GID we should make these that type.
+const (
+ minUserID = 0
+ maxUserID = math.MaxInt32
+ minGroupID = 0
+ maxGroupID = math.MaxInt32
+)
+
+// IsValidGroupID tests that the argument is a valid Unix GID.
+func IsValidGroupID(gid int64) []string {
+ if minGroupID <= gid && gid <= maxGroupID {
+ return nil
+ }
+ return []string{InclusiveRangeError(minGroupID, maxGroupID)}
+}
+
+// IsValidUserID tests that the argument is a valid Unix UID.
+func IsValidUserID(uid int64) []string {
+ if minUserID <= uid && uid <= maxUserID {
+ return nil
+ }
+ return []string{InclusiveRangeError(minUserID, maxUserID)}
+}
+
+var portNameCharsetRegex = regexp.MustCompile("^[-a-z0-9]+$")
+var portNameOneLetterRegexp = regexp.MustCompile("[a-z]")
+
+// IsValidPortName check that the argument is valid syntax. It must be
+// non-empty and no more than 15 characters long. It may contain only [-a-z0-9]
+// and must contain at least one letter [a-z]. It must not start or end with a
+// hyphen, nor contain adjacent hyphens.
+//
+// Note: We only allow lower-case characters, even though RFC 6335 is case
+// insensitive.
+func IsValidPortName(port string) []string {
+ var errs []string
+ if len(port) > 15 {
+ errs = append(errs, MaxLenError(15))
+ }
+ if !portNameCharsetRegex.MatchString(port) {
+ errs = append(errs, "must contain only alpha-numeric characters (a-z, 0-9), and hyphens (-)")
+ }
+ if !portNameOneLetterRegexp.MatchString(port) {
+ errs = append(errs, "must contain at least one letter or number (a-z, 0-9)")
+ }
+ if strings.Contains(port, "--") {
+ errs = append(errs, "must not contain consecutive hyphens")
+ }
+ if len(port) > 0 && (port[0] == '-' || port[len(port)-1] == '-') {
+ errs = append(errs, "must not begin or end with a hyphen")
+ }
+ return errs
+}
+
+// IsValidIP tests that the argument is a valid IP address.
+func IsValidIP(value string) []string {
+ if net.ParseIP(value) == nil {
+ return []string{"must be a valid IP address, (e.g. 10.9.8.7)"}
+ }
+ return nil
+}
+
+const percentFmt string = "[0-9]+%"
+const percentErrMsg string = "a valid percent string must be a numeric string followed by an ending '%'"
+
+var percentRegexp = regexp.MustCompile("^" + percentFmt + "$")
+
+func IsValidPercent(percent string) []string {
+ if !percentRegexp.MatchString(percent) {
+ return []string{RegexError(percentErrMsg, percentFmt, "1%", "93%")}
+ }
+ return nil
+}
+
+const httpHeaderNameFmt string = "[-A-Za-z0-9]+"
+const httpHeaderNameErrMsg string = "a valid HTTP header must consist of alphanumeric characters or '-'"
+
+var httpHeaderNameRegexp = regexp.MustCompile("^" + httpHeaderNameFmt + "$")
+
+// IsHTTPHeaderName checks that a string conforms to the Go HTTP library's
+// definition of a valid header field name (a stricter subset than RFC7230).
+func IsHTTPHeaderName(value string) []string {
+ if !httpHeaderNameRegexp.MatchString(value) {
+ return []string{RegexError(httpHeaderNameErrMsg, httpHeaderNameFmt, "X-Header-Name")}
+ }
+ return nil
+}
+
+const configMapKeyFmt = `[-._a-zA-Z0-9]+`
+const configMapKeyErrMsg string = "a valid config key must consist of alphanumeric characters, '-', '_' or '.'"
+
+var configMapKeyRegexp = regexp.MustCompile("^" + configMapKeyFmt + "$")
+
+// IsConfigMapKey tests for a string that is a valid key for a ConfigMap or Secret
+func IsConfigMapKey(value string) []string {
+ var errs []string
+ if len(value) > DNS1123SubdomainMaxLength {
+ errs = append(errs, MaxLenError(DNS1123SubdomainMaxLength))
+ }
+ if !configMapKeyRegexp.MatchString(value) {
+ errs = append(errs, RegexError(configMapKeyErrMsg, configMapKeyFmt, "key.name", "KEY_NAME", "key-name"))
+ }
+ if value == "." {
+ errs = append(errs, `must not be '.'`)
+ } else if value == ".." {
+ errs = append(errs, `must not be '..'`)
+ } else if strings.HasPrefix(value, "..") {
+ errs = append(errs, `must not start with '..'`)
+ }
+ return errs
+}
+
+// MaxLenError returns a string explanation of a "string too long" validation
+// failure.
+func MaxLenError(length int) string {
+ return fmt.Sprintf("must be no more than %d characters", length)
+}
+
+// RegexError returns a string explanation of a regex validation failure.
+func RegexError(msg string, fmt string, examples ...string) string {
+ if len(examples) == 0 {
+ return msg + " (regex used for validation is '" + fmt + "')"
+ }
+ msg += " (e.g. "
+ for i := range examples {
+ if i > 0 {
+ msg += " or "
+ }
+ msg += "'" + examples[i] + "', "
+ }
+ msg += "regex used for validation is '" + fmt + "')"
+ return msg
+}
+
+// EmptyError returns a string explanation of a "must not be empty" validation
+// failure.
+func EmptyError() string {
+ return "must be non-empty"
+}
+
+func prefixEach(msgs []string, prefix string) []string {
+ for i := range msgs {
+ msgs[i] = prefix + msgs[i]
+ }
+ return msgs
+}
+
+// InclusiveRangeError returns a string explanation of a numeric "must be
+// between" validation failure.
+func InclusiveRangeError(lo, hi int) string {
+ return fmt.Sprintf(`must be between %d and %d, inclusive`, lo, hi)
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/wait/doc.go b/vendor/k8s.io/apimachinery/pkg/util/wait/doc.go
new file mode 100644
index 000000000..3f0c968ec
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/wait/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package wait provides tools for polling or listening for changes
+// to a condition.
+package wait // import "k8s.io/apimachinery/pkg/util/wait"
diff --git a/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go b/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go
new file mode 100644
index 000000000..badaa2159
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go
@@ -0,0 +1,349 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package wait
+
+import (
+ "errors"
+ "math/rand"
+ "time"
+
+ "k8s.io/apimachinery/pkg/util/runtime"
+)
+
+// For any test of the style:
+// ...
+// <- time.After(timeout):
+// t.Errorf("Timed out")
+// The value for timeout should effectively be "forever." Obviously we don't want our tests to truly lock up forever, but 30s
+// is long enough that it is effectively forever for the things that can slow down a run on a heavily contended machine
+// (GC, seeks, etc), but not so long as to make a developer ctrl-c a test run if they do happen to break that test.
+var ForeverTestTimeout = time.Second * 30
+
+// NeverStop may be passed to Until to make it never stop.
+var NeverStop <-chan struct{} = make(chan struct{})
+
+// Forever calls f every period for ever.
+//
+// Forever is syntactic sugar on top of Until.
+func Forever(f func(), period time.Duration) {
+ Until(f, period, NeverStop)
+}
+
+// Until loops until stop channel is closed, running f every period.
+//
+// Until is syntactic sugar on top of JitterUntil with zero jitter factor and
+// with sliding = true (which means the timer for period starts after the f
+// completes).
+func Until(f func(), period time.Duration, stopCh <-chan struct{}) {
+ JitterUntil(f, period, 0.0, true, stopCh)
+}
+
+// NonSlidingUntil loops until stop channel is closed, running f every
+// period.
+//
+// NonSlidingUntil is syntactic sugar on top of JitterUntil with zero jitter
+// factor, with sliding = false (meaning the timer for period starts at the same
+// time as the function starts).
+func NonSlidingUntil(f func(), period time.Duration, stopCh <-chan struct{}) {
+ JitterUntil(f, period, 0.0, false, stopCh)
+}
+
+// JitterUntil loops until stop channel is closed, running f every period.
+//
+// If jitterFactor is positive, the period is jittered before every run of f.
+// If jitterFactor is not positive, the period is unchanged and not jittered.
+//
+// If sliding is true, the period is computed after f runs. If it is false then
+// period includes the runtime for f.
+//
+// Close stopCh to stop. f may not be invoked if stop channel is already
+// closed. Pass NeverStop to if you don't want it stop.
+func JitterUntil(f func(), period time.Duration, jitterFactor float64, sliding bool, stopCh <-chan struct{}) {
+ var t *time.Timer
+ var sawTimeout bool
+
+ for {
+ select {
+ case <-stopCh:
+ return
+ default:
+ }
+
+ jitteredPeriod := period
+ if jitterFactor > 0.0 {
+ jitteredPeriod = Jitter(period, jitterFactor)
+ }
+
+ if !sliding {
+ t = resetOrReuseTimer(t, jitteredPeriod, sawTimeout)
+ }
+
+ func() {
+ defer runtime.HandleCrash()
+ f()
+ }()
+
+ if sliding {
+ t = resetOrReuseTimer(t, jitteredPeriod, sawTimeout)
+ }
+
+ // NOTE: b/c there is no priority selection in golang
+ // it is possible for this to race, meaning we could
+ // trigger t.C and stopCh, and t.C select falls through.
+ // In order to mitigate we re-check stopCh at the beginning
+ // of every loop to prevent extra executions of f().
+ select {
+ case <-stopCh:
+ return
+ case <-t.C:
+ sawTimeout = true
+ }
+ }
+}
+
+// Jitter returns a time.Duration between duration and duration + maxFactor *
+// duration.
+//
+// This allows clients to avoid converging on periodic behavior. If maxFactor
+// is 0.0, a suggested default value will be chosen.
+func Jitter(duration time.Duration, maxFactor float64) time.Duration {
+ if maxFactor <= 0.0 {
+ maxFactor = 1.0
+ }
+ wait := duration + time.Duration(rand.Float64()*maxFactor*float64(duration))
+ return wait
+}
+
+// ErrWaitTimeout is returned when the condition exited without success.
+var ErrWaitTimeout = errors.New("timed out waiting for the condition")
+
+// ConditionFunc returns true if the condition is satisfied, or an error
+// if the loop should be aborted.
+type ConditionFunc func() (done bool, err error)
+
+// Backoff holds parameters applied to a Backoff function.
+type Backoff struct {
+ Duration time.Duration // the base duration
+ Factor float64 // Duration is multiplied by factor each iteration
+ Jitter float64 // The amount of jitter applied each iteration
+ Steps int // Exit with error after this many steps
+}
+
+// ExponentialBackoff repeats a condition check with exponential backoff.
+//
+// It checks the condition up to Steps times, increasing the wait by multiplying
+// the previous duration by Factor.
+//
+// If Jitter is greater than zero, a random amount of each duration is added
+// (between duration and duration*(1+jitter)).
+//
+// If the condition never returns true, ErrWaitTimeout is returned. All other
+// errors terminate immediately.
+func ExponentialBackoff(backoff Backoff, condition ConditionFunc) error {
+ duration := backoff.Duration
+ for i := 0; i < backoff.Steps; i++ {
+ if i != 0 {
+ adjusted := duration
+ if backoff.Jitter > 0.0 {
+ adjusted = Jitter(duration, backoff.Jitter)
+ }
+ time.Sleep(adjusted)
+ duration = time.Duration(float64(duration) * backoff.Factor)
+ }
+ if ok, err := condition(); err != nil || ok {
+ return err
+ }
+ }
+ return ErrWaitTimeout
+}
+
+// Poll tries a condition func until it returns true, an error, or the timeout
+// is reached.
+//
+// Poll always waits the interval before the run of 'condition'.
+// 'condition' will always be invoked at least once.
+//
+// Some intervals may be missed if the condition takes too long or the time
+// window is too short.
+//
+// If you want to Poll something forever, see PollInfinite.
+func Poll(interval, timeout time.Duration, condition ConditionFunc) error {
+ return pollInternal(poller(interval, timeout), condition)
+}
+
+func pollInternal(wait WaitFunc, condition ConditionFunc) error {
+ done := make(chan struct{})
+ defer close(done)
+ return WaitFor(wait, condition, done)
+}
+
+// PollImmediate tries a condition func until it returns true, an error, or the timeout
+// is reached.
+//
+// Poll always checks 'condition' before waiting for the interval. 'condition'
+// will always be invoked at least once.
+//
+// Some intervals may be missed if the condition takes too long or the time
+// window is too short.
+//
+// If you want to Poll something forever, see PollInfinite.
+func PollImmediate(interval, timeout time.Duration, condition ConditionFunc) error {
+ return pollImmediateInternal(poller(interval, timeout), condition)
+}
+
+func pollImmediateInternal(wait WaitFunc, condition ConditionFunc) error {
+ done, err := condition()
+ if err != nil {
+ return err
+ }
+ if done {
+ return nil
+ }
+ return pollInternal(wait, condition)
+}
+
+// PollInfinite tries a condition func until it returns true or an error
+//
+// PollInfinite always waits the interval before the run of 'condition'.
+//
+// Some intervals may be missed if the condition takes too long or the time
+// window is too short.
+func PollInfinite(interval time.Duration, condition ConditionFunc) error {
+ done := make(chan struct{})
+ defer close(done)
+ return PollUntil(interval, condition, done)
+}
+
+// PollImmediateInfinite tries a condition func until it returns true or an error
+//
+// PollImmediateInfinite runs the 'condition' before waiting for the interval.
+//
+// Some intervals may be missed if the condition takes too long or the time
+// window is too short.
+func PollImmediateInfinite(interval time.Duration, condition ConditionFunc) error {
+ done, err := condition()
+ if err != nil {
+ return err
+ }
+ if done {
+ return nil
+ }
+ return PollInfinite(interval, condition)
+}
+
+// PollUntil tries a condition func until it returns true, an error or stopCh is
+// closed.
+//
+// PolUntil always waits interval before the first run of 'condition'.
+// 'condition' will always be invoked at least once.
+func PollUntil(interval time.Duration, condition ConditionFunc, stopCh <-chan struct{}) error {
+ return WaitFor(poller(interval, 0), condition, stopCh)
+}
+
+// WaitFunc creates a channel that receives an item every time a test
+// should be executed and is closed when the last test should be invoked.
+type WaitFunc func(done <-chan struct{}) <-chan struct{}
+
+// WaitFor continually checks 'fn' as driven by 'wait'.
+//
+// WaitFor gets a channel from 'wait()'', and then invokes 'fn' once for every value
+// placed on the channel and once more when the channel is closed.
+//
+// If 'fn' returns an error the loop ends and that error is returned, and if
+// 'fn' returns true the loop ends and nil is returned.
+//
+// ErrWaitTimeout will be returned if the channel is closed without fn ever
+// returning true.
+func WaitFor(wait WaitFunc, fn ConditionFunc, done <-chan struct{}) error {
+ c := wait(done)
+ for {
+ _, open := <-c
+ ok, err := fn()
+ if err != nil {
+ return err
+ }
+ if ok {
+ return nil
+ }
+ if !open {
+ break
+ }
+ }
+ return ErrWaitTimeout
+}
+
+// poller returns a WaitFunc that will send to the channel every interval until
+// timeout has elapsed and then closes the channel.
+//
+// Over very short intervals you may receive no ticks before the channel is
+// closed. A timeout of 0 is interpreted as an infinity.
+//
+// Output ticks are not buffered. If the channel is not ready to receive an
+// item, the tick is skipped.
+func poller(interval, timeout time.Duration) WaitFunc {
+ return WaitFunc(func(done <-chan struct{}) <-chan struct{} {
+ ch := make(chan struct{})
+
+ go func() {
+ defer close(ch)
+
+ tick := time.NewTicker(interval)
+ defer tick.Stop()
+
+ var after <-chan time.Time
+ if timeout != 0 {
+ // time.After is more convenient, but it
+ // potentially leaves timers around much longer
+ // than necessary if we exit early.
+ timer := time.NewTimer(timeout)
+ after = timer.C
+ defer timer.Stop()
+ }
+
+ for {
+ select {
+ case <-tick.C:
+ // If the consumer isn't ready for this signal drop it and
+ // check the other channels.
+ select {
+ case ch <- struct{}{}:
+ default:
+ }
+ case <-after:
+ return
+ case <-done:
+ return
+ }
+ }
+ }()
+
+ return ch
+ })
+}
+
+// resetOrReuseTimer avoids allocating a new timer if one is already in use.
+// Not safe for multiple threads.
+func resetOrReuseTimer(t *time.Timer, d time.Duration, sawTimeout bool) *time.Timer {
+ if t == nil {
+ return time.NewTimer(d)
+ }
+ if !t.Stop() && !sawTimeout {
+ <-t.C
+ }
+ t.Reset(d)
+ return t
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/yaml/decoder.go b/vendor/k8s.io/apimachinery/pkg/util/yaml/decoder.go
new file mode 100644
index 000000000..6ebfaea70
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/yaml/decoder.go
@@ -0,0 +1,346 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package yaml
+
+import (
+ "bufio"
+ "bytes"
+ "encoding/json"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "strings"
+ "unicode"
+
+ "github.com/ghodss/yaml"
+ "github.com/golang/glog"
+)
+
+// ToJSON converts a single YAML document into a JSON document
+// or returns an error. If the document appears to be JSON the
+// YAML decoding path is not used (so that error messages are
+// JSON specific).
+func ToJSON(data []byte) ([]byte, error) {
+ if hasJSONPrefix(data) {
+ return data, nil
+ }
+ return yaml.YAMLToJSON(data)
+}
+
+// YAMLToJSONDecoder decodes YAML documents from an io.Reader by
+// separating individual documents. It first converts the YAML
+// body to JSON, then unmarshals the JSON.
+type YAMLToJSONDecoder struct {
+ reader Reader
+}
+
+// NewYAMLToJSONDecoder decodes YAML documents from the provided
+// stream in chunks by converting each document (as defined by
+// the YAML spec) into its own chunk, converting it to JSON via
+// yaml.YAMLToJSON, and then passing it to json.Decoder.
+func NewYAMLToJSONDecoder(r io.Reader) *YAMLToJSONDecoder {
+ reader := bufio.NewReader(r)
+ return &YAMLToJSONDecoder{
+ reader: NewYAMLReader(reader),
+ }
+}
+
+// Decode reads a YAML document as JSON from the stream or returns
+// an error. The decoding rules match json.Unmarshal, not
+// yaml.Unmarshal.
+func (d *YAMLToJSONDecoder) Decode(into interface{}) error {
+ bytes, err := d.reader.Read()
+ if err != nil && err != io.EOF {
+ return err
+ }
+
+ if len(bytes) != 0 {
+ err := yaml.Unmarshal(bytes, into)
+ if err != nil {
+ return YAMLSyntaxError{err}
+ }
+ }
+ return err
+}
+
+// YAMLDecoder reads chunks of objects and returns ErrShortBuffer if
+// the data is not sufficient.
+type YAMLDecoder struct {
+ r io.ReadCloser
+ scanner *bufio.Scanner
+ remaining []byte
+}
+
+// NewDocumentDecoder decodes YAML documents from the provided
+// stream in chunks by converting each document (as defined by
+// the YAML spec) into its own chunk. io.ErrShortBuffer will be
+// returned if the entire buffer could not be read to assist
+// the caller in framing the chunk.
+func NewDocumentDecoder(r io.ReadCloser) io.ReadCloser {
+ scanner := bufio.NewScanner(r)
+ scanner.Split(splitYAMLDocument)
+ return &YAMLDecoder{
+ r: r,
+ scanner: scanner,
+ }
+}
+
+// Read reads the previous slice into the buffer, or attempts to read
+// the next chunk.
+// TODO: switch to readline approach.
+func (d *YAMLDecoder) Read(data []byte) (n int, err error) {
+ left := len(d.remaining)
+ if left == 0 {
+ // return the next chunk from the stream
+ if !d.scanner.Scan() {
+ err := d.scanner.Err()
+ if err == nil {
+ err = io.EOF
+ }
+ return 0, err
+ }
+ out := d.scanner.Bytes()
+ d.remaining = out
+ left = len(out)
+ }
+
+ // fits within data
+ if left <= len(data) {
+ copy(data, d.remaining)
+ d.remaining = nil
+ return len(d.remaining), nil
+ }
+
+ // caller will need to reread
+ copy(data, d.remaining[:left])
+ d.remaining = d.remaining[left:]
+ return len(data), io.ErrShortBuffer
+}
+
+func (d *YAMLDecoder) Close() error {
+ return d.r.Close()
+}
+
+const yamlSeparator = "\n---"
+const separator = "---"
+
+// splitYAMLDocument is a bufio.SplitFunc for splitting YAML streams into individual documents.
+func splitYAMLDocument(data []byte, atEOF bool) (advance int, token []byte, err error) {
+ if atEOF && len(data) == 0 {
+ return 0, nil, nil
+ }
+ sep := len([]byte(yamlSeparator))
+ if i := bytes.Index(data, []byte(yamlSeparator)); i >= 0 {
+ // We have a potential document terminator
+ i += sep
+ after := data[i:]
+ if len(after) == 0 {
+ // we can't read any more characters
+ if atEOF {
+ return len(data), data[:len(data)-sep], nil
+ }
+ return 0, nil, nil
+ }
+ if j := bytes.IndexByte(after, '\n'); j >= 0 {
+ return i + j + 1, data[0 : i-sep], nil
+ }
+ return 0, nil, nil
+ }
+ // If we're at EOF, we have a final, non-terminated line. Return it.
+ if atEOF {
+ return len(data), data, nil
+ }
+ // Request more data.
+ return 0, nil, nil
+}
+
+// decoder is a convenience interface for Decode.
+type decoder interface {
+ Decode(into interface{}) error
+}
+
+// YAMLOrJSONDecoder attempts to decode a stream of JSON documents or
+// YAML documents by sniffing for a leading { character.
+type YAMLOrJSONDecoder struct {
+ r io.Reader
+ bufferSize int
+
+ decoder decoder
+ rawData []byte
+}
+
+type JSONSyntaxError struct {
+ Line int
+ Err error
+}
+
+func (e JSONSyntaxError) Error() string {
+ return fmt.Sprintf("json: line %d: %s", e.Line, e.Err.Error())
+}
+
+type YAMLSyntaxError struct {
+ err error
+}
+
+func (e YAMLSyntaxError) Error() string {
+ return e.err.Error()
+}
+
+// NewYAMLOrJSONDecoder returns a decoder that will process YAML documents
+// or JSON documents from the given reader as a stream. bufferSize determines
+// how far into the stream the decoder will look to figure out whether this
+// is a JSON stream (has whitespace followed by an open brace).
+func NewYAMLOrJSONDecoder(r io.Reader, bufferSize int) *YAMLOrJSONDecoder {
+ return &YAMLOrJSONDecoder{
+ r: r,
+ bufferSize: bufferSize,
+ }
+}
+
+// Decode unmarshals the next object from the underlying stream into the
+// provide object, or returns an error.
+func (d *YAMLOrJSONDecoder) Decode(into interface{}) error {
+ if d.decoder == nil {
+ buffer, origData, isJSON := GuessJSONStream(d.r, d.bufferSize)
+ if isJSON {
+ glog.V(4).Infof("decoding stream as JSON")
+ d.decoder = json.NewDecoder(buffer)
+ d.rawData = origData
+ } else {
+ glog.V(4).Infof("decoding stream as YAML")
+ d.decoder = NewYAMLToJSONDecoder(buffer)
+ }
+ }
+ err := d.decoder.Decode(into)
+ if jsonDecoder, ok := d.decoder.(*json.Decoder); ok {
+ if syntax, ok := err.(*json.SyntaxError); ok {
+ data, readErr := ioutil.ReadAll(jsonDecoder.Buffered())
+ if readErr != nil {
+ glog.V(4).Infof("reading stream failed: %v", readErr)
+ }
+ js := string(data)
+
+ // if contents from io.Reader are not complete,
+ // use the original raw data to prevent panic
+ if int64(len(js)) <= syntax.Offset {
+ js = string(d.rawData)
+ }
+
+ start := strings.LastIndex(js[:syntax.Offset], "\n") + 1
+ line := strings.Count(js[:start], "\n")
+ return JSONSyntaxError{
+ Line: line,
+ Err: fmt.Errorf(syntax.Error()),
+ }
+ }
+ }
+ return err
+}
+
+type Reader interface {
+ Read() ([]byte, error)
+}
+
+type YAMLReader struct {
+ reader Reader
+}
+
+func NewYAMLReader(r *bufio.Reader) *YAMLReader {
+ return &YAMLReader{
+ reader: &LineReader{reader: r},
+ }
+}
+
+// Read returns a full YAML document.
+func (r *YAMLReader) Read() ([]byte, error) {
+ var buffer bytes.Buffer
+ for {
+ line, err := r.reader.Read()
+ if err != nil && err != io.EOF {
+ return nil, err
+ }
+
+ sep := len([]byte(separator))
+ if i := bytes.Index(line, []byte(separator)); i == 0 {
+ // We have a potential document terminator
+ i += sep
+ after := line[i:]
+ if len(strings.TrimRightFunc(string(after), unicode.IsSpace)) == 0 {
+ if buffer.Len() != 0 {
+ return buffer.Bytes(), nil
+ }
+ if err == io.EOF {
+ return nil, err
+ }
+ }
+ }
+ if err == io.EOF {
+ if buffer.Len() != 0 {
+ // If we're at EOF, we have a final, non-terminated line. Return it.
+ return buffer.Bytes(), nil
+ }
+ return nil, err
+ }
+ buffer.Write(line)
+ }
+}
+
+type LineReader struct {
+ reader *bufio.Reader
+}
+
+// Read returns a single line (with '\n' ended) from the underlying reader.
+// An error is returned iff there is an error with the underlying reader.
+func (r *LineReader) Read() ([]byte, error) {
+ var (
+ isPrefix bool = true
+ err error = nil
+ line []byte
+ buffer bytes.Buffer
+ )
+
+ for isPrefix && err == nil {
+ line, isPrefix, err = r.reader.ReadLine()
+ buffer.Write(line)
+ }
+ buffer.WriteByte('\n')
+ return buffer.Bytes(), err
+}
+
+// GuessJSONStream scans the provided reader up to size, looking
+// for an open brace indicating this is JSON. It will return the
+// bufio.Reader it creates for the consumer.
+func GuessJSONStream(r io.Reader, size int) (io.Reader, []byte, bool) {
+ buffer := bufio.NewReaderSize(r, size)
+ b, _ := buffer.Peek(size)
+ return buffer, b, hasJSONPrefix(b)
+}
+
+var jsonPrefix = []byte("{")
+
+// hasJSONPrefix returns true if the provided buffer appears to start with
+// a JSON open brace.
+func hasJSONPrefix(buf []byte) bool {
+ return hasPrefix(buf, jsonPrefix)
+}
+
+// Return true if the first non-whitespace bytes in buf is
+// prefix.
+func hasPrefix(buf []byte, prefix []byte) bool {
+ trim := bytes.TrimLeftFunc(buf, unicode.IsSpace)
+ return bytes.HasPrefix(trim, prefix)
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/version/doc.go b/vendor/k8s.io/apimachinery/pkg/version/doc.go
new file mode 100644
index 000000000..5e77af7ea
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/version/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package version supplies the type for version information collected at build time.
+// +k8s:openapi-gen=true
+package version // import "k8s.io/apimachinery/pkg/version"
diff --git a/vendor/k8s.io/apimachinery/pkg/version/types.go b/vendor/k8s.io/apimachinery/pkg/version/types.go
new file mode 100644
index 000000000..72727b503
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/version/types.go
@@ -0,0 +1,37 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package version
+
+// Info contains versioning information.
+// TODO: Add []string of api versions supported? It's still unclear
+// how we'll want to distribute that information.
+type Info struct {
+ Major string `json:"major"`
+ Minor string `json:"minor"`
+ GitVersion string `json:"gitVersion"`
+ GitCommit string `json:"gitCommit"`
+ GitTreeState string `json:"gitTreeState"`
+ BuildDate string `json:"buildDate"`
+ GoVersion string `json:"goVersion"`
+ Compiler string `json:"compiler"`
+ Platform string `json:"platform"`
+}
+
+// String returns info as a human-friendly version string.
+func (info Info) String() string {
+ return info.GitVersion
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/watch/doc.go b/vendor/k8s.io/apimachinery/pkg/watch/doc.go
new file mode 100644
index 000000000..7e6bf3fb9
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/watch/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package watch contains a generic watchable interface, and a fake for
+// testing code that uses the watch interface.
+package watch // import "k8s.io/apimachinery/pkg/watch"
diff --git a/vendor/k8s.io/apimachinery/pkg/watch/filter.go b/vendor/k8s.io/apimachinery/pkg/watch/filter.go
new file mode 100644
index 000000000..3ca27f22c
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/watch/filter.go
@@ -0,0 +1,109 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package watch
+
+import (
+ "sync"
+)
+
+// FilterFunc should take an event, possibly modify it in some way, and return
+// the modified event. If the event should be ignored, then return keep=false.
+type FilterFunc func(in Event) (out Event, keep bool)
+
+// Filter passes all events through f before allowing them to pass on.
+// Putting a filter on a watch, as an unavoidable side-effect due to the way
+// go channels work, effectively causes the watch's event channel to have its
+// queue length increased by one.
+//
+// WARNING: filter has a fatal flaw, in that it can't properly update the
+// Type field (Add/Modified/Deleted) to reflect items beginning to pass the
+// filter when they previously didn't.
+//
+func Filter(w Interface, f FilterFunc) Interface {
+ fw := &filteredWatch{
+ incoming: w,
+ result: make(chan Event),
+ f: f,
+ }
+ go fw.loop()
+ return fw
+}
+
+type filteredWatch struct {
+ incoming Interface
+ result chan Event
+ f FilterFunc
+}
+
+// ResultChan returns a channel which will receive filtered events.
+func (fw *filteredWatch) ResultChan() <-chan Event {
+ return fw.result
+}
+
+// Stop stops the upstream watch, which will eventually stop this watch.
+func (fw *filteredWatch) Stop() {
+ fw.incoming.Stop()
+}
+
+// loop waits for new values, filters them, and resends them.
+func (fw *filteredWatch) loop() {
+ defer close(fw.result)
+ for {
+ event, ok := <-fw.incoming.ResultChan()
+ if !ok {
+ break
+ }
+ filtered, keep := fw.f(event)
+ if keep {
+ fw.result <- filtered
+ }
+ }
+}
+
+// Recorder records all events that are sent from the watch until it is closed.
+type Recorder struct {
+ Interface
+
+ lock sync.Mutex
+ events []Event
+}
+
+var _ Interface = &Recorder{}
+
+// NewRecorder wraps an Interface and records any changes sent across it.
+func NewRecorder(w Interface) *Recorder {
+ r := &Recorder{}
+ r.Interface = Filter(w, r.record)
+ return r
+}
+
+// record is a FilterFunc and tracks each received event.
+func (r *Recorder) record(in Event) (Event, bool) {
+ r.lock.Lock()
+ defer r.lock.Unlock()
+ r.events = append(r.events, in)
+ return in, true
+}
+
+// Events returns a copy of the events sent across this recorder.
+func (r *Recorder) Events() []Event {
+ r.lock.Lock()
+ defer r.lock.Unlock()
+ copied := make([]Event, len(r.events))
+ copy(copied, r.events)
+ return copied
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/watch/mux.go b/vendor/k8s.io/apimachinery/pkg/watch/mux.go
new file mode 100644
index 000000000..fafccd78e
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/watch/mux.go
@@ -0,0 +1,257 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package watch
+
+import (
+ "sync"
+
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// FullChannelBehavior controls how the Broadcaster reacts if a watcher's watch
+// channel is full.
+type FullChannelBehavior int
+
+const (
+ WaitIfChannelFull FullChannelBehavior = iota
+ DropIfChannelFull
+)
+
+// Buffer the incoming queue a little bit even though it should rarely ever accumulate
+// anything, just in case a few events are received in such a short window that
+// Broadcaster can't move them onto the watchers' queues fast enough.
+const incomingQueueLength = 25
+
+// Broadcaster distributes event notifications among any number of watchers. Every event
+// is delivered to every watcher.
+type Broadcaster struct {
+ // TODO: see if this lock is needed now that new watchers go through
+ // the incoming channel.
+ lock sync.Mutex
+
+ watchers map[int64]*broadcasterWatcher
+ nextWatcher int64
+ distributing sync.WaitGroup
+
+ incoming chan Event
+
+ // How large to make watcher's channel.
+ watchQueueLength int
+ // If one of the watch channels is full, don't wait for it to become empty.
+ // Instead just deliver it to the watchers that do have space in their
+ // channels and move on to the next event.
+ // It's more fair to do this on a per-watcher basis than to do it on the
+ // "incoming" channel, which would allow one slow watcher to prevent all
+ // other watchers from getting new events.
+ fullChannelBehavior FullChannelBehavior
+}
+
+// NewBroadcaster creates a new Broadcaster. queueLength is the maximum number of events to queue per watcher.
+// It is guaranteed that events will be distributed in the order in which they occur,
+// but the order in which a single event is distributed among all of the watchers is unspecified.
+func NewBroadcaster(queueLength int, fullChannelBehavior FullChannelBehavior) *Broadcaster {
+ m := &Broadcaster{
+ watchers: map[int64]*broadcasterWatcher{},
+ incoming: make(chan Event, incomingQueueLength),
+ watchQueueLength: queueLength,
+ fullChannelBehavior: fullChannelBehavior,
+ }
+ m.distributing.Add(1)
+ go m.loop()
+ return m
+}
+
+const internalRunFunctionMarker = "internal-do-function"
+
+// a function type we can shoehorn into the queue.
+type functionFakeRuntimeObject func()
+
+func (obj functionFakeRuntimeObject) GetObjectKind() schema.ObjectKind {
+ return schema.EmptyObjectKind
+}
+
+// Execute f, blocking the incoming queue (and waiting for it to drain first).
+// The purpose of this terrible hack is so that watchers added after an event
+// won't ever see that event, and will always see any event after they are
+// added.
+func (b *Broadcaster) blockQueue(f func()) {
+ var wg sync.WaitGroup
+ wg.Add(1)
+ b.incoming <- Event{
+ Type: internalRunFunctionMarker,
+ Object: functionFakeRuntimeObject(func() {
+ defer wg.Done()
+ f()
+ }),
+ }
+ wg.Wait()
+}
+
+// Watch adds a new watcher to the list and returns an Interface for it.
+// Note: new watchers will only receive new events. They won't get an entire history
+// of previous events.
+func (m *Broadcaster) Watch() Interface {
+ var w *broadcasterWatcher
+ m.blockQueue(func() {
+ m.lock.Lock()
+ defer m.lock.Unlock()
+ id := m.nextWatcher
+ m.nextWatcher++
+ w = &broadcasterWatcher{
+ result: make(chan Event, m.watchQueueLength),
+ stopped: make(chan struct{}),
+ id: id,
+ m: m,
+ }
+ m.watchers[id] = w
+ })
+ return w
+}
+
+// WatchWithPrefix adds a new watcher to the list and returns an Interface for it. It sends
+// queuedEvents down the new watch before beginning to send ordinary events from Broadcaster.
+// The returned watch will have a queue length that is at least large enough to accommodate
+// all of the items in queuedEvents.
+func (m *Broadcaster) WatchWithPrefix(queuedEvents []Event) Interface {
+ var w *broadcasterWatcher
+ m.blockQueue(func() {
+ m.lock.Lock()
+ defer m.lock.Unlock()
+ id := m.nextWatcher
+ m.nextWatcher++
+ length := m.watchQueueLength
+ if n := len(queuedEvents) + 1; n > length {
+ length = n
+ }
+ w = &broadcasterWatcher{
+ result: make(chan Event, length),
+ stopped: make(chan struct{}),
+ id: id,
+ m: m,
+ }
+ m.watchers[id] = w
+ for _, e := range queuedEvents {
+ w.result <- e
+ }
+ })
+ return w
+}
+
+// stopWatching stops the given watcher and removes it from the list.
+func (m *Broadcaster) stopWatching(id int64) {
+ m.lock.Lock()
+ defer m.lock.Unlock()
+ w, ok := m.watchers[id]
+ if !ok {
+ // No need to do anything, it's already been removed from the list.
+ return
+ }
+ delete(m.watchers, id)
+ close(w.result)
+}
+
+// closeAll disconnects all watchers (presumably in response to a Shutdown call).
+func (m *Broadcaster) closeAll() {
+ m.lock.Lock()
+ defer m.lock.Unlock()
+ for _, w := range m.watchers {
+ close(w.result)
+ }
+ // Delete everything from the map, since presence/absence in the map is used
+ // by stopWatching to avoid double-closing the channel.
+ m.watchers = map[int64]*broadcasterWatcher{}
+}
+
+// Action distributes the given event among all watchers.
+func (m *Broadcaster) Action(action EventType, obj runtime.Object) {
+ m.incoming <- Event{action, obj}
+}
+
+// Shutdown disconnects all watchers (but any queued events will still be distributed).
+// You must not call Action or Watch* after calling Shutdown. This call blocks
+// until all events have been distributed through the outbound channels. Note
+// that since they can be buffered, this means that the watchers might not
+// have received the data yet as it can remain sitting in the buffered
+// channel.
+func (m *Broadcaster) Shutdown() {
+ close(m.incoming)
+ m.distributing.Wait()
+}
+
+// loop receives from m.incoming and distributes to all watchers.
+func (m *Broadcaster) loop() {
+ // Deliberately not catching crashes here. Yes, bring down the process if there's a
+ // bug in watch.Broadcaster.
+ for {
+ event, ok := <-m.incoming
+ if !ok {
+ break
+ }
+ if event.Type == internalRunFunctionMarker {
+ event.Object.(functionFakeRuntimeObject)()
+ continue
+ }
+ m.distribute(event)
+ }
+ m.closeAll()
+ m.distributing.Done()
+}
+
+// distribute sends event to all watchers. Blocking.
+func (m *Broadcaster) distribute(event Event) {
+ m.lock.Lock()
+ defer m.lock.Unlock()
+ if m.fullChannelBehavior == DropIfChannelFull {
+ for _, w := range m.watchers {
+ select {
+ case w.result <- event:
+ case <-w.stopped:
+ default: // Don't block if the event can't be queued.
+ }
+ }
+ } else {
+ for _, w := range m.watchers {
+ select {
+ case w.result <- event:
+ case <-w.stopped:
+ }
+ }
+ }
+}
+
+// broadcasterWatcher handles a single watcher of a broadcaster
+type broadcasterWatcher struct {
+ result chan Event
+ stopped chan struct{}
+ stop sync.Once
+ id int64
+ m *Broadcaster
+}
+
+// ResultChan returns a channel to use for waiting on events.
+func (mw *broadcasterWatcher) ResultChan() <-chan Event {
+ return mw.result
+}
+
+// Stop stops watching and removes mw from its list.
+func (mw *broadcasterWatcher) Stop() {
+ mw.stop.Do(func() {
+ close(mw.stopped)
+ mw.m.stopWatching(mw.id)
+ })
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/watch/streamwatcher.go b/vendor/k8s.io/apimachinery/pkg/watch/streamwatcher.go
new file mode 100644
index 000000000..93bb1cdf7
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/watch/streamwatcher.go
@@ -0,0 +1,119 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package watch
+
+import (
+ "io"
+ "sync"
+
+ "github.com/golang/glog"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/net"
+ utilruntime "k8s.io/apimachinery/pkg/util/runtime"
+)
+
+// Decoder allows StreamWatcher to watch any stream for which a Decoder can be written.
+type Decoder interface {
+ // Decode should return the type of event, the decoded object, or an error.
+ // An error will cause StreamWatcher to call Close(). Decode should block until
+ // it has data or an error occurs.
+ Decode() (action EventType, object runtime.Object, err error)
+
+ // Close should close the underlying io.Reader, signalling to the source of
+ // the stream that it is no longer being watched. Close() must cause any
+ // outstanding call to Decode() to return with an error of some sort.
+ Close()
+}
+
+// StreamWatcher turns any stream for which you can write a Decoder interface
+// into a watch.Interface.
+type StreamWatcher struct {
+ sync.Mutex
+ source Decoder
+ result chan Event
+ stopped bool
+}
+
+// NewStreamWatcher creates a StreamWatcher from the given decoder.
+func NewStreamWatcher(d Decoder) *StreamWatcher {
+ sw := &StreamWatcher{
+ source: d,
+ // It's easy for a consumer to add buffering via an extra
+ // goroutine/channel, but impossible for them to remove it,
+ // so nonbuffered is better.
+ result: make(chan Event),
+ }
+ go sw.receive()
+ return sw
+}
+
+// ResultChan implements Interface.
+func (sw *StreamWatcher) ResultChan() <-chan Event {
+ return sw.result
+}
+
+// Stop implements Interface.
+func (sw *StreamWatcher) Stop() {
+ // Call Close() exactly once by locking and setting a flag.
+ sw.Lock()
+ defer sw.Unlock()
+ if !sw.stopped {
+ sw.stopped = true
+ sw.source.Close()
+ }
+}
+
+// stopping returns true if Stop() was called previously.
+func (sw *StreamWatcher) stopping() bool {
+ sw.Lock()
+ defer sw.Unlock()
+ return sw.stopped
+}
+
+// receive reads result from the decoder in a loop and sends down the result channel.
+func (sw *StreamWatcher) receive() {
+ defer close(sw.result)
+ defer sw.Stop()
+ defer utilruntime.HandleCrash()
+ for {
+ action, obj, err := sw.source.Decode()
+ if err != nil {
+ // Ignore expected error.
+ if sw.stopping() {
+ return
+ }
+ switch err {
+ case io.EOF:
+ // watch closed normally
+ case io.ErrUnexpectedEOF:
+ glog.V(1).Infof("Unexpected EOF during watch stream event decoding: %v", err)
+ default:
+ msg := "Unable to decode an event from the watch stream: %v"
+ if net.IsProbableEOF(err) {
+ glog.V(5).Infof(msg, err)
+ } else {
+ glog.Errorf(msg, err)
+ }
+ }
+ return
+ }
+ sw.result <- Event{
+ Type: action,
+ Object: obj,
+ }
+ }
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/watch/until.go b/vendor/k8s.io/apimachinery/pkg/watch/until.go
new file mode 100644
index 000000000..c2772ddb5
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/watch/until.go
@@ -0,0 +1,87 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package watch
+
+import (
+ "errors"
+ "time"
+
+ "k8s.io/apimachinery/pkg/util/wait"
+)
+
+// ConditionFunc returns true if the condition has been reached, false if it has not been reached yet,
+// or an error if the condition cannot be checked and should terminate. In general, it is better to define
+// level driven conditions over edge driven conditions (pod has ready=true, vs pod modified and ready changed
+// from false to true).
+type ConditionFunc func(event Event) (bool, error)
+
+// ErrWatchClosed is returned when the watch channel is closed before timeout in Until.
+var ErrWatchClosed = errors.New("watch closed before Until timeout")
+
+// Until reads items from the watch until each provided condition succeeds, and then returns the last watch
+// encountered. The first condition that returns an error terminates the watch (and the event is also returned).
+// If no event has been received, the returned event will be nil.
+// Conditions are satisfied sequentially so as to provide a useful primitive for higher level composition.
+// A zero timeout means to wait forever.
+func Until(timeout time.Duration, watcher Interface, conditions ...ConditionFunc) (*Event, error) {
+ ch := watcher.ResultChan()
+ defer watcher.Stop()
+ var after <-chan time.Time
+ if timeout > 0 {
+ after = time.After(timeout)
+ } else {
+ ch := make(chan time.Time)
+ defer close(ch)
+ after = ch
+ }
+ var lastEvent *Event
+ for _, condition := range conditions {
+ // check the next condition against the previous event and short circuit waiting for the next watch
+ if lastEvent != nil {
+ done, err := condition(*lastEvent)
+ if err != nil {
+ return lastEvent, err
+ }
+ if done {
+ continue
+ }
+ }
+ ConditionSucceeded:
+ for {
+ select {
+ case event, ok := <-ch:
+ if !ok {
+ return lastEvent, ErrWatchClosed
+ }
+ lastEvent = &event
+
+ // TODO: check for watch expired error and retry watch from latest point?
+ done, err := condition(event)
+ if err != nil {
+ return lastEvent, err
+ }
+ if done {
+ break ConditionSucceeded
+ }
+
+ case <-after:
+ return lastEvent, wait.ErrWaitTimeout
+ }
+ }
+ }
+ return lastEvent, nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/watch/watch.go b/vendor/k8s.io/apimachinery/pkg/watch/watch.go
new file mode 100644
index 000000000..dd49c41f9
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/watch/watch.go
@@ -0,0 +1,269 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package watch
+
+import (
+ "fmt"
+ "sync"
+
+ "k8s.io/apimachinery/pkg/runtime"
+
+ "github.com/golang/glog"
+)
+
+// Interface can be implemented by anything that knows how to watch and report changes.
+type Interface interface {
+ // Stops watching. Will close the channel returned by ResultChan(). Releases
+ // any resources used by the watch.
+ Stop()
+
+ // Returns a chan which will receive all the events. If an error occurs
+ // or Stop() is called, this channel will be closed, in which case the
+ // watch should be completely cleaned up.
+ ResultChan() <-chan Event
+}
+
+// EventType defines the possible types of events.
+type EventType string
+
+const (
+ Added EventType = "ADDED"
+ Modified EventType = "MODIFIED"
+ Deleted EventType = "DELETED"
+ Error EventType = "ERROR"
+
+ DefaultChanSize int32 = 100
+)
+
+// Event represents a single event to a watched resource.
+type Event struct {
+ Type EventType
+
+ // Object is:
+ // * If Type is Added or Modified: the new state of the object.
+ // * If Type is Deleted: the state of the object immediately before deletion.
+ // * If Type is Error: *api.Status is recommended; other types may make sense
+ // depending on context.
+ Object runtime.Object
+}
+
+type emptyWatch chan Event
+
+// NewEmptyWatch returns a watch interface that returns no results and is closed.
+// May be used in certain error conditions where no information is available but
+// an error is not warranted.
+func NewEmptyWatch() Interface {
+ ch := make(chan Event)
+ close(ch)
+ return emptyWatch(ch)
+}
+
+// Stop implements Interface
+func (w emptyWatch) Stop() {
+}
+
+// ResultChan implements Interface
+func (w emptyWatch) ResultChan() <-chan Event {
+ return chan Event(w)
+}
+
+// FakeWatcher lets you test anything that consumes a watch.Interface; threadsafe.
+type FakeWatcher struct {
+ result chan Event
+ Stopped bool
+ sync.Mutex
+}
+
+func NewFake() *FakeWatcher {
+ return &FakeWatcher{
+ result: make(chan Event),
+ }
+}
+
+func NewFakeWithChanSize(size int, blocking bool) *FakeWatcher {
+ return &FakeWatcher{
+ result: make(chan Event, size),
+ }
+}
+
+// Stop implements Interface.Stop().
+func (f *FakeWatcher) Stop() {
+ f.Lock()
+ defer f.Unlock()
+ if !f.Stopped {
+ glog.V(4).Infof("Stopping fake watcher.")
+ close(f.result)
+ f.Stopped = true
+ }
+}
+
+func (f *FakeWatcher) IsStopped() bool {
+ f.Lock()
+ defer f.Unlock()
+ return f.Stopped
+}
+
+// Reset prepares the watcher to be reused.
+func (f *FakeWatcher) Reset() {
+ f.Lock()
+ defer f.Unlock()
+ f.Stopped = false
+ f.result = make(chan Event)
+}
+
+func (f *FakeWatcher) ResultChan() <-chan Event {
+ return f.result
+}
+
+// Add sends an add event.
+func (f *FakeWatcher) Add(obj runtime.Object) {
+ f.result <- Event{Added, obj}
+}
+
+// Modify sends a modify event.
+func (f *FakeWatcher) Modify(obj runtime.Object) {
+ f.result <- Event{Modified, obj}
+}
+
+// Delete sends a delete event.
+func (f *FakeWatcher) Delete(lastValue runtime.Object) {
+ f.result <- Event{Deleted, lastValue}
+}
+
+// Error sends an Error event.
+func (f *FakeWatcher) Error(errValue runtime.Object) {
+ f.result <- Event{Error, errValue}
+}
+
+// Action sends an event of the requested type, for table-based testing.
+func (f *FakeWatcher) Action(action EventType, obj runtime.Object) {
+ f.result <- Event{action, obj}
+}
+
+// RaceFreeFakeWatcher lets you test anything that consumes a watch.Interface; threadsafe.
+type RaceFreeFakeWatcher struct {
+ result chan Event
+ Stopped bool
+ sync.Mutex
+}
+
+func NewRaceFreeFake() *RaceFreeFakeWatcher {
+ return &RaceFreeFakeWatcher{
+ result: make(chan Event, DefaultChanSize),
+ }
+}
+
+// Stop implements Interface.Stop().
+func (f *RaceFreeFakeWatcher) Stop() {
+ f.Lock()
+ defer f.Unlock()
+ if !f.Stopped {
+ glog.V(4).Infof("Stopping fake watcher.")
+ close(f.result)
+ f.Stopped = true
+ }
+}
+
+func (f *RaceFreeFakeWatcher) IsStopped() bool {
+ f.Lock()
+ defer f.Unlock()
+ return f.Stopped
+}
+
+// Reset prepares the watcher to be reused.
+func (f *RaceFreeFakeWatcher) Reset() {
+ f.Lock()
+ defer f.Unlock()
+ f.Stopped = false
+ f.result = make(chan Event, DefaultChanSize)
+}
+
+func (f *RaceFreeFakeWatcher) ResultChan() <-chan Event {
+ f.Lock()
+ defer f.Unlock()
+ return f.result
+}
+
+// Add sends an add event.
+func (f *RaceFreeFakeWatcher) Add(obj runtime.Object) {
+ f.Lock()
+ defer f.Unlock()
+ if !f.Stopped {
+ select {
+ case f.result <- Event{Added, obj}:
+ return
+ default:
+ panic(fmt.Errorf("channel full"))
+ }
+ }
+}
+
+// Modify sends a modify event.
+func (f *RaceFreeFakeWatcher) Modify(obj runtime.Object) {
+ f.Lock()
+ defer f.Unlock()
+ if !f.Stopped {
+ select {
+ case f.result <- Event{Modified, obj}:
+ return
+ default:
+ panic(fmt.Errorf("channel full"))
+ }
+ }
+}
+
+// Delete sends a delete event.
+func (f *RaceFreeFakeWatcher) Delete(lastValue runtime.Object) {
+ f.Lock()
+ defer f.Unlock()
+ if !f.Stopped {
+ select {
+ case f.result <- Event{Deleted, lastValue}:
+ return
+ default:
+ panic(fmt.Errorf("channel full"))
+ }
+ }
+}
+
+// Error sends an Error event.
+func (f *RaceFreeFakeWatcher) Error(errValue runtime.Object) {
+ f.Lock()
+ defer f.Unlock()
+ if !f.Stopped {
+ select {
+ case f.result <- Event{Error, errValue}:
+ return
+ default:
+ panic(fmt.Errorf("channel full"))
+ }
+ }
+}
+
+// Action sends an event of the requested type, for table-based testing.
+func (f *RaceFreeFakeWatcher) Action(action EventType, obj runtime.Object) {
+ f.Lock()
+ defer f.Unlock()
+ if !f.Stopped {
+ select {
+ case f.result <- Event{action, obj}:
+ return
+ default:
+ panic(fmt.Errorf("channel full"))
+ }
+ }
+}
diff --git a/vendor/k8s.io/apimachinery/third_party/forked/golang/json/fields.go b/vendor/k8s.io/apimachinery/third_party/forked/golang/json/fields.go
new file mode 100644
index 000000000..ac6d9cb96
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/third_party/forked/golang/json/fields.go
@@ -0,0 +1,513 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package json is forked from the Go standard library to enable us to find the
+// field of a struct that a given JSON key maps to.
+package json
+
+import (
+ "bytes"
+ "fmt"
+ "reflect"
+ "sort"
+ "strings"
+ "sync"
+ "unicode"
+ "unicode/utf8"
+)
+
+const (
+ patchStrategyTagKey = "patchStrategy"
+ patchMergeKeyTagKey = "patchMergeKey"
+)
+
+// Finds the patchStrategy and patchMergeKey struct tag fields on a given
+// struct field given the struct type and the JSON name of the field.
+// It returns field type, a slice of patch strategies, merge key and error.
+// TODO: fix the returned errors to be introspectable.
+func LookupPatchMetadata(t reflect.Type, jsonField string) (
+ elemType reflect.Type, patchStrategies []string, patchMergeKey string, e error) {
+ if t.Kind() == reflect.Map {
+ elemType = t.Elem()
+ return
+ }
+ if t.Kind() != reflect.Struct {
+ e = fmt.Errorf("merging an object in json but data type is not map or struct, instead is: %s",
+ t.Kind().String())
+ return
+ }
+ jf := []byte(jsonField)
+ // Find the field that the JSON library would use.
+ var f *field
+ fields := cachedTypeFields(t)
+ for i := range fields {
+ ff := &fields[i]
+ if bytes.Equal(ff.nameBytes, jf) {
+ f = ff
+ break
+ }
+ // Do case-insensitive comparison.
+ if f == nil && ff.equalFold(ff.nameBytes, jf) {
+ f = ff
+ }
+ }
+ if f != nil {
+ // Find the reflect.Value of the most preferential struct field.
+ tjf := t.Field(f.index[0])
+ // we must navigate down all the anonymously included structs in the chain
+ for i := 1; i < len(f.index); i++ {
+ tjf = tjf.Type.Field(f.index[i])
+ }
+ patchStrategy := tjf.Tag.Get(patchStrategyTagKey)
+ patchMergeKey = tjf.Tag.Get(patchMergeKeyTagKey)
+ patchStrategies = strings.Split(patchStrategy, ",")
+ elemType = tjf.Type
+ return
+ }
+ e = fmt.Errorf("unable to find api field in struct %s for the json field %q", t.Name(), jsonField)
+ return
+}
+
+// A field represents a single field found in a struct.
+type field struct {
+ name string
+ nameBytes []byte // []byte(name)
+ equalFold func(s, t []byte) bool // bytes.EqualFold or equivalent
+
+ tag bool
+ // index is the sequence of indexes from the containing type fields to this field.
+ // it is a slice because anonymous structs will need multiple navigation steps to correctly
+ // resolve the proper fields
+ index []int
+ typ reflect.Type
+ omitEmpty bool
+ quoted bool
+}
+
+func (f field) String() string {
+ return fmt.Sprintf("{name: %s, type: %v, tag: %v, index: %v, omitEmpty: %v, quoted: %v}", f.name, f.typ, f.tag, f.index, f.omitEmpty, f.quoted)
+}
+
+func fillField(f field) field {
+ f.nameBytes = []byte(f.name)
+ f.equalFold = foldFunc(f.nameBytes)
+ return f
+}
+
+// byName sorts field by name, breaking ties with depth,
+// then breaking ties with "name came from json tag", then
+// breaking ties with index sequence.
+type byName []field
+
+func (x byName) Len() int { return len(x) }
+
+func (x byName) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
+
+func (x byName) Less(i, j int) bool {
+ if x[i].name != x[j].name {
+ return x[i].name < x[j].name
+ }
+ if len(x[i].index) != len(x[j].index) {
+ return len(x[i].index) < len(x[j].index)
+ }
+ if x[i].tag != x[j].tag {
+ return x[i].tag
+ }
+ return byIndex(x).Less(i, j)
+}
+
+// byIndex sorts field by index sequence.
+type byIndex []field
+
+func (x byIndex) Len() int { return len(x) }
+
+func (x byIndex) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
+
+func (x byIndex) Less(i, j int) bool {
+ for k, xik := range x[i].index {
+ if k >= len(x[j].index) {
+ return false
+ }
+ if xik != x[j].index[k] {
+ return xik < x[j].index[k]
+ }
+ }
+ return len(x[i].index) < len(x[j].index)
+}
+
+// typeFields returns a list of fields that JSON should recognize for the given type.
+// The algorithm is breadth-first search over the set of structs to include - the top struct
+// and then any reachable anonymous structs.
+func typeFields(t reflect.Type) []field {
+ // Anonymous fields to explore at the current level and the next.
+ current := []field{}
+ next := []field{{typ: t}}
+
+ // Count of queued names for current level and the next.
+ count := map[reflect.Type]int{}
+ nextCount := map[reflect.Type]int{}
+
+ // Types already visited at an earlier level.
+ visited := map[reflect.Type]bool{}
+
+ // Fields found.
+ var fields []field
+
+ for len(next) > 0 {
+ current, next = next, current[:0]
+ count, nextCount = nextCount, map[reflect.Type]int{}
+
+ for _, f := range current {
+ if visited[f.typ] {
+ continue
+ }
+ visited[f.typ] = true
+
+ // Scan f.typ for fields to include.
+ for i := 0; i < f.typ.NumField(); i++ {
+ sf := f.typ.Field(i)
+ if sf.PkgPath != "" { // unexported
+ continue
+ }
+ tag := sf.Tag.Get("json")
+ if tag == "-" {
+ continue
+ }
+ name, opts := parseTag(tag)
+ if !isValidTag(name) {
+ name = ""
+ }
+ index := make([]int, len(f.index)+1)
+ copy(index, f.index)
+ index[len(f.index)] = i
+
+ ft := sf.Type
+ if ft.Name() == "" && ft.Kind() == reflect.Ptr {
+ // Follow pointer.
+ ft = ft.Elem()
+ }
+
+ // Record found field and index sequence.
+ if name != "" || !sf.Anonymous || ft.Kind() != reflect.Struct {
+ tagged := name != ""
+ if name == "" {
+ name = sf.Name
+ }
+ fields = append(fields, fillField(field{
+ name: name,
+ tag: tagged,
+ index: index,
+ typ: ft,
+ omitEmpty: opts.Contains("omitempty"),
+ quoted: opts.Contains("string"),
+ }))
+ if count[f.typ] > 1 {
+ // If there were multiple instances, add a second,
+ // so that the annihilation code will see a duplicate.
+ // It only cares about the distinction between 1 or 2,
+ // so don't bother generating any more copies.
+ fields = append(fields, fields[len(fields)-1])
+ }
+ continue
+ }
+
+ // Record new anonymous struct to explore in next round.
+ nextCount[ft]++
+ if nextCount[ft] == 1 {
+ next = append(next, fillField(field{name: ft.Name(), index: index, typ: ft}))
+ }
+ }
+ }
+ }
+
+ sort.Sort(byName(fields))
+
+ // Delete all fields that are hidden by the Go rules for embedded fields,
+ // except that fields with JSON tags are promoted.
+
+ // The fields are sorted in primary order of name, secondary order
+ // of field index length. Loop over names; for each name, delete
+ // hidden fields by choosing the one dominant field that survives.
+ out := fields[:0]
+ for advance, i := 0, 0; i < len(fields); i += advance {
+ // One iteration per name.
+ // Find the sequence of fields with the name of this first field.
+ fi := fields[i]
+ name := fi.name
+ for advance = 1; i+advance < len(fields); advance++ {
+ fj := fields[i+advance]
+ if fj.name != name {
+ break
+ }
+ }
+ if advance == 1 { // Only one field with this name
+ out = append(out, fi)
+ continue
+ }
+ dominant, ok := dominantField(fields[i : i+advance])
+ if ok {
+ out = append(out, dominant)
+ }
+ }
+
+ fields = out
+ sort.Sort(byIndex(fields))
+
+ return fields
+}
+
+// dominantField looks through the fields, all of which are known to
+// have the same name, to find the single field that dominates the
+// others using Go's embedding rules, modified by the presence of
+// JSON tags. If there are multiple top-level fields, the boolean
+// will be false: This condition is an error in Go and we skip all
+// the fields.
+func dominantField(fields []field) (field, bool) {
+ // The fields are sorted in increasing index-length order. The winner
+ // must therefore be one with the shortest index length. Drop all
+ // longer entries, which is easy: just truncate the slice.
+ length := len(fields[0].index)
+ tagged := -1 // Index of first tagged field.
+ for i, f := range fields {
+ if len(f.index) > length {
+ fields = fields[:i]
+ break
+ }
+ if f.tag {
+ if tagged >= 0 {
+ // Multiple tagged fields at the same level: conflict.
+ // Return no field.
+ return field{}, false
+ }
+ tagged = i
+ }
+ }
+ if tagged >= 0 {
+ return fields[tagged], true
+ }
+ // All remaining fields have the same length. If there's more than one,
+ // we have a conflict (two fields named "X" at the same level) and we
+ // return no field.
+ if len(fields) > 1 {
+ return field{}, false
+ }
+ return fields[0], true
+}
+
+var fieldCache struct {
+ sync.RWMutex
+ m map[reflect.Type][]field
+}
+
+// cachedTypeFields is like typeFields but uses a cache to avoid repeated work.
+func cachedTypeFields(t reflect.Type) []field {
+ fieldCache.RLock()
+ f := fieldCache.m[t]
+ fieldCache.RUnlock()
+ if f != nil {
+ return f
+ }
+
+ // Compute fields without lock.
+ // Might duplicate effort but won't hold other computations back.
+ f = typeFields(t)
+ if f == nil {
+ f = []field{}
+ }
+
+ fieldCache.Lock()
+ if fieldCache.m == nil {
+ fieldCache.m = map[reflect.Type][]field{}
+ }
+ fieldCache.m[t] = f
+ fieldCache.Unlock()
+ return f
+}
+
+func isValidTag(s string) bool {
+ if s == "" {
+ return false
+ }
+ for _, c := range s {
+ switch {
+ case strings.ContainsRune("!#$%&()*+-./:<=>?@[]^_{|}~ ", c):
+ // Backslash and quote chars are reserved, but
+ // otherwise any punctuation chars are allowed
+ // in a tag name.
+ default:
+ if !unicode.IsLetter(c) && !unicode.IsDigit(c) {
+ return false
+ }
+ }
+ }
+ return true
+}
+
+const (
+ caseMask = ^byte(0x20) // Mask to ignore case in ASCII.
+ kelvin = '\u212a'
+ smallLongEss = '\u017f'
+)
+
+// foldFunc returns one of four different case folding equivalence
+// functions, from most general (and slow) to fastest:
+//
+// 1) bytes.EqualFold, if the key s contains any non-ASCII UTF-8
+// 2) equalFoldRight, if s contains special folding ASCII ('k', 'K', 's', 'S')
+// 3) asciiEqualFold, no special, but includes non-letters (including _)
+// 4) simpleLetterEqualFold, no specials, no non-letters.
+//
+// The letters S and K are special because they map to 3 runes, not just 2:
+// * S maps to s and to U+017F 'Å¿' Latin small letter long s
+// * k maps to K and to U+212A 'K' Kelvin sign
+// See http://play.golang.org/p/tTxjOc0OGo
+//
+// The returned function is specialized for matching against s and
+// should only be given s. It's not curried for performance reasons.
+func foldFunc(s []byte) func(s, t []byte) bool {
+ nonLetter := false
+ special := false // special letter
+ for _, b := range s {
+ if b >= utf8.RuneSelf {
+ return bytes.EqualFold
+ }
+ upper := b & caseMask
+ if upper < 'A' || upper > 'Z' {
+ nonLetter = true
+ } else if upper == 'K' || upper == 'S' {
+ // See above for why these letters are special.
+ special = true
+ }
+ }
+ if special {
+ return equalFoldRight
+ }
+ if nonLetter {
+ return asciiEqualFold
+ }
+ return simpleLetterEqualFold
+}
+
+// equalFoldRight is a specialization of bytes.EqualFold when s is
+// known to be all ASCII (including punctuation), but contains an 's',
+// 'S', 'k', or 'K', requiring a Unicode fold on the bytes in t.
+// See comments on foldFunc.
+func equalFoldRight(s, t []byte) bool {
+ for _, sb := range s {
+ if len(t) == 0 {
+ return false
+ }
+ tb := t[0]
+ if tb < utf8.RuneSelf {
+ if sb != tb {
+ sbUpper := sb & caseMask
+ if 'A' <= sbUpper && sbUpper <= 'Z' {
+ if sbUpper != tb&caseMask {
+ return false
+ }
+ } else {
+ return false
+ }
+ }
+ t = t[1:]
+ continue
+ }
+ // sb is ASCII and t is not. t must be either kelvin
+ // sign or long s; sb must be s, S, k, or K.
+ tr, size := utf8.DecodeRune(t)
+ switch sb {
+ case 's', 'S':
+ if tr != smallLongEss {
+ return false
+ }
+ case 'k', 'K':
+ if tr != kelvin {
+ return false
+ }
+ default:
+ return false
+ }
+ t = t[size:]
+
+ }
+ if len(t) > 0 {
+ return false
+ }
+ return true
+}
+
+// asciiEqualFold is a specialization of bytes.EqualFold for use when
+// s is all ASCII (but may contain non-letters) and contains no
+// special-folding letters.
+// See comments on foldFunc.
+func asciiEqualFold(s, t []byte) bool {
+ if len(s) != len(t) {
+ return false
+ }
+ for i, sb := range s {
+ tb := t[i]
+ if sb == tb {
+ continue
+ }
+ if ('a' <= sb && sb <= 'z') || ('A' <= sb && sb <= 'Z') {
+ if sb&caseMask != tb&caseMask {
+ return false
+ }
+ } else {
+ return false
+ }
+ }
+ return true
+}
+
+// simpleLetterEqualFold is a specialization of bytes.EqualFold for
+// use when s is all ASCII letters (no underscores, etc) and also
+// doesn't contain 'k', 'K', 's', or 'S'.
+// See comments on foldFunc.
+func simpleLetterEqualFold(s, t []byte) bool {
+ if len(s) != len(t) {
+ return false
+ }
+ for i, b := range s {
+ if b&caseMask != t[i]&caseMask {
+ return false
+ }
+ }
+ return true
+}
+
+// tagOptions is the string following a comma in a struct field's "json"
+// tag, or the empty string. It does not include the leading comma.
+type tagOptions string
+
+// parseTag splits a struct field's json tag into its name and
+// comma-separated options.
+func parseTag(tag string) (string, tagOptions) {
+ if idx := strings.Index(tag, ","); idx != -1 {
+ return tag[:idx], tagOptions(tag[idx+1:])
+ }
+ return tag, tagOptions("")
+}
+
+// Contains reports whether a comma-separated list of options
+// contains a particular substr flag. substr must be surrounded by a
+// string boundary or commas.
+func (o tagOptions) Contains(optionName string) bool {
+ if len(o) == 0 {
+ return false
+ }
+ s := string(o)
+ for s != "" {
+ var next string
+ i := strings.Index(s, ",")
+ if i >= 0 {
+ s, next = s[:i], s[i+1:]
+ }
+ if s == optionName {
+ return true
+ }
+ s = next
+ }
+ return false
+}
diff --git a/vendor/k8s.io/apimachinery/third_party/forked/golang/netutil/addr.go b/vendor/k8s.io/apimachinery/third_party/forked/golang/netutil/addr.go
new file mode 100644
index 000000000..c70f431c2
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/third_party/forked/golang/netutil/addr.go
@@ -0,0 +1,27 @@
+package netutil
+
+import (
+ "net/url"
+ "strings"
+)
+
+// FROM: http://golang.org/src/net/http/client.go
+// Given a string of the form "host", "host:port", or "[ipv6::address]:port",
+// return true if the string includes a port.
+func hasPort(s string) bool { return strings.LastIndex(s, ":") > strings.LastIndex(s, "]") }
+
+// FROM: http://golang.org/src/net/http/transport.go
+var portMap = map[string]string{
+ "http": "80",
+ "https": "443",
+}
+
+// FROM: http://golang.org/src/net/http/transport.go
+// canonicalAddr returns url.Host but always with a ":port" suffix
+func CanonicalAddr(url *url.URL) string {
+ addr := url.Host
+ if !hasPort(addr) {
+ return addr + ":" + portMap[url.Scheme]
+ }
+ return addr
+}
diff --git a/vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go b/vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go
new file mode 100644
index 000000000..9e45dbe1d
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go
@@ -0,0 +1,388 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package reflect is a fork of go's standard library reflection package, which
+// allows for deep equal with equality functions defined.
+package reflect
+
+import (
+ "fmt"
+ "reflect"
+ "strings"
+)
+
+// Equalities is a map from type to a function comparing two values of
+// that type.
+type Equalities map[reflect.Type]reflect.Value
+
+// For convenience, panics on errrors
+func EqualitiesOrDie(funcs ...interface{}) Equalities {
+ e := Equalities{}
+ if err := e.AddFuncs(funcs...); err != nil {
+ panic(err)
+ }
+ return e
+}
+
+// AddFuncs is a shortcut for multiple calls to AddFunc.
+func (e Equalities) AddFuncs(funcs ...interface{}) error {
+ for _, f := range funcs {
+ if err := e.AddFunc(f); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// AddFunc uses func as an equality function: it must take
+// two parameters of the same type, and return a boolean.
+func (e Equalities) AddFunc(eqFunc interface{}) error {
+ fv := reflect.ValueOf(eqFunc)
+ ft := fv.Type()
+ if ft.Kind() != reflect.Func {
+ return fmt.Errorf("expected func, got: %v", ft)
+ }
+ if ft.NumIn() != 2 {
+ return fmt.Errorf("expected three 'in' params, got: %v", ft)
+ }
+ if ft.NumOut() != 1 {
+ return fmt.Errorf("expected one 'out' param, got: %v", ft)
+ }
+ if ft.In(0) != ft.In(1) {
+ return fmt.Errorf("expected arg 1 and 2 to have same type, but got %v", ft)
+ }
+ var forReturnType bool
+ boolType := reflect.TypeOf(forReturnType)
+ if ft.Out(0) != boolType {
+ return fmt.Errorf("expected bool return, got: %v", ft)
+ }
+ e[ft.In(0)] = fv
+ return nil
+}
+
+// Below here is forked from go's reflect/deepequal.go
+
+// During deepValueEqual, must keep track of checks that are
+// in progress. The comparison algorithm assumes that all
+// checks in progress are true when it reencounters them.
+// Visited comparisons are stored in a map indexed by visit.
+type visit struct {
+ a1 uintptr
+ a2 uintptr
+ typ reflect.Type
+}
+
+// unexportedTypePanic is thrown when you use this DeepEqual on something that has an
+// unexported type. It indicates a programmer error, so should not occur at runtime,
+// which is why it's not public and thus impossible to catch.
+type unexportedTypePanic []reflect.Type
+
+func (u unexportedTypePanic) Error() string { return u.String() }
+func (u unexportedTypePanic) String() string {
+ strs := make([]string, len(u))
+ for i, t := range u {
+ strs[i] = fmt.Sprintf("%v", t)
+ }
+ return "an unexported field was encountered, nested like this: " + strings.Join(strs, " -> ")
+}
+
+func makeUsefulPanic(v reflect.Value) {
+ if x := recover(); x != nil {
+ if u, ok := x.(unexportedTypePanic); ok {
+ u = append(unexportedTypePanic{v.Type()}, u...)
+ x = u
+ }
+ panic(x)
+ }
+}
+
+// Tests for deep equality using reflected types. The map argument tracks
+// comparisons that have already been seen, which allows short circuiting on
+// recursive types.
+func (e Equalities) deepValueEqual(v1, v2 reflect.Value, visited map[visit]bool, depth int) bool {
+ defer makeUsefulPanic(v1)
+
+ if !v1.IsValid() || !v2.IsValid() {
+ return v1.IsValid() == v2.IsValid()
+ }
+ if v1.Type() != v2.Type() {
+ return false
+ }
+ if fv, ok := e[v1.Type()]; ok {
+ return fv.Call([]reflect.Value{v1, v2})[0].Bool()
+ }
+
+ hard := func(k reflect.Kind) bool {
+ switch k {
+ case reflect.Array, reflect.Map, reflect.Slice, reflect.Struct:
+ return true
+ }
+ return false
+ }
+
+ if v1.CanAddr() && v2.CanAddr() && hard(v1.Kind()) {
+ addr1 := v1.UnsafeAddr()
+ addr2 := v2.UnsafeAddr()
+ if addr1 > addr2 {
+ // Canonicalize order to reduce number of entries in visited.
+ addr1, addr2 = addr2, addr1
+ }
+
+ // Short circuit if references are identical ...
+ if addr1 == addr2 {
+ return true
+ }
+
+ // ... or already seen
+ typ := v1.Type()
+ v := visit{addr1, addr2, typ}
+ if visited[v] {
+ return true
+ }
+
+ // Remember for later.
+ visited[v] = true
+ }
+
+ switch v1.Kind() {
+ case reflect.Array:
+ // We don't need to check length here because length is part of
+ // an array's type, which has already been filtered for.
+ for i := 0; i < v1.Len(); i++ {
+ if !e.deepValueEqual(v1.Index(i), v2.Index(i), visited, depth+1) {
+ return false
+ }
+ }
+ return true
+ case reflect.Slice:
+ if (v1.IsNil() || v1.Len() == 0) != (v2.IsNil() || v2.Len() == 0) {
+ return false
+ }
+ if v1.IsNil() || v1.Len() == 0 {
+ return true
+ }
+ if v1.Len() != v2.Len() {
+ return false
+ }
+ if v1.Pointer() == v2.Pointer() {
+ return true
+ }
+ for i := 0; i < v1.Len(); i++ {
+ if !e.deepValueEqual(v1.Index(i), v2.Index(i), visited, depth+1) {
+ return false
+ }
+ }
+ return true
+ case reflect.Interface:
+ if v1.IsNil() || v2.IsNil() {
+ return v1.IsNil() == v2.IsNil()
+ }
+ return e.deepValueEqual(v1.Elem(), v2.Elem(), visited, depth+1)
+ case reflect.Ptr:
+ return e.deepValueEqual(v1.Elem(), v2.Elem(), visited, depth+1)
+ case reflect.Struct:
+ for i, n := 0, v1.NumField(); i < n; i++ {
+ if !e.deepValueEqual(v1.Field(i), v2.Field(i), visited, depth+1) {
+ return false
+ }
+ }
+ return true
+ case reflect.Map:
+ if (v1.IsNil() || v1.Len() == 0) != (v2.IsNil() || v2.Len() == 0) {
+ return false
+ }
+ if v1.IsNil() || v1.Len() == 0 {
+ return true
+ }
+ if v1.Len() != v2.Len() {
+ return false
+ }
+ if v1.Pointer() == v2.Pointer() {
+ return true
+ }
+ for _, k := range v1.MapKeys() {
+ if !e.deepValueEqual(v1.MapIndex(k), v2.MapIndex(k), visited, depth+1) {
+ return false
+ }
+ }
+ return true
+ case reflect.Func:
+ if v1.IsNil() && v2.IsNil() {
+ return true
+ }
+ // Can't do better than this:
+ return false
+ default:
+ // Normal equality suffices
+ if !v1.CanInterface() || !v2.CanInterface() {
+ panic(unexportedTypePanic{})
+ }
+ return v1.Interface() == v2.Interface()
+ }
+}
+
+// DeepEqual is like reflect.DeepEqual, but focused on semantic equality
+// instead of memory equality.
+//
+// It will use e's equality functions if it finds types that match.
+//
+// An empty slice *is* equal to a nil slice for our purposes; same for maps.
+//
+// Unexported field members cannot be compared and will cause an imformative panic; you must add an Equality
+// function for these types.
+func (e Equalities) DeepEqual(a1, a2 interface{}) bool {
+ if a1 == nil || a2 == nil {
+ return a1 == a2
+ }
+ v1 := reflect.ValueOf(a1)
+ v2 := reflect.ValueOf(a2)
+ if v1.Type() != v2.Type() {
+ return false
+ }
+ return e.deepValueEqual(v1, v2, make(map[visit]bool), 0)
+}
+
+func (e Equalities) deepValueDerive(v1, v2 reflect.Value, visited map[visit]bool, depth int) bool {
+ defer makeUsefulPanic(v1)
+
+ if !v1.IsValid() || !v2.IsValid() {
+ return v1.IsValid() == v2.IsValid()
+ }
+ if v1.Type() != v2.Type() {
+ return false
+ }
+ if fv, ok := e[v1.Type()]; ok {
+ return fv.Call([]reflect.Value{v1, v2})[0].Bool()
+ }
+
+ hard := func(k reflect.Kind) bool {
+ switch k {
+ case reflect.Array, reflect.Map, reflect.Slice, reflect.Struct:
+ return true
+ }
+ return false
+ }
+
+ if v1.CanAddr() && v2.CanAddr() && hard(v1.Kind()) {
+ addr1 := v1.UnsafeAddr()
+ addr2 := v2.UnsafeAddr()
+ if addr1 > addr2 {
+ // Canonicalize order to reduce number of entries in visited.
+ addr1, addr2 = addr2, addr1
+ }
+
+ // Short circuit if references are identical ...
+ if addr1 == addr2 {
+ return true
+ }
+
+ // ... or already seen
+ typ := v1.Type()
+ v := visit{addr1, addr2, typ}
+ if visited[v] {
+ return true
+ }
+
+ // Remember for later.
+ visited[v] = true
+ }
+
+ switch v1.Kind() {
+ case reflect.Array:
+ // We don't need to check length here because length is part of
+ // an array's type, which has already been filtered for.
+ for i := 0; i < v1.Len(); i++ {
+ if !e.deepValueDerive(v1.Index(i), v2.Index(i), visited, depth+1) {
+ return false
+ }
+ }
+ return true
+ case reflect.Slice:
+ if v1.IsNil() || v1.Len() == 0 {
+ return true
+ }
+ if v1.Len() > v2.Len() {
+ return false
+ }
+ if v1.Pointer() == v2.Pointer() {
+ return true
+ }
+ for i := 0; i < v1.Len(); i++ {
+ if !e.deepValueDerive(v1.Index(i), v2.Index(i), visited, depth+1) {
+ return false
+ }
+ }
+ return true
+ case reflect.String:
+ if v1.Len() == 0 {
+ return true
+ }
+ if v1.Len() > v2.Len() {
+ return false
+ }
+ return v1.String() == v2.String()
+ case reflect.Interface:
+ if v1.IsNil() {
+ return true
+ }
+ return e.deepValueDerive(v1.Elem(), v2.Elem(), visited, depth+1)
+ case reflect.Ptr:
+ if v1.IsNil() {
+ return true
+ }
+ return e.deepValueDerive(v1.Elem(), v2.Elem(), visited, depth+1)
+ case reflect.Struct:
+ for i, n := 0, v1.NumField(); i < n; i++ {
+ if !e.deepValueDerive(v1.Field(i), v2.Field(i), visited, depth+1) {
+ return false
+ }
+ }
+ return true
+ case reflect.Map:
+ if v1.IsNil() || v1.Len() == 0 {
+ return true
+ }
+ if v1.Len() > v2.Len() {
+ return false
+ }
+ if v1.Pointer() == v2.Pointer() {
+ return true
+ }
+ for _, k := range v1.MapKeys() {
+ if !e.deepValueDerive(v1.MapIndex(k), v2.MapIndex(k), visited, depth+1) {
+ return false
+ }
+ }
+ return true
+ case reflect.Func:
+ if v1.IsNil() && v2.IsNil() {
+ return true
+ }
+ // Can't do better than this:
+ return false
+ default:
+ // Normal equality suffices
+ if !v1.CanInterface() || !v2.CanInterface() {
+ panic(unexportedTypePanic{})
+ }
+ return v1.Interface() == v2.Interface()
+ }
+}
+
+// DeepDerivative is similar to DeepEqual except that unset fields in a1 are
+// ignored (not compared). This allows us to focus on the fields that matter to
+// the semantic comparison.
+//
+// The unset fields include a nil pointer and an empty string.
+func (e Equalities) DeepDerivative(a1, a2 interface{}) bool {
+ if a1 == nil {
+ return true
+ }
+ v1 := reflect.ValueOf(a1)
+ v2 := reflect.ValueOf(a2)
+ if v1.Type() != v2.Type() {
+ return false
+ }
+ return e.deepValueDerive(v1, v2, make(map[visit]bool), 0)
+}
diff --git a/vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/type.go b/vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/type.go
new file mode 100644
index 000000000..67957ee33
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/type.go
@@ -0,0 +1,91 @@
+//This package is copied from Go library reflect/type.go.
+//The struct tag library provides no way to extract the list of struct tags, only
+//a specific tag
+package reflect
+
+import (
+ "fmt"
+
+ "strconv"
+ "strings"
+)
+
+type StructTag struct {
+ Name string
+ Value string
+}
+
+func (t StructTag) String() string {
+ return fmt.Sprintf("%s:%q", t.Name, t.Value)
+}
+
+type StructTags []StructTag
+
+func (tags StructTags) String() string {
+ s := make([]string, 0, len(tags))
+ for _, tag := range tags {
+ s = append(s, tag.String())
+ }
+ return "`" + strings.Join(s, " ") + "`"
+}
+
+func (tags StructTags) Has(name string) bool {
+ for i := range tags {
+ if tags[i].Name == name {
+ return true
+ }
+ }
+ return false
+}
+
+// ParseStructTags returns the full set of fields in a struct tag in the order they appear in
+// the struct tag.
+func ParseStructTags(tag string) (StructTags, error) {
+ tags := StructTags{}
+ for tag != "" {
+ // Skip leading space.
+ i := 0
+ for i < len(tag) && tag[i] == ' ' {
+ i++
+ }
+ tag = tag[i:]
+ if tag == "" {
+ break
+ }
+
+ // Scan to colon. A space, a quote or a control character is a syntax error.
+ // Strictly speaking, control chars include the range [0x7f, 0x9f], not just
+ // [0x00, 0x1f], but in practice, we ignore the multi-byte control characters
+ // as it is simpler to inspect the tag's bytes than the tag's runes.
+ i = 0
+ for i < len(tag) && tag[i] > ' ' && tag[i] != ':' && tag[i] != '"' && tag[i] != 0x7f {
+ i++
+ }
+ if i == 0 || i+1 >= len(tag) || tag[i] != ':' || tag[i+1] != '"' {
+ break
+ }
+ name := string(tag[:i])
+ tag = tag[i+1:]
+
+ // Scan quoted string to find value.
+ i = 1
+ for i < len(tag) && tag[i] != '"' {
+ if tag[i] == '\\' {
+ i++
+ }
+ i++
+ }
+ if i >= len(tag) {
+ break
+ }
+ qvalue := string(tag[:i+1])
+ tag = tag[i+1:]
+
+ value, err := strconv.Unquote(qvalue)
+ if err != nil {
+ return nil, err
+ }
+ tags = append(tags, StructTag{Name: name, Value: value})
+ }
+ return tags, nil
+}
diff --git a/vendor/k8s.io/apiserver/LICENSE b/vendor/k8s.io/apiserver/LICENSE
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/vendor/k8s.io/apiserver/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/k8s.io/apiserver/README.md b/vendor/k8s.io/apiserver/README.md
new file mode 100644
index 000000000..96927ae70
--- /dev/null
+++ b/vendor/k8s.io/apiserver/README.md
@@ -0,0 +1,30 @@
+# apiserver
+
+Generic library for building a Kubernetes aggregated API server.
+
+
+## Purpose
+
+This library contains code to create Kubernetes aggregation server complete with delegated authentication and authorization,
+`kubectl` compatible discovery information, optional admission chain, and versioned types. It's first consumers are
+`k8s.io/kubernetes`, `k8s.io/kube-aggregator`, and `github.com/kubernetes-incubator/service-catalog`.
+
+
+## Compatibility
+
+There are *NO compatibility guarantees* for this repository, yet. It is in direct support of Kubernetes, so branches
+will track Kubernetes and be compatible with that repo. As we more cleanly separate the layers, we will review the
+compatibility guarantee. We have a goal to make this easier to use in 2017.
+
+
+## Where does it come from?
+
+`apiserver` is synced from https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apiserver.
+Code changes are made in that location, merged into `k8s.io/kubernetes` and later synced here.
+
+
+## Things you should *NOT* do
+
+ 1. Directly modify any files under `pkg` in this repo. Those are driven from `k8s.io/kuberenetes/staging/src/k8s.io/apiserver`.
+ 2. Expect compatibility. This repo is changing quickly in direct support of
+ Kubernetes and the API isn't yet stable enough for API guarantees.
diff --git a/vendor/k8s.io/apiserver/pkg/authentication/authenticator/interfaces.go b/vendor/k8s.io/apiserver/pkg/authentication/authenticator/interfaces.go
new file mode 100644
index 000000000..fd3d0383e
--- /dev/null
+++ b/vendor/k8s.io/apiserver/pkg/authentication/authenticator/interfaces.go
@@ -0,0 +1,68 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package authenticator
+
+import (
+ "net/http"
+
+ "k8s.io/apiserver/pkg/authentication/user"
+)
+
+// Token checks a string value against a backing authentication store and returns
+// information about the current user and true if successful, false if not successful,
+// or an error if the token could not be checked.
+type Token interface {
+ AuthenticateToken(token string) (user.Info, bool, error)
+}
+
+// Request attempts to extract authentication information from a request and returns
+// information about the current user and true if successful, false if not successful,
+// or an error if the request could not be checked.
+type Request interface {
+ AuthenticateRequest(req *http.Request) (user.Info, bool, error)
+}
+
+// Password checks a username and password against a backing authentication store and
+// returns information about the user and true if successful, false if not successful,
+// or an error if the username and password could not be checked
+type Password interface {
+ AuthenticatePassword(user, password string) (user.Info, bool, error)
+}
+
+// TokenFunc is a function that implements the Token interface.
+type TokenFunc func(token string) (user.Info, bool, error)
+
+// AuthenticateToken implements authenticator.Token.
+func (f TokenFunc) AuthenticateToken(token string) (user.Info, bool, error) {
+ return f(token)
+}
+
+// RequestFunc is a function that implements the Request interface.
+type RequestFunc func(req *http.Request) (user.Info, bool, error)
+
+// AuthenticateRequest implements authenticator.Request.
+func (f RequestFunc) AuthenticateRequest(req *http.Request) (user.Info, bool, error) {
+ return f(req)
+}
+
+// PasswordFunc is a function that implements the Password interface.
+type PasswordFunc func(user, password string) (user.Info, bool, error)
+
+// AuthenticatePassword implements authenticator.Password.
+func (f PasswordFunc) AuthenticatePassword(user, password string) (user.Info, bool, error) {
+ return f(user, password)
+}
diff --git a/vendor/k8s.io/apiserver/pkg/authentication/serviceaccount/util.go b/vendor/k8s.io/apiserver/pkg/authentication/serviceaccount/util.go
new file mode 100644
index 000000000..ac3c252b7
--- /dev/null
+++ b/vendor/k8s.io/apiserver/pkg/authentication/serviceaccount/util.go
@@ -0,0 +1,73 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package serviceaccount
+
+import (
+ "fmt"
+ "strings"
+
+ apimachineryvalidation "k8s.io/apimachinery/pkg/api/validation"
+)
+
+const (
+ ServiceAccountUsernamePrefix = "system:serviceaccount:"
+ ServiceAccountUsernameSeparator = ":"
+ ServiceAccountGroupPrefix = "system:serviceaccounts:"
+ AllServiceAccountsGroup = "system:serviceaccounts"
+)
+
+// MakeUsername generates a username from the given namespace and ServiceAccount name.
+// The resulting username can be passed to SplitUsername to extract the original namespace and ServiceAccount name.
+func MakeUsername(namespace, name string) string {
+ return ServiceAccountUsernamePrefix + namespace + ServiceAccountUsernameSeparator + name
+}
+
+var invalidUsernameErr = fmt.Errorf("Username must be in the form %s", MakeUsername("namespace", "name"))
+
+// SplitUsername returns the namespace and ServiceAccount name embedded in the given username,
+// or an error if the username is not a valid name produced by MakeUsername
+func SplitUsername(username string) (string, string, error) {
+ if !strings.HasPrefix(username, ServiceAccountUsernamePrefix) {
+ return "", "", invalidUsernameErr
+ }
+ trimmed := strings.TrimPrefix(username, ServiceAccountUsernamePrefix)
+ parts := strings.Split(trimmed, ServiceAccountUsernameSeparator)
+ if len(parts) != 2 {
+ return "", "", invalidUsernameErr
+ }
+ namespace, name := parts[0], parts[1]
+ if len(apimachineryvalidation.ValidateNamespaceName(namespace, false)) != 0 {
+ return "", "", invalidUsernameErr
+ }
+ if len(apimachineryvalidation.ValidateServiceAccountName(name, false)) != 0 {
+ return "", "", invalidUsernameErr
+ }
+ return namespace, name, nil
+}
+
+// MakeGroupNames generates service account group names for the given namespace and ServiceAccount name
+func MakeGroupNames(namespace, name string) []string {
+ return []string{
+ AllServiceAccountsGroup,
+ MakeNamespaceGroupName(namespace),
+ }
+}
+
+// MakeNamespaceGroupName returns the name of the group all service accounts in the namespace are included in
+func MakeNamespaceGroupName(namespace string) string {
+ return ServiceAccountGroupPrefix + namespace
+}
diff --git a/vendor/k8s.io/apiserver/pkg/authentication/user/doc.go b/vendor/k8s.io/apiserver/pkg/authentication/user/doc.go
new file mode 100644
index 000000000..570c51ae9
--- /dev/null
+++ b/vendor/k8s.io/apiserver/pkg/authentication/user/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package user contains utilities for dealing with simple user exchange in the auth
+// packages. The user.Info interface defines an interface for exchanging that info.
+package user
diff --git a/vendor/k8s.io/apiserver/pkg/authentication/user/user.go b/vendor/k8s.io/apiserver/pkg/authentication/user/user.go
new file mode 100644
index 000000000..f02dc39ec
--- /dev/null
+++ b/vendor/k8s.io/apiserver/pkg/authentication/user/user.go
@@ -0,0 +1,83 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package user
+
+// Info describes a user that has been authenticated to the system.
+type Info interface {
+ // GetName returns the name that uniquely identifies this user among all
+ // other active users.
+ GetName() string
+ // GetUID returns a unique value for a particular user that will change
+ // if the user is removed from the system and another user is added with
+ // the same name.
+ GetUID() string
+ // GetGroups returns the names of the groups the user is a member of
+ GetGroups() []string
+
+ // GetExtra can contain any additional information that the authenticator
+ // thought was interesting. One example would be scopes on a token.
+ // Keys in this map should be namespaced to the authenticator or
+ // authenticator/authorizer pair making use of them.
+ // For instance: "example.org/foo" instead of "foo"
+ // This is a map[string][]string because it needs to be serializeable into
+ // a SubjectAccessReviewSpec.authorization.k8s.io for proper authorization
+ // delegation flows
+ // In order to faithfully round-trip through an impersonation flow, these keys
+ // MUST be lowercase.
+ GetExtra() map[string][]string
+}
+
+// DefaultInfo provides a simple user information exchange object
+// for components that implement the UserInfo interface.
+type DefaultInfo struct {
+ Name string
+ UID string
+ Groups []string
+ Extra map[string][]string
+}
+
+func (i *DefaultInfo) GetName() string {
+ return i.Name
+}
+
+func (i *DefaultInfo) GetUID() string {
+ return i.UID
+}
+
+func (i *DefaultInfo) GetGroups() []string {
+ return i.Groups
+}
+
+func (i *DefaultInfo) GetExtra() map[string][]string {
+ return i.Extra
+}
+
+// well-known user and group names
+const (
+ SystemPrivilegedGroup = "system:masters"
+ NodesGroup = "system:nodes"
+ AllUnauthenticated = "system:unauthenticated"
+ AllAuthenticated = "system:authenticated"
+
+ Anonymous = "system:anonymous"
+ APIServerUser = "system:apiserver"
+
+ // core kubernetes process identities
+ KubeProxy = "system:kube-proxy"
+ KubeControllerManager = "system:kube-controller-manager"
+ KubeScheduler = "system:kube-scheduler"
+)
diff --git a/vendor/k8s.io/apiserver/pkg/features/kube_features.go b/vendor/k8s.io/apiserver/pkg/features/kube_features.go
new file mode 100644
index 000000000..1b896e1e5
--- /dev/null
+++ b/vendor/k8s.io/apiserver/pkg/features/kube_features.go
@@ -0,0 +1,56 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package features
+
+import (
+ utilfeature "k8s.io/apiserver/pkg/util/feature"
+)
+
+const (
+ // Every feature gate should add method here following this template:
+ //
+ // // owner: @username
+ // // alpha: v1.4
+ // MyFeature() bool
+
+ // owner: timstclair
+ // alpha: v1.5
+ //
+ // StreamingProxyRedirects controls whether the apiserver should intercept (and follow)
+ // redirects from the backend (Kubelet) for streaming requests (exec/attach/port-forward).
+ StreamingProxyRedirects utilfeature.Feature = "StreamingProxyRedirects"
+
+ // owner: timstclair
+ // alpha: v1.7
+ //
+ // AdvancedAuditing enables a much more general API auditing pipeline, which includes support for
+ // pluggable output backends and an audit policy specifying how different requests should be
+ // audited.
+ AdvancedAuditing utilfeature.Feature = "AdvancedAuditing"
+)
+
+func init() {
+ utilfeature.DefaultFeatureGate.Add(defaultKubernetesFeatureGates)
+}
+
+// defaultKubernetesFeatureGates consists of all known Kubernetes-specific feature keys.
+// To add a new feature, define a key for it above and add it here. The features will be
+// available throughout Kubernetes binaries.
+var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureSpec{
+ StreamingProxyRedirects: {Default: true, PreRelease: utilfeature.Beta},
+ AdvancedAuditing: {Default: false, PreRelease: utilfeature.Alpha},
+}
diff --git a/vendor/k8s.io/apiserver/pkg/server/httplog/doc.go b/vendor/k8s.io/apiserver/pkg/server/httplog/doc.go
new file mode 100644
index 000000000..caa6572c7
--- /dev/null
+++ b/vendor/k8s.io/apiserver/pkg/server/httplog/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package httplog contains a helper object and functions to maintain a log
+// along with an http response.
+package httplog // import "k8s.io/apiserver/pkg/server/httplog"
diff --git a/vendor/k8s.io/apiserver/pkg/server/httplog/log.go b/vendor/k8s.io/apiserver/pkg/server/httplog/log.go
new file mode 100644
index 000000000..4a4894cee
--- /dev/null
+++ b/vendor/k8s.io/apiserver/pkg/server/httplog/log.go
@@ -0,0 +1,225 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package httplog
+
+import (
+ "bufio"
+ "fmt"
+ "net"
+ "net/http"
+ "runtime"
+ "time"
+
+ "github.com/golang/glog"
+)
+
+// Handler wraps all HTTP calls to delegate with nice logging.
+// delegate may use LogOf(w).Addf(...) to write additional info to
+// the per-request log message.
+//
+// Intended to wrap calls to your ServeMux.
+func Handler(delegate http.Handler, pred StacktracePred) http.Handler {
+ return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
+ defer NewLogged(req, &w).StacktraceWhen(pred).Log()
+ delegate.ServeHTTP(w, req)
+ })
+}
+
+// StacktracePred returns true if a stacktrace should be logged for this status.
+type StacktracePred func(httpStatus int) (logStacktrace bool)
+
+type logger interface {
+ Addf(format string, data ...interface{})
+}
+
+// Add a layer on top of ResponseWriter, so we can track latency and error
+// message sources.
+//
+// TODO now that we're using go-restful, we shouldn't need to be wrapping
+// the http.ResponseWriter. We can recover panics from go-restful, and
+// the logging value is questionable.
+type respLogger struct {
+ hijacked bool
+ statusRecorded bool
+ status int
+ statusStack string
+ addedInfo string
+ startTime time.Time
+
+ captureErrorOutput bool
+
+ req *http.Request
+ w http.ResponseWriter
+
+ logStacktracePred StacktracePred
+}
+
+// Simple logger that logs immediately when Addf is called
+type passthroughLogger struct{}
+
+// Addf logs info immediately.
+func (passthroughLogger) Addf(format string, data ...interface{}) {
+ glog.V(2).Info(fmt.Sprintf(format, data...))
+}
+
+// DefaultStacktracePred is the default implementation of StacktracePred.
+func DefaultStacktracePred(status int) bool {
+ return (status < http.StatusOK || status >= http.StatusInternalServerError) && status != http.StatusSwitchingProtocols
+}
+
+// NewLogged turns a normal response writer into a logged response writer.
+//
+// Usage:
+//
+// defer NewLogged(req, &w).StacktraceWhen(StatusIsNot(200, 202)).Log()
+//
+// (Only the call to Log() is deferred, so you can set everything up in one line!)
+//
+// Note that this *changes* your writer, to route response writing actions
+// through the logger.
+//
+// Use LogOf(w).Addf(...) to log something along with the response result.
+func NewLogged(req *http.Request, w *http.ResponseWriter) *respLogger {
+ if _, ok := (*w).(*respLogger); ok {
+ // Don't double-wrap!
+ panic("multiple NewLogged calls!")
+ }
+ rl := &respLogger{
+ startTime: time.Now(),
+ req: req,
+ w: *w,
+ logStacktracePred: DefaultStacktracePred,
+ }
+ *w = rl // hijack caller's writer!
+ return rl
+}
+
+// LogOf returns the logger hiding in w. If there is not an existing logger
+// then a passthroughLogger will be created which will log to stdout immediately
+// when Addf is called.
+func LogOf(req *http.Request, w http.ResponseWriter) logger {
+ if _, exists := w.(*respLogger); !exists {
+ pl := &passthroughLogger{}
+ return pl
+ }
+ if rl, ok := w.(*respLogger); ok {
+ return rl
+ }
+ panic("Unable to find or create the logger!")
+}
+
+// Unlogged returns the original ResponseWriter, or w if it is not our inserted logger.
+func Unlogged(w http.ResponseWriter) http.ResponseWriter {
+ if rl, ok := w.(*respLogger); ok {
+ return rl.w
+ }
+ return w
+}
+
+// StacktraceWhen sets the stacktrace logging predicate, which decides when to log a stacktrace.
+// There's a default, so you don't need to call this unless you don't like the default.
+func (rl *respLogger) StacktraceWhen(pred StacktracePred) *respLogger {
+ rl.logStacktracePred = pred
+ return rl
+}
+
+// StatusIsNot returns a StacktracePred which will cause stacktraces to be logged
+// for any status *not* in the given list.
+func StatusIsNot(statuses ...int) StacktracePred {
+ return func(status int) bool {
+ for _, s := range statuses {
+ if status == s {
+ return false
+ }
+ }
+ return true
+ }
+}
+
+// Addf adds additional data to be logged with this request.
+func (rl *respLogger) Addf(format string, data ...interface{}) {
+ rl.addedInfo += "\n" + fmt.Sprintf(format, data...)
+}
+
+// Log is intended to be called once at the end of your request handler, via defer
+func (rl *respLogger) Log() {
+ latency := time.Since(rl.startTime)
+ if glog.V(2) {
+ if !rl.hijacked {
+ glog.InfoDepth(1, fmt.Sprintf("%s %s: (%v) %v%v%v [%s %s]", rl.req.Method, rl.req.RequestURI, latency, rl.status, rl.statusStack, rl.addedInfo, rl.req.Header["User-Agent"], rl.req.RemoteAddr))
+ } else {
+ glog.InfoDepth(1, fmt.Sprintf("%s %s: (%v) hijacked [%s %s]", rl.req.Method, rl.req.RequestURI, latency, rl.req.Header["User-Agent"], rl.req.RemoteAddr))
+ }
+ }
+}
+
+// Header implements http.ResponseWriter.
+func (rl *respLogger) Header() http.Header {
+ return rl.w.Header()
+}
+
+// Write implements http.ResponseWriter.
+func (rl *respLogger) Write(b []byte) (int, error) {
+ if !rl.statusRecorded {
+ rl.recordStatus(http.StatusOK) // Default if WriteHeader hasn't been called
+ }
+ if rl.captureErrorOutput {
+ rl.Addf("logging error output: %q\n", string(b))
+ }
+ return rl.w.Write(b)
+}
+
+// Flush implements http.Flusher even if the underlying http.Writer doesn't implement it.
+// Flush is used for streaming purposes and allows to flush buffered data to the client.
+func (rl *respLogger) Flush() {
+ if flusher, ok := rl.w.(http.Flusher); ok {
+ flusher.Flush()
+ } else if glog.V(2) {
+ glog.InfoDepth(1, fmt.Sprintf("Unable to convert %+v into http.Flusher", rl.w))
+ }
+}
+
+// WriteHeader implements http.ResponseWriter.
+func (rl *respLogger) WriteHeader(status int) {
+ rl.recordStatus(status)
+ rl.w.WriteHeader(status)
+}
+
+// Hijack implements http.Hijacker.
+func (rl *respLogger) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ rl.hijacked = true
+ return rl.w.(http.Hijacker).Hijack()
+}
+
+// CloseNotify implements http.CloseNotifier
+func (rl *respLogger) CloseNotify() <-chan bool {
+ return rl.w.(http.CloseNotifier).CloseNotify()
+}
+
+func (rl *respLogger) recordStatus(status int) {
+ rl.status = status
+ rl.statusRecorded = true
+ if rl.logStacktracePred(status) {
+ // Only log stacks for errors
+ stack := make([]byte, 50*1024)
+ stack = stack[:runtime.Stack(stack, false)]
+ rl.statusStack = "\n" + string(stack)
+ rl.captureErrorOutput = true
+ } else {
+ rl.statusStack = ""
+ }
+}
diff --git a/vendor/k8s.io/apiserver/pkg/util/feature/feature_gate.go b/vendor/k8s.io/apiserver/pkg/util/feature/feature_gate.go
new file mode 100644
index 000000000..e7226688c
--- /dev/null
+++ b/vendor/k8s.io/apiserver/pkg/util/feature/feature_gate.go
@@ -0,0 +1,211 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package feature
+
+import (
+ "fmt"
+ "sort"
+ "strconv"
+ "strings"
+
+ "github.com/golang/glog"
+ "github.com/spf13/pflag"
+)
+
+type Feature string
+
+const (
+ flagName = "feature-gates"
+
+ // allAlphaGate is a global toggle for alpha features. Per-feature key
+ // values override the default set by allAlphaGate. Examples:
+ // AllAlpha=false,NewFeature=true will result in newFeature=true
+ // AllAlpha=true,NewFeature=false will result in newFeature=false
+ allAlphaGate Feature = "AllAlpha"
+)
+
+var (
+ // The generic features.
+ defaultFeatures = map[Feature]FeatureSpec{
+ allAlphaGate: {Default: false, PreRelease: Alpha},
+ }
+
+ // Special handling for a few gates.
+ specialFeatures = map[Feature]func(f *featureGate, val bool){
+ allAlphaGate: setUnsetAlphaGates,
+ }
+
+ // DefaultFeatureGate is a shared global FeatureGate.
+ DefaultFeatureGate FeatureGate = NewFeatureGate()
+)
+
+type FeatureSpec struct {
+ Default bool
+ PreRelease prerelease
+}
+
+type prerelease string
+
+const (
+ // Values for PreRelease.
+ Alpha = prerelease("ALPHA")
+ Beta = prerelease("BETA")
+ GA = prerelease("")
+)
+
+// FeatureGate parses and stores flag gates for known features from
+// a string like feature1=true,feature2=false,...
+type FeatureGate interface {
+ AddFlag(fs *pflag.FlagSet)
+ Set(value string) error
+ Enabled(key Feature) bool
+ Add(features map[Feature]FeatureSpec) error
+ KnownFeatures() []string
+}
+
+// featureGate implements FeatureGate as well as pflag.Value for flag parsing.
+type featureGate struct {
+ known map[Feature]FeatureSpec
+ special map[Feature]func(*featureGate, bool)
+ enabled map[Feature]bool
+
+ // is set to true when AddFlag is called. Note: initialization is not go-routine safe, lookup is
+ closed bool
+}
+
+func setUnsetAlphaGates(f *featureGate, val bool) {
+ for k, v := range f.known {
+ if v.PreRelease == Alpha {
+ if _, found := f.enabled[k]; !found {
+ f.enabled[k] = val
+ }
+ }
+ }
+}
+
+// Set, String, and Type implement pflag.Value
+var _ pflag.Value = &featureGate{}
+
+func NewFeatureGate() *featureGate {
+ f := &featureGate{
+ known: map[Feature]FeatureSpec{},
+ special: specialFeatures,
+ enabled: map[Feature]bool{},
+ }
+ for k, v := range defaultFeatures {
+ f.known[k] = v
+ }
+ return f
+}
+
+// Set Parses a string of the form // "key1=value1,key2=value2,..." into a
+// map[string]bool of known keys or returns an error.
+func (f *featureGate) Set(value string) error {
+ for _, s := range strings.Split(value, ",") {
+ if len(s) == 0 {
+ continue
+ }
+ arr := strings.SplitN(s, "=", 2)
+ k := Feature(strings.TrimSpace(arr[0]))
+ _, ok := f.known[Feature(k)]
+ if !ok {
+ return fmt.Errorf("unrecognized key: %s", k)
+ }
+ if len(arr) != 2 {
+ return fmt.Errorf("missing bool value for %s", k)
+ }
+ v := strings.TrimSpace(arr[1])
+ boolValue, err := strconv.ParseBool(v)
+ if err != nil {
+ return fmt.Errorf("invalid value of %s: %s, err: %v", k, v, err)
+ }
+ f.enabled[k] = boolValue
+
+ // Handle "special" features like "all alpha gates"
+ if fn, found := f.special[k]; found {
+ fn(f, boolValue)
+ }
+ }
+
+ glog.Infof("feature gates: %v", f.enabled)
+ return nil
+}
+
+func (f *featureGate) String() string {
+ pairs := []string{}
+ for k, v := range f.enabled {
+ pairs = append(pairs, fmt.Sprintf("%s=%t", k, v))
+ }
+ sort.Strings(pairs)
+ return strings.Join(pairs, ",")
+}
+
+func (f *featureGate) Type() string {
+ return "mapStringBool"
+}
+
+func (f *featureGate) Add(features map[Feature]FeatureSpec) error {
+ if f.closed {
+ return fmt.Errorf("cannot add a feature gate after adding it to the flag set")
+ }
+
+ for name, spec := range features {
+ if existingSpec, found := f.known[name]; found {
+ if existingSpec == spec {
+ continue
+ }
+ return fmt.Errorf("feature gate %q with different spec already exists: %v", name, existingSpec)
+ }
+
+ f.known[name] = spec
+ }
+ return nil
+}
+
+func (f *featureGate) Enabled(key Feature) bool {
+ defaultValue := f.known[key].Default
+ if f.enabled != nil {
+ if v, ok := f.enabled[key]; ok {
+ return v
+ }
+ }
+ return defaultValue
+}
+
+// AddFlag adds a flag for setting global feature gates to the specified FlagSet.
+func (f *featureGate) AddFlag(fs *pflag.FlagSet) {
+ f.closed = true
+
+ known := f.KnownFeatures()
+ fs.Var(f, flagName, ""+
+ "A set of key=value pairs that describe feature gates for alpha/experimental features. "+
+ "Options are:\n"+strings.Join(known, "\n"))
+}
+
+// Returns a string describing the FeatureGate's known features.
+func (f *featureGate) KnownFeatures() []string {
+ var known []string
+ for k, v := range f.known {
+ pre := ""
+ if v.PreRelease != GA {
+ pre = fmt.Sprintf("%s - ", v.PreRelease)
+ }
+ known = append(known, fmt.Sprintf("%s=true|false (%sdefault=%t)", k, pre, v.Default))
+ }
+ sort.Strings(known)
+ return known
+}
diff --git a/vendor/k8s.io/apiserver/pkg/util/wsstream/conn.go b/vendor/k8s.io/apiserver/pkg/util/wsstream/conn.go
new file mode 100644
index 000000000..f01638ad6
--- /dev/null
+++ b/vendor/k8s.io/apiserver/pkg/util/wsstream/conn.go
@@ -0,0 +1,349 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package wsstream
+
+import (
+ "encoding/base64"
+ "fmt"
+ "io"
+ "net/http"
+ "regexp"
+ "strings"
+ "time"
+
+ "github.com/golang/glog"
+ "golang.org/x/net/websocket"
+
+ "k8s.io/apimachinery/pkg/util/runtime"
+)
+
+// The Websocket subprotocol "channel.k8s.io" prepends each binary message with a byte indicating
+// the channel number (zero indexed) the message was sent on. Messages in both directions should
+// prefix their messages with this channel byte. When used for remote execution, the channel numbers
+// are by convention defined to match the POSIX file-descriptors assigned to STDIN, STDOUT, and STDERR
+// (0, 1, and 2). No other conversion is performed on the raw subprotocol - writes are sent as they
+// are received by the server.
+//
+// Example client session:
+//
+// CONNECT http://server.com with subprotocol "channel.k8s.io"
+// WRITE []byte{0, 102, 111, 111, 10} # send "foo\n" on channel 0 (STDIN)
+// READ []byte{1, 10} # receive "\n" on channel 1 (STDOUT)
+// CLOSE
+//
+const ChannelWebSocketProtocol = "channel.k8s.io"
+
+// The Websocket subprotocol "base64.channel.k8s.io" base64 encodes each message with a character
+// indicating the channel number (zero indexed) the message was sent on. Messages in both directions
+// should prefix their messages with this channel char. When used for remote execution, the channel
+// numbers are by convention defined to match the POSIX file-descriptors assigned to STDIN, STDOUT,
+// and STDERR ('0', '1', and '2'). The data received on the server is base64 decoded (and must be
+// be valid) and data written by the server to the client is base64 encoded.
+//
+// Example client session:
+//
+// CONNECT http://server.com with subprotocol "base64.channel.k8s.io"
+// WRITE []byte{48, 90, 109, 57, 118, 67, 103, 111, 61} # send "foo\n" (base64: "Zm9vCgo=") on channel '0' (STDIN)
+// READ []byte{49, 67, 103, 61, 61} # receive "\n" (base64: "Cg==") on channel '1' (STDOUT)
+// CLOSE
+//
+const Base64ChannelWebSocketProtocol = "base64.channel.k8s.io"
+
+type codecType int
+
+const (
+ rawCodec codecType = iota
+ base64Codec
+)
+
+type ChannelType int
+
+const (
+ IgnoreChannel ChannelType = iota
+ ReadChannel
+ WriteChannel
+ ReadWriteChannel
+)
+
+var (
+ // connectionUpgradeRegex matches any Connection header value that includes upgrade
+ connectionUpgradeRegex = regexp.MustCompile("(^|.*,\\s*)upgrade($|\\s*,)")
+)
+
+// IsWebSocketRequest returns true if the incoming request contains connection upgrade headers
+// for WebSockets.
+func IsWebSocketRequest(req *http.Request) bool {
+ return connectionUpgradeRegex.MatchString(strings.ToLower(req.Header.Get("Connection"))) && strings.ToLower(req.Header.Get("Upgrade")) == "websocket"
+}
+
+// IgnoreReceives reads from a WebSocket until it is closed, then returns. If timeout is set, the
+// read and write deadlines are pushed every time a new message is received.
+func IgnoreReceives(ws *websocket.Conn, timeout time.Duration) {
+ defer runtime.HandleCrash()
+ var data []byte
+ for {
+ resetTimeout(ws, timeout)
+ if err := websocket.Message.Receive(ws, &data); err != nil {
+ return
+ }
+ }
+}
+
+// handshake ensures the provided user protocol matches one of the allowed protocols. It returns
+// no error if no protocol is specified.
+func handshake(config *websocket.Config, req *http.Request, allowed []string) error {
+ protocols := config.Protocol
+ if len(protocols) == 0 {
+ protocols = []string{""}
+ }
+
+ for _, protocol := range protocols {
+ for _, allow := range allowed {
+ if allow == protocol {
+ config.Protocol = []string{protocol}
+ return nil
+ }
+ }
+ }
+
+ return fmt.Errorf("requested protocol(s) are not supported: %v; supports %v", config.Protocol, allowed)
+}
+
+// ChannelProtocolConfig describes a websocket subprotocol with channels.
+type ChannelProtocolConfig struct {
+ Binary bool
+ Channels []ChannelType
+}
+
+// NewDefaultChannelProtocols returns a channel protocol map with the
+// subprotocols "", "channel.k8s.io", "base64.channel.k8s.io" and the given
+// channels.
+func NewDefaultChannelProtocols(channels []ChannelType) map[string]ChannelProtocolConfig {
+ return map[string]ChannelProtocolConfig{
+ "": {Binary: true, Channels: channels},
+ ChannelWebSocketProtocol: {Binary: true, Channels: channels},
+ Base64ChannelWebSocketProtocol: {Binary: false, Channels: channels},
+ }
+}
+
+// Conn supports sending multiple binary channels over a websocket connection.
+type Conn struct {
+ protocols map[string]ChannelProtocolConfig
+ selectedProtocol string
+ channels []*websocketChannel
+ codec codecType
+ ready chan struct{}
+ ws *websocket.Conn
+ timeout time.Duration
+}
+
+// NewConn creates a WebSocket connection that supports a set of channels. Channels begin each
+// web socket message with a single byte indicating the channel number (0-N). 255 is reserved for
+// future use. The channel types for each channel are passed as an array, supporting the different
+// duplex modes. Read and Write refer to whether the channel can be used as a Reader or Writer.
+//
+// The protocols parameter maps subprotocol names to ChannelProtocols. The empty string subprotocol
+// name is used if websocket.Config.Protocol is empty.
+func NewConn(protocols map[string]ChannelProtocolConfig) *Conn {
+ return &Conn{
+ ready: make(chan struct{}),
+ protocols: protocols,
+ }
+}
+
+// SetIdleTimeout sets the interval for both reads and writes before timeout. If not specified,
+// there is no timeout on the connection.
+func (conn *Conn) SetIdleTimeout(duration time.Duration) {
+ conn.timeout = duration
+}
+
+// Open the connection and create channels for reading and writing. It returns
+// the selected subprotocol, a slice of channels and an error.
+func (conn *Conn) Open(w http.ResponseWriter, req *http.Request) (string, []io.ReadWriteCloser, error) {
+ go func() {
+ defer runtime.HandleCrash()
+ defer conn.Close()
+ websocket.Server{Handshake: conn.handshake, Handler: conn.handle}.ServeHTTP(w, req)
+ }()
+ <-conn.ready
+ rwc := make([]io.ReadWriteCloser, len(conn.channels))
+ for i := range conn.channels {
+ rwc[i] = conn.channels[i]
+ }
+ return conn.selectedProtocol, rwc, nil
+}
+
+func (conn *Conn) initialize(ws *websocket.Conn) {
+ negotiated := ws.Config().Protocol
+ conn.selectedProtocol = negotiated[0]
+ p := conn.protocols[conn.selectedProtocol]
+ if p.Binary {
+ conn.codec = rawCodec
+ } else {
+ conn.codec = base64Codec
+ }
+ conn.ws = ws
+ conn.channels = make([]*websocketChannel, len(p.Channels))
+ for i, t := range p.Channels {
+ switch t {
+ case ReadChannel:
+ conn.channels[i] = newWebsocketChannel(conn, byte(i), true, false)
+ case WriteChannel:
+ conn.channels[i] = newWebsocketChannel(conn, byte(i), false, true)
+ case ReadWriteChannel:
+ conn.channels[i] = newWebsocketChannel(conn, byte(i), true, true)
+ case IgnoreChannel:
+ conn.channels[i] = newWebsocketChannel(conn, byte(i), false, false)
+ }
+ }
+
+ close(conn.ready)
+}
+
+func (conn *Conn) handshake(config *websocket.Config, req *http.Request) error {
+ supportedProtocols := make([]string, 0, len(conn.protocols))
+ for p := range conn.protocols {
+ supportedProtocols = append(supportedProtocols, p)
+ }
+ return handshake(config, req, supportedProtocols)
+}
+
+func (conn *Conn) resetTimeout() {
+ if conn.timeout > 0 {
+ conn.ws.SetDeadline(time.Now().Add(conn.timeout))
+ }
+}
+
+// Close is only valid after Open has been called
+func (conn *Conn) Close() error {
+ <-conn.ready
+ for _, s := range conn.channels {
+ s.Close()
+ }
+ conn.ws.Close()
+ return nil
+}
+
+// handle implements a websocket handler.
+func (conn *Conn) handle(ws *websocket.Conn) {
+ defer conn.Close()
+ conn.initialize(ws)
+
+ for {
+ conn.resetTimeout()
+ var data []byte
+ if err := websocket.Message.Receive(ws, &data); err != nil {
+ if err != io.EOF {
+ glog.Errorf("Error on socket receive: %v", err)
+ }
+ break
+ }
+ if len(data) == 0 {
+ continue
+ }
+ channel := data[0]
+ if conn.codec == base64Codec {
+ channel = channel - '0'
+ }
+ data = data[1:]
+ if int(channel) >= len(conn.channels) {
+ glog.V(6).Infof("Frame is targeted for a reader %d that is not valid, possible protocol error", channel)
+ continue
+ }
+ if _, err := conn.channels[channel].DataFromSocket(data); err != nil {
+ glog.Errorf("Unable to write frame to %d: %v\n%s", channel, err, string(data))
+ continue
+ }
+ }
+}
+
+// write multiplexes the specified channel onto the websocket
+func (conn *Conn) write(num byte, data []byte) (int, error) {
+ conn.resetTimeout()
+ switch conn.codec {
+ case rawCodec:
+ frame := make([]byte, len(data)+1)
+ frame[0] = num
+ copy(frame[1:], data)
+ if err := websocket.Message.Send(conn.ws, frame); err != nil {
+ return 0, err
+ }
+ case base64Codec:
+ frame := string('0'+num) + base64.StdEncoding.EncodeToString(data)
+ if err := websocket.Message.Send(conn.ws, frame); err != nil {
+ return 0, err
+ }
+ }
+ return len(data), nil
+}
+
+// websocketChannel represents a channel in a connection
+type websocketChannel struct {
+ conn *Conn
+ num byte
+ r io.Reader
+ w io.WriteCloser
+
+ read, write bool
+}
+
+// newWebsocketChannel creates a pipe for writing to a websocket. Do not write to this pipe
+// prior to the connection being opened. It may be no, half, or full duplex depending on
+// read and write.
+func newWebsocketChannel(conn *Conn, num byte, read, write bool) *websocketChannel {
+ r, w := io.Pipe()
+ return &websocketChannel{conn, num, r, w, read, write}
+}
+
+func (p *websocketChannel) Write(data []byte) (int, error) {
+ if !p.write {
+ return len(data), nil
+ }
+ return p.conn.write(p.num, data)
+}
+
+// DataFromSocket is invoked by the connection receiver to move data from the connection
+// into a specific channel.
+func (p *websocketChannel) DataFromSocket(data []byte) (int, error) {
+ if !p.read {
+ return len(data), nil
+ }
+
+ switch p.conn.codec {
+ case rawCodec:
+ return p.w.Write(data)
+ case base64Codec:
+ dst := make([]byte, len(data))
+ n, err := base64.StdEncoding.Decode(dst, data)
+ if err != nil {
+ return 0, err
+ }
+ return p.w.Write(dst[:n])
+ }
+ return 0, nil
+}
+
+func (p *websocketChannel) Read(data []byte) (int, error) {
+ if !p.read {
+ return 0, io.EOF
+ }
+ return p.r.Read(data)
+}
+
+func (p *websocketChannel) Close() error {
+ return p.w.Close()
+}
diff --git a/vendor/k8s.io/apiserver/pkg/util/wsstream/doc.go b/vendor/k8s.io/apiserver/pkg/util/wsstream/doc.go
new file mode 100644
index 000000000..694ce81d2
--- /dev/null
+++ b/vendor/k8s.io/apiserver/pkg/util/wsstream/doc.go
@@ -0,0 +1,21 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package wsstream contains utilities for streaming content over WebSockets.
+// The Conn type allows callers to multiplex multiple read/write channels over
+// a single websocket. The Reader type allows an io.Reader to be copied over
+// a websocket channel as binary content.
+package wsstream // import "k8s.io/apiserver/pkg/util/wsstream"
diff --git a/vendor/k8s.io/apiserver/pkg/util/wsstream/stream.go b/vendor/k8s.io/apiserver/pkg/util/wsstream/stream.go
new file mode 100644
index 000000000..9dd165bfa
--- /dev/null
+++ b/vendor/k8s.io/apiserver/pkg/util/wsstream/stream.go
@@ -0,0 +1,177 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package wsstream
+
+import (
+ "encoding/base64"
+ "io"
+ "net/http"
+ "sync"
+ "time"
+
+ "golang.org/x/net/websocket"
+
+ "k8s.io/apimachinery/pkg/util/runtime"
+)
+
+// The WebSocket subprotocol "binary.k8s.io" will only send messages to the
+// client and ignore messages sent to the server. The received messages are
+// the exact bytes written to the stream. Zero byte messages are possible.
+const binaryWebSocketProtocol = "binary.k8s.io"
+
+// The WebSocket subprotocol "base64.binary.k8s.io" will only send messages to the
+// client and ignore messages sent to the server. The received messages are
+// a base64 version of the bytes written to the stream. Zero byte messages are
+// possible.
+const base64BinaryWebSocketProtocol = "base64.binary.k8s.io"
+
+// ReaderProtocolConfig describes a websocket subprotocol with one stream.
+type ReaderProtocolConfig struct {
+ Binary bool
+}
+
+// NewDefaultReaderProtocols returns a stream protocol map with the
+// subprotocols "", "channel.k8s.io", "base64.channel.k8s.io".
+func NewDefaultReaderProtocols() map[string]ReaderProtocolConfig {
+ return map[string]ReaderProtocolConfig{
+ "": {Binary: true},
+ binaryWebSocketProtocol: {Binary: true},
+ base64BinaryWebSocketProtocol: {Binary: false},
+ }
+}
+
+// Reader supports returning an arbitrary byte stream over a websocket channel.
+type Reader struct {
+ err chan error
+ r io.Reader
+ ping bool
+ timeout time.Duration
+ protocols map[string]ReaderProtocolConfig
+ selectedProtocol string
+
+ handleCrash func() // overridable for testing
+}
+
+// NewReader creates a WebSocket pipe that will copy the contents of r to a provided
+// WebSocket connection. If ping is true, a zero length message will be sent to the client
+// before the stream begins reading.
+//
+// The protocols parameter maps subprotocol names to StreamProtocols. The empty string
+// subprotocol name is used if websocket.Config.Protocol is empty.
+func NewReader(r io.Reader, ping bool, protocols map[string]ReaderProtocolConfig) *Reader {
+ return &Reader{
+ r: r,
+ err: make(chan error),
+ ping: ping,
+ protocols: protocols,
+ handleCrash: func() { runtime.HandleCrash() },
+ }
+}
+
+// SetIdleTimeout sets the interval for both reads and writes before timeout. If not specified,
+// there is no timeout on the reader.
+func (r *Reader) SetIdleTimeout(duration time.Duration) {
+ r.timeout = duration
+}
+
+func (r *Reader) handshake(config *websocket.Config, req *http.Request) error {
+ supportedProtocols := make([]string, 0, len(r.protocols))
+ for p := range r.protocols {
+ supportedProtocols = append(supportedProtocols, p)
+ }
+ return handshake(config, req, supportedProtocols)
+}
+
+// Copy the reader to the response. The created WebSocket is closed after this
+// method completes.
+func (r *Reader) Copy(w http.ResponseWriter, req *http.Request) error {
+ go func() {
+ defer r.handleCrash()
+ websocket.Server{Handshake: r.handshake, Handler: r.handle}.ServeHTTP(w, req)
+ }()
+ return <-r.err
+}
+
+// handle implements a WebSocket handler.
+func (r *Reader) handle(ws *websocket.Conn) {
+ // Close the connection when the client requests it, or when we finish streaming, whichever happens first
+ closeConnOnce := &sync.Once{}
+ closeConn := func() {
+ closeConnOnce.Do(func() {
+ ws.Close()
+ })
+ }
+
+ negotiated := ws.Config().Protocol
+ r.selectedProtocol = negotiated[0]
+ defer close(r.err)
+ defer closeConn()
+
+ go func() {
+ defer runtime.HandleCrash()
+ // This blocks until the connection is closed.
+ // Client should not send anything.
+ IgnoreReceives(ws, r.timeout)
+ // Once the client closes, we should also close
+ closeConn()
+ }()
+
+ r.err <- messageCopy(ws, r.r, !r.protocols[r.selectedProtocol].Binary, r.ping, r.timeout)
+}
+
+func resetTimeout(ws *websocket.Conn, timeout time.Duration) {
+ if timeout > 0 {
+ ws.SetDeadline(time.Now().Add(timeout))
+ }
+}
+
+func messageCopy(ws *websocket.Conn, r io.Reader, base64Encode, ping bool, timeout time.Duration) error {
+ buf := make([]byte, 2048)
+ if ping {
+ resetTimeout(ws, timeout)
+ if base64Encode {
+ if err := websocket.Message.Send(ws, ""); err != nil {
+ return err
+ }
+ } else {
+ if err := websocket.Message.Send(ws, []byte{}); err != nil {
+ return err
+ }
+ }
+ }
+ for {
+ resetTimeout(ws, timeout)
+ n, err := r.Read(buf)
+ if err != nil {
+ if err == io.EOF {
+ return nil
+ }
+ return err
+ }
+ if n > 0 {
+ if base64Encode {
+ if err := websocket.Message.Send(ws, base64.StdEncoding.EncodeToString(buf[:n])); err != nil {
+ return err
+ }
+ } else {
+ if err := websocket.Message.Send(ws, buf[:n]); err != nil {
+ return err
+ }
+ }
+ }
+ }
+}
diff --git a/vendor/k8s.io/client-go/LICENSE b/vendor/k8s.io/client-go/LICENSE
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/vendor/k8s.io/client-go/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/k8s.io/client-go/README.md b/vendor/k8s.io/client-go/README.md
new file mode 100644
index 000000000..48fe02fa8
--- /dev/null
+++ b/vendor/k8s.io/client-go/README.md
@@ -0,0 +1,149 @@
+# client-go
+
+Go clients for talking to a [kubernetes](http://kubernetes.io/) cluster.
+
+We currently recommend using the v2.0.0 tag. See [INSTALL.md](/INSTALL.md) for
+detailed installation instructions. `go get k8s.io/client-go/...` works, but
+will give you head and doesn't handle the dependencies well.
+
+[![Build Status](https://travis-ci.org/kubernetes/client-go.svg?branch=master)](https://travis-ci.org/kubernetes/client-go)
+[![GoDoc](https://godoc.org/k8s.io/client-go?status.svg)](https://godoc.org/k8s.io/client-go)
+
+## Table of Contents
+
+- [What's included](#whats-included)
+- [Versioning](#versioning)
+ - [Compatibility: your code <-> client-go](#compatibility-your-code---client-go)
+ - [Compatibility: client-go <-> Kubernetes clusters](#compatibility-client-go---kubernetes-clusters)
+ - [Compatibility matrix](#compatibility-matrix)
+ - [Why do the 1.4 and 1.5 branch contain top-level folder named after the version?](#why-do-the-14-and-15-branch-contain-top-level-folder-named-after-the-version)
+- [How to get it](#how-to-get-it)
+- [How to use it](#how-to-use-it)
+- [Dependency management](#dependency-management)
+- [Contributing code](#contributing-code)
+
+### What's included
+
+* The `kubernetes` package contains the clientset to access Kubernetes API.
+* The `discovery` package is used to discover APIs supported by a Kubernetes API server.
+* The `dynamic` package contains a dynamic client that can perform generic operations on arbitrary Kubernetes API objects.
+* The `transport` package is used to set up auth and start a connection.
+* The `tools/cache` package is useful for writing controllers.
+
+### Versioning
+
+`client-go` follows [semver](http://semver.org/). We will not make
+backwards-incompatible changes without incrementing the major version number. A
+change is backwards-incompatible either if it *i)* changes the public interfaces
+of `client-go`, or *ii)* makes `client-go` incompatible with otherwise supported
+versions of Kubernetes clusters.
+
+Changes that add features in a backwards-compatible way will result in bumping
+the minor version (second digit) number.
+
+Bugfixes will result in the patch version (third digit) changing. PRs that are
+cherry-picked into an older Kubernetes release branch will result in an update
+to the corresponding branch in `client-go`, with a corresponding new tag
+changing the patch version.
+
+A consequence of this is that `client-go` version numbers will be unrelated to
+Kubernetes version numbers.
+
+#### Branches and tags.
+
+We will create a new branch and tag for each increment in the major version number or
+minor version number. We will create only a new tag for each increment in the patch
+version number. See [semver](http://semver.org/) for definitions of major,
+minor, and patch.
+
+The master branch will track HEAD in the main Kubernetes repo and
+accumulate changes. Consider HEAD to have the version `x.(y+1).0-alpha` or
+`(x+1).0.0-alpha` (depending on whether it has accumulated a breaking change or
+not), where `x` and `y` are the current major and minor versions.
+
+#### Compatibility: your code <-> client-go
+
+`client-go` follows [semver](http://semver.org/), so until the major version of
+client-go gets increased, your code will compile and will continue to work with
+explicitly supported versions of Kubernetes clusters. You must use a dependency
+management system and pin a specific major version of `client-go` to get this
+benefit, as HEAD follows the upstream Kubernetes repo.
+
+#### Compatibility: client-go <-> Kubernetes clusters
+
+Since Kubernetes is backwards compatible with clients, older `client-go`
+versions will work with many different Kubernetes cluster versions.
+
+We will backport bugfixes--but not new features--into older versions of
+`client-go`.
+
+
+#### Compatibility matrix
+
+| | Kubernetes 1.3 | Kubernetes 1.4 | Kubernetes 1.5 | Kubernetes 1.6 |
+|---------------------|----------------|----------------|----------------|----------------|
+| client-go 1.4 | + | ✓ | - | - |
+| client-go 1.5 | + | + | - | - |
+| client-go 2.0 | + | + | ✓ | - |
+| client-go 3.0 beta | + | + | + | ✓ |
+| client-go HEAD | + | + | + | + |
+
+Key:
+
+* `✓` Exactly the same features / API objects in both client-go and the Kubernetes
+ version.
+* `+` client-go has features or api objects that may not be present in the
+ Kubernetes cluster, but everything they have in common will work.
+* `-` The Kubernetes cluster has features the client-go library can't use
+ (additional API objects, etc).
+
+See the [CHANGELOG](./CHANGELOG.md) for a detailed description of changes
+between client-go versions.
+
+| Branch | Canonical source code location | Maintenance status |
+|----------------|--------------------------------------|-------------------------------|
+| client-go 1.4 | Kubernetes main repo, 1.4 branch | = - |
+| client-go 1.5 | Kubernetes main repo, 1.5 branch | = - |
+| client-go 2.0 | Kubernetes main repo, 1.5 branch | ✓ |
+| client-go 3.0 | Kubernetes main repo, 1.6 branch | ✓ |
+| client-go HEAD | Kubernetes main repo, master branch | ✓ |
+
+Key:
+
+* `✓` Changes in main Kubernetes repo are actively published to client-go by a bot
+* `=` Maintenance is manual, only severe security bugs will be patched.
+* `-` Deprecated; please upgrade.
+
+#### Deprecation policy
+
+We will maintain branches for at least six months after their first stable tag
+is cut. (E.g., the clock for the release-2.0 branch started ticking when we
+tagged v2.0.0, not when we made the first alpha.) This policy applies to
+every version greater than or equal to 2.0.
+
+#### Why do the 1.4 and 1.5 branch contain top-level folder named after the version?
+
+For the initial release of client-go, we thought it would be easiest to keep
+separate directories for each minor version. That soon proved to be a mistake.
+We are keeping the top-level folders in the 1.4 and 1.5 branches so that
+existing users won't be broken.
+
+### How to get it
+
+You can use `go get k8s.io/client-go/...` to get client-go, but **you will get
+the unstable master branch** and `client-go`'s vendored dependencies will not be
+added to your `$GOPATH`. So we think most users will want to use a dependency
+management system. See [INSTALL.md](/INSTALL.md) for detailed instructions.
+
+### How to use it
+
+If your application runs in a Pod in the cluster, please refer to the in-cluster [example](examples/in-cluster/main.go), otherwise please refer to the out-of-cluster [example](examples/out-of-cluster/main.go).
+
+### Dependency management
+
+If your application depends on a package that client-go depends on, and you let the Go compiler find the dependency in `GOPATH`, you will end up with duplicated dependencies: one copy from the `GOPATH`, and one from the vendor folder of client-go. This will cause unexpected runtime error like flag redefinition, since the go compiler ends up importing both packages separately, even if they are exactly the same thing. If this happens, you can either
+* run `godep restore` ([godep](https://github.com/tools/godep)) in the client-go/ folder, then remove the vendor folder of client-go. Then the packages in your GOPATH will be the only copy
+* or run `godep save` in your application folder to flatten all dependencies.
+
+### Contributing code
+Please send pull requests against the client packages in the Kubernetes main [repository](https://github.com/kubernetes/kubernetes), and run the `/staging/copy.sh` script to update the staging area in the main repository. Changes in the staging area will be published to this repository every day.
diff --git a/vendor/k8s.io/client-go/discovery/discovery_client.go b/vendor/k8s.io/client-go/discovery/discovery_client.go
new file mode 100644
index 000000000..011dd9ecf
--- /dev/null
+++ b/vendor/k8s.io/client-go/discovery/discovery_client.go
@@ -0,0 +1,455 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package discovery
+
+import (
+ "encoding/json"
+ "fmt"
+ "net/url"
+ "sort"
+ "strings"
+
+ "github.com/emicklei/go-restful-swagger12"
+
+ "github.com/go-openapi/loads"
+ "github.com/go-openapi/spec"
+ "k8s.io/apimachinery/pkg/api/errors"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/runtime/serializer"
+ "k8s.io/apimachinery/pkg/version"
+ "k8s.io/client-go/kubernetes/scheme"
+ "k8s.io/client-go/pkg/api/v1"
+ restclient "k8s.io/client-go/rest"
+)
+
+// defaultRetries is the number of times a resource discovery is repeated if an api group disappears on the fly (e.g. ThirdPartyResources).
+const defaultRetries = 2
+
+// DiscoveryInterface holds the methods that discover server-supported API groups,
+// versions and resources.
+type DiscoveryInterface interface {
+ RESTClient() restclient.Interface
+ ServerGroupsInterface
+ ServerResourcesInterface
+ ServerVersionInterface
+ SwaggerSchemaInterface
+ OpenAPISchemaInterface
+}
+
+// CachedDiscoveryInterface is a DiscoveryInterface with cache invalidation and freshness.
+type CachedDiscoveryInterface interface {
+ DiscoveryInterface
+ // Fresh returns true if no cached data was used that had been retrieved before the instantiation.
+ Fresh() bool
+ // Invalidate enforces that no cached data is used in the future that is older than the current time.
+ Invalidate()
+}
+
+// ServerGroupsInterface has methods for obtaining supported groups on the API server
+type ServerGroupsInterface interface {
+ // ServerGroups returns the supported groups, with information like supported versions and the
+ // preferred version.
+ ServerGroups() (*metav1.APIGroupList, error)
+}
+
+// ServerResourcesInterface has methods for obtaining supported resources on the API server
+type ServerResourcesInterface interface {
+ // ServerResourcesForGroupVersion returns the supported resources for a group and version.
+ ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error)
+ // ServerResources returns the supported resources for all groups and versions.
+ ServerResources() ([]*metav1.APIResourceList, error)
+ // ServerPreferredResources returns the supported resources with the version preferred by the
+ // server.
+ ServerPreferredResources() ([]*metav1.APIResourceList, error)
+ // ServerPreferredNamespacedResources returns the supported namespaced resources with the
+ // version preferred by the server.
+ ServerPreferredNamespacedResources() ([]*metav1.APIResourceList, error)
+}
+
+// ServerVersionInterface has a method for retrieving the server's version.
+type ServerVersionInterface interface {
+ // ServerVersion retrieves and parses the server's version (git version).
+ ServerVersion() (*version.Info, error)
+}
+
+// SwaggerSchemaInterface has a method to retrieve the swagger schema.
+type SwaggerSchemaInterface interface {
+ // SwaggerSchema retrieves and parses the swagger API schema the server supports.
+ SwaggerSchema(version schema.GroupVersion) (*swagger.ApiDeclaration, error)
+}
+
+// OpenAPISchemaInterface has a method to retrieve the open API schema.
+type OpenAPISchemaInterface interface {
+ // OpenAPISchema retrieves and parses the swagger API schema the server supports.
+ OpenAPISchema() (*spec.Swagger, error)
+}
+
+// DiscoveryClient implements the functions that discover server-supported API groups,
+// versions and resources.
+type DiscoveryClient struct {
+ restClient restclient.Interface
+
+ LegacyPrefix string
+}
+
+// Convert metav1.APIVersions to metav1.APIGroup. APIVersions is used by legacy v1, so
+// group would be "".
+func apiVersionsToAPIGroup(apiVersions *metav1.APIVersions) (apiGroup metav1.APIGroup) {
+ groupVersions := []metav1.GroupVersionForDiscovery{}
+ for _, version := range apiVersions.Versions {
+ groupVersion := metav1.GroupVersionForDiscovery{
+ GroupVersion: version,
+ Version: version,
+ }
+ groupVersions = append(groupVersions, groupVersion)
+ }
+ apiGroup.Versions = groupVersions
+ // There should be only one groupVersion returned at /api
+ apiGroup.PreferredVersion = groupVersions[0]
+ return
+}
+
+// ServerGroups returns the supported groups, with information like supported versions and the
+// preferred version.
+func (d *DiscoveryClient) ServerGroups() (apiGroupList *metav1.APIGroupList, err error) {
+ // Get the groupVersions exposed at /api
+ v := &metav1.APIVersions{}
+ err = d.restClient.Get().AbsPath(d.LegacyPrefix).Do().Into(v)
+ apiGroup := metav1.APIGroup{}
+ if err == nil && len(v.Versions) != 0 {
+ apiGroup = apiVersionsToAPIGroup(v)
+ }
+ if err != nil && !errors.IsNotFound(err) && !errors.IsForbidden(err) {
+ return nil, err
+ }
+
+ // Get the groupVersions exposed at /apis
+ apiGroupList = &metav1.APIGroupList{}
+ err = d.restClient.Get().AbsPath("/apis").Do().Into(apiGroupList)
+ if err != nil && !errors.IsNotFound(err) && !errors.IsForbidden(err) {
+ return nil, err
+ }
+ // to be compatible with a v1.0 server, if it's a 403 or 404, ignore and return whatever we got from /api
+ if err != nil && (errors.IsNotFound(err) || errors.IsForbidden(err)) {
+ apiGroupList = &metav1.APIGroupList{}
+ }
+
+ // append the group retrieved from /api to the list if not empty
+ if len(v.Versions) != 0 {
+ apiGroupList.Groups = append(apiGroupList.Groups, apiGroup)
+ }
+ return apiGroupList, nil
+}
+
+// ServerResourcesForGroupVersion returns the supported resources for a group and version.
+func (d *DiscoveryClient) ServerResourcesForGroupVersion(groupVersion string) (resources *metav1.APIResourceList, err error) {
+ url := url.URL{}
+ if len(groupVersion) == 0 {
+ return nil, fmt.Errorf("groupVersion shouldn't be empty")
+ }
+ if len(d.LegacyPrefix) > 0 && groupVersion == "v1" {
+ url.Path = d.LegacyPrefix + "/" + groupVersion
+ } else {
+ url.Path = "/apis/" + groupVersion
+ }
+ resources = &metav1.APIResourceList{
+ GroupVersion: groupVersion,
+ }
+ err = d.restClient.Get().AbsPath(url.String()).Do().Into(resources)
+ if err != nil {
+ // ignore 403 or 404 error to be compatible with an v1.0 server.
+ if groupVersion == "v1" && (errors.IsNotFound(err) || errors.IsForbidden(err)) {
+ return resources, nil
+ }
+ return nil, err
+ }
+ return resources, nil
+}
+
+// serverResources returns the supported resources for all groups and versions.
+func (d *DiscoveryClient) serverResources() ([]*metav1.APIResourceList, error) {
+ apiGroups, err := d.ServerGroups()
+ if err != nil {
+ return nil, err
+ }
+
+ result := []*metav1.APIResourceList{}
+ failedGroups := make(map[schema.GroupVersion]error)
+
+ for _, apiGroup := range apiGroups.Groups {
+ for _, version := range apiGroup.Versions {
+ gv := schema.GroupVersion{Group: apiGroup.Name, Version: version.Version}
+ resources, err := d.ServerResourcesForGroupVersion(version.GroupVersion)
+ if err != nil {
+ // TODO: maybe restrict this to NotFound errors
+ failedGroups[gv] = err
+ continue
+ }
+
+ result = append(result, resources)
+ }
+ }
+
+ if len(failedGroups) == 0 {
+ return result, nil
+ }
+
+ return result, &ErrGroupDiscoveryFailed{Groups: failedGroups}
+}
+
+// ServerResources returns the supported resources for all groups and versions.
+func (d *DiscoveryClient) ServerResources() ([]*metav1.APIResourceList, error) {
+ return withRetries(defaultRetries, d.serverResources)
+}
+
+// ErrGroupDiscoveryFailed is returned if one or more API groups fail to load.
+type ErrGroupDiscoveryFailed struct {
+ // Groups is a list of the groups that failed to load and the error cause
+ Groups map[schema.GroupVersion]error
+}
+
+// Error implements the error interface
+func (e *ErrGroupDiscoveryFailed) Error() string {
+ var groups []string
+ for k, v := range e.Groups {
+ groups = append(groups, fmt.Sprintf("%s: %v", k, v))
+ }
+ sort.Strings(groups)
+ return fmt.Sprintf("unable to retrieve the complete list of server APIs: %s", strings.Join(groups, ", "))
+}
+
+// IsGroupDiscoveryFailedError returns true if the provided error indicates the server was unable to discover
+// a complete list of APIs for the client to use.
+func IsGroupDiscoveryFailedError(err error) bool {
+ _, ok := err.(*ErrGroupDiscoveryFailed)
+ return err != nil && ok
+}
+
+// serverPreferredResources returns the supported resources with the version preferred by the server.
+func (d *DiscoveryClient) serverPreferredResources() ([]*metav1.APIResourceList, error) {
+ serverGroupList, err := d.ServerGroups()
+ if err != nil {
+ return nil, err
+ }
+
+ result := []*metav1.APIResourceList{}
+ failedGroups := make(map[schema.GroupVersion]error)
+
+ grVersions := map[schema.GroupResource]string{} // selected version of a GroupResource
+ grApiResources := map[schema.GroupResource]*metav1.APIResource{} // selected APIResource for a GroupResource
+ gvApiResourceLists := map[schema.GroupVersion]*metav1.APIResourceList{} // blueprint for a APIResourceList for later grouping
+
+ for _, apiGroup := range serverGroupList.Groups {
+ for _, version := range apiGroup.Versions {
+ groupVersion := schema.GroupVersion{Group: apiGroup.Name, Version: version.Version}
+ apiResourceList, err := d.ServerResourcesForGroupVersion(version.GroupVersion)
+ if err != nil {
+ // TODO: maybe restrict this to NotFound errors
+ failedGroups[groupVersion] = err
+ continue
+ }
+
+ // create empty list which is filled later in another loop
+ emptyApiResourceList := metav1.APIResourceList{
+ GroupVersion: version.GroupVersion,
+ }
+ gvApiResourceLists[groupVersion] = &emptyApiResourceList
+ result = append(result, &emptyApiResourceList)
+
+ for i := range apiResourceList.APIResources {
+ apiResource := &apiResourceList.APIResources[i]
+ if strings.Contains(apiResource.Name, "/") {
+ continue
+ }
+ gv := schema.GroupResource{Group: apiGroup.Name, Resource: apiResource.Name}
+ if _, ok := grApiResources[gv]; ok && version.Version != apiGroup.PreferredVersion.Version {
+ // only override with preferred version
+ continue
+ }
+ grVersions[gv] = version.Version
+ grApiResources[gv] = apiResource
+ }
+ }
+ }
+
+ // group selected APIResources according to GroupVersion into APIResourceLists
+ for groupResource, apiResource := range grApiResources {
+ version := grVersions[groupResource]
+ groupVersion := schema.GroupVersion{Group: groupResource.Group, Version: version}
+ apiResourceList := gvApiResourceLists[groupVersion]
+ apiResourceList.APIResources = append(apiResourceList.APIResources, *apiResource)
+ }
+
+ if len(failedGroups) == 0 {
+ return result, nil
+ }
+
+ return result, &ErrGroupDiscoveryFailed{Groups: failedGroups}
+}
+
+// ServerPreferredResources returns the supported resources with the version preferred by the
+// server.
+func (d *DiscoveryClient) ServerPreferredResources() ([]*metav1.APIResourceList, error) {
+ return withRetries(defaultRetries, d.serverPreferredResources)
+}
+
+// ServerPreferredNamespacedResources returns the supported namespaced resources with the
+// version preferred by the server.
+func (d *DiscoveryClient) ServerPreferredNamespacedResources() ([]*metav1.APIResourceList, error) {
+ all, err := d.ServerPreferredResources()
+ return FilteredBy(ResourcePredicateFunc(func(groupVersion string, r *metav1.APIResource) bool {
+ return r.Namespaced
+ }), all), err
+}
+
+// ServerVersion retrieves and parses the server's version (git version).
+func (d *DiscoveryClient) ServerVersion() (*version.Info, error) {
+ body, err := d.restClient.Get().AbsPath("/version").Do().Raw()
+ if err != nil {
+ return nil, err
+ }
+ var info version.Info
+ err = json.Unmarshal(body, &info)
+ if err != nil {
+ return nil, fmt.Errorf("got '%s': %v", string(body), err)
+ }
+ return &info, nil
+}
+
+// SwaggerSchema retrieves and parses the swagger API schema the server supports.
+// TODO: Replace usages with Open API. Tracked in https://github.com/kubernetes/kubernetes/issues/44589
+func (d *DiscoveryClient) SwaggerSchema(version schema.GroupVersion) (*swagger.ApiDeclaration, error) {
+ if version.Empty() {
+ return nil, fmt.Errorf("groupVersion cannot be empty")
+ }
+
+ groupList, err := d.ServerGroups()
+ if err != nil {
+ return nil, err
+ }
+ groupVersions := metav1.ExtractGroupVersions(groupList)
+ // This check also takes care the case that kubectl is newer than the running endpoint
+ if stringDoesntExistIn(version.String(), groupVersions) {
+ return nil, fmt.Errorf("API version: %v is not supported by the server. Use one of: %v", version, groupVersions)
+ }
+ var path string
+ if len(d.LegacyPrefix) > 0 && version == v1.SchemeGroupVersion {
+ path = "/swaggerapi" + d.LegacyPrefix + "/" + version.Version
+ } else {
+ path = "/swaggerapi/apis/" + version.Group + "/" + version.Version
+ }
+
+ body, err := d.restClient.Get().AbsPath(path).Do().Raw()
+ if err != nil {
+ return nil, err
+ }
+ var schema swagger.ApiDeclaration
+ err = json.Unmarshal(body, &schema)
+ if err != nil {
+ return nil, fmt.Errorf("got '%s': %v", string(body), err)
+ }
+ return &schema, nil
+}
+
+// OpenAPISchema fetches the open api schema using a rest client and parses the json.
+// Warning: this is very expensive (~1.2s)
+func (d *DiscoveryClient) OpenAPISchema() (*spec.Swagger, error) {
+ data, err := d.restClient.Get().AbsPath("/swagger.json").Do().Raw()
+ if err != nil {
+ return nil, err
+ }
+ msg := json.RawMessage(data)
+ doc, err := loads.Analyzed(msg, "")
+ if err != nil {
+ return nil, err
+ }
+ return doc.Spec(), err
+}
+
+// withRetries retries the given recovery function in case the groups supported by the server change after ServerGroup() returns.
+func withRetries(maxRetries int, f func() ([]*metav1.APIResourceList, error)) ([]*metav1.APIResourceList, error) {
+ var result []*metav1.APIResourceList
+ var err error
+ for i := 0; i < maxRetries; i++ {
+ result, err = f()
+ if err == nil {
+ return result, nil
+ }
+ if _, ok := err.(*ErrGroupDiscoveryFailed); !ok {
+ return nil, err
+ }
+ }
+ return result, err
+}
+
+func setDiscoveryDefaults(config *restclient.Config) error {
+ config.APIPath = ""
+ config.GroupVersion = nil
+ codec := runtime.NoopEncoder{Decoder: scheme.Codecs.UniversalDecoder()}
+ config.NegotiatedSerializer = serializer.NegotiatedSerializerWrapper(runtime.SerializerInfo{Serializer: codec})
+ if len(config.UserAgent) == 0 {
+ config.UserAgent = restclient.DefaultKubernetesUserAgent()
+ }
+ return nil
+}
+
+// NewDiscoveryClientForConfig creates a new DiscoveryClient for the given config. This client
+// can be used to discover supported resources in the API server.
+func NewDiscoveryClientForConfig(c *restclient.Config) (*DiscoveryClient, error) {
+ config := *c
+ if err := setDiscoveryDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := restclient.UnversionedRESTClientFor(&config)
+ return &DiscoveryClient{restClient: client, LegacyPrefix: "/api"}, err
+}
+
+// NewDiscoveryClientForConfig creates a new DiscoveryClient for the given config. If
+// there is an error, it panics.
+func NewDiscoveryClientForConfigOrDie(c *restclient.Config) *DiscoveryClient {
+ client, err := NewDiscoveryClientForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+
+}
+
+// New creates a new DiscoveryClient for the given RESTClient.
+func NewDiscoveryClient(c restclient.Interface) *DiscoveryClient {
+ return &DiscoveryClient{restClient: c, LegacyPrefix: "/api"}
+}
+
+func stringDoesntExistIn(str string, slice []string) bool {
+ for _, s := range slice {
+ if s == str {
+ return false
+ }
+ }
+ return true
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *DiscoveryClient) RESTClient() restclient.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/client-go/discovery/helper.go b/vendor/k8s.io/client-go/discovery/helper.go
new file mode 100644
index 000000000..353d34b3c
--- /dev/null
+++ b/vendor/k8s.io/client-go/discovery/helper.go
@@ -0,0 +1,121 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package discovery
+
+import (
+ "fmt"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/util/sets"
+ apimachineryversion "k8s.io/apimachinery/pkg/version"
+)
+
+// MatchesServerVersion queries the server to compares the build version
+// (git hash) of the client with the server's build version. It returns an error
+// if it failed to contact the server or if the versions are not an exact match.
+func MatchesServerVersion(clientVersion apimachineryversion.Info, client DiscoveryInterface) error {
+ sVer, err := client.ServerVersion()
+ if err != nil {
+ return fmt.Errorf("couldn't read version from server: %v\n", err)
+ }
+ // GitVersion includes GitCommit and GitTreeState, but best to be safe?
+ if clientVersion.GitVersion != sVer.GitVersion || clientVersion.GitCommit != sVer.GitCommit || clientVersion.GitTreeState != sVer.GitTreeState {
+ return fmt.Errorf("server version (%#v) differs from client version (%#v)!\n", sVer, clientVersion)
+ }
+
+ return nil
+}
+
+// ServerSupportsVersion returns an error if the server doesn't have the required version
+func ServerSupportsVersion(client DiscoveryInterface, requiredGV schema.GroupVersion) error {
+ groups, err := client.ServerGroups()
+ if err != nil {
+ // This is almost always a connection error, and higher level code should treat this as a generic error,
+ // not a negotiation specific error.
+ return err
+ }
+ versions := metav1.ExtractGroupVersions(groups)
+ serverVersions := sets.String{}
+ for _, v := range versions {
+ serverVersions.Insert(v)
+ }
+
+ if serverVersions.Has(requiredGV.String()) {
+ return nil
+ }
+
+ // If the server supports no versions, then we should pretend it has the version because of old servers.
+ // This can happen because discovery fails due to 403 Forbidden errors
+ if len(serverVersions) == 0 {
+ return nil
+ }
+
+ return fmt.Errorf("server does not support API version %q", requiredGV)
+}
+
+// GroupVersionResources converts APIResourceLists to the GroupVersionResources.
+func GroupVersionResources(rls []*metav1.APIResourceList) (map[schema.GroupVersionResource]struct{}, error) {
+ gvrs := map[schema.GroupVersionResource]struct{}{}
+ for _, rl := range rls {
+ gv, err := schema.ParseGroupVersion(rl.GroupVersion)
+ if err != nil {
+ return nil, err
+ }
+ for i := range rl.APIResources {
+ gvrs[schema.GroupVersionResource{Group: gv.Group, Version: gv.Version, Resource: rl.APIResources[i].Name}] = struct{}{}
+ }
+ }
+ return gvrs, nil
+}
+
+// FilteredBy filters by the given predicate. Empty APIResourceLists are dropped.
+func FilteredBy(pred ResourcePredicate, rls []*metav1.APIResourceList) []*metav1.APIResourceList {
+ result := []*metav1.APIResourceList{}
+ for _, rl := range rls {
+ filtered := *rl
+ filtered.APIResources = nil
+ for i := range rl.APIResources {
+ if pred.Match(rl.GroupVersion, &rl.APIResources[i]) {
+ filtered.APIResources = append(filtered.APIResources, rl.APIResources[i])
+ }
+ }
+ if filtered.APIResources != nil {
+ result = append(result, &filtered)
+ }
+ }
+ return result
+}
+
+type ResourcePredicate interface {
+ Match(groupVersion string, r *metav1.APIResource) bool
+}
+
+type ResourcePredicateFunc func(groupVersion string, r *metav1.APIResource) bool
+
+func (fn ResourcePredicateFunc) Match(groupVersion string, r *metav1.APIResource) bool {
+ return fn(groupVersion, r)
+}
+
+// SupportsAllVerbs is a predicate matching a resource iff all given verbs are supported.
+type SupportsAllVerbs struct {
+ Verbs []string
+}
+
+func (p SupportsAllVerbs) Match(groupVersion string, r *metav1.APIResource) bool {
+ return sets.NewString([]string(r.Verbs)...).HasAll(p.Verbs...)
+}
diff --git a/vendor/k8s.io/client-go/discovery/restmapper.go b/vendor/k8s.io/client-go/discovery/restmapper.go
new file mode 100644
index 000000000..756669001
--- /dev/null
+++ b/vendor/k8s.io/client-go/discovery/restmapper.go
@@ -0,0 +1,304 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package discovery
+
+import (
+ "fmt"
+ "sync"
+
+ "k8s.io/apimachinery/pkg/api/meta"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+
+ "github.com/golang/glog"
+)
+
+// APIGroupResources is an API group with a mapping of versions to
+// resources.
+type APIGroupResources struct {
+ Group metav1.APIGroup
+ // A mapping of version string to a slice of APIResources for
+ // that version.
+ VersionedResources map[string][]metav1.APIResource
+}
+
+// NewRESTMapper returns a PriorityRESTMapper based on the discovered
+// groups and resources passed in.
+func NewRESTMapper(groupResources []*APIGroupResources, versionInterfaces meta.VersionInterfacesFunc) meta.RESTMapper {
+ unionMapper := meta.MultiRESTMapper{}
+
+ var groupPriority []string
+ // /v1 is special. It should always come first
+ resourcePriority := []schema.GroupVersionResource{{Group: "", Version: "v1", Resource: meta.AnyResource}}
+ kindPriority := []schema.GroupVersionKind{{Group: "", Version: "v1", Kind: meta.AnyKind}}
+
+ for _, group := range groupResources {
+ groupPriority = append(groupPriority, group.Group.Name)
+
+ if len(group.Group.PreferredVersion.Version) != 0 {
+ preferred := group.Group.PreferredVersion.Version
+ if _, ok := group.VersionedResources[preferred]; ok {
+ resourcePriority = append(resourcePriority, schema.GroupVersionResource{
+ Group: group.Group.Name,
+ Version: group.Group.PreferredVersion.Version,
+ Resource: meta.AnyResource,
+ })
+
+ kindPriority = append(kindPriority, schema.GroupVersionKind{
+ Group: group.Group.Name,
+ Version: group.Group.PreferredVersion.Version,
+ Kind: meta.AnyKind,
+ })
+ }
+ }
+
+ for _, discoveryVersion := range group.Group.Versions {
+ resources, ok := group.VersionedResources[discoveryVersion.Version]
+ if !ok {
+ continue
+ }
+
+ gv := schema.GroupVersion{Group: group.Group.Name, Version: discoveryVersion.Version}
+ versionMapper := meta.NewDefaultRESTMapper([]schema.GroupVersion{gv}, versionInterfaces)
+
+ for _, resource := range resources {
+ scope := meta.RESTScopeNamespace
+ if !resource.Namespaced {
+ scope = meta.RESTScopeRoot
+ }
+ versionMapper.Add(gv.WithKind(resource.Kind), scope)
+ // TODO only do this if it supports listing
+ versionMapper.Add(gv.WithKind(resource.Kind+"List"), scope)
+ }
+ // TODO why is this type not in discovery (at least for "v1")
+ versionMapper.Add(gv.WithKind("List"), meta.RESTScopeRoot)
+ unionMapper = append(unionMapper, versionMapper)
+ }
+ }
+
+ for _, group := range groupPriority {
+ resourcePriority = append(resourcePriority, schema.GroupVersionResource{
+ Group: group,
+ Version: meta.AnyVersion,
+ Resource: meta.AnyResource,
+ })
+ kindPriority = append(kindPriority, schema.GroupVersionKind{
+ Group: group,
+ Version: meta.AnyVersion,
+ Kind: meta.AnyKind,
+ })
+ }
+
+ return meta.PriorityRESTMapper{
+ Delegate: unionMapper,
+ ResourcePriority: resourcePriority,
+ KindPriority: kindPriority,
+ }
+}
+
+// GetAPIGroupResources uses the provided discovery client to gather
+// discovery information and populate a slice of APIGroupResources.
+func GetAPIGroupResources(cl DiscoveryInterface) ([]*APIGroupResources, error) {
+ apiGroups, err := cl.ServerGroups()
+ if err != nil {
+ return nil, err
+ }
+ var result []*APIGroupResources
+ for _, group := range apiGroups.Groups {
+ groupResources := &APIGroupResources{
+ Group: group,
+ VersionedResources: make(map[string][]metav1.APIResource),
+ }
+ for _, version := range group.Versions {
+ resources, err := cl.ServerResourcesForGroupVersion(version.GroupVersion)
+ if err != nil {
+ // continue as best we can
+ // TODO track the errors and update callers to handle partial errors.
+ continue
+ }
+ groupResources.VersionedResources[version.Version] = resources.APIResources
+ }
+ result = append(result, groupResources)
+ }
+ return result, nil
+}
+
+// DeferredDiscoveryRESTMapper is a RESTMapper that will defer
+// initialization of the RESTMapper until the first mapping is
+// requested.
+type DeferredDiscoveryRESTMapper struct {
+ initMu sync.Mutex
+ delegate meta.RESTMapper
+ cl CachedDiscoveryInterface
+ versionInterface meta.VersionInterfacesFunc
+}
+
+// NewDeferredDiscoveryRESTMapper returns a
+// DeferredDiscoveryRESTMapper that will lazily query the provided
+// client for discovery information to do REST mappings.
+func NewDeferredDiscoveryRESTMapper(cl CachedDiscoveryInterface, versionInterface meta.VersionInterfacesFunc) *DeferredDiscoveryRESTMapper {
+ return &DeferredDiscoveryRESTMapper{
+ cl: cl,
+ versionInterface: versionInterface,
+ }
+}
+
+func (d *DeferredDiscoveryRESTMapper) getDelegate() (meta.RESTMapper, error) {
+ d.initMu.Lock()
+ defer d.initMu.Unlock()
+
+ if d.delegate != nil {
+ return d.delegate, nil
+ }
+
+ groupResources, err := GetAPIGroupResources(d.cl)
+ if err != nil {
+ return nil, err
+ }
+
+ d.delegate = NewRESTMapper(groupResources, d.versionInterface)
+ return d.delegate, err
+}
+
+// Reset resets the internally cached Discovery information and will
+// cause the next mapping request to re-discover.
+func (d *DeferredDiscoveryRESTMapper) Reset() {
+ glog.V(5).Info("Invalidating discovery information")
+
+ d.initMu.Lock()
+ defer d.initMu.Unlock()
+
+ d.cl.Invalidate()
+ d.delegate = nil
+}
+
+// KindFor takes a partial resource and returns back the single match.
+// It returns an error if there are multiple matches.
+func (d *DeferredDiscoveryRESTMapper) KindFor(resource schema.GroupVersionResource) (gvk schema.GroupVersionKind, err error) {
+ del, err := d.getDelegate()
+ if err != nil {
+ return schema.GroupVersionKind{}, err
+ }
+ gvk, err = del.KindFor(resource)
+ if err != nil && !d.cl.Fresh() {
+ d.Reset()
+ gvk, err = d.KindFor(resource)
+ }
+ return
+}
+
+// KindsFor takes a partial resource and returns back the list of
+// potential kinds in priority order.
+func (d *DeferredDiscoveryRESTMapper) KindsFor(resource schema.GroupVersionResource) (gvks []schema.GroupVersionKind, err error) {
+ del, err := d.getDelegate()
+ if err != nil {
+ return nil, err
+ }
+ gvks, err = del.KindsFor(resource)
+ if len(gvks) == 0 && !d.cl.Fresh() {
+ d.Reset()
+ gvks, err = d.KindsFor(resource)
+ }
+ return
+}
+
+// ResourceFor takes a partial resource and returns back the single
+// match. It returns an error if there are multiple matches.
+func (d *DeferredDiscoveryRESTMapper) ResourceFor(input schema.GroupVersionResource) (gvr schema.GroupVersionResource, err error) {
+ del, err := d.getDelegate()
+ if err != nil {
+ return schema.GroupVersionResource{}, err
+ }
+ gvr, err = del.ResourceFor(input)
+ if err != nil && !d.cl.Fresh() {
+ d.Reset()
+ gvr, err = d.ResourceFor(input)
+ }
+ return
+}
+
+// ResourcesFor takes a partial resource and returns back the list of
+// potential resource in priority order.
+func (d *DeferredDiscoveryRESTMapper) ResourcesFor(input schema.GroupVersionResource) (gvrs []schema.GroupVersionResource, err error) {
+ del, err := d.getDelegate()
+ if err != nil {
+ return nil, err
+ }
+ gvrs, err = del.ResourcesFor(input)
+ if len(gvrs) == 0 && !d.cl.Fresh() {
+ d.Reset()
+ gvrs, err = d.ResourcesFor(input)
+ }
+ return
+}
+
+// RESTMapping identifies a preferred resource mapping for the
+// provided group kind.
+func (d *DeferredDiscoveryRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (m *meta.RESTMapping, err error) {
+ del, err := d.getDelegate()
+ if err != nil {
+ return nil, err
+ }
+ m, err = del.RESTMapping(gk, versions...)
+ if err != nil && !d.cl.Fresh() {
+ d.Reset()
+ m, err = d.RESTMapping(gk, versions...)
+ }
+ return
+}
+
+// RESTMappings returns the RESTMappings for the provided group kind
+// in a rough internal preferred order. If no kind is found, it will
+// return a NoResourceMatchError.
+func (d *DeferredDiscoveryRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) (ms []*meta.RESTMapping, err error) {
+ del, err := d.getDelegate()
+ if err != nil {
+ return nil, err
+ }
+ ms, err = del.RESTMappings(gk, versions...)
+ if len(ms) == 0 && !d.cl.Fresh() {
+ d.Reset()
+ ms, err = d.RESTMappings(gk, versions...)
+ }
+ return
+}
+
+// ResourceSingularizer converts a resource name from plural to
+// singular (e.g., from pods to pod).
+func (d *DeferredDiscoveryRESTMapper) ResourceSingularizer(resource string) (singular string, err error) {
+ del, err := d.getDelegate()
+ if err != nil {
+ return resource, err
+ }
+ singular, err = del.ResourceSingularizer(resource)
+ if err != nil && !d.cl.Fresh() {
+ d.Reset()
+ singular, err = d.ResourceSingularizer(resource)
+ }
+ return
+}
+
+func (d *DeferredDiscoveryRESTMapper) String() string {
+ del, err := d.getDelegate()
+ if err != nil {
+ return fmt.Sprintf("DeferredDiscoveryRESTMapper{%v}", err)
+ }
+ return fmt.Sprintf("DeferredDiscoveryRESTMapper{\n\t%v\n}", del)
+}
+
+// Make sure it satisfies the interface
+var _ meta.RESTMapper = &DeferredDiscoveryRESTMapper{}
diff --git a/vendor/k8s.io/client-go/discovery/unstructured.go b/vendor/k8s.io/client-go/discovery/unstructured.go
new file mode 100644
index 000000000..ee72d668b
--- /dev/null
+++ b/vendor/k8s.io/client-go/discovery/unstructured.go
@@ -0,0 +1,95 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package discovery
+
+import (
+ "fmt"
+
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// UnstructuredObjectTyper provides a runtime.ObjectTyper implmentation for
+// runtime.Unstructured object based on discovery information.
+type UnstructuredObjectTyper struct {
+ registered map[schema.GroupVersionKind]bool
+}
+
+// NewUnstructuredObjectTyper returns a runtime.ObjectTyper for
+// unstructred objects based on discovery information.
+func NewUnstructuredObjectTyper(groupResources []*APIGroupResources) *UnstructuredObjectTyper {
+ dot := &UnstructuredObjectTyper{registered: make(map[schema.GroupVersionKind]bool)}
+ for _, group := range groupResources {
+ for _, discoveryVersion := range group.Group.Versions {
+ resources, ok := group.VersionedResources[discoveryVersion.Version]
+ if !ok {
+ continue
+ }
+
+ gv := schema.GroupVersion{Group: group.Group.Name, Version: discoveryVersion.Version}
+ for _, resource := range resources {
+ dot.registered[gv.WithKind(resource.Kind)] = true
+ }
+ }
+ }
+ return dot
+}
+
+// ObjectKind returns the group,version,kind of the provided object, or an error
+// if the object in not runtime.Unstructured or has no group,version,kind
+// information.
+func (d *UnstructuredObjectTyper) ObjectKind(obj runtime.Object) (schema.GroupVersionKind, error) {
+ if _, ok := obj.(runtime.Unstructured); !ok {
+ return schema.GroupVersionKind{}, fmt.Errorf("type %T is invalid for dynamic object typer", obj)
+ }
+
+ return obj.GetObjectKind().GroupVersionKind(), nil
+}
+
+// ObjectKinds returns a slice of one element with the group,version,kind of the
+// provided object, or an error if the object is not runtime.Unstructured or
+// has no group,version,kind information. unversionedType will always be false
+// because runtime.Unstructured object should always have group,version,kind
+// information set.
+func (d *UnstructuredObjectTyper) ObjectKinds(obj runtime.Object) (gvks []schema.GroupVersionKind, unversionedType bool, err error) {
+ gvk, err := d.ObjectKind(obj)
+ if err != nil {
+ return nil, false, err
+ }
+
+ return []schema.GroupVersionKind{gvk}, false, nil
+}
+
+// Recognizes returns true if the provided group,version,kind was in the
+// discovery information.
+func (d *UnstructuredObjectTyper) Recognizes(gvk schema.GroupVersionKind) bool {
+ return d.registered[gvk]
+}
+
+// IsUnversioned returns false always because runtime.Unstructured objects
+// should always have group,version,kind information set. ok will be true if the
+// object's group,version,kind is api.Registry.
+func (d *UnstructuredObjectTyper) IsUnversioned(obj runtime.Object) (unversioned bool, ok bool) {
+ gvk, err := d.ObjectKind(obj)
+ if err != nil {
+ return false, false
+ }
+
+ return false, d.registered[gvk]
+}
+
+var _ runtime.ObjectTyper = &UnstructuredObjectTyper{}
diff --git a/vendor/k8s.io/client-go/kubernetes/clientset.go b/vendor/k8s.io/client-go/kubernetes/clientset.go
new file mode 100644
index 000000000..8a05da50d
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/clientset.go
@@ -0,0 +1,570 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package kubernetes
+
+import (
+ glog "github.com/golang/glog"
+ discovery "k8s.io/client-go/discovery"
+ admissionregistrationv1alpha1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1"
+ appsv1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1"
+ authenticationv1 "k8s.io/client-go/kubernetes/typed/authentication/v1"
+ authenticationv1beta1 "k8s.io/client-go/kubernetes/typed/authentication/v1beta1"
+ authorizationv1 "k8s.io/client-go/kubernetes/typed/authorization/v1"
+ authorizationv1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1"
+ autoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1"
+ autoscalingv2alpha1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1"
+ batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1"
+ batchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1"
+ certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1"
+ corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
+ extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1"
+ networkingv1 "k8s.io/client-go/kubernetes/typed/networking/v1"
+ policyv1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1"
+ rbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1"
+ rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1"
+ settingsv1alpha1 "k8s.io/client-go/kubernetes/typed/settings/v1alpha1"
+ storagev1 "k8s.io/client-go/kubernetes/typed/storage/v1"
+ storagev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1"
+ rest "k8s.io/client-go/rest"
+ flowcontrol "k8s.io/client-go/util/flowcontrol"
+)
+
+type Interface interface {
+ Discovery() discovery.DiscoveryInterface
+ AdmissionregistrationV1alpha1() admissionregistrationv1alpha1.AdmissionregistrationV1alpha1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Admissionregistration() admissionregistrationv1alpha1.AdmissionregistrationV1alpha1Interface
+ CoreV1() corev1.CoreV1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Core() corev1.CoreV1Interface
+ AppsV1beta1() appsv1beta1.AppsV1beta1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Apps() appsv1beta1.AppsV1beta1Interface
+ AuthenticationV1() authenticationv1.AuthenticationV1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Authentication() authenticationv1.AuthenticationV1Interface
+ AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface
+ AuthorizationV1() authorizationv1.AuthorizationV1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Authorization() authorizationv1.AuthorizationV1Interface
+ AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface
+ AutoscalingV1() autoscalingv1.AutoscalingV1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Autoscaling() autoscalingv1.AutoscalingV1Interface
+ AutoscalingV2alpha1() autoscalingv2alpha1.AutoscalingV2alpha1Interface
+ BatchV1() batchv1.BatchV1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Batch() batchv1.BatchV1Interface
+ BatchV2alpha1() batchv2alpha1.BatchV2alpha1Interface
+ CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Certificates() certificatesv1beta1.CertificatesV1beta1Interface
+ ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Extensions() extensionsv1beta1.ExtensionsV1beta1Interface
+ NetworkingV1() networkingv1.NetworkingV1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Networking() networkingv1.NetworkingV1Interface
+ PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Policy() policyv1beta1.PolicyV1beta1Interface
+ RbacV1beta1() rbacv1beta1.RbacV1beta1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Rbac() rbacv1beta1.RbacV1beta1Interface
+ RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface
+ SettingsV1alpha1() settingsv1alpha1.SettingsV1alpha1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Settings() settingsv1alpha1.SettingsV1alpha1Interface
+ StorageV1beta1() storagev1beta1.StorageV1beta1Interface
+ StorageV1() storagev1.StorageV1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Storage() storagev1.StorageV1Interface
+}
+
+// Clientset contains the clients for groups. Each group has exactly one
+// version included in a Clientset.
+type Clientset struct {
+ *discovery.DiscoveryClient
+ *admissionregistrationv1alpha1.AdmissionregistrationV1alpha1Client
+ *corev1.CoreV1Client
+ *appsv1beta1.AppsV1beta1Client
+ *authenticationv1.AuthenticationV1Client
+ *authenticationv1beta1.AuthenticationV1beta1Client
+ *authorizationv1.AuthorizationV1Client
+ *authorizationv1beta1.AuthorizationV1beta1Client
+ *autoscalingv1.AutoscalingV1Client
+ *autoscalingv2alpha1.AutoscalingV2alpha1Client
+ *batchv1.BatchV1Client
+ *batchv2alpha1.BatchV2alpha1Client
+ *certificatesv1beta1.CertificatesV1beta1Client
+ *extensionsv1beta1.ExtensionsV1beta1Client
+ *networkingv1.NetworkingV1Client
+ *policyv1beta1.PolicyV1beta1Client
+ *rbacv1beta1.RbacV1beta1Client
+ *rbacv1alpha1.RbacV1alpha1Client
+ *settingsv1alpha1.SettingsV1alpha1Client
+ *storagev1beta1.StorageV1beta1Client
+ *storagev1.StorageV1Client
+}
+
+// AdmissionregistrationV1alpha1 retrieves the AdmissionregistrationV1alpha1Client
+func (c *Clientset) AdmissionregistrationV1alpha1() admissionregistrationv1alpha1.AdmissionregistrationV1alpha1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.AdmissionregistrationV1alpha1Client
+}
+
+// Deprecated: Admissionregistration retrieves the default version of AdmissionregistrationClient.
+// Please explicitly pick a version.
+func (c *Clientset) Admissionregistration() admissionregistrationv1alpha1.AdmissionregistrationV1alpha1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.AdmissionregistrationV1alpha1Client
+}
+
+// CoreV1 retrieves the CoreV1Client
+func (c *Clientset) CoreV1() corev1.CoreV1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.CoreV1Client
+}
+
+// Deprecated: Core retrieves the default version of CoreClient.
+// Please explicitly pick a version.
+func (c *Clientset) Core() corev1.CoreV1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.CoreV1Client
+}
+
+// AppsV1beta1 retrieves the AppsV1beta1Client
+func (c *Clientset) AppsV1beta1() appsv1beta1.AppsV1beta1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.AppsV1beta1Client
+}
+
+// Deprecated: Apps retrieves the default version of AppsClient.
+// Please explicitly pick a version.
+func (c *Clientset) Apps() appsv1beta1.AppsV1beta1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.AppsV1beta1Client
+}
+
+// AuthenticationV1 retrieves the AuthenticationV1Client
+func (c *Clientset) AuthenticationV1() authenticationv1.AuthenticationV1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.AuthenticationV1Client
+}
+
+// Deprecated: Authentication retrieves the default version of AuthenticationClient.
+// Please explicitly pick a version.
+func (c *Clientset) Authentication() authenticationv1.AuthenticationV1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.AuthenticationV1Client
+}
+
+// AuthenticationV1beta1 retrieves the AuthenticationV1beta1Client
+func (c *Clientset) AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.AuthenticationV1beta1Client
+}
+
+// AuthorizationV1 retrieves the AuthorizationV1Client
+func (c *Clientset) AuthorizationV1() authorizationv1.AuthorizationV1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.AuthorizationV1Client
+}
+
+// Deprecated: Authorization retrieves the default version of AuthorizationClient.
+// Please explicitly pick a version.
+func (c *Clientset) Authorization() authorizationv1.AuthorizationV1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.AuthorizationV1Client
+}
+
+// AuthorizationV1beta1 retrieves the AuthorizationV1beta1Client
+func (c *Clientset) AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.AuthorizationV1beta1Client
+}
+
+// AutoscalingV1 retrieves the AutoscalingV1Client
+func (c *Clientset) AutoscalingV1() autoscalingv1.AutoscalingV1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.AutoscalingV1Client
+}
+
+// Deprecated: Autoscaling retrieves the default version of AutoscalingClient.
+// Please explicitly pick a version.
+func (c *Clientset) Autoscaling() autoscalingv1.AutoscalingV1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.AutoscalingV1Client
+}
+
+// AutoscalingV2alpha1 retrieves the AutoscalingV2alpha1Client
+func (c *Clientset) AutoscalingV2alpha1() autoscalingv2alpha1.AutoscalingV2alpha1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.AutoscalingV2alpha1Client
+}
+
+// BatchV1 retrieves the BatchV1Client
+func (c *Clientset) BatchV1() batchv1.BatchV1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.BatchV1Client
+}
+
+// Deprecated: Batch retrieves the default version of BatchClient.
+// Please explicitly pick a version.
+func (c *Clientset) Batch() batchv1.BatchV1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.BatchV1Client
+}
+
+// BatchV2alpha1 retrieves the BatchV2alpha1Client
+func (c *Clientset) BatchV2alpha1() batchv2alpha1.BatchV2alpha1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.BatchV2alpha1Client
+}
+
+// CertificatesV1beta1 retrieves the CertificatesV1beta1Client
+func (c *Clientset) CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.CertificatesV1beta1Client
+}
+
+// Deprecated: Certificates retrieves the default version of CertificatesClient.
+// Please explicitly pick a version.
+func (c *Clientset) Certificates() certificatesv1beta1.CertificatesV1beta1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.CertificatesV1beta1Client
+}
+
+// ExtensionsV1beta1 retrieves the ExtensionsV1beta1Client
+func (c *Clientset) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.ExtensionsV1beta1Client
+}
+
+// Deprecated: Extensions retrieves the default version of ExtensionsClient.
+// Please explicitly pick a version.
+func (c *Clientset) Extensions() extensionsv1beta1.ExtensionsV1beta1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.ExtensionsV1beta1Client
+}
+
+// NetworkingV1 retrieves the NetworkingV1Client
+func (c *Clientset) NetworkingV1() networkingv1.NetworkingV1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.NetworkingV1Client
+}
+
+// Deprecated: Networking retrieves the default version of NetworkingClient.
+// Please explicitly pick a version.
+func (c *Clientset) Networking() networkingv1.NetworkingV1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.NetworkingV1Client
+}
+
+// PolicyV1beta1 retrieves the PolicyV1beta1Client
+func (c *Clientset) PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.PolicyV1beta1Client
+}
+
+// Deprecated: Policy retrieves the default version of PolicyClient.
+// Please explicitly pick a version.
+func (c *Clientset) Policy() policyv1beta1.PolicyV1beta1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.PolicyV1beta1Client
+}
+
+// RbacV1beta1 retrieves the RbacV1beta1Client
+func (c *Clientset) RbacV1beta1() rbacv1beta1.RbacV1beta1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.RbacV1beta1Client
+}
+
+// Deprecated: Rbac retrieves the default version of RbacClient.
+// Please explicitly pick a version.
+func (c *Clientset) Rbac() rbacv1beta1.RbacV1beta1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.RbacV1beta1Client
+}
+
+// RbacV1alpha1 retrieves the RbacV1alpha1Client
+func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.RbacV1alpha1Client
+}
+
+// SettingsV1alpha1 retrieves the SettingsV1alpha1Client
+func (c *Clientset) SettingsV1alpha1() settingsv1alpha1.SettingsV1alpha1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.SettingsV1alpha1Client
+}
+
+// Deprecated: Settings retrieves the default version of SettingsClient.
+// Please explicitly pick a version.
+func (c *Clientset) Settings() settingsv1alpha1.SettingsV1alpha1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.SettingsV1alpha1Client
+}
+
+// StorageV1beta1 retrieves the StorageV1beta1Client
+func (c *Clientset) StorageV1beta1() storagev1beta1.StorageV1beta1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.StorageV1beta1Client
+}
+
+// StorageV1 retrieves the StorageV1Client
+func (c *Clientset) StorageV1() storagev1.StorageV1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.StorageV1Client
+}
+
+// Deprecated: Storage retrieves the default version of StorageClient.
+// Please explicitly pick a version.
+func (c *Clientset) Storage() storagev1.StorageV1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.StorageV1Client
+}
+
+// Discovery retrieves the DiscoveryClient
+func (c *Clientset) Discovery() discovery.DiscoveryInterface {
+ if c == nil {
+ return nil
+ }
+ return c.DiscoveryClient
+}
+
+// NewForConfig creates a new Clientset for the given config.
+func NewForConfig(c *rest.Config) (*Clientset, error) {
+ configShallowCopy := *c
+ if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 {
+ configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst)
+ }
+ var cs Clientset
+ var err error
+ cs.AdmissionregistrationV1alpha1Client, err = admissionregistrationv1alpha1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.CoreV1Client, err = corev1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.AppsV1beta1Client, err = appsv1beta1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.AuthenticationV1Client, err = authenticationv1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.AuthenticationV1beta1Client, err = authenticationv1beta1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.AuthorizationV1Client, err = authorizationv1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.AuthorizationV1beta1Client, err = authorizationv1beta1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.AutoscalingV1Client, err = autoscalingv1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.AutoscalingV2alpha1Client, err = autoscalingv2alpha1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.BatchV1Client, err = batchv1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.BatchV2alpha1Client, err = batchv2alpha1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.CertificatesV1beta1Client, err = certificatesv1beta1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.ExtensionsV1beta1Client, err = extensionsv1beta1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.NetworkingV1Client, err = networkingv1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.PolicyV1beta1Client, err = policyv1beta1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.RbacV1beta1Client, err = rbacv1beta1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.RbacV1alpha1Client, err = rbacv1alpha1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.SettingsV1alpha1Client, err = settingsv1alpha1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.StorageV1beta1Client, err = storagev1beta1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.StorageV1Client, err = storagev1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+
+ cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy)
+ if err != nil {
+ glog.Errorf("failed to create the DiscoveryClient: %v", err)
+ return nil, err
+ }
+ return &cs, nil
+}
+
+// NewForConfigOrDie creates a new Clientset for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *Clientset {
+ var cs Clientset
+ cs.AdmissionregistrationV1alpha1Client = admissionregistrationv1alpha1.NewForConfigOrDie(c)
+ cs.CoreV1Client = corev1.NewForConfigOrDie(c)
+ cs.AppsV1beta1Client = appsv1beta1.NewForConfigOrDie(c)
+ cs.AuthenticationV1Client = authenticationv1.NewForConfigOrDie(c)
+ cs.AuthenticationV1beta1Client = authenticationv1beta1.NewForConfigOrDie(c)
+ cs.AuthorizationV1Client = authorizationv1.NewForConfigOrDie(c)
+ cs.AuthorizationV1beta1Client = authorizationv1beta1.NewForConfigOrDie(c)
+ cs.AutoscalingV1Client = autoscalingv1.NewForConfigOrDie(c)
+ cs.AutoscalingV2alpha1Client = autoscalingv2alpha1.NewForConfigOrDie(c)
+ cs.BatchV1Client = batchv1.NewForConfigOrDie(c)
+ cs.BatchV2alpha1Client = batchv2alpha1.NewForConfigOrDie(c)
+ cs.CertificatesV1beta1Client = certificatesv1beta1.NewForConfigOrDie(c)
+ cs.ExtensionsV1beta1Client = extensionsv1beta1.NewForConfigOrDie(c)
+ cs.NetworkingV1Client = networkingv1.NewForConfigOrDie(c)
+ cs.PolicyV1beta1Client = policyv1beta1.NewForConfigOrDie(c)
+ cs.RbacV1beta1Client = rbacv1beta1.NewForConfigOrDie(c)
+ cs.RbacV1alpha1Client = rbacv1alpha1.NewForConfigOrDie(c)
+ cs.SettingsV1alpha1Client = settingsv1alpha1.NewForConfigOrDie(c)
+ cs.StorageV1beta1Client = storagev1beta1.NewForConfigOrDie(c)
+ cs.StorageV1Client = storagev1.NewForConfigOrDie(c)
+
+ cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
+ return &cs
+}
+
+// New creates a new Clientset for the given RESTClient.
+func New(c rest.Interface) *Clientset {
+ var cs Clientset
+ cs.AdmissionregistrationV1alpha1Client = admissionregistrationv1alpha1.New(c)
+ cs.CoreV1Client = corev1.New(c)
+ cs.AppsV1beta1Client = appsv1beta1.New(c)
+ cs.AuthenticationV1Client = authenticationv1.New(c)
+ cs.AuthenticationV1beta1Client = authenticationv1beta1.New(c)
+ cs.AuthorizationV1Client = authorizationv1.New(c)
+ cs.AuthorizationV1beta1Client = authorizationv1beta1.New(c)
+ cs.AutoscalingV1Client = autoscalingv1.New(c)
+ cs.AutoscalingV2alpha1Client = autoscalingv2alpha1.New(c)
+ cs.BatchV1Client = batchv1.New(c)
+ cs.BatchV2alpha1Client = batchv2alpha1.New(c)
+ cs.CertificatesV1beta1Client = certificatesv1beta1.New(c)
+ cs.ExtensionsV1beta1Client = extensionsv1beta1.New(c)
+ cs.NetworkingV1Client = networkingv1.New(c)
+ cs.PolicyV1beta1Client = policyv1beta1.New(c)
+ cs.RbacV1beta1Client = rbacv1beta1.New(c)
+ cs.RbacV1alpha1Client = rbacv1alpha1.New(c)
+ cs.SettingsV1alpha1Client = settingsv1alpha1.New(c)
+ cs.StorageV1beta1Client = storagev1beta1.New(c)
+ cs.StorageV1Client = storagev1.New(c)
+
+ cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
+ return &cs
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/doc.go b/vendor/k8s.io/client-go/kubernetes/doc.go
new file mode 100644
index 000000000..2af84c669
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated clientset.
+package kubernetes
diff --git a/vendor/k8s.io/client-go/kubernetes/scheme/doc.go b/vendor/k8s.io/client-go/kubernetes/scheme/doc.go
new file mode 100644
index 000000000..5d8ec824f
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/scheme/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package contains the scheme of the automatically generated clientset.
+package scheme
diff --git a/vendor/k8s.io/client-go/kubernetes/scheme/register.go b/vendor/k8s.io/client-go/kubernetes/scheme/register.go
new file mode 100644
index 000000000..c4af63a46
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/scheme/register.go
@@ -0,0 +1,91 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package scheme
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ schema "k8s.io/apimachinery/pkg/runtime/schema"
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ corev1 "k8s.io/client-go/pkg/api/v1"
+ admissionregistrationv1alpha1 "k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1"
+ appsv1beta1 "k8s.io/client-go/pkg/apis/apps/v1beta1"
+ authenticationv1 "k8s.io/client-go/pkg/apis/authentication/v1"
+ authenticationv1beta1 "k8s.io/client-go/pkg/apis/authentication/v1beta1"
+ authorizationv1 "k8s.io/client-go/pkg/apis/authorization/v1"
+ authorizationv1beta1 "k8s.io/client-go/pkg/apis/authorization/v1beta1"
+ autoscalingv1 "k8s.io/client-go/pkg/apis/autoscaling/v1"
+ autoscalingv2alpha1 "k8s.io/client-go/pkg/apis/autoscaling/v2alpha1"
+ batchv1 "k8s.io/client-go/pkg/apis/batch/v1"
+ batchv2alpha1 "k8s.io/client-go/pkg/apis/batch/v2alpha1"
+ certificatesv1beta1 "k8s.io/client-go/pkg/apis/certificates/v1beta1"
+ extensionsv1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
+ networkingv1 "k8s.io/client-go/pkg/apis/networking/v1"
+ policyv1beta1 "k8s.io/client-go/pkg/apis/policy/v1beta1"
+ rbacv1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1"
+ rbacv1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1"
+ settingsv1alpha1 "k8s.io/client-go/pkg/apis/settings/v1alpha1"
+ storagev1 "k8s.io/client-go/pkg/apis/storage/v1"
+ storagev1beta1 "k8s.io/client-go/pkg/apis/storage/v1beta1"
+)
+
+var Scheme = runtime.NewScheme()
+var Codecs = serializer.NewCodecFactory(Scheme)
+var ParameterCodec = runtime.NewParameterCodec(Scheme)
+
+func init() {
+ v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"})
+ AddToScheme(Scheme)
+}
+
+// AddToScheme adds all types of this clientset into the given scheme. This allows composition
+// of clientsets, like in:
+//
+// import (
+// "k8s.io/client-go/kubernetes"
+// clientsetscheme "k8s.io/client-go/kuberentes/scheme"
+// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
+// )
+//
+// kclientset, _ := kubernetes.NewForConfig(c)
+// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
+//
+// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
+// correctly.
+func AddToScheme(scheme *runtime.Scheme) {
+ admissionregistrationv1alpha1.AddToScheme(scheme)
+ corev1.AddToScheme(scheme)
+ appsv1beta1.AddToScheme(scheme)
+ authenticationv1.AddToScheme(scheme)
+ authenticationv1beta1.AddToScheme(scheme)
+ authorizationv1.AddToScheme(scheme)
+ authorizationv1beta1.AddToScheme(scheme)
+ autoscalingv1.AddToScheme(scheme)
+ autoscalingv2alpha1.AddToScheme(scheme)
+ batchv1.AddToScheme(scheme)
+ batchv2alpha1.AddToScheme(scheme)
+ certificatesv1beta1.AddToScheme(scheme)
+ extensionsv1beta1.AddToScheme(scheme)
+ networkingv1.AddToScheme(scheme)
+ policyv1beta1.AddToScheme(scheme)
+ rbacv1beta1.AddToScheme(scheme)
+ rbacv1alpha1.AddToScheme(scheme)
+ settingsv1alpha1.AddToScheme(scheme)
+ storagev1beta1.AddToScheme(scheme)
+ storagev1.AddToScheme(scheme)
+
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/admissionregistration_client.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/admissionregistration_client.go
new file mode 100644
index 000000000..1ac48c8f3
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/admissionregistration_client.go
@@ -0,0 +1,93 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ "k8s.io/client-go/kubernetes/scheme"
+ v1alpha1 "k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1"
+ rest "k8s.io/client-go/rest"
+)
+
+type AdmissionregistrationV1alpha1Interface interface {
+ RESTClient() rest.Interface
+ ExternalAdmissionHookConfigurationsGetter
+ InitializerConfigurationsGetter
+}
+
+// AdmissionregistrationV1alpha1Client is used to interact with features provided by the admissionregistration.k8s.io group.
+type AdmissionregistrationV1alpha1Client struct {
+ restClient rest.Interface
+}
+
+func (c *AdmissionregistrationV1alpha1Client) ExternalAdmissionHookConfigurations() ExternalAdmissionHookConfigurationInterface {
+ return newExternalAdmissionHookConfigurations(c)
+}
+
+func (c *AdmissionregistrationV1alpha1Client) InitializerConfigurations() InitializerConfigurationInterface {
+ return newInitializerConfigurations(c)
+}
+
+// NewForConfig creates a new AdmissionregistrationV1alpha1Client for the given config.
+func NewForConfig(c *rest.Config) (*AdmissionregistrationV1alpha1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &AdmissionregistrationV1alpha1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new AdmissionregistrationV1alpha1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *AdmissionregistrationV1alpha1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new AdmissionregistrationV1alpha1Client for the given RESTClient.
+func New(c rest.Interface) *AdmissionregistrationV1alpha1Client {
+ return &AdmissionregistrationV1alpha1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1alpha1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *AdmissionregistrationV1alpha1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/doc.go
new file mode 100644
index 000000000..ba8d10d3b
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1alpha1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/externaladmissionhookconfiguration.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/externaladmissionhookconfiguration.go
new file mode 100644
index 000000000..08d68dd0d
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/externaladmissionhookconfiguration.go
@@ -0,0 +1,145 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1alpha1 "k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1"
+ rest "k8s.io/client-go/rest"
+)
+
+// ExternalAdmissionHookConfigurationsGetter has a method to return a ExternalAdmissionHookConfigurationInterface.
+// A group's client should implement this interface.
+type ExternalAdmissionHookConfigurationsGetter interface {
+ ExternalAdmissionHookConfigurations() ExternalAdmissionHookConfigurationInterface
+}
+
+// ExternalAdmissionHookConfigurationInterface has methods to work with ExternalAdmissionHookConfiguration resources.
+type ExternalAdmissionHookConfigurationInterface interface {
+ Create(*v1alpha1.ExternalAdmissionHookConfiguration) (*v1alpha1.ExternalAdmissionHookConfiguration, error)
+ Update(*v1alpha1.ExternalAdmissionHookConfiguration) (*v1alpha1.ExternalAdmissionHookConfiguration, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1alpha1.ExternalAdmissionHookConfiguration, error)
+ List(opts v1.ListOptions) (*v1alpha1.ExternalAdmissionHookConfigurationList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ExternalAdmissionHookConfiguration, err error)
+ ExternalAdmissionHookConfigurationExpansion
+}
+
+// externalAdmissionHookConfigurations implements ExternalAdmissionHookConfigurationInterface
+type externalAdmissionHookConfigurations struct {
+ client rest.Interface
+}
+
+// newExternalAdmissionHookConfigurations returns a ExternalAdmissionHookConfigurations
+func newExternalAdmissionHookConfigurations(c *AdmissionregistrationV1alpha1Client) *externalAdmissionHookConfigurations {
+ return &externalAdmissionHookConfigurations{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a externalAdmissionHookConfiguration and creates it. Returns the server's representation of the externalAdmissionHookConfiguration, and an error, if there is any.
+func (c *externalAdmissionHookConfigurations) Create(externalAdmissionHookConfiguration *v1alpha1.ExternalAdmissionHookConfiguration) (result *v1alpha1.ExternalAdmissionHookConfiguration, err error) {
+ result = &v1alpha1.ExternalAdmissionHookConfiguration{}
+ err = c.client.Post().
+ Resource("externaladmissionhookconfigurations").
+ Body(externalAdmissionHookConfiguration).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a externalAdmissionHookConfiguration and updates it. Returns the server's representation of the externalAdmissionHookConfiguration, and an error, if there is any.
+func (c *externalAdmissionHookConfigurations) Update(externalAdmissionHookConfiguration *v1alpha1.ExternalAdmissionHookConfiguration) (result *v1alpha1.ExternalAdmissionHookConfiguration, err error) {
+ result = &v1alpha1.ExternalAdmissionHookConfiguration{}
+ err = c.client.Put().
+ Resource("externaladmissionhookconfigurations").
+ Name(externalAdmissionHookConfiguration.Name).
+ Body(externalAdmissionHookConfiguration).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the externalAdmissionHookConfiguration and deletes it. Returns an error if one occurs.
+func (c *externalAdmissionHookConfigurations) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("externaladmissionhookconfigurations").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *externalAdmissionHookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("externaladmissionhookconfigurations").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the externalAdmissionHookConfiguration, and returns the corresponding externalAdmissionHookConfiguration object, and an error if there is any.
+func (c *externalAdmissionHookConfigurations) Get(name string, options v1.GetOptions) (result *v1alpha1.ExternalAdmissionHookConfiguration, err error) {
+ result = &v1alpha1.ExternalAdmissionHookConfiguration{}
+ err = c.client.Get().
+ Resource("externaladmissionhookconfigurations").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of ExternalAdmissionHookConfigurations that match those selectors.
+func (c *externalAdmissionHookConfigurations) List(opts v1.ListOptions) (result *v1alpha1.ExternalAdmissionHookConfigurationList, err error) {
+ result = &v1alpha1.ExternalAdmissionHookConfigurationList{}
+ err = c.client.Get().
+ Resource("externaladmissionhookconfigurations").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested externalAdmissionHookConfigurations.
+func (c *externalAdmissionHookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("externaladmissionhookconfigurations").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched externalAdmissionHookConfiguration.
+func (c *externalAdmissionHookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ExternalAdmissionHookConfiguration, err error) {
+ result = &v1alpha1.ExternalAdmissionHookConfiguration{}
+ err = c.client.Patch(pt).
+ Resource("externaladmissionhookconfigurations").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/generated_expansion.go
new file mode 100644
index 000000000..eef439ab4
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/generated_expansion.go
@@ -0,0 +1,21 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+type ExternalAdmissionHookConfigurationExpansion interface{}
+
+type InitializerConfigurationExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/initializerconfiguration.go b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/initializerconfiguration.go
new file mode 100644
index 000000000..25fee8502
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/initializerconfiguration.go
@@ -0,0 +1,145 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1alpha1 "k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1"
+ rest "k8s.io/client-go/rest"
+)
+
+// InitializerConfigurationsGetter has a method to return a InitializerConfigurationInterface.
+// A group's client should implement this interface.
+type InitializerConfigurationsGetter interface {
+ InitializerConfigurations() InitializerConfigurationInterface
+}
+
+// InitializerConfigurationInterface has methods to work with InitializerConfiguration resources.
+type InitializerConfigurationInterface interface {
+ Create(*v1alpha1.InitializerConfiguration) (*v1alpha1.InitializerConfiguration, error)
+ Update(*v1alpha1.InitializerConfiguration) (*v1alpha1.InitializerConfiguration, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1alpha1.InitializerConfiguration, error)
+ List(opts v1.ListOptions) (*v1alpha1.InitializerConfigurationList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.InitializerConfiguration, err error)
+ InitializerConfigurationExpansion
+}
+
+// initializerConfigurations implements InitializerConfigurationInterface
+type initializerConfigurations struct {
+ client rest.Interface
+}
+
+// newInitializerConfigurations returns a InitializerConfigurations
+func newInitializerConfigurations(c *AdmissionregistrationV1alpha1Client) *initializerConfigurations {
+ return &initializerConfigurations{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a initializerConfiguration and creates it. Returns the server's representation of the initializerConfiguration, and an error, if there is any.
+func (c *initializerConfigurations) Create(initializerConfiguration *v1alpha1.InitializerConfiguration) (result *v1alpha1.InitializerConfiguration, err error) {
+ result = &v1alpha1.InitializerConfiguration{}
+ err = c.client.Post().
+ Resource("initializerconfigurations").
+ Body(initializerConfiguration).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a initializerConfiguration and updates it. Returns the server's representation of the initializerConfiguration, and an error, if there is any.
+func (c *initializerConfigurations) Update(initializerConfiguration *v1alpha1.InitializerConfiguration) (result *v1alpha1.InitializerConfiguration, err error) {
+ result = &v1alpha1.InitializerConfiguration{}
+ err = c.client.Put().
+ Resource("initializerconfigurations").
+ Name(initializerConfiguration.Name).
+ Body(initializerConfiguration).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the initializerConfiguration and deletes it. Returns an error if one occurs.
+func (c *initializerConfigurations) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("initializerconfigurations").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *initializerConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("initializerconfigurations").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the initializerConfiguration, and returns the corresponding initializerConfiguration object, and an error if there is any.
+func (c *initializerConfigurations) Get(name string, options v1.GetOptions) (result *v1alpha1.InitializerConfiguration, err error) {
+ result = &v1alpha1.InitializerConfiguration{}
+ err = c.client.Get().
+ Resource("initializerconfigurations").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of InitializerConfigurations that match those selectors.
+func (c *initializerConfigurations) List(opts v1.ListOptions) (result *v1alpha1.InitializerConfigurationList, err error) {
+ result = &v1alpha1.InitializerConfigurationList{}
+ err = c.client.Get().
+ Resource("initializerconfigurations").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested initializerConfigurations.
+func (c *initializerConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("initializerconfigurations").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched initializerConfiguration.
+func (c *initializerConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.InitializerConfiguration, err error) {
+ result = &v1alpha1.InitializerConfiguration{}
+ err = c.client.Patch(pt).
+ Resource("initializerconfigurations").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/apps_client.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/apps_client.go
new file mode 100644
index 000000000..c18da39f6
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/apps_client.go
@@ -0,0 +1,103 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ "k8s.io/client-go/kubernetes/scheme"
+ v1beta1 "k8s.io/client-go/pkg/apis/apps/v1beta1"
+ rest "k8s.io/client-go/rest"
+)
+
+type AppsV1beta1Interface interface {
+ RESTClient() rest.Interface
+ ControllerRevisionsGetter
+ DeploymentsGetter
+ ScalesGetter
+ StatefulSetsGetter
+}
+
+// AppsV1beta1Client is used to interact with features provided by the apps group.
+type AppsV1beta1Client struct {
+ restClient rest.Interface
+}
+
+func (c *AppsV1beta1Client) ControllerRevisions(namespace string) ControllerRevisionInterface {
+ return newControllerRevisions(c, namespace)
+}
+
+func (c *AppsV1beta1Client) Deployments(namespace string) DeploymentInterface {
+ return newDeployments(c, namespace)
+}
+
+func (c *AppsV1beta1Client) Scales(namespace string) ScaleInterface {
+ return newScales(c, namespace)
+}
+
+func (c *AppsV1beta1Client) StatefulSets(namespace string) StatefulSetInterface {
+ return newStatefulSets(c, namespace)
+}
+
+// NewForConfig creates a new AppsV1beta1Client for the given config.
+func NewForConfig(c *rest.Config) (*AppsV1beta1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &AppsV1beta1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new AppsV1beta1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *AppsV1beta1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new AppsV1beta1Client for the given RESTClient.
+func New(c rest.Interface) *AppsV1beta1Client {
+ return &AppsV1beta1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1beta1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *AppsV1beta1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go
new file mode 100644
index 000000000..de24bbb58
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1beta1 "k8s.io/client-go/pkg/apis/apps/v1beta1"
+ rest "k8s.io/client-go/rest"
+)
+
+// ControllerRevisionsGetter has a method to return a ControllerRevisionInterface.
+// A group's client should implement this interface.
+type ControllerRevisionsGetter interface {
+ ControllerRevisions(namespace string) ControllerRevisionInterface
+}
+
+// ControllerRevisionInterface has methods to work with ControllerRevision resources.
+type ControllerRevisionInterface interface {
+ Create(*v1beta1.ControllerRevision) (*v1beta1.ControllerRevision, error)
+ Update(*v1beta1.ControllerRevision) (*v1beta1.ControllerRevision, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.ControllerRevision, error)
+ List(opts v1.ListOptions) (*v1beta1.ControllerRevisionList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ControllerRevision, err error)
+ ControllerRevisionExpansion
+}
+
+// controllerRevisions implements ControllerRevisionInterface
+type controllerRevisions struct {
+ client rest.Interface
+ ns string
+}
+
+// newControllerRevisions returns a ControllerRevisions
+func newControllerRevisions(c *AppsV1beta1Client, namespace string) *controllerRevisions {
+ return &controllerRevisions{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any.
+func (c *controllerRevisions) Create(controllerRevision *v1beta1.ControllerRevision) (result *v1beta1.ControllerRevision, err error) {
+ result = &v1beta1.ControllerRevision{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("controllerrevisions").
+ Body(controllerRevision).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any.
+func (c *controllerRevisions) Update(controllerRevision *v1beta1.ControllerRevision) (result *v1beta1.ControllerRevision, err error) {
+ result = &v1beta1.ControllerRevision{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("controllerrevisions").
+ Name(controllerRevision.Name).
+ Body(controllerRevision).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs.
+func (c *controllerRevisions) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("controllerrevisions").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *controllerRevisions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("controllerrevisions").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any.
+func (c *controllerRevisions) Get(name string, options v1.GetOptions) (result *v1beta1.ControllerRevision, err error) {
+ result = &v1beta1.ControllerRevision{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("controllerrevisions").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors.
+func (c *controllerRevisions) List(opts v1.ListOptions) (result *v1beta1.ControllerRevisionList, err error) {
+ result = &v1beta1.ControllerRevisionList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("controllerrevisions").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested controllerRevisions.
+func (c *controllerRevisions) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("controllerrevisions").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched controllerRevision.
+func (c *controllerRevisions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ControllerRevision, err error) {
+ result = &v1beta1.ControllerRevision{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("controllerrevisions").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go
new file mode 100644
index 000000000..b30965ee7
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1beta1 "k8s.io/client-go/pkg/apis/apps/v1beta1"
+ rest "k8s.io/client-go/rest"
+)
+
+// DeploymentsGetter has a method to return a DeploymentInterface.
+// A group's client should implement this interface.
+type DeploymentsGetter interface {
+ Deployments(namespace string) DeploymentInterface
+}
+
+// DeploymentInterface has methods to work with Deployment resources.
+type DeploymentInterface interface {
+ Create(*v1beta1.Deployment) (*v1beta1.Deployment, error)
+ Update(*v1beta1.Deployment) (*v1beta1.Deployment, error)
+ UpdateStatus(*v1beta1.Deployment) (*v1beta1.Deployment, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.Deployment, error)
+ List(opts v1.ListOptions) (*v1beta1.DeploymentList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error)
+ DeploymentExpansion
+}
+
+// deployments implements DeploymentInterface
+type deployments struct {
+ client rest.Interface
+ ns string
+}
+
+// newDeployments returns a Deployments
+func newDeployments(c *AppsV1beta1Client, namespace string) *deployments {
+ return &deployments{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any.
+func (c *deployments) Create(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
+ result = &v1beta1.Deployment{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("deployments").
+ Body(deployment).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any.
+func (c *deployments) Update(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
+ result = &v1beta1.Deployment{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("deployments").
+ Name(deployment.Name).
+ Body(deployment).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *deployments) UpdateStatus(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
+ result = &v1beta1.Deployment{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("deployments").
+ Name(deployment.Name).
+ SubResource("status").
+ Body(deployment).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the deployment and deletes it. Returns an error if one occurs.
+func (c *deployments) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("deployments").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("deployments").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any.
+func (c *deployments) Get(name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) {
+ result = &v1beta1.Deployment{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("deployments").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Deployments that match those selectors.
+func (c *deployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) {
+ result = &v1beta1.DeploymentList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("deployments").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested deployments.
+func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("deployments").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched deployment.
+func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) {
+ result = &v1beta1.Deployment{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("deployments").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/doc.go
new file mode 100644
index 000000000..11b523897
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1beta1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/generated_expansion.go
new file mode 100644
index 000000000..a091b902a
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/generated_expansion.go
@@ -0,0 +1,25 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+type ControllerRevisionExpansion interface{}
+
+type DeploymentExpansion interface{}
+
+type ScaleExpansion interface{}
+
+type StatefulSetExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/scale.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/scale.go
new file mode 100644
index 000000000..d3bf9e103
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/scale.go
@@ -0,0 +1,46 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ rest "k8s.io/client-go/rest"
+)
+
+// ScalesGetter has a method to return a ScaleInterface.
+// A group's client should implement this interface.
+type ScalesGetter interface {
+ Scales(namespace string) ScaleInterface
+}
+
+// ScaleInterface has methods to work with Scale resources.
+type ScaleInterface interface {
+ ScaleExpansion
+}
+
+// scales implements ScaleInterface
+type scales struct {
+ client rest.Interface
+ ns string
+}
+
+// newScales returns a Scales
+func newScales(c *AppsV1beta1Client, namespace string) *scales {
+ return &scales{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go
new file mode 100644
index 000000000..8b5a7822f
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1beta1 "k8s.io/client-go/pkg/apis/apps/v1beta1"
+ rest "k8s.io/client-go/rest"
+)
+
+// StatefulSetsGetter has a method to return a StatefulSetInterface.
+// A group's client should implement this interface.
+type StatefulSetsGetter interface {
+ StatefulSets(namespace string) StatefulSetInterface
+}
+
+// StatefulSetInterface has methods to work with StatefulSet resources.
+type StatefulSetInterface interface {
+ Create(*v1beta1.StatefulSet) (*v1beta1.StatefulSet, error)
+ Update(*v1beta1.StatefulSet) (*v1beta1.StatefulSet, error)
+ UpdateStatus(*v1beta1.StatefulSet) (*v1beta1.StatefulSet, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.StatefulSet, error)
+ List(opts v1.ListOptions) (*v1beta1.StatefulSetList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error)
+ StatefulSetExpansion
+}
+
+// statefulSets implements StatefulSetInterface
+type statefulSets struct {
+ client rest.Interface
+ ns string
+}
+
+// newStatefulSets returns a StatefulSets
+func newStatefulSets(c *AppsV1beta1Client, namespace string) *statefulSets {
+ return &statefulSets{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any.
+func (c *statefulSets) Create(statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) {
+ result = &v1beta1.StatefulSet{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("statefulsets").
+ Body(statefulSet).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any.
+func (c *statefulSets) Update(statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) {
+ result = &v1beta1.StatefulSet{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("statefulsets").
+ Name(statefulSet.Name).
+ Body(statefulSet).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *statefulSets) UpdateStatus(statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) {
+ result = &v1beta1.StatefulSet{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("statefulsets").
+ Name(statefulSet.Name).
+ SubResource("status").
+ Body(statefulSet).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs.
+func (c *statefulSets) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("statefulsets").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *statefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("statefulsets").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any.
+func (c *statefulSets) Get(name string, options v1.GetOptions) (result *v1beta1.StatefulSet, err error) {
+ result = &v1beta1.StatefulSet{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("statefulsets").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of StatefulSets that match those selectors.
+func (c *statefulSets) List(opts v1.ListOptions) (result *v1beta1.StatefulSetList, err error) {
+ result = &v1beta1.StatefulSetList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("statefulsets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested statefulSets.
+func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("statefulsets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched statefulSet.
+func (c *statefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) {
+ result = &v1beta1.StatefulSet{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("statefulsets").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/authentication_client.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/authentication_client.go
new file mode 100644
index 000000000..bd53fc249
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/authentication_client.go
@@ -0,0 +1,88 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ "k8s.io/client-go/kubernetes/scheme"
+ v1 "k8s.io/client-go/pkg/apis/authentication/v1"
+ rest "k8s.io/client-go/rest"
+)
+
+type AuthenticationV1Interface interface {
+ RESTClient() rest.Interface
+ TokenReviewsGetter
+}
+
+// AuthenticationV1Client is used to interact with features provided by the authentication.k8s.io group.
+type AuthenticationV1Client struct {
+ restClient rest.Interface
+}
+
+func (c *AuthenticationV1Client) TokenReviews() TokenReviewInterface {
+ return newTokenReviews(c)
+}
+
+// NewForConfig creates a new AuthenticationV1Client for the given config.
+func NewForConfig(c *rest.Config) (*AuthenticationV1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &AuthenticationV1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new AuthenticationV1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *AuthenticationV1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new AuthenticationV1Client for the given RESTClient.
+func New(c rest.Interface) *AuthenticationV1Client {
+ return &AuthenticationV1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *AuthenticationV1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/doc.go
new file mode 100644
index 000000000..54673bfa7
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/generated_expansion.go
new file mode 100644
index 000000000..42e76d5e4
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/generated_expansion.go
@@ -0,0 +1,17 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview.go
new file mode 100644
index 000000000..9cfef4e6a
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview.go
@@ -0,0 +1,44 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ rest "k8s.io/client-go/rest"
+)
+
+// TokenReviewsGetter has a method to return a TokenReviewInterface.
+// A group's client should implement this interface.
+type TokenReviewsGetter interface {
+ TokenReviews() TokenReviewInterface
+}
+
+// TokenReviewInterface has methods to work with TokenReview resources.
+type TokenReviewInterface interface {
+ TokenReviewExpansion
+}
+
+// tokenReviews implements TokenReviewInterface
+type tokenReviews struct {
+ client rest.Interface
+}
+
+// newTokenReviews returns a TokenReviews
+func newTokenReviews(c *AuthenticationV1Client) *tokenReviews {
+ return &tokenReviews{
+ client: c.RESTClient(),
+ }
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview_expansion.go
new file mode 100644
index 000000000..fb41782fe
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview_expansion.go
@@ -0,0 +1,35 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ authenticationapi "k8s.io/client-go/pkg/apis/authentication/v1"
+)
+
+type TokenReviewExpansion interface {
+ Create(tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error)
+}
+
+func (c *tokenReviews) Create(tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) {
+ result = &authenticationapi.TokenReview{}
+ err = c.client.Post().
+ Resource("tokenreviews").
+ Body(tokenReview).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/authentication_client.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/authentication_client.go
new file mode 100644
index 000000000..419dc2cb6
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/authentication_client.go
@@ -0,0 +1,88 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ "k8s.io/client-go/kubernetes/scheme"
+ v1beta1 "k8s.io/client-go/pkg/apis/authentication/v1beta1"
+ rest "k8s.io/client-go/rest"
+)
+
+type AuthenticationV1beta1Interface interface {
+ RESTClient() rest.Interface
+ TokenReviewsGetter
+}
+
+// AuthenticationV1beta1Client is used to interact with features provided by the authentication.k8s.io group.
+type AuthenticationV1beta1Client struct {
+ restClient rest.Interface
+}
+
+func (c *AuthenticationV1beta1Client) TokenReviews() TokenReviewInterface {
+ return newTokenReviews(c)
+}
+
+// NewForConfig creates a new AuthenticationV1beta1Client for the given config.
+func NewForConfig(c *rest.Config) (*AuthenticationV1beta1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &AuthenticationV1beta1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new AuthenticationV1beta1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *AuthenticationV1beta1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new AuthenticationV1beta1Client for the given RESTClient.
+func New(c rest.Interface) *AuthenticationV1beta1Client {
+ return &AuthenticationV1beta1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1beta1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *AuthenticationV1beta1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/doc.go
new file mode 100644
index 000000000..11b523897
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1beta1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/generated_expansion.go
new file mode 100644
index 000000000..2b7e8ca0b
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/generated_expansion.go
@@ -0,0 +1,17 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview.go
new file mode 100644
index 000000000..7f9f1e9fa
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview.go
@@ -0,0 +1,44 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ rest "k8s.io/client-go/rest"
+)
+
+// TokenReviewsGetter has a method to return a TokenReviewInterface.
+// A group's client should implement this interface.
+type TokenReviewsGetter interface {
+ TokenReviews() TokenReviewInterface
+}
+
+// TokenReviewInterface has methods to work with TokenReview resources.
+type TokenReviewInterface interface {
+ TokenReviewExpansion
+}
+
+// tokenReviews implements TokenReviewInterface
+type tokenReviews struct {
+ client rest.Interface
+}
+
+// newTokenReviews returns a TokenReviews
+func newTokenReviews(c *AuthenticationV1beta1Client) *tokenReviews {
+ return &tokenReviews{
+ client: c.RESTClient(),
+ }
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview_expansion.go
new file mode 100644
index 000000000..375b6f637
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview_expansion.go
@@ -0,0 +1,35 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ authenticationapi "k8s.io/client-go/pkg/apis/authentication/v1beta1"
+)
+
+type TokenReviewExpansion interface {
+ Create(tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error)
+}
+
+func (c *tokenReviews) Create(tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) {
+ result = &authenticationapi.TokenReview{}
+ err = c.client.Post().
+ Resource("tokenreviews").
+ Body(tokenReview).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/authorization_client.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/authorization_client.go
new file mode 100644
index 000000000..af2924a30
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/authorization_client.go
@@ -0,0 +1,98 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ "k8s.io/client-go/kubernetes/scheme"
+ v1 "k8s.io/client-go/pkg/apis/authorization/v1"
+ rest "k8s.io/client-go/rest"
+)
+
+type AuthorizationV1Interface interface {
+ RESTClient() rest.Interface
+ LocalSubjectAccessReviewsGetter
+ SelfSubjectAccessReviewsGetter
+ SubjectAccessReviewsGetter
+}
+
+// AuthorizationV1Client is used to interact with features provided by the authorization.k8s.io group.
+type AuthorizationV1Client struct {
+ restClient rest.Interface
+}
+
+func (c *AuthorizationV1Client) LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewInterface {
+ return newLocalSubjectAccessReviews(c, namespace)
+}
+
+func (c *AuthorizationV1Client) SelfSubjectAccessReviews() SelfSubjectAccessReviewInterface {
+ return newSelfSubjectAccessReviews(c)
+}
+
+func (c *AuthorizationV1Client) SubjectAccessReviews() SubjectAccessReviewInterface {
+ return newSubjectAccessReviews(c)
+}
+
+// NewForConfig creates a new AuthorizationV1Client for the given config.
+func NewForConfig(c *rest.Config) (*AuthorizationV1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &AuthorizationV1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new AuthorizationV1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *AuthorizationV1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new AuthorizationV1Client for the given RESTClient.
+func New(c rest.Interface) *AuthorizationV1Client {
+ return &AuthorizationV1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *AuthorizationV1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/doc.go
new file mode 100644
index 000000000..54673bfa7
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/generated_expansion.go
new file mode 100644
index 000000000..42e76d5e4
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/generated_expansion.go
@@ -0,0 +1,17 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview.go
new file mode 100644
index 000000000..b2085bceb
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview.go
@@ -0,0 +1,46 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ rest "k8s.io/client-go/rest"
+)
+
+// LocalSubjectAccessReviewsGetter has a method to return a LocalSubjectAccessReviewInterface.
+// A group's client should implement this interface.
+type LocalSubjectAccessReviewsGetter interface {
+ LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewInterface
+}
+
+// LocalSubjectAccessReviewInterface has methods to work with LocalSubjectAccessReview resources.
+type LocalSubjectAccessReviewInterface interface {
+ LocalSubjectAccessReviewExpansion
+}
+
+// localSubjectAccessReviews implements LocalSubjectAccessReviewInterface
+type localSubjectAccessReviews struct {
+ client rest.Interface
+ ns string
+}
+
+// newLocalSubjectAccessReviews returns a LocalSubjectAccessReviews
+func newLocalSubjectAccessReviews(c *AuthorizationV1Client, namespace string) *localSubjectAccessReviews {
+ return &localSubjectAccessReviews{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview_expansion.go
new file mode 100644
index 000000000..c3b487c72
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview_expansion.go
@@ -0,0 +1,36 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ authorizationapi "k8s.io/client-go/pkg/apis/authorization/v1"
+)
+
+type LocalSubjectAccessReviewExpansion interface {
+ Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error)
+}
+
+func (c *localSubjectAccessReviews) Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) {
+ result = &authorizationapi.LocalSubjectAccessReview{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("localsubjectaccessreviews").
+ Body(sar).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview.go
new file mode 100644
index 000000000..cfb019eaa
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview.go
@@ -0,0 +1,44 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ rest "k8s.io/client-go/rest"
+)
+
+// SelfSubjectAccessReviewsGetter has a method to return a SelfSubjectAccessReviewInterface.
+// A group's client should implement this interface.
+type SelfSubjectAccessReviewsGetter interface {
+ SelfSubjectAccessReviews() SelfSubjectAccessReviewInterface
+}
+
+// SelfSubjectAccessReviewInterface has methods to work with SelfSubjectAccessReview resources.
+type SelfSubjectAccessReviewInterface interface {
+ SelfSubjectAccessReviewExpansion
+}
+
+// selfSubjectAccessReviews implements SelfSubjectAccessReviewInterface
+type selfSubjectAccessReviews struct {
+ client rest.Interface
+}
+
+// newSelfSubjectAccessReviews returns a SelfSubjectAccessReviews
+func newSelfSubjectAccessReviews(c *AuthorizationV1Client) *selfSubjectAccessReviews {
+ return &selfSubjectAccessReviews{
+ client: c.RESTClient(),
+ }
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview_expansion.go
new file mode 100644
index 000000000..107615080
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview_expansion.go
@@ -0,0 +1,35 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ authorizationapi "k8s.io/client-go/pkg/apis/authorization/v1"
+)
+
+type SelfSubjectAccessReviewExpansion interface {
+ Create(sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error)
+}
+
+func (c *selfSubjectAccessReviews) Create(sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) {
+ result = &authorizationapi.SelfSubjectAccessReview{}
+ err = c.client.Post().
+ Resource("selfsubjectaccessreviews").
+ Body(sar).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview.go
new file mode 100644
index 000000000..08f6d6095
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview.go
@@ -0,0 +1,44 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ rest "k8s.io/client-go/rest"
+)
+
+// SubjectAccessReviewsGetter has a method to return a SubjectAccessReviewInterface.
+// A group's client should implement this interface.
+type SubjectAccessReviewsGetter interface {
+ SubjectAccessReviews() SubjectAccessReviewInterface
+}
+
+// SubjectAccessReviewInterface has methods to work with SubjectAccessReview resources.
+type SubjectAccessReviewInterface interface {
+ SubjectAccessReviewExpansion
+}
+
+// subjectAccessReviews implements SubjectAccessReviewInterface
+type subjectAccessReviews struct {
+ client rest.Interface
+}
+
+// newSubjectAccessReviews returns a SubjectAccessReviews
+func newSubjectAccessReviews(c *AuthorizationV1Client) *subjectAccessReviews {
+ return &subjectAccessReviews{
+ client: c.RESTClient(),
+ }
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview_expansion.go
new file mode 100644
index 000000000..dfdf6521a
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview_expansion.go
@@ -0,0 +1,36 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ authorizationapi "k8s.io/client-go/pkg/apis/authorization/v1"
+)
+
+// The SubjectAccessReviewExpansion interface allows manually adding extra methods to the AuthorizationInterface.
+type SubjectAccessReviewExpansion interface {
+ Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error)
+}
+
+func (c *subjectAccessReviews) Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) {
+ result = &authorizationapi.SubjectAccessReview{}
+ err = c.client.Post().
+ Resource("subjectaccessreviews").
+ Body(sar).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/authorization_client.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/authorization_client.go
new file mode 100644
index 000000000..b49b3b30b
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/authorization_client.go
@@ -0,0 +1,98 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ "k8s.io/client-go/kubernetes/scheme"
+ v1beta1 "k8s.io/client-go/pkg/apis/authorization/v1beta1"
+ rest "k8s.io/client-go/rest"
+)
+
+type AuthorizationV1beta1Interface interface {
+ RESTClient() rest.Interface
+ LocalSubjectAccessReviewsGetter
+ SelfSubjectAccessReviewsGetter
+ SubjectAccessReviewsGetter
+}
+
+// AuthorizationV1beta1Client is used to interact with features provided by the authorization.k8s.io group.
+type AuthorizationV1beta1Client struct {
+ restClient rest.Interface
+}
+
+func (c *AuthorizationV1beta1Client) LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewInterface {
+ return newLocalSubjectAccessReviews(c, namespace)
+}
+
+func (c *AuthorizationV1beta1Client) SelfSubjectAccessReviews() SelfSubjectAccessReviewInterface {
+ return newSelfSubjectAccessReviews(c)
+}
+
+func (c *AuthorizationV1beta1Client) SubjectAccessReviews() SubjectAccessReviewInterface {
+ return newSubjectAccessReviews(c)
+}
+
+// NewForConfig creates a new AuthorizationV1beta1Client for the given config.
+func NewForConfig(c *rest.Config) (*AuthorizationV1beta1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &AuthorizationV1beta1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new AuthorizationV1beta1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *AuthorizationV1beta1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new AuthorizationV1beta1Client for the given RESTClient.
+func New(c rest.Interface) *AuthorizationV1beta1Client {
+ return &AuthorizationV1beta1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1beta1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *AuthorizationV1beta1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/doc.go
new file mode 100644
index 000000000..11b523897
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1beta1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/generated_expansion.go
new file mode 100644
index 000000000..2b7e8ca0b
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/generated_expansion.go
@@ -0,0 +1,17 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go
new file mode 100644
index 000000000..9b8e10341
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go
@@ -0,0 +1,46 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ rest "k8s.io/client-go/rest"
+)
+
+// LocalSubjectAccessReviewsGetter has a method to return a LocalSubjectAccessReviewInterface.
+// A group's client should implement this interface.
+type LocalSubjectAccessReviewsGetter interface {
+ LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewInterface
+}
+
+// LocalSubjectAccessReviewInterface has methods to work with LocalSubjectAccessReview resources.
+type LocalSubjectAccessReviewInterface interface {
+ LocalSubjectAccessReviewExpansion
+}
+
+// localSubjectAccessReviews implements LocalSubjectAccessReviewInterface
+type localSubjectAccessReviews struct {
+ client rest.Interface
+ ns string
+}
+
+// newLocalSubjectAccessReviews returns a LocalSubjectAccessReviews
+func newLocalSubjectAccessReviews(c *AuthorizationV1beta1Client, namespace string) *localSubjectAccessReviews {
+ return &localSubjectAccessReviews{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview_expansion.go
new file mode 100644
index 000000000..d2ce4f0d7
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview_expansion.go
@@ -0,0 +1,36 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ authorizationapi "k8s.io/client-go/pkg/apis/authorization/v1beta1"
+)
+
+type LocalSubjectAccessReviewExpansion interface {
+ Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error)
+}
+
+func (c *localSubjectAccessReviews) Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) {
+ result = &authorizationapi.LocalSubjectAccessReview{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("localsubjectaccessreviews").
+ Body(sar).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go
new file mode 100644
index 000000000..1ef3e49af
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go
@@ -0,0 +1,44 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ rest "k8s.io/client-go/rest"
+)
+
+// SelfSubjectAccessReviewsGetter has a method to return a SelfSubjectAccessReviewInterface.
+// A group's client should implement this interface.
+type SelfSubjectAccessReviewsGetter interface {
+ SelfSubjectAccessReviews() SelfSubjectAccessReviewInterface
+}
+
+// SelfSubjectAccessReviewInterface has methods to work with SelfSubjectAccessReview resources.
+type SelfSubjectAccessReviewInterface interface {
+ SelfSubjectAccessReviewExpansion
+}
+
+// selfSubjectAccessReviews implements SelfSubjectAccessReviewInterface
+type selfSubjectAccessReviews struct {
+ client rest.Interface
+}
+
+// newSelfSubjectAccessReviews returns a SelfSubjectAccessReviews
+func newSelfSubjectAccessReviews(c *AuthorizationV1beta1Client) *selfSubjectAccessReviews {
+ return &selfSubjectAccessReviews{
+ client: c.RESTClient(),
+ }
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview_expansion.go
new file mode 100644
index 000000000..d341eb14a
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview_expansion.go
@@ -0,0 +1,35 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ authorizationapi "k8s.io/client-go/pkg/apis/authorization/v1beta1"
+)
+
+type SelfSubjectAccessReviewExpansion interface {
+ Create(sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error)
+}
+
+func (c *selfSubjectAccessReviews) Create(sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) {
+ result = &authorizationapi.SelfSubjectAccessReview{}
+ err = c.client.Post().
+ Resource("selfsubjectaccessreviews").
+ Body(sar).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go
new file mode 100644
index 000000000..cd60e9df6
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go
@@ -0,0 +1,44 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ rest "k8s.io/client-go/rest"
+)
+
+// SubjectAccessReviewsGetter has a method to return a SubjectAccessReviewInterface.
+// A group's client should implement this interface.
+type SubjectAccessReviewsGetter interface {
+ SubjectAccessReviews() SubjectAccessReviewInterface
+}
+
+// SubjectAccessReviewInterface has methods to work with SubjectAccessReview resources.
+type SubjectAccessReviewInterface interface {
+ SubjectAccessReviewExpansion
+}
+
+// subjectAccessReviews implements SubjectAccessReviewInterface
+type subjectAccessReviews struct {
+ client rest.Interface
+}
+
+// newSubjectAccessReviews returns a SubjectAccessReviews
+func newSubjectAccessReviews(c *AuthorizationV1beta1Client) *subjectAccessReviews {
+ return &subjectAccessReviews{
+ client: c.RESTClient(),
+ }
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview_expansion.go
new file mode 100644
index 000000000..8d03b0811
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview_expansion.go
@@ -0,0 +1,36 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ authorizationapi "k8s.io/client-go/pkg/apis/authorization/v1beta1"
+)
+
+// The SubjectAccessReviewExpansion interface allows manually adding extra methods to the AuthorizationInterface.
+type SubjectAccessReviewExpansion interface {
+ Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error)
+}
+
+func (c *subjectAccessReviews) Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) {
+ result = &authorizationapi.SubjectAccessReview{}
+ err = c.client.Post().
+ Resource("subjectaccessreviews").
+ Body(sar).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/autoscaling_client.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/autoscaling_client.go
new file mode 100644
index 000000000..b235891c9
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/autoscaling_client.go
@@ -0,0 +1,88 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ "k8s.io/client-go/kubernetes/scheme"
+ v1 "k8s.io/client-go/pkg/apis/autoscaling/v1"
+ rest "k8s.io/client-go/rest"
+)
+
+type AutoscalingV1Interface interface {
+ RESTClient() rest.Interface
+ HorizontalPodAutoscalersGetter
+}
+
+// AutoscalingV1Client is used to interact with features provided by the autoscaling group.
+type AutoscalingV1Client struct {
+ restClient rest.Interface
+}
+
+func (c *AutoscalingV1Client) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface {
+ return newHorizontalPodAutoscalers(c, namespace)
+}
+
+// NewForConfig creates a new AutoscalingV1Client for the given config.
+func NewForConfig(c *rest.Config) (*AutoscalingV1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &AutoscalingV1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new AutoscalingV1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *AutoscalingV1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new AutoscalingV1Client for the given RESTClient.
+func New(c rest.Interface) *AutoscalingV1Client {
+ return &AutoscalingV1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *AutoscalingV1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/doc.go
new file mode 100644
index 000000000..54673bfa7
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/generated_expansion.go
new file mode 100644
index 000000000..effefbd50
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/generated_expansion.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+type HorizontalPodAutoscalerExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go
new file mode 100644
index 000000000..f9c790af2
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1 "k8s.io/client-go/pkg/apis/autoscaling/v1"
+ rest "k8s.io/client-go/rest"
+)
+
+// HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface.
+// A group's client should implement this interface.
+type HorizontalPodAutoscalersGetter interface {
+ HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface
+}
+
+// HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources.
+type HorizontalPodAutoscalerInterface interface {
+ Create(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
+ Update(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
+ UpdateStatus(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.HorizontalPodAutoscaler, error)
+ List(opts meta_v1.ListOptions) (*v1.HorizontalPodAutoscalerList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error)
+ HorizontalPodAutoscalerExpansion
+}
+
+// horizontalPodAutoscalers implements HorizontalPodAutoscalerInterface
+type horizontalPodAutoscalers struct {
+ client rest.Interface
+ ns string
+}
+
+// newHorizontalPodAutoscalers returns a HorizontalPodAutoscalers
+func newHorizontalPodAutoscalers(c *AutoscalingV1Client, namespace string) *horizontalPodAutoscalers {
+ return &horizontalPodAutoscalers{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
+func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) {
+ result = &v1.HorizontalPodAutoscaler{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ Body(horizontalPodAutoscaler).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
+func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) {
+ result = &v1.HorizontalPodAutoscaler{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ Name(horizontalPodAutoscaler.Name).
+ Body(horizontalPodAutoscaler).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) {
+ result = &v1.HorizontalPodAutoscaler{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ Name(horizontalPodAutoscaler.Name).
+ SubResource("status").
+ Body(horizontalPodAutoscaler).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
+func (c *horizontalPodAutoscalers) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *horizontalPodAutoscalers) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any.
+func (c *horizontalPodAutoscalers) Get(name string, options meta_v1.GetOptions) (result *v1.HorizontalPodAutoscaler, err error) {
+ result = &v1.HorizontalPodAutoscaler{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
+func (c *horizontalPodAutoscalers) List(opts meta_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) {
+ result = &v1.HorizontalPodAutoscalerList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
+func (c *horizontalPodAutoscalers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched horizontalPodAutoscaler.
+func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) {
+ result = &v1.HorizontalPodAutoscaler{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/autoscaling_client.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/autoscaling_client.go
new file mode 100644
index 000000000..0d16aa3e9
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/autoscaling_client.go
@@ -0,0 +1,88 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ "k8s.io/client-go/kubernetes/scheme"
+ v2alpha1 "k8s.io/client-go/pkg/apis/autoscaling/v2alpha1"
+ rest "k8s.io/client-go/rest"
+)
+
+type AutoscalingV2alpha1Interface interface {
+ RESTClient() rest.Interface
+ HorizontalPodAutoscalersGetter
+}
+
+// AutoscalingV2alpha1Client is used to interact with features provided by the autoscaling group.
+type AutoscalingV2alpha1Client struct {
+ restClient rest.Interface
+}
+
+func (c *AutoscalingV2alpha1Client) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface {
+ return newHorizontalPodAutoscalers(c, namespace)
+}
+
+// NewForConfig creates a new AutoscalingV2alpha1Client for the given config.
+func NewForConfig(c *rest.Config) (*AutoscalingV2alpha1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &AutoscalingV2alpha1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new AutoscalingV2alpha1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *AutoscalingV2alpha1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new AutoscalingV2alpha1Client for the given RESTClient.
+func New(c rest.Interface) *AutoscalingV2alpha1Client {
+ return &AutoscalingV2alpha1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v2alpha1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *AutoscalingV2alpha1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/doc.go
new file mode 100644
index 000000000..d29bd3f4e
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v2alpha1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/generated_expansion.go
new file mode 100644
index 000000000..e40f2c5a1
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/generated_expansion.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+type HorizontalPodAutoscalerExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/horizontalpodautoscaler.go b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/horizontalpodautoscaler.go
new file mode 100644
index 000000000..c85bfd9f3
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/horizontalpodautoscaler.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v2alpha1 "k8s.io/client-go/pkg/apis/autoscaling/v2alpha1"
+ rest "k8s.io/client-go/rest"
+)
+
+// HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface.
+// A group's client should implement this interface.
+type HorizontalPodAutoscalersGetter interface {
+ HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface
+}
+
+// HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources.
+type HorizontalPodAutoscalerInterface interface {
+ Create(*v2alpha1.HorizontalPodAutoscaler) (*v2alpha1.HorizontalPodAutoscaler, error)
+ Update(*v2alpha1.HorizontalPodAutoscaler) (*v2alpha1.HorizontalPodAutoscaler, error)
+ UpdateStatus(*v2alpha1.HorizontalPodAutoscaler) (*v2alpha1.HorizontalPodAutoscaler, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v2alpha1.HorizontalPodAutoscaler, error)
+ List(opts v1.ListOptions) (*v2alpha1.HorizontalPodAutoscalerList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.HorizontalPodAutoscaler, err error)
+ HorizontalPodAutoscalerExpansion
+}
+
+// horizontalPodAutoscalers implements HorizontalPodAutoscalerInterface
+type horizontalPodAutoscalers struct {
+ client rest.Interface
+ ns string
+}
+
+// newHorizontalPodAutoscalers returns a HorizontalPodAutoscalers
+func newHorizontalPodAutoscalers(c *AutoscalingV2alpha1Client, namespace string) *horizontalPodAutoscalers {
+ return &horizontalPodAutoscalers{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
+func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *v2alpha1.HorizontalPodAutoscaler) (result *v2alpha1.HorizontalPodAutoscaler, err error) {
+ result = &v2alpha1.HorizontalPodAutoscaler{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ Body(horizontalPodAutoscaler).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
+func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2alpha1.HorizontalPodAutoscaler) (result *v2alpha1.HorizontalPodAutoscaler, err error) {
+ result = &v2alpha1.HorizontalPodAutoscaler{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ Name(horizontalPodAutoscaler.Name).
+ Body(horizontalPodAutoscaler).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v2alpha1.HorizontalPodAutoscaler) (result *v2alpha1.HorizontalPodAutoscaler, err error) {
+ result = &v2alpha1.HorizontalPodAutoscaler{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ Name(horizontalPodAutoscaler.Name).
+ SubResource("status").
+ Body(horizontalPodAutoscaler).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
+func (c *horizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *horizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any.
+func (c *horizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *v2alpha1.HorizontalPodAutoscaler, err error) {
+ result = &v2alpha1.HorizontalPodAutoscaler{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
+func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2alpha1.HorizontalPodAutoscalerList, err error) {
+ result = &v2alpha1.HorizontalPodAutoscalerList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
+func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched horizontalPodAutoscaler.
+func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.HorizontalPodAutoscaler, err error) {
+ result = &v2alpha1.HorizontalPodAutoscaler{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/batch_client.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/batch_client.go
new file mode 100644
index 000000000..c8766f5b6
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/batch_client.go
@@ -0,0 +1,88 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ "k8s.io/client-go/kubernetes/scheme"
+ v1 "k8s.io/client-go/pkg/apis/batch/v1"
+ rest "k8s.io/client-go/rest"
+)
+
+type BatchV1Interface interface {
+ RESTClient() rest.Interface
+ JobsGetter
+}
+
+// BatchV1Client is used to interact with features provided by the batch group.
+type BatchV1Client struct {
+ restClient rest.Interface
+}
+
+func (c *BatchV1Client) Jobs(namespace string) JobInterface {
+ return newJobs(c, namespace)
+}
+
+// NewForConfig creates a new BatchV1Client for the given config.
+func NewForConfig(c *rest.Config) (*BatchV1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &BatchV1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new BatchV1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *BatchV1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new BatchV1Client for the given RESTClient.
+func New(c rest.Interface) *BatchV1Client {
+ return &BatchV1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *BatchV1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/doc.go
new file mode 100644
index 000000000..54673bfa7
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/generated_expansion.go
new file mode 100644
index 000000000..68d7741fa
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/generated_expansion.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+type JobExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/job.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/job.go
new file mode 100644
index 000000000..c8120f6d8
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v1/job.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1 "k8s.io/client-go/pkg/apis/batch/v1"
+ rest "k8s.io/client-go/rest"
+)
+
+// JobsGetter has a method to return a JobInterface.
+// A group's client should implement this interface.
+type JobsGetter interface {
+ Jobs(namespace string) JobInterface
+}
+
+// JobInterface has methods to work with Job resources.
+type JobInterface interface {
+ Create(*v1.Job) (*v1.Job, error)
+ Update(*v1.Job) (*v1.Job, error)
+ UpdateStatus(*v1.Job) (*v1.Job, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.Job, error)
+ List(opts meta_v1.ListOptions) (*v1.JobList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error)
+ JobExpansion
+}
+
+// jobs implements JobInterface
+type jobs struct {
+ client rest.Interface
+ ns string
+}
+
+// newJobs returns a Jobs
+func newJobs(c *BatchV1Client, namespace string) *jobs {
+ return &jobs{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a job and creates it. Returns the server's representation of the job, and an error, if there is any.
+func (c *jobs) Create(job *v1.Job) (result *v1.Job, err error) {
+ result = &v1.Job{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("jobs").
+ Body(job).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a job and updates it. Returns the server's representation of the job, and an error, if there is any.
+func (c *jobs) Update(job *v1.Job) (result *v1.Job, err error) {
+ result = &v1.Job{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("jobs").
+ Name(job.Name).
+ Body(job).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *jobs) UpdateStatus(job *v1.Job) (result *v1.Job, err error) {
+ result = &v1.Job{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("jobs").
+ Name(job.Name).
+ SubResource("status").
+ Body(job).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the job and deletes it. Returns an error if one occurs.
+func (c *jobs) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("jobs").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *jobs) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("jobs").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the job, and returns the corresponding job object, and an error if there is any.
+func (c *jobs) Get(name string, options meta_v1.GetOptions) (result *v1.Job, err error) {
+ result = &v1.Job{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("jobs").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Jobs that match those selectors.
+func (c *jobs) List(opts meta_v1.ListOptions) (result *v1.JobList, err error) {
+ result = &v1.JobList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("jobs").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested jobs.
+func (c *jobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("jobs").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched job.
+func (c *jobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) {
+ result = &v1.Job{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("jobs").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/batch_client.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/batch_client.go
new file mode 100644
index 000000000..e2b2dd5cd
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/batch_client.go
@@ -0,0 +1,88 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ "k8s.io/client-go/kubernetes/scheme"
+ v2alpha1 "k8s.io/client-go/pkg/apis/batch/v2alpha1"
+ rest "k8s.io/client-go/rest"
+)
+
+type BatchV2alpha1Interface interface {
+ RESTClient() rest.Interface
+ CronJobsGetter
+}
+
+// BatchV2alpha1Client is used to interact with features provided by the batch group.
+type BatchV2alpha1Client struct {
+ restClient rest.Interface
+}
+
+func (c *BatchV2alpha1Client) CronJobs(namespace string) CronJobInterface {
+ return newCronJobs(c, namespace)
+}
+
+// NewForConfig creates a new BatchV2alpha1Client for the given config.
+func NewForConfig(c *rest.Config) (*BatchV2alpha1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &BatchV2alpha1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new BatchV2alpha1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *BatchV2alpha1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new BatchV2alpha1Client for the given RESTClient.
+func New(c rest.Interface) *BatchV2alpha1Client {
+ return &BatchV2alpha1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v2alpha1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *BatchV2alpha1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/cronjob.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/cronjob.go
new file mode 100644
index 000000000..2447f2add
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/cronjob.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v2alpha1 "k8s.io/client-go/pkg/apis/batch/v2alpha1"
+ rest "k8s.io/client-go/rest"
+)
+
+// CronJobsGetter has a method to return a CronJobInterface.
+// A group's client should implement this interface.
+type CronJobsGetter interface {
+ CronJobs(namespace string) CronJobInterface
+}
+
+// CronJobInterface has methods to work with CronJob resources.
+type CronJobInterface interface {
+ Create(*v2alpha1.CronJob) (*v2alpha1.CronJob, error)
+ Update(*v2alpha1.CronJob) (*v2alpha1.CronJob, error)
+ UpdateStatus(*v2alpha1.CronJob) (*v2alpha1.CronJob, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v2alpha1.CronJob, error)
+ List(opts v1.ListOptions) (*v2alpha1.CronJobList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error)
+ CronJobExpansion
+}
+
+// cronJobs implements CronJobInterface
+type cronJobs struct {
+ client rest.Interface
+ ns string
+}
+
+// newCronJobs returns a CronJobs
+func newCronJobs(c *BatchV2alpha1Client, namespace string) *cronJobs {
+ return &cronJobs{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a cronJob and creates it. Returns the server's representation of the cronJob, and an error, if there is any.
+func (c *cronJobs) Create(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) {
+ result = &v2alpha1.CronJob{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("cronjobs").
+ Body(cronJob).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a cronJob and updates it. Returns the server's representation of the cronJob, and an error, if there is any.
+func (c *cronJobs) Update(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) {
+ result = &v2alpha1.CronJob{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("cronjobs").
+ Name(cronJob.Name).
+ Body(cronJob).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *cronJobs) UpdateStatus(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) {
+ result = &v2alpha1.CronJob{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("cronjobs").
+ Name(cronJob.Name).
+ SubResource("status").
+ Body(cronJob).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the cronJob and deletes it. Returns an error if one occurs.
+func (c *cronJobs) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("cronjobs").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *cronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("cronjobs").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the cronJob, and returns the corresponding cronJob object, and an error if there is any.
+func (c *cronJobs) Get(name string, options v1.GetOptions) (result *v2alpha1.CronJob, err error) {
+ result = &v2alpha1.CronJob{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("cronjobs").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of CronJobs that match those selectors.
+func (c *cronJobs) List(opts v1.ListOptions) (result *v2alpha1.CronJobList, err error) {
+ result = &v2alpha1.CronJobList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("cronjobs").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested cronJobs.
+func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("cronjobs").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched cronJob.
+func (c *cronJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) {
+ result = &v2alpha1.CronJob{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("cronjobs").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/doc.go
new file mode 100644
index 000000000..d29bd3f4e
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v2alpha1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/generated_expansion.go
new file mode 100644
index 000000000..078027ef4
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/generated_expansion.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+type CronJobExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificates_client.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificates_client.go
new file mode 100644
index 000000000..c9c39acb2
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificates_client.go
@@ -0,0 +1,88 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ "k8s.io/client-go/kubernetes/scheme"
+ v1beta1 "k8s.io/client-go/pkg/apis/certificates/v1beta1"
+ rest "k8s.io/client-go/rest"
+)
+
+type CertificatesV1beta1Interface interface {
+ RESTClient() rest.Interface
+ CertificateSigningRequestsGetter
+}
+
+// CertificatesV1beta1Client is used to interact with features provided by the certificates.k8s.io group.
+type CertificatesV1beta1Client struct {
+ restClient rest.Interface
+}
+
+func (c *CertificatesV1beta1Client) CertificateSigningRequests() CertificateSigningRequestInterface {
+ return newCertificateSigningRequests(c)
+}
+
+// NewForConfig creates a new CertificatesV1beta1Client for the given config.
+func NewForConfig(c *rest.Config) (*CertificatesV1beta1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &CertificatesV1beta1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new CertificatesV1beta1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *CertificatesV1beta1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new CertificatesV1beta1Client for the given RESTClient.
+func New(c rest.Interface) *CertificatesV1beta1Client {
+ return &CertificatesV1beta1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1beta1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *CertificatesV1beta1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go
new file mode 100644
index 000000000..7407ef068
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go
@@ -0,0 +1,161 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1beta1 "k8s.io/client-go/pkg/apis/certificates/v1beta1"
+ rest "k8s.io/client-go/rest"
+)
+
+// CertificateSigningRequestsGetter has a method to return a CertificateSigningRequestInterface.
+// A group's client should implement this interface.
+type CertificateSigningRequestsGetter interface {
+ CertificateSigningRequests() CertificateSigningRequestInterface
+}
+
+// CertificateSigningRequestInterface has methods to work with CertificateSigningRequest resources.
+type CertificateSigningRequestInterface interface {
+ Create(*v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error)
+ Update(*v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error)
+ UpdateStatus(*v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.CertificateSigningRequest, error)
+ List(opts v1.ListOptions) (*v1beta1.CertificateSigningRequestList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error)
+ CertificateSigningRequestExpansion
+}
+
+// certificateSigningRequests implements CertificateSigningRequestInterface
+type certificateSigningRequests struct {
+ client rest.Interface
+}
+
+// newCertificateSigningRequests returns a CertificateSigningRequests
+func newCertificateSigningRequests(c *CertificatesV1beta1Client) *certificateSigningRequests {
+ return &certificateSigningRequests{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a certificateSigningRequest and creates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any.
+func (c *certificateSigningRequests) Create(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) {
+ result = &v1beta1.CertificateSigningRequest{}
+ err = c.client.Post().
+ Resource("certificatesigningrequests").
+ Body(certificateSigningRequest).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any.
+func (c *certificateSigningRequests) Update(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) {
+ result = &v1beta1.CertificateSigningRequest{}
+ err = c.client.Put().
+ Resource("certificatesigningrequests").
+ Name(certificateSigningRequest.Name).
+ Body(certificateSigningRequest).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *certificateSigningRequests) UpdateStatus(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) {
+ result = &v1beta1.CertificateSigningRequest{}
+ err = c.client.Put().
+ Resource("certificatesigningrequests").
+ Name(certificateSigningRequest.Name).
+ SubResource("status").
+ Body(certificateSigningRequest).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the certificateSigningRequest and deletes it. Returns an error if one occurs.
+func (c *certificateSigningRequests) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("certificatesigningrequests").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *certificateSigningRequests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("certificatesigningrequests").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the certificateSigningRequest, and returns the corresponding certificateSigningRequest object, and an error if there is any.
+func (c *certificateSigningRequests) Get(name string, options v1.GetOptions) (result *v1beta1.CertificateSigningRequest, err error) {
+ result = &v1beta1.CertificateSigningRequest{}
+ err = c.client.Get().
+ Resource("certificatesigningrequests").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of CertificateSigningRequests that match those selectors.
+func (c *certificateSigningRequests) List(opts v1.ListOptions) (result *v1beta1.CertificateSigningRequestList, err error) {
+ result = &v1beta1.CertificateSigningRequestList{}
+ err = c.client.Get().
+ Resource("certificatesigningrequests").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested certificateSigningRequests.
+func (c *certificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("certificatesigningrequests").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched certificateSigningRequest.
+func (c *certificateSigningRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) {
+ result = &v1beta1.CertificateSigningRequest{}
+ err = c.client.Patch(pt).
+ Resource("certificatesigningrequests").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest_expansion.go
new file mode 100644
index 000000000..4765bba8a
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest_expansion.go
@@ -0,0 +1,37 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ certificates "k8s.io/client-go/pkg/apis/certificates/v1beta1"
+)
+
+type CertificateSigningRequestExpansion interface {
+ UpdateApproval(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error)
+}
+
+func (c *certificateSigningRequests) UpdateApproval(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) {
+ result = &certificates.CertificateSigningRequest{}
+ err = c.client.Put().
+ Resource("certificatesigningrequests").
+ Name(certificateSigningRequest.Name).
+ Body(certificateSigningRequest).
+ SubResource("approval").
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/doc.go
new file mode 100644
index 000000000..11b523897
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1beta1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/generated_expansion.go
new file mode 100644
index 000000000..2b7e8ca0b
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/generated_expansion.go
@@ -0,0 +1,17 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go
new file mode 100644
index 000000000..50671976a
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go
@@ -0,0 +1,145 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1 "k8s.io/client-go/pkg/api/v1"
+ rest "k8s.io/client-go/rest"
+)
+
+// ComponentStatusesGetter has a method to return a ComponentStatusInterface.
+// A group's client should implement this interface.
+type ComponentStatusesGetter interface {
+ ComponentStatuses() ComponentStatusInterface
+}
+
+// ComponentStatusInterface has methods to work with ComponentStatus resources.
+type ComponentStatusInterface interface {
+ Create(*v1.ComponentStatus) (*v1.ComponentStatus, error)
+ Update(*v1.ComponentStatus) (*v1.ComponentStatus, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.ComponentStatus, error)
+ List(opts meta_v1.ListOptions) (*v1.ComponentStatusList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error)
+ ComponentStatusExpansion
+}
+
+// componentStatuses implements ComponentStatusInterface
+type componentStatuses struct {
+ client rest.Interface
+}
+
+// newComponentStatuses returns a ComponentStatuses
+func newComponentStatuses(c *CoreV1Client) *componentStatuses {
+ return &componentStatuses{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a componentStatus and creates it. Returns the server's representation of the componentStatus, and an error, if there is any.
+func (c *componentStatuses) Create(componentStatus *v1.ComponentStatus) (result *v1.ComponentStatus, err error) {
+ result = &v1.ComponentStatus{}
+ err = c.client.Post().
+ Resource("componentstatuses").
+ Body(componentStatus).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a componentStatus and updates it. Returns the server's representation of the componentStatus, and an error, if there is any.
+func (c *componentStatuses) Update(componentStatus *v1.ComponentStatus) (result *v1.ComponentStatus, err error) {
+ result = &v1.ComponentStatus{}
+ err = c.client.Put().
+ Resource("componentstatuses").
+ Name(componentStatus.Name).
+ Body(componentStatus).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the componentStatus and deletes it. Returns an error if one occurs.
+func (c *componentStatuses) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("componentstatuses").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *componentStatuses) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("componentstatuses").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the componentStatus, and returns the corresponding componentStatus object, and an error if there is any.
+func (c *componentStatuses) Get(name string, options meta_v1.GetOptions) (result *v1.ComponentStatus, err error) {
+ result = &v1.ComponentStatus{}
+ err = c.client.Get().
+ Resource("componentstatuses").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of ComponentStatuses that match those selectors.
+func (c *componentStatuses) List(opts meta_v1.ListOptions) (result *v1.ComponentStatusList, err error) {
+ result = &v1.ComponentStatusList{}
+ err = c.client.Get().
+ Resource("componentstatuses").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested componentStatuses.
+func (c *componentStatuses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("componentstatuses").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched componentStatus.
+func (c *componentStatuses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) {
+ result = &v1.ComponentStatus{}
+ err = c.client.Patch(pt).
+ Resource("componentstatuses").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go
new file mode 100644
index 000000000..bb21636e2
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1 "k8s.io/client-go/pkg/api/v1"
+ rest "k8s.io/client-go/rest"
+)
+
+// ConfigMapsGetter has a method to return a ConfigMapInterface.
+// A group's client should implement this interface.
+type ConfigMapsGetter interface {
+ ConfigMaps(namespace string) ConfigMapInterface
+}
+
+// ConfigMapInterface has methods to work with ConfigMap resources.
+type ConfigMapInterface interface {
+ Create(*v1.ConfigMap) (*v1.ConfigMap, error)
+ Update(*v1.ConfigMap) (*v1.ConfigMap, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.ConfigMap, error)
+ List(opts meta_v1.ListOptions) (*v1.ConfigMapList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error)
+ ConfigMapExpansion
+}
+
+// configMaps implements ConfigMapInterface
+type configMaps struct {
+ client rest.Interface
+ ns string
+}
+
+// newConfigMaps returns a ConfigMaps
+func newConfigMaps(c *CoreV1Client, namespace string) *configMaps {
+ return &configMaps{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a configMap and creates it. Returns the server's representation of the configMap, and an error, if there is any.
+func (c *configMaps) Create(configMap *v1.ConfigMap) (result *v1.ConfigMap, err error) {
+ result = &v1.ConfigMap{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("configmaps").
+ Body(configMap).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a configMap and updates it. Returns the server's representation of the configMap, and an error, if there is any.
+func (c *configMaps) Update(configMap *v1.ConfigMap) (result *v1.ConfigMap, err error) {
+ result = &v1.ConfigMap{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("configmaps").
+ Name(configMap.Name).
+ Body(configMap).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the configMap and deletes it. Returns an error if one occurs.
+func (c *configMaps) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("configmaps").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *configMaps) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("configmaps").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the configMap, and returns the corresponding configMap object, and an error if there is any.
+func (c *configMaps) Get(name string, options meta_v1.GetOptions) (result *v1.ConfigMap, err error) {
+ result = &v1.ConfigMap{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("configmaps").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of ConfigMaps that match those selectors.
+func (c *configMaps) List(opts meta_v1.ListOptions) (result *v1.ConfigMapList, err error) {
+ result = &v1.ConfigMapList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("configmaps").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested configMaps.
+func (c *configMaps) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("configmaps").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched configMap.
+func (c *configMaps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) {
+ result = &v1.ConfigMap{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("configmaps").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/core_client.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/core_client.go
new file mode 100644
index 000000000..0972960d1
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/core_client.go
@@ -0,0 +1,163 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ "k8s.io/client-go/kubernetes/scheme"
+ v1 "k8s.io/client-go/pkg/api/v1"
+ rest "k8s.io/client-go/rest"
+)
+
+type CoreV1Interface interface {
+ RESTClient() rest.Interface
+ ComponentStatusesGetter
+ ConfigMapsGetter
+ EndpointsGetter
+ EventsGetter
+ LimitRangesGetter
+ NamespacesGetter
+ NodesGetter
+ PersistentVolumesGetter
+ PersistentVolumeClaimsGetter
+ PodsGetter
+ PodTemplatesGetter
+ ReplicationControllersGetter
+ ResourceQuotasGetter
+ SecretsGetter
+ ServicesGetter
+ ServiceAccountsGetter
+}
+
+// CoreV1Client is used to interact with features provided by the group.
+type CoreV1Client struct {
+ restClient rest.Interface
+}
+
+func (c *CoreV1Client) ComponentStatuses() ComponentStatusInterface {
+ return newComponentStatuses(c)
+}
+
+func (c *CoreV1Client) ConfigMaps(namespace string) ConfigMapInterface {
+ return newConfigMaps(c, namespace)
+}
+
+func (c *CoreV1Client) Endpoints(namespace string) EndpointsInterface {
+ return newEndpoints(c, namespace)
+}
+
+func (c *CoreV1Client) Events(namespace string) EventInterface {
+ return newEvents(c, namespace)
+}
+
+func (c *CoreV1Client) LimitRanges(namespace string) LimitRangeInterface {
+ return newLimitRanges(c, namespace)
+}
+
+func (c *CoreV1Client) Namespaces() NamespaceInterface {
+ return newNamespaces(c)
+}
+
+func (c *CoreV1Client) Nodes() NodeInterface {
+ return newNodes(c)
+}
+
+func (c *CoreV1Client) PersistentVolumes() PersistentVolumeInterface {
+ return newPersistentVolumes(c)
+}
+
+func (c *CoreV1Client) PersistentVolumeClaims(namespace string) PersistentVolumeClaimInterface {
+ return newPersistentVolumeClaims(c, namespace)
+}
+
+func (c *CoreV1Client) Pods(namespace string) PodInterface {
+ return newPods(c, namespace)
+}
+
+func (c *CoreV1Client) PodTemplates(namespace string) PodTemplateInterface {
+ return newPodTemplates(c, namespace)
+}
+
+func (c *CoreV1Client) ReplicationControllers(namespace string) ReplicationControllerInterface {
+ return newReplicationControllers(c, namespace)
+}
+
+func (c *CoreV1Client) ResourceQuotas(namespace string) ResourceQuotaInterface {
+ return newResourceQuotas(c, namespace)
+}
+
+func (c *CoreV1Client) Secrets(namespace string) SecretInterface {
+ return newSecrets(c, namespace)
+}
+
+func (c *CoreV1Client) Services(namespace string) ServiceInterface {
+ return newServices(c, namespace)
+}
+
+func (c *CoreV1Client) ServiceAccounts(namespace string) ServiceAccountInterface {
+ return newServiceAccounts(c, namespace)
+}
+
+// NewForConfig creates a new CoreV1Client for the given config.
+func NewForConfig(c *rest.Config) (*CoreV1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &CoreV1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new CoreV1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *CoreV1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new CoreV1Client for the given RESTClient.
+func New(c rest.Interface) *CoreV1Client {
+ return &CoreV1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/api"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *CoreV1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/doc.go
new file mode 100644
index 000000000..54673bfa7
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go
new file mode 100644
index 000000000..3580742a8
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1 "k8s.io/client-go/pkg/api/v1"
+ rest "k8s.io/client-go/rest"
+)
+
+// EndpointsGetter has a method to return a EndpointsInterface.
+// A group's client should implement this interface.
+type EndpointsGetter interface {
+ Endpoints(namespace string) EndpointsInterface
+}
+
+// EndpointsInterface has methods to work with Endpoints resources.
+type EndpointsInterface interface {
+ Create(*v1.Endpoints) (*v1.Endpoints, error)
+ Update(*v1.Endpoints) (*v1.Endpoints, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.Endpoints, error)
+ List(opts meta_v1.ListOptions) (*v1.EndpointsList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error)
+ EndpointsExpansion
+}
+
+// endpoints implements EndpointsInterface
+type endpoints struct {
+ client rest.Interface
+ ns string
+}
+
+// newEndpoints returns a Endpoints
+func newEndpoints(c *CoreV1Client, namespace string) *endpoints {
+ return &endpoints{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a endpoints and creates it. Returns the server's representation of the endpoints, and an error, if there is any.
+func (c *endpoints) Create(endpoints *v1.Endpoints) (result *v1.Endpoints, err error) {
+ result = &v1.Endpoints{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("endpoints").
+ Body(endpoints).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a endpoints and updates it. Returns the server's representation of the endpoints, and an error, if there is any.
+func (c *endpoints) Update(endpoints *v1.Endpoints) (result *v1.Endpoints, err error) {
+ result = &v1.Endpoints{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("endpoints").
+ Name(endpoints.Name).
+ Body(endpoints).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the endpoints and deletes it. Returns an error if one occurs.
+func (c *endpoints) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("endpoints").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *endpoints) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("endpoints").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the endpoints, and returns the corresponding endpoints object, and an error if there is any.
+func (c *endpoints) Get(name string, options meta_v1.GetOptions) (result *v1.Endpoints, err error) {
+ result = &v1.Endpoints{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("endpoints").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Endpoints that match those selectors.
+func (c *endpoints) List(opts meta_v1.ListOptions) (result *v1.EndpointsList, err error) {
+ result = &v1.EndpointsList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("endpoints").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested endpoints.
+func (c *endpoints) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("endpoints").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched endpoints.
+func (c *endpoints) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) {
+ result = &v1.Endpoints{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("endpoints").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event.go
new file mode 100644
index 000000000..c4ac11006
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1 "k8s.io/client-go/pkg/api/v1"
+ rest "k8s.io/client-go/rest"
+)
+
+// EventsGetter has a method to return a EventInterface.
+// A group's client should implement this interface.
+type EventsGetter interface {
+ Events(namespace string) EventInterface
+}
+
+// EventInterface has methods to work with Event resources.
+type EventInterface interface {
+ Create(*v1.Event) (*v1.Event, error)
+ Update(*v1.Event) (*v1.Event, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.Event, error)
+ List(opts meta_v1.ListOptions) (*v1.EventList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error)
+ EventExpansion
+}
+
+// events implements EventInterface
+type events struct {
+ client rest.Interface
+ ns string
+}
+
+// newEvents returns a Events
+func newEvents(c *CoreV1Client, namespace string) *events {
+ return &events{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any.
+func (c *events) Create(event *v1.Event) (result *v1.Event, err error) {
+ result = &v1.Event{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("events").
+ Body(event).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any.
+func (c *events) Update(event *v1.Event) (result *v1.Event, err error) {
+ result = &v1.Event{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("events").
+ Name(event.Name).
+ Body(event).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the event and deletes it. Returns an error if one occurs.
+func (c *events) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("events").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *events) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("events").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the event, and returns the corresponding event object, and an error if there is any.
+func (c *events) Get(name string, options meta_v1.GetOptions) (result *v1.Event, err error) {
+ result = &v1.Event{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("events").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Events that match those selectors.
+func (c *events) List(opts meta_v1.ListOptions) (result *v1.EventList, err error) {
+ result = &v1.EventList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("events").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested events.
+func (c *events) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("events").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched event.
+func (c *events) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) {
+ result = &v1.Event{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("events").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event_expansion.go
new file mode 100644
index 000000000..0ad170b3d
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/event_expansion.go
@@ -0,0 +1,164 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "fmt"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/fields"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/types"
+ "k8s.io/client-go/pkg/api/v1"
+ "k8s.io/client-go/pkg/api/v1/ref"
+)
+
+// The EventExpansion interface allows manually adding extra methods to the EventInterface.
+type EventExpansion interface {
+ // CreateWithEventNamespace is the same as a Create, except that it sends the request to the event.Namespace.
+ CreateWithEventNamespace(event *v1.Event) (*v1.Event, error)
+ // UpdateWithEventNamespace is the same as a Update, except that it sends the request to the event.Namespace.
+ UpdateWithEventNamespace(event *v1.Event) (*v1.Event, error)
+ PatchWithEventNamespace(event *v1.Event, data []byte) (*v1.Event, error)
+ // Search finds events about the specified object
+ Search(scheme *runtime.Scheme, objOrRef runtime.Object) (*v1.EventList, error)
+ // Returns the appropriate field selector based on the API version being used to communicate with the server.
+ // The returned field selector can be used with List and Watch to filter desired events.
+ GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector
+}
+
+// CreateWithEventNamespace makes a new event. Returns the copy of the event the server returns,
+// or an error. The namespace to create the event within is deduced from the
+// event; it must either match this event client's namespace, or this event
+// client must have been created with the "" namespace.
+func (e *events) CreateWithEventNamespace(event *v1.Event) (*v1.Event, error) {
+ if e.ns != "" && event.Namespace != e.ns {
+ return nil, fmt.Errorf("can't create an event with namespace '%v' in namespace '%v'", event.Namespace, e.ns)
+ }
+ result := &v1.Event{}
+ err := e.client.Post().
+ NamespaceIfScoped(event.Namespace, len(event.Namespace) > 0).
+ Resource("events").
+ Body(event).
+ Do().
+ Into(result)
+ return result, err
+}
+
+// UpdateWithEventNamespace modifies an existing event. It returns the copy of the event that the server returns,
+// or an error. The namespace and key to update the event within is deduced from the event. The
+// namespace must either match this event client's namespace, or this event client must have been
+// created with the "" namespace. Update also requires the ResourceVersion to be set in the event
+// object.
+func (e *events) UpdateWithEventNamespace(event *v1.Event) (*v1.Event, error) {
+ result := &v1.Event{}
+ err := e.client.Put().
+ NamespaceIfScoped(event.Namespace, len(event.Namespace) > 0).
+ Resource("events").
+ Name(event.Name).
+ Body(event).
+ Do().
+ Into(result)
+ return result, err
+}
+
+// PatchWithEventNamespace modifies an existing event. It returns the copy of
+// the event that the server returns, or an error. The namespace and name of the
+// target event is deduced from the incompleteEvent. The namespace must either
+// match this event client's namespace, or this event client must have been
+// created with the "" namespace.
+func (e *events) PatchWithEventNamespace(incompleteEvent *v1.Event, data []byte) (*v1.Event, error) {
+ if e.ns != "" && incompleteEvent.Namespace != e.ns {
+ return nil, fmt.Errorf("can't patch an event with namespace '%v' in namespace '%v'", incompleteEvent.Namespace, e.ns)
+ }
+ result := &v1.Event{}
+ err := e.client.Patch(types.StrategicMergePatchType).
+ NamespaceIfScoped(incompleteEvent.Namespace, len(incompleteEvent.Namespace) > 0).
+ Resource("events").
+ Name(incompleteEvent.Name).
+ Body(data).
+ Do().
+ Into(result)
+ return result, err
+}
+
+// Search finds events about the specified object. The namespace of the
+// object must match this event's client namespace unless the event client
+// was made with the "" namespace.
+func (e *events) Search(scheme *runtime.Scheme, objOrRef runtime.Object) (*v1.EventList, error) {
+ ref, err := ref.GetReference(scheme, objOrRef)
+ if err != nil {
+ return nil, err
+ }
+ if e.ns != "" && ref.Namespace != e.ns {
+ return nil, fmt.Errorf("won't be able to find any events of namespace '%v' in namespace '%v'", ref.Namespace, e.ns)
+ }
+ stringRefKind := string(ref.Kind)
+ var refKind *string
+ if stringRefKind != "" {
+ refKind = &stringRefKind
+ }
+ stringRefUID := string(ref.UID)
+ var refUID *string
+ if stringRefUID != "" {
+ refUID = &stringRefUID
+ }
+ fieldSelector := e.GetFieldSelector(&ref.Name, &ref.Namespace, refKind, refUID)
+ return e.List(metav1.ListOptions{FieldSelector: fieldSelector.String()})
+}
+
+// Returns the appropriate field selector based on the API version being used to communicate with the server.
+// The returned field selector can be used with List and Watch to filter desired events.
+func (e *events) GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector {
+ apiVersion := e.client.APIVersion().String()
+ field := fields.Set{}
+ if involvedObjectName != nil {
+ field[GetInvolvedObjectNameFieldLabel(apiVersion)] = *involvedObjectName
+ }
+ if involvedObjectNamespace != nil {
+ field["involvedObject.namespace"] = *involvedObjectNamespace
+ }
+ if involvedObjectKind != nil {
+ field["involvedObject.kind"] = *involvedObjectKind
+ }
+ if involvedObjectUID != nil {
+ field["involvedObject.uid"] = *involvedObjectUID
+ }
+ return field.AsSelector()
+}
+
+// Returns the appropriate field label to use for name of the involved object as per the given API version.
+func GetInvolvedObjectNameFieldLabel(version string) string {
+ return "involvedObject.name"
+}
+
+// TODO: This is a temporary arrangement and will be removed once all clients are moved to use the clientset.
+type EventSinkImpl struct {
+ Interface EventInterface
+}
+
+func (e *EventSinkImpl) Create(event *v1.Event) (*v1.Event, error) {
+ return e.Interface.CreateWithEventNamespace(event)
+}
+
+func (e *EventSinkImpl) Update(event *v1.Event) (*v1.Event, error) {
+ return e.Interface.UpdateWithEventNamespace(event)
+}
+
+func (e *EventSinkImpl) Patch(event *v1.Event, data []byte) (*v1.Event, error) {
+ return e.Interface.PatchWithEventNamespace(event, data)
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/generated_expansion.go
new file mode 100644
index 000000000..5fe0585b4
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/generated_expansion.go
@@ -0,0 +1,39 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+type ComponentStatusExpansion interface{}
+
+type ConfigMapExpansion interface{}
+
+type EndpointsExpansion interface{}
+
+type LimitRangeExpansion interface{}
+
+type PersistentVolumeExpansion interface{}
+
+type PersistentVolumeClaimExpansion interface{}
+
+type PodTemplateExpansion interface{}
+
+type ReplicationControllerExpansion interface{}
+
+type ResourceQuotaExpansion interface{}
+
+type SecretExpansion interface{}
+
+type ServiceAccountExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go
new file mode 100644
index 000000000..998f03452
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1 "k8s.io/client-go/pkg/api/v1"
+ rest "k8s.io/client-go/rest"
+)
+
+// LimitRangesGetter has a method to return a LimitRangeInterface.
+// A group's client should implement this interface.
+type LimitRangesGetter interface {
+ LimitRanges(namespace string) LimitRangeInterface
+}
+
+// LimitRangeInterface has methods to work with LimitRange resources.
+type LimitRangeInterface interface {
+ Create(*v1.LimitRange) (*v1.LimitRange, error)
+ Update(*v1.LimitRange) (*v1.LimitRange, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.LimitRange, error)
+ List(opts meta_v1.ListOptions) (*v1.LimitRangeList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error)
+ LimitRangeExpansion
+}
+
+// limitRanges implements LimitRangeInterface
+type limitRanges struct {
+ client rest.Interface
+ ns string
+}
+
+// newLimitRanges returns a LimitRanges
+func newLimitRanges(c *CoreV1Client, namespace string) *limitRanges {
+ return &limitRanges{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a limitRange and creates it. Returns the server's representation of the limitRange, and an error, if there is any.
+func (c *limitRanges) Create(limitRange *v1.LimitRange) (result *v1.LimitRange, err error) {
+ result = &v1.LimitRange{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("limitranges").
+ Body(limitRange).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a limitRange and updates it. Returns the server's representation of the limitRange, and an error, if there is any.
+func (c *limitRanges) Update(limitRange *v1.LimitRange) (result *v1.LimitRange, err error) {
+ result = &v1.LimitRange{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("limitranges").
+ Name(limitRange.Name).
+ Body(limitRange).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the limitRange and deletes it. Returns an error if one occurs.
+func (c *limitRanges) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("limitranges").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *limitRanges) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("limitranges").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the limitRange, and returns the corresponding limitRange object, and an error if there is any.
+func (c *limitRanges) Get(name string, options meta_v1.GetOptions) (result *v1.LimitRange, err error) {
+ result = &v1.LimitRange{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("limitranges").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of LimitRanges that match those selectors.
+func (c *limitRanges) List(opts meta_v1.ListOptions) (result *v1.LimitRangeList, err error) {
+ result = &v1.LimitRangeList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("limitranges").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested limitRanges.
+func (c *limitRanges) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("limitranges").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched limitRange.
+func (c *limitRanges) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error) {
+ result = &v1.LimitRange{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("limitranges").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go
new file mode 100644
index 000000000..3092bd8e1
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go
@@ -0,0 +1,161 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1 "k8s.io/client-go/pkg/api/v1"
+ rest "k8s.io/client-go/rest"
+)
+
+// NamespacesGetter has a method to return a NamespaceInterface.
+// A group's client should implement this interface.
+type NamespacesGetter interface {
+ Namespaces() NamespaceInterface
+}
+
+// NamespaceInterface has methods to work with Namespace resources.
+type NamespaceInterface interface {
+ Create(*v1.Namespace) (*v1.Namespace, error)
+ Update(*v1.Namespace) (*v1.Namespace, error)
+ UpdateStatus(*v1.Namespace) (*v1.Namespace, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.Namespace, error)
+ List(opts meta_v1.ListOptions) (*v1.NamespaceList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error)
+ NamespaceExpansion
+}
+
+// namespaces implements NamespaceInterface
+type namespaces struct {
+ client rest.Interface
+}
+
+// newNamespaces returns a Namespaces
+func newNamespaces(c *CoreV1Client) *namespaces {
+ return &namespaces{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a namespace and creates it. Returns the server's representation of the namespace, and an error, if there is any.
+func (c *namespaces) Create(namespace *v1.Namespace) (result *v1.Namespace, err error) {
+ result = &v1.Namespace{}
+ err = c.client.Post().
+ Resource("namespaces").
+ Body(namespace).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a namespace and updates it. Returns the server's representation of the namespace, and an error, if there is any.
+func (c *namespaces) Update(namespace *v1.Namespace) (result *v1.Namespace, err error) {
+ result = &v1.Namespace{}
+ err = c.client.Put().
+ Resource("namespaces").
+ Name(namespace.Name).
+ Body(namespace).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *namespaces) UpdateStatus(namespace *v1.Namespace) (result *v1.Namespace, err error) {
+ result = &v1.Namespace{}
+ err = c.client.Put().
+ Resource("namespaces").
+ Name(namespace.Name).
+ SubResource("status").
+ Body(namespace).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the namespace and deletes it. Returns an error if one occurs.
+func (c *namespaces) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("namespaces").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *namespaces) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("namespaces").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the namespace, and returns the corresponding namespace object, and an error if there is any.
+func (c *namespaces) Get(name string, options meta_v1.GetOptions) (result *v1.Namespace, err error) {
+ result = &v1.Namespace{}
+ err = c.client.Get().
+ Resource("namespaces").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Namespaces that match those selectors.
+func (c *namespaces) List(opts meta_v1.ListOptions) (result *v1.NamespaceList, err error) {
+ result = &v1.NamespaceList{}
+ err = c.client.Get().
+ Resource("namespaces").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested namespaces.
+func (c *namespaces) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("namespaces").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched namespace.
+func (c *namespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) {
+ result = &v1.Namespace{}
+ err = c.client.Patch(pt).
+ Resource("namespaces").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace_expansion.go
new file mode 100644
index 000000000..203430000
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/namespace_expansion.go
@@ -0,0 +1,31 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import "k8s.io/client-go/pkg/api/v1"
+
+// The NamespaceExpansion interface allows manually adding extra methods to the NamespaceInterface.
+type NamespaceExpansion interface {
+ Finalize(item *v1.Namespace) (*v1.Namespace, error)
+}
+
+// Finalize takes the representation of a namespace to update. Returns the server's representation of the namespace, and an error, if it occurs.
+func (c *namespaces) Finalize(namespace *v1.Namespace) (result *v1.Namespace, err error) {
+ result = &v1.Namespace{}
+ err = c.client.Put().Resource("namespaces").Name(namespace.Name).SubResource("finalize").Body(namespace).Do().Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/node.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/node.go
new file mode 100644
index 000000000..6b82d4fab
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/node.go
@@ -0,0 +1,161 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1 "k8s.io/client-go/pkg/api/v1"
+ rest "k8s.io/client-go/rest"
+)
+
+// NodesGetter has a method to return a NodeInterface.
+// A group's client should implement this interface.
+type NodesGetter interface {
+ Nodes() NodeInterface
+}
+
+// NodeInterface has methods to work with Node resources.
+type NodeInterface interface {
+ Create(*v1.Node) (*v1.Node, error)
+ Update(*v1.Node) (*v1.Node, error)
+ UpdateStatus(*v1.Node) (*v1.Node, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.Node, error)
+ List(opts meta_v1.ListOptions) (*v1.NodeList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Node, err error)
+ NodeExpansion
+}
+
+// nodes implements NodeInterface
+type nodes struct {
+ client rest.Interface
+}
+
+// newNodes returns a Nodes
+func newNodes(c *CoreV1Client) *nodes {
+ return &nodes{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a node and creates it. Returns the server's representation of the node, and an error, if there is any.
+func (c *nodes) Create(node *v1.Node) (result *v1.Node, err error) {
+ result = &v1.Node{}
+ err = c.client.Post().
+ Resource("nodes").
+ Body(node).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a node and updates it. Returns the server's representation of the node, and an error, if there is any.
+func (c *nodes) Update(node *v1.Node) (result *v1.Node, err error) {
+ result = &v1.Node{}
+ err = c.client.Put().
+ Resource("nodes").
+ Name(node.Name).
+ Body(node).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *nodes) UpdateStatus(node *v1.Node) (result *v1.Node, err error) {
+ result = &v1.Node{}
+ err = c.client.Put().
+ Resource("nodes").
+ Name(node.Name).
+ SubResource("status").
+ Body(node).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the node and deletes it. Returns an error if one occurs.
+func (c *nodes) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("nodes").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *nodes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("nodes").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the node, and returns the corresponding node object, and an error if there is any.
+func (c *nodes) Get(name string, options meta_v1.GetOptions) (result *v1.Node, err error) {
+ result = &v1.Node{}
+ err = c.client.Get().
+ Resource("nodes").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Nodes that match those selectors.
+func (c *nodes) List(opts meta_v1.ListOptions) (result *v1.NodeList, err error) {
+ result = &v1.NodeList{}
+ err = c.client.Get().
+ Resource("nodes").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested nodes.
+func (c *nodes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("nodes").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched node.
+func (c *nodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Node, err error) {
+ result = &v1.Node{}
+ err = c.client.Patch(pt).
+ Resource("nodes").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/node_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/node_expansion.go
new file mode 100644
index 000000000..29c12aabc
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/node_expansion.go
@@ -0,0 +1,43 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/types"
+ "k8s.io/client-go/pkg/api/v1"
+)
+
+// The NodeExpansion interface allows manually adding extra methods to the NodeInterface.
+type NodeExpansion interface {
+ // PatchStatus modifies the status of an existing node. It returns the copy
+ // of the node that the server returns, or an error.
+ PatchStatus(nodeName string, data []byte) (*v1.Node, error)
+}
+
+// PatchStatus modifies the status of an existing node. It returns the copy of
+// the node that the server returns, or an error.
+func (c *nodes) PatchStatus(nodeName string, data []byte) (*v1.Node, error) {
+ result := &v1.Node{}
+ err := c.client.Patch(types.StrategicMergePatchType).
+ Resource("nodes").
+ Name(nodeName).
+ SubResource("status").
+ Body(data).
+ Do().
+ Into(result)
+ return result, err
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go
new file mode 100644
index 000000000..16a4b7316
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go
@@ -0,0 +1,161 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1 "k8s.io/client-go/pkg/api/v1"
+ rest "k8s.io/client-go/rest"
+)
+
+// PersistentVolumesGetter has a method to return a PersistentVolumeInterface.
+// A group's client should implement this interface.
+type PersistentVolumesGetter interface {
+ PersistentVolumes() PersistentVolumeInterface
+}
+
+// PersistentVolumeInterface has methods to work with PersistentVolume resources.
+type PersistentVolumeInterface interface {
+ Create(*v1.PersistentVolume) (*v1.PersistentVolume, error)
+ Update(*v1.PersistentVolume) (*v1.PersistentVolume, error)
+ UpdateStatus(*v1.PersistentVolume) (*v1.PersistentVolume, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.PersistentVolume, error)
+ List(opts meta_v1.ListOptions) (*v1.PersistentVolumeList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error)
+ PersistentVolumeExpansion
+}
+
+// persistentVolumes implements PersistentVolumeInterface
+type persistentVolumes struct {
+ client rest.Interface
+}
+
+// newPersistentVolumes returns a PersistentVolumes
+func newPersistentVolumes(c *CoreV1Client) *persistentVolumes {
+ return &persistentVolumes{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a persistentVolume and creates it. Returns the server's representation of the persistentVolume, and an error, if there is any.
+func (c *persistentVolumes) Create(persistentVolume *v1.PersistentVolume) (result *v1.PersistentVolume, err error) {
+ result = &v1.PersistentVolume{}
+ err = c.client.Post().
+ Resource("persistentvolumes").
+ Body(persistentVolume).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a persistentVolume and updates it. Returns the server's representation of the persistentVolume, and an error, if there is any.
+func (c *persistentVolumes) Update(persistentVolume *v1.PersistentVolume) (result *v1.PersistentVolume, err error) {
+ result = &v1.PersistentVolume{}
+ err = c.client.Put().
+ Resource("persistentvolumes").
+ Name(persistentVolume.Name).
+ Body(persistentVolume).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *persistentVolumes) UpdateStatus(persistentVolume *v1.PersistentVolume) (result *v1.PersistentVolume, err error) {
+ result = &v1.PersistentVolume{}
+ err = c.client.Put().
+ Resource("persistentvolumes").
+ Name(persistentVolume.Name).
+ SubResource("status").
+ Body(persistentVolume).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the persistentVolume and deletes it. Returns an error if one occurs.
+func (c *persistentVolumes) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("persistentvolumes").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *persistentVolumes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("persistentvolumes").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the persistentVolume, and returns the corresponding persistentVolume object, and an error if there is any.
+func (c *persistentVolumes) Get(name string, options meta_v1.GetOptions) (result *v1.PersistentVolume, err error) {
+ result = &v1.PersistentVolume{}
+ err = c.client.Get().
+ Resource("persistentvolumes").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of PersistentVolumes that match those selectors.
+func (c *persistentVolumes) List(opts meta_v1.ListOptions) (result *v1.PersistentVolumeList, err error) {
+ result = &v1.PersistentVolumeList{}
+ err = c.client.Get().
+ Resource("persistentvolumes").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested persistentVolumes.
+func (c *persistentVolumes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("persistentvolumes").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched persistentVolume.
+func (c *persistentVolumes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error) {
+ result = &v1.PersistentVolume{}
+ err = c.client.Patch(pt).
+ Resource("persistentvolumes").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go
new file mode 100644
index 000000000..ae7cc4a4f
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1 "k8s.io/client-go/pkg/api/v1"
+ rest "k8s.io/client-go/rest"
+)
+
+// PersistentVolumeClaimsGetter has a method to return a PersistentVolumeClaimInterface.
+// A group's client should implement this interface.
+type PersistentVolumeClaimsGetter interface {
+ PersistentVolumeClaims(namespace string) PersistentVolumeClaimInterface
+}
+
+// PersistentVolumeClaimInterface has methods to work with PersistentVolumeClaim resources.
+type PersistentVolumeClaimInterface interface {
+ Create(*v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error)
+ Update(*v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error)
+ UpdateStatus(*v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.PersistentVolumeClaim, error)
+ List(opts meta_v1.ListOptions) (*v1.PersistentVolumeClaimList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error)
+ PersistentVolumeClaimExpansion
+}
+
+// persistentVolumeClaims implements PersistentVolumeClaimInterface
+type persistentVolumeClaims struct {
+ client rest.Interface
+ ns string
+}
+
+// newPersistentVolumeClaims returns a PersistentVolumeClaims
+func newPersistentVolumeClaims(c *CoreV1Client, namespace string) *persistentVolumeClaims {
+ return &persistentVolumeClaims{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a persistentVolumeClaim and creates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any.
+func (c *persistentVolumeClaims) Create(persistentVolumeClaim *v1.PersistentVolumeClaim) (result *v1.PersistentVolumeClaim, err error) {
+ result = &v1.PersistentVolumeClaim{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("persistentvolumeclaims").
+ Body(persistentVolumeClaim).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a persistentVolumeClaim and updates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any.
+func (c *persistentVolumeClaims) Update(persistentVolumeClaim *v1.PersistentVolumeClaim) (result *v1.PersistentVolumeClaim, err error) {
+ result = &v1.PersistentVolumeClaim{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("persistentvolumeclaims").
+ Name(persistentVolumeClaim.Name).
+ Body(persistentVolumeClaim).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *persistentVolumeClaims) UpdateStatus(persistentVolumeClaim *v1.PersistentVolumeClaim) (result *v1.PersistentVolumeClaim, err error) {
+ result = &v1.PersistentVolumeClaim{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("persistentvolumeclaims").
+ Name(persistentVolumeClaim.Name).
+ SubResource("status").
+ Body(persistentVolumeClaim).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the persistentVolumeClaim and deletes it. Returns an error if one occurs.
+func (c *persistentVolumeClaims) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("persistentvolumeclaims").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *persistentVolumeClaims) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("persistentvolumeclaims").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the persistentVolumeClaim, and returns the corresponding persistentVolumeClaim object, and an error if there is any.
+func (c *persistentVolumeClaims) Get(name string, options meta_v1.GetOptions) (result *v1.PersistentVolumeClaim, err error) {
+ result = &v1.PersistentVolumeClaim{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("persistentvolumeclaims").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of PersistentVolumeClaims that match those selectors.
+func (c *persistentVolumeClaims) List(opts meta_v1.ListOptions) (result *v1.PersistentVolumeClaimList, err error) {
+ result = &v1.PersistentVolumeClaimList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("persistentvolumeclaims").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested persistentVolumeClaims.
+func (c *persistentVolumeClaims) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("persistentvolumeclaims").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched persistentVolumeClaim.
+func (c *persistentVolumeClaims) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error) {
+ result = &v1.PersistentVolumeClaim{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("persistentvolumeclaims").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod.go
new file mode 100644
index 000000000..5648750ea
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1 "k8s.io/client-go/pkg/api/v1"
+ rest "k8s.io/client-go/rest"
+)
+
+// PodsGetter has a method to return a PodInterface.
+// A group's client should implement this interface.
+type PodsGetter interface {
+ Pods(namespace string) PodInterface
+}
+
+// PodInterface has methods to work with Pod resources.
+type PodInterface interface {
+ Create(*v1.Pod) (*v1.Pod, error)
+ Update(*v1.Pod) (*v1.Pod, error)
+ UpdateStatus(*v1.Pod) (*v1.Pod, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.Pod, error)
+ List(opts meta_v1.ListOptions) (*v1.PodList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error)
+ PodExpansion
+}
+
+// pods implements PodInterface
+type pods struct {
+ client rest.Interface
+ ns string
+}
+
+// newPods returns a Pods
+func newPods(c *CoreV1Client, namespace string) *pods {
+ return &pods{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a pod and creates it. Returns the server's representation of the pod, and an error, if there is any.
+func (c *pods) Create(pod *v1.Pod) (result *v1.Pod, err error) {
+ result = &v1.Pod{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("pods").
+ Body(pod).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a pod and updates it. Returns the server's representation of the pod, and an error, if there is any.
+func (c *pods) Update(pod *v1.Pod) (result *v1.Pod, err error) {
+ result = &v1.Pod{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("pods").
+ Name(pod.Name).
+ Body(pod).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *pods) UpdateStatus(pod *v1.Pod) (result *v1.Pod, err error) {
+ result = &v1.Pod{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("pods").
+ Name(pod.Name).
+ SubResource("status").
+ Body(pod).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the pod and deletes it. Returns an error if one occurs.
+func (c *pods) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("pods").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *pods) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("pods").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the pod, and returns the corresponding pod object, and an error if there is any.
+func (c *pods) Get(name string, options meta_v1.GetOptions) (result *v1.Pod, err error) {
+ result = &v1.Pod{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("pods").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Pods that match those selectors.
+func (c *pods) List(opts meta_v1.ListOptions) (result *v1.PodList, err error) {
+ result = &v1.PodList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("pods").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested pods.
+func (c *pods) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("pods").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched pod.
+func (c *pods) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error) {
+ result = &v1.Pod{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("pods").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod_expansion.go
new file mode 100644
index 000000000..3919289e5
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod_expansion.go
@@ -0,0 +1,45 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/client-go/kubernetes/scheme"
+ "k8s.io/client-go/pkg/api/v1"
+ policy "k8s.io/client-go/pkg/apis/policy/v1beta1"
+ restclient "k8s.io/client-go/rest"
+)
+
+// The PodExpansion interface allows manually adding extra methods to the PodInterface.
+type PodExpansion interface {
+ Bind(binding *v1.Binding) error
+ Evict(eviction *policy.Eviction) error
+ GetLogs(name string, opts *v1.PodLogOptions) *restclient.Request
+}
+
+// Bind applies the provided binding to the named pod in the current namespace (binding.Namespace is ignored).
+func (c *pods) Bind(binding *v1.Binding) error {
+ return c.client.Post().Namespace(c.ns).Resource("pods").Name(binding.Name).SubResource("binding").Body(binding).Do().Error()
+}
+
+func (c *pods) Evict(eviction *policy.Eviction) error {
+ return c.client.Post().Namespace(c.ns).Resource("pods").Name(eviction.Name).SubResource("eviction").Body(eviction).Do().Error()
+}
+
+// Get constructs a request for getting the logs for a pod
+func (c *pods) GetLogs(name string, opts *v1.PodLogOptions) *restclient.Request {
+ return c.client.Get().Namespace(c.ns).Name(name).Resource("pods").SubResource("log").VersionedParams(opts, scheme.ParameterCodec)
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go
new file mode 100644
index 000000000..19c82f17b
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1 "k8s.io/client-go/pkg/api/v1"
+ rest "k8s.io/client-go/rest"
+)
+
+// PodTemplatesGetter has a method to return a PodTemplateInterface.
+// A group's client should implement this interface.
+type PodTemplatesGetter interface {
+ PodTemplates(namespace string) PodTemplateInterface
+}
+
+// PodTemplateInterface has methods to work with PodTemplate resources.
+type PodTemplateInterface interface {
+ Create(*v1.PodTemplate) (*v1.PodTemplate, error)
+ Update(*v1.PodTemplate) (*v1.PodTemplate, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.PodTemplate, error)
+ List(opts meta_v1.ListOptions) (*v1.PodTemplateList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error)
+ PodTemplateExpansion
+}
+
+// podTemplates implements PodTemplateInterface
+type podTemplates struct {
+ client rest.Interface
+ ns string
+}
+
+// newPodTemplates returns a PodTemplates
+func newPodTemplates(c *CoreV1Client, namespace string) *podTemplates {
+ return &podTemplates{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a podTemplate and creates it. Returns the server's representation of the podTemplate, and an error, if there is any.
+func (c *podTemplates) Create(podTemplate *v1.PodTemplate) (result *v1.PodTemplate, err error) {
+ result = &v1.PodTemplate{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("podtemplates").
+ Body(podTemplate).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a podTemplate and updates it. Returns the server's representation of the podTemplate, and an error, if there is any.
+func (c *podTemplates) Update(podTemplate *v1.PodTemplate) (result *v1.PodTemplate, err error) {
+ result = &v1.PodTemplate{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("podtemplates").
+ Name(podTemplate.Name).
+ Body(podTemplate).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the podTemplate and deletes it. Returns an error if one occurs.
+func (c *podTemplates) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("podtemplates").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *podTemplates) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("podtemplates").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the podTemplate, and returns the corresponding podTemplate object, and an error if there is any.
+func (c *podTemplates) Get(name string, options meta_v1.GetOptions) (result *v1.PodTemplate, err error) {
+ result = &v1.PodTemplate{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("podtemplates").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of PodTemplates that match those selectors.
+func (c *podTemplates) List(opts meta_v1.ListOptions) (result *v1.PodTemplateList, err error) {
+ result = &v1.PodTemplateList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("podtemplates").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested podTemplates.
+func (c *podTemplates) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("podtemplates").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched podTemplate.
+func (c *podTemplates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error) {
+ result = &v1.PodTemplate{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("podtemplates").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go
new file mode 100644
index 000000000..2f4f4fa9e
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1 "k8s.io/client-go/pkg/api/v1"
+ rest "k8s.io/client-go/rest"
+)
+
+// ReplicationControllersGetter has a method to return a ReplicationControllerInterface.
+// A group's client should implement this interface.
+type ReplicationControllersGetter interface {
+ ReplicationControllers(namespace string) ReplicationControllerInterface
+}
+
+// ReplicationControllerInterface has methods to work with ReplicationController resources.
+type ReplicationControllerInterface interface {
+ Create(*v1.ReplicationController) (*v1.ReplicationController, error)
+ Update(*v1.ReplicationController) (*v1.ReplicationController, error)
+ UpdateStatus(*v1.ReplicationController) (*v1.ReplicationController, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.ReplicationController, error)
+ List(opts meta_v1.ListOptions) (*v1.ReplicationControllerList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error)
+ ReplicationControllerExpansion
+}
+
+// replicationControllers implements ReplicationControllerInterface
+type replicationControllers struct {
+ client rest.Interface
+ ns string
+}
+
+// newReplicationControllers returns a ReplicationControllers
+func newReplicationControllers(c *CoreV1Client, namespace string) *replicationControllers {
+ return &replicationControllers{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a replicationController and creates it. Returns the server's representation of the replicationController, and an error, if there is any.
+func (c *replicationControllers) Create(replicationController *v1.ReplicationController) (result *v1.ReplicationController, err error) {
+ result = &v1.ReplicationController{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("replicationcontrollers").
+ Body(replicationController).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a replicationController and updates it. Returns the server's representation of the replicationController, and an error, if there is any.
+func (c *replicationControllers) Update(replicationController *v1.ReplicationController) (result *v1.ReplicationController, err error) {
+ result = &v1.ReplicationController{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("replicationcontrollers").
+ Name(replicationController.Name).
+ Body(replicationController).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *replicationControllers) UpdateStatus(replicationController *v1.ReplicationController) (result *v1.ReplicationController, err error) {
+ result = &v1.ReplicationController{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("replicationcontrollers").
+ Name(replicationController.Name).
+ SubResource("status").
+ Body(replicationController).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the replicationController and deletes it. Returns an error if one occurs.
+func (c *replicationControllers) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("replicationcontrollers").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *replicationControllers) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("replicationcontrollers").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the replicationController, and returns the corresponding replicationController object, and an error if there is any.
+func (c *replicationControllers) Get(name string, options meta_v1.GetOptions) (result *v1.ReplicationController, err error) {
+ result = &v1.ReplicationController{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("replicationcontrollers").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of ReplicationControllers that match those selectors.
+func (c *replicationControllers) List(opts meta_v1.ListOptions) (result *v1.ReplicationControllerList, err error) {
+ result = &v1.ReplicationControllerList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("replicationcontrollers").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested replicationControllers.
+func (c *replicationControllers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("replicationcontrollers").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched replicationController.
+func (c *replicationControllers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error) {
+ result = &v1.ReplicationController{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("replicationcontrollers").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go
new file mode 100644
index 000000000..565fe1e6d
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1 "k8s.io/client-go/pkg/api/v1"
+ rest "k8s.io/client-go/rest"
+)
+
+// ResourceQuotasGetter has a method to return a ResourceQuotaInterface.
+// A group's client should implement this interface.
+type ResourceQuotasGetter interface {
+ ResourceQuotas(namespace string) ResourceQuotaInterface
+}
+
+// ResourceQuotaInterface has methods to work with ResourceQuota resources.
+type ResourceQuotaInterface interface {
+ Create(*v1.ResourceQuota) (*v1.ResourceQuota, error)
+ Update(*v1.ResourceQuota) (*v1.ResourceQuota, error)
+ UpdateStatus(*v1.ResourceQuota) (*v1.ResourceQuota, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.ResourceQuota, error)
+ List(opts meta_v1.ListOptions) (*v1.ResourceQuotaList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error)
+ ResourceQuotaExpansion
+}
+
+// resourceQuotas implements ResourceQuotaInterface
+type resourceQuotas struct {
+ client rest.Interface
+ ns string
+}
+
+// newResourceQuotas returns a ResourceQuotas
+func newResourceQuotas(c *CoreV1Client, namespace string) *resourceQuotas {
+ return &resourceQuotas{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a resourceQuota and creates it. Returns the server's representation of the resourceQuota, and an error, if there is any.
+func (c *resourceQuotas) Create(resourceQuota *v1.ResourceQuota) (result *v1.ResourceQuota, err error) {
+ result = &v1.ResourceQuota{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("resourcequotas").
+ Body(resourceQuota).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a resourceQuota and updates it. Returns the server's representation of the resourceQuota, and an error, if there is any.
+func (c *resourceQuotas) Update(resourceQuota *v1.ResourceQuota) (result *v1.ResourceQuota, err error) {
+ result = &v1.ResourceQuota{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("resourcequotas").
+ Name(resourceQuota.Name).
+ Body(resourceQuota).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *resourceQuotas) UpdateStatus(resourceQuota *v1.ResourceQuota) (result *v1.ResourceQuota, err error) {
+ result = &v1.ResourceQuota{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("resourcequotas").
+ Name(resourceQuota.Name).
+ SubResource("status").
+ Body(resourceQuota).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the resourceQuota and deletes it. Returns an error if one occurs.
+func (c *resourceQuotas) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("resourcequotas").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *resourceQuotas) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("resourcequotas").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the resourceQuota, and returns the corresponding resourceQuota object, and an error if there is any.
+func (c *resourceQuotas) Get(name string, options meta_v1.GetOptions) (result *v1.ResourceQuota, err error) {
+ result = &v1.ResourceQuota{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("resourcequotas").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of ResourceQuotas that match those selectors.
+func (c *resourceQuotas) List(opts meta_v1.ListOptions) (result *v1.ResourceQuotaList, err error) {
+ result = &v1.ResourceQuotaList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("resourcequotas").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested resourceQuotas.
+func (c *resourceQuotas) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("resourcequotas").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched resourceQuota.
+func (c *resourceQuotas) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error) {
+ result = &v1.ResourceQuota{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("resourcequotas").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/secret.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/secret.go
new file mode 100644
index 000000000..fbcede818
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/secret.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1 "k8s.io/client-go/pkg/api/v1"
+ rest "k8s.io/client-go/rest"
+)
+
+// SecretsGetter has a method to return a SecretInterface.
+// A group's client should implement this interface.
+type SecretsGetter interface {
+ Secrets(namespace string) SecretInterface
+}
+
+// SecretInterface has methods to work with Secret resources.
+type SecretInterface interface {
+ Create(*v1.Secret) (*v1.Secret, error)
+ Update(*v1.Secret) (*v1.Secret, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.Secret, error)
+ List(opts meta_v1.ListOptions) (*v1.SecretList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error)
+ SecretExpansion
+}
+
+// secrets implements SecretInterface
+type secrets struct {
+ client rest.Interface
+ ns string
+}
+
+// newSecrets returns a Secrets
+func newSecrets(c *CoreV1Client, namespace string) *secrets {
+ return &secrets{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a secret and creates it. Returns the server's representation of the secret, and an error, if there is any.
+func (c *secrets) Create(secret *v1.Secret) (result *v1.Secret, err error) {
+ result = &v1.Secret{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("secrets").
+ Body(secret).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a secret and updates it. Returns the server's representation of the secret, and an error, if there is any.
+func (c *secrets) Update(secret *v1.Secret) (result *v1.Secret, err error) {
+ result = &v1.Secret{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("secrets").
+ Name(secret.Name).
+ Body(secret).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the secret and deletes it. Returns an error if one occurs.
+func (c *secrets) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("secrets").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *secrets) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("secrets").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the secret, and returns the corresponding secret object, and an error if there is any.
+func (c *secrets) Get(name string, options meta_v1.GetOptions) (result *v1.Secret, err error) {
+ result = &v1.Secret{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("secrets").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Secrets that match those selectors.
+func (c *secrets) List(opts meta_v1.ListOptions) (result *v1.SecretList, err error) {
+ result = &v1.SecretList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("secrets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested secrets.
+func (c *secrets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("secrets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched secret.
+func (c *secrets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) {
+ result = &v1.Secret{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("secrets").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/service.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/service.go
new file mode 100644
index 000000000..0eccf79a8
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/service.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1 "k8s.io/client-go/pkg/api/v1"
+ rest "k8s.io/client-go/rest"
+)
+
+// ServicesGetter has a method to return a ServiceInterface.
+// A group's client should implement this interface.
+type ServicesGetter interface {
+ Services(namespace string) ServiceInterface
+}
+
+// ServiceInterface has methods to work with Service resources.
+type ServiceInterface interface {
+ Create(*v1.Service) (*v1.Service, error)
+ Update(*v1.Service) (*v1.Service, error)
+ UpdateStatus(*v1.Service) (*v1.Service, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.Service, error)
+ List(opts meta_v1.ListOptions) (*v1.ServiceList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error)
+ ServiceExpansion
+}
+
+// services implements ServiceInterface
+type services struct {
+ client rest.Interface
+ ns string
+}
+
+// newServices returns a Services
+func newServices(c *CoreV1Client, namespace string) *services {
+ return &services{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a service and creates it. Returns the server's representation of the service, and an error, if there is any.
+func (c *services) Create(service *v1.Service) (result *v1.Service, err error) {
+ result = &v1.Service{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("services").
+ Body(service).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a service and updates it. Returns the server's representation of the service, and an error, if there is any.
+func (c *services) Update(service *v1.Service) (result *v1.Service, err error) {
+ result = &v1.Service{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("services").
+ Name(service.Name).
+ Body(service).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *services) UpdateStatus(service *v1.Service) (result *v1.Service, err error) {
+ result = &v1.Service{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("services").
+ Name(service.Name).
+ SubResource("status").
+ Body(service).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the service and deletes it. Returns an error if one occurs.
+func (c *services) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("services").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *services) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("services").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the service, and returns the corresponding service object, and an error if there is any.
+func (c *services) Get(name string, options meta_v1.GetOptions) (result *v1.Service, err error) {
+ result = &v1.Service{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("services").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Services that match those selectors.
+func (c *services) List(opts meta_v1.ListOptions) (result *v1.ServiceList, err error) {
+ result = &v1.ServiceList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("services").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested services.
+func (c *services) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("services").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched service.
+func (c *services) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) {
+ result = &v1.Service{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("services").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/service_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/service_expansion.go
new file mode 100644
index 000000000..4937fd1a3
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/service_expansion.go
@@ -0,0 +1,41 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/util/net"
+ restclient "k8s.io/client-go/rest"
+)
+
+// The ServiceExpansion interface allows manually adding extra methods to the ServiceInterface.
+type ServiceExpansion interface {
+ ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper
+}
+
+// ProxyGet returns a response of the service by calling it through the proxy.
+func (c *services) ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper {
+ request := c.client.Get().
+ Namespace(c.ns).
+ Resource("services").
+ SubResource("proxy").
+ Name(net.JoinSchemeNamePort(scheme, name, port)).
+ Suffix(path)
+ for k, v := range params {
+ request = request.Param(k, v)
+ }
+ return request
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go
new file mode 100644
index 000000000..f71789f6a
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1 "k8s.io/client-go/pkg/api/v1"
+ rest "k8s.io/client-go/rest"
+)
+
+// ServiceAccountsGetter has a method to return a ServiceAccountInterface.
+// A group's client should implement this interface.
+type ServiceAccountsGetter interface {
+ ServiceAccounts(namespace string) ServiceAccountInterface
+}
+
+// ServiceAccountInterface has methods to work with ServiceAccount resources.
+type ServiceAccountInterface interface {
+ Create(*v1.ServiceAccount) (*v1.ServiceAccount, error)
+ Update(*v1.ServiceAccount) (*v1.ServiceAccount, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.ServiceAccount, error)
+ List(opts meta_v1.ListOptions) (*v1.ServiceAccountList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error)
+ ServiceAccountExpansion
+}
+
+// serviceAccounts implements ServiceAccountInterface
+type serviceAccounts struct {
+ client rest.Interface
+ ns string
+}
+
+// newServiceAccounts returns a ServiceAccounts
+func newServiceAccounts(c *CoreV1Client, namespace string) *serviceAccounts {
+ return &serviceAccounts{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a serviceAccount and creates it. Returns the server's representation of the serviceAccount, and an error, if there is any.
+func (c *serviceAccounts) Create(serviceAccount *v1.ServiceAccount) (result *v1.ServiceAccount, err error) {
+ result = &v1.ServiceAccount{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("serviceaccounts").
+ Body(serviceAccount).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a serviceAccount and updates it. Returns the server's representation of the serviceAccount, and an error, if there is any.
+func (c *serviceAccounts) Update(serviceAccount *v1.ServiceAccount) (result *v1.ServiceAccount, err error) {
+ result = &v1.ServiceAccount{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("serviceaccounts").
+ Name(serviceAccount.Name).
+ Body(serviceAccount).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the serviceAccount and deletes it. Returns an error if one occurs.
+func (c *serviceAccounts) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("serviceaccounts").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *serviceAccounts) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("serviceaccounts").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the serviceAccount, and returns the corresponding serviceAccount object, and an error if there is any.
+func (c *serviceAccounts) Get(name string, options meta_v1.GetOptions) (result *v1.ServiceAccount, err error) {
+ result = &v1.ServiceAccount{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("serviceaccounts").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of ServiceAccounts that match those selectors.
+func (c *serviceAccounts) List(opts meta_v1.ListOptions) (result *v1.ServiceAccountList, err error) {
+ result = &v1.ServiceAccountList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("serviceaccounts").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested serviceAccounts.
+func (c *serviceAccounts) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("serviceaccounts").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched serviceAccount.
+func (c *serviceAccounts) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error) {
+ result = &v1.ServiceAccount{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("serviceaccounts").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go
new file mode 100644
index 000000000..8c132db9b
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
+ rest "k8s.io/client-go/rest"
+)
+
+// DaemonSetsGetter has a method to return a DaemonSetInterface.
+// A group's client should implement this interface.
+type DaemonSetsGetter interface {
+ DaemonSets(namespace string) DaemonSetInterface
+}
+
+// DaemonSetInterface has methods to work with DaemonSet resources.
+type DaemonSetInterface interface {
+ Create(*v1beta1.DaemonSet) (*v1beta1.DaemonSet, error)
+ Update(*v1beta1.DaemonSet) (*v1beta1.DaemonSet, error)
+ UpdateStatus(*v1beta1.DaemonSet) (*v1beta1.DaemonSet, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.DaemonSet, error)
+ List(opts v1.ListOptions) (*v1beta1.DaemonSetList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error)
+ DaemonSetExpansion
+}
+
+// daemonSets implements DaemonSetInterface
+type daemonSets struct {
+ client rest.Interface
+ ns string
+}
+
+// newDaemonSets returns a DaemonSets
+func newDaemonSets(c *ExtensionsV1beta1Client, namespace string) *daemonSets {
+ return &daemonSets{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any.
+func (c *daemonSets) Create(daemonSet *v1beta1.DaemonSet) (result *v1beta1.DaemonSet, err error) {
+ result = &v1beta1.DaemonSet{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("daemonsets").
+ Body(daemonSet).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any.
+func (c *daemonSets) Update(daemonSet *v1beta1.DaemonSet) (result *v1beta1.DaemonSet, err error) {
+ result = &v1beta1.DaemonSet{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("daemonsets").
+ Name(daemonSet.Name).
+ Body(daemonSet).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *daemonSets) UpdateStatus(daemonSet *v1beta1.DaemonSet) (result *v1beta1.DaemonSet, err error) {
+ result = &v1beta1.DaemonSet{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("daemonsets").
+ Name(daemonSet.Name).
+ SubResource("status").
+ Body(daemonSet).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the daemonSet and deletes it. Returns an error if one occurs.
+func (c *daemonSets) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("daemonsets").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *daemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("daemonsets").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any.
+func (c *daemonSets) Get(name string, options v1.GetOptions) (result *v1beta1.DaemonSet, err error) {
+ result = &v1beta1.DaemonSet{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("daemonsets").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of DaemonSets that match those selectors.
+func (c *daemonSets) List(opts v1.ListOptions) (result *v1beta1.DaemonSetList, err error) {
+ result = &v1beta1.DaemonSetList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("daemonsets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested daemonSets.
+func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("daemonsets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched daemonSet.
+func (c *daemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) {
+ result = &v1beta1.DaemonSet{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("daemonsets").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go
new file mode 100644
index 000000000..7d0122c2a
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
+ rest "k8s.io/client-go/rest"
+)
+
+// DeploymentsGetter has a method to return a DeploymentInterface.
+// A group's client should implement this interface.
+type DeploymentsGetter interface {
+ Deployments(namespace string) DeploymentInterface
+}
+
+// DeploymentInterface has methods to work with Deployment resources.
+type DeploymentInterface interface {
+ Create(*v1beta1.Deployment) (*v1beta1.Deployment, error)
+ Update(*v1beta1.Deployment) (*v1beta1.Deployment, error)
+ UpdateStatus(*v1beta1.Deployment) (*v1beta1.Deployment, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.Deployment, error)
+ List(opts v1.ListOptions) (*v1beta1.DeploymentList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error)
+ DeploymentExpansion
+}
+
+// deployments implements DeploymentInterface
+type deployments struct {
+ client rest.Interface
+ ns string
+}
+
+// newDeployments returns a Deployments
+func newDeployments(c *ExtensionsV1beta1Client, namespace string) *deployments {
+ return &deployments{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any.
+func (c *deployments) Create(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
+ result = &v1beta1.Deployment{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("deployments").
+ Body(deployment).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any.
+func (c *deployments) Update(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
+ result = &v1beta1.Deployment{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("deployments").
+ Name(deployment.Name).
+ Body(deployment).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *deployments) UpdateStatus(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
+ result = &v1beta1.Deployment{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("deployments").
+ Name(deployment.Name).
+ SubResource("status").
+ Body(deployment).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the deployment and deletes it. Returns an error if one occurs.
+func (c *deployments) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("deployments").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("deployments").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any.
+func (c *deployments) Get(name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) {
+ result = &v1beta1.Deployment{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("deployments").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Deployments that match those selectors.
+func (c *deployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) {
+ result = &v1beta1.DeploymentList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("deployments").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested deployments.
+func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("deployments").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched deployment.
+func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) {
+ result = &v1beta1.Deployment{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("deployments").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment_expansion.go
new file mode 100644
index 000000000..e737f09ae
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment_expansion.go
@@ -0,0 +1,29 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import "k8s.io/client-go/pkg/apis/extensions/v1beta1"
+
+// The DeploymentExpansion interface allows manually adding extra methods to the DeploymentInterface.
+type DeploymentExpansion interface {
+ Rollback(*v1beta1.DeploymentRollback) error
+}
+
+// Rollback applied the provided DeploymentRollback to the named deployment in the current namespace.
+func (c *deployments) Rollback(deploymentRollback *v1beta1.DeploymentRollback) error {
+ return c.client.Post().Namespace(c.ns).Resource("deployments").Name(deploymentRollback.Name).SubResource("rollback").Body(deploymentRollback).Do().Error()
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/doc.go
new file mode 100644
index 000000000..11b523897
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1beta1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/extensions_client.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/extensions_client.go
new file mode 100644
index 000000000..5284346e1
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/extensions_client.go
@@ -0,0 +1,118 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ "k8s.io/client-go/kubernetes/scheme"
+ v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
+ rest "k8s.io/client-go/rest"
+)
+
+type ExtensionsV1beta1Interface interface {
+ RESTClient() rest.Interface
+ DaemonSetsGetter
+ DeploymentsGetter
+ IngressesGetter
+ PodSecurityPoliciesGetter
+ ReplicaSetsGetter
+ ScalesGetter
+ ThirdPartyResourcesGetter
+}
+
+// ExtensionsV1beta1Client is used to interact with features provided by the extensions group.
+type ExtensionsV1beta1Client struct {
+ restClient rest.Interface
+}
+
+func (c *ExtensionsV1beta1Client) DaemonSets(namespace string) DaemonSetInterface {
+ return newDaemonSets(c, namespace)
+}
+
+func (c *ExtensionsV1beta1Client) Deployments(namespace string) DeploymentInterface {
+ return newDeployments(c, namespace)
+}
+
+func (c *ExtensionsV1beta1Client) Ingresses(namespace string) IngressInterface {
+ return newIngresses(c, namespace)
+}
+
+func (c *ExtensionsV1beta1Client) PodSecurityPolicies() PodSecurityPolicyInterface {
+ return newPodSecurityPolicies(c)
+}
+
+func (c *ExtensionsV1beta1Client) ReplicaSets(namespace string) ReplicaSetInterface {
+ return newReplicaSets(c, namespace)
+}
+
+func (c *ExtensionsV1beta1Client) Scales(namespace string) ScaleInterface {
+ return newScales(c, namespace)
+}
+
+func (c *ExtensionsV1beta1Client) ThirdPartyResources() ThirdPartyResourceInterface {
+ return newThirdPartyResources(c)
+}
+
+// NewForConfig creates a new ExtensionsV1beta1Client for the given config.
+func NewForConfig(c *rest.Config) (*ExtensionsV1beta1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &ExtensionsV1beta1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new ExtensionsV1beta1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *ExtensionsV1beta1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new ExtensionsV1beta1Client for the given RESTClient.
+func New(c rest.Interface) *ExtensionsV1beta1Client {
+ return &ExtensionsV1beta1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1beta1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *ExtensionsV1beta1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/generated_expansion.go
new file mode 100644
index 000000000..d0a3d64bc
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/generated_expansion.go
@@ -0,0 +1,27 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+type DaemonSetExpansion interface{}
+
+type IngressExpansion interface{}
+
+type PodSecurityPolicyExpansion interface{}
+
+type ReplicaSetExpansion interface{}
+
+type ThirdPartyResourceExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go
new file mode 100644
index 000000000..86bf65b8f
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
+ rest "k8s.io/client-go/rest"
+)
+
+// IngressesGetter has a method to return a IngressInterface.
+// A group's client should implement this interface.
+type IngressesGetter interface {
+ Ingresses(namespace string) IngressInterface
+}
+
+// IngressInterface has methods to work with Ingress resources.
+type IngressInterface interface {
+ Create(*v1beta1.Ingress) (*v1beta1.Ingress, error)
+ Update(*v1beta1.Ingress) (*v1beta1.Ingress, error)
+ UpdateStatus(*v1beta1.Ingress) (*v1beta1.Ingress, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.Ingress, error)
+ List(opts v1.ListOptions) (*v1beta1.IngressList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error)
+ IngressExpansion
+}
+
+// ingresses implements IngressInterface
+type ingresses struct {
+ client rest.Interface
+ ns string
+}
+
+// newIngresses returns a Ingresses
+func newIngresses(c *ExtensionsV1beta1Client, namespace string) *ingresses {
+ return &ingresses{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a ingress and creates it. Returns the server's representation of the ingress, and an error, if there is any.
+func (c *ingresses) Create(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) {
+ result = &v1beta1.Ingress{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("ingresses").
+ Body(ingress).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a ingress and updates it. Returns the server's representation of the ingress, and an error, if there is any.
+func (c *ingresses) Update(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) {
+ result = &v1beta1.Ingress{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("ingresses").
+ Name(ingress.Name).
+ Body(ingress).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *ingresses) UpdateStatus(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) {
+ result = &v1beta1.Ingress{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("ingresses").
+ Name(ingress.Name).
+ SubResource("status").
+ Body(ingress).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the ingress and deletes it. Returns an error if one occurs.
+func (c *ingresses) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("ingresses").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *ingresses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("ingresses").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the ingress, and returns the corresponding ingress object, and an error if there is any.
+func (c *ingresses) Get(name string, options v1.GetOptions) (result *v1beta1.Ingress, err error) {
+ result = &v1beta1.Ingress{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("ingresses").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Ingresses that match those selectors.
+func (c *ingresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, err error) {
+ result = &v1beta1.IngressList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("ingresses").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested ingresses.
+func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("ingresses").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched ingress.
+func (c *ingresses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) {
+ result = &v1beta1.Ingress{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("ingresses").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go
new file mode 100644
index 000000000..ad57a6cab
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go
@@ -0,0 +1,145 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
+ rest "k8s.io/client-go/rest"
+)
+
+// PodSecurityPoliciesGetter has a method to return a PodSecurityPolicyInterface.
+// A group's client should implement this interface.
+type PodSecurityPoliciesGetter interface {
+ PodSecurityPolicies() PodSecurityPolicyInterface
+}
+
+// PodSecurityPolicyInterface has methods to work with PodSecurityPolicy resources.
+type PodSecurityPolicyInterface interface {
+ Create(*v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error)
+ Update(*v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.PodSecurityPolicy, error)
+ List(opts v1.ListOptions) (*v1beta1.PodSecurityPolicyList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error)
+ PodSecurityPolicyExpansion
+}
+
+// podSecurityPolicies implements PodSecurityPolicyInterface
+type podSecurityPolicies struct {
+ client rest.Interface
+}
+
+// newPodSecurityPolicies returns a PodSecurityPolicies
+func newPodSecurityPolicies(c *ExtensionsV1beta1Client) *podSecurityPolicies {
+ return &podSecurityPolicies{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a podSecurityPolicy and creates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any.
+func (c *podSecurityPolicies) Create(podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) {
+ result = &v1beta1.PodSecurityPolicy{}
+ err = c.client.Post().
+ Resource("podsecuritypolicies").
+ Body(podSecurityPolicy).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a podSecurityPolicy and updates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any.
+func (c *podSecurityPolicies) Update(podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) {
+ result = &v1beta1.PodSecurityPolicy{}
+ err = c.client.Put().
+ Resource("podsecuritypolicies").
+ Name(podSecurityPolicy.Name).
+ Body(podSecurityPolicy).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the podSecurityPolicy and deletes it. Returns an error if one occurs.
+func (c *podSecurityPolicies) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("podsecuritypolicies").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *podSecurityPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("podsecuritypolicies").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the podSecurityPolicy, and returns the corresponding podSecurityPolicy object, and an error if there is any.
+func (c *podSecurityPolicies) Get(name string, options v1.GetOptions) (result *v1beta1.PodSecurityPolicy, err error) {
+ result = &v1beta1.PodSecurityPolicy{}
+ err = c.client.Get().
+ Resource("podsecuritypolicies").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of PodSecurityPolicies that match those selectors.
+func (c *podSecurityPolicies) List(opts v1.ListOptions) (result *v1beta1.PodSecurityPolicyList, err error) {
+ result = &v1beta1.PodSecurityPolicyList{}
+ err = c.client.Get().
+ Resource("podsecuritypolicies").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested podSecurityPolicies.
+func (c *podSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("podsecuritypolicies").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched podSecurityPolicy.
+func (c *podSecurityPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) {
+ result = &v1beta1.PodSecurityPolicy{}
+ err = c.client.Patch(pt).
+ Resource("podsecuritypolicies").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go
new file mode 100644
index 000000000..aa6f505a2
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
+ rest "k8s.io/client-go/rest"
+)
+
+// ReplicaSetsGetter has a method to return a ReplicaSetInterface.
+// A group's client should implement this interface.
+type ReplicaSetsGetter interface {
+ ReplicaSets(namespace string) ReplicaSetInterface
+}
+
+// ReplicaSetInterface has methods to work with ReplicaSet resources.
+type ReplicaSetInterface interface {
+ Create(*v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error)
+ Update(*v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error)
+ UpdateStatus(*v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.ReplicaSet, error)
+ List(opts v1.ListOptions) (*v1beta1.ReplicaSetList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error)
+ ReplicaSetExpansion
+}
+
+// replicaSets implements ReplicaSetInterface
+type replicaSets struct {
+ client rest.Interface
+ ns string
+}
+
+// newReplicaSets returns a ReplicaSets
+func newReplicaSets(c *ExtensionsV1beta1Client, namespace string) *replicaSets {
+ return &replicaSets{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any.
+func (c *replicaSets) Create(replicaSet *v1beta1.ReplicaSet) (result *v1beta1.ReplicaSet, err error) {
+ result = &v1beta1.ReplicaSet{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("replicasets").
+ Body(replicaSet).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any.
+func (c *replicaSets) Update(replicaSet *v1beta1.ReplicaSet) (result *v1beta1.ReplicaSet, err error) {
+ result = &v1beta1.ReplicaSet{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("replicasets").
+ Name(replicaSet.Name).
+ Body(replicaSet).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *replicaSets) UpdateStatus(replicaSet *v1beta1.ReplicaSet) (result *v1beta1.ReplicaSet, err error) {
+ result = &v1beta1.ReplicaSet{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("replicasets").
+ Name(replicaSet.Name).
+ SubResource("status").
+ Body(replicaSet).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the replicaSet and deletes it. Returns an error if one occurs.
+func (c *replicaSets) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("replicasets").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *replicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("replicasets").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any.
+func (c *replicaSets) Get(name string, options v1.GetOptions) (result *v1beta1.ReplicaSet, err error) {
+ result = &v1beta1.ReplicaSet{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("replicasets").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of ReplicaSets that match those selectors.
+func (c *replicaSets) List(opts v1.ListOptions) (result *v1beta1.ReplicaSetList, err error) {
+ result = &v1beta1.ReplicaSetList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("replicasets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested replicaSets.
+func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("replicasets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched replicaSet.
+func (c *replicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) {
+ result = &v1beta1.ReplicaSet{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("replicasets").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/scale.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/scale.go
new file mode 100644
index 000000000..733012ade
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/scale.go
@@ -0,0 +1,46 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ rest "k8s.io/client-go/rest"
+)
+
+// ScalesGetter has a method to return a ScaleInterface.
+// A group's client should implement this interface.
+type ScalesGetter interface {
+ Scales(namespace string) ScaleInterface
+}
+
+// ScaleInterface has methods to work with Scale resources.
+type ScaleInterface interface {
+ ScaleExpansion
+}
+
+// scales implements ScaleInterface
+type scales struct {
+ client rest.Interface
+ ns string
+}
+
+// newScales returns a Scales
+func newScales(c *ExtensionsV1beta1Client, namespace string) *scales {
+ return &scales{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/scale_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/scale_expansion.go
new file mode 100644
index 000000000..85d7c40a8
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/scale_expansion.go
@@ -0,0 +1,65 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "k8s.io/apimachinery/pkg/api/meta"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/client-go/pkg/apis/extensions/v1beta1"
+)
+
+// The ScaleExpansion interface allows manually adding extra methods to the ScaleInterface.
+type ScaleExpansion interface {
+ Get(kind string, name string) (*v1beta1.Scale, error)
+ Update(kind string, scale *v1beta1.Scale) (*v1beta1.Scale, error)
+}
+
+// Get takes the reference to scale subresource and returns the subresource or error, if one occurs.
+func (c *scales) Get(kind string, name string) (result *v1beta1.Scale, err error) {
+ result = &v1beta1.Scale{}
+
+ // TODO this method needs to take a proper unambiguous kind
+ fullyQualifiedKind := schema.GroupVersionKind{Kind: kind}
+ resource, _ := meta.UnsafeGuessKindToResource(fullyQualifiedKind)
+
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource(resource.Resource).
+ Name(name).
+ SubResource("scale").
+ Do().
+ Into(result)
+ return
+}
+
+func (c *scales) Update(kind string, scale *v1beta1.Scale) (result *v1beta1.Scale, err error) {
+ result = &v1beta1.Scale{}
+
+ // TODO this method needs to take a proper unambiguous kind
+ fullyQualifiedKind := schema.GroupVersionKind{Kind: kind}
+ resource, _ := meta.UnsafeGuessKindToResource(fullyQualifiedKind)
+
+ err = c.client.Put().
+ Namespace(scale.Namespace).
+ Resource(resource.Resource).
+ Name(scale.Name).
+ SubResource("scale").
+ Body(scale).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/thirdpartyresource.go b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/thirdpartyresource.go
new file mode 100644
index 000000000..617c2069b
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/thirdpartyresource.go
@@ -0,0 +1,145 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1"
+ rest "k8s.io/client-go/rest"
+)
+
+// ThirdPartyResourcesGetter has a method to return a ThirdPartyResourceInterface.
+// A group's client should implement this interface.
+type ThirdPartyResourcesGetter interface {
+ ThirdPartyResources() ThirdPartyResourceInterface
+}
+
+// ThirdPartyResourceInterface has methods to work with ThirdPartyResource resources.
+type ThirdPartyResourceInterface interface {
+ Create(*v1beta1.ThirdPartyResource) (*v1beta1.ThirdPartyResource, error)
+ Update(*v1beta1.ThirdPartyResource) (*v1beta1.ThirdPartyResource, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.ThirdPartyResource, error)
+ List(opts v1.ListOptions) (*v1beta1.ThirdPartyResourceList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ThirdPartyResource, err error)
+ ThirdPartyResourceExpansion
+}
+
+// thirdPartyResources implements ThirdPartyResourceInterface
+type thirdPartyResources struct {
+ client rest.Interface
+}
+
+// newThirdPartyResources returns a ThirdPartyResources
+func newThirdPartyResources(c *ExtensionsV1beta1Client) *thirdPartyResources {
+ return &thirdPartyResources{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a thirdPartyResource and creates it. Returns the server's representation of the thirdPartyResource, and an error, if there is any.
+func (c *thirdPartyResources) Create(thirdPartyResource *v1beta1.ThirdPartyResource) (result *v1beta1.ThirdPartyResource, err error) {
+ result = &v1beta1.ThirdPartyResource{}
+ err = c.client.Post().
+ Resource("thirdpartyresources").
+ Body(thirdPartyResource).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a thirdPartyResource and updates it. Returns the server's representation of the thirdPartyResource, and an error, if there is any.
+func (c *thirdPartyResources) Update(thirdPartyResource *v1beta1.ThirdPartyResource) (result *v1beta1.ThirdPartyResource, err error) {
+ result = &v1beta1.ThirdPartyResource{}
+ err = c.client.Put().
+ Resource("thirdpartyresources").
+ Name(thirdPartyResource.Name).
+ Body(thirdPartyResource).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the thirdPartyResource and deletes it. Returns an error if one occurs.
+func (c *thirdPartyResources) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("thirdpartyresources").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *thirdPartyResources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("thirdpartyresources").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the thirdPartyResource, and returns the corresponding thirdPartyResource object, and an error if there is any.
+func (c *thirdPartyResources) Get(name string, options v1.GetOptions) (result *v1beta1.ThirdPartyResource, err error) {
+ result = &v1beta1.ThirdPartyResource{}
+ err = c.client.Get().
+ Resource("thirdpartyresources").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of ThirdPartyResources that match those selectors.
+func (c *thirdPartyResources) List(opts v1.ListOptions) (result *v1beta1.ThirdPartyResourceList, err error) {
+ result = &v1beta1.ThirdPartyResourceList{}
+ err = c.client.Get().
+ Resource("thirdpartyresources").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested thirdPartyResources.
+func (c *thirdPartyResources) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("thirdpartyresources").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched thirdPartyResource.
+func (c *thirdPartyResources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ThirdPartyResource, err error) {
+ result = &v1beta1.ThirdPartyResource{}
+ err = c.client.Patch(pt).
+ Resource("thirdpartyresources").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/doc.go
new file mode 100644
index 000000000..54673bfa7
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/generated_expansion.go
new file mode 100644
index 000000000..cdd70ae35
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/generated_expansion.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+type NetworkPolicyExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networking_client.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networking_client.go
new file mode 100644
index 000000000..20429dd5d
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networking_client.go
@@ -0,0 +1,88 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ "k8s.io/client-go/kubernetes/scheme"
+ v1 "k8s.io/client-go/pkg/apis/networking/v1"
+ rest "k8s.io/client-go/rest"
+)
+
+type NetworkingV1Interface interface {
+ RESTClient() rest.Interface
+ NetworkPoliciesGetter
+}
+
+// NetworkingV1Client is used to interact with features provided by the networking.k8s.io group.
+type NetworkingV1Client struct {
+ restClient rest.Interface
+}
+
+func (c *NetworkingV1Client) NetworkPolicies(namespace string) NetworkPolicyInterface {
+ return newNetworkPolicies(c, namespace)
+}
+
+// NewForConfig creates a new NetworkingV1Client for the given config.
+func NewForConfig(c *rest.Config) (*NetworkingV1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &NetworkingV1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new NetworkingV1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *NetworkingV1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new NetworkingV1Client for the given RESTClient.
+func New(c rest.Interface) *NetworkingV1Client {
+ return &NetworkingV1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *NetworkingV1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go
new file mode 100644
index 000000000..14d1e669b
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1 "k8s.io/client-go/pkg/apis/networking/v1"
+ rest "k8s.io/client-go/rest"
+)
+
+// NetworkPoliciesGetter has a method to return a NetworkPolicyInterface.
+// A group's client should implement this interface.
+type NetworkPoliciesGetter interface {
+ NetworkPolicies(namespace string) NetworkPolicyInterface
+}
+
+// NetworkPolicyInterface has methods to work with NetworkPolicy resources.
+type NetworkPolicyInterface interface {
+ Create(*v1.NetworkPolicy) (*v1.NetworkPolicy, error)
+ Update(*v1.NetworkPolicy) (*v1.NetworkPolicy, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.NetworkPolicy, error)
+ List(opts meta_v1.ListOptions) (*v1.NetworkPolicyList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.NetworkPolicy, err error)
+ NetworkPolicyExpansion
+}
+
+// networkPolicies implements NetworkPolicyInterface
+type networkPolicies struct {
+ client rest.Interface
+ ns string
+}
+
+// newNetworkPolicies returns a NetworkPolicies
+func newNetworkPolicies(c *NetworkingV1Client, namespace string) *networkPolicies {
+ return &networkPolicies{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a networkPolicy and creates it. Returns the server's representation of the networkPolicy, and an error, if there is any.
+func (c *networkPolicies) Create(networkPolicy *v1.NetworkPolicy) (result *v1.NetworkPolicy, err error) {
+ result = &v1.NetworkPolicy{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("networkpolicies").
+ Body(networkPolicy).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a networkPolicy and updates it. Returns the server's representation of the networkPolicy, and an error, if there is any.
+func (c *networkPolicies) Update(networkPolicy *v1.NetworkPolicy) (result *v1.NetworkPolicy, err error) {
+ result = &v1.NetworkPolicy{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("networkpolicies").
+ Name(networkPolicy.Name).
+ Body(networkPolicy).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs.
+func (c *networkPolicies) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("networkpolicies").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *networkPolicies) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("networkpolicies").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the networkPolicy, and returns the corresponding networkPolicy object, and an error if there is any.
+func (c *networkPolicies) Get(name string, options meta_v1.GetOptions) (result *v1.NetworkPolicy, err error) {
+ result = &v1.NetworkPolicy{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("networkpolicies").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of NetworkPolicies that match those selectors.
+func (c *networkPolicies) List(opts meta_v1.ListOptions) (result *v1.NetworkPolicyList, err error) {
+ result = &v1.NetworkPolicyList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("networkpolicies").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested networkPolicies.
+func (c *networkPolicies) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("networkpolicies").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched networkPolicy.
+func (c *networkPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.NetworkPolicy, err error) {
+ result = &v1.NetworkPolicy{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("networkpolicies").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/doc.go
new file mode 100644
index 000000000..11b523897
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1beta1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction.go
new file mode 100644
index 000000000..9c4133e36
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction.go
@@ -0,0 +1,46 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ rest "k8s.io/client-go/rest"
+)
+
+// EvictionsGetter has a method to return a EvictionInterface.
+// A group's client should implement this interface.
+type EvictionsGetter interface {
+ Evictions(namespace string) EvictionInterface
+}
+
+// EvictionInterface has methods to work with Eviction resources.
+type EvictionInterface interface {
+ EvictionExpansion
+}
+
+// evictions implements EvictionInterface
+type evictions struct {
+ client rest.Interface
+ ns string
+}
+
+// newEvictions returns a Evictions
+func newEvictions(c *PolicyV1beta1Client, namespace string) *evictions {
+ return &evictions{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction_expansion.go
new file mode 100644
index 000000000..bde1baca6
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction_expansion.go
@@ -0,0 +1,38 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ policy "k8s.io/client-go/pkg/apis/policy/v1beta1"
+)
+
+// The EvictionExpansion interface allows manually adding extra methods to the ScaleInterface.
+type EvictionExpansion interface {
+ Evict(eviction *policy.Eviction) error
+}
+
+func (c *evictions) Evict(eviction *policy.Eviction) error {
+ return c.client.Post().
+ AbsPath("/api/v1").
+ Namespace(eviction.Namespace).
+ Resource("pods").
+ Name(eviction.Name).
+ SubResource("eviction").
+ Body(eviction).
+ Do().
+ Error()
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/generated_expansion.go
new file mode 100644
index 000000000..511adc6ef
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/generated_expansion.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+type PodDisruptionBudgetExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go
new file mode 100644
index 000000000..8088dd019
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1beta1 "k8s.io/client-go/pkg/apis/policy/v1beta1"
+ rest "k8s.io/client-go/rest"
+)
+
+// PodDisruptionBudgetsGetter has a method to return a PodDisruptionBudgetInterface.
+// A group's client should implement this interface.
+type PodDisruptionBudgetsGetter interface {
+ PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface
+}
+
+// PodDisruptionBudgetInterface has methods to work with PodDisruptionBudget resources.
+type PodDisruptionBudgetInterface interface {
+ Create(*v1beta1.PodDisruptionBudget) (*v1beta1.PodDisruptionBudget, error)
+ Update(*v1beta1.PodDisruptionBudget) (*v1beta1.PodDisruptionBudget, error)
+ UpdateStatus(*v1beta1.PodDisruptionBudget) (*v1beta1.PodDisruptionBudget, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.PodDisruptionBudget, error)
+ List(opts v1.ListOptions) (*v1beta1.PodDisruptionBudgetList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error)
+ PodDisruptionBudgetExpansion
+}
+
+// podDisruptionBudgets implements PodDisruptionBudgetInterface
+type podDisruptionBudgets struct {
+ client rest.Interface
+ ns string
+}
+
+// newPodDisruptionBudgets returns a PodDisruptionBudgets
+func newPodDisruptionBudgets(c *PolicyV1beta1Client, namespace string) *podDisruptionBudgets {
+ return &podDisruptionBudgets{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a podDisruptionBudget and creates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any.
+func (c *podDisruptionBudgets) Create(podDisruptionBudget *v1beta1.PodDisruptionBudget) (result *v1beta1.PodDisruptionBudget, err error) {
+ result = &v1beta1.PodDisruptionBudget{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("poddisruptionbudgets").
+ Body(podDisruptionBudget).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a podDisruptionBudget and updates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any.
+func (c *podDisruptionBudgets) Update(podDisruptionBudget *v1beta1.PodDisruptionBudget) (result *v1beta1.PodDisruptionBudget, err error) {
+ result = &v1beta1.PodDisruptionBudget{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("poddisruptionbudgets").
+ Name(podDisruptionBudget.Name).
+ Body(podDisruptionBudget).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *podDisruptionBudgets) UpdateStatus(podDisruptionBudget *v1beta1.PodDisruptionBudget) (result *v1beta1.PodDisruptionBudget, err error) {
+ result = &v1beta1.PodDisruptionBudget{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("poddisruptionbudgets").
+ Name(podDisruptionBudget.Name).
+ SubResource("status").
+ Body(podDisruptionBudget).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the podDisruptionBudget and deletes it. Returns an error if one occurs.
+func (c *podDisruptionBudgets) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("poddisruptionbudgets").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *podDisruptionBudgets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("poddisruptionbudgets").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the podDisruptionBudget, and returns the corresponding podDisruptionBudget object, and an error if there is any.
+func (c *podDisruptionBudgets) Get(name string, options v1.GetOptions) (result *v1beta1.PodDisruptionBudget, err error) {
+ result = &v1beta1.PodDisruptionBudget{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("poddisruptionbudgets").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of PodDisruptionBudgets that match those selectors.
+func (c *podDisruptionBudgets) List(opts v1.ListOptions) (result *v1beta1.PodDisruptionBudgetList, err error) {
+ result = &v1beta1.PodDisruptionBudgetList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("poddisruptionbudgets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested podDisruptionBudgets.
+func (c *podDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("poddisruptionbudgets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched podDisruptionBudget.
+func (c *podDisruptionBudgets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) {
+ result = &v1beta1.PodDisruptionBudget{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("poddisruptionbudgets").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/policy_client.go b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/policy_client.go
new file mode 100644
index 000000000..9d62aad04
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/policy_client.go
@@ -0,0 +1,93 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ "k8s.io/client-go/kubernetes/scheme"
+ v1beta1 "k8s.io/client-go/pkg/apis/policy/v1beta1"
+ rest "k8s.io/client-go/rest"
+)
+
+type PolicyV1beta1Interface interface {
+ RESTClient() rest.Interface
+ EvictionsGetter
+ PodDisruptionBudgetsGetter
+}
+
+// PolicyV1beta1Client is used to interact with features provided by the policy group.
+type PolicyV1beta1Client struct {
+ restClient rest.Interface
+}
+
+func (c *PolicyV1beta1Client) Evictions(namespace string) EvictionInterface {
+ return newEvictions(c, namespace)
+}
+
+func (c *PolicyV1beta1Client) PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface {
+ return newPodDisruptionBudgets(c, namespace)
+}
+
+// NewForConfig creates a new PolicyV1beta1Client for the given config.
+func NewForConfig(c *rest.Config) (*PolicyV1beta1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &PolicyV1beta1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new PolicyV1beta1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *PolicyV1beta1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new PolicyV1beta1Client for the given RESTClient.
+func New(c rest.Interface) *PolicyV1beta1Client {
+ return &PolicyV1beta1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1beta1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *PolicyV1beta1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go
new file mode 100644
index 000000000..241061025
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go
@@ -0,0 +1,145 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1"
+ rest "k8s.io/client-go/rest"
+)
+
+// ClusterRolesGetter has a method to return a ClusterRoleInterface.
+// A group's client should implement this interface.
+type ClusterRolesGetter interface {
+ ClusterRoles() ClusterRoleInterface
+}
+
+// ClusterRoleInterface has methods to work with ClusterRole resources.
+type ClusterRoleInterface interface {
+ Create(*v1alpha1.ClusterRole) (*v1alpha1.ClusterRole, error)
+ Update(*v1alpha1.ClusterRole) (*v1alpha1.ClusterRole, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1alpha1.ClusterRole, error)
+ List(opts v1.ListOptions) (*v1alpha1.ClusterRoleList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error)
+ ClusterRoleExpansion
+}
+
+// clusterRoles implements ClusterRoleInterface
+type clusterRoles struct {
+ client rest.Interface
+}
+
+// newClusterRoles returns a ClusterRoles
+func newClusterRoles(c *RbacV1alpha1Client) *clusterRoles {
+ return &clusterRoles{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any.
+func (c *clusterRoles) Create(clusterRole *v1alpha1.ClusterRole) (result *v1alpha1.ClusterRole, err error) {
+ result = &v1alpha1.ClusterRole{}
+ err = c.client.Post().
+ Resource("clusterroles").
+ Body(clusterRole).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a clusterRole and updates it. Returns the server's representation of the clusterRole, and an error, if there is any.
+func (c *clusterRoles) Update(clusterRole *v1alpha1.ClusterRole) (result *v1alpha1.ClusterRole, err error) {
+ result = &v1alpha1.ClusterRole{}
+ err = c.client.Put().
+ Resource("clusterroles").
+ Name(clusterRole.Name).
+ Body(clusterRole).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the clusterRole and deletes it. Returns an error if one occurs.
+func (c *clusterRoles) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("clusterroles").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *clusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("clusterroles").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the clusterRole, and returns the corresponding clusterRole object, and an error if there is any.
+func (c *clusterRoles) Get(name string, options v1.GetOptions) (result *v1alpha1.ClusterRole, err error) {
+ result = &v1alpha1.ClusterRole{}
+ err = c.client.Get().
+ Resource("clusterroles").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of ClusterRoles that match those selectors.
+func (c *clusterRoles) List(opts v1.ListOptions) (result *v1alpha1.ClusterRoleList, err error) {
+ result = &v1alpha1.ClusterRoleList{}
+ err = c.client.Get().
+ Resource("clusterroles").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested clusterRoles.
+func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("clusterroles").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched clusterRole.
+func (c *clusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error) {
+ result = &v1alpha1.ClusterRole{}
+ err = c.client.Patch(pt).
+ Resource("clusterroles").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go
new file mode 100644
index 000000000..bc48873a5
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go
@@ -0,0 +1,145 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1"
+ rest "k8s.io/client-go/rest"
+)
+
+// ClusterRoleBindingsGetter has a method to return a ClusterRoleBindingInterface.
+// A group's client should implement this interface.
+type ClusterRoleBindingsGetter interface {
+ ClusterRoleBindings() ClusterRoleBindingInterface
+}
+
+// ClusterRoleBindingInterface has methods to work with ClusterRoleBinding resources.
+type ClusterRoleBindingInterface interface {
+ Create(*v1alpha1.ClusterRoleBinding) (*v1alpha1.ClusterRoleBinding, error)
+ Update(*v1alpha1.ClusterRoleBinding) (*v1alpha1.ClusterRoleBinding, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1alpha1.ClusterRoleBinding, error)
+ List(opts v1.ListOptions) (*v1alpha1.ClusterRoleBindingList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error)
+ ClusterRoleBindingExpansion
+}
+
+// clusterRoleBindings implements ClusterRoleBindingInterface
+type clusterRoleBindings struct {
+ client rest.Interface
+}
+
+// newClusterRoleBindings returns a ClusterRoleBindings
+func newClusterRoleBindings(c *RbacV1alpha1Client) *clusterRoleBindings {
+ return &clusterRoleBindings{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any.
+func (c *clusterRoleBindings) Create(clusterRoleBinding *v1alpha1.ClusterRoleBinding) (result *v1alpha1.ClusterRoleBinding, err error) {
+ result = &v1alpha1.ClusterRoleBinding{}
+ err = c.client.Post().
+ Resource("clusterrolebindings").
+ Body(clusterRoleBinding).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a clusterRoleBinding and updates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any.
+func (c *clusterRoleBindings) Update(clusterRoleBinding *v1alpha1.ClusterRoleBinding) (result *v1alpha1.ClusterRoleBinding, err error) {
+ result = &v1alpha1.ClusterRoleBinding{}
+ err = c.client.Put().
+ Resource("clusterrolebindings").
+ Name(clusterRoleBinding.Name).
+ Body(clusterRoleBinding).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs.
+func (c *clusterRoleBindings) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("clusterrolebindings").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *clusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("clusterrolebindings").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the clusterRoleBinding, and returns the corresponding clusterRoleBinding object, and an error if there is any.
+func (c *clusterRoleBindings) Get(name string, options v1.GetOptions) (result *v1alpha1.ClusterRoleBinding, err error) {
+ result = &v1alpha1.ClusterRoleBinding{}
+ err = c.client.Get().
+ Resource("clusterrolebindings").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors.
+func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *v1alpha1.ClusterRoleBindingList, err error) {
+ result = &v1alpha1.ClusterRoleBindingList{}
+ err = c.client.Get().
+ Resource("clusterrolebindings").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested clusterRoleBindings.
+func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("clusterrolebindings").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched clusterRoleBinding.
+func (c *clusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) {
+ result = &v1alpha1.ClusterRoleBinding{}
+ err = c.client.Patch(pt).
+ Resource("clusterrolebindings").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/doc.go
new file mode 100644
index 000000000..ba8d10d3b
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1alpha1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/generated_expansion.go
new file mode 100644
index 000000000..f506fc346
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/generated_expansion.go
@@ -0,0 +1,25 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+type ClusterRoleExpansion interface{}
+
+type ClusterRoleBindingExpansion interface{}
+
+type RoleExpansion interface{}
+
+type RoleBindingExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rbac_client.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rbac_client.go
new file mode 100644
index 000000000..67256d50f
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rbac_client.go
@@ -0,0 +1,103 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ "k8s.io/client-go/kubernetes/scheme"
+ v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1"
+ rest "k8s.io/client-go/rest"
+)
+
+type RbacV1alpha1Interface interface {
+ RESTClient() rest.Interface
+ ClusterRolesGetter
+ ClusterRoleBindingsGetter
+ RolesGetter
+ RoleBindingsGetter
+}
+
+// RbacV1alpha1Client is used to interact with features provided by the rbac.authorization.k8s.io group.
+type RbacV1alpha1Client struct {
+ restClient rest.Interface
+}
+
+func (c *RbacV1alpha1Client) ClusterRoles() ClusterRoleInterface {
+ return newClusterRoles(c)
+}
+
+func (c *RbacV1alpha1Client) ClusterRoleBindings() ClusterRoleBindingInterface {
+ return newClusterRoleBindings(c)
+}
+
+func (c *RbacV1alpha1Client) Roles(namespace string) RoleInterface {
+ return newRoles(c, namespace)
+}
+
+func (c *RbacV1alpha1Client) RoleBindings(namespace string) RoleBindingInterface {
+ return newRoleBindings(c, namespace)
+}
+
+// NewForConfig creates a new RbacV1alpha1Client for the given config.
+func NewForConfig(c *rest.Config) (*RbacV1alpha1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &RbacV1alpha1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new RbacV1alpha1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *RbacV1alpha1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new RbacV1alpha1Client for the given RESTClient.
+func New(c rest.Interface) *RbacV1alpha1Client {
+ return &RbacV1alpha1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1alpha1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *RbacV1alpha1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go
new file mode 100644
index 000000000..9c4fa915e
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1"
+ rest "k8s.io/client-go/rest"
+)
+
+// RolesGetter has a method to return a RoleInterface.
+// A group's client should implement this interface.
+type RolesGetter interface {
+ Roles(namespace string) RoleInterface
+}
+
+// RoleInterface has methods to work with Role resources.
+type RoleInterface interface {
+ Create(*v1alpha1.Role) (*v1alpha1.Role, error)
+ Update(*v1alpha1.Role) (*v1alpha1.Role, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1alpha1.Role, error)
+ List(opts v1.ListOptions) (*v1alpha1.RoleList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error)
+ RoleExpansion
+}
+
+// roles implements RoleInterface
+type roles struct {
+ client rest.Interface
+ ns string
+}
+
+// newRoles returns a Roles
+func newRoles(c *RbacV1alpha1Client, namespace string) *roles {
+ return &roles{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any.
+func (c *roles) Create(role *v1alpha1.Role) (result *v1alpha1.Role, err error) {
+ result = &v1alpha1.Role{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("roles").
+ Body(role).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a role and updates it. Returns the server's representation of the role, and an error, if there is any.
+func (c *roles) Update(role *v1alpha1.Role) (result *v1alpha1.Role, err error) {
+ result = &v1alpha1.Role{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("roles").
+ Name(role.Name).
+ Body(role).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the role and deletes it. Returns an error if one occurs.
+func (c *roles) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("roles").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *roles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("roles").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the role, and returns the corresponding role object, and an error if there is any.
+func (c *roles) Get(name string, options v1.GetOptions) (result *v1alpha1.Role, err error) {
+ result = &v1alpha1.Role{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("roles").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Roles that match those selectors.
+func (c *roles) List(opts v1.ListOptions) (result *v1alpha1.RoleList, err error) {
+ result = &v1alpha1.RoleList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("roles").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested roles.
+func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("roles").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched role.
+func (c *roles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error) {
+ result = &v1alpha1.Role{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("roles").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go
new file mode 100644
index 000000000..5e81967f1
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1"
+ rest "k8s.io/client-go/rest"
+)
+
+// RoleBindingsGetter has a method to return a RoleBindingInterface.
+// A group's client should implement this interface.
+type RoleBindingsGetter interface {
+ RoleBindings(namespace string) RoleBindingInterface
+}
+
+// RoleBindingInterface has methods to work with RoleBinding resources.
+type RoleBindingInterface interface {
+ Create(*v1alpha1.RoleBinding) (*v1alpha1.RoleBinding, error)
+ Update(*v1alpha1.RoleBinding) (*v1alpha1.RoleBinding, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1alpha1.RoleBinding, error)
+ List(opts v1.ListOptions) (*v1alpha1.RoleBindingList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error)
+ RoleBindingExpansion
+}
+
+// roleBindings implements RoleBindingInterface
+type roleBindings struct {
+ client rest.Interface
+ ns string
+}
+
+// newRoleBindings returns a RoleBindings
+func newRoleBindings(c *RbacV1alpha1Client, namespace string) *roleBindings {
+ return &roleBindings{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any.
+func (c *roleBindings) Create(roleBinding *v1alpha1.RoleBinding) (result *v1alpha1.RoleBinding, err error) {
+ result = &v1alpha1.RoleBinding{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("rolebindings").
+ Body(roleBinding).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a roleBinding and updates it. Returns the server's representation of the roleBinding, and an error, if there is any.
+func (c *roleBindings) Update(roleBinding *v1alpha1.RoleBinding) (result *v1alpha1.RoleBinding, err error) {
+ result = &v1alpha1.RoleBinding{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("rolebindings").
+ Name(roleBinding.Name).
+ Body(roleBinding).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the roleBinding and deletes it. Returns an error if one occurs.
+func (c *roleBindings) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("rolebindings").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *roleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("rolebindings").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the roleBinding, and returns the corresponding roleBinding object, and an error if there is any.
+func (c *roleBindings) Get(name string, options v1.GetOptions) (result *v1alpha1.RoleBinding, err error) {
+ result = &v1alpha1.RoleBinding{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("rolebindings").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of RoleBindings that match those selectors.
+func (c *roleBindings) List(opts v1.ListOptions) (result *v1alpha1.RoleBindingList, err error) {
+ result = &v1alpha1.RoleBindingList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("rolebindings").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested roleBindings.
+func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("rolebindings").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched roleBinding.
+func (c *roleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error) {
+ result = &v1alpha1.RoleBinding{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("rolebindings").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go
new file mode 100644
index 000000000..6a63571f3
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go
@@ -0,0 +1,145 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1"
+ rest "k8s.io/client-go/rest"
+)
+
+// ClusterRolesGetter has a method to return a ClusterRoleInterface.
+// A group's client should implement this interface.
+type ClusterRolesGetter interface {
+ ClusterRoles() ClusterRoleInterface
+}
+
+// ClusterRoleInterface has methods to work with ClusterRole resources.
+type ClusterRoleInterface interface {
+ Create(*v1beta1.ClusterRole) (*v1beta1.ClusterRole, error)
+ Update(*v1beta1.ClusterRole) (*v1beta1.ClusterRole, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.ClusterRole, error)
+ List(opts v1.ListOptions) (*v1beta1.ClusterRoleList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRole, err error)
+ ClusterRoleExpansion
+}
+
+// clusterRoles implements ClusterRoleInterface
+type clusterRoles struct {
+ client rest.Interface
+}
+
+// newClusterRoles returns a ClusterRoles
+func newClusterRoles(c *RbacV1beta1Client) *clusterRoles {
+ return &clusterRoles{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any.
+func (c *clusterRoles) Create(clusterRole *v1beta1.ClusterRole) (result *v1beta1.ClusterRole, err error) {
+ result = &v1beta1.ClusterRole{}
+ err = c.client.Post().
+ Resource("clusterroles").
+ Body(clusterRole).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a clusterRole and updates it. Returns the server's representation of the clusterRole, and an error, if there is any.
+func (c *clusterRoles) Update(clusterRole *v1beta1.ClusterRole) (result *v1beta1.ClusterRole, err error) {
+ result = &v1beta1.ClusterRole{}
+ err = c.client.Put().
+ Resource("clusterroles").
+ Name(clusterRole.Name).
+ Body(clusterRole).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the clusterRole and deletes it. Returns an error if one occurs.
+func (c *clusterRoles) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("clusterroles").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *clusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("clusterroles").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the clusterRole, and returns the corresponding clusterRole object, and an error if there is any.
+func (c *clusterRoles) Get(name string, options v1.GetOptions) (result *v1beta1.ClusterRole, err error) {
+ result = &v1beta1.ClusterRole{}
+ err = c.client.Get().
+ Resource("clusterroles").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of ClusterRoles that match those selectors.
+func (c *clusterRoles) List(opts v1.ListOptions) (result *v1beta1.ClusterRoleList, err error) {
+ result = &v1beta1.ClusterRoleList{}
+ err = c.client.Get().
+ Resource("clusterroles").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested clusterRoles.
+func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("clusterroles").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched clusterRole.
+func (c *clusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRole, err error) {
+ result = &v1beta1.ClusterRole{}
+ err = c.client.Patch(pt).
+ Resource("clusterroles").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go
new file mode 100644
index 000000000..a2f387509
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go
@@ -0,0 +1,145 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1"
+ rest "k8s.io/client-go/rest"
+)
+
+// ClusterRoleBindingsGetter has a method to return a ClusterRoleBindingInterface.
+// A group's client should implement this interface.
+type ClusterRoleBindingsGetter interface {
+ ClusterRoleBindings() ClusterRoleBindingInterface
+}
+
+// ClusterRoleBindingInterface has methods to work with ClusterRoleBinding resources.
+type ClusterRoleBindingInterface interface {
+ Create(*v1beta1.ClusterRoleBinding) (*v1beta1.ClusterRoleBinding, error)
+ Update(*v1beta1.ClusterRoleBinding) (*v1beta1.ClusterRoleBinding, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.ClusterRoleBinding, error)
+ List(opts v1.ListOptions) (*v1beta1.ClusterRoleBindingList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRoleBinding, err error)
+ ClusterRoleBindingExpansion
+}
+
+// clusterRoleBindings implements ClusterRoleBindingInterface
+type clusterRoleBindings struct {
+ client rest.Interface
+}
+
+// newClusterRoleBindings returns a ClusterRoleBindings
+func newClusterRoleBindings(c *RbacV1beta1Client) *clusterRoleBindings {
+ return &clusterRoleBindings{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any.
+func (c *clusterRoleBindings) Create(clusterRoleBinding *v1beta1.ClusterRoleBinding) (result *v1beta1.ClusterRoleBinding, err error) {
+ result = &v1beta1.ClusterRoleBinding{}
+ err = c.client.Post().
+ Resource("clusterrolebindings").
+ Body(clusterRoleBinding).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a clusterRoleBinding and updates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any.
+func (c *clusterRoleBindings) Update(clusterRoleBinding *v1beta1.ClusterRoleBinding) (result *v1beta1.ClusterRoleBinding, err error) {
+ result = &v1beta1.ClusterRoleBinding{}
+ err = c.client.Put().
+ Resource("clusterrolebindings").
+ Name(clusterRoleBinding.Name).
+ Body(clusterRoleBinding).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs.
+func (c *clusterRoleBindings) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("clusterrolebindings").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *clusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("clusterrolebindings").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the clusterRoleBinding, and returns the corresponding clusterRoleBinding object, and an error if there is any.
+func (c *clusterRoleBindings) Get(name string, options v1.GetOptions) (result *v1beta1.ClusterRoleBinding, err error) {
+ result = &v1beta1.ClusterRoleBinding{}
+ err = c.client.Get().
+ Resource("clusterrolebindings").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors.
+func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *v1beta1.ClusterRoleBindingList, err error) {
+ result = &v1beta1.ClusterRoleBindingList{}
+ err = c.client.Get().
+ Resource("clusterrolebindings").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested clusterRoleBindings.
+func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("clusterrolebindings").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched clusterRoleBinding.
+func (c *clusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRoleBinding, err error) {
+ result = &v1beta1.ClusterRoleBinding{}
+ err = c.client.Patch(pt).
+ Resource("clusterrolebindings").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/doc.go
new file mode 100644
index 000000000..11b523897
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1beta1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/generated_expansion.go
new file mode 100644
index 000000000..d7f80c004
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/generated_expansion.go
@@ -0,0 +1,25 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+type ClusterRoleExpansion interface{}
+
+type ClusterRoleBindingExpansion interface{}
+
+type RoleExpansion interface{}
+
+type RoleBindingExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rbac_client.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rbac_client.go
new file mode 100644
index 000000000..a24ef4f9a
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rbac_client.go
@@ -0,0 +1,103 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ "k8s.io/client-go/kubernetes/scheme"
+ v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1"
+ rest "k8s.io/client-go/rest"
+)
+
+type RbacV1beta1Interface interface {
+ RESTClient() rest.Interface
+ ClusterRolesGetter
+ ClusterRoleBindingsGetter
+ RolesGetter
+ RoleBindingsGetter
+}
+
+// RbacV1beta1Client is used to interact with features provided by the rbac.authorization.k8s.io group.
+type RbacV1beta1Client struct {
+ restClient rest.Interface
+}
+
+func (c *RbacV1beta1Client) ClusterRoles() ClusterRoleInterface {
+ return newClusterRoles(c)
+}
+
+func (c *RbacV1beta1Client) ClusterRoleBindings() ClusterRoleBindingInterface {
+ return newClusterRoleBindings(c)
+}
+
+func (c *RbacV1beta1Client) Roles(namespace string) RoleInterface {
+ return newRoles(c, namespace)
+}
+
+func (c *RbacV1beta1Client) RoleBindings(namespace string) RoleBindingInterface {
+ return newRoleBindings(c, namespace)
+}
+
+// NewForConfig creates a new RbacV1beta1Client for the given config.
+func NewForConfig(c *rest.Config) (*RbacV1beta1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &RbacV1beta1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new RbacV1beta1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *RbacV1beta1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new RbacV1beta1Client for the given RESTClient.
+func New(c rest.Interface) *RbacV1beta1Client {
+ return &RbacV1beta1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1beta1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *RbacV1beta1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go
new file mode 100644
index 000000000..aa57ac319
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1"
+ rest "k8s.io/client-go/rest"
+)
+
+// RolesGetter has a method to return a RoleInterface.
+// A group's client should implement this interface.
+type RolesGetter interface {
+ Roles(namespace string) RoleInterface
+}
+
+// RoleInterface has methods to work with Role resources.
+type RoleInterface interface {
+ Create(*v1beta1.Role) (*v1beta1.Role, error)
+ Update(*v1beta1.Role) (*v1beta1.Role, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.Role, error)
+ List(opts v1.ListOptions) (*v1beta1.RoleList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Role, err error)
+ RoleExpansion
+}
+
+// roles implements RoleInterface
+type roles struct {
+ client rest.Interface
+ ns string
+}
+
+// newRoles returns a Roles
+func newRoles(c *RbacV1beta1Client, namespace string) *roles {
+ return &roles{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any.
+func (c *roles) Create(role *v1beta1.Role) (result *v1beta1.Role, err error) {
+ result = &v1beta1.Role{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("roles").
+ Body(role).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a role and updates it. Returns the server's representation of the role, and an error, if there is any.
+func (c *roles) Update(role *v1beta1.Role) (result *v1beta1.Role, err error) {
+ result = &v1beta1.Role{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("roles").
+ Name(role.Name).
+ Body(role).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the role and deletes it. Returns an error if one occurs.
+func (c *roles) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("roles").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *roles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("roles").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the role, and returns the corresponding role object, and an error if there is any.
+func (c *roles) Get(name string, options v1.GetOptions) (result *v1beta1.Role, err error) {
+ result = &v1beta1.Role{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("roles").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Roles that match those selectors.
+func (c *roles) List(opts v1.ListOptions) (result *v1beta1.RoleList, err error) {
+ result = &v1beta1.RoleList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("roles").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested roles.
+func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("roles").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched role.
+func (c *roles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Role, err error) {
+ result = &v1beta1.Role{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("roles").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go
new file mode 100644
index 000000000..3dee9107e
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1"
+ rest "k8s.io/client-go/rest"
+)
+
+// RoleBindingsGetter has a method to return a RoleBindingInterface.
+// A group's client should implement this interface.
+type RoleBindingsGetter interface {
+ RoleBindings(namespace string) RoleBindingInterface
+}
+
+// RoleBindingInterface has methods to work with RoleBinding resources.
+type RoleBindingInterface interface {
+ Create(*v1beta1.RoleBinding) (*v1beta1.RoleBinding, error)
+ Update(*v1beta1.RoleBinding) (*v1beta1.RoleBinding, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.RoleBinding, error)
+ List(opts v1.ListOptions) (*v1beta1.RoleBindingList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RoleBinding, err error)
+ RoleBindingExpansion
+}
+
+// roleBindings implements RoleBindingInterface
+type roleBindings struct {
+ client rest.Interface
+ ns string
+}
+
+// newRoleBindings returns a RoleBindings
+func newRoleBindings(c *RbacV1beta1Client, namespace string) *roleBindings {
+ return &roleBindings{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any.
+func (c *roleBindings) Create(roleBinding *v1beta1.RoleBinding) (result *v1beta1.RoleBinding, err error) {
+ result = &v1beta1.RoleBinding{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("rolebindings").
+ Body(roleBinding).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a roleBinding and updates it. Returns the server's representation of the roleBinding, and an error, if there is any.
+func (c *roleBindings) Update(roleBinding *v1beta1.RoleBinding) (result *v1beta1.RoleBinding, err error) {
+ result = &v1beta1.RoleBinding{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("rolebindings").
+ Name(roleBinding.Name).
+ Body(roleBinding).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the roleBinding and deletes it. Returns an error if one occurs.
+func (c *roleBindings) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("rolebindings").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *roleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("rolebindings").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the roleBinding, and returns the corresponding roleBinding object, and an error if there is any.
+func (c *roleBindings) Get(name string, options v1.GetOptions) (result *v1beta1.RoleBinding, err error) {
+ result = &v1beta1.RoleBinding{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("rolebindings").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of RoleBindings that match those selectors.
+func (c *roleBindings) List(opts v1.ListOptions) (result *v1beta1.RoleBindingList, err error) {
+ result = &v1beta1.RoleBindingList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("rolebindings").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested roleBindings.
+func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("rolebindings").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched roleBinding.
+func (c *roleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RoleBinding, err error) {
+ result = &v1beta1.RoleBinding{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("rolebindings").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/doc.go
new file mode 100644
index 000000000..ba8d10d3b
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1alpha1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/generated_expansion.go
new file mode 100644
index 000000000..d599b2935
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/generated_expansion.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+type PodPresetExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/podpreset.go b/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/podpreset.go
new file mode 100644
index 000000000..b8fc0a022
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/podpreset.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1alpha1 "k8s.io/client-go/pkg/apis/settings/v1alpha1"
+ rest "k8s.io/client-go/rest"
+)
+
+// PodPresetsGetter has a method to return a PodPresetInterface.
+// A group's client should implement this interface.
+type PodPresetsGetter interface {
+ PodPresets(namespace string) PodPresetInterface
+}
+
+// PodPresetInterface has methods to work with PodPreset resources.
+type PodPresetInterface interface {
+ Create(*v1alpha1.PodPreset) (*v1alpha1.PodPreset, error)
+ Update(*v1alpha1.PodPreset) (*v1alpha1.PodPreset, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1alpha1.PodPreset, error)
+ List(opts v1.ListOptions) (*v1alpha1.PodPresetList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodPreset, err error)
+ PodPresetExpansion
+}
+
+// podPresets implements PodPresetInterface
+type podPresets struct {
+ client rest.Interface
+ ns string
+}
+
+// newPodPresets returns a PodPresets
+func newPodPresets(c *SettingsV1alpha1Client, namespace string) *podPresets {
+ return &podPresets{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a podPreset and creates it. Returns the server's representation of the podPreset, and an error, if there is any.
+func (c *podPresets) Create(podPreset *v1alpha1.PodPreset) (result *v1alpha1.PodPreset, err error) {
+ result = &v1alpha1.PodPreset{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("podpresets").
+ Body(podPreset).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a podPreset and updates it. Returns the server's representation of the podPreset, and an error, if there is any.
+func (c *podPresets) Update(podPreset *v1alpha1.PodPreset) (result *v1alpha1.PodPreset, err error) {
+ result = &v1alpha1.PodPreset{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("podpresets").
+ Name(podPreset.Name).
+ Body(podPreset).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the podPreset and deletes it. Returns an error if one occurs.
+func (c *podPresets) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("podpresets").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *podPresets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("podpresets").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the podPreset, and returns the corresponding podPreset object, and an error if there is any.
+func (c *podPresets) Get(name string, options v1.GetOptions) (result *v1alpha1.PodPreset, err error) {
+ result = &v1alpha1.PodPreset{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("podpresets").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of PodPresets that match those selectors.
+func (c *podPresets) List(opts v1.ListOptions) (result *v1alpha1.PodPresetList, err error) {
+ result = &v1alpha1.PodPresetList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("podpresets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested podPresets.
+func (c *podPresets) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("podpresets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched podPreset.
+func (c *podPresets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodPreset, err error) {
+ result = &v1alpha1.PodPreset{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("podpresets").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/settings_client.go b/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/settings_client.go
new file mode 100644
index 000000000..1a90034bc
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/settings_client.go
@@ -0,0 +1,88 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ "k8s.io/client-go/kubernetes/scheme"
+ v1alpha1 "k8s.io/client-go/pkg/apis/settings/v1alpha1"
+ rest "k8s.io/client-go/rest"
+)
+
+type SettingsV1alpha1Interface interface {
+ RESTClient() rest.Interface
+ PodPresetsGetter
+}
+
+// SettingsV1alpha1Client is used to interact with features provided by the settings.k8s.io group.
+type SettingsV1alpha1Client struct {
+ restClient rest.Interface
+}
+
+func (c *SettingsV1alpha1Client) PodPresets(namespace string) PodPresetInterface {
+ return newPodPresets(c, namespace)
+}
+
+// NewForConfig creates a new SettingsV1alpha1Client for the given config.
+func NewForConfig(c *rest.Config) (*SettingsV1alpha1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &SettingsV1alpha1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new SettingsV1alpha1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *SettingsV1alpha1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new SettingsV1alpha1Client for the given RESTClient.
+func New(c rest.Interface) *SettingsV1alpha1Client {
+ return &SettingsV1alpha1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1alpha1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *SettingsV1alpha1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/doc.go
new file mode 100644
index 000000000..54673bfa7
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/generated_expansion.go
new file mode 100644
index 000000000..39df9fb87
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/generated_expansion.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+type StorageClassExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storage_client.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storage_client.go
new file mode 100644
index 000000000..a95d30b2d
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storage_client.go
@@ -0,0 +1,88 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ "k8s.io/client-go/kubernetes/scheme"
+ v1 "k8s.io/client-go/pkg/apis/storage/v1"
+ rest "k8s.io/client-go/rest"
+)
+
+type StorageV1Interface interface {
+ RESTClient() rest.Interface
+ StorageClassesGetter
+}
+
+// StorageV1Client is used to interact with features provided by the storage.k8s.io group.
+type StorageV1Client struct {
+ restClient rest.Interface
+}
+
+func (c *StorageV1Client) StorageClasses() StorageClassInterface {
+ return newStorageClasses(c)
+}
+
+// NewForConfig creates a new StorageV1Client for the given config.
+func NewForConfig(c *rest.Config) (*StorageV1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &StorageV1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new StorageV1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *StorageV1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new StorageV1Client for the given RESTClient.
+func New(c rest.Interface) *StorageV1Client {
+ return &StorageV1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *StorageV1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go
new file mode 100644
index 000000000..0283c9970
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go
@@ -0,0 +1,145 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1 "k8s.io/client-go/pkg/apis/storage/v1"
+ rest "k8s.io/client-go/rest"
+)
+
+// StorageClassesGetter has a method to return a StorageClassInterface.
+// A group's client should implement this interface.
+type StorageClassesGetter interface {
+ StorageClasses() StorageClassInterface
+}
+
+// StorageClassInterface has methods to work with StorageClass resources.
+type StorageClassInterface interface {
+ Create(*v1.StorageClass) (*v1.StorageClass, error)
+ Update(*v1.StorageClass) (*v1.StorageClass, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.StorageClass, error)
+ List(opts meta_v1.ListOptions) (*v1.StorageClassList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StorageClass, err error)
+ StorageClassExpansion
+}
+
+// storageClasses implements StorageClassInterface
+type storageClasses struct {
+ client rest.Interface
+}
+
+// newStorageClasses returns a StorageClasses
+func newStorageClasses(c *StorageV1Client) *storageClasses {
+ return &storageClasses{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a storageClass and creates it. Returns the server's representation of the storageClass, and an error, if there is any.
+func (c *storageClasses) Create(storageClass *v1.StorageClass) (result *v1.StorageClass, err error) {
+ result = &v1.StorageClass{}
+ err = c.client.Post().
+ Resource("storageclasses").
+ Body(storageClass).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a storageClass and updates it. Returns the server's representation of the storageClass, and an error, if there is any.
+func (c *storageClasses) Update(storageClass *v1.StorageClass) (result *v1.StorageClass, err error) {
+ result = &v1.StorageClass{}
+ err = c.client.Put().
+ Resource("storageclasses").
+ Name(storageClass.Name).
+ Body(storageClass).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the storageClass and deletes it. Returns an error if one occurs.
+func (c *storageClasses) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("storageclasses").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *storageClasses) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("storageclasses").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the storageClass, and returns the corresponding storageClass object, and an error if there is any.
+func (c *storageClasses) Get(name string, options meta_v1.GetOptions) (result *v1.StorageClass, err error) {
+ result = &v1.StorageClass{}
+ err = c.client.Get().
+ Resource("storageclasses").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of StorageClasses that match those selectors.
+func (c *storageClasses) List(opts meta_v1.ListOptions) (result *v1.StorageClassList, err error) {
+ result = &v1.StorageClassList{}
+ err = c.client.Get().
+ Resource("storageclasses").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested storageClasses.
+func (c *storageClasses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("storageclasses").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched storageClass.
+func (c *storageClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StorageClass, err error) {
+ result = &v1.StorageClass{}
+ err = c.client.Patch(pt).
+ Resource("storageclasses").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/doc.go
new file mode 100644
index 000000000..11b523897
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1beta1
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/generated_expansion.go
new file mode 100644
index 000000000..6f3f0c55e
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/generated_expansion.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+type StorageClassExpansion interface{}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storage_client.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storage_client.go
new file mode 100644
index 000000000..7abb99e57
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storage_client.go
@@ -0,0 +1,88 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ "k8s.io/client-go/kubernetes/scheme"
+ v1beta1 "k8s.io/client-go/pkg/apis/storage/v1beta1"
+ rest "k8s.io/client-go/rest"
+)
+
+type StorageV1beta1Interface interface {
+ RESTClient() rest.Interface
+ StorageClassesGetter
+}
+
+// StorageV1beta1Client is used to interact with features provided by the storage.k8s.io group.
+type StorageV1beta1Client struct {
+ restClient rest.Interface
+}
+
+func (c *StorageV1beta1Client) StorageClasses() StorageClassInterface {
+ return newStorageClasses(c)
+}
+
+// NewForConfig creates a new StorageV1beta1Client for the given config.
+func NewForConfig(c *rest.Config) (*StorageV1beta1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &StorageV1beta1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new StorageV1beta1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *StorageV1beta1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new StorageV1beta1Client for the given RESTClient.
+func New(c rest.Interface) *StorageV1beta1Client {
+ return &StorageV1beta1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1beta1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *StorageV1beta1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go
new file mode 100644
index 000000000..6980fc78b
--- /dev/null
+++ b/vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go
@@ -0,0 +1,145 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1beta1 "k8s.io/client-go/pkg/apis/storage/v1beta1"
+ rest "k8s.io/client-go/rest"
+)
+
+// StorageClassesGetter has a method to return a StorageClassInterface.
+// A group's client should implement this interface.
+type StorageClassesGetter interface {
+ StorageClasses() StorageClassInterface
+}
+
+// StorageClassInterface has methods to work with StorageClass resources.
+type StorageClassInterface interface {
+ Create(*v1beta1.StorageClass) (*v1beta1.StorageClass, error)
+ Update(*v1beta1.StorageClass) (*v1beta1.StorageClass, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.StorageClass, error)
+ List(opts v1.ListOptions) (*v1beta1.StorageClassList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error)
+ StorageClassExpansion
+}
+
+// storageClasses implements StorageClassInterface
+type storageClasses struct {
+ client rest.Interface
+}
+
+// newStorageClasses returns a StorageClasses
+func newStorageClasses(c *StorageV1beta1Client) *storageClasses {
+ return &storageClasses{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a storageClass and creates it. Returns the server's representation of the storageClass, and an error, if there is any.
+func (c *storageClasses) Create(storageClass *v1beta1.StorageClass) (result *v1beta1.StorageClass, err error) {
+ result = &v1beta1.StorageClass{}
+ err = c.client.Post().
+ Resource("storageclasses").
+ Body(storageClass).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a storageClass and updates it. Returns the server's representation of the storageClass, and an error, if there is any.
+func (c *storageClasses) Update(storageClass *v1beta1.StorageClass) (result *v1beta1.StorageClass, err error) {
+ result = &v1beta1.StorageClass{}
+ err = c.client.Put().
+ Resource("storageclasses").
+ Name(storageClass.Name).
+ Body(storageClass).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the storageClass and deletes it. Returns an error if one occurs.
+func (c *storageClasses) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("storageclasses").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *storageClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("storageclasses").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the storageClass, and returns the corresponding storageClass object, and an error if there is any.
+func (c *storageClasses) Get(name string, options v1.GetOptions) (result *v1beta1.StorageClass, err error) {
+ result = &v1beta1.StorageClass{}
+ err = c.client.Get().
+ Resource("storageclasses").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of StorageClasses that match those selectors.
+func (c *storageClasses) List(opts v1.ListOptions) (result *v1beta1.StorageClassList, err error) {
+ result = &v1beta1.StorageClassList{}
+ err = c.client.Get().
+ Resource("storageclasses").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested storageClasses.
+func (c *storageClasses) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("storageclasses").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched storageClass.
+func (c *storageClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) {
+ result = &v1beta1.StorageClass{}
+ err = c.client.Patch(pt).
+ Resource("storageclasses").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/client-go/pkg/api/annotation_key_constants.go b/vendor/k8s.io/client-go/pkg/api/annotation_key_constants.go
new file mode 100644
index 000000000..e1080a34a
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/annotation_key_constants.go
@@ -0,0 +1,113 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file should be consistent with pkg/api/v1/annotation_key_constants.go.
+
+package api
+
+const (
+ // ImagePolicyFailedOpenKey is added to pods created by failing open when the image policy
+ // webhook backend fails.
+ ImagePolicyFailedOpenKey string = "alpha.image-policy.k8s.io/failed-open"
+
+ // PodPresetOptOutAnnotationKey represents the annotation key for a pod to exempt itself from pod preset manipulation
+ PodPresetOptOutAnnotationKey string = "podpreset.admission.kubernetes.io/exclude"
+
+ // MirrorAnnotationKey represents the annotation key set by kubelets when creating mirror pods
+ MirrorPodAnnotationKey string = "kubernetes.io/config.mirror"
+
+ // TolerationsAnnotationKey represents the key of tolerations data (json serialized)
+ // in the Annotations of a Pod.
+ TolerationsAnnotationKey string = "scheduler.alpha.kubernetes.io/tolerations"
+
+ // TaintsAnnotationKey represents the key of taints data (json serialized)
+ // in the Annotations of a Node.
+ TaintsAnnotationKey string = "scheduler.alpha.kubernetes.io/taints"
+
+ // SeccompPodAnnotationKey represents the key of a seccomp profile applied
+ // to all containers of a pod.
+ SeccompPodAnnotationKey string = "seccomp.security.alpha.kubernetes.io/pod"
+
+ // SeccompContainerAnnotationKeyPrefix represents the key of a seccomp profile applied
+ // to one container of a pod.
+ SeccompContainerAnnotationKeyPrefix string = "container.seccomp.security.alpha.kubernetes.io/"
+
+ // CreatedByAnnotation represents the key used to store the spec(json)
+ // used to create the resource.
+ CreatedByAnnotation = "kubernetes.io/created-by"
+
+ // PreferAvoidPodsAnnotationKey represents the key of preferAvoidPods data (json serialized)
+ // in the Annotations of a Node.
+ PreferAvoidPodsAnnotationKey string = "scheduler.alpha.kubernetes.io/preferAvoidPods"
+
+ // SysctlsPodAnnotationKey represents the key of sysctls which are set for the infrastructure
+ // container of a pod. The annotation value is a comma separated list of sysctl_name=value
+ // key-value pairs. Only a limited set of whitelisted and isolated sysctls is supported by
+ // the kubelet. Pods with other sysctls will fail to launch.
+ SysctlsPodAnnotationKey string = "security.alpha.kubernetes.io/sysctls"
+
+ // UnsafeSysctlsPodAnnotationKey represents the key of sysctls which are set for the infrastructure
+ // container of a pod. The annotation value is a comma separated list of sysctl_name=value
+ // key-value pairs. Unsafe sysctls must be explicitly enabled for a kubelet. They are properly
+ // namespaced to a pod or a container, but their isolation is usually unclear or weak. Their use
+ // is at-your-own-risk. Pods that attempt to set an unsafe sysctl that is not enabled for a kubelet
+ // will fail to launch.
+ UnsafeSysctlsPodAnnotationKey string = "security.alpha.kubernetes.io/unsafe-sysctls"
+
+ // ObjectTTLAnnotations represents a suggestion for kubelet for how long it can cache
+ // an object (e.g. secret, config map) before fetching it again from apiserver.
+ // This annotation can be attached to node.
+ ObjectTTLAnnotationKey string = "node.alpha.kubernetes.io/ttl"
+
+ // AffinityAnnotationKey represents the key of affinity data (json serialized)
+ // in the Annotations of a Pod.
+ // TODO: remove when alpha support for affinity is removed
+ AffinityAnnotationKey string = "scheduler.alpha.kubernetes.io/affinity"
+
+ // annotation key prefix used to identify non-convertible json paths.
+ NonConvertibleAnnotationPrefix = "non-convertible.kubernetes.io"
+
+ kubectlPrefix = "kubectl.kubernetes.io/"
+
+ // LastAppliedConfigAnnotation is the annotation used to store the previous
+ // configuration of a resource for use in a three way diff by UpdateApplyAnnotation.
+ LastAppliedConfigAnnotation = kubectlPrefix + "last-applied-configuration"
+
+ // AnnotationLoadBalancerSourceRangesKey is the key of the annotation on a service to set allowed ingress ranges on their LoadBalancers
+ //
+ // It should be a comma-separated list of CIDRs, e.g. `0.0.0.0/0` to
+ // allow full access (the default) or `18.0.0.0/8,56.0.0.0/8` to allow
+ // access only from the CIDRs currently allocated to MIT & the USPS.
+ //
+ // Not all cloud providers support this annotation, though AWS & GCE do.
+ AnnotationLoadBalancerSourceRangesKey = "service.beta.kubernetes.io/load-balancer-source-ranges"
+
+ // AnnotationValueExternalTrafficLocal Value of annotation to specify local endpoints behavior.
+ AnnotationValueExternalTrafficLocal = "OnlyLocal"
+ // AnnotationValueExternalTrafficGlobal Value of annotation to specify global (legacy) behavior.
+ AnnotationValueExternalTrafficGlobal = "Global"
+
+ // TODO: The beta annotations have been deprecated, remove them when we release k8s 1.8.
+
+ // BetaAnnotationHealthCheckNodePort Annotation specifying the healthcheck nodePort for the service.
+ // If not specified, annotation is created by the service api backend with the allocated nodePort.
+ // Will use user-specified nodePort value if specified by the client.
+ BetaAnnotationHealthCheckNodePort = "service.beta.kubernetes.io/healthcheck-nodeport"
+
+ // BetaAnnotationExternalTraffic An annotation that denotes if this Service desires to route
+ // external traffic to local endpoints only. This preserves Source IP and avoids a second hop.
+ BetaAnnotationExternalTraffic = "service.beta.kubernetes.io/external-traffic"
+)
diff --git a/vendor/k8s.io/client-go/pkg/api/doc.go b/vendor/k8s.io/client-go/pkg/api/doc.go
new file mode 100644
index 000000000..a4262ab36
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/doc.go
@@ -0,0 +1,22 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package api contains the latest (or "internal") version of the
+// Kubernetes API objects. This is the API objects as represented in memory.
+// The contract presented to clients is located in the versioned packages,
+// which are sub-directories. The first one is "v1". Those packages
+// describe how a particular version is serialized to storage/network.
+package api
diff --git a/vendor/k8s.io/client-go/pkg/api/field_constants.go b/vendor/k8s.io/client-go/pkg/api/field_constants.go
new file mode 100644
index 000000000..5ead0f13f
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/field_constants.go
@@ -0,0 +1,38 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package api
+
+// Field path constants that are specific to the internal API
+// representation.
+const (
+ NodeUnschedulableField = "spec.unschedulable"
+ ObjectNameField = "metadata.name"
+ PodHostField = "spec.nodeName"
+ PodStatusField = "status.phase"
+ SecretTypeField = "type"
+
+ EventReasonField = "reason"
+ EventSourceField = "source"
+ EventTypeField = "type"
+ EventInvolvedKindField = "involvedObject.kind"
+ EventInvolvedNamespaceField = "involvedObject.namespace"
+ EventInvolvedNameField = "involvedObject.name"
+ EventInvolvedUIDField = "involvedObject.uid"
+ EventInvolvedAPIVersionField = "involvedObject.apiVersion"
+ EventInvolvedResourceVersionField = "involvedObject.resourceVersion"
+ EventInvolvedFieldPathField = "involvedObject.fieldPath"
+)
diff --git a/vendor/k8s.io/client-go/pkg/api/json.go b/vendor/k8s.io/client-go/pkg/api/json.go
new file mode 100644
index 000000000..3a6e04c18
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/json.go
@@ -0,0 +1,28 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package api
+
+import "encoding/json"
+
+// This file implements json marshaling/unmarshaling interfaces on objects that are currently marshaled into annotations
+// to prevent anyone from marshaling these internal structs.
+
+var _ = json.Marshaler(&AvoidPods{})
+var _ = json.Unmarshaler(&AvoidPods{})
+
+func (AvoidPods) MarshalJSON() ([]byte, error) { panic("do not marshal internal struct") }
+func (*AvoidPods) UnmarshalJSON([]byte) error { panic("do not unmarshal to internal struct") }
diff --git a/vendor/k8s.io/client-go/pkg/api/objectreference.go b/vendor/k8s.io/client-go/pkg/api/objectreference.go
new file mode 100644
index 000000000..b36ecab27
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/objectreference.go
@@ -0,0 +1,34 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+//TODO: consider making these methods functions, because we don't want helper
+//functions in the k8s.io/api repo.
+
+package api
+
+import (
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+func (obj *ObjectReference) SetGroupVersionKind(gvk schema.GroupVersionKind) {
+ obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind()
+}
+
+func (obj *ObjectReference) GroupVersionKind() schema.GroupVersionKind {
+ return schema.FromAPIVersionAndKind(obj.APIVersion, obj.Kind)
+}
+
+func (obj *ObjectReference) GetObjectKind() schema.ObjectKind { return obj }
diff --git a/vendor/k8s.io/client-go/pkg/api/register.go b/vendor/k8s.io/client-go/pkg/api/register.go
new file mode 100644
index 000000000..5f261bdfb
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/register.go
@@ -0,0 +1,123 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package api
+
+import (
+ "os"
+
+ "k8s.io/apimachinery/pkg/apimachinery/announced"
+ "k8s.io/apimachinery/pkg/apimachinery/registered"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/runtime/serializer"
+)
+
+// GroupFactoryRegistry is the APIGroupFactoryRegistry (overlaps a bit with Registry, see comments in package for details)
+var GroupFactoryRegistry = make(announced.APIGroupFactoryRegistry)
+
+// Registry is an instance of an API registry. This is an interim step to start removing the idea of a global
+// API registry.
+var Registry = registered.NewOrDie(os.Getenv("KUBE_API_VERSIONS"))
+
+// Scheme is the default instance of runtime.Scheme to which types in the Kubernetes API are already registered.
+// NOTE: If you are copying this file to start a new api group, STOP! Copy the
+// extensions group instead. This Scheme is special and should appear ONLY in
+// the api group, unless you really know what you're doing.
+// TODO(lavalamp): make the above error impossible.
+var Scheme = runtime.NewScheme()
+
+// Codecs provides access to encoding and decoding for the scheme
+var Codecs = serializer.NewCodecFactory(Scheme)
+
+// GroupName is the group name use in this package
+const GroupName = ""
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// ParameterCodec handles versioning of objects that are converted to query parameters.
+var ParameterCodec = runtime.NewParameterCodec(Scheme)
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+func addKnownTypes(scheme *runtime.Scheme) error {
+ if err := scheme.AddIgnoredConversionType(&metav1.TypeMeta{}, &metav1.TypeMeta{}); err != nil {
+ return err
+ }
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Pod{},
+ &PodList{},
+ &PodStatusResult{},
+ &PodTemplate{},
+ &PodTemplateList{},
+ &ReplicationControllerList{},
+ &ReplicationController{},
+ &ServiceList{},
+ &Service{},
+ &ServiceProxyOptions{},
+ &NodeList{},
+ &Node{},
+ &NodeProxyOptions{},
+ &Endpoints{},
+ &EndpointsList{},
+ &Binding{},
+ &Event{},
+ &EventList{},
+ &List{},
+ &LimitRange{},
+ &LimitRangeList{},
+ &ResourceQuota{},
+ &ResourceQuotaList{},
+ &Namespace{},
+ &NamespaceList{},
+ &ServiceAccount{},
+ &ServiceAccountList{},
+ &Secret{},
+ &SecretList{},
+ &PersistentVolume{},
+ &PersistentVolumeList{},
+ &PersistentVolumeClaim{},
+ &PersistentVolumeClaimList{},
+ &PodAttachOptions{},
+ &PodLogOptions{},
+ &PodExecOptions{},
+ &PodPortForwardOptions{},
+ &PodProxyOptions{},
+ &ComponentStatus{},
+ &ComponentStatusList{},
+ &SerializedReference{},
+ &RangeAllocation{},
+ &ConfigMap{},
+ &ConfigMapList{},
+ )
+
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/api/resource.go b/vendor/k8s.io/client-go/pkg/api/resource.go
new file mode 100644
index 000000000..27b7fd665
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/resource.go
@@ -0,0 +1,62 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package api
+
+import (
+ "k8s.io/apimachinery/pkg/api/resource"
+)
+
+func (self ResourceName) String() string {
+ return string(self)
+}
+
+// Returns the CPU limit if specified.
+func (self *ResourceList) Cpu() *resource.Quantity {
+ if val, ok := (*self)[ResourceCPU]; ok {
+ return &val
+ }
+ return &resource.Quantity{Format: resource.DecimalSI}
+}
+
+// Returns the Memory limit if specified.
+func (self *ResourceList) Memory() *resource.Quantity {
+ if val, ok := (*self)[ResourceMemory]; ok {
+ return &val
+ }
+ return &resource.Quantity{Format: resource.BinarySI}
+}
+
+func (self *ResourceList) Pods() *resource.Quantity {
+ if val, ok := (*self)[ResourcePods]; ok {
+ return &val
+ }
+ return &resource.Quantity{}
+}
+
+func (self *ResourceList) NvidiaGPU() *resource.Quantity {
+ if val, ok := (*self)[ResourceNvidiaGPU]; ok {
+ return &val
+ }
+ return &resource.Quantity{}
+}
+
+func (self *ResourceList) StorageOverlay() *resource.Quantity {
+ if val, ok := (*self)[ResourceStorageOverlay]; ok {
+ return &val
+ }
+ return &resource.Quantity{}
+}
diff --git a/vendor/k8s.io/client-go/pkg/api/taint.go b/vendor/k8s.io/client-go/pkg/api/taint.go
new file mode 100644
index 000000000..173e4e601
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/taint.go
@@ -0,0 +1,36 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+//TODO: consider making these methods functions, because we don't want helper
+//functions in the k8s.io/api repo.
+
+package api
+
+import "fmt"
+
+// MatchTaint checks if the taint matches taintToMatch. Taints are unique by key:effect,
+// if the two taints have same key:effect, regard as they match.
+func (t *Taint) MatchTaint(taintToMatch Taint) bool {
+ return t.Key == taintToMatch.Key && t.Effect == taintToMatch.Effect
+}
+
+// taint.ToString() converts taint struct to string in format key=value:effect or key:effect.
+func (t *Taint) ToString() string {
+ if len(t.Value) == 0 {
+ return fmt.Sprintf("%v:%v", t.Key, t.Effect)
+ }
+ return fmt.Sprintf("%v=%v:%v", t.Key, t.Value, t.Effect)
+}
diff --git a/vendor/k8s.io/client-go/pkg/api/toleration.go b/vendor/k8s.io/client-go/pkg/api/toleration.go
new file mode 100644
index 000000000..edb73b74e
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/toleration.go
@@ -0,0 +1,30 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+//TODO: consider making these methods functions, because we don't want helper
+//functions in the k8s.io/api repo.
+
+package api
+
+// MatchToleration checks if the toleration matches tolerationToMatch. Tolerations are unique by <key,effect,operator,value>,
+// if the two tolerations have same <key,effect,operator,value> combination, regard as they match.
+// TODO: uniqueness check for tolerations in api validations.
+func (t *Toleration) MatchToleration(tolerationToMatch *Toleration) bool {
+ return t.Key == tolerationToMatch.Key &&
+ t.Effect == tolerationToMatch.Effect &&
+ t.Operator == tolerationToMatch.Operator &&
+ t.Value == tolerationToMatch.Value
+}
diff --git a/vendor/k8s.io/client-go/pkg/api/types.go b/vendor/k8s.io/client-go/pkg/api/types.go
new file mode 100644
index 000000000..b59f7202e
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/types.go
@@ -0,0 +1,3989 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package api
+
+import (
+ "k8s.io/apimachinery/pkg/api/resource"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/fields"
+ "k8s.io/apimachinery/pkg/labels"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/types"
+ "k8s.io/apimachinery/pkg/util/intstr"
+)
+
+// Common string formats
+// ---------------------
+// Many fields in this API have formatting requirements. The commonly used
+// formats are defined here.
+//
+// C_IDENTIFIER: This is a string that conforms to the definition of an "identifier"
+// in the C language. This is captured by the following regex:
+// [A-Za-z_][A-Za-z0-9_]*
+// This defines the format, but not the length restriction, which should be
+// specified at the definition of any field of this type.
+//
+// DNS_LABEL: This is a string, no more than 63 characters long, that conforms
+// to the definition of a "label" in RFCs 1035 and 1123. This is captured
+// by the following regex:
+// [a-z0-9]([-a-z0-9]*[a-z0-9])?
+//
+// DNS_SUBDOMAIN: This is a string, no more than 253 characters long, that conforms
+// to the definition of a "subdomain" in RFCs 1035 and 1123. This is captured
+// by the following regex:
+// [a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*
+// or more simply:
+// DNS_LABEL(\.DNS_LABEL)*
+//
+// IANA_SVC_NAME: This is a string, no more than 15 characters long, that
+// conforms to the definition of IANA service name in RFC 6335.
+// It must contains at least one letter [a-z] and it must contains only [a-z0-9-].
+// Hypens ('-') cannot be leading or trailing character of the string
+// and cannot be adjacent to other hyphens.
+
+// ObjectMeta is metadata that all persisted resources must have, which includes all objects
+// users must create.
+// DEPRECATED: Use k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta instead - this type will be removed soon.
+type ObjectMeta struct {
+ // Name is unique within a namespace. Name is required when creating resources, although
+ // some resources may allow a client to request the generation of an appropriate name
+ // automatically. Name is primarily intended for creation idempotence and configuration
+ // definition.
+ // +optional
+ Name string
+
+ // GenerateName indicates that the name should be made unique by the server prior to persisting
+ // it. A non-empty value for the field indicates the name will be made unique (and the name
+ // returned to the client will be different than the name passed). The value of this field will
+ // be combined with a unique suffix on the server if the Name field has not been provided.
+ // The provided value must be valid within the rules for Name, and may be truncated by the length
+ // of the suffix required to make the value unique on the server.
+ //
+ // If this field is specified, and Name is not present, the server will NOT return a 409 if the
+ // generated name exists - instead, it will either return 201 Created or 500 with Reason
+ // ServerTimeout indicating a unique name could not be found in the time allotted, and the client
+ // should retry (optionally after the time indicated in the Retry-After header).
+ // +optional
+ GenerateName string
+
+ // Namespace defines the space within which name must be unique. An empty namespace is
+ // equivalent to the "default" namespace, but "default" is the canonical representation.
+ // Not all objects are required to be scoped to a namespace - the value of this field for
+ // those objects will be empty.
+ // +optional
+ Namespace string
+
+ // SelfLink is a URL representing this object.
+ // +optional
+ SelfLink string
+
+ // UID is the unique in time and space value for this object. It is typically generated by
+ // the server on successful creation of a resource and is not allowed to change on PUT
+ // operations.
+ // +optional
+ UID types.UID
+
+ // An opaque value that represents the version of this resource. May be used for optimistic
+ // concurrency, change detection, and the watch operation on a resource or set of resources.
+ // Clients must treat these values as opaque and values may only be valid for a particular
+ // resource or set of resources. Only servers will generate resource versions.
+ // +optional
+ ResourceVersion string
+
+ // A sequence number representing a specific generation of the desired state.
+ // Populated by the system. Read-only.
+ // +optional
+ Generation int64
+
+ // CreationTimestamp is a timestamp representing the server time when this object was
+ // created. It is not guaranteed to be set in happens-before order across separate operations.
+ // Clients may not set this value. It is represented in RFC3339 form and is in UTC.
+ // +optional
+ CreationTimestamp metav1.Time
+
+ // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This
+ // field is set by the server when a graceful deletion is requested by the user, and is not
+ // directly settable by a client. The resource is expected to be deleted (no longer visible
+ // from resource lists, and not reachable by name) after the time in this field. Once set,
+ // this value may not be unset or be set further into the future, although it may be shortened
+ // or the resource may be deleted prior to this time. For example, a user may request that
+ // a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination
+ // signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard
+ // termination signal (SIGKILL) to the container and after cleanup, remove the pod from the
+ // API. In the presence of network partitions, this object may still exist after this
+ // timestamp, until an administrator or automated process can determine the resource is
+ // fully terminated.
+ // If not set, graceful deletion of the object has not been requested.
+ //
+ // Populated by the system when a graceful deletion is requested.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ DeletionTimestamp *metav1.Time
+
+ // DeletionGracePeriodSeconds records the graceful deletion value set when graceful deletion
+ // was requested. Represents the most recent grace period, and may only be shortened once set.
+ // +optional
+ DeletionGracePeriodSeconds *int64
+
+ // Labels are key value pairs that may be used to scope and select individual resources.
+ // Label keys are of the form:
+ // label-key ::= prefixed-name | name
+ // prefixed-name ::= prefix '/' name
+ // prefix ::= DNS_SUBDOMAIN
+ // name ::= DNS_LABEL
+ // The prefix is optional. If the prefix is not specified, the key is assumed to be private
+ // to the user. Other system components that wish to use labels must specify a prefix. The
+ // "kubernetes.io/" prefix is reserved for use by kubernetes components.
+ // +optional
+ Labels map[string]string
+
+ // Annotations are unstructured key value data stored with a resource that may be set by
+ // external tooling. They are not queryable and should be preserved when modifying
+ // objects. Annotation keys have the same formatting restrictions as Label keys. See the
+ // comments on Labels for details.
+ // +optional
+ Annotations map[string]string
+
+ // List of objects depended by this object. If ALL objects in the list have
+ // been deleted, this object will be garbage collected. If this object is managed by a controller,
+ // then an entry in this list will point to this controller, with the controller field set to true.
+ // There cannot be more than one managing controller.
+ // +optional
+ OwnerReferences []metav1.OwnerReference
+
+ // An initializer is a controller which enforces some system invariant at object creation time.
+ // This field is a list of initializers that have not yet acted on this object. If nil or empty,
+ // this object has been completely initialized. Otherwise, the object is considered uninitialized
+ // and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to
+ // observe uninitialized objects.
+ //
+ // When an object is created, the system will populate this list with the current set of initializers.
+ // Only privileged users may set or modify this list. Once it is empty, it may not be modified further
+ // by any user.
+ Initializers *metav1.Initializers
+
+ // Must be empty before the object is deleted from the registry. Each entry
+ // is an identifier for the responsible component that will remove the entry
+ // from the list. If the deletionTimestamp of the object is non-nil, entries
+ // in this list can only be removed.
+ // +optional
+ Finalizers []string
+
+ // The name of the cluster which the object belongs to.
+ // This is used to distinguish resources with same name and namespace in different clusters.
+ // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.
+ // +optional
+ ClusterName string
+}
+
+const (
+ // NamespaceDefault means the object is in the default namespace which is applied when not specified by clients
+ NamespaceDefault string = "default"
+ // NamespaceAll is the default argument to specify on a context when you want to list or filter resources across all namespaces
+ NamespaceAll string = ""
+ // NamespaceNone is the argument for a context when there is no namespace.
+ NamespaceNone string = ""
+ // NamespaceSystem is the system namespace where we place system components.
+ NamespaceSystem string = "kube-system"
+ // NamespacePublic is the namespace where we place public info (ConfigMaps)
+ NamespacePublic string = "kube-public"
+ // TerminationMessagePathDefault means the default path to capture the application termination message running in a container
+ TerminationMessagePathDefault string = "/dev/termination-log"
+)
+
+// Volume represents a named volume in a pod that may be accessed by any containers in the pod.
+type Volume struct {
+ // Required: This must be a DNS_LABEL. Each volume in a pod must have
+ // a unique name.
+ Name string
+ // The VolumeSource represents the location and type of a volume to mount.
+ // This is optional for now. If not specified, the Volume is implied to be an EmptyDir.
+ // This implied behavior is deprecated and will be removed in a future version.
+ // +optional
+ VolumeSource
+}
+
+// VolumeSource represents the source location of a volume to mount.
+// Only one of its members may be specified.
+type VolumeSource struct {
+ // HostPath represents file or directory on the host machine that is
+ // directly exposed to the container. This is generally used for system
+ // agents or other privileged things that are allowed to see the host
+ // machine. Most containers will NOT need this.
+ // ---
+ // TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not
+ // mount host directories as read/write.
+ // +optional
+ HostPath *HostPathVolumeSource
+ // EmptyDir represents a temporary directory that shares a pod's lifetime.
+ // +optional
+ EmptyDir *EmptyDirVolumeSource
+ // GCEPersistentDisk represents a GCE Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ // +optional
+ GCEPersistentDisk *GCEPersistentDiskVolumeSource
+ // AWSElasticBlockStore represents an AWS EBS disk that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ // +optional
+ AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource
+ // GitRepo represents a git repository at a particular revision.
+ // +optional
+ GitRepo *GitRepoVolumeSource
+ // Secret represents a secret that should populate this volume.
+ // +optional
+ Secret *SecretVolumeSource
+ // NFS represents an NFS mount on the host that shares a pod's lifetime
+ // +optional
+ NFS *NFSVolumeSource
+ // ISCSIVolumeSource represents an ISCSI Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ // +optional
+ ISCSI *ISCSIVolumeSource
+ // Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime
+ // +optional
+ Glusterfs *GlusterfsVolumeSource
+ // PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace
+ // +optional
+ PersistentVolumeClaim *PersistentVolumeClaimVolumeSource
+ // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime
+ // +optional
+ RBD *RBDVolumeSource
+
+ // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
+ // +optional
+ Quobyte *QuobyteVolumeSource
+
+ // FlexVolume represents a generic volume resource that is
+ // provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.
+ // +optional
+ FlexVolume *FlexVolumeSource
+
+ // Cinder represents a cinder volume attached and mounted on kubelets host machine
+ // +optional
+ Cinder *CinderVolumeSource
+
+ // CephFS represents a Cephfs mount on the host that shares a pod's lifetime
+ // +optional
+ CephFS *CephFSVolumeSource
+
+ // Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
+ // +optional
+ Flocker *FlockerVolumeSource
+
+ // DownwardAPI represents metadata about the pod that should populate this volume
+ // +optional
+ DownwardAPI *DownwardAPIVolumeSource
+ // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
+ // +optional
+ FC *FCVolumeSource
+ // AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
+ // +optional
+ AzureFile *AzureFileVolumeSource
+ // ConfigMap represents a configMap that should populate this volume
+ // +optional
+ ConfigMap *ConfigMapVolumeSource
+ // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
+ // +optional
+ VsphereVolume *VsphereVirtualDiskVolumeSource
+ // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
+ // +optional
+ AzureDisk *AzureDiskVolumeSource
+ // PhotonPersistentDisk represents a Photon Controller persistent disk attached and mounted on kubelets host machine
+ PhotonPersistentDisk *PhotonPersistentDiskVolumeSource
+ // Items for all in one resources secrets, configmaps, and downward API
+ Projected *ProjectedVolumeSource
+ // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine
+ // +optional
+ PortworxVolume *PortworxVolumeSource
+ // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
+ // +optional
+ ScaleIO *ScaleIOVolumeSource
+ // StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod
+ // +optional
+ StorageOS *StorageOSVolumeSource
+}
+
+// Similar to VolumeSource but meant for the administrator who creates PVs.
+// Exactly one of its members must be set.
+type PersistentVolumeSource struct {
+ // GCEPersistentDisk represents a GCE Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ // +optional
+ GCEPersistentDisk *GCEPersistentDiskVolumeSource
+ // AWSElasticBlockStore represents an AWS EBS disk that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ // +optional
+ AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource
+ // HostPath represents a directory on the host.
+ // Provisioned by a developer or tester.
+ // This is useful for single-node development and testing only!
+ // On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster.
+ // +optional
+ HostPath *HostPathVolumeSource
+ // Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod
+ // +optional
+ Glusterfs *GlusterfsVolumeSource
+ // NFS represents an NFS mount on the host that shares a pod's lifetime
+ // +optional
+ NFS *NFSVolumeSource
+ // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime
+ // +optional
+ RBD *RBDVolumeSource
+ // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
+ // +optional
+ Quobyte *QuobyteVolumeSource
+ // ISCSIVolumeSource represents an ISCSI resource that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ // +optional
+ ISCSI *ISCSIVolumeSource
+ // FlexVolume represents a generic volume resource that is
+ // provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.
+ // +optional
+ FlexVolume *FlexVolumeSource
+ // Cinder represents a cinder volume attached and mounted on kubelets host machine
+ // +optional
+ Cinder *CinderVolumeSource
+ // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
+ // +optional
+ CephFS *CephFSVolumeSource
+ // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
+ // +optional
+ FC *FCVolumeSource
+ // Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
+ // +optional
+ Flocker *FlockerVolumeSource
+ // AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
+ // +optional
+ AzureFile *AzureFileVolumeSource
+ // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
+ // +optional
+ VsphereVolume *VsphereVirtualDiskVolumeSource
+ // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
+ // +optional
+ AzureDisk *AzureDiskVolumeSource
+ // PhotonPersistentDisk represents a Photon Controller persistent disk attached and mounted on kubelets host machine
+ PhotonPersistentDisk *PhotonPersistentDiskVolumeSource
+ // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine
+ // +optional
+ PortworxVolume *PortworxVolumeSource
+ // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
+ // +optional
+ ScaleIO *ScaleIOVolumeSource
+ // Local represents directly-attached storage with node affinity
+ // +optional
+ Local *LocalVolumeSource
+ // StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md
+ // +optional
+ StorageOS *StorageOSPersistentVolumeSource
+}
+
+type PersistentVolumeClaimVolumeSource struct {
+ // ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume
+ ClaimName string
+ // Optional: Defaults to false (read/write). ReadOnly here
+ // will force the ReadOnly setting in VolumeMounts
+ // +optional
+ ReadOnly bool
+}
+
+const (
+ // BetaStorageClassAnnotation represents the beta/previous StorageClass annotation.
+ // It's currently still used and will be held for backwards compatibility
+ BetaStorageClassAnnotation = "volume.beta.kubernetes.io/storage-class"
+
+ // MountOptionAnnotation defines mount option annotation used in PVs
+ MountOptionAnnotation = "volume.beta.kubernetes.io/mount-options"
+
+ // AlphaStorageNodeAffinityAnnotation defines node affinity policies for a PersistentVolume.
+ // Value is a string of the json representation of type NodeAffinity
+ AlphaStorageNodeAffinityAnnotation = "volume.alpha.kubernetes.io/node-affinity"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+
+type PersistentVolume struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ //Spec defines a persistent volume owned by the cluster
+ // +optional
+ Spec PersistentVolumeSpec
+
+ // Status represents the current information about persistent volume.
+ // +optional
+ Status PersistentVolumeStatus
+}
+
+type PersistentVolumeSpec struct {
+ // Resources represents the actual resources of the volume
+ Capacity ResourceList
+ // Source represents the location and type of a volume to mount.
+ PersistentVolumeSource
+ // AccessModes contains all ways the volume can be mounted
+ // +optional
+ AccessModes []PersistentVolumeAccessMode
+ // ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim.
+ // ClaimRef is expected to be non-nil when bound.
+ // claim.VolumeName is the authoritative bind between PV and PVC.
+ // When set to non-nil value, PVC.Spec.Selector of the referenced PVC is
+ // ignored, i.e. labels of this PV do not need to match PVC selector.
+ // +optional
+ ClaimRef *ObjectReference
+ // Optional: what happens to a persistent volume when released from its claim.
+ // +optional
+ PersistentVolumeReclaimPolicy PersistentVolumeReclaimPolicy
+ // Name of StorageClass to which this persistent volume belongs. Empty value
+ // means that this volume does not belong to any StorageClass.
+ // +optional
+ StorageClassName string
+}
+
+// PersistentVolumeReclaimPolicy describes a policy for end-of-life maintenance of persistent volumes
+type PersistentVolumeReclaimPolicy string
+
+const (
+ // PersistentVolumeReclaimRecycle means the volume will be recycled back into the pool of unbound persistent volumes on release from its claim.
+ // The volume plugin must support Recycling.
+ PersistentVolumeReclaimRecycle PersistentVolumeReclaimPolicy = "Recycle"
+ // PersistentVolumeReclaimDelete means the volume will be deleted from Kubernetes on release from its claim.
+ // The volume plugin must support Deletion.
+ PersistentVolumeReclaimDelete PersistentVolumeReclaimPolicy = "Delete"
+ // PersistentVolumeReclaimRetain means the volume will be left in its current phase (Released) for manual reclamation by the administrator.
+ // The default policy is Retain.
+ PersistentVolumeReclaimRetain PersistentVolumeReclaimPolicy = "Retain"
+)
+
+type PersistentVolumeStatus struct {
+ // Phase indicates if a volume is available, bound to a claim, or released by a claim
+ // +optional
+ Phase PersistentVolumePhase
+ // A human-readable message indicating details about why the volume is in this state.
+ // +optional
+ Message string
+ // Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI
+ // +optional
+ Reason string
+}
+
+type PersistentVolumeList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+ Items []PersistentVolume
+}
+
+// +genclient=true
+
+// PersistentVolumeClaim is a user's request for and claim to a persistent volume
+type PersistentVolumeClaim struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Spec defines the volume requested by a pod author
+ // +optional
+ Spec PersistentVolumeClaimSpec
+
+ // Status represents the current information about a claim
+ // +optional
+ Status PersistentVolumeClaimStatus
+}
+
+type PersistentVolumeClaimList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+ Items []PersistentVolumeClaim
+}
+
+// PersistentVolumeClaimSpec describes the common attributes of storage devices
+// and allows a Source for provider-specific attributes
+type PersistentVolumeClaimSpec struct {
+ // Contains the types of access modes required
+ // +optional
+ AccessModes []PersistentVolumeAccessMode
+ // A label query over volumes to consider for binding. This selector is
+ // ignored when VolumeName is set
+ // +optional
+ Selector *metav1.LabelSelector
+ // Resources represents the minimum resources required
+ // +optional
+ Resources ResourceRequirements
+ // VolumeName is the binding reference to the PersistentVolume backing this
+ // claim. When set to non-empty value Selector is not evaluated
+ // +optional
+ VolumeName string
+ // Name of the StorageClass required by the claim.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class-1
+ // +optional
+ StorageClassName *string
+}
+
+type PersistentVolumeClaimStatus struct {
+ // Phase represents the current phase of PersistentVolumeClaim
+ // +optional
+ Phase PersistentVolumeClaimPhase
+ // AccessModes contains all ways the volume backing the PVC can be mounted
+ // +optional
+ AccessModes []PersistentVolumeAccessMode
+ // Represents the actual resources of the underlying volume
+ // +optional
+ Capacity ResourceList
+}
+
+type PersistentVolumeAccessMode string
+
+const (
+ // can be mounted read/write mode to exactly 1 host
+ ReadWriteOnce PersistentVolumeAccessMode = "ReadWriteOnce"
+ // can be mounted in read-only mode to many hosts
+ ReadOnlyMany PersistentVolumeAccessMode = "ReadOnlyMany"
+ // can be mounted in read/write mode to many hosts
+ ReadWriteMany PersistentVolumeAccessMode = "ReadWriteMany"
+)
+
+type PersistentVolumePhase string
+
+const (
+ // used for PersistentVolumes that are not available
+ VolumePending PersistentVolumePhase = "Pending"
+ // used for PersistentVolumes that are not yet bound
+ // Available volumes are held by the binder and matched to PersistentVolumeClaims
+ VolumeAvailable PersistentVolumePhase = "Available"
+ // used for PersistentVolumes that are bound
+ VolumeBound PersistentVolumePhase = "Bound"
+ // used for PersistentVolumes where the bound PersistentVolumeClaim was deleted
+ // released volumes must be recycled before becoming available again
+ // this phase is used by the persistent volume claim binder to signal to another process to reclaim the resource
+ VolumeReleased PersistentVolumePhase = "Released"
+ // used for PersistentVolumes that failed to be correctly recycled or deleted after being released from a claim
+ VolumeFailed PersistentVolumePhase = "Failed"
+)
+
+type PersistentVolumeClaimPhase string
+
+const (
+ // used for PersistentVolumeClaims that are not yet bound
+ ClaimPending PersistentVolumeClaimPhase = "Pending"
+ // used for PersistentVolumeClaims that are bound
+ ClaimBound PersistentVolumeClaimPhase = "Bound"
+ // used for PersistentVolumeClaims that lost their underlying
+ // PersistentVolume. The claim was bound to a PersistentVolume and this
+ // volume does not exist any longer and all data on it was lost.
+ ClaimLost PersistentVolumeClaimPhase = "Lost"
+)
+
+// Represents a host path mapped into a pod.
+// Host path volumes do not support ownership management or SELinux relabeling.
+type HostPathVolumeSource struct {
+ Path string
+}
+
+// Represents an empty directory for a pod.
+// Empty directory volumes support ownership management and SELinux relabeling.
+type EmptyDirVolumeSource struct {
+ // TODO: Longer term we want to represent the selection of underlying
+ // media more like a scheduling problem - user says what traits they
+ // need, we give them a backing store that satisfies that. For now
+ // this will cover the most common needs.
+ // Optional: what type of storage medium should back this directory.
+ // The default is "" which means to use the node's default medium.
+ // +optional
+ Medium StorageMedium
+ // Total amount of local storage required for this EmptyDir volume.
+ // The size limit is also applicable for memory medium.
+ // The maximum usage on memory medium EmptyDir would be the minimum value between
+ // the SizeLimit specified here and the sum of memory limits of all containers in a pod.
+ // The default is nil which means that the limit is undefined.
+ // More info: http://kubernetes.io/docs/user-guide/volumes#emptydir
+ // +optional
+ SizeLimit resource.Quantity
+}
+
+// StorageMedium defines ways that storage can be allocated to a volume.
+type StorageMedium string
+
+const (
+ StorageMediumDefault StorageMedium = "" // use whatever the default is for the node
+ StorageMediumMemory StorageMedium = "Memory" // use memory (tmpfs)
+)
+
+// Protocol defines network protocols supported for things like container ports.
+type Protocol string
+
+const (
+ // ProtocolTCP is the TCP protocol.
+ ProtocolTCP Protocol = "TCP"
+ // ProtocolUDP is the UDP protocol.
+ ProtocolUDP Protocol = "UDP"
+)
+
+// Represents a Persistent Disk resource in Google Compute Engine.
+//
+// A GCE PD must exist before mounting to a container. The disk must
+// also be in the same GCE project and zone as the kubelet. A GCE PD
+// can only be mounted as read/write once or read-only many times. GCE
+// PDs support ownership management and SELinux relabeling.
+type GCEPersistentDiskVolumeSource struct {
+ // Unique name of the PD resource. Used to identify the disk in GCE
+ PDName string
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ FSType string
+ // Optional: Partition on the disk to mount.
+ // If omitted, kubelet will attempt to mount the device name.
+ // Ex. For /dev/sda1, this field is "1", for /dev/sda, this field is 0 or empty.
+ // +optional
+ Partition int32
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool
+}
+
+// Represents an ISCSI disk.
+// ISCSI volumes can only be mounted as read/write once.
+// ISCSI volumes support ownership management and SELinux relabeling.
+type ISCSIVolumeSource struct {
+ // Required: iSCSI target portal
+ // the portal is either an IP or ip_addr:port if port is other than default (typically TCP ports 860 and 3260)
+ // +optional
+ TargetPortal string
+ // Required: target iSCSI Qualified Name
+ // +optional
+ IQN string
+ // Required: iSCSI target lun number
+ // +optional
+ Lun int32
+ // Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport.
+ // +optional
+ ISCSIInterface string
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ FSType string
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool
+ // Optional: list of iSCSI target portal ips for high availability.
+ // the portal is either an IP or ip_addr:port if port is other than default (typically TCP ports 860 and 3260)
+ // +optional
+ Portals []string
+ // Optional: whether support iSCSI Discovery CHAP authentication
+ // +optional
+ DiscoveryCHAPAuth bool
+ // Optional: whether support iSCSI Session CHAP authentication
+ // +optional
+ SessionCHAPAuth bool
+ // Optional: CHAP secret for iSCSI target and initiator authentication.
+ // The secret is used if either DiscoveryCHAPAuth or SessionCHAPAuth is true
+ // +optional
+ SecretRef *LocalObjectReference
+}
+
+// Represents a Fibre Channel volume.
+// Fibre Channel volumes can only be mounted as read/write once.
+// Fibre Channel volumes support ownership management and SELinux relabeling.
+type FCVolumeSource struct {
+ // Required: FC target worldwide names (WWNs)
+ TargetWWNs []string
+ // Required: FC target lun number
+ Lun *int32
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ FSType string
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool
+}
+
+// FlexVolume represents a generic volume resource that is
+// provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.
+type FlexVolumeSource struct {
+ // Driver is the name of the driver to use for this volume.
+ Driver string
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script.
+ // +optional
+ FSType string
+ // Optional: SecretRef is reference to the secret object containing
+ // sensitive information to pass to the plugin scripts. This may be
+ // empty if no secret object is specified. If the secret object
+ // contains more than one secret, all secrets are passed to the plugin
+ // scripts.
+ // +optional
+ SecretRef *LocalObjectReference
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool
+ // Optional: Extra driver options if any.
+ // +optional
+ Options map[string]string
+}
+
+// Represents a Persistent Disk resource in AWS.
+//
+// An AWS EBS disk must exist before mounting to a container. The disk
+// must also be in the same AWS zone as the kubelet. An AWS EBS disk
+// can only be mounted as read/write once. AWS EBS volumes support
+// ownership management and SELinux relabeling.
+type AWSElasticBlockStoreVolumeSource struct {
+ // Unique id of the persistent disk resource. Used to identify the disk in AWS
+ VolumeID string
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ FSType string
+ // Optional: Partition on the disk to mount.
+ // If omitted, kubelet will attempt to mount the device name.
+ // Ex. For /dev/sda1, this field is "1", for /dev/sda, this field is 0 or empty.
+ // +optional
+ Partition int32
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool
+}
+
+// Represents a volume that is populated with the contents of a git repository.
+// Git repo volumes do not support ownership management.
+// Git repo volumes support SELinux relabeling.
+type GitRepoVolumeSource struct {
+ // Repository URL
+ Repository string
+ // Commit hash, this is optional
+ // +optional
+ Revision string
+ // Clone target, this is optional
+ // Must not contain or start with '..'. If '.' is supplied, the volume directory will be the
+ // git repository. Otherwise, if specified, the volume will contain the git repository in
+ // the subdirectory with the given name.
+ // +optional
+ Directory string
+ // TODO: Consider credentials here.
+}
+
+// Adapts a Secret into a volume.
+//
+// The contents of the target Secret's Data field will be presented in a volume
+// as files using the keys in the Data field as the file names.
+// Secret volumes support ownership management and SELinux relabeling.
+type SecretVolumeSource struct {
+ // Name of the secret in the pod's namespace to use.
+ // +optional
+ SecretName string
+ // If unspecified, each key-value pair in the Data field of the referenced
+ // Secret will be projected into the volume as a file whose name is the
+ // key and content is the value. If specified, the listed keys will be
+ // projected into the specified paths, and unlisted keys will not be
+ // present. If a key is specified which is not present in the Secret,
+ // the volume setup will error unless it is marked optional. Paths must be
+ // relative and may not contain the '..' path or start with '..'.
+ // +optional
+ Items []KeyToPath
+ // Mode bits to use on created files by default. Must be a value between
+ // 0 and 0777.
+ // Directories within the path are not affected by this setting.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ DefaultMode *int32
+ // Specify whether the Secret or its key must be defined
+ // +optional
+ Optional *bool
+}
+
+// Adapts a secret into a projected volume.
+//
+// The contents of the target Secret's Data field will be presented in a
+// projected volume as files using the keys in the Data field as the file names.
+// Note that this is identical to a secret volume source without the default
+// mode.
+type SecretProjection struct {
+ LocalObjectReference
+ // If unspecified, each key-value pair in the Data field of the referenced
+ // Secret will be projected into the volume as a file whose name is the
+ // key and content is the value. If specified, the listed keys will be
+ // projected into the specified paths, and unlisted keys will not be
+ // present. If a key is specified which is not present in the Secret,
+ // the volume setup will error unless it is marked optional. Paths must be
+ // relative and may not contain the '..' path or start with '..'.
+ // +optional
+ Items []KeyToPath
+ // Specify whether the Secret or its key must be defined
+ // +optional
+ Optional *bool
+}
+
+// Represents an NFS mount that lasts the lifetime of a pod.
+// NFS volumes do not support ownership management or SELinux relabeling.
+type NFSVolumeSource struct {
+ // Server is the hostname or IP address of the NFS server
+ Server string
+
+ // Path is the exported NFS share
+ Path string
+
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the NFS export to be mounted with read-only permissions
+ // +optional
+ ReadOnly bool
+}
+
+// Represents a Quobyte mount that lasts the lifetime of a pod.
+// Quobyte volumes do not support ownership management or SELinux relabeling.
+type QuobyteVolumeSource struct {
+ // Registry represents a single or multiple Quobyte Registry services
+ // specified as a string as host:port pair (multiple entries are separated with commas)
+ // which acts as the central registry for volumes
+ Registry string
+
+ // Volume is a string that references an already created Quobyte volume by name.
+ Volume string
+
+ // Defaults to false (read/write). ReadOnly here will force
+ // the Quobyte to be mounted with read-only permissions
+ // +optional
+ ReadOnly bool
+
+ // User to map volume access to
+ // Defaults to the root user
+ // +optional
+ User string
+
+ // Group to map volume access to
+ // Default is no group
+ // +optional
+ Group string
+}
+
+// Represents a Glusterfs mount that lasts the lifetime of a pod.
+// Glusterfs volumes do not support ownership management or SELinux relabeling.
+type GlusterfsVolumeSource struct {
+ // Required: EndpointsName is the endpoint name that details Glusterfs topology
+ EndpointsName string
+
+ // Required: Path is the Glusterfs volume path
+ Path string
+
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the Glusterfs to be mounted with read-only permissions
+ // +optional
+ ReadOnly bool
+}
+
+// Represents a Rados Block Device mount that lasts the lifetime of a pod.
+// RBD volumes support ownership management and SELinux relabeling.
+type RBDVolumeSource struct {
+ // Required: CephMonitors is a collection of Ceph monitors
+ CephMonitors []string
+ // Required: RBDImage is the rados image name
+ RBDImage string
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ FSType string
+ // Optional: RadosPool is the rados pool name,default is rbd
+ // +optional
+ RBDPool string
+ // Optional: RBDUser is the rados user name, default is admin
+ // +optional
+ RadosUser string
+ // Optional: Keyring is the path to key ring for RBDUser, default is /etc/ceph/keyring
+ // +optional
+ Keyring string
+ // Optional: SecretRef is name of the authentication secret for RBDUser, default is nil.
+ // +optional
+ SecretRef *LocalObjectReference
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool
+}
+
+// Represents a cinder volume resource in Openstack. A Cinder volume
+// must exist before mounting to a container. The volume must also be
+// in the same region as the kubelet. Cinder volumes support ownership
+// management and SELinux relabeling.
+type CinderVolumeSource struct {
+ // Unique id of the volume used to identify the cinder volume
+ VolumeID string
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ FSType string
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool
+}
+
+// Represents a Ceph Filesystem mount that lasts the lifetime of a pod
+// Cephfs volumes do not support ownership management or SELinux relabeling.
+type CephFSVolumeSource struct {
+ // Required: Monitors is a collection of Ceph monitors
+ Monitors []string
+ // Optional: Used as the mounted root, rather than the full Ceph tree, default is /
+ // +optional
+ Path string
+ // Optional: User is the rados user name, default is admin
+ // +optional
+ User string
+ // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret
+ // +optional
+ SecretFile string
+ // Optional: SecretRef is reference to the authentication secret for User, default is empty.
+ // +optional
+ SecretRef *LocalObjectReference
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool
+}
+
+// Represents a Flocker volume mounted by the Flocker agent.
+// One and only one of datasetName and datasetUUID should be set.
+// Flocker volumes do not support ownership management or SELinux relabeling.
+type FlockerVolumeSource struct {
+ // Name of the dataset stored as metadata -> name on the dataset for Flocker
+ // should be considered as deprecated
+ // +optional
+ DatasetName string
+ // UUID of the dataset. This is unique identifier of a Flocker dataset
+ // +optional
+ DatasetUUID string
+}
+
+// Represents a volume containing downward API info.
+// Downward API volumes support ownership management and SELinux relabeling.
+type DownwardAPIVolumeSource struct {
+ // Items is a list of DownwardAPIVolume file
+ // +optional
+ Items []DownwardAPIVolumeFile
+ // Mode bits to use on created files by default. Must be a value between
+ // 0 and 0777.
+ // Directories within the path are not affected by this setting.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ DefaultMode *int32
+}
+
+// Represents a single file containing information from the downward API
+type DownwardAPIVolumeFile struct {
+ // Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'
+ Path string
+ // Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.
+ // +optional
+ FieldRef *ObjectFieldSelector
+ // Selects a resource of the container: only resources limits and requests
+ // (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
+ // +optional
+ ResourceFieldRef *ResourceFieldSelector
+ // Optional: mode bits to use on this file, must be a value between 0
+ // and 0777. If not specified, the volume defaultMode will be used.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ Mode *int32
+}
+
+// Represents downward API info for projecting into a projected volume.
+// Note that this is identical to a downwardAPI volume source without the default
+// mode.
+type DownwardAPIProjection struct {
+ // Items is a list of DownwardAPIVolume file
+ // +optional
+ Items []DownwardAPIVolumeFile
+}
+
+// AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
+type AzureFileVolumeSource struct {
+ // the name of secret that contains Azure Storage Account Name and Key
+ SecretName string
+ // Share Name
+ ShareName string
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool
+}
+
+// Represents a vSphere volume resource.
+type VsphereVirtualDiskVolumeSource struct {
+ // Path that identifies vSphere volume vmdk
+ VolumePath string
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ FSType string
+ // Storage Policy Based Management (SPBM) profile name.
+ // +optional
+ StoragePolicyName string
+ // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.
+ // +optional
+ StoragePolicyID string
+}
+
+// Represents a Photon Controller persistent disk resource.
+type PhotonPersistentDiskVolumeSource struct {
+ // ID that identifies Photon Controller persistent disk
+ PdID string
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ FSType string
+}
+
+// PortworxVolumeSource represents a Portworx volume resource.
+type PortworxVolumeSource struct {
+ // VolumeID uniquely identifies a Portworx volume
+ VolumeID string
+ // FSType represents the filesystem type to mount
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ FSType string
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool
+}
+
+type AzureDataDiskCachingMode string
+type AzureDataDiskKind string
+
+const (
+ AzureDataDiskCachingNone AzureDataDiskCachingMode = "None"
+ AzureDataDiskCachingReadOnly AzureDataDiskCachingMode = "ReadOnly"
+ AzureDataDiskCachingReadWrite AzureDataDiskCachingMode = "ReadWrite"
+
+ AzureSharedBlobDisk AzureDataDiskKind = "Shared"
+ AzureDedicatedBlobDisk AzureDataDiskKind = "Dedicated"
+ AzureManagedDisk AzureDataDiskKind = "Managed"
+)
+
+// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
+type AzureDiskVolumeSource struct {
+ // The Name of the data disk in the blob storage
+ DiskName string
+ // The URI of the data disk in the blob storage
+ DataDiskURI string
+ // Host Caching mode: None, Read Only, Read Write.
+ // +optional
+ CachingMode *AzureDataDiskCachingMode
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ FSType *string
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly *bool
+ // Expected values Shared: mulitple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared
+ Kind *AzureDataDiskKind
+}
+
+// ScaleIOVolumeSource represents a persistent ScaleIO volume
+type ScaleIOVolumeSource struct {
+ // The host address of the ScaleIO API Gateway.
+ Gateway string
+ // The name of the storage system as configured in ScaleIO.
+ System string
+ // SecretRef references to the secret for ScaleIO user and other
+ // sensitive information. If this is not provided, Login operation will fail.
+ SecretRef *LocalObjectReference
+ // Flag to enable/disable SSL communication with Gateway, default false
+ // +optional
+ SSLEnabled bool
+ // The name of the Protection Domain for the configured storage (defaults to "default").
+ // +optional
+ ProtectionDomain string
+ // The Storage Pool associated with the protection domain (defaults to "default").
+ // +optional
+ StoragePool string
+ // Indicates whether the storage for a volume should be thick or thin (defaults to "thin").
+ // +optional
+ StorageMode string
+ // The name of a volume already created in the ScaleIO system
+ // that is associated with this volume source.
+ VolumeName string
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ FSType string
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool
+}
+
+// Represents a StorageOS persistent volume resource.
+type StorageOSVolumeSource struct {
+ // VolumeName is the human-readable name of the StorageOS volume. Volume
+ // names are only unique within a namespace.
+ VolumeName string
+ // VolumeNamespace specifies the scope of the volume within StorageOS. If no
+ // namespace is specified then the Pod's namespace will be used. This allows the
+ // Kubernetes name scoping to be mirrored within StorageOS for tighter integration.
+ // Set VolumeName to any name to override the default behaviour.
+ // Set to "default" if you are not using namespaces within StorageOS.
+ // Namespaces that do not pre-exist within StorageOS will be created.
+ // +optional
+ VolumeNamespace string
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ FSType string
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool
+ // SecretRef specifies the secret to use for obtaining the StorageOS API
+ // credentials. If not specified, default values will be attempted.
+ // +optional
+ SecretRef *LocalObjectReference
+}
+
+// Represents a StorageOS persistent volume resource.
+type StorageOSPersistentVolumeSource struct {
+ // VolumeName is the human-readable name of the StorageOS volume. Volume
+ // names are only unique within a namespace.
+ VolumeName string
+ // VolumeNamespace specifies the scope of the volume within StorageOS. If no
+ // namespace is specified then the Pod's namespace will be used. This allows the
+ // Kubernetes name scoping to be mirrored within StorageOS for tighter integration.
+ // Set VolumeName to any name to override the default behaviour.
+ // Set to "default" if you are not using namespaces within StorageOS.
+ // Namespaces that do not pre-exist within StorageOS will be created.
+ // +optional
+ VolumeNamespace string
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ FSType string
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool
+ // SecretRef specifies the secret to use for obtaining the StorageOS API
+ // credentials. If not specified, default values will be attempted.
+ // +optional
+ SecretRef *ObjectReference
+}
+
+// Adapts a ConfigMap into a volume.
+//
+// The contents of the target ConfigMap's Data field will be presented in a
+// volume as files using the keys in the Data field as the file names, unless
+// the items element is populated with specific mappings of keys to paths.
+// ConfigMap volumes support ownership management and SELinux relabeling.
+type ConfigMapVolumeSource struct {
+ LocalObjectReference
+ // If unspecified, each key-value pair in the Data field of the referenced
+ // ConfigMap will be projected into the volume as a file whose name is the
+ // key and content is the value. If specified, the listed keys will be
+ // projected into the specified paths, and unlisted keys will not be
+ // present. If a key is specified which is not present in the ConfigMap,
+ // the volume setup will error unless it is marked optional. Paths must be
+ // relative and may not contain the '..' path or start with '..'.
+ // +optional
+ Items []KeyToPath
+ // Mode bits to use on created files by default. Must be a value between
+ // 0 and 0777.
+ // Directories within the path are not affected by this setting.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ DefaultMode *int32
+ // Specify whether the ConfigMap or it's keys must be defined
+ // +optional
+ Optional *bool
+}
+
+// Adapts a ConfigMap into a projected volume.
+//
+// The contents of the target ConfigMap's Data field will be presented in a
+// projected volume as files using the keys in the Data field as the file names,
+// unless the items element is populated with specific mappings of keys to paths.
+// Note that this is identical to a configmap volume source without the default
+// mode.
+type ConfigMapProjection struct {
+ LocalObjectReference
+ // If unspecified, each key-value pair in the Data field of the referenced
+ // ConfigMap will be projected into the volume as a file whose name is the
+ // key and content is the value. If specified, the listed keys will be
+ // projected into the specified paths, and unlisted keys will not be
+ // present. If a key is specified which is not present in the ConfigMap,
+ // the volume setup will error unless it is marked optional. Paths must be
+ // relative and may not contain the '..' path or start with '..'.
+ // +optional
+ Items []KeyToPath
+ // Specify whether the ConfigMap or it's keys must be defined
+ // +optional
+ Optional *bool
+}
+
+// Represents a projected volume source
+type ProjectedVolumeSource struct {
+ // list of volume projections
+ Sources []VolumeProjection
+ // Mode bits to use on created files by default. Must be a value between
+ // 0 and 0777.
+ // Directories within the path are not affected by this setting.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ DefaultMode *int32
+}
+
+// Projection that may be projected along with other supported volume types
+type VolumeProjection struct {
+ // all types below are the supported types for projection into the same volume
+
+ // information about the secret data to project
+ Secret *SecretProjection
+ // information about the downwardAPI data to project
+ DownwardAPI *DownwardAPIProjection
+ // information about the configMap data to project
+ ConfigMap *ConfigMapProjection
+}
+
+// Maps a string key to a path within a volume.
+type KeyToPath struct {
+ // The key to project.
+ Key string
+
+ // The relative path of the file to map the key to.
+ // May not be an absolute path.
+ // May not contain the path element '..'.
+ // May not start with the string '..'.
+ Path string
+ // Optional: mode bits to use on this file, should be a value between 0
+ // and 0777. If not specified, the volume defaultMode will be used.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ Mode *int32
+}
+
+// Local represents directly-attached storage with node affinity
+type LocalVolumeSource struct {
+ // The full path to the volume on the node
+ // For alpha, this path must be a directory
+ // Once block as a source is supported, then this path can point to a block device
+ Path string
+}
+
+// ContainerPort represents a network port in a single container
+type ContainerPort struct {
+ // Optional: If specified, this must be an IANA_SVC_NAME Each named port
+ // in a pod must have a unique name.
+ // +optional
+ Name string
+ // Optional: If specified, this must be a valid port number, 0 < x < 65536.
+ // If HostNetwork is specified, this must match ContainerPort.
+ // +optional
+ HostPort int32
+ // Required: This must be a valid port number, 0 < x < 65536.
+ ContainerPort int32
+ // Required: Supports "TCP" and "UDP".
+ // +optional
+ Protocol Protocol
+ // Optional: What host IP to bind the external port to.
+ // +optional
+ HostIP string
+}
+
+// VolumeMount describes a mounting of a Volume within a container.
+type VolumeMount struct {
+ // Required: This must match the Name of a Volume [above].
+ Name string
+ // Optional: Defaults to false (read-write).
+ // +optional
+ ReadOnly bool
+ // Required. Must not contain ':'.
+ MountPath string
+ // Path within the volume from which the container's volume should be mounted.
+ // Defaults to "" (volume's root).
+ // +optional
+ SubPath string
+}
+
+// EnvVar represents an environment variable present in a Container.
+type EnvVar struct {
+ // Required: This must be a C_IDENTIFIER.
+ Name string
+ // Optional: no more than one of the following may be specified.
+ // Optional: Defaults to ""; variable references $(VAR_NAME) are expanded
+ // using the previous defined environment variables in the container and
+ // any service environment variables. If a variable cannot be resolved,
+ // the reference in the input string will be unchanged. The $(VAR_NAME)
+ // syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped
+ // references will never be expanded, regardless of whether the variable
+ // exists or not.
+ // +optional
+ Value string
+ // Optional: Specifies a source the value of this var should come from.
+ // +optional
+ ValueFrom *EnvVarSource
+}
+
+// EnvVarSource represents a source for the value of an EnvVar.
+// Only one of its fields may be set.
+type EnvVarSource struct {
+ // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations,
+ // spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP.
+ // +optional
+ FieldRef *ObjectFieldSelector
+ // Selects a resource of the container: only resources limits and requests
+ // (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
+ // +optional
+ ResourceFieldRef *ResourceFieldSelector
+ // Selects a key of a ConfigMap.
+ // +optional
+ ConfigMapKeyRef *ConfigMapKeySelector
+ // Selects a key of a secret in the pod's namespace.
+ // +optional
+ SecretKeyRef *SecretKeySelector
+}
+
+// ObjectFieldSelector selects an APIVersioned field of an object.
+type ObjectFieldSelector struct {
+ // Required: Version of the schema the FieldPath is written in terms of.
+ // If no value is specified, it will be defaulted to the APIVersion of the
+ // enclosing object.
+ APIVersion string
+ // Required: Path of the field to select in the specified API version
+ FieldPath string
+}
+
+// ResourceFieldSelector represents container resources (cpu, memory) and their output format
+type ResourceFieldSelector struct {
+ // Container name: required for volumes, optional for env vars
+ // +optional
+ ContainerName string
+ // Required: resource to select
+ Resource string
+ // Specifies the output format of the exposed resources, defaults to "1"
+ // +optional
+ Divisor resource.Quantity
+}
+
+// Selects a key from a ConfigMap.
+type ConfigMapKeySelector struct {
+ // The ConfigMap to select from.
+ LocalObjectReference
+ // The key to select.
+ Key string
+ // Specify whether the ConfigMap or it's key must be defined
+ // +optional
+ Optional *bool
+}
+
+// SecretKeySelector selects a key of a Secret.
+type SecretKeySelector struct {
+ // The name of the secret in the pod's namespace to select from.
+ LocalObjectReference
+ // The key of the secret to select from. Must be a valid secret key.
+ Key string
+ // Specify whether the Secret or it's key must be defined
+ // +optional
+ Optional *bool
+}
+
+// EnvFromSource represents the source of a set of ConfigMaps
+type EnvFromSource struct {
+ // An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.
+ // +optional
+ Prefix string
+ // The ConfigMap to select from.
+ //+optional
+ ConfigMapRef *ConfigMapEnvSource
+ // The Secret to select from.
+ //+optional
+ SecretRef *SecretEnvSource
+}
+
+// ConfigMapEnvSource selects a ConfigMap to populate the environment
+// variables with.
+//
+// The contents of the target ConfigMap's Data field will represent the
+// key-value pairs as environment variables.
+type ConfigMapEnvSource struct {
+ // The ConfigMap to select from.
+ LocalObjectReference
+ // Specify whether the ConfigMap must be defined
+ // +optional
+ Optional *bool
+}
+
+// SecretEnvSource selects a Secret to populate the environment
+// variables with.
+//
+// The contents of the target Secret's Data field will represent the
+// key-value pairs as environment variables.
+type SecretEnvSource struct {
+ // The Secret to select from.
+ LocalObjectReference
+ // Specify whether the Secret must be defined
+ // +optional
+ Optional *bool
+}
+
+// HTTPHeader describes a custom header to be used in HTTP probes
+type HTTPHeader struct {
+ // The header field name
+ Name string
+ // The header field value
+ Value string
+}
+
+// HTTPGetAction describes an action based on HTTP Get requests.
+type HTTPGetAction struct {
+ // Optional: Path to access on the HTTP server.
+ // +optional
+ Path string
+ // Required: Name or number of the port to access on the container.
+ // +optional
+ Port intstr.IntOrString
+ // Optional: Host name to connect to, defaults to the pod IP. You
+ // probably want to set "Host" in httpHeaders instead.
+ // +optional
+ Host string
+ // Optional: Scheme to use for connecting to the host, defaults to HTTP.
+ // +optional
+ Scheme URIScheme
+ // Optional: Custom headers to set in the request. HTTP allows repeated headers.
+ // +optional
+ HTTPHeaders []HTTPHeader
+}
+
+// URIScheme identifies the scheme used for connection to a host for Get actions
+type URIScheme string
+
+const (
+ // URISchemeHTTP means that the scheme used will be http://
+ URISchemeHTTP URIScheme = "HTTP"
+ // URISchemeHTTPS means that the scheme used will be https://
+ URISchemeHTTPS URIScheme = "HTTPS"
+)
+
+// TCPSocketAction describes an action based on opening a socket
+type TCPSocketAction struct {
+ // Required: Port to connect to.
+ // +optional
+ Port intstr.IntOrString
+ // Optional: Host name to connect to, defaults to the pod IP.
+ // +optional
+ Host string
+}
+
+// ExecAction describes a "run in container" action.
+type ExecAction struct {
+ // Command is the command line to execute inside the container, the working directory for the
+ // command is root ('/') in the container's filesystem. The command is simply exec'd, it is
+ // not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use
+ // a shell, you need to explicitly call out to that shell.
+ // +optional
+ Command []string
+}
+
+// Probe describes a health check to be performed against a container to determine whether it is
+// alive or ready to receive traffic.
+type Probe struct {
+ // The action taken to determine the health of a container
+ Handler
+ // Length of time before health checking is activated. In seconds.
+ // +optional
+ InitialDelaySeconds int32
+ // Length of time before health checking times out. In seconds.
+ // +optional
+ TimeoutSeconds int32
+ // How often (in seconds) to perform the probe.
+ // +optional
+ PeriodSeconds int32
+ // Minimum consecutive successes for the probe to be considered successful after having failed.
+ // Must be 1 for liveness.
+ // +optional
+ SuccessThreshold int32
+ // Minimum consecutive failures for the probe to be considered failed after having succeeded.
+ // +optional
+ FailureThreshold int32
+}
+
+// PullPolicy describes a policy for if/when to pull a container image
+type PullPolicy string
+
+const (
+ // PullAlways means that kubelet always attempts to pull the latest image. Container will fail If the pull fails.
+ PullAlways PullPolicy = "Always"
+ // PullNever means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present
+ PullNever PullPolicy = "Never"
+ // PullIfNotPresent means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails.
+ PullIfNotPresent PullPolicy = "IfNotPresent"
+)
+
+// TerminationMessagePolicy describes how termination messages are retrieved from a container.
+type TerminationMessagePolicy string
+
+const (
+ // TerminationMessageReadFile is the default behavior and will set the container status message to
+ // the contents of the container's terminationMessagePath when the container exits.
+ TerminationMessageReadFile TerminationMessagePolicy = "File"
+ // TerminationMessageFallbackToLogsOnError will read the most recent contents of the container logs
+ // for the container status message when the container exits with an error and the
+ // terminationMessagePath has no contents.
+ TerminationMessageFallbackToLogsOnError TerminationMessagePolicy = "FallbackToLogsOnError"
+)
+
+// Capability represent POSIX capabilities type
+type Capability string
+
+// Capabilities represent POSIX capabilities that can be added or removed to a running container.
+type Capabilities struct {
+ // Added capabilities
+ // +optional
+ Add []Capability
+ // Removed capabilities
+ // +optional
+ Drop []Capability
+}
+
+// ResourceRequirements describes the compute resource requirements.
+type ResourceRequirements struct {
+ // Limits describes the maximum amount of compute resources allowed.
+ // +optional
+ Limits ResourceList
+ // Requests describes the minimum amount of compute resources required.
+ // If Request is omitted for a container, it defaults to Limits if that is explicitly specified,
+ // otherwise to an implementation-defined value
+ // +optional
+ Requests ResourceList
+}
+
+// Container represents a single container that is expected to be run on the host.
+type Container struct {
+ // Required: This must be a DNS_LABEL. Each container in a pod must
+ // have a unique name.
+ Name string
+ // Required.
+ Image string
+ // Optional: The docker image's entrypoint is used if this is not provided; cannot be updated.
+ // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
+ // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
+ // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
+ // regardless of whether the variable exists or not.
+ // +optional
+ Command []string
+ // Optional: The docker image's cmd is used if this is not provided; cannot be updated.
+ // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
+ // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
+ // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
+ // regardless of whether the variable exists or not.
+ // +optional
+ Args []string
+ // Optional: Defaults to Docker's default.
+ // +optional
+ WorkingDir string
+ // +optional
+ Ports []ContainerPort
+ // List of sources to populate environment variables in the container.
+ // The keys defined within a source must be a C_IDENTIFIER. All invalid keys
+ // will be reported as an event when the container is starting. When a key exists in multiple
+ // sources, the value associated with the last source will take precedence.
+ // Values defined by an Env with a duplicate key will take precedence.
+ // Cannot be updated.
+ // +optional
+ EnvFrom []EnvFromSource
+ // +optional
+ Env []EnvVar
+ // Compute resource requirements.
+ // +optional
+ Resources ResourceRequirements
+ // +optional
+ VolumeMounts []VolumeMount
+ // +optional
+ LivenessProbe *Probe
+ // +optional
+ ReadinessProbe *Probe
+ // +optional
+ Lifecycle *Lifecycle
+ // Required.
+ // +optional
+ TerminationMessagePath string
+ // +optional
+ TerminationMessagePolicy TerminationMessagePolicy
+ // Required: Policy for pulling images for this container
+ ImagePullPolicy PullPolicy
+ // Optional: SecurityContext defines the security options the container should be run with.
+ // If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.
+ // +optional
+ SecurityContext *SecurityContext
+
+ // Variables for interactive containers, these have very specialized use-cases (e.g. debugging)
+ // and shouldn't be used for general purpose containers.
+ // +optional
+ Stdin bool
+ // +optional
+ StdinOnce bool
+ // +optional
+ TTY bool
+}
+
+// Handler defines a specific action that should be taken
+// TODO: pass structured data to these actions, and document that data here.
+type Handler struct {
+ // One and only one of the following should be specified.
+ // Exec specifies the action to take.
+ // +optional
+ Exec *ExecAction
+ // HTTPGet specifies the http request to perform.
+ // +optional
+ HTTPGet *HTTPGetAction
+ // TCPSocket specifies an action involving a TCP port.
+ // TODO: implement a realistic TCP lifecycle hook
+ // +optional
+ TCPSocket *TCPSocketAction
+}
+
+// Lifecycle describes actions that the management system should take in response to container lifecycle
+// events. For the PostStart and PreStop lifecycle handlers, management of the container blocks
+// until the action is complete, unless the container process fails, in which case the handler is aborted.
+type Lifecycle struct {
+ // PostStart is called immediately after a container is created. If the handler fails, the container
+ // is terminated and restarted.
+ // +optional
+ PostStart *Handler
+ // PreStop is called immediately before a container is terminated. The reason for termination is
+ // passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated.
+ // +optional
+ PreStop *Handler
+}
+
+// The below types are used by kube_client and api_server.
+
+type ConditionStatus string
+
+// These are valid condition statuses. "ConditionTrue" means a resource is in the condition;
+// "ConditionFalse" means a resource is not in the condition; "ConditionUnknown" means kubernetes
+// can't decide if a resource is in the condition or not. In the future, we could add other
+// intermediate conditions, e.g. ConditionDegraded.
+const (
+ ConditionTrue ConditionStatus = "True"
+ ConditionFalse ConditionStatus = "False"
+ ConditionUnknown ConditionStatus = "Unknown"
+)
+
+type ContainerStateWaiting struct {
+ // A brief CamelCase string indicating details about why the container is in waiting state.
+ // +optional
+ Reason string
+ // A human-readable message indicating details about why the container is in waiting state.
+ // +optional
+ Message string
+}
+
+type ContainerStateRunning struct {
+ // +optional
+ StartedAt metav1.Time
+}
+
+type ContainerStateTerminated struct {
+ ExitCode int32
+ // +optional
+ Signal int32
+ // +optional
+ Reason string
+ // +optional
+ Message string
+ // +optional
+ StartedAt metav1.Time
+ // +optional
+ FinishedAt metav1.Time
+ // +optional
+ ContainerID string
+}
+
+// ContainerState holds a possible state of container.
+// Only one of its members may be specified.
+// If none of them is specified, the default one is ContainerStateWaiting.
+type ContainerState struct {
+ // +optional
+ Waiting *ContainerStateWaiting
+ // +optional
+ Running *ContainerStateRunning
+ // +optional
+ Terminated *ContainerStateTerminated
+}
+
+type ContainerStatus struct {
+ // Each container in a pod must have a unique name.
+ Name string
+ // +optional
+ State ContainerState
+ // +optional
+ LastTerminationState ContainerState
+ // Ready specifies whether the container has passed its readiness check.
+ Ready bool
+ // Note that this is calculated from dead containers. But those containers are subject to
+ // garbage collection. This value will get capped at 5 by GC.
+ RestartCount int32
+ Image string
+ ImageID string
+ // +optional
+ ContainerID string
+}
+
+// PodPhase is a label for the condition of a pod at the current time.
+type PodPhase string
+
+// These are the valid statuses of pods.
+const (
+ // PodPending means the pod has been accepted by the system, but one or more of the containers
+ // has not been started. This includes time before being bound to a node, as well as time spent
+ // pulling images onto the host.
+ PodPending PodPhase = "Pending"
+ // PodRunning means the pod has been bound to a node and all of the containers have been started.
+ // At least one container is still running or is in the process of being restarted.
+ PodRunning PodPhase = "Running"
+ // PodSucceeded means that all containers in the pod have voluntarily terminated
+ // with a container exit code of 0, and the system is not going to restart any of these containers.
+ PodSucceeded PodPhase = "Succeeded"
+ // PodFailed means that all containers in the pod have terminated, and at least one container has
+ // terminated in a failure (exited with a non-zero exit code or was stopped by the system).
+ PodFailed PodPhase = "Failed"
+ // PodUnknown means that for some reason the state of the pod could not be obtained, typically due
+ // to an error in communicating with the host of the pod.
+ PodUnknown PodPhase = "Unknown"
+)
+
+type PodConditionType string
+
+// These are valid conditions of pod.
+const (
+ // PodScheduled represents status of the scheduling process for this pod.
+ PodScheduled PodConditionType = "PodScheduled"
+ // PodReady means the pod is able to service requests and should be added to the
+ // load balancing pools of all matching services.
+ PodReady PodConditionType = "Ready"
+ // PodInitialized means that all init containers in the pod have started successfully.
+ PodInitialized PodConditionType = "Initialized"
+ // PodReasonUnschedulable reason in PodScheduled PodCondition means that the scheduler
+ // can't schedule the pod right now, for example due to insufficient resources in the cluster.
+ PodReasonUnschedulable = "Unschedulable"
+)
+
+type PodCondition struct {
+ Type PodConditionType
+ Status ConditionStatus
+ // +optional
+ LastProbeTime metav1.Time
+ // +optional
+ LastTransitionTime metav1.Time
+ // +optional
+ Reason string
+ // +optional
+ Message string
+}
+
+// RestartPolicy describes how the container should be restarted.
+// Only one of the following restart policies may be specified.
+// If none of the following policies is specified, the default one
+// is RestartPolicyAlways.
+type RestartPolicy string
+
+const (
+ RestartPolicyAlways RestartPolicy = "Always"
+ RestartPolicyOnFailure RestartPolicy = "OnFailure"
+ RestartPolicyNever RestartPolicy = "Never"
+)
+
+// PodList is a list of Pods.
+type PodList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []Pod
+}
+
+// DNSPolicy defines how a pod's DNS will be configured.
+type DNSPolicy string
+
+const (
+ // DNSClusterFirstWithHostNet indicates that the pod should use cluster DNS
+ // first, if it is available, then fall back on the default
+ // (as determined by kubelet) DNS settings.
+ DNSClusterFirstWithHostNet DNSPolicy = "ClusterFirstWithHostNet"
+
+ // DNSClusterFirst indicates that the pod should use cluster DNS
+ // first unless hostNetwork is true, if it is available, then
+ // fall back on the default (as determined by kubelet) DNS settings.
+ DNSClusterFirst DNSPolicy = "ClusterFirst"
+
+ // DNSDefault indicates that the pod should use the default (as
+ // determined by kubelet) DNS settings.
+ DNSDefault DNSPolicy = "Default"
+)
+
+// A node selector represents the union of the results of one or more label queries
+// over a set of nodes; that is, it represents the OR of the selectors represented
+// by the node selector terms.
+type NodeSelector struct {
+ //Required. A list of node selector terms. The terms are ORed.
+ NodeSelectorTerms []NodeSelectorTerm
+}
+
+// A null or empty node selector term matches no objects.
+type NodeSelectorTerm struct {
+ //Required. A list of node selector requirements. The requirements are ANDed.
+ MatchExpressions []NodeSelectorRequirement
+}
+
+// A node selector requirement is a selector that contains values, a key, and an operator
+// that relates the key and values.
+type NodeSelectorRequirement struct {
+ // The label key that the selector applies to.
+ Key string
+ // Represents a key's relationship to a set of values.
+ // Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
+ Operator NodeSelectorOperator
+ // An array of string values. If the operator is In or NotIn,
+ // the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ // the values array must be empty. If the operator is Gt or Lt, the values
+ // array must have a single element, which will be interpreted as an integer.
+ // This array is replaced during a strategic merge patch.
+ // +optional
+ Values []string
+}
+
+// A node selector operator is the set of operators that can be used in
+// a node selector requirement.
+type NodeSelectorOperator string
+
+const (
+ NodeSelectorOpIn NodeSelectorOperator = "In"
+ NodeSelectorOpNotIn NodeSelectorOperator = "NotIn"
+ NodeSelectorOpExists NodeSelectorOperator = "Exists"
+ NodeSelectorOpDoesNotExist NodeSelectorOperator = "DoesNotExist"
+ NodeSelectorOpGt NodeSelectorOperator = "Gt"
+ NodeSelectorOpLt NodeSelectorOperator = "Lt"
+)
+
+// Affinity is a group of affinity scheduling rules.
+type Affinity struct {
+ // Describes node affinity scheduling rules for the pod.
+ // +optional
+ NodeAffinity *NodeAffinity
+ // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
+ // +optional
+ PodAffinity *PodAffinity
+ // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
+ // +optional
+ PodAntiAffinity *PodAntiAffinity
+}
+
+// Pod affinity is a group of inter pod affinity scheduling rules.
+type PodAffinity struct {
+ // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented.
+ // If the affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to a pod label update), the
+ // system will try to eventually evict the pod from its node.
+ // When there are multiple elements, the lists of nodes corresponding to each
+ // podAffinityTerm are intersected, i.e. all terms must be satisfied.
+ // +optional
+ // RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm
+ // If the affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to a pod label update), the
+ // system may or may not try to eventually evict the pod from its node.
+ // When there are multiple elements, the lists of nodes corresponding to each
+ // podAffinityTerm are intersected, i.e. all terms must be satisfied.
+ // +optional
+ RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm
+ // The scheduler will prefer to schedule pods to nodes that satisfy
+ // the affinity expressions specified by this field, but it may choose
+ // a node that violates one or more of the expressions. The node that is
+ // most preferred is the one with the greatest sum of weights, i.e.
+ // for each node that meets all of the scheduling requirements (resource
+ // request, requiredDuringScheduling affinity expressions, etc.),
+ // compute a sum by iterating through the elements of this field and adding
+ // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
+ // node(s) with the highest sum are the most preferred.
+ // +optional
+ PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm
+}
+
+// Pod anti affinity is a group of inter pod anti affinity scheduling rules.
+type PodAntiAffinity struct {
+ // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented.
+ // If the anti-affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the anti-affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to a pod label update), the
+ // system will try to eventually evict the pod from its node.
+ // When there are multiple elements, the lists of nodes corresponding to each
+ // podAffinityTerm are intersected, i.e. all terms must be satisfied.
+ // +optional
+ // RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm
+ // If the anti-affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the anti-affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to a pod label update), the
+ // system may or may not try to eventually evict the pod from its node.
+ // When there are multiple elements, the lists of nodes corresponding to each
+ // podAffinityTerm are intersected, i.e. all terms must be satisfied.
+ // +optional
+ RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm
+ // The scheduler will prefer to schedule pods to nodes that satisfy
+ // the anti-affinity expressions specified by this field, but it may choose
+ // a node that violates one or more of the expressions. The node that is
+ // most preferred is the one with the greatest sum of weights, i.e.
+ // for each node that meets all of the scheduling requirements (resource
+ // request, requiredDuringScheduling anti-affinity expressions, etc.),
+ // compute a sum by iterating through the elements of this field and adding
+ // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
+ // node(s) with the highest sum are the most preferred.
+ // +optional
+ PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm
+}
+
+// The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)
+type WeightedPodAffinityTerm struct {
+ // weight associated with matching the corresponding podAffinityTerm,
+ // in the range 1-100.
+ Weight int32
+ // Required. A pod affinity term, associated with the corresponding weight.
+ PodAffinityTerm PodAffinityTerm
+}
+
+// Defines a set of pods (namely those matching the labelSelector
+// relative to the given namespace(s)) that this pod should be
+// co-located (affinity) or not co-located (anti-affinity) with,
+// where co-located is defined as running on a node whose value of
+// the label with key <topologyKey> matches that of any node on which
+// a pod of the set of pods is running.
+type PodAffinityTerm struct {
+ // A label query over a set of resources, in this case pods.
+ // +optional
+ LabelSelector *metav1.LabelSelector
+ // namespaces specifies which namespaces the labelSelector applies to (matches against);
+ // null or empty list means "this pod's namespace"
+ Namespaces []string
+ // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
+ // the labelSelector in the specified namespaces, where co-located is defined as running on a node
+ // whose value of the label with key topologyKey matches that of any node on which any of the
+ // selected pods is running.
+ // For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as "all topologies"
+ // ("all topologies" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains);
+ // for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed.
+ // +optional
+ TopologyKey string
+}
+
+// Node affinity is a group of node affinity scheduling rules.
+type NodeAffinity struct {
+ // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented.
+ // If the affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to an update), the system
+ // will try to eventually evict the pod from its node.
+ // +optional
+ // RequiredDuringSchedulingRequiredDuringExecution *NodeSelector
+
+ // If the affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to an update), the system
+ // may or may not try to eventually evict the pod from its node.
+ // +optional
+ RequiredDuringSchedulingIgnoredDuringExecution *NodeSelector
+ // The scheduler will prefer to schedule pods to nodes that satisfy
+ // the affinity expressions specified by this field, but it may choose
+ // a node that violates one or more of the expressions. The node that is
+ // most preferred is the one with the greatest sum of weights, i.e.
+ // for each node that meets all of the scheduling requirements (resource
+ // request, requiredDuringScheduling affinity expressions, etc.),
+ // compute a sum by iterating through the elements of this field and adding
+ // "weight" to the sum if the node matches the corresponding matchExpressions; the
+ // node(s) with the highest sum are the most preferred.
+ // +optional
+ PreferredDuringSchedulingIgnoredDuringExecution []PreferredSchedulingTerm
+}
+
+// An empty preferred scheduling term matches all objects with implicit weight 0
+// (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).
+type PreferredSchedulingTerm struct {
+ // Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.
+ Weight int32
+ // A node selector term, associated with the corresponding weight.
+ Preference NodeSelectorTerm
+}
+
+// The node this Taint is attached to has the effect "effect" on
+// any pod that that does not tolerate the Taint.
+type Taint struct {
+ // Required. The taint key to be applied to a node.
+ Key string
+ // Required. The taint value corresponding to the taint key.
+ // +optional
+ Value string
+ // Required. The effect of the taint on pods
+ // that do not tolerate the taint.
+ // Valid effects are NoSchedule, PreferNoSchedule and NoExecute.
+ Effect TaintEffect
+ // TimeAdded represents the time at which the taint was added.
+ // It is only written for NoExecute taints.
+ // +optional
+ TimeAdded metav1.Time
+}
+
+type TaintEffect string
+
+const (
+ // Do not allow new pods to schedule onto the node unless they tolerate the taint,
+ // but allow all pods submitted to Kubelet without going through the scheduler
+ // to start, and allow all already-running pods to continue running.
+ // Enforced by the scheduler.
+ TaintEffectNoSchedule TaintEffect = "NoSchedule"
+ // Like TaintEffectNoSchedule, but the scheduler tries not to schedule
+ // new pods onto the node, rather than prohibiting new pods from scheduling
+ // onto the node entirely. Enforced by the scheduler.
+ TaintEffectPreferNoSchedule TaintEffect = "PreferNoSchedule"
+ // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented.
+ // Like TaintEffectNoSchedule, but additionally do not allow pods submitted to
+ // Kubelet without going through the scheduler to start.
+ // Enforced by Kubelet and the scheduler.
+ // TaintEffectNoScheduleNoAdmit TaintEffect = "NoScheduleNoAdmit"
+ // Evict any already-running pods that do not tolerate the taint.
+ // Currently enforced by NodeController.
+ TaintEffectNoExecute TaintEffect = "NoExecute"
+)
+
+// The pod this Toleration is attached to tolerates any taint that matches
+// the triple <key,value,effect> using the matching operator <operator>.
+type Toleration struct {
+ // Key is the taint key that the toleration applies to. Empty means match all taint keys.
+ // If the key is empty, operator must be Exists; this combination means to match all values and all keys.
+ // +optional
+ Key string
+ // Operator represents a key's relationship to the value.
+ // Valid operators are Exists and Equal. Defaults to Equal.
+ // Exists is equivalent to wildcard for value, so that a pod can
+ // tolerate all taints of a particular category.
+ // +optional
+ Operator TolerationOperator
+ // Value is the taint value the toleration matches to.
+ // If the operator is Exists, the value should be empty, otherwise just a regular string.
+ // +optional
+ Value string
+ // Effect indicates the taint effect to match. Empty means match all taint effects.
+ // When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
+ // +optional
+ Effect TaintEffect
+ // TolerationSeconds represents the period of time the toleration (which must be
+ // of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
+ // it is not set, which means tolerate the taint forever (do not evict). Zero and
+ // negative values will be treated as 0 (evict immediately) by the system.
+ // +optional
+ TolerationSeconds *int64
+}
+
+// A toleration operator is the set of operators that can be used in a toleration.
+type TolerationOperator string
+
+const (
+ TolerationOpExists TolerationOperator = "Exists"
+ TolerationOpEqual TolerationOperator = "Equal"
+)
+
+// PodSpec is a description of a pod
+type PodSpec struct {
+ Volumes []Volume
+ // List of initialization containers belonging to the pod.
+ InitContainers []Container
+ // List of containers belonging to the pod.
+ Containers []Container
+ // +optional
+ RestartPolicy RestartPolicy
+ // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request.
+ // Value must be non-negative integer. The value zero indicates delete immediately.
+ // If this value is nil, the default grace period will be used instead.
+ // The grace period is the duration in seconds after the processes running in the pod are sent
+ // a termination signal and the time when the processes are forcibly halted with a kill signal.
+ // Set this value longer than the expected cleanup time for your process.
+ // +optional
+ TerminationGracePeriodSeconds *int64
+ // Optional duration in seconds relative to the StartTime that the pod may be active on a node
+ // before the system actively tries to terminate the pod; value must be positive integer
+ // +optional
+ ActiveDeadlineSeconds *int64
+ // Required: Set DNS policy.
+ // +optional
+ DNSPolicy DNSPolicy
+ // NodeSelector is a selector which must be true for the pod to fit on a node
+ // +optional
+ NodeSelector map[string]string
+
+ // ServiceAccountName is the name of the ServiceAccount to use to run this pod
+ // The pod will be allowed to use secrets referenced by the ServiceAccount
+ ServiceAccountName string
+ // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.
+ // +optional
+ AutomountServiceAccountToken *bool
+
+ // NodeName is a request to schedule this pod onto a specific node. If it is non-empty,
+ // the scheduler simply schedules this pod onto that node, assuming that it fits resource
+ // requirements.
+ // +optional
+ NodeName string
+ // SecurityContext holds pod-level security attributes and common container settings.
+ // Optional: Defaults to empty. See type description for default values of each field.
+ // +optional
+ SecurityContext *PodSecurityContext
+ // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec.
+ // If specified, these secrets will be passed to individual puller implementations for them to use. For example,
+ // in the case of docker, only DockerConfig type secrets are honored.
+ // +optional
+ ImagePullSecrets []LocalObjectReference
+ // Specifies the hostname of the Pod.
+ // If not specified, the pod's hostname will be set to a system-defined value.
+ // +optional
+ Hostname string
+ // If specified, the fully qualified Pod hostname will be "<hostname>.<subdomain>.<pod namespace>.svc.<cluster domain>".
+ // If not specified, the pod will not have a domainname at all.
+ // +optional
+ Subdomain string
+ // If specified, the pod's scheduling constraints
+ // +optional
+ Affinity *Affinity
+ // If specified, the pod will be dispatched by specified scheduler.
+ // If not specified, the pod will be dispatched by default scheduler.
+ // +optional
+ SchedulerName string
+ // If specified, the pod's tolerations.
+ // +optional
+ Tolerations []Toleration
+ // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts
+ // file if specified. This is only valid for non-hostNetwork pods.
+ // +optional
+ HostAliases []HostAlias
+}
+
+// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
+// pod's hosts file.
+type HostAlias struct {
+ IP string
+ Hostnames []string
+}
+
+// Sysctl defines a kernel parameter to be set
+type Sysctl struct {
+ // Name of a property to set
+ Name string
+ // Value of a property to set
+ Value string
+}
+
+// PodSecurityContext holds pod-level security attributes and common container settings.
+// Some fields are also present in container.securityContext. Field values of
+// container.securityContext take precedence over field values of PodSecurityContext.
+type PodSecurityContext struct {
+ // Use the host's network namespace. If this option is set, the ports that will be
+ // used must be specified.
+ // Optional: Default to false
+ // +k8s:conversion-gen=false
+ // +optional
+ HostNetwork bool
+ // Use the host's pid namespace.
+ // Optional: Default to false.
+ // +k8s:conversion-gen=false
+ // +optional
+ HostPID bool
+ // Use the host's ipc namespace.
+ // Optional: Default to false.
+ // +k8s:conversion-gen=false
+ // +optional
+ HostIPC bool
+ // The SELinux context to be applied to all containers.
+ // If unspecified, the container runtime will allocate a random SELinux context for each
+ // container. May also be set in SecurityContext. If set in
+ // both SecurityContext and PodSecurityContext, the value specified in SecurityContext
+ // takes precedence for that container.
+ // +optional
+ SELinuxOptions *SELinuxOptions
+ // The UID to run the entrypoint of the container process.
+ // Defaults to user specified in image metadata if unspecified.
+ // May also be set in SecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence
+ // for that container.
+ // +optional
+ RunAsUser *int64
+ // Indicates that the container must run as a non-root user.
+ // If true, the Kubelet will validate the image at runtime to ensure that it
+ // does not run as UID 0 (root) and fail to start the container if it does.
+ // If unset or false, no such validation will be performed.
+ // May also be set in SecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence.
+ // +optional
+ RunAsNonRoot *bool
+ // A list of groups applied to the first process run in each container, in addition
+ // to the container's primary GID. If unspecified, no groups will be added to
+ // any container.
+ // +optional
+ SupplementalGroups []int64
+ // A special supplemental group that applies to all containers in a pod.
+ // Some volume types allow the Kubelet to change the ownership of that volume
+ // to be owned by the pod:
+ //
+ // 1. The owning GID will be the FSGroup
+ // 2. The setgid bit is set (new files created in the volume will be owned by FSGroup)
+ // 3. The permission bits are OR'd with rw-rw----
+ //
+ // If unset, the Kubelet will not modify the ownership and permissions of any volume.
+ // +optional
+ FSGroup *int64
+}
+
+// PodQOSClass defines the supported qos classes of Pods.
+type PodQOSClass string
+
+const (
+ // PodQOSGuaranteed is the Guaranteed qos class.
+ PodQOSGuaranteed PodQOSClass = "Guaranteed"
+ // PodQOSBurstable is the Burstable qos class.
+ PodQOSBurstable PodQOSClass = "Burstable"
+ // PodQOSBestEffort is the BestEffort qos class.
+ PodQOSBestEffort PodQOSClass = "BestEffort"
+)
+
+// PodStatus represents information about the status of a pod. Status may trail the actual
+// state of a system.
+type PodStatus struct {
+ // +optional
+ Phase PodPhase
+ // +optional
+ Conditions []PodCondition
+ // A human readable message indicating details about why the pod is in this state.
+ // +optional
+ Message string
+ // A brief CamelCase message indicating details about why the pod is in this state. e.g. 'OutOfDisk'
+ // +optional
+ Reason string
+
+ // +optional
+ HostIP string
+ // +optional
+ PodIP string
+
+ // Date and time at which the object was acknowledged by the Kubelet.
+ // This is before the Kubelet pulled the container image(s) for the pod.
+ // +optional
+ StartTime *metav1.Time
+ // +optional
+ QOSClass PodQOSClass
+
+ // The list has one entry per init container in the manifest. The most recent successful
+ // init container will have ready = true, the most recently started container will have
+ // startTime set.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-and-container-status
+ InitContainerStatuses []ContainerStatus
+ // The list has one entry per container in the manifest. Each entry is
+ // currently the output of `docker inspect`. This output format is *not*
+ // final and should not be relied upon.
+ // TODO: Make real decisions about what our info should look like. Re-enable fuzz test
+ // when we have done this.
+ // +optional
+ ContainerStatuses []ContainerStatus
+}
+
+// PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded
+type PodStatusResult struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+ // Status represents the current information about a pod. This data may not be up
+ // to date.
+ // +optional
+ Status PodStatus
+}
+
+// +genclient=true
+
+// Pod is a collection of containers, used as either input (create, update) or as output (list, get).
+type Pod struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Spec defines the behavior of a pod.
+ // +optional
+ Spec PodSpec
+
+ // Status represents the current information about a pod. This data may not be up
+ // to date.
+ // +optional
+ Status PodStatus
+}
+
+// PodTemplateSpec describes the data a pod should have when created from a template
+type PodTemplateSpec struct {
+ // Metadata of the pods created from this template.
+ // +optional
+ metav1.ObjectMeta
+
+ // Spec defines the behavior of a pod.
+ // +optional
+ Spec PodSpec
+}
+
+// +genclient=true
+
+// PodTemplate describes a template for creating copies of a predefined pod.
+type PodTemplate struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Template defines the pods that will be created from this pod template
+ // +optional
+ Template PodTemplateSpec
+}
+
+// PodTemplateList is a list of PodTemplates.
+type PodTemplateList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []PodTemplate
+}
+
+// ReplicationControllerSpec is the specification of a replication controller.
+// As the internal representation of a replication controller, it may have either
+// a TemplateRef or a Template set.
+type ReplicationControllerSpec struct {
+ // Replicas is the number of desired replicas.
+ Replicas int32
+
+ // Minimum number of seconds for which a newly created pod should be ready
+ // without any of its container crashing, for it to be considered available.
+ // Defaults to 0 (pod will be considered available as soon as it is ready)
+ // +optional
+ MinReadySeconds int32
+
+ // Selector is a label query over pods that should match the Replicas count.
+ Selector map[string]string
+
+ // TemplateRef is a reference to an object that describes the pod that will be created if
+ // insufficient replicas are detected. This reference is ignored if a Template is set.
+ // Must be set before converting to a versioned API object
+ // +optional
+ //TemplateRef *ObjectReference
+
+ // Template is the object that describes the pod that will be created if
+ // insufficient replicas are detected. Internally, this takes precedence over a
+ // TemplateRef.
+ // +optional
+ Template *PodTemplateSpec
+}
+
+// ReplicationControllerStatus represents the current status of a replication
+// controller.
+type ReplicationControllerStatus struct {
+ // Replicas is the number of actual replicas.
+ Replicas int32
+
+ // The number of pods that have labels matching the labels of the pod template of the replication controller.
+ // +optional
+ FullyLabeledReplicas int32
+
+ // The number of ready replicas for this replication controller.
+ // +optional
+ ReadyReplicas int32
+
+ // The number of available replicas (ready for at least minReadySeconds) for this replication controller.
+ // +optional
+ AvailableReplicas int32
+
+ // ObservedGeneration is the most recent generation observed by the controller.
+ // +optional
+ ObservedGeneration int64
+
+ // Represents the latest available observations of a replication controller's current state.
+ // +optional
+ Conditions []ReplicationControllerCondition
+}
+
+type ReplicationControllerConditionType string
+
+// These are valid conditions of a replication controller.
+const (
+ // ReplicationControllerReplicaFailure is added in a replication controller when one of its pods
+ // fails to be created due to insufficient quota, limit ranges, pod security policy, node selectors,
+ // etc. or deleted due to kubelet being down or finalizers are failing.
+ ReplicationControllerReplicaFailure ReplicationControllerConditionType = "ReplicaFailure"
+)
+
+// ReplicationControllerCondition describes the state of a replication controller at a certain point.
+type ReplicationControllerCondition struct {
+ // Type of replication controller condition.
+ Type ReplicationControllerConditionType
+ // Status of the condition, one of True, False, Unknown.
+ Status ConditionStatus
+ // The last time the condition transitioned from one status to another.
+ // +optional
+ LastTransitionTime metav1.Time
+ // The reason for the condition's last transition.
+ // +optional
+ Reason string
+ // A human readable message indicating details about the transition.
+ // +optional
+ Message string
+}
+
+// +genclient=true
+
+// ReplicationController represents the configuration of a replication controller.
+type ReplicationController struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Spec defines the desired behavior of this replication controller.
+ // +optional
+ Spec ReplicationControllerSpec
+
+ // Status is the current status of this replication controller. This data may be
+ // out of date by some window of time.
+ // +optional
+ Status ReplicationControllerStatus
+}
+
+// ReplicationControllerList is a collection of replication controllers.
+type ReplicationControllerList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []ReplicationController
+}
+
+const (
+ // ClusterIPNone - do not assign a cluster IP
+ // no proxying required and no environment variables should be created for pods
+ ClusterIPNone = "None"
+)
+
+// ServiceList holds a list of services.
+type ServiceList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []Service
+}
+
+// Session Affinity Type string
+type ServiceAffinity string
+
+const (
+ // ServiceAffinityClientIP is the Client IP based.
+ ServiceAffinityClientIP ServiceAffinity = "ClientIP"
+
+ // ServiceAffinityNone - no session affinity.
+ ServiceAffinityNone ServiceAffinity = "None"
+)
+
+// Service Type string describes ingress methods for a service
+type ServiceType string
+
+const (
+ // ServiceTypeClusterIP means a service will only be accessible inside the
+ // cluster, via the ClusterIP.
+ ServiceTypeClusterIP ServiceType = "ClusterIP"
+
+ // ServiceTypeNodePort means a service will be exposed on one port of
+ // every node, in addition to 'ClusterIP' type.
+ ServiceTypeNodePort ServiceType = "NodePort"
+
+ // ServiceTypeLoadBalancer means a service will be exposed via an
+ // external load balancer (if the cloud provider supports it), in addition
+ // to 'NodePort' type.
+ ServiceTypeLoadBalancer ServiceType = "LoadBalancer"
+
+ // ServiceTypeExternalName means a service consists of only a reference to
+ // an external name that kubedns or equivalent will return as a CNAME
+ // record, with no exposing or proxying of any pods involved.
+ ServiceTypeExternalName ServiceType = "ExternalName"
+)
+
+// Service External Traffic Policy Type string
+type ServiceExternalTrafficPolicyType string
+
+const (
+ // ServiceExternalTrafficPolicyTypeLocal specifies node-local endpoints behavior.
+ ServiceExternalTrafficPolicyTypeLocal ServiceExternalTrafficPolicyType = "Local"
+ // ServiceExternalTrafficPolicyTypeCluster specifies cluster-wide (legacy) behavior.
+ ServiceExternalTrafficPolicyTypeCluster ServiceExternalTrafficPolicyType = "Cluster"
+)
+
+// ServiceStatus represents the current status of a service
+type ServiceStatus struct {
+ // LoadBalancer contains the current status of the load-balancer,
+ // if one is present.
+ // +optional
+ LoadBalancer LoadBalancerStatus
+}
+
+// LoadBalancerStatus represents the status of a load-balancer
+type LoadBalancerStatus struct {
+ // Ingress is a list containing ingress points for the load-balancer;
+ // traffic intended for the service should be sent to these ingress points.
+ // +optional
+ Ingress []LoadBalancerIngress
+}
+
+// LoadBalancerIngress represents the status of a load-balancer ingress point:
+// traffic intended for the service should be sent to an ingress point.
+type LoadBalancerIngress struct {
+ // IP is set for load-balancer ingress points that are IP based
+ // (typically GCE or OpenStack load-balancers)
+ // +optional
+ IP string
+
+ // Hostname is set for load-balancer ingress points that are DNS based
+ // (typically AWS load-balancers)
+ // +optional
+ Hostname string
+}
+
+// ServiceSpec describes the attributes that a user creates on a service
+type ServiceSpec struct {
+ // Type determines how the Service is exposed. Defaults to ClusterIP. Valid
+ // options are ExternalName, ClusterIP, NodePort, and LoadBalancer.
+ // "ExternalName" maps to the specified externalName.
+ // "ClusterIP" allocates a cluster-internal IP address for load-balancing to
+ // endpoints. Endpoints are determined by the selector or if that is not
+ // specified, by manual construction of an Endpoints object. If clusterIP is
+ // "None", no virtual IP is allocated and the endpoints are published as a
+ // set of endpoints rather than a stable IP.
+ // "NodePort" builds on ClusterIP and allocates a port on every node which
+ // routes to the clusterIP.
+ // "LoadBalancer" builds on NodePort and creates an
+ // external load-balancer (if supported in the current cloud) which routes
+ // to the clusterIP.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/
+ // +optional
+ Type ServiceType
+
+ // Required: The list of ports that are exposed by this service.
+ Ports []ServicePort
+
+ // Route service traffic to pods with label keys and values matching this
+ // selector. If empty or not present, the service is assumed to have an
+ // external process managing its endpoints, which Kubernetes will not
+ // modify. Only applies to types ClusterIP, NodePort, and LoadBalancer.
+ // Ignored if type is ExternalName.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/
+ Selector map[string]string
+
+ // ClusterIP is the IP address of the service and is usually assigned
+ // randomly by the master. If an address is specified manually and is not in
+ // use by others, it will be allocated to the service; otherwise, creation
+ // of the service will fail. This field can not be changed through updates.
+ // Valid values are "None", empty string (""), or a valid IP address. "None"
+ // can be specified for headless services when proxying is not required.
+ // Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if
+ // type is ExternalName.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
+ // +optional
+ ClusterIP string
+
+ // ExternalName is the external reference that kubedns or equivalent will
+ // return as a CNAME record for this service. No proxying will be involved.
+ // Must be a valid DNS name and requires Type to be ExternalName.
+ ExternalName string
+
+ // ExternalIPs are used by external load balancers, or can be set by
+ // users to handle external traffic that arrives at a node.
+ // +optional
+ ExternalIPs []string
+
+ // Only applies to Service Type: LoadBalancer
+ // LoadBalancer will get created with the IP specified in this field.
+ // This feature depends on whether the underlying cloud-provider supports specifying
+ // the loadBalancerIP when a load balancer is created.
+ // This field will be ignored if the cloud-provider does not support the feature.
+ // +optional
+ LoadBalancerIP string
+
+ // Optional: Supports "ClientIP" and "None". Used to maintain session affinity.
+ // +optional
+ SessionAffinity ServiceAffinity
+
+ // Optional: If specified and supported by the platform, this will restrict traffic through the cloud-provider
+ // load-balancer will be restricted to the specified client IPs. This field will be ignored if the
+ // cloud-provider does not support the feature."
+ // +optional
+ LoadBalancerSourceRanges []string
+
+ // externalTrafficPolicy denotes if this Service desires to route external
+ // traffic to node-local or cluster-wide endpoints. "Local" preserves the
+ // client source IP and avoids a second hop for LoadBalancer and Nodeport
+ // type services, but risks potentially imbalanced traffic spreading.
+ // "Cluster" obscures the client source IP and may cause a second hop to
+ // another node, but should have good overall load-spreading.
+ // +optional
+ ExternalTrafficPolicy ServiceExternalTrafficPolicyType
+
+ // healthCheckNodePort specifies the healthcheck nodePort for the service.
+ // If not specified, HealthCheckNodePort is created by the service api
+ // backend with the allocated nodePort. Will use user-specified nodePort value
+ // if specified by the client. Only effects when Type is set to LoadBalancer
+ // and ExternalTrafficPolicy is set to Local.
+ // +optional
+ HealthCheckNodePort int32
+}
+
+type ServicePort struct {
+ // Optional if only one ServicePort is defined on this service: The
+ // name of this port within the service. This must be a DNS_LABEL.
+ // All ports within a ServiceSpec must have unique names. This maps to
+ // the 'Name' field in EndpointPort objects.
+ Name string
+
+ // The IP protocol for this port. Supports "TCP" and "UDP".
+ Protocol Protocol
+
+ // The port that will be exposed on the service.
+ Port int32
+
+ // Optional: The target port on pods selected by this service. If this
+ // is a string, it will be looked up as a named port in the target
+ // Pod's container ports. If this is not specified, the value
+ // of the 'port' field is used (an identity map).
+ // This field is ignored for services with clusterIP=None, and should be
+ // omitted or set equal to the 'port' field.
+ TargetPort intstr.IntOrString
+
+ // The port on each node on which this service is exposed.
+ // Default is to auto-allocate a port if the ServiceType of this Service requires one.
+ NodePort int32
+}
+
+// +genclient=true
+
+// Service is a named abstraction of software service (for example, mysql) consisting of local port
+// (for example 3306) that the proxy listens on, and the selector that determines which pods
+// will answer requests sent through the proxy.
+type Service struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Spec defines the behavior of a service.
+ // +optional
+ Spec ServiceSpec
+
+ // Status represents the current status of a service.
+ // +optional
+ Status ServiceStatus
+}
+
+// +genclient=true
+
+// ServiceAccount binds together:
+// * a name, understood by users, and perhaps by peripheral systems, for an identity
+// * a principal that can be authenticated and authorized
+// * a set of secrets
+type ServiceAccount struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount
+ Secrets []ObjectReference
+
+ // ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images
+ // in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets
+ // can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet.
+ // +optional
+ ImagePullSecrets []LocalObjectReference
+
+ // AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted.
+ // Can be overridden at the pod level.
+ // +optional
+ AutomountServiceAccountToken *bool
+}
+
+// ServiceAccountList is a list of ServiceAccount objects
+type ServiceAccountList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []ServiceAccount
+}
+
+// +genclient=true
+
+// Endpoints is a collection of endpoints that implement the actual service. Example:
+// Name: "mysvc",
+// Subsets: [
+// {
+// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
+// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
+// },
+// {
+// Addresses: [{"ip": "10.10.3.3"}],
+// Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}]
+// },
+// ]
+type Endpoints struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // The set of all endpoints is the union of all subsets.
+ Subsets []EndpointSubset
+}
+
+// EndpointSubset is a group of addresses with a common set of ports. The
+// expanded set of endpoints is the Cartesian product of Addresses x Ports.
+// For example, given:
+// {
+// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
+// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
+// }
+// The resulting set of endpoints can be viewed as:
+// a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],
+// b: [ 10.10.1.1:309, 10.10.2.2:309 ]
+type EndpointSubset struct {
+ Addresses []EndpointAddress
+ NotReadyAddresses []EndpointAddress
+ Ports []EndpointPort
+}
+
+// EndpointAddress is a tuple that describes single IP address.
+type EndpointAddress struct {
+ // The IP of this endpoint.
+ // IPv6 is also accepted but not fully supported on all platforms. Also, certain
+ // kubernetes components, like kube-proxy, are not IPv6 ready.
+ // TODO: This should allow hostname or IP, see #4447.
+ IP string
+ // Optional: Hostname of this endpoint
+ // Meant to be used by DNS servers etc.
+ // +optional
+ Hostname string
+ // Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.
+ // +optional
+ NodeName *string
+ // Optional: The kubernetes object related to the entry point.
+ TargetRef *ObjectReference
+}
+
+// EndpointPort is a tuple that describes a single port.
+type EndpointPort struct {
+ // The name of this port (corresponds to ServicePort.Name). Optional
+ // if only one port is defined. Must be a DNS_LABEL.
+ Name string
+
+ // The port number.
+ Port int32
+
+ // The IP protocol for this port.
+ Protocol Protocol
+}
+
+// EndpointsList is a list of endpoints.
+type EndpointsList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []Endpoints
+}
+
+// NodeSpec describes the attributes that a node is created with.
+type NodeSpec struct {
+ // PodCIDR represents the pod IP range assigned to the node
+ // Note: assigning IP ranges to nodes might need to be revisited when we support migratable IPs.
+ // +optional
+ PodCIDR string
+
+ // External ID of the node assigned by some machine database (e.g. a cloud provider)
+ // +optional
+ ExternalID string
+
+ // ID of the node assigned by the cloud provider
+ // Note: format is "<ProviderName>://<ProviderSpecificNodeID>"
+ // +optional
+ ProviderID string
+
+ // Unschedulable controls node schedulability of new pods. By default node is schedulable.
+ // +optional
+ Unschedulable bool
+
+ // If specified, the node's taints.
+ // +optional
+ Taints []Taint
+}
+
+// DaemonEndpoint contains information about a single Daemon endpoint.
+type DaemonEndpoint struct {
+ /*
+ The port tag was not properly in quotes in earlier releases, so it must be
+ uppercased for backwards compat (since it was falling back to var name of
+ 'Port').
+ */
+
+ // Port number of the given endpoint.
+ Port int32
+}
+
+// NodeDaemonEndpoints lists ports opened by daemons running on the Node.
+type NodeDaemonEndpoints struct {
+ // Endpoint on which Kubelet is listening.
+ // +optional
+ KubeletEndpoint DaemonEndpoint
+}
+
+// NodeSystemInfo is a set of ids/uuids to uniquely identify the node.
+type NodeSystemInfo struct {
+ // MachineID reported by the node. For unique machine identification
+ // in the cluster this field is preferred. Learn more from man(5)
+ // machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html
+ MachineID string
+ // SystemUUID reported by the node. For unique machine identification
+ // MachineID is preferred. This field is specific to Red Hat hosts
+ // https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html
+ SystemUUID string
+ // Boot ID reported by the node.
+ BootID string
+ // Kernel Version reported by the node.
+ KernelVersion string
+ // OS Image reported by the node.
+ OSImage string
+ // ContainerRuntime Version reported by the node.
+ ContainerRuntimeVersion string
+ // Kubelet Version reported by the node.
+ KubeletVersion string
+ // KubeProxy Version reported by the node.
+ KubeProxyVersion string
+ // The Operating System reported by the node
+ OperatingSystem string
+ // The Architecture reported by the node
+ Architecture string
+}
+
+// NodeStatus is information about the current status of a node.
+type NodeStatus struct {
+ // Capacity represents the total resources of a node.
+ // +optional
+ Capacity ResourceList
+ // Allocatable represents the resources of a node that are available for scheduling.
+ // +optional
+ Allocatable ResourceList
+ // NodePhase is the current lifecycle phase of the node.
+ // +optional
+ Phase NodePhase
+ // Conditions is an array of current node conditions.
+ // +optional
+ Conditions []NodeCondition
+ // Queried from cloud provider, if available.
+ // +optional
+ Addresses []NodeAddress
+ // Endpoints of daemons running on the Node.
+ // +optional
+ DaemonEndpoints NodeDaemonEndpoints
+ // Set of ids/uuids to uniquely identify the node.
+ // +optional
+ NodeInfo NodeSystemInfo
+ // List of container images on this node
+ // +optional
+ Images []ContainerImage
+ // List of attachable volumes in use (mounted) by the node.
+ // +optional
+ VolumesInUse []UniqueVolumeName
+ // List of volumes that are attached to the node.
+ // +optional
+ VolumesAttached []AttachedVolume
+}
+
+type UniqueVolumeName string
+
+// AttachedVolume describes a volume attached to a node
+type AttachedVolume struct {
+ // Name of the attached volume
+ Name UniqueVolumeName
+
+ // DevicePath represents the device path where the volume should be available
+ DevicePath string
+}
+
+// AvoidPods describes pods that should avoid this node. This is the value for a
+// Node annotation with key scheduler.alpha.kubernetes.io/preferAvoidPods and
+// will eventually become a field of NodeStatus.
+type AvoidPods struct {
+ // Bounded-sized list of signatures of pods that should avoid this node, sorted
+ // in timestamp order from oldest to newest. Size of the slice is unspecified.
+ // +optional
+ PreferAvoidPods []PreferAvoidPodsEntry
+}
+
+// Describes a class of pods that should avoid this node.
+type PreferAvoidPodsEntry struct {
+ // The class of pods.
+ PodSignature PodSignature
+ // Time at which this entry was added to the list.
+ // +optional
+ EvictionTime metav1.Time
+ // (brief) reason why this entry was added to the list.
+ // +optional
+ Reason string
+ // Human readable message indicating why this entry was added to the list.
+ // +optional
+ Message string
+}
+
+// Describes the class of pods that should avoid this node.
+// Exactly one field should be set.
+type PodSignature struct {
+ // Reference to controller whose pods should avoid this node.
+ // +optional
+ PodController *metav1.OwnerReference
+}
+
+// Describe a container image
+type ContainerImage struct {
+ // Names by which this image is known.
+ Names []string
+ // The size of the image in bytes.
+ // +optional
+ SizeBytes int64
+}
+
+type NodePhase string
+
+// These are the valid phases of node.
+const (
+ // NodePending means the node has been created/added by the system, but not configured.
+ NodePending NodePhase = "Pending"
+ // NodeRunning means the node has been configured and has Kubernetes components running.
+ NodeRunning NodePhase = "Running"
+ // NodeTerminated means the node has been removed from the cluster.
+ NodeTerminated NodePhase = "Terminated"
+)
+
+type NodeConditionType string
+
+// These are valid conditions of node. Currently, we don't have enough information to decide
+// node condition. In the future, we will add more. The proposed set of conditions are:
+// NodeReady, NodeReachable
+const (
+ // NodeReady means kubelet is healthy and ready to accept pods.
+ NodeReady NodeConditionType = "Ready"
+ // NodeOutOfDisk means the kubelet will not accept new pods due to insufficient free disk
+ // space on the node.
+ NodeOutOfDisk NodeConditionType = "OutOfDisk"
+ // NodeMemoryPressure means the kubelet is under pressure due to insufficient available memory.
+ NodeMemoryPressure NodeConditionType = "MemoryPressure"
+ // NodeDiskPressure means the kubelet is under pressure due to insufficient available disk.
+ NodeDiskPressure NodeConditionType = "DiskPressure"
+ // NodeNetworkUnavailable means that network for the node is not correctly configured.
+ NodeNetworkUnavailable NodeConditionType = "NetworkUnavailable"
+)
+
+type NodeCondition struct {
+ Type NodeConditionType
+ Status ConditionStatus
+ // +optional
+ LastHeartbeatTime metav1.Time
+ // +optional
+ LastTransitionTime metav1.Time
+ // +optional
+ Reason string
+ // +optional
+ Message string
+}
+
+type NodeAddressType string
+
+const (
+ NodeHostName NodeAddressType = "Hostname"
+ NodeExternalIP NodeAddressType = "ExternalIP"
+ NodeInternalIP NodeAddressType = "InternalIP"
+ NodeExternalDNS NodeAddressType = "ExternalDNS"
+ NodeInternalDNS NodeAddressType = "InternalDNS"
+)
+
+type NodeAddress struct {
+ Type NodeAddressType
+ Address string
+}
+
+// NodeResources is an object for conveying resource information about a node.
+// see http://releases.k8s.io/HEAD/docs/design/resources.md for more details.
+type NodeResources struct {
+ // Capacity represents the available resources of a node
+ // +optional
+ Capacity ResourceList
+}
+
+// ResourceName is the name identifying various resources in a ResourceList.
+type ResourceName string
+
+// Resource names must be not more than 63 characters, consisting of upper- or lower-case alphanumeric characters,
+// with the -, _, and . characters allowed anywhere, except the first or last character.
+// The default convention, matching that for annotations, is to use lower-case names, with dashes, rather than
+// camel case, separating compound words.
+// Fully-qualified resource typenames are constructed from a DNS-style subdomain, followed by a slash `/` and a name.
+const (
+ // CPU, in cores. (500m = .5 cores)
+ ResourceCPU ResourceName = "cpu"
+ // Memory, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
+ ResourceMemory ResourceName = "memory"
+ // Volume size, in bytes (e,g. 5Gi = 5GiB = 5 * 1024 * 1024 * 1024)
+ ResourceStorage ResourceName = "storage"
+ // Local Storage for overlay filesystem, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
+ // The resource name for ResourceStorageOverlay is alpha and it can change across releases.
+ ResourceStorageOverlay ResourceName = "storage.kubernetes.io/overlay"
+ // Local Storage for scratch space, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
+ // The resource name for ResourceStorageScratch is alpha and it can change across releases.
+ ResourceStorageScratch ResourceName = "storage.kubernetes.io/scratch"
+ // NVIDIA GPU, in devices. Alpha, might change: although fractional and allowing values >1, only one whole device per node is assigned.
+ ResourceNvidiaGPU ResourceName = "alpha.kubernetes.io/nvidia-gpu"
+ // Number of Pods that may be running on this Node: see ResourcePods
+)
+
+const (
+ // Namespace prefix for opaque counted resources (alpha).
+ ResourceOpaqueIntPrefix = "pod.alpha.kubernetes.io/opaque-int-resource-"
+)
+
+// ResourceList is a set of (resource name, quantity) pairs.
+type ResourceList map[ResourceName]resource.Quantity
+
+// +genclient=true
+// +nonNamespaced=true
+
+// Node is a worker node in Kubernetes
+// The name of the node according to etcd is in ObjectMeta.Name.
+type Node struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Spec defines the behavior of a node.
+ // +optional
+ Spec NodeSpec
+
+ // Status describes the current status of a Node
+ // +optional
+ Status NodeStatus
+}
+
+// NodeList is a list of nodes.
+type NodeList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []Node
+}
+
+// NamespaceSpec describes the attributes on a Namespace
+type NamespaceSpec struct {
+ // Finalizers is an opaque list of values that must be empty to permanently remove object from storage
+ Finalizers []FinalizerName
+}
+
+// FinalizerName is the name identifying a finalizer during namespace lifecycle.
+type FinalizerName string
+
+// These are internal finalizer values to Kubernetes, must be qualified name unless defined here or
+// in metav1.
+const (
+ FinalizerKubernetes FinalizerName = "kubernetes"
+)
+
+// NamespaceStatus is information about the current status of a Namespace.
+type NamespaceStatus struct {
+ // Phase is the current lifecycle phase of the namespace.
+ // +optional
+ Phase NamespacePhase
+}
+
+type NamespacePhase string
+
+// These are the valid phases of a namespace.
+const (
+ // NamespaceActive means the namespace is available for use in the system
+ NamespaceActive NamespacePhase = "Active"
+ // NamespaceTerminating means the namespace is undergoing graceful termination
+ NamespaceTerminating NamespacePhase = "Terminating"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+
+// A namespace provides a scope for Names.
+// Use of multiple namespaces is optional
+type Namespace struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Spec defines the behavior of the Namespace.
+ // +optional
+ Spec NamespaceSpec
+
+ // Status describes the current status of a Namespace
+ // +optional
+ Status NamespaceStatus
+}
+
+// NamespaceList is a list of Namespaces.
+type NamespaceList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []Namespace
+}
+
+// Binding ties one object to another; for example, a pod is bound to a node by a scheduler.
+// Deprecated in 1.7, please use the bindings subresource of pods instead.
+type Binding struct {
+ metav1.TypeMeta
+ // ObjectMeta describes the object that is being bound.
+ // +optional
+ metav1.ObjectMeta
+
+ // Target is the object to bind to.
+ Target ObjectReference
+}
+
+// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
+type Preconditions struct {
+ // Specifies the target UID.
+ // +optional
+ UID *types.UID
+}
+
+// DeletionPropagation decides whether and how garbage collection will be performed.
+type DeletionPropagation string
+
+const (
+ // Orphans the dependents.
+ DeletePropagationOrphan DeletionPropagation = "Orphan"
+ // Deletes the object from the key-value store, the garbage collector will delete the dependents in the background.
+ DeletePropagationBackground DeletionPropagation = "Background"
+ // The object exists in the key-value store until the garbage collector deletes all the dependents whose ownerReference.blockOwnerDeletion=true from the key-value store.
+ // API sever will put the "DeletingDependents" finalizer on the object, and sets its deletionTimestamp.
+ // This policy is cascading, i.e., the dependents will be deleted with Foreground.
+ DeletePropagationForeground DeletionPropagation = "Foreground"
+)
+
+// DeleteOptions may be provided when deleting an API object
+// DEPRECATED: This type has been moved to meta/v1 and will be removed soon.
+type DeleteOptions struct {
+ metav1.TypeMeta
+
+ // Optional duration in seconds before the object should be deleted. Value must be non-negative integer.
+ // The value zero indicates delete immediately. If this value is nil, the default grace period for the
+ // specified type will be used.
+ // +optional
+ GracePeriodSeconds *int64
+
+ // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be
+ // returned.
+ // +optional
+ Preconditions *Preconditions
+
+ // Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7.
+ // Should the dependent objects be orphaned. If true/false, the "orphan"
+ // finalizer will be added to/removed from the object's finalizers list.
+ // Either this field or PropagationPolicy may be set, but not both.
+ // +optional
+ OrphanDependents *bool
+
+ // Whether and how garbage collection will be performed.
+ // Either this field or OrphanDependents may be set, but not both.
+ // The default policy is decided by the existing finalizer set in the
+ // metadata.finalizers and the resource-specific default policy.
+ // +optional
+ PropagationPolicy *DeletionPropagation
+}
+
+// ListOptions is the query options to a standard REST list call, and has future support for
+// watch calls.
+// DEPRECATED: This type has been moved to meta/v1 and will be removed soon.
+type ListOptions struct {
+ metav1.TypeMeta
+
+ // A selector based on labels
+ LabelSelector labels.Selector
+ // A selector based on fields
+ FieldSelector fields.Selector
+
+ // If true, partially initialized resources are included in the response.
+ IncludeUninitialized bool
+
+ // If true, watch for changes to this list
+ Watch bool
+ // When specified with a watch call, shows changes that occur after that particular version of a resource.
+ // Defaults to changes from the beginning of history.
+ // When specified for list:
+ // - if unset, then the result is returned from remote storage based on quorum-read flag;
+ // - if it's 0, then we simply return what we currently have in cache, no guarantee;
+ // - if set to non zero, then the result is at least as fresh as given rv.
+ ResourceVersion string
+ // Timeout for the list/watch call.
+ TimeoutSeconds *int64
+}
+
+// PodLogOptions is the query options for a Pod's logs REST call
+type PodLogOptions struct {
+ metav1.TypeMeta
+
+ // Container for which to return logs
+ Container string
+ // If true, follow the logs for the pod
+ Follow bool
+ // If true, return previous terminated container logs
+ Previous bool
+ // A relative time in seconds before the current time from which to show logs. If this value
+ // precedes the time a pod was started, only logs since the pod start will be returned.
+ // If this value is in the future, no logs will be returned.
+ // Only one of sinceSeconds or sinceTime may be specified.
+ SinceSeconds *int64
+ // An RFC3339 timestamp from which to show logs. If this value
+ // precedes the time a pod was started, only logs since the pod start will be returned.
+ // If this value is in the future, no logs will be returned.
+ // Only one of sinceSeconds or sinceTime may be specified.
+ SinceTime *metav1.Time
+ // If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line
+ // of log output.
+ Timestamps bool
+ // If set, the number of lines from the end of the logs to show. If not specified,
+ // logs are shown from the creation of the container or sinceSeconds or sinceTime
+ TailLines *int64
+ // If set, the number of bytes to read from the server before terminating the
+ // log output. This may not display a complete final line of logging, and may return
+ // slightly more or slightly less than the specified limit.
+ LimitBytes *int64
+}
+
+// PodAttachOptions is the query options to a Pod's remote attach call
+// TODO: merge w/ PodExecOptions below for stdin, stdout, etc
+type PodAttachOptions struct {
+ metav1.TypeMeta
+
+ // Stdin if true indicates that stdin is to be redirected for the attach call
+ // +optional
+ Stdin bool
+
+ // Stdout if true indicates that stdout is to be redirected for the attach call
+ // +optional
+ Stdout bool
+
+ // Stderr if true indicates that stderr is to be redirected for the attach call
+ // +optional
+ Stderr bool
+
+ // TTY if true indicates that a tty will be allocated for the attach call
+ // +optional
+ TTY bool
+
+ // Container to attach to.
+ // +optional
+ Container string
+}
+
+// PodExecOptions is the query options to a Pod's remote exec call
+type PodExecOptions struct {
+ metav1.TypeMeta
+
+ // Stdin if true indicates that stdin is to be redirected for the exec call
+ Stdin bool
+
+ // Stdout if true indicates that stdout is to be redirected for the exec call
+ Stdout bool
+
+ // Stderr if true indicates that stderr is to be redirected for the exec call
+ Stderr bool
+
+ // TTY if true indicates that a tty will be allocated for the exec call
+ TTY bool
+
+ // Container in which to execute the command.
+ Container string
+
+ // Command is the remote command to execute; argv array; not executed within a shell.
+ Command []string
+}
+
+// PodPortForwardOptions is the query options to a Pod's port forward call
+type PodPortForwardOptions struct {
+ metav1.TypeMeta
+
+ // The list of ports to forward
+ // +optional
+ Ports []int32
+}
+
+// PodProxyOptions is the query options to a Pod's proxy call
+type PodProxyOptions struct {
+ metav1.TypeMeta
+
+ // Path is the URL path to use for the current proxy request
+ Path string
+}
+
+// NodeProxyOptions is the query options to a Node's proxy call
+type NodeProxyOptions struct {
+ metav1.TypeMeta
+
+ // Path is the URL path to use for the current proxy request
+ Path string
+}
+
+// ServiceProxyOptions is the query options to a Service's proxy call.
+type ServiceProxyOptions struct {
+ metav1.TypeMeta
+
+ // Path is the part of URLs that include service endpoints, suffixes,
+ // and parameters to use for the current proxy request to service.
+ // For example, the whole request URL is
+ // http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy.
+ // Path is _search?q=user:kimchy.
+ Path string
+}
+
+// ObjectReference contains enough information to let you inspect or modify the referred object.
+type ObjectReference struct {
+ // +optional
+ Kind string
+ // +optional
+ Namespace string
+ // +optional
+ Name string
+ // +optional
+ UID types.UID
+ // +optional
+ APIVersion string
+ // +optional
+ ResourceVersion string
+
+ // Optional. If referring to a piece of an object instead of an entire object, this string
+ // should contain information to identify the sub-object. For example, if the object
+ // reference is to a container within a pod, this would take on a value like:
+ // "spec.containers{name}" (where "name" refers to the name of the container that triggered
+ // the event) or if no container name is specified "spec.containers[2]" (container with
+ // index 2 in this pod). This syntax is chosen only to have some well-defined way of
+ // referencing a part of an object.
+ // TODO: this design is not final and this field is subject to change in the future.
+ // +optional
+ FieldPath string
+}
+
+// LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
+type LocalObjectReference struct {
+ //TODO: Add other useful fields. apiVersion, kind, uid?
+ Name string
+}
+
+type SerializedReference struct {
+ metav1.TypeMeta
+ // +optional
+ Reference ObjectReference
+}
+
+type EventSource struct {
+ // Component from which the event is generated.
+ // +optional
+ Component string
+ // Node name on which the event is generated.
+ // +optional
+ Host string
+}
+
+// Valid values for event types (new types could be added in future)
+const (
+ // Information only and will not cause any problems
+ EventTypeNormal string = "Normal"
+ // These events are to warn that something might go wrong
+ EventTypeWarning string = "Warning"
+)
+
+// +genclient=true
+
+// Event is a report of an event somewhere in the cluster.
+// TODO: Decide whether to store these separately or with the object they apply to.
+type Event struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Required. The object that this event is about.
+ // +optional
+ InvolvedObject ObjectReference
+
+ // Optional; this should be a short, machine understandable string that gives the reason
+ // for this event being generated. For example, if the event is reporting that a container
+ // can't start, the Reason might be "ImageNotFound".
+ // TODO: provide exact specification for format.
+ // +optional
+ Reason string
+
+ // Optional. A human-readable description of the status of this operation.
+ // TODO: decide on maximum length.
+ // +optional
+ Message string
+
+ // Optional. The component reporting this event. Should be a short machine understandable string.
+ // +optional
+ Source EventSource
+
+ // The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)
+ // +optional
+ FirstTimestamp metav1.Time
+
+ // The time at which the most recent occurrence of this event was recorded.
+ // +optional
+ LastTimestamp metav1.Time
+
+ // The number of times this event has occurred.
+ // +optional
+ Count int32
+
+ // Type of this event (Normal, Warning), new types could be added in the future.
+ // +optional
+ Type string
+}
+
+// EventList is a list of events.
+type EventList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []Event
+}
+
+// List holds a list of objects, which may not be known by the server.
+type List struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []runtime.Object
+}
+
+// A type of object that is limited
+type LimitType string
+
+const (
+ // Limit that applies to all pods in a namespace
+ LimitTypePod LimitType = "Pod"
+ // Limit that applies to all containers in a namespace
+ LimitTypeContainer LimitType = "Container"
+ // Limit that applies to all persistent volume claims in a namespace
+ LimitTypePersistentVolumeClaim LimitType = "PersistentVolumeClaim"
+)
+
+// LimitRangeItem defines a min/max usage limit for any resource that matches on kind
+type LimitRangeItem struct {
+ // Type of resource that this limit applies to
+ // +optional
+ Type LimitType
+ // Max usage constraints on this kind by resource name
+ // +optional
+ Max ResourceList
+ // Min usage constraints on this kind by resource name
+ // +optional
+ Min ResourceList
+ // Default resource requirement limit value by resource name.
+ // +optional
+ Default ResourceList
+ // DefaultRequest resource requirement request value by resource name.
+ // +optional
+ DefaultRequest ResourceList
+ // MaxLimitRequestRatio represents the max burst value for the named resource
+ // +optional
+ MaxLimitRequestRatio ResourceList
+}
+
+// LimitRangeSpec defines a min/max usage limit for resources that match on kind
+type LimitRangeSpec struct {
+ // Limits is the list of LimitRangeItem objects that are enforced
+ Limits []LimitRangeItem
+}
+
+// +genclient=true
+
+// LimitRange sets resource usage limits for each kind of resource in a Namespace
+type LimitRange struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Spec defines the limits enforced
+ // +optional
+ Spec LimitRangeSpec
+}
+
+// LimitRangeList is a list of LimitRange items.
+type LimitRangeList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ // Items is a list of LimitRange objects
+ Items []LimitRange
+}
+
+// The following identify resource constants for Kubernetes object types
+const (
+ // Pods, number
+ ResourcePods ResourceName = "pods"
+ // Services, number
+ ResourceServices ResourceName = "services"
+ // ReplicationControllers, number
+ ResourceReplicationControllers ResourceName = "replicationcontrollers"
+ // ResourceQuotas, number
+ ResourceQuotas ResourceName = "resourcequotas"
+ // ResourceSecrets, number
+ ResourceSecrets ResourceName = "secrets"
+ // ResourceConfigMaps, number
+ ResourceConfigMaps ResourceName = "configmaps"
+ // ResourcePersistentVolumeClaims, number
+ ResourcePersistentVolumeClaims ResourceName = "persistentvolumeclaims"
+ // ResourceServicesNodePorts, number
+ ResourceServicesNodePorts ResourceName = "services.nodeports"
+ // ResourceServicesLoadBalancers, number
+ ResourceServicesLoadBalancers ResourceName = "services.loadbalancers"
+ // CPU request, in cores. (500m = .5 cores)
+ ResourceRequestsCPU ResourceName = "requests.cpu"
+ // Memory request, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
+ ResourceRequestsMemory ResourceName = "requests.memory"
+ // Storage request, in bytes
+ ResourceRequestsStorage ResourceName = "requests.storage"
+ // CPU limit, in cores. (500m = .5 cores)
+ ResourceLimitsCPU ResourceName = "limits.cpu"
+ // Memory limit, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
+ ResourceLimitsMemory ResourceName = "limits.memory"
+)
+
+// A ResourceQuotaScope defines a filter that must match each object tracked by a quota
+type ResourceQuotaScope string
+
+const (
+ // Match all pod objects where spec.activeDeadlineSeconds
+ ResourceQuotaScopeTerminating ResourceQuotaScope = "Terminating"
+ // Match all pod objects where !spec.activeDeadlineSeconds
+ ResourceQuotaScopeNotTerminating ResourceQuotaScope = "NotTerminating"
+ // Match all pod objects that have best effort quality of service
+ ResourceQuotaScopeBestEffort ResourceQuotaScope = "BestEffort"
+ // Match all pod objects that do not have best effort quality of service
+ ResourceQuotaScopeNotBestEffort ResourceQuotaScope = "NotBestEffort"
+)
+
+// ResourceQuotaSpec defines the desired hard limits to enforce for Quota
+type ResourceQuotaSpec struct {
+ // Hard is the set of desired hard limits for each named resource
+ // +optional
+ Hard ResourceList
+ // A collection of filters that must match each object tracked by a quota.
+ // If not specified, the quota matches all objects.
+ // +optional
+ Scopes []ResourceQuotaScope
+}
+
+// ResourceQuotaStatus defines the enforced hard limits and observed use
+type ResourceQuotaStatus struct {
+ // Hard is the set of enforced hard limits for each named resource
+ // +optional
+ Hard ResourceList
+ // Used is the current observed total usage of the resource in the namespace
+ // +optional
+ Used ResourceList
+}
+
+// +genclient=true
+
+// ResourceQuota sets aggregate quota restrictions enforced per namespace
+type ResourceQuota struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Spec defines the desired quota
+ // +optional
+ Spec ResourceQuotaSpec
+
+ // Status defines the actual enforced quota and its current usage
+ // +optional
+ Status ResourceQuotaStatus
+}
+
+// ResourceQuotaList is a list of ResourceQuota items
+type ResourceQuotaList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ // Items is a list of ResourceQuota objects
+ Items []ResourceQuota
+}
+
+// +genclient=true
+
+// Secret holds secret data of a certain type. The total bytes of the values in
+// the Data field must be less than MaxSecretSize bytes.
+type Secret struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Data contains the secret data. Each key must consist of alphanumeric
+ // characters, '-', '_' or '.'. The serialized form of the secret data is a
+ // base64 encoded string, representing the arbitrary (possibly non-string)
+ // data value here.
+ // +optional
+ Data map[string][]byte
+
+ // Used to facilitate programmatic handling of secret data.
+ // +optional
+ Type SecretType
+}
+
+const MaxSecretSize = 1 * 1024 * 1024
+
+type SecretType string
+
+const (
+ // SecretTypeOpaque is the default; arbitrary user-defined data
+ SecretTypeOpaque SecretType = "Opaque"
+
+ // SecretTypeServiceAccountToken contains a token that identifies a service account to the API
+ //
+ // Required fields:
+ // - Secret.Annotations["kubernetes.io/service-account.name"] - the name of the ServiceAccount the token identifies
+ // - Secret.Annotations["kubernetes.io/service-account.uid"] - the UID of the ServiceAccount the token identifies
+ // - Secret.Data["token"] - a token that identifies the service account to the API
+ SecretTypeServiceAccountToken SecretType = "kubernetes.io/service-account-token"
+
+ // ServiceAccountNameKey is the key of the required annotation for SecretTypeServiceAccountToken secrets
+ ServiceAccountNameKey = "kubernetes.io/service-account.name"
+ // ServiceAccountUIDKey is the key of the required annotation for SecretTypeServiceAccountToken secrets
+ ServiceAccountUIDKey = "kubernetes.io/service-account.uid"
+ // ServiceAccountTokenKey is the key of the required data for SecretTypeServiceAccountToken secrets
+ ServiceAccountTokenKey = "token"
+ // ServiceAccountKubeconfigKey is the key of the optional kubeconfig data for SecretTypeServiceAccountToken secrets
+ ServiceAccountKubeconfigKey = "kubernetes.kubeconfig"
+ // ServiceAccountRootCAKey is the key of the optional root certificate authority for SecretTypeServiceAccountToken secrets
+ ServiceAccountRootCAKey = "ca.crt"
+ // ServiceAccountNamespaceKey is the key of the optional namespace to use as the default for namespaced API calls
+ ServiceAccountNamespaceKey = "namespace"
+
+ // SecretTypeDockercfg contains a dockercfg file that follows the same format rules as ~/.dockercfg
+ //
+ // Required fields:
+ // - Secret.Data[".dockercfg"] - a serialized ~/.dockercfg file
+ SecretTypeDockercfg SecretType = "kubernetes.io/dockercfg"
+
+ // DockerConfigKey is the key of the required data for SecretTypeDockercfg secrets
+ DockerConfigKey = ".dockercfg"
+
+ // SecretTypeDockerConfigJson contains a dockercfg file that follows the same format rules as ~/.docker/config.json
+ //
+ // Required fields:
+ // - Secret.Data[".dockerconfigjson"] - a serialized ~/.docker/config.json file
+ SecretTypeDockerConfigJson SecretType = "kubernetes.io/dockerconfigjson"
+
+ // DockerConfigJsonKey is the key of the required data for SecretTypeDockerConfigJson secrets
+ DockerConfigJsonKey = ".dockerconfigjson"
+
+ // SecretTypeBasicAuth contains data needed for basic authentication.
+ //
+ // Required at least one of fields:
+ // - Secret.Data["username"] - username used for authentication
+ // - Secret.Data["password"] - password or token needed for authentication
+ SecretTypeBasicAuth SecretType = "kubernetes.io/basic-auth"
+
+ // BasicAuthUsernameKey is the key of the username for SecretTypeBasicAuth secrets
+ BasicAuthUsernameKey = "username"
+ // BasicAuthPasswordKey is the key of the password or token for SecretTypeBasicAuth secrets
+ BasicAuthPasswordKey = "password"
+
+ // SecretTypeSSHAuth contains data needed for SSH authetication.
+ //
+ // Required field:
+ // - Secret.Data["ssh-privatekey"] - private SSH key needed for authentication
+ SecretTypeSSHAuth SecretType = "kubernetes.io/ssh-auth"
+
+ // SSHAuthPrivateKey is the key of the required SSH private key for SecretTypeSSHAuth secrets
+ SSHAuthPrivateKey = "ssh-privatekey"
+
+ // SecretTypeTLS contains information about a TLS client or server secret. It
+ // is primarily used with TLS termination of the Ingress resource, but may be
+ // used in other types.
+ //
+ // Required fields:
+ // - Secret.Data["tls.key"] - TLS private key.
+ // Secret.Data["tls.crt"] - TLS certificate.
+ // TODO: Consider supporting different formats, specifying CA/destinationCA.
+ SecretTypeTLS SecretType = "kubernetes.io/tls"
+
+ // TLSCertKey is the key for tls certificates in a TLS secret.
+ TLSCertKey = "tls.crt"
+ // TLSPrivateKeyKey is the key for the private key field in a TLS secret.
+ TLSPrivateKeyKey = "tls.key"
+)
+
+type SecretList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []Secret
+}
+
+// +genclient=true
+
+// ConfigMap holds configuration data for components or applications to consume.
+type ConfigMap struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Data contains the configuration data.
+ // Each key must consist of alphanumeric characters, '-', '_' or '.'.
+ // +optional
+ Data map[string]string
+}
+
+// ConfigMapList is a resource containing a list of ConfigMap objects.
+type ConfigMapList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ // Items is the list of ConfigMaps.
+ Items []ConfigMap
+}
+
+// These constants are for remote command execution and port forwarding and are
+// used by both the client side and server side components.
+//
+// This is probably not the ideal place for them, but it didn't seem worth it
+// to create pkg/exec and pkg/portforward just to contain a single file with
+// constants in it. Suggestions for more appropriate alternatives are
+// definitely welcome!
+const (
+ // Enable stdin for remote command execution
+ ExecStdinParam = "input"
+ // Enable stdout for remote command execution
+ ExecStdoutParam = "output"
+ // Enable stderr for remote command execution
+ ExecStderrParam = "error"
+ // Enable TTY for remote command execution
+ ExecTTYParam = "tty"
+ // Command to run for remote command execution
+ ExecCommandParamm = "command"
+
+ // Name of header that specifies stream type
+ StreamType = "streamType"
+ // Value for streamType header for stdin stream
+ StreamTypeStdin = "stdin"
+ // Value for streamType header for stdout stream
+ StreamTypeStdout = "stdout"
+ // Value for streamType header for stderr stream
+ StreamTypeStderr = "stderr"
+ // Value for streamType header for data stream
+ StreamTypeData = "data"
+ // Value for streamType header for error stream
+ StreamTypeError = "error"
+ // Value for streamType header for terminal resize stream
+ StreamTypeResize = "resize"
+
+ // Name of header that specifies the port being forwarded
+ PortHeader = "port"
+ // Name of header that specifies a request ID used to associate the error
+ // and data streams for a single forwarded connection
+ PortForwardRequestIDHeader = "requestID"
+)
+
+// Type and constants for component health validation.
+type ComponentConditionType string
+
+// These are the valid conditions for the component.
+const (
+ ComponentHealthy ComponentConditionType = "Healthy"
+)
+
+type ComponentCondition struct {
+ Type ComponentConditionType
+ Status ConditionStatus
+ // +optional
+ Message string
+ // +optional
+ Error string
+}
+
+// +genclient=true
+// +nonNamespaced=true
+
+// ComponentStatus (and ComponentStatusList) holds the cluster validation info.
+type ComponentStatus struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // +optional
+ Conditions []ComponentCondition
+}
+
+type ComponentStatusList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []ComponentStatus
+}
+
+// SecurityContext holds security configuration that will be applied to a container.
+// Some fields are present in both SecurityContext and PodSecurityContext. When both
+// are set, the values in SecurityContext take precedence.
+type SecurityContext struct {
+ // The capabilities to add/drop when running containers.
+ // Defaults to the default set of capabilities granted by the container runtime.
+ // +optional
+ Capabilities *Capabilities
+ // Run container in privileged mode.
+ // Processes in privileged containers are essentially equivalent to root on the host.
+ // Defaults to false.
+ // +optional
+ Privileged *bool
+ // The SELinux context to be applied to the container.
+ // If unspecified, the container runtime will allocate a random SELinux context for each
+ // container. May also be set in PodSecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence.
+ // +optional
+ SELinuxOptions *SELinuxOptions
+ // The UID to run the entrypoint of the container process.
+ // Defaults to user specified in image metadata if unspecified.
+ // May also be set in PodSecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence.
+ // +optional
+ RunAsUser *int64
+ // Indicates that the container must run as a non-root user.
+ // If true, the Kubelet will validate the image at runtime to ensure that it
+ // does not run as UID 0 (root) and fail to start the container if it does.
+ // If unset or false, no such validation will be performed.
+ // May also be set in PodSecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence.
+ // +optional
+ RunAsNonRoot *bool
+ // The read-only root filesystem allows you to restrict the locations that an application can write
+ // files to, ensuring the persistent data can only be written to mounts.
+ // +optional
+ ReadOnlyRootFilesystem *bool
+}
+
+// SELinuxOptions are the labels to be applied to the container.
+type SELinuxOptions struct {
+ // SELinux user label
+ // +optional
+ User string
+ // SELinux role label
+ // +optional
+ Role string
+ // SELinux type label
+ // +optional
+ Type string
+ // SELinux level label.
+ // +optional
+ Level string
+}
+
+// RangeAllocation is an opaque API object (not exposed to end users) that can be persisted to record
+// the global allocation state of the cluster. The schema of Range and Data generic, in that Range
+// should be a string representation of the inputs to a range (for instance, for IP allocation it
+// might be a CIDR) and Data is an opaque blob understood by an allocator which is typically a
+// binary range. Consumers should use annotations to record additional information (schema version,
+// data encoding hints). A range allocation should *ALWAYS* be recreatable at any time by observation
+// of the cluster, thus the object is less strongly typed than most.
+type RangeAllocation struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+ // A string representing a unique label for a range of resources, such as a CIDR "10.0.0.0/8" or
+ // port range "10000-30000". Range is not strongly schema'd here. The Range is expected to define
+ // a start and end unless there is an implicit end.
+ Range string
+ // A byte array representing the serialized state of a range allocation. Additional clarifiers on
+ // the type or format of data should be represented with annotations. For IP allocations, this is
+ // represented as a bit array starting at the base IP of the CIDR in Range, with each bit representing
+ // a single allocated address (the fifth bit on CIDR 10.0.0.0/8 is 10.0.0.4).
+ Data []byte
+}
+
+const (
+ // "default-scheduler" is the name of default scheduler.
+ DefaultSchedulerName = "default-scheduler"
+
+ // RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule
+ // corresponding to every RequiredDuringScheduling affinity rule.
+ // When the --hard-pod-affinity-weight scheduler flag is not specified,
+ // DefaultHardPodAffinityWeight defines the weight of the implicit PreferredDuringScheduling affinity rule.
+ DefaultHardPodAffinitySymmetricWeight int = 1
+)
diff --git a/vendor/k8s.io/client-go/pkg/api/v1/annotation_key_constants.go b/vendor/k8s.io/client-go/pkg/api/v1/annotation_key_constants.go
new file mode 100644
index 000000000..bb4588554
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/v1/annotation_key_constants.go
@@ -0,0 +1,113 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file should be consistent with pkg/api/annotation_key_constants.go.
+
+package v1
+
+const (
+ // ImagePolicyFailedOpenKey is added to pods created by failing open when the image policy
+ // webhook backend fails.
+ ImagePolicyFailedOpenKey string = "alpha.image-policy.k8s.io/failed-open"
+
+ // PodPresetOptOutAnnotationKey represents the annotation key for a pod to exempt itself from pod preset manipulation
+ PodPresetOptOutAnnotationKey string = "podpreset.admission.kubernetes.io/exclude"
+
+ // MirrorAnnotationKey represents the annotation key set by kubelets when creating mirror pods
+ MirrorPodAnnotationKey string = "kubernetes.io/config.mirror"
+
+ // TolerationsAnnotationKey represents the key of tolerations data (json serialized)
+ // in the Annotations of a Pod.
+ TolerationsAnnotationKey string = "scheduler.alpha.kubernetes.io/tolerations"
+
+ // TaintsAnnotationKey represents the key of taints data (json serialized)
+ // in the Annotations of a Node.
+ TaintsAnnotationKey string = "scheduler.alpha.kubernetes.io/taints"
+
+ // SeccompPodAnnotationKey represents the key of a seccomp profile applied
+ // to all containers of a pod.
+ SeccompPodAnnotationKey string = "seccomp.security.alpha.kubernetes.io/pod"
+
+ // SeccompContainerAnnotationKeyPrefix represents the key of a seccomp profile applied
+ // to one container of a pod.
+ SeccompContainerAnnotationKeyPrefix string = "container.seccomp.security.alpha.kubernetes.io/"
+
+ // CreatedByAnnotation represents the key used to store the spec(json)
+ // used to create the resource.
+ CreatedByAnnotation = "kubernetes.io/created-by"
+
+ // PreferAvoidPodsAnnotationKey represents the key of preferAvoidPods data (json serialized)
+ // in the Annotations of a Node.
+ PreferAvoidPodsAnnotationKey string = "scheduler.alpha.kubernetes.io/preferAvoidPods"
+
+ // SysctlsPodAnnotationKey represents the key of sysctls which are set for the infrastructure
+ // container of a pod. The annotation value is a comma separated list of sysctl_name=value
+ // key-value pairs. Only a limited set of whitelisted and isolated sysctls is supported by
+ // the kubelet. Pods with other sysctls will fail to launch.
+ SysctlsPodAnnotationKey string = "security.alpha.kubernetes.io/sysctls"
+
+ // UnsafeSysctlsPodAnnotationKey represents the key of sysctls which are set for the infrastructure
+ // container of a pod. The annotation value is a comma separated list of sysctl_name=value
+ // key-value pairs. Unsafe sysctls must be explicitly enabled for a kubelet. They are properly
+ // namespaced to a pod or a container, but their isolation is usually unclear or weak. Their use
+ // is at-your-own-risk. Pods that attempt to set an unsafe sysctl that is not enabled for a kubelet
+ // will fail to launch.
+ UnsafeSysctlsPodAnnotationKey string = "security.alpha.kubernetes.io/unsafe-sysctls"
+
+ // ObjectTTLAnnotations represents a suggestion for kubelet for how long it can cache
+ // an object (e.g. secret, config map) before fetching it again from apiserver.
+ // This annotation can be attached to node.
+ ObjectTTLAnnotationKey string = "node.alpha.kubernetes.io/ttl"
+
+ // AffinityAnnotationKey represents the key of affinity data (json serialized)
+ // in the Annotations of a Pod.
+ // TODO: remove when alpha support for affinity is removed
+ AffinityAnnotationKey string = "scheduler.alpha.kubernetes.io/affinity"
+
+ // annotation key prefix used to identify non-convertible json paths.
+ NonConvertibleAnnotationPrefix = "non-convertible.kubernetes.io"
+
+ kubectlPrefix = "kubectl.kubernetes.io/"
+
+ // LastAppliedConfigAnnotation is the annotation used to store the previous
+ // configuration of a resource for use in a three way diff by UpdateApplyAnnotation.
+ LastAppliedConfigAnnotation = kubectlPrefix + "last-applied-configuration"
+
+ // AnnotationLoadBalancerSourceRangesKey is the key of the annotation on a service to set allowed ingress ranges on their LoadBalancers
+ //
+ // It should be a comma-separated list of CIDRs, e.g. `0.0.0.0/0` to
+ // allow full access (the default) or `18.0.0.0/8,56.0.0.0/8` to allow
+ // access only from the CIDRs currently allocated to MIT & the USPS.
+ //
+ // Not all cloud providers support this annotation, though AWS & GCE do.
+ AnnotationLoadBalancerSourceRangesKey = "service.beta.kubernetes.io/load-balancer-source-ranges"
+
+ // AnnotationValueExternalTrafficLocal Value of annotation to specify local endpoints behavior.
+ AnnotationValueExternalTrafficLocal = "OnlyLocal"
+ // AnnotationValueExternalTrafficGlobal Value of annotation to specify global (legacy) behavior.
+ AnnotationValueExternalTrafficGlobal = "Global"
+
+ // TODO: The beta annotations have been deprecated, remove them when we release k8s 1.8.
+
+ // BetaAnnotationHealthCheckNodePort Annotation specifying the healthcheck nodePort for the service.
+ // If not specified, annotation is created by the service api backend with the allocated nodePort.
+ // Will use user-specified nodePort value if specified by the client.
+ BetaAnnotationHealthCheckNodePort = "service.beta.kubernetes.io/healthcheck-nodeport"
+
+ // BetaAnnotationExternalTraffic An annotation that denotes if this Service desires to route
+ // external traffic to local endpoints only. This preserves Source IP and avoids a second hop.
+ BetaAnnotationExternalTraffic = "service.beta.kubernetes.io/external-traffic"
+)
diff --git a/vendor/k8s.io/client-go/pkg/api/v1/conversion.go b/vendor/k8s.io/client-go/pkg/api/v1/conversion.go
new file mode 100644
index 000000000..4ded76091
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/v1/conversion.go
@@ -0,0 +1,776 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "encoding/json"
+ "fmt"
+ "reflect"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/conversion"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/validation/field"
+ "k8s.io/client-go/pkg/api"
+ "k8s.io/client-go/pkg/apis/extensions"
+)
+
+// This is a "fast-path" that avoids reflection for common types. It focuses on the objects that are
+// converted the most in the cluster.
+// TODO: generate one of these for every external API group - this is to prove the impact
+func addFastPathConversionFuncs(scheme *runtime.Scheme) error {
+ scheme.AddGenericConversionFunc(func(objA, objB interface{}, s conversion.Scope) (bool, error) {
+ switch a := objA.(type) {
+ case *Pod:
+ switch b := objB.(type) {
+ case *api.Pod:
+ return true, Convert_v1_Pod_To_api_Pod(a, b, s)
+ }
+ case *api.Pod:
+ switch b := objB.(type) {
+ case *Pod:
+ return true, Convert_api_Pod_To_v1_Pod(a, b, s)
+ }
+
+ case *Event:
+ switch b := objB.(type) {
+ case *api.Event:
+ return true, Convert_v1_Event_To_api_Event(a, b, s)
+ }
+ case *api.Event:
+ switch b := objB.(type) {
+ case *Event:
+ return true, Convert_api_Event_To_v1_Event(a, b, s)
+ }
+
+ case *ReplicationController:
+ switch b := objB.(type) {
+ case *api.ReplicationController:
+ return true, Convert_v1_ReplicationController_To_api_ReplicationController(a, b, s)
+ }
+ case *api.ReplicationController:
+ switch b := objB.(type) {
+ case *ReplicationController:
+ return true, Convert_api_ReplicationController_To_v1_ReplicationController(a, b, s)
+ }
+
+ case *Node:
+ switch b := objB.(type) {
+ case *api.Node:
+ return true, Convert_v1_Node_To_api_Node(a, b, s)
+ }
+ case *api.Node:
+ switch b := objB.(type) {
+ case *Node:
+ return true, Convert_api_Node_To_v1_Node(a, b, s)
+ }
+
+ case *Namespace:
+ switch b := objB.(type) {
+ case *api.Namespace:
+ return true, Convert_v1_Namespace_To_api_Namespace(a, b, s)
+ }
+ case *api.Namespace:
+ switch b := objB.(type) {
+ case *Namespace:
+ return true, Convert_api_Namespace_To_v1_Namespace(a, b, s)
+ }
+
+ case *Service:
+ switch b := objB.(type) {
+ case *api.Service:
+ return true, Convert_v1_Service_To_api_Service(a, b, s)
+ }
+ case *api.Service:
+ switch b := objB.(type) {
+ case *Service:
+ return true, Convert_api_Service_To_v1_Service(a, b, s)
+ }
+
+ case *Endpoints:
+ switch b := objB.(type) {
+ case *api.Endpoints:
+ return true, Convert_v1_Endpoints_To_api_Endpoints(a, b, s)
+ }
+ case *api.Endpoints:
+ switch b := objB.(type) {
+ case *Endpoints:
+ return true, Convert_api_Endpoints_To_v1_Endpoints(a, b, s)
+ }
+
+ case *metav1.WatchEvent:
+ switch b := objB.(type) {
+ case *metav1.InternalEvent:
+ return true, metav1.Convert_versioned_Event_to_versioned_InternalEvent(a, b, s)
+ }
+ case *metav1.InternalEvent:
+ switch b := objB.(type) {
+ case *metav1.WatchEvent:
+ return true, metav1.Convert_versioned_InternalEvent_to_versioned_Event(a, b, s)
+ }
+ }
+ return false, nil
+ })
+ return nil
+}
+
+func addConversionFuncs(scheme *runtime.Scheme) error {
+ // Add non-generated conversion functions
+ err := scheme.AddConversionFuncs(
+ Convert_api_Pod_To_v1_Pod,
+ Convert_api_PodSpec_To_v1_PodSpec,
+ Convert_api_ReplicationControllerSpec_To_v1_ReplicationControllerSpec,
+ Convert_api_ServiceSpec_To_v1_ServiceSpec,
+ Convert_v1_Pod_To_api_Pod,
+ Convert_v1_PodSpec_To_api_PodSpec,
+ Convert_v1_ReplicationControllerSpec_To_api_ReplicationControllerSpec,
+ Convert_v1_Secret_To_api_Secret,
+ Convert_v1_ServiceSpec_To_api_ServiceSpec,
+ Convert_v1_ResourceList_To_api_ResourceList,
+ Convert_v1_ReplicationController_to_extensions_ReplicaSet,
+ Convert_v1_ReplicationControllerSpec_to_extensions_ReplicaSetSpec,
+ Convert_v1_ReplicationControllerStatus_to_extensions_ReplicaSetStatus,
+ Convert_extensions_ReplicaSet_to_v1_ReplicationController,
+ Convert_extensions_ReplicaSetSpec_to_v1_ReplicationControllerSpec,
+ Convert_extensions_ReplicaSetStatus_to_v1_ReplicationControllerStatus,
+ )
+ if err != nil {
+ return err
+ }
+
+ // Add field label conversions for kinds having selectable nothing but ObjectMeta fields.
+ for _, k := range []string{
+ "Endpoints",
+ "ResourceQuota",
+ "PersistentVolumeClaim",
+ "Service",
+ "ServiceAccount",
+ "ConfigMap",
+ } {
+ kind := k // don't close over range variables
+ err = scheme.AddFieldLabelConversionFunc("v1", kind,
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "metadata.namespace",
+ "metadata.name":
+ return label, value, nil
+ default:
+ return "", "", fmt.Errorf("field label %q not supported for %q", label, kind)
+ }
+ },
+ )
+ if err != nil {
+ return err
+ }
+ }
+
+ // Add field conversion funcs.
+ err = scheme.AddFieldLabelConversionFunc("v1", "Pod",
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "metadata.annotations",
+ "metadata.labels",
+ "metadata.name",
+ "metadata.namespace",
+ "spec.nodeName",
+ "spec.restartPolicy",
+ "spec.serviceAccountName",
+ "status.phase",
+ "status.hostIP",
+ "status.podIP":
+ return label, value, nil
+ // This is for backwards compatibility with old v1 clients which send spec.host
+ case "spec.host":
+ return "spec.nodeName", value, nil
+ default:
+ return "", "", fmt.Errorf("field label not supported: %s", label)
+ }
+ },
+ )
+ if err != nil {
+ return err
+ }
+ err = scheme.AddFieldLabelConversionFunc("v1", "Node",
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "metadata.name":
+ return label, value, nil
+ case "spec.unschedulable":
+ return label, value, nil
+ default:
+ return "", "", fmt.Errorf("field label not supported: %s", label)
+ }
+ },
+ )
+ if err != nil {
+ return err
+ }
+ err = scheme.AddFieldLabelConversionFunc("v1", "ReplicationController",
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "metadata.name",
+ "metadata.namespace",
+ "status.replicas":
+ return label, value, nil
+ default:
+ return "", "", fmt.Errorf("field label not supported: %s", label)
+ }
+ })
+ if err != nil {
+ return err
+ }
+ err = scheme.AddFieldLabelConversionFunc("v1", "PersistentVolume",
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "metadata.name":
+ return label, value, nil
+ default:
+ return "", "", fmt.Errorf("field label not supported: %s", label)
+ }
+ },
+ )
+ if err != nil {
+ return err
+ }
+ if err := AddFieldLabelConversionsForEvent(scheme); err != nil {
+ return err
+ }
+ if err := AddFieldLabelConversionsForNamespace(scheme); err != nil {
+ return err
+ }
+ if err := AddFieldLabelConversionsForSecret(scheme); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1_ReplicationController_to_extensions_ReplicaSet(in *ReplicationController, out *extensions.ReplicaSet, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_ReplicationControllerSpec_to_extensions_ReplicaSetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ReplicationControllerStatus_to_extensions_ReplicaSetStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1_ReplicationControllerSpec_to_extensions_ReplicaSetSpec(in *ReplicationControllerSpec, out *extensions.ReplicaSetSpec, s conversion.Scope) error {
+ out.Replicas = *in.Replicas
+ if in.Selector != nil {
+ metav1.Convert_map_to_unversioned_LabelSelector(&in.Selector, out.Selector, s)
+ }
+ if in.Template != nil {
+ if err := Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func Convert_v1_ReplicationControllerStatus_to_extensions_ReplicaSetStatus(in *ReplicationControllerStatus, out *extensions.ReplicaSetStatus, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ out.FullyLabeledReplicas = in.FullyLabeledReplicas
+ out.ReadyReplicas = in.ReadyReplicas
+ out.AvailableReplicas = in.AvailableReplicas
+ out.ObservedGeneration = in.ObservedGeneration
+ return nil
+}
+
+func Convert_extensions_ReplicaSet_to_v1_ReplicationController(in *extensions.ReplicaSet, out *ReplicationController, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_extensions_ReplicaSetSpec_to_v1_ReplicationControllerSpec(&in.Spec, &out.Spec, s); err != nil {
+ fieldErr, ok := err.(*field.Error)
+ if !ok {
+ return err
+ }
+ if out.Annotations == nil {
+ out.Annotations = make(map[string]string)
+ }
+ out.Annotations[NonConvertibleAnnotationPrefix+"/"+fieldErr.Field] = reflect.ValueOf(fieldErr.BadValue).String()
+ }
+ if err := Convert_extensions_ReplicaSetStatus_to_v1_ReplicationControllerStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_extensions_ReplicaSetSpec_to_v1_ReplicationControllerSpec(in *extensions.ReplicaSetSpec, out *ReplicationControllerSpec, s conversion.Scope) error {
+ out.Replicas = new(int32)
+ *out.Replicas = in.Replicas
+ out.MinReadySeconds = in.MinReadySeconds
+ var invalidErr error
+ if in.Selector != nil {
+ invalidErr = metav1.Convert_unversioned_LabelSelector_to_map(in.Selector, &out.Selector, s)
+ }
+ out.Template = new(PodTemplateSpec)
+ if err := Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, out.Template, s); err != nil {
+ return err
+ }
+ return invalidErr
+}
+
+func Convert_extensions_ReplicaSetStatus_to_v1_ReplicationControllerStatus(in *extensions.ReplicaSetStatus, out *ReplicationControllerStatus, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ out.FullyLabeledReplicas = in.FullyLabeledReplicas
+ out.ReadyReplicas = in.ReadyReplicas
+ out.AvailableReplicas = in.AvailableReplicas
+ out.ObservedGeneration = in.ObservedGeneration
+ return nil
+}
+
+func Convert_api_ReplicationControllerSpec_To_v1_ReplicationControllerSpec(in *api.ReplicationControllerSpec, out *ReplicationControllerSpec, s conversion.Scope) error {
+ out.Replicas = &in.Replicas
+ out.MinReadySeconds = in.MinReadySeconds
+ out.Selector = in.Selector
+ if in.Template != nil {
+ out.Template = new(PodTemplateSpec)
+ if err := Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(in.Template, out.Template, s); err != nil {
+ return err
+ }
+ } else {
+ out.Template = nil
+ }
+ return nil
+}
+
+func Convert_v1_ReplicationControllerSpec_To_api_ReplicationControllerSpec(in *ReplicationControllerSpec, out *api.ReplicationControllerSpec, s conversion.Scope) error {
+ if in.Replicas != nil {
+ out.Replicas = *in.Replicas
+ }
+ out.MinReadySeconds = in.MinReadySeconds
+ out.Selector = in.Selector
+ if in.Template != nil {
+ out.Template = new(api.PodTemplateSpec)
+ if err := Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in.Template, out.Template, s); err != nil {
+ return err
+ }
+ } else {
+ out.Template = nil
+ }
+ return nil
+}
+
+func Convert_api_PodStatusResult_To_v1_PodStatusResult(in *api.PodStatusResult, out *PodStatusResult, s conversion.Scope) error {
+ if err := autoConvert_api_PodStatusResult_To_v1_PodStatusResult(in, out, s); err != nil {
+ return err
+ }
+
+ if old := out.Annotations; old != nil {
+ out.Annotations = make(map[string]string, len(old))
+ for k, v := range old {
+ out.Annotations[k] = v
+ }
+ }
+ if len(out.Status.InitContainerStatuses) > 0 {
+ if out.Annotations == nil {
+ out.Annotations = make(map[string]string)
+ }
+ value, err := json.Marshal(out.Status.InitContainerStatuses)
+ if err != nil {
+ return err
+ }
+ out.Annotations[PodInitContainerStatusesAnnotationKey] = string(value)
+ out.Annotations[PodInitContainerStatusesBetaAnnotationKey] = string(value)
+ } else {
+ delete(out.Annotations, PodInitContainerStatusesAnnotationKey)
+ delete(out.Annotations, PodInitContainerStatusesBetaAnnotationKey)
+ }
+ return nil
+}
+
+func Convert_v1_PodStatusResult_To_api_PodStatusResult(in *PodStatusResult, out *api.PodStatusResult, s conversion.Scope) error {
+ // TODO: sometime after we move init container to stable, remove these conversions
+ // If there is a beta annotation, copy to alpha key.
+ // See commit log for PR #31026 for why we do this.
+ if valueBeta, okBeta := in.Annotations[PodInitContainerStatusesBetaAnnotationKey]; okBeta {
+ in.Annotations[PodInitContainerStatusesAnnotationKey] = valueBeta
+ }
+ // Move the annotation to the internal repr. field
+ if value, ok := in.Annotations[PodInitContainerStatusesAnnotationKey]; ok {
+ var values []ContainerStatus
+ if err := json.Unmarshal([]byte(value), &values); err != nil {
+ return err
+ }
+ // Conversion from external to internal version exists more to
+ // satisfy the needs of the decoder than it does to be a general
+ // purpose tool. And Decode always creates an intermediate object
+ // to decode to. Thus the caller of UnsafeConvertToVersion is
+ // taking responsibility to ensure mutation of in is not exposed
+ // back to the caller.
+ in.Status.InitContainerStatuses = values
+ }
+
+ if err := autoConvert_v1_PodStatusResult_To_api_PodStatusResult(in, out, s); err != nil {
+ return err
+ }
+ if len(out.Annotations) > 0 {
+ old := out.Annotations
+ out.Annotations = make(map[string]string, len(old))
+ for k, v := range old {
+ out.Annotations[k] = v
+ }
+ delete(out.Annotations, PodInitContainerStatusesAnnotationKey)
+ delete(out.Annotations, PodInitContainerStatusesBetaAnnotationKey)
+ }
+ return nil
+}
+
+func Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(in *api.PodTemplateSpec, out *PodTemplateSpec, s conversion.Scope) error {
+ if err := autoConvert_api_PodTemplateSpec_To_v1_PodTemplateSpec(in, out, s); err != nil {
+ return err
+ }
+
+ // TODO: sometime after we move init container to stable, remove these conversions.
+ if old := out.Annotations; old != nil {
+ out.Annotations = make(map[string]string, len(old))
+ for k, v := range old {
+ out.Annotations[k] = v
+ }
+ }
+ if len(out.Spec.InitContainers) > 0 {
+ if out.Annotations == nil {
+ out.Annotations = make(map[string]string)
+ }
+ value, err := json.Marshal(out.Spec.InitContainers)
+ if err != nil {
+ return err
+ }
+ out.Annotations[PodInitContainersAnnotationKey] = string(value)
+ out.Annotations[PodInitContainersBetaAnnotationKey] = string(value)
+ } else {
+ delete(out.Annotations, PodInitContainersAnnotationKey)
+ delete(out.Annotations, PodInitContainersBetaAnnotationKey)
+ }
+ return nil
+}
+
+func Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in *PodTemplateSpec, out *api.PodTemplateSpec, s conversion.Scope) error {
+ // TODO: sometime after we move init container to stable, remove these conversions
+ // If there is a beta annotation, copy to alpha key.
+ // See commit log for PR #31026 for why we do this.
+ if valueBeta, okBeta := in.Annotations[PodInitContainersBetaAnnotationKey]; okBeta {
+ in.Annotations[PodInitContainersAnnotationKey] = valueBeta
+ }
+ // Move the annotation to the internal repr. field
+ if value, ok := in.Annotations[PodInitContainersAnnotationKey]; ok {
+ var values []Container
+ if err := json.Unmarshal([]byte(value), &values); err != nil {
+ return err
+ }
+ // Conversion from external to internal version exists more to
+ // satisfy the needs of the decoder than it does to be a general
+ // purpose tool. And Decode always creates an intermediate object
+ // to decode to. Thus the caller of UnsafeConvertToVersion is
+ // taking responsibility to ensure mutation of in is not exposed
+ // back to the caller.
+ in.Spec.InitContainers = values
+
+ // Call defaulters explicitly until annotations are removed
+ tmpPodTemp := &PodTemplate{
+ Template: PodTemplateSpec{
+ Spec: PodSpec{
+ HostNetwork: in.Spec.HostNetwork,
+ InitContainers: values,
+ },
+ },
+ }
+ SetObjectDefaults_PodTemplate(tmpPodTemp)
+ in.Spec.InitContainers = tmpPodTemp.Template.Spec.InitContainers
+ }
+
+ if err := autoConvert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in, out, s); err != nil {
+ return err
+ }
+ if len(out.Annotations) > 0 {
+ old := out.Annotations
+ out.Annotations = make(map[string]string, len(old))
+ for k, v := range old {
+ out.Annotations[k] = v
+ }
+ delete(out.Annotations, PodInitContainersAnnotationKey)
+ delete(out.Annotations, PodInitContainersBetaAnnotationKey)
+ }
+ return nil
+}
+
+// The following two PodSpec conversions are done here to support ServiceAccount
+// as an alias for ServiceAccountName.
+func Convert_api_PodSpec_To_v1_PodSpec(in *api.PodSpec, out *PodSpec, s conversion.Scope) error {
+ if err := autoConvert_api_PodSpec_To_v1_PodSpec(in, out, s); err != nil {
+ return err
+ }
+
+ // DeprecatedServiceAccount is an alias for ServiceAccountName.
+ out.DeprecatedServiceAccount = in.ServiceAccountName
+
+ if in.SecurityContext != nil {
+ // the host namespace fields have to be handled here for backward compatibility
+ // with v1.0.0
+ out.HostPID = in.SecurityContext.HostPID
+ out.HostNetwork = in.SecurityContext.HostNetwork
+ out.HostIPC = in.SecurityContext.HostIPC
+ }
+
+ return nil
+}
+
+func Convert_v1_PodSpec_To_api_PodSpec(in *PodSpec, out *api.PodSpec, s conversion.Scope) error {
+ if err := autoConvert_v1_PodSpec_To_api_PodSpec(in, out, s); err != nil {
+ return err
+ }
+
+ // We support DeprecatedServiceAccount as an alias for ServiceAccountName.
+ // If both are specified, ServiceAccountName (the new field) wins.
+ if in.ServiceAccountName == "" {
+ out.ServiceAccountName = in.DeprecatedServiceAccount
+ }
+
+ // the host namespace fields have to be handled specially for backward compatibility
+ // with v1.0.0
+ if out.SecurityContext == nil {
+ out.SecurityContext = new(api.PodSecurityContext)
+ }
+ out.SecurityContext.HostNetwork = in.HostNetwork
+ out.SecurityContext.HostPID = in.HostPID
+ out.SecurityContext.HostIPC = in.HostIPC
+
+ return nil
+}
+
+func Convert_api_Pod_To_v1_Pod(in *api.Pod, out *Pod, s conversion.Scope) error {
+ if err := autoConvert_api_Pod_To_v1_Pod(in, out, s); err != nil {
+ return err
+ }
+
+ // TODO: sometime after we move init container to stable, remove these conversions
+ if len(out.Spec.InitContainers) > 0 || len(out.Status.InitContainerStatuses) > 0 {
+ old := out.Annotations
+ out.Annotations = make(map[string]string, len(old))
+ for k, v := range old {
+ out.Annotations[k] = v
+ }
+ delete(out.Annotations, PodInitContainersAnnotationKey)
+ delete(out.Annotations, PodInitContainersBetaAnnotationKey)
+ delete(out.Annotations, PodInitContainerStatusesAnnotationKey)
+ delete(out.Annotations, PodInitContainerStatusesBetaAnnotationKey)
+ }
+ if len(out.Spec.InitContainers) > 0 {
+ value, err := json.Marshal(out.Spec.InitContainers)
+ if err != nil {
+ return err
+ }
+ out.Annotations[PodInitContainersAnnotationKey] = string(value)
+ out.Annotations[PodInitContainersBetaAnnotationKey] = string(value)
+ }
+ if len(out.Status.InitContainerStatuses) > 0 {
+ value, err := json.Marshal(out.Status.InitContainerStatuses)
+ if err != nil {
+ return err
+ }
+ out.Annotations[PodInitContainerStatusesAnnotationKey] = string(value)
+ out.Annotations[PodInitContainerStatusesBetaAnnotationKey] = string(value)
+ }
+
+ return nil
+}
+
+func Convert_v1_Pod_To_api_Pod(in *Pod, out *api.Pod, s conversion.Scope) error {
+ // If there is a beta annotation, copy to alpha key.
+ // See commit log for PR #31026 for why we do this.
+ if valueBeta, okBeta := in.Annotations[PodInitContainersBetaAnnotationKey]; okBeta {
+ in.Annotations[PodInitContainersAnnotationKey] = valueBeta
+ }
+ // TODO: sometime after we move init container to stable, remove these conversions
+ // Move the annotation to the internal repr. field
+ if value, ok := in.Annotations[PodInitContainersAnnotationKey]; ok {
+ var values []Container
+ if err := json.Unmarshal([]byte(value), &values); err != nil {
+ return err
+ }
+ // Conversion from external to internal version exists more to
+ // satisfy the needs of the decoder than it does to be a general
+ // purpose tool. And Decode always creates an intermediate object
+ // to decode to. Thus the caller of UnsafeConvertToVersion is
+ // taking responsibility to ensure mutation of in is not exposed
+ // back to the caller.
+ in.Spec.InitContainers = values
+ // Call defaulters explicitly until annotations are removed
+ tmpPod := &Pod{
+ Spec: PodSpec{
+ HostNetwork: in.Spec.HostNetwork,
+ InitContainers: values,
+ },
+ }
+ SetObjectDefaults_Pod(tmpPod)
+ in.Spec.InitContainers = tmpPod.Spec.InitContainers
+ }
+ // If there is a beta annotation, copy to alpha key.
+ // See commit log for PR #31026 for why we do this.
+ if valueBeta, okBeta := in.Annotations[PodInitContainerStatusesBetaAnnotationKey]; okBeta {
+ in.Annotations[PodInitContainerStatusesAnnotationKey] = valueBeta
+ }
+ if value, ok := in.Annotations[PodInitContainerStatusesAnnotationKey]; ok {
+ var values []ContainerStatus
+ if err := json.Unmarshal([]byte(value), &values); err != nil {
+ return err
+ }
+ // Conversion from external to internal version exists more to
+ // satisfy the needs of the decoder than it does to be a general
+ // purpose tool. And Decode always creates an intermediate object
+ // to decode to. Thus the caller of UnsafeConvertToVersion is
+ // taking responsibility to ensure mutation of in is not exposed
+ // back to the caller.
+ in.Status.InitContainerStatuses = values
+ }
+
+ if err := autoConvert_v1_Pod_To_api_Pod(in, out, s); err != nil {
+ return err
+ }
+ if len(out.Annotations) > 0 {
+ old := out.Annotations
+ out.Annotations = make(map[string]string, len(old))
+ for k, v := range old {
+ out.Annotations[k] = v
+ }
+ delete(out.Annotations, PodInitContainersAnnotationKey)
+ delete(out.Annotations, PodInitContainersBetaAnnotationKey)
+ delete(out.Annotations, PodInitContainerStatusesAnnotationKey)
+ delete(out.Annotations, PodInitContainerStatusesBetaAnnotationKey)
+ }
+ return nil
+}
+
+func Convert_v1_Secret_To_api_Secret(in *Secret, out *api.Secret, s conversion.Scope) error {
+ if err := autoConvert_v1_Secret_To_api_Secret(in, out, s); err != nil {
+ return err
+ }
+
+ // StringData overwrites Data
+ if len(in.StringData) > 0 {
+ if out.Data == nil {
+ out.Data = map[string][]byte{}
+ }
+ for k, v := range in.StringData {
+ out.Data[k] = []byte(v)
+ }
+ }
+
+ return nil
+}
+
+func Convert_api_PodSecurityContext_To_v1_PodSecurityContext(in *api.PodSecurityContext, out *PodSecurityContext, s conversion.Scope) error {
+ out.SupplementalGroups = in.SupplementalGroups
+ if in.SELinuxOptions != nil {
+ out.SELinuxOptions = new(SELinuxOptions)
+ if err := Convert_api_SELinuxOptions_To_v1_SELinuxOptions(in.SELinuxOptions, out.SELinuxOptions, s); err != nil {
+ return err
+ }
+ } else {
+ out.SELinuxOptions = nil
+ }
+ out.RunAsUser = in.RunAsUser
+ out.RunAsNonRoot = in.RunAsNonRoot
+ out.FSGroup = in.FSGroup
+ return nil
+}
+
+func Convert_v1_PodSecurityContext_To_api_PodSecurityContext(in *PodSecurityContext, out *api.PodSecurityContext, s conversion.Scope) error {
+ out.SupplementalGroups = in.SupplementalGroups
+ if in.SELinuxOptions != nil {
+ out.SELinuxOptions = new(api.SELinuxOptions)
+ if err := Convert_v1_SELinuxOptions_To_api_SELinuxOptions(in.SELinuxOptions, out.SELinuxOptions, s); err != nil {
+ return err
+ }
+ } else {
+ out.SELinuxOptions = nil
+ }
+ out.RunAsUser = in.RunAsUser
+ out.RunAsNonRoot = in.RunAsNonRoot
+ out.FSGroup = in.FSGroup
+ return nil
+}
+
+// +k8s:conversion-fn=copy-only
+func Convert_v1_ResourceList_To_api_ResourceList(in *ResourceList, out *api.ResourceList, s conversion.Scope) error {
+ if *in == nil {
+ return nil
+ }
+ if *out == nil {
+ *out = make(api.ResourceList, len(*in))
+ }
+ for key, val := range *in {
+ // Moved to defaults
+ // TODO(#18538): We round up resource values to milli scale to maintain API compatibility.
+ // In the future, we should instead reject values that need rounding.
+ // const milliScale = -3
+ // val.RoundUp(milliScale)
+
+ (*out)[api.ResourceName(key)] = val
+ }
+ return nil
+}
+
+func AddFieldLabelConversionsForEvent(scheme *runtime.Scheme) error {
+ return scheme.AddFieldLabelConversionFunc("v1", "Event",
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "involvedObject.kind",
+ "involvedObject.namespace",
+ "involvedObject.name",
+ "involvedObject.uid",
+ "involvedObject.apiVersion",
+ "involvedObject.resourceVersion",
+ "involvedObject.fieldPath",
+ "reason",
+ "source",
+ "type",
+ "metadata.namespace",
+ "metadata.name":
+ return label, value, nil
+ default:
+ return "", "", fmt.Errorf("field label not supported: %s", label)
+ }
+ })
+}
+
+func AddFieldLabelConversionsForNamespace(scheme *runtime.Scheme) error {
+ return scheme.AddFieldLabelConversionFunc("v1", "Namespace",
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "status.phase",
+ "metadata.name":
+ return label, value, nil
+ default:
+ return "", "", fmt.Errorf("field label not supported: %s", label)
+ }
+ })
+}
+
+func AddFieldLabelConversionsForSecret(scheme *runtime.Scheme) error {
+ return scheme.AddFieldLabelConversionFunc("v1", "Secret",
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "type",
+ "metadata.namespace",
+ "metadata.name":
+ return label, value, nil
+ default:
+ return "", "", fmt.Errorf("field label not supported: %s", label)
+ }
+ })
+}
diff --git a/vendor/k8s.io/client-go/pkg/api/v1/defaults.go b/vendor/k8s.io/client-go/pkg/api/v1/defaults.go
new file mode 100644
index 000000000..a791ba7b5
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/v1/defaults.go
@@ -0,0 +1,373 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/intstr"
+ "k8s.io/client-go/pkg/util"
+ "k8s.io/client-go/pkg/util/parsers"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
+
+func SetDefaults_ResourceList(obj *ResourceList) {
+ for key, val := range *obj {
+ // TODO(#18538): We round up resource values to milli scale to maintain API compatibility.
+ // In the future, we should instead reject values that need rounding.
+ const milliScale = -3
+ val.RoundUp(milliScale)
+
+ (*obj)[ResourceName(key)] = val
+ }
+}
+
+func SetDefaults_PodExecOptions(obj *PodExecOptions) {
+ obj.Stdout = true
+ obj.Stderr = true
+}
+func SetDefaults_PodAttachOptions(obj *PodAttachOptions) {
+ obj.Stdout = true
+ obj.Stderr = true
+}
+func SetDefaults_ReplicationController(obj *ReplicationController) {
+ var labels map[string]string
+ if obj.Spec.Template != nil {
+ labels = obj.Spec.Template.Labels
+ }
+ // TODO: support templates defined elsewhere when we support them in the API
+ if labels != nil {
+ if len(obj.Spec.Selector) == 0 {
+ obj.Spec.Selector = labels
+ }
+ if len(obj.Labels) == 0 {
+ obj.Labels = labels
+ }
+ }
+ if obj.Spec.Replicas == nil {
+ obj.Spec.Replicas = new(int32)
+ *obj.Spec.Replicas = 1
+ }
+}
+func SetDefaults_Volume(obj *Volume) {
+ if util.AllPtrFieldsNil(&obj.VolumeSource) {
+ obj.VolumeSource = VolumeSource{
+ EmptyDir: &EmptyDirVolumeSource{},
+ }
+ }
+}
+func SetDefaults_ContainerPort(obj *ContainerPort) {
+ if obj.Protocol == "" {
+ obj.Protocol = ProtocolTCP
+ }
+}
+func SetDefaults_Container(obj *Container) {
+ if obj.ImagePullPolicy == "" {
+ // Ignore error and assume it has been validated elsewhere
+ _, tag, _, _ := parsers.ParseImageName(obj.Image)
+
+ // Check image tag
+ if tag == "latest" {
+ obj.ImagePullPolicy = PullAlways
+ } else {
+ obj.ImagePullPolicy = PullIfNotPresent
+ }
+ }
+ if obj.TerminationMessagePath == "" {
+ obj.TerminationMessagePath = TerminationMessagePathDefault
+ }
+ if obj.TerminationMessagePolicy == "" {
+ obj.TerminationMessagePolicy = TerminationMessageReadFile
+ }
+}
+func SetDefaults_Service(obj *Service) {
+ if obj.Spec.SessionAffinity == "" {
+ obj.Spec.SessionAffinity = ServiceAffinityNone
+ }
+ if obj.Spec.Type == "" {
+ obj.Spec.Type = ServiceTypeClusterIP
+ }
+ for i := range obj.Spec.Ports {
+ sp := &obj.Spec.Ports[i]
+ if sp.Protocol == "" {
+ sp.Protocol = ProtocolTCP
+ }
+ if sp.TargetPort == intstr.FromInt(0) || sp.TargetPort == intstr.FromString("") {
+ sp.TargetPort = intstr.FromInt(int(sp.Port))
+ }
+ }
+ // Defaults ExternalTrafficPolicy field for NodePort / LoadBalancer service
+ // to Global for consistency.
+ if _, ok := obj.Annotations[BetaAnnotationExternalTraffic]; ok {
+ // Don't default this field if beta annotation exists.
+ return
+ } else if (obj.Spec.Type == ServiceTypeNodePort ||
+ obj.Spec.Type == ServiceTypeLoadBalancer) &&
+ obj.Spec.ExternalTrafficPolicy == "" {
+ obj.Spec.ExternalTrafficPolicy = ServiceExternalTrafficPolicyTypeCluster
+ }
+}
+func SetDefaults_Pod(obj *Pod) {
+ // If limits are specified, but requests are not, default requests to limits
+ // This is done here rather than a more specific defaulting pass on ResourceRequirements
+ // because we only want this defaulting semantic to take place on a Pod and not a PodTemplate
+ for i := range obj.Spec.Containers {
+ // set requests to limits if requests are not specified, but limits are
+ if obj.Spec.Containers[i].Resources.Limits != nil {
+ if obj.Spec.Containers[i].Resources.Requests == nil {
+ obj.Spec.Containers[i].Resources.Requests = make(ResourceList)
+ }
+ for key, value := range obj.Spec.Containers[i].Resources.Limits {
+ if _, exists := obj.Spec.Containers[i].Resources.Requests[key]; !exists {
+ obj.Spec.Containers[i].Resources.Requests[key] = *(value.Copy())
+ }
+ }
+ }
+ }
+ for i := range obj.Spec.InitContainers {
+ if obj.Spec.InitContainers[i].Resources.Limits != nil {
+ if obj.Spec.InitContainers[i].Resources.Requests == nil {
+ obj.Spec.InitContainers[i].Resources.Requests = make(ResourceList)
+ }
+ for key, value := range obj.Spec.InitContainers[i].Resources.Limits {
+ if _, exists := obj.Spec.InitContainers[i].Resources.Requests[key]; !exists {
+ obj.Spec.InitContainers[i].Resources.Requests[key] = *(value.Copy())
+ }
+ }
+ }
+ }
+}
+func SetDefaults_PodSpec(obj *PodSpec) {
+ if obj.DNSPolicy == "" {
+ obj.DNSPolicy = DNSClusterFirst
+ }
+ if obj.RestartPolicy == "" {
+ obj.RestartPolicy = RestartPolicyAlways
+ }
+ if obj.HostNetwork {
+ defaultHostNetworkPorts(&obj.Containers)
+ defaultHostNetworkPorts(&obj.InitContainers)
+ }
+ if obj.SecurityContext == nil {
+ obj.SecurityContext = &PodSecurityContext{}
+ }
+ if obj.TerminationGracePeriodSeconds == nil {
+ period := int64(DefaultTerminationGracePeriodSeconds)
+ obj.TerminationGracePeriodSeconds = &period
+ }
+ if obj.SchedulerName == "" {
+ obj.SchedulerName = DefaultSchedulerName
+ }
+}
+func SetDefaults_Probe(obj *Probe) {
+ if obj.TimeoutSeconds == 0 {
+ obj.TimeoutSeconds = 1
+ }
+ if obj.PeriodSeconds == 0 {
+ obj.PeriodSeconds = 10
+ }
+ if obj.SuccessThreshold == 0 {
+ obj.SuccessThreshold = 1
+ }
+ if obj.FailureThreshold == 0 {
+ obj.FailureThreshold = 3
+ }
+}
+func SetDefaults_SecretVolumeSource(obj *SecretVolumeSource) {
+ if obj.DefaultMode == nil {
+ perm := int32(SecretVolumeSourceDefaultMode)
+ obj.DefaultMode = &perm
+ }
+}
+func SetDefaults_ConfigMapVolumeSource(obj *ConfigMapVolumeSource) {
+ if obj.DefaultMode == nil {
+ perm := int32(ConfigMapVolumeSourceDefaultMode)
+ obj.DefaultMode = &perm
+ }
+}
+func SetDefaults_DownwardAPIVolumeSource(obj *DownwardAPIVolumeSource) {
+ if obj.DefaultMode == nil {
+ perm := int32(DownwardAPIVolumeSourceDefaultMode)
+ obj.DefaultMode = &perm
+ }
+}
+func SetDefaults_Secret(obj *Secret) {
+ if obj.Type == "" {
+ obj.Type = SecretTypeOpaque
+ }
+}
+func SetDefaults_ProjectedVolumeSource(obj *ProjectedVolumeSource) {
+ if obj.DefaultMode == nil {
+ perm := int32(ProjectedVolumeSourceDefaultMode)
+ obj.DefaultMode = &perm
+ }
+}
+func SetDefaults_PersistentVolume(obj *PersistentVolume) {
+ if obj.Status.Phase == "" {
+ obj.Status.Phase = VolumePending
+ }
+ if obj.Spec.PersistentVolumeReclaimPolicy == "" {
+ obj.Spec.PersistentVolumeReclaimPolicy = PersistentVolumeReclaimRetain
+ }
+}
+func SetDefaults_PersistentVolumeClaim(obj *PersistentVolumeClaim) {
+ if obj.Status.Phase == "" {
+ obj.Status.Phase = ClaimPending
+ }
+}
+func SetDefaults_ISCSIVolumeSource(obj *ISCSIVolumeSource) {
+ if obj.ISCSIInterface == "" {
+ obj.ISCSIInterface = "default"
+ }
+}
+func SetDefaults_AzureDiskVolumeSource(obj *AzureDiskVolumeSource) {
+ if obj.CachingMode == nil {
+ obj.CachingMode = new(AzureDataDiskCachingMode)
+ *obj.CachingMode = AzureDataDiskCachingReadWrite
+ }
+ if obj.Kind == nil {
+ obj.Kind = new(AzureDataDiskKind)
+ *obj.Kind = AzureSharedBlobDisk
+ }
+ if obj.FSType == nil {
+ obj.FSType = new(string)
+ *obj.FSType = "ext4"
+ }
+ if obj.ReadOnly == nil {
+ obj.ReadOnly = new(bool)
+ *obj.ReadOnly = false
+ }
+}
+func SetDefaults_Endpoints(obj *Endpoints) {
+ for i := range obj.Subsets {
+ ss := &obj.Subsets[i]
+ for i := range ss.Ports {
+ ep := &ss.Ports[i]
+ if ep.Protocol == "" {
+ ep.Protocol = ProtocolTCP
+ }
+ }
+ }
+}
+func SetDefaults_HTTPGetAction(obj *HTTPGetAction) {
+ if obj.Path == "" {
+ obj.Path = "/"
+ }
+ if obj.Scheme == "" {
+ obj.Scheme = URISchemeHTTP
+ }
+}
+func SetDefaults_NamespaceStatus(obj *NamespaceStatus) {
+ if obj.Phase == "" {
+ obj.Phase = NamespaceActive
+ }
+}
+func SetDefaults_Node(obj *Node) {
+ if obj.Spec.ExternalID == "" {
+ obj.Spec.ExternalID = obj.Name
+ }
+}
+func SetDefaults_NodeStatus(obj *NodeStatus) {
+ if obj.Allocatable == nil && obj.Capacity != nil {
+ obj.Allocatable = make(ResourceList, len(obj.Capacity))
+ for key, value := range obj.Capacity {
+ obj.Allocatable[key] = *(value.Copy())
+ }
+ obj.Allocatable = obj.Capacity
+ }
+}
+func SetDefaults_ObjectFieldSelector(obj *ObjectFieldSelector) {
+ if obj.APIVersion == "" {
+ obj.APIVersion = "v1"
+ }
+}
+func SetDefaults_LimitRangeItem(obj *LimitRangeItem) {
+ // for container limits, we apply default values
+ if obj.Type == LimitTypeContainer {
+
+ if obj.Default == nil {
+ obj.Default = make(ResourceList)
+ }
+ if obj.DefaultRequest == nil {
+ obj.DefaultRequest = make(ResourceList)
+ }
+
+ // If a default limit is unspecified, but the max is specified, default the limit to the max
+ for key, value := range obj.Max {
+ if _, exists := obj.Default[key]; !exists {
+ obj.Default[key] = *(value.Copy())
+ }
+ }
+ // If a default limit is specified, but the default request is not, default request to limit
+ for key, value := range obj.Default {
+ if _, exists := obj.DefaultRequest[key]; !exists {
+ obj.DefaultRequest[key] = *(value.Copy())
+ }
+ }
+ // If a default request is not specified, but the min is provided, default request to the min
+ for key, value := range obj.Min {
+ if _, exists := obj.DefaultRequest[key]; !exists {
+ obj.DefaultRequest[key] = *(value.Copy())
+ }
+ }
+ }
+}
+func SetDefaults_ConfigMap(obj *ConfigMap) {
+ if obj.Data == nil {
+ obj.Data = make(map[string]string)
+ }
+}
+
+// With host networking default all container ports to host ports.
+func defaultHostNetworkPorts(containers *[]Container) {
+ for i := range *containers {
+ for j := range (*containers)[i].Ports {
+ if (*containers)[i].Ports[j].HostPort == 0 {
+ (*containers)[i].Ports[j].HostPort = (*containers)[i].Ports[j].ContainerPort
+ }
+ }
+ }
+}
+
+func SetDefaults_RBDVolumeSource(obj *RBDVolumeSource) {
+ if obj.RBDPool == "" {
+ obj.RBDPool = "rbd"
+ }
+ if obj.RadosUser == "" {
+ obj.RadosUser = "admin"
+ }
+ if obj.Keyring == "" {
+ obj.Keyring = "/etc/ceph/keyring"
+ }
+}
+
+func SetDefaults_ScaleIOVolumeSource(obj *ScaleIOVolumeSource) {
+ if obj.ProtectionDomain == "" {
+ obj.ProtectionDomain = "default"
+ }
+ if obj.StoragePool == "" {
+ obj.StoragePool = "default"
+ }
+ if obj.StorageMode == "" {
+ obj.StorageMode = "ThinProvisioned"
+ }
+ if obj.FSType == "" {
+ obj.FSType = "xfs"
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/api/v1/doc.go b/vendor/k8s.io/client-go/pkg/api/v1/doc.go
new file mode 100644
index 000000000..0fdd87f75
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/v1/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package v1 is the v1 version of the API.
+package v1
diff --git a/vendor/k8s.io/client-go/pkg/api/v1/generate.go b/vendor/k8s.io/client-go/pkg/api/v1/generate.go
new file mode 100644
index 000000000..b8c44e4c7
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/v1/generate.go
@@ -0,0 +1,64 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "fmt"
+
+ utilrand "k8s.io/apimachinery/pkg/util/rand"
+)
+
+// NameGenerator generates names for objects. Some backends may have more information
+// available to guide selection of new names and this interface hides those details.
+type NameGenerator interface {
+ // GenerateName generates a valid name from the base name, adding a random suffix to the
+ // the base. If base is valid, the returned name must also be valid. The generator is
+ // responsible for knowing the maximum valid name length.
+ GenerateName(base string) string
+}
+
+// GenerateName will resolve the object name of the provided ObjectMeta to a generated version if
+// necessary. It expects that validation for ObjectMeta has already completed (that Base is a
+// valid name) and that the NameGenerator generates a name that is also valid.
+func GenerateName(u NameGenerator, meta *ObjectMeta) {
+ if len(meta.GenerateName) == 0 || len(meta.Name) != 0 {
+ return
+ }
+ meta.Name = u.GenerateName(meta.GenerateName)
+}
+
+// simpleNameGenerator generates random names.
+type simpleNameGenerator struct{}
+
+// SimpleNameGenerator is a generator that returns the name plus a random suffix of five alphanumerics
+// when a name is requested. The string is guaranteed to not exceed the length of a standard Kubernetes
+// name (63 characters)
+var SimpleNameGenerator NameGenerator = simpleNameGenerator{}
+
+const (
+ // TODO: make this flexible for non-core resources with alternate naming rules.
+ maxNameLength = 63
+ randomLength = 5
+ maxGeneratedNameLength = maxNameLength - randomLength
+)
+
+func (simpleNameGenerator) GenerateName(base string) string {
+ if len(base) > maxGeneratedNameLength {
+ base = base[:maxGeneratedNameLength]
+ }
+ return fmt.Sprintf("%s%s", base, utilrand.String(randomLength))
+}
diff --git a/vendor/k8s.io/client-go/pkg/api/v1/generated.pb.go b/vendor/k8s.io/client-go/pkg/api/v1/generated.pb.go
new file mode 100644
index 000000000..dcfc99ea0
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/v1/generated.pb.go
@@ -0,0 +1,45110 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/api/v1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/api/v1/generated.proto
+
+ It has these top-level messages:
+ AWSElasticBlockStoreVolumeSource
+ Affinity
+ AttachedVolume
+ AvoidPods
+ AzureDiskVolumeSource
+ AzureFileVolumeSource
+ Binding
+ Capabilities
+ CephFSVolumeSource
+ CinderVolumeSource
+ ComponentCondition
+ ComponentStatus
+ ComponentStatusList
+ ConfigMap
+ ConfigMapEnvSource
+ ConfigMapKeySelector
+ ConfigMapList
+ ConfigMapProjection
+ ConfigMapVolumeSource
+ Container
+ ContainerImage
+ ContainerPort
+ ContainerState
+ ContainerStateRunning
+ ContainerStateTerminated
+ ContainerStateWaiting
+ ContainerStatus
+ DaemonEndpoint
+ DeleteOptions
+ DownwardAPIProjection
+ DownwardAPIVolumeFile
+ DownwardAPIVolumeSource
+ EmptyDirVolumeSource
+ EndpointAddress
+ EndpointPort
+ EndpointSubset
+ Endpoints
+ EndpointsList
+ EnvFromSource
+ EnvVar
+ EnvVarSource
+ Event
+ EventList
+ EventSource
+ ExecAction
+ FCVolumeSource
+ FlexVolumeSource
+ FlockerVolumeSource
+ GCEPersistentDiskVolumeSource
+ GitRepoVolumeSource
+ GlusterfsVolumeSource
+ HTTPGetAction
+ HTTPHeader
+ Handler
+ HostAlias
+ HostPathVolumeSource
+ ISCSIVolumeSource
+ KeyToPath
+ Lifecycle
+ LimitRange
+ LimitRangeItem
+ LimitRangeList
+ LimitRangeSpec
+ List
+ ListOptions
+ LoadBalancerIngress
+ LoadBalancerStatus
+ LocalObjectReference
+ LocalVolumeSource
+ NFSVolumeSource
+ Namespace
+ NamespaceList
+ NamespaceSpec
+ NamespaceStatus
+ Node
+ NodeAddress
+ NodeAffinity
+ NodeCondition
+ NodeDaemonEndpoints
+ NodeList
+ NodeProxyOptions
+ NodeResources
+ NodeSelector
+ NodeSelectorRequirement
+ NodeSelectorTerm
+ NodeSpec
+ NodeStatus
+ NodeSystemInfo
+ ObjectFieldSelector
+ ObjectMeta
+ ObjectReference
+ PersistentVolume
+ PersistentVolumeClaim
+ PersistentVolumeClaimList
+ PersistentVolumeClaimSpec
+ PersistentVolumeClaimStatus
+ PersistentVolumeClaimVolumeSource
+ PersistentVolumeList
+ PersistentVolumeSource
+ PersistentVolumeSpec
+ PersistentVolumeStatus
+ PhotonPersistentDiskVolumeSource
+ Pod
+ PodAffinity
+ PodAffinityTerm
+ PodAntiAffinity
+ PodAttachOptions
+ PodCondition
+ PodExecOptions
+ PodList
+ PodLogOptions
+ PodPortForwardOptions
+ PodProxyOptions
+ PodSecurityContext
+ PodSignature
+ PodSpec
+ PodStatus
+ PodStatusResult
+ PodTemplate
+ PodTemplateList
+ PodTemplateSpec
+ PortworxVolumeSource
+ Preconditions
+ PreferAvoidPodsEntry
+ PreferredSchedulingTerm
+ Probe
+ ProjectedVolumeSource
+ QuobyteVolumeSource
+ RBDVolumeSource
+ RangeAllocation
+ ReplicationController
+ ReplicationControllerCondition
+ ReplicationControllerList
+ ReplicationControllerSpec
+ ReplicationControllerStatus
+ ResourceFieldSelector
+ ResourceQuota
+ ResourceQuotaList
+ ResourceQuotaSpec
+ ResourceQuotaStatus
+ ResourceRequirements
+ SELinuxOptions
+ ScaleIOVolumeSource
+ Secret
+ SecretEnvSource
+ SecretKeySelector
+ SecretList
+ SecretProjection
+ SecretVolumeSource
+ SecurityContext
+ SerializedReference
+ Service
+ ServiceAccount
+ ServiceAccountList
+ ServiceList
+ ServicePort
+ ServiceProxyOptions
+ ServiceSpec
+ ServiceStatus
+ StorageOSPersistentVolumeSource
+ StorageOSVolumeSource
+ Sysctl
+ TCPSocketAction
+ Taint
+ Toleration
+ Volume
+ VolumeMount
+ VolumeProjection
+ VolumeSource
+ VsphereVirtualDiskVolumeSource
+ WeightedPodAffinityTerm
+*/
+package v1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_apimachinery_pkg_api_resource "k8s.io/apimachinery/pkg/api/resource"
+import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+import k8s_io_apimachinery_pkg_runtime "k8s.io/apimachinery/pkg/runtime"
+
+import k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types"
+
+import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *AWSElasticBlockStoreVolumeSource) Reset() { *m = AWSElasticBlockStoreVolumeSource{} }
+func (*AWSElasticBlockStoreVolumeSource) ProtoMessage() {}
+func (*AWSElasticBlockStoreVolumeSource) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{0}
+}
+
+func (m *Affinity) Reset() { *m = Affinity{} }
+func (*Affinity) ProtoMessage() {}
+func (*Affinity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *AttachedVolume) Reset() { *m = AttachedVolume{} }
+func (*AttachedVolume) ProtoMessage() {}
+func (*AttachedVolume) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
+
+func (m *AvoidPods) Reset() { *m = AvoidPods{} }
+func (*AvoidPods) ProtoMessage() {}
+func (*AvoidPods) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
+
+func (m *AzureDiskVolumeSource) Reset() { *m = AzureDiskVolumeSource{} }
+func (*AzureDiskVolumeSource) ProtoMessage() {}
+func (*AzureDiskVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
+
+func (m *AzureFileVolumeSource) Reset() { *m = AzureFileVolumeSource{} }
+func (*AzureFileVolumeSource) ProtoMessage() {}
+func (*AzureFileVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
+
+func (m *Binding) Reset() { *m = Binding{} }
+func (*Binding) ProtoMessage() {}
+func (*Binding) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
+
+func (m *Capabilities) Reset() { *m = Capabilities{} }
+func (*Capabilities) ProtoMessage() {}
+func (*Capabilities) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
+
+func (m *CephFSVolumeSource) Reset() { *m = CephFSVolumeSource{} }
+func (*CephFSVolumeSource) ProtoMessage() {}
+func (*CephFSVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
+
+func (m *CinderVolumeSource) Reset() { *m = CinderVolumeSource{} }
+func (*CinderVolumeSource) ProtoMessage() {}
+func (*CinderVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
+
+func (m *ComponentCondition) Reset() { *m = ComponentCondition{} }
+func (*ComponentCondition) ProtoMessage() {}
+func (*ComponentCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
+
+func (m *ComponentStatus) Reset() { *m = ComponentStatus{} }
+func (*ComponentStatus) ProtoMessage() {}
+func (*ComponentStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} }
+
+func (m *ComponentStatusList) Reset() { *m = ComponentStatusList{} }
+func (*ComponentStatusList) ProtoMessage() {}
+func (*ComponentStatusList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} }
+
+func (m *ConfigMap) Reset() { *m = ConfigMap{} }
+func (*ConfigMap) ProtoMessage() {}
+func (*ConfigMap) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} }
+
+func (m *ConfigMapEnvSource) Reset() { *m = ConfigMapEnvSource{} }
+func (*ConfigMapEnvSource) ProtoMessage() {}
+func (*ConfigMapEnvSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} }
+
+func (m *ConfigMapKeySelector) Reset() { *m = ConfigMapKeySelector{} }
+func (*ConfigMapKeySelector) ProtoMessage() {}
+func (*ConfigMapKeySelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} }
+
+func (m *ConfigMapList) Reset() { *m = ConfigMapList{} }
+func (*ConfigMapList) ProtoMessage() {}
+func (*ConfigMapList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} }
+
+func (m *ConfigMapProjection) Reset() { *m = ConfigMapProjection{} }
+func (*ConfigMapProjection) ProtoMessage() {}
+func (*ConfigMapProjection) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} }
+
+func (m *ConfigMapVolumeSource) Reset() { *m = ConfigMapVolumeSource{} }
+func (*ConfigMapVolumeSource) ProtoMessage() {}
+func (*ConfigMapVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} }
+
+func (m *Container) Reset() { *m = Container{} }
+func (*Container) ProtoMessage() {}
+func (*Container) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} }
+
+func (m *ContainerImage) Reset() { *m = ContainerImage{} }
+func (*ContainerImage) ProtoMessage() {}
+func (*ContainerImage) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{20} }
+
+func (m *ContainerPort) Reset() { *m = ContainerPort{} }
+func (*ContainerPort) ProtoMessage() {}
+func (*ContainerPort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{21} }
+
+func (m *ContainerState) Reset() { *m = ContainerState{} }
+func (*ContainerState) ProtoMessage() {}
+func (*ContainerState) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{22} }
+
+func (m *ContainerStateRunning) Reset() { *m = ContainerStateRunning{} }
+func (*ContainerStateRunning) ProtoMessage() {}
+func (*ContainerStateRunning) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{23} }
+
+func (m *ContainerStateTerminated) Reset() { *m = ContainerStateTerminated{} }
+func (*ContainerStateTerminated) ProtoMessage() {}
+func (*ContainerStateTerminated) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{24}
+}
+
+func (m *ContainerStateWaiting) Reset() { *m = ContainerStateWaiting{} }
+func (*ContainerStateWaiting) ProtoMessage() {}
+func (*ContainerStateWaiting) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} }
+
+func (m *ContainerStatus) Reset() { *m = ContainerStatus{} }
+func (*ContainerStatus) ProtoMessage() {}
+func (*ContainerStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{26} }
+
+func (m *DaemonEndpoint) Reset() { *m = DaemonEndpoint{} }
+func (*DaemonEndpoint) ProtoMessage() {}
+func (*DaemonEndpoint) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{27} }
+
+func (m *DeleteOptions) Reset() { *m = DeleteOptions{} }
+func (*DeleteOptions) ProtoMessage() {}
+func (*DeleteOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{28} }
+
+func (m *DownwardAPIProjection) Reset() { *m = DownwardAPIProjection{} }
+func (*DownwardAPIProjection) ProtoMessage() {}
+func (*DownwardAPIProjection) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{29} }
+
+func (m *DownwardAPIVolumeFile) Reset() { *m = DownwardAPIVolumeFile{} }
+func (*DownwardAPIVolumeFile) ProtoMessage() {}
+func (*DownwardAPIVolumeFile) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{30} }
+
+func (m *DownwardAPIVolumeSource) Reset() { *m = DownwardAPIVolumeSource{} }
+func (*DownwardAPIVolumeSource) ProtoMessage() {}
+func (*DownwardAPIVolumeSource) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{31}
+}
+
+func (m *EmptyDirVolumeSource) Reset() { *m = EmptyDirVolumeSource{} }
+func (*EmptyDirVolumeSource) ProtoMessage() {}
+func (*EmptyDirVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{32} }
+
+func (m *EndpointAddress) Reset() { *m = EndpointAddress{} }
+func (*EndpointAddress) ProtoMessage() {}
+func (*EndpointAddress) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{33} }
+
+func (m *EndpointPort) Reset() { *m = EndpointPort{} }
+func (*EndpointPort) ProtoMessage() {}
+func (*EndpointPort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{34} }
+
+func (m *EndpointSubset) Reset() { *m = EndpointSubset{} }
+func (*EndpointSubset) ProtoMessage() {}
+func (*EndpointSubset) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{35} }
+
+func (m *Endpoints) Reset() { *m = Endpoints{} }
+func (*Endpoints) ProtoMessage() {}
+func (*Endpoints) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{36} }
+
+func (m *EndpointsList) Reset() { *m = EndpointsList{} }
+func (*EndpointsList) ProtoMessage() {}
+func (*EndpointsList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{37} }
+
+func (m *EnvFromSource) Reset() { *m = EnvFromSource{} }
+func (*EnvFromSource) ProtoMessage() {}
+func (*EnvFromSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{38} }
+
+func (m *EnvVar) Reset() { *m = EnvVar{} }
+func (*EnvVar) ProtoMessage() {}
+func (*EnvVar) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{39} }
+
+func (m *EnvVarSource) Reset() { *m = EnvVarSource{} }
+func (*EnvVarSource) ProtoMessage() {}
+func (*EnvVarSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{40} }
+
+func (m *Event) Reset() { *m = Event{} }
+func (*Event) ProtoMessage() {}
+func (*Event) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{41} }
+
+func (m *EventList) Reset() { *m = EventList{} }
+func (*EventList) ProtoMessage() {}
+func (*EventList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{42} }
+
+func (m *EventSource) Reset() { *m = EventSource{} }
+func (*EventSource) ProtoMessage() {}
+func (*EventSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{43} }
+
+func (m *ExecAction) Reset() { *m = ExecAction{} }
+func (*ExecAction) ProtoMessage() {}
+func (*ExecAction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{44} }
+
+func (m *FCVolumeSource) Reset() { *m = FCVolumeSource{} }
+func (*FCVolumeSource) ProtoMessage() {}
+func (*FCVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{45} }
+
+func (m *FlexVolumeSource) Reset() { *m = FlexVolumeSource{} }
+func (*FlexVolumeSource) ProtoMessage() {}
+func (*FlexVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{46} }
+
+func (m *FlockerVolumeSource) Reset() { *m = FlockerVolumeSource{} }
+func (*FlockerVolumeSource) ProtoMessage() {}
+func (*FlockerVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{47} }
+
+func (m *GCEPersistentDiskVolumeSource) Reset() { *m = GCEPersistentDiskVolumeSource{} }
+func (*GCEPersistentDiskVolumeSource) ProtoMessage() {}
+func (*GCEPersistentDiskVolumeSource) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{48}
+}
+
+func (m *GitRepoVolumeSource) Reset() { *m = GitRepoVolumeSource{} }
+func (*GitRepoVolumeSource) ProtoMessage() {}
+func (*GitRepoVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{49} }
+
+func (m *GlusterfsVolumeSource) Reset() { *m = GlusterfsVolumeSource{} }
+func (*GlusterfsVolumeSource) ProtoMessage() {}
+func (*GlusterfsVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{50} }
+
+func (m *HTTPGetAction) Reset() { *m = HTTPGetAction{} }
+func (*HTTPGetAction) ProtoMessage() {}
+func (*HTTPGetAction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{51} }
+
+func (m *HTTPHeader) Reset() { *m = HTTPHeader{} }
+func (*HTTPHeader) ProtoMessage() {}
+func (*HTTPHeader) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{52} }
+
+func (m *Handler) Reset() { *m = Handler{} }
+func (*Handler) ProtoMessage() {}
+func (*Handler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{53} }
+
+func (m *HostAlias) Reset() { *m = HostAlias{} }
+func (*HostAlias) ProtoMessage() {}
+func (*HostAlias) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{54} }
+
+func (m *HostPathVolumeSource) Reset() { *m = HostPathVolumeSource{} }
+func (*HostPathVolumeSource) ProtoMessage() {}
+func (*HostPathVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{55} }
+
+func (m *ISCSIVolumeSource) Reset() { *m = ISCSIVolumeSource{} }
+func (*ISCSIVolumeSource) ProtoMessage() {}
+func (*ISCSIVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{56} }
+
+func (m *KeyToPath) Reset() { *m = KeyToPath{} }
+func (*KeyToPath) ProtoMessage() {}
+func (*KeyToPath) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{57} }
+
+func (m *Lifecycle) Reset() { *m = Lifecycle{} }
+func (*Lifecycle) ProtoMessage() {}
+func (*Lifecycle) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{58} }
+
+func (m *LimitRange) Reset() { *m = LimitRange{} }
+func (*LimitRange) ProtoMessage() {}
+func (*LimitRange) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{59} }
+
+func (m *LimitRangeItem) Reset() { *m = LimitRangeItem{} }
+func (*LimitRangeItem) ProtoMessage() {}
+func (*LimitRangeItem) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{60} }
+
+func (m *LimitRangeList) Reset() { *m = LimitRangeList{} }
+func (*LimitRangeList) ProtoMessage() {}
+func (*LimitRangeList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{61} }
+
+func (m *LimitRangeSpec) Reset() { *m = LimitRangeSpec{} }
+func (*LimitRangeSpec) ProtoMessage() {}
+func (*LimitRangeSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{62} }
+
+func (m *List) Reset() { *m = List{} }
+func (*List) ProtoMessage() {}
+func (*List) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{63} }
+
+func (m *ListOptions) Reset() { *m = ListOptions{} }
+func (*ListOptions) ProtoMessage() {}
+func (*ListOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{64} }
+
+func (m *LoadBalancerIngress) Reset() { *m = LoadBalancerIngress{} }
+func (*LoadBalancerIngress) ProtoMessage() {}
+func (*LoadBalancerIngress) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{65} }
+
+func (m *LoadBalancerStatus) Reset() { *m = LoadBalancerStatus{} }
+func (*LoadBalancerStatus) ProtoMessage() {}
+func (*LoadBalancerStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{66} }
+
+func (m *LocalObjectReference) Reset() { *m = LocalObjectReference{} }
+func (*LocalObjectReference) ProtoMessage() {}
+func (*LocalObjectReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{67} }
+
+func (m *LocalVolumeSource) Reset() { *m = LocalVolumeSource{} }
+func (*LocalVolumeSource) ProtoMessage() {}
+func (*LocalVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{68} }
+
+func (m *NFSVolumeSource) Reset() { *m = NFSVolumeSource{} }
+func (*NFSVolumeSource) ProtoMessage() {}
+func (*NFSVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{69} }
+
+func (m *Namespace) Reset() { *m = Namespace{} }
+func (*Namespace) ProtoMessage() {}
+func (*Namespace) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{70} }
+
+func (m *NamespaceList) Reset() { *m = NamespaceList{} }
+func (*NamespaceList) ProtoMessage() {}
+func (*NamespaceList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{71} }
+
+func (m *NamespaceSpec) Reset() { *m = NamespaceSpec{} }
+func (*NamespaceSpec) ProtoMessage() {}
+func (*NamespaceSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{72} }
+
+func (m *NamespaceStatus) Reset() { *m = NamespaceStatus{} }
+func (*NamespaceStatus) ProtoMessage() {}
+func (*NamespaceStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{73} }
+
+func (m *Node) Reset() { *m = Node{} }
+func (*Node) ProtoMessage() {}
+func (*Node) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{74} }
+
+func (m *NodeAddress) Reset() { *m = NodeAddress{} }
+func (*NodeAddress) ProtoMessage() {}
+func (*NodeAddress) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{75} }
+
+func (m *NodeAffinity) Reset() { *m = NodeAffinity{} }
+func (*NodeAffinity) ProtoMessage() {}
+func (*NodeAffinity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{76} }
+
+func (m *NodeCondition) Reset() { *m = NodeCondition{} }
+func (*NodeCondition) ProtoMessage() {}
+func (*NodeCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{77} }
+
+func (m *NodeDaemonEndpoints) Reset() { *m = NodeDaemonEndpoints{} }
+func (*NodeDaemonEndpoints) ProtoMessage() {}
+func (*NodeDaemonEndpoints) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{78} }
+
+func (m *NodeList) Reset() { *m = NodeList{} }
+func (*NodeList) ProtoMessage() {}
+func (*NodeList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{79} }
+
+func (m *NodeProxyOptions) Reset() { *m = NodeProxyOptions{} }
+func (*NodeProxyOptions) ProtoMessage() {}
+func (*NodeProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{80} }
+
+func (m *NodeResources) Reset() { *m = NodeResources{} }
+func (*NodeResources) ProtoMessage() {}
+func (*NodeResources) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{81} }
+
+func (m *NodeSelector) Reset() { *m = NodeSelector{} }
+func (*NodeSelector) ProtoMessage() {}
+func (*NodeSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{82} }
+
+func (m *NodeSelectorRequirement) Reset() { *m = NodeSelectorRequirement{} }
+func (*NodeSelectorRequirement) ProtoMessage() {}
+func (*NodeSelectorRequirement) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{83}
+}
+
+func (m *NodeSelectorTerm) Reset() { *m = NodeSelectorTerm{} }
+func (*NodeSelectorTerm) ProtoMessage() {}
+func (*NodeSelectorTerm) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{84} }
+
+func (m *NodeSpec) Reset() { *m = NodeSpec{} }
+func (*NodeSpec) ProtoMessage() {}
+func (*NodeSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{85} }
+
+func (m *NodeStatus) Reset() { *m = NodeStatus{} }
+func (*NodeStatus) ProtoMessage() {}
+func (*NodeStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{86} }
+
+func (m *NodeSystemInfo) Reset() { *m = NodeSystemInfo{} }
+func (*NodeSystemInfo) ProtoMessage() {}
+func (*NodeSystemInfo) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{87} }
+
+func (m *ObjectFieldSelector) Reset() { *m = ObjectFieldSelector{} }
+func (*ObjectFieldSelector) ProtoMessage() {}
+func (*ObjectFieldSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{88} }
+
+func (m *ObjectMeta) Reset() { *m = ObjectMeta{} }
+func (*ObjectMeta) ProtoMessage() {}
+func (*ObjectMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{89} }
+
+func (m *ObjectReference) Reset() { *m = ObjectReference{} }
+func (*ObjectReference) ProtoMessage() {}
+func (*ObjectReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{90} }
+
+func (m *PersistentVolume) Reset() { *m = PersistentVolume{} }
+func (*PersistentVolume) ProtoMessage() {}
+func (*PersistentVolume) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{91} }
+
+func (m *PersistentVolumeClaim) Reset() { *m = PersistentVolumeClaim{} }
+func (*PersistentVolumeClaim) ProtoMessage() {}
+func (*PersistentVolumeClaim) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{92} }
+
+func (m *PersistentVolumeClaimList) Reset() { *m = PersistentVolumeClaimList{} }
+func (*PersistentVolumeClaimList) ProtoMessage() {}
+func (*PersistentVolumeClaimList) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{93}
+}
+
+func (m *PersistentVolumeClaimSpec) Reset() { *m = PersistentVolumeClaimSpec{} }
+func (*PersistentVolumeClaimSpec) ProtoMessage() {}
+func (*PersistentVolumeClaimSpec) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{94}
+}
+
+func (m *PersistentVolumeClaimStatus) Reset() { *m = PersistentVolumeClaimStatus{} }
+func (*PersistentVolumeClaimStatus) ProtoMessage() {}
+func (*PersistentVolumeClaimStatus) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{95}
+}
+
+func (m *PersistentVolumeClaimVolumeSource) Reset() { *m = PersistentVolumeClaimVolumeSource{} }
+func (*PersistentVolumeClaimVolumeSource) ProtoMessage() {}
+func (*PersistentVolumeClaimVolumeSource) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{96}
+}
+
+func (m *PersistentVolumeList) Reset() { *m = PersistentVolumeList{} }
+func (*PersistentVolumeList) ProtoMessage() {}
+func (*PersistentVolumeList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{97} }
+
+func (m *PersistentVolumeSource) Reset() { *m = PersistentVolumeSource{} }
+func (*PersistentVolumeSource) ProtoMessage() {}
+func (*PersistentVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{98} }
+
+func (m *PersistentVolumeSpec) Reset() { *m = PersistentVolumeSpec{} }
+func (*PersistentVolumeSpec) ProtoMessage() {}
+func (*PersistentVolumeSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{99} }
+
+func (m *PersistentVolumeStatus) Reset() { *m = PersistentVolumeStatus{} }
+func (*PersistentVolumeStatus) ProtoMessage() {}
+func (*PersistentVolumeStatus) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{100}
+}
+
+func (m *PhotonPersistentDiskVolumeSource) Reset() { *m = PhotonPersistentDiskVolumeSource{} }
+func (*PhotonPersistentDiskVolumeSource) ProtoMessage() {}
+func (*PhotonPersistentDiskVolumeSource) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{101}
+}
+
+func (m *Pod) Reset() { *m = Pod{} }
+func (*Pod) ProtoMessage() {}
+func (*Pod) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{102} }
+
+func (m *PodAffinity) Reset() { *m = PodAffinity{} }
+func (*PodAffinity) ProtoMessage() {}
+func (*PodAffinity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{103} }
+
+func (m *PodAffinityTerm) Reset() { *m = PodAffinityTerm{} }
+func (*PodAffinityTerm) ProtoMessage() {}
+func (*PodAffinityTerm) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{104} }
+
+func (m *PodAntiAffinity) Reset() { *m = PodAntiAffinity{} }
+func (*PodAntiAffinity) ProtoMessage() {}
+func (*PodAntiAffinity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{105} }
+
+func (m *PodAttachOptions) Reset() { *m = PodAttachOptions{} }
+func (*PodAttachOptions) ProtoMessage() {}
+func (*PodAttachOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{106} }
+
+func (m *PodCondition) Reset() { *m = PodCondition{} }
+func (*PodCondition) ProtoMessage() {}
+func (*PodCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{107} }
+
+func (m *PodExecOptions) Reset() { *m = PodExecOptions{} }
+func (*PodExecOptions) ProtoMessage() {}
+func (*PodExecOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{108} }
+
+func (m *PodList) Reset() { *m = PodList{} }
+func (*PodList) ProtoMessage() {}
+func (*PodList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{109} }
+
+func (m *PodLogOptions) Reset() { *m = PodLogOptions{} }
+func (*PodLogOptions) ProtoMessage() {}
+func (*PodLogOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{110} }
+
+func (m *PodPortForwardOptions) Reset() { *m = PodPortForwardOptions{} }
+func (*PodPortForwardOptions) ProtoMessage() {}
+func (*PodPortForwardOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{111} }
+
+func (m *PodProxyOptions) Reset() { *m = PodProxyOptions{} }
+func (*PodProxyOptions) ProtoMessage() {}
+func (*PodProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{112} }
+
+func (m *PodSecurityContext) Reset() { *m = PodSecurityContext{} }
+func (*PodSecurityContext) ProtoMessage() {}
+func (*PodSecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{113} }
+
+func (m *PodSignature) Reset() { *m = PodSignature{} }
+func (*PodSignature) ProtoMessage() {}
+func (*PodSignature) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{114} }
+
+func (m *PodSpec) Reset() { *m = PodSpec{} }
+func (*PodSpec) ProtoMessage() {}
+func (*PodSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{115} }
+
+func (m *PodStatus) Reset() { *m = PodStatus{} }
+func (*PodStatus) ProtoMessage() {}
+func (*PodStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{116} }
+
+func (m *PodStatusResult) Reset() { *m = PodStatusResult{} }
+func (*PodStatusResult) ProtoMessage() {}
+func (*PodStatusResult) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{117} }
+
+func (m *PodTemplate) Reset() { *m = PodTemplate{} }
+func (*PodTemplate) ProtoMessage() {}
+func (*PodTemplate) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{118} }
+
+func (m *PodTemplateList) Reset() { *m = PodTemplateList{} }
+func (*PodTemplateList) ProtoMessage() {}
+func (*PodTemplateList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{119} }
+
+func (m *PodTemplateSpec) Reset() { *m = PodTemplateSpec{} }
+func (*PodTemplateSpec) ProtoMessage() {}
+func (*PodTemplateSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{120} }
+
+func (m *PortworxVolumeSource) Reset() { *m = PortworxVolumeSource{} }
+func (*PortworxVolumeSource) ProtoMessage() {}
+func (*PortworxVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{121} }
+
+func (m *Preconditions) Reset() { *m = Preconditions{} }
+func (*Preconditions) ProtoMessage() {}
+func (*Preconditions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{122} }
+
+func (m *PreferAvoidPodsEntry) Reset() { *m = PreferAvoidPodsEntry{} }
+func (*PreferAvoidPodsEntry) ProtoMessage() {}
+func (*PreferAvoidPodsEntry) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{123} }
+
+func (m *PreferredSchedulingTerm) Reset() { *m = PreferredSchedulingTerm{} }
+func (*PreferredSchedulingTerm) ProtoMessage() {}
+func (*PreferredSchedulingTerm) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{124}
+}
+
+func (m *Probe) Reset() { *m = Probe{} }
+func (*Probe) ProtoMessage() {}
+func (*Probe) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{125} }
+
+func (m *ProjectedVolumeSource) Reset() { *m = ProjectedVolumeSource{} }
+func (*ProjectedVolumeSource) ProtoMessage() {}
+func (*ProjectedVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{126} }
+
+func (m *QuobyteVolumeSource) Reset() { *m = QuobyteVolumeSource{} }
+func (*QuobyteVolumeSource) ProtoMessage() {}
+func (*QuobyteVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{127} }
+
+func (m *RBDVolumeSource) Reset() { *m = RBDVolumeSource{} }
+func (*RBDVolumeSource) ProtoMessage() {}
+func (*RBDVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{128} }
+
+func (m *RangeAllocation) Reset() { *m = RangeAllocation{} }
+func (*RangeAllocation) ProtoMessage() {}
+func (*RangeAllocation) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{129} }
+
+func (m *ReplicationController) Reset() { *m = ReplicationController{} }
+func (*ReplicationController) ProtoMessage() {}
+func (*ReplicationController) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{130} }
+
+func (m *ReplicationControllerCondition) Reset() { *m = ReplicationControllerCondition{} }
+func (*ReplicationControllerCondition) ProtoMessage() {}
+func (*ReplicationControllerCondition) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{131}
+}
+
+func (m *ReplicationControllerList) Reset() { *m = ReplicationControllerList{} }
+func (*ReplicationControllerList) ProtoMessage() {}
+func (*ReplicationControllerList) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{132}
+}
+
+func (m *ReplicationControllerSpec) Reset() { *m = ReplicationControllerSpec{} }
+func (*ReplicationControllerSpec) ProtoMessage() {}
+func (*ReplicationControllerSpec) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{133}
+}
+
+func (m *ReplicationControllerStatus) Reset() { *m = ReplicationControllerStatus{} }
+func (*ReplicationControllerStatus) ProtoMessage() {}
+func (*ReplicationControllerStatus) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{134}
+}
+
+func (m *ResourceFieldSelector) Reset() { *m = ResourceFieldSelector{} }
+func (*ResourceFieldSelector) ProtoMessage() {}
+func (*ResourceFieldSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{135} }
+
+func (m *ResourceQuota) Reset() { *m = ResourceQuota{} }
+func (*ResourceQuota) ProtoMessage() {}
+func (*ResourceQuota) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{136} }
+
+func (m *ResourceQuotaList) Reset() { *m = ResourceQuotaList{} }
+func (*ResourceQuotaList) ProtoMessage() {}
+func (*ResourceQuotaList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{137} }
+
+func (m *ResourceQuotaSpec) Reset() { *m = ResourceQuotaSpec{} }
+func (*ResourceQuotaSpec) ProtoMessage() {}
+func (*ResourceQuotaSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{138} }
+
+func (m *ResourceQuotaStatus) Reset() { *m = ResourceQuotaStatus{} }
+func (*ResourceQuotaStatus) ProtoMessage() {}
+func (*ResourceQuotaStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{139} }
+
+func (m *ResourceRequirements) Reset() { *m = ResourceRequirements{} }
+func (*ResourceRequirements) ProtoMessage() {}
+func (*ResourceRequirements) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{140} }
+
+func (m *SELinuxOptions) Reset() { *m = SELinuxOptions{} }
+func (*SELinuxOptions) ProtoMessage() {}
+func (*SELinuxOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{141} }
+
+func (m *ScaleIOVolumeSource) Reset() { *m = ScaleIOVolumeSource{} }
+func (*ScaleIOVolumeSource) ProtoMessage() {}
+func (*ScaleIOVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{142} }
+
+func (m *Secret) Reset() { *m = Secret{} }
+func (*Secret) ProtoMessage() {}
+func (*Secret) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{143} }
+
+func (m *SecretEnvSource) Reset() { *m = SecretEnvSource{} }
+func (*SecretEnvSource) ProtoMessage() {}
+func (*SecretEnvSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{144} }
+
+func (m *SecretKeySelector) Reset() { *m = SecretKeySelector{} }
+func (*SecretKeySelector) ProtoMessage() {}
+func (*SecretKeySelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{145} }
+
+func (m *SecretList) Reset() { *m = SecretList{} }
+func (*SecretList) ProtoMessage() {}
+func (*SecretList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{146} }
+
+func (m *SecretProjection) Reset() { *m = SecretProjection{} }
+func (*SecretProjection) ProtoMessage() {}
+func (*SecretProjection) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{147} }
+
+func (m *SecretVolumeSource) Reset() { *m = SecretVolumeSource{} }
+func (*SecretVolumeSource) ProtoMessage() {}
+func (*SecretVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{148} }
+
+func (m *SecurityContext) Reset() { *m = SecurityContext{} }
+func (*SecurityContext) ProtoMessage() {}
+func (*SecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{149} }
+
+func (m *SerializedReference) Reset() { *m = SerializedReference{} }
+func (*SerializedReference) ProtoMessage() {}
+func (*SerializedReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{150} }
+
+func (m *Service) Reset() { *m = Service{} }
+func (*Service) ProtoMessage() {}
+func (*Service) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{151} }
+
+func (m *ServiceAccount) Reset() { *m = ServiceAccount{} }
+func (*ServiceAccount) ProtoMessage() {}
+func (*ServiceAccount) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{152} }
+
+func (m *ServiceAccountList) Reset() { *m = ServiceAccountList{} }
+func (*ServiceAccountList) ProtoMessage() {}
+func (*ServiceAccountList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{153} }
+
+func (m *ServiceList) Reset() { *m = ServiceList{} }
+func (*ServiceList) ProtoMessage() {}
+func (*ServiceList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{154} }
+
+func (m *ServicePort) Reset() { *m = ServicePort{} }
+func (*ServicePort) ProtoMessage() {}
+func (*ServicePort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{155} }
+
+func (m *ServiceProxyOptions) Reset() { *m = ServiceProxyOptions{} }
+func (*ServiceProxyOptions) ProtoMessage() {}
+func (*ServiceProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{156} }
+
+func (m *ServiceSpec) Reset() { *m = ServiceSpec{} }
+func (*ServiceSpec) ProtoMessage() {}
+func (*ServiceSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{157} }
+
+func (m *ServiceStatus) Reset() { *m = ServiceStatus{} }
+func (*ServiceStatus) ProtoMessage() {}
+func (*ServiceStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{158} }
+
+func (m *StorageOSPersistentVolumeSource) Reset() { *m = StorageOSPersistentVolumeSource{} }
+func (*StorageOSPersistentVolumeSource) ProtoMessage() {}
+func (*StorageOSPersistentVolumeSource) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{159}
+}
+
+func (m *StorageOSVolumeSource) Reset() { *m = StorageOSVolumeSource{} }
+func (*StorageOSVolumeSource) ProtoMessage() {}
+func (*StorageOSVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{160} }
+
+func (m *Sysctl) Reset() { *m = Sysctl{} }
+func (*Sysctl) ProtoMessage() {}
+func (*Sysctl) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{161} }
+
+func (m *TCPSocketAction) Reset() { *m = TCPSocketAction{} }
+func (*TCPSocketAction) ProtoMessage() {}
+func (*TCPSocketAction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{162} }
+
+func (m *Taint) Reset() { *m = Taint{} }
+func (*Taint) ProtoMessage() {}
+func (*Taint) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{163} }
+
+func (m *Toleration) Reset() { *m = Toleration{} }
+func (*Toleration) ProtoMessage() {}
+func (*Toleration) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{164} }
+
+func (m *Volume) Reset() { *m = Volume{} }
+func (*Volume) ProtoMessage() {}
+func (*Volume) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{165} }
+
+func (m *VolumeMount) Reset() { *m = VolumeMount{} }
+func (*VolumeMount) ProtoMessage() {}
+func (*VolumeMount) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{166} }
+
+func (m *VolumeProjection) Reset() { *m = VolumeProjection{} }
+func (*VolumeProjection) ProtoMessage() {}
+func (*VolumeProjection) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{167} }
+
+func (m *VolumeSource) Reset() { *m = VolumeSource{} }
+func (*VolumeSource) ProtoMessage() {}
+func (*VolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{168} }
+
+func (m *VsphereVirtualDiskVolumeSource) Reset() { *m = VsphereVirtualDiskVolumeSource{} }
+func (*VsphereVirtualDiskVolumeSource) ProtoMessage() {}
+func (*VsphereVirtualDiskVolumeSource) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{169}
+}
+
+func (m *WeightedPodAffinityTerm) Reset() { *m = WeightedPodAffinityTerm{} }
+func (*WeightedPodAffinityTerm) ProtoMessage() {}
+func (*WeightedPodAffinityTerm) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{170}
+}
+
+func init() {
+ proto.RegisterType((*AWSElasticBlockStoreVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.AWSElasticBlockStoreVolumeSource")
+ proto.RegisterType((*Affinity)(nil), "k8s.io.client-go.pkg.api.v1.Affinity")
+ proto.RegisterType((*AttachedVolume)(nil), "k8s.io.client-go.pkg.api.v1.AttachedVolume")
+ proto.RegisterType((*AvoidPods)(nil), "k8s.io.client-go.pkg.api.v1.AvoidPods")
+ proto.RegisterType((*AzureDiskVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.AzureDiskVolumeSource")
+ proto.RegisterType((*AzureFileVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.AzureFileVolumeSource")
+ proto.RegisterType((*Binding)(nil), "k8s.io.client-go.pkg.api.v1.Binding")
+ proto.RegisterType((*Capabilities)(nil), "k8s.io.client-go.pkg.api.v1.Capabilities")
+ proto.RegisterType((*CephFSVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.CephFSVolumeSource")
+ proto.RegisterType((*CinderVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.CinderVolumeSource")
+ proto.RegisterType((*ComponentCondition)(nil), "k8s.io.client-go.pkg.api.v1.ComponentCondition")
+ proto.RegisterType((*ComponentStatus)(nil), "k8s.io.client-go.pkg.api.v1.ComponentStatus")
+ proto.RegisterType((*ComponentStatusList)(nil), "k8s.io.client-go.pkg.api.v1.ComponentStatusList")
+ proto.RegisterType((*ConfigMap)(nil), "k8s.io.client-go.pkg.api.v1.ConfigMap")
+ proto.RegisterType((*ConfigMapEnvSource)(nil), "k8s.io.client-go.pkg.api.v1.ConfigMapEnvSource")
+ proto.RegisterType((*ConfigMapKeySelector)(nil), "k8s.io.client-go.pkg.api.v1.ConfigMapKeySelector")
+ proto.RegisterType((*ConfigMapList)(nil), "k8s.io.client-go.pkg.api.v1.ConfigMapList")
+ proto.RegisterType((*ConfigMapProjection)(nil), "k8s.io.client-go.pkg.api.v1.ConfigMapProjection")
+ proto.RegisterType((*ConfigMapVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.ConfigMapVolumeSource")
+ proto.RegisterType((*Container)(nil), "k8s.io.client-go.pkg.api.v1.Container")
+ proto.RegisterType((*ContainerImage)(nil), "k8s.io.client-go.pkg.api.v1.ContainerImage")
+ proto.RegisterType((*ContainerPort)(nil), "k8s.io.client-go.pkg.api.v1.ContainerPort")
+ proto.RegisterType((*ContainerState)(nil), "k8s.io.client-go.pkg.api.v1.ContainerState")
+ proto.RegisterType((*ContainerStateRunning)(nil), "k8s.io.client-go.pkg.api.v1.ContainerStateRunning")
+ proto.RegisterType((*ContainerStateTerminated)(nil), "k8s.io.client-go.pkg.api.v1.ContainerStateTerminated")
+ proto.RegisterType((*ContainerStateWaiting)(nil), "k8s.io.client-go.pkg.api.v1.ContainerStateWaiting")
+ proto.RegisterType((*ContainerStatus)(nil), "k8s.io.client-go.pkg.api.v1.ContainerStatus")
+ proto.RegisterType((*DaemonEndpoint)(nil), "k8s.io.client-go.pkg.api.v1.DaemonEndpoint")
+ proto.RegisterType((*DeleteOptions)(nil), "k8s.io.client-go.pkg.api.v1.DeleteOptions")
+ proto.RegisterType((*DownwardAPIProjection)(nil), "k8s.io.client-go.pkg.api.v1.DownwardAPIProjection")
+ proto.RegisterType((*DownwardAPIVolumeFile)(nil), "k8s.io.client-go.pkg.api.v1.DownwardAPIVolumeFile")
+ proto.RegisterType((*DownwardAPIVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.DownwardAPIVolumeSource")
+ proto.RegisterType((*EmptyDirVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.EmptyDirVolumeSource")
+ proto.RegisterType((*EndpointAddress)(nil), "k8s.io.client-go.pkg.api.v1.EndpointAddress")
+ proto.RegisterType((*EndpointPort)(nil), "k8s.io.client-go.pkg.api.v1.EndpointPort")
+ proto.RegisterType((*EndpointSubset)(nil), "k8s.io.client-go.pkg.api.v1.EndpointSubset")
+ proto.RegisterType((*Endpoints)(nil), "k8s.io.client-go.pkg.api.v1.Endpoints")
+ proto.RegisterType((*EndpointsList)(nil), "k8s.io.client-go.pkg.api.v1.EndpointsList")
+ proto.RegisterType((*EnvFromSource)(nil), "k8s.io.client-go.pkg.api.v1.EnvFromSource")
+ proto.RegisterType((*EnvVar)(nil), "k8s.io.client-go.pkg.api.v1.EnvVar")
+ proto.RegisterType((*EnvVarSource)(nil), "k8s.io.client-go.pkg.api.v1.EnvVarSource")
+ proto.RegisterType((*Event)(nil), "k8s.io.client-go.pkg.api.v1.Event")
+ proto.RegisterType((*EventList)(nil), "k8s.io.client-go.pkg.api.v1.EventList")
+ proto.RegisterType((*EventSource)(nil), "k8s.io.client-go.pkg.api.v1.EventSource")
+ proto.RegisterType((*ExecAction)(nil), "k8s.io.client-go.pkg.api.v1.ExecAction")
+ proto.RegisterType((*FCVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.FCVolumeSource")
+ proto.RegisterType((*FlexVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.FlexVolumeSource")
+ proto.RegisterType((*FlockerVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.FlockerVolumeSource")
+ proto.RegisterType((*GCEPersistentDiskVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.GCEPersistentDiskVolumeSource")
+ proto.RegisterType((*GitRepoVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.GitRepoVolumeSource")
+ proto.RegisterType((*GlusterfsVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.GlusterfsVolumeSource")
+ proto.RegisterType((*HTTPGetAction)(nil), "k8s.io.client-go.pkg.api.v1.HTTPGetAction")
+ proto.RegisterType((*HTTPHeader)(nil), "k8s.io.client-go.pkg.api.v1.HTTPHeader")
+ proto.RegisterType((*Handler)(nil), "k8s.io.client-go.pkg.api.v1.Handler")
+ proto.RegisterType((*HostAlias)(nil), "k8s.io.client-go.pkg.api.v1.HostAlias")
+ proto.RegisterType((*HostPathVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.HostPathVolumeSource")
+ proto.RegisterType((*ISCSIVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.ISCSIVolumeSource")
+ proto.RegisterType((*KeyToPath)(nil), "k8s.io.client-go.pkg.api.v1.KeyToPath")
+ proto.RegisterType((*Lifecycle)(nil), "k8s.io.client-go.pkg.api.v1.Lifecycle")
+ proto.RegisterType((*LimitRange)(nil), "k8s.io.client-go.pkg.api.v1.LimitRange")
+ proto.RegisterType((*LimitRangeItem)(nil), "k8s.io.client-go.pkg.api.v1.LimitRangeItem")
+ proto.RegisterType((*LimitRangeList)(nil), "k8s.io.client-go.pkg.api.v1.LimitRangeList")
+ proto.RegisterType((*LimitRangeSpec)(nil), "k8s.io.client-go.pkg.api.v1.LimitRangeSpec")
+ proto.RegisterType((*List)(nil), "k8s.io.client-go.pkg.api.v1.List")
+ proto.RegisterType((*ListOptions)(nil), "k8s.io.client-go.pkg.api.v1.ListOptions")
+ proto.RegisterType((*LoadBalancerIngress)(nil), "k8s.io.client-go.pkg.api.v1.LoadBalancerIngress")
+ proto.RegisterType((*LoadBalancerStatus)(nil), "k8s.io.client-go.pkg.api.v1.LoadBalancerStatus")
+ proto.RegisterType((*LocalObjectReference)(nil), "k8s.io.client-go.pkg.api.v1.LocalObjectReference")
+ proto.RegisterType((*LocalVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.LocalVolumeSource")
+ proto.RegisterType((*NFSVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.NFSVolumeSource")
+ proto.RegisterType((*Namespace)(nil), "k8s.io.client-go.pkg.api.v1.Namespace")
+ proto.RegisterType((*NamespaceList)(nil), "k8s.io.client-go.pkg.api.v1.NamespaceList")
+ proto.RegisterType((*NamespaceSpec)(nil), "k8s.io.client-go.pkg.api.v1.NamespaceSpec")
+ proto.RegisterType((*NamespaceStatus)(nil), "k8s.io.client-go.pkg.api.v1.NamespaceStatus")
+ proto.RegisterType((*Node)(nil), "k8s.io.client-go.pkg.api.v1.Node")
+ proto.RegisterType((*NodeAddress)(nil), "k8s.io.client-go.pkg.api.v1.NodeAddress")
+ proto.RegisterType((*NodeAffinity)(nil), "k8s.io.client-go.pkg.api.v1.NodeAffinity")
+ proto.RegisterType((*NodeCondition)(nil), "k8s.io.client-go.pkg.api.v1.NodeCondition")
+ proto.RegisterType((*NodeDaemonEndpoints)(nil), "k8s.io.client-go.pkg.api.v1.NodeDaemonEndpoints")
+ proto.RegisterType((*NodeList)(nil), "k8s.io.client-go.pkg.api.v1.NodeList")
+ proto.RegisterType((*NodeProxyOptions)(nil), "k8s.io.client-go.pkg.api.v1.NodeProxyOptions")
+ proto.RegisterType((*NodeResources)(nil), "k8s.io.client-go.pkg.api.v1.NodeResources")
+ proto.RegisterType((*NodeSelector)(nil), "k8s.io.client-go.pkg.api.v1.NodeSelector")
+ proto.RegisterType((*NodeSelectorRequirement)(nil), "k8s.io.client-go.pkg.api.v1.NodeSelectorRequirement")
+ proto.RegisterType((*NodeSelectorTerm)(nil), "k8s.io.client-go.pkg.api.v1.NodeSelectorTerm")
+ proto.RegisterType((*NodeSpec)(nil), "k8s.io.client-go.pkg.api.v1.NodeSpec")
+ proto.RegisterType((*NodeStatus)(nil), "k8s.io.client-go.pkg.api.v1.NodeStatus")
+ proto.RegisterType((*NodeSystemInfo)(nil), "k8s.io.client-go.pkg.api.v1.NodeSystemInfo")
+ proto.RegisterType((*ObjectFieldSelector)(nil), "k8s.io.client-go.pkg.api.v1.ObjectFieldSelector")
+ proto.RegisterType((*ObjectMeta)(nil), "k8s.io.client-go.pkg.api.v1.ObjectMeta")
+ proto.RegisterType((*ObjectReference)(nil), "k8s.io.client-go.pkg.api.v1.ObjectReference")
+ proto.RegisterType((*PersistentVolume)(nil), "k8s.io.client-go.pkg.api.v1.PersistentVolume")
+ proto.RegisterType((*PersistentVolumeClaim)(nil), "k8s.io.client-go.pkg.api.v1.PersistentVolumeClaim")
+ proto.RegisterType((*PersistentVolumeClaimList)(nil), "k8s.io.client-go.pkg.api.v1.PersistentVolumeClaimList")
+ proto.RegisterType((*PersistentVolumeClaimSpec)(nil), "k8s.io.client-go.pkg.api.v1.PersistentVolumeClaimSpec")
+ proto.RegisterType((*PersistentVolumeClaimStatus)(nil), "k8s.io.client-go.pkg.api.v1.PersistentVolumeClaimStatus")
+ proto.RegisterType((*PersistentVolumeClaimVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.PersistentVolumeClaimVolumeSource")
+ proto.RegisterType((*PersistentVolumeList)(nil), "k8s.io.client-go.pkg.api.v1.PersistentVolumeList")
+ proto.RegisterType((*PersistentVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.PersistentVolumeSource")
+ proto.RegisterType((*PersistentVolumeSpec)(nil), "k8s.io.client-go.pkg.api.v1.PersistentVolumeSpec")
+ proto.RegisterType((*PersistentVolumeStatus)(nil), "k8s.io.client-go.pkg.api.v1.PersistentVolumeStatus")
+ proto.RegisterType((*PhotonPersistentDiskVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.PhotonPersistentDiskVolumeSource")
+ proto.RegisterType((*Pod)(nil), "k8s.io.client-go.pkg.api.v1.Pod")
+ proto.RegisterType((*PodAffinity)(nil), "k8s.io.client-go.pkg.api.v1.PodAffinity")
+ proto.RegisterType((*PodAffinityTerm)(nil), "k8s.io.client-go.pkg.api.v1.PodAffinityTerm")
+ proto.RegisterType((*PodAntiAffinity)(nil), "k8s.io.client-go.pkg.api.v1.PodAntiAffinity")
+ proto.RegisterType((*PodAttachOptions)(nil), "k8s.io.client-go.pkg.api.v1.PodAttachOptions")
+ proto.RegisterType((*PodCondition)(nil), "k8s.io.client-go.pkg.api.v1.PodCondition")
+ proto.RegisterType((*PodExecOptions)(nil), "k8s.io.client-go.pkg.api.v1.PodExecOptions")
+ proto.RegisterType((*PodList)(nil), "k8s.io.client-go.pkg.api.v1.PodList")
+ proto.RegisterType((*PodLogOptions)(nil), "k8s.io.client-go.pkg.api.v1.PodLogOptions")
+ proto.RegisterType((*PodPortForwardOptions)(nil), "k8s.io.client-go.pkg.api.v1.PodPortForwardOptions")
+ proto.RegisterType((*PodProxyOptions)(nil), "k8s.io.client-go.pkg.api.v1.PodProxyOptions")
+ proto.RegisterType((*PodSecurityContext)(nil), "k8s.io.client-go.pkg.api.v1.PodSecurityContext")
+ proto.RegisterType((*PodSignature)(nil), "k8s.io.client-go.pkg.api.v1.PodSignature")
+ proto.RegisterType((*PodSpec)(nil), "k8s.io.client-go.pkg.api.v1.PodSpec")
+ proto.RegisterType((*PodStatus)(nil), "k8s.io.client-go.pkg.api.v1.PodStatus")
+ proto.RegisterType((*PodStatusResult)(nil), "k8s.io.client-go.pkg.api.v1.PodStatusResult")
+ proto.RegisterType((*PodTemplate)(nil), "k8s.io.client-go.pkg.api.v1.PodTemplate")
+ proto.RegisterType((*PodTemplateList)(nil), "k8s.io.client-go.pkg.api.v1.PodTemplateList")
+ proto.RegisterType((*PodTemplateSpec)(nil), "k8s.io.client-go.pkg.api.v1.PodTemplateSpec")
+ proto.RegisterType((*PortworxVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.PortworxVolumeSource")
+ proto.RegisterType((*Preconditions)(nil), "k8s.io.client-go.pkg.api.v1.Preconditions")
+ proto.RegisterType((*PreferAvoidPodsEntry)(nil), "k8s.io.client-go.pkg.api.v1.PreferAvoidPodsEntry")
+ proto.RegisterType((*PreferredSchedulingTerm)(nil), "k8s.io.client-go.pkg.api.v1.PreferredSchedulingTerm")
+ proto.RegisterType((*Probe)(nil), "k8s.io.client-go.pkg.api.v1.Probe")
+ proto.RegisterType((*ProjectedVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.ProjectedVolumeSource")
+ proto.RegisterType((*QuobyteVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.QuobyteVolumeSource")
+ proto.RegisterType((*RBDVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.RBDVolumeSource")
+ proto.RegisterType((*RangeAllocation)(nil), "k8s.io.client-go.pkg.api.v1.RangeAllocation")
+ proto.RegisterType((*ReplicationController)(nil), "k8s.io.client-go.pkg.api.v1.ReplicationController")
+ proto.RegisterType((*ReplicationControllerCondition)(nil), "k8s.io.client-go.pkg.api.v1.ReplicationControllerCondition")
+ proto.RegisterType((*ReplicationControllerList)(nil), "k8s.io.client-go.pkg.api.v1.ReplicationControllerList")
+ proto.RegisterType((*ReplicationControllerSpec)(nil), "k8s.io.client-go.pkg.api.v1.ReplicationControllerSpec")
+ proto.RegisterType((*ReplicationControllerStatus)(nil), "k8s.io.client-go.pkg.api.v1.ReplicationControllerStatus")
+ proto.RegisterType((*ResourceFieldSelector)(nil), "k8s.io.client-go.pkg.api.v1.ResourceFieldSelector")
+ proto.RegisterType((*ResourceQuota)(nil), "k8s.io.client-go.pkg.api.v1.ResourceQuota")
+ proto.RegisterType((*ResourceQuotaList)(nil), "k8s.io.client-go.pkg.api.v1.ResourceQuotaList")
+ proto.RegisterType((*ResourceQuotaSpec)(nil), "k8s.io.client-go.pkg.api.v1.ResourceQuotaSpec")
+ proto.RegisterType((*ResourceQuotaStatus)(nil), "k8s.io.client-go.pkg.api.v1.ResourceQuotaStatus")
+ proto.RegisterType((*ResourceRequirements)(nil), "k8s.io.client-go.pkg.api.v1.ResourceRequirements")
+ proto.RegisterType((*SELinuxOptions)(nil), "k8s.io.client-go.pkg.api.v1.SELinuxOptions")
+ proto.RegisterType((*ScaleIOVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.ScaleIOVolumeSource")
+ proto.RegisterType((*Secret)(nil), "k8s.io.client-go.pkg.api.v1.Secret")
+ proto.RegisterType((*SecretEnvSource)(nil), "k8s.io.client-go.pkg.api.v1.SecretEnvSource")
+ proto.RegisterType((*SecretKeySelector)(nil), "k8s.io.client-go.pkg.api.v1.SecretKeySelector")
+ proto.RegisterType((*SecretList)(nil), "k8s.io.client-go.pkg.api.v1.SecretList")
+ proto.RegisterType((*SecretProjection)(nil), "k8s.io.client-go.pkg.api.v1.SecretProjection")
+ proto.RegisterType((*SecretVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.SecretVolumeSource")
+ proto.RegisterType((*SecurityContext)(nil), "k8s.io.client-go.pkg.api.v1.SecurityContext")
+ proto.RegisterType((*SerializedReference)(nil), "k8s.io.client-go.pkg.api.v1.SerializedReference")
+ proto.RegisterType((*Service)(nil), "k8s.io.client-go.pkg.api.v1.Service")
+ proto.RegisterType((*ServiceAccount)(nil), "k8s.io.client-go.pkg.api.v1.ServiceAccount")
+ proto.RegisterType((*ServiceAccountList)(nil), "k8s.io.client-go.pkg.api.v1.ServiceAccountList")
+ proto.RegisterType((*ServiceList)(nil), "k8s.io.client-go.pkg.api.v1.ServiceList")
+ proto.RegisterType((*ServicePort)(nil), "k8s.io.client-go.pkg.api.v1.ServicePort")
+ proto.RegisterType((*ServiceProxyOptions)(nil), "k8s.io.client-go.pkg.api.v1.ServiceProxyOptions")
+ proto.RegisterType((*ServiceSpec)(nil), "k8s.io.client-go.pkg.api.v1.ServiceSpec")
+ proto.RegisterType((*ServiceStatus)(nil), "k8s.io.client-go.pkg.api.v1.ServiceStatus")
+ proto.RegisterType((*StorageOSPersistentVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.StorageOSPersistentVolumeSource")
+ proto.RegisterType((*StorageOSVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.StorageOSVolumeSource")
+ proto.RegisterType((*Sysctl)(nil), "k8s.io.client-go.pkg.api.v1.Sysctl")
+ proto.RegisterType((*TCPSocketAction)(nil), "k8s.io.client-go.pkg.api.v1.TCPSocketAction")
+ proto.RegisterType((*Taint)(nil), "k8s.io.client-go.pkg.api.v1.Taint")
+ proto.RegisterType((*Toleration)(nil), "k8s.io.client-go.pkg.api.v1.Toleration")
+ proto.RegisterType((*Volume)(nil), "k8s.io.client-go.pkg.api.v1.Volume")
+ proto.RegisterType((*VolumeMount)(nil), "k8s.io.client-go.pkg.api.v1.VolumeMount")
+ proto.RegisterType((*VolumeProjection)(nil), "k8s.io.client-go.pkg.api.v1.VolumeProjection")
+ proto.RegisterType((*VolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.VolumeSource")
+ proto.RegisterType((*VsphereVirtualDiskVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.VsphereVirtualDiskVolumeSource")
+ proto.RegisterType((*WeightedPodAffinityTerm)(nil), "k8s.io.client-go.pkg.api.v1.WeightedPodAffinityTerm")
+}
+func (m *AWSElasticBlockStoreVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *AWSElasticBlockStoreVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.VolumeID)))
+ i += copy(dAtA[i:], m.VolumeID)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FSType)))
+ i += copy(dAtA[i:], m.FSType)
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Partition))
+ dAtA[i] = 0x20
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *Affinity) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Affinity) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.NodeAffinity != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NodeAffinity.Size()))
+ n1, err := m.NodeAffinity.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ }
+ if m.PodAffinity != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PodAffinity.Size()))
+ n2, err := m.PodAffinity.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ }
+ if m.PodAntiAffinity != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PodAntiAffinity.Size()))
+ n3, err := m.PodAntiAffinity.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ }
+ return i, nil
+}
+
+func (m *AttachedVolume) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *AttachedVolume) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.DevicePath)))
+ i += copy(dAtA[i:], m.DevicePath)
+ return i, nil
+}
+
+func (m *AvoidPods) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *AvoidPods) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.PreferAvoidPods) > 0 {
+ for _, msg := range m.PreferAvoidPods {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *AzureDiskVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *AzureDiskVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.DiskName)))
+ i += copy(dAtA[i:], m.DiskName)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.DataDiskURI)))
+ i += copy(dAtA[i:], m.DataDiskURI)
+ if m.CachingMode != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.CachingMode)))
+ i += copy(dAtA[i:], *m.CachingMode)
+ }
+ if m.FSType != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.FSType)))
+ i += copy(dAtA[i:], *m.FSType)
+ }
+ if m.ReadOnly != nil {
+ dAtA[i] = 0x28
+ i++
+ if *m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if m.Kind != nil {
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Kind)))
+ i += copy(dAtA[i:], *m.Kind)
+ }
+ return i, nil
+}
+
+func (m *AzureFileVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *AzureFileVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.SecretName)))
+ i += copy(dAtA[i:], m.SecretName)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ShareName)))
+ i += copy(dAtA[i:], m.ShareName)
+ dAtA[i] = 0x18
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *Binding) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Binding) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n4, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Target.Size()))
+ n5, err := m.Target.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ return i, nil
+}
+
+func (m *Capabilities) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Capabilities) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Add) > 0 {
+ for _, s := range m.Add {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Drop) > 0 {
+ for _, s := range m.Drop {
+ dAtA[i] = 0x12
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *CephFSVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CephFSVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Monitors) > 0 {
+ for _, s := range m.Monitors {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i += copy(dAtA[i:], m.Path)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.User)))
+ i += copy(dAtA[i:], m.User)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.SecretFile)))
+ i += copy(dAtA[i:], m.SecretFile)
+ if m.SecretRef != nil {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size()))
+ n6, err := m.SecretRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ }
+ dAtA[i] = 0x30
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *CinderVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CinderVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.VolumeID)))
+ i += copy(dAtA[i:], m.VolumeID)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FSType)))
+ i += copy(dAtA[i:], m.FSType)
+ dAtA[i] = 0x18
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *ComponentCondition) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ComponentCondition) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
+ i += copy(dAtA[i:], m.Status)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Error)))
+ i += copy(dAtA[i:], m.Error)
+ return i, nil
+}
+
+func (m *ComponentStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ComponentStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n7, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ if len(m.Conditions) > 0 {
+ for _, msg := range m.Conditions {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ComponentStatusList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ComponentStatusList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n8, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n8
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ConfigMap) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ConfigMap) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n9, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n9
+ if len(m.Data) > 0 {
+ keysForData := make([]string, 0, len(m.Data))
+ for k := range m.Data {
+ keysForData = append(keysForData, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForData)
+ for _, k := range keysForData {
+ dAtA[i] = 0x12
+ i++
+ v := m.Data[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ return i, nil
+}
+
+func (m *ConfigMapEnvSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ConfigMapEnvSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LocalObjectReference.Size()))
+ n10, err := m.LocalObjectReference.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n10
+ if m.Optional != nil {
+ dAtA[i] = 0x10
+ i++
+ if *m.Optional {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ return i, nil
+}
+
+func (m *ConfigMapKeySelector) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ConfigMapKeySelector) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LocalObjectReference.Size()))
+ n11, err := m.LocalObjectReference.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n11
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key)))
+ i += copy(dAtA[i:], m.Key)
+ if m.Optional != nil {
+ dAtA[i] = 0x18
+ i++
+ if *m.Optional {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ return i, nil
+}
+
+func (m *ConfigMapList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ConfigMapList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n12, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n12
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ConfigMapProjection) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ConfigMapProjection) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LocalObjectReference.Size()))
+ n13, err := m.LocalObjectReference.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n13
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.Optional != nil {
+ dAtA[i] = 0x20
+ i++
+ if *m.Optional {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ return i, nil
+}
+
+func (m *ConfigMapVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ConfigMapVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LocalObjectReference.Size()))
+ n14, err := m.LocalObjectReference.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n14
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.DefaultMode != nil {
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.DefaultMode))
+ }
+ if m.Optional != nil {
+ dAtA[i] = 0x20
+ i++
+ if *m.Optional {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ return i, nil
+}
+
+func (m *Container) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Container) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Image)))
+ i += copy(dAtA[i:], m.Image)
+ if len(m.Command) > 0 {
+ for _, s := range m.Command {
+ dAtA[i] = 0x1a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Args) > 0 {
+ for _, s := range m.Args {
+ dAtA[i] = 0x22
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.WorkingDir)))
+ i += copy(dAtA[i:], m.WorkingDir)
+ if len(m.Ports) > 0 {
+ for _, msg := range m.Ports {
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Env) > 0 {
+ for _, msg := range m.Env {
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Resources.Size()))
+ n15, err := m.Resources.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n15
+ if len(m.VolumeMounts) > 0 {
+ for _, msg := range m.VolumeMounts {
+ dAtA[i] = 0x4a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.LivenessProbe != nil {
+ dAtA[i] = 0x52
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LivenessProbe.Size()))
+ n16, err := m.LivenessProbe.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n16
+ }
+ if m.ReadinessProbe != nil {
+ dAtA[i] = 0x5a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ReadinessProbe.Size()))
+ n17, err := m.ReadinessProbe.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n17
+ }
+ if m.Lifecycle != nil {
+ dAtA[i] = 0x62
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Lifecycle.Size()))
+ n18, err := m.Lifecycle.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n18
+ }
+ dAtA[i] = 0x6a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.TerminationMessagePath)))
+ i += copy(dAtA[i:], m.TerminationMessagePath)
+ dAtA[i] = 0x72
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ImagePullPolicy)))
+ i += copy(dAtA[i:], m.ImagePullPolicy)
+ if m.SecurityContext != nil {
+ dAtA[i] = 0x7a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SecurityContext.Size()))
+ n19, err := m.SecurityContext.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n19
+ }
+ dAtA[i] = 0x80
+ i++
+ dAtA[i] = 0x1
+ i++
+ if m.Stdin {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x88
+ i++
+ dAtA[i] = 0x1
+ i++
+ if m.StdinOnce {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x90
+ i++
+ dAtA[i] = 0x1
+ i++
+ if m.TTY {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ if len(m.EnvFrom) > 0 {
+ for _, msg := range m.EnvFrom {
+ dAtA[i] = 0x9a
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0xa2
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.TerminationMessagePolicy)))
+ i += copy(dAtA[i:], m.TerminationMessagePolicy)
+ return i, nil
+}
+
+func (m *ContainerImage) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerImage) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Names) > 0 {
+ for _, s := range m.Names {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SizeBytes))
+ return i, nil
+}
+
+func (m *ContainerPort) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerPort) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.HostPort))
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ContainerPort))
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Protocol)))
+ i += copy(dAtA[i:], m.Protocol)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.HostIP)))
+ i += copy(dAtA[i:], m.HostIP)
+ return i, nil
+}
+
+func (m *ContainerState) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerState) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Waiting != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Waiting.Size()))
+ n20, err := m.Waiting.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n20
+ }
+ if m.Running != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Running.Size()))
+ n21, err := m.Running.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n21
+ }
+ if m.Terminated != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Terminated.Size()))
+ n22, err := m.Terminated.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n22
+ }
+ return i, nil
+}
+
+func (m *ContainerStateRunning) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerStateRunning) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.StartedAt.Size()))
+ n23, err := m.StartedAt.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n23
+ return i, nil
+}
+
+func (m *ContainerStateTerminated) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerStateTerminated) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ExitCode))
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Signal))
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.StartedAt.Size()))
+ n24, err := m.StartedAt.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n24
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.FinishedAt.Size()))
+ n25, err := m.FinishedAt.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n25
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ContainerID)))
+ i += copy(dAtA[i:], m.ContainerID)
+ return i, nil
+}
+
+func (m *ContainerStateWaiting) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerStateWaiting) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ return i, nil
+}
+
+func (m *ContainerStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.State.Size()))
+ n26, err := m.State.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n26
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTerminationState.Size()))
+ n27, err := m.LastTerminationState.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n27
+ dAtA[i] = 0x20
+ i++
+ if m.Ready {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RestartCount))
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Image)))
+ i += copy(dAtA[i:], m.Image)
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ImageID)))
+ i += copy(dAtA[i:], m.ImageID)
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ContainerID)))
+ i += copy(dAtA[i:], m.ContainerID)
+ return i, nil
+}
+
+func (m *DaemonEndpoint) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DaemonEndpoint) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Port))
+ return i, nil
+}
+
+func (m *DeleteOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeleteOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.GracePeriodSeconds != nil {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.GracePeriodSeconds))
+ }
+ if m.Preconditions != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Preconditions.Size()))
+ n28, err := m.Preconditions.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n28
+ }
+ if m.OrphanDependents != nil {
+ dAtA[i] = 0x18
+ i++
+ if *m.OrphanDependents {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if m.PropagationPolicy != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.PropagationPolicy)))
+ i += copy(dAtA[i:], *m.PropagationPolicy)
+ }
+ return i, nil
+}
+
+func (m *DownwardAPIProjection) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DownwardAPIProjection) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *DownwardAPIVolumeFile) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DownwardAPIVolumeFile) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i += copy(dAtA[i:], m.Path)
+ if m.FieldRef != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.FieldRef.Size()))
+ n29, err := m.FieldRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n29
+ }
+ if m.ResourceFieldRef != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ResourceFieldRef.Size()))
+ n30, err := m.ResourceFieldRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n30
+ }
+ if m.Mode != nil {
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.Mode))
+ }
+ return i, nil
+}
+
+func (m *DownwardAPIVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DownwardAPIVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.DefaultMode != nil {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.DefaultMode))
+ }
+ return i, nil
+}
+
+func (m *EmptyDirVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *EmptyDirVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Medium)))
+ i += copy(dAtA[i:], m.Medium)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SizeLimit.Size()))
+ n31, err := m.SizeLimit.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n31
+ return i, nil
+}
+
+func (m *EndpointAddress) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *EndpointAddress) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.IP)))
+ i += copy(dAtA[i:], m.IP)
+ if m.TargetRef != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.TargetRef.Size()))
+ n32, err := m.TargetRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n32
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Hostname)))
+ i += copy(dAtA[i:], m.Hostname)
+ if m.NodeName != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.NodeName)))
+ i += copy(dAtA[i:], *m.NodeName)
+ }
+ return i, nil
+}
+
+func (m *EndpointPort) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *EndpointPort) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Port))
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Protocol)))
+ i += copy(dAtA[i:], m.Protocol)
+ return i, nil
+}
+
+func (m *EndpointSubset) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *EndpointSubset) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Addresses) > 0 {
+ for _, msg := range m.Addresses {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.NotReadyAddresses) > 0 {
+ for _, msg := range m.NotReadyAddresses {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Ports) > 0 {
+ for _, msg := range m.Ports {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *Endpoints) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Endpoints) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n33, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n33
+ if len(m.Subsets) > 0 {
+ for _, msg := range m.Subsets {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *EndpointsList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *EndpointsList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n34, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n34
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *EnvFromSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *EnvFromSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Prefix)))
+ i += copy(dAtA[i:], m.Prefix)
+ if m.ConfigMapRef != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ConfigMapRef.Size()))
+ n35, err := m.ConfigMapRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n35
+ }
+ if m.SecretRef != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size()))
+ n36, err := m.SecretRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n36
+ }
+ return i, nil
+}
+
+func (m *EnvVar) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *EnvVar) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Value)))
+ i += copy(dAtA[i:], m.Value)
+ if m.ValueFrom != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ValueFrom.Size()))
+ n37, err := m.ValueFrom.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n37
+ }
+ return i, nil
+}
+
+func (m *EnvVarSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *EnvVarSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.FieldRef != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.FieldRef.Size()))
+ n38, err := m.FieldRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n38
+ }
+ if m.ResourceFieldRef != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ResourceFieldRef.Size()))
+ n39, err := m.ResourceFieldRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n39
+ }
+ if m.ConfigMapKeyRef != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ConfigMapKeyRef.Size()))
+ n40, err := m.ConfigMapKeyRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n40
+ }
+ if m.SecretKeyRef != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretKeyRef.Size()))
+ n41, err := m.SecretKeyRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n41
+ }
+ return i, nil
+}
+
+func (m *Event) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Event) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n42, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n42
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.InvolvedObject.Size()))
+ n43, err := m.InvolvedObject.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n43
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Source.Size()))
+ n44, err := m.Source.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n44
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.FirstTimestamp.Size()))
+ n45, err := m.FirstTimestamp.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n45
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTimestamp.Size()))
+ n46, err := m.LastTimestamp.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n46
+ dAtA[i] = 0x40
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Count))
+ dAtA[i] = 0x4a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ return i, nil
+}
+
+func (m *EventList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *EventList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n47, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n47
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *EventSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *EventSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Component)))
+ i += copy(dAtA[i:], m.Component)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Host)))
+ i += copy(dAtA[i:], m.Host)
+ return i, nil
+}
+
+func (m *ExecAction) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExecAction) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Command) > 0 {
+ for _, s := range m.Command {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *FCVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *FCVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.TargetWWNs) > 0 {
+ for _, s := range m.TargetWWNs {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if m.Lun != nil {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.Lun))
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FSType)))
+ i += copy(dAtA[i:], m.FSType)
+ dAtA[i] = 0x20
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *FlexVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *FlexVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Driver)))
+ i += copy(dAtA[i:], m.Driver)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FSType)))
+ i += copy(dAtA[i:], m.FSType)
+ if m.SecretRef != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size()))
+ n48, err := m.SecretRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n48
+ }
+ dAtA[i] = 0x20
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ if len(m.Options) > 0 {
+ keysForOptions := make([]string, 0, len(m.Options))
+ for k := range m.Options {
+ keysForOptions = append(keysForOptions, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForOptions)
+ for _, k := range keysForOptions {
+ dAtA[i] = 0x2a
+ i++
+ v := m.Options[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ return i, nil
+}
+
+func (m *FlockerVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *FlockerVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.DatasetName)))
+ i += copy(dAtA[i:], m.DatasetName)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.DatasetUUID)))
+ i += copy(dAtA[i:], m.DatasetUUID)
+ return i, nil
+}
+
+func (m *GCEPersistentDiskVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *GCEPersistentDiskVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.PDName)))
+ i += copy(dAtA[i:], m.PDName)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FSType)))
+ i += copy(dAtA[i:], m.FSType)
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Partition))
+ dAtA[i] = 0x20
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *GitRepoVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *GitRepoVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Repository)))
+ i += copy(dAtA[i:], m.Repository)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Revision)))
+ i += copy(dAtA[i:], m.Revision)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Directory)))
+ i += copy(dAtA[i:], m.Directory)
+ return i, nil
+}
+
+func (m *GlusterfsVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *GlusterfsVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.EndpointsName)))
+ i += copy(dAtA[i:], m.EndpointsName)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i += copy(dAtA[i:], m.Path)
+ dAtA[i] = 0x18
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *HTTPGetAction) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HTTPGetAction) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i += copy(dAtA[i:], m.Path)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Port.Size()))
+ n49, err := m.Port.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n49
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Host)))
+ i += copy(dAtA[i:], m.Host)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Scheme)))
+ i += copy(dAtA[i:], m.Scheme)
+ if len(m.HTTPHeaders) > 0 {
+ for _, msg := range m.HTTPHeaders {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *HTTPHeader) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HTTPHeader) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Value)))
+ i += copy(dAtA[i:], m.Value)
+ return i, nil
+}
+
+func (m *Handler) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Handler) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Exec != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Exec.Size()))
+ n50, err := m.Exec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n50
+ }
+ if m.HTTPGet != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.HTTPGet.Size()))
+ n51, err := m.HTTPGet.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n51
+ }
+ if m.TCPSocket != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.TCPSocket.Size()))
+ n52, err := m.TCPSocket.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n52
+ }
+ return i, nil
+}
+
+func (m *HostAlias) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HostAlias) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.IP)))
+ i += copy(dAtA[i:], m.IP)
+ if len(m.Hostnames) > 0 {
+ for _, s := range m.Hostnames {
+ dAtA[i] = 0x12
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *HostPathVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HostPathVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i += copy(dAtA[i:], m.Path)
+ return i, nil
+}
+
+func (m *ISCSIVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ISCSIVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.TargetPortal)))
+ i += copy(dAtA[i:], m.TargetPortal)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.IQN)))
+ i += copy(dAtA[i:], m.IQN)
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Lun))
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ISCSIInterface)))
+ i += copy(dAtA[i:], m.ISCSIInterface)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FSType)))
+ i += copy(dAtA[i:], m.FSType)
+ dAtA[i] = 0x30
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ if len(m.Portals) > 0 {
+ for _, s := range m.Portals {
+ dAtA[i] = 0x3a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ dAtA[i] = 0x40
+ i++
+ if m.DiscoveryCHAPAuth {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ if m.SecretRef != nil {
+ dAtA[i] = 0x52
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size()))
+ n53, err := m.SecretRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n53
+ }
+ dAtA[i] = 0x58
+ i++
+ if m.SessionCHAPAuth {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *KeyToPath) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *KeyToPath) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key)))
+ i += copy(dAtA[i:], m.Key)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i += copy(dAtA[i:], m.Path)
+ if m.Mode != nil {
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.Mode))
+ }
+ return i, nil
+}
+
+func (m *Lifecycle) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Lifecycle) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.PostStart != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PostStart.Size()))
+ n54, err := m.PostStart.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n54
+ }
+ if m.PreStop != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PreStop.Size()))
+ n55, err := m.PreStop.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n55
+ }
+ return i, nil
+}
+
+func (m *LimitRange) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LimitRange) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n56, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n56
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n57, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n57
+ return i, nil
+}
+
+func (m *LimitRangeItem) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LimitRangeItem) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ if len(m.Max) > 0 {
+ keysForMax := make([]string, 0, len(m.Max))
+ for k := range m.Max {
+ keysForMax = append(keysForMax, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForMax)
+ for _, k := range keysForMax {
+ dAtA[i] = 0x12
+ i++
+ v := m.Max[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n58, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n58
+ }
+ }
+ if len(m.Min) > 0 {
+ keysForMin := make([]string, 0, len(m.Min))
+ for k := range m.Min {
+ keysForMin = append(keysForMin, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForMin)
+ for _, k := range keysForMin {
+ dAtA[i] = 0x1a
+ i++
+ v := m.Min[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n59, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n59
+ }
+ }
+ if len(m.Default) > 0 {
+ keysForDefault := make([]string, 0, len(m.Default))
+ for k := range m.Default {
+ keysForDefault = append(keysForDefault, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForDefault)
+ for _, k := range keysForDefault {
+ dAtA[i] = 0x22
+ i++
+ v := m.Default[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n60, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n60
+ }
+ }
+ if len(m.DefaultRequest) > 0 {
+ keysForDefaultRequest := make([]string, 0, len(m.DefaultRequest))
+ for k := range m.DefaultRequest {
+ keysForDefaultRequest = append(keysForDefaultRequest, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForDefaultRequest)
+ for _, k := range keysForDefaultRequest {
+ dAtA[i] = 0x2a
+ i++
+ v := m.DefaultRequest[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n61, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n61
+ }
+ }
+ if len(m.MaxLimitRequestRatio) > 0 {
+ keysForMaxLimitRequestRatio := make([]string, 0, len(m.MaxLimitRequestRatio))
+ for k := range m.MaxLimitRequestRatio {
+ keysForMaxLimitRequestRatio = append(keysForMaxLimitRequestRatio, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForMaxLimitRequestRatio)
+ for _, k := range keysForMaxLimitRequestRatio {
+ dAtA[i] = 0x32
+ i++
+ v := m.MaxLimitRequestRatio[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n62, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n62
+ }
+ }
+ return i, nil
+}
+
+func (m *LimitRangeList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LimitRangeList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n63, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n63
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *LimitRangeSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LimitRangeSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Limits) > 0 {
+ for _, msg := range m.Limits {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *List) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *List) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n64, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n64
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ListOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ListOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.LabelSelector)))
+ i += copy(dAtA[i:], m.LabelSelector)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FieldSelector)))
+ i += copy(dAtA[i:], m.FieldSelector)
+ dAtA[i] = 0x18
+ i++
+ if m.Watch {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceVersion)))
+ i += copy(dAtA[i:], m.ResourceVersion)
+ if m.TimeoutSeconds != nil {
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.TimeoutSeconds))
+ }
+ dAtA[i] = 0x30
+ i++
+ if m.IncludeUninitialized {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *LoadBalancerIngress) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LoadBalancerIngress) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.IP)))
+ i += copy(dAtA[i:], m.IP)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Hostname)))
+ i += copy(dAtA[i:], m.Hostname)
+ return i, nil
+}
+
+func (m *LoadBalancerStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LoadBalancerStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Ingress) > 0 {
+ for _, msg := range m.Ingress {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *LocalObjectReference) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LocalObjectReference) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ return i, nil
+}
+
+func (m *LocalVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LocalVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i += copy(dAtA[i:], m.Path)
+ return i, nil
+}
+
+func (m *NFSVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NFSVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Server)))
+ i += copy(dAtA[i:], m.Server)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i += copy(dAtA[i:], m.Path)
+ dAtA[i] = 0x18
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *Namespace) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Namespace) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n65, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n65
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n66, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n66
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n67, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n67
+ return i, nil
+}
+
+func (m *NamespaceList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NamespaceList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n68, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n68
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *NamespaceSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NamespaceSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Finalizers) > 0 {
+ for _, s := range m.Finalizers {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *NamespaceStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NamespaceStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Phase)))
+ i += copy(dAtA[i:], m.Phase)
+ return i, nil
+}
+
+func (m *Node) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Node) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n69, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n69
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n70, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n70
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n71, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n71
+ return i, nil
+}
+
+func (m *NodeAddress) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NodeAddress) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Address)))
+ i += copy(dAtA[i:], m.Address)
+ return i, nil
+}
+
+func (m *NodeAffinity) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NodeAffinity) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RequiredDuringSchedulingIgnoredDuringExecution.Size()))
+ n72, err := m.RequiredDuringSchedulingIgnoredDuringExecution.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n72
+ }
+ if len(m.PreferredDuringSchedulingIgnoredDuringExecution) > 0 {
+ for _, msg := range m.PreferredDuringSchedulingIgnoredDuringExecution {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *NodeCondition) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NodeCondition) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
+ i += copy(dAtA[i:], m.Status)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastHeartbeatTime.Size()))
+ n73, err := m.LastHeartbeatTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n73
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
+ n74, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n74
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ return i, nil
+}
+
+func (m *NodeDaemonEndpoints) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NodeDaemonEndpoints) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.KubeletEndpoint.Size()))
+ n75, err := m.KubeletEndpoint.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n75
+ return i, nil
+}
+
+func (m *NodeList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NodeList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n76, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n76
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *NodeProxyOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NodeProxyOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i += copy(dAtA[i:], m.Path)
+ return i, nil
+}
+
+func (m *NodeResources) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NodeResources) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Capacity) > 0 {
+ keysForCapacity := make([]string, 0, len(m.Capacity))
+ for k := range m.Capacity {
+ keysForCapacity = append(keysForCapacity, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity)
+ for _, k := range keysForCapacity {
+ dAtA[i] = 0xa
+ i++
+ v := m.Capacity[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n77, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n77
+ }
+ }
+ return i, nil
+}
+
+func (m *NodeSelector) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NodeSelector) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.NodeSelectorTerms) > 0 {
+ for _, msg := range m.NodeSelectorTerms {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *NodeSelectorRequirement) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NodeSelectorRequirement) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key)))
+ i += copy(dAtA[i:], m.Key)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Operator)))
+ i += copy(dAtA[i:], m.Operator)
+ if len(m.Values) > 0 {
+ for _, s := range m.Values {
+ dAtA[i] = 0x1a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *NodeSelectorTerm) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NodeSelectorTerm) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.MatchExpressions) > 0 {
+ for _, msg := range m.MatchExpressions {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *NodeSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NodeSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.PodCIDR)))
+ i += copy(dAtA[i:], m.PodCIDR)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ExternalID)))
+ i += copy(dAtA[i:], m.ExternalID)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ProviderID)))
+ i += copy(dAtA[i:], m.ProviderID)
+ dAtA[i] = 0x20
+ i++
+ if m.Unschedulable {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ if len(m.Taints) > 0 {
+ for _, msg := range m.Taints {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *NodeStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NodeStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Capacity) > 0 {
+ keysForCapacity := make([]string, 0, len(m.Capacity))
+ for k := range m.Capacity {
+ keysForCapacity = append(keysForCapacity, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity)
+ for _, k := range keysForCapacity {
+ dAtA[i] = 0xa
+ i++
+ v := m.Capacity[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n78, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n78
+ }
+ }
+ if len(m.Allocatable) > 0 {
+ keysForAllocatable := make([]string, 0, len(m.Allocatable))
+ for k := range m.Allocatable {
+ keysForAllocatable = append(keysForAllocatable, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForAllocatable)
+ for _, k := range keysForAllocatable {
+ dAtA[i] = 0x12
+ i++
+ v := m.Allocatable[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n79, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n79
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Phase)))
+ i += copy(dAtA[i:], m.Phase)
+ if len(m.Conditions) > 0 {
+ for _, msg := range m.Conditions {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Addresses) > 0 {
+ for _, msg := range m.Addresses {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.DaemonEndpoints.Size()))
+ n80, err := m.DaemonEndpoints.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n80
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NodeInfo.Size()))
+ n81, err := m.NodeInfo.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n81
+ if len(m.Images) > 0 {
+ for _, msg := range m.Images {
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.VolumesInUse) > 0 {
+ for _, s := range m.VolumesInUse {
+ dAtA[i] = 0x4a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.VolumesAttached) > 0 {
+ for _, msg := range m.VolumesAttached {
+ dAtA[i] = 0x52
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *NodeSystemInfo) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NodeSystemInfo) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.MachineID)))
+ i += copy(dAtA[i:], m.MachineID)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.SystemUUID)))
+ i += copy(dAtA[i:], m.SystemUUID)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.BootID)))
+ i += copy(dAtA[i:], m.BootID)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.KernelVersion)))
+ i += copy(dAtA[i:], m.KernelVersion)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.OSImage)))
+ i += copy(dAtA[i:], m.OSImage)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ContainerRuntimeVersion)))
+ i += copy(dAtA[i:], m.ContainerRuntimeVersion)
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.KubeletVersion)))
+ i += copy(dAtA[i:], m.KubeletVersion)
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.KubeProxyVersion)))
+ i += copy(dAtA[i:], m.KubeProxyVersion)
+ dAtA[i] = 0x4a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.OperatingSystem)))
+ i += copy(dAtA[i:], m.OperatingSystem)
+ dAtA[i] = 0x52
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Architecture)))
+ i += copy(dAtA[i:], m.Architecture)
+ return i, nil
+}
+
+func (m *ObjectFieldSelector) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ObjectFieldSelector) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion)))
+ i += copy(dAtA[i:], m.APIVersion)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FieldPath)))
+ i += copy(dAtA[i:], m.FieldPath)
+ return i, nil
+}
+
+func (m *ObjectMeta) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ObjectMeta) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.GenerateName)))
+ i += copy(dAtA[i:], m.GenerateName)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
+ i += copy(dAtA[i:], m.Namespace)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.SelfLink)))
+ i += copy(dAtA[i:], m.SelfLink)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID)))
+ i += copy(dAtA[i:], m.UID)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceVersion)))
+ i += copy(dAtA[i:], m.ResourceVersion)
+ dAtA[i] = 0x38
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Generation))
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CreationTimestamp.Size()))
+ n82, err := m.CreationTimestamp.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n82
+ if m.DeletionTimestamp != nil {
+ dAtA[i] = 0x4a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.DeletionTimestamp.Size()))
+ n83, err := m.DeletionTimestamp.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n83
+ }
+ if m.DeletionGracePeriodSeconds != nil {
+ dAtA[i] = 0x50
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.DeletionGracePeriodSeconds))
+ }
+ if len(m.Labels) > 0 {
+ keysForLabels := make([]string, 0, len(m.Labels))
+ for k := range m.Labels {
+ keysForLabels = append(keysForLabels, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
+ for _, k := range keysForLabels {
+ dAtA[i] = 0x5a
+ i++
+ v := m.Labels[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ if len(m.Annotations) > 0 {
+ keysForAnnotations := make([]string, 0, len(m.Annotations))
+ for k := range m.Annotations {
+ keysForAnnotations = append(keysForAnnotations, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations)
+ for _, k := range keysForAnnotations {
+ dAtA[i] = 0x62
+ i++
+ v := m.Annotations[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ if len(m.OwnerReferences) > 0 {
+ for _, msg := range m.OwnerReferences {
+ dAtA[i] = 0x6a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Finalizers) > 0 {
+ for _, s := range m.Finalizers {
+ dAtA[i] = 0x72
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ dAtA[i] = 0x7a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ClusterName)))
+ i += copy(dAtA[i:], m.ClusterName)
+ if m.Initializers != nil {
+ dAtA[i] = 0x82
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Initializers.Size()))
+ n84, err := m.Initializers.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n84
+ }
+ return i, nil
+}
+
+func (m *ObjectReference) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ObjectReference) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
+ i += copy(dAtA[i:], m.Kind)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
+ i += copy(dAtA[i:], m.Namespace)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID)))
+ i += copy(dAtA[i:], m.UID)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion)))
+ i += copy(dAtA[i:], m.APIVersion)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceVersion)))
+ i += copy(dAtA[i:], m.ResourceVersion)
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FieldPath)))
+ i += copy(dAtA[i:], m.FieldPath)
+ return i, nil
+}
+
+func (m *PersistentVolume) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PersistentVolume) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n85, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n85
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n86, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n86
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n87, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n87
+ return i, nil
+}
+
+func (m *PersistentVolumeClaim) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PersistentVolumeClaim) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n88, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n88
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n89, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n89
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n90, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n90
+ return i, nil
+}
+
+func (m *PersistentVolumeClaimList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PersistentVolumeClaimList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n91, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n91
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PersistentVolumeClaimSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PersistentVolumeClaimSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.AccessModes) > 0 {
+ for _, s := range m.AccessModes {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Resources.Size()))
+ n92, err := m.Resources.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n92
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.VolumeName)))
+ i += copy(dAtA[i:], m.VolumeName)
+ if m.Selector != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
+ n93, err := m.Selector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n93
+ }
+ if m.StorageClassName != nil {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.StorageClassName)))
+ i += copy(dAtA[i:], *m.StorageClassName)
+ }
+ return i, nil
+}
+
+func (m *PersistentVolumeClaimStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PersistentVolumeClaimStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Phase)))
+ i += copy(dAtA[i:], m.Phase)
+ if len(m.AccessModes) > 0 {
+ for _, s := range m.AccessModes {
+ dAtA[i] = 0x12
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Capacity) > 0 {
+ keysForCapacity := make([]string, 0, len(m.Capacity))
+ for k := range m.Capacity {
+ keysForCapacity = append(keysForCapacity, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity)
+ for _, k := range keysForCapacity {
+ dAtA[i] = 0x1a
+ i++
+ v := m.Capacity[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n94, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n94
+ }
+ }
+ return i, nil
+}
+
+func (m *PersistentVolumeClaimVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PersistentVolumeClaimVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ClaimName)))
+ i += copy(dAtA[i:], m.ClaimName)
+ dAtA[i] = 0x10
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *PersistentVolumeList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PersistentVolumeList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n95, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n95
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PersistentVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PersistentVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.GCEPersistentDisk != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.GCEPersistentDisk.Size()))
+ n96, err := m.GCEPersistentDisk.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n96
+ }
+ if m.AWSElasticBlockStore != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.AWSElasticBlockStore.Size()))
+ n97, err := m.AWSElasticBlockStore.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n97
+ }
+ if m.HostPath != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.HostPath.Size()))
+ n98, err := m.HostPath.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n98
+ }
+ if m.Glusterfs != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Glusterfs.Size()))
+ n99, err := m.Glusterfs.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n99
+ }
+ if m.NFS != nil {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NFS.Size()))
+ n100, err := m.NFS.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n100
+ }
+ if m.RBD != nil {
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RBD.Size()))
+ n101, err := m.RBD.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n101
+ }
+ if m.ISCSI != nil {
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ISCSI.Size()))
+ n102, err := m.ISCSI.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n102
+ }
+ if m.Cinder != nil {
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Cinder.Size()))
+ n103, err := m.Cinder.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n103
+ }
+ if m.CephFS != nil {
+ dAtA[i] = 0x4a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CephFS.Size()))
+ n104, err := m.CephFS.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n104
+ }
+ if m.FC != nil {
+ dAtA[i] = 0x52
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.FC.Size()))
+ n105, err := m.FC.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n105
+ }
+ if m.Flocker != nil {
+ dAtA[i] = 0x5a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Flocker.Size()))
+ n106, err := m.Flocker.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n106
+ }
+ if m.FlexVolume != nil {
+ dAtA[i] = 0x62
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.FlexVolume.Size()))
+ n107, err := m.FlexVolume.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n107
+ }
+ if m.AzureFile != nil {
+ dAtA[i] = 0x6a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.AzureFile.Size()))
+ n108, err := m.AzureFile.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n108
+ }
+ if m.VsphereVolume != nil {
+ dAtA[i] = 0x72
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.VsphereVolume.Size()))
+ n109, err := m.VsphereVolume.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n109
+ }
+ if m.Quobyte != nil {
+ dAtA[i] = 0x7a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Quobyte.Size()))
+ n110, err := m.Quobyte.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n110
+ }
+ if m.AzureDisk != nil {
+ dAtA[i] = 0x82
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.AzureDisk.Size()))
+ n111, err := m.AzureDisk.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n111
+ }
+ if m.PhotonPersistentDisk != nil {
+ dAtA[i] = 0x8a
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PhotonPersistentDisk.Size()))
+ n112, err := m.PhotonPersistentDisk.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n112
+ }
+ if m.PortworxVolume != nil {
+ dAtA[i] = 0x92
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PortworxVolume.Size()))
+ n113, err := m.PortworxVolume.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n113
+ }
+ if m.ScaleIO != nil {
+ dAtA[i] = 0x9a
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ScaleIO.Size()))
+ n114, err := m.ScaleIO.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n114
+ }
+ if m.Local != nil {
+ dAtA[i] = 0xa2
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Local.Size()))
+ n115, err := m.Local.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n115
+ }
+ if m.StorageOS != nil {
+ dAtA[i] = 0xaa
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.StorageOS.Size()))
+ n116, err := m.StorageOS.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n116
+ }
+ return i, nil
+}
+
+func (m *PersistentVolumeSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PersistentVolumeSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Capacity) > 0 {
+ keysForCapacity := make([]string, 0, len(m.Capacity))
+ for k := range m.Capacity {
+ keysForCapacity = append(keysForCapacity, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity)
+ for _, k := range keysForCapacity {
+ dAtA[i] = 0xa
+ i++
+ v := m.Capacity[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n117, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n117
+ }
+ }
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PersistentVolumeSource.Size()))
+ n118, err := m.PersistentVolumeSource.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n118
+ if len(m.AccessModes) > 0 {
+ for _, s := range m.AccessModes {
+ dAtA[i] = 0x1a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if m.ClaimRef != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ClaimRef.Size()))
+ n119, err := m.ClaimRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n119
+ }
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.PersistentVolumeReclaimPolicy)))
+ i += copy(dAtA[i:], m.PersistentVolumeReclaimPolicy)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.StorageClassName)))
+ i += copy(dAtA[i:], m.StorageClassName)
+ return i, nil
+}
+
+func (m *PersistentVolumeStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PersistentVolumeStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Phase)))
+ i += copy(dAtA[i:], m.Phase)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ return i, nil
+}
+
+func (m *PhotonPersistentDiskVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PhotonPersistentDiskVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.PdID)))
+ i += copy(dAtA[i:], m.PdID)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FSType)))
+ i += copy(dAtA[i:], m.FSType)
+ return i, nil
+}
+
+func (m *Pod) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Pod) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n120, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n120
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n121, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n121
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n122, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n122
+ return i, nil
+}
+
+func (m *PodAffinity) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodAffinity) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.RequiredDuringSchedulingIgnoredDuringExecution) > 0 {
+ for _, msg := range m.RequiredDuringSchedulingIgnoredDuringExecution {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.PreferredDuringSchedulingIgnoredDuringExecution) > 0 {
+ for _, msg := range m.PreferredDuringSchedulingIgnoredDuringExecution {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PodAffinityTerm) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodAffinityTerm) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.LabelSelector != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LabelSelector.Size()))
+ n123, err := m.LabelSelector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n123
+ }
+ if len(m.Namespaces) > 0 {
+ for _, s := range m.Namespaces {
+ dAtA[i] = 0x12
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.TopologyKey)))
+ i += copy(dAtA[i:], m.TopologyKey)
+ return i, nil
+}
+
+func (m *PodAntiAffinity) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodAntiAffinity) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.RequiredDuringSchedulingIgnoredDuringExecution) > 0 {
+ for _, msg := range m.RequiredDuringSchedulingIgnoredDuringExecution {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.PreferredDuringSchedulingIgnoredDuringExecution) > 0 {
+ for _, msg := range m.PreferredDuringSchedulingIgnoredDuringExecution {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PodAttachOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodAttachOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ if m.Stdin {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x10
+ i++
+ if m.Stdout {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x18
+ i++
+ if m.Stderr {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x20
+ i++
+ if m.TTY {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Container)))
+ i += copy(dAtA[i:], m.Container)
+ return i, nil
+}
+
+func (m *PodCondition) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodCondition) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
+ i += copy(dAtA[i:], m.Status)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastProbeTime.Size()))
+ n124, err := m.LastProbeTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n124
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
+ n125, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n125
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ return i, nil
+}
+
+func (m *PodExecOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodExecOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ if m.Stdin {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x10
+ i++
+ if m.Stdout {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x18
+ i++
+ if m.Stderr {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x20
+ i++
+ if m.TTY {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Container)))
+ i += copy(dAtA[i:], m.Container)
+ if len(m.Command) > 0 {
+ for _, s := range m.Command {
+ dAtA[i] = 0x32
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *PodList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n126, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n126
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PodLogOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodLogOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Container)))
+ i += copy(dAtA[i:], m.Container)
+ dAtA[i] = 0x10
+ i++
+ if m.Follow {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x18
+ i++
+ if m.Previous {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ if m.SinceSeconds != nil {
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.SinceSeconds))
+ }
+ if m.SinceTime != nil {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SinceTime.Size()))
+ n127, err := m.SinceTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n127
+ }
+ dAtA[i] = 0x30
+ i++
+ if m.Timestamps {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ if m.TailLines != nil {
+ dAtA[i] = 0x38
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.TailLines))
+ }
+ if m.LimitBytes != nil {
+ dAtA[i] = 0x40
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.LimitBytes))
+ }
+ return i, nil
+}
+
+func (m *PodPortForwardOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodPortForwardOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Ports) > 0 {
+ for _, num := range m.Ports {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(num))
+ }
+ }
+ return i, nil
+}
+
+func (m *PodProxyOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodProxyOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i += copy(dAtA[i:], m.Path)
+ return i, nil
+}
+
+func (m *PodSecurityContext) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodSecurityContext) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.SELinuxOptions != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SELinuxOptions.Size()))
+ n128, err := m.SELinuxOptions.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n128
+ }
+ if m.RunAsUser != nil {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.RunAsUser))
+ }
+ if m.RunAsNonRoot != nil {
+ dAtA[i] = 0x18
+ i++
+ if *m.RunAsNonRoot {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if len(m.SupplementalGroups) > 0 {
+ for _, num := range m.SupplementalGroups {
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(num))
+ }
+ }
+ if m.FSGroup != nil {
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.FSGroup))
+ }
+ return i, nil
+}
+
+func (m *PodSignature) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodSignature) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.PodController != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PodController.Size()))
+ n129, err := m.PodController.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n129
+ }
+ return i, nil
+}
+
+func (m *PodSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Volumes) > 0 {
+ for _, msg := range m.Volumes {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Containers) > 0 {
+ for _, msg := range m.Containers {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.RestartPolicy)))
+ i += copy(dAtA[i:], m.RestartPolicy)
+ if m.TerminationGracePeriodSeconds != nil {
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.TerminationGracePeriodSeconds))
+ }
+ if m.ActiveDeadlineSeconds != nil {
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.ActiveDeadlineSeconds))
+ }
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.DNSPolicy)))
+ i += copy(dAtA[i:], m.DNSPolicy)
+ if len(m.NodeSelector) > 0 {
+ keysForNodeSelector := make([]string, 0, len(m.NodeSelector))
+ for k := range m.NodeSelector {
+ keysForNodeSelector = append(keysForNodeSelector, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForNodeSelector)
+ for _, k := range keysForNodeSelector {
+ dAtA[i] = 0x3a
+ i++
+ v := m.NodeSelector[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ServiceAccountName)))
+ i += copy(dAtA[i:], m.ServiceAccountName)
+ dAtA[i] = 0x4a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.DeprecatedServiceAccount)))
+ i += copy(dAtA[i:], m.DeprecatedServiceAccount)
+ dAtA[i] = 0x52
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.NodeName)))
+ i += copy(dAtA[i:], m.NodeName)
+ dAtA[i] = 0x58
+ i++
+ if m.HostNetwork {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x60
+ i++
+ if m.HostPID {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x68
+ i++
+ if m.HostIPC {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ if m.SecurityContext != nil {
+ dAtA[i] = 0x72
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SecurityContext.Size()))
+ n130, err := m.SecurityContext.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n130
+ }
+ if len(m.ImagePullSecrets) > 0 {
+ for _, msg := range m.ImagePullSecrets {
+ dAtA[i] = 0x7a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x82
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Hostname)))
+ i += copy(dAtA[i:], m.Hostname)
+ dAtA[i] = 0x8a
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Subdomain)))
+ i += copy(dAtA[i:], m.Subdomain)
+ if m.Affinity != nil {
+ dAtA[i] = 0x92
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Affinity.Size()))
+ n131, err := m.Affinity.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n131
+ }
+ dAtA[i] = 0x9a
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.SchedulerName)))
+ i += copy(dAtA[i:], m.SchedulerName)
+ if len(m.InitContainers) > 0 {
+ for _, msg := range m.InitContainers {
+ dAtA[i] = 0xa2
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.AutomountServiceAccountToken != nil {
+ dAtA[i] = 0xa8
+ i++
+ dAtA[i] = 0x1
+ i++
+ if *m.AutomountServiceAccountToken {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if len(m.Tolerations) > 0 {
+ for _, msg := range m.Tolerations {
+ dAtA[i] = 0xb2
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.HostAliases) > 0 {
+ for _, msg := range m.HostAliases {
+ dAtA[i] = 0xba
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PodStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Phase)))
+ i += copy(dAtA[i:], m.Phase)
+ if len(m.Conditions) > 0 {
+ for _, msg := range m.Conditions {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.HostIP)))
+ i += copy(dAtA[i:], m.HostIP)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.PodIP)))
+ i += copy(dAtA[i:], m.PodIP)
+ if m.StartTime != nil {
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.StartTime.Size()))
+ n132, err := m.StartTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n132
+ }
+ if len(m.ContainerStatuses) > 0 {
+ for _, msg := range m.ContainerStatuses {
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x4a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.QOSClass)))
+ i += copy(dAtA[i:], m.QOSClass)
+ if len(m.InitContainerStatuses) > 0 {
+ for _, msg := range m.InitContainerStatuses {
+ dAtA[i] = 0x52
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PodStatusResult) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodStatusResult) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n133, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n133
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n134, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n134
+ return i, nil
+}
+
+func (m *PodTemplate) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodTemplate) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n135, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n135
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
+ n136, err := m.Template.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n136
+ return i, nil
+}
+
+func (m *PodTemplateList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodTemplateList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n137, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n137
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PodTemplateSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodTemplateSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n138, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n138
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n139, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n139
+ return i, nil
+}
+
+func (m *PortworxVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PortworxVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.VolumeID)))
+ i += copy(dAtA[i:], m.VolumeID)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FSType)))
+ i += copy(dAtA[i:], m.FSType)
+ dAtA[i] = 0x18
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *Preconditions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Preconditions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.UID != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.UID)))
+ i += copy(dAtA[i:], *m.UID)
+ }
+ return i, nil
+}
+
+func (m *PreferAvoidPodsEntry) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PreferAvoidPodsEntry) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PodSignature.Size()))
+ n140, err := m.PodSignature.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n140
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.EvictionTime.Size()))
+ n141, err := m.EvictionTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n141
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ return i, nil
+}
+
+func (m *PreferredSchedulingTerm) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PreferredSchedulingTerm) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Weight))
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Preference.Size()))
+ n142, err := m.Preference.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n142
+ return i, nil
+}
+
+func (m *Probe) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Probe) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Handler.Size()))
+ n143, err := m.Handler.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n143
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.InitialDelaySeconds))
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.TimeoutSeconds))
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PeriodSeconds))
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SuccessThreshold))
+ dAtA[i] = 0x30
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.FailureThreshold))
+ return i, nil
+}
+
+func (m *ProjectedVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ProjectedVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Sources) > 0 {
+ for _, msg := range m.Sources {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.DefaultMode != nil {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.DefaultMode))
+ }
+ return i, nil
+}
+
+func (m *QuobyteVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *QuobyteVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Registry)))
+ i += copy(dAtA[i:], m.Registry)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Volume)))
+ i += copy(dAtA[i:], m.Volume)
+ dAtA[i] = 0x18
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.User)))
+ i += copy(dAtA[i:], m.User)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group)))
+ i += copy(dAtA[i:], m.Group)
+ return i, nil
+}
+
+func (m *RBDVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RBDVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.CephMonitors) > 0 {
+ for _, s := range m.CephMonitors {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.RBDImage)))
+ i += copy(dAtA[i:], m.RBDImage)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FSType)))
+ i += copy(dAtA[i:], m.FSType)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.RBDPool)))
+ i += copy(dAtA[i:], m.RBDPool)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.RadosUser)))
+ i += copy(dAtA[i:], m.RadosUser)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Keyring)))
+ i += copy(dAtA[i:], m.Keyring)
+ if m.SecretRef != nil {
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size()))
+ n144, err := m.SecretRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n144
+ }
+ dAtA[i] = 0x40
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *RangeAllocation) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RangeAllocation) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n145, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n145
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Range)))
+ i += copy(dAtA[i:], m.Range)
+ if m.Data != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Data)))
+ i += copy(dAtA[i:], m.Data)
+ }
+ return i, nil
+}
+
+func (m *ReplicationController) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReplicationController) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n146, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n146
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n147, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n147
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n148, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n148
+ return i, nil
+}
+
+func (m *ReplicationControllerCondition) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReplicationControllerCondition) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
+ i += copy(dAtA[i:], m.Status)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
+ n149, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n149
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ return i, nil
+}
+
+func (m *ReplicationControllerList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReplicationControllerList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n150, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n150
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ReplicationControllerSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReplicationControllerSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Replicas != nil {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.Replicas))
+ }
+ if len(m.Selector) > 0 {
+ keysForSelector := make([]string, 0, len(m.Selector))
+ for k := range m.Selector {
+ keysForSelector = append(keysForSelector, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForSelector)
+ for _, k := range keysForSelector {
+ dAtA[i] = 0x12
+ i++
+ v := m.Selector[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ if m.Template != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
+ n151, err := m.Template.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n151
+ }
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.MinReadySeconds))
+ return i, nil
+}
+
+func (m *ReplicationControllerStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReplicationControllerStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.FullyLabeledReplicas))
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration))
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ReadyReplicas))
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.AvailableReplicas))
+ if len(m.Conditions) > 0 {
+ for _, msg := range m.Conditions {
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ResourceFieldSelector) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceFieldSelector) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ContainerName)))
+ i += copy(dAtA[i:], m.ContainerName)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource)))
+ i += copy(dAtA[i:], m.Resource)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Divisor.Size()))
+ n152, err := m.Divisor.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n152
+ return i, nil
+}
+
+func (m *ResourceQuota) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceQuota) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n153, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n153
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n154, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n154
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n155, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n155
+ return i, nil
+}
+
+func (m *ResourceQuotaList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceQuotaList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n156, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n156
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ResourceQuotaSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceQuotaSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Hard) > 0 {
+ keysForHard := make([]string, 0, len(m.Hard))
+ for k := range m.Hard {
+ keysForHard = append(keysForHard, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForHard)
+ for _, k := range keysForHard {
+ dAtA[i] = 0xa
+ i++
+ v := m.Hard[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n157, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n157
+ }
+ }
+ if len(m.Scopes) > 0 {
+ for _, s := range m.Scopes {
+ dAtA[i] = 0x12
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *ResourceQuotaStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceQuotaStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Hard) > 0 {
+ keysForHard := make([]string, 0, len(m.Hard))
+ for k := range m.Hard {
+ keysForHard = append(keysForHard, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForHard)
+ for _, k := range keysForHard {
+ dAtA[i] = 0xa
+ i++
+ v := m.Hard[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n158, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n158
+ }
+ }
+ if len(m.Used) > 0 {
+ keysForUsed := make([]string, 0, len(m.Used))
+ for k := range m.Used {
+ keysForUsed = append(keysForUsed, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForUsed)
+ for _, k := range keysForUsed {
+ dAtA[i] = 0x12
+ i++
+ v := m.Used[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n159, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n159
+ }
+ }
+ return i, nil
+}
+
+func (m *ResourceRequirements) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceRequirements) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Limits) > 0 {
+ keysForLimits := make([]string, 0, len(m.Limits))
+ for k := range m.Limits {
+ keysForLimits = append(keysForLimits, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLimits)
+ for _, k := range keysForLimits {
+ dAtA[i] = 0xa
+ i++
+ v := m.Limits[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n160, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n160
+ }
+ }
+ if len(m.Requests) > 0 {
+ keysForRequests := make([]string, 0, len(m.Requests))
+ for k := range m.Requests {
+ keysForRequests = append(keysForRequests, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForRequests)
+ for _, k := range keysForRequests {
+ dAtA[i] = 0x12
+ i++
+ v := m.Requests[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n161, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n161
+ }
+ }
+ return i, nil
+}
+
+func (m *SELinuxOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SELinuxOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.User)))
+ i += copy(dAtA[i:], m.User)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Role)))
+ i += copy(dAtA[i:], m.Role)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Level)))
+ i += copy(dAtA[i:], m.Level)
+ return i, nil
+}
+
+func (m *ScaleIOVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ScaleIOVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Gateway)))
+ i += copy(dAtA[i:], m.Gateway)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.System)))
+ i += copy(dAtA[i:], m.System)
+ if m.SecretRef != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size()))
+ n162, err := m.SecretRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n162
+ }
+ dAtA[i] = 0x20
+ i++
+ if m.SSLEnabled {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ProtectionDomain)))
+ i += copy(dAtA[i:], m.ProtectionDomain)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.StoragePool)))
+ i += copy(dAtA[i:], m.StoragePool)
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.StorageMode)))
+ i += copy(dAtA[i:], m.StorageMode)
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.VolumeName)))
+ i += copy(dAtA[i:], m.VolumeName)
+ dAtA[i] = 0x4a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FSType)))
+ i += copy(dAtA[i:], m.FSType)
+ dAtA[i] = 0x50
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *Secret) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Secret) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n163, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n163
+ if len(m.Data) > 0 {
+ keysForData := make([]string, 0, len(m.Data))
+ for k := range m.Data {
+ keysForData = append(keysForData, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForData)
+ for _, k := range keysForData {
+ dAtA[i] = 0x12
+ i++
+ v := m.Data[string(k)]
+ byteSize := 0
+ if v != nil {
+ byteSize = 1 + len(v) + sovGenerated(uint64(len(v)))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + byteSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ if v != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ if len(m.StringData) > 0 {
+ keysForStringData := make([]string, 0, len(m.StringData))
+ for k := range m.StringData {
+ keysForStringData = append(keysForStringData, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForStringData)
+ for _, k := range keysForStringData {
+ dAtA[i] = 0x22
+ i++
+ v := m.StringData[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ return i, nil
+}
+
+func (m *SecretEnvSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SecretEnvSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LocalObjectReference.Size()))
+ n164, err := m.LocalObjectReference.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n164
+ if m.Optional != nil {
+ dAtA[i] = 0x10
+ i++
+ if *m.Optional {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ return i, nil
+}
+
+func (m *SecretKeySelector) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SecretKeySelector) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LocalObjectReference.Size()))
+ n165, err := m.LocalObjectReference.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n165
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key)))
+ i += copy(dAtA[i:], m.Key)
+ if m.Optional != nil {
+ dAtA[i] = 0x18
+ i++
+ if *m.Optional {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ return i, nil
+}
+
+func (m *SecretList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SecretList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n166, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n166
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *SecretProjection) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SecretProjection) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LocalObjectReference.Size()))
+ n167, err := m.LocalObjectReference.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n167
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.Optional != nil {
+ dAtA[i] = 0x20
+ i++
+ if *m.Optional {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ return i, nil
+}
+
+func (m *SecretVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SecretVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.SecretName)))
+ i += copy(dAtA[i:], m.SecretName)
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.DefaultMode != nil {
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.DefaultMode))
+ }
+ if m.Optional != nil {
+ dAtA[i] = 0x20
+ i++
+ if *m.Optional {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ return i, nil
+}
+
+func (m *SecurityContext) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SecurityContext) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Capabilities != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Capabilities.Size()))
+ n168, err := m.Capabilities.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n168
+ }
+ if m.Privileged != nil {
+ dAtA[i] = 0x10
+ i++
+ if *m.Privileged {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if m.SELinuxOptions != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SELinuxOptions.Size()))
+ n169, err := m.SELinuxOptions.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n169
+ }
+ if m.RunAsUser != nil {
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.RunAsUser))
+ }
+ if m.RunAsNonRoot != nil {
+ dAtA[i] = 0x28
+ i++
+ if *m.RunAsNonRoot {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if m.ReadOnlyRootFilesystem != nil {
+ dAtA[i] = 0x30
+ i++
+ if *m.ReadOnlyRootFilesystem {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ return i, nil
+}
+
+func (m *SerializedReference) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SerializedReference) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Reference.Size()))
+ n170, err := m.Reference.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n170
+ return i, nil
+}
+
+func (m *Service) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Service) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n171, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n171
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n172, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n172
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n173, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n173
+ return i, nil
+}
+
+func (m *ServiceAccount) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ServiceAccount) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n174, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n174
+ if len(m.Secrets) > 0 {
+ for _, msg := range m.Secrets {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.ImagePullSecrets) > 0 {
+ for _, msg := range m.ImagePullSecrets {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.AutomountServiceAccountToken != nil {
+ dAtA[i] = 0x20
+ i++
+ if *m.AutomountServiceAccountToken {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ return i, nil
+}
+
+func (m *ServiceAccountList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ServiceAccountList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n175, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n175
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ServiceList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ServiceList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n176, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n176
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ServicePort) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ServicePort) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Protocol)))
+ i += copy(dAtA[i:], m.Protocol)
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Port))
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.TargetPort.Size()))
+ n177, err := m.TargetPort.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n177
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NodePort))
+ return i, nil
+}
+
+func (m *ServiceProxyOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ServiceProxyOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i += copy(dAtA[i:], m.Path)
+ return i, nil
+}
+
+func (m *ServiceSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ServiceSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Ports) > 0 {
+ for _, msg := range m.Ports {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Selector) > 0 {
+ keysForSelector := make([]string, 0, len(m.Selector))
+ for k := range m.Selector {
+ keysForSelector = append(keysForSelector, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForSelector)
+ for _, k := range keysForSelector {
+ dAtA[i] = 0x12
+ i++
+ v := m.Selector[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ClusterIP)))
+ i += copy(dAtA[i:], m.ClusterIP)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ if len(m.ExternalIPs) > 0 {
+ for _, s := range m.ExternalIPs {
+ dAtA[i] = 0x2a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.SessionAffinity)))
+ i += copy(dAtA[i:], m.SessionAffinity)
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.LoadBalancerIP)))
+ i += copy(dAtA[i:], m.LoadBalancerIP)
+ if len(m.LoadBalancerSourceRanges) > 0 {
+ for _, s := range m.LoadBalancerSourceRanges {
+ dAtA[i] = 0x4a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ dAtA[i] = 0x52
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ExternalName)))
+ i += copy(dAtA[i:], m.ExternalName)
+ dAtA[i] = 0x5a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ExternalTrafficPolicy)))
+ i += copy(dAtA[i:], m.ExternalTrafficPolicy)
+ dAtA[i] = 0x60
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.HealthCheckNodePort))
+ return i, nil
+}
+
+func (m *ServiceStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ServiceStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LoadBalancer.Size()))
+ n178, err := m.LoadBalancer.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n178
+ return i, nil
+}
+
+func (m *StorageOSPersistentVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StorageOSPersistentVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.VolumeName)))
+ i += copy(dAtA[i:], m.VolumeName)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.VolumeNamespace)))
+ i += copy(dAtA[i:], m.VolumeNamespace)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FSType)))
+ i += copy(dAtA[i:], m.FSType)
+ dAtA[i] = 0x20
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ if m.SecretRef != nil {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size()))
+ n179, err := m.SecretRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n179
+ }
+ return i, nil
+}
+
+func (m *StorageOSVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StorageOSVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.VolumeName)))
+ i += copy(dAtA[i:], m.VolumeName)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.VolumeNamespace)))
+ i += copy(dAtA[i:], m.VolumeNamespace)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FSType)))
+ i += copy(dAtA[i:], m.FSType)
+ dAtA[i] = 0x20
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ if m.SecretRef != nil {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size()))
+ n180, err := m.SecretRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n180
+ }
+ return i, nil
+}
+
+func (m *Sysctl) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Sysctl) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Value)))
+ i += copy(dAtA[i:], m.Value)
+ return i, nil
+}
+
+func (m *TCPSocketAction) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *TCPSocketAction) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Port.Size()))
+ n181, err := m.Port.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n181
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Host)))
+ i += copy(dAtA[i:], m.Host)
+ return i, nil
+}
+
+func (m *Taint) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Taint) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key)))
+ i += copy(dAtA[i:], m.Key)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Value)))
+ i += copy(dAtA[i:], m.Value)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Effect)))
+ i += copy(dAtA[i:], m.Effect)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.TimeAdded.Size()))
+ n182, err := m.TimeAdded.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n182
+ return i, nil
+}
+
+func (m *Toleration) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Toleration) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key)))
+ i += copy(dAtA[i:], m.Key)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Operator)))
+ i += copy(dAtA[i:], m.Operator)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Value)))
+ i += copy(dAtA[i:], m.Value)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Effect)))
+ i += copy(dAtA[i:], m.Effect)
+ if m.TolerationSeconds != nil {
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.TolerationSeconds))
+ }
+ return i, nil
+}
+
+func (m *Volume) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Volume) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.VolumeSource.Size()))
+ n183, err := m.VolumeSource.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n183
+ return i, nil
+}
+
+func (m *VolumeMount) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *VolumeMount) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x10
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.MountPath)))
+ i += copy(dAtA[i:], m.MountPath)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.SubPath)))
+ i += copy(dAtA[i:], m.SubPath)
+ return i, nil
+}
+
+func (m *VolumeProjection) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *VolumeProjection) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Secret != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Secret.Size()))
+ n184, err := m.Secret.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n184
+ }
+ if m.DownwardAPI != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.DownwardAPI.Size()))
+ n185, err := m.DownwardAPI.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n185
+ }
+ if m.ConfigMap != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ConfigMap.Size()))
+ n186, err := m.ConfigMap.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n186
+ }
+ return i, nil
+}
+
+func (m *VolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *VolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.HostPath != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.HostPath.Size()))
+ n187, err := m.HostPath.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n187
+ }
+ if m.EmptyDir != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.EmptyDir.Size()))
+ n188, err := m.EmptyDir.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n188
+ }
+ if m.GCEPersistentDisk != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.GCEPersistentDisk.Size()))
+ n189, err := m.GCEPersistentDisk.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n189
+ }
+ if m.AWSElasticBlockStore != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.AWSElasticBlockStore.Size()))
+ n190, err := m.AWSElasticBlockStore.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n190
+ }
+ if m.GitRepo != nil {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.GitRepo.Size()))
+ n191, err := m.GitRepo.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n191
+ }
+ if m.Secret != nil {
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Secret.Size()))
+ n192, err := m.Secret.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n192
+ }
+ if m.NFS != nil {
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NFS.Size()))
+ n193, err := m.NFS.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n193
+ }
+ if m.ISCSI != nil {
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ISCSI.Size()))
+ n194, err := m.ISCSI.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n194
+ }
+ if m.Glusterfs != nil {
+ dAtA[i] = 0x4a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Glusterfs.Size()))
+ n195, err := m.Glusterfs.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n195
+ }
+ if m.PersistentVolumeClaim != nil {
+ dAtA[i] = 0x52
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PersistentVolumeClaim.Size()))
+ n196, err := m.PersistentVolumeClaim.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n196
+ }
+ if m.RBD != nil {
+ dAtA[i] = 0x5a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RBD.Size()))
+ n197, err := m.RBD.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n197
+ }
+ if m.FlexVolume != nil {
+ dAtA[i] = 0x62
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.FlexVolume.Size()))
+ n198, err := m.FlexVolume.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n198
+ }
+ if m.Cinder != nil {
+ dAtA[i] = 0x6a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Cinder.Size()))
+ n199, err := m.Cinder.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n199
+ }
+ if m.CephFS != nil {
+ dAtA[i] = 0x72
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CephFS.Size()))
+ n200, err := m.CephFS.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n200
+ }
+ if m.Flocker != nil {
+ dAtA[i] = 0x7a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Flocker.Size()))
+ n201, err := m.Flocker.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n201
+ }
+ if m.DownwardAPI != nil {
+ dAtA[i] = 0x82
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.DownwardAPI.Size()))
+ n202, err := m.DownwardAPI.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n202
+ }
+ if m.FC != nil {
+ dAtA[i] = 0x8a
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.FC.Size()))
+ n203, err := m.FC.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n203
+ }
+ if m.AzureFile != nil {
+ dAtA[i] = 0x92
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.AzureFile.Size()))
+ n204, err := m.AzureFile.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n204
+ }
+ if m.ConfigMap != nil {
+ dAtA[i] = 0x9a
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ConfigMap.Size()))
+ n205, err := m.ConfigMap.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n205
+ }
+ if m.VsphereVolume != nil {
+ dAtA[i] = 0xa2
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.VsphereVolume.Size()))
+ n206, err := m.VsphereVolume.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n206
+ }
+ if m.Quobyte != nil {
+ dAtA[i] = 0xaa
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Quobyte.Size()))
+ n207, err := m.Quobyte.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n207
+ }
+ if m.AzureDisk != nil {
+ dAtA[i] = 0xb2
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.AzureDisk.Size()))
+ n208, err := m.AzureDisk.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n208
+ }
+ if m.PhotonPersistentDisk != nil {
+ dAtA[i] = 0xba
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PhotonPersistentDisk.Size()))
+ n209, err := m.PhotonPersistentDisk.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n209
+ }
+ if m.PortworxVolume != nil {
+ dAtA[i] = 0xc2
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PortworxVolume.Size()))
+ n210, err := m.PortworxVolume.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n210
+ }
+ if m.ScaleIO != nil {
+ dAtA[i] = 0xca
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ScaleIO.Size()))
+ n211, err := m.ScaleIO.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n211
+ }
+ if m.Projected != nil {
+ dAtA[i] = 0xd2
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Projected.Size()))
+ n212, err := m.Projected.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n212
+ }
+ if m.StorageOS != nil {
+ dAtA[i] = 0xda
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.StorageOS.Size()))
+ n213, err := m.StorageOS.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n213
+ }
+ return i, nil
+}
+
+func (m *VsphereVirtualDiskVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *VsphereVirtualDiskVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.VolumePath)))
+ i += copy(dAtA[i:], m.VolumePath)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FSType)))
+ i += copy(dAtA[i:], m.FSType)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.StoragePolicyName)))
+ i += copy(dAtA[i:], m.StoragePolicyName)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.StoragePolicyID)))
+ i += copy(dAtA[i:], m.StoragePolicyID)
+ return i, nil
+}
+
+func (m *WeightedPodAffinityTerm) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *WeightedPodAffinityTerm) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Weight))
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PodAffinityTerm.Size()))
+ n214, err := m.PodAffinityTerm.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n214
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *AWSElasticBlockStoreVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.VolumeID)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FSType)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.Partition))
+ n += 2
+ return n
+}
+
+func (m *Affinity) Size() (n int) {
+ var l int
+ _ = l
+ if m.NodeAffinity != nil {
+ l = m.NodeAffinity.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.PodAffinity != nil {
+ l = m.PodAffinity.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.PodAntiAffinity != nil {
+ l = m.PodAntiAffinity.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *AttachedVolume) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.DevicePath)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *AvoidPods) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.PreferAvoidPods) > 0 {
+ for _, e := range m.PreferAvoidPods {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *AzureDiskVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.DiskName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.DataDiskURI)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.CachingMode != nil {
+ l = len(*m.CachingMode)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.FSType != nil {
+ l = len(*m.FSType)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.ReadOnly != nil {
+ n += 2
+ }
+ if m.Kind != nil {
+ l = len(*m.Kind)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *AzureFileVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.SecretName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ShareName)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ return n
+}
+
+func (m *Binding) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Target.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Capabilities) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Add) > 0 {
+ for _, s := range m.Add {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Drop) > 0 {
+ for _, s := range m.Drop {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *CephFSVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Monitors) > 0 {
+ for _, s := range m.Monitors {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.User)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.SecretFile)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.SecretRef != nil {
+ l = m.SecretRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ n += 2
+ return n
+}
+
+func (m *CinderVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.VolumeID)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FSType)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ return n
+}
+
+func (m *ComponentCondition) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Status)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Error)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ComponentStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Conditions) > 0 {
+ for _, e := range m.Conditions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ComponentStatusList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ConfigMap) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Data) > 0 {
+ for k, v := range m.Data {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *ConfigMapEnvSource) Size() (n int) {
+ var l int
+ _ = l
+ l = m.LocalObjectReference.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Optional != nil {
+ n += 2
+ }
+ return n
+}
+
+func (m *ConfigMapKeySelector) Size() (n int) {
+ var l int
+ _ = l
+ l = m.LocalObjectReference.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Key)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Optional != nil {
+ n += 2
+ }
+ return n
+}
+
+func (m *ConfigMapList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ConfigMapProjection) Size() (n int) {
+ var l int
+ _ = l
+ l = m.LocalObjectReference.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.Optional != nil {
+ n += 2
+ }
+ return n
+}
+
+func (m *ConfigMapVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = m.LocalObjectReference.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.DefaultMode != nil {
+ n += 1 + sovGenerated(uint64(*m.DefaultMode))
+ }
+ if m.Optional != nil {
+ n += 2
+ }
+ return n
+}
+
+func (m *Container) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Image)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Command) > 0 {
+ for _, s := range m.Command {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Args) > 0 {
+ for _, s := range m.Args {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.WorkingDir)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Ports) > 0 {
+ for _, e := range m.Ports {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Env) > 0 {
+ for _, e := range m.Env {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = m.Resources.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.VolumeMounts) > 0 {
+ for _, e := range m.VolumeMounts {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.LivenessProbe != nil {
+ l = m.LivenessProbe.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.ReadinessProbe != nil {
+ l = m.ReadinessProbe.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Lifecycle != nil {
+ l = m.Lifecycle.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ l = len(m.TerminationMessagePath)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ImagePullPolicy)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.SecurityContext != nil {
+ l = m.SecurityContext.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ n += 3
+ n += 3
+ n += 3
+ if len(m.EnvFrom) > 0 {
+ for _, e := range m.EnvFrom {
+ l = e.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.TerminationMessagePolicy)
+ n += 2 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ContainerImage) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Names) > 0 {
+ for _, s := range m.Names {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ n += 1 + sovGenerated(uint64(m.SizeBytes))
+ return n
+}
+
+func (m *ContainerPort) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.HostPort))
+ n += 1 + sovGenerated(uint64(m.ContainerPort))
+ l = len(m.Protocol)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.HostIP)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ContainerState) Size() (n int) {
+ var l int
+ _ = l
+ if m.Waiting != nil {
+ l = m.Waiting.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Running != nil {
+ l = m.Running.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Terminated != nil {
+ l = m.Terminated.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *ContainerStateRunning) Size() (n int) {
+ var l int
+ _ = l
+ l = m.StartedAt.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ContainerStateTerminated) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.ExitCode))
+ n += 1 + sovGenerated(uint64(m.Signal))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.StartedAt.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.FinishedAt.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ContainerID)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ContainerStateWaiting) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ContainerStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.State.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastTerminationState.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ n += 1 + sovGenerated(uint64(m.RestartCount))
+ l = len(m.Image)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ImageID)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ContainerID)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *DaemonEndpoint) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Port))
+ return n
+}
+
+func (m *DeleteOptions) Size() (n int) {
+ var l int
+ _ = l
+ if m.GracePeriodSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.GracePeriodSeconds))
+ }
+ if m.Preconditions != nil {
+ l = m.Preconditions.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.OrphanDependents != nil {
+ n += 2
+ }
+ if m.PropagationPolicy != nil {
+ l = len(*m.PropagationPolicy)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *DownwardAPIProjection) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *DownwardAPIVolumeFile) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.FieldRef != nil {
+ l = m.FieldRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.ResourceFieldRef != nil {
+ l = m.ResourceFieldRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Mode != nil {
+ n += 1 + sovGenerated(uint64(*m.Mode))
+ }
+ return n
+}
+
+func (m *DownwardAPIVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.DefaultMode != nil {
+ n += 1 + sovGenerated(uint64(*m.DefaultMode))
+ }
+ return n
+}
+
+func (m *EmptyDirVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Medium)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.SizeLimit.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *EndpointAddress) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.IP)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.TargetRef != nil {
+ l = m.TargetRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ l = len(m.Hostname)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.NodeName != nil {
+ l = len(*m.NodeName)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *EndpointPort) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.Port))
+ l = len(m.Protocol)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *EndpointSubset) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Addresses) > 0 {
+ for _, e := range m.Addresses {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.NotReadyAddresses) > 0 {
+ for _, e := range m.NotReadyAddresses {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Ports) > 0 {
+ for _, e := range m.Ports {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *Endpoints) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Subsets) > 0 {
+ for _, e := range m.Subsets {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *EndpointsList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *EnvFromSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Prefix)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.ConfigMapRef != nil {
+ l = m.ConfigMapRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.SecretRef != nil {
+ l = m.SecretRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *EnvVar) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Value)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.ValueFrom != nil {
+ l = m.ValueFrom.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *EnvVarSource) Size() (n int) {
+ var l int
+ _ = l
+ if m.FieldRef != nil {
+ l = m.FieldRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.ResourceFieldRef != nil {
+ l = m.ResourceFieldRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.ConfigMapKeyRef != nil {
+ l = m.ConfigMapKeyRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.SecretKeyRef != nil {
+ l = m.SecretKeyRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *Event) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.InvolvedObject.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Source.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.FirstTimestamp.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastTimestamp.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.Count))
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *EventList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *EventSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Component)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Host)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ExecAction) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Command) > 0 {
+ for _, s := range m.Command {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *FCVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.TargetWWNs) > 0 {
+ for _, s := range m.TargetWWNs {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.Lun != nil {
+ n += 1 + sovGenerated(uint64(*m.Lun))
+ }
+ l = len(m.FSType)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ return n
+}
+
+func (m *FlexVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Driver)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FSType)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.SecretRef != nil {
+ l = m.SecretRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ n += 2
+ if len(m.Options) > 0 {
+ for k, v := range m.Options {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *FlockerVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.DatasetName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.DatasetUUID)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *GCEPersistentDiskVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.PDName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FSType)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.Partition))
+ n += 2
+ return n
+}
+
+func (m *GitRepoVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Repository)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Revision)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Directory)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *GlusterfsVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.EndpointsName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ return n
+}
+
+func (m *HTTPGetAction) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Port.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Host)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Scheme)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.HTTPHeaders) > 0 {
+ for _, e := range m.HTTPHeaders {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *HTTPHeader) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Value)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Handler) Size() (n int) {
+ var l int
+ _ = l
+ if m.Exec != nil {
+ l = m.Exec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.HTTPGet != nil {
+ l = m.HTTPGet.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.TCPSocket != nil {
+ l = m.TCPSocket.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *HostAlias) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.IP)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Hostnames) > 0 {
+ for _, s := range m.Hostnames {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *HostPathVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ISCSIVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.TargetPortal)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.IQN)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.Lun))
+ l = len(m.ISCSIInterface)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FSType)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ if len(m.Portals) > 0 {
+ for _, s := range m.Portals {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ n += 2
+ if m.SecretRef != nil {
+ l = m.SecretRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ n += 2
+ return n
+}
+
+func (m *KeyToPath) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Key)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Mode != nil {
+ n += 1 + sovGenerated(uint64(*m.Mode))
+ }
+ return n
+}
+
+func (m *Lifecycle) Size() (n int) {
+ var l int
+ _ = l
+ if m.PostStart != nil {
+ l = m.PostStart.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.PreStop != nil {
+ l = m.PreStop.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *LimitRange) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *LimitRangeItem) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Max) > 0 {
+ for k, v := range m.Max {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ if len(m.Min) > 0 {
+ for k, v := range m.Min {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ if len(m.Default) > 0 {
+ for k, v := range m.Default {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ if len(m.DefaultRequest) > 0 {
+ for k, v := range m.DefaultRequest {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ if len(m.MaxLimitRequestRatio) > 0 {
+ for k, v := range m.MaxLimitRequestRatio {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *LimitRangeList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *LimitRangeSpec) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Limits) > 0 {
+ for _, e := range m.Limits {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *List) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ListOptions) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.LabelSelector)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FieldSelector)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ l = len(m.ResourceVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.TimeoutSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.TimeoutSeconds))
+ }
+ n += 2
+ return n
+}
+
+func (m *LoadBalancerIngress) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.IP)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Hostname)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *LoadBalancerStatus) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Ingress) > 0 {
+ for _, e := range m.Ingress {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *LocalObjectReference) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *LocalVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *NFSVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Server)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ return n
+}
+
+func (m *Namespace) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *NamespaceList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *NamespaceSpec) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Finalizers) > 0 {
+ for _, s := range m.Finalizers {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *NamespaceStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Phase)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Node) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *NodeAddress) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Address)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *NodeAffinity) Size() (n int) {
+ var l int
+ _ = l
+ if m.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ l = m.RequiredDuringSchedulingIgnoredDuringExecution.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if len(m.PreferredDuringSchedulingIgnoredDuringExecution) > 0 {
+ for _, e := range m.PreferredDuringSchedulingIgnoredDuringExecution {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *NodeCondition) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Status)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastHeartbeatTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastTransitionTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *NodeDaemonEndpoints) Size() (n int) {
+ var l int
+ _ = l
+ l = m.KubeletEndpoint.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *NodeList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *NodeProxyOptions) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *NodeResources) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Capacity) > 0 {
+ for k, v := range m.Capacity {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *NodeSelector) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.NodeSelectorTerms) > 0 {
+ for _, e := range m.NodeSelectorTerms {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *NodeSelectorRequirement) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Key)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Operator)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Values) > 0 {
+ for _, s := range m.Values {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *NodeSelectorTerm) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.MatchExpressions) > 0 {
+ for _, e := range m.MatchExpressions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *NodeSpec) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.PodCIDR)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ExternalID)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ProviderID)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ if len(m.Taints) > 0 {
+ for _, e := range m.Taints {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *NodeStatus) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Capacity) > 0 {
+ for k, v := range m.Capacity {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ if len(m.Allocatable) > 0 {
+ for k, v := range m.Allocatable {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ l = len(m.Phase)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Conditions) > 0 {
+ for _, e := range m.Conditions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Addresses) > 0 {
+ for _, e := range m.Addresses {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = m.DaemonEndpoints.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.NodeInfo.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Images) > 0 {
+ for _, e := range m.Images {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.VolumesInUse) > 0 {
+ for _, s := range m.VolumesInUse {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.VolumesAttached) > 0 {
+ for _, e := range m.VolumesAttached {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *NodeSystemInfo) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.MachineID)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.SystemUUID)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.BootID)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.KernelVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.OSImage)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ContainerRuntimeVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.KubeletVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.KubeProxyVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.OperatingSystem)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Architecture)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ObjectFieldSelector) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.APIVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FieldPath)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ObjectMeta) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.GenerateName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Namespace)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.SelfLink)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.UID)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ResourceVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.Generation))
+ l = m.CreationTimestamp.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.DeletionTimestamp != nil {
+ l = m.DeletionTimestamp.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.DeletionGracePeriodSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.DeletionGracePeriodSeconds))
+ }
+ if len(m.Labels) > 0 {
+ for k, v := range m.Labels {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ if len(m.Annotations) > 0 {
+ for k, v := range m.Annotations {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ if len(m.OwnerReferences) > 0 {
+ for _, e := range m.OwnerReferences {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Finalizers) > 0 {
+ for _, s := range m.Finalizers {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.ClusterName)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Initializers != nil {
+ l = m.Initializers.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *ObjectReference) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Kind)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Namespace)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.UID)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.APIVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ResourceVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FieldPath)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PersistentVolume) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PersistentVolumeClaim) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PersistentVolumeClaimList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PersistentVolumeClaimSpec) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.AccessModes) > 0 {
+ for _, s := range m.AccessModes {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = m.Resources.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.VolumeName)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Selector != nil {
+ l = m.Selector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.StorageClassName != nil {
+ l = len(*m.StorageClassName)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *PersistentVolumeClaimStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Phase)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.AccessModes) > 0 {
+ for _, s := range m.AccessModes {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Capacity) > 0 {
+ for k, v := range m.Capacity {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *PersistentVolumeClaimVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.ClaimName)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ return n
+}
+
+func (m *PersistentVolumeList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PersistentVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ if m.GCEPersistentDisk != nil {
+ l = m.GCEPersistentDisk.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.AWSElasticBlockStore != nil {
+ l = m.AWSElasticBlockStore.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.HostPath != nil {
+ l = m.HostPath.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Glusterfs != nil {
+ l = m.Glusterfs.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.NFS != nil {
+ l = m.NFS.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.RBD != nil {
+ l = m.RBD.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.ISCSI != nil {
+ l = m.ISCSI.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Cinder != nil {
+ l = m.Cinder.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.CephFS != nil {
+ l = m.CephFS.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.FC != nil {
+ l = m.FC.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Flocker != nil {
+ l = m.Flocker.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.FlexVolume != nil {
+ l = m.FlexVolume.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.AzureFile != nil {
+ l = m.AzureFile.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.VsphereVolume != nil {
+ l = m.VsphereVolume.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Quobyte != nil {
+ l = m.Quobyte.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.AzureDisk != nil {
+ l = m.AzureDisk.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.PhotonPersistentDisk != nil {
+ l = m.PhotonPersistentDisk.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.PortworxVolume != nil {
+ l = m.PortworxVolume.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.ScaleIO != nil {
+ l = m.ScaleIO.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.Local != nil {
+ l = m.Local.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.StorageOS != nil {
+ l = m.StorageOS.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *PersistentVolumeSpec) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Capacity) > 0 {
+ for k, v := range m.Capacity {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ l = m.PersistentVolumeSource.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.AccessModes) > 0 {
+ for _, s := range m.AccessModes {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.ClaimRef != nil {
+ l = m.ClaimRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ l = len(m.PersistentVolumeReclaimPolicy)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.StorageClassName)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PersistentVolumeStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Phase)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PhotonPersistentDiskVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.PdID)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FSType)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Pod) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodAffinity) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.RequiredDuringSchedulingIgnoredDuringExecution) > 0 {
+ for _, e := range m.RequiredDuringSchedulingIgnoredDuringExecution {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.PreferredDuringSchedulingIgnoredDuringExecution) > 0 {
+ for _, e := range m.PreferredDuringSchedulingIgnoredDuringExecution {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PodAffinityTerm) Size() (n int) {
+ var l int
+ _ = l
+ if m.LabelSelector != nil {
+ l = m.LabelSelector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if len(m.Namespaces) > 0 {
+ for _, s := range m.Namespaces {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.TopologyKey)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodAntiAffinity) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.RequiredDuringSchedulingIgnoredDuringExecution) > 0 {
+ for _, e := range m.RequiredDuringSchedulingIgnoredDuringExecution {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.PreferredDuringSchedulingIgnoredDuringExecution) > 0 {
+ for _, e := range m.PreferredDuringSchedulingIgnoredDuringExecution {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PodAttachOptions) Size() (n int) {
+ var l int
+ _ = l
+ n += 2
+ n += 2
+ n += 2
+ n += 2
+ l = len(m.Container)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodCondition) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Status)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastProbeTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastTransitionTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodExecOptions) Size() (n int) {
+ var l int
+ _ = l
+ n += 2
+ n += 2
+ n += 2
+ n += 2
+ l = len(m.Container)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Command) > 0 {
+ for _, s := range m.Command {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PodList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PodLogOptions) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Container)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ n += 2
+ if m.SinceSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.SinceSeconds))
+ }
+ if m.SinceTime != nil {
+ l = m.SinceTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ n += 2
+ if m.TailLines != nil {
+ n += 1 + sovGenerated(uint64(*m.TailLines))
+ }
+ if m.LimitBytes != nil {
+ n += 1 + sovGenerated(uint64(*m.LimitBytes))
+ }
+ return n
+}
+
+func (m *PodPortForwardOptions) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Ports) > 0 {
+ for _, e := range m.Ports {
+ n += 1 + sovGenerated(uint64(e))
+ }
+ }
+ return n
+}
+
+func (m *PodProxyOptions) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodSecurityContext) Size() (n int) {
+ var l int
+ _ = l
+ if m.SELinuxOptions != nil {
+ l = m.SELinuxOptions.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.RunAsUser != nil {
+ n += 1 + sovGenerated(uint64(*m.RunAsUser))
+ }
+ if m.RunAsNonRoot != nil {
+ n += 2
+ }
+ if len(m.SupplementalGroups) > 0 {
+ for _, e := range m.SupplementalGroups {
+ n += 1 + sovGenerated(uint64(e))
+ }
+ }
+ if m.FSGroup != nil {
+ n += 1 + sovGenerated(uint64(*m.FSGroup))
+ }
+ return n
+}
+
+func (m *PodSignature) Size() (n int) {
+ var l int
+ _ = l
+ if m.PodController != nil {
+ l = m.PodController.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *PodSpec) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Volumes) > 0 {
+ for _, e := range m.Volumes {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Containers) > 0 {
+ for _, e := range m.Containers {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.RestartPolicy)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.TerminationGracePeriodSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.TerminationGracePeriodSeconds))
+ }
+ if m.ActiveDeadlineSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.ActiveDeadlineSeconds))
+ }
+ l = len(m.DNSPolicy)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.NodeSelector) > 0 {
+ for k, v := range m.NodeSelector {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ l = len(m.ServiceAccountName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.DeprecatedServiceAccount)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.NodeName)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ n += 2
+ n += 2
+ if m.SecurityContext != nil {
+ l = m.SecurityContext.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if len(m.ImagePullSecrets) > 0 {
+ for _, e := range m.ImagePullSecrets {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.Hostname)
+ n += 2 + l + sovGenerated(uint64(l))
+ l = len(m.Subdomain)
+ n += 2 + l + sovGenerated(uint64(l))
+ if m.Affinity != nil {
+ l = m.Affinity.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ l = len(m.SchedulerName)
+ n += 2 + l + sovGenerated(uint64(l))
+ if len(m.InitContainers) > 0 {
+ for _, e := range m.InitContainers {
+ l = e.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.AutomountServiceAccountToken != nil {
+ n += 3
+ }
+ if len(m.Tolerations) > 0 {
+ for _, e := range m.Tolerations {
+ l = e.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.HostAliases) > 0 {
+ for _, e := range m.HostAliases {
+ l = e.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PodStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Phase)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Conditions) > 0 {
+ for _, e := range m.Conditions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.HostIP)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.PodIP)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.StartTime != nil {
+ l = m.StartTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if len(m.ContainerStatuses) > 0 {
+ for _, e := range m.ContainerStatuses {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.QOSClass)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.InitContainerStatuses) > 0 {
+ for _, e := range m.InitContainerStatuses {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PodStatusResult) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodTemplate) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Template.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodTemplateList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PodTemplateSpec) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PortworxVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.VolumeID)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FSType)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ return n
+}
+
+func (m *Preconditions) Size() (n int) {
+ var l int
+ _ = l
+ if m.UID != nil {
+ l = len(*m.UID)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *PreferAvoidPodsEntry) Size() (n int) {
+ var l int
+ _ = l
+ l = m.PodSignature.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.EvictionTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PreferredSchedulingTerm) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Weight))
+ l = m.Preference.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Probe) Size() (n int) {
+ var l int
+ _ = l
+ l = m.Handler.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.InitialDelaySeconds))
+ n += 1 + sovGenerated(uint64(m.TimeoutSeconds))
+ n += 1 + sovGenerated(uint64(m.PeriodSeconds))
+ n += 1 + sovGenerated(uint64(m.SuccessThreshold))
+ n += 1 + sovGenerated(uint64(m.FailureThreshold))
+ return n
+}
+
+func (m *ProjectedVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Sources) > 0 {
+ for _, e := range m.Sources {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.DefaultMode != nil {
+ n += 1 + sovGenerated(uint64(*m.DefaultMode))
+ }
+ return n
+}
+
+func (m *QuobyteVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Registry)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Volume)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ l = len(m.User)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Group)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *RBDVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.CephMonitors) > 0 {
+ for _, s := range m.CephMonitors {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.RBDImage)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FSType)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.RBDPool)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.RadosUser)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Keyring)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.SecretRef != nil {
+ l = m.SecretRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ n += 2
+ return n
+}
+
+func (m *RangeAllocation) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Range)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Data != nil {
+ l = len(m.Data)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *ReplicationController) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ReplicationControllerCondition) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Status)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastTransitionTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ReplicationControllerList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ReplicationControllerSpec) Size() (n int) {
+ var l int
+ _ = l
+ if m.Replicas != nil {
+ n += 1 + sovGenerated(uint64(*m.Replicas))
+ }
+ if len(m.Selector) > 0 {
+ for k, v := range m.Selector {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ if m.Template != nil {
+ l = m.Template.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ n += 1 + sovGenerated(uint64(m.MinReadySeconds))
+ return n
+}
+
+func (m *ReplicationControllerStatus) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Replicas))
+ n += 1 + sovGenerated(uint64(m.FullyLabeledReplicas))
+ n += 1 + sovGenerated(uint64(m.ObservedGeneration))
+ n += 1 + sovGenerated(uint64(m.ReadyReplicas))
+ n += 1 + sovGenerated(uint64(m.AvailableReplicas))
+ if len(m.Conditions) > 0 {
+ for _, e := range m.Conditions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ResourceFieldSelector) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.ContainerName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Resource)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Divisor.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ResourceQuota) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ResourceQuotaList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ResourceQuotaSpec) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Hard) > 0 {
+ for k, v := range m.Hard {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ if len(m.Scopes) > 0 {
+ for _, s := range m.Scopes {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ResourceQuotaStatus) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Hard) > 0 {
+ for k, v := range m.Hard {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ if len(m.Used) > 0 {
+ for k, v := range m.Used {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *ResourceRequirements) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Limits) > 0 {
+ for k, v := range m.Limits {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ if len(m.Requests) > 0 {
+ for k, v := range m.Requests {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *SELinuxOptions) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.User)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Role)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Level)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ScaleIOVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Gateway)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.System)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.SecretRef != nil {
+ l = m.SecretRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ n += 2
+ l = len(m.ProtectionDomain)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.StoragePool)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.StorageMode)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.VolumeName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FSType)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ return n
+}
+
+func (m *Secret) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Data) > 0 {
+ for k, v := range m.Data {
+ _ = k
+ _ = v
+ l = 0
+ if v != nil {
+ l = 1 + len(v) + sovGenerated(uint64(len(v)))
+ }
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + l
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.StringData) > 0 {
+ for k, v := range m.StringData {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *SecretEnvSource) Size() (n int) {
+ var l int
+ _ = l
+ l = m.LocalObjectReference.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Optional != nil {
+ n += 2
+ }
+ return n
+}
+
+func (m *SecretKeySelector) Size() (n int) {
+ var l int
+ _ = l
+ l = m.LocalObjectReference.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Key)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Optional != nil {
+ n += 2
+ }
+ return n
+}
+
+func (m *SecretList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *SecretProjection) Size() (n int) {
+ var l int
+ _ = l
+ l = m.LocalObjectReference.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.Optional != nil {
+ n += 2
+ }
+ return n
+}
+
+func (m *SecretVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.SecretName)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.DefaultMode != nil {
+ n += 1 + sovGenerated(uint64(*m.DefaultMode))
+ }
+ if m.Optional != nil {
+ n += 2
+ }
+ return n
+}
+
+func (m *SecurityContext) Size() (n int) {
+ var l int
+ _ = l
+ if m.Capabilities != nil {
+ l = m.Capabilities.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Privileged != nil {
+ n += 2
+ }
+ if m.SELinuxOptions != nil {
+ l = m.SELinuxOptions.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.RunAsUser != nil {
+ n += 1 + sovGenerated(uint64(*m.RunAsUser))
+ }
+ if m.RunAsNonRoot != nil {
+ n += 2
+ }
+ if m.ReadOnlyRootFilesystem != nil {
+ n += 2
+ }
+ return n
+}
+
+func (m *SerializedReference) Size() (n int) {
+ var l int
+ _ = l
+ l = m.Reference.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Service) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ServiceAccount) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Secrets) > 0 {
+ for _, e := range m.Secrets {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.ImagePullSecrets) > 0 {
+ for _, e := range m.ImagePullSecrets {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.AutomountServiceAccountToken != nil {
+ n += 2
+ }
+ return n
+}
+
+func (m *ServiceAccountList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ServiceList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ServicePort) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Protocol)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.Port))
+ l = m.TargetPort.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.NodePort))
+ return n
+}
+
+func (m *ServiceProxyOptions) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ServiceSpec) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Ports) > 0 {
+ for _, e := range m.Ports {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Selector) > 0 {
+ for k, v := range m.Selector {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ l = len(m.ClusterIP)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.ExternalIPs) > 0 {
+ for _, s := range m.ExternalIPs {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.SessionAffinity)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.LoadBalancerIP)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.LoadBalancerSourceRanges) > 0 {
+ for _, s := range m.LoadBalancerSourceRanges {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.ExternalName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ExternalTrafficPolicy)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.HealthCheckNodePort))
+ return n
+}
+
+func (m *ServiceStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = m.LoadBalancer.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *StorageOSPersistentVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.VolumeName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.VolumeNamespace)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FSType)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ if m.SecretRef != nil {
+ l = m.SecretRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *StorageOSVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.VolumeName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.VolumeNamespace)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FSType)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ if m.SecretRef != nil {
+ l = m.SecretRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *Sysctl) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Value)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *TCPSocketAction) Size() (n int) {
+ var l int
+ _ = l
+ l = m.Port.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Host)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Taint) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Key)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Value)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Effect)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.TimeAdded.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Toleration) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Key)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Operator)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Value)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Effect)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.TolerationSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.TolerationSeconds))
+ }
+ return n
+}
+
+func (m *Volume) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.VolumeSource.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *VolumeMount) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ l = len(m.MountPath)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.SubPath)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *VolumeProjection) Size() (n int) {
+ var l int
+ _ = l
+ if m.Secret != nil {
+ l = m.Secret.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.DownwardAPI != nil {
+ l = m.DownwardAPI.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.ConfigMap != nil {
+ l = m.ConfigMap.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *VolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ if m.HostPath != nil {
+ l = m.HostPath.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.EmptyDir != nil {
+ l = m.EmptyDir.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.GCEPersistentDisk != nil {
+ l = m.GCEPersistentDisk.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.AWSElasticBlockStore != nil {
+ l = m.AWSElasticBlockStore.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.GitRepo != nil {
+ l = m.GitRepo.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Secret != nil {
+ l = m.Secret.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.NFS != nil {
+ l = m.NFS.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.ISCSI != nil {
+ l = m.ISCSI.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Glusterfs != nil {
+ l = m.Glusterfs.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.PersistentVolumeClaim != nil {
+ l = m.PersistentVolumeClaim.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.RBD != nil {
+ l = m.RBD.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.FlexVolume != nil {
+ l = m.FlexVolume.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Cinder != nil {
+ l = m.Cinder.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.CephFS != nil {
+ l = m.CephFS.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Flocker != nil {
+ l = m.Flocker.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.DownwardAPI != nil {
+ l = m.DownwardAPI.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.FC != nil {
+ l = m.FC.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.AzureFile != nil {
+ l = m.AzureFile.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.ConfigMap != nil {
+ l = m.ConfigMap.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.VsphereVolume != nil {
+ l = m.VsphereVolume.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.Quobyte != nil {
+ l = m.Quobyte.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.AzureDisk != nil {
+ l = m.AzureDisk.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.PhotonPersistentDisk != nil {
+ l = m.PhotonPersistentDisk.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.PortworxVolume != nil {
+ l = m.PortworxVolume.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.ScaleIO != nil {
+ l = m.ScaleIO.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.Projected != nil {
+ l = m.Projected.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.StorageOS != nil {
+ l = m.StorageOS.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *VsphereVirtualDiskVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.VolumePath)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FSType)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.StoragePolicyName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.StoragePolicyID)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *WeightedPodAffinityTerm) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Weight))
+ l = m.PodAffinityTerm.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *AWSElasticBlockStoreVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&AWSElasticBlockStoreVolumeSource{`,
+ `VolumeID:` + fmt.Sprintf("%v", this.VolumeID) + `,`,
+ `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`,
+ `Partition:` + fmt.Sprintf("%v", this.Partition) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Affinity) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Affinity{`,
+ `NodeAffinity:` + strings.Replace(fmt.Sprintf("%v", this.NodeAffinity), "NodeAffinity", "NodeAffinity", 1) + `,`,
+ `PodAffinity:` + strings.Replace(fmt.Sprintf("%v", this.PodAffinity), "PodAffinity", "PodAffinity", 1) + `,`,
+ `PodAntiAffinity:` + strings.Replace(fmt.Sprintf("%v", this.PodAntiAffinity), "PodAntiAffinity", "PodAntiAffinity", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *AttachedVolume) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&AttachedVolume{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `DevicePath:` + fmt.Sprintf("%v", this.DevicePath) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *AvoidPods) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&AvoidPods{`,
+ `PreferAvoidPods:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.PreferAvoidPods), "PreferAvoidPodsEntry", "PreferAvoidPodsEntry", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *AzureDiskVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&AzureDiskVolumeSource{`,
+ `DiskName:` + fmt.Sprintf("%v", this.DiskName) + `,`,
+ `DataDiskURI:` + fmt.Sprintf("%v", this.DataDiskURI) + `,`,
+ `CachingMode:` + valueToStringGenerated(this.CachingMode) + `,`,
+ `FSType:` + valueToStringGenerated(this.FSType) + `,`,
+ `ReadOnly:` + valueToStringGenerated(this.ReadOnly) + `,`,
+ `Kind:` + valueToStringGenerated(this.Kind) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *AzureFileVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&AzureFileVolumeSource{`,
+ `SecretName:` + fmt.Sprintf("%v", this.SecretName) + `,`,
+ `ShareName:` + fmt.Sprintf("%v", this.ShareName) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Binding) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Binding{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Target:` + strings.Replace(strings.Replace(this.Target.String(), "ObjectReference", "ObjectReference", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Capabilities) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Capabilities{`,
+ `Add:` + fmt.Sprintf("%v", this.Add) + `,`,
+ `Drop:` + fmt.Sprintf("%v", this.Drop) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CephFSVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CephFSVolumeSource{`,
+ `Monitors:` + fmt.Sprintf("%v", this.Monitors) + `,`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `User:` + fmt.Sprintf("%v", this.User) + `,`,
+ `SecretFile:` + fmt.Sprintf("%v", this.SecretFile) + `,`,
+ `SecretRef:` + strings.Replace(fmt.Sprintf("%v", this.SecretRef), "LocalObjectReference", "LocalObjectReference", 1) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CinderVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CinderVolumeSource{`,
+ `VolumeID:` + fmt.Sprintf("%v", this.VolumeID) + `,`,
+ `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ComponentCondition) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ComponentCondition{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `Error:` + fmt.Sprintf("%v", this.Error) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ComponentStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ComponentStatus{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "ComponentCondition", "ComponentCondition", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ComponentStatusList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ComponentStatusList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ComponentStatus", "ComponentStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ConfigMap) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForData := make([]string, 0, len(this.Data))
+ for k := range this.Data {
+ keysForData = append(keysForData, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForData)
+ mapStringForData := "map[string]string{"
+ for _, k := range keysForData {
+ mapStringForData += fmt.Sprintf("%v: %v,", k, this.Data[k])
+ }
+ mapStringForData += "}"
+ s := strings.Join([]string{`&ConfigMap{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Data:` + mapStringForData + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ConfigMapEnvSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ConfigMapEnvSource{`,
+ `LocalObjectReference:` + strings.Replace(strings.Replace(this.LocalObjectReference.String(), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`,
+ `Optional:` + valueToStringGenerated(this.Optional) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ConfigMapKeySelector) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ConfigMapKeySelector{`,
+ `LocalObjectReference:` + strings.Replace(strings.Replace(this.LocalObjectReference.String(), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`,
+ `Key:` + fmt.Sprintf("%v", this.Key) + `,`,
+ `Optional:` + valueToStringGenerated(this.Optional) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ConfigMapList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ConfigMapList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ConfigMap", "ConfigMap", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ConfigMapProjection) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ConfigMapProjection{`,
+ `LocalObjectReference:` + strings.Replace(strings.Replace(this.LocalObjectReference.String(), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "KeyToPath", "KeyToPath", 1), `&`, ``, 1) + `,`,
+ `Optional:` + valueToStringGenerated(this.Optional) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ConfigMapVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ConfigMapVolumeSource{`,
+ `LocalObjectReference:` + strings.Replace(strings.Replace(this.LocalObjectReference.String(), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "KeyToPath", "KeyToPath", 1), `&`, ``, 1) + `,`,
+ `DefaultMode:` + valueToStringGenerated(this.DefaultMode) + `,`,
+ `Optional:` + valueToStringGenerated(this.Optional) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Container) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Container{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Image:` + fmt.Sprintf("%v", this.Image) + `,`,
+ `Command:` + fmt.Sprintf("%v", this.Command) + `,`,
+ `Args:` + fmt.Sprintf("%v", this.Args) + `,`,
+ `WorkingDir:` + fmt.Sprintf("%v", this.WorkingDir) + `,`,
+ `Ports:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ports), "ContainerPort", "ContainerPort", 1), `&`, ``, 1) + `,`,
+ `Env:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Env), "EnvVar", "EnvVar", 1), `&`, ``, 1) + `,`,
+ `Resources:` + strings.Replace(strings.Replace(this.Resources.String(), "ResourceRequirements", "ResourceRequirements", 1), `&`, ``, 1) + `,`,
+ `VolumeMounts:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VolumeMounts), "VolumeMount", "VolumeMount", 1), `&`, ``, 1) + `,`,
+ `LivenessProbe:` + strings.Replace(fmt.Sprintf("%v", this.LivenessProbe), "Probe", "Probe", 1) + `,`,
+ `ReadinessProbe:` + strings.Replace(fmt.Sprintf("%v", this.ReadinessProbe), "Probe", "Probe", 1) + `,`,
+ `Lifecycle:` + strings.Replace(fmt.Sprintf("%v", this.Lifecycle), "Lifecycle", "Lifecycle", 1) + `,`,
+ `TerminationMessagePath:` + fmt.Sprintf("%v", this.TerminationMessagePath) + `,`,
+ `ImagePullPolicy:` + fmt.Sprintf("%v", this.ImagePullPolicy) + `,`,
+ `SecurityContext:` + strings.Replace(fmt.Sprintf("%v", this.SecurityContext), "SecurityContext", "SecurityContext", 1) + `,`,
+ `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`,
+ `StdinOnce:` + fmt.Sprintf("%v", this.StdinOnce) + `,`,
+ `TTY:` + fmt.Sprintf("%v", this.TTY) + `,`,
+ `EnvFrom:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.EnvFrom), "EnvFromSource", "EnvFromSource", 1), `&`, ``, 1) + `,`,
+ `TerminationMessagePolicy:` + fmt.Sprintf("%v", this.TerminationMessagePolicy) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ContainerImage) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ContainerImage{`,
+ `Names:` + fmt.Sprintf("%v", this.Names) + `,`,
+ `SizeBytes:` + fmt.Sprintf("%v", this.SizeBytes) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ContainerPort) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ContainerPort{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `HostPort:` + fmt.Sprintf("%v", this.HostPort) + `,`,
+ `ContainerPort:` + fmt.Sprintf("%v", this.ContainerPort) + `,`,
+ `Protocol:` + fmt.Sprintf("%v", this.Protocol) + `,`,
+ `HostIP:` + fmt.Sprintf("%v", this.HostIP) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ContainerState) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ContainerState{`,
+ `Waiting:` + strings.Replace(fmt.Sprintf("%v", this.Waiting), "ContainerStateWaiting", "ContainerStateWaiting", 1) + `,`,
+ `Running:` + strings.Replace(fmt.Sprintf("%v", this.Running), "ContainerStateRunning", "ContainerStateRunning", 1) + `,`,
+ `Terminated:` + strings.Replace(fmt.Sprintf("%v", this.Terminated), "ContainerStateTerminated", "ContainerStateTerminated", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ContainerStateRunning) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ContainerStateRunning{`,
+ `StartedAt:` + strings.Replace(strings.Replace(this.StartedAt.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ContainerStateTerminated) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ContainerStateTerminated{`,
+ `ExitCode:` + fmt.Sprintf("%v", this.ExitCode) + `,`,
+ `Signal:` + fmt.Sprintf("%v", this.Signal) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `StartedAt:` + strings.Replace(strings.Replace(this.StartedAt.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `FinishedAt:` + strings.Replace(strings.Replace(this.FinishedAt.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ContainerStateWaiting) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ContainerStateWaiting{`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ContainerStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ContainerStatus{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `State:` + strings.Replace(strings.Replace(this.State.String(), "ContainerState", "ContainerState", 1), `&`, ``, 1) + `,`,
+ `LastTerminationState:` + strings.Replace(strings.Replace(this.LastTerminationState.String(), "ContainerState", "ContainerState", 1), `&`, ``, 1) + `,`,
+ `Ready:` + fmt.Sprintf("%v", this.Ready) + `,`,
+ `RestartCount:` + fmt.Sprintf("%v", this.RestartCount) + `,`,
+ `Image:` + fmt.Sprintf("%v", this.Image) + `,`,
+ `ImageID:` + fmt.Sprintf("%v", this.ImageID) + `,`,
+ `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DaemonEndpoint) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DaemonEndpoint{`,
+ `Port:` + fmt.Sprintf("%v", this.Port) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeleteOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeleteOptions{`,
+ `GracePeriodSeconds:` + valueToStringGenerated(this.GracePeriodSeconds) + `,`,
+ `Preconditions:` + strings.Replace(fmt.Sprintf("%v", this.Preconditions), "Preconditions", "Preconditions", 1) + `,`,
+ `OrphanDependents:` + valueToStringGenerated(this.OrphanDependents) + `,`,
+ `PropagationPolicy:` + valueToStringGenerated(this.PropagationPolicy) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DownwardAPIProjection) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DownwardAPIProjection{`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "DownwardAPIVolumeFile", "DownwardAPIVolumeFile", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DownwardAPIVolumeFile) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DownwardAPIVolumeFile{`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `FieldRef:` + strings.Replace(fmt.Sprintf("%v", this.FieldRef), "ObjectFieldSelector", "ObjectFieldSelector", 1) + `,`,
+ `ResourceFieldRef:` + strings.Replace(fmt.Sprintf("%v", this.ResourceFieldRef), "ResourceFieldSelector", "ResourceFieldSelector", 1) + `,`,
+ `Mode:` + valueToStringGenerated(this.Mode) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DownwardAPIVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DownwardAPIVolumeSource{`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "DownwardAPIVolumeFile", "DownwardAPIVolumeFile", 1), `&`, ``, 1) + `,`,
+ `DefaultMode:` + valueToStringGenerated(this.DefaultMode) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *EmptyDirVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&EmptyDirVolumeSource{`,
+ `Medium:` + fmt.Sprintf("%v", this.Medium) + `,`,
+ `SizeLimit:` + strings.Replace(strings.Replace(this.SizeLimit.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *EndpointAddress) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&EndpointAddress{`,
+ `IP:` + fmt.Sprintf("%v", this.IP) + `,`,
+ `TargetRef:` + strings.Replace(fmt.Sprintf("%v", this.TargetRef), "ObjectReference", "ObjectReference", 1) + `,`,
+ `Hostname:` + fmt.Sprintf("%v", this.Hostname) + `,`,
+ `NodeName:` + valueToStringGenerated(this.NodeName) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *EndpointPort) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&EndpointPort{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Port:` + fmt.Sprintf("%v", this.Port) + `,`,
+ `Protocol:` + fmt.Sprintf("%v", this.Protocol) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *EndpointSubset) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&EndpointSubset{`,
+ `Addresses:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Addresses), "EndpointAddress", "EndpointAddress", 1), `&`, ``, 1) + `,`,
+ `NotReadyAddresses:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.NotReadyAddresses), "EndpointAddress", "EndpointAddress", 1), `&`, ``, 1) + `,`,
+ `Ports:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ports), "EndpointPort", "EndpointPort", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Endpoints) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Endpoints{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Subsets:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subsets), "EndpointSubset", "EndpointSubset", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *EndpointsList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&EndpointsList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Endpoints", "Endpoints", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *EnvFromSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&EnvFromSource{`,
+ `Prefix:` + fmt.Sprintf("%v", this.Prefix) + `,`,
+ `ConfigMapRef:` + strings.Replace(fmt.Sprintf("%v", this.ConfigMapRef), "ConfigMapEnvSource", "ConfigMapEnvSource", 1) + `,`,
+ `SecretRef:` + strings.Replace(fmt.Sprintf("%v", this.SecretRef), "SecretEnvSource", "SecretEnvSource", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *EnvVar) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&EnvVar{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Value:` + fmt.Sprintf("%v", this.Value) + `,`,
+ `ValueFrom:` + strings.Replace(fmt.Sprintf("%v", this.ValueFrom), "EnvVarSource", "EnvVarSource", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *EnvVarSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&EnvVarSource{`,
+ `FieldRef:` + strings.Replace(fmt.Sprintf("%v", this.FieldRef), "ObjectFieldSelector", "ObjectFieldSelector", 1) + `,`,
+ `ResourceFieldRef:` + strings.Replace(fmt.Sprintf("%v", this.ResourceFieldRef), "ResourceFieldSelector", "ResourceFieldSelector", 1) + `,`,
+ `ConfigMapKeyRef:` + strings.Replace(fmt.Sprintf("%v", this.ConfigMapKeyRef), "ConfigMapKeySelector", "ConfigMapKeySelector", 1) + `,`,
+ `SecretKeyRef:` + strings.Replace(fmt.Sprintf("%v", this.SecretKeyRef), "SecretKeySelector", "SecretKeySelector", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Event) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Event{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `InvolvedObject:` + strings.Replace(strings.Replace(this.InvolvedObject.String(), "ObjectReference", "ObjectReference", 1), `&`, ``, 1) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `Source:` + strings.Replace(strings.Replace(this.Source.String(), "EventSource", "EventSource", 1), `&`, ``, 1) + `,`,
+ `FirstTimestamp:` + strings.Replace(strings.Replace(this.FirstTimestamp.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `LastTimestamp:` + strings.Replace(strings.Replace(this.LastTimestamp.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `Count:` + fmt.Sprintf("%v", this.Count) + `,`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *EventList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&EventList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Event", "Event", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *EventSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&EventSource{`,
+ `Component:` + fmt.Sprintf("%v", this.Component) + `,`,
+ `Host:` + fmt.Sprintf("%v", this.Host) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ExecAction) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ExecAction{`,
+ `Command:` + fmt.Sprintf("%v", this.Command) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *FCVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&FCVolumeSource{`,
+ `TargetWWNs:` + fmt.Sprintf("%v", this.TargetWWNs) + `,`,
+ `Lun:` + valueToStringGenerated(this.Lun) + `,`,
+ `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *FlexVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForOptions := make([]string, 0, len(this.Options))
+ for k := range this.Options {
+ keysForOptions = append(keysForOptions, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForOptions)
+ mapStringForOptions := "map[string]string{"
+ for _, k := range keysForOptions {
+ mapStringForOptions += fmt.Sprintf("%v: %v,", k, this.Options[k])
+ }
+ mapStringForOptions += "}"
+ s := strings.Join([]string{`&FlexVolumeSource{`,
+ `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`,
+ `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`,
+ `SecretRef:` + strings.Replace(fmt.Sprintf("%v", this.SecretRef), "LocalObjectReference", "LocalObjectReference", 1) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `Options:` + mapStringForOptions + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *FlockerVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&FlockerVolumeSource{`,
+ `DatasetName:` + fmt.Sprintf("%v", this.DatasetName) + `,`,
+ `DatasetUUID:` + fmt.Sprintf("%v", this.DatasetUUID) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *GCEPersistentDiskVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&GCEPersistentDiskVolumeSource{`,
+ `PDName:` + fmt.Sprintf("%v", this.PDName) + `,`,
+ `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`,
+ `Partition:` + fmt.Sprintf("%v", this.Partition) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *GitRepoVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&GitRepoVolumeSource{`,
+ `Repository:` + fmt.Sprintf("%v", this.Repository) + `,`,
+ `Revision:` + fmt.Sprintf("%v", this.Revision) + `,`,
+ `Directory:` + fmt.Sprintf("%v", this.Directory) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *GlusterfsVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&GlusterfsVolumeSource{`,
+ `EndpointsName:` + fmt.Sprintf("%v", this.EndpointsName) + `,`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HTTPGetAction) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HTTPGetAction{`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `Port:` + strings.Replace(strings.Replace(this.Port.String(), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1), `&`, ``, 1) + `,`,
+ `Host:` + fmt.Sprintf("%v", this.Host) + `,`,
+ `Scheme:` + fmt.Sprintf("%v", this.Scheme) + `,`,
+ `HTTPHeaders:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.HTTPHeaders), "HTTPHeader", "HTTPHeader", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HTTPHeader) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HTTPHeader{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Value:` + fmt.Sprintf("%v", this.Value) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Handler) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Handler{`,
+ `Exec:` + strings.Replace(fmt.Sprintf("%v", this.Exec), "ExecAction", "ExecAction", 1) + `,`,
+ `HTTPGet:` + strings.Replace(fmt.Sprintf("%v", this.HTTPGet), "HTTPGetAction", "HTTPGetAction", 1) + `,`,
+ `TCPSocket:` + strings.Replace(fmt.Sprintf("%v", this.TCPSocket), "TCPSocketAction", "TCPSocketAction", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HostAlias) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HostAlias{`,
+ `IP:` + fmt.Sprintf("%v", this.IP) + `,`,
+ `Hostnames:` + fmt.Sprintf("%v", this.Hostnames) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HostPathVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HostPathVolumeSource{`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ISCSIVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ISCSIVolumeSource{`,
+ `TargetPortal:` + fmt.Sprintf("%v", this.TargetPortal) + `,`,
+ `IQN:` + fmt.Sprintf("%v", this.IQN) + `,`,
+ `Lun:` + fmt.Sprintf("%v", this.Lun) + `,`,
+ `ISCSIInterface:` + fmt.Sprintf("%v", this.ISCSIInterface) + `,`,
+ `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `Portals:` + fmt.Sprintf("%v", this.Portals) + `,`,
+ `DiscoveryCHAPAuth:` + fmt.Sprintf("%v", this.DiscoveryCHAPAuth) + `,`,
+ `SecretRef:` + strings.Replace(fmt.Sprintf("%v", this.SecretRef), "LocalObjectReference", "LocalObjectReference", 1) + `,`,
+ `SessionCHAPAuth:` + fmt.Sprintf("%v", this.SessionCHAPAuth) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *KeyToPath) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&KeyToPath{`,
+ `Key:` + fmt.Sprintf("%v", this.Key) + `,`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `Mode:` + valueToStringGenerated(this.Mode) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Lifecycle) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Lifecycle{`,
+ `PostStart:` + strings.Replace(fmt.Sprintf("%v", this.PostStart), "Handler", "Handler", 1) + `,`,
+ `PreStop:` + strings.Replace(fmt.Sprintf("%v", this.PreStop), "Handler", "Handler", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *LimitRange) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&LimitRange{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "LimitRangeSpec", "LimitRangeSpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *LimitRangeItem) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForMax := make([]string, 0, len(this.Max))
+ for k := range this.Max {
+ keysForMax = append(keysForMax, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForMax)
+ mapStringForMax := "ResourceList{"
+ for _, k := range keysForMax {
+ mapStringForMax += fmt.Sprintf("%v: %v,", k, this.Max[ResourceName(k)])
+ }
+ mapStringForMax += "}"
+ keysForMin := make([]string, 0, len(this.Min))
+ for k := range this.Min {
+ keysForMin = append(keysForMin, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForMin)
+ mapStringForMin := "ResourceList{"
+ for _, k := range keysForMin {
+ mapStringForMin += fmt.Sprintf("%v: %v,", k, this.Min[ResourceName(k)])
+ }
+ mapStringForMin += "}"
+ keysForDefault := make([]string, 0, len(this.Default))
+ for k := range this.Default {
+ keysForDefault = append(keysForDefault, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForDefault)
+ mapStringForDefault := "ResourceList{"
+ for _, k := range keysForDefault {
+ mapStringForDefault += fmt.Sprintf("%v: %v,", k, this.Default[ResourceName(k)])
+ }
+ mapStringForDefault += "}"
+ keysForDefaultRequest := make([]string, 0, len(this.DefaultRequest))
+ for k := range this.DefaultRequest {
+ keysForDefaultRequest = append(keysForDefaultRequest, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForDefaultRequest)
+ mapStringForDefaultRequest := "ResourceList{"
+ for _, k := range keysForDefaultRequest {
+ mapStringForDefaultRequest += fmt.Sprintf("%v: %v,", k, this.DefaultRequest[ResourceName(k)])
+ }
+ mapStringForDefaultRequest += "}"
+ keysForMaxLimitRequestRatio := make([]string, 0, len(this.MaxLimitRequestRatio))
+ for k := range this.MaxLimitRequestRatio {
+ keysForMaxLimitRequestRatio = append(keysForMaxLimitRequestRatio, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForMaxLimitRequestRatio)
+ mapStringForMaxLimitRequestRatio := "ResourceList{"
+ for _, k := range keysForMaxLimitRequestRatio {
+ mapStringForMaxLimitRequestRatio += fmt.Sprintf("%v: %v,", k, this.MaxLimitRequestRatio[ResourceName(k)])
+ }
+ mapStringForMaxLimitRequestRatio += "}"
+ s := strings.Join([]string{`&LimitRangeItem{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Max:` + mapStringForMax + `,`,
+ `Min:` + mapStringForMin + `,`,
+ `Default:` + mapStringForDefault + `,`,
+ `DefaultRequest:` + mapStringForDefaultRequest + `,`,
+ `MaxLimitRequestRatio:` + mapStringForMaxLimitRequestRatio + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *LimitRangeList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&LimitRangeList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "LimitRange", "LimitRange", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *LimitRangeSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&LimitRangeSpec{`,
+ `Limits:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Limits), "LimitRangeItem", "LimitRangeItem", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *List) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&List{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "RawExtension", "k8s_io_apimachinery_pkg_runtime.RawExtension", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ListOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ListOptions{`,
+ `LabelSelector:` + fmt.Sprintf("%v", this.LabelSelector) + `,`,
+ `FieldSelector:` + fmt.Sprintf("%v", this.FieldSelector) + `,`,
+ `Watch:` + fmt.Sprintf("%v", this.Watch) + `,`,
+ `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`,
+ `TimeoutSeconds:` + valueToStringGenerated(this.TimeoutSeconds) + `,`,
+ `IncludeUninitialized:` + fmt.Sprintf("%v", this.IncludeUninitialized) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *LoadBalancerIngress) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&LoadBalancerIngress{`,
+ `IP:` + fmt.Sprintf("%v", this.IP) + `,`,
+ `Hostname:` + fmt.Sprintf("%v", this.Hostname) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *LoadBalancerStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&LoadBalancerStatus{`,
+ `Ingress:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ingress), "LoadBalancerIngress", "LoadBalancerIngress", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *LocalObjectReference) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&LocalObjectReference{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *LocalVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&LocalVolumeSource{`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NFSVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NFSVolumeSource{`,
+ `Server:` + fmt.Sprintf("%v", this.Server) + `,`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Namespace) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Namespace{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NamespaceSpec", "NamespaceSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "NamespaceStatus", "NamespaceStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NamespaceList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NamespaceList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Namespace", "Namespace", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NamespaceSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NamespaceSpec{`,
+ `Finalizers:` + fmt.Sprintf("%v", this.Finalizers) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NamespaceStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NamespaceStatus{`,
+ `Phase:` + fmt.Sprintf("%v", this.Phase) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Node) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Node{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NodeSpec", "NodeSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "NodeStatus", "NodeStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NodeAddress) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NodeAddress{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Address:` + fmt.Sprintf("%v", this.Address) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NodeAffinity) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NodeAffinity{`,
+ `RequiredDuringSchedulingIgnoredDuringExecution:` + strings.Replace(fmt.Sprintf("%v", this.RequiredDuringSchedulingIgnoredDuringExecution), "NodeSelector", "NodeSelector", 1) + `,`,
+ `PreferredDuringSchedulingIgnoredDuringExecution:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.PreferredDuringSchedulingIgnoredDuringExecution), "PreferredSchedulingTerm", "PreferredSchedulingTerm", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NodeCondition) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NodeCondition{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
+ `LastHeartbeatTime:` + strings.Replace(strings.Replace(this.LastHeartbeatTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NodeDaemonEndpoints) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NodeDaemonEndpoints{`,
+ `KubeletEndpoint:` + strings.Replace(strings.Replace(this.KubeletEndpoint.String(), "DaemonEndpoint", "DaemonEndpoint", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NodeList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NodeList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Node", "Node", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NodeProxyOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NodeProxyOptions{`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NodeResources) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForCapacity := make([]string, 0, len(this.Capacity))
+ for k := range this.Capacity {
+ keysForCapacity = append(keysForCapacity, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity)
+ mapStringForCapacity := "ResourceList{"
+ for _, k := range keysForCapacity {
+ mapStringForCapacity += fmt.Sprintf("%v: %v,", k, this.Capacity[ResourceName(k)])
+ }
+ mapStringForCapacity += "}"
+ s := strings.Join([]string{`&NodeResources{`,
+ `Capacity:` + mapStringForCapacity + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NodeSelector) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NodeSelector{`,
+ `NodeSelectorTerms:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.NodeSelectorTerms), "NodeSelectorTerm", "NodeSelectorTerm", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NodeSelectorRequirement) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NodeSelectorRequirement{`,
+ `Key:` + fmt.Sprintf("%v", this.Key) + `,`,
+ `Operator:` + fmt.Sprintf("%v", this.Operator) + `,`,
+ `Values:` + fmt.Sprintf("%v", this.Values) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NodeSelectorTerm) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NodeSelectorTerm{`,
+ `MatchExpressions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.MatchExpressions), "NodeSelectorRequirement", "NodeSelectorRequirement", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NodeSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NodeSpec{`,
+ `PodCIDR:` + fmt.Sprintf("%v", this.PodCIDR) + `,`,
+ `ExternalID:` + fmt.Sprintf("%v", this.ExternalID) + `,`,
+ `ProviderID:` + fmt.Sprintf("%v", this.ProviderID) + `,`,
+ `Unschedulable:` + fmt.Sprintf("%v", this.Unschedulable) + `,`,
+ `Taints:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Taints), "Taint", "Taint", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NodeStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForCapacity := make([]string, 0, len(this.Capacity))
+ for k := range this.Capacity {
+ keysForCapacity = append(keysForCapacity, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity)
+ mapStringForCapacity := "ResourceList{"
+ for _, k := range keysForCapacity {
+ mapStringForCapacity += fmt.Sprintf("%v: %v,", k, this.Capacity[ResourceName(k)])
+ }
+ mapStringForCapacity += "}"
+ keysForAllocatable := make([]string, 0, len(this.Allocatable))
+ for k := range this.Allocatable {
+ keysForAllocatable = append(keysForAllocatable, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForAllocatable)
+ mapStringForAllocatable := "ResourceList{"
+ for _, k := range keysForAllocatable {
+ mapStringForAllocatable += fmt.Sprintf("%v: %v,", k, this.Allocatable[ResourceName(k)])
+ }
+ mapStringForAllocatable += "}"
+ s := strings.Join([]string{`&NodeStatus{`,
+ `Capacity:` + mapStringForCapacity + `,`,
+ `Allocatable:` + mapStringForAllocatable + `,`,
+ `Phase:` + fmt.Sprintf("%v", this.Phase) + `,`,
+ `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "NodeCondition", "NodeCondition", 1), `&`, ``, 1) + `,`,
+ `Addresses:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Addresses), "NodeAddress", "NodeAddress", 1), `&`, ``, 1) + `,`,
+ `DaemonEndpoints:` + strings.Replace(strings.Replace(this.DaemonEndpoints.String(), "NodeDaemonEndpoints", "NodeDaemonEndpoints", 1), `&`, ``, 1) + `,`,
+ `NodeInfo:` + strings.Replace(strings.Replace(this.NodeInfo.String(), "NodeSystemInfo", "NodeSystemInfo", 1), `&`, ``, 1) + `,`,
+ `Images:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Images), "ContainerImage", "ContainerImage", 1), `&`, ``, 1) + `,`,
+ `VolumesInUse:` + fmt.Sprintf("%v", this.VolumesInUse) + `,`,
+ `VolumesAttached:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VolumesAttached), "AttachedVolume", "AttachedVolume", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NodeSystemInfo) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NodeSystemInfo{`,
+ `MachineID:` + fmt.Sprintf("%v", this.MachineID) + `,`,
+ `SystemUUID:` + fmt.Sprintf("%v", this.SystemUUID) + `,`,
+ `BootID:` + fmt.Sprintf("%v", this.BootID) + `,`,
+ `KernelVersion:` + fmt.Sprintf("%v", this.KernelVersion) + `,`,
+ `OSImage:` + fmt.Sprintf("%v", this.OSImage) + `,`,
+ `ContainerRuntimeVersion:` + fmt.Sprintf("%v", this.ContainerRuntimeVersion) + `,`,
+ `KubeletVersion:` + fmt.Sprintf("%v", this.KubeletVersion) + `,`,
+ `KubeProxyVersion:` + fmt.Sprintf("%v", this.KubeProxyVersion) + `,`,
+ `OperatingSystem:` + fmt.Sprintf("%v", this.OperatingSystem) + `,`,
+ `Architecture:` + fmt.Sprintf("%v", this.Architecture) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ObjectFieldSelector) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ObjectFieldSelector{`,
+ `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`,
+ `FieldPath:` + fmt.Sprintf("%v", this.FieldPath) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ObjectMeta) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForLabels := make([]string, 0, len(this.Labels))
+ for k := range this.Labels {
+ keysForLabels = append(keysForLabels, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
+ mapStringForLabels := "map[string]string{"
+ for _, k := range keysForLabels {
+ mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
+ }
+ mapStringForLabels += "}"
+ keysForAnnotations := make([]string, 0, len(this.Annotations))
+ for k := range this.Annotations {
+ keysForAnnotations = append(keysForAnnotations, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations)
+ mapStringForAnnotations := "map[string]string{"
+ for _, k := range keysForAnnotations {
+ mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k])
+ }
+ mapStringForAnnotations += "}"
+ s := strings.Join([]string{`&ObjectMeta{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `GenerateName:` + fmt.Sprintf("%v", this.GenerateName) + `,`,
+ `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
+ `SelfLink:` + fmt.Sprintf("%v", this.SelfLink) + `,`,
+ `UID:` + fmt.Sprintf("%v", this.UID) + `,`,
+ `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`,
+ `Generation:` + fmt.Sprintf("%v", this.Generation) + `,`,
+ `CreationTimestamp:` + strings.Replace(strings.Replace(this.CreationTimestamp.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `DeletionTimestamp:` + strings.Replace(fmt.Sprintf("%v", this.DeletionTimestamp), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`,
+ `DeletionGracePeriodSeconds:` + valueToStringGenerated(this.DeletionGracePeriodSeconds) + `,`,
+ `Labels:` + mapStringForLabels + `,`,
+ `Annotations:` + mapStringForAnnotations + `,`,
+ `OwnerReferences:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.OwnerReferences), "OwnerReference", "k8s_io_apimachinery_pkg_apis_meta_v1.OwnerReference", 1), `&`, ``, 1) + `,`,
+ `Finalizers:` + fmt.Sprintf("%v", this.Finalizers) + `,`,
+ `ClusterName:` + fmt.Sprintf("%v", this.ClusterName) + `,`,
+ `Initializers:` + strings.Replace(fmt.Sprintf("%v", this.Initializers), "Initializers", "k8s_io_apimachinery_pkg_apis_meta_v1.Initializers", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ObjectReference) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ObjectReference{`,
+ `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
+ `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `UID:` + fmt.Sprintf("%v", this.UID) + `,`,
+ `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`,
+ `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`,
+ `FieldPath:` + fmt.Sprintf("%v", this.FieldPath) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PersistentVolume) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PersistentVolume{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PersistentVolumeSpec", "PersistentVolumeSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PersistentVolumeStatus", "PersistentVolumeStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PersistentVolumeClaim) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PersistentVolumeClaim{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PersistentVolumeClaimSpec", "PersistentVolumeClaimSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PersistentVolumeClaimStatus", "PersistentVolumeClaimStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PersistentVolumeClaimList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PersistentVolumeClaimList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PersistentVolumeClaim", "PersistentVolumeClaim", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PersistentVolumeClaimSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PersistentVolumeClaimSpec{`,
+ `AccessModes:` + fmt.Sprintf("%v", this.AccessModes) + `,`,
+ `Resources:` + strings.Replace(strings.Replace(this.Resources.String(), "ResourceRequirements", "ResourceRequirements", 1), `&`, ``, 1) + `,`,
+ `VolumeName:` + fmt.Sprintf("%v", this.VolumeName) + `,`,
+ `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
+ `StorageClassName:` + valueToStringGenerated(this.StorageClassName) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PersistentVolumeClaimStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForCapacity := make([]string, 0, len(this.Capacity))
+ for k := range this.Capacity {
+ keysForCapacity = append(keysForCapacity, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity)
+ mapStringForCapacity := "ResourceList{"
+ for _, k := range keysForCapacity {
+ mapStringForCapacity += fmt.Sprintf("%v: %v,", k, this.Capacity[ResourceName(k)])
+ }
+ mapStringForCapacity += "}"
+ s := strings.Join([]string{`&PersistentVolumeClaimStatus{`,
+ `Phase:` + fmt.Sprintf("%v", this.Phase) + `,`,
+ `AccessModes:` + fmt.Sprintf("%v", this.AccessModes) + `,`,
+ `Capacity:` + mapStringForCapacity + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PersistentVolumeClaimVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PersistentVolumeClaimVolumeSource{`,
+ `ClaimName:` + fmt.Sprintf("%v", this.ClaimName) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PersistentVolumeList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PersistentVolumeList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PersistentVolume", "PersistentVolume", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PersistentVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PersistentVolumeSource{`,
+ `GCEPersistentDisk:` + strings.Replace(fmt.Sprintf("%v", this.GCEPersistentDisk), "GCEPersistentDiskVolumeSource", "GCEPersistentDiskVolumeSource", 1) + `,`,
+ `AWSElasticBlockStore:` + strings.Replace(fmt.Sprintf("%v", this.AWSElasticBlockStore), "AWSElasticBlockStoreVolumeSource", "AWSElasticBlockStoreVolumeSource", 1) + `,`,
+ `HostPath:` + strings.Replace(fmt.Sprintf("%v", this.HostPath), "HostPathVolumeSource", "HostPathVolumeSource", 1) + `,`,
+ `Glusterfs:` + strings.Replace(fmt.Sprintf("%v", this.Glusterfs), "GlusterfsVolumeSource", "GlusterfsVolumeSource", 1) + `,`,
+ `NFS:` + strings.Replace(fmt.Sprintf("%v", this.NFS), "NFSVolumeSource", "NFSVolumeSource", 1) + `,`,
+ `RBD:` + strings.Replace(fmt.Sprintf("%v", this.RBD), "RBDVolumeSource", "RBDVolumeSource", 1) + `,`,
+ `ISCSI:` + strings.Replace(fmt.Sprintf("%v", this.ISCSI), "ISCSIVolumeSource", "ISCSIVolumeSource", 1) + `,`,
+ `Cinder:` + strings.Replace(fmt.Sprintf("%v", this.Cinder), "CinderVolumeSource", "CinderVolumeSource", 1) + `,`,
+ `CephFS:` + strings.Replace(fmt.Sprintf("%v", this.CephFS), "CephFSVolumeSource", "CephFSVolumeSource", 1) + `,`,
+ `FC:` + strings.Replace(fmt.Sprintf("%v", this.FC), "FCVolumeSource", "FCVolumeSource", 1) + `,`,
+ `Flocker:` + strings.Replace(fmt.Sprintf("%v", this.Flocker), "FlockerVolumeSource", "FlockerVolumeSource", 1) + `,`,
+ `FlexVolume:` + strings.Replace(fmt.Sprintf("%v", this.FlexVolume), "FlexVolumeSource", "FlexVolumeSource", 1) + `,`,
+ `AzureFile:` + strings.Replace(fmt.Sprintf("%v", this.AzureFile), "AzureFileVolumeSource", "AzureFileVolumeSource", 1) + `,`,
+ `VsphereVolume:` + strings.Replace(fmt.Sprintf("%v", this.VsphereVolume), "VsphereVirtualDiskVolumeSource", "VsphereVirtualDiskVolumeSource", 1) + `,`,
+ `Quobyte:` + strings.Replace(fmt.Sprintf("%v", this.Quobyte), "QuobyteVolumeSource", "QuobyteVolumeSource", 1) + `,`,
+ `AzureDisk:` + strings.Replace(fmt.Sprintf("%v", this.AzureDisk), "AzureDiskVolumeSource", "AzureDiskVolumeSource", 1) + `,`,
+ `PhotonPersistentDisk:` + strings.Replace(fmt.Sprintf("%v", this.PhotonPersistentDisk), "PhotonPersistentDiskVolumeSource", "PhotonPersistentDiskVolumeSource", 1) + `,`,
+ `PortworxVolume:` + strings.Replace(fmt.Sprintf("%v", this.PortworxVolume), "PortworxVolumeSource", "PortworxVolumeSource", 1) + `,`,
+ `ScaleIO:` + strings.Replace(fmt.Sprintf("%v", this.ScaleIO), "ScaleIOVolumeSource", "ScaleIOVolumeSource", 1) + `,`,
+ `Local:` + strings.Replace(fmt.Sprintf("%v", this.Local), "LocalVolumeSource", "LocalVolumeSource", 1) + `,`,
+ `StorageOS:` + strings.Replace(fmt.Sprintf("%v", this.StorageOS), "StorageOSPersistentVolumeSource", "StorageOSPersistentVolumeSource", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PersistentVolumeSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForCapacity := make([]string, 0, len(this.Capacity))
+ for k := range this.Capacity {
+ keysForCapacity = append(keysForCapacity, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity)
+ mapStringForCapacity := "ResourceList{"
+ for _, k := range keysForCapacity {
+ mapStringForCapacity += fmt.Sprintf("%v: %v,", k, this.Capacity[ResourceName(k)])
+ }
+ mapStringForCapacity += "}"
+ s := strings.Join([]string{`&PersistentVolumeSpec{`,
+ `Capacity:` + mapStringForCapacity + `,`,
+ `PersistentVolumeSource:` + strings.Replace(strings.Replace(this.PersistentVolumeSource.String(), "PersistentVolumeSource", "PersistentVolumeSource", 1), `&`, ``, 1) + `,`,
+ `AccessModes:` + fmt.Sprintf("%v", this.AccessModes) + `,`,
+ `ClaimRef:` + strings.Replace(fmt.Sprintf("%v", this.ClaimRef), "ObjectReference", "ObjectReference", 1) + `,`,
+ `PersistentVolumeReclaimPolicy:` + fmt.Sprintf("%v", this.PersistentVolumeReclaimPolicy) + `,`,
+ `StorageClassName:` + fmt.Sprintf("%v", this.StorageClassName) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PersistentVolumeStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PersistentVolumeStatus{`,
+ `Phase:` + fmt.Sprintf("%v", this.Phase) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PhotonPersistentDiskVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PhotonPersistentDiskVolumeSource{`,
+ `PdID:` + fmt.Sprintf("%v", this.PdID) + `,`,
+ `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Pod) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Pod{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSpec", "PodSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodStatus", "PodStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodAffinity) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodAffinity{`,
+ `RequiredDuringSchedulingIgnoredDuringExecution:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.RequiredDuringSchedulingIgnoredDuringExecution), "PodAffinityTerm", "PodAffinityTerm", 1), `&`, ``, 1) + `,`,
+ `PreferredDuringSchedulingIgnoredDuringExecution:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.PreferredDuringSchedulingIgnoredDuringExecution), "WeightedPodAffinityTerm", "WeightedPodAffinityTerm", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodAffinityTerm) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodAffinityTerm{`,
+ `LabelSelector:` + strings.Replace(fmt.Sprintf("%v", this.LabelSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
+ `Namespaces:` + fmt.Sprintf("%v", this.Namespaces) + `,`,
+ `TopologyKey:` + fmt.Sprintf("%v", this.TopologyKey) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodAntiAffinity) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodAntiAffinity{`,
+ `RequiredDuringSchedulingIgnoredDuringExecution:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.RequiredDuringSchedulingIgnoredDuringExecution), "PodAffinityTerm", "PodAffinityTerm", 1), `&`, ``, 1) + `,`,
+ `PreferredDuringSchedulingIgnoredDuringExecution:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.PreferredDuringSchedulingIgnoredDuringExecution), "WeightedPodAffinityTerm", "WeightedPodAffinityTerm", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodAttachOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodAttachOptions{`,
+ `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`,
+ `Stdout:` + fmt.Sprintf("%v", this.Stdout) + `,`,
+ `Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`,
+ `TTY:` + fmt.Sprintf("%v", this.TTY) + `,`,
+ `Container:` + fmt.Sprintf("%v", this.Container) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodCondition) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodCondition{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
+ `LastProbeTime:` + strings.Replace(strings.Replace(this.LastProbeTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodExecOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodExecOptions{`,
+ `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`,
+ `Stdout:` + fmt.Sprintf("%v", this.Stdout) + `,`,
+ `Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`,
+ `TTY:` + fmt.Sprintf("%v", this.TTY) + `,`,
+ `Container:` + fmt.Sprintf("%v", this.Container) + `,`,
+ `Command:` + fmt.Sprintf("%v", this.Command) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Pod", "Pod", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodLogOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodLogOptions{`,
+ `Container:` + fmt.Sprintf("%v", this.Container) + `,`,
+ `Follow:` + fmt.Sprintf("%v", this.Follow) + `,`,
+ `Previous:` + fmt.Sprintf("%v", this.Previous) + `,`,
+ `SinceSeconds:` + valueToStringGenerated(this.SinceSeconds) + `,`,
+ `SinceTime:` + strings.Replace(fmt.Sprintf("%v", this.SinceTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`,
+ `Timestamps:` + fmt.Sprintf("%v", this.Timestamps) + `,`,
+ `TailLines:` + valueToStringGenerated(this.TailLines) + `,`,
+ `LimitBytes:` + valueToStringGenerated(this.LimitBytes) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodPortForwardOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodPortForwardOptions{`,
+ `Ports:` + fmt.Sprintf("%v", this.Ports) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodProxyOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodProxyOptions{`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodSecurityContext) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodSecurityContext{`,
+ `SELinuxOptions:` + strings.Replace(fmt.Sprintf("%v", this.SELinuxOptions), "SELinuxOptions", "SELinuxOptions", 1) + `,`,
+ `RunAsUser:` + valueToStringGenerated(this.RunAsUser) + `,`,
+ `RunAsNonRoot:` + valueToStringGenerated(this.RunAsNonRoot) + `,`,
+ `SupplementalGroups:` + fmt.Sprintf("%v", this.SupplementalGroups) + `,`,
+ `FSGroup:` + valueToStringGenerated(this.FSGroup) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodSignature) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodSignature{`,
+ `PodController:` + strings.Replace(fmt.Sprintf("%v", this.PodController), "OwnerReference", "k8s_io_apimachinery_pkg_apis_meta_v1.OwnerReference", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForNodeSelector := make([]string, 0, len(this.NodeSelector))
+ for k := range this.NodeSelector {
+ keysForNodeSelector = append(keysForNodeSelector, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForNodeSelector)
+ mapStringForNodeSelector := "map[string]string{"
+ for _, k := range keysForNodeSelector {
+ mapStringForNodeSelector += fmt.Sprintf("%v: %v,", k, this.NodeSelector[k])
+ }
+ mapStringForNodeSelector += "}"
+ s := strings.Join([]string{`&PodSpec{`,
+ `Volumes:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Volumes), "Volume", "Volume", 1), `&`, ``, 1) + `,`,
+ `Containers:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Containers), "Container", "Container", 1), `&`, ``, 1) + `,`,
+ `RestartPolicy:` + fmt.Sprintf("%v", this.RestartPolicy) + `,`,
+ `TerminationGracePeriodSeconds:` + valueToStringGenerated(this.TerminationGracePeriodSeconds) + `,`,
+ `ActiveDeadlineSeconds:` + valueToStringGenerated(this.ActiveDeadlineSeconds) + `,`,
+ `DNSPolicy:` + fmt.Sprintf("%v", this.DNSPolicy) + `,`,
+ `NodeSelector:` + mapStringForNodeSelector + `,`,
+ `ServiceAccountName:` + fmt.Sprintf("%v", this.ServiceAccountName) + `,`,
+ `DeprecatedServiceAccount:` + fmt.Sprintf("%v", this.DeprecatedServiceAccount) + `,`,
+ `NodeName:` + fmt.Sprintf("%v", this.NodeName) + `,`,
+ `HostNetwork:` + fmt.Sprintf("%v", this.HostNetwork) + `,`,
+ `HostPID:` + fmt.Sprintf("%v", this.HostPID) + `,`,
+ `HostIPC:` + fmt.Sprintf("%v", this.HostIPC) + `,`,
+ `SecurityContext:` + strings.Replace(fmt.Sprintf("%v", this.SecurityContext), "PodSecurityContext", "PodSecurityContext", 1) + `,`,
+ `ImagePullSecrets:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ImagePullSecrets), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`,
+ `Hostname:` + fmt.Sprintf("%v", this.Hostname) + `,`,
+ `Subdomain:` + fmt.Sprintf("%v", this.Subdomain) + `,`,
+ `Affinity:` + strings.Replace(fmt.Sprintf("%v", this.Affinity), "Affinity", "Affinity", 1) + `,`,
+ `SchedulerName:` + fmt.Sprintf("%v", this.SchedulerName) + `,`,
+ `InitContainers:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.InitContainers), "Container", "Container", 1), `&`, ``, 1) + `,`,
+ `AutomountServiceAccountToken:` + valueToStringGenerated(this.AutomountServiceAccountToken) + `,`,
+ `Tolerations:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Tolerations), "Toleration", "Toleration", 1), `&`, ``, 1) + `,`,
+ `HostAliases:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.HostAliases), "HostAlias", "HostAlias", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodStatus{`,
+ `Phase:` + fmt.Sprintf("%v", this.Phase) + `,`,
+ `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "PodCondition", "PodCondition", 1), `&`, ``, 1) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `HostIP:` + fmt.Sprintf("%v", this.HostIP) + `,`,
+ `PodIP:` + fmt.Sprintf("%v", this.PodIP) + `,`,
+ `StartTime:` + strings.Replace(fmt.Sprintf("%v", this.StartTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`,
+ `ContainerStatuses:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ContainerStatuses), "ContainerStatus", "ContainerStatus", 1), `&`, ``, 1) + `,`,
+ `QOSClass:` + fmt.Sprintf("%v", this.QOSClass) + `,`,
+ `InitContainerStatuses:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.InitContainerStatuses), "ContainerStatus", "ContainerStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodStatusResult) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodStatusResult{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodStatus", "PodStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodTemplate) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodTemplate{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "PodTemplateSpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodTemplateList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodTemplateList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PodTemplate", "PodTemplate", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodTemplateSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodTemplateSpec{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSpec", "PodSpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PortworxVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PortworxVolumeSource{`,
+ `VolumeID:` + fmt.Sprintf("%v", this.VolumeID) + `,`,
+ `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Preconditions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Preconditions{`,
+ `UID:` + valueToStringGenerated(this.UID) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PreferAvoidPodsEntry) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PreferAvoidPodsEntry{`,
+ `PodSignature:` + strings.Replace(strings.Replace(this.PodSignature.String(), "PodSignature", "PodSignature", 1), `&`, ``, 1) + `,`,
+ `EvictionTime:` + strings.Replace(strings.Replace(this.EvictionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PreferredSchedulingTerm) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PreferredSchedulingTerm{`,
+ `Weight:` + fmt.Sprintf("%v", this.Weight) + `,`,
+ `Preference:` + strings.Replace(strings.Replace(this.Preference.String(), "NodeSelectorTerm", "NodeSelectorTerm", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Probe) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Probe{`,
+ `Handler:` + strings.Replace(strings.Replace(this.Handler.String(), "Handler", "Handler", 1), `&`, ``, 1) + `,`,
+ `InitialDelaySeconds:` + fmt.Sprintf("%v", this.InitialDelaySeconds) + `,`,
+ `TimeoutSeconds:` + fmt.Sprintf("%v", this.TimeoutSeconds) + `,`,
+ `PeriodSeconds:` + fmt.Sprintf("%v", this.PeriodSeconds) + `,`,
+ `SuccessThreshold:` + fmt.Sprintf("%v", this.SuccessThreshold) + `,`,
+ `FailureThreshold:` + fmt.Sprintf("%v", this.FailureThreshold) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ProjectedVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ProjectedVolumeSource{`,
+ `Sources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Sources), "VolumeProjection", "VolumeProjection", 1), `&`, ``, 1) + `,`,
+ `DefaultMode:` + valueToStringGenerated(this.DefaultMode) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *QuobyteVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&QuobyteVolumeSource{`,
+ `Registry:` + fmt.Sprintf("%v", this.Registry) + `,`,
+ `Volume:` + fmt.Sprintf("%v", this.Volume) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `User:` + fmt.Sprintf("%v", this.User) + `,`,
+ `Group:` + fmt.Sprintf("%v", this.Group) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RBDVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RBDVolumeSource{`,
+ `CephMonitors:` + fmt.Sprintf("%v", this.CephMonitors) + `,`,
+ `RBDImage:` + fmt.Sprintf("%v", this.RBDImage) + `,`,
+ `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`,
+ `RBDPool:` + fmt.Sprintf("%v", this.RBDPool) + `,`,
+ `RadosUser:` + fmt.Sprintf("%v", this.RadosUser) + `,`,
+ `Keyring:` + fmt.Sprintf("%v", this.Keyring) + `,`,
+ `SecretRef:` + strings.Replace(fmt.Sprintf("%v", this.SecretRef), "LocalObjectReference", "LocalObjectReference", 1) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RangeAllocation) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RangeAllocation{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Range:` + fmt.Sprintf("%v", this.Range) + `,`,
+ `Data:` + valueToStringGenerated(this.Data) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ReplicationController) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ReplicationController{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ReplicationControllerSpec", "ReplicationControllerSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ReplicationControllerStatus", "ReplicationControllerStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ReplicationControllerCondition) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ReplicationControllerCondition{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
+ `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ReplicationControllerList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ReplicationControllerList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ReplicationController", "ReplicationController", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ReplicationControllerSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForSelector := make([]string, 0, len(this.Selector))
+ for k := range this.Selector {
+ keysForSelector = append(keysForSelector, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForSelector)
+ mapStringForSelector := "map[string]string{"
+ for _, k := range keysForSelector {
+ mapStringForSelector += fmt.Sprintf("%v: %v,", k, this.Selector[k])
+ }
+ mapStringForSelector += "}"
+ s := strings.Join([]string{`&ReplicationControllerSpec{`,
+ `Replicas:` + valueToStringGenerated(this.Replicas) + `,`,
+ `Selector:` + mapStringForSelector + `,`,
+ `Template:` + strings.Replace(fmt.Sprintf("%v", this.Template), "PodTemplateSpec", "PodTemplateSpec", 1) + `,`,
+ `MinReadySeconds:` + fmt.Sprintf("%v", this.MinReadySeconds) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ReplicationControllerStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ReplicationControllerStatus{`,
+ `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
+ `FullyLabeledReplicas:` + fmt.Sprintf("%v", this.FullyLabeledReplicas) + `,`,
+ `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
+ `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`,
+ `AvailableReplicas:` + fmt.Sprintf("%v", this.AvailableReplicas) + `,`,
+ `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "ReplicationControllerCondition", "ReplicationControllerCondition", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceFieldSelector) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ResourceFieldSelector{`,
+ `ContainerName:` + fmt.Sprintf("%v", this.ContainerName) + `,`,
+ `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`,
+ `Divisor:` + strings.Replace(strings.Replace(this.Divisor.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceQuota) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ResourceQuota{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceQuotaSpec", "ResourceQuotaSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ResourceQuotaStatus", "ResourceQuotaStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceQuotaList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ResourceQuotaList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ResourceQuota", "ResourceQuota", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceQuotaSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForHard := make([]string, 0, len(this.Hard))
+ for k := range this.Hard {
+ keysForHard = append(keysForHard, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForHard)
+ mapStringForHard := "ResourceList{"
+ for _, k := range keysForHard {
+ mapStringForHard += fmt.Sprintf("%v: %v,", k, this.Hard[ResourceName(k)])
+ }
+ mapStringForHard += "}"
+ s := strings.Join([]string{`&ResourceQuotaSpec{`,
+ `Hard:` + mapStringForHard + `,`,
+ `Scopes:` + fmt.Sprintf("%v", this.Scopes) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceQuotaStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForHard := make([]string, 0, len(this.Hard))
+ for k := range this.Hard {
+ keysForHard = append(keysForHard, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForHard)
+ mapStringForHard := "ResourceList{"
+ for _, k := range keysForHard {
+ mapStringForHard += fmt.Sprintf("%v: %v,", k, this.Hard[ResourceName(k)])
+ }
+ mapStringForHard += "}"
+ keysForUsed := make([]string, 0, len(this.Used))
+ for k := range this.Used {
+ keysForUsed = append(keysForUsed, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForUsed)
+ mapStringForUsed := "ResourceList{"
+ for _, k := range keysForUsed {
+ mapStringForUsed += fmt.Sprintf("%v: %v,", k, this.Used[ResourceName(k)])
+ }
+ mapStringForUsed += "}"
+ s := strings.Join([]string{`&ResourceQuotaStatus{`,
+ `Hard:` + mapStringForHard + `,`,
+ `Used:` + mapStringForUsed + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceRequirements) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForLimits := make([]string, 0, len(this.Limits))
+ for k := range this.Limits {
+ keysForLimits = append(keysForLimits, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLimits)
+ mapStringForLimits := "ResourceList{"
+ for _, k := range keysForLimits {
+ mapStringForLimits += fmt.Sprintf("%v: %v,", k, this.Limits[ResourceName(k)])
+ }
+ mapStringForLimits += "}"
+ keysForRequests := make([]string, 0, len(this.Requests))
+ for k := range this.Requests {
+ keysForRequests = append(keysForRequests, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForRequests)
+ mapStringForRequests := "ResourceList{"
+ for _, k := range keysForRequests {
+ mapStringForRequests += fmt.Sprintf("%v: %v,", k, this.Requests[ResourceName(k)])
+ }
+ mapStringForRequests += "}"
+ s := strings.Join([]string{`&ResourceRequirements{`,
+ `Limits:` + mapStringForLimits + `,`,
+ `Requests:` + mapStringForRequests + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SELinuxOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SELinuxOptions{`,
+ `User:` + fmt.Sprintf("%v", this.User) + `,`,
+ `Role:` + fmt.Sprintf("%v", this.Role) + `,`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Level:` + fmt.Sprintf("%v", this.Level) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ScaleIOVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ScaleIOVolumeSource{`,
+ `Gateway:` + fmt.Sprintf("%v", this.Gateway) + `,`,
+ `System:` + fmt.Sprintf("%v", this.System) + `,`,
+ `SecretRef:` + strings.Replace(fmt.Sprintf("%v", this.SecretRef), "LocalObjectReference", "LocalObjectReference", 1) + `,`,
+ `SSLEnabled:` + fmt.Sprintf("%v", this.SSLEnabled) + `,`,
+ `ProtectionDomain:` + fmt.Sprintf("%v", this.ProtectionDomain) + `,`,
+ `StoragePool:` + fmt.Sprintf("%v", this.StoragePool) + `,`,
+ `StorageMode:` + fmt.Sprintf("%v", this.StorageMode) + `,`,
+ `VolumeName:` + fmt.Sprintf("%v", this.VolumeName) + `,`,
+ `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Secret) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForData := make([]string, 0, len(this.Data))
+ for k := range this.Data {
+ keysForData = append(keysForData, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForData)
+ mapStringForData := "map[string][]byte{"
+ for _, k := range keysForData {
+ mapStringForData += fmt.Sprintf("%v: %v,", k, this.Data[k])
+ }
+ mapStringForData += "}"
+ keysForStringData := make([]string, 0, len(this.StringData))
+ for k := range this.StringData {
+ keysForStringData = append(keysForStringData, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForStringData)
+ mapStringForStringData := "map[string]string{"
+ for _, k := range keysForStringData {
+ mapStringForStringData += fmt.Sprintf("%v: %v,", k, this.StringData[k])
+ }
+ mapStringForStringData += "}"
+ s := strings.Join([]string{`&Secret{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Data:` + mapStringForData + `,`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `StringData:` + mapStringForStringData + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SecretEnvSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SecretEnvSource{`,
+ `LocalObjectReference:` + strings.Replace(strings.Replace(this.LocalObjectReference.String(), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`,
+ `Optional:` + valueToStringGenerated(this.Optional) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SecretKeySelector) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SecretKeySelector{`,
+ `LocalObjectReference:` + strings.Replace(strings.Replace(this.LocalObjectReference.String(), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`,
+ `Key:` + fmt.Sprintf("%v", this.Key) + `,`,
+ `Optional:` + valueToStringGenerated(this.Optional) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SecretList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SecretList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Secret", "Secret", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SecretProjection) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SecretProjection{`,
+ `LocalObjectReference:` + strings.Replace(strings.Replace(this.LocalObjectReference.String(), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "KeyToPath", "KeyToPath", 1), `&`, ``, 1) + `,`,
+ `Optional:` + valueToStringGenerated(this.Optional) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SecretVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SecretVolumeSource{`,
+ `SecretName:` + fmt.Sprintf("%v", this.SecretName) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "KeyToPath", "KeyToPath", 1), `&`, ``, 1) + `,`,
+ `DefaultMode:` + valueToStringGenerated(this.DefaultMode) + `,`,
+ `Optional:` + valueToStringGenerated(this.Optional) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SecurityContext) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SecurityContext{`,
+ `Capabilities:` + strings.Replace(fmt.Sprintf("%v", this.Capabilities), "Capabilities", "Capabilities", 1) + `,`,
+ `Privileged:` + valueToStringGenerated(this.Privileged) + `,`,
+ `SELinuxOptions:` + strings.Replace(fmt.Sprintf("%v", this.SELinuxOptions), "SELinuxOptions", "SELinuxOptions", 1) + `,`,
+ `RunAsUser:` + valueToStringGenerated(this.RunAsUser) + `,`,
+ `RunAsNonRoot:` + valueToStringGenerated(this.RunAsNonRoot) + `,`,
+ `ReadOnlyRootFilesystem:` + valueToStringGenerated(this.ReadOnlyRootFilesystem) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SerializedReference) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SerializedReference{`,
+ `Reference:` + strings.Replace(strings.Replace(this.Reference.String(), "ObjectReference", "ObjectReference", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Service) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Service{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ServiceSpec", "ServiceSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ServiceStatus", "ServiceStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ServiceAccount) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ServiceAccount{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Secrets:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Secrets), "ObjectReference", "ObjectReference", 1), `&`, ``, 1) + `,`,
+ `ImagePullSecrets:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ImagePullSecrets), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`,
+ `AutomountServiceAccountToken:` + valueToStringGenerated(this.AutomountServiceAccountToken) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ServiceAccountList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ServiceAccountList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ServiceAccount", "ServiceAccount", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ServiceList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ServiceList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Service", "Service", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ServicePort) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ServicePort{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Protocol:` + fmt.Sprintf("%v", this.Protocol) + `,`,
+ `Port:` + fmt.Sprintf("%v", this.Port) + `,`,
+ `TargetPort:` + strings.Replace(strings.Replace(this.TargetPort.String(), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1), `&`, ``, 1) + `,`,
+ `NodePort:` + fmt.Sprintf("%v", this.NodePort) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ServiceProxyOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ServiceProxyOptions{`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ServiceSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForSelector := make([]string, 0, len(this.Selector))
+ for k := range this.Selector {
+ keysForSelector = append(keysForSelector, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForSelector)
+ mapStringForSelector := "map[string]string{"
+ for _, k := range keysForSelector {
+ mapStringForSelector += fmt.Sprintf("%v: %v,", k, this.Selector[k])
+ }
+ mapStringForSelector += "}"
+ s := strings.Join([]string{`&ServiceSpec{`,
+ `Ports:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ports), "ServicePort", "ServicePort", 1), `&`, ``, 1) + `,`,
+ `Selector:` + mapStringForSelector + `,`,
+ `ClusterIP:` + fmt.Sprintf("%v", this.ClusterIP) + `,`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `ExternalIPs:` + fmt.Sprintf("%v", this.ExternalIPs) + `,`,
+ `SessionAffinity:` + fmt.Sprintf("%v", this.SessionAffinity) + `,`,
+ `LoadBalancerIP:` + fmt.Sprintf("%v", this.LoadBalancerIP) + `,`,
+ `LoadBalancerSourceRanges:` + fmt.Sprintf("%v", this.LoadBalancerSourceRanges) + `,`,
+ `ExternalName:` + fmt.Sprintf("%v", this.ExternalName) + `,`,
+ `ExternalTrafficPolicy:` + fmt.Sprintf("%v", this.ExternalTrafficPolicy) + `,`,
+ `HealthCheckNodePort:` + fmt.Sprintf("%v", this.HealthCheckNodePort) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ServiceStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ServiceStatus{`,
+ `LoadBalancer:` + strings.Replace(strings.Replace(this.LoadBalancer.String(), "LoadBalancerStatus", "LoadBalancerStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StorageOSPersistentVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StorageOSPersistentVolumeSource{`,
+ `VolumeName:` + fmt.Sprintf("%v", this.VolumeName) + `,`,
+ `VolumeNamespace:` + fmt.Sprintf("%v", this.VolumeNamespace) + `,`,
+ `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `SecretRef:` + strings.Replace(fmt.Sprintf("%v", this.SecretRef), "ObjectReference", "ObjectReference", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StorageOSVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StorageOSVolumeSource{`,
+ `VolumeName:` + fmt.Sprintf("%v", this.VolumeName) + `,`,
+ `VolumeNamespace:` + fmt.Sprintf("%v", this.VolumeNamespace) + `,`,
+ `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `SecretRef:` + strings.Replace(fmt.Sprintf("%v", this.SecretRef), "LocalObjectReference", "LocalObjectReference", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Sysctl) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Sysctl{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Value:` + fmt.Sprintf("%v", this.Value) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *TCPSocketAction) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&TCPSocketAction{`,
+ `Port:` + strings.Replace(strings.Replace(this.Port.String(), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1), `&`, ``, 1) + `,`,
+ `Host:` + fmt.Sprintf("%v", this.Host) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Taint) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Taint{`,
+ `Key:` + fmt.Sprintf("%v", this.Key) + `,`,
+ `Value:` + fmt.Sprintf("%v", this.Value) + `,`,
+ `Effect:` + fmt.Sprintf("%v", this.Effect) + `,`,
+ `TimeAdded:` + strings.Replace(strings.Replace(this.TimeAdded.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Toleration) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Toleration{`,
+ `Key:` + fmt.Sprintf("%v", this.Key) + `,`,
+ `Operator:` + fmt.Sprintf("%v", this.Operator) + `,`,
+ `Value:` + fmt.Sprintf("%v", this.Value) + `,`,
+ `Effect:` + fmt.Sprintf("%v", this.Effect) + `,`,
+ `TolerationSeconds:` + valueToStringGenerated(this.TolerationSeconds) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Volume) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Volume{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `VolumeSource:` + strings.Replace(strings.Replace(this.VolumeSource.String(), "VolumeSource", "VolumeSource", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *VolumeMount) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&VolumeMount{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `MountPath:` + fmt.Sprintf("%v", this.MountPath) + `,`,
+ `SubPath:` + fmt.Sprintf("%v", this.SubPath) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *VolumeProjection) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&VolumeProjection{`,
+ `Secret:` + strings.Replace(fmt.Sprintf("%v", this.Secret), "SecretProjection", "SecretProjection", 1) + `,`,
+ `DownwardAPI:` + strings.Replace(fmt.Sprintf("%v", this.DownwardAPI), "DownwardAPIProjection", "DownwardAPIProjection", 1) + `,`,
+ `ConfigMap:` + strings.Replace(fmt.Sprintf("%v", this.ConfigMap), "ConfigMapProjection", "ConfigMapProjection", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *VolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&VolumeSource{`,
+ `HostPath:` + strings.Replace(fmt.Sprintf("%v", this.HostPath), "HostPathVolumeSource", "HostPathVolumeSource", 1) + `,`,
+ `EmptyDir:` + strings.Replace(fmt.Sprintf("%v", this.EmptyDir), "EmptyDirVolumeSource", "EmptyDirVolumeSource", 1) + `,`,
+ `GCEPersistentDisk:` + strings.Replace(fmt.Sprintf("%v", this.GCEPersistentDisk), "GCEPersistentDiskVolumeSource", "GCEPersistentDiskVolumeSource", 1) + `,`,
+ `AWSElasticBlockStore:` + strings.Replace(fmt.Sprintf("%v", this.AWSElasticBlockStore), "AWSElasticBlockStoreVolumeSource", "AWSElasticBlockStoreVolumeSource", 1) + `,`,
+ `GitRepo:` + strings.Replace(fmt.Sprintf("%v", this.GitRepo), "GitRepoVolumeSource", "GitRepoVolumeSource", 1) + `,`,
+ `Secret:` + strings.Replace(fmt.Sprintf("%v", this.Secret), "SecretVolumeSource", "SecretVolumeSource", 1) + `,`,
+ `NFS:` + strings.Replace(fmt.Sprintf("%v", this.NFS), "NFSVolumeSource", "NFSVolumeSource", 1) + `,`,
+ `ISCSI:` + strings.Replace(fmt.Sprintf("%v", this.ISCSI), "ISCSIVolumeSource", "ISCSIVolumeSource", 1) + `,`,
+ `Glusterfs:` + strings.Replace(fmt.Sprintf("%v", this.Glusterfs), "GlusterfsVolumeSource", "GlusterfsVolumeSource", 1) + `,`,
+ `PersistentVolumeClaim:` + strings.Replace(fmt.Sprintf("%v", this.PersistentVolumeClaim), "PersistentVolumeClaimVolumeSource", "PersistentVolumeClaimVolumeSource", 1) + `,`,
+ `RBD:` + strings.Replace(fmt.Sprintf("%v", this.RBD), "RBDVolumeSource", "RBDVolumeSource", 1) + `,`,
+ `FlexVolume:` + strings.Replace(fmt.Sprintf("%v", this.FlexVolume), "FlexVolumeSource", "FlexVolumeSource", 1) + `,`,
+ `Cinder:` + strings.Replace(fmt.Sprintf("%v", this.Cinder), "CinderVolumeSource", "CinderVolumeSource", 1) + `,`,
+ `CephFS:` + strings.Replace(fmt.Sprintf("%v", this.CephFS), "CephFSVolumeSource", "CephFSVolumeSource", 1) + `,`,
+ `Flocker:` + strings.Replace(fmt.Sprintf("%v", this.Flocker), "FlockerVolumeSource", "FlockerVolumeSource", 1) + `,`,
+ `DownwardAPI:` + strings.Replace(fmt.Sprintf("%v", this.DownwardAPI), "DownwardAPIVolumeSource", "DownwardAPIVolumeSource", 1) + `,`,
+ `FC:` + strings.Replace(fmt.Sprintf("%v", this.FC), "FCVolumeSource", "FCVolumeSource", 1) + `,`,
+ `AzureFile:` + strings.Replace(fmt.Sprintf("%v", this.AzureFile), "AzureFileVolumeSource", "AzureFileVolumeSource", 1) + `,`,
+ `ConfigMap:` + strings.Replace(fmt.Sprintf("%v", this.ConfigMap), "ConfigMapVolumeSource", "ConfigMapVolumeSource", 1) + `,`,
+ `VsphereVolume:` + strings.Replace(fmt.Sprintf("%v", this.VsphereVolume), "VsphereVirtualDiskVolumeSource", "VsphereVirtualDiskVolumeSource", 1) + `,`,
+ `Quobyte:` + strings.Replace(fmt.Sprintf("%v", this.Quobyte), "QuobyteVolumeSource", "QuobyteVolumeSource", 1) + `,`,
+ `AzureDisk:` + strings.Replace(fmt.Sprintf("%v", this.AzureDisk), "AzureDiskVolumeSource", "AzureDiskVolumeSource", 1) + `,`,
+ `PhotonPersistentDisk:` + strings.Replace(fmt.Sprintf("%v", this.PhotonPersistentDisk), "PhotonPersistentDiskVolumeSource", "PhotonPersistentDiskVolumeSource", 1) + `,`,
+ `PortworxVolume:` + strings.Replace(fmt.Sprintf("%v", this.PortworxVolume), "PortworxVolumeSource", "PortworxVolumeSource", 1) + `,`,
+ `ScaleIO:` + strings.Replace(fmt.Sprintf("%v", this.ScaleIO), "ScaleIOVolumeSource", "ScaleIOVolumeSource", 1) + `,`,
+ `Projected:` + strings.Replace(fmt.Sprintf("%v", this.Projected), "ProjectedVolumeSource", "ProjectedVolumeSource", 1) + `,`,
+ `StorageOS:` + strings.Replace(fmt.Sprintf("%v", this.StorageOS), "StorageOSVolumeSource", "StorageOSVolumeSource", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *VsphereVirtualDiskVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&VsphereVirtualDiskVolumeSource{`,
+ `VolumePath:` + fmt.Sprintf("%v", this.VolumePath) + `,`,
+ `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`,
+ `StoragePolicyName:` + fmt.Sprintf("%v", this.StoragePolicyName) + `,`,
+ `StoragePolicyID:` + fmt.Sprintf("%v", this.StoragePolicyID) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *WeightedPodAffinityTerm) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&WeightedPodAffinityTerm{`,
+ `Weight:` + fmt.Sprintf("%v", this.Weight) + `,`,
+ `PodAffinityTerm:` + strings.Replace(strings.Replace(this.PodAffinityTerm.String(), "PodAffinityTerm", "PodAffinityTerm", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *AWSElasticBlockStoreVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: AWSElasticBlockStoreVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: AWSElasticBlockStoreVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumeID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FSType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Partition", wireType)
+ }
+ m.Partition = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Partition |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Affinity) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Affinity: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Affinity: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NodeAffinity", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.NodeAffinity == nil {
+ m.NodeAffinity = &NodeAffinity{}
+ }
+ if err := m.NodeAffinity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodAffinity", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PodAffinity == nil {
+ m.PodAffinity = &PodAffinity{}
+ }
+ if err := m.PodAffinity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodAntiAffinity", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PodAntiAffinity == nil {
+ m.PodAntiAffinity = &PodAntiAffinity{}
+ }
+ if err := m.PodAntiAffinity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *AttachedVolume) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: AttachedVolume: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: AttachedVolume: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = UniqueVolumeName(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DevicePath", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.DevicePath = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *AvoidPods) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: AvoidPods: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: AvoidPods: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PreferAvoidPods", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PreferAvoidPods = append(m.PreferAvoidPods, PreferAvoidPodsEntry{})
+ if err := m.PreferAvoidPods[len(m.PreferAvoidPods)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *AzureDiskVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: AzureDiskVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: AzureDiskVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DiskName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.DiskName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DataDiskURI", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.DataDiskURI = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CachingMode", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := AzureDataDiskCachingMode(dAtA[iNdEx:postIndex])
+ m.CachingMode = &s
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := string(dAtA[iNdEx:postIndex])
+ m.FSType = &s
+ iNdEx = postIndex
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.ReadOnly = &b
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := AzureDataDiskKind(dAtA[iNdEx:postIndex])
+ m.Kind = &s
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *AzureFileVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: AzureFileVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: AzureFileVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecretName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SecretName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ShareName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ShareName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Binding) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Binding: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Binding: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Capabilities) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Capabilities: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Capabilities: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Add", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Add = append(m.Add, Capability(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Drop", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Drop = append(m.Drop, Capability(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CephFSVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CephFSVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CephFSVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Monitors", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Monitors = append(m.Monitors, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.User = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecretFile", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SecretFile = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecretRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SecretRef == nil {
+ m.SecretRef = &LocalObjectReference{}
+ }
+ if err := m.SecretRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CinderVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CinderVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CinderVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumeID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FSType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ComponentCondition) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ComponentCondition: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ComponentCondition: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = ComponentConditionType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Status = ConditionStatus(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Error = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ComponentStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ComponentStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ComponentStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Conditions = append(m.Conditions, ComponentCondition{})
+ if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ComponentStatusList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ComponentStatusList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ComponentStatusList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ComponentStatus{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ConfigMap) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ConfigMap: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ConfigMap: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Data == nil {
+ m.Data = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Data[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Data[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ConfigMapEnvSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ConfigMapEnvSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ConfigMapEnvSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LocalObjectReference", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LocalObjectReference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Optional = &b
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ConfigMapKeySelector) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ConfigMapKeySelector: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ConfigMapKeySelector: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LocalObjectReference", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LocalObjectReference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Key = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Optional = &b
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ConfigMapList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ConfigMapList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ConfigMapList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ConfigMap{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ConfigMapProjection) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ConfigMapProjection: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ConfigMapProjection: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LocalObjectReference", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LocalObjectReference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, KeyToPath{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Optional = &b
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ConfigMapVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ConfigMapVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ConfigMapVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LocalObjectReference", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LocalObjectReference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, KeyToPath{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DefaultMode", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.DefaultMode = &v
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Optional = &b
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Container) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Container: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Container: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Image = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Command = append(m.Command, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Args = append(m.Args, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field WorkingDir", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.WorkingDir = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Ports = append(m.Ports, ContainerPort{})
+ if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Env = append(m.Env, EnvVar{})
+ if err := m.Env[len(m.Env)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Resources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeMounts", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumeMounts = append(m.VolumeMounts, VolumeMount{})
+ if err := m.VolumeMounts[len(m.VolumeMounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LivenessProbe", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.LivenessProbe == nil {
+ m.LivenessProbe = &Probe{}
+ }
+ if err := m.LivenessProbe.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 11:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadinessProbe", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ReadinessProbe == nil {
+ m.ReadinessProbe = &Probe{}
+ }
+ if err := m.ReadinessProbe.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 12:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Lifecycle", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Lifecycle == nil {
+ m.Lifecycle = &Lifecycle{}
+ }
+ if err := m.Lifecycle.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 13:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TerminationMessagePath", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.TerminationMessagePath = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 14:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ImagePullPolicy", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ImagePullPolicy = PullPolicy(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 15:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecurityContext", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SecurityContext == nil {
+ m.SecurityContext = &SecurityContext{}
+ }
+ if err := m.SecurityContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 16:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Stdin = bool(v != 0)
+ case 17:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StdinOnce", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.StdinOnce = bool(v != 0)
+ case 18:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TTY", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.TTY = bool(v != 0)
+ case 19:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field EnvFrom", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.EnvFrom = append(m.EnvFrom, EnvFromSource{})
+ if err := m.EnvFrom[len(m.EnvFrom)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 20:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TerminationMessagePolicy", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.TerminationMessagePolicy = TerminationMessagePolicy(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerImage) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerImage: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerImage: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Names", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Names = append(m.Names, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SizeBytes", wireType)
+ }
+ m.SizeBytes = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.SizeBytes |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerPort) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerPort: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerPort: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostPort", wireType)
+ }
+ m.HostPort = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.HostPort |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ContainerPort", wireType)
+ }
+ m.ContainerPort = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ContainerPort |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Protocol = Protocol(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostIP", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.HostIP = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerState) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerState: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerState: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Waiting", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Waiting == nil {
+ m.Waiting = &ContainerStateWaiting{}
+ }
+ if err := m.Waiting.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Running", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Running == nil {
+ m.Running = &ContainerStateRunning{}
+ }
+ if err := m.Running.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Terminated", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Terminated == nil {
+ m.Terminated = &ContainerStateTerminated{}
+ }
+ if err := m.Terminated.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerStateRunning) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerStateRunning: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerStateRunning: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.StartedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerStateTerminated) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerStateTerminated: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerStateTerminated: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ExitCode", wireType)
+ }
+ m.ExitCode = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ExitCode |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Signal", wireType)
+ }
+ m.Signal = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Signal |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.StartedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FinishedAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.FinishedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ContainerID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerStateWaiting) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerStateWaiting: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerStateWaiting: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.State.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastTerminationState", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastTerminationState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Ready", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Ready = bool(v != 0)
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RestartCount", wireType)
+ }
+ m.RestartCount = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.RestartCount |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Image = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ImageID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ImageID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ContainerID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DaemonEndpoint) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DaemonEndpoint: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DaemonEndpoint: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
+ }
+ m.Port = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Port |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeleteOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeleteOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeleteOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field GracePeriodSeconds", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.GracePeriodSeconds = &v
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Preconditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Preconditions == nil {
+ m.Preconditions = &Preconditions{}
+ }
+ if err := m.Preconditions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OrphanDependents", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.OrphanDependents = &b
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PropagationPolicy", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := DeletionPropagation(dAtA[iNdEx:postIndex])
+ m.PropagationPolicy = &s
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DownwardAPIProjection) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DownwardAPIProjection: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DownwardAPIProjection: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, DownwardAPIVolumeFile{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DownwardAPIVolumeFile) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DownwardAPIVolumeFile: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DownwardAPIVolumeFile: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FieldRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.FieldRef == nil {
+ m.FieldRef = &ObjectFieldSelector{}
+ }
+ if err := m.FieldRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceFieldRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ResourceFieldRef == nil {
+ m.ResourceFieldRef = &ResourceFieldSelector{}
+ }
+ if err := m.ResourceFieldRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Mode = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DownwardAPIVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DownwardAPIVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DownwardAPIVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, DownwardAPIVolumeFile{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DefaultMode", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.DefaultMode = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *EmptyDirVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: EmptyDirVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: EmptyDirVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Medium", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Medium = StorageMedium(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SizeLimit", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.SizeLimit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *EndpointAddress) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: EndpointAddress: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: EndpointAddress: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IP", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.IP = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.TargetRef == nil {
+ m.TargetRef = &ObjectReference{}
+ }
+ if err := m.TargetRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Hostname = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := string(dAtA[iNdEx:postIndex])
+ m.NodeName = &s
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *EndpointPort) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: EndpointPort: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: EndpointPort: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
+ }
+ m.Port = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Port |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Protocol = Protocol(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *EndpointSubset) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: EndpointSubset: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: EndpointSubset: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Addresses = append(m.Addresses, EndpointAddress{})
+ if err := m.Addresses[len(m.Addresses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NotReadyAddresses", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.NotReadyAddresses = append(m.NotReadyAddresses, EndpointAddress{})
+ if err := m.NotReadyAddresses[len(m.NotReadyAddresses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Ports = append(m.Ports, EndpointPort{})
+ if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Endpoints) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Endpoints: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Endpoints: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Subsets", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Subsets = append(m.Subsets, EndpointSubset{})
+ if err := m.Subsets[len(m.Subsets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *EndpointsList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: EndpointsList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: EndpointsList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, Endpoints{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *EnvFromSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: EnvFromSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: EnvFromSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Prefix", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Prefix = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ConfigMapRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ConfigMapRef == nil {
+ m.ConfigMapRef = &ConfigMapEnvSource{}
+ }
+ if err := m.ConfigMapRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecretRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SecretRef == nil {
+ m.SecretRef = &SecretEnvSource{}
+ }
+ if err := m.SecretRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *EnvVar) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: EnvVar: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: EnvVar: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Value = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ValueFrom", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ValueFrom == nil {
+ m.ValueFrom = &EnvVarSource{}
+ }
+ if err := m.ValueFrom.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *EnvVarSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: EnvVarSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: EnvVarSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FieldRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.FieldRef == nil {
+ m.FieldRef = &ObjectFieldSelector{}
+ }
+ if err := m.FieldRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceFieldRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ResourceFieldRef == nil {
+ m.ResourceFieldRef = &ResourceFieldSelector{}
+ }
+ if err := m.ResourceFieldRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ConfigMapKeyRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ConfigMapKeyRef == nil {
+ m.ConfigMapKeyRef = &ConfigMapKeySelector{}
+ }
+ if err := m.ConfigMapKeyRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecretKeyRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SecretKeyRef == nil {
+ m.SecretKeyRef = &SecretKeySelector{}
+ }
+ if err := m.SecretKeyRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Event) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Event: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field InvolvedObject", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.InvolvedObject.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FirstTimestamp", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.FirstTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastTimestamp", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType)
+ }
+ m.Count = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Count |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *EventList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: EventList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: EventList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, Event{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *EventSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: EventSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: EventSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Component", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Component = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Host = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExecAction) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExecAction: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExecAction: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Command = append(m.Command, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *FCVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: FCVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: FCVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetWWNs", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.TargetWWNs = append(m.TargetWWNs, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Lun", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Lun = &v
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FSType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *FlexVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: FlexVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: FlexVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Driver = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FSType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecretRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SecretRef == nil {
+ m.SecretRef = &LocalObjectReference{}
+ }
+ if err := m.SecretRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Options == nil {
+ m.Options = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Options[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Options[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *FlockerVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: FlockerVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: FlockerVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DatasetName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.DatasetName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DatasetUUID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.DatasetUUID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *GCEPersistentDiskVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: GCEPersistentDiskVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: GCEPersistentDiskVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PDName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PDName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FSType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Partition", wireType)
+ }
+ m.Partition = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Partition |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *GitRepoVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: GitRepoVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: GitRepoVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Repository", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Repository = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Revision = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Directory", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Directory = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *GlusterfsVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: GlusterfsVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: GlusterfsVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field EndpointsName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.EndpointsName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HTTPGetAction) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HTTPGetAction: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HTTPGetAction: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Port.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Host = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Scheme", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Scheme = URIScheme(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HTTPHeaders", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.HTTPHeaders = append(m.HTTPHeaders, HTTPHeader{})
+ if err := m.HTTPHeaders[len(m.HTTPHeaders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HTTPHeader) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HTTPHeader: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HTTPHeader: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Value = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Handler) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Handler: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Handler: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Exec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Exec == nil {
+ m.Exec = &ExecAction{}
+ }
+ if err := m.Exec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HTTPGet", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.HTTPGet == nil {
+ m.HTTPGet = &HTTPGetAction{}
+ }
+ if err := m.HTTPGet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TCPSocket", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.TCPSocket == nil {
+ m.TCPSocket = &TCPSocketAction{}
+ }
+ if err := m.TCPSocket.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HostAlias) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HostAlias: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HostAlias: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IP", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.IP = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Hostnames", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Hostnames = append(m.Hostnames, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HostPathVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HostPathVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HostPathVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ISCSIVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ISCSIVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ISCSIVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetPortal", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.TargetPortal = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IQN", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.IQN = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Lun", wireType)
+ }
+ m.Lun = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Lun |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ISCSIInterface", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ISCSIInterface = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FSType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Portals", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Portals = append(m.Portals, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 8:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DiscoveryCHAPAuth", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.DiscoveryCHAPAuth = bool(v != 0)
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecretRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SecretRef == nil {
+ m.SecretRef = &LocalObjectReference{}
+ }
+ if err := m.SecretRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 11:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SessionCHAPAuth", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.SessionCHAPAuth = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *KeyToPath) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: KeyToPath: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: KeyToPath: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Key = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Mode = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Lifecycle) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Lifecycle: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Lifecycle: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PostStart", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PostStart == nil {
+ m.PostStart = &Handler{}
+ }
+ if err := m.PostStart.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PreStop", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PreStop == nil {
+ m.PreStop = &Handler{}
+ }
+ if err := m.PreStop.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LimitRange) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LimitRange: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LimitRange: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LimitRangeItem) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LimitRangeItem: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LimitRangeItem: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = LimitType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Max == nil {
+ m.Max = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Max[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.Max[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Min == nil {
+ m.Min = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Min[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.Min[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Default", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Default == nil {
+ m.Default = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Default[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.Default[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DefaultRequest", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.DefaultRequest == nil {
+ m.DefaultRequest = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.DefaultRequest[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.DefaultRequest[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MaxLimitRequestRatio", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.MaxLimitRequestRatio == nil {
+ m.MaxLimitRequestRatio = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.MaxLimitRequestRatio[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.MaxLimitRequestRatio[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LimitRangeList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LimitRangeList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LimitRangeList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, LimitRange{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LimitRangeSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LimitRangeSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LimitRangeSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Limits", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Limits = append(m.Limits, LimitRangeItem{})
+ if err := m.Limits[len(m.Limits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *List) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: List: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: List: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, k8s_io_apimachinery_pkg_runtime.RawExtension{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ListOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ListOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ListOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.LabelSelector = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FieldSelector", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FieldSelector = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Watch", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Watch = bool(v != 0)
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ResourceVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TimeoutSeconds", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.TimeoutSeconds = &v
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IncludeUninitialized", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.IncludeUninitialized = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LoadBalancerIngress) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LoadBalancerIngress: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LoadBalancerIngress: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IP", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.IP = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Hostname = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LoadBalancerStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LoadBalancerStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LoadBalancerStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Ingress", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Ingress = append(m.Ingress, LoadBalancerIngress{})
+ if err := m.Ingress[len(m.Ingress)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LocalObjectReference) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LocalObjectReference: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LocalObjectReference: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LocalVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LocalVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LocalVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NFSVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NFSVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NFSVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Server", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Server = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Namespace) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Namespace: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Namespace: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NamespaceList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NamespaceList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NamespaceList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, Namespace{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NamespaceSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NamespaceSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NamespaceSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Finalizers", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Finalizers = append(m.Finalizers, FinalizerName(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NamespaceStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NamespaceStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NamespaceStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Phase", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Phase = NamespacePhase(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Node) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Node: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Node: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NodeAddress) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NodeAddress: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NodeAddress: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = NodeAddressType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Address = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NodeAffinity) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NodeAffinity: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NodeAffinity: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RequiredDuringSchedulingIgnoredDuringExecution", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.RequiredDuringSchedulingIgnoredDuringExecution == nil {
+ m.RequiredDuringSchedulingIgnoredDuringExecution = &NodeSelector{}
+ }
+ if err := m.RequiredDuringSchedulingIgnoredDuringExecution.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PreferredDuringSchedulingIgnoredDuringExecution", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PreferredDuringSchedulingIgnoredDuringExecution = append(m.PreferredDuringSchedulingIgnoredDuringExecution, PreferredSchedulingTerm{})
+ if err := m.PreferredDuringSchedulingIgnoredDuringExecution[len(m.PreferredDuringSchedulingIgnoredDuringExecution)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NodeCondition) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NodeCondition: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NodeCondition: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = NodeConditionType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Status = ConditionStatus(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastHeartbeatTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastHeartbeatTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NodeDaemonEndpoints) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NodeDaemonEndpoints: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NodeDaemonEndpoints: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field KubeletEndpoint", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.KubeletEndpoint.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NodeList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NodeList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NodeList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, Node{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NodeProxyOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NodeProxyOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NodeProxyOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NodeResources) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NodeResources: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NodeResources: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Capacity == nil {
+ m.Capacity = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Capacity[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.Capacity[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NodeSelector) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NodeSelector: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NodeSelector: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NodeSelectorTerms", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.NodeSelectorTerms = append(m.NodeSelectorTerms, NodeSelectorTerm{})
+ if err := m.NodeSelectorTerms[len(m.NodeSelectorTerms)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NodeSelectorRequirement) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NodeSelectorRequirement: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NodeSelectorRequirement: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Key = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Operator = NodeSelectorOperator(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Values = append(m.Values, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NodeSelectorTerm) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NodeSelectorTerm: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NodeSelectorTerm: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MatchExpressions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MatchExpressions = append(m.MatchExpressions, NodeSelectorRequirement{})
+ if err := m.MatchExpressions[len(m.MatchExpressions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NodeSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NodeSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NodeSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodCIDR", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PodCIDR = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ExternalID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ExternalID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ProviderID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ProviderID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Unschedulable", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Unschedulable = bool(v != 0)
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Taints", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Taints = append(m.Taints, Taint{})
+ if err := m.Taints[len(m.Taints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NodeStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NodeStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NodeStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Capacity == nil {
+ m.Capacity = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Capacity[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.Capacity[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Allocatable", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Allocatable == nil {
+ m.Allocatable = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Allocatable[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.Allocatable[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Phase", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Phase = NodePhase(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Conditions = append(m.Conditions, NodeCondition{})
+ if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Addresses = append(m.Addresses, NodeAddress{})
+ if err := m.Addresses[len(m.Addresses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DaemonEndpoints", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.DaemonEndpoints.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NodeInfo", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.NodeInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Images", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Images = append(m.Images, ContainerImage{})
+ if err := m.Images[len(m.Images)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumesInUse", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumesInUse = append(m.VolumesInUse, UniqueVolumeName(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumesAttached", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumesAttached = append(m.VolumesAttached, AttachedVolume{})
+ if err := m.VolumesAttached[len(m.VolumesAttached)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NodeSystemInfo) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NodeSystemInfo: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NodeSystemInfo: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MachineID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MachineID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SystemUUID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SystemUUID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field BootID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.BootID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field KernelVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.KernelVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OSImage", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OSImage = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ContainerRuntimeVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ContainerRuntimeVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field KubeletVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.KubeletVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field KubeProxyVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.KubeProxyVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OperatingSystem", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OperatingSystem = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Architecture", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Architecture = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ObjectFieldSelector) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ObjectFieldSelector: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ObjectFieldSelector: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FieldPath", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FieldPath = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ObjectMeta) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ObjectMeta: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ObjectMeta: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field GenerateName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.GenerateName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Namespace = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SelfLink", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SelfLink = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ResourceVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Generation", wireType)
+ }
+ m.Generation = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Generation |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CreationTimestamp", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.CreationTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DeletionTimestamp", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.DeletionTimestamp == nil {
+ m.DeletionTimestamp = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{}
+ }
+ if err := m.DeletionTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 10:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DeletionGracePeriodSeconds", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.DeletionGracePeriodSeconds = &v
+ case 11:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Labels == nil {
+ m.Labels = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Labels[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Labels[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 12:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Annotations == nil {
+ m.Annotations = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Annotations[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Annotations[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 13:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OwnerReferences", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OwnerReferences = append(m.OwnerReferences, k8s_io_apimachinery_pkg_apis_meta_v1.OwnerReference{})
+ if err := m.OwnerReferences[len(m.OwnerReferences)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 14:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Finalizers", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Finalizers = append(m.Finalizers, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 15:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ClusterName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ClusterName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 16:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Initializers", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Initializers == nil {
+ m.Initializers = &k8s_io_apimachinery_pkg_apis_meta_v1.Initializers{}
+ }
+ if err := m.Initializers.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ObjectReference) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ObjectReference: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ObjectReference: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Kind = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Namespace = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ResourceVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FieldPath", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FieldPath = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PersistentVolume) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PersistentVolume: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PersistentVolume: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PersistentVolumeClaim) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PersistentVolumeClaim: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PersistentVolumeClaim: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PersistentVolumeClaimList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PersistentVolumeClaimList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PersistentVolumeClaimList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, PersistentVolumeClaim{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PersistentVolumeClaimSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PersistentVolumeClaimSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PersistentVolumeClaimSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AccessModes", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.AccessModes = append(m.AccessModes, PersistentVolumeAccessMode(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Resources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumeName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Selector == nil {
+ m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
+ }
+ if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StorageClassName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := string(dAtA[iNdEx:postIndex])
+ m.StorageClassName = &s
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PersistentVolumeClaimStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PersistentVolumeClaimStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PersistentVolumeClaimStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Phase", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Phase = PersistentVolumeClaimPhase(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AccessModes", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.AccessModes = append(m.AccessModes, PersistentVolumeAccessMode(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Capacity == nil {
+ m.Capacity = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Capacity[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.Capacity[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PersistentVolumeClaimVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PersistentVolumeClaimVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PersistentVolumeClaimVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ClaimName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ClaimName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PersistentVolumeList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PersistentVolumeList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PersistentVolumeList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, PersistentVolume{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PersistentVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PersistentVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PersistentVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field GCEPersistentDisk", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.GCEPersistentDisk == nil {
+ m.GCEPersistentDisk = &GCEPersistentDiskVolumeSource{}
+ }
+ if err := m.GCEPersistentDisk.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AWSElasticBlockStore", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.AWSElasticBlockStore == nil {
+ m.AWSElasticBlockStore = &AWSElasticBlockStoreVolumeSource{}
+ }
+ if err := m.AWSElasticBlockStore.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostPath", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.HostPath == nil {
+ m.HostPath = &HostPathVolumeSource{}
+ }
+ if err := m.HostPath.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Glusterfs", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Glusterfs == nil {
+ m.Glusterfs = &GlusterfsVolumeSource{}
+ }
+ if err := m.Glusterfs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NFS", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.NFS == nil {
+ m.NFS = &NFSVolumeSource{}
+ }
+ if err := m.NFS.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RBD", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.RBD == nil {
+ m.RBD = &RBDVolumeSource{}
+ }
+ if err := m.RBD.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ISCSI", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ISCSI == nil {
+ m.ISCSI = &ISCSIVolumeSource{}
+ }
+ if err := m.ISCSI.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Cinder", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Cinder == nil {
+ m.Cinder = &CinderVolumeSource{}
+ }
+ if err := m.Cinder.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CephFS", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.CephFS == nil {
+ m.CephFS = &CephFSVolumeSource{}
+ }
+ if err := m.CephFS.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FC", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.FC == nil {
+ m.FC = &FCVolumeSource{}
+ }
+ if err := m.FC.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 11:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Flocker", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Flocker == nil {
+ m.Flocker = &FlockerVolumeSource{}
+ }
+ if err := m.Flocker.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 12:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FlexVolume", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.FlexVolume == nil {
+ m.FlexVolume = &FlexVolumeSource{}
+ }
+ if err := m.FlexVolume.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 13:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AzureFile", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.AzureFile == nil {
+ m.AzureFile = &AzureFileVolumeSource{}
+ }
+ if err := m.AzureFile.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 14:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VsphereVolume", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.VsphereVolume == nil {
+ m.VsphereVolume = &VsphereVirtualDiskVolumeSource{}
+ }
+ if err := m.VsphereVolume.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 15:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Quobyte", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Quobyte == nil {
+ m.Quobyte = &QuobyteVolumeSource{}
+ }
+ if err := m.Quobyte.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 16:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AzureDisk", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.AzureDisk == nil {
+ m.AzureDisk = &AzureDiskVolumeSource{}
+ }
+ if err := m.AzureDisk.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 17:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PhotonPersistentDisk", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PhotonPersistentDisk == nil {
+ m.PhotonPersistentDisk = &PhotonPersistentDiskVolumeSource{}
+ }
+ if err := m.PhotonPersistentDisk.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 18:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PortworxVolume", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PortworxVolume == nil {
+ m.PortworxVolume = &PortworxVolumeSource{}
+ }
+ if err := m.PortworxVolume.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 19:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ScaleIO", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ScaleIO == nil {
+ m.ScaleIO = &ScaleIOVolumeSource{}
+ }
+ if err := m.ScaleIO.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 20:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Local", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Local == nil {
+ m.Local = &LocalVolumeSource{}
+ }
+ if err := m.Local.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 21:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StorageOS", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.StorageOS == nil {
+ m.StorageOS = &StorageOSPersistentVolumeSource{}
+ }
+ if err := m.StorageOS.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PersistentVolumeSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PersistentVolumeSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PersistentVolumeSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Capacity == nil {
+ m.Capacity = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Capacity[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.Capacity[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PersistentVolumeSource", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.PersistentVolumeSource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AccessModes", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.AccessModes = append(m.AccessModes, PersistentVolumeAccessMode(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ClaimRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ClaimRef == nil {
+ m.ClaimRef = &ObjectReference{}
+ }
+ if err := m.ClaimRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PersistentVolumeReclaimPolicy", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PersistentVolumeReclaimPolicy = PersistentVolumeReclaimPolicy(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StorageClassName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.StorageClassName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PersistentVolumeStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PersistentVolumeStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PersistentVolumeStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Phase", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Phase = PersistentVolumePhase(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PhotonPersistentDiskVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PhotonPersistentDiskVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PhotonPersistentDiskVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PdID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PdID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FSType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Pod) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Pod: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Pod: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodAffinity) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodAffinity: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodAffinity: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RequiredDuringSchedulingIgnoredDuringExecution", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.RequiredDuringSchedulingIgnoredDuringExecution = append(m.RequiredDuringSchedulingIgnoredDuringExecution, PodAffinityTerm{})
+ if err := m.RequiredDuringSchedulingIgnoredDuringExecution[len(m.RequiredDuringSchedulingIgnoredDuringExecution)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PreferredDuringSchedulingIgnoredDuringExecution", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PreferredDuringSchedulingIgnoredDuringExecution = append(m.PreferredDuringSchedulingIgnoredDuringExecution, WeightedPodAffinityTerm{})
+ if err := m.PreferredDuringSchedulingIgnoredDuringExecution[len(m.PreferredDuringSchedulingIgnoredDuringExecution)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodAffinityTerm) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodAffinityTerm: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodAffinityTerm: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.LabelSelector == nil {
+ m.LabelSelector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
+ }
+ if err := m.LabelSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Namespaces", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Namespaces = append(m.Namespaces, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TopologyKey", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.TopologyKey = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodAntiAffinity) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodAntiAffinity: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodAntiAffinity: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RequiredDuringSchedulingIgnoredDuringExecution", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.RequiredDuringSchedulingIgnoredDuringExecution = append(m.RequiredDuringSchedulingIgnoredDuringExecution, PodAffinityTerm{})
+ if err := m.RequiredDuringSchedulingIgnoredDuringExecution[len(m.RequiredDuringSchedulingIgnoredDuringExecution)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PreferredDuringSchedulingIgnoredDuringExecution", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PreferredDuringSchedulingIgnoredDuringExecution = append(m.PreferredDuringSchedulingIgnoredDuringExecution, WeightedPodAffinityTerm{})
+ if err := m.PreferredDuringSchedulingIgnoredDuringExecution[len(m.PreferredDuringSchedulingIgnoredDuringExecution)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodAttachOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodAttachOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodAttachOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Stdin = bool(v != 0)
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Stdout", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Stdout = bool(v != 0)
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Stderr", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Stderr = bool(v != 0)
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TTY", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.TTY = bool(v != 0)
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Container = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodCondition) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodCondition: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodCondition: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = PodConditionType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Status = ConditionStatus(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastProbeTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastProbeTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodExecOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodExecOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodExecOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Stdin = bool(v != 0)
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Stdout", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Stdout = bool(v != 0)
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Stderr", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Stderr = bool(v != 0)
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TTY", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.TTY = bool(v != 0)
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Container = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Command = append(m.Command, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, Pod{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodLogOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodLogOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodLogOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Container = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Follow", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Follow = bool(v != 0)
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Previous", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Previous = bool(v != 0)
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SinceSeconds", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.SinceSeconds = &v
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SinceTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SinceTime == nil {
+ m.SinceTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{}
+ }
+ if err := m.SinceTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Timestamps", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Timestamps = bool(v != 0)
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TailLines", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.TailLines = &v
+ case 8:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LimitBytes", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.LimitBytes = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodPortForwardOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodPortForwardOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodPortForwardOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType == 0 {
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Ports = append(m.Ports, v)
+ } else if wireType == 2 {
+ var packedLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ packedLen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if packedLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + packedLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ for iNdEx < postIndex {
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Ports = append(m.Ports, v)
+ }
+ } else {
+ return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType)
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodProxyOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodProxyOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodProxyOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodSecurityContext) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodSecurityContext: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodSecurityContext: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SELinuxOptions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SELinuxOptions == nil {
+ m.SELinuxOptions = &SELinuxOptions{}
+ }
+ if err := m.SELinuxOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RunAsUser", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.RunAsUser = &v
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RunAsNonRoot", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.RunAsNonRoot = &b
+ case 4:
+ if wireType == 0 {
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.SupplementalGroups = append(m.SupplementalGroups, v)
+ } else if wireType == 2 {
+ var packedLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ packedLen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if packedLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + packedLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ for iNdEx < postIndex {
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.SupplementalGroups = append(m.SupplementalGroups, v)
+ }
+ } else {
+ return fmt.Errorf("proto: wrong wireType = %d for field SupplementalGroups", wireType)
+ }
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSGroup", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.FSGroup = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodSignature) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodSignature: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodSignature: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodController", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PodController == nil {
+ m.PodController = &k8s_io_apimachinery_pkg_apis_meta_v1.OwnerReference{}
+ }
+ if err := m.PodController.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Volumes = append(m.Volumes, Volume{})
+ if err := m.Volumes[len(m.Volumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Containers", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Containers = append(m.Containers, Container{})
+ if err := m.Containers[len(m.Containers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RestartPolicy", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.RestartPolicy = RestartPolicy(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TerminationGracePeriodSeconds", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.TerminationGracePeriodSeconds = &v
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ActiveDeadlineSeconds", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ActiveDeadlineSeconds = &v
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DNSPolicy", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.DNSPolicy = DNSPolicy(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NodeSelector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.NodeSelector == nil {
+ m.NodeSelector = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.NodeSelector[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.NodeSelector[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ServiceAccountName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ServiceAccountName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedServiceAccount", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.DeprecatedServiceAccount = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.NodeName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 11:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostNetwork", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.HostNetwork = bool(v != 0)
+ case 12:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostPID", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.HostPID = bool(v != 0)
+ case 13:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostIPC", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.HostIPC = bool(v != 0)
+ case 14:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecurityContext", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SecurityContext == nil {
+ m.SecurityContext = &PodSecurityContext{}
+ }
+ if err := m.SecurityContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 15:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ImagePullSecrets", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ImagePullSecrets = append(m.ImagePullSecrets, LocalObjectReference{})
+ if err := m.ImagePullSecrets[len(m.ImagePullSecrets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 16:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Hostname = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 17:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Subdomain", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Subdomain = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 18:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Affinity", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Affinity == nil {
+ m.Affinity = &Affinity{}
+ }
+ if err := m.Affinity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 19:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SchedulerName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SchedulerName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 20:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field InitContainers", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.InitContainers = append(m.InitContainers, Container{})
+ if err := m.InitContainers[len(m.InitContainers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 21:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AutomountServiceAccountToken", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.AutomountServiceAccountToken = &b
+ case 22:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Tolerations", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Tolerations = append(m.Tolerations, Toleration{})
+ if err := m.Tolerations[len(m.Tolerations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 23:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostAliases", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.HostAliases = append(m.HostAliases, HostAlias{})
+ if err := m.HostAliases[len(m.HostAliases)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Phase", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Phase = PodPhase(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Conditions = append(m.Conditions, PodCondition{})
+ if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostIP", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.HostIP = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodIP", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PodIP = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.StartTime == nil {
+ m.StartTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{}
+ }
+ if err := m.StartTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ContainerStatuses", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ContainerStatuses = append(m.ContainerStatuses, ContainerStatus{})
+ if err := m.ContainerStatuses[len(m.ContainerStatuses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field QOSClass", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.QOSClass = PodQOSClass(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field InitContainerStatuses", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.InitContainerStatuses = append(m.InitContainerStatuses, ContainerStatus{})
+ if err := m.InitContainerStatuses[len(m.InitContainerStatuses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodStatusResult) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodStatusResult: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodStatusResult: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodTemplate) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodTemplate: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodTemplate: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodTemplateList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodTemplateList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodTemplateList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, PodTemplate{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodTemplateSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodTemplateSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodTemplateSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PortworxVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PortworxVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PortworxVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumeID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FSType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Preconditions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Preconditions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Preconditions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex])
+ m.UID = &s
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PreferAvoidPodsEntry) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PreferAvoidPodsEntry: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PreferAvoidPodsEntry: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodSignature", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.PodSignature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field EvictionTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.EvictionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PreferredSchedulingTerm) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PreferredSchedulingTerm: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PreferredSchedulingTerm: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType)
+ }
+ m.Weight = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Weight |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Preference", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Preference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Probe) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Probe: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Probe: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Handler", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Handler.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field InitialDelaySeconds", wireType)
+ }
+ m.InitialDelaySeconds = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.InitialDelaySeconds |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TimeoutSeconds", wireType)
+ }
+ m.TimeoutSeconds = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.TimeoutSeconds |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PeriodSeconds", wireType)
+ }
+ m.PeriodSeconds = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.PeriodSeconds |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SuccessThreshold", wireType)
+ }
+ m.SuccessThreshold = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.SuccessThreshold |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FailureThreshold", wireType)
+ }
+ m.FailureThreshold = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.FailureThreshold |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ProjectedVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ProjectedVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ProjectedVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Sources", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Sources = append(m.Sources, VolumeProjection{})
+ if err := m.Sources[len(m.Sources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DefaultMode", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.DefaultMode = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *QuobyteVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: QuobyteVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: QuobyteVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Registry", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Registry = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Volume", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Volume = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.User = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Group = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RBDVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RBDVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RBDVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CephMonitors", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.CephMonitors = append(m.CephMonitors, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RBDImage", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.RBDImage = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FSType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RBDPool", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.RBDPool = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RadosUser", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.RadosUser = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Keyring", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Keyring = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecretRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SecretRef == nil {
+ m.SecretRef = &LocalObjectReference{}
+ }
+ if err := m.SecretRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RangeAllocation) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RangeAllocation: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RangeAllocation: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Range", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Range = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
+ }
+ var byteLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ byteLen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if byteLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + byteLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
+ if m.Data == nil {
+ m.Data = []byte{}
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReplicationController) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReplicationController: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReplicationController: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReplicationControllerCondition) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReplicationControllerCondition: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReplicationControllerCondition: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = ReplicationControllerConditionType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Status = ConditionStatus(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReplicationControllerList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReplicationControllerList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReplicationControllerList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ReplicationController{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReplicationControllerSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReplicationControllerSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReplicationControllerSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Replicas = &v
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Selector == nil {
+ m.Selector = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Selector[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Selector[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Template == nil {
+ m.Template = &PodTemplateSpec{}
+ }
+ if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MinReadySeconds", wireType)
+ }
+ m.MinReadySeconds = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.MinReadySeconds |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReplicationControllerStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReplicationControllerStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReplicationControllerStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ m.Replicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Replicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FullyLabeledReplicas", wireType)
+ }
+ m.FullyLabeledReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.FullyLabeledReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
+ }
+ m.ObservedGeneration = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ObservedGeneration |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadyReplicas", wireType)
+ }
+ m.ReadyReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ReadyReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AvailableReplicas", wireType)
+ }
+ m.AvailableReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.AvailableReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Conditions = append(m.Conditions, ReplicationControllerCondition{})
+ if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceFieldSelector) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceFieldSelector: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceFieldSelector: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ContainerName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ContainerName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Resource = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Divisor", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Divisor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceQuota) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceQuota: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceQuota: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceQuotaList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceQuotaList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceQuotaList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ResourceQuota{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceQuotaSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceQuotaSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceQuotaSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Hard", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Hard == nil {
+ m.Hard = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Hard[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.Hard[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Scopes = append(m.Scopes, ResourceQuotaScope(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceQuotaStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceQuotaStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceQuotaStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Hard", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Hard == nil {
+ m.Hard = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Hard[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.Hard[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Used", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Used == nil {
+ m.Used = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Used[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.Used[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceRequirements) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceRequirements: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceRequirements: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Limits", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Limits == nil {
+ m.Limits = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Limits[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.Limits[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Requests == nil {
+ m.Requests = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Requests[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.Requests[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SELinuxOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SELinuxOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SELinuxOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.User = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Role = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Level = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ScaleIOVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ScaleIOVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ScaleIOVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Gateway", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Gateway = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field System", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.System = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecretRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SecretRef == nil {
+ m.SecretRef = &LocalObjectReference{}
+ }
+ if err := m.SecretRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SSLEnabled", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.SSLEnabled = bool(v != 0)
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ProtectionDomain", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ProtectionDomain = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StoragePool", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.StoragePool = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StorageMode", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.StorageMode = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumeName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FSType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 10:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Secret) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Secret: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Secret: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Data == nil {
+ m.Data = make(map[string][]byte)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapbyteLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapbyteLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intMapbyteLen := int(mapbyteLen)
+ if intMapbyteLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postbytesIndex := iNdEx + intMapbyteLen
+ if postbytesIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := make([]byte, mapbyteLen)
+ copy(mapvalue, dAtA[iNdEx:postbytesIndex])
+ iNdEx = postbytesIndex
+ m.Data[mapkey] = mapvalue
+ } else {
+ var mapvalue []byte
+ m.Data[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = SecretType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StringData", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.StringData == nil {
+ m.StringData = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.StringData[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.StringData[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SecretEnvSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SecretEnvSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SecretEnvSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LocalObjectReference", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LocalObjectReference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Optional = &b
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SecretKeySelector) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SecretKeySelector: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SecretKeySelector: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LocalObjectReference", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LocalObjectReference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Key = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Optional = &b
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SecretList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SecretList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SecretList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, Secret{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SecretProjection) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SecretProjection: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SecretProjection: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LocalObjectReference", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LocalObjectReference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, KeyToPath{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Optional = &b
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SecretVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SecretVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SecretVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecretName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SecretName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, KeyToPath{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DefaultMode", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.DefaultMode = &v
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Optional = &b
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SecurityContext) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SecurityContext: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SecurityContext: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Capabilities", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Capabilities == nil {
+ m.Capabilities = &Capabilities{}
+ }
+ if err := m.Capabilities.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Privileged", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Privileged = &b
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SELinuxOptions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SELinuxOptions == nil {
+ m.SELinuxOptions = &SELinuxOptions{}
+ }
+ if err := m.SELinuxOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RunAsUser", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.RunAsUser = &v
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RunAsNonRoot", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.RunAsNonRoot = &b
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnlyRootFilesystem", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.ReadOnlyRootFilesystem = &b
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SerializedReference) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SerializedReference: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SerializedReference: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reference", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Reference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Service) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Service: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Service: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ServiceAccount) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ServiceAccount: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ServiceAccount: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Secrets", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Secrets = append(m.Secrets, ObjectReference{})
+ if err := m.Secrets[len(m.Secrets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ImagePullSecrets", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ImagePullSecrets = append(m.ImagePullSecrets, LocalObjectReference{})
+ if err := m.ImagePullSecrets[len(m.ImagePullSecrets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AutomountServiceAccountToken", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.AutomountServiceAccountToken = &b
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ServiceAccountList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ServiceAccountList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ServiceAccountList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ServiceAccount{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ServiceList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ServiceList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ServiceList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, Service{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ServicePort) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ServicePort: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ServicePort: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Protocol = Protocol(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
+ }
+ m.Port = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Port |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetPort", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.TargetPort.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NodePort", wireType)
+ }
+ m.NodePort = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.NodePort |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ServiceProxyOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ServiceProxyOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ServiceProxyOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ServiceSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ServiceSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ServiceSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Ports = append(m.Ports, ServicePort{})
+ if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Selector == nil {
+ m.Selector = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Selector[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Selector[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ClusterIP", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ClusterIP = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = ServiceType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ExternalIPs", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ExternalIPs = append(m.ExternalIPs, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SessionAffinity", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SessionAffinity = ServiceAffinity(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LoadBalancerIP", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.LoadBalancerIP = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LoadBalancerSourceRanges", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.LoadBalancerSourceRanges = append(m.LoadBalancerSourceRanges, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ExternalName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ExternalName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 11:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ExternalTrafficPolicy", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ExternalTrafficPolicy = ServiceExternalTrafficPolicyType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 12:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HealthCheckNodePort", wireType)
+ }
+ m.HealthCheckNodePort = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.HealthCheckNodePort |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ServiceStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ServiceStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ServiceStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LoadBalancer", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LoadBalancer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StorageOSPersistentVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StorageOSPersistentVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StorageOSPersistentVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumeName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeNamespace", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumeNamespace = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FSType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecretRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SecretRef == nil {
+ m.SecretRef = &ObjectReference{}
+ }
+ if err := m.SecretRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StorageOSVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StorageOSVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StorageOSVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumeName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeNamespace", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumeNamespace = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FSType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecretRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SecretRef == nil {
+ m.SecretRef = &LocalObjectReference{}
+ }
+ if err := m.SecretRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Sysctl) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Sysctl: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Sysctl: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Value = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *TCPSocketAction) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: TCPSocketAction: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: TCPSocketAction: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Port.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Host = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Taint) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Taint: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Taint: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Key = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Value = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Effect", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Effect = TaintEffect(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TimeAdded", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.TimeAdded.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Toleration) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Toleration: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Toleration: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Key = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Operator = TolerationOperator(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Value = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Effect", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Effect = TaintEffect(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TolerationSeconds", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.TolerationSeconds = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Volume) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Volume: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Volume: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeSource", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.VolumeSource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *VolumeMount) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: VolumeMount: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: VolumeMount: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MountPath", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MountPath = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SubPath", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SubPath = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *VolumeProjection) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: VolumeProjection: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: VolumeProjection: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Secret == nil {
+ m.Secret = &SecretProjection{}
+ }
+ if err := m.Secret.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DownwardAPI", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.DownwardAPI == nil {
+ m.DownwardAPI = &DownwardAPIProjection{}
+ }
+ if err := m.DownwardAPI.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ConfigMap", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ConfigMap == nil {
+ m.ConfigMap = &ConfigMapProjection{}
+ }
+ if err := m.ConfigMap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *VolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: VolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: VolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostPath", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.HostPath == nil {
+ m.HostPath = &HostPathVolumeSource{}
+ }
+ if err := m.HostPath.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field EmptyDir", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.EmptyDir == nil {
+ m.EmptyDir = &EmptyDirVolumeSource{}
+ }
+ if err := m.EmptyDir.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field GCEPersistentDisk", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.GCEPersistentDisk == nil {
+ m.GCEPersistentDisk = &GCEPersistentDiskVolumeSource{}
+ }
+ if err := m.GCEPersistentDisk.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AWSElasticBlockStore", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.AWSElasticBlockStore == nil {
+ m.AWSElasticBlockStore = &AWSElasticBlockStoreVolumeSource{}
+ }
+ if err := m.AWSElasticBlockStore.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field GitRepo", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.GitRepo == nil {
+ m.GitRepo = &GitRepoVolumeSource{}
+ }
+ if err := m.GitRepo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Secret == nil {
+ m.Secret = &SecretVolumeSource{}
+ }
+ if err := m.Secret.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NFS", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.NFS == nil {
+ m.NFS = &NFSVolumeSource{}
+ }
+ if err := m.NFS.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ISCSI", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ISCSI == nil {
+ m.ISCSI = &ISCSIVolumeSource{}
+ }
+ if err := m.ISCSI.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Glusterfs", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Glusterfs == nil {
+ m.Glusterfs = &GlusterfsVolumeSource{}
+ }
+ if err := m.Glusterfs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PersistentVolumeClaim", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PersistentVolumeClaim == nil {
+ m.PersistentVolumeClaim = &PersistentVolumeClaimVolumeSource{}
+ }
+ if err := m.PersistentVolumeClaim.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 11:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RBD", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.RBD == nil {
+ m.RBD = &RBDVolumeSource{}
+ }
+ if err := m.RBD.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 12:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FlexVolume", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.FlexVolume == nil {
+ m.FlexVolume = &FlexVolumeSource{}
+ }
+ if err := m.FlexVolume.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 13:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Cinder", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Cinder == nil {
+ m.Cinder = &CinderVolumeSource{}
+ }
+ if err := m.Cinder.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 14:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CephFS", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.CephFS == nil {
+ m.CephFS = &CephFSVolumeSource{}
+ }
+ if err := m.CephFS.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 15:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Flocker", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Flocker == nil {
+ m.Flocker = &FlockerVolumeSource{}
+ }
+ if err := m.Flocker.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 16:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DownwardAPI", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.DownwardAPI == nil {
+ m.DownwardAPI = &DownwardAPIVolumeSource{}
+ }
+ if err := m.DownwardAPI.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 17:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FC", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.FC == nil {
+ m.FC = &FCVolumeSource{}
+ }
+ if err := m.FC.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 18:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AzureFile", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.AzureFile == nil {
+ m.AzureFile = &AzureFileVolumeSource{}
+ }
+ if err := m.AzureFile.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 19:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ConfigMap", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ConfigMap == nil {
+ m.ConfigMap = &ConfigMapVolumeSource{}
+ }
+ if err := m.ConfigMap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 20:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VsphereVolume", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.VsphereVolume == nil {
+ m.VsphereVolume = &VsphereVirtualDiskVolumeSource{}
+ }
+ if err := m.VsphereVolume.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 21:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Quobyte", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Quobyte == nil {
+ m.Quobyte = &QuobyteVolumeSource{}
+ }
+ if err := m.Quobyte.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 22:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AzureDisk", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.AzureDisk == nil {
+ m.AzureDisk = &AzureDiskVolumeSource{}
+ }
+ if err := m.AzureDisk.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 23:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PhotonPersistentDisk", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PhotonPersistentDisk == nil {
+ m.PhotonPersistentDisk = &PhotonPersistentDiskVolumeSource{}
+ }
+ if err := m.PhotonPersistentDisk.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 24:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PortworxVolume", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PortworxVolume == nil {
+ m.PortworxVolume = &PortworxVolumeSource{}
+ }
+ if err := m.PortworxVolume.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 25:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ScaleIO", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ScaleIO == nil {
+ m.ScaleIO = &ScaleIOVolumeSource{}
+ }
+ if err := m.ScaleIO.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 26:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Projected", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Projected == nil {
+ m.Projected = &ProjectedVolumeSource{}
+ }
+ if err := m.Projected.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 27:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StorageOS", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.StorageOS == nil {
+ m.StorageOS = &StorageOSVolumeSource{}
+ }
+ if err := m.StorageOS.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *VsphereVirtualDiskVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: VsphereVirtualDiskVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: VsphereVirtualDiskVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumePath", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumePath = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FSType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StoragePolicyName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.StoragePolicyName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StoragePolicyID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.StoragePolicyID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *WeightedPodAffinityTerm) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: WeightedPodAffinityTerm: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: WeightedPodAffinityTerm: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType)
+ }
+ m.Weight = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Weight |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodAffinityTerm", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.PodAffinityTerm.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/client-go/pkg/api/v1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 11429 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x6d, 0x8c, 0x24, 0xc7,
+ 0x75, 0x98, 0x7a, 0x66, 0xf6, 0x63, 0xde, 0x7e, 0xd7, 0xed, 0x1d, 0x97, 0x2b, 0xf2, 0xf6, 0xd8,
+ 0x14, 0xe9, 0x23, 0x79, 0xdc, 0xd3, 0x1d, 0x49, 0x91, 0x12, 0x65, 0x5a, 0xbb, 0x3b, 0xbb, 0x77,
+ 0xeb, 0xfb, 0x1a, 0xd6, 0xec, 0xdd, 0x51, 0x14, 0x43, 0xb2, 0x6f, 0xba, 0x76, 0xb7, 0x79, 0xb3,
+ 0xdd, 0xc3, 0xee, 0x9e, 0xbd, 0x5b, 0x1a, 0x06, 0x6c, 0x45, 0xb0, 0x14, 0x40, 0x49, 0x64, 0x38,
+ 0x02, 0x02, 0x27, 0x80, 0x02, 0x03, 0x71, 0x94, 0x6f, 0x2b, 0x82, 0x3e, 0x0c, 0xcb, 0x09, 0xe2,
+ 0x48, 0x8e, 0x1c, 0x24, 0x8e, 0x00, 0x23, 0xb1, 0x02, 0xc3, 0x6b, 0x6b, 0x85, 0xf8, 0x4f, 0x80,
+ 0xfc, 0x48, 0xfe, 0x6d, 0x3e, 0x10, 0xd4, 0x67, 0x57, 0xf5, 0xf4, 0x6c, 0xf7, 0x2c, 0x6f, 0xd7,
+ 0x94, 0x90, 0x7f, 0x33, 0xf5, 0x5e, 0xbd, 0xaa, 0xae, 0x8f, 0x57, 0xef, 0xbd, 0x7a, 0xef, 0x15,
+ 0x9c, 0xbb, 0xfb, 0x52, 0x34, 0xef, 0x05, 0xe7, 0xef, 0x76, 0xee, 0x90, 0xd0, 0x27, 0x31, 0x89,
+ 0xce, 0xb7, 0xef, 0x6e, 0x9c, 0x77, 0xda, 0xde, 0xf9, 0xed, 0x0b, 0xe7, 0x37, 0x88, 0x4f, 0x42,
+ 0x27, 0x26, 0xee, 0x7c, 0x3b, 0x0c, 0xe2, 0x00, 0x3d, 0xc2, 0xb1, 0xe7, 0x13, 0xec, 0xf9, 0xf6,
+ 0xdd, 0x8d, 0x79, 0xa7, 0xed, 0xcd, 0x6f, 0x5f, 0x98, 0x7d, 0x76, 0xc3, 0x8b, 0x37, 0x3b, 0x77,
+ 0xe6, 0x9b, 0xc1, 0xd6, 0xf9, 0x8d, 0x60, 0x23, 0x38, 0xcf, 0x2a, 0xdd, 0xe9, 0xac, 0xb3, 0x7f,
+ 0xec, 0x0f, 0xfb, 0xc5, 0x89, 0xcd, 0x3e, 0x2f, 0x9a, 0x76, 0xda, 0xde, 0x96, 0xd3, 0xdc, 0xf4,
+ 0x7c, 0x12, 0xee, 0xa8, 0xc6, 0x43, 0x12, 0x05, 0x9d, 0xb0, 0x49, 0xd2, 0x5d, 0x38, 0xb0, 0x56,
+ 0x74, 0x7e, 0x8b, 0xc4, 0x4e, 0x46, 0xc7, 0x67, 0xcf, 0xf7, 0xaa, 0x15, 0x76, 0xfc, 0xd8, 0xdb,
+ 0xea, 0x6e, 0xe6, 0x63, 0x79, 0x15, 0xa2, 0xe6, 0x26, 0xd9, 0x72, 0xba, 0xea, 0x3d, 0xd7, 0xab,
+ 0x5e, 0x27, 0xf6, 0x5a, 0xe7, 0x3d, 0x3f, 0x8e, 0xe2, 0x30, 0x5d, 0xc9, 0xfe, 0x63, 0x0b, 0xce,
+ 0x2c, 0xdc, 0x6e, 0x2c, 0xb7, 0x9c, 0x28, 0xf6, 0x9a, 0x8b, 0xad, 0xa0, 0x79, 0xb7, 0x11, 0x07,
+ 0x21, 0xb9, 0x15, 0xb4, 0x3a, 0x5b, 0xa4, 0xc1, 0x06, 0x02, 0x9d, 0x83, 0xe1, 0x6d, 0xf6, 0x7f,
+ 0xb5, 0x36, 0x63, 0x9d, 0xb1, 0xce, 0x56, 0x17, 0x27, 0xbf, 0xbf, 0x3b, 0xf7, 0xa1, 0xbd, 0xdd,
+ 0xb9, 0xe1, 0x5b, 0xa2, 0x1c, 0x2b, 0x0c, 0xf4, 0x24, 0x0c, 0xae, 0x47, 0x6b, 0x3b, 0x6d, 0x32,
+ 0x53, 0x62, 0xb8, 0xe3, 0x02, 0x77, 0x70, 0xa5, 0x41, 0x4b, 0xb1, 0x80, 0xa2, 0xf3, 0x50, 0x6d,
+ 0x3b, 0x61, 0xec, 0xc5, 0x5e, 0xe0, 0xcf, 0x94, 0xcf, 0x58, 0x67, 0x07, 0x16, 0xa7, 0x04, 0x6a,
+ 0xb5, 0x2e, 0x01, 0x38, 0xc1, 0xa1, 0xdd, 0x08, 0x89, 0xe3, 0xde, 0xf0, 0x5b, 0x3b, 0x33, 0x95,
+ 0x33, 0xd6, 0xd9, 0xe1, 0xa4, 0x1b, 0x58, 0x94, 0x63, 0x85, 0x61, 0x7f, 0xbb, 0x04, 0xc3, 0x0b,
+ 0xeb, 0xeb, 0x9e, 0xef, 0xc5, 0x3b, 0xe8, 0x6d, 0x18, 0xf5, 0x03, 0x97, 0xc8, 0xff, 0xec, 0x2b,
+ 0x46, 0x2e, 0x3e, 0x3d, 0x7f, 0xd0, 0xa2, 0x9a, 0xbf, 0xae, 0xd5, 0x58, 0x9c, 0xdc, 0xdb, 0x9d,
+ 0x1b, 0xd5, 0x4b, 0xb0, 0x41, 0x11, 0xbd, 0x01, 0x23, 0xed, 0xc0, 0x55, 0x0d, 0x94, 0x58, 0x03,
+ 0x4f, 0x1d, 0xdc, 0x40, 0x3d, 0xa9, 0xb0, 0x38, 0xb1, 0xb7, 0x3b, 0x37, 0xa2, 0x15, 0x60, 0x9d,
+ 0x1c, 0x6a, 0xc1, 0x04, 0xfd, 0xeb, 0xc7, 0x9e, 0x6a, 0xa1, 0xcc, 0x5a, 0x78, 0x36, 0xbf, 0x05,
+ 0xad, 0xd2, 0xe2, 0x89, 0xbd, 0xdd, 0xb9, 0x89, 0x54, 0x21, 0x4e, 0x93, 0xb6, 0xdf, 0x83, 0xf1,
+ 0x85, 0x38, 0x76, 0x9a, 0x9b, 0xc4, 0xe5, 0xf3, 0x8b, 0x9e, 0x87, 0x8a, 0xef, 0x6c, 0x11, 0x31,
+ 0xfb, 0x67, 0xc4, 0xb0, 0x57, 0xae, 0x3b, 0x5b, 0x64, 0x7f, 0x77, 0x6e, 0xf2, 0xa6, 0xef, 0xbd,
+ 0xdb, 0x11, 0x6b, 0x86, 0x96, 0x61, 0x86, 0x8d, 0x2e, 0x02, 0xb8, 0x64, 0xdb, 0x6b, 0x92, 0xba,
+ 0x13, 0x6f, 0x8a, 0xd5, 0x80, 0x44, 0x5d, 0xa8, 0x29, 0x08, 0xd6, 0xb0, 0xec, 0xcf, 0x5a, 0x50,
+ 0x5d, 0xd8, 0x0e, 0x3c, 0xb7, 0x1e, 0xb8, 0x11, 0xea, 0xc0, 0x44, 0x3b, 0x24, 0xeb, 0x24, 0x54,
+ 0x45, 0x33, 0xd6, 0x99, 0xf2, 0xd9, 0x91, 0x8b, 0x17, 0x73, 0xbe, 0xdb, 0xac, 0xb4, 0xec, 0xc7,
+ 0xe1, 0xce, 0xe2, 0x43, 0xa2, 0xe9, 0x89, 0x14, 0x14, 0xa7, 0xdb, 0xb0, 0xbf, 0x5b, 0x82, 0x93,
+ 0x0b, 0xef, 0x75, 0x42, 0x52, 0xf3, 0xa2, 0xbb, 0xe9, 0xad, 0xe0, 0x7a, 0xd1, 0xdd, 0xeb, 0xc9,
+ 0x60, 0xa8, 0x35, 0x58, 0x13, 0xe5, 0x58, 0x61, 0xa0, 0x67, 0x61, 0x88, 0xfe, 0xbe, 0x89, 0x57,
+ 0xc5, 0xd7, 0x9f, 0x10, 0xc8, 0x23, 0x35, 0x27, 0x76, 0x6a, 0x1c, 0x84, 0x25, 0x0e, 0xba, 0x06,
+ 0x23, 0x4d, 0xb6, 0x73, 0x37, 0xae, 0x05, 0x2e, 0x61, 0x33, 0x5c, 0x5d, 0x7c, 0x86, 0xa2, 0x2f,
+ 0x25, 0xc5, 0xfb, 0xbb, 0x73, 0x33, 0xbc, 0x6f, 0x82, 0x84, 0x06, 0xc3, 0x7a, 0x7d, 0x64, 0xab,
+ 0x8d, 0x58, 0x61, 0x94, 0x20, 0x63, 0x13, 0x9e, 0xd5, 0xf6, 0xd4, 0x00, 0xdb, 0x53, 0xa3, 0xd9,
+ 0xfb, 0x09, 0x5d, 0x80, 0xca, 0x5d, 0xcf, 0x77, 0x67, 0x06, 0x19, 0xad, 0x47, 0xe9, 0xf4, 0x5f,
+ 0xf1, 0x7c, 0x77, 0x7f, 0x77, 0x6e, 0xca, 0xe8, 0x0e, 0x2d, 0xc4, 0x0c, 0xd5, 0xfe, 0x47, 0x96,
+ 0x18, 0xc6, 0x15, 0xaf, 0x65, 0x72, 0x94, 0x8b, 0x00, 0x11, 0x69, 0x86, 0x24, 0xd6, 0x06, 0x52,
+ 0xad, 0x8c, 0x86, 0x82, 0x60, 0x0d, 0x8b, 0xf2, 0x8b, 0x68, 0xd3, 0x09, 0xd9, 0x02, 0x13, 0xc3,
+ 0xa9, 0xf8, 0x45, 0x43, 0x02, 0x70, 0x82, 0x63, 0xf0, 0x8b, 0x72, 0x2e, 0xbf, 0xf8, 0x3d, 0x0b,
+ 0x86, 0x16, 0x3d, 0xdf, 0xf5, 0xfc, 0x0d, 0xf4, 0x36, 0x0c, 0x53, 0x76, 0xee, 0x3a, 0xb1, 0x23,
+ 0x58, 0xc5, 0x47, 0xe5, 0x7a, 0xd3, 0xb9, 0xab, 0x5c, 0x71, 0xd1, 0x3c, 0xc5, 0xa6, 0xeb, 0xee,
+ 0xc6, 0x9d, 0x77, 0x48, 0x33, 0xbe, 0x46, 0x62, 0x27, 0xf9, 0x9c, 0xa4, 0x0c, 0x2b, 0xaa, 0xe8,
+ 0x26, 0x0c, 0xc6, 0x4e, 0xb8, 0x41, 0x62, 0xc1, 0x29, 0x72, 0xf6, 0x31, 0xa7, 0x81, 0xe9, 0x2a,
+ 0x25, 0x7e, 0x93, 0x24, 0x3c, 0x75, 0x8d, 0x11, 0xc1, 0x82, 0x98, 0xdd, 0x84, 0xd1, 0x25, 0xa7,
+ 0xed, 0xdc, 0xf1, 0x5a, 0x5e, 0xec, 0x91, 0x08, 0xfd, 0x0c, 0x94, 0x1d, 0xd7, 0x65, 0x7b, 0xa6,
+ 0xba, 0x78, 0x72, 0x6f, 0x77, 0xae, 0xbc, 0xe0, 0xd2, 0x29, 0x03, 0x85, 0xb5, 0x83, 0x29, 0x06,
+ 0x7a, 0x1a, 0x2a, 0x6e, 0x18, 0xb4, 0x67, 0x4a, 0x0c, 0xf3, 0x14, 0x9d, 0xdd, 0x5a, 0x18, 0xb4,
+ 0x53, 0xa8, 0x0c, 0xc7, 0xfe, 0x5e, 0x09, 0xd0, 0x12, 0x69, 0x6f, 0xae, 0x34, 0x8c, 0x39, 0x3d,
+ 0x0b, 0xc3, 0x5b, 0x81, 0xef, 0xc5, 0x41, 0x18, 0x89, 0x06, 0xd9, 0x52, 0xba, 0x26, 0xca, 0xb0,
+ 0x82, 0xa2, 0x33, 0x50, 0x69, 0x27, 0x1c, 0x61, 0x54, 0x72, 0x13, 0xc6, 0x0b, 0x18, 0x84, 0x62,
+ 0x74, 0x22, 0x12, 0x8a, 0x2d, 0xa0, 0x30, 0x6e, 0x46, 0x24, 0xc4, 0x0c, 0x92, 0xac, 0x20, 0xba,
+ 0xb6, 0xc4, 0x02, 0x4f, 0xad, 0x20, 0x0a, 0xc1, 0x1a, 0x16, 0x7a, 0x0b, 0xaa, 0xfc, 0x1f, 0x26,
+ 0xeb, 0x6c, 0xb5, 0xe7, 0xf2, 0x91, 0xab, 0x41, 0xd3, 0x69, 0xa5, 0x07, 0x7f, 0x8c, 0xad, 0x38,
+ 0x49, 0x08, 0x27, 0x34, 0x8d, 0x15, 0x37, 0x98, 0xbb, 0xe2, 0xfe, 0xb6, 0x05, 0x68, 0xc9, 0xf3,
+ 0x5d, 0x12, 0x1e, 0xc3, 0x69, 0xdb, 0xdf, 0x66, 0xf8, 0x13, 0xda, 0xb5, 0x60, 0xab, 0x1d, 0xf8,
+ 0xc4, 0x8f, 0x97, 0x02, 0xdf, 0xe5, 0x27, 0xf0, 0x27, 0xa0, 0x12, 0xd3, 0xa6, 0x78, 0xb7, 0x9e,
+ 0x94, 0xd3, 0x42, 0x1b, 0xd8, 0xdf, 0x9d, 0x3b, 0xd5, 0x5d, 0x83, 0x75, 0x81, 0xd5, 0x41, 0x1f,
+ 0x87, 0xc1, 0x28, 0x76, 0xe2, 0x4e, 0x24, 0x3a, 0xfa, 0x98, 0xec, 0x68, 0x83, 0x95, 0xee, 0xef,
+ 0xce, 0x4d, 0xa8, 0x6a, 0xbc, 0x08, 0x8b, 0x0a, 0xe8, 0x29, 0x18, 0xda, 0x22, 0x51, 0xe4, 0x6c,
+ 0x48, 0x9e, 0x38, 0x21, 0xea, 0x0e, 0x5d, 0xe3, 0xc5, 0x58, 0xc2, 0xd1, 0xe3, 0x30, 0x40, 0xc2,
+ 0x30, 0x08, 0xc5, 0x8a, 0x18, 0x13, 0x88, 0x03, 0xcb, 0xb4, 0x10, 0x73, 0x98, 0xfd, 0x5f, 0x2c,
+ 0x98, 0x50, 0x7d, 0xe5, 0x6d, 0x1d, 0xc3, 0x96, 0x77, 0x01, 0x9a, 0xf2, 0x03, 0x23, 0xb6, 0xd1,
+ 0xb4, 0x36, 0xb2, 0x97, 0x5f, 0xf7, 0x80, 0x26, 0x6d, 0xa8, 0xa2, 0x08, 0x6b, 0x74, 0xed, 0x7f,
+ 0x6b, 0xc1, 0x89, 0xd4, 0xb7, 0x5d, 0xf5, 0xa2, 0x18, 0xbd, 0xd1, 0xf5, 0x7d, 0xf3, 0xc5, 0xbe,
+ 0x8f, 0xd6, 0x66, 0x5f, 0xa7, 0xd6, 0x8b, 0x2c, 0xd1, 0xbe, 0x0d, 0xc3, 0x80, 0x17, 0x93, 0x2d,
+ 0xf9, 0x59, 0xcf, 0x16, 0xfc, 0x2c, 0xde, 0xbf, 0x64, 0x96, 0x56, 0x29, 0x0d, 0xcc, 0x49, 0xd9,
+ 0xff, 0xcb, 0x82, 0xea, 0x52, 0xe0, 0xaf, 0x7b, 0x1b, 0xd7, 0x9c, 0xf6, 0x31, 0xcc, 0x4f, 0x03,
+ 0x2a, 0x8c, 0x3a, 0xff, 0x84, 0x0b, 0x79, 0x9f, 0x20, 0x3a, 0x36, 0x4f, 0xcf, 0x3d, 0x2e, 0x5f,
+ 0x28, 0x36, 0x45, 0x8b, 0x30, 0x23, 0x36, 0xfb, 0x22, 0x54, 0x15, 0x02, 0x9a, 0x84, 0xf2, 0x5d,
+ 0xc2, 0x85, 0xcf, 0x2a, 0xa6, 0x3f, 0xd1, 0x34, 0x0c, 0x6c, 0x3b, 0xad, 0x8e, 0xd8, 0xbc, 0x98,
+ 0xff, 0xf9, 0x44, 0xe9, 0x25, 0xcb, 0xfe, 0x1e, 0xdb, 0x81, 0xa2, 0x91, 0x65, 0x7f, 0x5b, 0x30,
+ 0x87, 0xcf, 0x59, 0x30, 0xdd, 0xca, 0x60, 0x4a, 0x62, 0x4c, 0x0e, 0xc3, 0xce, 0x1e, 0x11, 0xdd,
+ 0x9e, 0xce, 0x82, 0xe2, 0xcc, 0xd6, 0x28, 0xaf, 0x0f, 0xda, 0x74, 0xc1, 0x39, 0x2d, 0xd6, 0x75,
+ 0x21, 0x36, 0xdc, 0x10, 0x65, 0x58, 0x41, 0xed, 0xbf, 0xb0, 0x60, 0x5a, 0x7d, 0xc7, 0x15, 0xb2,
+ 0xd3, 0x20, 0x2d, 0xd2, 0x8c, 0x83, 0xf0, 0x83, 0xf2, 0x25, 0x8f, 0xf2, 0x39, 0xe1, 0x3c, 0x69,
+ 0x44, 0x10, 0x28, 0x5f, 0x21, 0x3b, 0x7c, 0x82, 0xf4, 0x0f, 0x2d, 0x1f, 0xf8, 0xa1, 0xbf, 0x63,
+ 0xc1, 0x98, 0xfa, 0xd0, 0x63, 0xd8, 0x72, 0x57, 0xcd, 0x2d, 0xf7, 0x33, 0x05, 0xd7, 0x6b, 0x8f,
+ 0xcd, 0xf6, 0xb7, 0x4a, 0x94, 0x6d, 0x08, 0x9c, 0x7a, 0x18, 0xd0, 0x41, 0xa2, 0x1c, 0xff, 0x03,
+ 0x32, 0x4b, 0xfd, 0x7d, 0xec, 0x15, 0xb2, 0xb3, 0x16, 0x50, 0x69, 0x22, 0xfb, 0x63, 0x8d, 0x49,
+ 0xad, 0x1c, 0x38, 0xa9, 0x7f, 0x50, 0x82, 0x93, 0x6a, 0x58, 0x8c, 0x53, 0xfa, 0xa7, 0x72, 0x60,
+ 0x2e, 0xc0, 0x88, 0x4b, 0xd6, 0x9d, 0x4e, 0x2b, 0x56, 0x0a, 0xc8, 0x00, 0xd7, 0x4c, 0x6b, 0x49,
+ 0x31, 0xd6, 0x71, 0xfa, 0x18, 0xcb, 0xaf, 0x8c, 0x30, 0x7e, 0x1e, 0x3b, 0x74, 0xd5, 0x53, 0x09,
+ 0x4f, 0xd3, 0x28, 0x47, 0x75, 0x8d, 0x52, 0x68, 0x8f, 0x8f, 0xc3, 0x80, 0xb7, 0x45, 0xcf, 0xfc,
+ 0x92, 0x79, 0x94, 0xaf, 0xd2, 0x42, 0xcc, 0x61, 0xe8, 0x09, 0x18, 0x6a, 0x06, 0x5b, 0x5b, 0x8e,
+ 0xef, 0xce, 0x94, 0x99, 0xcc, 0x39, 0x42, 0xc5, 0x82, 0x25, 0x5e, 0x84, 0x25, 0x0c, 0x3d, 0x02,
+ 0x15, 0x27, 0xdc, 0x88, 0x66, 0x2a, 0x0c, 0x67, 0x98, 0xb6, 0xb4, 0x10, 0x6e, 0x44, 0x98, 0x95,
+ 0x52, 0x59, 0xf2, 0x5e, 0x10, 0xde, 0xf5, 0xfc, 0x8d, 0x9a, 0x17, 0x32, 0xc1, 0x50, 0x93, 0x25,
+ 0x6f, 0x2b, 0x08, 0xd6, 0xb0, 0x50, 0x1d, 0x06, 0xda, 0x41, 0x18, 0x47, 0x33, 0x83, 0x6c, 0xe0,
+ 0x9f, 0xc9, 0xdd, 0x7e, 0xfc, 0xbb, 0xeb, 0x41, 0x18, 0x27, 0x9f, 0x42, 0xff, 0x45, 0x98, 0x13,
+ 0x42, 0x4b, 0x50, 0x26, 0xfe, 0xf6, 0xcc, 0x10, 0xa3, 0xf7, 0x91, 0x83, 0xe9, 0x2d, 0xfb, 0xdb,
+ 0xb7, 0x9c, 0x30, 0xe1, 0x57, 0xcb, 0xfe, 0x36, 0xa6, 0xb5, 0x51, 0x13, 0xaa, 0xd2, 0x7e, 0x15,
+ 0xcd, 0x0c, 0x17, 0x59, 0x8a, 0x58, 0xa0, 0x63, 0xf2, 0x6e, 0xc7, 0x0b, 0xc9, 0x16, 0xf1, 0xe3,
+ 0x28, 0x51, 0xac, 0x24, 0x34, 0xc2, 0x09, 0x5d, 0xd4, 0x84, 0x51, 0x2e, 0x7f, 0x5e, 0x0b, 0x3a,
+ 0x7e, 0x1c, 0xcd, 0x54, 0x59, 0x97, 0x73, 0x8c, 0x1d, 0xb7, 0x92, 0x1a, 0x8b, 0xd3, 0x82, 0xfc,
+ 0xa8, 0x56, 0x18, 0x61, 0x83, 0x28, 0x7a, 0x03, 0xc6, 0x5a, 0xde, 0x36, 0xf1, 0x49, 0x14, 0xd5,
+ 0xc3, 0xe0, 0x0e, 0x99, 0x01, 0xf6, 0x35, 0x8f, 0xe7, 0x29, 0xfe, 0xc1, 0x1d, 0xb2, 0x38, 0xb5,
+ 0xb7, 0x3b, 0x37, 0x76, 0x55, 0xaf, 0x8d, 0x4d, 0x62, 0xe8, 0x2d, 0x18, 0xa7, 0xc2, 0xae, 0x97,
+ 0x90, 0x1f, 0x29, 0x4e, 0x1e, 0xed, 0xed, 0xce, 0x8d, 0x63, 0xa3, 0x3a, 0x4e, 0x91, 0x43, 0x6b,
+ 0x50, 0x6d, 0x79, 0xeb, 0xa4, 0xb9, 0xd3, 0x6c, 0x91, 0x99, 0x51, 0x46, 0x3b, 0x67, 0x73, 0x5e,
+ 0x95, 0xe8, 0x5c, 0xc1, 0x50, 0x7f, 0x71, 0x42, 0x08, 0xdd, 0x82, 0x53, 0x31, 0x09, 0xb7, 0x3c,
+ 0xdf, 0xa1, 0x9b, 0x4a, 0x48, 0xbf, 0xcc, 0xba, 0x32, 0xc6, 0x56, 0xed, 0x69, 0x31, 0xb0, 0xa7,
+ 0xd6, 0x32, 0xb1, 0x70, 0x8f, 0xda, 0xe8, 0x06, 0x4c, 0xb0, 0xfd, 0x54, 0xef, 0xb4, 0x5a, 0xf5,
+ 0xa0, 0xe5, 0x35, 0x77, 0x66, 0xc6, 0x19, 0xc1, 0x27, 0xa4, 0xcd, 0x64, 0xd5, 0x04, 0x53, 0xc5,
+ 0x30, 0xf9, 0x87, 0xd3, 0xb5, 0x51, 0x0b, 0x26, 0x22, 0xd2, 0xec, 0x84, 0x5e, 0xbc, 0x43, 0xd7,
+ 0x3e, 0xb9, 0x1f, 0xcf, 0x4c, 0x14, 0x51, 0x74, 0x1b, 0x66, 0x25, 0x6e, 0xb0, 0x4a, 0x15, 0xe2,
+ 0x34, 0x69, 0xca, 0x2a, 0xa2, 0xd8, 0xf5, 0xfc, 0x99, 0x49, 0xc6, 0x81, 0xd4, 0xfe, 0x6a, 0xd0,
+ 0x42, 0xcc, 0x61, 0xcc, 0x7e, 0x40, 0x7f, 0xdc, 0xa0, 0x5c, 0x7a, 0x8a, 0x21, 0x26, 0xf6, 0x03,
+ 0x09, 0xc0, 0x09, 0x0e, 0x15, 0x0d, 0xe2, 0x78, 0x67, 0x06, 0x31, 0x54, 0xb5, 0xd5, 0xd6, 0xd6,
+ 0x3e, 0x8d, 0x69, 0x39, 0xba, 0x05, 0x43, 0xc4, 0xdf, 0x5e, 0x09, 0x83, 0xad, 0x99, 0x13, 0x45,
+ 0x78, 0xc0, 0x32, 0x47, 0xe6, 0xe7, 0x47, 0xa2, 0xc2, 0x88, 0x62, 0x2c, 0x89, 0xa1, 0xfb, 0x30,
+ 0x93, 0x31, 0x4b, 0x7c, 0x52, 0xa6, 0xd9, 0xa4, 0x7c, 0x52, 0xd4, 0x9d, 0x59, 0xeb, 0x81, 0xb7,
+ 0x7f, 0x00, 0x0c, 0xf7, 0xa4, 0x6e, 0xdf, 0x81, 0x71, 0xc5, 0xa8, 0xd8, 0x7c, 0xa3, 0x39, 0x18,
+ 0xa0, 0xbc, 0x58, 0x2a, 0xf4, 0x55, 0x3a, 0xa8, 0x94, 0x45, 0x47, 0x98, 0x97, 0xb3, 0x41, 0xf5,
+ 0xde, 0x23, 0x8b, 0x3b, 0x31, 0xe1, 0x8a, 0x5d, 0x59, 0x1b, 0x54, 0x09, 0xc0, 0x09, 0x8e, 0xfd,
+ 0x7f, 0xb9, 0x98, 0x94, 0x70, 0xc3, 0x02, 0x27, 0xc1, 0x39, 0x18, 0xde, 0x0c, 0xa2, 0x98, 0x62,
+ 0xb3, 0x36, 0x06, 0x12, 0xc1, 0xe8, 0xb2, 0x28, 0xc7, 0x0a, 0x03, 0xbd, 0x0c, 0x63, 0x4d, 0xbd,
+ 0x01, 0x71, 0x8c, 0x9d, 0x14, 0x55, 0xcc, 0xd6, 0xb1, 0x89, 0x8b, 0x5e, 0x82, 0x61, 0x66, 0x18,
+ 0x6f, 0x06, 0x2d, 0xa1, 0x42, 0xca, 0x53, 0x79, 0xb8, 0x2e, 0xca, 0xf7, 0xb5, 0xdf, 0x58, 0x61,
+ 0x53, 0x45, 0x9c, 0x76, 0x61, 0xb5, 0x2e, 0x0e, 0x10, 0xa5, 0x88, 0x5f, 0x66, 0xa5, 0x58, 0x40,
+ 0xed, 0xdf, 0x2a, 0x69, 0xa3, 0x4c, 0x15, 0x20, 0x82, 0x5e, 0x87, 0xa1, 0x7b, 0x8e, 0x17, 0x7b,
+ 0xfe, 0x86, 0x90, 0x1e, 0x9e, 0x2b, 0x78, 0x9a, 0xb0, 0xea, 0xb7, 0x79, 0x55, 0x7e, 0xf2, 0x89,
+ 0x3f, 0x58, 0x12, 0xa4, 0xb4, 0xc3, 0x8e, 0xef, 0x53, 0xda, 0xa5, 0xfe, 0x69, 0x63, 0x5e, 0x95,
+ 0xd3, 0x16, 0x7f, 0xb0, 0x24, 0x88, 0xd6, 0x01, 0xe4, 0x5a, 0x22, 0xae, 0x30, 0x48, 0x7f, 0xac,
+ 0x1f, 0xf2, 0x6b, 0xaa, 0xf6, 0xe2, 0x38, 0x3d, 0x6b, 0x93, 0xff, 0x58, 0xa3, 0x6c, 0xc7, 0x4c,
+ 0x08, 0xeb, 0xee, 0x16, 0xfa, 0x0c, 0xdd, 0xd2, 0x4e, 0x18, 0x13, 0x77, 0x21, 0x4e, 0xdb, 0xf4,
+ 0x0f, 0x16, 0xb1, 0xd7, 0xbc, 0x2d, 0xa2, 0x6f, 0x7f, 0x41, 0x04, 0x27, 0xf4, 0xec, 0x6f, 0x95,
+ 0x61, 0xa6, 0x57, 0x77, 0xe9, 0x92, 0x24, 0xf7, 0xbd, 0x78, 0x89, 0x8a, 0x49, 0x96, 0xb9, 0x24,
+ 0x97, 0x45, 0x39, 0x56, 0x18, 0x74, 0x6d, 0x44, 0xde, 0x86, 0x54, 0x96, 0x06, 0x92, 0xb5, 0xd1,
+ 0x60, 0xa5, 0x58, 0x40, 0x29, 0x5e, 0x48, 0x9c, 0x48, 0xdc, 0x87, 0x68, 0x6b, 0x08, 0xb3, 0x52,
+ 0x2c, 0xa0, 0xba, 0x41, 0xa4, 0x92, 0x63, 0x10, 0x31, 0x86, 0x68, 0xe0, 0xc1, 0x0e, 0x11, 0x7a,
+ 0x13, 0x60, 0xdd, 0xf3, 0xbd, 0x68, 0x93, 0x51, 0x1f, 0xec, 0x9b, 0xba, 0x12, 0xb2, 0x56, 0x14,
+ 0x15, 0xac, 0x51, 0x44, 0x2f, 0xc0, 0x88, 0xda, 0x9e, 0xab, 0xb5, 0x99, 0x21, 0xd3, 0x86, 0x9e,
+ 0xf0, 0xaa, 0x1a, 0xd6, 0xf1, 0xec, 0x77, 0xd2, 0xeb, 0x45, 0xec, 0x0a, 0x6d, 0x7c, 0xad, 0xa2,
+ 0xe3, 0x5b, 0x3a, 0x78, 0x7c, 0xed, 0xff, 0x5c, 0x86, 0x09, 0xa3, 0xb1, 0x4e, 0x54, 0x80, 0xa3,
+ 0xbd, 0x4a, 0x0f, 0x2c, 0x27, 0x26, 0x62, 0x4f, 0x9e, 0xeb, 0x67, 0xd3, 0xe8, 0xc7, 0x1b, 0xdd,
+ 0x0b, 0x9c, 0x12, 0xda, 0x84, 0x6a, 0xcb, 0x89, 0x98, 0x49, 0x85, 0x88, 0xbd, 0xd8, 0x1f, 0xd9,
+ 0x44, 0xfd, 0x70, 0xa2, 0x58, 0x3b, 0x3d, 0x78, 0x2b, 0x09, 0x71, 0x7a, 0xda, 0x52, 0x61, 0x47,
+ 0x5e, 0xc2, 0xa9, 0xee, 0x50, 0x89, 0x68, 0x07, 0x73, 0x18, 0x7a, 0x09, 0x46, 0x43, 0xc2, 0x56,
+ 0xca, 0x12, 0x95, 0xe7, 0xd8, 0xd2, 0x1b, 0x48, 0x04, 0x3f, 0xac, 0xc1, 0xb0, 0x81, 0x99, 0xc8,
+ 0xfd, 0x83, 0x07, 0xc8, 0xfd, 0x4f, 0xc1, 0x10, 0xfb, 0xa1, 0x56, 0x85, 0x9a, 0xa1, 0x55, 0x5e,
+ 0x8c, 0x25, 0x3c, 0xbd, 0x88, 0x86, 0x0b, 0x2e, 0xa2, 0xa7, 0x61, 0xbc, 0xe6, 0x90, 0xad, 0xc0,
+ 0x5f, 0xf6, 0xdd, 0x76, 0xe0, 0xf9, 0x31, 0x9a, 0x81, 0x0a, 0x3b, 0x4f, 0xf8, 0x7e, 0xaf, 0x50,
+ 0x0a, 0xb8, 0x42, 0x65, 0x77, 0xfb, 0x4f, 0x4a, 0x30, 0x56, 0x23, 0x2d, 0x12, 0x13, 0xae, 0xf7,
+ 0x44, 0x68, 0x05, 0xd0, 0x46, 0xe8, 0x34, 0x49, 0x9d, 0x84, 0x5e, 0xe0, 0x36, 0x48, 0x33, 0xf0,
+ 0xd9, 0xdd, 0x15, 0x3d, 0x20, 0x4f, 0xed, 0xed, 0xce, 0xa1, 0x4b, 0x5d, 0x50, 0x9c, 0x51, 0x03,
+ 0xb9, 0x30, 0xd6, 0x0e, 0x89, 0x61, 0x37, 0xb4, 0xf2, 0x45, 0x8d, 0xba, 0x5e, 0x85, 0x4b, 0xc3,
+ 0x46, 0x11, 0x36, 0x89, 0xa2, 0x4f, 0xc1, 0x64, 0x10, 0xb6, 0x37, 0x1d, 0xbf, 0x46, 0xda, 0xc4,
+ 0x77, 0xa9, 0x0a, 0x20, 0xac, 0x1d, 0xd3, 0x7b, 0xbb, 0x73, 0x93, 0x37, 0x52, 0x30, 0xdc, 0x85,
+ 0x8d, 0x5e, 0x87, 0xa9, 0x76, 0x18, 0xb4, 0x9d, 0x0d, 0xb6, 0x64, 0x84, 0xb4, 0xc2, 0x79, 0xd3,
+ 0xb9, 0xbd, 0xdd, 0xb9, 0xa9, 0x7a, 0x1a, 0xb8, 0xbf, 0x3b, 0x77, 0x82, 0x0d, 0x19, 0x2d, 0x49,
+ 0x80, 0xb8, 0x9b, 0x8c, 0xfd, 0x2e, 0x9c, 0xac, 0x05, 0xf7, 0xfc, 0x7b, 0x4e, 0xe8, 0x2e, 0xd4,
+ 0x57, 0x35, 0xe3, 0xc4, 0x6b, 0x52, 0xf9, 0xe5, 0x77, 0x82, 0x39, 0x27, 0x9b, 0x46, 0x83, 0xab,
+ 0x1d, 0x2b, 0x5e, 0x8b, 0xf4, 0x30, 0x87, 0xfc, 0xe3, 0x92, 0xd1, 0x66, 0x82, 0xaf, 0xee, 0x2e,
+ 0xac, 0x9e, 0x77, 0x17, 0x9f, 0x81, 0xe1, 0x75, 0x8f, 0xb4, 0x5c, 0x4c, 0xd6, 0xc5, 0x6c, 0x5d,
+ 0x28, 0x72, 0xb9, 0xb3, 0x42, 0xeb, 0x48, 0xeb, 0x18, 0x57, 0xa2, 0x57, 0x04, 0x19, 0xac, 0x08,
+ 0xa2, 0x0e, 0x4c, 0x4a, 0x3d, 0x4c, 0x42, 0xc5, 0x66, 0x7f, 0xae, 0x98, 0x9a, 0x67, 0x36, 0xc3,
+ 0xa6, 0x17, 0xa7, 0x08, 0xe2, 0xae, 0x26, 0xa8, 0xfe, 0xbc, 0x45, 0x8f, 0xba, 0x0a, 0x5b, 0xfa,
+ 0x4c, 0x7f, 0x66, 0xa6, 0x00, 0x56, 0x6a, 0xff, 0xa6, 0x05, 0x0f, 0x75, 0x8d, 0x96, 0xb0, 0x93,
+ 0x1c, 0xd9, 0x1c, 0xa5, 0x8d, 0x15, 0xa5, 0x7c, 0x63, 0x85, 0xfd, 0x5b, 0x16, 0x4c, 0x2f, 0x6f,
+ 0xb5, 0xe3, 0x9d, 0x9a, 0x67, 0xde, 0xb9, 0xbc, 0x08, 0x83, 0x5b, 0xc4, 0xf5, 0x3a, 0x5b, 0x62,
+ 0x5e, 0xe7, 0xe4, 0xc1, 0x70, 0x8d, 0x95, 0xee, 0xef, 0xce, 0x8d, 0x35, 0xe2, 0x20, 0x74, 0x36,
+ 0x08, 0x2f, 0xc0, 0x02, 0x9d, 0x5d, 0x29, 0x79, 0xef, 0x91, 0xab, 0xde, 0x96, 0x27, 0xaf, 0xf2,
+ 0x0e, 0x34, 0xf2, 0xcd, 0xcb, 0xa1, 0x9d, 0x7f, 0xb5, 0xe3, 0xf8, 0xb1, 0x17, 0xef, 0x98, 0xf2,
+ 0x32, 0x23, 0x84, 0x13, 0x9a, 0xf6, 0x8f, 0x2c, 0x98, 0x90, 0x1c, 0x68, 0xc1, 0x75, 0x43, 0x12,
+ 0x45, 0x68, 0x16, 0x4a, 0x5e, 0x5b, 0xf4, 0x14, 0x44, 0xed, 0xd2, 0x6a, 0x1d, 0x97, 0xbc, 0x36,
+ 0x7a, 0x1d, 0xaa, 0xfc, 0x2e, 0x30, 0x59, 0x7e, 0x7d, 0xde, 0x2d, 0x32, 0xed, 0x73, 0x4d, 0xd2,
+ 0xc0, 0x09, 0x39, 0x29, 0x87, 0xb3, 0xb3, 0xad, 0x6c, 0xde, 0x4c, 0x5d, 0x16, 0xe5, 0x58, 0x61,
+ 0xa0, 0xb3, 0x30, 0xec, 0x07, 0x2e, 0xbf, 0xae, 0xe5, 0x9c, 0x80, 0x2d, 0xea, 0xeb, 0xa2, 0x0c,
+ 0x2b, 0xa8, 0xfd, 0x45, 0x0b, 0x46, 0xe5, 0x37, 0x16, 0x54, 0x09, 0xe8, 0x36, 0x4c, 0xd4, 0x81,
+ 0x64, 0x1b, 0x52, 0x91, 0x9e, 0x41, 0x0c, 0x49, 0xbe, 0xdc, 0x8f, 0x24, 0x6f, 0xff, 0x76, 0x09,
+ 0xc6, 0x65, 0x77, 0x1a, 0x9d, 0x3b, 0x11, 0xa1, 0x82, 0x4e, 0xd5, 0xe1, 0x83, 0x4f, 0xe4, 0x4a,
+ 0x7e, 0x36, 0x4f, 0xdb, 0x33, 0xe6, 0x2c, 0x99, 0xe5, 0x05, 0x49, 0x07, 0x27, 0x24, 0xd1, 0x36,
+ 0x4c, 0xf9, 0x41, 0xcc, 0x0e, 0x50, 0x05, 0x2f, 0x76, 0x97, 0x92, 0x6e, 0xe7, 0x61, 0xd1, 0xce,
+ 0xd4, 0xf5, 0x34, 0x3d, 0xdc, 0xdd, 0x04, 0xba, 0x21, 0xad, 0x58, 0x65, 0xd6, 0xd6, 0xd3, 0xc5,
+ 0xda, 0xea, 0x6d, 0xc4, 0xb2, 0x7f, 0xdf, 0x82, 0xaa, 0x44, 0x3b, 0x8e, 0x4b, 0xb5, 0xdb, 0x30,
+ 0x14, 0xb1, 0x29, 0x92, 0xc3, 0x75, 0xae, 0xd8, 0x27, 0xf0, 0x79, 0x4d, 0xa4, 0x06, 0xfe, 0x3f,
+ 0xc2, 0x92, 0x1a, 0x33, 0xe7, 0xab, 0x0f, 0xf9, 0xc0, 0x99, 0xf3, 0x55, 0xcf, 0x7a, 0xdf, 0x9d,
+ 0x8d, 0x19, 0xf6, 0x06, 0x2a, 0xfa, 0xb6, 0x43, 0xb2, 0xee, 0xdd, 0x4f, 0x8b, 0xbe, 0x75, 0x56,
+ 0x8a, 0x05, 0x14, 0xad, 0xc3, 0x68, 0x53, 0x1a, 0xbc, 0x13, 0x16, 0xf2, 0xd1, 0x82, 0xb7, 0x0b,
+ 0xea, 0xa2, 0x8a, 0xfb, 0x4b, 0x2d, 0x69, 0x94, 0xb0, 0x41, 0x97, 0xf2, 0xa9, 0xe4, 0x2e, 0xbe,
+ 0x5c, 0xd0, 0x34, 0x14, 0x92, 0x38, 0x69, 0xa1, 0xe7, 0x35, 0xbc, 0xfd, 0x55, 0x0b, 0x06, 0xb9,
+ 0x85, 0xb4, 0x98, 0x99, 0x59, 0xbb, 0x82, 0x4b, 0xc6, 0xf3, 0x16, 0x2d, 0x14, 0x37, 0x72, 0xe8,
+ 0x36, 0x54, 0xd9, 0x0f, 0x66, 0xed, 0x29, 0x17, 0x71, 0x1e, 0xe3, 0xed, 0xeb, 0x5d, 0xbd, 0x25,
+ 0x09, 0xe0, 0x84, 0x96, 0xfd, 0x9d, 0x32, 0x65, 0x7d, 0x09, 0xaa, 0x21, 0x3d, 0x58, 0xc7, 0x21,
+ 0x3d, 0x94, 0x8e, 0x5e, 0x7a, 0x78, 0x17, 0x26, 0x9a, 0xda, 0x15, 0x60, 0x32, 0xe3, 0x17, 0x0b,
+ 0x2e, 0x2b, 0xed, 0xde, 0x90, 0x5b, 0x04, 0x97, 0x4c, 0x72, 0x38, 0x4d, 0x1f, 0x11, 0x18, 0xe5,
+ 0xeb, 0x41, 0xb4, 0x57, 0x61, 0xed, 0x9d, 0x2f, 0xb2, 0xc2, 0xf4, 0xc6, 0xd8, 0x2a, 0x6e, 0x68,
+ 0x84, 0xb0, 0x41, 0xd6, 0xfe, 0xf5, 0x01, 0x18, 0x58, 0xde, 0x26, 0x7e, 0x7c, 0x0c, 0xac, 0x6e,
+ 0x0b, 0xc6, 0x3d, 0x7f, 0x3b, 0x68, 0x6d, 0x13, 0x97, 0xc3, 0x0f, 0x77, 0xbc, 0x9f, 0x12, 0x8d,
+ 0x8c, 0xaf, 0x1a, 0xc4, 0x70, 0x8a, 0xf8, 0x51, 0xd8, 0x22, 0x5e, 0x85, 0x41, 0xbe, 0x32, 0x84,
+ 0x21, 0x22, 0xe7, 0xc6, 0x80, 0x0d, 0xac, 0xd8, 0x41, 0x89, 0xc5, 0x84, 0x5f, 0x56, 0x08, 0x42,
+ 0xe8, 0x1d, 0x18, 0x5f, 0xf7, 0xc2, 0x28, 0x5e, 0xf3, 0xb6, 0xa8, 0x0e, 0xb9, 0xd5, 0x3e, 0x84,
+ 0x15, 0x42, 0x8d, 0xc8, 0x8a, 0x41, 0x09, 0xa7, 0x28, 0xa3, 0x0d, 0x18, 0xa3, 0x4a, 0x70, 0xd2,
+ 0xd4, 0x50, 0xdf, 0x4d, 0x29, 0x23, 0xe4, 0x55, 0x9d, 0x10, 0x36, 0xe9, 0x52, 0x96, 0xd4, 0x64,
+ 0x4a, 0xf3, 0x30, 0x93, 0x6e, 0x14, 0x4b, 0xe2, 0xda, 0x32, 0x87, 0x51, 0xce, 0xc6, 0x7c, 0x71,
+ 0xaa, 0x26, 0x67, 0x4b, 0x3c, 0x6e, 0xec, 0xaf, 0xd3, 0xb3, 0x98, 0x8e, 0xe1, 0x31, 0x1c, 0x5f,
+ 0x97, 0xcd, 0xe3, 0xeb, 0xf1, 0x02, 0x33, 0xdb, 0xe3, 0xe8, 0x7a, 0x1b, 0x46, 0xb4, 0x89, 0x47,
+ 0xe7, 0xa1, 0xda, 0x94, 0xee, 0x22, 0x82, 0x8b, 0x2b, 0x51, 0x4a, 0xf9, 0x91, 0xe0, 0x04, 0x87,
+ 0x8e, 0x0b, 0x15, 0x41, 0xd3, 0xce, 0x65, 0x54, 0x40, 0xc5, 0x0c, 0x62, 0x3f, 0x07, 0xb0, 0x7c,
+ 0x9f, 0x34, 0x17, 0xb8, 0x12, 0xa9, 0xdd, 0x20, 0x5a, 0xbd, 0x6f, 0x10, 0xed, 0xaf, 0x59, 0x30,
+ 0xbe, 0xb2, 0x64, 0x28, 0x0d, 0xf3, 0x00, 0x5c, 0x36, 0xbe, 0x7d, 0xfb, 0xba, 0xb4, 0x90, 0x73,
+ 0x33, 0xa6, 0x2a, 0xc5, 0x1a, 0x06, 0x7a, 0x18, 0xca, 0xad, 0x8e, 0x2f, 0x44, 0xd6, 0xa1, 0xbd,
+ 0xdd, 0xb9, 0xf2, 0xd5, 0x8e, 0x8f, 0x69, 0x99, 0xe6, 0xc5, 0x55, 0x2e, 0xec, 0xc5, 0x95, 0xef,
+ 0x02, 0xfd, 0xe5, 0x32, 0x4c, 0xae, 0xb4, 0xc8, 0x7d, 0xa3, 0xd7, 0x4f, 0xc2, 0xa0, 0x1b, 0x7a,
+ 0xdb, 0x24, 0x4c, 0x0b, 0x02, 0x35, 0x56, 0x8a, 0x05, 0xb4, 0xb0, 0x63, 0xd9, 0x5b, 0xdd, 0x07,
+ 0xf9, 0xd1, 0x39, 0xd5, 0xe5, 0x7e, 0x33, 0x5a, 0x87, 0x21, 0x7e, 0xe3, 0x1c, 0xcd, 0x0c, 0xb0,
+ 0xa5, 0xf8, 0xf2, 0xc1, 0x9d, 0x49, 0x8f, 0xcf, 0xbc, 0xb0, 0xe0, 0x70, 0x97, 0x1e, 0xc5, 0xcb,
+ 0x44, 0x29, 0x96, 0xc4, 0x67, 0x3f, 0x01, 0xa3, 0x3a, 0x66, 0x5f, 0xbe, 0x3d, 0x7f, 0xd5, 0x82,
+ 0x13, 0x2b, 0xad, 0xa0, 0x79, 0x37, 0xe5, 0xf9, 0xf7, 0x02, 0x8c, 0xd0, 0xcd, 0x14, 0x19, 0x6e,
+ 0xb1, 0x86, 0xcb, 0xb0, 0x00, 0x61, 0x1d, 0x4f, 0xab, 0x76, 0xf3, 0xe6, 0x6a, 0x2d, 0xcb, 0xd3,
+ 0x58, 0x80, 0xb0, 0x8e, 0x67, 0xff, 0xa1, 0x05, 0x8f, 0x5e, 0x5a, 0x5a, 0xae, 0x93, 0x30, 0xf2,
+ 0xa2, 0x98, 0xf8, 0x71, 0x97, 0xb3, 0x33, 0x95, 0x19, 0x5d, 0xad, 0x2b, 0x89, 0xcc, 0x58, 0x63,
+ 0xbd, 0x10, 0xd0, 0x0f, 0x8a, 0xc7, 0xff, 0x57, 0x2d, 0x38, 0x71, 0xc9, 0x8b, 0x31, 0x69, 0x07,
+ 0x69, 0x67, 0xe3, 0x90, 0xb4, 0x83, 0xc8, 0x8b, 0x83, 0x70, 0x27, 0xed, 0x6c, 0x8c, 0x15, 0x04,
+ 0x6b, 0x58, 0xbc, 0xe5, 0x6d, 0x2f, 0xa2, 0x3d, 0x2d, 0x99, 0xaa, 0x2e, 0x16, 0xe5, 0x58, 0x61,
+ 0xd0, 0x0f, 0x73, 0xbd, 0x90, 0x89, 0x0c, 0x3b, 0x62, 0x07, 0xab, 0x0f, 0xab, 0x49, 0x00, 0x4e,
+ 0x70, 0xec, 0xbf, 0x6b, 0xc1, 0xc9, 0x4b, 0xad, 0x4e, 0x14, 0x93, 0x70, 0x3d, 0x32, 0x3a, 0xfb,
+ 0x1c, 0x54, 0x89, 0x14, 0xee, 0x45, 0x5f, 0xd5, 0xa1, 0xa1, 0xa4, 0x7e, 0xee, 0xe9, 0xac, 0xf0,
+ 0x0a, 0x38, 0xd4, 0xf6, 0xe7, 0xfe, 0xf9, 0xbb, 0x25, 0x18, 0xbb, 0xbc, 0xb6, 0x56, 0xbf, 0x44,
+ 0x62, 0xc1, 0x25, 0xf3, 0xcd, 0x5e, 0x58, 0xd3, 0xc8, 0x0f, 0x12, 0x7e, 0x3a, 0xb1, 0xd7, 0x9a,
+ 0xe7, 0xd1, 0x28, 0xf3, 0xab, 0x7e, 0x7c, 0x23, 0x6c, 0xc4, 0xa1, 0xe7, 0x6f, 0x64, 0xea, 0xf0,
+ 0x92, 0x97, 0x97, 0x7b, 0xf1, 0x72, 0xf4, 0x1c, 0x0c, 0xb2, 0x70, 0x18, 0x29, 0x7c, 0x7c, 0x58,
+ 0xc9, 0x09, 0xac, 0x74, 0x7f, 0x77, 0xae, 0x7a, 0x13, 0xaf, 0xf2, 0x3f, 0x58, 0xa0, 0xa2, 0xb7,
+ 0x60, 0x64, 0x33, 0x8e, 0xdb, 0x97, 0x89, 0xe3, 0x92, 0x50, 0xf2, 0x89, 0xb3, 0x07, 0xf3, 0x09,
+ 0x3a, 0x1c, 0xbc, 0x42, 0xb2, 0xb5, 0x92, 0xb2, 0x08, 0xeb, 0x14, 0xed, 0x06, 0x40, 0x02, 0x7b,
+ 0x40, 0x3a, 0x88, 0xfd, 0xcb, 0x25, 0x18, 0xba, 0xec, 0xf8, 0x6e, 0x8b, 0x84, 0x68, 0x05, 0x2a,
+ 0xe4, 0x3e, 0x69, 0x8a, 0x83, 0x3c, 0xa7, 0xeb, 0xc9, 0x61, 0xc7, 0x2d, 0x77, 0xf4, 0x3f, 0x66,
+ 0xf5, 0x11, 0x86, 0x21, 0xda, 0xef, 0x4b, 0xca, 0x0f, 0xfd, 0x99, 0xfc, 0x51, 0x50, 0x8b, 0x82,
+ 0x9f, 0x94, 0xa2, 0x08, 0x4b, 0x42, 0xcc, 0x02, 0xd5, 0x6c, 0x37, 0x28, 0x7b, 0x8b, 0x8b, 0x69,
+ 0x76, 0x6b, 0x4b, 0x75, 0x8e, 0x2e, 0xe8, 0x72, 0x0b, 0x94, 0x2c, 0xc4, 0x09, 0x39, 0x7b, 0x0d,
+ 0xaa, 0x74, 0xf2, 0x17, 0x5a, 0x9e, 0x73, 0xb0, 0x19, 0xec, 0x19, 0xa8, 0x4a, 0x43, 0x54, 0x24,
+ 0x9c, 0xda, 0x19, 0x55, 0x69, 0xa7, 0x8a, 0x70, 0x02, 0xb7, 0x5f, 0x82, 0x69, 0x76, 0x8f, 0xec,
+ 0xc4, 0x9b, 0xc6, 0x5e, 0xcc, 0x5d, 0xf4, 0xf6, 0x37, 0x2a, 0x30, 0xb5, 0xda, 0x58, 0x6a, 0x98,
+ 0x36, 0xcf, 0x97, 0x60, 0x94, 0x1f, 0xfb, 0x74, 0x29, 0x3b, 0x2d, 0x51, 0x5f, 0xdd, 0x7d, 0xac,
+ 0x69, 0x30, 0x6c, 0x60, 0xa2, 0x47, 0xa1, 0xec, 0xbd, 0xeb, 0xa7, 0xbd, 0x11, 0x57, 0x5f, 0xbd,
+ 0x8e, 0x69, 0x39, 0x05, 0x53, 0x09, 0x82, 0xb3, 0x4e, 0x05, 0x56, 0x52, 0xc4, 0x2b, 0x30, 0xee,
+ 0x45, 0xcd, 0xc8, 0x5b, 0xf5, 0x29, 0x5f, 0x71, 0x9a, 0x72, 0x53, 0x24, 0x22, 0x3f, 0xed, 0xaa,
+ 0x82, 0xe2, 0x14, 0xb6, 0xc6, 0xc7, 0x07, 0x0a, 0x4b, 0x21, 0xb9, 0x6e, 0xee, 0x54, 0xc0, 0x6a,
+ 0xb3, 0xaf, 0x8b, 0x98, 0x6f, 0x93, 0x10, 0xb0, 0xf8, 0x07, 0x47, 0x58, 0xc2, 0xd0, 0x25, 0x98,
+ 0x6a, 0x6e, 0x3a, 0xed, 0x85, 0x4e, 0xbc, 0x59, 0xf3, 0xa2, 0x66, 0xb0, 0x4d, 0xc2, 0x1d, 0x26,
+ 0x00, 0x0f, 0x27, 0x36, 0x2d, 0x05, 0x58, 0xba, 0xbc, 0x50, 0xa7, 0x98, 0xb8, 0xbb, 0x8e, 0x29,
+ 0x90, 0xc0, 0x11, 0x08, 0x24, 0x0b, 0x30, 0x21, 0x5b, 0x6d, 0x90, 0x88, 0x1d, 0x11, 0x23, 0xac,
+ 0x9f, 0x2a, 0xc0, 0x48, 0x14, 0xab, 0x5e, 0xa6, 0xf1, 0xed, 0x77, 0xa0, 0xaa, 0x7c, 0xf1, 0xa4,
+ 0x0b, 0xaa, 0xd5, 0xc3, 0x05, 0x35, 0x9f, 0xb9, 0x4b, 0xeb, 0x7c, 0x39, 0xd3, 0x3a, 0xff, 0x4f,
+ 0x2d, 0x48, 0x9c, 0x89, 0x10, 0x86, 0x6a, 0x3b, 0x60, 0x37, 0x79, 0xa1, 0xbc, 0x32, 0x7f, 0x22,
+ 0x67, 0xcf, 0x73, 0x9e, 0xc3, 0x07, 0xa4, 0x2e, 0xeb, 0xe2, 0x84, 0x0c, 0xba, 0x0a, 0x43, 0xed,
+ 0x90, 0x34, 0x62, 0x16, 0x3f, 0xd2, 0x07, 0x45, 0xbe, 0x10, 0x78, 0x4d, 0x2c, 0x49, 0xd8, 0xff,
+ 0xd2, 0x02, 0xe0, 0x66, 0x70, 0xc7, 0xdf, 0x20, 0xc7, 0xa0, 0x58, 0x5f, 0x87, 0x4a, 0xd4, 0x26,
+ 0xcd, 0x62, 0x77, 0xb1, 0x49, 0xcf, 0x1a, 0x6d, 0xd2, 0x4c, 0xa6, 0x83, 0xfe, 0xc3, 0x8c, 0x8e,
+ 0xfd, 0x6d, 0x80, 0xf1, 0x04, 0x8d, 0x2a, 0x37, 0xe8, 0x59, 0x23, 0x70, 0xe2, 0xe1, 0x54, 0xe0,
+ 0x44, 0x95, 0x61, 0x6b, 0xb1, 0x12, 0x31, 0x94, 0xb7, 0x9c, 0xfb, 0x42, 0x97, 0x7a, 0xa1, 0x68,
+ 0x87, 0x68, 0x4b, 0xf3, 0xd7, 0x9c, 0xfb, 0x5c, 0x74, 0x7d, 0x46, 0x2e, 0xa4, 0x6b, 0xce, 0xfd,
+ 0x7d, 0x7e, 0xe3, 0xca, 0xb8, 0x13, 0x55, 0xde, 0x3e, 0xfb, 0x67, 0xc9, 0x7f, 0x76, 0x0c, 0xd1,
+ 0xe6, 0x58, 0xab, 0x9e, 0x2f, 0x4c, 0xc1, 0x7d, 0xb6, 0xea, 0xf9, 0xe9, 0x56, 0x3d, 0xbf, 0x40,
+ 0xab, 0x1e, 0xf3, 0x30, 0x1e, 0x12, 0x77, 0x34, 0xcc, 0x3d, 0x73, 0xe4, 0xe2, 0xc7, 0xfb, 0x6a,
+ 0x5a, 0x5c, 0xf6, 0xf0, 0xe6, 0xcf, 0x4b, 0x79, 0x5d, 0x94, 0xe6, 0x76, 0x41, 0x36, 0x8d, 0xfe,
+ 0x9e, 0x05, 0xe3, 0xe2, 0x37, 0x26, 0xef, 0x76, 0x48, 0x14, 0x0b, 0xb9, 0xe0, 0x53, 0x87, 0xe9,
+ 0x8d, 0x20, 0xc1, 0x3b, 0xf5, 0x31, 0xc9, 0x7e, 0x4d, 0x60, 0x6e, 0xdf, 0x52, 0xfd, 0x41, 0xdf,
+ 0xb6, 0x60, 0x7a, 0xcb, 0xb9, 0xcf, 0x5b, 0xe4, 0x65, 0xd8, 0x89, 0xbd, 0x40, 0xb8, 0xa0, 0xae,
+ 0xf4, 0xbb, 0x4e, 0xba, 0x08, 0xf1, 0xee, 0x4a, 0xef, 0xb2, 0xe9, 0x2c, 0x94, 0xdc, 0x4e, 0x67,
+ 0xf6, 0x70, 0x76, 0x1d, 0x86, 0xe5, 0xc2, 0xcc, 0xd0, 0x94, 0x6a, 0xba, 0xf8, 0xd3, 0xf7, 0x05,
+ 0x9a, 0xa6, 0x59, 0xb1, 0x76, 0xc4, 0x52, 0x3c, 0xd2, 0x76, 0xde, 0x81, 0x51, 0x7d, 0xdd, 0x1d,
+ 0x69, 0x5b, 0xef, 0xc2, 0x89, 0x8c, 0x55, 0x75, 0xa4, 0x4d, 0xde, 0x83, 0x87, 0x7b, 0xae, 0x8f,
+ 0xa3, 0x6c, 0xd8, 0xfe, 0x5d, 0x4b, 0x67, 0x9d, 0xc7, 0x60, 0xb7, 0xba, 0x66, 0xda, 0xad, 0xce,
+ 0x16, 0xdd, 0x43, 0x3d, 0x8c, 0x57, 0xeb, 0x7a, 0xf7, 0xe9, 0x91, 0x80, 0xd6, 0x60, 0xb0, 0x45,
+ 0x4b, 0xe4, 0xb5, 0xe1, 0xb9, 0x7e, 0x76, 0x69, 0x22, 0x81, 0xb1, 0xf2, 0x08, 0x0b, 0x5a, 0xf6,
+ 0xb7, 0x2d, 0xa8, 0xfc, 0x25, 0x86, 0x75, 0x75, 0x91, 0x16, 0xa9, 0x09, 0xe6, 0xb1, 0x73, 0x6f,
+ 0xf9, 0x7e, 0x4c, 0xfc, 0x88, 0x89, 0xf1, 0x99, 0x43, 0xf4, 0x7f, 0x4a, 0x30, 0x42, 0x9b, 0x92,
+ 0x9e, 0x32, 0x2f, 0xc3, 0x58, 0xcb, 0xb9, 0x43, 0x5a, 0xd2, 0xe6, 0x9e, 0x56, 0x7a, 0xaf, 0xea,
+ 0x40, 0x6c, 0xe2, 0xd2, 0xca, 0xeb, 0xfa, 0x95, 0x84, 0x10, 0x92, 0x54, 0x65, 0xe3, 0xbe, 0x02,
+ 0x9b, 0xb8, 0x54, 0xeb, 0xba, 0xe7, 0xc4, 0xcd, 0x4d, 0xa1, 0x10, 0xab, 0xee, 0xde, 0xa6, 0x85,
+ 0x98, 0xc3, 0xa8, 0xb0, 0x27, 0x57, 0xec, 0x2d, 0x12, 0x32, 0x61, 0x8f, 0x0b, 0xd5, 0x4a, 0xd8,
+ 0xc3, 0x26, 0x18, 0xa7, 0xf1, 0xd1, 0x27, 0x60, 0x9c, 0x0e, 0x4e, 0xd0, 0x89, 0xa5, 0x1f, 0xd0,
+ 0x00, 0xf3, 0x03, 0x62, 0x6e, 0xe4, 0x6b, 0x06, 0x04, 0xa7, 0x30, 0x51, 0x1d, 0xa6, 0x3d, 0xbf,
+ 0xd9, 0xea, 0xb8, 0xe4, 0xa6, 0xef, 0xf9, 0x5e, 0xec, 0x39, 0x2d, 0xef, 0x3d, 0xe2, 0x0a, 0xb1,
+ 0x5b, 0xb9, 0x6c, 0xad, 0x66, 0xe0, 0xe0, 0xcc, 0x9a, 0xf6, 0x5b, 0x70, 0xe2, 0x6a, 0xe0, 0xb8,
+ 0x8b, 0x4e, 0xcb, 0xf1, 0x9b, 0x24, 0x5c, 0xf5, 0x37, 0x72, 0x7d, 0x0a, 0xf4, 0x7b, 0xff, 0x52,
+ 0xde, 0xbd, 0xbf, 0x1d, 0x02, 0xd2, 0x1b, 0x10, 0x3e, 0x71, 0x6f, 0xc0, 0x90, 0xc7, 0x9b, 0x12,
+ 0x1b, 0xe1, 0x42, 0x9e, 0x4c, 0xde, 0xd5, 0x47, 0xcd, 0xc7, 0x8b, 0x17, 0x60, 0x49, 0x92, 0x6a,
+ 0x70, 0x59, 0x42, 0x7c, 0xbe, 0xea, 0x6d, 0xbf, 0x00, 0x53, 0xac, 0x66, 0x9f, 0x8a, 0xdf, 0x5f,
+ 0xb3, 0x60, 0xe2, 0x7a, 0x2a, 0x00, 0xfa, 0x49, 0x18, 0x8c, 0x48, 0x98, 0x61, 0x59, 0x6d, 0xb0,
+ 0x52, 0x2c, 0xa0, 0x0f, 0xdc, 0x5a, 0xf3, 0x6b, 0x25, 0xa8, 0x32, 0xa7, 0xec, 0x36, 0x55, 0xe2,
+ 0x8e, 0x5e, 0x5e, 0xbe, 0x66, 0xc8, 0xcb, 0x39, 0x16, 0x03, 0xd5, 0xb1, 0x5e, 0xe2, 0x32, 0xba,
+ 0xa9, 0x02, 0x83, 0x0b, 0x19, 0x0b, 0x12, 0x82, 0x3c, 0x78, 0x74, 0xdc, 0x8c, 0x23, 0x96, 0x41,
+ 0xc3, 0xec, 0x02, 0x5f, 0xe1, 0x7e, 0xe0, 0x2e, 0xf0, 0x55, 0xcf, 0x7a, 0x70, 0xc9, 0xba, 0xd6,
+ 0x79, 0x76, 0x8e, 0xfc, 0x1c, 0x73, 0xb5, 0x65, 0x7b, 0x58, 0xc5, 0xd7, 0xcf, 0x09, 0xd7, 0x59,
+ 0x51, 0xba, 0xcf, 0x18, 0x9e, 0xf8, 0xc7, 0xd3, 0x27, 0x24, 0x55, 0xec, 0xcb, 0x30, 0x91, 0x1a,
+ 0x3a, 0xf4, 0x02, 0x0c, 0xb4, 0x37, 0x9d, 0x88, 0xa4, 0x9c, 0x9e, 0x06, 0xea, 0xb4, 0x70, 0x7f,
+ 0x77, 0x6e, 0x5c, 0x55, 0x60, 0x25, 0x98, 0x63, 0xdb, 0x9f, 0x2b, 0x41, 0xe5, 0x7a, 0xe0, 0x1e,
+ 0xc7, 0x52, 0xbb, 0x6c, 0x2c, 0xb5, 0x27, 0xf3, 0xf3, 0xb5, 0xf4, 0x5c, 0x65, 0xf5, 0xd4, 0x2a,
+ 0x3b, 0x5b, 0x80, 0xd6, 0xc1, 0x0b, 0x6c, 0x0b, 0x46, 0x58, 0x3e, 0x18, 0xe1, 0x94, 0xf5, 0x9c,
+ 0xa1, 0xe2, 0xcd, 0xa5, 0x54, 0xbc, 0x09, 0x0d, 0x55, 0x53, 0xf4, 0x9e, 0x82, 0x21, 0xe1, 0x04,
+ 0x94, 0x76, 0x34, 0x16, 0xb8, 0x58, 0xc2, 0xed, 0x7f, 0x51, 0x06, 0x23, 0xff, 0x0c, 0xfa, 0x7d,
+ 0x0b, 0xe6, 0x43, 0x1e, 0xb4, 0xe5, 0xd6, 0x3a, 0xa1, 0xe7, 0x6f, 0x34, 0x9a, 0x9b, 0xc4, 0xed,
+ 0xb4, 0x3c, 0x7f, 0x63, 0x75, 0xc3, 0x0f, 0x54, 0xf1, 0xf2, 0x7d, 0xd2, 0xec, 0x30, 0x9b, 0x7b,
+ 0xe1, 0xb4, 0x37, 0xea, 0x02, 0xfc, 0xe2, 0xde, 0xee, 0xdc, 0x3c, 0xee, 0xab, 0x15, 0xdc, 0x67,
+ 0xaf, 0xd0, 0x0f, 0x2d, 0x38, 0xcf, 0x33, 0xb0, 0x14, 0xff, 0x92, 0x42, 0xaa, 0x71, 0x5d, 0x12,
+ 0x4d, 0xc8, 0xad, 0x91, 0x70, 0x6b, 0xf1, 0x45, 0x31, 0xc8, 0xe7, 0xeb, 0xfd, 0xb5, 0x8a, 0xfb,
+ 0xed, 0xa6, 0xfd, 0xaf, 0xcb, 0x30, 0x46, 0xc7, 0x33, 0x49, 0xa1, 0xf0, 0x82, 0xb1, 0x4c, 0x1e,
+ 0x4b, 0x2d, 0x93, 0x29, 0x03, 0xf9, 0xc1, 0x64, 0x4f, 0x88, 0x60, 0xaa, 0xe5, 0x44, 0xf1, 0x65,
+ 0xe2, 0x84, 0xf1, 0x1d, 0xe2, 0xb0, 0x7b, 0xe6, 0xb4, 0x0f, 0x4b, 0x81, 0xab, 0x6b, 0x65, 0x84,
+ 0xbb, 0x9a, 0x26, 0x86, 0xbb, 0xe9, 0xa3, 0x6d, 0x40, 0xec, 0x4e, 0x3b, 0x74, 0xfc, 0x88, 0x7f,
+ 0x8b, 0x27, 0x6c, 0xf4, 0xfd, 0xb5, 0x3a, 0x2b, 0x5a, 0x45, 0x57, 0xbb, 0xa8, 0xe1, 0x8c, 0x16,
+ 0x34, 0xaf, 0x85, 0x81, 0xa2, 0x5e, 0x0b, 0x83, 0x39, 0x1e, 0xfe, 0xbf, 0x62, 0xc1, 0x09, 0x3a,
+ 0x2d, 0xa6, 0x37, 0x78, 0x84, 0x02, 0x98, 0xa0, 0xcb, 0xae, 0x45, 0x62, 0x59, 0x26, 0xf6, 0x57,
+ 0x8e, 0x88, 0x6f, 0xd2, 0x49, 0xe4, 0xc8, 0x2b, 0x26, 0x31, 0x9c, 0xa6, 0x6e, 0x7f, 0xcd, 0x02,
+ 0xe6, 0x3d, 0x79, 0x0c, 0x87, 0xd9, 0x25, 0xf3, 0x30, 0xb3, 0xf3, 0x39, 0x46, 0x8f, 0x73, 0xec,
+ 0x79, 0x98, 0xa4, 0xd0, 0x7a, 0x18, 0xdc, 0xdf, 0x91, 0x12, 0x7f, 0xbe, 0x74, 0xf5, 0x2b, 0x25,
+ 0xbe, 0x6d, 0x54, 0xf4, 0x29, 0xfa, 0xbc, 0x05, 0xc3, 0x4d, 0xa7, 0xed, 0x34, 0x79, 0xf6, 0xae,
+ 0x02, 0x66, 0x22, 0xa3, 0xfe, 0xfc, 0x92, 0xa8, 0xcb, 0x4d, 0x1c, 0x1f, 0x95, 0x9f, 0x2e, 0x8b,
+ 0x73, 0xcd, 0x1a, 0xaa, 0xf1, 0xd9, 0xbb, 0x30, 0x66, 0x10, 0x3b, 0x52, 0x7d, 0xf8, 0xf3, 0x16,
+ 0x67, 0xfa, 0x4a, 0x67, 0xb9, 0x07, 0x53, 0xbe, 0xf6, 0x9f, 0xb2, 0x33, 0x29, 0x50, 0xcf, 0x17,
+ 0x67, 0xeb, 0x8c, 0x0b, 0x6a, 0x9e, 0xa2, 0x29, 0x82, 0xb8, 0xbb, 0x0d, 0xfb, 0x37, 0x2c, 0x78,
+ 0x48, 0x47, 0xd4, 0xc2, 0x85, 0xf3, 0x0c, 0xd8, 0x35, 0x18, 0x0e, 0xda, 0x24, 0x74, 0x12, 0xfd,
+ 0xec, 0xac, 0x1c, 0xff, 0x1b, 0xa2, 0x7c, 0x7f, 0x77, 0x6e, 0x5a, 0xa7, 0x2e, 0xcb, 0xb1, 0xaa,
+ 0x89, 0x6c, 0x18, 0x64, 0xe3, 0x12, 0x89, 0x40, 0x6f, 0x96, 0xcd, 0x8a, 0x5d, 0x90, 0x45, 0x58,
+ 0x40, 0xec, 0xbf, 0x69, 0xf1, 0xe5, 0xa6, 0x77, 0x1d, 0xfd, 0x02, 0x4c, 0x6e, 0x51, 0x55, 0x6e,
+ 0xf9, 0x7e, 0x3b, 0xe4, 0xe6, 0x77, 0x39, 0x62, 0x2f, 0x14, 0x1f, 0x31, 0xed, 0x73, 0x17, 0x67,
+ 0x44, 0xef, 0x27, 0xaf, 0xa5, 0xc8, 0xe2, 0xae, 0x86, 0xec, 0x7f, 0x50, 0xe2, 0x7b, 0x96, 0xc9,
+ 0x70, 0x4f, 0xc1, 0x50, 0x3b, 0x70, 0x97, 0x56, 0x6b, 0x58, 0x8c, 0x95, 0x62, 0x3a, 0x75, 0x5e,
+ 0x8c, 0x25, 0x1c, 0x5d, 0x04, 0x20, 0xf7, 0x63, 0x12, 0xfa, 0x4e, 0x4b, 0x5d, 0xe9, 0x2b, 0x51,
+ 0x69, 0x59, 0x41, 0xb0, 0x86, 0x45, 0xeb, 0xb4, 0xc3, 0x60, 0xdb, 0x73, 0x59, 0x9c, 0x4b, 0xd9,
+ 0xac, 0x53, 0x57, 0x10, 0xac, 0x61, 0x51, 0x05, 0xba, 0xe3, 0x47, 0xfc, 0x18, 0x73, 0xee, 0x88,
+ 0x4c, 0x4a, 0xc3, 0x89, 0x02, 0x7d, 0x53, 0x07, 0x62, 0x13, 0x17, 0x5d, 0x81, 0xc1, 0xd8, 0x61,
+ 0x17, 0xd5, 0x03, 0x45, 0xbc, 0x7e, 0xd6, 0x28, 0xae, 0x9e, 0xba, 0x8a, 0x56, 0xc5, 0x82, 0x84,
+ 0xfd, 0x9f, 0xaa, 0x00, 0x89, 0xd4, 0x85, 0x3e, 0xd7, 0xbd, 0xe1, 0x3f, 0x56, 0x54, 0x64, 0x7b,
+ 0x70, 0xbb, 0x1d, 0x7d, 0xc9, 0x82, 0x11, 0xa7, 0xd5, 0x0a, 0x9a, 0x4e, 0xcc, 0x86, 0xa7, 0x54,
+ 0x94, 0xf5, 0x88, 0x9e, 0x2c, 0x24, 0x75, 0x79, 0x67, 0x9e, 0x93, 0x97, 0xc7, 0x1a, 0x24, 0xb7,
+ 0x3f, 0x7a, 0x17, 0xd0, 0x47, 0xa5, 0xd4, 0xce, 0x67, 0x78, 0x36, 0x2d, 0xb5, 0x57, 0x19, 0xc3,
+ 0xd5, 0x04, 0x76, 0xf4, 0x96, 0x91, 0x79, 0xa8, 0x52, 0x24, 0x58, 0xd9, 0x90, 0x43, 0xf2, 0x92,
+ 0x0e, 0xa1, 0xd7, 0x75, 0xf7, 0xf8, 0x81, 0x22, 0xd9, 0x00, 0x34, 0x71, 0x38, 0xc7, 0x35, 0x3e,
+ 0x86, 0x09, 0xd7, 0x3c, 0x79, 0x85, 0x8b, 0xdf, 0x85, 0xfc, 0x16, 0x52, 0x47, 0x76, 0x72, 0xd6,
+ 0xa6, 0x00, 0x38, 0xdd, 0x04, 0x7a, 0x9d, 0x07, 0x2f, 0xac, 0xfa, 0xeb, 0x81, 0x70, 0xf3, 0x3b,
+ 0x57, 0x60, 0xce, 0x77, 0xa2, 0x98, 0x6c, 0xd1, 0x3a, 0xc9, 0xe1, 0x7a, 0x5d, 0x50, 0xc1, 0x8a,
+ 0x1e, 0x5a, 0x83, 0x41, 0x16, 0x9b, 0x16, 0xcd, 0x0c, 0x17, 0x31, 0x09, 0x9a, 0x21, 0xd9, 0xc9,
+ 0xfe, 0x61, 0x7f, 0x23, 0x2c, 0x68, 0xa1, 0xcb, 0x32, 0x29, 0x43, 0xb4, 0xea, 0xdf, 0x8c, 0x08,
+ 0x4b, 0xca, 0x50, 0x5d, 0xfc, 0x48, 0x92, 0x65, 0x81, 0x97, 0x67, 0xa6, 0x6b, 0x34, 0x6a, 0x52,
+ 0xc1, 0x46, 0xfc, 0x97, 0x59, 0x20, 0x67, 0xa0, 0x48, 0x47, 0xcd, 0x9c, 0x91, 0xc9, 0x60, 0xdf,
+ 0x32, 0x89, 0xe1, 0x34, 0xf5, 0x63, 0x3d, 0x52, 0x67, 0x7d, 0x98, 0x4c, 0x6f, 0xca, 0x23, 0x3d,
+ 0xc2, 0x7f, 0x5c, 0x81, 0x71, 0x73, 0x71, 0xa0, 0xf3, 0x50, 0x15, 0x44, 0x54, 0x8a, 0x37, 0xb5,
+ 0x07, 0xae, 0x49, 0x00, 0x4e, 0x70, 0x58, 0xb2, 0x3b, 0x56, 0x5d, 0x73, 0xf0, 0x4a, 0x92, 0xdd,
+ 0x29, 0x08, 0xd6, 0xb0, 0xa8, 0x24, 0x7c, 0x27, 0x08, 0x62, 0x75, 0x12, 0xa8, 0x75, 0xb3, 0xc8,
+ 0x4a, 0xb1, 0x80, 0xd2, 0x13, 0xe0, 0x2e, 0x9d, 0xcc, 0x96, 0x69, 0xde, 0x54, 0x27, 0xc0, 0x15,
+ 0x1d, 0x88, 0x4d, 0x5c, 0x7a, 0xa2, 0x05, 0x11, 0x5b, 0x88, 0x42, 0xde, 0x4e, 0x1c, 0xe6, 0x1a,
+ 0x3c, 0x5e, 0x53, 0xc2, 0xd1, 0xa7, 0xe1, 0x21, 0x15, 0x5e, 0x89, 0xb9, 0xb9, 0x58, 0xb6, 0x38,
+ 0x68, 0xa8, 0xcc, 0x0f, 0x2d, 0x65, 0xa3, 0xe1, 0x5e, 0xf5, 0xd1, 0x2b, 0x30, 0x2e, 0x64, 0x65,
+ 0x49, 0x71, 0xc8, 0xf4, 0x7b, 0xb8, 0x62, 0x40, 0x71, 0x0a, 0x1b, 0xd5, 0x60, 0x92, 0x96, 0x30,
+ 0x21, 0x55, 0x52, 0xe0, 0x61, 0xa2, 0xea, 0xa8, 0xbf, 0x92, 0x82, 0xe3, 0xae, 0x1a, 0x68, 0x01,
+ 0x26, 0xb8, 0xb0, 0x42, 0x15, 0x43, 0x36, 0x0f, 0xc2, 0x37, 0x57, 0x6d, 0x84, 0x1b, 0x26, 0x18,
+ 0xa7, 0xf1, 0xd1, 0x4b, 0x30, 0xea, 0x84, 0xcd, 0x4d, 0x2f, 0x26, 0xcd, 0xb8, 0x13, 0xf2, 0x94,
+ 0x27, 0x9a, 0xe3, 0xc8, 0x82, 0x06, 0xc3, 0x06, 0xa6, 0xfd, 0x1e, 0x9c, 0xc8, 0x08, 0x04, 0xa0,
+ 0x0b, 0xc7, 0x69, 0x7b, 0xf2, 0x9b, 0x52, 0xae, 0x6f, 0x0b, 0xf5, 0x55, 0xf9, 0x35, 0x1a, 0x16,
+ 0x5d, 0x9d, 0xcc, 0x4e, 0xae, 0x25, 0x6d, 0x55, 0xab, 0x73, 0x45, 0x02, 0x70, 0x82, 0x63, 0xff,
+ 0x29, 0x80, 0x66, 0xbd, 0x29, 0xe0, 0xee, 0xf4, 0x12, 0x8c, 0xca, 0x3c, 0xc4, 0x5a, 0x32, 0x4f,
+ 0xf5, 0x99, 0x97, 0x34, 0x18, 0x36, 0x30, 0x69, 0xdf, 0x7c, 0x69, 0x93, 0x4a, 0x3b, 0xda, 0x29,
+ 0x63, 0x15, 0x4e, 0x70, 0xd0, 0x39, 0x18, 0x8e, 0x48, 0x6b, 0xfd, 0xaa, 0xe7, 0xdf, 0x15, 0x0b,
+ 0x5b, 0x71, 0xe6, 0x86, 0x28, 0xc7, 0x0a, 0x03, 0x2d, 0x42, 0xb9, 0xe3, 0xb9, 0x62, 0x29, 0x4b,
+ 0xb1, 0xa1, 0x7c, 0x73, 0xb5, 0xb6, 0xbf, 0x3b, 0xf7, 0x58, 0xaf, 0xf4, 0xca, 0x54, 0x3f, 0x8f,
+ 0xe6, 0xe9, 0xf6, 0xa3, 0x95, 0xb3, 0x2e, 0x0c, 0x06, 0xfb, 0xbc, 0x30, 0xb8, 0x08, 0x20, 0xbe,
+ 0x5a, 0xae, 0xe5, 0x72, 0x32, 0x6b, 0x97, 0x14, 0x04, 0x6b, 0x58, 0x54, 0xcb, 0x6f, 0x86, 0xc4,
+ 0x91, 0x8a, 0x30, 0x77, 0x50, 0x1f, 0x3e, 0xbc, 0x96, 0xbf, 0x94, 0x26, 0x86, 0xbb, 0xe9, 0xa3,
+ 0x00, 0xa6, 0x5c, 0x11, 0xc3, 0x9b, 0x34, 0x5a, 0xed, 0xdf, 0x2b, 0x9e, 0xf9, 0xf6, 0xa4, 0x09,
+ 0xe1, 0x6e, 0xda, 0xe8, 0x4d, 0x98, 0x95, 0x85, 0xdd, 0x01, 0xd4, 0x6c, 0xbb, 0x94, 0x17, 0x4f,
+ 0xef, 0xed, 0xce, 0xcd, 0xd6, 0x7a, 0x62, 0xe1, 0x03, 0x28, 0xa0, 0x37, 0x60, 0x90, 0x5d, 0x30,
+ 0x45, 0x33, 0x23, 0xec, 0xc4, 0x7b, 0xbe, 0x48, 0x6c, 0x05, 0x5d, 0xf5, 0xf3, 0xec, 0x9a, 0x4a,
+ 0x78, 0x0d, 0x27, 0xb7, 0x76, 0xac, 0x10, 0x0b, 0x9a, 0xa8, 0x0d, 0x23, 0x8e, 0xef, 0x07, 0xb1,
+ 0xc3, 0x05, 0xb1, 0xd1, 0x22, 0xb2, 0xa4, 0xd6, 0xc4, 0x42, 0x52, 0x97, 0xb7, 0xa3, 0x1c, 0x11,
+ 0x35, 0x08, 0xd6, 0x9b, 0x40, 0xf7, 0x60, 0x22, 0xb8, 0x47, 0x19, 0xa6, 0xbc, 0x11, 0x89, 0x66,
+ 0xc6, 0xcc, 0x0f, 0xcb, 0x31, 0xd4, 0x1a, 0x95, 0x35, 0x4e, 0x66, 0x12, 0xc5, 0xe9, 0x56, 0xd0,
+ 0xbc, 0x61, 0xae, 0x1e, 0x4f, 0x7c, 0xe3, 0x13, 0x73, 0xb5, 0x6e, 0x9d, 0x66, 0x41, 0xfa, 0xdc,
+ 0x1f, 0x96, 0x71, 0x84, 0x89, 0x54, 0x90, 0x7e, 0x02, 0xc2, 0x3a, 0x1e, 0xda, 0x84, 0xd1, 0xe4,
+ 0x6e, 0x2b, 0x8c, 0x58, 0xfe, 0x1f, 0xcd, 0xdd, 0xeb, 0xe0, 0x8f, 0x5b, 0xd5, 0x6a, 0xf2, 0x48,
+ 0x1f, 0xbd, 0x04, 0x1b, 0x94, 0x67, 0x3f, 0x0e, 0x23, 0xda, 0x14, 0xf7, 0xe3, 0xee, 0x3d, 0xfb,
+ 0x0a, 0x4c, 0xa6, 0xa7, 0xae, 0x2f, 0x77, 0xf1, 0xff, 0x51, 0x82, 0x89, 0x8c, 0x8b, 0x2d, 0x96,
+ 0x8d, 0x39, 0xc5, 0x64, 0x93, 0xe4, 0xcb, 0x26, 0xab, 0x2c, 0x15, 0x60, 0x95, 0x92, 0x6f, 0x97,
+ 0x7b, 0xf2, 0x6d, 0xc1, 0x1e, 0x2b, 0xef, 0x87, 0x3d, 0x9a, 0x27, 0xd2, 0x40, 0xa1, 0x13, 0xe9,
+ 0x01, 0xb0, 0x54, 0xe3, 0x50, 0x1b, 0x2a, 0x70, 0xa8, 0x7d, 0xb5, 0x04, 0x93, 0x89, 0x6b, 0xbc,
+ 0x48, 0x83, 0x7e, 0xf4, 0x17, 0x1e, 0x6b, 0xc6, 0x85, 0x47, 0x5e, 0x96, 0xf3, 0x54, 0xff, 0x7a,
+ 0x5e, 0x7e, 0xbc, 0x91, 0xba, 0xfc, 0x78, 0xbe, 0x4f, 0xba, 0x07, 0x5f, 0x84, 0x7c, 0xab, 0x04,
+ 0x27, 0xd3, 0x55, 0x96, 0x5a, 0x8e, 0xb7, 0x75, 0x0c, 0xe3, 0xf5, 0x69, 0x63, 0xbc, 0x5e, 0xec,
+ 0xef, 0xbb, 0x58, 0x27, 0x7b, 0x0e, 0x9a, 0x93, 0x1a, 0xb4, 0x8f, 0x1f, 0x86, 0xf8, 0xc1, 0x23,
+ 0xf7, 0x47, 0x16, 0x3c, 0x9c, 0x59, 0xef, 0x18, 0x4c, 0xbc, 0xaf, 0x99, 0x26, 0xde, 0xe7, 0x0e,
+ 0xf1, 0x75, 0x3d, 0x6c, 0xbe, 0xbf, 0x59, 0xee, 0xf1, 0x55, 0xcc, 0x08, 0x76, 0x03, 0x46, 0x9c,
+ 0x66, 0x93, 0x44, 0xd1, 0xb5, 0xc0, 0x55, 0x89, 0xc5, 0x9e, 0x65, 0xa7, 0x58, 0x52, 0xbc, 0xbf,
+ 0x3b, 0x37, 0x9b, 0x26, 0x91, 0x80, 0xb1, 0x4e, 0xc1, 0x4c, 0x79, 0x58, 0x3a, 0xa2, 0x94, 0x87,
+ 0x17, 0x01, 0xb6, 0x95, 0xbe, 0x9c, 0xb6, 0xad, 0x69, 0x9a, 0xb4, 0x86, 0x85, 0xfe, 0x0a, 0x93,
+ 0x3d, 0xb9, 0x5f, 0x4a, 0xc5, 0x8c, 0xb2, 0xcd, 0x99, 0x3f, 0xdd, 0xc7, 0x85, 0x07, 0xf3, 0x2a,
+ 0x3b, 0xa4, 0x22, 0x89, 0x3e, 0x05, 0x93, 0x11, 0xcf, 0x49, 0xb1, 0xd4, 0x72, 0x22, 0x16, 0x13,
+ 0x22, 0xf8, 0x29, 0x8b, 0xcb, 0x6d, 0xa4, 0x60, 0xb8, 0x0b, 0xdb, 0xfe, 0x66, 0x19, 0x3e, 0x7c,
+ 0xc0, 0xb2, 0x45, 0x0b, 0xe6, 0xfd, 0xf0, 0x33, 0x69, 0x4b, 0xd3, 0x6c, 0x66, 0x65, 0xc3, 0xf4,
+ 0x94, 0x9a, 0xed, 0xd2, 0xfb, 0x9e, 0xed, 0x2f, 0xeb, 0x76, 0x41, 0xee, 0xaa, 0x7a, 0xe9, 0xd0,
+ 0x1b, 0xf3, 0x27, 0xf5, 0x5a, 0xe0, 0xb3, 0x16, 0x3c, 0x96, 0xf9, 0x59, 0x86, 0x3f, 0xca, 0x79,
+ 0xa8, 0x36, 0x69, 0xa1, 0x16, 0xc1, 0x95, 0x84, 0x4e, 0x4a, 0x00, 0x4e, 0x70, 0x0c, 0xb7, 0x93,
+ 0x52, 0xae, 0xdb, 0xc9, 0x1f, 0x58, 0x30, 0x9d, 0xee, 0xc4, 0x31, 0xf0, 0xad, 0x86, 0xc9, 0xb7,
+ 0xe6, 0xfb, 0x9b, 0xfc, 0x1e, 0x2c, 0xeb, 0xab, 0x93, 0x70, 0xaa, 0xeb, 0xd4, 0xe3, 0xa3, 0xf8,
+ 0x4b, 0x16, 0x4c, 0x6d, 0x30, 0x3d, 0x41, 0x0b, 0x93, 0x13, 0xdf, 0x95, 0x13, 0x5b, 0x78, 0x60,
+ 0x74, 0x1d, 0xd7, 0x7a, 0xba, 0x50, 0x70, 0x77, 0x63, 0xe8, 0x8b, 0x16, 0x4c, 0x3b, 0xf7, 0xa2,
+ 0xae, 0x47, 0x7a, 0xc4, 0x42, 0x7a, 0x25, 0xc7, 0x2c, 0x97, 0xf3, 0xbc, 0xcf, 0xe2, 0xcc, 0xde,
+ 0xee, 0xdc, 0x74, 0x16, 0x16, 0xce, 0x6c, 0x95, 0xce, 0xef, 0xa6, 0x08, 0x97, 0x29, 0x16, 0xf0,
+ 0x99, 0x15, 0x5c, 0xc3, 0xd9, 0x9a, 0x84, 0x60, 0x45, 0x11, 0xbd, 0x0d, 0xd5, 0x0d, 0x19, 0x19,
+ 0x97, 0x66, 0x9b, 0x3d, 0x86, 0x39, 0x2b, 0x90, 0x8e, 0x87, 0x2b, 0x28, 0x10, 0x4e, 0x88, 0xa2,
+ 0xcb, 0x50, 0xf6, 0xd7, 0x23, 0x11, 0x83, 0x9e, 0xe7, 0x6d, 0x64, 0xfa, 0x78, 0xf1, 0xb0, 0xdd,
+ 0xeb, 0x2b, 0x0d, 0x4c, 0x49, 0x50, 0x4a, 0xe1, 0x1d, 0x57, 0xd8, 0xa3, 0x73, 0x28, 0xe1, 0xc5,
+ 0x5a, 0x37, 0x25, 0xbc, 0x58, 0xc3, 0x94, 0x04, 0xaa, 0xc3, 0x00, 0x0b, 0xc6, 0x11, 0xc6, 0xe6,
+ 0x9c, 0x44, 0x05, 0x5d, 0x21, 0x47, 0x3c, 0x33, 0x27, 0x2b, 0xc6, 0x9c, 0x10, 0x5a, 0x83, 0xc1,
+ 0x26, 0x7b, 0x5c, 0x42, 0x58, 0x01, 0xf2, 0x52, 0x78, 0x74, 0x3d, 0x44, 0xc1, 0x6f, 0xd8, 0x78,
+ 0x39, 0x16, 0xb4, 0x18, 0x55, 0xd2, 0xde, 0x5c, 0x8f, 0x84, 0x9a, 0x9f, 0x47, 0xb5, 0xeb, 0x99,
+ 0x10, 0x41, 0x95, 0x95, 0x63, 0x41, 0x0b, 0xd5, 0xa0, 0xb4, 0xde, 0x14, 0xb1, 0x3a, 0x39, 0x46,
+ 0x66, 0x33, 0x06, 0x7b, 0x71, 0x70, 0x6f, 0x77, 0xae, 0xb4, 0xb2, 0x84, 0x4b, 0xeb, 0x4d, 0xf4,
+ 0x1a, 0x0c, 0xad, 0xf3, 0xa8, 0x5a, 0x91, 0xcc, 0xf7, 0x42, 0x5e, 0xe8, 0x6f, 0x57, 0x08, 0x2e,
+ 0x0f, 0x49, 0x11, 0x00, 0x2c, 0xc9, 0xb1, 0x3c, 0x87, 0x2a, 0x4e, 0x58, 0x64, 0xf3, 0x9d, 0xef,
+ 0x2f, 0xae, 0x58, 0x68, 0xbf, 0xaa, 0x14, 0x6b, 0x14, 0xe9, 0x9a, 0x77, 0xe4, 0x3b, 0x39, 0x2c,
+ 0x93, 0x6f, 0xee, 0x9a, 0xcf, 0x7c, 0x56, 0x87, 0xaf, 0x79, 0x05, 0xc2, 0x09, 0x51, 0xd4, 0x81,
+ 0xb1, 0xed, 0xa8, 0xbd, 0x49, 0xe4, 0xd6, 0x67, 0xe9, 0x7d, 0x47, 0x2e, 0x7e, 0x32, 0x27, 0x67,
+ 0xb3, 0xa8, 0xe2, 0x85, 0x71, 0xc7, 0x69, 0x75, 0x71, 0x30, 0x96, 0x58, 0xee, 0x96, 0x4e, 0x16,
+ 0x9b, 0xad, 0xd0, 0x29, 0x79, 0xb7, 0x13, 0xdc, 0xd9, 0x89, 0x89, 0x48, 0xff, 0x9b, 0x33, 0x25,
+ 0xaf, 0x72, 0xe4, 0xee, 0x29, 0x11, 0x00, 0x2c, 0xc9, 0xa9, 0x21, 0x63, 0xdc, 0x78, 0xb2, 0xf0,
+ 0x90, 0x75, 0x7d, 0x43, 0x32, 0x64, 0x8c, 0xfb, 0x26, 0x44, 0x19, 0xd7, 0x6d, 0x6f, 0x06, 0x71,
+ 0xe0, 0xa7, 0x78, 0xff, 0x54, 0x11, 0xae, 0x5b, 0xcf, 0xa8, 0xd9, 0xcd, 0x75, 0xb3, 0xb0, 0x70,
+ 0x66, 0xab, 0xc8, 0x87, 0xf1, 0x76, 0x10, 0xc6, 0xf7, 0x82, 0x50, 0xae, 0x43, 0x54, 0x48, 0x47,
+ 0x34, 0xea, 0x88, 0xb6, 0x99, 0xe7, 0xb1, 0x09, 0xc1, 0x29, 0xea, 0x74, 0xea, 0xa2, 0xa6, 0xd3,
+ 0x22, 0xab, 0x37, 0x66, 0x4e, 0x14, 0x99, 0xba, 0x06, 0x47, 0xee, 0x9e, 0x3a, 0x01, 0xc0, 0x92,
+ 0x1c, 0xe5, 0x75, 0x2c, 0x97, 0x3d, 0xcb, 0x66, 0x9c, 0xcb, 0xeb, 0xba, 0xbc, 0x73, 0x39, 0xaf,
+ 0x63, 0xc5, 0x98, 0x13, 0x42, 0xef, 0x40, 0x55, 0x08, 0xb7, 0x41, 0x34, 0x73, 0x92, 0x51, 0xfd,
+ 0xd9, 0x9c, 0xde, 0x72, 0xf4, 0x1b, 0x8d, 0xec, 0x53, 0x5f, 0x44, 0xff, 0x49, 0x24, 0x9c, 0x90,
+ 0xb7, 0x7f, 0x63, 0xb0, 0x5b, 0xec, 0x61, 0x8a, 0xcd, 0xdf, 0xe8, 0xbe, 0xb1, 0xfe, 0x54, 0xff,
+ 0xfa, 0xfb, 0x03, 0xbc, 0xbb, 0xfe, 0xa2, 0x05, 0xa7, 0xda, 0x99, 0x9f, 0x27, 0x04, 0x87, 0x7e,
+ 0xcd, 0x00, 0x7c, 0x68, 0x54, 0x8e, 0xf1, 0x6c, 0x38, 0xee, 0xd1, 0x66, 0x5a, 0x15, 0x28, 0xbf,
+ 0x6f, 0x55, 0xe0, 0x36, 0x0c, 0x33, 0xd9, 0x35, 0xc9, 0xef, 0xd3, 0x67, 0x2a, 0x1c, 0x26, 0x82,
+ 0x2c, 0x09, 0x12, 0x58, 0x11, 0xa3, 0x03, 0xf7, 0x68, 0xfa, 0x23, 0x30, 0x61, 0x60, 0x91, 0xd9,
+ 0x92, 0xeb, 0x59, 0x2b, 0x62, 0x24, 0x1e, 0xad, 0x1f, 0x84, 0xbc, 0x9f, 0x87, 0x80, 0x0f, 0x6e,
+ 0x0c, 0xd5, 0x32, 0x14, 0xbd, 0x41, 0xf3, 0x7a, 0x2a, 0x5f, 0xd9, 0x3b, 0x5e, 0x05, 0xe5, 0x1f,
+ 0x5a, 0x19, 0xf2, 0x34, 0x57, 0x2a, 0x3f, 0x69, 0x2a, 0x95, 0x4f, 0xa6, 0x95, 0xca, 0x2e, 0x53,
+ 0x92, 0xa1, 0x4f, 0x16, 0xcf, 0xcc, 0x5b, 0x34, 0x81, 0x91, 0xdd, 0x82, 0x33, 0x79, 0xcc, 0x9a,
+ 0xb9, 0xac, 0xb9, 0xea, 0xb2, 0x36, 0x71, 0x59, 0x73, 0x57, 0x6b, 0x98, 0x41, 0x8a, 0xe6, 0xc0,
+ 0xb0, 0x7f, 0xb9, 0x04, 0xe5, 0x7a, 0xe0, 0x1e, 0x83, 0x69, 0xec, 0x92, 0x61, 0x1a, 0x7b, 0x22,
+ 0xf7, 0xa1, 0xc8, 0x9e, 0x86, 0xb0, 0x1b, 0x29, 0x43, 0xd8, 0xcf, 0xe4, 0x93, 0x3a, 0xd8, 0xec,
+ 0xf5, 0xed, 0x32, 0xe8, 0x4f, 0x5d, 0xa2, 0xff, 0x70, 0x18, 0x4f, 0xe6, 0x72, 0xb1, 0xd7, 0x2f,
+ 0x45, 0x1b, 0xcc, 0xe3, 0x4d, 0x06, 0x62, 0xfe, 0xc4, 0x3a, 0x34, 0xdf, 0x26, 0xde, 0xc6, 0x66,
+ 0x4c, 0xdc, 0xf4, 0x87, 0x1d, 0x9f, 0x43, 0xf3, 0x5f, 0x58, 0x30, 0x91, 0x6a, 0x1d, 0xb5, 0xb2,
+ 0x22, 0xb8, 0x0e, 0x69, 0xec, 0x9a, 0xca, 0x0d, 0xf9, 0x9a, 0x07, 0x50, 0x77, 0x16, 0xd2, 0xa0,
+ 0xc4, 0x64, 0x6b, 0x75, 0xa9, 0x11, 0x61, 0x0d, 0x03, 0xbd, 0x00, 0x23, 0x71, 0xd0, 0x0e, 0x5a,
+ 0xc1, 0xc6, 0xce, 0x15, 0x22, 0xb3, 0xb3, 0xa8, 0x9b, 0xa5, 0xb5, 0x04, 0x84, 0x75, 0x3c, 0xfb,
+ 0x3b, 0x65, 0x48, 0x3f, 0x94, 0xfa, 0xff, 0xd7, 0xe9, 0x4f, 0xce, 0x3a, 0xfd, 0x63, 0x0b, 0x26,
+ 0x69, 0xeb, 0xcc, 0xc5, 0x48, 0x3a, 0x1e, 0xab, 0x67, 0x42, 0xac, 0x03, 0x9e, 0x09, 0x79, 0x92,
+ 0x72, 0x3b, 0x37, 0xe8, 0xc4, 0xc2, 0x04, 0xa6, 0x31, 0x31, 0x5a, 0x8a, 0x05, 0x54, 0xe0, 0x91,
+ 0x30, 0x14, 0x11, 0x5a, 0x3a, 0x1e, 0x09, 0x43, 0x2c, 0xa0, 0xf2, 0x15, 0x91, 0x4a, 0x8f, 0x57,
+ 0x44, 0x58, 0x7e, 0x33, 0xe1, 0xd6, 0x22, 0xc4, 0x0a, 0x2d, 0xbf, 0x99, 0xf4, 0x77, 0x49, 0x70,
+ 0xec, 0xaf, 0x97, 0x61, 0xb4, 0x1e, 0xb8, 0x49, 0x44, 0xc1, 0xf3, 0x46, 0x44, 0xc1, 0x99, 0x54,
+ 0x44, 0xc1, 0xa4, 0x8e, 0xfb, 0x60, 0x02, 0x0a, 0x44, 0x1e, 0x3c, 0xf6, 0xce, 0xcd, 0x21, 0x83,
+ 0x09, 0x8c, 0x3c, 0x78, 0x8a, 0x10, 0x36, 0xe9, 0xfe, 0x34, 0x05, 0x11, 0xfc, 0x6f, 0x0b, 0xc6,
+ 0xeb, 0x81, 0x4b, 0x17, 0xe8, 0x4f, 0xd3, 0x6a, 0xd4, 0xb3, 0xe7, 0x0d, 0x1e, 0x90, 0x3d, 0xef,
+ 0x9f, 0x5b, 0x30, 0x54, 0x0f, 0xdc, 0x63, 0x30, 0x0f, 0xaf, 0x98, 0xe6, 0xe1, 0xc7, 0x72, 0x39,
+ 0x6f, 0x0f, 0x8b, 0xf0, 0x37, 0xcb, 0x30, 0x46, 0x7b, 0x1c, 0x6c, 0xc8, 0xf9, 0x32, 0xc6, 0xc6,
+ 0x2a, 0x30, 0x36, 0x54, 0x24, 0x0c, 0x5a, 0xad, 0xe0, 0x5e, 0x7a, 0xee, 0x56, 0x58, 0x29, 0x16,
+ 0x50, 0x74, 0x0e, 0x86, 0xdb, 0x21, 0xd9, 0xf6, 0x82, 0x4e, 0x94, 0x8e, 0xf6, 0xac, 0x8b, 0x72,
+ 0xac, 0x30, 0xd0, 0xf3, 0x30, 0x1a, 0x79, 0x7e, 0x93, 0x48, 0xa7, 0x97, 0x0a, 0x73, 0x7a, 0xe1,
+ 0x89, 0x4a, 0xb5, 0x72, 0x6c, 0x60, 0xa1, 0xdb, 0x50, 0x65, 0xff, 0xd9, 0x0e, 0xea, 0xff, 0x19,
+ 0x10, 0xae, 0x0e, 0x4b, 0x02, 0x38, 0xa1, 0x85, 0x2e, 0x02, 0xc4, 0xd2, 0x3d, 0x27, 0x12, 0x61,
+ 0xc9, 0x4a, 0x2e, 0x55, 0x8e, 0x3b, 0x11, 0xd6, 0xb0, 0xd0, 0x33, 0x50, 0x8d, 0x1d, 0xaf, 0x75,
+ 0xd5, 0xf3, 0x49, 0x24, 0xdc, 0x9b, 0x44, 0xd2, 0x71, 0x51, 0x88, 0x13, 0x38, 0x3d, 0xef, 0x59,
+ 0xd0, 0x3b, 0x7f, 0x62, 0x68, 0x98, 0x61, 0xb3, 0xf3, 0xfe, 0xaa, 0x2a, 0xc5, 0x1a, 0x86, 0xfd,
+ 0x12, 0x9c, 0xac, 0x07, 0x6e, 0x3d, 0x08, 0xe3, 0x95, 0x20, 0xbc, 0xe7, 0x84, 0xae, 0x9c, 0xbf,
+ 0x39, 0x99, 0xeb, 0x9a, 0x9e, 0xc9, 0x03, 0xdc, 0x8a, 0x60, 0xe4, 0xae, 0x7e, 0x8e, 0x9d, 0xf8,
+ 0x7d, 0x86, 0xaa, 0xfc, 0xa0, 0x04, 0xa8, 0xce, 0x1c, 0x88, 0x8c, 0x17, 0xa9, 0x36, 0x61, 0x3c,
+ 0x22, 0x57, 0x3d, 0xbf, 0x73, 0x5f, 0x90, 0x2a, 0x16, 0x1b, 0xd4, 0x58, 0xd6, 0xeb, 0x70, 0x3b,
+ 0x8d, 0x59, 0x86, 0x53, 0x74, 0xe9, 0x60, 0x86, 0x1d, 0x7f, 0x21, 0xba, 0x19, 0x91, 0x50, 0xbc,
+ 0xc0, 0xc4, 0x06, 0x13, 0xcb, 0x42, 0x9c, 0xc0, 0xe9, 0xe2, 0x61, 0x7f, 0xae, 0x07, 0x3e, 0x0e,
+ 0x82, 0x58, 0x2e, 0x37, 0xf6, 0x22, 0x87, 0x56, 0x8e, 0x0d, 0x2c, 0xb4, 0x02, 0x28, 0xea, 0xb4,
+ 0xdb, 0x2d, 0x76, 0x53, 0xea, 0xb4, 0x2e, 0x85, 0x41, 0xa7, 0xcd, 0xfd, 0xc8, 0xc5, 0x63, 0x16,
+ 0x8d, 0x2e, 0x28, 0xce, 0xa8, 0x41, 0x99, 0xc5, 0x7a, 0xc4, 0x7e, 0x8b, 0x08, 0x78, 0x6e, 0x6d,
+ 0x6d, 0xb0, 0x22, 0x2c, 0x61, 0xf6, 0x2f, 0xb2, 0x03, 0x8e, 0x3d, 0x8d, 0x13, 0x77, 0x42, 0x82,
+ 0xb6, 0x60, 0xac, 0xcd, 0x0e, 0xb1, 0x38, 0x0c, 0x5a, 0x2d, 0x22, 0xe5, 0xcb, 0xc3, 0xb9, 0x30,
+ 0xf1, 0xc7, 0x30, 0x74, 0x72, 0xd8, 0xa4, 0x6e, 0xff, 0xb7, 0x71, 0xc6, 0xab, 0xc4, 0x65, 0xf5,
+ 0x90, 0x70, 0x56, 0x16, 0x92, 0xdc, 0x47, 0x8a, 0x3c, 0x72, 0x97, 0x9c, 0x03, 0xc2, 0xf5, 0x19,
+ 0x4b, 0x2a, 0xe8, 0x33, 0xcc, 0x15, 0x9f, 0x33, 0x88, 0xe2, 0x4f, 0x77, 0x72, 0x7c, 0xc3, 0x0d,
+ 0x5f, 0x90, 0xc0, 0x1a, 0x39, 0x74, 0x15, 0xc6, 0xc4, 0x4b, 0x2a, 0xc2, 0x4c, 0x51, 0x36, 0x54,
+ 0xec, 0x31, 0xac, 0x03, 0xf7, 0xd3, 0x05, 0xd8, 0xac, 0x8c, 0x36, 0xe0, 0x51, 0xed, 0xa5, 0xb0,
+ 0x0c, 0x77, 0x3b, 0xce, 0x79, 0x1e, 0xdb, 0xdb, 0x9d, 0x7b, 0x74, 0xed, 0x20, 0x44, 0x7c, 0x30,
+ 0x1d, 0x74, 0x03, 0x4e, 0x3a, 0xcd, 0xd8, 0xdb, 0x26, 0x35, 0xe2, 0xb8, 0x2d, 0xcf, 0x27, 0x66,
+ 0x9a, 0x84, 0x87, 0xf7, 0x76, 0xe7, 0x4e, 0x2e, 0x64, 0x21, 0xe0, 0xec, 0x7a, 0xe8, 0x93, 0x50,
+ 0x75, 0xfd, 0x48, 0x8c, 0xc1, 0xa0, 0xf1, 0x30, 0x5e, 0xb5, 0x76, 0xbd, 0xa1, 0xbe, 0x3f, 0xf9,
+ 0x83, 0x93, 0x0a, 0xe8, 0x5d, 0x18, 0xd5, 0xc3, 0x9f, 0xc4, 0x83, 0x8c, 0x2f, 0x16, 0xd2, 0x9f,
+ 0x8d, 0x98, 0x21, 0x6e, 0xc1, 0x53, 0x6e, 0xad, 0x46, 0x38, 0x91, 0xd1, 0x04, 0xfa, 0x79, 0x40,
+ 0x11, 0x09, 0xb7, 0xbd, 0x26, 0x59, 0x68, 0xb2, 0xec, 0xbe, 0xcc, 0xc6, 0x33, 0x6c, 0xc4, 0x77,
+ 0xa0, 0x46, 0x17, 0x06, 0xce, 0xa8, 0x85, 0x2e, 0x53, 0xce, 0xa3, 0x97, 0x0a, 0x2f, 0x64, 0x29,
+ 0x18, 0xce, 0xd4, 0x48, 0x3b, 0x24, 0x4d, 0x27, 0x26, 0xae, 0x49, 0x11, 0xa7, 0xea, 0xd1, 0x73,
+ 0x49, 0x3d, 0xe0, 0x00, 0xa6, 0xef, 0x6c, 0xf7, 0x23, 0x0e, 0x54, 0xcf, 0xda, 0x0c, 0xa2, 0xf8,
+ 0x3a, 0x89, 0xef, 0x05, 0xe1, 0x5d, 0x91, 0x11, 0x2d, 0x49, 0x95, 0x98, 0x80, 0xb0, 0x8e, 0x47,
+ 0x65, 0x28, 0x76, 0xf5, 0xb7, 0x5a, 0x63, 0xf7, 0x2a, 0xc3, 0xc9, 0xde, 0xb9, 0xcc, 0x8b, 0xb1,
+ 0x84, 0x4b, 0xd4, 0xd5, 0xfa, 0x12, 0xbb, 0x23, 0x49, 0xa1, 0xae, 0xd6, 0x97, 0xb0, 0x84, 0xa3,
+ 0xa0, 0xfb, 0xf9, 0xc1, 0xf1, 0x22, 0xf7, 0x55, 0xdd, 0x9c, 0xbc, 0xe0, 0x0b, 0x84, 0xf7, 0x61,
+ 0x52, 0x3d, 0x81, 0xc8, 0x93, 0xc6, 0x45, 0x33, 0x13, 0x6c, 0xe1, 0x1c, 0x26, 0xf7, 0x9c, 0xb2,
+ 0xeb, 0xad, 0xa6, 0x68, 0xe2, 0xae, 0x56, 0x8c, 0xe4, 0x1c, 0x93, 0xb9, 0x8f, 0x72, 0x9c, 0x87,
+ 0x6a, 0xd4, 0xb9, 0xe3, 0x06, 0x5b, 0x8e, 0xe7, 0xb3, 0x8b, 0x0c, 0x4d, 0x88, 0x69, 0x48, 0x00,
+ 0x4e, 0x70, 0x50, 0x1d, 0x86, 0x1d, 0xa1, 0xc2, 0x89, 0x0b, 0x87, 0x9c, 0x28, 0x7c, 0xa9, 0xf0,
+ 0x71, 0xeb, 0xaa, 0xfc, 0x87, 0x15, 0x15, 0xf4, 0x32, 0x8c, 0x89, 0x20, 0x32, 0xe1, 0xec, 0x79,
+ 0xc2, 0x0c, 0x38, 0x68, 0xe8, 0x40, 0x6c, 0xe2, 0xa2, 0x0d, 0x18, 0xa7, 0x54, 0x12, 0x06, 0x38,
+ 0x33, 0xdd, 0x1f, 0x0f, 0xd5, 0xd2, 0x9f, 0xeb, 0x64, 0x70, 0x8a, 0x2c, 0x72, 0xe1, 0x11, 0xa7,
+ 0x13, 0x07, 0x5b, 0x74, 0x27, 0x98, 0xfb, 0x64, 0x2d, 0xb8, 0x4b, 0x7c, 0x76, 0xcb, 0x30, 0xbc,
+ 0x78, 0x66, 0x6f, 0x77, 0xee, 0x91, 0x85, 0x03, 0xf0, 0xf0, 0x81, 0x54, 0xd0, 0x5b, 0x30, 0x12,
+ 0x07, 0x2d, 0xe1, 0xc3, 0x1d, 0xcd, 0x9c, 0x2a, 0x92, 0x84, 0x68, 0x4d, 0x55, 0xd0, 0xcd, 0x18,
+ 0x8a, 0x08, 0xd6, 0x29, 0xa2, 0x37, 0xf9, 0xae, 0x64, 0x09, 0x33, 0x49, 0x34, 0xf3, 0x50, 0x91,
+ 0xc1, 0x52, 0x19, 0x36, 0xcd, 0xed, 0x2b, 0x68, 0x60, 0x9d, 0xe0, 0xec, 0xcf, 0xc1, 0x54, 0x17,
+ 0xcb, 0xeb, 0xcb, 0xb9, 0xf5, 0x3f, 0x0e, 0x40, 0x55, 0x59, 0x0c, 0xd1, 0x79, 0xd3, 0x38, 0xfc,
+ 0x70, 0xda, 0x38, 0x3c, 0x4c, 0x05, 0x34, 0xdd, 0x1e, 0xfc, 0x66, 0xc6, 0xa3, 0xfa, 0x4f, 0xe7,
+ 0xee, 0xf1, 0xe2, 0x91, 0x6d, 0x9a, 0x8a, 0x57, 0x2e, 0x6c, 0x6f, 0xae, 0x1c, 0xa8, 0x35, 0x16,
+ 0x7c, 0x28, 0x92, 0xea, 0x87, 0xed, 0xc0, 0x5d, 0xad, 0xa7, 0xdf, 0x41, 0xab, 0xd3, 0x42, 0xcc,
+ 0x61, 0x4c, 0xae, 0xa7, 0x67, 0x36, 0x93, 0xeb, 0x87, 0x0e, 0x29, 0xd7, 0x4b, 0x02, 0x38, 0xa1,
+ 0x85, 0xb6, 0x61, 0xaa, 0x69, 0x3e, 0x6b, 0xa7, 0xe2, 0xd5, 0x9e, 0xed, 0xe3, 0x59, 0xb9, 0x8e,
+ 0xf6, 0x22, 0xcd, 0x52, 0x9a, 0x1e, 0xee, 0x6e, 0x02, 0xbd, 0x0c, 0xc3, 0xef, 0x06, 0x11, 0xbb,
+ 0xb6, 0x10, 0x07, 0x97, 0x8c, 0x0b, 0x1a, 0x7e, 0xf5, 0x46, 0x83, 0x95, 0xef, 0xef, 0xce, 0x8d,
+ 0xd4, 0x03, 0x57, 0xfe, 0xc5, 0xaa, 0x02, 0xfa, 0xac, 0x05, 0x27, 0x8d, 0x7d, 0xac, 0x7a, 0x0e,
+ 0x87, 0xe9, 0xf9, 0xa3, 0xa2, 0xe5, 0x93, 0xab, 0x59, 0x34, 0x71, 0x76, 0x53, 0xf6, 0x77, 0xb9,
+ 0x89, 0x54, 0x18, 0x4d, 0x48, 0xd4, 0x69, 0x1d, 0xc7, 0xeb, 0x10, 0x37, 0x0c, 0x7b, 0xce, 0x03,
+ 0x30, 0xd2, 0xff, 0x7b, 0x8b, 0x19, 0xe9, 0xd7, 0xc8, 0x56, 0xbb, 0xe5, 0xc4, 0xc7, 0xe1, 0xfb,
+ 0xfc, 0x19, 0x18, 0x8e, 0x45, 0x6b, 0xc5, 0x9e, 0xb6, 0xd0, 0xba, 0xc7, 0x2e, 0x2f, 0xd4, 0xc1,
+ 0x27, 0x4b, 0xb1, 0x22, 0x68, 0xff, 0x2b, 0x3e, 0x2b, 0x12, 0x72, 0x0c, 0x96, 0x88, 0xeb, 0xa6,
+ 0x25, 0xe2, 0xa9, 0xc2, 0xdf, 0xd2, 0xc3, 0x22, 0xf1, 0x1d, 0xf3, 0x0b, 0x98, 0x7e, 0xf2, 0x93,
+ 0x73, 0x8b, 0x64, 0xff, 0xba, 0x05, 0xd3, 0x59, 0xce, 0x08, 0x54, 0x80, 0xe1, 0xda, 0x91, 0xba,
+ 0x5f, 0x53, 0xa3, 0x7a, 0x4b, 0x94, 0x63, 0x85, 0x51, 0x38, 0xd7, 0x7c, 0x7f, 0x29, 0xb4, 0x6e,
+ 0x80, 0xf9, 0x40, 0x22, 0x7a, 0x85, 0x87, 0x3a, 0x58, 0xea, 0x05, 0xc3, 0xfe, 0xc2, 0x1c, 0xec,
+ 0x6f, 0x94, 0x60, 0x9a, 0x1b, 0xb9, 0x17, 0xb6, 0x03, 0xcf, 0xad, 0x07, 0xae, 0x08, 0xfc, 0x70,
+ 0x61, 0xb4, 0xad, 0x29, 0xb7, 0xc5, 0x52, 0xf2, 0xe8, 0xea, 0x70, 0xa2, 0x50, 0xe8, 0xa5, 0xd8,
+ 0xa0, 0x4a, 0x5b, 0x21, 0xdb, 0x5e, 0x53, 0xd9, 0x4c, 0x4b, 0x7d, 0x9f, 0x0c, 0xaa, 0x95, 0x65,
+ 0x8d, 0x0e, 0x36, 0xa8, 0x1e, 0xc1, 0x13, 0x31, 0xf6, 0xdf, 0xb7, 0xe0, 0xa1, 0x1e, 0x69, 0x7b,
+ 0x68, 0x73, 0xf7, 0xd8, 0xc5, 0x82, 0x78, 0x81, 0x53, 0x35, 0xc7, 0xaf, 0x1b, 0xb0, 0x80, 0xa2,
+ 0x3b, 0x00, 0xfc, 0xba, 0x80, 0xca, 0xd2, 0xe9, 0xbb, 0xec, 0x82, 0xc9, 0x31, 0xb4, 0xbc, 0x09,
+ 0x92, 0x12, 0xd6, 0xa8, 0xda, 0x5f, 0x2b, 0xc3, 0x00, 0x7f, 0xe8, 0xbd, 0x0e, 0x43, 0x9b, 0x3c,
+ 0x9f, 0x71, 0x7f, 0xe9, 0x94, 0x13, 0xe5, 0x85, 0x17, 0x60, 0x49, 0x06, 0x5d, 0x83, 0x13, 0x22,
+ 0xf4, 0xa8, 0x46, 0x5a, 0xce, 0x8e, 0xd4, 0x86, 0xf9, 0xbb, 0x21, 0x32, 0xc1, 0xfd, 0x89, 0xd5,
+ 0x6e, 0x14, 0x9c, 0x55, 0x0f, 0xbd, 0xd2, 0x95, 0x7e, 0x90, 0xe7, 0x89, 0x56, 0x92, 0x70, 0x4e,
+ 0x0a, 0xc2, 0x97, 0x61, 0xac, 0xdd, 0xa5, 0xf7, 0x6b, 0xef, 0x69, 0x9b, 0xba, 0xbe, 0x89, 0xcb,
+ 0x7c, 0x17, 0x3a, 0xcc, 0x67, 0x63, 0x6d, 0x33, 0x24, 0xd1, 0x66, 0xd0, 0x72, 0xc5, 0x53, 0xb0,
+ 0x89, 0xef, 0x42, 0x0a, 0x8e, 0xbb, 0x6a, 0x50, 0x2a, 0xeb, 0x8e, 0xd7, 0xea, 0x84, 0x24, 0xa1,
+ 0x32, 0x68, 0x52, 0x59, 0x49, 0xc1, 0x71, 0x57, 0x0d, 0xba, 0xb6, 0x4e, 0x8a, 0xd7, 0x43, 0x65,
+ 0x90, 0xba, 0x60, 0x41, 0x9f, 0x86, 0x21, 0x19, 0x40, 0x50, 0x28, 0x97, 0x8a, 0x70, 0x4c, 0x50,
+ 0x2f, 0x91, 0x6a, 0xef, 0xc8, 0x89, 0xd0, 0x01, 0x49, 0xef, 0x30, 0xaf, 0x54, 0xfe, 0xb9, 0x05,
+ 0x27, 0x32, 0x1c, 0xe1, 0x38, 0x4b, 0xdb, 0xf0, 0xa2, 0x58, 0xbd, 0x62, 0xa1, 0xb1, 0x34, 0x5e,
+ 0x8e, 0x15, 0x06, 0xdd, 0x2d, 0x9c, 0x69, 0xa6, 0x19, 0xa5, 0x70, 0x31, 0x11, 0xd0, 0xfe, 0x18,
+ 0x25, 0x3a, 0x03, 0x95, 0x4e, 0x44, 0x42, 0xf9, 0xa0, 0xa3, 0xe4, 0xf3, 0xcc, 0xce, 0xc8, 0x20,
+ 0x54, 0x6c, 0xdd, 0x50, 0x26, 0x3e, 0x4d, 0x6c, 0xe5, 0x46, 0x3e, 0x0e, 0xb3, 0xbf, 0x5c, 0x86,
+ 0x89, 0x94, 0x43, 0x2c, 0xed, 0xc8, 0x56, 0xe0, 0x7b, 0x71, 0xa0, 0xf2, 0xdb, 0xf1, 0x37, 0xe4,
+ 0x48, 0x7b, 0xf3, 0x9a, 0x28, 0xc7, 0x0a, 0x03, 0x3d, 0x29, 0x5f, 0x09, 0x4e, 0xbf, 0xce, 0xb1,
+ 0x58, 0x33, 0x1e, 0x0a, 0x2e, 0xfa, 0xb2, 0xce, 0xe3, 0x50, 0x69, 0x07, 0xea, 0xd1, 0x77, 0x35,
+ 0x9f, 0x78, 0xb1, 0x56, 0x0f, 0x82, 0x16, 0x66, 0x40, 0xf4, 0x84, 0xf8, 0xfa, 0xd4, 0xcd, 0x08,
+ 0x76, 0xdc, 0x20, 0xd2, 0x86, 0xe0, 0x29, 0x18, 0xba, 0x4b, 0x76, 0x42, 0xcf, 0xdf, 0x48, 0xdf,
+ 0x0b, 0x5d, 0xe1, 0xc5, 0x58, 0xc2, 0xcd, 0x64, 0xf5, 0x43, 0x47, 0xfc, 0x7a, 0xce, 0x70, 0xee,
+ 0x39, 0xf8, 0x4d, 0x0b, 0x26, 0x58, 0xf6, 0x59, 0x91, 0x22, 0xc1, 0x0b, 0xfc, 0x63, 0x90, 0x31,
+ 0x1e, 0x87, 0x81, 0x90, 0x36, 0x9a, 0x7e, 0xfe, 0x82, 0xf5, 0x04, 0x73, 0x18, 0x7a, 0x04, 0x2a,
+ 0xac, 0x0b, 0x74, 0x1a, 0x47, 0x79, 0x92, 0xfb, 0x9a, 0x13, 0x3b, 0x98, 0x95, 0xb2, 0x18, 0x34,
+ 0x4c, 0xda, 0x2d, 0x8f, 0x77, 0x3a, 0x31, 0xe7, 0x7e, 0xd0, 0x62, 0xd0, 0x32, 0x3b, 0xf9, 0xa0,
+ 0x62, 0xd0, 0xb2, 0x89, 0x1f, 0x2c, 0xe7, 0xff, 0xf7, 0x12, 0x9c, 0xce, 0xac, 0x97, 0xdc, 0x30,
+ 0xaf, 0x18, 0x37, 0xcc, 0x17, 0x53, 0x37, 0xcc, 0xf6, 0xc1, 0xb5, 0x1f, 0xcc, 0x9d, 0x73, 0xf6,
+ 0x55, 0x70, 0xf9, 0x18, 0xaf, 0x82, 0x2b, 0x45, 0x45, 0x9c, 0x81, 0x1c, 0x11, 0xe7, 0x8f, 0x2c,
+ 0x78, 0x38, 0x73, 0xc8, 0x3e, 0x70, 0x41, 0x7f, 0x99, 0xbd, 0xec, 0xa1, 0x9d, 0xfc, 0x5a, 0xb9,
+ 0xc7, 0x57, 0x31, 0x3d, 0xe5, 0x2c, 0xe5, 0x42, 0x0c, 0x18, 0x09, 0xe1, 0x6d, 0x94, 0x73, 0x20,
+ 0x5e, 0x86, 0x15, 0x14, 0x45, 0x5a, 0xd0, 0x1c, 0xef, 0xe4, 0xf2, 0x21, 0x37, 0xd4, 0xbc, 0x69,
+ 0x87, 0xd7, 0xf3, 0x3e, 0xa4, 0x43, 0xe9, 0x6e, 0x6b, 0x9a, 0x67, 0xf9, 0x30, 0x9a, 0xe7, 0x68,
+ 0xb6, 0xd6, 0x89, 0x16, 0x60, 0x62, 0xcb, 0xf3, 0xd9, 0xa3, 0xbb, 0xa6, 0xf4, 0xa4, 0x22, 0x97,
+ 0xaf, 0x99, 0x60, 0x9c, 0xc6, 0x9f, 0x7d, 0x19, 0xc6, 0x0e, 0x6f, 0x5d, 0xfb, 0x51, 0x19, 0x3e,
+ 0x7c, 0x00, 0x53, 0xe0, 0xa7, 0x83, 0x31, 0x2f, 0xda, 0xe9, 0xd0, 0x35, 0x37, 0x75, 0x98, 0x5e,
+ 0xef, 0xb4, 0x5a, 0x3b, 0xcc, 0x3f, 0x8b, 0xb8, 0x12, 0x43, 0x08, 0x35, 0x2a, 0x19, 0xf5, 0x4a,
+ 0x06, 0x0e, 0xce, 0xac, 0x89, 0x7e, 0x1e, 0x50, 0x70, 0x87, 0xa5, 0x45, 0x76, 0x93, 0xbc, 0x16,
+ 0x6c, 0x0a, 0xca, 0xc9, 0x56, 0xbd, 0xd1, 0x85, 0x81, 0x33, 0x6a, 0x51, 0x39, 0x95, 0x9e, 0x63,
+ 0x3b, 0xaa, 0x5b, 0x29, 0x39, 0x15, 0xeb, 0x40, 0x6c, 0xe2, 0xa2, 0x4b, 0x30, 0xe5, 0x6c, 0x3b,
+ 0x1e, 0x4f, 0x73, 0x26, 0x09, 0x70, 0x41, 0x55, 0xd9, 0xaf, 0x16, 0xd2, 0x08, 0xb8, 0xbb, 0x0e,
+ 0x6a, 0x1b, 0x06, 0x49, 0xfe, 0x32, 0xc3, 0x27, 0x0f, 0xb1, 0x82, 0x0b, 0x9b, 0x28, 0xed, 0x3f,
+ 0xb5, 0xe8, 0xd1, 0x97, 0xf1, 0x3e, 0x2b, 0x1d, 0x11, 0x65, 0x60, 0xd3, 0x82, 0x00, 0xd5, 0x88,
+ 0x2c, 0xe9, 0x40, 0x6c, 0xe2, 0xf2, 0xa5, 0x11, 0x25, 0xee, 0xe2, 0x86, 0xb4, 0x29, 0xe2, 0x67,
+ 0x15, 0x06, 0x95, 0xa0, 0x5d, 0x6f, 0xdb, 0x8b, 0x82, 0x50, 0x6c, 0xa0, 0x7e, 0x5f, 0x41, 0x57,
+ 0xfc, 0xb2, 0xc6, 0xc9, 0x60, 0x49, 0xcf, 0xfe, 0x4a, 0x09, 0xc6, 0x64, 0x8b, 0xaf, 0x76, 0x82,
+ 0xd8, 0x39, 0x86, 0x23, 0xfd, 0x55, 0xe3, 0x48, 0x3f, 0x5f, 0x2c, 0x9c, 0x98, 0x75, 0xae, 0xe7,
+ 0x51, 0xfe, 0xe9, 0xd4, 0x51, 0x7e, 0xa1, 0x1f, 0xa2, 0x07, 0x1f, 0xe1, 0xff, 0xc6, 0x82, 0x29,
+ 0x03, 0xff, 0x18, 0x4e, 0x92, 0xba, 0x79, 0x92, 0x3c, 0xd3, 0xc7, 0xd7, 0xf4, 0x38, 0x41, 0xbe,
+ 0x5e, 0x4a, 0x7d, 0x05, 0x3b, 0x39, 0x7e, 0x01, 0x2a, 0x9b, 0x4e, 0xe8, 0x16, 0xcb, 0xf9, 0xd9,
+ 0x55, 0x7d, 0xfe, 0xb2, 0x13, 0xba, 0x9c, 0xff, 0x9f, 0x53, 0xaf, 0xc7, 0x39, 0xa1, 0x9b, 0x1b,
+ 0x45, 0xc1, 0x1a, 0x45, 0x2f, 0xc1, 0x60, 0xd4, 0x0c, 0xda, 0xca, 0xcf, 0xf4, 0x0c, 0x7f, 0x59,
+ 0x8e, 0x96, 0xec, 0xef, 0xce, 0x21, 0xb3, 0x39, 0x5a, 0x8c, 0x05, 0xfe, 0xec, 0x06, 0x54, 0x55,
+ 0xd3, 0x47, 0xea, 0x69, 0xff, 0x5f, 0xcb, 0x70, 0x22, 0x63, 0xad, 0xa0, 0x5f, 0x34, 0xc6, 0xed,
+ 0xe5, 0xbe, 0x17, 0xdb, 0xfb, 0x1c, 0xb9, 0x5f, 0x64, 0x9a, 0x92, 0x2b, 0x56, 0xc7, 0x21, 0x9a,
+ 0xbf, 0x19, 0x91, 0x74, 0xf3, 0xb4, 0x28, 0xbf, 0x79, 0xda, 0xec, 0xb1, 0x0d, 0x3f, 0x6d, 0x48,
+ 0xf5, 0xf4, 0x48, 0xe7, 0xf9, 0x0b, 0x15, 0x98, 0xce, 0xca, 0x5b, 0x80, 0x7e, 0xc5, 0x4a, 0xbd,
+ 0x30, 0xf2, 0x4a, 0xff, 0xc9, 0x0f, 0xf8, 0xb3, 0x23, 0x22, 0xab, 0xd0, 0xbc, 0xf9, 0xe6, 0x48,
+ 0xee, 0x88, 0x8b, 0xd6, 0x59, 0xfc, 0x53, 0xc8, 0x5f, 0x8b, 0x91, 0x5c, 0xe1, 0x53, 0x87, 0xe8,
+ 0x8a, 0x78, 0x70, 0x26, 0x4a, 0xc5, 0x3f, 0xc9, 0xe2, 0xfc, 0xf8, 0x27, 0xd9, 0x87, 0x59, 0x0f,
+ 0x46, 0xb4, 0xef, 0x3a, 0xd2, 0x65, 0x70, 0x97, 0x1e, 0x51, 0x5a, 0xbf, 0x8f, 0x74, 0x29, 0xfc,
+ 0x1d, 0x0b, 0x52, 0x4e, 0x61, 0xca, 0x2c, 0x63, 0xf5, 0x34, 0xcb, 0x9c, 0x81, 0x4a, 0x18, 0xb4,
+ 0x48, 0xfa, 0xd1, 0x09, 0x1c, 0xb4, 0x08, 0x66, 0x10, 0xf5, 0xa0, 0x74, 0xb9, 0xd7, 0x83, 0xd2,
+ 0x54, 0x4f, 0x6f, 0x91, 0x6d, 0x22, 0x8d, 0x24, 0x8a, 0x8d, 0x5f, 0xa5, 0x85, 0x98, 0xc3, 0xec,
+ 0xdf, 0xa9, 0xc0, 0x89, 0x8c, 0x58, 0x40, 0xaa, 0x21, 0x6d, 0x38, 0x31, 0xb9, 0xe7, 0xec, 0xa4,
+ 0x93, 0xdf, 0x5e, 0xe2, 0xc5, 0x58, 0xc2, 0x99, 0x33, 0x2b, 0x4f, 0xa0, 0x97, 0x32, 0x5d, 0x89,
+ 0xbc, 0x79, 0x02, 0x7a, 0xf4, 0x4f, 0x0f, 0x5f, 0x04, 0x88, 0xa2, 0xd6, 0xb2, 0x4f, 0x25, 0x3c,
+ 0x57, 0x38, 0xcd, 0x26, 0x79, 0x17, 0x1b, 0x57, 0x05, 0x04, 0x6b, 0x58, 0xa8, 0x06, 0x93, 0xed,
+ 0x30, 0x88, 0xb9, 0x61, 0xb0, 0xc6, 0x1d, 0x2d, 0x06, 0xcc, 0x68, 0xad, 0x7a, 0x0a, 0x8e, 0xbb,
+ 0x6a, 0xa0, 0x17, 0x60, 0x44, 0x44, 0x70, 0xd5, 0x83, 0xa0, 0x25, 0xcc, 0x48, 0xea, 0x3a, 0xbe,
+ 0x91, 0x80, 0xb0, 0x8e, 0xa7, 0x55, 0x63, 0xd6, 0xc6, 0xa1, 0xcc, 0x6a, 0xdc, 0xe2, 0xa8, 0xe1,
+ 0xa5, 0xb2, 0x9b, 0x0c, 0x17, 0xca, 0x6e, 0x92, 0x18, 0xd6, 0xaa, 0x85, 0x2f, 0x62, 0x20, 0xd7,
+ 0x00, 0xf5, 0x87, 0x65, 0x18, 0xe4, 0x53, 0x71, 0x0c, 0x52, 0x5e, 0x5d, 0x98, 0x94, 0x0a, 0x65,
+ 0x92, 0xe0, 0xbd, 0x9a, 0xaf, 0x39, 0xb1, 0xc3, 0x59, 0x93, 0xda, 0x21, 0x89, 0x19, 0x0a, 0xcd,
+ 0x1b, 0x7b, 0x68, 0x36, 0x65, 0x29, 0x01, 0x4e, 0x43, 0xdb, 0x51, 0x9b, 0x00, 0x11, 0x7b, 0xfe,
+ 0x96, 0xd2, 0x10, 0x99, 0x79, 0x9f, 0x2f, 0xd4, 0x8f, 0x86, 0xaa, 0xc6, 0x7b, 0x93, 0x2c, 0x4b,
+ 0x05, 0xc0, 0x1a, 0xed, 0xd9, 0x17, 0xa1, 0xaa, 0x90, 0xf3, 0x54, 0xc8, 0x51, 0x9d, 0xb5, 0xfd,
+ 0x2c, 0x4c, 0xa4, 0xda, 0xea, 0x4b, 0x03, 0xfd, 0x3d, 0x0b, 0x26, 0x78, 0x97, 0x97, 0xfd, 0x6d,
+ 0xc1, 0x0a, 0x3e, 0x67, 0xc1, 0x74, 0x2b, 0x63, 0x27, 0x8a, 0x69, 0x3e, 0xcc, 0x1e, 0x56, 0xca,
+ 0x67, 0x16, 0x14, 0x67, 0xb6, 0x86, 0xce, 0xc2, 0x30, 0x7f, 0xcd, 0xdb, 0x69, 0x09, 0x0f, 0xed,
+ 0x51, 0x9e, 0x93, 0x9c, 0x97, 0x61, 0x05, 0xb5, 0x7f, 0x6c, 0xc1, 0x14, 0xff, 0x88, 0x2b, 0x64,
+ 0x47, 0xa9, 0x57, 0x1f, 0x90, 0xcf, 0x10, 0xd9, 0xd7, 0x4b, 0x3d, 0xb2, 0xaf, 0xeb, 0x5f, 0x59,
+ 0x3e, 0xf0, 0x2b, 0xbf, 0x61, 0x81, 0x58, 0xa1, 0xc7, 0xa0, 0x3f, 0xac, 0x9a, 0xfa, 0xc3, 0x47,
+ 0x8a, 0x2c, 0xfa, 0x1e, 0x8a, 0xc3, 0xaf, 0x96, 0x60, 0x92, 0x23, 0x24, 0x37, 0x32, 0x1f, 0x94,
+ 0xc9, 0xe9, 0xef, 0x55, 0x20, 0xf5, 0x26, 0x6c, 0xf6, 0x97, 0x1a, 0x73, 0x59, 0x39, 0x70, 0x2e,
+ 0xff, 0xa7, 0x05, 0x88, 0x8f, 0x49, 0xfa, 0x29, 0x74, 0x7e, 0xba, 0x69, 0xe6, 0x80, 0x84, 0x73,
+ 0x28, 0x08, 0xd6, 0xb0, 0x1e, 0xf0, 0x27, 0xa4, 0xee, 0xc3, 0xca, 0xf9, 0xf7, 0x61, 0x7d, 0x7c,
+ 0xf5, 0x77, 0xcb, 0x90, 0x76, 0xd5, 0x44, 0x6f, 0xc3, 0x68, 0xd3, 0x69, 0x3b, 0x77, 0xbc, 0x96,
+ 0x17, 0x7b, 0x24, 0x2a, 0x76, 0xe1, 0xbe, 0xa4, 0xd5, 0x10, 0xd7, 0x50, 0x5a, 0x09, 0x36, 0x28,
+ 0xa2, 0x79, 0x80, 0x76, 0xe8, 0x6d, 0x7b, 0x2d, 0xb2, 0xc1, 0x34, 0x1e, 0x16, 0xeb, 0xc1, 0xef,
+ 0x8e, 0x65, 0x29, 0xd6, 0x30, 0x32, 0x62, 0x03, 0xca, 0xc7, 0x11, 0x1b, 0x50, 0xe9, 0x33, 0x36,
+ 0x60, 0xa0, 0x50, 0x6c, 0x00, 0x86, 0x53, 0xf2, 0xf0, 0xa6, 0xff, 0x57, 0xbc, 0x16, 0x11, 0xb2,
+ 0x1b, 0x8f, 0x05, 0x99, 0xdd, 0xdb, 0x9d, 0x3b, 0x85, 0x33, 0x31, 0x70, 0x8f, 0x9a, 0x76, 0x07,
+ 0x4e, 0x34, 0x48, 0x28, 0x9f, 0xb1, 0x53, 0x7b, 0xe9, 0x4d, 0xa8, 0x86, 0xa9, 0x6d, 0xdc, 0x67,
+ 0xc0, 0xbf, 0x96, 0xe3, 0x4d, 0x6e, 0xdb, 0x84, 0xa4, 0xfd, 0xd7, 0x4b, 0x30, 0x24, 0x9c, 0x34,
+ 0x8f, 0x41, 0xf8, 0xb8, 0x62, 0x98, 0x98, 0x9e, 0xca, 0xe3, 0x7f, 0xac, 0x5b, 0x3d, 0x8d, 0x4b,
+ 0x8d, 0x94, 0x71, 0xe9, 0x99, 0x62, 0xe4, 0x0e, 0x36, 0x2b, 0xfd, 0x93, 0x32, 0x8c, 0x9b, 0x4e,
+ 0xab, 0xc7, 0x30, 0x2c, 0xaf, 0xc1, 0x50, 0x24, 0xfc, 0xa7, 0x4b, 0x45, 0x7c, 0xf6, 0xd2, 0x53,
+ 0x9c, 0xdc, 0xc4, 0x0b, 0x8f, 0x69, 0x49, 0x2e, 0xd3, 0x45, 0xbb, 0x7c, 0x2c, 0x2e, 0xda, 0x79,
+ 0xbe, 0xc4, 0x95, 0x07, 0xe1, 0x4b, 0x6c, 0x7f, 0x8f, 0xb1, 0x7c, 0xbd, 0xfc, 0x18, 0x8e, 0xf1,
+ 0x57, 0xcd, 0xc3, 0xe1, 0x5c, 0xa1, 0x75, 0x27, 0xba, 0xd7, 0xe3, 0x38, 0xff, 0x96, 0x05, 0x23,
+ 0x02, 0xf1, 0x18, 0x3e, 0xe0, 0xe7, 0xcd, 0x0f, 0x78, 0xa2, 0xd0, 0x07, 0xf4, 0xe8, 0xf9, 0x57,
+ 0x4a, 0xaa, 0xe7, 0xf5, 0x20, 0x8c, 0x0b, 0x65, 0x42, 0x1f, 0xa6, 0xaa, 0x5f, 0xd0, 0x0c, 0x5a,
+ 0x42, 0x80, 0x7b, 0x24, 0x09, 0xfd, 0xe3, 0xe5, 0xfb, 0xda, 0x6f, 0xac, 0xb0, 0x59, 0x64, 0x5a,
+ 0x10, 0xc6, 0xe2, 0x00, 0x4d, 0x22, 0xd3, 0x82, 0x30, 0xc6, 0x0c, 0x82, 0x5c, 0x80, 0xd8, 0x09,
+ 0x37, 0x48, 0x4c, 0xcb, 0x44, 0xd4, 0x6c, 0xef, 0xdd, 0xda, 0x89, 0xbd, 0xd6, 0xbc, 0xe7, 0xc7,
+ 0x51, 0x1c, 0xce, 0xaf, 0xfa, 0xf1, 0x8d, 0x90, 0x0b, 0xfd, 0x5a, 0x2c, 0x9f, 0xa2, 0x85, 0x35,
+ 0xba, 0x32, 0x48, 0x84, 0xb5, 0x31, 0x60, 0xde, 0x20, 0x5d, 0x17, 0xe5, 0x58, 0x61, 0xd8, 0x2f,
+ 0x32, 0xce, 0xce, 0x06, 0xa8, 0xbf, 0x30, 0xbb, 0x2f, 0x0c, 0xa9, 0xa1, 0x65, 0x66, 0xe1, 0xeb,
+ 0x7a, 0x30, 0x5f, 0x51, 0xf6, 0x49, 0xbb, 0xa0, 0xfb, 0x51, 0x27, 0xb1, 0x7f, 0x88, 0x74, 0x5d,
+ 0x3b, 0xbe, 0x58, 0x98, 0x23, 0xf7, 0x71, 0xd1, 0xc8, 0x52, 0x32, 0xb2, 0x3c, 0x74, 0xab, 0xf5,
+ 0x74, 0xfe, 0xfa, 0x25, 0x09, 0xc0, 0x09, 0x0e, 0x3a, 0x2f, 0x14, 0x4a, 0x6e, 0x71, 0xf9, 0x70,
+ 0x4a, 0xa1, 0x94, 0x43, 0xa2, 0x69, 0x94, 0x17, 0x60, 0x44, 0x3d, 0x09, 0x54, 0xe7, 0x8f, 0xb1,
+ 0x54, 0xb9, 0x7c, 0xb5, 0x9c, 0x14, 0x63, 0x1d, 0x07, 0xad, 0xc1, 0x44, 0xc4, 0xdf, 0x2b, 0x92,
+ 0xd1, 0x1a, 0xc2, 0x70, 0xf0, 0xb4, 0xbc, 0xa4, 0x6c, 0x98, 0xe0, 0x7d, 0x56, 0xc4, 0xb7, 0xb2,
+ 0x8c, 0xef, 0x48, 0x93, 0x40, 0xaf, 0xc0, 0x78, 0x4b, 0x7f, 0xc3, 0xb5, 0x2e, 0xec, 0x0a, 0xca,
+ 0xed, 0xcc, 0x78, 0xe1, 0xb5, 0x8e, 0x53, 0xd8, 0xe8, 0x35, 0x98, 0xd1, 0x4b, 0x44, 0x72, 0x21,
+ 0xc7, 0xdf, 0x20, 0x91, 0x78, 0xdb, 0xe4, 0x91, 0xbd, 0xdd, 0xb9, 0x99, 0xab, 0x3d, 0x70, 0x70,
+ 0xcf, 0xda, 0xe8, 0x25, 0x18, 0x95, 0x9f, 0xaf, 0xc5, 0x36, 0x25, 0x0e, 0x8f, 0x1a, 0x0c, 0x1b,
+ 0x98, 0xe8, 0x1e, 0x9c, 0x94, 0xff, 0xd7, 0x42, 0x67, 0x7d, 0xdd, 0x6b, 0x8a, 0x20, 0xb3, 0x11,
+ 0x46, 0x62, 0x41, 0xfa, 0x8b, 0x2f, 0x67, 0x21, 0xed, 0xef, 0xce, 0x9d, 0x11, 0xa3, 0x96, 0x09,
+ 0x67, 0x93, 0x98, 0x4d, 0x1f, 0x5d, 0x83, 0x13, 0x9b, 0xc4, 0x69, 0xc5, 0x9b, 0x4b, 0x9b, 0xa4,
+ 0x79, 0x57, 0x6e, 0x2c, 0x16, 0x31, 0xa5, 0xb9, 0x04, 0x5e, 0xee, 0x46, 0xc1, 0x59, 0xf5, 0xde,
+ 0xdf, 0x9d, 0xf2, 0x2f, 0xd0, 0xca, 0x9a, 0xfc, 0x80, 0xde, 0x81, 0x51, 0x7d, 0xac, 0xd3, 0x82,
+ 0x41, 0xfe, 0xfb, 0xbe, 0x42, 0x0e, 0x51, 0x33, 0xa0, 0xc3, 0xb0, 0x41, 0xdb, 0xfe, 0x77, 0x25,
+ 0x98, 0xcb, 0xc9, 0xdd, 0x95, 0xb2, 0x66, 0x59, 0x85, 0xac, 0x59, 0x0b, 0xf2, 0xcd, 0x9b, 0xeb,
+ 0xa9, 0x9c, 0xe9, 0xa9, 0x57, 0x6c, 0x92, 0xcc, 0xe9, 0x69, 0xfc, 0xc2, 0x9e, 0x66, 0xba, 0x41,
+ 0xac, 0x92, 0xeb, 0x70, 0xf7, 0xba, 0x6e, 0xe3, 0x1c, 0x38, 0x8c, 0xd0, 0xdb, 0xd3, 0xbc, 0x69,
+ 0x7f, 0xaf, 0x04, 0x27, 0xd5, 0x60, 0xfe, 0xf4, 0x0e, 0xe1, 0x5b, 0xdd, 0x43, 0xf8, 0x40, 0xcd,
+ 0xc4, 0xf6, 0x0d, 0x18, 0x6c, 0xec, 0x44, 0xcd, 0xb8, 0x55, 0xe0, 0xc4, 0x7f, 0xdc, 0xd8, 0x57,
+ 0xc9, 0x69, 0xc4, 0x5e, 0xb2, 0x13, 0xdb, 0xcc, 0xfe, 0xbc, 0x05, 0x13, 0x6b, 0x4b, 0xf5, 0x46,
+ 0xd0, 0xbc, 0x4b, 0xe2, 0x05, 0x6e, 0xd0, 0xc0, 0xe2, 0xc0, 0xb7, 0x0e, 0x79, 0x90, 0x67, 0x89,
+ 0x08, 0x67, 0xa0, 0xb2, 0x19, 0x44, 0x71, 0xfa, 0x52, 0xe0, 0x72, 0x10, 0xc5, 0x98, 0x41, 0xec,
+ 0x3f, 0xb3, 0x60, 0x80, 0x3d, 0xd4, 0x96, 0xf7, 0xc8, 0x5f, 0x91, 0xef, 0x42, 0x2f, 0xc0, 0x20,
+ 0x59, 0x5f, 0x27, 0xcd, 0x58, 0xcc, 0xaf, 0x0c, 0xb0, 0x19, 0x5c, 0x66, 0xa5, 0xf4, 0x44, 0x63,
+ 0x8d, 0xf1, 0xbf, 0x58, 0x20, 0xa3, 0xcf, 0x40, 0x35, 0xf6, 0xb6, 0xc8, 0x82, 0xeb, 0x0a, 0x2b,
+ 0x7c, 0x7f, 0x3e, 0x5f, 0xea, 0x84, 0x5d, 0x93, 0x44, 0x70, 0x42, 0xcf, 0xfe, 0x52, 0x09, 0x20,
+ 0x09, 0x9f, 0xcb, 0xfb, 0xcc, 0xc5, 0xae, 0xb7, 0x0c, 0x9f, 0xcc, 0x78, 0xcb, 0x10, 0x25, 0x04,
+ 0x33, 0x5e, 0x32, 0x54, 0x43, 0x55, 0x2e, 0x34, 0x54, 0x95, 0x7e, 0x86, 0x6a, 0x09, 0xa6, 0x92,
+ 0xf0, 0x3f, 0x33, 0x8e, 0x9a, 0xe5, 0x1b, 0x5e, 0x4b, 0x03, 0x71, 0x37, 0xbe, 0xfd, 0x25, 0x0b,
+ 0x84, 0x97, 0x70, 0x81, 0x05, 0xed, 0xca, 0x77, 0xc7, 0x8c, 0xd4, 0x82, 0x4f, 0x17, 0x71, 0xa0,
+ 0x16, 0x09, 0x05, 0x15, 0xdf, 0x37, 0xd2, 0x08, 0x1a, 0x54, 0xed, 0xdf, 0xb6, 0x60, 0x84, 0x83,
+ 0xaf, 0x31, 0x45, 0x34, 0xbf, 0x5f, 0x7d, 0x25, 0xb3, 0x66, 0x4f, 0x72, 0x51, 0xc2, 0x2a, 0xa9,
+ 0xb1, 0xfe, 0x24, 0x97, 0x04, 0xe0, 0x04, 0x07, 0x3d, 0x05, 0x43, 0x51, 0xe7, 0x0e, 0x43, 0x4f,
+ 0xb9, 0x0c, 0x37, 0x78, 0x31, 0x96, 0x70, 0xfb, 0x9f, 0x95, 0x60, 0x32, 0xed, 0x31, 0x8e, 0x30,
+ 0x0c, 0x72, 0x06, 0x92, 0xd6, 0x69, 0x0e, 0x32, 0x80, 0x6a, 0x1e, 0xe7, 0xc0, 0x1f, 0x96, 0x67,
+ 0x2c, 0x48, 0x50, 0x42, 0xeb, 0x30, 0xe2, 0x06, 0xf7, 0xfc, 0x7b, 0x4e, 0xe8, 0x2e, 0xd4, 0x57,
+ 0xc5, 0x4c, 0xe4, 0xf8, 0xf8, 0xd5, 0x92, 0x0a, 0xba, 0x3f, 0x3b, 0x33, 0xc8, 0x25, 0x20, 0xac,
+ 0x13, 0x46, 0x6f, 0xb2, 0x4c, 0x28, 0xeb, 0xde, 0xc6, 0x35, 0xa7, 0x5d, 0xcc, 0x9b, 0x65, 0x49,
+ 0xa2, 0x6b, 0x6d, 0x8c, 0x89, 0xc4, 0x29, 0x1c, 0x80, 0x13, 0x92, 0xf6, 0xaf, 0x9e, 0x04, 0x63,
+ 0x2d, 0x18, 0x19, 0xa7, 0xad, 0x07, 0x9e, 0x71, 0xfa, 0x0d, 0x18, 0x26, 0x5b, 0xed, 0x78, 0xa7,
+ 0xe6, 0x85, 0xc5, 0xde, 0x0f, 0x58, 0x16, 0xd8, 0xdd, 0xd4, 0x25, 0x04, 0x2b, 0x8a, 0x3d, 0xf2,
+ 0x87, 0x97, 0x3f, 0x10, 0xf9, 0xc3, 0x2b, 0x7f, 0x29, 0xf9, 0xc3, 0x5f, 0x83, 0xa1, 0x0d, 0x2f,
+ 0xc6, 0xa4, 0x1d, 0x88, 0xd3, 0x38, 0x67, 0xf1, 0x5c, 0xe2, 0xc8, 0xdd, 0x99, 0x65, 0x05, 0x00,
+ 0x4b, 0x72, 0x68, 0x4d, 0x6d, 0xaa, 0xc1, 0x22, 0x32, 0x68, 0xb7, 0x81, 0x3c, 0x73, 0x5b, 0x89,
+ 0x7c, 0xe1, 0x43, 0xef, 0x3f, 0x5f, 0xb8, 0xca, 0xf2, 0x3d, 0xfc, 0xa0, 0xb2, 0x7c, 0x1b, 0xd9,
+ 0xd2, 0xab, 0x47, 0x91, 0x2d, 0xfd, 0x4b, 0x16, 0x9c, 0x6c, 0x67, 0xbd, 0x35, 0x20, 0xf2, 0x75,
+ 0xff, 0xdc, 0x21, 0x5e, 0x5f, 0x30, 0x9a, 0x66, 0xf9, 0x3d, 0x32, 0xd1, 0x70, 0x76, 0xc3, 0x32,
+ 0xed, 0xfa, 0xc8, 0xfb, 0x4f, 0xbb, 0x7e, 0xd4, 0x89, 0xbd, 0x93, 0x24, 0xec, 0x63, 0x47, 0x92,
+ 0x84, 0x7d, 0xfc, 0x01, 0x26, 0x61, 0xd7, 0xd2, 0xa7, 0x4f, 0x3c, 0xd8, 0xf4, 0xe9, 0x9b, 0xe6,
+ 0xb9, 0xc4, 0xb3, 0x75, 0xbf, 0x50, 0xf8, 0x5c, 0x32, 0x5a, 0x38, 0xf8, 0x64, 0xe2, 0x89, 0xe4,
+ 0xa7, 0xde, 0x67, 0x22, 0x79, 0x23, 0x1d, 0x3b, 0x3a, 0x8a, 0x74, 0xec, 0x6f, 0xeb, 0x27, 0xe8,
+ 0x89, 0x22, 0x2d, 0xa8, 0x83, 0xb2, 0xbb, 0x85, 0xac, 0x33, 0xb4, 0x3b, 0xe1, 0xfb, 0xf4, 0x71,
+ 0x27, 0x7c, 0x3f, 0x79, 0x84, 0x09, 0xdf, 0x4f, 0x1d, 0x6b, 0xc2, 0xf7, 0x87, 0x3e, 0x20, 0x09,
+ 0xdf, 0x67, 0x8e, 0x2b, 0xe1, 0xfb, 0xc3, 0x0f, 0x36, 0xe1, 0xfb, 0xdb, 0x50, 0x6d, 0xcb, 0xb8,
+ 0xcb, 0x99, 0xd9, 0x22, 0x53, 0x97, 0x19, 0xa6, 0xc9, 0xa7, 0x4e, 0x81, 0x70, 0x42, 0x94, 0xb6,
+ 0x90, 0x24, 0x80, 0xff, 0x70, 0x91, 0x16, 0x32, 0xed, 0x1e, 0x07, 0xa4, 0x7d, 0xff, 0x42, 0x09,
+ 0x4e, 0x1f, 0xbc, 0x3b, 0x12, 0xa3, 0x49, 0x3d, 0xb1, 0x65, 0xa7, 0x8c, 0x26, 0x4c, 0xf2, 0xd4,
+ 0xb0, 0x0a, 0x87, 0xb3, 0x5f, 0x82, 0x29, 0xe5, 0xe7, 0xd5, 0xf2, 0x9a, 0x3b, 0xda, 0x33, 0x54,
+ 0x2a, 0x3e, 0xa1, 0x91, 0x46, 0xc0, 0xdd, 0x75, 0xd0, 0x02, 0x4c, 0x18, 0x85, 0xab, 0x35, 0xa1,
+ 0xbf, 0x28, 0x2b, 0x4d, 0xc3, 0x04, 0xe3, 0x34, 0xbe, 0xfd, 0x75, 0x0b, 0x1e, 0xea, 0x91, 0xe1,
+ 0xb5, 0x70, 0x8c, 0x76, 0x1b, 0x26, 0xda, 0x66, 0xd5, 0xc2, 0x29, 0x1f, 0x8c, 0x8c, 0xb2, 0xaa,
+ 0xd7, 0x29, 0x00, 0x4e, 0x93, 0x5f, 0x3c, 0xfb, 0xfd, 0x1f, 0x9d, 0xfe, 0xd0, 0x0f, 0x7e, 0x74,
+ 0xfa, 0x43, 0x3f, 0xfc, 0xd1, 0xe9, 0x0f, 0xfd, 0xd2, 0xde, 0x69, 0xeb, 0xfb, 0x7b, 0xa7, 0xad,
+ 0x1f, 0xec, 0x9d, 0xb6, 0x7e, 0xb8, 0x77, 0xda, 0xfa, 0xf3, 0xbd, 0xd3, 0xd6, 0x97, 0x7e, 0x7c,
+ 0xfa, 0x43, 0xaf, 0x97, 0xb6, 0x2f, 0xfc, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x06, 0xe5, 0xd7,
+ 0x49, 0x99, 0xd0, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/client-go/pkg/api/v1/generated.proto b/vendor/k8s.io/client-go/pkg/api/v1/generated.proto
new file mode 100644
index 000000000..0874552d8
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/v1/generated.proto
@@ -0,0 +1,4117 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.client_go.pkg.api.v1;
+
+import "k8s.io/apimachinery/pkg/api/resource/generated.proto";
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1";
+
+// Represents a Persistent Disk resource in AWS.
+//
+// An AWS EBS disk must exist before mounting to a container. The disk
+// must also be in the same AWS zone as the kubelet. An AWS EBS disk
+// can only be mounted as read/write once. AWS EBS volumes support
+// ownership management and SELinux relabeling.
+message AWSElasticBlockStoreVolumeSource {
+ // Unique ID of the persistent disk resource in AWS (Amazon EBS volume).
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+ optional string volumeID = 1;
+
+ // Filesystem type of the volume that you want to mount.
+ // Tip: Ensure that the filesystem type is supported by the host operating system.
+ // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ optional string fsType = 2;
+
+ // The partition in the volume that you want to mount.
+ // If omitted, the default is to mount by volume name.
+ // Examples: For volume /dev/sda1, you specify the partition as "1".
+ // Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).
+ // +optional
+ optional int32 partition = 3;
+
+ // Specify "true" to force and set the ReadOnly property in VolumeMounts to "true".
+ // If omitted, the default is "false".
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+ // +optional
+ optional bool readOnly = 4;
+}
+
+// Affinity is a group of affinity scheduling rules.
+message Affinity {
+ // Describes node affinity scheduling rules for the pod.
+ // +optional
+ optional NodeAffinity nodeAffinity = 1;
+
+ // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
+ // +optional
+ optional PodAffinity podAffinity = 2;
+
+ // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
+ // +optional
+ optional PodAntiAffinity podAntiAffinity = 3;
+}
+
+// AttachedVolume describes a volume attached to a node
+message AttachedVolume {
+ // Name of the attached volume
+ optional string name = 1;
+
+ // DevicePath represents the device path where the volume should be available
+ optional string devicePath = 2;
+}
+
+// AvoidPods describes pods that should avoid this node. This is the value for a
+// Node annotation with key scheduler.alpha.kubernetes.io/preferAvoidPods and
+// will eventually become a field of NodeStatus.
+message AvoidPods {
+ // Bounded-sized list of signatures of pods that should avoid this node, sorted
+ // in timestamp order from oldest to newest. Size of the slice is unspecified.
+ // +optional
+ repeated PreferAvoidPodsEntry preferAvoidPods = 1;
+}
+
+// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
+message AzureDiskVolumeSource {
+ // The Name of the data disk in the blob storage
+ optional string diskName = 1;
+
+ // The URI the data disk in the blob storage
+ optional string diskURI = 2;
+
+ // Host Caching mode: None, Read Only, Read Write.
+ // +optional
+ optional string cachingMode = 3;
+
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ optional string fsType = 4;
+
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ optional bool readOnly = 5;
+
+ // Expected values Shared: mulitple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared
+ optional string kind = 6;
+}
+
+// AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
+message AzureFileVolumeSource {
+ // the name of secret that contains Azure Storage Account Name and Key
+ optional string secretName = 1;
+
+ // Share Name
+ optional string shareName = 2;
+
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ optional bool readOnly = 3;
+}
+
+// Binding ties one object to another; for example, a pod is bound to a node by a scheduler.
+// Deprecated in 1.7, please use the bindings subresource of pods instead.
+message Binding {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // The target object that you want to bind to the standard object.
+ optional ObjectReference target = 2;
+}
+
+// Adds and removes POSIX capabilities from running containers.
+message Capabilities {
+ // Added capabilities
+ // +optional
+ repeated string add = 1;
+
+ // Removed capabilities
+ // +optional
+ repeated string drop = 2;
+}
+
+// Represents a Ceph Filesystem mount that lasts the lifetime of a pod
+// Cephfs volumes do not support ownership management or SELinux relabeling.
+message CephFSVolumeSource {
+ // Required: Monitors is a collection of Ceph monitors
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ repeated string monitors = 1;
+
+ // Optional: Used as the mounted root, rather than the full Ceph tree, default is /
+ // +optional
+ optional string path = 2;
+
+ // Optional: User is the rados user name, default is admin
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ // +optional
+ optional string user = 3;
+
+ // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ // +optional
+ optional string secretFile = 4;
+
+ // Optional: SecretRef is reference to the authentication secret for User, default is empty.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ // +optional
+ optional LocalObjectReference secretRef = 5;
+
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ // +optional
+ optional bool readOnly = 6;
+}
+
+// Represents a cinder volume resource in Openstack.
+// A Cinder volume must exist before mounting to a container.
+// The volume must also be in the same region as the kubelet.
+// Cinder volumes support ownership management and SELinux relabeling.
+message CinderVolumeSource {
+ // volume id used to identify the volume in cinder
+ // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ optional string volumeID = 1;
+
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ // +optional
+ optional string fsType = 2;
+
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ // +optional
+ optional bool readOnly = 3;
+}
+
+// Information about the condition of a component.
+message ComponentCondition {
+ // Type of condition for a component.
+ // Valid value: "Healthy"
+ optional string type = 1;
+
+ // Status of the condition for a component.
+ // Valid values for "Healthy": "True", "False", or "Unknown".
+ optional string status = 2;
+
+ // Message about the condition for a component.
+ // For example, information about a health check.
+ // +optional
+ optional string message = 3;
+
+ // Condition error code for a component.
+ // For example, a health check error code.
+ // +optional
+ optional string error = 4;
+}
+
+// ComponentStatus (and ComponentStatusList) holds the cluster validation info.
+message ComponentStatus {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // List of component conditions observed
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ repeated ComponentCondition conditions = 2;
+}
+
+// Status of all the conditions for the component as a list of ComponentStatus objects.
+message ComponentStatusList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of ComponentStatus objects.
+ repeated ComponentStatus items = 2;
+}
+
+// ConfigMap holds configuration data for pods to consume.
+message ConfigMap {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Data contains the configuration data.
+ // Each key must consist of alphanumeric characters, '-', '_' or '.'.
+ // +optional
+ map<string, string> data = 2;
+}
+
+// ConfigMapEnvSource selects a ConfigMap to populate the environment
+// variables with.
+//
+// The contents of the target ConfigMap's Data field will represent the
+// key-value pairs as environment variables.
+message ConfigMapEnvSource {
+ // The ConfigMap to select from.
+ optional LocalObjectReference localObjectReference = 1;
+
+ // Specify whether the ConfigMap must be defined
+ // +optional
+ optional bool optional = 2;
+}
+
+// Selects a key from a ConfigMap.
+message ConfigMapKeySelector {
+ // The ConfigMap to select from.
+ optional LocalObjectReference localObjectReference = 1;
+
+ // The key to select.
+ optional string key = 2;
+
+ // Specify whether the ConfigMap or it's key must be defined
+ // +optional
+ optional bool optional = 3;
+}
+
+// ConfigMapList is a resource containing a list of ConfigMap objects.
+message ConfigMapList {
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is the list of ConfigMaps.
+ repeated ConfigMap items = 2;
+}
+
+// Adapts a ConfigMap into a projected volume.
+//
+// The contents of the target ConfigMap's Data field will be presented in a
+// projected volume as files using the keys in the Data field as the file names,
+// unless the items element is populated with specific mappings of keys to paths.
+// Note that this is identical to a configmap volume source without the default
+// mode.
+message ConfigMapProjection {
+ optional LocalObjectReference localObjectReference = 1;
+
+ // If unspecified, each key-value pair in the Data field of the referenced
+ // ConfigMap will be projected into the volume as a file whose name is the
+ // key and content is the value. If specified, the listed keys will be
+ // projected into the specified paths, and unlisted keys will not be
+ // present. If a key is specified which is not present in the ConfigMap,
+ // the volume setup will error unless it is marked optional. Paths must be
+ // relative and may not contain the '..' path or start with '..'.
+ // +optional
+ repeated KeyToPath items = 2;
+
+ // Specify whether the ConfigMap or it's keys must be defined
+ // +optional
+ optional bool optional = 4;
+}
+
+// Adapts a ConfigMap into a volume.
+//
+// The contents of the target ConfigMap's Data field will be presented in a
+// volume as files using the keys in the Data field as the file names, unless
+// the items element is populated with specific mappings of keys to paths.
+// ConfigMap volumes support ownership management and SELinux relabeling.
+message ConfigMapVolumeSource {
+ optional LocalObjectReference localObjectReference = 1;
+
+ // If unspecified, each key-value pair in the Data field of the referenced
+ // ConfigMap will be projected into the volume as a file whose name is the
+ // key and content is the value. If specified, the listed keys will be
+ // projected into the specified paths, and unlisted keys will not be
+ // present. If a key is specified which is not present in the ConfigMap,
+ // the volume setup will error unless it is marked optional. Paths must be
+ // relative and may not contain the '..' path or start with '..'.
+ // +optional
+ repeated KeyToPath items = 2;
+
+ // Optional: mode bits to use on created files by default. Must be a
+ // value between 0 and 0777. Defaults to 0644.
+ // Directories within the path are not affected by this setting.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ optional int32 defaultMode = 3;
+
+ // Specify whether the ConfigMap or it's keys must be defined
+ // +optional
+ optional bool optional = 4;
+}
+
+// A single application container that you want to run within a pod.
+message Container {
+ // Name of the container specified as a DNS_LABEL.
+ // Each container in a pod must have a unique name (DNS_LABEL).
+ // Cannot be updated.
+ optional string name = 1;
+
+ // Docker image name.
+ // More info: https://kubernetes.io/docs/concepts/containers/images
+ optional string image = 2;
+
+ // Entrypoint array. Not executed within a shell.
+ // The docker image's ENTRYPOINT is used if this is not provided.
+ // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
+ // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
+ // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
+ // regardless of whether the variable exists or not.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
+ // +optional
+ repeated string command = 3;
+
+ // Arguments to the entrypoint.
+ // The docker image's CMD is used if this is not provided.
+ // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
+ // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
+ // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
+ // regardless of whether the variable exists or not.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
+ // +optional
+ repeated string args = 4;
+
+ // Container's working directory.
+ // If not specified, the container runtime's default will be used, which
+ // might be configured in the container image.
+ // Cannot be updated.
+ // +optional
+ optional string workingDir = 5;
+
+ // List of ports to expose from the container. Exposing a port here gives
+ // the system additional information about the network connections a
+ // container uses, but is primarily informational. Not specifying a port here
+ // DOES NOT prevent that port from being exposed. Any port which is
+ // listening on the default "0.0.0.0" address inside a container will be
+ // accessible from the network.
+ // Cannot be updated.
+ // +optional
+ // +patchMergeKey=containerPort
+ // +patchStrategy=merge
+ repeated ContainerPort ports = 6;
+
+ // List of sources to populate environment variables in the container.
+ // The keys defined within a source must be a C_IDENTIFIER. All invalid keys
+ // will be reported as an event when the container is starting. When a key exists in multiple
+ // sources, the value associated with the last source will take precedence.
+ // Values defined by an Env with a duplicate key will take precedence.
+ // Cannot be updated.
+ // +optional
+ repeated EnvFromSource envFrom = 19;
+
+ // List of environment variables to set in the container.
+ // Cannot be updated.
+ // +optional
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ repeated EnvVar env = 7;
+
+ // Compute Resources required by this container.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
+ // +optional
+ optional ResourceRequirements resources = 8;
+
+ // Pod volumes to mount into the container's filesystem.
+ // Cannot be updated.
+ // +optional
+ // +patchMergeKey=mountPath
+ // +patchStrategy=merge
+ repeated VolumeMount volumeMounts = 9;
+
+ // Periodic probe of container liveness.
+ // Container will be restarted if the probe fails.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+ // +optional
+ optional Probe livenessProbe = 10;
+
+ // Periodic probe of container service readiness.
+ // Container will be removed from service endpoints if the probe fails.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+ // +optional
+ optional Probe readinessProbe = 11;
+
+ // Actions that the management system should take in response to container lifecycle events.
+ // Cannot be updated.
+ // +optional
+ optional Lifecycle lifecycle = 12;
+
+ // Optional: Path at which the file to which the container's termination message
+ // will be written is mounted into the container's filesystem.
+ // Message written is intended to be brief final status, such as an assertion failure message.
+ // Will be truncated by the node if greater than 4096 bytes. The total message length across
+ // all containers will be limited to 12kb.
+ // Defaults to /dev/termination-log.
+ // Cannot be updated.
+ // +optional
+ optional string terminationMessagePath = 13;
+
+ // Indicate how the termination message should be populated. File will use the contents of
+ // terminationMessagePath to populate the container status message on both success and failure.
+ // FallbackToLogsOnError will use the last chunk of container log output if the termination
+ // message file is empty and the container exited with an error.
+ // The log output is limited to 2048 bytes or 80 lines, whichever is smaller.
+ // Defaults to File.
+ // Cannot be updated.
+ // +optional
+ optional string terminationMessagePolicy = 20;
+
+ // Image pull policy.
+ // One of Always, Never, IfNotPresent.
+ // Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
+ // +optional
+ optional string imagePullPolicy = 14;
+
+ // Security options the pod should run with.
+ // More info: https://kubernetes.io/docs/concepts/policy/security-context/
+ // More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md
+ // +optional
+ optional SecurityContext securityContext = 15;
+
+ // Whether this container should allocate a buffer for stdin in the container runtime. If this
+ // is not set, reads from stdin in the container will always result in EOF.
+ // Default is false.
+ // +optional
+ optional bool stdin = 16;
+
+ // Whether the container runtime should close the stdin channel after it has been opened by
+ // a single attach. When stdin is true the stdin stream will remain open across multiple attach
+ // sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the
+ // first client attaches to stdin, and then remains open and accepts data until the client disconnects,
+ // at which time stdin is closed and remains closed until the container is restarted. If this
+ // flag is false, a container processes that reads from stdin will never receive an EOF.
+ // Default is false
+ // +optional
+ optional bool stdinOnce = 17;
+
+ // Whether this container should allocate a TTY for itself, also requires 'stdin' to be true.
+ // Default is false.
+ // +optional
+ optional bool tty = 18;
+}
+
+// Describe a container image
+message ContainerImage {
+ // Names by which this image is known.
+ // e.g. ["gcr.io/google_containers/hyperkube:v1.0.7", "dockerhub.io/google_containers/hyperkube:v1.0.7"]
+ repeated string names = 1;
+
+ // The size of the image in bytes.
+ // +optional
+ optional int64 sizeBytes = 2;
+}
+
+// ContainerPort represents a network port in a single container.
+message ContainerPort {
+ // If specified, this must be an IANA_SVC_NAME and unique within the pod. Each
+ // named port in a pod must have a unique name. Name for the port that can be
+ // referred to by services.
+ // +optional
+ optional string name = 1;
+
+ // Number of port to expose on the host.
+ // If specified, this must be a valid port number, 0 < x < 65536.
+ // If HostNetwork is specified, this must match ContainerPort.
+ // Most containers do not need this.
+ // +optional
+ optional int32 hostPort = 2;
+
+ // Number of port to expose on the pod's IP address.
+ // This must be a valid port number, 0 < x < 65536.
+ optional int32 containerPort = 3;
+
+ // Protocol for port. Must be UDP or TCP.
+ // Defaults to "TCP".
+ // +optional
+ optional string protocol = 4;
+
+ // What host IP to bind the external port to.
+ // +optional
+ optional string hostIP = 5;
+}
+
+// ContainerState holds a possible state of container.
+// Only one of its members may be specified.
+// If none of them is specified, the default one is ContainerStateWaiting.
+message ContainerState {
+ // Details about a waiting container
+ // +optional
+ optional ContainerStateWaiting waiting = 1;
+
+ // Details about a running container
+ // +optional
+ optional ContainerStateRunning running = 2;
+
+ // Details about a terminated container
+ // +optional
+ optional ContainerStateTerminated terminated = 3;
+}
+
+// ContainerStateRunning is a running state of a container.
+message ContainerStateRunning {
+ // Time at which the container was last (re-)started
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startedAt = 1;
+}
+
+// ContainerStateTerminated is a terminated state of a container.
+message ContainerStateTerminated {
+ // Exit status from the last termination of the container
+ optional int32 exitCode = 1;
+
+ // Signal from the last termination of the container
+ // +optional
+ optional int32 signal = 2;
+
+ // (brief) reason from the last termination of the container
+ // +optional
+ optional string reason = 3;
+
+ // Message regarding the last termination of the container
+ // +optional
+ optional string message = 4;
+
+ // Time at which previous execution of the container started
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startedAt = 5;
+
+ // Time at which the container last terminated
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time finishedAt = 6;
+
+ // Container's ID in the format 'docker://<container_id>'
+ // +optional
+ optional string containerID = 7;
+}
+
+// ContainerStateWaiting is a waiting state of a container.
+message ContainerStateWaiting {
+ // (brief) reason the container is not yet running.
+ // +optional
+ optional string reason = 1;
+
+ // Message regarding why the container is not yet running.
+ // +optional
+ optional string message = 2;
+}
+
+// ContainerStatus contains details for the current status of this container.
+message ContainerStatus {
+ // This must be a DNS_LABEL. Each container in a pod must have a unique name.
+ // Cannot be updated.
+ optional string name = 1;
+
+ // Details about the container's current condition.
+ // +optional
+ optional ContainerState state = 2;
+
+ // Details about the container's last termination condition.
+ // +optional
+ optional ContainerState lastState = 3;
+
+ // Specifies whether the container has passed its readiness probe.
+ optional bool ready = 4;
+
+ // The number of times the container has been restarted, currently based on
+ // the number of dead containers that have not yet been removed.
+ // Note that this is calculated from dead containers. But those containers are subject to
+ // garbage collection. This value will get capped at 5 by GC.
+ optional int32 restartCount = 5;
+
+ // The image the container is running.
+ // More info: https://kubernetes.io/docs/concepts/containers/images
+ // TODO(dchen1107): Which image the container is running with?
+ optional string image = 6;
+
+ // ImageID of the container's image.
+ optional string imageID = 7;
+
+ // Container's ID in the format 'docker://<container_id>'.
+ // +optional
+ optional string containerID = 8;
+}
+
+// DaemonEndpoint contains information about a single Daemon endpoint.
+message DaemonEndpoint {
+ // Port number of the given endpoint.
+ optional int32 Port = 1;
+}
+
+// DeleteOptions may be provided when deleting an API object
+// DEPRECATED: This type has been moved to meta/v1 and will be removed soon.
+// +k8s:openapi-gen=false
+message DeleteOptions {
+ // The duration in seconds before the object should be deleted. Value must be non-negative integer.
+ // The value zero indicates delete immediately. If this value is nil, the default grace period for the
+ // specified type will be used.
+ // Defaults to a per object value if not specified. zero means delete immediately.
+ // +optional
+ optional int64 gracePeriodSeconds = 1;
+
+ // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be
+ // returned.
+ // +optional
+ optional Preconditions preconditions = 2;
+
+ // Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7.
+ // Should the dependent objects be orphaned. If true/false, the "orphan"
+ // finalizer will be added to/removed from the object's finalizers list.
+ // Either this field or PropagationPolicy may be set, but not both.
+ // +optional
+ optional bool orphanDependents = 3;
+
+ // Whether and how garbage collection will be performed.
+ // Either this field or OrphanDependents may be set, but not both.
+ // The default policy is decided by the existing finalizer set in the
+ // metadata.finalizers and the resource-specific default policy.
+ // +optional
+ optional string propagationPolicy = 4;
+}
+
+// Represents downward API info for projecting into a projected volume.
+// Note that this is identical to a downwardAPI volume source without the default
+// mode.
+message DownwardAPIProjection {
+ // Items is a list of DownwardAPIVolume file
+ // +optional
+ repeated DownwardAPIVolumeFile items = 1;
+}
+
+// DownwardAPIVolumeFile represents information to create the file containing the pod field
+message DownwardAPIVolumeFile {
+ // Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'
+ optional string path = 1;
+
+ // Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.
+ // +optional
+ optional ObjectFieldSelector fieldRef = 2;
+
+ // Selects a resource of the container: only resources limits and requests
+ // (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
+ // +optional
+ optional ResourceFieldSelector resourceFieldRef = 3;
+
+ // Optional: mode bits to use on this file, must be a value between 0
+ // and 0777. If not specified, the volume defaultMode will be used.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ optional int32 mode = 4;
+}
+
+// DownwardAPIVolumeSource represents a volume containing downward API info.
+// Downward API volumes support ownership management and SELinux relabeling.
+message DownwardAPIVolumeSource {
+ // Items is a list of downward API volume file
+ // +optional
+ repeated DownwardAPIVolumeFile items = 1;
+
+ // Optional: mode bits to use on created files by default. Must be a
+ // value between 0 and 0777. Defaults to 0644.
+ // Directories within the path are not affected by this setting.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ optional int32 defaultMode = 2;
+}
+
+// Represents an empty directory for a pod.
+// Empty directory volumes support ownership management and SELinux relabeling.
+message EmptyDirVolumeSource {
+ // What type of storage medium should back this directory.
+ // The default is "" which means to use the node's default medium.
+ // Must be an empty string (default) or Memory.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
+ // +optional
+ optional string medium = 1;
+
+ // Total amount of local storage required for this EmptyDir volume.
+ // The size limit is also applicable for memory medium.
+ // The maximum usage on memory medium EmptyDir would be the minimum value between
+ // the SizeLimit specified here and the sum of memory limits of all containers in a pod.
+ // The default is nil which means that the limit is undefined.
+ // More info: http://kubernetes.io/docs/user-guide/volumes#emptydir
+ // +optional
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity sizeLimit = 2;
+}
+
+// EndpointAddress is a tuple that describes single IP address.
+message EndpointAddress {
+ // The IP of this endpoint.
+ // May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16),
+ // or link-local multicast ((224.0.0.0/24).
+ // IPv6 is also accepted but not fully supported on all platforms. Also, certain
+ // kubernetes components, like kube-proxy, are not IPv6 ready.
+ // TODO: This should allow hostname or IP, See #4447.
+ optional string ip = 1;
+
+ // The Hostname of this endpoint
+ // +optional
+ optional string hostname = 3;
+
+ // Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.
+ // +optional
+ optional string nodeName = 4;
+
+ // Reference to object providing the endpoint.
+ // +optional
+ optional ObjectReference targetRef = 2;
+}
+
+// EndpointPort is a tuple that describes a single port.
+message EndpointPort {
+ // The name of this port (corresponds to ServicePort.Name).
+ // Must be a DNS_LABEL.
+ // Optional only if one port is defined.
+ // +optional
+ optional string name = 1;
+
+ // The port number of the endpoint.
+ optional int32 port = 2;
+
+ // The IP protocol for this port.
+ // Must be UDP or TCP.
+ // Default is TCP.
+ // +optional
+ optional string protocol = 3;
+}
+
+// EndpointSubset is a group of addresses with a common set of ports. The
+// expanded set of endpoints is the Cartesian product of Addresses x Ports.
+// For example, given:
+// {
+// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
+// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
+// }
+// The resulting set of endpoints can be viewed as:
+// a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],
+// b: [ 10.10.1.1:309, 10.10.2.2:309 ]
+message EndpointSubset {
+ // IP addresses which offer the related ports that are marked as ready. These endpoints
+ // should be considered safe for load balancers and clients to utilize.
+ // +optional
+ repeated EndpointAddress addresses = 1;
+
+ // IP addresses which offer the related ports but are not currently marked as ready
+ // because they have not yet finished starting, have recently failed a readiness check,
+ // or have recently failed a liveness check.
+ // +optional
+ repeated EndpointAddress notReadyAddresses = 2;
+
+ // Port numbers available on the related IP addresses.
+ // +optional
+ repeated EndpointPort ports = 3;
+}
+
+// Endpoints is a collection of endpoints that implement the actual service. Example:
+// Name: "mysvc",
+// Subsets: [
+// {
+// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
+// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
+// },
+// {
+// Addresses: [{"ip": "10.10.3.3"}],
+// Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}]
+// },
+// ]
+message Endpoints {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // The set of all endpoints is the union of all subsets. Addresses are placed into
+ // subsets according to the IPs they share. A single address with multiple ports,
+ // some of which are ready and some of which are not (because they come from
+ // different containers) will result in the address being displayed in different
+ // subsets for the different ports. No address will appear in both Addresses and
+ // NotReadyAddresses in the same subset.
+ // Sets of addresses and ports that comprise a service.
+ repeated EndpointSubset subsets = 2;
+}
+
+// EndpointsList is a list of endpoints.
+message EndpointsList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of endpoints.
+ repeated Endpoints items = 2;
+}
+
+// EnvFromSource represents the source of a set of ConfigMaps
+message EnvFromSource {
+ // An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.
+ // +optional
+ optional string prefix = 1;
+
+ // The ConfigMap to select from
+ // +optional
+ optional ConfigMapEnvSource configMapRef = 2;
+
+ // The Secret to select from
+ // +optional
+ optional SecretEnvSource secretRef = 3;
+}
+
+// EnvVar represents an environment variable present in a Container.
+message EnvVar {
+ // Name of the environment variable. Must be a C_IDENTIFIER.
+ optional string name = 1;
+
+ // Variable references $(VAR_NAME) are expanded
+ // using the previous defined environment variables in the container and
+ // any service environment variables. If a variable cannot be resolved,
+ // the reference in the input string will be unchanged. The $(VAR_NAME)
+ // syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped
+ // references will never be expanded, regardless of whether the variable
+ // exists or not.
+ // Defaults to "".
+ // +optional
+ optional string value = 2;
+
+ // Source for the environment variable's value. Cannot be used if value is not empty.
+ // +optional
+ optional EnvVarSource valueFrom = 3;
+}
+
+// EnvVarSource represents a source for the value of an EnvVar.
+message EnvVarSource {
+ // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations,
+ // spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP.
+ // +optional
+ optional ObjectFieldSelector fieldRef = 1;
+
+ // Selects a resource of the container: only resources limits and requests
+ // (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
+ // +optional
+ optional ResourceFieldSelector resourceFieldRef = 2;
+
+ // Selects a key of a ConfigMap.
+ // +optional
+ optional ConfigMapKeySelector configMapKeyRef = 3;
+
+ // Selects a key of a secret in the pod's namespace
+ // +optional
+ optional SecretKeySelector secretKeyRef = 4;
+}
+
+// Event is a report of an event somewhere in the cluster.
+// TODO: Decide whether to store these separately or with the object they apply to.
+message Event {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // The object that this event is about.
+ optional ObjectReference involvedObject = 2;
+
+ // This should be a short, machine understandable string that gives the reason
+ // for the transition into the object's current status.
+ // TODO: provide exact specification for format.
+ // +optional
+ optional string reason = 3;
+
+ // A human-readable description of the status of this operation.
+ // TODO: decide on maximum length.
+ // +optional
+ optional string message = 4;
+
+ // The component reporting this event. Should be a short machine understandable string.
+ // +optional
+ optional EventSource source = 5;
+
+ // The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time firstTimestamp = 6;
+
+ // The time at which the most recent occurrence of this event was recorded.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTimestamp = 7;
+
+ // The number of times this event has occurred.
+ // +optional
+ optional int32 count = 8;
+
+ // Type of this event (Normal, Warning), new types could be added in the future
+ // +optional
+ optional string type = 9;
+}
+
+// EventList is a list of events.
+message EventList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of events
+ repeated Event items = 2;
+}
+
+// EventSource contains information for an event.
+message EventSource {
+ // Component from which the event is generated.
+ // +optional
+ optional string component = 1;
+
+ // Node name on which the event is generated.
+ // +optional
+ optional string host = 2;
+}
+
+// ExecAction describes a "run in container" action.
+message ExecAction {
+ // Command is the command line to execute inside the container, the working directory for the
+ // command is root ('/') in the container's filesystem. The command is simply exec'd, it is
+ // not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use
+ // a shell, you need to explicitly call out to that shell.
+ // Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
+ // +optional
+ repeated string command = 1;
+}
+
+// Represents a Fibre Channel volume.
+// Fibre Channel volumes can only be mounted as read/write once.
+// Fibre Channel volumes support ownership management and SELinux relabeling.
+message FCVolumeSource {
+ // Required: FC target worldwide names (WWNs)
+ repeated string targetWWNs = 1;
+
+ // Required: FC target lun number
+ optional int32 lun = 2;
+
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ optional string fsType = 3;
+
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ optional bool readOnly = 4;
+}
+
+// FlexVolume represents a generic volume resource that is
+// provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.
+message FlexVolumeSource {
+ // Driver is the name of the driver to use for this volume.
+ optional string driver = 1;
+
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script.
+ // +optional
+ optional string fsType = 2;
+
+ // Optional: SecretRef is reference to the secret object containing
+ // sensitive information to pass to the plugin scripts. This may be
+ // empty if no secret object is specified. If the secret object
+ // contains more than one secret, all secrets are passed to the plugin
+ // scripts.
+ // +optional
+ optional LocalObjectReference secretRef = 3;
+
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ optional bool readOnly = 4;
+
+ // Optional: Extra command options if any.
+ // +optional
+ map<string, string> options = 5;
+}
+
+// Represents a Flocker volume mounted by the Flocker agent.
+// One and only one of datasetName and datasetUUID should be set.
+// Flocker volumes do not support ownership management or SELinux relabeling.
+message FlockerVolumeSource {
+ // Name of the dataset stored as metadata -> name on the dataset for Flocker
+ // should be considered as deprecated
+ // +optional
+ optional string datasetName = 1;
+
+ // UUID of the dataset. This is unique identifier of a Flocker dataset
+ // +optional
+ optional string datasetUUID = 2;
+}
+
+// Represents a Persistent Disk resource in Google Compute Engine.
+//
+// A GCE PD must exist before mounting to a container. The disk must
+// also be in the same GCE project and zone as the kubelet. A GCE PD
+// can only be mounted as read/write once or read-only many times. GCE
+// PDs support ownership management and SELinux relabeling.
+message GCEPersistentDiskVolumeSource {
+ // Unique name of the PD resource in GCE. Used to identify the disk in GCE.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ optional string pdName = 1;
+
+ // Filesystem type of the volume that you want to mount.
+ // Tip: Ensure that the filesystem type is supported by the host operating system.
+ // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ optional string fsType = 2;
+
+ // The partition in the volume that you want to mount.
+ // If omitted, the default is to mount by volume name.
+ // Examples: For volume /dev/sda1, you specify the partition as "1".
+ // Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ // +optional
+ optional int32 partition = 3;
+
+ // ReadOnly here will force the ReadOnly setting in VolumeMounts.
+ // Defaults to false.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ // +optional
+ optional bool readOnly = 4;
+}
+
+// Represents a volume that is populated with the contents of a git repository.
+// Git repo volumes do not support ownership management.
+// Git repo volumes support SELinux relabeling.
+message GitRepoVolumeSource {
+ // Repository URL
+ optional string repository = 1;
+
+ // Commit hash for the specified revision.
+ // +optional
+ optional string revision = 2;
+
+ // Target directory name.
+ // Must not contain or start with '..'. If '.' is supplied, the volume directory will be the
+ // git repository. Otherwise, if specified, the volume will contain the git repository in
+ // the subdirectory with the given name.
+ // +optional
+ optional string directory = 3;
+}
+
+// Represents a Glusterfs mount that lasts the lifetime of a pod.
+// Glusterfs volumes do not support ownership management or SELinux relabeling.
+message GlusterfsVolumeSource {
+ // EndpointsName is the endpoint name that details Glusterfs topology.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
+ optional string endpoints = 1;
+
+ // Path is the Glusterfs volume path.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
+ optional string path = 2;
+
+ // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions.
+ // Defaults to false.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
+ // +optional
+ optional bool readOnly = 3;
+}
+
+// HTTPGetAction describes an action based on HTTP Get requests.
+message HTTPGetAction {
+ // Path to access on the HTTP server.
+ // +optional
+ optional string path = 1;
+
+ // Name or number of the port to access on the container.
+ // Number must be in the range 1 to 65535.
+ // Name must be an IANA_SVC_NAME.
+ optional k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 2;
+
+ // Host name to connect to, defaults to the pod IP. You probably want to set
+ // "Host" in httpHeaders instead.
+ // +optional
+ optional string host = 3;
+
+ // Scheme to use for connecting to the host.
+ // Defaults to HTTP.
+ // +optional
+ optional string scheme = 4;
+
+ // Custom headers to set in the request. HTTP allows repeated headers.
+ // +optional
+ repeated HTTPHeader httpHeaders = 5;
+}
+
+// HTTPHeader describes a custom header to be used in HTTP probes
+message HTTPHeader {
+ // The header field name
+ optional string name = 1;
+
+ // The header field value
+ optional string value = 2;
+}
+
+// Handler defines a specific action that should be taken
+// TODO: pass structured data to these actions, and document that data here.
+message Handler {
+ // One and only one of the following should be specified.
+ // Exec specifies the action to take.
+ // +optional
+ optional ExecAction exec = 1;
+
+ // HTTPGet specifies the http request to perform.
+ // +optional
+ optional HTTPGetAction httpGet = 2;
+
+ // TCPSocket specifies an action involving a TCP port.
+ // TCP hooks not yet supported
+ // TODO: implement a realistic TCP lifecycle hook
+ // +optional
+ optional TCPSocketAction tcpSocket = 3;
+}
+
+// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
+// pod's hosts file.
+message HostAlias {
+ // IP address of the host file entry.
+ optional string ip = 1;
+
+ // Hostnames for the above IP address.
+ repeated string hostnames = 2;
+}
+
+// Represents a host path mapped into a pod.
+// Host path volumes do not support ownership management or SELinux relabeling.
+message HostPathVolumeSource {
+ // Path of the directory on the host.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
+ optional string path = 1;
+}
+
+// Represents an ISCSI disk.
+// ISCSI volumes can only be mounted as read/write once.
+// ISCSI volumes support ownership management and SELinux relabeling.
+message ISCSIVolumeSource {
+ // iSCSI target portal. The portal is either an IP or ip_addr:port if the port
+ // is other than default (typically TCP ports 860 and 3260).
+ optional string targetPortal = 1;
+
+ // Target iSCSI Qualified Name.
+ optional string iqn = 2;
+
+ // iSCSI target lun number.
+ optional int32 lun = 3;
+
+ // Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport.
+ // +optional
+ optional string iscsiInterface = 4;
+
+ // Filesystem type of the volume that you want to mount.
+ // Tip: Ensure that the filesystem type is supported by the host operating system.
+ // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ optional string fsType = 5;
+
+ // ReadOnly here will force the ReadOnly setting in VolumeMounts.
+ // Defaults to false.
+ // +optional
+ optional bool readOnly = 6;
+
+ // iSCSI target portal List. The portal is either an IP or ip_addr:port if the port
+ // is other than default (typically TCP ports 860 and 3260).
+ // +optional
+ repeated string portals = 7;
+
+ // whether support iSCSI Discovery CHAP authentication
+ // +optional
+ optional bool chapAuthDiscovery = 8;
+
+ // whether support iSCSI Session CHAP authentication
+ // +optional
+ optional bool chapAuthSession = 11;
+
+ // CHAP secret for iSCSI target and initiator authentication
+ // +optional
+ optional LocalObjectReference secretRef = 10;
+}
+
+// Maps a string key to a path within a volume.
+message KeyToPath {
+ // The key to project.
+ optional string key = 1;
+
+ // The relative path of the file to map the key to.
+ // May not be an absolute path.
+ // May not contain the path element '..'.
+ // May not start with the string '..'.
+ optional string path = 2;
+
+ // Optional: mode bits to use on this file, must be a value between 0
+ // and 0777. If not specified, the volume defaultMode will be used.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ optional int32 mode = 3;
+}
+
+// Lifecycle describes actions that the management system should take in response to container lifecycle
+// events. For the PostStart and PreStop lifecycle handlers, management of the container blocks
+// until the action is complete, unless the container process fails, in which case the handler is aborted.
+message Lifecycle {
+ // PostStart is called immediately after a container is created. If the handler fails,
+ // the container is terminated and restarted according to its restart policy.
+ // Other management of the container blocks until the hook completes.
+ // More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
+ // +optional
+ optional Handler postStart = 1;
+
+ // PreStop is called immediately before a container is terminated.
+ // The container is terminated after the handler completes.
+ // The reason for termination is passed to the handler.
+ // Regardless of the outcome of the handler, the container is eventually terminated.
+ // Other management of the container blocks until the hook completes.
+ // More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
+ // +optional
+ optional Handler preStop = 2;
+}
+
+// LimitRange sets resource usage limits for each kind of resource in a Namespace.
+message LimitRange {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec defines the limits enforced.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional LimitRangeSpec spec = 2;
+}
+
+// LimitRangeItem defines a min/max usage limit for any resource that matches on kind.
+message LimitRangeItem {
+ // Type of resource that this limit applies to.
+ // +optional
+ optional string type = 1;
+
+ // Max usage constraints on this kind by resource name.
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> max = 2;
+
+ // Min usage constraints on this kind by resource name.
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> min = 3;
+
+ // Default resource requirement limit value by resource name if resource limit is omitted.
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> default = 4;
+
+ // DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> defaultRequest = 5;
+
+ // MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> maxLimitRequestRatio = 6;
+}
+
+// LimitRangeList is a list of LimitRange items.
+message LimitRangeList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of LimitRange objects.
+ // More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_limit_range.md
+ repeated LimitRange items = 2;
+}
+
+// LimitRangeSpec defines a min/max usage limit for resources that match on kind.
+message LimitRangeSpec {
+ // Limits is the list of LimitRangeItem objects that are enforced.
+ repeated LimitRangeItem limits = 1;
+}
+
+// List holds a list of objects, which may not be known by the server.
+message List {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of objects
+ repeated k8s.io.apimachinery.pkg.runtime.RawExtension items = 2;
+}
+
+// ListOptions is the query options to a standard REST list call.
+// DEPRECATED: This type has been moved to meta/v1 and will be removed soon.
+// +k8s:openapi-gen=false
+message ListOptions {
+ // A selector to restrict the list of returned objects by their labels.
+ // Defaults to everything.
+ // +optional
+ optional string labelSelector = 1;
+
+ // A selector to restrict the list of returned objects by their fields.
+ // Defaults to everything.
+ // +optional
+ optional string fieldSelector = 2;
+
+ // If true, partially initialized resources are included in the response.
+ // +optional
+ optional bool includeUninitialized = 6;
+
+ // Watch for changes to the described resources and return them as a stream of
+ // add, update, and remove notifications. Specify resourceVersion.
+ // +optional
+ optional bool watch = 3;
+
+ // When specified with a watch call, shows changes that occur after that particular version of a resource.
+ // Defaults to changes from the beginning of history.
+ // When specified for list:
+ // - if unset, then the result is returned from remote storage based on quorum-read flag;
+ // - if it's 0, then we simply return what we currently have in cache, no guarantee;
+ // - if set to non zero, then the result is at least as fresh as given rv.
+ // +optional
+ optional string resourceVersion = 4;
+
+ // Timeout for the list/watch call.
+ // +optional
+ optional int64 timeoutSeconds = 5;
+}
+
+// LoadBalancerIngress represents the status of a load-balancer ingress point:
+// traffic intended for the service should be sent to an ingress point.
+message LoadBalancerIngress {
+ // IP is set for load-balancer ingress points that are IP based
+ // (typically GCE or OpenStack load-balancers)
+ // +optional
+ optional string ip = 1;
+
+ // Hostname is set for load-balancer ingress points that are DNS based
+ // (typically AWS load-balancers)
+ // +optional
+ optional string hostname = 2;
+}
+
+// LoadBalancerStatus represents the status of a load-balancer.
+message LoadBalancerStatus {
+ // Ingress is a list containing ingress points for the load-balancer.
+ // Traffic intended for the service should be sent to these ingress points.
+ // +optional
+ repeated LoadBalancerIngress ingress = 1;
+}
+
+// LocalObjectReference contains enough information to let you locate the
+// referenced object inside the same namespace.
+message LocalObjectReference {
+ // Name of the referent.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ // TODO: Add other useful fields. apiVersion, kind, uid?
+ // +optional
+ optional string name = 1;
+}
+
+// Local represents directly-attached storage with node affinity
+message LocalVolumeSource {
+ // The full path to the volume on the node
+ // For alpha, this path must be a directory
+ // Once block as a source is supported, then this path can point to a block device
+ optional string path = 1;
+}
+
+// Represents an NFS mount that lasts the lifetime of a pod.
+// NFS volumes do not support ownership management or SELinux relabeling.
+message NFSVolumeSource {
+ // Server is the hostname or IP address of the NFS server.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+ optional string server = 1;
+
+ // Path that is exported by the NFS server.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+ optional string path = 2;
+
+ // ReadOnly here will force
+ // the NFS export to be mounted with read-only permissions.
+ // Defaults to false.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+ // +optional
+ optional bool readOnly = 3;
+}
+
+// Namespace provides a scope for Names.
+// Use of multiple namespaces is optional.
+message Namespace {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec defines the behavior of the Namespace.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional NamespaceSpec spec = 2;
+
+ // Status describes the current status of a Namespace.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional NamespaceStatus status = 3;
+}
+
+// NamespaceList is a list of Namespaces.
+message NamespaceList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is the list of Namespace objects in the list.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
+ repeated Namespace items = 2;
+}
+
+// NamespaceSpec describes the attributes on a Namespace.
+message NamespaceSpec {
+ // Finalizers is an opaque list of values that must be empty to permanently remove object from storage.
+ // More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#finalizers
+ // +optional
+ repeated string finalizers = 1;
+}
+
+// NamespaceStatus is information about the current status of a Namespace.
+message NamespaceStatus {
+ // Phase is the current lifecycle phase of the namespace.
+ // More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#phases
+ // +optional
+ optional string phase = 1;
+}
+
+// Node is a worker node in Kubernetes.
+// Each node will have a unique identifier in the cache (i.e. in etcd).
+message Node {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec defines the behavior of a node.
+ // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional NodeSpec spec = 2;
+
+ // Most recently observed status of the node.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional NodeStatus status = 3;
+}
+
+// NodeAddress contains information for the node's address.
+message NodeAddress {
+ // Node address type, one of Hostname, ExternalIP or InternalIP.
+ optional string type = 1;
+
+ // The node address.
+ optional string address = 2;
+}
+
+// Node affinity is a group of node affinity scheduling rules.
+message NodeAffinity {
+ // If the affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to an update), the system
+ // may or may not try to eventually evict the pod from its node.
+ // +optional
+ optional NodeSelector requiredDuringSchedulingIgnoredDuringExecution = 1;
+
+ // The scheduler will prefer to schedule pods to nodes that satisfy
+ // the affinity expressions specified by this field, but it may choose
+ // a node that violates one or more of the expressions. The node that is
+ // most preferred is the one with the greatest sum of weights, i.e.
+ // for each node that meets all of the scheduling requirements (resource
+ // request, requiredDuringScheduling affinity expressions, etc.),
+ // compute a sum by iterating through the elements of this field and adding
+ // "weight" to the sum if the node matches the corresponding matchExpressions; the
+ // node(s) with the highest sum are the most preferred.
+ // +optional
+ repeated PreferredSchedulingTerm preferredDuringSchedulingIgnoredDuringExecution = 2;
+}
+
+// NodeCondition contains condition information for a node.
+message NodeCondition {
+ // Type of node condition.
+ optional string type = 1;
+
+ // Status of the condition, one of True, False, Unknown.
+ optional string status = 2;
+
+ // Last time we got an update on a given condition.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastHeartbeatTime = 3;
+
+ // Last time the condition transit from one status to another.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4;
+
+ // (brief) reason for the condition's last transition.
+ // +optional
+ optional string reason = 5;
+
+ // Human readable message indicating details about last transition.
+ // +optional
+ optional string message = 6;
+}
+
+// NodeDaemonEndpoints lists ports opened by daemons running on the Node.
+message NodeDaemonEndpoints {
+ // Endpoint on which Kubelet is listening.
+ // +optional
+ optional DaemonEndpoint kubeletEndpoint = 1;
+}
+
+// NodeList is the whole list of all Nodes which have been registered with master.
+message NodeList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of nodes
+ repeated Node items = 2;
+}
+
+// NodeProxyOptions is the query options to a Node's proxy call.
+message NodeProxyOptions {
+ // Path is the URL path to use for the current proxy request to node.
+ // +optional
+ optional string path = 1;
+}
+
+// NodeResources is an object for conveying resource information about a node.
+// see http://releases.k8s.io/HEAD/docs/design/resources.md for more details.
+message NodeResources {
+ // Capacity represents the available resources of a node
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> capacity = 1;
+}
+
+// A node selector represents the union of the results of one or more label queries
+// over a set of nodes; that is, it represents the OR of the selectors represented
+// by the node selector terms.
+message NodeSelector {
+ // Required. A list of node selector terms. The terms are ORed.
+ repeated NodeSelectorTerm nodeSelectorTerms = 1;
+}
+
+// A node selector requirement is a selector that contains values, a key, and an operator
+// that relates the key and values.
+message NodeSelectorRequirement {
+ // The label key that the selector applies to.
+ // +patchMergeKey=key
+ // +patchStrategy=merge
+ optional string key = 1;
+
+ // Represents a key's relationship to a set of values.
+ // Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
+ optional string operator = 2;
+
+ // An array of string values. If the operator is In or NotIn,
+ // the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ // the values array must be empty. If the operator is Gt or Lt, the values
+ // array must have a single element, which will be interpreted as an integer.
+ // This array is replaced during a strategic merge patch.
+ // +optional
+ repeated string values = 3;
+}
+
+// A null or empty node selector term matches no objects.
+message NodeSelectorTerm {
+ // Required. A list of node selector requirements. The requirements are ANDed.
+ repeated NodeSelectorRequirement matchExpressions = 1;
+}
+
+// NodeSpec describes the attributes that a node is created with.
+message NodeSpec {
+ // PodCIDR represents the pod IP range assigned to the node.
+ // +optional
+ optional string podCIDR = 1;
+
+ // External ID of the node assigned by some machine database (e.g. a cloud provider).
+ // Deprecated.
+ // +optional
+ optional string externalID = 2;
+
+ // ID of the node assigned by the cloud provider in the format: <ProviderName>://<ProviderSpecificNodeID>
+ // +optional
+ optional string providerID = 3;
+
+ // Unschedulable controls node schedulability of new pods. By default, node is schedulable.
+ // More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration
+ // +optional
+ optional bool unschedulable = 4;
+
+ // If specified, the node's taints.
+ // +optional
+ repeated Taint taints = 5;
+}
+
+// NodeStatus is information about the current status of a node.
+message NodeStatus {
+ // Capacity represents the total resources of a node.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> capacity = 1;
+
+ // Allocatable represents the resources of a node that are available for scheduling.
+ // Defaults to Capacity.
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> allocatable = 2;
+
+ // NodePhase is the recently observed lifecycle phase of the node.
+ // More info: https://kubernetes.io/docs/concepts/nodes/node/#phase
+ // The field is never populated, and now is deprecated.
+ // +optional
+ optional string phase = 3;
+
+ // Conditions is an array of current observed node conditions.
+ // More info: https://kubernetes.io/docs/concepts/nodes/node/#condition
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ repeated NodeCondition conditions = 4;
+
+ // List of addresses reachable to the node.
+ // Queried from cloud provider, if available.
+ // More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ repeated NodeAddress addresses = 5;
+
+ // Endpoints of daemons running on the Node.
+ // +optional
+ optional NodeDaemonEndpoints daemonEndpoints = 6;
+
+ // Set of ids/uuids to uniquely identify the node.
+ // More info: https://kubernetes.io/docs/concepts/nodes/node/#info
+ // +optional
+ optional NodeSystemInfo nodeInfo = 7;
+
+ // List of container images on this node
+ // +optional
+ repeated ContainerImage images = 8;
+
+ // List of attachable volumes in use (mounted) by the node.
+ // +optional
+ repeated string volumesInUse = 9;
+
+ // List of volumes that are attached to the node.
+ // +optional
+ repeated AttachedVolume volumesAttached = 10;
+}
+
+// NodeSystemInfo is a set of ids/uuids to uniquely identify the node.
+message NodeSystemInfo {
+ // MachineID reported by the node. For unique machine identification
+ // in the cluster this field is preferred. Learn more from man(5)
+ // machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html
+ optional string machineID = 1;
+
+ // SystemUUID reported by the node. For unique machine identification
+ // MachineID is preferred. This field is specific to Red Hat hosts
+ // https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html
+ optional string systemUUID = 2;
+
+ // Boot ID reported by the node.
+ optional string bootID = 3;
+
+ // Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).
+ optional string kernelVersion = 4;
+
+ // OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).
+ optional string osImage = 5;
+
+ // ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0).
+ optional string containerRuntimeVersion = 6;
+
+ // Kubelet Version reported by the node.
+ optional string kubeletVersion = 7;
+
+ // KubeProxy Version reported by the node.
+ optional string kubeProxyVersion = 8;
+
+ // The Operating System reported by the node
+ optional string operatingSystem = 9;
+
+ // The Architecture reported by the node
+ optional string architecture = 10;
+}
+
+// ObjectFieldSelector selects an APIVersioned field of an object.
+message ObjectFieldSelector {
+ // Version of the schema the FieldPath is written in terms of, defaults to "v1".
+ // +optional
+ optional string apiVersion = 1;
+
+ // Path of the field to select in the specified API version.
+ optional string fieldPath = 2;
+}
+
+// ObjectMeta is metadata that all persisted resources must have, which includes all objects
+// users must create.
+// DEPRECATED: Use k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta instead - this type will be removed soon.
+// +k8s:openapi-gen=false
+message ObjectMeta {
+ // Name must be unique within a namespace. Is required when creating resources, although
+ // some resources may allow a client to request the generation of an appropriate name
+ // automatically. Name is primarily intended for creation idempotence and configuration
+ // definition.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ // +optional
+ optional string name = 1;
+
+ // GenerateName is an optional prefix, used by the server, to generate a unique
+ // name ONLY IF the Name field has not been provided.
+ // If this field is used, the name returned to the client will be different
+ // than the name passed. This value will also be combined with a unique suffix.
+ // The provided value has the same validation rules as the Name field,
+ // and may be truncated by the length of the suffix required to make the value
+ // unique on the server.
+ //
+ // If this field is specified and the generated name exists, the server will
+ // NOT return a 409 - instead, it will either return 201 Created or 500 with Reason
+ // ServerTimeout indicating a unique name could not be found in the time allotted, and the client
+ // should retry (optionally after the time indicated in the Retry-After header).
+ //
+ // Applied only if Name is not specified.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency
+ // +optional
+ optional string generateName = 2;
+
+ // Namespace defines the space within each name must be unique. An empty namespace is
+ // equivalent to the "default" namespace, but "default" is the canonical representation.
+ // Not all objects are required to be scoped to a namespace - the value of this field for
+ // those objects will be empty.
+ //
+ // Must be a DNS_LABEL.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
+ // +optional
+ optional string namespace = 3;
+
+ // SelfLink is a URL representing this object.
+ // Populated by the system.
+ // Read-only.
+ // +optional
+ optional string selfLink = 4;
+
+ // UID is the unique in time and space value for this object. It is typically generated by
+ // the server on successful creation of a resource and is not allowed to change on PUT
+ // operations.
+ //
+ // Populated by the system.
+ // Read-only.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
+ // +optional
+ optional string uid = 5;
+
+ // An opaque value that represents the internal version of this object that can
+ // be used by clients to determine when objects have changed. May be used for optimistic
+ // concurrency, change detection, and the watch operation on a resource or set of resources.
+ // Clients must treat these values as opaque and passed unmodified back to the server.
+ // They may only be valid for a particular resource or set of resources.
+ //
+ // Populated by the system.
+ // Read-only.
+ // Value must be treated as opaque by clients and .
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
+ // +optional
+ optional string resourceVersion = 6;
+
+ // A sequence number representing a specific generation of the desired state.
+ // Populated by the system. Read-only.
+ // +optional
+ optional int64 generation = 7;
+
+ // CreationTimestamp is a timestamp representing the server time when this object was
+ // created. It is not guaranteed to be set in happens-before order across separate operations.
+ // Clients may not set this value. It is represented in RFC3339 form and is in UTC.
+ //
+ // Populated by the system.
+ // Read-only.
+ // Null for lists.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time creationTimestamp = 8;
+
+ // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This
+ // field is set by the server when a graceful deletion is requested by the user, and is not
+ // directly settable by a client. The resource is expected to be deleted (no longer visible
+ // from resource lists, and not reachable by name) after the time in this field. Once set,
+ // this value may not be unset or be set further into the future, although it may be shortened
+ // or the resource may be deleted prior to this time. For example, a user may request that
+ // a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination
+ // signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard
+ // termination signal (SIGKILL) to the container and after cleanup, remove the pod from the
+ // API. In the presence of network partitions, this object may still exist after this
+ // timestamp, until an administrator or automated process can determine the resource is
+ // fully terminated.
+ // If not set, graceful deletion of the object has not been requested.
+ //
+ // Populated by the system when a graceful deletion is requested.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time deletionTimestamp = 9;
+
+ // Number of seconds allowed for this object to gracefully terminate before
+ // it will be removed from the system. Only set when deletionTimestamp is also set.
+ // May only be shortened.
+ // Read-only.
+ // +optional
+ optional int64 deletionGracePeriodSeconds = 10;
+
+ // Map of string keys and values that can be used to organize and categorize
+ // (scope and select) objects. May match selectors of replication controllers
+ // and services.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
+ // +optional
+ map<string, string> labels = 11;
+
+ // Annotations is an unstructured key value map stored with a resource that may be
+ // set by external tools to store and retrieve arbitrary metadata. They are not
+ // queryable and should be preserved when modifying objects.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
+ // +optional
+ map<string, string> annotations = 12;
+
+ // List of objects depended by this object. If ALL objects in the list have
+ // been deleted, this object will be garbage collected. If this object is managed by a controller,
+ // then an entry in this list will point to this controller, with the controller field set to true.
+ // There cannot be more than one managing controller.
+ // +optional
+ // +patchMergeKey=uid
+ // +patchStrategy=merge
+ repeated k8s.io.apimachinery.pkg.apis.meta.v1.OwnerReference ownerReferences = 13;
+
+ // An initializer is a controller which enforces some system invariant at object creation time.
+ // This field is a list of initializers that have not yet acted on this object. If nil or empty,
+ // this object has been completely initialized. Otherwise, the object is considered uninitialized
+ // and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to
+ // observe uninitialized objects.
+ //
+ // When an object is created, the system will populate this list with the current set of initializers.
+ // Only privileged users may set or modify this list. Once it is empty, it may not be modified further
+ // by any user.
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Initializers initializers = 16;
+
+ // Must be empty before the object is deleted from the registry. Each entry
+ // is an identifier for the responsible component that will remove the entry
+ // from the list. If the deletionTimestamp of the object is non-nil, entries
+ // in this list can only be removed.
+ // +optional
+ // +patchStrategy=merge
+ repeated string finalizers = 14;
+
+ // The name of the cluster which the object belongs to.
+ // This is used to distinguish resources with same name and namespace in different clusters.
+ // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.
+ // +optional
+ optional string clusterName = 15;
+}
+
+// ObjectReference contains enough information to let you inspect or modify the referred object.
+message ObjectReference {
+ // Kind of the referent.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional string kind = 1;
+
+ // Namespace of the referent.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
+ // +optional
+ optional string namespace = 2;
+
+ // Name of the referent.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ // +optional
+ optional string name = 3;
+
+ // UID of the referent.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
+ // +optional
+ optional string uid = 4;
+
+ // API version of the referent.
+ // +optional
+ optional string apiVersion = 5;
+
+ // Specific resourceVersion to which this reference is made, if any.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
+ // +optional
+ optional string resourceVersion = 6;
+
+ // If referring to a piece of an object instead of an entire object, this string
+ // should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
+ // For example, if the object reference is to a container within a pod, this would take on a value like:
+ // "spec.containers{name}" (where "name" refers to the name of the container that triggered
+ // the event) or if no container name is specified "spec.containers[2]" (container with
+ // index 2 in this pod). This syntax is chosen only to have some well-defined way of
+ // referencing a part of an object.
+ // TODO: this design is not final and this field is subject to change in the future.
+ // +optional
+ optional string fieldPath = 7;
+}
+
+// PersistentVolume (PV) is a storage resource provisioned by an administrator.
+// It is analogous to a node.
+// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
+message PersistentVolume {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec defines a specification of a persistent volume owned by the cluster.
+ // Provisioned by an administrator.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes
+ // +optional
+ optional PersistentVolumeSpec spec = 2;
+
+ // Status represents the current information/status for the persistent volume.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes
+ // +optional
+ optional PersistentVolumeStatus status = 3;
+}
+
+// PersistentVolumeClaim is a user's request for and claim to a persistent volume
+message PersistentVolumeClaim {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec defines the desired characteristics of a volume requested by a pod author.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+ // +optional
+ optional PersistentVolumeClaimSpec spec = 2;
+
+ // Status represents the current information/status of a persistent volume claim.
+ // Read-only.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+ // +optional
+ optional PersistentVolumeClaimStatus status = 3;
+}
+
+// PersistentVolumeClaimList is a list of PersistentVolumeClaim items.
+message PersistentVolumeClaimList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // A list of persistent volume claims.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+ repeated PersistentVolumeClaim items = 2;
+}
+
+// PersistentVolumeClaimSpec describes the common attributes of storage devices
+// and allows a Source for provider-specific attributes
+message PersistentVolumeClaimSpec {
+ // AccessModes contains the desired access modes the volume should have.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
+ // +optional
+ repeated string accessModes = 1;
+
+ // A label query over volumes to consider for binding.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
+
+ // Resources represents the minimum resources the volume should have.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
+ // +optional
+ optional ResourceRequirements resources = 2;
+
+ // VolumeName is the binding reference to the PersistentVolume backing this claim.
+ // +optional
+ optional string volumeName = 3;
+
+ // Name of the StorageClass required by the claim.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
+ // +optional
+ optional string storageClassName = 5;
+}
+
+// PersistentVolumeClaimStatus is the current status of a persistent volume claim.
+message PersistentVolumeClaimStatus {
+ // Phase represents the current phase of PersistentVolumeClaim.
+ // +optional
+ optional string phase = 1;
+
+ // AccessModes contains the actual access modes the volume backing the PVC has.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
+ // +optional
+ repeated string accessModes = 2;
+
+ // Represents the actual resources of the underlying volume.
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> capacity = 3;
+}
+
+// PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace.
+// This volume finds the bound PV and mounts that volume for the pod. A
+// PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another
+// type of volume that is owned by someone else (the system).
+message PersistentVolumeClaimVolumeSource {
+ // ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+ optional string claimName = 1;
+
+ // Will force the ReadOnly setting in VolumeMounts.
+ // Default false.
+ // +optional
+ optional bool readOnly = 2;
+}
+
+// PersistentVolumeList is a list of PersistentVolume items.
+message PersistentVolumeList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of persistent volumes.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
+ repeated PersistentVolume items = 2;
+}
+
+// PersistentVolumeSource is similar to VolumeSource but meant for the
+// administrator who creates PVs. Exactly one of its members must be set.
+message PersistentVolumeSource {
+ // GCEPersistentDisk represents a GCE Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod. Provisioned by an admin.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ // +optional
+ optional GCEPersistentDiskVolumeSource gcePersistentDisk = 1;
+
+ // AWSElasticBlockStore represents an AWS Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+ // +optional
+ optional AWSElasticBlockStoreVolumeSource awsElasticBlockStore = 2;
+
+ // HostPath represents a directory on the host.
+ // Provisioned by a developer or tester.
+ // This is useful for single-node development and testing only!
+ // On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
+ // +optional
+ optional HostPathVolumeSource hostPath = 3;
+
+ // Glusterfs represents a Glusterfs volume that is attached to a host and
+ // exposed to the pod. Provisioned by an admin.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md
+ // +optional
+ optional GlusterfsVolumeSource glusterfs = 4;
+
+ // NFS represents an NFS mount on the host. Provisioned by an admin.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+ // +optional
+ optional NFSVolumeSource nfs = 5;
+
+ // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md
+ // +optional
+ optional RBDVolumeSource rbd = 6;
+
+ // ISCSI represents an ISCSI Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod. Provisioned by an admin.
+ // +optional
+ optional ISCSIVolumeSource iscsi = 7;
+
+ // Cinder represents a cinder volume attached and mounted on kubelets host machine
+ // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ // +optional
+ optional CinderVolumeSource cinder = 8;
+
+ // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
+ // +optional
+ optional CephFSVolumeSource cephfs = 9;
+
+ // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
+ // +optional
+ optional FCVolumeSource fc = 10;
+
+ // Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running
+ // +optional
+ optional FlockerVolumeSource flocker = 11;
+
+ // FlexVolume represents a generic volume resource that is
+ // provisioned/attached using an exec based plugin. This is an
+ // alpha feature and may change in future.
+ // +optional
+ optional FlexVolumeSource flexVolume = 12;
+
+ // AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
+ // +optional
+ optional AzureFileVolumeSource azureFile = 13;
+
+ // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
+ // +optional
+ optional VsphereVirtualDiskVolumeSource vsphereVolume = 14;
+
+ // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
+ // +optional
+ optional QuobyteVolumeSource quobyte = 15;
+
+ // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
+ // +optional
+ optional AzureDiskVolumeSource azureDisk = 16;
+
+ // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine
+ optional PhotonPersistentDiskVolumeSource photonPersistentDisk = 17;
+
+ // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine
+ // +optional
+ optional PortworxVolumeSource portworxVolume = 18;
+
+ // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
+ // +optional
+ optional ScaleIOVolumeSource scaleIO = 19;
+
+ // Local represents directly-attached storage with node affinity
+ // +optional
+ optional LocalVolumeSource local = 20;
+
+ // StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md
+ // +optional
+ optional StorageOSPersistentVolumeSource storageos = 21;
+}
+
+// PersistentVolumeSpec is the specification of a persistent volume.
+message PersistentVolumeSpec {
+ // A description of the persistent volume's resources and capacity.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> capacity = 1;
+
+ // The actual volume backing the persistent volume.
+ optional PersistentVolumeSource persistentVolumeSource = 2;
+
+ // AccessModes contains all ways the volume can be mounted.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes
+ // +optional
+ repeated string accessModes = 3;
+
+ // ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim.
+ // Expected to be non-nil when bound.
+ // claim.VolumeName is the authoritative bind between PV and PVC.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding
+ // +optional
+ optional ObjectReference claimRef = 4;
+
+ // What happens to a persistent volume when released from its claim.
+ // Valid options are Retain (default) and Recycle.
+ // Recycling must be supported by the volume plugin underlying this persistent volume.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming
+ // +optional
+ optional string persistentVolumeReclaimPolicy = 5;
+
+ // Name of StorageClass to which this persistent volume belongs. Empty value
+ // means that this volume does not belong to any StorageClass.
+ // +optional
+ optional string storageClassName = 6;
+}
+
+// PersistentVolumeStatus is the current status of a persistent volume.
+message PersistentVolumeStatus {
+ // Phase indicates if a volume is available, bound to a claim, or released by a claim.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase
+ // +optional
+ optional string phase = 1;
+
+ // A human-readable message indicating details about why the volume is in this state.
+ // +optional
+ optional string message = 2;
+
+ // Reason is a brief CamelCase string that describes any failure and is meant
+ // for machine parsing and tidy display in the CLI.
+ // +optional
+ optional string reason = 3;
+}
+
+// Represents a Photon Controller persistent disk resource.
+message PhotonPersistentDiskVolumeSource {
+ // ID that identifies Photon Controller persistent disk
+ optional string pdID = 1;
+
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ optional string fsType = 2;
+}
+
+// Pod is a collection of containers that can run on a host. This resource is created
+// by clients and scheduled onto hosts.
+message Pod {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Specification of the desired behavior of the pod.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional PodSpec spec = 2;
+
+ // Most recently observed status of the pod.
+ // This data may not be up to date.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional PodStatus status = 3;
+}
+
+// Pod affinity is a group of inter pod affinity scheduling rules.
+message PodAffinity {
+ // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented.
+ // If the affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to a pod label update), the
+ // system will try to eventually evict the pod from its node.
+ // When there are multiple elements, the lists of nodes corresponding to each
+ // podAffinityTerm are intersected, i.e. all terms must be satisfied.
+ // +optional
+ // RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"`
+ // If the affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to a pod label update), the
+ // system may or may not try to eventually evict the pod from its node.
+ // When there are multiple elements, the lists of nodes corresponding to each
+ // podAffinityTerm are intersected, i.e. all terms must be satisfied.
+ // +optional
+ repeated PodAffinityTerm requiredDuringSchedulingIgnoredDuringExecution = 1;
+
+ // The scheduler will prefer to schedule pods to nodes that satisfy
+ // the affinity expressions specified by this field, but it may choose
+ // a node that violates one or more of the expressions. The node that is
+ // most preferred is the one with the greatest sum of weights, i.e.
+ // for each node that meets all of the scheduling requirements (resource
+ // request, requiredDuringScheduling affinity expressions, etc.),
+ // compute a sum by iterating through the elements of this field and adding
+ // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
+ // node(s) with the highest sum are the most preferred.
+ // +optional
+ repeated WeightedPodAffinityTerm preferredDuringSchedulingIgnoredDuringExecution = 2;
+}
+
+// Defines a set of pods (namely those matching the labelSelector
+// relative to the given namespace(s)) that this pod should be
+// co-located (affinity) or not co-located (anti-affinity) with,
+// where co-located is defined as running on a node whose value of
+// the label with key <topologyKey> tches that of any node on which
+// a pod of the set of pods is running
+message PodAffinityTerm {
+ // A label query over a set of resources, in this case pods.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector labelSelector = 1;
+
+ // namespaces specifies which namespaces the labelSelector applies to (matches against);
+ // null or empty list means "this pod's namespace"
+ repeated string namespaces = 2;
+
+ // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
+ // the labelSelector in the specified namespaces, where co-located is defined as running on a node
+ // whose value of the label with key topologyKey matches that of any node on which any of the
+ // selected pods is running.
+ // For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as "all topologies"
+ // ("all topologies" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains);
+ // for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed.
+ // +optional
+ optional string topologyKey = 3;
+}
+
+// Pod anti affinity is a group of inter pod anti affinity scheduling rules.
+message PodAntiAffinity {
+ // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented.
+ // If the anti-affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the anti-affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to a pod label update), the
+ // system will try to eventually evict the pod from its node.
+ // When there are multiple elements, the lists of nodes corresponding to each
+ // podAffinityTerm are intersected, i.e. all terms must be satisfied.
+ // +optional
+ // RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"`
+ // If the anti-affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the anti-affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to a pod label update), the
+ // system may or may not try to eventually evict the pod from its node.
+ // When there are multiple elements, the lists of nodes corresponding to each
+ // podAffinityTerm are intersected, i.e. all terms must be satisfied.
+ // +optional
+ repeated PodAffinityTerm requiredDuringSchedulingIgnoredDuringExecution = 1;
+
+ // The scheduler will prefer to schedule pods to nodes that satisfy
+ // the anti-affinity expressions specified by this field, but it may choose
+ // a node that violates one or more of the expressions. The node that is
+ // most preferred is the one with the greatest sum of weights, i.e.
+ // for each node that meets all of the scheduling requirements (resource
+ // request, requiredDuringScheduling anti-affinity expressions, etc.),
+ // compute a sum by iterating through the elements of this field and adding
+ // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
+ // node(s) with the highest sum are the most preferred.
+ // +optional
+ repeated WeightedPodAffinityTerm preferredDuringSchedulingIgnoredDuringExecution = 2;
+}
+
+// PodAttachOptions is the query options to a Pod's remote attach call.
+// ---
+// TODO: merge w/ PodExecOptions below for stdin, stdout, etc
+// and also when we cut V2, we should export a "StreamOptions" or somesuch that contains Stdin, Stdout, Stder and TTY
+message PodAttachOptions {
+ // Stdin if true, redirects the standard input stream of the pod for this call.
+ // Defaults to false.
+ // +optional
+ optional bool stdin = 1;
+
+ // Stdout if true indicates that stdout is to be redirected for the attach call.
+ // Defaults to true.
+ // +optional
+ optional bool stdout = 2;
+
+ // Stderr if true indicates that stderr is to be redirected for the attach call.
+ // Defaults to true.
+ // +optional
+ optional bool stderr = 3;
+
+ // TTY if true indicates that a tty will be allocated for the attach call.
+ // This is passed through the container runtime so the tty
+ // is allocated on the worker node by the container runtime.
+ // Defaults to false.
+ // +optional
+ optional bool tty = 4;
+
+ // The container in which to execute the command.
+ // Defaults to only container if there is only one container in the pod.
+ // +optional
+ optional string container = 5;
+}
+
+// PodCondition contains details for the current condition of this pod.
+message PodCondition {
+ // Type is the type of the condition.
+ // Currently only Ready.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
+ optional string type = 1;
+
+ // Status is the status of the condition.
+ // Can be True, False, Unknown.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
+ optional string status = 2;
+
+ // Last time we probed the condition.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastProbeTime = 3;
+
+ // Last time the condition transitioned from one status to another.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4;
+
+ // Unique, one-word, CamelCase reason for the condition's last transition.
+ // +optional
+ optional string reason = 5;
+
+ // Human-readable message indicating details about last transition.
+ // +optional
+ optional string message = 6;
+}
+
+// PodExecOptions is the query options to a Pod's remote exec call.
+// ---
+// TODO: This is largely identical to PodAttachOptions above, make sure they stay in sync and see about merging
+// and also when we cut V2, we should export a "StreamOptions" or somesuch that contains Stdin, Stdout, Stder and TTY
+message PodExecOptions {
+ // Redirect the standard input stream of the pod for this call.
+ // Defaults to false.
+ // +optional
+ optional bool stdin = 1;
+
+ // Redirect the standard output stream of the pod for this call.
+ // Defaults to true.
+ // +optional
+ optional bool stdout = 2;
+
+ // Redirect the standard error stream of the pod for this call.
+ // Defaults to true.
+ // +optional
+ optional bool stderr = 3;
+
+ // TTY if true indicates that a tty will be allocated for the exec call.
+ // Defaults to false.
+ // +optional
+ optional bool tty = 4;
+
+ // Container in which to execute the command.
+ // Defaults to only container if there is only one container in the pod.
+ // +optional
+ optional string container = 5;
+
+ // Command is the remote command to execute. argv array. Not executed within a shell.
+ repeated string command = 6;
+}
+
+// PodList is a list of Pods.
+message PodList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of pods.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md
+ repeated Pod items = 2;
+}
+
+// PodLogOptions is the query options for a Pod's logs REST call.
+message PodLogOptions {
+ // The container for which to stream logs. Defaults to only container if there is one container in the pod.
+ // +optional
+ optional string container = 1;
+
+ // Follow the log stream of the pod. Defaults to false.
+ // +optional
+ optional bool follow = 2;
+
+ // Return previous terminated container logs. Defaults to false.
+ // +optional
+ optional bool previous = 3;
+
+ // A relative time in seconds before the current time from which to show logs. If this value
+ // precedes the time a pod was started, only logs since the pod start will be returned.
+ // If this value is in the future, no logs will be returned.
+ // Only one of sinceSeconds or sinceTime may be specified.
+ // +optional
+ optional int64 sinceSeconds = 4;
+
+ // An RFC3339 timestamp from which to show logs. If this value
+ // precedes the time a pod was started, only logs since the pod start will be returned.
+ // If this value is in the future, no logs will be returned.
+ // Only one of sinceSeconds or sinceTime may be specified.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time sinceTime = 5;
+
+ // If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line
+ // of log output. Defaults to false.
+ // +optional
+ optional bool timestamps = 6;
+
+ // If set, the number of lines from the end of the logs to show. If not specified,
+ // logs are shown from the creation of the container or sinceSeconds or sinceTime
+ // +optional
+ optional int64 tailLines = 7;
+
+ // If set, the number of bytes to read from the server before terminating the
+ // log output. This may not display a complete final line of logging, and may return
+ // slightly more or slightly less than the specified limit.
+ // +optional
+ optional int64 limitBytes = 8;
+}
+
+// PodPortForwardOptions is the query options to a Pod's port forward call
+// when using WebSockets.
+// The `port` query parameter must specify the port or
+// ports (comma separated) to forward over.
+// Port forwarding over SPDY does not use these options. It requires the port
+// to be passed in the `port` header as part of request.
+message PodPortForwardOptions {
+ // List of ports to forward
+ // Required when using WebSockets
+ // +optional
+ repeated int32 ports = 1;
+}
+
+// PodProxyOptions is the query options to a Pod's proxy call.
+message PodProxyOptions {
+ // Path is the URL path to use for the current proxy request to pod.
+ // +optional
+ optional string path = 1;
+}
+
+// PodSecurityContext holds pod-level security attributes and common container settings.
+// Some fields are also present in container.securityContext. Field values of
+// container.securityContext take precedence over field values of PodSecurityContext.
+message PodSecurityContext {
+ // The SELinux context to be applied to all containers.
+ // If unspecified, the container runtime will allocate a random SELinux context for each
+ // container. May also be set in SecurityContext. If set in
+ // both SecurityContext and PodSecurityContext, the value specified in SecurityContext
+ // takes precedence for that container.
+ // +optional
+ optional SELinuxOptions seLinuxOptions = 1;
+
+ // The UID to run the entrypoint of the container process.
+ // Defaults to user specified in image metadata if unspecified.
+ // May also be set in SecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence
+ // for that container.
+ // +optional
+ optional int64 runAsUser = 2;
+
+ // Indicates that the container must run as a non-root user.
+ // If true, the Kubelet will validate the image at runtime to ensure that it
+ // does not run as UID 0 (root) and fail to start the container if it does.
+ // If unset or false, no such validation will be performed.
+ // May also be set in SecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence.
+ // +optional
+ optional bool runAsNonRoot = 3;
+
+ // A list of groups applied to the first process run in each container, in addition
+ // to the container's primary GID. If unspecified, no groups will be added to
+ // any container.
+ // +optional
+ repeated int64 supplementalGroups = 4;
+
+ // A special supplemental group that applies to all containers in a pod.
+ // Some volume types allow the Kubelet to change the ownership of that volume
+ // to be owned by the pod:
+ //
+ // 1. The owning GID will be the FSGroup
+ // 2. The setgid bit is set (new files created in the volume will be owned by FSGroup)
+ // 3. The permission bits are OR'd with rw-rw----
+ //
+ // If unset, the Kubelet will not modify the ownership and permissions of any volume.
+ // +optional
+ optional int64 fsGroup = 5;
+}
+
+// Describes the class of pods that should avoid this node.
+// Exactly one field should be set.
+message PodSignature {
+ // Reference to controller whose pods should avoid this node.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.OwnerReference podController = 1;
+}
+
+// PodSpec is a description of a pod.
+message PodSpec {
+ // List of volumes that can be mounted by containers belonging to the pod.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes
+ // +optional
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ repeated Volume volumes = 1;
+
+ // List of initialization containers belonging to the pod.
+ // Init containers are executed in order prior to containers being started. If any
+ // init container fails, the pod is considered to have failed and is handled according
+ // to its restartPolicy. The name for an init container or normal container must be
+ // unique among all containers.
+ // Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes.
+ // The resourceRequirements of an init container are taken into account during scheduling
+ // by finding the highest request/limit for each resource type, and then using the max of
+ // of that value or the sum of the normal containers. Limits are applied to init containers
+ // in a similar fashion.
+ // Init containers cannot currently be added or removed.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ repeated Container initContainers = 20;
+
+ // List of containers belonging to the pod.
+ // Containers cannot currently be added or removed.
+ // There must be at least one container in a Pod.
+ // Cannot be updated.
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ repeated Container containers = 2;
+
+ // Restart policy for all containers within the pod.
+ // One of Always, OnFailure, Never.
+ // Default to Always.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy
+ // +optional
+ optional string restartPolicy = 3;
+
+ // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request.
+ // Value must be non-negative integer. The value zero indicates delete immediately.
+ // If this value is nil, the default grace period will be used instead.
+ // The grace period is the duration in seconds after the processes running in the pod are sent
+ // a termination signal and the time when the processes are forcibly halted with a kill signal.
+ // Set this value longer than the expected cleanup time for your process.
+ // Defaults to 30 seconds.
+ // +optional
+ optional int64 terminationGracePeriodSeconds = 4;
+
+ // Optional duration in seconds the pod may be active on the node relative to
+ // StartTime before the system will actively try to mark it failed and kill associated containers.
+ // Value must be a positive integer.
+ // +optional
+ optional int64 activeDeadlineSeconds = 5;
+
+ // Set DNS policy for containers within the pod.
+ // One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'.
+ // Defaults to "ClusterFirst".
+ // To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.
+ // +optional
+ optional string dnsPolicy = 6;
+
+ // NodeSelector is a selector which must be true for the pod to fit on a node.
+ // Selector which must match a node's labels for the pod to be scheduled on that node.
+ // More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
+ // +optional
+ map<string, string> nodeSelector = 7;
+
+ // ServiceAccountName is the name of the ServiceAccount to use to run this pod.
+ // More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
+ // +optional
+ optional string serviceAccountName = 8;
+
+ // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName.
+ // Deprecated: Use serviceAccountName instead.
+ // +k8s:conversion-gen=false
+ // +optional
+ optional string serviceAccount = 9;
+
+ // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.
+ // +optional
+ optional bool automountServiceAccountToken = 21;
+
+ // NodeName is a request to schedule this pod onto a specific node. If it is non-empty,
+ // the scheduler simply schedules this pod onto that node, assuming that it fits resource
+ // requirements.
+ // +optional
+ optional string nodeName = 10;
+
+ // Host networking requested for this pod. Use the host's network namespace.
+ // If this option is set, the ports that will be used must be specified.
+ // Default to false.
+ // +k8s:conversion-gen=false
+ // +optional
+ optional bool hostNetwork = 11;
+
+ // Use the host's pid namespace.
+ // Optional: Default to false.
+ // +k8s:conversion-gen=false
+ // +optional
+ optional bool hostPID = 12;
+
+ // Use the host's ipc namespace.
+ // Optional: Default to false.
+ // +k8s:conversion-gen=false
+ // +optional
+ optional bool hostIPC = 13;
+
+ // SecurityContext holds pod-level security attributes and common container settings.
+ // Optional: Defaults to empty. See type description for default values of each field.
+ // +optional
+ optional PodSecurityContext securityContext = 14;
+
+ // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec.
+ // If specified, these secrets will be passed to individual puller implementations for them to use. For example,
+ // in the case of docker, only DockerConfig type secrets are honored.
+ // More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod
+ // +optional
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ repeated LocalObjectReference imagePullSecrets = 15;
+
+ // Specifies the hostname of the Pod
+ // If not specified, the pod's hostname will be set to a system-defined value.
+ // +optional
+ optional string hostname = 16;
+
+ // If specified, the fully qualified Pod hostname will be "<hostname>.<subdomain>.<pod namespace>.svc.<cluster domain>".
+ // If not specified, the pod will not have a domainname at all.
+ // +optional
+ optional string subdomain = 17;
+
+ // If specified, the pod's scheduling constraints
+ // +optional
+ optional Affinity affinity = 18;
+
+ // If specified, the pod will be dispatched by specified scheduler.
+ // If not specified, the pod will be dispatched by default scheduler.
+ // +optional
+ optional string schedulerName = 19;
+
+ // If specified, the pod's tolerations.
+ // +optional
+ repeated Toleration tolerations = 22;
+
+ // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts
+ // file if specified. This is only valid for non-hostNetwork pods.
+ // +optional
+ // +patchMergeKey=ip
+ // +patchStrategy=merge
+ repeated HostAlias hostAliases = 23;
+}
+
+// PodStatus represents information about the status of a pod. Status may trail the actual
+// state of a system.
+message PodStatus {
+ // Current condition of the pod.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase
+ // +optional
+ optional string phase = 1;
+
+ // Current service state of pod.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ repeated PodCondition conditions = 2;
+
+ // A human readable message indicating details about why the pod is in this condition.
+ // +optional
+ optional string message = 3;
+
+ // A brief CamelCase message indicating details about why the pod is in this state.
+ // e.g. 'OutOfDisk'
+ // +optional
+ optional string reason = 4;
+
+ // IP address of the host to which the pod is assigned. Empty if not yet scheduled.
+ // +optional
+ optional string hostIP = 5;
+
+ // IP address allocated to the pod. Routable at least within the cluster.
+ // Empty if not yet allocated.
+ // +optional
+ optional string podIP = 6;
+
+ // RFC 3339 date and time at which the object was acknowledged by the Kubelet.
+ // This is before the Kubelet pulled the container image(s) for the pod.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startTime = 7;
+
+ // The list has one entry per init container in the manifest. The most recent successful
+ // init container will have ready = true, the most recently started container will have
+ // startTime set.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status
+ repeated ContainerStatus initContainerStatuses = 10;
+
+ // The list has one entry per container in the manifest. Each entry is currently the output
+ // of `docker inspect`.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status
+ // +optional
+ repeated ContainerStatus containerStatuses = 8;
+
+ // The Quality of Service (QOS) classification assigned to the pod based on resource requirements
+ // See PodQOSClass type for available QOS classes
+ // More info: https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md
+ // +optional
+ optional string qosClass = 9;
+}
+
+// PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded
+message PodStatusResult {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Most recently observed status of the pod.
+ // This data may not be up to date.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional PodStatus status = 2;
+}
+
+// PodTemplate describes a template for creating copies of a predefined pod.
+message PodTemplate {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Template defines the pods that will be created from this pod template.
+ // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional PodTemplateSpec template = 2;
+}
+
+// PodTemplateList is a list of PodTemplates.
+message PodTemplateList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of pod templates
+ repeated PodTemplate items = 2;
+}
+
+// PodTemplateSpec describes the data a pod should have when created from a template
+message PodTemplateSpec {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Specification of the desired behavior of the pod.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional PodSpec spec = 2;
+}
+
+// PortworxVolumeSource represents a Portworx volume resource.
+message PortworxVolumeSource {
+ // VolumeID uniquely identifies a Portworx volume
+ optional string volumeID = 1;
+
+ // FSType represents the filesystem type to mount
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified.
+ optional string fsType = 2;
+
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ optional bool readOnly = 3;
+}
+
+// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
+// +k8s:openapi-gen=false
+message Preconditions {
+ // Specifies the target UID.
+ // +optional
+ optional string uid = 1;
+}
+
+// Describes a class of pods that should avoid this node.
+message PreferAvoidPodsEntry {
+ // The class of pods.
+ optional PodSignature podSignature = 1;
+
+ // Time at which this entry was added to the list.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time evictionTime = 2;
+
+ // (brief) reason why this entry was added to the list.
+ // +optional
+ optional string reason = 3;
+
+ // Human readable message indicating why this entry was added to the list.
+ // +optional
+ optional string message = 4;
+}
+
+// An empty preferred scheduling term matches all objects with implicit weight 0
+// (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).
+message PreferredSchedulingTerm {
+ // Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.
+ optional int32 weight = 1;
+
+ // A node selector term, associated with the corresponding weight.
+ optional NodeSelectorTerm preference = 2;
+}
+
+// Probe describes a health check to be performed against a container to determine whether it is
+// alive or ready to receive traffic.
+message Probe {
+ // The action taken to determine the health of a container
+ optional Handler handler = 1;
+
+ // Number of seconds after the container has started before liveness probes are initiated.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+ // +optional
+ optional int32 initialDelaySeconds = 2;
+
+ // Number of seconds after which the probe times out.
+ // Defaults to 1 second. Minimum value is 1.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+ // +optional
+ optional int32 timeoutSeconds = 3;
+
+ // How often (in seconds) to perform the probe.
+ // Default to 10 seconds. Minimum value is 1.
+ // +optional
+ optional int32 periodSeconds = 4;
+
+ // Minimum consecutive successes for the probe to be considered successful after having failed.
+ // Defaults to 1. Must be 1 for liveness. Minimum value is 1.
+ // +optional
+ optional int32 successThreshold = 5;
+
+ // Minimum consecutive failures for the probe to be considered failed after having succeeded.
+ // Defaults to 3. Minimum value is 1.
+ // +optional
+ optional int32 failureThreshold = 6;
+}
+
+// Represents a projected volume source
+message ProjectedVolumeSource {
+ // list of volume projections
+ repeated VolumeProjection sources = 1;
+
+ // Mode bits to use on created files by default. Must be a value between
+ // 0 and 0777.
+ // Directories within the path are not affected by this setting.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ optional int32 defaultMode = 2;
+}
+
+// Represents a Quobyte mount that lasts the lifetime of a pod.
+// Quobyte volumes do not support ownership management or SELinux relabeling.
+message QuobyteVolumeSource {
+ // Registry represents a single or multiple Quobyte Registry services
+ // specified as a string as host:port pair (multiple entries are separated with commas)
+ // which acts as the central registry for volumes
+ optional string registry = 1;
+
+ // Volume is a string that references an already created Quobyte volume by name.
+ optional string volume = 2;
+
+ // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions.
+ // Defaults to false.
+ // +optional
+ optional bool readOnly = 3;
+
+ // User to map volume access to
+ // Defaults to serivceaccount user
+ // +optional
+ optional string user = 4;
+
+ // Group to map volume access to
+ // Default is no group
+ // +optional
+ optional string group = 5;
+}
+
+// Represents a Rados Block Device mount that lasts the lifetime of a pod.
+// RBD volumes support ownership management and SELinux relabeling.
+message RBDVolumeSource {
+ // A collection of Ceph monitors.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ repeated string monitors = 1;
+
+ // The rados image name.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ optional string image = 2;
+
+ // Filesystem type of the volume that you want to mount.
+ // Tip: Ensure that the filesystem type is supported by the host operating system.
+ // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ optional string fsType = 3;
+
+ // The rados pool name.
+ // Default is rbd.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // +optional
+ optional string pool = 4;
+
+ // The rados user name.
+ // Default is admin.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // +optional
+ optional string user = 5;
+
+ // Keyring is the path to key ring for RBDUser.
+ // Default is /etc/ceph/keyring.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // +optional
+ optional string keyring = 6;
+
+ // SecretRef is name of the authentication secret for RBDUser. If provided
+ // overrides keyring.
+ // Default is nil.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // +optional
+ optional LocalObjectReference secretRef = 7;
+
+ // ReadOnly here will force the ReadOnly setting in VolumeMounts.
+ // Defaults to false.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // +optional
+ optional bool readOnly = 8;
+}
+
+// RangeAllocation is not a public type.
+message RangeAllocation {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Range is string that identifies the range represented by 'data'.
+ optional string range = 2;
+
+ // Data is a bit array containing all allocated addresses in the previous segment.
+ optional bytes data = 3;
+}
+
+// ReplicationController represents the configuration of a replication controller.
+message ReplicationController {
+ // If the Labels of a ReplicationController are empty, they are defaulted to
+ // be the same as the Pod(s) that the replication controller manages.
+ // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec defines the specification of the desired behavior of the replication controller.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional ReplicationControllerSpec spec = 2;
+
+ // Status is the most recently observed status of the replication controller.
+ // This data may be out of date by some window of time.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional ReplicationControllerStatus status = 3;
+}
+
+// ReplicationControllerCondition describes the state of a replication controller at a certain point.
+message ReplicationControllerCondition {
+ // Type of replication controller condition.
+ optional string type = 1;
+
+ // Status of the condition, one of True, False, Unknown.
+ optional string status = 2;
+
+ // The last time the condition transitioned from one status to another.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
+
+ // The reason for the condition's last transition.
+ // +optional
+ optional string reason = 4;
+
+ // A human readable message indicating details about the transition.
+ // +optional
+ optional string message = 5;
+}
+
+// ReplicationControllerList is a collection of replication controllers.
+message ReplicationControllerList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of replication controllers.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
+ repeated ReplicationController items = 2;
+}
+
+// ReplicationControllerSpec is the specification of a replication controller.
+message ReplicationControllerSpec {
+ // Replicas is the number of desired replicas.
+ // This is a pointer to distinguish between explicit zero and unspecified.
+ // Defaults to 1.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller
+ // +optional
+ optional int32 replicas = 1;
+
+ // Minimum number of seconds for which a newly created pod should be ready
+ // without any of its container crashing, for it to be considered available.
+ // Defaults to 0 (pod will be considered available as soon as it is ready)
+ // +optional
+ optional int32 minReadySeconds = 4;
+
+ // Selector is a label query over pods that should match the Replicas count.
+ // If Selector is empty, it is defaulted to the labels present on the Pod template.
+ // Label keys and values that must match in order to be controlled by this replication
+ // controller, if empty defaulted to labels on Pod template.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ map<string, string> selector = 2;
+
+ // Template is the object that describes the pod that will be created if
+ // insufficient replicas are detected. This takes precedence over a TemplateRef.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
+ // +optional
+ optional PodTemplateSpec template = 3;
+}
+
+// ReplicationControllerStatus represents the current status of a replication
+// controller.
+message ReplicationControllerStatus {
+ // Replicas is the most recently oberved number of replicas.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller
+ optional int32 replicas = 1;
+
+ // The number of pods that have labels matching the labels of the pod template of the replication controller.
+ // +optional
+ optional int32 fullyLabeledReplicas = 2;
+
+ // The number of ready replicas for this replication controller.
+ // +optional
+ optional int32 readyReplicas = 4;
+
+ // The number of available replicas (ready for at least minReadySeconds) for this replication controller.
+ // +optional
+ optional int32 availableReplicas = 5;
+
+ // ObservedGeneration reflects the generation of the most recently observed replication controller.
+ // +optional
+ optional int64 observedGeneration = 3;
+
+ // Represents the latest available observations of a replication controller's current state.
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ repeated ReplicationControllerCondition conditions = 6;
+}
+
+// ResourceFieldSelector represents container resources (cpu, memory) and their output format
+message ResourceFieldSelector {
+ // Container name: required for volumes, optional for env vars
+ // +optional
+ optional string containerName = 1;
+
+ // Required: resource to select
+ optional string resource = 2;
+
+ // Specifies the output format of the exposed resources, defaults to "1"
+ // +optional
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity divisor = 3;
+}
+
+// ResourceQuota sets aggregate quota restrictions enforced per namespace
+message ResourceQuota {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec defines the desired quota.
+ // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional ResourceQuotaSpec spec = 2;
+
+ // Status defines the actual enforced quota and its current usage.
+ // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional ResourceQuotaStatus status = 3;
+}
+
+// ResourceQuotaList is a list of ResourceQuota items.
+message ResourceQuotaList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of ResourceQuota objects.
+ // More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md
+ repeated ResourceQuota items = 2;
+}
+
+// ResourceQuotaSpec defines the desired hard limits to enforce for Quota.
+message ResourceQuotaSpec {
+ // Hard is the set of desired hard limits for each named resource.
+ // More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> hard = 1;
+
+ // A collection of filters that must match each object tracked by a quota.
+ // If not specified, the quota matches all objects.
+ // +optional
+ repeated string scopes = 2;
+}
+
+// ResourceQuotaStatus defines the enforced hard limits and observed use.
+message ResourceQuotaStatus {
+ // Hard is the set of enforced hard limits for each named resource.
+ // More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> hard = 1;
+
+ // Used is the current observed total usage of the resource in the namespace.
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> used = 2;
+}
+
+// ResourceRequirements describes the compute resource requirements.
+message ResourceRequirements {
+ // Limits describes the maximum amount of compute resources allowed.
+ // More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> limits = 1;
+
+ // Requests describes the minimum amount of compute resources required.
+ // If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
+ // otherwise to an implementation-defined value.
+ // More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> requests = 2;
+}
+
+// SELinuxOptions are the labels to be applied to the container
+message SELinuxOptions {
+ // User is a SELinux user label that applies to the container.
+ // +optional
+ optional string user = 1;
+
+ // Role is a SELinux role label that applies to the container.
+ // +optional
+ optional string role = 2;
+
+ // Type is a SELinux type label that applies to the container.
+ // +optional
+ optional string type = 3;
+
+ // Level is SELinux level label that applies to the container.
+ // +optional
+ optional string level = 4;
+}
+
+// ScaleIOVolumeSource represents a persistent ScaleIO volume
+message ScaleIOVolumeSource {
+ // The host address of the ScaleIO API Gateway.
+ optional string gateway = 1;
+
+ // The name of the storage system as configured in ScaleIO.
+ optional string system = 2;
+
+ // SecretRef references to the secret for ScaleIO user and other
+ // sensitive information. If this is not provided, Login operation will fail.
+ optional LocalObjectReference secretRef = 3;
+
+ // Flag to enable/disable SSL communication with Gateway, default false
+ // +optional
+ optional bool sslEnabled = 4;
+
+ // The name of the Protection Domain for the configured storage (defaults to "default").
+ // +optional
+ optional string protectionDomain = 5;
+
+ // The Storage Pool associated with the protection domain (defaults to "default").
+ // +optional
+ optional string storagePool = 6;
+
+ // Indicates whether the storage for a volume should be thick or thin (defaults to "thin").
+ // +optional
+ optional string storageMode = 7;
+
+ // The name of a volume already created in the ScaleIO system
+ // that is associated with this volume source.
+ optional string volumeName = 8;
+
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ optional string fsType = 9;
+
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ optional bool readOnly = 10;
+}
+
+// Secret holds secret data of a certain type. The total bytes of the values in
+// the Data field must be less than MaxSecretSize bytes.
+message Secret {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Data contains the secret data. Each key must consist of alphanumeric
+ // characters, '-', '_' or '.'. The serialized form of the secret data is a
+ // base64 encoded string, representing the arbitrary (possibly non-string)
+ // data value here. Described in https://tools.ietf.org/html/rfc4648#section-4
+ // +optional
+ map<string, bytes> data = 2;
+
+ // stringData allows specifying non-binary secret data in string form.
+ // It is provided as a write-only convenience method.
+ // All keys and values are merged into the data field on write, overwriting any existing values.
+ // It is never output when reading from the API.
+ // +k8s:conversion-gen=false
+ // +optional
+ map<string, string> stringData = 4;
+
+ // Used to facilitate programmatic handling of secret data.
+ // +optional
+ optional string type = 3;
+}
+
+// SecretEnvSource selects a Secret to populate the environment
+// variables with.
+//
+// The contents of the target Secret's Data field will represent the
+// key-value pairs as environment variables.
+message SecretEnvSource {
+ // The Secret to select from.
+ optional LocalObjectReference localObjectReference = 1;
+
+ // Specify whether the Secret must be defined
+ // +optional
+ optional bool optional = 2;
+}
+
+// SecretKeySelector selects a key of a Secret.
+message SecretKeySelector {
+ // The name of the secret in the pod's namespace to select from.
+ optional LocalObjectReference localObjectReference = 1;
+
+ // The key of the secret to select from. Must be a valid secret key.
+ optional string key = 2;
+
+ // Specify whether the Secret or it's key must be defined
+ // +optional
+ optional bool optional = 3;
+}
+
+// SecretList is a list of Secret.
+message SecretList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of secret objects.
+ // More info: https://kubernetes.io/docs/concepts/configuration/secret
+ repeated Secret items = 2;
+}
+
+// Adapts a secret into a projected volume.
+//
+// The contents of the target Secret's Data field will be presented in a
+// projected volume as files using the keys in the Data field as the file names.
+// Note that this is identical to a secret volume source without the default
+// mode.
+message SecretProjection {
+ optional LocalObjectReference localObjectReference = 1;
+
+ // If unspecified, each key-value pair in the Data field of the referenced
+ // Secret will be projected into the volume as a file whose name is the
+ // key and content is the value. If specified, the listed keys will be
+ // projected into the specified paths, and unlisted keys will not be
+ // present. If a key is specified which is not present in the Secret,
+ // the volume setup will error unless it is marked optional. Paths must be
+ // relative and may not contain the '..' path or start with '..'.
+ // +optional
+ repeated KeyToPath items = 2;
+
+ // Specify whether the Secret or its key must be defined
+ // +optional
+ optional bool optional = 4;
+}
+
+// Adapts a Secret into a volume.
+//
+// The contents of the target Secret's Data field will be presented in a volume
+// as files using the keys in the Data field as the file names.
+// Secret volumes support ownership management and SELinux relabeling.
+message SecretVolumeSource {
+ // Name of the secret in the pod's namespace to use.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
+ // +optional
+ optional string secretName = 1;
+
+ // If unspecified, each key-value pair in the Data field of the referenced
+ // Secret will be projected into the volume as a file whose name is the
+ // key and content is the value. If specified, the listed keys will be
+ // projected into the specified paths, and unlisted keys will not be
+ // present. If a key is specified which is not present in the Secret,
+ // the volume setup will error unless it is marked optional. Paths must be
+ // relative and may not contain the '..' path or start with '..'.
+ // +optional
+ repeated KeyToPath items = 2;
+
+ // Optional: mode bits to use on created files by default. Must be a
+ // value between 0 and 0777. Defaults to 0644.
+ // Directories within the path are not affected by this setting.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ optional int32 defaultMode = 3;
+
+ // Specify whether the Secret or it's keys must be defined
+ // +optional
+ optional bool optional = 4;
+}
+
+// SecurityContext holds security configuration that will be applied to a container.
+// Some fields are present in both SecurityContext and PodSecurityContext. When both
+// are set, the values in SecurityContext take precedence.
+message SecurityContext {
+ // The capabilities to add/drop when running containers.
+ // Defaults to the default set of capabilities granted by the container runtime.
+ // +optional
+ optional Capabilities capabilities = 1;
+
+ // Run container in privileged mode.
+ // Processes in privileged containers are essentially equivalent to root on the host.
+ // Defaults to false.
+ // +optional
+ optional bool privileged = 2;
+
+ // The SELinux context to be applied to the container.
+ // If unspecified, the container runtime will allocate a random SELinux context for each
+ // container. May also be set in PodSecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence.
+ // +optional
+ optional SELinuxOptions seLinuxOptions = 3;
+
+ // The UID to run the entrypoint of the container process.
+ // Defaults to user specified in image metadata if unspecified.
+ // May also be set in PodSecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence.
+ // +optional
+ optional int64 runAsUser = 4;
+
+ // Indicates that the container must run as a non-root user.
+ // If true, the Kubelet will validate the image at runtime to ensure that it
+ // does not run as UID 0 (root) and fail to start the container if it does.
+ // If unset or false, no such validation will be performed.
+ // May also be set in PodSecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence.
+ // +optional
+ optional bool runAsNonRoot = 5;
+
+ // Whether this container has a read-only root filesystem.
+ // Default is false.
+ // +optional
+ optional bool readOnlyRootFilesystem = 6;
+}
+
+// SerializedReference is a reference to serialized object.
+message SerializedReference {
+ // The reference to an object in the system.
+ // +optional
+ optional ObjectReference reference = 1;
+}
+
+// Service is a named abstraction of software service (for example, mysql) consisting of local port
+// (for example 3306) that the proxy listens on, and the selector that determines which pods
+// will answer requests sent through the proxy.
+message Service {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec defines the behavior of a service.
+ // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional ServiceSpec spec = 2;
+
+ // Most recently observed status of the service.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional ServiceStatus status = 3;
+}
+
+// ServiceAccount binds together:
+// * a name, understood by users, and perhaps by peripheral systems, for an identity
+// * a principal that can be authenticated and authorized
+// * a set of secrets
+message ServiceAccount {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount.
+ // More info: https://kubernetes.io/docs/concepts/configuration/secret
+ // +optional
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ repeated ObjectReference secrets = 2;
+
+ // ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images
+ // in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets
+ // can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet.
+ // More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
+ // +optional
+ repeated LocalObjectReference imagePullSecrets = 3;
+
+ // AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted.
+ // Can be overridden at the pod level.
+ // +optional
+ optional bool automountServiceAccountToken = 4;
+}
+
+// ServiceAccountList is a list of ServiceAccount objects
+message ServiceAccountList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of ServiceAccounts.
+ // More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
+ repeated ServiceAccount items = 2;
+}
+
+// ServiceList holds a list of services.
+message ServiceList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of services
+ repeated Service items = 2;
+}
+
+// ServicePort contains information on service's port.
+message ServicePort {
+ // The name of this port within the service. This must be a DNS_LABEL.
+ // All ports within a ServiceSpec must have unique names. This maps to
+ // the 'Name' field in EndpointPort objects.
+ // Optional if only one ServicePort is defined on this service.
+ // +optional
+ optional string name = 1;
+
+ // The IP protocol for this port. Supports "TCP" and "UDP".
+ // Default is TCP.
+ // +optional
+ optional string protocol = 2;
+
+ // The port that will be exposed by this service.
+ optional int32 port = 3;
+
+ // Number or name of the port to access on the pods targeted by the service.
+ // Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+ // If this is a string, it will be looked up as a named port in the
+ // target Pod's container ports. If this is not specified, the value
+ // of the 'port' field is used (an identity map).
+ // This field is ignored for services with clusterIP=None, and should be
+ // omitted or set equal to the 'port' field.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service
+ // +optional
+ optional k8s.io.apimachinery.pkg.util.intstr.IntOrString targetPort = 4;
+
+ // The port on each node on which this service is exposed when type=NodePort or LoadBalancer.
+ // Usually assigned by the system. If specified, it will be allocated to the service
+ // if unused or else creation of the service will fail.
+ // Default is to auto-allocate a port if the ServiceType of this Service requires one.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
+ // +optional
+ optional int32 nodePort = 5;
+}
+
+// ServiceProxyOptions is the query options to a Service's proxy call.
+message ServiceProxyOptions {
+ // Path is the part of URLs that include service endpoints, suffixes,
+ // and parameters to use for the current proxy request to service.
+ // For example, the whole request URL is
+ // http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy.
+ // Path is _search?q=user:kimchy.
+ // +optional
+ optional string path = 1;
+}
+
+// ServiceSpec describes the attributes that a user creates on a service.
+message ServiceSpec {
+ // The list of ports that are exposed by this service.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
+ // +patchMergeKey=port
+ // +patchStrategy=merge
+ repeated ServicePort ports = 1;
+
+ // Route service traffic to pods with label keys and values matching this
+ // selector. If empty or not present, the service is assumed to have an
+ // external process managing its endpoints, which Kubernetes will not
+ // modify. Only applies to types ClusterIP, NodePort, and LoadBalancer.
+ // Ignored if type is ExternalName.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/
+ // +optional
+ map<string, string> selector = 2;
+
+ // clusterIP is the IP address of the service and is usually assigned
+ // randomly by the master. If an address is specified manually and is not in
+ // use by others, it will be allocated to the service; otherwise, creation
+ // of the service will fail. This field can not be changed through updates.
+ // Valid values are "None", empty string (""), or a valid IP address. "None"
+ // can be specified for headless services when proxying is not required.
+ // Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if
+ // type is ExternalName.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
+ // +optional
+ optional string clusterIP = 3;
+
+ // type determines how the Service is exposed. Defaults to ClusterIP. Valid
+ // options are ExternalName, ClusterIP, NodePort, and LoadBalancer.
+ // "ExternalName" maps to the specified externalName.
+ // "ClusterIP" allocates a cluster-internal IP address for load-balancing to
+ // endpoints. Endpoints are determined by the selector or if that is not
+ // specified, by manual construction of an Endpoints object. If clusterIP is
+ // "None", no virtual IP is allocated and the endpoints are published as a
+ // set of endpoints rather than a stable IP.
+ // "NodePort" builds on ClusterIP and allocates a port on every node which
+ // routes to the clusterIP.
+ // "LoadBalancer" builds on NodePort and creates an
+ // external load-balancer (if supported in the current cloud) which routes
+ // to the clusterIP.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services---service-types
+ // +optional
+ optional string type = 4;
+
+ // externalIPs is a list of IP addresses for which nodes in the cluster
+ // will also accept traffic for this service. These IPs are not managed by
+ // Kubernetes. The user is responsible for ensuring that traffic arrives
+ // at a node with this IP. A common example is external load-balancers
+ // that are not part of the Kubernetes system.
+ // +optional
+ repeated string externalIPs = 5;
+
+ // Supports "ClientIP" and "None". Used to maintain session affinity.
+ // Enable client IP based session affinity.
+ // Must be ClientIP or None.
+ // Defaults to None.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
+ // +optional
+ optional string sessionAffinity = 7;
+
+ // Only applies to Service Type: LoadBalancer
+ // LoadBalancer will get created with the IP specified in this field.
+ // This feature depends on whether the underlying cloud-provider supports specifying
+ // the loadBalancerIP when a load balancer is created.
+ // This field will be ignored if the cloud-provider does not support the feature.
+ // +optional
+ optional string loadBalancerIP = 8;
+
+ // If specified and supported by the platform, this will restrict traffic through the cloud-provider
+ // load-balancer will be restricted to the specified client IPs. This field will be ignored if the
+ // cloud-provider does not support the feature."
+ // More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/
+ // +optional
+ repeated string loadBalancerSourceRanges = 9;
+
+ // externalName is the external reference that kubedns or equivalent will
+ // return as a CNAME record for this service. No proxying will be involved.
+ // Must be a valid DNS name and requires Type to be ExternalName.
+ // +optional
+ optional string externalName = 10;
+
+ // externalTrafficPolicy denotes if this Service desires to route external
+ // traffic to node-local or cluster-wide endpoints. "Local" preserves the
+ // client source IP and avoids a second hop for LoadBalancer and Nodeport
+ // type services, but risks potentially imbalanced traffic spreading.
+ // "Cluster" obscures the client source IP and may cause a second hop to
+ // another node, but should have good overall load-spreading.
+ // +optional
+ optional string externalTrafficPolicy = 11;
+
+ // healthCheckNodePort specifies the healthcheck nodePort for the service.
+ // If not specified, HealthCheckNodePort is created by the service api
+ // backend with the allocated nodePort. Will use user-specified nodePort value
+ // if specified by the client. Only effects when Type is set to LoadBalancer
+ // and ExternalTrafficPolicy is set to Local.
+ // +optional
+ optional int32 healthCheckNodePort = 12;
+}
+
+// ServiceStatus represents the current status of a service.
+message ServiceStatus {
+ // LoadBalancer contains the current status of the load-balancer,
+ // if one is present.
+ // +optional
+ optional LoadBalancerStatus loadBalancer = 1;
+}
+
+// Represents a StorageOS persistent volume resource.
+message StorageOSPersistentVolumeSource {
+ // VolumeName is the human-readable name of the StorageOS volume. Volume
+ // names are only unique within a namespace.
+ optional string volumeName = 1;
+
+ // VolumeNamespace specifies the scope of the volume within StorageOS. If no
+ // namespace is specified then the Pod's namespace will be used. This allows the
+ // Kubernetes name scoping to be mirrored within StorageOS for tighter integration.
+ // Set VolumeName to any name to override the default behaviour.
+ // Set to "default" if you are not using namespaces within StorageOS.
+ // Namespaces that do not pre-exist within StorageOS will be created.
+ // +optional
+ optional string volumeNamespace = 2;
+
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ optional string fsType = 3;
+
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ optional bool readOnly = 4;
+
+ // SecretRef specifies the secret to use for obtaining the StorageOS API
+ // credentials. If not specified, default values will be attempted.
+ // +optional
+ optional ObjectReference secretRef = 5;
+}
+
+// Represents a StorageOS persistent volume resource.
+message StorageOSVolumeSource {
+ // VolumeName is the human-readable name of the StorageOS volume. Volume
+ // names are only unique within a namespace.
+ optional string volumeName = 1;
+
+ // VolumeNamespace specifies the scope of the volume within StorageOS. If no
+ // namespace is specified then the Pod's namespace will be used. This allows the
+ // Kubernetes name scoping to be mirrored within StorageOS for tighter integration.
+ // Set VolumeName to any name to override the default behaviour.
+ // Set to "default" if you are not using namespaces within StorageOS.
+ // Namespaces that do not pre-exist within StorageOS will be created.
+ // +optional
+ optional string volumeNamespace = 2;
+
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ optional string fsType = 3;
+
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ optional bool readOnly = 4;
+
+ // SecretRef specifies the secret to use for obtaining the StorageOS API
+ // credentials. If not specified, default values will be attempted.
+ // +optional
+ optional LocalObjectReference secretRef = 5;
+}
+
+// Sysctl defines a kernel parameter to be set
+message Sysctl {
+ // Name of a property to set
+ optional string name = 1;
+
+ // Value of a property to set
+ optional string value = 2;
+}
+
+// TCPSocketAction describes an action based on opening a socket
+message TCPSocketAction {
+ // Number or name of the port to access on the container.
+ // Number must be in the range 1 to 65535.
+ // Name must be an IANA_SVC_NAME.
+ optional k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 1;
+
+ // Optional: Host name to connect to, defaults to the pod IP.
+ // +optional
+ optional string host = 2;
+}
+
+// The node this Taint is attached to has the effect "effect" on
+// any pod that that does not tolerate the Taint.
+message Taint {
+ // Required. The taint key to be applied to a node.
+ // +patchMergeKey=key
+ // +patchStrategy=merge
+ optional string key = 1;
+
+ // Required. The taint value corresponding to the taint key.
+ // +optional
+ optional string value = 2;
+
+ // Required. The effect of the taint on pods
+ // that do not tolerate the taint.
+ // Valid effects are NoSchedule, PreferNoSchedule and NoExecute.
+ optional string effect = 3;
+
+ // TimeAdded represents the time at which the taint was added.
+ // It is only written for NoExecute taints.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time timeAdded = 4;
+}
+
+// The pod this Toleration is attached to tolerates any taint that matches
+// the triple <key,value,effect> using the matching operator <operator>.
+message Toleration {
+ // Key is the taint key that the toleration applies to. Empty means match all taint keys.
+ // If the key is empty, operator must be Exists; this combination means to match all values and all keys.
+ // +optional
+ // +patchMergeKey=key
+ // +patchStrategy=merge
+ optional string key = 1;
+
+ // Operator represents a key's relationship to the value.
+ // Valid operators are Exists and Equal. Defaults to Equal.
+ // Exists is equivalent to wildcard for value, so that a pod can
+ // tolerate all taints of a particular category.
+ // +optional
+ optional string operator = 2;
+
+ // Value is the taint value the toleration matches to.
+ // If the operator is Exists, the value should be empty, otherwise just a regular string.
+ // +optional
+ optional string value = 3;
+
+ // Effect indicates the taint effect to match. Empty means match all taint effects.
+ // When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
+ // +optional
+ optional string effect = 4;
+
+ // TolerationSeconds represents the period of time the toleration (which must be
+ // of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
+ // it is not set, which means tolerate the taint forever (do not evict). Zero and
+ // negative values will be treated as 0 (evict immediately) by the system.
+ // +optional
+ optional int64 tolerationSeconds = 5;
+}
+
+// Volume represents a named volume in a pod that may be accessed by any container in the pod.
+message Volume {
+ // Volume's name.
+ // Must be a DNS_LABEL and unique within the pod.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ optional string name = 1;
+
+ // VolumeSource represents the location and type of the mounted volume.
+ // If not specified, the Volume is implied to be an EmptyDir.
+ // This implied behavior is deprecated and will be removed in a future version.
+ optional VolumeSource volumeSource = 2;
+}
+
+// VolumeMount describes a mounting of a Volume within a container.
+message VolumeMount {
+ // This must match the Name of a Volume.
+ optional string name = 1;
+
+ // Mounted read-only if true, read-write otherwise (false or unspecified).
+ // Defaults to false.
+ // +optional
+ optional bool readOnly = 2;
+
+ // Path within the container at which the volume should be mounted. Must
+ // not contain ':'.
+ optional string mountPath = 3;
+
+ // Path within the volume from which the container's volume should be mounted.
+ // Defaults to "" (volume's root).
+ // +optional
+ optional string subPath = 4;
+}
+
+// Projection that may be projected along with other supported volume types
+message VolumeProjection {
+ // information about the secret data to project
+ optional SecretProjection secret = 1;
+
+ // information about the downwardAPI data to project
+ optional DownwardAPIProjection downwardAPI = 2;
+
+ // information about the configMap data to project
+ optional ConfigMapProjection configMap = 3;
+}
+
+// Represents the source of a volume to mount.
+// Only one of its members may be specified.
+message VolumeSource {
+ // HostPath represents a pre-existing file or directory on the host
+ // machine that is directly exposed to the container. This is generally
+ // used for system agents or other privileged things that are allowed
+ // to see the host machine. Most containers will NOT need this.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
+ // ---
+ // TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not
+ // mount host directories as read/write.
+ // +optional
+ optional HostPathVolumeSource hostPath = 1;
+
+ // EmptyDir represents a temporary directory that shares a pod's lifetime.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
+ // +optional
+ optional EmptyDirVolumeSource emptyDir = 2;
+
+ // GCEPersistentDisk represents a GCE Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ // +optional
+ optional GCEPersistentDiskVolumeSource gcePersistentDisk = 3;
+
+ // AWSElasticBlockStore represents an AWS Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+ // +optional
+ optional AWSElasticBlockStoreVolumeSource awsElasticBlockStore = 4;
+
+ // GitRepo represents a git repository at a particular revision.
+ // +optional
+ optional GitRepoVolumeSource gitRepo = 5;
+
+ // Secret represents a secret that should populate this volume.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
+ // +optional
+ optional SecretVolumeSource secret = 6;
+
+ // NFS represents an NFS mount on the host that shares a pod's lifetime
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+ // +optional
+ optional NFSVolumeSource nfs = 7;
+
+ // ISCSI represents an ISCSI Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md
+ // +optional
+ optional ISCSIVolumeSource iscsi = 8;
+
+ // Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md
+ // +optional
+ optional GlusterfsVolumeSource glusterfs = 9;
+
+ // PersistentVolumeClaimVolumeSource represents a reference to a
+ // PersistentVolumeClaim in the same namespace.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+ // +optional
+ optional PersistentVolumeClaimVolumeSource persistentVolumeClaim = 10;
+
+ // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md
+ // +optional
+ optional RBDVolumeSource rbd = 11;
+
+ // FlexVolume represents a generic volume resource that is
+ // provisioned/attached using an exec based plugin. This is an
+ // alpha feature and may change in future.
+ // +optional
+ optional FlexVolumeSource flexVolume = 12;
+
+ // Cinder represents a cinder volume attached and mounted on kubelets host machine
+ // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ // +optional
+ optional CinderVolumeSource cinder = 13;
+
+ // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
+ // +optional
+ optional CephFSVolumeSource cephfs = 14;
+
+ // Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
+ // +optional
+ optional FlockerVolumeSource flocker = 15;
+
+ // DownwardAPI represents downward API about the pod that should populate this volume
+ // +optional
+ optional DownwardAPIVolumeSource downwardAPI = 16;
+
+ // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
+ // +optional
+ optional FCVolumeSource fc = 17;
+
+ // AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
+ // +optional
+ optional AzureFileVolumeSource azureFile = 18;
+
+ // ConfigMap represents a configMap that should populate this volume
+ // +optional
+ optional ConfigMapVolumeSource configMap = 19;
+
+ // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
+ // +optional
+ optional VsphereVirtualDiskVolumeSource vsphereVolume = 20;
+
+ // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
+ // +optional
+ optional QuobyteVolumeSource quobyte = 21;
+
+ // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
+ // +optional
+ optional AzureDiskVolumeSource azureDisk = 22;
+
+ // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine
+ optional PhotonPersistentDiskVolumeSource photonPersistentDisk = 23;
+
+ // Items for all in one resources secrets, configmaps, and downward API
+ optional ProjectedVolumeSource projected = 26;
+
+ // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine
+ // +optional
+ optional PortworxVolumeSource portworxVolume = 24;
+
+ // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
+ // +optional
+ optional ScaleIOVolumeSource scaleIO = 25;
+
+ // StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.
+ // +optional
+ optional StorageOSVolumeSource storageos = 27;
+}
+
+// Represents a vSphere volume resource.
+message VsphereVirtualDiskVolumeSource {
+ // Path that identifies vSphere volume vmdk
+ optional string volumePath = 1;
+
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ optional string fsType = 2;
+
+ // Storage Policy Based Management (SPBM) profile name.
+ // +optional
+ optional string storagePolicyName = 3;
+
+ // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.
+ // +optional
+ optional string storagePolicyID = 4;
+}
+
+// The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)
+message WeightedPodAffinityTerm {
+ // weight associated with matching the corresponding podAffinityTerm,
+ // in the range 1-100.
+ optional int32 weight = 1;
+
+ // Required. A pod affinity term, associated with the corresponding weight.
+ optional PodAffinityTerm podAffinityTerm = 2;
+}
+
diff --git a/vendor/k8s.io/client-go/pkg/api/v1/meta.go b/vendor/k8s.io/client-go/pkg/api/v1/meta.go
new file mode 100644
index 000000000..0e3f5d920
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/v1/meta.go
@@ -0,0 +1,108 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/types"
+)
+
+func (obj *ObjectMeta) GetObjectMeta() metav1.Object { return obj }
+
+// Namespace implements metav1.Object for any object with an ObjectMeta typed field. Allows
+// fast, direct access to metadata fields for API objects.
+func (meta *ObjectMeta) GetNamespace() string { return meta.Namespace }
+func (meta *ObjectMeta) SetNamespace(namespace string) { meta.Namespace = namespace }
+func (meta *ObjectMeta) GetName() string { return meta.Name }
+func (meta *ObjectMeta) SetName(name string) { meta.Name = name }
+func (meta *ObjectMeta) GetGenerateName() string { return meta.GenerateName }
+func (meta *ObjectMeta) SetGenerateName(generateName string) { meta.GenerateName = generateName }
+func (meta *ObjectMeta) GetUID() types.UID { return meta.UID }
+func (meta *ObjectMeta) SetUID(uid types.UID) { meta.UID = uid }
+func (meta *ObjectMeta) GetResourceVersion() string { return meta.ResourceVersion }
+func (meta *ObjectMeta) SetResourceVersion(version string) { meta.ResourceVersion = version }
+func (meta *ObjectMeta) GetGeneration() int64 { return meta.Generation }
+func (meta *ObjectMeta) SetGeneration(generation int64) { meta.Generation = generation }
+func (meta *ObjectMeta) GetSelfLink() string { return meta.SelfLink }
+func (meta *ObjectMeta) SetSelfLink(selfLink string) { meta.SelfLink = selfLink }
+func (meta *ObjectMeta) GetCreationTimestamp() metav1.Time { return meta.CreationTimestamp }
+func (meta *ObjectMeta) SetCreationTimestamp(creationTimestamp metav1.Time) {
+ meta.CreationTimestamp = creationTimestamp
+}
+func (meta *ObjectMeta) GetDeletionTimestamp() *metav1.Time { return meta.DeletionTimestamp }
+func (meta *ObjectMeta) SetDeletionTimestamp(deletionTimestamp *metav1.Time) {
+ meta.DeletionTimestamp = deletionTimestamp
+}
+func (meta *ObjectMeta) GetDeletionGracePeriodSeconds() *int64 { return meta.DeletionGracePeriodSeconds }
+func (meta *ObjectMeta) SetDeletionGracePeriodSeconds(deletionGracePeriodSeconds *int64) {
+ meta.DeletionGracePeriodSeconds = deletionGracePeriodSeconds
+}
+func (meta *ObjectMeta) GetLabels() map[string]string { return meta.Labels }
+func (meta *ObjectMeta) SetLabels(labels map[string]string) { meta.Labels = labels }
+func (meta *ObjectMeta) GetAnnotations() map[string]string { return meta.Annotations }
+func (meta *ObjectMeta) SetAnnotations(annotations map[string]string) { meta.Annotations = annotations }
+func (meta *ObjectMeta) GetInitializers() *metav1.Initializers { return meta.Initializers }
+func (meta *ObjectMeta) SetInitializers(initializers *metav1.Initializers) {
+ meta.Initializers = initializers
+}
+func (meta *ObjectMeta) GetFinalizers() []string { return meta.Finalizers }
+func (meta *ObjectMeta) SetFinalizers(finalizers []string) { meta.Finalizers = finalizers }
+
+func (meta *ObjectMeta) GetOwnerReferences() []metav1.OwnerReference {
+ ret := make([]metav1.OwnerReference, len(meta.OwnerReferences))
+ for i := 0; i < len(meta.OwnerReferences); i++ {
+ ret[i].Kind = meta.OwnerReferences[i].Kind
+ ret[i].Name = meta.OwnerReferences[i].Name
+ ret[i].UID = meta.OwnerReferences[i].UID
+ ret[i].APIVersion = meta.OwnerReferences[i].APIVersion
+ if meta.OwnerReferences[i].Controller != nil {
+ value := *meta.OwnerReferences[i].Controller
+ ret[i].Controller = &value
+ }
+ if meta.OwnerReferences[i].BlockOwnerDeletion != nil {
+ value := *meta.OwnerReferences[i].BlockOwnerDeletion
+ ret[i].BlockOwnerDeletion = &value
+ }
+ }
+ return ret
+}
+
+func (meta *ObjectMeta) SetOwnerReferences(references []metav1.OwnerReference) {
+ newReferences := make([]metav1.OwnerReference, len(references))
+ for i := 0; i < len(references); i++ {
+ newReferences[i].Kind = references[i].Kind
+ newReferences[i].Name = references[i].Name
+ newReferences[i].UID = references[i].UID
+ newReferences[i].APIVersion = references[i].APIVersion
+ if references[i].Controller != nil {
+ value := *references[i].Controller
+ newReferences[i].Controller = &value
+ }
+ if references[i].BlockOwnerDeletion != nil {
+ value := *references[i].BlockOwnerDeletion
+ newReferences[i].BlockOwnerDeletion = &value
+ }
+ }
+ meta.OwnerReferences = newReferences
+}
+
+func (meta *ObjectMeta) GetClusterName() string {
+ return meta.ClusterName
+}
+func (meta *ObjectMeta) SetClusterName(clusterName string) {
+ meta.ClusterName = clusterName
+}
diff --git a/vendor/k8s.io/client-go/pkg/api/v1/objectreference.go b/vendor/k8s.io/client-go/pkg/api/v1/objectreference.go
new file mode 100644
index 000000000..ee5335ee8
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/v1/objectreference.go
@@ -0,0 +1,33 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// IsAnAPIObject allows clients to preemptively get a reference to an API object and pass it to places that
+// intend only to get a reference to that object. This simplifies the event recording interface.
+func (obj *ObjectReference) SetGroupVersionKind(gvk schema.GroupVersionKind) {
+ obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind()
+}
+
+func (obj *ObjectReference) GroupVersionKind() schema.GroupVersionKind {
+ return schema.FromAPIVersionAndKind(obj.APIVersion, obj.Kind)
+}
+
+func (obj *ObjectReference) GetObjectKind() schema.ObjectKind { return obj }
diff --git a/vendor/k8s.io/client-go/pkg/api/v1/ref/ref.go b/vendor/k8s.io/client-go/pkg/api/v1/ref/ref.go
new file mode 100644
index 000000000..51f69555d
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/v1/ref/ref.go
@@ -0,0 +1,121 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package ref
+
+import (
+ "errors"
+ "fmt"
+ "net/url"
+ "strings"
+
+ "k8s.io/apimachinery/pkg/api/meta"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/client-go/pkg/api/v1"
+)
+
+var (
+ // Errors that could be returned by GetReference.
+ ErrNilObject = errors.New("can't reference a nil object")
+ ErrNoSelfLink = errors.New("selfLink was empty, can't make reference")
+)
+
+// GetReference returns an ObjectReference which refers to the given
+// object, or an error if the object doesn't follow the conventions
+// that would allow this.
+// TODO: should take a meta.Interface see http://issue.k8s.io/7127
+func GetReference(scheme *runtime.Scheme, obj runtime.Object) (*v1.ObjectReference, error) {
+ if obj == nil {
+ return nil, ErrNilObject
+ }
+ if ref, ok := obj.(*v1.ObjectReference); ok {
+ // Don't make a reference to a reference.
+ return ref, nil
+ }
+
+ gvk := obj.GetObjectKind().GroupVersionKind()
+
+ // if the object referenced is actually persisted, we can just get kind from meta
+ // if we are building an object reference to something not yet persisted, we should fallback to scheme
+ kind := gvk.Kind
+ if len(kind) == 0 {
+ // TODO: this is wrong
+ gvks, _, err := scheme.ObjectKinds(obj)
+ if err != nil {
+ return nil, err
+ }
+ kind = gvks[0].Kind
+ }
+
+ // An object that implements only List has enough metadata to build a reference
+ var listMeta meta.List
+ objectMeta, err := meta.Accessor(obj)
+ if err != nil {
+ listMeta, err = meta.ListAccessor(obj)
+ if err != nil {
+ return nil, err
+ }
+ } else {
+ listMeta = objectMeta
+ }
+
+ // if the object referenced is actually persisted, we can also get version from meta
+ version := gvk.GroupVersion().String()
+ if len(version) == 0 {
+ selfLink := listMeta.GetSelfLink()
+ if len(selfLink) == 0 {
+ return nil, ErrNoSelfLink
+ }
+ selfLinkUrl, err := url.Parse(selfLink)
+ if err != nil {
+ return nil, err
+ }
+ // example paths: /<prefix>/<version>/*
+ parts := strings.Split(selfLinkUrl.Path, "/")
+ if len(parts) < 3 {
+ return nil, fmt.Errorf("unexpected self link format: '%v'; got version '%v'", selfLink, version)
+ }
+ version = parts[2]
+ }
+
+ // only has list metadata
+ if objectMeta == nil {
+ return &v1.ObjectReference{
+ Kind: kind,
+ APIVersion: version,
+ ResourceVersion: listMeta.GetResourceVersion(),
+ }, nil
+ }
+
+ return &v1.ObjectReference{
+ Kind: kind,
+ APIVersion: version,
+ Name: objectMeta.GetName(),
+ Namespace: objectMeta.GetNamespace(),
+ UID: objectMeta.GetUID(),
+ ResourceVersion: objectMeta.GetResourceVersion(),
+ }, nil
+}
+
+// GetPartialReference is exactly like GetReference, but allows you to set the FieldPath.
+func GetPartialReference(scheme *runtime.Scheme, obj runtime.Object, fieldPath string) (*v1.ObjectReference, error) {
+ ref, err := GetReference(scheme, obj)
+ if err != nil {
+ return nil, err
+ }
+ ref.FieldPath = fieldPath
+ return ref, nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/api/v1/register.go b/vendor/k8s.io/client-go/pkg/api/v1/register.go
new file mode 100644
index 000000000..c70d6ac56
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/v1/register.go
@@ -0,0 +1,106 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = ""
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs, addConversionFuncs, addFastPathConversionFuncs)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Pod{},
+ &PodList{},
+ &PodStatusResult{},
+ &PodTemplate{},
+ &PodTemplateList{},
+ &ReplicationController{},
+ &ReplicationControllerList{},
+ &Service{},
+ &ServiceProxyOptions{},
+ &ServiceList{},
+ &Endpoints{},
+ &EndpointsList{},
+ &Node{},
+ &NodeList{},
+ &NodeProxyOptions{},
+ &Binding{},
+ &Event{},
+ &EventList{},
+ &List{},
+ &LimitRange{},
+ &LimitRangeList{},
+ &ResourceQuota{},
+ &ResourceQuotaList{},
+ &Namespace{},
+ &NamespaceList{},
+ &Secret{},
+ &SecretList{},
+ &ServiceAccount{},
+ &ServiceAccountList{},
+ &PersistentVolume{},
+ &PersistentVolumeList{},
+ &PersistentVolumeClaim{},
+ &PersistentVolumeClaimList{},
+ &PodAttachOptions{},
+ &PodLogOptions{},
+ &PodExecOptions{},
+ &PodPortForwardOptions{},
+ &PodProxyOptions{},
+ &ComponentStatus{},
+ &ComponentStatusList{},
+ &SerializedReference{},
+ &RangeAllocation{},
+ &ConfigMap{},
+ &ConfigMapList{},
+ )
+
+ // Add common types
+ scheme.AddKnownTypes(SchemeGroupVersion, &metav1.Status{})
+
+ // Add the watch version that applies
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/api/v1/resource.go b/vendor/k8s.io/client-go/pkg/api/v1/resource.go
new file mode 100644
index 000000000..0d1c1dccd
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/v1/resource.go
@@ -0,0 +1,63 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/api/resource"
+)
+
+// Returns string version of ResourceName.
+func (self ResourceName) String() string {
+ return string(self)
+}
+
+// Returns the CPU limit if specified.
+func (self *ResourceList) Cpu() *resource.Quantity {
+ if val, ok := (*self)[ResourceCPU]; ok {
+ return &val
+ }
+ return &resource.Quantity{Format: resource.DecimalSI}
+}
+
+// Returns the Memory limit if specified.
+func (self *ResourceList) Memory() *resource.Quantity {
+ if val, ok := (*self)[ResourceMemory]; ok {
+ return &val
+ }
+ return &resource.Quantity{Format: resource.BinarySI}
+}
+
+func (self *ResourceList) Pods() *resource.Quantity {
+ if val, ok := (*self)[ResourcePods]; ok {
+ return &val
+ }
+ return &resource.Quantity{}
+}
+
+func (self *ResourceList) NvidiaGPU() *resource.Quantity {
+ if val, ok := (*self)[ResourceNvidiaGPU]; ok {
+ return &val
+ }
+ return &resource.Quantity{}
+}
+
+func (self *ResourceList) StorageOverlay() *resource.Quantity {
+ if val, ok := (*self)[ResourceStorageOverlay]; ok {
+ return &val
+ }
+ return &resource.Quantity{}
+}
diff --git a/vendor/k8s.io/client-go/pkg/api/v1/taint.go b/vendor/k8s.io/client-go/pkg/api/v1/taint.go
new file mode 100644
index 000000000..7b606a309
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/v1/taint.go
@@ -0,0 +1,33 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import "fmt"
+
+// MatchTaint checks if the taint matches taintToMatch. Taints are unique by key:effect,
+// if the two taints have same key:effect, regard as they match.
+func (t *Taint) MatchTaint(taintToMatch *Taint) bool {
+ return t.Key == taintToMatch.Key && t.Effect == taintToMatch.Effect
+}
+
+// taint.ToString() converts taint struct to string in format key=value:effect or key:effect.
+func (t *Taint) ToString() string {
+ if len(t.Value) == 0 {
+ return fmt.Sprintf("%v:%v", t.Key, t.Effect)
+ }
+ return fmt.Sprintf("%v=%v:%v", t.Key, t.Value, t.Effect)
+}
diff --git a/vendor/k8s.io/client-go/pkg/api/v1/toleration.go b/vendor/k8s.io/client-go/pkg/api/v1/toleration.go
new file mode 100644
index 000000000..b203d335b
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/v1/toleration.go
@@ -0,0 +1,56 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+// MatchToleration checks if the toleration matches tolerationToMatch. Tolerations are unique by <key,effect,operator,value>,
+// if the two tolerations have same <key,effect,operator,value> combination, regard as they match.
+// TODO: uniqueness check for tolerations in api validations.
+func (t *Toleration) MatchToleration(tolerationToMatch *Toleration) bool {
+ return t.Key == tolerationToMatch.Key &&
+ t.Effect == tolerationToMatch.Effect &&
+ t.Operator == tolerationToMatch.Operator &&
+ t.Value == tolerationToMatch.Value
+}
+
+// ToleratesTaint checks if the toleration tolerates the taint.
+// The matching follows the rules below:
+// (1) Empty toleration.effect means to match all taint effects,
+// otherwise taint effect must equal to toleration.effect.
+// (2) If toleration.operator is 'Exists', it means to match all taint values.
+// (3) Empty toleration.key means to match all taint keys.
+// If toleration.key is empty, toleration.operator must be 'Exists';
+// this combination means to match all taint values and all taint keys.
+func (t *Toleration) ToleratesTaint(taint *Taint) bool {
+ if len(t.Effect) > 0 && t.Effect != taint.Effect {
+ return false
+ }
+
+ if len(t.Key) > 0 && t.Key != taint.Key {
+ return false
+ }
+
+ // TODO: Use proper defaulting when Toleration becomes a field of PodSpec
+ switch t.Operator {
+ // empty operator means Equal
+ case "", TolerationOpEqual:
+ return t.Value == taint.Value
+ case TolerationOpExists:
+ return true
+ default:
+ return false
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/api/v1/types.generated.go b/vendor/k8s.io/client-go/pkg/api/v1/types.generated.go
new file mode 100644
index 000000000..9bd5aa845
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/v1/types.generated.go
@@ -0,0 +1,76734 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg3_resource "k8s.io/apimachinery/pkg/api/resource"
+ pkg2_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ pkg5_runtime "k8s.io/apimachinery/pkg/runtime"
+ pkg1_types "k8s.io/apimachinery/pkg/types"
+ pkg4_intstr "k8s.io/apimachinery/pkg/util/intstr"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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_resource.Quantity
+ var v1 pkg2_v1.Time
+ var v2 pkg5_runtime.RawExtension
+ var v3 pkg1_types.UID
+ var v4 pkg4_intstr.IntOrString
+ var v5 time.Time
+ _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5
+ }
+}
+
+func (x *ObjectMeta) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [16]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Name != ""
+ yyq2[1] = x.GenerateName != ""
+ yyq2[2] = x.Namespace != ""
+ yyq2[3] = x.SelfLink != ""
+ yyq2[4] = x.UID != ""
+ yyq2[5] = x.ResourceVersion != ""
+ yyq2[6] = x.Generation != 0
+ yyq2[7] = true
+ yyq2[8] = x.DeletionTimestamp != nil
+ yyq2[9] = x.DeletionGracePeriodSeconds != nil
+ yyq2[10] = len(x.Labels) != 0
+ yyq2[11] = len(x.Annotations) != 0
+ yyq2[12] = len(x.OwnerReferences) != 0
+ yyq2[13] = x.Initializers != nil
+ yyq2[14] = len(x.Finalizers) != 0
+ yyq2[15] = x.ClusterName != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(16)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.GenerateName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("generateName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.GenerateName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("namespace"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SelfLink))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selfLink"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SelfLink))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.UID) {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.UID))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("uid"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.UID) {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.UID))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resourceVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Generation))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("generation"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Generation))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ yy25 := &x.CreationTimestamp
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy25) {
+ } else if yym26 {
+ z.EncBinaryMarshal(yy25)
+ } else if !yym26 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy25)
+ } else {
+ z.EncFallback(yy25)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("creationTimestamp"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy27 := &x.CreationTimestamp
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy27) {
+ } else if yym28 {
+ z.EncBinaryMarshal(yy27)
+ } else if !yym28 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy27)
+ } else {
+ z.EncFallback(yy27)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ if x.DeletionTimestamp == nil {
+ r.EncodeNil()
+ } else {
+ yym30 := z.EncBinary()
+ _ = yym30
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.DeletionTimestamp) {
+ } else if yym30 {
+ z.EncBinaryMarshal(x.DeletionTimestamp)
+ } else if !yym30 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.DeletionTimestamp)
+ } else {
+ z.EncFallback(x.DeletionTimestamp)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("deletionTimestamp"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.DeletionTimestamp == nil {
+ r.EncodeNil()
+ } else {
+ yym31 := z.EncBinary()
+ _ = yym31
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.DeletionTimestamp) {
+ } else if yym31 {
+ z.EncBinaryMarshal(x.DeletionTimestamp)
+ } else if !yym31 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.DeletionTimestamp)
+ } else {
+ z.EncFallback(x.DeletionTimestamp)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ if x.DeletionGracePeriodSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy33 := *x.DeletionGracePeriodSeconds
+ yym34 := z.EncBinary()
+ _ = yym34
+ if false {
+ } else {
+ r.EncodeInt(int64(yy33))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("deletionGracePeriodSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.DeletionGracePeriodSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy35 := *x.DeletionGracePeriodSeconds
+ yym36 := z.EncBinary()
+ _ = yym36
+ if false {
+ } else {
+ r.EncodeInt(int64(yy35))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[10] {
+ if x.Labels == nil {
+ r.EncodeNil()
+ } else {
+ yym38 := z.EncBinary()
+ _ = yym38
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Labels, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[10] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("labels"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Labels == nil {
+ r.EncodeNil()
+ } else {
+ yym39 := z.EncBinary()
+ _ = yym39
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Labels, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[11] {
+ if x.Annotations == nil {
+ r.EncodeNil()
+ } else {
+ yym41 := z.EncBinary()
+ _ = yym41
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Annotations, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[11] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("annotations"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Annotations == nil {
+ r.EncodeNil()
+ } else {
+ yym42 := z.EncBinary()
+ _ = yym42
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Annotations, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[12] {
+ if x.OwnerReferences == nil {
+ r.EncodeNil()
+ } else {
+ yym44 := z.EncBinary()
+ _ = yym44
+ if false {
+ } else {
+ h.encSlicev1_OwnerReference(([]pkg2_v1.OwnerReference)(x.OwnerReferences), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[12] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ownerReferences"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.OwnerReferences == nil {
+ r.EncodeNil()
+ } else {
+ yym45 := z.EncBinary()
+ _ = yym45
+ if false {
+ } else {
+ h.encSlicev1_OwnerReference(([]pkg2_v1.OwnerReference)(x.OwnerReferences), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[13] {
+ if x.Initializers == nil {
+ r.EncodeNil()
+ } else {
+ yym47 := z.EncBinary()
+ _ = yym47
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Initializers) {
+ } else {
+ z.EncFallback(x.Initializers)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[13] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("initializers"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Initializers == nil {
+ r.EncodeNil()
+ } else {
+ yym48 := z.EncBinary()
+ _ = yym48
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Initializers) {
+ } else {
+ z.EncFallback(x.Initializers)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[14] {
+ if x.Finalizers == nil {
+ r.EncodeNil()
+ } else {
+ yym50 := z.EncBinary()
+ _ = yym50
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Finalizers, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[14] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("finalizers"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Finalizers == nil {
+ r.EncodeNil()
+ } else {
+ yym51 := z.EncBinary()
+ _ = yym51
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Finalizers, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[15] {
+ yym53 := z.EncBinary()
+ _ = yym53
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[15] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("clusterName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym54 := z.EncBinary()
+ _ = yym54
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ObjectMeta) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ObjectMeta) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "generateName":
+ if r.TryDecodeAsNil() {
+ x.GenerateName = ""
+ } else {
+ yyv6 := &x.GenerateName
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "namespace":
+ if r.TryDecodeAsNil() {
+ x.Namespace = ""
+ } else {
+ yyv8 := &x.Namespace
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "selfLink":
+ if r.TryDecodeAsNil() {
+ x.SelfLink = ""
+ } else {
+ yyv10 := &x.SelfLink
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "uid":
+ if r.TryDecodeAsNil() {
+ x.UID = ""
+ } else {
+ yyv12 := &x.UID
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv12) {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ case "resourceVersion":
+ if r.TryDecodeAsNil() {
+ x.ResourceVersion = ""
+ } else {
+ yyv14 := &x.ResourceVersion
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ case "generation":
+ if r.TryDecodeAsNil() {
+ x.Generation = 0
+ } else {
+ yyv16 := &x.Generation
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*int64)(yyv16)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "creationTimestamp":
+ if r.TryDecodeAsNil() {
+ x.CreationTimestamp = pkg2_v1.Time{}
+ } else {
+ yyv18 := &x.CreationTimestamp
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv18) {
+ } else if yym19 {
+ z.DecBinaryUnmarshal(yyv18)
+ } else if !yym19 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv18)
+ } else {
+ z.DecFallback(yyv18, false)
+ }
+ }
+ case "deletionTimestamp":
+ if r.TryDecodeAsNil() {
+ if x.DeletionTimestamp != nil {
+ x.DeletionTimestamp = nil
+ }
+ } else {
+ if x.DeletionTimestamp == nil {
+ x.DeletionTimestamp = new(pkg2_v1.Time)
+ }
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.DeletionTimestamp) {
+ } else if yym21 {
+ z.DecBinaryUnmarshal(x.DeletionTimestamp)
+ } else if !yym21 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.DeletionTimestamp)
+ } else {
+ z.DecFallback(x.DeletionTimestamp, false)
+ }
+ }
+ case "deletionGracePeriodSeconds":
+ if r.TryDecodeAsNil() {
+ if x.DeletionGracePeriodSeconds != nil {
+ x.DeletionGracePeriodSeconds = nil
+ }
+ } else {
+ if x.DeletionGracePeriodSeconds == nil {
+ x.DeletionGracePeriodSeconds = new(int64)
+ }
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else {
+ *((*int64)(x.DeletionGracePeriodSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "labels":
+ if r.TryDecodeAsNil() {
+ x.Labels = nil
+ } else {
+ yyv24 := &x.Labels
+ yym25 := z.DecBinary()
+ _ = yym25
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv24, false, d)
+ }
+ }
+ case "annotations":
+ if r.TryDecodeAsNil() {
+ x.Annotations = nil
+ } else {
+ yyv26 := &x.Annotations
+ yym27 := z.DecBinary()
+ _ = yym27
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv26, false, d)
+ }
+ }
+ case "ownerReferences":
+ if r.TryDecodeAsNil() {
+ x.OwnerReferences = nil
+ } else {
+ yyv28 := &x.OwnerReferences
+ yym29 := z.DecBinary()
+ _ = yym29
+ if false {
+ } else {
+ h.decSlicev1_OwnerReference((*[]pkg2_v1.OwnerReference)(yyv28), d)
+ }
+ }
+ case "initializers":
+ if r.TryDecodeAsNil() {
+ if x.Initializers != nil {
+ x.Initializers = nil
+ }
+ } else {
+ if x.Initializers == nil {
+ x.Initializers = new(pkg2_v1.Initializers)
+ }
+ yym31 := z.DecBinary()
+ _ = yym31
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Initializers) {
+ } else {
+ z.DecFallback(x.Initializers, false)
+ }
+ }
+ case "finalizers":
+ if r.TryDecodeAsNil() {
+ x.Finalizers = nil
+ } else {
+ yyv32 := &x.Finalizers
+ yym33 := z.DecBinary()
+ _ = yym33
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv32, false, d)
+ }
+ }
+ case "clusterName":
+ if r.TryDecodeAsNil() {
+ x.ClusterName = ""
+ } else {
+ yyv34 := &x.ClusterName
+ yym35 := z.DecBinary()
+ _ = yym35
+ if false {
+ } else {
+ *((*string)(yyv34)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ObjectMeta) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj36 int
+ var yyb36 bool
+ var yyhl36 bool = l >= 0
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv37 := &x.Name
+ yym38 := z.DecBinary()
+ _ = yym38
+ if false {
+ } else {
+ *((*string)(yyv37)) = r.DecodeString()
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.GenerateName = ""
+ } else {
+ yyv39 := &x.GenerateName
+ yym40 := z.DecBinary()
+ _ = yym40
+ if false {
+ } else {
+ *((*string)(yyv39)) = r.DecodeString()
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Namespace = ""
+ } else {
+ yyv41 := &x.Namespace
+ yym42 := z.DecBinary()
+ _ = yym42
+ if false {
+ } else {
+ *((*string)(yyv41)) = r.DecodeString()
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SelfLink = ""
+ } else {
+ yyv43 := &x.SelfLink
+ yym44 := z.DecBinary()
+ _ = yym44
+ if false {
+ } else {
+ *((*string)(yyv43)) = r.DecodeString()
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UID = ""
+ } else {
+ yyv45 := &x.UID
+ yym46 := z.DecBinary()
+ _ = yym46
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv45) {
+ } else {
+ *((*string)(yyv45)) = r.DecodeString()
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ResourceVersion = ""
+ } else {
+ yyv47 := &x.ResourceVersion
+ yym48 := z.DecBinary()
+ _ = yym48
+ if false {
+ } else {
+ *((*string)(yyv47)) = r.DecodeString()
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Generation = 0
+ } else {
+ yyv49 := &x.Generation
+ yym50 := z.DecBinary()
+ _ = yym50
+ if false {
+ } else {
+ *((*int64)(yyv49)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CreationTimestamp = pkg2_v1.Time{}
+ } else {
+ yyv51 := &x.CreationTimestamp
+ yym52 := z.DecBinary()
+ _ = yym52
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv51) {
+ } else if yym52 {
+ z.DecBinaryUnmarshal(yyv51)
+ } else if !yym52 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv51)
+ } else {
+ z.DecFallback(yyv51, false)
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.DeletionTimestamp != nil {
+ x.DeletionTimestamp = nil
+ }
+ } else {
+ if x.DeletionTimestamp == nil {
+ x.DeletionTimestamp = new(pkg2_v1.Time)
+ }
+ yym54 := z.DecBinary()
+ _ = yym54
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.DeletionTimestamp) {
+ } else if yym54 {
+ z.DecBinaryUnmarshal(x.DeletionTimestamp)
+ } else if !yym54 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.DeletionTimestamp)
+ } else {
+ z.DecFallback(x.DeletionTimestamp, false)
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.DeletionGracePeriodSeconds != nil {
+ x.DeletionGracePeriodSeconds = nil
+ }
+ } else {
+ if x.DeletionGracePeriodSeconds == nil {
+ x.DeletionGracePeriodSeconds = new(int64)
+ }
+ yym56 := z.DecBinary()
+ _ = yym56
+ if false {
+ } else {
+ *((*int64)(x.DeletionGracePeriodSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Labels = nil
+ } else {
+ yyv57 := &x.Labels
+ yym58 := z.DecBinary()
+ _ = yym58
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv57, false, d)
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Annotations = nil
+ } else {
+ yyv59 := &x.Annotations
+ yym60 := z.DecBinary()
+ _ = yym60
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv59, false, d)
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.OwnerReferences = nil
+ } else {
+ yyv61 := &x.OwnerReferences
+ yym62 := z.DecBinary()
+ _ = yym62
+ if false {
+ } else {
+ h.decSlicev1_OwnerReference((*[]pkg2_v1.OwnerReference)(yyv61), d)
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Initializers != nil {
+ x.Initializers = nil
+ }
+ } else {
+ if x.Initializers == nil {
+ x.Initializers = new(pkg2_v1.Initializers)
+ }
+ yym64 := z.DecBinary()
+ _ = yym64
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Initializers) {
+ } else {
+ z.DecFallback(x.Initializers, false)
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Finalizers = nil
+ } else {
+ yyv65 := &x.Finalizers
+ yym66 := z.DecBinary()
+ _ = yym66
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv65, false, d)
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ClusterName = ""
+ } else {
+ yyv67 := &x.ClusterName
+ yym68 := z.DecBinary()
+ _ = yym68
+ if false {
+ } else {
+ *((*string)(yyv67)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj36-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[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 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ var yyn6 bool
+ if x.VolumeSource.HostPath == nil {
+ yyn6 = true
+ goto LABEL6
+ }
+ LABEL6:
+ if yyr2 || yy2arr2 {
+ if yyn6 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.HostPath == nil {
+ r.EncodeNil()
+ } else {
+ x.HostPath.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostPath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ if x.EmptyDir == nil {
+ r.EncodeNil()
+ } else {
+ x.EmptyDir.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("emptyDir"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ if x.GCEPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.GCEPersistentDisk.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("gcePersistentDisk"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[4] {
+ if x.AWSElasticBlockStore == nil {
+ r.EncodeNil()
+ } else {
+ x.AWSElasticBlockStore.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("awsElasticBlockStore"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[5] {
+ if x.GitRepo == nil {
+ r.EncodeNil()
+ } else {
+ x.GitRepo.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("gitRepo"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[6] {
+ if x.Secret == nil {
+ r.EncodeNil()
+ } else {
+ x.Secret.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secret"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[7] {
+ if x.NFS == nil {
+ r.EncodeNil()
+ } else {
+ x.NFS.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[8] {
+ if x.ISCSI == nil {
+ r.EncodeNil()
+ } else {
+ x.ISCSI.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("iscsi"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[9] {
+ if x.Glusterfs == nil {
+ r.EncodeNil()
+ } else {
+ x.Glusterfs.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("glusterfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[10] {
+ if x.PersistentVolumeClaim == nil {
+ r.EncodeNil()
+ } else {
+ x.PersistentVolumeClaim.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[10] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("persistentVolumeClaim"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[11] {
+ if x.RBD == nil {
+ r.EncodeNil()
+ } else {
+ x.RBD.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[11] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rbd"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[12] {
+ if x.FlexVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.FlexVolume.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[12] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("flexVolume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[13] {
+ if x.Cinder == nil {
+ r.EncodeNil()
+ } else {
+ x.Cinder.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[13] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("cinder"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[14] {
+ if x.CephFS == nil {
+ r.EncodeNil()
+ } else {
+ x.CephFS.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[14] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("cephfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[15] {
+ if x.Flocker == nil {
+ r.EncodeNil()
+ } else {
+ x.Flocker.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[15] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("flocker"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[16] {
+ if x.DownwardAPI == nil {
+ r.EncodeNil()
+ } else {
+ x.DownwardAPI.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[16] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("downwardAPI"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[17] {
+ if x.FC == nil {
+ r.EncodeNil()
+ } else {
+ x.FC.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[17] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fc"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[18] {
+ if x.AzureFile == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureFile.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[18] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("azureFile"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[19] {
+ if x.ConfigMap == nil {
+ r.EncodeNil()
+ } else {
+ x.ConfigMap.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[19] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("configMap"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[20] {
+ if x.VsphereVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.VsphereVolume.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[20] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("vsphereVolume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[21] {
+ if x.Quobyte == nil {
+ r.EncodeNil()
+ } else {
+ x.Quobyte.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[21] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("quobyte"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[22] {
+ if x.AzureDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureDisk.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[22] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("azureDisk"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[23] {
+ if x.PhotonPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.PhotonPersistentDisk.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[23] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("photonPersistentDisk"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[24] {
+ if x.Projected == nil {
+ r.EncodeNil()
+ } else {
+ x.Projected.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[24] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("projected"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[25] {
+ if x.PortworxVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.PortworxVolume.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[25] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("portworxVolume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[26] {
+ if x.ScaleIO == nil {
+ r.EncodeNil()
+ } else {
+ x.ScaleIO.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[26] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("scaleIO"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[27] {
+ if x.StorageOS == nil {
+ r.EncodeNil()
+ } else {
+ x.StorageOS.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[27] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("storageos"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn84 {
+ r.EncodeNil()
+ } else {
+ if x.StorageOS == nil {
+ r.EncodeNil()
+ } else {
+ x.StorageOS.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Volume) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Volume) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "hostPath":
+ if x.VolumeSource.HostPath == nil {
+ x.VolumeSource.HostPath = new(HostPathVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.HostPath != nil {
+ x.HostPath = nil
+ }
+ } else {
+ if x.HostPath == nil {
+ x.HostPath = new(HostPathVolumeSource)
+ }
+ x.HostPath.CodecDecodeSelf(d)
+ }
+ case "emptyDir":
+ if x.VolumeSource.EmptyDir == nil {
+ x.VolumeSource.EmptyDir = new(EmptyDirVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.EmptyDir != nil {
+ x.EmptyDir = nil
+ }
+ } else {
+ if x.EmptyDir == nil {
+ x.EmptyDir = new(EmptyDirVolumeSource)
+ }
+ x.EmptyDir.CodecDecodeSelf(d)
+ }
+ case "gcePersistentDisk":
+ if x.VolumeSource.GCEPersistentDisk == nil {
+ x.VolumeSource.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.GCEPersistentDisk != nil {
+ x.GCEPersistentDisk = nil
+ }
+ } else {
+ if x.GCEPersistentDisk == nil {
+ x.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ x.GCEPersistentDisk.CodecDecodeSelf(d)
+ }
+ case "awsElasticBlockStore":
+ if x.VolumeSource.AWSElasticBlockStore == nil {
+ x.VolumeSource.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.AWSElasticBlockStore != nil {
+ x.AWSElasticBlockStore = nil
+ }
+ } else {
+ if x.AWSElasticBlockStore == nil {
+ x.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ x.AWSElasticBlockStore.CodecDecodeSelf(d)
+ }
+ case "gitRepo":
+ if x.VolumeSource.GitRepo == nil {
+ x.VolumeSource.GitRepo = new(GitRepoVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.GitRepo != nil {
+ x.GitRepo = nil
+ }
+ } else {
+ if x.GitRepo == nil {
+ x.GitRepo = new(GitRepoVolumeSource)
+ }
+ x.GitRepo.CodecDecodeSelf(d)
+ }
+ case "secret":
+ if x.VolumeSource.Secret == nil {
+ x.VolumeSource.Secret = new(SecretVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.Secret != nil {
+ x.Secret = nil
+ }
+ } else {
+ if x.Secret == nil {
+ x.Secret = new(SecretVolumeSource)
+ }
+ x.Secret.CodecDecodeSelf(d)
+ }
+ case "nfs":
+ if x.VolumeSource.NFS == nil {
+ x.VolumeSource.NFS = new(NFSVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.NFS != nil {
+ x.NFS = nil
+ }
+ } else {
+ if x.NFS == nil {
+ x.NFS = new(NFSVolumeSource)
+ }
+ x.NFS.CodecDecodeSelf(d)
+ }
+ case "iscsi":
+ if x.VolumeSource.ISCSI == nil {
+ x.VolumeSource.ISCSI = new(ISCSIVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.ISCSI != nil {
+ x.ISCSI = nil
+ }
+ } else {
+ if x.ISCSI == nil {
+ x.ISCSI = new(ISCSIVolumeSource)
+ }
+ x.ISCSI.CodecDecodeSelf(d)
+ }
+ case "glusterfs":
+ if x.VolumeSource.Glusterfs == nil {
+ x.VolumeSource.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.Glusterfs != nil {
+ x.Glusterfs = nil
+ }
+ } else {
+ if x.Glusterfs == nil {
+ x.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ x.Glusterfs.CodecDecodeSelf(d)
+ }
+ case "persistentVolumeClaim":
+ if x.VolumeSource.PersistentVolumeClaim == nil {
+ x.VolumeSource.PersistentVolumeClaim = new(PersistentVolumeClaimVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.PersistentVolumeClaim != nil {
+ x.PersistentVolumeClaim = nil
+ }
+ } else {
+ if x.PersistentVolumeClaim == nil {
+ x.PersistentVolumeClaim = new(PersistentVolumeClaimVolumeSource)
+ }
+ x.PersistentVolumeClaim.CodecDecodeSelf(d)
+ }
+ case "rbd":
+ if x.VolumeSource.RBD == nil {
+ x.VolumeSource.RBD = new(RBDVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.RBD != nil {
+ x.RBD = nil
+ }
+ } else {
+ if x.RBD == nil {
+ x.RBD = new(RBDVolumeSource)
+ }
+ x.RBD.CodecDecodeSelf(d)
+ }
+ case "flexVolume":
+ if x.VolumeSource.FlexVolume == nil {
+ x.VolumeSource.FlexVolume = new(FlexVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.FlexVolume != nil {
+ x.FlexVolume = nil
+ }
+ } else {
+ if x.FlexVolume == nil {
+ x.FlexVolume = new(FlexVolumeSource)
+ }
+ x.FlexVolume.CodecDecodeSelf(d)
+ }
+ case "cinder":
+ if x.VolumeSource.Cinder == nil {
+ x.VolumeSource.Cinder = new(CinderVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.Cinder != nil {
+ x.Cinder = nil
+ }
+ } else {
+ if x.Cinder == nil {
+ x.Cinder = new(CinderVolumeSource)
+ }
+ x.Cinder.CodecDecodeSelf(d)
+ }
+ case "cephfs":
+ if x.VolumeSource.CephFS == nil {
+ x.VolumeSource.CephFS = new(CephFSVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.CephFS != nil {
+ x.CephFS = nil
+ }
+ } else {
+ if x.CephFS == nil {
+ x.CephFS = new(CephFSVolumeSource)
+ }
+ x.CephFS.CodecDecodeSelf(d)
+ }
+ case "flocker":
+ if x.VolumeSource.Flocker == nil {
+ x.VolumeSource.Flocker = new(FlockerVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.Flocker != nil {
+ x.Flocker = nil
+ }
+ } else {
+ if x.Flocker == nil {
+ x.Flocker = new(FlockerVolumeSource)
+ }
+ x.Flocker.CodecDecodeSelf(d)
+ }
+ case "downwardAPI":
+ if x.VolumeSource.DownwardAPI == nil {
+ x.VolumeSource.DownwardAPI = new(DownwardAPIVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.DownwardAPI != nil {
+ x.DownwardAPI = nil
+ }
+ } else {
+ if x.DownwardAPI == nil {
+ x.DownwardAPI = new(DownwardAPIVolumeSource)
+ }
+ x.DownwardAPI.CodecDecodeSelf(d)
+ }
+ case "fc":
+ if x.VolumeSource.FC == nil {
+ x.VolumeSource.FC = new(FCVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.FC != nil {
+ x.FC = nil
+ }
+ } else {
+ if x.FC == nil {
+ x.FC = new(FCVolumeSource)
+ }
+ x.FC.CodecDecodeSelf(d)
+ }
+ case "azureFile":
+ if x.VolumeSource.AzureFile == nil {
+ x.VolumeSource.AzureFile = new(AzureFileVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.AzureFile != nil {
+ x.AzureFile = nil
+ }
+ } else {
+ if x.AzureFile == nil {
+ x.AzureFile = new(AzureFileVolumeSource)
+ }
+ x.AzureFile.CodecDecodeSelf(d)
+ }
+ case "configMap":
+ if x.VolumeSource.ConfigMap == nil {
+ x.VolumeSource.ConfigMap = new(ConfigMapVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.ConfigMap != nil {
+ x.ConfigMap = nil
+ }
+ } else {
+ if x.ConfigMap == nil {
+ x.ConfigMap = new(ConfigMapVolumeSource)
+ }
+ x.ConfigMap.CodecDecodeSelf(d)
+ }
+ case "vsphereVolume":
+ if x.VolumeSource.VsphereVolume == nil {
+ x.VolumeSource.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.VsphereVolume != nil {
+ x.VsphereVolume = nil
+ }
+ } else {
+ if x.VsphereVolume == nil {
+ x.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ x.VsphereVolume.CodecDecodeSelf(d)
+ }
+ case "quobyte":
+ if x.VolumeSource.Quobyte == nil {
+ x.VolumeSource.Quobyte = new(QuobyteVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.Quobyte != nil {
+ x.Quobyte = nil
+ }
+ } else {
+ if x.Quobyte == nil {
+ x.Quobyte = new(QuobyteVolumeSource)
+ }
+ x.Quobyte.CodecDecodeSelf(d)
+ }
+ case "azureDisk":
+ if x.VolumeSource.AzureDisk == nil {
+ x.VolumeSource.AzureDisk = new(AzureDiskVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.AzureDisk != nil {
+ x.AzureDisk = nil
+ }
+ } else {
+ if x.AzureDisk == nil {
+ x.AzureDisk = new(AzureDiskVolumeSource)
+ }
+ x.AzureDisk.CodecDecodeSelf(d)
+ }
+ case "photonPersistentDisk":
+ if x.VolumeSource.PhotonPersistentDisk == nil {
+ x.VolumeSource.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.PhotonPersistentDisk != nil {
+ x.PhotonPersistentDisk = nil
+ }
+ } else {
+ if x.PhotonPersistentDisk == nil {
+ x.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource)
+ }
+ x.PhotonPersistentDisk.CodecDecodeSelf(d)
+ }
+ case "projected":
+ if x.VolumeSource.Projected == nil {
+ x.VolumeSource.Projected = new(ProjectedVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.Projected != nil {
+ x.Projected = nil
+ }
+ } else {
+ if x.Projected == nil {
+ x.Projected = new(ProjectedVolumeSource)
+ }
+ x.Projected.CodecDecodeSelf(d)
+ }
+ case "portworxVolume":
+ if x.VolumeSource.PortworxVolume == nil {
+ x.VolumeSource.PortworxVolume = new(PortworxVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.PortworxVolume != nil {
+ x.PortworxVolume = nil
+ }
+ } else {
+ if x.PortworxVolume == nil {
+ x.PortworxVolume = new(PortworxVolumeSource)
+ }
+ x.PortworxVolume.CodecDecodeSelf(d)
+ }
+ case "scaleIO":
+ if x.VolumeSource.ScaleIO == nil {
+ x.VolumeSource.ScaleIO = new(ScaleIOVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.ScaleIO != nil {
+ x.ScaleIO = nil
+ }
+ } else {
+ if x.ScaleIO == nil {
+ x.ScaleIO = new(ScaleIOVolumeSource)
+ }
+ x.ScaleIO.CodecDecodeSelf(d)
+ }
+ case "storageos":
+ if x.VolumeSource.StorageOS == nil {
+ x.VolumeSource.StorageOS = new(StorageOSVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.StorageOS != nil {
+ x.StorageOS = nil
+ }
+ } else {
+ if x.StorageOS == nil {
+ x.StorageOS = new(StorageOSVolumeSource)
+ }
+ x.StorageOS.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Volume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv34 := &x.Name
+ yym35 := z.DecBinary()
+ _ = yym35
+ if false {
+ } else {
+ *((*string)(yyv34)) = r.DecodeString()
+ }
+ }
+ if x.VolumeSource.HostPath == nil {
+ x.VolumeSource.HostPath = new(HostPathVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.HostPath != nil {
+ x.HostPath = nil
+ }
+ } else {
+ if x.HostPath == nil {
+ x.HostPath = new(HostPathVolumeSource)
+ }
+ x.HostPath.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.EmptyDir == nil {
+ x.VolumeSource.EmptyDir = new(EmptyDirVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.EmptyDir != nil {
+ x.EmptyDir = nil
+ }
+ } else {
+ if x.EmptyDir == nil {
+ x.EmptyDir = new(EmptyDirVolumeSource)
+ }
+ x.EmptyDir.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.GCEPersistentDisk == nil {
+ x.VolumeSource.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.GCEPersistentDisk != nil {
+ x.GCEPersistentDisk = nil
+ }
+ } else {
+ if x.GCEPersistentDisk == nil {
+ x.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ x.GCEPersistentDisk.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.AWSElasticBlockStore == nil {
+ x.VolumeSource.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.AWSElasticBlockStore != nil {
+ x.AWSElasticBlockStore = nil
+ }
+ } else {
+ if x.AWSElasticBlockStore == nil {
+ x.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ x.AWSElasticBlockStore.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.GitRepo == nil {
+ x.VolumeSource.GitRepo = new(GitRepoVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.GitRepo != nil {
+ x.GitRepo = nil
+ }
+ } else {
+ if x.GitRepo == nil {
+ x.GitRepo = new(GitRepoVolumeSource)
+ }
+ x.GitRepo.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.Secret == nil {
+ x.VolumeSource.Secret = new(SecretVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Secret != nil {
+ x.Secret = nil
+ }
+ } else {
+ if x.Secret == nil {
+ x.Secret = new(SecretVolumeSource)
+ }
+ x.Secret.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.NFS == nil {
+ x.VolumeSource.NFS = new(NFSVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.NFS != nil {
+ x.NFS = nil
+ }
+ } else {
+ if x.NFS == nil {
+ x.NFS = new(NFSVolumeSource)
+ }
+ x.NFS.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.ISCSI == nil {
+ x.VolumeSource.ISCSI = new(ISCSIVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ISCSI != nil {
+ x.ISCSI = nil
+ }
+ } else {
+ if x.ISCSI == nil {
+ x.ISCSI = new(ISCSIVolumeSource)
+ }
+ x.ISCSI.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.Glusterfs == nil {
+ x.VolumeSource.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Glusterfs != nil {
+ x.Glusterfs = nil
+ }
+ } else {
+ if x.Glusterfs == nil {
+ x.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ x.Glusterfs.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.PersistentVolumeClaim == nil {
+ x.VolumeSource.PersistentVolumeClaim = new(PersistentVolumeClaimVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PersistentVolumeClaim != nil {
+ x.PersistentVolumeClaim = nil
+ }
+ } else {
+ if x.PersistentVolumeClaim == nil {
+ x.PersistentVolumeClaim = new(PersistentVolumeClaimVolumeSource)
+ }
+ x.PersistentVolumeClaim.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.RBD == nil {
+ x.VolumeSource.RBD = new(RBDVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RBD != nil {
+ x.RBD = nil
+ }
+ } else {
+ if x.RBD == nil {
+ x.RBD = new(RBDVolumeSource)
+ }
+ x.RBD.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.FlexVolume == nil {
+ x.VolumeSource.FlexVolume = new(FlexVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FlexVolume != nil {
+ x.FlexVolume = nil
+ }
+ } else {
+ if x.FlexVolume == nil {
+ x.FlexVolume = new(FlexVolumeSource)
+ }
+ x.FlexVolume.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.Cinder == nil {
+ x.VolumeSource.Cinder = new(CinderVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Cinder != nil {
+ x.Cinder = nil
+ }
+ } else {
+ if x.Cinder == nil {
+ x.Cinder = new(CinderVolumeSource)
+ }
+ x.Cinder.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.CephFS == nil {
+ x.VolumeSource.CephFS = new(CephFSVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.CephFS != nil {
+ x.CephFS = nil
+ }
+ } else {
+ if x.CephFS == nil {
+ x.CephFS = new(CephFSVolumeSource)
+ }
+ x.CephFS.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.Flocker == nil {
+ x.VolumeSource.Flocker = new(FlockerVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Flocker != nil {
+ x.Flocker = nil
+ }
+ } else {
+ if x.Flocker == nil {
+ x.Flocker = new(FlockerVolumeSource)
+ }
+ x.Flocker.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.DownwardAPI == nil {
+ x.VolumeSource.DownwardAPI = new(DownwardAPIVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.DownwardAPI != nil {
+ x.DownwardAPI = nil
+ }
+ } else {
+ if x.DownwardAPI == nil {
+ x.DownwardAPI = new(DownwardAPIVolumeSource)
+ }
+ x.DownwardAPI.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.FC == nil {
+ x.VolumeSource.FC = new(FCVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FC != nil {
+ x.FC = nil
+ }
+ } else {
+ if x.FC == nil {
+ x.FC = new(FCVolumeSource)
+ }
+ x.FC.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.AzureFile == nil {
+ x.VolumeSource.AzureFile = new(AzureFileVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.AzureFile != nil {
+ x.AzureFile = nil
+ }
+ } else {
+ if x.AzureFile == nil {
+ x.AzureFile = new(AzureFileVolumeSource)
+ }
+ x.AzureFile.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.ConfigMap == nil {
+ x.VolumeSource.ConfigMap = new(ConfigMapVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ConfigMap != nil {
+ x.ConfigMap = nil
+ }
+ } else {
+ if x.ConfigMap == nil {
+ x.ConfigMap = new(ConfigMapVolumeSource)
+ }
+ x.ConfigMap.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.VsphereVolume == nil {
+ x.VolumeSource.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.VsphereVolume != nil {
+ x.VsphereVolume = nil
+ }
+ } else {
+ if x.VsphereVolume == nil {
+ x.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ x.VsphereVolume.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.Quobyte == nil {
+ x.VolumeSource.Quobyte = new(QuobyteVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Quobyte != nil {
+ x.Quobyte = nil
+ }
+ } else {
+ if x.Quobyte == nil {
+ x.Quobyte = new(QuobyteVolumeSource)
+ }
+ x.Quobyte.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.AzureDisk == nil {
+ x.VolumeSource.AzureDisk = new(AzureDiskVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.AzureDisk != nil {
+ x.AzureDisk = nil
+ }
+ } else {
+ if x.AzureDisk == nil {
+ x.AzureDisk = new(AzureDiskVolumeSource)
+ }
+ x.AzureDisk.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.PhotonPersistentDisk == nil {
+ x.VolumeSource.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PhotonPersistentDisk != nil {
+ x.PhotonPersistentDisk = nil
+ }
+ } else {
+ if x.PhotonPersistentDisk == nil {
+ x.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource)
+ }
+ x.PhotonPersistentDisk.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.Projected == nil {
+ x.VolumeSource.Projected = new(ProjectedVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Projected != nil {
+ x.Projected = nil
+ }
+ } else {
+ if x.Projected == nil {
+ x.Projected = new(ProjectedVolumeSource)
+ }
+ x.Projected.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.PortworxVolume == nil {
+ x.VolumeSource.PortworxVolume = new(PortworxVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PortworxVolume != nil {
+ x.PortworxVolume = nil
+ }
+ } else {
+ if x.PortworxVolume == nil {
+ x.PortworxVolume = new(PortworxVolumeSource)
+ }
+ x.PortworxVolume.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.ScaleIO == nil {
+ x.VolumeSource.ScaleIO = new(ScaleIOVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ScaleIO != nil {
+ x.ScaleIO = nil
+ }
+ } else {
+ if x.ScaleIO == nil {
+ x.ScaleIO = new(ScaleIOVolumeSource)
+ }
+ x.ScaleIO.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.StorageOS == nil {
+ x.VolumeSource.StorageOS = new(StorageOSVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.StorageOS != nil {
+ x.StorageOS = nil
+ }
+ } else {
+ if x.StorageOS == nil {
+ x.StorageOS = new(StorageOSVolumeSource)
+ }
+ x.StorageOS.CodecDecodeSelf(d)
+ }
+ for {
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj33-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [27]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.HostPath != nil
+ yyq2[1] = x.EmptyDir != nil
+ yyq2[2] = x.GCEPersistentDisk != nil
+ yyq2[3] = x.AWSElasticBlockStore != nil
+ yyq2[4] = x.GitRepo != nil
+ yyq2[5] = x.Secret != nil
+ yyq2[6] = x.NFS != nil
+ yyq2[7] = x.ISCSI != nil
+ yyq2[8] = x.Glusterfs != nil
+ yyq2[9] = x.PersistentVolumeClaim != nil
+ yyq2[10] = x.RBD != nil
+ yyq2[11] = x.FlexVolume != nil
+ yyq2[12] = x.Cinder != nil
+ yyq2[13] = x.CephFS != nil
+ yyq2[14] = x.Flocker != nil
+ yyq2[15] = x.DownwardAPI != nil
+ yyq2[16] = x.FC != nil
+ yyq2[17] = x.AzureFile != nil
+ yyq2[18] = x.ConfigMap != nil
+ yyq2[19] = x.VsphereVolume != nil
+ yyq2[20] = x.Quobyte != nil
+ yyq2[21] = x.AzureDisk != nil
+ yyq2[22] = x.PhotonPersistentDisk != nil
+ yyq2[23] = x.Projected != nil
+ yyq2[24] = x.PortworxVolume != nil
+ yyq2[25] = x.ScaleIO != nil
+ yyq2[26] = x.StorageOS != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(27)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.HostPath == nil {
+ r.EncodeNil()
+ } else {
+ x.HostPath.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostPath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.HostPath == nil {
+ r.EncodeNil()
+ } else {
+ x.HostPath.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.EmptyDir == nil {
+ r.EncodeNil()
+ } else {
+ x.EmptyDir.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("emptyDir"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.EmptyDir == nil {
+ r.EncodeNil()
+ } else {
+ x.EmptyDir.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.GCEPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.GCEPersistentDisk.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("gcePersistentDisk"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.GCEPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.GCEPersistentDisk.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.AWSElasticBlockStore == nil {
+ r.EncodeNil()
+ } else {
+ x.AWSElasticBlockStore.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("awsElasticBlockStore"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.AWSElasticBlockStore == nil {
+ r.EncodeNil()
+ } else {
+ x.AWSElasticBlockStore.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.GitRepo == nil {
+ r.EncodeNil()
+ } else {
+ x.GitRepo.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("gitRepo"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.GitRepo == nil {
+ r.EncodeNil()
+ } else {
+ x.GitRepo.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.Secret == nil {
+ r.EncodeNil()
+ } else {
+ x.Secret.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secret"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Secret == nil {
+ r.EncodeNil()
+ } else {
+ x.Secret.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.NFS == nil {
+ r.EncodeNil()
+ } else {
+ x.NFS.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NFS == nil {
+ r.EncodeNil()
+ } else {
+ x.NFS.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.ISCSI == nil {
+ r.EncodeNil()
+ } else {
+ x.ISCSI.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("iscsi"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ISCSI == nil {
+ r.EncodeNil()
+ } else {
+ x.ISCSI.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ if x.Glusterfs == nil {
+ r.EncodeNil()
+ } else {
+ x.Glusterfs.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("glusterfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Glusterfs == nil {
+ r.EncodeNil()
+ } else {
+ x.Glusterfs.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ if x.PersistentVolumeClaim == nil {
+ r.EncodeNil()
+ } else {
+ x.PersistentVolumeClaim.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("persistentVolumeClaim"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PersistentVolumeClaim == nil {
+ r.EncodeNil()
+ } else {
+ x.PersistentVolumeClaim.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[10] {
+ if x.RBD == nil {
+ r.EncodeNil()
+ } else {
+ x.RBD.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[10] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rbd"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RBD == nil {
+ r.EncodeNil()
+ } else {
+ x.RBD.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[11] {
+ if x.FlexVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.FlexVolume.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[11] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("flexVolume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.FlexVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.FlexVolume.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[12] {
+ if x.Cinder == nil {
+ r.EncodeNil()
+ } else {
+ x.Cinder.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[12] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("cinder"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Cinder == nil {
+ r.EncodeNil()
+ } else {
+ x.Cinder.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[13] {
+ if x.CephFS == nil {
+ r.EncodeNil()
+ } else {
+ x.CephFS.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[13] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("cephfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.CephFS == nil {
+ r.EncodeNil()
+ } else {
+ x.CephFS.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[14] {
+ if x.Flocker == nil {
+ r.EncodeNil()
+ } else {
+ x.Flocker.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[14] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("flocker"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Flocker == nil {
+ r.EncodeNil()
+ } else {
+ x.Flocker.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[15] {
+ if x.DownwardAPI == nil {
+ r.EncodeNil()
+ } else {
+ x.DownwardAPI.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[15] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("downwardAPI"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.DownwardAPI == nil {
+ r.EncodeNil()
+ } else {
+ x.DownwardAPI.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[16] {
+ if x.FC == nil {
+ r.EncodeNil()
+ } else {
+ x.FC.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[16] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fc"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.FC == nil {
+ r.EncodeNil()
+ } else {
+ x.FC.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[17] {
+ if x.AzureFile == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureFile.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[17] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("azureFile"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.AzureFile == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureFile.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[18] {
+ if x.ConfigMap == nil {
+ r.EncodeNil()
+ } else {
+ x.ConfigMap.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[18] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("configMap"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ConfigMap == nil {
+ r.EncodeNil()
+ } else {
+ x.ConfigMap.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[19] {
+ if x.VsphereVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.VsphereVolume.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[19] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("vsphereVolume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.VsphereVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.VsphereVolume.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[20] {
+ if x.Quobyte == nil {
+ r.EncodeNil()
+ } else {
+ x.Quobyte.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[20] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("quobyte"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Quobyte == nil {
+ r.EncodeNil()
+ } else {
+ x.Quobyte.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[21] {
+ if x.AzureDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureDisk.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[21] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("azureDisk"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.AzureDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureDisk.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[22] {
+ if x.PhotonPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.PhotonPersistentDisk.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[22] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("photonPersistentDisk"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PhotonPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.PhotonPersistentDisk.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[23] {
+ if x.Projected == nil {
+ r.EncodeNil()
+ } else {
+ x.Projected.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[23] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("projected"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Projected == nil {
+ r.EncodeNil()
+ } else {
+ x.Projected.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[24] {
+ if x.PortworxVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.PortworxVolume.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[24] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("portworxVolume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PortworxVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.PortworxVolume.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[25] {
+ if x.ScaleIO == nil {
+ r.EncodeNil()
+ } else {
+ x.ScaleIO.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[25] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("scaleIO"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ScaleIO == nil {
+ r.EncodeNil()
+ } else {
+ x.ScaleIO.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[26] {
+ if x.StorageOS == nil {
+ r.EncodeNil()
+ } else {
+ x.StorageOS.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[26] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("storageos"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.StorageOS == nil {
+ r.EncodeNil()
+ } else {
+ x.StorageOS.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *VolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *VolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "hostPath":
+ if r.TryDecodeAsNil() {
+ if x.HostPath != nil {
+ x.HostPath = nil
+ }
+ } else {
+ if x.HostPath == nil {
+ x.HostPath = new(HostPathVolumeSource)
+ }
+ x.HostPath.CodecDecodeSelf(d)
+ }
+ case "emptyDir":
+ if r.TryDecodeAsNil() {
+ if x.EmptyDir != nil {
+ x.EmptyDir = nil
+ }
+ } else {
+ if x.EmptyDir == nil {
+ x.EmptyDir = new(EmptyDirVolumeSource)
+ }
+ x.EmptyDir.CodecDecodeSelf(d)
+ }
+ case "gcePersistentDisk":
+ if r.TryDecodeAsNil() {
+ if x.GCEPersistentDisk != nil {
+ x.GCEPersistentDisk = nil
+ }
+ } else {
+ if x.GCEPersistentDisk == nil {
+ x.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ x.GCEPersistentDisk.CodecDecodeSelf(d)
+ }
+ case "awsElasticBlockStore":
+ if r.TryDecodeAsNil() {
+ if x.AWSElasticBlockStore != nil {
+ x.AWSElasticBlockStore = nil
+ }
+ } else {
+ if x.AWSElasticBlockStore == nil {
+ x.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ x.AWSElasticBlockStore.CodecDecodeSelf(d)
+ }
+ case "gitRepo":
+ if r.TryDecodeAsNil() {
+ if x.GitRepo != nil {
+ x.GitRepo = nil
+ }
+ } else {
+ if x.GitRepo == nil {
+ x.GitRepo = new(GitRepoVolumeSource)
+ }
+ x.GitRepo.CodecDecodeSelf(d)
+ }
+ case "secret":
+ if r.TryDecodeAsNil() {
+ if x.Secret != nil {
+ x.Secret = nil
+ }
+ } else {
+ if x.Secret == nil {
+ x.Secret = new(SecretVolumeSource)
+ }
+ x.Secret.CodecDecodeSelf(d)
+ }
+ case "nfs":
+ if r.TryDecodeAsNil() {
+ if x.NFS != nil {
+ x.NFS = nil
+ }
+ } else {
+ if x.NFS == nil {
+ x.NFS = new(NFSVolumeSource)
+ }
+ x.NFS.CodecDecodeSelf(d)
+ }
+ case "iscsi":
+ if r.TryDecodeAsNil() {
+ if x.ISCSI != nil {
+ x.ISCSI = nil
+ }
+ } else {
+ if x.ISCSI == nil {
+ x.ISCSI = new(ISCSIVolumeSource)
+ }
+ x.ISCSI.CodecDecodeSelf(d)
+ }
+ case "glusterfs":
+ if r.TryDecodeAsNil() {
+ if x.Glusterfs != nil {
+ x.Glusterfs = nil
+ }
+ } else {
+ if x.Glusterfs == nil {
+ x.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ x.Glusterfs.CodecDecodeSelf(d)
+ }
+ case "persistentVolumeClaim":
+ if r.TryDecodeAsNil() {
+ if x.PersistentVolumeClaim != nil {
+ x.PersistentVolumeClaim = nil
+ }
+ } else {
+ if x.PersistentVolumeClaim == nil {
+ x.PersistentVolumeClaim = new(PersistentVolumeClaimVolumeSource)
+ }
+ x.PersistentVolumeClaim.CodecDecodeSelf(d)
+ }
+ case "rbd":
+ if r.TryDecodeAsNil() {
+ if x.RBD != nil {
+ x.RBD = nil
+ }
+ } else {
+ if x.RBD == nil {
+ x.RBD = new(RBDVolumeSource)
+ }
+ x.RBD.CodecDecodeSelf(d)
+ }
+ case "flexVolume":
+ if r.TryDecodeAsNil() {
+ if x.FlexVolume != nil {
+ x.FlexVolume = nil
+ }
+ } else {
+ if x.FlexVolume == nil {
+ x.FlexVolume = new(FlexVolumeSource)
+ }
+ x.FlexVolume.CodecDecodeSelf(d)
+ }
+ case "cinder":
+ if r.TryDecodeAsNil() {
+ if x.Cinder != nil {
+ x.Cinder = nil
+ }
+ } else {
+ if x.Cinder == nil {
+ x.Cinder = new(CinderVolumeSource)
+ }
+ x.Cinder.CodecDecodeSelf(d)
+ }
+ case "cephfs":
+ if r.TryDecodeAsNil() {
+ if x.CephFS != nil {
+ x.CephFS = nil
+ }
+ } else {
+ if x.CephFS == nil {
+ x.CephFS = new(CephFSVolumeSource)
+ }
+ x.CephFS.CodecDecodeSelf(d)
+ }
+ case "flocker":
+ if r.TryDecodeAsNil() {
+ if x.Flocker != nil {
+ x.Flocker = nil
+ }
+ } else {
+ if x.Flocker == nil {
+ x.Flocker = new(FlockerVolumeSource)
+ }
+ x.Flocker.CodecDecodeSelf(d)
+ }
+ case "downwardAPI":
+ if r.TryDecodeAsNil() {
+ if x.DownwardAPI != nil {
+ x.DownwardAPI = nil
+ }
+ } else {
+ if x.DownwardAPI == nil {
+ x.DownwardAPI = new(DownwardAPIVolumeSource)
+ }
+ x.DownwardAPI.CodecDecodeSelf(d)
+ }
+ case "fc":
+ if r.TryDecodeAsNil() {
+ if x.FC != nil {
+ x.FC = nil
+ }
+ } else {
+ if x.FC == nil {
+ x.FC = new(FCVolumeSource)
+ }
+ x.FC.CodecDecodeSelf(d)
+ }
+ case "azureFile":
+ if r.TryDecodeAsNil() {
+ if x.AzureFile != nil {
+ x.AzureFile = nil
+ }
+ } else {
+ if x.AzureFile == nil {
+ x.AzureFile = new(AzureFileVolumeSource)
+ }
+ x.AzureFile.CodecDecodeSelf(d)
+ }
+ case "configMap":
+ if r.TryDecodeAsNil() {
+ if x.ConfigMap != nil {
+ x.ConfigMap = nil
+ }
+ } else {
+ if x.ConfigMap == nil {
+ x.ConfigMap = new(ConfigMapVolumeSource)
+ }
+ x.ConfigMap.CodecDecodeSelf(d)
+ }
+ case "vsphereVolume":
+ if r.TryDecodeAsNil() {
+ if x.VsphereVolume != nil {
+ x.VsphereVolume = nil
+ }
+ } else {
+ if x.VsphereVolume == nil {
+ x.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ x.VsphereVolume.CodecDecodeSelf(d)
+ }
+ case "quobyte":
+ if r.TryDecodeAsNil() {
+ if x.Quobyte != nil {
+ x.Quobyte = nil
+ }
+ } else {
+ if x.Quobyte == nil {
+ x.Quobyte = new(QuobyteVolumeSource)
+ }
+ x.Quobyte.CodecDecodeSelf(d)
+ }
+ case "azureDisk":
+ if r.TryDecodeAsNil() {
+ if x.AzureDisk != nil {
+ x.AzureDisk = nil
+ }
+ } else {
+ if x.AzureDisk == nil {
+ x.AzureDisk = new(AzureDiskVolumeSource)
+ }
+ x.AzureDisk.CodecDecodeSelf(d)
+ }
+ case "photonPersistentDisk":
+ if r.TryDecodeAsNil() {
+ if x.PhotonPersistentDisk != nil {
+ x.PhotonPersistentDisk = nil
+ }
+ } else {
+ if x.PhotonPersistentDisk == nil {
+ x.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource)
+ }
+ x.PhotonPersistentDisk.CodecDecodeSelf(d)
+ }
+ case "projected":
+ if r.TryDecodeAsNil() {
+ if x.Projected != nil {
+ x.Projected = nil
+ }
+ } else {
+ if x.Projected == nil {
+ x.Projected = new(ProjectedVolumeSource)
+ }
+ x.Projected.CodecDecodeSelf(d)
+ }
+ case "portworxVolume":
+ if r.TryDecodeAsNil() {
+ if x.PortworxVolume != nil {
+ x.PortworxVolume = nil
+ }
+ } else {
+ if x.PortworxVolume == nil {
+ x.PortworxVolume = new(PortworxVolumeSource)
+ }
+ x.PortworxVolume.CodecDecodeSelf(d)
+ }
+ case "scaleIO":
+ if r.TryDecodeAsNil() {
+ if x.ScaleIO != nil {
+ x.ScaleIO = nil
+ }
+ } else {
+ if x.ScaleIO == nil {
+ x.ScaleIO = new(ScaleIOVolumeSource)
+ }
+ x.ScaleIO.CodecDecodeSelf(d)
+ }
+ case "storageos":
+ if r.TryDecodeAsNil() {
+ if x.StorageOS != nil {
+ x.StorageOS = nil
+ }
+ } else {
+ if x.StorageOS == nil {
+ x.StorageOS = new(StorageOSVolumeSource)
+ }
+ x.StorageOS.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *VolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj31 int
+ var yyb31 bool
+ var yyhl31 bool = l >= 0
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.HostPath != nil {
+ x.HostPath = nil
+ }
+ } else {
+ if x.HostPath == nil {
+ x.HostPath = new(HostPathVolumeSource)
+ }
+ x.HostPath.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.EmptyDir != nil {
+ x.EmptyDir = nil
+ }
+ } else {
+ if x.EmptyDir == nil {
+ x.EmptyDir = new(EmptyDirVolumeSource)
+ }
+ x.EmptyDir.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.GCEPersistentDisk != nil {
+ x.GCEPersistentDisk = nil
+ }
+ } else {
+ if x.GCEPersistentDisk == nil {
+ x.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ x.GCEPersistentDisk.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.AWSElasticBlockStore != nil {
+ x.AWSElasticBlockStore = nil
+ }
+ } else {
+ if x.AWSElasticBlockStore == nil {
+ x.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ x.AWSElasticBlockStore.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.GitRepo != nil {
+ x.GitRepo = nil
+ }
+ } else {
+ if x.GitRepo == nil {
+ x.GitRepo = new(GitRepoVolumeSource)
+ }
+ x.GitRepo.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Secret != nil {
+ x.Secret = nil
+ }
+ } else {
+ if x.Secret == nil {
+ x.Secret = new(SecretVolumeSource)
+ }
+ x.Secret.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.NFS != nil {
+ x.NFS = nil
+ }
+ } else {
+ if x.NFS == nil {
+ x.NFS = new(NFSVolumeSource)
+ }
+ x.NFS.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ISCSI != nil {
+ x.ISCSI = nil
+ }
+ } else {
+ if x.ISCSI == nil {
+ x.ISCSI = new(ISCSIVolumeSource)
+ }
+ x.ISCSI.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Glusterfs != nil {
+ x.Glusterfs = nil
+ }
+ } else {
+ if x.Glusterfs == nil {
+ x.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ x.Glusterfs.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PersistentVolumeClaim != nil {
+ x.PersistentVolumeClaim = nil
+ }
+ } else {
+ if x.PersistentVolumeClaim == nil {
+ x.PersistentVolumeClaim = new(PersistentVolumeClaimVolumeSource)
+ }
+ x.PersistentVolumeClaim.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RBD != nil {
+ x.RBD = nil
+ }
+ } else {
+ if x.RBD == nil {
+ x.RBD = new(RBDVolumeSource)
+ }
+ x.RBD.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FlexVolume != nil {
+ x.FlexVolume = nil
+ }
+ } else {
+ if x.FlexVolume == nil {
+ x.FlexVolume = new(FlexVolumeSource)
+ }
+ x.FlexVolume.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Cinder != nil {
+ x.Cinder = nil
+ }
+ } else {
+ if x.Cinder == nil {
+ x.Cinder = new(CinderVolumeSource)
+ }
+ x.Cinder.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.CephFS != nil {
+ x.CephFS = nil
+ }
+ } else {
+ if x.CephFS == nil {
+ x.CephFS = new(CephFSVolumeSource)
+ }
+ x.CephFS.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Flocker != nil {
+ x.Flocker = nil
+ }
+ } else {
+ if x.Flocker == nil {
+ x.Flocker = new(FlockerVolumeSource)
+ }
+ x.Flocker.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.DownwardAPI != nil {
+ x.DownwardAPI = nil
+ }
+ } else {
+ if x.DownwardAPI == nil {
+ x.DownwardAPI = new(DownwardAPIVolumeSource)
+ }
+ x.DownwardAPI.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FC != nil {
+ x.FC = nil
+ }
+ } else {
+ if x.FC == nil {
+ x.FC = new(FCVolumeSource)
+ }
+ x.FC.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.AzureFile != nil {
+ x.AzureFile = nil
+ }
+ } else {
+ if x.AzureFile == nil {
+ x.AzureFile = new(AzureFileVolumeSource)
+ }
+ x.AzureFile.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ConfigMap != nil {
+ x.ConfigMap = nil
+ }
+ } else {
+ if x.ConfigMap == nil {
+ x.ConfigMap = new(ConfigMapVolumeSource)
+ }
+ x.ConfigMap.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.VsphereVolume != nil {
+ x.VsphereVolume = nil
+ }
+ } else {
+ if x.VsphereVolume == nil {
+ x.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ x.VsphereVolume.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Quobyte != nil {
+ x.Quobyte = nil
+ }
+ } else {
+ if x.Quobyte == nil {
+ x.Quobyte = new(QuobyteVolumeSource)
+ }
+ x.Quobyte.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.AzureDisk != nil {
+ x.AzureDisk = nil
+ }
+ } else {
+ if x.AzureDisk == nil {
+ x.AzureDisk = new(AzureDiskVolumeSource)
+ }
+ x.AzureDisk.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PhotonPersistentDisk != nil {
+ x.PhotonPersistentDisk = nil
+ }
+ } else {
+ if x.PhotonPersistentDisk == nil {
+ x.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource)
+ }
+ x.PhotonPersistentDisk.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Projected != nil {
+ x.Projected = nil
+ }
+ } else {
+ if x.Projected == nil {
+ x.Projected = new(ProjectedVolumeSource)
+ }
+ x.Projected.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PortworxVolume != nil {
+ x.PortworxVolume = nil
+ }
+ } else {
+ if x.PortworxVolume == nil {
+ x.PortworxVolume = new(PortworxVolumeSource)
+ }
+ x.PortworxVolume.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ScaleIO != nil {
+ x.ScaleIO = nil
+ }
+ } else {
+ if x.ScaleIO == nil {
+ x.ScaleIO = new(ScaleIOVolumeSource)
+ }
+ x.ScaleIO.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.StorageOS != nil {
+ x.StorageOS = nil
+ }
+ } else {
+ if x.StorageOS == nil {
+ x.StorageOS = new(StorageOSVolumeSource)
+ }
+ x.StorageOS.CodecDecodeSelf(d)
+ }
+ for {
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj31-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PersistentVolumeClaimVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.ReadOnly != false
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ClaimName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("claimName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ClaimName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PersistentVolumeClaimVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PersistentVolumeClaimVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "claimName":
+ if r.TryDecodeAsNil() {
+ x.ClaimName = ""
+ } else {
+ yyv4 := &x.ClaimName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv6 := &x.ReadOnly
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*bool)(yyv6)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PersistentVolumeClaimVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ClaimName = ""
+ } else {
+ yyv9 := &x.ClaimName
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv11 := &x.ReadOnly
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*bool)(yyv11)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [21]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.GCEPersistentDisk != nil
+ yyq2[1] = x.AWSElasticBlockStore != nil
+ yyq2[2] = x.HostPath != nil
+ yyq2[3] = x.Glusterfs != nil
+ yyq2[4] = x.NFS != nil
+ yyq2[5] = x.RBD != nil
+ yyq2[6] = x.ISCSI != nil
+ yyq2[7] = x.Cinder != nil
+ yyq2[8] = x.CephFS != nil
+ yyq2[9] = x.FC != nil
+ yyq2[10] = x.Flocker != nil
+ yyq2[11] = x.FlexVolume != nil
+ yyq2[12] = x.AzureFile != nil
+ yyq2[13] = x.VsphereVolume != nil
+ yyq2[14] = x.Quobyte != nil
+ yyq2[15] = x.AzureDisk != nil
+ yyq2[16] = x.PhotonPersistentDisk != nil
+ yyq2[17] = x.PortworxVolume != nil
+ yyq2[18] = x.ScaleIO != nil
+ yyq2[19] = x.Local != nil
+ yyq2[20] = x.StorageOS != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(21)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.GCEPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.GCEPersistentDisk.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("gcePersistentDisk"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.GCEPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.GCEPersistentDisk.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.AWSElasticBlockStore == nil {
+ r.EncodeNil()
+ } else {
+ x.AWSElasticBlockStore.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("awsElasticBlockStore"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.AWSElasticBlockStore == nil {
+ r.EncodeNil()
+ } else {
+ x.AWSElasticBlockStore.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.HostPath == nil {
+ r.EncodeNil()
+ } else {
+ x.HostPath.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostPath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.HostPath == nil {
+ r.EncodeNil()
+ } else {
+ x.HostPath.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Glusterfs == nil {
+ r.EncodeNil()
+ } else {
+ x.Glusterfs.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("glusterfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Glusterfs == nil {
+ r.EncodeNil()
+ } else {
+ x.Glusterfs.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.NFS == nil {
+ r.EncodeNil()
+ } else {
+ x.NFS.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NFS == nil {
+ r.EncodeNil()
+ } else {
+ x.NFS.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.RBD == nil {
+ r.EncodeNil()
+ } else {
+ x.RBD.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rbd"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RBD == nil {
+ r.EncodeNil()
+ } else {
+ x.RBD.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.ISCSI == nil {
+ r.EncodeNil()
+ } else {
+ x.ISCSI.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("iscsi"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ISCSI == nil {
+ r.EncodeNil()
+ } else {
+ x.ISCSI.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.Cinder == nil {
+ r.EncodeNil()
+ } else {
+ x.Cinder.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("cinder"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Cinder == nil {
+ r.EncodeNil()
+ } else {
+ x.Cinder.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ if x.CephFS == nil {
+ r.EncodeNil()
+ } else {
+ x.CephFS.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("cephfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.CephFS == nil {
+ r.EncodeNil()
+ } else {
+ x.CephFS.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ if x.FC == nil {
+ r.EncodeNil()
+ } else {
+ x.FC.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fc"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.FC == nil {
+ r.EncodeNil()
+ } else {
+ x.FC.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[10] {
+ if x.Flocker == nil {
+ r.EncodeNil()
+ } else {
+ x.Flocker.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[10] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("flocker"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Flocker == nil {
+ r.EncodeNil()
+ } else {
+ x.Flocker.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[11] {
+ if x.FlexVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.FlexVolume.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[11] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("flexVolume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.FlexVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.FlexVolume.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[12] {
+ if x.AzureFile == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureFile.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[12] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("azureFile"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.AzureFile == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureFile.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[13] {
+ if x.VsphereVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.VsphereVolume.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[13] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("vsphereVolume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.VsphereVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.VsphereVolume.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[14] {
+ if x.Quobyte == nil {
+ r.EncodeNil()
+ } else {
+ x.Quobyte.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[14] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("quobyte"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Quobyte == nil {
+ r.EncodeNil()
+ } else {
+ x.Quobyte.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[15] {
+ if x.AzureDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureDisk.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[15] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("azureDisk"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.AzureDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureDisk.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[16] {
+ if x.PhotonPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.PhotonPersistentDisk.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[16] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("photonPersistentDisk"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PhotonPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.PhotonPersistentDisk.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[17] {
+ if x.PortworxVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.PortworxVolume.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[17] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("portworxVolume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PortworxVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.PortworxVolume.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[18] {
+ if x.ScaleIO == nil {
+ r.EncodeNil()
+ } else {
+ x.ScaleIO.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[18] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("scaleIO"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ScaleIO == nil {
+ r.EncodeNil()
+ } else {
+ x.ScaleIO.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[19] {
+ if x.Local == nil {
+ r.EncodeNil()
+ } else {
+ x.Local.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[19] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("local"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Local == nil {
+ r.EncodeNil()
+ } else {
+ x.Local.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[20] {
+ if x.StorageOS == nil {
+ r.EncodeNil()
+ } else {
+ x.StorageOS.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[20] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("storageos"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.StorageOS == nil {
+ r.EncodeNil()
+ } else {
+ x.StorageOS.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PersistentVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PersistentVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "gcePersistentDisk":
+ if r.TryDecodeAsNil() {
+ if x.GCEPersistentDisk != nil {
+ x.GCEPersistentDisk = nil
+ }
+ } else {
+ if x.GCEPersistentDisk == nil {
+ x.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ x.GCEPersistentDisk.CodecDecodeSelf(d)
+ }
+ case "awsElasticBlockStore":
+ if r.TryDecodeAsNil() {
+ if x.AWSElasticBlockStore != nil {
+ x.AWSElasticBlockStore = nil
+ }
+ } else {
+ if x.AWSElasticBlockStore == nil {
+ x.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ x.AWSElasticBlockStore.CodecDecodeSelf(d)
+ }
+ case "hostPath":
+ if r.TryDecodeAsNil() {
+ if x.HostPath != nil {
+ x.HostPath = nil
+ }
+ } else {
+ if x.HostPath == nil {
+ x.HostPath = new(HostPathVolumeSource)
+ }
+ x.HostPath.CodecDecodeSelf(d)
+ }
+ case "glusterfs":
+ if r.TryDecodeAsNil() {
+ if x.Glusterfs != nil {
+ x.Glusterfs = nil
+ }
+ } else {
+ if x.Glusterfs == nil {
+ x.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ x.Glusterfs.CodecDecodeSelf(d)
+ }
+ case "nfs":
+ if r.TryDecodeAsNil() {
+ if x.NFS != nil {
+ x.NFS = nil
+ }
+ } else {
+ if x.NFS == nil {
+ x.NFS = new(NFSVolumeSource)
+ }
+ x.NFS.CodecDecodeSelf(d)
+ }
+ case "rbd":
+ if r.TryDecodeAsNil() {
+ if x.RBD != nil {
+ x.RBD = nil
+ }
+ } else {
+ if x.RBD == nil {
+ x.RBD = new(RBDVolumeSource)
+ }
+ x.RBD.CodecDecodeSelf(d)
+ }
+ case "iscsi":
+ if r.TryDecodeAsNil() {
+ if x.ISCSI != nil {
+ x.ISCSI = nil
+ }
+ } else {
+ if x.ISCSI == nil {
+ x.ISCSI = new(ISCSIVolumeSource)
+ }
+ x.ISCSI.CodecDecodeSelf(d)
+ }
+ case "cinder":
+ if r.TryDecodeAsNil() {
+ if x.Cinder != nil {
+ x.Cinder = nil
+ }
+ } else {
+ if x.Cinder == nil {
+ x.Cinder = new(CinderVolumeSource)
+ }
+ x.Cinder.CodecDecodeSelf(d)
+ }
+ case "cephfs":
+ if r.TryDecodeAsNil() {
+ if x.CephFS != nil {
+ x.CephFS = nil
+ }
+ } else {
+ if x.CephFS == nil {
+ x.CephFS = new(CephFSVolumeSource)
+ }
+ x.CephFS.CodecDecodeSelf(d)
+ }
+ case "fc":
+ if r.TryDecodeAsNil() {
+ if x.FC != nil {
+ x.FC = nil
+ }
+ } else {
+ if x.FC == nil {
+ x.FC = new(FCVolumeSource)
+ }
+ x.FC.CodecDecodeSelf(d)
+ }
+ case "flocker":
+ if r.TryDecodeAsNil() {
+ if x.Flocker != nil {
+ x.Flocker = nil
+ }
+ } else {
+ if x.Flocker == nil {
+ x.Flocker = new(FlockerVolumeSource)
+ }
+ x.Flocker.CodecDecodeSelf(d)
+ }
+ case "flexVolume":
+ if r.TryDecodeAsNil() {
+ if x.FlexVolume != nil {
+ x.FlexVolume = nil
+ }
+ } else {
+ if x.FlexVolume == nil {
+ x.FlexVolume = new(FlexVolumeSource)
+ }
+ x.FlexVolume.CodecDecodeSelf(d)
+ }
+ case "azureFile":
+ if r.TryDecodeAsNil() {
+ if x.AzureFile != nil {
+ x.AzureFile = nil
+ }
+ } else {
+ if x.AzureFile == nil {
+ x.AzureFile = new(AzureFileVolumeSource)
+ }
+ x.AzureFile.CodecDecodeSelf(d)
+ }
+ case "vsphereVolume":
+ if r.TryDecodeAsNil() {
+ if x.VsphereVolume != nil {
+ x.VsphereVolume = nil
+ }
+ } else {
+ if x.VsphereVolume == nil {
+ x.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ x.VsphereVolume.CodecDecodeSelf(d)
+ }
+ case "quobyte":
+ if r.TryDecodeAsNil() {
+ if x.Quobyte != nil {
+ x.Quobyte = nil
+ }
+ } else {
+ if x.Quobyte == nil {
+ x.Quobyte = new(QuobyteVolumeSource)
+ }
+ x.Quobyte.CodecDecodeSelf(d)
+ }
+ case "azureDisk":
+ if r.TryDecodeAsNil() {
+ if x.AzureDisk != nil {
+ x.AzureDisk = nil
+ }
+ } else {
+ if x.AzureDisk == nil {
+ x.AzureDisk = new(AzureDiskVolumeSource)
+ }
+ x.AzureDisk.CodecDecodeSelf(d)
+ }
+ case "photonPersistentDisk":
+ if r.TryDecodeAsNil() {
+ if x.PhotonPersistentDisk != nil {
+ x.PhotonPersistentDisk = nil
+ }
+ } else {
+ if x.PhotonPersistentDisk == nil {
+ x.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource)
+ }
+ x.PhotonPersistentDisk.CodecDecodeSelf(d)
+ }
+ case "portworxVolume":
+ if r.TryDecodeAsNil() {
+ if x.PortworxVolume != nil {
+ x.PortworxVolume = nil
+ }
+ } else {
+ if x.PortworxVolume == nil {
+ x.PortworxVolume = new(PortworxVolumeSource)
+ }
+ x.PortworxVolume.CodecDecodeSelf(d)
+ }
+ case "scaleIO":
+ if r.TryDecodeAsNil() {
+ if x.ScaleIO != nil {
+ x.ScaleIO = nil
+ }
+ } else {
+ if x.ScaleIO == nil {
+ x.ScaleIO = new(ScaleIOVolumeSource)
+ }
+ x.ScaleIO.CodecDecodeSelf(d)
+ }
+ case "local":
+ if r.TryDecodeAsNil() {
+ if x.Local != nil {
+ x.Local = nil
+ }
+ } else {
+ if x.Local == nil {
+ x.Local = new(LocalVolumeSource)
+ }
+ x.Local.CodecDecodeSelf(d)
+ }
+ case "storageos":
+ if r.TryDecodeAsNil() {
+ if x.StorageOS != nil {
+ x.StorageOS = nil
+ }
+ } else {
+ if x.StorageOS == nil {
+ x.StorageOS = new(StorageOSPersistentVolumeSource)
+ }
+ x.StorageOS.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PersistentVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj25 int
+ var yyb25 bool
+ var yyhl25 bool = l >= 0
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.GCEPersistentDisk != nil {
+ x.GCEPersistentDisk = nil
+ }
+ } else {
+ if x.GCEPersistentDisk == nil {
+ x.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ x.GCEPersistentDisk.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.AWSElasticBlockStore != nil {
+ x.AWSElasticBlockStore = nil
+ }
+ } else {
+ if x.AWSElasticBlockStore == nil {
+ x.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ x.AWSElasticBlockStore.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.HostPath != nil {
+ x.HostPath = nil
+ }
+ } else {
+ if x.HostPath == nil {
+ x.HostPath = new(HostPathVolumeSource)
+ }
+ x.HostPath.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Glusterfs != nil {
+ x.Glusterfs = nil
+ }
+ } else {
+ if x.Glusterfs == nil {
+ x.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ x.Glusterfs.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.NFS != nil {
+ x.NFS = nil
+ }
+ } else {
+ if x.NFS == nil {
+ x.NFS = new(NFSVolumeSource)
+ }
+ x.NFS.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RBD != nil {
+ x.RBD = nil
+ }
+ } else {
+ if x.RBD == nil {
+ x.RBD = new(RBDVolumeSource)
+ }
+ x.RBD.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ISCSI != nil {
+ x.ISCSI = nil
+ }
+ } else {
+ if x.ISCSI == nil {
+ x.ISCSI = new(ISCSIVolumeSource)
+ }
+ x.ISCSI.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Cinder != nil {
+ x.Cinder = nil
+ }
+ } else {
+ if x.Cinder == nil {
+ x.Cinder = new(CinderVolumeSource)
+ }
+ x.Cinder.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.CephFS != nil {
+ x.CephFS = nil
+ }
+ } else {
+ if x.CephFS == nil {
+ x.CephFS = new(CephFSVolumeSource)
+ }
+ x.CephFS.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FC != nil {
+ x.FC = nil
+ }
+ } else {
+ if x.FC == nil {
+ x.FC = new(FCVolumeSource)
+ }
+ x.FC.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Flocker != nil {
+ x.Flocker = nil
+ }
+ } else {
+ if x.Flocker == nil {
+ x.Flocker = new(FlockerVolumeSource)
+ }
+ x.Flocker.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FlexVolume != nil {
+ x.FlexVolume = nil
+ }
+ } else {
+ if x.FlexVolume == nil {
+ x.FlexVolume = new(FlexVolumeSource)
+ }
+ x.FlexVolume.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.AzureFile != nil {
+ x.AzureFile = nil
+ }
+ } else {
+ if x.AzureFile == nil {
+ x.AzureFile = new(AzureFileVolumeSource)
+ }
+ x.AzureFile.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.VsphereVolume != nil {
+ x.VsphereVolume = nil
+ }
+ } else {
+ if x.VsphereVolume == nil {
+ x.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ x.VsphereVolume.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Quobyte != nil {
+ x.Quobyte = nil
+ }
+ } else {
+ if x.Quobyte == nil {
+ x.Quobyte = new(QuobyteVolumeSource)
+ }
+ x.Quobyte.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.AzureDisk != nil {
+ x.AzureDisk = nil
+ }
+ } else {
+ if x.AzureDisk == nil {
+ x.AzureDisk = new(AzureDiskVolumeSource)
+ }
+ x.AzureDisk.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PhotonPersistentDisk != nil {
+ x.PhotonPersistentDisk = nil
+ }
+ } else {
+ if x.PhotonPersistentDisk == nil {
+ x.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource)
+ }
+ x.PhotonPersistentDisk.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PortworxVolume != nil {
+ x.PortworxVolume = nil
+ }
+ } else {
+ if x.PortworxVolume == nil {
+ x.PortworxVolume = new(PortworxVolumeSource)
+ }
+ x.PortworxVolume.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ScaleIO != nil {
+ x.ScaleIO = nil
+ }
+ } else {
+ if x.ScaleIO == nil {
+ x.ScaleIO = new(ScaleIOVolumeSource)
+ }
+ x.ScaleIO.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Local != nil {
+ x.Local = nil
+ }
+ } else {
+ if x.Local == nil {
+ x.Local = new(LocalVolumeSource)
+ }
+ x.Local.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.StorageOS != nil {
+ x.StorageOS = nil
+ }
+ } else {
+ if x.StorageOS == nil {
+ x.StorageOS = new(StorageOSPersistentVolumeSource)
+ }
+ x.StorageOS.CodecDecodeSelf(d)
+ }
+ for {
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj25-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PersistentVolume) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PersistentVolume) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PersistentVolume) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 = PersistentVolumeSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = PersistentVolumeStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PersistentVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = PersistentVolumeSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = PersistentVolumeStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [26]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = len(x.Capacity) != 0
+ yyq2[1] = x.PersistentVolumeSource.GCEPersistentDisk != nil && x.GCEPersistentDisk != nil
+ yyq2[2] = x.PersistentVolumeSource.AWSElasticBlockStore != nil && x.AWSElasticBlockStore != nil
+ yyq2[3] = x.PersistentVolumeSource.HostPath != nil && x.HostPath != nil
+ yyq2[4] = x.PersistentVolumeSource.Glusterfs != nil && x.Glusterfs != nil
+ yyq2[5] = x.PersistentVolumeSource.NFS != nil && x.NFS != nil
+ yyq2[6] = x.PersistentVolumeSource.RBD != nil && x.RBD != nil
+ yyq2[7] = x.PersistentVolumeSource.ISCSI != nil && x.ISCSI != nil
+ yyq2[8] = x.PersistentVolumeSource.Cinder != nil && x.Cinder != nil
+ yyq2[9] = x.PersistentVolumeSource.CephFS != nil && x.CephFS != nil
+ yyq2[10] = x.PersistentVolumeSource.FC != nil && x.FC != nil
+ yyq2[11] = x.PersistentVolumeSource.Flocker != nil && x.Flocker != nil
+ yyq2[12] = x.PersistentVolumeSource.FlexVolume != nil && x.FlexVolume != nil
+ yyq2[13] = x.PersistentVolumeSource.AzureFile != nil && x.AzureFile != nil
+ yyq2[14] = x.PersistentVolumeSource.VsphereVolume != nil && x.VsphereVolume != nil
+ yyq2[15] = x.PersistentVolumeSource.Quobyte != nil && x.Quobyte != nil
+ yyq2[16] = x.PersistentVolumeSource.AzureDisk != nil && x.AzureDisk != nil
+ yyq2[17] = x.PersistentVolumeSource.PhotonPersistentDisk != nil && x.PhotonPersistentDisk != nil
+ yyq2[18] = x.PersistentVolumeSource.PortworxVolume != nil && x.PortworxVolume != nil
+ yyq2[19] = x.PersistentVolumeSource.ScaleIO != nil && x.ScaleIO != nil
+ yyq2[20] = x.PersistentVolumeSource.Local != nil && x.Local != nil
+ yyq2[21] = x.PersistentVolumeSource.StorageOS != nil && x.StorageOS != nil
+ yyq2[22] = len(x.AccessModes) != 0
+ yyq2[23] = x.ClaimRef != nil
+ yyq2[24] = x.PersistentVolumeReclaimPolicy != ""
+ yyq2[25] = x.StorageClassName != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(26)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Capacity == nil {
+ r.EncodeNil()
+ } else {
+ x.Capacity.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("capacity"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Capacity == nil {
+ r.EncodeNil()
+ } else {
+ x.Capacity.CodecEncodeSelf(e)
+ }
+ }
+ }
+ var yyn6 bool
+ if x.PersistentVolumeSource.GCEPersistentDisk == nil {
+ yyn6 = true
+ goto LABEL6
+ }
+ LABEL6:
+ if yyr2 || yy2arr2 {
+ if yyn6 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.GCEPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.GCEPersistentDisk.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("gcePersistentDisk"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn6 {
+ r.EncodeNil()
+ } else {
+ if x.GCEPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.GCEPersistentDisk.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn9 bool
+ if x.PersistentVolumeSource.AWSElasticBlockStore == nil {
+ yyn9 = true
+ goto LABEL9
+ }
+ LABEL9:
+ if yyr2 || yy2arr2 {
+ if yyn9 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.AWSElasticBlockStore == nil {
+ r.EncodeNil()
+ } else {
+ x.AWSElasticBlockStore.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("awsElasticBlockStore"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn9 {
+ r.EncodeNil()
+ } else {
+ if x.AWSElasticBlockStore == nil {
+ r.EncodeNil()
+ } else {
+ x.AWSElasticBlockStore.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn12 bool
+ if x.PersistentVolumeSource.HostPath == nil {
+ yyn12 = true
+ goto LABEL12
+ }
+ LABEL12:
+ if yyr2 || yy2arr2 {
+ if yyn12 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.HostPath == nil {
+ r.EncodeNil()
+ } else {
+ x.HostPath.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostPath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn12 {
+ r.EncodeNil()
+ } else {
+ if x.HostPath == nil {
+ r.EncodeNil()
+ } else {
+ x.HostPath.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn15 bool
+ if x.PersistentVolumeSource.Glusterfs == nil {
+ yyn15 = true
+ goto LABEL15
+ }
+ LABEL15:
+ if yyr2 || yy2arr2 {
+ if yyn15 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.Glusterfs == nil {
+ r.EncodeNil()
+ } else {
+ x.Glusterfs.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("glusterfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn15 {
+ r.EncodeNil()
+ } else {
+ if x.Glusterfs == nil {
+ r.EncodeNil()
+ } else {
+ x.Glusterfs.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn18 bool
+ if x.PersistentVolumeSource.NFS == nil {
+ yyn18 = true
+ goto LABEL18
+ }
+ LABEL18:
+ if yyr2 || yy2arr2 {
+ if yyn18 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.NFS == nil {
+ r.EncodeNil()
+ } else {
+ x.NFS.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn18 {
+ r.EncodeNil()
+ } else {
+ if x.NFS == nil {
+ r.EncodeNil()
+ } else {
+ x.NFS.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn21 bool
+ if x.PersistentVolumeSource.RBD == nil {
+ yyn21 = true
+ goto LABEL21
+ }
+ LABEL21:
+ if yyr2 || yy2arr2 {
+ if yyn21 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.RBD == nil {
+ r.EncodeNil()
+ } else {
+ x.RBD.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rbd"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn21 {
+ r.EncodeNil()
+ } else {
+ if x.RBD == nil {
+ r.EncodeNil()
+ } else {
+ x.RBD.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn24 bool
+ if x.PersistentVolumeSource.ISCSI == nil {
+ yyn24 = true
+ goto LABEL24
+ }
+ LABEL24:
+ if yyr2 || yy2arr2 {
+ if yyn24 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.ISCSI == nil {
+ r.EncodeNil()
+ } else {
+ x.ISCSI.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("iscsi"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn24 {
+ r.EncodeNil()
+ } else {
+ if x.ISCSI == nil {
+ r.EncodeNil()
+ } else {
+ x.ISCSI.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn27 bool
+ if x.PersistentVolumeSource.Cinder == nil {
+ yyn27 = true
+ goto LABEL27
+ }
+ LABEL27:
+ if yyr2 || yy2arr2 {
+ if yyn27 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ if x.Cinder == nil {
+ r.EncodeNil()
+ } else {
+ x.Cinder.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("cinder"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn27 {
+ r.EncodeNil()
+ } else {
+ if x.Cinder == nil {
+ r.EncodeNil()
+ } else {
+ x.Cinder.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn30 bool
+ if x.PersistentVolumeSource.CephFS == nil {
+ yyn30 = true
+ goto LABEL30
+ }
+ LABEL30:
+ if yyr2 || yy2arr2 {
+ if yyn30 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ if x.CephFS == nil {
+ r.EncodeNil()
+ } else {
+ x.CephFS.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("cephfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn30 {
+ r.EncodeNil()
+ } else {
+ if x.CephFS == nil {
+ r.EncodeNil()
+ } else {
+ x.CephFS.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn33 bool
+ if x.PersistentVolumeSource.FC == nil {
+ yyn33 = true
+ goto LABEL33
+ }
+ LABEL33:
+ if yyr2 || yy2arr2 {
+ if yyn33 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[10] {
+ if x.FC == nil {
+ r.EncodeNil()
+ } else {
+ x.FC.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[10] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fc"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn33 {
+ r.EncodeNil()
+ } else {
+ if x.FC == nil {
+ r.EncodeNil()
+ } else {
+ x.FC.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn36 bool
+ if x.PersistentVolumeSource.Flocker == nil {
+ yyn36 = true
+ goto LABEL36
+ }
+ LABEL36:
+ if yyr2 || yy2arr2 {
+ if yyn36 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[11] {
+ if x.Flocker == nil {
+ r.EncodeNil()
+ } else {
+ x.Flocker.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[11] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("flocker"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn36 {
+ r.EncodeNil()
+ } else {
+ if x.Flocker == nil {
+ r.EncodeNil()
+ } else {
+ x.Flocker.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn39 bool
+ if x.PersistentVolumeSource.FlexVolume == nil {
+ yyn39 = true
+ goto LABEL39
+ }
+ LABEL39:
+ if yyr2 || yy2arr2 {
+ if yyn39 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[12] {
+ if x.FlexVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.FlexVolume.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[12] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("flexVolume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn39 {
+ r.EncodeNil()
+ } else {
+ if x.FlexVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.FlexVolume.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn42 bool
+ if x.PersistentVolumeSource.AzureFile == nil {
+ yyn42 = true
+ goto LABEL42
+ }
+ LABEL42:
+ if yyr2 || yy2arr2 {
+ if yyn42 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[13] {
+ if x.AzureFile == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureFile.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[13] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("azureFile"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn42 {
+ r.EncodeNil()
+ } else {
+ if x.AzureFile == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureFile.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn45 bool
+ if x.PersistentVolumeSource.VsphereVolume == nil {
+ yyn45 = true
+ goto LABEL45
+ }
+ LABEL45:
+ if yyr2 || yy2arr2 {
+ if yyn45 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[14] {
+ if x.VsphereVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.VsphereVolume.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[14] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("vsphereVolume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn45 {
+ r.EncodeNil()
+ } else {
+ if x.VsphereVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.VsphereVolume.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn48 bool
+ if x.PersistentVolumeSource.Quobyte == nil {
+ yyn48 = true
+ goto LABEL48
+ }
+ LABEL48:
+ if yyr2 || yy2arr2 {
+ if yyn48 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[15] {
+ if x.Quobyte == nil {
+ r.EncodeNil()
+ } else {
+ x.Quobyte.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[15] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("quobyte"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn48 {
+ r.EncodeNil()
+ } else {
+ if x.Quobyte == nil {
+ r.EncodeNil()
+ } else {
+ x.Quobyte.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn51 bool
+ if x.PersistentVolumeSource.AzureDisk == nil {
+ yyn51 = true
+ goto LABEL51
+ }
+ LABEL51:
+ if yyr2 || yy2arr2 {
+ if yyn51 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[16] {
+ if x.AzureDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureDisk.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[16] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("azureDisk"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn51 {
+ r.EncodeNil()
+ } else {
+ if x.AzureDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureDisk.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn54 bool
+ if x.PersistentVolumeSource.PhotonPersistentDisk == nil {
+ yyn54 = true
+ goto LABEL54
+ }
+ LABEL54:
+ if yyr2 || yy2arr2 {
+ if yyn54 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[17] {
+ if x.PhotonPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.PhotonPersistentDisk.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[17] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("photonPersistentDisk"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn54 {
+ r.EncodeNil()
+ } else {
+ if x.PhotonPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.PhotonPersistentDisk.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn57 bool
+ if x.PersistentVolumeSource.PortworxVolume == nil {
+ yyn57 = true
+ goto LABEL57
+ }
+ LABEL57:
+ if yyr2 || yy2arr2 {
+ if yyn57 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[18] {
+ if x.PortworxVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.PortworxVolume.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[18] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("portworxVolume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn57 {
+ r.EncodeNil()
+ } else {
+ if x.PortworxVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.PortworxVolume.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn60 bool
+ if x.PersistentVolumeSource.ScaleIO == nil {
+ yyn60 = true
+ goto LABEL60
+ }
+ LABEL60:
+ if yyr2 || yy2arr2 {
+ if yyn60 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[19] {
+ if x.ScaleIO == nil {
+ r.EncodeNil()
+ } else {
+ x.ScaleIO.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[19] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("scaleIO"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn60 {
+ r.EncodeNil()
+ } else {
+ if x.ScaleIO == nil {
+ r.EncodeNil()
+ } else {
+ x.ScaleIO.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn63 bool
+ if x.PersistentVolumeSource.Local == nil {
+ yyn63 = true
+ goto LABEL63
+ }
+ LABEL63:
+ if yyr2 || yy2arr2 {
+ if yyn63 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[20] {
+ if x.Local == nil {
+ r.EncodeNil()
+ } else {
+ x.Local.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[20] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("local"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn63 {
+ r.EncodeNil()
+ } else {
+ if x.Local == nil {
+ r.EncodeNil()
+ } else {
+ x.Local.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn66 bool
+ if x.PersistentVolumeSource.StorageOS == nil {
+ yyn66 = true
+ goto LABEL66
+ }
+ LABEL66:
+ if yyr2 || yy2arr2 {
+ if yyn66 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[21] {
+ if x.StorageOS == nil {
+ r.EncodeNil()
+ } else {
+ x.StorageOS.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[21] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("storageos"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn66 {
+ r.EncodeNil()
+ } else {
+ if x.StorageOS == nil {
+ r.EncodeNil()
+ } else {
+ x.StorageOS.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[22] {
+ if x.AccessModes == nil {
+ r.EncodeNil()
+ } else {
+ yym70 := z.EncBinary()
+ _ = yym70
+ if false {
+ } else {
+ h.encSlicePersistentVolumeAccessMode(([]PersistentVolumeAccessMode)(x.AccessModes), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[22] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("accessModes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.AccessModes == nil {
+ r.EncodeNil()
+ } else {
+ yym71 := z.EncBinary()
+ _ = yym71
+ if false {
+ } else {
+ h.encSlicePersistentVolumeAccessMode(([]PersistentVolumeAccessMode)(x.AccessModes), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[23] {
+ if x.ClaimRef == nil {
+ r.EncodeNil()
+ } else {
+ x.ClaimRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[23] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("claimRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ClaimRef == nil {
+ r.EncodeNil()
+ } else {
+ x.ClaimRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[24] {
+ x.PersistentVolumeReclaimPolicy.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[24] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("persistentVolumeReclaimPolicy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.PersistentVolumeReclaimPolicy.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[25] {
+ yym79 := z.EncBinary()
+ _ = yym79
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.StorageClassName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[25] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("storageClassName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym80 := z.EncBinary()
+ _ = yym80
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.StorageClassName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PersistentVolumeSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PersistentVolumeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "capacity":
+ if r.TryDecodeAsNil() {
+ x.Capacity = nil
+ } else {
+ yyv4 := &x.Capacity
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "gcePersistentDisk":
+ if x.PersistentVolumeSource.GCEPersistentDisk == nil {
+ x.PersistentVolumeSource.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.GCEPersistentDisk != nil {
+ x.GCEPersistentDisk = nil
+ }
+ } else {
+ if x.GCEPersistentDisk == nil {
+ x.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ x.GCEPersistentDisk.CodecDecodeSelf(d)
+ }
+ case "awsElasticBlockStore":
+ if x.PersistentVolumeSource.AWSElasticBlockStore == nil {
+ x.PersistentVolumeSource.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.AWSElasticBlockStore != nil {
+ x.AWSElasticBlockStore = nil
+ }
+ } else {
+ if x.AWSElasticBlockStore == nil {
+ x.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ x.AWSElasticBlockStore.CodecDecodeSelf(d)
+ }
+ case "hostPath":
+ if x.PersistentVolumeSource.HostPath == nil {
+ x.PersistentVolumeSource.HostPath = new(HostPathVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.HostPath != nil {
+ x.HostPath = nil
+ }
+ } else {
+ if x.HostPath == nil {
+ x.HostPath = new(HostPathVolumeSource)
+ }
+ x.HostPath.CodecDecodeSelf(d)
+ }
+ case "glusterfs":
+ if x.PersistentVolumeSource.Glusterfs == nil {
+ x.PersistentVolumeSource.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.Glusterfs != nil {
+ x.Glusterfs = nil
+ }
+ } else {
+ if x.Glusterfs == nil {
+ x.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ x.Glusterfs.CodecDecodeSelf(d)
+ }
+ case "nfs":
+ if x.PersistentVolumeSource.NFS == nil {
+ x.PersistentVolumeSource.NFS = new(NFSVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.NFS != nil {
+ x.NFS = nil
+ }
+ } else {
+ if x.NFS == nil {
+ x.NFS = new(NFSVolumeSource)
+ }
+ x.NFS.CodecDecodeSelf(d)
+ }
+ case "rbd":
+ if x.PersistentVolumeSource.RBD == nil {
+ x.PersistentVolumeSource.RBD = new(RBDVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.RBD != nil {
+ x.RBD = nil
+ }
+ } else {
+ if x.RBD == nil {
+ x.RBD = new(RBDVolumeSource)
+ }
+ x.RBD.CodecDecodeSelf(d)
+ }
+ case "iscsi":
+ if x.PersistentVolumeSource.ISCSI == nil {
+ x.PersistentVolumeSource.ISCSI = new(ISCSIVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.ISCSI != nil {
+ x.ISCSI = nil
+ }
+ } else {
+ if x.ISCSI == nil {
+ x.ISCSI = new(ISCSIVolumeSource)
+ }
+ x.ISCSI.CodecDecodeSelf(d)
+ }
+ case "cinder":
+ if x.PersistentVolumeSource.Cinder == nil {
+ x.PersistentVolumeSource.Cinder = new(CinderVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.Cinder != nil {
+ x.Cinder = nil
+ }
+ } else {
+ if x.Cinder == nil {
+ x.Cinder = new(CinderVolumeSource)
+ }
+ x.Cinder.CodecDecodeSelf(d)
+ }
+ case "cephfs":
+ if x.PersistentVolumeSource.CephFS == nil {
+ x.PersistentVolumeSource.CephFS = new(CephFSVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.CephFS != nil {
+ x.CephFS = nil
+ }
+ } else {
+ if x.CephFS == nil {
+ x.CephFS = new(CephFSVolumeSource)
+ }
+ x.CephFS.CodecDecodeSelf(d)
+ }
+ case "fc":
+ if x.PersistentVolumeSource.FC == nil {
+ x.PersistentVolumeSource.FC = new(FCVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.FC != nil {
+ x.FC = nil
+ }
+ } else {
+ if x.FC == nil {
+ x.FC = new(FCVolumeSource)
+ }
+ x.FC.CodecDecodeSelf(d)
+ }
+ case "flocker":
+ if x.PersistentVolumeSource.Flocker == nil {
+ x.PersistentVolumeSource.Flocker = new(FlockerVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.Flocker != nil {
+ x.Flocker = nil
+ }
+ } else {
+ if x.Flocker == nil {
+ x.Flocker = new(FlockerVolumeSource)
+ }
+ x.Flocker.CodecDecodeSelf(d)
+ }
+ case "flexVolume":
+ if x.PersistentVolumeSource.FlexVolume == nil {
+ x.PersistentVolumeSource.FlexVolume = new(FlexVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.FlexVolume != nil {
+ x.FlexVolume = nil
+ }
+ } else {
+ if x.FlexVolume == nil {
+ x.FlexVolume = new(FlexVolumeSource)
+ }
+ x.FlexVolume.CodecDecodeSelf(d)
+ }
+ case "azureFile":
+ if x.PersistentVolumeSource.AzureFile == nil {
+ x.PersistentVolumeSource.AzureFile = new(AzureFileVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.AzureFile != nil {
+ x.AzureFile = nil
+ }
+ } else {
+ if x.AzureFile == nil {
+ x.AzureFile = new(AzureFileVolumeSource)
+ }
+ x.AzureFile.CodecDecodeSelf(d)
+ }
+ case "vsphereVolume":
+ if x.PersistentVolumeSource.VsphereVolume == nil {
+ x.PersistentVolumeSource.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.VsphereVolume != nil {
+ x.VsphereVolume = nil
+ }
+ } else {
+ if x.VsphereVolume == nil {
+ x.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ x.VsphereVolume.CodecDecodeSelf(d)
+ }
+ case "quobyte":
+ if x.PersistentVolumeSource.Quobyte == nil {
+ x.PersistentVolumeSource.Quobyte = new(QuobyteVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.Quobyte != nil {
+ x.Quobyte = nil
+ }
+ } else {
+ if x.Quobyte == nil {
+ x.Quobyte = new(QuobyteVolumeSource)
+ }
+ x.Quobyte.CodecDecodeSelf(d)
+ }
+ case "azureDisk":
+ if x.PersistentVolumeSource.AzureDisk == nil {
+ x.PersistentVolumeSource.AzureDisk = new(AzureDiskVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.AzureDisk != nil {
+ x.AzureDisk = nil
+ }
+ } else {
+ if x.AzureDisk == nil {
+ x.AzureDisk = new(AzureDiskVolumeSource)
+ }
+ x.AzureDisk.CodecDecodeSelf(d)
+ }
+ case "photonPersistentDisk":
+ if x.PersistentVolumeSource.PhotonPersistentDisk == nil {
+ x.PersistentVolumeSource.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.PhotonPersistentDisk != nil {
+ x.PhotonPersistentDisk = nil
+ }
+ } else {
+ if x.PhotonPersistentDisk == nil {
+ x.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource)
+ }
+ x.PhotonPersistentDisk.CodecDecodeSelf(d)
+ }
+ case "portworxVolume":
+ if x.PersistentVolumeSource.PortworxVolume == nil {
+ x.PersistentVolumeSource.PortworxVolume = new(PortworxVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.PortworxVolume != nil {
+ x.PortworxVolume = nil
+ }
+ } else {
+ if x.PortworxVolume == nil {
+ x.PortworxVolume = new(PortworxVolumeSource)
+ }
+ x.PortworxVolume.CodecDecodeSelf(d)
+ }
+ case "scaleIO":
+ if x.PersistentVolumeSource.ScaleIO == nil {
+ x.PersistentVolumeSource.ScaleIO = new(ScaleIOVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.ScaleIO != nil {
+ x.ScaleIO = nil
+ }
+ } else {
+ if x.ScaleIO == nil {
+ x.ScaleIO = new(ScaleIOVolumeSource)
+ }
+ x.ScaleIO.CodecDecodeSelf(d)
+ }
+ case "local":
+ if x.PersistentVolumeSource.Local == nil {
+ x.PersistentVolumeSource.Local = new(LocalVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.Local != nil {
+ x.Local = nil
+ }
+ } else {
+ if x.Local == nil {
+ x.Local = new(LocalVolumeSource)
+ }
+ x.Local.CodecDecodeSelf(d)
+ }
+ case "storageos":
+ if x.PersistentVolumeSource.StorageOS == nil {
+ x.PersistentVolumeSource.StorageOS = new(StorageOSPersistentVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.StorageOS != nil {
+ x.StorageOS = nil
+ }
+ } else {
+ if x.StorageOS == nil {
+ x.StorageOS = new(StorageOSPersistentVolumeSource)
+ }
+ x.StorageOS.CodecDecodeSelf(d)
+ }
+ case "accessModes":
+ if r.TryDecodeAsNil() {
+ x.AccessModes = nil
+ } else {
+ yyv26 := &x.AccessModes
+ yym27 := z.DecBinary()
+ _ = yym27
+ if false {
+ } else {
+ h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv26), d)
+ }
+ }
+ case "claimRef":
+ if r.TryDecodeAsNil() {
+ if x.ClaimRef != nil {
+ x.ClaimRef = nil
+ }
+ } else {
+ if x.ClaimRef == nil {
+ x.ClaimRef = new(ObjectReference)
+ }
+ x.ClaimRef.CodecDecodeSelf(d)
+ }
+ case "persistentVolumeReclaimPolicy":
+ if r.TryDecodeAsNil() {
+ x.PersistentVolumeReclaimPolicy = ""
+ } else {
+ yyv29 := &x.PersistentVolumeReclaimPolicy
+ yyv29.CodecDecodeSelf(d)
+ }
+ case "storageClassName":
+ if r.TryDecodeAsNil() {
+ x.StorageClassName = ""
+ } else {
+ yyv30 := &x.StorageClassName
+ yym31 := z.DecBinary()
+ _ = yym31
+ if false {
+ } else {
+ *((*string)(yyv30)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj32 int
+ var yyb32 bool
+ var yyhl32 bool = l >= 0
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Capacity = nil
+ } else {
+ yyv33 := &x.Capacity
+ yyv33.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.GCEPersistentDisk == nil {
+ x.PersistentVolumeSource.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.GCEPersistentDisk != nil {
+ x.GCEPersistentDisk = nil
+ }
+ } else {
+ if x.GCEPersistentDisk == nil {
+ x.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ x.GCEPersistentDisk.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.AWSElasticBlockStore == nil {
+ x.PersistentVolumeSource.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.AWSElasticBlockStore != nil {
+ x.AWSElasticBlockStore = nil
+ }
+ } else {
+ if x.AWSElasticBlockStore == nil {
+ x.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ x.AWSElasticBlockStore.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.HostPath == nil {
+ x.PersistentVolumeSource.HostPath = new(HostPathVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.HostPath != nil {
+ x.HostPath = nil
+ }
+ } else {
+ if x.HostPath == nil {
+ x.HostPath = new(HostPathVolumeSource)
+ }
+ x.HostPath.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.Glusterfs == nil {
+ x.PersistentVolumeSource.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Glusterfs != nil {
+ x.Glusterfs = nil
+ }
+ } else {
+ if x.Glusterfs == nil {
+ x.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ x.Glusterfs.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.NFS == nil {
+ x.PersistentVolumeSource.NFS = new(NFSVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.NFS != nil {
+ x.NFS = nil
+ }
+ } else {
+ if x.NFS == nil {
+ x.NFS = new(NFSVolumeSource)
+ }
+ x.NFS.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.RBD == nil {
+ x.PersistentVolumeSource.RBD = new(RBDVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RBD != nil {
+ x.RBD = nil
+ }
+ } else {
+ if x.RBD == nil {
+ x.RBD = new(RBDVolumeSource)
+ }
+ x.RBD.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.ISCSI == nil {
+ x.PersistentVolumeSource.ISCSI = new(ISCSIVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ISCSI != nil {
+ x.ISCSI = nil
+ }
+ } else {
+ if x.ISCSI == nil {
+ x.ISCSI = new(ISCSIVolumeSource)
+ }
+ x.ISCSI.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.Cinder == nil {
+ x.PersistentVolumeSource.Cinder = new(CinderVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Cinder != nil {
+ x.Cinder = nil
+ }
+ } else {
+ if x.Cinder == nil {
+ x.Cinder = new(CinderVolumeSource)
+ }
+ x.Cinder.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.CephFS == nil {
+ x.PersistentVolumeSource.CephFS = new(CephFSVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.CephFS != nil {
+ x.CephFS = nil
+ }
+ } else {
+ if x.CephFS == nil {
+ x.CephFS = new(CephFSVolumeSource)
+ }
+ x.CephFS.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.FC == nil {
+ x.PersistentVolumeSource.FC = new(FCVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FC != nil {
+ x.FC = nil
+ }
+ } else {
+ if x.FC == nil {
+ x.FC = new(FCVolumeSource)
+ }
+ x.FC.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.Flocker == nil {
+ x.PersistentVolumeSource.Flocker = new(FlockerVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Flocker != nil {
+ x.Flocker = nil
+ }
+ } else {
+ if x.Flocker == nil {
+ x.Flocker = new(FlockerVolumeSource)
+ }
+ x.Flocker.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.FlexVolume == nil {
+ x.PersistentVolumeSource.FlexVolume = new(FlexVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FlexVolume != nil {
+ x.FlexVolume = nil
+ }
+ } else {
+ if x.FlexVolume == nil {
+ x.FlexVolume = new(FlexVolumeSource)
+ }
+ x.FlexVolume.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.AzureFile == nil {
+ x.PersistentVolumeSource.AzureFile = new(AzureFileVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.AzureFile != nil {
+ x.AzureFile = nil
+ }
+ } else {
+ if x.AzureFile == nil {
+ x.AzureFile = new(AzureFileVolumeSource)
+ }
+ x.AzureFile.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.VsphereVolume == nil {
+ x.PersistentVolumeSource.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.VsphereVolume != nil {
+ x.VsphereVolume = nil
+ }
+ } else {
+ if x.VsphereVolume == nil {
+ x.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ x.VsphereVolume.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.Quobyte == nil {
+ x.PersistentVolumeSource.Quobyte = new(QuobyteVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Quobyte != nil {
+ x.Quobyte = nil
+ }
+ } else {
+ if x.Quobyte == nil {
+ x.Quobyte = new(QuobyteVolumeSource)
+ }
+ x.Quobyte.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.AzureDisk == nil {
+ x.PersistentVolumeSource.AzureDisk = new(AzureDiskVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.AzureDisk != nil {
+ x.AzureDisk = nil
+ }
+ } else {
+ if x.AzureDisk == nil {
+ x.AzureDisk = new(AzureDiskVolumeSource)
+ }
+ x.AzureDisk.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.PhotonPersistentDisk == nil {
+ x.PersistentVolumeSource.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PhotonPersistentDisk != nil {
+ x.PhotonPersistentDisk = nil
+ }
+ } else {
+ if x.PhotonPersistentDisk == nil {
+ x.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource)
+ }
+ x.PhotonPersistentDisk.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.PortworxVolume == nil {
+ x.PersistentVolumeSource.PortworxVolume = new(PortworxVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PortworxVolume != nil {
+ x.PortworxVolume = nil
+ }
+ } else {
+ if x.PortworxVolume == nil {
+ x.PortworxVolume = new(PortworxVolumeSource)
+ }
+ x.PortworxVolume.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.ScaleIO == nil {
+ x.PersistentVolumeSource.ScaleIO = new(ScaleIOVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ScaleIO != nil {
+ x.ScaleIO = nil
+ }
+ } else {
+ if x.ScaleIO == nil {
+ x.ScaleIO = new(ScaleIOVolumeSource)
+ }
+ x.ScaleIO.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.Local == nil {
+ x.PersistentVolumeSource.Local = new(LocalVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Local != nil {
+ x.Local = nil
+ }
+ } else {
+ if x.Local == nil {
+ x.Local = new(LocalVolumeSource)
+ }
+ x.Local.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.StorageOS == nil {
+ x.PersistentVolumeSource.StorageOS = new(StorageOSPersistentVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.StorageOS != nil {
+ x.StorageOS = nil
+ }
+ } else {
+ if x.StorageOS == nil {
+ x.StorageOS = new(StorageOSPersistentVolumeSource)
+ }
+ x.StorageOS.CodecDecodeSelf(d)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.AccessModes = nil
+ } else {
+ yyv55 := &x.AccessModes
+ yym56 := z.DecBinary()
+ _ = yym56
+ if false {
+ } else {
+ h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv55), d)
+ }
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ClaimRef != nil {
+ x.ClaimRef = nil
+ }
+ } else {
+ if x.ClaimRef == nil {
+ x.ClaimRef = new(ObjectReference)
+ }
+ x.ClaimRef.CodecDecodeSelf(d)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PersistentVolumeReclaimPolicy = ""
+ } else {
+ yyv58 := &x.PersistentVolumeReclaimPolicy
+ yyv58.CodecDecodeSelf(d)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.StorageClassName = ""
+ } else {
+ yyv59 := &x.StorageClassName
+ yym60 := z.DecBinary()
+ _ = yym60
+ if false {
+ } else {
+ *((*string)(yyv59)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj32-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x PersistentVolumeReclaimPolicy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *PersistentVolumeReclaimPolicy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *PersistentVolumeStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Phase != ""
+ yyq2[1] = x.Message != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ x.Phase.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("phase"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Phase.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PersistentVolumeStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PersistentVolumeStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "phase":
+ if r.TryDecodeAsNil() {
+ x.Phase = ""
+ } else {
+ yyv4 := &x.Phase
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv5 := &x.Message
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*string)(yyv5)) = r.DecodeString()
+ }
+ }
+ 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_containerMapEnd1234)
+}
+
+func (x *PersistentVolumeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Phase = ""
+ } else {
+ yyv10 := &x.Phase
+ yyv10.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv11 := &x.Message
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*string)(yyv11)) = r.DecodeString()
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PersistentVolumeList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSlicePersistentVolume(([]PersistentVolume)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSlicePersistentVolume(([]PersistentVolume)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PersistentVolumeList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PersistentVolumeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSlicePersistentVolume((*[]PersistentVolume)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PersistentVolumeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSlicePersistentVolume((*[]PersistentVolume)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PersistentVolumeClaim) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PersistentVolumeClaim) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PersistentVolumeClaim) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 = PersistentVolumeClaimSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = PersistentVolumeClaimStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PersistentVolumeClaim) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = PersistentVolumeClaimSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = PersistentVolumeClaimStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PersistentVolumeClaimList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSlicePersistentVolumeClaim(([]PersistentVolumeClaim)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSlicePersistentVolumeClaim(([]PersistentVolumeClaim)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PersistentVolumeClaimList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PersistentVolumeClaimList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSlicePersistentVolumeClaim((*[]PersistentVolumeClaim)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PersistentVolumeClaimList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSlicePersistentVolumeClaim((*[]PersistentVolumeClaim)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PersistentVolumeClaimSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.AccessModes) != 0
+ yyq2[1] = x.Selector != nil
+ yyq2[2] = true
+ yyq2[3] = x.VolumeName != ""
+ yyq2[4] = x.StorageClassName != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.AccessModes == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSlicePersistentVolumeAccessMode(([]PersistentVolumeAccessMode)(x.AccessModes), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("accessModes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.AccessModes == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSlicePersistentVolumeAccessMode(([]PersistentVolumeAccessMode)(x.AccessModes), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy10 := &x.Resources
+ yy10.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resources"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.Resources
+ yy12.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumeName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.StorageClassName == nil {
+ r.EncodeNil()
+ } else {
+ yy18 := *x.StorageClassName
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yy18))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("storageClassName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.StorageClassName == nil {
+ r.EncodeNil()
+ } else {
+ yy20 := *x.StorageClassName
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yy20))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PersistentVolumeClaimSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PersistentVolumeClaimSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "accessModes":
+ if r.TryDecodeAsNil() {
+ x.AccessModes = nil
+ } else {
+ yyv4 := &x.AccessModes
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv4), d)
+ }
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg2_v1.LabelSelector)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ case "resources":
+ if r.TryDecodeAsNil() {
+ x.Resources = ResourceRequirements{}
+ } else {
+ yyv8 := &x.Resources
+ yyv8.CodecDecodeSelf(d)
+ }
+ case "volumeName":
+ if r.TryDecodeAsNil() {
+ x.VolumeName = ""
+ } else {
+ yyv9 := &x.VolumeName
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ *((*string)(yyv9)) = r.DecodeString()
+ }
+ }
+ case "storageClassName":
+ if r.TryDecodeAsNil() {
+ if x.StorageClassName != nil {
+ x.StorageClassName = nil
+ }
+ } else {
+ if x.StorageClassName == nil {
+ x.StorageClassName = new(string)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*string)(x.StorageClassName)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PersistentVolumeClaimSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.AccessModes = nil
+ } else {
+ yyv14 := &x.AccessModes
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv14), d)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg2_v1.LabelSelector)
+ }
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Resources = ResourceRequirements{}
+ } else {
+ yyv18 := &x.Resources
+ yyv18.CodecDecodeSelf(d)
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumeName = ""
+ } else {
+ yyv19 := &x.VolumeName
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.StorageClassName != nil {
+ x.StorageClassName = nil
+ }
+ } else {
+ if x.StorageClassName == nil {
+ x.StorageClassName = new(string)
+ }
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(x.StorageClassName)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj13-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PersistentVolumeClaimStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Phase != ""
+ yyq2[1] = len(x.AccessModes) != 0
+ yyq2[2] = len(x.Capacity) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ x.Phase.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("phase"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Phase.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.AccessModes == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSlicePersistentVolumeAccessMode(([]PersistentVolumeAccessMode)(x.AccessModes), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("accessModes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.AccessModes == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSlicePersistentVolumeAccessMode(([]PersistentVolumeAccessMode)(x.AccessModes), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Capacity == nil {
+ r.EncodeNil()
+ } else {
+ x.Capacity.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("capacity"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Capacity == nil {
+ r.EncodeNil()
+ } else {
+ x.Capacity.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PersistentVolumeClaimStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PersistentVolumeClaimStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "phase":
+ if r.TryDecodeAsNil() {
+ x.Phase = ""
+ } else {
+ yyv4 := &x.Phase
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "accessModes":
+ if r.TryDecodeAsNil() {
+ x.AccessModes = nil
+ } else {
+ yyv5 := &x.AccessModes
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv5), d)
+ }
+ }
+ case "capacity":
+ if r.TryDecodeAsNil() {
+ x.Capacity = nil
+ } else {
+ yyv7 := &x.Capacity
+ yyv7.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PersistentVolumeClaimStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Phase = ""
+ } else {
+ yyv9 := &x.Phase
+ yyv9.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.AccessModes = nil
+ } else {
+ yyv10 := &x.AccessModes
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv10), d)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Capacity = nil
+ } else {
+ yyv12 := &x.Capacity
+ yyv12.CodecDecodeSelf(d)
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x PersistentVolumeAccessMode) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *PersistentVolumeAccessMode) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 PersistentVolumePhase) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *PersistentVolumePhase) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 PersistentVolumeClaimPhase) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *PersistentVolumeClaimPhase) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *HostPathVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("path"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HostPathVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HostPathVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv4 := &x.Path
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HostPathVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv7 := &x.Path
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*string)(yyv7)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *EmptyDirVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Medium != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ x.Medium.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("medium"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Medium.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yy7 := &x.SizeLimit
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy7)
+ } else {
+ z.EncFallback(yy7)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("sizeLimit"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.SizeLimit
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy9) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy9)
+ } else {
+ z.EncFallback(yy9)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *EmptyDirVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *EmptyDirVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "medium":
+ if r.TryDecodeAsNil() {
+ x.Medium = ""
+ } else {
+ yyv4 := &x.Medium
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "sizeLimit":
+ if r.TryDecodeAsNil() {
+ x.SizeLimit = pkg3_resource.Quantity{}
+ } else {
+ yyv5 := &x.SizeLimit
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv5) {
+ } else if !yym6 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv5)
+ } else {
+ z.DecFallback(yyv5, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *EmptyDirVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Medium = ""
+ } else {
+ yyv8 := &x.Medium
+ yyv8.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SizeLimit = pkg3_resource.Quantity{}
+ } else {
+ yyv9 := &x.SizeLimit
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv9) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv9)
+ } else {
+ z.DecFallback(yyv9, false)
+ }
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *GlusterfsVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = x.ReadOnly != false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(3)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.EndpointsName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("endpoints"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.EndpointsName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("path"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *GlusterfsVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *GlusterfsVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "endpoints":
+ if r.TryDecodeAsNil() {
+ x.EndpointsName = ""
+ } else {
+ yyv4 := &x.EndpointsName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv6 := &x.Path
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv8 := &x.ReadOnly
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(yyv8)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *GlusterfsVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.EndpointsName = ""
+ } else {
+ yyv11 := &x.EndpointsName
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv13 := &x.Path
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv15 := &x.ReadOnly
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*bool)(yyv15)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *RBDVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = x.FSType != ""
+ yyq2[3] = x.RBDPool != ""
+ yyq2[4] = x.RadosUser != ""
+ yyq2[5] = x.Keyring != ""
+ yyq2[6] = x.SecretRef != nil
+ yyq2[7] = x.ReadOnly != false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(8)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.CephMonitors == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.CephMonitors, false, e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("monitors"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.CephMonitors == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.CephMonitors, false, e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.RBDImage))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("image"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.RBDImage))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.RBDPool))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("pool"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.RBDPool))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.RadosUser))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("user"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.RadosUser))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Keyring))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("keyring"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Keyring))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secretRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RBDVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RBDVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "monitors":
+ if r.TryDecodeAsNil() {
+ x.CephMonitors = nil
+ } else {
+ yyv4 := &x.CephMonitors
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv4, false, d)
+ }
+ }
+ case "image":
+ if r.TryDecodeAsNil() {
+ x.RBDImage = ""
+ } else {
+ yyv6 := &x.RBDImage
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv8 := &x.FSType
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "pool":
+ if r.TryDecodeAsNil() {
+ x.RBDPool = ""
+ } else {
+ yyv10 := &x.RBDPool
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "user":
+ if r.TryDecodeAsNil() {
+ x.RadosUser = ""
+ } else {
+ yyv12 := &x.RadosUser
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ case "keyring":
+ if r.TryDecodeAsNil() {
+ x.Keyring = ""
+ } else {
+ yyv14 := &x.Keyring
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ case "secretRef":
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(LocalObjectReference)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv17 := &x.ReadOnly
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*bool)(yyv17)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RBDVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj19 int
+ var yyb19 bool
+ var yyhl19 bool = l >= 0
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CephMonitors = nil
+ } else {
+ yyv20 := &x.CephMonitors
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv20, false, d)
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RBDImage = ""
+ } else {
+ yyv22 := &x.RBDImage
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else {
+ *((*string)(yyv22)) = r.DecodeString()
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv24 := &x.FSType
+ yym25 := z.DecBinary()
+ _ = yym25
+ if false {
+ } else {
+ *((*string)(yyv24)) = r.DecodeString()
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RBDPool = ""
+ } else {
+ yyv26 := &x.RBDPool
+ yym27 := z.DecBinary()
+ _ = yym27
+ if false {
+ } else {
+ *((*string)(yyv26)) = r.DecodeString()
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RadosUser = ""
+ } else {
+ yyv28 := &x.RadosUser
+ yym29 := z.DecBinary()
+ _ = yym29
+ if false {
+ } else {
+ *((*string)(yyv28)) = r.DecodeString()
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Keyring = ""
+ } else {
+ yyv30 := &x.Keyring
+ yym31 := z.DecBinary()
+ _ = yym31
+ if false {
+ } else {
+ *((*string)(yyv30)) = r.DecodeString()
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(LocalObjectReference)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv33 := &x.ReadOnly
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ *((*bool)(yyv33)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj19-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *CinderVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.FSType != ""
+ yyq2[2] = x.ReadOnly != false
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeID))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumeID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeID))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CinderVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CinderVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "volumeID":
+ if r.TryDecodeAsNil() {
+ x.VolumeID = ""
+ } else {
+ yyv4 := &x.VolumeID
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv6 := &x.FSType
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv8 := &x.ReadOnly
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(yyv8)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CinderVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumeID = ""
+ } else {
+ yyv11 := &x.VolumeID
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv13 := &x.FSType
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv15 := &x.ReadOnly
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*bool)(yyv15)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *CephFSVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.Path != ""
+ yyq2[2] = x.User != ""
+ yyq2[3] = x.SecretFile != ""
+ yyq2[4] = x.SecretRef != nil
+ yyq2[5] = x.ReadOnly != false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Monitors == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Monitors, false, e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("monitors"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Monitors == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Monitors, false, e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("path"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.User))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("user"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.User))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SecretFile))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secretFile"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SecretFile))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secretRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CephFSVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CephFSVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "monitors":
+ if r.TryDecodeAsNil() {
+ x.Monitors = nil
+ } else {
+ yyv4 := &x.Monitors
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv4, false, d)
+ }
+ }
+ case "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv6 := &x.Path
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "user":
+ if r.TryDecodeAsNil() {
+ x.User = ""
+ } else {
+ yyv8 := &x.User
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "secretFile":
+ if r.TryDecodeAsNil() {
+ x.SecretFile = ""
+ } else {
+ yyv10 := &x.SecretFile
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "secretRef":
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(LocalObjectReference)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv13 := &x.ReadOnly
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ *((*bool)(yyv13)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CephFSVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj15 int
+ var yyb15 bool
+ var yyhl15 bool = l >= 0
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Monitors = nil
+ } else {
+ yyv16 := &x.Monitors
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv16, false, d)
+ }
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv18 := &x.Path
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*string)(yyv18)) = r.DecodeString()
+ }
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.User = ""
+ } else {
+ yyv20 := &x.User
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ *((*string)(yyv20)) = r.DecodeString()
+ }
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SecretFile = ""
+ } else {
+ yyv22 := &x.SecretFile
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else {
+ *((*string)(yyv22)) = r.DecodeString()
+ }
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(LocalObjectReference)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv25 := &x.ReadOnly
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*bool)(yyv25)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj15-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *FlockerVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.DatasetName != ""
+ yyq2[1] = x.DatasetUUID != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DatasetName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("datasetName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DatasetName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DatasetUUID))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("datasetUUID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DatasetUUID))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *FlockerVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *FlockerVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "datasetName":
+ if r.TryDecodeAsNil() {
+ x.DatasetName = ""
+ } else {
+ yyv4 := &x.DatasetName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "datasetUUID":
+ if r.TryDecodeAsNil() {
+ x.DatasetUUID = ""
+ } else {
+ yyv6 := &x.DatasetUUID
+ 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_containerMapEnd1234)
+}
+
+func (x *FlockerVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DatasetName = ""
+ } else {
+ yyv9 := &x.DatasetName
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DatasetUUID = ""
+ } else {
+ yyv11 := &x.DatasetUUID
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x StorageMedium) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *StorageMedium) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 Protocol) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *Protocol) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *GCEPersistentDiskVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.FSType != ""
+ yyq2[2] = x.Partition != 0
+ yyq2[3] = x.ReadOnly != false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.PDName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("pdName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.PDName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Partition))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("partition"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Partition))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *GCEPersistentDiskVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *GCEPersistentDiskVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "pdName":
+ if r.TryDecodeAsNil() {
+ x.PDName = ""
+ } else {
+ yyv4 := &x.PDName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv6 := &x.FSType
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "partition":
+ if r.TryDecodeAsNil() {
+ x.Partition = 0
+ } else {
+ yyv8 := &x.Partition
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv10 := &x.ReadOnly
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*bool)(yyv10)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *GCEPersistentDiskVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PDName = ""
+ } else {
+ yyv13 := &x.PDName
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv15 := &x.FSType
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Partition = 0
+ } else {
+ yyv17 := &x.Partition
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int32)(yyv17)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv19 := &x.ReadOnly
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*bool)(yyv19)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *QuobyteVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = x.ReadOnly != false
+ yyq2[3] = x.User != ""
+ yyq2[4] = x.Group != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Registry))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("registry"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Registry))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Volume))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Volume))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.User))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("user"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.User))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Group))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("group"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Group))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *QuobyteVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *QuobyteVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "registry":
+ if r.TryDecodeAsNil() {
+ x.Registry = ""
+ } else {
+ yyv4 := &x.Registry
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "volume":
+ if r.TryDecodeAsNil() {
+ x.Volume = ""
+ } else {
+ yyv6 := &x.Volume
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv8 := &x.ReadOnly
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(yyv8)) = r.DecodeBool()
+ }
+ }
+ case "user":
+ if r.TryDecodeAsNil() {
+ x.User = ""
+ } else {
+ yyv10 := &x.User
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "group":
+ if r.TryDecodeAsNil() {
+ x.Group = ""
+ } else {
+ yyv12 := &x.Group
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *QuobyteVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Registry = ""
+ } else {
+ yyv15 := &x.Registry
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Volume = ""
+ } else {
+ yyv17 := &x.Volume
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv19 := &x.ReadOnly
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*bool)(yyv19)) = r.DecodeBool()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.User = ""
+ } else {
+ yyv21 := &x.User
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Group = ""
+ } else {
+ yyv23 := &x.Group
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*string)(yyv23)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *FlexVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.FSType != ""
+ yyq2[2] = x.SecretRef != nil
+ yyq2[3] = x.ReadOnly != false
+ yyq2[4] = len(x.Options) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Driver))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("driver"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Driver))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secretRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.Options == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Options, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("options"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Options == nil {
+ r.EncodeNil()
+ } else {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Options, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *FlexVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *FlexVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "driver":
+ if r.TryDecodeAsNil() {
+ x.Driver = ""
+ } else {
+ yyv4 := &x.Driver
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv6 := &x.FSType
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "secretRef":
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(LocalObjectReference)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv9 := &x.ReadOnly
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ *((*bool)(yyv9)) = r.DecodeBool()
+ }
+ }
+ case "options":
+ if r.TryDecodeAsNil() {
+ x.Options = nil
+ } else {
+ yyv11 := &x.Options
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv11, false, d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *FlexVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Driver = ""
+ } else {
+ yyv14 := &x.Driver
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv16 := &x.FSType
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(LocalObjectReference)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv19 := &x.ReadOnly
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*bool)(yyv19)) = r.DecodeBool()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Options = nil
+ } else {
+ yyv21 := &x.Options
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv21, false, d)
+ }
+ }
+ for {
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj13-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *AWSElasticBlockStoreVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.FSType != ""
+ yyq2[2] = x.Partition != 0
+ yyq2[3] = x.ReadOnly != false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeID))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumeID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeID))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Partition))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("partition"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Partition))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *AWSElasticBlockStoreVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *AWSElasticBlockStoreVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "volumeID":
+ if r.TryDecodeAsNil() {
+ x.VolumeID = ""
+ } else {
+ yyv4 := &x.VolumeID
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv6 := &x.FSType
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "partition":
+ if r.TryDecodeAsNil() {
+ x.Partition = 0
+ } else {
+ yyv8 := &x.Partition
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv10 := &x.ReadOnly
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*bool)(yyv10)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *AWSElasticBlockStoreVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumeID = ""
+ } else {
+ yyv13 := &x.VolumeID
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv15 := &x.FSType
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Partition = 0
+ } else {
+ yyv17 := &x.Partition
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int32)(yyv17)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv19 := &x.ReadOnly
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*bool)(yyv19)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *GitRepoVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.Revision != ""
+ yyq2[2] = x.Directory != ""
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Repository))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("repository"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Repository))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Revision))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("revision"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Revision))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Directory))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("directory"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Directory))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *GitRepoVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *GitRepoVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "repository":
+ if r.TryDecodeAsNil() {
+ x.Repository = ""
+ } else {
+ yyv4 := &x.Repository
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "revision":
+ if r.TryDecodeAsNil() {
+ x.Revision = ""
+ } else {
+ yyv6 := &x.Revision
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "directory":
+ if r.TryDecodeAsNil() {
+ x.Directory = ""
+ } else {
+ yyv8 := &x.Directory
+ 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_containerMapEnd1234)
+}
+
+func (x *GitRepoVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Repository = ""
+ } else {
+ yyv11 := &x.Repository
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Revision = ""
+ } else {
+ yyv13 := &x.Revision
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Directory = ""
+ } else {
+ yyv15 := &x.Directory
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *SecretVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.SecretName != ""
+ yyq2[1] = len(x.Items) != 0
+ yyq2[2] = x.DefaultMode != nil
+ yyq2[3] = x.Optional != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SecretName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secretName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SecretName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceKeyToPath(([]KeyToPath)(x.Items), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceKeyToPath(([]KeyToPath)(x.Items), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.DefaultMode == nil {
+ r.EncodeNil()
+ } else {
+ yy10 := *x.DefaultMode
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(yy10))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("defaultMode"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.DefaultMode == nil {
+ r.EncodeNil()
+ } else {
+ yy12 := *x.DefaultMode
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(yy12))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy15 := *x.Optional
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeBool(bool(yy15))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("optional"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy17 := *x.Optional
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeBool(bool(yy17))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SecretVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SecretVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "secretName":
+ if r.TryDecodeAsNil() {
+ x.SecretName = ""
+ } else {
+ yyv4 := &x.SecretName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceKeyToPath((*[]KeyToPath)(yyv6), d)
+ }
+ }
+ case "defaultMode":
+ if r.TryDecodeAsNil() {
+ if x.DefaultMode != nil {
+ x.DefaultMode = nil
+ }
+ } else {
+ if x.DefaultMode == nil {
+ x.DefaultMode = new(int32)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "optional":
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SecretVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SecretName = ""
+ } else {
+ yyv13 := &x.SecretName
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv15 := &x.Items
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.decSliceKeyToPath((*[]KeyToPath)(yyv15), d)
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.DefaultMode != nil {
+ x.DefaultMode = nil
+ }
+ } else {
+ if x.DefaultMode == nil {
+ x.DefaultMode = new(int32)
+ }
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *SecretProjection) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Name != ""
+ yyq2[1] = len(x.Items) != 0
+ yyq2[2] = x.Optional != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceKeyToPath(([]KeyToPath)(x.Items), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceKeyToPath(([]KeyToPath)(x.Items), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy10 := *x.Optional
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(yy10))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("optional"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy12 := *x.Optional
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(yy12))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SecretProjection) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SecretProjection) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceKeyToPath((*[]KeyToPath)(yyv6), d)
+ }
+ }
+ case "optional":
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SecretProjection) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv11 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceKeyToPath((*[]KeyToPath)(yyv13), d)
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NFSVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = x.ReadOnly != false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(3)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Server))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("server"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Server))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("path"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NFSVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NFSVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "server":
+ if r.TryDecodeAsNil() {
+ x.Server = ""
+ } else {
+ yyv4 := &x.Server
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv6 := &x.Path
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv8 := &x.ReadOnly
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(yyv8)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NFSVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Server = ""
+ } else {
+ yyv11 := &x.Server
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv13 := &x.Path
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv15 := &x.ReadOnly
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*bool)(yyv15)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ISCSIVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [10]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[3] = x.ISCSIInterface != ""
+ yyq2[4] = x.FSType != ""
+ yyq2[5] = x.ReadOnly != false
+ yyq2[6] = len(x.Portals) != 0
+ yyq2[7] = x.DiscoveryCHAPAuth != false
+ yyq2[8] = x.SessionCHAPAuth != false
+ yyq2[9] = x.SecretRef != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(10)
+ } else {
+ yynn2 = 3
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.TargetPortal))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetPortal"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.TargetPortal))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.IQN))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("iqn"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.IQN))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Lun))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lun"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Lun))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ISCSIInterface))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("iscsiInterface"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ISCSIInterface))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.Portals == nil {
+ r.EncodeNil()
+ } else {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Portals, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("portals"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Portals == nil {
+ r.EncodeNil()
+ } else {
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Portals, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeBool(bool(x.DiscoveryCHAPAuth))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("chapAuthDiscovery"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeBool(bool(x.DiscoveryCHAPAuth))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeBool(bool(x.SessionCHAPAuth))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("chapAuthSession"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym29 := z.EncBinary()
+ _ = yym29
+ if false {
+ } else {
+ r.EncodeBool(bool(x.SessionCHAPAuth))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secretRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ISCSIVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ISCSIVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "targetPortal":
+ if r.TryDecodeAsNil() {
+ x.TargetPortal = ""
+ } else {
+ yyv4 := &x.TargetPortal
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "iqn":
+ if r.TryDecodeAsNil() {
+ x.IQN = ""
+ } else {
+ yyv6 := &x.IQN
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "lun":
+ if r.TryDecodeAsNil() {
+ x.Lun = 0
+ } else {
+ yyv8 := &x.Lun
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "iscsiInterface":
+ if r.TryDecodeAsNil() {
+ x.ISCSIInterface = ""
+ } else {
+ yyv10 := &x.ISCSIInterface
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv12 := &x.FSType
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv14 := &x.ReadOnly
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*bool)(yyv14)) = r.DecodeBool()
+ }
+ }
+ case "portals":
+ if r.TryDecodeAsNil() {
+ x.Portals = nil
+ } else {
+ yyv16 := &x.Portals
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv16, false, d)
+ }
+ }
+ case "chapAuthDiscovery":
+ if r.TryDecodeAsNil() {
+ x.DiscoveryCHAPAuth = false
+ } else {
+ yyv18 := &x.DiscoveryCHAPAuth
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*bool)(yyv18)) = r.DecodeBool()
+ }
+ }
+ case "chapAuthSession":
+ if r.TryDecodeAsNil() {
+ x.SessionCHAPAuth = false
+ } else {
+ yyv20 := &x.SessionCHAPAuth
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ *((*bool)(yyv20)) = r.DecodeBool()
+ }
+ }
+ case "secretRef":
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(LocalObjectReference)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ISCSIVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj23 int
+ var yyb23 bool
+ var yyhl23 bool = l >= 0
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TargetPortal = ""
+ } else {
+ yyv24 := &x.TargetPortal
+ yym25 := z.DecBinary()
+ _ = yym25
+ if false {
+ } else {
+ *((*string)(yyv24)) = r.DecodeString()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.IQN = ""
+ } else {
+ yyv26 := &x.IQN
+ yym27 := z.DecBinary()
+ _ = yym27
+ if false {
+ } else {
+ *((*string)(yyv26)) = r.DecodeString()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Lun = 0
+ } else {
+ yyv28 := &x.Lun
+ yym29 := z.DecBinary()
+ _ = yym29
+ if false {
+ } else {
+ *((*int32)(yyv28)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ISCSIInterface = ""
+ } else {
+ yyv30 := &x.ISCSIInterface
+ yym31 := z.DecBinary()
+ _ = yym31
+ if false {
+ } else {
+ *((*string)(yyv30)) = r.DecodeString()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv32 := &x.FSType
+ yym33 := z.DecBinary()
+ _ = yym33
+ if false {
+ } else {
+ *((*string)(yyv32)) = r.DecodeString()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv34 := &x.ReadOnly
+ yym35 := z.DecBinary()
+ _ = yym35
+ if false {
+ } else {
+ *((*bool)(yyv34)) = r.DecodeBool()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Portals = nil
+ } else {
+ yyv36 := &x.Portals
+ yym37 := z.DecBinary()
+ _ = yym37
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv36, false, d)
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DiscoveryCHAPAuth = false
+ } else {
+ yyv38 := &x.DiscoveryCHAPAuth
+ yym39 := z.DecBinary()
+ _ = yym39
+ if false {
+ } else {
+ *((*bool)(yyv38)) = r.DecodeBool()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SessionCHAPAuth = false
+ } else {
+ yyv40 := &x.SessionCHAPAuth
+ yym41 := z.DecBinary()
+ _ = yym41
+ if false {
+ } else {
+ *((*bool)(yyv40)) = r.DecodeBool()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(LocalObjectReference)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ for {
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj23-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *FCVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = x.FSType != ""
+ yyq2[3] = x.ReadOnly != false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.TargetWWNs == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.TargetWWNs, false, e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetWWNs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TargetWWNs == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.TargetWWNs, false, e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Lun == nil {
+ r.EncodeNil()
+ } else {
+ yy7 := *x.Lun
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(yy7))
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lun"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Lun == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.Lun
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(yy9))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *FCVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *FCVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "targetWWNs":
+ if r.TryDecodeAsNil() {
+ x.TargetWWNs = nil
+ } else {
+ yyv4 := &x.TargetWWNs
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv4, false, d)
+ }
+ }
+ case "lun":
+ if r.TryDecodeAsNil() {
+ if x.Lun != nil {
+ x.Lun = nil
+ }
+ } else {
+ if x.Lun == nil {
+ x.Lun = new(int32)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int32)(x.Lun)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv8 := &x.FSType
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv10 := &x.ReadOnly
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*bool)(yyv10)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *FCVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TargetWWNs = nil
+ } else {
+ yyv13 := &x.TargetWWNs
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv13, false, d)
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Lun != nil {
+ x.Lun = nil
+ }
+ } else {
+ if x.Lun == nil {
+ x.Lun = new(int32)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*int32)(x.Lun)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv17 := &x.FSType
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv19 := &x.ReadOnly
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*bool)(yyv19)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *AzureFileVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = x.ReadOnly != false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(3)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SecretName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secretName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SecretName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ShareName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("shareName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ShareName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *AzureFileVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *AzureFileVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "secretName":
+ if r.TryDecodeAsNil() {
+ x.SecretName = ""
+ } else {
+ yyv4 := &x.SecretName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "shareName":
+ if r.TryDecodeAsNil() {
+ x.ShareName = ""
+ } else {
+ yyv6 := &x.ShareName
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv8 := &x.ReadOnly
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(yyv8)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *AzureFileVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SecretName = ""
+ } else {
+ yyv11 := &x.SecretName
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ShareName = ""
+ } else {
+ yyv13 := &x.ShareName
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv15 := &x.ReadOnly
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*bool)(yyv15)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *VsphereVirtualDiskVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.FSType != ""
+ yyq2[2] = x.StoragePolicyName != ""
+ yyq2[3] = x.StoragePolicyID != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumePath))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumePath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumePath))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.StoragePolicyName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("storagePolicyName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.StoragePolicyName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.StoragePolicyID))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("storagePolicyID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.StoragePolicyID))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *VsphereVirtualDiskVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *VsphereVirtualDiskVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "volumePath":
+ if r.TryDecodeAsNil() {
+ x.VolumePath = ""
+ } else {
+ yyv4 := &x.VolumePath
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv6 := &x.FSType
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "storagePolicyName":
+ if r.TryDecodeAsNil() {
+ x.StoragePolicyName = ""
+ } else {
+ yyv8 := &x.StoragePolicyName
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "storagePolicyID":
+ if r.TryDecodeAsNil() {
+ x.StoragePolicyID = ""
+ } else {
+ yyv10 := &x.StoragePolicyID
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *VsphereVirtualDiskVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumePath = ""
+ } else {
+ yyv13 := &x.VolumePath
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv15 := &x.FSType
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.StoragePolicyName = ""
+ } else {
+ yyv17 := &x.StoragePolicyName
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.StoragePolicyID = ""
+ } else {
+ yyv19 := &x.StoragePolicyID
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PhotonPersistentDiskVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.FSType != ""
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.PdID))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("pdID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.PdID))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PhotonPersistentDiskVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PhotonPersistentDiskVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "pdID":
+ if r.TryDecodeAsNil() {
+ x.PdID = ""
+ } else {
+ yyv4 := &x.PdID
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv6 := &x.FSType
+ 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_containerMapEnd1234)
+}
+
+func (x *PhotonPersistentDiskVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PdID = ""
+ } else {
+ yyv9 := &x.PdID
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv11 := &x.FSType
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x AzureDataDiskCachingMode) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *AzureDataDiskCachingMode) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 AzureDataDiskKind) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *AzureDataDiskKind) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *AzureDiskVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = x.CachingMode != nil
+ yyq2[3] = x.FSType != nil
+ yyq2[4] = x.ReadOnly != nil
+ yyq2[5] = x.Kind != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DiskName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("diskName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DiskName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DataDiskURI))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("diskURI"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DataDiskURI))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.CachingMode == nil {
+ r.EncodeNil()
+ } else {
+ yy10 := *x.CachingMode
+ yy10.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("cachingMode"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.CachingMode == nil {
+ r.EncodeNil()
+ } else {
+ yy12 := *x.CachingMode
+ yy12.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.FSType == nil {
+ r.EncodeNil()
+ } else {
+ yy15 := *x.FSType
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yy15))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.FSType == nil {
+ r.EncodeNil()
+ } else {
+ yy17 := *x.FSType
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yy17))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.ReadOnly == nil {
+ r.EncodeNil()
+ } else {
+ yy20 := *x.ReadOnly
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeBool(bool(yy20))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ReadOnly == nil {
+ r.EncodeNil()
+ } else {
+ yy22 := *x.ReadOnly
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeBool(bool(yy22))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.Kind == nil {
+ r.EncodeNil()
+ } else {
+ yy25 := *x.Kind
+ yy25.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Kind == nil {
+ r.EncodeNil()
+ } else {
+ yy27 := *x.Kind
+ yy27.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *AzureDiskVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *AzureDiskVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "diskName":
+ if r.TryDecodeAsNil() {
+ x.DiskName = ""
+ } else {
+ yyv4 := &x.DiskName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "diskURI":
+ if r.TryDecodeAsNil() {
+ x.DataDiskURI = ""
+ } else {
+ yyv6 := &x.DataDiskURI
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "cachingMode":
+ if r.TryDecodeAsNil() {
+ if x.CachingMode != nil {
+ x.CachingMode = nil
+ }
+ } else {
+ if x.CachingMode == nil {
+ x.CachingMode = new(AzureDataDiskCachingMode)
+ }
+ x.CachingMode.CodecDecodeSelf(d)
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ if x.FSType != nil {
+ x.FSType = nil
+ }
+ } else {
+ if x.FSType == nil {
+ x.FSType = new(string)
+ }
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ *((*string)(x.FSType)) = r.DecodeString()
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ if x.ReadOnly != nil {
+ x.ReadOnly = nil
+ }
+ } else {
+ if x.ReadOnly == nil {
+ x.ReadOnly = new(bool)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*bool)(x.ReadOnly)) = r.DecodeBool()
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ if x.Kind != nil {
+ x.Kind = nil
+ }
+ } else {
+ if x.Kind == nil {
+ x.Kind = new(AzureDataDiskKind)
+ }
+ x.Kind.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *AzureDiskVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DiskName = ""
+ } else {
+ yyv15 := &x.DiskName
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DataDiskURI = ""
+ } else {
+ yyv17 := &x.DataDiskURI
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.CachingMode != nil {
+ x.CachingMode = nil
+ }
+ } else {
+ if x.CachingMode == nil {
+ x.CachingMode = new(AzureDataDiskCachingMode)
+ }
+ x.CachingMode.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FSType != nil {
+ x.FSType = nil
+ }
+ } else {
+ if x.FSType == nil {
+ x.FSType = new(string)
+ }
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ *((*string)(x.FSType)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ReadOnly != nil {
+ x.ReadOnly = nil
+ }
+ } else {
+ if x.ReadOnly == nil {
+ x.ReadOnly = new(bool)
+ }
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else {
+ *((*bool)(x.ReadOnly)) = r.DecodeBool()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Kind != nil {
+ x.Kind = nil
+ }
+ } else {
+ if x.Kind == nil {
+ x.Kind = new(AzureDataDiskKind)
+ }
+ x.Kind.CodecDecodeSelf(d)
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PortworxVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.FSType != ""
+ yyq2[2] = x.ReadOnly != false
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeID))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumeID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeID))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PortworxVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PortworxVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "volumeID":
+ if r.TryDecodeAsNil() {
+ x.VolumeID = ""
+ } else {
+ yyv4 := &x.VolumeID
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv6 := &x.FSType
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv8 := &x.ReadOnly
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(yyv8)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PortworxVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumeID = ""
+ } else {
+ yyv11 := &x.VolumeID
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv13 := &x.FSType
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv15 := &x.ReadOnly
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*bool)(yyv15)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ScaleIOVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [10]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[3] = x.SSLEnabled != false
+ yyq2[4] = x.ProtectionDomain != ""
+ yyq2[5] = x.StoragePool != ""
+ yyq2[6] = x.StorageMode != ""
+ yyq2[7] = x.VolumeName != ""
+ yyq2[8] = x.FSType != ""
+ yyq2[9] = x.ReadOnly != false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(10)
+ } else {
+ yynn2 = 3
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Gateway))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("gateway"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Gateway))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.System))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("system"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.System))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secretRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(x.SSLEnabled))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("sslEnabled"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeBool(bool(x.SSLEnabled))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ProtectionDomain))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("protectionDomain"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ProtectionDomain))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.StoragePool))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("storagePool"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.StoragePool))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.StorageMode))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("storageMode"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.StorageMode))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumeName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym29 := z.EncBinary()
+ _ = yym29
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ yym31 := z.EncBinary()
+ _ = yym31
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym32 := z.EncBinary()
+ _ = yym32
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ScaleIOVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ScaleIOVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "gateway":
+ if r.TryDecodeAsNil() {
+ x.Gateway = ""
+ } else {
+ yyv4 := &x.Gateway
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "system":
+ if r.TryDecodeAsNil() {
+ x.System = ""
+ } else {
+ yyv6 := &x.System
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "secretRef":
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(LocalObjectReference)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ case "sslEnabled":
+ if r.TryDecodeAsNil() {
+ x.SSLEnabled = false
+ } else {
+ yyv9 := &x.SSLEnabled
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ *((*bool)(yyv9)) = r.DecodeBool()
+ }
+ }
+ case "protectionDomain":
+ if r.TryDecodeAsNil() {
+ x.ProtectionDomain = ""
+ } else {
+ yyv11 := &x.ProtectionDomain
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*string)(yyv11)) = r.DecodeString()
+ }
+ }
+ case "storagePool":
+ if r.TryDecodeAsNil() {
+ x.StoragePool = ""
+ } else {
+ yyv13 := &x.StoragePool
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ *((*string)(yyv13)) = r.DecodeString()
+ }
+ }
+ case "storageMode":
+ if r.TryDecodeAsNil() {
+ x.StorageMode = ""
+ } else {
+ yyv15 := &x.StorageMode
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*string)(yyv15)) = r.DecodeString()
+ }
+ }
+ case "volumeName":
+ if r.TryDecodeAsNil() {
+ x.VolumeName = ""
+ } else {
+ yyv17 := &x.VolumeName
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv19 := &x.FSType
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv21 := &x.ReadOnly
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*bool)(yyv21)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ScaleIOVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj23 int
+ var yyb23 bool
+ var yyhl23 bool = l >= 0
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Gateway = ""
+ } else {
+ yyv24 := &x.Gateway
+ yym25 := z.DecBinary()
+ _ = yym25
+ if false {
+ } else {
+ *((*string)(yyv24)) = r.DecodeString()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.System = ""
+ } else {
+ yyv26 := &x.System
+ yym27 := z.DecBinary()
+ _ = yym27
+ if false {
+ } else {
+ *((*string)(yyv26)) = r.DecodeString()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(LocalObjectReference)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SSLEnabled = false
+ } else {
+ yyv29 := &x.SSLEnabled
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*bool)(yyv29)) = r.DecodeBool()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ProtectionDomain = ""
+ } else {
+ yyv31 := &x.ProtectionDomain
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*string)(yyv31)) = r.DecodeString()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.StoragePool = ""
+ } else {
+ yyv33 := &x.StoragePool
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ *((*string)(yyv33)) = r.DecodeString()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.StorageMode = ""
+ } else {
+ yyv35 := &x.StorageMode
+ yym36 := z.DecBinary()
+ _ = yym36
+ if false {
+ } else {
+ *((*string)(yyv35)) = r.DecodeString()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumeName = ""
+ } else {
+ yyv37 := &x.VolumeName
+ yym38 := z.DecBinary()
+ _ = yym38
+ if false {
+ } else {
+ *((*string)(yyv37)) = r.DecodeString()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv39 := &x.FSType
+ yym40 := z.DecBinary()
+ _ = yym40
+ if false {
+ } else {
+ *((*string)(yyv39)) = r.DecodeString()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv41 := &x.ReadOnly
+ yym42 := z.DecBinary()
+ _ = yym42
+ if false {
+ } else {
+ *((*bool)(yyv41)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj23-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *StorageOSVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.VolumeName != ""
+ yyq2[1] = x.VolumeNamespace != ""
+ yyq2[2] = x.FSType != ""
+ yyq2[3] = x.ReadOnly != false
+ yyq2[4] = x.SecretRef != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumeName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeNamespace))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumeNamespace"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeNamespace))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secretRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *StorageOSVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *StorageOSVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "volumeName":
+ if r.TryDecodeAsNil() {
+ x.VolumeName = ""
+ } else {
+ yyv4 := &x.VolumeName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "volumeNamespace":
+ if r.TryDecodeAsNil() {
+ x.VolumeNamespace = ""
+ } else {
+ yyv6 := &x.VolumeNamespace
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv8 := &x.FSType
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv10 := &x.ReadOnly
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*bool)(yyv10)) = r.DecodeBool()
+ }
+ }
+ case "secretRef":
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(LocalObjectReference)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *StorageOSVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumeName = ""
+ } else {
+ yyv14 := &x.VolumeName
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumeNamespace = ""
+ } else {
+ yyv16 := &x.VolumeNamespace
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv18 := &x.FSType
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*string)(yyv18)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv20 := &x.ReadOnly
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ *((*bool)(yyv20)) = r.DecodeBool()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(LocalObjectReference)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ for {
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj13-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *StorageOSPersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.VolumeName != ""
+ yyq2[1] = x.VolumeNamespace != ""
+ yyq2[2] = x.FSType != ""
+ yyq2[3] = x.ReadOnly != false
+ yyq2[4] = x.SecretRef != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumeName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeNamespace))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumeNamespace"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeNamespace))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secretRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *StorageOSPersistentVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *StorageOSPersistentVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "volumeName":
+ if r.TryDecodeAsNil() {
+ x.VolumeName = ""
+ } else {
+ yyv4 := &x.VolumeName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "volumeNamespace":
+ if r.TryDecodeAsNil() {
+ x.VolumeNamespace = ""
+ } else {
+ yyv6 := &x.VolumeNamespace
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv8 := &x.FSType
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv10 := &x.ReadOnly
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*bool)(yyv10)) = r.DecodeBool()
+ }
+ }
+ case "secretRef":
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(ObjectReference)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *StorageOSPersistentVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumeName = ""
+ } else {
+ yyv14 := &x.VolumeName
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumeNamespace = ""
+ } else {
+ yyv16 := &x.VolumeNamespace
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv18 := &x.FSType
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*string)(yyv18)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv20 := &x.ReadOnly
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ *((*bool)(yyv20)) = r.DecodeBool()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(ObjectReference)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ for {
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj13-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ConfigMapVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Name != ""
+ yyq2[1] = len(x.Items) != 0
+ yyq2[2] = x.DefaultMode != nil
+ yyq2[3] = x.Optional != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceKeyToPath(([]KeyToPath)(x.Items), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceKeyToPath(([]KeyToPath)(x.Items), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.DefaultMode == nil {
+ r.EncodeNil()
+ } else {
+ yy10 := *x.DefaultMode
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(yy10))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("defaultMode"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.DefaultMode == nil {
+ r.EncodeNil()
+ } else {
+ yy12 := *x.DefaultMode
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(yy12))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy15 := *x.Optional
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeBool(bool(yy15))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("optional"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy17 := *x.Optional
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeBool(bool(yy17))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ConfigMapVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ConfigMapVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceKeyToPath((*[]KeyToPath)(yyv6), d)
+ }
+ }
+ case "defaultMode":
+ if r.TryDecodeAsNil() {
+ if x.DefaultMode != nil {
+ x.DefaultMode = nil
+ }
+ } else {
+ if x.DefaultMode == nil {
+ x.DefaultMode = new(int32)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "optional":
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ConfigMapVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv13 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv15 := &x.Items
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.decSliceKeyToPath((*[]KeyToPath)(yyv15), d)
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.DefaultMode != nil {
+ x.DefaultMode = nil
+ }
+ } else {
+ if x.DefaultMode == nil {
+ x.DefaultMode = new(int32)
+ }
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ConfigMapProjection) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Name != ""
+ yyq2[1] = len(x.Items) != 0
+ yyq2[2] = x.Optional != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceKeyToPath(([]KeyToPath)(x.Items), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceKeyToPath(([]KeyToPath)(x.Items), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy10 := *x.Optional
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(yy10))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("optional"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy12 := *x.Optional
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(yy12))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ConfigMapProjection) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ConfigMapProjection) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceKeyToPath((*[]KeyToPath)(yyv6), d)
+ }
+ }
+ case "optional":
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ConfigMapProjection) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv11 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceKeyToPath((*[]KeyToPath)(yyv13), d)
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ProjectedVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.DefaultMode != nil
+ 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_containerArrayElem1234)
+ if x.Sources == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceVolumeProjection(([]VolumeProjection)(x.Sources), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("sources"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Sources == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceVolumeProjection(([]VolumeProjection)(x.Sources), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.DefaultMode == nil {
+ r.EncodeNil()
+ } else {
+ yy7 := *x.DefaultMode
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(yy7))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("defaultMode"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.DefaultMode == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.DefaultMode
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(yy9))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ProjectedVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ProjectedVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "sources":
+ if r.TryDecodeAsNil() {
+ x.Sources = nil
+ } else {
+ yyv4 := &x.Sources
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceVolumeProjection((*[]VolumeProjection)(yyv4), d)
+ }
+ }
+ case "defaultMode":
+ if r.TryDecodeAsNil() {
+ if x.DefaultMode != nil {
+ x.DefaultMode = nil
+ }
+ } else {
+ if x.DefaultMode == nil {
+ x.DefaultMode = new(int32)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ProjectedVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Sources = nil
+ } else {
+ yyv9 := &x.Sources
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceVolumeProjection((*[]VolumeProjection)(yyv9), d)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.DefaultMode != nil {
+ x.DefaultMode = nil
+ }
+ } else {
+ if x.DefaultMode == nil {
+ x.DefaultMode = new(int32)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *VolumeProjection) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Secret != nil
+ yyq2[1] = x.DownwardAPI != nil
+ yyq2[2] = x.ConfigMap != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Secret == nil {
+ r.EncodeNil()
+ } else {
+ x.Secret.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secret"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Secret == nil {
+ r.EncodeNil()
+ } else {
+ x.Secret.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.DownwardAPI == nil {
+ r.EncodeNil()
+ } else {
+ x.DownwardAPI.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("downwardAPI"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.DownwardAPI == nil {
+ r.EncodeNil()
+ } else {
+ x.DownwardAPI.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.ConfigMap == nil {
+ r.EncodeNil()
+ } else {
+ x.ConfigMap.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("configMap"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ConfigMap == nil {
+ r.EncodeNil()
+ } else {
+ x.ConfigMap.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *VolumeProjection) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *VolumeProjection) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "secret":
+ if r.TryDecodeAsNil() {
+ if x.Secret != nil {
+ x.Secret = nil
+ }
+ } else {
+ if x.Secret == nil {
+ x.Secret = new(SecretProjection)
+ }
+ x.Secret.CodecDecodeSelf(d)
+ }
+ case "downwardAPI":
+ if r.TryDecodeAsNil() {
+ if x.DownwardAPI != nil {
+ x.DownwardAPI = nil
+ }
+ } else {
+ if x.DownwardAPI == nil {
+ x.DownwardAPI = new(DownwardAPIProjection)
+ }
+ x.DownwardAPI.CodecDecodeSelf(d)
+ }
+ case "configMap":
+ if r.TryDecodeAsNil() {
+ if x.ConfigMap != nil {
+ x.ConfigMap = nil
+ }
+ } else {
+ if x.ConfigMap == nil {
+ x.ConfigMap = new(ConfigMapProjection)
+ }
+ x.ConfigMap.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *VolumeProjection) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Secret != nil {
+ x.Secret = nil
+ }
+ } else {
+ if x.Secret == nil {
+ x.Secret = new(SecretProjection)
+ }
+ x.Secret.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.DownwardAPI != nil {
+ x.DownwardAPI = nil
+ }
+ } else {
+ if x.DownwardAPI == nil {
+ x.DownwardAPI = new(DownwardAPIProjection)
+ }
+ x.DownwardAPI.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ConfigMap != nil {
+ x.ConfigMap = nil
+ }
+ } else {
+ if x.ConfigMap == nil {
+ x.ConfigMap = new(ConfigMapProjection)
+ }
+ x.ConfigMap.CodecDecodeSelf(d)
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *KeyToPath) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = x.Mode != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(3)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Key))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("key"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Key))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("path"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Mode == nil {
+ r.EncodeNil()
+ } else {
+ yy10 := *x.Mode
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(yy10))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("mode"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Mode == nil {
+ r.EncodeNil()
+ } else {
+ yy12 := *x.Mode
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(yy12))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *KeyToPath) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *KeyToPath) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "key":
+ if r.TryDecodeAsNil() {
+ x.Key = ""
+ } else {
+ yyv4 := &x.Key
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv6 := &x.Path
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "mode":
+ if r.TryDecodeAsNil() {
+ if x.Mode != nil {
+ x.Mode = nil
+ }
+ } else {
+ if x.Mode == nil {
+ x.Mode = new(int32)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(x.Mode)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *KeyToPath) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Key = ""
+ } else {
+ yyv11 := &x.Key
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv13 := &x.Path
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Mode != nil {
+ x.Mode = nil
+ }
+ } else {
+ if x.Mode == nil {
+ x.Mode = new(int32)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*int32)(x.Mode)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *LocalVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("path"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *LocalVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *LocalVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv4 := &x.Path
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *LocalVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv7 := &x.Path
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*string)(yyv7)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ContainerPort) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Name != ""
+ yyq2[1] = x.HostPort != 0
+ yyq2[3] = x.Protocol != ""
+ yyq2[4] = x.HostIP != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(x.HostPort))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostPort"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.HostPort))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ContainerPort))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("containerPort"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ContainerPort))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ x.Protocol.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("protocol"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Protocol.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.HostIP))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostIP"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.HostIP))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ContainerPort) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ContainerPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "hostPort":
+ if r.TryDecodeAsNil() {
+ x.HostPort = 0
+ } else {
+ yyv6 := &x.HostPort
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int32)(yyv6)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "containerPort":
+ if r.TryDecodeAsNil() {
+ x.ContainerPort = 0
+ } else {
+ yyv8 := &x.ContainerPort
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "protocol":
+ if r.TryDecodeAsNil() {
+ x.Protocol = ""
+ } else {
+ yyv10 := &x.Protocol
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "hostIP":
+ if r.TryDecodeAsNil() {
+ x.HostIP = ""
+ } else {
+ yyv11 := &x.HostIP
+ 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_containerMapEnd1234)
+}
+
+func (x *ContainerPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv14 := &x.Name
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostPort = 0
+ } else {
+ yyv16 := &x.HostPort
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*int32)(yyv16)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ContainerPort = 0
+ } else {
+ yyv18 := &x.ContainerPort
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*int32)(yyv18)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Protocol = ""
+ } else {
+ yyv20 := &x.Protocol
+ yyv20.CodecDecodeSelf(d)
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostIP = ""
+ } else {
+ yyv21 := &x.HostIP
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj13-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *VolumeMount) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.ReadOnly != false
+ yyq2[3] = x.SubPath != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MountPath))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("mountPath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MountPath))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SubPath))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("subPath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SubPath))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *VolumeMount) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *VolumeMount) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv6 := &x.ReadOnly
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*bool)(yyv6)) = r.DecodeBool()
+ }
+ }
+ case "mountPath":
+ if r.TryDecodeAsNil() {
+ x.MountPath = ""
+ } else {
+ yyv8 := &x.MountPath
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "subPath":
+ if r.TryDecodeAsNil() {
+ x.SubPath = ""
+ } else {
+ yyv10 := &x.SubPath
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *VolumeMount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv13 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv15 := &x.ReadOnly
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*bool)(yyv15)) = r.DecodeBool()
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MountPath = ""
+ } else {
+ yyv17 := &x.MountPath
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SubPath = ""
+ } else {
+ yyv19 := &x.SubPath
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *EnvVar) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.Value != ""
+ yyq2[2] = x.ValueFrom != nil
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Value))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("value"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Value))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.ValueFrom == nil {
+ r.EncodeNil()
+ } else {
+ x.ValueFrom.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("valueFrom"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ValueFrom == nil {
+ r.EncodeNil()
+ } else {
+ x.ValueFrom.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *EnvVar) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *EnvVar) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "value":
+ if r.TryDecodeAsNil() {
+ x.Value = ""
+ } else {
+ yyv6 := &x.Value
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "valueFrom":
+ if r.TryDecodeAsNil() {
+ if x.ValueFrom != nil {
+ x.ValueFrom = nil
+ }
+ } else {
+ if x.ValueFrom == nil {
+ x.ValueFrom = new(EnvVarSource)
+ }
+ x.ValueFrom.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *EnvVar) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv10 := &x.Name
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Value = ""
+ } else {
+ yyv12 := &x.Value
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ValueFrom != nil {
+ x.ValueFrom = nil
+ }
+ } else {
+ if x.ValueFrom == nil {
+ x.ValueFrom = new(EnvVarSource)
+ }
+ x.ValueFrom.CodecDecodeSelf(d)
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *EnvVarSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.FieldRef != nil
+ yyq2[1] = x.ResourceFieldRef != nil
+ yyq2[2] = x.ConfigMapKeyRef != nil
+ yyq2[3] = x.SecretKeyRef != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.FieldRef == nil {
+ r.EncodeNil()
+ } else {
+ x.FieldRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fieldRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.FieldRef == nil {
+ r.EncodeNil()
+ } else {
+ x.FieldRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.ResourceFieldRef == nil {
+ r.EncodeNil()
+ } else {
+ x.ResourceFieldRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resourceFieldRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ResourceFieldRef == nil {
+ r.EncodeNil()
+ } else {
+ x.ResourceFieldRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.ConfigMapKeyRef == nil {
+ r.EncodeNil()
+ } else {
+ x.ConfigMapKeyRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("configMapKeyRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ConfigMapKeyRef == nil {
+ r.EncodeNil()
+ } else {
+ x.ConfigMapKeyRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.SecretKeyRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretKeyRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secretKeyRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SecretKeyRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretKeyRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *EnvVarSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *EnvVarSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "fieldRef":
+ if r.TryDecodeAsNil() {
+ if x.FieldRef != nil {
+ x.FieldRef = nil
+ }
+ } else {
+ if x.FieldRef == nil {
+ x.FieldRef = new(ObjectFieldSelector)
+ }
+ x.FieldRef.CodecDecodeSelf(d)
+ }
+ case "resourceFieldRef":
+ if r.TryDecodeAsNil() {
+ if x.ResourceFieldRef != nil {
+ x.ResourceFieldRef = nil
+ }
+ } else {
+ if x.ResourceFieldRef == nil {
+ x.ResourceFieldRef = new(ResourceFieldSelector)
+ }
+ x.ResourceFieldRef.CodecDecodeSelf(d)
+ }
+ case "configMapKeyRef":
+ if r.TryDecodeAsNil() {
+ if x.ConfigMapKeyRef != nil {
+ x.ConfigMapKeyRef = nil
+ }
+ } else {
+ if x.ConfigMapKeyRef == nil {
+ x.ConfigMapKeyRef = new(ConfigMapKeySelector)
+ }
+ x.ConfigMapKeyRef.CodecDecodeSelf(d)
+ }
+ case "secretKeyRef":
+ if r.TryDecodeAsNil() {
+ if x.SecretKeyRef != nil {
+ x.SecretKeyRef = nil
+ }
+ } else {
+ if x.SecretKeyRef == nil {
+ x.SecretKeyRef = new(SecretKeySelector)
+ }
+ x.SecretKeyRef.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *EnvVarSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FieldRef != nil {
+ x.FieldRef = nil
+ }
+ } else {
+ if x.FieldRef == nil {
+ x.FieldRef = new(ObjectFieldSelector)
+ }
+ x.FieldRef.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ResourceFieldRef != nil {
+ x.ResourceFieldRef = nil
+ }
+ } else {
+ if x.ResourceFieldRef == nil {
+ x.ResourceFieldRef = new(ResourceFieldSelector)
+ }
+ x.ResourceFieldRef.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ConfigMapKeyRef != nil {
+ x.ConfigMapKeyRef = nil
+ }
+ } else {
+ if x.ConfigMapKeyRef == nil {
+ x.ConfigMapKeyRef = new(ConfigMapKeySelector)
+ }
+ x.ConfigMapKeyRef.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SecretKeyRef != nil {
+ x.SecretKeyRef = nil
+ }
+ } else {
+ if x.SecretKeyRef == nil {
+ x.SecretKeyRef = new(SecretKeySelector)
+ }
+ x.SecretKeyRef.CodecDecodeSelf(d)
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ObjectFieldSelector) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.APIVersion != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FieldPath))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fieldPath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FieldPath))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ObjectFieldSelector) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ObjectFieldSelector) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv4 := &x.APIVersion
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "fieldPath":
+ if r.TryDecodeAsNil() {
+ x.FieldPath = ""
+ } else {
+ yyv6 := &x.FieldPath
+ 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_containerMapEnd1234)
+}
+
+func (x *ObjectFieldSelector) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv9 := &x.APIVersion
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FieldPath = ""
+ } else {
+ yyv11 := &x.FieldPath
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ResourceFieldSelector) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.ContainerName != ""
+ yyq2[2] = true
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ContainerName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("containerName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ContainerName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Resource))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resource"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Resource))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy10 := &x.Divisor
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy10) {
+ } else if !yym11 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy10)
+ } else {
+ z.EncFallback(yy10)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("divisor"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.Divisor
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ResourceFieldSelector) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ResourceFieldSelector) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "containerName":
+ if r.TryDecodeAsNil() {
+ x.ContainerName = ""
+ } else {
+ yyv4 := &x.ContainerName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "resource":
+ if r.TryDecodeAsNil() {
+ x.Resource = ""
+ } else {
+ yyv6 := &x.Resource
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "divisor":
+ if r.TryDecodeAsNil() {
+ x.Divisor = pkg3_resource.Quantity{}
+ } else {
+ yyv8 := &x.Divisor
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv8) {
+ } else if !yym9 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv8)
+ } else {
+ z.DecFallback(yyv8, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ResourceFieldSelector) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ContainerName = ""
+ } else {
+ yyv11 := &x.ContainerName
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Resource = ""
+ } else {
+ yyv13 := &x.Resource
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Divisor = pkg3_resource.Quantity{}
+ } else {
+ yyv15 := &x.Divisor
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv15) {
+ } else if !yym16 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv15)
+ } else {
+ z.DecFallback(yyv15, false)
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ConfigMapKeySelector) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Name != ""
+ yyq2[2] = x.Optional != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Key))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("key"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Key))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy10 := *x.Optional
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(yy10))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("optional"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy12 := *x.Optional
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(yy12))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ConfigMapKeySelector) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ConfigMapKeySelector) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "key":
+ if r.TryDecodeAsNil() {
+ x.Key = ""
+ } else {
+ yyv6 := &x.Key
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "optional":
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ConfigMapKeySelector) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv11 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Key = ""
+ } else {
+ yyv13 := &x.Key
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *SecretKeySelector) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Name != ""
+ yyq2[2] = x.Optional != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Key))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("key"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Key))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy10 := *x.Optional
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(yy10))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("optional"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy12 := *x.Optional
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(yy12))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SecretKeySelector) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SecretKeySelector) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "key":
+ if r.TryDecodeAsNil() {
+ x.Key = ""
+ } else {
+ yyv6 := &x.Key
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "optional":
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SecretKeySelector) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv11 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Key = ""
+ } else {
+ yyv13 := &x.Key
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *EnvFromSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Prefix != ""
+ yyq2[1] = x.ConfigMapRef != nil
+ yyq2[2] = x.SecretRef != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Prefix))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("prefix"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Prefix))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.ConfigMapRef == nil {
+ r.EncodeNil()
+ } else {
+ x.ConfigMapRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("configMapRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ConfigMapRef == nil {
+ r.EncodeNil()
+ } else {
+ x.ConfigMapRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secretRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *EnvFromSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *EnvFromSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "prefix":
+ if r.TryDecodeAsNil() {
+ x.Prefix = ""
+ } else {
+ yyv4 := &x.Prefix
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "configMapRef":
+ if r.TryDecodeAsNil() {
+ if x.ConfigMapRef != nil {
+ x.ConfigMapRef = nil
+ }
+ } else {
+ if x.ConfigMapRef == nil {
+ x.ConfigMapRef = new(ConfigMapEnvSource)
+ }
+ x.ConfigMapRef.CodecDecodeSelf(d)
+ }
+ case "secretRef":
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(SecretEnvSource)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *EnvFromSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Prefix = ""
+ } else {
+ yyv9 := &x.Prefix
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ConfigMapRef != nil {
+ x.ConfigMapRef = nil
+ }
+ } else {
+ if x.ConfigMapRef == nil {
+ x.ConfigMapRef = new(ConfigMapEnvSource)
+ }
+ x.ConfigMapRef.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(SecretEnvSource)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ConfigMapEnvSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Name != ""
+ yyq2[1] = x.Optional != 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy7 := *x.Optional
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeBool(bool(yy7))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("optional"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.Optional
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(yy9))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ConfigMapEnvSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ConfigMapEnvSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "optional":
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ConfigMapEnvSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv9 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *SecretEnvSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Name != ""
+ yyq2[1] = x.Optional != 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy7 := *x.Optional
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeBool(bool(yy7))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("optional"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.Optional
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(yy9))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SecretEnvSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SecretEnvSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "optional":
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SecretEnvSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv9 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *HTTPHeader) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Value))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("value"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Value))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HTTPHeader) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HTTPHeader) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "value":
+ if r.TryDecodeAsNil() {
+ x.Value = ""
+ } else {
+ yyv6 := &x.Value
+ 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_containerMapEnd1234)
+}
+
+func (x *HTTPHeader) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv9 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Value = ""
+ } else {
+ yyv11 := &x.Value
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *HTTPGetAction) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Path != ""
+ yyq2[2] = x.Host != ""
+ yyq2[3] = x.Scheme != ""
+ yyq2[4] = len(x.HTTPHeaders) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("path"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy7 := &x.Port
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy7)
+ } else {
+ z.EncFallback(yy7)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("port"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.Port
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy9) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy9)
+ } else {
+ z.EncFallback(yy9)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Host))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("host"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Host))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ x.Scheme.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("scheme"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Scheme.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.HTTPHeaders == nil {
+ r.EncodeNil()
+ } else {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ h.encSliceHTTPHeader(([]HTTPHeader)(x.HTTPHeaders), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("httpHeaders"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.HTTPHeaders == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ h.encSliceHTTPHeader(([]HTTPHeader)(x.HTTPHeaders), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HTTPGetAction) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HTTPGetAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv4 := &x.Path
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "port":
+ if r.TryDecodeAsNil() {
+ x.Port = pkg4_intstr.IntOrString{}
+ } else {
+ yyv6 := &x.Port
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ case "host":
+ if r.TryDecodeAsNil() {
+ x.Host = ""
+ } else {
+ yyv8 := &x.Host
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "scheme":
+ if r.TryDecodeAsNil() {
+ x.Scheme = ""
+ } else {
+ yyv10 := &x.Scheme
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "httpHeaders":
+ if r.TryDecodeAsNil() {
+ x.HTTPHeaders = nil
+ } else {
+ yyv11 := &x.HTTPHeaders
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceHTTPHeader((*[]HTTPHeader)(yyv11), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HTTPGetAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv14 := &x.Path
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Port = pkg4_intstr.IntOrString{}
+ } else {
+ yyv16 := &x.Port
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv16) {
+ } else if !yym17 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv16)
+ } else {
+ z.DecFallback(yyv16, false)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Host = ""
+ } else {
+ yyv18 := &x.Host
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*string)(yyv18)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Scheme = ""
+ } else {
+ yyv20 := &x.Scheme
+ yyv20.CodecDecodeSelf(d)
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HTTPHeaders = nil
+ } else {
+ yyv21 := &x.HTTPHeaders
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ h.decSliceHTTPHeader((*[]HTTPHeader)(yyv21), d)
+ }
+ }
+ for {
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj13-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x URIScheme) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *URIScheme) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *TCPSocketAction) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Host != ""
+ 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_containerArrayElem1234)
+ yy4 := &x.Port
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy4) {
+ } else if !yym5 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy4)
+ } else {
+ z.EncFallback(yy4)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("port"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.Port
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy6) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy6)
+ } else {
+ z.EncFallback(yy6)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Host))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("host"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Host))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *TCPSocketAction) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *TCPSocketAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "port":
+ if r.TryDecodeAsNil() {
+ x.Port = pkg4_intstr.IntOrString{}
+ } else {
+ yyv4 := &x.Port
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else if !yym5 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv4)
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "host":
+ if r.TryDecodeAsNil() {
+ x.Host = ""
+ } else {
+ yyv6 := &x.Host
+ 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_containerMapEnd1234)
+}
+
+func (x *TCPSocketAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Port = pkg4_intstr.IntOrString{}
+ } else {
+ yyv9 := &x.Port
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv9) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv9)
+ } else {
+ z.DecFallback(yyv9, false)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Host = ""
+ } else {
+ yyv11 := &x.Host
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ExecAction) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = len(x.Command) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Command == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Command, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("command"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Command == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Command, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ExecAction) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ExecAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "command":
+ if r.TryDecodeAsNil() {
+ x.Command = nil
+ } else {
+ yyv4 := &x.Command
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv4, false, d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ExecAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Command = nil
+ } else {
+ yyv7 := &x.Command
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv7, false, d)
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Probe) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Handler.Exec != nil && x.Exec != nil
+ yyq2[1] = x.Handler.HTTPGet != nil && x.HTTPGet != nil
+ yyq2[2] = x.Handler.TCPSocket != nil && x.TCPSocket != nil
+ yyq2[3] = x.InitialDelaySeconds != 0
+ yyq2[4] = x.TimeoutSeconds != 0
+ yyq2[5] = x.PeriodSeconds != 0
+ yyq2[6] = x.SuccessThreshold != 0
+ yyq2[7] = x.FailureThreshold != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(8)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ var yyn3 bool
+ if x.Handler.Exec == nil {
+ yyn3 = true
+ goto LABEL3
+ }
+ LABEL3:
+ if yyr2 || yy2arr2 {
+ if yyn3 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Exec == nil {
+ r.EncodeNil()
+ } else {
+ x.Exec.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("exec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn3 {
+ r.EncodeNil()
+ } else {
+ if x.Exec == nil {
+ r.EncodeNil()
+ } else {
+ x.Exec.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn6 bool
+ if x.Handler.HTTPGet == nil {
+ yyn6 = true
+ goto LABEL6
+ }
+ LABEL6:
+ if yyr2 || yy2arr2 {
+ if yyn6 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.HTTPGet == nil {
+ r.EncodeNil()
+ } else {
+ x.HTTPGet.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("httpGet"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn6 {
+ r.EncodeNil()
+ } else {
+ if x.HTTPGet == nil {
+ r.EncodeNil()
+ } else {
+ x.HTTPGet.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn9 bool
+ if x.Handler.TCPSocket == nil {
+ yyn9 = true
+ goto LABEL9
+ }
+ LABEL9:
+ if yyr2 || yy2arr2 {
+ if yyn9 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.TCPSocket == nil {
+ r.EncodeNil()
+ } else {
+ x.TCPSocket.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("tcpSocket"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn9 {
+ r.EncodeNil()
+ } else {
+ if x.TCPSocket == nil {
+ r.EncodeNil()
+ } else {
+ x.TCPSocket.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.InitialDelaySeconds))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("initialDelaySeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(x.InitialDelaySeconds))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(x.TimeoutSeconds))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("timeoutSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(x.TimeoutSeconds))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeInt(int64(x.PeriodSeconds))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("periodSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeInt(int64(x.PeriodSeconds))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeInt(int64(x.SuccessThreshold))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("successThreshold"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeInt(int64(x.SuccessThreshold))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeInt(int64(x.FailureThreshold))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("failureThreshold"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeInt(int64(x.FailureThreshold))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Probe) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Probe) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "exec":
+ if x.Handler.Exec == nil {
+ x.Handler.Exec = new(ExecAction)
+ }
+ if r.TryDecodeAsNil() {
+ if x.Exec != nil {
+ x.Exec = nil
+ }
+ } else {
+ if x.Exec == nil {
+ x.Exec = new(ExecAction)
+ }
+ x.Exec.CodecDecodeSelf(d)
+ }
+ case "httpGet":
+ if x.Handler.HTTPGet == nil {
+ x.Handler.HTTPGet = new(HTTPGetAction)
+ }
+ if r.TryDecodeAsNil() {
+ if x.HTTPGet != nil {
+ x.HTTPGet = nil
+ }
+ } else {
+ if x.HTTPGet == nil {
+ x.HTTPGet = new(HTTPGetAction)
+ }
+ x.HTTPGet.CodecDecodeSelf(d)
+ }
+ case "tcpSocket":
+ if x.Handler.TCPSocket == nil {
+ x.Handler.TCPSocket = new(TCPSocketAction)
+ }
+ if r.TryDecodeAsNil() {
+ if x.TCPSocket != nil {
+ x.TCPSocket = nil
+ }
+ } else {
+ if x.TCPSocket == nil {
+ x.TCPSocket = new(TCPSocketAction)
+ }
+ x.TCPSocket.CodecDecodeSelf(d)
+ }
+ case "initialDelaySeconds":
+ if r.TryDecodeAsNil() {
+ x.InitialDelaySeconds = 0
+ } else {
+ yyv7 := &x.InitialDelaySeconds
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*int32)(yyv7)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "timeoutSeconds":
+ if r.TryDecodeAsNil() {
+ x.TimeoutSeconds = 0
+ } else {
+ yyv9 := &x.TimeoutSeconds
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ *((*int32)(yyv9)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "periodSeconds":
+ if r.TryDecodeAsNil() {
+ x.PeriodSeconds = 0
+ } else {
+ yyv11 := &x.PeriodSeconds
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int32)(yyv11)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "successThreshold":
+ if r.TryDecodeAsNil() {
+ x.SuccessThreshold = 0
+ } else {
+ yyv13 := &x.SuccessThreshold
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ *((*int32)(yyv13)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "failureThreshold":
+ if r.TryDecodeAsNil() {
+ x.FailureThreshold = 0
+ } else {
+ yyv15 := &x.FailureThreshold
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*int32)(yyv15)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Probe) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj17 int
+ var yyb17 bool
+ var yyhl17 bool = l >= 0
+ if x.Handler.Exec == nil {
+ x.Handler.Exec = new(ExecAction)
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Exec != nil {
+ x.Exec = nil
+ }
+ } else {
+ if x.Exec == nil {
+ x.Exec = new(ExecAction)
+ }
+ x.Exec.CodecDecodeSelf(d)
+ }
+ if x.Handler.HTTPGet == nil {
+ x.Handler.HTTPGet = new(HTTPGetAction)
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.HTTPGet != nil {
+ x.HTTPGet = nil
+ }
+ } else {
+ if x.HTTPGet == nil {
+ x.HTTPGet = new(HTTPGetAction)
+ }
+ x.HTTPGet.CodecDecodeSelf(d)
+ }
+ if x.Handler.TCPSocket == nil {
+ x.Handler.TCPSocket = new(TCPSocketAction)
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.TCPSocket != nil {
+ x.TCPSocket = nil
+ }
+ } else {
+ if x.TCPSocket == nil {
+ x.TCPSocket = new(TCPSocketAction)
+ }
+ x.TCPSocket.CodecDecodeSelf(d)
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.InitialDelaySeconds = 0
+ } else {
+ yyv21 := &x.InitialDelaySeconds
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int32)(yyv21)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TimeoutSeconds = 0
+ } else {
+ yyv23 := &x.TimeoutSeconds
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*int32)(yyv23)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PeriodSeconds = 0
+ } else {
+ yyv25 := &x.PeriodSeconds
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*int32)(yyv25)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SuccessThreshold = 0
+ } else {
+ yyv27 := &x.SuccessThreshold
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*int32)(yyv27)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FailureThreshold = 0
+ } else {
+ yyv29 := &x.FailureThreshold
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*int32)(yyv29)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj17-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x PullPolicy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *PullPolicy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 TerminationMessagePolicy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *TerminationMessagePolicy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 Capability) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *Capability) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *Capabilities) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Add) != 0
+ yyq2[1] = len(x.Drop) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Add == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceCapability(([]Capability)(x.Add), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("add"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Add == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceCapability(([]Capability)(x.Add), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Drop == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceCapability(([]Capability)(x.Drop), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("drop"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Drop == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceCapability(([]Capability)(x.Drop), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Capabilities) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Capabilities) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "add":
+ if r.TryDecodeAsNil() {
+ x.Add = nil
+ } else {
+ yyv4 := &x.Add
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceCapability((*[]Capability)(yyv4), d)
+ }
+ }
+ case "drop":
+ if r.TryDecodeAsNil() {
+ x.Drop = nil
+ } else {
+ yyv6 := &x.Drop
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceCapability((*[]Capability)(yyv6), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Capabilities) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Add = nil
+ } else {
+ yyv9 := &x.Add
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceCapability((*[]Capability)(yyv9), d)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Drop = nil
+ } else {
+ yyv11 := &x.Drop
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceCapability((*[]Capability)(yyv11), d)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ResourceRequirements) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Limits) != 0
+ yyq2[1] = len(x.Requests) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Limits == nil {
+ r.EncodeNil()
+ } else {
+ x.Limits.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("limits"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Limits == nil {
+ r.EncodeNil()
+ } else {
+ x.Limits.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Requests == nil {
+ r.EncodeNil()
+ } else {
+ x.Requests.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("requests"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Requests == nil {
+ r.EncodeNil()
+ } else {
+ x.Requests.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ResourceRequirements) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ResourceRequirements) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "limits":
+ if r.TryDecodeAsNil() {
+ x.Limits = nil
+ } else {
+ yyv4 := &x.Limits
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "requests":
+ if r.TryDecodeAsNil() {
+ x.Requests = nil
+ } else {
+ yyv5 := &x.Requests
+ yyv5.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ResourceRequirements) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Limits = nil
+ } else {
+ yyv7 := &x.Limits
+ yyv7.CodecDecodeSelf(d)
+ }
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Requests = nil
+ } else {
+ yyv8 := &x.Requests
+ yyv8.CodecDecodeSelf(d)
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [20]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[2] = len(x.Command) != 0
+ yyq2[3] = len(x.Args) != 0
+ yyq2[4] = x.WorkingDir != ""
+ yyq2[5] = len(x.Ports) != 0
+ yyq2[6] = len(x.EnvFrom) != 0
+ yyq2[7] = len(x.Env) != 0
+ yyq2[8] = true
+ yyq2[9] = len(x.VolumeMounts) != 0
+ yyq2[10] = x.LivenessProbe != nil
+ yyq2[11] = x.ReadinessProbe != nil
+ yyq2[12] = x.Lifecycle != nil
+ yyq2[13] = x.TerminationMessagePath != ""
+ yyq2[14] = x.TerminationMessagePolicy != ""
+ yyq2[15] = x.ImagePullPolicy != ""
+ yyq2[16] = x.SecurityContext != nil
+ yyq2[17] = x.Stdin != false
+ yyq2[18] = x.StdinOnce != false
+ yyq2[19] = x.TTY != false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(20)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Image))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("image"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Image))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Command == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Command, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("command"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Command == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Command, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Args == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Args, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("args"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Args == nil {
+ r.EncodeNil()
+ } else {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Args, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.WorkingDir))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("workingDir"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.WorkingDir))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.Ports == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ h.encSliceContainerPort(([]ContainerPort)(x.Ports), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ports"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Ports == nil {
+ r.EncodeNil()
+ } else {
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.encSliceContainerPort(([]ContainerPort)(x.Ports), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.EnvFrom == nil {
+ r.EncodeNil()
+ } else {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ h.encSliceEnvFromSource(([]EnvFromSource)(x.EnvFrom), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("envFrom"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.EnvFrom == nil {
+ r.EncodeNil()
+ } else {
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ h.encSliceEnvFromSource(([]EnvFromSource)(x.EnvFrom), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.Env == nil {
+ r.EncodeNil()
+ } else {
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ h.encSliceEnvVar(([]EnvVar)(x.Env), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("env"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Env == nil {
+ r.EncodeNil()
+ } else {
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ h.encSliceEnvVar(([]EnvVar)(x.Env), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ yy28 := &x.Resources
+ yy28.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resources"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy30 := &x.Resources
+ yy30.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ if x.VolumeMounts == nil {
+ r.EncodeNil()
+ } else {
+ yym33 := z.EncBinary()
+ _ = yym33
+ if false {
+ } else {
+ h.encSliceVolumeMount(([]VolumeMount)(x.VolumeMounts), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumeMounts"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.VolumeMounts == nil {
+ r.EncodeNil()
+ } else {
+ yym34 := z.EncBinary()
+ _ = yym34
+ if false {
+ } else {
+ h.encSliceVolumeMount(([]VolumeMount)(x.VolumeMounts), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[10] {
+ if x.LivenessProbe == nil {
+ r.EncodeNil()
+ } else {
+ x.LivenessProbe.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[10] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("livenessProbe"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.LivenessProbe == nil {
+ r.EncodeNil()
+ } else {
+ x.LivenessProbe.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[11] {
+ if x.ReadinessProbe == nil {
+ r.EncodeNil()
+ } else {
+ x.ReadinessProbe.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[11] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readinessProbe"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ReadinessProbe == nil {
+ r.EncodeNil()
+ } else {
+ x.ReadinessProbe.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[12] {
+ if x.Lifecycle == nil {
+ r.EncodeNil()
+ } else {
+ x.Lifecycle.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[12] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lifecycle"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Lifecycle == nil {
+ r.EncodeNil()
+ } else {
+ x.Lifecycle.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[13] {
+ yym45 := z.EncBinary()
+ _ = yym45
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.TerminationMessagePath))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[13] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("terminationMessagePath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym46 := z.EncBinary()
+ _ = yym46
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.TerminationMessagePath))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[14] {
+ x.TerminationMessagePolicy.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[14] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("terminationMessagePolicy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.TerminationMessagePolicy.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[15] {
+ x.ImagePullPolicy.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[15] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("imagePullPolicy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.ImagePullPolicy.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[16] {
+ if x.SecurityContext == nil {
+ r.EncodeNil()
+ } else {
+ x.SecurityContext.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[16] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("securityContext"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SecurityContext == nil {
+ r.EncodeNil()
+ } else {
+ x.SecurityContext.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[17] {
+ yym57 := z.EncBinary()
+ _ = yym57
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdin))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[17] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stdin"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym58 := z.EncBinary()
+ _ = yym58
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdin))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[18] {
+ yym60 := z.EncBinary()
+ _ = yym60
+ if false {
+ } else {
+ r.EncodeBool(bool(x.StdinOnce))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[18] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stdinOnce"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym61 := z.EncBinary()
+ _ = yym61
+ if false {
+ } else {
+ r.EncodeBool(bool(x.StdinOnce))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[19] {
+ yym63 := z.EncBinary()
+ _ = yym63
+ if false {
+ } else {
+ r.EncodeBool(bool(x.TTY))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[19] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("tty"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym64 := z.EncBinary()
+ _ = yym64
+ if false {
+ } else {
+ r.EncodeBool(bool(x.TTY))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Container) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Container) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "image":
+ if r.TryDecodeAsNil() {
+ x.Image = ""
+ } else {
+ yyv6 := &x.Image
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "command":
+ if r.TryDecodeAsNil() {
+ x.Command = nil
+ } else {
+ yyv8 := &x.Command
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv8, false, d)
+ }
+ }
+ case "args":
+ if r.TryDecodeAsNil() {
+ x.Args = nil
+ } else {
+ yyv10 := &x.Args
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv10, false, d)
+ }
+ }
+ case "workingDir":
+ if r.TryDecodeAsNil() {
+ x.WorkingDir = ""
+ } else {
+ yyv12 := &x.WorkingDir
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ case "ports":
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv14 := &x.Ports
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.decSliceContainerPort((*[]ContainerPort)(yyv14), d)
+ }
+ }
+ case "envFrom":
+ if r.TryDecodeAsNil() {
+ x.EnvFrom = nil
+ } else {
+ yyv16 := &x.EnvFrom
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ h.decSliceEnvFromSource((*[]EnvFromSource)(yyv16), d)
+ }
+ }
+ case "env":
+ if r.TryDecodeAsNil() {
+ x.Env = nil
+ } else {
+ yyv18 := &x.Env
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ h.decSliceEnvVar((*[]EnvVar)(yyv18), d)
+ }
+ }
+ case "resources":
+ if r.TryDecodeAsNil() {
+ x.Resources = ResourceRequirements{}
+ } else {
+ yyv20 := &x.Resources
+ yyv20.CodecDecodeSelf(d)
+ }
+ case "volumeMounts":
+ if r.TryDecodeAsNil() {
+ x.VolumeMounts = nil
+ } else {
+ yyv21 := &x.VolumeMounts
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ h.decSliceVolumeMount((*[]VolumeMount)(yyv21), d)
+ }
+ }
+ case "livenessProbe":
+ if r.TryDecodeAsNil() {
+ if x.LivenessProbe != nil {
+ x.LivenessProbe = nil
+ }
+ } else {
+ if x.LivenessProbe == nil {
+ x.LivenessProbe = new(Probe)
+ }
+ x.LivenessProbe.CodecDecodeSelf(d)
+ }
+ case "readinessProbe":
+ if r.TryDecodeAsNil() {
+ if x.ReadinessProbe != nil {
+ x.ReadinessProbe = nil
+ }
+ } else {
+ if x.ReadinessProbe == nil {
+ x.ReadinessProbe = new(Probe)
+ }
+ x.ReadinessProbe.CodecDecodeSelf(d)
+ }
+ case "lifecycle":
+ if r.TryDecodeAsNil() {
+ if x.Lifecycle != nil {
+ x.Lifecycle = nil
+ }
+ } else {
+ if x.Lifecycle == nil {
+ x.Lifecycle = new(Lifecycle)
+ }
+ x.Lifecycle.CodecDecodeSelf(d)
+ }
+ case "terminationMessagePath":
+ if r.TryDecodeAsNil() {
+ x.TerminationMessagePath = ""
+ } else {
+ yyv26 := &x.TerminationMessagePath
+ yym27 := z.DecBinary()
+ _ = yym27
+ if false {
+ } else {
+ *((*string)(yyv26)) = r.DecodeString()
+ }
+ }
+ case "terminationMessagePolicy":
+ if r.TryDecodeAsNil() {
+ x.TerminationMessagePolicy = ""
+ } else {
+ yyv28 := &x.TerminationMessagePolicy
+ yyv28.CodecDecodeSelf(d)
+ }
+ case "imagePullPolicy":
+ if r.TryDecodeAsNil() {
+ x.ImagePullPolicy = ""
+ } else {
+ yyv29 := &x.ImagePullPolicy
+ yyv29.CodecDecodeSelf(d)
+ }
+ case "securityContext":
+ if r.TryDecodeAsNil() {
+ if x.SecurityContext != nil {
+ x.SecurityContext = nil
+ }
+ } else {
+ if x.SecurityContext == nil {
+ x.SecurityContext = new(SecurityContext)
+ }
+ x.SecurityContext.CodecDecodeSelf(d)
+ }
+ case "stdin":
+ if r.TryDecodeAsNil() {
+ x.Stdin = false
+ } else {
+ yyv31 := &x.Stdin
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*bool)(yyv31)) = r.DecodeBool()
+ }
+ }
+ case "stdinOnce":
+ if r.TryDecodeAsNil() {
+ x.StdinOnce = false
+ } else {
+ yyv33 := &x.StdinOnce
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ *((*bool)(yyv33)) = r.DecodeBool()
+ }
+ }
+ case "tty":
+ if r.TryDecodeAsNil() {
+ x.TTY = false
+ } else {
+ yyv35 := &x.TTY
+ yym36 := z.DecBinary()
+ _ = yym36
+ if false {
+ } else {
+ *((*bool)(yyv35)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj37 int
+ var yyb37 bool
+ var yyhl37 bool = l >= 0
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv38 := &x.Name
+ yym39 := z.DecBinary()
+ _ = yym39
+ if false {
+ } else {
+ *((*string)(yyv38)) = r.DecodeString()
+ }
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Image = ""
+ } else {
+ yyv40 := &x.Image
+ yym41 := z.DecBinary()
+ _ = yym41
+ if false {
+ } else {
+ *((*string)(yyv40)) = r.DecodeString()
+ }
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Command = nil
+ } else {
+ yyv42 := &x.Command
+ yym43 := z.DecBinary()
+ _ = yym43
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv42, false, d)
+ }
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Args = nil
+ } else {
+ yyv44 := &x.Args
+ yym45 := z.DecBinary()
+ _ = yym45
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv44, false, d)
+ }
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.WorkingDir = ""
+ } else {
+ yyv46 := &x.WorkingDir
+ yym47 := z.DecBinary()
+ _ = yym47
+ if false {
+ } else {
+ *((*string)(yyv46)) = r.DecodeString()
+ }
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv48 := &x.Ports
+ yym49 := z.DecBinary()
+ _ = yym49
+ if false {
+ } else {
+ h.decSliceContainerPort((*[]ContainerPort)(yyv48), d)
+ }
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.EnvFrom = nil
+ } else {
+ yyv50 := &x.EnvFrom
+ yym51 := z.DecBinary()
+ _ = yym51
+ if false {
+ } else {
+ h.decSliceEnvFromSource((*[]EnvFromSource)(yyv50), d)
+ }
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Env = nil
+ } else {
+ yyv52 := &x.Env
+ yym53 := z.DecBinary()
+ _ = yym53
+ if false {
+ } else {
+ h.decSliceEnvVar((*[]EnvVar)(yyv52), d)
+ }
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Resources = ResourceRequirements{}
+ } else {
+ yyv54 := &x.Resources
+ yyv54.CodecDecodeSelf(d)
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumeMounts = nil
+ } else {
+ yyv55 := &x.VolumeMounts
+ yym56 := z.DecBinary()
+ _ = yym56
+ if false {
+ } else {
+ h.decSliceVolumeMount((*[]VolumeMount)(yyv55), d)
+ }
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.LivenessProbe != nil {
+ x.LivenessProbe = nil
+ }
+ } else {
+ if x.LivenessProbe == nil {
+ x.LivenessProbe = new(Probe)
+ }
+ x.LivenessProbe.CodecDecodeSelf(d)
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ReadinessProbe != nil {
+ x.ReadinessProbe = nil
+ }
+ } else {
+ if x.ReadinessProbe == nil {
+ x.ReadinessProbe = new(Probe)
+ }
+ x.ReadinessProbe.CodecDecodeSelf(d)
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Lifecycle != nil {
+ x.Lifecycle = nil
+ }
+ } else {
+ if x.Lifecycle == nil {
+ x.Lifecycle = new(Lifecycle)
+ }
+ x.Lifecycle.CodecDecodeSelf(d)
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TerminationMessagePath = ""
+ } else {
+ yyv60 := &x.TerminationMessagePath
+ yym61 := z.DecBinary()
+ _ = yym61
+ if false {
+ } else {
+ *((*string)(yyv60)) = r.DecodeString()
+ }
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TerminationMessagePolicy = ""
+ } else {
+ yyv62 := &x.TerminationMessagePolicy
+ yyv62.CodecDecodeSelf(d)
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ImagePullPolicy = ""
+ } else {
+ yyv63 := &x.ImagePullPolicy
+ yyv63.CodecDecodeSelf(d)
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SecurityContext != nil {
+ x.SecurityContext = nil
+ }
+ } else {
+ if x.SecurityContext == nil {
+ x.SecurityContext = new(SecurityContext)
+ }
+ x.SecurityContext.CodecDecodeSelf(d)
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Stdin = false
+ } else {
+ yyv65 := &x.Stdin
+ yym66 := z.DecBinary()
+ _ = yym66
+ if false {
+ } else {
+ *((*bool)(yyv65)) = r.DecodeBool()
+ }
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.StdinOnce = false
+ } else {
+ yyv67 := &x.StdinOnce
+ yym68 := z.DecBinary()
+ _ = yym68
+ if false {
+ } else {
+ *((*bool)(yyv67)) = r.DecodeBool()
+ }
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TTY = false
+ } else {
+ yyv69 := &x.TTY
+ yym70 := z.DecBinary()
+ _ = yym70
+ if false {
+ } else {
+ *((*bool)(yyv69)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj37-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Handler) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Exec != nil
+ yyq2[1] = x.HTTPGet != nil
+ yyq2[2] = x.TCPSocket != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Exec == nil {
+ r.EncodeNil()
+ } else {
+ x.Exec.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("exec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Exec == nil {
+ r.EncodeNil()
+ } else {
+ x.Exec.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.HTTPGet == nil {
+ r.EncodeNil()
+ } else {
+ x.HTTPGet.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("httpGet"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.HTTPGet == nil {
+ r.EncodeNil()
+ } else {
+ x.HTTPGet.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.TCPSocket == nil {
+ r.EncodeNil()
+ } else {
+ x.TCPSocket.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("tcpSocket"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TCPSocket == nil {
+ r.EncodeNil()
+ } else {
+ x.TCPSocket.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Handler) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Handler) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "exec":
+ if r.TryDecodeAsNil() {
+ if x.Exec != nil {
+ x.Exec = nil
+ }
+ } else {
+ if x.Exec == nil {
+ x.Exec = new(ExecAction)
+ }
+ x.Exec.CodecDecodeSelf(d)
+ }
+ case "httpGet":
+ if r.TryDecodeAsNil() {
+ if x.HTTPGet != nil {
+ x.HTTPGet = nil
+ }
+ } else {
+ if x.HTTPGet == nil {
+ x.HTTPGet = new(HTTPGetAction)
+ }
+ x.HTTPGet.CodecDecodeSelf(d)
+ }
+ case "tcpSocket":
+ if r.TryDecodeAsNil() {
+ if x.TCPSocket != nil {
+ x.TCPSocket = nil
+ }
+ } else {
+ if x.TCPSocket == nil {
+ x.TCPSocket = new(TCPSocketAction)
+ }
+ x.TCPSocket.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Handler) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Exec != nil {
+ x.Exec = nil
+ }
+ } else {
+ if x.Exec == nil {
+ x.Exec = new(ExecAction)
+ }
+ x.Exec.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.HTTPGet != nil {
+ x.HTTPGet = nil
+ }
+ } else {
+ if x.HTTPGet == nil {
+ x.HTTPGet = new(HTTPGetAction)
+ }
+ x.HTTPGet.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.TCPSocket != nil {
+ x.TCPSocket = nil
+ }
+ } else {
+ if x.TCPSocket == nil {
+ x.TCPSocket = new(TCPSocketAction)
+ }
+ x.TCPSocket.CodecDecodeSelf(d)
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Lifecycle) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.PostStart != nil
+ yyq2[1] = x.PreStop != 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.PostStart == nil {
+ r.EncodeNil()
+ } else {
+ x.PostStart.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("postStart"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PostStart == nil {
+ r.EncodeNil()
+ } else {
+ x.PostStart.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.PreStop == nil {
+ r.EncodeNil()
+ } else {
+ x.PreStop.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("preStop"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PreStop == nil {
+ r.EncodeNil()
+ } else {
+ x.PreStop.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Lifecycle) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Lifecycle) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "postStart":
+ if r.TryDecodeAsNil() {
+ if x.PostStart != nil {
+ x.PostStart = nil
+ }
+ } else {
+ if x.PostStart == nil {
+ x.PostStart = new(Handler)
+ }
+ x.PostStart.CodecDecodeSelf(d)
+ }
+ case "preStop":
+ if r.TryDecodeAsNil() {
+ if x.PreStop != nil {
+ x.PreStop = nil
+ }
+ } else {
+ if x.PreStop == nil {
+ x.PreStop = new(Handler)
+ }
+ x.PreStop.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Lifecycle) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PostStart != nil {
+ x.PostStart = nil
+ }
+ } else {
+ if x.PostStart == nil {
+ x.PostStart = new(Handler)
+ }
+ x.PostStart.CodecDecodeSelf(d)
+ }
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PreStop != nil {
+ x.PreStop = nil
+ }
+ } else {
+ if x.PreStop == nil {
+ x.PreStop = new(Handler)
+ }
+ x.PreStop.CodecDecodeSelf(d)
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x ConditionStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *ConditionStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *ContainerStateWaiting) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Reason != ""
+ yyq2[1] = x.Message != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ContainerStateWaiting) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ContainerStateWaiting) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv4 := &x.Reason
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv6 := &x.Message
+ 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_containerMapEnd1234)
+}
+
+func (x *ContainerStateWaiting) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv9 := &x.Reason
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv11 := &x.Message
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ContainerStateRunning) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = true
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yy4 := &x.StartedAt
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy4) {
+ } else if yym5 {
+ z.EncBinaryMarshal(yy4)
+ } else if !yym5 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy4)
+ } else {
+ z.EncFallback(yy4)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("startedAt"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.StartedAt
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy6) {
+ } else if yym7 {
+ z.EncBinaryMarshal(yy6)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy6)
+ } else {
+ z.EncFallback(yy6)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ContainerStateRunning) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ContainerStateRunning) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "startedAt":
+ if r.TryDecodeAsNil() {
+ x.StartedAt = pkg2_v1.Time{}
+ } else {
+ yyv4 := &x.StartedAt
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else if yym5 {
+ z.DecBinaryUnmarshal(yyv4)
+ } else if !yym5 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv4)
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ContainerStateRunning) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.StartedAt = pkg2_v1.Time{}
+ } else {
+ yyv7 := &x.StartedAt
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv7) {
+ } else if yym8 {
+ z.DecBinaryUnmarshal(yyv7)
+ } else if !yym8 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv7)
+ } else {
+ z.DecFallback(yyv7, false)
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ContainerStateTerminated) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [7]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[1] = x.Signal != 0
+ yyq2[2] = x.Reason != ""
+ yyq2[3] = x.Message != ""
+ yyq2[4] = true
+ yyq2[5] = true
+ yyq2[6] = x.ContainerID != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(7)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ExitCode))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("exitCode"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ExitCode))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Signal))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("signal"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Signal))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy16 := &x.StartedAt
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy16) {
+ } else if yym17 {
+ z.EncBinaryMarshal(yy16)
+ } else if !yym17 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy16)
+ } else {
+ z.EncFallback(yy16)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("startedAt"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy18 := &x.StartedAt
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy18) {
+ } else if yym19 {
+ z.EncBinaryMarshal(yy18)
+ } else if !yym19 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy18)
+ } else {
+ z.EncFallback(yy18)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yy21 := &x.FinishedAt
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy21) {
+ } else if yym22 {
+ z.EncBinaryMarshal(yy21)
+ } else if !yym22 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy21)
+ } else {
+ z.EncFallback(yy21)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("finishedAt"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy23 := &x.FinishedAt
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy23) {
+ } else if yym24 {
+ z.EncBinaryMarshal(yy23)
+ } else if !yym24 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy23)
+ } else {
+ z.EncFallback(yy23)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ContainerID))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("containerID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym27 := z.EncBinary()
+ _ = yym27
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ContainerID))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ContainerStateTerminated) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ContainerStateTerminated) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "exitCode":
+ if r.TryDecodeAsNil() {
+ x.ExitCode = 0
+ } else {
+ yyv4 := &x.ExitCode
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(yyv4)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "signal":
+ if r.TryDecodeAsNil() {
+ x.Signal = 0
+ } else {
+ yyv6 := &x.Signal
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int32)(yyv6)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv8 := &x.Reason
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv10 := &x.Message
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "startedAt":
+ if r.TryDecodeAsNil() {
+ x.StartedAt = pkg2_v1.Time{}
+ } else {
+ yyv12 := &x.StartedAt
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv12) {
+ } else if yym13 {
+ z.DecBinaryUnmarshal(yyv12)
+ } else if !yym13 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv12)
+ } else {
+ z.DecFallback(yyv12, false)
+ }
+ }
+ case "finishedAt":
+ if r.TryDecodeAsNil() {
+ x.FinishedAt = pkg2_v1.Time{}
+ } else {
+ yyv14 := &x.FinishedAt
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv14) {
+ } else if yym15 {
+ z.DecBinaryUnmarshal(yyv14)
+ } else if !yym15 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv14)
+ } else {
+ z.DecFallback(yyv14, false)
+ }
+ }
+ case "containerID":
+ if r.TryDecodeAsNil() {
+ x.ContainerID = ""
+ } else {
+ yyv16 := &x.ContainerID
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ContainerStateTerminated) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj18 int
+ var yyb18 bool
+ var yyhl18 bool = l >= 0
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ExitCode = 0
+ } else {
+ yyv19 := &x.ExitCode
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*int32)(yyv19)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Signal = 0
+ } else {
+ yyv21 := &x.Signal
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int32)(yyv21)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv23 := &x.Reason
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*string)(yyv23)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv25 := &x.Message
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*string)(yyv25)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.StartedAt = pkg2_v1.Time{}
+ } else {
+ yyv27 := &x.StartedAt
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv27) {
+ } else if yym28 {
+ z.DecBinaryUnmarshal(yyv27)
+ } else if !yym28 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv27)
+ } else {
+ z.DecFallback(yyv27, false)
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FinishedAt = pkg2_v1.Time{}
+ } else {
+ yyv29 := &x.FinishedAt
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv29) {
+ } else if yym30 {
+ z.DecBinaryUnmarshal(yyv29)
+ } else if !yym30 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv29)
+ } else {
+ z.DecFallback(yyv29, false)
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ContainerID = ""
+ } else {
+ yyv31 := &x.ContainerID
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*string)(yyv31)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj18-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ContainerState) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Waiting != nil
+ yyq2[1] = x.Running != nil
+ yyq2[2] = x.Terminated != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Waiting == nil {
+ r.EncodeNil()
+ } else {
+ x.Waiting.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("waiting"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Waiting == nil {
+ r.EncodeNil()
+ } else {
+ x.Waiting.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Running == nil {
+ r.EncodeNil()
+ } else {
+ x.Running.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("running"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Running == nil {
+ r.EncodeNil()
+ } else {
+ x.Running.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Terminated == nil {
+ r.EncodeNil()
+ } else {
+ x.Terminated.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("terminated"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Terminated == nil {
+ r.EncodeNil()
+ } else {
+ x.Terminated.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ContainerState) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ContainerState) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "waiting":
+ if r.TryDecodeAsNil() {
+ if x.Waiting != nil {
+ x.Waiting = nil
+ }
+ } else {
+ if x.Waiting == nil {
+ x.Waiting = new(ContainerStateWaiting)
+ }
+ x.Waiting.CodecDecodeSelf(d)
+ }
+ case "running":
+ if r.TryDecodeAsNil() {
+ if x.Running != nil {
+ x.Running = nil
+ }
+ } else {
+ if x.Running == nil {
+ x.Running = new(ContainerStateRunning)
+ }
+ x.Running.CodecDecodeSelf(d)
+ }
+ case "terminated":
+ if r.TryDecodeAsNil() {
+ if x.Terminated != nil {
+ x.Terminated = nil
+ }
+ } else {
+ if x.Terminated == nil {
+ x.Terminated = new(ContainerStateTerminated)
+ }
+ x.Terminated.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ContainerState) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Waiting != nil {
+ x.Waiting = nil
+ }
+ } else {
+ if x.Waiting == nil {
+ x.Waiting = new(ContainerStateWaiting)
+ }
+ x.Waiting.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Running != nil {
+ x.Running = nil
+ }
+ } else {
+ if x.Running == nil {
+ x.Running = new(ContainerStateRunning)
+ }
+ x.Running.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Terminated != nil {
+ x.Terminated = nil
+ }
+ } else {
+ if x.Terminated == nil {
+ x.Terminated = new(ContainerStateTerminated)
+ }
+ x.Terminated.CodecDecodeSelf(d)
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ContainerStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = true
+ yyq2[2] = true
+ yyq2[7] = x.ContainerID != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(8)
+ } else {
+ yynn2 = 5
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yy7 := &x.State
+ yy7.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("state"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.State
+ yy9.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy12 := &x.LastTerminationState
+ yy12.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastState"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy14 := &x.LastTerminationState
+ yy14.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Ready))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ready"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Ready))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeInt(int64(x.RestartCount))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("restartCount"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeInt(int64(x.RestartCount))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Image))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("image"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Image))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ImageID))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("imageID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym27 := z.EncBinary()
+ _ = yym27
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ImageID))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ yym29 := z.EncBinary()
+ _ = yym29
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ContainerID))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("containerID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym30 := z.EncBinary()
+ _ = yym30
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ContainerID))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ContainerStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ContainerStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "state":
+ if r.TryDecodeAsNil() {
+ x.State = ContainerState{}
+ } else {
+ yyv6 := &x.State
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "lastState":
+ if r.TryDecodeAsNil() {
+ x.LastTerminationState = ContainerState{}
+ } else {
+ yyv7 := &x.LastTerminationState
+ yyv7.CodecDecodeSelf(d)
+ }
+ case "ready":
+ if r.TryDecodeAsNil() {
+ x.Ready = false
+ } else {
+ yyv8 := &x.Ready
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(yyv8)) = r.DecodeBool()
+ }
+ }
+ case "restartCount":
+ if r.TryDecodeAsNil() {
+ x.RestartCount = 0
+ } else {
+ yyv10 := &x.RestartCount
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(yyv10)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "image":
+ if r.TryDecodeAsNil() {
+ x.Image = ""
+ } else {
+ yyv12 := &x.Image
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ case "imageID":
+ if r.TryDecodeAsNil() {
+ x.ImageID = ""
+ } else {
+ yyv14 := &x.ImageID
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ case "containerID":
+ if r.TryDecodeAsNil() {
+ x.ContainerID = ""
+ } else {
+ yyv16 := &x.ContainerID
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ContainerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj18 int
+ var yyb18 bool
+ var yyhl18 bool = l >= 0
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv19 := &x.Name
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.State = ContainerState{}
+ } else {
+ yyv21 := &x.State
+ yyv21.CodecDecodeSelf(d)
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastTerminationState = ContainerState{}
+ } else {
+ yyv22 := &x.LastTerminationState
+ yyv22.CodecDecodeSelf(d)
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Ready = false
+ } else {
+ yyv23 := &x.Ready
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*bool)(yyv23)) = r.DecodeBool()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RestartCount = 0
+ } else {
+ yyv25 := &x.RestartCount
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*int32)(yyv25)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Image = ""
+ } else {
+ yyv27 := &x.Image
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*string)(yyv27)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ImageID = ""
+ } else {
+ yyv29 := &x.ImageID
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*string)(yyv29)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ContainerID = ""
+ } else {
+ yyv31 := &x.ContainerID
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*string)(yyv31)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj18-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x PodPhase) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *PodPhase) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 PodConditionType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *PodConditionType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *PodCondition) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = true
+ yyq2[3] = true
+ yyq2[4] = x.Reason != ""
+ yyq2[5] = x.Message != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Status.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Status.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy10 := &x.LastProbeTime
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy10) {
+ } else if yym11 {
+ z.EncBinaryMarshal(yy10)
+ } else if !yym11 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy10)
+ } else {
+ z.EncFallback(yy10)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastProbeTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.LastProbeTime
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if yym13 {
+ z.EncBinaryMarshal(yy12)
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.LastTransitionTime
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy15) {
+ } else if yym16 {
+ z.EncBinaryMarshal(yy15)
+ } else if !yym16 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy15)
+ } else {
+ z.EncFallback(yy15)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.LastTransitionTime
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy17) {
+ } else if yym18 {
+ z.EncBinaryMarshal(yy17)
+ } else if !yym18 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy17)
+ } else {
+ z.EncFallback(yy17)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodCondition) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "lastProbeTime":
+ if r.TryDecodeAsNil() {
+ x.LastProbeTime = pkg2_v1.Time{}
+ } else {
+ yyv6 := &x.LastProbeTime
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if yym7 {
+ z.DecBinaryUnmarshal(yyv6)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ case "lastTransitionTime":
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg2_v1.Time{}
+ } else {
+ yyv8 := &x.LastTransitionTime
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv8) {
+ } else if yym9 {
+ z.DecBinaryUnmarshal(yyv8)
+ } else if !yym9 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv8)
+ } else {
+ z.DecFallback(yyv8, false)
+ }
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv10 := &x.Reason
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv12 := &x.Message
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv15 := &x.Type
+ yyv15.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv16 := &x.Status
+ yyv16.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastProbeTime = pkg2_v1.Time{}
+ } else {
+ yyv17 := &x.LastProbeTime
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv17) {
+ } else if yym18 {
+ z.DecBinaryUnmarshal(yyv17)
+ } else if !yym18 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv17)
+ } else {
+ z.DecFallback(yyv17, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg2_v1.Time{}
+ } else {
+ yyv19 := &x.LastTransitionTime
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv19) {
+ } else if yym20 {
+ z.DecBinaryUnmarshal(yyv19)
+ } else if !yym20 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv19)
+ } else {
+ z.DecFallback(yyv19, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv21 := &x.Reason
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv23 := &x.Message
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*string)(yyv23)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x RestartPolicy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *RestartPolicy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 DNSPolicy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *DNSPolicy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *NodeSelector) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if x.NodeSelectorTerms == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceNodeSelectorTerm(([]NodeSelectorTerm)(x.NodeSelectorTerms), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nodeSelectorTerms"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NodeSelectorTerms == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceNodeSelectorTerm(([]NodeSelectorTerm)(x.NodeSelectorTerms), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NodeSelector) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NodeSelector) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "nodeSelectorTerms":
+ if r.TryDecodeAsNil() {
+ x.NodeSelectorTerms = nil
+ } else {
+ yyv4 := &x.NodeSelectorTerms
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceNodeSelectorTerm((*[]NodeSelectorTerm)(yyv4), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NodeSelector) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NodeSelectorTerms = nil
+ } else {
+ yyv7 := &x.NodeSelectorTerms
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSliceNodeSelectorTerm((*[]NodeSelectorTerm)(yyv7), d)
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NodeSelectorTerm) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if x.MatchExpressions == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceNodeSelectorRequirement(([]NodeSelectorRequirement)(x.MatchExpressions), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("matchExpressions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.MatchExpressions == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceNodeSelectorRequirement(([]NodeSelectorRequirement)(x.MatchExpressions), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NodeSelectorTerm) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NodeSelectorTerm) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "matchExpressions":
+ if r.TryDecodeAsNil() {
+ x.MatchExpressions = nil
+ } else {
+ yyv4 := &x.MatchExpressions
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceNodeSelectorRequirement((*[]NodeSelectorRequirement)(yyv4), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NodeSelectorTerm) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MatchExpressions = nil
+ } else {
+ yyv7 := &x.MatchExpressions
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSliceNodeSelectorRequirement((*[]NodeSelectorRequirement)(yyv7), d)
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NodeSelectorRequirement) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = len(x.Values) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(3)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Key))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("key"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Key))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Operator.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("operator"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Operator.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Values == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Values, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("values"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Values == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Values, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NodeSelectorRequirement) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NodeSelectorRequirement) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "key":
+ if r.TryDecodeAsNil() {
+ x.Key = ""
+ } else {
+ yyv4 := &x.Key
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "operator":
+ if r.TryDecodeAsNil() {
+ x.Operator = ""
+ } else {
+ yyv6 := &x.Operator
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "values":
+ if r.TryDecodeAsNil() {
+ x.Values = nil
+ } else {
+ yyv7 := &x.Values
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv7, false, d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NodeSelectorRequirement) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Key = ""
+ } else {
+ yyv10 := &x.Key
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Operator = ""
+ } else {
+ yyv12 := &x.Operator
+ yyv12.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Values = nil
+ } else {
+ yyv13 := &x.Values
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv13, false, d)
+ }
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x NodeSelectorOperator) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *NodeSelectorOperator) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *Affinity) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.NodeAffinity != nil
+ yyq2[1] = x.PodAffinity != nil
+ yyq2[2] = x.PodAntiAffinity != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.NodeAffinity == nil {
+ r.EncodeNil()
+ } else {
+ x.NodeAffinity.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nodeAffinity"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NodeAffinity == nil {
+ r.EncodeNil()
+ } else {
+ x.NodeAffinity.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.PodAffinity == nil {
+ r.EncodeNil()
+ } else {
+ x.PodAffinity.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podAffinity"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PodAffinity == nil {
+ r.EncodeNil()
+ } else {
+ x.PodAffinity.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.PodAntiAffinity == nil {
+ r.EncodeNil()
+ } else {
+ x.PodAntiAffinity.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podAntiAffinity"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PodAntiAffinity == nil {
+ r.EncodeNil()
+ } else {
+ x.PodAntiAffinity.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Affinity) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Affinity) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "nodeAffinity":
+ if r.TryDecodeAsNil() {
+ if x.NodeAffinity != nil {
+ x.NodeAffinity = nil
+ }
+ } else {
+ if x.NodeAffinity == nil {
+ x.NodeAffinity = new(NodeAffinity)
+ }
+ x.NodeAffinity.CodecDecodeSelf(d)
+ }
+ case "podAffinity":
+ if r.TryDecodeAsNil() {
+ if x.PodAffinity != nil {
+ x.PodAffinity = nil
+ }
+ } else {
+ if x.PodAffinity == nil {
+ x.PodAffinity = new(PodAffinity)
+ }
+ x.PodAffinity.CodecDecodeSelf(d)
+ }
+ case "podAntiAffinity":
+ if r.TryDecodeAsNil() {
+ if x.PodAntiAffinity != nil {
+ x.PodAntiAffinity = nil
+ }
+ } else {
+ if x.PodAntiAffinity == nil {
+ x.PodAntiAffinity = new(PodAntiAffinity)
+ }
+ x.PodAntiAffinity.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Affinity) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.NodeAffinity != nil {
+ x.NodeAffinity = nil
+ }
+ } else {
+ if x.NodeAffinity == nil {
+ x.NodeAffinity = new(NodeAffinity)
+ }
+ x.NodeAffinity.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PodAffinity != nil {
+ x.PodAffinity = nil
+ }
+ } else {
+ if x.PodAffinity == nil {
+ x.PodAffinity = new(PodAffinity)
+ }
+ x.PodAffinity.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PodAntiAffinity != nil {
+ x.PodAntiAffinity = nil
+ }
+ } else {
+ if x.PodAntiAffinity == nil {
+ x.PodAntiAffinity = new(PodAntiAffinity)
+ }
+ x.PodAntiAffinity.CodecDecodeSelf(d)
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodAffinity) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.RequiredDuringSchedulingIgnoredDuringExecution) != 0
+ yyq2[1] = len(x.PreferredDuringSchedulingIgnoredDuringExecution) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.RequiredDuringSchedulingIgnoredDuringExecution == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSlicePodAffinityTerm(([]PodAffinityTerm)(x.RequiredDuringSchedulingIgnoredDuringExecution), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("requiredDuringSchedulingIgnoredDuringExecution"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RequiredDuringSchedulingIgnoredDuringExecution == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSlicePodAffinityTerm(([]PodAffinityTerm)(x.RequiredDuringSchedulingIgnoredDuringExecution), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.PreferredDuringSchedulingIgnoredDuringExecution == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceWeightedPodAffinityTerm(([]WeightedPodAffinityTerm)(x.PreferredDuringSchedulingIgnoredDuringExecution), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("preferredDuringSchedulingIgnoredDuringExecution"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PreferredDuringSchedulingIgnoredDuringExecution == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceWeightedPodAffinityTerm(([]WeightedPodAffinityTerm)(x.PreferredDuringSchedulingIgnoredDuringExecution), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodAffinity) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodAffinity) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "requiredDuringSchedulingIgnoredDuringExecution":
+ if r.TryDecodeAsNil() {
+ x.RequiredDuringSchedulingIgnoredDuringExecution = nil
+ } else {
+ yyv4 := &x.RequiredDuringSchedulingIgnoredDuringExecution
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSlicePodAffinityTerm((*[]PodAffinityTerm)(yyv4), d)
+ }
+ }
+ case "preferredDuringSchedulingIgnoredDuringExecution":
+ if r.TryDecodeAsNil() {
+ x.PreferredDuringSchedulingIgnoredDuringExecution = nil
+ } else {
+ yyv6 := &x.PreferredDuringSchedulingIgnoredDuringExecution
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceWeightedPodAffinityTerm((*[]WeightedPodAffinityTerm)(yyv6), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodAffinity) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RequiredDuringSchedulingIgnoredDuringExecution = nil
+ } else {
+ yyv9 := &x.RequiredDuringSchedulingIgnoredDuringExecution
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSlicePodAffinityTerm((*[]PodAffinityTerm)(yyv9), d)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PreferredDuringSchedulingIgnoredDuringExecution = nil
+ } else {
+ yyv11 := &x.PreferredDuringSchedulingIgnoredDuringExecution
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceWeightedPodAffinityTerm((*[]WeightedPodAffinityTerm)(yyv11), d)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodAntiAffinity) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.RequiredDuringSchedulingIgnoredDuringExecution) != 0
+ yyq2[1] = len(x.PreferredDuringSchedulingIgnoredDuringExecution) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.RequiredDuringSchedulingIgnoredDuringExecution == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSlicePodAffinityTerm(([]PodAffinityTerm)(x.RequiredDuringSchedulingIgnoredDuringExecution), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("requiredDuringSchedulingIgnoredDuringExecution"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RequiredDuringSchedulingIgnoredDuringExecution == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSlicePodAffinityTerm(([]PodAffinityTerm)(x.RequiredDuringSchedulingIgnoredDuringExecution), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.PreferredDuringSchedulingIgnoredDuringExecution == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceWeightedPodAffinityTerm(([]WeightedPodAffinityTerm)(x.PreferredDuringSchedulingIgnoredDuringExecution), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("preferredDuringSchedulingIgnoredDuringExecution"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PreferredDuringSchedulingIgnoredDuringExecution == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceWeightedPodAffinityTerm(([]WeightedPodAffinityTerm)(x.PreferredDuringSchedulingIgnoredDuringExecution), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodAntiAffinity) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodAntiAffinity) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "requiredDuringSchedulingIgnoredDuringExecution":
+ if r.TryDecodeAsNil() {
+ x.RequiredDuringSchedulingIgnoredDuringExecution = nil
+ } else {
+ yyv4 := &x.RequiredDuringSchedulingIgnoredDuringExecution
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSlicePodAffinityTerm((*[]PodAffinityTerm)(yyv4), d)
+ }
+ }
+ case "preferredDuringSchedulingIgnoredDuringExecution":
+ if r.TryDecodeAsNil() {
+ x.PreferredDuringSchedulingIgnoredDuringExecution = nil
+ } else {
+ yyv6 := &x.PreferredDuringSchedulingIgnoredDuringExecution
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceWeightedPodAffinityTerm((*[]WeightedPodAffinityTerm)(yyv6), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodAntiAffinity) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RequiredDuringSchedulingIgnoredDuringExecution = nil
+ } else {
+ yyv9 := &x.RequiredDuringSchedulingIgnoredDuringExecution
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSlicePodAffinityTerm((*[]PodAffinityTerm)(yyv9), d)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PreferredDuringSchedulingIgnoredDuringExecution = nil
+ } else {
+ yyv11 := &x.PreferredDuringSchedulingIgnoredDuringExecution
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceWeightedPodAffinityTerm((*[]WeightedPodAffinityTerm)(yyv11), d)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *WeightedPodAffinityTerm) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Weight))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("weight"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Weight))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy7 := &x.PodAffinityTerm
+ yy7.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podAffinityTerm"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.PodAffinityTerm
+ yy9.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *WeightedPodAffinityTerm) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *WeightedPodAffinityTerm) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "weight":
+ if r.TryDecodeAsNil() {
+ x.Weight = 0
+ } else {
+ yyv4 := &x.Weight
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(yyv4)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "podAffinityTerm":
+ if r.TryDecodeAsNil() {
+ x.PodAffinityTerm = PodAffinityTerm{}
+ } else {
+ yyv6 := &x.PodAffinityTerm
+ yyv6.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *WeightedPodAffinityTerm) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Weight = 0
+ } else {
+ yyv8 := &x.Weight
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PodAffinityTerm = PodAffinityTerm{}
+ } else {
+ yyv10 := &x.PodAffinityTerm
+ yyv10.CodecDecodeSelf(d)
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodAffinityTerm) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.LabelSelector != nil
+ yyq2[1] = len(x.Namespaces) != 0
+ yyq2[2] = x.TopologyKey != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.LabelSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.LabelSelector) {
+ } else {
+ z.EncFallback(x.LabelSelector)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("labelSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.LabelSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.LabelSelector) {
+ } else {
+ z.EncFallback(x.LabelSelector)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Namespaces == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Namespaces, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("namespaces"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Namespaces == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Namespaces, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.TopologyKey))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("topologyKey"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.TopologyKey))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodAffinityTerm) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodAffinityTerm) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "labelSelector":
+ if r.TryDecodeAsNil() {
+ if x.LabelSelector != nil {
+ x.LabelSelector = nil
+ }
+ } else {
+ if x.LabelSelector == nil {
+ x.LabelSelector = new(pkg2_v1.LabelSelector)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.LabelSelector) {
+ } else {
+ z.DecFallback(x.LabelSelector, false)
+ }
+ }
+ case "namespaces":
+ if r.TryDecodeAsNil() {
+ x.Namespaces = nil
+ } else {
+ yyv6 := &x.Namespaces
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv6, false, d)
+ }
+ }
+ case "topologyKey":
+ if r.TryDecodeAsNil() {
+ x.TopologyKey = ""
+ } else {
+ yyv8 := &x.TopologyKey
+ 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_containerMapEnd1234)
+}
+
+func (x *PodAffinityTerm) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.LabelSelector != nil {
+ x.LabelSelector = nil
+ }
+ } else {
+ if x.LabelSelector == nil {
+ x.LabelSelector = new(pkg2_v1.LabelSelector)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.LabelSelector) {
+ } else {
+ z.DecFallback(x.LabelSelector, false)
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Namespaces = nil
+ } else {
+ yyv13 := &x.Namespaces
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv13, false, d)
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TopologyKey = ""
+ } else {
+ yyv15 := &x.TopologyKey
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NodeAffinity) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.RequiredDuringSchedulingIgnoredDuringExecution != nil
+ yyq2[1] = len(x.PreferredDuringSchedulingIgnoredDuringExecution) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.RequiredDuringSchedulingIgnoredDuringExecution == nil {
+ r.EncodeNil()
+ } else {
+ x.RequiredDuringSchedulingIgnoredDuringExecution.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("requiredDuringSchedulingIgnoredDuringExecution"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RequiredDuringSchedulingIgnoredDuringExecution == nil {
+ r.EncodeNil()
+ } else {
+ x.RequiredDuringSchedulingIgnoredDuringExecution.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.PreferredDuringSchedulingIgnoredDuringExecution == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSlicePreferredSchedulingTerm(([]PreferredSchedulingTerm)(x.PreferredDuringSchedulingIgnoredDuringExecution), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("preferredDuringSchedulingIgnoredDuringExecution"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PreferredDuringSchedulingIgnoredDuringExecution == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSlicePreferredSchedulingTerm(([]PreferredSchedulingTerm)(x.PreferredDuringSchedulingIgnoredDuringExecution), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NodeAffinity) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NodeAffinity) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "requiredDuringSchedulingIgnoredDuringExecution":
+ if r.TryDecodeAsNil() {
+ if x.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ x.RequiredDuringSchedulingIgnoredDuringExecution = nil
+ }
+ } else {
+ if x.RequiredDuringSchedulingIgnoredDuringExecution == nil {
+ x.RequiredDuringSchedulingIgnoredDuringExecution = new(NodeSelector)
+ }
+ x.RequiredDuringSchedulingIgnoredDuringExecution.CodecDecodeSelf(d)
+ }
+ case "preferredDuringSchedulingIgnoredDuringExecution":
+ if r.TryDecodeAsNil() {
+ x.PreferredDuringSchedulingIgnoredDuringExecution = nil
+ } else {
+ yyv5 := &x.PreferredDuringSchedulingIgnoredDuringExecution
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSlicePreferredSchedulingTerm((*[]PreferredSchedulingTerm)(yyv5), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NodeAffinity) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ x.RequiredDuringSchedulingIgnoredDuringExecution = nil
+ }
+ } else {
+ if x.RequiredDuringSchedulingIgnoredDuringExecution == nil {
+ x.RequiredDuringSchedulingIgnoredDuringExecution = new(NodeSelector)
+ }
+ x.RequiredDuringSchedulingIgnoredDuringExecution.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PreferredDuringSchedulingIgnoredDuringExecution = nil
+ } else {
+ yyv9 := &x.PreferredDuringSchedulingIgnoredDuringExecution
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSlicePreferredSchedulingTerm((*[]PreferredSchedulingTerm)(yyv9), d)
+ }
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PreferredSchedulingTerm) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Weight))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("weight"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Weight))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy7 := &x.Preference
+ yy7.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("preference"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.Preference
+ yy9.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PreferredSchedulingTerm) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PreferredSchedulingTerm) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "weight":
+ if r.TryDecodeAsNil() {
+ x.Weight = 0
+ } else {
+ yyv4 := &x.Weight
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(yyv4)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "preference":
+ if r.TryDecodeAsNil() {
+ x.Preference = NodeSelectorTerm{}
+ } else {
+ yyv6 := &x.Preference
+ yyv6.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PreferredSchedulingTerm) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Weight = 0
+ } else {
+ yyv8 := &x.Weight
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Preference = NodeSelectorTerm{}
+ } else {
+ yyv10 := &x.Preference
+ yyv10.CodecDecodeSelf(d)
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Taint) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.Value != ""
+ yyq2[3] = true
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Key))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("key"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Key))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Value))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("value"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Value))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Effect.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("effect"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Effect.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yy13 := &x.TimeAdded
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy13) {
+ } else if yym14 {
+ z.EncBinaryMarshal(yy13)
+ } else if !yym14 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy13)
+ } else {
+ z.EncFallback(yy13)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("timeAdded"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy15 := &x.TimeAdded
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy15) {
+ } else if yym16 {
+ z.EncBinaryMarshal(yy15)
+ } else if !yym16 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy15)
+ } else {
+ z.EncFallback(yy15)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Taint) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Taint) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "key":
+ if r.TryDecodeAsNil() {
+ x.Key = ""
+ } else {
+ yyv4 := &x.Key
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "value":
+ if r.TryDecodeAsNil() {
+ x.Value = ""
+ } else {
+ yyv6 := &x.Value
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "effect":
+ if r.TryDecodeAsNil() {
+ x.Effect = ""
+ } else {
+ yyv8 := &x.Effect
+ yyv8.CodecDecodeSelf(d)
+ }
+ case "timeAdded":
+ if r.TryDecodeAsNil() {
+ x.TimeAdded = pkg2_v1.Time{}
+ } else {
+ yyv9 := &x.TimeAdded
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv9) {
+ } else if yym10 {
+ z.DecBinaryUnmarshal(yyv9)
+ } else if !yym10 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv9)
+ } else {
+ z.DecFallback(yyv9, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Taint) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Key = ""
+ } else {
+ yyv12 := &x.Key
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Value = ""
+ } else {
+ yyv14 := &x.Value
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Effect = ""
+ } else {
+ yyv16 := &x.Effect
+ yyv16.CodecDecodeSelf(d)
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TimeAdded = pkg2_v1.Time{}
+ } else {
+ yyv17 := &x.TimeAdded
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv17) {
+ } else if yym18 {
+ z.DecBinaryUnmarshal(yyv17)
+ } else if !yym18 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv17)
+ } else {
+ z.DecFallback(yyv17, false)
+ }
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x TaintEffect) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *TaintEffect) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *Toleration) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Key != ""
+ yyq2[1] = x.Operator != ""
+ yyq2[2] = x.Value != ""
+ yyq2[3] = x.Effect != ""
+ yyq2[4] = x.TolerationSeconds != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Key))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("key"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Key))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ x.Operator.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("operator"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Operator.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Value))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("value"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Value))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ x.Effect.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("effect"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Effect.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.TolerationSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy16 := *x.TolerationSeconds
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(yy16))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("tolerationSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TolerationSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy18 := *x.TolerationSeconds
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeInt(int64(yy18))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Toleration) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Toleration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "key":
+ if r.TryDecodeAsNil() {
+ x.Key = ""
+ } else {
+ yyv4 := &x.Key
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "operator":
+ if r.TryDecodeAsNil() {
+ x.Operator = ""
+ } else {
+ yyv6 := &x.Operator
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "value":
+ if r.TryDecodeAsNil() {
+ x.Value = ""
+ } else {
+ yyv7 := &x.Value
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*string)(yyv7)) = r.DecodeString()
+ }
+ }
+ case "effect":
+ if r.TryDecodeAsNil() {
+ x.Effect = ""
+ } else {
+ yyv9 := &x.Effect
+ yyv9.CodecDecodeSelf(d)
+ }
+ case "tolerationSeconds":
+ if r.TryDecodeAsNil() {
+ if x.TolerationSeconds != nil {
+ x.TolerationSeconds = nil
+ }
+ } else {
+ if x.TolerationSeconds == nil {
+ x.TolerationSeconds = new(int64)
+ }
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int64)(x.TolerationSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Toleration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Key = ""
+ } else {
+ yyv13 := &x.Key
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Operator = ""
+ } else {
+ yyv15 := &x.Operator
+ yyv15.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Value = ""
+ } else {
+ yyv16 := &x.Value
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Effect = ""
+ } else {
+ yyv18 := &x.Effect
+ yyv18.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.TolerationSeconds != nil {
+ x.TolerationSeconds = nil
+ }
+ } else {
+ if x.TolerationSeconds == nil {
+ x.TolerationSeconds = new(int64)
+ }
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*int64)(x.TolerationSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x TolerationOperator) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *TolerationOperator) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [23]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = len(x.Volumes) != 0
+ yyq2[1] = len(x.InitContainers) != 0
+ yyq2[3] = x.RestartPolicy != ""
+ yyq2[4] = x.TerminationGracePeriodSeconds != nil
+ yyq2[5] = x.ActiveDeadlineSeconds != nil
+ yyq2[6] = x.DNSPolicy != ""
+ yyq2[7] = len(x.NodeSelector) != 0
+ yyq2[8] = x.ServiceAccountName != ""
+ yyq2[9] = x.DeprecatedServiceAccount != ""
+ yyq2[10] = x.AutomountServiceAccountToken != nil
+ yyq2[11] = x.NodeName != ""
+ yyq2[12] = x.HostNetwork != false
+ yyq2[13] = x.HostPID != false
+ yyq2[14] = x.HostIPC != false
+ yyq2[15] = x.SecurityContext != nil
+ yyq2[16] = len(x.ImagePullSecrets) != 0
+ yyq2[17] = x.Hostname != ""
+ yyq2[18] = x.Subdomain != ""
+ yyq2[19] = x.Affinity != nil
+ yyq2[20] = x.SchedulerName != ""
+ yyq2[21] = len(x.Tolerations) != 0
+ yyq2[22] = len(x.HostAliases) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(23)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Volumes == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceVolume(([]Volume)(x.Volumes), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Volumes == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceVolume(([]Volume)(x.Volumes), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.InitContainers == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceContainer(([]Container)(x.InitContainers), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("initContainers"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.InitContainers == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceContainer(([]Container)(x.InitContainers), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Containers == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceContainer(([]Container)(x.Containers), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("containers"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Containers == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.encSliceContainer(([]Container)(x.Containers), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ x.RestartPolicy.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("restartPolicy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.RestartPolicy.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.TerminationGracePeriodSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy16 := *x.TerminationGracePeriodSeconds
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(yy16))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("terminationGracePeriodSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TerminationGracePeriodSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy18 := *x.TerminationGracePeriodSeconds
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeInt(int64(yy18))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.ActiveDeadlineSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy21 := *x.ActiveDeadlineSeconds
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeInt(int64(yy21))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("activeDeadlineSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ActiveDeadlineSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy23 := *x.ActiveDeadlineSeconds
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else {
+ r.EncodeInt(int64(yy23))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ x.DNSPolicy.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("dnsPolicy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.DNSPolicy.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.NodeSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym29 := z.EncBinary()
+ _ = yym29
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.NodeSelector, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nodeSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NodeSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym30 := z.EncBinary()
+ _ = yym30
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.NodeSelector, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ yym32 := z.EncBinary()
+ _ = yym32
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("serviceAccountName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym33 := z.EncBinary()
+ _ = yym33
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ yym35 := z.EncBinary()
+ _ = yym35
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DeprecatedServiceAccount))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("serviceAccount"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym36 := z.EncBinary()
+ _ = yym36
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DeprecatedServiceAccount))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[10] {
+ if x.AutomountServiceAccountToken == nil {
+ r.EncodeNil()
+ } else {
+ yy38 := *x.AutomountServiceAccountToken
+ yym39 := z.EncBinary()
+ _ = yym39
+ if false {
+ } else {
+ r.EncodeBool(bool(yy38))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[10] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("automountServiceAccountToken"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.AutomountServiceAccountToken == nil {
+ r.EncodeNil()
+ } else {
+ yy40 := *x.AutomountServiceAccountToken
+ yym41 := z.EncBinary()
+ _ = yym41
+ if false {
+ } else {
+ r.EncodeBool(bool(yy40))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[11] {
+ yym43 := z.EncBinary()
+ _ = yym43
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.NodeName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[11] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nodeName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym44 := z.EncBinary()
+ _ = yym44
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.NodeName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[12] {
+ yym46 := z.EncBinary()
+ _ = yym46
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostNetwork))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[12] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostNetwork"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym47 := z.EncBinary()
+ _ = yym47
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostNetwork))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[13] {
+ yym49 := z.EncBinary()
+ _ = yym49
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostPID))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[13] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostPID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym50 := z.EncBinary()
+ _ = yym50
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostPID))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[14] {
+ yym52 := z.EncBinary()
+ _ = yym52
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostIPC))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[14] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostIPC"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym53 := z.EncBinary()
+ _ = yym53
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostIPC))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[15] {
+ if x.SecurityContext == nil {
+ r.EncodeNil()
+ } else {
+ x.SecurityContext.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[15] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("securityContext"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SecurityContext == nil {
+ r.EncodeNil()
+ } else {
+ x.SecurityContext.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[16] {
+ if x.ImagePullSecrets == nil {
+ r.EncodeNil()
+ } else {
+ yym58 := z.EncBinary()
+ _ = yym58
+ if false {
+ } else {
+ h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[16] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("imagePullSecrets"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ImagePullSecrets == nil {
+ r.EncodeNil()
+ } else {
+ yym59 := z.EncBinary()
+ _ = yym59
+ if false {
+ } else {
+ h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[17] {
+ yym61 := z.EncBinary()
+ _ = yym61
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Hostname))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[17] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostname"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym62 := z.EncBinary()
+ _ = yym62
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Hostname))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[18] {
+ yym64 := z.EncBinary()
+ _ = yym64
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Subdomain))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[18] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("subdomain"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym65 := z.EncBinary()
+ _ = yym65
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Subdomain))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[19] {
+ if x.Affinity == nil {
+ r.EncodeNil()
+ } else {
+ x.Affinity.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[19] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("affinity"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Affinity == nil {
+ r.EncodeNil()
+ } else {
+ x.Affinity.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[20] {
+ yym70 := z.EncBinary()
+ _ = yym70
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[20] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("schedulerName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym71 := z.EncBinary()
+ _ = yym71
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[21] {
+ if x.Tolerations == nil {
+ r.EncodeNil()
+ } else {
+ yym73 := z.EncBinary()
+ _ = yym73
+ if false {
+ } else {
+ h.encSliceToleration(([]Toleration)(x.Tolerations), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[21] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("tolerations"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Tolerations == nil {
+ r.EncodeNil()
+ } else {
+ yym74 := z.EncBinary()
+ _ = yym74
+ if false {
+ } else {
+ h.encSliceToleration(([]Toleration)(x.Tolerations), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[22] {
+ if x.HostAliases == nil {
+ r.EncodeNil()
+ } else {
+ yym76 := z.EncBinary()
+ _ = yym76
+ if false {
+ } else {
+ h.encSliceHostAlias(([]HostAlias)(x.HostAliases), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[22] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostAliases"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.HostAliases == nil {
+ r.EncodeNil()
+ } else {
+ yym77 := z.EncBinary()
+ _ = yym77
+ if false {
+ } else {
+ h.encSliceHostAlias(([]HostAlias)(x.HostAliases), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "volumes":
+ if r.TryDecodeAsNil() {
+ x.Volumes = nil
+ } else {
+ yyv4 := &x.Volumes
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceVolume((*[]Volume)(yyv4), d)
+ }
+ }
+ case "initContainers":
+ if r.TryDecodeAsNil() {
+ x.InitContainers = nil
+ } else {
+ yyv6 := &x.InitContainers
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceContainer((*[]Container)(yyv6), d)
+ }
+ }
+ case "containers":
+ if r.TryDecodeAsNil() {
+ x.Containers = nil
+ } else {
+ yyv8 := &x.Containers
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.decSliceContainer((*[]Container)(yyv8), d)
+ }
+ }
+ case "restartPolicy":
+ if r.TryDecodeAsNil() {
+ x.RestartPolicy = ""
+ } else {
+ yyv10 := &x.RestartPolicy
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "terminationGracePeriodSeconds":
+ if r.TryDecodeAsNil() {
+ if x.TerminationGracePeriodSeconds != nil {
+ x.TerminationGracePeriodSeconds = nil
+ }
+ } else {
+ if x.TerminationGracePeriodSeconds == nil {
+ x.TerminationGracePeriodSeconds = new(int64)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int64)(x.TerminationGracePeriodSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "activeDeadlineSeconds":
+ if r.TryDecodeAsNil() {
+ if x.ActiveDeadlineSeconds != nil {
+ x.ActiveDeadlineSeconds = nil
+ }
+ } else {
+ if x.ActiveDeadlineSeconds == nil {
+ x.ActiveDeadlineSeconds = new(int64)
+ }
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "dnsPolicy":
+ if r.TryDecodeAsNil() {
+ x.DNSPolicy = ""
+ } else {
+ yyv15 := &x.DNSPolicy
+ yyv15.CodecDecodeSelf(d)
+ }
+ case "nodeSelector":
+ if r.TryDecodeAsNil() {
+ x.NodeSelector = nil
+ } else {
+ yyv16 := &x.NodeSelector
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv16, false, d)
+ }
+ }
+ case "serviceAccountName":
+ if r.TryDecodeAsNil() {
+ x.ServiceAccountName = ""
+ } else {
+ yyv18 := &x.ServiceAccountName
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*string)(yyv18)) = r.DecodeString()
+ }
+ }
+ case "serviceAccount":
+ if r.TryDecodeAsNil() {
+ x.DeprecatedServiceAccount = ""
+ } else {
+ yyv20 := &x.DeprecatedServiceAccount
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ *((*string)(yyv20)) = r.DecodeString()
+ }
+ }
+ case "automountServiceAccountToken":
+ if r.TryDecodeAsNil() {
+ if x.AutomountServiceAccountToken != nil {
+ x.AutomountServiceAccountToken = nil
+ }
+ } else {
+ if x.AutomountServiceAccountToken == nil {
+ x.AutomountServiceAccountToken = new(bool)
+ }
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else {
+ *((*bool)(x.AutomountServiceAccountToken)) = r.DecodeBool()
+ }
+ }
+ case "nodeName":
+ if r.TryDecodeAsNil() {
+ x.NodeName = ""
+ } else {
+ yyv24 := &x.NodeName
+ yym25 := z.DecBinary()
+ _ = yym25
+ if false {
+ } else {
+ *((*string)(yyv24)) = r.DecodeString()
+ }
+ }
+ case "hostNetwork":
+ if r.TryDecodeAsNil() {
+ x.HostNetwork = false
+ } else {
+ yyv26 := &x.HostNetwork
+ yym27 := z.DecBinary()
+ _ = yym27
+ if false {
+ } else {
+ *((*bool)(yyv26)) = r.DecodeBool()
+ }
+ }
+ case "hostPID":
+ if r.TryDecodeAsNil() {
+ x.HostPID = false
+ } else {
+ yyv28 := &x.HostPID
+ yym29 := z.DecBinary()
+ _ = yym29
+ if false {
+ } else {
+ *((*bool)(yyv28)) = r.DecodeBool()
+ }
+ }
+ case "hostIPC":
+ if r.TryDecodeAsNil() {
+ x.HostIPC = false
+ } else {
+ yyv30 := &x.HostIPC
+ yym31 := z.DecBinary()
+ _ = yym31
+ if false {
+ } else {
+ *((*bool)(yyv30)) = r.DecodeBool()
+ }
+ }
+ case "securityContext":
+ if r.TryDecodeAsNil() {
+ if x.SecurityContext != nil {
+ x.SecurityContext = nil
+ }
+ } else {
+ if x.SecurityContext == nil {
+ x.SecurityContext = new(PodSecurityContext)
+ }
+ x.SecurityContext.CodecDecodeSelf(d)
+ }
+ case "imagePullSecrets":
+ if r.TryDecodeAsNil() {
+ x.ImagePullSecrets = nil
+ } else {
+ yyv33 := &x.ImagePullSecrets
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv33), d)
+ }
+ }
+ case "hostname":
+ if r.TryDecodeAsNil() {
+ x.Hostname = ""
+ } else {
+ yyv35 := &x.Hostname
+ yym36 := z.DecBinary()
+ _ = yym36
+ if false {
+ } else {
+ *((*string)(yyv35)) = r.DecodeString()
+ }
+ }
+ case "subdomain":
+ if r.TryDecodeAsNil() {
+ x.Subdomain = ""
+ } else {
+ yyv37 := &x.Subdomain
+ yym38 := z.DecBinary()
+ _ = yym38
+ if false {
+ } else {
+ *((*string)(yyv37)) = r.DecodeString()
+ }
+ }
+ case "affinity":
+ if r.TryDecodeAsNil() {
+ if x.Affinity != nil {
+ x.Affinity = nil
+ }
+ } else {
+ if x.Affinity == nil {
+ x.Affinity = new(Affinity)
+ }
+ x.Affinity.CodecDecodeSelf(d)
+ }
+ case "schedulerName":
+ if r.TryDecodeAsNil() {
+ x.SchedulerName = ""
+ } else {
+ yyv40 := &x.SchedulerName
+ yym41 := z.DecBinary()
+ _ = yym41
+ if false {
+ } else {
+ *((*string)(yyv40)) = r.DecodeString()
+ }
+ }
+ case "tolerations":
+ if r.TryDecodeAsNil() {
+ x.Tolerations = nil
+ } else {
+ yyv42 := &x.Tolerations
+ yym43 := z.DecBinary()
+ _ = yym43
+ if false {
+ } else {
+ h.decSliceToleration((*[]Toleration)(yyv42), d)
+ }
+ }
+ case "hostAliases":
+ if r.TryDecodeAsNil() {
+ x.HostAliases = nil
+ } else {
+ yyv44 := &x.HostAliases
+ yym45 := z.DecBinary()
+ _ = yym45
+ if false {
+ } else {
+ h.decSliceHostAlias((*[]HostAlias)(yyv44), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj46 int
+ var yyb46 bool
+ var yyhl46 bool = l >= 0
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Volumes = nil
+ } else {
+ yyv47 := &x.Volumes
+ yym48 := z.DecBinary()
+ _ = yym48
+ if false {
+ } else {
+ h.decSliceVolume((*[]Volume)(yyv47), d)
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.InitContainers = nil
+ } else {
+ yyv49 := &x.InitContainers
+ yym50 := z.DecBinary()
+ _ = yym50
+ if false {
+ } else {
+ h.decSliceContainer((*[]Container)(yyv49), d)
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Containers = nil
+ } else {
+ yyv51 := &x.Containers
+ yym52 := z.DecBinary()
+ _ = yym52
+ if false {
+ } else {
+ h.decSliceContainer((*[]Container)(yyv51), d)
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RestartPolicy = ""
+ } else {
+ yyv53 := &x.RestartPolicy
+ yyv53.CodecDecodeSelf(d)
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.TerminationGracePeriodSeconds != nil {
+ x.TerminationGracePeriodSeconds = nil
+ }
+ } else {
+ if x.TerminationGracePeriodSeconds == nil {
+ x.TerminationGracePeriodSeconds = new(int64)
+ }
+ yym55 := z.DecBinary()
+ _ = yym55
+ if false {
+ } else {
+ *((*int64)(x.TerminationGracePeriodSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ActiveDeadlineSeconds != nil {
+ x.ActiveDeadlineSeconds = nil
+ }
+ } else {
+ if x.ActiveDeadlineSeconds == nil {
+ x.ActiveDeadlineSeconds = new(int64)
+ }
+ yym57 := z.DecBinary()
+ _ = yym57
+ if false {
+ } else {
+ *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DNSPolicy = ""
+ } else {
+ yyv58 := &x.DNSPolicy
+ yyv58.CodecDecodeSelf(d)
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NodeSelector = nil
+ } else {
+ yyv59 := &x.NodeSelector
+ yym60 := z.DecBinary()
+ _ = yym60
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv59, false, d)
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ServiceAccountName = ""
+ } else {
+ yyv61 := &x.ServiceAccountName
+ yym62 := z.DecBinary()
+ _ = yym62
+ if false {
+ } else {
+ *((*string)(yyv61)) = r.DecodeString()
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DeprecatedServiceAccount = ""
+ } else {
+ yyv63 := &x.DeprecatedServiceAccount
+ yym64 := z.DecBinary()
+ _ = yym64
+ if false {
+ } else {
+ *((*string)(yyv63)) = r.DecodeString()
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.AutomountServiceAccountToken != nil {
+ x.AutomountServiceAccountToken = nil
+ }
+ } else {
+ if x.AutomountServiceAccountToken == nil {
+ x.AutomountServiceAccountToken = new(bool)
+ }
+ yym66 := z.DecBinary()
+ _ = yym66
+ if false {
+ } else {
+ *((*bool)(x.AutomountServiceAccountToken)) = r.DecodeBool()
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NodeName = ""
+ } else {
+ yyv67 := &x.NodeName
+ yym68 := z.DecBinary()
+ _ = yym68
+ if false {
+ } else {
+ *((*string)(yyv67)) = r.DecodeString()
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostNetwork = false
+ } else {
+ yyv69 := &x.HostNetwork
+ yym70 := z.DecBinary()
+ _ = yym70
+ if false {
+ } else {
+ *((*bool)(yyv69)) = r.DecodeBool()
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostPID = false
+ } else {
+ yyv71 := &x.HostPID
+ yym72 := z.DecBinary()
+ _ = yym72
+ if false {
+ } else {
+ *((*bool)(yyv71)) = r.DecodeBool()
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostIPC = false
+ } else {
+ yyv73 := &x.HostIPC
+ yym74 := z.DecBinary()
+ _ = yym74
+ if false {
+ } else {
+ *((*bool)(yyv73)) = r.DecodeBool()
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SecurityContext != nil {
+ x.SecurityContext = nil
+ }
+ } else {
+ if x.SecurityContext == nil {
+ x.SecurityContext = new(PodSecurityContext)
+ }
+ x.SecurityContext.CodecDecodeSelf(d)
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ImagePullSecrets = nil
+ } else {
+ yyv76 := &x.ImagePullSecrets
+ yym77 := z.DecBinary()
+ _ = yym77
+ if false {
+ } else {
+ h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv76), d)
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Hostname = ""
+ } else {
+ yyv78 := &x.Hostname
+ yym79 := z.DecBinary()
+ _ = yym79
+ if false {
+ } else {
+ *((*string)(yyv78)) = r.DecodeString()
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Subdomain = ""
+ } else {
+ yyv80 := &x.Subdomain
+ yym81 := z.DecBinary()
+ _ = yym81
+ if false {
+ } else {
+ *((*string)(yyv80)) = r.DecodeString()
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Affinity != nil {
+ x.Affinity = nil
+ }
+ } else {
+ if x.Affinity == nil {
+ x.Affinity = new(Affinity)
+ }
+ x.Affinity.CodecDecodeSelf(d)
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SchedulerName = ""
+ } else {
+ yyv83 := &x.SchedulerName
+ yym84 := z.DecBinary()
+ _ = yym84
+ if false {
+ } else {
+ *((*string)(yyv83)) = r.DecodeString()
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Tolerations = nil
+ } else {
+ yyv85 := &x.Tolerations
+ yym86 := z.DecBinary()
+ _ = yym86
+ if false {
+ } else {
+ h.decSliceToleration((*[]Toleration)(yyv85), d)
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostAliases = nil
+ } else {
+ yyv87 := &x.HostAliases
+ yym88 := z.DecBinary()
+ _ = yym88
+ if false {
+ } else {
+ h.decSliceHostAlias((*[]HostAlias)(yyv87), d)
+ }
+ }
+ for {
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj46-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *HostAlias) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.IP != ""
+ yyq2[1] = len(x.Hostnames) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.IP))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ip"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.IP))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Hostnames == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Hostnames, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostnames"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Hostnames == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Hostnames, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HostAlias) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HostAlias) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "ip":
+ if r.TryDecodeAsNil() {
+ x.IP = ""
+ } else {
+ yyv4 := &x.IP
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "hostnames":
+ if r.TryDecodeAsNil() {
+ x.Hostnames = nil
+ } else {
+ yyv6 := &x.Hostnames
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv6, false, d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HostAlias) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.IP = ""
+ } else {
+ yyv9 := &x.IP
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Hostnames = nil
+ } else {
+ yyv11 := &x.Hostnames
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv11, false, d)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodSecurityContext) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.SELinuxOptions != nil
+ yyq2[1] = x.RunAsUser != nil
+ yyq2[2] = x.RunAsNonRoot != nil
+ yyq2[3] = len(x.SupplementalGroups) != 0
+ yyq2[4] = x.FSGroup != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.SELinuxOptions == nil {
+ r.EncodeNil()
+ } else {
+ x.SELinuxOptions.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("seLinuxOptions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SELinuxOptions == nil {
+ r.EncodeNil()
+ } else {
+ x.SELinuxOptions.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.RunAsUser == nil {
+ r.EncodeNil()
+ } else {
+ yy7 := *x.RunAsUser
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(yy7))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("runAsUser"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RunAsUser == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.RunAsUser
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(yy9))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.RunAsNonRoot == nil {
+ r.EncodeNil()
+ } else {
+ yy12 := *x.RunAsNonRoot
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(yy12))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("runAsNonRoot"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RunAsNonRoot == nil {
+ r.EncodeNil()
+ } else {
+ yy14 := *x.RunAsNonRoot
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeBool(bool(yy14))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.SupplementalGroups == nil {
+ r.EncodeNil()
+ } else {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ z.F.EncSliceInt64V(x.SupplementalGroups, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("supplementalGroups"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SupplementalGroups == nil {
+ r.EncodeNil()
+ } else {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ z.F.EncSliceInt64V(x.SupplementalGroups, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.FSGroup == nil {
+ r.EncodeNil()
+ } else {
+ yy20 := *x.FSGroup
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeInt(int64(yy20))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsGroup"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.FSGroup == nil {
+ r.EncodeNil()
+ } else {
+ yy22 := *x.FSGroup
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeInt(int64(yy22))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodSecurityContext) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodSecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "seLinuxOptions":
+ if r.TryDecodeAsNil() {
+ if x.SELinuxOptions != nil {
+ x.SELinuxOptions = nil
+ }
+ } else {
+ if x.SELinuxOptions == nil {
+ x.SELinuxOptions = new(SELinuxOptions)
+ }
+ x.SELinuxOptions.CodecDecodeSelf(d)
+ }
+ case "runAsUser":
+ if r.TryDecodeAsNil() {
+ if x.RunAsUser != nil {
+ x.RunAsUser = nil
+ }
+ } else {
+ if x.RunAsUser == nil {
+ x.RunAsUser = new(int64)
+ }
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*int64)(x.RunAsUser)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "runAsNonRoot":
+ if r.TryDecodeAsNil() {
+ if x.RunAsNonRoot != nil {
+ x.RunAsNonRoot = nil
+ }
+ } else {
+ if x.RunAsNonRoot == nil {
+ x.RunAsNonRoot = new(bool)
+ }
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*bool)(x.RunAsNonRoot)) = r.DecodeBool()
+ }
+ }
+ case "supplementalGroups":
+ if r.TryDecodeAsNil() {
+ x.SupplementalGroups = nil
+ } else {
+ yyv9 := &x.SupplementalGroups
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.DecSliceInt64X(yyv9, false, d)
+ }
+ }
+ case "fsGroup":
+ if r.TryDecodeAsNil() {
+ if x.FSGroup != nil {
+ x.FSGroup = nil
+ }
+ } else {
+ if x.FSGroup == nil {
+ x.FSGroup = new(int64)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int64)(x.FSGroup)) = int64(r.DecodeInt(64))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodSecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SELinuxOptions != nil {
+ x.SELinuxOptions = nil
+ }
+ } else {
+ if x.SELinuxOptions == nil {
+ x.SELinuxOptions = new(SELinuxOptions)
+ }
+ x.SELinuxOptions.CodecDecodeSelf(d)
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RunAsUser != nil {
+ x.RunAsUser = nil
+ }
+ } else {
+ if x.RunAsUser == nil {
+ x.RunAsUser = new(int64)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*int64)(x.RunAsUser)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RunAsNonRoot != nil {
+ x.RunAsNonRoot = nil
+ }
+ } else {
+ if x.RunAsNonRoot == nil {
+ x.RunAsNonRoot = new(bool)
+ }
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*bool)(x.RunAsNonRoot)) = r.DecodeBool()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SupplementalGroups = nil
+ } else {
+ yyv19 := &x.SupplementalGroups
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ z.F.DecSliceInt64X(yyv19, false, d)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FSGroup != nil {
+ x.FSGroup = nil
+ }
+ } else {
+ if x.FSGroup == nil {
+ x.FSGroup = new(int64)
+ }
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int64)(x.FSGroup)) = int64(r.DecodeInt(64))
+ }
+ }
+ for {
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj13-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x PodQOSClass) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *PodQOSClass) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [10]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Phase != ""
+ yyq2[1] = len(x.Conditions) != 0
+ yyq2[2] = x.Message != ""
+ yyq2[3] = x.Reason != ""
+ yyq2[4] = x.HostIP != ""
+ yyq2[5] = x.PodIP != ""
+ yyq2[6] = x.StartTime != nil
+ yyq2[7] = len(x.InitContainerStatuses) != 0
+ yyq2[8] = len(x.ContainerStatuses) != 0
+ yyq2[9] = x.QOSClass != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(10)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ x.Phase.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("phase"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Phase.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSlicePodCondition(([]PodCondition)(x.Conditions), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("conditions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSlicePodCondition(([]PodCondition)(x.Conditions), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.HostIP))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostIP"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.HostIP))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.PodIP))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podIP"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.PodIP))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.StartTime == nil {
+ r.EncodeNil()
+ } else {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.StartTime) {
+ } else if yym22 {
+ z.EncBinaryMarshal(x.StartTime)
+ } else if !yym22 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.StartTime)
+ } else {
+ z.EncFallback(x.StartTime)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("startTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.StartTime == nil {
+ r.EncodeNil()
+ } else {
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.StartTime) {
+ } else if yym23 {
+ z.EncBinaryMarshal(x.StartTime)
+ } else if !yym23 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.StartTime)
+ } else {
+ z.EncFallback(x.StartTime)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.InitContainerStatuses == nil {
+ r.EncodeNil()
+ } else {
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ h.encSliceContainerStatus(([]ContainerStatus)(x.InitContainerStatuses), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("initContainerStatuses"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.InitContainerStatuses == nil {
+ r.EncodeNil()
+ } else {
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ h.encSliceContainerStatus(([]ContainerStatus)(x.InitContainerStatuses), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ if x.ContainerStatuses == nil {
+ r.EncodeNil()
+ } else {
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ h.encSliceContainerStatus(([]ContainerStatus)(x.ContainerStatuses), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("containerStatuses"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ContainerStatuses == nil {
+ r.EncodeNil()
+ } else {
+ yym29 := z.EncBinary()
+ _ = yym29
+ if false {
+ } else {
+ h.encSliceContainerStatus(([]ContainerStatus)(x.ContainerStatuses), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ x.QOSClass.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("qosClass"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.QOSClass.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "phase":
+ if r.TryDecodeAsNil() {
+ x.Phase = ""
+ } else {
+ yyv4 := &x.Phase
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "conditions":
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv5 := &x.Conditions
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSlicePodCondition((*[]PodCondition)(yyv5), d)
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv7 := &x.Message
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*string)(yyv7)) = r.DecodeString()
+ }
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv9 := &x.Reason
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ *((*string)(yyv9)) = r.DecodeString()
+ }
+ }
+ case "hostIP":
+ if r.TryDecodeAsNil() {
+ x.HostIP = ""
+ } else {
+ yyv11 := &x.HostIP
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*string)(yyv11)) = r.DecodeString()
+ }
+ }
+ case "podIP":
+ if r.TryDecodeAsNil() {
+ x.PodIP = ""
+ } else {
+ yyv13 := &x.PodIP
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ *((*string)(yyv13)) = r.DecodeString()
+ }
+ }
+ case "startTime":
+ if r.TryDecodeAsNil() {
+ if x.StartTime != nil {
+ x.StartTime = nil
+ }
+ } else {
+ if x.StartTime == nil {
+ x.StartTime = new(pkg2_v1.Time)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.StartTime) {
+ } else if yym16 {
+ z.DecBinaryUnmarshal(x.StartTime)
+ } else if !yym16 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.StartTime)
+ } else {
+ z.DecFallback(x.StartTime, false)
+ }
+ }
+ case "initContainerStatuses":
+ if r.TryDecodeAsNil() {
+ x.InitContainerStatuses = nil
+ } else {
+ yyv17 := &x.InitContainerStatuses
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ h.decSliceContainerStatus((*[]ContainerStatus)(yyv17), d)
+ }
+ }
+ case "containerStatuses":
+ if r.TryDecodeAsNil() {
+ x.ContainerStatuses = nil
+ } else {
+ yyv19 := &x.ContainerStatuses
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceContainerStatus((*[]ContainerStatus)(yyv19), d)
+ }
+ }
+ case "qosClass":
+ if r.TryDecodeAsNil() {
+ x.QOSClass = ""
+ } else {
+ yyv21 := &x.QOSClass
+ yyv21.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Phase = ""
+ } else {
+ yyv23 := &x.Phase
+ yyv23.CodecDecodeSelf(d)
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv24 := &x.Conditions
+ yym25 := z.DecBinary()
+ _ = yym25
+ if false {
+ } else {
+ h.decSlicePodCondition((*[]PodCondition)(yyv24), d)
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv26 := &x.Message
+ yym27 := z.DecBinary()
+ _ = yym27
+ if false {
+ } else {
+ *((*string)(yyv26)) = r.DecodeString()
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv28 := &x.Reason
+ yym29 := z.DecBinary()
+ _ = yym29
+ if false {
+ } else {
+ *((*string)(yyv28)) = r.DecodeString()
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostIP = ""
+ } else {
+ yyv30 := &x.HostIP
+ yym31 := z.DecBinary()
+ _ = yym31
+ if false {
+ } else {
+ *((*string)(yyv30)) = r.DecodeString()
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PodIP = ""
+ } else {
+ yyv32 := &x.PodIP
+ yym33 := z.DecBinary()
+ _ = yym33
+ if false {
+ } else {
+ *((*string)(yyv32)) = r.DecodeString()
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.StartTime != nil {
+ x.StartTime = nil
+ }
+ } else {
+ if x.StartTime == nil {
+ x.StartTime = new(pkg2_v1.Time)
+ }
+ yym35 := z.DecBinary()
+ _ = yym35
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.StartTime) {
+ } else if yym35 {
+ z.DecBinaryUnmarshal(x.StartTime)
+ } else if !yym35 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.StartTime)
+ } else {
+ z.DecFallback(x.StartTime, false)
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.InitContainerStatuses = nil
+ } else {
+ yyv36 := &x.InitContainerStatuses
+ yym37 := z.DecBinary()
+ _ = yym37
+ if false {
+ } else {
+ h.decSliceContainerStatus((*[]ContainerStatus)(yyv36), d)
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ContainerStatuses = nil
+ } else {
+ yyv38 := &x.ContainerStatuses
+ yym39 := z.DecBinary()
+ _ = yym39
+ if false {
+ } else {
+ h.decSliceContainerStatus((*[]ContainerStatus)(yyv38), d)
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.QOSClass = ""
+ } else {
+ yyv40 := &x.QOSClass
+ yyv40.CodecDecodeSelf(d)
+ }
+ for {
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj22-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodStatusResult) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = true
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Status
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Status
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodStatusResult) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodStatusResult) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 "status":
+ if r.TryDecodeAsNil() {
+ x.Status = PodStatus{}
+ } else {
+ yyv10 := &x.Status
+ yyv10.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodStatusResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv12 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv14 := &x.APIVersion
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv16 := &x.ObjectMeta
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv16) {
+ } else {
+ z.DecFallback(yyv16, false)
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = PodStatus{}
+ } else {
+ yyv18 := &x.Status
+ yyv18.CodecDecodeSelf(d)
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Pod) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Pod) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Pod) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 = PodSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = PodStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = PodSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = PodStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSlicePod(([]Pod)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSlicePod(([]Pod)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSlicePod((*[]Pod)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSlicePod((*[]Pod)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodTemplateSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[1] {
+ yy9 := &x.Spec
+ yy9.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy11 := &x.Spec
+ yy11.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodTemplateSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodTemplateSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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 = PodSpec{}
+ } else {
+ yyv6 := &x.Spec
+ yyv6.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodTemplateSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = PodSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodTemplate) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = true
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Template
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("template"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Template
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodTemplate) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodTemplate) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 "template":
+ if r.TryDecodeAsNil() {
+ x.Template = PodTemplateSpec{}
+ } else {
+ yyv10 := &x.Template
+ yyv10.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv12 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv14 := &x.APIVersion
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv16 := &x.ObjectMeta
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv16) {
+ } else {
+ z.DecFallback(yyv16, false)
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Template = PodTemplateSpec{}
+ } else {
+ yyv18 := &x.Template
+ yyv18.CodecDecodeSelf(d)
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodTemplateList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSlicePodTemplate(([]PodTemplate)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSlicePodTemplate(([]PodTemplate)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodTemplateList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodTemplateList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSlicePodTemplate((*[]PodTemplate)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodTemplateList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSlicePodTemplate((*[]PodTemplate)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ReplicationControllerSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Replicas != nil
+ yyq2[1] = x.MinReadySeconds != 0
+ yyq2[2] = len(x.Selector) != 0
+ yyq2[3] = x.Template != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Replicas == nil {
+ r.EncodeNil()
+ } else {
+ yy4 := *x.Replicas
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(yy4))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Replicas == nil {
+ r.EncodeNil()
+ } else {
+ yy6 := *x.Replicas
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(yy6))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MinReadySeconds))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("minReadySeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MinReadySeconds))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Selector, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Selector, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Template == nil {
+ r.EncodeNil()
+ } else {
+ x.Template.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("template"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Template == nil {
+ r.EncodeNil()
+ } else {
+ x.Template.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ReplicationControllerSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ReplicationControllerSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "replicas":
+ if r.TryDecodeAsNil() {
+ if x.Replicas != nil {
+ x.Replicas = nil
+ }
+ } else {
+ if x.Replicas == nil {
+ x.Replicas = new(int32)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(x.Replicas)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "minReadySeconds":
+ if r.TryDecodeAsNil() {
+ x.MinReadySeconds = 0
+ } else {
+ yyv6 := &x.MinReadySeconds
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int32)(yyv6)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ x.Selector = nil
+ } else {
+ yyv8 := &x.Selector
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv8, false, d)
+ }
+ }
+ case "template":
+ if r.TryDecodeAsNil() {
+ if x.Template != nil {
+ x.Template = nil
+ }
+ } else {
+ if x.Template == nil {
+ x.Template = new(PodTemplateSpec)
+ }
+ x.Template.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ReplicationControllerSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Replicas != nil {
+ x.Replicas = nil
+ }
+ } else {
+ if x.Replicas == nil {
+ x.Replicas = new(int32)
+ }
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int32)(x.Replicas)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MinReadySeconds = 0
+ } else {
+ yyv14 := &x.MinReadySeconds
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*int32)(yyv14)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Selector = nil
+ } else {
+ yyv16 := &x.Selector
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv16, false, d)
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Template != nil {
+ x.Template = nil
+ }
+ } else {
+ if x.Template == nil {
+ x.Template = new(PodTemplateSpec)
+ }
+ x.Template.CodecDecodeSelf(d)
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ReplicationControllerStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.FullyLabeledReplicas != 0
+ yyq2[2] = x.ReadyReplicas != 0
+ yyq2[3] = x.AvailableReplicas != 0
+ yyq2[4] = x.ObservedGeneration != 0
+ yyq2[5] = len(x.Conditions) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(x.FullyLabeledReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fullyLabeledReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.FullyLabeledReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ReadyReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readyReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ReadyReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.AvailableReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("availableReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(x.AvailableReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ObservedGeneration))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("observedGeneration"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ObservedGeneration))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ h.encSliceReplicationControllerCondition(([]ReplicationControllerCondition)(x.Conditions), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("conditions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.encSliceReplicationControllerCondition(([]ReplicationControllerCondition)(x.Conditions), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ReplicationControllerStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ReplicationControllerStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "replicas":
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv4 := &x.Replicas
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(yyv4)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "fullyLabeledReplicas":
+ if r.TryDecodeAsNil() {
+ x.FullyLabeledReplicas = 0
+ } else {
+ yyv6 := &x.FullyLabeledReplicas
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int32)(yyv6)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "readyReplicas":
+ if r.TryDecodeAsNil() {
+ x.ReadyReplicas = 0
+ } else {
+ yyv8 := &x.ReadyReplicas
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "availableReplicas":
+ if r.TryDecodeAsNil() {
+ x.AvailableReplicas = 0
+ } else {
+ yyv10 := &x.AvailableReplicas
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(yyv10)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "observedGeneration":
+ if r.TryDecodeAsNil() {
+ x.ObservedGeneration = 0
+ } else {
+ yyv12 := &x.ObservedGeneration
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int64)(yyv12)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "conditions":
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv14 := &x.Conditions
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.decSliceReplicationControllerCondition((*[]ReplicationControllerCondition)(yyv14), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ReplicationControllerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj16 int
+ var yyb16 bool
+ var yyhl16 bool = l >= 0
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv17 := &x.Replicas
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int32)(yyv17)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FullyLabeledReplicas = 0
+ } else {
+ yyv19 := &x.FullyLabeledReplicas
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*int32)(yyv19)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadyReplicas = 0
+ } else {
+ yyv21 := &x.ReadyReplicas
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int32)(yyv21)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.AvailableReplicas = 0
+ } else {
+ yyv23 := &x.AvailableReplicas
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*int32)(yyv23)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObservedGeneration = 0
+ } else {
+ yyv25 := &x.ObservedGeneration
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*int64)(yyv25)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv27 := &x.Conditions
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ h.decSliceReplicationControllerCondition((*[]ReplicationControllerCondition)(yyv27), d)
+ }
+ }
+ for {
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj16-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x ReplicationControllerConditionType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *ReplicationControllerConditionType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *ReplicationControllerCondition) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = true
+ yyq2[3] = x.Reason != ""
+ yyq2[4] = x.Message != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Status.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Status.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy10 := &x.LastTransitionTime
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy10) {
+ } else if yym11 {
+ z.EncBinaryMarshal(yy10)
+ } else if !yym11 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy10)
+ } else {
+ z.EncFallback(yy10)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.LastTransitionTime
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if yym13 {
+ z.EncBinaryMarshal(yy12)
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ReplicationControllerCondition) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ReplicationControllerCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "lastTransitionTime":
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg2_v1.Time{}
+ } else {
+ yyv6 := &x.LastTransitionTime
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if yym7 {
+ z.DecBinaryUnmarshal(yyv6)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv8 := &x.Reason
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv10 := &x.Message
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ReplicationControllerCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv13 := &x.Type
+ yyv13.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv14 := &x.Status
+ yyv14.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg2_v1.Time{}
+ } else {
+ yyv15 := &x.LastTransitionTime
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv15) {
+ } else if yym16 {
+ z.DecBinaryUnmarshal(yyv15)
+ } else if !yym16 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv15)
+ } else {
+ z.DecFallback(yyv15, false)
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv17 := &x.Reason
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv19 := &x.Message
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ReplicationController) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ReplicationController) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ReplicationController) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 = ReplicationControllerSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ReplicationControllerStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = ReplicationControllerSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ReplicationControllerStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ReplicationControllerList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceReplicationController(([]ReplicationController)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceReplicationController(([]ReplicationController)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ReplicationControllerList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ReplicationControllerList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSliceReplicationController((*[]ReplicationController)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ReplicationControllerList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceReplicationController((*[]ReplicationController)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x ServiceAffinity) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *ServiceAffinity) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 ServiceType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *ServiceType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 ServiceExternalTrafficPolicyType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *ServiceExternalTrafficPolicyType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *ServiceStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = true
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yy4 := &x.LoadBalancer
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("loadBalancer"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.LoadBalancer
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ServiceStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ServiceStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "loadBalancer":
+ if r.TryDecodeAsNil() {
+ x.LoadBalancer = LoadBalancerStatus{}
+ } else {
+ yyv4 := &x.LoadBalancer
+ yyv4.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ServiceStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj5 int
+ var yyb5 bool
+ var yyhl5 bool = l >= 0
+ yyj5++
+ if yyhl5 {
+ yyb5 = yyj5 > l
+ } else {
+ yyb5 = r.CheckBreak()
+ }
+ if yyb5 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LoadBalancer = LoadBalancerStatus{}
+ } else {
+ yyv6 := &x.LoadBalancer
+ yyv6.CodecDecodeSelf(d)
+ }
+ for {
+ yyj5++
+ if yyhl5 {
+ yyb5 = yyj5 > l
+ } else {
+ yyb5 = r.CheckBreak()
+ }
+ if yyb5 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj5-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *LoadBalancerStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = len(x.Ingress) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Ingress == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceLoadBalancerIngress(([]LoadBalancerIngress)(x.Ingress), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ingress"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Ingress == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceLoadBalancerIngress(([]LoadBalancerIngress)(x.Ingress), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *LoadBalancerStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *LoadBalancerStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "ingress":
+ if r.TryDecodeAsNil() {
+ x.Ingress = nil
+ } else {
+ yyv4 := &x.Ingress
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceLoadBalancerIngress((*[]LoadBalancerIngress)(yyv4), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *LoadBalancerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Ingress = nil
+ } else {
+ yyv7 := &x.Ingress
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSliceLoadBalancerIngress((*[]LoadBalancerIngress)(yyv7), d)
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *LoadBalancerIngress) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.IP != ""
+ yyq2[1] = x.Hostname != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.IP))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ip"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.IP))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Hostname))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostname"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Hostname))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *LoadBalancerIngress) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *LoadBalancerIngress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "ip":
+ if r.TryDecodeAsNil() {
+ x.IP = ""
+ } else {
+ yyv4 := &x.IP
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "hostname":
+ if r.TryDecodeAsNil() {
+ x.Hostname = ""
+ } else {
+ yyv6 := &x.Hostname
+ 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_containerMapEnd1234)
+}
+
+func (x *LoadBalancerIngress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.IP = ""
+ } else {
+ yyv9 := &x.IP
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Hostname = ""
+ } else {
+ yyv11 := &x.Hostname
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [11]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = len(x.Ports) != 0
+ yyq2[1] = len(x.Selector) != 0
+ yyq2[2] = x.ClusterIP != ""
+ yyq2[3] = x.Type != ""
+ yyq2[4] = len(x.ExternalIPs) != 0
+ yyq2[5] = x.SessionAffinity != ""
+ yyq2[6] = x.LoadBalancerIP != ""
+ yyq2[7] = len(x.LoadBalancerSourceRanges) != 0
+ yyq2[8] = x.ExternalName != ""
+ yyq2[9] = x.ExternalTrafficPolicy != ""
+ yyq2[10] = x.HealthCheckNodePort != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(11)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Ports == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceServicePort(([]ServicePort)(x.Ports), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ports"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Ports == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceServicePort(([]ServicePort)(x.Ports), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Selector, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Selector, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ClusterIP))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("clusterIP"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ClusterIP))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.ExternalIPs == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.ExternalIPs, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("externalIPs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ExternalIPs == nil {
+ r.EncodeNil()
+ } else {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.ExternalIPs, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ x.SessionAffinity.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("sessionAffinity"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.SessionAffinity.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.LoadBalancerIP))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("loadBalancerIP"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.LoadBalancerIP))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.LoadBalancerSourceRanges == nil {
+ r.EncodeNil()
+ } else {
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.LoadBalancerSourceRanges, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("loadBalancerSourceRanges"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.LoadBalancerSourceRanges == nil {
+ r.EncodeNil()
+ } else {
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.LoadBalancerSourceRanges, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ExternalName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("externalName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym29 := z.EncBinary()
+ _ = yym29
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ExternalName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ x.ExternalTrafficPolicy.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("externalTrafficPolicy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.ExternalTrafficPolicy.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[10] {
+ yym34 := z.EncBinary()
+ _ = yym34
+ if false {
+ } else {
+ r.EncodeInt(int64(x.HealthCheckNodePort))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[10] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("healthCheckNodePort"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym35 := z.EncBinary()
+ _ = yym35
+ if false {
+ } else {
+ r.EncodeInt(int64(x.HealthCheckNodePort))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ServiceSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ServiceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "ports":
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv4 := &x.Ports
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceServicePort((*[]ServicePort)(yyv4), d)
+ }
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ x.Selector = nil
+ } else {
+ yyv6 := &x.Selector
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv6, false, d)
+ }
+ }
+ case "clusterIP":
+ if r.TryDecodeAsNil() {
+ x.ClusterIP = ""
+ } else {
+ yyv8 := &x.ClusterIP
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv10 := &x.Type
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "externalIPs":
+ if r.TryDecodeAsNil() {
+ x.ExternalIPs = nil
+ } else {
+ yyv11 := &x.ExternalIPs
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv11, false, d)
+ }
+ }
+ case "sessionAffinity":
+ if r.TryDecodeAsNil() {
+ x.SessionAffinity = ""
+ } else {
+ yyv13 := &x.SessionAffinity
+ yyv13.CodecDecodeSelf(d)
+ }
+ case "loadBalancerIP":
+ if r.TryDecodeAsNil() {
+ x.LoadBalancerIP = ""
+ } else {
+ yyv14 := &x.LoadBalancerIP
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ case "loadBalancerSourceRanges":
+ if r.TryDecodeAsNil() {
+ x.LoadBalancerSourceRanges = nil
+ } else {
+ yyv16 := &x.LoadBalancerSourceRanges
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv16, false, d)
+ }
+ }
+ case "externalName":
+ if r.TryDecodeAsNil() {
+ x.ExternalName = ""
+ } else {
+ yyv18 := &x.ExternalName
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*string)(yyv18)) = r.DecodeString()
+ }
+ }
+ case "externalTrafficPolicy":
+ if r.TryDecodeAsNil() {
+ x.ExternalTrafficPolicy = ""
+ } else {
+ yyv20 := &x.ExternalTrafficPolicy
+ yyv20.CodecDecodeSelf(d)
+ }
+ case "healthCheckNodePort":
+ if r.TryDecodeAsNil() {
+ x.HealthCheckNodePort = 0
+ } else {
+ yyv21 := &x.HealthCheckNodePort
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int32)(yyv21)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj23 int
+ var yyb23 bool
+ var yyhl23 bool = l >= 0
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv24 := &x.Ports
+ yym25 := z.DecBinary()
+ _ = yym25
+ if false {
+ } else {
+ h.decSliceServicePort((*[]ServicePort)(yyv24), d)
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Selector = nil
+ } else {
+ yyv26 := &x.Selector
+ yym27 := z.DecBinary()
+ _ = yym27
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv26, false, d)
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ClusterIP = ""
+ } else {
+ yyv28 := &x.ClusterIP
+ yym29 := z.DecBinary()
+ _ = yym29
+ if false {
+ } else {
+ *((*string)(yyv28)) = r.DecodeString()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv30 := &x.Type
+ yyv30.CodecDecodeSelf(d)
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ExternalIPs = nil
+ } else {
+ yyv31 := &x.ExternalIPs
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv31, false, d)
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SessionAffinity = ""
+ } else {
+ yyv33 := &x.SessionAffinity
+ yyv33.CodecDecodeSelf(d)
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LoadBalancerIP = ""
+ } else {
+ yyv34 := &x.LoadBalancerIP
+ yym35 := z.DecBinary()
+ _ = yym35
+ if false {
+ } else {
+ *((*string)(yyv34)) = r.DecodeString()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LoadBalancerSourceRanges = nil
+ } else {
+ yyv36 := &x.LoadBalancerSourceRanges
+ yym37 := z.DecBinary()
+ _ = yym37
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv36, false, d)
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ExternalName = ""
+ } else {
+ yyv38 := &x.ExternalName
+ yym39 := z.DecBinary()
+ _ = yym39
+ if false {
+ } else {
+ *((*string)(yyv38)) = r.DecodeString()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ExternalTrafficPolicy = ""
+ } else {
+ yyv40 := &x.ExternalTrafficPolicy
+ yyv40.CodecDecodeSelf(d)
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HealthCheckNodePort = 0
+ } else {
+ yyv41 := &x.HealthCheckNodePort
+ yym42 := z.DecBinary()
+ _ = yym42
+ if false {
+ } else {
+ *((*int32)(yyv41)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj23-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ServicePort) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Name != ""
+ yyq2[1] = x.Protocol != ""
+ yyq2[3] = true
+ yyq2[4] = x.NodePort != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ x.Protocol.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("protocol"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Protocol.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Port))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("port"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Port))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yy13 := &x.TargetPort
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy13) {
+ } else if !yym14 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy13)
+ } else {
+ z.EncFallback(yy13)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetPort"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy15 := &x.TargetPort
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy15) {
+ } else if !yym16 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy15)
+ } else {
+ z.EncFallback(yy15)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeInt(int64(x.NodePort))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nodePort"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeInt(int64(x.NodePort))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ServicePort) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ServicePort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "protocol":
+ if r.TryDecodeAsNil() {
+ x.Protocol = ""
+ } else {
+ yyv6 := &x.Protocol
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "port":
+ if r.TryDecodeAsNil() {
+ x.Port = 0
+ } else {
+ yyv7 := &x.Port
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*int32)(yyv7)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "targetPort":
+ if r.TryDecodeAsNil() {
+ x.TargetPort = pkg4_intstr.IntOrString{}
+ } else {
+ yyv9 := &x.TargetPort
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv9) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv9)
+ } else {
+ z.DecFallback(yyv9, false)
+ }
+ }
+ case "nodePort":
+ if r.TryDecodeAsNil() {
+ x.NodePort = 0
+ } else {
+ yyv11 := &x.NodePort
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int32)(yyv11)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ServicePort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv14 := &x.Name
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Protocol = ""
+ } else {
+ yyv16 := &x.Protocol
+ yyv16.CodecDecodeSelf(d)
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Port = 0
+ } else {
+ yyv17 := &x.Port
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int32)(yyv17)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TargetPort = pkg4_intstr.IntOrString{}
+ } else {
+ yyv19 := &x.TargetPort
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv19) {
+ } else if !yym20 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv19)
+ } else {
+ z.DecFallback(yyv19, false)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NodePort = 0
+ } else {
+ yyv21 := &x.NodePort
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int32)(yyv21)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj13-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Service) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Service) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Service) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 = ServiceSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ServiceStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = ServiceSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ServiceStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ServiceList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceService(([]Service)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceService(([]Service)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ServiceList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ServiceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSliceService((*[]Service)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ServiceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceService((*[]Service)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ServiceAccount) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Kind != ""
+ yyq2[1] = x.APIVersion != ""
+ yyq2[2] = true
+ yyq2[3] = len(x.Secrets) != 0
+ yyq2[4] = len(x.ImagePullSecrets) != 0
+ yyq2[5] = x.AutomountServiceAccountToken != 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Secrets == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceObjectReference(([]ObjectReference)(x.Secrets), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secrets"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Secrets == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceObjectReference(([]ObjectReference)(x.Secrets), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.ImagePullSecrets == nil {
+ r.EncodeNil()
+ } else {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("imagePullSecrets"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ImagePullSecrets == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.AutomountServiceAccountToken == nil {
+ r.EncodeNil()
+ } else {
+ yy21 := *x.AutomountServiceAccountToken
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeBool(bool(yy21))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("automountServiceAccountToken"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.AutomountServiceAccountToken == nil {
+ r.EncodeNil()
+ } else {
+ yy23 := *x.AutomountServiceAccountToken
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else {
+ r.EncodeBool(bool(yy23))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ServiceAccount) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ServiceAccount) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 "secrets":
+ if r.TryDecodeAsNil() {
+ x.Secrets = nil
+ } else {
+ yyv10 := &x.Secrets
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSliceObjectReference((*[]ObjectReference)(yyv10), d)
+ }
+ }
+ case "imagePullSecrets":
+ if r.TryDecodeAsNil() {
+ x.ImagePullSecrets = nil
+ } else {
+ yyv12 := &x.ImagePullSecrets
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv12), d)
+ }
+ }
+ case "automountServiceAccountToken":
+ if r.TryDecodeAsNil() {
+ if x.AutomountServiceAccountToken != nil {
+ x.AutomountServiceAccountToken = nil
+ }
+ } else {
+ if x.AutomountServiceAccountToken == nil {
+ x.AutomountServiceAccountToken = new(bool)
+ }
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*bool)(x.AutomountServiceAccountToken)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj16 int
+ var yyb16 bool
+ var yyhl16 bool = l >= 0
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv17 := &x.Kind
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv19 := &x.APIVersion
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv21 := &x.ObjectMeta
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv21) {
+ } else {
+ z.DecFallback(yyv21, false)
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Secrets = nil
+ } else {
+ yyv23 := &x.Secrets
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ h.decSliceObjectReference((*[]ObjectReference)(yyv23), d)
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ImagePullSecrets = nil
+ } else {
+ yyv25 := &x.ImagePullSecrets
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv25), d)
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.AutomountServiceAccountToken != nil {
+ x.AutomountServiceAccountToken = nil
+ }
+ } else {
+ if x.AutomountServiceAccountToken == nil {
+ x.AutomountServiceAccountToken = new(bool)
+ }
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*bool)(x.AutomountServiceAccountToken)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj16-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ServiceAccountList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceServiceAccount(([]ServiceAccount)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceServiceAccount(([]ServiceAccount)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ServiceAccountList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ServiceAccountList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSliceServiceAccount((*[]ServiceAccount)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ServiceAccountList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceServiceAccount((*[]ServiceAccount)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Endpoints) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Subsets == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceEndpointSubset(([]EndpointSubset)(x.Subsets), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("subsets"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Subsets == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceEndpointSubset(([]EndpointSubset)(x.Subsets), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Endpoints) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Endpoints) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 "subsets":
+ if r.TryDecodeAsNil() {
+ x.Subsets = nil
+ } else {
+ yyv10 := &x.Subsets
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSliceEndpointSubset((*[]EndpointSubset)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Endpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Subsets = nil
+ } else {
+ yyv19 := &x.Subsets
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceEndpointSubset((*[]EndpointSubset)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *EndpointSubset) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Addresses) != 0
+ yyq2[1] = len(x.NotReadyAddresses) != 0
+ yyq2[2] = len(x.Ports) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Addresses == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceEndpointAddress(([]EndpointAddress)(x.Addresses), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("addresses"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Addresses == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceEndpointAddress(([]EndpointAddress)(x.Addresses), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.NotReadyAddresses == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceEndpointAddress(([]EndpointAddress)(x.NotReadyAddresses), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("notReadyAddresses"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NotReadyAddresses == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceEndpointAddress(([]EndpointAddress)(x.NotReadyAddresses), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Ports == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceEndpointPort(([]EndpointPort)(x.Ports), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ports"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Ports == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.encSliceEndpointPort(([]EndpointPort)(x.Ports), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *EndpointSubset) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *EndpointSubset) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "addresses":
+ if r.TryDecodeAsNil() {
+ x.Addresses = nil
+ } else {
+ yyv4 := &x.Addresses
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceEndpointAddress((*[]EndpointAddress)(yyv4), d)
+ }
+ }
+ case "notReadyAddresses":
+ if r.TryDecodeAsNil() {
+ x.NotReadyAddresses = nil
+ } else {
+ yyv6 := &x.NotReadyAddresses
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceEndpointAddress((*[]EndpointAddress)(yyv6), d)
+ }
+ }
+ case "ports":
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv8 := &x.Ports
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.decSliceEndpointPort((*[]EndpointPort)(yyv8), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *EndpointSubset) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Addresses = nil
+ } else {
+ yyv11 := &x.Addresses
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceEndpointAddress((*[]EndpointAddress)(yyv11), d)
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NotReadyAddresses = nil
+ } else {
+ yyv13 := &x.NotReadyAddresses
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceEndpointAddress((*[]EndpointAddress)(yyv13), d)
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv15 := &x.Ports
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.decSliceEndpointPort((*[]EndpointPort)(yyv15), d)
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *EndpointAddress) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.Hostname != ""
+ yyq2[2] = x.NodeName != nil
+ yyq2[3] = x.TargetRef != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.IP))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ip"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.IP))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Hostname))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostname"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Hostname))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.NodeName == nil {
+ r.EncodeNil()
+ } else {
+ yy10 := *x.NodeName
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yy10))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nodeName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NodeName == nil {
+ r.EncodeNil()
+ } else {
+ yy12 := *x.NodeName
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yy12))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.TargetRef == nil {
+ r.EncodeNil()
+ } else {
+ x.TargetRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TargetRef == nil {
+ r.EncodeNil()
+ } else {
+ x.TargetRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *EndpointAddress) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *EndpointAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "ip":
+ if r.TryDecodeAsNil() {
+ x.IP = ""
+ } else {
+ yyv4 := &x.IP
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "hostname":
+ if r.TryDecodeAsNil() {
+ x.Hostname = ""
+ } else {
+ yyv6 := &x.Hostname
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "nodeName":
+ if r.TryDecodeAsNil() {
+ if x.NodeName != nil {
+ x.NodeName = nil
+ }
+ } else {
+ if x.NodeName == nil {
+ x.NodeName = new(string)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(x.NodeName)) = r.DecodeString()
+ }
+ }
+ case "targetRef":
+ if r.TryDecodeAsNil() {
+ if x.TargetRef != nil {
+ x.TargetRef = nil
+ }
+ } else {
+ if x.TargetRef == nil {
+ x.TargetRef = new(ObjectReference)
+ }
+ x.TargetRef.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *EndpointAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.IP = ""
+ } else {
+ yyv12 := &x.IP
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Hostname = ""
+ } else {
+ yyv14 := &x.Hostname
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.NodeName != nil {
+ x.NodeName = nil
+ }
+ } else {
+ if x.NodeName == nil {
+ x.NodeName = new(string)
+ }
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(x.NodeName)) = r.DecodeString()
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.TargetRef != nil {
+ x.TargetRef = nil
+ }
+ } else {
+ if x.TargetRef == nil {
+ x.TargetRef = new(ObjectReference)
+ }
+ x.TargetRef.CodecDecodeSelf(d)
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *EndpointPort) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Name != ""
+ yyq2[2] = x.Protocol != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Port))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("port"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Port))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ x.Protocol.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("protocol"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Protocol.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *EndpointPort) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *EndpointPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "port":
+ if r.TryDecodeAsNil() {
+ x.Port = 0
+ } else {
+ yyv6 := &x.Port
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int32)(yyv6)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "protocol":
+ if r.TryDecodeAsNil() {
+ x.Protocol = ""
+ } else {
+ yyv8 := &x.Protocol
+ yyv8.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *EndpointPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv10 := &x.Name
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Port = 0
+ } else {
+ yyv12 := &x.Port
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int32)(yyv12)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Protocol = ""
+ } else {
+ yyv14 := &x.Protocol
+ yyv14.CodecDecodeSelf(d)
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *EndpointsList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceEndpoints(([]Endpoints)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceEndpoints(([]Endpoints)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *EndpointsList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *EndpointsList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSliceEndpoints((*[]Endpoints)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *EndpointsList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceEndpoints((*[]Endpoints)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NodeSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.PodCIDR != ""
+ yyq2[1] = x.ExternalID != ""
+ yyq2[2] = x.ProviderID != ""
+ yyq2[3] = x.Unschedulable != false
+ yyq2[4] = len(x.Taints) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.PodCIDR))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podCIDR"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.PodCIDR))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ExternalID))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("externalID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ExternalID))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ProviderID))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("providerID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ProviderID))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Unschedulable))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("unschedulable"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Unschedulable))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.Taints == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceTaint(([]Taint)(x.Taints), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("taints"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Taints == nil {
+ r.EncodeNil()
+ } else {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ h.encSliceTaint(([]Taint)(x.Taints), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NodeSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NodeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "podCIDR":
+ if r.TryDecodeAsNil() {
+ x.PodCIDR = ""
+ } else {
+ yyv4 := &x.PodCIDR
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "externalID":
+ if r.TryDecodeAsNil() {
+ x.ExternalID = ""
+ } else {
+ yyv6 := &x.ExternalID
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "providerID":
+ if r.TryDecodeAsNil() {
+ x.ProviderID = ""
+ } else {
+ yyv8 := &x.ProviderID
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "unschedulable":
+ if r.TryDecodeAsNil() {
+ x.Unschedulable = false
+ } else {
+ yyv10 := &x.Unschedulable
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*bool)(yyv10)) = r.DecodeBool()
+ }
+ }
+ case "taints":
+ if r.TryDecodeAsNil() {
+ x.Taints = nil
+ } else {
+ yyv12 := &x.Taints
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ h.decSliceTaint((*[]Taint)(yyv12), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NodeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PodCIDR = ""
+ } else {
+ yyv15 := &x.PodCIDR
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ExternalID = ""
+ } else {
+ yyv17 := &x.ExternalID
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ProviderID = ""
+ } else {
+ yyv19 := &x.ProviderID
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Unschedulable = false
+ } else {
+ yyv21 := &x.Unschedulable
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*bool)(yyv21)) = r.DecodeBool()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Taints = nil
+ } else {
+ yyv23 := &x.Taints
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ h.decSliceTaint((*[]Taint)(yyv23), d)
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DaemonEndpoint) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Port))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("Port"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Port))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DaemonEndpoint) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DaemonEndpoint) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "Port":
+ if r.TryDecodeAsNil() {
+ x.Port = 0
+ } else {
+ yyv4 := &x.Port
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(yyv4)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DaemonEndpoint) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Port = 0
+ } else {
+ yyv7 := &x.Port
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*int32)(yyv7)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NodeDaemonEndpoints) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = true
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yy4 := &x.KubeletEndpoint
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kubeletEndpoint"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.KubeletEndpoint
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NodeDaemonEndpoints) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NodeDaemonEndpoints) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "kubeletEndpoint":
+ if r.TryDecodeAsNil() {
+ x.KubeletEndpoint = DaemonEndpoint{}
+ } else {
+ yyv4 := &x.KubeletEndpoint
+ yyv4.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NodeDaemonEndpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj5 int
+ var yyb5 bool
+ var yyhl5 bool = l >= 0
+ yyj5++
+ if yyhl5 {
+ yyb5 = yyj5 > l
+ } else {
+ yyb5 = r.CheckBreak()
+ }
+ if yyb5 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.KubeletEndpoint = DaemonEndpoint{}
+ } else {
+ yyv6 := &x.KubeletEndpoint
+ yyv6.CodecDecodeSelf(d)
+ }
+ for {
+ yyj5++
+ if yyhl5 {
+ yyb5 = yyj5 > l
+ } else {
+ yyb5 = r.CheckBreak()
+ }
+ if yyb5 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj5-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [10]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(10)
+ } else {
+ yynn2 = 10
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MachineID))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("machineID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MachineID))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SystemUUID))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("systemUUID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SystemUUID))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.BootID))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("bootID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.BootID))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.KernelVersion))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kernelVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.KernelVersion))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.OSImage))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("osImage"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.OSImage))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ContainerRuntimeVersion))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("containerRuntimeVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ContainerRuntimeVersion))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.KubeletVersion))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kubeletVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.KubeletVersion))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.KubeProxyVersion))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kubeProxyVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.KubeProxyVersion))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.OperatingSystem))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("operatingSystem"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym29 := z.EncBinary()
+ _ = yym29
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.OperatingSystem))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym31 := z.EncBinary()
+ _ = yym31
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Architecture))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("architecture"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym32 := z.EncBinary()
+ _ = yym32
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Architecture))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NodeSystemInfo) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NodeSystemInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "machineID":
+ if r.TryDecodeAsNil() {
+ x.MachineID = ""
+ } else {
+ yyv4 := &x.MachineID
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "systemUUID":
+ if r.TryDecodeAsNil() {
+ x.SystemUUID = ""
+ } else {
+ yyv6 := &x.SystemUUID
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "bootID":
+ if r.TryDecodeAsNil() {
+ x.BootID = ""
+ } else {
+ yyv8 := &x.BootID
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "kernelVersion":
+ if r.TryDecodeAsNil() {
+ x.KernelVersion = ""
+ } else {
+ yyv10 := &x.KernelVersion
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "osImage":
+ if r.TryDecodeAsNil() {
+ x.OSImage = ""
+ } else {
+ yyv12 := &x.OSImage
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ case "containerRuntimeVersion":
+ if r.TryDecodeAsNil() {
+ x.ContainerRuntimeVersion = ""
+ } else {
+ yyv14 := &x.ContainerRuntimeVersion
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ case "kubeletVersion":
+ if r.TryDecodeAsNil() {
+ x.KubeletVersion = ""
+ } else {
+ yyv16 := &x.KubeletVersion
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ case "kubeProxyVersion":
+ if r.TryDecodeAsNil() {
+ x.KubeProxyVersion = ""
+ } else {
+ yyv18 := &x.KubeProxyVersion
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*string)(yyv18)) = r.DecodeString()
+ }
+ }
+ case "operatingSystem":
+ if r.TryDecodeAsNil() {
+ x.OperatingSystem = ""
+ } else {
+ yyv20 := &x.OperatingSystem
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ *((*string)(yyv20)) = r.DecodeString()
+ }
+ }
+ case "architecture":
+ if r.TryDecodeAsNil() {
+ x.Architecture = ""
+ } else {
+ yyv22 := &x.Architecture
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else {
+ *((*string)(yyv22)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj24 int
+ var yyb24 bool
+ var yyhl24 bool = l >= 0
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MachineID = ""
+ } else {
+ yyv25 := &x.MachineID
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*string)(yyv25)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SystemUUID = ""
+ } else {
+ yyv27 := &x.SystemUUID
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*string)(yyv27)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.BootID = ""
+ } else {
+ yyv29 := &x.BootID
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*string)(yyv29)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.KernelVersion = ""
+ } else {
+ yyv31 := &x.KernelVersion
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*string)(yyv31)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.OSImage = ""
+ } else {
+ yyv33 := &x.OSImage
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ *((*string)(yyv33)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ContainerRuntimeVersion = ""
+ } else {
+ yyv35 := &x.ContainerRuntimeVersion
+ yym36 := z.DecBinary()
+ _ = yym36
+ if false {
+ } else {
+ *((*string)(yyv35)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.KubeletVersion = ""
+ } else {
+ yyv37 := &x.KubeletVersion
+ yym38 := z.DecBinary()
+ _ = yym38
+ if false {
+ } else {
+ *((*string)(yyv37)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.KubeProxyVersion = ""
+ } else {
+ yyv39 := &x.KubeProxyVersion
+ yym40 := z.DecBinary()
+ _ = yym40
+ if false {
+ } else {
+ *((*string)(yyv39)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.OperatingSystem = ""
+ } else {
+ yyv41 := &x.OperatingSystem
+ yym42 := z.DecBinary()
+ _ = yym42
+ if false {
+ } else {
+ *((*string)(yyv41)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Architecture = ""
+ } else {
+ yyv43 := &x.Architecture
+ yym44 := z.DecBinary()
+ _ = yym44
+ if false {
+ } else {
+ *((*string)(yyv43)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj24-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [10]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = len(x.Capacity) != 0
+ yyq2[1] = len(x.Allocatable) != 0
+ yyq2[2] = x.Phase != ""
+ yyq2[3] = len(x.Conditions) != 0
+ yyq2[4] = len(x.Addresses) != 0
+ yyq2[5] = true
+ yyq2[6] = true
+ yyq2[7] = len(x.Images) != 0
+ yyq2[8] = len(x.VolumesInUse) != 0
+ yyq2[9] = len(x.VolumesAttached) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(10)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Capacity == nil {
+ r.EncodeNil()
+ } else {
+ x.Capacity.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("capacity"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Capacity == nil {
+ r.EncodeNil()
+ } else {
+ x.Capacity.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Allocatable == nil {
+ r.EncodeNil()
+ } else {
+ x.Allocatable.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("allocatable"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Allocatable == nil {
+ r.EncodeNil()
+ } else {
+ x.Allocatable.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ x.Phase.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("phase"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Phase.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ h.encSliceNodeCondition(([]NodeCondition)(x.Conditions), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("conditions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.encSliceNodeCondition(([]NodeCondition)(x.Conditions), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.Addresses == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceNodeAddress(([]NodeAddress)(x.Addresses), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("addresses"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Addresses == nil {
+ r.EncodeNil()
+ } else {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ h.encSliceNodeAddress(([]NodeAddress)(x.Addresses), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yy19 := &x.DaemonEndpoints
+ yy19.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("daemonEndpoints"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy21 := &x.DaemonEndpoints
+ yy21.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yy24 := &x.NodeInfo
+ yy24.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nodeInfo"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy26 := &x.NodeInfo
+ yy26.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.Images == nil {
+ r.EncodeNil()
+ } else {
+ yym29 := z.EncBinary()
+ _ = yym29
+ if false {
+ } else {
+ h.encSliceContainerImage(([]ContainerImage)(x.Images), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("images"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Images == nil {
+ r.EncodeNil()
+ } else {
+ yym30 := z.EncBinary()
+ _ = yym30
+ if false {
+ } else {
+ h.encSliceContainerImage(([]ContainerImage)(x.Images), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ if x.VolumesInUse == nil {
+ r.EncodeNil()
+ } else {
+ yym32 := z.EncBinary()
+ _ = yym32
+ if false {
+ } else {
+ h.encSliceUniqueVolumeName(([]UniqueVolumeName)(x.VolumesInUse), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumesInUse"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.VolumesInUse == nil {
+ r.EncodeNil()
+ } else {
+ yym33 := z.EncBinary()
+ _ = yym33
+ if false {
+ } else {
+ h.encSliceUniqueVolumeName(([]UniqueVolumeName)(x.VolumesInUse), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ if x.VolumesAttached == nil {
+ r.EncodeNil()
+ } else {
+ yym35 := z.EncBinary()
+ _ = yym35
+ if false {
+ } else {
+ h.encSliceAttachedVolume(([]AttachedVolume)(x.VolumesAttached), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumesAttached"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.VolumesAttached == nil {
+ r.EncodeNil()
+ } else {
+ yym36 := z.EncBinary()
+ _ = yym36
+ if false {
+ } else {
+ h.encSliceAttachedVolume(([]AttachedVolume)(x.VolumesAttached), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NodeStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NodeStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "capacity":
+ if r.TryDecodeAsNil() {
+ x.Capacity = nil
+ } else {
+ yyv4 := &x.Capacity
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "allocatable":
+ if r.TryDecodeAsNil() {
+ x.Allocatable = nil
+ } else {
+ yyv5 := &x.Allocatable
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "phase":
+ if r.TryDecodeAsNil() {
+ x.Phase = ""
+ } else {
+ yyv6 := &x.Phase
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "conditions":
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv7 := &x.Conditions
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSliceNodeCondition((*[]NodeCondition)(yyv7), d)
+ }
+ }
+ case "addresses":
+ if r.TryDecodeAsNil() {
+ x.Addresses = nil
+ } else {
+ yyv9 := &x.Addresses
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceNodeAddress((*[]NodeAddress)(yyv9), d)
+ }
+ }
+ case "daemonEndpoints":
+ if r.TryDecodeAsNil() {
+ x.DaemonEndpoints = NodeDaemonEndpoints{}
+ } else {
+ yyv11 := &x.DaemonEndpoints
+ yyv11.CodecDecodeSelf(d)
+ }
+ case "nodeInfo":
+ if r.TryDecodeAsNil() {
+ x.NodeInfo = NodeSystemInfo{}
+ } else {
+ yyv12 := &x.NodeInfo
+ yyv12.CodecDecodeSelf(d)
+ }
+ case "images":
+ if r.TryDecodeAsNil() {
+ x.Images = nil
+ } else {
+ yyv13 := &x.Images
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceContainerImage((*[]ContainerImage)(yyv13), d)
+ }
+ }
+ case "volumesInUse":
+ if r.TryDecodeAsNil() {
+ x.VolumesInUse = nil
+ } else {
+ yyv15 := &x.VolumesInUse
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.decSliceUniqueVolumeName((*[]UniqueVolumeName)(yyv15), d)
+ }
+ }
+ case "volumesAttached":
+ if r.TryDecodeAsNil() {
+ x.VolumesAttached = nil
+ } else {
+ yyv17 := &x.VolumesAttached
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ h.decSliceAttachedVolume((*[]AttachedVolume)(yyv17), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj19 int
+ var yyb19 bool
+ var yyhl19 bool = l >= 0
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Capacity = nil
+ } else {
+ yyv20 := &x.Capacity
+ yyv20.CodecDecodeSelf(d)
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Allocatable = nil
+ } else {
+ yyv21 := &x.Allocatable
+ yyv21.CodecDecodeSelf(d)
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Phase = ""
+ } else {
+ yyv22 := &x.Phase
+ yyv22.CodecDecodeSelf(d)
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv23 := &x.Conditions
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ h.decSliceNodeCondition((*[]NodeCondition)(yyv23), d)
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Addresses = nil
+ } else {
+ yyv25 := &x.Addresses
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ h.decSliceNodeAddress((*[]NodeAddress)(yyv25), d)
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DaemonEndpoints = NodeDaemonEndpoints{}
+ } else {
+ yyv27 := &x.DaemonEndpoints
+ yyv27.CodecDecodeSelf(d)
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NodeInfo = NodeSystemInfo{}
+ } else {
+ yyv28 := &x.NodeInfo
+ yyv28.CodecDecodeSelf(d)
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Images = nil
+ } else {
+ yyv29 := &x.Images
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ h.decSliceContainerImage((*[]ContainerImage)(yyv29), d)
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumesInUse = nil
+ } else {
+ yyv31 := &x.VolumesInUse
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ h.decSliceUniqueVolumeName((*[]UniqueVolumeName)(yyv31), d)
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumesAttached = nil
+ } else {
+ yyv33 := &x.VolumesAttached
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ h.decSliceAttachedVolume((*[]AttachedVolume)(yyv33), d)
+ }
+ }
+ for {
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj19-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x UniqueVolumeName) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *UniqueVolumeName) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *AttachedVolume) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Name.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Name.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DevicePath))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("devicePath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DevicePath))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *AttachedVolume) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *AttachedVolume) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "devicePath":
+ if r.TryDecodeAsNil() {
+ x.DevicePath = ""
+ } else {
+ yyv5 := &x.DevicePath
+ 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_containerMapEnd1234)
+}
+
+func (x *AttachedVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv8 := &x.Name
+ yyv8.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DevicePath = ""
+ } else {
+ yyv9 := &x.DevicePath
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *AvoidPods) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = len(x.PreferAvoidPods) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.PreferAvoidPods == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSlicePreferAvoidPodsEntry(([]PreferAvoidPodsEntry)(x.PreferAvoidPods), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("preferAvoidPods"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PreferAvoidPods == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSlicePreferAvoidPodsEntry(([]PreferAvoidPodsEntry)(x.PreferAvoidPods), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *AvoidPods) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *AvoidPods) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "preferAvoidPods":
+ if r.TryDecodeAsNil() {
+ x.PreferAvoidPods = nil
+ } else {
+ yyv4 := &x.PreferAvoidPods
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSlicePreferAvoidPodsEntry((*[]PreferAvoidPodsEntry)(yyv4), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *AvoidPods) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PreferAvoidPods = nil
+ } else {
+ yyv7 := &x.PreferAvoidPods
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSlicePreferAvoidPodsEntry((*[]PreferAvoidPodsEntry)(yyv7), d)
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PreferAvoidPodsEntry) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = true
+ yyq2[2] = x.Reason != ""
+ yyq2[3] = x.Message != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy4 := &x.PodSignature
+ yy4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podSignature"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.PodSignature
+ yy6.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yy9 := &x.EvictionTime
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy9) {
+ } else if yym10 {
+ z.EncBinaryMarshal(yy9)
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy9)
+ } else {
+ z.EncFallback(yy9)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("evictionTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy11 := &x.EvictionTime
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy11) {
+ } else if yym12 {
+ z.EncBinaryMarshal(yy11)
+ } else if !yym12 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy11)
+ } else {
+ z.EncFallback(yy11)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PreferAvoidPodsEntry) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PreferAvoidPodsEntry) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "podSignature":
+ if r.TryDecodeAsNil() {
+ x.PodSignature = PodSignature{}
+ } else {
+ yyv4 := &x.PodSignature
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "evictionTime":
+ if r.TryDecodeAsNil() {
+ x.EvictionTime = pkg2_v1.Time{}
+ } else {
+ yyv5 := &x.EvictionTime
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv5) {
+ } else if yym6 {
+ z.DecBinaryUnmarshal(yyv5)
+ } else if !yym6 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv5)
+ } else {
+ z.DecFallback(yyv5, false)
+ }
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv7 := &x.Reason
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*string)(yyv7)) = r.DecodeString()
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv9 := &x.Message
+ 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_containerMapEnd1234)
+}
+
+func (x *PreferAvoidPodsEntry) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PodSignature = PodSignature{}
+ } else {
+ yyv12 := &x.PodSignature
+ yyv12.CodecDecodeSelf(d)
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.EvictionTime = pkg2_v1.Time{}
+ } else {
+ yyv13 := &x.EvictionTime
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv13) {
+ } else if yym14 {
+ z.DecBinaryUnmarshal(yyv13)
+ } else if !yym14 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv13)
+ } else {
+ z.DecFallback(yyv13, false)
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv15 := &x.Reason
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*string)(yyv15)) = r.DecodeString()
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv17 := &x.Message
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodSignature) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = x.PodController != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.PodController == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.PodController) {
+ } else {
+ z.EncFallback(x.PodController)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podController"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PodController == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.PodController) {
+ } else {
+ z.EncFallback(x.PodController)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodSignature) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodSignature) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "podController":
+ if r.TryDecodeAsNil() {
+ if x.PodController != nil {
+ x.PodController = nil
+ }
+ } else {
+ if x.PodController == nil {
+ x.PodController = new(pkg2_v1.OwnerReference)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.PodController) {
+ } else {
+ z.DecFallback(x.PodController, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodSignature) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PodController != nil {
+ x.PodController = nil
+ }
+ } else {
+ if x.PodController == nil {
+ x.PodController = new(pkg2_v1.OwnerReference)
+ }
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.PodController) {
+ } else {
+ z.DecFallback(x.PodController, false)
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ContainerImage) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.SizeBytes != 0
+ 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_containerArrayElem1234)
+ if x.Names == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Names, false, e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("names"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Names == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Names, false, e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(x.SizeBytes))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("sizeBytes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.SizeBytes))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ContainerImage) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ContainerImage) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "names":
+ if r.TryDecodeAsNil() {
+ x.Names = nil
+ } else {
+ yyv4 := &x.Names
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv4, false, d)
+ }
+ }
+ case "sizeBytes":
+ if r.TryDecodeAsNil() {
+ x.SizeBytes = 0
+ } else {
+ yyv6 := &x.SizeBytes
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int64)(yyv6)) = int64(r.DecodeInt(64))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ContainerImage) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Names = nil
+ } else {
+ yyv9 := &x.Names
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv9, false, d)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SizeBytes = 0
+ } else {
+ yyv11 := &x.SizeBytes
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int64)(yyv11)) = int64(r.DecodeInt(64))
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x NodePhase) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *NodePhase) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 NodeConditionType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *NodeConditionType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *NodeCondition) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = true
+ yyq2[3] = true
+ yyq2[4] = x.Reason != ""
+ yyq2[5] = x.Message != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Status.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Status.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy10 := &x.LastHeartbeatTime
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy10) {
+ } else if yym11 {
+ z.EncBinaryMarshal(yy10)
+ } else if !yym11 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy10)
+ } else {
+ z.EncFallback(yy10)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastHeartbeatTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.LastHeartbeatTime
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if yym13 {
+ z.EncBinaryMarshal(yy12)
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.LastTransitionTime
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy15) {
+ } else if yym16 {
+ z.EncBinaryMarshal(yy15)
+ } else if !yym16 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy15)
+ } else {
+ z.EncFallback(yy15)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.LastTransitionTime
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy17) {
+ } else if yym18 {
+ z.EncBinaryMarshal(yy17)
+ } else if !yym18 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy17)
+ } else {
+ z.EncFallback(yy17)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NodeCondition) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NodeCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "lastHeartbeatTime":
+ if r.TryDecodeAsNil() {
+ x.LastHeartbeatTime = pkg2_v1.Time{}
+ } else {
+ yyv6 := &x.LastHeartbeatTime
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if yym7 {
+ z.DecBinaryUnmarshal(yyv6)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ case "lastTransitionTime":
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg2_v1.Time{}
+ } else {
+ yyv8 := &x.LastTransitionTime
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv8) {
+ } else if yym9 {
+ z.DecBinaryUnmarshal(yyv8)
+ } else if !yym9 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv8)
+ } else {
+ z.DecFallback(yyv8, false)
+ }
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv10 := &x.Reason
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv12 := &x.Message
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv15 := &x.Type
+ yyv15.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv16 := &x.Status
+ yyv16.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastHeartbeatTime = pkg2_v1.Time{}
+ } else {
+ yyv17 := &x.LastHeartbeatTime
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv17) {
+ } else if yym18 {
+ z.DecBinaryUnmarshal(yyv17)
+ } else if !yym18 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv17)
+ } else {
+ z.DecFallback(yyv17, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg2_v1.Time{}
+ } else {
+ yyv19 := &x.LastTransitionTime
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv19) {
+ } else if yym20 {
+ z.DecBinaryUnmarshal(yyv19)
+ } else if !yym20 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv19)
+ } else {
+ z.DecFallback(yyv19, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv21 := &x.Reason
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv23 := &x.Message
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*string)(yyv23)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x NodeAddressType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *NodeAddressType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *NodeAddress) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Address))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("address"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Address))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NodeAddress) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NodeAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "address":
+ if r.TryDecodeAsNil() {
+ x.Address = ""
+ } else {
+ yyv5 := &x.Address
+ 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_containerMapEnd1234)
+}
+
+func (x *NodeAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv8 := &x.Type
+ yyv8.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Address = ""
+ } else {
+ yyv9 := &x.Address
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x ResourceName) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *ResourceName) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 ResourceList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 {
+ h.encResourceList((ResourceList)(x), e)
+ }
+ }
+}
+
+func (x *ResourceList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ h.decResourceList((*ResourceList)(x), d)
+ }
+}
+
+func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Node) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 = NodeSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = NodeStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = NodeSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = NodeStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NodeList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceNode(([]Node)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceNode(([]Node)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NodeList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NodeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSliceNode((*[]Node)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NodeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceNode((*[]Node)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x FinalizerName) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *FinalizerName) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *NamespaceSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = len(x.Finalizers) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Finalizers == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceFinalizerName(([]FinalizerName)(x.Finalizers), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("finalizers"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Finalizers == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceFinalizerName(([]FinalizerName)(x.Finalizers), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NamespaceSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NamespaceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "finalizers":
+ if r.TryDecodeAsNil() {
+ x.Finalizers = nil
+ } else {
+ yyv4 := &x.Finalizers
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceFinalizerName((*[]FinalizerName)(yyv4), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NamespaceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Finalizers = nil
+ } else {
+ yyv7 := &x.Finalizers
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSliceFinalizerName((*[]FinalizerName)(yyv7), d)
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NamespaceStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = x.Phase != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ x.Phase.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("phase"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Phase.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NamespaceStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NamespaceStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "phase":
+ if r.TryDecodeAsNil() {
+ x.Phase = ""
+ } else {
+ yyv4 := &x.Phase
+ yyv4.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NamespaceStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj5 int
+ var yyb5 bool
+ var yyhl5 bool = l >= 0
+ yyj5++
+ if yyhl5 {
+ yyb5 = yyj5 > l
+ } else {
+ yyb5 = r.CheckBreak()
+ }
+ if yyb5 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Phase = ""
+ } else {
+ yyv6 := &x.Phase
+ yyv6.CodecDecodeSelf(d)
+ }
+ for {
+ yyj5++
+ if yyhl5 {
+ yyb5 = yyj5 > l
+ } else {
+ yyb5 = r.CheckBreak()
+ }
+ if yyb5 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj5-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x NamespacePhase) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *NamespacePhase) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *Namespace) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Namespace) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Namespace) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 = NamespaceSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = NamespaceStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = NamespaceSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = NamespaceStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NamespaceList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceNamespace(([]Namespace)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceNamespace(([]Namespace)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NamespaceList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NamespaceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSliceNamespace((*[]Namespace)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NamespaceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceNamespace((*[]Namespace)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Binding) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ yy15 := &x.Target
+ yy15.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("target"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Target
+ yy17.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Binding) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Binding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 "target":
+ if r.TryDecodeAsNil() {
+ x.Target = ObjectReference{}
+ } else {
+ yyv10 := &x.Target
+ yyv10.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv12 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv14 := &x.APIVersion
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv16 := &x.ObjectMeta
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv16) {
+ } else {
+ z.DecFallback(yyv16, false)
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Target = ObjectReference{}
+ } else {
+ yyv18 := &x.Target
+ yyv18.CodecDecodeSelf(d)
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Preconditions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = x.UID != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.UID == nil {
+ r.EncodeNil()
+ } else {
+ yy4 := *x.UID
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy4) {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yy4))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("uid"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.UID == nil {
+ r.EncodeNil()
+ } else {
+ yy6 := *x.UID
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy6) {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yy6))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Preconditions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Preconditions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "uid":
+ if r.TryDecodeAsNil() {
+ if x.UID != nil {
+ x.UID = nil
+ }
+ } else {
+ if x.UID == nil {
+ x.UID = new(pkg1_types.UID)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.UID) {
+ } else {
+ *((*string)(x.UID)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Preconditions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.UID != nil {
+ x.UID = nil
+ }
+ } else {
+ if x.UID == nil {
+ x.UID = new(pkg1_types.UID)
+ }
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.UID) {
+ } else {
+ *((*string)(x.UID)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x DeletionPropagation) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *DeletionPropagation) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Kind != ""
+ yyq2[1] = x.APIVersion != ""
+ yyq2[2] = x.GracePeriodSeconds != nil
+ yyq2[3] = x.Preconditions != nil
+ yyq2[4] = x.OrphanDependents != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.GracePeriodSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy10 := *x.GracePeriodSeconds
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(yy10))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("gracePeriodSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.GracePeriodSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy12 := *x.GracePeriodSeconds
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(yy12))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Preconditions == nil {
+ r.EncodeNil()
+ } else {
+ x.Preconditions.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("preconditions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Preconditions == nil {
+ r.EncodeNil()
+ } else {
+ x.Preconditions.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.OrphanDependents == nil {
+ r.EncodeNil()
+ } else {
+ yy18 := *x.OrphanDependents
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeBool(bool(yy18))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("orphanDependents"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.OrphanDependents == nil {
+ r.EncodeNil()
+ } else {
+ yy20 := *x.OrphanDependents
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeBool(bool(yy20))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.PropagationPolicy == nil {
+ r.EncodeNil()
+ } else {
+ yy23 := *x.PropagationPolicy
+ yy23.CodecEncodeSelf(e)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("PropagationPolicy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PropagationPolicy == nil {
+ r.EncodeNil()
+ } else {
+ yy25 := *x.PropagationPolicy
+ yy25.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DeleteOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DeleteOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "gracePeriodSeconds":
+ if r.TryDecodeAsNil() {
+ if x.GracePeriodSeconds != nil {
+ x.GracePeriodSeconds = nil
+ }
+ } else {
+ if x.GracePeriodSeconds == nil {
+ x.GracePeriodSeconds = new(int64)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int64)(x.GracePeriodSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "preconditions":
+ if r.TryDecodeAsNil() {
+ if x.Preconditions != nil {
+ x.Preconditions = nil
+ }
+ } else {
+ if x.Preconditions == nil {
+ x.Preconditions = new(Preconditions)
+ }
+ x.Preconditions.CodecDecodeSelf(d)
+ }
+ case "orphanDependents":
+ if r.TryDecodeAsNil() {
+ if x.OrphanDependents != nil {
+ x.OrphanDependents = nil
+ }
+ } else {
+ if x.OrphanDependents == nil {
+ x.OrphanDependents = new(bool)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*bool)(x.OrphanDependents)) = r.DecodeBool()
+ }
+ }
+ case "PropagationPolicy":
+ if r.TryDecodeAsNil() {
+ if x.PropagationPolicy != nil {
+ x.PropagationPolicy = nil
+ }
+ } else {
+ if x.PropagationPolicy == nil {
+ x.PropagationPolicy = new(DeletionPropagation)
+ }
+ x.PropagationPolicy.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv15 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv17 := &x.APIVersion
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.GracePeriodSeconds != nil {
+ x.GracePeriodSeconds = nil
+ }
+ } else {
+ if x.GracePeriodSeconds == nil {
+ x.GracePeriodSeconds = new(int64)
+ }
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*int64)(x.GracePeriodSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Preconditions != nil {
+ x.Preconditions = nil
+ }
+ } else {
+ if x.Preconditions == nil {
+ x.Preconditions = new(Preconditions)
+ }
+ x.Preconditions.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.OrphanDependents != nil {
+ x.OrphanDependents = nil
+ }
+ } else {
+ if x.OrphanDependents == nil {
+ x.OrphanDependents = new(bool)
+ }
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else {
+ *((*bool)(x.OrphanDependents)) = r.DecodeBool()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PropagationPolicy != nil {
+ x.PropagationPolicy = nil
+ }
+ } else {
+ if x.PropagationPolicy == nil {
+ x.PropagationPolicy = new(DeletionPropagation)
+ }
+ x.PropagationPolicy.CodecDecodeSelf(d)
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Kind != ""
+ yyq2[1] = x.APIVersion != ""
+ yyq2[2] = x.LabelSelector != ""
+ yyq2[3] = x.FieldSelector != ""
+ yyq2[4] = x.IncludeUninitialized != false
+ yyq2[5] = x.Watch != false
+ yyq2[6] = x.ResourceVersion != ""
+ yyq2[7] = x.TimeoutSeconds != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.LabelSelector))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("labelSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.LabelSelector))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FieldSelector))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fieldSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FieldSelector))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeBool(bool(x.IncludeUninitialized))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("includeUninitialized"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeBool(bool(x.IncludeUninitialized))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Watch))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("watch"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Watch))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resourceVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.TimeoutSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy25 := *x.TimeoutSeconds
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeInt(int64(yy25))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("timeoutSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TimeoutSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy27 := *x.TimeoutSeconds
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeInt(int64(yy27))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ListOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ListOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "labelSelector":
+ if r.TryDecodeAsNil() {
+ x.LabelSelector = ""
+ } else {
+ yyv8 := &x.LabelSelector
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "fieldSelector":
+ if r.TryDecodeAsNil() {
+ x.FieldSelector = ""
+ } else {
+ yyv10 := &x.FieldSelector
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "includeUninitialized":
+ if r.TryDecodeAsNil() {
+ x.IncludeUninitialized = false
+ } else {
+ yyv12 := &x.IncludeUninitialized
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*bool)(yyv12)) = r.DecodeBool()
+ }
+ }
+ case "watch":
+ if r.TryDecodeAsNil() {
+ x.Watch = false
+ } else {
+ yyv14 := &x.Watch
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*bool)(yyv14)) = r.DecodeBool()
+ }
+ }
+ case "resourceVersion":
+ if r.TryDecodeAsNil() {
+ x.ResourceVersion = ""
+ } else {
+ yyv16 := &x.ResourceVersion
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ case "timeoutSeconds":
+ if r.TryDecodeAsNil() {
+ if x.TimeoutSeconds != nil {
+ x.TimeoutSeconds = nil
+ }
+ } else {
+ if x.TimeoutSeconds == nil {
+ x.TimeoutSeconds = new(int64)
+ }
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*int64)(x.TimeoutSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj20 int
+ var yyb20 bool
+ var yyhl20 bool = l >= 0
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv21 := &x.Kind
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv23 := &x.APIVersion
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*string)(yyv23)) = r.DecodeString()
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LabelSelector = ""
+ } else {
+ yyv25 := &x.LabelSelector
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*string)(yyv25)) = r.DecodeString()
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FieldSelector = ""
+ } else {
+ yyv27 := &x.FieldSelector
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*string)(yyv27)) = r.DecodeString()
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.IncludeUninitialized = false
+ } else {
+ yyv29 := &x.IncludeUninitialized
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*bool)(yyv29)) = r.DecodeBool()
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Watch = false
+ } else {
+ yyv31 := &x.Watch
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*bool)(yyv31)) = r.DecodeBool()
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ResourceVersion = ""
+ } else {
+ yyv33 := &x.ResourceVersion
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ *((*string)(yyv33)) = r.DecodeString()
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.TimeoutSeconds != nil {
+ x.TimeoutSeconds = nil
+ }
+ } else {
+ if x.TimeoutSeconds == nil {
+ x.TimeoutSeconds = new(int64)
+ }
+ yym36 := z.DecBinary()
+ _ = yym36
+ if false {
+ } else {
+ *((*int64)(x.TimeoutSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ for {
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj20-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [10]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Kind != ""
+ yyq2[1] = x.APIVersion != ""
+ yyq2[2] = x.Container != ""
+ yyq2[3] = x.Follow != false
+ yyq2[4] = x.Previous != false
+ yyq2[5] = x.SinceSeconds != nil
+ yyq2[6] = x.SinceTime != nil
+ yyq2[7] = x.Timestamps != false
+ yyq2[8] = x.TailLines != nil
+ yyq2[9] = x.LimitBytes != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(10)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Container))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("container"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Container))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Follow))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("follow"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Follow))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Previous))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("previous"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Previous))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.SinceSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy19 := *x.SinceSeconds
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeInt(int64(yy19))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("sinceSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SinceSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy21 := *x.SinceSeconds
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeInt(int64(yy21))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.SinceTime == nil {
+ r.EncodeNil()
+ } else {
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.SinceTime) {
+ } else if yym24 {
+ z.EncBinaryMarshal(x.SinceTime)
+ } else if !yym24 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.SinceTime)
+ } else {
+ z.EncFallback(x.SinceTime)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("sinceTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SinceTime == nil {
+ r.EncodeNil()
+ } else {
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.SinceTime) {
+ } else if yym25 {
+ z.EncBinaryMarshal(x.SinceTime)
+ } else if !yym25 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.SinceTime)
+ } else {
+ z.EncFallback(x.SinceTime)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ yym27 := z.EncBinary()
+ _ = yym27
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Timestamps))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("timestamps"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Timestamps))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ if x.TailLines == nil {
+ r.EncodeNil()
+ } else {
+ yy30 := *x.TailLines
+ yym31 := z.EncBinary()
+ _ = yym31
+ if false {
+ } else {
+ r.EncodeInt(int64(yy30))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("tailLines"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TailLines == nil {
+ r.EncodeNil()
+ } else {
+ yy32 := *x.TailLines
+ yym33 := z.EncBinary()
+ _ = yym33
+ if false {
+ } else {
+ r.EncodeInt(int64(yy32))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ if x.LimitBytes == nil {
+ r.EncodeNil()
+ } else {
+ yy35 := *x.LimitBytes
+ yym36 := z.EncBinary()
+ _ = yym36
+ if false {
+ } else {
+ r.EncodeInt(int64(yy35))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("limitBytes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.LimitBytes == nil {
+ r.EncodeNil()
+ } else {
+ yy37 := *x.LimitBytes
+ yym38 := z.EncBinary()
+ _ = yym38
+ if false {
+ } else {
+ r.EncodeInt(int64(yy37))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodLogOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "container":
+ if r.TryDecodeAsNil() {
+ x.Container = ""
+ } else {
+ yyv8 := &x.Container
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "follow":
+ if r.TryDecodeAsNil() {
+ x.Follow = false
+ } else {
+ yyv10 := &x.Follow
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*bool)(yyv10)) = r.DecodeBool()
+ }
+ }
+ case "previous":
+ if r.TryDecodeAsNil() {
+ x.Previous = false
+ } else {
+ yyv12 := &x.Previous
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*bool)(yyv12)) = r.DecodeBool()
+ }
+ }
+ case "sinceSeconds":
+ if r.TryDecodeAsNil() {
+ if x.SinceSeconds != nil {
+ x.SinceSeconds = nil
+ }
+ } else {
+ if x.SinceSeconds == nil {
+ x.SinceSeconds = new(int64)
+ }
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*int64)(x.SinceSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "sinceTime":
+ if r.TryDecodeAsNil() {
+ if x.SinceTime != nil {
+ x.SinceTime = nil
+ }
+ } else {
+ if x.SinceTime == nil {
+ x.SinceTime = new(pkg2_v1.Time)
+ }
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.SinceTime) {
+ } else if yym17 {
+ z.DecBinaryUnmarshal(x.SinceTime)
+ } else if !yym17 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.SinceTime)
+ } else {
+ z.DecFallback(x.SinceTime, false)
+ }
+ }
+ case "timestamps":
+ if r.TryDecodeAsNil() {
+ x.Timestamps = false
+ } else {
+ yyv18 := &x.Timestamps
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*bool)(yyv18)) = r.DecodeBool()
+ }
+ }
+ case "tailLines":
+ if r.TryDecodeAsNil() {
+ if x.TailLines != nil {
+ x.TailLines = nil
+ }
+ } else {
+ if x.TailLines == nil {
+ x.TailLines = new(int64)
+ }
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ *((*int64)(x.TailLines)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "limitBytes":
+ if r.TryDecodeAsNil() {
+ if x.LimitBytes != nil {
+ x.LimitBytes = nil
+ }
+ } else {
+ if x.LimitBytes == nil {
+ x.LimitBytes = new(int64)
+ }
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else {
+ *((*int64)(x.LimitBytes)) = int64(r.DecodeInt(64))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj24 int
+ var yyb24 bool
+ var yyhl24 bool = l >= 0
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv25 := &x.Kind
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*string)(yyv25)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv27 := &x.APIVersion
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*string)(yyv27)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Container = ""
+ } else {
+ yyv29 := &x.Container
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*string)(yyv29)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Follow = false
+ } else {
+ yyv31 := &x.Follow
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*bool)(yyv31)) = r.DecodeBool()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Previous = false
+ } else {
+ yyv33 := &x.Previous
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ *((*bool)(yyv33)) = r.DecodeBool()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SinceSeconds != nil {
+ x.SinceSeconds = nil
+ }
+ } else {
+ if x.SinceSeconds == nil {
+ x.SinceSeconds = new(int64)
+ }
+ yym36 := z.DecBinary()
+ _ = yym36
+ if false {
+ } else {
+ *((*int64)(x.SinceSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SinceTime != nil {
+ x.SinceTime = nil
+ }
+ } else {
+ if x.SinceTime == nil {
+ x.SinceTime = new(pkg2_v1.Time)
+ }
+ yym38 := z.DecBinary()
+ _ = yym38
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.SinceTime) {
+ } else if yym38 {
+ z.DecBinaryUnmarshal(x.SinceTime)
+ } else if !yym38 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.SinceTime)
+ } else {
+ z.DecFallback(x.SinceTime, false)
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Timestamps = false
+ } else {
+ yyv39 := &x.Timestamps
+ yym40 := z.DecBinary()
+ _ = yym40
+ if false {
+ } else {
+ *((*bool)(yyv39)) = r.DecodeBool()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.TailLines != nil {
+ x.TailLines = nil
+ }
+ } else {
+ if x.TailLines == nil {
+ x.TailLines = new(int64)
+ }
+ yym42 := z.DecBinary()
+ _ = yym42
+ if false {
+ } else {
+ *((*int64)(x.TailLines)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.LimitBytes != nil {
+ x.LimitBytes = nil
+ }
+ } else {
+ if x.LimitBytes == nil {
+ x.LimitBytes = new(int64)
+ }
+ yym44 := z.DecBinary()
+ _ = yym44
+ if false {
+ } else {
+ *((*int64)(x.LimitBytes)) = int64(r.DecodeInt(64))
+ }
+ }
+ for {
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj24-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [7]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Kind != ""
+ yyq2[1] = x.APIVersion != ""
+ yyq2[2] = x.Stdin != false
+ yyq2[3] = x.Stdout != false
+ yyq2[4] = x.Stderr != false
+ yyq2[5] = x.TTY != false
+ yyq2[6] = x.Container != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(7)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdin))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stdin"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdin))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdout))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stdout"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdout))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stderr))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stderr"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stderr))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeBool(bool(x.TTY))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("tty"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeBool(bool(x.TTY))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Container))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("container"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Container))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodAttachOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodAttachOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "stdin":
+ if r.TryDecodeAsNil() {
+ x.Stdin = false
+ } else {
+ yyv8 := &x.Stdin
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(yyv8)) = r.DecodeBool()
+ }
+ }
+ case "stdout":
+ if r.TryDecodeAsNil() {
+ x.Stdout = false
+ } else {
+ yyv10 := &x.Stdout
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*bool)(yyv10)) = r.DecodeBool()
+ }
+ }
+ case "stderr":
+ if r.TryDecodeAsNil() {
+ x.Stderr = false
+ } else {
+ yyv12 := &x.Stderr
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*bool)(yyv12)) = r.DecodeBool()
+ }
+ }
+ case "tty":
+ if r.TryDecodeAsNil() {
+ x.TTY = false
+ } else {
+ yyv14 := &x.TTY
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*bool)(yyv14)) = r.DecodeBool()
+ }
+ }
+ case "container":
+ if r.TryDecodeAsNil() {
+ x.Container = ""
+ } else {
+ yyv16 := &x.Container
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj18 int
+ var yyb18 bool
+ var yyhl18 bool = l >= 0
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv19 := &x.Kind
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv21 := &x.APIVersion
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Stdin = false
+ } else {
+ yyv23 := &x.Stdin
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*bool)(yyv23)) = r.DecodeBool()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Stdout = false
+ } else {
+ yyv25 := &x.Stdout
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*bool)(yyv25)) = r.DecodeBool()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Stderr = false
+ } else {
+ yyv27 := &x.Stderr
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*bool)(yyv27)) = r.DecodeBool()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TTY = false
+ } else {
+ yyv29 := &x.TTY
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*bool)(yyv29)) = r.DecodeBool()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Container = ""
+ } else {
+ yyv31 := &x.Container
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*string)(yyv31)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj18-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Kind != ""
+ yyq2[1] = x.APIVersion != ""
+ yyq2[2] = x.Stdin != false
+ yyq2[3] = x.Stdout != false
+ yyq2[4] = x.Stderr != false
+ yyq2[5] = x.TTY != false
+ yyq2[6] = x.Container != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(8)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdin))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stdin"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdin))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdout))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stdout"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdout))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stderr))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stderr"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stderr))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeBool(bool(x.TTY))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("tty"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeBool(bool(x.TTY))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Container))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("container"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Container))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Command == nil {
+ r.EncodeNil()
+ } else {
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Command, false, e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("command"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Command == nil {
+ r.EncodeNil()
+ } else {
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Command, false, e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodExecOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodExecOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "stdin":
+ if r.TryDecodeAsNil() {
+ x.Stdin = false
+ } else {
+ yyv8 := &x.Stdin
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(yyv8)) = r.DecodeBool()
+ }
+ }
+ case "stdout":
+ if r.TryDecodeAsNil() {
+ x.Stdout = false
+ } else {
+ yyv10 := &x.Stdout
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*bool)(yyv10)) = r.DecodeBool()
+ }
+ }
+ case "stderr":
+ if r.TryDecodeAsNil() {
+ x.Stderr = false
+ } else {
+ yyv12 := &x.Stderr
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*bool)(yyv12)) = r.DecodeBool()
+ }
+ }
+ case "tty":
+ if r.TryDecodeAsNil() {
+ x.TTY = false
+ } else {
+ yyv14 := &x.TTY
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*bool)(yyv14)) = r.DecodeBool()
+ }
+ }
+ case "container":
+ if r.TryDecodeAsNil() {
+ x.Container = ""
+ } else {
+ yyv16 := &x.Container
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ case "command":
+ if r.TryDecodeAsNil() {
+ x.Command = nil
+ } else {
+ yyv18 := &x.Command
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv18, false, d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj20 int
+ var yyb20 bool
+ var yyhl20 bool = l >= 0
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv21 := &x.Kind
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv23 := &x.APIVersion
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*string)(yyv23)) = r.DecodeString()
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Stdin = false
+ } else {
+ yyv25 := &x.Stdin
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*bool)(yyv25)) = r.DecodeBool()
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Stdout = false
+ } else {
+ yyv27 := &x.Stdout
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*bool)(yyv27)) = r.DecodeBool()
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Stderr = false
+ } else {
+ yyv29 := &x.Stderr
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*bool)(yyv29)) = r.DecodeBool()
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TTY = false
+ } else {
+ yyv31 := &x.TTY
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*bool)(yyv31)) = r.DecodeBool()
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Container = ""
+ } else {
+ yyv33 := &x.Container
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ *((*string)(yyv33)) = r.DecodeString()
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Command = nil
+ } else {
+ yyv35 := &x.Command
+ yym36 := z.DecBinary()
+ _ = yym36
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv35, false, d)
+ }
+ }
+ for {
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj20-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodPortForwardOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Kind != ""
+ yyq2[1] = x.APIVersion != ""
+ yyq2[2] = len(x.Ports) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Ports == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.EncSliceInt32V(x.Ports, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ports"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Ports == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.EncSliceInt32V(x.Ports, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodPortForwardOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodPortForwardOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "ports":
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv8 := &x.Ports
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.DecSliceInt32X(yyv8, false, d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodPortForwardOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv11 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv13 := &x.APIVersion
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv15 := &x.Ports
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ z.F.DecSliceInt32X(yyv15, false, d)
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Kind != ""
+ yyq2[1] = x.APIVersion != ""
+ yyq2[2] = x.Path != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("path"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodProxyOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv8 := &x.Path
+ 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_containerMapEnd1234)
+}
+
+func (x *PodProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv11 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv13 := &x.APIVersion
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv15 := &x.Path
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NodeProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Kind != ""
+ yyq2[1] = x.APIVersion != ""
+ yyq2[2] = x.Path != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("path"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NodeProxyOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NodeProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv8 := &x.Path
+ 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_containerMapEnd1234)
+}
+
+func (x *NodeProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv11 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv13 := &x.APIVersion
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv15 := &x.Path
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ServiceProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Kind != ""
+ yyq2[1] = x.APIVersion != ""
+ yyq2[2] = x.Path != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("path"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ServiceProxyOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ServiceProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv8 := &x.Path
+ 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_containerMapEnd1234)
+}
+
+func (x *ServiceProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv11 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv13 := &x.APIVersion
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv15 := &x.Path
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [7]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Kind != ""
+ yyq2[1] = x.Namespace != ""
+ yyq2[2] = x.Name != ""
+ yyq2[3] = x.UID != ""
+ yyq2[4] = x.APIVersion != ""
+ yyq2[5] = x.ResourceVersion != ""
+ yyq2[6] = x.FieldPath != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(7)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("namespace"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.UID) {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.UID))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("uid"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.UID) {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.UID))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resourceVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FieldPath))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fieldPath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FieldPath))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ObjectReference) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "namespace":
+ if r.TryDecodeAsNil() {
+ x.Namespace = ""
+ } else {
+ yyv6 := &x.Namespace
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv8 := &x.Name
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "uid":
+ if r.TryDecodeAsNil() {
+ x.UID = ""
+ } else {
+ yyv10 := &x.UID
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv10) {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv12 := &x.APIVersion
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ case "resourceVersion":
+ if r.TryDecodeAsNil() {
+ x.ResourceVersion = ""
+ } else {
+ yyv14 := &x.ResourceVersion
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ case "fieldPath":
+ if r.TryDecodeAsNil() {
+ x.FieldPath = ""
+ } else {
+ yyv16 := &x.FieldPath
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj18 int
+ var yyb18 bool
+ var yyhl18 bool = l >= 0
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv19 := &x.Kind
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Namespace = ""
+ } else {
+ yyv21 := &x.Namespace
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv23 := &x.Name
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*string)(yyv23)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UID = ""
+ } else {
+ yyv25 := &x.UID
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv25) {
+ } else {
+ *((*string)(yyv25)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv27 := &x.APIVersion
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*string)(yyv27)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ResourceVersion = ""
+ } else {
+ yyv29 := &x.ResourceVersion
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*string)(yyv29)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FieldPath = ""
+ } else {
+ yyv31 := &x.FieldPath
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*string)(yyv31)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj18-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *LocalObjectReference) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = x.Name != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *LocalObjectReference) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *LocalObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *LocalObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv7 := &x.Name
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*string)(yyv7)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *SerializedReference) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Kind != ""
+ yyq2[1] = x.APIVersion != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy10 := &x.Reference
+ yy10.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reference"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.Reference
+ yy12.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SerializedReference) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SerializedReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "reference":
+ if r.TryDecodeAsNil() {
+ x.Reference = ObjectReference{}
+ } else {
+ yyv8 := &x.Reference
+ yyv8.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SerializedReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv10 := &x.Kind
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv12 := &x.APIVersion
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reference = ObjectReference{}
+ } else {
+ yyv14 := &x.Reference
+ yyv14.CodecDecodeSelf(d)
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *EventSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Component != ""
+ yyq2[1] = x.Host != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Component))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("component"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Component))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Host))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("host"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Host))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *EventSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *EventSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "component":
+ if r.TryDecodeAsNil() {
+ x.Component = ""
+ } else {
+ yyv4 := &x.Component
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "host":
+ if r.TryDecodeAsNil() {
+ x.Host = ""
+ } else {
+ yyv6 := &x.Host
+ 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_containerMapEnd1234)
+}
+
+func (x *EventSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Component = ""
+ } else {
+ yyv9 := &x.Component
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Host = ""
+ } else {
+ yyv11 := &x.Host
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [11]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Kind != ""
+ yyq2[1] = x.APIVersion != ""
+ yyq2[4] = x.Reason != ""
+ yyq2[5] = x.Message != ""
+ yyq2[6] = true
+ yyq2[7] = true
+ yyq2[8] = true
+ yyq2[9] = x.Count != 0
+ yyq2[10] = x.Type != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(11)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy10 := &x.ObjectMeta
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy10) {
+ } else {
+ z.EncFallback(yy10)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ yy15 := &x.InvolvedObject
+ yy15.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("involvedObject"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.InvolvedObject
+ yy17.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yy26 := &x.Source
+ yy26.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("source"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy28 := &x.Source
+ yy28.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ yy31 := &x.FirstTimestamp
+ yym32 := z.EncBinary()
+ _ = yym32
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy31) {
+ } else if yym32 {
+ z.EncBinaryMarshal(yy31)
+ } else if !yym32 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy31)
+ } else {
+ z.EncFallback(yy31)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("firstTimestamp"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy33 := &x.FirstTimestamp
+ yym34 := z.EncBinary()
+ _ = yym34
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy33) {
+ } else if yym34 {
+ z.EncBinaryMarshal(yy33)
+ } else if !yym34 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy33)
+ } else {
+ z.EncFallback(yy33)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ yy36 := &x.LastTimestamp
+ yym37 := z.EncBinary()
+ _ = yym37
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy36) {
+ } else if yym37 {
+ z.EncBinaryMarshal(yy36)
+ } else if !yym37 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy36)
+ } else {
+ z.EncFallback(yy36)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastTimestamp"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy38 := &x.LastTimestamp
+ yym39 := z.EncBinary()
+ _ = yym39
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy38) {
+ } else if yym39 {
+ z.EncBinaryMarshal(yy38)
+ } else if !yym39 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy38)
+ } else {
+ z.EncFallback(yy38)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ yym41 := z.EncBinary()
+ _ = yym41
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Count))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("count"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym42 := z.EncBinary()
+ _ = yym42
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Count))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[10] {
+ yym44 := z.EncBinary()
+ _ = yym44
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Type))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[10] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym45 := z.EncBinary()
+ _ = yym45
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Type))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Event) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Event) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 "involvedObject":
+ if r.TryDecodeAsNil() {
+ x.InvolvedObject = ObjectReference{}
+ } else {
+ yyv10 := &x.InvolvedObject
+ 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()
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv13 := &x.Message
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ *((*string)(yyv13)) = r.DecodeString()
+ }
+ }
+ case "source":
+ if r.TryDecodeAsNil() {
+ x.Source = EventSource{}
+ } else {
+ yyv15 := &x.Source
+ yyv15.CodecDecodeSelf(d)
+ }
+ case "firstTimestamp":
+ if r.TryDecodeAsNil() {
+ x.FirstTimestamp = pkg2_v1.Time{}
+ } else {
+ yyv16 := &x.FirstTimestamp
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv16) {
+ } else if yym17 {
+ z.DecBinaryUnmarshal(yyv16)
+ } else if !yym17 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv16)
+ } else {
+ z.DecFallback(yyv16, false)
+ }
+ }
+ case "lastTimestamp":
+ if r.TryDecodeAsNil() {
+ x.LastTimestamp = pkg2_v1.Time{}
+ } else {
+ yyv18 := &x.LastTimestamp
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv18) {
+ } else if yym19 {
+ z.DecBinaryUnmarshal(yyv18)
+ } else if !yym19 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv18)
+ } else {
+ z.DecFallback(yyv18, false)
+ }
+ }
+ case "count":
+ if r.TryDecodeAsNil() {
+ x.Count = 0
+ } else {
+ yyv20 := &x.Count
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ *((*int32)(yyv20)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv22 := &x.Type
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else {
+ *((*string)(yyv22)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj24 int
+ var yyb24 bool
+ var yyhl24 bool = l >= 0
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv25 := &x.Kind
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*string)(yyv25)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv27 := &x.APIVersion
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*string)(yyv27)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv29 := &x.ObjectMeta
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv29) {
+ } else {
+ z.DecFallback(yyv29, false)
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.InvolvedObject = ObjectReference{}
+ } else {
+ yyv31 := &x.InvolvedObject
+ yyv31.CodecDecodeSelf(d)
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv32 := &x.Reason
+ yym33 := z.DecBinary()
+ _ = yym33
+ if false {
+ } else {
+ *((*string)(yyv32)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv34 := &x.Message
+ yym35 := z.DecBinary()
+ _ = yym35
+ if false {
+ } else {
+ *((*string)(yyv34)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Source = EventSource{}
+ } else {
+ yyv36 := &x.Source
+ yyv36.CodecDecodeSelf(d)
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FirstTimestamp = pkg2_v1.Time{}
+ } else {
+ yyv37 := &x.FirstTimestamp
+ yym38 := z.DecBinary()
+ _ = yym38
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv37) {
+ } else if yym38 {
+ z.DecBinaryUnmarshal(yyv37)
+ } else if !yym38 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv37)
+ } else {
+ z.DecFallback(yyv37, false)
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastTimestamp = pkg2_v1.Time{}
+ } else {
+ yyv39 := &x.LastTimestamp
+ yym40 := z.DecBinary()
+ _ = yym40
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv39) {
+ } else if yym40 {
+ z.DecBinaryUnmarshal(yyv39)
+ } else if !yym40 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv39)
+ } else {
+ z.DecFallback(yyv39, false)
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Count = 0
+ } else {
+ yyv41 := &x.Count
+ yym42 := z.DecBinary()
+ _ = yym42
+ if false {
+ } else {
+ *((*int32)(yyv41)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv43 := &x.Type
+ yym44 := z.DecBinary()
+ _ = yym44
+ if false {
+ } else {
+ *((*string)(yyv43)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj24-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *EventList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceEvent(([]Event)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceEvent(([]Event)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *EventList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *EventList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSliceEvent((*[]Event)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *EventList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceEvent((*[]Event)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *List) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceruntime_RawExtension(([]pkg5_runtime.RawExtension)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceruntime_RawExtension(([]pkg5_runtime.RawExtension)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *List) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *List) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSliceruntime_RawExtension((*[]pkg5_runtime.RawExtension)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *List) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceruntime_RawExtension((*[]pkg5_runtime.RawExtension)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x LimitType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *LimitType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Type != ""
+ yyq2[1] = len(x.Max) != 0
+ yyq2[2] = len(x.Min) != 0
+ yyq2[3] = len(x.Default) != 0
+ yyq2[4] = len(x.DefaultRequest) != 0
+ yyq2[5] = len(x.MaxLimitRequestRatio) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Max == nil {
+ r.EncodeNil()
+ } else {
+ x.Max.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("max"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Max == nil {
+ r.EncodeNil()
+ } else {
+ x.Max.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Min == nil {
+ r.EncodeNil()
+ } else {
+ x.Min.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("min"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Min == nil {
+ r.EncodeNil()
+ } else {
+ x.Min.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Default == nil {
+ r.EncodeNil()
+ } else {
+ x.Default.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("default"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Default == nil {
+ r.EncodeNil()
+ } else {
+ x.Default.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.DefaultRequest == nil {
+ r.EncodeNil()
+ } else {
+ x.DefaultRequest.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("defaultRequest"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.DefaultRequest == nil {
+ r.EncodeNil()
+ } else {
+ x.DefaultRequest.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.MaxLimitRequestRatio == nil {
+ r.EncodeNil()
+ } else {
+ x.MaxLimitRequestRatio.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("maxLimitRequestRatio"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.MaxLimitRequestRatio == nil {
+ r.EncodeNil()
+ } else {
+ x.MaxLimitRequestRatio.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *LimitRangeItem) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *LimitRangeItem) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "max":
+ if r.TryDecodeAsNil() {
+ x.Max = nil
+ } else {
+ yyv5 := &x.Max
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "min":
+ if r.TryDecodeAsNil() {
+ x.Min = nil
+ } else {
+ yyv6 := &x.Min
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "default":
+ if r.TryDecodeAsNil() {
+ x.Default = nil
+ } else {
+ yyv7 := &x.Default
+ yyv7.CodecDecodeSelf(d)
+ }
+ case "defaultRequest":
+ if r.TryDecodeAsNil() {
+ x.DefaultRequest = nil
+ } else {
+ yyv8 := &x.DefaultRequest
+ yyv8.CodecDecodeSelf(d)
+ }
+ case "maxLimitRequestRatio":
+ if r.TryDecodeAsNil() {
+ x.MaxLimitRequestRatio = nil
+ } else {
+ yyv9 := &x.MaxLimitRequestRatio
+ yyv9.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv11 := &x.Type
+ yyv11.CodecDecodeSelf(d)
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Max = nil
+ } else {
+ yyv12 := &x.Max
+ yyv12.CodecDecodeSelf(d)
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Min = nil
+ } else {
+ yyv13 := &x.Min
+ yyv13.CodecDecodeSelf(d)
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Default = nil
+ } else {
+ yyv14 := &x.Default
+ yyv14.CodecDecodeSelf(d)
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DefaultRequest = nil
+ } else {
+ yyv15 := &x.DefaultRequest
+ yyv15.CodecDecodeSelf(d)
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MaxLimitRequestRatio = nil
+ } else {
+ yyv16 := &x.MaxLimitRequestRatio
+ yyv16.CodecDecodeSelf(d)
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *LimitRangeSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if x.Limits == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceLimitRangeItem(([]LimitRangeItem)(x.Limits), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("limits"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Limits == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceLimitRangeItem(([]LimitRangeItem)(x.Limits), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *LimitRangeSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *LimitRangeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "limits":
+ if r.TryDecodeAsNil() {
+ x.Limits = nil
+ } else {
+ yyv4 := &x.Limits
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceLimitRangeItem((*[]LimitRangeItem)(yyv4), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *LimitRangeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Limits = nil
+ } else {
+ yyv7 := &x.Limits
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSliceLimitRangeItem((*[]LimitRangeItem)(yyv7), d)
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *LimitRange) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = true
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *LimitRange) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *LimitRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 = LimitRangeSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv12 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv14 := &x.APIVersion
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv16 := &x.ObjectMeta
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv16) {
+ } else {
+ z.DecFallback(yyv16, false)
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = LimitRangeSpec{}
+ } else {
+ yyv18 := &x.Spec
+ yyv18.CodecDecodeSelf(d)
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *LimitRangeList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceLimitRange(([]LimitRange)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceLimitRange(([]LimitRange)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *LimitRangeList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *LimitRangeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSliceLimitRange((*[]LimitRange)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *LimitRangeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceLimitRange((*[]LimitRange)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x ResourceQuotaScope) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *ResourceQuotaScope) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *ResourceQuotaSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Hard) != 0
+ yyq2[1] = len(x.Scopes) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Hard == nil {
+ r.EncodeNil()
+ } else {
+ x.Hard.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hard"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Hard == nil {
+ r.EncodeNil()
+ } else {
+ x.Hard.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Scopes == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceResourceQuotaScope(([]ResourceQuotaScope)(x.Scopes), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("scopes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Scopes == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceResourceQuotaScope(([]ResourceQuotaScope)(x.Scopes), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ResourceQuotaSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ResourceQuotaSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "hard":
+ if r.TryDecodeAsNil() {
+ x.Hard = nil
+ } else {
+ yyv4 := &x.Hard
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "scopes":
+ if r.TryDecodeAsNil() {
+ x.Scopes = nil
+ } else {
+ yyv5 := &x.Scopes
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSliceResourceQuotaScope((*[]ResourceQuotaScope)(yyv5), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ResourceQuotaSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Hard = nil
+ } else {
+ yyv8 := &x.Hard
+ yyv8.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Scopes = nil
+ } else {
+ yyv9 := &x.Scopes
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceResourceQuotaScope((*[]ResourceQuotaScope)(yyv9), d)
+ }
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ResourceQuotaStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Hard) != 0
+ yyq2[1] = len(x.Used) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Hard == nil {
+ r.EncodeNil()
+ } else {
+ x.Hard.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hard"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Hard == nil {
+ r.EncodeNil()
+ } else {
+ x.Hard.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Used == nil {
+ r.EncodeNil()
+ } else {
+ x.Used.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("used"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Used == nil {
+ r.EncodeNil()
+ } else {
+ x.Used.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ResourceQuotaStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ResourceQuotaStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "hard":
+ if r.TryDecodeAsNil() {
+ x.Hard = nil
+ } else {
+ yyv4 := &x.Hard
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "used":
+ if r.TryDecodeAsNil() {
+ x.Used = nil
+ } else {
+ yyv5 := &x.Used
+ yyv5.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ResourceQuotaStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Hard = nil
+ } else {
+ yyv7 := &x.Hard
+ yyv7.CodecDecodeSelf(d)
+ }
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Used = nil
+ } else {
+ yyv8 := &x.Used
+ yyv8.CodecDecodeSelf(d)
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ResourceQuota) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ResourceQuota) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ResourceQuota) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 = ResourceQuotaSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ResourceQuotaStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = ResourceQuotaSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ResourceQuotaStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ResourceQuotaList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceResourceQuota(([]ResourceQuota)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceResourceQuota(([]ResourceQuota)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ResourceQuotaList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ResourceQuotaList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSliceResourceQuota((*[]ResourceQuota)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ResourceQuotaList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceResourceQuota((*[]ResourceQuota)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Kind != ""
+ yyq2[1] = x.APIVersion != ""
+ yyq2[2] = true
+ yyq2[3] = len(x.Data) != 0
+ yyq2[4] = len(x.StringData) != 0
+ yyq2[5] = x.Type != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encMapstringSliceuint8((map[string][]uint8)(x.Data), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("data"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encMapstringSliceuint8((map[string][]uint8)(x.Data), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.StringData == nil {
+ r.EncodeNil()
+ } else {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.StringData, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stringData"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.StringData == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.StringData, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Secret) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Secret) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 "data":
+ if r.TryDecodeAsNil() {
+ x.Data = nil
+ } else {
+ yyv10 := &x.Data
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decMapstringSliceuint8((*map[string][]uint8)(yyv10), d)
+ }
+ }
+ case "stringData":
+ if r.TryDecodeAsNil() {
+ x.StringData = nil
+ } else {
+ yyv12 := &x.StringData
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv12, false, d)
+ }
+ }
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv14 := &x.Type
+ yyv14.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj15 int
+ var yyb15 bool
+ var yyhl15 bool = l >= 0
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv16 := &x.Kind
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv18 := &x.APIVersion
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*string)(yyv18)) = r.DecodeString()
+ }
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv20 := &x.ObjectMeta
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv20) {
+ } else {
+ z.DecFallback(yyv20, false)
+ }
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Data = nil
+ } else {
+ yyv22 := &x.Data
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else {
+ h.decMapstringSliceuint8((*map[string][]uint8)(yyv22), d)
+ }
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.StringData = nil
+ } else {
+ yyv24 := &x.StringData
+ yym25 := z.DecBinary()
+ _ = yym25
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv24, false, d)
+ }
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv26 := &x.Type
+ yyv26.CodecDecodeSelf(d)
+ }
+ for {
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj15-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x SecretType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *SecretType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *SecretList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceSecret(([]Secret)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceSecret(([]Secret)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SecretList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SecretList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSliceSecret((*[]Secret)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SecretList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceSecret((*[]Secret)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ConfigMap) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Data) != 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Data, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("data"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Data, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ConfigMap) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ConfigMap) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 "data":
+ if r.TryDecodeAsNil() {
+ x.Data = nil
+ } else {
+ yyv10 := &x.Data
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv10, false, d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Data = nil
+ } else {
+ yyv19 := &x.Data
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv19, false, d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ConfigMapList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceConfigMap(([]ConfigMap)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceConfigMap(([]ConfigMap)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ConfigMapList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ConfigMapList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSliceConfigMap((*[]ConfigMap)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ConfigMapList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceConfigMap((*[]ConfigMap)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x ComponentConditionType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *ComponentConditionType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *ComponentCondition) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = x.Message != ""
+ yyq2[3] = x.Error != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Status.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Status.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Error))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("error"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Error))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ComponentCondition) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ComponentCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv6 := &x.Message
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "error":
+ if r.TryDecodeAsNil() {
+ x.Error = ""
+ } else {
+ yyv8 := &x.Error
+ 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_containerMapEnd1234)
+}
+
+func (x *ComponentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv11 := &x.Type
+ yyv11.CodecDecodeSelf(d)
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv12 := &x.Status
+ yyv12.CodecDecodeSelf(d)
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv13 := &x.Message
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Error = ""
+ } else {
+ yyv15 := &x.Error
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Conditions) != 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceComponentCondition(([]ComponentCondition)(x.Conditions), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("conditions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceComponentCondition(([]ComponentCondition)(x.Conditions), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ComponentStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ComponentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 "conditions":
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv10 := &x.Conditions
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSliceComponentCondition((*[]ComponentCondition)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv19 := &x.Conditions
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceComponentCondition((*[]ComponentCondition)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ComponentStatusList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceComponentStatus(([]ComponentStatus)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceComponentStatus(([]ComponentStatus)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ComponentStatusList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ComponentStatusList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSliceComponentStatus((*[]ComponentStatus)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ComponentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceComponentStatus((*[]ComponentStatus)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DownwardAPIVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Items) != 0
+ yyq2[1] = x.DefaultMode != 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceDownwardAPIVolumeFile(([]DownwardAPIVolumeFile)(x.Items), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceDownwardAPIVolumeFile(([]DownwardAPIVolumeFile)(x.Items), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.DefaultMode == nil {
+ r.EncodeNil()
+ } else {
+ yy7 := *x.DefaultMode
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(yy7))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("defaultMode"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.DefaultMode == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.DefaultMode
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(yy9))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DownwardAPIVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DownwardAPIVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv4 := &x.Items
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceDownwardAPIVolumeFile((*[]DownwardAPIVolumeFile)(yyv4), d)
+ }
+ }
+ case "defaultMode":
+ if r.TryDecodeAsNil() {
+ if x.DefaultMode != nil {
+ x.DefaultMode = nil
+ }
+ } else {
+ if x.DefaultMode == nil {
+ x.DefaultMode = new(int32)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DownwardAPIVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv9 := &x.Items
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceDownwardAPIVolumeFile((*[]DownwardAPIVolumeFile)(yyv9), d)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.DefaultMode != nil {
+ x.DefaultMode = nil
+ }
+ } else {
+ if x.DefaultMode == nil {
+ x.DefaultMode = new(int32)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DownwardAPIVolumeFile) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.FieldRef != nil
+ yyq2[2] = x.ResourceFieldRef != nil
+ yyq2[3] = x.Mode != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("path"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.FieldRef == nil {
+ r.EncodeNil()
+ } else {
+ x.FieldRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fieldRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.FieldRef == nil {
+ r.EncodeNil()
+ } else {
+ x.FieldRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.ResourceFieldRef == nil {
+ r.EncodeNil()
+ } else {
+ x.ResourceFieldRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resourceFieldRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ResourceFieldRef == nil {
+ r.EncodeNil()
+ } else {
+ x.ResourceFieldRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Mode == nil {
+ r.EncodeNil()
+ } else {
+ yy13 := *x.Mode
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(yy13))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("mode"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Mode == nil {
+ r.EncodeNil()
+ } else {
+ yy15 := *x.Mode
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(yy15))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DownwardAPIVolumeFile) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DownwardAPIVolumeFile) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv4 := &x.Path
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "fieldRef":
+ if r.TryDecodeAsNil() {
+ if x.FieldRef != nil {
+ x.FieldRef = nil
+ }
+ } else {
+ if x.FieldRef == nil {
+ x.FieldRef = new(ObjectFieldSelector)
+ }
+ x.FieldRef.CodecDecodeSelf(d)
+ }
+ case "resourceFieldRef":
+ if r.TryDecodeAsNil() {
+ if x.ResourceFieldRef != nil {
+ x.ResourceFieldRef = nil
+ }
+ } else {
+ if x.ResourceFieldRef == nil {
+ x.ResourceFieldRef = new(ResourceFieldSelector)
+ }
+ x.ResourceFieldRef.CodecDecodeSelf(d)
+ }
+ case "mode":
+ if r.TryDecodeAsNil() {
+ if x.Mode != nil {
+ x.Mode = nil
+ }
+ } else {
+ if x.Mode == nil {
+ x.Mode = new(int32)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(x.Mode)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DownwardAPIVolumeFile) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv11 := &x.Path
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FieldRef != nil {
+ x.FieldRef = nil
+ }
+ } else {
+ if x.FieldRef == nil {
+ x.FieldRef = new(ObjectFieldSelector)
+ }
+ x.FieldRef.CodecDecodeSelf(d)
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ResourceFieldRef != nil {
+ x.ResourceFieldRef = nil
+ }
+ } else {
+ if x.ResourceFieldRef == nil {
+ x.ResourceFieldRef = new(ResourceFieldSelector)
+ }
+ x.ResourceFieldRef.CodecDecodeSelf(d)
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Mode != nil {
+ x.Mode = nil
+ }
+ } else {
+ if x.Mode == nil {
+ x.Mode = new(int32)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*int32)(x.Mode)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DownwardAPIProjection) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = len(x.Items) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceDownwardAPIVolumeFile(([]DownwardAPIVolumeFile)(x.Items), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceDownwardAPIVolumeFile(([]DownwardAPIVolumeFile)(x.Items), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DownwardAPIProjection) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DownwardAPIProjection) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv4 := &x.Items
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceDownwardAPIVolumeFile((*[]DownwardAPIVolumeFile)(yyv4), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DownwardAPIProjection) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv7 := &x.Items
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSliceDownwardAPIVolumeFile((*[]DownwardAPIVolumeFile)(yyv7), d)
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *SecurityContext) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Capabilities != nil
+ yyq2[1] = x.Privileged != nil
+ yyq2[2] = x.SELinuxOptions != nil
+ yyq2[3] = x.RunAsUser != nil
+ yyq2[4] = x.RunAsNonRoot != nil
+ yyq2[5] = x.ReadOnlyRootFilesystem != 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Capabilities == nil {
+ r.EncodeNil()
+ } else {
+ x.Capabilities.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("capabilities"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Capabilities == nil {
+ r.EncodeNil()
+ } else {
+ x.Capabilities.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Privileged == nil {
+ r.EncodeNil()
+ } else {
+ yy7 := *x.Privileged
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeBool(bool(yy7))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("privileged"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Privileged == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.Privileged
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(yy9))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.SELinuxOptions == nil {
+ r.EncodeNil()
+ } else {
+ x.SELinuxOptions.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("seLinuxOptions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SELinuxOptions == nil {
+ r.EncodeNil()
+ } else {
+ x.SELinuxOptions.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.RunAsUser == nil {
+ r.EncodeNil()
+ } else {
+ yy15 := *x.RunAsUser
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(yy15))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("runAsUser"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RunAsUser == nil {
+ r.EncodeNil()
+ } else {
+ yy17 := *x.RunAsUser
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeInt(int64(yy17))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.RunAsNonRoot == nil {
+ r.EncodeNil()
+ } else {
+ yy20 := *x.RunAsNonRoot
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeBool(bool(yy20))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("runAsNonRoot"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RunAsNonRoot == nil {
+ r.EncodeNil()
+ } else {
+ yy22 := *x.RunAsNonRoot
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeBool(bool(yy22))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.ReadOnlyRootFilesystem == nil {
+ r.EncodeNil()
+ } else {
+ yy25 := *x.ReadOnlyRootFilesystem
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeBool(bool(yy25))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnlyRootFilesystem"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ReadOnlyRootFilesystem == nil {
+ r.EncodeNil()
+ } else {
+ yy27 := *x.ReadOnlyRootFilesystem
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeBool(bool(yy27))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SecurityContext) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "capabilities":
+ if r.TryDecodeAsNil() {
+ if x.Capabilities != nil {
+ x.Capabilities = nil
+ }
+ } else {
+ if x.Capabilities == nil {
+ x.Capabilities = new(Capabilities)
+ }
+ x.Capabilities.CodecDecodeSelf(d)
+ }
+ case "privileged":
+ if r.TryDecodeAsNil() {
+ if x.Privileged != nil {
+ x.Privileged = nil
+ }
+ } else {
+ if x.Privileged == nil {
+ x.Privileged = new(bool)
+ }
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*bool)(x.Privileged)) = r.DecodeBool()
+ }
+ }
+ case "seLinuxOptions":
+ if r.TryDecodeAsNil() {
+ if x.SELinuxOptions != nil {
+ x.SELinuxOptions = nil
+ }
+ } else {
+ if x.SELinuxOptions == nil {
+ x.SELinuxOptions = new(SELinuxOptions)
+ }
+ x.SELinuxOptions.CodecDecodeSelf(d)
+ }
+ case "runAsUser":
+ if r.TryDecodeAsNil() {
+ if x.RunAsUser != nil {
+ x.RunAsUser = nil
+ }
+ } else {
+ if x.RunAsUser == nil {
+ x.RunAsUser = new(int64)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int64)(x.RunAsUser)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "runAsNonRoot":
+ if r.TryDecodeAsNil() {
+ if x.RunAsNonRoot != nil {
+ x.RunAsNonRoot = nil
+ }
+ } else {
+ if x.RunAsNonRoot == nil {
+ x.RunAsNonRoot = new(bool)
+ }
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*bool)(x.RunAsNonRoot)) = r.DecodeBool()
+ }
+ }
+ case "readOnlyRootFilesystem":
+ if r.TryDecodeAsNil() {
+ if x.ReadOnlyRootFilesystem != nil {
+ x.ReadOnlyRootFilesystem = nil
+ }
+ } else {
+ if x.ReadOnlyRootFilesystem == nil {
+ x.ReadOnlyRootFilesystem = new(bool)
+ }
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*bool)(x.ReadOnlyRootFilesystem)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Capabilities != nil {
+ x.Capabilities = nil
+ }
+ } else {
+ if x.Capabilities == nil {
+ x.Capabilities = new(Capabilities)
+ }
+ x.Capabilities.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Privileged != nil {
+ x.Privileged = nil
+ }
+ } else {
+ if x.Privileged == nil {
+ x.Privileged = new(bool)
+ }
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*bool)(x.Privileged)) = r.DecodeBool()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SELinuxOptions != nil {
+ x.SELinuxOptions = nil
+ }
+ } else {
+ if x.SELinuxOptions == nil {
+ x.SELinuxOptions = new(SELinuxOptions)
+ }
+ x.SELinuxOptions.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RunAsUser != nil {
+ x.RunAsUser = nil
+ }
+ } else {
+ if x.RunAsUser == nil {
+ x.RunAsUser = new(int64)
+ }
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*int64)(x.RunAsUser)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RunAsNonRoot != nil {
+ x.RunAsNonRoot = nil
+ }
+ } else {
+ if x.RunAsNonRoot == nil {
+ x.RunAsNonRoot = new(bool)
+ }
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*bool)(x.RunAsNonRoot)) = r.DecodeBool()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ReadOnlyRootFilesystem != nil {
+ x.ReadOnlyRootFilesystem = nil
+ }
+ } else {
+ if x.ReadOnlyRootFilesystem == nil {
+ x.ReadOnlyRootFilesystem = new(bool)
+ }
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*bool)(x.ReadOnlyRootFilesystem)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *SELinuxOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.User != ""
+ yyq2[1] = x.Role != ""
+ yyq2[2] = x.Type != ""
+ yyq2[3] = x.Level != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.User))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("user"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.User))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Role))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("role"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Role))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Type))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Type))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Level))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("level"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Level))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SELinuxOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SELinuxOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "user":
+ if r.TryDecodeAsNil() {
+ x.User = ""
+ } else {
+ yyv4 := &x.User
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "role":
+ if r.TryDecodeAsNil() {
+ x.Role = ""
+ } else {
+ yyv6 := &x.Role
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv8 := &x.Type
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "level":
+ if r.TryDecodeAsNil() {
+ x.Level = ""
+ } else {
+ yyv10 := &x.Level
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SELinuxOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.User = ""
+ } else {
+ yyv13 := &x.User
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Role = ""
+ } else {
+ yyv15 := &x.Role
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv17 := &x.Type
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Level = ""
+ } else {
+ yyv19 := &x.Level
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Range))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("range"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Range))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Data))
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("data"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Data))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RangeAllocation) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RangeAllocation) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 "range":
+ if r.TryDecodeAsNil() {
+ x.Range = ""
+ } else {
+ yyv10 := &x.Range
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "data":
+ if r.TryDecodeAsNil() {
+ x.Data = nil
+ } else {
+ yyv12 := &x.Data
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *yyv12 = r.DecodeBytes(*(*[]byte)(yyv12), false, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv15 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv17 := &x.APIVersion
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv19 := &x.ObjectMeta
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv19) {
+ } else {
+ z.DecFallback(yyv19, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Range = ""
+ } else {
+ yyv21 := &x.Range
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Data = nil
+ } else {
+ yyv23 := &x.Data
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *yyv23 = r.DecodeBytes(*(*[]byte)(yyv23), false, false)
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Sysctl) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("Name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Value))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("Value"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Value))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Sysctl) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Sysctl) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "Name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "Value":
+ if r.TryDecodeAsNil() {
+ x.Value = ""
+ } else {
+ yyv6 := &x.Value
+ 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_containerMapEnd1234)
+}
+
+func (x *Sysctl) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv9 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Value = ""
+ } else {
+ yyv11 := &x.Value
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NodeResources) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if x.Capacity == nil {
+ r.EncodeNil()
+ } else {
+ x.Capacity.CodecEncodeSelf(e)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("Capacity"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Capacity == nil {
+ r.EncodeNil()
+ } else {
+ x.Capacity.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NodeResources) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NodeResources) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "Capacity":
+ if r.TryDecodeAsNil() {
+ x.Capacity = nil
+ } else {
+ yyv4 := &x.Capacity
+ yyv4.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NodeResources) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj5 int
+ var yyb5 bool
+ var yyhl5 bool = l >= 0
+ yyj5++
+ if yyhl5 {
+ yyb5 = yyj5 > l
+ } else {
+ yyb5 = r.CheckBreak()
+ }
+ if yyb5 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Capacity = nil
+ } else {
+ yyv6 := &x.Capacity
+ yyv6.CodecDecodeSelf(d)
+ }
+ for {
+ yyj5++
+ if yyhl5 {
+ yyb5 = yyj5 > l
+ } else {
+ yyb5 = r.CheckBreak()
+ }
+ if yyb5 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj5-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encSlicev1_OwnerReference(v []pkg2_v1.OwnerReference, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yym3 := z.EncBinary()
+ _ = yym3
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy2) {
+ } else {
+ z.EncFallback(yy2)
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicev1_OwnerReference(v *[]pkg2_v1.OwnerReference, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+
+ yyv1 := *v
+ yyh1, yyl1 := z.DecSliceHelperStart()
+ var yyc1 bool
+ _ = yyc1
+ if yyl1 == 0 {
+ if yyv1 == nil {
+ yyv1 = []pkg2_v1.OwnerReference{}
+ 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, 80)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]pkg2_v1.OwnerReference, yyrl1)
+ }
+ } else {
+ yyv1 = make([]pkg2_v1.OwnerReference, 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] = pkg2_v1.OwnerReference{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yym3 := z.DecBinary()
+ _ = yym3
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv2) {
+ } else {
+ z.DecFallback(yyv2, false)
+ }
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, pkg2_v1.OwnerReference{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = pkg2_v1.OwnerReference{}
+ } else {
+ yyv4 := &yyv1[yyj1]
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, pkg2_v1.OwnerReference{}) // var yyz1 pkg2_v1.OwnerReference
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = pkg2_v1.OwnerReference{}
+ } else {
+ yyv6 := &yyv1[yyj1]
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+
+ } else {
+ z.DecSwallow()
+ }
+
+ }
+ if yyj1 < len(yyv1) {
+ yyv1 = yyv1[:yyj1]
+ yyc1 = true
+ } else if yyj1 == 0 && yyv1 == nil {
+ yyv1 = []pkg2_v1.OwnerReference{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSlicePersistentVolumeAccessMode(v []PersistentVolumeAccessMode, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yyv1.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicePersistentVolumeAccessMode(v *[]PersistentVolumeAccessMode, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []PersistentVolumeAccessMode{}
+ 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) {
+
+ yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]PersistentVolumeAccessMode, yyrl1)
+ }
+ } else {
+ yyv1 = make([]PersistentVolumeAccessMode, yyrl1)
+ }
+ yyc1 = true
+ yyrr1 = len(yyv1)
+ } else if yyl1 != len(yyv1) {
+ yyv1 = yyv1[:yyl1]
+ yyc1 = true
+ }
+ yyj1 := 0
+ for ; yyj1 < yyrr1; yyj1++ {
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, "") // var yyz1 PersistentVolumeAccessMode
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } 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 = []PersistentVolumeAccessMode{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSlicePersistentVolume(v []PersistentVolume, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicePersistentVolume(v *[]PersistentVolume, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []PersistentVolume{}
+ 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, 552)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]PersistentVolume, yyrl1)
+ }
+ } else {
+ yyv1 = make([]PersistentVolume, 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] = PersistentVolume{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, PersistentVolume{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PersistentVolume{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, PersistentVolume{}) // var yyz1 PersistentVolume
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PersistentVolume{}
+ } 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 = []PersistentVolume{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSlicePersistentVolumeClaim(v []PersistentVolumeClaim, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicePersistentVolumeClaim(v *[]PersistentVolumeClaim, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []PersistentVolumeClaim{}
+ 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, 384)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]PersistentVolumeClaim, yyrl1)
+ }
+ } else {
+ yyv1 = make([]PersistentVolumeClaim, 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] = PersistentVolumeClaim{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, PersistentVolumeClaim{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PersistentVolumeClaim{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, PersistentVolumeClaim{}) // var yyz1 PersistentVolumeClaim
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PersistentVolumeClaim{}
+ } 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 = []PersistentVolumeClaim{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceKeyToPath(v []KeyToPath, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceKeyToPath(v *[]KeyToPath, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []KeyToPath{}
+ 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, 40)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]KeyToPath, yyrl1)
+ }
+ } else {
+ yyv1 = make([]KeyToPath, 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] = KeyToPath{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, KeyToPath{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = KeyToPath{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, KeyToPath{}) // var yyz1 KeyToPath
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = KeyToPath{}
+ } 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 = []KeyToPath{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceVolumeProjection(v []VolumeProjection, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceVolumeProjection(v *[]VolumeProjection, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []VolumeProjection{}
+ 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, 24)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]VolumeProjection, yyrl1)
+ }
+ } else {
+ yyv1 = make([]VolumeProjection, 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] = VolumeProjection{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, VolumeProjection{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = VolumeProjection{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, VolumeProjection{}) // var yyz1 VolumeProjection
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = VolumeProjection{}
+ } 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 = []VolumeProjection{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceHTTPHeader(v []HTTPHeader, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceHTTPHeader(v *[]HTTPHeader, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []HTTPHeader{}
+ 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, 32)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]HTTPHeader, yyrl1)
+ }
+ } else {
+ yyv1 = make([]HTTPHeader, 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] = HTTPHeader{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, HTTPHeader{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = HTTPHeader{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, HTTPHeader{}) // var yyz1 HTTPHeader
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = HTTPHeader{}
+ } 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 = []HTTPHeader{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceCapability(v []Capability, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yyv1.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceCapability(v *[]Capability, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Capability{}
+ 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) {
+
+ yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Capability, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Capability, yyrl1)
+ }
+ yyc1 = true
+ yyrr1 = len(yyv1)
+ } else if yyl1 != len(yyv1) {
+ yyv1 = yyv1[:yyl1]
+ yyc1 = true
+ }
+ yyj1 := 0
+ for ; yyj1 < yyrr1; yyj1++ {
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, "") // var yyz1 Capability
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } 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 = []Capability{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceContainerPort(v []ContainerPort, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceContainerPort(v *[]ContainerPort, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ContainerPort{}
+ 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, 56)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ContainerPort, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ContainerPort, 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] = ContainerPort{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ContainerPort{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ContainerPort{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ContainerPort{}) // var yyz1 ContainerPort
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ContainerPort{}
+ } 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 = []ContainerPort{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceEnvFromSource(v []EnvFromSource, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceEnvFromSource(v *[]EnvFromSource, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []EnvFromSource{}
+ 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, 32)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]EnvFromSource, yyrl1)
+ }
+ } else {
+ yyv1 = make([]EnvFromSource, 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] = EnvFromSource{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, EnvFromSource{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = EnvFromSource{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, EnvFromSource{}) // var yyz1 EnvFromSource
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = EnvFromSource{}
+ } 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 = []EnvFromSource{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceEnvVar(v []EnvVar, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceEnvVar(v *[]EnvVar, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []EnvVar{}
+ 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, 40)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]EnvVar, yyrl1)
+ }
+ } else {
+ yyv1 = make([]EnvVar, 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] = EnvVar{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, EnvVar{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = EnvVar{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, EnvVar{}) // var yyz1 EnvVar
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = EnvVar{}
+ } 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 = []EnvVar{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceVolumeMount(v []VolumeMount, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceVolumeMount(v *[]VolumeMount, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []VolumeMount{}
+ 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, 56)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]VolumeMount, yyrl1)
+ }
+ } else {
+ yyv1 = make([]VolumeMount, 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] = VolumeMount{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, VolumeMount{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = VolumeMount{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, VolumeMount{}) // var yyz1 VolumeMount
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = VolumeMount{}
+ } 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 = []VolumeMount{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceNodeSelectorTerm(v []NodeSelectorTerm, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceNodeSelectorTerm(v *[]NodeSelectorTerm, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []NodeSelectorTerm{}
+ 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, 24)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]NodeSelectorTerm, yyrl1)
+ }
+ } else {
+ yyv1 = make([]NodeSelectorTerm, 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] = NodeSelectorTerm{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, NodeSelectorTerm{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NodeSelectorTerm{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, NodeSelectorTerm{}) // var yyz1 NodeSelectorTerm
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NodeSelectorTerm{}
+ } 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 = []NodeSelectorTerm{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceNodeSelectorRequirement(v []NodeSelectorRequirement, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceNodeSelectorRequirement(v *[]NodeSelectorRequirement, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []NodeSelectorRequirement{}
+ 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, 56)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]NodeSelectorRequirement, yyrl1)
+ }
+ } else {
+ yyv1 = make([]NodeSelectorRequirement, 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] = NodeSelectorRequirement{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, NodeSelectorRequirement{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NodeSelectorRequirement{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, NodeSelectorRequirement{}) // var yyz1 NodeSelectorRequirement
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NodeSelectorRequirement{}
+ } 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 = []NodeSelectorRequirement{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSlicePodAffinityTerm(v []PodAffinityTerm, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicePodAffinityTerm(v *[]PodAffinityTerm, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []PodAffinityTerm{}
+ 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, 48)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]PodAffinityTerm, yyrl1)
+ }
+ } else {
+ yyv1 = make([]PodAffinityTerm, 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] = PodAffinityTerm{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, PodAffinityTerm{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PodAffinityTerm{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, PodAffinityTerm{}) // var yyz1 PodAffinityTerm
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PodAffinityTerm{}
+ } 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 = []PodAffinityTerm{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceWeightedPodAffinityTerm(v []WeightedPodAffinityTerm, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceWeightedPodAffinityTerm(v *[]WeightedPodAffinityTerm, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []WeightedPodAffinityTerm{}
+ 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, 56)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]WeightedPodAffinityTerm, yyrl1)
+ }
+ } else {
+ yyv1 = make([]WeightedPodAffinityTerm, 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] = WeightedPodAffinityTerm{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, WeightedPodAffinityTerm{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = WeightedPodAffinityTerm{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, WeightedPodAffinityTerm{}) // var yyz1 WeightedPodAffinityTerm
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = WeightedPodAffinityTerm{}
+ } 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 = []WeightedPodAffinityTerm{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSlicePreferredSchedulingTerm(v []PreferredSchedulingTerm, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicePreferredSchedulingTerm(v *[]PreferredSchedulingTerm, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []PreferredSchedulingTerm{}
+ 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, 32)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]PreferredSchedulingTerm, yyrl1)
+ }
+ } else {
+ yyv1 = make([]PreferredSchedulingTerm, 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] = PreferredSchedulingTerm{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, PreferredSchedulingTerm{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PreferredSchedulingTerm{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, PreferredSchedulingTerm{}) // var yyz1 PreferredSchedulingTerm
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PreferredSchedulingTerm{}
+ } 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 = []PreferredSchedulingTerm{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceVolume(v []Volume, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceVolume(v *[]Volume, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Volume{}
+ 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, 232)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Volume, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Volume, 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] = Volume{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Volume{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Volume{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Volume{}) // var yyz1 Volume
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Volume{}
+ } 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 = []Volume{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceContainer(v []Container, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceContainer(v *[]Container, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Container{}
+ 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, 296)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Container, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Container, 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] = Container{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Container{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Container{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Container{}) // var yyz1 Container
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Container{}
+ } 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 = []Container{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceLocalObjectReference(v []LocalObjectReference, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceLocalObjectReference(v *[]LocalObjectReference, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []LocalObjectReference{}
+ 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, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]LocalObjectReference, yyrl1)
+ }
+ } else {
+ yyv1 = make([]LocalObjectReference, 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] = LocalObjectReference{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, LocalObjectReference{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = LocalObjectReference{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, LocalObjectReference{}) // var yyz1 LocalObjectReference
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = LocalObjectReference{}
+ } 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 = []LocalObjectReference{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceToleration(v []Toleration, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceToleration(v *[]Toleration, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []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([]Toleration, yyrl1)
+ }
+ } else {
+ yyv1 = make([]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] = Toleration{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Toleration{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Toleration{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Toleration{}) // var yyz1 Toleration
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = 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 = []Toleration{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceHostAlias(v []HostAlias, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceHostAlias(v *[]HostAlias, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []HostAlias{}
+ 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, 40)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]HostAlias, yyrl1)
+ }
+ } else {
+ yyv1 = make([]HostAlias, 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] = HostAlias{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, HostAlias{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = HostAlias{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, HostAlias{}) // var yyz1 HostAlias
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = HostAlias{}
+ } 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 = []HostAlias{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSlicePodCondition(v []PodCondition, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicePodCondition(v *[]PodCondition, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []PodCondition{}
+ 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, 112)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]PodCondition, yyrl1)
+ }
+ } else {
+ yyv1 = make([]PodCondition, 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] = PodCondition{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, PodCondition{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PodCondition{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, PodCondition{}) // var yyz1 PodCondition
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PodCondition{}
+ } 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 = []PodCondition{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceContainerStatus(v []ContainerStatus, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceContainerStatus(v *[]ContainerStatus, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ContainerStatus{}
+ 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, 120)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ContainerStatus, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ContainerStatus, 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] = ContainerStatus{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ContainerStatus{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ContainerStatus{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ContainerStatus{}) // var yyz1 ContainerStatus
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ContainerStatus{}
+ } 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 = []ContainerStatus{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSlicePod(v []Pod, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicePod(v *[]Pod, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Pod{}
+ 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, 768)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Pod, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Pod, 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] = Pod{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Pod{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Pod{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Pod{}) // var yyz1 Pod
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Pod{}
+ } 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 = []Pod{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSlicePodTemplate(v []PodTemplate, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicePodTemplate(v *[]PodTemplate, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []PodTemplate{}
+ 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, 824)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]PodTemplate, yyrl1)
+ }
+ } else {
+ yyv1 = make([]PodTemplate, 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] = PodTemplate{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, PodTemplate{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PodTemplate{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, PodTemplate{}) // var yyz1 PodTemplate
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PodTemplate{}
+ } 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 = []PodTemplate{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceReplicationControllerCondition(v []ReplicationControllerCondition, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceReplicationControllerCondition(v *[]ReplicationControllerCondition, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ReplicationControllerCondition{}
+ 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, 88)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ReplicationControllerCondition, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ReplicationControllerCondition, 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] = ReplicationControllerCondition{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ReplicationControllerCondition{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ReplicationControllerCondition{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ReplicationControllerCondition{}) // var yyz1 ReplicationControllerCondition
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ReplicationControllerCondition{}
+ } 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 = []ReplicationControllerCondition{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceReplicationController(v []ReplicationController, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceReplicationController(v *[]ReplicationController, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ReplicationController{}
+ 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, 344)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ReplicationController, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ReplicationController, 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] = ReplicationController{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ReplicationController{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ReplicationController{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ReplicationController{}) // var yyz1 ReplicationController
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ReplicationController{}
+ } 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 = []ReplicationController{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceLoadBalancerIngress(v []LoadBalancerIngress, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceLoadBalancerIngress(v *[]LoadBalancerIngress, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []LoadBalancerIngress{}
+ 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, 32)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]LoadBalancerIngress, yyrl1)
+ }
+ } else {
+ yyv1 = make([]LoadBalancerIngress, 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] = LoadBalancerIngress{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, LoadBalancerIngress{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = LoadBalancerIngress{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, LoadBalancerIngress{}) // var yyz1 LoadBalancerIngress
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = LoadBalancerIngress{}
+ } 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 = []LoadBalancerIngress{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceServicePort(v []ServicePort, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceServicePort(v *[]ServicePort, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ServicePort{}
+ 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, 80)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ServicePort, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ServicePort, 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] = ServicePort{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ServicePort{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ServicePort{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ServicePort{}) // var yyz1 ServicePort
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ServicePort{}
+ } 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 = []ServicePort{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceService(v []Service, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceService(v *[]Service, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Service{}
+ 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, 472)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Service, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Service, 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] = Service{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Service{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Service{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Service{}) // var yyz1 Service
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Service{}
+ } 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 = []Service{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceObjectReference(v []ObjectReference, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceObjectReference(v *[]ObjectReference, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ObjectReference{}
+ 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, 112)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ObjectReference, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ObjectReference, 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] = ObjectReference{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ObjectReference{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ObjectReference{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ObjectReference{}) // var yyz1 ObjectReference
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ObjectReference{}
+ } 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 = []ObjectReference{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceServiceAccount(v []ServiceAccount, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceServiceAccount(v *[]ServiceAccount, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ServiceAccount{}
+ 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, 320)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ServiceAccount, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ServiceAccount, 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] = ServiceAccount{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ServiceAccount{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ServiceAccount{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ServiceAccount{}) // var yyz1 ServiceAccount
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ServiceAccount{}
+ } 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 = []ServiceAccount{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceEndpointSubset(v []EndpointSubset, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceEndpointSubset(v *[]EndpointSubset, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []EndpointSubset{}
+ 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([]EndpointSubset, yyrl1)
+ }
+ } else {
+ yyv1 = make([]EndpointSubset, 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] = EndpointSubset{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, EndpointSubset{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = EndpointSubset{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, EndpointSubset{}) // var yyz1 EndpointSubset
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = EndpointSubset{}
+ } 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 = []EndpointSubset{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceEndpointAddress(v []EndpointAddress, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceEndpointAddress(v *[]EndpointAddress, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []EndpointAddress{}
+ 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, 48)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]EndpointAddress, yyrl1)
+ }
+ } else {
+ yyv1 = make([]EndpointAddress, 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] = EndpointAddress{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, EndpointAddress{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = EndpointAddress{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, EndpointAddress{}) // var yyz1 EndpointAddress
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = EndpointAddress{}
+ } 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 = []EndpointAddress{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceEndpointPort(v []EndpointPort, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceEndpointPort(v *[]EndpointPort, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []EndpointPort{}
+ 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, 40)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]EndpointPort, yyrl1)
+ }
+ } else {
+ yyv1 = make([]EndpointPort, 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] = EndpointPort{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, EndpointPort{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = EndpointPort{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, EndpointPort{}) // var yyz1 EndpointPort
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = EndpointPort{}
+ } 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 = []EndpointPort{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceEndpoints(v []Endpoints, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceEndpoints(v *[]Endpoints, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Endpoints{}
+ 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, 288)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Endpoints, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Endpoints, 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] = Endpoints{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Endpoints{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Endpoints{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Endpoints{}) // var yyz1 Endpoints
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Endpoints{}
+ } 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 = []Endpoints{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceTaint(v []Taint, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceTaint(v *[]Taint, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Taint{}
+ 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([]Taint, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Taint, 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] = Taint{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Taint{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Taint{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Taint{}) // var yyz1 Taint
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Taint{}
+ } 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 = []Taint{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceNodeCondition(v []NodeCondition, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceNodeCondition(v *[]NodeCondition, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []NodeCondition{}
+ 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, 112)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]NodeCondition, yyrl1)
+ }
+ } else {
+ yyv1 = make([]NodeCondition, 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] = NodeCondition{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, NodeCondition{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NodeCondition{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, NodeCondition{}) // var yyz1 NodeCondition
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NodeCondition{}
+ } 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 = []NodeCondition{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceNodeAddress(v []NodeAddress, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceNodeAddress(v *[]NodeAddress, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []NodeAddress{}
+ 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, 32)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]NodeAddress, yyrl1)
+ }
+ } else {
+ yyv1 = make([]NodeAddress, 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] = NodeAddress{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, NodeAddress{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NodeAddress{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, NodeAddress{}) // var yyz1 NodeAddress
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NodeAddress{}
+ } 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 = []NodeAddress{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceContainerImage(v []ContainerImage, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceContainerImage(v *[]ContainerImage, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ContainerImage{}
+ 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, 32)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ContainerImage, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ContainerImage, 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] = ContainerImage{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ContainerImage{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ContainerImage{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ContainerImage{}) // var yyz1 ContainerImage
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ContainerImage{}
+ } 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 = []ContainerImage{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceUniqueVolumeName(v []UniqueVolumeName, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yyv1.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceUniqueVolumeName(v *[]UniqueVolumeName, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []UniqueVolumeName{}
+ 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) {
+
+ yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]UniqueVolumeName, yyrl1)
+ }
+ } else {
+ yyv1 = make([]UniqueVolumeName, yyrl1)
+ }
+ yyc1 = true
+ yyrr1 = len(yyv1)
+ } else if yyl1 != len(yyv1) {
+ yyv1 = yyv1[:yyl1]
+ yyc1 = true
+ }
+ yyj1 := 0
+ for ; yyj1 < yyrr1; yyj1++ {
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, "") // var yyz1 UniqueVolumeName
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } 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 = []UniqueVolumeName{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceAttachedVolume(v []AttachedVolume, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceAttachedVolume(v *[]AttachedVolume, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []AttachedVolume{}
+ 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, 32)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]AttachedVolume, yyrl1)
+ }
+ } else {
+ yyv1 = make([]AttachedVolume, 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] = AttachedVolume{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, AttachedVolume{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = AttachedVolume{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, AttachedVolume{}) // var yyz1 AttachedVolume
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = AttachedVolume{}
+ } 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 = []AttachedVolume{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSlicePreferAvoidPodsEntry(v []PreferAvoidPodsEntry, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicePreferAvoidPodsEntry(v *[]PreferAvoidPodsEntry, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []PreferAvoidPodsEntry{}
+ 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, 64)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]PreferAvoidPodsEntry, yyrl1)
+ }
+ } else {
+ yyv1 = make([]PreferAvoidPodsEntry, 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] = PreferAvoidPodsEntry{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, PreferAvoidPodsEntry{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PreferAvoidPodsEntry{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, PreferAvoidPodsEntry{}) // var yyz1 PreferAvoidPodsEntry
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PreferAvoidPodsEntry{}
+ } 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 = []PreferAvoidPodsEntry{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encResourceList(v ResourceList, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeMapStart(len(v))
+ for yyk1, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ yyk1.CodecEncodeSelf(e)
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy3 := &yyv1
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy3) {
+ } else if !yym4 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy3)
+ } else {
+ z.EncFallback(yy3)
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) decResourceList(v *ResourceList, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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, 72)
+ yyv1 = make(map[ResourceName]pkg3_resource.Quantity, yyrl1)
+ *v = yyv1
+ }
+ var yymk1 ResourceName
+ var yymv1 pkg3_resource.Quantity
+ var yymg1 bool
+ if yybh1.MapValueReset {
+ yymg1 = true
+ }
+ if yyl1 > 0 {
+ for yyj1 := 0; yyj1 < yyl1; yyj1++ {
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ if r.TryDecodeAsNil() {
+ yymk1 = ""
+ } else {
+ yyv2 := &yymk1
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = pkg3_resource.Quantity{}
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = pkg3_resource.Quantity{}
+ } else {
+ yyv3 := &yymv1
+ yym4 := z.DecBinary()
+ _ = yym4
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv3) {
+ } else if !yym4 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv3)
+ } else {
+ z.DecFallback(yyv3, false)
+ }
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } else if yyl1 < 0 {
+ for yyj1 := 0; !r.CheckBreak(); yyj1++ {
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ if r.TryDecodeAsNil() {
+ yymk1 = ""
+ } else {
+ yyv5 := &yymk1
+ yyv5.CodecDecodeSelf(d)
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = pkg3_resource.Quantity{}
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = pkg3_resource.Quantity{}
+ } else {
+ yyv6 := &yymv1
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } // else len==0: TODO: Should we clear map entries?
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) encSliceNode(v []Node, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceNode(v *[]Node, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Node{}
+ 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, 664)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Node, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Node, 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] = Node{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Node{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Node{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Node{}) // var yyz1 Node
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Node{}
+ } 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 = []Node{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceFinalizerName(v []FinalizerName, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yyv1.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceFinalizerName(v *[]FinalizerName, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []FinalizerName{}
+ 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) {
+
+ yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]FinalizerName, yyrl1)
+ }
+ } else {
+ yyv1 = make([]FinalizerName, yyrl1)
+ }
+ yyc1 = true
+ yyrr1 = len(yyv1)
+ } else if yyl1 != len(yyv1) {
+ yyv1 = yyv1[:yyl1]
+ yyc1 = true
+ }
+ yyj1 := 0
+ for ; yyj1 < yyrr1; yyj1++ {
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, "") // var yyz1 FinalizerName
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } 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 = []FinalizerName{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceNamespace(v []Namespace, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceNamespace(v *[]Namespace, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+
+ yyv1 := *v
+ yyh1, yyl1 := z.DecSliceHelperStart()
+ var yyc1 bool
+ _ = yyc1
+ if yyl1 == 0 {
+ if yyv1 == nil {
+ yyv1 = []Namespace{}
+ yyc1 = true
+ } else if len(yyv1) != 0 {
+ yyv1 = yyv1[:0]
+ yyc1 = true
+ }
+ } else 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, 304)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Namespace, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Namespace, 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] = Namespace{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Namespace{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Namespace{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Namespace{}) // var yyz1 Namespace
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Namespace{}
+ } 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 = []Namespace{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceEvent(v []Event, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceEvent(v *[]Event, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Event{}
+ 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, 512)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Event, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Event, 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] = Event{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Event{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Event{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Event{}) // var yyz1 Event
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Event{}
+ } 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 = []Event{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceruntime_RawExtension(v []pkg5_runtime.RawExtension, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yym3 := z.EncBinary()
+ _ = yym3
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy2) {
+ } else if !yym3 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy2)
+ } else {
+ z.EncFallback(yy2)
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceruntime_RawExtension(v *[]pkg5_runtime.RawExtension, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []pkg5_runtime.RawExtension{}
+ 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, 40)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]pkg5_runtime.RawExtension, yyrl1)
+ }
+ } else {
+ yyv1 = make([]pkg5_runtime.RawExtension, 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] = pkg5_runtime.RawExtension{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yym3 := z.DecBinary()
+ _ = yym3
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv2) {
+ } else if !yym3 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv2)
+ } else {
+ z.DecFallback(yyv2, false)
+ }
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, pkg5_runtime.RawExtension{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = pkg5_runtime.RawExtension{}
+ } else {
+ yyv4 := &yyv1[yyj1]
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else if !yym5 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv4)
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, pkg5_runtime.RawExtension{}) // var yyz1 pkg5_runtime.RawExtension
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = pkg5_runtime.RawExtension{}
+ } else {
+ yyv6 := &yyv1[yyj1]
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+
+ } else {
+ z.DecSwallow()
+ }
+
+ }
+ if yyj1 < len(yyv1) {
+ yyv1 = yyv1[:yyj1]
+ yyc1 = true
+ } else if yyj1 == 0 && yyv1 == nil {
+ yyv1 = []pkg5_runtime.RawExtension{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceLimitRangeItem(v []LimitRangeItem, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceLimitRangeItem(v *[]LimitRangeItem, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []LimitRangeItem{}
+ 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, 56)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]LimitRangeItem, yyrl1)
+ }
+ } else {
+ yyv1 = make([]LimitRangeItem, 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] = LimitRangeItem{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, LimitRangeItem{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = LimitRangeItem{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, LimitRangeItem{}) // var yyz1 LimitRangeItem
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = LimitRangeItem{}
+ } 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 = []LimitRangeItem{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceLimitRange(v []LimitRange, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceLimitRange(v *[]LimitRange, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []LimitRange{}
+ 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, 288)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]LimitRange, yyrl1)
+ }
+ } else {
+ yyv1 = make([]LimitRange, 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] = LimitRange{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, LimitRange{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = LimitRange{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, LimitRange{}) // var yyz1 LimitRange
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = LimitRange{}
+ } 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 = []LimitRange{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceResourceQuotaScope(v []ResourceQuotaScope, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yyv1.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceResourceQuotaScope(v *[]ResourceQuotaScope, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ResourceQuotaScope{}
+ 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) {
+
+ yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ResourceQuotaScope, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ResourceQuotaScope, yyrl1)
+ }
+ yyc1 = true
+ yyrr1 = len(yyv1)
+ } else if yyl1 != len(yyv1) {
+ yyv1 = yyv1[:yyl1]
+ yyc1 = true
+ }
+ yyj1 := 0
+ for ; yyj1 < yyrr1; yyj1++ {
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, "") // var yyz1 ResourceQuotaScope
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } 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 = []ResourceQuotaScope{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceResourceQuota(v []ResourceQuota, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceResourceQuota(v *[]ResourceQuota, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ResourceQuota{}
+ 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, 312)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ResourceQuota, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ResourceQuota, 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] = ResourceQuota{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ResourceQuota{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ResourceQuota{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ResourceQuota{}) // var yyz1 ResourceQuota
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ResourceQuota{}
+ } 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 = []ResourceQuota{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encMapstringSliceuint8(v map[string][]uint8, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeMapStart(len(v))
+ for yyk1, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ yym2 := z.EncBinary()
+ _ = yym2
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yyk1))
+ }
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyv1 == nil {
+ r.EncodeNil()
+ } else {
+ yym3 := z.EncBinary()
+ _ = yym3
+ if false {
+ } else {
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(yyv1))
+ }
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) decMapstringSliceuint8(v *map[string][]uint8, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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, 40)
+ yyv1 = make(map[string][]uint8, yyrl1)
+ *v = yyv1
+ }
+ var yymk1 string
+ var yymv1 []uint8
+ var yymg1 bool
+ if yybh1.MapValueReset {
+ yymg1 = true
+ }
+ if yyl1 > 0 {
+ for yyj1 := 0; yyj1 < yyl1; yyj1++ {
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ if r.TryDecodeAsNil() {
+ yymk1 = ""
+ } else {
+ yyv2 := &yymk1
+ yym3 := z.DecBinary()
+ _ = yym3
+ if false {
+ } else {
+ *((*string)(yyv2)) = r.DecodeString()
+ }
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv4 := &yymv1
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *yyv4 = r.DecodeBytes(*(*[]byte)(yyv4), false, false)
+ }
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } else if yyl1 < 0 {
+ for yyj1 := 0; !r.CheckBreak(); yyj1++ {
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ if r.TryDecodeAsNil() {
+ yymk1 = ""
+ } else {
+ yyv6 := &yymk1
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv8 := &yymv1
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *yyv8 = r.DecodeBytes(*(*[]byte)(yyv8), false, false)
+ }
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } // else len==0: TODO: Should we clear map entries?
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) encSliceuint8(v []uint8, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(v))
+}
+
+func (x codecSelfer1234) decSliceuint8(v *[]uint8, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ *v = r.DecodeBytes(*((*[]byte)(v)), false, false)
+}
+
+func (x codecSelfer1234) encSliceSecret(v []Secret, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceSecret(v *[]Secret, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Secret{}
+ 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, 296)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Secret, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Secret, 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] = Secret{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Secret{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Secret{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Secret{}) // var yyz1 Secret
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Secret{}
+ } 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 = []Secret{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceConfigMap(v []ConfigMap, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceConfigMap(v *[]ConfigMap, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ConfigMap{}
+ 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, 272)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ConfigMap, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ConfigMap, 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] = ConfigMap{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ConfigMap{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ConfigMap{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ConfigMap{}) // var yyz1 ConfigMap
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ConfigMap{}
+ } 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 = []ConfigMap{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceComponentCondition(v []ComponentCondition, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceComponentCondition(v *[]ComponentCondition, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ComponentCondition{}
+ 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, 64)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ComponentCondition, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ComponentCondition, 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] = ComponentCondition{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ComponentCondition{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ComponentCondition{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ComponentCondition{}) // var yyz1 ComponentCondition
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ComponentCondition{}
+ } 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 = []ComponentCondition{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceComponentStatus(v []ComponentStatus, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceComponentStatus(v *[]ComponentStatus, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ComponentStatus{}
+ 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, 288)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ComponentStatus, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ComponentStatus, 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] = ComponentStatus{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ComponentStatus{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ComponentStatus{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ComponentStatus{}) // var yyz1 ComponentStatus
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ComponentStatus{}
+ } 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 = []ComponentStatus{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceDownwardAPIVolumeFile(v []DownwardAPIVolumeFile, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceDownwardAPIVolumeFile(v *[]DownwardAPIVolumeFile, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []DownwardAPIVolumeFile{}
+ 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, 40)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]DownwardAPIVolumeFile, yyrl1)
+ }
+ } else {
+ yyv1 = make([]DownwardAPIVolumeFile, 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] = DownwardAPIVolumeFile{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, DownwardAPIVolumeFile{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = DownwardAPIVolumeFile{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, DownwardAPIVolumeFile{}) // var yyz1 DownwardAPIVolumeFile
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = DownwardAPIVolumeFile{}
+ } 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 = []DownwardAPIVolumeFile{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/api/v1/types.go b/vendor/k8s.io/client-go/pkg/api/v1/types.go
new file mode 100644
index 000000000..cdb0088c4
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/v1/types.go
@@ -0,0 +1,4617 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/api/resource"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/types"
+ "k8s.io/apimachinery/pkg/util/intstr"
+)
+
+// The comments for the structs and fields can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored and not exported to the SwaggerAPI.
+//
+// The aforementioned methods can be generated by hack/update-generated-swagger-docs.sh
+
+// Common string formats
+// ---------------------
+// Many fields in this API have formatting requirements. The commonly used
+// formats are defined here.
+//
+// C_IDENTIFIER: This is a string that conforms to the definition of an "identifier"
+// in the C language. This is captured by the following regex:
+// [A-Za-z_][A-Za-z0-9_]*
+// This defines the format, but not the length restriction, which should be
+// specified at the definition of any field of this type.
+//
+// DNS_LABEL: This is a string, no more than 63 characters long, that conforms
+// to the definition of a "label" in RFCs 1035 and 1123. This is captured
+// by the following regex:
+// [a-z0-9]([-a-z0-9]*[a-z0-9])?
+//
+// DNS_SUBDOMAIN: This is a string, no more than 253 characters long, that conforms
+// to the definition of a "subdomain" in RFCs 1035 and 1123. This is captured
+// by the following regex:
+// [a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*
+// or more simply:
+// DNS_LABEL(\.DNS_LABEL)*
+//
+// IANA_SVC_NAME: This is a string, no more than 15 characters long, that
+// conforms to the definition of IANA service name in RFC 6335.
+// It must contains at least one letter [a-z] and it must contains only [a-z0-9-].
+// Hypens ('-') cannot be leading or trailing character of the string
+// and cannot be adjacent to other hyphens.
+
+// ObjectMeta is metadata that all persisted resources must have, which includes all objects
+// users must create.
+// DEPRECATED: Use k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta instead - this type will be removed soon.
+// +k8s:openapi-gen=false
+type ObjectMeta struct {
+ // Name must be unique within a namespace. Is required when creating resources, although
+ // some resources may allow a client to request the generation of an appropriate name
+ // automatically. Name is primarily intended for creation idempotence and configuration
+ // definition.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ // +optional
+ Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
+
+ // GenerateName is an optional prefix, used by the server, to generate a unique
+ // name ONLY IF the Name field has not been provided.
+ // If this field is used, the name returned to the client will be different
+ // than the name passed. This value will also be combined with a unique suffix.
+ // The provided value has the same validation rules as the Name field,
+ // and may be truncated by the length of the suffix required to make the value
+ // unique on the server.
+ //
+ // If this field is specified and the generated name exists, the server will
+ // NOT return a 409 - instead, it will either return 201 Created or 500 with Reason
+ // ServerTimeout indicating a unique name could not be found in the time allotted, and the client
+ // should retry (optionally after the time indicated in the Retry-After header).
+ //
+ // Applied only if Name is not specified.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency
+ // +optional
+ GenerateName string `json:"generateName,omitempty" protobuf:"bytes,2,opt,name=generateName"`
+
+ // Namespace defines the space within each name must be unique. An empty namespace is
+ // equivalent to the "default" namespace, but "default" is the canonical representation.
+ // Not all objects are required to be scoped to a namespace - the value of this field for
+ // those objects will be empty.
+ //
+ // Must be a DNS_LABEL.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
+ // +optional
+ Namespace string `json:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"`
+
+ // SelfLink is a URL representing this object.
+ // Populated by the system.
+ // Read-only.
+ // +optional
+ SelfLink string `json:"selfLink,omitempty" protobuf:"bytes,4,opt,name=selfLink"`
+
+ // UID is the unique in time and space value for this object. It is typically generated by
+ // the server on successful creation of a resource and is not allowed to change on PUT
+ // operations.
+ //
+ // Populated by the system.
+ // Read-only.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
+ // +optional
+ UID types.UID `json:"uid,omitempty" protobuf:"bytes,5,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"`
+
+ // An opaque value that represents the internal version of this object that can
+ // be used by clients to determine when objects have changed. May be used for optimistic
+ // concurrency, change detection, and the watch operation on a resource or set of resources.
+ // Clients must treat these values as opaque and passed unmodified back to the server.
+ // They may only be valid for a particular resource or set of resources.
+ //
+ // Populated by the system.
+ // Read-only.
+ // Value must be treated as opaque by clients and .
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
+ // +optional
+ ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,6,opt,name=resourceVersion"`
+
+ // A sequence number representing a specific generation of the desired state.
+ // Populated by the system. Read-only.
+ // +optional
+ Generation int64 `json:"generation,omitempty" protobuf:"varint,7,opt,name=generation"`
+
+ // CreationTimestamp is a timestamp representing the server time when this object was
+ // created. It is not guaranteed to be set in happens-before order across separate operations.
+ // Clients may not set this value. It is represented in RFC3339 form and is in UTC.
+ //
+ // Populated by the system.
+ // Read-only.
+ // Null for lists.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ CreationTimestamp metav1.Time `json:"creationTimestamp,omitempty" protobuf:"bytes,8,opt,name=creationTimestamp"`
+
+ // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This
+ // field is set by the server when a graceful deletion is requested by the user, and is not
+ // directly settable by a client. The resource is expected to be deleted (no longer visible
+ // from resource lists, and not reachable by name) after the time in this field. Once set,
+ // this value may not be unset or be set further into the future, although it may be shortened
+ // or the resource may be deleted prior to this time. For example, a user may request that
+ // a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination
+ // signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard
+ // termination signal (SIGKILL) to the container and after cleanup, remove the pod from the
+ // API. In the presence of network partitions, this object may still exist after this
+ // timestamp, until an administrator or automated process can determine the resource is
+ // fully terminated.
+ // If not set, graceful deletion of the object has not been requested.
+ //
+ // Populated by the system when a graceful deletion is requested.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ DeletionTimestamp *metav1.Time `json:"deletionTimestamp,omitempty" protobuf:"bytes,9,opt,name=deletionTimestamp"`
+
+ // Number of seconds allowed for this object to gracefully terminate before
+ // it will be removed from the system. Only set when deletionTimestamp is also set.
+ // May only be shortened.
+ // Read-only.
+ // +optional
+ DeletionGracePeriodSeconds *int64 `json:"deletionGracePeriodSeconds,omitempty" protobuf:"varint,10,opt,name=deletionGracePeriodSeconds"`
+
+ // Map of string keys and values that can be used to organize and categorize
+ // (scope and select) objects. May match selectors of replication controllers
+ // and services.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
+ // +optional
+ Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,11,rep,name=labels"`
+
+ // Annotations is an unstructured key value map stored with a resource that may be
+ // set by external tools to store and retrieve arbitrary metadata. They are not
+ // queryable and should be preserved when modifying objects.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
+ // +optional
+ Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,12,rep,name=annotations"`
+
+ // List of objects depended by this object. If ALL objects in the list have
+ // been deleted, this object will be garbage collected. If this object is managed by a controller,
+ // then an entry in this list will point to this controller, with the controller field set to true.
+ // There cannot be more than one managing controller.
+ // +optional
+ // +patchMergeKey=uid
+ // +patchStrategy=merge
+ OwnerReferences []metav1.OwnerReference `json:"ownerReferences,omitempty" patchStrategy:"merge" patchMergeKey:"uid" protobuf:"bytes,13,rep,name=ownerReferences"`
+
+ // An initializer is a controller which enforces some system invariant at object creation time.
+ // This field is a list of initializers that have not yet acted on this object. If nil or empty,
+ // this object has been completely initialized. Otherwise, the object is considered uninitialized
+ // and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to
+ // observe uninitialized objects.
+ //
+ // When an object is created, the system will populate this list with the current set of initializers.
+ // Only privileged users may set or modify this list. Once it is empty, it may not be modified further
+ // by any user.
+ Initializers *metav1.Initializers `json:"initializers,omitempty" patchStrategy:"merge" protobuf:"bytes,16,rep,name=initializers"`
+
+ // Must be empty before the object is deleted from the registry. Each entry
+ // is an identifier for the responsible component that will remove the entry
+ // from the list. If the deletionTimestamp of the object is non-nil, entries
+ // in this list can only be removed.
+ // +optional
+ // +patchStrategy=merge
+ Finalizers []string `json:"finalizers,omitempty" patchStrategy:"merge" protobuf:"bytes,14,rep,name=finalizers"`
+
+ // The name of the cluster which the object belongs to.
+ // This is used to distinguish resources with same name and namespace in different clusters.
+ // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.
+ // +optional
+ ClusterName string `json:"clusterName,omitempty" protobuf:"bytes,15,opt,name=clusterName"`
+}
+
+const (
+ // NamespaceDefault means the object is in the default namespace which is applied when not specified by clients
+ NamespaceDefault string = "default"
+ // NamespaceAll is the default argument to specify on a context when you want to list or filter resources across all namespaces
+ NamespaceAll string = ""
+)
+
+// Volume represents a named volume in a pod that may be accessed by any container in the pod.
+type Volume struct {
+ // Volume's name.
+ // Must be a DNS_LABEL and unique within the pod.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
+ // VolumeSource represents the location and type of the mounted volume.
+ // If not specified, the Volume is implied to be an EmptyDir.
+ // This implied behavior is deprecated and will be removed in a future version.
+ VolumeSource `json:",inline" protobuf:"bytes,2,opt,name=volumeSource"`
+}
+
+// Represents the source of a volume to mount.
+// Only one of its members may be specified.
+type VolumeSource struct {
+ // HostPath represents a pre-existing file or directory on the host
+ // machine that is directly exposed to the container. This is generally
+ // used for system agents or other privileged things that are allowed
+ // to see the host machine. Most containers will NOT need this.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
+ // ---
+ // TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not
+ // mount host directories as read/write.
+ // +optional
+ HostPath *HostPathVolumeSource `json:"hostPath,omitempty" protobuf:"bytes,1,opt,name=hostPath"`
+ // EmptyDir represents a temporary directory that shares a pod's lifetime.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
+ // +optional
+ EmptyDir *EmptyDirVolumeSource `json:"emptyDir,omitempty" protobuf:"bytes,2,opt,name=emptyDir"`
+ // GCEPersistentDisk represents a GCE Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ // +optional
+ GCEPersistentDisk *GCEPersistentDiskVolumeSource `json:"gcePersistentDisk,omitempty" protobuf:"bytes,3,opt,name=gcePersistentDisk"`
+ // AWSElasticBlockStore represents an AWS Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+ // +optional
+ AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource `json:"awsElasticBlockStore,omitempty" protobuf:"bytes,4,opt,name=awsElasticBlockStore"`
+ // GitRepo represents a git repository at a particular revision.
+ // +optional
+ GitRepo *GitRepoVolumeSource `json:"gitRepo,omitempty" protobuf:"bytes,5,opt,name=gitRepo"`
+ // Secret represents a secret that should populate this volume.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
+ // +optional
+ Secret *SecretVolumeSource `json:"secret,omitempty" protobuf:"bytes,6,opt,name=secret"`
+ // NFS represents an NFS mount on the host that shares a pod's lifetime
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+ // +optional
+ NFS *NFSVolumeSource `json:"nfs,omitempty" protobuf:"bytes,7,opt,name=nfs"`
+ // ISCSI represents an ISCSI Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md
+ // +optional
+ ISCSI *ISCSIVolumeSource `json:"iscsi,omitempty" protobuf:"bytes,8,opt,name=iscsi"`
+ // Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md
+ // +optional
+ Glusterfs *GlusterfsVolumeSource `json:"glusterfs,omitempty" protobuf:"bytes,9,opt,name=glusterfs"`
+ // PersistentVolumeClaimVolumeSource represents a reference to a
+ // PersistentVolumeClaim in the same namespace.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+ // +optional
+ PersistentVolumeClaim *PersistentVolumeClaimVolumeSource `json:"persistentVolumeClaim,omitempty" protobuf:"bytes,10,opt,name=persistentVolumeClaim"`
+ // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md
+ // +optional
+ RBD *RBDVolumeSource `json:"rbd,omitempty" protobuf:"bytes,11,opt,name=rbd"`
+ // FlexVolume represents a generic volume resource that is
+ // provisioned/attached using an exec based plugin. This is an
+ // alpha feature and may change in future.
+ // +optional
+ FlexVolume *FlexVolumeSource `json:"flexVolume,omitempty" protobuf:"bytes,12,opt,name=flexVolume"`
+ // Cinder represents a cinder volume attached and mounted on kubelets host machine
+ // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ // +optional
+ Cinder *CinderVolumeSource `json:"cinder,omitempty" protobuf:"bytes,13,opt,name=cinder"`
+ // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
+ // +optional
+ CephFS *CephFSVolumeSource `json:"cephfs,omitempty" protobuf:"bytes,14,opt,name=cephfs"`
+ // Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
+ // +optional
+ Flocker *FlockerVolumeSource `json:"flocker,omitempty" protobuf:"bytes,15,opt,name=flocker"`
+ // DownwardAPI represents downward API about the pod that should populate this volume
+ // +optional
+ DownwardAPI *DownwardAPIVolumeSource `json:"downwardAPI,omitempty" protobuf:"bytes,16,opt,name=downwardAPI"`
+ // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
+ // +optional
+ FC *FCVolumeSource `json:"fc,omitempty" protobuf:"bytes,17,opt,name=fc"`
+ // AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
+ // +optional
+ AzureFile *AzureFileVolumeSource `json:"azureFile,omitempty" protobuf:"bytes,18,opt,name=azureFile"`
+ // ConfigMap represents a configMap that should populate this volume
+ // +optional
+ ConfigMap *ConfigMapVolumeSource `json:"configMap,omitempty" protobuf:"bytes,19,opt,name=configMap"`
+ // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
+ // +optional
+ VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty" protobuf:"bytes,20,opt,name=vsphereVolume"`
+ // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
+ // +optional
+ Quobyte *QuobyteVolumeSource `json:"quobyte,omitempty" protobuf:"bytes,21,opt,name=quobyte"`
+ // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
+ // +optional
+ AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty" protobuf:"bytes,22,opt,name=azureDisk"`
+ // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine
+ PhotonPersistentDisk *PhotonPersistentDiskVolumeSource `json:"photonPersistentDisk,omitempty" protobuf:"bytes,23,opt,name=photonPersistentDisk"`
+ // Items for all in one resources secrets, configmaps, and downward API
+ Projected *ProjectedVolumeSource `json:"projected,omitempty" protobuf:"bytes,26,opt,name=projected"`
+ // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine
+ // +optional
+ PortworxVolume *PortworxVolumeSource `json:"portworxVolume,omitempty" protobuf:"bytes,24,opt,name=portworxVolume"`
+ // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
+ // +optional
+ ScaleIO *ScaleIOVolumeSource `json:"scaleIO,omitempty" protobuf:"bytes,25,opt,name=scaleIO"`
+ // StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.
+ // +optional
+ StorageOS *StorageOSVolumeSource `json:"storageos,omitempty" protobuf:"bytes,27,opt,name=storageos"`
+}
+
+// PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace.
+// This volume finds the bound PV and mounts that volume for the pod. A
+// PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another
+// type of volume that is owned by someone else (the system).
+type PersistentVolumeClaimVolumeSource struct {
+ // ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+ ClaimName string `json:"claimName" protobuf:"bytes,1,opt,name=claimName"`
+ // Will force the ReadOnly setting in VolumeMounts.
+ // Default false.
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,2,opt,name=readOnly"`
+}
+
+// PersistentVolumeSource is similar to VolumeSource but meant for the
+// administrator who creates PVs. Exactly one of its members must be set.
+type PersistentVolumeSource struct {
+ // GCEPersistentDisk represents a GCE Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod. Provisioned by an admin.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ // +optional
+ GCEPersistentDisk *GCEPersistentDiskVolumeSource `json:"gcePersistentDisk,omitempty" protobuf:"bytes,1,opt,name=gcePersistentDisk"`
+ // AWSElasticBlockStore represents an AWS Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+ // +optional
+ AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource `json:"awsElasticBlockStore,omitempty" protobuf:"bytes,2,opt,name=awsElasticBlockStore"`
+ // HostPath represents a directory on the host.
+ // Provisioned by a developer or tester.
+ // This is useful for single-node development and testing only!
+ // On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
+ // +optional
+ HostPath *HostPathVolumeSource `json:"hostPath,omitempty" protobuf:"bytes,3,opt,name=hostPath"`
+ // Glusterfs represents a Glusterfs volume that is attached to a host and
+ // exposed to the pod. Provisioned by an admin.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md
+ // +optional
+ Glusterfs *GlusterfsVolumeSource `json:"glusterfs,omitempty" protobuf:"bytes,4,opt,name=glusterfs"`
+ // NFS represents an NFS mount on the host. Provisioned by an admin.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+ // +optional
+ NFS *NFSVolumeSource `json:"nfs,omitempty" protobuf:"bytes,5,opt,name=nfs"`
+ // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md
+ // +optional
+ RBD *RBDVolumeSource `json:"rbd,omitempty" protobuf:"bytes,6,opt,name=rbd"`
+ // ISCSI represents an ISCSI Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod. Provisioned by an admin.
+ // +optional
+ ISCSI *ISCSIVolumeSource `json:"iscsi,omitempty" protobuf:"bytes,7,opt,name=iscsi"`
+ // Cinder represents a cinder volume attached and mounted on kubelets host machine
+ // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ // +optional
+ Cinder *CinderVolumeSource `json:"cinder,omitempty" protobuf:"bytes,8,opt,name=cinder"`
+ // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
+ // +optional
+ CephFS *CephFSVolumeSource `json:"cephfs,omitempty" protobuf:"bytes,9,opt,name=cephfs"`
+ // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
+ // +optional
+ FC *FCVolumeSource `json:"fc,omitempty" protobuf:"bytes,10,opt,name=fc"`
+ // Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running
+ // +optional
+ Flocker *FlockerVolumeSource `json:"flocker,omitempty" protobuf:"bytes,11,opt,name=flocker"`
+ // FlexVolume represents a generic volume resource that is
+ // provisioned/attached using an exec based plugin. This is an
+ // alpha feature and may change in future.
+ // +optional
+ FlexVolume *FlexVolumeSource `json:"flexVolume,omitempty" protobuf:"bytes,12,opt,name=flexVolume"`
+ // AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
+ // +optional
+ AzureFile *AzureFileVolumeSource `json:"azureFile,omitempty" protobuf:"bytes,13,opt,name=azureFile"`
+ // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
+ // +optional
+ VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty" protobuf:"bytes,14,opt,name=vsphereVolume"`
+ // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
+ // +optional
+ Quobyte *QuobyteVolumeSource `json:"quobyte,omitempty" protobuf:"bytes,15,opt,name=quobyte"`
+ // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
+ // +optional
+ AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty" protobuf:"bytes,16,opt,name=azureDisk"`
+ // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine
+ PhotonPersistentDisk *PhotonPersistentDiskVolumeSource `json:"photonPersistentDisk,omitempty" protobuf:"bytes,17,opt,name=photonPersistentDisk"`
+ // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine
+ // +optional
+ PortworxVolume *PortworxVolumeSource `json:"portworxVolume,omitempty" protobuf:"bytes,18,opt,name=portworxVolume"`
+ // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
+ // +optional
+ ScaleIO *ScaleIOVolumeSource `json:"scaleIO,omitempty" protobuf:"bytes,19,opt,name=scaleIO"`
+ // Local represents directly-attached storage with node affinity
+ // +optional
+ Local *LocalVolumeSource `json:"local,omitempty" protobuf:"bytes,20,opt,name=local"`
+ // StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md
+ // +optional
+ StorageOS *StorageOSPersistentVolumeSource `json:"storageos,omitempty" protobuf:"bytes,21,opt,name=storageos"`
+}
+
+const (
+ // BetaStorageClassAnnotation represents the beta/previous StorageClass annotation.
+ // It's currently still used and will be held for backwards compatibility
+ BetaStorageClassAnnotation = "volume.beta.kubernetes.io/storage-class"
+
+ // MountOptionAnnotation defines mount option annotation used in PVs
+ MountOptionAnnotation = "volume.beta.kubernetes.io/mount-options"
+
+ // AlphaStorageNodeAffinityAnnotation defines node affinity policies for a PersistentVolume.
+ // Value is a string of the json representation of type NodeAffinity
+ AlphaStorageNodeAffinityAnnotation = "volume.alpha.kubernetes.io/node-affinity"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+
+// PersistentVolume (PV) is a storage resource provisioned by an administrator.
+// It is analogous to a node.
+// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
+type PersistentVolume struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines a specification of a persistent volume owned by the cluster.
+ // Provisioned by an administrator.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes
+ // +optional
+ Spec PersistentVolumeSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status represents the current information/status for the persistent volume.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes
+ // +optional
+ Status PersistentVolumeStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// PersistentVolumeSpec is the specification of a persistent volume.
+type PersistentVolumeSpec struct {
+ // A description of the persistent volume's resources and capacity.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity
+ // +optional
+ Capacity ResourceList `json:"capacity,omitempty" protobuf:"bytes,1,rep,name=capacity,casttype=ResourceList,castkey=ResourceName"`
+ // The actual volume backing the persistent volume.
+ PersistentVolumeSource `json:",inline" protobuf:"bytes,2,opt,name=persistentVolumeSource"`
+ // AccessModes contains all ways the volume can be mounted.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes
+ // +optional
+ AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,3,rep,name=accessModes,casttype=PersistentVolumeAccessMode"`
+ // ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim.
+ // Expected to be non-nil when bound.
+ // claim.VolumeName is the authoritative bind between PV and PVC.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding
+ // +optional
+ ClaimRef *ObjectReference `json:"claimRef,omitempty" protobuf:"bytes,4,opt,name=claimRef"`
+ // What happens to a persistent volume when released from its claim.
+ // Valid options are Retain (default) and Recycle.
+ // Recycling must be supported by the volume plugin underlying this persistent volume.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming
+ // +optional
+ PersistentVolumeReclaimPolicy PersistentVolumeReclaimPolicy `json:"persistentVolumeReclaimPolicy,omitempty" protobuf:"bytes,5,opt,name=persistentVolumeReclaimPolicy,casttype=PersistentVolumeReclaimPolicy"`
+ // Name of StorageClass to which this persistent volume belongs. Empty value
+ // means that this volume does not belong to any StorageClass.
+ // +optional
+ StorageClassName string `json:"storageClassName,omitempty" protobuf:"bytes,6,opt,name=storageClassName"`
+}
+
+// PersistentVolumeReclaimPolicy describes a policy for end-of-life maintenance of persistent volumes.
+type PersistentVolumeReclaimPolicy string
+
+const (
+ // PersistentVolumeReclaimRecycle means the volume will be recycled back into the pool of unbound persistent volumes on release from its claim.
+ // The volume plugin must support Recycling.
+ PersistentVolumeReclaimRecycle PersistentVolumeReclaimPolicy = "Recycle"
+ // PersistentVolumeReclaimDelete means the volume will be deleted from Kubernetes on release from its claim.
+ // The volume plugin must support Deletion.
+ PersistentVolumeReclaimDelete PersistentVolumeReclaimPolicy = "Delete"
+ // PersistentVolumeReclaimRetain means the volume will be left in its current phase (Released) for manual reclamation by the administrator.
+ // The default policy is Retain.
+ PersistentVolumeReclaimRetain PersistentVolumeReclaimPolicy = "Retain"
+)
+
+// PersistentVolumeStatus is the current status of a persistent volume.
+type PersistentVolumeStatus struct {
+ // Phase indicates if a volume is available, bound to a claim, or released by a claim.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase
+ // +optional
+ Phase PersistentVolumePhase `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=PersistentVolumePhase"`
+ // A human-readable message indicating details about why the volume is in this state.
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"`
+ // Reason is a brief CamelCase string that describes any failure and is meant
+ // for machine parsing and tidy display in the CLI.
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"`
+}
+
+// PersistentVolumeList is a list of PersistentVolume items.
+type PersistentVolumeList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+ // List of persistent volumes.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
+ Items []PersistentVolume `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// +genclient=true
+
+// PersistentVolumeClaim is a user's request for and claim to a persistent volume
+type PersistentVolumeClaim struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines the desired characteristics of a volume requested by a pod author.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+ // +optional
+ Spec PersistentVolumeClaimSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status represents the current information/status of a persistent volume claim.
+ // Read-only.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+ // +optional
+ Status PersistentVolumeClaimStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// PersistentVolumeClaimList is a list of PersistentVolumeClaim items.
+type PersistentVolumeClaimList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+ // A list of persistent volume claims.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+ Items []PersistentVolumeClaim `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// PersistentVolumeClaimSpec describes the common attributes of storage devices
+// and allows a Source for provider-specific attributes
+type PersistentVolumeClaimSpec struct {
+ // AccessModes contains the desired access modes the volume should have.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
+ // +optional
+ AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,1,rep,name=accessModes,casttype=PersistentVolumeAccessMode"`
+ // A label query over volumes to consider for binding.
+ // +optional
+ Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,opt,name=selector"`
+ // Resources represents the minimum resources the volume should have.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
+ // +optional
+ Resources ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,2,opt,name=resources"`
+ // VolumeName is the binding reference to the PersistentVolume backing this claim.
+ // +optional
+ VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,3,opt,name=volumeName"`
+ // Name of the StorageClass required by the claim.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
+ // +optional
+ StorageClassName *string `json:"storageClassName,omitempty" protobuf:"bytes,5,opt,name=storageClassName"`
+}
+
+// PersistentVolumeClaimStatus is the current status of a persistent volume claim.
+type PersistentVolumeClaimStatus struct {
+ // Phase represents the current phase of PersistentVolumeClaim.
+ // +optional
+ Phase PersistentVolumeClaimPhase `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=PersistentVolumeClaimPhase"`
+ // AccessModes contains the actual access modes the volume backing the PVC has.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
+ // +optional
+ AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,2,rep,name=accessModes,casttype=PersistentVolumeAccessMode"`
+ // Represents the actual resources of the underlying volume.
+ // +optional
+ Capacity ResourceList `json:"capacity,omitempty" protobuf:"bytes,3,rep,name=capacity,casttype=ResourceList,castkey=ResourceName"`
+}
+
+type PersistentVolumeAccessMode string
+
+const (
+ // can be mounted read/write mode to exactly 1 host
+ ReadWriteOnce PersistentVolumeAccessMode = "ReadWriteOnce"
+ // can be mounted in read-only mode to many hosts
+ ReadOnlyMany PersistentVolumeAccessMode = "ReadOnlyMany"
+ // can be mounted in read/write mode to many hosts
+ ReadWriteMany PersistentVolumeAccessMode = "ReadWriteMany"
+)
+
+type PersistentVolumePhase string
+
+const (
+ // used for PersistentVolumes that are not available
+ VolumePending PersistentVolumePhase = "Pending"
+ // used for PersistentVolumes that are not yet bound
+ // Available volumes are held by the binder and matched to PersistentVolumeClaims
+ VolumeAvailable PersistentVolumePhase = "Available"
+ // used for PersistentVolumes that are bound
+ VolumeBound PersistentVolumePhase = "Bound"
+ // used for PersistentVolumes where the bound PersistentVolumeClaim was deleted
+ // released volumes must be recycled before becoming available again
+ // this phase is used by the persistent volume claim binder to signal to another process to reclaim the resource
+ VolumeReleased PersistentVolumePhase = "Released"
+ // used for PersistentVolumes that failed to be correctly recycled or deleted after being released from a claim
+ VolumeFailed PersistentVolumePhase = "Failed"
+)
+
+type PersistentVolumeClaimPhase string
+
+const (
+ // used for PersistentVolumeClaims that are not yet bound
+ ClaimPending PersistentVolumeClaimPhase = "Pending"
+ // used for PersistentVolumeClaims that are bound
+ ClaimBound PersistentVolumeClaimPhase = "Bound"
+ // used for PersistentVolumeClaims that lost their underlying
+ // PersistentVolume. The claim was bound to a PersistentVolume and this
+ // volume does not exist any longer and all data on it was lost.
+ ClaimLost PersistentVolumeClaimPhase = "Lost"
+)
+
+// Represents a host path mapped into a pod.
+// Host path volumes do not support ownership management or SELinux relabeling.
+type HostPathVolumeSource struct {
+ // Path of the directory on the host.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
+ Path string `json:"path" protobuf:"bytes,1,opt,name=path"`
+}
+
+// Represents an empty directory for a pod.
+// Empty directory volumes support ownership management and SELinux relabeling.
+type EmptyDirVolumeSource struct {
+ // What type of storage medium should back this directory.
+ // The default is "" which means to use the node's default medium.
+ // Must be an empty string (default) or Memory.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
+ // +optional
+ Medium StorageMedium `json:"medium,omitempty" protobuf:"bytes,1,opt,name=medium,casttype=StorageMedium"`
+ // Total amount of local storage required for this EmptyDir volume.
+ // The size limit is also applicable for memory medium.
+ // The maximum usage on memory medium EmptyDir would be the minimum value between
+ // the SizeLimit specified here and the sum of memory limits of all containers in a pod.
+ // The default is nil which means that the limit is undefined.
+ // More info: http://kubernetes.io/docs/user-guide/volumes#emptydir
+ // +optional
+ SizeLimit resource.Quantity `json:"sizeLimit,omitempty" protobuf:"bytes,2,opt,name=sizeLimit"`
+}
+
+// Represents a Glusterfs mount that lasts the lifetime of a pod.
+// Glusterfs volumes do not support ownership management or SELinux relabeling.
+type GlusterfsVolumeSource struct {
+ // EndpointsName is the endpoint name that details Glusterfs topology.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
+ EndpointsName string `json:"endpoints" protobuf:"bytes,1,opt,name=endpoints"`
+
+ // Path is the Glusterfs volume path.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
+ Path string `json:"path" protobuf:"bytes,2,opt,name=path"`
+
+ // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions.
+ // Defaults to false.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"`
+}
+
+// Represents a Rados Block Device mount that lasts the lifetime of a pod.
+// RBD volumes support ownership management and SELinux relabeling.
+type RBDVolumeSource struct {
+ // A collection of Ceph monitors.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ CephMonitors []string `json:"monitors" protobuf:"bytes,1,rep,name=monitors"`
+ // The rados image name.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ RBDImage string `json:"image" protobuf:"bytes,2,opt,name=image"`
+ // Filesystem type of the volume that you want to mount.
+ // Tip: Ensure that the filesystem type is supported by the host operating system.
+ // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"`
+ // The rados pool name.
+ // Default is rbd.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // +optional
+ RBDPool string `json:"pool,omitempty" protobuf:"bytes,4,opt,name=pool"`
+ // The rados user name.
+ // Default is admin.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // +optional
+ RadosUser string `json:"user,omitempty" protobuf:"bytes,5,opt,name=user"`
+ // Keyring is the path to key ring for RBDUser.
+ // Default is /etc/ceph/keyring.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // +optional
+ Keyring string `json:"keyring,omitempty" protobuf:"bytes,6,opt,name=keyring"`
+ // SecretRef is name of the authentication secret for RBDUser. If provided
+ // overrides keyring.
+ // Default is nil.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // +optional
+ SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,7,opt,name=secretRef"`
+ // ReadOnly here will force the ReadOnly setting in VolumeMounts.
+ // Defaults to false.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,8,opt,name=readOnly"`
+}
+
+// Represents a cinder volume resource in Openstack.
+// A Cinder volume must exist before mounting to a container.
+// The volume must also be in the same region as the kubelet.
+// Cinder volumes support ownership management and SELinux relabeling.
+type CinderVolumeSource struct {
+ // volume id used to identify the volume in cinder
+ // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ VolumeID string `json:"volumeID" protobuf:"bytes,1,opt,name=volumeID"`
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ // +optional
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"`
+}
+
+// Represents a Ceph Filesystem mount that lasts the lifetime of a pod
+// Cephfs volumes do not support ownership management or SELinux relabeling.
+type CephFSVolumeSource struct {
+ // Required: Monitors is a collection of Ceph monitors
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ Monitors []string `json:"monitors" protobuf:"bytes,1,rep,name=monitors"`
+ // Optional: Used as the mounted root, rather than the full Ceph tree, default is /
+ // +optional
+ Path string `json:"path,omitempty" protobuf:"bytes,2,opt,name=path"`
+ // Optional: User is the rados user name, default is admin
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ // +optional
+ User string `json:"user,omitempty" protobuf:"bytes,3,opt,name=user"`
+ // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ // +optional
+ SecretFile string `json:"secretFile,omitempty" protobuf:"bytes,4,opt,name=secretFile"`
+ // Optional: SecretRef is reference to the authentication secret for User, default is empty.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ // +optional
+ SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,5,opt,name=secretRef"`
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,6,opt,name=readOnly"`
+}
+
+// Represents a Flocker volume mounted by the Flocker agent.
+// One and only one of datasetName and datasetUUID should be set.
+// Flocker volumes do not support ownership management or SELinux relabeling.
+type FlockerVolumeSource struct {
+ // Name of the dataset stored as metadata -> name on the dataset for Flocker
+ // should be considered as deprecated
+ // +optional
+ DatasetName string `json:"datasetName,omitempty" protobuf:"bytes,1,opt,name=datasetName"`
+ // UUID of the dataset. This is unique identifier of a Flocker dataset
+ // +optional
+ DatasetUUID string `json:"datasetUUID,omitempty" protobuf:"bytes,2,opt,name=datasetUUID"`
+}
+
+// StorageMedium defines ways that storage can be allocated to a volume.
+type StorageMedium string
+
+const (
+ StorageMediumDefault StorageMedium = "" // use whatever the default is for the node
+ StorageMediumMemory StorageMedium = "Memory" // use memory (tmpfs)
+)
+
+// Protocol defines network protocols supported for things like container ports.
+type Protocol string
+
+const (
+ // ProtocolTCP is the TCP protocol.
+ ProtocolTCP Protocol = "TCP"
+ // ProtocolUDP is the UDP protocol.
+ ProtocolUDP Protocol = "UDP"
+)
+
+// Represents a Persistent Disk resource in Google Compute Engine.
+//
+// A GCE PD must exist before mounting to a container. The disk must
+// also be in the same GCE project and zone as the kubelet. A GCE PD
+// can only be mounted as read/write once or read-only many times. GCE
+// PDs support ownership management and SELinux relabeling.
+type GCEPersistentDiskVolumeSource struct {
+ // Unique name of the PD resource in GCE. Used to identify the disk in GCE.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ PDName string `json:"pdName" protobuf:"bytes,1,opt,name=pdName"`
+ // Filesystem type of the volume that you want to mount.
+ // Tip: Ensure that the filesystem type is supported by the host operating system.
+ // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
+ // The partition in the volume that you want to mount.
+ // If omitted, the default is to mount by volume name.
+ // Examples: For volume /dev/sda1, you specify the partition as "1".
+ // Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ // +optional
+ Partition int32 `json:"partition,omitempty" protobuf:"varint,3,opt,name=partition"`
+ // ReadOnly here will force the ReadOnly setting in VolumeMounts.
+ // Defaults to false.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"`
+}
+
+// Represents a Quobyte mount that lasts the lifetime of a pod.
+// Quobyte volumes do not support ownership management or SELinux relabeling.
+type QuobyteVolumeSource struct {
+ // Registry represents a single or multiple Quobyte Registry services
+ // specified as a string as host:port pair (multiple entries are separated with commas)
+ // which acts as the central registry for volumes
+ Registry string `json:"registry" protobuf:"bytes,1,opt,name=registry"`
+
+ // Volume is a string that references an already created Quobyte volume by name.
+ Volume string `json:"volume" protobuf:"bytes,2,opt,name=volume"`
+
+ // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions.
+ // Defaults to false.
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"`
+
+ // User to map volume access to
+ // Defaults to serivceaccount user
+ // +optional
+ User string `json:"user,omitempty" protobuf:"bytes,4,opt,name=user"`
+
+ // Group to map volume access to
+ // Default is no group
+ // +optional
+ Group string `json:"group,omitempty" protobuf:"bytes,5,opt,name=group"`
+}
+
+// FlexVolume represents a generic volume resource that is
+// provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.
+type FlexVolumeSource struct {
+ // Driver is the name of the driver to use for this volume.
+ Driver string `json:"driver" protobuf:"bytes,1,opt,name=driver"`
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script.
+ // +optional
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
+ // Optional: SecretRef is reference to the secret object containing
+ // sensitive information to pass to the plugin scripts. This may be
+ // empty if no secret object is specified. If the secret object
+ // contains more than one secret, all secrets are passed to the plugin
+ // scripts.
+ // +optional
+ SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,3,opt,name=secretRef"`
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"`
+ // Optional: Extra command options if any.
+ // +optional
+ Options map[string]string `json:"options,omitempty" protobuf:"bytes,5,rep,name=options"`
+}
+
+// Represents a Persistent Disk resource in AWS.
+//
+// An AWS EBS disk must exist before mounting to a container. The disk
+// must also be in the same AWS zone as the kubelet. An AWS EBS disk
+// can only be mounted as read/write once. AWS EBS volumes support
+// ownership management and SELinux relabeling.
+type AWSElasticBlockStoreVolumeSource struct {
+ // Unique ID of the persistent disk resource in AWS (Amazon EBS volume).
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+ VolumeID string `json:"volumeID" protobuf:"bytes,1,opt,name=volumeID"`
+ // Filesystem type of the volume that you want to mount.
+ // Tip: Ensure that the filesystem type is supported by the host operating system.
+ // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
+ // The partition in the volume that you want to mount.
+ // If omitted, the default is to mount by volume name.
+ // Examples: For volume /dev/sda1, you specify the partition as "1".
+ // Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).
+ // +optional
+ Partition int32 `json:"partition,omitempty" protobuf:"varint,3,opt,name=partition"`
+ // Specify "true" to force and set the ReadOnly property in VolumeMounts to "true".
+ // If omitted, the default is "false".
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"`
+}
+
+// Represents a volume that is populated with the contents of a git repository.
+// Git repo volumes do not support ownership management.
+// Git repo volumes support SELinux relabeling.
+type GitRepoVolumeSource struct {
+ // Repository URL
+ Repository string `json:"repository" protobuf:"bytes,1,opt,name=repository"`
+ // Commit hash for the specified revision.
+ // +optional
+ Revision string `json:"revision,omitempty" protobuf:"bytes,2,opt,name=revision"`
+ // Target directory name.
+ // Must not contain or start with '..'. If '.' is supplied, the volume directory will be the
+ // git repository. Otherwise, if specified, the volume will contain the git repository in
+ // the subdirectory with the given name.
+ // +optional
+ Directory string `json:"directory,omitempty" protobuf:"bytes,3,opt,name=directory"`
+}
+
+// Adapts a Secret into a volume.
+//
+// The contents of the target Secret's Data field will be presented in a volume
+// as files using the keys in the Data field as the file names.
+// Secret volumes support ownership management and SELinux relabeling.
+type SecretVolumeSource struct {
+ // Name of the secret in the pod's namespace to use.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
+ // +optional
+ SecretName string `json:"secretName,omitempty" protobuf:"bytes,1,opt,name=secretName"`
+ // If unspecified, each key-value pair in the Data field of the referenced
+ // Secret will be projected into the volume as a file whose name is the
+ // key and content is the value. If specified, the listed keys will be
+ // projected into the specified paths, and unlisted keys will not be
+ // present. If a key is specified which is not present in the Secret,
+ // the volume setup will error unless it is marked optional. Paths must be
+ // relative and may not contain the '..' path or start with '..'.
+ // +optional
+ Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"`
+ // Optional: mode bits to use on created files by default. Must be a
+ // value between 0 and 0777. Defaults to 0644.
+ // Directories within the path are not affected by this setting.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"bytes,3,opt,name=defaultMode"`
+ // Specify whether the Secret or it's keys must be defined
+ // +optional
+ Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"`
+}
+
+const (
+ SecretVolumeSourceDefaultMode int32 = 0644
+)
+
+// Adapts a secret into a projected volume.
+//
+// The contents of the target Secret's Data field will be presented in a
+// projected volume as files using the keys in the Data field as the file names.
+// Note that this is identical to a secret volume source without the default
+// mode.
+type SecretProjection struct {
+ LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"`
+ // If unspecified, each key-value pair in the Data field of the referenced
+ // Secret will be projected into the volume as a file whose name is the
+ // key and content is the value. If specified, the listed keys will be
+ // projected into the specified paths, and unlisted keys will not be
+ // present. If a key is specified which is not present in the Secret,
+ // the volume setup will error unless it is marked optional. Paths must be
+ // relative and may not contain the '..' path or start with '..'.
+ // +optional
+ Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"`
+ // Specify whether the Secret or its key must be defined
+ // +optional
+ Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"`
+}
+
+// Represents an NFS mount that lasts the lifetime of a pod.
+// NFS volumes do not support ownership management or SELinux relabeling.
+type NFSVolumeSource struct {
+ // Server is the hostname or IP address of the NFS server.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+ Server string `json:"server" protobuf:"bytes,1,opt,name=server"`
+
+ // Path that is exported by the NFS server.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+ Path string `json:"path" protobuf:"bytes,2,opt,name=path"`
+
+ // ReadOnly here will force
+ // the NFS export to be mounted with read-only permissions.
+ // Defaults to false.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"`
+}
+
+// Represents an ISCSI disk.
+// ISCSI volumes can only be mounted as read/write once.
+// ISCSI volumes support ownership management and SELinux relabeling.
+type ISCSIVolumeSource struct {
+ // iSCSI target portal. The portal is either an IP or ip_addr:port if the port
+ // is other than default (typically TCP ports 860 and 3260).
+ TargetPortal string `json:"targetPortal" protobuf:"bytes,1,opt,name=targetPortal"`
+ // Target iSCSI Qualified Name.
+ IQN string `json:"iqn" protobuf:"bytes,2,opt,name=iqn"`
+ // iSCSI target lun number.
+ Lun int32 `json:"lun" protobuf:"varint,3,opt,name=lun"`
+ // Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport.
+ // +optional
+ ISCSIInterface string `json:"iscsiInterface,omitempty" protobuf:"bytes,4,opt,name=iscsiInterface"`
+ // Filesystem type of the volume that you want to mount.
+ // Tip: Ensure that the filesystem type is supported by the host operating system.
+ // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,5,opt,name=fsType"`
+ // ReadOnly here will force the ReadOnly setting in VolumeMounts.
+ // Defaults to false.
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,6,opt,name=readOnly"`
+ // iSCSI target portal List. The portal is either an IP or ip_addr:port if the port
+ // is other than default (typically TCP ports 860 and 3260).
+ // +optional
+ Portals []string `json:"portals,omitempty" protobuf:"bytes,7,opt,name=portals"`
+ // whether support iSCSI Discovery CHAP authentication
+ // +optional
+ DiscoveryCHAPAuth bool `json:"chapAuthDiscovery,omitempty" protobuf:"varint,8,opt,name=chapAuthDiscovery"`
+ // whether support iSCSI Session CHAP authentication
+ // +optional
+ SessionCHAPAuth bool `json:"chapAuthSession,omitempty" protobuf:"varint,11,opt,name=chapAuthSession"`
+ // CHAP secret for iSCSI target and initiator authentication
+ // +optional
+ SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,10,opt,name=secretRef"`
+}
+
+// Represents a Fibre Channel volume.
+// Fibre Channel volumes can only be mounted as read/write once.
+// Fibre Channel volumes support ownership management and SELinux relabeling.
+type FCVolumeSource struct {
+ // Required: FC target worldwide names (WWNs)
+ TargetWWNs []string `json:"targetWWNs" protobuf:"bytes,1,rep,name=targetWWNs"`
+ // Required: FC target lun number
+ Lun *int32 `json:"lun" protobuf:"varint,2,opt,name=lun"`
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"`
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"`
+}
+
+// AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
+type AzureFileVolumeSource struct {
+ // the name of secret that contains Azure Storage Account Name and Key
+ SecretName string `json:"secretName" protobuf:"bytes,1,opt,name=secretName"`
+ // Share Name
+ ShareName string `json:"shareName" protobuf:"bytes,2,opt,name=shareName"`
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"`
+}
+
+// Represents a vSphere volume resource.
+type VsphereVirtualDiskVolumeSource struct {
+ // Path that identifies vSphere volume vmdk
+ VolumePath string `json:"volumePath" protobuf:"bytes,1,opt,name=volumePath"`
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
+ // Storage Policy Based Management (SPBM) profile name.
+ // +optional
+ StoragePolicyName string `json:"storagePolicyName,omitempty" protobuf:"bytes,3,opt,name=storagePolicyName"`
+ // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.
+ // +optional
+ StoragePolicyID string `json:"storagePolicyID,omitempty" protobuf:"bytes,4,opt,name=storagePolicyID"`
+}
+
+// Represents a Photon Controller persistent disk resource.
+type PhotonPersistentDiskVolumeSource struct {
+ // ID that identifies Photon Controller persistent disk
+ PdID string `json:"pdID" protobuf:"bytes,1,opt,name=pdID"`
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
+}
+
+type AzureDataDiskCachingMode string
+type AzureDataDiskKind string
+
+const (
+ AzureDataDiskCachingNone AzureDataDiskCachingMode = "None"
+ AzureDataDiskCachingReadOnly AzureDataDiskCachingMode = "ReadOnly"
+ AzureDataDiskCachingReadWrite AzureDataDiskCachingMode = "ReadWrite"
+
+ AzureSharedBlobDisk AzureDataDiskKind = "Shared"
+ AzureDedicatedBlobDisk AzureDataDiskKind = "Dedicated"
+ AzureManagedDisk AzureDataDiskKind = "Managed"
+)
+
+// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
+type AzureDiskVolumeSource struct {
+ // The Name of the data disk in the blob storage
+ DiskName string `json:"diskName" protobuf:"bytes,1,opt,name=diskName"`
+ // The URI the data disk in the blob storage
+ DataDiskURI string `json:"diskURI" protobuf:"bytes,2,opt,name=diskURI"`
+ // Host Caching mode: None, Read Only, Read Write.
+ // +optional
+ CachingMode *AzureDataDiskCachingMode `json:"cachingMode,omitempty" protobuf:"bytes,3,opt,name=cachingMode,casttype=AzureDataDiskCachingMode"`
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ FSType *string `json:"fsType,omitempty" protobuf:"bytes,4,opt,name=fsType"`
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly *bool `json:"readOnly,omitempty" protobuf:"varint,5,opt,name=readOnly"`
+ // Expected values Shared: mulitple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared
+ Kind *AzureDataDiskKind `json:"kind,omitempty" protobuf:"bytes,6,opt,name=kind,casttype=AzureDataDiskKind"`
+}
+
+// PortworxVolumeSource represents a Portworx volume resource.
+type PortworxVolumeSource struct {
+ // VolumeID uniquely identifies a Portworx volume
+ VolumeID string `json:"volumeID" protobuf:"bytes,1,opt,name=volumeID"`
+ // FSType represents the filesystem type to mount
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified.
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"`
+}
+
+// ScaleIOVolumeSource represents a persistent ScaleIO volume
+type ScaleIOVolumeSource struct {
+ // The host address of the ScaleIO API Gateway.
+ Gateway string `json:"gateway" protobuf:"bytes,1,opt,name=gateway"`
+ // The name of the storage system as configured in ScaleIO.
+ System string `json:"system" protobuf:"bytes,2,opt,name=system"`
+ // SecretRef references to the secret for ScaleIO user and other
+ // sensitive information. If this is not provided, Login operation will fail.
+ SecretRef *LocalObjectReference `json:"secretRef" protobuf:"bytes,3,opt,name=secretRef"`
+ // Flag to enable/disable SSL communication with Gateway, default false
+ // +optional
+ SSLEnabled bool `json:"sslEnabled,omitempty" protobuf:"varint,4,opt,name=sslEnabled"`
+ // The name of the Protection Domain for the configured storage (defaults to "default").
+ // +optional
+ ProtectionDomain string `json:"protectionDomain,omitempty" protobuf:"bytes,5,opt,name=protectionDomain"`
+ // The Storage Pool associated with the protection domain (defaults to "default").
+ // +optional
+ StoragePool string `json:"storagePool,omitempty" protobuf:"bytes,6,opt,name=storagePool"`
+ // Indicates whether the storage for a volume should be thick or thin (defaults to "thin").
+ // +optional
+ StorageMode string `json:"storageMode,omitempty" protobuf:"bytes,7,opt,name=storageMode"`
+ // The name of a volume already created in the ScaleIO system
+ // that is associated with this volume source.
+ VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,8,opt,name=volumeName"`
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,9,opt,name=fsType"`
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,10,opt,name=readOnly"`
+}
+
+// Represents a StorageOS persistent volume resource.
+type StorageOSVolumeSource struct {
+ // VolumeName is the human-readable name of the StorageOS volume. Volume
+ // names are only unique within a namespace.
+ VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,1,opt,name=volumeName"`
+ // VolumeNamespace specifies the scope of the volume within StorageOS. If no
+ // namespace is specified then the Pod's namespace will be used. This allows the
+ // Kubernetes name scoping to be mirrored within StorageOS for tighter integration.
+ // Set VolumeName to any name to override the default behaviour.
+ // Set to "default" if you are not using namespaces within StorageOS.
+ // Namespaces that do not pre-exist within StorageOS will be created.
+ // +optional
+ VolumeNamespace string `json:"volumeNamespace,omitempty" protobuf:"bytes,2,opt,name=volumeNamespace"`
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"`
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"`
+ // SecretRef specifies the secret to use for obtaining the StorageOS API
+ // credentials. If not specified, default values will be attempted.
+ // +optional
+ SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,5,opt,name=secretRef"`
+}
+
+// Represents a StorageOS persistent volume resource.
+type StorageOSPersistentVolumeSource struct {
+ // VolumeName is the human-readable name of the StorageOS volume. Volume
+ // names are only unique within a namespace.
+ VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,1,opt,name=volumeName"`
+ // VolumeNamespace specifies the scope of the volume within StorageOS. If no
+ // namespace is specified then the Pod's namespace will be used. This allows the
+ // Kubernetes name scoping to be mirrored within StorageOS for tighter integration.
+ // Set VolumeName to any name to override the default behaviour.
+ // Set to "default" if you are not using namespaces within StorageOS.
+ // Namespaces that do not pre-exist within StorageOS will be created.
+ // +optional
+ VolumeNamespace string `json:"volumeNamespace,omitempty" protobuf:"bytes,2,opt,name=volumeNamespace"`
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"`
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"`
+ // SecretRef specifies the secret to use for obtaining the StorageOS API
+ // credentials. If not specified, default values will be attempted.
+ // +optional
+ SecretRef *ObjectReference `json:"secretRef,omitempty" protobuf:"bytes,5,opt,name=secretRef"`
+}
+
+// Adapts a ConfigMap into a volume.
+//
+// The contents of the target ConfigMap's Data field will be presented in a
+// volume as files using the keys in the Data field as the file names, unless
+// the items element is populated with specific mappings of keys to paths.
+// ConfigMap volumes support ownership management and SELinux relabeling.
+type ConfigMapVolumeSource struct {
+ LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"`
+ // If unspecified, each key-value pair in the Data field of the referenced
+ // ConfigMap will be projected into the volume as a file whose name is the
+ // key and content is the value. If specified, the listed keys will be
+ // projected into the specified paths, and unlisted keys will not be
+ // present. If a key is specified which is not present in the ConfigMap,
+ // the volume setup will error unless it is marked optional. Paths must be
+ // relative and may not contain the '..' path or start with '..'.
+ // +optional
+ Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"`
+ // Optional: mode bits to use on created files by default. Must be a
+ // value between 0 and 0777. Defaults to 0644.
+ // Directories within the path are not affected by this setting.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"varint,3,opt,name=defaultMode"`
+ // Specify whether the ConfigMap or it's keys must be defined
+ // +optional
+ Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"`
+}
+
+const (
+ ConfigMapVolumeSourceDefaultMode int32 = 0644
+)
+
+// Adapts a ConfigMap into a projected volume.
+//
+// The contents of the target ConfigMap's Data field will be presented in a
+// projected volume as files using the keys in the Data field as the file names,
+// unless the items element is populated with specific mappings of keys to paths.
+// Note that this is identical to a configmap volume source without the default
+// mode.
+type ConfigMapProjection struct {
+ LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"`
+ // If unspecified, each key-value pair in the Data field of the referenced
+ // ConfigMap will be projected into the volume as a file whose name is the
+ // key and content is the value. If specified, the listed keys will be
+ // projected into the specified paths, and unlisted keys will not be
+ // present. If a key is specified which is not present in the ConfigMap,
+ // the volume setup will error unless it is marked optional. Paths must be
+ // relative and may not contain the '..' path or start with '..'.
+ // +optional
+ Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"`
+ // Specify whether the ConfigMap or it's keys must be defined
+ // +optional
+ Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"`
+}
+
+// Represents a projected volume source
+type ProjectedVolumeSource struct {
+ // list of volume projections
+ Sources []VolumeProjection `json:"sources" protobuf:"bytes,1,rep,name=sources"`
+ // Mode bits to use on created files by default. Must be a value between
+ // 0 and 0777.
+ // Directories within the path are not affected by this setting.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"varint,2,opt,name=defaultMode"`
+}
+
+// Projection that may be projected along with other supported volume types
+type VolumeProjection struct {
+ // all types below are the supported types for projection into the same volume
+
+ // information about the secret data to project
+ Secret *SecretProjection `json:"secret,omitempty" protobuf:"bytes,1,opt,name=secret"`
+ // information about the downwardAPI data to project
+ DownwardAPI *DownwardAPIProjection `json:"downwardAPI,omitempty" protobuf:"bytes,2,opt,name=downwardAPI"`
+ // information about the configMap data to project
+ ConfigMap *ConfigMapProjection `json:"configMap,omitempty" protobuf:"bytes,3,opt,name=configMap"`
+}
+
+const (
+ ProjectedVolumeSourceDefaultMode int32 = 0644
+)
+
+// Maps a string key to a path within a volume.
+type KeyToPath struct {
+ // The key to project.
+ Key string `json:"key" protobuf:"bytes,1,opt,name=key"`
+
+ // The relative path of the file to map the key to.
+ // May not be an absolute path.
+ // May not contain the path element '..'.
+ // May not start with the string '..'.
+ Path string `json:"path" protobuf:"bytes,2,opt,name=path"`
+ // Optional: mode bits to use on this file, must be a value between 0
+ // and 0777. If not specified, the volume defaultMode will be used.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ Mode *int32 `json:"mode,omitempty" protobuf:"varint,3,opt,name=mode"`
+}
+
+// Local represents directly-attached storage with node affinity
+type LocalVolumeSource struct {
+ // The full path to the volume on the node
+ // For alpha, this path must be a directory
+ // Once block as a source is supported, then this path can point to a block device
+ Path string `json:"path" protobuf:"bytes,1,opt,name=path"`
+}
+
+// ContainerPort represents a network port in a single container.
+type ContainerPort struct {
+ // If specified, this must be an IANA_SVC_NAME and unique within the pod. Each
+ // named port in a pod must have a unique name. Name for the port that can be
+ // referred to by services.
+ // +optional
+ Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
+ // Number of port to expose on the host.
+ // If specified, this must be a valid port number, 0 < x < 65536.
+ // If HostNetwork is specified, this must match ContainerPort.
+ // Most containers do not need this.
+ // +optional
+ HostPort int32 `json:"hostPort,omitempty" protobuf:"varint,2,opt,name=hostPort"`
+ // Number of port to expose on the pod's IP address.
+ // This must be a valid port number, 0 < x < 65536.
+ ContainerPort int32 `json:"containerPort" protobuf:"varint,3,opt,name=containerPort"`
+ // Protocol for port. Must be UDP or TCP.
+ // Defaults to "TCP".
+ // +optional
+ Protocol Protocol `json:"protocol,omitempty" protobuf:"bytes,4,opt,name=protocol,casttype=Protocol"`
+ // What host IP to bind the external port to.
+ // +optional
+ HostIP string `json:"hostIP,omitempty" protobuf:"bytes,5,opt,name=hostIP"`
+}
+
+// VolumeMount describes a mounting of a Volume within a container.
+type VolumeMount struct {
+ // This must match the Name of a Volume.
+ Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
+ // Mounted read-only if true, read-write otherwise (false or unspecified).
+ // Defaults to false.
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,2,opt,name=readOnly"`
+ // Path within the container at which the volume should be mounted. Must
+ // not contain ':'.
+ MountPath string `json:"mountPath" protobuf:"bytes,3,opt,name=mountPath"`
+ // Path within the volume from which the container's volume should be mounted.
+ // Defaults to "" (volume's root).
+ // +optional
+ SubPath string `json:"subPath,omitempty" protobuf:"bytes,4,opt,name=subPath"`
+}
+
+// EnvVar represents an environment variable present in a Container.
+type EnvVar struct {
+ // Name of the environment variable. Must be a C_IDENTIFIER.
+ Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
+
+ // Optional: no more than one of the following may be specified.
+
+ // Variable references $(VAR_NAME) are expanded
+ // using the previous defined environment variables in the container and
+ // any service environment variables. If a variable cannot be resolved,
+ // the reference in the input string will be unchanged. The $(VAR_NAME)
+ // syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped
+ // references will never be expanded, regardless of whether the variable
+ // exists or not.
+ // Defaults to "".
+ // +optional
+ Value string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"`
+ // Source for the environment variable's value. Cannot be used if value is not empty.
+ // +optional
+ ValueFrom *EnvVarSource `json:"valueFrom,omitempty" protobuf:"bytes,3,opt,name=valueFrom"`
+}
+
+// EnvVarSource represents a source for the value of an EnvVar.
+type EnvVarSource struct {
+ // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations,
+ // spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP.
+ // +optional
+ FieldRef *ObjectFieldSelector `json:"fieldRef,omitempty" protobuf:"bytes,1,opt,name=fieldRef"`
+ // Selects a resource of the container: only resources limits and requests
+ // (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
+ // +optional
+ ResourceFieldRef *ResourceFieldSelector `json:"resourceFieldRef,omitempty" protobuf:"bytes,2,opt,name=resourceFieldRef"`
+ // Selects a key of a ConfigMap.
+ // +optional
+ ConfigMapKeyRef *ConfigMapKeySelector `json:"configMapKeyRef,omitempty" protobuf:"bytes,3,opt,name=configMapKeyRef"`
+ // Selects a key of a secret in the pod's namespace
+ // +optional
+ SecretKeyRef *SecretKeySelector `json:"secretKeyRef,omitempty" protobuf:"bytes,4,opt,name=secretKeyRef"`
+}
+
+// ObjectFieldSelector selects an APIVersioned field of an object.
+type ObjectFieldSelector struct {
+ // Version of the schema the FieldPath is written in terms of, defaults to "v1".
+ // +optional
+ APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,1,opt,name=apiVersion"`
+ // Path of the field to select in the specified API version.
+ FieldPath string `json:"fieldPath" protobuf:"bytes,2,opt,name=fieldPath"`
+}
+
+// ResourceFieldSelector represents container resources (cpu, memory) and their output format
+type ResourceFieldSelector struct {
+ // Container name: required for volumes, optional for env vars
+ // +optional
+ ContainerName string `json:"containerName,omitempty" protobuf:"bytes,1,opt,name=containerName"`
+ // Required: resource to select
+ Resource string `json:"resource" protobuf:"bytes,2,opt,name=resource"`
+ // Specifies the output format of the exposed resources, defaults to "1"
+ // +optional
+ Divisor resource.Quantity `json:"divisor,omitempty" protobuf:"bytes,3,opt,name=divisor"`
+}
+
+// Selects a key from a ConfigMap.
+type ConfigMapKeySelector struct {
+ // The ConfigMap to select from.
+ LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"`
+ // The key to select.
+ Key string `json:"key" protobuf:"bytes,2,opt,name=key"`
+ // Specify whether the ConfigMap or it's key must be defined
+ // +optional
+ Optional *bool `json:"optional,omitempty" protobuf:"varint,3,opt,name=optional"`
+}
+
+// SecretKeySelector selects a key of a Secret.
+type SecretKeySelector struct {
+ // The name of the secret in the pod's namespace to select from.
+ LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"`
+ // The key of the secret to select from. Must be a valid secret key.
+ Key string `json:"key" protobuf:"bytes,2,opt,name=key"`
+ // Specify whether the Secret or it's key must be defined
+ // +optional
+ Optional *bool `json:"optional,omitempty" protobuf:"varint,3,opt,name=optional"`
+}
+
+// EnvFromSource represents the source of a set of ConfigMaps
+type EnvFromSource struct {
+ // An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.
+ // +optional
+ Prefix string `json:"prefix,omitempty" protobuf:"bytes,1,opt,name=prefix"`
+ // The ConfigMap to select from
+ // +optional
+ ConfigMapRef *ConfigMapEnvSource `json:"configMapRef,omitempty" protobuf:"bytes,2,opt,name=configMapRef"`
+ // The Secret to select from
+ // +optional
+ SecretRef *SecretEnvSource `json:"secretRef,omitempty" protobuf:"bytes,3,opt,name=secretRef"`
+}
+
+// ConfigMapEnvSource selects a ConfigMap to populate the environment
+// variables with.
+//
+// The contents of the target ConfigMap's Data field will represent the
+// key-value pairs as environment variables.
+type ConfigMapEnvSource struct {
+ // The ConfigMap to select from.
+ LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"`
+ // Specify whether the ConfigMap must be defined
+ // +optional
+ Optional *bool `json:"optional,omitempty" protobuf:"varint,2,opt,name=optional"`
+}
+
+// SecretEnvSource selects a Secret to populate the environment
+// variables with.
+//
+// The contents of the target Secret's Data field will represent the
+// key-value pairs as environment variables.
+type SecretEnvSource struct {
+ // The Secret to select from.
+ LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"`
+ // Specify whether the Secret must be defined
+ // +optional
+ Optional *bool `json:"optional,omitempty" protobuf:"varint,2,opt,name=optional"`
+}
+
+// HTTPHeader describes a custom header to be used in HTTP probes
+type HTTPHeader struct {
+ // The header field name
+ Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
+ // The header field value
+ Value string `json:"value" protobuf:"bytes,2,opt,name=value"`
+}
+
+// HTTPGetAction describes an action based on HTTP Get requests.
+type HTTPGetAction struct {
+ // Path to access on the HTTP server.
+ // +optional
+ Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"`
+ // Name or number of the port to access on the container.
+ // Number must be in the range 1 to 65535.
+ // Name must be an IANA_SVC_NAME.
+ Port intstr.IntOrString `json:"port" protobuf:"bytes,2,opt,name=port"`
+ // Host name to connect to, defaults to the pod IP. You probably want to set
+ // "Host" in httpHeaders instead.
+ // +optional
+ Host string `json:"host,omitempty" protobuf:"bytes,3,opt,name=host"`
+ // Scheme to use for connecting to the host.
+ // Defaults to HTTP.
+ // +optional
+ Scheme URIScheme `json:"scheme,omitempty" protobuf:"bytes,4,opt,name=scheme,casttype=URIScheme"`
+ // Custom headers to set in the request. HTTP allows repeated headers.
+ // +optional
+ HTTPHeaders []HTTPHeader `json:"httpHeaders,omitempty" protobuf:"bytes,5,rep,name=httpHeaders"`
+}
+
+// URIScheme identifies the scheme used for connection to a host for Get actions
+type URIScheme string
+
+const (
+ // URISchemeHTTP means that the scheme used will be http://
+ URISchemeHTTP URIScheme = "HTTP"
+ // URISchemeHTTPS means that the scheme used will be https://
+ URISchemeHTTPS URIScheme = "HTTPS"
+)
+
+// TCPSocketAction describes an action based on opening a socket
+type TCPSocketAction struct {
+ // Number or name of the port to access on the container.
+ // Number must be in the range 1 to 65535.
+ // Name must be an IANA_SVC_NAME.
+ Port intstr.IntOrString `json:"port" protobuf:"bytes,1,opt,name=port"`
+ // Optional: Host name to connect to, defaults to the pod IP.
+ // +optional
+ Host string `json:"host,omitempty" protobuf:"bytes,2,opt,name=host"`
+}
+
+// ExecAction describes a "run in container" action.
+type ExecAction struct {
+ // Command is the command line to execute inside the container, the working directory for the
+ // command is root ('/') in the container's filesystem. The command is simply exec'd, it is
+ // not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use
+ // a shell, you need to explicitly call out to that shell.
+ // Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
+ // +optional
+ Command []string `json:"command,omitempty" protobuf:"bytes,1,rep,name=command"`
+}
+
+// Probe describes a health check to be performed against a container to determine whether it is
+// alive or ready to receive traffic.
+type Probe struct {
+ // The action taken to determine the health of a container
+ Handler `json:",inline" protobuf:"bytes,1,opt,name=handler"`
+ // Number of seconds after the container has started before liveness probes are initiated.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+ // +optional
+ InitialDelaySeconds int32 `json:"initialDelaySeconds,omitempty" protobuf:"varint,2,opt,name=initialDelaySeconds"`
+ // Number of seconds after which the probe times out.
+ // Defaults to 1 second. Minimum value is 1.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+ // +optional
+ TimeoutSeconds int32 `json:"timeoutSeconds,omitempty" protobuf:"varint,3,opt,name=timeoutSeconds"`
+ // How often (in seconds) to perform the probe.
+ // Default to 10 seconds. Minimum value is 1.
+ // +optional
+ PeriodSeconds int32 `json:"periodSeconds,omitempty" protobuf:"varint,4,opt,name=periodSeconds"`
+ // Minimum consecutive successes for the probe to be considered successful after having failed.
+ // Defaults to 1. Must be 1 for liveness. Minimum value is 1.
+ // +optional
+ SuccessThreshold int32 `json:"successThreshold,omitempty" protobuf:"varint,5,opt,name=successThreshold"`
+ // Minimum consecutive failures for the probe to be considered failed after having succeeded.
+ // Defaults to 3. Minimum value is 1.
+ // +optional
+ FailureThreshold int32 `json:"failureThreshold,omitempty" protobuf:"varint,6,opt,name=failureThreshold"`
+}
+
+// PullPolicy describes a policy for if/when to pull a container image
+type PullPolicy string
+
+const (
+ // PullAlways means that kubelet always attempts to pull the latest image. Container will fail If the pull fails.
+ PullAlways PullPolicy = "Always"
+ // PullNever means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present
+ PullNever PullPolicy = "Never"
+ // PullIfNotPresent means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails.
+ PullIfNotPresent PullPolicy = "IfNotPresent"
+)
+
+// TerminationMessagePolicy describes how termination messages are retrieved from a container.
+type TerminationMessagePolicy string
+
+const (
+ // TerminationMessageReadFile is the default behavior and will set the container status message to
+ // the contents of the container's terminationMessagePath when the container exits.
+ TerminationMessageReadFile TerminationMessagePolicy = "File"
+ // TerminationMessageFallbackToLogsOnError will read the most recent contents of the container logs
+ // for the container status message when the container exits with an error and the
+ // terminationMessagePath has no contents.
+ TerminationMessageFallbackToLogsOnError TerminationMessagePolicy = "FallbackToLogsOnError"
+)
+
+// Capability represent POSIX capabilities type
+type Capability string
+
+// Adds and removes POSIX capabilities from running containers.
+type Capabilities struct {
+ // Added capabilities
+ // +optional
+ Add []Capability `json:"add,omitempty" protobuf:"bytes,1,rep,name=add,casttype=Capability"`
+ // Removed capabilities
+ // +optional
+ Drop []Capability `json:"drop,omitempty" protobuf:"bytes,2,rep,name=drop,casttype=Capability"`
+}
+
+// ResourceRequirements describes the compute resource requirements.
+type ResourceRequirements struct {
+ // Limits describes the maximum amount of compute resources allowed.
+ // More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
+ // +optional
+ Limits ResourceList `json:"limits,omitempty" protobuf:"bytes,1,rep,name=limits,casttype=ResourceList,castkey=ResourceName"`
+ // Requests describes the minimum amount of compute resources required.
+ // If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
+ // otherwise to an implementation-defined value.
+ // More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
+ // +optional
+ Requests ResourceList `json:"requests,omitempty" protobuf:"bytes,2,rep,name=requests,casttype=ResourceList,castkey=ResourceName"`
+}
+
+const (
+ // TerminationMessagePathDefault means the default path to capture the application termination message running in a container
+ TerminationMessagePathDefault string = "/dev/termination-log"
+)
+
+// A single application container that you want to run within a pod.
+type Container struct {
+ // Name of the container specified as a DNS_LABEL.
+ // Each container in a pod must have a unique name (DNS_LABEL).
+ // Cannot be updated.
+ Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
+ // Docker image name.
+ // More info: https://kubernetes.io/docs/concepts/containers/images
+ Image string `json:"image" protobuf:"bytes,2,opt,name=image"`
+ // Entrypoint array. Not executed within a shell.
+ // The docker image's ENTRYPOINT is used if this is not provided.
+ // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
+ // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
+ // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
+ // regardless of whether the variable exists or not.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
+ // +optional
+ Command []string `json:"command,omitempty" protobuf:"bytes,3,rep,name=command"`
+ // Arguments to the entrypoint.
+ // The docker image's CMD is used if this is not provided.
+ // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
+ // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
+ // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
+ // regardless of whether the variable exists or not.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
+ // +optional
+ Args []string `json:"args,omitempty" protobuf:"bytes,4,rep,name=args"`
+ // Container's working directory.
+ // If not specified, the container runtime's default will be used, which
+ // might be configured in the container image.
+ // Cannot be updated.
+ // +optional
+ WorkingDir string `json:"workingDir,omitempty" protobuf:"bytes,5,opt,name=workingDir"`
+ // List of ports to expose from the container. Exposing a port here gives
+ // the system additional information about the network connections a
+ // container uses, but is primarily informational. Not specifying a port here
+ // DOES NOT prevent that port from being exposed. Any port which is
+ // listening on the default "0.0.0.0" address inside a container will be
+ // accessible from the network.
+ // Cannot be updated.
+ // +optional
+ // +patchMergeKey=containerPort
+ // +patchStrategy=merge
+ Ports []ContainerPort `json:"ports,omitempty" patchStrategy:"merge" patchMergeKey:"containerPort" protobuf:"bytes,6,rep,name=ports"`
+ // List of sources to populate environment variables in the container.
+ // The keys defined within a source must be a C_IDENTIFIER. All invalid keys
+ // will be reported as an event when the container is starting. When a key exists in multiple
+ // sources, the value associated with the last source will take precedence.
+ // Values defined by an Env with a duplicate key will take precedence.
+ // Cannot be updated.
+ // +optional
+ EnvFrom []EnvFromSource `json:"envFrom,omitempty" protobuf:"bytes,19,rep,name=envFrom"`
+ // List of environment variables to set in the container.
+ // Cannot be updated.
+ // +optional
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ Env []EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,7,rep,name=env"`
+ // Compute Resources required by this container.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
+ // +optional
+ Resources ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,8,opt,name=resources"`
+ // Pod volumes to mount into the container's filesystem.
+ // Cannot be updated.
+ // +optional
+ // +patchMergeKey=mountPath
+ // +patchStrategy=merge
+ VolumeMounts []VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,9,rep,name=volumeMounts"`
+ // Periodic probe of container liveness.
+ // Container will be restarted if the probe fails.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+ // +optional
+ LivenessProbe *Probe `json:"livenessProbe,omitempty" protobuf:"bytes,10,opt,name=livenessProbe"`
+ // Periodic probe of container service readiness.
+ // Container will be removed from service endpoints if the probe fails.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+ // +optional
+ ReadinessProbe *Probe `json:"readinessProbe,omitempty" protobuf:"bytes,11,opt,name=readinessProbe"`
+ // Actions that the management system should take in response to container lifecycle events.
+ // Cannot be updated.
+ // +optional
+ Lifecycle *Lifecycle `json:"lifecycle,omitempty" protobuf:"bytes,12,opt,name=lifecycle"`
+ // Optional: Path at which the file to which the container's termination message
+ // will be written is mounted into the container's filesystem.
+ // Message written is intended to be brief final status, such as an assertion failure message.
+ // Will be truncated by the node if greater than 4096 bytes. The total message length across
+ // all containers will be limited to 12kb.
+ // Defaults to /dev/termination-log.
+ // Cannot be updated.
+ // +optional
+ TerminationMessagePath string `json:"terminationMessagePath,omitempty" protobuf:"bytes,13,opt,name=terminationMessagePath"`
+ // Indicate how the termination message should be populated. File will use the contents of
+ // terminationMessagePath to populate the container status message on both success and failure.
+ // FallbackToLogsOnError will use the last chunk of container log output if the termination
+ // message file is empty and the container exited with an error.
+ // The log output is limited to 2048 bytes or 80 lines, whichever is smaller.
+ // Defaults to File.
+ // Cannot be updated.
+ // +optional
+ TerminationMessagePolicy TerminationMessagePolicy `json:"terminationMessagePolicy,omitempty" protobuf:"bytes,20,opt,name=terminationMessagePolicy,casttype=TerminationMessagePolicy"`
+ // Image pull policy.
+ // One of Always, Never, IfNotPresent.
+ // Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
+ // +optional
+ ImagePullPolicy PullPolicy `json:"imagePullPolicy,omitempty" protobuf:"bytes,14,opt,name=imagePullPolicy,casttype=PullPolicy"`
+ // Security options the pod should run with.
+ // More info: https://kubernetes.io/docs/concepts/policy/security-context/
+ // More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md
+ // +optional
+ SecurityContext *SecurityContext `json:"securityContext,omitempty" protobuf:"bytes,15,opt,name=securityContext"`
+
+ // Variables for interactive containers, these have very specialized use-cases (e.g. debugging)
+ // and shouldn't be used for general purpose containers.
+
+ // Whether this container should allocate a buffer for stdin in the container runtime. If this
+ // is not set, reads from stdin in the container will always result in EOF.
+ // Default is false.
+ // +optional
+ Stdin bool `json:"stdin,omitempty" protobuf:"varint,16,opt,name=stdin"`
+ // Whether the container runtime should close the stdin channel after it has been opened by
+ // a single attach. When stdin is true the stdin stream will remain open across multiple attach
+ // sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the
+ // first client attaches to stdin, and then remains open and accepts data until the client disconnects,
+ // at which time stdin is closed and remains closed until the container is restarted. If this
+ // flag is false, a container processes that reads from stdin will never receive an EOF.
+ // Default is false
+ // +optional
+ StdinOnce bool `json:"stdinOnce,omitempty" protobuf:"varint,17,opt,name=stdinOnce"`
+ // Whether this container should allocate a TTY for itself, also requires 'stdin' to be true.
+ // Default is false.
+ // +optional
+ TTY bool `json:"tty,omitempty" protobuf:"varint,18,opt,name=tty"`
+}
+
+// Handler defines a specific action that should be taken
+// TODO: pass structured data to these actions, and document that data here.
+type Handler struct {
+ // One and only one of the following should be specified.
+ // Exec specifies the action to take.
+ // +optional
+ Exec *ExecAction `json:"exec,omitempty" protobuf:"bytes,1,opt,name=exec"`
+ // HTTPGet specifies the http request to perform.
+ // +optional
+ HTTPGet *HTTPGetAction `json:"httpGet,omitempty" protobuf:"bytes,2,opt,name=httpGet"`
+ // TCPSocket specifies an action involving a TCP port.
+ // TCP hooks not yet supported
+ // TODO: implement a realistic TCP lifecycle hook
+ // +optional
+ TCPSocket *TCPSocketAction `json:"tcpSocket,omitempty" protobuf:"bytes,3,opt,name=tcpSocket"`
+}
+
+// Lifecycle describes actions that the management system should take in response to container lifecycle
+// events. For the PostStart and PreStop lifecycle handlers, management of the container blocks
+// until the action is complete, unless the container process fails, in which case the handler is aborted.
+type Lifecycle struct {
+ // PostStart is called immediately after a container is created. If the handler fails,
+ // the container is terminated and restarted according to its restart policy.
+ // Other management of the container blocks until the hook completes.
+ // More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
+ // +optional
+ PostStart *Handler `json:"postStart,omitempty" protobuf:"bytes,1,opt,name=postStart"`
+ // PreStop is called immediately before a container is terminated.
+ // The container is terminated after the handler completes.
+ // The reason for termination is passed to the handler.
+ // Regardless of the outcome of the handler, the container is eventually terminated.
+ // Other management of the container blocks until the hook completes.
+ // More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
+ // +optional
+ PreStop *Handler `json:"preStop,omitempty" protobuf:"bytes,2,opt,name=preStop"`
+}
+
+type ConditionStatus string
+
+// These are valid condition statuses. "ConditionTrue" means a resource is in the condition.
+// "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes
+// can't decide if a resource is in the condition or not. In the future, we could add other
+// intermediate conditions, e.g. ConditionDegraded.
+const (
+ ConditionTrue ConditionStatus = "True"
+ ConditionFalse ConditionStatus = "False"
+ ConditionUnknown ConditionStatus = "Unknown"
+)
+
+// ContainerStateWaiting is a waiting state of a container.
+type ContainerStateWaiting struct {
+ // (brief) reason the container is not yet running.
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,1,opt,name=reason"`
+ // Message regarding why the container is not yet running.
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"`
+}
+
+// ContainerStateRunning is a running state of a container.
+type ContainerStateRunning struct {
+ // Time at which the container was last (re-)started
+ // +optional
+ StartedAt metav1.Time `json:"startedAt,omitempty" protobuf:"bytes,1,opt,name=startedAt"`
+}
+
+// ContainerStateTerminated is a terminated state of a container.
+type ContainerStateTerminated struct {
+ // Exit status from the last termination of the container
+ ExitCode int32 `json:"exitCode" protobuf:"varint,1,opt,name=exitCode"`
+ // Signal from the last termination of the container
+ // +optional
+ Signal int32 `json:"signal,omitempty" protobuf:"varint,2,opt,name=signal"`
+ // (brief) reason from the last termination of the container
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"`
+ // Message regarding the last termination of the container
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,4,opt,name=message"`
+ // Time at which previous execution of the container started
+ // +optional
+ StartedAt metav1.Time `json:"startedAt,omitempty" protobuf:"bytes,5,opt,name=startedAt"`
+ // Time at which the container last terminated
+ // +optional
+ FinishedAt metav1.Time `json:"finishedAt,omitempty" protobuf:"bytes,6,opt,name=finishedAt"`
+ // Container's ID in the format 'docker://<container_id>'
+ // +optional
+ ContainerID string `json:"containerID,omitempty" protobuf:"bytes,7,opt,name=containerID"`
+}
+
+// ContainerState holds a possible state of container.
+// Only one of its members may be specified.
+// If none of them is specified, the default one is ContainerStateWaiting.
+type ContainerState struct {
+ // Details about a waiting container
+ // +optional
+ Waiting *ContainerStateWaiting `json:"waiting,omitempty" protobuf:"bytes,1,opt,name=waiting"`
+ // Details about a running container
+ // +optional
+ Running *ContainerStateRunning `json:"running,omitempty" protobuf:"bytes,2,opt,name=running"`
+ // Details about a terminated container
+ // +optional
+ Terminated *ContainerStateTerminated `json:"terminated,omitempty" protobuf:"bytes,3,opt,name=terminated"`
+}
+
+// ContainerStatus contains details for the current status of this container.
+type ContainerStatus struct {
+ // This must be a DNS_LABEL. Each container in a pod must have a unique name.
+ // Cannot be updated.
+ Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
+ // Details about the container's current condition.
+ // +optional
+ State ContainerState `json:"state,omitempty" protobuf:"bytes,2,opt,name=state"`
+ // Details about the container's last termination condition.
+ // +optional
+ LastTerminationState ContainerState `json:"lastState,omitempty" protobuf:"bytes,3,opt,name=lastState"`
+ // Specifies whether the container has passed its readiness probe.
+ Ready bool `json:"ready" protobuf:"varint,4,opt,name=ready"`
+ // The number of times the container has been restarted, currently based on
+ // the number of dead containers that have not yet been removed.
+ // Note that this is calculated from dead containers. But those containers are subject to
+ // garbage collection. This value will get capped at 5 by GC.
+ RestartCount int32 `json:"restartCount" protobuf:"varint,5,opt,name=restartCount"`
+ // The image the container is running.
+ // More info: https://kubernetes.io/docs/concepts/containers/images
+ // TODO(dchen1107): Which image the container is running with?
+ Image string `json:"image" protobuf:"bytes,6,opt,name=image"`
+ // ImageID of the container's image.
+ ImageID string `json:"imageID" protobuf:"bytes,7,opt,name=imageID"`
+ // Container's ID in the format 'docker://<container_id>'.
+ // +optional
+ ContainerID string `json:"containerID,omitempty" protobuf:"bytes,8,opt,name=containerID"`
+}
+
+// PodPhase is a label for the condition of a pod at the current time.
+type PodPhase string
+
+// These are the valid statuses of pods.
+const (
+ // PodPending means the pod has been accepted by the system, but one or more of the containers
+ // has not been started. This includes time before being bound to a node, as well as time spent
+ // pulling images onto the host.
+ PodPending PodPhase = "Pending"
+ // PodRunning means the pod has been bound to a node and all of the containers have been started.
+ // At least one container is still running or is in the process of being restarted.
+ PodRunning PodPhase = "Running"
+ // PodSucceeded means that all containers in the pod have voluntarily terminated
+ // with a container exit code of 0, and the system is not going to restart any of these containers.
+ PodSucceeded PodPhase = "Succeeded"
+ // PodFailed means that all containers in the pod have terminated, and at least one container has
+ // terminated in a failure (exited with a non-zero exit code or was stopped by the system).
+ PodFailed PodPhase = "Failed"
+ // PodUnknown means that for some reason the state of the pod could not be obtained, typically due
+ // to an error in communicating with the host of the pod.
+ PodUnknown PodPhase = "Unknown"
+)
+
+// PodConditionType is a valid value for PodCondition.Type
+type PodConditionType string
+
+// These are valid conditions of pod.
+const (
+ // PodScheduled represents status of the scheduling process for this pod.
+ PodScheduled PodConditionType = "PodScheduled"
+ // PodReady means the pod is able to service requests and should be added to the
+ // load balancing pools of all matching services.
+ PodReady PodConditionType = "Ready"
+ // PodInitialized means that all init containers in the pod have started successfully.
+ PodInitialized PodConditionType = "Initialized"
+ // PodReasonUnschedulable reason in PodScheduled PodCondition means that the scheduler
+ // can't schedule the pod right now, for example due to insufficient resources in the cluster.
+ PodReasonUnschedulable = "Unschedulable"
+)
+
+// PodCondition contains details for the current condition of this pod.
+type PodCondition struct {
+ // Type is the type of the condition.
+ // Currently only Ready.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
+ Type PodConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=PodConditionType"`
+ // Status is the status of the condition.
+ // Can be True, False, Unknown.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
+ Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"`
+ // Last time we probed the condition.
+ // +optional
+ LastProbeTime metav1.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"`
+ // Last time the condition transitioned from one status to another.
+ // +optional
+ LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
+ // Unique, one-word, CamelCase reason for the condition's last transition.
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
+ // Human-readable message indicating details about last transition.
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
+}
+
+// RestartPolicy describes how the container should be restarted.
+// Only one of the following restart policies may be specified.
+// If none of the following policies is specified, the default one
+// is RestartPolicyAlways.
+type RestartPolicy string
+
+const (
+ RestartPolicyAlways RestartPolicy = "Always"
+ RestartPolicyOnFailure RestartPolicy = "OnFailure"
+ RestartPolicyNever RestartPolicy = "Never"
+)
+
+// DNSPolicy defines how a pod's DNS will be configured.
+type DNSPolicy string
+
+const (
+ // DNSClusterFirstWithHostNet indicates that the pod should use cluster DNS
+ // first, if it is available, then fall back on the default
+ // (as determined by kubelet) DNS settings.
+ DNSClusterFirstWithHostNet DNSPolicy = "ClusterFirstWithHostNet"
+
+ // DNSClusterFirst indicates that the pod should use cluster DNS
+ // first unless hostNetwork is true, if it is available, then
+ // fall back on the default (as determined by kubelet) DNS settings.
+ DNSClusterFirst DNSPolicy = "ClusterFirst"
+
+ // DNSDefault indicates that the pod should use the default (as
+ // determined by kubelet) DNS settings.
+ DNSDefault DNSPolicy = "Default"
+
+ DefaultTerminationGracePeriodSeconds = 30
+)
+
+// A node selector represents the union of the results of one or more label queries
+// over a set of nodes; that is, it represents the OR of the selectors represented
+// by the node selector terms.
+type NodeSelector struct {
+ //Required. A list of node selector terms. The terms are ORed.
+ NodeSelectorTerms []NodeSelectorTerm `json:"nodeSelectorTerms" protobuf:"bytes,1,rep,name=nodeSelectorTerms"`
+}
+
+// A null or empty node selector term matches no objects.
+type NodeSelectorTerm struct {
+ //Required. A list of node selector requirements. The requirements are ANDed.
+ MatchExpressions []NodeSelectorRequirement `json:"matchExpressions" protobuf:"bytes,1,rep,name=matchExpressions"`
+}
+
+// A node selector requirement is a selector that contains values, a key, and an operator
+// that relates the key and values.
+type NodeSelectorRequirement struct {
+ // The label key that the selector applies to.
+ // +patchMergeKey=key
+ // +patchStrategy=merge
+ Key string `json:"key" patchStrategy:"merge" patchMergeKey:"key" protobuf:"bytes,1,opt,name=key"`
+ // Represents a key's relationship to a set of values.
+ // Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
+ Operator NodeSelectorOperator `json:"operator" protobuf:"bytes,2,opt,name=operator,casttype=NodeSelectorOperator"`
+ // An array of string values. If the operator is In or NotIn,
+ // the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ // the values array must be empty. If the operator is Gt or Lt, the values
+ // array must have a single element, which will be interpreted as an integer.
+ // This array is replaced during a strategic merge patch.
+ // +optional
+ Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"`
+}
+
+// A node selector operator is the set of operators that can be used in
+// a node selector requirement.
+type NodeSelectorOperator string
+
+const (
+ NodeSelectorOpIn NodeSelectorOperator = "In"
+ NodeSelectorOpNotIn NodeSelectorOperator = "NotIn"
+ NodeSelectorOpExists NodeSelectorOperator = "Exists"
+ NodeSelectorOpDoesNotExist NodeSelectorOperator = "DoesNotExist"
+ NodeSelectorOpGt NodeSelectorOperator = "Gt"
+ NodeSelectorOpLt NodeSelectorOperator = "Lt"
+)
+
+// Affinity is a group of affinity scheduling rules.
+type Affinity struct {
+ // Describes node affinity scheduling rules for the pod.
+ // +optional
+ NodeAffinity *NodeAffinity `json:"nodeAffinity,omitempty" protobuf:"bytes,1,opt,name=nodeAffinity"`
+ // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
+ // +optional
+ PodAffinity *PodAffinity `json:"podAffinity,omitempty" protobuf:"bytes,2,opt,name=podAffinity"`
+ // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
+ // +optional
+ PodAntiAffinity *PodAntiAffinity `json:"podAntiAffinity,omitempty" protobuf:"bytes,3,opt,name=podAntiAffinity"`
+}
+
+// Pod affinity is a group of inter pod affinity scheduling rules.
+type PodAffinity struct {
+ // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented.
+ // If the affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to a pod label update), the
+ // system will try to eventually evict the pod from its node.
+ // When there are multiple elements, the lists of nodes corresponding to each
+ // podAffinityTerm are intersected, i.e. all terms must be satisfied.
+ // +optional
+ // RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"`
+ // If the affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to a pod label update), the
+ // system may or may not try to eventually evict the pod from its node.
+ // When there are multiple elements, the lists of nodes corresponding to each
+ // podAffinityTerm are intersected, i.e. all terms must be satisfied.
+ // +optional
+ RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,1,rep,name=requiredDuringSchedulingIgnoredDuringExecution"`
+ // The scheduler will prefer to schedule pods to nodes that satisfy
+ // the affinity expressions specified by this field, but it may choose
+ // a node that violates one or more of the expressions. The node that is
+ // most preferred is the one with the greatest sum of weights, i.e.
+ // for each node that meets all of the scheduling requirements (resource
+ // request, requiredDuringScheduling affinity expressions, etc.),
+ // compute a sum by iterating through the elements of this field and adding
+ // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
+ // node(s) with the highest sum are the most preferred.
+ // +optional
+ PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,2,rep,name=preferredDuringSchedulingIgnoredDuringExecution"`
+}
+
+// Pod anti affinity is a group of inter pod anti affinity scheduling rules.
+type PodAntiAffinity struct {
+ // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented.
+ // If the anti-affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the anti-affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to a pod label update), the
+ // system will try to eventually evict the pod from its node.
+ // When there are multiple elements, the lists of nodes corresponding to each
+ // podAffinityTerm are intersected, i.e. all terms must be satisfied.
+ // +optional
+ // RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"`
+ // If the anti-affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the anti-affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to a pod label update), the
+ // system may or may not try to eventually evict the pod from its node.
+ // When there are multiple elements, the lists of nodes corresponding to each
+ // podAffinityTerm are intersected, i.e. all terms must be satisfied.
+ // +optional
+ RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,1,rep,name=requiredDuringSchedulingIgnoredDuringExecution"`
+ // The scheduler will prefer to schedule pods to nodes that satisfy
+ // the anti-affinity expressions specified by this field, but it may choose
+ // a node that violates one or more of the expressions. The node that is
+ // most preferred is the one with the greatest sum of weights, i.e.
+ // for each node that meets all of the scheduling requirements (resource
+ // request, requiredDuringScheduling anti-affinity expressions, etc.),
+ // compute a sum by iterating through the elements of this field and adding
+ // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
+ // node(s) with the highest sum are the most preferred.
+ // +optional
+ PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,2,rep,name=preferredDuringSchedulingIgnoredDuringExecution"`
+}
+
+// The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)
+type WeightedPodAffinityTerm struct {
+ // weight associated with matching the corresponding podAffinityTerm,
+ // in the range 1-100.
+ Weight int32 `json:"weight" protobuf:"varint,1,opt,name=weight"`
+ // Required. A pod affinity term, associated with the corresponding weight.
+ PodAffinityTerm PodAffinityTerm `json:"podAffinityTerm" protobuf:"bytes,2,opt,name=podAffinityTerm"`
+}
+
+// Defines a set of pods (namely those matching the labelSelector
+// relative to the given namespace(s)) that this pod should be
+// co-located (affinity) or not co-located (anti-affinity) with,
+// where co-located is defined as running on a node whose value of
+// the label with key <topologyKey> tches that of any node on which
+// a pod of the set of pods is running
+type PodAffinityTerm struct {
+ // A label query over a set of resources, in this case pods.
+ // +optional
+ LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty" protobuf:"bytes,1,opt,name=labelSelector"`
+ // namespaces specifies which namespaces the labelSelector applies to (matches against);
+ // null or empty list means "this pod's namespace"
+ Namespaces []string `json:"namespaces,omitempty" protobuf:"bytes,2,rep,name=namespaces"`
+ // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
+ // the labelSelector in the specified namespaces, where co-located is defined as running on a node
+ // whose value of the label with key topologyKey matches that of any node on which any of the
+ // selected pods is running.
+ // For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as "all topologies"
+ // ("all topologies" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains);
+ // for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed.
+ // +optional
+ TopologyKey string `json:"topologyKey,omitempty" protobuf:"bytes,3,opt,name=topologyKey"`
+}
+
+// Node affinity is a group of node affinity scheduling rules.
+type NodeAffinity struct {
+ // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented.
+ // If the affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to an update), the system
+ // will try to eventually evict the pod from its node.
+ // +optional
+ // RequiredDuringSchedulingRequiredDuringExecution *NodeSelector `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"`
+
+ // If the affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to an update), the system
+ // may or may not try to eventually evict the pod from its node.
+ // +optional
+ RequiredDuringSchedulingIgnoredDuringExecution *NodeSelector `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,1,opt,name=requiredDuringSchedulingIgnoredDuringExecution"`
+ // The scheduler will prefer to schedule pods to nodes that satisfy
+ // the affinity expressions specified by this field, but it may choose
+ // a node that violates one or more of the expressions. The node that is
+ // most preferred is the one with the greatest sum of weights, i.e.
+ // for each node that meets all of the scheduling requirements (resource
+ // request, requiredDuringScheduling affinity expressions, etc.),
+ // compute a sum by iterating through the elements of this field and adding
+ // "weight" to the sum if the node matches the corresponding matchExpressions; the
+ // node(s) with the highest sum are the most preferred.
+ // +optional
+ PreferredDuringSchedulingIgnoredDuringExecution []PreferredSchedulingTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,2,rep,name=preferredDuringSchedulingIgnoredDuringExecution"`
+}
+
+// An empty preferred scheduling term matches all objects with implicit weight 0
+// (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).
+type PreferredSchedulingTerm struct {
+ // Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.
+ Weight int32 `json:"weight" protobuf:"varint,1,opt,name=weight"`
+ // A node selector term, associated with the corresponding weight.
+ Preference NodeSelectorTerm `json:"preference" protobuf:"bytes,2,opt,name=preference"`
+}
+
+// The node this Taint is attached to has the effect "effect" on
+// any pod that that does not tolerate the Taint.
+type Taint struct {
+ // Required. The taint key to be applied to a node.
+ // +patchMergeKey=key
+ // +patchStrategy=merge
+ Key string `json:"key" patchStrategy:"merge" patchMergeKey:"key" protobuf:"bytes,1,opt,name=key"`
+ // Required. The taint value corresponding to the taint key.
+ // +optional
+ Value string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"`
+ // Required. The effect of the taint on pods
+ // that do not tolerate the taint.
+ // Valid effects are NoSchedule, PreferNoSchedule and NoExecute.
+ Effect TaintEffect `json:"effect" protobuf:"bytes,3,opt,name=effect,casttype=TaintEffect"`
+ // TimeAdded represents the time at which the taint was added.
+ // It is only written for NoExecute taints.
+ // +optional
+ TimeAdded metav1.Time `json:"timeAdded,omitempty" protobuf:"bytes,4,opt,name=timeAdded"`
+}
+
+type TaintEffect string
+
+const (
+ // Do not allow new pods to schedule onto the node unless they tolerate the taint,
+ // but allow all pods submitted to Kubelet without going through the scheduler
+ // to start, and allow all already-running pods to continue running.
+ // Enforced by the scheduler.
+ TaintEffectNoSchedule TaintEffect = "NoSchedule"
+ // Like TaintEffectNoSchedule, but the scheduler tries not to schedule
+ // new pods onto the node, rather than prohibiting new pods from scheduling
+ // onto the node entirely. Enforced by the scheduler.
+ TaintEffectPreferNoSchedule TaintEffect = "PreferNoSchedule"
+ // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented.
+ // Like TaintEffectNoSchedule, but additionally do not allow pods submitted to
+ // Kubelet without going through the scheduler to start.
+ // Enforced by Kubelet and the scheduler.
+ // TaintEffectNoScheduleNoAdmit TaintEffect = "NoScheduleNoAdmit"
+ // Evict any already-running pods that do not tolerate the taint.
+ // Currently enforced by NodeController.
+ TaintEffectNoExecute TaintEffect = "NoExecute"
+)
+
+// The pod this Toleration is attached to tolerates any taint that matches
+// the triple <key,value,effect> using the matching operator <operator>.
+type Toleration struct {
+ // Key is the taint key that the toleration applies to. Empty means match all taint keys.
+ // If the key is empty, operator must be Exists; this combination means to match all values and all keys.
+ // +optional
+ // +patchMergeKey=key
+ // +patchStrategy=merge
+ Key string `json:"key,omitempty" patchStrategy:"merge" patchMergeKey:"key" protobuf:"bytes,1,opt,name=key"`
+ // Operator represents a key's relationship to the value.
+ // Valid operators are Exists and Equal. Defaults to Equal.
+ // Exists is equivalent to wildcard for value, so that a pod can
+ // tolerate all taints of a particular category.
+ // +optional
+ Operator TolerationOperator `json:"operator,omitempty" protobuf:"bytes,2,opt,name=operator,casttype=TolerationOperator"`
+ // Value is the taint value the toleration matches to.
+ // If the operator is Exists, the value should be empty, otherwise just a regular string.
+ // +optional
+ Value string `json:"value,omitempty" protobuf:"bytes,3,opt,name=value"`
+ // Effect indicates the taint effect to match. Empty means match all taint effects.
+ // When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
+ // +optional
+ Effect TaintEffect `json:"effect,omitempty" protobuf:"bytes,4,opt,name=effect,casttype=TaintEffect"`
+ // TolerationSeconds represents the period of time the toleration (which must be
+ // of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
+ // it is not set, which means tolerate the taint forever (do not evict). Zero and
+ // negative values will be treated as 0 (evict immediately) by the system.
+ // +optional
+ TolerationSeconds *int64 `json:"tolerationSeconds,omitempty" protobuf:"varint,5,opt,name=tolerationSeconds"`
+}
+
+// A toleration operator is the set of operators that can be used in a toleration.
+type TolerationOperator string
+
+const (
+ TolerationOpExists TolerationOperator = "Exists"
+ TolerationOpEqual TolerationOperator = "Equal"
+)
+
+const (
+ // This annotation key will be used to contain an array of v1 JSON encoded Containers
+ // for init containers. The annotation will be placed into the internal type and cleared.
+ // This key is only recognized by version >= 1.4.
+ PodInitContainersBetaAnnotationKey = "pod.beta.kubernetes.io/init-containers"
+ // This annotation key will be used to contain an array of v1 JSON encoded Containers
+ // for init containers. The annotation will be placed into the internal type and cleared.
+ // This key is recognized by version >= 1.3. For version 1.4 code, this key
+ // will have its value copied to the beta key.
+ PodInitContainersAnnotationKey = "pod.alpha.kubernetes.io/init-containers"
+ // This annotation key will be used to contain an array of v1 JSON encoded
+ // ContainerStatuses for init containers. The annotation will be placed into the internal
+ // type and cleared. This key is only recognized by version >= 1.4.
+ PodInitContainerStatusesBetaAnnotationKey = "pod.beta.kubernetes.io/init-container-statuses"
+ // This annotation key will be used to contain an array of v1 JSON encoded
+ // ContainerStatuses for init containers. The annotation will be placed into the internal
+ // type and cleared. This key is recognized by version >= 1.3. For version 1.4 code,
+ // this key will have its value copied to the beta key.
+ PodInitContainerStatusesAnnotationKey = "pod.alpha.kubernetes.io/init-container-statuses"
+)
+
+// PodSpec is a description of a pod.
+type PodSpec struct {
+ // List of volumes that can be mounted by containers belonging to the pod.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes
+ // +optional
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ Volumes []Volume `json:"volumes,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,1,rep,name=volumes"`
+ // List of initialization containers belonging to the pod.
+ // Init containers are executed in order prior to containers being started. If any
+ // init container fails, the pod is considered to have failed and is handled according
+ // to its restartPolicy. The name for an init container or normal container must be
+ // unique among all containers.
+ // Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes.
+ // The resourceRequirements of an init container are taken into account during scheduling
+ // by finding the highest request/limit for each resource type, and then using the max of
+ // of that value or the sum of the normal containers. Limits are applied to init containers
+ // in a similar fashion.
+ // Init containers cannot currently be added or removed.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ InitContainers []Container `json:"initContainers,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,20,rep,name=initContainers"`
+ // List of containers belonging to the pod.
+ // Containers cannot currently be added or removed.
+ // There must be at least one container in a Pod.
+ // Cannot be updated.
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ Containers []Container `json:"containers" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=containers"`
+ // Restart policy for all containers within the pod.
+ // One of Always, OnFailure, Never.
+ // Default to Always.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy
+ // +optional
+ RestartPolicy RestartPolicy `json:"restartPolicy,omitempty" protobuf:"bytes,3,opt,name=restartPolicy,casttype=RestartPolicy"`
+ // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request.
+ // Value must be non-negative integer. The value zero indicates delete immediately.
+ // If this value is nil, the default grace period will be used instead.
+ // The grace period is the duration in seconds after the processes running in the pod are sent
+ // a termination signal and the time when the processes are forcibly halted with a kill signal.
+ // Set this value longer than the expected cleanup time for your process.
+ // Defaults to 30 seconds.
+ // +optional
+ TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty" protobuf:"varint,4,opt,name=terminationGracePeriodSeconds"`
+ // Optional duration in seconds the pod may be active on the node relative to
+ // StartTime before the system will actively try to mark it failed and kill associated containers.
+ // Value must be a positive integer.
+ // +optional
+ ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" protobuf:"varint,5,opt,name=activeDeadlineSeconds"`
+ // Set DNS policy for containers within the pod.
+ // One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'.
+ // Defaults to "ClusterFirst".
+ // To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.
+ // +optional
+ DNSPolicy DNSPolicy `json:"dnsPolicy,omitempty" protobuf:"bytes,6,opt,name=dnsPolicy,casttype=DNSPolicy"`
+ // NodeSelector is a selector which must be true for the pod to fit on a node.
+ // Selector which must match a node's labels for the pod to be scheduled on that node.
+ // More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
+ // +optional
+ NodeSelector map[string]string `json:"nodeSelector,omitempty" protobuf:"bytes,7,rep,name=nodeSelector"`
+
+ // ServiceAccountName is the name of the ServiceAccount to use to run this pod.
+ // More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
+ // +optional
+ ServiceAccountName string `json:"serviceAccountName,omitempty" protobuf:"bytes,8,opt,name=serviceAccountName"`
+ // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName.
+ // Deprecated: Use serviceAccountName instead.
+ // +k8s:conversion-gen=false
+ // +optional
+ DeprecatedServiceAccount string `json:"serviceAccount,omitempty" protobuf:"bytes,9,opt,name=serviceAccount"`
+ // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.
+ // +optional
+ AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty" protobuf:"varint,21,opt,name=automountServiceAccountToken"`
+
+ // NodeName is a request to schedule this pod onto a specific node. If it is non-empty,
+ // the scheduler simply schedules this pod onto that node, assuming that it fits resource
+ // requirements.
+ // +optional
+ NodeName string `json:"nodeName,omitempty" protobuf:"bytes,10,opt,name=nodeName"`
+ // Host networking requested for this pod. Use the host's network namespace.
+ // If this option is set, the ports that will be used must be specified.
+ // Default to false.
+ // +k8s:conversion-gen=false
+ // +optional
+ HostNetwork bool `json:"hostNetwork,omitempty" protobuf:"varint,11,opt,name=hostNetwork"`
+ // Use the host's pid namespace.
+ // Optional: Default to false.
+ // +k8s:conversion-gen=false
+ // +optional
+ HostPID bool `json:"hostPID,omitempty" protobuf:"varint,12,opt,name=hostPID"`
+ // Use the host's ipc namespace.
+ // Optional: Default to false.
+ // +k8s:conversion-gen=false
+ // +optional
+ HostIPC bool `json:"hostIPC,omitempty" protobuf:"varint,13,opt,name=hostIPC"`
+ // SecurityContext holds pod-level security attributes and common container settings.
+ // Optional: Defaults to empty. See type description for default values of each field.
+ // +optional
+ SecurityContext *PodSecurityContext `json:"securityContext,omitempty" protobuf:"bytes,14,opt,name=securityContext"`
+ // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec.
+ // If specified, these secrets will be passed to individual puller implementations for them to use. For example,
+ // in the case of docker, only DockerConfig type secrets are honored.
+ // More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod
+ // +optional
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ ImagePullSecrets []LocalObjectReference `json:"imagePullSecrets,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,15,rep,name=imagePullSecrets"`
+ // Specifies the hostname of the Pod
+ // If not specified, the pod's hostname will be set to a system-defined value.
+ // +optional
+ Hostname string `json:"hostname,omitempty" protobuf:"bytes,16,opt,name=hostname"`
+ // If specified, the fully qualified Pod hostname will be "<hostname>.<subdomain>.<pod namespace>.svc.<cluster domain>".
+ // If not specified, the pod will not have a domainname at all.
+ // +optional
+ Subdomain string `json:"subdomain,omitempty" protobuf:"bytes,17,opt,name=subdomain"`
+ // If specified, the pod's scheduling constraints
+ // +optional
+ Affinity *Affinity `json:"affinity,omitempty" protobuf:"bytes,18,opt,name=affinity"`
+ // If specified, the pod will be dispatched by specified scheduler.
+ // If not specified, the pod will be dispatched by default scheduler.
+ // +optional
+ SchedulerName string `json:"schedulerName,omitempty" protobuf:"bytes,19,opt,name=schedulerName"`
+ // If specified, the pod's tolerations.
+ // +optional
+ Tolerations []Toleration `json:"tolerations,omitempty" protobuf:"bytes,22,opt,name=tolerations"`
+ // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts
+ // file if specified. This is only valid for non-hostNetwork pods.
+ // +optional
+ // +patchMergeKey=ip
+ // +patchStrategy=merge
+ HostAliases []HostAlias `json:"hostAliases,omitempty" patchStrategy:"merge" patchMergeKey:"ip" protobuf:"bytes,23,rep,name=hostAliases"`
+}
+
+// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
+// pod's hosts file.
+type HostAlias struct {
+ // IP address of the host file entry.
+ IP string `json:"ip,omitempty" protobuf:"bytes,1,opt,name=ip"`
+ // Hostnames for the above IP address.
+ Hostnames []string `json:"hostnames,omitempty" protobuf:"bytes,2,rep,name=hostnames"`
+}
+
+// PodSecurityContext holds pod-level security attributes and common container settings.
+// Some fields are also present in container.securityContext. Field values of
+// container.securityContext take precedence over field values of PodSecurityContext.
+type PodSecurityContext struct {
+ // The SELinux context to be applied to all containers.
+ // If unspecified, the container runtime will allocate a random SELinux context for each
+ // container. May also be set in SecurityContext. If set in
+ // both SecurityContext and PodSecurityContext, the value specified in SecurityContext
+ // takes precedence for that container.
+ // +optional
+ SELinuxOptions *SELinuxOptions `json:"seLinuxOptions,omitempty" protobuf:"bytes,1,opt,name=seLinuxOptions"`
+ // The UID to run the entrypoint of the container process.
+ // Defaults to user specified in image metadata if unspecified.
+ // May also be set in SecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence
+ // for that container.
+ // +optional
+ RunAsUser *int64 `json:"runAsUser,omitempty" protobuf:"varint,2,opt,name=runAsUser"`
+ // Indicates that the container must run as a non-root user.
+ // If true, the Kubelet will validate the image at runtime to ensure that it
+ // does not run as UID 0 (root) and fail to start the container if it does.
+ // If unset or false, no such validation will be performed.
+ // May also be set in SecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence.
+ // +optional
+ RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" protobuf:"varint,3,opt,name=runAsNonRoot"`
+ // A list of groups applied to the first process run in each container, in addition
+ // to the container's primary GID. If unspecified, no groups will be added to
+ // any container.
+ // +optional
+ SupplementalGroups []int64 `json:"supplementalGroups,omitempty" protobuf:"varint,4,rep,name=supplementalGroups"`
+ // A special supplemental group that applies to all containers in a pod.
+ // Some volume types allow the Kubelet to change the ownership of that volume
+ // to be owned by the pod:
+ //
+ // 1. The owning GID will be the FSGroup
+ // 2. The setgid bit is set (new files created in the volume will be owned by FSGroup)
+ // 3. The permission bits are OR'd with rw-rw----
+ //
+ // If unset, the Kubelet will not modify the ownership and permissions of any volume.
+ // +optional
+ FSGroup *int64 `json:"fsGroup,omitempty" protobuf:"varint,5,opt,name=fsGroup"`
+}
+
+// PodQOSClass defines the supported qos classes of Pods.
+type PodQOSClass string
+
+const (
+ // PodQOSGuaranteed is the Guaranteed qos class.
+ PodQOSGuaranteed PodQOSClass = "Guaranteed"
+ // PodQOSBurstable is the Burstable qos class.
+ PodQOSBurstable PodQOSClass = "Burstable"
+ // PodQOSBestEffort is the BestEffort qos class.
+ PodQOSBestEffort PodQOSClass = "BestEffort"
+)
+
+// PodStatus represents information about the status of a pod. Status may trail the actual
+// state of a system.
+type PodStatus struct {
+ // Current condition of the pod.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase
+ // +optional
+ Phase PodPhase `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=PodPhase"`
+ // Current service state of pod.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ Conditions []PodCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=conditions"`
+ // A human readable message indicating details about why the pod is in this condition.
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"`
+ // A brief CamelCase message indicating details about why the pod is in this state.
+ // e.g. 'OutOfDisk'
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
+
+ // IP address of the host to which the pod is assigned. Empty if not yet scheduled.
+ // +optional
+ HostIP string `json:"hostIP,omitempty" protobuf:"bytes,5,opt,name=hostIP"`
+ // IP address allocated to the pod. Routable at least within the cluster.
+ // Empty if not yet allocated.
+ // +optional
+ PodIP string `json:"podIP,omitempty" protobuf:"bytes,6,opt,name=podIP"`
+
+ // RFC 3339 date and time at which the object was acknowledged by the Kubelet.
+ // This is before the Kubelet pulled the container image(s) for the pod.
+ // +optional
+ StartTime *metav1.Time `json:"startTime,omitempty" protobuf:"bytes,7,opt,name=startTime"`
+
+ // The list has one entry per init container in the manifest. The most recent successful
+ // init container will have ready = true, the most recently started container will have
+ // startTime set.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status
+ InitContainerStatuses []ContainerStatus `json:"initContainerStatuses,omitempty" protobuf:"bytes,10,rep,name=initContainerStatuses"`
+
+ // The list has one entry per container in the manifest. Each entry is currently the output
+ // of `docker inspect`.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status
+ // +optional
+ ContainerStatuses []ContainerStatus `json:"containerStatuses,omitempty" protobuf:"bytes,8,rep,name=containerStatuses"`
+ // The Quality of Service (QOS) classification assigned to the pod based on resource requirements
+ // See PodQOSClass type for available QOS classes
+ // More info: https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md
+ // +optional
+ QOSClass PodQOSClass `json:"qosClass,omitempty" protobuf:"bytes,9,rep,name=qosClass"`
+}
+
+// PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded
+type PodStatusResult struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+ // Most recently observed status of the pod.
+ // This data may not be up to date.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status PodStatus `json:"status,omitempty" protobuf:"bytes,2,opt,name=status"`
+}
+
+// +genclient=true
+
+// Pod is a collection of containers that can run on a host. This resource is created
+// by clients and scheduled onto hosts.
+type Pod struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Specification of the desired behavior of the pod.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec PodSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Most recently observed status of the pod.
+ // This data may not be up to date.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status PodStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// PodList is a list of Pods.
+type PodList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of pods.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md
+ Items []Pod `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// PodTemplateSpec describes the data a pod should have when created from a template
+type PodTemplateSpec struct {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Specification of the desired behavior of the pod.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec PodSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+}
+
+// +genclient=true
+
+// PodTemplate describes a template for creating copies of a predefined pod.
+type PodTemplate struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Template defines the pods that will be created from this pod template.
+ // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Template PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,2,opt,name=template"`
+}
+
+// PodTemplateList is a list of PodTemplates.
+type PodTemplateList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of pod templates
+ Items []PodTemplate `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// ReplicationControllerSpec is the specification of a replication controller.
+type ReplicationControllerSpec struct {
+ // Replicas is the number of desired replicas.
+ // This is a pointer to distinguish between explicit zero and unspecified.
+ // Defaults to 1.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller
+ // +optional
+ Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
+
+ // Minimum number of seconds for which a newly created pod should be ready
+ // without any of its container crashing, for it to be considered available.
+ // Defaults to 0 (pod will be considered available as soon as it is ready)
+ // +optional
+ MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,4,opt,name=minReadySeconds"`
+
+ // Selector is a label query over pods that should match the Replicas count.
+ // If Selector is empty, it is defaulted to the labels present on the Pod template.
+ // Label keys and values that must match in order to be controlled by this replication
+ // controller, if empty defaulted to labels on Pod template.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,2,rep,name=selector"`
+
+ // TemplateRef is a reference to an object that describes the pod that will be created if
+ // insufficient replicas are detected.
+ // Reference to an object that describes the pod that will be created if insufficient replicas are detected.
+ // +optional
+ // TemplateRef *ObjectReference `json:"templateRef,omitempty"`
+
+ // Template is the object that describes the pod that will be created if
+ // insufficient replicas are detected. This takes precedence over a TemplateRef.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
+ // +optional
+ Template *PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,3,opt,name=template"`
+}
+
+// ReplicationControllerStatus represents the current status of a replication
+// controller.
+type ReplicationControllerStatus struct {
+ // Replicas is the most recently oberved number of replicas.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller
+ Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"`
+
+ // The number of pods that have labels matching the labels of the pod template of the replication controller.
+ // +optional
+ FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty" protobuf:"varint,2,opt,name=fullyLabeledReplicas"`
+
+ // The number of ready replicas for this replication controller.
+ // +optional
+ ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,4,opt,name=readyReplicas"`
+
+ // The number of available replicas (ready for at least minReadySeconds) for this replication controller.
+ // +optional
+ AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,5,opt,name=availableReplicas"`
+
+ // ObservedGeneration reflects the generation of the most recently observed replication controller.
+ // +optional
+ ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"`
+
+ // Represents the latest available observations of a replication controller's current state.
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ Conditions []ReplicationControllerCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"`
+}
+
+type ReplicationControllerConditionType string
+
+// These are valid conditions of a replication controller.
+const (
+ // ReplicationControllerReplicaFailure is added in a replication controller when one of its pods
+ // fails to be created due to insufficient quota, limit ranges, pod security policy, node selectors,
+ // etc. or deleted due to kubelet being down or finalizers are failing.
+ ReplicationControllerReplicaFailure ReplicationControllerConditionType = "ReplicaFailure"
+)
+
+// ReplicationControllerCondition describes the state of a replication controller at a certain point.
+type ReplicationControllerCondition struct {
+ // Type of replication controller condition.
+ Type ReplicationControllerConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=ReplicationControllerConditionType"`
+ // Status of the condition, one of True, False, Unknown.
+ Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"`
+ // The last time the condition transitioned from one status to another.
+ // +optional
+ LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
+ // The reason for the condition's last transition.
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
+ // A human readable message indicating details about the transition.
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
+}
+
+// +genclient=true
+
+// ReplicationController represents the configuration of a replication controller.
+type ReplicationController struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // If the Labels of a ReplicationController are empty, they are defaulted to
+ // be the same as the Pod(s) that the replication controller manages.
+ // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines the specification of the desired behavior of the replication controller.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec ReplicationControllerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is the most recently observed status of the replication controller.
+ // This data may be out of date by some window of time.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status ReplicationControllerStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// ReplicationControllerList is a collection of replication controllers.
+type ReplicationControllerList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of replication controllers.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
+ Items []ReplicationController `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// Session Affinity Type string
+type ServiceAffinity string
+
+const (
+ // ServiceAffinityClientIP is the Client IP based.
+ ServiceAffinityClientIP ServiceAffinity = "ClientIP"
+
+ // ServiceAffinityNone - no session affinity.
+ ServiceAffinityNone ServiceAffinity = "None"
+)
+
+// Service Type string describes ingress methods for a service
+type ServiceType string
+
+const (
+ // ServiceTypeClusterIP means a service will only be accessible inside the
+ // cluster, via the cluster IP.
+ ServiceTypeClusterIP ServiceType = "ClusterIP"
+
+ // ServiceTypeNodePort means a service will be exposed on one port of
+ // every node, in addition to 'ClusterIP' type.
+ ServiceTypeNodePort ServiceType = "NodePort"
+
+ // ServiceTypeLoadBalancer means a service will be exposed via an
+ // external load balancer (if the cloud provider supports it), in addition
+ // to 'NodePort' type.
+ ServiceTypeLoadBalancer ServiceType = "LoadBalancer"
+
+ // ServiceTypeExternalName means a service consists of only a reference to
+ // an external name that kubedns or equivalent will return as a CNAME
+ // record, with no exposing or proxying of any pods involved.
+ ServiceTypeExternalName ServiceType = "ExternalName"
+)
+
+// Service External Traffic Policy Type string
+type ServiceExternalTrafficPolicyType string
+
+const (
+ // ServiceExternalTrafficPolicyTypeLocal specifies node-local endpoints behavior.
+ ServiceExternalTrafficPolicyTypeLocal ServiceExternalTrafficPolicyType = "Local"
+ // ServiceExternalTrafficPolicyTypeCluster specifies node-global (legacy) behavior.
+ ServiceExternalTrafficPolicyTypeCluster ServiceExternalTrafficPolicyType = "Cluster"
+)
+
+// ServiceStatus represents the current status of a service.
+type ServiceStatus struct {
+ // LoadBalancer contains the current status of the load-balancer,
+ // if one is present.
+ // +optional
+ LoadBalancer LoadBalancerStatus `json:"loadBalancer,omitempty" protobuf:"bytes,1,opt,name=loadBalancer"`
+}
+
+// LoadBalancerStatus represents the status of a load-balancer.
+type LoadBalancerStatus struct {
+ // Ingress is a list containing ingress points for the load-balancer.
+ // Traffic intended for the service should be sent to these ingress points.
+ // +optional
+ Ingress []LoadBalancerIngress `json:"ingress,omitempty" protobuf:"bytes,1,rep,name=ingress"`
+}
+
+// LoadBalancerIngress represents the status of a load-balancer ingress point:
+// traffic intended for the service should be sent to an ingress point.
+type LoadBalancerIngress struct {
+ // IP is set for load-balancer ingress points that are IP based
+ // (typically GCE or OpenStack load-balancers)
+ // +optional
+ IP string `json:"ip,omitempty" protobuf:"bytes,1,opt,name=ip"`
+
+ // Hostname is set for load-balancer ingress points that are DNS based
+ // (typically AWS load-balancers)
+ // +optional
+ Hostname string `json:"hostname,omitempty" protobuf:"bytes,2,opt,name=hostname"`
+}
+
+// ServiceSpec describes the attributes that a user creates on a service.
+type ServiceSpec struct {
+ // The list of ports that are exposed by this service.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
+ // +patchMergeKey=port
+ // +patchStrategy=merge
+ Ports []ServicePort `json:"ports,omitempty" patchStrategy:"merge" patchMergeKey:"port" protobuf:"bytes,1,rep,name=ports"`
+
+ // Route service traffic to pods with label keys and values matching this
+ // selector. If empty or not present, the service is assumed to have an
+ // external process managing its endpoints, which Kubernetes will not
+ // modify. Only applies to types ClusterIP, NodePort, and LoadBalancer.
+ // Ignored if type is ExternalName.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/
+ // +optional
+ Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,2,rep,name=selector"`
+
+ // clusterIP is the IP address of the service and is usually assigned
+ // randomly by the master. If an address is specified manually and is not in
+ // use by others, it will be allocated to the service; otherwise, creation
+ // of the service will fail. This field can not be changed through updates.
+ // Valid values are "None", empty string (""), or a valid IP address. "None"
+ // can be specified for headless services when proxying is not required.
+ // Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if
+ // type is ExternalName.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
+ // +optional
+ ClusterIP string `json:"clusterIP,omitempty" protobuf:"bytes,3,opt,name=clusterIP"`
+
+ // type determines how the Service is exposed. Defaults to ClusterIP. Valid
+ // options are ExternalName, ClusterIP, NodePort, and LoadBalancer.
+ // "ExternalName" maps to the specified externalName.
+ // "ClusterIP" allocates a cluster-internal IP address for load-balancing to
+ // endpoints. Endpoints are determined by the selector or if that is not
+ // specified, by manual construction of an Endpoints object. If clusterIP is
+ // "None", no virtual IP is allocated and the endpoints are published as a
+ // set of endpoints rather than a stable IP.
+ // "NodePort" builds on ClusterIP and allocates a port on every node which
+ // routes to the clusterIP.
+ // "LoadBalancer" builds on NodePort and creates an
+ // external load-balancer (if supported in the current cloud) which routes
+ // to the clusterIP.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services---service-types
+ // +optional
+ Type ServiceType `json:"type,omitempty" protobuf:"bytes,4,opt,name=type,casttype=ServiceType"`
+
+ // externalIPs is a list of IP addresses for which nodes in the cluster
+ // will also accept traffic for this service. These IPs are not managed by
+ // Kubernetes. The user is responsible for ensuring that traffic arrives
+ // at a node with this IP. A common example is external load-balancers
+ // that are not part of the Kubernetes system.
+ // +optional
+ ExternalIPs []string `json:"externalIPs,omitempty" protobuf:"bytes,5,rep,name=externalIPs"`
+
+ // Supports "ClientIP" and "None". Used to maintain session affinity.
+ // Enable client IP based session affinity.
+ // Must be ClientIP or None.
+ // Defaults to None.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
+ // +optional
+ SessionAffinity ServiceAffinity `json:"sessionAffinity,omitempty" protobuf:"bytes,7,opt,name=sessionAffinity,casttype=ServiceAffinity"`
+
+ // Only applies to Service Type: LoadBalancer
+ // LoadBalancer will get created with the IP specified in this field.
+ // This feature depends on whether the underlying cloud-provider supports specifying
+ // the loadBalancerIP when a load balancer is created.
+ // This field will be ignored if the cloud-provider does not support the feature.
+ // +optional
+ LoadBalancerIP string `json:"loadBalancerIP,omitempty" protobuf:"bytes,8,opt,name=loadBalancerIP"`
+
+ // If specified and supported by the platform, this will restrict traffic through the cloud-provider
+ // load-balancer will be restricted to the specified client IPs. This field will be ignored if the
+ // cloud-provider does not support the feature."
+ // More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/
+ // +optional
+ LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty" protobuf:"bytes,9,opt,name=loadBalancerSourceRanges"`
+
+ // externalName is the external reference that kubedns or equivalent will
+ // return as a CNAME record for this service. No proxying will be involved.
+ // Must be a valid DNS name and requires Type to be ExternalName.
+ // +optional
+ ExternalName string `json:"externalName,omitempty" protobuf:"bytes,10,opt,name=externalName"`
+
+ // externalTrafficPolicy denotes if this Service desires to route external
+ // traffic to node-local or cluster-wide endpoints. "Local" preserves the
+ // client source IP and avoids a second hop for LoadBalancer and Nodeport
+ // type services, but risks potentially imbalanced traffic spreading.
+ // "Cluster" obscures the client source IP and may cause a second hop to
+ // another node, but should have good overall load-spreading.
+ // +optional
+ ExternalTrafficPolicy ServiceExternalTrafficPolicyType `json:"externalTrafficPolicy,omitempty" protobuf:"bytes,11,opt,name=externalTrafficPolicy"`
+
+ // healthCheckNodePort specifies the healthcheck nodePort for the service.
+ // If not specified, HealthCheckNodePort is created by the service api
+ // backend with the allocated nodePort. Will use user-specified nodePort value
+ // if specified by the client. Only effects when Type is set to LoadBalancer
+ // and ExternalTrafficPolicy is set to Local.
+ // +optional
+ HealthCheckNodePort int32 `json:"healthCheckNodePort,omitempty" protobuf:"bytes,12,opt,name=healthCheckNodePort"`
+}
+
+// ServicePort contains information on service's port.
+type ServicePort struct {
+ // The name of this port within the service. This must be a DNS_LABEL.
+ // All ports within a ServiceSpec must have unique names. This maps to
+ // the 'Name' field in EndpointPort objects.
+ // Optional if only one ServicePort is defined on this service.
+ // +optional
+ Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
+
+ // The IP protocol for this port. Supports "TCP" and "UDP".
+ // Default is TCP.
+ // +optional
+ Protocol Protocol `json:"protocol,omitempty" protobuf:"bytes,2,opt,name=protocol,casttype=Protocol"`
+
+ // The port that will be exposed by this service.
+ Port int32 `json:"port" protobuf:"varint,3,opt,name=port"`
+
+ // Number or name of the port to access on the pods targeted by the service.
+ // Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+ // If this is a string, it will be looked up as a named port in the
+ // target Pod's container ports. If this is not specified, the value
+ // of the 'port' field is used (an identity map).
+ // This field is ignored for services with clusterIP=None, and should be
+ // omitted or set equal to the 'port' field.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service
+ // +optional
+ TargetPort intstr.IntOrString `json:"targetPort,omitempty" protobuf:"bytes,4,opt,name=targetPort"`
+
+ // The port on each node on which this service is exposed when type=NodePort or LoadBalancer.
+ // Usually assigned by the system. If specified, it will be allocated to the service
+ // if unused or else creation of the service will fail.
+ // Default is to auto-allocate a port if the ServiceType of this Service requires one.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
+ // +optional
+ NodePort int32 `json:"nodePort,omitempty" protobuf:"varint,5,opt,name=nodePort"`
+}
+
+// +genclient=true
+
+// Service is a named abstraction of software service (for example, mysql) consisting of local port
+// (for example 3306) that the proxy listens on, and the selector that determines which pods
+// will answer requests sent through the proxy.
+type Service struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines the behavior of a service.
+ // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec ServiceSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Most recently observed status of the service.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status ServiceStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+const (
+ // ClusterIPNone - do not assign a cluster IP
+ // no proxying required and no environment variables should be created for pods
+ ClusterIPNone = "None"
+)
+
+// ServiceList holds a list of services.
+type ServiceList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of services
+ Items []Service `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// +genclient=true
+
+// ServiceAccount binds together:
+// * a name, understood by users, and perhaps by peripheral systems, for an identity
+// * a principal that can be authenticated and authorized
+// * a set of secrets
+type ServiceAccount struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount.
+ // More info: https://kubernetes.io/docs/concepts/configuration/secret
+ // +optional
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ Secrets []ObjectReference `json:"secrets,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=secrets"`
+
+ // ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images
+ // in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets
+ // can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet.
+ // More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
+ // +optional
+ ImagePullSecrets []LocalObjectReference `json:"imagePullSecrets,omitempty" protobuf:"bytes,3,rep,name=imagePullSecrets"`
+
+ // AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted.
+ // Can be overridden at the pod level.
+ // +optional
+ AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty" protobuf:"varint,4,opt,name=automountServiceAccountToken"`
+}
+
+// ServiceAccountList is a list of ServiceAccount objects
+type ServiceAccountList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of ServiceAccounts.
+ // More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
+ Items []ServiceAccount `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// +genclient=true
+
+// Endpoints is a collection of endpoints that implement the actual service. Example:
+// Name: "mysvc",
+// Subsets: [
+// {
+// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
+// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
+// },
+// {
+// Addresses: [{"ip": "10.10.3.3"}],
+// Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}]
+// },
+// ]
+type Endpoints struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // The set of all endpoints is the union of all subsets. Addresses are placed into
+ // subsets according to the IPs they share. A single address with multiple ports,
+ // some of which are ready and some of which are not (because they come from
+ // different containers) will result in the address being displayed in different
+ // subsets for the different ports. No address will appear in both Addresses and
+ // NotReadyAddresses in the same subset.
+ // Sets of addresses and ports that comprise a service.
+ Subsets []EndpointSubset `json:"subsets" protobuf:"bytes,2,rep,name=subsets"`
+}
+
+// EndpointSubset is a group of addresses with a common set of ports. The
+// expanded set of endpoints is the Cartesian product of Addresses x Ports.
+// For example, given:
+// {
+// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
+// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
+// }
+// The resulting set of endpoints can be viewed as:
+// a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],
+// b: [ 10.10.1.1:309, 10.10.2.2:309 ]
+type EndpointSubset struct {
+ // IP addresses which offer the related ports that are marked as ready. These endpoints
+ // should be considered safe for load balancers and clients to utilize.
+ // +optional
+ Addresses []EndpointAddress `json:"addresses,omitempty" protobuf:"bytes,1,rep,name=addresses"`
+ // IP addresses which offer the related ports but are not currently marked as ready
+ // because they have not yet finished starting, have recently failed a readiness check,
+ // or have recently failed a liveness check.
+ // +optional
+ NotReadyAddresses []EndpointAddress `json:"notReadyAddresses,omitempty" protobuf:"bytes,2,rep,name=notReadyAddresses"`
+ // Port numbers available on the related IP addresses.
+ // +optional
+ Ports []EndpointPort `json:"ports,omitempty" protobuf:"bytes,3,rep,name=ports"`
+}
+
+// EndpointAddress is a tuple that describes single IP address.
+type EndpointAddress struct {
+ // The IP of this endpoint.
+ // May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16),
+ // or link-local multicast ((224.0.0.0/24).
+ // IPv6 is also accepted but not fully supported on all platforms. Also, certain
+ // kubernetes components, like kube-proxy, are not IPv6 ready.
+ // TODO: This should allow hostname or IP, See #4447.
+ IP string `json:"ip" protobuf:"bytes,1,opt,name=ip"`
+ // The Hostname of this endpoint
+ // +optional
+ Hostname string `json:"hostname,omitempty" protobuf:"bytes,3,opt,name=hostname"`
+ // Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.
+ // +optional
+ NodeName *string `json:"nodeName,omitempty" protobuf:"bytes,4,opt,name=nodeName"`
+ // Reference to object providing the endpoint.
+ // +optional
+ TargetRef *ObjectReference `json:"targetRef,omitempty" protobuf:"bytes,2,opt,name=targetRef"`
+}
+
+// EndpointPort is a tuple that describes a single port.
+type EndpointPort struct {
+ // The name of this port (corresponds to ServicePort.Name).
+ // Must be a DNS_LABEL.
+ // Optional only if one port is defined.
+ // +optional
+ Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
+
+ // The port number of the endpoint.
+ Port int32 `json:"port" protobuf:"varint,2,opt,name=port"`
+
+ // The IP protocol for this port.
+ // Must be UDP or TCP.
+ // Default is TCP.
+ // +optional
+ Protocol Protocol `json:"protocol,omitempty" protobuf:"bytes,3,opt,name=protocol,casttype=Protocol"`
+}
+
+// EndpointsList is a list of endpoints.
+type EndpointsList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of endpoints.
+ Items []Endpoints `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// NodeSpec describes the attributes that a node is created with.
+type NodeSpec struct {
+ // PodCIDR represents the pod IP range assigned to the node.
+ // +optional
+ PodCIDR string `json:"podCIDR,omitempty" protobuf:"bytes,1,opt,name=podCIDR"`
+ // External ID of the node assigned by some machine database (e.g. a cloud provider).
+ // Deprecated.
+ // +optional
+ ExternalID string `json:"externalID,omitempty" protobuf:"bytes,2,opt,name=externalID"`
+ // ID of the node assigned by the cloud provider in the format: <ProviderName>://<ProviderSpecificNodeID>
+ // +optional
+ ProviderID string `json:"providerID,omitempty" protobuf:"bytes,3,opt,name=providerID"`
+ // Unschedulable controls node schedulability of new pods. By default, node is schedulable.
+ // More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration
+ // +optional
+ Unschedulable bool `json:"unschedulable,omitempty" protobuf:"varint,4,opt,name=unschedulable"`
+ // If specified, the node's taints.
+ // +optional
+ Taints []Taint `json:"taints,omitempty" protobuf:"bytes,5,opt,name=taints"`
+}
+
+// DaemonEndpoint contains information about a single Daemon endpoint.
+type DaemonEndpoint struct {
+ /*
+ The port tag was not properly in quotes in earlier releases, so it must be
+ uppercased for backwards compat (since it was falling back to var name of
+ 'Port').
+ */
+
+ // Port number of the given endpoint.
+ Port int32 `json:"Port" protobuf:"varint,1,opt,name=Port"`
+}
+
+// NodeDaemonEndpoints lists ports opened by daemons running on the Node.
+type NodeDaemonEndpoints struct {
+ // Endpoint on which Kubelet is listening.
+ // +optional
+ KubeletEndpoint DaemonEndpoint `json:"kubeletEndpoint,omitempty" protobuf:"bytes,1,opt,name=kubeletEndpoint"`
+}
+
+// NodeSystemInfo is a set of ids/uuids to uniquely identify the node.
+type NodeSystemInfo struct {
+ // MachineID reported by the node. For unique machine identification
+ // in the cluster this field is preferred. Learn more from man(5)
+ // machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html
+ MachineID string `json:"machineID" protobuf:"bytes,1,opt,name=machineID"`
+ // SystemUUID reported by the node. For unique machine identification
+ // MachineID is preferred. This field is specific to Red Hat hosts
+ // https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html
+ SystemUUID string `json:"systemUUID" protobuf:"bytes,2,opt,name=systemUUID"`
+ // Boot ID reported by the node.
+ BootID string `json:"bootID" protobuf:"bytes,3,opt,name=bootID"`
+ // Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).
+ KernelVersion string `json:"kernelVersion" protobuf:"bytes,4,opt,name=kernelVersion"`
+ // OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).
+ OSImage string `json:"osImage" protobuf:"bytes,5,opt,name=osImage"`
+ // ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0).
+ ContainerRuntimeVersion string `json:"containerRuntimeVersion" protobuf:"bytes,6,opt,name=containerRuntimeVersion"`
+ // Kubelet Version reported by the node.
+ KubeletVersion string `json:"kubeletVersion" protobuf:"bytes,7,opt,name=kubeletVersion"`
+ // KubeProxy Version reported by the node.
+ KubeProxyVersion string `json:"kubeProxyVersion" protobuf:"bytes,8,opt,name=kubeProxyVersion"`
+ // The Operating System reported by the node
+ OperatingSystem string `json:"operatingSystem" protobuf:"bytes,9,opt,name=operatingSystem"`
+ // The Architecture reported by the node
+ Architecture string `json:"architecture" protobuf:"bytes,10,opt,name=architecture"`
+}
+
+// NodeStatus is information about the current status of a node.
+type NodeStatus struct {
+ // Capacity represents the total resources of a node.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity
+ // +optional
+ Capacity ResourceList `json:"capacity,omitempty" protobuf:"bytes,1,rep,name=capacity,casttype=ResourceList,castkey=ResourceName"`
+ // Allocatable represents the resources of a node that are available for scheduling.
+ // Defaults to Capacity.
+ // +optional
+ Allocatable ResourceList `json:"allocatable,omitempty" protobuf:"bytes,2,rep,name=allocatable,casttype=ResourceList,castkey=ResourceName"`
+ // NodePhase is the recently observed lifecycle phase of the node.
+ // More info: https://kubernetes.io/docs/concepts/nodes/node/#phase
+ // The field is never populated, and now is deprecated.
+ // +optional
+ Phase NodePhase `json:"phase,omitempty" protobuf:"bytes,3,opt,name=phase,casttype=NodePhase"`
+ // Conditions is an array of current observed node conditions.
+ // More info: https://kubernetes.io/docs/concepts/nodes/node/#condition
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ Conditions []NodeCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,4,rep,name=conditions"`
+ // List of addresses reachable to the node.
+ // Queried from cloud provider, if available.
+ // More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ Addresses []NodeAddress `json:"addresses,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,5,rep,name=addresses"`
+ // Endpoints of daemons running on the Node.
+ // +optional
+ DaemonEndpoints NodeDaemonEndpoints `json:"daemonEndpoints,omitempty" protobuf:"bytes,6,opt,name=daemonEndpoints"`
+ // Set of ids/uuids to uniquely identify the node.
+ // More info: https://kubernetes.io/docs/concepts/nodes/node/#info
+ // +optional
+ NodeInfo NodeSystemInfo `json:"nodeInfo,omitempty" protobuf:"bytes,7,opt,name=nodeInfo"`
+ // List of container images on this node
+ // +optional
+ Images []ContainerImage `json:"images,omitempty" protobuf:"bytes,8,rep,name=images"`
+ // List of attachable volumes in use (mounted) by the node.
+ // +optional
+ VolumesInUse []UniqueVolumeName `json:"volumesInUse,omitempty" protobuf:"bytes,9,rep,name=volumesInUse"`
+ // List of volumes that are attached to the node.
+ // +optional
+ VolumesAttached []AttachedVolume `json:"volumesAttached,omitempty" protobuf:"bytes,10,rep,name=volumesAttached"`
+}
+
+type UniqueVolumeName string
+
+// AttachedVolume describes a volume attached to a node
+type AttachedVolume struct {
+ // Name of the attached volume
+ Name UniqueVolumeName `json:"name" protobuf:"bytes,1,rep,name=name"`
+
+ // DevicePath represents the device path where the volume should be available
+ DevicePath string `json:"devicePath" protobuf:"bytes,2,rep,name=devicePath"`
+}
+
+// AvoidPods describes pods that should avoid this node. This is the value for a
+// Node annotation with key scheduler.alpha.kubernetes.io/preferAvoidPods and
+// will eventually become a field of NodeStatus.
+type AvoidPods struct {
+ // Bounded-sized list of signatures of pods that should avoid this node, sorted
+ // in timestamp order from oldest to newest. Size of the slice is unspecified.
+ // +optional
+ PreferAvoidPods []PreferAvoidPodsEntry `json:"preferAvoidPods,omitempty" protobuf:"bytes,1,rep,name=preferAvoidPods"`
+}
+
+// Describes a class of pods that should avoid this node.
+type PreferAvoidPodsEntry struct {
+ // The class of pods.
+ PodSignature PodSignature `json:"podSignature" protobuf:"bytes,1,opt,name=podSignature"`
+ // Time at which this entry was added to the list.
+ // +optional
+ EvictionTime metav1.Time `json:"evictionTime,omitempty" protobuf:"bytes,2,opt,name=evictionTime"`
+ // (brief) reason why this entry was added to the list.
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"`
+ // Human readable message indicating why this entry was added to the list.
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,4,opt,name=message"`
+}
+
+// Describes the class of pods that should avoid this node.
+// Exactly one field should be set.
+type PodSignature struct {
+ // Reference to controller whose pods should avoid this node.
+ // +optional
+ PodController *metav1.OwnerReference `json:"podController,omitempty" protobuf:"bytes,1,opt,name=podController"`
+}
+
+// Describe a container image
+type ContainerImage struct {
+ // Names by which this image is known.
+ // e.g. ["gcr.io/google_containers/hyperkube:v1.0.7", "dockerhub.io/google_containers/hyperkube:v1.0.7"]
+ Names []string `json:"names" protobuf:"bytes,1,rep,name=names"`
+ // The size of the image in bytes.
+ // +optional
+ SizeBytes int64 `json:"sizeBytes,omitempty" protobuf:"varint,2,opt,name=sizeBytes"`
+}
+
+type NodePhase string
+
+// These are the valid phases of node.
+const (
+ // NodePending means the node has been created/added by the system, but not configured.
+ NodePending NodePhase = "Pending"
+ // NodeRunning means the node has been configured and has Kubernetes components running.
+ NodeRunning NodePhase = "Running"
+ // NodeTerminated means the node has been removed from the cluster.
+ NodeTerminated NodePhase = "Terminated"
+)
+
+type NodeConditionType string
+
+// These are valid conditions of node. Currently, we don't have enough information to decide
+// node condition. In the future, we will add more. The proposed set of conditions are:
+// NodeReachable, NodeLive, NodeReady, NodeSchedulable, NodeRunnable.
+const (
+ // NodeReady means kubelet is healthy and ready to accept pods.
+ NodeReady NodeConditionType = "Ready"
+ // NodeOutOfDisk means the kubelet will not accept new pods due to insufficient free disk
+ // space on the node.
+ NodeOutOfDisk NodeConditionType = "OutOfDisk"
+ // NodeMemoryPressure means the kubelet is under pressure due to insufficient available memory.
+ NodeMemoryPressure NodeConditionType = "MemoryPressure"
+ // NodeDiskPressure means the kubelet is under pressure due to insufficient available disk.
+ NodeDiskPressure NodeConditionType = "DiskPressure"
+ // NodeNetworkUnavailable means that network for the node is not correctly configured.
+ NodeNetworkUnavailable NodeConditionType = "NetworkUnavailable"
+ // NodeInodePressure means the kubelet is under pressure due to insufficient available inodes.
+ NodeInodePressure NodeConditionType = "InodePressure"
+)
+
+// NodeCondition contains condition information for a node.
+type NodeCondition struct {
+ // Type of node condition.
+ Type NodeConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=NodeConditionType"`
+ // Status of the condition, one of True, False, Unknown.
+ Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"`
+ // Last time we got an update on a given condition.
+ // +optional
+ LastHeartbeatTime metav1.Time `json:"lastHeartbeatTime,omitempty" protobuf:"bytes,3,opt,name=lastHeartbeatTime"`
+ // Last time the condition transit from one status to another.
+ // +optional
+ LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
+ // (brief) reason for the condition's last transition.
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
+ // Human readable message indicating details about last transition.
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
+}
+
+type NodeAddressType string
+
+// These are valid address type of node.
+const (
+ NodeHostName NodeAddressType = "Hostname"
+ NodeExternalIP NodeAddressType = "ExternalIP"
+ NodeInternalIP NodeAddressType = "InternalIP"
+ NodeExternalDNS NodeAddressType = "ExternalDNS"
+ NodeInternalDNS NodeAddressType = "InternalDNS"
+)
+
+// NodeAddress contains information for the node's address.
+type NodeAddress struct {
+ // Node address type, one of Hostname, ExternalIP or InternalIP.
+ Type NodeAddressType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=NodeAddressType"`
+ // The node address.
+ Address string `json:"address" protobuf:"bytes,2,opt,name=address"`
+}
+
+// ResourceName is the name identifying various resources in a ResourceList.
+type ResourceName string
+
+// Resource names must be not more than 63 characters, consisting of upper- or lower-case alphanumeric characters,
+// with the -, _, and . characters allowed anywhere, except the first or last character.
+// The default convention, matching that for annotations, is to use lower-case names, with dashes, rather than
+// camel case, separating compound words.
+// Fully-qualified resource typenames are constructed from a DNS-style subdomain, followed by a slash `/` and a name.
+const (
+ // CPU, in cores. (500m = .5 cores)
+ ResourceCPU ResourceName = "cpu"
+ // Memory, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
+ ResourceMemory ResourceName = "memory"
+ // Volume size, in bytes (e,g. 5Gi = 5GiB = 5 * 1024 * 1024 * 1024)
+ ResourceStorage ResourceName = "storage"
+ // Local Storage for container overlay filesystem, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
+ // The resource name for ResourceStorageOverlay is alpha and it can change across releases.
+ ResourceStorageOverlay ResourceName = "storage.kubernetes.io/overlay"
+ // Local Storage for scratch space, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
+ // The resource name for ResourceStorageScratch is alpha and it can change across releases.
+ ResourceStorageScratch ResourceName = "storage.kubernetes.io/scratch"
+ // NVIDIA GPU, in devices. Alpha, might change: although fractional and allowing values >1, only one whole device per node is assigned.
+ ResourceNvidiaGPU ResourceName = "alpha.kubernetes.io/nvidia-gpu"
+ // Number of Pods that may be running on this Node: see ResourcePods
+)
+
+const (
+ // Namespace prefix for opaque counted resources (alpha).
+ ResourceOpaqueIntPrefix = "pod.alpha.kubernetes.io/opaque-int-resource-"
+)
+
+// ResourceList is a set of (resource name, quantity) pairs.
+type ResourceList map[ResourceName]resource.Quantity
+
+// +genclient=true
+// +nonNamespaced=true
+
+// Node is a worker node in Kubernetes.
+// Each node will have a unique identifier in the cache (i.e. in etcd).
+type Node struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines the behavior of a node.
+ // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec NodeSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Most recently observed status of the node.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status NodeStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// NodeList is the whole list of all Nodes which have been registered with master.
+type NodeList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of nodes
+ Items []Node `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// FinalizerName is the name identifying a finalizer during namespace lifecycle.
+type FinalizerName string
+
+// These are internal finalizer values to Kubernetes, must be qualified name unless defined here or
+// in metav1.
+const (
+ FinalizerKubernetes FinalizerName = "kubernetes"
+)
+
+// NamespaceSpec describes the attributes on a Namespace.
+type NamespaceSpec struct {
+ // Finalizers is an opaque list of values that must be empty to permanently remove object from storage.
+ // More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#finalizers
+ // +optional
+ Finalizers []FinalizerName `json:"finalizers,omitempty" protobuf:"bytes,1,rep,name=finalizers,casttype=FinalizerName"`
+}
+
+// NamespaceStatus is information about the current status of a Namespace.
+type NamespaceStatus struct {
+ // Phase is the current lifecycle phase of the namespace.
+ // More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#phases
+ // +optional
+ Phase NamespacePhase `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=NamespacePhase"`
+}
+
+type NamespacePhase string
+
+// These are the valid phases of a namespace.
+const (
+ // NamespaceActive means the namespace is available for use in the system
+ NamespaceActive NamespacePhase = "Active"
+ // NamespaceTerminating means the namespace is undergoing graceful termination
+ NamespaceTerminating NamespacePhase = "Terminating"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+
+// Namespace provides a scope for Names.
+// Use of multiple namespaces is optional.
+type Namespace struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines the behavior of the Namespace.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec NamespaceSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status describes the current status of a Namespace.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status NamespaceStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// NamespaceList is a list of Namespaces.
+type NamespaceList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of Namespace objects in the list.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
+ Items []Namespace `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// Binding ties one object to another; for example, a pod is bound to a node by a scheduler.
+// Deprecated in 1.7, please use the bindings subresource of pods instead.
+type Binding struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // The target object that you want to bind to the standard object.
+ Target ObjectReference `json:"target" protobuf:"bytes,2,opt,name=target"`
+}
+
+// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
+// +k8s:openapi-gen=false
+type Preconditions struct {
+ // Specifies the target UID.
+ // +optional
+ UID *types.UID `json:"uid,omitempty" protobuf:"bytes,1,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"`
+}
+
+// DeletionPropagation decides if a deletion will propagate to the dependents of the object, and how the garbage collector will handle the propagation.
+type DeletionPropagation string
+
+const (
+ // Orphans the dependents.
+ DeletePropagationOrphan DeletionPropagation = "Orphan"
+ // Deletes the object from the key-value store, the garbage collector will delete the dependents in the background.
+ DeletePropagationBackground DeletionPropagation = "Background"
+ // The object exists in the key-value store until the garbage collector deletes all the dependents whose ownerReference.blockOwnerDeletion=true from the key-value store.
+ // API sever will put the "DeletingDependents" finalizer on the object, and sets its deletionTimestamp.
+ // This policy is cascading, i.e., the dependents will be deleted with Foreground.
+ DeletePropagationForeground DeletionPropagation = "Foreground"
+)
+
+// DeleteOptions may be provided when deleting an API object
+// DEPRECATED: This type has been moved to meta/v1 and will be removed soon.
+// +k8s:openapi-gen=false
+type DeleteOptions struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // The duration in seconds before the object should be deleted. Value must be non-negative integer.
+ // The value zero indicates delete immediately. If this value is nil, the default grace period for the
+ // specified type will be used.
+ // Defaults to a per object value if not specified. zero means delete immediately.
+ // +optional
+ GracePeriodSeconds *int64 `json:"gracePeriodSeconds,omitempty" protobuf:"varint,1,opt,name=gracePeriodSeconds"`
+
+ // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be
+ // returned.
+ // +optional
+ Preconditions *Preconditions `json:"preconditions,omitempty" protobuf:"bytes,2,opt,name=preconditions"`
+
+ // Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7.
+ // Should the dependent objects be orphaned. If true/false, the "orphan"
+ // finalizer will be added to/removed from the object's finalizers list.
+ // Either this field or PropagationPolicy may be set, but not both.
+ // +optional
+ OrphanDependents *bool `json:"orphanDependents,omitempty" protobuf:"varint,3,opt,name=orphanDependents"`
+
+ // Whether and how garbage collection will be performed.
+ // Either this field or OrphanDependents may be set, but not both.
+ // The default policy is decided by the existing finalizer set in the
+ // metadata.finalizers and the resource-specific default policy.
+ // +optional
+ PropagationPolicy *DeletionPropagation `protobuf:"bytes,4,opt,name=propagationPolicy,casttype=DeletionPropagation"`
+}
+
+// ListOptions is the query options to a standard REST list call.
+// DEPRECATED: This type has been moved to meta/v1 and will be removed soon.
+// +k8s:openapi-gen=false
+type ListOptions struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // A selector to restrict the list of returned objects by their labels.
+ // Defaults to everything.
+ // +optional
+ LabelSelector string `json:"labelSelector,omitempty" protobuf:"bytes,1,opt,name=labelSelector"`
+ // A selector to restrict the list of returned objects by their fields.
+ // Defaults to everything.
+ // +optional
+ FieldSelector string `json:"fieldSelector,omitempty" protobuf:"bytes,2,opt,name=fieldSelector"`
+ // If true, partially initialized resources are included in the response.
+ // +optional
+ IncludeUninitialized bool `json:"includeUninitialized,omitempty" protobuf:"varint,6,opt,name=includeUninitialized"`
+ // Watch for changes to the described resources and return them as a stream of
+ // add, update, and remove notifications. Specify resourceVersion.
+ // +optional
+ Watch bool `json:"watch,omitempty" protobuf:"varint,3,opt,name=watch"`
+ // When specified with a watch call, shows changes that occur after that particular version of a resource.
+ // Defaults to changes from the beginning of history.
+ // When specified for list:
+ // - if unset, then the result is returned from remote storage based on quorum-read flag;
+ // - if it's 0, then we simply return what we currently have in cache, no guarantee;
+ // - if set to non zero, then the result is at least as fresh as given rv.
+ // +optional
+ ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,4,opt,name=resourceVersion"`
+ // Timeout for the list/watch call.
+ // +optional
+ TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty" protobuf:"varint,5,opt,name=timeoutSeconds"`
+}
+
+// PodLogOptions is the query options for a Pod's logs REST call.
+type PodLogOptions struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // The container for which to stream logs. Defaults to only container if there is one container in the pod.
+ // +optional
+ Container string `json:"container,omitempty" protobuf:"bytes,1,opt,name=container"`
+ // Follow the log stream of the pod. Defaults to false.
+ // +optional
+ Follow bool `json:"follow,omitempty" protobuf:"varint,2,opt,name=follow"`
+ // Return previous terminated container logs. Defaults to false.
+ // +optional
+ Previous bool `json:"previous,omitempty" protobuf:"varint,3,opt,name=previous"`
+ // A relative time in seconds before the current time from which to show logs. If this value
+ // precedes the time a pod was started, only logs since the pod start will be returned.
+ // If this value is in the future, no logs will be returned.
+ // Only one of sinceSeconds or sinceTime may be specified.
+ // +optional
+ SinceSeconds *int64 `json:"sinceSeconds,omitempty" protobuf:"varint,4,opt,name=sinceSeconds"`
+ // An RFC3339 timestamp from which to show logs. If this value
+ // precedes the time a pod was started, only logs since the pod start will be returned.
+ // If this value is in the future, no logs will be returned.
+ // Only one of sinceSeconds or sinceTime may be specified.
+ // +optional
+ SinceTime *metav1.Time `json:"sinceTime,omitempty" protobuf:"bytes,5,opt,name=sinceTime"`
+ // If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line
+ // of log output. Defaults to false.
+ // +optional
+ Timestamps bool `json:"timestamps,omitempty" protobuf:"varint,6,opt,name=timestamps"`
+ // If set, the number of lines from the end of the logs to show. If not specified,
+ // logs are shown from the creation of the container or sinceSeconds or sinceTime
+ // +optional
+ TailLines *int64 `json:"tailLines,omitempty" protobuf:"varint,7,opt,name=tailLines"`
+ // If set, the number of bytes to read from the server before terminating the
+ // log output. This may not display a complete final line of logging, and may return
+ // slightly more or slightly less than the specified limit.
+ // +optional
+ LimitBytes *int64 `json:"limitBytes,omitempty" protobuf:"varint,8,opt,name=limitBytes"`
+}
+
+// PodAttachOptions is the query options to a Pod's remote attach call.
+// ---
+// TODO: merge w/ PodExecOptions below for stdin, stdout, etc
+// and also when we cut V2, we should export a "StreamOptions" or somesuch that contains Stdin, Stdout, Stder and TTY
+type PodAttachOptions struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // Stdin if true, redirects the standard input stream of the pod for this call.
+ // Defaults to false.
+ // +optional
+ Stdin bool `json:"stdin,omitempty" protobuf:"varint,1,opt,name=stdin"`
+
+ // Stdout if true indicates that stdout is to be redirected for the attach call.
+ // Defaults to true.
+ // +optional
+ Stdout bool `json:"stdout,omitempty" protobuf:"varint,2,opt,name=stdout"`
+
+ // Stderr if true indicates that stderr is to be redirected for the attach call.
+ // Defaults to true.
+ // +optional
+ Stderr bool `json:"stderr,omitempty" protobuf:"varint,3,opt,name=stderr"`
+
+ // TTY if true indicates that a tty will be allocated for the attach call.
+ // This is passed through the container runtime so the tty
+ // is allocated on the worker node by the container runtime.
+ // Defaults to false.
+ // +optional
+ TTY bool `json:"tty,omitempty" protobuf:"varint,4,opt,name=tty"`
+
+ // The container in which to execute the command.
+ // Defaults to only container if there is only one container in the pod.
+ // +optional
+ Container string `json:"container,omitempty" protobuf:"bytes,5,opt,name=container"`
+}
+
+// PodExecOptions is the query options to a Pod's remote exec call.
+// ---
+// TODO: This is largely identical to PodAttachOptions above, make sure they stay in sync and see about merging
+// and also when we cut V2, we should export a "StreamOptions" or somesuch that contains Stdin, Stdout, Stder and TTY
+type PodExecOptions struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // Redirect the standard input stream of the pod for this call.
+ // Defaults to false.
+ // +optional
+ Stdin bool `json:"stdin,omitempty" protobuf:"varint,1,opt,name=stdin"`
+
+ // Redirect the standard output stream of the pod for this call.
+ // Defaults to true.
+ // +optional
+ Stdout bool `json:"stdout,omitempty" protobuf:"varint,2,opt,name=stdout"`
+
+ // Redirect the standard error stream of the pod for this call.
+ // Defaults to true.
+ // +optional
+ Stderr bool `json:"stderr,omitempty" protobuf:"varint,3,opt,name=stderr"`
+
+ // TTY if true indicates that a tty will be allocated for the exec call.
+ // Defaults to false.
+ // +optional
+ TTY bool `json:"tty,omitempty" protobuf:"varint,4,opt,name=tty"`
+
+ // Container in which to execute the command.
+ // Defaults to only container if there is only one container in the pod.
+ // +optional
+ Container string `json:"container,omitempty" protobuf:"bytes,5,opt,name=container"`
+
+ // Command is the remote command to execute. argv array. Not executed within a shell.
+ Command []string `json:"command" protobuf:"bytes,6,rep,name=command"`
+}
+
+// PodPortForwardOptions is the query options to a Pod's port forward call
+// when using WebSockets.
+// The `port` query parameter must specify the port or
+// ports (comma separated) to forward over.
+// Port forwarding over SPDY does not use these options. It requires the port
+// to be passed in the `port` header as part of request.
+type PodPortForwardOptions struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // List of ports to forward
+ // Required when using WebSockets
+ // +optional
+ Ports []int32 `json:"ports,omitempty" protobuf:"varint,1,rep,name=ports"`
+}
+
+// PodProxyOptions is the query options to a Pod's proxy call.
+type PodProxyOptions struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // Path is the URL path to use for the current proxy request to pod.
+ // +optional
+ Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"`
+}
+
+// NodeProxyOptions is the query options to a Node's proxy call.
+type NodeProxyOptions struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // Path is the URL path to use for the current proxy request to node.
+ // +optional
+ Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"`
+}
+
+// ServiceProxyOptions is the query options to a Service's proxy call.
+type ServiceProxyOptions struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // Path is the part of URLs that include service endpoints, suffixes,
+ // and parameters to use for the current proxy request to service.
+ // For example, the whole request URL is
+ // http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy.
+ // Path is _search?q=user:kimchy.
+ // +optional
+ Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"`
+}
+
+// ObjectReference contains enough information to let you inspect or modify the referred object.
+type ObjectReference struct {
+ // Kind of the referent.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ Kind string `json:"kind,omitempty" protobuf:"bytes,1,opt,name=kind"`
+ // Namespace of the referent.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
+ // +optional
+ Namespace string `json:"namespace,omitempty" protobuf:"bytes,2,opt,name=namespace"`
+ // Name of the referent.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ // +optional
+ Name string `json:"name,omitempty" protobuf:"bytes,3,opt,name=name"`
+ // UID of the referent.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
+ // +optional
+ UID types.UID `json:"uid,omitempty" protobuf:"bytes,4,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"`
+ // API version of the referent.
+ // +optional
+ APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,5,opt,name=apiVersion"`
+ // Specific resourceVersion to which this reference is made, if any.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
+ // +optional
+ ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,6,opt,name=resourceVersion"`
+
+ // If referring to a piece of an object instead of an entire object, this string
+ // should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
+ // For example, if the object reference is to a container within a pod, this would take on a value like:
+ // "spec.containers{name}" (where "name" refers to the name of the container that triggered
+ // the event) or if no container name is specified "spec.containers[2]" (container with
+ // index 2 in this pod). This syntax is chosen only to have some well-defined way of
+ // referencing a part of an object.
+ // TODO: this design is not final and this field is subject to change in the future.
+ // +optional
+ FieldPath string `json:"fieldPath,omitempty" protobuf:"bytes,7,opt,name=fieldPath"`
+}
+
+// LocalObjectReference contains enough information to let you locate the
+// referenced object inside the same namespace.
+type LocalObjectReference struct {
+ // Name of the referent.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ // TODO: Add other useful fields. apiVersion, kind, uid?
+ // +optional
+ Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
+}
+
+// SerializedReference is a reference to serialized object.
+type SerializedReference struct {
+ metav1.TypeMeta `json:",inline"`
+ // The reference to an object in the system.
+ // +optional
+ Reference ObjectReference `json:"reference,omitempty" protobuf:"bytes,1,opt,name=reference"`
+}
+
+// EventSource contains information for an event.
+type EventSource struct {
+ // Component from which the event is generated.
+ // +optional
+ Component string `json:"component,omitempty" protobuf:"bytes,1,opt,name=component"`
+ // Node name on which the event is generated.
+ // +optional
+ Host string `json:"host,omitempty" protobuf:"bytes,2,opt,name=host"`
+}
+
+// Valid values for event types (new types could be added in future)
+const (
+ // Information only and will not cause any problems
+ EventTypeNormal string = "Normal"
+ // These events are to warn that something might go wrong
+ EventTypeWarning string = "Warning"
+)
+
+// +genclient=true
+
+// Event is a report of an event somewhere in the cluster.
+// TODO: Decide whether to store these separately or with the object they apply to.
+type Event struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ metav1.ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"`
+
+ // The object that this event is about.
+ InvolvedObject ObjectReference `json:"involvedObject" protobuf:"bytes,2,opt,name=involvedObject"`
+
+ // This should be a short, machine understandable string that gives the reason
+ // for the transition into the object's current status.
+ // TODO: provide exact specification for format.
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"`
+
+ // A human-readable description of the status of this operation.
+ // TODO: decide on maximum length.
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,4,opt,name=message"`
+
+ // The component reporting this event. Should be a short machine understandable string.
+ // +optional
+ Source EventSource `json:"source,omitempty" protobuf:"bytes,5,opt,name=source"`
+
+ // The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)
+ // +optional
+ FirstTimestamp metav1.Time `json:"firstTimestamp,omitempty" protobuf:"bytes,6,opt,name=firstTimestamp"`
+
+ // The time at which the most recent occurrence of this event was recorded.
+ // +optional
+ LastTimestamp metav1.Time `json:"lastTimestamp,omitempty" protobuf:"bytes,7,opt,name=lastTimestamp"`
+
+ // The number of times this event has occurred.
+ // +optional
+ Count int32 `json:"count,omitempty" protobuf:"varint,8,opt,name=count"`
+
+ // Type of this event (Normal, Warning), new types could be added in the future
+ // +optional
+ Type string `json:"type,omitempty" protobuf:"bytes,9,opt,name=type"`
+}
+
+// EventList is a list of events.
+type EventList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of events
+ Items []Event `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// List holds a list of objects, which may not be known by the server.
+type List struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of objects
+ Items []runtime.RawExtension `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// LimitType is a type of object that is limited
+type LimitType string
+
+const (
+ // Limit that applies to all pods in a namespace
+ LimitTypePod LimitType = "Pod"
+ // Limit that applies to all containers in a namespace
+ LimitTypeContainer LimitType = "Container"
+ // Limit that applies to all persistent volume claims in a namespace
+ LimitTypePersistentVolumeClaim LimitType = "PersistentVolumeClaim"
+)
+
+// LimitRangeItem defines a min/max usage limit for any resource that matches on kind.
+type LimitRangeItem struct {
+ // Type of resource that this limit applies to.
+ // +optional
+ Type LimitType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=LimitType"`
+ // Max usage constraints on this kind by resource name.
+ // +optional
+ Max ResourceList `json:"max,omitempty" protobuf:"bytes,2,rep,name=max,casttype=ResourceList,castkey=ResourceName"`
+ // Min usage constraints on this kind by resource name.
+ // +optional
+ Min ResourceList `json:"min,omitempty" protobuf:"bytes,3,rep,name=min,casttype=ResourceList,castkey=ResourceName"`
+ // Default resource requirement limit value by resource name if resource limit is omitted.
+ // +optional
+ Default ResourceList `json:"default,omitempty" protobuf:"bytes,4,rep,name=default,casttype=ResourceList,castkey=ResourceName"`
+ // DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.
+ // +optional
+ DefaultRequest ResourceList `json:"defaultRequest,omitempty" protobuf:"bytes,5,rep,name=defaultRequest,casttype=ResourceList,castkey=ResourceName"`
+ // MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.
+ // +optional
+ MaxLimitRequestRatio ResourceList `json:"maxLimitRequestRatio,omitempty" protobuf:"bytes,6,rep,name=maxLimitRequestRatio,casttype=ResourceList,castkey=ResourceName"`
+}
+
+// LimitRangeSpec defines a min/max usage limit for resources that match on kind.
+type LimitRangeSpec struct {
+ // Limits is the list of LimitRangeItem objects that are enforced.
+ Limits []LimitRangeItem `json:"limits" protobuf:"bytes,1,rep,name=limits"`
+}
+
+// +genclient=true
+
+// LimitRange sets resource usage limits for each kind of resource in a Namespace.
+type LimitRange struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines the limits enforced.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec LimitRangeSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+}
+
+// LimitRangeList is a list of LimitRange items.
+type LimitRangeList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of LimitRange objects.
+ // More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_limit_range.md
+ Items []LimitRange `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// The following identify resource constants for Kubernetes object types
+const (
+ // Pods, number
+ ResourcePods ResourceName = "pods"
+ // Services, number
+ ResourceServices ResourceName = "services"
+ // ReplicationControllers, number
+ ResourceReplicationControllers ResourceName = "replicationcontrollers"
+ // ResourceQuotas, number
+ ResourceQuotas ResourceName = "resourcequotas"
+ // ResourceSecrets, number
+ ResourceSecrets ResourceName = "secrets"
+ // ResourceConfigMaps, number
+ ResourceConfigMaps ResourceName = "configmaps"
+ // ResourcePersistentVolumeClaims, number
+ ResourcePersistentVolumeClaims ResourceName = "persistentvolumeclaims"
+ // ResourceServicesNodePorts, number
+ ResourceServicesNodePorts ResourceName = "services.nodeports"
+ // ResourceServicesLoadBalancers, number
+ ResourceServicesLoadBalancers ResourceName = "services.loadbalancers"
+ // CPU request, in cores. (500m = .5 cores)
+ ResourceRequestsCPU ResourceName = "requests.cpu"
+ // Memory request, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
+ ResourceRequestsMemory ResourceName = "requests.memory"
+ // Storage request, in bytes
+ ResourceRequestsStorage ResourceName = "requests.storage"
+ // CPU limit, in cores. (500m = .5 cores)
+ ResourceLimitsCPU ResourceName = "limits.cpu"
+ // Memory limit, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
+ ResourceLimitsMemory ResourceName = "limits.memory"
+)
+
+// A ResourceQuotaScope defines a filter that must match each object tracked by a quota
+type ResourceQuotaScope string
+
+const (
+ // Match all pod objects where spec.activeDeadlineSeconds
+ ResourceQuotaScopeTerminating ResourceQuotaScope = "Terminating"
+ // Match all pod objects where !spec.activeDeadlineSeconds
+ ResourceQuotaScopeNotTerminating ResourceQuotaScope = "NotTerminating"
+ // Match all pod objects that have best effort quality of service
+ ResourceQuotaScopeBestEffort ResourceQuotaScope = "BestEffort"
+ // Match all pod objects that do not have best effort quality of service
+ ResourceQuotaScopeNotBestEffort ResourceQuotaScope = "NotBestEffort"
+)
+
+// ResourceQuotaSpec defines the desired hard limits to enforce for Quota.
+type ResourceQuotaSpec struct {
+ // Hard is the set of desired hard limits for each named resource.
+ // More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md
+ // +optional
+ Hard ResourceList `json:"hard,omitempty" protobuf:"bytes,1,rep,name=hard,casttype=ResourceList,castkey=ResourceName"`
+ // A collection of filters that must match each object tracked by a quota.
+ // If not specified, the quota matches all objects.
+ // +optional
+ Scopes []ResourceQuotaScope `json:"scopes,omitempty" protobuf:"bytes,2,rep,name=scopes,casttype=ResourceQuotaScope"`
+}
+
+// ResourceQuotaStatus defines the enforced hard limits and observed use.
+type ResourceQuotaStatus struct {
+ // Hard is the set of enforced hard limits for each named resource.
+ // More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md
+ // +optional
+ Hard ResourceList `json:"hard,omitempty" protobuf:"bytes,1,rep,name=hard,casttype=ResourceList,castkey=ResourceName"`
+ // Used is the current observed total usage of the resource in the namespace.
+ // +optional
+ Used ResourceList `json:"used,omitempty" protobuf:"bytes,2,rep,name=used,casttype=ResourceList,castkey=ResourceName"`
+}
+
+// +genclient=true
+
+// ResourceQuota sets aggregate quota restrictions enforced per namespace
+type ResourceQuota struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines the desired quota.
+ // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec ResourceQuotaSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status defines the actual enforced quota and its current usage.
+ // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status ResourceQuotaStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// ResourceQuotaList is a list of ResourceQuota items.
+type ResourceQuotaList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of ResourceQuota objects.
+ // More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md
+ Items []ResourceQuota `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// +genclient=true
+
+// Secret holds secret data of a certain type. The total bytes of the values in
+// the Data field must be less than MaxSecretSize bytes.
+type Secret struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Data contains the secret data. Each key must consist of alphanumeric
+ // characters, '-', '_' or '.'. The serialized form of the secret data is a
+ // base64 encoded string, representing the arbitrary (possibly non-string)
+ // data value here. Described in https://tools.ietf.org/html/rfc4648#section-4
+ // +optional
+ Data map[string][]byte `json:"data,omitempty" protobuf:"bytes,2,rep,name=data"`
+
+ // stringData allows specifying non-binary secret data in string form.
+ // It is provided as a write-only convenience method.
+ // All keys and values are merged into the data field on write, overwriting any existing values.
+ // It is never output when reading from the API.
+ // +k8s:conversion-gen=false
+ // +optional
+ StringData map[string]string `json:"stringData,omitempty" protobuf:"bytes,4,rep,name=stringData"`
+
+ // Used to facilitate programmatic handling of secret data.
+ // +optional
+ Type SecretType `json:"type,omitempty" protobuf:"bytes,3,opt,name=type,casttype=SecretType"`
+}
+
+const MaxSecretSize = 1 * 1024 * 1024
+
+type SecretType string
+
+const (
+ // SecretTypeOpaque is the default. Arbitrary user-defined data
+ SecretTypeOpaque SecretType = "Opaque"
+
+ // SecretTypeServiceAccountToken contains a token that identifies a service account to the API
+ //
+ // Required fields:
+ // - Secret.Annotations["kubernetes.io/service-account.name"] - the name of the ServiceAccount the token identifies
+ // - Secret.Annotations["kubernetes.io/service-account.uid"] - the UID of the ServiceAccount the token identifies
+ // - Secret.Data["token"] - a token that identifies the service account to the API
+ SecretTypeServiceAccountToken SecretType = "kubernetes.io/service-account-token"
+
+ // ServiceAccountNameKey is the key of the required annotation for SecretTypeServiceAccountToken secrets
+ ServiceAccountNameKey = "kubernetes.io/service-account.name"
+ // ServiceAccountUIDKey is the key of the required annotation for SecretTypeServiceAccountToken secrets
+ ServiceAccountUIDKey = "kubernetes.io/service-account.uid"
+ // ServiceAccountTokenKey is the key of the required data for SecretTypeServiceAccountToken secrets
+ ServiceAccountTokenKey = "token"
+ // ServiceAccountKubeconfigKey is the key of the optional kubeconfig data for SecretTypeServiceAccountToken secrets
+ ServiceAccountKubeconfigKey = "kubernetes.kubeconfig"
+ // ServiceAccountRootCAKey is the key of the optional root certificate authority for SecretTypeServiceAccountToken secrets
+ ServiceAccountRootCAKey = "ca.crt"
+ // ServiceAccountNamespaceKey is the key of the optional namespace to use as the default for namespaced API calls
+ ServiceAccountNamespaceKey = "namespace"
+
+ // SecretTypeDockercfg contains a dockercfg file that follows the same format rules as ~/.dockercfg
+ //
+ // Required fields:
+ // - Secret.Data[".dockercfg"] - a serialized ~/.dockercfg file
+ SecretTypeDockercfg SecretType = "kubernetes.io/dockercfg"
+
+ // DockerConfigKey is the key of the required data for SecretTypeDockercfg secrets
+ DockerConfigKey = ".dockercfg"
+
+ // SecretTypeDockerConfigJson contains a dockercfg file that follows the same format rules as ~/.docker/config.json
+ //
+ // Required fields:
+ // - Secret.Data[".dockerconfigjson"] - a serialized ~/.docker/config.json file
+ SecretTypeDockerConfigJson SecretType = "kubernetes.io/dockerconfigjson"
+
+ // DockerConfigJsonKey is the key of the required data for SecretTypeDockerConfigJson secrets
+ DockerConfigJsonKey = ".dockerconfigjson"
+
+ // SecretTypeBasicAuth contains data needed for basic authentication.
+ //
+ // Required at least one of fields:
+ // - Secret.Data["username"] - username used for authentication
+ // - Secret.Data["password"] - password or token needed for authentication
+ SecretTypeBasicAuth SecretType = "kubernetes.io/basic-auth"
+
+ // BasicAuthUsernameKey is the key of the username for SecretTypeBasicAuth secrets
+ BasicAuthUsernameKey = "username"
+ // BasicAuthPasswordKey is the key of the password or token for SecretTypeBasicAuth secrets
+ BasicAuthPasswordKey = "password"
+
+ // SecretTypeSSHAuth contains data needed for SSH authetication.
+ //
+ // Required field:
+ // - Secret.Data["ssh-privatekey"] - private SSH key needed for authentication
+ SecretTypeSSHAuth SecretType = "kubernetes.io/ssh-auth"
+
+ // SSHAuthPrivateKey is the key of the required SSH private key for SecretTypeSSHAuth secrets
+ SSHAuthPrivateKey = "ssh-privatekey"
+ // SecretTypeTLS contains information about a TLS client or server secret. It
+ // is primarily used with TLS termination of the Ingress resource, but may be
+ // used in other types.
+ //
+ // Required fields:
+ // - Secret.Data["tls.key"] - TLS private key.
+ // Secret.Data["tls.crt"] - TLS certificate.
+ // TODO: Consider supporting different formats, specifying CA/destinationCA.
+ SecretTypeTLS SecretType = "kubernetes.io/tls"
+
+ // TLSCertKey is the key for tls certificates in a TLS secert.
+ TLSCertKey = "tls.crt"
+ // TLSPrivateKeyKey is the key for the private key field in a TLS secret.
+ TLSPrivateKeyKey = "tls.key"
+)
+
+// SecretList is a list of Secret.
+type SecretList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of secret objects.
+ // More info: https://kubernetes.io/docs/concepts/configuration/secret
+ Items []Secret `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// +genclient=true
+
+// ConfigMap holds configuration data for pods to consume.
+type ConfigMap struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Data contains the configuration data.
+ // Each key must consist of alphanumeric characters, '-', '_' or '.'.
+ // +optional
+ Data map[string]string `json:"data,omitempty" protobuf:"bytes,2,rep,name=data"`
+}
+
+// ConfigMapList is a resource containing a list of ConfigMap objects.
+type ConfigMapList struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of ConfigMaps.
+ Items []ConfigMap `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// Type and constants for component health validation.
+type ComponentConditionType string
+
+// These are the valid conditions for the component.
+const (
+ ComponentHealthy ComponentConditionType = "Healthy"
+)
+
+// Information about the condition of a component.
+type ComponentCondition struct {
+ // Type of condition for a component.
+ // Valid value: "Healthy"
+ Type ComponentConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=ComponentConditionType"`
+ // Status of the condition for a component.
+ // Valid values for "Healthy": "True", "False", or "Unknown".
+ Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"`
+ // Message about the condition for a component.
+ // For example, information about a health check.
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"`
+ // Condition error code for a component.
+ // For example, a health check error code.
+ // +optional
+ Error string `json:"error,omitempty" protobuf:"bytes,4,opt,name=error"`
+}
+
+// +genclient=true
+// +nonNamespaced=true
+
+// ComponentStatus (and ComponentStatusList) holds the cluster validation info.
+type ComponentStatus struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of component conditions observed
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ Conditions []ComponentCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=conditions"`
+}
+
+// Status of all the conditions for the component as a list of ComponentStatus objects.
+type ComponentStatusList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of ComponentStatus objects.
+ Items []ComponentStatus `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// DownwardAPIVolumeSource represents a volume containing downward API info.
+// Downward API volumes support ownership management and SELinux relabeling.
+type DownwardAPIVolumeSource struct {
+ // Items is a list of downward API volume file
+ // +optional
+ Items []DownwardAPIVolumeFile `json:"items,omitempty" protobuf:"bytes,1,rep,name=items"`
+ // Optional: mode bits to use on created files by default. Must be a
+ // value between 0 and 0777. Defaults to 0644.
+ // Directories within the path are not affected by this setting.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"varint,2,opt,name=defaultMode"`
+}
+
+const (
+ DownwardAPIVolumeSourceDefaultMode int32 = 0644
+)
+
+// DownwardAPIVolumeFile represents information to create the file containing the pod field
+type DownwardAPIVolumeFile struct {
+ // Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'
+ Path string `json:"path" protobuf:"bytes,1,opt,name=path"`
+ // Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.
+ // +optional
+ FieldRef *ObjectFieldSelector `json:"fieldRef,omitempty" protobuf:"bytes,2,opt,name=fieldRef"`
+ // Selects a resource of the container: only resources limits and requests
+ // (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
+ // +optional
+ ResourceFieldRef *ResourceFieldSelector `json:"resourceFieldRef,omitempty" protobuf:"bytes,3,opt,name=resourceFieldRef"`
+ // Optional: mode bits to use on this file, must be a value between 0
+ // and 0777. If not specified, the volume defaultMode will be used.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ Mode *int32 `json:"mode,omitempty" protobuf:"varint,4,opt,name=mode"`
+}
+
+// Represents downward API info for projecting into a projected volume.
+// Note that this is identical to a downwardAPI volume source without the default
+// mode.
+type DownwardAPIProjection struct {
+ // Items is a list of DownwardAPIVolume file
+ // +optional
+ Items []DownwardAPIVolumeFile `json:"items,omitempty" protobuf:"bytes,1,rep,name=items"`
+}
+
+// SecurityContext holds security configuration that will be applied to a container.
+// Some fields are present in both SecurityContext and PodSecurityContext. When both
+// are set, the values in SecurityContext take precedence.
+type SecurityContext struct {
+ // The capabilities to add/drop when running containers.
+ // Defaults to the default set of capabilities granted by the container runtime.
+ // +optional
+ Capabilities *Capabilities `json:"capabilities,omitempty" protobuf:"bytes,1,opt,name=capabilities"`
+ // Run container in privileged mode.
+ // Processes in privileged containers are essentially equivalent to root on the host.
+ // Defaults to false.
+ // +optional
+ Privileged *bool `json:"privileged,omitempty" protobuf:"varint,2,opt,name=privileged"`
+ // The SELinux context to be applied to the container.
+ // If unspecified, the container runtime will allocate a random SELinux context for each
+ // container. May also be set in PodSecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence.
+ // +optional
+ SELinuxOptions *SELinuxOptions `json:"seLinuxOptions,omitempty" protobuf:"bytes,3,opt,name=seLinuxOptions"`
+ // The UID to run the entrypoint of the container process.
+ // Defaults to user specified in image metadata if unspecified.
+ // May also be set in PodSecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence.
+ // +optional
+ RunAsUser *int64 `json:"runAsUser,omitempty" protobuf:"varint,4,opt,name=runAsUser"`
+ // Indicates that the container must run as a non-root user.
+ // If true, the Kubelet will validate the image at runtime to ensure that it
+ // does not run as UID 0 (root) and fail to start the container if it does.
+ // If unset or false, no such validation will be performed.
+ // May also be set in PodSecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence.
+ // +optional
+ RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" protobuf:"varint,5,opt,name=runAsNonRoot"`
+ // Whether this container has a read-only root filesystem.
+ // Default is false.
+ // +optional
+ ReadOnlyRootFilesystem *bool `json:"readOnlyRootFilesystem,omitempty" protobuf:"varint,6,opt,name=readOnlyRootFilesystem"`
+}
+
+// SELinuxOptions are the labels to be applied to the container
+type SELinuxOptions struct {
+ // User is a SELinux user label that applies to the container.
+ // +optional
+ User string `json:"user,omitempty" protobuf:"bytes,1,opt,name=user"`
+ // Role is a SELinux role label that applies to the container.
+ // +optional
+ Role string `json:"role,omitempty" protobuf:"bytes,2,opt,name=role"`
+ // Type is a SELinux type label that applies to the container.
+ // +optional
+ Type string `json:"type,omitempty" protobuf:"bytes,3,opt,name=type"`
+ // Level is SELinux level label that applies to the container.
+ // +optional
+ Level string `json:"level,omitempty" protobuf:"bytes,4,opt,name=level"`
+}
+
+// RangeAllocation is not a public type.
+type RangeAllocation struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Range is string that identifies the range represented by 'data'.
+ Range string `json:"range" protobuf:"bytes,2,opt,name=range"`
+ // Data is a bit array containing all allocated addresses in the previous segment.
+ Data []byte `json:"data" protobuf:"bytes,3,opt,name=data"`
+}
+
+const (
+ // "default-scheduler" is the name of default scheduler.
+ DefaultSchedulerName = "default-scheduler"
+
+ // RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule
+ // corresponding to every RequiredDuringScheduling affinity rule.
+ // When the --hard-pod-affinity-weight scheduler flag is not specified,
+ // DefaultHardPodAffinityWeight defines the weight of the implicit PreferredDuringScheduling affinity rule.
+ DefaultHardPodAffinitySymmetricWeight int = 1
+)
+
+// Sysctl defines a kernel parameter to be set
+type Sysctl struct {
+ // Name of a property to set
+ Name string `protobuf:"bytes,1,opt,name=name"`
+ // Value of a property to set
+ Value string `protobuf:"bytes,2,opt,name=value"`
+}
+
+// NodeResources is an object for conveying resource information about a node.
+// see http://releases.k8s.io/HEAD/docs/design/resources.md for more details.
+type NodeResources struct {
+ // Capacity represents the available resources of a node
+ Capacity ResourceList `protobuf:"bytes,1,rep,name=capacity,casttype=ResourceList,castkey=ResourceName"`
+}
+
+const (
+ // Enable stdin for remote command execution
+ ExecStdinParam = "input"
+ // Enable stdout for remote command execution
+ ExecStdoutParam = "output"
+ // Enable stderr for remote command execution
+ ExecStderrParam = "error"
+ // Enable TTY for remote command execution
+ ExecTTYParam = "tty"
+ // Command to run for remote command execution
+ ExecCommandParamm = "command"
+
+ // Name of header that specifies stream type
+ StreamType = "streamType"
+ // Value for streamType header for stdin stream
+ StreamTypeStdin = "stdin"
+ // Value for streamType header for stdout stream
+ StreamTypeStdout = "stdout"
+ // Value for streamType header for stderr stream
+ StreamTypeStderr = "stderr"
+ // Value for streamType header for data stream
+ StreamTypeData = "data"
+ // Value for streamType header for error stream
+ StreamTypeError = "error"
+ // Value for streamType header for terminal resize stream
+ StreamTypeResize = "resize"
+
+ // Name of header that specifies the port being forwarded
+ PortHeader = "port"
+ // Name of header that specifies a request ID used to associate the error
+ // and data streams for a single forwarded connection
+ PortForwardRequestIDHeader = "requestID"
+)
diff --git a/vendor/k8s.io/client-go/pkg/api/v1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/api/v1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..f78b69307
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/v1/types_swagger_doc_generated.go
@@ -0,0 +1,2039 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_AWSElasticBlockStoreVolumeSource = map[string]string{
+ "": "Represents a Persistent Disk resource in AWS.\n\nAn AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling.",
+ "volumeID": "Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore",
+ "fsType": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore",
+ "partition": "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty).",
+ "readOnly": "Specify \"true\" to force and set the ReadOnly property in VolumeMounts to \"true\". If omitted, the default is \"false\". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore",
+}
+
+func (AWSElasticBlockStoreVolumeSource) SwaggerDoc() map[string]string {
+ return map_AWSElasticBlockStoreVolumeSource
+}
+
+var map_Affinity = map[string]string{
+ "": "Affinity is a group of affinity scheduling rules.",
+ "nodeAffinity": "Describes node affinity scheduling rules for the pod.",
+ "podAffinity": "Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).",
+ "podAntiAffinity": "Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).",
+}
+
+func (Affinity) SwaggerDoc() map[string]string {
+ return map_Affinity
+}
+
+var map_AttachedVolume = map[string]string{
+ "": "AttachedVolume describes a volume attached to a node",
+ "name": "Name of the attached volume",
+ "devicePath": "DevicePath represents the device path where the volume should be available",
+}
+
+func (AttachedVolume) SwaggerDoc() map[string]string {
+ return map_AttachedVolume
+}
+
+var map_AvoidPods = map[string]string{
+ "": "AvoidPods describes pods that should avoid this node. This is the value for a Node annotation with key scheduler.alpha.kubernetes.io/preferAvoidPods and will eventually become a field of NodeStatus.",
+ "preferAvoidPods": "Bounded-sized list of signatures of pods that should avoid this node, sorted in timestamp order from oldest to newest. Size of the slice is unspecified.",
+}
+
+func (AvoidPods) SwaggerDoc() map[string]string {
+ return map_AvoidPods
+}
+
+var map_AzureDiskVolumeSource = map[string]string{
+ "": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.",
+ "diskName": "The Name of the data disk in the blob storage",
+ "diskURI": "The URI the data disk in the blob storage",
+ "cachingMode": "Host Caching mode: None, Read Only, Read Write.",
+ "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.",
+ "readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.",
+ "kind": "Expected values Shared: mulitple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared",
+}
+
+func (AzureDiskVolumeSource) SwaggerDoc() map[string]string {
+ return map_AzureDiskVolumeSource
+}
+
+var map_AzureFileVolumeSource = map[string]string{
+ "": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.",
+ "secretName": "the name of secret that contains Azure Storage Account Name and Key",
+ "shareName": "Share Name",
+ "readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.",
+}
+
+func (AzureFileVolumeSource) SwaggerDoc() map[string]string {
+ return map_AzureFileVolumeSource
+}
+
+var map_Binding = map[string]string{
+ "": "Binding ties one object to another; for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "target": "The target object that you want to bind to the standard object.",
+}
+
+func (Binding) SwaggerDoc() map[string]string {
+ return map_Binding
+}
+
+var map_Capabilities = map[string]string{
+ "": "Adds and removes POSIX capabilities from running containers.",
+ "add": "Added capabilities",
+ "drop": "Removed capabilities",
+}
+
+func (Capabilities) SwaggerDoc() map[string]string {
+ return map_Capabilities
+}
+
+var map_CephFSVolumeSource = map[string]string{
+ "": "Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.",
+ "monitors": "Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it",
+ "path": "Optional: Used as the mounted root, rather than the full Ceph tree, default is /",
+ "user": "Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it",
+ "secretFile": "Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it",
+ "secretRef": "Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it",
+ "readOnly": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it",
+}
+
+func (CephFSVolumeSource) SwaggerDoc() map[string]string {
+ return map_CephFSVolumeSource
+}
+
+var map_CinderVolumeSource = map[string]string{
+ "": "Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.",
+ "volumeID": "volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md",
+ "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md",
+ "readOnly": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md",
+}
+
+func (CinderVolumeSource) SwaggerDoc() map[string]string {
+ return map_CinderVolumeSource
+}
+
+var map_ComponentCondition = map[string]string{
+ "": "Information about the condition of a component.",
+ "type": "Type of condition for a component. Valid value: \"Healthy\"",
+ "status": "Status of the condition for a component. Valid values for \"Healthy\": \"True\", \"False\", or \"Unknown\".",
+ "message": "Message about the condition for a component. For example, information about a health check.",
+ "error": "Condition error code for a component. For example, a health check error code.",
+}
+
+func (ComponentCondition) SwaggerDoc() map[string]string {
+ return map_ComponentCondition
+}
+
+var map_ComponentStatus = map[string]string{
+ "": "ComponentStatus (and ComponentStatusList) holds the cluster validation info.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "conditions": "List of component conditions observed",
+}
+
+func (ComponentStatus) SwaggerDoc() map[string]string {
+ return map_ComponentStatus
+}
+
+var map_ComponentStatusList = map[string]string{
+ "": "Status of all the conditions for the component as a list of ComponentStatus objects.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "List of ComponentStatus objects.",
+}
+
+func (ComponentStatusList) SwaggerDoc() map[string]string {
+ return map_ComponentStatusList
+}
+
+var map_ConfigMap = map[string]string{
+ "": "ConfigMap holds configuration data for pods to consume.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "data": "Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'.",
+}
+
+func (ConfigMap) SwaggerDoc() map[string]string {
+ return map_ConfigMap
+}
+
+var map_ConfigMapEnvSource = map[string]string{
+ "": "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.",
+ "optional": "Specify whether the ConfigMap must be defined",
+}
+
+func (ConfigMapEnvSource) SwaggerDoc() map[string]string {
+ return map_ConfigMapEnvSource
+}
+
+var map_ConfigMapKeySelector = map[string]string{
+ "": "Selects a key from a ConfigMap.",
+ "key": "The key to select.",
+ "optional": "Specify whether the ConfigMap or it's key must be defined",
+}
+
+func (ConfigMapKeySelector) SwaggerDoc() map[string]string {
+ return map_ConfigMapKeySelector
+}
+
+var map_ConfigMapList = map[string]string{
+ "": "ConfigMapList is a resource containing a list of ConfigMap objects.",
+ "metadata": "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "items": "Items is the list of ConfigMaps.",
+}
+
+func (ConfigMapList) SwaggerDoc() map[string]string {
+ return map_ConfigMapList
+}
+
+var map_ConfigMapProjection = map[string]string{
+ "": "Adapts a ConfigMap into a projected volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.",
+ "items": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.",
+ "optional": "Specify whether the ConfigMap or it's keys must be defined",
+}
+
+func (ConfigMapProjection) SwaggerDoc() map[string]string {
+ return map_ConfigMapProjection
+}
+
+var map_ConfigMapVolumeSource = map[string]string{
+ "": "Adapts a ConfigMap into a volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.",
+ "items": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.",
+ "defaultMode": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.",
+ "optional": "Specify whether the ConfigMap or it's keys must be defined",
+}
+
+func (ConfigMapVolumeSource) SwaggerDoc() map[string]string {
+ return map_ConfigMapVolumeSource
+}
+
+var map_Container = map[string]string{
+ "": "A single application container that you want to run within a pod.",
+ "name": "Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.",
+ "image": "Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images",
+ "command": "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell",
+ "args": "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell",
+ "workingDir": "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.",
+ "ports": "List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated.",
+ "envFrom": "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.",
+ "env": "List of environment variables to set in the container. Cannot be updated.",
+ "resources": "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources",
+ "volumeMounts": "Pod volumes to mount into the container's filesystem. Cannot be updated.",
+ "livenessProbe": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes",
+ "readinessProbe": "Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes",
+ "lifecycle": "Actions that the management system should take in response to container lifecycle events. Cannot be updated.",
+ "terminationMessagePath": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.",
+ "terminationMessagePolicy": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.",
+ "imagePullPolicy": "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images",
+ "securityContext": "Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md",
+ "stdin": "Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.",
+ "stdinOnce": "Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false",
+ "tty": "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.",
+}
+
+func (Container) SwaggerDoc() map[string]string {
+ return map_Container
+}
+
+var map_ContainerImage = map[string]string{
+ "": "Describe a container image",
+ "names": "Names by which this image is known. e.g. [\"gcr.io/google_containers/hyperkube:v1.0.7\", \"dockerhub.io/google_containers/hyperkube:v1.0.7\"]",
+ "sizeBytes": "The size of the image in bytes.",
+}
+
+func (ContainerImage) SwaggerDoc() map[string]string {
+ return map_ContainerImage
+}
+
+var map_ContainerPort = map[string]string{
+ "": "ContainerPort represents a network port in a single container.",
+ "name": "If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.",
+ "hostPort": "Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.",
+ "containerPort": "Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536.",
+ "protocol": "Protocol for port. Must be UDP or TCP. Defaults to \"TCP\".",
+ "hostIP": "What host IP to bind the external port to.",
+}
+
+func (ContainerPort) SwaggerDoc() map[string]string {
+ return map_ContainerPort
+}
+
+var map_ContainerState = map[string]string{
+ "": "ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting.",
+ "waiting": "Details about a waiting container",
+ "running": "Details about a running container",
+ "terminated": "Details about a terminated container",
+}
+
+func (ContainerState) SwaggerDoc() map[string]string {
+ return map_ContainerState
+}
+
+var map_ContainerStateRunning = map[string]string{
+ "": "ContainerStateRunning is a running state of a container.",
+ "startedAt": "Time at which the container was last (re-)started",
+}
+
+func (ContainerStateRunning) SwaggerDoc() map[string]string {
+ return map_ContainerStateRunning
+}
+
+var map_ContainerStateTerminated = map[string]string{
+ "": "ContainerStateTerminated is a terminated state of a container.",
+ "exitCode": "Exit status from the last termination of the container",
+ "signal": "Signal from the last termination of the container",
+ "reason": "(brief) reason from the last termination of the container",
+ "message": "Message regarding the last termination of the container",
+ "startedAt": "Time at which previous execution of the container started",
+ "finishedAt": "Time at which the container last terminated",
+ "containerID": "Container's ID in the format 'docker://<container_id>'",
+}
+
+func (ContainerStateTerminated) SwaggerDoc() map[string]string {
+ return map_ContainerStateTerminated
+}
+
+var map_ContainerStateWaiting = map[string]string{
+ "": "ContainerStateWaiting is a waiting state of a container.",
+ "reason": "(brief) reason the container is not yet running.",
+ "message": "Message regarding why the container is not yet running.",
+}
+
+func (ContainerStateWaiting) SwaggerDoc() map[string]string {
+ return map_ContainerStateWaiting
+}
+
+var map_ContainerStatus = map[string]string{
+ "": "ContainerStatus contains details for the current status of this container.",
+ "name": "This must be a DNS_LABEL. Each container in a pod must have a unique name. Cannot be updated.",
+ "state": "Details about the container's current condition.",
+ "lastState": "Details about the container's last termination condition.",
+ "ready": "Specifies whether the container has passed its readiness probe.",
+ "restartCount": "The number of times the container has been restarted, currently based on the number of dead containers that have not yet been removed. Note that this is calculated from dead containers. But those containers are subject to garbage collection. This value will get capped at 5 by GC.",
+ "image": "The image the container is running. More info: https://kubernetes.io/docs/concepts/containers/images",
+ "imageID": "ImageID of the container's image.",
+ "containerID": "Container's ID in the format 'docker://<container_id>'.",
+}
+
+func (ContainerStatus) SwaggerDoc() map[string]string {
+ return map_ContainerStatus
+}
+
+var map_DaemonEndpoint = map[string]string{
+ "": "DaemonEndpoint contains information about a single Daemon endpoint.",
+ "Port": "Port number of the given endpoint.",
+}
+
+func (DaemonEndpoint) SwaggerDoc() map[string]string {
+ return map_DaemonEndpoint
+}
+
+var map_DeleteOptions = map[string]string{
+ "": "DeleteOptions may be provided when deleting an API object DEPRECATED: This type has been moved to meta/v1 and will be removed soon.",
+ "gracePeriodSeconds": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.",
+ "preconditions": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.",
+ "orphanDependents": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.",
+ "PropagationPolicy": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.",
+}
+
+func (DeleteOptions) SwaggerDoc() map[string]string {
+ return map_DeleteOptions
+}
+
+var map_DownwardAPIProjection = map[string]string{
+ "": "Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.",
+ "items": "Items is a list of DownwardAPIVolume file",
+}
+
+func (DownwardAPIProjection) SwaggerDoc() map[string]string {
+ return map_DownwardAPIProjection
+}
+
+var map_DownwardAPIVolumeFile = map[string]string{
+ "": "DownwardAPIVolumeFile represents information to create the file containing the pod field",
+ "path": "Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'",
+ "fieldRef": "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.",
+ "resourceFieldRef": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.",
+ "mode": "Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.",
+}
+
+func (DownwardAPIVolumeFile) SwaggerDoc() map[string]string {
+ return map_DownwardAPIVolumeFile
+}
+
+var map_DownwardAPIVolumeSource = map[string]string{
+ "": "DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.",
+ "items": "Items is a list of downward API volume file",
+ "defaultMode": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.",
+}
+
+func (DownwardAPIVolumeSource) SwaggerDoc() map[string]string {
+ return map_DownwardAPIVolumeSource
+}
+
+var map_EmptyDirVolumeSource = map[string]string{
+ "": "Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.",
+ "medium": "What type of storage medium should back this directory. The default is \"\" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir",
+ "sizeLimit": "Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir",
+}
+
+func (EmptyDirVolumeSource) SwaggerDoc() map[string]string {
+ return map_EmptyDirVolumeSource
+}
+
+var map_EndpointAddress = map[string]string{
+ "": "EndpointAddress is a tuple that describes single IP address.",
+ "ip": "The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). IPv6 is also accepted but not fully supported on all platforms. Also, certain kubernetes components, like kube-proxy, are not IPv6 ready.",
+ "hostname": "The Hostname of this endpoint",
+ "nodeName": "Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.",
+ "targetRef": "Reference to object providing the endpoint.",
+}
+
+func (EndpointAddress) SwaggerDoc() map[string]string {
+ return map_EndpointAddress
+}
+
+var map_EndpointPort = map[string]string{
+ "": "EndpointPort is a tuple that describes a single port.",
+ "name": "The name of this port (corresponds to ServicePort.Name). Must be a DNS_LABEL. Optional only if one port is defined.",
+ "port": "The port number of the endpoint.",
+ "protocol": "The IP protocol for this port. Must be UDP or TCP. Default is TCP.",
+}
+
+func (EndpointPort) SwaggerDoc() map[string]string {
+ return map_EndpointPort
+}
+
+var map_EndpointSubset = map[string]string{
+ "": "EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given:\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n }\nThe resulting set of endpoints can be viewed as:\n a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],\n b: [ 10.10.1.1:309, 10.10.2.2:309 ]",
+ "addresses": "IP addresses which offer the related ports that are marked as ready. These endpoints should be considered safe for load balancers and clients to utilize.",
+ "notReadyAddresses": "IP addresses which offer the related ports but are not currently marked as ready because they have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check.",
+ "ports": "Port numbers available on the related IP addresses.",
+}
+
+func (EndpointSubset) SwaggerDoc() map[string]string {
+ return map_EndpointSubset
+}
+
+var map_Endpoints = map[string]string{
+ "": "Endpoints is a collection of endpoints that implement the actual service. Example:\n Name: \"mysvc\",\n Subsets: [\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n },\n {\n Addresses: [{\"ip\": \"10.10.3.3\"}],\n Ports: [{\"name\": \"a\", \"port\": 93}, {\"name\": \"b\", \"port\": 76}]\n },\n ]",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "subsets": "The set of all endpoints is the union of all subsets. Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service.",
+}
+
+func (Endpoints) SwaggerDoc() map[string]string {
+ return map_Endpoints
+}
+
+var map_EndpointsList = map[string]string{
+ "": "EndpointsList is a list of endpoints.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "List of endpoints.",
+}
+
+func (EndpointsList) SwaggerDoc() map[string]string {
+ return map_EndpointsList
+}
+
+var map_EnvFromSource = map[string]string{
+ "": "EnvFromSource represents the source of a set of ConfigMaps",
+ "prefix": "An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.",
+ "configMapRef": "The ConfigMap to select from",
+ "secretRef": "The Secret to select from",
+}
+
+func (EnvFromSource) SwaggerDoc() map[string]string {
+ return map_EnvFromSource
+}
+
+var map_EnvVar = map[string]string{
+ "": "EnvVar represents an environment variable present in a Container.",
+ "name": "Name of the environment variable. Must be a C_IDENTIFIER.",
+ "value": "Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".",
+ "valueFrom": "Source for the environment variable's value. Cannot be used if value is not empty.",
+}
+
+func (EnvVar) SwaggerDoc() map[string]string {
+ return map_EnvVar
+}
+
+var map_EnvVarSource = map[string]string{
+ "": "EnvVarSource represents a source for the value of an EnvVar.",
+ "fieldRef": "Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP.",
+ "resourceFieldRef": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.",
+ "configMapKeyRef": "Selects a key of a ConfigMap.",
+ "secretKeyRef": "Selects a key of a secret in the pod's namespace",
+}
+
+func (EnvVarSource) SwaggerDoc() map[string]string {
+ return map_EnvVarSource
+}
+
+var map_Event = map[string]string{
+ "": "Event is a report of an event somewhere in the cluster.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "involvedObject": "The object that this event is about.",
+ "reason": "This should be a short, machine understandable string that gives the reason for the transition into the object's current status.",
+ "message": "A human-readable description of the status of this operation.",
+ "source": "The component reporting this event. Should be a short machine understandable string.",
+ "firstTimestamp": "The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)",
+ "lastTimestamp": "The time at which the most recent occurrence of this event was recorded.",
+ "count": "The number of times this event has occurred.",
+ "type": "Type of this event (Normal, Warning), new types could be added in the future",
+}
+
+func (Event) SwaggerDoc() map[string]string {
+ return map_Event
+}
+
+var map_EventList = map[string]string{
+ "": "EventList is a list of events.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "List of events",
+}
+
+func (EventList) SwaggerDoc() map[string]string {
+ return map_EventList
+}
+
+var map_EventSource = map[string]string{
+ "": "EventSource contains information for an event.",
+ "component": "Component from which the event is generated.",
+ "host": "Node name on which the event is generated.",
+}
+
+func (EventSource) SwaggerDoc() map[string]string {
+ return map_EventSource
+}
+
+var map_ExecAction = map[string]string{
+ "": "ExecAction describes a \"run in container\" action.",
+ "command": "Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.",
+}
+
+func (ExecAction) SwaggerDoc() map[string]string {
+ return map_ExecAction
+}
+
+var map_FCVolumeSource = map[string]string{
+ "": "Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.",
+ "targetWWNs": "Required: FC target worldwide names (WWNs)",
+ "lun": "Required: FC target lun number",
+ "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.",
+ "readOnly": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.",
+}
+
+func (FCVolumeSource) SwaggerDoc() map[string]string {
+ return map_FCVolumeSource
+}
+
+var map_FlexVolumeSource = map[string]string{
+ "": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.",
+ "driver": "Driver is the name of the driver to use for this volume.",
+ "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.",
+ "secretRef": "Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.",
+ "readOnly": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.",
+ "options": "Optional: Extra command options if any.",
+}
+
+func (FlexVolumeSource) SwaggerDoc() map[string]string {
+ return map_FlexVolumeSource
+}
+
+var map_FlockerVolumeSource = map[string]string{
+ "": "Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.",
+ "datasetName": "Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated",
+ "datasetUUID": "UUID of the dataset. This is unique identifier of a Flocker dataset",
+}
+
+func (FlockerVolumeSource) SwaggerDoc() map[string]string {
+ return map_FlockerVolumeSource
+}
+
+var map_GCEPersistentDiskVolumeSource = map[string]string{
+ "": "Represents a Persistent Disk resource in Google Compute Engine.\n\nA GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling.",
+ "pdName": "Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk",
+ "fsType": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk",
+ "partition": "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk",
+ "readOnly": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk",
+}
+
+func (GCEPersistentDiskVolumeSource) SwaggerDoc() map[string]string {
+ return map_GCEPersistentDiskVolumeSource
+}
+
+var map_GitRepoVolumeSource = map[string]string{
+ "": "Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling.",
+ "repository": "Repository URL",
+ "revision": "Commit hash for the specified revision.",
+ "directory": "Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.",
+}
+
+func (GitRepoVolumeSource) SwaggerDoc() map[string]string {
+ return map_GitRepoVolumeSource
+}
+
+var map_GlusterfsVolumeSource = map[string]string{
+ "": "Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.",
+ "endpoints": "EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod",
+ "path": "Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod",
+ "readOnly": "ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod",
+}
+
+func (GlusterfsVolumeSource) SwaggerDoc() map[string]string {
+ return map_GlusterfsVolumeSource
+}
+
+var map_HTTPGetAction = map[string]string{
+ "": "HTTPGetAction describes an action based on HTTP Get requests.",
+ "path": "Path to access on the HTTP server.",
+ "port": "Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.",
+ "host": "Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.",
+ "scheme": "Scheme to use for connecting to the host. Defaults to HTTP.",
+ "httpHeaders": "Custom headers to set in the request. HTTP allows repeated headers.",
+}
+
+func (HTTPGetAction) SwaggerDoc() map[string]string {
+ return map_HTTPGetAction
+}
+
+var map_HTTPHeader = map[string]string{
+ "": "HTTPHeader describes a custom header to be used in HTTP probes",
+ "name": "The header field name",
+ "value": "The header field value",
+}
+
+func (HTTPHeader) SwaggerDoc() map[string]string {
+ return map_HTTPHeader
+}
+
+var map_Handler = map[string]string{
+ "": "Handler defines a specific action that should be taken",
+ "exec": "One and only one of the following should be specified. Exec specifies the action to take.",
+ "httpGet": "HTTPGet specifies the http request to perform.",
+ "tcpSocket": "TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported",
+}
+
+func (Handler) SwaggerDoc() map[string]string {
+ return map_Handler
+}
+
+var map_HostAlias = map[string]string{
+ "": "HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.",
+ "ip": "IP address of the host file entry.",
+ "hostnames": "Hostnames for the above IP address.",
+}
+
+func (HostAlias) SwaggerDoc() map[string]string {
+ return map_HostAlias
+}
+
+var map_HostPathVolumeSource = map[string]string{
+ "": "Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.",
+ "path": "Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath",
+}
+
+func (HostPathVolumeSource) SwaggerDoc() map[string]string {
+ return map_HostPathVolumeSource
+}
+
+var map_ISCSIVolumeSource = map[string]string{
+ "": "Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.",
+ "targetPortal": "iSCSI target portal. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).",
+ "iqn": "Target iSCSI Qualified Name.",
+ "lun": "iSCSI target lun number.",
+ "iscsiInterface": "Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport.",
+ "fsType": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi",
+ "readOnly": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.",
+ "portals": "iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).",
+ "chapAuthDiscovery": "whether support iSCSI Discovery CHAP authentication",
+ "chapAuthSession": "whether support iSCSI Session CHAP authentication",
+ "secretRef": "CHAP secret for iSCSI target and initiator authentication",
+}
+
+func (ISCSIVolumeSource) SwaggerDoc() map[string]string {
+ return map_ISCSIVolumeSource
+}
+
+var map_KeyToPath = map[string]string{
+ "": "Maps a string key to a path within a volume.",
+ "key": "The key to project.",
+ "path": "The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.",
+ "mode": "Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.",
+}
+
+func (KeyToPath) SwaggerDoc() map[string]string {
+ return map_KeyToPath
+}
+
+var map_Lifecycle = map[string]string{
+ "": "Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.",
+ "postStart": "PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks",
+ "preStop": "PreStop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks",
+}
+
+func (Lifecycle) SwaggerDoc() map[string]string {
+ return map_Lifecycle
+}
+
+var map_LimitRange = map[string]string{
+ "": "LimitRange sets resource usage limits for each kind of resource in a Namespace.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Spec defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (LimitRange) SwaggerDoc() map[string]string {
+ return map_LimitRange
+}
+
+var map_LimitRangeItem = map[string]string{
+ "": "LimitRangeItem defines a min/max usage limit for any resource that matches on kind.",
+ "type": "Type of resource that this limit applies to.",
+ "max": "Max usage constraints on this kind by resource name.",
+ "min": "Min usage constraints on this kind by resource name.",
+ "default": "Default resource requirement limit value by resource name if resource limit is omitted.",
+ "defaultRequest": "DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.",
+ "maxLimitRequestRatio": "MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.",
+}
+
+func (LimitRangeItem) SwaggerDoc() map[string]string {
+ return map_LimitRangeItem
+}
+
+var map_LimitRangeList = map[string]string{
+ "": "LimitRangeList is a list of LimitRange items.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "Items is a list of LimitRange objects. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_limit_range.md",
+}
+
+func (LimitRangeList) SwaggerDoc() map[string]string {
+ return map_LimitRangeList
+}
+
+var map_LimitRangeSpec = map[string]string{
+ "": "LimitRangeSpec defines a min/max usage limit for resources that match on kind.",
+ "limits": "Limits is the list of LimitRangeItem objects that are enforced.",
+}
+
+func (LimitRangeSpec) SwaggerDoc() map[string]string {
+ return map_LimitRangeSpec
+}
+
+var map_List = map[string]string{
+ "": "List holds a list of objects, which may not be known by the server.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "List of objects",
+}
+
+func (List) SwaggerDoc() map[string]string {
+ return map_List
+}
+
+var map_ListOptions = map[string]string{
+ "": "ListOptions is the query options to a standard REST list call. DEPRECATED: This type has been moved to meta/v1 and will be removed soon.",
+ "labelSelector": "A selector to restrict the list of returned objects by their labels. Defaults to everything.",
+ "fieldSelector": "A selector to restrict the list of returned objects by their fields. Defaults to everything.",
+ "includeUninitialized": "If true, partially initialized resources are included in the response.",
+ "watch": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.",
+ "resourceVersion": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.",
+ "timeoutSeconds": "Timeout for the list/watch call.",
+}
+
+func (ListOptions) SwaggerDoc() map[string]string {
+ return map_ListOptions
+}
+
+var map_LoadBalancerIngress = map[string]string{
+ "": "LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.",
+ "ip": "IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers)",
+ "hostname": "Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers)",
+}
+
+func (LoadBalancerIngress) SwaggerDoc() map[string]string {
+ return map_LoadBalancerIngress
+}
+
+var map_LoadBalancerStatus = map[string]string{
+ "": "LoadBalancerStatus represents the status of a load-balancer.",
+ "ingress": "Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points.",
+}
+
+func (LoadBalancerStatus) SwaggerDoc() map[string]string {
+ return map_LoadBalancerStatus
+}
+
+var map_LocalObjectReference = map[string]string{
+ "": "LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.",
+ "name": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
+}
+
+func (LocalObjectReference) SwaggerDoc() map[string]string {
+ return map_LocalObjectReference
+}
+
+var map_LocalVolumeSource = map[string]string{
+ "": "Local represents directly-attached storage with node affinity",
+ "path": "The full path to the volume on the node For alpha, this path must be a directory Once block as a source is supported, then this path can point to a block device",
+}
+
+func (LocalVolumeSource) SwaggerDoc() map[string]string {
+ return map_LocalVolumeSource
+}
+
+var map_NFSVolumeSource = map[string]string{
+ "": "Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling.",
+ "server": "Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs",
+ "path": "Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs",
+ "readOnly": "ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs",
+}
+
+func (NFSVolumeSource) SwaggerDoc() map[string]string {
+ return map_NFSVolumeSource
+}
+
+var map_Namespace = map[string]string{
+ "": "Namespace provides a scope for Names. Use of multiple namespaces is optional.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Spec defines the behavior of the Namespace. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+ "status": "Status describes the current status of a Namespace. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (Namespace) SwaggerDoc() map[string]string {
+ return map_Namespace
+}
+
+var map_NamespaceList = map[string]string{
+ "": "NamespaceList is a list of Namespaces.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "Items is the list of Namespace objects in the list. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/",
+}
+
+func (NamespaceList) SwaggerDoc() map[string]string {
+ return map_NamespaceList
+}
+
+var map_NamespaceSpec = map[string]string{
+ "": "NamespaceSpec describes the attributes on a Namespace.",
+ "finalizers": "Finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#finalizers",
+}
+
+func (NamespaceSpec) SwaggerDoc() map[string]string {
+ return map_NamespaceSpec
+}
+
+var map_NamespaceStatus = map[string]string{
+ "": "NamespaceStatus is information about the current status of a Namespace.",
+ "phase": "Phase is the current lifecycle phase of the namespace. More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#phases",
+}
+
+func (NamespaceStatus) SwaggerDoc() map[string]string {
+ return map_NamespaceStatus
+}
+
+var map_Node = map[string]string{
+ "": "Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd).",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Spec defines the behavior of a node. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+ "status": "Most recently observed status of the node. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (Node) SwaggerDoc() map[string]string {
+ return map_Node
+}
+
+var map_NodeAddress = map[string]string{
+ "": "NodeAddress contains information for the node's address.",
+ "type": "Node address type, one of Hostname, ExternalIP or InternalIP.",
+ "address": "The node address.",
+}
+
+func (NodeAddress) SwaggerDoc() map[string]string {
+ return map_NodeAddress
+}
+
+var map_NodeAffinity = map[string]string{
+ "": "Node affinity is a group of node affinity scheduling rules.",
+ "requiredDuringSchedulingIgnoredDuringExecution": "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.",
+ "preferredDuringSchedulingIgnoredDuringExecution": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.",
+}
+
+func (NodeAffinity) SwaggerDoc() map[string]string {
+ return map_NodeAffinity
+}
+
+var map_NodeCondition = map[string]string{
+ "": "NodeCondition contains condition information for a node.",
+ "type": "Type of node condition.",
+ "status": "Status of the condition, one of True, False, Unknown.",
+ "lastHeartbeatTime": "Last time we got an update on a given condition.",
+ "lastTransitionTime": "Last time the condition transit from one status to another.",
+ "reason": "(brief) reason for the condition's last transition.",
+ "message": "Human readable message indicating details about last transition.",
+}
+
+func (NodeCondition) SwaggerDoc() map[string]string {
+ return map_NodeCondition
+}
+
+var map_NodeDaemonEndpoints = map[string]string{
+ "": "NodeDaemonEndpoints lists ports opened by daemons running on the Node.",
+ "kubeletEndpoint": "Endpoint on which Kubelet is listening.",
+}
+
+func (NodeDaemonEndpoints) SwaggerDoc() map[string]string {
+ return map_NodeDaemonEndpoints
+}
+
+var map_NodeList = map[string]string{
+ "": "NodeList is the whole list of all Nodes which have been registered with master.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "List of nodes",
+}
+
+func (NodeList) SwaggerDoc() map[string]string {
+ return map_NodeList
+}
+
+var map_NodeProxyOptions = map[string]string{
+ "": "NodeProxyOptions is the query options to a Node's proxy call.",
+ "path": "Path is the URL path to use for the current proxy request to node.",
+}
+
+func (NodeProxyOptions) SwaggerDoc() map[string]string {
+ return map_NodeProxyOptions
+}
+
+var map_NodeResources = map[string]string{
+ "": "NodeResources is an object for conveying resource information about a node. see http://releases.k8s.io/HEAD/docs/design/resources.md for more details.",
+ "Capacity": "Capacity represents the available resources of a node",
+}
+
+func (NodeResources) SwaggerDoc() map[string]string {
+ return map_NodeResources
+}
+
+var map_NodeSelector = map[string]string{
+ "": "A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.",
+ "nodeSelectorTerms": "Required. A list of node selector terms. The terms are ORed.",
+}
+
+func (NodeSelector) SwaggerDoc() map[string]string {
+ return map_NodeSelector
+}
+
+var map_NodeSelectorRequirement = map[string]string{
+ "": "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.",
+ "key": "The label key that the selector applies to.",
+ "operator": "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.",
+ "values": "An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.",
+}
+
+func (NodeSelectorRequirement) SwaggerDoc() map[string]string {
+ return map_NodeSelectorRequirement
+}
+
+var map_NodeSelectorTerm = map[string]string{
+ "": "A null or empty node selector term matches no objects.",
+ "matchExpressions": "Required. A list of node selector requirements. The requirements are ANDed.",
+}
+
+func (NodeSelectorTerm) SwaggerDoc() map[string]string {
+ return map_NodeSelectorTerm
+}
+
+var map_NodeSpec = map[string]string{
+ "": "NodeSpec describes the attributes that a node is created with.",
+ "podCIDR": "PodCIDR represents the pod IP range assigned to the node.",
+ "externalID": "External ID of the node assigned by some machine database (e.g. a cloud provider). Deprecated.",
+ "providerID": "ID of the node assigned by the cloud provider in the format: <ProviderName>://<ProviderSpecificNodeID>",
+ "unschedulable": "Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration",
+ "taints": "If specified, the node's taints.",
+}
+
+func (NodeSpec) SwaggerDoc() map[string]string {
+ return map_NodeSpec
+}
+
+var map_NodeStatus = map[string]string{
+ "": "NodeStatus is information about the current status of a node.",
+ "capacity": "Capacity represents the total resources of a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity",
+ "allocatable": "Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity.",
+ "phase": "NodePhase is the recently observed lifecycle phase of the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#phase The field is never populated, and now is deprecated.",
+ "conditions": "Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/concepts/nodes/node/#condition",
+ "addresses": "List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses",
+ "daemonEndpoints": "Endpoints of daemons running on the Node.",
+ "nodeInfo": "Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#info",
+ "images": "List of container images on this node",
+ "volumesInUse": "List of attachable volumes in use (mounted) by the node.",
+ "volumesAttached": "List of volumes that are attached to the node.",
+}
+
+func (NodeStatus) SwaggerDoc() map[string]string {
+ return map_NodeStatus
+}
+
+var map_NodeSystemInfo = map[string]string{
+ "": "NodeSystemInfo is a set of ids/uuids to uniquely identify the node.",
+ "machineID": "MachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html",
+ "systemUUID": "SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html",
+ "bootID": "Boot ID reported by the node.",
+ "kernelVersion": "Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).",
+ "osImage": "OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).",
+ "containerRuntimeVersion": "ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0).",
+ "kubeletVersion": "Kubelet Version reported by the node.",
+ "kubeProxyVersion": "KubeProxy Version reported by the node.",
+ "operatingSystem": "The Operating System reported by the node",
+ "architecture": "The Architecture reported by the node",
+}
+
+func (NodeSystemInfo) SwaggerDoc() map[string]string {
+ return map_NodeSystemInfo
+}
+
+var map_ObjectFieldSelector = map[string]string{
+ "": "ObjectFieldSelector selects an APIVersioned field of an object.",
+ "apiVersion": "Version of the schema the FieldPath is written in terms of, defaults to \"v1\".",
+ "fieldPath": "Path of the field to select in the specified API version.",
+}
+
+func (ObjectFieldSelector) SwaggerDoc() map[string]string {
+ return map_ObjectFieldSelector
+}
+
+var map_ObjectMeta = map[string]string{
+ "": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. DEPRECATED: Use k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta instead - this type will be removed soon.",
+ "name": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
+ "generateName": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency",
+ "namespace": "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/",
+ "selfLink": "SelfLink is a URL representing this object. Populated by the system. Read-only.",
+ "uid": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids",
+ "resourceVersion": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency",
+ "generation": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.",
+ "creationTimestamp": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "deletionTimestamp": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "deletionGracePeriodSeconds": "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.",
+ "labels": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/",
+ "annotations": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/",
+ "ownerReferences": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.",
+ "initializers": "An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects.\n\nWhen an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user.",
+ "finalizers": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.",
+ "clusterName": "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.",
+}
+
+func (ObjectMeta) SwaggerDoc() map[string]string {
+ return map_ObjectMeta
+}
+
+var map_ObjectReference = map[string]string{
+ "": "ObjectReference contains enough information to let you inspect or modify the referred object.",
+ "kind": "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "namespace": "Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/",
+ "name": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
+ "uid": "UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids",
+ "apiVersion": "API version of the referent.",
+ "resourceVersion": "Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency",
+ "fieldPath": "If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: \"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered the event) or if no container name is specified \"spec.containers[2]\" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.",
+}
+
+func (ObjectReference) SwaggerDoc() map[string]string {
+ return map_ObjectReference
+}
+
+var map_PersistentVolume = map[string]string{
+ "": "PersistentVolume (PV) is a storage resource provisioned by an administrator. It is analogous to a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Spec defines a specification of a persistent volume owned by the cluster. Provisioned by an administrator. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes",
+ "status": "Status represents the current information/status for the persistent volume. Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes",
+}
+
+func (PersistentVolume) SwaggerDoc() map[string]string {
+ return map_PersistentVolume
+}
+
+var map_PersistentVolumeClaim = map[string]string{
+ "": "PersistentVolumeClaim is a user's request for and claim to a persistent volume",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims",
+ "status": "Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims",
+}
+
+func (PersistentVolumeClaim) SwaggerDoc() map[string]string {
+ return map_PersistentVolumeClaim
+}
+
+var map_PersistentVolumeClaimList = map[string]string{
+ "": "PersistentVolumeClaimList is a list of PersistentVolumeClaim items.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "A list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims",
+}
+
+func (PersistentVolumeClaimList) SwaggerDoc() map[string]string {
+ return map_PersistentVolumeClaimList
+}
+
+var map_PersistentVolumeClaimSpec = map[string]string{
+ "": "PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes",
+ "accessModes": "AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1",
+ "selector": "A label query over volumes to consider for binding.",
+ "resources": "Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources",
+ "volumeName": "VolumeName is the binding reference to the PersistentVolume backing this claim.",
+ "storageClassName": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1",
+}
+
+func (PersistentVolumeClaimSpec) SwaggerDoc() map[string]string {
+ return map_PersistentVolumeClaimSpec
+}
+
+var map_PersistentVolumeClaimStatus = map[string]string{
+ "": "PersistentVolumeClaimStatus is the current status of a persistent volume claim.",
+ "phase": "Phase represents the current phase of PersistentVolumeClaim.",
+ "accessModes": "AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1",
+ "capacity": "Represents the actual resources of the underlying volume.",
+}
+
+func (PersistentVolumeClaimStatus) SwaggerDoc() map[string]string {
+ return map_PersistentVolumeClaimStatus
+}
+
+var map_PersistentVolumeClaimVolumeSource = map[string]string{
+ "": "PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system).",
+ "claimName": "ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims",
+ "readOnly": "Will force the ReadOnly setting in VolumeMounts. Default false.",
+}
+
+func (PersistentVolumeClaimVolumeSource) SwaggerDoc() map[string]string {
+ return map_PersistentVolumeClaimVolumeSource
+}
+
+var map_PersistentVolumeList = map[string]string{
+ "": "PersistentVolumeList is a list of PersistentVolume items.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "List of persistent volumes. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes",
+}
+
+func (PersistentVolumeList) SwaggerDoc() map[string]string {
+ return map_PersistentVolumeList
+}
+
+var map_PersistentVolumeSource = map[string]string{
+ "": "PersistentVolumeSource is similar to VolumeSource but meant for the administrator who creates PVs. Exactly one of its members must be set.",
+ "gcePersistentDisk": "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk",
+ "awsElasticBlockStore": "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore",
+ "hostPath": "HostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath",
+ "glusterfs": "Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md",
+ "nfs": "NFS represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs",
+ "rbd": "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md",
+ "iscsi": "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin.",
+ "cinder": "Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md",
+ "cephfs": "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime",
+ "fc": "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.",
+ "flocker": "Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running",
+ "flexVolume": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.",
+ "azureFile": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.",
+ "vsphereVolume": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine",
+ "quobyte": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime",
+ "azureDisk": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.",
+ "photonPersistentDisk": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine",
+ "portworxVolume": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine",
+ "scaleIO": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.",
+ "local": "Local represents directly-attached storage with node affinity",
+ "storageos": "StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md",
+}
+
+func (PersistentVolumeSource) SwaggerDoc() map[string]string {
+ return map_PersistentVolumeSource
+}
+
+var map_PersistentVolumeSpec = map[string]string{
+ "": "PersistentVolumeSpec is the specification of a persistent volume.",
+ "capacity": "A description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity",
+ "accessModes": "AccessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes",
+ "claimRef": "ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding",
+ "persistentVolumeReclaimPolicy": "What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming",
+ "storageClassName": "Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.",
+}
+
+func (PersistentVolumeSpec) SwaggerDoc() map[string]string {
+ return map_PersistentVolumeSpec
+}
+
+var map_PersistentVolumeStatus = map[string]string{
+ "": "PersistentVolumeStatus is the current status of a persistent volume.",
+ "phase": "Phase indicates if a volume is available, bound to a claim, or released by a claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase",
+ "message": "A human-readable message indicating details about why the volume is in this state.",
+ "reason": "Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.",
+}
+
+func (PersistentVolumeStatus) SwaggerDoc() map[string]string {
+ return map_PersistentVolumeStatus
+}
+
+var map_PhotonPersistentDiskVolumeSource = map[string]string{
+ "": "Represents a Photon Controller persistent disk resource.",
+ "pdID": "ID that identifies Photon Controller persistent disk",
+ "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.",
+}
+
+func (PhotonPersistentDiskVolumeSource) SwaggerDoc() map[string]string {
+ return map_PhotonPersistentDiskVolumeSource
+}
+
+var map_Pod = map[string]string{
+ "": "Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+ "status": "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (Pod) SwaggerDoc() map[string]string {
+ return map_Pod
+}
+
+var map_PodAffinity = map[string]string{
+ "": "Pod affinity is a group of inter pod affinity scheduling rules.",
+ "requiredDuringSchedulingIgnoredDuringExecution": "NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system will try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:\"requiredDuringSchedulingRequiredDuringExecution,omitempty\"` If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.",
+ "preferredDuringSchedulingIgnoredDuringExecution": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.",
+}
+
+func (PodAffinity) SwaggerDoc() map[string]string {
+ return map_PodAffinity
+}
+
+var map_PodAffinityTerm = map[string]string{
+ "": "Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key <topologyKey> tches that of any node on which a pod of the set of pods is running",
+ "labelSelector": "A label query over a set of resources, in this case pods.",
+ "namespaces": "namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"",
+ "topologyKey": "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as \"all topologies\" (\"all topologies\" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed.",
+}
+
+func (PodAffinityTerm) SwaggerDoc() map[string]string {
+ return map_PodAffinityTerm
+}
+
+var map_PodAntiAffinity = map[string]string{
+ "": "Pod anti affinity is a group of inter pod anti affinity scheduling rules.",
+ "requiredDuringSchedulingIgnoredDuringExecution": "NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system will try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:\"requiredDuringSchedulingRequiredDuringExecution,omitempty\"` If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.",
+ "preferredDuringSchedulingIgnoredDuringExecution": "The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.",
+}
+
+func (PodAntiAffinity) SwaggerDoc() map[string]string {
+ return map_PodAntiAffinity
+}
+
+var map_PodAttachOptions = map[string]string{
+ "": "PodAttachOptions is the query options to a Pod's remote attach call.",
+ "stdin": "Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false.",
+ "stdout": "Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true.",
+ "stderr": "Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true.",
+ "tty": "TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false.",
+ "container": "The container in which to execute the command. Defaults to only container if there is only one container in the pod.",
+}
+
+func (PodAttachOptions) SwaggerDoc() map[string]string {
+ return map_PodAttachOptions
+}
+
+var map_PodCondition = map[string]string{
+ "": "PodCondition contains details for the current condition of this pod.",
+ "type": "Type is the type of the condition. Currently only Ready. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions",
+ "status": "Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions",
+ "lastProbeTime": "Last time we probed the condition.",
+ "lastTransitionTime": "Last time the condition transitioned from one status to another.",
+ "reason": "Unique, one-word, CamelCase reason for the condition's last transition.",
+ "message": "Human-readable message indicating details about last transition.",
+}
+
+func (PodCondition) SwaggerDoc() map[string]string {
+ return map_PodCondition
+}
+
+var map_PodExecOptions = map[string]string{
+ "": "PodExecOptions is the query options to a Pod's remote exec call.",
+ "stdin": "Redirect the standard input stream of the pod for this call. Defaults to false.",
+ "stdout": "Redirect the standard output stream of the pod for this call. Defaults to true.",
+ "stderr": "Redirect the standard error stream of the pod for this call. Defaults to true.",
+ "tty": "TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.",
+ "container": "Container in which to execute the command. Defaults to only container if there is only one container in the pod.",
+ "command": "Command is the remote command to execute. argv array. Not executed within a shell.",
+}
+
+func (PodExecOptions) SwaggerDoc() map[string]string {
+ return map_PodExecOptions
+}
+
+var map_PodList = map[string]string{
+ "": "PodList is a list of Pods.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "List of pods. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md",
+}
+
+func (PodList) SwaggerDoc() map[string]string {
+ return map_PodList
+}
+
+var map_PodLogOptions = map[string]string{
+ "": "PodLogOptions is the query options for a Pod's logs REST call.",
+ "container": "The container for which to stream logs. Defaults to only container if there is one container in the pod.",
+ "follow": "Follow the log stream of the pod. Defaults to false.",
+ "previous": "Return previous terminated container logs. Defaults to false.",
+ "sinceSeconds": "A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.",
+ "sinceTime": "An RFC3339 timestamp from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.",
+ "timestamps": "If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.",
+ "tailLines": "If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime",
+ "limitBytes": "If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit.",
+}
+
+func (PodLogOptions) SwaggerDoc() map[string]string {
+ return map_PodLogOptions
+}
+
+var map_PodPortForwardOptions = map[string]string{
+ "": "PodPortForwardOptions is the query options to a Pod's port forward call when using WebSockets. The `port` query parameter must specify the port or ports (comma separated) to forward over. Port forwarding over SPDY does not use these options. It requires the port to be passed in the `port` header as part of request.",
+ "ports": "List of ports to forward Required when using WebSockets",
+}
+
+func (PodPortForwardOptions) SwaggerDoc() map[string]string {
+ return map_PodPortForwardOptions
+}
+
+var map_PodProxyOptions = map[string]string{
+ "": "PodProxyOptions is the query options to a Pod's proxy call.",
+ "path": "Path is the URL path to use for the current proxy request to pod.",
+}
+
+func (PodProxyOptions) SwaggerDoc() map[string]string {
+ return map_PodProxyOptions
+}
+
+var map_PodSecurityContext = map[string]string{
+ "": "PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.",
+ "seLinuxOptions": "The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.",
+ "runAsUser": "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.",
+ "runAsNonRoot": "Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.",
+ "supplementalGroups": "A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container.",
+ "fsGroup": "A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:\n\n1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw ",
+}
+
+func (PodSecurityContext) SwaggerDoc() map[string]string {
+ return map_PodSecurityContext
+}
+
+var map_PodSignature = map[string]string{
+ "": "Describes the class of pods that should avoid this node. Exactly one field should be set.",
+ "podController": "Reference to controller whose pods should avoid this node.",
+}
+
+func (PodSignature) SwaggerDoc() map[string]string {
+ return map_PodSignature
+}
+
+var map_PodSpec = map[string]string{
+ "": "PodSpec is a description of a pod.",
+ "volumes": "List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes",
+ "initContainers": "List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/",
+ "containers": "List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated.",
+ "restartPolicy": "Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy",
+ "terminationGracePeriodSeconds": "Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds.",
+ "activeDeadlineSeconds": "Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer.",
+ "dnsPolicy": "Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to \"ClusterFirst\". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.",
+ "nodeSelector": "NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/",
+ "serviceAccountName": "ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/",
+ "serviceAccount": "DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.",
+ "automountServiceAccountToken": "AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.",
+ "nodeName": "NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements.",
+ "hostNetwork": "Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false.",
+ "hostPID": "Use the host's pid namespace. Optional: Default to false.",
+ "hostIPC": "Use the host's ipc namespace. Optional: Default to false.",
+ "securityContext": "SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.",
+ "imagePullSecrets": "ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod",
+ "hostname": "Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value.",
+ "subdomain": "If specified, the fully qualified Pod hostname will be \"<hostname>.<subdomain>.<pod namespace>.svc.<cluster domain>\". If not specified, the pod will not have a domainname at all.",
+ "affinity": "If specified, the pod's scheduling constraints",
+ "schedulerName": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.",
+ "tolerations": "If specified, the pod's tolerations.",
+ "hostAliases": "HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods.",
+}
+
+func (PodSpec) SwaggerDoc() map[string]string {
+ return map_PodSpec
+}
+
+var map_PodStatus = map[string]string{
+ "": "PodStatus represents information about the status of a pod. Status may trail the actual state of a system.",
+ "phase": "Current condition of the pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase",
+ "conditions": "Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions",
+ "message": "A human readable message indicating details about why the pod is in this condition.",
+ "reason": "A brief CamelCase message indicating details about why the pod is in this state. e.g. 'OutOfDisk'",
+ "hostIP": "IP address of the host to which the pod is assigned. Empty if not yet scheduled.",
+ "podIP": "IP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated.",
+ "startTime": "RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod.",
+ "initContainerStatuses": "The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status",
+ "containerStatuses": "The list has one entry per container in the manifest. Each entry is currently the output of `docker inspect`. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status",
+ "qosClass": "The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md",
+}
+
+func (PodStatus) SwaggerDoc() map[string]string {
+ return map_PodStatus
+}
+
+var map_PodStatusResult = map[string]string{
+ "": "PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "status": "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (PodStatusResult) SwaggerDoc() map[string]string {
+ return map_PodStatusResult
+}
+
+var map_PodTemplate = map[string]string{
+ "": "PodTemplate describes a template for creating copies of a predefined pod.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "template": "Template defines the pods that will be created from this pod template. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (PodTemplate) SwaggerDoc() map[string]string {
+ return map_PodTemplate
+}
+
+var map_PodTemplateList = map[string]string{
+ "": "PodTemplateList is a list of PodTemplates.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "List of pod templates",
+}
+
+func (PodTemplateList) SwaggerDoc() map[string]string {
+ return map_PodTemplateList
+}
+
+var map_PodTemplateSpec = map[string]string{
+ "": "PodTemplateSpec describes the data a pod should have when created from a template",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (PodTemplateSpec) SwaggerDoc() map[string]string {
+ return map_PodTemplateSpec
+}
+
+var map_PortworxVolumeSource = map[string]string{
+ "": "PortworxVolumeSource represents a Portworx volume resource.",
+ "volumeID": "VolumeID uniquely identifies a Portworx volume",
+ "fsType": "FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified.",
+ "readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.",
+}
+
+func (PortworxVolumeSource) SwaggerDoc() map[string]string {
+ return map_PortworxVolumeSource
+}
+
+var map_Preconditions = map[string]string{
+ "": "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.",
+ "uid": "Specifies the target UID.",
+}
+
+func (Preconditions) SwaggerDoc() map[string]string {
+ return map_Preconditions
+}
+
+var map_PreferAvoidPodsEntry = map[string]string{
+ "": "Describes a class of pods that should avoid this node.",
+ "podSignature": "The class of pods.",
+ "evictionTime": "Time at which this entry was added to the list.",
+ "reason": "(brief) reason why this entry was added to the list.",
+ "message": "Human readable message indicating why this entry was added to the list.",
+}
+
+func (PreferAvoidPodsEntry) SwaggerDoc() map[string]string {
+ return map_PreferAvoidPodsEntry
+}
+
+var map_PreferredSchedulingTerm = map[string]string{
+ "": "An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).",
+ "weight": "Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.",
+ "preference": "A node selector term, associated with the corresponding weight.",
+}
+
+func (PreferredSchedulingTerm) SwaggerDoc() map[string]string {
+ return map_PreferredSchedulingTerm
+}
+
+var map_Probe = map[string]string{
+ "": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.",
+ "initialDelaySeconds": "Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes",
+ "timeoutSeconds": "Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes",
+ "periodSeconds": "How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.",
+ "successThreshold": "Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.",
+ "failureThreshold": "Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.",
+}
+
+func (Probe) SwaggerDoc() map[string]string {
+ return map_Probe
+}
+
+var map_ProjectedVolumeSource = map[string]string{
+ "": "Represents a projected volume source",
+ "sources": "list of volume projections",
+ "defaultMode": "Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.",
+}
+
+func (ProjectedVolumeSource) SwaggerDoc() map[string]string {
+ return map_ProjectedVolumeSource
+}
+
+var map_QuobyteVolumeSource = map[string]string{
+ "": "Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.",
+ "registry": "Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes",
+ "volume": "Volume is a string that references an already created Quobyte volume by name.",
+ "readOnly": "ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.",
+ "user": "User to map volume access to Defaults to serivceaccount user",
+ "group": "Group to map volume access to Default is no group",
+}
+
+func (QuobyteVolumeSource) SwaggerDoc() map[string]string {
+ return map_QuobyteVolumeSource
+}
+
+var map_RBDVolumeSource = map[string]string{
+ "": "Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.",
+ "monitors": "A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it",
+ "image": "The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it",
+ "fsType": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd",
+ "pool": "The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it",
+ "user": "The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it",
+ "keyring": "Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it",
+ "secretRef": "SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it",
+ "readOnly": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it",
+}
+
+func (RBDVolumeSource) SwaggerDoc() map[string]string {
+ return map_RBDVolumeSource
+}
+
+var map_RangeAllocation = map[string]string{
+ "": "RangeAllocation is not a public type.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "range": "Range is string that identifies the range represented by 'data'.",
+ "data": "Data is a bit array containing all allocated addresses in the previous segment.",
+}
+
+func (RangeAllocation) SwaggerDoc() map[string]string {
+ return map_RangeAllocation
+}
+
+var map_ReplicationController = map[string]string{
+ "": "ReplicationController represents the configuration of a replication controller.",
+ "metadata": "If the Labels of a ReplicationController are empty, they are defaulted to be the same as the Pod(s) that the replication controller manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Spec defines the specification of the desired behavior of the replication controller. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+ "status": "Status is the most recently observed status of the replication controller. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (ReplicationController) SwaggerDoc() map[string]string {
+ return map_ReplicationController
+}
+
+var map_ReplicationControllerCondition = map[string]string{
+ "": "ReplicationControllerCondition describes the state of a replication controller at a certain point.",
+ "type": "Type of replication controller condition.",
+ "status": "Status of the condition, one of True, False, Unknown.",
+ "lastTransitionTime": "The last time the condition transitioned from one status to another.",
+ "reason": "The reason for the condition's last transition.",
+ "message": "A human readable message indicating details about the transition.",
+}
+
+func (ReplicationControllerCondition) SwaggerDoc() map[string]string {
+ return map_ReplicationControllerCondition
+}
+
+var map_ReplicationControllerList = map[string]string{
+ "": "ReplicationControllerList is a collection of replication controllers.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "List of replication controllers. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller",
+}
+
+func (ReplicationControllerList) SwaggerDoc() map[string]string {
+ return map_ReplicationControllerList
+}
+
+var map_ReplicationControllerSpec = map[string]string{
+ "": "ReplicationControllerSpec is the specification of a replication controller.",
+ "replicas": "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller",
+ "minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)",
+ "selector": "Selector is a label query over pods that should match the Replicas count. If Selector is empty, it is defaulted to the labels present on the Pod template. Label keys and values that must match in order to be controlled by this replication controller, if empty defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
+ "template": "Template is the object that describes the pod that will be created if insufficient replicas are detected. This takes precedence over a TemplateRef. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template",
+}
+
+func (ReplicationControllerSpec) SwaggerDoc() map[string]string {
+ return map_ReplicationControllerSpec
+}
+
+var map_ReplicationControllerStatus = map[string]string{
+ "": "ReplicationControllerStatus represents the current status of a replication controller.",
+ "replicas": "Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller",
+ "fullyLabeledReplicas": "The number of pods that have labels matching the labels of the pod template of the replication controller.",
+ "readyReplicas": "The number of ready replicas for this replication controller.",
+ "availableReplicas": "The number of available replicas (ready for at least minReadySeconds) for this replication controller.",
+ "observedGeneration": "ObservedGeneration reflects the generation of the most recently observed replication controller.",
+ "conditions": "Represents the latest available observations of a replication controller's current state.",
+}
+
+func (ReplicationControllerStatus) SwaggerDoc() map[string]string {
+ return map_ReplicationControllerStatus
+}
+
+var map_ResourceFieldSelector = map[string]string{
+ "": "ResourceFieldSelector represents container resources (cpu, memory) and their output format",
+ "containerName": "Container name: required for volumes, optional for env vars",
+ "resource": "Required: resource to select",
+ "divisor": "Specifies the output format of the exposed resources, defaults to \"1\"",
+}
+
+func (ResourceFieldSelector) SwaggerDoc() map[string]string {
+ return map_ResourceFieldSelector
+}
+
+var map_ResourceQuota = map[string]string{
+ "": "ResourceQuota sets aggregate quota restrictions enforced per namespace",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Spec defines the desired quota. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+ "status": "Status defines the actual enforced quota and its current usage. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (ResourceQuota) SwaggerDoc() map[string]string {
+ return map_ResourceQuota
+}
+
+var map_ResourceQuotaList = map[string]string{
+ "": "ResourceQuotaList is a list of ResourceQuota items.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "Items is a list of ResourceQuota objects. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md",
+}
+
+func (ResourceQuotaList) SwaggerDoc() map[string]string {
+ return map_ResourceQuotaList
+}
+
+var map_ResourceQuotaSpec = map[string]string{
+ "": "ResourceQuotaSpec defines the desired hard limits to enforce for Quota.",
+ "hard": "Hard is the set of desired hard limits for each named resource. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md",
+ "scopes": "A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.",
+}
+
+func (ResourceQuotaSpec) SwaggerDoc() map[string]string {
+ return map_ResourceQuotaSpec
+}
+
+var map_ResourceQuotaStatus = map[string]string{
+ "": "ResourceQuotaStatus defines the enforced hard limits and observed use.",
+ "hard": "Hard is the set of enforced hard limits for each named resource. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md",
+ "used": "Used is the current observed total usage of the resource in the namespace.",
+}
+
+func (ResourceQuotaStatus) SwaggerDoc() map[string]string {
+ return map_ResourceQuotaStatus
+}
+
+var map_ResourceRequirements = map[string]string{
+ "": "ResourceRequirements describes the compute resource requirements.",
+ "limits": "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/",
+ "requests": "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/",
+}
+
+func (ResourceRequirements) SwaggerDoc() map[string]string {
+ return map_ResourceRequirements
+}
+
+var map_SELinuxOptions = map[string]string{
+ "": "SELinuxOptions are the labels to be applied to the container",
+ "user": "User is a SELinux user label that applies to the container.",
+ "role": "Role is a SELinux role label that applies to the container.",
+ "type": "Type is a SELinux type label that applies to the container.",
+ "level": "Level is SELinux level label that applies to the container.",
+}
+
+func (SELinuxOptions) SwaggerDoc() map[string]string {
+ return map_SELinuxOptions
+}
+
+var map_ScaleIOVolumeSource = map[string]string{
+ "": "ScaleIOVolumeSource represents a persistent ScaleIO volume",
+ "gateway": "The host address of the ScaleIO API Gateway.",
+ "system": "The name of the storage system as configured in ScaleIO.",
+ "secretRef": "SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.",
+ "sslEnabled": "Flag to enable/disable SSL communication with Gateway, default false",
+ "protectionDomain": "The name of the Protection Domain for the configured storage (defaults to \"default\").",
+ "storagePool": "The Storage Pool associated with the protection domain (defaults to \"default\").",
+ "storageMode": "Indicates whether the storage for a volume should be thick or thin (defaults to \"thin\").",
+ "volumeName": "The name of a volume already created in the ScaleIO system that is associated with this volume source.",
+ "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.",
+ "readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.",
+}
+
+func (ScaleIOVolumeSource) SwaggerDoc() map[string]string {
+ return map_ScaleIOVolumeSource
+}
+
+var map_Secret = map[string]string{
+ "": "Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "data": "Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4",
+ "stringData": "stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API.",
+ "type": "Used to facilitate programmatic handling of secret data.",
+}
+
+func (Secret) SwaggerDoc() map[string]string {
+ return map_Secret
+}
+
+var map_SecretEnvSource = map[string]string{
+ "": "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.",
+ "optional": "Specify whether the Secret must be defined",
+}
+
+func (SecretEnvSource) SwaggerDoc() map[string]string {
+ return map_SecretEnvSource
+}
+
+var map_SecretKeySelector = map[string]string{
+ "": "SecretKeySelector selects a key of a Secret.",
+ "key": "The key of the secret to select from. Must be a valid secret key.",
+ "optional": "Specify whether the Secret or it's key must be defined",
+}
+
+func (SecretKeySelector) SwaggerDoc() map[string]string {
+ return map_SecretKeySelector
+}
+
+var map_SecretList = map[string]string{
+ "": "SecretList is a list of Secret.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "Items is a list of secret objects. More info: https://kubernetes.io/docs/concepts/configuration/secret",
+}
+
+func (SecretList) SwaggerDoc() map[string]string {
+ return map_SecretList
+}
+
+var map_SecretProjection = map[string]string{
+ "": "Adapts a secret into a projected volume.\n\nThe contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.",
+ "items": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.",
+ "optional": "Specify whether the Secret or its key must be defined",
+}
+
+func (SecretProjection) SwaggerDoc() map[string]string {
+ return map_SecretProjection
+}
+
+var map_SecretVolumeSource = map[string]string{
+ "": "Adapts a Secret into a volume.\n\nThe contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.",
+ "secretName": "Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret",
+ "items": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.",
+ "defaultMode": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.",
+ "optional": "Specify whether the Secret or it's keys must be defined",
+}
+
+func (SecretVolumeSource) SwaggerDoc() map[string]string {
+ return map_SecretVolumeSource
+}
+
+var map_SecurityContext = map[string]string{
+ "": "SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence.",
+ "capabilities": "The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime.",
+ "privileged": "Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false.",
+ "seLinuxOptions": "The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.",
+ "runAsUser": "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.",
+ "runAsNonRoot": "Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.",
+ "readOnlyRootFilesystem": "Whether this container has a read-only root filesystem. Default is false.",
+}
+
+func (SecurityContext) SwaggerDoc() map[string]string {
+ return map_SecurityContext
+}
+
+var map_SerializedReference = map[string]string{
+ "": "SerializedReference is a reference to serialized object.",
+ "reference": "The reference to an object in the system.",
+}
+
+func (SerializedReference) SwaggerDoc() map[string]string {
+ return map_SerializedReference
+}
+
+var map_Service = map[string]string{
+ "": "Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+ "status": "Most recently observed status of the service. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (Service) SwaggerDoc() map[string]string {
+ return map_Service
+}
+
+var map_ServiceAccount = map[string]string{
+ "": "ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "secrets": "Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. More info: https://kubernetes.io/docs/concepts/configuration/secret",
+ "imagePullSecrets": "ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod",
+ "automountServiceAccountToken": "AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level.",
+}
+
+func (ServiceAccount) SwaggerDoc() map[string]string {
+ return map_ServiceAccount
+}
+
+var map_ServiceAccountList = map[string]string{
+ "": "ServiceAccountList is a list of ServiceAccount objects",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "List of ServiceAccounts. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/",
+}
+
+func (ServiceAccountList) SwaggerDoc() map[string]string {
+ return map_ServiceAccountList
+}
+
+var map_ServiceList = map[string]string{
+ "": "ServiceList holds a list of services.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "List of services",
+}
+
+func (ServiceList) SwaggerDoc() map[string]string {
+ return map_ServiceList
+}
+
+var map_ServicePort = map[string]string{
+ "": "ServicePort contains information on service's port.",
+ "name": "The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. This maps to the 'Name' field in EndpointPort objects. Optional if only one ServicePort is defined on this service.",
+ "protocol": "The IP protocol for this port. Supports \"TCP\" and \"UDP\". Default is TCP.",
+ "port": "The port that will be exposed by this service.",
+ "targetPort": "Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod's container ports. If this is not specified, the value of the 'port' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the 'port' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service",
+ "nodePort": "The port on each node on which this service is exposed when type=NodePort or LoadBalancer. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport",
+}
+
+func (ServicePort) SwaggerDoc() map[string]string {
+ return map_ServicePort
+}
+
+var map_ServiceProxyOptions = map[string]string{
+ "": "ServiceProxyOptions is the query options to a Service's proxy call.",
+ "path": "Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.",
+}
+
+func (ServiceProxyOptions) SwaggerDoc() map[string]string {
+ return map_ServiceProxyOptions
+}
+
+var map_ServiceSpec = map[string]string{
+ "": "ServiceSpec describes the attributes that a user creates on a service.",
+ "ports": "The list of ports that are exposed by this service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies",
+ "selector": "Route service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/",
+ "clusterIP": "clusterIP is the IP address of the service and is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are \"None\", empty string (\"\"), or a valid IP address. \"None\" can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies",
+ "type": "type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. \"ExternalName\" maps to the specified externalName. \"ClusterIP\" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object. If clusterIP is \"None\", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. \"NodePort\" builds on ClusterIP and allocates a port on every node which routes to the clusterIP. \"LoadBalancer\" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services ",
+ "externalIPs": "externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system.",
+ "sessionAffinity": "Supports \"ClientIP\" and \"None\". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies",
+ "loadBalancerIP": "Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature.",
+ "loadBalancerSourceRanges": "If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature.\" More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/",
+ "externalName": "externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid DNS name and requires Type to be ExternalName.",
+ "externalTrafficPolicy": "externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. \"Local\" preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. \"Cluster\" obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading.",
+ "healthCheckNodePort": "healthCheckNodePort specifies the healthcheck nodePort for the service. If not specified, HealthCheckNodePort is created by the service api backend with the allocated nodePort. Will use user-specified nodePort value if specified by the client. Only effects when Type is set to LoadBalancer and ExternalTrafficPolicy is set to Local.",
+}
+
+func (ServiceSpec) SwaggerDoc() map[string]string {
+ return map_ServiceSpec
+}
+
+var map_ServiceStatus = map[string]string{
+ "": "ServiceStatus represents the current status of a service.",
+ "loadBalancer": "LoadBalancer contains the current status of the load-balancer, if one is present.",
+}
+
+func (ServiceStatus) SwaggerDoc() map[string]string {
+ return map_ServiceStatus
+}
+
+var map_StorageOSPersistentVolumeSource = map[string]string{
+ "": "Represents a StorageOS persistent volume resource.",
+ "volumeName": "VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.",
+ "volumeNamespace": "VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.",
+ "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.",
+ "readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.",
+ "secretRef": "SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.",
+}
+
+func (StorageOSPersistentVolumeSource) SwaggerDoc() map[string]string {
+ return map_StorageOSPersistentVolumeSource
+}
+
+var map_StorageOSVolumeSource = map[string]string{
+ "": "Represents a StorageOS persistent volume resource.",
+ "volumeName": "VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.",
+ "volumeNamespace": "VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.",
+ "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.",
+ "readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.",
+ "secretRef": "SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.",
+}
+
+func (StorageOSVolumeSource) SwaggerDoc() map[string]string {
+ return map_StorageOSVolumeSource
+}
+
+var map_Sysctl = map[string]string{
+ "": "Sysctl defines a kernel parameter to be set",
+ "Name": "Name of a property to set",
+ "Value": "Value of a property to set",
+}
+
+func (Sysctl) SwaggerDoc() map[string]string {
+ return map_Sysctl
+}
+
+var map_TCPSocketAction = map[string]string{
+ "": "TCPSocketAction describes an action based on opening a socket",
+ "port": "Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.",
+ "host": "Optional: Host name to connect to, defaults to the pod IP.",
+}
+
+func (TCPSocketAction) SwaggerDoc() map[string]string {
+ return map_TCPSocketAction
+}
+
+var map_Taint = map[string]string{
+ "": "The node this Taint is attached to has the effect \"effect\" on any pod that that does not tolerate the Taint.",
+ "key": "Required. The taint key to be applied to a node.",
+ "value": "Required. The taint value corresponding to the taint key.",
+ "effect": "Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute.",
+ "timeAdded": "TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints.",
+}
+
+func (Taint) SwaggerDoc() map[string]string {
+ return map_Taint
+}
+
+var map_Toleration = map[string]string{
+ "": "The pod this Toleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>.",
+ "key": "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.",
+ "operator": "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.",
+ "value": "Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.",
+ "effect": "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.",
+ "tolerationSeconds": "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.",
+}
+
+func (Toleration) SwaggerDoc() map[string]string {
+ return map_Toleration
+}
+
+var map_Volume = map[string]string{
+ "": "Volume represents a named volume in a pod that may be accessed by any container in the pod.",
+ "name": "Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
+}
+
+func (Volume) SwaggerDoc() map[string]string {
+ return map_Volume
+}
+
+var map_VolumeMount = map[string]string{
+ "": "VolumeMount describes a mounting of a Volume within a container.",
+ "name": "This must match the Name of a Volume.",
+ "readOnly": "Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.",
+ "mountPath": "Path within the container at which the volume should be mounted. Must not contain ':'.",
+ "subPath": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).",
+}
+
+func (VolumeMount) SwaggerDoc() map[string]string {
+ return map_VolumeMount
+}
+
+var map_VolumeProjection = map[string]string{
+ "": "Projection that may be projected along with other supported volume types",
+ "secret": "information about the secret data to project",
+ "downwardAPI": "information about the downwardAPI data to project",
+ "configMap": "information about the configMap data to project",
+}
+
+func (VolumeProjection) SwaggerDoc() map[string]string {
+ return map_VolumeProjection
+}
+
+var map_VolumeSource = map[string]string{
+ "": "Represents the source of a volume to mount. Only one of its members may be specified.",
+ "hostPath": "HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath",
+ "emptyDir": "EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir",
+ "gcePersistentDisk": "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk",
+ "awsElasticBlockStore": "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore",
+ "gitRepo": "GitRepo represents a git repository at a particular revision.",
+ "secret": "Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret",
+ "nfs": "NFS represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs",
+ "iscsi": "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md",
+ "glusterfs": "Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md",
+ "persistentVolumeClaim": "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims",
+ "rbd": "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md",
+ "flexVolume": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.",
+ "cinder": "Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md",
+ "cephfs": "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime",
+ "flocker": "Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running",
+ "downwardAPI": "DownwardAPI represents downward API about the pod that should populate this volume",
+ "fc": "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.",
+ "azureFile": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.",
+ "configMap": "ConfigMap represents a configMap that should populate this volume",
+ "vsphereVolume": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine",
+ "quobyte": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime",
+ "azureDisk": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.",
+ "photonPersistentDisk": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine",
+ "projected": "Items for all in one resources secrets, configmaps, and downward API",
+ "portworxVolume": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine",
+ "scaleIO": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.",
+ "storageos": "StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.",
+}
+
+func (VolumeSource) SwaggerDoc() map[string]string {
+ return map_VolumeSource
+}
+
+var map_VsphereVirtualDiskVolumeSource = map[string]string{
+ "": "Represents a vSphere volume resource.",
+ "volumePath": "Path that identifies vSphere volume vmdk",
+ "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.",
+ "storagePolicyName": "Storage Policy Based Management (SPBM) profile name.",
+ "storagePolicyID": "Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.",
+}
+
+func (VsphereVirtualDiskVolumeSource) SwaggerDoc() map[string]string {
+ return map_VsphereVirtualDiskVolumeSource
+}
+
+var map_WeightedPodAffinityTerm = map[string]string{
+ "": "The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)",
+ "weight": "weight associated with matching the corresponding podAffinityTerm, in the range 1-100.",
+ "podAffinityTerm": "Required. A pod affinity term, associated with the corresponding weight.",
+}
+
+func (WeightedPodAffinityTerm) SwaggerDoc() map[string]string {
+ return map_WeightedPodAffinityTerm
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/client-go/pkg/api/v1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/api/v1/zz_generated.conversion.go
new file mode 100644
index 000000000..1832c432b
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/v1/zz_generated.conversion.go
@@ -0,0 +1,5168 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ types "k8s.io/apimachinery/pkg/types"
+ api "k8s.io/client-go/pkg/api"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1_AWSElasticBlockStoreVolumeSource_To_api_AWSElasticBlockStoreVolumeSource,
+ Convert_api_AWSElasticBlockStoreVolumeSource_To_v1_AWSElasticBlockStoreVolumeSource,
+ Convert_v1_Affinity_To_api_Affinity,
+ Convert_api_Affinity_To_v1_Affinity,
+ Convert_v1_AttachedVolume_To_api_AttachedVolume,
+ Convert_api_AttachedVolume_To_v1_AttachedVolume,
+ Convert_v1_AvoidPods_To_api_AvoidPods,
+ Convert_api_AvoidPods_To_v1_AvoidPods,
+ Convert_v1_AzureDiskVolumeSource_To_api_AzureDiskVolumeSource,
+ Convert_api_AzureDiskVolumeSource_To_v1_AzureDiskVolumeSource,
+ Convert_v1_AzureFileVolumeSource_To_api_AzureFileVolumeSource,
+ Convert_api_AzureFileVolumeSource_To_v1_AzureFileVolumeSource,
+ Convert_v1_Binding_To_api_Binding,
+ Convert_api_Binding_To_v1_Binding,
+ Convert_v1_Capabilities_To_api_Capabilities,
+ Convert_api_Capabilities_To_v1_Capabilities,
+ Convert_v1_CephFSVolumeSource_To_api_CephFSVolumeSource,
+ Convert_api_CephFSVolumeSource_To_v1_CephFSVolumeSource,
+ Convert_v1_CinderVolumeSource_To_api_CinderVolumeSource,
+ Convert_api_CinderVolumeSource_To_v1_CinderVolumeSource,
+ Convert_v1_ComponentCondition_To_api_ComponentCondition,
+ Convert_api_ComponentCondition_To_v1_ComponentCondition,
+ Convert_v1_ComponentStatus_To_api_ComponentStatus,
+ Convert_api_ComponentStatus_To_v1_ComponentStatus,
+ Convert_v1_ComponentStatusList_To_api_ComponentStatusList,
+ Convert_api_ComponentStatusList_To_v1_ComponentStatusList,
+ Convert_v1_ConfigMap_To_api_ConfigMap,
+ Convert_api_ConfigMap_To_v1_ConfigMap,
+ Convert_v1_ConfigMapEnvSource_To_api_ConfigMapEnvSource,
+ Convert_api_ConfigMapEnvSource_To_v1_ConfigMapEnvSource,
+ Convert_v1_ConfigMapKeySelector_To_api_ConfigMapKeySelector,
+ Convert_api_ConfigMapKeySelector_To_v1_ConfigMapKeySelector,
+ Convert_v1_ConfigMapList_To_api_ConfigMapList,
+ Convert_api_ConfigMapList_To_v1_ConfigMapList,
+ Convert_v1_ConfigMapProjection_To_api_ConfigMapProjection,
+ Convert_api_ConfigMapProjection_To_v1_ConfigMapProjection,
+ Convert_v1_ConfigMapVolumeSource_To_api_ConfigMapVolumeSource,
+ Convert_api_ConfigMapVolumeSource_To_v1_ConfigMapVolumeSource,
+ Convert_v1_Container_To_api_Container,
+ Convert_api_Container_To_v1_Container,
+ Convert_v1_ContainerImage_To_api_ContainerImage,
+ Convert_api_ContainerImage_To_v1_ContainerImage,
+ Convert_v1_ContainerPort_To_api_ContainerPort,
+ Convert_api_ContainerPort_To_v1_ContainerPort,
+ Convert_v1_ContainerState_To_api_ContainerState,
+ Convert_api_ContainerState_To_v1_ContainerState,
+ Convert_v1_ContainerStateRunning_To_api_ContainerStateRunning,
+ Convert_api_ContainerStateRunning_To_v1_ContainerStateRunning,
+ Convert_v1_ContainerStateTerminated_To_api_ContainerStateTerminated,
+ Convert_api_ContainerStateTerminated_To_v1_ContainerStateTerminated,
+ Convert_v1_ContainerStateWaiting_To_api_ContainerStateWaiting,
+ Convert_api_ContainerStateWaiting_To_v1_ContainerStateWaiting,
+ Convert_v1_ContainerStatus_To_api_ContainerStatus,
+ Convert_api_ContainerStatus_To_v1_ContainerStatus,
+ Convert_v1_DaemonEndpoint_To_api_DaemonEndpoint,
+ Convert_api_DaemonEndpoint_To_v1_DaemonEndpoint,
+ Convert_v1_DeleteOptions_To_api_DeleteOptions,
+ Convert_api_DeleteOptions_To_v1_DeleteOptions,
+ Convert_v1_DownwardAPIProjection_To_api_DownwardAPIProjection,
+ Convert_api_DownwardAPIProjection_To_v1_DownwardAPIProjection,
+ Convert_v1_DownwardAPIVolumeFile_To_api_DownwardAPIVolumeFile,
+ Convert_api_DownwardAPIVolumeFile_To_v1_DownwardAPIVolumeFile,
+ Convert_v1_DownwardAPIVolumeSource_To_api_DownwardAPIVolumeSource,
+ Convert_api_DownwardAPIVolumeSource_To_v1_DownwardAPIVolumeSource,
+ Convert_v1_EmptyDirVolumeSource_To_api_EmptyDirVolumeSource,
+ Convert_api_EmptyDirVolumeSource_To_v1_EmptyDirVolumeSource,
+ Convert_v1_EndpointAddress_To_api_EndpointAddress,
+ Convert_api_EndpointAddress_To_v1_EndpointAddress,
+ Convert_v1_EndpointPort_To_api_EndpointPort,
+ Convert_api_EndpointPort_To_v1_EndpointPort,
+ Convert_v1_EndpointSubset_To_api_EndpointSubset,
+ Convert_api_EndpointSubset_To_v1_EndpointSubset,
+ Convert_v1_Endpoints_To_api_Endpoints,
+ Convert_api_Endpoints_To_v1_Endpoints,
+ Convert_v1_EndpointsList_To_api_EndpointsList,
+ Convert_api_EndpointsList_To_v1_EndpointsList,
+ Convert_v1_EnvFromSource_To_api_EnvFromSource,
+ Convert_api_EnvFromSource_To_v1_EnvFromSource,
+ Convert_v1_EnvVar_To_api_EnvVar,
+ Convert_api_EnvVar_To_v1_EnvVar,
+ Convert_v1_EnvVarSource_To_api_EnvVarSource,
+ Convert_api_EnvVarSource_To_v1_EnvVarSource,
+ Convert_v1_Event_To_api_Event,
+ Convert_api_Event_To_v1_Event,
+ Convert_v1_EventList_To_api_EventList,
+ Convert_api_EventList_To_v1_EventList,
+ Convert_v1_EventSource_To_api_EventSource,
+ Convert_api_EventSource_To_v1_EventSource,
+ Convert_v1_ExecAction_To_api_ExecAction,
+ Convert_api_ExecAction_To_v1_ExecAction,
+ Convert_v1_FCVolumeSource_To_api_FCVolumeSource,
+ Convert_api_FCVolumeSource_To_v1_FCVolumeSource,
+ Convert_v1_FlexVolumeSource_To_api_FlexVolumeSource,
+ Convert_api_FlexVolumeSource_To_v1_FlexVolumeSource,
+ Convert_v1_FlockerVolumeSource_To_api_FlockerVolumeSource,
+ Convert_api_FlockerVolumeSource_To_v1_FlockerVolumeSource,
+ Convert_v1_GCEPersistentDiskVolumeSource_To_api_GCEPersistentDiskVolumeSource,
+ Convert_api_GCEPersistentDiskVolumeSource_To_v1_GCEPersistentDiskVolumeSource,
+ Convert_v1_GitRepoVolumeSource_To_api_GitRepoVolumeSource,
+ Convert_api_GitRepoVolumeSource_To_v1_GitRepoVolumeSource,
+ Convert_v1_GlusterfsVolumeSource_To_api_GlusterfsVolumeSource,
+ Convert_api_GlusterfsVolumeSource_To_v1_GlusterfsVolumeSource,
+ Convert_v1_HTTPGetAction_To_api_HTTPGetAction,
+ Convert_api_HTTPGetAction_To_v1_HTTPGetAction,
+ Convert_v1_HTTPHeader_To_api_HTTPHeader,
+ Convert_api_HTTPHeader_To_v1_HTTPHeader,
+ Convert_v1_Handler_To_api_Handler,
+ Convert_api_Handler_To_v1_Handler,
+ Convert_v1_HostAlias_To_api_HostAlias,
+ Convert_api_HostAlias_To_v1_HostAlias,
+ Convert_v1_HostPathVolumeSource_To_api_HostPathVolumeSource,
+ Convert_api_HostPathVolumeSource_To_v1_HostPathVolumeSource,
+ Convert_v1_ISCSIVolumeSource_To_api_ISCSIVolumeSource,
+ Convert_api_ISCSIVolumeSource_To_v1_ISCSIVolumeSource,
+ Convert_v1_KeyToPath_To_api_KeyToPath,
+ Convert_api_KeyToPath_To_v1_KeyToPath,
+ Convert_v1_Lifecycle_To_api_Lifecycle,
+ Convert_api_Lifecycle_To_v1_Lifecycle,
+ Convert_v1_LimitRange_To_api_LimitRange,
+ Convert_api_LimitRange_To_v1_LimitRange,
+ Convert_v1_LimitRangeItem_To_api_LimitRangeItem,
+ Convert_api_LimitRangeItem_To_v1_LimitRangeItem,
+ Convert_v1_LimitRangeList_To_api_LimitRangeList,
+ Convert_api_LimitRangeList_To_v1_LimitRangeList,
+ Convert_v1_LimitRangeSpec_To_api_LimitRangeSpec,
+ Convert_api_LimitRangeSpec_To_v1_LimitRangeSpec,
+ Convert_v1_List_To_api_List,
+ Convert_api_List_To_v1_List,
+ Convert_v1_ListOptions_To_api_ListOptions,
+ Convert_api_ListOptions_To_v1_ListOptions,
+ Convert_v1_LoadBalancerIngress_To_api_LoadBalancerIngress,
+ Convert_api_LoadBalancerIngress_To_v1_LoadBalancerIngress,
+ Convert_v1_LoadBalancerStatus_To_api_LoadBalancerStatus,
+ Convert_api_LoadBalancerStatus_To_v1_LoadBalancerStatus,
+ Convert_v1_LocalObjectReference_To_api_LocalObjectReference,
+ Convert_api_LocalObjectReference_To_v1_LocalObjectReference,
+ Convert_v1_LocalVolumeSource_To_api_LocalVolumeSource,
+ Convert_api_LocalVolumeSource_To_v1_LocalVolumeSource,
+ Convert_v1_NFSVolumeSource_To_api_NFSVolumeSource,
+ Convert_api_NFSVolumeSource_To_v1_NFSVolumeSource,
+ Convert_v1_Namespace_To_api_Namespace,
+ Convert_api_Namespace_To_v1_Namespace,
+ Convert_v1_NamespaceList_To_api_NamespaceList,
+ Convert_api_NamespaceList_To_v1_NamespaceList,
+ Convert_v1_NamespaceSpec_To_api_NamespaceSpec,
+ Convert_api_NamespaceSpec_To_v1_NamespaceSpec,
+ Convert_v1_NamespaceStatus_To_api_NamespaceStatus,
+ Convert_api_NamespaceStatus_To_v1_NamespaceStatus,
+ Convert_v1_Node_To_api_Node,
+ Convert_api_Node_To_v1_Node,
+ Convert_v1_NodeAddress_To_api_NodeAddress,
+ Convert_api_NodeAddress_To_v1_NodeAddress,
+ Convert_v1_NodeAffinity_To_api_NodeAffinity,
+ Convert_api_NodeAffinity_To_v1_NodeAffinity,
+ Convert_v1_NodeCondition_To_api_NodeCondition,
+ Convert_api_NodeCondition_To_v1_NodeCondition,
+ Convert_v1_NodeDaemonEndpoints_To_api_NodeDaemonEndpoints,
+ Convert_api_NodeDaemonEndpoints_To_v1_NodeDaemonEndpoints,
+ Convert_v1_NodeList_To_api_NodeList,
+ Convert_api_NodeList_To_v1_NodeList,
+ Convert_v1_NodeProxyOptions_To_api_NodeProxyOptions,
+ Convert_api_NodeProxyOptions_To_v1_NodeProxyOptions,
+ Convert_v1_NodeResources_To_api_NodeResources,
+ Convert_api_NodeResources_To_v1_NodeResources,
+ Convert_v1_NodeSelector_To_api_NodeSelector,
+ Convert_api_NodeSelector_To_v1_NodeSelector,
+ Convert_v1_NodeSelectorRequirement_To_api_NodeSelectorRequirement,
+ Convert_api_NodeSelectorRequirement_To_v1_NodeSelectorRequirement,
+ Convert_v1_NodeSelectorTerm_To_api_NodeSelectorTerm,
+ Convert_api_NodeSelectorTerm_To_v1_NodeSelectorTerm,
+ Convert_v1_NodeSpec_To_api_NodeSpec,
+ Convert_api_NodeSpec_To_v1_NodeSpec,
+ Convert_v1_NodeStatus_To_api_NodeStatus,
+ Convert_api_NodeStatus_To_v1_NodeStatus,
+ Convert_v1_NodeSystemInfo_To_api_NodeSystemInfo,
+ Convert_api_NodeSystemInfo_To_v1_NodeSystemInfo,
+ Convert_v1_ObjectFieldSelector_To_api_ObjectFieldSelector,
+ Convert_api_ObjectFieldSelector_To_v1_ObjectFieldSelector,
+ Convert_v1_ObjectMeta_To_api_ObjectMeta,
+ Convert_api_ObjectMeta_To_v1_ObjectMeta,
+ Convert_v1_ObjectReference_To_api_ObjectReference,
+ Convert_api_ObjectReference_To_v1_ObjectReference,
+ Convert_v1_PersistentVolume_To_api_PersistentVolume,
+ Convert_api_PersistentVolume_To_v1_PersistentVolume,
+ Convert_v1_PersistentVolumeClaim_To_api_PersistentVolumeClaim,
+ Convert_api_PersistentVolumeClaim_To_v1_PersistentVolumeClaim,
+ Convert_v1_PersistentVolumeClaimList_To_api_PersistentVolumeClaimList,
+ Convert_api_PersistentVolumeClaimList_To_v1_PersistentVolumeClaimList,
+ Convert_v1_PersistentVolumeClaimSpec_To_api_PersistentVolumeClaimSpec,
+ Convert_api_PersistentVolumeClaimSpec_To_v1_PersistentVolumeClaimSpec,
+ Convert_v1_PersistentVolumeClaimStatus_To_api_PersistentVolumeClaimStatus,
+ Convert_api_PersistentVolumeClaimStatus_To_v1_PersistentVolumeClaimStatus,
+ Convert_v1_PersistentVolumeClaimVolumeSource_To_api_PersistentVolumeClaimVolumeSource,
+ Convert_api_PersistentVolumeClaimVolumeSource_To_v1_PersistentVolumeClaimVolumeSource,
+ Convert_v1_PersistentVolumeList_To_api_PersistentVolumeList,
+ Convert_api_PersistentVolumeList_To_v1_PersistentVolumeList,
+ Convert_v1_PersistentVolumeSource_To_api_PersistentVolumeSource,
+ Convert_api_PersistentVolumeSource_To_v1_PersistentVolumeSource,
+ Convert_v1_PersistentVolumeSpec_To_api_PersistentVolumeSpec,
+ Convert_api_PersistentVolumeSpec_To_v1_PersistentVolumeSpec,
+ Convert_v1_PersistentVolumeStatus_To_api_PersistentVolumeStatus,
+ Convert_api_PersistentVolumeStatus_To_v1_PersistentVolumeStatus,
+ Convert_v1_PhotonPersistentDiskVolumeSource_To_api_PhotonPersistentDiskVolumeSource,
+ Convert_api_PhotonPersistentDiskVolumeSource_To_v1_PhotonPersistentDiskVolumeSource,
+ Convert_v1_Pod_To_api_Pod,
+ Convert_api_Pod_To_v1_Pod,
+ Convert_v1_PodAffinity_To_api_PodAffinity,
+ Convert_api_PodAffinity_To_v1_PodAffinity,
+ Convert_v1_PodAffinityTerm_To_api_PodAffinityTerm,
+ Convert_api_PodAffinityTerm_To_v1_PodAffinityTerm,
+ Convert_v1_PodAntiAffinity_To_api_PodAntiAffinity,
+ Convert_api_PodAntiAffinity_To_v1_PodAntiAffinity,
+ Convert_v1_PodAttachOptions_To_api_PodAttachOptions,
+ Convert_api_PodAttachOptions_To_v1_PodAttachOptions,
+ Convert_v1_PodCondition_To_api_PodCondition,
+ Convert_api_PodCondition_To_v1_PodCondition,
+ Convert_v1_PodExecOptions_To_api_PodExecOptions,
+ Convert_api_PodExecOptions_To_v1_PodExecOptions,
+ Convert_v1_PodList_To_api_PodList,
+ Convert_api_PodList_To_v1_PodList,
+ Convert_v1_PodLogOptions_To_api_PodLogOptions,
+ Convert_api_PodLogOptions_To_v1_PodLogOptions,
+ Convert_v1_PodPortForwardOptions_To_api_PodPortForwardOptions,
+ Convert_api_PodPortForwardOptions_To_v1_PodPortForwardOptions,
+ Convert_v1_PodProxyOptions_To_api_PodProxyOptions,
+ Convert_api_PodProxyOptions_To_v1_PodProxyOptions,
+ Convert_v1_PodSecurityContext_To_api_PodSecurityContext,
+ Convert_api_PodSecurityContext_To_v1_PodSecurityContext,
+ Convert_v1_PodSignature_To_api_PodSignature,
+ Convert_api_PodSignature_To_v1_PodSignature,
+ Convert_v1_PodSpec_To_api_PodSpec,
+ Convert_api_PodSpec_To_v1_PodSpec,
+ Convert_v1_PodStatus_To_api_PodStatus,
+ Convert_api_PodStatus_To_v1_PodStatus,
+ Convert_v1_PodStatusResult_To_api_PodStatusResult,
+ Convert_api_PodStatusResult_To_v1_PodStatusResult,
+ Convert_v1_PodTemplate_To_api_PodTemplate,
+ Convert_api_PodTemplate_To_v1_PodTemplate,
+ Convert_v1_PodTemplateList_To_api_PodTemplateList,
+ Convert_api_PodTemplateList_To_v1_PodTemplateList,
+ Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec,
+ Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec,
+ Convert_v1_PortworxVolumeSource_To_api_PortworxVolumeSource,
+ Convert_api_PortworxVolumeSource_To_v1_PortworxVolumeSource,
+ Convert_v1_Preconditions_To_api_Preconditions,
+ Convert_api_Preconditions_To_v1_Preconditions,
+ Convert_v1_PreferAvoidPodsEntry_To_api_PreferAvoidPodsEntry,
+ Convert_api_PreferAvoidPodsEntry_To_v1_PreferAvoidPodsEntry,
+ Convert_v1_PreferredSchedulingTerm_To_api_PreferredSchedulingTerm,
+ Convert_api_PreferredSchedulingTerm_To_v1_PreferredSchedulingTerm,
+ Convert_v1_Probe_To_api_Probe,
+ Convert_api_Probe_To_v1_Probe,
+ Convert_v1_ProjectedVolumeSource_To_api_ProjectedVolumeSource,
+ Convert_api_ProjectedVolumeSource_To_v1_ProjectedVolumeSource,
+ Convert_v1_QuobyteVolumeSource_To_api_QuobyteVolumeSource,
+ Convert_api_QuobyteVolumeSource_To_v1_QuobyteVolumeSource,
+ Convert_v1_RBDVolumeSource_To_api_RBDVolumeSource,
+ Convert_api_RBDVolumeSource_To_v1_RBDVolumeSource,
+ Convert_v1_RangeAllocation_To_api_RangeAllocation,
+ Convert_api_RangeAllocation_To_v1_RangeAllocation,
+ Convert_v1_ReplicationController_To_api_ReplicationController,
+ Convert_api_ReplicationController_To_v1_ReplicationController,
+ Convert_v1_ReplicationControllerCondition_To_api_ReplicationControllerCondition,
+ Convert_api_ReplicationControllerCondition_To_v1_ReplicationControllerCondition,
+ Convert_v1_ReplicationControllerList_To_api_ReplicationControllerList,
+ Convert_api_ReplicationControllerList_To_v1_ReplicationControllerList,
+ Convert_v1_ReplicationControllerSpec_To_api_ReplicationControllerSpec,
+ Convert_api_ReplicationControllerSpec_To_v1_ReplicationControllerSpec,
+ Convert_v1_ReplicationControllerStatus_To_api_ReplicationControllerStatus,
+ Convert_api_ReplicationControllerStatus_To_v1_ReplicationControllerStatus,
+ Convert_v1_ResourceFieldSelector_To_api_ResourceFieldSelector,
+ Convert_api_ResourceFieldSelector_To_v1_ResourceFieldSelector,
+ Convert_v1_ResourceQuota_To_api_ResourceQuota,
+ Convert_api_ResourceQuota_To_v1_ResourceQuota,
+ Convert_v1_ResourceQuotaList_To_api_ResourceQuotaList,
+ Convert_api_ResourceQuotaList_To_v1_ResourceQuotaList,
+ Convert_v1_ResourceQuotaSpec_To_api_ResourceQuotaSpec,
+ Convert_api_ResourceQuotaSpec_To_v1_ResourceQuotaSpec,
+ Convert_v1_ResourceQuotaStatus_To_api_ResourceQuotaStatus,
+ Convert_api_ResourceQuotaStatus_To_v1_ResourceQuotaStatus,
+ Convert_v1_ResourceRequirements_To_api_ResourceRequirements,
+ Convert_api_ResourceRequirements_To_v1_ResourceRequirements,
+ Convert_v1_SELinuxOptions_To_api_SELinuxOptions,
+ Convert_api_SELinuxOptions_To_v1_SELinuxOptions,
+ Convert_v1_ScaleIOVolumeSource_To_api_ScaleIOVolumeSource,
+ Convert_api_ScaleIOVolumeSource_To_v1_ScaleIOVolumeSource,
+ Convert_v1_Secret_To_api_Secret,
+ Convert_api_Secret_To_v1_Secret,
+ Convert_v1_SecretEnvSource_To_api_SecretEnvSource,
+ Convert_api_SecretEnvSource_To_v1_SecretEnvSource,
+ Convert_v1_SecretKeySelector_To_api_SecretKeySelector,
+ Convert_api_SecretKeySelector_To_v1_SecretKeySelector,
+ Convert_v1_SecretList_To_api_SecretList,
+ Convert_api_SecretList_To_v1_SecretList,
+ Convert_v1_SecretProjection_To_api_SecretProjection,
+ Convert_api_SecretProjection_To_v1_SecretProjection,
+ Convert_v1_SecretVolumeSource_To_api_SecretVolumeSource,
+ Convert_api_SecretVolumeSource_To_v1_SecretVolumeSource,
+ Convert_v1_SecurityContext_To_api_SecurityContext,
+ Convert_api_SecurityContext_To_v1_SecurityContext,
+ Convert_v1_SerializedReference_To_api_SerializedReference,
+ Convert_api_SerializedReference_To_v1_SerializedReference,
+ Convert_v1_Service_To_api_Service,
+ Convert_api_Service_To_v1_Service,
+ Convert_v1_ServiceAccount_To_api_ServiceAccount,
+ Convert_api_ServiceAccount_To_v1_ServiceAccount,
+ Convert_v1_ServiceAccountList_To_api_ServiceAccountList,
+ Convert_api_ServiceAccountList_To_v1_ServiceAccountList,
+ Convert_v1_ServiceList_To_api_ServiceList,
+ Convert_api_ServiceList_To_v1_ServiceList,
+ Convert_v1_ServicePort_To_api_ServicePort,
+ Convert_api_ServicePort_To_v1_ServicePort,
+ Convert_v1_ServiceProxyOptions_To_api_ServiceProxyOptions,
+ Convert_api_ServiceProxyOptions_To_v1_ServiceProxyOptions,
+ Convert_v1_ServiceSpec_To_api_ServiceSpec,
+ Convert_api_ServiceSpec_To_v1_ServiceSpec,
+ Convert_v1_ServiceStatus_To_api_ServiceStatus,
+ Convert_api_ServiceStatus_To_v1_ServiceStatus,
+ Convert_v1_StorageOSPersistentVolumeSource_To_api_StorageOSPersistentVolumeSource,
+ Convert_api_StorageOSPersistentVolumeSource_To_v1_StorageOSPersistentVolumeSource,
+ Convert_v1_StorageOSVolumeSource_To_api_StorageOSVolumeSource,
+ Convert_api_StorageOSVolumeSource_To_v1_StorageOSVolumeSource,
+ Convert_v1_Sysctl_To_api_Sysctl,
+ Convert_api_Sysctl_To_v1_Sysctl,
+ Convert_v1_TCPSocketAction_To_api_TCPSocketAction,
+ Convert_api_TCPSocketAction_To_v1_TCPSocketAction,
+ Convert_v1_Taint_To_api_Taint,
+ Convert_api_Taint_To_v1_Taint,
+ Convert_v1_Toleration_To_api_Toleration,
+ Convert_api_Toleration_To_v1_Toleration,
+ Convert_v1_Volume_To_api_Volume,
+ Convert_api_Volume_To_v1_Volume,
+ Convert_v1_VolumeMount_To_api_VolumeMount,
+ Convert_api_VolumeMount_To_v1_VolumeMount,
+ Convert_v1_VolumeProjection_To_api_VolumeProjection,
+ Convert_api_VolumeProjection_To_v1_VolumeProjection,
+ Convert_v1_VolumeSource_To_api_VolumeSource,
+ Convert_api_VolumeSource_To_v1_VolumeSource,
+ Convert_v1_VsphereVirtualDiskVolumeSource_To_api_VsphereVirtualDiskVolumeSource,
+ Convert_api_VsphereVirtualDiskVolumeSource_To_v1_VsphereVirtualDiskVolumeSource,
+ Convert_v1_WeightedPodAffinityTerm_To_api_WeightedPodAffinityTerm,
+ Convert_api_WeightedPodAffinityTerm_To_v1_WeightedPodAffinityTerm,
+ )
+}
+
+func autoConvert_v1_AWSElasticBlockStoreVolumeSource_To_api_AWSElasticBlockStoreVolumeSource(in *AWSElasticBlockStoreVolumeSource, out *api.AWSElasticBlockStoreVolumeSource, s conversion.Scope) error {
+ out.VolumeID = in.VolumeID
+ out.FSType = in.FSType
+ out.Partition = in.Partition
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_v1_AWSElasticBlockStoreVolumeSource_To_api_AWSElasticBlockStoreVolumeSource is an autogenerated conversion function.
+func Convert_v1_AWSElasticBlockStoreVolumeSource_To_api_AWSElasticBlockStoreVolumeSource(in *AWSElasticBlockStoreVolumeSource, out *api.AWSElasticBlockStoreVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_AWSElasticBlockStoreVolumeSource_To_api_AWSElasticBlockStoreVolumeSource(in, out, s)
+}
+
+func autoConvert_api_AWSElasticBlockStoreVolumeSource_To_v1_AWSElasticBlockStoreVolumeSource(in *api.AWSElasticBlockStoreVolumeSource, out *AWSElasticBlockStoreVolumeSource, s conversion.Scope) error {
+ out.VolumeID = in.VolumeID
+ out.FSType = in.FSType
+ out.Partition = in.Partition
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_api_AWSElasticBlockStoreVolumeSource_To_v1_AWSElasticBlockStoreVolumeSource is an autogenerated conversion function.
+func Convert_api_AWSElasticBlockStoreVolumeSource_To_v1_AWSElasticBlockStoreVolumeSource(in *api.AWSElasticBlockStoreVolumeSource, out *AWSElasticBlockStoreVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_AWSElasticBlockStoreVolumeSource_To_v1_AWSElasticBlockStoreVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_Affinity_To_api_Affinity(in *Affinity, out *api.Affinity, s conversion.Scope) error {
+ out.NodeAffinity = (*api.NodeAffinity)(unsafe.Pointer(in.NodeAffinity))
+ out.PodAffinity = (*api.PodAffinity)(unsafe.Pointer(in.PodAffinity))
+ out.PodAntiAffinity = (*api.PodAntiAffinity)(unsafe.Pointer(in.PodAntiAffinity))
+ return nil
+}
+
+// Convert_v1_Affinity_To_api_Affinity is an autogenerated conversion function.
+func Convert_v1_Affinity_To_api_Affinity(in *Affinity, out *api.Affinity, s conversion.Scope) error {
+ return autoConvert_v1_Affinity_To_api_Affinity(in, out, s)
+}
+
+func autoConvert_api_Affinity_To_v1_Affinity(in *api.Affinity, out *Affinity, s conversion.Scope) error {
+ out.NodeAffinity = (*NodeAffinity)(unsafe.Pointer(in.NodeAffinity))
+ out.PodAffinity = (*PodAffinity)(unsafe.Pointer(in.PodAffinity))
+ out.PodAntiAffinity = (*PodAntiAffinity)(unsafe.Pointer(in.PodAntiAffinity))
+ return nil
+}
+
+// Convert_api_Affinity_To_v1_Affinity is an autogenerated conversion function.
+func Convert_api_Affinity_To_v1_Affinity(in *api.Affinity, out *Affinity, s conversion.Scope) error {
+ return autoConvert_api_Affinity_To_v1_Affinity(in, out, s)
+}
+
+func autoConvert_v1_AttachedVolume_To_api_AttachedVolume(in *AttachedVolume, out *api.AttachedVolume, s conversion.Scope) error {
+ out.Name = api.UniqueVolumeName(in.Name)
+ out.DevicePath = in.DevicePath
+ return nil
+}
+
+// Convert_v1_AttachedVolume_To_api_AttachedVolume is an autogenerated conversion function.
+func Convert_v1_AttachedVolume_To_api_AttachedVolume(in *AttachedVolume, out *api.AttachedVolume, s conversion.Scope) error {
+ return autoConvert_v1_AttachedVolume_To_api_AttachedVolume(in, out, s)
+}
+
+func autoConvert_api_AttachedVolume_To_v1_AttachedVolume(in *api.AttachedVolume, out *AttachedVolume, s conversion.Scope) error {
+ out.Name = UniqueVolumeName(in.Name)
+ out.DevicePath = in.DevicePath
+ return nil
+}
+
+// Convert_api_AttachedVolume_To_v1_AttachedVolume is an autogenerated conversion function.
+func Convert_api_AttachedVolume_To_v1_AttachedVolume(in *api.AttachedVolume, out *AttachedVolume, s conversion.Scope) error {
+ return autoConvert_api_AttachedVolume_To_v1_AttachedVolume(in, out, s)
+}
+
+func autoConvert_v1_AvoidPods_To_api_AvoidPods(in *AvoidPods, out *api.AvoidPods, s conversion.Scope) error {
+ out.PreferAvoidPods = *(*[]api.PreferAvoidPodsEntry)(unsafe.Pointer(&in.PreferAvoidPods))
+ return nil
+}
+
+// Convert_v1_AvoidPods_To_api_AvoidPods is an autogenerated conversion function.
+func Convert_v1_AvoidPods_To_api_AvoidPods(in *AvoidPods, out *api.AvoidPods, s conversion.Scope) error {
+ return autoConvert_v1_AvoidPods_To_api_AvoidPods(in, out, s)
+}
+
+func autoConvert_api_AvoidPods_To_v1_AvoidPods(in *api.AvoidPods, out *AvoidPods, s conversion.Scope) error {
+ out.PreferAvoidPods = *(*[]PreferAvoidPodsEntry)(unsafe.Pointer(&in.PreferAvoidPods))
+ return nil
+}
+
+// Convert_api_AvoidPods_To_v1_AvoidPods is an autogenerated conversion function.
+func Convert_api_AvoidPods_To_v1_AvoidPods(in *api.AvoidPods, out *AvoidPods, s conversion.Scope) error {
+ return autoConvert_api_AvoidPods_To_v1_AvoidPods(in, out, s)
+}
+
+func autoConvert_v1_AzureDiskVolumeSource_To_api_AzureDiskVolumeSource(in *AzureDiskVolumeSource, out *api.AzureDiskVolumeSource, s conversion.Scope) error {
+ out.DiskName = in.DiskName
+ out.DataDiskURI = in.DataDiskURI
+ out.CachingMode = (*api.AzureDataDiskCachingMode)(unsafe.Pointer(in.CachingMode))
+ out.FSType = (*string)(unsafe.Pointer(in.FSType))
+ out.ReadOnly = (*bool)(unsafe.Pointer(in.ReadOnly))
+ out.Kind = (*api.AzureDataDiskKind)(unsafe.Pointer(in.Kind))
+ return nil
+}
+
+// Convert_v1_AzureDiskVolumeSource_To_api_AzureDiskVolumeSource is an autogenerated conversion function.
+func Convert_v1_AzureDiskVolumeSource_To_api_AzureDiskVolumeSource(in *AzureDiskVolumeSource, out *api.AzureDiskVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_AzureDiskVolumeSource_To_api_AzureDiskVolumeSource(in, out, s)
+}
+
+func autoConvert_api_AzureDiskVolumeSource_To_v1_AzureDiskVolumeSource(in *api.AzureDiskVolumeSource, out *AzureDiskVolumeSource, s conversion.Scope) error {
+ out.DiskName = in.DiskName
+ out.DataDiskURI = in.DataDiskURI
+ out.CachingMode = (*AzureDataDiskCachingMode)(unsafe.Pointer(in.CachingMode))
+ out.FSType = (*string)(unsafe.Pointer(in.FSType))
+ out.ReadOnly = (*bool)(unsafe.Pointer(in.ReadOnly))
+ out.Kind = (*AzureDataDiskKind)(unsafe.Pointer(in.Kind))
+ return nil
+}
+
+// Convert_api_AzureDiskVolumeSource_To_v1_AzureDiskVolumeSource is an autogenerated conversion function.
+func Convert_api_AzureDiskVolumeSource_To_v1_AzureDiskVolumeSource(in *api.AzureDiskVolumeSource, out *AzureDiskVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_AzureDiskVolumeSource_To_v1_AzureDiskVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_AzureFileVolumeSource_To_api_AzureFileVolumeSource(in *AzureFileVolumeSource, out *api.AzureFileVolumeSource, s conversion.Scope) error {
+ out.SecretName = in.SecretName
+ out.ShareName = in.ShareName
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_v1_AzureFileVolumeSource_To_api_AzureFileVolumeSource is an autogenerated conversion function.
+func Convert_v1_AzureFileVolumeSource_To_api_AzureFileVolumeSource(in *AzureFileVolumeSource, out *api.AzureFileVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_AzureFileVolumeSource_To_api_AzureFileVolumeSource(in, out, s)
+}
+
+func autoConvert_api_AzureFileVolumeSource_To_v1_AzureFileVolumeSource(in *api.AzureFileVolumeSource, out *AzureFileVolumeSource, s conversion.Scope) error {
+ out.SecretName = in.SecretName
+ out.ShareName = in.ShareName
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_api_AzureFileVolumeSource_To_v1_AzureFileVolumeSource is an autogenerated conversion function.
+func Convert_api_AzureFileVolumeSource_To_v1_AzureFileVolumeSource(in *api.AzureFileVolumeSource, out *AzureFileVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_AzureFileVolumeSource_To_v1_AzureFileVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_Binding_To_api_Binding(in *Binding, out *api.Binding, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_ObjectReference_To_api_ObjectReference(&in.Target, &out.Target, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_Binding_To_api_Binding is an autogenerated conversion function.
+func Convert_v1_Binding_To_api_Binding(in *Binding, out *api.Binding, s conversion.Scope) error {
+ return autoConvert_v1_Binding_To_api_Binding(in, out, s)
+}
+
+func autoConvert_api_Binding_To_v1_Binding(in *api.Binding, out *Binding, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_api_ObjectReference_To_v1_ObjectReference(&in.Target, &out.Target, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_Binding_To_v1_Binding is an autogenerated conversion function.
+func Convert_api_Binding_To_v1_Binding(in *api.Binding, out *Binding, s conversion.Scope) error {
+ return autoConvert_api_Binding_To_v1_Binding(in, out, s)
+}
+
+func autoConvert_v1_Capabilities_To_api_Capabilities(in *Capabilities, out *api.Capabilities, s conversion.Scope) error {
+ out.Add = *(*[]api.Capability)(unsafe.Pointer(&in.Add))
+ out.Drop = *(*[]api.Capability)(unsafe.Pointer(&in.Drop))
+ return nil
+}
+
+// Convert_v1_Capabilities_To_api_Capabilities is an autogenerated conversion function.
+func Convert_v1_Capabilities_To_api_Capabilities(in *Capabilities, out *api.Capabilities, s conversion.Scope) error {
+ return autoConvert_v1_Capabilities_To_api_Capabilities(in, out, s)
+}
+
+func autoConvert_api_Capabilities_To_v1_Capabilities(in *api.Capabilities, out *Capabilities, s conversion.Scope) error {
+ out.Add = *(*[]Capability)(unsafe.Pointer(&in.Add))
+ out.Drop = *(*[]Capability)(unsafe.Pointer(&in.Drop))
+ return nil
+}
+
+// Convert_api_Capabilities_To_v1_Capabilities is an autogenerated conversion function.
+func Convert_api_Capabilities_To_v1_Capabilities(in *api.Capabilities, out *Capabilities, s conversion.Scope) error {
+ return autoConvert_api_Capabilities_To_v1_Capabilities(in, out, s)
+}
+
+func autoConvert_v1_CephFSVolumeSource_To_api_CephFSVolumeSource(in *CephFSVolumeSource, out *api.CephFSVolumeSource, s conversion.Scope) error {
+ out.Monitors = *(*[]string)(unsafe.Pointer(&in.Monitors))
+ out.Path = in.Path
+ out.User = in.User
+ out.SecretFile = in.SecretFile
+ out.SecretRef = (*api.LocalObjectReference)(unsafe.Pointer(in.SecretRef))
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_v1_CephFSVolumeSource_To_api_CephFSVolumeSource is an autogenerated conversion function.
+func Convert_v1_CephFSVolumeSource_To_api_CephFSVolumeSource(in *CephFSVolumeSource, out *api.CephFSVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_CephFSVolumeSource_To_api_CephFSVolumeSource(in, out, s)
+}
+
+func autoConvert_api_CephFSVolumeSource_To_v1_CephFSVolumeSource(in *api.CephFSVolumeSource, out *CephFSVolumeSource, s conversion.Scope) error {
+ if in.Monitors == nil {
+ out.Monitors = make([]string, 0)
+ } else {
+ out.Monitors = *(*[]string)(unsafe.Pointer(&in.Monitors))
+ }
+ out.Path = in.Path
+ out.User = in.User
+ out.SecretFile = in.SecretFile
+ out.SecretRef = (*LocalObjectReference)(unsafe.Pointer(in.SecretRef))
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_api_CephFSVolumeSource_To_v1_CephFSVolumeSource is an autogenerated conversion function.
+func Convert_api_CephFSVolumeSource_To_v1_CephFSVolumeSource(in *api.CephFSVolumeSource, out *CephFSVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_CephFSVolumeSource_To_v1_CephFSVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_CinderVolumeSource_To_api_CinderVolumeSource(in *CinderVolumeSource, out *api.CinderVolumeSource, s conversion.Scope) error {
+ out.VolumeID = in.VolumeID
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_v1_CinderVolumeSource_To_api_CinderVolumeSource is an autogenerated conversion function.
+func Convert_v1_CinderVolumeSource_To_api_CinderVolumeSource(in *CinderVolumeSource, out *api.CinderVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_CinderVolumeSource_To_api_CinderVolumeSource(in, out, s)
+}
+
+func autoConvert_api_CinderVolumeSource_To_v1_CinderVolumeSource(in *api.CinderVolumeSource, out *CinderVolumeSource, s conversion.Scope) error {
+ out.VolumeID = in.VolumeID
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_api_CinderVolumeSource_To_v1_CinderVolumeSource is an autogenerated conversion function.
+func Convert_api_CinderVolumeSource_To_v1_CinderVolumeSource(in *api.CinderVolumeSource, out *CinderVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_CinderVolumeSource_To_v1_CinderVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_ComponentCondition_To_api_ComponentCondition(in *ComponentCondition, out *api.ComponentCondition, s conversion.Scope) error {
+ out.Type = api.ComponentConditionType(in.Type)
+ out.Status = api.ConditionStatus(in.Status)
+ out.Message = in.Message
+ out.Error = in.Error
+ return nil
+}
+
+// Convert_v1_ComponentCondition_To_api_ComponentCondition is an autogenerated conversion function.
+func Convert_v1_ComponentCondition_To_api_ComponentCondition(in *ComponentCondition, out *api.ComponentCondition, s conversion.Scope) error {
+ return autoConvert_v1_ComponentCondition_To_api_ComponentCondition(in, out, s)
+}
+
+func autoConvert_api_ComponentCondition_To_v1_ComponentCondition(in *api.ComponentCondition, out *ComponentCondition, s conversion.Scope) error {
+ out.Type = ComponentConditionType(in.Type)
+ out.Status = ConditionStatus(in.Status)
+ out.Message = in.Message
+ out.Error = in.Error
+ return nil
+}
+
+// Convert_api_ComponentCondition_To_v1_ComponentCondition is an autogenerated conversion function.
+func Convert_api_ComponentCondition_To_v1_ComponentCondition(in *api.ComponentCondition, out *ComponentCondition, s conversion.Scope) error {
+ return autoConvert_api_ComponentCondition_To_v1_ComponentCondition(in, out, s)
+}
+
+func autoConvert_v1_ComponentStatus_To_api_ComponentStatus(in *ComponentStatus, out *api.ComponentStatus, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Conditions = *(*[]api.ComponentCondition)(unsafe.Pointer(&in.Conditions))
+ return nil
+}
+
+// Convert_v1_ComponentStatus_To_api_ComponentStatus is an autogenerated conversion function.
+func Convert_v1_ComponentStatus_To_api_ComponentStatus(in *ComponentStatus, out *api.ComponentStatus, s conversion.Scope) error {
+ return autoConvert_v1_ComponentStatus_To_api_ComponentStatus(in, out, s)
+}
+
+func autoConvert_api_ComponentStatus_To_v1_ComponentStatus(in *api.ComponentStatus, out *ComponentStatus, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Conditions = *(*[]ComponentCondition)(unsafe.Pointer(&in.Conditions))
+ return nil
+}
+
+// Convert_api_ComponentStatus_To_v1_ComponentStatus is an autogenerated conversion function.
+func Convert_api_ComponentStatus_To_v1_ComponentStatus(in *api.ComponentStatus, out *ComponentStatus, s conversion.Scope) error {
+ return autoConvert_api_ComponentStatus_To_v1_ComponentStatus(in, out, s)
+}
+
+func autoConvert_v1_ComponentStatusList_To_api_ComponentStatusList(in *ComponentStatusList, out *api.ComponentStatusList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]api.ComponentStatus)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1_ComponentStatusList_To_api_ComponentStatusList is an autogenerated conversion function.
+func Convert_v1_ComponentStatusList_To_api_ComponentStatusList(in *ComponentStatusList, out *api.ComponentStatusList, s conversion.Scope) error {
+ return autoConvert_v1_ComponentStatusList_To_api_ComponentStatusList(in, out, s)
+}
+
+func autoConvert_api_ComponentStatusList_To_v1_ComponentStatusList(in *api.ComponentStatusList, out *ComponentStatusList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]ComponentStatus, 0)
+ } else {
+ out.Items = *(*[]ComponentStatus)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_api_ComponentStatusList_To_v1_ComponentStatusList is an autogenerated conversion function.
+func Convert_api_ComponentStatusList_To_v1_ComponentStatusList(in *api.ComponentStatusList, out *ComponentStatusList, s conversion.Scope) error {
+ return autoConvert_api_ComponentStatusList_To_v1_ComponentStatusList(in, out, s)
+}
+
+func autoConvert_v1_ConfigMap_To_api_ConfigMap(in *ConfigMap, out *api.ConfigMap, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Data = *(*map[string]string)(unsafe.Pointer(&in.Data))
+ return nil
+}
+
+// Convert_v1_ConfigMap_To_api_ConfigMap is an autogenerated conversion function.
+func Convert_v1_ConfigMap_To_api_ConfigMap(in *ConfigMap, out *api.ConfigMap, s conversion.Scope) error {
+ return autoConvert_v1_ConfigMap_To_api_ConfigMap(in, out, s)
+}
+
+func autoConvert_api_ConfigMap_To_v1_ConfigMap(in *api.ConfigMap, out *ConfigMap, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Data = *(*map[string]string)(unsafe.Pointer(&in.Data))
+ return nil
+}
+
+// Convert_api_ConfigMap_To_v1_ConfigMap is an autogenerated conversion function.
+func Convert_api_ConfigMap_To_v1_ConfigMap(in *api.ConfigMap, out *ConfigMap, s conversion.Scope) error {
+ return autoConvert_api_ConfigMap_To_v1_ConfigMap(in, out, s)
+}
+
+func autoConvert_v1_ConfigMapEnvSource_To_api_ConfigMapEnvSource(in *ConfigMapEnvSource, out *api.ConfigMapEnvSource, s conversion.Scope) error {
+ if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
+ return err
+ }
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_v1_ConfigMapEnvSource_To_api_ConfigMapEnvSource is an autogenerated conversion function.
+func Convert_v1_ConfigMapEnvSource_To_api_ConfigMapEnvSource(in *ConfigMapEnvSource, out *api.ConfigMapEnvSource, s conversion.Scope) error {
+ return autoConvert_v1_ConfigMapEnvSource_To_api_ConfigMapEnvSource(in, out, s)
+}
+
+func autoConvert_api_ConfigMapEnvSource_To_v1_ConfigMapEnvSource(in *api.ConfigMapEnvSource, out *ConfigMapEnvSource, s conversion.Scope) error {
+ if err := Convert_api_LocalObjectReference_To_v1_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
+ return err
+ }
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_api_ConfigMapEnvSource_To_v1_ConfigMapEnvSource is an autogenerated conversion function.
+func Convert_api_ConfigMapEnvSource_To_v1_ConfigMapEnvSource(in *api.ConfigMapEnvSource, out *ConfigMapEnvSource, s conversion.Scope) error {
+ return autoConvert_api_ConfigMapEnvSource_To_v1_ConfigMapEnvSource(in, out, s)
+}
+
+func autoConvert_v1_ConfigMapKeySelector_To_api_ConfigMapKeySelector(in *ConfigMapKeySelector, out *api.ConfigMapKeySelector, s conversion.Scope) error {
+ if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
+ return err
+ }
+ out.Key = in.Key
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_v1_ConfigMapKeySelector_To_api_ConfigMapKeySelector is an autogenerated conversion function.
+func Convert_v1_ConfigMapKeySelector_To_api_ConfigMapKeySelector(in *ConfigMapKeySelector, out *api.ConfigMapKeySelector, s conversion.Scope) error {
+ return autoConvert_v1_ConfigMapKeySelector_To_api_ConfigMapKeySelector(in, out, s)
+}
+
+func autoConvert_api_ConfigMapKeySelector_To_v1_ConfigMapKeySelector(in *api.ConfigMapKeySelector, out *ConfigMapKeySelector, s conversion.Scope) error {
+ if err := Convert_api_LocalObjectReference_To_v1_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
+ return err
+ }
+ out.Key = in.Key
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_api_ConfigMapKeySelector_To_v1_ConfigMapKeySelector is an autogenerated conversion function.
+func Convert_api_ConfigMapKeySelector_To_v1_ConfigMapKeySelector(in *api.ConfigMapKeySelector, out *ConfigMapKeySelector, s conversion.Scope) error {
+ return autoConvert_api_ConfigMapKeySelector_To_v1_ConfigMapKeySelector(in, out, s)
+}
+
+func autoConvert_v1_ConfigMapList_To_api_ConfigMapList(in *ConfigMapList, out *api.ConfigMapList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]api.ConfigMap)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1_ConfigMapList_To_api_ConfigMapList is an autogenerated conversion function.
+func Convert_v1_ConfigMapList_To_api_ConfigMapList(in *ConfigMapList, out *api.ConfigMapList, s conversion.Scope) error {
+ return autoConvert_v1_ConfigMapList_To_api_ConfigMapList(in, out, s)
+}
+
+func autoConvert_api_ConfigMapList_To_v1_ConfigMapList(in *api.ConfigMapList, out *ConfigMapList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]ConfigMap, 0)
+ } else {
+ out.Items = *(*[]ConfigMap)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_api_ConfigMapList_To_v1_ConfigMapList is an autogenerated conversion function.
+func Convert_api_ConfigMapList_To_v1_ConfigMapList(in *api.ConfigMapList, out *ConfigMapList, s conversion.Scope) error {
+ return autoConvert_api_ConfigMapList_To_v1_ConfigMapList(in, out, s)
+}
+
+func autoConvert_v1_ConfigMapProjection_To_api_ConfigMapProjection(in *ConfigMapProjection, out *api.ConfigMapProjection, s conversion.Scope) error {
+ if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
+ return err
+ }
+ out.Items = *(*[]api.KeyToPath)(unsafe.Pointer(&in.Items))
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_v1_ConfigMapProjection_To_api_ConfigMapProjection is an autogenerated conversion function.
+func Convert_v1_ConfigMapProjection_To_api_ConfigMapProjection(in *ConfigMapProjection, out *api.ConfigMapProjection, s conversion.Scope) error {
+ return autoConvert_v1_ConfigMapProjection_To_api_ConfigMapProjection(in, out, s)
+}
+
+func autoConvert_api_ConfigMapProjection_To_v1_ConfigMapProjection(in *api.ConfigMapProjection, out *ConfigMapProjection, s conversion.Scope) error {
+ if err := Convert_api_LocalObjectReference_To_v1_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
+ return err
+ }
+ out.Items = *(*[]KeyToPath)(unsafe.Pointer(&in.Items))
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_api_ConfigMapProjection_To_v1_ConfigMapProjection is an autogenerated conversion function.
+func Convert_api_ConfigMapProjection_To_v1_ConfigMapProjection(in *api.ConfigMapProjection, out *ConfigMapProjection, s conversion.Scope) error {
+ return autoConvert_api_ConfigMapProjection_To_v1_ConfigMapProjection(in, out, s)
+}
+
+func autoConvert_v1_ConfigMapVolumeSource_To_api_ConfigMapVolumeSource(in *ConfigMapVolumeSource, out *api.ConfigMapVolumeSource, s conversion.Scope) error {
+ if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
+ return err
+ }
+ out.Items = *(*[]api.KeyToPath)(unsafe.Pointer(&in.Items))
+ out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode))
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_v1_ConfigMapVolumeSource_To_api_ConfigMapVolumeSource is an autogenerated conversion function.
+func Convert_v1_ConfigMapVolumeSource_To_api_ConfigMapVolumeSource(in *ConfigMapVolumeSource, out *api.ConfigMapVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_ConfigMapVolumeSource_To_api_ConfigMapVolumeSource(in, out, s)
+}
+
+func autoConvert_api_ConfigMapVolumeSource_To_v1_ConfigMapVolumeSource(in *api.ConfigMapVolumeSource, out *ConfigMapVolumeSource, s conversion.Scope) error {
+ if err := Convert_api_LocalObjectReference_To_v1_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
+ return err
+ }
+ out.Items = *(*[]KeyToPath)(unsafe.Pointer(&in.Items))
+ out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode))
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_api_ConfigMapVolumeSource_To_v1_ConfigMapVolumeSource is an autogenerated conversion function.
+func Convert_api_ConfigMapVolumeSource_To_v1_ConfigMapVolumeSource(in *api.ConfigMapVolumeSource, out *ConfigMapVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_ConfigMapVolumeSource_To_v1_ConfigMapVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_Container_To_api_Container(in *Container, out *api.Container, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Image = in.Image
+ out.Command = *(*[]string)(unsafe.Pointer(&in.Command))
+ out.Args = *(*[]string)(unsafe.Pointer(&in.Args))
+ out.WorkingDir = in.WorkingDir
+ out.Ports = *(*[]api.ContainerPort)(unsafe.Pointer(&in.Ports))
+ out.EnvFrom = *(*[]api.EnvFromSource)(unsafe.Pointer(&in.EnvFrom))
+ out.Env = *(*[]api.EnvVar)(unsafe.Pointer(&in.Env))
+ if err := Convert_v1_ResourceRequirements_To_api_ResourceRequirements(&in.Resources, &out.Resources, s); err != nil {
+ return err
+ }
+ out.VolumeMounts = *(*[]api.VolumeMount)(unsafe.Pointer(&in.VolumeMounts))
+ out.LivenessProbe = (*api.Probe)(unsafe.Pointer(in.LivenessProbe))
+ out.ReadinessProbe = (*api.Probe)(unsafe.Pointer(in.ReadinessProbe))
+ out.Lifecycle = (*api.Lifecycle)(unsafe.Pointer(in.Lifecycle))
+ out.TerminationMessagePath = in.TerminationMessagePath
+ out.TerminationMessagePolicy = api.TerminationMessagePolicy(in.TerminationMessagePolicy)
+ out.ImagePullPolicy = api.PullPolicy(in.ImagePullPolicy)
+ out.SecurityContext = (*api.SecurityContext)(unsafe.Pointer(in.SecurityContext))
+ out.Stdin = in.Stdin
+ out.StdinOnce = in.StdinOnce
+ out.TTY = in.TTY
+ return nil
+}
+
+// Convert_v1_Container_To_api_Container is an autogenerated conversion function.
+func Convert_v1_Container_To_api_Container(in *Container, out *api.Container, s conversion.Scope) error {
+ return autoConvert_v1_Container_To_api_Container(in, out, s)
+}
+
+func autoConvert_api_Container_To_v1_Container(in *api.Container, out *Container, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Image = in.Image
+ out.Command = *(*[]string)(unsafe.Pointer(&in.Command))
+ out.Args = *(*[]string)(unsafe.Pointer(&in.Args))
+ out.WorkingDir = in.WorkingDir
+ out.Ports = *(*[]ContainerPort)(unsafe.Pointer(&in.Ports))
+ out.EnvFrom = *(*[]EnvFromSource)(unsafe.Pointer(&in.EnvFrom))
+ out.Env = *(*[]EnvVar)(unsafe.Pointer(&in.Env))
+ if err := Convert_api_ResourceRequirements_To_v1_ResourceRequirements(&in.Resources, &out.Resources, s); err != nil {
+ return err
+ }
+ out.VolumeMounts = *(*[]VolumeMount)(unsafe.Pointer(&in.VolumeMounts))
+ out.LivenessProbe = (*Probe)(unsafe.Pointer(in.LivenessProbe))
+ out.ReadinessProbe = (*Probe)(unsafe.Pointer(in.ReadinessProbe))
+ out.Lifecycle = (*Lifecycle)(unsafe.Pointer(in.Lifecycle))
+ out.TerminationMessagePath = in.TerminationMessagePath
+ out.TerminationMessagePolicy = TerminationMessagePolicy(in.TerminationMessagePolicy)
+ out.ImagePullPolicy = PullPolicy(in.ImagePullPolicy)
+ out.SecurityContext = (*SecurityContext)(unsafe.Pointer(in.SecurityContext))
+ out.Stdin = in.Stdin
+ out.StdinOnce = in.StdinOnce
+ out.TTY = in.TTY
+ return nil
+}
+
+// Convert_api_Container_To_v1_Container is an autogenerated conversion function.
+func Convert_api_Container_To_v1_Container(in *api.Container, out *Container, s conversion.Scope) error {
+ return autoConvert_api_Container_To_v1_Container(in, out, s)
+}
+
+func autoConvert_v1_ContainerImage_To_api_ContainerImage(in *ContainerImage, out *api.ContainerImage, s conversion.Scope) error {
+ out.Names = *(*[]string)(unsafe.Pointer(&in.Names))
+ out.SizeBytes = in.SizeBytes
+ return nil
+}
+
+// Convert_v1_ContainerImage_To_api_ContainerImage is an autogenerated conversion function.
+func Convert_v1_ContainerImage_To_api_ContainerImage(in *ContainerImage, out *api.ContainerImage, s conversion.Scope) error {
+ return autoConvert_v1_ContainerImage_To_api_ContainerImage(in, out, s)
+}
+
+func autoConvert_api_ContainerImage_To_v1_ContainerImage(in *api.ContainerImage, out *ContainerImage, s conversion.Scope) error {
+ if in.Names == nil {
+ out.Names = make([]string, 0)
+ } else {
+ out.Names = *(*[]string)(unsafe.Pointer(&in.Names))
+ }
+ out.SizeBytes = in.SizeBytes
+ return nil
+}
+
+// Convert_api_ContainerImage_To_v1_ContainerImage is an autogenerated conversion function.
+func Convert_api_ContainerImage_To_v1_ContainerImage(in *api.ContainerImage, out *ContainerImage, s conversion.Scope) error {
+ return autoConvert_api_ContainerImage_To_v1_ContainerImage(in, out, s)
+}
+
+func autoConvert_v1_ContainerPort_To_api_ContainerPort(in *ContainerPort, out *api.ContainerPort, s conversion.Scope) error {
+ out.Name = in.Name
+ out.HostPort = in.HostPort
+ out.ContainerPort = in.ContainerPort
+ out.Protocol = api.Protocol(in.Protocol)
+ out.HostIP = in.HostIP
+ return nil
+}
+
+// Convert_v1_ContainerPort_To_api_ContainerPort is an autogenerated conversion function.
+func Convert_v1_ContainerPort_To_api_ContainerPort(in *ContainerPort, out *api.ContainerPort, s conversion.Scope) error {
+ return autoConvert_v1_ContainerPort_To_api_ContainerPort(in, out, s)
+}
+
+func autoConvert_api_ContainerPort_To_v1_ContainerPort(in *api.ContainerPort, out *ContainerPort, s conversion.Scope) error {
+ out.Name = in.Name
+ out.HostPort = in.HostPort
+ out.ContainerPort = in.ContainerPort
+ out.Protocol = Protocol(in.Protocol)
+ out.HostIP = in.HostIP
+ return nil
+}
+
+// Convert_api_ContainerPort_To_v1_ContainerPort is an autogenerated conversion function.
+func Convert_api_ContainerPort_To_v1_ContainerPort(in *api.ContainerPort, out *ContainerPort, s conversion.Scope) error {
+ return autoConvert_api_ContainerPort_To_v1_ContainerPort(in, out, s)
+}
+
+func autoConvert_v1_ContainerState_To_api_ContainerState(in *ContainerState, out *api.ContainerState, s conversion.Scope) error {
+ out.Waiting = (*api.ContainerStateWaiting)(unsafe.Pointer(in.Waiting))
+ out.Running = (*api.ContainerStateRunning)(unsafe.Pointer(in.Running))
+ out.Terminated = (*api.ContainerStateTerminated)(unsafe.Pointer(in.Terminated))
+ return nil
+}
+
+// Convert_v1_ContainerState_To_api_ContainerState is an autogenerated conversion function.
+func Convert_v1_ContainerState_To_api_ContainerState(in *ContainerState, out *api.ContainerState, s conversion.Scope) error {
+ return autoConvert_v1_ContainerState_To_api_ContainerState(in, out, s)
+}
+
+func autoConvert_api_ContainerState_To_v1_ContainerState(in *api.ContainerState, out *ContainerState, s conversion.Scope) error {
+ out.Waiting = (*ContainerStateWaiting)(unsafe.Pointer(in.Waiting))
+ out.Running = (*ContainerStateRunning)(unsafe.Pointer(in.Running))
+ out.Terminated = (*ContainerStateTerminated)(unsafe.Pointer(in.Terminated))
+ return nil
+}
+
+// Convert_api_ContainerState_To_v1_ContainerState is an autogenerated conversion function.
+func Convert_api_ContainerState_To_v1_ContainerState(in *api.ContainerState, out *ContainerState, s conversion.Scope) error {
+ return autoConvert_api_ContainerState_To_v1_ContainerState(in, out, s)
+}
+
+func autoConvert_v1_ContainerStateRunning_To_api_ContainerStateRunning(in *ContainerStateRunning, out *api.ContainerStateRunning, s conversion.Scope) error {
+ out.StartedAt = in.StartedAt
+ return nil
+}
+
+// Convert_v1_ContainerStateRunning_To_api_ContainerStateRunning is an autogenerated conversion function.
+func Convert_v1_ContainerStateRunning_To_api_ContainerStateRunning(in *ContainerStateRunning, out *api.ContainerStateRunning, s conversion.Scope) error {
+ return autoConvert_v1_ContainerStateRunning_To_api_ContainerStateRunning(in, out, s)
+}
+
+func autoConvert_api_ContainerStateRunning_To_v1_ContainerStateRunning(in *api.ContainerStateRunning, out *ContainerStateRunning, s conversion.Scope) error {
+ out.StartedAt = in.StartedAt
+ return nil
+}
+
+// Convert_api_ContainerStateRunning_To_v1_ContainerStateRunning is an autogenerated conversion function.
+func Convert_api_ContainerStateRunning_To_v1_ContainerStateRunning(in *api.ContainerStateRunning, out *ContainerStateRunning, s conversion.Scope) error {
+ return autoConvert_api_ContainerStateRunning_To_v1_ContainerStateRunning(in, out, s)
+}
+
+func autoConvert_v1_ContainerStateTerminated_To_api_ContainerStateTerminated(in *ContainerStateTerminated, out *api.ContainerStateTerminated, s conversion.Scope) error {
+ out.ExitCode = in.ExitCode
+ out.Signal = in.Signal
+ out.Reason = in.Reason
+ out.Message = in.Message
+ out.StartedAt = in.StartedAt
+ out.FinishedAt = in.FinishedAt
+ out.ContainerID = in.ContainerID
+ return nil
+}
+
+// Convert_v1_ContainerStateTerminated_To_api_ContainerStateTerminated is an autogenerated conversion function.
+func Convert_v1_ContainerStateTerminated_To_api_ContainerStateTerminated(in *ContainerStateTerminated, out *api.ContainerStateTerminated, s conversion.Scope) error {
+ return autoConvert_v1_ContainerStateTerminated_To_api_ContainerStateTerminated(in, out, s)
+}
+
+func autoConvert_api_ContainerStateTerminated_To_v1_ContainerStateTerminated(in *api.ContainerStateTerminated, out *ContainerStateTerminated, s conversion.Scope) error {
+ out.ExitCode = in.ExitCode
+ out.Signal = in.Signal
+ out.Reason = in.Reason
+ out.Message = in.Message
+ out.StartedAt = in.StartedAt
+ out.FinishedAt = in.FinishedAt
+ out.ContainerID = in.ContainerID
+ return nil
+}
+
+// Convert_api_ContainerStateTerminated_To_v1_ContainerStateTerminated is an autogenerated conversion function.
+func Convert_api_ContainerStateTerminated_To_v1_ContainerStateTerminated(in *api.ContainerStateTerminated, out *ContainerStateTerminated, s conversion.Scope) error {
+ return autoConvert_api_ContainerStateTerminated_To_v1_ContainerStateTerminated(in, out, s)
+}
+
+func autoConvert_v1_ContainerStateWaiting_To_api_ContainerStateWaiting(in *ContainerStateWaiting, out *api.ContainerStateWaiting, s conversion.Scope) error {
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_v1_ContainerStateWaiting_To_api_ContainerStateWaiting is an autogenerated conversion function.
+func Convert_v1_ContainerStateWaiting_To_api_ContainerStateWaiting(in *ContainerStateWaiting, out *api.ContainerStateWaiting, s conversion.Scope) error {
+ return autoConvert_v1_ContainerStateWaiting_To_api_ContainerStateWaiting(in, out, s)
+}
+
+func autoConvert_api_ContainerStateWaiting_To_v1_ContainerStateWaiting(in *api.ContainerStateWaiting, out *ContainerStateWaiting, s conversion.Scope) error {
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_api_ContainerStateWaiting_To_v1_ContainerStateWaiting is an autogenerated conversion function.
+func Convert_api_ContainerStateWaiting_To_v1_ContainerStateWaiting(in *api.ContainerStateWaiting, out *ContainerStateWaiting, s conversion.Scope) error {
+ return autoConvert_api_ContainerStateWaiting_To_v1_ContainerStateWaiting(in, out, s)
+}
+
+func autoConvert_v1_ContainerStatus_To_api_ContainerStatus(in *ContainerStatus, out *api.ContainerStatus, s conversion.Scope) error {
+ out.Name = in.Name
+ if err := Convert_v1_ContainerState_To_api_ContainerState(&in.State, &out.State, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ContainerState_To_api_ContainerState(&in.LastTerminationState, &out.LastTerminationState, s); err != nil {
+ return err
+ }
+ out.Ready = in.Ready
+ out.RestartCount = in.RestartCount
+ out.Image = in.Image
+ out.ImageID = in.ImageID
+ out.ContainerID = in.ContainerID
+ return nil
+}
+
+// Convert_v1_ContainerStatus_To_api_ContainerStatus is an autogenerated conversion function.
+func Convert_v1_ContainerStatus_To_api_ContainerStatus(in *ContainerStatus, out *api.ContainerStatus, s conversion.Scope) error {
+ return autoConvert_v1_ContainerStatus_To_api_ContainerStatus(in, out, s)
+}
+
+func autoConvert_api_ContainerStatus_To_v1_ContainerStatus(in *api.ContainerStatus, out *ContainerStatus, s conversion.Scope) error {
+ out.Name = in.Name
+ if err := Convert_api_ContainerState_To_v1_ContainerState(&in.State, &out.State, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ContainerState_To_v1_ContainerState(&in.LastTerminationState, &out.LastTerminationState, s); err != nil {
+ return err
+ }
+ out.Ready = in.Ready
+ out.RestartCount = in.RestartCount
+ out.Image = in.Image
+ out.ImageID = in.ImageID
+ out.ContainerID = in.ContainerID
+ return nil
+}
+
+// Convert_api_ContainerStatus_To_v1_ContainerStatus is an autogenerated conversion function.
+func Convert_api_ContainerStatus_To_v1_ContainerStatus(in *api.ContainerStatus, out *ContainerStatus, s conversion.Scope) error {
+ return autoConvert_api_ContainerStatus_To_v1_ContainerStatus(in, out, s)
+}
+
+func autoConvert_v1_DaemonEndpoint_To_api_DaemonEndpoint(in *DaemonEndpoint, out *api.DaemonEndpoint, s conversion.Scope) error {
+ out.Port = in.Port
+ return nil
+}
+
+// Convert_v1_DaemonEndpoint_To_api_DaemonEndpoint is an autogenerated conversion function.
+func Convert_v1_DaemonEndpoint_To_api_DaemonEndpoint(in *DaemonEndpoint, out *api.DaemonEndpoint, s conversion.Scope) error {
+ return autoConvert_v1_DaemonEndpoint_To_api_DaemonEndpoint(in, out, s)
+}
+
+func autoConvert_api_DaemonEndpoint_To_v1_DaemonEndpoint(in *api.DaemonEndpoint, out *DaemonEndpoint, s conversion.Scope) error {
+ out.Port = in.Port
+ return nil
+}
+
+// Convert_api_DaemonEndpoint_To_v1_DaemonEndpoint is an autogenerated conversion function.
+func Convert_api_DaemonEndpoint_To_v1_DaemonEndpoint(in *api.DaemonEndpoint, out *DaemonEndpoint, s conversion.Scope) error {
+ return autoConvert_api_DaemonEndpoint_To_v1_DaemonEndpoint(in, out, s)
+}
+
+func autoConvert_v1_DeleteOptions_To_api_DeleteOptions(in *DeleteOptions, out *api.DeleteOptions, s conversion.Scope) error {
+ out.GracePeriodSeconds = (*int64)(unsafe.Pointer(in.GracePeriodSeconds))
+ out.Preconditions = (*api.Preconditions)(unsafe.Pointer(in.Preconditions))
+ out.OrphanDependents = (*bool)(unsafe.Pointer(in.OrphanDependents))
+ out.PropagationPolicy = (*api.DeletionPropagation)(unsafe.Pointer(in.PropagationPolicy))
+ return nil
+}
+
+// Convert_v1_DeleteOptions_To_api_DeleteOptions is an autogenerated conversion function.
+func Convert_v1_DeleteOptions_To_api_DeleteOptions(in *DeleteOptions, out *api.DeleteOptions, s conversion.Scope) error {
+ return autoConvert_v1_DeleteOptions_To_api_DeleteOptions(in, out, s)
+}
+
+func autoConvert_api_DeleteOptions_To_v1_DeleteOptions(in *api.DeleteOptions, out *DeleteOptions, s conversion.Scope) error {
+ out.GracePeriodSeconds = (*int64)(unsafe.Pointer(in.GracePeriodSeconds))
+ out.Preconditions = (*Preconditions)(unsafe.Pointer(in.Preconditions))
+ out.OrphanDependents = (*bool)(unsafe.Pointer(in.OrphanDependents))
+ out.PropagationPolicy = (*DeletionPropagation)(unsafe.Pointer(in.PropagationPolicy))
+ return nil
+}
+
+// Convert_api_DeleteOptions_To_v1_DeleteOptions is an autogenerated conversion function.
+func Convert_api_DeleteOptions_To_v1_DeleteOptions(in *api.DeleteOptions, out *DeleteOptions, s conversion.Scope) error {
+ return autoConvert_api_DeleteOptions_To_v1_DeleteOptions(in, out, s)
+}
+
+func autoConvert_v1_DownwardAPIProjection_To_api_DownwardAPIProjection(in *DownwardAPIProjection, out *api.DownwardAPIProjection, s conversion.Scope) error {
+ out.Items = *(*[]api.DownwardAPIVolumeFile)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1_DownwardAPIProjection_To_api_DownwardAPIProjection is an autogenerated conversion function.
+func Convert_v1_DownwardAPIProjection_To_api_DownwardAPIProjection(in *DownwardAPIProjection, out *api.DownwardAPIProjection, s conversion.Scope) error {
+ return autoConvert_v1_DownwardAPIProjection_To_api_DownwardAPIProjection(in, out, s)
+}
+
+func autoConvert_api_DownwardAPIProjection_To_v1_DownwardAPIProjection(in *api.DownwardAPIProjection, out *DownwardAPIProjection, s conversion.Scope) error {
+ out.Items = *(*[]DownwardAPIVolumeFile)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_api_DownwardAPIProjection_To_v1_DownwardAPIProjection is an autogenerated conversion function.
+func Convert_api_DownwardAPIProjection_To_v1_DownwardAPIProjection(in *api.DownwardAPIProjection, out *DownwardAPIProjection, s conversion.Scope) error {
+ return autoConvert_api_DownwardAPIProjection_To_v1_DownwardAPIProjection(in, out, s)
+}
+
+func autoConvert_v1_DownwardAPIVolumeFile_To_api_DownwardAPIVolumeFile(in *DownwardAPIVolumeFile, out *api.DownwardAPIVolumeFile, s conversion.Scope) error {
+ out.Path = in.Path
+ out.FieldRef = (*api.ObjectFieldSelector)(unsafe.Pointer(in.FieldRef))
+ out.ResourceFieldRef = (*api.ResourceFieldSelector)(unsafe.Pointer(in.ResourceFieldRef))
+ out.Mode = (*int32)(unsafe.Pointer(in.Mode))
+ return nil
+}
+
+// Convert_v1_DownwardAPIVolumeFile_To_api_DownwardAPIVolumeFile is an autogenerated conversion function.
+func Convert_v1_DownwardAPIVolumeFile_To_api_DownwardAPIVolumeFile(in *DownwardAPIVolumeFile, out *api.DownwardAPIVolumeFile, s conversion.Scope) error {
+ return autoConvert_v1_DownwardAPIVolumeFile_To_api_DownwardAPIVolumeFile(in, out, s)
+}
+
+func autoConvert_api_DownwardAPIVolumeFile_To_v1_DownwardAPIVolumeFile(in *api.DownwardAPIVolumeFile, out *DownwardAPIVolumeFile, s conversion.Scope) error {
+ out.Path = in.Path
+ out.FieldRef = (*ObjectFieldSelector)(unsafe.Pointer(in.FieldRef))
+ out.ResourceFieldRef = (*ResourceFieldSelector)(unsafe.Pointer(in.ResourceFieldRef))
+ out.Mode = (*int32)(unsafe.Pointer(in.Mode))
+ return nil
+}
+
+// Convert_api_DownwardAPIVolumeFile_To_v1_DownwardAPIVolumeFile is an autogenerated conversion function.
+func Convert_api_DownwardAPIVolumeFile_To_v1_DownwardAPIVolumeFile(in *api.DownwardAPIVolumeFile, out *DownwardAPIVolumeFile, s conversion.Scope) error {
+ return autoConvert_api_DownwardAPIVolumeFile_To_v1_DownwardAPIVolumeFile(in, out, s)
+}
+
+func autoConvert_v1_DownwardAPIVolumeSource_To_api_DownwardAPIVolumeSource(in *DownwardAPIVolumeSource, out *api.DownwardAPIVolumeSource, s conversion.Scope) error {
+ out.Items = *(*[]api.DownwardAPIVolumeFile)(unsafe.Pointer(&in.Items))
+ out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode))
+ return nil
+}
+
+// Convert_v1_DownwardAPIVolumeSource_To_api_DownwardAPIVolumeSource is an autogenerated conversion function.
+func Convert_v1_DownwardAPIVolumeSource_To_api_DownwardAPIVolumeSource(in *DownwardAPIVolumeSource, out *api.DownwardAPIVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_DownwardAPIVolumeSource_To_api_DownwardAPIVolumeSource(in, out, s)
+}
+
+func autoConvert_api_DownwardAPIVolumeSource_To_v1_DownwardAPIVolumeSource(in *api.DownwardAPIVolumeSource, out *DownwardAPIVolumeSource, s conversion.Scope) error {
+ out.Items = *(*[]DownwardAPIVolumeFile)(unsafe.Pointer(&in.Items))
+ out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode))
+ return nil
+}
+
+// Convert_api_DownwardAPIVolumeSource_To_v1_DownwardAPIVolumeSource is an autogenerated conversion function.
+func Convert_api_DownwardAPIVolumeSource_To_v1_DownwardAPIVolumeSource(in *api.DownwardAPIVolumeSource, out *DownwardAPIVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_DownwardAPIVolumeSource_To_v1_DownwardAPIVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_EmptyDirVolumeSource_To_api_EmptyDirVolumeSource(in *EmptyDirVolumeSource, out *api.EmptyDirVolumeSource, s conversion.Scope) error {
+ out.Medium = api.StorageMedium(in.Medium)
+ out.SizeLimit = in.SizeLimit
+ return nil
+}
+
+// Convert_v1_EmptyDirVolumeSource_To_api_EmptyDirVolumeSource is an autogenerated conversion function.
+func Convert_v1_EmptyDirVolumeSource_To_api_EmptyDirVolumeSource(in *EmptyDirVolumeSource, out *api.EmptyDirVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_EmptyDirVolumeSource_To_api_EmptyDirVolumeSource(in, out, s)
+}
+
+func autoConvert_api_EmptyDirVolumeSource_To_v1_EmptyDirVolumeSource(in *api.EmptyDirVolumeSource, out *EmptyDirVolumeSource, s conversion.Scope) error {
+ out.Medium = StorageMedium(in.Medium)
+ out.SizeLimit = in.SizeLimit
+ return nil
+}
+
+// Convert_api_EmptyDirVolumeSource_To_v1_EmptyDirVolumeSource is an autogenerated conversion function.
+func Convert_api_EmptyDirVolumeSource_To_v1_EmptyDirVolumeSource(in *api.EmptyDirVolumeSource, out *EmptyDirVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_EmptyDirVolumeSource_To_v1_EmptyDirVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_EndpointAddress_To_api_EndpointAddress(in *EndpointAddress, out *api.EndpointAddress, s conversion.Scope) error {
+ out.IP = in.IP
+ out.Hostname = in.Hostname
+ out.NodeName = (*string)(unsafe.Pointer(in.NodeName))
+ out.TargetRef = (*api.ObjectReference)(unsafe.Pointer(in.TargetRef))
+ return nil
+}
+
+// Convert_v1_EndpointAddress_To_api_EndpointAddress is an autogenerated conversion function.
+func Convert_v1_EndpointAddress_To_api_EndpointAddress(in *EndpointAddress, out *api.EndpointAddress, s conversion.Scope) error {
+ return autoConvert_v1_EndpointAddress_To_api_EndpointAddress(in, out, s)
+}
+
+func autoConvert_api_EndpointAddress_To_v1_EndpointAddress(in *api.EndpointAddress, out *EndpointAddress, s conversion.Scope) error {
+ out.IP = in.IP
+ out.Hostname = in.Hostname
+ out.NodeName = (*string)(unsafe.Pointer(in.NodeName))
+ out.TargetRef = (*ObjectReference)(unsafe.Pointer(in.TargetRef))
+ return nil
+}
+
+// Convert_api_EndpointAddress_To_v1_EndpointAddress is an autogenerated conversion function.
+func Convert_api_EndpointAddress_To_v1_EndpointAddress(in *api.EndpointAddress, out *EndpointAddress, s conversion.Scope) error {
+ return autoConvert_api_EndpointAddress_To_v1_EndpointAddress(in, out, s)
+}
+
+func autoConvert_v1_EndpointPort_To_api_EndpointPort(in *EndpointPort, out *api.EndpointPort, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Port = in.Port
+ out.Protocol = api.Protocol(in.Protocol)
+ return nil
+}
+
+// Convert_v1_EndpointPort_To_api_EndpointPort is an autogenerated conversion function.
+func Convert_v1_EndpointPort_To_api_EndpointPort(in *EndpointPort, out *api.EndpointPort, s conversion.Scope) error {
+ return autoConvert_v1_EndpointPort_To_api_EndpointPort(in, out, s)
+}
+
+func autoConvert_api_EndpointPort_To_v1_EndpointPort(in *api.EndpointPort, out *EndpointPort, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Port = in.Port
+ out.Protocol = Protocol(in.Protocol)
+ return nil
+}
+
+// Convert_api_EndpointPort_To_v1_EndpointPort is an autogenerated conversion function.
+func Convert_api_EndpointPort_To_v1_EndpointPort(in *api.EndpointPort, out *EndpointPort, s conversion.Scope) error {
+ return autoConvert_api_EndpointPort_To_v1_EndpointPort(in, out, s)
+}
+
+func autoConvert_v1_EndpointSubset_To_api_EndpointSubset(in *EndpointSubset, out *api.EndpointSubset, s conversion.Scope) error {
+ out.Addresses = *(*[]api.EndpointAddress)(unsafe.Pointer(&in.Addresses))
+ out.NotReadyAddresses = *(*[]api.EndpointAddress)(unsafe.Pointer(&in.NotReadyAddresses))
+ out.Ports = *(*[]api.EndpointPort)(unsafe.Pointer(&in.Ports))
+ return nil
+}
+
+// Convert_v1_EndpointSubset_To_api_EndpointSubset is an autogenerated conversion function.
+func Convert_v1_EndpointSubset_To_api_EndpointSubset(in *EndpointSubset, out *api.EndpointSubset, s conversion.Scope) error {
+ return autoConvert_v1_EndpointSubset_To_api_EndpointSubset(in, out, s)
+}
+
+func autoConvert_api_EndpointSubset_To_v1_EndpointSubset(in *api.EndpointSubset, out *EndpointSubset, s conversion.Scope) error {
+ out.Addresses = *(*[]EndpointAddress)(unsafe.Pointer(&in.Addresses))
+ out.NotReadyAddresses = *(*[]EndpointAddress)(unsafe.Pointer(&in.NotReadyAddresses))
+ out.Ports = *(*[]EndpointPort)(unsafe.Pointer(&in.Ports))
+ return nil
+}
+
+// Convert_api_EndpointSubset_To_v1_EndpointSubset is an autogenerated conversion function.
+func Convert_api_EndpointSubset_To_v1_EndpointSubset(in *api.EndpointSubset, out *EndpointSubset, s conversion.Scope) error {
+ return autoConvert_api_EndpointSubset_To_v1_EndpointSubset(in, out, s)
+}
+
+func autoConvert_v1_Endpoints_To_api_Endpoints(in *Endpoints, out *api.Endpoints, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Subsets = *(*[]api.EndpointSubset)(unsafe.Pointer(&in.Subsets))
+ return nil
+}
+
+// Convert_v1_Endpoints_To_api_Endpoints is an autogenerated conversion function.
+func Convert_v1_Endpoints_To_api_Endpoints(in *Endpoints, out *api.Endpoints, s conversion.Scope) error {
+ return autoConvert_v1_Endpoints_To_api_Endpoints(in, out, s)
+}
+
+func autoConvert_api_Endpoints_To_v1_Endpoints(in *api.Endpoints, out *Endpoints, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if in.Subsets == nil {
+ out.Subsets = make([]EndpointSubset, 0)
+ } else {
+ out.Subsets = *(*[]EndpointSubset)(unsafe.Pointer(&in.Subsets))
+ }
+ return nil
+}
+
+// Convert_api_Endpoints_To_v1_Endpoints is an autogenerated conversion function.
+func Convert_api_Endpoints_To_v1_Endpoints(in *api.Endpoints, out *Endpoints, s conversion.Scope) error {
+ return autoConvert_api_Endpoints_To_v1_Endpoints(in, out, s)
+}
+
+func autoConvert_v1_EndpointsList_To_api_EndpointsList(in *EndpointsList, out *api.EndpointsList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]api.Endpoints)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1_EndpointsList_To_api_EndpointsList is an autogenerated conversion function.
+func Convert_v1_EndpointsList_To_api_EndpointsList(in *EndpointsList, out *api.EndpointsList, s conversion.Scope) error {
+ return autoConvert_v1_EndpointsList_To_api_EndpointsList(in, out, s)
+}
+
+func autoConvert_api_EndpointsList_To_v1_EndpointsList(in *api.EndpointsList, out *EndpointsList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]Endpoints, 0)
+ } else {
+ out.Items = *(*[]Endpoints)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_api_EndpointsList_To_v1_EndpointsList is an autogenerated conversion function.
+func Convert_api_EndpointsList_To_v1_EndpointsList(in *api.EndpointsList, out *EndpointsList, s conversion.Scope) error {
+ return autoConvert_api_EndpointsList_To_v1_EndpointsList(in, out, s)
+}
+
+func autoConvert_v1_EnvFromSource_To_api_EnvFromSource(in *EnvFromSource, out *api.EnvFromSource, s conversion.Scope) error {
+ out.Prefix = in.Prefix
+ out.ConfigMapRef = (*api.ConfigMapEnvSource)(unsafe.Pointer(in.ConfigMapRef))
+ out.SecretRef = (*api.SecretEnvSource)(unsafe.Pointer(in.SecretRef))
+ return nil
+}
+
+// Convert_v1_EnvFromSource_To_api_EnvFromSource is an autogenerated conversion function.
+func Convert_v1_EnvFromSource_To_api_EnvFromSource(in *EnvFromSource, out *api.EnvFromSource, s conversion.Scope) error {
+ return autoConvert_v1_EnvFromSource_To_api_EnvFromSource(in, out, s)
+}
+
+func autoConvert_api_EnvFromSource_To_v1_EnvFromSource(in *api.EnvFromSource, out *EnvFromSource, s conversion.Scope) error {
+ out.Prefix = in.Prefix
+ out.ConfigMapRef = (*ConfigMapEnvSource)(unsafe.Pointer(in.ConfigMapRef))
+ out.SecretRef = (*SecretEnvSource)(unsafe.Pointer(in.SecretRef))
+ return nil
+}
+
+// Convert_api_EnvFromSource_To_v1_EnvFromSource is an autogenerated conversion function.
+func Convert_api_EnvFromSource_To_v1_EnvFromSource(in *api.EnvFromSource, out *EnvFromSource, s conversion.Scope) error {
+ return autoConvert_api_EnvFromSource_To_v1_EnvFromSource(in, out, s)
+}
+
+func autoConvert_v1_EnvVar_To_api_EnvVar(in *EnvVar, out *api.EnvVar, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Value = in.Value
+ out.ValueFrom = (*api.EnvVarSource)(unsafe.Pointer(in.ValueFrom))
+ return nil
+}
+
+// Convert_v1_EnvVar_To_api_EnvVar is an autogenerated conversion function.
+func Convert_v1_EnvVar_To_api_EnvVar(in *EnvVar, out *api.EnvVar, s conversion.Scope) error {
+ return autoConvert_v1_EnvVar_To_api_EnvVar(in, out, s)
+}
+
+func autoConvert_api_EnvVar_To_v1_EnvVar(in *api.EnvVar, out *EnvVar, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Value = in.Value
+ out.ValueFrom = (*EnvVarSource)(unsafe.Pointer(in.ValueFrom))
+ return nil
+}
+
+// Convert_api_EnvVar_To_v1_EnvVar is an autogenerated conversion function.
+func Convert_api_EnvVar_To_v1_EnvVar(in *api.EnvVar, out *EnvVar, s conversion.Scope) error {
+ return autoConvert_api_EnvVar_To_v1_EnvVar(in, out, s)
+}
+
+func autoConvert_v1_EnvVarSource_To_api_EnvVarSource(in *EnvVarSource, out *api.EnvVarSource, s conversion.Scope) error {
+ out.FieldRef = (*api.ObjectFieldSelector)(unsafe.Pointer(in.FieldRef))
+ out.ResourceFieldRef = (*api.ResourceFieldSelector)(unsafe.Pointer(in.ResourceFieldRef))
+ out.ConfigMapKeyRef = (*api.ConfigMapKeySelector)(unsafe.Pointer(in.ConfigMapKeyRef))
+ out.SecretKeyRef = (*api.SecretKeySelector)(unsafe.Pointer(in.SecretKeyRef))
+ return nil
+}
+
+// Convert_v1_EnvVarSource_To_api_EnvVarSource is an autogenerated conversion function.
+func Convert_v1_EnvVarSource_To_api_EnvVarSource(in *EnvVarSource, out *api.EnvVarSource, s conversion.Scope) error {
+ return autoConvert_v1_EnvVarSource_To_api_EnvVarSource(in, out, s)
+}
+
+func autoConvert_api_EnvVarSource_To_v1_EnvVarSource(in *api.EnvVarSource, out *EnvVarSource, s conversion.Scope) error {
+ out.FieldRef = (*ObjectFieldSelector)(unsafe.Pointer(in.FieldRef))
+ out.ResourceFieldRef = (*ResourceFieldSelector)(unsafe.Pointer(in.ResourceFieldRef))
+ out.ConfigMapKeyRef = (*ConfigMapKeySelector)(unsafe.Pointer(in.ConfigMapKeyRef))
+ out.SecretKeyRef = (*SecretKeySelector)(unsafe.Pointer(in.SecretKeyRef))
+ return nil
+}
+
+// Convert_api_EnvVarSource_To_v1_EnvVarSource is an autogenerated conversion function.
+func Convert_api_EnvVarSource_To_v1_EnvVarSource(in *api.EnvVarSource, out *EnvVarSource, s conversion.Scope) error {
+ return autoConvert_api_EnvVarSource_To_v1_EnvVarSource(in, out, s)
+}
+
+func autoConvert_v1_Event_To_api_Event(in *Event, out *api.Event, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_ObjectReference_To_api_ObjectReference(&in.InvolvedObject, &out.InvolvedObject, s); err != nil {
+ return err
+ }
+ out.Reason = in.Reason
+ out.Message = in.Message
+ if err := Convert_v1_EventSource_To_api_EventSource(&in.Source, &out.Source, s); err != nil {
+ return err
+ }
+ out.FirstTimestamp = in.FirstTimestamp
+ out.LastTimestamp = in.LastTimestamp
+ out.Count = in.Count
+ out.Type = in.Type
+ return nil
+}
+
+// Convert_v1_Event_To_api_Event is an autogenerated conversion function.
+func Convert_v1_Event_To_api_Event(in *Event, out *api.Event, s conversion.Scope) error {
+ return autoConvert_v1_Event_To_api_Event(in, out, s)
+}
+
+func autoConvert_api_Event_To_v1_Event(in *api.Event, out *Event, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_api_ObjectReference_To_v1_ObjectReference(&in.InvolvedObject, &out.InvolvedObject, s); err != nil {
+ return err
+ }
+ out.Reason = in.Reason
+ out.Message = in.Message
+ if err := Convert_api_EventSource_To_v1_EventSource(&in.Source, &out.Source, s); err != nil {
+ return err
+ }
+ out.FirstTimestamp = in.FirstTimestamp
+ out.LastTimestamp = in.LastTimestamp
+ out.Count = in.Count
+ out.Type = in.Type
+ return nil
+}
+
+// Convert_api_Event_To_v1_Event is an autogenerated conversion function.
+func Convert_api_Event_To_v1_Event(in *api.Event, out *Event, s conversion.Scope) error {
+ return autoConvert_api_Event_To_v1_Event(in, out, s)
+}
+
+func autoConvert_v1_EventList_To_api_EventList(in *EventList, out *api.EventList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]api.Event)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1_EventList_To_api_EventList is an autogenerated conversion function.
+func Convert_v1_EventList_To_api_EventList(in *EventList, out *api.EventList, s conversion.Scope) error {
+ return autoConvert_v1_EventList_To_api_EventList(in, out, s)
+}
+
+func autoConvert_api_EventList_To_v1_EventList(in *api.EventList, out *EventList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]Event, 0)
+ } else {
+ out.Items = *(*[]Event)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_api_EventList_To_v1_EventList is an autogenerated conversion function.
+func Convert_api_EventList_To_v1_EventList(in *api.EventList, out *EventList, s conversion.Scope) error {
+ return autoConvert_api_EventList_To_v1_EventList(in, out, s)
+}
+
+func autoConvert_v1_EventSource_To_api_EventSource(in *EventSource, out *api.EventSource, s conversion.Scope) error {
+ out.Component = in.Component
+ out.Host = in.Host
+ return nil
+}
+
+// Convert_v1_EventSource_To_api_EventSource is an autogenerated conversion function.
+func Convert_v1_EventSource_To_api_EventSource(in *EventSource, out *api.EventSource, s conversion.Scope) error {
+ return autoConvert_v1_EventSource_To_api_EventSource(in, out, s)
+}
+
+func autoConvert_api_EventSource_To_v1_EventSource(in *api.EventSource, out *EventSource, s conversion.Scope) error {
+ out.Component = in.Component
+ out.Host = in.Host
+ return nil
+}
+
+// Convert_api_EventSource_To_v1_EventSource is an autogenerated conversion function.
+func Convert_api_EventSource_To_v1_EventSource(in *api.EventSource, out *EventSource, s conversion.Scope) error {
+ return autoConvert_api_EventSource_To_v1_EventSource(in, out, s)
+}
+
+func autoConvert_v1_ExecAction_To_api_ExecAction(in *ExecAction, out *api.ExecAction, s conversion.Scope) error {
+ out.Command = *(*[]string)(unsafe.Pointer(&in.Command))
+ return nil
+}
+
+// Convert_v1_ExecAction_To_api_ExecAction is an autogenerated conversion function.
+func Convert_v1_ExecAction_To_api_ExecAction(in *ExecAction, out *api.ExecAction, s conversion.Scope) error {
+ return autoConvert_v1_ExecAction_To_api_ExecAction(in, out, s)
+}
+
+func autoConvert_api_ExecAction_To_v1_ExecAction(in *api.ExecAction, out *ExecAction, s conversion.Scope) error {
+ out.Command = *(*[]string)(unsafe.Pointer(&in.Command))
+ return nil
+}
+
+// Convert_api_ExecAction_To_v1_ExecAction is an autogenerated conversion function.
+func Convert_api_ExecAction_To_v1_ExecAction(in *api.ExecAction, out *ExecAction, s conversion.Scope) error {
+ return autoConvert_api_ExecAction_To_v1_ExecAction(in, out, s)
+}
+
+func autoConvert_v1_FCVolumeSource_To_api_FCVolumeSource(in *FCVolumeSource, out *api.FCVolumeSource, s conversion.Scope) error {
+ out.TargetWWNs = *(*[]string)(unsafe.Pointer(&in.TargetWWNs))
+ out.Lun = (*int32)(unsafe.Pointer(in.Lun))
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_v1_FCVolumeSource_To_api_FCVolumeSource is an autogenerated conversion function.
+func Convert_v1_FCVolumeSource_To_api_FCVolumeSource(in *FCVolumeSource, out *api.FCVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_FCVolumeSource_To_api_FCVolumeSource(in, out, s)
+}
+
+func autoConvert_api_FCVolumeSource_To_v1_FCVolumeSource(in *api.FCVolumeSource, out *FCVolumeSource, s conversion.Scope) error {
+ if in.TargetWWNs == nil {
+ out.TargetWWNs = make([]string, 0)
+ } else {
+ out.TargetWWNs = *(*[]string)(unsafe.Pointer(&in.TargetWWNs))
+ }
+ out.Lun = (*int32)(unsafe.Pointer(in.Lun))
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_api_FCVolumeSource_To_v1_FCVolumeSource is an autogenerated conversion function.
+func Convert_api_FCVolumeSource_To_v1_FCVolumeSource(in *api.FCVolumeSource, out *FCVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_FCVolumeSource_To_v1_FCVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_FlexVolumeSource_To_api_FlexVolumeSource(in *FlexVolumeSource, out *api.FlexVolumeSource, s conversion.Scope) error {
+ out.Driver = in.Driver
+ out.FSType = in.FSType
+ out.SecretRef = (*api.LocalObjectReference)(unsafe.Pointer(in.SecretRef))
+ out.ReadOnly = in.ReadOnly
+ out.Options = *(*map[string]string)(unsafe.Pointer(&in.Options))
+ return nil
+}
+
+// Convert_v1_FlexVolumeSource_To_api_FlexVolumeSource is an autogenerated conversion function.
+func Convert_v1_FlexVolumeSource_To_api_FlexVolumeSource(in *FlexVolumeSource, out *api.FlexVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_FlexVolumeSource_To_api_FlexVolumeSource(in, out, s)
+}
+
+func autoConvert_api_FlexVolumeSource_To_v1_FlexVolumeSource(in *api.FlexVolumeSource, out *FlexVolumeSource, s conversion.Scope) error {
+ out.Driver = in.Driver
+ out.FSType = in.FSType
+ out.SecretRef = (*LocalObjectReference)(unsafe.Pointer(in.SecretRef))
+ out.ReadOnly = in.ReadOnly
+ out.Options = *(*map[string]string)(unsafe.Pointer(&in.Options))
+ return nil
+}
+
+// Convert_api_FlexVolumeSource_To_v1_FlexVolumeSource is an autogenerated conversion function.
+func Convert_api_FlexVolumeSource_To_v1_FlexVolumeSource(in *api.FlexVolumeSource, out *FlexVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_FlexVolumeSource_To_v1_FlexVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_FlockerVolumeSource_To_api_FlockerVolumeSource(in *FlockerVolumeSource, out *api.FlockerVolumeSource, s conversion.Scope) error {
+ out.DatasetName = in.DatasetName
+ out.DatasetUUID = in.DatasetUUID
+ return nil
+}
+
+// Convert_v1_FlockerVolumeSource_To_api_FlockerVolumeSource is an autogenerated conversion function.
+func Convert_v1_FlockerVolumeSource_To_api_FlockerVolumeSource(in *FlockerVolumeSource, out *api.FlockerVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_FlockerVolumeSource_To_api_FlockerVolumeSource(in, out, s)
+}
+
+func autoConvert_api_FlockerVolumeSource_To_v1_FlockerVolumeSource(in *api.FlockerVolumeSource, out *FlockerVolumeSource, s conversion.Scope) error {
+ out.DatasetName = in.DatasetName
+ out.DatasetUUID = in.DatasetUUID
+ return nil
+}
+
+// Convert_api_FlockerVolumeSource_To_v1_FlockerVolumeSource is an autogenerated conversion function.
+func Convert_api_FlockerVolumeSource_To_v1_FlockerVolumeSource(in *api.FlockerVolumeSource, out *FlockerVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_FlockerVolumeSource_To_v1_FlockerVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_GCEPersistentDiskVolumeSource_To_api_GCEPersistentDiskVolumeSource(in *GCEPersistentDiskVolumeSource, out *api.GCEPersistentDiskVolumeSource, s conversion.Scope) error {
+ out.PDName = in.PDName
+ out.FSType = in.FSType
+ out.Partition = in.Partition
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_v1_GCEPersistentDiskVolumeSource_To_api_GCEPersistentDiskVolumeSource is an autogenerated conversion function.
+func Convert_v1_GCEPersistentDiskVolumeSource_To_api_GCEPersistentDiskVolumeSource(in *GCEPersistentDiskVolumeSource, out *api.GCEPersistentDiskVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_GCEPersistentDiskVolumeSource_To_api_GCEPersistentDiskVolumeSource(in, out, s)
+}
+
+func autoConvert_api_GCEPersistentDiskVolumeSource_To_v1_GCEPersistentDiskVolumeSource(in *api.GCEPersistentDiskVolumeSource, out *GCEPersistentDiskVolumeSource, s conversion.Scope) error {
+ out.PDName = in.PDName
+ out.FSType = in.FSType
+ out.Partition = in.Partition
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_api_GCEPersistentDiskVolumeSource_To_v1_GCEPersistentDiskVolumeSource is an autogenerated conversion function.
+func Convert_api_GCEPersistentDiskVolumeSource_To_v1_GCEPersistentDiskVolumeSource(in *api.GCEPersistentDiskVolumeSource, out *GCEPersistentDiskVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_GCEPersistentDiskVolumeSource_To_v1_GCEPersistentDiskVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_GitRepoVolumeSource_To_api_GitRepoVolumeSource(in *GitRepoVolumeSource, out *api.GitRepoVolumeSource, s conversion.Scope) error {
+ out.Repository = in.Repository
+ out.Revision = in.Revision
+ out.Directory = in.Directory
+ return nil
+}
+
+// Convert_v1_GitRepoVolumeSource_To_api_GitRepoVolumeSource is an autogenerated conversion function.
+func Convert_v1_GitRepoVolumeSource_To_api_GitRepoVolumeSource(in *GitRepoVolumeSource, out *api.GitRepoVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_GitRepoVolumeSource_To_api_GitRepoVolumeSource(in, out, s)
+}
+
+func autoConvert_api_GitRepoVolumeSource_To_v1_GitRepoVolumeSource(in *api.GitRepoVolumeSource, out *GitRepoVolumeSource, s conversion.Scope) error {
+ out.Repository = in.Repository
+ out.Revision = in.Revision
+ out.Directory = in.Directory
+ return nil
+}
+
+// Convert_api_GitRepoVolumeSource_To_v1_GitRepoVolumeSource is an autogenerated conversion function.
+func Convert_api_GitRepoVolumeSource_To_v1_GitRepoVolumeSource(in *api.GitRepoVolumeSource, out *GitRepoVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_GitRepoVolumeSource_To_v1_GitRepoVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_GlusterfsVolumeSource_To_api_GlusterfsVolumeSource(in *GlusterfsVolumeSource, out *api.GlusterfsVolumeSource, s conversion.Scope) error {
+ out.EndpointsName = in.EndpointsName
+ out.Path = in.Path
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_v1_GlusterfsVolumeSource_To_api_GlusterfsVolumeSource is an autogenerated conversion function.
+func Convert_v1_GlusterfsVolumeSource_To_api_GlusterfsVolumeSource(in *GlusterfsVolumeSource, out *api.GlusterfsVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_GlusterfsVolumeSource_To_api_GlusterfsVolumeSource(in, out, s)
+}
+
+func autoConvert_api_GlusterfsVolumeSource_To_v1_GlusterfsVolumeSource(in *api.GlusterfsVolumeSource, out *GlusterfsVolumeSource, s conversion.Scope) error {
+ out.EndpointsName = in.EndpointsName
+ out.Path = in.Path
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_api_GlusterfsVolumeSource_To_v1_GlusterfsVolumeSource is an autogenerated conversion function.
+func Convert_api_GlusterfsVolumeSource_To_v1_GlusterfsVolumeSource(in *api.GlusterfsVolumeSource, out *GlusterfsVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_GlusterfsVolumeSource_To_v1_GlusterfsVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_HTTPGetAction_To_api_HTTPGetAction(in *HTTPGetAction, out *api.HTTPGetAction, s conversion.Scope) error {
+ out.Path = in.Path
+ out.Port = in.Port
+ out.Host = in.Host
+ out.Scheme = api.URIScheme(in.Scheme)
+ out.HTTPHeaders = *(*[]api.HTTPHeader)(unsafe.Pointer(&in.HTTPHeaders))
+ return nil
+}
+
+// Convert_v1_HTTPGetAction_To_api_HTTPGetAction is an autogenerated conversion function.
+func Convert_v1_HTTPGetAction_To_api_HTTPGetAction(in *HTTPGetAction, out *api.HTTPGetAction, s conversion.Scope) error {
+ return autoConvert_v1_HTTPGetAction_To_api_HTTPGetAction(in, out, s)
+}
+
+func autoConvert_api_HTTPGetAction_To_v1_HTTPGetAction(in *api.HTTPGetAction, out *HTTPGetAction, s conversion.Scope) error {
+ out.Path = in.Path
+ out.Port = in.Port
+ out.Host = in.Host
+ out.Scheme = URIScheme(in.Scheme)
+ out.HTTPHeaders = *(*[]HTTPHeader)(unsafe.Pointer(&in.HTTPHeaders))
+ return nil
+}
+
+// Convert_api_HTTPGetAction_To_v1_HTTPGetAction is an autogenerated conversion function.
+func Convert_api_HTTPGetAction_To_v1_HTTPGetAction(in *api.HTTPGetAction, out *HTTPGetAction, s conversion.Scope) error {
+ return autoConvert_api_HTTPGetAction_To_v1_HTTPGetAction(in, out, s)
+}
+
+func autoConvert_v1_HTTPHeader_To_api_HTTPHeader(in *HTTPHeader, out *api.HTTPHeader, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Value = in.Value
+ return nil
+}
+
+// Convert_v1_HTTPHeader_To_api_HTTPHeader is an autogenerated conversion function.
+func Convert_v1_HTTPHeader_To_api_HTTPHeader(in *HTTPHeader, out *api.HTTPHeader, s conversion.Scope) error {
+ return autoConvert_v1_HTTPHeader_To_api_HTTPHeader(in, out, s)
+}
+
+func autoConvert_api_HTTPHeader_To_v1_HTTPHeader(in *api.HTTPHeader, out *HTTPHeader, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Value = in.Value
+ return nil
+}
+
+// Convert_api_HTTPHeader_To_v1_HTTPHeader is an autogenerated conversion function.
+func Convert_api_HTTPHeader_To_v1_HTTPHeader(in *api.HTTPHeader, out *HTTPHeader, s conversion.Scope) error {
+ return autoConvert_api_HTTPHeader_To_v1_HTTPHeader(in, out, s)
+}
+
+func autoConvert_v1_Handler_To_api_Handler(in *Handler, out *api.Handler, s conversion.Scope) error {
+ out.Exec = (*api.ExecAction)(unsafe.Pointer(in.Exec))
+ out.HTTPGet = (*api.HTTPGetAction)(unsafe.Pointer(in.HTTPGet))
+ out.TCPSocket = (*api.TCPSocketAction)(unsafe.Pointer(in.TCPSocket))
+ return nil
+}
+
+// Convert_v1_Handler_To_api_Handler is an autogenerated conversion function.
+func Convert_v1_Handler_To_api_Handler(in *Handler, out *api.Handler, s conversion.Scope) error {
+ return autoConvert_v1_Handler_To_api_Handler(in, out, s)
+}
+
+func autoConvert_api_Handler_To_v1_Handler(in *api.Handler, out *Handler, s conversion.Scope) error {
+ out.Exec = (*ExecAction)(unsafe.Pointer(in.Exec))
+ out.HTTPGet = (*HTTPGetAction)(unsafe.Pointer(in.HTTPGet))
+ out.TCPSocket = (*TCPSocketAction)(unsafe.Pointer(in.TCPSocket))
+ return nil
+}
+
+// Convert_api_Handler_To_v1_Handler is an autogenerated conversion function.
+func Convert_api_Handler_To_v1_Handler(in *api.Handler, out *Handler, s conversion.Scope) error {
+ return autoConvert_api_Handler_To_v1_Handler(in, out, s)
+}
+
+func autoConvert_v1_HostAlias_To_api_HostAlias(in *HostAlias, out *api.HostAlias, s conversion.Scope) error {
+ out.IP = in.IP
+ out.Hostnames = *(*[]string)(unsafe.Pointer(&in.Hostnames))
+ return nil
+}
+
+// Convert_v1_HostAlias_To_api_HostAlias is an autogenerated conversion function.
+func Convert_v1_HostAlias_To_api_HostAlias(in *HostAlias, out *api.HostAlias, s conversion.Scope) error {
+ return autoConvert_v1_HostAlias_To_api_HostAlias(in, out, s)
+}
+
+func autoConvert_api_HostAlias_To_v1_HostAlias(in *api.HostAlias, out *HostAlias, s conversion.Scope) error {
+ out.IP = in.IP
+ out.Hostnames = *(*[]string)(unsafe.Pointer(&in.Hostnames))
+ return nil
+}
+
+// Convert_api_HostAlias_To_v1_HostAlias is an autogenerated conversion function.
+func Convert_api_HostAlias_To_v1_HostAlias(in *api.HostAlias, out *HostAlias, s conversion.Scope) error {
+ return autoConvert_api_HostAlias_To_v1_HostAlias(in, out, s)
+}
+
+func autoConvert_v1_HostPathVolumeSource_To_api_HostPathVolumeSource(in *HostPathVolumeSource, out *api.HostPathVolumeSource, s conversion.Scope) error {
+ out.Path = in.Path
+ return nil
+}
+
+// Convert_v1_HostPathVolumeSource_To_api_HostPathVolumeSource is an autogenerated conversion function.
+func Convert_v1_HostPathVolumeSource_To_api_HostPathVolumeSource(in *HostPathVolumeSource, out *api.HostPathVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_HostPathVolumeSource_To_api_HostPathVolumeSource(in, out, s)
+}
+
+func autoConvert_api_HostPathVolumeSource_To_v1_HostPathVolumeSource(in *api.HostPathVolumeSource, out *HostPathVolumeSource, s conversion.Scope) error {
+ out.Path = in.Path
+ return nil
+}
+
+// Convert_api_HostPathVolumeSource_To_v1_HostPathVolumeSource is an autogenerated conversion function.
+func Convert_api_HostPathVolumeSource_To_v1_HostPathVolumeSource(in *api.HostPathVolumeSource, out *HostPathVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_HostPathVolumeSource_To_v1_HostPathVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_ISCSIVolumeSource_To_api_ISCSIVolumeSource(in *ISCSIVolumeSource, out *api.ISCSIVolumeSource, s conversion.Scope) error {
+ out.TargetPortal = in.TargetPortal
+ out.IQN = in.IQN
+ out.Lun = in.Lun
+ out.ISCSIInterface = in.ISCSIInterface
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ out.Portals = *(*[]string)(unsafe.Pointer(&in.Portals))
+ out.DiscoveryCHAPAuth = in.DiscoveryCHAPAuth
+ out.SessionCHAPAuth = in.SessionCHAPAuth
+ out.SecretRef = (*api.LocalObjectReference)(unsafe.Pointer(in.SecretRef))
+ return nil
+}
+
+// Convert_v1_ISCSIVolumeSource_To_api_ISCSIVolumeSource is an autogenerated conversion function.
+func Convert_v1_ISCSIVolumeSource_To_api_ISCSIVolumeSource(in *ISCSIVolumeSource, out *api.ISCSIVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_ISCSIVolumeSource_To_api_ISCSIVolumeSource(in, out, s)
+}
+
+func autoConvert_api_ISCSIVolumeSource_To_v1_ISCSIVolumeSource(in *api.ISCSIVolumeSource, out *ISCSIVolumeSource, s conversion.Scope) error {
+ out.TargetPortal = in.TargetPortal
+ out.IQN = in.IQN
+ out.Lun = in.Lun
+ out.ISCSIInterface = in.ISCSIInterface
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ out.Portals = *(*[]string)(unsafe.Pointer(&in.Portals))
+ out.DiscoveryCHAPAuth = in.DiscoveryCHAPAuth
+ out.SessionCHAPAuth = in.SessionCHAPAuth
+ out.SecretRef = (*LocalObjectReference)(unsafe.Pointer(in.SecretRef))
+ return nil
+}
+
+// Convert_api_ISCSIVolumeSource_To_v1_ISCSIVolumeSource is an autogenerated conversion function.
+func Convert_api_ISCSIVolumeSource_To_v1_ISCSIVolumeSource(in *api.ISCSIVolumeSource, out *ISCSIVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_ISCSIVolumeSource_To_v1_ISCSIVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_KeyToPath_To_api_KeyToPath(in *KeyToPath, out *api.KeyToPath, s conversion.Scope) error {
+ out.Key = in.Key
+ out.Path = in.Path
+ out.Mode = (*int32)(unsafe.Pointer(in.Mode))
+ return nil
+}
+
+// Convert_v1_KeyToPath_To_api_KeyToPath is an autogenerated conversion function.
+func Convert_v1_KeyToPath_To_api_KeyToPath(in *KeyToPath, out *api.KeyToPath, s conversion.Scope) error {
+ return autoConvert_v1_KeyToPath_To_api_KeyToPath(in, out, s)
+}
+
+func autoConvert_api_KeyToPath_To_v1_KeyToPath(in *api.KeyToPath, out *KeyToPath, s conversion.Scope) error {
+ out.Key = in.Key
+ out.Path = in.Path
+ out.Mode = (*int32)(unsafe.Pointer(in.Mode))
+ return nil
+}
+
+// Convert_api_KeyToPath_To_v1_KeyToPath is an autogenerated conversion function.
+func Convert_api_KeyToPath_To_v1_KeyToPath(in *api.KeyToPath, out *KeyToPath, s conversion.Scope) error {
+ return autoConvert_api_KeyToPath_To_v1_KeyToPath(in, out, s)
+}
+
+func autoConvert_v1_Lifecycle_To_api_Lifecycle(in *Lifecycle, out *api.Lifecycle, s conversion.Scope) error {
+ out.PostStart = (*api.Handler)(unsafe.Pointer(in.PostStart))
+ out.PreStop = (*api.Handler)(unsafe.Pointer(in.PreStop))
+ return nil
+}
+
+// Convert_v1_Lifecycle_To_api_Lifecycle is an autogenerated conversion function.
+func Convert_v1_Lifecycle_To_api_Lifecycle(in *Lifecycle, out *api.Lifecycle, s conversion.Scope) error {
+ return autoConvert_v1_Lifecycle_To_api_Lifecycle(in, out, s)
+}
+
+func autoConvert_api_Lifecycle_To_v1_Lifecycle(in *api.Lifecycle, out *Lifecycle, s conversion.Scope) error {
+ out.PostStart = (*Handler)(unsafe.Pointer(in.PostStart))
+ out.PreStop = (*Handler)(unsafe.Pointer(in.PreStop))
+ return nil
+}
+
+// Convert_api_Lifecycle_To_v1_Lifecycle is an autogenerated conversion function.
+func Convert_api_Lifecycle_To_v1_Lifecycle(in *api.Lifecycle, out *Lifecycle, s conversion.Scope) error {
+ return autoConvert_api_Lifecycle_To_v1_Lifecycle(in, out, s)
+}
+
+func autoConvert_v1_LimitRange_To_api_LimitRange(in *LimitRange, out *api.LimitRange, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_LimitRangeSpec_To_api_LimitRangeSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_LimitRange_To_api_LimitRange is an autogenerated conversion function.
+func Convert_v1_LimitRange_To_api_LimitRange(in *LimitRange, out *api.LimitRange, s conversion.Scope) error {
+ return autoConvert_v1_LimitRange_To_api_LimitRange(in, out, s)
+}
+
+func autoConvert_api_LimitRange_To_v1_LimitRange(in *api.LimitRange, out *LimitRange, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_api_LimitRangeSpec_To_v1_LimitRangeSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_LimitRange_To_v1_LimitRange is an autogenerated conversion function.
+func Convert_api_LimitRange_To_v1_LimitRange(in *api.LimitRange, out *LimitRange, s conversion.Scope) error {
+ return autoConvert_api_LimitRange_To_v1_LimitRange(in, out, s)
+}
+
+func autoConvert_v1_LimitRangeItem_To_api_LimitRangeItem(in *LimitRangeItem, out *api.LimitRangeItem, s conversion.Scope) error {
+ out.Type = api.LimitType(in.Type)
+ out.Max = *(*api.ResourceList)(unsafe.Pointer(&in.Max))
+ out.Min = *(*api.ResourceList)(unsafe.Pointer(&in.Min))
+ out.Default = *(*api.ResourceList)(unsafe.Pointer(&in.Default))
+ out.DefaultRequest = *(*api.ResourceList)(unsafe.Pointer(&in.DefaultRequest))
+ out.MaxLimitRequestRatio = *(*api.ResourceList)(unsafe.Pointer(&in.MaxLimitRequestRatio))
+ return nil
+}
+
+// Convert_v1_LimitRangeItem_To_api_LimitRangeItem is an autogenerated conversion function.
+func Convert_v1_LimitRangeItem_To_api_LimitRangeItem(in *LimitRangeItem, out *api.LimitRangeItem, s conversion.Scope) error {
+ return autoConvert_v1_LimitRangeItem_To_api_LimitRangeItem(in, out, s)
+}
+
+func autoConvert_api_LimitRangeItem_To_v1_LimitRangeItem(in *api.LimitRangeItem, out *LimitRangeItem, s conversion.Scope) error {
+ out.Type = LimitType(in.Type)
+ out.Max = *(*ResourceList)(unsafe.Pointer(&in.Max))
+ out.Min = *(*ResourceList)(unsafe.Pointer(&in.Min))
+ out.Default = *(*ResourceList)(unsafe.Pointer(&in.Default))
+ out.DefaultRequest = *(*ResourceList)(unsafe.Pointer(&in.DefaultRequest))
+ out.MaxLimitRequestRatio = *(*ResourceList)(unsafe.Pointer(&in.MaxLimitRequestRatio))
+ return nil
+}
+
+// Convert_api_LimitRangeItem_To_v1_LimitRangeItem is an autogenerated conversion function.
+func Convert_api_LimitRangeItem_To_v1_LimitRangeItem(in *api.LimitRangeItem, out *LimitRangeItem, s conversion.Scope) error {
+ return autoConvert_api_LimitRangeItem_To_v1_LimitRangeItem(in, out, s)
+}
+
+func autoConvert_v1_LimitRangeList_To_api_LimitRangeList(in *LimitRangeList, out *api.LimitRangeList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]api.LimitRange)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1_LimitRangeList_To_api_LimitRangeList is an autogenerated conversion function.
+func Convert_v1_LimitRangeList_To_api_LimitRangeList(in *LimitRangeList, out *api.LimitRangeList, s conversion.Scope) error {
+ return autoConvert_v1_LimitRangeList_To_api_LimitRangeList(in, out, s)
+}
+
+func autoConvert_api_LimitRangeList_To_v1_LimitRangeList(in *api.LimitRangeList, out *LimitRangeList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]LimitRange, 0)
+ } else {
+ out.Items = *(*[]LimitRange)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_api_LimitRangeList_To_v1_LimitRangeList is an autogenerated conversion function.
+func Convert_api_LimitRangeList_To_v1_LimitRangeList(in *api.LimitRangeList, out *LimitRangeList, s conversion.Scope) error {
+ return autoConvert_api_LimitRangeList_To_v1_LimitRangeList(in, out, s)
+}
+
+func autoConvert_v1_LimitRangeSpec_To_api_LimitRangeSpec(in *LimitRangeSpec, out *api.LimitRangeSpec, s conversion.Scope) error {
+ out.Limits = *(*[]api.LimitRangeItem)(unsafe.Pointer(&in.Limits))
+ return nil
+}
+
+// Convert_v1_LimitRangeSpec_To_api_LimitRangeSpec is an autogenerated conversion function.
+func Convert_v1_LimitRangeSpec_To_api_LimitRangeSpec(in *LimitRangeSpec, out *api.LimitRangeSpec, s conversion.Scope) error {
+ return autoConvert_v1_LimitRangeSpec_To_api_LimitRangeSpec(in, out, s)
+}
+
+func autoConvert_api_LimitRangeSpec_To_v1_LimitRangeSpec(in *api.LimitRangeSpec, out *LimitRangeSpec, s conversion.Scope) error {
+ if in.Limits == nil {
+ out.Limits = make([]LimitRangeItem, 0)
+ } else {
+ out.Limits = *(*[]LimitRangeItem)(unsafe.Pointer(&in.Limits))
+ }
+ return nil
+}
+
+// Convert_api_LimitRangeSpec_To_v1_LimitRangeSpec is an autogenerated conversion function.
+func Convert_api_LimitRangeSpec_To_v1_LimitRangeSpec(in *api.LimitRangeSpec, out *LimitRangeSpec, s conversion.Scope) error {
+ return autoConvert_api_LimitRangeSpec_To_v1_LimitRangeSpec(in, out, s)
+}
+
+func autoConvert_v1_List_To_api_List(in *List, out *api.List, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]runtime.Object, len(*in))
+ for i := range *in {
+ if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1_List_To_api_List is an autogenerated conversion function.
+func Convert_v1_List_To_api_List(in *List, out *api.List, s conversion.Scope) error {
+ return autoConvert_v1_List_To_api_List(in, out, s)
+}
+
+func autoConvert_api_List_To_v1_List(in *api.List, out *List, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]runtime.RawExtension, len(*in))
+ for i := range *in {
+ if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]runtime.RawExtension, 0)
+ }
+ return nil
+}
+
+// Convert_api_List_To_v1_List is an autogenerated conversion function.
+func Convert_api_List_To_v1_List(in *api.List, out *List, s conversion.Scope) error {
+ return autoConvert_api_List_To_v1_List(in, out, s)
+}
+
+func autoConvert_v1_ListOptions_To_api_ListOptions(in *ListOptions, out *api.ListOptions, s conversion.Scope) error {
+ if err := meta_v1.Convert_string_To_labels_Selector(&in.LabelSelector, &out.LabelSelector, s); err != nil {
+ return err
+ }
+ if err := meta_v1.Convert_string_To_fields_Selector(&in.FieldSelector, &out.FieldSelector, s); err != nil {
+ return err
+ }
+ out.IncludeUninitialized = in.IncludeUninitialized
+ out.Watch = in.Watch
+ out.ResourceVersion = in.ResourceVersion
+ out.TimeoutSeconds = (*int64)(unsafe.Pointer(in.TimeoutSeconds))
+ return nil
+}
+
+// Convert_v1_ListOptions_To_api_ListOptions is an autogenerated conversion function.
+func Convert_v1_ListOptions_To_api_ListOptions(in *ListOptions, out *api.ListOptions, s conversion.Scope) error {
+ return autoConvert_v1_ListOptions_To_api_ListOptions(in, out, s)
+}
+
+func autoConvert_api_ListOptions_To_v1_ListOptions(in *api.ListOptions, out *ListOptions, s conversion.Scope) error {
+ if err := meta_v1.Convert_labels_Selector_To_string(&in.LabelSelector, &out.LabelSelector, s); err != nil {
+ return err
+ }
+ if err := meta_v1.Convert_fields_Selector_To_string(&in.FieldSelector, &out.FieldSelector, s); err != nil {
+ return err
+ }
+ out.IncludeUninitialized = in.IncludeUninitialized
+ out.Watch = in.Watch
+ out.ResourceVersion = in.ResourceVersion
+ out.TimeoutSeconds = (*int64)(unsafe.Pointer(in.TimeoutSeconds))
+ return nil
+}
+
+// Convert_api_ListOptions_To_v1_ListOptions is an autogenerated conversion function.
+func Convert_api_ListOptions_To_v1_ListOptions(in *api.ListOptions, out *ListOptions, s conversion.Scope) error {
+ return autoConvert_api_ListOptions_To_v1_ListOptions(in, out, s)
+}
+
+func autoConvert_v1_LoadBalancerIngress_To_api_LoadBalancerIngress(in *LoadBalancerIngress, out *api.LoadBalancerIngress, s conversion.Scope) error {
+ out.IP = in.IP
+ out.Hostname = in.Hostname
+ return nil
+}
+
+// Convert_v1_LoadBalancerIngress_To_api_LoadBalancerIngress is an autogenerated conversion function.
+func Convert_v1_LoadBalancerIngress_To_api_LoadBalancerIngress(in *LoadBalancerIngress, out *api.LoadBalancerIngress, s conversion.Scope) error {
+ return autoConvert_v1_LoadBalancerIngress_To_api_LoadBalancerIngress(in, out, s)
+}
+
+func autoConvert_api_LoadBalancerIngress_To_v1_LoadBalancerIngress(in *api.LoadBalancerIngress, out *LoadBalancerIngress, s conversion.Scope) error {
+ out.IP = in.IP
+ out.Hostname = in.Hostname
+ return nil
+}
+
+// Convert_api_LoadBalancerIngress_To_v1_LoadBalancerIngress is an autogenerated conversion function.
+func Convert_api_LoadBalancerIngress_To_v1_LoadBalancerIngress(in *api.LoadBalancerIngress, out *LoadBalancerIngress, s conversion.Scope) error {
+ return autoConvert_api_LoadBalancerIngress_To_v1_LoadBalancerIngress(in, out, s)
+}
+
+func autoConvert_v1_LoadBalancerStatus_To_api_LoadBalancerStatus(in *LoadBalancerStatus, out *api.LoadBalancerStatus, s conversion.Scope) error {
+ out.Ingress = *(*[]api.LoadBalancerIngress)(unsafe.Pointer(&in.Ingress))
+ return nil
+}
+
+// Convert_v1_LoadBalancerStatus_To_api_LoadBalancerStatus is an autogenerated conversion function.
+func Convert_v1_LoadBalancerStatus_To_api_LoadBalancerStatus(in *LoadBalancerStatus, out *api.LoadBalancerStatus, s conversion.Scope) error {
+ return autoConvert_v1_LoadBalancerStatus_To_api_LoadBalancerStatus(in, out, s)
+}
+
+func autoConvert_api_LoadBalancerStatus_To_v1_LoadBalancerStatus(in *api.LoadBalancerStatus, out *LoadBalancerStatus, s conversion.Scope) error {
+ out.Ingress = *(*[]LoadBalancerIngress)(unsafe.Pointer(&in.Ingress))
+ return nil
+}
+
+// Convert_api_LoadBalancerStatus_To_v1_LoadBalancerStatus is an autogenerated conversion function.
+func Convert_api_LoadBalancerStatus_To_v1_LoadBalancerStatus(in *api.LoadBalancerStatus, out *LoadBalancerStatus, s conversion.Scope) error {
+ return autoConvert_api_LoadBalancerStatus_To_v1_LoadBalancerStatus(in, out, s)
+}
+
+func autoConvert_v1_LocalObjectReference_To_api_LocalObjectReference(in *LocalObjectReference, out *api.LocalObjectReference, s conversion.Scope) error {
+ out.Name = in.Name
+ return nil
+}
+
+// Convert_v1_LocalObjectReference_To_api_LocalObjectReference is an autogenerated conversion function.
+func Convert_v1_LocalObjectReference_To_api_LocalObjectReference(in *LocalObjectReference, out *api.LocalObjectReference, s conversion.Scope) error {
+ return autoConvert_v1_LocalObjectReference_To_api_LocalObjectReference(in, out, s)
+}
+
+func autoConvert_api_LocalObjectReference_To_v1_LocalObjectReference(in *api.LocalObjectReference, out *LocalObjectReference, s conversion.Scope) error {
+ out.Name = in.Name
+ return nil
+}
+
+// Convert_api_LocalObjectReference_To_v1_LocalObjectReference is an autogenerated conversion function.
+func Convert_api_LocalObjectReference_To_v1_LocalObjectReference(in *api.LocalObjectReference, out *LocalObjectReference, s conversion.Scope) error {
+ return autoConvert_api_LocalObjectReference_To_v1_LocalObjectReference(in, out, s)
+}
+
+func autoConvert_v1_LocalVolumeSource_To_api_LocalVolumeSource(in *LocalVolumeSource, out *api.LocalVolumeSource, s conversion.Scope) error {
+ out.Path = in.Path
+ return nil
+}
+
+// Convert_v1_LocalVolumeSource_To_api_LocalVolumeSource is an autogenerated conversion function.
+func Convert_v1_LocalVolumeSource_To_api_LocalVolumeSource(in *LocalVolumeSource, out *api.LocalVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_LocalVolumeSource_To_api_LocalVolumeSource(in, out, s)
+}
+
+func autoConvert_api_LocalVolumeSource_To_v1_LocalVolumeSource(in *api.LocalVolumeSource, out *LocalVolumeSource, s conversion.Scope) error {
+ out.Path = in.Path
+ return nil
+}
+
+// Convert_api_LocalVolumeSource_To_v1_LocalVolumeSource is an autogenerated conversion function.
+func Convert_api_LocalVolumeSource_To_v1_LocalVolumeSource(in *api.LocalVolumeSource, out *LocalVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_LocalVolumeSource_To_v1_LocalVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_NFSVolumeSource_To_api_NFSVolumeSource(in *NFSVolumeSource, out *api.NFSVolumeSource, s conversion.Scope) error {
+ out.Server = in.Server
+ out.Path = in.Path
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_v1_NFSVolumeSource_To_api_NFSVolumeSource is an autogenerated conversion function.
+func Convert_v1_NFSVolumeSource_To_api_NFSVolumeSource(in *NFSVolumeSource, out *api.NFSVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_NFSVolumeSource_To_api_NFSVolumeSource(in, out, s)
+}
+
+func autoConvert_api_NFSVolumeSource_To_v1_NFSVolumeSource(in *api.NFSVolumeSource, out *NFSVolumeSource, s conversion.Scope) error {
+ out.Server = in.Server
+ out.Path = in.Path
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_api_NFSVolumeSource_To_v1_NFSVolumeSource is an autogenerated conversion function.
+func Convert_api_NFSVolumeSource_To_v1_NFSVolumeSource(in *api.NFSVolumeSource, out *NFSVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_NFSVolumeSource_To_v1_NFSVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_Namespace_To_api_Namespace(in *Namespace, out *api.Namespace, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_NamespaceSpec_To_api_NamespaceSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_NamespaceStatus_To_api_NamespaceStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_Namespace_To_api_Namespace is an autogenerated conversion function.
+func Convert_v1_Namespace_To_api_Namespace(in *Namespace, out *api.Namespace, s conversion.Scope) error {
+ return autoConvert_v1_Namespace_To_api_Namespace(in, out, s)
+}
+
+func autoConvert_api_Namespace_To_v1_Namespace(in *api.Namespace, out *Namespace, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_api_NamespaceSpec_To_v1_NamespaceSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_api_NamespaceStatus_To_v1_NamespaceStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_Namespace_To_v1_Namespace is an autogenerated conversion function.
+func Convert_api_Namespace_To_v1_Namespace(in *api.Namespace, out *Namespace, s conversion.Scope) error {
+ return autoConvert_api_Namespace_To_v1_Namespace(in, out, s)
+}
+
+func autoConvert_v1_NamespaceList_To_api_NamespaceList(in *NamespaceList, out *api.NamespaceList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]api.Namespace)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1_NamespaceList_To_api_NamespaceList is an autogenerated conversion function.
+func Convert_v1_NamespaceList_To_api_NamespaceList(in *NamespaceList, out *api.NamespaceList, s conversion.Scope) error {
+ return autoConvert_v1_NamespaceList_To_api_NamespaceList(in, out, s)
+}
+
+func autoConvert_api_NamespaceList_To_v1_NamespaceList(in *api.NamespaceList, out *NamespaceList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]Namespace, 0)
+ } else {
+ out.Items = *(*[]Namespace)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_api_NamespaceList_To_v1_NamespaceList is an autogenerated conversion function.
+func Convert_api_NamespaceList_To_v1_NamespaceList(in *api.NamespaceList, out *NamespaceList, s conversion.Scope) error {
+ return autoConvert_api_NamespaceList_To_v1_NamespaceList(in, out, s)
+}
+
+func autoConvert_v1_NamespaceSpec_To_api_NamespaceSpec(in *NamespaceSpec, out *api.NamespaceSpec, s conversion.Scope) error {
+ out.Finalizers = *(*[]api.FinalizerName)(unsafe.Pointer(&in.Finalizers))
+ return nil
+}
+
+// Convert_v1_NamespaceSpec_To_api_NamespaceSpec is an autogenerated conversion function.
+func Convert_v1_NamespaceSpec_To_api_NamespaceSpec(in *NamespaceSpec, out *api.NamespaceSpec, s conversion.Scope) error {
+ return autoConvert_v1_NamespaceSpec_To_api_NamespaceSpec(in, out, s)
+}
+
+func autoConvert_api_NamespaceSpec_To_v1_NamespaceSpec(in *api.NamespaceSpec, out *NamespaceSpec, s conversion.Scope) error {
+ out.Finalizers = *(*[]FinalizerName)(unsafe.Pointer(&in.Finalizers))
+ return nil
+}
+
+// Convert_api_NamespaceSpec_To_v1_NamespaceSpec is an autogenerated conversion function.
+func Convert_api_NamespaceSpec_To_v1_NamespaceSpec(in *api.NamespaceSpec, out *NamespaceSpec, s conversion.Scope) error {
+ return autoConvert_api_NamespaceSpec_To_v1_NamespaceSpec(in, out, s)
+}
+
+func autoConvert_v1_NamespaceStatus_To_api_NamespaceStatus(in *NamespaceStatus, out *api.NamespaceStatus, s conversion.Scope) error {
+ out.Phase = api.NamespacePhase(in.Phase)
+ return nil
+}
+
+// Convert_v1_NamespaceStatus_To_api_NamespaceStatus is an autogenerated conversion function.
+func Convert_v1_NamespaceStatus_To_api_NamespaceStatus(in *NamespaceStatus, out *api.NamespaceStatus, s conversion.Scope) error {
+ return autoConvert_v1_NamespaceStatus_To_api_NamespaceStatus(in, out, s)
+}
+
+func autoConvert_api_NamespaceStatus_To_v1_NamespaceStatus(in *api.NamespaceStatus, out *NamespaceStatus, s conversion.Scope) error {
+ out.Phase = NamespacePhase(in.Phase)
+ return nil
+}
+
+// Convert_api_NamespaceStatus_To_v1_NamespaceStatus is an autogenerated conversion function.
+func Convert_api_NamespaceStatus_To_v1_NamespaceStatus(in *api.NamespaceStatus, out *NamespaceStatus, s conversion.Scope) error {
+ return autoConvert_api_NamespaceStatus_To_v1_NamespaceStatus(in, out, s)
+}
+
+func autoConvert_v1_Node_To_api_Node(in *Node, out *api.Node, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_NodeSpec_To_api_NodeSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_NodeStatus_To_api_NodeStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_Node_To_api_Node is an autogenerated conversion function.
+func Convert_v1_Node_To_api_Node(in *Node, out *api.Node, s conversion.Scope) error {
+ return autoConvert_v1_Node_To_api_Node(in, out, s)
+}
+
+func autoConvert_api_Node_To_v1_Node(in *api.Node, out *Node, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_api_NodeSpec_To_v1_NodeSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_api_NodeStatus_To_v1_NodeStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_Node_To_v1_Node is an autogenerated conversion function.
+func Convert_api_Node_To_v1_Node(in *api.Node, out *Node, s conversion.Scope) error {
+ return autoConvert_api_Node_To_v1_Node(in, out, s)
+}
+
+func autoConvert_v1_NodeAddress_To_api_NodeAddress(in *NodeAddress, out *api.NodeAddress, s conversion.Scope) error {
+ out.Type = api.NodeAddressType(in.Type)
+ out.Address = in.Address
+ return nil
+}
+
+// Convert_v1_NodeAddress_To_api_NodeAddress is an autogenerated conversion function.
+func Convert_v1_NodeAddress_To_api_NodeAddress(in *NodeAddress, out *api.NodeAddress, s conversion.Scope) error {
+ return autoConvert_v1_NodeAddress_To_api_NodeAddress(in, out, s)
+}
+
+func autoConvert_api_NodeAddress_To_v1_NodeAddress(in *api.NodeAddress, out *NodeAddress, s conversion.Scope) error {
+ out.Type = NodeAddressType(in.Type)
+ out.Address = in.Address
+ return nil
+}
+
+// Convert_api_NodeAddress_To_v1_NodeAddress is an autogenerated conversion function.
+func Convert_api_NodeAddress_To_v1_NodeAddress(in *api.NodeAddress, out *NodeAddress, s conversion.Scope) error {
+ return autoConvert_api_NodeAddress_To_v1_NodeAddress(in, out, s)
+}
+
+func autoConvert_v1_NodeAffinity_To_api_NodeAffinity(in *NodeAffinity, out *api.NodeAffinity, s conversion.Scope) error {
+ out.RequiredDuringSchedulingIgnoredDuringExecution = (*api.NodeSelector)(unsafe.Pointer(in.RequiredDuringSchedulingIgnoredDuringExecution))
+ out.PreferredDuringSchedulingIgnoredDuringExecution = *(*[]api.PreferredSchedulingTerm)(unsafe.Pointer(&in.PreferredDuringSchedulingIgnoredDuringExecution))
+ return nil
+}
+
+// Convert_v1_NodeAffinity_To_api_NodeAffinity is an autogenerated conversion function.
+func Convert_v1_NodeAffinity_To_api_NodeAffinity(in *NodeAffinity, out *api.NodeAffinity, s conversion.Scope) error {
+ return autoConvert_v1_NodeAffinity_To_api_NodeAffinity(in, out, s)
+}
+
+func autoConvert_api_NodeAffinity_To_v1_NodeAffinity(in *api.NodeAffinity, out *NodeAffinity, s conversion.Scope) error {
+ out.RequiredDuringSchedulingIgnoredDuringExecution = (*NodeSelector)(unsafe.Pointer(in.RequiredDuringSchedulingIgnoredDuringExecution))
+ out.PreferredDuringSchedulingIgnoredDuringExecution = *(*[]PreferredSchedulingTerm)(unsafe.Pointer(&in.PreferredDuringSchedulingIgnoredDuringExecution))
+ return nil
+}
+
+// Convert_api_NodeAffinity_To_v1_NodeAffinity is an autogenerated conversion function.
+func Convert_api_NodeAffinity_To_v1_NodeAffinity(in *api.NodeAffinity, out *NodeAffinity, s conversion.Scope) error {
+ return autoConvert_api_NodeAffinity_To_v1_NodeAffinity(in, out, s)
+}
+
+func autoConvert_v1_NodeCondition_To_api_NodeCondition(in *NodeCondition, out *api.NodeCondition, s conversion.Scope) error {
+ out.Type = api.NodeConditionType(in.Type)
+ out.Status = api.ConditionStatus(in.Status)
+ out.LastHeartbeatTime = in.LastHeartbeatTime
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_v1_NodeCondition_To_api_NodeCondition is an autogenerated conversion function.
+func Convert_v1_NodeCondition_To_api_NodeCondition(in *NodeCondition, out *api.NodeCondition, s conversion.Scope) error {
+ return autoConvert_v1_NodeCondition_To_api_NodeCondition(in, out, s)
+}
+
+func autoConvert_api_NodeCondition_To_v1_NodeCondition(in *api.NodeCondition, out *NodeCondition, s conversion.Scope) error {
+ out.Type = NodeConditionType(in.Type)
+ out.Status = ConditionStatus(in.Status)
+ out.LastHeartbeatTime = in.LastHeartbeatTime
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_api_NodeCondition_To_v1_NodeCondition is an autogenerated conversion function.
+func Convert_api_NodeCondition_To_v1_NodeCondition(in *api.NodeCondition, out *NodeCondition, s conversion.Scope) error {
+ return autoConvert_api_NodeCondition_To_v1_NodeCondition(in, out, s)
+}
+
+func autoConvert_v1_NodeDaemonEndpoints_To_api_NodeDaemonEndpoints(in *NodeDaemonEndpoints, out *api.NodeDaemonEndpoints, s conversion.Scope) error {
+ if err := Convert_v1_DaemonEndpoint_To_api_DaemonEndpoint(&in.KubeletEndpoint, &out.KubeletEndpoint, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_NodeDaemonEndpoints_To_api_NodeDaemonEndpoints is an autogenerated conversion function.
+func Convert_v1_NodeDaemonEndpoints_To_api_NodeDaemonEndpoints(in *NodeDaemonEndpoints, out *api.NodeDaemonEndpoints, s conversion.Scope) error {
+ return autoConvert_v1_NodeDaemonEndpoints_To_api_NodeDaemonEndpoints(in, out, s)
+}
+
+func autoConvert_api_NodeDaemonEndpoints_To_v1_NodeDaemonEndpoints(in *api.NodeDaemonEndpoints, out *NodeDaemonEndpoints, s conversion.Scope) error {
+ if err := Convert_api_DaemonEndpoint_To_v1_DaemonEndpoint(&in.KubeletEndpoint, &out.KubeletEndpoint, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_NodeDaemonEndpoints_To_v1_NodeDaemonEndpoints is an autogenerated conversion function.
+func Convert_api_NodeDaemonEndpoints_To_v1_NodeDaemonEndpoints(in *api.NodeDaemonEndpoints, out *NodeDaemonEndpoints, s conversion.Scope) error {
+ return autoConvert_api_NodeDaemonEndpoints_To_v1_NodeDaemonEndpoints(in, out, s)
+}
+
+func autoConvert_v1_NodeList_To_api_NodeList(in *NodeList, out *api.NodeList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]api.Node)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1_NodeList_To_api_NodeList is an autogenerated conversion function.
+func Convert_v1_NodeList_To_api_NodeList(in *NodeList, out *api.NodeList, s conversion.Scope) error {
+ return autoConvert_v1_NodeList_To_api_NodeList(in, out, s)
+}
+
+func autoConvert_api_NodeList_To_v1_NodeList(in *api.NodeList, out *NodeList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]Node, 0)
+ } else {
+ out.Items = *(*[]Node)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_api_NodeList_To_v1_NodeList is an autogenerated conversion function.
+func Convert_api_NodeList_To_v1_NodeList(in *api.NodeList, out *NodeList, s conversion.Scope) error {
+ return autoConvert_api_NodeList_To_v1_NodeList(in, out, s)
+}
+
+func autoConvert_v1_NodeProxyOptions_To_api_NodeProxyOptions(in *NodeProxyOptions, out *api.NodeProxyOptions, s conversion.Scope) error {
+ out.Path = in.Path
+ return nil
+}
+
+// Convert_v1_NodeProxyOptions_To_api_NodeProxyOptions is an autogenerated conversion function.
+func Convert_v1_NodeProxyOptions_To_api_NodeProxyOptions(in *NodeProxyOptions, out *api.NodeProxyOptions, s conversion.Scope) error {
+ return autoConvert_v1_NodeProxyOptions_To_api_NodeProxyOptions(in, out, s)
+}
+
+func autoConvert_api_NodeProxyOptions_To_v1_NodeProxyOptions(in *api.NodeProxyOptions, out *NodeProxyOptions, s conversion.Scope) error {
+ out.Path = in.Path
+ return nil
+}
+
+// Convert_api_NodeProxyOptions_To_v1_NodeProxyOptions is an autogenerated conversion function.
+func Convert_api_NodeProxyOptions_To_v1_NodeProxyOptions(in *api.NodeProxyOptions, out *NodeProxyOptions, s conversion.Scope) error {
+ return autoConvert_api_NodeProxyOptions_To_v1_NodeProxyOptions(in, out, s)
+}
+
+func autoConvert_v1_NodeResources_To_api_NodeResources(in *NodeResources, out *api.NodeResources, s conversion.Scope) error {
+ out.Capacity = *(*api.ResourceList)(unsafe.Pointer(&in.Capacity))
+ return nil
+}
+
+// Convert_v1_NodeResources_To_api_NodeResources is an autogenerated conversion function.
+func Convert_v1_NodeResources_To_api_NodeResources(in *NodeResources, out *api.NodeResources, s conversion.Scope) error {
+ return autoConvert_v1_NodeResources_To_api_NodeResources(in, out, s)
+}
+
+func autoConvert_api_NodeResources_To_v1_NodeResources(in *api.NodeResources, out *NodeResources, s conversion.Scope) error {
+ out.Capacity = *(*ResourceList)(unsafe.Pointer(&in.Capacity))
+ return nil
+}
+
+// Convert_api_NodeResources_To_v1_NodeResources is an autogenerated conversion function.
+func Convert_api_NodeResources_To_v1_NodeResources(in *api.NodeResources, out *NodeResources, s conversion.Scope) error {
+ return autoConvert_api_NodeResources_To_v1_NodeResources(in, out, s)
+}
+
+func autoConvert_v1_NodeSelector_To_api_NodeSelector(in *NodeSelector, out *api.NodeSelector, s conversion.Scope) error {
+ out.NodeSelectorTerms = *(*[]api.NodeSelectorTerm)(unsafe.Pointer(&in.NodeSelectorTerms))
+ return nil
+}
+
+// Convert_v1_NodeSelector_To_api_NodeSelector is an autogenerated conversion function.
+func Convert_v1_NodeSelector_To_api_NodeSelector(in *NodeSelector, out *api.NodeSelector, s conversion.Scope) error {
+ return autoConvert_v1_NodeSelector_To_api_NodeSelector(in, out, s)
+}
+
+func autoConvert_api_NodeSelector_To_v1_NodeSelector(in *api.NodeSelector, out *NodeSelector, s conversion.Scope) error {
+ if in.NodeSelectorTerms == nil {
+ out.NodeSelectorTerms = make([]NodeSelectorTerm, 0)
+ } else {
+ out.NodeSelectorTerms = *(*[]NodeSelectorTerm)(unsafe.Pointer(&in.NodeSelectorTerms))
+ }
+ return nil
+}
+
+// Convert_api_NodeSelector_To_v1_NodeSelector is an autogenerated conversion function.
+func Convert_api_NodeSelector_To_v1_NodeSelector(in *api.NodeSelector, out *NodeSelector, s conversion.Scope) error {
+ return autoConvert_api_NodeSelector_To_v1_NodeSelector(in, out, s)
+}
+
+func autoConvert_v1_NodeSelectorRequirement_To_api_NodeSelectorRequirement(in *NodeSelectorRequirement, out *api.NodeSelectorRequirement, s conversion.Scope) error {
+ out.Key = in.Key
+ out.Operator = api.NodeSelectorOperator(in.Operator)
+ out.Values = *(*[]string)(unsafe.Pointer(&in.Values))
+ return nil
+}
+
+// Convert_v1_NodeSelectorRequirement_To_api_NodeSelectorRequirement is an autogenerated conversion function.
+func Convert_v1_NodeSelectorRequirement_To_api_NodeSelectorRequirement(in *NodeSelectorRequirement, out *api.NodeSelectorRequirement, s conversion.Scope) error {
+ return autoConvert_v1_NodeSelectorRequirement_To_api_NodeSelectorRequirement(in, out, s)
+}
+
+func autoConvert_api_NodeSelectorRequirement_To_v1_NodeSelectorRequirement(in *api.NodeSelectorRequirement, out *NodeSelectorRequirement, s conversion.Scope) error {
+ out.Key = in.Key
+ out.Operator = NodeSelectorOperator(in.Operator)
+ out.Values = *(*[]string)(unsafe.Pointer(&in.Values))
+ return nil
+}
+
+// Convert_api_NodeSelectorRequirement_To_v1_NodeSelectorRequirement is an autogenerated conversion function.
+func Convert_api_NodeSelectorRequirement_To_v1_NodeSelectorRequirement(in *api.NodeSelectorRequirement, out *NodeSelectorRequirement, s conversion.Scope) error {
+ return autoConvert_api_NodeSelectorRequirement_To_v1_NodeSelectorRequirement(in, out, s)
+}
+
+func autoConvert_v1_NodeSelectorTerm_To_api_NodeSelectorTerm(in *NodeSelectorTerm, out *api.NodeSelectorTerm, s conversion.Scope) error {
+ out.MatchExpressions = *(*[]api.NodeSelectorRequirement)(unsafe.Pointer(&in.MatchExpressions))
+ return nil
+}
+
+// Convert_v1_NodeSelectorTerm_To_api_NodeSelectorTerm is an autogenerated conversion function.
+func Convert_v1_NodeSelectorTerm_To_api_NodeSelectorTerm(in *NodeSelectorTerm, out *api.NodeSelectorTerm, s conversion.Scope) error {
+ return autoConvert_v1_NodeSelectorTerm_To_api_NodeSelectorTerm(in, out, s)
+}
+
+func autoConvert_api_NodeSelectorTerm_To_v1_NodeSelectorTerm(in *api.NodeSelectorTerm, out *NodeSelectorTerm, s conversion.Scope) error {
+ if in.MatchExpressions == nil {
+ out.MatchExpressions = make([]NodeSelectorRequirement, 0)
+ } else {
+ out.MatchExpressions = *(*[]NodeSelectorRequirement)(unsafe.Pointer(&in.MatchExpressions))
+ }
+ return nil
+}
+
+// Convert_api_NodeSelectorTerm_To_v1_NodeSelectorTerm is an autogenerated conversion function.
+func Convert_api_NodeSelectorTerm_To_v1_NodeSelectorTerm(in *api.NodeSelectorTerm, out *NodeSelectorTerm, s conversion.Scope) error {
+ return autoConvert_api_NodeSelectorTerm_To_v1_NodeSelectorTerm(in, out, s)
+}
+
+func autoConvert_v1_NodeSpec_To_api_NodeSpec(in *NodeSpec, out *api.NodeSpec, s conversion.Scope) error {
+ out.PodCIDR = in.PodCIDR
+ out.ExternalID = in.ExternalID
+ out.ProviderID = in.ProviderID
+ out.Unschedulable = in.Unschedulable
+ out.Taints = *(*[]api.Taint)(unsafe.Pointer(&in.Taints))
+ return nil
+}
+
+// Convert_v1_NodeSpec_To_api_NodeSpec is an autogenerated conversion function.
+func Convert_v1_NodeSpec_To_api_NodeSpec(in *NodeSpec, out *api.NodeSpec, s conversion.Scope) error {
+ return autoConvert_v1_NodeSpec_To_api_NodeSpec(in, out, s)
+}
+
+func autoConvert_api_NodeSpec_To_v1_NodeSpec(in *api.NodeSpec, out *NodeSpec, s conversion.Scope) error {
+ out.PodCIDR = in.PodCIDR
+ out.ExternalID = in.ExternalID
+ out.ProviderID = in.ProviderID
+ out.Unschedulable = in.Unschedulable
+ out.Taints = *(*[]Taint)(unsafe.Pointer(&in.Taints))
+ return nil
+}
+
+// Convert_api_NodeSpec_To_v1_NodeSpec is an autogenerated conversion function.
+func Convert_api_NodeSpec_To_v1_NodeSpec(in *api.NodeSpec, out *NodeSpec, s conversion.Scope) error {
+ return autoConvert_api_NodeSpec_To_v1_NodeSpec(in, out, s)
+}
+
+func autoConvert_v1_NodeStatus_To_api_NodeStatus(in *NodeStatus, out *api.NodeStatus, s conversion.Scope) error {
+ out.Capacity = *(*api.ResourceList)(unsafe.Pointer(&in.Capacity))
+ out.Allocatable = *(*api.ResourceList)(unsafe.Pointer(&in.Allocatable))
+ out.Phase = api.NodePhase(in.Phase)
+ out.Conditions = *(*[]api.NodeCondition)(unsafe.Pointer(&in.Conditions))
+ out.Addresses = *(*[]api.NodeAddress)(unsafe.Pointer(&in.Addresses))
+ if err := Convert_v1_NodeDaemonEndpoints_To_api_NodeDaemonEndpoints(&in.DaemonEndpoints, &out.DaemonEndpoints, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_NodeSystemInfo_To_api_NodeSystemInfo(&in.NodeInfo, &out.NodeInfo, s); err != nil {
+ return err
+ }
+ out.Images = *(*[]api.ContainerImage)(unsafe.Pointer(&in.Images))
+ out.VolumesInUse = *(*[]api.UniqueVolumeName)(unsafe.Pointer(&in.VolumesInUse))
+ out.VolumesAttached = *(*[]api.AttachedVolume)(unsafe.Pointer(&in.VolumesAttached))
+ return nil
+}
+
+// Convert_v1_NodeStatus_To_api_NodeStatus is an autogenerated conversion function.
+func Convert_v1_NodeStatus_To_api_NodeStatus(in *NodeStatus, out *api.NodeStatus, s conversion.Scope) error {
+ return autoConvert_v1_NodeStatus_To_api_NodeStatus(in, out, s)
+}
+
+func autoConvert_api_NodeStatus_To_v1_NodeStatus(in *api.NodeStatus, out *NodeStatus, s conversion.Scope) error {
+ out.Capacity = *(*ResourceList)(unsafe.Pointer(&in.Capacity))
+ out.Allocatable = *(*ResourceList)(unsafe.Pointer(&in.Allocatable))
+ out.Phase = NodePhase(in.Phase)
+ out.Conditions = *(*[]NodeCondition)(unsafe.Pointer(&in.Conditions))
+ out.Addresses = *(*[]NodeAddress)(unsafe.Pointer(&in.Addresses))
+ if err := Convert_api_NodeDaemonEndpoints_To_v1_NodeDaemonEndpoints(&in.DaemonEndpoints, &out.DaemonEndpoints, s); err != nil {
+ return err
+ }
+ if err := Convert_api_NodeSystemInfo_To_v1_NodeSystemInfo(&in.NodeInfo, &out.NodeInfo, s); err != nil {
+ return err
+ }
+ out.Images = *(*[]ContainerImage)(unsafe.Pointer(&in.Images))
+ out.VolumesInUse = *(*[]UniqueVolumeName)(unsafe.Pointer(&in.VolumesInUse))
+ out.VolumesAttached = *(*[]AttachedVolume)(unsafe.Pointer(&in.VolumesAttached))
+ return nil
+}
+
+// Convert_api_NodeStatus_To_v1_NodeStatus is an autogenerated conversion function.
+func Convert_api_NodeStatus_To_v1_NodeStatus(in *api.NodeStatus, out *NodeStatus, s conversion.Scope) error {
+ return autoConvert_api_NodeStatus_To_v1_NodeStatus(in, out, s)
+}
+
+func autoConvert_v1_NodeSystemInfo_To_api_NodeSystemInfo(in *NodeSystemInfo, out *api.NodeSystemInfo, s conversion.Scope) error {
+ out.MachineID = in.MachineID
+ out.SystemUUID = in.SystemUUID
+ out.BootID = in.BootID
+ out.KernelVersion = in.KernelVersion
+ out.OSImage = in.OSImage
+ out.ContainerRuntimeVersion = in.ContainerRuntimeVersion
+ out.KubeletVersion = in.KubeletVersion
+ out.KubeProxyVersion = in.KubeProxyVersion
+ out.OperatingSystem = in.OperatingSystem
+ out.Architecture = in.Architecture
+ return nil
+}
+
+// Convert_v1_NodeSystemInfo_To_api_NodeSystemInfo is an autogenerated conversion function.
+func Convert_v1_NodeSystemInfo_To_api_NodeSystemInfo(in *NodeSystemInfo, out *api.NodeSystemInfo, s conversion.Scope) error {
+ return autoConvert_v1_NodeSystemInfo_To_api_NodeSystemInfo(in, out, s)
+}
+
+func autoConvert_api_NodeSystemInfo_To_v1_NodeSystemInfo(in *api.NodeSystemInfo, out *NodeSystemInfo, s conversion.Scope) error {
+ out.MachineID = in.MachineID
+ out.SystemUUID = in.SystemUUID
+ out.BootID = in.BootID
+ out.KernelVersion = in.KernelVersion
+ out.OSImage = in.OSImage
+ out.ContainerRuntimeVersion = in.ContainerRuntimeVersion
+ out.KubeletVersion = in.KubeletVersion
+ out.KubeProxyVersion = in.KubeProxyVersion
+ out.OperatingSystem = in.OperatingSystem
+ out.Architecture = in.Architecture
+ return nil
+}
+
+// Convert_api_NodeSystemInfo_To_v1_NodeSystemInfo is an autogenerated conversion function.
+func Convert_api_NodeSystemInfo_To_v1_NodeSystemInfo(in *api.NodeSystemInfo, out *NodeSystemInfo, s conversion.Scope) error {
+ return autoConvert_api_NodeSystemInfo_To_v1_NodeSystemInfo(in, out, s)
+}
+
+func autoConvert_v1_ObjectFieldSelector_To_api_ObjectFieldSelector(in *ObjectFieldSelector, out *api.ObjectFieldSelector, s conversion.Scope) error {
+ out.APIVersion = in.APIVersion
+ out.FieldPath = in.FieldPath
+ return nil
+}
+
+// Convert_v1_ObjectFieldSelector_To_api_ObjectFieldSelector is an autogenerated conversion function.
+func Convert_v1_ObjectFieldSelector_To_api_ObjectFieldSelector(in *ObjectFieldSelector, out *api.ObjectFieldSelector, s conversion.Scope) error {
+ return autoConvert_v1_ObjectFieldSelector_To_api_ObjectFieldSelector(in, out, s)
+}
+
+func autoConvert_api_ObjectFieldSelector_To_v1_ObjectFieldSelector(in *api.ObjectFieldSelector, out *ObjectFieldSelector, s conversion.Scope) error {
+ out.APIVersion = in.APIVersion
+ out.FieldPath = in.FieldPath
+ return nil
+}
+
+// Convert_api_ObjectFieldSelector_To_v1_ObjectFieldSelector is an autogenerated conversion function.
+func Convert_api_ObjectFieldSelector_To_v1_ObjectFieldSelector(in *api.ObjectFieldSelector, out *ObjectFieldSelector, s conversion.Scope) error {
+ return autoConvert_api_ObjectFieldSelector_To_v1_ObjectFieldSelector(in, out, s)
+}
+
+func autoConvert_v1_ObjectMeta_To_api_ObjectMeta(in *ObjectMeta, out *api.ObjectMeta, s conversion.Scope) error {
+ out.Name = in.Name
+ out.GenerateName = in.GenerateName
+ out.Namespace = in.Namespace
+ out.SelfLink = in.SelfLink
+ out.UID = types.UID(in.UID)
+ out.ResourceVersion = in.ResourceVersion
+ out.Generation = in.Generation
+ out.CreationTimestamp = in.CreationTimestamp
+ out.DeletionTimestamp = (*meta_v1.Time)(unsafe.Pointer(in.DeletionTimestamp))
+ out.DeletionGracePeriodSeconds = (*int64)(unsafe.Pointer(in.DeletionGracePeriodSeconds))
+ out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels))
+ out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations))
+ out.OwnerReferences = *(*[]meta_v1.OwnerReference)(unsafe.Pointer(&in.OwnerReferences))
+ out.Initializers = (*meta_v1.Initializers)(unsafe.Pointer(in.Initializers))
+ out.Finalizers = *(*[]string)(unsafe.Pointer(&in.Finalizers))
+ out.ClusterName = in.ClusterName
+ return nil
+}
+
+// Convert_v1_ObjectMeta_To_api_ObjectMeta is an autogenerated conversion function.
+func Convert_v1_ObjectMeta_To_api_ObjectMeta(in *ObjectMeta, out *api.ObjectMeta, s conversion.Scope) error {
+ return autoConvert_v1_ObjectMeta_To_api_ObjectMeta(in, out, s)
+}
+
+func autoConvert_api_ObjectMeta_To_v1_ObjectMeta(in *api.ObjectMeta, out *ObjectMeta, s conversion.Scope) error {
+ out.Name = in.Name
+ out.GenerateName = in.GenerateName
+ out.Namespace = in.Namespace
+ out.SelfLink = in.SelfLink
+ out.UID = types.UID(in.UID)
+ out.ResourceVersion = in.ResourceVersion
+ out.Generation = in.Generation
+ out.CreationTimestamp = in.CreationTimestamp
+ out.DeletionTimestamp = (*meta_v1.Time)(unsafe.Pointer(in.DeletionTimestamp))
+ out.DeletionGracePeriodSeconds = (*int64)(unsafe.Pointer(in.DeletionGracePeriodSeconds))
+ out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels))
+ out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations))
+ out.OwnerReferences = *(*[]meta_v1.OwnerReference)(unsafe.Pointer(&in.OwnerReferences))
+ out.Initializers = (*meta_v1.Initializers)(unsafe.Pointer(in.Initializers))
+ out.Finalizers = *(*[]string)(unsafe.Pointer(&in.Finalizers))
+ out.ClusterName = in.ClusterName
+ return nil
+}
+
+// Convert_api_ObjectMeta_To_v1_ObjectMeta is an autogenerated conversion function.
+func Convert_api_ObjectMeta_To_v1_ObjectMeta(in *api.ObjectMeta, out *ObjectMeta, s conversion.Scope) error {
+ return autoConvert_api_ObjectMeta_To_v1_ObjectMeta(in, out, s)
+}
+
+func autoConvert_v1_ObjectReference_To_api_ObjectReference(in *ObjectReference, out *api.ObjectReference, s conversion.Scope) error {
+ out.Kind = in.Kind
+ out.Namespace = in.Namespace
+ out.Name = in.Name
+ out.UID = types.UID(in.UID)
+ out.APIVersion = in.APIVersion
+ out.ResourceVersion = in.ResourceVersion
+ out.FieldPath = in.FieldPath
+ return nil
+}
+
+// Convert_v1_ObjectReference_To_api_ObjectReference is an autogenerated conversion function.
+func Convert_v1_ObjectReference_To_api_ObjectReference(in *ObjectReference, out *api.ObjectReference, s conversion.Scope) error {
+ return autoConvert_v1_ObjectReference_To_api_ObjectReference(in, out, s)
+}
+
+func autoConvert_api_ObjectReference_To_v1_ObjectReference(in *api.ObjectReference, out *ObjectReference, s conversion.Scope) error {
+ out.Kind = in.Kind
+ out.Namespace = in.Namespace
+ out.Name = in.Name
+ out.UID = types.UID(in.UID)
+ out.APIVersion = in.APIVersion
+ out.ResourceVersion = in.ResourceVersion
+ out.FieldPath = in.FieldPath
+ return nil
+}
+
+// Convert_api_ObjectReference_To_v1_ObjectReference is an autogenerated conversion function.
+func Convert_api_ObjectReference_To_v1_ObjectReference(in *api.ObjectReference, out *ObjectReference, s conversion.Scope) error {
+ return autoConvert_api_ObjectReference_To_v1_ObjectReference(in, out, s)
+}
+
+func autoConvert_v1_PersistentVolume_To_api_PersistentVolume(in *PersistentVolume, out *api.PersistentVolume, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_PersistentVolumeSpec_To_api_PersistentVolumeSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_PersistentVolumeStatus_To_api_PersistentVolumeStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_PersistentVolume_To_api_PersistentVolume is an autogenerated conversion function.
+func Convert_v1_PersistentVolume_To_api_PersistentVolume(in *PersistentVolume, out *api.PersistentVolume, s conversion.Scope) error {
+ return autoConvert_v1_PersistentVolume_To_api_PersistentVolume(in, out, s)
+}
+
+func autoConvert_api_PersistentVolume_To_v1_PersistentVolume(in *api.PersistentVolume, out *PersistentVolume, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_api_PersistentVolumeSpec_To_v1_PersistentVolumeSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_api_PersistentVolumeStatus_To_v1_PersistentVolumeStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_PersistentVolume_To_v1_PersistentVolume is an autogenerated conversion function.
+func Convert_api_PersistentVolume_To_v1_PersistentVolume(in *api.PersistentVolume, out *PersistentVolume, s conversion.Scope) error {
+ return autoConvert_api_PersistentVolume_To_v1_PersistentVolume(in, out, s)
+}
+
+func autoConvert_v1_PersistentVolumeClaim_To_api_PersistentVolumeClaim(in *PersistentVolumeClaim, out *api.PersistentVolumeClaim, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_PersistentVolumeClaimSpec_To_api_PersistentVolumeClaimSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_PersistentVolumeClaimStatus_To_api_PersistentVolumeClaimStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_PersistentVolumeClaim_To_api_PersistentVolumeClaim is an autogenerated conversion function.
+func Convert_v1_PersistentVolumeClaim_To_api_PersistentVolumeClaim(in *PersistentVolumeClaim, out *api.PersistentVolumeClaim, s conversion.Scope) error {
+ return autoConvert_v1_PersistentVolumeClaim_To_api_PersistentVolumeClaim(in, out, s)
+}
+
+func autoConvert_api_PersistentVolumeClaim_To_v1_PersistentVolumeClaim(in *api.PersistentVolumeClaim, out *PersistentVolumeClaim, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_api_PersistentVolumeClaimSpec_To_v1_PersistentVolumeClaimSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_api_PersistentVolumeClaimStatus_To_v1_PersistentVolumeClaimStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_PersistentVolumeClaim_To_v1_PersistentVolumeClaim is an autogenerated conversion function.
+func Convert_api_PersistentVolumeClaim_To_v1_PersistentVolumeClaim(in *api.PersistentVolumeClaim, out *PersistentVolumeClaim, s conversion.Scope) error {
+ return autoConvert_api_PersistentVolumeClaim_To_v1_PersistentVolumeClaim(in, out, s)
+}
+
+func autoConvert_v1_PersistentVolumeClaimList_To_api_PersistentVolumeClaimList(in *PersistentVolumeClaimList, out *api.PersistentVolumeClaimList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]api.PersistentVolumeClaim)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1_PersistentVolumeClaimList_To_api_PersistentVolumeClaimList is an autogenerated conversion function.
+func Convert_v1_PersistentVolumeClaimList_To_api_PersistentVolumeClaimList(in *PersistentVolumeClaimList, out *api.PersistentVolumeClaimList, s conversion.Scope) error {
+ return autoConvert_v1_PersistentVolumeClaimList_To_api_PersistentVolumeClaimList(in, out, s)
+}
+
+func autoConvert_api_PersistentVolumeClaimList_To_v1_PersistentVolumeClaimList(in *api.PersistentVolumeClaimList, out *PersistentVolumeClaimList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]PersistentVolumeClaim, 0)
+ } else {
+ out.Items = *(*[]PersistentVolumeClaim)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_api_PersistentVolumeClaimList_To_v1_PersistentVolumeClaimList is an autogenerated conversion function.
+func Convert_api_PersistentVolumeClaimList_To_v1_PersistentVolumeClaimList(in *api.PersistentVolumeClaimList, out *PersistentVolumeClaimList, s conversion.Scope) error {
+ return autoConvert_api_PersistentVolumeClaimList_To_v1_PersistentVolumeClaimList(in, out, s)
+}
+
+func autoConvert_v1_PersistentVolumeClaimSpec_To_api_PersistentVolumeClaimSpec(in *PersistentVolumeClaimSpec, out *api.PersistentVolumeClaimSpec, s conversion.Scope) error {
+ out.AccessModes = *(*[]api.PersistentVolumeAccessMode)(unsafe.Pointer(&in.AccessModes))
+ out.Selector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.Selector))
+ if err := Convert_v1_ResourceRequirements_To_api_ResourceRequirements(&in.Resources, &out.Resources, s); err != nil {
+ return err
+ }
+ out.VolumeName = in.VolumeName
+ out.StorageClassName = (*string)(unsafe.Pointer(in.StorageClassName))
+ return nil
+}
+
+// Convert_v1_PersistentVolumeClaimSpec_To_api_PersistentVolumeClaimSpec is an autogenerated conversion function.
+func Convert_v1_PersistentVolumeClaimSpec_To_api_PersistentVolumeClaimSpec(in *PersistentVolumeClaimSpec, out *api.PersistentVolumeClaimSpec, s conversion.Scope) error {
+ return autoConvert_v1_PersistentVolumeClaimSpec_To_api_PersistentVolumeClaimSpec(in, out, s)
+}
+
+func autoConvert_api_PersistentVolumeClaimSpec_To_v1_PersistentVolumeClaimSpec(in *api.PersistentVolumeClaimSpec, out *PersistentVolumeClaimSpec, s conversion.Scope) error {
+ out.AccessModes = *(*[]PersistentVolumeAccessMode)(unsafe.Pointer(&in.AccessModes))
+ out.Selector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.Selector))
+ if err := Convert_api_ResourceRequirements_To_v1_ResourceRequirements(&in.Resources, &out.Resources, s); err != nil {
+ return err
+ }
+ out.VolumeName = in.VolumeName
+ out.StorageClassName = (*string)(unsafe.Pointer(in.StorageClassName))
+ return nil
+}
+
+// Convert_api_PersistentVolumeClaimSpec_To_v1_PersistentVolumeClaimSpec is an autogenerated conversion function.
+func Convert_api_PersistentVolumeClaimSpec_To_v1_PersistentVolumeClaimSpec(in *api.PersistentVolumeClaimSpec, out *PersistentVolumeClaimSpec, s conversion.Scope) error {
+ return autoConvert_api_PersistentVolumeClaimSpec_To_v1_PersistentVolumeClaimSpec(in, out, s)
+}
+
+func autoConvert_v1_PersistentVolumeClaimStatus_To_api_PersistentVolumeClaimStatus(in *PersistentVolumeClaimStatus, out *api.PersistentVolumeClaimStatus, s conversion.Scope) error {
+ out.Phase = api.PersistentVolumeClaimPhase(in.Phase)
+ out.AccessModes = *(*[]api.PersistentVolumeAccessMode)(unsafe.Pointer(&in.AccessModes))
+ out.Capacity = *(*api.ResourceList)(unsafe.Pointer(&in.Capacity))
+ return nil
+}
+
+// Convert_v1_PersistentVolumeClaimStatus_To_api_PersistentVolumeClaimStatus is an autogenerated conversion function.
+func Convert_v1_PersistentVolumeClaimStatus_To_api_PersistentVolumeClaimStatus(in *PersistentVolumeClaimStatus, out *api.PersistentVolumeClaimStatus, s conversion.Scope) error {
+ return autoConvert_v1_PersistentVolumeClaimStatus_To_api_PersistentVolumeClaimStatus(in, out, s)
+}
+
+func autoConvert_api_PersistentVolumeClaimStatus_To_v1_PersistentVolumeClaimStatus(in *api.PersistentVolumeClaimStatus, out *PersistentVolumeClaimStatus, s conversion.Scope) error {
+ out.Phase = PersistentVolumeClaimPhase(in.Phase)
+ out.AccessModes = *(*[]PersistentVolumeAccessMode)(unsafe.Pointer(&in.AccessModes))
+ out.Capacity = *(*ResourceList)(unsafe.Pointer(&in.Capacity))
+ return nil
+}
+
+// Convert_api_PersistentVolumeClaimStatus_To_v1_PersistentVolumeClaimStatus is an autogenerated conversion function.
+func Convert_api_PersistentVolumeClaimStatus_To_v1_PersistentVolumeClaimStatus(in *api.PersistentVolumeClaimStatus, out *PersistentVolumeClaimStatus, s conversion.Scope) error {
+ return autoConvert_api_PersistentVolumeClaimStatus_To_v1_PersistentVolumeClaimStatus(in, out, s)
+}
+
+func autoConvert_v1_PersistentVolumeClaimVolumeSource_To_api_PersistentVolumeClaimVolumeSource(in *PersistentVolumeClaimVolumeSource, out *api.PersistentVolumeClaimVolumeSource, s conversion.Scope) error {
+ out.ClaimName = in.ClaimName
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_v1_PersistentVolumeClaimVolumeSource_To_api_PersistentVolumeClaimVolumeSource is an autogenerated conversion function.
+func Convert_v1_PersistentVolumeClaimVolumeSource_To_api_PersistentVolumeClaimVolumeSource(in *PersistentVolumeClaimVolumeSource, out *api.PersistentVolumeClaimVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_PersistentVolumeClaimVolumeSource_To_api_PersistentVolumeClaimVolumeSource(in, out, s)
+}
+
+func autoConvert_api_PersistentVolumeClaimVolumeSource_To_v1_PersistentVolumeClaimVolumeSource(in *api.PersistentVolumeClaimVolumeSource, out *PersistentVolumeClaimVolumeSource, s conversion.Scope) error {
+ out.ClaimName = in.ClaimName
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_api_PersistentVolumeClaimVolumeSource_To_v1_PersistentVolumeClaimVolumeSource is an autogenerated conversion function.
+func Convert_api_PersistentVolumeClaimVolumeSource_To_v1_PersistentVolumeClaimVolumeSource(in *api.PersistentVolumeClaimVolumeSource, out *PersistentVolumeClaimVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_PersistentVolumeClaimVolumeSource_To_v1_PersistentVolumeClaimVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_PersistentVolumeList_To_api_PersistentVolumeList(in *PersistentVolumeList, out *api.PersistentVolumeList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]api.PersistentVolume, len(*in))
+ for i := range *in {
+ if err := Convert_v1_PersistentVolume_To_api_PersistentVolume(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1_PersistentVolumeList_To_api_PersistentVolumeList is an autogenerated conversion function.
+func Convert_v1_PersistentVolumeList_To_api_PersistentVolumeList(in *PersistentVolumeList, out *api.PersistentVolumeList, s conversion.Scope) error {
+ return autoConvert_v1_PersistentVolumeList_To_api_PersistentVolumeList(in, out, s)
+}
+
+func autoConvert_api_PersistentVolumeList_To_v1_PersistentVolumeList(in *api.PersistentVolumeList, out *PersistentVolumeList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PersistentVolume, len(*in))
+ for i := range *in {
+ if err := Convert_api_PersistentVolume_To_v1_PersistentVolume(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]PersistentVolume, 0)
+ }
+ return nil
+}
+
+// Convert_api_PersistentVolumeList_To_v1_PersistentVolumeList is an autogenerated conversion function.
+func Convert_api_PersistentVolumeList_To_v1_PersistentVolumeList(in *api.PersistentVolumeList, out *PersistentVolumeList, s conversion.Scope) error {
+ return autoConvert_api_PersistentVolumeList_To_v1_PersistentVolumeList(in, out, s)
+}
+
+func autoConvert_v1_PersistentVolumeSource_To_api_PersistentVolumeSource(in *PersistentVolumeSource, out *api.PersistentVolumeSource, s conversion.Scope) error {
+ out.GCEPersistentDisk = (*api.GCEPersistentDiskVolumeSource)(unsafe.Pointer(in.GCEPersistentDisk))
+ out.AWSElasticBlockStore = (*api.AWSElasticBlockStoreVolumeSource)(unsafe.Pointer(in.AWSElasticBlockStore))
+ out.HostPath = (*api.HostPathVolumeSource)(unsafe.Pointer(in.HostPath))
+ out.Glusterfs = (*api.GlusterfsVolumeSource)(unsafe.Pointer(in.Glusterfs))
+ out.NFS = (*api.NFSVolumeSource)(unsafe.Pointer(in.NFS))
+ out.RBD = (*api.RBDVolumeSource)(unsafe.Pointer(in.RBD))
+ out.ISCSI = (*api.ISCSIVolumeSource)(unsafe.Pointer(in.ISCSI))
+ out.Cinder = (*api.CinderVolumeSource)(unsafe.Pointer(in.Cinder))
+ out.CephFS = (*api.CephFSVolumeSource)(unsafe.Pointer(in.CephFS))
+ out.FC = (*api.FCVolumeSource)(unsafe.Pointer(in.FC))
+ out.Flocker = (*api.FlockerVolumeSource)(unsafe.Pointer(in.Flocker))
+ out.FlexVolume = (*api.FlexVolumeSource)(unsafe.Pointer(in.FlexVolume))
+ out.AzureFile = (*api.AzureFileVolumeSource)(unsafe.Pointer(in.AzureFile))
+ out.VsphereVolume = (*api.VsphereVirtualDiskVolumeSource)(unsafe.Pointer(in.VsphereVolume))
+ out.Quobyte = (*api.QuobyteVolumeSource)(unsafe.Pointer(in.Quobyte))
+ out.AzureDisk = (*api.AzureDiskVolumeSource)(unsafe.Pointer(in.AzureDisk))
+ out.PhotonPersistentDisk = (*api.PhotonPersistentDiskVolumeSource)(unsafe.Pointer(in.PhotonPersistentDisk))
+ out.PortworxVolume = (*api.PortworxVolumeSource)(unsafe.Pointer(in.PortworxVolume))
+ out.ScaleIO = (*api.ScaleIOVolumeSource)(unsafe.Pointer(in.ScaleIO))
+ out.Local = (*api.LocalVolumeSource)(unsafe.Pointer(in.Local))
+ out.StorageOS = (*api.StorageOSPersistentVolumeSource)(unsafe.Pointer(in.StorageOS))
+ return nil
+}
+
+// Convert_v1_PersistentVolumeSource_To_api_PersistentVolumeSource is an autogenerated conversion function.
+func Convert_v1_PersistentVolumeSource_To_api_PersistentVolumeSource(in *PersistentVolumeSource, out *api.PersistentVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_PersistentVolumeSource_To_api_PersistentVolumeSource(in, out, s)
+}
+
+func autoConvert_api_PersistentVolumeSource_To_v1_PersistentVolumeSource(in *api.PersistentVolumeSource, out *PersistentVolumeSource, s conversion.Scope) error {
+ out.GCEPersistentDisk = (*GCEPersistentDiskVolumeSource)(unsafe.Pointer(in.GCEPersistentDisk))
+ out.AWSElasticBlockStore = (*AWSElasticBlockStoreVolumeSource)(unsafe.Pointer(in.AWSElasticBlockStore))
+ out.HostPath = (*HostPathVolumeSource)(unsafe.Pointer(in.HostPath))
+ out.Glusterfs = (*GlusterfsVolumeSource)(unsafe.Pointer(in.Glusterfs))
+ out.NFS = (*NFSVolumeSource)(unsafe.Pointer(in.NFS))
+ out.RBD = (*RBDVolumeSource)(unsafe.Pointer(in.RBD))
+ out.Quobyte = (*QuobyteVolumeSource)(unsafe.Pointer(in.Quobyte))
+ out.ISCSI = (*ISCSIVolumeSource)(unsafe.Pointer(in.ISCSI))
+ out.FlexVolume = (*FlexVolumeSource)(unsafe.Pointer(in.FlexVolume))
+ out.Cinder = (*CinderVolumeSource)(unsafe.Pointer(in.Cinder))
+ out.CephFS = (*CephFSVolumeSource)(unsafe.Pointer(in.CephFS))
+ out.FC = (*FCVolumeSource)(unsafe.Pointer(in.FC))
+ out.Flocker = (*FlockerVolumeSource)(unsafe.Pointer(in.Flocker))
+ out.AzureFile = (*AzureFileVolumeSource)(unsafe.Pointer(in.AzureFile))
+ out.VsphereVolume = (*VsphereVirtualDiskVolumeSource)(unsafe.Pointer(in.VsphereVolume))
+ out.AzureDisk = (*AzureDiskVolumeSource)(unsafe.Pointer(in.AzureDisk))
+ out.PhotonPersistentDisk = (*PhotonPersistentDiskVolumeSource)(unsafe.Pointer(in.PhotonPersistentDisk))
+ out.PortworxVolume = (*PortworxVolumeSource)(unsafe.Pointer(in.PortworxVolume))
+ out.ScaleIO = (*ScaleIOVolumeSource)(unsafe.Pointer(in.ScaleIO))
+ out.Local = (*LocalVolumeSource)(unsafe.Pointer(in.Local))
+ out.StorageOS = (*StorageOSPersistentVolumeSource)(unsafe.Pointer(in.StorageOS))
+ return nil
+}
+
+// Convert_api_PersistentVolumeSource_To_v1_PersistentVolumeSource is an autogenerated conversion function.
+func Convert_api_PersistentVolumeSource_To_v1_PersistentVolumeSource(in *api.PersistentVolumeSource, out *PersistentVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_PersistentVolumeSource_To_v1_PersistentVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_PersistentVolumeSpec_To_api_PersistentVolumeSpec(in *PersistentVolumeSpec, out *api.PersistentVolumeSpec, s conversion.Scope) error {
+ out.Capacity = *(*api.ResourceList)(unsafe.Pointer(&in.Capacity))
+ if err := Convert_v1_PersistentVolumeSource_To_api_PersistentVolumeSource(&in.PersistentVolumeSource, &out.PersistentVolumeSource, s); err != nil {
+ return err
+ }
+ out.AccessModes = *(*[]api.PersistentVolumeAccessMode)(unsafe.Pointer(&in.AccessModes))
+ out.ClaimRef = (*api.ObjectReference)(unsafe.Pointer(in.ClaimRef))
+ out.PersistentVolumeReclaimPolicy = api.PersistentVolumeReclaimPolicy(in.PersistentVolumeReclaimPolicy)
+ out.StorageClassName = in.StorageClassName
+ return nil
+}
+
+// Convert_v1_PersistentVolumeSpec_To_api_PersistentVolumeSpec is an autogenerated conversion function.
+func Convert_v1_PersistentVolumeSpec_To_api_PersistentVolumeSpec(in *PersistentVolumeSpec, out *api.PersistentVolumeSpec, s conversion.Scope) error {
+ return autoConvert_v1_PersistentVolumeSpec_To_api_PersistentVolumeSpec(in, out, s)
+}
+
+func autoConvert_api_PersistentVolumeSpec_To_v1_PersistentVolumeSpec(in *api.PersistentVolumeSpec, out *PersistentVolumeSpec, s conversion.Scope) error {
+ out.Capacity = *(*ResourceList)(unsafe.Pointer(&in.Capacity))
+ if err := Convert_api_PersistentVolumeSource_To_v1_PersistentVolumeSource(&in.PersistentVolumeSource, &out.PersistentVolumeSource, s); err != nil {
+ return err
+ }
+ out.AccessModes = *(*[]PersistentVolumeAccessMode)(unsafe.Pointer(&in.AccessModes))
+ out.ClaimRef = (*ObjectReference)(unsafe.Pointer(in.ClaimRef))
+ out.PersistentVolumeReclaimPolicy = PersistentVolumeReclaimPolicy(in.PersistentVolumeReclaimPolicy)
+ out.StorageClassName = in.StorageClassName
+ return nil
+}
+
+// Convert_api_PersistentVolumeSpec_To_v1_PersistentVolumeSpec is an autogenerated conversion function.
+func Convert_api_PersistentVolumeSpec_To_v1_PersistentVolumeSpec(in *api.PersistentVolumeSpec, out *PersistentVolumeSpec, s conversion.Scope) error {
+ return autoConvert_api_PersistentVolumeSpec_To_v1_PersistentVolumeSpec(in, out, s)
+}
+
+func autoConvert_v1_PersistentVolumeStatus_To_api_PersistentVolumeStatus(in *PersistentVolumeStatus, out *api.PersistentVolumeStatus, s conversion.Scope) error {
+ out.Phase = api.PersistentVolumePhase(in.Phase)
+ out.Message = in.Message
+ out.Reason = in.Reason
+ return nil
+}
+
+// Convert_v1_PersistentVolumeStatus_To_api_PersistentVolumeStatus is an autogenerated conversion function.
+func Convert_v1_PersistentVolumeStatus_To_api_PersistentVolumeStatus(in *PersistentVolumeStatus, out *api.PersistentVolumeStatus, s conversion.Scope) error {
+ return autoConvert_v1_PersistentVolumeStatus_To_api_PersistentVolumeStatus(in, out, s)
+}
+
+func autoConvert_api_PersistentVolumeStatus_To_v1_PersistentVolumeStatus(in *api.PersistentVolumeStatus, out *PersistentVolumeStatus, s conversion.Scope) error {
+ out.Phase = PersistentVolumePhase(in.Phase)
+ out.Message = in.Message
+ out.Reason = in.Reason
+ return nil
+}
+
+// Convert_api_PersistentVolumeStatus_To_v1_PersistentVolumeStatus is an autogenerated conversion function.
+func Convert_api_PersistentVolumeStatus_To_v1_PersistentVolumeStatus(in *api.PersistentVolumeStatus, out *PersistentVolumeStatus, s conversion.Scope) error {
+ return autoConvert_api_PersistentVolumeStatus_To_v1_PersistentVolumeStatus(in, out, s)
+}
+
+func autoConvert_v1_PhotonPersistentDiskVolumeSource_To_api_PhotonPersistentDiskVolumeSource(in *PhotonPersistentDiskVolumeSource, out *api.PhotonPersistentDiskVolumeSource, s conversion.Scope) error {
+ out.PdID = in.PdID
+ out.FSType = in.FSType
+ return nil
+}
+
+// Convert_v1_PhotonPersistentDiskVolumeSource_To_api_PhotonPersistentDiskVolumeSource is an autogenerated conversion function.
+func Convert_v1_PhotonPersistentDiskVolumeSource_To_api_PhotonPersistentDiskVolumeSource(in *PhotonPersistentDiskVolumeSource, out *api.PhotonPersistentDiskVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_PhotonPersistentDiskVolumeSource_To_api_PhotonPersistentDiskVolumeSource(in, out, s)
+}
+
+func autoConvert_api_PhotonPersistentDiskVolumeSource_To_v1_PhotonPersistentDiskVolumeSource(in *api.PhotonPersistentDiskVolumeSource, out *PhotonPersistentDiskVolumeSource, s conversion.Scope) error {
+ out.PdID = in.PdID
+ out.FSType = in.FSType
+ return nil
+}
+
+// Convert_api_PhotonPersistentDiskVolumeSource_To_v1_PhotonPersistentDiskVolumeSource is an autogenerated conversion function.
+func Convert_api_PhotonPersistentDiskVolumeSource_To_v1_PhotonPersistentDiskVolumeSource(in *api.PhotonPersistentDiskVolumeSource, out *PhotonPersistentDiskVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_PhotonPersistentDiskVolumeSource_To_v1_PhotonPersistentDiskVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_Pod_To_api_Pod(in *Pod, out *api.Pod, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_PodSpec_To_api_PodSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_PodStatus_To_api_PodStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func autoConvert_api_Pod_To_v1_Pod(in *api.Pod, out *Pod, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_api_PodSpec_To_v1_PodSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_api_PodStatus_To_v1_PodStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func autoConvert_v1_PodAffinity_To_api_PodAffinity(in *PodAffinity, out *api.PodAffinity, s conversion.Scope) error {
+ out.RequiredDuringSchedulingIgnoredDuringExecution = *(*[]api.PodAffinityTerm)(unsafe.Pointer(&in.RequiredDuringSchedulingIgnoredDuringExecution))
+ out.PreferredDuringSchedulingIgnoredDuringExecution = *(*[]api.WeightedPodAffinityTerm)(unsafe.Pointer(&in.PreferredDuringSchedulingIgnoredDuringExecution))
+ return nil
+}
+
+// Convert_v1_PodAffinity_To_api_PodAffinity is an autogenerated conversion function.
+func Convert_v1_PodAffinity_To_api_PodAffinity(in *PodAffinity, out *api.PodAffinity, s conversion.Scope) error {
+ return autoConvert_v1_PodAffinity_To_api_PodAffinity(in, out, s)
+}
+
+func autoConvert_api_PodAffinity_To_v1_PodAffinity(in *api.PodAffinity, out *PodAffinity, s conversion.Scope) error {
+ out.RequiredDuringSchedulingIgnoredDuringExecution = *(*[]PodAffinityTerm)(unsafe.Pointer(&in.RequiredDuringSchedulingIgnoredDuringExecution))
+ out.PreferredDuringSchedulingIgnoredDuringExecution = *(*[]WeightedPodAffinityTerm)(unsafe.Pointer(&in.PreferredDuringSchedulingIgnoredDuringExecution))
+ return nil
+}
+
+// Convert_api_PodAffinity_To_v1_PodAffinity is an autogenerated conversion function.
+func Convert_api_PodAffinity_To_v1_PodAffinity(in *api.PodAffinity, out *PodAffinity, s conversion.Scope) error {
+ return autoConvert_api_PodAffinity_To_v1_PodAffinity(in, out, s)
+}
+
+func autoConvert_v1_PodAffinityTerm_To_api_PodAffinityTerm(in *PodAffinityTerm, out *api.PodAffinityTerm, s conversion.Scope) error {
+ out.LabelSelector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.LabelSelector))
+ out.Namespaces = *(*[]string)(unsafe.Pointer(&in.Namespaces))
+ out.TopologyKey = in.TopologyKey
+ return nil
+}
+
+// Convert_v1_PodAffinityTerm_To_api_PodAffinityTerm is an autogenerated conversion function.
+func Convert_v1_PodAffinityTerm_To_api_PodAffinityTerm(in *PodAffinityTerm, out *api.PodAffinityTerm, s conversion.Scope) error {
+ return autoConvert_v1_PodAffinityTerm_To_api_PodAffinityTerm(in, out, s)
+}
+
+func autoConvert_api_PodAffinityTerm_To_v1_PodAffinityTerm(in *api.PodAffinityTerm, out *PodAffinityTerm, s conversion.Scope) error {
+ out.LabelSelector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.LabelSelector))
+ out.Namespaces = *(*[]string)(unsafe.Pointer(&in.Namespaces))
+ out.TopologyKey = in.TopologyKey
+ return nil
+}
+
+// Convert_api_PodAffinityTerm_To_v1_PodAffinityTerm is an autogenerated conversion function.
+func Convert_api_PodAffinityTerm_To_v1_PodAffinityTerm(in *api.PodAffinityTerm, out *PodAffinityTerm, s conversion.Scope) error {
+ return autoConvert_api_PodAffinityTerm_To_v1_PodAffinityTerm(in, out, s)
+}
+
+func autoConvert_v1_PodAntiAffinity_To_api_PodAntiAffinity(in *PodAntiAffinity, out *api.PodAntiAffinity, s conversion.Scope) error {
+ out.RequiredDuringSchedulingIgnoredDuringExecution = *(*[]api.PodAffinityTerm)(unsafe.Pointer(&in.RequiredDuringSchedulingIgnoredDuringExecution))
+ out.PreferredDuringSchedulingIgnoredDuringExecution = *(*[]api.WeightedPodAffinityTerm)(unsafe.Pointer(&in.PreferredDuringSchedulingIgnoredDuringExecution))
+ return nil
+}
+
+// Convert_v1_PodAntiAffinity_To_api_PodAntiAffinity is an autogenerated conversion function.
+func Convert_v1_PodAntiAffinity_To_api_PodAntiAffinity(in *PodAntiAffinity, out *api.PodAntiAffinity, s conversion.Scope) error {
+ return autoConvert_v1_PodAntiAffinity_To_api_PodAntiAffinity(in, out, s)
+}
+
+func autoConvert_api_PodAntiAffinity_To_v1_PodAntiAffinity(in *api.PodAntiAffinity, out *PodAntiAffinity, s conversion.Scope) error {
+ out.RequiredDuringSchedulingIgnoredDuringExecution = *(*[]PodAffinityTerm)(unsafe.Pointer(&in.RequiredDuringSchedulingIgnoredDuringExecution))
+ out.PreferredDuringSchedulingIgnoredDuringExecution = *(*[]WeightedPodAffinityTerm)(unsafe.Pointer(&in.PreferredDuringSchedulingIgnoredDuringExecution))
+ return nil
+}
+
+// Convert_api_PodAntiAffinity_To_v1_PodAntiAffinity is an autogenerated conversion function.
+func Convert_api_PodAntiAffinity_To_v1_PodAntiAffinity(in *api.PodAntiAffinity, out *PodAntiAffinity, s conversion.Scope) error {
+ return autoConvert_api_PodAntiAffinity_To_v1_PodAntiAffinity(in, out, s)
+}
+
+func autoConvert_v1_PodAttachOptions_To_api_PodAttachOptions(in *PodAttachOptions, out *api.PodAttachOptions, s conversion.Scope) error {
+ out.Stdin = in.Stdin
+ out.Stdout = in.Stdout
+ out.Stderr = in.Stderr
+ out.TTY = in.TTY
+ out.Container = in.Container
+ return nil
+}
+
+// Convert_v1_PodAttachOptions_To_api_PodAttachOptions is an autogenerated conversion function.
+func Convert_v1_PodAttachOptions_To_api_PodAttachOptions(in *PodAttachOptions, out *api.PodAttachOptions, s conversion.Scope) error {
+ return autoConvert_v1_PodAttachOptions_To_api_PodAttachOptions(in, out, s)
+}
+
+func autoConvert_api_PodAttachOptions_To_v1_PodAttachOptions(in *api.PodAttachOptions, out *PodAttachOptions, s conversion.Scope) error {
+ out.Stdin = in.Stdin
+ out.Stdout = in.Stdout
+ out.Stderr = in.Stderr
+ out.TTY = in.TTY
+ out.Container = in.Container
+ return nil
+}
+
+// Convert_api_PodAttachOptions_To_v1_PodAttachOptions is an autogenerated conversion function.
+func Convert_api_PodAttachOptions_To_v1_PodAttachOptions(in *api.PodAttachOptions, out *PodAttachOptions, s conversion.Scope) error {
+ return autoConvert_api_PodAttachOptions_To_v1_PodAttachOptions(in, out, s)
+}
+
+func autoConvert_v1_PodCondition_To_api_PodCondition(in *PodCondition, out *api.PodCondition, s conversion.Scope) error {
+ out.Type = api.PodConditionType(in.Type)
+ out.Status = api.ConditionStatus(in.Status)
+ out.LastProbeTime = in.LastProbeTime
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_v1_PodCondition_To_api_PodCondition is an autogenerated conversion function.
+func Convert_v1_PodCondition_To_api_PodCondition(in *PodCondition, out *api.PodCondition, s conversion.Scope) error {
+ return autoConvert_v1_PodCondition_To_api_PodCondition(in, out, s)
+}
+
+func autoConvert_api_PodCondition_To_v1_PodCondition(in *api.PodCondition, out *PodCondition, s conversion.Scope) error {
+ out.Type = PodConditionType(in.Type)
+ out.Status = ConditionStatus(in.Status)
+ out.LastProbeTime = in.LastProbeTime
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_api_PodCondition_To_v1_PodCondition is an autogenerated conversion function.
+func Convert_api_PodCondition_To_v1_PodCondition(in *api.PodCondition, out *PodCondition, s conversion.Scope) error {
+ return autoConvert_api_PodCondition_To_v1_PodCondition(in, out, s)
+}
+
+func autoConvert_v1_PodExecOptions_To_api_PodExecOptions(in *PodExecOptions, out *api.PodExecOptions, s conversion.Scope) error {
+ out.Stdin = in.Stdin
+ out.Stdout = in.Stdout
+ out.Stderr = in.Stderr
+ out.TTY = in.TTY
+ out.Container = in.Container
+ out.Command = *(*[]string)(unsafe.Pointer(&in.Command))
+ return nil
+}
+
+// Convert_v1_PodExecOptions_To_api_PodExecOptions is an autogenerated conversion function.
+func Convert_v1_PodExecOptions_To_api_PodExecOptions(in *PodExecOptions, out *api.PodExecOptions, s conversion.Scope) error {
+ return autoConvert_v1_PodExecOptions_To_api_PodExecOptions(in, out, s)
+}
+
+func autoConvert_api_PodExecOptions_To_v1_PodExecOptions(in *api.PodExecOptions, out *PodExecOptions, s conversion.Scope) error {
+ out.Stdin = in.Stdin
+ out.Stdout = in.Stdout
+ out.Stderr = in.Stderr
+ out.TTY = in.TTY
+ out.Container = in.Container
+ if in.Command == nil {
+ out.Command = make([]string, 0)
+ } else {
+ out.Command = *(*[]string)(unsafe.Pointer(&in.Command))
+ }
+ return nil
+}
+
+// Convert_api_PodExecOptions_To_v1_PodExecOptions is an autogenerated conversion function.
+func Convert_api_PodExecOptions_To_v1_PodExecOptions(in *api.PodExecOptions, out *PodExecOptions, s conversion.Scope) error {
+ return autoConvert_api_PodExecOptions_To_v1_PodExecOptions(in, out, s)
+}
+
+func autoConvert_v1_PodList_To_api_PodList(in *PodList, out *api.PodList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]api.Pod, len(*in))
+ for i := range *in {
+ if err := Convert_v1_Pod_To_api_Pod(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1_PodList_To_api_PodList is an autogenerated conversion function.
+func Convert_v1_PodList_To_api_PodList(in *PodList, out *api.PodList, s conversion.Scope) error {
+ return autoConvert_v1_PodList_To_api_PodList(in, out, s)
+}
+
+func autoConvert_api_PodList_To_v1_PodList(in *api.PodList, out *PodList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Pod, len(*in))
+ for i := range *in {
+ if err := Convert_api_Pod_To_v1_Pod(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]Pod, 0)
+ }
+ return nil
+}
+
+// Convert_api_PodList_To_v1_PodList is an autogenerated conversion function.
+func Convert_api_PodList_To_v1_PodList(in *api.PodList, out *PodList, s conversion.Scope) error {
+ return autoConvert_api_PodList_To_v1_PodList(in, out, s)
+}
+
+func autoConvert_v1_PodLogOptions_To_api_PodLogOptions(in *PodLogOptions, out *api.PodLogOptions, s conversion.Scope) error {
+ out.Container = in.Container
+ out.Follow = in.Follow
+ out.Previous = in.Previous
+ out.SinceSeconds = (*int64)(unsafe.Pointer(in.SinceSeconds))
+ out.SinceTime = (*meta_v1.Time)(unsafe.Pointer(in.SinceTime))
+ out.Timestamps = in.Timestamps
+ out.TailLines = (*int64)(unsafe.Pointer(in.TailLines))
+ out.LimitBytes = (*int64)(unsafe.Pointer(in.LimitBytes))
+ return nil
+}
+
+// Convert_v1_PodLogOptions_To_api_PodLogOptions is an autogenerated conversion function.
+func Convert_v1_PodLogOptions_To_api_PodLogOptions(in *PodLogOptions, out *api.PodLogOptions, s conversion.Scope) error {
+ return autoConvert_v1_PodLogOptions_To_api_PodLogOptions(in, out, s)
+}
+
+func autoConvert_api_PodLogOptions_To_v1_PodLogOptions(in *api.PodLogOptions, out *PodLogOptions, s conversion.Scope) error {
+ out.Container = in.Container
+ out.Follow = in.Follow
+ out.Previous = in.Previous
+ out.SinceSeconds = (*int64)(unsafe.Pointer(in.SinceSeconds))
+ out.SinceTime = (*meta_v1.Time)(unsafe.Pointer(in.SinceTime))
+ out.Timestamps = in.Timestamps
+ out.TailLines = (*int64)(unsafe.Pointer(in.TailLines))
+ out.LimitBytes = (*int64)(unsafe.Pointer(in.LimitBytes))
+ return nil
+}
+
+// Convert_api_PodLogOptions_To_v1_PodLogOptions is an autogenerated conversion function.
+func Convert_api_PodLogOptions_To_v1_PodLogOptions(in *api.PodLogOptions, out *PodLogOptions, s conversion.Scope) error {
+ return autoConvert_api_PodLogOptions_To_v1_PodLogOptions(in, out, s)
+}
+
+func autoConvert_v1_PodPortForwardOptions_To_api_PodPortForwardOptions(in *PodPortForwardOptions, out *api.PodPortForwardOptions, s conversion.Scope) error {
+ out.Ports = *(*[]int32)(unsafe.Pointer(&in.Ports))
+ return nil
+}
+
+// Convert_v1_PodPortForwardOptions_To_api_PodPortForwardOptions is an autogenerated conversion function.
+func Convert_v1_PodPortForwardOptions_To_api_PodPortForwardOptions(in *PodPortForwardOptions, out *api.PodPortForwardOptions, s conversion.Scope) error {
+ return autoConvert_v1_PodPortForwardOptions_To_api_PodPortForwardOptions(in, out, s)
+}
+
+func autoConvert_api_PodPortForwardOptions_To_v1_PodPortForwardOptions(in *api.PodPortForwardOptions, out *PodPortForwardOptions, s conversion.Scope) error {
+ out.Ports = *(*[]int32)(unsafe.Pointer(&in.Ports))
+ return nil
+}
+
+// Convert_api_PodPortForwardOptions_To_v1_PodPortForwardOptions is an autogenerated conversion function.
+func Convert_api_PodPortForwardOptions_To_v1_PodPortForwardOptions(in *api.PodPortForwardOptions, out *PodPortForwardOptions, s conversion.Scope) error {
+ return autoConvert_api_PodPortForwardOptions_To_v1_PodPortForwardOptions(in, out, s)
+}
+
+func autoConvert_v1_PodProxyOptions_To_api_PodProxyOptions(in *PodProxyOptions, out *api.PodProxyOptions, s conversion.Scope) error {
+ out.Path = in.Path
+ return nil
+}
+
+// Convert_v1_PodProxyOptions_To_api_PodProxyOptions is an autogenerated conversion function.
+func Convert_v1_PodProxyOptions_To_api_PodProxyOptions(in *PodProxyOptions, out *api.PodProxyOptions, s conversion.Scope) error {
+ return autoConvert_v1_PodProxyOptions_To_api_PodProxyOptions(in, out, s)
+}
+
+func autoConvert_api_PodProxyOptions_To_v1_PodProxyOptions(in *api.PodProxyOptions, out *PodProxyOptions, s conversion.Scope) error {
+ out.Path = in.Path
+ return nil
+}
+
+// Convert_api_PodProxyOptions_To_v1_PodProxyOptions is an autogenerated conversion function.
+func Convert_api_PodProxyOptions_To_v1_PodProxyOptions(in *api.PodProxyOptions, out *PodProxyOptions, s conversion.Scope) error {
+ return autoConvert_api_PodProxyOptions_To_v1_PodProxyOptions(in, out, s)
+}
+
+func autoConvert_v1_PodSecurityContext_To_api_PodSecurityContext(in *PodSecurityContext, out *api.PodSecurityContext, s conversion.Scope) error {
+ out.SELinuxOptions = (*api.SELinuxOptions)(unsafe.Pointer(in.SELinuxOptions))
+ out.RunAsUser = (*int64)(unsafe.Pointer(in.RunAsUser))
+ out.RunAsNonRoot = (*bool)(unsafe.Pointer(in.RunAsNonRoot))
+ out.SupplementalGroups = *(*[]int64)(unsafe.Pointer(&in.SupplementalGroups))
+ out.FSGroup = (*int64)(unsafe.Pointer(in.FSGroup))
+ return nil
+}
+
+func autoConvert_api_PodSecurityContext_To_v1_PodSecurityContext(in *api.PodSecurityContext, out *PodSecurityContext, s conversion.Scope) error {
+ // INFO: in.HostNetwork opted out of conversion generation
+ // INFO: in.HostPID opted out of conversion generation
+ // INFO: in.HostIPC opted out of conversion generation
+ out.SELinuxOptions = (*SELinuxOptions)(unsafe.Pointer(in.SELinuxOptions))
+ out.RunAsUser = (*int64)(unsafe.Pointer(in.RunAsUser))
+ out.RunAsNonRoot = (*bool)(unsafe.Pointer(in.RunAsNonRoot))
+ out.SupplementalGroups = *(*[]int64)(unsafe.Pointer(&in.SupplementalGroups))
+ out.FSGroup = (*int64)(unsafe.Pointer(in.FSGroup))
+ return nil
+}
+
+func autoConvert_v1_PodSignature_To_api_PodSignature(in *PodSignature, out *api.PodSignature, s conversion.Scope) error {
+ out.PodController = (*meta_v1.OwnerReference)(unsafe.Pointer(in.PodController))
+ return nil
+}
+
+// Convert_v1_PodSignature_To_api_PodSignature is an autogenerated conversion function.
+func Convert_v1_PodSignature_To_api_PodSignature(in *PodSignature, out *api.PodSignature, s conversion.Scope) error {
+ return autoConvert_v1_PodSignature_To_api_PodSignature(in, out, s)
+}
+
+func autoConvert_api_PodSignature_To_v1_PodSignature(in *api.PodSignature, out *PodSignature, s conversion.Scope) error {
+ out.PodController = (*meta_v1.OwnerReference)(unsafe.Pointer(in.PodController))
+ return nil
+}
+
+// Convert_api_PodSignature_To_v1_PodSignature is an autogenerated conversion function.
+func Convert_api_PodSignature_To_v1_PodSignature(in *api.PodSignature, out *PodSignature, s conversion.Scope) error {
+ return autoConvert_api_PodSignature_To_v1_PodSignature(in, out, s)
+}
+
+func autoConvert_v1_PodSpec_To_api_PodSpec(in *PodSpec, out *api.PodSpec, s conversion.Scope) error {
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]api.Volume, len(*in))
+ for i := range *in {
+ if err := Convert_v1_Volume_To_api_Volume(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Volumes = nil
+ }
+ out.InitContainers = *(*[]api.Container)(unsafe.Pointer(&in.InitContainers))
+ out.Containers = *(*[]api.Container)(unsafe.Pointer(&in.Containers))
+ out.RestartPolicy = api.RestartPolicy(in.RestartPolicy)
+ out.TerminationGracePeriodSeconds = (*int64)(unsafe.Pointer(in.TerminationGracePeriodSeconds))
+ out.ActiveDeadlineSeconds = (*int64)(unsafe.Pointer(in.ActiveDeadlineSeconds))
+ out.DNSPolicy = api.DNSPolicy(in.DNSPolicy)
+ out.NodeSelector = *(*map[string]string)(unsafe.Pointer(&in.NodeSelector))
+ out.ServiceAccountName = in.ServiceAccountName
+ // INFO: in.DeprecatedServiceAccount opted out of conversion generation
+ out.AutomountServiceAccountToken = (*bool)(unsafe.Pointer(in.AutomountServiceAccountToken))
+ out.NodeName = in.NodeName
+ // INFO: in.HostNetwork opted out of conversion generation
+ // INFO: in.HostPID opted out of conversion generation
+ // INFO: in.HostIPC opted out of conversion generation
+ if in.SecurityContext != nil {
+ in, out := &in.SecurityContext, &out.SecurityContext
+ *out = new(api.PodSecurityContext)
+ if err := Convert_v1_PodSecurityContext_To_api_PodSecurityContext(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.SecurityContext = nil
+ }
+ out.ImagePullSecrets = *(*[]api.LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets))
+ out.Hostname = in.Hostname
+ out.Subdomain = in.Subdomain
+ out.Affinity = (*api.Affinity)(unsafe.Pointer(in.Affinity))
+ out.SchedulerName = in.SchedulerName
+ out.Tolerations = *(*[]api.Toleration)(unsafe.Pointer(&in.Tolerations))
+ out.HostAliases = *(*[]api.HostAlias)(unsafe.Pointer(&in.HostAliases))
+ return nil
+}
+
+func autoConvert_api_PodSpec_To_v1_PodSpec(in *api.PodSpec, out *PodSpec, s conversion.Scope) error {
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]Volume, len(*in))
+ for i := range *in {
+ if err := Convert_api_Volume_To_v1_Volume(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Volumes = nil
+ }
+ out.InitContainers = *(*[]Container)(unsafe.Pointer(&in.InitContainers))
+ if in.Containers == nil {
+ out.Containers = make([]Container, 0)
+ } else {
+ out.Containers = *(*[]Container)(unsafe.Pointer(&in.Containers))
+ }
+ out.RestartPolicy = RestartPolicy(in.RestartPolicy)
+ out.TerminationGracePeriodSeconds = (*int64)(unsafe.Pointer(in.TerminationGracePeriodSeconds))
+ out.ActiveDeadlineSeconds = (*int64)(unsafe.Pointer(in.ActiveDeadlineSeconds))
+ out.DNSPolicy = DNSPolicy(in.DNSPolicy)
+ out.NodeSelector = *(*map[string]string)(unsafe.Pointer(&in.NodeSelector))
+ out.ServiceAccountName = in.ServiceAccountName
+ out.AutomountServiceAccountToken = (*bool)(unsafe.Pointer(in.AutomountServiceAccountToken))
+ out.NodeName = in.NodeName
+ if in.SecurityContext != nil {
+ in, out := &in.SecurityContext, &out.SecurityContext
+ *out = new(PodSecurityContext)
+ if err := Convert_api_PodSecurityContext_To_v1_PodSecurityContext(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.SecurityContext = nil
+ }
+ out.ImagePullSecrets = *(*[]LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets))
+ out.Hostname = in.Hostname
+ out.Subdomain = in.Subdomain
+ out.Affinity = (*Affinity)(unsafe.Pointer(in.Affinity))
+ out.SchedulerName = in.SchedulerName
+ out.Tolerations = *(*[]Toleration)(unsafe.Pointer(&in.Tolerations))
+ out.HostAliases = *(*[]HostAlias)(unsafe.Pointer(&in.HostAliases))
+ return nil
+}
+
+func autoConvert_v1_PodStatus_To_api_PodStatus(in *PodStatus, out *api.PodStatus, s conversion.Scope) error {
+ out.Phase = api.PodPhase(in.Phase)
+ out.Conditions = *(*[]api.PodCondition)(unsafe.Pointer(&in.Conditions))
+ out.Message = in.Message
+ out.Reason = in.Reason
+ out.HostIP = in.HostIP
+ out.PodIP = in.PodIP
+ out.StartTime = (*meta_v1.Time)(unsafe.Pointer(in.StartTime))
+ out.InitContainerStatuses = *(*[]api.ContainerStatus)(unsafe.Pointer(&in.InitContainerStatuses))
+ out.ContainerStatuses = *(*[]api.ContainerStatus)(unsafe.Pointer(&in.ContainerStatuses))
+ out.QOSClass = api.PodQOSClass(in.QOSClass)
+ return nil
+}
+
+// Convert_v1_PodStatus_To_api_PodStatus is an autogenerated conversion function.
+func Convert_v1_PodStatus_To_api_PodStatus(in *PodStatus, out *api.PodStatus, s conversion.Scope) error {
+ return autoConvert_v1_PodStatus_To_api_PodStatus(in, out, s)
+}
+
+func autoConvert_api_PodStatus_To_v1_PodStatus(in *api.PodStatus, out *PodStatus, s conversion.Scope) error {
+ out.Phase = PodPhase(in.Phase)
+ out.Conditions = *(*[]PodCondition)(unsafe.Pointer(&in.Conditions))
+ out.Message = in.Message
+ out.Reason = in.Reason
+ out.HostIP = in.HostIP
+ out.PodIP = in.PodIP
+ out.StartTime = (*meta_v1.Time)(unsafe.Pointer(in.StartTime))
+ out.QOSClass = PodQOSClass(in.QOSClass)
+ out.InitContainerStatuses = *(*[]ContainerStatus)(unsafe.Pointer(&in.InitContainerStatuses))
+ out.ContainerStatuses = *(*[]ContainerStatus)(unsafe.Pointer(&in.ContainerStatuses))
+ return nil
+}
+
+// Convert_api_PodStatus_To_v1_PodStatus is an autogenerated conversion function.
+func Convert_api_PodStatus_To_v1_PodStatus(in *api.PodStatus, out *PodStatus, s conversion.Scope) error {
+ return autoConvert_api_PodStatus_To_v1_PodStatus(in, out, s)
+}
+
+func autoConvert_v1_PodStatusResult_To_api_PodStatusResult(in *PodStatusResult, out *api.PodStatusResult, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_PodStatus_To_api_PodStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func autoConvert_api_PodStatusResult_To_v1_PodStatusResult(in *api.PodStatusResult, out *PodStatusResult, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_api_PodStatus_To_v1_PodStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func autoConvert_v1_PodTemplate_To_api_PodTemplate(in *PodTemplate, out *api.PodTemplate, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_PodTemplate_To_api_PodTemplate is an autogenerated conversion function.
+func Convert_v1_PodTemplate_To_api_PodTemplate(in *PodTemplate, out *api.PodTemplate, s conversion.Scope) error {
+ return autoConvert_v1_PodTemplate_To_api_PodTemplate(in, out, s)
+}
+
+func autoConvert_api_PodTemplate_To_v1_PodTemplate(in *api.PodTemplate, out *PodTemplate, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_PodTemplate_To_v1_PodTemplate is an autogenerated conversion function.
+func Convert_api_PodTemplate_To_v1_PodTemplate(in *api.PodTemplate, out *PodTemplate, s conversion.Scope) error {
+ return autoConvert_api_PodTemplate_To_v1_PodTemplate(in, out, s)
+}
+
+func autoConvert_v1_PodTemplateList_To_api_PodTemplateList(in *PodTemplateList, out *api.PodTemplateList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]api.PodTemplate, len(*in))
+ for i := range *in {
+ if err := Convert_v1_PodTemplate_To_api_PodTemplate(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1_PodTemplateList_To_api_PodTemplateList is an autogenerated conversion function.
+func Convert_v1_PodTemplateList_To_api_PodTemplateList(in *PodTemplateList, out *api.PodTemplateList, s conversion.Scope) error {
+ return autoConvert_v1_PodTemplateList_To_api_PodTemplateList(in, out, s)
+}
+
+func autoConvert_api_PodTemplateList_To_v1_PodTemplateList(in *api.PodTemplateList, out *PodTemplateList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodTemplate, len(*in))
+ for i := range *in {
+ if err := Convert_api_PodTemplate_To_v1_PodTemplate(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]PodTemplate, 0)
+ }
+ return nil
+}
+
+// Convert_api_PodTemplateList_To_v1_PodTemplateList is an autogenerated conversion function.
+func Convert_api_PodTemplateList_To_v1_PodTemplateList(in *api.PodTemplateList, out *PodTemplateList, s conversion.Scope) error {
+ return autoConvert_api_PodTemplateList_To_v1_PodTemplateList(in, out, s)
+}
+
+func autoConvert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in *PodTemplateSpec, out *api.PodTemplateSpec, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_PodSpec_To_api_PodSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func autoConvert_api_PodTemplateSpec_To_v1_PodTemplateSpec(in *api.PodTemplateSpec, out *PodTemplateSpec, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_api_PodSpec_To_v1_PodSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func autoConvert_v1_PortworxVolumeSource_To_api_PortworxVolumeSource(in *PortworxVolumeSource, out *api.PortworxVolumeSource, s conversion.Scope) error {
+ out.VolumeID = in.VolumeID
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_v1_PortworxVolumeSource_To_api_PortworxVolumeSource is an autogenerated conversion function.
+func Convert_v1_PortworxVolumeSource_To_api_PortworxVolumeSource(in *PortworxVolumeSource, out *api.PortworxVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_PortworxVolumeSource_To_api_PortworxVolumeSource(in, out, s)
+}
+
+func autoConvert_api_PortworxVolumeSource_To_v1_PortworxVolumeSource(in *api.PortworxVolumeSource, out *PortworxVolumeSource, s conversion.Scope) error {
+ out.VolumeID = in.VolumeID
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_api_PortworxVolumeSource_To_v1_PortworxVolumeSource is an autogenerated conversion function.
+func Convert_api_PortworxVolumeSource_To_v1_PortworxVolumeSource(in *api.PortworxVolumeSource, out *PortworxVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_PortworxVolumeSource_To_v1_PortworxVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_Preconditions_To_api_Preconditions(in *Preconditions, out *api.Preconditions, s conversion.Scope) error {
+ out.UID = (*types.UID)(unsafe.Pointer(in.UID))
+ return nil
+}
+
+// Convert_v1_Preconditions_To_api_Preconditions is an autogenerated conversion function.
+func Convert_v1_Preconditions_To_api_Preconditions(in *Preconditions, out *api.Preconditions, s conversion.Scope) error {
+ return autoConvert_v1_Preconditions_To_api_Preconditions(in, out, s)
+}
+
+func autoConvert_api_Preconditions_To_v1_Preconditions(in *api.Preconditions, out *Preconditions, s conversion.Scope) error {
+ out.UID = (*types.UID)(unsafe.Pointer(in.UID))
+ return nil
+}
+
+// Convert_api_Preconditions_To_v1_Preconditions is an autogenerated conversion function.
+func Convert_api_Preconditions_To_v1_Preconditions(in *api.Preconditions, out *Preconditions, s conversion.Scope) error {
+ return autoConvert_api_Preconditions_To_v1_Preconditions(in, out, s)
+}
+
+func autoConvert_v1_PreferAvoidPodsEntry_To_api_PreferAvoidPodsEntry(in *PreferAvoidPodsEntry, out *api.PreferAvoidPodsEntry, s conversion.Scope) error {
+ if err := Convert_v1_PodSignature_To_api_PodSignature(&in.PodSignature, &out.PodSignature, s); err != nil {
+ return err
+ }
+ out.EvictionTime = in.EvictionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_v1_PreferAvoidPodsEntry_To_api_PreferAvoidPodsEntry is an autogenerated conversion function.
+func Convert_v1_PreferAvoidPodsEntry_To_api_PreferAvoidPodsEntry(in *PreferAvoidPodsEntry, out *api.PreferAvoidPodsEntry, s conversion.Scope) error {
+ return autoConvert_v1_PreferAvoidPodsEntry_To_api_PreferAvoidPodsEntry(in, out, s)
+}
+
+func autoConvert_api_PreferAvoidPodsEntry_To_v1_PreferAvoidPodsEntry(in *api.PreferAvoidPodsEntry, out *PreferAvoidPodsEntry, s conversion.Scope) error {
+ if err := Convert_api_PodSignature_To_v1_PodSignature(&in.PodSignature, &out.PodSignature, s); err != nil {
+ return err
+ }
+ out.EvictionTime = in.EvictionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_api_PreferAvoidPodsEntry_To_v1_PreferAvoidPodsEntry is an autogenerated conversion function.
+func Convert_api_PreferAvoidPodsEntry_To_v1_PreferAvoidPodsEntry(in *api.PreferAvoidPodsEntry, out *PreferAvoidPodsEntry, s conversion.Scope) error {
+ return autoConvert_api_PreferAvoidPodsEntry_To_v1_PreferAvoidPodsEntry(in, out, s)
+}
+
+func autoConvert_v1_PreferredSchedulingTerm_To_api_PreferredSchedulingTerm(in *PreferredSchedulingTerm, out *api.PreferredSchedulingTerm, s conversion.Scope) error {
+ out.Weight = in.Weight
+ if err := Convert_v1_NodeSelectorTerm_To_api_NodeSelectorTerm(&in.Preference, &out.Preference, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_PreferredSchedulingTerm_To_api_PreferredSchedulingTerm is an autogenerated conversion function.
+func Convert_v1_PreferredSchedulingTerm_To_api_PreferredSchedulingTerm(in *PreferredSchedulingTerm, out *api.PreferredSchedulingTerm, s conversion.Scope) error {
+ return autoConvert_v1_PreferredSchedulingTerm_To_api_PreferredSchedulingTerm(in, out, s)
+}
+
+func autoConvert_api_PreferredSchedulingTerm_To_v1_PreferredSchedulingTerm(in *api.PreferredSchedulingTerm, out *PreferredSchedulingTerm, s conversion.Scope) error {
+ out.Weight = in.Weight
+ if err := Convert_api_NodeSelectorTerm_To_v1_NodeSelectorTerm(&in.Preference, &out.Preference, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_PreferredSchedulingTerm_To_v1_PreferredSchedulingTerm is an autogenerated conversion function.
+func Convert_api_PreferredSchedulingTerm_To_v1_PreferredSchedulingTerm(in *api.PreferredSchedulingTerm, out *PreferredSchedulingTerm, s conversion.Scope) error {
+ return autoConvert_api_PreferredSchedulingTerm_To_v1_PreferredSchedulingTerm(in, out, s)
+}
+
+func autoConvert_v1_Probe_To_api_Probe(in *Probe, out *api.Probe, s conversion.Scope) error {
+ if err := Convert_v1_Handler_To_api_Handler(&in.Handler, &out.Handler, s); err != nil {
+ return err
+ }
+ out.InitialDelaySeconds = in.InitialDelaySeconds
+ out.TimeoutSeconds = in.TimeoutSeconds
+ out.PeriodSeconds = in.PeriodSeconds
+ out.SuccessThreshold = in.SuccessThreshold
+ out.FailureThreshold = in.FailureThreshold
+ return nil
+}
+
+// Convert_v1_Probe_To_api_Probe is an autogenerated conversion function.
+func Convert_v1_Probe_To_api_Probe(in *Probe, out *api.Probe, s conversion.Scope) error {
+ return autoConvert_v1_Probe_To_api_Probe(in, out, s)
+}
+
+func autoConvert_api_Probe_To_v1_Probe(in *api.Probe, out *Probe, s conversion.Scope) error {
+ if err := Convert_api_Handler_To_v1_Handler(&in.Handler, &out.Handler, s); err != nil {
+ return err
+ }
+ out.InitialDelaySeconds = in.InitialDelaySeconds
+ out.TimeoutSeconds = in.TimeoutSeconds
+ out.PeriodSeconds = in.PeriodSeconds
+ out.SuccessThreshold = in.SuccessThreshold
+ out.FailureThreshold = in.FailureThreshold
+ return nil
+}
+
+// Convert_api_Probe_To_v1_Probe is an autogenerated conversion function.
+func Convert_api_Probe_To_v1_Probe(in *api.Probe, out *Probe, s conversion.Scope) error {
+ return autoConvert_api_Probe_To_v1_Probe(in, out, s)
+}
+
+func autoConvert_v1_ProjectedVolumeSource_To_api_ProjectedVolumeSource(in *ProjectedVolumeSource, out *api.ProjectedVolumeSource, s conversion.Scope) error {
+ out.Sources = *(*[]api.VolumeProjection)(unsafe.Pointer(&in.Sources))
+ out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode))
+ return nil
+}
+
+// Convert_v1_ProjectedVolumeSource_To_api_ProjectedVolumeSource is an autogenerated conversion function.
+func Convert_v1_ProjectedVolumeSource_To_api_ProjectedVolumeSource(in *ProjectedVolumeSource, out *api.ProjectedVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_ProjectedVolumeSource_To_api_ProjectedVolumeSource(in, out, s)
+}
+
+func autoConvert_api_ProjectedVolumeSource_To_v1_ProjectedVolumeSource(in *api.ProjectedVolumeSource, out *ProjectedVolumeSource, s conversion.Scope) error {
+ if in.Sources == nil {
+ out.Sources = make([]VolumeProjection, 0)
+ } else {
+ out.Sources = *(*[]VolumeProjection)(unsafe.Pointer(&in.Sources))
+ }
+ out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode))
+ return nil
+}
+
+// Convert_api_ProjectedVolumeSource_To_v1_ProjectedVolumeSource is an autogenerated conversion function.
+func Convert_api_ProjectedVolumeSource_To_v1_ProjectedVolumeSource(in *api.ProjectedVolumeSource, out *ProjectedVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_ProjectedVolumeSource_To_v1_ProjectedVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_QuobyteVolumeSource_To_api_QuobyteVolumeSource(in *QuobyteVolumeSource, out *api.QuobyteVolumeSource, s conversion.Scope) error {
+ out.Registry = in.Registry
+ out.Volume = in.Volume
+ out.ReadOnly = in.ReadOnly
+ out.User = in.User
+ out.Group = in.Group
+ return nil
+}
+
+// Convert_v1_QuobyteVolumeSource_To_api_QuobyteVolumeSource is an autogenerated conversion function.
+func Convert_v1_QuobyteVolumeSource_To_api_QuobyteVolumeSource(in *QuobyteVolumeSource, out *api.QuobyteVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_QuobyteVolumeSource_To_api_QuobyteVolumeSource(in, out, s)
+}
+
+func autoConvert_api_QuobyteVolumeSource_To_v1_QuobyteVolumeSource(in *api.QuobyteVolumeSource, out *QuobyteVolumeSource, s conversion.Scope) error {
+ out.Registry = in.Registry
+ out.Volume = in.Volume
+ out.ReadOnly = in.ReadOnly
+ out.User = in.User
+ out.Group = in.Group
+ return nil
+}
+
+// Convert_api_QuobyteVolumeSource_To_v1_QuobyteVolumeSource is an autogenerated conversion function.
+func Convert_api_QuobyteVolumeSource_To_v1_QuobyteVolumeSource(in *api.QuobyteVolumeSource, out *QuobyteVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_QuobyteVolumeSource_To_v1_QuobyteVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_RBDVolumeSource_To_api_RBDVolumeSource(in *RBDVolumeSource, out *api.RBDVolumeSource, s conversion.Scope) error {
+ out.CephMonitors = *(*[]string)(unsafe.Pointer(&in.CephMonitors))
+ out.RBDImage = in.RBDImage
+ out.FSType = in.FSType
+ out.RBDPool = in.RBDPool
+ out.RadosUser = in.RadosUser
+ out.Keyring = in.Keyring
+ out.SecretRef = (*api.LocalObjectReference)(unsafe.Pointer(in.SecretRef))
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_v1_RBDVolumeSource_To_api_RBDVolumeSource is an autogenerated conversion function.
+func Convert_v1_RBDVolumeSource_To_api_RBDVolumeSource(in *RBDVolumeSource, out *api.RBDVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_RBDVolumeSource_To_api_RBDVolumeSource(in, out, s)
+}
+
+func autoConvert_api_RBDVolumeSource_To_v1_RBDVolumeSource(in *api.RBDVolumeSource, out *RBDVolumeSource, s conversion.Scope) error {
+ if in.CephMonitors == nil {
+ out.CephMonitors = make([]string, 0)
+ } else {
+ out.CephMonitors = *(*[]string)(unsafe.Pointer(&in.CephMonitors))
+ }
+ out.RBDImage = in.RBDImage
+ out.FSType = in.FSType
+ out.RBDPool = in.RBDPool
+ out.RadosUser = in.RadosUser
+ out.Keyring = in.Keyring
+ out.SecretRef = (*LocalObjectReference)(unsafe.Pointer(in.SecretRef))
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_api_RBDVolumeSource_To_v1_RBDVolumeSource is an autogenerated conversion function.
+func Convert_api_RBDVolumeSource_To_v1_RBDVolumeSource(in *api.RBDVolumeSource, out *RBDVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_RBDVolumeSource_To_v1_RBDVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_RangeAllocation_To_api_RangeAllocation(in *RangeAllocation, out *api.RangeAllocation, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Range = in.Range
+ out.Data = *(*[]byte)(unsafe.Pointer(&in.Data))
+ return nil
+}
+
+// Convert_v1_RangeAllocation_To_api_RangeAllocation is an autogenerated conversion function.
+func Convert_v1_RangeAllocation_To_api_RangeAllocation(in *RangeAllocation, out *api.RangeAllocation, s conversion.Scope) error {
+ return autoConvert_v1_RangeAllocation_To_api_RangeAllocation(in, out, s)
+}
+
+func autoConvert_api_RangeAllocation_To_v1_RangeAllocation(in *api.RangeAllocation, out *RangeAllocation, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Range = in.Range
+ if in.Data == nil {
+ out.Data = make([]byte, 0)
+ } else {
+ out.Data = *(*[]byte)(unsafe.Pointer(&in.Data))
+ }
+ return nil
+}
+
+// Convert_api_RangeAllocation_To_v1_RangeAllocation is an autogenerated conversion function.
+func Convert_api_RangeAllocation_To_v1_RangeAllocation(in *api.RangeAllocation, out *RangeAllocation, s conversion.Scope) error {
+ return autoConvert_api_RangeAllocation_To_v1_RangeAllocation(in, out, s)
+}
+
+func autoConvert_v1_ReplicationController_To_api_ReplicationController(in *ReplicationController, out *api.ReplicationController, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_ReplicationControllerSpec_To_api_ReplicationControllerSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ReplicationControllerStatus_To_api_ReplicationControllerStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_ReplicationController_To_api_ReplicationController is an autogenerated conversion function.
+func Convert_v1_ReplicationController_To_api_ReplicationController(in *ReplicationController, out *api.ReplicationController, s conversion.Scope) error {
+ return autoConvert_v1_ReplicationController_To_api_ReplicationController(in, out, s)
+}
+
+func autoConvert_api_ReplicationController_To_v1_ReplicationController(in *api.ReplicationController, out *ReplicationController, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_api_ReplicationControllerSpec_To_v1_ReplicationControllerSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ReplicationControllerStatus_To_v1_ReplicationControllerStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_ReplicationController_To_v1_ReplicationController is an autogenerated conversion function.
+func Convert_api_ReplicationController_To_v1_ReplicationController(in *api.ReplicationController, out *ReplicationController, s conversion.Scope) error {
+ return autoConvert_api_ReplicationController_To_v1_ReplicationController(in, out, s)
+}
+
+func autoConvert_v1_ReplicationControllerCondition_To_api_ReplicationControllerCondition(in *ReplicationControllerCondition, out *api.ReplicationControllerCondition, s conversion.Scope) error {
+ out.Type = api.ReplicationControllerConditionType(in.Type)
+ out.Status = api.ConditionStatus(in.Status)
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_v1_ReplicationControllerCondition_To_api_ReplicationControllerCondition is an autogenerated conversion function.
+func Convert_v1_ReplicationControllerCondition_To_api_ReplicationControllerCondition(in *ReplicationControllerCondition, out *api.ReplicationControllerCondition, s conversion.Scope) error {
+ return autoConvert_v1_ReplicationControllerCondition_To_api_ReplicationControllerCondition(in, out, s)
+}
+
+func autoConvert_api_ReplicationControllerCondition_To_v1_ReplicationControllerCondition(in *api.ReplicationControllerCondition, out *ReplicationControllerCondition, s conversion.Scope) error {
+ out.Type = ReplicationControllerConditionType(in.Type)
+ out.Status = ConditionStatus(in.Status)
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_api_ReplicationControllerCondition_To_v1_ReplicationControllerCondition is an autogenerated conversion function.
+func Convert_api_ReplicationControllerCondition_To_v1_ReplicationControllerCondition(in *api.ReplicationControllerCondition, out *ReplicationControllerCondition, s conversion.Scope) error {
+ return autoConvert_api_ReplicationControllerCondition_To_v1_ReplicationControllerCondition(in, out, s)
+}
+
+func autoConvert_v1_ReplicationControllerList_To_api_ReplicationControllerList(in *ReplicationControllerList, out *api.ReplicationControllerList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]api.ReplicationController, len(*in))
+ for i := range *in {
+ if err := Convert_v1_ReplicationController_To_api_ReplicationController(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1_ReplicationControllerList_To_api_ReplicationControllerList is an autogenerated conversion function.
+func Convert_v1_ReplicationControllerList_To_api_ReplicationControllerList(in *ReplicationControllerList, out *api.ReplicationControllerList, s conversion.Scope) error {
+ return autoConvert_v1_ReplicationControllerList_To_api_ReplicationControllerList(in, out, s)
+}
+
+func autoConvert_api_ReplicationControllerList_To_v1_ReplicationControllerList(in *api.ReplicationControllerList, out *ReplicationControllerList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ReplicationController, len(*in))
+ for i := range *in {
+ if err := Convert_api_ReplicationController_To_v1_ReplicationController(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]ReplicationController, 0)
+ }
+ return nil
+}
+
+// Convert_api_ReplicationControllerList_To_v1_ReplicationControllerList is an autogenerated conversion function.
+func Convert_api_ReplicationControllerList_To_v1_ReplicationControllerList(in *api.ReplicationControllerList, out *ReplicationControllerList, s conversion.Scope) error {
+ return autoConvert_api_ReplicationControllerList_To_v1_ReplicationControllerList(in, out, s)
+}
+
+func autoConvert_v1_ReplicationControllerSpec_To_api_ReplicationControllerSpec(in *ReplicationControllerSpec, out *api.ReplicationControllerSpec, s conversion.Scope) error {
+ if err := meta_v1.Convert_Pointer_int32_To_int32(&in.Replicas, &out.Replicas, s); err != nil {
+ return err
+ }
+ out.MinReadySeconds = in.MinReadySeconds
+ out.Selector = *(*map[string]string)(unsafe.Pointer(&in.Selector))
+ if in.Template != nil {
+ in, out := &in.Template, &out.Template
+ *out = new(api.PodTemplateSpec)
+ if err := Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Template = nil
+ }
+ return nil
+}
+
+func autoConvert_api_ReplicationControllerSpec_To_v1_ReplicationControllerSpec(in *api.ReplicationControllerSpec, out *ReplicationControllerSpec, s conversion.Scope) error {
+ if err := meta_v1.Convert_int32_To_Pointer_int32(&in.Replicas, &out.Replicas, s); err != nil {
+ return err
+ }
+ out.MinReadySeconds = in.MinReadySeconds
+ out.Selector = *(*map[string]string)(unsafe.Pointer(&in.Selector))
+ if in.Template != nil {
+ in, out := &in.Template, &out.Template
+ *out = new(PodTemplateSpec)
+ if err := Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Template = nil
+ }
+ return nil
+}
+
+func autoConvert_v1_ReplicationControllerStatus_To_api_ReplicationControllerStatus(in *ReplicationControllerStatus, out *api.ReplicationControllerStatus, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ out.FullyLabeledReplicas = in.FullyLabeledReplicas
+ out.ReadyReplicas = in.ReadyReplicas
+ out.AvailableReplicas = in.AvailableReplicas
+ out.ObservedGeneration = in.ObservedGeneration
+ out.Conditions = *(*[]api.ReplicationControllerCondition)(unsafe.Pointer(&in.Conditions))
+ return nil
+}
+
+// Convert_v1_ReplicationControllerStatus_To_api_ReplicationControllerStatus is an autogenerated conversion function.
+func Convert_v1_ReplicationControllerStatus_To_api_ReplicationControllerStatus(in *ReplicationControllerStatus, out *api.ReplicationControllerStatus, s conversion.Scope) error {
+ return autoConvert_v1_ReplicationControllerStatus_To_api_ReplicationControllerStatus(in, out, s)
+}
+
+func autoConvert_api_ReplicationControllerStatus_To_v1_ReplicationControllerStatus(in *api.ReplicationControllerStatus, out *ReplicationControllerStatus, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ out.FullyLabeledReplicas = in.FullyLabeledReplicas
+ out.ReadyReplicas = in.ReadyReplicas
+ out.AvailableReplicas = in.AvailableReplicas
+ out.ObservedGeneration = in.ObservedGeneration
+ out.Conditions = *(*[]ReplicationControllerCondition)(unsafe.Pointer(&in.Conditions))
+ return nil
+}
+
+// Convert_api_ReplicationControllerStatus_To_v1_ReplicationControllerStatus is an autogenerated conversion function.
+func Convert_api_ReplicationControllerStatus_To_v1_ReplicationControllerStatus(in *api.ReplicationControllerStatus, out *ReplicationControllerStatus, s conversion.Scope) error {
+ return autoConvert_api_ReplicationControllerStatus_To_v1_ReplicationControllerStatus(in, out, s)
+}
+
+func autoConvert_v1_ResourceFieldSelector_To_api_ResourceFieldSelector(in *ResourceFieldSelector, out *api.ResourceFieldSelector, s conversion.Scope) error {
+ out.ContainerName = in.ContainerName
+ out.Resource = in.Resource
+ out.Divisor = in.Divisor
+ return nil
+}
+
+// Convert_v1_ResourceFieldSelector_To_api_ResourceFieldSelector is an autogenerated conversion function.
+func Convert_v1_ResourceFieldSelector_To_api_ResourceFieldSelector(in *ResourceFieldSelector, out *api.ResourceFieldSelector, s conversion.Scope) error {
+ return autoConvert_v1_ResourceFieldSelector_To_api_ResourceFieldSelector(in, out, s)
+}
+
+func autoConvert_api_ResourceFieldSelector_To_v1_ResourceFieldSelector(in *api.ResourceFieldSelector, out *ResourceFieldSelector, s conversion.Scope) error {
+ out.ContainerName = in.ContainerName
+ out.Resource = in.Resource
+ out.Divisor = in.Divisor
+ return nil
+}
+
+// Convert_api_ResourceFieldSelector_To_v1_ResourceFieldSelector is an autogenerated conversion function.
+func Convert_api_ResourceFieldSelector_To_v1_ResourceFieldSelector(in *api.ResourceFieldSelector, out *ResourceFieldSelector, s conversion.Scope) error {
+ return autoConvert_api_ResourceFieldSelector_To_v1_ResourceFieldSelector(in, out, s)
+}
+
+func autoConvert_v1_ResourceQuota_To_api_ResourceQuota(in *ResourceQuota, out *api.ResourceQuota, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_ResourceQuotaSpec_To_api_ResourceQuotaSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ResourceQuotaStatus_To_api_ResourceQuotaStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_ResourceQuota_To_api_ResourceQuota is an autogenerated conversion function.
+func Convert_v1_ResourceQuota_To_api_ResourceQuota(in *ResourceQuota, out *api.ResourceQuota, s conversion.Scope) error {
+ return autoConvert_v1_ResourceQuota_To_api_ResourceQuota(in, out, s)
+}
+
+func autoConvert_api_ResourceQuota_To_v1_ResourceQuota(in *api.ResourceQuota, out *ResourceQuota, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_api_ResourceQuotaSpec_To_v1_ResourceQuotaSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ResourceQuotaStatus_To_v1_ResourceQuotaStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_ResourceQuota_To_v1_ResourceQuota is an autogenerated conversion function.
+func Convert_api_ResourceQuota_To_v1_ResourceQuota(in *api.ResourceQuota, out *ResourceQuota, s conversion.Scope) error {
+ return autoConvert_api_ResourceQuota_To_v1_ResourceQuota(in, out, s)
+}
+
+func autoConvert_v1_ResourceQuotaList_To_api_ResourceQuotaList(in *ResourceQuotaList, out *api.ResourceQuotaList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]api.ResourceQuota)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1_ResourceQuotaList_To_api_ResourceQuotaList is an autogenerated conversion function.
+func Convert_v1_ResourceQuotaList_To_api_ResourceQuotaList(in *ResourceQuotaList, out *api.ResourceQuotaList, s conversion.Scope) error {
+ return autoConvert_v1_ResourceQuotaList_To_api_ResourceQuotaList(in, out, s)
+}
+
+func autoConvert_api_ResourceQuotaList_To_v1_ResourceQuotaList(in *api.ResourceQuotaList, out *ResourceQuotaList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]ResourceQuota, 0)
+ } else {
+ out.Items = *(*[]ResourceQuota)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_api_ResourceQuotaList_To_v1_ResourceQuotaList is an autogenerated conversion function.
+func Convert_api_ResourceQuotaList_To_v1_ResourceQuotaList(in *api.ResourceQuotaList, out *ResourceQuotaList, s conversion.Scope) error {
+ return autoConvert_api_ResourceQuotaList_To_v1_ResourceQuotaList(in, out, s)
+}
+
+func autoConvert_v1_ResourceQuotaSpec_To_api_ResourceQuotaSpec(in *ResourceQuotaSpec, out *api.ResourceQuotaSpec, s conversion.Scope) error {
+ out.Hard = *(*api.ResourceList)(unsafe.Pointer(&in.Hard))
+ out.Scopes = *(*[]api.ResourceQuotaScope)(unsafe.Pointer(&in.Scopes))
+ return nil
+}
+
+// Convert_v1_ResourceQuotaSpec_To_api_ResourceQuotaSpec is an autogenerated conversion function.
+func Convert_v1_ResourceQuotaSpec_To_api_ResourceQuotaSpec(in *ResourceQuotaSpec, out *api.ResourceQuotaSpec, s conversion.Scope) error {
+ return autoConvert_v1_ResourceQuotaSpec_To_api_ResourceQuotaSpec(in, out, s)
+}
+
+func autoConvert_api_ResourceQuotaSpec_To_v1_ResourceQuotaSpec(in *api.ResourceQuotaSpec, out *ResourceQuotaSpec, s conversion.Scope) error {
+ out.Hard = *(*ResourceList)(unsafe.Pointer(&in.Hard))
+ out.Scopes = *(*[]ResourceQuotaScope)(unsafe.Pointer(&in.Scopes))
+ return nil
+}
+
+// Convert_api_ResourceQuotaSpec_To_v1_ResourceQuotaSpec is an autogenerated conversion function.
+func Convert_api_ResourceQuotaSpec_To_v1_ResourceQuotaSpec(in *api.ResourceQuotaSpec, out *ResourceQuotaSpec, s conversion.Scope) error {
+ return autoConvert_api_ResourceQuotaSpec_To_v1_ResourceQuotaSpec(in, out, s)
+}
+
+func autoConvert_v1_ResourceQuotaStatus_To_api_ResourceQuotaStatus(in *ResourceQuotaStatus, out *api.ResourceQuotaStatus, s conversion.Scope) error {
+ out.Hard = *(*api.ResourceList)(unsafe.Pointer(&in.Hard))
+ out.Used = *(*api.ResourceList)(unsafe.Pointer(&in.Used))
+ return nil
+}
+
+// Convert_v1_ResourceQuotaStatus_To_api_ResourceQuotaStatus is an autogenerated conversion function.
+func Convert_v1_ResourceQuotaStatus_To_api_ResourceQuotaStatus(in *ResourceQuotaStatus, out *api.ResourceQuotaStatus, s conversion.Scope) error {
+ return autoConvert_v1_ResourceQuotaStatus_To_api_ResourceQuotaStatus(in, out, s)
+}
+
+func autoConvert_api_ResourceQuotaStatus_To_v1_ResourceQuotaStatus(in *api.ResourceQuotaStatus, out *ResourceQuotaStatus, s conversion.Scope) error {
+ out.Hard = *(*ResourceList)(unsafe.Pointer(&in.Hard))
+ out.Used = *(*ResourceList)(unsafe.Pointer(&in.Used))
+ return nil
+}
+
+// Convert_api_ResourceQuotaStatus_To_v1_ResourceQuotaStatus is an autogenerated conversion function.
+func Convert_api_ResourceQuotaStatus_To_v1_ResourceQuotaStatus(in *api.ResourceQuotaStatus, out *ResourceQuotaStatus, s conversion.Scope) error {
+ return autoConvert_api_ResourceQuotaStatus_To_v1_ResourceQuotaStatus(in, out, s)
+}
+
+func autoConvert_v1_ResourceRequirements_To_api_ResourceRequirements(in *ResourceRequirements, out *api.ResourceRequirements, s conversion.Scope) error {
+ out.Limits = *(*api.ResourceList)(unsafe.Pointer(&in.Limits))
+ out.Requests = *(*api.ResourceList)(unsafe.Pointer(&in.Requests))
+ return nil
+}
+
+// Convert_v1_ResourceRequirements_To_api_ResourceRequirements is an autogenerated conversion function.
+func Convert_v1_ResourceRequirements_To_api_ResourceRequirements(in *ResourceRequirements, out *api.ResourceRequirements, s conversion.Scope) error {
+ return autoConvert_v1_ResourceRequirements_To_api_ResourceRequirements(in, out, s)
+}
+
+func autoConvert_api_ResourceRequirements_To_v1_ResourceRequirements(in *api.ResourceRequirements, out *ResourceRequirements, s conversion.Scope) error {
+ out.Limits = *(*ResourceList)(unsafe.Pointer(&in.Limits))
+ out.Requests = *(*ResourceList)(unsafe.Pointer(&in.Requests))
+ return nil
+}
+
+// Convert_api_ResourceRequirements_To_v1_ResourceRequirements is an autogenerated conversion function.
+func Convert_api_ResourceRequirements_To_v1_ResourceRequirements(in *api.ResourceRequirements, out *ResourceRequirements, s conversion.Scope) error {
+ return autoConvert_api_ResourceRequirements_To_v1_ResourceRequirements(in, out, s)
+}
+
+func autoConvert_v1_SELinuxOptions_To_api_SELinuxOptions(in *SELinuxOptions, out *api.SELinuxOptions, s conversion.Scope) error {
+ out.User = in.User
+ out.Role = in.Role
+ out.Type = in.Type
+ out.Level = in.Level
+ return nil
+}
+
+// Convert_v1_SELinuxOptions_To_api_SELinuxOptions is an autogenerated conversion function.
+func Convert_v1_SELinuxOptions_To_api_SELinuxOptions(in *SELinuxOptions, out *api.SELinuxOptions, s conversion.Scope) error {
+ return autoConvert_v1_SELinuxOptions_To_api_SELinuxOptions(in, out, s)
+}
+
+func autoConvert_api_SELinuxOptions_To_v1_SELinuxOptions(in *api.SELinuxOptions, out *SELinuxOptions, s conversion.Scope) error {
+ out.User = in.User
+ out.Role = in.Role
+ out.Type = in.Type
+ out.Level = in.Level
+ return nil
+}
+
+// Convert_api_SELinuxOptions_To_v1_SELinuxOptions is an autogenerated conversion function.
+func Convert_api_SELinuxOptions_To_v1_SELinuxOptions(in *api.SELinuxOptions, out *SELinuxOptions, s conversion.Scope) error {
+ return autoConvert_api_SELinuxOptions_To_v1_SELinuxOptions(in, out, s)
+}
+
+func autoConvert_v1_ScaleIOVolumeSource_To_api_ScaleIOVolumeSource(in *ScaleIOVolumeSource, out *api.ScaleIOVolumeSource, s conversion.Scope) error {
+ out.Gateway = in.Gateway
+ out.System = in.System
+ out.SecretRef = (*api.LocalObjectReference)(unsafe.Pointer(in.SecretRef))
+ out.SSLEnabled = in.SSLEnabled
+ out.ProtectionDomain = in.ProtectionDomain
+ out.StoragePool = in.StoragePool
+ out.StorageMode = in.StorageMode
+ out.VolumeName = in.VolumeName
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_v1_ScaleIOVolumeSource_To_api_ScaleIOVolumeSource is an autogenerated conversion function.
+func Convert_v1_ScaleIOVolumeSource_To_api_ScaleIOVolumeSource(in *ScaleIOVolumeSource, out *api.ScaleIOVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_ScaleIOVolumeSource_To_api_ScaleIOVolumeSource(in, out, s)
+}
+
+func autoConvert_api_ScaleIOVolumeSource_To_v1_ScaleIOVolumeSource(in *api.ScaleIOVolumeSource, out *ScaleIOVolumeSource, s conversion.Scope) error {
+ out.Gateway = in.Gateway
+ out.System = in.System
+ out.SecretRef = (*LocalObjectReference)(unsafe.Pointer(in.SecretRef))
+ out.SSLEnabled = in.SSLEnabled
+ out.ProtectionDomain = in.ProtectionDomain
+ out.StoragePool = in.StoragePool
+ out.StorageMode = in.StorageMode
+ out.VolumeName = in.VolumeName
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_api_ScaleIOVolumeSource_To_v1_ScaleIOVolumeSource is an autogenerated conversion function.
+func Convert_api_ScaleIOVolumeSource_To_v1_ScaleIOVolumeSource(in *api.ScaleIOVolumeSource, out *ScaleIOVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_ScaleIOVolumeSource_To_v1_ScaleIOVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_Secret_To_api_Secret(in *Secret, out *api.Secret, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Data = *(*map[string][]byte)(unsafe.Pointer(&in.Data))
+ // INFO: in.StringData opted out of conversion generation
+ out.Type = api.SecretType(in.Type)
+ return nil
+}
+
+func autoConvert_api_Secret_To_v1_Secret(in *api.Secret, out *Secret, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Data = *(*map[string][]byte)(unsafe.Pointer(&in.Data))
+ out.Type = SecretType(in.Type)
+ return nil
+}
+
+// Convert_api_Secret_To_v1_Secret is an autogenerated conversion function.
+func Convert_api_Secret_To_v1_Secret(in *api.Secret, out *Secret, s conversion.Scope) error {
+ return autoConvert_api_Secret_To_v1_Secret(in, out, s)
+}
+
+func autoConvert_v1_SecretEnvSource_To_api_SecretEnvSource(in *SecretEnvSource, out *api.SecretEnvSource, s conversion.Scope) error {
+ if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
+ return err
+ }
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_v1_SecretEnvSource_To_api_SecretEnvSource is an autogenerated conversion function.
+func Convert_v1_SecretEnvSource_To_api_SecretEnvSource(in *SecretEnvSource, out *api.SecretEnvSource, s conversion.Scope) error {
+ return autoConvert_v1_SecretEnvSource_To_api_SecretEnvSource(in, out, s)
+}
+
+func autoConvert_api_SecretEnvSource_To_v1_SecretEnvSource(in *api.SecretEnvSource, out *SecretEnvSource, s conversion.Scope) error {
+ if err := Convert_api_LocalObjectReference_To_v1_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
+ return err
+ }
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_api_SecretEnvSource_To_v1_SecretEnvSource is an autogenerated conversion function.
+func Convert_api_SecretEnvSource_To_v1_SecretEnvSource(in *api.SecretEnvSource, out *SecretEnvSource, s conversion.Scope) error {
+ return autoConvert_api_SecretEnvSource_To_v1_SecretEnvSource(in, out, s)
+}
+
+func autoConvert_v1_SecretKeySelector_To_api_SecretKeySelector(in *SecretKeySelector, out *api.SecretKeySelector, s conversion.Scope) error {
+ if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
+ return err
+ }
+ out.Key = in.Key
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_v1_SecretKeySelector_To_api_SecretKeySelector is an autogenerated conversion function.
+func Convert_v1_SecretKeySelector_To_api_SecretKeySelector(in *SecretKeySelector, out *api.SecretKeySelector, s conversion.Scope) error {
+ return autoConvert_v1_SecretKeySelector_To_api_SecretKeySelector(in, out, s)
+}
+
+func autoConvert_api_SecretKeySelector_To_v1_SecretKeySelector(in *api.SecretKeySelector, out *SecretKeySelector, s conversion.Scope) error {
+ if err := Convert_api_LocalObjectReference_To_v1_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
+ return err
+ }
+ out.Key = in.Key
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_api_SecretKeySelector_To_v1_SecretKeySelector is an autogenerated conversion function.
+func Convert_api_SecretKeySelector_To_v1_SecretKeySelector(in *api.SecretKeySelector, out *SecretKeySelector, s conversion.Scope) error {
+ return autoConvert_api_SecretKeySelector_To_v1_SecretKeySelector(in, out, s)
+}
+
+func autoConvert_v1_SecretList_To_api_SecretList(in *SecretList, out *api.SecretList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]api.Secret, len(*in))
+ for i := range *in {
+ if err := Convert_v1_Secret_To_api_Secret(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1_SecretList_To_api_SecretList is an autogenerated conversion function.
+func Convert_v1_SecretList_To_api_SecretList(in *SecretList, out *api.SecretList, s conversion.Scope) error {
+ return autoConvert_v1_SecretList_To_api_SecretList(in, out, s)
+}
+
+func autoConvert_api_SecretList_To_v1_SecretList(in *api.SecretList, out *SecretList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Secret, len(*in))
+ for i := range *in {
+ if err := Convert_api_Secret_To_v1_Secret(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]Secret, 0)
+ }
+ return nil
+}
+
+// Convert_api_SecretList_To_v1_SecretList is an autogenerated conversion function.
+func Convert_api_SecretList_To_v1_SecretList(in *api.SecretList, out *SecretList, s conversion.Scope) error {
+ return autoConvert_api_SecretList_To_v1_SecretList(in, out, s)
+}
+
+func autoConvert_v1_SecretProjection_To_api_SecretProjection(in *SecretProjection, out *api.SecretProjection, s conversion.Scope) error {
+ if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
+ return err
+ }
+ out.Items = *(*[]api.KeyToPath)(unsafe.Pointer(&in.Items))
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_v1_SecretProjection_To_api_SecretProjection is an autogenerated conversion function.
+func Convert_v1_SecretProjection_To_api_SecretProjection(in *SecretProjection, out *api.SecretProjection, s conversion.Scope) error {
+ return autoConvert_v1_SecretProjection_To_api_SecretProjection(in, out, s)
+}
+
+func autoConvert_api_SecretProjection_To_v1_SecretProjection(in *api.SecretProjection, out *SecretProjection, s conversion.Scope) error {
+ if err := Convert_api_LocalObjectReference_To_v1_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
+ return err
+ }
+ out.Items = *(*[]KeyToPath)(unsafe.Pointer(&in.Items))
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_api_SecretProjection_To_v1_SecretProjection is an autogenerated conversion function.
+func Convert_api_SecretProjection_To_v1_SecretProjection(in *api.SecretProjection, out *SecretProjection, s conversion.Scope) error {
+ return autoConvert_api_SecretProjection_To_v1_SecretProjection(in, out, s)
+}
+
+func autoConvert_v1_SecretVolumeSource_To_api_SecretVolumeSource(in *SecretVolumeSource, out *api.SecretVolumeSource, s conversion.Scope) error {
+ out.SecretName = in.SecretName
+ out.Items = *(*[]api.KeyToPath)(unsafe.Pointer(&in.Items))
+ out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode))
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_v1_SecretVolumeSource_To_api_SecretVolumeSource is an autogenerated conversion function.
+func Convert_v1_SecretVolumeSource_To_api_SecretVolumeSource(in *SecretVolumeSource, out *api.SecretVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_SecretVolumeSource_To_api_SecretVolumeSource(in, out, s)
+}
+
+func autoConvert_api_SecretVolumeSource_To_v1_SecretVolumeSource(in *api.SecretVolumeSource, out *SecretVolumeSource, s conversion.Scope) error {
+ out.SecretName = in.SecretName
+ out.Items = *(*[]KeyToPath)(unsafe.Pointer(&in.Items))
+ out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode))
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_api_SecretVolumeSource_To_v1_SecretVolumeSource is an autogenerated conversion function.
+func Convert_api_SecretVolumeSource_To_v1_SecretVolumeSource(in *api.SecretVolumeSource, out *SecretVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_SecretVolumeSource_To_v1_SecretVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_SecurityContext_To_api_SecurityContext(in *SecurityContext, out *api.SecurityContext, s conversion.Scope) error {
+ out.Capabilities = (*api.Capabilities)(unsafe.Pointer(in.Capabilities))
+ out.Privileged = (*bool)(unsafe.Pointer(in.Privileged))
+ out.SELinuxOptions = (*api.SELinuxOptions)(unsafe.Pointer(in.SELinuxOptions))
+ out.RunAsUser = (*int64)(unsafe.Pointer(in.RunAsUser))
+ out.RunAsNonRoot = (*bool)(unsafe.Pointer(in.RunAsNonRoot))
+ out.ReadOnlyRootFilesystem = (*bool)(unsafe.Pointer(in.ReadOnlyRootFilesystem))
+ return nil
+}
+
+// Convert_v1_SecurityContext_To_api_SecurityContext is an autogenerated conversion function.
+func Convert_v1_SecurityContext_To_api_SecurityContext(in *SecurityContext, out *api.SecurityContext, s conversion.Scope) error {
+ return autoConvert_v1_SecurityContext_To_api_SecurityContext(in, out, s)
+}
+
+func autoConvert_api_SecurityContext_To_v1_SecurityContext(in *api.SecurityContext, out *SecurityContext, s conversion.Scope) error {
+ out.Capabilities = (*Capabilities)(unsafe.Pointer(in.Capabilities))
+ out.Privileged = (*bool)(unsafe.Pointer(in.Privileged))
+ out.SELinuxOptions = (*SELinuxOptions)(unsafe.Pointer(in.SELinuxOptions))
+ out.RunAsUser = (*int64)(unsafe.Pointer(in.RunAsUser))
+ out.RunAsNonRoot = (*bool)(unsafe.Pointer(in.RunAsNonRoot))
+ out.ReadOnlyRootFilesystem = (*bool)(unsafe.Pointer(in.ReadOnlyRootFilesystem))
+ return nil
+}
+
+// Convert_api_SecurityContext_To_v1_SecurityContext is an autogenerated conversion function.
+func Convert_api_SecurityContext_To_v1_SecurityContext(in *api.SecurityContext, out *SecurityContext, s conversion.Scope) error {
+ return autoConvert_api_SecurityContext_To_v1_SecurityContext(in, out, s)
+}
+
+func autoConvert_v1_SerializedReference_To_api_SerializedReference(in *SerializedReference, out *api.SerializedReference, s conversion.Scope) error {
+ if err := Convert_v1_ObjectReference_To_api_ObjectReference(&in.Reference, &out.Reference, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_SerializedReference_To_api_SerializedReference is an autogenerated conversion function.
+func Convert_v1_SerializedReference_To_api_SerializedReference(in *SerializedReference, out *api.SerializedReference, s conversion.Scope) error {
+ return autoConvert_v1_SerializedReference_To_api_SerializedReference(in, out, s)
+}
+
+func autoConvert_api_SerializedReference_To_v1_SerializedReference(in *api.SerializedReference, out *SerializedReference, s conversion.Scope) error {
+ if err := Convert_api_ObjectReference_To_v1_ObjectReference(&in.Reference, &out.Reference, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_SerializedReference_To_v1_SerializedReference is an autogenerated conversion function.
+func Convert_api_SerializedReference_To_v1_SerializedReference(in *api.SerializedReference, out *SerializedReference, s conversion.Scope) error {
+ return autoConvert_api_SerializedReference_To_v1_SerializedReference(in, out, s)
+}
+
+func autoConvert_v1_Service_To_api_Service(in *Service, out *api.Service, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_ServiceSpec_To_api_ServiceSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ServiceStatus_To_api_ServiceStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_Service_To_api_Service is an autogenerated conversion function.
+func Convert_v1_Service_To_api_Service(in *Service, out *api.Service, s conversion.Scope) error {
+ return autoConvert_v1_Service_To_api_Service(in, out, s)
+}
+
+func autoConvert_api_Service_To_v1_Service(in *api.Service, out *Service, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_api_ServiceSpec_To_v1_ServiceSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ServiceStatus_To_v1_ServiceStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_Service_To_v1_Service is an autogenerated conversion function.
+func Convert_api_Service_To_v1_Service(in *api.Service, out *Service, s conversion.Scope) error {
+ return autoConvert_api_Service_To_v1_Service(in, out, s)
+}
+
+func autoConvert_v1_ServiceAccount_To_api_ServiceAccount(in *ServiceAccount, out *api.ServiceAccount, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Secrets = *(*[]api.ObjectReference)(unsafe.Pointer(&in.Secrets))
+ out.ImagePullSecrets = *(*[]api.LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets))
+ out.AutomountServiceAccountToken = (*bool)(unsafe.Pointer(in.AutomountServiceAccountToken))
+ return nil
+}
+
+// Convert_v1_ServiceAccount_To_api_ServiceAccount is an autogenerated conversion function.
+func Convert_v1_ServiceAccount_To_api_ServiceAccount(in *ServiceAccount, out *api.ServiceAccount, s conversion.Scope) error {
+ return autoConvert_v1_ServiceAccount_To_api_ServiceAccount(in, out, s)
+}
+
+func autoConvert_api_ServiceAccount_To_v1_ServiceAccount(in *api.ServiceAccount, out *ServiceAccount, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Secrets = *(*[]ObjectReference)(unsafe.Pointer(&in.Secrets))
+ out.ImagePullSecrets = *(*[]LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets))
+ out.AutomountServiceAccountToken = (*bool)(unsafe.Pointer(in.AutomountServiceAccountToken))
+ return nil
+}
+
+// Convert_api_ServiceAccount_To_v1_ServiceAccount is an autogenerated conversion function.
+func Convert_api_ServiceAccount_To_v1_ServiceAccount(in *api.ServiceAccount, out *ServiceAccount, s conversion.Scope) error {
+ return autoConvert_api_ServiceAccount_To_v1_ServiceAccount(in, out, s)
+}
+
+func autoConvert_v1_ServiceAccountList_To_api_ServiceAccountList(in *ServiceAccountList, out *api.ServiceAccountList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]api.ServiceAccount)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1_ServiceAccountList_To_api_ServiceAccountList is an autogenerated conversion function.
+func Convert_v1_ServiceAccountList_To_api_ServiceAccountList(in *ServiceAccountList, out *api.ServiceAccountList, s conversion.Scope) error {
+ return autoConvert_v1_ServiceAccountList_To_api_ServiceAccountList(in, out, s)
+}
+
+func autoConvert_api_ServiceAccountList_To_v1_ServiceAccountList(in *api.ServiceAccountList, out *ServiceAccountList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]ServiceAccount, 0)
+ } else {
+ out.Items = *(*[]ServiceAccount)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_api_ServiceAccountList_To_v1_ServiceAccountList is an autogenerated conversion function.
+func Convert_api_ServiceAccountList_To_v1_ServiceAccountList(in *api.ServiceAccountList, out *ServiceAccountList, s conversion.Scope) error {
+ return autoConvert_api_ServiceAccountList_To_v1_ServiceAccountList(in, out, s)
+}
+
+func autoConvert_v1_ServiceList_To_api_ServiceList(in *ServiceList, out *api.ServiceList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]api.Service, len(*in))
+ for i := range *in {
+ if err := Convert_v1_Service_To_api_Service(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1_ServiceList_To_api_ServiceList is an autogenerated conversion function.
+func Convert_v1_ServiceList_To_api_ServiceList(in *ServiceList, out *api.ServiceList, s conversion.Scope) error {
+ return autoConvert_v1_ServiceList_To_api_ServiceList(in, out, s)
+}
+
+func autoConvert_api_ServiceList_To_v1_ServiceList(in *api.ServiceList, out *ServiceList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Service, len(*in))
+ for i := range *in {
+ if err := Convert_api_Service_To_v1_Service(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]Service, 0)
+ }
+ return nil
+}
+
+// Convert_api_ServiceList_To_v1_ServiceList is an autogenerated conversion function.
+func Convert_api_ServiceList_To_v1_ServiceList(in *api.ServiceList, out *ServiceList, s conversion.Scope) error {
+ return autoConvert_api_ServiceList_To_v1_ServiceList(in, out, s)
+}
+
+func autoConvert_v1_ServicePort_To_api_ServicePort(in *ServicePort, out *api.ServicePort, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Protocol = api.Protocol(in.Protocol)
+ out.Port = in.Port
+ out.TargetPort = in.TargetPort
+ out.NodePort = in.NodePort
+ return nil
+}
+
+// Convert_v1_ServicePort_To_api_ServicePort is an autogenerated conversion function.
+func Convert_v1_ServicePort_To_api_ServicePort(in *ServicePort, out *api.ServicePort, s conversion.Scope) error {
+ return autoConvert_v1_ServicePort_To_api_ServicePort(in, out, s)
+}
+
+func autoConvert_api_ServicePort_To_v1_ServicePort(in *api.ServicePort, out *ServicePort, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Protocol = Protocol(in.Protocol)
+ out.Port = in.Port
+ out.TargetPort = in.TargetPort
+ out.NodePort = in.NodePort
+ return nil
+}
+
+// Convert_api_ServicePort_To_v1_ServicePort is an autogenerated conversion function.
+func Convert_api_ServicePort_To_v1_ServicePort(in *api.ServicePort, out *ServicePort, s conversion.Scope) error {
+ return autoConvert_api_ServicePort_To_v1_ServicePort(in, out, s)
+}
+
+func autoConvert_v1_ServiceProxyOptions_To_api_ServiceProxyOptions(in *ServiceProxyOptions, out *api.ServiceProxyOptions, s conversion.Scope) error {
+ out.Path = in.Path
+ return nil
+}
+
+// Convert_v1_ServiceProxyOptions_To_api_ServiceProxyOptions is an autogenerated conversion function.
+func Convert_v1_ServiceProxyOptions_To_api_ServiceProxyOptions(in *ServiceProxyOptions, out *api.ServiceProxyOptions, s conversion.Scope) error {
+ return autoConvert_v1_ServiceProxyOptions_To_api_ServiceProxyOptions(in, out, s)
+}
+
+func autoConvert_api_ServiceProxyOptions_To_v1_ServiceProxyOptions(in *api.ServiceProxyOptions, out *ServiceProxyOptions, s conversion.Scope) error {
+ out.Path = in.Path
+ return nil
+}
+
+// Convert_api_ServiceProxyOptions_To_v1_ServiceProxyOptions is an autogenerated conversion function.
+func Convert_api_ServiceProxyOptions_To_v1_ServiceProxyOptions(in *api.ServiceProxyOptions, out *ServiceProxyOptions, s conversion.Scope) error {
+ return autoConvert_api_ServiceProxyOptions_To_v1_ServiceProxyOptions(in, out, s)
+}
+
+func autoConvert_v1_ServiceSpec_To_api_ServiceSpec(in *ServiceSpec, out *api.ServiceSpec, s conversion.Scope) error {
+ out.Ports = *(*[]api.ServicePort)(unsafe.Pointer(&in.Ports))
+ out.Selector = *(*map[string]string)(unsafe.Pointer(&in.Selector))
+ out.ClusterIP = in.ClusterIP
+ out.Type = api.ServiceType(in.Type)
+ out.ExternalIPs = *(*[]string)(unsafe.Pointer(&in.ExternalIPs))
+ out.SessionAffinity = api.ServiceAffinity(in.SessionAffinity)
+ out.LoadBalancerIP = in.LoadBalancerIP
+ out.LoadBalancerSourceRanges = *(*[]string)(unsafe.Pointer(&in.LoadBalancerSourceRanges))
+ out.ExternalName = in.ExternalName
+ out.ExternalTrafficPolicy = api.ServiceExternalTrafficPolicyType(in.ExternalTrafficPolicy)
+ out.HealthCheckNodePort = in.HealthCheckNodePort
+ return nil
+}
+
+// Convert_v1_ServiceSpec_To_api_ServiceSpec is an autogenerated conversion function.
+func Convert_v1_ServiceSpec_To_api_ServiceSpec(in *ServiceSpec, out *api.ServiceSpec, s conversion.Scope) error {
+ return autoConvert_v1_ServiceSpec_To_api_ServiceSpec(in, out, s)
+}
+
+func autoConvert_api_ServiceSpec_To_v1_ServiceSpec(in *api.ServiceSpec, out *ServiceSpec, s conversion.Scope) error {
+ out.Type = ServiceType(in.Type)
+ out.Ports = *(*[]ServicePort)(unsafe.Pointer(&in.Ports))
+ out.Selector = *(*map[string]string)(unsafe.Pointer(&in.Selector))
+ out.ClusterIP = in.ClusterIP
+ out.ExternalName = in.ExternalName
+ out.ExternalIPs = *(*[]string)(unsafe.Pointer(&in.ExternalIPs))
+ out.LoadBalancerIP = in.LoadBalancerIP
+ out.SessionAffinity = ServiceAffinity(in.SessionAffinity)
+ out.LoadBalancerSourceRanges = *(*[]string)(unsafe.Pointer(&in.LoadBalancerSourceRanges))
+ out.ExternalTrafficPolicy = ServiceExternalTrafficPolicyType(in.ExternalTrafficPolicy)
+ out.HealthCheckNodePort = in.HealthCheckNodePort
+ return nil
+}
+
+// Convert_api_ServiceSpec_To_v1_ServiceSpec is an autogenerated conversion function.
+func Convert_api_ServiceSpec_To_v1_ServiceSpec(in *api.ServiceSpec, out *ServiceSpec, s conversion.Scope) error {
+ return autoConvert_api_ServiceSpec_To_v1_ServiceSpec(in, out, s)
+}
+
+func autoConvert_v1_ServiceStatus_To_api_ServiceStatus(in *ServiceStatus, out *api.ServiceStatus, s conversion.Scope) error {
+ if err := Convert_v1_LoadBalancerStatus_To_api_LoadBalancerStatus(&in.LoadBalancer, &out.LoadBalancer, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_ServiceStatus_To_api_ServiceStatus is an autogenerated conversion function.
+func Convert_v1_ServiceStatus_To_api_ServiceStatus(in *ServiceStatus, out *api.ServiceStatus, s conversion.Scope) error {
+ return autoConvert_v1_ServiceStatus_To_api_ServiceStatus(in, out, s)
+}
+
+func autoConvert_api_ServiceStatus_To_v1_ServiceStatus(in *api.ServiceStatus, out *ServiceStatus, s conversion.Scope) error {
+ if err := Convert_api_LoadBalancerStatus_To_v1_LoadBalancerStatus(&in.LoadBalancer, &out.LoadBalancer, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_ServiceStatus_To_v1_ServiceStatus is an autogenerated conversion function.
+func Convert_api_ServiceStatus_To_v1_ServiceStatus(in *api.ServiceStatus, out *ServiceStatus, s conversion.Scope) error {
+ return autoConvert_api_ServiceStatus_To_v1_ServiceStatus(in, out, s)
+}
+
+func autoConvert_v1_StorageOSPersistentVolumeSource_To_api_StorageOSPersistentVolumeSource(in *StorageOSPersistentVolumeSource, out *api.StorageOSPersistentVolumeSource, s conversion.Scope) error {
+ out.VolumeName = in.VolumeName
+ out.VolumeNamespace = in.VolumeNamespace
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ out.SecretRef = (*api.ObjectReference)(unsafe.Pointer(in.SecretRef))
+ return nil
+}
+
+// Convert_v1_StorageOSPersistentVolumeSource_To_api_StorageOSPersistentVolumeSource is an autogenerated conversion function.
+func Convert_v1_StorageOSPersistentVolumeSource_To_api_StorageOSPersistentVolumeSource(in *StorageOSPersistentVolumeSource, out *api.StorageOSPersistentVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_StorageOSPersistentVolumeSource_To_api_StorageOSPersistentVolumeSource(in, out, s)
+}
+
+func autoConvert_api_StorageOSPersistentVolumeSource_To_v1_StorageOSPersistentVolumeSource(in *api.StorageOSPersistentVolumeSource, out *StorageOSPersistentVolumeSource, s conversion.Scope) error {
+ out.VolumeName = in.VolumeName
+ out.VolumeNamespace = in.VolumeNamespace
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ out.SecretRef = (*ObjectReference)(unsafe.Pointer(in.SecretRef))
+ return nil
+}
+
+// Convert_api_StorageOSPersistentVolumeSource_To_v1_StorageOSPersistentVolumeSource is an autogenerated conversion function.
+func Convert_api_StorageOSPersistentVolumeSource_To_v1_StorageOSPersistentVolumeSource(in *api.StorageOSPersistentVolumeSource, out *StorageOSPersistentVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_StorageOSPersistentVolumeSource_To_v1_StorageOSPersistentVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_StorageOSVolumeSource_To_api_StorageOSVolumeSource(in *StorageOSVolumeSource, out *api.StorageOSVolumeSource, s conversion.Scope) error {
+ out.VolumeName = in.VolumeName
+ out.VolumeNamespace = in.VolumeNamespace
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ out.SecretRef = (*api.LocalObjectReference)(unsafe.Pointer(in.SecretRef))
+ return nil
+}
+
+// Convert_v1_StorageOSVolumeSource_To_api_StorageOSVolumeSource is an autogenerated conversion function.
+func Convert_v1_StorageOSVolumeSource_To_api_StorageOSVolumeSource(in *StorageOSVolumeSource, out *api.StorageOSVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_StorageOSVolumeSource_To_api_StorageOSVolumeSource(in, out, s)
+}
+
+func autoConvert_api_StorageOSVolumeSource_To_v1_StorageOSVolumeSource(in *api.StorageOSVolumeSource, out *StorageOSVolumeSource, s conversion.Scope) error {
+ out.VolumeName = in.VolumeName
+ out.VolumeNamespace = in.VolumeNamespace
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ out.SecretRef = (*LocalObjectReference)(unsafe.Pointer(in.SecretRef))
+ return nil
+}
+
+// Convert_api_StorageOSVolumeSource_To_v1_StorageOSVolumeSource is an autogenerated conversion function.
+func Convert_api_StorageOSVolumeSource_To_v1_StorageOSVolumeSource(in *api.StorageOSVolumeSource, out *StorageOSVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_StorageOSVolumeSource_To_v1_StorageOSVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_Sysctl_To_api_Sysctl(in *Sysctl, out *api.Sysctl, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Value = in.Value
+ return nil
+}
+
+// Convert_v1_Sysctl_To_api_Sysctl is an autogenerated conversion function.
+func Convert_v1_Sysctl_To_api_Sysctl(in *Sysctl, out *api.Sysctl, s conversion.Scope) error {
+ return autoConvert_v1_Sysctl_To_api_Sysctl(in, out, s)
+}
+
+func autoConvert_api_Sysctl_To_v1_Sysctl(in *api.Sysctl, out *Sysctl, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Value = in.Value
+ return nil
+}
+
+// Convert_api_Sysctl_To_v1_Sysctl is an autogenerated conversion function.
+func Convert_api_Sysctl_To_v1_Sysctl(in *api.Sysctl, out *Sysctl, s conversion.Scope) error {
+ return autoConvert_api_Sysctl_To_v1_Sysctl(in, out, s)
+}
+
+func autoConvert_v1_TCPSocketAction_To_api_TCPSocketAction(in *TCPSocketAction, out *api.TCPSocketAction, s conversion.Scope) error {
+ out.Port = in.Port
+ out.Host = in.Host
+ return nil
+}
+
+// Convert_v1_TCPSocketAction_To_api_TCPSocketAction is an autogenerated conversion function.
+func Convert_v1_TCPSocketAction_To_api_TCPSocketAction(in *TCPSocketAction, out *api.TCPSocketAction, s conversion.Scope) error {
+ return autoConvert_v1_TCPSocketAction_To_api_TCPSocketAction(in, out, s)
+}
+
+func autoConvert_api_TCPSocketAction_To_v1_TCPSocketAction(in *api.TCPSocketAction, out *TCPSocketAction, s conversion.Scope) error {
+ out.Port = in.Port
+ out.Host = in.Host
+ return nil
+}
+
+// Convert_api_TCPSocketAction_To_v1_TCPSocketAction is an autogenerated conversion function.
+func Convert_api_TCPSocketAction_To_v1_TCPSocketAction(in *api.TCPSocketAction, out *TCPSocketAction, s conversion.Scope) error {
+ return autoConvert_api_TCPSocketAction_To_v1_TCPSocketAction(in, out, s)
+}
+
+func autoConvert_v1_Taint_To_api_Taint(in *Taint, out *api.Taint, s conversion.Scope) error {
+ out.Key = in.Key
+ out.Value = in.Value
+ out.Effect = api.TaintEffect(in.Effect)
+ out.TimeAdded = in.TimeAdded
+ return nil
+}
+
+// Convert_v1_Taint_To_api_Taint is an autogenerated conversion function.
+func Convert_v1_Taint_To_api_Taint(in *Taint, out *api.Taint, s conversion.Scope) error {
+ return autoConvert_v1_Taint_To_api_Taint(in, out, s)
+}
+
+func autoConvert_api_Taint_To_v1_Taint(in *api.Taint, out *Taint, s conversion.Scope) error {
+ out.Key = in.Key
+ out.Value = in.Value
+ out.Effect = TaintEffect(in.Effect)
+ out.TimeAdded = in.TimeAdded
+ return nil
+}
+
+// Convert_api_Taint_To_v1_Taint is an autogenerated conversion function.
+func Convert_api_Taint_To_v1_Taint(in *api.Taint, out *Taint, s conversion.Scope) error {
+ return autoConvert_api_Taint_To_v1_Taint(in, out, s)
+}
+
+func autoConvert_v1_Toleration_To_api_Toleration(in *Toleration, out *api.Toleration, s conversion.Scope) error {
+ out.Key = in.Key
+ out.Operator = api.TolerationOperator(in.Operator)
+ out.Value = in.Value
+ out.Effect = api.TaintEffect(in.Effect)
+ out.TolerationSeconds = (*int64)(unsafe.Pointer(in.TolerationSeconds))
+ return nil
+}
+
+// Convert_v1_Toleration_To_api_Toleration is an autogenerated conversion function.
+func Convert_v1_Toleration_To_api_Toleration(in *Toleration, out *api.Toleration, s conversion.Scope) error {
+ return autoConvert_v1_Toleration_To_api_Toleration(in, out, s)
+}
+
+func autoConvert_api_Toleration_To_v1_Toleration(in *api.Toleration, out *Toleration, s conversion.Scope) error {
+ out.Key = in.Key
+ out.Operator = TolerationOperator(in.Operator)
+ out.Value = in.Value
+ out.Effect = TaintEffect(in.Effect)
+ out.TolerationSeconds = (*int64)(unsafe.Pointer(in.TolerationSeconds))
+ return nil
+}
+
+// Convert_api_Toleration_To_v1_Toleration is an autogenerated conversion function.
+func Convert_api_Toleration_To_v1_Toleration(in *api.Toleration, out *Toleration, s conversion.Scope) error {
+ return autoConvert_api_Toleration_To_v1_Toleration(in, out, s)
+}
+
+func autoConvert_v1_Volume_To_api_Volume(in *Volume, out *api.Volume, s conversion.Scope) error {
+ out.Name = in.Name
+ if err := Convert_v1_VolumeSource_To_api_VolumeSource(&in.VolumeSource, &out.VolumeSource, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_Volume_To_api_Volume is an autogenerated conversion function.
+func Convert_v1_Volume_To_api_Volume(in *Volume, out *api.Volume, s conversion.Scope) error {
+ return autoConvert_v1_Volume_To_api_Volume(in, out, s)
+}
+
+func autoConvert_api_Volume_To_v1_Volume(in *api.Volume, out *Volume, s conversion.Scope) error {
+ out.Name = in.Name
+ if err := Convert_api_VolumeSource_To_v1_VolumeSource(&in.VolumeSource, &out.VolumeSource, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_Volume_To_v1_Volume is an autogenerated conversion function.
+func Convert_api_Volume_To_v1_Volume(in *api.Volume, out *Volume, s conversion.Scope) error {
+ return autoConvert_api_Volume_To_v1_Volume(in, out, s)
+}
+
+func autoConvert_v1_VolumeMount_To_api_VolumeMount(in *VolumeMount, out *api.VolumeMount, s conversion.Scope) error {
+ out.Name = in.Name
+ out.ReadOnly = in.ReadOnly
+ out.MountPath = in.MountPath
+ out.SubPath = in.SubPath
+ return nil
+}
+
+// Convert_v1_VolumeMount_To_api_VolumeMount is an autogenerated conversion function.
+func Convert_v1_VolumeMount_To_api_VolumeMount(in *VolumeMount, out *api.VolumeMount, s conversion.Scope) error {
+ return autoConvert_v1_VolumeMount_To_api_VolumeMount(in, out, s)
+}
+
+func autoConvert_api_VolumeMount_To_v1_VolumeMount(in *api.VolumeMount, out *VolumeMount, s conversion.Scope) error {
+ out.Name = in.Name
+ out.ReadOnly = in.ReadOnly
+ out.MountPath = in.MountPath
+ out.SubPath = in.SubPath
+ return nil
+}
+
+// Convert_api_VolumeMount_To_v1_VolumeMount is an autogenerated conversion function.
+func Convert_api_VolumeMount_To_v1_VolumeMount(in *api.VolumeMount, out *VolumeMount, s conversion.Scope) error {
+ return autoConvert_api_VolumeMount_To_v1_VolumeMount(in, out, s)
+}
+
+func autoConvert_v1_VolumeProjection_To_api_VolumeProjection(in *VolumeProjection, out *api.VolumeProjection, s conversion.Scope) error {
+ out.Secret = (*api.SecretProjection)(unsafe.Pointer(in.Secret))
+ out.DownwardAPI = (*api.DownwardAPIProjection)(unsafe.Pointer(in.DownwardAPI))
+ out.ConfigMap = (*api.ConfigMapProjection)(unsafe.Pointer(in.ConfigMap))
+ return nil
+}
+
+// Convert_v1_VolumeProjection_To_api_VolumeProjection is an autogenerated conversion function.
+func Convert_v1_VolumeProjection_To_api_VolumeProjection(in *VolumeProjection, out *api.VolumeProjection, s conversion.Scope) error {
+ return autoConvert_v1_VolumeProjection_To_api_VolumeProjection(in, out, s)
+}
+
+func autoConvert_api_VolumeProjection_To_v1_VolumeProjection(in *api.VolumeProjection, out *VolumeProjection, s conversion.Scope) error {
+ out.Secret = (*SecretProjection)(unsafe.Pointer(in.Secret))
+ out.DownwardAPI = (*DownwardAPIProjection)(unsafe.Pointer(in.DownwardAPI))
+ out.ConfigMap = (*ConfigMapProjection)(unsafe.Pointer(in.ConfigMap))
+ return nil
+}
+
+// Convert_api_VolumeProjection_To_v1_VolumeProjection is an autogenerated conversion function.
+func Convert_api_VolumeProjection_To_v1_VolumeProjection(in *api.VolumeProjection, out *VolumeProjection, s conversion.Scope) error {
+ return autoConvert_api_VolumeProjection_To_v1_VolumeProjection(in, out, s)
+}
+
+func autoConvert_v1_VolumeSource_To_api_VolumeSource(in *VolumeSource, out *api.VolumeSource, s conversion.Scope) error {
+ out.HostPath = (*api.HostPathVolumeSource)(unsafe.Pointer(in.HostPath))
+ out.EmptyDir = (*api.EmptyDirVolumeSource)(unsafe.Pointer(in.EmptyDir))
+ out.GCEPersistentDisk = (*api.GCEPersistentDiskVolumeSource)(unsafe.Pointer(in.GCEPersistentDisk))
+ out.AWSElasticBlockStore = (*api.AWSElasticBlockStoreVolumeSource)(unsafe.Pointer(in.AWSElasticBlockStore))
+ out.GitRepo = (*api.GitRepoVolumeSource)(unsafe.Pointer(in.GitRepo))
+ out.Secret = (*api.SecretVolumeSource)(unsafe.Pointer(in.Secret))
+ out.NFS = (*api.NFSVolumeSource)(unsafe.Pointer(in.NFS))
+ out.ISCSI = (*api.ISCSIVolumeSource)(unsafe.Pointer(in.ISCSI))
+ out.Glusterfs = (*api.GlusterfsVolumeSource)(unsafe.Pointer(in.Glusterfs))
+ out.PersistentVolumeClaim = (*api.PersistentVolumeClaimVolumeSource)(unsafe.Pointer(in.PersistentVolumeClaim))
+ out.RBD = (*api.RBDVolumeSource)(unsafe.Pointer(in.RBD))
+ out.FlexVolume = (*api.FlexVolumeSource)(unsafe.Pointer(in.FlexVolume))
+ out.Cinder = (*api.CinderVolumeSource)(unsafe.Pointer(in.Cinder))
+ out.CephFS = (*api.CephFSVolumeSource)(unsafe.Pointer(in.CephFS))
+ out.Flocker = (*api.FlockerVolumeSource)(unsafe.Pointer(in.Flocker))
+ out.DownwardAPI = (*api.DownwardAPIVolumeSource)(unsafe.Pointer(in.DownwardAPI))
+ out.FC = (*api.FCVolumeSource)(unsafe.Pointer(in.FC))
+ out.AzureFile = (*api.AzureFileVolumeSource)(unsafe.Pointer(in.AzureFile))
+ out.ConfigMap = (*api.ConfigMapVolumeSource)(unsafe.Pointer(in.ConfigMap))
+ out.VsphereVolume = (*api.VsphereVirtualDiskVolumeSource)(unsafe.Pointer(in.VsphereVolume))
+ out.Quobyte = (*api.QuobyteVolumeSource)(unsafe.Pointer(in.Quobyte))
+ out.AzureDisk = (*api.AzureDiskVolumeSource)(unsafe.Pointer(in.AzureDisk))
+ out.PhotonPersistentDisk = (*api.PhotonPersistentDiskVolumeSource)(unsafe.Pointer(in.PhotonPersistentDisk))
+ out.Projected = (*api.ProjectedVolumeSource)(unsafe.Pointer(in.Projected))
+ out.PortworxVolume = (*api.PortworxVolumeSource)(unsafe.Pointer(in.PortworxVolume))
+ out.ScaleIO = (*api.ScaleIOVolumeSource)(unsafe.Pointer(in.ScaleIO))
+ out.StorageOS = (*api.StorageOSVolumeSource)(unsafe.Pointer(in.StorageOS))
+ return nil
+}
+
+// Convert_v1_VolumeSource_To_api_VolumeSource is an autogenerated conversion function.
+func Convert_v1_VolumeSource_To_api_VolumeSource(in *VolumeSource, out *api.VolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_VolumeSource_To_api_VolumeSource(in, out, s)
+}
+
+func autoConvert_api_VolumeSource_To_v1_VolumeSource(in *api.VolumeSource, out *VolumeSource, s conversion.Scope) error {
+ out.HostPath = (*HostPathVolumeSource)(unsafe.Pointer(in.HostPath))
+ out.EmptyDir = (*EmptyDirVolumeSource)(unsafe.Pointer(in.EmptyDir))
+ out.GCEPersistentDisk = (*GCEPersistentDiskVolumeSource)(unsafe.Pointer(in.GCEPersistentDisk))
+ out.AWSElasticBlockStore = (*AWSElasticBlockStoreVolumeSource)(unsafe.Pointer(in.AWSElasticBlockStore))
+ out.GitRepo = (*GitRepoVolumeSource)(unsafe.Pointer(in.GitRepo))
+ out.Secret = (*SecretVolumeSource)(unsafe.Pointer(in.Secret))
+ out.NFS = (*NFSVolumeSource)(unsafe.Pointer(in.NFS))
+ out.ISCSI = (*ISCSIVolumeSource)(unsafe.Pointer(in.ISCSI))
+ out.Glusterfs = (*GlusterfsVolumeSource)(unsafe.Pointer(in.Glusterfs))
+ out.PersistentVolumeClaim = (*PersistentVolumeClaimVolumeSource)(unsafe.Pointer(in.PersistentVolumeClaim))
+ out.RBD = (*RBDVolumeSource)(unsafe.Pointer(in.RBD))
+ out.Quobyte = (*QuobyteVolumeSource)(unsafe.Pointer(in.Quobyte))
+ out.FlexVolume = (*FlexVolumeSource)(unsafe.Pointer(in.FlexVolume))
+ out.Cinder = (*CinderVolumeSource)(unsafe.Pointer(in.Cinder))
+ out.CephFS = (*CephFSVolumeSource)(unsafe.Pointer(in.CephFS))
+ out.Flocker = (*FlockerVolumeSource)(unsafe.Pointer(in.Flocker))
+ out.DownwardAPI = (*DownwardAPIVolumeSource)(unsafe.Pointer(in.DownwardAPI))
+ out.FC = (*FCVolumeSource)(unsafe.Pointer(in.FC))
+ out.AzureFile = (*AzureFileVolumeSource)(unsafe.Pointer(in.AzureFile))
+ out.ConfigMap = (*ConfigMapVolumeSource)(unsafe.Pointer(in.ConfigMap))
+ out.VsphereVolume = (*VsphereVirtualDiskVolumeSource)(unsafe.Pointer(in.VsphereVolume))
+ out.AzureDisk = (*AzureDiskVolumeSource)(unsafe.Pointer(in.AzureDisk))
+ out.PhotonPersistentDisk = (*PhotonPersistentDiskVolumeSource)(unsafe.Pointer(in.PhotonPersistentDisk))
+ out.Projected = (*ProjectedVolumeSource)(unsafe.Pointer(in.Projected))
+ out.PortworxVolume = (*PortworxVolumeSource)(unsafe.Pointer(in.PortworxVolume))
+ out.ScaleIO = (*ScaleIOVolumeSource)(unsafe.Pointer(in.ScaleIO))
+ out.StorageOS = (*StorageOSVolumeSource)(unsafe.Pointer(in.StorageOS))
+ return nil
+}
+
+// Convert_api_VolumeSource_To_v1_VolumeSource is an autogenerated conversion function.
+func Convert_api_VolumeSource_To_v1_VolumeSource(in *api.VolumeSource, out *VolumeSource, s conversion.Scope) error {
+ return autoConvert_api_VolumeSource_To_v1_VolumeSource(in, out, s)
+}
+
+func autoConvert_v1_VsphereVirtualDiskVolumeSource_To_api_VsphereVirtualDiskVolumeSource(in *VsphereVirtualDiskVolumeSource, out *api.VsphereVirtualDiskVolumeSource, s conversion.Scope) error {
+ out.VolumePath = in.VolumePath
+ out.FSType = in.FSType
+ out.StoragePolicyName = in.StoragePolicyName
+ out.StoragePolicyID = in.StoragePolicyID
+ return nil
+}
+
+// Convert_v1_VsphereVirtualDiskVolumeSource_To_api_VsphereVirtualDiskVolumeSource is an autogenerated conversion function.
+func Convert_v1_VsphereVirtualDiskVolumeSource_To_api_VsphereVirtualDiskVolumeSource(in *VsphereVirtualDiskVolumeSource, out *api.VsphereVirtualDiskVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_VsphereVirtualDiskVolumeSource_To_api_VsphereVirtualDiskVolumeSource(in, out, s)
+}
+
+func autoConvert_api_VsphereVirtualDiskVolumeSource_To_v1_VsphereVirtualDiskVolumeSource(in *api.VsphereVirtualDiskVolumeSource, out *VsphereVirtualDiskVolumeSource, s conversion.Scope) error {
+ out.VolumePath = in.VolumePath
+ out.FSType = in.FSType
+ out.StoragePolicyName = in.StoragePolicyName
+ out.StoragePolicyID = in.StoragePolicyID
+ return nil
+}
+
+// Convert_api_VsphereVirtualDiskVolumeSource_To_v1_VsphereVirtualDiskVolumeSource is an autogenerated conversion function.
+func Convert_api_VsphereVirtualDiskVolumeSource_To_v1_VsphereVirtualDiskVolumeSource(in *api.VsphereVirtualDiskVolumeSource, out *VsphereVirtualDiskVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_VsphereVirtualDiskVolumeSource_To_v1_VsphereVirtualDiskVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_WeightedPodAffinityTerm_To_api_WeightedPodAffinityTerm(in *WeightedPodAffinityTerm, out *api.WeightedPodAffinityTerm, s conversion.Scope) error {
+ out.Weight = in.Weight
+ if err := Convert_v1_PodAffinityTerm_To_api_PodAffinityTerm(&in.PodAffinityTerm, &out.PodAffinityTerm, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_WeightedPodAffinityTerm_To_api_WeightedPodAffinityTerm is an autogenerated conversion function.
+func Convert_v1_WeightedPodAffinityTerm_To_api_WeightedPodAffinityTerm(in *WeightedPodAffinityTerm, out *api.WeightedPodAffinityTerm, s conversion.Scope) error {
+ return autoConvert_v1_WeightedPodAffinityTerm_To_api_WeightedPodAffinityTerm(in, out, s)
+}
+
+func autoConvert_api_WeightedPodAffinityTerm_To_v1_WeightedPodAffinityTerm(in *api.WeightedPodAffinityTerm, out *WeightedPodAffinityTerm, s conversion.Scope) error {
+ out.Weight = in.Weight
+ if err := Convert_api_PodAffinityTerm_To_v1_PodAffinityTerm(&in.PodAffinityTerm, &out.PodAffinityTerm, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_WeightedPodAffinityTerm_To_v1_WeightedPodAffinityTerm is an autogenerated conversion function.
+func Convert_api_WeightedPodAffinityTerm_To_v1_WeightedPodAffinityTerm(in *api.WeightedPodAffinityTerm, out *WeightedPodAffinityTerm, s conversion.Scope) error {
+ return autoConvert_api_WeightedPodAffinityTerm_To_v1_WeightedPodAffinityTerm(in, out, s)
+}
diff --git a/vendor/k8s.io/client-go/pkg/api/v1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/api/v1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..b909d9b33
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/v1/zz_generated.deepcopy.go
@@ -0,0 +1,3770 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ types "k8s.io/apimachinery/pkg/types"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_AWSElasticBlockStoreVolumeSource, InType: reflect.TypeOf(&AWSElasticBlockStoreVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Affinity, InType: reflect.TypeOf(&Affinity{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_AttachedVolume, InType: reflect.TypeOf(&AttachedVolume{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_AvoidPods, InType: reflect.TypeOf(&AvoidPods{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_AzureDiskVolumeSource, InType: reflect.TypeOf(&AzureDiskVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_AzureFileVolumeSource, InType: reflect.TypeOf(&AzureFileVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Binding, InType: reflect.TypeOf(&Binding{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Capabilities, InType: reflect.TypeOf(&Capabilities{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_CephFSVolumeSource, InType: reflect.TypeOf(&CephFSVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_CinderVolumeSource, InType: reflect.TypeOf(&CinderVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ComponentCondition, InType: reflect.TypeOf(&ComponentCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ComponentStatus, InType: reflect.TypeOf(&ComponentStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ComponentStatusList, InType: reflect.TypeOf(&ComponentStatusList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ConfigMap, InType: reflect.TypeOf(&ConfigMap{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ConfigMapEnvSource, InType: reflect.TypeOf(&ConfigMapEnvSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ConfigMapKeySelector, InType: reflect.TypeOf(&ConfigMapKeySelector{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ConfigMapList, InType: reflect.TypeOf(&ConfigMapList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ConfigMapProjection, InType: reflect.TypeOf(&ConfigMapProjection{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ConfigMapVolumeSource, InType: reflect.TypeOf(&ConfigMapVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Container, InType: reflect.TypeOf(&Container{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ContainerImage, InType: reflect.TypeOf(&ContainerImage{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ContainerPort, InType: reflect.TypeOf(&ContainerPort{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ContainerState, InType: reflect.TypeOf(&ContainerState{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ContainerStateRunning, InType: reflect.TypeOf(&ContainerStateRunning{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ContainerStateTerminated, InType: reflect.TypeOf(&ContainerStateTerminated{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ContainerStateWaiting, InType: reflect.TypeOf(&ContainerStateWaiting{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ContainerStatus, InType: reflect.TypeOf(&ContainerStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_DaemonEndpoint, InType: reflect.TypeOf(&DaemonEndpoint{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_DeleteOptions, InType: reflect.TypeOf(&DeleteOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_DownwardAPIProjection, InType: reflect.TypeOf(&DownwardAPIProjection{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_DownwardAPIVolumeFile, InType: reflect.TypeOf(&DownwardAPIVolumeFile{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_DownwardAPIVolumeSource, InType: reflect.TypeOf(&DownwardAPIVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_EmptyDirVolumeSource, InType: reflect.TypeOf(&EmptyDirVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_EndpointAddress, InType: reflect.TypeOf(&EndpointAddress{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_EndpointPort, InType: reflect.TypeOf(&EndpointPort{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_EndpointSubset, InType: reflect.TypeOf(&EndpointSubset{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Endpoints, InType: reflect.TypeOf(&Endpoints{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_EndpointsList, InType: reflect.TypeOf(&EndpointsList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_EnvFromSource, InType: reflect.TypeOf(&EnvFromSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_EnvVar, InType: reflect.TypeOf(&EnvVar{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_EnvVarSource, InType: reflect.TypeOf(&EnvVarSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Event, InType: reflect.TypeOf(&Event{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_EventList, InType: reflect.TypeOf(&EventList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_EventSource, InType: reflect.TypeOf(&EventSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ExecAction, InType: reflect.TypeOf(&ExecAction{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_FCVolumeSource, InType: reflect.TypeOf(&FCVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_FlexVolumeSource, InType: reflect.TypeOf(&FlexVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_FlockerVolumeSource, InType: reflect.TypeOf(&FlockerVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_GCEPersistentDiskVolumeSource, InType: reflect.TypeOf(&GCEPersistentDiskVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_GitRepoVolumeSource, InType: reflect.TypeOf(&GitRepoVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_GlusterfsVolumeSource, InType: reflect.TypeOf(&GlusterfsVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HTTPGetAction, InType: reflect.TypeOf(&HTTPGetAction{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HTTPHeader, InType: reflect.TypeOf(&HTTPHeader{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Handler, InType: reflect.TypeOf(&Handler{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HostAlias, InType: reflect.TypeOf(&HostAlias{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HostPathVolumeSource, InType: reflect.TypeOf(&HostPathVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ISCSIVolumeSource, InType: reflect.TypeOf(&ISCSIVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_KeyToPath, InType: reflect.TypeOf(&KeyToPath{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Lifecycle, InType: reflect.TypeOf(&Lifecycle{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_LimitRange, InType: reflect.TypeOf(&LimitRange{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_LimitRangeItem, InType: reflect.TypeOf(&LimitRangeItem{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_LimitRangeList, InType: reflect.TypeOf(&LimitRangeList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_LimitRangeSpec, InType: reflect.TypeOf(&LimitRangeSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_List, InType: reflect.TypeOf(&List{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ListOptions, InType: reflect.TypeOf(&ListOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_LoadBalancerIngress, InType: reflect.TypeOf(&LoadBalancerIngress{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_LoadBalancerStatus, InType: reflect.TypeOf(&LoadBalancerStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_LocalObjectReference, InType: reflect.TypeOf(&LocalObjectReference{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_LocalVolumeSource, InType: reflect.TypeOf(&LocalVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NFSVolumeSource, InType: reflect.TypeOf(&NFSVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Namespace, InType: reflect.TypeOf(&Namespace{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NamespaceList, InType: reflect.TypeOf(&NamespaceList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NamespaceSpec, InType: reflect.TypeOf(&NamespaceSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NamespaceStatus, InType: reflect.TypeOf(&NamespaceStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Node, InType: reflect.TypeOf(&Node{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeAddress, InType: reflect.TypeOf(&NodeAddress{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeAffinity, InType: reflect.TypeOf(&NodeAffinity{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeCondition, InType: reflect.TypeOf(&NodeCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeDaemonEndpoints, InType: reflect.TypeOf(&NodeDaemonEndpoints{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeList, InType: reflect.TypeOf(&NodeList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeProxyOptions, InType: reflect.TypeOf(&NodeProxyOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeResources, InType: reflect.TypeOf(&NodeResources{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeSelector, InType: reflect.TypeOf(&NodeSelector{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeSelectorRequirement, InType: reflect.TypeOf(&NodeSelectorRequirement{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeSelectorTerm, InType: reflect.TypeOf(&NodeSelectorTerm{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeSpec, InType: reflect.TypeOf(&NodeSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeStatus, InType: reflect.TypeOf(&NodeStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeSystemInfo, InType: reflect.TypeOf(&NodeSystemInfo{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ObjectFieldSelector, InType: reflect.TypeOf(&ObjectFieldSelector{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ObjectMeta, InType: reflect.TypeOf(&ObjectMeta{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ObjectReference, InType: reflect.TypeOf(&ObjectReference{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolume, InType: reflect.TypeOf(&PersistentVolume{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeClaim, InType: reflect.TypeOf(&PersistentVolumeClaim{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeClaimList, InType: reflect.TypeOf(&PersistentVolumeClaimList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeClaimSpec, InType: reflect.TypeOf(&PersistentVolumeClaimSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeClaimStatus, InType: reflect.TypeOf(&PersistentVolumeClaimStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeClaimVolumeSource, InType: reflect.TypeOf(&PersistentVolumeClaimVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeList, InType: reflect.TypeOf(&PersistentVolumeList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeSource, InType: reflect.TypeOf(&PersistentVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeSpec, InType: reflect.TypeOf(&PersistentVolumeSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeStatus, InType: reflect.TypeOf(&PersistentVolumeStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PhotonPersistentDiskVolumeSource, InType: reflect.TypeOf(&PhotonPersistentDiskVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Pod, InType: reflect.TypeOf(&Pod{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodAffinity, InType: reflect.TypeOf(&PodAffinity{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodAffinityTerm, InType: reflect.TypeOf(&PodAffinityTerm{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodAntiAffinity, InType: reflect.TypeOf(&PodAntiAffinity{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodAttachOptions, InType: reflect.TypeOf(&PodAttachOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodCondition, InType: reflect.TypeOf(&PodCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodExecOptions, InType: reflect.TypeOf(&PodExecOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodList, InType: reflect.TypeOf(&PodList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodLogOptions, InType: reflect.TypeOf(&PodLogOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodPortForwardOptions, InType: reflect.TypeOf(&PodPortForwardOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodProxyOptions, InType: reflect.TypeOf(&PodProxyOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodSecurityContext, InType: reflect.TypeOf(&PodSecurityContext{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodSignature, InType: reflect.TypeOf(&PodSignature{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodSpec, InType: reflect.TypeOf(&PodSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodStatus, InType: reflect.TypeOf(&PodStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodStatusResult, InType: reflect.TypeOf(&PodStatusResult{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodTemplate, InType: reflect.TypeOf(&PodTemplate{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodTemplateList, InType: reflect.TypeOf(&PodTemplateList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodTemplateSpec, InType: reflect.TypeOf(&PodTemplateSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PortworxVolumeSource, InType: reflect.TypeOf(&PortworxVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Preconditions, InType: reflect.TypeOf(&Preconditions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PreferAvoidPodsEntry, InType: reflect.TypeOf(&PreferAvoidPodsEntry{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PreferredSchedulingTerm, InType: reflect.TypeOf(&PreferredSchedulingTerm{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Probe, InType: reflect.TypeOf(&Probe{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ProjectedVolumeSource, InType: reflect.TypeOf(&ProjectedVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_QuobyteVolumeSource, InType: reflect.TypeOf(&QuobyteVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_RBDVolumeSource, InType: reflect.TypeOf(&RBDVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_RangeAllocation, InType: reflect.TypeOf(&RangeAllocation{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ReplicationController, InType: reflect.TypeOf(&ReplicationController{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ReplicationControllerCondition, InType: reflect.TypeOf(&ReplicationControllerCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ReplicationControllerList, InType: reflect.TypeOf(&ReplicationControllerList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ReplicationControllerSpec, InType: reflect.TypeOf(&ReplicationControllerSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ReplicationControllerStatus, InType: reflect.TypeOf(&ReplicationControllerStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ResourceFieldSelector, InType: reflect.TypeOf(&ResourceFieldSelector{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ResourceQuota, InType: reflect.TypeOf(&ResourceQuota{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ResourceQuotaList, InType: reflect.TypeOf(&ResourceQuotaList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ResourceQuotaSpec, InType: reflect.TypeOf(&ResourceQuotaSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ResourceQuotaStatus, InType: reflect.TypeOf(&ResourceQuotaStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ResourceRequirements, InType: reflect.TypeOf(&ResourceRequirements{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SELinuxOptions, InType: reflect.TypeOf(&SELinuxOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ScaleIOVolumeSource, InType: reflect.TypeOf(&ScaleIOVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Secret, InType: reflect.TypeOf(&Secret{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SecretEnvSource, InType: reflect.TypeOf(&SecretEnvSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SecretKeySelector, InType: reflect.TypeOf(&SecretKeySelector{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SecretList, InType: reflect.TypeOf(&SecretList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SecretProjection, InType: reflect.TypeOf(&SecretProjection{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SecretVolumeSource, InType: reflect.TypeOf(&SecretVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SecurityContext, InType: reflect.TypeOf(&SecurityContext{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SerializedReference, InType: reflect.TypeOf(&SerializedReference{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Service, InType: reflect.TypeOf(&Service{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ServiceAccount, InType: reflect.TypeOf(&ServiceAccount{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ServiceAccountList, InType: reflect.TypeOf(&ServiceAccountList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ServiceList, InType: reflect.TypeOf(&ServiceList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ServicePort, InType: reflect.TypeOf(&ServicePort{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ServiceProxyOptions, InType: reflect.TypeOf(&ServiceProxyOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ServiceSpec, InType: reflect.TypeOf(&ServiceSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ServiceStatus, InType: reflect.TypeOf(&ServiceStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_StorageOSPersistentVolumeSource, InType: reflect.TypeOf(&StorageOSPersistentVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_StorageOSVolumeSource, InType: reflect.TypeOf(&StorageOSVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Sysctl, InType: reflect.TypeOf(&Sysctl{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_TCPSocketAction, InType: reflect.TypeOf(&TCPSocketAction{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Taint, InType: reflect.TypeOf(&Taint{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Toleration, InType: reflect.TypeOf(&Toleration{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Volume, InType: reflect.TypeOf(&Volume{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_VolumeMount, InType: reflect.TypeOf(&VolumeMount{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_VolumeProjection, InType: reflect.TypeOf(&VolumeProjection{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_VolumeSource, InType: reflect.TypeOf(&VolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_VsphereVirtualDiskVolumeSource, InType: reflect.TypeOf(&VsphereVirtualDiskVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_WeightedPodAffinityTerm, InType: reflect.TypeOf(&WeightedPodAffinityTerm{})},
+ )
+}
+
+// DeepCopy_v1_AWSElasticBlockStoreVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_AWSElasticBlockStoreVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*AWSElasticBlockStoreVolumeSource)
+ out := out.(*AWSElasticBlockStoreVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_Affinity is an autogenerated deepcopy function.
+func DeepCopy_v1_Affinity(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Affinity)
+ out := out.(*Affinity)
+ *out = *in
+ if in.NodeAffinity != nil {
+ in, out := &in.NodeAffinity, &out.NodeAffinity
+ *out = new(NodeAffinity)
+ if err := DeepCopy_v1_NodeAffinity(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.PodAffinity != nil {
+ in, out := &in.PodAffinity, &out.PodAffinity
+ *out = new(PodAffinity)
+ if err := DeepCopy_v1_PodAffinity(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.PodAntiAffinity != nil {
+ in, out := &in.PodAntiAffinity, &out.PodAntiAffinity
+ *out = new(PodAntiAffinity)
+ if err := DeepCopy_v1_PodAntiAffinity(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_AttachedVolume is an autogenerated deepcopy function.
+func DeepCopy_v1_AttachedVolume(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*AttachedVolume)
+ out := out.(*AttachedVolume)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_AvoidPods is an autogenerated deepcopy function.
+func DeepCopy_v1_AvoidPods(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*AvoidPods)
+ out := out.(*AvoidPods)
+ *out = *in
+ if in.PreferAvoidPods != nil {
+ in, out := &in.PreferAvoidPods, &out.PreferAvoidPods
+ *out = make([]PreferAvoidPodsEntry, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_PreferAvoidPodsEntry(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_AzureDiskVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_AzureDiskVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*AzureDiskVolumeSource)
+ out := out.(*AzureDiskVolumeSource)
+ *out = *in
+ if in.CachingMode != nil {
+ in, out := &in.CachingMode, &out.CachingMode
+ *out = new(AzureDataDiskCachingMode)
+ **out = **in
+ }
+ if in.FSType != nil {
+ in, out := &in.FSType, &out.FSType
+ *out = new(string)
+ **out = **in
+ }
+ if in.ReadOnly != nil {
+ in, out := &in.ReadOnly, &out.ReadOnly
+ *out = new(bool)
+ **out = **in
+ }
+ if in.Kind != nil {
+ in, out := &in.Kind, &out.Kind
+ *out = new(AzureDataDiskKind)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_AzureFileVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_AzureFileVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*AzureFileVolumeSource)
+ out := out.(*AzureFileVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_Binding is an autogenerated deepcopy function.
+func DeepCopy_v1_Binding(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Binding)
+ out := out.(*Binding)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_Capabilities is an autogenerated deepcopy function.
+func DeepCopy_v1_Capabilities(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Capabilities)
+ out := out.(*Capabilities)
+ *out = *in
+ if in.Add != nil {
+ in, out := &in.Add, &out.Add
+ *out = make([]Capability, len(*in))
+ copy(*out, *in)
+ }
+ if in.Drop != nil {
+ in, out := &in.Drop, &out.Drop
+ *out = make([]Capability, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_CephFSVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_CephFSVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CephFSVolumeSource)
+ out := out.(*CephFSVolumeSource)
+ *out = *in
+ if in.Monitors != nil {
+ in, out := &in.Monitors, &out.Monitors
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_CinderVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_CinderVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CinderVolumeSource)
+ out := out.(*CinderVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_ComponentCondition is an autogenerated deepcopy function.
+func DeepCopy_v1_ComponentCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ComponentCondition)
+ out := out.(*ComponentCondition)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_ComponentStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_ComponentStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ComponentStatus)
+ out := out.(*ComponentStatus)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]ComponentCondition, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ComponentStatusList is an autogenerated deepcopy function.
+func DeepCopy_v1_ComponentStatusList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ComponentStatusList)
+ out := out.(*ComponentStatusList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ComponentStatus, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_ComponentStatus(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ConfigMap is an autogenerated deepcopy function.
+func DeepCopy_v1_ConfigMap(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ConfigMap)
+ out := out.(*ConfigMap)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if in.Data != nil {
+ in, out := &in.Data, &out.Data
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ConfigMapEnvSource is an autogenerated deepcopy function.
+func DeepCopy_v1_ConfigMapEnvSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ConfigMapEnvSource)
+ out := out.(*ConfigMapEnvSource)
+ *out = *in
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ConfigMapKeySelector is an autogenerated deepcopy function.
+func DeepCopy_v1_ConfigMapKeySelector(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ConfigMapKeySelector)
+ out := out.(*ConfigMapKeySelector)
+ *out = *in
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ConfigMapList is an autogenerated deepcopy function.
+func DeepCopy_v1_ConfigMapList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ConfigMapList)
+ out := out.(*ConfigMapList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ConfigMap, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_ConfigMap(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ConfigMapProjection is an autogenerated deepcopy function.
+func DeepCopy_v1_ConfigMapProjection(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ConfigMapProjection)
+ out := out.(*ConfigMapProjection)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]KeyToPath, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_KeyToPath(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ConfigMapVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_ConfigMapVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ConfigMapVolumeSource)
+ out := out.(*ConfigMapVolumeSource)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]KeyToPath, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_KeyToPath(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.DefaultMode != nil {
+ in, out := &in.DefaultMode, &out.DefaultMode
+ *out = new(int32)
+ **out = **in
+ }
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_Container is an autogenerated deepcopy function.
+func DeepCopy_v1_Container(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Container)
+ out := out.(*Container)
+ *out = *in
+ if in.Command != nil {
+ in, out := &in.Command, &out.Command
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Args != nil {
+ in, out := &in.Args, &out.Args
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]ContainerPort, len(*in))
+ copy(*out, *in)
+ }
+ if in.EnvFrom != nil {
+ in, out := &in.EnvFrom, &out.EnvFrom
+ *out = make([]EnvFromSource, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_EnvFromSource(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Env != nil {
+ in, out := &in.Env, &out.Env
+ *out = make([]EnvVar, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_EnvVar(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if err := DeepCopy_v1_ResourceRequirements(&in.Resources, &out.Resources, c); err != nil {
+ return err
+ }
+ if in.VolumeMounts != nil {
+ in, out := &in.VolumeMounts, &out.VolumeMounts
+ *out = make([]VolumeMount, len(*in))
+ copy(*out, *in)
+ }
+ if in.LivenessProbe != nil {
+ in, out := &in.LivenessProbe, &out.LivenessProbe
+ *out = new(Probe)
+ if err := DeepCopy_v1_Probe(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.ReadinessProbe != nil {
+ in, out := &in.ReadinessProbe, &out.ReadinessProbe
+ *out = new(Probe)
+ if err := DeepCopy_v1_Probe(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Lifecycle != nil {
+ in, out := &in.Lifecycle, &out.Lifecycle
+ *out = new(Lifecycle)
+ if err := DeepCopy_v1_Lifecycle(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.SecurityContext != nil {
+ in, out := &in.SecurityContext, &out.SecurityContext
+ *out = new(SecurityContext)
+ if err := DeepCopy_v1_SecurityContext(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ContainerImage is an autogenerated deepcopy function.
+func DeepCopy_v1_ContainerImage(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ContainerImage)
+ out := out.(*ContainerImage)
+ *out = *in
+ if in.Names != nil {
+ in, out := &in.Names, &out.Names
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ContainerPort is an autogenerated deepcopy function.
+func DeepCopy_v1_ContainerPort(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ContainerPort)
+ out := out.(*ContainerPort)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_ContainerState is an autogenerated deepcopy function.
+func DeepCopy_v1_ContainerState(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ContainerState)
+ out := out.(*ContainerState)
+ *out = *in
+ if in.Waiting != nil {
+ in, out := &in.Waiting, &out.Waiting
+ *out = new(ContainerStateWaiting)
+ **out = **in
+ }
+ if in.Running != nil {
+ in, out := &in.Running, &out.Running
+ *out = new(ContainerStateRunning)
+ if err := DeepCopy_v1_ContainerStateRunning(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Terminated != nil {
+ in, out := &in.Terminated, &out.Terminated
+ *out = new(ContainerStateTerminated)
+ if err := DeepCopy_v1_ContainerStateTerminated(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ContainerStateRunning is an autogenerated deepcopy function.
+func DeepCopy_v1_ContainerStateRunning(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ContainerStateRunning)
+ out := out.(*ContainerStateRunning)
+ *out = *in
+ out.StartedAt = in.StartedAt.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_ContainerStateTerminated is an autogenerated deepcopy function.
+func DeepCopy_v1_ContainerStateTerminated(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ContainerStateTerminated)
+ out := out.(*ContainerStateTerminated)
+ *out = *in
+ out.StartedAt = in.StartedAt.DeepCopy()
+ out.FinishedAt = in.FinishedAt.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_ContainerStateWaiting is an autogenerated deepcopy function.
+func DeepCopy_v1_ContainerStateWaiting(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ContainerStateWaiting)
+ out := out.(*ContainerStateWaiting)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_ContainerStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_ContainerStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ContainerStatus)
+ out := out.(*ContainerStatus)
+ *out = *in
+ if err := DeepCopy_v1_ContainerState(&in.State, &out.State, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1_ContainerState(&in.LastTerminationState, &out.LastTerminationState, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_DaemonEndpoint is an autogenerated deepcopy function.
+func DeepCopy_v1_DaemonEndpoint(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DaemonEndpoint)
+ out := out.(*DaemonEndpoint)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_DeleteOptions is an autogenerated deepcopy function.
+func DeepCopy_v1_DeleteOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeleteOptions)
+ out := out.(*DeleteOptions)
+ *out = *in
+ if in.GracePeriodSeconds != nil {
+ in, out := &in.GracePeriodSeconds, &out.GracePeriodSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.Preconditions != nil {
+ in, out := &in.Preconditions, &out.Preconditions
+ *out = new(Preconditions)
+ if err := DeepCopy_v1_Preconditions(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.OrphanDependents != nil {
+ in, out := &in.OrphanDependents, &out.OrphanDependents
+ *out = new(bool)
+ **out = **in
+ }
+ if in.PropagationPolicy != nil {
+ in, out := &in.PropagationPolicy, &out.PropagationPolicy
+ *out = new(DeletionPropagation)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_DownwardAPIProjection is an autogenerated deepcopy function.
+func DeepCopy_v1_DownwardAPIProjection(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DownwardAPIProjection)
+ out := out.(*DownwardAPIProjection)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]DownwardAPIVolumeFile, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_DownwardAPIVolumeFile(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_DownwardAPIVolumeFile is an autogenerated deepcopy function.
+func DeepCopy_v1_DownwardAPIVolumeFile(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DownwardAPIVolumeFile)
+ out := out.(*DownwardAPIVolumeFile)
+ *out = *in
+ if in.FieldRef != nil {
+ in, out := &in.FieldRef, &out.FieldRef
+ *out = new(ObjectFieldSelector)
+ **out = **in
+ }
+ if in.ResourceFieldRef != nil {
+ in, out := &in.ResourceFieldRef, &out.ResourceFieldRef
+ *out = new(ResourceFieldSelector)
+ if err := DeepCopy_v1_ResourceFieldSelector(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Mode != nil {
+ in, out := &in.Mode, &out.Mode
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_DownwardAPIVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_DownwardAPIVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DownwardAPIVolumeSource)
+ out := out.(*DownwardAPIVolumeSource)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]DownwardAPIVolumeFile, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_DownwardAPIVolumeFile(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.DefaultMode != nil {
+ in, out := &in.DefaultMode, &out.DefaultMode
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_EmptyDirVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_EmptyDirVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EmptyDirVolumeSource)
+ out := out.(*EmptyDirVolumeSource)
+ *out = *in
+ out.SizeLimit = in.SizeLimit.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_EndpointAddress is an autogenerated deepcopy function.
+func DeepCopy_v1_EndpointAddress(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EndpointAddress)
+ out := out.(*EndpointAddress)
+ *out = *in
+ if in.NodeName != nil {
+ in, out := &in.NodeName, &out.NodeName
+ *out = new(string)
+ **out = **in
+ }
+ if in.TargetRef != nil {
+ in, out := &in.TargetRef, &out.TargetRef
+ *out = new(ObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_EndpointPort is an autogenerated deepcopy function.
+func DeepCopy_v1_EndpointPort(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EndpointPort)
+ out := out.(*EndpointPort)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_EndpointSubset is an autogenerated deepcopy function.
+func DeepCopy_v1_EndpointSubset(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EndpointSubset)
+ out := out.(*EndpointSubset)
+ *out = *in
+ if in.Addresses != nil {
+ in, out := &in.Addresses, &out.Addresses
+ *out = make([]EndpointAddress, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_EndpointAddress(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.NotReadyAddresses != nil {
+ in, out := &in.NotReadyAddresses, &out.NotReadyAddresses
+ *out = make([]EndpointAddress, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_EndpointAddress(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]EndpointPort, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_Endpoints is an autogenerated deepcopy function.
+func DeepCopy_v1_Endpoints(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Endpoints)
+ out := out.(*Endpoints)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if in.Subsets != nil {
+ in, out := &in.Subsets, &out.Subsets
+ *out = make([]EndpointSubset, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_EndpointSubset(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_EndpointsList is an autogenerated deepcopy function.
+func DeepCopy_v1_EndpointsList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EndpointsList)
+ out := out.(*EndpointsList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Endpoints, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_Endpoints(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_EnvFromSource is an autogenerated deepcopy function.
+func DeepCopy_v1_EnvFromSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EnvFromSource)
+ out := out.(*EnvFromSource)
+ *out = *in
+ if in.ConfigMapRef != nil {
+ in, out := &in.ConfigMapRef, &out.ConfigMapRef
+ *out = new(ConfigMapEnvSource)
+ if err := DeepCopy_v1_ConfigMapEnvSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(SecretEnvSource)
+ if err := DeepCopy_v1_SecretEnvSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_EnvVar is an autogenerated deepcopy function.
+func DeepCopy_v1_EnvVar(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EnvVar)
+ out := out.(*EnvVar)
+ *out = *in
+ if in.ValueFrom != nil {
+ in, out := &in.ValueFrom, &out.ValueFrom
+ *out = new(EnvVarSource)
+ if err := DeepCopy_v1_EnvVarSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_EnvVarSource is an autogenerated deepcopy function.
+func DeepCopy_v1_EnvVarSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EnvVarSource)
+ out := out.(*EnvVarSource)
+ *out = *in
+ if in.FieldRef != nil {
+ in, out := &in.FieldRef, &out.FieldRef
+ *out = new(ObjectFieldSelector)
+ **out = **in
+ }
+ if in.ResourceFieldRef != nil {
+ in, out := &in.ResourceFieldRef, &out.ResourceFieldRef
+ *out = new(ResourceFieldSelector)
+ if err := DeepCopy_v1_ResourceFieldSelector(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.ConfigMapKeyRef != nil {
+ in, out := &in.ConfigMapKeyRef, &out.ConfigMapKeyRef
+ *out = new(ConfigMapKeySelector)
+ if err := DeepCopy_v1_ConfigMapKeySelector(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.SecretKeyRef != nil {
+ in, out := &in.SecretKeyRef, &out.SecretKeyRef
+ *out = new(SecretKeySelector)
+ if err := DeepCopy_v1_SecretKeySelector(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_Event is an autogenerated deepcopy function.
+func DeepCopy_v1_Event(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Event)
+ out := out.(*Event)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ out.FirstTimestamp = in.FirstTimestamp.DeepCopy()
+ out.LastTimestamp = in.LastTimestamp.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_EventList is an autogenerated deepcopy function.
+func DeepCopy_v1_EventList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EventList)
+ out := out.(*EventList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Event, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_Event(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_EventSource is an autogenerated deepcopy function.
+func DeepCopy_v1_EventSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EventSource)
+ out := out.(*EventSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_ExecAction is an autogenerated deepcopy function.
+func DeepCopy_v1_ExecAction(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ExecAction)
+ out := out.(*ExecAction)
+ *out = *in
+ if in.Command != nil {
+ in, out := &in.Command, &out.Command
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_FCVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_FCVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*FCVolumeSource)
+ out := out.(*FCVolumeSource)
+ *out = *in
+ if in.TargetWWNs != nil {
+ in, out := &in.TargetWWNs, &out.TargetWWNs
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Lun != nil {
+ in, out := &in.Lun, &out.Lun
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_FlexVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_FlexVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*FlexVolumeSource)
+ out := out.(*FlexVolumeSource)
+ *out = *in
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = **in
+ }
+ if in.Options != nil {
+ in, out := &in.Options, &out.Options
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_FlockerVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_FlockerVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*FlockerVolumeSource)
+ out := out.(*FlockerVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_GCEPersistentDiskVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_GCEPersistentDiskVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*GCEPersistentDiskVolumeSource)
+ out := out.(*GCEPersistentDiskVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_GitRepoVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_GitRepoVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*GitRepoVolumeSource)
+ out := out.(*GitRepoVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_GlusterfsVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_GlusterfsVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*GlusterfsVolumeSource)
+ out := out.(*GlusterfsVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_HTTPGetAction is an autogenerated deepcopy function.
+func DeepCopy_v1_HTTPGetAction(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HTTPGetAction)
+ out := out.(*HTTPGetAction)
+ *out = *in
+ if in.HTTPHeaders != nil {
+ in, out := &in.HTTPHeaders, &out.HTTPHeaders
+ *out = make([]HTTPHeader, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_HTTPHeader is an autogenerated deepcopy function.
+func DeepCopy_v1_HTTPHeader(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HTTPHeader)
+ out := out.(*HTTPHeader)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_Handler is an autogenerated deepcopy function.
+func DeepCopy_v1_Handler(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Handler)
+ out := out.(*Handler)
+ *out = *in
+ if in.Exec != nil {
+ in, out := &in.Exec, &out.Exec
+ *out = new(ExecAction)
+ if err := DeepCopy_v1_ExecAction(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.HTTPGet != nil {
+ in, out := &in.HTTPGet, &out.HTTPGet
+ *out = new(HTTPGetAction)
+ if err := DeepCopy_v1_HTTPGetAction(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.TCPSocket != nil {
+ in, out := &in.TCPSocket, &out.TCPSocket
+ *out = new(TCPSocketAction)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_HostAlias is an autogenerated deepcopy function.
+func DeepCopy_v1_HostAlias(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HostAlias)
+ out := out.(*HostAlias)
+ *out = *in
+ if in.Hostnames != nil {
+ in, out := &in.Hostnames, &out.Hostnames
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_HostPathVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_HostPathVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HostPathVolumeSource)
+ out := out.(*HostPathVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_ISCSIVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_ISCSIVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ISCSIVolumeSource)
+ out := out.(*ISCSIVolumeSource)
+ *out = *in
+ if in.Portals != nil {
+ in, out := &in.Portals, &out.Portals
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_KeyToPath is an autogenerated deepcopy function.
+func DeepCopy_v1_KeyToPath(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*KeyToPath)
+ out := out.(*KeyToPath)
+ *out = *in
+ if in.Mode != nil {
+ in, out := &in.Mode, &out.Mode
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_Lifecycle is an autogenerated deepcopy function.
+func DeepCopy_v1_Lifecycle(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Lifecycle)
+ out := out.(*Lifecycle)
+ *out = *in
+ if in.PostStart != nil {
+ in, out := &in.PostStart, &out.PostStart
+ *out = new(Handler)
+ if err := DeepCopy_v1_Handler(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.PreStop != nil {
+ in, out := &in.PreStop, &out.PreStop
+ *out = new(Handler)
+ if err := DeepCopy_v1_Handler(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_LimitRange is an autogenerated deepcopy function.
+func DeepCopy_v1_LimitRange(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LimitRange)
+ out := out.(*LimitRange)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_LimitRangeSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_LimitRangeItem is an autogenerated deepcopy function.
+func DeepCopy_v1_LimitRangeItem(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LimitRangeItem)
+ out := out.(*LimitRangeItem)
+ *out = *in
+ if in.Max != nil {
+ in, out := &in.Max, &out.Max
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Min != nil {
+ in, out := &in.Min, &out.Min
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Default != nil {
+ in, out := &in.Default, &out.Default
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.DefaultRequest != nil {
+ in, out := &in.DefaultRequest, &out.DefaultRequest
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.MaxLimitRequestRatio != nil {
+ in, out := &in.MaxLimitRequestRatio, &out.MaxLimitRequestRatio
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_LimitRangeList is an autogenerated deepcopy function.
+func DeepCopy_v1_LimitRangeList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LimitRangeList)
+ out := out.(*LimitRangeList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]LimitRange, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_LimitRange(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_LimitRangeSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_LimitRangeSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LimitRangeSpec)
+ out := out.(*LimitRangeSpec)
+ *out = *in
+ if in.Limits != nil {
+ in, out := &in.Limits, &out.Limits
+ *out = make([]LimitRangeItem, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_LimitRangeItem(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_List is an autogenerated deepcopy function.
+func DeepCopy_v1_List(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*List)
+ out := out.(*List)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]runtime.RawExtension, len(*in))
+ for i := range *in {
+ if newVal, err := c.DeepCopy(&(*in)[i]); err != nil {
+ return err
+ } else {
+ (*out)[i] = *newVal.(*runtime.RawExtension)
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ListOptions is an autogenerated deepcopy function.
+func DeepCopy_v1_ListOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ListOptions)
+ out := out.(*ListOptions)
+ *out = *in
+ if in.TimeoutSeconds != nil {
+ in, out := &in.TimeoutSeconds, &out.TimeoutSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_LoadBalancerIngress is an autogenerated deepcopy function.
+func DeepCopy_v1_LoadBalancerIngress(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LoadBalancerIngress)
+ out := out.(*LoadBalancerIngress)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_LoadBalancerStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_LoadBalancerStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LoadBalancerStatus)
+ out := out.(*LoadBalancerStatus)
+ *out = *in
+ if in.Ingress != nil {
+ in, out := &in.Ingress, &out.Ingress
+ *out = make([]LoadBalancerIngress, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_LocalObjectReference is an autogenerated deepcopy function.
+func DeepCopy_v1_LocalObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LocalObjectReference)
+ out := out.(*LocalObjectReference)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_LocalVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_LocalVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LocalVolumeSource)
+ out := out.(*LocalVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_NFSVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_NFSVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NFSVolumeSource)
+ out := out.(*NFSVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_Namespace is an autogenerated deepcopy function.
+func DeepCopy_v1_Namespace(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Namespace)
+ out := out.(*Namespace)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_NamespaceSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NamespaceList is an autogenerated deepcopy function.
+func DeepCopy_v1_NamespaceList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NamespaceList)
+ out := out.(*NamespaceList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Namespace, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_Namespace(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NamespaceSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_NamespaceSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NamespaceSpec)
+ out := out.(*NamespaceSpec)
+ *out = *in
+ if in.Finalizers != nil {
+ in, out := &in.Finalizers, &out.Finalizers
+ *out = make([]FinalizerName, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NamespaceStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_NamespaceStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NamespaceStatus)
+ out := out.(*NamespaceStatus)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_Node is an autogenerated deepcopy function.
+func DeepCopy_v1_Node(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Node)
+ out := out.(*Node)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_NodeSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1_NodeStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NodeAddress is an autogenerated deepcopy function.
+func DeepCopy_v1_NodeAddress(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeAddress)
+ out := out.(*NodeAddress)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_NodeAffinity is an autogenerated deepcopy function.
+func DeepCopy_v1_NodeAffinity(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeAffinity)
+ out := out.(*NodeAffinity)
+ *out = *in
+ if in.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution
+ *out = new(NodeSelector)
+ if err := DeepCopy_v1_NodeSelector(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.PreferredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution
+ *out = make([]PreferredSchedulingTerm, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_PreferredSchedulingTerm(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NodeCondition is an autogenerated deepcopy function.
+func DeepCopy_v1_NodeCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeCondition)
+ out := out.(*NodeCondition)
+ *out = *in
+ out.LastHeartbeatTime = in.LastHeartbeatTime.DeepCopy()
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_NodeDaemonEndpoints is an autogenerated deepcopy function.
+func DeepCopy_v1_NodeDaemonEndpoints(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeDaemonEndpoints)
+ out := out.(*NodeDaemonEndpoints)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_NodeList is an autogenerated deepcopy function.
+func DeepCopy_v1_NodeList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeList)
+ out := out.(*NodeList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Node, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_Node(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NodeProxyOptions is an autogenerated deepcopy function.
+func DeepCopy_v1_NodeProxyOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeProxyOptions)
+ out := out.(*NodeProxyOptions)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_NodeResources is an autogenerated deepcopy function.
+func DeepCopy_v1_NodeResources(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeResources)
+ out := out.(*NodeResources)
+ *out = *in
+ if in.Capacity != nil {
+ in, out := &in.Capacity, &out.Capacity
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NodeSelector is an autogenerated deepcopy function.
+func DeepCopy_v1_NodeSelector(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeSelector)
+ out := out.(*NodeSelector)
+ *out = *in
+ if in.NodeSelectorTerms != nil {
+ in, out := &in.NodeSelectorTerms, &out.NodeSelectorTerms
+ *out = make([]NodeSelectorTerm, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_NodeSelectorTerm(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NodeSelectorRequirement is an autogenerated deepcopy function.
+func DeepCopy_v1_NodeSelectorRequirement(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeSelectorRequirement)
+ out := out.(*NodeSelectorRequirement)
+ *out = *in
+ if in.Values != nil {
+ in, out := &in.Values, &out.Values
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NodeSelectorTerm is an autogenerated deepcopy function.
+func DeepCopy_v1_NodeSelectorTerm(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeSelectorTerm)
+ out := out.(*NodeSelectorTerm)
+ *out = *in
+ if in.MatchExpressions != nil {
+ in, out := &in.MatchExpressions, &out.MatchExpressions
+ *out = make([]NodeSelectorRequirement, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_NodeSelectorRequirement(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NodeSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_NodeSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeSpec)
+ out := out.(*NodeSpec)
+ *out = *in
+ if in.Taints != nil {
+ in, out := &in.Taints, &out.Taints
+ *out = make([]Taint, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_Taint(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NodeStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_NodeStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeStatus)
+ out := out.(*NodeStatus)
+ *out = *in
+ if in.Capacity != nil {
+ in, out := &in.Capacity, &out.Capacity
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Allocatable != nil {
+ in, out := &in.Allocatable, &out.Allocatable
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]NodeCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_NodeCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Addresses != nil {
+ in, out := &in.Addresses, &out.Addresses
+ *out = make([]NodeAddress, len(*in))
+ copy(*out, *in)
+ }
+ if in.Images != nil {
+ in, out := &in.Images, &out.Images
+ *out = make([]ContainerImage, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_ContainerImage(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.VolumesInUse != nil {
+ in, out := &in.VolumesInUse, &out.VolumesInUse
+ *out = make([]UniqueVolumeName, len(*in))
+ copy(*out, *in)
+ }
+ if in.VolumesAttached != nil {
+ in, out := &in.VolumesAttached, &out.VolumesAttached
+ *out = make([]AttachedVolume, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NodeSystemInfo is an autogenerated deepcopy function.
+func DeepCopy_v1_NodeSystemInfo(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeSystemInfo)
+ out := out.(*NodeSystemInfo)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_ObjectFieldSelector is an autogenerated deepcopy function.
+func DeepCopy_v1_ObjectFieldSelector(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ObjectFieldSelector)
+ out := out.(*ObjectFieldSelector)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_ObjectMeta is an autogenerated deepcopy function.
+func DeepCopy_v1_ObjectMeta(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ObjectMeta)
+ out := out.(*ObjectMeta)
+ *out = *in
+ out.CreationTimestamp = in.CreationTimestamp.DeepCopy()
+ if in.DeletionTimestamp != nil {
+ in, out := &in.DeletionTimestamp, &out.DeletionTimestamp
+ *out = new(meta_v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ if in.DeletionGracePeriodSeconds != nil {
+ in, out := &in.DeletionGracePeriodSeconds, &out.DeletionGracePeriodSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.Labels != nil {
+ in, out := &in.Labels, &out.Labels
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ if in.Annotations != nil {
+ in, out := &in.Annotations, &out.Annotations
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ if in.OwnerReferences != nil {
+ in, out := &in.OwnerReferences, &out.OwnerReferences
+ *out = make([]meta_v1.OwnerReference, len(*in))
+ for i := range *in {
+ if newVal, err := c.DeepCopy(&(*in)[i]); err != nil {
+ return err
+ } else {
+ (*out)[i] = *newVal.(*meta_v1.OwnerReference)
+ }
+ }
+ }
+ if in.Initializers != nil {
+ in, out := &in.Initializers, &out.Initializers
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*meta_v1.Initializers)
+ }
+ }
+ if in.Finalizers != nil {
+ in, out := &in.Finalizers, &out.Finalizers
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ObjectReference is an autogenerated deepcopy function.
+func DeepCopy_v1_ObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ObjectReference)
+ out := out.(*ObjectReference)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_PersistentVolume is an autogenerated deepcopy function.
+func DeepCopy_v1_PersistentVolume(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolume)
+ out := out.(*PersistentVolume)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_PersistentVolumeSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PersistentVolumeClaim is an autogenerated deepcopy function.
+func DeepCopy_v1_PersistentVolumeClaim(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeClaim)
+ out := out.(*PersistentVolumeClaim)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_PersistentVolumeClaimSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1_PersistentVolumeClaimStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PersistentVolumeClaimList is an autogenerated deepcopy function.
+func DeepCopy_v1_PersistentVolumeClaimList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeClaimList)
+ out := out.(*PersistentVolumeClaimList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PersistentVolumeClaim, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_PersistentVolumeClaim(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PersistentVolumeClaimSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_PersistentVolumeClaimSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeClaimSpec)
+ out := out.(*PersistentVolumeClaimSpec)
+ *out = *in
+ if in.AccessModes != nil {
+ in, out := &in.AccessModes, &out.AccessModes
+ *out = make([]PersistentVolumeAccessMode, len(*in))
+ copy(*out, *in)
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*meta_v1.LabelSelector)
+ }
+ }
+ if err := DeepCopy_v1_ResourceRequirements(&in.Resources, &out.Resources, c); err != nil {
+ return err
+ }
+ if in.StorageClassName != nil {
+ in, out := &in.StorageClassName, &out.StorageClassName
+ *out = new(string)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PersistentVolumeClaimStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_PersistentVolumeClaimStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeClaimStatus)
+ out := out.(*PersistentVolumeClaimStatus)
+ *out = *in
+ if in.AccessModes != nil {
+ in, out := &in.AccessModes, &out.AccessModes
+ *out = make([]PersistentVolumeAccessMode, len(*in))
+ copy(*out, *in)
+ }
+ if in.Capacity != nil {
+ in, out := &in.Capacity, &out.Capacity
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PersistentVolumeClaimVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_PersistentVolumeClaimVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeClaimVolumeSource)
+ out := out.(*PersistentVolumeClaimVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_PersistentVolumeList is an autogenerated deepcopy function.
+func DeepCopy_v1_PersistentVolumeList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeList)
+ out := out.(*PersistentVolumeList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PersistentVolume, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_PersistentVolume(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PersistentVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_PersistentVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeSource)
+ out := out.(*PersistentVolumeSource)
+ *out = *in
+ if in.GCEPersistentDisk != nil {
+ in, out := &in.GCEPersistentDisk, &out.GCEPersistentDisk
+ *out = new(GCEPersistentDiskVolumeSource)
+ **out = **in
+ }
+ if in.AWSElasticBlockStore != nil {
+ in, out := &in.AWSElasticBlockStore, &out.AWSElasticBlockStore
+ *out = new(AWSElasticBlockStoreVolumeSource)
+ **out = **in
+ }
+ if in.HostPath != nil {
+ in, out := &in.HostPath, &out.HostPath
+ *out = new(HostPathVolumeSource)
+ **out = **in
+ }
+ if in.Glusterfs != nil {
+ in, out := &in.Glusterfs, &out.Glusterfs
+ *out = new(GlusterfsVolumeSource)
+ **out = **in
+ }
+ if in.NFS != nil {
+ in, out := &in.NFS, &out.NFS
+ *out = new(NFSVolumeSource)
+ **out = **in
+ }
+ if in.RBD != nil {
+ in, out := &in.RBD, &out.RBD
+ *out = new(RBDVolumeSource)
+ if err := DeepCopy_v1_RBDVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.ISCSI != nil {
+ in, out := &in.ISCSI, &out.ISCSI
+ *out = new(ISCSIVolumeSource)
+ if err := DeepCopy_v1_ISCSIVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Cinder != nil {
+ in, out := &in.Cinder, &out.Cinder
+ *out = new(CinderVolumeSource)
+ **out = **in
+ }
+ if in.CephFS != nil {
+ in, out := &in.CephFS, &out.CephFS
+ *out = new(CephFSVolumeSource)
+ if err := DeepCopy_v1_CephFSVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.FC != nil {
+ in, out := &in.FC, &out.FC
+ *out = new(FCVolumeSource)
+ if err := DeepCopy_v1_FCVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Flocker != nil {
+ in, out := &in.Flocker, &out.Flocker
+ *out = new(FlockerVolumeSource)
+ **out = **in
+ }
+ if in.FlexVolume != nil {
+ in, out := &in.FlexVolume, &out.FlexVolume
+ *out = new(FlexVolumeSource)
+ if err := DeepCopy_v1_FlexVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.AzureFile != nil {
+ in, out := &in.AzureFile, &out.AzureFile
+ *out = new(AzureFileVolumeSource)
+ **out = **in
+ }
+ if in.VsphereVolume != nil {
+ in, out := &in.VsphereVolume, &out.VsphereVolume
+ *out = new(VsphereVirtualDiskVolumeSource)
+ **out = **in
+ }
+ if in.Quobyte != nil {
+ in, out := &in.Quobyte, &out.Quobyte
+ *out = new(QuobyteVolumeSource)
+ **out = **in
+ }
+ if in.AzureDisk != nil {
+ in, out := &in.AzureDisk, &out.AzureDisk
+ *out = new(AzureDiskVolumeSource)
+ if err := DeepCopy_v1_AzureDiskVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.PhotonPersistentDisk != nil {
+ in, out := &in.PhotonPersistentDisk, &out.PhotonPersistentDisk
+ *out = new(PhotonPersistentDiskVolumeSource)
+ **out = **in
+ }
+ if in.PortworxVolume != nil {
+ in, out := &in.PortworxVolume, &out.PortworxVolume
+ *out = new(PortworxVolumeSource)
+ **out = **in
+ }
+ if in.ScaleIO != nil {
+ in, out := &in.ScaleIO, &out.ScaleIO
+ *out = new(ScaleIOVolumeSource)
+ if err := DeepCopy_v1_ScaleIOVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Local != nil {
+ in, out := &in.Local, &out.Local
+ *out = new(LocalVolumeSource)
+ **out = **in
+ }
+ if in.StorageOS != nil {
+ in, out := &in.StorageOS, &out.StorageOS
+ *out = new(StorageOSPersistentVolumeSource)
+ if err := DeepCopy_v1_StorageOSPersistentVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PersistentVolumeSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_PersistentVolumeSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeSpec)
+ out := out.(*PersistentVolumeSpec)
+ *out = *in
+ if in.Capacity != nil {
+ in, out := &in.Capacity, &out.Capacity
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if err := DeepCopy_v1_PersistentVolumeSource(&in.PersistentVolumeSource, &out.PersistentVolumeSource, c); err != nil {
+ return err
+ }
+ if in.AccessModes != nil {
+ in, out := &in.AccessModes, &out.AccessModes
+ *out = make([]PersistentVolumeAccessMode, len(*in))
+ copy(*out, *in)
+ }
+ if in.ClaimRef != nil {
+ in, out := &in.ClaimRef, &out.ClaimRef
+ *out = new(ObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PersistentVolumeStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_PersistentVolumeStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeStatus)
+ out := out.(*PersistentVolumeStatus)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_PhotonPersistentDiskVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_PhotonPersistentDiskVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PhotonPersistentDiskVolumeSource)
+ out := out.(*PhotonPersistentDiskVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_Pod is an autogenerated deepcopy function.
+func DeepCopy_v1_Pod(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Pod)
+ out := out.(*Pod)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_PodSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1_PodStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodAffinity is an autogenerated deepcopy function.
+func DeepCopy_v1_PodAffinity(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodAffinity)
+ out := out.(*PodAffinity)
+ *out = *in
+ if in.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution
+ *out = make([]PodAffinityTerm, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_PodAffinityTerm(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.PreferredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution
+ *out = make([]WeightedPodAffinityTerm, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_WeightedPodAffinityTerm(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodAffinityTerm is an autogenerated deepcopy function.
+func DeepCopy_v1_PodAffinityTerm(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodAffinityTerm)
+ out := out.(*PodAffinityTerm)
+ *out = *in
+ if in.LabelSelector != nil {
+ in, out := &in.LabelSelector, &out.LabelSelector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*meta_v1.LabelSelector)
+ }
+ }
+ if in.Namespaces != nil {
+ in, out := &in.Namespaces, &out.Namespaces
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodAntiAffinity is an autogenerated deepcopy function.
+func DeepCopy_v1_PodAntiAffinity(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodAntiAffinity)
+ out := out.(*PodAntiAffinity)
+ *out = *in
+ if in.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution
+ *out = make([]PodAffinityTerm, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_PodAffinityTerm(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.PreferredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution
+ *out = make([]WeightedPodAffinityTerm, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_WeightedPodAffinityTerm(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodAttachOptions is an autogenerated deepcopy function.
+func DeepCopy_v1_PodAttachOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodAttachOptions)
+ out := out.(*PodAttachOptions)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodCondition is an autogenerated deepcopy function.
+func DeepCopy_v1_PodCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodCondition)
+ out := out.(*PodCondition)
+ *out = *in
+ out.LastProbeTime = in.LastProbeTime.DeepCopy()
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodExecOptions is an autogenerated deepcopy function.
+func DeepCopy_v1_PodExecOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodExecOptions)
+ out := out.(*PodExecOptions)
+ *out = *in
+ if in.Command != nil {
+ in, out := &in.Command, &out.Command
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodList is an autogenerated deepcopy function.
+func DeepCopy_v1_PodList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodList)
+ out := out.(*PodList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Pod, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_Pod(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodLogOptions is an autogenerated deepcopy function.
+func DeepCopy_v1_PodLogOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodLogOptions)
+ out := out.(*PodLogOptions)
+ *out = *in
+ if in.SinceSeconds != nil {
+ in, out := &in.SinceSeconds, &out.SinceSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.SinceTime != nil {
+ in, out := &in.SinceTime, &out.SinceTime
+ *out = new(meta_v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ if in.TailLines != nil {
+ in, out := &in.TailLines, &out.TailLines
+ *out = new(int64)
+ **out = **in
+ }
+ if in.LimitBytes != nil {
+ in, out := &in.LimitBytes, &out.LimitBytes
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodPortForwardOptions is an autogenerated deepcopy function.
+func DeepCopy_v1_PodPortForwardOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodPortForwardOptions)
+ out := out.(*PodPortForwardOptions)
+ *out = *in
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]int32, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodProxyOptions is an autogenerated deepcopy function.
+func DeepCopy_v1_PodProxyOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodProxyOptions)
+ out := out.(*PodProxyOptions)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodSecurityContext is an autogenerated deepcopy function.
+func DeepCopy_v1_PodSecurityContext(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodSecurityContext)
+ out := out.(*PodSecurityContext)
+ *out = *in
+ if in.SELinuxOptions != nil {
+ in, out := &in.SELinuxOptions, &out.SELinuxOptions
+ *out = new(SELinuxOptions)
+ **out = **in
+ }
+ if in.RunAsUser != nil {
+ in, out := &in.RunAsUser, &out.RunAsUser
+ *out = new(int64)
+ **out = **in
+ }
+ if in.RunAsNonRoot != nil {
+ in, out := &in.RunAsNonRoot, &out.RunAsNonRoot
+ *out = new(bool)
+ **out = **in
+ }
+ if in.SupplementalGroups != nil {
+ in, out := &in.SupplementalGroups, &out.SupplementalGroups
+ *out = make([]int64, len(*in))
+ copy(*out, *in)
+ }
+ if in.FSGroup != nil {
+ in, out := &in.FSGroup, &out.FSGroup
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodSignature is an autogenerated deepcopy function.
+func DeepCopy_v1_PodSignature(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodSignature)
+ out := out.(*PodSignature)
+ *out = *in
+ if in.PodController != nil {
+ in, out := &in.PodController, &out.PodController
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*meta_v1.OwnerReference)
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_PodSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodSpec)
+ out := out.(*PodSpec)
+ *out = *in
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]Volume, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_Volume(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.InitContainers != nil {
+ in, out := &in.InitContainers, &out.InitContainers
+ *out = make([]Container, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_Container(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Containers != nil {
+ in, out := &in.Containers, &out.Containers
+ *out = make([]Container, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_Container(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.TerminationGracePeriodSeconds != nil {
+ in, out := &in.TerminationGracePeriodSeconds, &out.TerminationGracePeriodSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.ActiveDeadlineSeconds != nil {
+ in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.NodeSelector != nil {
+ in, out := &in.NodeSelector, &out.NodeSelector
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ if in.AutomountServiceAccountToken != nil {
+ in, out := &in.AutomountServiceAccountToken, &out.AutomountServiceAccountToken
+ *out = new(bool)
+ **out = **in
+ }
+ if in.SecurityContext != nil {
+ in, out := &in.SecurityContext, &out.SecurityContext
+ *out = new(PodSecurityContext)
+ if err := DeepCopy_v1_PodSecurityContext(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.ImagePullSecrets != nil {
+ in, out := &in.ImagePullSecrets, &out.ImagePullSecrets
+ *out = make([]LocalObjectReference, len(*in))
+ copy(*out, *in)
+ }
+ if in.Affinity != nil {
+ in, out := &in.Affinity, &out.Affinity
+ *out = new(Affinity)
+ if err := DeepCopy_v1_Affinity(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Tolerations != nil {
+ in, out := &in.Tolerations, &out.Tolerations
+ *out = make([]Toleration, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_Toleration(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.HostAliases != nil {
+ in, out := &in.HostAliases, &out.HostAliases
+ *out = make([]HostAlias, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_HostAlias(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_PodStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodStatus)
+ out := out.(*PodStatus)
+ *out = *in
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]PodCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_PodCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.StartTime != nil {
+ in, out := &in.StartTime, &out.StartTime
+ *out = new(meta_v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ if in.InitContainerStatuses != nil {
+ in, out := &in.InitContainerStatuses, &out.InitContainerStatuses
+ *out = make([]ContainerStatus, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_ContainerStatus(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.ContainerStatuses != nil {
+ in, out := &in.ContainerStatuses, &out.ContainerStatuses
+ *out = make([]ContainerStatus, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_ContainerStatus(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodStatusResult is an autogenerated deepcopy function.
+func DeepCopy_v1_PodStatusResult(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodStatusResult)
+ out := out.(*PodStatusResult)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_PodStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodTemplate is an autogenerated deepcopy function.
+func DeepCopy_v1_PodTemplate(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodTemplate)
+ out := out.(*PodTemplate)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodTemplateList is an autogenerated deepcopy function.
+func DeepCopy_v1_PodTemplateList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodTemplateList)
+ out := out.(*PodTemplateList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodTemplate, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_PodTemplate(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodTemplateSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_PodTemplateSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodTemplateSpec)
+ out := out.(*PodTemplateSpec)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_PodSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PortworxVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_PortworxVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PortworxVolumeSource)
+ out := out.(*PortworxVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_Preconditions is an autogenerated deepcopy function.
+func DeepCopy_v1_Preconditions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Preconditions)
+ out := out.(*Preconditions)
+ *out = *in
+ if in.UID != nil {
+ in, out := &in.UID, &out.UID
+ *out = new(types.UID)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PreferAvoidPodsEntry is an autogenerated deepcopy function.
+func DeepCopy_v1_PreferAvoidPodsEntry(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PreferAvoidPodsEntry)
+ out := out.(*PreferAvoidPodsEntry)
+ *out = *in
+ if err := DeepCopy_v1_PodSignature(&in.PodSignature, &out.PodSignature, c); err != nil {
+ return err
+ }
+ out.EvictionTime = in.EvictionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_PreferredSchedulingTerm is an autogenerated deepcopy function.
+func DeepCopy_v1_PreferredSchedulingTerm(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PreferredSchedulingTerm)
+ out := out.(*PreferredSchedulingTerm)
+ *out = *in
+ if err := DeepCopy_v1_NodeSelectorTerm(&in.Preference, &out.Preference, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_Probe is an autogenerated deepcopy function.
+func DeepCopy_v1_Probe(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Probe)
+ out := out.(*Probe)
+ *out = *in
+ if err := DeepCopy_v1_Handler(&in.Handler, &out.Handler, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ProjectedVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_ProjectedVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ProjectedVolumeSource)
+ out := out.(*ProjectedVolumeSource)
+ *out = *in
+ if in.Sources != nil {
+ in, out := &in.Sources, &out.Sources
+ *out = make([]VolumeProjection, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_VolumeProjection(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.DefaultMode != nil {
+ in, out := &in.DefaultMode, &out.DefaultMode
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_QuobyteVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_QuobyteVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*QuobyteVolumeSource)
+ out := out.(*QuobyteVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_RBDVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_RBDVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RBDVolumeSource)
+ out := out.(*RBDVolumeSource)
+ *out = *in
+ if in.CephMonitors != nil {
+ in, out := &in.CephMonitors, &out.CephMonitors
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_RangeAllocation is an autogenerated deepcopy function.
+func DeepCopy_v1_RangeAllocation(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RangeAllocation)
+ out := out.(*RangeAllocation)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if in.Data != nil {
+ in, out := &in.Data, &out.Data
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ReplicationController is an autogenerated deepcopy function.
+func DeepCopy_v1_ReplicationController(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicationController)
+ out := out.(*ReplicationController)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_ReplicationControllerSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1_ReplicationControllerStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ReplicationControllerCondition is an autogenerated deepcopy function.
+func DeepCopy_v1_ReplicationControllerCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicationControllerCondition)
+ out := out.(*ReplicationControllerCondition)
+ *out = *in
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_ReplicationControllerList is an autogenerated deepcopy function.
+func DeepCopy_v1_ReplicationControllerList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicationControllerList)
+ out := out.(*ReplicationControllerList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ReplicationController, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_ReplicationController(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ReplicationControllerSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_ReplicationControllerSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicationControllerSpec)
+ out := out.(*ReplicationControllerSpec)
+ *out = *in
+ if in.Replicas != nil {
+ in, out := &in.Replicas, &out.Replicas
+ *out = new(int32)
+ **out = **in
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ if in.Template != nil {
+ in, out := &in.Template, &out.Template
+ *out = new(PodTemplateSpec)
+ if err := DeepCopy_v1_PodTemplateSpec(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ReplicationControllerStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_ReplicationControllerStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicationControllerStatus)
+ out := out.(*ReplicationControllerStatus)
+ *out = *in
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]ReplicationControllerCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_ReplicationControllerCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ResourceFieldSelector is an autogenerated deepcopy function.
+func DeepCopy_v1_ResourceFieldSelector(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceFieldSelector)
+ out := out.(*ResourceFieldSelector)
+ *out = *in
+ out.Divisor = in.Divisor.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_ResourceQuota is an autogenerated deepcopy function.
+func DeepCopy_v1_ResourceQuota(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceQuota)
+ out := out.(*ResourceQuota)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_ResourceQuotaSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1_ResourceQuotaStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ResourceQuotaList is an autogenerated deepcopy function.
+func DeepCopy_v1_ResourceQuotaList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceQuotaList)
+ out := out.(*ResourceQuotaList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ResourceQuota, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_ResourceQuota(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ResourceQuotaSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_ResourceQuotaSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceQuotaSpec)
+ out := out.(*ResourceQuotaSpec)
+ *out = *in
+ if in.Hard != nil {
+ in, out := &in.Hard, &out.Hard
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Scopes != nil {
+ in, out := &in.Scopes, &out.Scopes
+ *out = make([]ResourceQuotaScope, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ResourceQuotaStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_ResourceQuotaStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceQuotaStatus)
+ out := out.(*ResourceQuotaStatus)
+ *out = *in
+ if in.Hard != nil {
+ in, out := &in.Hard, &out.Hard
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Used != nil {
+ in, out := &in.Used, &out.Used
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ResourceRequirements is an autogenerated deepcopy function.
+func DeepCopy_v1_ResourceRequirements(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceRequirements)
+ out := out.(*ResourceRequirements)
+ *out = *in
+ if in.Limits != nil {
+ in, out := &in.Limits, &out.Limits
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Requests != nil {
+ in, out := &in.Requests, &out.Requests
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_SELinuxOptions is an autogenerated deepcopy function.
+func DeepCopy_v1_SELinuxOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SELinuxOptions)
+ out := out.(*SELinuxOptions)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_ScaleIOVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_ScaleIOVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ScaleIOVolumeSource)
+ out := out.(*ScaleIOVolumeSource)
+ *out = *in
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_Secret is an autogenerated deepcopy function.
+func DeepCopy_v1_Secret(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Secret)
+ out := out.(*Secret)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if in.Data != nil {
+ in, out := &in.Data, &out.Data
+ *out = make(map[string][]byte)
+ for key, val := range *in {
+ if newVal, err := c.DeepCopy(&val); err != nil {
+ return err
+ } else {
+ (*out)[key] = *newVal.(*[]byte)
+ }
+ }
+ }
+ if in.StringData != nil {
+ in, out := &in.StringData, &out.StringData
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_SecretEnvSource is an autogenerated deepcopy function.
+func DeepCopy_v1_SecretEnvSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SecretEnvSource)
+ out := out.(*SecretEnvSource)
+ *out = *in
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_SecretKeySelector is an autogenerated deepcopy function.
+func DeepCopy_v1_SecretKeySelector(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SecretKeySelector)
+ out := out.(*SecretKeySelector)
+ *out = *in
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_SecretList is an autogenerated deepcopy function.
+func DeepCopy_v1_SecretList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SecretList)
+ out := out.(*SecretList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Secret, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_Secret(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_SecretProjection is an autogenerated deepcopy function.
+func DeepCopy_v1_SecretProjection(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SecretProjection)
+ out := out.(*SecretProjection)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]KeyToPath, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_KeyToPath(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_SecretVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_SecretVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SecretVolumeSource)
+ out := out.(*SecretVolumeSource)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]KeyToPath, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_KeyToPath(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.DefaultMode != nil {
+ in, out := &in.DefaultMode, &out.DefaultMode
+ *out = new(int32)
+ **out = **in
+ }
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_SecurityContext is an autogenerated deepcopy function.
+func DeepCopy_v1_SecurityContext(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SecurityContext)
+ out := out.(*SecurityContext)
+ *out = *in
+ if in.Capabilities != nil {
+ in, out := &in.Capabilities, &out.Capabilities
+ *out = new(Capabilities)
+ if err := DeepCopy_v1_Capabilities(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Privileged != nil {
+ in, out := &in.Privileged, &out.Privileged
+ *out = new(bool)
+ **out = **in
+ }
+ if in.SELinuxOptions != nil {
+ in, out := &in.SELinuxOptions, &out.SELinuxOptions
+ *out = new(SELinuxOptions)
+ **out = **in
+ }
+ if in.RunAsUser != nil {
+ in, out := &in.RunAsUser, &out.RunAsUser
+ *out = new(int64)
+ **out = **in
+ }
+ if in.RunAsNonRoot != nil {
+ in, out := &in.RunAsNonRoot, &out.RunAsNonRoot
+ *out = new(bool)
+ **out = **in
+ }
+ if in.ReadOnlyRootFilesystem != nil {
+ in, out := &in.ReadOnlyRootFilesystem, &out.ReadOnlyRootFilesystem
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_SerializedReference is an autogenerated deepcopy function.
+func DeepCopy_v1_SerializedReference(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SerializedReference)
+ out := out.(*SerializedReference)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_Service is an autogenerated deepcopy function.
+func DeepCopy_v1_Service(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Service)
+ out := out.(*Service)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_ServiceSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1_ServiceStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ServiceAccount is an autogenerated deepcopy function.
+func DeepCopy_v1_ServiceAccount(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServiceAccount)
+ out := out.(*ServiceAccount)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if in.Secrets != nil {
+ in, out := &in.Secrets, &out.Secrets
+ *out = make([]ObjectReference, len(*in))
+ copy(*out, *in)
+ }
+ if in.ImagePullSecrets != nil {
+ in, out := &in.ImagePullSecrets, &out.ImagePullSecrets
+ *out = make([]LocalObjectReference, len(*in))
+ copy(*out, *in)
+ }
+ if in.AutomountServiceAccountToken != nil {
+ in, out := &in.AutomountServiceAccountToken, &out.AutomountServiceAccountToken
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ServiceAccountList is an autogenerated deepcopy function.
+func DeepCopy_v1_ServiceAccountList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServiceAccountList)
+ out := out.(*ServiceAccountList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ServiceAccount, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_ServiceAccount(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ServiceList is an autogenerated deepcopy function.
+func DeepCopy_v1_ServiceList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServiceList)
+ out := out.(*ServiceList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Service, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_Service(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ServicePort is an autogenerated deepcopy function.
+func DeepCopy_v1_ServicePort(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServicePort)
+ out := out.(*ServicePort)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_ServiceProxyOptions is an autogenerated deepcopy function.
+func DeepCopy_v1_ServiceProxyOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServiceProxyOptions)
+ out := out.(*ServiceProxyOptions)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_ServiceSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_ServiceSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServiceSpec)
+ out := out.(*ServiceSpec)
+ *out = *in
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]ServicePort, len(*in))
+ copy(*out, *in)
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ if in.ExternalIPs != nil {
+ in, out := &in.ExternalIPs, &out.ExternalIPs
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.LoadBalancerSourceRanges != nil {
+ in, out := &in.LoadBalancerSourceRanges, &out.LoadBalancerSourceRanges
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ServiceStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_ServiceStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServiceStatus)
+ out := out.(*ServiceStatus)
+ *out = *in
+ if err := DeepCopy_v1_LoadBalancerStatus(&in.LoadBalancer, &out.LoadBalancer, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_StorageOSPersistentVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_StorageOSPersistentVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StorageOSPersistentVolumeSource)
+ out := out.(*StorageOSPersistentVolumeSource)
+ *out = *in
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(ObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_StorageOSVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_StorageOSVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StorageOSVolumeSource)
+ out := out.(*StorageOSVolumeSource)
+ *out = *in
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_Sysctl is an autogenerated deepcopy function.
+func DeepCopy_v1_Sysctl(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Sysctl)
+ out := out.(*Sysctl)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_TCPSocketAction is an autogenerated deepcopy function.
+func DeepCopy_v1_TCPSocketAction(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*TCPSocketAction)
+ out := out.(*TCPSocketAction)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_Taint is an autogenerated deepcopy function.
+func DeepCopy_v1_Taint(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Taint)
+ out := out.(*Taint)
+ *out = *in
+ out.TimeAdded = in.TimeAdded.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_Toleration is an autogenerated deepcopy function.
+func DeepCopy_v1_Toleration(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Toleration)
+ out := out.(*Toleration)
+ *out = *in
+ if in.TolerationSeconds != nil {
+ in, out := &in.TolerationSeconds, &out.TolerationSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_Volume is an autogenerated deepcopy function.
+func DeepCopy_v1_Volume(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Volume)
+ out := out.(*Volume)
+ *out = *in
+ if err := DeepCopy_v1_VolumeSource(&in.VolumeSource, &out.VolumeSource, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_VolumeMount is an autogenerated deepcopy function.
+func DeepCopy_v1_VolumeMount(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*VolumeMount)
+ out := out.(*VolumeMount)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_VolumeProjection is an autogenerated deepcopy function.
+func DeepCopy_v1_VolumeProjection(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*VolumeProjection)
+ out := out.(*VolumeProjection)
+ *out = *in
+ if in.Secret != nil {
+ in, out := &in.Secret, &out.Secret
+ *out = new(SecretProjection)
+ if err := DeepCopy_v1_SecretProjection(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.DownwardAPI != nil {
+ in, out := &in.DownwardAPI, &out.DownwardAPI
+ *out = new(DownwardAPIProjection)
+ if err := DeepCopy_v1_DownwardAPIProjection(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.ConfigMap != nil {
+ in, out := &in.ConfigMap, &out.ConfigMap
+ *out = new(ConfigMapProjection)
+ if err := DeepCopy_v1_ConfigMapProjection(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_VolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_VolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*VolumeSource)
+ out := out.(*VolumeSource)
+ *out = *in
+ if in.HostPath != nil {
+ in, out := &in.HostPath, &out.HostPath
+ *out = new(HostPathVolumeSource)
+ **out = **in
+ }
+ if in.EmptyDir != nil {
+ in, out := &in.EmptyDir, &out.EmptyDir
+ *out = new(EmptyDirVolumeSource)
+ if err := DeepCopy_v1_EmptyDirVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.GCEPersistentDisk != nil {
+ in, out := &in.GCEPersistentDisk, &out.GCEPersistentDisk
+ *out = new(GCEPersistentDiskVolumeSource)
+ **out = **in
+ }
+ if in.AWSElasticBlockStore != nil {
+ in, out := &in.AWSElasticBlockStore, &out.AWSElasticBlockStore
+ *out = new(AWSElasticBlockStoreVolumeSource)
+ **out = **in
+ }
+ if in.GitRepo != nil {
+ in, out := &in.GitRepo, &out.GitRepo
+ *out = new(GitRepoVolumeSource)
+ **out = **in
+ }
+ if in.Secret != nil {
+ in, out := &in.Secret, &out.Secret
+ *out = new(SecretVolumeSource)
+ if err := DeepCopy_v1_SecretVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.NFS != nil {
+ in, out := &in.NFS, &out.NFS
+ *out = new(NFSVolumeSource)
+ **out = **in
+ }
+ if in.ISCSI != nil {
+ in, out := &in.ISCSI, &out.ISCSI
+ *out = new(ISCSIVolumeSource)
+ if err := DeepCopy_v1_ISCSIVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Glusterfs != nil {
+ in, out := &in.Glusterfs, &out.Glusterfs
+ *out = new(GlusterfsVolumeSource)
+ **out = **in
+ }
+ if in.PersistentVolumeClaim != nil {
+ in, out := &in.PersistentVolumeClaim, &out.PersistentVolumeClaim
+ *out = new(PersistentVolumeClaimVolumeSource)
+ **out = **in
+ }
+ if in.RBD != nil {
+ in, out := &in.RBD, &out.RBD
+ *out = new(RBDVolumeSource)
+ if err := DeepCopy_v1_RBDVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.FlexVolume != nil {
+ in, out := &in.FlexVolume, &out.FlexVolume
+ *out = new(FlexVolumeSource)
+ if err := DeepCopy_v1_FlexVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Cinder != nil {
+ in, out := &in.Cinder, &out.Cinder
+ *out = new(CinderVolumeSource)
+ **out = **in
+ }
+ if in.CephFS != nil {
+ in, out := &in.CephFS, &out.CephFS
+ *out = new(CephFSVolumeSource)
+ if err := DeepCopy_v1_CephFSVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Flocker != nil {
+ in, out := &in.Flocker, &out.Flocker
+ *out = new(FlockerVolumeSource)
+ **out = **in
+ }
+ if in.DownwardAPI != nil {
+ in, out := &in.DownwardAPI, &out.DownwardAPI
+ *out = new(DownwardAPIVolumeSource)
+ if err := DeepCopy_v1_DownwardAPIVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.FC != nil {
+ in, out := &in.FC, &out.FC
+ *out = new(FCVolumeSource)
+ if err := DeepCopy_v1_FCVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.AzureFile != nil {
+ in, out := &in.AzureFile, &out.AzureFile
+ *out = new(AzureFileVolumeSource)
+ **out = **in
+ }
+ if in.ConfigMap != nil {
+ in, out := &in.ConfigMap, &out.ConfigMap
+ *out = new(ConfigMapVolumeSource)
+ if err := DeepCopy_v1_ConfigMapVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.VsphereVolume != nil {
+ in, out := &in.VsphereVolume, &out.VsphereVolume
+ *out = new(VsphereVirtualDiskVolumeSource)
+ **out = **in
+ }
+ if in.Quobyte != nil {
+ in, out := &in.Quobyte, &out.Quobyte
+ *out = new(QuobyteVolumeSource)
+ **out = **in
+ }
+ if in.AzureDisk != nil {
+ in, out := &in.AzureDisk, &out.AzureDisk
+ *out = new(AzureDiskVolumeSource)
+ if err := DeepCopy_v1_AzureDiskVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.PhotonPersistentDisk != nil {
+ in, out := &in.PhotonPersistentDisk, &out.PhotonPersistentDisk
+ *out = new(PhotonPersistentDiskVolumeSource)
+ **out = **in
+ }
+ if in.Projected != nil {
+ in, out := &in.Projected, &out.Projected
+ *out = new(ProjectedVolumeSource)
+ if err := DeepCopy_v1_ProjectedVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.PortworxVolume != nil {
+ in, out := &in.PortworxVolume, &out.PortworxVolume
+ *out = new(PortworxVolumeSource)
+ **out = **in
+ }
+ if in.ScaleIO != nil {
+ in, out := &in.ScaleIO, &out.ScaleIO
+ *out = new(ScaleIOVolumeSource)
+ if err := DeepCopy_v1_ScaleIOVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.StorageOS != nil {
+ in, out := &in.StorageOS, &out.StorageOS
+ *out = new(StorageOSVolumeSource)
+ if err := DeepCopy_v1_StorageOSVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_VsphereVirtualDiskVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_VsphereVirtualDiskVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*VsphereVirtualDiskVolumeSource)
+ out := out.(*VsphereVirtualDiskVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_WeightedPodAffinityTerm is an autogenerated deepcopy function.
+func DeepCopy_v1_WeightedPodAffinityTerm(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*WeightedPodAffinityTerm)
+ out := out.(*WeightedPodAffinityTerm)
+ *out = *in
+ if err := DeepCopy_v1_PodAffinityTerm(&in.PodAffinityTerm, &out.PodAffinityTerm, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/api/v1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/api/v1/zz_generated.defaults.go
new file mode 100644
index 000000000..31e795066
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/v1/zz_generated.defaults.go
@@ -0,0 +1,631 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ scheme.AddTypeDefaultingFunc(&ConfigMap{}, func(obj interface{}) { SetObjectDefaults_ConfigMap(obj.(*ConfigMap)) })
+ scheme.AddTypeDefaultingFunc(&ConfigMapList{}, func(obj interface{}) { SetObjectDefaults_ConfigMapList(obj.(*ConfigMapList)) })
+ scheme.AddTypeDefaultingFunc(&Endpoints{}, func(obj interface{}) { SetObjectDefaults_Endpoints(obj.(*Endpoints)) })
+ scheme.AddTypeDefaultingFunc(&EndpointsList{}, func(obj interface{}) { SetObjectDefaults_EndpointsList(obj.(*EndpointsList)) })
+ scheme.AddTypeDefaultingFunc(&LimitRange{}, func(obj interface{}) { SetObjectDefaults_LimitRange(obj.(*LimitRange)) })
+ scheme.AddTypeDefaultingFunc(&LimitRangeList{}, func(obj interface{}) { SetObjectDefaults_LimitRangeList(obj.(*LimitRangeList)) })
+ scheme.AddTypeDefaultingFunc(&Namespace{}, func(obj interface{}) { SetObjectDefaults_Namespace(obj.(*Namespace)) })
+ scheme.AddTypeDefaultingFunc(&NamespaceList{}, func(obj interface{}) { SetObjectDefaults_NamespaceList(obj.(*NamespaceList)) })
+ scheme.AddTypeDefaultingFunc(&Node{}, func(obj interface{}) { SetObjectDefaults_Node(obj.(*Node)) })
+ scheme.AddTypeDefaultingFunc(&NodeList{}, func(obj interface{}) { SetObjectDefaults_NodeList(obj.(*NodeList)) })
+ scheme.AddTypeDefaultingFunc(&PersistentVolume{}, func(obj interface{}) { SetObjectDefaults_PersistentVolume(obj.(*PersistentVolume)) })
+ scheme.AddTypeDefaultingFunc(&PersistentVolumeClaim{}, func(obj interface{}) { SetObjectDefaults_PersistentVolumeClaim(obj.(*PersistentVolumeClaim)) })
+ scheme.AddTypeDefaultingFunc(&PersistentVolumeClaimList{}, func(obj interface{}) { SetObjectDefaults_PersistentVolumeClaimList(obj.(*PersistentVolumeClaimList)) })
+ scheme.AddTypeDefaultingFunc(&PersistentVolumeList{}, func(obj interface{}) { SetObjectDefaults_PersistentVolumeList(obj.(*PersistentVolumeList)) })
+ scheme.AddTypeDefaultingFunc(&Pod{}, func(obj interface{}) { SetObjectDefaults_Pod(obj.(*Pod)) })
+ scheme.AddTypeDefaultingFunc(&PodAttachOptions{}, func(obj interface{}) { SetObjectDefaults_PodAttachOptions(obj.(*PodAttachOptions)) })
+ scheme.AddTypeDefaultingFunc(&PodExecOptions{}, func(obj interface{}) { SetObjectDefaults_PodExecOptions(obj.(*PodExecOptions)) })
+ scheme.AddTypeDefaultingFunc(&PodList{}, func(obj interface{}) { SetObjectDefaults_PodList(obj.(*PodList)) })
+ scheme.AddTypeDefaultingFunc(&PodTemplate{}, func(obj interface{}) { SetObjectDefaults_PodTemplate(obj.(*PodTemplate)) })
+ scheme.AddTypeDefaultingFunc(&PodTemplateList{}, func(obj interface{}) { SetObjectDefaults_PodTemplateList(obj.(*PodTemplateList)) })
+ scheme.AddTypeDefaultingFunc(&ReplicationController{}, func(obj interface{}) { SetObjectDefaults_ReplicationController(obj.(*ReplicationController)) })
+ scheme.AddTypeDefaultingFunc(&ReplicationControllerList{}, func(obj interface{}) { SetObjectDefaults_ReplicationControllerList(obj.(*ReplicationControllerList)) })
+ scheme.AddTypeDefaultingFunc(&ResourceQuota{}, func(obj interface{}) { SetObjectDefaults_ResourceQuota(obj.(*ResourceQuota)) })
+ scheme.AddTypeDefaultingFunc(&ResourceQuotaList{}, func(obj interface{}) { SetObjectDefaults_ResourceQuotaList(obj.(*ResourceQuotaList)) })
+ scheme.AddTypeDefaultingFunc(&Secret{}, func(obj interface{}) { SetObjectDefaults_Secret(obj.(*Secret)) })
+ scheme.AddTypeDefaultingFunc(&SecretList{}, func(obj interface{}) { SetObjectDefaults_SecretList(obj.(*SecretList)) })
+ scheme.AddTypeDefaultingFunc(&Service{}, func(obj interface{}) { SetObjectDefaults_Service(obj.(*Service)) })
+ scheme.AddTypeDefaultingFunc(&ServiceList{}, func(obj interface{}) { SetObjectDefaults_ServiceList(obj.(*ServiceList)) })
+ return nil
+}
+
+func SetObjectDefaults_ConfigMap(in *ConfigMap) {
+ SetDefaults_ConfigMap(in)
+}
+
+func SetObjectDefaults_ConfigMapList(in *ConfigMapList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_ConfigMap(a)
+ }
+}
+
+func SetObjectDefaults_Endpoints(in *Endpoints) {
+ SetDefaults_Endpoints(in)
+}
+
+func SetObjectDefaults_EndpointsList(in *EndpointsList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_Endpoints(a)
+ }
+}
+
+func SetObjectDefaults_LimitRange(in *LimitRange) {
+ for i := range in.Spec.Limits {
+ a := &in.Spec.Limits[i]
+ SetDefaults_LimitRangeItem(a)
+ SetDefaults_ResourceList(&a.Max)
+ SetDefaults_ResourceList(&a.Min)
+ SetDefaults_ResourceList(&a.Default)
+ SetDefaults_ResourceList(&a.DefaultRequest)
+ SetDefaults_ResourceList(&a.MaxLimitRequestRatio)
+ }
+}
+
+func SetObjectDefaults_LimitRangeList(in *LimitRangeList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_LimitRange(a)
+ }
+}
+
+func SetObjectDefaults_Namespace(in *Namespace) {
+ SetDefaults_NamespaceStatus(&in.Status)
+}
+
+func SetObjectDefaults_NamespaceList(in *NamespaceList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_Namespace(a)
+ }
+}
+
+func SetObjectDefaults_Node(in *Node) {
+ SetDefaults_Node(in)
+ SetDefaults_NodeStatus(&in.Status)
+ SetDefaults_ResourceList(&in.Status.Capacity)
+ SetDefaults_ResourceList(&in.Status.Allocatable)
+}
+
+func SetObjectDefaults_NodeList(in *NodeList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_Node(a)
+ }
+}
+
+func SetObjectDefaults_PersistentVolume(in *PersistentVolume) {
+ SetDefaults_PersistentVolume(in)
+ SetDefaults_ResourceList(&in.Spec.Capacity)
+ if in.Spec.PersistentVolumeSource.RBD != nil {
+ SetDefaults_RBDVolumeSource(in.Spec.PersistentVolumeSource.RBD)
+ }
+ if in.Spec.PersistentVolumeSource.ISCSI != nil {
+ SetDefaults_ISCSIVolumeSource(in.Spec.PersistentVolumeSource.ISCSI)
+ }
+ if in.Spec.PersistentVolumeSource.AzureDisk != nil {
+ SetDefaults_AzureDiskVolumeSource(in.Spec.PersistentVolumeSource.AzureDisk)
+ }
+ if in.Spec.PersistentVolumeSource.ScaleIO != nil {
+ SetDefaults_ScaleIOVolumeSource(in.Spec.PersistentVolumeSource.ScaleIO)
+ }
+}
+
+func SetObjectDefaults_PersistentVolumeClaim(in *PersistentVolumeClaim) {
+ SetDefaults_PersistentVolumeClaim(in)
+ SetDefaults_ResourceList(&in.Spec.Resources.Limits)
+ SetDefaults_ResourceList(&in.Spec.Resources.Requests)
+ SetDefaults_ResourceList(&in.Status.Capacity)
+}
+
+func SetObjectDefaults_PersistentVolumeClaimList(in *PersistentVolumeClaimList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_PersistentVolumeClaim(a)
+ }
+}
+
+func SetObjectDefaults_PersistentVolumeList(in *PersistentVolumeList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_PersistentVolume(a)
+ }
+}
+
+func SetObjectDefaults_Pod(in *Pod) {
+ SetDefaults_Pod(in)
+ SetDefaults_PodSpec(&in.Spec)
+ for i := range in.Spec.Volumes {
+ a := &in.Spec.Volumes[i]
+ SetDefaults_Volume(a)
+ if a.VolumeSource.Secret != nil {
+ SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
+ }
+ if a.VolumeSource.ISCSI != nil {
+ SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
+ }
+ if a.VolumeSource.RBD != nil {
+ SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
+ }
+ if a.VolumeSource.DownwardAPI != nil {
+ SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
+ for j := range a.VolumeSource.DownwardAPI.Items {
+ b := &a.VolumeSource.DownwardAPI.Items[j]
+ if b.FieldRef != nil {
+ SetDefaults_ObjectFieldSelector(b.FieldRef)
+ }
+ }
+ }
+ if a.VolumeSource.ConfigMap != nil {
+ SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
+ }
+ if a.VolumeSource.AzureDisk != nil {
+ SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
+ }
+ if a.VolumeSource.Projected != nil {
+ SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
+ for j := range a.VolumeSource.Projected.Sources {
+ b := &a.VolumeSource.Projected.Sources[j]
+ if b.DownwardAPI != nil {
+ for k := range b.DownwardAPI.Items {
+ c := &b.DownwardAPI.Items[k]
+ if c.FieldRef != nil {
+ SetDefaults_ObjectFieldSelector(c.FieldRef)
+ }
+ }
+ }
+ }
+ }
+ if a.VolumeSource.ScaleIO != nil {
+ SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO)
+ }
+ }
+ for i := range in.Spec.InitContainers {
+ a := &in.Spec.InitContainers[i]
+ SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ SetDefaults_ResourceList(&a.Resources.Limits)
+ SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+ for i := range in.Spec.Containers {
+ a := &in.Spec.Containers[i]
+ SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ SetDefaults_ResourceList(&a.Resources.Limits)
+ SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+}
+
+func SetObjectDefaults_PodAttachOptions(in *PodAttachOptions) {
+ SetDefaults_PodAttachOptions(in)
+}
+
+func SetObjectDefaults_PodExecOptions(in *PodExecOptions) {
+ SetDefaults_PodExecOptions(in)
+}
+
+func SetObjectDefaults_PodList(in *PodList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_Pod(a)
+ }
+}
+
+func SetObjectDefaults_PodTemplate(in *PodTemplate) {
+ SetDefaults_PodSpec(&in.Template.Spec)
+ for i := range in.Template.Spec.Volumes {
+ a := &in.Template.Spec.Volumes[i]
+ SetDefaults_Volume(a)
+ if a.VolumeSource.Secret != nil {
+ SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
+ }
+ if a.VolumeSource.ISCSI != nil {
+ SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
+ }
+ if a.VolumeSource.RBD != nil {
+ SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
+ }
+ if a.VolumeSource.DownwardAPI != nil {
+ SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
+ for j := range a.VolumeSource.DownwardAPI.Items {
+ b := &a.VolumeSource.DownwardAPI.Items[j]
+ if b.FieldRef != nil {
+ SetDefaults_ObjectFieldSelector(b.FieldRef)
+ }
+ }
+ }
+ if a.VolumeSource.ConfigMap != nil {
+ SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
+ }
+ if a.VolumeSource.AzureDisk != nil {
+ SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
+ }
+ if a.VolumeSource.Projected != nil {
+ SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
+ for j := range a.VolumeSource.Projected.Sources {
+ b := &a.VolumeSource.Projected.Sources[j]
+ if b.DownwardAPI != nil {
+ for k := range b.DownwardAPI.Items {
+ c := &b.DownwardAPI.Items[k]
+ if c.FieldRef != nil {
+ SetDefaults_ObjectFieldSelector(c.FieldRef)
+ }
+ }
+ }
+ }
+ }
+ if a.VolumeSource.ScaleIO != nil {
+ SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO)
+ }
+ }
+ for i := range in.Template.Spec.InitContainers {
+ a := &in.Template.Spec.InitContainers[i]
+ SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ SetDefaults_ResourceList(&a.Resources.Limits)
+ SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+ for i := range in.Template.Spec.Containers {
+ a := &in.Template.Spec.Containers[i]
+ SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ SetDefaults_ResourceList(&a.Resources.Limits)
+ SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+}
+
+func SetObjectDefaults_PodTemplateList(in *PodTemplateList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_PodTemplate(a)
+ }
+}
+
+func SetObjectDefaults_ReplicationController(in *ReplicationController) {
+ SetDefaults_ReplicationController(in)
+ if in.Spec.Template != nil {
+ SetDefaults_PodSpec(&in.Spec.Template.Spec)
+ for i := range in.Spec.Template.Spec.Volumes {
+ a := &in.Spec.Template.Spec.Volumes[i]
+ SetDefaults_Volume(a)
+ if a.VolumeSource.Secret != nil {
+ SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
+ }
+ if a.VolumeSource.ISCSI != nil {
+ SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
+ }
+ if a.VolumeSource.RBD != nil {
+ SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
+ }
+ if a.VolumeSource.DownwardAPI != nil {
+ SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
+ for j := range a.VolumeSource.DownwardAPI.Items {
+ b := &a.VolumeSource.DownwardAPI.Items[j]
+ if b.FieldRef != nil {
+ SetDefaults_ObjectFieldSelector(b.FieldRef)
+ }
+ }
+ }
+ if a.VolumeSource.ConfigMap != nil {
+ SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
+ }
+ if a.VolumeSource.AzureDisk != nil {
+ SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
+ }
+ if a.VolumeSource.Projected != nil {
+ SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
+ for j := range a.VolumeSource.Projected.Sources {
+ b := &a.VolumeSource.Projected.Sources[j]
+ if b.DownwardAPI != nil {
+ for k := range b.DownwardAPI.Items {
+ c := &b.DownwardAPI.Items[k]
+ if c.FieldRef != nil {
+ SetDefaults_ObjectFieldSelector(c.FieldRef)
+ }
+ }
+ }
+ }
+ }
+ if a.VolumeSource.ScaleIO != nil {
+ SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO)
+ }
+ }
+ for i := range in.Spec.Template.Spec.InitContainers {
+ a := &in.Spec.Template.Spec.InitContainers[i]
+ SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ SetDefaults_ResourceList(&a.Resources.Limits)
+ SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+ for i := range in.Spec.Template.Spec.Containers {
+ a := &in.Spec.Template.Spec.Containers[i]
+ SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ SetDefaults_ResourceList(&a.Resources.Limits)
+ SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+ }
+}
+
+func SetObjectDefaults_ReplicationControllerList(in *ReplicationControllerList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_ReplicationController(a)
+ }
+}
+
+func SetObjectDefaults_ResourceQuota(in *ResourceQuota) {
+ SetDefaults_ResourceList(&in.Spec.Hard)
+ SetDefaults_ResourceList(&in.Status.Hard)
+ SetDefaults_ResourceList(&in.Status.Used)
+}
+
+func SetObjectDefaults_ResourceQuotaList(in *ResourceQuotaList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_ResourceQuota(a)
+ }
+}
+
+func SetObjectDefaults_Secret(in *Secret) {
+ SetDefaults_Secret(in)
+}
+
+func SetObjectDefaults_SecretList(in *SecretList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_Secret(a)
+ }
+}
+
+func SetObjectDefaults_Service(in *Service) {
+ SetDefaults_Service(in)
+}
+
+func SetObjectDefaults_ServiceList(in *ServiceList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_Service(a)
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/api/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/api/zz_generated.deepcopy.go
new file mode 100644
index 000000000..cc111561b
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/api/zz_generated.deepcopy.go
@@ -0,0 +1,3776 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package api
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ fields "k8s.io/apimachinery/pkg/fields"
+ labels "k8s.io/apimachinery/pkg/labels"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ types "k8s.io/apimachinery/pkg/types"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_AWSElasticBlockStoreVolumeSource, InType: reflect.TypeOf(&AWSElasticBlockStoreVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Affinity, InType: reflect.TypeOf(&Affinity{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_AttachedVolume, InType: reflect.TypeOf(&AttachedVolume{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_AvoidPods, InType: reflect.TypeOf(&AvoidPods{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_AzureDiskVolumeSource, InType: reflect.TypeOf(&AzureDiskVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_AzureFileVolumeSource, InType: reflect.TypeOf(&AzureFileVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Binding, InType: reflect.TypeOf(&Binding{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Capabilities, InType: reflect.TypeOf(&Capabilities{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_CephFSVolumeSource, InType: reflect.TypeOf(&CephFSVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_CinderVolumeSource, InType: reflect.TypeOf(&CinderVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ComponentCondition, InType: reflect.TypeOf(&ComponentCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ComponentStatus, InType: reflect.TypeOf(&ComponentStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ComponentStatusList, InType: reflect.TypeOf(&ComponentStatusList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ConfigMap, InType: reflect.TypeOf(&ConfigMap{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ConfigMapEnvSource, InType: reflect.TypeOf(&ConfigMapEnvSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ConfigMapKeySelector, InType: reflect.TypeOf(&ConfigMapKeySelector{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ConfigMapList, InType: reflect.TypeOf(&ConfigMapList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ConfigMapProjection, InType: reflect.TypeOf(&ConfigMapProjection{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ConfigMapVolumeSource, InType: reflect.TypeOf(&ConfigMapVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Container, InType: reflect.TypeOf(&Container{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ContainerImage, InType: reflect.TypeOf(&ContainerImage{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ContainerPort, InType: reflect.TypeOf(&ContainerPort{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ContainerState, InType: reflect.TypeOf(&ContainerState{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ContainerStateRunning, InType: reflect.TypeOf(&ContainerStateRunning{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ContainerStateTerminated, InType: reflect.TypeOf(&ContainerStateTerminated{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ContainerStateWaiting, InType: reflect.TypeOf(&ContainerStateWaiting{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ContainerStatus, InType: reflect.TypeOf(&ContainerStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_DaemonEndpoint, InType: reflect.TypeOf(&DaemonEndpoint{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_DeleteOptions, InType: reflect.TypeOf(&DeleteOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_DownwardAPIProjection, InType: reflect.TypeOf(&DownwardAPIProjection{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_DownwardAPIVolumeFile, InType: reflect.TypeOf(&DownwardAPIVolumeFile{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_DownwardAPIVolumeSource, InType: reflect.TypeOf(&DownwardAPIVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_EmptyDirVolumeSource, InType: reflect.TypeOf(&EmptyDirVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_EndpointAddress, InType: reflect.TypeOf(&EndpointAddress{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_EndpointPort, InType: reflect.TypeOf(&EndpointPort{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_EndpointSubset, InType: reflect.TypeOf(&EndpointSubset{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Endpoints, InType: reflect.TypeOf(&Endpoints{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_EndpointsList, InType: reflect.TypeOf(&EndpointsList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_EnvFromSource, InType: reflect.TypeOf(&EnvFromSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_EnvVar, InType: reflect.TypeOf(&EnvVar{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_EnvVarSource, InType: reflect.TypeOf(&EnvVarSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Event, InType: reflect.TypeOf(&Event{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_EventList, InType: reflect.TypeOf(&EventList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_EventSource, InType: reflect.TypeOf(&EventSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ExecAction, InType: reflect.TypeOf(&ExecAction{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_FCVolumeSource, InType: reflect.TypeOf(&FCVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_FlexVolumeSource, InType: reflect.TypeOf(&FlexVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_FlockerVolumeSource, InType: reflect.TypeOf(&FlockerVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_GCEPersistentDiskVolumeSource, InType: reflect.TypeOf(&GCEPersistentDiskVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_GitRepoVolumeSource, InType: reflect.TypeOf(&GitRepoVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_GlusterfsVolumeSource, InType: reflect.TypeOf(&GlusterfsVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_HTTPGetAction, InType: reflect.TypeOf(&HTTPGetAction{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_HTTPHeader, InType: reflect.TypeOf(&HTTPHeader{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Handler, InType: reflect.TypeOf(&Handler{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_HostAlias, InType: reflect.TypeOf(&HostAlias{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_HostPathVolumeSource, InType: reflect.TypeOf(&HostPathVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ISCSIVolumeSource, InType: reflect.TypeOf(&ISCSIVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_KeyToPath, InType: reflect.TypeOf(&KeyToPath{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Lifecycle, InType: reflect.TypeOf(&Lifecycle{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_LimitRange, InType: reflect.TypeOf(&LimitRange{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_LimitRangeItem, InType: reflect.TypeOf(&LimitRangeItem{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_LimitRangeList, InType: reflect.TypeOf(&LimitRangeList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_LimitRangeSpec, InType: reflect.TypeOf(&LimitRangeSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_List, InType: reflect.TypeOf(&List{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ListOptions, InType: reflect.TypeOf(&ListOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_LoadBalancerIngress, InType: reflect.TypeOf(&LoadBalancerIngress{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_LoadBalancerStatus, InType: reflect.TypeOf(&LoadBalancerStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_LocalObjectReference, InType: reflect.TypeOf(&LocalObjectReference{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_LocalVolumeSource, InType: reflect.TypeOf(&LocalVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NFSVolumeSource, InType: reflect.TypeOf(&NFSVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Namespace, InType: reflect.TypeOf(&Namespace{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NamespaceList, InType: reflect.TypeOf(&NamespaceList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NamespaceSpec, InType: reflect.TypeOf(&NamespaceSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NamespaceStatus, InType: reflect.TypeOf(&NamespaceStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Node, InType: reflect.TypeOf(&Node{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NodeAddress, InType: reflect.TypeOf(&NodeAddress{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NodeAffinity, InType: reflect.TypeOf(&NodeAffinity{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NodeCondition, InType: reflect.TypeOf(&NodeCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NodeDaemonEndpoints, InType: reflect.TypeOf(&NodeDaemonEndpoints{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NodeList, InType: reflect.TypeOf(&NodeList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NodeProxyOptions, InType: reflect.TypeOf(&NodeProxyOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NodeResources, InType: reflect.TypeOf(&NodeResources{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NodeSelector, InType: reflect.TypeOf(&NodeSelector{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NodeSelectorRequirement, InType: reflect.TypeOf(&NodeSelectorRequirement{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NodeSelectorTerm, InType: reflect.TypeOf(&NodeSelectorTerm{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NodeSpec, InType: reflect.TypeOf(&NodeSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NodeStatus, InType: reflect.TypeOf(&NodeStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NodeSystemInfo, InType: reflect.TypeOf(&NodeSystemInfo{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ObjectFieldSelector, InType: reflect.TypeOf(&ObjectFieldSelector{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ObjectMeta, InType: reflect.TypeOf(&ObjectMeta{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ObjectReference, InType: reflect.TypeOf(&ObjectReference{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolume, InType: reflect.TypeOf(&PersistentVolume{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeClaim, InType: reflect.TypeOf(&PersistentVolumeClaim{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeClaimList, InType: reflect.TypeOf(&PersistentVolumeClaimList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeClaimSpec, InType: reflect.TypeOf(&PersistentVolumeClaimSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeClaimStatus, InType: reflect.TypeOf(&PersistentVolumeClaimStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeClaimVolumeSource, InType: reflect.TypeOf(&PersistentVolumeClaimVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeList, InType: reflect.TypeOf(&PersistentVolumeList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeSource, InType: reflect.TypeOf(&PersistentVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeSpec, InType: reflect.TypeOf(&PersistentVolumeSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeStatus, InType: reflect.TypeOf(&PersistentVolumeStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PhotonPersistentDiskVolumeSource, InType: reflect.TypeOf(&PhotonPersistentDiskVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Pod, InType: reflect.TypeOf(&Pod{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodAffinity, InType: reflect.TypeOf(&PodAffinity{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodAffinityTerm, InType: reflect.TypeOf(&PodAffinityTerm{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodAntiAffinity, InType: reflect.TypeOf(&PodAntiAffinity{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodAttachOptions, InType: reflect.TypeOf(&PodAttachOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodCondition, InType: reflect.TypeOf(&PodCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodExecOptions, InType: reflect.TypeOf(&PodExecOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodList, InType: reflect.TypeOf(&PodList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodLogOptions, InType: reflect.TypeOf(&PodLogOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodPortForwardOptions, InType: reflect.TypeOf(&PodPortForwardOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodProxyOptions, InType: reflect.TypeOf(&PodProxyOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodSecurityContext, InType: reflect.TypeOf(&PodSecurityContext{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodSignature, InType: reflect.TypeOf(&PodSignature{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodSpec, InType: reflect.TypeOf(&PodSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodStatus, InType: reflect.TypeOf(&PodStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodStatusResult, InType: reflect.TypeOf(&PodStatusResult{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodTemplate, InType: reflect.TypeOf(&PodTemplate{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodTemplateList, InType: reflect.TypeOf(&PodTemplateList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodTemplateSpec, InType: reflect.TypeOf(&PodTemplateSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PortworxVolumeSource, InType: reflect.TypeOf(&PortworxVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Preconditions, InType: reflect.TypeOf(&Preconditions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PreferAvoidPodsEntry, InType: reflect.TypeOf(&PreferAvoidPodsEntry{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PreferredSchedulingTerm, InType: reflect.TypeOf(&PreferredSchedulingTerm{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Probe, InType: reflect.TypeOf(&Probe{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ProjectedVolumeSource, InType: reflect.TypeOf(&ProjectedVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_QuobyteVolumeSource, InType: reflect.TypeOf(&QuobyteVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_RBDVolumeSource, InType: reflect.TypeOf(&RBDVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_RangeAllocation, InType: reflect.TypeOf(&RangeAllocation{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ReplicationController, InType: reflect.TypeOf(&ReplicationController{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ReplicationControllerCondition, InType: reflect.TypeOf(&ReplicationControllerCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ReplicationControllerList, InType: reflect.TypeOf(&ReplicationControllerList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ReplicationControllerSpec, InType: reflect.TypeOf(&ReplicationControllerSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ReplicationControllerStatus, InType: reflect.TypeOf(&ReplicationControllerStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ResourceFieldSelector, InType: reflect.TypeOf(&ResourceFieldSelector{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ResourceQuota, InType: reflect.TypeOf(&ResourceQuota{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ResourceQuotaList, InType: reflect.TypeOf(&ResourceQuotaList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ResourceQuotaSpec, InType: reflect.TypeOf(&ResourceQuotaSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ResourceQuotaStatus, InType: reflect.TypeOf(&ResourceQuotaStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ResourceRequirements, InType: reflect.TypeOf(&ResourceRequirements{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SELinuxOptions, InType: reflect.TypeOf(&SELinuxOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ScaleIOVolumeSource, InType: reflect.TypeOf(&ScaleIOVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Secret, InType: reflect.TypeOf(&Secret{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SecretEnvSource, InType: reflect.TypeOf(&SecretEnvSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SecretKeySelector, InType: reflect.TypeOf(&SecretKeySelector{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SecretList, InType: reflect.TypeOf(&SecretList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SecretProjection, InType: reflect.TypeOf(&SecretProjection{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SecretVolumeSource, InType: reflect.TypeOf(&SecretVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SecurityContext, InType: reflect.TypeOf(&SecurityContext{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SerializedReference, InType: reflect.TypeOf(&SerializedReference{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Service, InType: reflect.TypeOf(&Service{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ServiceAccount, InType: reflect.TypeOf(&ServiceAccount{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ServiceAccountList, InType: reflect.TypeOf(&ServiceAccountList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ServiceList, InType: reflect.TypeOf(&ServiceList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ServicePort, InType: reflect.TypeOf(&ServicePort{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ServiceProxyOptions, InType: reflect.TypeOf(&ServiceProxyOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ServiceSpec, InType: reflect.TypeOf(&ServiceSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ServiceStatus, InType: reflect.TypeOf(&ServiceStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_StorageOSPersistentVolumeSource, InType: reflect.TypeOf(&StorageOSPersistentVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_StorageOSVolumeSource, InType: reflect.TypeOf(&StorageOSVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Sysctl, InType: reflect.TypeOf(&Sysctl{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_TCPSocketAction, InType: reflect.TypeOf(&TCPSocketAction{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Taint, InType: reflect.TypeOf(&Taint{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Toleration, InType: reflect.TypeOf(&Toleration{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Volume, InType: reflect.TypeOf(&Volume{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_VolumeMount, InType: reflect.TypeOf(&VolumeMount{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_VolumeProjection, InType: reflect.TypeOf(&VolumeProjection{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_VolumeSource, InType: reflect.TypeOf(&VolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_VsphereVirtualDiskVolumeSource, InType: reflect.TypeOf(&VsphereVirtualDiskVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_WeightedPodAffinityTerm, InType: reflect.TypeOf(&WeightedPodAffinityTerm{})},
+ )
+}
+
+// DeepCopy_api_AWSElasticBlockStoreVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_AWSElasticBlockStoreVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*AWSElasticBlockStoreVolumeSource)
+ out := out.(*AWSElasticBlockStoreVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_Affinity is an autogenerated deepcopy function.
+func DeepCopy_api_Affinity(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Affinity)
+ out := out.(*Affinity)
+ *out = *in
+ if in.NodeAffinity != nil {
+ in, out := &in.NodeAffinity, &out.NodeAffinity
+ *out = new(NodeAffinity)
+ if err := DeepCopy_api_NodeAffinity(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.PodAffinity != nil {
+ in, out := &in.PodAffinity, &out.PodAffinity
+ *out = new(PodAffinity)
+ if err := DeepCopy_api_PodAffinity(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.PodAntiAffinity != nil {
+ in, out := &in.PodAntiAffinity, &out.PodAntiAffinity
+ *out = new(PodAntiAffinity)
+ if err := DeepCopy_api_PodAntiAffinity(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_AttachedVolume is an autogenerated deepcopy function.
+func DeepCopy_api_AttachedVolume(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*AttachedVolume)
+ out := out.(*AttachedVolume)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_AvoidPods is an autogenerated deepcopy function.
+func DeepCopy_api_AvoidPods(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*AvoidPods)
+ out := out.(*AvoidPods)
+ *out = *in
+ if in.PreferAvoidPods != nil {
+ in, out := &in.PreferAvoidPods, &out.PreferAvoidPods
+ *out = make([]PreferAvoidPodsEntry, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_PreferAvoidPodsEntry(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_AzureDiskVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_AzureDiskVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*AzureDiskVolumeSource)
+ out := out.(*AzureDiskVolumeSource)
+ *out = *in
+ if in.CachingMode != nil {
+ in, out := &in.CachingMode, &out.CachingMode
+ *out = new(AzureDataDiskCachingMode)
+ **out = **in
+ }
+ if in.FSType != nil {
+ in, out := &in.FSType, &out.FSType
+ *out = new(string)
+ **out = **in
+ }
+ if in.ReadOnly != nil {
+ in, out := &in.ReadOnly, &out.ReadOnly
+ *out = new(bool)
+ **out = **in
+ }
+ if in.Kind != nil {
+ in, out := &in.Kind, &out.Kind
+ *out = new(AzureDataDiskKind)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_AzureFileVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_AzureFileVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*AzureFileVolumeSource)
+ out := out.(*AzureFileVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_Binding is an autogenerated deepcopy function.
+func DeepCopy_api_Binding(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Binding)
+ out := out.(*Binding)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_Capabilities is an autogenerated deepcopy function.
+func DeepCopy_api_Capabilities(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Capabilities)
+ out := out.(*Capabilities)
+ *out = *in
+ if in.Add != nil {
+ in, out := &in.Add, &out.Add
+ *out = make([]Capability, len(*in))
+ copy(*out, *in)
+ }
+ if in.Drop != nil {
+ in, out := &in.Drop, &out.Drop
+ *out = make([]Capability, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_CephFSVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_CephFSVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CephFSVolumeSource)
+ out := out.(*CephFSVolumeSource)
+ *out = *in
+ if in.Monitors != nil {
+ in, out := &in.Monitors, &out.Monitors
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_CinderVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_CinderVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CinderVolumeSource)
+ out := out.(*CinderVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_ComponentCondition is an autogenerated deepcopy function.
+func DeepCopy_api_ComponentCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ComponentCondition)
+ out := out.(*ComponentCondition)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_ComponentStatus is an autogenerated deepcopy function.
+func DeepCopy_api_ComponentStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ComponentStatus)
+ out := out.(*ComponentStatus)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]ComponentCondition, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ComponentStatusList is an autogenerated deepcopy function.
+func DeepCopy_api_ComponentStatusList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ComponentStatusList)
+ out := out.(*ComponentStatusList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ComponentStatus, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_ComponentStatus(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ConfigMap is an autogenerated deepcopy function.
+func DeepCopy_api_ConfigMap(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ConfigMap)
+ out := out.(*ConfigMap)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Data != nil {
+ in, out := &in.Data, &out.Data
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ConfigMapEnvSource is an autogenerated deepcopy function.
+func DeepCopy_api_ConfigMapEnvSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ConfigMapEnvSource)
+ out := out.(*ConfigMapEnvSource)
+ *out = *in
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ConfigMapKeySelector is an autogenerated deepcopy function.
+func DeepCopy_api_ConfigMapKeySelector(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ConfigMapKeySelector)
+ out := out.(*ConfigMapKeySelector)
+ *out = *in
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ConfigMapList is an autogenerated deepcopy function.
+func DeepCopy_api_ConfigMapList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ConfigMapList)
+ out := out.(*ConfigMapList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ConfigMap, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_ConfigMap(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ConfigMapProjection is an autogenerated deepcopy function.
+func DeepCopy_api_ConfigMapProjection(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ConfigMapProjection)
+ out := out.(*ConfigMapProjection)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]KeyToPath, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_KeyToPath(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ConfigMapVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_ConfigMapVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ConfigMapVolumeSource)
+ out := out.(*ConfigMapVolumeSource)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]KeyToPath, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_KeyToPath(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.DefaultMode != nil {
+ in, out := &in.DefaultMode, &out.DefaultMode
+ *out = new(int32)
+ **out = **in
+ }
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_Container is an autogenerated deepcopy function.
+func DeepCopy_api_Container(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Container)
+ out := out.(*Container)
+ *out = *in
+ if in.Command != nil {
+ in, out := &in.Command, &out.Command
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Args != nil {
+ in, out := &in.Args, &out.Args
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]ContainerPort, len(*in))
+ copy(*out, *in)
+ }
+ if in.EnvFrom != nil {
+ in, out := &in.EnvFrom, &out.EnvFrom
+ *out = make([]EnvFromSource, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_EnvFromSource(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Env != nil {
+ in, out := &in.Env, &out.Env
+ *out = make([]EnvVar, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_EnvVar(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if err := DeepCopy_api_ResourceRequirements(&in.Resources, &out.Resources, c); err != nil {
+ return err
+ }
+ if in.VolumeMounts != nil {
+ in, out := &in.VolumeMounts, &out.VolumeMounts
+ *out = make([]VolumeMount, len(*in))
+ copy(*out, *in)
+ }
+ if in.LivenessProbe != nil {
+ in, out := &in.LivenessProbe, &out.LivenessProbe
+ *out = new(Probe)
+ if err := DeepCopy_api_Probe(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.ReadinessProbe != nil {
+ in, out := &in.ReadinessProbe, &out.ReadinessProbe
+ *out = new(Probe)
+ if err := DeepCopy_api_Probe(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Lifecycle != nil {
+ in, out := &in.Lifecycle, &out.Lifecycle
+ *out = new(Lifecycle)
+ if err := DeepCopy_api_Lifecycle(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.SecurityContext != nil {
+ in, out := &in.SecurityContext, &out.SecurityContext
+ *out = new(SecurityContext)
+ if err := DeepCopy_api_SecurityContext(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ContainerImage is an autogenerated deepcopy function.
+func DeepCopy_api_ContainerImage(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ContainerImage)
+ out := out.(*ContainerImage)
+ *out = *in
+ if in.Names != nil {
+ in, out := &in.Names, &out.Names
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ContainerPort is an autogenerated deepcopy function.
+func DeepCopy_api_ContainerPort(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ContainerPort)
+ out := out.(*ContainerPort)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_ContainerState is an autogenerated deepcopy function.
+func DeepCopy_api_ContainerState(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ContainerState)
+ out := out.(*ContainerState)
+ *out = *in
+ if in.Waiting != nil {
+ in, out := &in.Waiting, &out.Waiting
+ *out = new(ContainerStateWaiting)
+ **out = **in
+ }
+ if in.Running != nil {
+ in, out := &in.Running, &out.Running
+ *out = new(ContainerStateRunning)
+ if err := DeepCopy_api_ContainerStateRunning(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Terminated != nil {
+ in, out := &in.Terminated, &out.Terminated
+ *out = new(ContainerStateTerminated)
+ if err := DeepCopy_api_ContainerStateTerminated(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ContainerStateRunning is an autogenerated deepcopy function.
+func DeepCopy_api_ContainerStateRunning(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ContainerStateRunning)
+ out := out.(*ContainerStateRunning)
+ *out = *in
+ out.StartedAt = in.StartedAt.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_api_ContainerStateTerminated is an autogenerated deepcopy function.
+func DeepCopy_api_ContainerStateTerminated(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ContainerStateTerminated)
+ out := out.(*ContainerStateTerminated)
+ *out = *in
+ out.StartedAt = in.StartedAt.DeepCopy()
+ out.FinishedAt = in.FinishedAt.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_api_ContainerStateWaiting is an autogenerated deepcopy function.
+func DeepCopy_api_ContainerStateWaiting(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ContainerStateWaiting)
+ out := out.(*ContainerStateWaiting)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_ContainerStatus is an autogenerated deepcopy function.
+func DeepCopy_api_ContainerStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ContainerStatus)
+ out := out.(*ContainerStatus)
+ *out = *in
+ if err := DeepCopy_api_ContainerState(&in.State, &out.State, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_api_ContainerState(&in.LastTerminationState, &out.LastTerminationState, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_DaemonEndpoint is an autogenerated deepcopy function.
+func DeepCopy_api_DaemonEndpoint(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DaemonEndpoint)
+ out := out.(*DaemonEndpoint)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_DeleteOptions is an autogenerated deepcopy function.
+func DeepCopy_api_DeleteOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeleteOptions)
+ out := out.(*DeleteOptions)
+ *out = *in
+ if in.GracePeriodSeconds != nil {
+ in, out := &in.GracePeriodSeconds, &out.GracePeriodSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.Preconditions != nil {
+ in, out := &in.Preconditions, &out.Preconditions
+ *out = new(Preconditions)
+ if err := DeepCopy_api_Preconditions(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.OrphanDependents != nil {
+ in, out := &in.OrphanDependents, &out.OrphanDependents
+ *out = new(bool)
+ **out = **in
+ }
+ if in.PropagationPolicy != nil {
+ in, out := &in.PropagationPolicy, &out.PropagationPolicy
+ *out = new(DeletionPropagation)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_DownwardAPIProjection is an autogenerated deepcopy function.
+func DeepCopy_api_DownwardAPIProjection(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DownwardAPIProjection)
+ out := out.(*DownwardAPIProjection)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]DownwardAPIVolumeFile, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_DownwardAPIVolumeFile(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_DownwardAPIVolumeFile is an autogenerated deepcopy function.
+func DeepCopy_api_DownwardAPIVolumeFile(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DownwardAPIVolumeFile)
+ out := out.(*DownwardAPIVolumeFile)
+ *out = *in
+ if in.FieldRef != nil {
+ in, out := &in.FieldRef, &out.FieldRef
+ *out = new(ObjectFieldSelector)
+ **out = **in
+ }
+ if in.ResourceFieldRef != nil {
+ in, out := &in.ResourceFieldRef, &out.ResourceFieldRef
+ *out = new(ResourceFieldSelector)
+ if err := DeepCopy_api_ResourceFieldSelector(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Mode != nil {
+ in, out := &in.Mode, &out.Mode
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_DownwardAPIVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_DownwardAPIVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DownwardAPIVolumeSource)
+ out := out.(*DownwardAPIVolumeSource)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]DownwardAPIVolumeFile, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_DownwardAPIVolumeFile(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.DefaultMode != nil {
+ in, out := &in.DefaultMode, &out.DefaultMode
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_EmptyDirVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_EmptyDirVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EmptyDirVolumeSource)
+ out := out.(*EmptyDirVolumeSource)
+ *out = *in
+ out.SizeLimit = in.SizeLimit.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_api_EndpointAddress is an autogenerated deepcopy function.
+func DeepCopy_api_EndpointAddress(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EndpointAddress)
+ out := out.(*EndpointAddress)
+ *out = *in
+ if in.NodeName != nil {
+ in, out := &in.NodeName, &out.NodeName
+ *out = new(string)
+ **out = **in
+ }
+ if in.TargetRef != nil {
+ in, out := &in.TargetRef, &out.TargetRef
+ *out = new(ObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_EndpointPort is an autogenerated deepcopy function.
+func DeepCopy_api_EndpointPort(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EndpointPort)
+ out := out.(*EndpointPort)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_EndpointSubset is an autogenerated deepcopy function.
+func DeepCopy_api_EndpointSubset(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EndpointSubset)
+ out := out.(*EndpointSubset)
+ *out = *in
+ if in.Addresses != nil {
+ in, out := &in.Addresses, &out.Addresses
+ *out = make([]EndpointAddress, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_EndpointAddress(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.NotReadyAddresses != nil {
+ in, out := &in.NotReadyAddresses, &out.NotReadyAddresses
+ *out = make([]EndpointAddress, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_EndpointAddress(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]EndpointPort, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_Endpoints is an autogenerated deepcopy function.
+func DeepCopy_api_Endpoints(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Endpoints)
+ out := out.(*Endpoints)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Subsets != nil {
+ in, out := &in.Subsets, &out.Subsets
+ *out = make([]EndpointSubset, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_EndpointSubset(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_EndpointsList is an autogenerated deepcopy function.
+func DeepCopy_api_EndpointsList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EndpointsList)
+ out := out.(*EndpointsList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Endpoints, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_Endpoints(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_EnvFromSource is an autogenerated deepcopy function.
+func DeepCopy_api_EnvFromSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EnvFromSource)
+ out := out.(*EnvFromSource)
+ *out = *in
+ if in.ConfigMapRef != nil {
+ in, out := &in.ConfigMapRef, &out.ConfigMapRef
+ *out = new(ConfigMapEnvSource)
+ if err := DeepCopy_api_ConfigMapEnvSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(SecretEnvSource)
+ if err := DeepCopy_api_SecretEnvSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_EnvVar is an autogenerated deepcopy function.
+func DeepCopy_api_EnvVar(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EnvVar)
+ out := out.(*EnvVar)
+ *out = *in
+ if in.ValueFrom != nil {
+ in, out := &in.ValueFrom, &out.ValueFrom
+ *out = new(EnvVarSource)
+ if err := DeepCopy_api_EnvVarSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_EnvVarSource is an autogenerated deepcopy function.
+func DeepCopy_api_EnvVarSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EnvVarSource)
+ out := out.(*EnvVarSource)
+ *out = *in
+ if in.FieldRef != nil {
+ in, out := &in.FieldRef, &out.FieldRef
+ *out = new(ObjectFieldSelector)
+ **out = **in
+ }
+ if in.ResourceFieldRef != nil {
+ in, out := &in.ResourceFieldRef, &out.ResourceFieldRef
+ *out = new(ResourceFieldSelector)
+ if err := DeepCopy_api_ResourceFieldSelector(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.ConfigMapKeyRef != nil {
+ in, out := &in.ConfigMapKeyRef, &out.ConfigMapKeyRef
+ *out = new(ConfigMapKeySelector)
+ if err := DeepCopy_api_ConfigMapKeySelector(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.SecretKeyRef != nil {
+ in, out := &in.SecretKeyRef, &out.SecretKeyRef
+ *out = new(SecretKeySelector)
+ if err := DeepCopy_api_SecretKeySelector(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_Event is an autogenerated deepcopy function.
+func DeepCopy_api_Event(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Event)
+ out := out.(*Event)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ out.FirstTimestamp = in.FirstTimestamp.DeepCopy()
+ out.LastTimestamp = in.LastTimestamp.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_api_EventList is an autogenerated deepcopy function.
+func DeepCopy_api_EventList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EventList)
+ out := out.(*EventList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Event, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_Event(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_EventSource is an autogenerated deepcopy function.
+func DeepCopy_api_EventSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EventSource)
+ out := out.(*EventSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_ExecAction is an autogenerated deepcopy function.
+func DeepCopy_api_ExecAction(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ExecAction)
+ out := out.(*ExecAction)
+ *out = *in
+ if in.Command != nil {
+ in, out := &in.Command, &out.Command
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_FCVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_FCVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*FCVolumeSource)
+ out := out.(*FCVolumeSource)
+ *out = *in
+ if in.TargetWWNs != nil {
+ in, out := &in.TargetWWNs, &out.TargetWWNs
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Lun != nil {
+ in, out := &in.Lun, &out.Lun
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_FlexVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_FlexVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*FlexVolumeSource)
+ out := out.(*FlexVolumeSource)
+ *out = *in
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = **in
+ }
+ if in.Options != nil {
+ in, out := &in.Options, &out.Options
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_FlockerVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_FlockerVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*FlockerVolumeSource)
+ out := out.(*FlockerVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_GCEPersistentDiskVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_GCEPersistentDiskVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*GCEPersistentDiskVolumeSource)
+ out := out.(*GCEPersistentDiskVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_GitRepoVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_GitRepoVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*GitRepoVolumeSource)
+ out := out.(*GitRepoVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_GlusterfsVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_GlusterfsVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*GlusterfsVolumeSource)
+ out := out.(*GlusterfsVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_HTTPGetAction is an autogenerated deepcopy function.
+func DeepCopy_api_HTTPGetAction(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HTTPGetAction)
+ out := out.(*HTTPGetAction)
+ *out = *in
+ if in.HTTPHeaders != nil {
+ in, out := &in.HTTPHeaders, &out.HTTPHeaders
+ *out = make([]HTTPHeader, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_HTTPHeader is an autogenerated deepcopy function.
+func DeepCopy_api_HTTPHeader(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HTTPHeader)
+ out := out.(*HTTPHeader)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_Handler is an autogenerated deepcopy function.
+func DeepCopy_api_Handler(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Handler)
+ out := out.(*Handler)
+ *out = *in
+ if in.Exec != nil {
+ in, out := &in.Exec, &out.Exec
+ *out = new(ExecAction)
+ if err := DeepCopy_api_ExecAction(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.HTTPGet != nil {
+ in, out := &in.HTTPGet, &out.HTTPGet
+ *out = new(HTTPGetAction)
+ if err := DeepCopy_api_HTTPGetAction(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.TCPSocket != nil {
+ in, out := &in.TCPSocket, &out.TCPSocket
+ *out = new(TCPSocketAction)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_HostAlias is an autogenerated deepcopy function.
+func DeepCopy_api_HostAlias(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HostAlias)
+ out := out.(*HostAlias)
+ *out = *in
+ if in.Hostnames != nil {
+ in, out := &in.Hostnames, &out.Hostnames
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_HostPathVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_HostPathVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HostPathVolumeSource)
+ out := out.(*HostPathVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_ISCSIVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_ISCSIVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ISCSIVolumeSource)
+ out := out.(*ISCSIVolumeSource)
+ *out = *in
+ if in.Portals != nil {
+ in, out := &in.Portals, &out.Portals
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_KeyToPath is an autogenerated deepcopy function.
+func DeepCopy_api_KeyToPath(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*KeyToPath)
+ out := out.(*KeyToPath)
+ *out = *in
+ if in.Mode != nil {
+ in, out := &in.Mode, &out.Mode
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_Lifecycle is an autogenerated deepcopy function.
+func DeepCopy_api_Lifecycle(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Lifecycle)
+ out := out.(*Lifecycle)
+ *out = *in
+ if in.PostStart != nil {
+ in, out := &in.PostStart, &out.PostStart
+ *out = new(Handler)
+ if err := DeepCopy_api_Handler(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.PreStop != nil {
+ in, out := &in.PreStop, &out.PreStop
+ *out = new(Handler)
+ if err := DeepCopy_api_Handler(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_LimitRange is an autogenerated deepcopy function.
+func DeepCopy_api_LimitRange(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LimitRange)
+ out := out.(*LimitRange)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_api_LimitRangeSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_LimitRangeItem is an autogenerated deepcopy function.
+func DeepCopy_api_LimitRangeItem(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LimitRangeItem)
+ out := out.(*LimitRangeItem)
+ *out = *in
+ if in.Max != nil {
+ in, out := &in.Max, &out.Max
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Min != nil {
+ in, out := &in.Min, &out.Min
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Default != nil {
+ in, out := &in.Default, &out.Default
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.DefaultRequest != nil {
+ in, out := &in.DefaultRequest, &out.DefaultRequest
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.MaxLimitRequestRatio != nil {
+ in, out := &in.MaxLimitRequestRatio, &out.MaxLimitRequestRatio
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_LimitRangeList is an autogenerated deepcopy function.
+func DeepCopy_api_LimitRangeList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LimitRangeList)
+ out := out.(*LimitRangeList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]LimitRange, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_LimitRange(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_LimitRangeSpec is an autogenerated deepcopy function.
+func DeepCopy_api_LimitRangeSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LimitRangeSpec)
+ out := out.(*LimitRangeSpec)
+ *out = *in
+ if in.Limits != nil {
+ in, out := &in.Limits, &out.Limits
+ *out = make([]LimitRangeItem, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_LimitRangeItem(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_List is an autogenerated deepcopy function.
+func DeepCopy_api_List(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*List)
+ out := out.(*List)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]runtime.Object, len(*in))
+ for i := range *in {
+ if newVal, err := c.DeepCopy(&(*in)[i]); err != nil {
+ return err
+ } else {
+ (*out)[i] = *newVal.(*runtime.Object)
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ListOptions is an autogenerated deepcopy function.
+func DeepCopy_api_ListOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ListOptions)
+ out := out.(*ListOptions)
+ *out = *in
+ // in.LabelSelector is kind 'Interface'
+ if in.LabelSelector != nil {
+ if newVal, err := c.DeepCopy(&in.LabelSelector); err != nil {
+ return err
+ } else {
+ out.LabelSelector = *newVal.(*labels.Selector)
+ }
+ }
+ // in.FieldSelector is kind 'Interface'
+ if in.FieldSelector != nil {
+ if newVal, err := c.DeepCopy(&in.FieldSelector); err != nil {
+ return err
+ } else {
+ out.FieldSelector = *newVal.(*fields.Selector)
+ }
+ }
+ if in.TimeoutSeconds != nil {
+ in, out := &in.TimeoutSeconds, &out.TimeoutSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_LoadBalancerIngress is an autogenerated deepcopy function.
+func DeepCopy_api_LoadBalancerIngress(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LoadBalancerIngress)
+ out := out.(*LoadBalancerIngress)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_LoadBalancerStatus is an autogenerated deepcopy function.
+func DeepCopy_api_LoadBalancerStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LoadBalancerStatus)
+ out := out.(*LoadBalancerStatus)
+ *out = *in
+ if in.Ingress != nil {
+ in, out := &in.Ingress, &out.Ingress
+ *out = make([]LoadBalancerIngress, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_LocalObjectReference is an autogenerated deepcopy function.
+func DeepCopy_api_LocalObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LocalObjectReference)
+ out := out.(*LocalObjectReference)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_LocalVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_LocalVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LocalVolumeSource)
+ out := out.(*LocalVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_NFSVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_NFSVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NFSVolumeSource)
+ out := out.(*NFSVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_Namespace is an autogenerated deepcopy function.
+func DeepCopy_api_Namespace(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Namespace)
+ out := out.(*Namespace)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_api_NamespaceSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_NamespaceList is an autogenerated deepcopy function.
+func DeepCopy_api_NamespaceList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NamespaceList)
+ out := out.(*NamespaceList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Namespace, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_Namespace(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_NamespaceSpec is an autogenerated deepcopy function.
+func DeepCopy_api_NamespaceSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NamespaceSpec)
+ out := out.(*NamespaceSpec)
+ *out = *in
+ if in.Finalizers != nil {
+ in, out := &in.Finalizers, &out.Finalizers
+ *out = make([]FinalizerName, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_NamespaceStatus is an autogenerated deepcopy function.
+func DeepCopy_api_NamespaceStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NamespaceStatus)
+ out := out.(*NamespaceStatus)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_Node is an autogenerated deepcopy function.
+func DeepCopy_api_Node(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Node)
+ out := out.(*Node)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_api_NodeSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_api_NodeStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_NodeAddress is an autogenerated deepcopy function.
+func DeepCopy_api_NodeAddress(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeAddress)
+ out := out.(*NodeAddress)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_NodeAffinity is an autogenerated deepcopy function.
+func DeepCopy_api_NodeAffinity(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeAffinity)
+ out := out.(*NodeAffinity)
+ *out = *in
+ if in.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution
+ *out = new(NodeSelector)
+ if err := DeepCopy_api_NodeSelector(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.PreferredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution
+ *out = make([]PreferredSchedulingTerm, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_PreferredSchedulingTerm(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_NodeCondition is an autogenerated deepcopy function.
+func DeepCopy_api_NodeCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeCondition)
+ out := out.(*NodeCondition)
+ *out = *in
+ out.LastHeartbeatTime = in.LastHeartbeatTime.DeepCopy()
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_api_NodeDaemonEndpoints is an autogenerated deepcopy function.
+func DeepCopy_api_NodeDaemonEndpoints(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeDaemonEndpoints)
+ out := out.(*NodeDaemonEndpoints)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_NodeList is an autogenerated deepcopy function.
+func DeepCopy_api_NodeList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeList)
+ out := out.(*NodeList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Node, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_Node(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_NodeProxyOptions is an autogenerated deepcopy function.
+func DeepCopy_api_NodeProxyOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeProxyOptions)
+ out := out.(*NodeProxyOptions)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_NodeResources is an autogenerated deepcopy function.
+func DeepCopy_api_NodeResources(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeResources)
+ out := out.(*NodeResources)
+ *out = *in
+ if in.Capacity != nil {
+ in, out := &in.Capacity, &out.Capacity
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_NodeSelector is an autogenerated deepcopy function.
+func DeepCopy_api_NodeSelector(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeSelector)
+ out := out.(*NodeSelector)
+ *out = *in
+ if in.NodeSelectorTerms != nil {
+ in, out := &in.NodeSelectorTerms, &out.NodeSelectorTerms
+ *out = make([]NodeSelectorTerm, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_NodeSelectorTerm(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_NodeSelectorRequirement is an autogenerated deepcopy function.
+func DeepCopy_api_NodeSelectorRequirement(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeSelectorRequirement)
+ out := out.(*NodeSelectorRequirement)
+ *out = *in
+ if in.Values != nil {
+ in, out := &in.Values, &out.Values
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_NodeSelectorTerm is an autogenerated deepcopy function.
+func DeepCopy_api_NodeSelectorTerm(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeSelectorTerm)
+ out := out.(*NodeSelectorTerm)
+ *out = *in
+ if in.MatchExpressions != nil {
+ in, out := &in.MatchExpressions, &out.MatchExpressions
+ *out = make([]NodeSelectorRequirement, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_NodeSelectorRequirement(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_NodeSpec is an autogenerated deepcopy function.
+func DeepCopy_api_NodeSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeSpec)
+ out := out.(*NodeSpec)
+ *out = *in
+ if in.Taints != nil {
+ in, out := &in.Taints, &out.Taints
+ *out = make([]Taint, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_Taint(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_NodeStatus is an autogenerated deepcopy function.
+func DeepCopy_api_NodeStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeStatus)
+ out := out.(*NodeStatus)
+ *out = *in
+ if in.Capacity != nil {
+ in, out := &in.Capacity, &out.Capacity
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Allocatable != nil {
+ in, out := &in.Allocatable, &out.Allocatable
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]NodeCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_NodeCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Addresses != nil {
+ in, out := &in.Addresses, &out.Addresses
+ *out = make([]NodeAddress, len(*in))
+ copy(*out, *in)
+ }
+ if in.Images != nil {
+ in, out := &in.Images, &out.Images
+ *out = make([]ContainerImage, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_ContainerImage(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.VolumesInUse != nil {
+ in, out := &in.VolumesInUse, &out.VolumesInUse
+ *out = make([]UniqueVolumeName, len(*in))
+ copy(*out, *in)
+ }
+ if in.VolumesAttached != nil {
+ in, out := &in.VolumesAttached, &out.VolumesAttached
+ *out = make([]AttachedVolume, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_NodeSystemInfo is an autogenerated deepcopy function.
+func DeepCopy_api_NodeSystemInfo(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeSystemInfo)
+ out := out.(*NodeSystemInfo)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_ObjectFieldSelector is an autogenerated deepcopy function.
+func DeepCopy_api_ObjectFieldSelector(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ObjectFieldSelector)
+ out := out.(*ObjectFieldSelector)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_ObjectMeta is an autogenerated deepcopy function.
+func DeepCopy_api_ObjectMeta(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ObjectMeta)
+ out := out.(*ObjectMeta)
+ *out = *in
+ out.CreationTimestamp = in.CreationTimestamp.DeepCopy()
+ if in.DeletionTimestamp != nil {
+ in, out := &in.DeletionTimestamp, &out.DeletionTimestamp
+ *out = new(v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ if in.DeletionGracePeriodSeconds != nil {
+ in, out := &in.DeletionGracePeriodSeconds, &out.DeletionGracePeriodSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.Labels != nil {
+ in, out := &in.Labels, &out.Labels
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ if in.Annotations != nil {
+ in, out := &in.Annotations, &out.Annotations
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ if in.OwnerReferences != nil {
+ in, out := &in.OwnerReferences, &out.OwnerReferences
+ *out = make([]v1.OwnerReference, len(*in))
+ for i := range *in {
+ if newVal, err := c.DeepCopy(&(*in)[i]); err != nil {
+ return err
+ } else {
+ (*out)[i] = *newVal.(*v1.OwnerReference)
+ }
+ }
+ }
+ if in.Initializers != nil {
+ in, out := &in.Initializers, &out.Initializers
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.Initializers)
+ }
+ }
+ if in.Finalizers != nil {
+ in, out := &in.Finalizers, &out.Finalizers
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ObjectReference is an autogenerated deepcopy function.
+func DeepCopy_api_ObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ObjectReference)
+ out := out.(*ObjectReference)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_PersistentVolume is an autogenerated deepcopy function.
+func DeepCopy_api_PersistentVolume(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolume)
+ out := out.(*PersistentVolume)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_api_PersistentVolumeSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PersistentVolumeClaim is an autogenerated deepcopy function.
+func DeepCopy_api_PersistentVolumeClaim(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeClaim)
+ out := out.(*PersistentVolumeClaim)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_api_PersistentVolumeClaimSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_api_PersistentVolumeClaimStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PersistentVolumeClaimList is an autogenerated deepcopy function.
+func DeepCopy_api_PersistentVolumeClaimList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeClaimList)
+ out := out.(*PersistentVolumeClaimList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PersistentVolumeClaim, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_PersistentVolumeClaim(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PersistentVolumeClaimSpec is an autogenerated deepcopy function.
+func DeepCopy_api_PersistentVolumeClaimSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeClaimSpec)
+ out := out.(*PersistentVolumeClaimSpec)
+ *out = *in
+ if in.AccessModes != nil {
+ in, out := &in.AccessModes, &out.AccessModes
+ *out = make([]PersistentVolumeAccessMode, len(*in))
+ copy(*out, *in)
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if err := DeepCopy_api_ResourceRequirements(&in.Resources, &out.Resources, c); err != nil {
+ return err
+ }
+ if in.StorageClassName != nil {
+ in, out := &in.StorageClassName, &out.StorageClassName
+ *out = new(string)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PersistentVolumeClaimStatus is an autogenerated deepcopy function.
+func DeepCopy_api_PersistentVolumeClaimStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeClaimStatus)
+ out := out.(*PersistentVolumeClaimStatus)
+ *out = *in
+ if in.AccessModes != nil {
+ in, out := &in.AccessModes, &out.AccessModes
+ *out = make([]PersistentVolumeAccessMode, len(*in))
+ copy(*out, *in)
+ }
+ if in.Capacity != nil {
+ in, out := &in.Capacity, &out.Capacity
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PersistentVolumeClaimVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_PersistentVolumeClaimVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeClaimVolumeSource)
+ out := out.(*PersistentVolumeClaimVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_PersistentVolumeList is an autogenerated deepcopy function.
+func DeepCopy_api_PersistentVolumeList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeList)
+ out := out.(*PersistentVolumeList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PersistentVolume, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_PersistentVolume(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PersistentVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_PersistentVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeSource)
+ out := out.(*PersistentVolumeSource)
+ *out = *in
+ if in.GCEPersistentDisk != nil {
+ in, out := &in.GCEPersistentDisk, &out.GCEPersistentDisk
+ *out = new(GCEPersistentDiskVolumeSource)
+ **out = **in
+ }
+ if in.AWSElasticBlockStore != nil {
+ in, out := &in.AWSElasticBlockStore, &out.AWSElasticBlockStore
+ *out = new(AWSElasticBlockStoreVolumeSource)
+ **out = **in
+ }
+ if in.HostPath != nil {
+ in, out := &in.HostPath, &out.HostPath
+ *out = new(HostPathVolumeSource)
+ **out = **in
+ }
+ if in.Glusterfs != nil {
+ in, out := &in.Glusterfs, &out.Glusterfs
+ *out = new(GlusterfsVolumeSource)
+ **out = **in
+ }
+ if in.NFS != nil {
+ in, out := &in.NFS, &out.NFS
+ *out = new(NFSVolumeSource)
+ **out = **in
+ }
+ if in.RBD != nil {
+ in, out := &in.RBD, &out.RBD
+ *out = new(RBDVolumeSource)
+ if err := DeepCopy_api_RBDVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Quobyte != nil {
+ in, out := &in.Quobyte, &out.Quobyte
+ *out = new(QuobyteVolumeSource)
+ **out = **in
+ }
+ if in.ISCSI != nil {
+ in, out := &in.ISCSI, &out.ISCSI
+ *out = new(ISCSIVolumeSource)
+ if err := DeepCopy_api_ISCSIVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.FlexVolume != nil {
+ in, out := &in.FlexVolume, &out.FlexVolume
+ *out = new(FlexVolumeSource)
+ if err := DeepCopy_api_FlexVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Cinder != nil {
+ in, out := &in.Cinder, &out.Cinder
+ *out = new(CinderVolumeSource)
+ **out = **in
+ }
+ if in.CephFS != nil {
+ in, out := &in.CephFS, &out.CephFS
+ *out = new(CephFSVolumeSource)
+ if err := DeepCopy_api_CephFSVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.FC != nil {
+ in, out := &in.FC, &out.FC
+ *out = new(FCVolumeSource)
+ if err := DeepCopy_api_FCVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Flocker != nil {
+ in, out := &in.Flocker, &out.Flocker
+ *out = new(FlockerVolumeSource)
+ **out = **in
+ }
+ if in.AzureFile != nil {
+ in, out := &in.AzureFile, &out.AzureFile
+ *out = new(AzureFileVolumeSource)
+ **out = **in
+ }
+ if in.VsphereVolume != nil {
+ in, out := &in.VsphereVolume, &out.VsphereVolume
+ *out = new(VsphereVirtualDiskVolumeSource)
+ **out = **in
+ }
+ if in.AzureDisk != nil {
+ in, out := &in.AzureDisk, &out.AzureDisk
+ *out = new(AzureDiskVolumeSource)
+ if err := DeepCopy_api_AzureDiskVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.PhotonPersistentDisk != nil {
+ in, out := &in.PhotonPersistentDisk, &out.PhotonPersistentDisk
+ *out = new(PhotonPersistentDiskVolumeSource)
+ **out = **in
+ }
+ if in.PortworxVolume != nil {
+ in, out := &in.PortworxVolume, &out.PortworxVolume
+ *out = new(PortworxVolumeSource)
+ **out = **in
+ }
+ if in.ScaleIO != nil {
+ in, out := &in.ScaleIO, &out.ScaleIO
+ *out = new(ScaleIOVolumeSource)
+ if err := DeepCopy_api_ScaleIOVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Local != nil {
+ in, out := &in.Local, &out.Local
+ *out = new(LocalVolumeSource)
+ **out = **in
+ }
+ if in.StorageOS != nil {
+ in, out := &in.StorageOS, &out.StorageOS
+ *out = new(StorageOSPersistentVolumeSource)
+ if err := DeepCopy_api_StorageOSPersistentVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PersistentVolumeSpec is an autogenerated deepcopy function.
+func DeepCopy_api_PersistentVolumeSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeSpec)
+ out := out.(*PersistentVolumeSpec)
+ *out = *in
+ if in.Capacity != nil {
+ in, out := &in.Capacity, &out.Capacity
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if err := DeepCopy_api_PersistentVolumeSource(&in.PersistentVolumeSource, &out.PersistentVolumeSource, c); err != nil {
+ return err
+ }
+ if in.AccessModes != nil {
+ in, out := &in.AccessModes, &out.AccessModes
+ *out = make([]PersistentVolumeAccessMode, len(*in))
+ copy(*out, *in)
+ }
+ if in.ClaimRef != nil {
+ in, out := &in.ClaimRef, &out.ClaimRef
+ *out = new(ObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PersistentVolumeStatus is an autogenerated deepcopy function.
+func DeepCopy_api_PersistentVolumeStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeStatus)
+ out := out.(*PersistentVolumeStatus)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_PhotonPersistentDiskVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_PhotonPersistentDiskVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PhotonPersistentDiskVolumeSource)
+ out := out.(*PhotonPersistentDiskVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_Pod is an autogenerated deepcopy function.
+func DeepCopy_api_Pod(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Pod)
+ out := out.(*Pod)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_api_PodSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_api_PodStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodAffinity is an autogenerated deepcopy function.
+func DeepCopy_api_PodAffinity(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodAffinity)
+ out := out.(*PodAffinity)
+ *out = *in
+ if in.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution
+ *out = make([]PodAffinityTerm, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_PodAffinityTerm(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.PreferredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution
+ *out = make([]WeightedPodAffinityTerm, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_WeightedPodAffinityTerm(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodAffinityTerm is an autogenerated deepcopy function.
+func DeepCopy_api_PodAffinityTerm(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodAffinityTerm)
+ out := out.(*PodAffinityTerm)
+ *out = *in
+ if in.LabelSelector != nil {
+ in, out := &in.LabelSelector, &out.LabelSelector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if in.Namespaces != nil {
+ in, out := &in.Namespaces, &out.Namespaces
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodAntiAffinity is an autogenerated deepcopy function.
+func DeepCopy_api_PodAntiAffinity(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodAntiAffinity)
+ out := out.(*PodAntiAffinity)
+ *out = *in
+ if in.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution
+ *out = make([]PodAffinityTerm, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_PodAffinityTerm(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.PreferredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution
+ *out = make([]WeightedPodAffinityTerm, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_WeightedPodAffinityTerm(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodAttachOptions is an autogenerated deepcopy function.
+func DeepCopy_api_PodAttachOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodAttachOptions)
+ out := out.(*PodAttachOptions)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_PodCondition is an autogenerated deepcopy function.
+func DeepCopy_api_PodCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodCondition)
+ out := out.(*PodCondition)
+ *out = *in
+ out.LastProbeTime = in.LastProbeTime.DeepCopy()
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_api_PodExecOptions is an autogenerated deepcopy function.
+func DeepCopy_api_PodExecOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodExecOptions)
+ out := out.(*PodExecOptions)
+ *out = *in
+ if in.Command != nil {
+ in, out := &in.Command, &out.Command
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodList is an autogenerated deepcopy function.
+func DeepCopy_api_PodList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodList)
+ out := out.(*PodList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Pod, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_Pod(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodLogOptions is an autogenerated deepcopy function.
+func DeepCopy_api_PodLogOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodLogOptions)
+ out := out.(*PodLogOptions)
+ *out = *in
+ if in.SinceSeconds != nil {
+ in, out := &in.SinceSeconds, &out.SinceSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.SinceTime != nil {
+ in, out := &in.SinceTime, &out.SinceTime
+ *out = new(v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ if in.TailLines != nil {
+ in, out := &in.TailLines, &out.TailLines
+ *out = new(int64)
+ **out = **in
+ }
+ if in.LimitBytes != nil {
+ in, out := &in.LimitBytes, &out.LimitBytes
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodPortForwardOptions is an autogenerated deepcopy function.
+func DeepCopy_api_PodPortForwardOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodPortForwardOptions)
+ out := out.(*PodPortForwardOptions)
+ *out = *in
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]int32, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodProxyOptions is an autogenerated deepcopy function.
+func DeepCopy_api_PodProxyOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodProxyOptions)
+ out := out.(*PodProxyOptions)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_PodSecurityContext is an autogenerated deepcopy function.
+func DeepCopy_api_PodSecurityContext(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodSecurityContext)
+ out := out.(*PodSecurityContext)
+ *out = *in
+ if in.SELinuxOptions != nil {
+ in, out := &in.SELinuxOptions, &out.SELinuxOptions
+ *out = new(SELinuxOptions)
+ **out = **in
+ }
+ if in.RunAsUser != nil {
+ in, out := &in.RunAsUser, &out.RunAsUser
+ *out = new(int64)
+ **out = **in
+ }
+ if in.RunAsNonRoot != nil {
+ in, out := &in.RunAsNonRoot, &out.RunAsNonRoot
+ *out = new(bool)
+ **out = **in
+ }
+ if in.SupplementalGroups != nil {
+ in, out := &in.SupplementalGroups, &out.SupplementalGroups
+ *out = make([]int64, len(*in))
+ copy(*out, *in)
+ }
+ if in.FSGroup != nil {
+ in, out := &in.FSGroup, &out.FSGroup
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodSignature is an autogenerated deepcopy function.
+func DeepCopy_api_PodSignature(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodSignature)
+ out := out.(*PodSignature)
+ *out = *in
+ if in.PodController != nil {
+ in, out := &in.PodController, &out.PodController
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.OwnerReference)
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodSpec is an autogenerated deepcopy function.
+func DeepCopy_api_PodSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodSpec)
+ out := out.(*PodSpec)
+ *out = *in
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]Volume, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_Volume(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.InitContainers != nil {
+ in, out := &in.InitContainers, &out.InitContainers
+ *out = make([]Container, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_Container(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Containers != nil {
+ in, out := &in.Containers, &out.Containers
+ *out = make([]Container, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_Container(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.TerminationGracePeriodSeconds != nil {
+ in, out := &in.TerminationGracePeriodSeconds, &out.TerminationGracePeriodSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.ActiveDeadlineSeconds != nil {
+ in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.NodeSelector != nil {
+ in, out := &in.NodeSelector, &out.NodeSelector
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ if in.AutomountServiceAccountToken != nil {
+ in, out := &in.AutomountServiceAccountToken, &out.AutomountServiceAccountToken
+ *out = new(bool)
+ **out = **in
+ }
+ if in.SecurityContext != nil {
+ in, out := &in.SecurityContext, &out.SecurityContext
+ *out = new(PodSecurityContext)
+ if err := DeepCopy_api_PodSecurityContext(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.ImagePullSecrets != nil {
+ in, out := &in.ImagePullSecrets, &out.ImagePullSecrets
+ *out = make([]LocalObjectReference, len(*in))
+ copy(*out, *in)
+ }
+ if in.Affinity != nil {
+ in, out := &in.Affinity, &out.Affinity
+ *out = new(Affinity)
+ if err := DeepCopy_api_Affinity(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Tolerations != nil {
+ in, out := &in.Tolerations, &out.Tolerations
+ *out = make([]Toleration, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_Toleration(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.HostAliases != nil {
+ in, out := &in.HostAliases, &out.HostAliases
+ *out = make([]HostAlias, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_HostAlias(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodStatus is an autogenerated deepcopy function.
+func DeepCopy_api_PodStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodStatus)
+ out := out.(*PodStatus)
+ *out = *in
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]PodCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_PodCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.StartTime != nil {
+ in, out := &in.StartTime, &out.StartTime
+ *out = new(v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ if in.InitContainerStatuses != nil {
+ in, out := &in.InitContainerStatuses, &out.InitContainerStatuses
+ *out = make([]ContainerStatus, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_ContainerStatus(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.ContainerStatuses != nil {
+ in, out := &in.ContainerStatuses, &out.ContainerStatuses
+ *out = make([]ContainerStatus, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_ContainerStatus(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodStatusResult is an autogenerated deepcopy function.
+func DeepCopy_api_PodStatusResult(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodStatusResult)
+ out := out.(*PodStatusResult)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_api_PodStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodTemplate is an autogenerated deepcopy function.
+func DeepCopy_api_PodTemplate(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodTemplate)
+ out := out.(*PodTemplate)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_api_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodTemplateList is an autogenerated deepcopy function.
+func DeepCopy_api_PodTemplateList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodTemplateList)
+ out := out.(*PodTemplateList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodTemplate, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_PodTemplate(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodTemplateSpec is an autogenerated deepcopy function.
+func DeepCopy_api_PodTemplateSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodTemplateSpec)
+ out := out.(*PodTemplateSpec)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_api_PodSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PortworxVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_PortworxVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PortworxVolumeSource)
+ out := out.(*PortworxVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_Preconditions is an autogenerated deepcopy function.
+func DeepCopy_api_Preconditions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Preconditions)
+ out := out.(*Preconditions)
+ *out = *in
+ if in.UID != nil {
+ in, out := &in.UID, &out.UID
+ *out = new(types.UID)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PreferAvoidPodsEntry is an autogenerated deepcopy function.
+func DeepCopy_api_PreferAvoidPodsEntry(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PreferAvoidPodsEntry)
+ out := out.(*PreferAvoidPodsEntry)
+ *out = *in
+ if err := DeepCopy_api_PodSignature(&in.PodSignature, &out.PodSignature, c); err != nil {
+ return err
+ }
+ out.EvictionTime = in.EvictionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_api_PreferredSchedulingTerm is an autogenerated deepcopy function.
+func DeepCopy_api_PreferredSchedulingTerm(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PreferredSchedulingTerm)
+ out := out.(*PreferredSchedulingTerm)
+ *out = *in
+ if err := DeepCopy_api_NodeSelectorTerm(&in.Preference, &out.Preference, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_Probe is an autogenerated deepcopy function.
+func DeepCopy_api_Probe(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Probe)
+ out := out.(*Probe)
+ *out = *in
+ if err := DeepCopy_api_Handler(&in.Handler, &out.Handler, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ProjectedVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_ProjectedVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ProjectedVolumeSource)
+ out := out.(*ProjectedVolumeSource)
+ *out = *in
+ if in.Sources != nil {
+ in, out := &in.Sources, &out.Sources
+ *out = make([]VolumeProjection, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_VolumeProjection(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.DefaultMode != nil {
+ in, out := &in.DefaultMode, &out.DefaultMode
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_QuobyteVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_QuobyteVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*QuobyteVolumeSource)
+ out := out.(*QuobyteVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_RBDVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_RBDVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RBDVolumeSource)
+ out := out.(*RBDVolumeSource)
+ *out = *in
+ if in.CephMonitors != nil {
+ in, out := &in.CephMonitors, &out.CephMonitors
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_RangeAllocation is an autogenerated deepcopy function.
+func DeepCopy_api_RangeAllocation(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RangeAllocation)
+ out := out.(*RangeAllocation)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Data != nil {
+ in, out := &in.Data, &out.Data
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ReplicationController is an autogenerated deepcopy function.
+func DeepCopy_api_ReplicationController(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicationController)
+ out := out.(*ReplicationController)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_api_ReplicationControllerSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_api_ReplicationControllerStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ReplicationControllerCondition is an autogenerated deepcopy function.
+func DeepCopy_api_ReplicationControllerCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicationControllerCondition)
+ out := out.(*ReplicationControllerCondition)
+ *out = *in
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_api_ReplicationControllerList is an autogenerated deepcopy function.
+func DeepCopy_api_ReplicationControllerList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicationControllerList)
+ out := out.(*ReplicationControllerList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ReplicationController, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_ReplicationController(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ReplicationControllerSpec is an autogenerated deepcopy function.
+func DeepCopy_api_ReplicationControllerSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicationControllerSpec)
+ out := out.(*ReplicationControllerSpec)
+ *out = *in
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ if in.Template != nil {
+ in, out := &in.Template, &out.Template
+ *out = new(PodTemplateSpec)
+ if err := DeepCopy_api_PodTemplateSpec(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ReplicationControllerStatus is an autogenerated deepcopy function.
+func DeepCopy_api_ReplicationControllerStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicationControllerStatus)
+ out := out.(*ReplicationControllerStatus)
+ *out = *in
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]ReplicationControllerCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_ReplicationControllerCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ResourceFieldSelector is an autogenerated deepcopy function.
+func DeepCopy_api_ResourceFieldSelector(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceFieldSelector)
+ out := out.(*ResourceFieldSelector)
+ *out = *in
+ out.Divisor = in.Divisor.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_api_ResourceQuota is an autogenerated deepcopy function.
+func DeepCopy_api_ResourceQuota(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceQuota)
+ out := out.(*ResourceQuota)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_api_ResourceQuotaSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_api_ResourceQuotaStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ResourceQuotaList is an autogenerated deepcopy function.
+func DeepCopy_api_ResourceQuotaList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceQuotaList)
+ out := out.(*ResourceQuotaList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ResourceQuota, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_ResourceQuota(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ResourceQuotaSpec is an autogenerated deepcopy function.
+func DeepCopy_api_ResourceQuotaSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceQuotaSpec)
+ out := out.(*ResourceQuotaSpec)
+ *out = *in
+ if in.Hard != nil {
+ in, out := &in.Hard, &out.Hard
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Scopes != nil {
+ in, out := &in.Scopes, &out.Scopes
+ *out = make([]ResourceQuotaScope, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ResourceQuotaStatus is an autogenerated deepcopy function.
+func DeepCopy_api_ResourceQuotaStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceQuotaStatus)
+ out := out.(*ResourceQuotaStatus)
+ *out = *in
+ if in.Hard != nil {
+ in, out := &in.Hard, &out.Hard
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Used != nil {
+ in, out := &in.Used, &out.Used
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ResourceRequirements is an autogenerated deepcopy function.
+func DeepCopy_api_ResourceRequirements(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceRequirements)
+ out := out.(*ResourceRequirements)
+ *out = *in
+ if in.Limits != nil {
+ in, out := &in.Limits, &out.Limits
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Requests != nil {
+ in, out := &in.Requests, &out.Requests
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_SELinuxOptions is an autogenerated deepcopy function.
+func DeepCopy_api_SELinuxOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SELinuxOptions)
+ out := out.(*SELinuxOptions)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_ScaleIOVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_ScaleIOVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ScaleIOVolumeSource)
+ out := out.(*ScaleIOVolumeSource)
+ *out = *in
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_Secret is an autogenerated deepcopy function.
+func DeepCopy_api_Secret(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Secret)
+ out := out.(*Secret)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Data != nil {
+ in, out := &in.Data, &out.Data
+ *out = make(map[string][]byte)
+ for key, val := range *in {
+ if newVal, err := c.DeepCopy(&val); err != nil {
+ return err
+ } else {
+ (*out)[key] = *newVal.(*[]byte)
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_SecretEnvSource is an autogenerated deepcopy function.
+func DeepCopy_api_SecretEnvSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SecretEnvSource)
+ out := out.(*SecretEnvSource)
+ *out = *in
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_SecretKeySelector is an autogenerated deepcopy function.
+func DeepCopy_api_SecretKeySelector(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SecretKeySelector)
+ out := out.(*SecretKeySelector)
+ *out = *in
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_SecretList is an autogenerated deepcopy function.
+func DeepCopy_api_SecretList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SecretList)
+ out := out.(*SecretList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Secret, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_Secret(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_SecretProjection is an autogenerated deepcopy function.
+func DeepCopy_api_SecretProjection(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SecretProjection)
+ out := out.(*SecretProjection)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]KeyToPath, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_KeyToPath(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_SecretVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_SecretVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SecretVolumeSource)
+ out := out.(*SecretVolumeSource)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]KeyToPath, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_KeyToPath(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.DefaultMode != nil {
+ in, out := &in.DefaultMode, &out.DefaultMode
+ *out = new(int32)
+ **out = **in
+ }
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_SecurityContext is an autogenerated deepcopy function.
+func DeepCopy_api_SecurityContext(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SecurityContext)
+ out := out.(*SecurityContext)
+ *out = *in
+ if in.Capabilities != nil {
+ in, out := &in.Capabilities, &out.Capabilities
+ *out = new(Capabilities)
+ if err := DeepCopy_api_Capabilities(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Privileged != nil {
+ in, out := &in.Privileged, &out.Privileged
+ *out = new(bool)
+ **out = **in
+ }
+ if in.SELinuxOptions != nil {
+ in, out := &in.SELinuxOptions, &out.SELinuxOptions
+ *out = new(SELinuxOptions)
+ **out = **in
+ }
+ if in.RunAsUser != nil {
+ in, out := &in.RunAsUser, &out.RunAsUser
+ *out = new(int64)
+ **out = **in
+ }
+ if in.RunAsNonRoot != nil {
+ in, out := &in.RunAsNonRoot, &out.RunAsNonRoot
+ *out = new(bool)
+ **out = **in
+ }
+ if in.ReadOnlyRootFilesystem != nil {
+ in, out := &in.ReadOnlyRootFilesystem, &out.ReadOnlyRootFilesystem
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_SerializedReference is an autogenerated deepcopy function.
+func DeepCopy_api_SerializedReference(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SerializedReference)
+ out := out.(*SerializedReference)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_Service is an autogenerated deepcopy function.
+func DeepCopy_api_Service(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Service)
+ out := out.(*Service)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_api_ServiceSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_api_ServiceStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ServiceAccount is an autogenerated deepcopy function.
+func DeepCopy_api_ServiceAccount(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServiceAccount)
+ out := out.(*ServiceAccount)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Secrets != nil {
+ in, out := &in.Secrets, &out.Secrets
+ *out = make([]ObjectReference, len(*in))
+ copy(*out, *in)
+ }
+ if in.ImagePullSecrets != nil {
+ in, out := &in.ImagePullSecrets, &out.ImagePullSecrets
+ *out = make([]LocalObjectReference, len(*in))
+ copy(*out, *in)
+ }
+ if in.AutomountServiceAccountToken != nil {
+ in, out := &in.AutomountServiceAccountToken, &out.AutomountServiceAccountToken
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ServiceAccountList is an autogenerated deepcopy function.
+func DeepCopy_api_ServiceAccountList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServiceAccountList)
+ out := out.(*ServiceAccountList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ServiceAccount, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_ServiceAccount(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ServiceList is an autogenerated deepcopy function.
+func DeepCopy_api_ServiceList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServiceList)
+ out := out.(*ServiceList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Service, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_Service(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ServicePort is an autogenerated deepcopy function.
+func DeepCopy_api_ServicePort(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServicePort)
+ out := out.(*ServicePort)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_ServiceProxyOptions is an autogenerated deepcopy function.
+func DeepCopy_api_ServiceProxyOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServiceProxyOptions)
+ out := out.(*ServiceProxyOptions)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_ServiceSpec is an autogenerated deepcopy function.
+func DeepCopy_api_ServiceSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServiceSpec)
+ out := out.(*ServiceSpec)
+ *out = *in
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]ServicePort, len(*in))
+ copy(*out, *in)
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ if in.ExternalIPs != nil {
+ in, out := &in.ExternalIPs, &out.ExternalIPs
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.LoadBalancerSourceRanges != nil {
+ in, out := &in.LoadBalancerSourceRanges, &out.LoadBalancerSourceRanges
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ServiceStatus is an autogenerated deepcopy function.
+func DeepCopy_api_ServiceStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServiceStatus)
+ out := out.(*ServiceStatus)
+ *out = *in
+ if err := DeepCopy_api_LoadBalancerStatus(&in.LoadBalancer, &out.LoadBalancer, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_StorageOSPersistentVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_StorageOSPersistentVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StorageOSPersistentVolumeSource)
+ out := out.(*StorageOSPersistentVolumeSource)
+ *out = *in
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(ObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_StorageOSVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_StorageOSVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StorageOSVolumeSource)
+ out := out.(*StorageOSVolumeSource)
+ *out = *in
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_Sysctl is an autogenerated deepcopy function.
+func DeepCopy_api_Sysctl(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Sysctl)
+ out := out.(*Sysctl)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_TCPSocketAction is an autogenerated deepcopy function.
+func DeepCopy_api_TCPSocketAction(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*TCPSocketAction)
+ out := out.(*TCPSocketAction)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_Taint is an autogenerated deepcopy function.
+func DeepCopy_api_Taint(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Taint)
+ out := out.(*Taint)
+ *out = *in
+ out.TimeAdded = in.TimeAdded.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_api_Toleration is an autogenerated deepcopy function.
+func DeepCopy_api_Toleration(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Toleration)
+ out := out.(*Toleration)
+ *out = *in
+ if in.TolerationSeconds != nil {
+ in, out := &in.TolerationSeconds, &out.TolerationSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_Volume is an autogenerated deepcopy function.
+func DeepCopy_api_Volume(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Volume)
+ out := out.(*Volume)
+ *out = *in
+ if err := DeepCopy_api_VolumeSource(&in.VolumeSource, &out.VolumeSource, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_VolumeMount is an autogenerated deepcopy function.
+func DeepCopy_api_VolumeMount(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*VolumeMount)
+ out := out.(*VolumeMount)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_VolumeProjection is an autogenerated deepcopy function.
+func DeepCopy_api_VolumeProjection(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*VolumeProjection)
+ out := out.(*VolumeProjection)
+ *out = *in
+ if in.Secret != nil {
+ in, out := &in.Secret, &out.Secret
+ *out = new(SecretProjection)
+ if err := DeepCopy_api_SecretProjection(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.DownwardAPI != nil {
+ in, out := &in.DownwardAPI, &out.DownwardAPI
+ *out = new(DownwardAPIProjection)
+ if err := DeepCopy_api_DownwardAPIProjection(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.ConfigMap != nil {
+ in, out := &in.ConfigMap, &out.ConfigMap
+ *out = new(ConfigMapProjection)
+ if err := DeepCopy_api_ConfigMapProjection(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_VolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_VolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*VolumeSource)
+ out := out.(*VolumeSource)
+ *out = *in
+ if in.HostPath != nil {
+ in, out := &in.HostPath, &out.HostPath
+ *out = new(HostPathVolumeSource)
+ **out = **in
+ }
+ if in.EmptyDir != nil {
+ in, out := &in.EmptyDir, &out.EmptyDir
+ *out = new(EmptyDirVolumeSource)
+ if err := DeepCopy_api_EmptyDirVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.GCEPersistentDisk != nil {
+ in, out := &in.GCEPersistentDisk, &out.GCEPersistentDisk
+ *out = new(GCEPersistentDiskVolumeSource)
+ **out = **in
+ }
+ if in.AWSElasticBlockStore != nil {
+ in, out := &in.AWSElasticBlockStore, &out.AWSElasticBlockStore
+ *out = new(AWSElasticBlockStoreVolumeSource)
+ **out = **in
+ }
+ if in.GitRepo != nil {
+ in, out := &in.GitRepo, &out.GitRepo
+ *out = new(GitRepoVolumeSource)
+ **out = **in
+ }
+ if in.Secret != nil {
+ in, out := &in.Secret, &out.Secret
+ *out = new(SecretVolumeSource)
+ if err := DeepCopy_api_SecretVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.NFS != nil {
+ in, out := &in.NFS, &out.NFS
+ *out = new(NFSVolumeSource)
+ **out = **in
+ }
+ if in.ISCSI != nil {
+ in, out := &in.ISCSI, &out.ISCSI
+ *out = new(ISCSIVolumeSource)
+ if err := DeepCopy_api_ISCSIVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Glusterfs != nil {
+ in, out := &in.Glusterfs, &out.Glusterfs
+ *out = new(GlusterfsVolumeSource)
+ **out = **in
+ }
+ if in.PersistentVolumeClaim != nil {
+ in, out := &in.PersistentVolumeClaim, &out.PersistentVolumeClaim
+ *out = new(PersistentVolumeClaimVolumeSource)
+ **out = **in
+ }
+ if in.RBD != nil {
+ in, out := &in.RBD, &out.RBD
+ *out = new(RBDVolumeSource)
+ if err := DeepCopy_api_RBDVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Quobyte != nil {
+ in, out := &in.Quobyte, &out.Quobyte
+ *out = new(QuobyteVolumeSource)
+ **out = **in
+ }
+ if in.FlexVolume != nil {
+ in, out := &in.FlexVolume, &out.FlexVolume
+ *out = new(FlexVolumeSource)
+ if err := DeepCopy_api_FlexVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Cinder != nil {
+ in, out := &in.Cinder, &out.Cinder
+ *out = new(CinderVolumeSource)
+ **out = **in
+ }
+ if in.CephFS != nil {
+ in, out := &in.CephFS, &out.CephFS
+ *out = new(CephFSVolumeSource)
+ if err := DeepCopy_api_CephFSVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Flocker != nil {
+ in, out := &in.Flocker, &out.Flocker
+ *out = new(FlockerVolumeSource)
+ **out = **in
+ }
+ if in.DownwardAPI != nil {
+ in, out := &in.DownwardAPI, &out.DownwardAPI
+ *out = new(DownwardAPIVolumeSource)
+ if err := DeepCopy_api_DownwardAPIVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.FC != nil {
+ in, out := &in.FC, &out.FC
+ *out = new(FCVolumeSource)
+ if err := DeepCopy_api_FCVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.AzureFile != nil {
+ in, out := &in.AzureFile, &out.AzureFile
+ *out = new(AzureFileVolumeSource)
+ **out = **in
+ }
+ if in.ConfigMap != nil {
+ in, out := &in.ConfigMap, &out.ConfigMap
+ *out = new(ConfigMapVolumeSource)
+ if err := DeepCopy_api_ConfigMapVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.VsphereVolume != nil {
+ in, out := &in.VsphereVolume, &out.VsphereVolume
+ *out = new(VsphereVirtualDiskVolumeSource)
+ **out = **in
+ }
+ if in.AzureDisk != nil {
+ in, out := &in.AzureDisk, &out.AzureDisk
+ *out = new(AzureDiskVolumeSource)
+ if err := DeepCopy_api_AzureDiskVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.PhotonPersistentDisk != nil {
+ in, out := &in.PhotonPersistentDisk, &out.PhotonPersistentDisk
+ *out = new(PhotonPersistentDiskVolumeSource)
+ **out = **in
+ }
+ if in.Projected != nil {
+ in, out := &in.Projected, &out.Projected
+ *out = new(ProjectedVolumeSource)
+ if err := DeepCopy_api_ProjectedVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.PortworxVolume != nil {
+ in, out := &in.PortworxVolume, &out.PortworxVolume
+ *out = new(PortworxVolumeSource)
+ **out = **in
+ }
+ if in.ScaleIO != nil {
+ in, out := &in.ScaleIO, &out.ScaleIO
+ *out = new(ScaleIOVolumeSource)
+ if err := DeepCopy_api_ScaleIOVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.StorageOS != nil {
+ in, out := &in.StorageOS, &out.StorageOS
+ *out = new(StorageOSVolumeSource)
+ if err := DeepCopy_api_StorageOSVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_VsphereVirtualDiskVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_VsphereVirtualDiskVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*VsphereVirtualDiskVolumeSource)
+ out := out.(*VsphereVirtualDiskVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_WeightedPodAffinityTerm is an autogenerated deepcopy function.
+func DeepCopy_api_WeightedPodAffinityTerm(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*WeightedPodAffinityTerm)
+ out := out.(*WeightedPodAffinityTerm)
+ *out = *in
+ if err := DeepCopy_api_PodAffinityTerm(&in.PodAffinityTerm, &out.PodAffinityTerm, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/admissionregistration/doc.go b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/doc.go
new file mode 100644
index 000000000..492dad7b5
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/doc.go
@@ -0,0 +1,22 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package admissionregistration is the internal version of the API.
+// AdmissionConfiguration and AdmissionPluginConfiguration are legacy static admission plugin configuration
+// InitializerConfiguration and ExternalAdmissionHookConfiguration is for the
+// new dynamic admission controller configuration.
+// +groupName=admissionregistration.k8s.io
+package admissionregistration
diff --git a/vendor/k8s.io/client-go/pkg/apis/admissionregistration/register.go b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/register.go
new file mode 100644
index 000000000..1fe291a8f
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/register.go
@@ -0,0 +1,53 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package admissionregistration
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+const GroupName = "admissionregistration.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns back a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns back a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+// Adds the list of known types to scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &InitializerConfiguration{},
+ &InitializerConfigurationList{},
+ &ExternalAdmissionHookConfiguration{},
+ &ExternalAdmissionHookConfigurationList{},
+ )
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/admissionregistration/types.go b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/types.go
new file mode 100644
index 000000000..27b720729
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/types.go
@@ -0,0 +1,216 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package admissionregistration
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+
+// InitializerConfiguration describes the configuration of initializers.
+type InitializerConfiguration struct {
+ metav1.TypeMeta
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
+ // +optional
+ metav1.ObjectMeta
+
+ // Initializers is a list of resources and their default initializers
+ // Order-sensitive.
+ // When merging multiple InitializerConfigurations, we sort the initializers
+ // from different InitializerConfigurations by the name of the
+ // InitializerConfigurations; the order of the initializers from the same
+ // InitializerConfiguration is preserved.
+ // +optional
+ Initializers []Initializer
+}
+
+// InitializerConfigurationList is a list of InitializerConfiguration.
+type InitializerConfigurationList struct {
+ metav1.TypeMeta
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta
+
+ // List of InitializerConfiguration.
+ Items []InitializerConfiguration
+}
+
+// Initializer describes the name and the failure policy of an initializer, and
+// what resources it applies to.
+type Initializer struct {
+ // Name is the identifier of the initializer. It will be added to the
+ // object that needs to be initialized.
+ // Name should be fully qualified, e.g., alwayspullimages.kubernetes.io, where
+ // "alwayspullimages" is the name of the webhook, and kubernetes.io is the name
+ // of the organization.
+ // Required
+ Name string
+
+ // Rules describes what resources/subresources the initializer cares about.
+ // The initializer cares about an operation if it matches _any_ Rule.
+ // Rule.Resources must not include subresources.
+ Rules []Rule
+
+ // FailurePolicy defines what happens if the responsible initializer controller
+ // fails to takes action. Allowed values are Ignore, or Fail. If "Ignore" is
+ // set, initializer is removed from the initializers list of an object if
+ // the timeout is reached; If "Fail" is set, admissionregistration returns timeout error
+ // if the timeout is reached.
+ FailurePolicy *FailurePolicyType
+}
+
+// Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended
+// to make sure that all the tuple expansions are valid.
+type Rule struct {
+ // APIGroups is the API groups the resources belong to. '*' is all groups.
+ // If '*' is present, the length of the slice must be one.
+ // Required.
+ APIGroups []string
+
+ // APIVersions is the API versions the resources belong to. '*' is all versions.
+ // If '*' is present, the length of the slice must be one.
+ // Required.
+ APIVersions []string
+
+ // Resources is a list of resources this rule applies to.
+ //
+ // For example:
+ // 'pods' means pods.
+ // 'pods/log' means the log subresource of pods.
+ // '*' means all resources, but not subresources.
+ // 'pods/*' means all subresources of pods.
+ // '*/scale' means all scale subresources.
+ // '*/*' means all resources and their subresources.
+ //
+ // If wildcard is present, the validation rule will ensure resources do not
+ // overlap with each other.
+ //
+ // Depending on the enclosing object, subresources might not be allowed.
+ // Required.
+ Resources []string
+}
+
+type FailurePolicyType string
+
+const (
+ // Ignore means the initilizer is removed from the initializers list of an
+ // object if the initializer is timed out.
+ Ignore FailurePolicyType = "Ignore"
+ // For 1.7, only "Ignore" is allowed. "Fail" will be allowed when the
+ // extensible admission feature is beta.
+ Fail FailurePolicyType = "Fail"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+
+// ExternalAdmissionHookConfiguration describes the configuration of initializers.
+type ExternalAdmissionHookConfiguration struct {
+ metav1.TypeMeta
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
+ // +optional
+ metav1.ObjectMeta
+ // ExternalAdmissionHooks is a list of external admission webhooks and the
+ // affected resources and operations.
+ // +optional
+ ExternalAdmissionHooks []ExternalAdmissionHook
+}
+
+// ExternalAdmissionHookConfigurationList is a list of ExternalAdmissionHookConfiguration.
+type ExternalAdmissionHookConfigurationList struct {
+ metav1.TypeMeta
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta
+ // List of ExternalAdmissionHookConfiguration.
+ Items []ExternalAdmissionHookConfiguration
+}
+
+// ExternalAdmissionHook describes an external admission webhook and the
+// resources and operations it applies to.
+type ExternalAdmissionHook struct {
+ // The name of the external admission webhook.
+ // Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where
+ // "imagepolicy" is the name of the webhook, and kubernetes.io is the name
+ // of the organization.
+ // Required.
+ Name string
+
+ // ClientConfig defines how to communicate with the hook.
+ // Required
+ ClientConfig AdmissionHookClientConfig
+
+ // Rules describes what operations on what resources/subresources the webhook cares about.
+ // The webhook cares about an operation if it matches _any_ Rule.
+ Rules []RuleWithOperations
+
+ // FailurePolicy defines how unrecognized errors from the admission endpoint are handled -
+ // allowed values are Ignore or Fail. Defaults to Ignore.
+ // +optional
+ FailurePolicy *FailurePolicyType
+}
+
+// RuleWithOperations is a tuple of Operations and Resources. It is recommended to make
+// sure that all the tuple expansions are valid.
+type RuleWithOperations struct {
+ // Operations is the operations the admission hook cares about - CREATE, UPDATE, or *
+ // for all operations.
+ // If '*' is present, the length of the slice must be one.
+ // Required.
+ Operations []OperationType
+ // Rule is embedded, it describes other criteria of the rule, like
+ // APIGroups, APIVersions, Resources, etc.
+ Rule
+}
+
+type OperationType string
+
+// The constants should be kept in sync with those defined in k8s.io/kubernetes/pkg/admission/interface.go.
+const (
+ OperationAll OperationType = "*"
+ Create OperationType = "CREATE"
+ Update OperationType = "UPDATE"
+ Delete OperationType = "DELETE"
+ Connect OperationType = "CONNECT"
+)
+
+// AdmissionHookClientConfig contains the information to make a TLS
+// connection with the webhook
+type AdmissionHookClientConfig struct {
+ // Service is a reference to the service for this webhook. If there is only
+ // one port open for the service, that port will be used. If there are multiple
+ // ports open, port 443 will be used if it is open, otherwise it is an error.
+ // Required
+ Service ServiceReference
+ // CABundle is a PEM encoded CA bundle which will be used to validate webhook's server certificate.
+ // Required
+ CABundle []byte
+}
+
+// ServiceReference holds a reference to Service.legacy.k8s.io
+type ServiceReference struct {
+ // Namespace is the namespace of the service
+ // Required
+ Namespace string
+ // Name is the name of the service
+ // Required
+ Name string
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/defaults.go b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/defaults.go
new file mode 100644
index 000000000..5aed8f1d7
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/defaults.go
@@ -0,0 +1,39 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
+
+func SetDefaults_Initializer(obj *Initializer) {
+ if obj.FailurePolicy == nil {
+ policy := Ignore
+ obj.FailurePolicy = &policy
+ }
+}
+
+func SetDefaults_ExternalAdmissionHook(obj *ExternalAdmissionHook) {
+ if obj.FailurePolicy == nil {
+ policy := Ignore
+ obj.FailurePolicy = &policy
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/doc.go b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/doc.go
new file mode 100644
index 000000000..a848f3e92
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/doc.go
@@ -0,0 +1,22 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package v1alpha1 is the v1alpha1 version of the API.
+// AdmissionConfiguration and AdmissionPluginConfiguration are legacy static admission plugin configuration
+// InitializerConfiguration and ExternalAdmissionHookConfiguration is for the
+// new dynamic admission controller configuration.
+// +groupName=admissionregistration.k8s.io
+package v1alpha1
diff --git a/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/generated.pb.go
new file mode 100644
index 000000000..58abc1d2f
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/generated.pb.go
@@ -0,0 +1,2228 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1alpha1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/generated.proto
+
+ It has these top-level messages:
+ AdmissionHookClientConfig
+ ExternalAdmissionHook
+ ExternalAdmissionHookConfiguration
+ ExternalAdmissionHookConfigurationList
+ Initializer
+ InitializerConfiguration
+ InitializerConfigurationList
+ Rule
+ RuleWithOperations
+ ServiceReference
+*/
+package v1alpha1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *AdmissionHookClientConfig) Reset() { *m = AdmissionHookClientConfig{} }
+func (*AdmissionHookClientConfig) ProtoMessage() {}
+func (*AdmissionHookClientConfig) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{0}
+}
+
+func (m *ExternalAdmissionHook) Reset() { *m = ExternalAdmissionHook{} }
+func (*ExternalAdmissionHook) ProtoMessage() {}
+func (*ExternalAdmissionHook) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *ExternalAdmissionHookConfiguration) Reset() { *m = ExternalAdmissionHookConfiguration{} }
+func (*ExternalAdmissionHookConfiguration) ProtoMessage() {}
+func (*ExternalAdmissionHookConfiguration) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{2}
+}
+
+func (m *ExternalAdmissionHookConfigurationList) Reset() {
+ *m = ExternalAdmissionHookConfigurationList{}
+}
+func (*ExternalAdmissionHookConfigurationList) ProtoMessage() {}
+func (*ExternalAdmissionHookConfigurationList) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{3}
+}
+
+func (m *Initializer) Reset() { *m = Initializer{} }
+func (*Initializer) ProtoMessage() {}
+func (*Initializer) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
+
+func (m *InitializerConfiguration) Reset() { *m = InitializerConfiguration{} }
+func (*InitializerConfiguration) ProtoMessage() {}
+func (*InitializerConfiguration) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{5}
+}
+
+func (m *InitializerConfigurationList) Reset() { *m = InitializerConfigurationList{} }
+func (*InitializerConfigurationList) ProtoMessage() {}
+func (*InitializerConfigurationList) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{6}
+}
+
+func (m *Rule) Reset() { *m = Rule{} }
+func (*Rule) ProtoMessage() {}
+func (*Rule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
+
+func (m *RuleWithOperations) Reset() { *m = RuleWithOperations{} }
+func (*RuleWithOperations) ProtoMessage() {}
+func (*RuleWithOperations) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
+
+func (m *ServiceReference) Reset() { *m = ServiceReference{} }
+func (*ServiceReference) ProtoMessage() {}
+func (*ServiceReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
+
+func init() {
+ proto.RegisterType((*AdmissionHookClientConfig)(nil), "k8s.io.client-go.pkg.apis.admissionregistration.v1alpha1.AdmissionHookClientConfig")
+ proto.RegisterType((*ExternalAdmissionHook)(nil), "k8s.io.client-go.pkg.apis.admissionregistration.v1alpha1.ExternalAdmissionHook")
+ proto.RegisterType((*ExternalAdmissionHookConfiguration)(nil), "k8s.io.client-go.pkg.apis.admissionregistration.v1alpha1.ExternalAdmissionHookConfiguration")
+ proto.RegisterType((*ExternalAdmissionHookConfigurationList)(nil), "k8s.io.client-go.pkg.apis.admissionregistration.v1alpha1.ExternalAdmissionHookConfigurationList")
+ proto.RegisterType((*Initializer)(nil), "k8s.io.client-go.pkg.apis.admissionregistration.v1alpha1.Initializer")
+ proto.RegisterType((*InitializerConfiguration)(nil), "k8s.io.client-go.pkg.apis.admissionregistration.v1alpha1.InitializerConfiguration")
+ proto.RegisterType((*InitializerConfigurationList)(nil), "k8s.io.client-go.pkg.apis.admissionregistration.v1alpha1.InitializerConfigurationList")
+ proto.RegisterType((*Rule)(nil), "k8s.io.client-go.pkg.apis.admissionregistration.v1alpha1.Rule")
+ proto.RegisterType((*RuleWithOperations)(nil), "k8s.io.client-go.pkg.apis.admissionregistration.v1alpha1.RuleWithOperations")
+ proto.RegisterType((*ServiceReference)(nil), "k8s.io.client-go.pkg.apis.admissionregistration.v1alpha1.ServiceReference")
+}
+func (m *AdmissionHookClientConfig) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *AdmissionHookClientConfig) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Service.Size()))
+ n1, err := m.Service.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ if m.CABundle != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.CABundle)))
+ i += copy(dAtA[i:], m.CABundle)
+ }
+ return i, nil
+}
+
+func (m *ExternalAdmissionHook) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExternalAdmissionHook) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ClientConfig.Size()))
+ n2, err := m.ClientConfig.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ if len(m.Rules) > 0 {
+ for _, msg := range m.Rules {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.FailurePolicy != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.FailurePolicy)))
+ i += copy(dAtA[i:], *m.FailurePolicy)
+ }
+ return i, nil
+}
+
+func (m *ExternalAdmissionHookConfiguration) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExternalAdmissionHookConfiguration) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n3, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ if len(m.ExternalAdmissionHooks) > 0 {
+ for _, msg := range m.ExternalAdmissionHooks {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ExternalAdmissionHookConfigurationList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExternalAdmissionHookConfigurationList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n4, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *Initializer) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Initializer) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ if len(m.Rules) > 0 {
+ for _, msg := range m.Rules {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.FailurePolicy != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.FailurePolicy)))
+ i += copy(dAtA[i:], *m.FailurePolicy)
+ }
+ return i, nil
+}
+
+func (m *InitializerConfiguration) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *InitializerConfiguration) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n5, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ if len(m.Initializers) > 0 {
+ for _, msg := range m.Initializers {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *InitializerConfigurationList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *InitializerConfigurationList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n6, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *Rule) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Rule) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.APIGroups) > 0 {
+ for _, s := range m.APIGroups {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.APIVersions) > 0 {
+ for _, s := range m.APIVersions {
+ dAtA[i] = 0x12
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Resources) > 0 {
+ for _, s := range m.Resources {
+ dAtA[i] = 0x1a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *RuleWithOperations) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RuleWithOperations) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Operations) > 0 {
+ for _, s := range m.Operations {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Rule.Size()))
+ n7, err := m.Rule.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ return i, nil
+}
+
+func (m *ServiceReference) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ServiceReference) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
+ i += copy(dAtA[i:], m.Namespace)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *AdmissionHookClientConfig) Size() (n int) {
+ var l int
+ _ = l
+ l = m.Service.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.CABundle != nil {
+ l = len(m.CABundle)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *ExternalAdmissionHook) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.ClientConfig.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Rules) > 0 {
+ for _, e := range m.Rules {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.FailurePolicy != nil {
+ l = len(*m.FailurePolicy)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *ExternalAdmissionHookConfiguration) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.ExternalAdmissionHooks) > 0 {
+ for _, e := range m.ExternalAdmissionHooks {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ExternalAdmissionHookConfigurationList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *Initializer) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Rules) > 0 {
+ for _, e := range m.Rules {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.FailurePolicy != nil {
+ l = len(*m.FailurePolicy)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *InitializerConfiguration) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Initializers) > 0 {
+ for _, e := range m.Initializers {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *InitializerConfigurationList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *Rule) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.APIGroups) > 0 {
+ for _, s := range m.APIGroups {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.APIVersions) > 0 {
+ for _, s := range m.APIVersions {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Resources) > 0 {
+ for _, s := range m.Resources {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *RuleWithOperations) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Operations) > 0 {
+ for _, s := range m.Operations {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = m.Rule.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ServiceReference) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Namespace)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *AdmissionHookClientConfig) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&AdmissionHookClientConfig{`,
+ `Service:` + strings.Replace(strings.Replace(this.Service.String(), "ServiceReference", "ServiceReference", 1), `&`, ``, 1) + `,`,
+ `CABundle:` + valueToStringGenerated(this.CABundle) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ExternalAdmissionHook) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ExternalAdmissionHook{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `ClientConfig:` + strings.Replace(strings.Replace(this.ClientConfig.String(), "AdmissionHookClientConfig", "AdmissionHookClientConfig", 1), `&`, ``, 1) + `,`,
+ `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "RuleWithOperations", "RuleWithOperations", 1), `&`, ``, 1) + `,`,
+ `FailurePolicy:` + valueToStringGenerated(this.FailurePolicy) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ExternalAdmissionHookConfiguration) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ExternalAdmissionHookConfiguration{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `ExternalAdmissionHooks:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ExternalAdmissionHooks), "ExternalAdmissionHook", "ExternalAdmissionHook", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ExternalAdmissionHookConfigurationList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ExternalAdmissionHookConfigurationList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ExternalAdmissionHookConfiguration", "ExternalAdmissionHookConfiguration", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Initializer) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Initializer{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "Rule", "Rule", 1), `&`, ``, 1) + `,`,
+ `FailurePolicy:` + valueToStringGenerated(this.FailurePolicy) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *InitializerConfiguration) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&InitializerConfiguration{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Initializers:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Initializers), "Initializer", "Initializer", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *InitializerConfigurationList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&InitializerConfigurationList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "InitializerConfiguration", "InitializerConfiguration", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Rule) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Rule{`,
+ `APIGroups:` + fmt.Sprintf("%v", this.APIGroups) + `,`,
+ `APIVersions:` + fmt.Sprintf("%v", this.APIVersions) + `,`,
+ `Resources:` + fmt.Sprintf("%v", this.Resources) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RuleWithOperations) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RuleWithOperations{`,
+ `Operations:` + fmt.Sprintf("%v", this.Operations) + `,`,
+ `Rule:` + strings.Replace(strings.Replace(this.Rule.String(), "Rule", "Rule", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ServiceReference) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ServiceReference{`,
+ `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *AdmissionHookClientConfig) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: AdmissionHookClientConfig: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: AdmissionHookClientConfig: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Service.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CABundle", wireType)
+ }
+ var byteLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ byteLen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if byteLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + byteLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.CABundle = append(m.CABundle[:0], dAtA[iNdEx:postIndex]...)
+ if m.CABundle == nil {
+ m.CABundle = []byte{}
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExternalAdmissionHook) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExternalAdmissionHook: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExternalAdmissionHook: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ClientConfig", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ClientConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Rules = append(m.Rules, RuleWithOperations{})
+ if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FailurePolicy", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := FailurePolicyType(dAtA[iNdEx:postIndex])
+ m.FailurePolicy = &s
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExternalAdmissionHookConfiguration) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExternalAdmissionHookConfiguration: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExternalAdmissionHookConfiguration: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ExternalAdmissionHooks", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ExternalAdmissionHooks = append(m.ExternalAdmissionHooks, ExternalAdmissionHook{})
+ if err := m.ExternalAdmissionHooks[len(m.ExternalAdmissionHooks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExternalAdmissionHookConfigurationList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExternalAdmissionHookConfigurationList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExternalAdmissionHookConfigurationList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ExternalAdmissionHookConfiguration{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Initializer) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Initializer: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Initializer: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Rules = append(m.Rules, Rule{})
+ if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FailurePolicy", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := FailurePolicyType(dAtA[iNdEx:postIndex])
+ m.FailurePolicy = &s
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *InitializerConfiguration) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: InitializerConfiguration: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: InitializerConfiguration: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Initializers", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Initializers = append(m.Initializers, Initializer{})
+ if err := m.Initializers[len(m.Initializers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *InitializerConfigurationList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: InitializerConfigurationList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: InitializerConfigurationList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, InitializerConfiguration{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Rule) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Rule: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Rule: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIGroups", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIGroups = append(m.APIGroups, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIVersions", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIVersions = append(m.APIVersions, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Resources = append(m.Resources, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RuleWithOperations) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RuleWithOperations: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RuleWithOperations: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Operations", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Operations = append(m.Operations, OperationType(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Rule.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ServiceReference) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ServiceReference: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ServiceReference: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Namespace = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 877 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcf, 0x6f, 0x1b, 0x45,
+ 0x14, 0xce, 0xd8, 0x8e, 0x6a, 0x8f, 0x6d, 0xb5, 0x1d, 0x41, 0x65, 0x22, 0xb4, 0x6b, 0xed, 0xa1,
+ 0xb2, 0x84, 0xd8, 0x25, 0x01, 0x21, 0x38, 0x55, 0xd9, 0x88, 0x82, 0x45, 0x7f, 0x44, 0xd3, 0x0a,
+ 0x24, 0x04, 0x12, 0x93, 0xf5, 0x8b, 0x3d, 0x78, 0x7f, 0x69, 0x66, 0xd6, 0x6a, 0x38, 0x55, 0x5c,
+ 0x41, 0x08, 0x89, 0x7f, 0x82, 0x2b, 0x37, 0x2e, 0xdc, 0x73, 0xec, 0xb1, 0x27, 0x8b, 0x6c, 0xff,
+ 0x07, 0x0e, 0xbd, 0x80, 0xf6, 0x97, 0x77, 0x5d, 0xdb, 0x6a, 0x54, 0x57, 0xbd, 0x65, 0xde, 0xdb,
+ 0xf7, 0xbd, 0xef, 0xfb, 0xf2, 0xde, 0x8c, 0xf1, 0x70, 0xfa, 0x89, 0x34, 0x79, 0x60, 0x4d, 0xa3,
+ 0x13, 0x10, 0x3e, 0x28, 0x90, 0x56, 0x38, 0x1d, 0x5b, 0x2c, 0xe4, 0xd2, 0x62, 0x23, 0x8f, 0x4b,
+ 0xc9, 0x03, 0x5f, 0xc0, 0x98, 0x4b, 0x25, 0x98, 0xe2, 0x81, 0x6f, 0xcd, 0xf6, 0x99, 0x1b, 0x4e,
+ 0xd8, 0xbe, 0x35, 0x06, 0x1f, 0x04, 0x53, 0x30, 0x32, 0x43, 0x11, 0xa8, 0x80, 0x7c, 0x9a, 0x41,
+ 0x99, 0x25, 0x94, 0x19, 0x4e, 0xc7, 0x66, 0x02, 0x65, 0xae, 0x85, 0x32, 0x0b, 0xa8, 0xbd, 0xf7,
+ 0xc7, 0x5c, 0x4d, 0xa2, 0x13, 0xd3, 0x09, 0x3c, 0x6b, 0x1c, 0x8c, 0x03, 0x2b, 0x45, 0x3c, 0x89,
+ 0x4e, 0xd3, 0x53, 0x7a, 0x48, 0xff, 0xca, 0x3a, 0xed, 0x7d, 0x94, 0x93, 0x66, 0x21, 0xf7, 0x98,
+ 0x33, 0xe1, 0x3e, 0x88, 0xb3, 0x92, 0xb6, 0x07, 0x8a, 0x59, 0xb3, 0x15, 0x7e, 0x7b, 0xd6, 0xa6,
+ 0x2a, 0x11, 0xf9, 0x8a, 0x7b, 0xb0, 0x52, 0xf0, 0xf1, 0xcb, 0x0a, 0xa4, 0x33, 0x01, 0x8f, 0xad,
+ 0xd4, 0x7d, 0xb8, 0xa9, 0x2e, 0x52, 0xdc, 0xb5, 0xb8, 0xaf, 0xa4, 0x12, 0x2f, 0x16, 0x19, 0x7f,
+ 0x23, 0xfc, 0xce, 0x61, 0xe1, 0xd2, 0x17, 0x41, 0x30, 0x3d, 0x72, 0x39, 0xf8, 0xea, 0x28, 0xf0,
+ 0x4f, 0xf9, 0x98, 0xcc, 0xf0, 0x15, 0x09, 0x62, 0xc6, 0x1d, 0xe8, 0xa1, 0x3e, 0x1a, 0xb4, 0x0f,
+ 0xbe, 0x34, 0x5f, 0xd9, 0x6d, 0xf3, 0x41, 0x86, 0x44, 0xe1, 0x14, 0x04, 0xf8, 0x0e, 0xd8, 0x57,
+ 0xcf, 0xe7, 0xfa, 0x4e, 0x3c, 0xd7, 0xaf, 0x14, 0x99, 0xa2, 0x19, 0x19, 0xe0, 0xa6, 0xc3, 0xec,
+ 0xc8, 0x1f, 0xb9, 0xd0, 0xab, 0xf5, 0xd1, 0xa0, 0x63, 0x77, 0xe2, 0xb9, 0xde, 0x3c, 0x3a, 0xcc,
+ 0x62, 0x74, 0x91, 0x35, 0x7e, 0xa9, 0xe3, 0xb7, 0x3f, 0x7b, 0xa4, 0x40, 0xf8, 0xcc, 0x5d, 0xd2,
+ 0x41, 0xfa, 0xb8, 0xe1, 0x33, 0x2f, 0x23, 0xde, 0xb2, 0x3b, 0x79, 0xaf, 0xc6, 0x3d, 0xe6, 0x01,
+ 0x4d, 0x33, 0xe4, 0x57, 0x84, 0x3b, 0x4e, 0x45, 0x6e, 0xda, 0xaa, 0x7d, 0xf0, 0x70, 0x0b, 0x8d,
+ 0x1b, 0xad, 0xb4, 0xdf, 0xca, 0x09, 0x74, 0xaa, 0x51, 0xba, 0xd4, 0x9f, 0x08, 0xbc, 0x2b, 0x22,
+ 0x17, 0x64, 0xaf, 0xde, 0xaf, 0x0f, 0xda, 0x07, 0x77, 0xb7, 0x20, 0x42, 0x23, 0x17, 0xbe, 0xe6,
+ 0x6a, 0x72, 0x3f, 0x84, 0x2c, 0x25, 0xed, 0x6e, 0xce, 0x60, 0x37, 0xc9, 0x49, 0x9a, 0xb5, 0x22,
+ 0x77, 0x70, 0xf7, 0x94, 0x71, 0x37, 0x12, 0x70, 0x1c, 0xb8, 0xdc, 0x39, 0xeb, 0x35, 0x52, 0xbf,
+ 0x6e, 0xc6, 0x73, 0xbd, 0x7b, 0xbb, 0x9a, 0x78, 0x3e, 0xd7, 0xaf, 0x2f, 0x05, 0x1e, 0x9e, 0x85,
+ 0x40, 0x97, 0x8b, 0x8d, 0x3f, 0x6b, 0xd8, 0x58, 0xfb, 0xef, 0xc8, 0x14, 0x46, 0x19, 0x17, 0xf2,
+ 0x3d, 0x6e, 0x26, 0xeb, 0x32, 0x62, 0x8a, 0xe5, 0x83, 0xf5, 0x41, 0xa1, 0xb5, 0x3a, 0xbd, 0xa5,
+ 0xda, 0xe4, 0x6b, 0x73, 0xb6, 0x6f, 0xde, 0x3f, 0xf9, 0x01, 0x1c, 0x75, 0x17, 0x14, 0xb3, 0x49,
+ 0x2e, 0x07, 0x97, 0x31, 0xba, 0x40, 0x25, 0x7f, 0x20, 0x7c, 0x03, 0xd6, 0x11, 0x91, 0xbd, 0x5a,
+ 0x6a, 0xee, 0xf1, 0x16, 0xe6, 0xae, 0x55, 0x68, 0x6b, 0x39, 0xa1, 0x1b, 0x6b, 0xd3, 0x92, 0x6e,
+ 0xe0, 0x63, 0xfc, 0x5c, 0xc3, 0x37, 0x5f, 0xee, 0xd9, 0x1d, 0x2e, 0x15, 0xf9, 0x76, 0xc5, 0x37,
+ 0xf3, 0x72, 0xbe, 0x25, 0xd5, 0xa9, 0x6b, 0xd7, 0x72, 0x92, 0xcd, 0x22, 0x52, 0xf1, 0xec, 0x27,
+ 0x84, 0x77, 0xb9, 0x02, 0xaf, 0xb0, 0xe8, 0xbb, 0xd7, 0x6d, 0xd1, 0x92, 0xa0, 0x72, 0x1e, 0x87,
+ 0x49, 0x4f, 0x9a, 0xb5, 0x36, 0x9e, 0x21, 0xdc, 0x1e, 0xfa, 0x5c, 0x71, 0xe6, 0xf2, 0x1f, 0x41,
+ 0x5c, 0x62, 0x8d, 0x47, 0xc5, 0xd6, 0x64, 0xac, 0x6f, 0x6d, 0xb9, 0x35, 0x97, 0xdd, 0x93, 0xfa,
+ 0x36, 0x7b, 0xf2, 0x1f, 0xc2, 0xbd, 0x8a, 0xca, 0x37, 0xbd, 0x1d, 0x8f, 0x11, 0xee, 0xf0, 0xb2,
+ 0x7d, 0x61, 0xdd, 0xed, 0x2d, 0xac, 0xab, 0xa8, 0x29, 0xef, 0xba, 0x4a, 0x50, 0xd2, 0xa5, 0x8e,
+ 0xc6, 0xbf, 0x08, 0xbf, 0xbb, 0xc9, 0x81, 0x37, 0x30, 0xeb, 0x8f, 0x96, 0x47, 0xfd, 0xc1, 0xeb,
+ 0x51, 0x7e, 0x99, 0x01, 0xff, 0x1d, 0xe1, 0x46, 0x32, 0x59, 0xe4, 0x3d, 0xdc, 0x62, 0x21, 0xff,
+ 0x5c, 0x04, 0x51, 0x28, 0x7b, 0xa8, 0x5f, 0x1f, 0xb4, 0xec, 0x6e, 0x3c, 0xd7, 0x5b, 0x87, 0xc7,
+ 0xc3, 0x2c, 0x48, 0xcb, 0x3c, 0xd9, 0xc7, 0x6d, 0x16, 0xf2, 0xaf, 0x40, 0x24, 0x3c, 0x32, 0xd6,
+ 0x2d, 0xfb, 0x6a, 0x3c, 0xd7, 0xdb, 0x87, 0xc7, 0xc3, 0x22, 0x4c, 0xab, 0xdf, 0x24, 0xf8, 0x02,
+ 0x64, 0x10, 0x09, 0x27, 0x7f, 0x51, 0x72, 0x7c, 0x5a, 0x04, 0x69, 0x99, 0x37, 0xfe, 0x42, 0x98,
+ 0xac, 0xbe, 0x19, 0xe4, 0x16, 0xc6, 0xc1, 0xe2, 0x94, 0x93, 0xd4, 0xd3, 0xb1, 0x5a, 0x44, 0x9f,
+ 0xcf, 0xf5, 0xee, 0xe2, 0x94, 0xce, 0x7a, 0xa5, 0x84, 0x30, 0xdc, 0x48, 0xf6, 0x27, 0x7f, 0x5a,
+ 0xb7, 0xde, 0xcd, 0xc5, 0xfe, 0x27, 0x27, 0x9a, 0x42, 0x1b, 0x80, 0xaf, 0xbd, 0xf8, 0xd3, 0x82,
+ 0x58, 0xb8, 0x95, 0xdc, 0x0d, 0x32, 0x64, 0x4e, 0x71, 0x75, 0x5c, 0xcf, 0x4b, 0x5b, 0xf7, 0x8a,
+ 0x04, 0x2d, 0xbf, 0x59, 0x5c, 0x33, 0xb5, 0x4d, 0xd7, 0x8c, 0x6d, 0x9e, 0x5f, 0x68, 0x3b, 0x4f,
+ 0x2e, 0xb4, 0x9d, 0xa7, 0x17, 0xda, 0xce, 0xe3, 0x58, 0x43, 0xe7, 0xb1, 0x86, 0x9e, 0xc4, 0x1a,
+ 0x7a, 0x1a, 0x6b, 0xe8, 0x9f, 0x58, 0x43, 0xbf, 0x3d, 0xd3, 0x76, 0xbe, 0x69, 0x16, 0x7c, 0xff,
+ 0x0f, 0x00, 0x00, 0xff, 0xff, 0x2c, 0x2c, 0x38, 0x31, 0xe3, 0x0a, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/generated.proto
new file mode 100644
index 000000000..44ae98f6f
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/generated.proto
@@ -0,0 +1,203 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.client_go.pkg.apis.admissionregistration.v1alpha1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1alpha1";
+
+// AdmissionHookClientConfig contains the information to make a TLS
+// connection with the webhook
+message AdmissionHookClientConfig {
+ // Service is a reference to the service for this webhook. If there is only
+ // one port open for the service, that port will be used. If there are multiple
+ // ports open, port 443 will be used if it is open, otherwise it is an error.
+ // Required
+ optional ServiceReference service = 1;
+
+ // CABundle is a PEM encoded CA bundle which will be used to validate webhook's server certificate.
+ // Required
+ optional bytes caBundle = 2;
+}
+
+// ExternalAdmissionHook describes an external admission webhook and the
+// resources and operations it applies to.
+message ExternalAdmissionHook {
+ // The name of the external admission webhook.
+ // Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where
+ // "imagepolicy" is the name of the webhook, and kubernetes.io is the name
+ // of the organization.
+ // Required.
+ optional string name = 1;
+
+ // ClientConfig defines how to communicate with the hook.
+ // Required
+ optional AdmissionHookClientConfig clientConfig = 2;
+
+ // Rules describes what operations on what resources/subresources the webhook cares about.
+ // The webhook cares about an operation if it matches _any_ Rule.
+ repeated RuleWithOperations rules = 3;
+
+ // FailurePolicy defines how unrecognized errors from the admission endpoint are handled -
+ // allowed values are Ignore or Fail. Defaults to Ignore.
+ // +optional
+ optional string failurePolicy = 4;
+}
+
+// ExternalAdmissionHookConfiguration describes the configuration of initializers.
+message ExternalAdmissionHookConfiguration {
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // ExternalAdmissionHooks is a list of external admission webhooks and the
+ // affected resources and operations.
+ // +optional
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ repeated ExternalAdmissionHook externalAdmissionHooks = 2;
+}
+
+// ExternalAdmissionHookConfigurationList is a list of ExternalAdmissionHookConfiguration.
+message ExternalAdmissionHookConfigurationList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of ExternalAdmissionHookConfiguration.
+ repeated ExternalAdmissionHookConfiguration items = 2;
+}
+
+// Initializer describes the name and the failure policy of an initializer, and
+// what resources it applies to.
+message Initializer {
+ // Name is the identifier of the initializer. It will be added to the
+ // object that needs to be initialized.
+ // Name should be fully qualified, e.g., alwayspullimages.kubernetes.io, where
+ // "alwayspullimages" is the name of the webhook, and kubernetes.io is the name
+ // of the organization.
+ // Required
+ optional string name = 1;
+
+ // Rules describes what resources/subresources the initializer cares about.
+ // The initializer cares about an operation if it matches _any_ Rule.
+ // Rule.Resources must not include subresources.
+ repeated Rule rules = 2;
+
+ // FailurePolicy defines what happens if the responsible initializer controller
+ // fails to takes action. Allowed values are Ignore, or Fail. If "Ignore" is
+ // set, initializer is removed from the initializers list of an object if
+ // the timeout is reached; If "Fail" is set, admissionregistration returns timeout error
+ // if the timeout is reached.
+ optional string failurePolicy = 3;
+}
+
+// InitializerConfiguration describes the configuration of initializers.
+message InitializerConfiguration {
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Initializers is a list of resources and their default initializers
+ // Order-sensitive.
+ // When merging multiple InitializerConfigurations, we sort the initializers
+ // from different InitializerConfigurations by the name of the
+ // InitializerConfigurations; the order of the initializers from the same
+ // InitializerConfiguration is preserved.
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ // +optional
+ repeated Initializer initializers = 2;
+}
+
+// InitializerConfigurationList is a list of InitializerConfiguration.
+message InitializerConfigurationList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of InitializerConfiguration.
+ repeated InitializerConfiguration items = 2;
+}
+
+// Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended
+// to make sure that all the tuple expansions are valid.
+message Rule {
+ // APIGroups is the API groups the resources belong to. '*' is all groups.
+ // If '*' is present, the length of the slice must be one.
+ // Required.
+ repeated string apiGroups = 1;
+
+ // APIVersions is the API versions the resources belong to. '*' is all versions.
+ // If '*' is present, the length of the slice must be one.
+ // Required.
+ repeated string apiVersions = 2;
+
+ // Resources is a list of resources this rule applies to.
+ //
+ // For example:
+ // 'pods' means pods.
+ // 'pods/log' means the log subresource of pods.
+ // '*' means all resources, but not subresources.
+ // 'pods/*' means all subresources of pods.
+ // '*/scale' means all scale subresources.
+ // '*/*' means all resources and their subresources.
+ //
+ // If wildcard is present, the validation rule will ensure resources do not
+ // overlap with each other.
+ //
+ // Depending on the enclosing object, subresources might not be allowed.
+ // Required.
+ repeated string resources = 3;
+}
+
+// RuleWithOperations is a tuple of Operations and Resources. It is recommended to make
+// sure that all the tuple expansions are valid.
+message RuleWithOperations {
+ // Operations is the operations the admission hook cares about - CREATE, UPDATE, or *
+ // for all operations.
+ // If '*' is present, the length of the slice must be one.
+ // Required.
+ repeated string operations = 1;
+
+ // Rule is embedded, it describes other criteria of the rule, like
+ // APIGroups, APIVersions, Resources, etc.
+ optional Rule rule = 2;
+}
+
+// ServiceReference holds a reference to Service.legacy.k8s.io
+message ServiceReference {
+ // Namespace is the namespace of the service
+ // Required
+ optional string namespace = 1;
+
+ // Name is the name of the service
+ // Required
+ optional string name = 2;
+}
+
diff --git a/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/register.go b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/register.go
new file mode 100644
index 000000000..10fa4a161
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/register.go
@@ -0,0 +1,60 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+const GroupName = "admissionregistration.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs)
+}
+
+// Adds the list of known types to scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &InitializerConfiguration{},
+ &InitializerConfigurationList{},
+ &ExternalAdmissionHookConfiguration{},
+ &ExternalAdmissionHookConfigurationList{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/types.generated.go
new file mode 100644
index 000000000..8a6563730
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/types.generated.go
@@ -0,0 +1,4232 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1alpha1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ pkg2_types "k8s.io/apimachinery/pkg/types"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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 pkg1_v1.TypeMeta
+ var v1 pkg2_types.UID
+ var v2 time.Time
+ _, _, _ = v0, v1, v2
+ }
+}
+
+func (x *InitializerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Initializers) != 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Initializers == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceInitializer(([]Initializer)(x.Initializers), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("initializers"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Initializers == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceInitializer(([]Initializer)(x.Initializers), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *InitializerConfiguration) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *InitializerConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "initializers":
+ if r.TryDecodeAsNil() {
+ x.Initializers = nil
+ } else {
+ yyv10 := &x.Initializers
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSliceInitializer((*[]Initializer)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *InitializerConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Initializers = nil
+ } else {
+ yyv19 := &x.Initializers
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceInitializer((*[]Initializer)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *InitializerConfigurationList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceInitializerConfiguration(([]InitializerConfiguration)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceInitializerConfiguration(([]InitializerConfiguration)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *InitializerConfigurationList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *InitializerConfigurationList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceInitializerConfiguration((*[]InitializerConfiguration)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *InitializerConfigurationList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceInitializerConfiguration((*[]InitializerConfiguration)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Initializer) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = len(x.Rules) != 0
+ yyq2[2] = x.FailurePolicy != nil
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceRule(([]Rule)(x.Rules), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rules"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceRule(([]Rule)(x.Rules), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.FailurePolicy == nil {
+ r.EncodeNil()
+ } else {
+ yy10 := *x.FailurePolicy
+ yy10.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("failurePolicy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.FailurePolicy == nil {
+ r.EncodeNil()
+ } else {
+ yy12 := *x.FailurePolicy
+ yy12.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Initializer) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Initializer) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "rules":
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv6 := &x.Rules
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceRule((*[]Rule)(yyv6), d)
+ }
+ }
+ case "failurePolicy":
+ if r.TryDecodeAsNil() {
+ if x.FailurePolicy != nil {
+ x.FailurePolicy = nil
+ }
+ } else {
+ if x.FailurePolicy == nil {
+ x.FailurePolicy = new(FailurePolicyType)
+ }
+ x.FailurePolicy.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Initializer) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv10 := &x.Name
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv12 := &x.Rules
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ h.decSliceRule((*[]Rule)(yyv12), d)
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FailurePolicy != nil {
+ x.FailurePolicy = nil
+ }
+ } else {
+ if x.FailurePolicy == nil {
+ x.FailurePolicy = new(FailurePolicyType)
+ }
+ x.FailurePolicy.CodecDecodeSelf(d)
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Rule) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.APIGroups) != 0
+ yyq2[1] = len(x.APIVersions) != 0
+ yyq2[2] = len(x.Resources) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.APIGroups == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.APIGroups, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiGroups"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.APIGroups == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.APIGroups, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.APIVersions == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.APIVersions, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.APIVersions == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.APIVersions, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Resources == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Resources, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resources"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Resources == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Resources, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Rule) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Rule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "apiGroups":
+ if r.TryDecodeAsNil() {
+ x.APIGroups = nil
+ } else {
+ yyv4 := &x.APIGroups
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv4, false, d)
+ }
+ }
+ case "apiVersions":
+ if r.TryDecodeAsNil() {
+ x.APIVersions = nil
+ } else {
+ yyv6 := &x.APIVersions
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv6, false, d)
+ }
+ }
+ case "resources":
+ if r.TryDecodeAsNil() {
+ x.Resources = nil
+ } else {
+ yyv8 := &x.Resources
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv8, false, d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Rule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIGroups = nil
+ } else {
+ yyv11 := &x.APIGroups
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv11, false, d)
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersions = nil
+ } else {
+ yyv13 := &x.APIVersions
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv13, false, d)
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Resources = nil
+ } else {
+ yyv15 := &x.Resources
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv15, false, d)
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x FailurePolicyType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *FailurePolicyType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *ExternalAdmissionHookConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.ExternalAdmissionHooks) != 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ if x.ExternalAdmissionHooks == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceExternalAdmissionHook(([]ExternalAdmissionHook)(x.ExternalAdmissionHooks), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("externalAdmissionHooks"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ExternalAdmissionHooks == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceExternalAdmissionHook(([]ExternalAdmissionHook)(x.ExternalAdmissionHooks), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ExternalAdmissionHookConfiguration) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ExternalAdmissionHookConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "externalAdmissionHooks":
+ if r.TryDecodeAsNil() {
+ x.ExternalAdmissionHooks = nil
+ } else {
+ yyv10 := &x.ExternalAdmissionHooks
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSliceExternalAdmissionHook((*[]ExternalAdmissionHook)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ExternalAdmissionHookConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ExternalAdmissionHooks = nil
+ } else {
+ yyv19 := &x.ExternalAdmissionHooks
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceExternalAdmissionHook((*[]ExternalAdmissionHook)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ExternalAdmissionHookConfigurationList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceExternalAdmissionHookConfiguration(([]ExternalAdmissionHookConfiguration)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceExternalAdmissionHookConfiguration(([]ExternalAdmissionHookConfiguration)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ExternalAdmissionHookConfigurationList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ExternalAdmissionHookConfigurationList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceExternalAdmissionHookConfiguration((*[]ExternalAdmissionHookConfiguration)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ExternalAdmissionHookConfigurationList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceExternalAdmissionHookConfiguration((*[]ExternalAdmissionHookConfiguration)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ExternalAdmissionHook) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = len(x.Rules) != 0
+ yyq2[3] = x.FailurePolicy != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy7 := &x.ClientConfig
+ yy7.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("clientConfig"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.ClientConfig
+ yy9.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.encSliceRuleWithOperations(([]RuleWithOperations)(x.Rules), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rules"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ h.encSliceRuleWithOperations(([]RuleWithOperations)(x.Rules), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.FailurePolicy == nil {
+ r.EncodeNil()
+ } else {
+ yy15 := *x.FailurePolicy
+ yy15.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("failurePolicy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.FailurePolicy == nil {
+ r.EncodeNil()
+ } else {
+ yy17 := *x.FailurePolicy
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ExternalAdmissionHook) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ExternalAdmissionHook) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "clientConfig":
+ if r.TryDecodeAsNil() {
+ x.ClientConfig = AdmissionHookClientConfig{}
+ } else {
+ yyv6 := &x.ClientConfig
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "rules":
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv7 := &x.Rules
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSliceRuleWithOperations((*[]RuleWithOperations)(yyv7), d)
+ }
+ }
+ case "failurePolicy":
+ if r.TryDecodeAsNil() {
+ if x.FailurePolicy != nil {
+ x.FailurePolicy = nil
+ }
+ } else {
+ if x.FailurePolicy == nil {
+ x.FailurePolicy = new(FailurePolicyType)
+ }
+ x.FailurePolicy.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ExternalAdmissionHook) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv11 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ClientConfig = AdmissionHookClientConfig{}
+ } else {
+ yyv13 := &x.ClientConfig
+ yyv13.CodecDecodeSelf(d)
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv14 := &x.Rules
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.decSliceRuleWithOperations((*[]RuleWithOperations)(yyv14), d)
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FailurePolicy != nil {
+ x.FailurePolicy = nil
+ }
+ } else {
+ if x.FailurePolicy == nil {
+ x.FailurePolicy = new(FailurePolicyType)
+ }
+ x.FailurePolicy.CodecDecodeSelf(d)
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *RuleWithOperations) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Operations) != 0
+ yyq2[1] = len(x.APIGroups) != 0
+ yyq2[2] = len(x.APIVersions) != 0
+ yyq2[3] = len(x.Resources) != 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Operations == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceOperationType(([]OperationType)(x.Operations), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("operations"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Operations == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceOperationType(([]OperationType)(x.Operations), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.APIGroups == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.APIGroups, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiGroups"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.APIGroups == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.APIGroups, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.APIVersions == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.APIVersions, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.APIVersions == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.APIVersions, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Resources == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Resources, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resources"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Resources == nil {
+ r.EncodeNil()
+ } else {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Resources, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RuleWithOperations) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RuleWithOperations) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "operations":
+ if r.TryDecodeAsNil() {
+ x.Operations = nil
+ } else {
+ yyv4 := &x.Operations
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceOperationType((*[]OperationType)(yyv4), d)
+ }
+ }
+ case "apiGroups":
+ if r.TryDecodeAsNil() {
+ x.APIGroups = nil
+ } else {
+ yyv6 := &x.APIGroups
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv6, false, d)
+ }
+ }
+ case "apiVersions":
+ if r.TryDecodeAsNil() {
+ x.APIVersions = nil
+ } else {
+ yyv8 := &x.APIVersions
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv8, false, d)
+ }
+ }
+ case "resources":
+ if r.TryDecodeAsNil() {
+ x.Resources = nil
+ } else {
+ yyv10 := &x.Resources
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv10, false, d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RuleWithOperations) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Operations = nil
+ } else {
+ yyv13 := &x.Operations
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceOperationType((*[]OperationType)(yyv13), d)
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIGroups = nil
+ } else {
+ yyv15 := &x.APIGroups
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv15, false, d)
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersions = nil
+ } else {
+ yyv17 := &x.APIVersions
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv17, false, d)
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Resources = nil
+ } else {
+ yyv19 := &x.Resources
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv19, false, d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x OperationType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *OperationType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *AdmissionHookClientConfig) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy4 := &x.Service
+ yy4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("service"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.Service
+ yy6.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.CABundle == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.CABundle))
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("caBundle"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.CABundle == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.CABundle))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *AdmissionHookClientConfig) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *AdmissionHookClientConfig) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "service":
+ if r.TryDecodeAsNil() {
+ x.Service = ServiceReference{}
+ } else {
+ yyv4 := &x.Service
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "caBundle":
+ if r.TryDecodeAsNil() {
+ x.CABundle = nil
+ } else {
+ yyv5 := &x.CABundle
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *yyv5 = r.DecodeBytes(*(*[]byte)(yyv5), false, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *AdmissionHookClientConfig) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Service = ServiceReference{}
+ } else {
+ yyv8 := &x.Service
+ yyv8.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CABundle = nil
+ } else {
+ yyv9 := &x.CABundle
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ *yyv9 = r.DecodeBytes(*(*[]byte)(yyv9), false, false)
+ }
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ServiceReference) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("namespace"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ServiceReference) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ServiceReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerMapEnd1234)
+}
+
+func (x *ServiceReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encSliceInitializer(v []Initializer, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceInitializer(v *[]Initializer, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Initializer{}
+ 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, 48)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Initializer, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Initializer, 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] = Initializer{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Initializer{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Initializer{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Initializer{}) // var yyz1 Initializer
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Initializer{}
+ } 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 = []Initializer{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceInitializerConfiguration(v []InitializerConfiguration, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceInitializerConfiguration(v *[]InitializerConfiguration, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []InitializerConfiguration{}
+ 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, 288)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]InitializerConfiguration, yyrl1)
+ }
+ } else {
+ yyv1 = make([]InitializerConfiguration, 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] = InitializerConfiguration{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, InitializerConfiguration{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = InitializerConfiguration{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, InitializerConfiguration{}) // var yyz1 InitializerConfiguration
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = InitializerConfiguration{}
+ } 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 = []InitializerConfiguration{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceRule(v []Rule, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceRule(v *[]Rule, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Rule{}
+ 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([]Rule, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Rule, 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] = Rule{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Rule{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Rule{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Rule{}) // var yyz1 Rule
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Rule{}
+ } 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 = []Rule{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceExternalAdmissionHook(v []ExternalAdmissionHook, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceExternalAdmissionHook(v *[]ExternalAdmissionHook, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ExternalAdmissionHook{}
+ 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, 104)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ExternalAdmissionHook, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ExternalAdmissionHook, 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] = ExternalAdmissionHook{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ExternalAdmissionHook{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ExternalAdmissionHook{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ExternalAdmissionHook{}) // var yyz1 ExternalAdmissionHook
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ExternalAdmissionHook{}
+ } 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 = []ExternalAdmissionHook{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceExternalAdmissionHookConfiguration(v []ExternalAdmissionHookConfiguration, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceExternalAdmissionHookConfiguration(v *[]ExternalAdmissionHookConfiguration, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ExternalAdmissionHookConfiguration{}
+ 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, 288)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ExternalAdmissionHookConfiguration, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ExternalAdmissionHookConfiguration, 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] = ExternalAdmissionHookConfiguration{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ExternalAdmissionHookConfiguration{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ExternalAdmissionHookConfiguration{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ExternalAdmissionHookConfiguration{}) // var yyz1 ExternalAdmissionHookConfiguration
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ExternalAdmissionHookConfiguration{}
+ } 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 = []ExternalAdmissionHookConfiguration{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceRuleWithOperations(v []RuleWithOperations, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceRuleWithOperations(v *[]RuleWithOperations, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []RuleWithOperations{}
+ 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, 96)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]RuleWithOperations, yyrl1)
+ }
+ } else {
+ yyv1 = make([]RuleWithOperations, 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] = RuleWithOperations{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, RuleWithOperations{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = RuleWithOperations{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, RuleWithOperations{}) // var yyz1 RuleWithOperations
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = RuleWithOperations{}
+ } 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 = []RuleWithOperations{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceOperationType(v []OperationType, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yyv1.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceOperationType(v *[]OperationType, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []OperationType{}
+ 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) {
+
+ yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]OperationType, yyrl1)
+ }
+ } else {
+ yyv1 = make([]OperationType, yyrl1)
+ }
+ yyc1 = true
+ yyrr1 = len(yyv1)
+ } else if yyl1 != len(yyv1) {
+ yyv1 = yyv1[:yyl1]
+ yyc1 = true
+ }
+ yyj1 := 0
+ for ; yyj1 < yyrr1; yyj1++ {
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, "") // var yyz1 OperationType
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } 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 = []OperationType{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/types.go b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/types.go
new file mode 100644
index 000000000..0d878095c
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/types.go
@@ -0,0 +1,220 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+
+// InitializerConfiguration describes the configuration of initializers.
+type InitializerConfiguration struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Initializers is a list of resources and their default initializers
+ // Order-sensitive.
+ // When merging multiple InitializerConfigurations, we sort the initializers
+ // from different InitializerConfigurations by the name of the
+ // InitializerConfigurations; the order of the initializers from the same
+ // InitializerConfiguration is preserved.
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ // +optional
+ Initializers []Initializer `json:"initializers,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=initializers"`
+}
+
+// InitializerConfigurationList is a list of InitializerConfiguration.
+type InitializerConfigurationList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of InitializerConfiguration.
+ Items []InitializerConfiguration `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// Initializer describes the name and the failure policy of an initializer, and
+// what resources it applies to.
+type Initializer struct {
+ // Name is the identifier of the initializer. It will be added to the
+ // object that needs to be initialized.
+ // Name should be fully qualified, e.g., alwayspullimages.kubernetes.io, where
+ // "alwayspullimages" is the name of the webhook, and kubernetes.io is the name
+ // of the organization.
+ // Required
+ Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
+
+ // Rules describes what resources/subresources the initializer cares about.
+ // The initializer cares about an operation if it matches _any_ Rule.
+ // Rule.Resources must not include subresources.
+ Rules []Rule `json:"rules,omitempty" protobuf:"bytes,2,rep,name=rules"`
+
+ // FailurePolicy defines what happens if the responsible initializer controller
+ // fails to takes action. Allowed values are Ignore, or Fail. If "Ignore" is
+ // set, initializer is removed from the initializers list of an object if
+ // the timeout is reached; If "Fail" is set, admissionregistration returns timeout error
+ // if the timeout is reached.
+ FailurePolicy *FailurePolicyType `json:"failurePolicy,omitempty" protobuf:"bytes,3,opt,name=failurePolicy,casttype=FailurePolicyType"`
+}
+
+// Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended
+// to make sure that all the tuple expansions are valid.
+type Rule struct {
+ // APIGroups is the API groups the resources belong to. '*' is all groups.
+ // If '*' is present, the length of the slice must be one.
+ // Required.
+ APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,1,rep,name=apiGroups"`
+
+ // APIVersions is the API versions the resources belong to. '*' is all versions.
+ // If '*' is present, the length of the slice must be one.
+ // Required.
+ APIVersions []string `json:"apiVersions,omitempty" protobuf:"bytes,2,rep,name=apiVersions"`
+
+ // Resources is a list of resources this rule applies to.
+ //
+ // For example:
+ // 'pods' means pods.
+ // 'pods/log' means the log subresource of pods.
+ // '*' means all resources, but not subresources.
+ // 'pods/*' means all subresources of pods.
+ // '*/scale' means all scale subresources.
+ // '*/*' means all resources and their subresources.
+ //
+ // If wildcard is present, the validation rule will ensure resources do not
+ // overlap with each other.
+ //
+ // Depending on the enclosing object, subresources might not be allowed.
+ // Required.
+ Resources []string `json:"resources,omitempty" protobuf:"bytes,3,rep,name=resources"`
+}
+
+type FailurePolicyType string
+
+const (
+ // Ignore means the initilizer is removed from the initializers list of an
+ // object if the initializer is timed out.
+ Ignore FailurePolicyType = "Ignore"
+ // For 1.7, only "Ignore" is allowed. "Fail" will be allowed when the
+ // extensible admission feature is beta.
+ Fail FailurePolicyType = "Fail"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+
+// ExternalAdmissionHookConfiguration describes the configuration of initializers.
+type ExternalAdmissionHookConfiguration struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+ // ExternalAdmissionHooks is a list of external admission webhooks and the
+ // affected resources and operations.
+ // +optional
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ ExternalAdmissionHooks []ExternalAdmissionHook `json:"externalAdmissionHooks,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=externalAdmissionHooks"`
+}
+
+// ExternalAdmissionHookConfigurationList is a list of ExternalAdmissionHookConfiguration.
+type ExternalAdmissionHookConfigurationList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+ // List of ExternalAdmissionHookConfiguration.
+ Items []ExternalAdmissionHookConfiguration `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// ExternalAdmissionHook describes an external admission webhook and the
+// resources and operations it applies to.
+type ExternalAdmissionHook struct {
+ // The name of the external admission webhook.
+ // Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where
+ // "imagepolicy" is the name of the webhook, and kubernetes.io is the name
+ // of the organization.
+ // Required.
+ Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
+
+ // ClientConfig defines how to communicate with the hook.
+ // Required
+ ClientConfig AdmissionHookClientConfig `json:"clientConfig" protobuf:"bytes,2,opt,name=clientConfig"`
+
+ // Rules describes what operations on what resources/subresources the webhook cares about.
+ // The webhook cares about an operation if it matches _any_ Rule.
+ Rules []RuleWithOperations `json:"rules,omitempty" protobuf:"bytes,3,rep,name=rules"`
+
+ // FailurePolicy defines how unrecognized errors from the admission endpoint are handled -
+ // allowed values are Ignore or Fail. Defaults to Ignore.
+ // +optional
+ FailurePolicy *FailurePolicyType `json:"failurePolicy,omitempty" protobuf:"bytes,4,opt,name=failurePolicy,casttype=FailurePolicyType"`
+}
+
+// RuleWithOperations is a tuple of Operations and Resources. It is recommended to make
+// sure that all the tuple expansions are valid.
+type RuleWithOperations struct {
+ // Operations is the operations the admission hook cares about - CREATE, UPDATE, or *
+ // for all operations.
+ // If '*' is present, the length of the slice must be one.
+ // Required.
+ Operations []OperationType `json:"operations,omitempty" protobuf:"bytes,1,rep,name=operations,casttype=OperationType"`
+ // Rule is embedded, it describes other criteria of the rule, like
+ // APIGroups, APIVersions, Resources, etc.
+ Rule `json:",inline" protobuf:"bytes,2,opt,name=rule"`
+}
+
+type OperationType string
+
+// The constants should be kept in sync with those defined in k8s.io/kubernetes/pkg/admission/interface.go.
+const (
+ OperationAll OperationType = "*"
+ Create OperationType = "CREATE"
+ Update OperationType = "UPDATE"
+ Delete OperationType = "DELETE"
+ Connect OperationType = "CONNECT"
+)
+
+// AdmissionHookClientConfig contains the information to make a TLS
+// connection with the webhook
+type AdmissionHookClientConfig struct {
+ // Service is a reference to the service for this webhook. If there is only
+ // one port open for the service, that port will be used. If there are multiple
+ // ports open, port 443 will be used if it is open, otherwise it is an error.
+ // Required
+ Service ServiceReference `json:"service" protobuf:"bytes,1,opt,name=service"`
+ // CABundle is a PEM encoded CA bundle which will be used to validate webhook's server certificate.
+ // Required
+ CABundle []byte `json:"caBundle" protobuf:"bytes,2,opt,name=caBundle"`
+}
+
+// ServiceReference holds a reference to Service.legacy.k8s.io
+type ServiceReference struct {
+ // Namespace is the namespace of the service
+ // Required
+ Namespace string `json:"namespace" protobuf:"bytes,1,opt,name=namespace"`
+ // Name is the name of the service
+ // Required
+ Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..9597deb59
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/types_swagger_doc_generated.go
@@ -0,0 +1,133 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_AdmissionHookClientConfig = map[string]string{
+ "": "AdmissionHookClientConfig contains the information to make a TLS connection with the webhook",
+ "service": "Service is a reference to the service for this webhook. If there is only one port open for the service, that port will be used. If there are multiple ports open, port 443 will be used if it is open, otherwise it is an error. Required",
+ "caBundle": "CABundle is a PEM encoded CA bundle which will be used to validate webhook's server certificate. Required",
+}
+
+func (AdmissionHookClientConfig) SwaggerDoc() map[string]string {
+ return map_AdmissionHookClientConfig
+}
+
+var map_ExternalAdmissionHook = map[string]string{
+ "": "ExternalAdmissionHook describes an external admission webhook and the resources and operations it applies to.",
+ "name": "The name of the external admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.",
+ "clientConfig": "ClientConfig defines how to communicate with the hook. Required",
+ "rules": "Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule.",
+ "failurePolicy": "FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Ignore.",
+}
+
+func (ExternalAdmissionHook) SwaggerDoc() map[string]string {
+ return map_ExternalAdmissionHook
+}
+
+var map_ExternalAdmissionHookConfiguration = map[string]string{
+ "": "ExternalAdmissionHookConfiguration describes the configuration of initializers.",
+ "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.",
+ "externalAdmissionHooks": "ExternalAdmissionHooks is a list of external admission webhooks and the affected resources and operations.",
+}
+
+func (ExternalAdmissionHookConfiguration) SwaggerDoc() map[string]string {
+ return map_ExternalAdmissionHookConfiguration
+}
+
+var map_ExternalAdmissionHookConfigurationList = map[string]string{
+ "": "ExternalAdmissionHookConfigurationList is a list of ExternalAdmissionHookConfiguration.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "List of ExternalAdmissionHookConfiguration.",
+}
+
+func (ExternalAdmissionHookConfigurationList) SwaggerDoc() map[string]string {
+ return map_ExternalAdmissionHookConfigurationList
+}
+
+var map_Initializer = map[string]string{
+ "": "Initializer describes the name and the failure policy of an initializer, and what resources it applies to.",
+ "name": "Name is the identifier of the initializer. It will be added to the object that needs to be initialized. Name should be fully qualified, e.g., alwayspullimages.kubernetes.io, where \"alwayspullimages\" is the name of the webhook, and kubernetes.io is the name of the organization. Required",
+ "rules": "Rules describes what resources/subresources the initializer cares about. The initializer cares about an operation if it matches _any_ Rule. Rule.Resources must not include subresources.",
+ "failurePolicy": "FailurePolicy defines what happens if the responsible initializer controller fails to takes action. Allowed values are Ignore, or Fail. If \"Ignore\" is set, initializer is removed from the initializers list of an object if the timeout is reached; If \"Fail\" is set, admissionregistration returns timeout error if the timeout is reached.",
+}
+
+func (Initializer) SwaggerDoc() map[string]string {
+ return map_Initializer
+}
+
+var map_InitializerConfiguration = map[string]string{
+ "": "InitializerConfiguration describes the configuration of initializers.",
+ "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.",
+ "initializers": "Initializers is a list of resources and their default initializers Order-sensitive. When merging multiple InitializerConfigurations, we sort the initializers from different InitializerConfigurations by the name of the InitializerConfigurations; the order of the initializers from the same InitializerConfiguration is preserved.",
+}
+
+func (InitializerConfiguration) SwaggerDoc() map[string]string {
+ return map_InitializerConfiguration
+}
+
+var map_InitializerConfigurationList = map[string]string{
+ "": "InitializerConfigurationList is a list of InitializerConfiguration.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "List of InitializerConfiguration.",
+}
+
+func (InitializerConfigurationList) SwaggerDoc() map[string]string {
+ return map_InitializerConfigurationList
+}
+
+var map_Rule = map[string]string{
+ "": "Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended to make sure that all the tuple expansions are valid.",
+ "apiGroups": "APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.",
+ "apiVersions": "APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.",
+ "resources": "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required.",
+}
+
+func (Rule) SwaggerDoc() map[string]string {
+ return map_Rule
+}
+
+var map_RuleWithOperations = map[string]string{
+ "": "RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.",
+ "operations": "Operations is the operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '*' is present, the length of the slice must be one. Required.",
+}
+
+func (RuleWithOperations) SwaggerDoc() map[string]string {
+ return map_RuleWithOperations
+}
+
+var map_ServiceReference = map[string]string{
+ "": "ServiceReference holds a reference to Service.legacy.k8s.io",
+ "namespace": "Namespace is the namespace of the service Required",
+ "name": "Name is the name of the service Required",
+}
+
+func (ServiceReference) SwaggerDoc() map[string]string {
+ return map_ServiceReference
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/zz_generated.conversion.go
new file mode 100644
index 000000000..34c645df4
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/zz_generated.conversion.go
@@ -0,0 +1,311 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1alpha1
+
+import (
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ admissionregistration "k8s.io/client-go/pkg/apis/admissionregistration"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1alpha1_AdmissionHookClientConfig_To_admissionregistration_AdmissionHookClientConfig,
+ Convert_admissionregistration_AdmissionHookClientConfig_To_v1alpha1_AdmissionHookClientConfig,
+ Convert_v1alpha1_ExternalAdmissionHook_To_admissionregistration_ExternalAdmissionHook,
+ Convert_admissionregistration_ExternalAdmissionHook_To_v1alpha1_ExternalAdmissionHook,
+ Convert_v1alpha1_ExternalAdmissionHookConfiguration_To_admissionregistration_ExternalAdmissionHookConfiguration,
+ Convert_admissionregistration_ExternalAdmissionHookConfiguration_To_v1alpha1_ExternalAdmissionHookConfiguration,
+ Convert_v1alpha1_ExternalAdmissionHookConfigurationList_To_admissionregistration_ExternalAdmissionHookConfigurationList,
+ Convert_admissionregistration_ExternalAdmissionHookConfigurationList_To_v1alpha1_ExternalAdmissionHookConfigurationList,
+ Convert_v1alpha1_Initializer_To_admissionregistration_Initializer,
+ Convert_admissionregistration_Initializer_To_v1alpha1_Initializer,
+ Convert_v1alpha1_InitializerConfiguration_To_admissionregistration_InitializerConfiguration,
+ Convert_admissionregistration_InitializerConfiguration_To_v1alpha1_InitializerConfiguration,
+ Convert_v1alpha1_InitializerConfigurationList_To_admissionregistration_InitializerConfigurationList,
+ Convert_admissionregistration_InitializerConfigurationList_To_v1alpha1_InitializerConfigurationList,
+ Convert_v1alpha1_Rule_To_admissionregistration_Rule,
+ Convert_admissionregistration_Rule_To_v1alpha1_Rule,
+ Convert_v1alpha1_RuleWithOperations_To_admissionregistration_RuleWithOperations,
+ Convert_admissionregistration_RuleWithOperations_To_v1alpha1_RuleWithOperations,
+ Convert_v1alpha1_ServiceReference_To_admissionregistration_ServiceReference,
+ Convert_admissionregistration_ServiceReference_To_v1alpha1_ServiceReference,
+ )
+}
+
+func autoConvert_v1alpha1_AdmissionHookClientConfig_To_admissionregistration_AdmissionHookClientConfig(in *AdmissionHookClientConfig, out *admissionregistration.AdmissionHookClientConfig, s conversion.Scope) error {
+ if err := Convert_v1alpha1_ServiceReference_To_admissionregistration_ServiceReference(&in.Service, &out.Service, s); err != nil {
+ return err
+ }
+ out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle))
+ return nil
+}
+
+// Convert_v1alpha1_AdmissionHookClientConfig_To_admissionregistration_AdmissionHookClientConfig is an autogenerated conversion function.
+func Convert_v1alpha1_AdmissionHookClientConfig_To_admissionregistration_AdmissionHookClientConfig(in *AdmissionHookClientConfig, out *admissionregistration.AdmissionHookClientConfig, s conversion.Scope) error {
+ return autoConvert_v1alpha1_AdmissionHookClientConfig_To_admissionregistration_AdmissionHookClientConfig(in, out, s)
+}
+
+func autoConvert_admissionregistration_AdmissionHookClientConfig_To_v1alpha1_AdmissionHookClientConfig(in *admissionregistration.AdmissionHookClientConfig, out *AdmissionHookClientConfig, s conversion.Scope) error {
+ if err := Convert_admissionregistration_ServiceReference_To_v1alpha1_ServiceReference(&in.Service, &out.Service, s); err != nil {
+ return err
+ }
+ if in.CABundle == nil {
+ out.CABundle = make([]byte, 0)
+ } else {
+ out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle))
+ }
+ return nil
+}
+
+// Convert_admissionregistration_AdmissionHookClientConfig_To_v1alpha1_AdmissionHookClientConfig is an autogenerated conversion function.
+func Convert_admissionregistration_AdmissionHookClientConfig_To_v1alpha1_AdmissionHookClientConfig(in *admissionregistration.AdmissionHookClientConfig, out *AdmissionHookClientConfig, s conversion.Scope) error {
+ return autoConvert_admissionregistration_AdmissionHookClientConfig_To_v1alpha1_AdmissionHookClientConfig(in, out, s)
+}
+
+func autoConvert_v1alpha1_ExternalAdmissionHook_To_admissionregistration_ExternalAdmissionHook(in *ExternalAdmissionHook, out *admissionregistration.ExternalAdmissionHook, s conversion.Scope) error {
+ out.Name = in.Name
+ if err := Convert_v1alpha1_AdmissionHookClientConfig_To_admissionregistration_AdmissionHookClientConfig(&in.ClientConfig, &out.ClientConfig, s); err != nil {
+ return err
+ }
+ out.Rules = *(*[]admissionregistration.RuleWithOperations)(unsafe.Pointer(&in.Rules))
+ out.FailurePolicy = (*admissionregistration.FailurePolicyType)(unsafe.Pointer(in.FailurePolicy))
+ return nil
+}
+
+// Convert_v1alpha1_ExternalAdmissionHook_To_admissionregistration_ExternalAdmissionHook is an autogenerated conversion function.
+func Convert_v1alpha1_ExternalAdmissionHook_To_admissionregistration_ExternalAdmissionHook(in *ExternalAdmissionHook, out *admissionregistration.ExternalAdmissionHook, s conversion.Scope) error {
+ return autoConvert_v1alpha1_ExternalAdmissionHook_To_admissionregistration_ExternalAdmissionHook(in, out, s)
+}
+
+func autoConvert_admissionregistration_ExternalAdmissionHook_To_v1alpha1_ExternalAdmissionHook(in *admissionregistration.ExternalAdmissionHook, out *ExternalAdmissionHook, s conversion.Scope) error {
+ out.Name = in.Name
+ if err := Convert_admissionregistration_AdmissionHookClientConfig_To_v1alpha1_AdmissionHookClientConfig(&in.ClientConfig, &out.ClientConfig, s); err != nil {
+ return err
+ }
+ out.Rules = *(*[]RuleWithOperations)(unsafe.Pointer(&in.Rules))
+ out.FailurePolicy = (*FailurePolicyType)(unsafe.Pointer(in.FailurePolicy))
+ return nil
+}
+
+// Convert_admissionregistration_ExternalAdmissionHook_To_v1alpha1_ExternalAdmissionHook is an autogenerated conversion function.
+func Convert_admissionregistration_ExternalAdmissionHook_To_v1alpha1_ExternalAdmissionHook(in *admissionregistration.ExternalAdmissionHook, out *ExternalAdmissionHook, s conversion.Scope) error {
+ return autoConvert_admissionregistration_ExternalAdmissionHook_To_v1alpha1_ExternalAdmissionHook(in, out, s)
+}
+
+func autoConvert_v1alpha1_ExternalAdmissionHookConfiguration_To_admissionregistration_ExternalAdmissionHookConfiguration(in *ExternalAdmissionHookConfiguration, out *admissionregistration.ExternalAdmissionHookConfiguration, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.ExternalAdmissionHooks = *(*[]admissionregistration.ExternalAdmissionHook)(unsafe.Pointer(&in.ExternalAdmissionHooks))
+ return nil
+}
+
+// Convert_v1alpha1_ExternalAdmissionHookConfiguration_To_admissionregistration_ExternalAdmissionHookConfiguration is an autogenerated conversion function.
+func Convert_v1alpha1_ExternalAdmissionHookConfiguration_To_admissionregistration_ExternalAdmissionHookConfiguration(in *ExternalAdmissionHookConfiguration, out *admissionregistration.ExternalAdmissionHookConfiguration, s conversion.Scope) error {
+ return autoConvert_v1alpha1_ExternalAdmissionHookConfiguration_To_admissionregistration_ExternalAdmissionHookConfiguration(in, out, s)
+}
+
+func autoConvert_admissionregistration_ExternalAdmissionHookConfiguration_To_v1alpha1_ExternalAdmissionHookConfiguration(in *admissionregistration.ExternalAdmissionHookConfiguration, out *ExternalAdmissionHookConfiguration, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.ExternalAdmissionHooks = *(*[]ExternalAdmissionHook)(unsafe.Pointer(&in.ExternalAdmissionHooks))
+ return nil
+}
+
+// Convert_admissionregistration_ExternalAdmissionHookConfiguration_To_v1alpha1_ExternalAdmissionHookConfiguration is an autogenerated conversion function.
+func Convert_admissionregistration_ExternalAdmissionHookConfiguration_To_v1alpha1_ExternalAdmissionHookConfiguration(in *admissionregistration.ExternalAdmissionHookConfiguration, out *ExternalAdmissionHookConfiguration, s conversion.Scope) error {
+ return autoConvert_admissionregistration_ExternalAdmissionHookConfiguration_To_v1alpha1_ExternalAdmissionHookConfiguration(in, out, s)
+}
+
+func autoConvert_v1alpha1_ExternalAdmissionHookConfigurationList_To_admissionregistration_ExternalAdmissionHookConfigurationList(in *ExternalAdmissionHookConfigurationList, out *admissionregistration.ExternalAdmissionHookConfigurationList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]admissionregistration.ExternalAdmissionHookConfiguration)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1alpha1_ExternalAdmissionHookConfigurationList_To_admissionregistration_ExternalAdmissionHookConfigurationList is an autogenerated conversion function.
+func Convert_v1alpha1_ExternalAdmissionHookConfigurationList_To_admissionregistration_ExternalAdmissionHookConfigurationList(in *ExternalAdmissionHookConfigurationList, out *admissionregistration.ExternalAdmissionHookConfigurationList, s conversion.Scope) error {
+ return autoConvert_v1alpha1_ExternalAdmissionHookConfigurationList_To_admissionregistration_ExternalAdmissionHookConfigurationList(in, out, s)
+}
+
+func autoConvert_admissionregistration_ExternalAdmissionHookConfigurationList_To_v1alpha1_ExternalAdmissionHookConfigurationList(in *admissionregistration.ExternalAdmissionHookConfigurationList, out *ExternalAdmissionHookConfigurationList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]ExternalAdmissionHookConfiguration, 0)
+ } else {
+ out.Items = *(*[]ExternalAdmissionHookConfiguration)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_admissionregistration_ExternalAdmissionHookConfigurationList_To_v1alpha1_ExternalAdmissionHookConfigurationList is an autogenerated conversion function.
+func Convert_admissionregistration_ExternalAdmissionHookConfigurationList_To_v1alpha1_ExternalAdmissionHookConfigurationList(in *admissionregistration.ExternalAdmissionHookConfigurationList, out *ExternalAdmissionHookConfigurationList, s conversion.Scope) error {
+ return autoConvert_admissionregistration_ExternalAdmissionHookConfigurationList_To_v1alpha1_ExternalAdmissionHookConfigurationList(in, out, s)
+}
+
+func autoConvert_v1alpha1_Initializer_To_admissionregistration_Initializer(in *Initializer, out *admissionregistration.Initializer, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Rules = *(*[]admissionregistration.Rule)(unsafe.Pointer(&in.Rules))
+ out.FailurePolicy = (*admissionregistration.FailurePolicyType)(unsafe.Pointer(in.FailurePolicy))
+ return nil
+}
+
+// Convert_v1alpha1_Initializer_To_admissionregistration_Initializer is an autogenerated conversion function.
+func Convert_v1alpha1_Initializer_To_admissionregistration_Initializer(in *Initializer, out *admissionregistration.Initializer, s conversion.Scope) error {
+ return autoConvert_v1alpha1_Initializer_To_admissionregistration_Initializer(in, out, s)
+}
+
+func autoConvert_admissionregistration_Initializer_To_v1alpha1_Initializer(in *admissionregistration.Initializer, out *Initializer, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Rules = *(*[]Rule)(unsafe.Pointer(&in.Rules))
+ out.FailurePolicy = (*FailurePolicyType)(unsafe.Pointer(in.FailurePolicy))
+ return nil
+}
+
+// Convert_admissionregistration_Initializer_To_v1alpha1_Initializer is an autogenerated conversion function.
+func Convert_admissionregistration_Initializer_To_v1alpha1_Initializer(in *admissionregistration.Initializer, out *Initializer, s conversion.Scope) error {
+ return autoConvert_admissionregistration_Initializer_To_v1alpha1_Initializer(in, out, s)
+}
+
+func autoConvert_v1alpha1_InitializerConfiguration_To_admissionregistration_InitializerConfiguration(in *InitializerConfiguration, out *admissionregistration.InitializerConfiguration, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Initializers = *(*[]admissionregistration.Initializer)(unsafe.Pointer(&in.Initializers))
+ return nil
+}
+
+// Convert_v1alpha1_InitializerConfiguration_To_admissionregistration_InitializerConfiguration is an autogenerated conversion function.
+func Convert_v1alpha1_InitializerConfiguration_To_admissionregistration_InitializerConfiguration(in *InitializerConfiguration, out *admissionregistration.InitializerConfiguration, s conversion.Scope) error {
+ return autoConvert_v1alpha1_InitializerConfiguration_To_admissionregistration_InitializerConfiguration(in, out, s)
+}
+
+func autoConvert_admissionregistration_InitializerConfiguration_To_v1alpha1_InitializerConfiguration(in *admissionregistration.InitializerConfiguration, out *InitializerConfiguration, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Initializers = *(*[]Initializer)(unsafe.Pointer(&in.Initializers))
+ return nil
+}
+
+// Convert_admissionregistration_InitializerConfiguration_To_v1alpha1_InitializerConfiguration is an autogenerated conversion function.
+func Convert_admissionregistration_InitializerConfiguration_To_v1alpha1_InitializerConfiguration(in *admissionregistration.InitializerConfiguration, out *InitializerConfiguration, s conversion.Scope) error {
+ return autoConvert_admissionregistration_InitializerConfiguration_To_v1alpha1_InitializerConfiguration(in, out, s)
+}
+
+func autoConvert_v1alpha1_InitializerConfigurationList_To_admissionregistration_InitializerConfigurationList(in *InitializerConfigurationList, out *admissionregistration.InitializerConfigurationList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]admissionregistration.InitializerConfiguration)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1alpha1_InitializerConfigurationList_To_admissionregistration_InitializerConfigurationList is an autogenerated conversion function.
+func Convert_v1alpha1_InitializerConfigurationList_To_admissionregistration_InitializerConfigurationList(in *InitializerConfigurationList, out *admissionregistration.InitializerConfigurationList, s conversion.Scope) error {
+ return autoConvert_v1alpha1_InitializerConfigurationList_To_admissionregistration_InitializerConfigurationList(in, out, s)
+}
+
+func autoConvert_admissionregistration_InitializerConfigurationList_To_v1alpha1_InitializerConfigurationList(in *admissionregistration.InitializerConfigurationList, out *InitializerConfigurationList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]InitializerConfiguration, 0)
+ } else {
+ out.Items = *(*[]InitializerConfiguration)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_admissionregistration_InitializerConfigurationList_To_v1alpha1_InitializerConfigurationList is an autogenerated conversion function.
+func Convert_admissionregistration_InitializerConfigurationList_To_v1alpha1_InitializerConfigurationList(in *admissionregistration.InitializerConfigurationList, out *InitializerConfigurationList, s conversion.Scope) error {
+ return autoConvert_admissionregistration_InitializerConfigurationList_To_v1alpha1_InitializerConfigurationList(in, out, s)
+}
+
+func autoConvert_v1alpha1_Rule_To_admissionregistration_Rule(in *Rule, out *admissionregistration.Rule, s conversion.Scope) error {
+ out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups))
+ out.APIVersions = *(*[]string)(unsafe.Pointer(&in.APIVersions))
+ out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources))
+ return nil
+}
+
+// Convert_v1alpha1_Rule_To_admissionregistration_Rule is an autogenerated conversion function.
+func Convert_v1alpha1_Rule_To_admissionregistration_Rule(in *Rule, out *admissionregistration.Rule, s conversion.Scope) error {
+ return autoConvert_v1alpha1_Rule_To_admissionregistration_Rule(in, out, s)
+}
+
+func autoConvert_admissionregistration_Rule_To_v1alpha1_Rule(in *admissionregistration.Rule, out *Rule, s conversion.Scope) error {
+ out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups))
+ out.APIVersions = *(*[]string)(unsafe.Pointer(&in.APIVersions))
+ out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources))
+ return nil
+}
+
+// Convert_admissionregistration_Rule_To_v1alpha1_Rule is an autogenerated conversion function.
+func Convert_admissionregistration_Rule_To_v1alpha1_Rule(in *admissionregistration.Rule, out *Rule, s conversion.Scope) error {
+ return autoConvert_admissionregistration_Rule_To_v1alpha1_Rule(in, out, s)
+}
+
+func autoConvert_v1alpha1_RuleWithOperations_To_admissionregistration_RuleWithOperations(in *RuleWithOperations, out *admissionregistration.RuleWithOperations, s conversion.Scope) error {
+ out.Operations = *(*[]admissionregistration.OperationType)(unsafe.Pointer(&in.Operations))
+ if err := Convert_v1alpha1_Rule_To_admissionregistration_Rule(&in.Rule, &out.Rule, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1alpha1_RuleWithOperations_To_admissionregistration_RuleWithOperations is an autogenerated conversion function.
+func Convert_v1alpha1_RuleWithOperations_To_admissionregistration_RuleWithOperations(in *RuleWithOperations, out *admissionregistration.RuleWithOperations, s conversion.Scope) error {
+ return autoConvert_v1alpha1_RuleWithOperations_To_admissionregistration_RuleWithOperations(in, out, s)
+}
+
+func autoConvert_admissionregistration_RuleWithOperations_To_v1alpha1_RuleWithOperations(in *admissionregistration.RuleWithOperations, out *RuleWithOperations, s conversion.Scope) error {
+ out.Operations = *(*[]OperationType)(unsafe.Pointer(&in.Operations))
+ if err := Convert_admissionregistration_Rule_To_v1alpha1_Rule(&in.Rule, &out.Rule, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_admissionregistration_RuleWithOperations_To_v1alpha1_RuleWithOperations is an autogenerated conversion function.
+func Convert_admissionregistration_RuleWithOperations_To_v1alpha1_RuleWithOperations(in *admissionregistration.RuleWithOperations, out *RuleWithOperations, s conversion.Scope) error {
+ return autoConvert_admissionregistration_RuleWithOperations_To_v1alpha1_RuleWithOperations(in, out, s)
+}
+
+func autoConvert_v1alpha1_ServiceReference_To_admissionregistration_ServiceReference(in *ServiceReference, out *admissionregistration.ServiceReference, s conversion.Scope) error {
+ out.Namespace = in.Namespace
+ out.Name = in.Name
+ return nil
+}
+
+// Convert_v1alpha1_ServiceReference_To_admissionregistration_ServiceReference is an autogenerated conversion function.
+func Convert_v1alpha1_ServiceReference_To_admissionregistration_ServiceReference(in *ServiceReference, out *admissionregistration.ServiceReference, s conversion.Scope) error {
+ return autoConvert_v1alpha1_ServiceReference_To_admissionregistration_ServiceReference(in, out, s)
+}
+
+func autoConvert_admissionregistration_ServiceReference_To_v1alpha1_ServiceReference(in *admissionregistration.ServiceReference, out *ServiceReference, s conversion.Scope) error {
+ out.Namespace = in.Namespace
+ out.Name = in.Name
+ return nil
+}
+
+// Convert_admissionregistration_ServiceReference_To_v1alpha1_ServiceReference is an autogenerated conversion function.
+func Convert_admissionregistration_ServiceReference_To_v1alpha1_ServiceReference(in *admissionregistration.ServiceReference, out *ServiceReference, s conversion.Scope) error {
+ return autoConvert_admissionregistration_ServiceReference_To_v1alpha1_ServiceReference(in, out, s)
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..526dbe3a2
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/zz_generated.deepcopy.go
@@ -0,0 +1,254 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_AdmissionHookClientConfig, InType: reflect.TypeOf(&AdmissionHookClientConfig{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ExternalAdmissionHook, InType: reflect.TypeOf(&ExternalAdmissionHook{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ExternalAdmissionHookConfiguration, InType: reflect.TypeOf(&ExternalAdmissionHookConfiguration{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ExternalAdmissionHookConfigurationList, InType: reflect.TypeOf(&ExternalAdmissionHookConfigurationList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_Initializer, InType: reflect.TypeOf(&Initializer{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_InitializerConfiguration, InType: reflect.TypeOf(&InitializerConfiguration{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_InitializerConfigurationList, InType: reflect.TypeOf(&InitializerConfigurationList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_Rule, InType: reflect.TypeOf(&Rule{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_RuleWithOperations, InType: reflect.TypeOf(&RuleWithOperations{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ServiceReference, InType: reflect.TypeOf(&ServiceReference{})},
+ )
+}
+
+// DeepCopy_v1alpha1_AdmissionHookClientConfig is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_AdmissionHookClientConfig(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*AdmissionHookClientConfig)
+ out := out.(*AdmissionHookClientConfig)
+ *out = *in
+ if in.CABundle != nil {
+ in, out := &in.CABundle, &out.CABundle
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_ExternalAdmissionHook is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_ExternalAdmissionHook(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ExternalAdmissionHook)
+ out := out.(*ExternalAdmissionHook)
+ *out = *in
+ if err := DeepCopy_v1alpha1_AdmissionHookClientConfig(&in.ClientConfig, &out.ClientConfig, c); err != nil {
+ return err
+ }
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]RuleWithOperations, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1alpha1_RuleWithOperations(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.FailurePolicy != nil {
+ in, out := &in.FailurePolicy, &out.FailurePolicy
+ *out = new(FailurePolicyType)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_ExternalAdmissionHookConfiguration is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_ExternalAdmissionHookConfiguration(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ExternalAdmissionHookConfiguration)
+ out := out.(*ExternalAdmissionHookConfiguration)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.ExternalAdmissionHooks != nil {
+ in, out := &in.ExternalAdmissionHooks, &out.ExternalAdmissionHooks
+ *out = make([]ExternalAdmissionHook, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1alpha1_ExternalAdmissionHook(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_ExternalAdmissionHookConfigurationList is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_ExternalAdmissionHookConfigurationList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ExternalAdmissionHookConfigurationList)
+ out := out.(*ExternalAdmissionHookConfigurationList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ExternalAdmissionHookConfiguration, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1alpha1_ExternalAdmissionHookConfiguration(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_Initializer is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_Initializer(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Initializer)
+ out := out.(*Initializer)
+ *out = *in
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]Rule, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1alpha1_Rule(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.FailurePolicy != nil {
+ in, out := &in.FailurePolicy, &out.FailurePolicy
+ *out = new(FailurePolicyType)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_InitializerConfiguration is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_InitializerConfiguration(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*InitializerConfiguration)
+ out := out.(*InitializerConfiguration)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Initializers != nil {
+ in, out := &in.Initializers, &out.Initializers
+ *out = make([]Initializer, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1alpha1_Initializer(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_InitializerConfigurationList is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_InitializerConfigurationList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*InitializerConfigurationList)
+ out := out.(*InitializerConfigurationList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]InitializerConfiguration, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1alpha1_InitializerConfiguration(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_Rule is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_Rule(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Rule)
+ out := out.(*Rule)
+ *out = *in
+ if in.APIGroups != nil {
+ in, out := &in.APIGroups, &out.APIGroups
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.APIVersions != nil {
+ in, out := &in.APIVersions, &out.APIVersions
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Resources != nil {
+ in, out := &in.Resources, &out.Resources
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_RuleWithOperations is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_RuleWithOperations(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RuleWithOperations)
+ out := out.(*RuleWithOperations)
+ *out = *in
+ if in.Operations != nil {
+ in, out := &in.Operations, &out.Operations
+ *out = make([]OperationType, len(*in))
+ copy(*out, *in)
+ }
+ if err := DeepCopy_v1alpha1_Rule(&in.Rule, &out.Rule, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_ServiceReference is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_ServiceReference(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServiceReference)
+ out := out.(*ServiceReference)
+ *out = *in
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/zz_generated.defaults.go
new file mode 100644
index 000000000..74fea7f41
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/v1alpha1/zz_generated.defaults.go
@@ -0,0 +1,70 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1alpha1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ scheme.AddTypeDefaultingFunc(&ExternalAdmissionHookConfiguration{}, func(obj interface{}) {
+ SetObjectDefaults_ExternalAdmissionHookConfiguration(obj.(*ExternalAdmissionHookConfiguration))
+ })
+ scheme.AddTypeDefaultingFunc(&ExternalAdmissionHookConfigurationList{}, func(obj interface{}) {
+ SetObjectDefaults_ExternalAdmissionHookConfigurationList(obj.(*ExternalAdmissionHookConfigurationList))
+ })
+ scheme.AddTypeDefaultingFunc(&InitializerConfiguration{}, func(obj interface{}) { SetObjectDefaults_InitializerConfiguration(obj.(*InitializerConfiguration)) })
+ scheme.AddTypeDefaultingFunc(&InitializerConfigurationList{}, func(obj interface{}) {
+ SetObjectDefaults_InitializerConfigurationList(obj.(*InitializerConfigurationList))
+ })
+ return nil
+}
+
+func SetObjectDefaults_ExternalAdmissionHookConfiguration(in *ExternalAdmissionHookConfiguration) {
+ for i := range in.ExternalAdmissionHooks {
+ a := &in.ExternalAdmissionHooks[i]
+ SetDefaults_ExternalAdmissionHook(a)
+ }
+}
+
+func SetObjectDefaults_ExternalAdmissionHookConfigurationList(in *ExternalAdmissionHookConfigurationList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_ExternalAdmissionHookConfiguration(a)
+ }
+}
+
+func SetObjectDefaults_InitializerConfiguration(in *InitializerConfiguration) {
+ for i := range in.Initializers {
+ a := &in.Initializers[i]
+ SetDefaults_Initializer(a)
+ }
+}
+
+func SetObjectDefaults_InitializerConfigurationList(in *InitializerConfigurationList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_InitializerConfiguration(a)
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/admissionregistration/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/zz_generated.deepcopy.go
new file mode 100644
index 000000000..e41f28efa
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/admissionregistration/zz_generated.deepcopy.go
@@ -0,0 +1,254 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package admissionregistration
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_admissionregistration_AdmissionHookClientConfig, InType: reflect.TypeOf(&AdmissionHookClientConfig{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_admissionregistration_ExternalAdmissionHook, InType: reflect.TypeOf(&ExternalAdmissionHook{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_admissionregistration_ExternalAdmissionHookConfiguration, InType: reflect.TypeOf(&ExternalAdmissionHookConfiguration{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_admissionregistration_ExternalAdmissionHookConfigurationList, InType: reflect.TypeOf(&ExternalAdmissionHookConfigurationList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_admissionregistration_Initializer, InType: reflect.TypeOf(&Initializer{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_admissionregistration_InitializerConfiguration, InType: reflect.TypeOf(&InitializerConfiguration{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_admissionregistration_InitializerConfigurationList, InType: reflect.TypeOf(&InitializerConfigurationList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_admissionregistration_Rule, InType: reflect.TypeOf(&Rule{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_admissionregistration_RuleWithOperations, InType: reflect.TypeOf(&RuleWithOperations{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_admissionregistration_ServiceReference, InType: reflect.TypeOf(&ServiceReference{})},
+ )
+}
+
+// DeepCopy_admissionregistration_AdmissionHookClientConfig is an autogenerated deepcopy function.
+func DeepCopy_admissionregistration_AdmissionHookClientConfig(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*AdmissionHookClientConfig)
+ out := out.(*AdmissionHookClientConfig)
+ *out = *in
+ if in.CABundle != nil {
+ in, out := &in.CABundle, &out.CABundle
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_admissionregistration_ExternalAdmissionHook is an autogenerated deepcopy function.
+func DeepCopy_admissionregistration_ExternalAdmissionHook(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ExternalAdmissionHook)
+ out := out.(*ExternalAdmissionHook)
+ *out = *in
+ if err := DeepCopy_admissionregistration_AdmissionHookClientConfig(&in.ClientConfig, &out.ClientConfig, c); err != nil {
+ return err
+ }
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]RuleWithOperations, len(*in))
+ for i := range *in {
+ if err := DeepCopy_admissionregistration_RuleWithOperations(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.FailurePolicy != nil {
+ in, out := &in.FailurePolicy, &out.FailurePolicy
+ *out = new(FailurePolicyType)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_admissionregistration_ExternalAdmissionHookConfiguration is an autogenerated deepcopy function.
+func DeepCopy_admissionregistration_ExternalAdmissionHookConfiguration(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ExternalAdmissionHookConfiguration)
+ out := out.(*ExternalAdmissionHookConfiguration)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.ExternalAdmissionHooks != nil {
+ in, out := &in.ExternalAdmissionHooks, &out.ExternalAdmissionHooks
+ *out = make([]ExternalAdmissionHook, len(*in))
+ for i := range *in {
+ if err := DeepCopy_admissionregistration_ExternalAdmissionHook(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_admissionregistration_ExternalAdmissionHookConfigurationList is an autogenerated deepcopy function.
+func DeepCopy_admissionregistration_ExternalAdmissionHookConfigurationList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ExternalAdmissionHookConfigurationList)
+ out := out.(*ExternalAdmissionHookConfigurationList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ExternalAdmissionHookConfiguration, len(*in))
+ for i := range *in {
+ if err := DeepCopy_admissionregistration_ExternalAdmissionHookConfiguration(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_admissionregistration_Initializer is an autogenerated deepcopy function.
+func DeepCopy_admissionregistration_Initializer(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Initializer)
+ out := out.(*Initializer)
+ *out = *in
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]Rule, len(*in))
+ for i := range *in {
+ if err := DeepCopy_admissionregistration_Rule(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.FailurePolicy != nil {
+ in, out := &in.FailurePolicy, &out.FailurePolicy
+ *out = new(FailurePolicyType)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_admissionregistration_InitializerConfiguration is an autogenerated deepcopy function.
+func DeepCopy_admissionregistration_InitializerConfiguration(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*InitializerConfiguration)
+ out := out.(*InitializerConfiguration)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Initializers != nil {
+ in, out := &in.Initializers, &out.Initializers
+ *out = make([]Initializer, len(*in))
+ for i := range *in {
+ if err := DeepCopy_admissionregistration_Initializer(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_admissionregistration_InitializerConfigurationList is an autogenerated deepcopy function.
+func DeepCopy_admissionregistration_InitializerConfigurationList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*InitializerConfigurationList)
+ out := out.(*InitializerConfigurationList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]InitializerConfiguration, len(*in))
+ for i := range *in {
+ if err := DeepCopy_admissionregistration_InitializerConfiguration(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_admissionregistration_Rule is an autogenerated deepcopy function.
+func DeepCopy_admissionregistration_Rule(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Rule)
+ out := out.(*Rule)
+ *out = *in
+ if in.APIGroups != nil {
+ in, out := &in.APIGroups, &out.APIGroups
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.APIVersions != nil {
+ in, out := &in.APIVersions, &out.APIVersions
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Resources != nil {
+ in, out := &in.Resources, &out.Resources
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_admissionregistration_RuleWithOperations is an autogenerated deepcopy function.
+func DeepCopy_admissionregistration_RuleWithOperations(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RuleWithOperations)
+ out := out.(*RuleWithOperations)
+ *out = *in
+ if in.Operations != nil {
+ in, out := &in.Operations, &out.Operations
+ *out = make([]OperationType, len(*in))
+ copy(*out, *in)
+ }
+ if err := DeepCopy_admissionregistration_Rule(&in.Rule, &out.Rule, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_admissionregistration_ServiceReference is an autogenerated deepcopy function.
+func DeepCopy_admissionregistration_ServiceReference(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServiceReference)
+ out := out.(*ServiceReference)
+ *out = *in
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/doc.go b/vendor/k8s.io/client-go/pkg/apis/apps/doc.go
new file mode 100644
index 000000000..d27cee51c
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/apps/doc.go
@@ -0,0 +1,17 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package apps
diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/register.go b/vendor/k8s.io/client-go/pkg/apis/apps/register.go
new file mode 100644
index 000000000..1098ce0a3
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/apps/register.go
@@ -0,0 +1,60 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package apps
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/client-go/pkg/apis/extensions"
+)
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+// GroupName is the group name use in this package
+const GroupName = "apps"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ // TODO this will get cleaned up with the scheme types are fixed
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &extensions.Deployment{},
+ &extensions.DeploymentList{},
+ &extensions.DeploymentRollback{},
+ &extensions.Scale{},
+ &StatefulSet{},
+ &StatefulSetList{},
+ &ControllerRevision{},
+ &ControllerRevisionList{},
+ )
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/types.go b/vendor/k8s.io/client-go/pkg/apis/apps/types.go
new file mode 100644
index 000000000..9691120ea
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/apps/types.go
@@ -0,0 +1,229 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package apps
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/client-go/pkg/api"
+)
+
+// +genclient=true
+
+// StatefulSet represents a set of pods with consistent identities.
+// Identities are defined as:
+// - Network: A single stable DNS and hostname.
+// - Storage: As many VolumeClaims as requested.
+// The StatefulSet guarantees that a given network identity will always
+// map to the same storage identity.
+type StatefulSet struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Spec defines the desired identities of pods in this set.
+ // +optional
+ Spec StatefulSetSpec
+
+ // Status is the current status of Pods in this StatefulSet. This data
+ // may be out of date by some window of time.
+ // +optional
+ Status StatefulSetStatus
+}
+
+// PodManagementPolicyType defines the policy for creating pods under a stateful set.
+type PodManagementPolicyType string
+
+const (
+ // OrderedReadyPodManagement will create pods in strictly increasing order on
+ // scale up and strictly decreasing order on scale down, progressing only when
+ // the previous pod is ready or terminated. At most one pod will be changed
+ // at any time.
+ OrderedReadyPodManagement PodManagementPolicyType = "OrderedReady"
+ // ParallelPodManagement will create and delete pods as soon as the stateful set
+ // replica count is changed, and will not wait for pods to be ready or complete
+ // termination.
+ ParallelPodManagement = "Parallel"
+)
+
+// StatefulSetUpdateStrategy indicates the strategy that the StatefulSet
+// controller will use to perform updates. It includes any additional parameters
+// necessary to perform the update for the indicated strategy.
+type StatefulSetUpdateStrategy struct {
+ // Type indicates the type of the StatefulSetUpdateStrategy.
+ Type StatefulSetUpdateStrategyType
+ // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.
+ RollingUpdate *RollingUpdateStatefulSetStrategy
+}
+
+// StatefulSetUpdateStrategyType is a string enumeration type that enumerates
+// all possible update strategies for the StatefulSet controller.
+type StatefulSetUpdateStrategyType string
+
+const (
+ // RollingUpdateStatefulSetStrategyType indicates that update will be
+ // applied to all Pods in the StatefulSet with respect to the StatefulSet
+ // ordering constraints. When a scale operation is performed with this
+ // strategy, new Pods will be created from the specification version indicated
+ // by the StatefulSet's updateRevision.
+ RollingUpdateStatefulSetStrategyType = "RollingUpdate"
+ // OnDeleteStatefulSetStrategyType triggers the legacy behavior. Version
+ // tracking and ordered rolling restarts are disabled. Pods are recreated
+ // from the StatefulSetSpec when they are manually deleted. When a scale
+ // operation is performed with this strategy,specification version indicated
+ // by the StatefulSet's currentRevision.
+ OnDeleteStatefulSetStrategyType = "OnDelete"
+)
+
+// RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
+type RollingUpdateStatefulSetStrategy struct {
+ // Partition indicates the ordinal at which the StatefulSet should be
+ // partitioned.
+ Partition int32
+}
+
+// A StatefulSetSpec is the specification of a StatefulSet.
+type StatefulSetSpec struct {
+ // Replicas is the desired number of replicas of the given Template.
+ // These are replicas in the sense that they are instantiations of the
+ // same Template, but individual replicas also have a consistent identity.
+ // If unspecified, defaults to 1.
+ // TODO: Consider a rename of this field.
+ // +optional
+ Replicas int32
+
+ // Selector is a label query over pods that should match the replica count.
+ // If empty, defaulted to labels on the pod template.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ Selector *metav1.LabelSelector
+
+ // Template is the object that describes the pod that will be created if
+ // insufficient replicas are detected. Each pod stamped out by the StatefulSet
+ // will fulfill this Template, but have a unique identity from the rest
+ // of the StatefulSet.
+ Template api.PodTemplateSpec
+
+ // VolumeClaimTemplates is a list of claims that pods are allowed to reference.
+ // The StatefulSet controller is responsible for mapping network identities to
+ // claims in a way that maintains the identity of a pod. Every claim in
+ // this list must have at least one matching (by name) volumeMount in one
+ // container in the template. A claim in this list takes precedence over
+ // any volumes in the template, with the same name.
+ // TODO: Define the behavior if a claim already exists with the same name.
+ // +optional
+ VolumeClaimTemplates []api.PersistentVolumeClaim
+
+ // ServiceName is the name of the service that governs this StatefulSet.
+ // This service must exist before the StatefulSet, and is responsible for
+ // the network identity of the set. Pods get DNS/hostnames that follow the
+ // pattern: pod-specific-string.serviceName.default.svc.cluster.local
+ // where "pod-specific-string" is managed by the StatefulSet controller.
+ ServiceName string
+
+ // PodManagementPolicy controls how pods are created during initial scale up,
+ // when replacing pods on nodes, or when scaling down. The default policy is
+ // `OrderedReady`, where pods are created in increasing order (pod-0, then
+ // pod-1, etc) and the controller will wait until each pod is ready before
+ // continuing. When scaling down, the pods are removed in the opposite order.
+ // The alternative policy is `Parallel` which will create pods in parallel
+ // to match the desired scale without waiting, and on scale down will delete
+ // all pods at once.
+ // +optional
+ PodManagementPolicy PodManagementPolicyType
+
+ // updateStrategy indicates the StatefulSetUpdateStrategy that will be
+ // employed to update Pods in the StatefulSet when a revision is made to
+ // Template.
+ UpdateStrategy StatefulSetUpdateStrategy
+
+ // revisionHistoryLimit is the maximum number of revisions that will
+ // be maintained in the StatefulSet's revision history. The revision history
+ // consists of all revisions not represented by a currently applied
+ // StatefulSetSpec version. The default value is 10.
+ RevisionHistoryLimit *int32
+}
+
+// StatefulSetStatus represents the current state of a StatefulSet.
+type StatefulSetStatus struct {
+ // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the
+ // StatefulSet's generation, which is updated on mutation by the API Server.
+ // +optional
+ ObservedGeneration *int64
+
+ // replicas is the number of Pods created by the StatefulSet controller.
+ Replicas int32
+
+ // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.
+ ReadyReplicas int32
+
+ // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
+ // indicated by currentRevision.
+ CurrentReplicas int32
+
+ // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
+ // indicated by updateRevision.
+ UpdatedReplicas int32
+
+ // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the
+ // sequence [0,currentReplicas).
+ CurrentRevision string
+
+ // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence
+ // [replicas-updatedReplicas,replicas)
+ UpdateRevision string
+}
+
+// StatefulSetList is a collection of StatefulSets.
+type StatefulSetList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+ Items []StatefulSet
+}
+
+// +genclient=true
+
+// ControllerRevision implements an immutable snapshot of state data. Clients
+// are responsible for serializing and deserializing the objects that contain
+// their internal state.
+// Once a ControllerRevision has been successfully created, it can not be updated.
+// The API Server will fail validation of all requests that attempt to mutate
+// the Data field. ControllerRevisions may, however, be deleted.
+type ControllerRevision struct {
+ metav1.TypeMeta
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta
+
+ // Data is the Object representing the state.
+ Data runtime.Object
+
+ // Revision indicates the revision of the state represented by Data.
+ Revision int64
+}
+
+// ControllerRevisionList is a resource containing a list of ControllerRevision objects.
+type ControllerRevisionList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ // Items is the list of ControllerRevision objects.
+ Items []ControllerRevision
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/conversion.go b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/conversion.go
new file mode 100644
index 000000000..66badd15f
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/conversion.go
@@ -0,0 +1,342 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "fmt"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/conversion"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/intstr"
+ "k8s.io/client-go/pkg/api"
+ "k8s.io/client-go/pkg/api/v1"
+ "k8s.io/client-go/pkg/apis/apps"
+ "k8s.io/client-go/pkg/apis/extensions"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) error {
+ // Add non-generated conversion functions to handle the *int32 -> int32
+ // conversion. A pointer is useful in the versioned type so we can default
+ // it, but a plain int32 is more convenient in the internal type. These
+ // functions are the same as the autogenerated ones in every other way.
+ err := scheme.AddConversionFuncs(
+ Convert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec,
+ Convert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec,
+ Convert_v1beta1_StatefulSetUpdateStrategy_To_apps_StatefulSetUpdateStrategy,
+ Convert_apps_StatefulSetUpdateStrategy_To_v1beta1_StatefulSetUpdateStrategy,
+ // extensions
+ // TODO: below conversions should be dropped in favor of auto-generated
+ // ones, see https://github.com/kubernetes/kubernetextensionsssues/39865
+ Convert_v1beta1_ScaleStatus_To_extensions_ScaleStatus,
+ Convert_extensions_ScaleStatus_To_v1beta1_ScaleStatus,
+ Convert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec,
+ Convert_extensions_DeploymentSpec_To_v1beta1_DeploymentSpec,
+ Convert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy,
+ Convert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy,
+ Convert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDeployment,
+ Convert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDeployment,
+ )
+ if err != nil {
+ return err
+ }
+
+ // Add field label conversions for kinds having selectable nothing but ObjectMeta fields.
+ err = scheme.AddFieldLabelConversionFunc("apps/v1beta1", "StatefulSet",
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "metadata.name", "metadata.namespace", "status.successful":
+ return label, value, nil
+ default:
+ return "", "", fmt.Errorf("field label not supported for StatefulSet: %s", label)
+ }
+ })
+ if err != nil {
+ return err
+ }
+ err = scheme.AddFieldLabelConversionFunc("apps/v1beta1", "Deployment",
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "metadata.name", "metadata.namespace":
+ return label, value, nil
+ default:
+ return "", "", fmt.Errorf("field label %q not supported for Deployment", label)
+ }
+ })
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func Convert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec(in *StatefulSetSpec, out *apps.StatefulSetSpec, s conversion.Scope) error {
+ if in.Replicas != nil {
+ out.Replicas = *in.Replicas
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ *out = new(metav1.LabelSelector)
+ if err := s.Convert(*in, *out, 0); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ if err := s.Convert(&in.Template, &out.Template, 0); err != nil {
+ return err
+ }
+ if in.VolumeClaimTemplates != nil {
+ in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates
+ *out = make([]api.PersistentVolumeClaim, len(*in))
+ for i := range *in {
+ if err := s.Convert(&(*in)[i], &(*out)[i], 0); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.VolumeClaimTemplates = nil
+ }
+ if err := Convert_v1beta1_StatefulSetUpdateStrategy_To_apps_StatefulSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, s); err != nil {
+ return err
+ }
+ if in.RevisionHistoryLimit != nil {
+ out.RevisionHistoryLimit = new(int32)
+ *out.RevisionHistoryLimit = *in.RevisionHistoryLimit
+ } else {
+ out.RevisionHistoryLimit = nil
+ }
+ out.ServiceName = in.ServiceName
+ out.PodManagementPolicy = apps.PodManagementPolicyType(in.PodManagementPolicy)
+ return nil
+}
+
+func Convert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec(in *apps.StatefulSetSpec, out *StatefulSetSpec, s conversion.Scope) error {
+ out.Replicas = new(int32)
+ *out.Replicas = in.Replicas
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ *out = new(metav1.LabelSelector)
+ if err := s.Convert(*in, *out, 0); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ if err := s.Convert(&in.Template, &out.Template, 0); err != nil {
+ return err
+ }
+ if in.VolumeClaimTemplates != nil {
+ in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates
+ *out = make([]v1.PersistentVolumeClaim, len(*in))
+ for i := range *in {
+ if err := s.Convert(&(*in)[i], &(*out)[i], 0); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.VolumeClaimTemplates = nil
+ }
+ if in.RevisionHistoryLimit != nil {
+ out.RevisionHistoryLimit = new(int32)
+ *out.RevisionHistoryLimit = *in.RevisionHistoryLimit
+ } else {
+ out.RevisionHistoryLimit = nil
+ }
+ out.ServiceName = in.ServiceName
+ out.PodManagementPolicy = PodManagementPolicyType(in.PodManagementPolicy)
+ if err := Convert_apps_StatefulSetUpdateStrategy_To_v1beta1_StatefulSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1beta1_StatefulSetUpdateStrategy_To_apps_StatefulSetUpdateStrategy(in *StatefulSetUpdateStrategy, out *apps.StatefulSetUpdateStrategy, s conversion.Scope) error {
+ out.Type = apps.StatefulSetUpdateStrategyType(in.Type)
+ if in.RollingUpdate != nil {
+ out.RollingUpdate = new(apps.RollingUpdateStatefulSetStrategy)
+ out.RollingUpdate.Partition = *in.RollingUpdate.Partition
+ } else {
+ out.RollingUpdate = nil
+ }
+ return nil
+}
+
+func Convert_apps_StatefulSetUpdateStrategy_To_v1beta1_StatefulSetUpdateStrategy(in *apps.StatefulSetUpdateStrategy, out *StatefulSetUpdateStrategy, s conversion.Scope) error {
+ out.Type = StatefulSetUpdateStrategyType(in.Type)
+ if in.RollingUpdate != nil {
+ out.RollingUpdate = new(RollingUpdateStatefulSetStrategy)
+ out.RollingUpdate.Partition = new(int32)
+ *out.RollingUpdate.Partition = in.RollingUpdate.Partition
+ } else {
+ out.RollingUpdate = nil
+ }
+ return nil
+}
+
+func Convert_extensions_ScaleStatus_To_v1beta1_ScaleStatus(in *extensions.ScaleStatus, out *ScaleStatus, s conversion.Scope) error {
+ out.Replicas = int32(in.Replicas)
+
+ out.Selector = nil
+ out.TargetSelector = ""
+ if in.Selector != nil {
+ if in.Selector.MatchExpressions == nil || len(in.Selector.MatchExpressions) == 0 {
+ out.Selector = in.Selector.MatchLabels
+ }
+
+ selector, err := metav1.LabelSelectorAsSelector(in.Selector)
+ if err != nil {
+ return fmt.Errorf("invalid label selector: %v", err)
+ }
+ out.TargetSelector = selector.String()
+ }
+ return nil
+}
+
+func Convert_v1beta1_ScaleStatus_To_extensions_ScaleStatus(in *ScaleStatus, out *extensions.ScaleStatus, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+
+ // Normally when 2 fields map to the same internal value we favor the old field, since
+ // old clients can't be expected to know about new fields but clients that know about the
+ // new field can be expected to know about the old field (though that's not quite true, due
+ // to kubectl apply). However, these fields are readonly, so any non-nil value should work.
+ if in.TargetSelector != "" {
+ labelSelector, err := metav1.ParseToLabelSelector(in.TargetSelector)
+ if err != nil {
+ out.Selector = nil
+ return fmt.Errorf("failed to parse target selector: %v", err)
+ }
+ out.Selector = labelSelector
+ } else if in.Selector != nil {
+ out.Selector = new(metav1.LabelSelector)
+ selector := make(map[string]string)
+ for key, val := range in.Selector {
+ selector[key] = val
+ }
+ out.Selector.MatchLabels = selector
+ } else {
+ out.Selector = nil
+ }
+ return nil
+}
+
+func Convert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec(in *DeploymentSpec, out *extensions.DeploymentSpec, s conversion.Scope) error {
+ if in.Replicas != nil {
+ out.Replicas = *in.Replicas
+ }
+ out.Selector = in.Selector
+ if err := v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy(&in.Strategy, &out.Strategy, s); err != nil {
+ return err
+ }
+ out.RevisionHistoryLimit = in.RevisionHistoryLimit
+ out.MinReadySeconds = in.MinReadySeconds
+ out.Paused = in.Paused
+ if in.RollbackTo != nil {
+ out.RollbackTo = new(extensions.RollbackConfig)
+ out.RollbackTo.Revision = in.RollbackTo.Revision
+ } else {
+ out.RollbackTo = nil
+ }
+ if in.ProgressDeadlineSeconds != nil {
+ out.ProgressDeadlineSeconds = new(int32)
+ *out.ProgressDeadlineSeconds = *in.ProgressDeadlineSeconds
+ }
+ return nil
+}
+
+func Convert_extensions_DeploymentSpec_To_v1beta1_DeploymentSpec(in *extensions.DeploymentSpec, out *DeploymentSpec, s conversion.Scope) error {
+ out.Replicas = &in.Replicas
+ out.Selector = in.Selector
+ if err := v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ if err := Convert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy(&in.Strategy, &out.Strategy, s); err != nil {
+ return err
+ }
+ if in.RevisionHistoryLimit != nil {
+ out.RevisionHistoryLimit = new(int32)
+ *out.RevisionHistoryLimit = int32(*in.RevisionHistoryLimit)
+ }
+ out.MinReadySeconds = int32(in.MinReadySeconds)
+ out.Paused = in.Paused
+ if in.RollbackTo != nil {
+ out.RollbackTo = new(RollbackConfig)
+ out.RollbackTo.Revision = int64(in.RollbackTo.Revision)
+ } else {
+ out.RollbackTo = nil
+ }
+ if in.ProgressDeadlineSeconds != nil {
+ out.ProgressDeadlineSeconds = new(int32)
+ *out.ProgressDeadlineSeconds = *in.ProgressDeadlineSeconds
+ }
+ return nil
+}
+
+func Convert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy(in *extensions.DeploymentStrategy, out *DeploymentStrategy, s conversion.Scope) error {
+ out.Type = DeploymentStrategyType(in.Type)
+ if in.RollingUpdate != nil {
+ out.RollingUpdate = new(RollingUpdateDeployment)
+ if err := Convert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDeployment(in.RollingUpdate, out.RollingUpdate, s); err != nil {
+ return err
+ }
+ } else {
+ out.RollingUpdate = nil
+ }
+ return nil
+}
+
+func Convert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy(in *DeploymentStrategy, out *extensions.DeploymentStrategy, s conversion.Scope) error {
+ out.Type = extensions.DeploymentStrategyType(in.Type)
+ if in.RollingUpdate != nil {
+ out.RollingUpdate = new(extensions.RollingUpdateDeployment)
+ if err := Convert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDeployment(in.RollingUpdate, out.RollingUpdate, s); err != nil {
+ return err
+ }
+ } else {
+ out.RollingUpdate = nil
+ }
+ return nil
+}
+
+func Convert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDeployment(in *RollingUpdateDeployment, out *extensions.RollingUpdateDeployment, s conversion.Scope) error {
+ if err := s.Convert(in.MaxUnavailable, &out.MaxUnavailable, 0); err != nil {
+ return err
+ }
+ if err := s.Convert(in.MaxSurge, &out.MaxSurge, 0); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDeployment(in *extensions.RollingUpdateDeployment, out *RollingUpdateDeployment, s conversion.Scope) error {
+ if out.MaxUnavailable == nil {
+ out.MaxUnavailable = &intstr.IntOrString{}
+ }
+ if err := s.Convert(&in.MaxUnavailable, out.MaxUnavailable, 0); err != nil {
+ return err
+ }
+ if out.MaxSurge == nil {
+ out.MaxSurge = &intstr.IntOrString{}
+ }
+ if err := s.Convert(&in.MaxSurge, out.MaxSurge, 0); err != nil {
+ return err
+ }
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/defaults.go b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/defaults.go
new file mode 100644
index 000000000..af133d25f
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/defaults.go
@@ -0,0 +1,117 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/intstr"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
+
+func SetDefaults_StatefulSet(obj *StatefulSet) {
+ if len(obj.Spec.PodManagementPolicy) == 0 {
+ obj.Spec.PodManagementPolicy = OrderedReadyPodManagement
+ }
+
+ if obj.Spec.UpdateStrategy.Type == "" {
+ obj.Spec.UpdateStrategy.Type = OnDeleteStatefulSetStrategyType
+ }
+ labels := obj.Spec.Template.Labels
+ if labels != nil {
+ if obj.Spec.Selector == nil {
+ obj.Spec.Selector = &metav1.LabelSelector{
+ MatchLabels: labels,
+ }
+ }
+ if len(obj.Labels) == 0 {
+ obj.Labels = labels
+ }
+ }
+ if obj.Spec.Replicas == nil {
+ obj.Spec.Replicas = new(int32)
+ *obj.Spec.Replicas = 1
+ }
+ if obj.Spec.RevisionHistoryLimit == nil {
+ obj.Spec.RevisionHistoryLimit = new(int32)
+ *obj.Spec.RevisionHistoryLimit = 10
+ }
+ if obj.Spec.UpdateStrategy.Type == RollingUpdateStatefulSetStrategyType &&
+ obj.Spec.UpdateStrategy.RollingUpdate != nil &&
+ obj.Spec.UpdateStrategy.RollingUpdate.Partition == nil {
+ obj.Spec.UpdateStrategy.RollingUpdate.Partition = new(int32)
+ *obj.Spec.UpdateStrategy.RollingUpdate.Partition = 0
+ }
+
+}
+
+// SetDefaults_Deployment sets additional defaults compared to its counterpart
+// in extensions. These addons are:
+// - MaxUnavailable during rolling update set to 25% (1 in extensions)
+// - MaxSurge value during rolling update set to 25% (1 in extensions)
+// - RevisionHistoryLimit set to 2 (not set in extensions)
+// - ProgressDeadlineSeconds set to 600s (not set in extensions)
+func SetDefaults_Deployment(obj *Deployment) {
+ // Default labels and selector to labels from pod template spec.
+ labels := obj.Spec.Template.Labels
+
+ if labels != nil {
+ if obj.Spec.Selector == nil {
+ obj.Spec.Selector = &metav1.LabelSelector{MatchLabels: labels}
+ }
+ if len(obj.Labels) == 0 {
+ obj.Labels = labels
+ }
+ }
+ // Set DeploymentSpec.Replicas to 1 if it is not set.
+ if obj.Spec.Replicas == nil {
+ obj.Spec.Replicas = new(int32)
+ *obj.Spec.Replicas = 1
+ }
+ strategy := &obj.Spec.Strategy
+ // Set default DeploymentStrategyType as RollingUpdate.
+ if strategy.Type == "" {
+ strategy.Type = RollingUpdateDeploymentStrategyType
+ }
+ if strategy.Type == RollingUpdateDeploymentStrategyType {
+ if strategy.RollingUpdate == nil {
+ rollingUpdate := RollingUpdateDeployment{}
+ strategy.RollingUpdate = &rollingUpdate
+ }
+ if strategy.RollingUpdate.MaxUnavailable == nil {
+ // Set default MaxUnavailable as 25% by default.
+ maxUnavailable := intstr.FromString("25%")
+ strategy.RollingUpdate.MaxUnavailable = &maxUnavailable
+ }
+ if strategy.RollingUpdate.MaxSurge == nil {
+ // Set default MaxSurge as 25% by default.
+ maxSurge := intstr.FromString("25%")
+ strategy.RollingUpdate.MaxSurge = &maxSurge
+ }
+ }
+ if obj.Spec.RevisionHistoryLimit == nil {
+ obj.Spec.RevisionHistoryLimit = new(int32)
+ *obj.Spec.RevisionHistoryLimit = 2
+ }
+ if obj.Spec.ProgressDeadlineSeconds == nil {
+ obj.Spec.ProgressDeadlineSeconds = new(int32)
+ *obj.Spec.ProgressDeadlineSeconds = 600
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/doc.go b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/doc.go
new file mode 100644
index 000000000..a397b30e9
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/doc.go
@@ -0,0 +1,17 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.pb.go
new file mode 100644
index 000000000..9f7395c8f
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.pb.go
@@ -0,0 +1,4934 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/apps/v1beta1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1beta1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/apps/v1beta1/generated.proto
+
+ It has these top-level messages:
+ ControllerRevision
+ ControllerRevisionList
+ Deployment
+ DeploymentCondition
+ DeploymentList
+ DeploymentRollback
+ DeploymentSpec
+ DeploymentStatus
+ DeploymentStrategy
+ RollbackConfig
+ RollingUpdateDeployment
+ RollingUpdateStatefulSetStrategy
+ Scale
+ ScaleSpec
+ ScaleStatus
+ StatefulSet
+ StatefulSetList
+ StatefulSetSpec
+ StatefulSetStatus
+ StatefulSetUpdateStrategy
+*/
+package v1beta1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+import k8s_io_apimachinery_pkg_util_intstr "k8s.io/apimachinery/pkg/util/intstr"
+import k8s_io_kubernetes_pkg_api_v1 "k8s.io/client-go/pkg/api/v1"
+
+import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *ControllerRevision) Reset() { *m = ControllerRevision{} }
+func (*ControllerRevision) ProtoMessage() {}
+func (*ControllerRevision) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *ControllerRevisionList) Reset() { *m = ControllerRevisionList{} }
+func (*ControllerRevisionList) ProtoMessage() {}
+func (*ControllerRevisionList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *Deployment) Reset() { *m = Deployment{} }
+func (*Deployment) ProtoMessage() {}
+func (*Deployment) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
+
+func (m *DeploymentCondition) Reset() { *m = DeploymentCondition{} }
+func (*DeploymentCondition) ProtoMessage() {}
+func (*DeploymentCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
+
+func (m *DeploymentList) Reset() { *m = DeploymentList{} }
+func (*DeploymentList) ProtoMessage() {}
+func (*DeploymentList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
+
+func (m *DeploymentRollback) Reset() { *m = DeploymentRollback{} }
+func (*DeploymentRollback) ProtoMessage() {}
+func (*DeploymentRollback) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
+
+func (m *DeploymentSpec) Reset() { *m = DeploymentSpec{} }
+func (*DeploymentSpec) ProtoMessage() {}
+func (*DeploymentSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
+
+func (m *DeploymentStatus) Reset() { *m = DeploymentStatus{} }
+func (*DeploymentStatus) ProtoMessage() {}
+func (*DeploymentStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
+
+func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} }
+func (*DeploymentStrategy) ProtoMessage() {}
+func (*DeploymentStrategy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
+
+func (m *RollbackConfig) Reset() { *m = RollbackConfig{} }
+func (*RollbackConfig) ProtoMessage() {}
+func (*RollbackConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
+
+func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} }
+func (*RollingUpdateDeployment) ProtoMessage() {}
+func (*RollingUpdateDeployment) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{10}
+}
+
+func (m *RollingUpdateStatefulSetStrategy) Reset() { *m = RollingUpdateStatefulSetStrategy{} }
+func (*RollingUpdateStatefulSetStrategy) ProtoMessage() {}
+func (*RollingUpdateStatefulSetStrategy) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{11}
+}
+
+func (m *Scale) Reset() { *m = Scale{} }
+func (*Scale) ProtoMessage() {}
+func (*Scale) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} }
+
+func (m *ScaleSpec) Reset() { *m = ScaleSpec{} }
+func (*ScaleSpec) ProtoMessage() {}
+func (*ScaleSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} }
+
+func (m *ScaleStatus) Reset() { *m = ScaleStatus{} }
+func (*ScaleStatus) ProtoMessage() {}
+func (*ScaleStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} }
+
+func (m *StatefulSet) Reset() { *m = StatefulSet{} }
+func (*StatefulSet) ProtoMessage() {}
+func (*StatefulSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} }
+
+func (m *StatefulSetList) Reset() { *m = StatefulSetList{} }
+func (*StatefulSetList) ProtoMessage() {}
+func (*StatefulSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} }
+
+func (m *StatefulSetSpec) Reset() { *m = StatefulSetSpec{} }
+func (*StatefulSetSpec) ProtoMessage() {}
+func (*StatefulSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} }
+
+func (m *StatefulSetStatus) Reset() { *m = StatefulSetStatus{} }
+func (*StatefulSetStatus) ProtoMessage() {}
+func (*StatefulSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} }
+
+func (m *StatefulSetUpdateStrategy) Reset() { *m = StatefulSetUpdateStrategy{} }
+func (*StatefulSetUpdateStrategy) ProtoMessage() {}
+func (*StatefulSetUpdateStrategy) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{19}
+}
+
+func init() {
+ proto.RegisterType((*ControllerRevision)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.ControllerRevision")
+ proto.RegisterType((*ControllerRevisionList)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.ControllerRevisionList")
+ proto.RegisterType((*Deployment)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.Deployment")
+ proto.RegisterType((*DeploymentCondition)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.DeploymentCondition")
+ proto.RegisterType((*DeploymentList)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.DeploymentList")
+ proto.RegisterType((*DeploymentRollback)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.DeploymentRollback")
+ proto.RegisterType((*DeploymentSpec)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.DeploymentSpec")
+ proto.RegisterType((*DeploymentStatus)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.DeploymentStatus")
+ proto.RegisterType((*DeploymentStrategy)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.DeploymentStrategy")
+ proto.RegisterType((*RollbackConfig)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.RollbackConfig")
+ proto.RegisterType((*RollingUpdateDeployment)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.RollingUpdateDeployment")
+ proto.RegisterType((*RollingUpdateStatefulSetStrategy)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.RollingUpdateStatefulSetStrategy")
+ proto.RegisterType((*Scale)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.Scale")
+ proto.RegisterType((*ScaleSpec)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.ScaleSpec")
+ proto.RegisterType((*ScaleStatus)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.ScaleStatus")
+ proto.RegisterType((*StatefulSet)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.StatefulSet")
+ proto.RegisterType((*StatefulSetList)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.StatefulSetList")
+ proto.RegisterType((*StatefulSetSpec)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.StatefulSetSpec")
+ proto.RegisterType((*StatefulSetStatus)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.StatefulSetStatus")
+ proto.RegisterType((*StatefulSetUpdateStrategy)(nil), "k8s.io.client-go.pkg.apis.apps.v1beta1.StatefulSetUpdateStrategy")
+}
+func (m *ControllerRevision) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ControllerRevision) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Data.Size()))
+ n2, err := m.Data.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Revision))
+ return i, nil
+}
+
+func (m *ControllerRevisionList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ControllerRevisionList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n3, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *Deployment) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Deployment) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n4, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n5, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n6, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ return i, nil
+}
+
+func (m *DeploymentCondition) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeploymentCondition) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
+ i += copy(dAtA[i:], m.Status)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastUpdateTime.Size()))
+ n7, err := m.LastUpdateTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
+ n8, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n8
+ return i, nil
+}
+
+func (m *DeploymentList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeploymentList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n9, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n9
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *DeploymentRollback) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeploymentRollback) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ if len(m.UpdatedAnnotations) > 0 {
+ keysForUpdatedAnnotations := make([]string, 0, len(m.UpdatedAnnotations))
+ for k := range m.UpdatedAnnotations {
+ keysForUpdatedAnnotations = append(keysForUpdatedAnnotations, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForUpdatedAnnotations)
+ for _, k := range keysForUpdatedAnnotations {
+ dAtA[i] = 0x12
+ i++
+ v := m.UpdatedAnnotations[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RollbackTo.Size()))
+ n10, err := m.RollbackTo.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n10
+ return i, nil
+}
+
+func (m *DeploymentSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeploymentSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Replicas != nil {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.Replicas))
+ }
+ if m.Selector != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
+ n11, err := m.Selector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n11
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
+ n12, err := m.Template.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n12
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Strategy.Size()))
+ n13, err := m.Strategy.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n13
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.MinReadySeconds))
+ if m.RevisionHistoryLimit != nil {
+ dAtA[i] = 0x30
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.RevisionHistoryLimit))
+ }
+ dAtA[i] = 0x38
+ i++
+ if m.Paused {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ if m.RollbackTo != nil {
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RollbackTo.Size()))
+ n14, err := m.RollbackTo.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n14
+ }
+ if m.ProgressDeadlineSeconds != nil {
+ dAtA[i] = 0x48
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.ProgressDeadlineSeconds))
+ }
+ return i, nil
+}
+
+func (m *DeploymentStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeploymentStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration))
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.UpdatedReplicas))
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.AvailableReplicas))
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.UnavailableReplicas))
+ if len(m.Conditions) > 0 {
+ for _, msg := range m.Conditions {
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x38
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ReadyReplicas))
+ if m.CollisionCount != nil {
+ dAtA[i] = 0x40
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.CollisionCount))
+ }
+ return i, nil
+}
+
+func (m *DeploymentStrategy) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeploymentStrategy) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ if m.RollingUpdate != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RollingUpdate.Size()))
+ n15, err := m.RollingUpdate.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n15
+ }
+ return i, nil
+}
+
+func (m *RollbackConfig) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RollbackConfig) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Revision))
+ return i, nil
+}
+
+func (m *RollingUpdateDeployment) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RollingUpdateDeployment) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.MaxUnavailable != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.MaxUnavailable.Size()))
+ n16, err := m.MaxUnavailable.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n16
+ }
+ if m.MaxSurge != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.MaxSurge.Size()))
+ n17, err := m.MaxSurge.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n17
+ }
+ return i, nil
+}
+
+func (m *RollingUpdateStatefulSetStrategy) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RollingUpdateStatefulSetStrategy) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Partition != nil {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.Partition))
+ }
+ return i, nil
+}
+
+func (m *Scale) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Scale) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n18, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n18
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n19, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n19
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n20, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n20
+ return i, nil
+}
+
+func (m *ScaleSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ScaleSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
+ return i, nil
+}
+
+func (m *ScaleStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ScaleStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
+ if len(m.Selector) > 0 {
+ keysForSelector := make([]string, 0, len(m.Selector))
+ for k := range m.Selector {
+ keysForSelector = append(keysForSelector, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForSelector)
+ for _, k := range keysForSelector {
+ dAtA[i] = 0x12
+ i++
+ v := m.Selector[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.TargetSelector)))
+ i += copy(dAtA[i:], m.TargetSelector)
+ return i, nil
+}
+
+func (m *StatefulSet) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StatefulSet) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n21, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n21
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n22, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n22
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n23, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n23
+ return i, nil
+}
+
+func (m *StatefulSetList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StatefulSetList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n24, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n24
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *StatefulSetSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StatefulSetSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Replicas != nil {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.Replicas))
+ }
+ if m.Selector != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
+ n25, err := m.Selector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n25
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
+ n26, err := m.Template.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n26
+ if len(m.VolumeClaimTemplates) > 0 {
+ for _, msg := range m.VolumeClaimTemplates {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ServiceName)))
+ i += copy(dAtA[i:], m.ServiceName)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.PodManagementPolicy)))
+ i += copy(dAtA[i:], m.PodManagementPolicy)
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.UpdateStrategy.Size()))
+ n27, err := m.UpdateStrategy.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n27
+ if m.RevisionHistoryLimit != nil {
+ dAtA[i] = 0x40
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.RevisionHistoryLimit))
+ }
+ return i, nil
+}
+
+func (m *StatefulSetStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StatefulSetStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.ObservedGeneration != nil {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.ObservedGeneration))
+ }
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ReadyReplicas))
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentReplicas))
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.UpdatedReplicas))
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.CurrentRevision)))
+ i += copy(dAtA[i:], m.CurrentRevision)
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.UpdateRevision)))
+ i += copy(dAtA[i:], m.UpdateRevision)
+ return i, nil
+}
+
+func (m *StatefulSetUpdateStrategy) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StatefulSetUpdateStrategy) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ if m.RollingUpdate != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RollingUpdate.Size()))
+ n28, err := m.RollingUpdate.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n28
+ }
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *ControllerRevision) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Data.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.Revision))
+ return n
+}
+
+func (m *ControllerRevisionList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *Deployment) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *DeploymentCondition) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Status)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastUpdateTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastTransitionTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *DeploymentList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *DeploymentRollback) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.UpdatedAnnotations) > 0 {
+ for k, v := range m.UpdatedAnnotations {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ l = m.RollbackTo.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *DeploymentSpec) Size() (n int) {
+ var l int
+ _ = l
+ if m.Replicas != nil {
+ n += 1 + sovGenerated(uint64(*m.Replicas))
+ }
+ if m.Selector != nil {
+ l = m.Selector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ l = m.Template.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Strategy.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.MinReadySeconds))
+ if m.RevisionHistoryLimit != nil {
+ n += 1 + sovGenerated(uint64(*m.RevisionHistoryLimit))
+ }
+ n += 2
+ if m.RollbackTo != nil {
+ l = m.RollbackTo.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.ProgressDeadlineSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.ProgressDeadlineSeconds))
+ }
+ return n
+}
+
+func (m *DeploymentStatus) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.ObservedGeneration))
+ n += 1 + sovGenerated(uint64(m.Replicas))
+ n += 1 + sovGenerated(uint64(m.UpdatedReplicas))
+ n += 1 + sovGenerated(uint64(m.AvailableReplicas))
+ n += 1 + sovGenerated(uint64(m.UnavailableReplicas))
+ if len(m.Conditions) > 0 {
+ for _, e := range m.Conditions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ n += 1 + sovGenerated(uint64(m.ReadyReplicas))
+ if m.CollisionCount != nil {
+ n += 1 + sovGenerated(uint64(*m.CollisionCount))
+ }
+ return n
+}
+
+func (m *DeploymentStrategy) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.RollingUpdate != nil {
+ l = m.RollingUpdate.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *RollbackConfig) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Revision))
+ return n
+}
+
+func (m *RollingUpdateDeployment) Size() (n int) {
+ var l int
+ _ = l
+ if m.MaxUnavailable != nil {
+ l = m.MaxUnavailable.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.MaxSurge != nil {
+ l = m.MaxSurge.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *RollingUpdateStatefulSetStrategy) Size() (n int) {
+ var l int
+ _ = l
+ if m.Partition != nil {
+ n += 1 + sovGenerated(uint64(*m.Partition))
+ }
+ return n
+}
+
+func (m *Scale) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ScaleSpec) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Replicas))
+ return n
+}
+
+func (m *ScaleStatus) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Replicas))
+ if len(m.Selector) > 0 {
+ for k, v := range m.Selector {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ l = len(m.TargetSelector)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *StatefulSet) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *StatefulSetList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *StatefulSetSpec) Size() (n int) {
+ var l int
+ _ = l
+ if m.Replicas != nil {
+ n += 1 + sovGenerated(uint64(*m.Replicas))
+ }
+ if m.Selector != nil {
+ l = m.Selector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ l = m.Template.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.VolumeClaimTemplates) > 0 {
+ for _, e := range m.VolumeClaimTemplates {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.ServiceName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.PodManagementPolicy)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.UpdateStrategy.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.RevisionHistoryLimit != nil {
+ n += 1 + sovGenerated(uint64(*m.RevisionHistoryLimit))
+ }
+ return n
+}
+
+func (m *StatefulSetStatus) Size() (n int) {
+ var l int
+ _ = l
+ if m.ObservedGeneration != nil {
+ n += 1 + sovGenerated(uint64(*m.ObservedGeneration))
+ }
+ n += 1 + sovGenerated(uint64(m.Replicas))
+ n += 1 + sovGenerated(uint64(m.ReadyReplicas))
+ n += 1 + sovGenerated(uint64(m.CurrentReplicas))
+ n += 1 + sovGenerated(uint64(m.UpdatedReplicas))
+ l = len(m.CurrentRevision)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.UpdateRevision)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *StatefulSetUpdateStrategy) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.RollingUpdate != nil {
+ l = m.RollingUpdate.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *ControllerRevision) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ControllerRevision{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Data:` + strings.Replace(strings.Replace(this.Data.String(), "RawExtension", "k8s_io_apimachinery_pkg_runtime.RawExtension", 1), `&`, ``, 1) + `,`,
+ `Revision:` + fmt.Sprintf("%v", this.Revision) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ControllerRevisionList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ControllerRevisionList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ControllerRevision", "ControllerRevision", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Deployment) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Deployment{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DeploymentSpec", "DeploymentSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DeploymentStatus", "DeploymentStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeploymentCondition) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeploymentCondition{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `LastUpdateTime:` + strings.Replace(strings.Replace(this.LastUpdateTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeploymentList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeploymentList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Deployment", "Deployment", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeploymentRollback) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForUpdatedAnnotations := make([]string, 0, len(this.UpdatedAnnotations))
+ for k := range this.UpdatedAnnotations {
+ keysForUpdatedAnnotations = append(keysForUpdatedAnnotations, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForUpdatedAnnotations)
+ mapStringForUpdatedAnnotations := "map[string]string{"
+ for _, k := range keysForUpdatedAnnotations {
+ mapStringForUpdatedAnnotations += fmt.Sprintf("%v: %v,", k, this.UpdatedAnnotations[k])
+ }
+ mapStringForUpdatedAnnotations += "}"
+ s := strings.Join([]string{`&DeploymentRollback{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `UpdatedAnnotations:` + mapStringForUpdatedAnnotations + `,`,
+ `RollbackTo:` + strings.Replace(strings.Replace(this.RollbackTo.String(), "RollbackConfig", "RollbackConfig", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeploymentSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeploymentSpec{`,
+ `Replicas:` + valueToStringGenerated(this.Replicas) + `,`,
+ `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
+ `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_kubernetes_pkg_api_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
+ `Strategy:` + strings.Replace(strings.Replace(this.Strategy.String(), "DeploymentStrategy", "DeploymentStrategy", 1), `&`, ``, 1) + `,`,
+ `MinReadySeconds:` + fmt.Sprintf("%v", this.MinReadySeconds) + `,`,
+ `RevisionHistoryLimit:` + valueToStringGenerated(this.RevisionHistoryLimit) + `,`,
+ `Paused:` + fmt.Sprintf("%v", this.Paused) + `,`,
+ `RollbackTo:` + strings.Replace(fmt.Sprintf("%v", this.RollbackTo), "RollbackConfig", "RollbackConfig", 1) + `,`,
+ `ProgressDeadlineSeconds:` + valueToStringGenerated(this.ProgressDeadlineSeconds) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeploymentStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeploymentStatus{`,
+ `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
+ `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
+ `UpdatedReplicas:` + fmt.Sprintf("%v", this.UpdatedReplicas) + `,`,
+ `AvailableReplicas:` + fmt.Sprintf("%v", this.AvailableReplicas) + `,`,
+ `UnavailableReplicas:` + fmt.Sprintf("%v", this.UnavailableReplicas) + `,`,
+ `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "DeploymentCondition", "DeploymentCondition", 1), `&`, ``, 1) + `,`,
+ `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`,
+ `CollisionCount:` + valueToStringGenerated(this.CollisionCount) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeploymentStrategy) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeploymentStrategy{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `RollingUpdate:` + strings.Replace(fmt.Sprintf("%v", this.RollingUpdate), "RollingUpdateDeployment", "RollingUpdateDeployment", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RollbackConfig) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RollbackConfig{`,
+ `Revision:` + fmt.Sprintf("%v", this.Revision) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RollingUpdateDeployment) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RollingUpdateDeployment{`,
+ `MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
+ `MaxSurge:` + strings.Replace(fmt.Sprintf("%v", this.MaxSurge), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RollingUpdateStatefulSetStrategy) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RollingUpdateStatefulSetStrategy{`,
+ `Partition:` + valueToStringGenerated(this.Partition) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Scale) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Scale{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ScaleSpec", "ScaleSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ScaleStatus", "ScaleStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ScaleSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ScaleSpec{`,
+ `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ScaleStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForSelector := make([]string, 0, len(this.Selector))
+ for k := range this.Selector {
+ keysForSelector = append(keysForSelector, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForSelector)
+ mapStringForSelector := "map[string]string{"
+ for _, k := range keysForSelector {
+ mapStringForSelector += fmt.Sprintf("%v: %v,", k, this.Selector[k])
+ }
+ mapStringForSelector += "}"
+ s := strings.Join([]string{`&ScaleStatus{`,
+ `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
+ `Selector:` + mapStringForSelector + `,`,
+ `TargetSelector:` + fmt.Sprintf("%v", this.TargetSelector) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StatefulSet) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StatefulSet{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "StatefulSetSpec", "StatefulSetSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "StatefulSetStatus", "StatefulSetStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StatefulSetList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StatefulSetList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "StatefulSet", "StatefulSet", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StatefulSetSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StatefulSetSpec{`,
+ `Replicas:` + valueToStringGenerated(this.Replicas) + `,`,
+ `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
+ `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_kubernetes_pkg_api_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
+ `VolumeClaimTemplates:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VolumeClaimTemplates), "PersistentVolumeClaim", "k8s_io_kubernetes_pkg_api_v1.PersistentVolumeClaim", 1), `&`, ``, 1) + `,`,
+ `ServiceName:` + fmt.Sprintf("%v", this.ServiceName) + `,`,
+ `PodManagementPolicy:` + fmt.Sprintf("%v", this.PodManagementPolicy) + `,`,
+ `UpdateStrategy:` + strings.Replace(strings.Replace(this.UpdateStrategy.String(), "StatefulSetUpdateStrategy", "StatefulSetUpdateStrategy", 1), `&`, ``, 1) + `,`,
+ `RevisionHistoryLimit:` + valueToStringGenerated(this.RevisionHistoryLimit) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StatefulSetStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StatefulSetStatus{`,
+ `ObservedGeneration:` + valueToStringGenerated(this.ObservedGeneration) + `,`,
+ `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
+ `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`,
+ `CurrentReplicas:` + fmt.Sprintf("%v", this.CurrentReplicas) + `,`,
+ `UpdatedReplicas:` + fmt.Sprintf("%v", this.UpdatedReplicas) + `,`,
+ `CurrentRevision:` + fmt.Sprintf("%v", this.CurrentRevision) + `,`,
+ `UpdateRevision:` + fmt.Sprintf("%v", this.UpdateRevision) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StatefulSetUpdateStrategy) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StatefulSetUpdateStrategy{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `RollingUpdate:` + strings.Replace(fmt.Sprintf("%v", this.RollingUpdate), "RollingUpdateStatefulSetStrategy", "RollingUpdateStatefulSetStrategy", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *ControllerRevision) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ControllerRevision: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ControllerRevision: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType)
+ }
+ m.Revision = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Revision |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ControllerRevisionList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ControllerRevisionList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ControllerRevisionList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ControllerRevision{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Deployment) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Deployment: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Deployment: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeploymentCondition) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeploymentCondition: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeploymentCondition: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = DeploymentConditionType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Status = k8s_io_kubernetes_pkg_api_v1.ConditionStatus(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastUpdateTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastUpdateTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeploymentList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeploymentList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeploymentList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, Deployment{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeploymentRollback) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeploymentRollback: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeploymentRollback: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAnnotations", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.UpdatedAnnotations == nil {
+ m.UpdatedAnnotations = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.UpdatedAnnotations[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.UpdatedAnnotations[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RollbackTo", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.RollbackTo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeploymentSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeploymentSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeploymentSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Replicas = &v
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Selector == nil {
+ m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
+ }
+ if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Strategy", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Strategy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MinReadySeconds", wireType)
+ }
+ m.MinReadySeconds = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.MinReadySeconds |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RevisionHistoryLimit", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.RevisionHistoryLimit = &v
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Paused", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Paused = bool(v != 0)
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RollbackTo", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.RollbackTo == nil {
+ m.RollbackTo = &RollbackConfig{}
+ }
+ if err := m.RollbackTo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 9:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ProgressDeadlineSeconds", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ProgressDeadlineSeconds = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeploymentStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeploymentStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeploymentStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
+ }
+ m.ObservedGeneration = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ObservedGeneration |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ m.Replicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Replicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UpdatedReplicas", wireType)
+ }
+ m.UpdatedReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.UpdatedReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AvailableReplicas", wireType)
+ }
+ m.AvailableReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.AvailableReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UnavailableReplicas", wireType)
+ }
+ m.UnavailableReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.UnavailableReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Conditions = append(m.Conditions, DeploymentCondition{})
+ if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadyReplicas", wireType)
+ }
+ m.ReadyReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ReadyReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 8:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CollisionCount", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.CollisionCount = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeploymentStrategy) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeploymentStrategy: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeploymentStrategy: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = DeploymentStrategyType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RollingUpdate", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.RollingUpdate == nil {
+ m.RollingUpdate = &RollingUpdateDeployment{}
+ }
+ if err := m.RollingUpdate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RollbackConfig) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RollbackConfig: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RollbackConfig: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType)
+ }
+ m.Revision = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Revision |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RollingUpdateDeployment) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RollingUpdateDeployment: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RollingUpdateDeployment: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MaxUnavailable", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.MaxUnavailable == nil {
+ m.MaxUnavailable = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
+ }
+ if err := m.MaxUnavailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MaxSurge", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.MaxSurge == nil {
+ m.MaxSurge = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
+ }
+ if err := m.MaxSurge.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RollingUpdateStatefulSetStrategy) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RollingUpdateStatefulSetStrategy: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RollingUpdateStatefulSetStrategy: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Partition", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Partition = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Scale) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Scale: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Scale: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ScaleSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ScaleSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ScaleSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ m.Replicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Replicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ScaleStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ScaleStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ScaleStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ m.Replicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Replicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Selector == nil {
+ m.Selector = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Selector[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Selector[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetSelector", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.TargetSelector = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StatefulSet) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StatefulSet: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StatefulSet: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StatefulSetList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StatefulSetList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StatefulSetList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, StatefulSet{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StatefulSetSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StatefulSetSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StatefulSetSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Replicas = &v
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Selector == nil {
+ m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
+ }
+ if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeClaimTemplates", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumeClaimTemplates = append(m.VolumeClaimTemplates, k8s_io_kubernetes_pkg_api_v1.PersistentVolumeClaim{})
+ if err := m.VolumeClaimTemplates[len(m.VolumeClaimTemplates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ServiceName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ServiceName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodManagementPolicy", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PodManagementPolicy = PodManagementPolicyType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UpdateStrategy", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.UpdateStrategy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RevisionHistoryLimit", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.RevisionHistoryLimit = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StatefulSetStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StatefulSetStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StatefulSetStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ObservedGeneration = &v
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ m.Replicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Replicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadyReplicas", wireType)
+ }
+ m.ReadyReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ReadyReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentReplicas", wireType)
+ }
+ m.CurrentReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.CurrentReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UpdatedReplicas", wireType)
+ }
+ m.UpdatedReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.UpdatedReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentRevision", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.CurrentRevision = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UpdateRevision", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.UpdateRevision = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StatefulSetUpdateStrategy) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StatefulSetUpdateStrategy: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StatefulSetUpdateStrategy: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = StatefulSetUpdateStrategyType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RollingUpdate", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.RollingUpdate == nil {
+ m.RollingUpdate = &RollingUpdateStatefulSetStrategy{}
+ }
+ if err := m.RollingUpdate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/client-go/pkg/apis/apps/v1beta1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 1812 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0x4f, 0x6f, 0x23, 0x49,
+ 0x15, 0x4f, 0xfb, 0x4f, 0xe2, 0x54, 0x36, 0xce, 0x4c, 0x25, 0x4c, 0xbc, 0x59, 0x70, 0x22, 0x1f,
+ 0x76, 0x03, 0x6c, 0xda, 0x4c, 0x66, 0xd8, 0x9d, 0x49, 0xd0, 0x88, 0x74, 0x66, 0x58, 0x06, 0x25,
+ 0x24, 0x2a, 0x27, 0x23, 0x76, 0x58, 0xa4, 0x2d, 0xb7, 0x6b, 0x3a, 0xbd, 0xe9, 0x7f, 0xea, 0xae,
+ 0x36, 0xe3, 0x1b, 0x5a, 0x89, 0x1b, 0x07, 0xbe, 0x00, 0xe2, 0x8e, 0x90, 0xf8, 0x1a, 0x11, 0x1c,
+ 0x58, 0x71, 0x1a, 0x71, 0x88, 0x88, 0xf7, 0x23, 0x20, 0x2e, 0x73, 0x42, 0x55, 0x5d, 0xfd, 0xdf,
+ 0x9d, 0xd8, 0x46, 0xe4, 0xb2, 0x37, 0x77, 0xbd, 0xf7, 0x7e, 0xef, 0x55, 0xd5, 0x7b, 0xaf, 0x7e,
+ 0xcf, 0xe0, 0xe3, 0xf3, 0x47, 0x9e, 0xac, 0xdb, 0xed, 0x73, 0xbf, 0x4b, 0x5c, 0x8b, 0x50, 0xe2,
+ 0xb5, 0x9d, 0x73, 0xad, 0x8d, 0x1d, 0xdd, 0x6b, 0x63, 0xc7, 0xf1, 0xda, 0xfd, 0xfb, 0x5d, 0x42,
+ 0xf1, 0xfd, 0xb6, 0x46, 0x2c, 0xe2, 0x62, 0x4a, 0x7a, 0xb2, 0xe3, 0xda, 0xd4, 0x86, 0x1f, 0x04,
+ 0x86, 0x72, 0x6c, 0x28, 0x3b, 0xe7, 0x9a, 0xcc, 0x0c, 0x65, 0x66, 0x28, 0x0b, 0xc3, 0xb5, 0x2d,
+ 0x4d, 0xa7, 0x67, 0x7e, 0x57, 0x56, 0x6d, 0xb3, 0xad, 0xd9, 0x9a, 0xdd, 0xe6, 0xf6, 0x5d, 0xff,
+ 0x15, 0xff, 0xe2, 0x1f, 0xfc, 0x57, 0x80, 0xbb, 0xf6, 0x50, 0x04, 0x84, 0x1d, 0xdd, 0xc4, 0xea,
+ 0x99, 0x6e, 0x11, 0x77, 0x10, 0x87, 0x64, 0x12, 0x8a, 0xdb, 0xfd, 0x5c, 0x34, 0x6b, 0xed, 0x22,
+ 0x2b, 0xd7, 0xb7, 0xa8, 0x6e, 0x92, 0x9c, 0xc1, 0x47, 0x37, 0x19, 0x78, 0xea, 0x19, 0x31, 0x71,
+ 0xce, 0xee, 0x41, 0x91, 0x9d, 0x4f, 0x75, 0xa3, 0xad, 0x5b, 0xd4, 0xa3, 0x6e, 0xce, 0xe8, 0xc3,
+ 0xc2, 0x43, 0x1e, 0xb5, 0x97, 0xc7, 0xd7, 0x5c, 0x89, 0x63, 0x1b, 0xba, 0x3a, 0x28, 0xba, 0x94,
+ 0xd6, 0x7f, 0x24, 0x00, 0xf7, 0x6d, 0x8b, 0xba, 0xb6, 0x61, 0x10, 0x17, 0x91, 0xbe, 0xee, 0xe9,
+ 0xb6, 0x05, 0x3f, 0x07, 0x35, 0x76, 0x70, 0x3d, 0x4c, 0x71, 0x43, 0xda, 0x90, 0x36, 0x17, 0xb6,
+ 0x7f, 0x20, 0x8b, 0xeb, 0x4b, 0xee, 0x23, 0xbe, 0x40, 0xa6, 0x2d, 0xf7, 0xef, 0xcb, 0x47, 0xdd,
+ 0x2f, 0x88, 0x4a, 0x0f, 0x09, 0xc5, 0x0a, 0xbc, 0xb8, 0x5c, 0x9f, 0x19, 0x5e, 0xae, 0x83, 0x78,
+ 0x0d, 0x45, 0xa8, 0xf0, 0x08, 0x54, 0x38, 0x7a, 0x89, 0xa3, 0x6f, 0x15, 0xa2, 0x8b, 0xd3, 0x95,
+ 0x11, 0xfe, 0xf5, 0xb3, 0xd7, 0x94, 0x58, 0x2c, 0x3c, 0xe5, 0x1d, 0x01, 0x5d, 0x79, 0x8a, 0x29,
+ 0x46, 0x1c, 0x08, 0x7e, 0x08, 0x6a, 0xae, 0x08, 0xbf, 0x51, 0xde, 0x90, 0x36, 0xcb, 0xca, 0x1d,
+ 0xa1, 0x55, 0x0b, 0xb7, 0x85, 0x22, 0x8d, 0xd6, 0x1b, 0x09, 0xdc, 0xcb, 0xef, 0xfb, 0x40, 0xf7,
+ 0x28, 0xfc, 0x2c, 0xb7, 0x77, 0x79, 0xbc, 0xbd, 0x33, 0x6b, 0xbe, 0xf3, 0xc8, 0x71, 0xb8, 0x92,
+ 0xd8, 0xf7, 0xe7, 0xa0, 0xaa, 0x53, 0x62, 0x7a, 0x8d, 0xd2, 0x46, 0x79, 0x73, 0x61, 0x7b, 0x57,
+ 0x1e, 0xb3, 0x2a, 0xe4, 0x7c, 0xb4, 0xca, 0xa2, 0xf0, 0x53, 0x7d, 0xce, 0x10, 0x51, 0x00, 0xdc,
+ 0xfa, 0x73, 0x09, 0x80, 0xa7, 0xc4, 0x31, 0xec, 0x81, 0x49, 0x2c, 0x7a, 0x0b, 0x57, 0xf9, 0x29,
+ 0xa8, 0x78, 0x0e, 0x51, 0xc5, 0x55, 0x7e, 0x3c, 0xf6, 0x8e, 0xe2, 0x20, 0x3b, 0x0e, 0x51, 0xe3,
+ 0x4b, 0x65, 0x5f, 0x88, 0x43, 0x42, 0x0c, 0x66, 0x3d, 0x8a, 0xa9, 0xef, 0xf1, 0x2b, 0x5d, 0xd8,
+ 0x7e, 0x3c, 0x0d, 0x38, 0x07, 0x50, 0xea, 0x02, 0x7e, 0x36, 0xf8, 0x46, 0x02, 0xb8, 0x75, 0x55,
+ 0x06, 0xcb, 0xb1, 0xf2, 0xbe, 0x6d, 0xf5, 0x74, 0xca, 0x4a, 0x60, 0x17, 0x54, 0xe8, 0xc0, 0x21,
+ 0xfc, 0xcc, 0xe6, 0x95, 0x0f, 0xc2, 0xe0, 0x4e, 0x06, 0x0e, 0x79, 0x7b, 0xb9, 0xbe, 0x3a, 0xc2,
+ 0x84, 0x89, 0x10, 0x37, 0x82, 0x2f, 0xa2, 0xb8, 0x4b, 0xdc, 0xfc, 0x49, 0xda, 0xf9, 0xdb, 0xcb,
+ 0xf5, 0x6b, 0x2b, 0x5c, 0x8e, 0x30, 0xd3, 0xc1, 0xc2, 0xf7, 0xc1, 0xac, 0x4b, 0xb0, 0x67, 0x5b,
+ 0x8d, 0x0a, 0xc7, 0x8d, 0x36, 0x85, 0xf8, 0x2a, 0x12, 0x52, 0xf8, 0x5d, 0x30, 0x67, 0x12, 0xcf,
+ 0xc3, 0x1a, 0x69, 0x54, 0xb9, 0xe2, 0x92, 0x50, 0x9c, 0x3b, 0x0c, 0x96, 0x51, 0x28, 0x87, 0x5f,
+ 0x80, 0xba, 0x81, 0x3d, 0x7a, 0xea, 0xf4, 0x30, 0x25, 0x27, 0xba, 0x49, 0x1a, 0xb3, 0xfc, 0xa8,
+ 0xbf, 0x37, 0x5e, 0x96, 0x30, 0x0b, 0xe5, 0x9e, 0x40, 0xaf, 0x1f, 0xa4, 0x90, 0x50, 0x06, 0x19,
+ 0xf6, 0x01, 0x64, 0x2b, 0x27, 0x2e, 0xb6, 0xbc, 0xe0, 0xc8, 0x98, 0xbf, 0xb9, 0x89, 0xfd, 0xad,
+ 0x09, 0x7f, 0xf0, 0x20, 0x87, 0x86, 0x46, 0x78, 0x68, 0x5d, 0x48, 0xa0, 0x1e, 0x5f, 0xd8, 0x2d,
+ 0x54, 0xf9, 0x2f, 0xd2, 0x55, 0xfe, 0x60, 0x8a, 0xb4, 0x2d, 0xa8, 0xee, 0xdf, 0x95, 0x01, 0x8c,
+ 0x95, 0x90, 0x6d, 0x18, 0x5d, 0xac, 0x9e, 0xc3, 0x0d, 0x50, 0xb1, 0xb0, 0x19, 0x66, 0x6b, 0x54,
+ 0x4a, 0x3f, 0xc7, 0x26, 0x41, 0x5c, 0x02, 0xff, 0x28, 0x01, 0xe8, 0xf3, 0xab, 0xe8, 0xed, 0x59,
+ 0x96, 0x4d, 0x31, 0x3b, 0x9d, 0x30, 0xc0, 0xce, 0x14, 0x01, 0x86, 0xbe, 0xe5, 0xd3, 0x1c, 0xea,
+ 0x33, 0x8b, 0xba, 0x83, 0xf8, 0x96, 0xf2, 0x0a, 0x68, 0x44, 0x28, 0xf0, 0x1c, 0x00, 0x57, 0x60,
+ 0x9e, 0xd8, 0xa2, 0xe0, 0xc7, 0xef, 0x26, 0x61, 0x38, 0xfb, 0xb6, 0xf5, 0x4a, 0xd7, 0xe2, 0x96,
+ 0x85, 0x22, 0x48, 0x94, 0x80, 0x5f, 0x7b, 0x06, 0x56, 0x0b, 0xe2, 0x86, 0x77, 0x40, 0xf9, 0x9c,
+ 0x0c, 0x82, 0xa3, 0x44, 0xec, 0x27, 0x5c, 0x01, 0xd5, 0x3e, 0x36, 0x7c, 0x12, 0x54, 0x33, 0x0a,
+ 0x3e, 0x76, 0x4a, 0x8f, 0xa4, 0xd6, 0x3f, 0xab, 0xc9, 0xcc, 0x62, 0x9d, 0x0b, 0x6e, 0xb2, 0x87,
+ 0xc8, 0x31, 0x74, 0x15, 0x7b, 0x1c, 0xa3, 0xaa, 0xbc, 0x13, 0x3c, 0x42, 0xc1, 0x1a, 0x8a, 0xa4,
+ 0xf0, 0x57, 0xa0, 0xe6, 0x11, 0x83, 0xa8, 0xd4, 0x76, 0x45, 0xf3, 0x7c, 0x30, 0x66, 0x0e, 0xe2,
+ 0x2e, 0x31, 0x3a, 0xc2, 0x34, 0x80, 0x0f, 0xbf, 0x50, 0x04, 0x09, 0x7f, 0x09, 0x6a, 0x94, 0x98,
+ 0x8e, 0x81, 0x29, 0x11, 0xa7, 0xb9, 0x55, 0x7c, 0x9a, 0x0c, 0xf6, 0xd8, 0xee, 0x9d, 0x08, 0x03,
+ 0xde, 0x91, 0xa3, 0x0c, 0x0f, 0x57, 0x51, 0x04, 0x08, 0x75, 0x50, 0xf3, 0x28, 0x63, 0x12, 0xda,
+ 0x80, 0xf7, 0xa2, 0x49, 0x9e, 0xb2, 0x64, 0x6f, 0x0e, 0x20, 0x62, 0x57, 0xe1, 0x0a, 0x8a, 0xe0,
+ 0xe1, 0x1e, 0x58, 0x32, 0x75, 0x0b, 0x11, 0xdc, 0x1b, 0x74, 0x88, 0x6a, 0x5b, 0x3d, 0x8f, 0x37,
+ 0xb5, 0xaa, 0xb2, 0x2a, 0x8c, 0x96, 0x0e, 0xd3, 0x62, 0x94, 0xd5, 0x87, 0x07, 0x60, 0x25, 0x7c,
+ 0xfa, 0x7f, 0xaa, 0x7b, 0xd4, 0x76, 0x07, 0x07, 0xba, 0xa9, 0x53, 0xde, 0xea, 0xaa, 0x4a, 0x63,
+ 0x78, 0xb9, 0xbe, 0x82, 0x46, 0xc8, 0xd1, 0x48, 0x2b, 0xd6, 0x85, 0x1d, 0xec, 0x7b, 0xa4, 0xc7,
+ 0x5b, 0x57, 0x2d, 0xee, 0xc2, 0xc7, 0x7c, 0x15, 0x09, 0x29, 0xd4, 0x52, 0x09, 0x5d, 0xfb, 0xdf,
+ 0x12, 0xba, 0x5e, 0x9c, 0xcc, 0xf0, 0x14, 0xac, 0x3a, 0xae, 0xad, 0xb9, 0xc4, 0xf3, 0x9e, 0x12,
+ 0xdc, 0x33, 0x74, 0x8b, 0x84, 0x27, 0x35, 0xcf, 0x77, 0xf8, 0xde, 0xf0, 0x72, 0x7d, 0xf5, 0x78,
+ 0xb4, 0x0a, 0x2a, 0xb2, 0x6d, 0xfd, 0xa3, 0x02, 0xee, 0x64, 0xdf, 0x51, 0xf8, 0x33, 0x00, 0xed,
+ 0xae, 0x47, 0xdc, 0x3e, 0xe9, 0x7d, 0x12, 0x90, 0x49, 0xc6, 0xb8, 0x24, 0xce, 0xb8, 0xa2, 0x8a,
+ 0x3f, 0xca, 0x69, 0xa0, 0x11, 0x56, 0x01, 0x67, 0x13, 0xa5, 0x52, 0xe2, 0x81, 0x26, 0x38, 0x5b,
+ 0xae, 0x5c, 0xf6, 0xc0, 0x92, 0xe8, 0x1a, 0xa1, 0x90, 0xa7, 0x75, 0x22, 0x0f, 0x4e, 0xd3, 0x62,
+ 0x94, 0xd5, 0x87, 0x9f, 0x80, 0xbb, 0xb8, 0x8f, 0x75, 0x03, 0x77, 0x0d, 0x12, 0x81, 0x54, 0x38,
+ 0xc8, 0xbb, 0x02, 0xe4, 0xee, 0x5e, 0x56, 0x01, 0xe5, 0x6d, 0xe0, 0x21, 0x58, 0xf6, 0xad, 0x3c,
+ 0x54, 0x90, 0x97, 0xef, 0x09, 0xa8, 0xe5, 0xd3, 0xbc, 0x0a, 0x1a, 0x65, 0x07, 0x1d, 0x00, 0xd4,
+ 0xf0, 0xc9, 0xf7, 0x1a, 0xb3, 0xbc, 0x27, 0xff, 0x68, 0x8a, 0x7a, 0x8a, 0x78, 0x43, 0xdc, 0xff,
+ 0xa2, 0x25, 0x0f, 0x25, 0x7c, 0xc0, 0x5d, 0xb0, 0xe8, 0xb2, 0x0a, 0x89, 0x42, 0x9f, 0xe3, 0xa1,
+ 0x7f, 0x4b, 0x98, 0x2d, 0xa2, 0xa4, 0x10, 0xa5, 0x75, 0xe1, 0x0e, 0xa8, 0xab, 0xb6, 0x61, 0xf0,
+ 0xca, 0xd8, 0xb7, 0x7d, 0x8b, 0xf2, 0xe4, 0x2e, 0x2b, 0x90, 0x71, 0x80, 0xfd, 0x94, 0x04, 0x65,
+ 0x34, 0x5b, 0x7f, 0x93, 0x92, 0x0f, 0x58, 0x58, 0xee, 0x70, 0x27, 0x45, 0xb7, 0xde, 0xcf, 0xd0,
+ 0xad, 0x7b, 0x79, 0x8b, 0x04, 0xdb, 0x1a, 0x80, 0x45, 0x56, 0x0c, 0xba, 0xa5, 0x05, 0x09, 0x20,
+ 0x9a, 0xe9, 0x8f, 0x27, 0x2a, 0xb5, 0xc8, 0x3a, 0xf1, 0x04, 0xdf, 0xe5, 0x27, 0x91, 0x14, 0xa2,
+ 0xb4, 0xa7, 0xd6, 0x13, 0x50, 0x4f, 0xd7, 0x69, 0x6a, 0x0e, 0x91, 0x6e, 0x9c, 0x43, 0xbe, 0x96,
+ 0xc0, 0x6a, 0x81, 0x77, 0x68, 0x80, 0xba, 0x89, 0x5f, 0x27, 0x72, 0xe8, 0x46, 0xfe, 0xce, 0x46,
+ 0x4a, 0x39, 0x18, 0x29, 0xe5, 0xe7, 0x16, 0x3d, 0x72, 0x3b, 0xd4, 0xd5, 0x2d, 0x2d, 0xb8, 0x97,
+ 0xc3, 0x14, 0x16, 0xca, 0x60, 0xc3, 0x97, 0xa0, 0x66, 0xe2, 0xd7, 0x1d, 0xdf, 0xd5, 0xc2, 0xf3,
+ 0x9b, 0xdc, 0x0f, 0x7f, 0x89, 0x0e, 0x05, 0x0a, 0x8a, 0xf0, 0x5a, 0x47, 0x60, 0x23, 0xb5, 0x49,
+ 0xd6, 0x4a, 0xc8, 0x2b, 0xdf, 0xe8, 0x90, 0x38, 0x01, 0xbe, 0x0f, 0xe6, 0x1d, 0xec, 0x52, 0x3d,
+ 0x6a, 0x27, 0x55, 0x65, 0x71, 0x78, 0xb9, 0x3e, 0x7f, 0x1c, 0x2e, 0xa2, 0x58, 0xde, 0xfa, 0x43,
+ 0x09, 0x54, 0x3b, 0x2a, 0x36, 0xc8, 0x2d, 0x8c, 0x37, 0x27, 0xa9, 0xf1, 0x66, 0x7b, 0xec, 0xa4,
+ 0xe2, 0xf1, 0x15, 0x4e, 0x36, 0x9f, 0x65, 0x26, 0x9b, 0x87, 0x13, 0xe2, 0x5e, 0x3f, 0xd4, 0x3c,
+ 0x06, 0xf3, 0x91, 0xfb, 0x54, 0x97, 0x95, 0x6e, 0xea, 0xb2, 0xad, 0x3f, 0x95, 0xc0, 0x42, 0xc2,
+ 0xc5, 0x64, 0xd6, 0xd0, 0x49, 0x51, 0x1a, 0xd6, 0xc6, 0x94, 0x69, 0x36, 0x26, 0x87, 0x74, 0x26,
+ 0x60, 0x92, 0x31, 0x3b, 0xc8, 0xb3, 0x9c, 0x27, 0xa0, 0x4e, 0xb1, 0xab, 0x11, 0x1a, 0xca, 0xf8,
+ 0x81, 0xce, 0xc7, 0x33, 0xc9, 0x49, 0x4a, 0x8a, 0x32, 0xda, 0x6b, 0xbb, 0x60, 0x31, 0xe5, 0x6c,
+ 0x22, 0xfa, 0xf7, 0x17, 0x76, 0x58, 0x71, 0x32, 0xdf, 0x42, 0x36, 0xbe, 0x4c, 0x65, 0xe3, 0xa3,
+ 0xf1, 0x0f, 0x37, 0x51, 0x72, 0x45, 0x39, 0xd9, 0xcd, 0xe4, 0xe4, 0xce, 0x54, 0xe8, 0xd7, 0x67,
+ 0xe6, 0x5f, 0x25, 0xb0, 0x94, 0xd0, 0xbe, 0x85, 0x59, 0xec, 0xd3, 0xf4, 0x2c, 0xf6, 0x70, 0x9a,
+ 0x4d, 0x15, 0x0c, 0x63, 0xff, 0xae, 0xa6, 0x36, 0xf3, 0x0d, 0xa2, 0xff, 0xbf, 0x95, 0xc0, 0x4a,
+ 0xdf, 0x36, 0x7c, 0x93, 0xec, 0x1b, 0x58, 0x37, 0x43, 0x0d, 0x46, 0xa6, 0x6e, 0x18, 0x78, 0xb9,
+ 0x27, 0xe2, 0x7a, 0xba, 0x47, 0x89, 0x45, 0x5f, 0xc4, 0x18, 0xca, 0xb7, 0x85, 0xbf, 0x95, 0x17,
+ 0x23, 0x80, 0xd1, 0x48, 0x77, 0xf0, 0x87, 0x60, 0x81, 0xb1, 0x4a, 0x5d, 0x25, 0x6c, 0xd4, 0x15,
+ 0x7f, 0x76, 0x2c, 0x0b, 0xa0, 0x85, 0x4e, 0x2c, 0x42, 0x49, 0x3d, 0x78, 0x06, 0x96, 0x1d, 0xbb,
+ 0x77, 0x88, 0x2d, 0xac, 0x11, 0xf6, 0xd6, 0x1e, 0xf3, 0x7f, 0x49, 0xf9, 0x38, 0x30, 0xaf, 0x7c,
+ 0x14, 0xd2, 0xb7, 0xe3, 0xbc, 0xca, 0x5b, 0xc6, 0xa3, 0xf3, 0xcb, 0x9c, 0x8c, 0x8c, 0x82, 0x84,
+ 0x5f, 0x4a, 0xa0, 0xee, 0x8b, 0x47, 0x4f, 0x8c, 0x4b, 0xc1, 0xff, 0x1d, 0xca, 0x34, 0x79, 0x78,
+ 0x9a, 0x42, 0x8a, 0x7b, 0x5c, 0x7a, 0x1d, 0x65, 0x3c, 0x16, 0x8e, 0x3f, 0xb5, 0x69, 0xc6, 0x9f,
+ 0xd6, 0xdf, 0xcb, 0xe0, 0x6e, 0xae, 0xe0, 0xe1, 0x4f, 0xae, 0x99, 0x0b, 0xee, 0xfd, 0xdf, 0x66,
+ 0x82, 0x1c, 0x8d, 0x2d, 0x4f, 0x40, 0x63, 0xf7, 0xc0, 0x92, 0xea, 0xbb, 0x2e, 0xb1, 0x68, 0x66,
+ 0x16, 0x88, 0x06, 0x8a, 0xfd, 0xb4, 0x18, 0x65, 0xf5, 0x47, 0xcd, 0x24, 0xd5, 0x09, 0x67, 0x92,
+ 0x64, 0x14, 0x82, 0x37, 0x06, 0x79, 0x98, 0x8f, 0x42, 0xd0, 0xc7, 0xac, 0x3e, 0x7b, 0x03, 0x03,
+ 0xd4, 0x08, 0x61, 0x2e, 0xfd, 0x06, 0x9e, 0xa6, 0xa4, 0x28, 0xa3, 0xcd, 0x58, 0xe8, 0xbb, 0x85,
+ 0x59, 0x06, 0xf7, 0x52, 0xd4, 0x7c, 0x2b, 0x43, 0xcd, 0xbf, 0x53, 0x68, 0x98, 0x60, 0xe8, 0x5f,
+ 0x4a, 0xa3, 0x29, 0xfa, 0xf3, 0xe9, 0x28, 0xfa, 0x08, 0xfe, 0x78, 0x33, 0x57, 0x57, 0xb6, 0x2e,
+ 0xae, 0x9a, 0x33, 0x5f, 0x5d, 0x35, 0x67, 0xde, 0x5c, 0x35, 0x67, 0x7e, 0x33, 0x6c, 0x4a, 0x17,
+ 0xc3, 0xa6, 0xf4, 0xd5, 0xb0, 0x29, 0xbd, 0x19, 0x36, 0xa5, 0x7f, 0x0d, 0x9b, 0xd2, 0xef, 0xbf,
+ 0x6e, 0xce, 0xbc, 0x9c, 0x13, 0x1e, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x97, 0x69, 0x29, 0x49,
+ 0xe9, 0x1a, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.proto
new file mode 100644
index 000000000..807fa3c51
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.proto
@@ -0,0 +1,441 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.client_go.pkg.apis.apps.v1beta1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+import "k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1beta1";
+
+// ControllerRevision implements an immutable snapshot of state data. Clients
+// are responsible for serializing and deserializing the objects that contain
+// their internal state.
+// Once a ControllerRevision has been successfully created, it can not be updated.
+// The API Server will fail validation of all requests that attempt to mutate
+// the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both
+// the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However,
+// it may be subject to name and representation changes in future releases, and clients should not
+// depend on its stability. It is primarily for internal use by controllers.
+message ControllerRevision {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Data is the serialized representation of the state.
+ optional k8s.io.apimachinery.pkg.runtime.RawExtension data = 2;
+
+ // Revision indicates the revision of the state represented by Data.
+ optional int64 revision = 3;
+}
+
+// ControllerRevisionList is a resource containing a list of ControllerRevision objects.
+message ControllerRevisionList {
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is the list of ControllerRevisions
+ repeated ControllerRevision items = 2;
+}
+
+// Deployment enables declarative updates for Pods and ReplicaSets.
+message Deployment {
+ // Standard object metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Specification of the desired behavior of the Deployment.
+ // +optional
+ optional DeploymentSpec spec = 2;
+
+ // Most recently observed status of the Deployment.
+ // +optional
+ optional DeploymentStatus status = 3;
+}
+
+// DeploymentCondition describes the state of a deployment at a certain point.
+message DeploymentCondition {
+ // Type of deployment condition.
+ optional string type = 1;
+
+ // Status of the condition, one of True, False, Unknown.
+ optional string status = 2;
+
+ // The last time this condition was updated.
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 6;
+
+ // Last time the condition transitioned from one status to another.
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 7;
+
+ // The reason for the condition's last transition.
+ optional string reason = 4;
+
+ // A human readable message indicating details about the transition.
+ optional string message = 5;
+}
+
+// DeploymentList is a list of Deployments.
+message DeploymentList {
+ // Standard list metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is the list of Deployments.
+ repeated Deployment items = 2;
+}
+
+// DeploymentRollback stores the information required to rollback a deployment.
+message DeploymentRollback {
+ // Required: This must match the Name of a deployment.
+ optional string name = 1;
+
+ // The annotations to be updated to a deployment
+ // +optional
+ map<string, string> updatedAnnotations = 2;
+
+ // The config of this deployment rollback.
+ optional RollbackConfig rollbackTo = 3;
+}
+
+// DeploymentSpec is the specification of the desired behavior of the Deployment.
+message DeploymentSpec {
+ // Number of desired pods. This is a pointer to distinguish between explicit
+ // zero and not specified. Defaults to 1.
+ // +optional
+ optional int32 replicas = 1;
+
+ // Label selector for pods. Existing ReplicaSets whose pods are
+ // selected by this will be the ones affected by this deployment.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
+
+ // Template describes the pods that will be created.
+ optional k8s.io.client_go.pkg.api.v1.PodTemplateSpec template = 3;
+
+ // The deployment strategy to use to replace existing pods with new ones.
+ // +optional
+ optional DeploymentStrategy strategy = 4;
+
+ // Minimum number of seconds for which a newly created pod should be ready
+ // without any of its container crashing, for it to be considered available.
+ // Defaults to 0 (pod will be considered available as soon as it is ready)
+ // +optional
+ optional int32 minReadySeconds = 5;
+
+ // The number of old ReplicaSets to retain to allow rollback.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ // Defaults to 2.
+ // +optional
+ optional int32 revisionHistoryLimit = 6;
+
+ // Indicates that the deployment is paused.
+ // +optional
+ optional bool paused = 7;
+
+ // The config this deployment is rolling back to. Will be cleared after rollback is done.
+ // +optional
+ optional RollbackConfig rollbackTo = 8;
+
+ // The maximum time in seconds for a deployment to make progress before it
+ // is considered to be failed. The deployment controller will continue to
+ // process failed deployments and a condition with a ProgressDeadlineExceeded
+ // reason will be surfaced in the deployment status. Once autoRollback is
+ // implemented, the deployment controller will automatically rollback failed
+ // deployments. Note that progress will not be estimated during the time a
+ // deployment is paused. Defaults to 600s.
+ optional int32 progressDeadlineSeconds = 9;
+}
+
+// DeploymentStatus is the most recently observed status of the Deployment.
+message DeploymentStatus {
+ // The generation observed by the deployment controller.
+ // +optional
+ optional int64 observedGeneration = 1;
+
+ // Total number of non-terminated pods targeted by this deployment (their labels match the selector).
+ // +optional
+ optional int32 replicas = 2;
+
+ // Total number of non-terminated pods targeted by this deployment that have the desired template spec.
+ // +optional
+ optional int32 updatedReplicas = 3;
+
+ // Total number of ready pods targeted by this deployment.
+ // +optional
+ optional int32 readyReplicas = 7;
+
+ // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
+ // +optional
+ optional int32 availableReplicas = 4;
+
+ // Total number of unavailable pods targeted by this deployment.
+ // +optional
+ optional int32 unavailableReplicas = 5;
+
+ // Represents the latest available observations of a deployment's current state.
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ repeated DeploymentCondition conditions = 6;
+
+ // Count of hash collisions for the Deployment. The Deployment controller uses this
+ // field as a collision avoidance mechanism when it needs to create the name for the
+ // newest ReplicaSet.
+ // +optional
+ optional int64 collisionCount = 8;
+}
+
+// DeploymentStrategy describes how to replace existing pods with new ones.
+message DeploymentStrategy {
+ // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
+ // +optional
+ optional string type = 1;
+
+ // Rolling update config params. Present only if DeploymentStrategyType =
+ // RollingUpdate.
+ // ---
+ // TODO: Update this to follow our convention for oneOf, whatever we decide it
+ // to be.
+ // +optional
+ optional RollingUpdateDeployment rollingUpdate = 2;
+}
+
+message RollbackConfig {
+ // The revision to rollback to. If set to 0, rollback to the last revision.
+ // +optional
+ optional int64 revision = 1;
+}
+
+// Spec to control the desired behavior of rolling update.
+message RollingUpdateDeployment {
+ // The maximum number of pods that can be unavailable during the update.
+ // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
+ // Absolute number is calculated from percentage by rounding down.
+ // This can not be 0 if MaxSurge is 0.
+ // Defaults to 25%.
+ // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods
+ // immediately when the rolling update starts. Once new pods are ready, old RC
+ // can be scaled down further, followed by scaling up the new RC, ensuring
+ // that the total number of pods available at all times during the update is at
+ // least 70% of desired pods.
+ // +optional
+ optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1;
+
+ // The maximum number of pods that can be scheduled above the desired number of
+ // pods.
+ // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
+ // This can not be 0 if MaxUnavailable is 0.
+ // Absolute number is calculated from percentage by rounding up.
+ // Defaults to 25%.
+ // Example: when this is set to 30%, the new RC can be scaled up immediately when
+ // the rolling update starts, such that the total number of old and new pods do not exceed
+ // 130% of desired pods. Once old pods have been killed,
+ // new RC can be scaled up further, ensuring that total number of pods running
+ // at any time during the update is atmost 130% of desired pods.
+ // +optional
+ optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxSurge = 2;
+}
+
+// RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
+message RollingUpdateStatefulSetStrategy {
+ // Partition indicates the ordinal at which the StatefulSet should be
+ // partitioned.
+ optional int32 partition = 1;
+}
+
+// Scale represents a scaling request for a resource.
+message Scale {
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
+ // +optional
+ optional ScaleSpec spec = 2;
+
+ // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.
+ // +optional
+ optional ScaleStatus status = 3;
+}
+
+// ScaleSpec describes the attributes of a scale subresource
+message ScaleSpec {
+ // desired number of instances for the scaled object.
+ // +optional
+ optional int32 replicas = 1;
+}
+
+// ScaleStatus represents the current status of a scale subresource.
+message ScaleStatus {
+ // actual number of observed instances of the scaled object.
+ optional int32 replicas = 1;
+
+ // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
+ // +optional
+ map<string, string> selector = 2;
+
+ // label selector for pods that should match the replicas count. This is a serializated
+ // version of both map-based and more expressive set-based selectors. This is done to
+ // avoid introspection in the clients. The string will be in the same format as the
+ // query-param syntax. If the target type only supports map-based selectors, both this
+ // field and map-based selector field are populated.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ optional string targetSelector = 3;
+}
+
+// StatefulSet represents a set of pods with consistent identities.
+// Identities are defined as:
+// - Network: A single stable DNS and hostname.
+// - Storage: As many VolumeClaims as requested.
+// The StatefulSet guarantees that a given network identity will always
+// map to the same storage identity.
+message StatefulSet {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec defines the desired identities of pods in this set.
+ // +optional
+ optional StatefulSetSpec spec = 2;
+
+ // Status is the current status of Pods in this StatefulSet. This data
+ // may be out of date by some window of time.
+ // +optional
+ optional StatefulSetStatus status = 3;
+}
+
+// StatefulSetList is a collection of StatefulSets.
+message StatefulSetList {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ repeated StatefulSet items = 2;
+}
+
+// A StatefulSetSpec is the specification of a StatefulSet.
+message StatefulSetSpec {
+ // replicas is the desired number of replicas of the given Template.
+ // These are replicas in the sense that they are instantiations of the
+ // same Template, but individual replicas also have a consistent identity.
+ // If unspecified, defaults to 1.
+ // TODO: Consider a rename of this field.
+ // +optional
+ optional int32 replicas = 1;
+
+ // selector is a label query over pods that should match the replica count.
+ // If empty, defaulted to labels on the pod template.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
+
+ // template is the object that describes the pod that will be created if
+ // insufficient replicas are detected. Each pod stamped out by the StatefulSet
+ // will fulfill this Template, but have a unique identity from the rest
+ // of the StatefulSet.
+ optional k8s.io.client_go.pkg.api.v1.PodTemplateSpec template = 3;
+
+ // volumeClaimTemplates is a list of claims that pods are allowed to reference.
+ // The StatefulSet controller is responsible for mapping network identities to
+ // claims in a way that maintains the identity of a pod. Every claim in
+ // this list must have at least one matching (by name) volumeMount in one
+ // container in the template. A claim in this list takes precedence over
+ // any volumes in the template, with the same name.
+ // TODO: Define the behavior if a claim already exists with the same name.
+ // +optional
+ repeated k8s.io.client_go.pkg.api.v1.PersistentVolumeClaim volumeClaimTemplates = 4;
+
+ // serviceName is the name of the service that governs this StatefulSet.
+ // This service must exist before the StatefulSet, and is responsible for
+ // the network identity of the set. Pods get DNS/hostnames that follow the
+ // pattern: pod-specific-string.serviceName.default.svc.cluster.local
+ // where "pod-specific-string" is managed by the StatefulSet controller.
+ optional string serviceName = 5;
+
+ // podManagementPolicy controls how pods are created during initial scale up,
+ // when replacing pods on nodes, or when scaling down. The default policy is
+ // `OrderedReady`, where pods are created in increasing order (pod-0, then
+ // pod-1, etc) and the controller will wait until each pod is ready before
+ // continuing. When scaling down, the pods are removed in the opposite order.
+ // The alternative policy is `Parallel` which will create pods in parallel
+ // to match the desired scale without waiting, and on scale down will delete
+ // all pods at once.
+ // +optional
+ optional string podManagementPolicy = 6;
+
+ // updateStrategy indicates the StatefulSetUpdateStrategy that will be
+ // employed to update Pods in the StatefulSet when a revision is made to
+ // Template.
+ optional StatefulSetUpdateStrategy updateStrategy = 7;
+
+ // revisionHistoryLimit is the maximum number of revisions that will
+ // be maintained in the StatefulSet's revision history. The revision history
+ // consists of all revisions not represented by a currently applied
+ // StatefulSetSpec version. The default value is 10.
+ optional int32 revisionHistoryLimit = 8;
+}
+
+// StatefulSetStatus represents the current state of a StatefulSet.
+message StatefulSetStatus {
+ // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the
+ // StatefulSet's generation, which is updated on mutation by the API Server.
+ // +optional
+ optional int64 observedGeneration = 1;
+
+ // replicas is the number of Pods created by the StatefulSet controller.
+ optional int32 replicas = 2;
+
+ // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.
+ optional int32 readyReplicas = 3;
+
+ // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
+ // indicated by currentRevision.
+ optional int32 currentReplicas = 4;
+
+ // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
+ // indicated by updateRevision.
+ optional int32 updatedReplicas = 5;
+
+ // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the
+ // sequence [0,currentReplicas).
+ optional string currentRevision = 6;
+
+ // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence
+ // [replicas-updatedReplicas,replicas)
+ optional string updateRevision = 7;
+}
+
+// StatefulSetUpdateStrategy indicates the strategy that the StatefulSet
+// controller will use to perform updates. It includes any additional parameters
+// necessary to perform the update for the indicated strategy.
+message StatefulSetUpdateStrategy {
+ // Type indicates the type of the StatefulSetUpdateStrategy.
+ optional string type = 1;
+
+ // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.
+ optional RollingUpdateStatefulSetStrategy rollingUpdate = 2;
+}
+
diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/register.go b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/register.go
new file mode 100644
index 000000000..5a4fd5bc3
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/register.go
@@ -0,0 +1,65 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "apps"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Deployment{},
+ &DeploymentList{},
+ &DeploymentRollback{},
+ &Scale{},
+ &StatefulSet{},
+ &StatefulSetList{},
+ &ControllerRevision{},
+ &ControllerRevisionList{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/types.generated.go
new file mode 100644
index 000000000..a6c0bfb29
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/types.generated.go
@@ -0,0 +1,8414 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1beta1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg4_resource "k8s.io/apimachinery/pkg/api/resource"
+ pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ pkg6_runtime "k8s.io/apimachinery/pkg/runtime"
+ pkg2_types "k8s.io/apimachinery/pkg/types"
+ pkg5_intstr "k8s.io/apimachinery/pkg/util/intstr"
+ pkg3_v1 "k8s.io/client-go/pkg/api/v1"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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 pkg6_runtime.RawExtension
+ var v3 pkg2_types.UID
+ var v4 pkg5_intstr.IntOrString
+ var v5 pkg3_v1.PodTemplateSpec
+ var v6 time.Time
+ _, _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5, v6
+ }
+}
+
+func (x *ScaleSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = x.Replicas != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ScaleSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ScaleSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "replicas":
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv4 := &x.Replicas
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(yyv4)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ScaleSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv7 := &x.Replicas
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*int32)(yyv7)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ScaleStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = len(x.Selector) != 0
+ yyq2[2] = x.TargetSelector != ""
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Selector, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Selector, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.TargetSelector))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.TargetSelector))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ScaleStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ScaleStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "replicas":
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv4 := &x.Replicas
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(yyv4)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ x.Selector = nil
+ } else {
+ yyv6 := &x.Selector
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv6, false, d)
+ }
+ }
+ case "targetSelector":
+ if r.TryDecodeAsNil() {
+ x.TargetSelector = ""
+ } else {
+ yyv8 := &x.TargetSelector
+ 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_containerMapEnd1234)
+}
+
+func (x *ScaleStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv11 := &x.Replicas
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int32)(yyv11)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Selector = nil
+ } else {
+ yyv13 := &x.Selector
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TargetSelector = ""
+ } else {
+ yyv15 := &x.TargetSelector
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Scale) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Scale) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Scale) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = ScaleSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ScaleStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = ScaleSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ScaleStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *StatefulSet) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *StatefulSet) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *StatefulSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = StatefulSetSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = StatefulSetStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *StatefulSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = StatefulSetSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = StatefulSetStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x PodManagementPolicyType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *PodManagementPolicyType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *StatefulSetUpdateStrategy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Type != ""
+ yyq2[1] = x.RollingUpdate != 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_containerArrayElem1234)
+ if yyq2[0] {
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.RollingUpdate == nil {
+ r.EncodeNil()
+ } else {
+ x.RollingUpdate.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rollingUpdate"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RollingUpdate == nil {
+ r.EncodeNil()
+ } else {
+ x.RollingUpdate.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *StatefulSetUpdateStrategy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *StatefulSetUpdateStrategy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "rollingUpdate":
+ if r.TryDecodeAsNil() {
+ if x.RollingUpdate != nil {
+ x.RollingUpdate = nil
+ }
+ } else {
+ if x.RollingUpdate == nil {
+ x.RollingUpdate = new(RollingUpdateStatefulSetStrategy)
+ }
+ x.RollingUpdate.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *StatefulSetUpdateStrategy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv7 := &x.Type
+ yyv7.CodecDecodeSelf(d)
+ }
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RollingUpdate != nil {
+ x.RollingUpdate = nil
+ }
+ } else {
+ if x.RollingUpdate == nil {
+ x.RollingUpdate = new(RollingUpdateStatefulSetStrategy)
+ }
+ x.RollingUpdate.CodecDecodeSelf(d)
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x StatefulSetUpdateStrategyType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *StatefulSetUpdateStrategyType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *RollingUpdateStatefulSetStrategy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = x.Partition != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Partition == nil {
+ r.EncodeNil()
+ } else {
+ yy4 := *x.Partition
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(yy4))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("partition"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Partition == nil {
+ r.EncodeNil()
+ } else {
+ yy6 := *x.Partition
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(yy6))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RollingUpdateStatefulSetStrategy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RollingUpdateStatefulSetStrategy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "partition":
+ if r.TryDecodeAsNil() {
+ if x.Partition != nil {
+ x.Partition = nil
+ }
+ } else {
+ if x.Partition == nil {
+ x.Partition = new(int32)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(x.Partition)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RollingUpdateStatefulSetStrategy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Partition != nil {
+ x.Partition = nil
+ }
+ } else {
+ if x.Partition == nil {
+ x.Partition = new(int32)
+ }
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*int32)(x.Partition)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *StatefulSetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Replicas != nil
+ yyq2[1] = x.Selector != nil
+ yyq2[3] = len(x.VolumeClaimTemplates) != 0
+ yyq2[5] = x.PodManagementPolicy != ""
+ yyq2[6] = true
+ yyq2[7] = x.RevisionHistoryLimit != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(8)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Replicas == nil {
+ r.EncodeNil()
+ } else {
+ yy4 := *x.Replicas
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(yy4))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Replicas == nil {
+ r.EncodeNil()
+ } else {
+ yy6 := *x.Replicas
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(yy6))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy12 := &x.Template
+ yy12.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("template"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy14 := &x.Template
+ yy14.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.VolumeClaimTemplates == nil {
+ r.EncodeNil()
+ } else {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ h.encSlicev1_PersistentVolumeClaim(([]pkg3_v1.PersistentVolumeClaim)(x.VolumeClaimTemplates), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumeClaimTemplates"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.VolumeClaimTemplates == nil {
+ r.EncodeNil()
+ } else {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ h.encSlicev1_PersistentVolumeClaim(([]pkg3_v1.PersistentVolumeClaim)(x.VolumeClaimTemplates), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ServiceName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("serviceName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ServiceName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ x.PodManagementPolicy.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podManagementPolicy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.PodManagementPolicy.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yy26 := &x.UpdateStrategy
+ yy26.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("updateStrategy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy28 := &x.UpdateStrategy
+ yy28.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.RevisionHistoryLimit == nil {
+ r.EncodeNil()
+ } else {
+ yy31 := *x.RevisionHistoryLimit
+ yym32 := z.EncBinary()
+ _ = yym32
+ if false {
+ } else {
+ r.EncodeInt(int64(yy31))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("revisionHistoryLimit"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RevisionHistoryLimit == nil {
+ r.EncodeNil()
+ } else {
+ yy33 := *x.RevisionHistoryLimit
+ yym34 := z.EncBinary()
+ _ = yym34
+ if false {
+ } else {
+ r.EncodeInt(int64(yy33))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *StatefulSetSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *StatefulSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "replicas":
+ if r.TryDecodeAsNil() {
+ if x.Replicas != nil {
+ x.Replicas = nil
+ }
+ } else {
+ if x.Replicas == nil {
+ x.Replicas = new(int32)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(x.Replicas)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_v1.LabelSelector)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ case "template":
+ if r.TryDecodeAsNil() {
+ x.Template = pkg3_v1.PodTemplateSpec{}
+ } else {
+ yyv8 := &x.Template
+ yyv8.CodecDecodeSelf(d)
+ }
+ case "volumeClaimTemplates":
+ if r.TryDecodeAsNil() {
+ x.VolumeClaimTemplates = nil
+ } else {
+ yyv9 := &x.VolumeClaimTemplates
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSlicev1_PersistentVolumeClaim((*[]pkg3_v1.PersistentVolumeClaim)(yyv9), d)
+ }
+ }
+ case "serviceName":
+ if r.TryDecodeAsNil() {
+ x.ServiceName = ""
+ } else {
+ yyv11 := &x.ServiceName
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*string)(yyv11)) = r.DecodeString()
+ }
+ }
+ case "podManagementPolicy":
+ if r.TryDecodeAsNil() {
+ x.PodManagementPolicy = ""
+ } else {
+ yyv13 := &x.PodManagementPolicy
+ yyv13.CodecDecodeSelf(d)
+ }
+ case "updateStrategy":
+ if r.TryDecodeAsNil() {
+ x.UpdateStrategy = StatefulSetUpdateStrategy{}
+ } else {
+ yyv14 := &x.UpdateStrategy
+ yyv14.CodecDecodeSelf(d)
+ }
+ case "revisionHistoryLimit":
+ if r.TryDecodeAsNil() {
+ if x.RevisionHistoryLimit != nil {
+ x.RevisionHistoryLimit = nil
+ }
+ } else {
+ if x.RevisionHistoryLimit == nil {
+ x.RevisionHistoryLimit = new(int32)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*int32)(x.RevisionHistoryLimit)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj17 int
+ var yyb17 bool
+ var yyhl17 bool = l >= 0
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Replicas != nil {
+ x.Replicas = nil
+ }
+ } else {
+ if x.Replicas == nil {
+ x.Replicas = new(int32)
+ }
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*int32)(x.Replicas)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_v1.LabelSelector)
+ }
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Template = pkg3_v1.PodTemplateSpec{}
+ } else {
+ yyv22 := &x.Template
+ yyv22.CodecDecodeSelf(d)
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumeClaimTemplates = nil
+ } else {
+ yyv23 := &x.VolumeClaimTemplates
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ h.decSlicev1_PersistentVolumeClaim((*[]pkg3_v1.PersistentVolumeClaim)(yyv23), d)
+ }
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ServiceName = ""
+ } else {
+ yyv25 := &x.ServiceName
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*string)(yyv25)) = r.DecodeString()
+ }
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PodManagementPolicy = ""
+ } else {
+ yyv27 := &x.PodManagementPolicy
+ yyv27.CodecDecodeSelf(d)
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UpdateStrategy = StatefulSetUpdateStrategy{}
+ } else {
+ yyv28 := &x.UpdateStrategy
+ yyv28.CodecDecodeSelf(d)
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RevisionHistoryLimit != nil {
+ x.RevisionHistoryLimit = nil
+ }
+ } else {
+ if x.RevisionHistoryLimit == nil {
+ x.RevisionHistoryLimit = new(int32)
+ }
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*int32)(x.RevisionHistoryLimit)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj17-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *StatefulSetStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [7]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.ObservedGeneration != nil
+ yyq2[2] = x.ReadyReplicas != 0
+ yyq2[3] = x.CurrentReplicas != 0
+ yyq2[4] = x.UpdatedReplicas != 0
+ yyq2[5] = x.CurrentRevision != ""
+ yyq2[6] = x.UpdateRevision != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(7)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.ObservedGeneration == nil {
+ r.EncodeNil()
+ } else {
+ yy4 := *x.ObservedGeneration
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(yy4))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("observedGeneration"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ObservedGeneration == nil {
+ r.EncodeNil()
+ } else {
+ yy6 := *x.ObservedGeneration
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(yy6))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ReadyReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readyReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ReadyReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeInt(int64(x.CurrentReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(x.CurrentReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeInt(int64(x.UpdatedReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("updatedReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeInt(int64(x.UpdatedReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.CurrentRevision))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentRevision"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.CurrentRevision))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.UpdateRevision))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("updateRevision"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.UpdateRevision))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *StatefulSetStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *StatefulSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "observedGeneration":
+ if r.TryDecodeAsNil() {
+ if x.ObservedGeneration != nil {
+ x.ObservedGeneration = nil
+ }
+ } else {
+ if x.ObservedGeneration == nil {
+ x.ObservedGeneration = new(int64)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64))
+ }
+ }
+ 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 "readyReplicas":
+ if r.TryDecodeAsNil() {
+ x.ReadyReplicas = 0
+ } else {
+ yyv8 := &x.ReadyReplicas
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "currentReplicas":
+ if r.TryDecodeAsNil() {
+ x.CurrentReplicas = 0
+ } else {
+ yyv10 := &x.CurrentReplicas
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(yyv10)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "updatedReplicas":
+ if r.TryDecodeAsNil() {
+ x.UpdatedReplicas = 0
+ } else {
+ yyv12 := &x.UpdatedReplicas
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int32)(yyv12)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "currentRevision":
+ if r.TryDecodeAsNil() {
+ x.CurrentRevision = ""
+ } else {
+ yyv14 := &x.CurrentRevision
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ case "updateRevision":
+ if r.TryDecodeAsNil() {
+ x.UpdateRevision = ""
+ } else {
+ yyv16 := &x.UpdateRevision
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *StatefulSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj18 int
+ var yyb18 bool
+ var yyhl18 bool = l >= 0
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ObservedGeneration != nil {
+ x.ObservedGeneration = nil
+ }
+ } else {
+ if x.ObservedGeneration == nil {
+ x.ObservedGeneration = new(int64)
+ }
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv21 := &x.Replicas
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int32)(yyv21)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadyReplicas = 0
+ } else {
+ yyv23 := &x.ReadyReplicas
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*int32)(yyv23)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentReplicas = 0
+ } else {
+ yyv25 := &x.CurrentReplicas
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*int32)(yyv25)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UpdatedReplicas = 0
+ } else {
+ yyv27 := &x.UpdatedReplicas
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*int32)(yyv27)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentRevision = ""
+ } else {
+ yyv29 := &x.CurrentRevision
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*string)(yyv29)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UpdateRevision = ""
+ } else {
+ yyv31 := &x.UpdateRevision
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*string)(yyv31)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj18-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *StatefulSetList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceStatefulSet(([]StatefulSet)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceStatefulSet(([]StatefulSet)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *StatefulSetList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *StatefulSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceStatefulSet((*[]StatefulSet)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *StatefulSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceStatefulSet((*[]StatefulSet)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Deployment) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Deployment) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Deployment) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = DeploymentSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = DeploymentStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Deployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = DeploymentSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = DeploymentStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DeploymentSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [9]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Replicas != nil
+ yyq2[1] = x.Selector != nil
+ yyq2[3] = true
+ yyq2[4] = x.MinReadySeconds != 0
+ yyq2[5] = x.RevisionHistoryLimit != nil
+ yyq2[6] = x.Paused != false
+ yyq2[7] = x.RollbackTo != nil
+ yyq2[8] = x.ProgressDeadlineSeconds != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(9)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Replicas == nil {
+ r.EncodeNil()
+ } else {
+ yy4 := *x.Replicas
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(yy4))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Replicas == nil {
+ r.EncodeNil()
+ } else {
+ yy6 := *x.Replicas
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(yy6))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy12 := &x.Template
+ yy12.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("template"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy14 := &x.Template
+ yy14.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yy17 := &x.Strategy
+ yy17.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("strategy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy19 := &x.Strategy
+ yy19.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MinReadySeconds))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("minReadySeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MinReadySeconds))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.RevisionHistoryLimit == nil {
+ r.EncodeNil()
+ } else {
+ yy25 := *x.RevisionHistoryLimit
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeInt(int64(yy25))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("revisionHistoryLimit"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RevisionHistoryLimit == nil {
+ r.EncodeNil()
+ } else {
+ yy27 := *x.RevisionHistoryLimit
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeInt(int64(yy27))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym30 := z.EncBinary()
+ _ = yym30
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Paused))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("paused"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym31 := z.EncBinary()
+ _ = yym31
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Paused))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.RollbackTo == nil {
+ r.EncodeNil()
+ } else {
+ x.RollbackTo.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rollbackTo"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RollbackTo == nil {
+ r.EncodeNil()
+ } else {
+ x.RollbackTo.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ if x.ProgressDeadlineSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy36 := *x.ProgressDeadlineSeconds
+ yym37 := z.EncBinary()
+ _ = yym37
+ if false {
+ } else {
+ r.EncodeInt(int64(yy36))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("progressDeadlineSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ProgressDeadlineSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy38 := *x.ProgressDeadlineSeconds
+ yym39 := z.EncBinary()
+ _ = yym39
+ if false {
+ } else {
+ r.EncodeInt(int64(yy38))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DeploymentSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DeploymentSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "replicas":
+ if r.TryDecodeAsNil() {
+ if x.Replicas != nil {
+ x.Replicas = nil
+ }
+ } else {
+ if x.Replicas == nil {
+ x.Replicas = new(int32)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(x.Replicas)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_v1.LabelSelector)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ case "template":
+ if r.TryDecodeAsNil() {
+ x.Template = pkg3_v1.PodTemplateSpec{}
+ } else {
+ yyv8 := &x.Template
+ yyv8.CodecDecodeSelf(d)
+ }
+ case "strategy":
+ if r.TryDecodeAsNil() {
+ x.Strategy = DeploymentStrategy{}
+ } else {
+ yyv9 := &x.Strategy
+ yyv9.CodecDecodeSelf(d)
+ }
+ case "minReadySeconds":
+ if r.TryDecodeAsNil() {
+ x.MinReadySeconds = 0
+ } else {
+ yyv10 := &x.MinReadySeconds
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(yyv10)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "revisionHistoryLimit":
+ if r.TryDecodeAsNil() {
+ if x.RevisionHistoryLimit != nil {
+ x.RevisionHistoryLimit = nil
+ }
+ } else {
+ if x.RevisionHistoryLimit == nil {
+ x.RevisionHistoryLimit = new(int32)
+ }
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int32)(x.RevisionHistoryLimit)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "paused":
+ if r.TryDecodeAsNil() {
+ x.Paused = false
+ } else {
+ yyv14 := &x.Paused
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*bool)(yyv14)) = r.DecodeBool()
+ }
+ }
+ case "rollbackTo":
+ if r.TryDecodeAsNil() {
+ if x.RollbackTo != nil {
+ x.RollbackTo = nil
+ }
+ } else {
+ if x.RollbackTo == nil {
+ x.RollbackTo = new(RollbackConfig)
+ }
+ x.RollbackTo.CodecDecodeSelf(d)
+ }
+ case "progressDeadlineSeconds":
+ if r.TryDecodeAsNil() {
+ if x.ProgressDeadlineSeconds != nil {
+ x.ProgressDeadlineSeconds = nil
+ }
+ } else {
+ if x.ProgressDeadlineSeconds == nil {
+ x.ProgressDeadlineSeconds = new(int32)
+ }
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int32)(x.ProgressDeadlineSeconds)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj19 int
+ var yyb19 bool
+ var yyhl19 bool = l >= 0
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Replicas != nil {
+ x.Replicas = nil
+ }
+ } else {
+ if x.Replicas == nil {
+ x.Replicas = new(int32)
+ }
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ *((*int32)(x.Replicas)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_v1.LabelSelector)
+ }
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Template = pkg3_v1.PodTemplateSpec{}
+ } else {
+ yyv24 := &x.Template
+ yyv24.CodecDecodeSelf(d)
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Strategy = DeploymentStrategy{}
+ } else {
+ yyv25 := &x.Strategy
+ yyv25.CodecDecodeSelf(d)
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MinReadySeconds = 0
+ } else {
+ yyv26 := &x.MinReadySeconds
+ yym27 := z.DecBinary()
+ _ = yym27
+ if false {
+ } else {
+ *((*int32)(yyv26)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RevisionHistoryLimit != nil {
+ x.RevisionHistoryLimit = nil
+ }
+ } else {
+ if x.RevisionHistoryLimit == nil {
+ x.RevisionHistoryLimit = new(int32)
+ }
+ yym29 := z.DecBinary()
+ _ = yym29
+ if false {
+ } else {
+ *((*int32)(x.RevisionHistoryLimit)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Paused = false
+ } else {
+ yyv30 := &x.Paused
+ yym31 := z.DecBinary()
+ _ = yym31
+ if false {
+ } else {
+ *((*bool)(yyv30)) = r.DecodeBool()
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RollbackTo != nil {
+ x.RollbackTo = nil
+ }
+ } else {
+ if x.RollbackTo == nil {
+ x.RollbackTo = new(RollbackConfig)
+ }
+ x.RollbackTo.CodecDecodeSelf(d)
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ProgressDeadlineSeconds != nil {
+ x.ProgressDeadlineSeconds = nil
+ }
+ } else {
+ if x.ProgressDeadlineSeconds == nil {
+ x.ProgressDeadlineSeconds = new(int32)
+ }
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ *((*int32)(x.ProgressDeadlineSeconds)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj19-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DeploymentRollback) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[3] = len(x.UpdatedAnnotations) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.UpdatedAnnotations == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.UpdatedAnnotations, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("updatedAnnotations"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.UpdatedAnnotations == nil {
+ r.EncodeNil()
+ } else {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.UpdatedAnnotations, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy16 := &x.RollbackTo
+ yy16.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rollbackTo"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy18 := &x.RollbackTo
+ yy18.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DeploymentRollback) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DeploymentRollback) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv8 := &x.Name
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "updatedAnnotations":
+ if r.TryDecodeAsNil() {
+ x.UpdatedAnnotations = nil
+ } else {
+ yyv10 := &x.UpdatedAnnotations
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv10, false, d)
+ }
+ }
+ case "rollbackTo":
+ if r.TryDecodeAsNil() {
+ x.RollbackTo = RollbackConfig{}
+ } else {
+ yyv12 := &x.RollbackTo
+ yyv12.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DeploymentRollback) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv14 := &x.Kind
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv16 := &x.APIVersion
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv18 := &x.Name
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*string)(yyv18)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UpdatedAnnotations = nil
+ } else {
+ yyv20 := &x.UpdatedAnnotations
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv20, false, d)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RollbackTo = RollbackConfig{}
+ } else {
+ yyv22 := &x.RollbackTo
+ yyv22.CodecDecodeSelf(d)
+ }
+ for {
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj13-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *RollbackConfig) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = x.Revision != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Revision))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("revision"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Revision))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RollbackConfig) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RollbackConfig) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "revision":
+ if r.TryDecodeAsNil() {
+ x.Revision = 0
+ } else {
+ yyv4 := &x.Revision
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int64)(yyv4)) = int64(r.DecodeInt(64))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RollbackConfig) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Revision = 0
+ } else {
+ yyv7 := &x.Revision
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*int64)(yyv7)) = int64(r.DecodeInt(64))
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DeploymentStrategy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Type != ""
+ yyq2[1] = x.RollingUpdate != 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_containerArrayElem1234)
+ if yyq2[0] {
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.RollingUpdate == nil {
+ r.EncodeNil()
+ } else {
+ x.RollingUpdate.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rollingUpdate"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RollingUpdate == nil {
+ r.EncodeNil()
+ } else {
+ x.RollingUpdate.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DeploymentStrategy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DeploymentStrategy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "rollingUpdate":
+ if r.TryDecodeAsNil() {
+ if x.RollingUpdate != nil {
+ x.RollingUpdate = nil
+ }
+ } else {
+ if x.RollingUpdate == nil {
+ x.RollingUpdate = new(RollingUpdateDeployment)
+ }
+ x.RollingUpdate.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DeploymentStrategy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv7 := &x.Type
+ yyv7.CodecDecodeSelf(d)
+ }
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RollingUpdate != nil {
+ x.RollingUpdate = nil
+ }
+ } else {
+ if x.RollingUpdate == nil {
+ x.RollingUpdate = new(RollingUpdateDeployment)
+ }
+ x.RollingUpdate.CodecDecodeSelf(d)
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x DeploymentStrategyType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *DeploymentStrategyType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *RollingUpdateDeployment) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.MaxUnavailable != nil
+ yyq2[1] = x.MaxSurge != 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.MaxUnavailable == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.MaxUnavailable) {
+ } else if !yym4 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.MaxUnavailable)
+ } else {
+ z.EncFallback(x.MaxUnavailable)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("maxUnavailable"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.MaxUnavailable == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.MaxUnavailable) {
+ } else if !yym5 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.MaxUnavailable)
+ } else {
+ z.EncFallback(x.MaxUnavailable)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.MaxSurge == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.MaxSurge) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.MaxSurge)
+ } else {
+ z.EncFallback(x.MaxSurge)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("maxSurge"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.MaxSurge == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.MaxSurge) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.MaxSurge)
+ } else {
+ z.EncFallback(x.MaxSurge)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RollingUpdateDeployment) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RollingUpdateDeployment) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "maxUnavailable":
+ if r.TryDecodeAsNil() {
+ if x.MaxUnavailable != nil {
+ x.MaxUnavailable = nil
+ }
+ } else {
+ if x.MaxUnavailable == nil {
+ x.MaxUnavailable = new(pkg5_intstr.IntOrString)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.MaxUnavailable) {
+ } else if !yym5 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.MaxUnavailable)
+ } else {
+ z.DecFallback(x.MaxUnavailable, false)
+ }
+ }
+ case "maxSurge":
+ if r.TryDecodeAsNil() {
+ if x.MaxSurge != nil {
+ x.MaxSurge = nil
+ }
+ } else {
+ if x.MaxSurge == nil {
+ x.MaxSurge = new(pkg5_intstr.IntOrString)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.MaxSurge) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.MaxSurge)
+ } else {
+ z.DecFallback(x.MaxSurge, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RollingUpdateDeployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.MaxUnavailable != nil {
+ x.MaxUnavailable = nil
+ }
+ } else {
+ if x.MaxUnavailable == nil {
+ x.MaxUnavailable = new(pkg5_intstr.IntOrString)
+ }
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.MaxUnavailable) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.MaxUnavailable)
+ } else {
+ z.DecFallback(x.MaxUnavailable, false)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.MaxSurge != nil {
+ x.MaxSurge = nil
+ }
+ } else {
+ if x.MaxSurge == nil {
+ x.MaxSurge = new(pkg5_intstr.IntOrString)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.MaxSurge) {
+ } else if !yym12 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.MaxSurge)
+ } else {
+ z.DecFallback(x.MaxSurge, false)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DeploymentStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.ObservedGeneration != 0
+ yyq2[1] = x.Replicas != 0
+ yyq2[2] = x.UpdatedReplicas != 0
+ yyq2[3] = x.ReadyReplicas != 0
+ yyq2[4] = x.AvailableReplicas != 0
+ yyq2[5] = x.UnavailableReplicas != 0
+ yyq2[6] = len(x.Conditions) != 0
+ yyq2[7] = x.CollisionCount != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ObservedGeneration))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("observedGeneration"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ObservedGeneration))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.UpdatedReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("updatedReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.UpdatedReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ReadyReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readyReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ReadyReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(x.AvailableReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("availableReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(x.AvailableReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeInt(int64(x.UnavailableReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("unavailableReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeInt(int64(x.UnavailableReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ h.encSliceDeploymentCondition(([]DeploymentCondition)(x.Conditions), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("conditions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ h.encSliceDeploymentCondition(([]DeploymentCondition)(x.Conditions), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.CollisionCount == nil {
+ r.EncodeNil()
+ } else {
+ yy25 := *x.CollisionCount
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeInt(int64(yy25))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("collisionCount"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.CollisionCount == nil {
+ r.EncodeNil()
+ } else {
+ yy27 := *x.CollisionCount
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeInt(int64(yy27))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DeploymentStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DeploymentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "observedGeneration":
+ if r.TryDecodeAsNil() {
+ x.ObservedGeneration = 0
+ } else {
+ yyv4 := &x.ObservedGeneration
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int64)(yyv4)) = int64(r.DecodeInt(64))
+ }
+ }
+ 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 "updatedReplicas":
+ if r.TryDecodeAsNil() {
+ x.UpdatedReplicas = 0
+ } else {
+ yyv8 := &x.UpdatedReplicas
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "readyReplicas":
+ if r.TryDecodeAsNil() {
+ x.ReadyReplicas = 0
+ } else {
+ yyv10 := &x.ReadyReplicas
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(yyv10)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "availableReplicas":
+ if r.TryDecodeAsNil() {
+ x.AvailableReplicas = 0
+ } else {
+ yyv12 := &x.AvailableReplicas
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int32)(yyv12)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "unavailableReplicas":
+ if r.TryDecodeAsNil() {
+ x.UnavailableReplicas = 0
+ } else {
+ yyv14 := &x.UnavailableReplicas
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*int32)(yyv14)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "conditions":
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv16 := &x.Conditions
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ h.decSliceDeploymentCondition((*[]DeploymentCondition)(yyv16), d)
+ }
+ }
+ case "collisionCount":
+ if r.TryDecodeAsNil() {
+ if x.CollisionCount != nil {
+ x.CollisionCount = nil
+ }
+ } else {
+ if x.CollisionCount == nil {
+ x.CollisionCount = new(int64)
+ }
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*int64)(x.CollisionCount)) = int64(r.DecodeInt(64))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DeploymentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj20 int
+ var yyb20 bool
+ var yyhl20 bool = l >= 0
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObservedGeneration = 0
+ } else {
+ yyv21 := &x.ObservedGeneration
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int64)(yyv21)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv23 := &x.Replicas
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*int32)(yyv23)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UpdatedReplicas = 0
+ } else {
+ yyv25 := &x.UpdatedReplicas
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*int32)(yyv25)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadyReplicas = 0
+ } else {
+ yyv27 := &x.ReadyReplicas
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*int32)(yyv27)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.AvailableReplicas = 0
+ } else {
+ yyv29 := &x.AvailableReplicas
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*int32)(yyv29)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UnavailableReplicas = 0
+ } else {
+ yyv31 := &x.UnavailableReplicas
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*int32)(yyv31)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv33 := &x.Conditions
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ h.decSliceDeploymentCondition((*[]DeploymentCondition)(yyv33), d)
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.CollisionCount != nil {
+ x.CollisionCount = nil
+ }
+ } else {
+ if x.CollisionCount == nil {
+ x.CollisionCount = new(int64)
+ }
+ yym36 := z.DecBinary()
+ _ = yym36
+ if false {
+ } else {
+ *((*int64)(x.CollisionCount)) = int64(r.DecodeInt(64))
+ }
+ }
+ for {
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj20-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x DeploymentConditionType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *DeploymentConditionType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *DeploymentCondition) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = true
+ yyq2[3] = true
+ yyq2[4] = x.Reason != ""
+ yyq2[5] = x.Message != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yysf7 := &x.Status
+ yysf7.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yysf8 := &x.Status
+ yysf8.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy10 := &x.LastUpdateTime
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy10) {
+ } else if yym11 {
+ z.EncBinaryMarshal(yy10)
+ } else if !yym11 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy10)
+ } else {
+ z.EncFallback(yy10)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastUpdateTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.LastUpdateTime
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if yym13 {
+ z.EncBinaryMarshal(yy12)
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.LastTransitionTime
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy15) {
+ } else if yym16 {
+ z.EncBinaryMarshal(yy15)
+ } else if !yym16 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy15)
+ } else {
+ z.EncFallback(yy15)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.LastTransitionTime
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy17) {
+ } else if yym18 {
+ z.EncBinaryMarshal(yy17)
+ } else if !yym18 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy17)
+ } else {
+ z.EncFallback(yy17)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DeploymentCondition) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DeploymentCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "lastUpdateTime":
+ if r.TryDecodeAsNil() {
+ x.LastUpdateTime = pkg1_v1.Time{}
+ } else {
+ yyv6 := &x.LastUpdateTime
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if yym7 {
+ z.DecBinaryUnmarshal(yyv6)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ case "lastTransitionTime":
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg1_v1.Time{}
+ } else {
+ yyv8 := &x.LastTransitionTime
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv8) {
+ } else if yym9 {
+ z.DecBinaryUnmarshal(yyv8)
+ } else if !yym9 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv8)
+ } else {
+ z.DecFallback(yyv8, false)
+ }
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv10 := &x.Reason
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv12 := &x.Message
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DeploymentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv15 := &x.Type
+ yyv15.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv16 := &x.Status
+ yyv16.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastUpdateTime = pkg1_v1.Time{}
+ } else {
+ yyv17 := &x.LastUpdateTime
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv17) {
+ } else if yym18 {
+ z.DecBinaryUnmarshal(yyv17)
+ } else if !yym18 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv17)
+ } else {
+ z.DecFallback(yyv17, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg1_v1.Time{}
+ } else {
+ yyv19 := &x.LastTransitionTime
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv19) {
+ } else if yym20 {
+ z.DecBinaryUnmarshal(yyv19)
+ } else if !yym20 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv19)
+ } else {
+ z.DecFallback(yyv19, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv21 := &x.Reason
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv23 := &x.Message
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*string)(yyv23)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DeploymentList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceDeployment(([]Deployment)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceDeployment(([]Deployment)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DeploymentList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DeploymentList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceDeployment((*[]Deployment)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DeploymentList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceDeployment((*[]Deployment)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ControllerRevision) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Data
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy15) {
+ } else if !yym16 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy15)
+ } else {
+ z.EncFallback(yy15)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("data"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Data
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy17) {
+ } else if !yym18 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy17)
+ } else {
+ z.EncFallback(yy17)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Revision))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("revision"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Revision))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ControllerRevision) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ControllerRevision) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "data":
+ if r.TryDecodeAsNil() {
+ x.Data = pkg6_runtime.RawExtension{}
+ } else {
+ yyv10 := &x.Data
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv10) {
+ } else if !yym11 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv10)
+ } else {
+ z.DecFallback(yyv10, false)
+ }
+ }
+ case "revision":
+ if r.TryDecodeAsNil() {
+ x.Revision = 0
+ } else {
+ yyv12 := &x.Revision
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int64)(yyv12)) = int64(r.DecodeInt(64))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ControllerRevision) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv15 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv17 := &x.APIVersion
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg1_v1.ObjectMeta{}
+ } else {
+ yyv19 := &x.ObjectMeta
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv19) {
+ } else {
+ z.DecFallback(yyv19, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Data = pkg6_runtime.RawExtension{}
+ } else {
+ yyv21 := &x.Data
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv21) {
+ } else if !yym22 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv21)
+ } else {
+ z.DecFallback(yyv21, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Revision = 0
+ } else {
+ yyv23 := &x.Revision
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*int64)(yyv23)) = int64(r.DecodeInt(64))
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ControllerRevisionList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceControllerRevision(([]ControllerRevision)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceControllerRevision(([]ControllerRevision)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ControllerRevisionList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ControllerRevisionList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceControllerRevision((*[]ControllerRevision)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ControllerRevisionList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceControllerRevision((*[]ControllerRevision)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encSlicev1_PersistentVolumeClaim(v []pkg3_v1.PersistentVolumeClaim, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg3_v1.PersistentVolumeClaim, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []pkg3_v1.PersistentVolumeClaim{}
+ 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, 384)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]pkg3_v1.PersistentVolumeClaim, yyrl1)
+ }
+ } else {
+ yyv1 = make([]pkg3_v1.PersistentVolumeClaim, 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] = pkg3_v1.PersistentVolumeClaim{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, pkg3_v1.PersistentVolumeClaim{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = pkg3_v1.PersistentVolumeClaim{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, pkg3_v1.PersistentVolumeClaim{}) // var yyz1 pkg3_v1.PersistentVolumeClaim
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = pkg3_v1.PersistentVolumeClaim{}
+ } 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 = []pkg3_v1.PersistentVolumeClaim{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceStatefulSet(v []StatefulSet, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceStatefulSet(v *[]StatefulSet, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []StatefulSet{}
+ 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, 984)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]StatefulSet, yyrl1)
+ }
+ } else {
+ yyv1 = make([]StatefulSet, 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] = StatefulSet{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, StatefulSet{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = StatefulSet{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, StatefulSet{}) // var yyz1 StatefulSet
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = StatefulSet{}
+ } 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 = []StatefulSet{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceDeploymentCondition(v []DeploymentCondition, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceDeploymentCondition(v *[]DeploymentCondition, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []DeploymentCondition{}
+ 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, 112)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]DeploymentCondition, yyrl1)
+ }
+ } else {
+ yyv1 = make([]DeploymentCondition, 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] = DeploymentCondition{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, DeploymentCondition{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = DeploymentCondition{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, DeploymentCondition{}) // var yyz1 DeploymentCondition
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = DeploymentCondition{}
+ } 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 = []DeploymentCondition{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceDeployment(v []Deployment, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceDeployment(v *[]Deployment, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Deployment{}
+ 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, 968)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Deployment, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Deployment, 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] = Deployment{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Deployment{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Deployment{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Deployment{}) // var yyz1 Deployment
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Deployment{}
+ } 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 = []Deployment{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceControllerRevision(v []ControllerRevision, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceControllerRevision(v *[]ControllerRevision, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ControllerRevision{}
+ 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, 312)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ControllerRevision, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ControllerRevision, 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] = ControllerRevision{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ControllerRevision{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ControllerRevision{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ControllerRevision{}) // var yyz1 ControllerRevision
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ControllerRevision{}
+ } 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 = []ControllerRevision{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/types.go b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/types.go
new file mode 100644
index 000000000..adfd83854
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/types.go
@@ -0,0 +1,516 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/intstr"
+ "k8s.io/client-go/pkg/api/v1"
+)
+
+const (
+ // StatefulSetInitAnnotation if present, and set to false, indicates that a Pod's readiness should be ignored.
+ StatefulSetInitAnnotation = "pod.alpha.kubernetes.io/initialized"
+ ControllerRevisionHashLabelKey = "controller-revision-hash"
+ StatefulSetRevisionLabel = ControllerRevisionHashLabelKey
+)
+
+// ScaleSpec describes the attributes of a scale subresource
+type ScaleSpec struct {
+ // desired number of instances for the scaled object.
+ // +optional
+ Replicas int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
+}
+
+// ScaleStatus represents the current status of a scale subresource.
+type ScaleStatus struct {
+ // actual number of observed instances of the scaled object.
+ Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"`
+
+ // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
+ // +optional
+ Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,2,rep,name=selector"`
+
+ // label selector for pods that should match the replicas count. This is a serializated
+ // version of both map-based and more expressive set-based selectors. This is done to
+ // avoid introspection in the clients. The string will be in the same format as the
+ // query-param syntax. If the target type only supports map-based selectors, both this
+ // field and map-based selector field are populated.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ TargetSelector string `json:"targetSelector,omitempty" protobuf:"bytes,3,opt,name=targetSelector"`
+}
+
+// +genclient=true
+// +noMethods=true
+
+// Scale represents a scaling request for a resource.
+type Scale struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
+ // +optional
+ Spec ScaleSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.
+ // +optional
+ Status ScaleStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// +genclient=true
+
+// StatefulSet represents a set of pods with consistent identities.
+// Identities are defined as:
+// - Network: A single stable DNS and hostname.
+// - Storage: As many VolumeClaims as requested.
+// The StatefulSet guarantees that a given network identity will always
+// map to the same storage identity.
+type StatefulSet struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines the desired identities of pods in this set.
+ // +optional
+ Spec StatefulSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is the current status of Pods in this StatefulSet. This data
+ // may be out of date by some window of time.
+ // +optional
+ Status StatefulSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// PodManagementPolicyType defines the policy for creating pods under a stateful set.
+type PodManagementPolicyType string
+
+const (
+ // OrderedReadyPodManagement will create pods in strictly increasing order on
+ // scale up and strictly decreasing order on scale down, progressing only when
+ // the previous pod is ready or terminated. At most one pod will be changed
+ // at any time.
+ OrderedReadyPodManagement PodManagementPolicyType = "OrderedReady"
+ // ParallelPodManagement will create and delete pods as soon as the stateful set
+ // replica count is changed, and will not wait for pods to be ready or complete
+ // termination.
+ ParallelPodManagement = "Parallel"
+)
+
+// StatefulSetUpdateStrategy indicates the strategy that the StatefulSet
+// controller will use to perform updates. It includes any additional parameters
+// necessary to perform the update for the indicated strategy.
+type StatefulSetUpdateStrategy struct {
+ // Type indicates the type of the StatefulSetUpdateStrategy.
+ Type StatefulSetUpdateStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=StatefulSetStrategyType"`
+ // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.
+ RollingUpdate *RollingUpdateStatefulSetStrategy `json:"rollingUpdate,omitempty" protobuf:"bytes,2,opt,name=rollingUpdate"`
+}
+
+// StatefulSetUpdateStrategyType is a string enumeration type that enumerates
+// all possible update strategies for the StatefulSet controller.
+type StatefulSetUpdateStrategyType string
+
+const (
+ // RollingUpdateStatefulSetStrategyType indicates that update will be
+ // applied to all Pods in the StatefulSet with respect to the StatefulSet
+ // ordering constraints. When a scale operation is performed with this
+ // strategy, new Pods will be created from the specification version indicated
+ // by the StatefulSet's updateRevision.
+ RollingUpdateStatefulSetStrategyType = "RollingUpdate"
+ // OnDeleteStatefulSetStrategyType triggers the legacy behavior. Version
+ // tracking and ordered rolling restarts are disabled. Pods are recreated
+ // from the StatefulSetSpec when they are manually deleted. When a scale
+ // operation is performed with this strategy,specification version indicated
+ // by the StatefulSet's currentRevision.
+ OnDeleteStatefulSetStrategyType = "OnDelete"
+)
+
+// RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
+type RollingUpdateStatefulSetStrategy struct {
+ // Partition indicates the ordinal at which the StatefulSet should be
+ // partitioned.
+ Partition *int32 `json:"partition,omitempty" protobuf:"varint,1,opt,name=partition"`
+}
+
+// A StatefulSetSpec is the specification of a StatefulSet.
+type StatefulSetSpec struct {
+ // replicas is the desired number of replicas of the given Template.
+ // These are replicas in the sense that they are instantiations of the
+ // same Template, but individual replicas also have a consistent identity.
+ // If unspecified, defaults to 1.
+ // TODO: Consider a rename of this field.
+ // +optional
+ Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
+
+ // selector is a label query over pods that should match the replica count.
+ // If empty, defaulted to labels on the pod template.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
+
+ // template is the object that describes the pod that will be created if
+ // insufficient replicas are detected. Each pod stamped out by the StatefulSet
+ // will fulfill this Template, but have a unique identity from the rest
+ // of the StatefulSet.
+ Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"`
+
+ // volumeClaimTemplates is a list of claims that pods are allowed to reference.
+ // The StatefulSet controller is responsible for mapping network identities to
+ // claims in a way that maintains the identity of a pod. Every claim in
+ // this list must have at least one matching (by name) volumeMount in one
+ // container in the template. A claim in this list takes precedence over
+ // any volumes in the template, with the same name.
+ // TODO: Define the behavior if a claim already exists with the same name.
+ // +optional
+ VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty" protobuf:"bytes,4,rep,name=volumeClaimTemplates"`
+
+ // serviceName is the name of the service that governs this StatefulSet.
+ // This service must exist before the StatefulSet, and is responsible for
+ // the network identity of the set. Pods get DNS/hostnames that follow the
+ // pattern: pod-specific-string.serviceName.default.svc.cluster.local
+ // where "pod-specific-string" is managed by the StatefulSet controller.
+ ServiceName string `json:"serviceName" protobuf:"bytes,5,opt,name=serviceName"`
+
+ // podManagementPolicy controls how pods are created during initial scale up,
+ // when replacing pods on nodes, or when scaling down. The default policy is
+ // `OrderedReady`, where pods are created in increasing order (pod-0, then
+ // pod-1, etc) and the controller will wait until each pod is ready before
+ // continuing. When scaling down, the pods are removed in the opposite order.
+ // The alternative policy is `Parallel` which will create pods in parallel
+ // to match the desired scale without waiting, and on scale down will delete
+ // all pods at once.
+ // +optional
+ PodManagementPolicy PodManagementPolicyType `json:"podManagementPolicy,omitempty" protobuf:"bytes,6,opt,name=podManagementPolicy,casttype=PodManagementPolicyType"`
+
+ // updateStrategy indicates the StatefulSetUpdateStrategy that will be
+ // employed to update Pods in the StatefulSet when a revision is made to
+ // Template.
+ UpdateStrategy StatefulSetUpdateStrategy `json:"updateStrategy,omitempty" protobuf:"bytes,7,opt,name=updateStrategy"`
+
+ // revisionHistoryLimit is the maximum number of revisions that will
+ // be maintained in the StatefulSet's revision history. The revision history
+ // consists of all revisions not represented by a currently applied
+ // StatefulSetSpec version. The default value is 10.
+ RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,8,opt,name=revisionHistoryLimit"`
+}
+
+// StatefulSetStatus represents the current state of a StatefulSet.
+type StatefulSetStatus struct {
+ // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the
+ // StatefulSet's generation, which is updated on mutation by the API Server.
+ // +optional
+ ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
+
+ // replicas is the number of Pods created by the StatefulSet controller.
+ Replicas int32 `json:"replicas" protobuf:"varint,2,opt,name=replicas"`
+
+ // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.
+ ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,3,opt,name=readyReplicas"`
+
+ // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
+ // indicated by currentRevision.
+ CurrentReplicas int32 `json:"currentReplicas,omitempty" protobuf:"varint,4,opt,name=currentReplicas"`
+
+ // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
+ // indicated by updateRevision.
+ UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,5,opt,name=updatedReplicas"`
+
+ // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the
+ // sequence [0,currentReplicas).
+ CurrentRevision string `json:"currentRevision,omitempty" protobuf:"bytes,6,opt,name=currentRevision"`
+
+ // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence
+ // [replicas-updatedReplicas,replicas)
+ UpdateRevision string `json:"updateRevision,omitempty" protobuf:"bytes,7,opt,name=updateRevision"`
+}
+
+// StatefulSetList is a collection of StatefulSets.
+type StatefulSetList struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+ Items []StatefulSet `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// +genclient=true
+
+// Deployment enables declarative updates for Pods and ReplicaSets.
+type Deployment struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Specification of the desired behavior of the Deployment.
+ // +optional
+ Spec DeploymentSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Most recently observed status of the Deployment.
+ // +optional
+ Status DeploymentStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// DeploymentSpec is the specification of the desired behavior of the Deployment.
+type DeploymentSpec struct {
+ // Number of desired pods. This is a pointer to distinguish between explicit
+ // zero and not specified. Defaults to 1.
+ // +optional
+ Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
+
+ // Label selector for pods. Existing ReplicaSets whose pods are
+ // selected by this will be the ones affected by this deployment.
+ // +optional
+ Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
+
+ // Template describes the pods that will be created.
+ Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"`
+
+ // The deployment strategy to use to replace existing pods with new ones.
+ // +optional
+ Strategy DeploymentStrategy `json:"strategy,omitempty" protobuf:"bytes,4,opt,name=strategy"`
+
+ // Minimum number of seconds for which a newly created pod should be ready
+ // without any of its container crashing, for it to be considered available.
+ // Defaults to 0 (pod will be considered available as soon as it is ready)
+ // +optional
+ MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,5,opt,name=minReadySeconds"`
+
+ // The number of old ReplicaSets to retain to allow rollback.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ // Defaults to 2.
+ // +optional
+ RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,6,opt,name=revisionHistoryLimit"`
+
+ // Indicates that the deployment is paused.
+ // +optional
+ Paused bool `json:"paused,omitempty" protobuf:"varint,7,opt,name=paused"`
+
+ // The config this deployment is rolling back to. Will be cleared after rollback is done.
+ // +optional
+ RollbackTo *RollbackConfig `json:"rollbackTo,omitempty" protobuf:"bytes,8,opt,name=rollbackTo"`
+
+ // The maximum time in seconds for a deployment to make progress before it
+ // is considered to be failed. The deployment controller will continue to
+ // process failed deployments and a condition with a ProgressDeadlineExceeded
+ // reason will be surfaced in the deployment status. Once autoRollback is
+ // implemented, the deployment controller will automatically rollback failed
+ // deployments. Note that progress will not be estimated during the time a
+ // deployment is paused. Defaults to 600s.
+ ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty" protobuf:"varint,9,opt,name=progressDeadlineSeconds"`
+}
+
+// DeploymentRollback stores the information required to rollback a deployment.
+type DeploymentRollback struct {
+ metav1.TypeMeta `json:",inline"`
+ // Required: This must match the Name of a deployment.
+ Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
+ // The annotations to be updated to a deployment
+ // +optional
+ UpdatedAnnotations map[string]string `json:"updatedAnnotations,omitempty" protobuf:"bytes,2,rep,name=updatedAnnotations"`
+ // The config of this deployment rollback.
+ RollbackTo RollbackConfig `json:"rollbackTo" protobuf:"bytes,3,opt,name=rollbackTo"`
+}
+
+type RollbackConfig struct {
+ // The revision to rollback to. If set to 0, rollback to the last revision.
+ // +optional
+ Revision int64 `json:"revision,omitempty" protobuf:"varint,1,opt,name=revision"`
+}
+
+const (
+ // DefaultDeploymentUniqueLabelKey is the default key of the selector that is added
+ // to existing RCs (and label key that is added to its pods) to prevent the existing RCs
+ // to select new pods (and old pods being select by new RC).
+ DefaultDeploymentUniqueLabelKey string = "pod-template-hash"
+)
+
+// DeploymentStrategy describes how to replace existing pods with new ones.
+type DeploymentStrategy struct {
+ // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
+ // +optional
+ Type DeploymentStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=DeploymentStrategyType"`
+
+ // Rolling update config params. Present only if DeploymentStrategyType =
+ // RollingUpdate.
+ //---
+ // TODO: Update this to follow our convention for oneOf, whatever we decide it
+ // to be.
+ // +optional
+ RollingUpdate *RollingUpdateDeployment `json:"rollingUpdate,omitempty" protobuf:"bytes,2,opt,name=rollingUpdate"`
+}
+
+type DeploymentStrategyType string
+
+const (
+ // Kill all existing pods before creating new ones.
+ RecreateDeploymentStrategyType DeploymentStrategyType = "Recreate"
+
+ // Replace the old RCs by new one using rolling update i.e gradually scale down the old RCs and scale up the new one.
+ RollingUpdateDeploymentStrategyType DeploymentStrategyType = "RollingUpdate"
+)
+
+// Spec to control the desired behavior of rolling update.
+type RollingUpdateDeployment struct {
+ // The maximum number of pods that can be unavailable during the update.
+ // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
+ // Absolute number is calculated from percentage by rounding down.
+ // This can not be 0 if MaxSurge is 0.
+ // Defaults to 25%.
+ // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods
+ // immediately when the rolling update starts. Once new pods are ready, old RC
+ // can be scaled down further, followed by scaling up the new RC, ensuring
+ // that the total number of pods available at all times during the update is at
+ // least 70% of desired pods.
+ // +optional
+ MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,1,opt,name=maxUnavailable"`
+
+ // The maximum number of pods that can be scheduled above the desired number of
+ // pods.
+ // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
+ // This can not be 0 if MaxUnavailable is 0.
+ // Absolute number is calculated from percentage by rounding up.
+ // Defaults to 25%.
+ // Example: when this is set to 30%, the new RC can be scaled up immediately when
+ // the rolling update starts, such that the total number of old and new pods do not exceed
+ // 130% of desired pods. Once old pods have been killed,
+ // new RC can be scaled up further, ensuring that total number of pods running
+ // at any time during the update is atmost 130% of desired pods.
+ // +optional
+ MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty" protobuf:"bytes,2,opt,name=maxSurge"`
+}
+
+// DeploymentStatus is the most recently observed status of the Deployment.
+type DeploymentStatus struct {
+ // The generation observed by the deployment controller.
+ // +optional
+ ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
+
+ // Total number of non-terminated pods targeted by this deployment (their labels match the selector).
+ // +optional
+ Replicas int32 `json:"replicas,omitempty" protobuf:"varint,2,opt,name=replicas"`
+
+ // Total number of non-terminated pods targeted by this deployment that have the desired template spec.
+ // +optional
+ UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,3,opt,name=updatedReplicas"`
+
+ // Total number of ready pods targeted by this deployment.
+ // +optional
+ ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,7,opt,name=readyReplicas"`
+
+ // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
+ // +optional
+ AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,4,opt,name=availableReplicas"`
+
+ // Total number of unavailable pods targeted by this deployment.
+ // +optional
+ UnavailableReplicas int32 `json:"unavailableReplicas,omitempty" protobuf:"varint,5,opt,name=unavailableReplicas"`
+
+ // Represents the latest available observations of a deployment's current state.
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ Conditions []DeploymentCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"`
+
+ // Count of hash collisions for the Deployment. The Deployment controller uses this
+ // field as a collision avoidance mechanism when it needs to create the name for the
+ // newest ReplicaSet.
+ // +optional
+ CollisionCount *int64 `json:"collisionCount,omitempty" protobuf:"varint,8,opt,name=collisionCount"`
+}
+
+type DeploymentConditionType string
+
+// These are valid conditions of a deployment.
+const (
+ // Available means the deployment is available, ie. at least the minimum available
+ // replicas required are up and running for at least minReadySeconds.
+ DeploymentAvailable DeploymentConditionType = "Available"
+ // Progressing means the deployment is progressing. Progress for a deployment is
+ // considered when a new replica set is created or adopted, and when new pods scale
+ // up or old pods scale down. Progress is not estimated for paused deployments or
+ // when progressDeadlineSeconds is not specified.
+ DeploymentProgressing DeploymentConditionType = "Progressing"
+ // ReplicaFailure is added in a deployment when one of its pods fails to be created
+ // or deleted.
+ DeploymentReplicaFailure DeploymentConditionType = "ReplicaFailure"
+)
+
+// DeploymentCondition describes the state of a deployment at a certain point.
+type DeploymentCondition struct {
+ // Type of deployment condition.
+ Type DeploymentConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=DeploymentConditionType"`
+ // Status of the condition, one of True, False, Unknown.
+ Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"`
+ // The last time this condition was updated.
+ LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,6,opt,name=lastUpdateTime"`
+ // Last time the condition transitioned from one status to another.
+ LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,7,opt,name=lastTransitionTime"`
+ // The reason for the condition's last transition.
+ Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
+ // A human readable message indicating details about the transition.
+ Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
+}
+
+// DeploymentList is a list of Deployments.
+type DeploymentList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of Deployments.
+ Items []Deployment `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// +genclient=true
+
+// ControllerRevision implements an immutable snapshot of state data. Clients
+// are responsible for serializing and deserializing the objects that contain
+// their internal state.
+// Once a ControllerRevision has been successfully created, it can not be updated.
+// The API Server will fail validation of all requests that attempt to mutate
+// the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both
+// the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However,
+// it may be subject to name and representation changes in future releases, and clients should not
+// depend on its stability. It is primarily for internal use by controllers.
+type ControllerRevision struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Data is the serialized representation of the state.
+ Data runtime.RawExtension `json:"data,omitempty" protobuf:"bytes,2,opt,name=data"`
+
+ // Revision indicates the revision of the state represented by Data.
+ Revision int64 `json:"revision" protobuf:"varint,3,opt,name=revision"`
+}
+
+// ControllerRevisionList is a resource containing a list of ControllerRevision objects.
+type ControllerRevisionList struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of ControllerRevisions
+ Items []ControllerRevision `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..00d1a617f
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/types_swagger_doc_generated.go
@@ -0,0 +1,257 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_ControllerRevision = map[string]string{
+ "": "ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "data": "Data is the serialized representation of the state.",
+ "revision": "Revision indicates the revision of the state represented by Data.",
+}
+
+func (ControllerRevision) SwaggerDoc() map[string]string {
+ return map_ControllerRevision
+}
+
+var map_ControllerRevisionList = map[string]string{
+ "": "ControllerRevisionList is a resource containing a list of ControllerRevision objects.",
+ "metadata": "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "items": "Items is the list of ControllerRevisions",
+}
+
+func (ControllerRevisionList) SwaggerDoc() map[string]string {
+ return map_ControllerRevisionList
+}
+
+var map_Deployment = map[string]string{
+ "": "Deployment enables declarative updates for Pods and ReplicaSets.",
+ "metadata": "Standard object metadata.",
+ "spec": "Specification of the desired behavior of the Deployment.",
+ "status": "Most recently observed status of the Deployment.",
+}
+
+func (Deployment) SwaggerDoc() map[string]string {
+ return map_Deployment
+}
+
+var map_DeploymentCondition = map[string]string{
+ "": "DeploymentCondition describes the state of a deployment at a certain point.",
+ "type": "Type of deployment condition.",
+ "status": "Status of the condition, one of True, False, Unknown.",
+ "lastUpdateTime": "The last time this condition was updated.",
+ "lastTransitionTime": "Last time the condition transitioned from one status to another.",
+ "reason": "The reason for the condition's last transition.",
+ "message": "A human readable message indicating details about the transition.",
+}
+
+func (DeploymentCondition) SwaggerDoc() map[string]string {
+ return map_DeploymentCondition
+}
+
+var map_DeploymentList = map[string]string{
+ "": "DeploymentList is a list of Deployments.",
+ "metadata": "Standard list metadata.",
+ "items": "Items is the list of Deployments.",
+}
+
+func (DeploymentList) SwaggerDoc() map[string]string {
+ return map_DeploymentList
+}
+
+var map_DeploymentRollback = map[string]string{
+ "": "DeploymentRollback stores the information required to rollback a deployment.",
+ "name": "Required: This must match the Name of a deployment.",
+ "updatedAnnotations": "The annotations to be updated to a deployment",
+ "rollbackTo": "The config of this deployment rollback.",
+}
+
+func (DeploymentRollback) SwaggerDoc() map[string]string {
+ return map_DeploymentRollback
+}
+
+var map_DeploymentSpec = map[string]string{
+ "": "DeploymentSpec is the specification of the desired behavior of the Deployment.",
+ "replicas": "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.",
+ "selector": "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.",
+ "template": "Template describes the pods that will be created.",
+ "strategy": "The deployment strategy to use to replace existing pods with new ones.",
+ "minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)",
+ "revisionHistoryLimit": "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 2.",
+ "paused": "Indicates that the deployment is paused.",
+ "rollbackTo": "The config this deployment is rolling back to. Will be cleared after rollback is done.",
+ "progressDeadlineSeconds": "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Once autoRollback is implemented, the deployment controller will automatically rollback failed deployments. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.",
+}
+
+func (DeploymentSpec) SwaggerDoc() map[string]string {
+ return map_DeploymentSpec
+}
+
+var map_DeploymentStatus = map[string]string{
+ "": "DeploymentStatus is the most recently observed status of the Deployment.",
+ "observedGeneration": "The generation observed by the deployment controller.",
+ "replicas": "Total number of non-terminated pods targeted by this deployment (their labels match the selector).",
+ "updatedReplicas": "Total number of non-terminated pods targeted by this deployment that have the desired template spec.",
+ "readyReplicas": "Total number of ready pods targeted by this deployment.",
+ "availableReplicas": "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.",
+ "unavailableReplicas": "Total number of unavailable pods targeted by this deployment.",
+ "conditions": "Represents the latest available observations of a deployment's current state.",
+ "collisionCount": "Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.",
+}
+
+func (DeploymentStatus) SwaggerDoc() map[string]string {
+ return map_DeploymentStatus
+}
+
+var map_DeploymentStrategy = map[string]string{
+ "": "DeploymentStrategy describes how to replace existing pods with new ones.",
+ "type": "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.",
+ "rollingUpdate": "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.",
+}
+
+func (DeploymentStrategy) SwaggerDoc() map[string]string {
+ return map_DeploymentStrategy
+}
+
+var map_RollbackConfig = map[string]string{
+ "revision": "The revision to rollback to. If set to 0, rollback to the last revision.",
+}
+
+func (RollbackConfig) SwaggerDoc() map[string]string {
+ return map_RollbackConfig
+}
+
+var map_RollingUpdateDeployment = map[string]string{
+ "": "Spec to control the desired behavior of rolling update.",
+ "maxUnavailable": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.",
+ "maxSurge": "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.",
+}
+
+func (RollingUpdateDeployment) SwaggerDoc() map[string]string {
+ return map_RollingUpdateDeployment
+}
+
+var map_RollingUpdateStatefulSetStrategy = map[string]string{
+ "": "RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.",
+ "partition": "Partition indicates the ordinal at which the StatefulSet should be partitioned.",
+}
+
+func (RollingUpdateStatefulSetStrategy) SwaggerDoc() map[string]string {
+ return map_RollingUpdateStatefulSetStrategy
+}
+
+var map_Scale = map[string]string{
+ "": "Scale represents a scaling request for a resource.",
+ "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.",
+ "spec": "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.",
+ "status": "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.",
+}
+
+func (Scale) SwaggerDoc() map[string]string {
+ return map_Scale
+}
+
+var map_ScaleSpec = map[string]string{
+ "": "ScaleSpec describes the attributes of a scale subresource",
+ "replicas": "desired number of instances for the scaled object.",
+}
+
+func (ScaleSpec) SwaggerDoc() map[string]string {
+ return map_ScaleSpec
+}
+
+var map_ScaleStatus = map[string]string{
+ "": "ScaleStatus represents the current status of a scale subresource.",
+ "replicas": "actual number of observed instances of the scaled object.",
+ "selector": "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors",
+ "targetSelector": "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
+}
+
+func (ScaleStatus) SwaggerDoc() map[string]string {
+ return map_ScaleStatus
+}
+
+var map_StatefulSet = map[string]string{
+ "": "StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity.",
+ "spec": "Spec defines the desired identities of pods in this set.",
+ "status": "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.",
+}
+
+func (StatefulSet) SwaggerDoc() map[string]string {
+ return map_StatefulSet
+}
+
+var map_StatefulSetList = map[string]string{
+ "": "StatefulSetList is a collection of StatefulSets.",
+}
+
+func (StatefulSetList) SwaggerDoc() map[string]string {
+ return map_StatefulSetList
+}
+
+var map_StatefulSetSpec = map[string]string{
+ "": "A StatefulSetSpec is the specification of a StatefulSet.",
+ "replicas": "replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.",
+ "selector": "selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
+ "template": "template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.",
+ "volumeClaimTemplates": "volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.",
+ "serviceName": "serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.",
+ "podManagementPolicy": "podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.",
+ "updateStrategy": "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.",
+ "revisionHistoryLimit": "revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.",
+}
+
+func (StatefulSetSpec) SwaggerDoc() map[string]string {
+ return map_StatefulSetSpec
+}
+
+var map_StatefulSetStatus = map[string]string{
+ "": "StatefulSetStatus represents the current state of a StatefulSet.",
+ "observedGeneration": "observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server.",
+ "replicas": "replicas is the number of Pods created by the StatefulSet controller.",
+ "readyReplicas": "readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.",
+ "currentReplicas": "currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.",
+ "updatedReplicas": "updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision.",
+ "currentRevision": "currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).",
+ "updateRevision": "updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)",
+}
+
+func (StatefulSetStatus) SwaggerDoc() map[string]string {
+ return map_StatefulSetStatus
+}
+
+var map_StatefulSetUpdateStrategy = map[string]string{
+ "": "StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.",
+ "type": "Type indicates the type of the StatefulSetUpdateStrategy.",
+ "rollingUpdate": "RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.",
+}
+
+func (StatefulSetUpdateStrategy) SwaggerDoc() map[string]string {
+ return map_StatefulSetUpdateStrategy
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.conversion.go
new file mode 100644
index 000000000..c2c25db82
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.conversion.go
@@ -0,0 +1,322 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api "k8s.io/client-go/pkg/api"
+ api_v1 "k8s.io/client-go/pkg/api/v1"
+ apps "k8s.io/client-go/pkg/apis/apps"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1beta1_ControllerRevision_To_apps_ControllerRevision,
+ Convert_apps_ControllerRevision_To_v1beta1_ControllerRevision,
+ Convert_v1beta1_ControllerRevisionList_To_apps_ControllerRevisionList,
+ Convert_apps_ControllerRevisionList_To_v1beta1_ControllerRevisionList,
+ Convert_v1beta1_RollingUpdateStatefulSetStrategy_To_apps_RollingUpdateStatefulSetStrategy,
+ Convert_apps_RollingUpdateStatefulSetStrategy_To_v1beta1_RollingUpdateStatefulSetStrategy,
+ Convert_v1beta1_StatefulSet_To_apps_StatefulSet,
+ Convert_apps_StatefulSet_To_v1beta1_StatefulSet,
+ Convert_v1beta1_StatefulSetList_To_apps_StatefulSetList,
+ Convert_apps_StatefulSetList_To_v1beta1_StatefulSetList,
+ Convert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec,
+ Convert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec,
+ Convert_v1beta1_StatefulSetStatus_To_apps_StatefulSetStatus,
+ Convert_apps_StatefulSetStatus_To_v1beta1_StatefulSetStatus,
+ Convert_v1beta1_StatefulSetUpdateStrategy_To_apps_StatefulSetUpdateStrategy,
+ Convert_apps_StatefulSetUpdateStrategy_To_v1beta1_StatefulSetUpdateStrategy,
+ )
+}
+
+func autoConvert_v1beta1_ControllerRevision_To_apps_ControllerRevision(in *ControllerRevision, out *apps.ControllerRevision, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.Data, &out.Data, s); err != nil {
+ return err
+ }
+ out.Revision = in.Revision
+ return nil
+}
+
+// Convert_v1beta1_ControllerRevision_To_apps_ControllerRevision is an autogenerated conversion function.
+func Convert_v1beta1_ControllerRevision_To_apps_ControllerRevision(in *ControllerRevision, out *apps.ControllerRevision, s conversion.Scope) error {
+ return autoConvert_v1beta1_ControllerRevision_To_apps_ControllerRevision(in, out, s)
+}
+
+func autoConvert_apps_ControllerRevision_To_v1beta1_ControllerRevision(in *apps.ControllerRevision, out *ControllerRevision, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.Data, &out.Data, s); err != nil {
+ return err
+ }
+ out.Revision = in.Revision
+ return nil
+}
+
+// Convert_apps_ControllerRevision_To_v1beta1_ControllerRevision is an autogenerated conversion function.
+func Convert_apps_ControllerRevision_To_v1beta1_ControllerRevision(in *apps.ControllerRevision, out *ControllerRevision, s conversion.Scope) error {
+ return autoConvert_apps_ControllerRevision_To_v1beta1_ControllerRevision(in, out, s)
+}
+
+func autoConvert_v1beta1_ControllerRevisionList_To_apps_ControllerRevisionList(in *ControllerRevisionList, out *apps.ControllerRevisionList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]apps.ControllerRevision, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_ControllerRevision_To_apps_ControllerRevision(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1beta1_ControllerRevisionList_To_apps_ControllerRevisionList is an autogenerated conversion function.
+func Convert_v1beta1_ControllerRevisionList_To_apps_ControllerRevisionList(in *ControllerRevisionList, out *apps.ControllerRevisionList, s conversion.Scope) error {
+ return autoConvert_v1beta1_ControllerRevisionList_To_apps_ControllerRevisionList(in, out, s)
+}
+
+func autoConvert_apps_ControllerRevisionList_To_v1beta1_ControllerRevisionList(in *apps.ControllerRevisionList, out *ControllerRevisionList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ControllerRevision, len(*in))
+ for i := range *in {
+ if err := Convert_apps_ControllerRevision_To_v1beta1_ControllerRevision(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]ControllerRevision, 0)
+ }
+ return nil
+}
+
+// Convert_apps_ControllerRevisionList_To_v1beta1_ControllerRevisionList is an autogenerated conversion function.
+func Convert_apps_ControllerRevisionList_To_v1beta1_ControllerRevisionList(in *apps.ControllerRevisionList, out *ControllerRevisionList, s conversion.Scope) error {
+ return autoConvert_apps_ControllerRevisionList_To_v1beta1_ControllerRevisionList(in, out, s)
+}
+
+func autoConvert_v1beta1_RollingUpdateStatefulSetStrategy_To_apps_RollingUpdateStatefulSetStrategy(in *RollingUpdateStatefulSetStrategy, out *apps.RollingUpdateStatefulSetStrategy, s conversion.Scope) error {
+ if err := v1.Convert_Pointer_int32_To_int32(&in.Partition, &out.Partition, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_RollingUpdateStatefulSetStrategy_To_apps_RollingUpdateStatefulSetStrategy is an autogenerated conversion function.
+func Convert_v1beta1_RollingUpdateStatefulSetStrategy_To_apps_RollingUpdateStatefulSetStrategy(in *RollingUpdateStatefulSetStrategy, out *apps.RollingUpdateStatefulSetStrategy, s conversion.Scope) error {
+ return autoConvert_v1beta1_RollingUpdateStatefulSetStrategy_To_apps_RollingUpdateStatefulSetStrategy(in, out, s)
+}
+
+func autoConvert_apps_RollingUpdateStatefulSetStrategy_To_v1beta1_RollingUpdateStatefulSetStrategy(in *apps.RollingUpdateStatefulSetStrategy, out *RollingUpdateStatefulSetStrategy, s conversion.Scope) error {
+ if err := v1.Convert_int32_To_Pointer_int32(&in.Partition, &out.Partition, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_apps_RollingUpdateStatefulSetStrategy_To_v1beta1_RollingUpdateStatefulSetStrategy is an autogenerated conversion function.
+func Convert_apps_RollingUpdateStatefulSetStrategy_To_v1beta1_RollingUpdateStatefulSetStrategy(in *apps.RollingUpdateStatefulSetStrategy, out *RollingUpdateStatefulSetStrategy, s conversion.Scope) error {
+ return autoConvert_apps_RollingUpdateStatefulSetStrategy_To_v1beta1_RollingUpdateStatefulSetStrategy(in, out, s)
+}
+
+func autoConvert_v1beta1_StatefulSet_To_apps_StatefulSet(in *StatefulSet, out *apps.StatefulSet, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_StatefulSetStatus_To_apps_StatefulSetStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_StatefulSet_To_apps_StatefulSet is an autogenerated conversion function.
+func Convert_v1beta1_StatefulSet_To_apps_StatefulSet(in *StatefulSet, out *apps.StatefulSet, s conversion.Scope) error {
+ return autoConvert_v1beta1_StatefulSet_To_apps_StatefulSet(in, out, s)
+}
+
+func autoConvert_apps_StatefulSet_To_v1beta1_StatefulSet(in *apps.StatefulSet, out *StatefulSet, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_apps_StatefulSetStatus_To_v1beta1_StatefulSetStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_apps_StatefulSet_To_v1beta1_StatefulSet is an autogenerated conversion function.
+func Convert_apps_StatefulSet_To_v1beta1_StatefulSet(in *apps.StatefulSet, out *StatefulSet, s conversion.Scope) error {
+ return autoConvert_apps_StatefulSet_To_v1beta1_StatefulSet(in, out, s)
+}
+
+func autoConvert_v1beta1_StatefulSetList_To_apps_StatefulSetList(in *StatefulSetList, out *apps.StatefulSetList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]apps.StatefulSet, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_StatefulSet_To_apps_StatefulSet(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1beta1_StatefulSetList_To_apps_StatefulSetList is an autogenerated conversion function.
+func Convert_v1beta1_StatefulSetList_To_apps_StatefulSetList(in *StatefulSetList, out *apps.StatefulSetList, s conversion.Scope) error {
+ return autoConvert_v1beta1_StatefulSetList_To_apps_StatefulSetList(in, out, s)
+}
+
+func autoConvert_apps_StatefulSetList_To_v1beta1_StatefulSetList(in *apps.StatefulSetList, out *StatefulSetList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]StatefulSet, len(*in))
+ for i := range *in {
+ if err := Convert_apps_StatefulSet_To_v1beta1_StatefulSet(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]StatefulSet, 0)
+ }
+ return nil
+}
+
+// Convert_apps_StatefulSetList_To_v1beta1_StatefulSetList is an autogenerated conversion function.
+func Convert_apps_StatefulSetList_To_v1beta1_StatefulSetList(in *apps.StatefulSetList, out *StatefulSetList, s conversion.Scope) error {
+ return autoConvert_apps_StatefulSetList_To_v1beta1_StatefulSetList(in, out, s)
+}
+
+func autoConvert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec(in *StatefulSetSpec, out *apps.StatefulSetSpec, s conversion.Scope) error {
+ if err := v1.Convert_Pointer_int32_To_int32(&in.Replicas, &out.Replicas, s); err != nil {
+ return err
+ }
+ out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector))
+ if err := api_v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ out.VolumeClaimTemplates = *(*[]api.PersistentVolumeClaim)(unsafe.Pointer(&in.VolumeClaimTemplates))
+ out.ServiceName = in.ServiceName
+ out.PodManagementPolicy = apps.PodManagementPolicyType(in.PodManagementPolicy)
+ if err := Convert_v1beta1_StatefulSetUpdateStrategy_To_apps_StatefulSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, s); err != nil {
+ return err
+ }
+ out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit))
+ return nil
+}
+
+func autoConvert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec(in *apps.StatefulSetSpec, out *StatefulSetSpec, s conversion.Scope) error {
+ if err := v1.Convert_int32_To_Pointer_int32(&in.Replicas, &out.Replicas, s); err != nil {
+ return err
+ }
+ out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector))
+ if err := api_v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ out.VolumeClaimTemplates = *(*[]api_v1.PersistentVolumeClaim)(unsafe.Pointer(&in.VolumeClaimTemplates))
+ out.ServiceName = in.ServiceName
+ out.PodManagementPolicy = PodManagementPolicyType(in.PodManagementPolicy)
+ if err := Convert_apps_StatefulSetUpdateStrategy_To_v1beta1_StatefulSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, s); err != nil {
+ return err
+ }
+ out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit))
+ return nil
+}
+
+func autoConvert_v1beta1_StatefulSetStatus_To_apps_StatefulSetStatus(in *StatefulSetStatus, out *apps.StatefulSetStatus, s conversion.Scope) error {
+ out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration))
+ out.Replicas = in.Replicas
+ out.ReadyReplicas = in.ReadyReplicas
+ out.CurrentReplicas = in.CurrentReplicas
+ out.UpdatedReplicas = in.UpdatedReplicas
+ out.CurrentRevision = in.CurrentRevision
+ out.UpdateRevision = in.UpdateRevision
+ return nil
+}
+
+// Convert_v1beta1_StatefulSetStatus_To_apps_StatefulSetStatus is an autogenerated conversion function.
+func Convert_v1beta1_StatefulSetStatus_To_apps_StatefulSetStatus(in *StatefulSetStatus, out *apps.StatefulSetStatus, s conversion.Scope) error {
+ return autoConvert_v1beta1_StatefulSetStatus_To_apps_StatefulSetStatus(in, out, s)
+}
+
+func autoConvert_apps_StatefulSetStatus_To_v1beta1_StatefulSetStatus(in *apps.StatefulSetStatus, out *StatefulSetStatus, s conversion.Scope) error {
+ out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration))
+ out.Replicas = in.Replicas
+ out.ReadyReplicas = in.ReadyReplicas
+ out.CurrentReplicas = in.CurrentReplicas
+ out.UpdatedReplicas = in.UpdatedReplicas
+ out.CurrentRevision = in.CurrentRevision
+ out.UpdateRevision = in.UpdateRevision
+ return nil
+}
+
+// Convert_apps_StatefulSetStatus_To_v1beta1_StatefulSetStatus is an autogenerated conversion function.
+func Convert_apps_StatefulSetStatus_To_v1beta1_StatefulSetStatus(in *apps.StatefulSetStatus, out *StatefulSetStatus, s conversion.Scope) error {
+ return autoConvert_apps_StatefulSetStatus_To_v1beta1_StatefulSetStatus(in, out, s)
+}
+
+func autoConvert_v1beta1_StatefulSetUpdateStrategy_To_apps_StatefulSetUpdateStrategy(in *StatefulSetUpdateStrategy, out *apps.StatefulSetUpdateStrategy, s conversion.Scope) error {
+ out.Type = apps.StatefulSetUpdateStrategyType(in.Type)
+ if in.RollingUpdate != nil {
+ in, out := &in.RollingUpdate, &out.RollingUpdate
+ *out = new(apps.RollingUpdateStatefulSetStrategy)
+ if err := Convert_v1beta1_RollingUpdateStatefulSetStrategy_To_apps_RollingUpdateStatefulSetStrategy(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.RollingUpdate = nil
+ }
+ return nil
+}
+
+func autoConvert_apps_StatefulSetUpdateStrategy_To_v1beta1_StatefulSetUpdateStrategy(in *apps.StatefulSetUpdateStrategy, out *StatefulSetUpdateStrategy, s conversion.Scope) error {
+ out.Type = StatefulSetUpdateStrategyType(in.Type)
+ if in.RollingUpdate != nil {
+ in, out := &in.RollingUpdate, &out.RollingUpdate
+ *out = new(RollingUpdateStatefulSetStrategy)
+ if err := Convert_apps_RollingUpdateStatefulSetStrategy_To_v1beta1_RollingUpdateStatefulSetStrategy(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.RollingUpdate = nil
+ }
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..5be343981
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go
@@ -0,0 +1,459 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ intstr "k8s.io/apimachinery/pkg/util/intstr"
+ api_v1 "k8s.io/client-go/pkg/api/v1"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ControllerRevision, InType: reflect.TypeOf(&ControllerRevision{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ControllerRevisionList, InType: reflect.TypeOf(&ControllerRevisionList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Deployment, InType: reflect.TypeOf(&Deployment{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentCondition, InType: reflect.TypeOf(&DeploymentCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentList, InType: reflect.TypeOf(&DeploymentList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentRollback, InType: reflect.TypeOf(&DeploymentRollback{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentSpec, InType: reflect.TypeOf(&DeploymentSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentStatus, InType: reflect.TypeOf(&DeploymentStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentStrategy, InType: reflect.TypeOf(&DeploymentStrategy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RollbackConfig, InType: reflect.TypeOf(&RollbackConfig{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RollingUpdateDeployment, InType: reflect.TypeOf(&RollingUpdateDeployment{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RollingUpdateStatefulSetStrategy, InType: reflect.TypeOf(&RollingUpdateStatefulSetStrategy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Scale, InType: reflect.TypeOf(&Scale{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ScaleSpec, InType: reflect.TypeOf(&ScaleSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ScaleStatus, InType: reflect.TypeOf(&ScaleStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StatefulSet, InType: reflect.TypeOf(&StatefulSet{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StatefulSetList, InType: reflect.TypeOf(&StatefulSetList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StatefulSetSpec, InType: reflect.TypeOf(&StatefulSetSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StatefulSetStatus, InType: reflect.TypeOf(&StatefulSetStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StatefulSetUpdateStrategy, InType: reflect.TypeOf(&StatefulSetUpdateStrategy{})},
+ )
+}
+
+// DeepCopy_v1beta1_ControllerRevision is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ControllerRevision(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ControllerRevision)
+ out := out.(*ControllerRevision)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if newVal, err := c.DeepCopy(&in.Data); err != nil {
+ return err
+ } else {
+ out.Data = *newVal.(*runtime.RawExtension)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ControllerRevisionList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ControllerRevisionList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ControllerRevisionList)
+ out := out.(*ControllerRevisionList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ControllerRevision, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_ControllerRevision(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_Deployment is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_Deployment(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Deployment)
+ out := out.(*Deployment)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_DeploymentSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_DeploymentStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DeploymentCondition is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DeploymentCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentCondition)
+ out := out.(*DeploymentCondition)
+ *out = *in
+ out.LastUpdateTime = in.LastUpdateTime.DeepCopy()
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DeploymentList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DeploymentList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentList)
+ out := out.(*DeploymentList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Deployment, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_Deployment(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DeploymentRollback is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DeploymentRollback(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentRollback)
+ out := out.(*DeploymentRollback)
+ *out = *in
+ if in.UpdatedAnnotations != nil {
+ in, out := &in.UpdatedAnnotations, &out.UpdatedAnnotations
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DeploymentSpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DeploymentSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentSpec)
+ out := out.(*DeploymentSpec)
+ *out = *in
+ if in.Replicas != nil {
+ in, out := &in.Replicas, &out.Replicas
+ *out = new(int32)
+ **out = **in
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_DeploymentStrategy(&in.Strategy, &out.Strategy, c); err != nil {
+ return err
+ }
+ if in.RevisionHistoryLimit != nil {
+ in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
+ *out = new(int32)
+ **out = **in
+ }
+ if in.RollbackTo != nil {
+ in, out := &in.RollbackTo, &out.RollbackTo
+ *out = new(RollbackConfig)
+ **out = **in
+ }
+ if in.ProgressDeadlineSeconds != nil {
+ in, out := &in.ProgressDeadlineSeconds, &out.ProgressDeadlineSeconds
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DeploymentStatus is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DeploymentStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentStatus)
+ out := out.(*DeploymentStatus)
+ *out = *in
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]DeploymentCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_DeploymentCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.CollisionCount != nil {
+ in, out := &in.CollisionCount, &out.CollisionCount
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DeploymentStrategy is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DeploymentStrategy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentStrategy)
+ out := out.(*DeploymentStrategy)
+ *out = *in
+ if in.RollingUpdate != nil {
+ in, out := &in.RollingUpdate, &out.RollingUpdate
+ *out = new(RollingUpdateDeployment)
+ if err := DeepCopy_v1beta1_RollingUpdateDeployment(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_RollbackConfig is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_RollbackConfig(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RollbackConfig)
+ out := out.(*RollbackConfig)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_RollingUpdateDeployment is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_RollingUpdateDeployment(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RollingUpdateDeployment)
+ out := out.(*RollingUpdateDeployment)
+ *out = *in
+ if in.MaxUnavailable != nil {
+ in, out := &in.MaxUnavailable, &out.MaxUnavailable
+ *out = new(intstr.IntOrString)
+ **out = **in
+ }
+ if in.MaxSurge != nil {
+ in, out := &in.MaxSurge, &out.MaxSurge
+ *out = new(intstr.IntOrString)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_RollingUpdateStatefulSetStrategy is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_RollingUpdateStatefulSetStrategy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RollingUpdateStatefulSetStrategy)
+ out := out.(*RollingUpdateStatefulSetStrategy)
+ *out = *in
+ if in.Partition != nil {
+ in, out := &in.Partition, &out.Partition
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_Scale is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_Scale(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Scale)
+ out := out.(*Scale)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_ScaleStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ScaleSpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ScaleSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ScaleSpec)
+ out := out.(*ScaleSpec)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ScaleStatus is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ScaleStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ScaleStatus)
+ out := out.(*ScaleStatus)
+ *out = *in
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_StatefulSet is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_StatefulSet(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StatefulSet)
+ out := out.(*StatefulSet)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_StatefulSetSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_StatefulSetStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_StatefulSetList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_StatefulSetList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StatefulSetList)
+ out := out.(*StatefulSetList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]StatefulSet, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_StatefulSet(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_StatefulSetSpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_StatefulSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StatefulSetSpec)
+ out := out.(*StatefulSetSpec)
+ *out = *in
+ if in.Replicas != nil {
+ in, out := &in.Replicas, &out.Replicas
+ *out = new(int32)
+ **out = **in
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ if in.VolumeClaimTemplates != nil {
+ in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates
+ *out = make([]api_v1.PersistentVolumeClaim, len(*in))
+ for i := range *in {
+ if err := api_v1.DeepCopy_v1_PersistentVolumeClaim(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if err := DeepCopy_v1beta1_StatefulSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, c); err != nil {
+ return err
+ }
+ if in.RevisionHistoryLimit != nil {
+ in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_StatefulSetStatus is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_StatefulSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StatefulSetStatus)
+ out := out.(*StatefulSetStatus)
+ *out = *in
+ if in.ObservedGeneration != nil {
+ in, out := &in.ObservedGeneration, &out.ObservedGeneration
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_StatefulSetUpdateStrategy is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_StatefulSetUpdateStrategy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StatefulSetUpdateStrategy)
+ out := out.(*StatefulSetUpdateStrategy)
+ *out = *in
+ if in.RollingUpdate != nil {
+ in, out := &in.RollingUpdate, &out.RollingUpdate
+ *out = new(RollingUpdateStatefulSetStrategy)
+ if err := DeepCopy_v1beta1_RollingUpdateStatefulSetStrategy(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.defaults.go
new file mode 100644
index 000000000..9b822c84c
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.defaults.go
@@ -0,0 +1,326 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ v1 "k8s.io/client-go/pkg/api/v1"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ scheme.AddTypeDefaultingFunc(&Deployment{}, func(obj interface{}) { SetObjectDefaults_Deployment(obj.(*Deployment)) })
+ scheme.AddTypeDefaultingFunc(&DeploymentList{}, func(obj interface{}) { SetObjectDefaults_DeploymentList(obj.(*DeploymentList)) })
+ scheme.AddTypeDefaultingFunc(&StatefulSet{}, func(obj interface{}) { SetObjectDefaults_StatefulSet(obj.(*StatefulSet)) })
+ scheme.AddTypeDefaultingFunc(&StatefulSetList{}, func(obj interface{}) { SetObjectDefaults_StatefulSetList(obj.(*StatefulSetList)) })
+ return nil
+}
+
+func SetObjectDefaults_Deployment(in *Deployment) {
+ SetDefaults_Deployment(in)
+ v1.SetDefaults_PodSpec(&in.Spec.Template.Spec)
+ for i := range in.Spec.Template.Spec.Volumes {
+ a := &in.Spec.Template.Spec.Volumes[i]
+ v1.SetDefaults_Volume(a)
+ if a.VolumeSource.Secret != nil {
+ v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
+ }
+ if a.VolumeSource.ISCSI != nil {
+ v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
+ }
+ if a.VolumeSource.RBD != nil {
+ v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
+ }
+ if a.VolumeSource.DownwardAPI != nil {
+ v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
+ for j := range a.VolumeSource.DownwardAPI.Items {
+ b := &a.VolumeSource.DownwardAPI.Items[j]
+ if b.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.FieldRef)
+ }
+ }
+ }
+ if a.VolumeSource.ConfigMap != nil {
+ v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
+ }
+ if a.VolumeSource.AzureDisk != nil {
+ v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
+ }
+ if a.VolumeSource.Projected != nil {
+ v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
+ for j := range a.VolumeSource.Projected.Sources {
+ b := &a.VolumeSource.Projected.Sources[j]
+ if b.DownwardAPI != nil {
+ for k := range b.DownwardAPI.Items {
+ c := &b.DownwardAPI.Items[k]
+ if c.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(c.FieldRef)
+ }
+ }
+ }
+ }
+ }
+ if a.VolumeSource.ScaleIO != nil {
+ v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO)
+ }
+ }
+ for i := range in.Spec.Template.Spec.InitContainers {
+ a := &in.Spec.Template.Spec.InitContainers[i]
+ v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+ for i := range in.Spec.Template.Spec.Containers {
+ a := &in.Spec.Template.Spec.Containers[i]
+ v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+}
+
+func SetObjectDefaults_DeploymentList(in *DeploymentList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_Deployment(a)
+ }
+}
+
+func SetObjectDefaults_StatefulSet(in *StatefulSet) {
+ SetDefaults_StatefulSet(in)
+ v1.SetDefaults_PodSpec(&in.Spec.Template.Spec)
+ for i := range in.Spec.Template.Spec.Volumes {
+ a := &in.Spec.Template.Spec.Volumes[i]
+ v1.SetDefaults_Volume(a)
+ if a.VolumeSource.Secret != nil {
+ v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
+ }
+ if a.VolumeSource.ISCSI != nil {
+ v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
+ }
+ if a.VolumeSource.RBD != nil {
+ v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
+ }
+ if a.VolumeSource.DownwardAPI != nil {
+ v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
+ for j := range a.VolumeSource.DownwardAPI.Items {
+ b := &a.VolumeSource.DownwardAPI.Items[j]
+ if b.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.FieldRef)
+ }
+ }
+ }
+ if a.VolumeSource.ConfigMap != nil {
+ v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
+ }
+ if a.VolumeSource.AzureDisk != nil {
+ v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
+ }
+ if a.VolumeSource.Projected != nil {
+ v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
+ for j := range a.VolumeSource.Projected.Sources {
+ b := &a.VolumeSource.Projected.Sources[j]
+ if b.DownwardAPI != nil {
+ for k := range b.DownwardAPI.Items {
+ c := &b.DownwardAPI.Items[k]
+ if c.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(c.FieldRef)
+ }
+ }
+ }
+ }
+ }
+ if a.VolumeSource.ScaleIO != nil {
+ v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO)
+ }
+ }
+ for i := range in.Spec.Template.Spec.InitContainers {
+ a := &in.Spec.Template.Spec.InitContainers[i]
+ v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+ for i := range in.Spec.Template.Spec.Containers {
+ a := &in.Spec.Template.Spec.Containers[i]
+ v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+ for i := range in.Spec.VolumeClaimTemplates {
+ a := &in.Spec.VolumeClaimTemplates[i]
+ v1.SetDefaults_PersistentVolumeClaim(a)
+ v1.SetDefaults_ResourceList(&a.Spec.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Spec.Resources.Requests)
+ v1.SetDefaults_ResourceList(&a.Status.Capacity)
+ }
+}
+
+func SetObjectDefaults_StatefulSetList(in *StatefulSetList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_StatefulSet(a)
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/apps/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/apps/zz_generated.deepcopy.go
new file mode 100644
index 000000000..ff37ef9bc
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/apps/zz_generated.deepcopy.go
@@ -0,0 +1,208 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package apps
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api "k8s.io/client-go/pkg/api"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_ControllerRevision, InType: reflect.TypeOf(&ControllerRevision{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_ControllerRevisionList, InType: reflect.TypeOf(&ControllerRevisionList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_RollingUpdateStatefulSetStrategy, InType: reflect.TypeOf(&RollingUpdateStatefulSetStrategy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSet, InType: reflect.TypeOf(&StatefulSet{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSetList, InType: reflect.TypeOf(&StatefulSetList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSetSpec, InType: reflect.TypeOf(&StatefulSetSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSetStatus, InType: reflect.TypeOf(&StatefulSetStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSetUpdateStrategy, InType: reflect.TypeOf(&StatefulSetUpdateStrategy{})},
+ )
+}
+
+// DeepCopy_apps_ControllerRevision is an autogenerated deepcopy function.
+func DeepCopy_apps_ControllerRevision(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ControllerRevision)
+ out := out.(*ControllerRevision)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ // in.Data is kind 'Interface'
+ if in.Data != nil {
+ if newVal, err := c.DeepCopy(&in.Data); err != nil {
+ return err
+ } else {
+ out.Data = *newVal.(*runtime.Object)
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_apps_ControllerRevisionList is an autogenerated deepcopy function.
+func DeepCopy_apps_ControllerRevisionList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ControllerRevisionList)
+ out := out.(*ControllerRevisionList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ControllerRevision, len(*in))
+ for i := range *in {
+ if err := DeepCopy_apps_ControllerRevision(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_apps_RollingUpdateStatefulSetStrategy is an autogenerated deepcopy function.
+func DeepCopy_apps_RollingUpdateStatefulSetStrategy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RollingUpdateStatefulSetStrategy)
+ out := out.(*RollingUpdateStatefulSetStrategy)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_apps_StatefulSet is an autogenerated deepcopy function.
+func DeepCopy_apps_StatefulSet(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StatefulSet)
+ out := out.(*StatefulSet)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_apps_StatefulSetSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_apps_StatefulSetStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_apps_StatefulSetList is an autogenerated deepcopy function.
+func DeepCopy_apps_StatefulSetList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StatefulSetList)
+ out := out.(*StatefulSetList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]StatefulSet, len(*in))
+ for i := range *in {
+ if err := DeepCopy_apps_StatefulSet(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_apps_StatefulSetSpec is an autogenerated deepcopy function.
+func DeepCopy_apps_StatefulSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StatefulSetSpec)
+ out := out.(*StatefulSetSpec)
+ *out = *in
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if err := api.DeepCopy_api_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ if in.VolumeClaimTemplates != nil {
+ in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates
+ *out = make([]api.PersistentVolumeClaim, len(*in))
+ for i := range *in {
+ if err := api.DeepCopy_api_PersistentVolumeClaim(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if err := DeepCopy_apps_StatefulSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, c); err != nil {
+ return err
+ }
+ if in.RevisionHistoryLimit != nil {
+ in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_apps_StatefulSetStatus is an autogenerated deepcopy function.
+func DeepCopy_apps_StatefulSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StatefulSetStatus)
+ out := out.(*StatefulSetStatus)
+ *out = *in
+ if in.ObservedGeneration != nil {
+ in, out := &in.ObservedGeneration, &out.ObservedGeneration
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_apps_StatefulSetUpdateStrategy is an autogenerated deepcopy function.
+func DeepCopy_apps_StatefulSetUpdateStrategy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StatefulSetUpdateStrategy)
+ out := out.(*StatefulSetUpdateStrategy)
+ *out = *in
+ if in.RollingUpdate != nil {
+ in, out := &in.RollingUpdate, &out.RollingUpdate
+ *out = new(RollingUpdateStatefulSetStrategy)
+ **out = **in
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/doc.go b/vendor/k8s.io/client-go/pkg/apis/authentication/doc.go
new file mode 100644
index 000000000..194de434d
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authentication/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +groupName=authentication.k8s.io
+package authentication
diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/register.go b/vendor/k8s.io/client-go/pkg/apis/authentication/register.go
new file mode 100644
index 000000000..b0ac3c28b
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authentication/register.go
@@ -0,0 +1,50 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package authentication
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "authentication.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &TokenReview{},
+ )
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/types.go b/vendor/k8s.io/client-go/pkg/apis/authentication/types.go
new file mode 100644
index 000000000..9c1e66b7b
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authentication/types.go
@@ -0,0 +1,89 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package authentication
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+const (
+ // ImpersonateUserHeader is used to impersonate a particular user during an API server request
+ ImpersonateUserHeader = "Impersonate-User"
+
+ // ImpersonateGroupHeader is used to impersonate a particular group during an API server request.
+ // It can be repeated multiplied times for multiple groups.
+ ImpersonateGroupHeader = "Impersonate-Group"
+
+ // ImpersonateUserExtraHeaderPrefix is a prefix for any header used to impersonate an entry in the
+ // extra map[string][]string for user.Info. The key will be every after the prefix.
+ // It can be repeated multiplied times for multiple map keys and the same key can be repeated multiple
+ // times to have multiple elements in the slice under a single key
+ ImpersonateUserExtraHeaderPrefix = "Impersonate-Extra-"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+// +noMethods=true
+
+// TokenReview attempts to authenticate a token to a known user.
+type TokenReview struct {
+ metav1.TypeMeta
+ // ObjectMeta fulfills the metav1.ObjectMetaAccessor interface so that the stock
+ // REST handler paths work
+ metav1.ObjectMeta
+
+ // Spec holds information about the request being evaluated
+ Spec TokenReviewSpec
+
+ // Status is filled in by the server and indicates whether the request can be authenticated.
+ Status TokenReviewStatus
+}
+
+// TokenReviewSpec is a description of the token authentication request.
+type TokenReviewSpec struct {
+ // Token is the opaque bearer token.
+ Token string
+}
+
+// TokenReviewStatus is the result of the token authentication request.
+// This type mirrors the authentication.Token interface
+type TokenReviewStatus struct {
+ // Authenticated indicates that the token was associated with a known user.
+ Authenticated bool
+ // User is the UserInfo associated with the provided token.
+ User UserInfo
+ // Error indicates that the token couldn't be checked
+ Error string
+}
+
+// UserInfo holds the information about the user needed to implement the
+// user.Info interface.
+type UserInfo struct {
+ // The name that uniquely identifies this user among all active users.
+ Username string
+ // A unique value that identifies this user across time. If this user is
+ // deleted and another user by the same name is added, they will have
+ // different UIDs.
+ UID string
+ // The names of groups this user is a part of.
+ Groups []string
+ // Any additional information provided by the authenticator.
+ Extra map[string]ExtraValue
+}
+
+// ExtraValue masks the value so protobuf can generate
+type ExtraValue []string
diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1/conversion.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/conversion.go
new file mode 100644
index 000000000..2ff5732d6
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/conversion.go
@@ -0,0 +1,26 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) error {
+ // Add non-generated conversion functions
+ return scheme.AddConversionFuncs()
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1/defaults.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/defaults.go
new file mode 100644
index 000000000..074e15bae
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/defaults.go
@@ -0,0 +1,25 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1/doc.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/doc.go
new file mode 100644
index 000000000..8140e47c5
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +groupName=authentication.k8s.io
+package v1
diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/generated.pb.go
new file mode 100644
index 000000000..e26481136
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/generated.pb.go
@@ -0,0 +1,1301 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/authentication/v1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/authentication/v1/generated.proto
+
+ It has these top-level messages:
+ ExtraValue
+ TokenReview
+ TokenReviewSpec
+ TokenReviewStatus
+ UserInfo
+*/
+package v1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *ExtraValue) Reset() { *m = ExtraValue{} }
+func (*ExtraValue) ProtoMessage() {}
+func (*ExtraValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *TokenReview) Reset() { *m = TokenReview{} }
+func (*TokenReview) ProtoMessage() {}
+func (*TokenReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *TokenReviewSpec) Reset() { *m = TokenReviewSpec{} }
+func (*TokenReviewSpec) ProtoMessage() {}
+func (*TokenReviewSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
+
+func (m *TokenReviewStatus) Reset() { *m = TokenReviewStatus{} }
+func (*TokenReviewStatus) ProtoMessage() {}
+func (*TokenReviewStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
+
+func (m *UserInfo) Reset() { *m = UserInfo{} }
+func (*UserInfo) ProtoMessage() {}
+func (*UserInfo) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
+
+func init() {
+ proto.RegisterType((*ExtraValue)(nil), "k8s.io.client-go.pkg.apis.authentication.v1.ExtraValue")
+ proto.RegisterType((*TokenReview)(nil), "k8s.io.client-go.pkg.apis.authentication.v1.TokenReview")
+ proto.RegisterType((*TokenReviewSpec)(nil), "k8s.io.client-go.pkg.apis.authentication.v1.TokenReviewSpec")
+ proto.RegisterType((*TokenReviewStatus)(nil), "k8s.io.client-go.pkg.apis.authentication.v1.TokenReviewStatus")
+ proto.RegisterType((*UserInfo)(nil), "k8s.io.client-go.pkg.apis.authentication.v1.UserInfo")
+}
+func (m ExtraValue) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m ExtraValue) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m) > 0 {
+ for _, s := range m {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *TokenReview) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *TokenReview) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n2, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n3, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ return i, nil
+}
+
+func (m *TokenReviewSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *TokenReviewSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Token)))
+ i += copy(dAtA[i:], m.Token)
+ return i, nil
+}
+
+func (m *TokenReviewStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *TokenReviewStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ if m.Authenticated {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.User.Size()))
+ n4, err := m.User.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Error)))
+ i += copy(dAtA[i:], m.Error)
+ return i, nil
+}
+
+func (m *UserInfo) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *UserInfo) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Username)))
+ i += copy(dAtA[i:], m.Username)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID)))
+ i += copy(dAtA[i:], m.UID)
+ if len(m.Groups) > 0 {
+ for _, s := range m.Groups {
+ dAtA[i] = 0x1a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Extra) > 0 {
+ keysForExtra := make([]string, 0, len(m.Extra))
+ for k := range m.Extra {
+ keysForExtra = append(keysForExtra, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
+ for _, k := range keysForExtra {
+ dAtA[i] = 0x22
+ i++
+ v := m.Extra[string(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n5, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ }
+ }
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m ExtraValue) Size() (n int) {
+ var l int
+ _ = l
+ if len(m) > 0 {
+ for _, s := range m {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *TokenReview) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *TokenReviewSpec) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Token)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *TokenReviewStatus) Size() (n int) {
+ var l int
+ _ = l
+ n += 2
+ l = m.User.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Error)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *UserInfo) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Username)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.UID)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Groups) > 0 {
+ for _, s := range m.Groups {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Extra) > 0 {
+ for k, v := range m.Extra {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *TokenReview) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&TokenReview{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "TokenReviewSpec", "TokenReviewSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "TokenReviewStatus", "TokenReviewStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *TokenReviewSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&TokenReviewSpec{`,
+ `Token:` + fmt.Sprintf("%v", this.Token) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *TokenReviewStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&TokenReviewStatus{`,
+ `Authenticated:` + fmt.Sprintf("%v", this.Authenticated) + `,`,
+ `User:` + strings.Replace(strings.Replace(this.User.String(), "UserInfo", "UserInfo", 1), `&`, ``, 1) + `,`,
+ `Error:` + fmt.Sprintf("%v", this.Error) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *UserInfo) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForExtra := make([]string, 0, len(this.Extra))
+ for k := range this.Extra {
+ keysForExtra = append(keysForExtra, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
+ mapStringForExtra := "map[string]ExtraValue{"
+ for _, k := range keysForExtra {
+ mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k])
+ }
+ mapStringForExtra += "}"
+ s := strings.Join([]string{`&UserInfo{`,
+ `Username:` + fmt.Sprintf("%v", this.Username) + `,`,
+ `UID:` + fmt.Sprintf("%v", this.UID) + `,`,
+ `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`,
+ `Extra:` + mapStringForExtra + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *ExtraValue) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExtraValue: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExtraValue: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ *m = append(*m, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *TokenReview) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: TokenReview: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: TokenReview: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *TokenReviewSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: TokenReviewSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: TokenReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Token = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *TokenReviewStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: TokenReviewStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: TokenReviewStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Authenticated", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Authenticated = bool(v != 0)
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.User.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Error = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *UserInfo) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: UserInfo: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: UserInfo: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Username = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.UID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Extra", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Extra == nil {
+ m.Extra = make(map[string]ExtraValue)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &ExtraValue{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Extra[mapkey] = *mapvalue
+ } else {
+ var mapvalue ExtraValue
+ m.Extra[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/client-go/pkg/apis/authentication/v1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 640 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0xcd, 0x6e, 0xd3, 0x40,
+ 0x10, 0xb6, 0xf3, 0x53, 0x25, 0x1b, 0x0a, 0x65, 0x25, 0xa4, 0x28, 0x12, 0x4e, 0x14, 0x2e, 0x39,
+ 0x94, 0x35, 0x29, 0xa8, 0x54, 0x05, 0x84, 0x6a, 0x51, 0xa1, 0x1e, 0x00, 0x69, 0xa1, 0x08, 0x71,
+ 0x81, 0x8d, 0x33, 0x75, 0x96, 0xd4, 0x3f, 0x5a, 0xaf, 0x03, 0xbd, 0xf5, 0x11, 0x38, 0x72, 0xe4,
+ 0x35, 0x78, 0x83, 0xde, 0xe8, 0x8d, 0x1e, 0x50, 0x45, 0xcd, 0x8b, 0xa0, 0x5d, 0x2f, 0x4d, 0xda,
+ 0x52, 0xa1, 0xf6, 0xe6, 0xfd, 0x66, 0xbe, 0x6f, 0xbe, 0x99, 0xf1, 0xa0, 0x87, 0xe3, 0x95, 0x94,
+ 0xf0, 0xd8, 0x1d, 0x67, 0x03, 0x10, 0x11, 0x48, 0x48, 0xdd, 0x64, 0x1c, 0xb8, 0x2c, 0xe1, 0xa9,
+ 0xcb, 0x32, 0x39, 0x82, 0x48, 0x72, 0x9f, 0x49, 0x1e, 0x47, 0xee, 0xa4, 0xef, 0x06, 0x10, 0x81,
+ 0x60, 0x12, 0x86, 0x24, 0x11, 0xb1, 0x8c, 0xf1, 0x62, 0xc1, 0x26, 0x53, 0x36, 0x49, 0xc6, 0x01,
+ 0x51, 0x6c, 0x72, 0x92, 0x4d, 0x26, 0xfd, 0xd6, 0xed, 0x80, 0xcb, 0x51, 0x36, 0x20, 0x7e, 0x1c,
+ 0xba, 0x41, 0x1c, 0xc4, 0xae, 0x16, 0x19, 0x64, 0x5b, 0xfa, 0xa5, 0x1f, 0xfa, 0xab, 0x10, 0x6f,
+ 0xdd, 0x33, 0xd6, 0x58, 0xc2, 0x43, 0xe6, 0x8f, 0x78, 0x04, 0x62, 0x67, 0x6a, 0x2e, 0x04, 0xc9,
+ 0xfe, 0x61, 0xa9, 0xe5, 0x9e, 0xc7, 0x12, 0x59, 0x24, 0x79, 0x08, 0x67, 0x08, 0xcb, 0xff, 0x23,
+ 0xa4, 0xfe, 0x08, 0x42, 0x76, 0x86, 0x77, 0xf7, 0x3c, 0x5e, 0x26, 0xf9, 0xb6, 0xcb, 0x23, 0x99,
+ 0x4a, 0x71, 0x9a, 0xd4, 0xbd, 0x8f, 0xd0, 0xfa, 0x27, 0x29, 0xd8, 0x6b, 0xb6, 0x9d, 0x01, 0x6e,
+ 0xa3, 0x2a, 0x97, 0x10, 0xa6, 0x4d, 0xbb, 0x53, 0xee, 0xd5, 0xbd, 0x7a, 0x7e, 0xd8, 0xae, 0x6e,
+ 0x28, 0x80, 0x16, 0xf8, 0x6a, 0xed, 0xcb, 0xd7, 0xb6, 0xb5, 0xfb, 0xb3, 0x63, 0x75, 0xbf, 0x95,
+ 0x50, 0xe3, 0x55, 0x3c, 0x86, 0x88, 0xc2, 0x84, 0xc3, 0x47, 0xfc, 0x1e, 0xd5, 0xd4, 0x04, 0x86,
+ 0x4c, 0xb2, 0xa6, 0xdd, 0xb1, 0x7b, 0x8d, 0xa5, 0x3b, 0xc4, 0x2c, 0x63, 0xd6, 0xd0, 0x74, 0x1d,
+ 0x2a, 0x9b, 0x4c, 0xfa, 0xe4, 0xc5, 0xe0, 0x03, 0xf8, 0xf2, 0x19, 0x48, 0xe6, 0xe1, 0xbd, 0xc3,
+ 0xb6, 0x95, 0x1f, 0xb6, 0xd1, 0x14, 0xa3, 0xc7, 0xaa, 0xf8, 0x1d, 0xaa, 0xa4, 0x09, 0xf8, 0xcd,
+ 0x92, 0x56, 0x7f, 0x44, 0x2e, 0xb2, 0x6a, 0x32, 0x63, 0xf5, 0x65, 0x02, 0xbe, 0x77, 0xc5, 0x94,
+ 0xaa, 0xa8, 0x17, 0xd5, 0xc2, 0x38, 0x40, 0x73, 0xa9, 0x64, 0x32, 0x4b, 0x9b, 0x65, 0x5d, 0xe2,
+ 0xf1, 0xe5, 0x4b, 0x68, 0x19, 0xef, 0xaa, 0x29, 0x32, 0x57, 0xbc, 0xa9, 0x91, 0xef, 0x2e, 0xa3,
+ 0x6b, 0xa7, 0xfc, 0xe0, 0x5b, 0xa8, 0x2a, 0x15, 0xa4, 0x67, 0x57, 0xf7, 0xe6, 0x0d, 0xb3, 0x5a,
+ 0xe4, 0x15, 0xb1, 0xee, 0x77, 0x1b, 0x5d, 0x3f, 0x53, 0x05, 0x3f, 0x40, 0xf3, 0x33, 0x66, 0x60,
+ 0xa8, 0x25, 0x6a, 0xde, 0x0d, 0x23, 0x31, 0xbf, 0x36, 0x1b, 0xa4, 0x27, 0x73, 0xf1, 0x1b, 0x54,
+ 0xc9, 0x52, 0x10, 0x66, 0xa8, 0xcb, 0x17, 0xeb, 0x78, 0x33, 0x05, 0xb1, 0x11, 0x6d, 0xc5, 0xd3,
+ 0x69, 0x2a, 0x84, 0x6a, 0x45, 0xd5, 0x11, 0x08, 0x11, 0x0b, 0x3d, 0xcc, 0x99, 0x8e, 0xd6, 0x15,
+ 0x48, 0x8b, 0x58, 0xf7, 0x47, 0x09, 0xd5, 0xfe, 0xaa, 0xe0, 0x45, 0x54, 0x53, 0xcc, 0x88, 0x85,
+ 0x60, 0xc6, 0xb0, 0x60, 0x48, 0x3a, 0x47, 0xe1, 0xf4, 0x38, 0x03, 0xdf, 0x44, 0xe5, 0x8c, 0x0f,
+ 0xb5, 0xf1, 0xba, 0xd7, 0x30, 0x89, 0xe5, 0xcd, 0x8d, 0x27, 0x54, 0xe1, 0xb8, 0x8b, 0xe6, 0x02,
+ 0x11, 0x67, 0x89, 0x5a, 0xa6, 0xfa, 0x97, 0x91, 0xda, 0xc3, 0x53, 0x8d, 0x50, 0x13, 0xc1, 0x5b,
+ 0xa8, 0x0a, 0xea, 0xe7, 0x6f, 0x56, 0x3a, 0xe5, 0x5e, 0x63, 0x69, 0xed, 0x72, 0xdd, 0x13, 0x7d,
+ 0x40, 0xeb, 0x91, 0x14, 0x3b, 0x33, 0x5d, 0x2a, 0x8c, 0x16, 0xf2, 0x2d, 0x61, 0x8e, 0x4c, 0xe7,
+ 0xe0, 0x05, 0x54, 0x1e, 0xc3, 0x4e, 0xd1, 0x21, 0x55, 0x9f, 0xf8, 0x39, 0xaa, 0x4e, 0xd4, 0xfd,
+ 0x99, 0x2d, 0xac, 0x5c, 0xcc, 0xc7, 0xf4, 0x7e, 0x69, 0x21, 0xb3, 0x5a, 0x5a, 0xb1, 0xbd, 0xde,
+ 0xde, 0x91, 0x63, 0xed, 0x1f, 0x39, 0xd6, 0xc1, 0x91, 0x63, 0xed, 0xe6, 0x8e, 0xbd, 0x97, 0x3b,
+ 0xf6, 0x7e, 0xee, 0xd8, 0x07, 0xb9, 0x63, 0xff, 0xca, 0x1d, 0xfb, 0xf3, 0x6f, 0xc7, 0x7a, 0x5b,
+ 0x9a, 0xf4, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x01, 0xcb, 0xf3, 0xc9, 0x72, 0x05, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/generated.proto
new file mode 100644
index 000000000..411065848
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/generated.proto
@@ -0,0 +1,99 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.client_go.pkg.apis.authentication.v1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1";
+
+// ExtraValue masks the value so protobuf can generate
+// +protobuf.nullable=true
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+message ExtraValue {
+ // items, if empty, will result in an empty slice
+
+ repeated string items = 1;
+}
+
+// TokenReview attempts to authenticate a token to a known user.
+// Note: TokenReview requests may be cached by the webhook token authenticator
+// plugin in the kube-apiserver.
+message TokenReview {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec holds information about the request being evaluated
+ optional TokenReviewSpec spec = 2;
+
+ // Status is filled in by the server and indicates whether the request can be authenticated.
+ // +optional
+ optional TokenReviewStatus status = 3;
+}
+
+// TokenReviewSpec is a description of the token authentication request.
+message TokenReviewSpec {
+ // Token is the opaque bearer token.
+ // +optional
+ optional string token = 1;
+}
+
+// TokenReviewStatus is the result of the token authentication request.
+message TokenReviewStatus {
+ // Authenticated indicates that the token was associated with a known user.
+ // +optional
+ optional bool authenticated = 1;
+
+ // User is the UserInfo associated with the provided token.
+ // +optional
+ optional UserInfo user = 2;
+
+ // Error indicates that the token couldn't be checked
+ // +optional
+ optional string error = 3;
+}
+
+// UserInfo holds the information about the user needed to implement the
+// user.Info interface.
+message UserInfo {
+ // The name that uniquely identifies this user among all active users.
+ // +optional
+ optional string username = 1;
+
+ // A unique value that identifies this user across time. If this user is
+ // deleted and another user by the same name is added, they will have
+ // different UIDs.
+ // +optional
+ optional string uid = 2;
+
+ // The names of groups this user is a part of.
+ // +optional
+ repeated string groups = 3;
+
+ // Any additional information provided by the authenticator.
+ // +optional
+ map<string, ExtraValue> extra = 4;
+}
+
diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1/register.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/register.go
new file mode 100644
index 000000000..b4ab6519c
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/register.go
@@ -0,0 +1,58 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "authentication.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &TokenReview{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1/types.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/types.go
new file mode 100644
index 000000000..21051f137
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/types.go
@@ -0,0 +1,106 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "fmt"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+const (
+ // ImpersonateUserHeader is used to impersonate a particular user during an API server request
+ ImpersonateUserHeader = "Impersonate-User"
+
+ // ImpersonateGroupHeader is used to impersonate a particular group during an API server request.
+ // It can be repeated multiplied times for multiple groups.
+ ImpersonateGroupHeader = "Impersonate-Group"
+
+ // ImpersonateUserExtraHeaderPrefix is a prefix for any header used to impersonate an entry in the
+ // extra map[string][]string for user.Info. The key will be every after the prefix.
+ // It can be repeated multiplied times for multiple map keys and the same key can be repeated multiple
+ // times to have multiple elements in the slice under a single key
+ ImpersonateUserExtraHeaderPrefix = "Impersonate-Extra-"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+// +noMethods=true
+
+// TokenReview attempts to authenticate a token to a known user.
+// Note: TokenReview requests may be cached by the webhook token authenticator
+// plugin in the kube-apiserver.
+type TokenReview struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec holds information about the request being evaluated
+ Spec TokenReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is filled in by the server and indicates whether the request can be authenticated.
+ // +optional
+ Status TokenReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// TokenReviewSpec is a description of the token authentication request.
+type TokenReviewSpec struct {
+ // Token is the opaque bearer token.
+ // +optional
+ Token string `json:"token,omitempty" protobuf:"bytes,1,opt,name=token"`
+}
+
+// TokenReviewStatus is the result of the token authentication request.
+type TokenReviewStatus struct {
+ // Authenticated indicates that the token was associated with a known user.
+ // +optional
+ Authenticated bool `json:"authenticated,omitempty" protobuf:"varint,1,opt,name=authenticated"`
+ // User is the UserInfo associated with the provided token.
+ // +optional
+ User UserInfo `json:"user,omitempty" protobuf:"bytes,2,opt,name=user"`
+ // Error indicates that the token couldn't be checked
+ // +optional
+ Error string `json:"error,omitempty" protobuf:"bytes,3,opt,name=error"`
+}
+
+// UserInfo holds the information about the user needed to implement the
+// user.Info interface.
+type UserInfo struct {
+ // The name that uniquely identifies this user among all active users.
+ // +optional
+ Username string `json:"username,omitempty" protobuf:"bytes,1,opt,name=username"`
+ // A unique value that identifies this user across time. If this user is
+ // deleted and another user by the same name is added, they will have
+ // different UIDs.
+ // +optional
+ UID string `json:"uid,omitempty" protobuf:"bytes,2,opt,name=uid"`
+ // The names of groups this user is a part of.
+ // +optional
+ Groups []string `json:"groups,omitempty" protobuf:"bytes,3,rep,name=groups"`
+ // Any additional information provided by the authenticator.
+ // +optional
+ Extra map[string]ExtraValue `json:"extra,omitempty" protobuf:"bytes,4,rep,name=extra"`
+}
+
+// ExtraValue masks the value so protobuf can generate
+// +protobuf.nullable=true
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+type ExtraValue []string
+
+func (t ExtraValue) String() string {
+ return fmt.Sprintf("%v", []string(t))
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..bb235e4ea
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/types_swagger_doc_generated.go
@@ -0,0 +1,72 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_TokenReview = map[string]string{
+ "": "TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.",
+ "spec": "Spec holds information about the request being evaluated",
+ "status": "Status is filled in by the server and indicates whether the request can be authenticated.",
+}
+
+func (TokenReview) SwaggerDoc() map[string]string {
+ return map_TokenReview
+}
+
+var map_TokenReviewSpec = map[string]string{
+ "": "TokenReviewSpec is a description of the token authentication request.",
+ "token": "Token is the opaque bearer token.",
+}
+
+func (TokenReviewSpec) SwaggerDoc() map[string]string {
+ return map_TokenReviewSpec
+}
+
+var map_TokenReviewStatus = map[string]string{
+ "": "TokenReviewStatus is the result of the token authentication request.",
+ "authenticated": "Authenticated indicates that the token was associated with a known user.",
+ "user": "User is the UserInfo associated with the provided token.",
+ "error": "Error indicates that the token couldn't be checked",
+}
+
+func (TokenReviewStatus) SwaggerDoc() map[string]string {
+ return map_TokenReviewStatus
+}
+
+var map_UserInfo = map[string]string{
+ "": "UserInfo holds the information about the user needed to implement the user.Info interface.",
+ "username": "The name that uniquely identifies this user among all active users.",
+ "uid": "A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.",
+ "groups": "The names of groups this user is a part of.",
+ "extra": "Any additional information provided by the authenticator.",
+}
+
+func (UserInfo) SwaggerDoc() map[string]string {
+ return map_UserInfo
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/zz_generated.conversion.go
new file mode 100644
index 000000000..3a4923cc2
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/zz_generated.conversion.go
@@ -0,0 +1,153 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1
+
+import (
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ authentication "k8s.io/client-go/pkg/apis/authentication"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1_TokenReview_To_authentication_TokenReview,
+ Convert_authentication_TokenReview_To_v1_TokenReview,
+ Convert_v1_TokenReviewSpec_To_authentication_TokenReviewSpec,
+ Convert_authentication_TokenReviewSpec_To_v1_TokenReviewSpec,
+ Convert_v1_TokenReviewStatus_To_authentication_TokenReviewStatus,
+ Convert_authentication_TokenReviewStatus_To_v1_TokenReviewStatus,
+ Convert_v1_UserInfo_To_authentication_UserInfo,
+ Convert_authentication_UserInfo_To_v1_UserInfo,
+ )
+}
+
+func autoConvert_v1_TokenReview_To_authentication_TokenReview(in *TokenReview, out *authentication.TokenReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_TokenReviewSpec_To_authentication_TokenReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_TokenReviewStatus_To_authentication_TokenReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_TokenReview_To_authentication_TokenReview is an autogenerated conversion function.
+func Convert_v1_TokenReview_To_authentication_TokenReview(in *TokenReview, out *authentication.TokenReview, s conversion.Scope) error {
+ return autoConvert_v1_TokenReview_To_authentication_TokenReview(in, out, s)
+}
+
+func autoConvert_authentication_TokenReview_To_v1_TokenReview(in *authentication.TokenReview, out *TokenReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_authentication_TokenReviewSpec_To_v1_TokenReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_authentication_TokenReviewStatus_To_v1_TokenReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_authentication_TokenReview_To_v1_TokenReview is an autogenerated conversion function.
+func Convert_authentication_TokenReview_To_v1_TokenReview(in *authentication.TokenReview, out *TokenReview, s conversion.Scope) error {
+ return autoConvert_authentication_TokenReview_To_v1_TokenReview(in, out, s)
+}
+
+func autoConvert_v1_TokenReviewSpec_To_authentication_TokenReviewSpec(in *TokenReviewSpec, out *authentication.TokenReviewSpec, s conversion.Scope) error {
+ out.Token = in.Token
+ return nil
+}
+
+// Convert_v1_TokenReviewSpec_To_authentication_TokenReviewSpec is an autogenerated conversion function.
+func Convert_v1_TokenReviewSpec_To_authentication_TokenReviewSpec(in *TokenReviewSpec, out *authentication.TokenReviewSpec, s conversion.Scope) error {
+ return autoConvert_v1_TokenReviewSpec_To_authentication_TokenReviewSpec(in, out, s)
+}
+
+func autoConvert_authentication_TokenReviewSpec_To_v1_TokenReviewSpec(in *authentication.TokenReviewSpec, out *TokenReviewSpec, s conversion.Scope) error {
+ out.Token = in.Token
+ return nil
+}
+
+// Convert_authentication_TokenReviewSpec_To_v1_TokenReviewSpec is an autogenerated conversion function.
+func Convert_authentication_TokenReviewSpec_To_v1_TokenReviewSpec(in *authentication.TokenReviewSpec, out *TokenReviewSpec, s conversion.Scope) error {
+ return autoConvert_authentication_TokenReviewSpec_To_v1_TokenReviewSpec(in, out, s)
+}
+
+func autoConvert_v1_TokenReviewStatus_To_authentication_TokenReviewStatus(in *TokenReviewStatus, out *authentication.TokenReviewStatus, s conversion.Scope) error {
+ out.Authenticated = in.Authenticated
+ if err := Convert_v1_UserInfo_To_authentication_UserInfo(&in.User, &out.User, s); err != nil {
+ return err
+ }
+ out.Error = in.Error
+ return nil
+}
+
+// Convert_v1_TokenReviewStatus_To_authentication_TokenReviewStatus is an autogenerated conversion function.
+func Convert_v1_TokenReviewStatus_To_authentication_TokenReviewStatus(in *TokenReviewStatus, out *authentication.TokenReviewStatus, s conversion.Scope) error {
+ return autoConvert_v1_TokenReviewStatus_To_authentication_TokenReviewStatus(in, out, s)
+}
+
+func autoConvert_authentication_TokenReviewStatus_To_v1_TokenReviewStatus(in *authentication.TokenReviewStatus, out *TokenReviewStatus, s conversion.Scope) error {
+ out.Authenticated = in.Authenticated
+ if err := Convert_authentication_UserInfo_To_v1_UserInfo(&in.User, &out.User, s); err != nil {
+ return err
+ }
+ out.Error = in.Error
+ return nil
+}
+
+// Convert_authentication_TokenReviewStatus_To_v1_TokenReviewStatus is an autogenerated conversion function.
+func Convert_authentication_TokenReviewStatus_To_v1_TokenReviewStatus(in *authentication.TokenReviewStatus, out *TokenReviewStatus, s conversion.Scope) error {
+ return autoConvert_authentication_TokenReviewStatus_To_v1_TokenReviewStatus(in, out, s)
+}
+
+func autoConvert_v1_UserInfo_To_authentication_UserInfo(in *UserInfo, out *authentication.UserInfo, s conversion.Scope) error {
+ out.Username = in.Username
+ out.UID = in.UID
+ out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups))
+ out.Extra = *(*map[string]authentication.ExtraValue)(unsafe.Pointer(&in.Extra))
+ return nil
+}
+
+// Convert_v1_UserInfo_To_authentication_UserInfo is an autogenerated conversion function.
+func Convert_v1_UserInfo_To_authentication_UserInfo(in *UserInfo, out *authentication.UserInfo, s conversion.Scope) error {
+ return autoConvert_v1_UserInfo_To_authentication_UserInfo(in, out, s)
+}
+
+func autoConvert_authentication_UserInfo_To_v1_UserInfo(in *authentication.UserInfo, out *UserInfo, s conversion.Scope) error {
+ out.Username = in.Username
+ out.UID = in.UID
+ out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups))
+ out.Extra = *(*map[string]ExtraValue)(unsafe.Pointer(&in.Extra))
+ return nil
+}
+
+// Convert_authentication_UserInfo_To_v1_UserInfo is an autogenerated conversion function.
+func Convert_authentication_UserInfo_To_v1_UserInfo(in *authentication.UserInfo, out *UserInfo, s conversion.Scope) error {
+ return autoConvert_authentication_UserInfo_To_v1_UserInfo(in, out, s)
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..929c85fca
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/zz_generated.deepcopy.go
@@ -0,0 +1,110 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_TokenReview, InType: reflect.TypeOf(&TokenReview{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_TokenReviewSpec, InType: reflect.TypeOf(&TokenReviewSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_TokenReviewStatus, InType: reflect.TypeOf(&TokenReviewStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_UserInfo, InType: reflect.TypeOf(&UserInfo{})},
+ )
+}
+
+// DeepCopy_v1_TokenReview is an autogenerated deepcopy function.
+func DeepCopy_v1_TokenReview(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*TokenReview)
+ out := out.(*TokenReview)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_TokenReviewStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_TokenReviewSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_TokenReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*TokenReviewSpec)
+ out := out.(*TokenReviewSpec)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_TokenReviewStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_TokenReviewStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*TokenReviewStatus)
+ out := out.(*TokenReviewStatus)
+ *out = *in
+ if err := DeepCopy_v1_UserInfo(&in.User, &out.User, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_UserInfo is an autogenerated deepcopy function.
+func DeepCopy_v1_UserInfo(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*UserInfo)
+ out := out.(*UserInfo)
+ *out = *in
+ if in.Groups != nil {
+ in, out := &in.Groups, &out.Groups
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Extra != nil {
+ in, out := &in.Extra, &out.Extra
+ *out = make(map[string]ExtraValue)
+ for key, val := range *in {
+ if newVal, err := c.DeepCopy(&val); err != nil {
+ return err
+ } else {
+ (*out)[key] = *newVal.(*ExtraValue)
+ }
+ }
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/zz_generated.defaults.go
new file mode 100644
index 000000000..6df448eb9
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1/zz_generated.defaults.go
@@ -0,0 +1,32 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/conversion.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/conversion.go
new file mode 100644
index 000000000..51f3adfc7
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/conversion.go
@@ -0,0 +1,26 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) error {
+ // Add non-generated conversion functions
+ return scheme.AddConversionFuncs()
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/defaults.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/defaults.go
new file mode 100644
index 000000000..37abb53bd
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/defaults.go
@@ -0,0 +1,25 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/doc.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/doc.go
new file mode 100644
index 000000000..342f20126
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +groupName=authentication.k8s.io
+package v1beta1
diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/generated.pb.go
new file mode 100644
index 000000000..9917cdc6d
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/generated.pb.go
@@ -0,0 +1,1302 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/authentication/v1beta1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1beta1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/authentication/v1beta1/generated.proto
+
+ It has these top-level messages:
+ ExtraValue
+ TokenReview
+ TokenReviewSpec
+ TokenReviewStatus
+ UserInfo
+*/
+package v1beta1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *ExtraValue) Reset() { *m = ExtraValue{} }
+func (*ExtraValue) ProtoMessage() {}
+func (*ExtraValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *TokenReview) Reset() { *m = TokenReview{} }
+func (*TokenReview) ProtoMessage() {}
+func (*TokenReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *TokenReviewSpec) Reset() { *m = TokenReviewSpec{} }
+func (*TokenReviewSpec) ProtoMessage() {}
+func (*TokenReviewSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
+
+func (m *TokenReviewStatus) Reset() { *m = TokenReviewStatus{} }
+func (*TokenReviewStatus) ProtoMessage() {}
+func (*TokenReviewStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
+
+func (m *UserInfo) Reset() { *m = UserInfo{} }
+func (*UserInfo) ProtoMessage() {}
+func (*UserInfo) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
+
+func init() {
+ proto.RegisterType((*ExtraValue)(nil), "k8s.io.client-go.pkg.apis.authentication.v1beta1.ExtraValue")
+ proto.RegisterType((*TokenReview)(nil), "k8s.io.client-go.pkg.apis.authentication.v1beta1.TokenReview")
+ proto.RegisterType((*TokenReviewSpec)(nil), "k8s.io.client-go.pkg.apis.authentication.v1beta1.TokenReviewSpec")
+ proto.RegisterType((*TokenReviewStatus)(nil), "k8s.io.client-go.pkg.apis.authentication.v1beta1.TokenReviewStatus")
+ proto.RegisterType((*UserInfo)(nil), "k8s.io.client-go.pkg.apis.authentication.v1beta1.UserInfo")
+}
+func (m ExtraValue) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m ExtraValue) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m) > 0 {
+ for _, s := range m {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *TokenReview) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *TokenReview) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n2, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n3, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ return i, nil
+}
+
+func (m *TokenReviewSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *TokenReviewSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Token)))
+ i += copy(dAtA[i:], m.Token)
+ return i, nil
+}
+
+func (m *TokenReviewStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *TokenReviewStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ if m.Authenticated {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.User.Size()))
+ n4, err := m.User.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Error)))
+ i += copy(dAtA[i:], m.Error)
+ return i, nil
+}
+
+func (m *UserInfo) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *UserInfo) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Username)))
+ i += copy(dAtA[i:], m.Username)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID)))
+ i += copy(dAtA[i:], m.UID)
+ if len(m.Groups) > 0 {
+ for _, s := range m.Groups {
+ dAtA[i] = 0x1a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Extra) > 0 {
+ keysForExtra := make([]string, 0, len(m.Extra))
+ for k := range m.Extra {
+ keysForExtra = append(keysForExtra, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
+ for _, k := range keysForExtra {
+ dAtA[i] = 0x22
+ i++
+ v := m.Extra[string(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n5, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ }
+ }
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m ExtraValue) Size() (n int) {
+ var l int
+ _ = l
+ if len(m) > 0 {
+ for _, s := range m {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *TokenReview) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *TokenReviewSpec) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Token)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *TokenReviewStatus) Size() (n int) {
+ var l int
+ _ = l
+ n += 2
+ l = m.User.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Error)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *UserInfo) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Username)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.UID)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Groups) > 0 {
+ for _, s := range m.Groups {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Extra) > 0 {
+ for k, v := range m.Extra {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *TokenReview) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&TokenReview{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "TokenReviewSpec", "TokenReviewSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "TokenReviewStatus", "TokenReviewStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *TokenReviewSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&TokenReviewSpec{`,
+ `Token:` + fmt.Sprintf("%v", this.Token) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *TokenReviewStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&TokenReviewStatus{`,
+ `Authenticated:` + fmt.Sprintf("%v", this.Authenticated) + `,`,
+ `User:` + strings.Replace(strings.Replace(this.User.String(), "UserInfo", "UserInfo", 1), `&`, ``, 1) + `,`,
+ `Error:` + fmt.Sprintf("%v", this.Error) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *UserInfo) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForExtra := make([]string, 0, len(this.Extra))
+ for k := range this.Extra {
+ keysForExtra = append(keysForExtra, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
+ mapStringForExtra := "map[string]ExtraValue{"
+ for _, k := range keysForExtra {
+ mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k])
+ }
+ mapStringForExtra += "}"
+ s := strings.Join([]string{`&UserInfo{`,
+ `Username:` + fmt.Sprintf("%v", this.Username) + `,`,
+ `UID:` + fmt.Sprintf("%v", this.UID) + `,`,
+ `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`,
+ `Extra:` + mapStringForExtra + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *ExtraValue) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExtraValue: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExtraValue: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ *m = append(*m, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *TokenReview) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: TokenReview: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: TokenReview: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *TokenReviewSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: TokenReviewSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: TokenReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Token = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *TokenReviewStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: TokenReviewStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: TokenReviewStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Authenticated", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Authenticated = bool(v != 0)
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.User.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Error = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *UserInfo) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: UserInfo: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: UserInfo: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Username = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.UID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Extra", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Extra == nil {
+ m.Extra = make(map[string]ExtraValue)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &ExtraValue{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Extra[mapkey] = *mapvalue
+ } else {
+ var mapvalue ExtraValue
+ m.Extra[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/client-go/pkg/apis/authentication/v1beta1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 647 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0x4f, 0x6f, 0xd3, 0x4e,
+ 0x10, 0xb5, 0xf3, 0xa7, 0xbf, 0x64, 0xf3, 0x2b, 0x94, 0x95, 0x90, 0xa2, 0x48, 0x38, 0x51, 0xb8,
+ 0xf4, 0x40, 0xd7, 0xa4, 0xa0, 0x52, 0xb5, 0xe2, 0x50, 0xab, 0x05, 0xf5, 0x80, 0x90, 0xb6, 0x94,
+ 0x03, 0x12, 0x12, 0x1b, 0x67, 0xea, 0x18, 0xd7, 0x7f, 0xb4, 0x5e, 0xa7, 0xf4, 0xd6, 0x8f, 0xc0,
+ 0x91, 0x23, 0xdf, 0x85, 0x4b, 0x8f, 0x3d, 0x70, 0xe8, 0x01, 0x45, 0xc4, 0x7c, 0x11, 0xb4, 0xeb,
+ 0xa5, 0x49, 0x1b, 0x55, 0x88, 0xf6, 0xe6, 0x7d, 0x33, 0xef, 0xcd, 0x9b, 0x19, 0x0f, 0xda, 0x0a,
+ 0xd6, 0x53, 0xe2, 0xc7, 0x76, 0x90, 0xf5, 0x81, 0x47, 0x20, 0x20, 0xb5, 0x93, 0xc0, 0xb3, 0x59,
+ 0xe2, 0xa7, 0x36, 0xcb, 0xc4, 0x10, 0x22, 0xe1, 0xbb, 0x4c, 0xf8, 0x71, 0x64, 0x8f, 0x7a, 0x7d,
+ 0x10, 0xac, 0x67, 0x7b, 0x10, 0x01, 0x67, 0x02, 0x06, 0x24, 0xe1, 0xb1, 0x88, 0x71, 0xaf, 0x90,
+ 0x20, 0x53, 0x09, 0x92, 0x04, 0x1e, 0x91, 0x12, 0xe4, 0xb2, 0x04, 0xd1, 0x12, 0xad, 0x15, 0xcf,
+ 0x17, 0xc3, 0xac, 0x4f, 0xdc, 0x38, 0xb4, 0xbd, 0xd8, 0x8b, 0x6d, 0xa5, 0xd4, 0xcf, 0x0e, 0xd4,
+ 0x4b, 0x3d, 0xd4, 0x57, 0x51, 0xa1, 0xf5, 0x54, 0x9b, 0x64, 0x89, 0x1f, 0x32, 0x77, 0xe8, 0x47,
+ 0xc0, 0x8f, 0xa7, 0x36, 0x43, 0x10, 0xcc, 0x1e, 0xcd, 0xf9, 0x6a, 0xd9, 0xd7, 0xb1, 0x78, 0x16,
+ 0x09, 0x3f, 0x84, 0x39, 0xc2, 0xda, 0xdf, 0x08, 0xa9, 0x3b, 0x84, 0x90, 0xcd, 0xf1, 0x9e, 0x5c,
+ 0xc7, 0xcb, 0x84, 0x7f, 0x68, 0xfb, 0x91, 0x48, 0x05, 0xbf, 0x4a, 0xea, 0x3e, 0x43, 0x68, 0xe7,
+ 0x93, 0xe0, 0xec, 0x2d, 0x3b, 0xcc, 0x00, 0xb7, 0x51, 0xd5, 0x17, 0x10, 0xa6, 0x4d, 0xb3, 0x53,
+ 0x5e, 0xae, 0x3b, 0xf5, 0x7c, 0xdc, 0xae, 0xee, 0x4a, 0x80, 0x16, 0xf8, 0x46, 0xed, 0xcb, 0xd7,
+ 0xb6, 0x71, 0xf2, 0xa3, 0x63, 0x74, 0xbf, 0x95, 0x50, 0xe3, 0x4d, 0x1c, 0x40, 0x44, 0x61, 0xe4,
+ 0xc3, 0x11, 0xfe, 0x80, 0x6a, 0x72, 0x02, 0x03, 0x26, 0x58, 0xd3, 0xec, 0x98, 0xcb, 0x8d, 0xd5,
+ 0xc7, 0x44, 0x6f, 0x64, 0xd6, 0xd0, 0x74, 0x27, 0x32, 0x9b, 0x8c, 0x7a, 0xe4, 0x75, 0xff, 0x23,
+ 0xb8, 0xe2, 0x15, 0x08, 0xe6, 0xe0, 0xd3, 0x71, 0xdb, 0xc8, 0xc7, 0x6d, 0x34, 0xc5, 0xe8, 0x85,
+ 0x2a, 0x1e, 0xa0, 0x4a, 0x9a, 0x80, 0xdb, 0x2c, 0x29, 0x75, 0x87, 0xfc, 0xf3, 0xbe, 0xc9, 0x8c,
+ 0xdf, 0xbd, 0x04, 0x5c, 0xe7, 0x7f, 0x5d, 0xaf, 0x22, 0x5f, 0x54, 0xa9, 0xe3, 0x43, 0xb4, 0x90,
+ 0x0a, 0x26, 0xb2, 0xb4, 0x59, 0x56, 0x75, 0xb6, 0x6f, 0x59, 0x47, 0x69, 0x39, 0x77, 0x74, 0xa5,
+ 0x85, 0xe2, 0x4d, 0x75, 0x8d, 0xee, 0x1a, 0xba, 0x7b, 0xc5, 0x14, 0x7e, 0x88, 0xaa, 0x42, 0x42,
+ 0x6a, 0x8a, 0x75, 0x67, 0x51, 0x33, 0xab, 0x45, 0x5e, 0x11, 0xeb, 0x7e, 0x37, 0xd1, 0xbd, 0xb9,
+ 0x2a, 0x78, 0x13, 0x2d, 0xce, 0x38, 0x82, 0x81, 0x92, 0xa8, 0x39, 0xf7, 0xb5, 0xc4, 0xe2, 0xd6,
+ 0x6c, 0x90, 0x5e, 0xce, 0xc5, 0xef, 0x51, 0x25, 0x4b, 0x81, 0xeb, 0xf1, 0x6e, 0xde, 0xa0, 0xed,
+ 0xfd, 0x14, 0xf8, 0x6e, 0x74, 0x10, 0x4f, 0xe7, 0x2a, 0x11, 0xaa, 0x64, 0x65, 0x5b, 0xc0, 0x79,
+ 0xcc, 0xd5, 0x58, 0x67, 0xda, 0xda, 0x91, 0x20, 0x2d, 0x62, 0xdd, 0x49, 0x09, 0xd5, 0xfe, 0xa8,
+ 0xe0, 0x47, 0xa8, 0x26, 0x99, 0x11, 0x0b, 0x41, 0xcf, 0x62, 0x49, 0x93, 0x54, 0x8e, 0xc4, 0xe9,
+ 0x45, 0x06, 0x7e, 0x80, 0xca, 0x99, 0x3f, 0x50, 0xee, 0xeb, 0x4e, 0x43, 0x27, 0x96, 0xf7, 0x77,
+ 0xb7, 0xa9, 0xc4, 0x71, 0x17, 0x2d, 0x78, 0x3c, 0xce, 0x12, 0xb9, 0x56, 0xf9, 0x6b, 0x23, 0xb9,
+ 0x8c, 0x97, 0x0a, 0xa1, 0x3a, 0x82, 0x03, 0x54, 0x05, 0x79, 0x0b, 0xcd, 0x4a, 0xa7, 0xbc, 0xdc,
+ 0x58, 0x7d, 0x71, 0x8b, 0x11, 0x10, 0x75, 0x54, 0x3b, 0x91, 0xe0, 0xc7, 0x33, 0xad, 0x4a, 0x8c,
+ 0x16, 0x35, 0x5a, 0x47, 0xfa, 0xf0, 0x54, 0x0e, 0x5e, 0x42, 0xe5, 0x00, 0x8e, 0x8b, 0x36, 0xa9,
+ 0xfc, 0xc4, 0x7b, 0xa8, 0x3a, 0x92, 0x37, 0xa9, 0xf7, 0xf1, 0xfc, 0x06, 0x66, 0xa6, 0x87, 0x4d,
+ 0x0b, 0xad, 0x8d, 0xd2, 0xba, 0xe9, 0xac, 0x9c, 0x4e, 0x2c, 0xe3, 0x6c, 0x62, 0x19, 0xe7, 0x13,
+ 0xcb, 0x38, 0xc9, 0x2d, 0xf3, 0x34, 0xb7, 0xcc, 0xb3, 0xdc, 0x32, 0xcf, 0x73, 0xcb, 0xfc, 0x99,
+ 0x5b, 0xe6, 0xe7, 0x5f, 0x96, 0xf1, 0xee, 0x3f, 0x2d, 0xf2, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x35,
+ 0x3c, 0x74, 0xb0, 0x9a, 0x05, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/generated.proto
new file mode 100644
index 000000000..316a62e8e
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/generated.proto
@@ -0,0 +1,99 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.client_go.pkg.apis.authentication.v1beta1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1beta1";
+
+// ExtraValue masks the value so protobuf can generate
+// +protobuf.nullable=true
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+message ExtraValue {
+ // items, if empty, will result in an empty slice
+
+ repeated string items = 1;
+}
+
+// TokenReview attempts to authenticate a token to a known user.
+// Note: TokenReview requests may be cached by the webhook token authenticator
+// plugin in the kube-apiserver.
+message TokenReview {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec holds information about the request being evaluated
+ optional TokenReviewSpec spec = 2;
+
+ // Status is filled in by the server and indicates whether the request can be authenticated.
+ // +optional
+ optional TokenReviewStatus status = 3;
+}
+
+// TokenReviewSpec is a description of the token authentication request.
+message TokenReviewSpec {
+ // Token is the opaque bearer token.
+ // +optional
+ optional string token = 1;
+}
+
+// TokenReviewStatus is the result of the token authentication request.
+message TokenReviewStatus {
+ // Authenticated indicates that the token was associated with a known user.
+ // +optional
+ optional bool authenticated = 1;
+
+ // User is the UserInfo associated with the provided token.
+ // +optional
+ optional UserInfo user = 2;
+
+ // Error indicates that the token couldn't be checked
+ // +optional
+ optional string error = 3;
+}
+
+// UserInfo holds the information about the user needed to implement the
+// user.Info interface.
+message UserInfo {
+ // The name that uniquely identifies this user among all active users.
+ // +optional
+ optional string username = 1;
+
+ // A unique value that identifies this user across time. If this user is
+ // deleted and another user by the same name is added, they will have
+ // different UIDs.
+ // +optional
+ optional string uid = 2;
+
+ // The names of groups this user is a part of.
+ // +optional
+ repeated string groups = 3;
+
+ // Any additional information provided by the authenticator.
+ // +optional
+ map<string, ExtraValue> extra = 4;
+}
+
diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/register.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/register.go
new file mode 100644
index 000000000..d3ae1e4bc
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/register.go
@@ -0,0 +1,58 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "authentication.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &TokenReview{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/types.generated.go
new file mode 100644
index 000000000..b8990af18
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/types.generated.go
@@ -0,0 +1,1568 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1beta1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ pkg2_types "k8s.io/apimachinery/pkg/types"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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 pkg1_v1.TypeMeta
+ var v1 pkg2_types.UID
+ var v2 time.Time
+ _, _, _ = v0, v1, v2
+ }
+}
+
+func (x *TokenReview) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[4] = true
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *TokenReview) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *TokenReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = TokenReviewSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = TokenReviewStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *TokenReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = TokenReviewSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = TokenReviewStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *TokenReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = x.Token != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Token))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("token"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Token))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *TokenReviewSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *TokenReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "token":
+ if r.TryDecodeAsNil() {
+ x.Token = ""
+ } else {
+ yyv4 := &x.Token
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *TokenReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Token = ""
+ } else {
+ yyv7 := &x.Token
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*string)(yyv7)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *TokenReviewStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Authenticated != false
+ yyq2[1] = true
+ yyq2[2] = x.Error != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Authenticated))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("authenticated"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Authenticated))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yy7 := &x.User
+ yy7.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("user"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.User
+ yy9.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Error))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("error"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Error))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *TokenReviewStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *TokenReviewStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "authenticated":
+ if r.TryDecodeAsNil() {
+ x.Authenticated = false
+ } else {
+ yyv4 := &x.Authenticated
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*bool)(yyv4)) = r.DecodeBool()
+ }
+ }
+ case "user":
+ if r.TryDecodeAsNil() {
+ x.User = UserInfo{}
+ } else {
+ yyv6 := &x.User
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "error":
+ if r.TryDecodeAsNil() {
+ x.Error = ""
+ } else {
+ yyv7 := &x.Error
+ 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_containerMapEnd1234)
+}
+
+func (x *TokenReviewStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Authenticated = false
+ } else {
+ yyv10 := &x.Authenticated
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.User = UserInfo{}
+ } else {
+ yyv12 := &x.User
+ yyv12.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Error = ""
+ } else {
+ yyv13 := &x.Error
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *UserInfo) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Username != ""
+ yyq2[1] = x.UID != ""
+ yyq2[2] = len(x.Groups) != 0
+ yyq2[3] = len(x.Extra) != 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Username))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("username"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Username))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.UID))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("uid"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.UID))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Groups == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Groups, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("groups"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Groups == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Groups, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Extra == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("extra"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Extra == nil {
+ r.EncodeNil()
+ } else {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *UserInfo) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *UserInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "username":
+ if r.TryDecodeAsNil() {
+ x.Username = ""
+ } else {
+ yyv4 := &x.Username
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "uid":
+ if r.TryDecodeAsNil() {
+ x.UID = ""
+ } else {
+ yyv6 := &x.UID
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "groups":
+ if r.TryDecodeAsNil() {
+ x.Groups = nil
+ } else {
+ yyv8 := &x.Groups
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv8, false, d)
+ }
+ }
+ case "extra":
+ if r.TryDecodeAsNil() {
+ x.Extra = nil
+ } else {
+ yyv10 := &x.Extra
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decMapstringExtraValue((*map[string]ExtraValue)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *UserInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Username = ""
+ } else {
+ yyv13 := &x.Username
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UID = ""
+ } else {
+ yyv15 := &x.UID
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Groups = nil
+ } else {
+ yyv17 := &x.Groups
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv17, false, d)
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Extra = nil
+ } else {
+ yyv19 := &x.Extra
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decMapstringExtraValue((*map[string]ExtraValue)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x ExtraValue) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 {
+ h.encExtraValue((ExtraValue)(x), e)
+ }
+ }
+}
+
+func (x *ExtraValue) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ h.decExtraValue((*ExtraValue)(x), d)
+ }
+}
+
+func (x codecSelfer1234) encMapstringExtraValue(v map[string]ExtraValue, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeMapStart(len(v))
+ for yyk1, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ yym2 := z.EncBinary()
+ _ = yym2
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yyk1))
+ }
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyv1 == nil {
+ r.EncodeNil()
+ } else {
+ yyv1.CodecEncodeSelf(e)
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) decMapstringExtraValue(v *map[string]ExtraValue, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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, 40)
+ yyv1 = make(map[string]ExtraValue, yyrl1)
+ *v = yyv1
+ }
+ var yymk1 string
+ var yymv1 ExtraValue
+ var yymg1 bool
+ if yybh1.MapValueReset {
+ yymg1 = true
+ }
+ if yyl1 > 0 {
+ for yyj1 := 0; yyj1 < yyl1; yyj1++ {
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ if r.TryDecodeAsNil() {
+ yymk1 = ""
+ } else {
+ yyv2 := &yymk1
+ yym3 := z.DecBinary()
+ _ = yym3
+ if false {
+ } else {
+ *((*string)(yyv2)) = r.DecodeString()
+ }
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv4 := &yymv1
+ yyv4.CodecDecodeSelf(d)
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } else if yyl1 < 0 {
+ for yyj1 := 0; !r.CheckBreak(); yyj1++ {
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ if r.TryDecodeAsNil() {
+ yymk1 = ""
+ } else {
+ yyv5 := &yymk1
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*string)(yyv5)) = r.DecodeString()
+ }
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv7 := &yymv1
+ yyv7.CodecDecodeSelf(d)
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } // else len==0: TODO: Should we clear map entries?
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) encExtraValue(v ExtraValue, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym2 := z.EncBinary()
+ _ = yym2
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yyv1))
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decExtraValue(v *ExtraValue, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []string{}
+ 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) {
+
+ yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]string, yyrl1)
+ }
+ } else {
+ yyv1 = make([]string, yyrl1)
+ }
+ yyc1 = true
+ yyrr1 = len(yyv1)
+ } else if yyl1 != len(yyv1) {
+ yyv1 = yyv1[:yyl1]
+ yyc1 = true
+ }
+ yyj1 := 0
+ for ; yyj1 < yyrr1; yyj1++ {
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yym3 := z.DecBinary()
+ _ = yym3
+ if false {
+ } else {
+ *((*string)(yyv2)) = r.DecodeString()
+ }
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv4 := &yyv1[yyj1]
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, "") // var yyz1 string
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv6 := &yyv1[yyj1]
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+
+ } else {
+ z.DecSwallow()
+ }
+
+ }
+ if yyj1 < len(yyv1) {
+ yyv1 = yyv1[:yyj1]
+ yyc1 = true
+ } else if yyj1 == 0 && yyv1 == nil {
+ yyv1 = []string{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/types.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/types.go
new file mode 100644
index 000000000..57c96e3bc
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/types.go
@@ -0,0 +1,91 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "fmt"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+// +noMethods=true
+
+// TokenReview attempts to authenticate a token to a known user.
+// Note: TokenReview requests may be cached by the webhook token authenticator
+// plugin in the kube-apiserver.
+type TokenReview struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec holds information about the request being evaluated
+ Spec TokenReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is filled in by the server and indicates whether the request can be authenticated.
+ // +optional
+ Status TokenReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// TokenReviewSpec is a description of the token authentication request.
+type TokenReviewSpec struct {
+ // Token is the opaque bearer token.
+ // +optional
+ Token string `json:"token,omitempty" protobuf:"bytes,1,opt,name=token"`
+}
+
+// TokenReviewStatus is the result of the token authentication request.
+type TokenReviewStatus struct {
+ // Authenticated indicates that the token was associated with a known user.
+ // +optional
+ Authenticated bool `json:"authenticated,omitempty" protobuf:"varint,1,opt,name=authenticated"`
+ // User is the UserInfo associated with the provided token.
+ // +optional
+ User UserInfo `json:"user,omitempty" protobuf:"bytes,2,opt,name=user"`
+ // Error indicates that the token couldn't be checked
+ // +optional
+ Error string `json:"error,omitempty" protobuf:"bytes,3,opt,name=error"`
+}
+
+// UserInfo holds the information about the user needed to implement the
+// user.Info interface.
+type UserInfo struct {
+ // The name that uniquely identifies this user among all active users.
+ // +optional
+ Username string `json:"username,omitempty" protobuf:"bytes,1,opt,name=username"`
+ // A unique value that identifies this user across time. If this user is
+ // deleted and another user by the same name is added, they will have
+ // different UIDs.
+ // +optional
+ UID string `json:"uid,omitempty" protobuf:"bytes,2,opt,name=uid"`
+ // The names of groups this user is a part of.
+ // +optional
+ Groups []string `json:"groups,omitempty" protobuf:"bytes,3,rep,name=groups"`
+ // Any additional information provided by the authenticator.
+ // +optional
+ Extra map[string]ExtraValue `json:"extra,omitempty" protobuf:"bytes,4,rep,name=extra"`
+}
+
+// ExtraValue masks the value so protobuf can generate
+// +protobuf.nullable=true
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+type ExtraValue []string
+
+func (t ExtraValue) String() string {
+ return fmt.Sprintf("%v", []string(t))
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..f910bea6f
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/types_swagger_doc_generated.go
@@ -0,0 +1,72 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_TokenReview = map[string]string{
+ "": "TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.",
+ "spec": "Spec holds information about the request being evaluated",
+ "status": "Status is filled in by the server and indicates whether the request can be authenticated.",
+}
+
+func (TokenReview) SwaggerDoc() map[string]string {
+ return map_TokenReview
+}
+
+var map_TokenReviewSpec = map[string]string{
+ "": "TokenReviewSpec is a description of the token authentication request.",
+ "token": "Token is the opaque bearer token.",
+}
+
+func (TokenReviewSpec) SwaggerDoc() map[string]string {
+ return map_TokenReviewSpec
+}
+
+var map_TokenReviewStatus = map[string]string{
+ "": "TokenReviewStatus is the result of the token authentication request.",
+ "authenticated": "Authenticated indicates that the token was associated with a known user.",
+ "user": "User is the UserInfo associated with the provided token.",
+ "error": "Error indicates that the token couldn't be checked",
+}
+
+func (TokenReviewStatus) SwaggerDoc() map[string]string {
+ return map_TokenReviewStatus
+}
+
+var map_UserInfo = map[string]string{
+ "": "UserInfo holds the information about the user needed to implement the user.Info interface.",
+ "username": "The name that uniquely identifies this user among all active users.",
+ "uid": "A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.",
+ "groups": "The names of groups this user is a part of.",
+ "extra": "Any additional information provided by the authenticator.",
+}
+
+func (UserInfo) SwaggerDoc() map[string]string {
+ return map_UserInfo
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.conversion.go
new file mode 100644
index 000000000..39a61ae61
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.conversion.go
@@ -0,0 +1,153 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ authentication "k8s.io/client-go/pkg/apis/authentication"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1beta1_TokenReview_To_authentication_TokenReview,
+ Convert_authentication_TokenReview_To_v1beta1_TokenReview,
+ Convert_v1beta1_TokenReviewSpec_To_authentication_TokenReviewSpec,
+ Convert_authentication_TokenReviewSpec_To_v1beta1_TokenReviewSpec,
+ Convert_v1beta1_TokenReviewStatus_To_authentication_TokenReviewStatus,
+ Convert_authentication_TokenReviewStatus_To_v1beta1_TokenReviewStatus,
+ Convert_v1beta1_UserInfo_To_authentication_UserInfo,
+ Convert_authentication_UserInfo_To_v1beta1_UserInfo,
+ )
+}
+
+func autoConvert_v1beta1_TokenReview_To_authentication_TokenReview(in *TokenReview, out *authentication.TokenReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1beta1_TokenReviewSpec_To_authentication_TokenReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_TokenReviewStatus_To_authentication_TokenReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_TokenReview_To_authentication_TokenReview is an autogenerated conversion function.
+func Convert_v1beta1_TokenReview_To_authentication_TokenReview(in *TokenReview, out *authentication.TokenReview, s conversion.Scope) error {
+ return autoConvert_v1beta1_TokenReview_To_authentication_TokenReview(in, out, s)
+}
+
+func autoConvert_authentication_TokenReview_To_v1beta1_TokenReview(in *authentication.TokenReview, out *TokenReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_authentication_TokenReviewSpec_To_v1beta1_TokenReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_authentication_TokenReviewStatus_To_v1beta1_TokenReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_authentication_TokenReview_To_v1beta1_TokenReview is an autogenerated conversion function.
+func Convert_authentication_TokenReview_To_v1beta1_TokenReview(in *authentication.TokenReview, out *TokenReview, s conversion.Scope) error {
+ return autoConvert_authentication_TokenReview_To_v1beta1_TokenReview(in, out, s)
+}
+
+func autoConvert_v1beta1_TokenReviewSpec_To_authentication_TokenReviewSpec(in *TokenReviewSpec, out *authentication.TokenReviewSpec, s conversion.Scope) error {
+ out.Token = in.Token
+ return nil
+}
+
+// Convert_v1beta1_TokenReviewSpec_To_authentication_TokenReviewSpec is an autogenerated conversion function.
+func Convert_v1beta1_TokenReviewSpec_To_authentication_TokenReviewSpec(in *TokenReviewSpec, out *authentication.TokenReviewSpec, s conversion.Scope) error {
+ return autoConvert_v1beta1_TokenReviewSpec_To_authentication_TokenReviewSpec(in, out, s)
+}
+
+func autoConvert_authentication_TokenReviewSpec_To_v1beta1_TokenReviewSpec(in *authentication.TokenReviewSpec, out *TokenReviewSpec, s conversion.Scope) error {
+ out.Token = in.Token
+ return nil
+}
+
+// Convert_authentication_TokenReviewSpec_To_v1beta1_TokenReviewSpec is an autogenerated conversion function.
+func Convert_authentication_TokenReviewSpec_To_v1beta1_TokenReviewSpec(in *authentication.TokenReviewSpec, out *TokenReviewSpec, s conversion.Scope) error {
+ return autoConvert_authentication_TokenReviewSpec_To_v1beta1_TokenReviewSpec(in, out, s)
+}
+
+func autoConvert_v1beta1_TokenReviewStatus_To_authentication_TokenReviewStatus(in *TokenReviewStatus, out *authentication.TokenReviewStatus, s conversion.Scope) error {
+ out.Authenticated = in.Authenticated
+ if err := Convert_v1beta1_UserInfo_To_authentication_UserInfo(&in.User, &out.User, s); err != nil {
+ return err
+ }
+ out.Error = in.Error
+ return nil
+}
+
+// Convert_v1beta1_TokenReviewStatus_To_authentication_TokenReviewStatus is an autogenerated conversion function.
+func Convert_v1beta1_TokenReviewStatus_To_authentication_TokenReviewStatus(in *TokenReviewStatus, out *authentication.TokenReviewStatus, s conversion.Scope) error {
+ return autoConvert_v1beta1_TokenReviewStatus_To_authentication_TokenReviewStatus(in, out, s)
+}
+
+func autoConvert_authentication_TokenReviewStatus_To_v1beta1_TokenReviewStatus(in *authentication.TokenReviewStatus, out *TokenReviewStatus, s conversion.Scope) error {
+ out.Authenticated = in.Authenticated
+ if err := Convert_authentication_UserInfo_To_v1beta1_UserInfo(&in.User, &out.User, s); err != nil {
+ return err
+ }
+ out.Error = in.Error
+ return nil
+}
+
+// Convert_authentication_TokenReviewStatus_To_v1beta1_TokenReviewStatus is an autogenerated conversion function.
+func Convert_authentication_TokenReviewStatus_To_v1beta1_TokenReviewStatus(in *authentication.TokenReviewStatus, out *TokenReviewStatus, s conversion.Scope) error {
+ return autoConvert_authentication_TokenReviewStatus_To_v1beta1_TokenReviewStatus(in, out, s)
+}
+
+func autoConvert_v1beta1_UserInfo_To_authentication_UserInfo(in *UserInfo, out *authentication.UserInfo, s conversion.Scope) error {
+ out.Username = in.Username
+ out.UID = in.UID
+ out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups))
+ out.Extra = *(*map[string]authentication.ExtraValue)(unsafe.Pointer(&in.Extra))
+ return nil
+}
+
+// Convert_v1beta1_UserInfo_To_authentication_UserInfo is an autogenerated conversion function.
+func Convert_v1beta1_UserInfo_To_authentication_UserInfo(in *UserInfo, out *authentication.UserInfo, s conversion.Scope) error {
+ return autoConvert_v1beta1_UserInfo_To_authentication_UserInfo(in, out, s)
+}
+
+func autoConvert_authentication_UserInfo_To_v1beta1_UserInfo(in *authentication.UserInfo, out *UserInfo, s conversion.Scope) error {
+ out.Username = in.Username
+ out.UID = in.UID
+ out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups))
+ out.Extra = *(*map[string]ExtraValue)(unsafe.Pointer(&in.Extra))
+ return nil
+}
+
+// Convert_authentication_UserInfo_To_v1beta1_UserInfo is an autogenerated conversion function.
+func Convert_authentication_UserInfo_To_v1beta1_UserInfo(in *authentication.UserInfo, out *UserInfo, s conversion.Scope) error {
+ return autoConvert_authentication_UserInfo_To_v1beta1_UserInfo(in, out, s)
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..0615678b4
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.deepcopy.go
@@ -0,0 +1,110 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_TokenReview, InType: reflect.TypeOf(&TokenReview{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_TokenReviewSpec, InType: reflect.TypeOf(&TokenReviewSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_TokenReviewStatus, InType: reflect.TypeOf(&TokenReviewStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_UserInfo, InType: reflect.TypeOf(&UserInfo{})},
+ )
+}
+
+// DeepCopy_v1beta1_TokenReview is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_TokenReview(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*TokenReview)
+ out := out.(*TokenReview)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_TokenReviewStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_TokenReviewSpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_TokenReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*TokenReviewSpec)
+ out := out.(*TokenReviewSpec)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_TokenReviewStatus is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_TokenReviewStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*TokenReviewStatus)
+ out := out.(*TokenReviewStatus)
+ *out = *in
+ if err := DeepCopy_v1beta1_UserInfo(&in.User, &out.User, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_UserInfo is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_UserInfo(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*UserInfo)
+ out := out.(*UserInfo)
+ *out = *in
+ if in.Groups != nil {
+ in, out := &in.Groups, &out.Groups
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Extra != nil {
+ in, out := &in.Extra, &out.Extra
+ *out = make(map[string]ExtraValue)
+ for key, val := range *in {
+ if newVal, err := c.DeepCopy(&val); err != nil {
+ return err
+ } else {
+ (*out)[key] = *newVal.(*ExtraValue)
+ }
+ }
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.defaults.go
new file mode 100644
index 000000000..e24e70be3
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.defaults.go
@@ -0,0 +1,32 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authentication/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/authentication/zz_generated.deepcopy.go
new file mode 100644
index 000000000..f3b47e840
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authentication/zz_generated.deepcopy.go
@@ -0,0 +1,110 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package authentication
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_TokenReview, InType: reflect.TypeOf(&TokenReview{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_TokenReviewSpec, InType: reflect.TypeOf(&TokenReviewSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_TokenReviewStatus, InType: reflect.TypeOf(&TokenReviewStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_UserInfo, InType: reflect.TypeOf(&UserInfo{})},
+ )
+}
+
+// DeepCopy_authentication_TokenReview is an autogenerated deepcopy function.
+func DeepCopy_authentication_TokenReview(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*TokenReview)
+ out := out.(*TokenReview)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_authentication_TokenReviewStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_authentication_TokenReviewSpec is an autogenerated deepcopy function.
+func DeepCopy_authentication_TokenReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*TokenReviewSpec)
+ out := out.(*TokenReviewSpec)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_authentication_TokenReviewStatus is an autogenerated deepcopy function.
+func DeepCopy_authentication_TokenReviewStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*TokenReviewStatus)
+ out := out.(*TokenReviewStatus)
+ *out = *in
+ if err := DeepCopy_authentication_UserInfo(&in.User, &out.User, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_authentication_UserInfo is an autogenerated deepcopy function.
+func DeepCopy_authentication_UserInfo(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*UserInfo)
+ out := out.(*UserInfo)
+ *out = *in
+ if in.Groups != nil {
+ in, out := &in.Groups, &out.Groups
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Extra != nil {
+ in, out := &in.Extra, &out.Extra
+ *out = make(map[string]ExtraValue)
+ for key, val := range *in {
+ if newVal, err := c.DeepCopy(&val); err != nil {
+ return err
+ } else {
+ (*out)[key] = *newVal.(*ExtraValue)
+ }
+ }
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/doc.go b/vendor/k8s.io/client-go/pkg/apis/authorization/doc.go
new file mode 100644
index 000000000..91344f674
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authorization/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +groupName=authorization.k8s.io
+package authorization
diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/register.go b/vendor/k8s.io/client-go/pkg/apis/authorization/register.go
new file mode 100644
index 000000000..5693885e4
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authorization/register.go
@@ -0,0 +1,52 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package authorization
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "authorization.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &SelfSubjectAccessReview{},
+ &SubjectAccessReview{},
+ &LocalSubjectAccessReview{},
+ )
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/types.go b/vendor/k8s.io/client-go/pkg/apis/authorization/types.go
new file mode 100644
index 000000000..d8ccfaf35
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authorization/types.go
@@ -0,0 +1,146 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package authorization
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+// +noMethods=true
+
+// SubjectAccessReview checks whether or not a user or group can perform an action. Not filling in a
+// spec.namespace means "in all namespaces".
+type SubjectAccessReview struct {
+ metav1.TypeMeta
+ metav1.ObjectMeta
+
+ // Spec holds information about the request being evaluated
+ Spec SubjectAccessReviewSpec
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ Status SubjectAccessReviewStatus
+}
+
+// +genclient=true
+// +nonNamespaced=true
+// +noMethods=true
+
+// SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a
+// spec.namespace means "in all namespaces". Self is a special case, because users should always be able
+// to check whether they can perform an action
+type SelfSubjectAccessReview struct {
+ metav1.TypeMeta
+ metav1.ObjectMeta
+
+ // Spec holds information about the request being evaluated.
+ Spec SelfSubjectAccessReviewSpec
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ Status SubjectAccessReviewStatus
+}
+
+// +genclient=true
+// +noMethods=true
+
+// LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace.
+// Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions
+// checking.
+type LocalSubjectAccessReview struct {
+ metav1.TypeMeta
+ metav1.ObjectMeta
+
+ // Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace
+ // you made the request against. If empty, it is defaulted.
+ Spec SubjectAccessReviewSpec
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ Status SubjectAccessReviewStatus
+}
+
+// ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface
+type ResourceAttributes struct {
+ // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces
+ // "" (empty) is defaulted for LocalSubjectAccessReviews
+ // "" (empty) is empty for cluster-scoped resources
+ // "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
+ Namespace string
+ // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all.
+ Verb string
+ // Group is the API Group of the Resource. "*" means all.
+ Group string
+ // Version is the API Version of the Resource. "*" means all.
+ Version string
+ // Resource is one of the existing resource types. "*" means all.
+ Resource string
+ // Subresource is one of the existing resource types. "" means none.
+ Subresource string
+ // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all.
+ Name string
+}
+
+// NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface
+type NonResourceAttributes struct {
+ // Path is the URL path of the request
+ Path string
+ // Verb is the standard HTTP verb
+ Verb string
+}
+
+// SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAttributes
+// and NonResourceAttributes must be set
+type SubjectAccessReviewSpec struct {
+ // ResourceAttributes describes information for a resource access request
+ ResourceAttributes *ResourceAttributes
+ // NonResourceAttributes describes information for a non-resource access request
+ NonResourceAttributes *NonResourceAttributes
+
+ // User is the user you're testing for.
+ // If you specify "User" but not "Group", then is it interpreted as "What if User were not a member of any groups
+ User string
+ // Groups is the groups you're testing for.
+ Groups []string
+ // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer
+ // it needs a reflection here.
+ Extra map[string]ExtraValue
+}
+
+// ExtraValue masks the value so protobuf can generate
+// +protobuf.nullable=true
+type ExtraValue []string
+
+// SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAttributes
+// and NonResourceAttributes must be set
+type SelfSubjectAccessReviewSpec struct {
+ // ResourceAttributes describes information for a resource access request
+ ResourceAttributes *ResourceAttributes
+ // NonResourceAttributes describes information for a non-resource access request
+ NonResourceAttributes *NonResourceAttributes
+}
+
+// SubjectAccessReviewStatus
+type SubjectAccessReviewStatus struct {
+ // Allowed is required. True if the action would be allowed, false otherwise.
+ Allowed bool
+ // Reason is optional. It indicates why a request was allowed or denied.
+ Reason string
+ // EvaluationError is an indication that some error occurred during the authorization check.
+ // It is entirely possible to get an error and be able to continue determine authorization status in spite of it.
+ // For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.
+ EvaluationError string
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1/conversion.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/conversion.go
new file mode 100644
index 000000000..2ff5732d6
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/conversion.go
@@ -0,0 +1,26 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) error {
+ // Add non-generated conversion functions
+ return scheme.AddConversionFuncs()
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1/defaults.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/defaults.go
new file mode 100644
index 000000000..074e15bae
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/defaults.go
@@ -0,0 +1,25 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1/doc.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/doc.go
new file mode 100644
index 000000000..41741dd53
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +groupName=authorization.k8s.io
+package v1
diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/generated.pb.go
new file mode 100644
index 000000000..0204e88db
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/generated.pb.go
@@ -0,0 +1,2364 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/authorization/v1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/authorization/v1/generated.proto
+
+ It has these top-level messages:
+ ExtraValue
+ LocalSubjectAccessReview
+ NonResourceAttributes
+ ResourceAttributes
+ SelfSubjectAccessReview
+ SelfSubjectAccessReviewSpec
+ SubjectAccessReview
+ SubjectAccessReviewSpec
+ SubjectAccessReviewStatus
+*/
+package v1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *ExtraValue) Reset() { *m = ExtraValue{} }
+func (*ExtraValue) ProtoMessage() {}
+func (*ExtraValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *LocalSubjectAccessReview) Reset() { *m = LocalSubjectAccessReview{} }
+func (*LocalSubjectAccessReview) ProtoMessage() {}
+func (*LocalSubjectAccessReview) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{1}
+}
+
+func (m *NonResourceAttributes) Reset() { *m = NonResourceAttributes{} }
+func (*NonResourceAttributes) ProtoMessage() {}
+func (*NonResourceAttributes) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
+
+func (m *ResourceAttributes) Reset() { *m = ResourceAttributes{} }
+func (*ResourceAttributes) ProtoMessage() {}
+func (*ResourceAttributes) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
+
+func (m *SelfSubjectAccessReview) Reset() { *m = SelfSubjectAccessReview{} }
+func (*SelfSubjectAccessReview) ProtoMessage() {}
+func (*SelfSubjectAccessReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
+
+func (m *SelfSubjectAccessReviewSpec) Reset() { *m = SelfSubjectAccessReviewSpec{} }
+func (*SelfSubjectAccessReviewSpec) ProtoMessage() {}
+func (*SelfSubjectAccessReviewSpec) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{5}
+}
+
+func (m *SubjectAccessReview) Reset() { *m = SubjectAccessReview{} }
+func (*SubjectAccessReview) ProtoMessage() {}
+func (*SubjectAccessReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
+
+func (m *SubjectAccessReviewSpec) Reset() { *m = SubjectAccessReviewSpec{} }
+func (*SubjectAccessReviewSpec) ProtoMessage() {}
+func (*SubjectAccessReviewSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
+
+func (m *SubjectAccessReviewStatus) Reset() { *m = SubjectAccessReviewStatus{} }
+func (*SubjectAccessReviewStatus) ProtoMessage() {}
+func (*SubjectAccessReviewStatus) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{8}
+}
+
+func init() {
+ proto.RegisterType((*ExtraValue)(nil), "k8s.io.client-go.pkg.apis.authorization.v1.ExtraValue")
+ proto.RegisterType((*LocalSubjectAccessReview)(nil), "k8s.io.client-go.pkg.apis.authorization.v1.LocalSubjectAccessReview")
+ proto.RegisterType((*NonResourceAttributes)(nil), "k8s.io.client-go.pkg.apis.authorization.v1.NonResourceAttributes")
+ proto.RegisterType((*ResourceAttributes)(nil), "k8s.io.client-go.pkg.apis.authorization.v1.ResourceAttributes")
+ proto.RegisterType((*SelfSubjectAccessReview)(nil), "k8s.io.client-go.pkg.apis.authorization.v1.SelfSubjectAccessReview")
+ proto.RegisterType((*SelfSubjectAccessReviewSpec)(nil), "k8s.io.client-go.pkg.apis.authorization.v1.SelfSubjectAccessReviewSpec")
+ proto.RegisterType((*SubjectAccessReview)(nil), "k8s.io.client-go.pkg.apis.authorization.v1.SubjectAccessReview")
+ proto.RegisterType((*SubjectAccessReviewSpec)(nil), "k8s.io.client-go.pkg.apis.authorization.v1.SubjectAccessReviewSpec")
+ proto.RegisterType((*SubjectAccessReviewStatus)(nil), "k8s.io.client-go.pkg.apis.authorization.v1.SubjectAccessReviewStatus")
+}
+func (m ExtraValue) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m ExtraValue) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m) > 0 {
+ for _, s := range m {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *LocalSubjectAccessReview) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LocalSubjectAccessReview) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n2, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n3, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ return i, nil
+}
+
+func (m *NonResourceAttributes) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NonResourceAttributes) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i += copy(dAtA[i:], m.Path)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Verb)))
+ i += copy(dAtA[i:], m.Verb)
+ return i, nil
+}
+
+func (m *ResourceAttributes) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceAttributes) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
+ i += copy(dAtA[i:], m.Namespace)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Verb)))
+ i += copy(dAtA[i:], m.Verb)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group)))
+ i += copy(dAtA[i:], m.Group)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version)))
+ i += copy(dAtA[i:], m.Version)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource)))
+ i += copy(dAtA[i:], m.Resource)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Subresource)))
+ i += copy(dAtA[i:], m.Subresource)
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ return i, nil
+}
+
+func (m *SelfSubjectAccessReview) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SelfSubjectAccessReview) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n4, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n5, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n6, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ return i, nil
+}
+
+func (m *SelfSubjectAccessReviewSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SelfSubjectAccessReviewSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.ResourceAttributes != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ResourceAttributes.Size()))
+ n7, err := m.ResourceAttributes.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ }
+ if m.NonResourceAttributes != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NonResourceAttributes.Size()))
+ n8, err := m.NonResourceAttributes.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n8
+ }
+ return i, nil
+}
+
+func (m *SubjectAccessReview) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SubjectAccessReview) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n9, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n9
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n10, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n10
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n11, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n11
+ return i, nil
+}
+
+func (m *SubjectAccessReviewSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SubjectAccessReviewSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.ResourceAttributes != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ResourceAttributes.Size()))
+ n12, err := m.ResourceAttributes.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n12
+ }
+ if m.NonResourceAttributes != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NonResourceAttributes.Size()))
+ n13, err := m.NonResourceAttributes.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n13
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.User)))
+ i += copy(dAtA[i:], m.User)
+ if len(m.Groups) > 0 {
+ for _, s := range m.Groups {
+ dAtA[i] = 0x22
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Extra) > 0 {
+ keysForExtra := make([]string, 0, len(m.Extra))
+ for k := range m.Extra {
+ keysForExtra = append(keysForExtra, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
+ for _, k := range keysForExtra {
+ dAtA[i] = 0x2a
+ i++
+ v := m.Extra[string(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n14, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n14
+ }
+ }
+ return i, nil
+}
+
+func (m *SubjectAccessReviewStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SubjectAccessReviewStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ if m.Allowed {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.EvaluationError)))
+ i += copy(dAtA[i:], m.EvaluationError)
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m ExtraValue) Size() (n int) {
+ var l int
+ _ = l
+ if len(m) > 0 {
+ for _, s := range m {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *LocalSubjectAccessReview) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *NonResourceAttributes) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Verb)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ResourceAttributes) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Namespace)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Verb)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Group)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Version)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Resource)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Subresource)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *SelfSubjectAccessReview) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *SelfSubjectAccessReviewSpec) Size() (n int) {
+ var l int
+ _ = l
+ if m.ResourceAttributes != nil {
+ l = m.ResourceAttributes.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.NonResourceAttributes != nil {
+ l = m.NonResourceAttributes.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *SubjectAccessReview) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *SubjectAccessReviewSpec) Size() (n int) {
+ var l int
+ _ = l
+ if m.ResourceAttributes != nil {
+ l = m.ResourceAttributes.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.NonResourceAttributes != nil {
+ l = m.NonResourceAttributes.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ l = len(m.User)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Groups) > 0 {
+ for _, s := range m.Groups {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Extra) > 0 {
+ for k, v := range m.Extra {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *SubjectAccessReviewStatus) Size() (n int) {
+ var l int
+ _ = l
+ n += 2
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.EvaluationError)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *LocalSubjectAccessReview) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&LocalSubjectAccessReview{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SubjectAccessReviewSpec", "SubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NonResourceAttributes) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NonResourceAttributes{`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `Verb:` + fmt.Sprintf("%v", this.Verb) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceAttributes) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ResourceAttributes{`,
+ `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
+ `Verb:` + fmt.Sprintf("%v", this.Verb) + `,`,
+ `Group:` + fmt.Sprintf("%v", this.Group) + `,`,
+ `Version:` + fmt.Sprintf("%v", this.Version) + `,`,
+ `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`,
+ `Subresource:` + fmt.Sprintf("%v", this.Subresource) + `,`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SelfSubjectAccessReview) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SelfSubjectAccessReview{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SelfSubjectAccessReviewSpec", "SelfSubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SelfSubjectAccessReviewSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SelfSubjectAccessReviewSpec{`,
+ `ResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.ResourceAttributes), "ResourceAttributes", "ResourceAttributes", 1) + `,`,
+ `NonResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.NonResourceAttributes), "NonResourceAttributes", "NonResourceAttributes", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SubjectAccessReview) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SubjectAccessReview{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SubjectAccessReviewSpec", "SubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SubjectAccessReviewSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForExtra := make([]string, 0, len(this.Extra))
+ for k := range this.Extra {
+ keysForExtra = append(keysForExtra, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
+ mapStringForExtra := "map[string]ExtraValue{"
+ for _, k := range keysForExtra {
+ mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k])
+ }
+ mapStringForExtra += "}"
+ s := strings.Join([]string{`&SubjectAccessReviewSpec{`,
+ `ResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.ResourceAttributes), "ResourceAttributes", "ResourceAttributes", 1) + `,`,
+ `NonResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.NonResourceAttributes), "NonResourceAttributes", "NonResourceAttributes", 1) + `,`,
+ `User:` + fmt.Sprintf("%v", this.User) + `,`,
+ `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`,
+ `Extra:` + mapStringForExtra + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SubjectAccessReviewStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SubjectAccessReviewStatus{`,
+ `Allowed:` + fmt.Sprintf("%v", this.Allowed) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `EvaluationError:` + fmt.Sprintf("%v", this.EvaluationError) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *ExtraValue) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExtraValue: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExtraValue: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ *m = append(*m, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LocalSubjectAccessReview) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LocalSubjectAccessReview: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LocalSubjectAccessReview: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NonResourceAttributes) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NonResourceAttributes: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NonResourceAttributes: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Verb", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Verb = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceAttributes) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceAttributes: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceAttributes: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Namespace = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Verb", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Verb = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Group = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Version = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Resource = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Subresource", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Subresource = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SelfSubjectAccessReview) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SelfSubjectAccessReview: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SelfSubjectAccessReview: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SelfSubjectAccessReviewSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SelfSubjectAccessReviewSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SelfSubjectAccessReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceAttributes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ResourceAttributes == nil {
+ m.ResourceAttributes = &ResourceAttributes{}
+ }
+ if err := m.ResourceAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NonResourceAttributes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.NonResourceAttributes == nil {
+ m.NonResourceAttributes = &NonResourceAttributes{}
+ }
+ if err := m.NonResourceAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SubjectAccessReview) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SubjectAccessReview: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SubjectAccessReview: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SubjectAccessReviewSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SubjectAccessReviewSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SubjectAccessReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceAttributes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ResourceAttributes == nil {
+ m.ResourceAttributes = &ResourceAttributes{}
+ }
+ if err := m.ResourceAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NonResourceAttributes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.NonResourceAttributes == nil {
+ m.NonResourceAttributes = &NonResourceAttributes{}
+ }
+ if err := m.NonResourceAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.User = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Extra", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Extra == nil {
+ m.Extra = make(map[string]ExtraValue)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &ExtraValue{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Extra[mapkey] = *mapvalue
+ } else {
+ var mapvalue ExtraValue
+ m.Extra[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SubjectAccessReviewStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SubjectAccessReviewStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SubjectAccessReviewStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Allowed", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Allowed = bool(v != 0)
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field EvaluationError", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.EvaluationError = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/client-go/pkg/apis/authorization/v1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 885 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4f, 0x6f, 0xdc, 0x44,
+ 0x14, 0x5f, 0xef, 0xbf, 0xec, 0x4e, 0x80, 0x94, 0xa9, 0x4a, 0xdc, 0x20, 0x79, 0x57, 0x8b, 0x84,
+ 0x82, 0x00, 0x9b, 0x94, 0x3f, 0xad, 0xca, 0x01, 0xc5, 0x22, 0xfc, 0x91, 0x68, 0x8b, 0x26, 0x22,
+ 0x07, 0xb8, 0x30, 0x76, 0x5e, 0x76, 0xdd, 0xdd, 0xf5, 0x98, 0x99, 0xb1, 0x4b, 0x38, 0xf5, 0xc6,
+ 0x15, 0x89, 0x0b, 0x47, 0xbe, 0x02, 0x1f, 0x00, 0xce, 0xb9, 0xd1, 0x03, 0x12, 0x3d, 0xa0, 0x15,
+ 0x31, 0x17, 0x3e, 0x06, 0x9a, 0xf1, 0x64, 0x9d, 0x6d, 0x1c, 0xaa, 0x85, 0x4a, 0x70, 0xc8, 0xcd,
+ 0xf3, 0xde, 0xef, 0xf7, 0xde, 0x6f, 0xde, 0xbc, 0xf1, 0x1b, 0xf4, 0xf6, 0xf8, 0x86, 0x70, 0x23,
+ 0xe6, 0x8d, 0xd3, 0x00, 0x78, 0x0c, 0x12, 0x84, 0x97, 0x8c, 0x87, 0x1e, 0x4d, 0x22, 0xe1, 0xd1,
+ 0x54, 0x8e, 0x18, 0x8f, 0xbe, 0xa2, 0x32, 0x62, 0xb1, 0x97, 0x6d, 0x79, 0x43, 0x88, 0x81, 0x53,
+ 0x09, 0xfb, 0x6e, 0xc2, 0x99, 0x64, 0xf8, 0xe5, 0x82, 0xec, 0x96, 0x64, 0x37, 0x19, 0x0f, 0x5d,
+ 0x45, 0x76, 0x17, 0xc8, 0x6e, 0xb6, 0xb5, 0xf1, 0xea, 0x30, 0x92, 0xa3, 0x34, 0x70, 0x43, 0x36,
+ 0xf5, 0x86, 0x6c, 0xc8, 0x3c, 0x1d, 0x23, 0x48, 0x0f, 0xf4, 0x4a, 0x2f, 0xf4, 0x57, 0x11, 0x7b,
+ 0xe3, 0x0d, 0x23, 0x8c, 0x26, 0xd1, 0x94, 0x86, 0xa3, 0x28, 0x06, 0x7e, 0x58, 0x4a, 0x9b, 0x82,
+ 0xa4, 0x15, 0x8a, 0x36, 0xbc, 0xf3, 0x58, 0x3c, 0x8d, 0x65, 0x34, 0x85, 0x33, 0x84, 0xb7, 0x1e,
+ 0x47, 0x10, 0xe1, 0x08, 0xa6, 0xf4, 0x0c, 0xef, 0xf5, 0xf3, 0x78, 0xa9, 0x8c, 0x26, 0x5e, 0x14,
+ 0x4b, 0x21, 0xf9, 0xa3, 0xa4, 0xc1, 0x75, 0x84, 0x76, 0xbe, 0x94, 0x9c, 0xee, 0xd1, 0x49, 0x0a,
+ 0xb8, 0x87, 0x5a, 0x91, 0x84, 0xa9, 0xb0, 0xad, 0x7e, 0x63, 0xb3, 0xeb, 0x77, 0xf3, 0x59, 0xaf,
+ 0xf5, 0xa1, 0x32, 0x90, 0xc2, 0x7e, 0xb3, 0xf3, 0xdd, 0xf7, 0xbd, 0xda, 0xfd, 0xdf, 0xfa, 0xb5,
+ 0xc1, 0x2f, 0x75, 0x64, 0x7f, 0xc4, 0x42, 0x3a, 0xd9, 0x4d, 0x83, 0xbb, 0x10, 0xca, 0xed, 0x30,
+ 0x04, 0x21, 0x08, 0x64, 0x11, 0xdc, 0xc3, 0x9f, 0xa3, 0x8e, 0x2a, 0xc7, 0x3e, 0x95, 0xd4, 0xb6,
+ 0xfa, 0xd6, 0xe6, 0xea, 0xb5, 0xd7, 0x5c, 0x73, 0x30, 0xa7, 0xd5, 0x95, 0x47, 0xa3, 0xd0, 0x6e,
+ 0xb6, 0xe5, 0xde, 0xd1, 0xb1, 0x6e, 0x81, 0xa4, 0x3e, 0x3e, 0x9a, 0xf5, 0x6a, 0xf9, 0xac, 0x87,
+ 0x4a, 0x1b, 0x99, 0x47, 0xc5, 0x07, 0xa8, 0x29, 0x12, 0x08, 0xed, 0xba, 0x8e, 0xfe, 0xae, 0xbb,
+ 0xc4, 0xb1, 0xbb, 0x15, 0x8a, 0x77, 0x13, 0x08, 0xfd, 0xa7, 0x4c, 0xc6, 0xa6, 0x5a, 0x11, 0x1d,
+ 0x1f, 0xc7, 0xa8, 0x2d, 0x24, 0x95, 0xa9, 0xb0, 0x1b, 0x3a, 0xd3, 0x7b, 0xff, 0x3a, 0x93, 0x8e,
+ 0xe6, 0x3f, 0x63, 0x72, 0xb5, 0x8b, 0x35, 0x31, 0x59, 0x06, 0x9f, 0xa1, 0x2b, 0xb7, 0x59, 0x4c,
+ 0x40, 0xb0, 0x94, 0x87, 0xb0, 0x2d, 0x25, 0x8f, 0x82, 0x54, 0x82, 0xc0, 0x7d, 0xd4, 0x4c, 0xa8,
+ 0x1c, 0xe9, 0x72, 0x76, 0x4b, 0xa9, 0x1f, 0x53, 0x39, 0x22, 0xda, 0xa3, 0x10, 0x19, 0xf0, 0x40,
+ 0x97, 0xe4, 0x14, 0x62, 0x0f, 0x78, 0x40, 0xb4, 0x67, 0xf0, 0x53, 0x1d, 0xe1, 0x8a, 0xd0, 0x1e,
+ 0xea, 0xc6, 0x74, 0x0a, 0x22, 0xa1, 0x21, 0x98, 0xf8, 0xcf, 0x1a, 0x76, 0xf7, 0xf6, 0x89, 0x83,
+ 0x94, 0x98, 0xc7, 0x67, 0xc2, 0x2f, 0xa0, 0xd6, 0x90, 0xb3, 0x34, 0xd1, 0x55, 0xeb, 0xfa, 0x4f,
+ 0x1b, 0x48, 0xeb, 0x7d, 0x65, 0x24, 0x85, 0x0f, 0xbf, 0x84, 0x56, 0x32, 0xe0, 0x22, 0x62, 0xb1,
+ 0xdd, 0xd4, 0xb0, 0x35, 0x03, 0x5b, 0xd9, 0x2b, 0xcc, 0xe4, 0xc4, 0x8f, 0x5f, 0x41, 0x1d, 0x6e,
+ 0x84, 0xdb, 0x2d, 0x8d, 0xbd, 0x64, 0xb0, 0x9d, 0x93, 0x0d, 0x91, 0x39, 0x02, 0xbf, 0x89, 0x56,
+ 0x45, 0x1a, 0xcc, 0x09, 0x6d, 0x4d, 0xb8, 0x6c, 0x08, 0xab, 0xbb, 0xa5, 0x8b, 0x9c, 0xc6, 0xa9,
+ 0x6d, 0xa9, 0x3d, 0xda, 0x2b, 0x8b, 0xdb, 0x52, 0x25, 0x20, 0xda, 0x33, 0xf8, 0xb5, 0x8e, 0xd6,
+ 0x77, 0x61, 0x72, 0xf0, 0xdf, 0xf4, 0xfc, 0xdd, 0x85, 0x9e, 0xff, 0x60, 0xb9, 0x4e, 0xac, 0x56,
+ 0xfd, 0xbf, 0xe9, 0xfb, 0x1f, 0xeb, 0xe8, 0xf9, 0xbf, 0xd1, 0x88, 0xbf, 0xb6, 0x10, 0xe6, 0x67,
+ 0x5a, 0xd7, 0x14, 0xfa, 0x9d, 0xa5, 0xc4, 0x9d, 0xbd, 0x01, 0xfe, 0x73, 0xf9, 0xac, 0x57, 0x71,
+ 0x33, 0x48, 0x45, 0x4a, 0xfc, 0xad, 0x85, 0xae, 0xc4, 0x55, 0x57, 0xd4, 0x9c, 0x8b, 0xbf, 0x94,
+ 0x98, 0xca, 0xcb, 0xee, 0x5f, 0xcd, 0x67, 0xbd, 0xea, 0xff, 0x00, 0xa9, 0xce, 0x3d, 0xf8, 0xb9,
+ 0x8e, 0x2e, 0x5f, 0xfc, 0x89, 0x9f, 0x64, 0x47, 0xfe, 0xd9, 0x44, 0xeb, 0x17, 0xdd, 0xf8, 0x8f,
+ 0xba, 0x71, 0x3e, 0x20, 0x1a, 0x8b, 0x7f, 0xd2, 0x4f, 0x04, 0x70, 0x33, 0x20, 0x06, 0xa8, 0xad,
+ 0x87, 0x80, 0xb0, 0x9b, 0xfa, 0xa9, 0x81, 0xd4, 0x09, 0xe8, 0xe9, 0x20, 0x88, 0xf1, 0x60, 0x89,
+ 0x5a, 0xa0, 0xde, 0x26, 0x76, 0xab, 0xdf, 0xd8, 0x5c, 0xbd, 0x76, 0xe7, 0x49, 0xb4, 0x96, 0xab,
+ 0x5f, 0x3b, 0x3b, 0xb1, 0xe4, 0x87, 0xe5, 0x54, 0xd2, 0x36, 0x52, 0x24, 0xdb, 0xf8, 0xc2, 0xbc,
+ 0x88, 0x34, 0x06, 0x5f, 0x42, 0x8d, 0x31, 0x1c, 0x16, 0x53, 0x91, 0xa8, 0x4f, 0x7c, 0x0b, 0xb5,
+ 0x32, 0xf5, 0x58, 0x32, 0x05, 0xbe, 0xbe, 0x94, 0xaa, 0xf2, 0xad, 0x45, 0x8a, 0x28, 0x37, 0xeb,
+ 0x37, 0xac, 0xc1, 0x0f, 0x16, 0xba, 0x7a, 0x6e, 0x83, 0xaa, 0x31, 0x49, 0x27, 0x13, 0x76, 0x0f,
+ 0xf6, 0xb5, 0x8c, 0x4e, 0x39, 0x26, 0xb7, 0x0b, 0x33, 0x39, 0xf1, 0xe3, 0x17, 0x51, 0x9b, 0x03,
+ 0x15, 0x2c, 0x36, 0xa3, 0x79, 0xde, 0xdb, 0x44, 0x5b, 0x89, 0xf1, 0xe2, 0x6d, 0xb4, 0x06, 0x2a,
+ 0xbd, 0xd6, 0xb5, 0xc3, 0x39, 0xe3, 0xe6, 0xa8, 0xd6, 0x0d, 0x61, 0x6d, 0x67, 0xd1, 0x4d, 0x1e,
+ 0xc5, 0xfb, 0x9b, 0x47, 0xc7, 0x4e, 0xed, 0xc1, 0xb1, 0x53, 0x7b, 0x78, 0xec, 0xd4, 0xee, 0xe7,
+ 0x8e, 0x75, 0x94, 0x3b, 0xd6, 0x83, 0xdc, 0xb1, 0x1e, 0xe6, 0x8e, 0xf5, 0x7b, 0xee, 0x58, 0xdf,
+ 0xfc, 0xe1, 0xd4, 0x3e, 0xad, 0x67, 0x5b, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x38, 0xb6, 0x9a,
+ 0xe3, 0xd0, 0x0b, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/generated.proto
new file mode 100644
index 000000000..9048e4fa4
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/generated.proto
@@ -0,0 +1,183 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.client_go.pkg.apis.authorization.v1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1";
+
+// ExtraValue masks the value so protobuf can generate
+// +protobuf.nullable=true
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+message ExtraValue {
+ // items, if empty, will result in an empty slice
+
+ repeated string items = 1;
+}
+
+// LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace.
+// Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions
+// checking.
+message LocalSubjectAccessReview {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace
+ // you made the request against. If empty, it is defaulted.
+ optional SubjectAccessReviewSpec spec = 2;
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ // +optional
+ optional SubjectAccessReviewStatus status = 3;
+}
+
+// NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface
+message NonResourceAttributes {
+ // Path is the URL path of the request
+ // +optional
+ optional string path = 1;
+
+ // Verb is the standard HTTP verb
+ // +optional
+ optional string verb = 2;
+}
+
+// ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface
+message ResourceAttributes {
+ // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces
+ // "" (empty) is defaulted for LocalSubjectAccessReviews
+ // "" (empty) is empty for cluster-scoped resources
+ // "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
+ // +optional
+ optional string namespace = 1;
+
+ // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all.
+ // +optional
+ optional string verb = 2;
+
+ // Group is the API Group of the Resource. "*" means all.
+ // +optional
+ optional string group = 3;
+
+ // Version is the API Version of the Resource. "*" means all.
+ // +optional
+ optional string version = 4;
+
+ // Resource is one of the existing resource types. "*" means all.
+ // +optional
+ optional string resource = 5;
+
+ // Subresource is one of the existing resource types. "" means none.
+ // +optional
+ optional string subresource = 6;
+
+ // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all.
+ // +optional
+ optional string name = 7;
+}
+
+// SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a
+// spec.namespace means "in all namespaces". Self is a special case, because users should always be able
+// to check whether they can perform an action
+message SelfSubjectAccessReview {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec holds information about the request being evaluated. user and groups must be empty
+ optional SelfSubjectAccessReviewSpec spec = 2;
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ // +optional
+ optional SubjectAccessReviewStatus status = 3;
+}
+
+// SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
+// and NonResourceAuthorizationAttributes must be set
+message SelfSubjectAccessReviewSpec {
+ // ResourceAuthorizationAttributes describes information for a resource access request
+ // +optional
+ optional ResourceAttributes resourceAttributes = 1;
+
+ // NonResourceAttributes describes information for a non-resource access request
+ // +optional
+ optional NonResourceAttributes nonResourceAttributes = 2;
+}
+
+// SubjectAccessReview checks whether or not a user or group can perform an action.
+message SubjectAccessReview {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec holds information about the request being evaluated
+ optional SubjectAccessReviewSpec spec = 2;
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ // +optional
+ optional SubjectAccessReviewStatus status = 3;
+}
+
+// SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
+// and NonResourceAuthorizationAttributes must be set
+message SubjectAccessReviewSpec {
+ // ResourceAuthorizationAttributes describes information for a resource access request
+ // +optional
+ optional ResourceAttributes resourceAttributes = 1;
+
+ // NonResourceAttributes describes information for a non-resource access request
+ // +optional
+ optional NonResourceAttributes nonResourceAttributes = 2;
+
+ // User is the user you're testing for.
+ // If you specify "User" but not "Groups", then is it interpreted as "What if User were not a member of any groups
+ // +optional
+ optional string verb = 3;
+
+ // Groups is the groups you're testing for.
+ // +optional
+ repeated string groups = 4;
+
+ // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer
+ // it needs a reflection here.
+ // +optional
+ map<string, ExtraValue> extra = 5;
+}
+
+// SubjectAccessReviewStatus
+message SubjectAccessReviewStatus {
+ // Allowed is required. True if the action would be allowed, false otherwise.
+ optional bool allowed = 1;
+
+ // Reason is optional. It indicates why a request was allowed or denied.
+ // +optional
+ optional string reason = 2;
+
+ // EvaluationError is an indication that some error occurred during the authorization check.
+ // It is entirely possible to get an error and be able to continue determine authorization status in spite of it.
+ // For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.
+ // +optional
+ optional string evaluationError = 3;
+}
+
diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1/register.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/register.go
new file mode 100644
index 000000000..5defdff67
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/register.go
@@ -0,0 +1,61 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "authorization.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &SelfSubjectAccessReview{},
+ &SubjectAccessReview{},
+ &LocalSubjectAccessReview{},
+ )
+
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/types.generated.go
new file mode 100644
index 000000000..2528afa8e
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/types.generated.go
@@ -0,0 +1,3233 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ pkg2_types "k8s.io/apimachinery/pkg/types"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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 pkg1_v1.TypeMeta
+ var v1 pkg2_types.UID
+ var v2 time.Time
+ _, _, _ = v0, v1, v2
+ }
+}
+
+func (x *SubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[4] = true
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SubjectAccessReview) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = SubjectAccessReviewSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = SubjectAccessReviewSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *SelfSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[4] = true
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SelfSubjectAccessReview) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SelfSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = SelfSubjectAccessReviewSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = SelfSubjectAccessReviewSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *LocalSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[4] = true
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *LocalSubjectAccessReview) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *LocalSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = SubjectAccessReviewSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = SubjectAccessReviewSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ResourceAttributes) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [7]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Namespace != ""
+ yyq2[1] = x.Verb != ""
+ yyq2[2] = x.Group != ""
+ yyq2[3] = x.Version != ""
+ yyq2[4] = x.Resource != ""
+ yyq2[5] = x.Subresource != ""
+ yyq2[6] = x.Name != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(7)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("namespace"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Verb))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("verb"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Verb))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Group))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("group"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Group))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Version))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("version"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Version))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Resource))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resource"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Resource))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Subresource))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("subresource"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Subresource))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ResourceAttributes) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ResourceAttributes) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "verb":
+ if r.TryDecodeAsNil() {
+ x.Verb = ""
+ } else {
+ yyv6 := &x.Verb
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "group":
+ if r.TryDecodeAsNil() {
+ x.Group = ""
+ } else {
+ yyv8 := &x.Group
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "version":
+ if r.TryDecodeAsNil() {
+ x.Version = ""
+ } else {
+ yyv10 := &x.Version
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "resource":
+ if r.TryDecodeAsNil() {
+ x.Resource = ""
+ } else {
+ yyv12 := &x.Resource
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ case "subresource":
+ if r.TryDecodeAsNil() {
+ x.Subresource = ""
+ } else {
+ yyv14 := &x.Subresource
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv16 := &x.Name
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ResourceAttributes) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj18 int
+ var yyb18 bool
+ var yyhl18 bool = l >= 0
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Namespace = ""
+ } else {
+ yyv19 := &x.Namespace
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Verb = ""
+ } else {
+ yyv21 := &x.Verb
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Group = ""
+ } else {
+ yyv23 := &x.Group
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*string)(yyv23)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Version = ""
+ } else {
+ yyv25 := &x.Version
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*string)(yyv25)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Resource = ""
+ } else {
+ yyv27 := &x.Resource
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*string)(yyv27)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Subresource = ""
+ } else {
+ yyv29 := &x.Subresource
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*string)(yyv29)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv31 := &x.Name
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*string)(yyv31)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj18-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NonResourceAttributes) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Path != ""
+ yyq2[1] = x.Verb != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("path"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Verb))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("verb"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Verb))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NonResourceAttributes) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NonResourceAttributes) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv4 := &x.Path
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "verb":
+ if r.TryDecodeAsNil() {
+ x.Verb = ""
+ } else {
+ yyv6 := &x.Verb
+ 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_containerMapEnd1234)
+}
+
+func (x *NonResourceAttributes) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv9 := &x.Path
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Verb = ""
+ } else {
+ yyv11 := &x.Verb
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *SubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.ResourceAttributes != nil
+ yyq2[1] = x.NonResourceAttributes != nil
+ yyq2[2] = x.User != ""
+ yyq2[3] = len(x.Groups) != 0
+ yyq2[4] = len(x.Extra) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.ResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.ResourceAttributes.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resourceAttributes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.ResourceAttributes.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.NonResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.NonResourceAttributes.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nonResourceAttributes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NonResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.NonResourceAttributes.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.User))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("user"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.User))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Groups == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Groups, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("groups"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Groups == nil {
+ r.EncodeNil()
+ } else {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Groups, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.Extra == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("extra"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Extra == nil {
+ r.EncodeNil()
+ } else {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SubjectAccessReviewSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SubjectAccessReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "resourceAttributes":
+ if r.TryDecodeAsNil() {
+ if x.ResourceAttributes != nil {
+ x.ResourceAttributes = nil
+ }
+ } else {
+ if x.ResourceAttributes == nil {
+ x.ResourceAttributes = new(ResourceAttributes)
+ }
+ x.ResourceAttributes.CodecDecodeSelf(d)
+ }
+ case "nonResourceAttributes":
+ if r.TryDecodeAsNil() {
+ if x.NonResourceAttributes != nil {
+ x.NonResourceAttributes = nil
+ }
+ } else {
+ if x.NonResourceAttributes == nil {
+ x.NonResourceAttributes = new(NonResourceAttributes)
+ }
+ x.NonResourceAttributes.CodecDecodeSelf(d)
+ }
+ case "user":
+ if r.TryDecodeAsNil() {
+ x.User = ""
+ } else {
+ yyv6 := &x.User
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "groups":
+ if r.TryDecodeAsNil() {
+ x.Groups = nil
+ } else {
+ yyv8 := &x.Groups
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv8, false, d)
+ }
+ }
+ case "extra":
+ if r.TryDecodeAsNil() {
+ x.Extra = nil
+ } else {
+ yyv10 := &x.Extra
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decMapstringExtraValue((*map[string]ExtraValue)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SubjectAccessReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ResourceAttributes != nil {
+ x.ResourceAttributes = nil
+ }
+ } else {
+ if x.ResourceAttributes == nil {
+ x.ResourceAttributes = new(ResourceAttributes)
+ }
+ x.ResourceAttributes.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.NonResourceAttributes != nil {
+ x.NonResourceAttributes = nil
+ }
+ } else {
+ if x.NonResourceAttributes == nil {
+ x.NonResourceAttributes = new(NonResourceAttributes)
+ }
+ x.NonResourceAttributes.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.User = ""
+ } else {
+ yyv15 := &x.User
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Groups = nil
+ } else {
+ yyv17 := &x.Groups
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv17, false, d)
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Extra = nil
+ } else {
+ yyv19 := &x.Extra
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decMapstringExtraValue((*map[string]ExtraValue)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x ExtraValue) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 {
+ h.encExtraValue((ExtraValue)(x), e)
+ }
+ }
+}
+
+func (x *ExtraValue) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ h.decExtraValue((*ExtraValue)(x), d)
+ }
+}
+
+func (x *SelfSubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.ResourceAttributes != nil
+ yyq2[1] = x.NonResourceAttributes != 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.ResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.ResourceAttributes.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resourceAttributes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.ResourceAttributes.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.NonResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.NonResourceAttributes.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nonResourceAttributes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NonResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.NonResourceAttributes.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SelfSubjectAccessReviewSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SelfSubjectAccessReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "resourceAttributes":
+ if r.TryDecodeAsNil() {
+ if x.ResourceAttributes != nil {
+ x.ResourceAttributes = nil
+ }
+ } else {
+ if x.ResourceAttributes == nil {
+ x.ResourceAttributes = new(ResourceAttributes)
+ }
+ x.ResourceAttributes.CodecDecodeSelf(d)
+ }
+ case "nonResourceAttributes":
+ if r.TryDecodeAsNil() {
+ if x.NonResourceAttributes != nil {
+ x.NonResourceAttributes = nil
+ }
+ } else {
+ if x.NonResourceAttributes == nil {
+ x.NonResourceAttributes = new(NonResourceAttributes)
+ }
+ x.NonResourceAttributes.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SelfSubjectAccessReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ResourceAttributes != nil {
+ x.ResourceAttributes = nil
+ }
+ } else {
+ if x.ResourceAttributes == nil {
+ x.ResourceAttributes = new(ResourceAttributes)
+ }
+ x.ResourceAttributes.CodecDecodeSelf(d)
+ }
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.NonResourceAttributes != nil {
+ x.NonResourceAttributes = nil
+ }
+ } else {
+ if x.NonResourceAttributes == nil {
+ x.NonResourceAttributes = new(NonResourceAttributes)
+ }
+ x.NonResourceAttributes.CodecDecodeSelf(d)
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *SubjectAccessReviewStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.Reason != ""
+ yyq2[2] = x.EvaluationError != ""
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Allowed))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("allowed"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Allowed))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.EvaluationError))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("evaluationError"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.EvaluationError))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SubjectAccessReviewStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SubjectAccessReviewStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "allowed":
+ if r.TryDecodeAsNil() {
+ x.Allowed = false
+ } else {
+ yyv4 := &x.Allowed
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*bool)(yyv4)) = r.DecodeBool()
+ }
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv6 := &x.Reason
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "evaluationError":
+ if r.TryDecodeAsNil() {
+ x.EvaluationError = ""
+ } else {
+ yyv8 := &x.EvaluationError
+ 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_containerMapEnd1234)
+}
+
+func (x *SubjectAccessReviewStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Allowed = false
+ } else {
+ yyv11 := &x.Allowed
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*bool)(yyv11)) = r.DecodeBool()
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv13 := &x.Reason
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.EvaluationError = ""
+ } else {
+ yyv15 := &x.EvaluationError
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encMapstringExtraValue(v map[string]ExtraValue, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeMapStart(len(v))
+ for yyk1, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ yym2 := z.EncBinary()
+ _ = yym2
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yyk1))
+ }
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyv1 == nil {
+ r.EncodeNil()
+ } else {
+ yyv1.CodecEncodeSelf(e)
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) decMapstringExtraValue(v *map[string]ExtraValue, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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, 40)
+ yyv1 = make(map[string]ExtraValue, yyrl1)
+ *v = yyv1
+ }
+ var yymk1 string
+ var yymv1 ExtraValue
+ var yymg1 bool
+ if yybh1.MapValueReset {
+ yymg1 = true
+ }
+ if yyl1 > 0 {
+ for yyj1 := 0; yyj1 < yyl1; yyj1++ {
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ if r.TryDecodeAsNil() {
+ yymk1 = ""
+ } else {
+ yyv2 := &yymk1
+ yym3 := z.DecBinary()
+ _ = yym3
+ if false {
+ } else {
+ *((*string)(yyv2)) = r.DecodeString()
+ }
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv4 := &yymv1
+ yyv4.CodecDecodeSelf(d)
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } else if yyl1 < 0 {
+ for yyj1 := 0; !r.CheckBreak(); yyj1++ {
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ if r.TryDecodeAsNil() {
+ yymk1 = ""
+ } else {
+ yyv5 := &yymk1
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*string)(yyv5)) = r.DecodeString()
+ }
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv7 := &yymv1
+ yyv7.CodecDecodeSelf(d)
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } // else len==0: TODO: Should we clear map entries?
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) encExtraValue(v ExtraValue, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym2 := z.EncBinary()
+ _ = yym2
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yyv1))
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decExtraValue(v *ExtraValue, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []string{}
+ 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) {
+
+ yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]string, yyrl1)
+ }
+ } else {
+ yyv1 = make([]string, yyrl1)
+ }
+ yyc1 = true
+ yyrr1 = len(yyv1)
+ } else if yyl1 != len(yyv1) {
+ yyv1 = yyv1[:yyl1]
+ yyc1 = true
+ }
+ yyj1 := 0
+ for ; yyj1 < yyrr1; yyj1++ {
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yym3 := z.DecBinary()
+ _ = yym3
+ if false {
+ } else {
+ *((*string)(yyv2)) = r.DecodeString()
+ }
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv4 := &yyv1[yyj1]
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, "") // var yyz1 string
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv6 := &yyv1[yyj1]
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+
+ } else {
+ z.DecSwallow()
+ }
+
+ }
+ if yyj1 < len(yyv1) {
+ yyv1 = yyv1[:yyj1]
+ yyc1 = true
+ } else if yyj1 == 0 && yyv1 == nil {
+ yyv1 = []string{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1/types.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/types.go
new file mode 100644
index 000000000..38c314ffc
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/types.go
@@ -0,0 +1,176 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "fmt"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+// +noMethods=true
+
+// SubjectAccessReview checks whether or not a user or group can perform an action.
+type SubjectAccessReview struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec holds information about the request being evaluated
+ Spec SubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ // +optional
+ Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// +genclient=true
+// +nonNamespaced=true
+// +noMethods=true
+
+// SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a
+// spec.namespace means "in all namespaces". Self is a special case, because users should always be able
+// to check whether they can perform an action
+type SelfSubjectAccessReview struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec holds information about the request being evaluated. user and groups must be empty
+ Spec SelfSubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ // +optional
+ Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// +genclient=true
+// +noMethods=true
+
+// LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace.
+// Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions
+// checking.
+type LocalSubjectAccessReview struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace
+ // you made the request against. If empty, it is defaulted.
+ Spec SubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ // +optional
+ Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface
+type ResourceAttributes struct {
+ // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces
+ // "" (empty) is defaulted for LocalSubjectAccessReviews
+ // "" (empty) is empty for cluster-scoped resources
+ // "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
+ // +optional
+ Namespace string `json:"namespace,omitempty" protobuf:"bytes,1,opt,name=namespace"`
+ // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all.
+ // +optional
+ Verb string `json:"verb,omitempty" protobuf:"bytes,2,opt,name=verb"`
+ // Group is the API Group of the Resource. "*" means all.
+ // +optional
+ Group string `json:"group,omitempty" protobuf:"bytes,3,opt,name=group"`
+ // Version is the API Version of the Resource. "*" means all.
+ // +optional
+ Version string `json:"version,omitempty" protobuf:"bytes,4,opt,name=version"`
+ // Resource is one of the existing resource types. "*" means all.
+ // +optional
+ Resource string `json:"resource,omitempty" protobuf:"bytes,5,opt,name=resource"`
+ // Subresource is one of the existing resource types. "" means none.
+ // +optional
+ Subresource string `json:"subresource,omitempty" protobuf:"bytes,6,opt,name=subresource"`
+ // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all.
+ // +optional
+ Name string `json:"name,omitempty" protobuf:"bytes,7,opt,name=name"`
+}
+
+// NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface
+type NonResourceAttributes struct {
+ // Path is the URL path of the request
+ // +optional
+ Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"`
+ // Verb is the standard HTTP verb
+ // +optional
+ Verb string `json:"verb,omitempty" protobuf:"bytes,2,opt,name=verb"`
+}
+
+// SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
+// and NonResourceAuthorizationAttributes must be set
+type SubjectAccessReviewSpec struct {
+ // ResourceAuthorizationAttributes describes information for a resource access request
+ // +optional
+ ResourceAttributes *ResourceAttributes `json:"resourceAttributes,omitempty" protobuf:"bytes,1,opt,name=resourceAttributes"`
+ // NonResourceAttributes describes information for a non-resource access request
+ // +optional
+ NonResourceAttributes *NonResourceAttributes `json:"nonResourceAttributes,omitempty" protobuf:"bytes,2,opt,name=nonResourceAttributes"`
+
+ // User is the user you're testing for.
+ // If you specify "User" but not "Groups", then is it interpreted as "What if User were not a member of any groups
+ // +optional
+ User string `json:"user,omitempty" protobuf:"bytes,3,opt,name=verb"`
+ // Groups is the groups you're testing for.
+ // +optional
+ Groups []string `json:"groups,omitempty" protobuf:"bytes,4,rep,name=groups"`
+ // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer
+ // it needs a reflection here.
+ // +optional
+ Extra map[string]ExtraValue `json:"extra,omitempty" protobuf:"bytes,5,rep,name=extra"`
+}
+
+// ExtraValue masks the value so protobuf can generate
+// +protobuf.nullable=true
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+type ExtraValue []string
+
+func (t ExtraValue) String() string {
+ return fmt.Sprintf("%v", []string(t))
+}
+
+// SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
+// and NonResourceAuthorizationAttributes must be set
+type SelfSubjectAccessReviewSpec struct {
+ // ResourceAuthorizationAttributes describes information for a resource access request
+ // +optional
+ ResourceAttributes *ResourceAttributes `json:"resourceAttributes,omitempty" protobuf:"bytes,1,opt,name=resourceAttributes"`
+ // NonResourceAttributes describes information for a non-resource access request
+ // +optional
+ NonResourceAttributes *NonResourceAttributes `json:"nonResourceAttributes,omitempty" protobuf:"bytes,2,opt,name=nonResourceAttributes"`
+}
+
+// SubjectAccessReviewStatus
+type SubjectAccessReviewStatus struct {
+ // Allowed is required. True if the action would be allowed, false otherwise.
+ Allowed bool `json:"allowed" protobuf:"varint,1,opt,name=allowed"`
+ // Reason is optional. It indicates why a request was allowed or denied.
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"`
+ // EvaluationError is an indication that some error occurred during the authorization check.
+ // It is entirely possible to get an error and be able to continue determine authorization status in spite of it.
+ // For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.
+ // +optional
+ EvaluationError string `json:"evaluationError,omitempty" protobuf:"bytes,3,opt,name=evaluationError"`
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..33c0035b4
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/types_swagger_doc_generated.go
@@ -0,0 +1,119 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_LocalSubjectAccessReview = map[string]string{
+ "": "LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.",
+ "spec": "Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.",
+ "status": "Status is filled in by the server and indicates whether the request is allowed or not",
+}
+
+func (LocalSubjectAccessReview) SwaggerDoc() map[string]string {
+ return map_LocalSubjectAccessReview
+}
+
+var map_NonResourceAttributes = map[string]string{
+ "": "NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface",
+ "path": "Path is the URL path of the request",
+ "verb": "Verb is the standard HTTP verb",
+}
+
+func (NonResourceAttributes) SwaggerDoc() map[string]string {
+ return map_NonResourceAttributes
+}
+
+var map_ResourceAttributes = map[string]string{
+ "": "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface",
+ "namespace": "Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces \"\" (empty) is defaulted for LocalSubjectAccessReviews \"\" (empty) is empty for cluster-scoped resources \"\" (empty) means \"all\" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview",
+ "verb": "Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all.",
+ "group": "Group is the API Group of the Resource. \"*\" means all.",
+ "version": "Version is the API Version of the Resource. \"*\" means all.",
+ "resource": "Resource is one of the existing resource types. \"*\" means all.",
+ "subresource": "Subresource is one of the existing resource types. \"\" means none.",
+ "name": "Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all.",
+}
+
+func (ResourceAttributes) SwaggerDoc() map[string]string {
+ return map_ResourceAttributes
+}
+
+var map_SelfSubjectAccessReview = map[string]string{
+ "": "SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means \"in all namespaces\". Self is a special case, because users should always be able to check whether they can perform an action",
+ "spec": "Spec holds information about the request being evaluated. user and groups must be empty",
+ "status": "Status is filled in by the server and indicates whether the request is allowed or not",
+}
+
+func (SelfSubjectAccessReview) SwaggerDoc() map[string]string {
+ return map_SelfSubjectAccessReview
+}
+
+var map_SelfSubjectAccessReviewSpec = map[string]string{
+ "": "SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set",
+ "resourceAttributes": "ResourceAuthorizationAttributes describes information for a resource access request",
+ "nonResourceAttributes": "NonResourceAttributes describes information for a non-resource access request",
+}
+
+func (SelfSubjectAccessReviewSpec) SwaggerDoc() map[string]string {
+ return map_SelfSubjectAccessReviewSpec
+}
+
+var map_SubjectAccessReview = map[string]string{
+ "": "SubjectAccessReview checks whether or not a user or group can perform an action.",
+ "spec": "Spec holds information about the request being evaluated",
+ "status": "Status is filled in by the server and indicates whether the request is allowed or not",
+}
+
+func (SubjectAccessReview) SwaggerDoc() map[string]string {
+ return map_SubjectAccessReview
+}
+
+var map_SubjectAccessReviewSpec = map[string]string{
+ "": "SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set",
+ "resourceAttributes": "ResourceAuthorizationAttributes describes information for a resource access request",
+ "nonResourceAttributes": "NonResourceAttributes describes information for a non-resource access request",
+ "user": "User is the user you're testing for. If you specify \"User\" but not \"Groups\", then is it interpreted as \"What if User were not a member of any groups",
+ "groups": "Groups is the groups you're testing for.",
+ "extra": "Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here.",
+}
+
+func (SubjectAccessReviewSpec) SwaggerDoc() map[string]string {
+ return map_SubjectAccessReviewSpec
+}
+
+var map_SubjectAccessReviewStatus = map[string]string{
+ "": "SubjectAccessReviewStatus",
+ "allowed": "Allowed is required. True if the action would be allowed, false otherwise.",
+ "reason": "Reason is optional. It indicates why a request was allowed or denied.",
+ "evaluationError": "EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.",
+}
+
+func (SubjectAccessReviewStatus) SwaggerDoc() map[string]string {
+ return map_SubjectAccessReviewStatus
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/zz_generated.conversion.go
new file mode 100644
index 000000000..97ebf559a
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/zz_generated.conversion.go
@@ -0,0 +1,279 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1
+
+import (
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ authorization "k8s.io/client-go/pkg/apis/authorization"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview,
+ Convert_authorization_LocalSubjectAccessReview_To_v1_LocalSubjectAccessReview,
+ Convert_v1_NonResourceAttributes_To_authorization_NonResourceAttributes,
+ Convert_authorization_NonResourceAttributes_To_v1_NonResourceAttributes,
+ Convert_v1_ResourceAttributes_To_authorization_ResourceAttributes,
+ Convert_authorization_ResourceAttributes_To_v1_ResourceAttributes,
+ Convert_v1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview,
+ Convert_authorization_SelfSubjectAccessReview_To_v1_SelfSubjectAccessReview,
+ Convert_v1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec,
+ Convert_authorization_SelfSubjectAccessReviewSpec_To_v1_SelfSubjectAccessReviewSpec,
+ Convert_v1_SubjectAccessReview_To_authorization_SubjectAccessReview,
+ Convert_authorization_SubjectAccessReview_To_v1_SubjectAccessReview,
+ Convert_v1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec,
+ Convert_authorization_SubjectAccessReviewSpec_To_v1_SubjectAccessReviewSpec,
+ Convert_v1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus,
+ Convert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus,
+ )
+}
+
+func autoConvert_v1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview(in *LocalSubjectAccessReview, out *authorization.LocalSubjectAccessReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview is an autogenerated conversion function.
+func Convert_v1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview(in *LocalSubjectAccessReview, out *authorization.LocalSubjectAccessReview, s conversion.Scope) error {
+ return autoConvert_v1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview(in, out, s)
+}
+
+func autoConvert_authorization_LocalSubjectAccessReview_To_v1_LocalSubjectAccessReview(in *authorization.LocalSubjectAccessReview, out *LocalSubjectAccessReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_authorization_SubjectAccessReviewSpec_To_v1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_authorization_LocalSubjectAccessReview_To_v1_LocalSubjectAccessReview is an autogenerated conversion function.
+func Convert_authorization_LocalSubjectAccessReview_To_v1_LocalSubjectAccessReview(in *authorization.LocalSubjectAccessReview, out *LocalSubjectAccessReview, s conversion.Scope) error {
+ return autoConvert_authorization_LocalSubjectAccessReview_To_v1_LocalSubjectAccessReview(in, out, s)
+}
+
+func autoConvert_v1_NonResourceAttributes_To_authorization_NonResourceAttributes(in *NonResourceAttributes, out *authorization.NonResourceAttributes, s conversion.Scope) error {
+ out.Path = in.Path
+ out.Verb = in.Verb
+ return nil
+}
+
+// Convert_v1_NonResourceAttributes_To_authorization_NonResourceAttributes is an autogenerated conversion function.
+func Convert_v1_NonResourceAttributes_To_authorization_NonResourceAttributes(in *NonResourceAttributes, out *authorization.NonResourceAttributes, s conversion.Scope) error {
+ return autoConvert_v1_NonResourceAttributes_To_authorization_NonResourceAttributes(in, out, s)
+}
+
+func autoConvert_authorization_NonResourceAttributes_To_v1_NonResourceAttributes(in *authorization.NonResourceAttributes, out *NonResourceAttributes, s conversion.Scope) error {
+ out.Path = in.Path
+ out.Verb = in.Verb
+ return nil
+}
+
+// Convert_authorization_NonResourceAttributes_To_v1_NonResourceAttributes is an autogenerated conversion function.
+func Convert_authorization_NonResourceAttributes_To_v1_NonResourceAttributes(in *authorization.NonResourceAttributes, out *NonResourceAttributes, s conversion.Scope) error {
+ return autoConvert_authorization_NonResourceAttributes_To_v1_NonResourceAttributes(in, out, s)
+}
+
+func autoConvert_v1_ResourceAttributes_To_authorization_ResourceAttributes(in *ResourceAttributes, out *authorization.ResourceAttributes, s conversion.Scope) error {
+ out.Namespace = in.Namespace
+ out.Verb = in.Verb
+ out.Group = in.Group
+ out.Version = in.Version
+ out.Resource = in.Resource
+ out.Subresource = in.Subresource
+ out.Name = in.Name
+ return nil
+}
+
+// Convert_v1_ResourceAttributes_To_authorization_ResourceAttributes is an autogenerated conversion function.
+func Convert_v1_ResourceAttributes_To_authorization_ResourceAttributes(in *ResourceAttributes, out *authorization.ResourceAttributes, s conversion.Scope) error {
+ return autoConvert_v1_ResourceAttributes_To_authorization_ResourceAttributes(in, out, s)
+}
+
+func autoConvert_authorization_ResourceAttributes_To_v1_ResourceAttributes(in *authorization.ResourceAttributes, out *ResourceAttributes, s conversion.Scope) error {
+ out.Namespace = in.Namespace
+ out.Verb = in.Verb
+ out.Group = in.Group
+ out.Version = in.Version
+ out.Resource = in.Resource
+ out.Subresource = in.Subresource
+ out.Name = in.Name
+ return nil
+}
+
+// Convert_authorization_ResourceAttributes_To_v1_ResourceAttributes is an autogenerated conversion function.
+func Convert_authorization_ResourceAttributes_To_v1_ResourceAttributes(in *authorization.ResourceAttributes, out *ResourceAttributes, s conversion.Scope) error {
+ return autoConvert_authorization_ResourceAttributes_To_v1_ResourceAttributes(in, out, s)
+}
+
+func autoConvert_v1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview(in *SelfSubjectAccessReview, out *authorization.SelfSubjectAccessReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview is an autogenerated conversion function.
+func Convert_v1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview(in *SelfSubjectAccessReview, out *authorization.SelfSubjectAccessReview, s conversion.Scope) error {
+ return autoConvert_v1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview(in, out, s)
+}
+
+func autoConvert_authorization_SelfSubjectAccessReview_To_v1_SelfSubjectAccessReview(in *authorization.SelfSubjectAccessReview, out *SelfSubjectAccessReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_authorization_SelfSubjectAccessReviewSpec_To_v1_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_authorization_SelfSubjectAccessReview_To_v1_SelfSubjectAccessReview is an autogenerated conversion function.
+func Convert_authorization_SelfSubjectAccessReview_To_v1_SelfSubjectAccessReview(in *authorization.SelfSubjectAccessReview, out *SelfSubjectAccessReview, s conversion.Scope) error {
+ return autoConvert_authorization_SelfSubjectAccessReview_To_v1_SelfSubjectAccessReview(in, out, s)
+}
+
+func autoConvert_v1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(in *SelfSubjectAccessReviewSpec, out *authorization.SelfSubjectAccessReviewSpec, s conversion.Scope) error {
+ out.ResourceAttributes = (*authorization.ResourceAttributes)(unsafe.Pointer(in.ResourceAttributes))
+ out.NonResourceAttributes = (*authorization.NonResourceAttributes)(unsafe.Pointer(in.NonResourceAttributes))
+ return nil
+}
+
+// Convert_v1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec is an autogenerated conversion function.
+func Convert_v1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(in *SelfSubjectAccessReviewSpec, out *authorization.SelfSubjectAccessReviewSpec, s conversion.Scope) error {
+ return autoConvert_v1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(in, out, s)
+}
+
+func autoConvert_authorization_SelfSubjectAccessReviewSpec_To_v1_SelfSubjectAccessReviewSpec(in *authorization.SelfSubjectAccessReviewSpec, out *SelfSubjectAccessReviewSpec, s conversion.Scope) error {
+ out.ResourceAttributes = (*ResourceAttributes)(unsafe.Pointer(in.ResourceAttributes))
+ out.NonResourceAttributes = (*NonResourceAttributes)(unsafe.Pointer(in.NonResourceAttributes))
+ return nil
+}
+
+// Convert_authorization_SelfSubjectAccessReviewSpec_To_v1_SelfSubjectAccessReviewSpec is an autogenerated conversion function.
+func Convert_authorization_SelfSubjectAccessReviewSpec_To_v1_SelfSubjectAccessReviewSpec(in *authorization.SelfSubjectAccessReviewSpec, out *SelfSubjectAccessReviewSpec, s conversion.Scope) error {
+ return autoConvert_authorization_SelfSubjectAccessReviewSpec_To_v1_SelfSubjectAccessReviewSpec(in, out, s)
+}
+
+func autoConvert_v1_SubjectAccessReview_To_authorization_SubjectAccessReview(in *SubjectAccessReview, out *authorization.SubjectAccessReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_SubjectAccessReview_To_authorization_SubjectAccessReview is an autogenerated conversion function.
+func Convert_v1_SubjectAccessReview_To_authorization_SubjectAccessReview(in *SubjectAccessReview, out *authorization.SubjectAccessReview, s conversion.Scope) error {
+ return autoConvert_v1_SubjectAccessReview_To_authorization_SubjectAccessReview(in, out, s)
+}
+
+func autoConvert_authorization_SubjectAccessReview_To_v1_SubjectAccessReview(in *authorization.SubjectAccessReview, out *SubjectAccessReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_authorization_SubjectAccessReviewSpec_To_v1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_authorization_SubjectAccessReview_To_v1_SubjectAccessReview is an autogenerated conversion function.
+func Convert_authorization_SubjectAccessReview_To_v1_SubjectAccessReview(in *authorization.SubjectAccessReview, out *SubjectAccessReview, s conversion.Scope) error {
+ return autoConvert_authorization_SubjectAccessReview_To_v1_SubjectAccessReview(in, out, s)
+}
+
+func autoConvert_v1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(in *SubjectAccessReviewSpec, out *authorization.SubjectAccessReviewSpec, s conversion.Scope) error {
+ out.ResourceAttributes = (*authorization.ResourceAttributes)(unsafe.Pointer(in.ResourceAttributes))
+ out.NonResourceAttributes = (*authorization.NonResourceAttributes)(unsafe.Pointer(in.NonResourceAttributes))
+ out.User = in.User
+ out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups))
+ out.Extra = *(*map[string]authorization.ExtraValue)(unsafe.Pointer(&in.Extra))
+ return nil
+}
+
+// Convert_v1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec is an autogenerated conversion function.
+func Convert_v1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(in *SubjectAccessReviewSpec, out *authorization.SubjectAccessReviewSpec, s conversion.Scope) error {
+ return autoConvert_v1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(in, out, s)
+}
+
+func autoConvert_authorization_SubjectAccessReviewSpec_To_v1_SubjectAccessReviewSpec(in *authorization.SubjectAccessReviewSpec, out *SubjectAccessReviewSpec, s conversion.Scope) error {
+ out.ResourceAttributes = (*ResourceAttributes)(unsafe.Pointer(in.ResourceAttributes))
+ out.NonResourceAttributes = (*NonResourceAttributes)(unsafe.Pointer(in.NonResourceAttributes))
+ out.User = in.User
+ out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups))
+ out.Extra = *(*map[string]ExtraValue)(unsafe.Pointer(&in.Extra))
+ return nil
+}
+
+// Convert_authorization_SubjectAccessReviewSpec_To_v1_SubjectAccessReviewSpec is an autogenerated conversion function.
+func Convert_authorization_SubjectAccessReviewSpec_To_v1_SubjectAccessReviewSpec(in *authorization.SubjectAccessReviewSpec, out *SubjectAccessReviewSpec, s conversion.Scope) error {
+ return autoConvert_authorization_SubjectAccessReviewSpec_To_v1_SubjectAccessReviewSpec(in, out, s)
+}
+
+func autoConvert_v1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(in *SubjectAccessReviewStatus, out *authorization.SubjectAccessReviewStatus, s conversion.Scope) error {
+ out.Allowed = in.Allowed
+ out.Reason = in.Reason
+ out.EvaluationError = in.EvaluationError
+ return nil
+}
+
+// Convert_v1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus is an autogenerated conversion function.
+func Convert_v1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(in *SubjectAccessReviewStatus, out *authorization.SubjectAccessReviewStatus, s conversion.Scope) error {
+ return autoConvert_v1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(in, out, s)
+}
+
+func autoConvert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus(in *authorization.SubjectAccessReviewStatus, out *SubjectAccessReviewStatus, s conversion.Scope) error {
+ out.Allowed = in.Allowed
+ out.Reason = in.Reason
+ out.EvaluationError = in.EvaluationError
+ return nil
+}
+
+// Convert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus is an autogenerated conversion function.
+func Convert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus(in *authorization.SubjectAccessReviewStatus, out *SubjectAccessReviewStatus, s conversion.Scope) error {
+ return autoConvert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus(in, out, s)
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..bc04bed4d
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/zz_generated.deepcopy.go
@@ -0,0 +1,187 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_LocalSubjectAccessReview, InType: reflect.TypeOf(&LocalSubjectAccessReview{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NonResourceAttributes, InType: reflect.TypeOf(&NonResourceAttributes{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ResourceAttributes, InType: reflect.TypeOf(&ResourceAttributes{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SelfSubjectAccessReview, InType: reflect.TypeOf(&SelfSubjectAccessReview{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SelfSubjectAccessReviewSpec, InType: reflect.TypeOf(&SelfSubjectAccessReviewSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SubjectAccessReview, InType: reflect.TypeOf(&SubjectAccessReview{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SubjectAccessReviewSpec, InType: reflect.TypeOf(&SubjectAccessReviewSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SubjectAccessReviewStatus, InType: reflect.TypeOf(&SubjectAccessReviewStatus{})},
+ )
+}
+
+// DeepCopy_v1_LocalSubjectAccessReview is an autogenerated deepcopy function.
+func DeepCopy_v1_LocalSubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LocalSubjectAccessReview)
+ out := out.(*LocalSubjectAccessReview)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NonResourceAttributes is an autogenerated deepcopy function.
+func DeepCopy_v1_NonResourceAttributes(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NonResourceAttributes)
+ out := out.(*NonResourceAttributes)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_ResourceAttributes is an autogenerated deepcopy function.
+func DeepCopy_v1_ResourceAttributes(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceAttributes)
+ out := out.(*ResourceAttributes)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_SelfSubjectAccessReview is an autogenerated deepcopy function.
+func DeepCopy_v1_SelfSubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SelfSubjectAccessReview)
+ out := out.(*SelfSubjectAccessReview)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_SelfSubjectAccessReviewSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_SelfSubjectAccessReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SelfSubjectAccessReviewSpec)
+ out := out.(*SelfSubjectAccessReviewSpec)
+ *out = *in
+ if in.ResourceAttributes != nil {
+ in, out := &in.ResourceAttributes, &out.ResourceAttributes
+ *out = new(ResourceAttributes)
+ **out = **in
+ }
+ if in.NonResourceAttributes != nil {
+ in, out := &in.NonResourceAttributes, &out.NonResourceAttributes
+ *out = new(NonResourceAttributes)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_SubjectAccessReview is an autogenerated deepcopy function.
+func DeepCopy_v1_SubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SubjectAccessReview)
+ out := out.(*SubjectAccessReview)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_SubjectAccessReviewSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_SubjectAccessReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SubjectAccessReviewSpec)
+ out := out.(*SubjectAccessReviewSpec)
+ *out = *in
+ if in.ResourceAttributes != nil {
+ in, out := &in.ResourceAttributes, &out.ResourceAttributes
+ *out = new(ResourceAttributes)
+ **out = **in
+ }
+ if in.NonResourceAttributes != nil {
+ in, out := &in.NonResourceAttributes, &out.NonResourceAttributes
+ *out = new(NonResourceAttributes)
+ **out = **in
+ }
+ if in.Groups != nil {
+ in, out := &in.Groups, &out.Groups
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Extra != nil {
+ in, out := &in.Extra, &out.Extra
+ *out = make(map[string]ExtraValue)
+ for key, val := range *in {
+ if newVal, err := c.DeepCopy(&val); err != nil {
+ return err
+ } else {
+ (*out)[key] = *newVal.(*ExtraValue)
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_SubjectAccessReviewStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_SubjectAccessReviewStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SubjectAccessReviewStatus)
+ out := out.(*SubjectAccessReviewStatus)
+ *out = *in
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/zz_generated.defaults.go
new file mode 100644
index 000000000..6df448eb9
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1/zz_generated.defaults.go
@@ -0,0 +1,32 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/conversion.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/conversion.go
new file mode 100644
index 000000000..c40138365
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/conversion.go
@@ -0,0 +1,26 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) error {
+ // Add non-generated conversion functions
+ return scheme.AddConversionFuncs()
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/defaults.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/defaults.go
new file mode 100644
index 000000000..7d689a4cc
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/defaults.go
@@ -0,0 +1,25 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/doc.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/doc.go
new file mode 100644
index 000000000..738b0b6d2
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +groupName=authorization.k8s.io
+package v1beta1
diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/generated.pb.go
new file mode 100644
index 000000000..b2e66e619
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/generated.pb.go
@@ -0,0 +1,2364 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/authorization/v1beta1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1beta1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/authorization/v1beta1/generated.proto
+
+ It has these top-level messages:
+ ExtraValue
+ LocalSubjectAccessReview
+ NonResourceAttributes
+ ResourceAttributes
+ SelfSubjectAccessReview
+ SelfSubjectAccessReviewSpec
+ SubjectAccessReview
+ SubjectAccessReviewSpec
+ SubjectAccessReviewStatus
+*/
+package v1beta1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *ExtraValue) Reset() { *m = ExtraValue{} }
+func (*ExtraValue) ProtoMessage() {}
+func (*ExtraValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *LocalSubjectAccessReview) Reset() { *m = LocalSubjectAccessReview{} }
+func (*LocalSubjectAccessReview) ProtoMessage() {}
+func (*LocalSubjectAccessReview) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{1}
+}
+
+func (m *NonResourceAttributes) Reset() { *m = NonResourceAttributes{} }
+func (*NonResourceAttributes) ProtoMessage() {}
+func (*NonResourceAttributes) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
+
+func (m *ResourceAttributes) Reset() { *m = ResourceAttributes{} }
+func (*ResourceAttributes) ProtoMessage() {}
+func (*ResourceAttributes) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
+
+func (m *SelfSubjectAccessReview) Reset() { *m = SelfSubjectAccessReview{} }
+func (*SelfSubjectAccessReview) ProtoMessage() {}
+func (*SelfSubjectAccessReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
+
+func (m *SelfSubjectAccessReviewSpec) Reset() { *m = SelfSubjectAccessReviewSpec{} }
+func (*SelfSubjectAccessReviewSpec) ProtoMessage() {}
+func (*SelfSubjectAccessReviewSpec) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{5}
+}
+
+func (m *SubjectAccessReview) Reset() { *m = SubjectAccessReview{} }
+func (*SubjectAccessReview) ProtoMessage() {}
+func (*SubjectAccessReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
+
+func (m *SubjectAccessReviewSpec) Reset() { *m = SubjectAccessReviewSpec{} }
+func (*SubjectAccessReviewSpec) ProtoMessage() {}
+func (*SubjectAccessReviewSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
+
+func (m *SubjectAccessReviewStatus) Reset() { *m = SubjectAccessReviewStatus{} }
+func (*SubjectAccessReviewStatus) ProtoMessage() {}
+func (*SubjectAccessReviewStatus) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{8}
+}
+
+func init() {
+ proto.RegisterType((*ExtraValue)(nil), "k8s.io.client-go.pkg.apis.authorization.v1beta1.ExtraValue")
+ proto.RegisterType((*LocalSubjectAccessReview)(nil), "k8s.io.client-go.pkg.apis.authorization.v1beta1.LocalSubjectAccessReview")
+ proto.RegisterType((*NonResourceAttributes)(nil), "k8s.io.client-go.pkg.apis.authorization.v1beta1.NonResourceAttributes")
+ proto.RegisterType((*ResourceAttributes)(nil), "k8s.io.client-go.pkg.apis.authorization.v1beta1.ResourceAttributes")
+ proto.RegisterType((*SelfSubjectAccessReview)(nil), "k8s.io.client-go.pkg.apis.authorization.v1beta1.SelfSubjectAccessReview")
+ proto.RegisterType((*SelfSubjectAccessReviewSpec)(nil), "k8s.io.client-go.pkg.apis.authorization.v1beta1.SelfSubjectAccessReviewSpec")
+ proto.RegisterType((*SubjectAccessReview)(nil), "k8s.io.client-go.pkg.apis.authorization.v1beta1.SubjectAccessReview")
+ proto.RegisterType((*SubjectAccessReviewSpec)(nil), "k8s.io.client-go.pkg.apis.authorization.v1beta1.SubjectAccessReviewSpec")
+ proto.RegisterType((*SubjectAccessReviewStatus)(nil), "k8s.io.client-go.pkg.apis.authorization.v1beta1.SubjectAccessReviewStatus")
+}
+func (m ExtraValue) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m ExtraValue) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m) > 0 {
+ for _, s := range m {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *LocalSubjectAccessReview) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LocalSubjectAccessReview) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n2, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n3, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ return i, nil
+}
+
+func (m *NonResourceAttributes) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NonResourceAttributes) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i += copy(dAtA[i:], m.Path)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Verb)))
+ i += copy(dAtA[i:], m.Verb)
+ return i, nil
+}
+
+func (m *ResourceAttributes) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceAttributes) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
+ i += copy(dAtA[i:], m.Namespace)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Verb)))
+ i += copy(dAtA[i:], m.Verb)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group)))
+ i += copy(dAtA[i:], m.Group)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version)))
+ i += copy(dAtA[i:], m.Version)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource)))
+ i += copy(dAtA[i:], m.Resource)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Subresource)))
+ i += copy(dAtA[i:], m.Subresource)
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ return i, nil
+}
+
+func (m *SelfSubjectAccessReview) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SelfSubjectAccessReview) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n4, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n5, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n6, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ return i, nil
+}
+
+func (m *SelfSubjectAccessReviewSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SelfSubjectAccessReviewSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.ResourceAttributes != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ResourceAttributes.Size()))
+ n7, err := m.ResourceAttributes.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ }
+ if m.NonResourceAttributes != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NonResourceAttributes.Size()))
+ n8, err := m.NonResourceAttributes.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n8
+ }
+ return i, nil
+}
+
+func (m *SubjectAccessReview) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SubjectAccessReview) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n9, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n9
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n10, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n10
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n11, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n11
+ return i, nil
+}
+
+func (m *SubjectAccessReviewSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SubjectAccessReviewSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.ResourceAttributes != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ResourceAttributes.Size()))
+ n12, err := m.ResourceAttributes.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n12
+ }
+ if m.NonResourceAttributes != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NonResourceAttributes.Size()))
+ n13, err := m.NonResourceAttributes.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n13
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.User)))
+ i += copy(dAtA[i:], m.User)
+ if len(m.Groups) > 0 {
+ for _, s := range m.Groups {
+ dAtA[i] = 0x22
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Extra) > 0 {
+ keysForExtra := make([]string, 0, len(m.Extra))
+ for k := range m.Extra {
+ keysForExtra = append(keysForExtra, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
+ for _, k := range keysForExtra {
+ dAtA[i] = 0x2a
+ i++
+ v := m.Extra[string(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n14, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n14
+ }
+ }
+ return i, nil
+}
+
+func (m *SubjectAccessReviewStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SubjectAccessReviewStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ if m.Allowed {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.EvaluationError)))
+ i += copy(dAtA[i:], m.EvaluationError)
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m ExtraValue) Size() (n int) {
+ var l int
+ _ = l
+ if len(m) > 0 {
+ for _, s := range m {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *LocalSubjectAccessReview) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *NonResourceAttributes) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Verb)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ResourceAttributes) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Namespace)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Verb)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Group)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Version)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Resource)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Subresource)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *SelfSubjectAccessReview) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *SelfSubjectAccessReviewSpec) Size() (n int) {
+ var l int
+ _ = l
+ if m.ResourceAttributes != nil {
+ l = m.ResourceAttributes.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.NonResourceAttributes != nil {
+ l = m.NonResourceAttributes.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *SubjectAccessReview) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *SubjectAccessReviewSpec) Size() (n int) {
+ var l int
+ _ = l
+ if m.ResourceAttributes != nil {
+ l = m.ResourceAttributes.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.NonResourceAttributes != nil {
+ l = m.NonResourceAttributes.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ l = len(m.User)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Groups) > 0 {
+ for _, s := range m.Groups {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Extra) > 0 {
+ for k, v := range m.Extra {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *SubjectAccessReviewStatus) Size() (n int) {
+ var l int
+ _ = l
+ n += 2
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.EvaluationError)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *LocalSubjectAccessReview) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&LocalSubjectAccessReview{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SubjectAccessReviewSpec", "SubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NonResourceAttributes) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NonResourceAttributes{`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `Verb:` + fmt.Sprintf("%v", this.Verb) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceAttributes) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ResourceAttributes{`,
+ `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
+ `Verb:` + fmt.Sprintf("%v", this.Verb) + `,`,
+ `Group:` + fmt.Sprintf("%v", this.Group) + `,`,
+ `Version:` + fmt.Sprintf("%v", this.Version) + `,`,
+ `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`,
+ `Subresource:` + fmt.Sprintf("%v", this.Subresource) + `,`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SelfSubjectAccessReview) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SelfSubjectAccessReview{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SelfSubjectAccessReviewSpec", "SelfSubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SelfSubjectAccessReviewSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SelfSubjectAccessReviewSpec{`,
+ `ResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.ResourceAttributes), "ResourceAttributes", "ResourceAttributes", 1) + `,`,
+ `NonResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.NonResourceAttributes), "NonResourceAttributes", "NonResourceAttributes", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SubjectAccessReview) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SubjectAccessReview{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SubjectAccessReviewSpec", "SubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SubjectAccessReviewSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForExtra := make([]string, 0, len(this.Extra))
+ for k := range this.Extra {
+ keysForExtra = append(keysForExtra, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
+ mapStringForExtra := "map[string]ExtraValue{"
+ for _, k := range keysForExtra {
+ mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k])
+ }
+ mapStringForExtra += "}"
+ s := strings.Join([]string{`&SubjectAccessReviewSpec{`,
+ `ResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.ResourceAttributes), "ResourceAttributes", "ResourceAttributes", 1) + `,`,
+ `NonResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.NonResourceAttributes), "NonResourceAttributes", "NonResourceAttributes", 1) + `,`,
+ `User:` + fmt.Sprintf("%v", this.User) + `,`,
+ `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`,
+ `Extra:` + mapStringForExtra + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SubjectAccessReviewStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SubjectAccessReviewStatus{`,
+ `Allowed:` + fmt.Sprintf("%v", this.Allowed) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `EvaluationError:` + fmt.Sprintf("%v", this.EvaluationError) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *ExtraValue) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExtraValue: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExtraValue: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ *m = append(*m, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LocalSubjectAccessReview) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LocalSubjectAccessReview: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LocalSubjectAccessReview: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NonResourceAttributes) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NonResourceAttributes: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NonResourceAttributes: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Verb", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Verb = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceAttributes) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceAttributes: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceAttributes: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Namespace = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Verb", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Verb = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Group = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Version = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Resource = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Subresource", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Subresource = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SelfSubjectAccessReview) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SelfSubjectAccessReview: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SelfSubjectAccessReview: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SelfSubjectAccessReviewSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SelfSubjectAccessReviewSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SelfSubjectAccessReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceAttributes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ResourceAttributes == nil {
+ m.ResourceAttributes = &ResourceAttributes{}
+ }
+ if err := m.ResourceAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NonResourceAttributes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.NonResourceAttributes == nil {
+ m.NonResourceAttributes = &NonResourceAttributes{}
+ }
+ if err := m.NonResourceAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SubjectAccessReview) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SubjectAccessReview: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SubjectAccessReview: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SubjectAccessReviewSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SubjectAccessReviewSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SubjectAccessReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceAttributes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ResourceAttributes == nil {
+ m.ResourceAttributes = &ResourceAttributes{}
+ }
+ if err := m.ResourceAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NonResourceAttributes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.NonResourceAttributes == nil {
+ m.NonResourceAttributes = &NonResourceAttributes{}
+ }
+ if err := m.NonResourceAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.User = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Extra", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Extra == nil {
+ m.Extra = make(map[string]ExtraValue)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &ExtraValue{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Extra[mapkey] = *mapvalue
+ } else {
+ var mapvalue ExtraValue
+ m.Extra[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SubjectAccessReviewStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SubjectAccessReviewStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SubjectAccessReviewStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Allowed", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Allowed = bool(v != 0)
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field EvaluationError", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.EvaluationError = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/client-go/pkg/apis/authorization/v1beta1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 886 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4f, 0x6f, 0xdc, 0x44,
+ 0x14, 0x5f, 0xef, 0x9f, 0x64, 0x77, 0x02, 0xa4, 0x4c, 0x55, 0xe2, 0x06, 0xc9, 0xbb, 0x5a, 0x24,
+ 0x14, 0x24, 0x6a, 0x37, 0xe5, 0x5f, 0x55, 0x71, 0x20, 0x16, 0x51, 0x55, 0x41, 0x0b, 0x9a, 0x40,
+ 0x0e, 0x70, 0x61, 0xec, 0xbc, 0xee, 0x9a, 0xdd, 0xf5, 0x58, 0x33, 0x63, 0x97, 0x70, 0xea, 0x07,
+ 0xe0, 0xc0, 0xb1, 0x47, 0xbe, 0x02, 0x5f, 0x80, 0x2b, 0x39, 0xf6, 0x58, 0x24, 0xb4, 0x22, 0xe6,
+ 0x5b, 0x70, 0x42, 0x33, 0x9e, 0x5d, 0x67, 0xbb, 0x0e, 0xd5, 0x42, 0x11, 0x1c, 0x72, 0xb3, 0xdf,
+ 0xfb, 0xbd, 0xdf, 0xfb, 0xcd, 0x9b, 0x37, 0xf3, 0x06, 0x7d, 0x30, 0xba, 0x29, 0xdc, 0x88, 0x79,
+ 0xa3, 0x34, 0x00, 0x1e, 0x83, 0x04, 0xe1, 0x25, 0xa3, 0x81, 0x47, 0x93, 0x48, 0x78, 0x34, 0x95,
+ 0x43, 0xc6, 0xa3, 0x6f, 0xa9, 0x8c, 0x58, 0xec, 0x65, 0xbb, 0x01, 0x48, 0xba, 0xeb, 0x0d, 0x20,
+ 0x06, 0x4e, 0x25, 0x1c, 0xb9, 0x09, 0x67, 0x92, 0xe1, 0xeb, 0x05, 0x83, 0x5b, 0x32, 0xb8, 0xc9,
+ 0x68, 0xe0, 0x2a, 0x06, 0x77, 0x81, 0xc1, 0x35, 0x0c, 0xdb, 0xd7, 0x06, 0x91, 0x1c, 0xa6, 0x81,
+ 0x1b, 0xb2, 0x89, 0x37, 0x60, 0x03, 0xe6, 0x69, 0xa2, 0x20, 0xbd, 0xaf, 0xff, 0xf4, 0x8f, 0xfe,
+ 0x2a, 0x12, 0x6c, 0xbf, 0x6d, 0x24, 0xd2, 0x24, 0x9a, 0xd0, 0x70, 0x18, 0xc5, 0xc0, 0x8f, 0x4b,
+ 0x91, 0x13, 0x90, 0xd4, 0xcb, 0x96, 0x64, 0x6d, 0x7b, 0xe7, 0x45, 0xf1, 0x34, 0x96, 0xd1, 0x04,
+ 0x96, 0x02, 0xde, 0x7d, 0x56, 0x80, 0x08, 0x87, 0x30, 0xa1, 0x4b, 0x71, 0x6f, 0x9d, 0x17, 0x97,
+ 0xca, 0x68, 0xec, 0x45, 0xb1, 0x14, 0x92, 0x3f, 0x1d, 0xd4, 0x7f, 0x0f, 0xa1, 0xfd, 0x6f, 0x24,
+ 0xa7, 0x87, 0x74, 0x9c, 0x02, 0xee, 0xa2, 0x56, 0x24, 0x61, 0x22, 0x6c, 0xab, 0xd7, 0xd8, 0xe9,
+ 0xf8, 0x9d, 0x7c, 0xda, 0x6d, 0xdd, 0x51, 0x06, 0x52, 0xd8, 0x6f, 0xb5, 0x1f, 0xfd, 0xd0, 0xad,
+ 0x3d, 0xfc, 0xb5, 0x57, 0xeb, 0x4f, 0xeb, 0xc8, 0xfe, 0x98, 0x85, 0x74, 0x7c, 0x90, 0x06, 0x5f,
+ 0x43, 0x28, 0xf7, 0xc2, 0x10, 0x84, 0x20, 0x90, 0x45, 0xf0, 0x00, 0x7f, 0x85, 0xda, 0xaa, 0x1c,
+ 0x47, 0x54, 0x52, 0xdb, 0xea, 0x59, 0x3b, 0x1b, 0x37, 0xae, 0xbb, 0x66, 0x77, 0xce, 0xaa, 0x2b,
+ 0xf7, 0x47, 0xa1, 0xdd, 0x6c, 0xd7, 0xfd, 0x44, 0x73, 0xdd, 0x05, 0x49, 0x7d, 0x7c, 0x32, 0xed,
+ 0xd6, 0xf2, 0x69, 0x17, 0x95, 0x36, 0x32, 0x67, 0xc5, 0x23, 0xd4, 0x14, 0x09, 0x84, 0x76, 0x5d,
+ 0xb3, 0xdf, 0x71, 0x57, 0xdd, 0x7b, 0xb7, 0x42, 0xf6, 0x41, 0x02, 0xa1, 0xff, 0x82, 0x49, 0xdb,
+ 0x54, 0x7f, 0x44, 0x27, 0xc1, 0x02, 0xad, 0x09, 0x49, 0x65, 0x2a, 0xec, 0x86, 0x4e, 0xf7, 0xd1,
+ 0xf3, 0x49, 0xa7, 0x29, 0xfd, 0x97, 0x4c, 0xc2, 0xb5, 0xe2, 0x9f, 0x98, 0x54, 0xfd, 0x2f, 0xd1,
+ 0x95, 0x7b, 0x2c, 0x26, 0x20, 0x58, 0xca, 0x43, 0xd8, 0x93, 0x92, 0x47, 0x41, 0x2a, 0x41, 0xe0,
+ 0x1e, 0x6a, 0x26, 0x54, 0x0e, 0x75, 0x61, 0x3b, 0xa5, 0xde, 0x4f, 0xa9, 0x1c, 0x12, 0xed, 0x51,
+ 0x88, 0x0c, 0x78, 0xa0, 0x8b, 0x73, 0x06, 0x71, 0x08, 0x3c, 0x20, 0xda, 0xd3, 0xff, 0xa9, 0x8e,
+ 0x70, 0x05, 0xb5, 0x87, 0x3a, 0x31, 0x9d, 0x80, 0x48, 0x68, 0x08, 0x86, 0xff, 0x65, 0x13, 0xdd,
+ 0xb9, 0x37, 0x73, 0x90, 0x12, 0xf3, 0xec, 0x4c, 0xf8, 0x35, 0xd4, 0x1a, 0x70, 0x96, 0x26, 0xba,
+ 0x74, 0x1d, 0xff, 0x45, 0x03, 0x69, 0xdd, 0x56, 0x46, 0x52, 0xf8, 0xf0, 0x1b, 0x68, 0x3d, 0x03,
+ 0x2e, 0x22, 0x16, 0xdb, 0x4d, 0x0d, 0xdb, 0x34, 0xb0, 0xf5, 0xc3, 0xc2, 0x4c, 0x66, 0x7e, 0xfc,
+ 0x26, 0x6a, 0x73, 0x23, 0xdc, 0x6e, 0x69, 0xec, 0x25, 0x83, 0x6d, 0xcf, 0x16, 0x44, 0xe6, 0x08,
+ 0xfc, 0x0e, 0xda, 0x10, 0x69, 0x30, 0x0f, 0x58, 0xd3, 0x01, 0x97, 0x4d, 0xc0, 0xc6, 0x41, 0xe9,
+ 0x22, 0x67, 0x71, 0x6a, 0x59, 0x6a, 0x8d, 0xf6, 0xfa, 0xe2, 0xb2, 0x54, 0x09, 0x88, 0xf6, 0xf4,
+ 0x4f, 0xeb, 0x68, 0xeb, 0x00, 0xc6, 0xf7, 0xff, 0x9b, 0xee, 0x67, 0x0b, 0xdd, 0x7f, 0xf7, 0x6f,
+ 0xb4, 0x63, 0xb5, 0xf4, 0xff, 0xd7, 0x09, 0xf8, 0xb9, 0x8e, 0x5e, 0xfd, 0x0b, 0xa1, 0xf8, 0x3b,
+ 0x0b, 0x61, 0xbe, 0xd4, 0xc4, 0xa6, 0xe4, 0x1f, 0xae, 0xae, 0x70, 0xf9, 0x40, 0xf8, 0xaf, 0xe4,
+ 0xd3, 0x6e, 0xc5, 0x41, 0x21, 0x15, 0x79, 0xf1, 0x23, 0x0b, 0x5d, 0x89, 0xab, 0x4e, 0xac, 0xd9,
+ 0xa6, 0xdb, 0xab, 0x2b, 0xaa, 0xbc, 0x00, 0xfc, 0xab, 0xf9, 0xb4, 0x5b, 0x7d, 0x37, 0x90, 0x6a,
+ 0x01, 0xfd, 0x5f, 0xea, 0xe8, 0xf2, 0xc5, 0x3d, 0xfd, 0xef, 0x74, 0xe9, 0x1f, 0x4d, 0xb4, 0x75,
+ 0xd1, 0xa1, 0xff, 0xb0, 0x43, 0xe7, 0x83, 0xa4, 0xb1, 0x78, 0xe3, 0x7e, 0x2e, 0x80, 0x9b, 0x41,
+ 0xd2, 0x9b, 0x0d, 0x92, 0xa6, 0x7e, 0x9b, 0x20, 0xb5, 0x15, 0x7a, 0x88, 0x88, 0xd9, 0x14, 0x39,
+ 0x46, 0x2d, 0x50, 0x6f, 0x19, 0xbb, 0xd5, 0x6b, 0xec, 0x6c, 0xdc, 0xf8, 0xec, 0xb9, 0x35, 0x9b,
+ 0xab, 0x9f, 0x48, 0xfb, 0xb1, 0xe4, 0xc7, 0xe5, 0x00, 0xd3, 0x36, 0x52, 0x64, 0xdc, 0xce, 0xcc,
+ 0x33, 0x4a, 0x63, 0xf0, 0x25, 0xd4, 0x18, 0xc1, 0x71, 0x31, 0x40, 0x89, 0xfa, 0xc4, 0x04, 0xb5,
+ 0x32, 0xf5, 0xc2, 0x32, 0x85, 0x7e, 0x7f, 0x75, 0x69, 0xe5, 0x2b, 0x8d, 0x14, 0x54, 0xb7, 0xea,
+ 0x37, 0xad, 0xfe, 0x8f, 0x16, 0xba, 0x7a, 0x6e, 0xcb, 0xaa, 0xb1, 0x4a, 0xc7, 0x63, 0xf6, 0x00,
+ 0x8e, 0xb4, 0x96, 0x76, 0x39, 0x56, 0xf7, 0x0a, 0x33, 0x99, 0xf9, 0xf1, 0xeb, 0x68, 0x8d, 0x03,
+ 0x15, 0x2c, 0x36, 0xa3, 0x7c, 0xde, 0xed, 0x44, 0x5b, 0x89, 0xf1, 0xe2, 0x3d, 0xb4, 0x09, 0x2a,
+ 0xbd, 0x16, 0xb7, 0xcf, 0x39, 0xe3, 0x66, 0xcb, 0xb6, 0x4c, 0xc0, 0xe6, 0xfe, 0xa2, 0x9b, 0x3c,
+ 0x8d, 0xf7, 0xaf, 0x9d, 0x9c, 0x3a, 0xb5, 0xc7, 0xa7, 0x4e, 0xed, 0xc9, 0xa9, 0x53, 0x7b, 0x98,
+ 0x3b, 0xd6, 0x49, 0xee, 0x58, 0x8f, 0x73, 0xc7, 0x7a, 0x92, 0x3b, 0xd6, 0x6f, 0xb9, 0x63, 0x7d,
+ 0xff, 0xbb, 0x53, 0xfb, 0x62, 0xdd, 0x2c, 0xfc, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x24, 0x8e,
+ 0x13, 0x84, 0x19, 0x0c, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/generated.proto
new file mode 100644
index 000000000..104e3573c
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/generated.proto
@@ -0,0 +1,183 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.client_go.pkg.apis.authorization.v1beta1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1beta1";
+
+// ExtraValue masks the value so protobuf can generate
+// +protobuf.nullable=true
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+message ExtraValue {
+ // items, if empty, will result in an empty slice
+
+ repeated string items = 1;
+}
+
+// LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace.
+// Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions
+// checking.
+message LocalSubjectAccessReview {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace
+ // you made the request against. If empty, it is defaulted.
+ optional SubjectAccessReviewSpec spec = 2;
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ // +optional
+ optional SubjectAccessReviewStatus status = 3;
+}
+
+// NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface
+message NonResourceAttributes {
+ // Path is the URL path of the request
+ // +optional
+ optional string path = 1;
+
+ // Verb is the standard HTTP verb
+ // +optional
+ optional string verb = 2;
+}
+
+// ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface
+message ResourceAttributes {
+ // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces
+ // "" (empty) is defaulted for LocalSubjectAccessReviews
+ // "" (empty) is empty for cluster-scoped resources
+ // "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
+ // +optional
+ optional string namespace = 1;
+
+ // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all.
+ // +optional
+ optional string verb = 2;
+
+ // Group is the API Group of the Resource. "*" means all.
+ // +optional
+ optional string group = 3;
+
+ // Version is the API Version of the Resource. "*" means all.
+ // +optional
+ optional string version = 4;
+
+ // Resource is one of the existing resource types. "*" means all.
+ // +optional
+ optional string resource = 5;
+
+ // Subresource is one of the existing resource types. "" means none.
+ // +optional
+ optional string subresource = 6;
+
+ // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all.
+ // +optional
+ optional string name = 7;
+}
+
+// SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a
+// spec.namespace means "in all namespaces". Self is a special case, because users should always be able
+// to check whether they can perform an action
+message SelfSubjectAccessReview {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec holds information about the request being evaluated. user and groups must be empty
+ optional SelfSubjectAccessReviewSpec spec = 2;
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ // +optional
+ optional SubjectAccessReviewStatus status = 3;
+}
+
+// SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
+// and NonResourceAuthorizationAttributes must be set
+message SelfSubjectAccessReviewSpec {
+ // ResourceAuthorizationAttributes describes information for a resource access request
+ // +optional
+ optional ResourceAttributes resourceAttributes = 1;
+
+ // NonResourceAttributes describes information for a non-resource access request
+ // +optional
+ optional NonResourceAttributes nonResourceAttributes = 2;
+}
+
+// SubjectAccessReview checks whether or not a user or group can perform an action.
+message SubjectAccessReview {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec holds information about the request being evaluated
+ optional SubjectAccessReviewSpec spec = 2;
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ // +optional
+ optional SubjectAccessReviewStatus status = 3;
+}
+
+// SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
+// and NonResourceAuthorizationAttributes must be set
+message SubjectAccessReviewSpec {
+ // ResourceAuthorizationAttributes describes information for a resource access request
+ // +optional
+ optional ResourceAttributes resourceAttributes = 1;
+
+ // NonResourceAttributes describes information for a non-resource access request
+ // +optional
+ optional NonResourceAttributes nonResourceAttributes = 2;
+
+ // User is the user you're testing for.
+ // If you specify "User" but not "Group", then is it interpreted as "What if User were not a member of any groups
+ // +optional
+ optional string verb = 3;
+
+ // Groups is the groups you're testing for.
+ // +optional
+ repeated string group = 4;
+
+ // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer
+ // it needs a reflection here.
+ // +optional
+ map<string, ExtraValue> extra = 5;
+}
+
+// SubjectAccessReviewStatus
+message SubjectAccessReviewStatus {
+ // Allowed is required. True if the action would be allowed, false otherwise.
+ optional bool allowed = 1;
+
+ // Reason is optional. It indicates why a request was allowed or denied.
+ // +optional
+ optional string reason = 2;
+
+ // EvaluationError is an indication that some error occurred during the authorization check.
+ // It is entirely possible to get an error and be able to continue determine authorization status in spite of it.
+ // For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.
+ // +optional
+ optional string evaluationError = 3;
+}
+
diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/register.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/register.go
new file mode 100644
index 000000000..599501cd0
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/register.go
@@ -0,0 +1,61 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "authorization.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &SelfSubjectAccessReview{},
+ &SubjectAccessReview{},
+ &LocalSubjectAccessReview{},
+ )
+
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/types.generated.go
new file mode 100644
index 000000000..939603c58
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/types.generated.go
@@ -0,0 +1,3233 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1beta1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ pkg2_types "k8s.io/apimachinery/pkg/types"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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 pkg1_v1.TypeMeta
+ var v1 pkg2_types.UID
+ var v2 time.Time
+ _, _, _ = v0, v1, v2
+ }
+}
+
+func (x *SubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[4] = true
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SubjectAccessReview) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = SubjectAccessReviewSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = SubjectAccessReviewSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *SelfSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[4] = true
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SelfSubjectAccessReview) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SelfSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = SelfSubjectAccessReviewSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = SelfSubjectAccessReviewSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *LocalSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[4] = true
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *LocalSubjectAccessReview) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *LocalSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = SubjectAccessReviewSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = SubjectAccessReviewSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ResourceAttributes) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [7]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Namespace != ""
+ yyq2[1] = x.Verb != ""
+ yyq2[2] = x.Group != ""
+ yyq2[3] = x.Version != ""
+ yyq2[4] = x.Resource != ""
+ yyq2[5] = x.Subresource != ""
+ yyq2[6] = x.Name != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(7)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("namespace"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Verb))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("verb"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Verb))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Group))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("group"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Group))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Version))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("version"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Version))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Resource))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resource"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Resource))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Subresource))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("subresource"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Subresource))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ResourceAttributes) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ResourceAttributes) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "verb":
+ if r.TryDecodeAsNil() {
+ x.Verb = ""
+ } else {
+ yyv6 := &x.Verb
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "group":
+ if r.TryDecodeAsNil() {
+ x.Group = ""
+ } else {
+ yyv8 := &x.Group
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "version":
+ if r.TryDecodeAsNil() {
+ x.Version = ""
+ } else {
+ yyv10 := &x.Version
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "resource":
+ if r.TryDecodeAsNil() {
+ x.Resource = ""
+ } else {
+ yyv12 := &x.Resource
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ case "subresource":
+ if r.TryDecodeAsNil() {
+ x.Subresource = ""
+ } else {
+ yyv14 := &x.Subresource
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv16 := &x.Name
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ResourceAttributes) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj18 int
+ var yyb18 bool
+ var yyhl18 bool = l >= 0
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Namespace = ""
+ } else {
+ yyv19 := &x.Namespace
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Verb = ""
+ } else {
+ yyv21 := &x.Verb
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Group = ""
+ } else {
+ yyv23 := &x.Group
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*string)(yyv23)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Version = ""
+ } else {
+ yyv25 := &x.Version
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*string)(yyv25)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Resource = ""
+ } else {
+ yyv27 := &x.Resource
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*string)(yyv27)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Subresource = ""
+ } else {
+ yyv29 := &x.Subresource
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*string)(yyv29)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv31 := &x.Name
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*string)(yyv31)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj18-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NonResourceAttributes) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Path != ""
+ yyq2[1] = x.Verb != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("path"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Verb))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("verb"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Verb))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NonResourceAttributes) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NonResourceAttributes) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv4 := &x.Path
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "verb":
+ if r.TryDecodeAsNil() {
+ x.Verb = ""
+ } else {
+ yyv6 := &x.Verb
+ 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_containerMapEnd1234)
+}
+
+func (x *NonResourceAttributes) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv9 := &x.Path
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Verb = ""
+ } else {
+ yyv11 := &x.Verb
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *SubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.ResourceAttributes != nil
+ yyq2[1] = x.NonResourceAttributes != nil
+ yyq2[2] = x.User != ""
+ yyq2[3] = len(x.Groups) != 0
+ yyq2[4] = len(x.Extra) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.ResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.ResourceAttributes.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resourceAttributes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.ResourceAttributes.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.NonResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.NonResourceAttributes.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nonResourceAttributes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NonResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.NonResourceAttributes.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.User))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("user"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.User))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Groups == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Groups, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("group"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Groups == nil {
+ r.EncodeNil()
+ } else {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Groups, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.Extra == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("extra"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Extra == nil {
+ r.EncodeNil()
+ } else {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SubjectAccessReviewSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SubjectAccessReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "resourceAttributes":
+ if r.TryDecodeAsNil() {
+ if x.ResourceAttributes != nil {
+ x.ResourceAttributes = nil
+ }
+ } else {
+ if x.ResourceAttributes == nil {
+ x.ResourceAttributes = new(ResourceAttributes)
+ }
+ x.ResourceAttributes.CodecDecodeSelf(d)
+ }
+ case "nonResourceAttributes":
+ if r.TryDecodeAsNil() {
+ if x.NonResourceAttributes != nil {
+ x.NonResourceAttributes = nil
+ }
+ } else {
+ if x.NonResourceAttributes == nil {
+ x.NonResourceAttributes = new(NonResourceAttributes)
+ }
+ x.NonResourceAttributes.CodecDecodeSelf(d)
+ }
+ case "user":
+ if r.TryDecodeAsNil() {
+ x.User = ""
+ } else {
+ yyv6 := &x.User
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "group":
+ if r.TryDecodeAsNil() {
+ x.Groups = nil
+ } else {
+ yyv8 := &x.Groups
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv8, false, d)
+ }
+ }
+ case "extra":
+ if r.TryDecodeAsNil() {
+ x.Extra = nil
+ } else {
+ yyv10 := &x.Extra
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decMapstringExtraValue((*map[string]ExtraValue)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SubjectAccessReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ResourceAttributes != nil {
+ x.ResourceAttributes = nil
+ }
+ } else {
+ if x.ResourceAttributes == nil {
+ x.ResourceAttributes = new(ResourceAttributes)
+ }
+ x.ResourceAttributes.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.NonResourceAttributes != nil {
+ x.NonResourceAttributes = nil
+ }
+ } else {
+ if x.NonResourceAttributes == nil {
+ x.NonResourceAttributes = new(NonResourceAttributes)
+ }
+ x.NonResourceAttributes.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.User = ""
+ } else {
+ yyv15 := &x.User
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Groups = nil
+ } else {
+ yyv17 := &x.Groups
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv17, false, d)
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Extra = nil
+ } else {
+ yyv19 := &x.Extra
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decMapstringExtraValue((*map[string]ExtraValue)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x ExtraValue) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 {
+ h.encExtraValue((ExtraValue)(x), e)
+ }
+ }
+}
+
+func (x *ExtraValue) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ h.decExtraValue((*ExtraValue)(x), d)
+ }
+}
+
+func (x *SelfSubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.ResourceAttributes != nil
+ yyq2[1] = x.NonResourceAttributes != 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.ResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.ResourceAttributes.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resourceAttributes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.ResourceAttributes.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.NonResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.NonResourceAttributes.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nonResourceAttributes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NonResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.NonResourceAttributes.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SelfSubjectAccessReviewSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SelfSubjectAccessReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "resourceAttributes":
+ if r.TryDecodeAsNil() {
+ if x.ResourceAttributes != nil {
+ x.ResourceAttributes = nil
+ }
+ } else {
+ if x.ResourceAttributes == nil {
+ x.ResourceAttributes = new(ResourceAttributes)
+ }
+ x.ResourceAttributes.CodecDecodeSelf(d)
+ }
+ case "nonResourceAttributes":
+ if r.TryDecodeAsNil() {
+ if x.NonResourceAttributes != nil {
+ x.NonResourceAttributes = nil
+ }
+ } else {
+ if x.NonResourceAttributes == nil {
+ x.NonResourceAttributes = new(NonResourceAttributes)
+ }
+ x.NonResourceAttributes.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SelfSubjectAccessReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ResourceAttributes != nil {
+ x.ResourceAttributes = nil
+ }
+ } else {
+ if x.ResourceAttributes == nil {
+ x.ResourceAttributes = new(ResourceAttributes)
+ }
+ x.ResourceAttributes.CodecDecodeSelf(d)
+ }
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.NonResourceAttributes != nil {
+ x.NonResourceAttributes = nil
+ }
+ } else {
+ if x.NonResourceAttributes == nil {
+ x.NonResourceAttributes = new(NonResourceAttributes)
+ }
+ x.NonResourceAttributes.CodecDecodeSelf(d)
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *SubjectAccessReviewStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.Reason != ""
+ yyq2[2] = x.EvaluationError != ""
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Allowed))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("allowed"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Allowed))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.EvaluationError))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("evaluationError"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.EvaluationError))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SubjectAccessReviewStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SubjectAccessReviewStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "allowed":
+ if r.TryDecodeAsNil() {
+ x.Allowed = false
+ } else {
+ yyv4 := &x.Allowed
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*bool)(yyv4)) = r.DecodeBool()
+ }
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv6 := &x.Reason
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "evaluationError":
+ if r.TryDecodeAsNil() {
+ x.EvaluationError = ""
+ } else {
+ yyv8 := &x.EvaluationError
+ 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_containerMapEnd1234)
+}
+
+func (x *SubjectAccessReviewStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Allowed = false
+ } else {
+ yyv11 := &x.Allowed
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*bool)(yyv11)) = r.DecodeBool()
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv13 := &x.Reason
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.EvaluationError = ""
+ } else {
+ yyv15 := &x.EvaluationError
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encMapstringExtraValue(v map[string]ExtraValue, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeMapStart(len(v))
+ for yyk1, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ yym2 := z.EncBinary()
+ _ = yym2
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yyk1))
+ }
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyv1 == nil {
+ r.EncodeNil()
+ } else {
+ yyv1.CodecEncodeSelf(e)
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) decMapstringExtraValue(v *map[string]ExtraValue, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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, 40)
+ yyv1 = make(map[string]ExtraValue, yyrl1)
+ *v = yyv1
+ }
+ var yymk1 string
+ var yymv1 ExtraValue
+ var yymg1 bool
+ if yybh1.MapValueReset {
+ yymg1 = true
+ }
+ if yyl1 > 0 {
+ for yyj1 := 0; yyj1 < yyl1; yyj1++ {
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ if r.TryDecodeAsNil() {
+ yymk1 = ""
+ } else {
+ yyv2 := &yymk1
+ yym3 := z.DecBinary()
+ _ = yym3
+ if false {
+ } else {
+ *((*string)(yyv2)) = r.DecodeString()
+ }
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv4 := &yymv1
+ yyv4.CodecDecodeSelf(d)
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } else if yyl1 < 0 {
+ for yyj1 := 0; !r.CheckBreak(); yyj1++ {
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ if r.TryDecodeAsNil() {
+ yymk1 = ""
+ } else {
+ yyv5 := &yymk1
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*string)(yyv5)) = r.DecodeString()
+ }
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv7 := &yymv1
+ yyv7.CodecDecodeSelf(d)
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } // else len==0: TODO: Should we clear map entries?
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) encExtraValue(v ExtraValue, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym2 := z.EncBinary()
+ _ = yym2
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yyv1))
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decExtraValue(v *ExtraValue, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []string{}
+ 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) {
+
+ yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]string, yyrl1)
+ }
+ } else {
+ yyv1 = make([]string, yyrl1)
+ }
+ yyc1 = true
+ yyrr1 = len(yyv1)
+ } else if yyl1 != len(yyv1) {
+ yyv1 = yyv1[:yyl1]
+ yyc1 = true
+ }
+ yyj1 := 0
+ for ; yyj1 < yyrr1; yyj1++ {
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yym3 := z.DecBinary()
+ _ = yym3
+ if false {
+ } else {
+ *((*string)(yyv2)) = r.DecodeString()
+ }
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv4 := &yyv1[yyj1]
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, "") // var yyz1 string
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv6 := &yyv1[yyj1]
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+
+ } else {
+ z.DecSwallow()
+ }
+
+ }
+ if yyj1 < len(yyv1) {
+ yyv1 = yyv1[:yyj1]
+ yyc1 = true
+ } else if yyj1 == 0 && yyv1 == nil {
+ yyv1 = []string{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/types.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/types.go
new file mode 100644
index 000000000..8a1727423
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/types.go
@@ -0,0 +1,176 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "fmt"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+// +noMethods=true
+
+// SubjectAccessReview checks whether or not a user or group can perform an action.
+type SubjectAccessReview struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec holds information about the request being evaluated
+ Spec SubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ // +optional
+ Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// +genclient=true
+// +nonNamespaced=true
+// +noMethods=true
+
+// SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a
+// spec.namespace means "in all namespaces". Self is a special case, because users should always be able
+// to check whether they can perform an action
+type SelfSubjectAccessReview struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec holds information about the request being evaluated. user and groups must be empty
+ Spec SelfSubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ // +optional
+ Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// +genclient=true
+// +noMethods=true
+
+// LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace.
+// Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions
+// checking.
+type LocalSubjectAccessReview struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace
+ // you made the request against. If empty, it is defaulted.
+ Spec SubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ // +optional
+ Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface
+type ResourceAttributes struct {
+ // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces
+ // "" (empty) is defaulted for LocalSubjectAccessReviews
+ // "" (empty) is empty for cluster-scoped resources
+ // "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
+ // +optional
+ Namespace string `json:"namespace,omitempty" protobuf:"bytes,1,opt,name=namespace"`
+ // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all.
+ // +optional
+ Verb string `json:"verb,omitempty" protobuf:"bytes,2,opt,name=verb"`
+ // Group is the API Group of the Resource. "*" means all.
+ // +optional
+ Group string `json:"group,omitempty" protobuf:"bytes,3,opt,name=group"`
+ // Version is the API Version of the Resource. "*" means all.
+ // +optional
+ Version string `json:"version,omitempty" protobuf:"bytes,4,opt,name=version"`
+ // Resource is one of the existing resource types. "*" means all.
+ // +optional
+ Resource string `json:"resource,omitempty" protobuf:"bytes,5,opt,name=resource"`
+ // Subresource is one of the existing resource types. "" means none.
+ // +optional
+ Subresource string `json:"subresource,omitempty" protobuf:"bytes,6,opt,name=subresource"`
+ // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all.
+ // +optional
+ Name string `json:"name,omitempty" protobuf:"bytes,7,opt,name=name"`
+}
+
+// NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface
+type NonResourceAttributes struct {
+ // Path is the URL path of the request
+ // +optional
+ Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"`
+ // Verb is the standard HTTP verb
+ // +optional
+ Verb string `json:"verb,omitempty" protobuf:"bytes,2,opt,name=verb"`
+}
+
+// SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
+// and NonResourceAuthorizationAttributes must be set
+type SubjectAccessReviewSpec struct {
+ // ResourceAuthorizationAttributes describes information for a resource access request
+ // +optional
+ ResourceAttributes *ResourceAttributes `json:"resourceAttributes,omitempty" protobuf:"bytes,1,opt,name=resourceAttributes"`
+ // NonResourceAttributes describes information for a non-resource access request
+ // +optional
+ NonResourceAttributes *NonResourceAttributes `json:"nonResourceAttributes,omitempty" protobuf:"bytes,2,opt,name=nonResourceAttributes"`
+
+ // User is the user you're testing for.
+ // If you specify "User" but not "Group", then is it interpreted as "What if User were not a member of any groups
+ // +optional
+ User string `json:"user,omitempty" protobuf:"bytes,3,opt,name=verb"`
+ // Groups is the groups you're testing for.
+ // +optional
+ Groups []string `json:"group,omitempty" protobuf:"bytes,4,rep,name=group"`
+ // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer
+ // it needs a reflection here.
+ // +optional
+ Extra map[string]ExtraValue `json:"extra,omitempty" protobuf:"bytes,5,rep,name=extra"`
+}
+
+// ExtraValue masks the value so protobuf can generate
+// +protobuf.nullable=true
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+type ExtraValue []string
+
+func (t ExtraValue) String() string {
+ return fmt.Sprintf("%v", []string(t))
+}
+
+// SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
+// and NonResourceAuthorizationAttributes must be set
+type SelfSubjectAccessReviewSpec struct {
+ // ResourceAuthorizationAttributes describes information for a resource access request
+ // +optional
+ ResourceAttributes *ResourceAttributes `json:"resourceAttributes,omitempty" protobuf:"bytes,1,opt,name=resourceAttributes"`
+ // NonResourceAttributes describes information for a non-resource access request
+ // +optional
+ NonResourceAttributes *NonResourceAttributes `json:"nonResourceAttributes,omitempty" protobuf:"bytes,2,opt,name=nonResourceAttributes"`
+}
+
+// SubjectAccessReviewStatus
+type SubjectAccessReviewStatus struct {
+ // Allowed is required. True if the action would be allowed, false otherwise.
+ Allowed bool `json:"allowed" protobuf:"varint,1,opt,name=allowed"`
+ // Reason is optional. It indicates why a request was allowed or denied.
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"`
+ // EvaluationError is an indication that some error occurred during the authorization check.
+ // It is entirely possible to get an error and be able to continue determine authorization status in spite of it.
+ // For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.
+ // +optional
+ EvaluationError string `json:"evaluationError,omitempty" protobuf:"bytes,3,opt,name=evaluationError"`
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..8e521ba16
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/types_swagger_doc_generated.go
@@ -0,0 +1,119 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_LocalSubjectAccessReview = map[string]string{
+ "": "LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.",
+ "spec": "Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.",
+ "status": "Status is filled in by the server and indicates whether the request is allowed or not",
+}
+
+func (LocalSubjectAccessReview) SwaggerDoc() map[string]string {
+ return map_LocalSubjectAccessReview
+}
+
+var map_NonResourceAttributes = map[string]string{
+ "": "NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface",
+ "path": "Path is the URL path of the request",
+ "verb": "Verb is the standard HTTP verb",
+}
+
+func (NonResourceAttributes) SwaggerDoc() map[string]string {
+ return map_NonResourceAttributes
+}
+
+var map_ResourceAttributes = map[string]string{
+ "": "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface",
+ "namespace": "Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces \"\" (empty) is defaulted for LocalSubjectAccessReviews \"\" (empty) is empty for cluster-scoped resources \"\" (empty) means \"all\" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview",
+ "verb": "Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all.",
+ "group": "Group is the API Group of the Resource. \"*\" means all.",
+ "version": "Version is the API Version of the Resource. \"*\" means all.",
+ "resource": "Resource is one of the existing resource types. \"*\" means all.",
+ "subresource": "Subresource is one of the existing resource types. \"\" means none.",
+ "name": "Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all.",
+}
+
+func (ResourceAttributes) SwaggerDoc() map[string]string {
+ return map_ResourceAttributes
+}
+
+var map_SelfSubjectAccessReview = map[string]string{
+ "": "SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means \"in all namespaces\". Self is a special case, because users should always be able to check whether they can perform an action",
+ "spec": "Spec holds information about the request being evaluated. user and groups must be empty",
+ "status": "Status is filled in by the server and indicates whether the request is allowed or not",
+}
+
+func (SelfSubjectAccessReview) SwaggerDoc() map[string]string {
+ return map_SelfSubjectAccessReview
+}
+
+var map_SelfSubjectAccessReviewSpec = map[string]string{
+ "": "SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set",
+ "resourceAttributes": "ResourceAuthorizationAttributes describes information for a resource access request",
+ "nonResourceAttributes": "NonResourceAttributes describes information for a non-resource access request",
+}
+
+func (SelfSubjectAccessReviewSpec) SwaggerDoc() map[string]string {
+ return map_SelfSubjectAccessReviewSpec
+}
+
+var map_SubjectAccessReview = map[string]string{
+ "": "SubjectAccessReview checks whether or not a user or group can perform an action.",
+ "spec": "Spec holds information about the request being evaluated",
+ "status": "Status is filled in by the server and indicates whether the request is allowed or not",
+}
+
+func (SubjectAccessReview) SwaggerDoc() map[string]string {
+ return map_SubjectAccessReview
+}
+
+var map_SubjectAccessReviewSpec = map[string]string{
+ "": "SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set",
+ "resourceAttributes": "ResourceAuthorizationAttributes describes information for a resource access request",
+ "nonResourceAttributes": "NonResourceAttributes describes information for a non-resource access request",
+ "user": "User is the user you're testing for. If you specify \"User\" but not \"Group\", then is it interpreted as \"What if User were not a member of any groups",
+ "group": "Groups is the groups you're testing for.",
+ "extra": "Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here.",
+}
+
+func (SubjectAccessReviewSpec) SwaggerDoc() map[string]string {
+ return map_SubjectAccessReviewSpec
+}
+
+var map_SubjectAccessReviewStatus = map[string]string{
+ "": "SubjectAccessReviewStatus",
+ "allowed": "Allowed is required. True if the action would be allowed, false otherwise.",
+ "reason": "Reason is optional. It indicates why a request was allowed or denied.",
+ "evaluationError": "EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.",
+}
+
+func (SubjectAccessReviewStatus) SwaggerDoc() map[string]string {
+ return map_SubjectAccessReviewStatus
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.conversion.go
new file mode 100644
index 000000000..dc74214f1
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.conversion.go
@@ -0,0 +1,279 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ authorization "k8s.io/client-go/pkg/apis/authorization"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1beta1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview,
+ Convert_authorization_LocalSubjectAccessReview_To_v1beta1_LocalSubjectAccessReview,
+ Convert_v1beta1_NonResourceAttributes_To_authorization_NonResourceAttributes,
+ Convert_authorization_NonResourceAttributes_To_v1beta1_NonResourceAttributes,
+ Convert_v1beta1_ResourceAttributes_To_authorization_ResourceAttributes,
+ Convert_authorization_ResourceAttributes_To_v1beta1_ResourceAttributes,
+ Convert_v1beta1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview,
+ Convert_authorization_SelfSubjectAccessReview_To_v1beta1_SelfSubjectAccessReview,
+ Convert_v1beta1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec,
+ Convert_authorization_SelfSubjectAccessReviewSpec_To_v1beta1_SelfSubjectAccessReviewSpec,
+ Convert_v1beta1_SubjectAccessReview_To_authorization_SubjectAccessReview,
+ Convert_authorization_SubjectAccessReview_To_v1beta1_SubjectAccessReview,
+ Convert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec,
+ Convert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec,
+ Convert_v1beta1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus,
+ Convert_authorization_SubjectAccessReviewStatus_To_v1beta1_SubjectAccessReviewStatus,
+ )
+}
+
+func autoConvert_v1beta1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview(in *LocalSubjectAccessReview, out *authorization.LocalSubjectAccessReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview is an autogenerated conversion function.
+func Convert_v1beta1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview(in *LocalSubjectAccessReview, out *authorization.LocalSubjectAccessReview, s conversion.Scope) error {
+ return autoConvert_v1beta1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview(in, out, s)
+}
+
+func autoConvert_authorization_LocalSubjectAccessReview_To_v1beta1_LocalSubjectAccessReview(in *authorization.LocalSubjectAccessReview, out *LocalSubjectAccessReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_authorization_SubjectAccessReviewStatus_To_v1beta1_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_authorization_LocalSubjectAccessReview_To_v1beta1_LocalSubjectAccessReview is an autogenerated conversion function.
+func Convert_authorization_LocalSubjectAccessReview_To_v1beta1_LocalSubjectAccessReview(in *authorization.LocalSubjectAccessReview, out *LocalSubjectAccessReview, s conversion.Scope) error {
+ return autoConvert_authorization_LocalSubjectAccessReview_To_v1beta1_LocalSubjectAccessReview(in, out, s)
+}
+
+func autoConvert_v1beta1_NonResourceAttributes_To_authorization_NonResourceAttributes(in *NonResourceAttributes, out *authorization.NonResourceAttributes, s conversion.Scope) error {
+ out.Path = in.Path
+ out.Verb = in.Verb
+ return nil
+}
+
+// Convert_v1beta1_NonResourceAttributes_To_authorization_NonResourceAttributes is an autogenerated conversion function.
+func Convert_v1beta1_NonResourceAttributes_To_authorization_NonResourceAttributes(in *NonResourceAttributes, out *authorization.NonResourceAttributes, s conversion.Scope) error {
+ return autoConvert_v1beta1_NonResourceAttributes_To_authorization_NonResourceAttributes(in, out, s)
+}
+
+func autoConvert_authorization_NonResourceAttributes_To_v1beta1_NonResourceAttributes(in *authorization.NonResourceAttributes, out *NonResourceAttributes, s conversion.Scope) error {
+ out.Path = in.Path
+ out.Verb = in.Verb
+ return nil
+}
+
+// Convert_authorization_NonResourceAttributes_To_v1beta1_NonResourceAttributes is an autogenerated conversion function.
+func Convert_authorization_NonResourceAttributes_To_v1beta1_NonResourceAttributes(in *authorization.NonResourceAttributes, out *NonResourceAttributes, s conversion.Scope) error {
+ return autoConvert_authorization_NonResourceAttributes_To_v1beta1_NonResourceAttributes(in, out, s)
+}
+
+func autoConvert_v1beta1_ResourceAttributes_To_authorization_ResourceAttributes(in *ResourceAttributes, out *authorization.ResourceAttributes, s conversion.Scope) error {
+ out.Namespace = in.Namespace
+ out.Verb = in.Verb
+ out.Group = in.Group
+ out.Version = in.Version
+ out.Resource = in.Resource
+ out.Subresource = in.Subresource
+ out.Name = in.Name
+ return nil
+}
+
+// Convert_v1beta1_ResourceAttributes_To_authorization_ResourceAttributes is an autogenerated conversion function.
+func Convert_v1beta1_ResourceAttributes_To_authorization_ResourceAttributes(in *ResourceAttributes, out *authorization.ResourceAttributes, s conversion.Scope) error {
+ return autoConvert_v1beta1_ResourceAttributes_To_authorization_ResourceAttributes(in, out, s)
+}
+
+func autoConvert_authorization_ResourceAttributes_To_v1beta1_ResourceAttributes(in *authorization.ResourceAttributes, out *ResourceAttributes, s conversion.Scope) error {
+ out.Namespace = in.Namespace
+ out.Verb = in.Verb
+ out.Group = in.Group
+ out.Version = in.Version
+ out.Resource = in.Resource
+ out.Subresource = in.Subresource
+ out.Name = in.Name
+ return nil
+}
+
+// Convert_authorization_ResourceAttributes_To_v1beta1_ResourceAttributes is an autogenerated conversion function.
+func Convert_authorization_ResourceAttributes_To_v1beta1_ResourceAttributes(in *authorization.ResourceAttributes, out *ResourceAttributes, s conversion.Scope) error {
+ return autoConvert_authorization_ResourceAttributes_To_v1beta1_ResourceAttributes(in, out, s)
+}
+
+func autoConvert_v1beta1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview(in *SelfSubjectAccessReview, out *authorization.SelfSubjectAccessReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1beta1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview is an autogenerated conversion function.
+func Convert_v1beta1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview(in *SelfSubjectAccessReview, out *authorization.SelfSubjectAccessReview, s conversion.Scope) error {
+ return autoConvert_v1beta1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview(in, out, s)
+}
+
+func autoConvert_authorization_SelfSubjectAccessReview_To_v1beta1_SelfSubjectAccessReview(in *authorization.SelfSubjectAccessReview, out *SelfSubjectAccessReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_authorization_SelfSubjectAccessReviewSpec_To_v1beta1_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_authorization_SubjectAccessReviewStatus_To_v1beta1_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_authorization_SelfSubjectAccessReview_To_v1beta1_SelfSubjectAccessReview is an autogenerated conversion function.
+func Convert_authorization_SelfSubjectAccessReview_To_v1beta1_SelfSubjectAccessReview(in *authorization.SelfSubjectAccessReview, out *SelfSubjectAccessReview, s conversion.Scope) error {
+ return autoConvert_authorization_SelfSubjectAccessReview_To_v1beta1_SelfSubjectAccessReview(in, out, s)
+}
+
+func autoConvert_v1beta1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(in *SelfSubjectAccessReviewSpec, out *authorization.SelfSubjectAccessReviewSpec, s conversion.Scope) error {
+ out.ResourceAttributes = (*authorization.ResourceAttributes)(unsafe.Pointer(in.ResourceAttributes))
+ out.NonResourceAttributes = (*authorization.NonResourceAttributes)(unsafe.Pointer(in.NonResourceAttributes))
+ return nil
+}
+
+// Convert_v1beta1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec is an autogenerated conversion function.
+func Convert_v1beta1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(in *SelfSubjectAccessReviewSpec, out *authorization.SelfSubjectAccessReviewSpec, s conversion.Scope) error {
+ return autoConvert_v1beta1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(in, out, s)
+}
+
+func autoConvert_authorization_SelfSubjectAccessReviewSpec_To_v1beta1_SelfSubjectAccessReviewSpec(in *authorization.SelfSubjectAccessReviewSpec, out *SelfSubjectAccessReviewSpec, s conversion.Scope) error {
+ out.ResourceAttributes = (*ResourceAttributes)(unsafe.Pointer(in.ResourceAttributes))
+ out.NonResourceAttributes = (*NonResourceAttributes)(unsafe.Pointer(in.NonResourceAttributes))
+ return nil
+}
+
+// Convert_authorization_SelfSubjectAccessReviewSpec_To_v1beta1_SelfSubjectAccessReviewSpec is an autogenerated conversion function.
+func Convert_authorization_SelfSubjectAccessReviewSpec_To_v1beta1_SelfSubjectAccessReviewSpec(in *authorization.SelfSubjectAccessReviewSpec, out *SelfSubjectAccessReviewSpec, s conversion.Scope) error {
+ return autoConvert_authorization_SelfSubjectAccessReviewSpec_To_v1beta1_SelfSubjectAccessReviewSpec(in, out, s)
+}
+
+func autoConvert_v1beta1_SubjectAccessReview_To_authorization_SubjectAccessReview(in *SubjectAccessReview, out *authorization.SubjectAccessReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_SubjectAccessReview_To_authorization_SubjectAccessReview is an autogenerated conversion function.
+func Convert_v1beta1_SubjectAccessReview_To_authorization_SubjectAccessReview(in *SubjectAccessReview, out *authorization.SubjectAccessReview, s conversion.Scope) error {
+ return autoConvert_v1beta1_SubjectAccessReview_To_authorization_SubjectAccessReview(in, out, s)
+}
+
+func autoConvert_authorization_SubjectAccessReview_To_v1beta1_SubjectAccessReview(in *authorization.SubjectAccessReview, out *SubjectAccessReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_authorization_SubjectAccessReviewStatus_To_v1beta1_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_authorization_SubjectAccessReview_To_v1beta1_SubjectAccessReview is an autogenerated conversion function.
+func Convert_authorization_SubjectAccessReview_To_v1beta1_SubjectAccessReview(in *authorization.SubjectAccessReview, out *SubjectAccessReview, s conversion.Scope) error {
+ return autoConvert_authorization_SubjectAccessReview_To_v1beta1_SubjectAccessReview(in, out, s)
+}
+
+func autoConvert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(in *SubjectAccessReviewSpec, out *authorization.SubjectAccessReviewSpec, s conversion.Scope) error {
+ out.ResourceAttributes = (*authorization.ResourceAttributes)(unsafe.Pointer(in.ResourceAttributes))
+ out.NonResourceAttributes = (*authorization.NonResourceAttributes)(unsafe.Pointer(in.NonResourceAttributes))
+ out.User = in.User
+ out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups))
+ out.Extra = *(*map[string]authorization.ExtraValue)(unsafe.Pointer(&in.Extra))
+ return nil
+}
+
+// Convert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec is an autogenerated conversion function.
+func Convert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(in *SubjectAccessReviewSpec, out *authorization.SubjectAccessReviewSpec, s conversion.Scope) error {
+ return autoConvert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(in, out, s)
+}
+
+func autoConvert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec(in *authorization.SubjectAccessReviewSpec, out *SubjectAccessReviewSpec, s conversion.Scope) error {
+ out.ResourceAttributes = (*ResourceAttributes)(unsafe.Pointer(in.ResourceAttributes))
+ out.NonResourceAttributes = (*NonResourceAttributes)(unsafe.Pointer(in.NonResourceAttributes))
+ out.User = in.User
+ out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups))
+ out.Extra = *(*map[string]ExtraValue)(unsafe.Pointer(&in.Extra))
+ return nil
+}
+
+// Convert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec is an autogenerated conversion function.
+func Convert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec(in *authorization.SubjectAccessReviewSpec, out *SubjectAccessReviewSpec, s conversion.Scope) error {
+ return autoConvert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec(in, out, s)
+}
+
+func autoConvert_v1beta1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(in *SubjectAccessReviewStatus, out *authorization.SubjectAccessReviewStatus, s conversion.Scope) error {
+ out.Allowed = in.Allowed
+ out.Reason = in.Reason
+ out.EvaluationError = in.EvaluationError
+ return nil
+}
+
+// Convert_v1beta1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus is an autogenerated conversion function.
+func Convert_v1beta1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(in *SubjectAccessReviewStatus, out *authorization.SubjectAccessReviewStatus, s conversion.Scope) error {
+ return autoConvert_v1beta1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(in, out, s)
+}
+
+func autoConvert_authorization_SubjectAccessReviewStatus_To_v1beta1_SubjectAccessReviewStatus(in *authorization.SubjectAccessReviewStatus, out *SubjectAccessReviewStatus, s conversion.Scope) error {
+ out.Allowed = in.Allowed
+ out.Reason = in.Reason
+ out.EvaluationError = in.EvaluationError
+ return nil
+}
+
+// Convert_authorization_SubjectAccessReviewStatus_To_v1beta1_SubjectAccessReviewStatus is an autogenerated conversion function.
+func Convert_authorization_SubjectAccessReviewStatus_To_v1beta1_SubjectAccessReviewStatus(in *authorization.SubjectAccessReviewStatus, out *SubjectAccessReviewStatus, s conversion.Scope) error {
+ return autoConvert_authorization_SubjectAccessReviewStatus_To_v1beta1_SubjectAccessReviewStatus(in, out, s)
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..fe99f2844
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.deepcopy.go
@@ -0,0 +1,187 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_LocalSubjectAccessReview, InType: reflect.TypeOf(&LocalSubjectAccessReview{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_NonResourceAttributes, InType: reflect.TypeOf(&NonResourceAttributes{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ResourceAttributes, InType: reflect.TypeOf(&ResourceAttributes{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SelfSubjectAccessReview, InType: reflect.TypeOf(&SelfSubjectAccessReview{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SelfSubjectAccessReviewSpec, InType: reflect.TypeOf(&SelfSubjectAccessReviewSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SubjectAccessReview, InType: reflect.TypeOf(&SubjectAccessReview{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SubjectAccessReviewSpec, InType: reflect.TypeOf(&SubjectAccessReviewSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SubjectAccessReviewStatus, InType: reflect.TypeOf(&SubjectAccessReviewStatus{})},
+ )
+}
+
+// DeepCopy_v1beta1_LocalSubjectAccessReview is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_LocalSubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LocalSubjectAccessReview)
+ out := out.(*LocalSubjectAccessReview)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_NonResourceAttributes is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_NonResourceAttributes(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NonResourceAttributes)
+ out := out.(*NonResourceAttributes)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ResourceAttributes is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ResourceAttributes(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceAttributes)
+ out := out.(*ResourceAttributes)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_SelfSubjectAccessReview is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_SelfSubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SelfSubjectAccessReview)
+ out := out.(*SelfSubjectAccessReview)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_SelfSubjectAccessReviewSpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_SelfSubjectAccessReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SelfSubjectAccessReviewSpec)
+ out := out.(*SelfSubjectAccessReviewSpec)
+ *out = *in
+ if in.ResourceAttributes != nil {
+ in, out := &in.ResourceAttributes, &out.ResourceAttributes
+ *out = new(ResourceAttributes)
+ **out = **in
+ }
+ if in.NonResourceAttributes != nil {
+ in, out := &in.NonResourceAttributes, &out.NonResourceAttributes
+ *out = new(NonResourceAttributes)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_SubjectAccessReview is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_SubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SubjectAccessReview)
+ out := out.(*SubjectAccessReview)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_SubjectAccessReviewSpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_SubjectAccessReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SubjectAccessReviewSpec)
+ out := out.(*SubjectAccessReviewSpec)
+ *out = *in
+ if in.ResourceAttributes != nil {
+ in, out := &in.ResourceAttributes, &out.ResourceAttributes
+ *out = new(ResourceAttributes)
+ **out = **in
+ }
+ if in.NonResourceAttributes != nil {
+ in, out := &in.NonResourceAttributes, &out.NonResourceAttributes
+ *out = new(NonResourceAttributes)
+ **out = **in
+ }
+ if in.Groups != nil {
+ in, out := &in.Groups, &out.Groups
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Extra != nil {
+ in, out := &in.Extra, &out.Extra
+ *out = make(map[string]ExtraValue)
+ for key, val := range *in {
+ if newVal, err := c.DeepCopy(&val); err != nil {
+ return err
+ } else {
+ (*out)[key] = *newVal.(*ExtraValue)
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_SubjectAccessReviewStatus is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_SubjectAccessReviewStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SubjectAccessReviewStatus)
+ out := out.(*SubjectAccessReviewStatus)
+ *out = *in
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.defaults.go
new file mode 100644
index 000000000..e24e70be3
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.defaults.go
@@ -0,0 +1,32 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/authorization/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/authorization/zz_generated.deepcopy.go
new file mode 100644
index 000000000..74c83c56a
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/authorization/zz_generated.deepcopy.go
@@ -0,0 +1,187 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package authorization
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_LocalSubjectAccessReview, InType: reflect.TypeOf(&LocalSubjectAccessReview{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_NonResourceAttributes, InType: reflect.TypeOf(&NonResourceAttributes{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_ResourceAttributes, InType: reflect.TypeOf(&ResourceAttributes{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SelfSubjectAccessReview, InType: reflect.TypeOf(&SelfSubjectAccessReview{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SelfSubjectAccessReviewSpec, InType: reflect.TypeOf(&SelfSubjectAccessReviewSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SubjectAccessReview, InType: reflect.TypeOf(&SubjectAccessReview{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SubjectAccessReviewSpec, InType: reflect.TypeOf(&SubjectAccessReviewSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SubjectAccessReviewStatus, InType: reflect.TypeOf(&SubjectAccessReviewStatus{})},
+ )
+}
+
+// DeepCopy_authorization_LocalSubjectAccessReview is an autogenerated deepcopy function.
+func DeepCopy_authorization_LocalSubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LocalSubjectAccessReview)
+ out := out.(*LocalSubjectAccessReview)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_authorization_NonResourceAttributes is an autogenerated deepcopy function.
+func DeepCopy_authorization_NonResourceAttributes(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NonResourceAttributes)
+ out := out.(*NonResourceAttributes)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_authorization_ResourceAttributes is an autogenerated deepcopy function.
+func DeepCopy_authorization_ResourceAttributes(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceAttributes)
+ out := out.(*ResourceAttributes)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_authorization_SelfSubjectAccessReview is an autogenerated deepcopy function.
+func DeepCopy_authorization_SelfSubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SelfSubjectAccessReview)
+ out := out.(*SelfSubjectAccessReview)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_authorization_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_authorization_SelfSubjectAccessReviewSpec is an autogenerated deepcopy function.
+func DeepCopy_authorization_SelfSubjectAccessReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SelfSubjectAccessReviewSpec)
+ out := out.(*SelfSubjectAccessReviewSpec)
+ *out = *in
+ if in.ResourceAttributes != nil {
+ in, out := &in.ResourceAttributes, &out.ResourceAttributes
+ *out = new(ResourceAttributes)
+ **out = **in
+ }
+ if in.NonResourceAttributes != nil {
+ in, out := &in.NonResourceAttributes, &out.NonResourceAttributes
+ *out = new(NonResourceAttributes)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_authorization_SubjectAccessReview is an autogenerated deepcopy function.
+func DeepCopy_authorization_SubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SubjectAccessReview)
+ out := out.(*SubjectAccessReview)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_authorization_SubjectAccessReviewSpec is an autogenerated deepcopy function.
+func DeepCopy_authorization_SubjectAccessReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SubjectAccessReviewSpec)
+ out := out.(*SubjectAccessReviewSpec)
+ *out = *in
+ if in.ResourceAttributes != nil {
+ in, out := &in.ResourceAttributes, &out.ResourceAttributes
+ *out = new(ResourceAttributes)
+ **out = **in
+ }
+ if in.NonResourceAttributes != nil {
+ in, out := &in.NonResourceAttributes, &out.NonResourceAttributes
+ *out = new(NonResourceAttributes)
+ **out = **in
+ }
+ if in.Groups != nil {
+ in, out := &in.Groups, &out.Groups
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Extra != nil {
+ in, out := &in.Extra, &out.Extra
+ *out = make(map[string]ExtraValue)
+ for key, val := range *in {
+ if newVal, err := c.DeepCopy(&val); err != nil {
+ return err
+ } else {
+ (*out)[key] = *newVal.(*ExtraValue)
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_authorization_SubjectAccessReviewStatus is an autogenerated deepcopy function.
+func DeepCopy_authorization_SubjectAccessReviewStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SubjectAccessReviewStatus)
+ out := out.(*SubjectAccessReviewStatus)
+ *out = *in
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/annotations.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/annotations.go
new file mode 100644
index 000000000..c6586ea70
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/annotations.go
@@ -0,0 +1,34 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package autoscaling
+
+// MetricSpecsAnnotation is the annotation which holds non-CPU-utilization HPA metric
+// specs when converting the `Metrics` field from autoscaling/v2alpha1
+const MetricSpecsAnnotation = "autoscaling.alpha.kubernetes.io/metrics"
+
+// MetricStatusesAnnotation is the annotation which holds non-CPU-utilization HPA metric
+// statuses when converting the `CurrentMetrics` field from autoscaling/v2alpha1
+const MetricStatusesAnnotation = "autoscaling.alpha.kubernetes.io/current-metrics"
+
+// HorizontalPodAutoscalerConditionsAnnotation is the annotation which holds the conditions
+// of an HPA when converting the `Conditions` field from autoscaling/v2alpha1
+const HorizontalPodAutoscalerConditionsAnnotation = "autoscaling.alpha.kubernetes.io/conditions"
+
+// DefaultCPUUtilization is the default value for CPU utilization, provided no other
+// metrics are present. This is here because it's used by both the v2alpha1 defaulting
+// logic, and the pseudo-defaulting done in v1 conversion.
+const DefaultCPUUtilization = 80
diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/doc.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/doc.go
new file mode 100644
index 000000000..83ac82767
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/doc.go
@@ -0,0 +1,17 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package autoscaling
diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/register.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/register.go
new file mode 100644
index 000000000..2bcea84b9
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/register.go
@@ -0,0 +1,53 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package autoscaling
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "autoscaling"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Scale{},
+ &HorizontalPodAutoscaler{},
+ &HorizontalPodAutoscalerList{},
+ )
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/types.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/types.go
new file mode 100644
index 000000000..19fdc8a4f
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/types.go
@@ -0,0 +1,358 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package autoscaling
+
+import (
+ "k8s.io/apimachinery/pkg/api/resource"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/client-go/pkg/api"
+)
+
+// Scale represents a scaling request for a resource.
+type Scale struct {
+ metav1.TypeMeta
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
+ // +optional
+ metav1.ObjectMeta
+
+ // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
+ // +optional
+ Spec ScaleSpec
+
+ // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.
+ // +optional
+ Status ScaleStatus
+}
+
+// ScaleSpec describes the attributes of a scale subresource.
+type ScaleSpec struct {
+ // desired number of instances for the scaled object.
+ // +optional
+ Replicas int32
+}
+
+// ScaleStatus represents the current status of a scale subresource.
+type ScaleStatus struct {
+ // actual number of observed instances of the scaled object.
+ Replicas int32
+
+ // label query over pods that should match the replicas count. This is same
+ // as the label selector but in the string format to avoid introspection
+ // by clients. The string will be in the same format as the query-param syntax.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ Selector string
+}
+
+// CrossVersionObjectReference contains enough information to let you identify the referred resource.
+type CrossVersionObjectReference struct {
+ // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"
+ Kind string
+ // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
+ Name string
+ // API version of the referent
+ // +optional
+ APIVersion string
+}
+
+// HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.
+type HorizontalPodAutoscalerSpec struct {
+ // ScaleTargetRef points to the target resource to scale, and is used to the pods for which metrics
+ // should be collected, as well as to actually change the replica count.
+ ScaleTargetRef CrossVersionObjectReference
+ // MinReplicas is the lower limit for the number of replicas to which the autoscaler can scale down.
+ // It defaults to 1 pod.
+ // +optional
+ MinReplicas *int32
+ // MaxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.
+ // It cannot be less that minReplicas.
+ MaxReplicas int32
+ // Metrics contains the specifications for which to use to calculate the
+ // desired replica count (the maximum replica count across all metrics will
+ // be used). The desired replica count is calculated multiplying the
+ // ratio between the target value and the current value by the current
+ // number of pods. Ergo, metrics used must decrease as the pod count is
+ // increased, and vice-versa. See the individual metric source types for
+ // more information about how each type of metric must respond.
+ // +optional
+ Metrics []MetricSpec
+}
+
+// MetricSourceType indicates the type of metric.
+type MetricSourceType string
+
+var (
+ // ObjectMetricSourceType is a metric describing a kubernetes object
+ // (for example, hits-per-second on an Ingress object).
+ ObjectMetricSourceType MetricSourceType = "Object"
+ // PodsMetricSourceType is a metric describing each pod in the current scale
+ // target (for example, transactions-processed-per-second). The values
+ // will be averaged together before being compared to the target value.
+ PodsMetricSourceType MetricSourceType = "Pods"
+ // ResourceMetricSourceType is a resource metric known to Kubernetes, as
+ // specified in requests and limits, describing each pod in the current
+ // scale target (e.g. CPU or memory). Such metrics are built in to
+ // Kubernetes, and have special scaling options on top of those available
+ // to normal per-pod metrics (the "pods" source).
+ ResourceMetricSourceType MetricSourceType = "Resource"
+)
+
+// MetricSpec specifies how to scale based on a single metric
+// (only `type` and one other matching field should be set at once).
+type MetricSpec struct {
+ // Type is the type of metric source. It should match one of the fields below.
+ Type MetricSourceType
+
+ // Object refers to a metric describing a single kubernetes object
+ // (for example, hits-per-second on an Ingress object).
+ // +optional
+ Object *ObjectMetricSource
+ // Pods refers to a metric describing each pod in the current scale target
+ // (for example, transactions-processed-per-second). The values will be
+ // averaged together before being compared to the target value.
+ // +optional
+ Pods *PodsMetricSource
+ // Resource refers to a resource metric (such as those specified in
+ // requests and limits) known to Kubernetes describing each pod in the
+ // current scale target (e.g. CPU or memory). Such metrics are built in to
+ // Kubernetes, and have special scaling options on top of those available
+ // to normal per-pod metrics using the "pods" source.
+ // +optional
+ Resource *ResourceMetricSource
+}
+
+// ObjectMetricSource indicates how to scale on a metric describing a
+// kubernetes object (for example, hits-per-second on an Ingress object).
+type ObjectMetricSource struct {
+ // Target is the described Kubernetes object.
+ Target CrossVersionObjectReference
+
+ // MetricName is the name of the metric in question.
+ MetricName string
+ // TargetValue is the target value of the metric (as a quantity).
+ TargetValue resource.Quantity
+}
+
+// PodsMetricSource indicates how to scale on a metric describing each pod in
+// the current scale target (for example, transactions-processed-per-second).
+// The values will be averaged together before being compared to the target
+// value.
+type PodsMetricSource struct {
+ // MetricName is the name of the metric in question
+ MetricName string
+ // TargetAverageValue is the target value of the average of the
+ // metric across all relevant pods (as a quantity)
+ TargetAverageValue resource.Quantity
+}
+
+// ResourceMetricSource indicates how to scale on a resource metric known to
+// Kubernetes, as specified in requests and limits, describing each pod in the
+// current scale target (e.g. CPU or memory). The values will be averaged
+// together before being compared to the target. Such metrics are built in to
+// Kubernetes, and have special scaling options on top of those available to
+// normal per-pod metrics using the "pods" source. Only one "target" type
+// should be set.
+type ResourceMetricSource struct {
+ // Name is the name of the resource in question.
+ Name api.ResourceName
+ // TargetAverageUtilization is the target value of the average of the
+ // resource metric across all relevant pods, represented as a percentage of
+ // the requested value of the resource for the pods.
+ // +optional
+ TargetAverageUtilization *int32
+ // TargetAverageValue is the target value of the average of the
+ // resource metric across all relevant pods, as a raw value (instead of as
+ // a percentage of the request), similar to the "pods" metric source type.
+ // +optional
+ TargetAverageValue *resource.Quantity
+}
+
+// HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.
+type HorizontalPodAutoscalerStatus struct {
+ // ObservedGeneration is the most recent generation observed by this autoscaler.
+ // +optional
+ ObservedGeneration *int64
+
+ // LastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods,
+ // used by the autoscaler to control how often the number of pods is changed.
+ // +optional
+ LastScaleTime *metav1.Time
+
+ // CurrentReplicas is current number of replicas of pods managed by this autoscaler,
+ // as last seen by the autoscaler.
+ CurrentReplicas int32
+
+ // DesiredReplicas is the desired number of replicas of pods managed by this autoscaler,
+ // as last calculated by the autoscaler.
+ DesiredReplicas int32
+
+ // CurrentMetrics is the last read state of the metrics used by this autoscaler.
+ CurrentMetrics []MetricStatus
+
+ // Conditions is the set of conditions required for this autoscaler to scale its target,
+ // and indicates whether or not those conditions are met.
+ Conditions []HorizontalPodAutoscalerCondition
+}
+
+// ConditionStatus indicates the status of a condition (true, false, or unknown).
+type ConditionStatus string
+
+// These are valid condition statuses. "ConditionTrue" means a resource is in the condition;
+// "ConditionFalse" means a resource is not in the condition; "ConditionUnknown" means kubernetes
+// can't decide if a resource is in the condition or not. In the future, we could add other
+// intermediate conditions, e.g. ConditionDegraded.
+const (
+ ConditionTrue ConditionStatus = "True"
+ ConditionFalse ConditionStatus = "False"
+ ConditionUnknown ConditionStatus = "Unknown"
+)
+
+// HorizontalPodAutoscalerConditionType are the valid conditions of
+// a HorizontalPodAutoscaler.
+type HorizontalPodAutoscalerConditionType string
+
+var (
+ // ScalingActive indicates that the HPA controller is able to scale if necessary:
+ // it's correctly configured, can fetch the desired metrics, and isn't disabled.
+ ScalingActive HorizontalPodAutoscalerConditionType = "ScalingActive"
+ // AbleToScale indicates a lack of transient issues which prevent scaling from occuring,
+ // such as being in a backoff window, or being unable to access/update the target scale.
+ AbleToScale HorizontalPodAutoscalerConditionType = "AbleToScale"
+ // ScalingLimited indicates that the calculated scale based on metrics would be above or
+ // below the range for the HPA, and has thus been capped.
+ ScalingLimited HorizontalPodAutoscalerConditionType = "ScalingLimited"
+)
+
+// HorizontalPodAutoscalerCondition describes the state of
+// a HorizontalPodAutoscaler at a certain point.
+type HorizontalPodAutoscalerCondition struct {
+ // Type describes the current condition
+ Type HorizontalPodAutoscalerConditionType
+ // Status is the status of the condition (True, False, Unknown)
+ Status ConditionStatus
+ // LastTransitionTime is the last time the condition transitioned from
+ // one status to another
+ // +optional
+ LastTransitionTime metav1.Time
+ // Reason is the reason for the condition's last transition.
+ // +optional
+ Reason string
+ // Message is a human-readable explanation containing details about
+ // the transition
+ // +optional
+ Message string
+}
+
+// MetricStatus describes the last-read state of a single metric.
+type MetricStatus struct {
+ // Type is the type of metric source. It will match one of the fields below.
+ Type MetricSourceType
+
+ // Object refers to a metric describing a single kubernetes object
+ // (for example, hits-per-second on an Ingress object).
+ // +optional
+ Object *ObjectMetricStatus
+ // Pods refers to a metric describing each pod in the current scale target
+ // (for example, transactions-processed-per-second). The values will be
+ // averaged together before being compared to the target value.
+ // +optional
+ Pods *PodsMetricStatus
+ // Resource refers to a resource metric (such as those specified in
+ // requests and limits) known to Kubernetes describing each pod in the
+ // current scale target (e.g. CPU or memory). Such metrics are built in to
+ // Kubernetes, and have special scaling options on top of those available
+ // to normal per-pod metrics using the "pods" source.
+ // +optional
+ Resource *ResourceMetricStatus
+}
+
+// ObjectMetricStatus indicates the current value of a metric describing a
+// kubernetes object (for example, hits-per-second on an Ingress object).
+type ObjectMetricStatus struct {
+ // Target is the described Kubernetes object.
+ Target CrossVersionObjectReference
+
+ // MetricName is the name of the metric in question.
+ MetricName string
+ // CurrentValue is the current value of the metric (as a quantity).
+ CurrentValue resource.Quantity
+}
+
+// PodsMetricStatus indicates the current value of a metric describing each pod in
+// the current scale target (for example, transactions-processed-per-second).
+type PodsMetricStatus struct {
+ // MetricName is the name of the metric in question
+ MetricName string
+ // CurrentAverageValue is the current value of the average of the
+ // metric across all relevant pods (as a quantity)
+ CurrentAverageValue resource.Quantity
+}
+
+// ResourceMetricStatus indicates the current value of a resource metric known to
+// Kubernetes, as specified in requests and limits, describing each pod in the
+// current scale target (e.g. CPU or memory). Such metrics are built in to
+// Kubernetes, and have special scaling options on top of those available to
+// normal per-pod metrics using the "pods" source.
+type ResourceMetricStatus struct {
+ // Name is the name of the resource in question.
+ Name api.ResourceName
+ // CurrentAverageUtilization is the current value of the average of the
+ // resource metric across all relevant pods, represented as a percentage of
+ // the requested value of the resource for the pods. It will only be
+ // present if `targetAverageValue` was set in the corresponding metric
+ // specification.
+ // +optional
+ CurrentAverageUtilization *int32
+ // CurrentAverageValue is the current value of the average of the
+ // resource metric across all relevant pods, as a raw value (instead of as
+ // a percentage of the request), similar to the "pods" metric source type.
+ // It will always be set, regardless of the corresponding metric specification.
+ CurrentAverageValue resource.Quantity
+}
+
+// +genclient=true
+
+// HorizontalPodAutoscaler is the configuration for a horizontal pod
+// autoscaler, which automatically manages the replica count of any resource
+// implementing the scale subresource based on the metrics specified.
+type HorizontalPodAutoscaler struct {
+ metav1.TypeMeta
+ // Metadata is the standard object metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta
+
+ // Spec is the specification for the behaviour of the autoscaler.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
+ // +optional
+ Spec HorizontalPodAutoscalerSpec
+
+ // Status is the current information about the autoscaler.
+ // +optional
+ Status HorizontalPodAutoscalerStatus
+}
+
+// HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.
+type HorizontalPodAutoscalerList struct {
+ metav1.TypeMeta
+ // Metadata is the standard list metadata.
+ // +optional
+ metav1.ListMeta
+
+ // Items is the list of horizontal pod autoscaler objects.
+ Items []HorizontalPodAutoscaler
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/conversion.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/conversion.go
new file mode 100644
index 000000000..3e6a320a2
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/conversion.go
@@ -0,0 +1,275 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "encoding/json"
+
+ "k8s.io/apimachinery/pkg/conversion"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/client-go/pkg/api"
+ "k8s.io/client-go/pkg/apis/autoscaling"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) error {
+ // Add non-generated conversion functions
+ err := scheme.AddConversionFuncs(
+ Convert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler,
+ Convert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler,
+ Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscalerSpec,
+ Convert_v1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec,
+ Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus,
+ Convert_v1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus,
+ )
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func Convert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, s conversion.Scope) error {
+ if err := autoConvert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler(in, out, s); err != nil {
+ return err
+ }
+
+ otherMetrics := make([]MetricSpec, 0, len(in.Spec.Metrics))
+ for _, metric := range in.Spec.Metrics {
+ if metric.Type == autoscaling.ResourceMetricSourceType && metric.Resource != nil && metric.Resource.Name == api.ResourceCPU && metric.Resource.TargetAverageUtilization != nil {
+ continue
+ }
+
+ convMetric := MetricSpec{}
+ if err := Convert_autoscaling_MetricSpec_To_v1_MetricSpec(&metric, &convMetric, s); err != nil {
+ return err
+ }
+ otherMetrics = append(otherMetrics, convMetric)
+ }
+
+ // NB: we need to save the status even if it maps to a CPU utilization status in order to save the raw value as well
+ currentMetrics := make([]MetricStatus, len(in.Status.CurrentMetrics))
+ for i, currentMetric := range in.Status.CurrentMetrics {
+ if err := Convert_autoscaling_MetricStatus_To_v1_MetricStatus(&currentMetric, &currentMetrics[i], s); err != nil {
+ return err
+ }
+ }
+
+ // store HPA conditions in an annotation
+ currentConditions := make([]HorizontalPodAutoscalerCondition, len(in.Status.Conditions))
+ for i, currentCondition := range in.Status.Conditions {
+ if err := Convert_autoscaling_HorizontalPodAutoscalerCondition_To_v1_HorizontalPodAutoscalerCondition(&currentCondition, &currentConditions[i], s); err != nil {
+ return err
+ }
+ }
+
+ if len(otherMetrics) > 0 || len(in.Status.CurrentMetrics) > 0 || len(currentConditions) > 0 {
+ old := out.Annotations
+ out.Annotations = make(map[string]string, len(old)+3)
+ if old != nil {
+ for k, v := range old {
+ out.Annotations[k] = v
+ }
+ }
+ }
+
+ if len(otherMetrics) > 0 {
+ otherMetricsEnc, err := json.Marshal(otherMetrics)
+ if err != nil {
+ return err
+ }
+ out.Annotations[autoscaling.MetricSpecsAnnotation] = string(otherMetricsEnc)
+ }
+
+ if len(in.Status.CurrentMetrics) > 0 {
+ currentMetricsEnc, err := json.Marshal(currentMetrics)
+ if err != nil {
+ return err
+ }
+ out.Annotations[autoscaling.MetricStatusesAnnotation] = string(currentMetricsEnc)
+ }
+
+ if len(in.Status.Conditions) > 0 {
+ currentConditionsEnc, err := json.Marshal(currentConditions)
+ if err != nil {
+ return err
+ }
+ out.Annotations[autoscaling.HorizontalPodAutoscalerConditionsAnnotation] = string(currentConditionsEnc)
+ }
+
+ return nil
+}
+
+func Convert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error {
+ if err := autoConvert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in, out, s); err != nil {
+ return err
+ }
+
+ if otherMetricsEnc, hasOtherMetrics := out.Annotations[autoscaling.MetricSpecsAnnotation]; hasOtherMetrics {
+ var otherMetrics []MetricSpec
+ if err := json.Unmarshal([]byte(otherMetricsEnc), &otherMetrics); err != nil {
+ return err
+ }
+
+ // the normal Spec conversion could have populated out.Spec.Metrics with a single element, so deal with that
+ outMetrics := make([]autoscaling.MetricSpec, len(otherMetrics)+len(out.Spec.Metrics))
+ for i, metric := range otherMetrics {
+ if err := Convert_v1_MetricSpec_To_autoscaling_MetricSpec(&metric, &outMetrics[i], s); err != nil {
+ return err
+ }
+ }
+ if out.Spec.Metrics != nil {
+ outMetrics[len(otherMetrics)] = out.Spec.Metrics[0]
+ }
+ out.Spec.Metrics = outMetrics
+ delete(out.Annotations, autoscaling.MetricSpecsAnnotation)
+ }
+
+ if currentMetricsEnc, hasCurrentMetrics := out.Annotations[autoscaling.MetricStatusesAnnotation]; hasCurrentMetrics {
+ // ignore any existing status values -- the ones here have more information
+ var currentMetrics []MetricStatus
+ if err := json.Unmarshal([]byte(currentMetricsEnc), &currentMetrics); err != nil {
+ return err
+ }
+
+ out.Status.CurrentMetrics = make([]autoscaling.MetricStatus, len(currentMetrics))
+ for i, currentMetric := range currentMetrics {
+ if err := Convert_v1_MetricStatus_To_autoscaling_MetricStatus(&currentMetric, &out.Status.CurrentMetrics[i], s); err != nil {
+ return err
+ }
+ }
+ delete(out.Annotations, autoscaling.MetricStatusesAnnotation)
+ }
+
+ // autoscaling/v1 formerly had an implicit default applied in the controller. In v2alpha1, we apply it explicitly.
+ // We apply it here, explicitly, since we have access to the full set of metrics from the annotation.
+ if len(out.Spec.Metrics) == 0 {
+ // no other metrics, no explicit CPU value set
+ out.Spec.Metrics = []autoscaling.MetricSpec{
+ {
+ Type: autoscaling.ResourceMetricSourceType,
+ Resource: &autoscaling.ResourceMetricSource{
+ Name: api.ResourceCPU,
+ },
+ },
+ }
+ out.Spec.Metrics[0].Resource.TargetAverageUtilization = new(int32)
+ *out.Spec.Metrics[0].Resource.TargetAverageUtilization = autoscaling.DefaultCPUUtilization
+ }
+
+ if currentConditionsEnc, hasCurrentConditions := out.Annotations[autoscaling.HorizontalPodAutoscalerConditionsAnnotation]; hasCurrentConditions {
+ var currentConditions []HorizontalPodAutoscalerCondition
+ if err := json.Unmarshal([]byte(currentConditionsEnc), &currentConditions); err != nil {
+ return err
+ }
+
+ out.Status.Conditions = make([]autoscaling.HorizontalPodAutoscalerCondition, len(currentConditions))
+ for i, currentCondition := range currentConditions {
+ if err := Convert_v1_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition(&currentCondition, &out.Status.Conditions[i], s); err != nil {
+ return err
+ }
+ }
+ delete(out.Annotations, autoscaling.HorizontalPodAutoscalerConditionsAnnotation)
+ }
+
+ return nil
+}
+
+func Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscalerSpec(in *autoscaling.HorizontalPodAutoscalerSpec, out *HorizontalPodAutoscalerSpec, s conversion.Scope) error {
+ if err := Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference(&in.ScaleTargetRef, &out.ScaleTargetRef, s); err != nil {
+ return err
+ }
+
+ out.MinReplicas = in.MinReplicas
+ out.MaxReplicas = in.MaxReplicas
+
+ for _, metric := range in.Metrics {
+ if metric.Type == autoscaling.ResourceMetricSourceType && metric.Resource != nil && metric.Resource.Name == api.ResourceCPU {
+ if metric.Resource.TargetAverageUtilization != nil {
+ out.TargetCPUUtilizationPercentage = new(int32)
+ *out.TargetCPUUtilizationPercentage = *metric.Resource.TargetAverageUtilization
+ }
+ break
+ }
+ }
+
+ return nil
+}
+
+func Convert_v1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in *HorizontalPodAutoscalerSpec, out *autoscaling.HorizontalPodAutoscalerSpec, s conversion.Scope) error {
+ if err := Convert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(&in.ScaleTargetRef, &out.ScaleTargetRef, s); err != nil {
+ return err
+ }
+
+ out.MinReplicas = in.MinReplicas
+ out.MaxReplicas = in.MaxReplicas
+
+ if in.TargetCPUUtilizationPercentage != nil {
+ out.Metrics = []autoscaling.MetricSpec{
+ {
+ Type: autoscaling.ResourceMetricSourceType,
+ Resource: &autoscaling.ResourceMetricSource{
+ Name: api.ResourceCPU,
+ },
+ },
+ }
+ out.Metrics[0].Resource.TargetAverageUtilization = new(int32)
+ *out.Metrics[0].Resource.TargetAverageUtilization = *in.TargetCPUUtilizationPercentage
+ }
+
+ return nil
+}
+
+func Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus(in *autoscaling.HorizontalPodAutoscalerStatus, out *HorizontalPodAutoscalerStatus, s conversion.Scope) error {
+ out.ObservedGeneration = in.ObservedGeneration
+ out.LastScaleTime = in.LastScaleTime
+
+ out.CurrentReplicas = in.CurrentReplicas
+ out.DesiredReplicas = in.DesiredReplicas
+
+ for _, metric := range in.CurrentMetrics {
+ if metric.Type == autoscaling.ResourceMetricSourceType && metric.Resource != nil && metric.Resource.Name == api.ResourceCPU {
+ if metric.Resource.CurrentAverageUtilization != nil {
+
+ out.CurrentCPUUtilizationPercentage = new(int32)
+ *out.CurrentCPUUtilizationPercentage = *metric.Resource.CurrentAverageUtilization
+ }
+ }
+ }
+ return nil
+}
+
+func Convert_v1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in *HorizontalPodAutoscalerStatus, out *autoscaling.HorizontalPodAutoscalerStatus, s conversion.Scope) error {
+ out.ObservedGeneration = in.ObservedGeneration
+ out.LastScaleTime = in.LastScaleTime
+
+ out.CurrentReplicas = in.CurrentReplicas
+ out.DesiredReplicas = in.DesiredReplicas
+
+ if in.CurrentCPUUtilizationPercentage != nil {
+ out.CurrentMetrics = []autoscaling.MetricStatus{
+ {
+ Type: autoscaling.ResourceMetricSourceType,
+ Resource: &autoscaling.ResourceMetricStatus{
+ Name: api.ResourceCPU,
+ },
+ },
+ }
+ out.CurrentMetrics[0].Resource.CurrentAverageUtilization = new(int32)
+ *out.CurrentMetrics[0].Resource.CurrentAverageUtilization = *in.CurrentCPUUtilizationPercentage
+ }
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/defaults.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/defaults.go
new file mode 100644
index 000000000..aeece5b81
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/defaults.go
@@ -0,0 +1,35 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
+
+func SetDefaults_HorizontalPodAutoscaler(obj *HorizontalPodAutoscaler) {
+ if obj.Spec.MinReplicas == nil {
+ minReplicas := int32(1)
+ obj.Spec.MinReplicas = &minReplicas
+ }
+
+ // NB: we apply a default for CPU utilization in conversion because
+ // we need access to the annotations to properly apply the default.
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/doc.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/doc.go
new file mode 100644
index 000000000..c7be42d5a
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/doc.go
@@ -0,0 +1,17 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/generated.pb.go
new file mode 100644
index 000000000..552c980ad
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/generated.pb.go
@@ -0,0 +1,3787 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.proto
+
+ It has these top-level messages:
+ CrossVersionObjectReference
+ HorizontalPodAutoscaler
+ HorizontalPodAutoscalerCondition
+ HorizontalPodAutoscalerList
+ HorizontalPodAutoscalerSpec
+ HorizontalPodAutoscalerStatus
+ MetricSpec
+ MetricStatus
+ ObjectMetricSource
+ ObjectMetricStatus
+ PodsMetricSource
+ PodsMetricStatus
+ ResourceMetricSource
+ ResourceMetricStatus
+ Scale
+ ScaleSpec
+ ScaleStatus
+*/
+package v1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_apimachinery_pkg_api_resource "k8s.io/apimachinery/pkg/api/resource"
+import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+import k8s_io_kubernetes_pkg_api_v1 "k8s.io/client-go/pkg/api/v1"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} }
+func (*CrossVersionObjectReference) ProtoMessage() {}
+func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{0}
+}
+
+func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} }
+func (*HorizontalPodAutoscaler) ProtoMessage() {}
+func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} }
+func (*HorizontalPodAutoscalerCondition) ProtoMessage() {}
+func (*HorizontalPodAutoscalerCondition) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{2}
+}
+
+func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} }
+func (*HorizontalPodAutoscalerList) ProtoMessage() {}
+func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{3}
+}
+
+func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} }
+func (*HorizontalPodAutoscalerSpec) ProtoMessage() {}
+func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{4}
+}
+
+func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} }
+func (*HorizontalPodAutoscalerStatus) ProtoMessage() {}
+func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{5}
+}
+
+func (m *MetricSpec) Reset() { *m = MetricSpec{} }
+func (*MetricSpec) ProtoMessage() {}
+func (*MetricSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
+
+func (m *MetricStatus) Reset() { *m = MetricStatus{} }
+func (*MetricStatus) ProtoMessage() {}
+func (*MetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
+
+func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} }
+func (*ObjectMetricSource) ProtoMessage() {}
+func (*ObjectMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
+
+func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} }
+func (*ObjectMetricStatus) ProtoMessage() {}
+func (*ObjectMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
+
+func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} }
+func (*PodsMetricSource) ProtoMessage() {}
+func (*PodsMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
+
+func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} }
+func (*PodsMetricStatus) ProtoMessage() {}
+func (*PodsMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} }
+
+func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} }
+func (*ResourceMetricSource) ProtoMessage() {}
+func (*ResourceMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} }
+
+func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} }
+func (*ResourceMetricStatus) ProtoMessage() {}
+func (*ResourceMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} }
+
+func (m *Scale) Reset() { *m = Scale{} }
+func (*Scale) ProtoMessage() {}
+func (*Scale) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} }
+
+func (m *ScaleSpec) Reset() { *m = ScaleSpec{} }
+func (*ScaleSpec) ProtoMessage() {}
+func (*ScaleSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} }
+
+func (m *ScaleStatus) Reset() { *m = ScaleStatus{} }
+func (*ScaleStatus) ProtoMessage() {}
+func (*ScaleStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} }
+
+func init() {
+ proto.RegisterType((*CrossVersionObjectReference)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.CrossVersionObjectReference")
+ proto.RegisterType((*HorizontalPodAutoscaler)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.HorizontalPodAutoscaler")
+ proto.RegisterType((*HorizontalPodAutoscalerCondition)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.HorizontalPodAutoscalerCondition")
+ proto.RegisterType((*HorizontalPodAutoscalerList)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.HorizontalPodAutoscalerList")
+ proto.RegisterType((*HorizontalPodAutoscalerSpec)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.HorizontalPodAutoscalerSpec")
+ proto.RegisterType((*HorizontalPodAutoscalerStatus)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.HorizontalPodAutoscalerStatus")
+ proto.RegisterType((*MetricSpec)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.MetricSpec")
+ proto.RegisterType((*MetricStatus)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.MetricStatus")
+ proto.RegisterType((*ObjectMetricSource)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.ObjectMetricSource")
+ proto.RegisterType((*ObjectMetricStatus)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.ObjectMetricStatus")
+ proto.RegisterType((*PodsMetricSource)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.PodsMetricSource")
+ proto.RegisterType((*PodsMetricStatus)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.PodsMetricStatus")
+ proto.RegisterType((*ResourceMetricSource)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.ResourceMetricSource")
+ proto.RegisterType((*ResourceMetricStatus)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.ResourceMetricStatus")
+ proto.RegisterType((*Scale)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.Scale")
+ proto.RegisterType((*ScaleSpec)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.ScaleSpec")
+ proto.RegisterType((*ScaleStatus)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v1.ScaleStatus")
+}
+func (m *CrossVersionObjectReference) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CrossVersionObjectReference) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
+ i += copy(dAtA[i:], m.Kind)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion)))
+ i += copy(dAtA[i:], m.APIVersion)
+ return i, nil
+}
+
+func (m *HorizontalPodAutoscaler) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HorizontalPodAutoscaler) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n2, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n3, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ return i, nil
+}
+
+func (m *HorizontalPodAutoscalerCondition) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HorizontalPodAutoscalerCondition) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
+ i += copy(dAtA[i:], m.Status)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
+ n4, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ return i, nil
+}
+
+func (m *HorizontalPodAutoscalerList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HorizontalPodAutoscalerList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n5, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *HorizontalPodAutoscalerSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HorizontalPodAutoscalerSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ScaleTargetRef.Size()))
+ n6, err := m.ScaleTargetRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ if m.MinReplicas != nil {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.MinReplicas))
+ }
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.MaxReplicas))
+ if m.TargetCPUUtilizationPercentage != nil {
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.TargetCPUUtilizationPercentage))
+ }
+ return i, nil
+}
+
+func (m *HorizontalPodAutoscalerStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HorizontalPodAutoscalerStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.ObservedGeneration != nil {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.ObservedGeneration))
+ }
+ if m.LastScaleTime != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastScaleTime.Size()))
+ n7, err := m.LastScaleTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ }
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentReplicas))
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.DesiredReplicas))
+ if m.CurrentCPUUtilizationPercentage != nil {
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.CurrentCPUUtilizationPercentage))
+ }
+ return i, nil
+}
+
+func (m *MetricSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *MetricSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ if m.Object != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Object.Size()))
+ n8, err := m.Object.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n8
+ }
+ if m.Pods != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Pods.Size()))
+ n9, err := m.Pods.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n9
+ }
+ if m.Resource != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Resource.Size()))
+ n10, err := m.Resource.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n10
+ }
+ return i, nil
+}
+
+func (m *MetricStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *MetricStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ if m.Object != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Object.Size()))
+ n11, err := m.Object.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n11
+ }
+ if m.Pods != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Pods.Size()))
+ n12, err := m.Pods.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n12
+ }
+ if m.Resource != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Resource.Size()))
+ n13, err := m.Resource.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n13
+ }
+ return i, nil
+}
+
+func (m *ObjectMetricSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ObjectMetricSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Target.Size()))
+ n14, err := m.Target.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n14
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
+ i += copy(dAtA[i:], m.MetricName)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.TargetValue.Size()))
+ n15, err := m.TargetValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n15
+ return i, nil
+}
+
+func (m *ObjectMetricStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ObjectMetricStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Target.Size()))
+ n16, err := m.Target.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n16
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
+ i += copy(dAtA[i:], m.MetricName)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentValue.Size()))
+ n17, err := m.CurrentValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n17
+ return i, nil
+}
+
+func (m *PodsMetricSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodsMetricSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
+ i += copy(dAtA[i:], m.MetricName)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.TargetAverageValue.Size()))
+ n18, err := m.TargetAverageValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n18
+ return i, nil
+}
+
+func (m *PodsMetricStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodsMetricStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
+ i += copy(dAtA[i:], m.MetricName)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentAverageValue.Size()))
+ n19, err := m.CurrentAverageValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n19
+ return i, nil
+}
+
+func (m *ResourceMetricSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceMetricSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ if m.TargetAverageUtilization != nil {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.TargetAverageUtilization))
+ }
+ if m.TargetAverageValue != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.TargetAverageValue.Size()))
+ n20, err := m.TargetAverageValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n20
+ }
+ return i, nil
+}
+
+func (m *ResourceMetricStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceMetricStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ if m.CurrentAverageUtilization != nil {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.CurrentAverageUtilization))
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentAverageValue.Size()))
+ n21, err := m.CurrentAverageValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n21
+ return i, nil
+}
+
+func (m *Scale) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Scale) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n22, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n22
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n23, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n23
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n24, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n24
+ return i, nil
+}
+
+func (m *ScaleSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ScaleSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
+ return i, nil
+}
+
+func (m *ScaleStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ScaleStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Selector)))
+ i += copy(dAtA[i:], m.Selector)
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *CrossVersionObjectReference) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Kind)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.APIVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *HorizontalPodAutoscaler) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *HorizontalPodAutoscalerCondition) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Status)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastTransitionTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *HorizontalPodAutoscalerList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *HorizontalPodAutoscalerSpec) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ScaleTargetRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.MinReplicas != nil {
+ n += 1 + sovGenerated(uint64(*m.MinReplicas))
+ }
+ n += 1 + sovGenerated(uint64(m.MaxReplicas))
+ if m.TargetCPUUtilizationPercentage != nil {
+ n += 1 + sovGenerated(uint64(*m.TargetCPUUtilizationPercentage))
+ }
+ return n
+}
+
+func (m *HorizontalPodAutoscalerStatus) Size() (n int) {
+ var l int
+ _ = l
+ if m.ObservedGeneration != nil {
+ n += 1 + sovGenerated(uint64(*m.ObservedGeneration))
+ }
+ if m.LastScaleTime != nil {
+ l = m.LastScaleTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ n += 1 + sovGenerated(uint64(m.CurrentReplicas))
+ n += 1 + sovGenerated(uint64(m.DesiredReplicas))
+ if m.CurrentCPUUtilizationPercentage != nil {
+ n += 1 + sovGenerated(uint64(*m.CurrentCPUUtilizationPercentage))
+ }
+ return n
+}
+
+func (m *MetricSpec) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Object != nil {
+ l = m.Object.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Pods != nil {
+ l = m.Pods.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Resource != nil {
+ l = m.Resource.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *MetricStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Object != nil {
+ l = m.Object.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Pods != nil {
+ l = m.Pods.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Resource != nil {
+ l = m.Resource.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *ObjectMetricSource) Size() (n int) {
+ var l int
+ _ = l
+ l = m.Target.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.MetricName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.TargetValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ObjectMetricStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = m.Target.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.MetricName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.CurrentValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodsMetricSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.MetricName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.TargetAverageValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodsMetricStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.MetricName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.CurrentAverageValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ResourceMetricSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.TargetAverageUtilization != nil {
+ n += 1 + sovGenerated(uint64(*m.TargetAverageUtilization))
+ }
+ if m.TargetAverageValue != nil {
+ l = m.TargetAverageValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *ResourceMetricStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.CurrentAverageUtilization != nil {
+ n += 1 + sovGenerated(uint64(*m.CurrentAverageUtilization))
+ }
+ l = m.CurrentAverageValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Scale) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ScaleSpec) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Replicas))
+ return n
+}
+
+func (m *ScaleStatus) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Replicas))
+ l = len(m.Selector)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *CrossVersionObjectReference) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CrossVersionObjectReference{`,
+ `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HorizontalPodAutoscaler) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HorizontalPodAutoscaler{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "HorizontalPodAutoscalerSpec", "HorizontalPodAutoscalerSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "HorizontalPodAutoscalerStatus", "HorizontalPodAutoscalerStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HorizontalPodAutoscalerCondition) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HorizontalPodAutoscalerCondition{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
+ `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HorizontalPodAutoscalerList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HorizontalPodAutoscalerList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "HorizontalPodAutoscaler", "HorizontalPodAutoscaler", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HorizontalPodAutoscalerSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HorizontalPodAutoscalerSpec{`,
+ `ScaleTargetRef:` + strings.Replace(strings.Replace(this.ScaleTargetRef.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`,
+ `MinReplicas:` + valueToStringGenerated(this.MinReplicas) + `,`,
+ `MaxReplicas:` + fmt.Sprintf("%v", this.MaxReplicas) + `,`,
+ `TargetCPUUtilizationPercentage:` + valueToStringGenerated(this.TargetCPUUtilizationPercentage) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HorizontalPodAutoscalerStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HorizontalPodAutoscalerStatus{`,
+ `ObservedGeneration:` + valueToStringGenerated(this.ObservedGeneration) + `,`,
+ `LastScaleTime:` + strings.Replace(fmt.Sprintf("%v", this.LastScaleTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`,
+ `CurrentReplicas:` + fmt.Sprintf("%v", this.CurrentReplicas) + `,`,
+ `DesiredReplicas:` + fmt.Sprintf("%v", this.DesiredReplicas) + `,`,
+ `CurrentCPUUtilizationPercentage:` + valueToStringGenerated(this.CurrentCPUUtilizationPercentage) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *MetricSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&MetricSpec{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Object:` + strings.Replace(fmt.Sprintf("%v", this.Object), "ObjectMetricSource", "ObjectMetricSource", 1) + `,`,
+ `Pods:` + strings.Replace(fmt.Sprintf("%v", this.Pods), "PodsMetricSource", "PodsMetricSource", 1) + `,`,
+ `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "ResourceMetricSource", "ResourceMetricSource", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *MetricStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&MetricStatus{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Object:` + strings.Replace(fmt.Sprintf("%v", this.Object), "ObjectMetricStatus", "ObjectMetricStatus", 1) + `,`,
+ `Pods:` + strings.Replace(fmt.Sprintf("%v", this.Pods), "PodsMetricStatus", "PodsMetricStatus", 1) + `,`,
+ `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "ResourceMetricStatus", "ResourceMetricStatus", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ObjectMetricSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ObjectMetricSource{`,
+ `Target:` + strings.Replace(strings.Replace(this.Target.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`,
+ `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
+ `TargetValue:` + strings.Replace(strings.Replace(this.TargetValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ObjectMetricStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ObjectMetricStatus{`,
+ `Target:` + strings.Replace(strings.Replace(this.Target.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`,
+ `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
+ `CurrentValue:` + strings.Replace(strings.Replace(this.CurrentValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodsMetricSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodsMetricSource{`,
+ `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
+ `TargetAverageValue:` + strings.Replace(strings.Replace(this.TargetAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodsMetricStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodsMetricStatus{`,
+ `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
+ `CurrentAverageValue:` + strings.Replace(strings.Replace(this.CurrentAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceMetricSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ResourceMetricSource{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `TargetAverageUtilization:` + valueToStringGenerated(this.TargetAverageUtilization) + `,`,
+ `TargetAverageValue:` + strings.Replace(fmt.Sprintf("%v", this.TargetAverageValue), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceMetricStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ResourceMetricStatus{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `CurrentAverageUtilization:` + valueToStringGenerated(this.CurrentAverageUtilization) + `,`,
+ `CurrentAverageValue:` + strings.Replace(strings.Replace(this.CurrentAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Scale) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Scale{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ScaleSpec", "ScaleSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ScaleStatus", "ScaleStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ScaleSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ScaleSpec{`,
+ `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ScaleStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ScaleStatus{`,
+ `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
+ `Selector:` + fmt.Sprintf("%v", this.Selector) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *CrossVersionObjectReference) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CrossVersionObjectReference: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CrossVersionObjectReference: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Kind = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HorizontalPodAutoscaler) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HorizontalPodAutoscaler: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HorizontalPodAutoscaler: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HorizontalPodAutoscalerCondition) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerCondition: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerCondition: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = HorizontalPodAutoscalerConditionType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Status = k8s_io_kubernetes_pkg_api_v1.ConditionStatus(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HorizontalPodAutoscalerList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, HorizontalPodAutoscaler{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HorizontalPodAutoscalerSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ScaleTargetRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ScaleTargetRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MinReplicas", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.MinReplicas = &v
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MaxReplicas", wireType)
+ }
+ m.MaxReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.MaxReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetCPUUtilizationPercentage", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.TargetCPUUtilizationPercentage = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HorizontalPodAutoscalerStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ObservedGeneration = &v
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastScaleTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.LastScaleTime == nil {
+ m.LastScaleTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{}
+ }
+ if err := m.LastScaleTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentReplicas", wireType)
+ }
+ m.CurrentReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.CurrentReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DesiredReplicas", wireType)
+ }
+ m.DesiredReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.DesiredReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentCPUUtilizationPercentage", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.CurrentCPUUtilizationPercentage = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *MetricSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: MetricSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MetricSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = MetricSourceType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Object == nil {
+ m.Object = &ObjectMetricSource{}
+ }
+ if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Pods", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Pods == nil {
+ m.Pods = &PodsMetricSource{}
+ }
+ if err := m.Pods.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Resource == nil {
+ m.Resource = &ResourceMetricSource{}
+ }
+ if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *MetricStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: MetricStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = MetricSourceType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Object == nil {
+ m.Object = &ObjectMetricStatus{}
+ }
+ if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Pods", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Pods == nil {
+ m.Pods = &PodsMetricStatus{}
+ }
+ if err := m.Pods.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Resource == nil {
+ m.Resource = &ResourceMetricStatus{}
+ }
+ if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ObjectMetricSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ObjectMetricSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ObjectMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MetricName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.TargetValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ObjectMetricStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ObjectMetricStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ObjectMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MetricName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.CurrentValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodsMetricSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodsMetricSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodsMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MetricName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.TargetAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodsMetricStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodsMetricStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodsMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MetricName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.CurrentAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceMetricSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceMetricSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = k8s_io_kubernetes_pkg_api_v1.ResourceName(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageUtilization", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.TargetAverageUtilization = &v
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.TargetAverageValue == nil {
+ m.TargetAverageValue = &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ }
+ if err := m.TargetAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceMetricStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceMetricStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = k8s_io_kubernetes_pkg_api_v1.ResourceName(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageUtilization", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.CurrentAverageUtilization = &v
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.CurrentAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Scale) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Scale: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Scale: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ScaleSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ScaleSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ScaleSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ m.Replicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Replicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ScaleStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ScaleStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ScaleStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ m.Replicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Replicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Selector = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/client-go/pkg/apis/autoscaling/v1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 1381 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xcf, 0x6f, 0x1b, 0xc5,
+ 0x17, 0xcf, 0xda, 0x4e, 0x9a, 0x8e, 0xd3, 0xa6, 0xdf, 0x69, 0xd5, 0xba, 0xe9, 0xb7, 0xde, 0x68,
+ 0x41, 0xa8, 0x45, 0x65, 0x4d, 0x42, 0xa8, 0xa8, 0x10, 0xa0, 0xd8, 0xa8, 0xb4, 0xa2, 0x6e, 0xc3,
+ 0xd4, 0x8d, 0xf8, 0x25, 0xc4, 0x64, 0x3d, 0x75, 0xa6, 0xf1, 0xfe, 0xd0, 0xcc, 0xd8, 0x22, 0x95,
+ 0x90, 0x38, 0x71, 0x85, 0x0b, 0x67, 0x04, 0xff, 0x04, 0xe7, 0x22, 0x21, 0xf5, 0xd8, 0x1b, 0x3d,
+ 0x59, 0x74, 0xe1, 0x86, 0xf8, 0x07, 0x2a, 0x0e, 0x68, 0x66, 0xc7, 0xeb, 0x5d, 0xdb, 0xeb, 0xc4,
+ 0x6d, 0x5a, 0xc4, 0xcd, 0x9e, 0xf9, 0xbc, 0xcf, 0xe7, 0xbd, 0x37, 0x6f, 0xde, 0xcc, 0x2c, 0xb8,
+ 0xb4, 0xf3, 0x06, 0xb7, 0xa9, 0x5f, 0xd9, 0xe9, 0x6c, 0x11, 0xe6, 0x11, 0x41, 0x78, 0x25, 0xd8,
+ 0x69, 0x55, 0x70, 0x40, 0x79, 0x05, 0x77, 0x84, 0xcf, 0x1d, 0xdc, 0xa6, 0x5e, 0xab, 0xd2, 0x5d,
+ 0xa9, 0xb4, 0x88, 0x47, 0x18, 0x16, 0xa4, 0x69, 0x07, 0xcc, 0x17, 0x3e, 0x3c, 0x1f, 0x99, 0xda,
+ 0x03, 0x53, 0x3b, 0xd8, 0x69, 0xd9, 0xd2, 0xd4, 0x4e, 0x98, 0xda, 0xdd, 0x95, 0xa5, 0x57, 0x5a,
+ 0x54, 0x6c, 0x77, 0xb6, 0x6c, 0xc7, 0x77, 0x2b, 0x2d, 0xbf, 0xe5, 0x57, 0x14, 0xc3, 0x56, 0xe7,
+ 0xb6, 0xfa, 0xa7, 0xfe, 0xa8, 0x5f, 0x11, 0xf3, 0xd2, 0x9a, 0x76, 0x0a, 0x07, 0xd4, 0xc5, 0xce,
+ 0x36, 0xf5, 0x08, 0xdb, 0xed, 0xbb, 0x55, 0x61, 0x84, 0xfb, 0x1d, 0xe6, 0x90, 0x61, 0x7f, 0x26,
+ 0x5a, 0xf1, 0x8a, 0x4b, 0x04, 0x1e, 0x13, 0xc5, 0x52, 0x25, 0xcb, 0x8a, 0x75, 0x3c, 0x41, 0xdd,
+ 0x51, 0x99, 0x8b, 0x7b, 0x19, 0x70, 0x67, 0x9b, 0xb8, 0x78, 0xc4, 0xee, 0xb5, 0x2c, 0xbb, 0x8e,
+ 0xa0, 0xed, 0x0a, 0xf5, 0x04, 0x17, 0x6c, 0xc4, 0xe8, 0x42, 0xe6, 0xf2, 0x8c, 0x89, 0xc5, 0xfa,
+ 0xce, 0x00, 0x67, 0x6a, 0xcc, 0xe7, 0x7c, 0x93, 0x30, 0x4e, 0x7d, 0xef, 0xc6, 0xd6, 0x1d, 0xe2,
+ 0x08, 0x44, 0x6e, 0x13, 0x46, 0x3c, 0x87, 0xc0, 0x65, 0x50, 0xd8, 0xa1, 0x5e, 0xb3, 0x64, 0x2c,
+ 0x1b, 0xe7, 0x0e, 0x57, 0x17, 0xee, 0xf7, 0xcc, 0x99, 0xb0, 0x67, 0x16, 0xde, 0xa7, 0x5e, 0x13,
+ 0xa9, 0x19, 0x89, 0xf0, 0xb0, 0x4b, 0x4a, 0xb9, 0x34, 0xe2, 0x3a, 0x76, 0x09, 0x52, 0x33, 0x70,
+ 0x15, 0x00, 0x1c, 0x50, 0x2d, 0x50, 0xca, 0x2b, 0x1c, 0xd4, 0x38, 0xb0, 0xbe, 0x71, 0x55, 0xcf,
+ 0xa0, 0x04, 0xca, 0xfa, 0x35, 0x07, 0x4e, 0x5d, 0xf1, 0x19, 0xbd, 0xeb, 0x7b, 0x02, 0xb7, 0x37,
+ 0xfc, 0xe6, 0xba, 0x2e, 0x0f, 0xc2, 0xe0, 0xe7, 0x60, 0x5e, 0x2e, 0x4d, 0x13, 0x0b, 0xac, 0xfc,
+ 0x2a, 0xae, 0xbe, 0x6a, 0xeb, 0xc2, 0x4a, 0x66, 0x6a, 0x50, 0x5a, 0x12, 0x6d, 0x77, 0x57, 0xec,
+ 0x28, 0xb8, 0x3a, 0x11, 0x78, 0xa0, 0x3f, 0x18, 0x43, 0x31, 0x2b, 0xdc, 0x06, 0x05, 0x1e, 0x10,
+ 0x47, 0xc5, 0x54, 0x5c, 0xbd, 0x6c, 0xef, 0xbb, 0x6c, 0xed, 0x0c, 0x9f, 0x6f, 0x06, 0xc4, 0x19,
+ 0xe4, 0x46, 0xfe, 0x43, 0x4a, 0x01, 0x06, 0x60, 0x8e, 0x0b, 0x2c, 0x3a, 0x5c, 0xe5, 0xa5, 0xb8,
+ 0x7a, 0xe5, 0x00, 0xb4, 0x14, 0x5f, 0xf5, 0xa8, 0x56, 0x9b, 0x8b, 0xfe, 0x23, 0xad, 0x63, 0x7d,
+ 0x93, 0x07, 0xcb, 0x19, 0x96, 0x35, 0xdf, 0x6b, 0x52, 0x41, 0x7d, 0x0f, 0x5e, 0x01, 0x05, 0xb1,
+ 0x1b, 0x10, 0xbd, 0xec, 0x6b, 0x7d, 0xc7, 0x1b, 0xbb, 0x01, 0x79, 0xdc, 0x33, 0x5f, 0xdc, 0xcb,
+ 0x5e, 0xe2, 0x90, 0x62, 0x80, 0x9b, 0x71, 0x80, 0x51, 0x81, 0xbc, 0x9d, 0x76, 0xeb, 0x71, 0xcf,
+ 0x9c, 0x58, 0xb0, 0x76, 0xcc, 0x99, 0x0e, 0x03, 0x76, 0x01, 0x6c, 0x63, 0x2e, 0x1a, 0x0c, 0x7b,
+ 0x3c, 0xd2, 0xa4, 0x2e, 0xd1, 0x49, 0x7c, 0x79, 0x7f, 0xe5, 0x20, 0x2d, 0xaa, 0x4b, 0xda, 0x1f,
+ 0x78, 0x6d, 0x84, 0x0d, 0x8d, 0x51, 0x80, 0x2f, 0x81, 0x39, 0x46, 0x30, 0xf7, 0xbd, 0x52, 0x41,
+ 0xc5, 0x13, 0xa7, 0x19, 0xa9, 0x51, 0xa4, 0x67, 0xe1, 0x79, 0x70, 0xc8, 0x25, 0x9c, 0xe3, 0x16,
+ 0x29, 0xcd, 0x2a, 0xe0, 0xa2, 0x06, 0x1e, 0xaa, 0x47, 0xc3, 0xa8, 0x3f, 0x6f, 0xfd, 0x61, 0x80,
+ 0x33, 0x19, 0x19, 0xbd, 0x46, 0xb9, 0x80, 0x9f, 0x8e, 0xd4, 0xbb, 0xbd, 0xbf, 0x00, 0xa5, 0xb5,
+ 0xaa, 0xf6, 0x63, 0x5a, 0x7b, 0xbe, 0x3f, 0x92, 0xa8, 0xf5, 0x16, 0x98, 0xa5, 0x82, 0xb8, 0x72,
+ 0x7d, 0xf2, 0xe7, 0x8a, 0xab, 0xd5, 0xa7, 0x2f, 0xc0, 0xea, 0x11, 0x2d, 0x37, 0x7b, 0x55, 0x12,
+ 0xa3, 0x88, 0xdf, 0xfa, 0x3b, 0x97, 0x19, 0xa6, 0xdc, 0x10, 0xf0, 0x6b, 0x03, 0x1c, 0x55, 0x7f,
+ 0x1b, 0x98, 0xb5, 0x88, 0xec, 0x41, 0x3a, 0xda, 0x69, 0xf6, 0xdf, 0x84, 0x5e, 0x56, 0x3d, 0xa9,
+ 0xdd, 0x3a, 0x7a, 0x33, 0xa5, 0x82, 0x86, 0x54, 0xe1, 0x0a, 0x28, 0xba, 0xd4, 0x43, 0x24, 0x68,
+ 0x53, 0x07, 0x47, 0x75, 0x3b, 0x5b, 0x5d, 0x0c, 0x7b, 0x66, 0xb1, 0x3e, 0x18, 0x46, 0x49, 0x0c,
+ 0x7c, 0x1d, 0x14, 0x5d, 0xfc, 0x45, 0x6c, 0x92, 0x57, 0x26, 0xc7, 0xb5, 0x5e, 0xb1, 0x3e, 0x98,
+ 0x42, 0x49, 0x1c, 0xbc, 0x03, 0xca, 0x42, 0xc9, 0xd6, 0x36, 0x6e, 0xdd, 0x12, 0xb4, 0x4d, 0xef,
+ 0x62, 0x59, 0x68, 0x1b, 0x84, 0x39, 0xc4, 0x13, 0xb2, 0x76, 0x0a, 0x8a, 0xc9, 0x0a, 0x7b, 0x66,
+ 0xb9, 0x31, 0x11, 0x89, 0xf6, 0x60, 0xb2, 0xee, 0xe5, 0xc1, 0xd9, 0x89, 0x1d, 0x03, 0x5e, 0x06,
+ 0xd0, 0xdf, 0xe2, 0x84, 0x75, 0x49, 0xf3, 0xbd, 0xe8, 0x98, 0x90, 0xfd, 0x5a, 0xae, 0x41, 0xbe,
+ 0x7a, 0x52, 0x6e, 0x91, 0x1b, 0x23, 0xb3, 0x68, 0x8c, 0x05, 0x74, 0xc0, 0x11, 0xb9, 0x71, 0xa2,
+ 0x2c, 0x53, 0x7d, 0x34, 0x4c, 0xb7, 0x2b, 0xff, 0x17, 0xf6, 0xcc, 0x23, 0xd7, 0x92, 0x24, 0x28,
+ 0xcd, 0x09, 0xd7, 0xc1, 0xa2, 0xd3, 0x61, 0x8c, 0x78, 0x62, 0x28, 0xeb, 0xa7, 0x74, 0xd6, 0x17,
+ 0x6b, 0xe9, 0x69, 0x34, 0x8c, 0x97, 0x14, 0x4d, 0xc2, 0x29, 0x23, 0xcd, 0x98, 0xa2, 0x90, 0xa6,
+ 0x78, 0x37, 0x3d, 0x8d, 0x86, 0xf1, 0xd0, 0x05, 0xa6, 0x66, 0xcd, 0x5c, 0xc1, 0x59, 0x45, 0xf9,
+ 0x42, 0xd8, 0x33, 0xcd, 0xda, 0x64, 0x28, 0xda, 0x8b, 0xcb, 0xfa, 0x33, 0x07, 0x40, 0x9d, 0x08,
+ 0x46, 0x1d, 0xb5, 0x63, 0xd6, 0x52, 0x5d, 0x7a, 0x79, 0xa8, 0x4b, 0x1f, 0xd3, 0x48, 0x75, 0xf5,
+ 0x49, 0x74, 0x64, 0x0c, 0xe6, 0x7c, 0xb5, 0x33, 0xf4, 0xba, 0xbc, 0x35, 0xc5, 0xf6, 0x8a, 0x4f,
+ 0xcb, 0x98, 0xb8, 0x0a, 0x64, 0xf3, 0xd3, 0x5b, 0x4d, 0x13, 0xc3, 0x8f, 0x40, 0x21, 0xf0, 0x9b,
+ 0xfd, 0x33, 0xed, 0xcd, 0x29, 0x04, 0x36, 0xfc, 0x26, 0x4f, 0xd1, 0xcf, 0xcb, 0x88, 0xe4, 0x28,
+ 0x52, 0x94, 0x90, 0x82, 0xf9, 0xfe, 0x75, 0x4e, 0xad, 0x56, 0x71, 0xf5, 0x9d, 0x29, 0xe8, 0x91,
+ 0x36, 0x4d, 0x49, 0x2c, 0xc8, 0xce, 0xd8, 0x9f, 0x41, 0x31, 0xbd, 0xf5, 0x57, 0x0e, 0x2c, 0x68,
+ 0x60, 0xb4, 0x41, 0xfe, 0xe5, 0x7c, 0x47, 0xe7, 0xfa, 0x33, 0xcb, 0x77, 0x44, 0xff, 0x4c, 0xf3,
+ 0x1d, 0x49, 0x64, 0xe5, 0xfb, 0xfb, 0x1c, 0x80, 0xa3, 0x05, 0x06, 0x3d, 0x30, 0x17, 0xb5, 0xb6,
+ 0x03, 0x3e, 0x0e, 0xe2, 0x93, 0x5b, 0x77, 0x7e, 0xad, 0x22, 0xaf, 0xab, 0xae, 0xd2, 0xbf, 0x3e,
+ 0xb8, 0xd6, 0xc6, 0xd7, 0xc5, 0x7a, 0x3c, 0x83, 0x12, 0x28, 0x48, 0x40, 0x31, 0xb2, 0xde, 0xc4,
+ 0xed, 0x4e, 0xff, 0x1a, 0x32, 0xf1, 0x94, 0xb6, 0xfb, 0x61, 0xdb, 0x1f, 0x74, 0xb0, 0x27, 0xa8,
+ 0xd8, 0x1d, 0x9c, 0x17, 0x8d, 0x01, 0x15, 0x4a, 0xf2, 0x5a, 0x3f, 0x0e, 0x67, 0x28, 0xaa, 0xcb,
+ 0xff, 0x42, 0x86, 0xb6, 0xc1, 0x82, 0xee, 0x6e, 0x4f, 0x93, 0xa2, 0x13, 0x5a, 0x65, 0xa1, 0x96,
+ 0xe0, 0x42, 0x29, 0x66, 0xeb, 0x67, 0x03, 0x1c, 0x1b, 0x6e, 0x23, 0x43, 0x2e, 0x1b, 0xfb, 0x72,
+ 0xf9, 0x2e, 0x80, 0x51, 0xc0, 0xeb, 0x5d, 0xc2, 0x70, 0x8b, 0x44, 0x8e, 0xe7, 0x9e, 0xc8, 0xf1,
+ 0xf8, 0x9a, 0xd9, 0x18, 0x61, 0x44, 0x63, 0x54, 0xac, 0x5f, 0xd2, 0x41, 0x44, 0xeb, 0xfc, 0x24,
+ 0x41, 0x7c, 0x09, 0x8e, 0xeb, 0xec, 0x1c, 0x40, 0x14, 0x67, 0xb4, 0xd8, 0xf1, 0xda, 0x28, 0x25,
+ 0x1a, 0xa7, 0x63, 0xfd, 0x94, 0x03, 0x27, 0xc6, 0x35, 0x5d, 0x58, 0xd7, 0xcf, 0xc6, 0x28, 0x8a,
+ 0x4b, 0xc9, 0x67, 0xe3, 0xe3, 0x9e, 0x79, 0x7e, 0xe2, 0x9b, 0xa0, 0x4f, 0x98, 0x78, 0x63, 0x7e,
+ 0x08, 0x4a, 0xa9, 0x2c, 0x26, 0xce, 0x4f, 0x7d, 0x81, 0xfb, 0x7f, 0xd8, 0x33, 0x4b, 0x8d, 0x0c,
+ 0x0c, 0xca, 0xb4, 0x96, 0x0f, 0x8d, 0x31, 0x55, 0xf0, 0x64, 0xe5, 0x7b, 0x72, 0x8a, 0x0a, 0xb8,
+ 0x37, 0x9a, 0xb9, 0xa8, 0x0a, 0x0e, 0x38, 0x73, 0x9f, 0x80, 0xd3, 0xe9, 0x85, 0x1b, 0x4d, 0xdd,
+ 0xd9, 0xb0, 0x67, 0x9e, 0xae, 0x65, 0x81, 0x50, 0xb6, 0x7d, 0x56, 0xf5, 0xe5, 0x9f, 0x53, 0xf5,
+ 0xfd, 0x90, 0x03, 0xb3, 0xea, 0xca, 0xf8, 0x1c, 0xbe, 0x19, 0x6c, 0xa6, 0xbe, 0x19, 0xac, 0x4d,
+ 0xd1, 0x82, 0x95, 0x87, 0x99, 0x5f, 0x08, 0x3e, 0x1b, 0xfa, 0x42, 0x70, 0x71, 0x6a, 0xe6, 0xc9,
+ 0xdf, 0x03, 0x2e, 0x81, 0xc3, 0xb1, 0x03, 0xf0, 0x82, 0x3c, 0xed, 0xf5, 0x5d, 0xd8, 0x50, 0x6b,
+ 0x1f, 0x3f, 0x1d, 0xe3, 0x4b, 0x70, 0x8c, 0xb0, 0x28, 0x28, 0x26, 0x14, 0xa6, 0x33, 0x96, 0x68,
+ 0x4e, 0xda, 0xc4, 0x11, 0x3e, 0xd3, 0x47, 0x48, 0x8c, 0xbe, 0xa9, 0xc7, 0x51, 0x8c, 0xa8, 0x9e,
+ 0xbb, 0xff, 0xa8, 0x3c, 0xf3, 0xe0, 0x51, 0x79, 0xe6, 0xe1, 0xa3, 0xf2, 0xcc, 0x57, 0x61, 0xd9,
+ 0xb8, 0x1f, 0x96, 0x8d, 0x07, 0x61, 0xd9, 0x78, 0x18, 0x96, 0x8d, 0xdf, 0xc2, 0xb2, 0xf1, 0xed,
+ 0xef, 0xe5, 0x99, 0x8f, 0x73, 0xdd, 0x95, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x5d, 0x20, 0x64,
+ 0x54, 0x9f, 0x14, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/generated.proto
new file mode 100644
index 000000000..c2cc6c2ed
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/generated.proto
@@ -0,0 +1,321 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.client_go.pkg.apis.autoscaling.v1;
+
+import "k8s.io/apimachinery/pkg/api/resource/generated.proto";
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1";
+
+// CrossVersionObjectReference contains enough information to let you identify the referred resource.
+message CrossVersionObjectReference {
+ // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"
+ optional string kind = 1;
+
+ // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
+ optional string name = 2;
+
+ // API version of the referent
+ // +optional
+ optional string apiVersion = 3;
+}
+
+// configuration of a horizontal pod autoscaler.
+message HorizontalPodAutoscaler {
+ // Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
+ // +optional
+ optional HorizontalPodAutoscalerSpec spec = 2;
+
+ // current information about the autoscaler.
+ // +optional
+ optional HorizontalPodAutoscalerStatus status = 3;
+}
+
+// HorizontalPodAutoscalerCondition describes the state of
+// a HorizontalPodAutoscaler at a certain point.
+message HorizontalPodAutoscalerCondition {
+ // type describes the current condition
+ optional string type = 1;
+
+ // status is the status of the condition (True, False, Unknown)
+ optional string status = 2;
+
+ // lastTransitionTime is the last time the condition transitioned from
+ // one status to another
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
+
+ // reason is the reason for the condition's last transition.
+ // +optional
+ optional string reason = 4;
+
+ // message is a human-readable explanation containing details about
+ // the transition
+ // +optional
+ optional string message = 5;
+}
+
+// list of horizontal pod autoscaler objects.
+message HorizontalPodAutoscalerList {
+ // Standard list metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // list of horizontal pod autoscaler objects.
+ repeated HorizontalPodAutoscaler items = 2;
+}
+
+// specification of a horizontal pod autoscaler.
+message HorizontalPodAutoscalerSpec {
+ // reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption
+ // and will set the desired number of pods by using its Scale subresource.
+ optional CrossVersionObjectReference scaleTargetRef = 1;
+
+ // lower limit for the number of pods that can be set by the autoscaler, default 1.
+ // +optional
+ optional int32 minReplicas = 2;
+
+ // upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
+ optional int32 maxReplicas = 3;
+
+ // target average CPU utilization (represented as a percentage of requested CPU) over all the pods;
+ // if not specified the default autoscaling policy will be used.
+ // +optional
+ optional int32 targetCPUUtilizationPercentage = 4;
+}
+
+// current status of a horizontal pod autoscaler
+message HorizontalPodAutoscalerStatus {
+ // most recent generation observed by this autoscaler.
+ // +optional
+ optional int64 observedGeneration = 1;
+
+ // last time the HorizontalPodAutoscaler scaled the number of pods;
+ // used by the autoscaler to control how often the number of pods is changed.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScaleTime = 2;
+
+ // current number of replicas of pods managed by this autoscaler.
+ optional int32 currentReplicas = 3;
+
+ // desired number of replicas of pods managed by this autoscaler.
+ optional int32 desiredReplicas = 4;
+
+ // current average CPU utilization over all pods, represented as a percentage of requested CPU,
+ // e.g. 70 means that an average pod is using now 70% of its requested CPU.
+ // +optional
+ optional int32 currentCPUUtilizationPercentage = 5;
+}
+
+// MetricSpec specifies how to scale based on a single metric
+// (only `type` and one other matching field should be set at once).
+message MetricSpec {
+ // type is the type of metric source. It should match one of the fields below.
+ optional string type = 1;
+
+ // object refers to a metric describing a single kubernetes object
+ // (for example, hits-per-second on an Ingress object).
+ // +optional
+ optional ObjectMetricSource object = 2;
+
+ // pods refers to a metric describing each pod in the current scale target
+ // (for example, transactions-processed-per-second). The values will be
+ // averaged together before being compared to the target value.
+ // +optional
+ optional PodsMetricSource pods = 3;
+
+ // resource refers to a resource metric (such as those specified in
+ // requests and limits) known to Kubernetes describing each pod in the
+ // current scale target (e.g. CPU or memory). Such metrics are built in to
+ // Kubernetes, and have special scaling options on top of those available
+ // to normal per-pod metrics using the "pods" source.
+ // +optional
+ optional ResourceMetricSource resource = 4;
+}
+
+// MetricStatus describes the last-read state of a single metric.
+message MetricStatus {
+ // type is the type of metric source. It will match one of the fields below.
+ optional string type = 1;
+
+ // object refers to a metric describing a single kubernetes object
+ // (for example, hits-per-second on an Ingress object).
+ // +optional
+ optional ObjectMetricStatus object = 2;
+
+ // pods refers to a metric describing each pod in the current scale target
+ // (for example, transactions-processed-per-second). The values will be
+ // averaged together before being compared to the target value.
+ // +optional
+ optional PodsMetricStatus pods = 3;
+
+ // resource refers to a resource metric (such as those specified in
+ // requests and limits) known to Kubernetes describing each pod in the
+ // current scale target (e.g. CPU or memory). Such metrics are built in to
+ // Kubernetes, and have special scaling options on top of those available
+ // to normal per-pod metrics using the "pods" source.
+ // +optional
+ optional ResourceMetricStatus resource = 4;
+}
+
+// ObjectMetricSource indicates how to scale on a metric describing a
+// kubernetes object (for example, hits-per-second on an Ingress object).
+message ObjectMetricSource {
+ // target is the described Kubernetes object.
+ optional CrossVersionObjectReference target = 1;
+
+ // metricName is the name of the metric in question.
+ optional string metricName = 2;
+
+ // targetValue is the target value of the metric (as a quantity).
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
+}
+
+// ObjectMetricStatus indicates the current value of a metric describing a
+// kubernetes object (for example, hits-per-second on an Ingress object).
+message ObjectMetricStatus {
+ // target is the described Kubernetes object.
+ optional CrossVersionObjectReference target = 1;
+
+ // metricName is the name of the metric in question.
+ optional string metricName = 2;
+
+ // currentValue is the current value of the metric (as a quantity).
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
+}
+
+// PodsMetricSource indicates how to scale on a metric describing each pod in
+// the current scale target (for example, transactions-processed-per-second).
+// The values will be averaged together before being compared to the target
+// value.
+message PodsMetricSource {
+ // metricName is the name of the metric in question
+ optional string metricName = 1;
+
+ // targetAverageValue is the target value of the average of the
+ // metric across all relevant pods (as a quantity)
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2;
+}
+
+// PodsMetricStatus indicates the current value of a metric describing each pod in
+// the current scale target (for example, transactions-processed-per-second).
+message PodsMetricStatus {
+ // metricName is the name of the metric in question
+ optional string metricName = 1;
+
+ // currentAverageValue is the current value of the average of the
+ // metric across all relevant pods (as a quantity)
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2;
+}
+
+// ResourceMetricSource indicates how to scale on a resource metric known to
+// Kubernetes, as specified in requests and limits, describing each pod in the
+// current scale target (e.g. CPU or memory). The values will be averaged
+// together before being compared to the target. Such metrics are built in to
+// Kubernetes, and have special scaling options on top of those available to
+// normal per-pod metrics using the "pods" source. Only one "target" type
+// should be set.
+message ResourceMetricSource {
+ // name is the name of the resource in question.
+ optional string name = 1;
+
+ // targetAverageUtilization is the target value of the average of the
+ // resource metric across all relevant pods, represented as a percentage of
+ // the requested value of the resource for the pods.
+ // +optional
+ optional int32 targetAverageUtilization = 2;
+
+ // targetAverageValue is the target value of the average of the
+ // resource metric across all relevant pods, as a raw value (instead of as
+ // a percentage of the request), similar to the "pods" metric source type.
+ // +optional
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
+}
+
+// ResourceMetricStatus indicates the current value of a resource metric known to
+// Kubernetes, as specified in requests and limits, describing each pod in the
+// current scale target (e.g. CPU or memory). Such metrics are built in to
+// Kubernetes, and have special scaling options on top of those available to
+// normal per-pod metrics using the "pods" source.
+message ResourceMetricStatus {
+ // name is the name of the resource in question.
+ optional string name = 1;
+
+ // currentAverageUtilization is the current value of the average of the
+ // resource metric across all relevant pods, represented as a percentage of
+ // the requested value of the resource for the pods. It will only be
+ // present if `targetAverageValue` was set in the corresponding metric
+ // specification.
+ // +optional
+ optional int32 currentAverageUtilization = 2;
+
+ // currentAverageValue is the current value of the average of the
+ // resource metric across all relevant pods, as a raw value (instead of as
+ // a percentage of the request), similar to the "pods" metric source type.
+ // It will always be set, regardless of the corresponding metric specification.
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
+}
+
+// Scale represents a scaling request for a resource.
+message Scale {
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
+ // +optional
+ optional ScaleSpec spec = 2;
+
+ // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.
+ // +optional
+ optional ScaleStatus status = 3;
+}
+
+// ScaleSpec describes the attributes of a scale subresource.
+message ScaleSpec {
+ // desired number of instances for the scaled object.
+ // +optional
+ optional int32 replicas = 1;
+}
+
+// ScaleStatus represents the current status of a scale subresource.
+message ScaleStatus {
+ // actual number of observed instances of the scaled object.
+ optional int32 replicas = 1;
+
+ // label query over pods that should match the replicas count. This is same
+ // as the label selector but in the string format to avoid introspection
+ // by clients. The string will be in the same format as the query-param syntax.
+ // More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors
+ // +optional
+ optional string selector = 2;
+}
+
diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/register.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/register.go
new file mode 100644
index 000000000..20c9db5f7
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/register.go
@@ -0,0 +1,60 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "autoscaling"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &HorizontalPodAutoscaler{},
+ &HorizontalPodAutoscalerList{},
+ &Scale{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/types.generated.go
new file mode 100644
index 000000000..fc01e4d95
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/types.generated.go
@@ -0,0 +1,5633 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg3_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"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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_resource.Quantity
+ var v1 pkg1_v1.Time
+ var v2 pkg2_types.UID
+ var v3 pkg4_v1.ResourceName
+ var v4 time.Time
+ _, _, _, _, _ = v0, v1, v2, v3, v4
+ }
+}
+
+func (x *CrossVersionObjectReference) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = x.APIVersion != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(3)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CrossVersionObjectReference) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CrossVersionObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv6 := &x.Name
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv8 := &x.APIVersion
+ 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_containerMapEnd1234)
+}
+
+func (x *CrossVersionObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv11 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv13 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv15 := &x.APIVersion
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *HorizontalPodAutoscalerSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.MinReplicas != nil
+ yyq2[3] = x.TargetCPUUtilizationPercentage != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy4 := &x.ScaleTargetRef
+ yy4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("scaleTargetRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ScaleTargetRef
+ yy6.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.MinReplicas == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.MinReplicas
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(yy9))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("minReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.MinReplicas == nil {
+ r.EncodeNil()
+ } else {
+ yy11 := *x.MinReplicas
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeInt(int64(yy11))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MaxReplicas))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("maxReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MaxReplicas))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.TargetCPUUtilizationPercentage == nil {
+ r.EncodeNil()
+ } else {
+ yy17 := *x.TargetCPUUtilizationPercentage
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeInt(int64(yy17))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetCPUUtilizationPercentage"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TargetCPUUtilizationPercentage == nil {
+ r.EncodeNil()
+ } else {
+ yy19 := *x.TargetCPUUtilizationPercentage
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeInt(int64(yy19))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "scaleTargetRef":
+ if r.TryDecodeAsNil() {
+ x.ScaleTargetRef = CrossVersionObjectReference{}
+ } else {
+ yyv4 := &x.ScaleTargetRef
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "minReplicas":
+ if r.TryDecodeAsNil() {
+ if x.MinReplicas != nil {
+ x.MinReplicas = nil
+ }
+ } else {
+ if x.MinReplicas == nil {
+ x.MinReplicas = new(int32)
+ }
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*int32)(x.MinReplicas)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "maxReplicas":
+ if r.TryDecodeAsNil() {
+ x.MaxReplicas = 0
+ } else {
+ yyv7 := &x.MaxReplicas
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*int32)(yyv7)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "targetCPUUtilizationPercentage":
+ if r.TryDecodeAsNil() {
+ if x.TargetCPUUtilizationPercentage != nil {
+ x.TargetCPUUtilizationPercentage = nil
+ }
+ } else {
+ if x.TargetCPUUtilizationPercentage == nil {
+ x.TargetCPUUtilizationPercentage = new(int32)
+ }
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ *((*int32)(x.TargetCPUUtilizationPercentage)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HorizontalPodAutoscalerSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ScaleTargetRef = CrossVersionObjectReference{}
+ } else {
+ yyv12 := &x.ScaleTargetRef
+ yyv12.CodecDecodeSelf(d)
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.MinReplicas != nil {
+ x.MinReplicas = nil
+ }
+ } else {
+ if x.MinReplicas == nil {
+ x.MinReplicas = new(int32)
+ }
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ *((*int32)(x.MinReplicas)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MaxReplicas = 0
+ } else {
+ yyv15 := &x.MaxReplicas
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*int32)(yyv15)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.TargetCPUUtilizationPercentage != nil {
+ x.TargetCPUUtilizationPercentage = nil
+ }
+ } else {
+ if x.TargetCPUUtilizationPercentage == nil {
+ x.TargetCPUUtilizationPercentage = new(int32)
+ }
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int32)(x.TargetCPUUtilizationPercentage)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *HorizontalPodAutoscalerStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.ObservedGeneration != nil
+ yyq2[1] = x.LastScaleTime != nil
+ yyq2[4] = x.CurrentCPUUtilizationPercentage != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.ObservedGeneration == nil {
+ r.EncodeNil()
+ } else {
+ yy4 := *x.ObservedGeneration
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(yy4))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("observedGeneration"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ObservedGeneration == nil {
+ r.EncodeNil()
+ } else {
+ yy6 := *x.ObservedGeneration
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(yy6))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.LastScaleTime == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.LastScaleTime) {
+ } else if yym9 {
+ z.EncBinaryMarshal(x.LastScaleTime)
+ } else if !yym9 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.LastScaleTime)
+ } else {
+ z.EncFallback(x.LastScaleTime)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastScaleTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.LastScaleTime == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.LastScaleTime) {
+ } else if yym10 {
+ z.EncBinaryMarshal(x.LastScaleTime)
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.LastScaleTime)
+ } else {
+ z.EncFallback(x.LastScaleTime)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeInt(int64(x.CurrentReplicas))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.CurrentReplicas))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeInt(int64(x.DesiredReplicas))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("desiredReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(x.DesiredReplicas))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.CurrentCPUUtilizationPercentage == nil {
+ r.EncodeNil()
+ } else {
+ yy18 := *x.CurrentCPUUtilizationPercentage
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeInt(int64(yy18))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentCPUUtilizationPercentage"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.CurrentCPUUtilizationPercentage == nil {
+ r.EncodeNil()
+ } else {
+ yy20 := *x.CurrentCPUUtilizationPercentage
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeInt(int64(yy20))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "observedGeneration":
+ if r.TryDecodeAsNil() {
+ if x.ObservedGeneration != nil {
+ x.ObservedGeneration = nil
+ }
+ } else {
+ if x.ObservedGeneration == nil {
+ x.ObservedGeneration = new(int64)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "lastScaleTime":
+ if r.TryDecodeAsNil() {
+ if x.LastScaleTime != nil {
+ x.LastScaleTime = nil
+ }
+ } else {
+ if x.LastScaleTime == nil {
+ x.LastScaleTime = new(pkg1_v1.Time)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.LastScaleTime) {
+ } else if yym7 {
+ z.DecBinaryUnmarshal(x.LastScaleTime)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.LastScaleTime)
+ } else {
+ z.DecFallback(x.LastScaleTime, false)
+ }
+ }
+ case "currentReplicas":
+ if r.TryDecodeAsNil() {
+ x.CurrentReplicas = 0
+ } else {
+ yyv8 := &x.CurrentReplicas
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "desiredReplicas":
+ if r.TryDecodeAsNil() {
+ x.DesiredReplicas = 0
+ } else {
+ yyv10 := &x.DesiredReplicas
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(yyv10)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "currentCPUUtilizationPercentage":
+ if r.TryDecodeAsNil() {
+ if x.CurrentCPUUtilizationPercentage != nil {
+ x.CurrentCPUUtilizationPercentage = nil
+ }
+ } else {
+ if x.CurrentCPUUtilizationPercentage == nil {
+ x.CurrentCPUUtilizationPercentage = new(int32)
+ }
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int32)(x.CurrentCPUUtilizationPercentage)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HorizontalPodAutoscalerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ObservedGeneration != nil {
+ x.ObservedGeneration = nil
+ }
+ } else {
+ if x.ObservedGeneration == nil {
+ x.ObservedGeneration = new(int64)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.LastScaleTime != nil {
+ x.LastScaleTime = nil
+ }
+ } else {
+ if x.LastScaleTime == nil {
+ x.LastScaleTime = new(pkg1_v1.Time)
+ }
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.LastScaleTime) {
+ } else if yym18 {
+ z.DecBinaryUnmarshal(x.LastScaleTime)
+ } else if !yym18 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.LastScaleTime)
+ } else {
+ z.DecFallback(x.LastScaleTime, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentReplicas = 0
+ } else {
+ yyv19 := &x.CurrentReplicas
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*int32)(yyv19)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DesiredReplicas = 0
+ } else {
+ yyv21 := &x.DesiredReplicas
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int32)(yyv21)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.CurrentCPUUtilizationPercentage != nil {
+ x.CurrentCPUUtilizationPercentage = nil
+ }
+ } else {
+ if x.CurrentCPUUtilizationPercentage == nil {
+ x.CurrentCPUUtilizationPercentage = new(int32)
+ }
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*int32)(x.CurrentCPUUtilizationPercentage)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *HorizontalPodAutoscaler) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscaler) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscaler) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = HorizontalPodAutoscalerSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = HorizontalPodAutoscalerStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = HorizontalPodAutoscalerSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = HorizontalPodAutoscalerStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *HorizontalPodAutoscalerList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceHorizontalPodAutoscaler(([]HorizontalPodAutoscaler)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceHorizontalPodAutoscaler(([]HorizontalPodAutoscaler)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceHorizontalPodAutoscaler((*[]HorizontalPodAutoscaler)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HorizontalPodAutoscalerList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceHorizontalPodAutoscaler((*[]HorizontalPodAutoscaler)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Scale) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Scale) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Scale) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = ScaleSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ScaleStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = ScaleSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ScaleStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ScaleSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = x.Replicas != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ScaleSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ScaleSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "replicas":
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv4 := &x.Replicas
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(yyv4)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ScaleSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv7 := &x.Replicas
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*int32)(yyv7)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ScaleStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Selector != ""
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Selector))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Selector))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ScaleStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ScaleStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "replicas":
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv4 := &x.Replicas
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(yyv4)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ x.Selector = ""
+ } else {
+ yyv6 := &x.Selector
+ 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_containerMapEnd1234)
+}
+
+func (x *ScaleStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv9 := &x.Replicas
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ *((*int32)(yyv9)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Selector = ""
+ } else {
+ yyv11 := &x.Selector
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x MetricSourceType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *MetricSourceType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *MetricSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.Object != nil
+ yyq2[2] = x.Pods != nil
+ yyq2[3] = x.Resource != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Object == nil {
+ r.EncodeNil()
+ } else {
+ x.Object.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("object"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Object == nil {
+ r.EncodeNil()
+ } else {
+ x.Object.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Pods == nil {
+ r.EncodeNil()
+ } else {
+ x.Pods.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("pods"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Pods == nil {
+ r.EncodeNil()
+ } else {
+ x.Pods.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Resource == nil {
+ r.EncodeNil()
+ } else {
+ x.Resource.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resource"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Resource == nil {
+ r.EncodeNil()
+ } else {
+ x.Resource.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *MetricSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *MetricSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "object":
+ if r.TryDecodeAsNil() {
+ if x.Object != nil {
+ x.Object = nil
+ }
+ } else {
+ if x.Object == nil {
+ x.Object = new(ObjectMetricSource)
+ }
+ x.Object.CodecDecodeSelf(d)
+ }
+ case "pods":
+ if r.TryDecodeAsNil() {
+ if x.Pods != nil {
+ x.Pods = nil
+ }
+ } else {
+ if x.Pods == nil {
+ x.Pods = new(PodsMetricSource)
+ }
+ x.Pods.CodecDecodeSelf(d)
+ }
+ case "resource":
+ if r.TryDecodeAsNil() {
+ if x.Resource != nil {
+ x.Resource = nil
+ }
+ } else {
+ if x.Resource == nil {
+ x.Resource = new(ResourceMetricSource)
+ }
+ x.Resource.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *MetricSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv9 := &x.Type
+ yyv9.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Object != nil {
+ x.Object = nil
+ }
+ } else {
+ if x.Object == nil {
+ x.Object = new(ObjectMetricSource)
+ }
+ x.Object.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Pods != nil {
+ x.Pods = nil
+ }
+ } else {
+ if x.Pods == nil {
+ x.Pods = new(PodsMetricSource)
+ }
+ x.Pods.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Resource != nil {
+ x.Resource = nil
+ }
+ } else {
+ if x.Resource == nil {
+ x.Resource = new(ResourceMetricSource)
+ }
+ x.Resource.CodecDecodeSelf(d)
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ObjectMetricSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ yy4 := &x.Target
+ yy4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("target"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.Target
+ yy6.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metricName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy12 := &x.TargetValue
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetValue"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy14 := &x.TargetValue
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy14) {
+ } else if !yym15 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy14)
+ } else {
+ z.EncFallback(yy14)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ObjectMetricSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ObjectMetricSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "target":
+ if r.TryDecodeAsNil() {
+ x.Target = CrossVersionObjectReference{}
+ } else {
+ yyv4 := &x.Target
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "metricName":
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv5 := &x.MetricName
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*string)(yyv5)) = r.DecodeString()
+ }
+ }
+ case "targetValue":
+ if r.TryDecodeAsNil() {
+ x.TargetValue = pkg3_resource.Quantity{}
+ } else {
+ yyv7 := &x.TargetValue
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv7)
+ } else {
+ z.DecFallback(yyv7, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ObjectMetricSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Target = CrossVersionObjectReference{}
+ } else {
+ yyv10 := &x.Target
+ yyv10.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv11 := &x.MetricName
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*string)(yyv11)) = r.DecodeString()
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TargetValue = pkg3_resource.Quantity{}
+ } else {
+ yyv13 := &x.TargetValue
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv13) {
+ } else if !yym14 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv13)
+ } else {
+ z.DecFallback(yyv13, false)
+ }
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodsMetricSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metricName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy7 := &x.TargetAverageValue
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy7)
+ } else {
+ z.EncFallback(yy7)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetAverageValue"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.TargetAverageValue
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy9) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy9)
+ } else {
+ z.EncFallback(yy9)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodsMetricSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodsMetricSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "metricName":
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv4 := &x.MetricName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "targetAverageValue":
+ if r.TryDecodeAsNil() {
+ x.TargetAverageValue = pkg3_resource.Quantity{}
+ } else {
+ yyv6 := &x.TargetAverageValue
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodsMetricSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv9 := &x.MetricName
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TargetAverageValue = pkg3_resource.Quantity{}
+ } else {
+ yyv11 := &x.TargetAverageValue
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else if !yym12 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv11)
+ } else {
+ z.DecFallback(yyv11, false)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ResourceMetricSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.TargetAverageUtilization != nil
+ yyq2[2] = x.TargetAverageValue != nil
+ 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_containerArrayElem1234)
+ yysf4 := &x.Name
+ yysf4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yysf5 := &x.Name
+ yysf5.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.TargetAverageUtilization == nil {
+ r.EncodeNil()
+ } else {
+ yy7 := *x.TargetAverageUtilization
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(yy7))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetAverageUtilization"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TargetAverageUtilization == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.TargetAverageUtilization
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(yy9))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.TargetAverageValue == nil {
+ r.EncodeNil()
+ } else {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.TargetAverageValue) {
+ } else if !yym12 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.TargetAverageValue)
+ } else {
+ z.EncFallback(x.TargetAverageValue)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetAverageValue"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TargetAverageValue == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.TargetAverageValue) {
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.TargetAverageValue)
+ } else {
+ z.EncFallback(x.TargetAverageValue)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ResourceMetricSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ResourceMetricSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "targetAverageUtilization":
+ if r.TryDecodeAsNil() {
+ if x.TargetAverageUtilization != nil {
+ x.TargetAverageUtilization = nil
+ }
+ } else {
+ if x.TargetAverageUtilization == nil {
+ x.TargetAverageUtilization = new(int32)
+ }
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*int32)(x.TargetAverageUtilization)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "targetAverageValue":
+ if r.TryDecodeAsNil() {
+ if x.TargetAverageValue != nil {
+ x.TargetAverageValue = nil
+ }
+ } else {
+ if x.TargetAverageValue == nil {
+ x.TargetAverageValue = new(pkg3_resource.Quantity)
+ }
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.TargetAverageValue) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.TargetAverageValue)
+ } else {
+ z.DecFallback(x.TargetAverageValue, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ResourceMetricSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv10 := &x.Name
+ yyv10.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.TargetAverageUtilization != nil {
+ x.TargetAverageUtilization = nil
+ }
+ } else {
+ if x.TargetAverageUtilization == nil {
+ x.TargetAverageUtilization = new(int32)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int32)(x.TargetAverageUtilization)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.TargetAverageValue != nil {
+ x.TargetAverageValue = nil
+ }
+ } else {
+ if x.TargetAverageValue == nil {
+ x.TargetAverageValue = new(pkg3_resource.Quantity)
+ }
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.TargetAverageValue) {
+ } else if !yym14 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.TargetAverageValue)
+ } else {
+ z.DecFallback(x.TargetAverageValue, false)
+ }
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *MetricStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.Object != nil
+ yyq2[2] = x.Pods != nil
+ yyq2[3] = x.Resource != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Object == nil {
+ r.EncodeNil()
+ } else {
+ x.Object.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("object"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Object == nil {
+ r.EncodeNil()
+ } else {
+ x.Object.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Pods == nil {
+ r.EncodeNil()
+ } else {
+ x.Pods.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("pods"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Pods == nil {
+ r.EncodeNil()
+ } else {
+ x.Pods.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Resource == nil {
+ r.EncodeNil()
+ } else {
+ x.Resource.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resource"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Resource == nil {
+ r.EncodeNil()
+ } else {
+ x.Resource.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *MetricStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *MetricStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "object":
+ if r.TryDecodeAsNil() {
+ if x.Object != nil {
+ x.Object = nil
+ }
+ } else {
+ if x.Object == nil {
+ x.Object = new(ObjectMetricStatus)
+ }
+ x.Object.CodecDecodeSelf(d)
+ }
+ case "pods":
+ if r.TryDecodeAsNil() {
+ if x.Pods != nil {
+ x.Pods = nil
+ }
+ } else {
+ if x.Pods == nil {
+ x.Pods = new(PodsMetricStatus)
+ }
+ x.Pods.CodecDecodeSelf(d)
+ }
+ case "resource":
+ if r.TryDecodeAsNil() {
+ if x.Resource != nil {
+ x.Resource = nil
+ }
+ } else {
+ if x.Resource == nil {
+ x.Resource = new(ResourceMetricStatus)
+ }
+ x.Resource.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *MetricStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv9 := &x.Type
+ yyv9.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Object != nil {
+ x.Object = nil
+ }
+ } else {
+ if x.Object == nil {
+ x.Object = new(ObjectMetricStatus)
+ }
+ x.Object.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Pods != nil {
+ x.Pods = nil
+ }
+ } else {
+ if x.Pods == nil {
+ x.Pods = new(PodsMetricStatus)
+ }
+ x.Pods.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Resource != nil {
+ x.Resource = nil
+ }
+ } else {
+ if x.Resource == nil {
+ x.Resource = new(ResourceMetricStatus)
+ }
+ x.Resource.CodecDecodeSelf(d)
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x HorizontalPodAutoscalerConditionType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *HorizontalPodAutoscalerConditionType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *HorizontalPodAutoscalerCondition) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = true
+ yyq2[3] = x.Reason != ""
+ yyq2[4] = x.Message != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yysf7 := &x.Status
+ yysf7.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yysf8 := &x.Status
+ yysf8.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy10 := &x.LastTransitionTime
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy10) {
+ } else if yym11 {
+ z.EncBinaryMarshal(yy10)
+ } else if !yym11 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy10)
+ } else {
+ z.EncFallback(yy10)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.LastTransitionTime
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if yym13 {
+ z.EncBinaryMarshal(yy12)
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerCondition) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "lastTransitionTime":
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg1_v1.Time{}
+ } else {
+ yyv6 := &x.LastTransitionTime
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if yym7 {
+ z.DecBinaryUnmarshal(yyv6)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv8 := &x.Reason
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv10 := &x.Message
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HorizontalPodAutoscalerCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv13 := &x.Type
+ yyv13.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv14 := &x.Status
+ yyv14.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg1_v1.Time{}
+ } else {
+ yyv15 := &x.LastTransitionTime
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv15) {
+ } else if yym16 {
+ z.DecBinaryUnmarshal(yyv15)
+ } else if !yym16 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv15)
+ } else {
+ z.DecFallback(yyv15, false)
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv17 := &x.Reason
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv19 := &x.Message
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ObjectMetricStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ yy4 := &x.Target
+ yy4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("target"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.Target
+ yy6.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metricName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy12 := &x.CurrentValue
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentValue"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy14 := &x.CurrentValue
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy14) {
+ } else if !yym15 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy14)
+ } else {
+ z.EncFallback(yy14)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ObjectMetricStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ObjectMetricStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "target":
+ if r.TryDecodeAsNil() {
+ x.Target = CrossVersionObjectReference{}
+ } else {
+ yyv4 := &x.Target
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "metricName":
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv5 := &x.MetricName
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*string)(yyv5)) = r.DecodeString()
+ }
+ }
+ case "currentValue":
+ if r.TryDecodeAsNil() {
+ x.CurrentValue = pkg3_resource.Quantity{}
+ } else {
+ yyv7 := &x.CurrentValue
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv7)
+ } else {
+ z.DecFallback(yyv7, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ObjectMetricStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Target = CrossVersionObjectReference{}
+ } else {
+ yyv10 := &x.Target
+ yyv10.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv11 := &x.MetricName
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*string)(yyv11)) = r.DecodeString()
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentValue = pkg3_resource.Quantity{}
+ } else {
+ yyv13 := &x.CurrentValue
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv13) {
+ } else if !yym14 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv13)
+ } else {
+ z.DecFallback(yyv13, false)
+ }
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodsMetricStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metricName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy7 := &x.CurrentAverageValue
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy7)
+ } else {
+ z.EncFallback(yy7)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentAverageValue"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.CurrentAverageValue
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy9) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy9)
+ } else {
+ z.EncFallback(yy9)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodsMetricStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodsMetricStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "metricName":
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv4 := &x.MetricName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "currentAverageValue":
+ if r.TryDecodeAsNil() {
+ x.CurrentAverageValue = pkg3_resource.Quantity{}
+ } else {
+ yyv6 := &x.CurrentAverageValue
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodsMetricStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv9 := &x.MetricName
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentAverageValue = pkg3_resource.Quantity{}
+ } else {
+ yyv11 := &x.CurrentAverageValue
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else if !yym12 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv11)
+ } else {
+ z.DecFallback(yyv11, false)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ResourceMetricStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.CurrentAverageUtilization != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(3)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yysf4 := &x.Name
+ yysf4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yysf5 := &x.Name
+ yysf5.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.CurrentAverageUtilization == nil {
+ r.EncodeNil()
+ } else {
+ yy7 := *x.CurrentAverageUtilization
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(yy7))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentAverageUtilization"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.CurrentAverageUtilization == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.CurrentAverageUtilization
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(yy9))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy12 := &x.CurrentAverageValue
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentAverageValue"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy14 := &x.CurrentAverageValue
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy14) {
+ } else if !yym15 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy14)
+ } else {
+ z.EncFallback(yy14)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ResourceMetricStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ResourceMetricStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "currentAverageUtilization":
+ if r.TryDecodeAsNil() {
+ if x.CurrentAverageUtilization != nil {
+ x.CurrentAverageUtilization = nil
+ }
+ } else {
+ if x.CurrentAverageUtilization == nil {
+ x.CurrentAverageUtilization = new(int32)
+ }
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*int32)(x.CurrentAverageUtilization)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "currentAverageValue":
+ if r.TryDecodeAsNil() {
+ x.CurrentAverageValue = pkg3_resource.Quantity{}
+ } else {
+ yyv7 := &x.CurrentAverageValue
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv7)
+ } else {
+ z.DecFallback(yyv7, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ResourceMetricStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv10 := &x.Name
+ yyv10.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.CurrentAverageUtilization != nil {
+ x.CurrentAverageUtilization = nil
+ }
+ } else {
+ if x.CurrentAverageUtilization == nil {
+ x.CurrentAverageUtilization = new(int32)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int32)(x.CurrentAverageUtilization)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentAverageValue = pkg3_resource.Quantity{}
+ } else {
+ yyv13 := &x.CurrentAverageValue
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv13) {
+ } else if !yym14 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv13)
+ } else {
+ z.DecFallback(yyv13, false)
+ }
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encSliceHorizontalPodAutoscaler(v []HorizontalPodAutoscaler, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceHorizontalPodAutoscaler(v *[]HorizontalPodAutoscaler, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []HorizontalPodAutoscaler{}
+ 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, 368)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]HorizontalPodAutoscaler, yyrl1)
+ }
+ } else {
+ yyv1 = make([]HorizontalPodAutoscaler, 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] = HorizontalPodAutoscaler{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, HorizontalPodAutoscaler{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = HorizontalPodAutoscaler{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, HorizontalPodAutoscaler{}) // var yyz1 HorizontalPodAutoscaler
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = HorizontalPodAutoscaler{}
+ } 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 = []HorizontalPodAutoscaler{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/types.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/types.go
new file mode 100644
index 000000000..4132f5291
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/types.go
@@ -0,0 +1,332 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/api/resource"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/client-go/pkg/api/v1"
+)
+
+// CrossVersionObjectReference contains enough information to let you identify the referred resource.
+type CrossVersionObjectReference struct {
+ // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"
+ Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
+ // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
+ Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
+ // API version of the referent
+ // +optional
+ APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"`
+}
+
+// specification of a horizontal pod autoscaler.
+type HorizontalPodAutoscalerSpec struct {
+ // reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption
+ // and will set the desired number of pods by using its Scale subresource.
+ ScaleTargetRef CrossVersionObjectReference `json:"scaleTargetRef" protobuf:"bytes,1,opt,name=scaleTargetRef"`
+ // lower limit for the number of pods that can be set by the autoscaler, default 1.
+ // +optional
+ MinReplicas *int32 `json:"minReplicas,omitempty" protobuf:"varint,2,opt,name=minReplicas"`
+ // upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
+ MaxReplicas int32 `json:"maxReplicas" protobuf:"varint,3,opt,name=maxReplicas"`
+ // target average CPU utilization (represented as a percentage of requested CPU) over all the pods;
+ // if not specified the default autoscaling policy will be used.
+ // +optional
+ TargetCPUUtilizationPercentage *int32 `json:"targetCPUUtilizationPercentage,omitempty" protobuf:"varint,4,opt,name=targetCPUUtilizationPercentage"`
+}
+
+// current status of a horizontal pod autoscaler
+type HorizontalPodAutoscalerStatus struct {
+ // most recent generation observed by this autoscaler.
+ // +optional
+ ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
+
+ // last time the HorizontalPodAutoscaler scaled the number of pods;
+ // used by the autoscaler to control how often the number of pods is changed.
+ // +optional
+ LastScaleTime *metav1.Time `json:"lastScaleTime,omitempty" protobuf:"bytes,2,opt,name=lastScaleTime"`
+
+ // current number of replicas of pods managed by this autoscaler.
+ CurrentReplicas int32 `json:"currentReplicas" protobuf:"varint,3,opt,name=currentReplicas"`
+
+ // desired number of replicas of pods managed by this autoscaler.
+ DesiredReplicas int32 `json:"desiredReplicas" protobuf:"varint,4,opt,name=desiredReplicas"`
+
+ // current average CPU utilization over all pods, represented as a percentage of requested CPU,
+ // e.g. 70 means that an average pod is using now 70% of its requested CPU.
+ // +optional
+ CurrentCPUUtilizationPercentage *int32 `json:"currentCPUUtilizationPercentage,omitempty" protobuf:"varint,5,opt,name=currentCPUUtilizationPercentage"`
+}
+
+// +genclient=true
+
+// configuration of a horizontal pod autoscaler.
+type HorizontalPodAutoscaler struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
+ // +optional
+ Spec HorizontalPodAutoscalerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // current information about the autoscaler.
+ // +optional
+ Status HorizontalPodAutoscalerStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// list of horizontal pod autoscaler objects.
+type HorizontalPodAutoscalerList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // list of horizontal pod autoscaler objects.
+ Items []HorizontalPodAutoscaler `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// Scale represents a scaling request for a resource.
+type Scale struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
+ // +optional
+ Spec ScaleSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.
+ // +optional
+ Status ScaleStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// ScaleSpec describes the attributes of a scale subresource.
+type ScaleSpec struct {
+ // desired number of instances for the scaled object.
+ // +optional
+ Replicas int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
+}
+
+// ScaleStatus represents the current status of a scale subresource.
+type ScaleStatus struct {
+ // actual number of observed instances of the scaled object.
+ Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"`
+
+ // label query over pods that should match the replicas count. This is same
+ // as the label selector but in the string format to avoid introspection
+ // by clients. The string will be in the same format as the query-param syntax.
+ // More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors
+ // +optional
+ Selector string `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
+}
+
+// the types below are used in the alpha metrics annotation
+
+// MetricSourceType indicates the type of metric.
+type MetricSourceType string
+
+var (
+ // ObjectMetricSourceType is a metric describing a kubernetes object
+ // (for example, hits-per-second on an Ingress object).
+ ObjectMetricSourceType MetricSourceType = "Object"
+ // PodsMetricSourceType is a metric describing each pod in the current scale
+ // target (for example, transactions-processed-per-second). The values
+ // will be averaged together before being compared to the target value.
+ PodsMetricSourceType MetricSourceType = "Pods"
+ // ResourceMetricSourceType is a resource metric known to Kubernetes, as
+ // specified in requests and limits, describing each pod in the current
+ // scale target (e.g. CPU or memory). Such metrics are built in to
+ // Kubernetes, and have special scaling options on top of those available
+ // to normal per-pod metrics (the "pods" source).
+ ResourceMetricSourceType MetricSourceType = "Resource"
+)
+
+// MetricSpec specifies how to scale based on a single metric
+// (only `type` and one other matching field should be set at once).
+type MetricSpec struct {
+ // type is the type of metric source. It should match one of the fields below.
+ Type MetricSourceType `json:"type" protobuf:"bytes,1,name=type"`
+
+ // object refers to a metric describing a single kubernetes object
+ // (for example, hits-per-second on an Ingress object).
+ // +optional
+ Object *ObjectMetricSource `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"`
+ // pods refers to a metric describing each pod in the current scale target
+ // (for example, transactions-processed-per-second). The values will be
+ // averaged together before being compared to the target value.
+ // +optional
+ Pods *PodsMetricSource `json:"pods,omitempty" protobuf:"bytes,3,opt,name=pods"`
+ // resource refers to a resource metric (such as those specified in
+ // requests and limits) known to Kubernetes describing each pod in the
+ // current scale target (e.g. CPU or memory). Such metrics are built in to
+ // Kubernetes, and have special scaling options on top of those available
+ // to normal per-pod metrics using the "pods" source.
+ // +optional
+ Resource *ResourceMetricSource `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"`
+}
+
+// ObjectMetricSource indicates how to scale on a metric describing a
+// kubernetes object (for example, hits-per-second on an Ingress object).
+type ObjectMetricSource struct {
+ // target is the described Kubernetes object.
+ Target CrossVersionObjectReference `json:"target" protobuf:"bytes,1,name=target"`
+
+ // metricName is the name of the metric in question.
+ MetricName string `json:"metricName" protobuf:"bytes,2,name=metricName"`
+ // targetValue is the target value of the metric (as a quantity).
+ TargetValue resource.Quantity `json:"targetValue" protobuf:"bytes,3,name=targetValue"`
+}
+
+// PodsMetricSource indicates how to scale on a metric describing each pod in
+// the current scale target (for example, transactions-processed-per-second).
+// The values will be averaged together before being compared to the target
+// value.
+type PodsMetricSource struct {
+ // metricName is the name of the metric in question
+ MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"`
+ // targetAverageValue is the target value of the average of the
+ // metric across all relevant pods (as a quantity)
+ TargetAverageValue resource.Quantity `json:"targetAverageValue" protobuf:"bytes,2,name=targetAverageValue"`
+}
+
+// ResourceMetricSource indicates how to scale on a resource metric known to
+// Kubernetes, as specified in requests and limits, describing each pod in the
+// current scale target (e.g. CPU or memory). The values will be averaged
+// together before being compared to the target. Such metrics are built in to
+// Kubernetes, and have special scaling options on top of those available to
+// normal per-pod metrics using the "pods" source. Only one "target" type
+// should be set.
+type ResourceMetricSource struct {
+ // name is the name of the resource in question.
+ Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
+ // targetAverageUtilization is the target value of the average of the
+ // resource metric across all relevant pods, represented as a percentage of
+ // the requested value of the resource for the pods.
+ // +optional
+ TargetAverageUtilization *int32 `json:"targetAverageUtilization,omitempty" protobuf:"varint,2,opt,name=targetAverageUtilization"`
+ // targetAverageValue is the target value of the average of the
+ // resource metric across all relevant pods, as a raw value (instead of as
+ // a percentage of the request), similar to the "pods" metric source type.
+ // +optional
+ TargetAverageValue *resource.Quantity `json:"targetAverageValue,omitempty" protobuf:"bytes,3,opt,name=targetAverageValue"`
+}
+
+// MetricStatus describes the last-read state of a single metric.
+type MetricStatus struct {
+ // type is the type of metric source. It will match one of the fields below.
+ Type MetricSourceType `json:"type" protobuf:"bytes,1,name=type"`
+
+ // object refers to a metric describing a single kubernetes object
+ // (for example, hits-per-second on an Ingress object).
+ // +optional
+ Object *ObjectMetricStatus `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"`
+ // pods refers to a metric describing each pod in the current scale target
+ // (for example, transactions-processed-per-second). The values will be
+ // averaged together before being compared to the target value.
+ // +optional
+ Pods *PodsMetricStatus `json:"pods,omitempty" protobuf:"bytes,3,opt,name=pods"`
+ // resource refers to a resource metric (such as those specified in
+ // requests and limits) known to Kubernetes describing each pod in the
+ // current scale target (e.g. CPU or memory). Such metrics are built in to
+ // Kubernetes, and have special scaling options on top of those available
+ // to normal per-pod metrics using the "pods" source.
+ // +optional
+ Resource *ResourceMetricStatus `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"`
+}
+
+// HorizontalPodAutoscalerConditionType are the valid conditions of
+// a HorizontalPodAutoscaler.
+type HorizontalPodAutoscalerConditionType string
+
+var (
+ // ScalingActive indicates that the HPA controller is able to scale if necessary:
+ // it's correctly configured, can fetch the desired metrics, and isn't disabled.
+ ScalingActive HorizontalPodAutoscalerConditionType = "ScalingActive"
+ // AbleToScale indicates a lack of transient issues which prevent scaling from occuring,
+ // such as being in a backoff window, or being unable to access/update the target scale.
+ AbleToScale HorizontalPodAutoscalerConditionType = "AbleToScale"
+ // ScalingLimited indicates that the calculated scale based on metrics would be above or
+ // below the range for the HPA, and has thus been capped.
+ ScalingLimited HorizontalPodAutoscalerConditionType = "ScalingLimited"
+)
+
+// HorizontalPodAutoscalerCondition describes the state of
+// a HorizontalPodAutoscaler at a certain point.
+type HorizontalPodAutoscalerCondition struct {
+ // type describes the current condition
+ Type HorizontalPodAutoscalerConditionType `json:"type" protobuf:"bytes,1,name=type"`
+ // status is the status of the condition (True, False, Unknown)
+ Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,name=status"`
+ // lastTransitionTime is the last time the condition transitioned from
+ // one status to another
+ // +optional
+ LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
+ // reason is the reason for the condition's last transition.
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
+ // message is a human-readable explanation containing details about
+ // the transition
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
+}
+
+// ObjectMetricStatus indicates the current value of a metric describing a
+// kubernetes object (for example, hits-per-second on an Ingress object).
+type ObjectMetricStatus struct {
+ // target is the described Kubernetes object.
+ Target CrossVersionObjectReference `json:"target" protobuf:"bytes,1,name=target"`
+
+ // metricName is the name of the metric in question.
+ MetricName string `json:"metricName" protobuf:"bytes,2,name=metricName"`
+ // currentValue is the current value of the metric (as a quantity).
+ CurrentValue resource.Quantity `json:"currentValue" protobuf:"bytes,3,name=currentValue"`
+}
+
+// PodsMetricStatus indicates the current value of a metric describing each pod in
+// the current scale target (for example, transactions-processed-per-second).
+type PodsMetricStatus struct {
+ // metricName is the name of the metric in question
+ MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"`
+ // currentAverageValue is the current value of the average of the
+ // metric across all relevant pods (as a quantity)
+ CurrentAverageValue resource.Quantity `json:"currentAverageValue" protobuf:"bytes,2,name=currentAverageValue"`
+}
+
+// ResourceMetricStatus indicates the current value of a resource metric known to
+// Kubernetes, as specified in requests and limits, describing each pod in the
+// current scale target (e.g. CPU or memory). Such metrics are built in to
+// Kubernetes, and have special scaling options on top of those available to
+// normal per-pod metrics using the "pods" source.
+type ResourceMetricStatus struct {
+ // name is the name of the resource in question.
+ Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
+ // currentAverageUtilization is the current value of the average of the
+ // resource metric across all relevant pods, represented as a percentage of
+ // the requested value of the resource for the pods. It will only be
+ // present if `targetAverageValue` was set in the corresponding metric
+ // specification.
+ // +optional
+ CurrentAverageUtilization *int32 `json:"currentAverageUtilization,omitempty" protobuf:"bytes,2,opt,name=currentAverageUtilization"`
+ // currentAverageValue is the current value of the average of the
+ // resource metric across all relevant pods, as a raw value (instead of as
+ // a percentage of the request), similar to the "pods" metric source type.
+ // It will always be set, regardless of the corresponding metric specification.
+ CurrentAverageValue resource.Quantity `json:"currentAverageValue" protobuf:"bytes,3,name=currentAverageValue"`
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..7f84c2d93
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/types_swagger_doc_generated.go
@@ -0,0 +1,218 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_CrossVersionObjectReference = map[string]string{
+ "": "CrossVersionObjectReference contains enough information to let you identify the referred resource.",
+ "kind": "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds\"",
+ "name": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
+ "apiVersion": "API version of the referent",
+}
+
+func (CrossVersionObjectReference) SwaggerDoc() map[string]string {
+ return map_CrossVersionObjectReference
+}
+
+var map_HorizontalPodAutoscaler = map[string]string{
+ "": "configuration of a horizontal pod autoscaler.",
+ "metadata": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.",
+ "status": "current information about the autoscaler.",
+}
+
+func (HorizontalPodAutoscaler) SwaggerDoc() map[string]string {
+ return map_HorizontalPodAutoscaler
+}
+
+var map_HorizontalPodAutoscalerCondition = map[string]string{
+ "": "HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.",
+ "type": "type describes the current condition",
+ "status": "status is the status of the condition (True, False, Unknown)",
+ "lastTransitionTime": "lastTransitionTime is the last time the condition transitioned from one status to another",
+ "reason": "reason is the reason for the condition's last transition.",
+ "message": "message is a human-readable explanation containing details about the transition",
+}
+
+func (HorizontalPodAutoscalerCondition) SwaggerDoc() map[string]string {
+ return map_HorizontalPodAutoscalerCondition
+}
+
+var map_HorizontalPodAutoscalerList = map[string]string{
+ "": "list of horizontal pod autoscaler objects.",
+ "metadata": "Standard list metadata.",
+ "items": "list of horizontal pod autoscaler objects.",
+}
+
+func (HorizontalPodAutoscalerList) SwaggerDoc() map[string]string {
+ return map_HorizontalPodAutoscalerList
+}
+
+var map_HorizontalPodAutoscalerSpec = map[string]string{
+ "": "specification of a horizontal pod autoscaler.",
+ "scaleTargetRef": "reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource.",
+ "minReplicas": "lower limit for the number of pods that can be set by the autoscaler, default 1.",
+ "maxReplicas": "upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.",
+ "targetCPUUtilizationPercentage": "target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.",
+}
+
+func (HorizontalPodAutoscalerSpec) SwaggerDoc() map[string]string {
+ return map_HorizontalPodAutoscalerSpec
+}
+
+var map_HorizontalPodAutoscalerStatus = map[string]string{
+ "": "current status of a horizontal pod autoscaler",
+ "observedGeneration": "most recent generation observed by this autoscaler.",
+ "lastScaleTime": "last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed.",
+ "currentReplicas": "current number of replicas of pods managed by this autoscaler.",
+ "desiredReplicas": "desired number of replicas of pods managed by this autoscaler.",
+ "currentCPUUtilizationPercentage": "current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.",
+}
+
+func (HorizontalPodAutoscalerStatus) SwaggerDoc() map[string]string {
+ return map_HorizontalPodAutoscalerStatus
+}
+
+var map_MetricSpec = map[string]string{
+ "": "MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).",
+ "type": "type is the type of metric source. It should match one of the fields below.",
+ "object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).",
+ "pods": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.",
+ "resource": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.",
+}
+
+func (MetricSpec) SwaggerDoc() map[string]string {
+ return map_MetricSpec
+}
+
+var map_MetricStatus = map[string]string{
+ "": "MetricStatus describes the last-read state of a single metric.",
+ "type": "type is the type of metric source. It will match one of the fields below.",
+ "object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).",
+ "pods": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.",
+ "resource": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.",
+}
+
+func (MetricStatus) SwaggerDoc() map[string]string {
+ return map_MetricStatus
+}
+
+var map_ObjectMetricSource = map[string]string{
+ "": "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).",
+ "target": "target is the described Kubernetes object.",
+ "metricName": "metricName is the name of the metric in question.",
+ "targetValue": "targetValue is the target value of the metric (as a quantity).",
+}
+
+func (ObjectMetricSource) SwaggerDoc() map[string]string {
+ return map_ObjectMetricSource
+}
+
+var map_ObjectMetricStatus = map[string]string{
+ "": "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).",
+ "target": "target is the described Kubernetes object.",
+ "metricName": "metricName is the name of the metric in question.",
+ "currentValue": "currentValue is the current value of the metric (as a quantity).",
+}
+
+func (ObjectMetricStatus) SwaggerDoc() map[string]string {
+ return map_ObjectMetricStatus
+}
+
+var map_PodsMetricSource = map[string]string{
+ "": "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.",
+ "metricName": "metricName is the name of the metric in question",
+ "targetAverageValue": "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)",
+}
+
+func (PodsMetricSource) SwaggerDoc() map[string]string {
+ return map_PodsMetricSource
+}
+
+var map_PodsMetricStatus = map[string]string{
+ "": "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).",
+ "metricName": "metricName is the name of the metric in question",
+ "currentAverageValue": "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)",
+}
+
+func (PodsMetricStatus) SwaggerDoc() map[string]string {
+ return map_PodsMetricStatus
+}
+
+var map_ResourceMetricSource = map[string]string{
+ "": "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.",
+ "name": "name is the name of the resource in question.",
+ "targetAverageUtilization": "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.",
+ "targetAverageValue": "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.",
+}
+
+func (ResourceMetricSource) SwaggerDoc() map[string]string {
+ return map_ResourceMetricSource
+}
+
+var map_ResourceMetricStatus = map[string]string{
+ "": "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.",
+ "name": "name is the name of the resource in question.",
+ "currentAverageUtilization": "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.",
+ "currentAverageValue": "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.",
+}
+
+func (ResourceMetricStatus) SwaggerDoc() map[string]string {
+ return map_ResourceMetricStatus
+}
+
+var map_Scale = map[string]string{
+ "": "Scale represents a scaling request for a resource.",
+ "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.",
+ "spec": "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.",
+ "status": "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.",
+}
+
+func (Scale) SwaggerDoc() map[string]string {
+ return map_Scale
+}
+
+var map_ScaleSpec = map[string]string{
+ "": "ScaleSpec describes the attributes of a scale subresource.",
+ "replicas": "desired number of instances for the scaled object.",
+}
+
+func (ScaleSpec) SwaggerDoc() map[string]string {
+ return map_ScaleSpec
+}
+
+var map_ScaleStatus = map[string]string{
+ "": "ScaleStatus represents the current status of a scale subresource.",
+ "replicas": "actual number of observed instances of the scaled object.",
+ "selector": "label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors",
+}
+
+func (ScaleStatus) SwaggerDoc() map[string]string {
+ return map_ScaleStatus
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.conversion.go
new file mode 100644
index 000000000..12c064849
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.conversion.go
@@ -0,0 +1,506 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1
+
+import (
+ resource "k8s.io/apimachinery/pkg/api/resource"
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api "k8s.io/client-go/pkg/api"
+ api_v1 "k8s.io/client-go/pkg/api/v1"
+ autoscaling "k8s.io/client-go/pkg/apis/autoscaling"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference,
+ Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference,
+ Convert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler,
+ Convert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler,
+ Convert_v1_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition,
+ Convert_autoscaling_HorizontalPodAutoscalerCondition_To_v1_HorizontalPodAutoscalerCondition,
+ Convert_v1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList,
+ Convert_autoscaling_HorizontalPodAutoscalerList_To_v1_HorizontalPodAutoscalerList,
+ Convert_v1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec,
+ Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscalerSpec,
+ Convert_v1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus,
+ Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus,
+ Convert_v1_MetricSpec_To_autoscaling_MetricSpec,
+ Convert_autoscaling_MetricSpec_To_v1_MetricSpec,
+ Convert_v1_MetricStatus_To_autoscaling_MetricStatus,
+ Convert_autoscaling_MetricStatus_To_v1_MetricStatus,
+ Convert_v1_ObjectMetricSource_To_autoscaling_ObjectMetricSource,
+ Convert_autoscaling_ObjectMetricSource_To_v1_ObjectMetricSource,
+ Convert_v1_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus,
+ Convert_autoscaling_ObjectMetricStatus_To_v1_ObjectMetricStatus,
+ Convert_v1_PodsMetricSource_To_autoscaling_PodsMetricSource,
+ Convert_autoscaling_PodsMetricSource_To_v1_PodsMetricSource,
+ Convert_v1_PodsMetricStatus_To_autoscaling_PodsMetricStatus,
+ Convert_autoscaling_PodsMetricStatus_To_v1_PodsMetricStatus,
+ Convert_v1_ResourceMetricSource_To_autoscaling_ResourceMetricSource,
+ Convert_autoscaling_ResourceMetricSource_To_v1_ResourceMetricSource,
+ Convert_v1_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus,
+ Convert_autoscaling_ResourceMetricStatus_To_v1_ResourceMetricStatus,
+ Convert_v1_Scale_To_autoscaling_Scale,
+ Convert_autoscaling_Scale_To_v1_Scale,
+ Convert_v1_ScaleSpec_To_autoscaling_ScaleSpec,
+ Convert_autoscaling_ScaleSpec_To_v1_ScaleSpec,
+ Convert_v1_ScaleStatus_To_autoscaling_ScaleStatus,
+ Convert_autoscaling_ScaleStatus_To_v1_ScaleStatus,
+ )
+}
+
+func autoConvert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in *CrossVersionObjectReference, out *autoscaling.CrossVersionObjectReference, s conversion.Scope) error {
+ out.Kind = in.Kind
+ out.Name = in.Name
+ out.APIVersion = in.APIVersion
+ return nil
+}
+
+// Convert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference is an autogenerated conversion function.
+func Convert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in *CrossVersionObjectReference, out *autoscaling.CrossVersionObjectReference, s conversion.Scope) error {
+ return autoConvert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in, out, s)
+}
+
+func autoConvert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference(in *autoscaling.CrossVersionObjectReference, out *CrossVersionObjectReference, s conversion.Scope) error {
+ out.Kind = in.Kind
+ out.Name = in.Name
+ out.APIVersion = in.APIVersion
+ return nil
+}
+
+// Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference is an autogenerated conversion function.
+func Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference(in *autoscaling.CrossVersionObjectReference, out *CrossVersionObjectReference, s conversion.Scope) error {
+ return autoConvert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference(in, out, s)
+}
+
+func autoConvert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func autoConvert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func autoConvert_v1_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition(in *HorizontalPodAutoscalerCondition, out *autoscaling.HorizontalPodAutoscalerCondition, s conversion.Scope) error {
+ out.Type = autoscaling.HorizontalPodAutoscalerConditionType(in.Type)
+ out.Status = autoscaling.ConditionStatus(in.Status)
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_v1_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition is an autogenerated conversion function.
+func Convert_v1_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition(in *HorizontalPodAutoscalerCondition, out *autoscaling.HorizontalPodAutoscalerCondition, s conversion.Scope) error {
+ return autoConvert_v1_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition(in, out, s)
+}
+
+func autoConvert_autoscaling_HorizontalPodAutoscalerCondition_To_v1_HorizontalPodAutoscalerCondition(in *autoscaling.HorizontalPodAutoscalerCondition, out *HorizontalPodAutoscalerCondition, s conversion.Scope) error {
+ out.Type = HorizontalPodAutoscalerConditionType(in.Type)
+ out.Status = api_v1.ConditionStatus(in.Status)
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_autoscaling_HorizontalPodAutoscalerCondition_To_v1_HorizontalPodAutoscalerCondition is an autogenerated conversion function.
+func Convert_autoscaling_HorizontalPodAutoscalerCondition_To_v1_HorizontalPodAutoscalerCondition(in *autoscaling.HorizontalPodAutoscalerCondition, out *HorizontalPodAutoscalerCondition, s conversion.Scope) error {
+ return autoConvert_autoscaling_HorizontalPodAutoscalerCondition_To_v1_HorizontalPodAutoscalerCondition(in, out, s)
+}
+
+func autoConvert_v1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in *HorizontalPodAutoscalerList, out *autoscaling.HorizontalPodAutoscalerList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]autoscaling.HorizontalPodAutoscaler, len(*in))
+ for i := range *in {
+ if err := Convert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList is an autogenerated conversion function.
+func Convert_v1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in *HorizontalPodAutoscalerList, out *autoscaling.HorizontalPodAutoscalerList, s conversion.Scope) error {
+ return autoConvert_v1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in, out, s)
+}
+
+func autoConvert_autoscaling_HorizontalPodAutoscalerList_To_v1_HorizontalPodAutoscalerList(in *autoscaling.HorizontalPodAutoscalerList, out *HorizontalPodAutoscalerList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]HorizontalPodAutoscaler, len(*in))
+ for i := range *in {
+ if err := Convert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]HorizontalPodAutoscaler, 0)
+ }
+ return nil
+}
+
+// Convert_autoscaling_HorizontalPodAutoscalerList_To_v1_HorizontalPodAutoscalerList is an autogenerated conversion function.
+func Convert_autoscaling_HorizontalPodAutoscalerList_To_v1_HorizontalPodAutoscalerList(in *autoscaling.HorizontalPodAutoscalerList, out *HorizontalPodAutoscalerList, s conversion.Scope) error {
+ return autoConvert_autoscaling_HorizontalPodAutoscalerList_To_v1_HorizontalPodAutoscalerList(in, out, s)
+}
+
+func autoConvert_v1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in *HorizontalPodAutoscalerSpec, out *autoscaling.HorizontalPodAutoscalerSpec, s conversion.Scope) error {
+ if err := Convert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(&in.ScaleTargetRef, &out.ScaleTargetRef, s); err != nil {
+ return err
+ }
+ out.MinReplicas = (*int32)(unsafe.Pointer(in.MinReplicas))
+ out.MaxReplicas = in.MaxReplicas
+ // WARNING: in.TargetCPUUtilizationPercentage requires manual conversion: does not exist in peer-type
+ return nil
+}
+
+func autoConvert_autoscaling_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscalerSpec(in *autoscaling.HorizontalPodAutoscalerSpec, out *HorizontalPodAutoscalerSpec, s conversion.Scope) error {
+ if err := Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference(&in.ScaleTargetRef, &out.ScaleTargetRef, s); err != nil {
+ return err
+ }
+ out.MinReplicas = (*int32)(unsafe.Pointer(in.MinReplicas))
+ out.MaxReplicas = in.MaxReplicas
+ // WARNING: in.Metrics requires manual conversion: does not exist in peer-type
+ return nil
+}
+
+func autoConvert_v1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in *HorizontalPodAutoscalerStatus, out *autoscaling.HorizontalPodAutoscalerStatus, s conversion.Scope) error {
+ out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration))
+ out.LastScaleTime = (*meta_v1.Time)(unsafe.Pointer(in.LastScaleTime))
+ out.CurrentReplicas = in.CurrentReplicas
+ out.DesiredReplicas = in.DesiredReplicas
+ // WARNING: in.CurrentCPUUtilizationPercentage requires manual conversion: does not exist in peer-type
+ return nil
+}
+
+func autoConvert_autoscaling_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus(in *autoscaling.HorizontalPodAutoscalerStatus, out *HorizontalPodAutoscalerStatus, s conversion.Scope) error {
+ out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration))
+ out.LastScaleTime = (*meta_v1.Time)(unsafe.Pointer(in.LastScaleTime))
+ out.CurrentReplicas = in.CurrentReplicas
+ out.DesiredReplicas = in.DesiredReplicas
+ // WARNING: in.CurrentMetrics requires manual conversion: does not exist in peer-type
+ // WARNING: in.Conditions requires manual conversion: does not exist in peer-type
+ return nil
+}
+
+func autoConvert_v1_MetricSpec_To_autoscaling_MetricSpec(in *MetricSpec, out *autoscaling.MetricSpec, s conversion.Scope) error {
+ out.Type = autoscaling.MetricSourceType(in.Type)
+ out.Object = (*autoscaling.ObjectMetricSource)(unsafe.Pointer(in.Object))
+ out.Pods = (*autoscaling.PodsMetricSource)(unsafe.Pointer(in.Pods))
+ out.Resource = (*autoscaling.ResourceMetricSource)(unsafe.Pointer(in.Resource))
+ return nil
+}
+
+// Convert_v1_MetricSpec_To_autoscaling_MetricSpec is an autogenerated conversion function.
+func Convert_v1_MetricSpec_To_autoscaling_MetricSpec(in *MetricSpec, out *autoscaling.MetricSpec, s conversion.Scope) error {
+ return autoConvert_v1_MetricSpec_To_autoscaling_MetricSpec(in, out, s)
+}
+
+func autoConvert_autoscaling_MetricSpec_To_v1_MetricSpec(in *autoscaling.MetricSpec, out *MetricSpec, s conversion.Scope) error {
+ out.Type = MetricSourceType(in.Type)
+ out.Object = (*ObjectMetricSource)(unsafe.Pointer(in.Object))
+ out.Pods = (*PodsMetricSource)(unsafe.Pointer(in.Pods))
+ out.Resource = (*ResourceMetricSource)(unsafe.Pointer(in.Resource))
+ return nil
+}
+
+// Convert_autoscaling_MetricSpec_To_v1_MetricSpec is an autogenerated conversion function.
+func Convert_autoscaling_MetricSpec_To_v1_MetricSpec(in *autoscaling.MetricSpec, out *MetricSpec, s conversion.Scope) error {
+ return autoConvert_autoscaling_MetricSpec_To_v1_MetricSpec(in, out, s)
+}
+
+func autoConvert_v1_MetricStatus_To_autoscaling_MetricStatus(in *MetricStatus, out *autoscaling.MetricStatus, s conversion.Scope) error {
+ out.Type = autoscaling.MetricSourceType(in.Type)
+ out.Object = (*autoscaling.ObjectMetricStatus)(unsafe.Pointer(in.Object))
+ out.Pods = (*autoscaling.PodsMetricStatus)(unsafe.Pointer(in.Pods))
+ out.Resource = (*autoscaling.ResourceMetricStatus)(unsafe.Pointer(in.Resource))
+ return nil
+}
+
+// Convert_v1_MetricStatus_To_autoscaling_MetricStatus is an autogenerated conversion function.
+func Convert_v1_MetricStatus_To_autoscaling_MetricStatus(in *MetricStatus, out *autoscaling.MetricStatus, s conversion.Scope) error {
+ return autoConvert_v1_MetricStatus_To_autoscaling_MetricStatus(in, out, s)
+}
+
+func autoConvert_autoscaling_MetricStatus_To_v1_MetricStatus(in *autoscaling.MetricStatus, out *MetricStatus, s conversion.Scope) error {
+ out.Type = MetricSourceType(in.Type)
+ out.Object = (*ObjectMetricStatus)(unsafe.Pointer(in.Object))
+ out.Pods = (*PodsMetricStatus)(unsafe.Pointer(in.Pods))
+ out.Resource = (*ResourceMetricStatus)(unsafe.Pointer(in.Resource))
+ return nil
+}
+
+// Convert_autoscaling_MetricStatus_To_v1_MetricStatus is an autogenerated conversion function.
+func Convert_autoscaling_MetricStatus_To_v1_MetricStatus(in *autoscaling.MetricStatus, out *MetricStatus, s conversion.Scope) error {
+ return autoConvert_autoscaling_MetricStatus_To_v1_MetricStatus(in, out, s)
+}
+
+func autoConvert_v1_ObjectMetricSource_To_autoscaling_ObjectMetricSource(in *ObjectMetricSource, out *autoscaling.ObjectMetricSource, s conversion.Scope) error {
+ if err := Convert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(&in.Target, &out.Target, s); err != nil {
+ return err
+ }
+ out.MetricName = in.MetricName
+ out.TargetValue = in.TargetValue
+ return nil
+}
+
+// Convert_v1_ObjectMetricSource_To_autoscaling_ObjectMetricSource is an autogenerated conversion function.
+func Convert_v1_ObjectMetricSource_To_autoscaling_ObjectMetricSource(in *ObjectMetricSource, out *autoscaling.ObjectMetricSource, s conversion.Scope) error {
+ return autoConvert_v1_ObjectMetricSource_To_autoscaling_ObjectMetricSource(in, out, s)
+}
+
+func autoConvert_autoscaling_ObjectMetricSource_To_v1_ObjectMetricSource(in *autoscaling.ObjectMetricSource, out *ObjectMetricSource, s conversion.Scope) error {
+ if err := Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference(&in.Target, &out.Target, s); err != nil {
+ return err
+ }
+ out.MetricName = in.MetricName
+ out.TargetValue = in.TargetValue
+ return nil
+}
+
+// Convert_autoscaling_ObjectMetricSource_To_v1_ObjectMetricSource is an autogenerated conversion function.
+func Convert_autoscaling_ObjectMetricSource_To_v1_ObjectMetricSource(in *autoscaling.ObjectMetricSource, out *ObjectMetricSource, s conversion.Scope) error {
+ return autoConvert_autoscaling_ObjectMetricSource_To_v1_ObjectMetricSource(in, out, s)
+}
+
+func autoConvert_v1_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus(in *ObjectMetricStatus, out *autoscaling.ObjectMetricStatus, s conversion.Scope) error {
+ if err := Convert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(&in.Target, &out.Target, s); err != nil {
+ return err
+ }
+ out.MetricName = in.MetricName
+ out.CurrentValue = in.CurrentValue
+ return nil
+}
+
+// Convert_v1_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus is an autogenerated conversion function.
+func Convert_v1_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus(in *ObjectMetricStatus, out *autoscaling.ObjectMetricStatus, s conversion.Scope) error {
+ return autoConvert_v1_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus(in, out, s)
+}
+
+func autoConvert_autoscaling_ObjectMetricStatus_To_v1_ObjectMetricStatus(in *autoscaling.ObjectMetricStatus, out *ObjectMetricStatus, s conversion.Scope) error {
+ if err := Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference(&in.Target, &out.Target, s); err != nil {
+ return err
+ }
+ out.MetricName = in.MetricName
+ out.CurrentValue = in.CurrentValue
+ return nil
+}
+
+// Convert_autoscaling_ObjectMetricStatus_To_v1_ObjectMetricStatus is an autogenerated conversion function.
+func Convert_autoscaling_ObjectMetricStatus_To_v1_ObjectMetricStatus(in *autoscaling.ObjectMetricStatus, out *ObjectMetricStatus, s conversion.Scope) error {
+ return autoConvert_autoscaling_ObjectMetricStatus_To_v1_ObjectMetricStatus(in, out, s)
+}
+
+func autoConvert_v1_PodsMetricSource_To_autoscaling_PodsMetricSource(in *PodsMetricSource, out *autoscaling.PodsMetricSource, s conversion.Scope) error {
+ out.MetricName = in.MetricName
+ out.TargetAverageValue = in.TargetAverageValue
+ return nil
+}
+
+// Convert_v1_PodsMetricSource_To_autoscaling_PodsMetricSource is an autogenerated conversion function.
+func Convert_v1_PodsMetricSource_To_autoscaling_PodsMetricSource(in *PodsMetricSource, out *autoscaling.PodsMetricSource, s conversion.Scope) error {
+ return autoConvert_v1_PodsMetricSource_To_autoscaling_PodsMetricSource(in, out, s)
+}
+
+func autoConvert_autoscaling_PodsMetricSource_To_v1_PodsMetricSource(in *autoscaling.PodsMetricSource, out *PodsMetricSource, s conversion.Scope) error {
+ out.MetricName = in.MetricName
+ out.TargetAverageValue = in.TargetAverageValue
+ return nil
+}
+
+// Convert_autoscaling_PodsMetricSource_To_v1_PodsMetricSource is an autogenerated conversion function.
+func Convert_autoscaling_PodsMetricSource_To_v1_PodsMetricSource(in *autoscaling.PodsMetricSource, out *PodsMetricSource, s conversion.Scope) error {
+ return autoConvert_autoscaling_PodsMetricSource_To_v1_PodsMetricSource(in, out, s)
+}
+
+func autoConvert_v1_PodsMetricStatus_To_autoscaling_PodsMetricStatus(in *PodsMetricStatus, out *autoscaling.PodsMetricStatus, s conversion.Scope) error {
+ out.MetricName = in.MetricName
+ out.CurrentAverageValue = in.CurrentAverageValue
+ return nil
+}
+
+// Convert_v1_PodsMetricStatus_To_autoscaling_PodsMetricStatus is an autogenerated conversion function.
+func Convert_v1_PodsMetricStatus_To_autoscaling_PodsMetricStatus(in *PodsMetricStatus, out *autoscaling.PodsMetricStatus, s conversion.Scope) error {
+ return autoConvert_v1_PodsMetricStatus_To_autoscaling_PodsMetricStatus(in, out, s)
+}
+
+func autoConvert_autoscaling_PodsMetricStatus_To_v1_PodsMetricStatus(in *autoscaling.PodsMetricStatus, out *PodsMetricStatus, s conversion.Scope) error {
+ out.MetricName = in.MetricName
+ out.CurrentAverageValue = in.CurrentAverageValue
+ return nil
+}
+
+// Convert_autoscaling_PodsMetricStatus_To_v1_PodsMetricStatus is an autogenerated conversion function.
+func Convert_autoscaling_PodsMetricStatus_To_v1_PodsMetricStatus(in *autoscaling.PodsMetricStatus, out *PodsMetricStatus, s conversion.Scope) error {
+ return autoConvert_autoscaling_PodsMetricStatus_To_v1_PodsMetricStatus(in, out, s)
+}
+
+func autoConvert_v1_ResourceMetricSource_To_autoscaling_ResourceMetricSource(in *ResourceMetricSource, out *autoscaling.ResourceMetricSource, s conversion.Scope) error {
+ out.Name = api.ResourceName(in.Name)
+ out.TargetAverageUtilization = (*int32)(unsafe.Pointer(in.TargetAverageUtilization))
+ out.TargetAverageValue = (*resource.Quantity)(unsafe.Pointer(in.TargetAverageValue))
+ return nil
+}
+
+// Convert_v1_ResourceMetricSource_To_autoscaling_ResourceMetricSource is an autogenerated conversion function.
+func Convert_v1_ResourceMetricSource_To_autoscaling_ResourceMetricSource(in *ResourceMetricSource, out *autoscaling.ResourceMetricSource, s conversion.Scope) error {
+ return autoConvert_v1_ResourceMetricSource_To_autoscaling_ResourceMetricSource(in, out, s)
+}
+
+func autoConvert_autoscaling_ResourceMetricSource_To_v1_ResourceMetricSource(in *autoscaling.ResourceMetricSource, out *ResourceMetricSource, s conversion.Scope) error {
+ out.Name = api_v1.ResourceName(in.Name)
+ out.TargetAverageUtilization = (*int32)(unsafe.Pointer(in.TargetAverageUtilization))
+ out.TargetAverageValue = (*resource.Quantity)(unsafe.Pointer(in.TargetAverageValue))
+ return nil
+}
+
+// Convert_autoscaling_ResourceMetricSource_To_v1_ResourceMetricSource is an autogenerated conversion function.
+func Convert_autoscaling_ResourceMetricSource_To_v1_ResourceMetricSource(in *autoscaling.ResourceMetricSource, out *ResourceMetricSource, s conversion.Scope) error {
+ return autoConvert_autoscaling_ResourceMetricSource_To_v1_ResourceMetricSource(in, out, s)
+}
+
+func autoConvert_v1_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus(in *ResourceMetricStatus, out *autoscaling.ResourceMetricStatus, s conversion.Scope) error {
+ out.Name = api.ResourceName(in.Name)
+ out.CurrentAverageUtilization = (*int32)(unsafe.Pointer(in.CurrentAverageUtilization))
+ out.CurrentAverageValue = in.CurrentAverageValue
+ return nil
+}
+
+// Convert_v1_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus is an autogenerated conversion function.
+func Convert_v1_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus(in *ResourceMetricStatus, out *autoscaling.ResourceMetricStatus, s conversion.Scope) error {
+ return autoConvert_v1_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus(in, out, s)
+}
+
+func autoConvert_autoscaling_ResourceMetricStatus_To_v1_ResourceMetricStatus(in *autoscaling.ResourceMetricStatus, out *ResourceMetricStatus, s conversion.Scope) error {
+ out.Name = api_v1.ResourceName(in.Name)
+ out.CurrentAverageUtilization = (*int32)(unsafe.Pointer(in.CurrentAverageUtilization))
+ out.CurrentAverageValue = in.CurrentAverageValue
+ return nil
+}
+
+// Convert_autoscaling_ResourceMetricStatus_To_v1_ResourceMetricStatus is an autogenerated conversion function.
+func Convert_autoscaling_ResourceMetricStatus_To_v1_ResourceMetricStatus(in *autoscaling.ResourceMetricStatus, out *ResourceMetricStatus, s conversion.Scope) error {
+ return autoConvert_autoscaling_ResourceMetricStatus_To_v1_ResourceMetricStatus(in, out, s)
+}
+
+func autoConvert_v1_Scale_To_autoscaling_Scale(in *Scale, out *autoscaling.Scale, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_ScaleSpec_To_autoscaling_ScaleSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ScaleStatus_To_autoscaling_ScaleStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_Scale_To_autoscaling_Scale is an autogenerated conversion function.
+func Convert_v1_Scale_To_autoscaling_Scale(in *Scale, out *autoscaling.Scale, s conversion.Scope) error {
+ return autoConvert_v1_Scale_To_autoscaling_Scale(in, out, s)
+}
+
+func autoConvert_autoscaling_Scale_To_v1_Scale(in *autoscaling.Scale, out *Scale, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_autoscaling_ScaleSpec_To_v1_ScaleSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_autoscaling_ScaleStatus_To_v1_ScaleStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_autoscaling_Scale_To_v1_Scale is an autogenerated conversion function.
+func Convert_autoscaling_Scale_To_v1_Scale(in *autoscaling.Scale, out *Scale, s conversion.Scope) error {
+ return autoConvert_autoscaling_Scale_To_v1_Scale(in, out, s)
+}
+
+func autoConvert_v1_ScaleSpec_To_autoscaling_ScaleSpec(in *ScaleSpec, out *autoscaling.ScaleSpec, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ return nil
+}
+
+// Convert_v1_ScaleSpec_To_autoscaling_ScaleSpec is an autogenerated conversion function.
+func Convert_v1_ScaleSpec_To_autoscaling_ScaleSpec(in *ScaleSpec, out *autoscaling.ScaleSpec, s conversion.Scope) error {
+ return autoConvert_v1_ScaleSpec_To_autoscaling_ScaleSpec(in, out, s)
+}
+
+func autoConvert_autoscaling_ScaleSpec_To_v1_ScaleSpec(in *autoscaling.ScaleSpec, out *ScaleSpec, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ return nil
+}
+
+// Convert_autoscaling_ScaleSpec_To_v1_ScaleSpec is an autogenerated conversion function.
+func Convert_autoscaling_ScaleSpec_To_v1_ScaleSpec(in *autoscaling.ScaleSpec, out *ScaleSpec, s conversion.Scope) error {
+ return autoConvert_autoscaling_ScaleSpec_To_v1_ScaleSpec(in, out, s)
+}
+
+func autoConvert_v1_ScaleStatus_To_autoscaling_ScaleStatus(in *ScaleStatus, out *autoscaling.ScaleStatus, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ out.Selector = in.Selector
+ return nil
+}
+
+// Convert_v1_ScaleStatus_To_autoscaling_ScaleStatus is an autogenerated conversion function.
+func Convert_v1_ScaleStatus_To_autoscaling_ScaleStatus(in *ScaleStatus, out *autoscaling.ScaleStatus, s conversion.Scope) error {
+ return autoConvert_v1_ScaleStatus_To_autoscaling_ScaleStatus(in, out, s)
+}
+
+func autoConvert_autoscaling_ScaleStatus_To_v1_ScaleStatus(in *autoscaling.ScaleStatus, out *ScaleStatus, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ out.Selector = in.Selector
+ return nil
+}
+
+// Convert_autoscaling_ScaleStatus_To_v1_ScaleStatus is an autogenerated conversion function.
+func Convert_autoscaling_ScaleStatus_To_v1_ScaleStatus(in *autoscaling.ScaleStatus, out *ScaleStatus, s conversion.Scope) error {
+ return autoConvert_autoscaling_ScaleStatus_To_v1_ScaleStatus(in, out, s)
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..94fdc46d0
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.deepcopy.go
@@ -0,0 +1,340 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1
+
+import (
+ resource "k8s.io/apimachinery/pkg/api/resource"
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_CrossVersionObjectReference, InType: reflect.TypeOf(&CrossVersionObjectReference{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscaler, InType: reflect.TypeOf(&HorizontalPodAutoscaler{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscalerCondition, InType: reflect.TypeOf(&HorizontalPodAutoscalerCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscalerList, InType: reflect.TypeOf(&HorizontalPodAutoscalerList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscalerSpec, InType: reflect.TypeOf(&HorizontalPodAutoscalerSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscalerStatus, InType: reflect.TypeOf(&HorizontalPodAutoscalerStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_MetricSpec, InType: reflect.TypeOf(&MetricSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_MetricStatus, InType: reflect.TypeOf(&MetricStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ObjectMetricSource, InType: reflect.TypeOf(&ObjectMetricSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ObjectMetricStatus, InType: reflect.TypeOf(&ObjectMetricStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodsMetricSource, InType: reflect.TypeOf(&PodsMetricSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodsMetricStatus, InType: reflect.TypeOf(&PodsMetricStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ResourceMetricSource, InType: reflect.TypeOf(&ResourceMetricSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ResourceMetricStatus, InType: reflect.TypeOf(&ResourceMetricStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Scale, InType: reflect.TypeOf(&Scale{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ScaleSpec, InType: reflect.TypeOf(&ScaleSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ScaleStatus, InType: reflect.TypeOf(&ScaleStatus{})},
+ )
+}
+
+// DeepCopy_v1_CrossVersionObjectReference is an autogenerated deepcopy function.
+func DeepCopy_v1_CrossVersionObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CrossVersionObjectReference)
+ out := out.(*CrossVersionObjectReference)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_HorizontalPodAutoscaler is an autogenerated deepcopy function.
+func DeepCopy_v1_HorizontalPodAutoscaler(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscaler)
+ out := out.(*HorizontalPodAutoscaler)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_HorizontalPodAutoscalerCondition is an autogenerated deepcopy function.
+func DeepCopy_v1_HorizontalPodAutoscalerCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscalerCondition)
+ out := out.(*HorizontalPodAutoscalerCondition)
+ *out = *in
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_HorizontalPodAutoscalerList is an autogenerated deepcopy function.
+func DeepCopy_v1_HorizontalPodAutoscalerList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscalerList)
+ out := out.(*HorizontalPodAutoscalerList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]HorizontalPodAutoscaler, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_HorizontalPodAutoscalerSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_HorizontalPodAutoscalerSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscalerSpec)
+ out := out.(*HorizontalPodAutoscalerSpec)
+ *out = *in
+ if in.MinReplicas != nil {
+ in, out := &in.MinReplicas, &out.MinReplicas
+ *out = new(int32)
+ **out = **in
+ }
+ if in.TargetCPUUtilizationPercentage != nil {
+ in, out := &in.TargetCPUUtilizationPercentage, &out.TargetCPUUtilizationPercentage
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_HorizontalPodAutoscalerStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_HorizontalPodAutoscalerStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscalerStatus)
+ out := out.(*HorizontalPodAutoscalerStatus)
+ *out = *in
+ if in.ObservedGeneration != nil {
+ in, out := &in.ObservedGeneration, &out.ObservedGeneration
+ *out = new(int64)
+ **out = **in
+ }
+ if in.LastScaleTime != nil {
+ in, out := &in.LastScaleTime, &out.LastScaleTime
+ *out = new(meta_v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ if in.CurrentCPUUtilizationPercentage != nil {
+ in, out := &in.CurrentCPUUtilizationPercentage, &out.CurrentCPUUtilizationPercentage
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_MetricSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_MetricSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*MetricSpec)
+ out := out.(*MetricSpec)
+ *out = *in
+ if in.Object != nil {
+ in, out := &in.Object, &out.Object
+ *out = new(ObjectMetricSource)
+ if err := DeepCopy_v1_ObjectMetricSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Pods != nil {
+ in, out := &in.Pods, &out.Pods
+ *out = new(PodsMetricSource)
+ if err := DeepCopy_v1_PodsMetricSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Resource != nil {
+ in, out := &in.Resource, &out.Resource
+ *out = new(ResourceMetricSource)
+ if err := DeepCopy_v1_ResourceMetricSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_MetricStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_MetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*MetricStatus)
+ out := out.(*MetricStatus)
+ *out = *in
+ if in.Object != nil {
+ in, out := &in.Object, &out.Object
+ *out = new(ObjectMetricStatus)
+ if err := DeepCopy_v1_ObjectMetricStatus(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Pods != nil {
+ in, out := &in.Pods, &out.Pods
+ *out = new(PodsMetricStatus)
+ if err := DeepCopy_v1_PodsMetricStatus(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Resource != nil {
+ in, out := &in.Resource, &out.Resource
+ *out = new(ResourceMetricStatus)
+ if err := DeepCopy_v1_ResourceMetricStatus(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ObjectMetricSource is an autogenerated deepcopy function.
+func DeepCopy_v1_ObjectMetricSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ObjectMetricSource)
+ out := out.(*ObjectMetricSource)
+ *out = *in
+ out.TargetValue = in.TargetValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_ObjectMetricStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_ObjectMetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ObjectMetricStatus)
+ out := out.(*ObjectMetricStatus)
+ *out = *in
+ out.CurrentValue = in.CurrentValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodsMetricSource is an autogenerated deepcopy function.
+func DeepCopy_v1_PodsMetricSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodsMetricSource)
+ out := out.(*PodsMetricSource)
+ *out = *in
+ out.TargetAverageValue = in.TargetAverageValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodsMetricStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_PodsMetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodsMetricStatus)
+ out := out.(*PodsMetricStatus)
+ *out = *in
+ out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_ResourceMetricSource is an autogenerated deepcopy function.
+func DeepCopy_v1_ResourceMetricSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceMetricSource)
+ out := out.(*ResourceMetricSource)
+ *out = *in
+ if in.TargetAverageUtilization != nil {
+ in, out := &in.TargetAverageUtilization, &out.TargetAverageUtilization
+ *out = new(int32)
+ **out = **in
+ }
+ if in.TargetAverageValue != nil {
+ in, out := &in.TargetAverageValue, &out.TargetAverageValue
+ *out = new(resource.Quantity)
+ **out = (*in).DeepCopy()
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ResourceMetricStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_ResourceMetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceMetricStatus)
+ out := out.(*ResourceMetricStatus)
+ *out = *in
+ if in.CurrentAverageUtilization != nil {
+ in, out := &in.CurrentAverageUtilization, &out.CurrentAverageUtilization
+ *out = new(int32)
+ **out = **in
+ }
+ out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_Scale is an autogenerated deepcopy function.
+func DeepCopy_v1_Scale(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Scale)
+ out := out.(*Scale)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ScaleSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_ScaleSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ScaleSpec)
+ out := out.(*ScaleSpec)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_ScaleStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_ScaleStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ScaleStatus)
+ out := out.(*ScaleStatus)
+ *out = *in
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.defaults.go
new file mode 100644
index 000000000..af20e9884
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.defaults.go
@@ -0,0 +1,47 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ scheme.AddTypeDefaultingFunc(&HorizontalPodAutoscaler{}, func(obj interface{}) { SetObjectDefaults_HorizontalPodAutoscaler(obj.(*HorizontalPodAutoscaler)) })
+ scheme.AddTypeDefaultingFunc(&HorizontalPodAutoscalerList{}, func(obj interface{}) {
+ SetObjectDefaults_HorizontalPodAutoscalerList(obj.(*HorizontalPodAutoscalerList))
+ })
+ return nil
+}
+
+func SetObjectDefaults_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler) {
+ SetDefaults_HorizontalPodAutoscaler(in)
+}
+
+func SetObjectDefaults_HorizontalPodAutoscalerList(in *HorizontalPodAutoscalerList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_HorizontalPodAutoscaler(a)
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/defaults.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/defaults.go
new file mode 100644
index 000000000..7533cc4a3
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/defaults.go
@@ -0,0 +1,47 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/client-go/pkg/api/v1"
+ "k8s.io/client-go/pkg/apis/autoscaling"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
+
+func SetDefaults_HorizontalPodAutoscaler(obj *HorizontalPodAutoscaler) {
+ if obj.Spec.MinReplicas == nil {
+ minReplicas := int32(1)
+ obj.Spec.MinReplicas = &minReplicas
+ }
+
+ if len(obj.Spec.Metrics) == 0 {
+ utilizationDefaultVal := int32(autoscaling.DefaultCPUUtilization)
+ obj.Spec.Metrics = []MetricSpec{
+ {
+ Type: ResourceMetricSourceType,
+ Resource: &ResourceMetricSource{
+ Name: v1.ResourceCPU,
+ TargetAverageUtilization: &utilizationDefaultVal,
+ },
+ },
+ }
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/doc.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/doc.go
new file mode 100644
index 000000000..a9fe60b1c
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/doc.go
@@ -0,0 +1,17 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/generated.pb.go
new file mode 100644
index 000000000..47fb3d5f1
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/generated.pb.go
@@ -0,0 +1,3402 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v2alpha1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/generated.proto
+
+ It has these top-level messages:
+ CrossVersionObjectReference
+ HorizontalPodAutoscaler
+ HorizontalPodAutoscalerCondition
+ HorizontalPodAutoscalerList
+ HorizontalPodAutoscalerSpec
+ HorizontalPodAutoscalerStatus
+ MetricSpec
+ MetricStatus
+ ObjectMetricSource
+ ObjectMetricStatus
+ PodsMetricSource
+ PodsMetricStatus
+ ResourceMetricSource
+ ResourceMetricStatus
+*/
+package v2alpha1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_apimachinery_pkg_api_resource "k8s.io/apimachinery/pkg/api/resource"
+import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+import k8s_io_kubernetes_pkg_api_v1 "k8s.io/client-go/pkg/api/v1"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} }
+func (*CrossVersionObjectReference) ProtoMessage() {}
+func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{0}
+}
+
+func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} }
+func (*HorizontalPodAutoscaler) ProtoMessage() {}
+func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} }
+func (*HorizontalPodAutoscalerCondition) ProtoMessage() {}
+func (*HorizontalPodAutoscalerCondition) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{2}
+}
+
+func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} }
+func (*HorizontalPodAutoscalerList) ProtoMessage() {}
+func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{3}
+}
+
+func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} }
+func (*HorizontalPodAutoscalerSpec) ProtoMessage() {}
+func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{4}
+}
+
+func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} }
+func (*HorizontalPodAutoscalerStatus) ProtoMessage() {}
+func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{5}
+}
+
+func (m *MetricSpec) Reset() { *m = MetricSpec{} }
+func (*MetricSpec) ProtoMessage() {}
+func (*MetricSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
+
+func (m *MetricStatus) Reset() { *m = MetricStatus{} }
+func (*MetricStatus) ProtoMessage() {}
+func (*MetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
+
+func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} }
+func (*ObjectMetricSource) ProtoMessage() {}
+func (*ObjectMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
+
+func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} }
+func (*ObjectMetricStatus) ProtoMessage() {}
+func (*ObjectMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
+
+func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} }
+func (*PodsMetricSource) ProtoMessage() {}
+func (*PodsMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
+
+func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} }
+func (*PodsMetricStatus) ProtoMessage() {}
+func (*PodsMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} }
+
+func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} }
+func (*ResourceMetricSource) ProtoMessage() {}
+func (*ResourceMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} }
+
+func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} }
+func (*ResourceMetricStatus) ProtoMessage() {}
+func (*ResourceMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} }
+
+func init() {
+ proto.RegisterType((*CrossVersionObjectReference)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v2alpha1.CrossVersionObjectReference")
+ proto.RegisterType((*HorizontalPodAutoscaler)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v2alpha1.HorizontalPodAutoscaler")
+ proto.RegisterType((*HorizontalPodAutoscalerCondition)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v2alpha1.HorizontalPodAutoscalerCondition")
+ proto.RegisterType((*HorizontalPodAutoscalerList)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v2alpha1.HorizontalPodAutoscalerList")
+ proto.RegisterType((*HorizontalPodAutoscalerSpec)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v2alpha1.HorizontalPodAutoscalerSpec")
+ proto.RegisterType((*HorizontalPodAutoscalerStatus)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v2alpha1.HorizontalPodAutoscalerStatus")
+ proto.RegisterType((*MetricSpec)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v2alpha1.MetricSpec")
+ proto.RegisterType((*MetricStatus)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v2alpha1.MetricStatus")
+ proto.RegisterType((*ObjectMetricSource)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v2alpha1.ObjectMetricSource")
+ proto.RegisterType((*ObjectMetricStatus)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v2alpha1.ObjectMetricStatus")
+ proto.RegisterType((*PodsMetricSource)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v2alpha1.PodsMetricSource")
+ proto.RegisterType((*PodsMetricStatus)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v2alpha1.PodsMetricStatus")
+ proto.RegisterType((*ResourceMetricSource)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v2alpha1.ResourceMetricSource")
+ proto.RegisterType((*ResourceMetricStatus)(nil), "k8s.io.client-go.pkg.apis.autoscaling.v2alpha1.ResourceMetricStatus")
+}
+func (m *CrossVersionObjectReference) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CrossVersionObjectReference) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
+ i += copy(dAtA[i:], m.Kind)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion)))
+ i += copy(dAtA[i:], m.APIVersion)
+ return i, nil
+}
+
+func (m *HorizontalPodAutoscaler) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HorizontalPodAutoscaler) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n2, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n3, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ return i, nil
+}
+
+func (m *HorizontalPodAutoscalerCondition) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HorizontalPodAutoscalerCondition) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
+ i += copy(dAtA[i:], m.Status)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
+ n4, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ return i, nil
+}
+
+func (m *HorizontalPodAutoscalerList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HorizontalPodAutoscalerList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n5, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *HorizontalPodAutoscalerSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HorizontalPodAutoscalerSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ScaleTargetRef.Size()))
+ n6, err := m.ScaleTargetRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ if m.MinReplicas != nil {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.MinReplicas))
+ }
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.MaxReplicas))
+ if len(m.Metrics) > 0 {
+ for _, msg := range m.Metrics {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *HorizontalPodAutoscalerStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HorizontalPodAutoscalerStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.ObservedGeneration != nil {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.ObservedGeneration))
+ }
+ if m.LastScaleTime != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastScaleTime.Size()))
+ n7, err := m.LastScaleTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ }
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentReplicas))
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.DesiredReplicas))
+ if len(m.CurrentMetrics) > 0 {
+ for _, msg := range m.CurrentMetrics {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Conditions) > 0 {
+ for _, msg := range m.Conditions {
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *MetricSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *MetricSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ if m.Object != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Object.Size()))
+ n8, err := m.Object.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n8
+ }
+ if m.Pods != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Pods.Size()))
+ n9, err := m.Pods.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n9
+ }
+ if m.Resource != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Resource.Size()))
+ n10, err := m.Resource.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n10
+ }
+ return i, nil
+}
+
+func (m *MetricStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *MetricStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ if m.Object != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Object.Size()))
+ n11, err := m.Object.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n11
+ }
+ if m.Pods != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Pods.Size()))
+ n12, err := m.Pods.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n12
+ }
+ if m.Resource != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Resource.Size()))
+ n13, err := m.Resource.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n13
+ }
+ return i, nil
+}
+
+func (m *ObjectMetricSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ObjectMetricSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Target.Size()))
+ n14, err := m.Target.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n14
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
+ i += copy(dAtA[i:], m.MetricName)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.TargetValue.Size()))
+ n15, err := m.TargetValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n15
+ return i, nil
+}
+
+func (m *ObjectMetricStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ObjectMetricStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Target.Size()))
+ n16, err := m.Target.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n16
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
+ i += copy(dAtA[i:], m.MetricName)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentValue.Size()))
+ n17, err := m.CurrentValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n17
+ return i, nil
+}
+
+func (m *PodsMetricSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodsMetricSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
+ i += copy(dAtA[i:], m.MetricName)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.TargetAverageValue.Size()))
+ n18, err := m.TargetAverageValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n18
+ return i, nil
+}
+
+func (m *PodsMetricStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodsMetricStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
+ i += copy(dAtA[i:], m.MetricName)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentAverageValue.Size()))
+ n19, err := m.CurrentAverageValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n19
+ return i, nil
+}
+
+func (m *ResourceMetricSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceMetricSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ if m.TargetAverageUtilization != nil {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.TargetAverageUtilization))
+ }
+ if m.TargetAverageValue != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.TargetAverageValue.Size()))
+ n20, err := m.TargetAverageValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n20
+ }
+ return i, nil
+}
+
+func (m *ResourceMetricStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceMetricStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ if m.CurrentAverageUtilization != nil {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.CurrentAverageUtilization))
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentAverageValue.Size()))
+ n21, err := m.CurrentAverageValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n21
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *CrossVersionObjectReference) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Kind)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.APIVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *HorizontalPodAutoscaler) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *HorizontalPodAutoscalerCondition) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Status)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastTransitionTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *HorizontalPodAutoscalerList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *HorizontalPodAutoscalerSpec) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ScaleTargetRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.MinReplicas != nil {
+ n += 1 + sovGenerated(uint64(*m.MinReplicas))
+ }
+ n += 1 + sovGenerated(uint64(m.MaxReplicas))
+ if len(m.Metrics) > 0 {
+ for _, e := range m.Metrics {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *HorizontalPodAutoscalerStatus) Size() (n int) {
+ var l int
+ _ = l
+ if m.ObservedGeneration != nil {
+ n += 1 + sovGenerated(uint64(*m.ObservedGeneration))
+ }
+ if m.LastScaleTime != nil {
+ l = m.LastScaleTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ n += 1 + sovGenerated(uint64(m.CurrentReplicas))
+ n += 1 + sovGenerated(uint64(m.DesiredReplicas))
+ if len(m.CurrentMetrics) > 0 {
+ for _, e := range m.CurrentMetrics {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Conditions) > 0 {
+ for _, e := range m.Conditions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *MetricSpec) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Object != nil {
+ l = m.Object.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Pods != nil {
+ l = m.Pods.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Resource != nil {
+ l = m.Resource.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *MetricStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Object != nil {
+ l = m.Object.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Pods != nil {
+ l = m.Pods.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Resource != nil {
+ l = m.Resource.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *ObjectMetricSource) Size() (n int) {
+ var l int
+ _ = l
+ l = m.Target.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.MetricName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.TargetValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ObjectMetricStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = m.Target.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.MetricName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.CurrentValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodsMetricSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.MetricName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.TargetAverageValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodsMetricStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.MetricName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.CurrentAverageValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ResourceMetricSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.TargetAverageUtilization != nil {
+ n += 1 + sovGenerated(uint64(*m.TargetAverageUtilization))
+ }
+ if m.TargetAverageValue != nil {
+ l = m.TargetAverageValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *ResourceMetricStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.CurrentAverageUtilization != nil {
+ n += 1 + sovGenerated(uint64(*m.CurrentAverageUtilization))
+ }
+ l = m.CurrentAverageValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *CrossVersionObjectReference) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CrossVersionObjectReference{`,
+ `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HorizontalPodAutoscaler) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HorizontalPodAutoscaler{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "HorizontalPodAutoscalerSpec", "HorizontalPodAutoscalerSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "HorizontalPodAutoscalerStatus", "HorizontalPodAutoscalerStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HorizontalPodAutoscalerCondition) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HorizontalPodAutoscalerCondition{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
+ `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HorizontalPodAutoscalerList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HorizontalPodAutoscalerList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "HorizontalPodAutoscaler", "HorizontalPodAutoscaler", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HorizontalPodAutoscalerSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HorizontalPodAutoscalerSpec{`,
+ `ScaleTargetRef:` + strings.Replace(strings.Replace(this.ScaleTargetRef.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`,
+ `MinReplicas:` + valueToStringGenerated(this.MinReplicas) + `,`,
+ `MaxReplicas:` + fmt.Sprintf("%v", this.MaxReplicas) + `,`,
+ `Metrics:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Metrics), "MetricSpec", "MetricSpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HorizontalPodAutoscalerStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HorizontalPodAutoscalerStatus{`,
+ `ObservedGeneration:` + valueToStringGenerated(this.ObservedGeneration) + `,`,
+ `LastScaleTime:` + strings.Replace(fmt.Sprintf("%v", this.LastScaleTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`,
+ `CurrentReplicas:` + fmt.Sprintf("%v", this.CurrentReplicas) + `,`,
+ `DesiredReplicas:` + fmt.Sprintf("%v", this.DesiredReplicas) + `,`,
+ `CurrentMetrics:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.CurrentMetrics), "MetricStatus", "MetricStatus", 1), `&`, ``, 1) + `,`,
+ `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "HorizontalPodAutoscalerCondition", "HorizontalPodAutoscalerCondition", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *MetricSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&MetricSpec{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Object:` + strings.Replace(fmt.Sprintf("%v", this.Object), "ObjectMetricSource", "ObjectMetricSource", 1) + `,`,
+ `Pods:` + strings.Replace(fmt.Sprintf("%v", this.Pods), "PodsMetricSource", "PodsMetricSource", 1) + `,`,
+ `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "ResourceMetricSource", "ResourceMetricSource", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *MetricStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&MetricStatus{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Object:` + strings.Replace(fmt.Sprintf("%v", this.Object), "ObjectMetricStatus", "ObjectMetricStatus", 1) + `,`,
+ `Pods:` + strings.Replace(fmt.Sprintf("%v", this.Pods), "PodsMetricStatus", "PodsMetricStatus", 1) + `,`,
+ `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "ResourceMetricStatus", "ResourceMetricStatus", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ObjectMetricSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ObjectMetricSource{`,
+ `Target:` + strings.Replace(strings.Replace(this.Target.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`,
+ `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
+ `TargetValue:` + strings.Replace(strings.Replace(this.TargetValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ObjectMetricStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ObjectMetricStatus{`,
+ `Target:` + strings.Replace(strings.Replace(this.Target.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`,
+ `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
+ `CurrentValue:` + strings.Replace(strings.Replace(this.CurrentValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodsMetricSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodsMetricSource{`,
+ `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
+ `TargetAverageValue:` + strings.Replace(strings.Replace(this.TargetAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodsMetricStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodsMetricStatus{`,
+ `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
+ `CurrentAverageValue:` + strings.Replace(strings.Replace(this.CurrentAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceMetricSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ResourceMetricSource{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `TargetAverageUtilization:` + valueToStringGenerated(this.TargetAverageUtilization) + `,`,
+ `TargetAverageValue:` + strings.Replace(fmt.Sprintf("%v", this.TargetAverageValue), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceMetricStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ResourceMetricStatus{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `CurrentAverageUtilization:` + valueToStringGenerated(this.CurrentAverageUtilization) + `,`,
+ `CurrentAverageValue:` + strings.Replace(strings.Replace(this.CurrentAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *CrossVersionObjectReference) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CrossVersionObjectReference: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CrossVersionObjectReference: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Kind = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HorizontalPodAutoscaler) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HorizontalPodAutoscaler: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HorizontalPodAutoscaler: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HorizontalPodAutoscalerCondition) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerCondition: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerCondition: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = HorizontalPodAutoscalerConditionType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Status = k8s_io_kubernetes_pkg_api_v1.ConditionStatus(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HorizontalPodAutoscalerList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, HorizontalPodAutoscaler{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HorizontalPodAutoscalerSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ScaleTargetRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ScaleTargetRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MinReplicas", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.MinReplicas = &v
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MaxReplicas", wireType)
+ }
+ m.MaxReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.MaxReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Metrics = append(m.Metrics, MetricSpec{})
+ if err := m.Metrics[len(m.Metrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HorizontalPodAutoscalerStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ObservedGeneration = &v
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastScaleTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.LastScaleTime == nil {
+ m.LastScaleTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{}
+ }
+ if err := m.LastScaleTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentReplicas", wireType)
+ }
+ m.CurrentReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.CurrentReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DesiredReplicas", wireType)
+ }
+ m.DesiredReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.DesiredReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentMetrics", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.CurrentMetrics = append(m.CurrentMetrics, MetricStatus{})
+ if err := m.CurrentMetrics[len(m.CurrentMetrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Conditions = append(m.Conditions, HorizontalPodAutoscalerCondition{})
+ if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *MetricSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: MetricSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MetricSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = MetricSourceType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Object == nil {
+ m.Object = &ObjectMetricSource{}
+ }
+ if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Pods", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Pods == nil {
+ m.Pods = &PodsMetricSource{}
+ }
+ if err := m.Pods.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Resource == nil {
+ m.Resource = &ResourceMetricSource{}
+ }
+ if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *MetricStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: MetricStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = MetricSourceType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Object == nil {
+ m.Object = &ObjectMetricStatus{}
+ }
+ if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Pods", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Pods == nil {
+ m.Pods = &PodsMetricStatus{}
+ }
+ if err := m.Pods.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Resource == nil {
+ m.Resource = &ResourceMetricStatus{}
+ }
+ if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ObjectMetricSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ObjectMetricSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ObjectMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MetricName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.TargetValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ObjectMetricStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ObjectMetricStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ObjectMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MetricName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.CurrentValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodsMetricSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodsMetricSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodsMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MetricName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.TargetAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodsMetricStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodsMetricStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodsMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MetricName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.CurrentAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceMetricSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceMetricSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = k8s_io_kubernetes_pkg_api_v1.ResourceName(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageUtilization", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.TargetAverageUtilization = &v
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.TargetAverageValue == nil {
+ m.TargetAverageValue = &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ }
+ if err := m.TargetAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceMetricStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceMetricStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = k8s_io_kubernetes_pkg_api_v1.ResourceName(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageUtilization", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.CurrentAverageUtilization = &v
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.CurrentAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 1331 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0x5b, 0x6f, 0x1b, 0x45,
+ 0x1b, 0xce, 0x3a, 0x4e, 0x9a, 0x6f, 0x9c, 0x26, 0xfd, 0xa6, 0x55, 0xeb, 0xa6, 0xd4, 0x8e, 0x56,
+ 0x08, 0xb5, 0x08, 0x76, 0xa9, 0x29, 0x88, 0x0a, 0x01, 0x8a, 0xcd, 0xa1, 0x15, 0x71, 0x0f, 0xd3,
+ 0x50, 0x21, 0x40, 0x82, 0xc9, 0x7a, 0xea, 0x0c, 0xf1, 0x1e, 0xb4, 0x33, 0xb6, 0x48, 0xa5, 0x4a,
+ 0xdc, 0x70, 0x87, 0x04, 0x37, 0xfc, 0x04, 0x24, 0xfe, 0x01, 0xd7, 0x20, 0x21, 0xf5, 0xb2, 0x97,
+ 0xe5, 0xc6, 0xa2, 0xee, 0x1d, 0x3f, 0x21, 0x12, 0x07, 0xcd, 0x61, 0x4f, 0x5e, 0x6f, 0x1a, 0x87,
+ 0xb4, 0x82, 0x3b, 0x7b, 0xe6, 0x7d, 0x9f, 0xe7, 0x3d, 0x3c, 0xf3, 0xce, 0x2c, 0x78, 0x6b, 0xfb,
+ 0x35, 0x66, 0x51, 0xdf, 0xde, 0xee, 0x6f, 0x92, 0xd0, 0x23, 0x9c, 0x30, 0x3b, 0xd8, 0xee, 0xda,
+ 0x38, 0xa0, 0xcc, 0xc6, 0x7d, 0xee, 0x33, 0x07, 0xf7, 0xa8, 0xd7, 0xb5, 0x07, 0x0d, 0xdc, 0x0b,
+ 0xb6, 0xf0, 0x05, 0xbb, 0x4b, 0x3c, 0x12, 0x62, 0x4e, 0x3a, 0x56, 0x10, 0xfa, 0xdc, 0x87, 0xb6,
+ 0x02, 0xb0, 0x12, 0x00, 0x2b, 0xd8, 0xee, 0x5a, 0x02, 0xc0, 0x4a, 0x01, 0x58, 0x11, 0xc0, 0xca,
+ 0x8b, 0x5d, 0xca, 0xb7, 0xfa, 0x9b, 0x96, 0xe3, 0xbb, 0x76, 0xd7, 0xef, 0xfa, 0xb6, 0xc4, 0xd9,
+ 0xec, 0xdf, 0x96, 0xff, 0xe4, 0x1f, 0xf9, 0x4b, 0xe1, 0xaf, 0x5c, 0xd4, 0x01, 0xe2, 0x80, 0xba,
+ 0xd8, 0xd9, 0xa2, 0x1e, 0x09, 0x77, 0xa2, 0x10, 0xed, 0x90, 0x30, 0xbf, 0x1f, 0x3a, 0x64, 0x3c,
+ 0xaa, 0x3d, 0xbd, 0x98, 0xed, 0x12, 0x8e, 0xed, 0x41, 0x2e, 0x97, 0x15, 0xbb, 0xc8, 0x2b, 0xec,
+ 0x7b, 0x9c, 0xba, 0x79, 0x9a, 0x57, 0x1f, 0xe7, 0xc0, 0x9c, 0x2d, 0xe2, 0xe2, 0x9c, 0xdf, 0xcb,
+ 0x45, 0x7e, 0x7d, 0x4e, 0x7b, 0x36, 0xf5, 0x38, 0xe3, 0x61, 0xce, 0xe9, 0x85, 0xc2, 0x56, 0x4d,
+ 0xca, 0xe5, 0xd2, 0x7e, 0x1b, 0x9b, 0x73, 0x35, 0xbf, 0x33, 0xc0, 0x99, 0x56, 0xe8, 0x33, 0x76,
+ 0x8b, 0x84, 0x8c, 0xfa, 0xde, 0xb5, 0xcd, 0xcf, 0x89, 0xc3, 0x11, 0xb9, 0x4d, 0x42, 0xe2, 0x39,
+ 0x04, 0xae, 0x82, 0xf2, 0x36, 0xf5, 0x3a, 0x55, 0x63, 0xd5, 0x38, 0xf7, 0xbf, 0xe6, 0xe2, 0xbd,
+ 0x61, 0x7d, 0x66, 0x34, 0xac, 0x97, 0xdf, 0xa7, 0x5e, 0x07, 0xc9, 0x1d, 0x61, 0xe1, 0x61, 0x97,
+ 0x54, 0x4b, 0x59, 0x8b, 0xab, 0xd8, 0x25, 0x48, 0xee, 0xc0, 0x06, 0x00, 0x38, 0xa0, 0x9a, 0xa0,
+ 0x3a, 0x2b, 0xed, 0xa0, 0xb6, 0x03, 0x6b, 0xd7, 0xaf, 0xe8, 0x1d, 0x94, 0xb2, 0x32, 0x1f, 0x95,
+ 0xc0, 0xa9, 0xcb, 0x7e, 0x48, 0xef, 0xf8, 0x1e, 0xc7, 0xbd, 0xeb, 0x7e, 0x67, 0x4d, 0xe7, 0x41,
+ 0x42, 0xf8, 0x19, 0x58, 0x10, 0x5d, 0xed, 0x60, 0x8e, 0x65, 0x5c, 0x95, 0xc6, 0x4b, 0x96, 0x56,
+ 0x66, 0xba, 0xc8, 0x89, 0x36, 0x85, 0xb5, 0x35, 0xb8, 0x60, 0xa9, 0xe4, 0xda, 0x84, 0xe3, 0x84,
+ 0x3f, 0x59, 0x43, 0x31, 0x2a, 0xf4, 0x40, 0x99, 0x05, 0xc4, 0x91, 0x39, 0x55, 0x1a, 0xeb, 0xd6,
+ 0x94, 0xba, 0xb7, 0x0a, 0x22, 0xbf, 0x19, 0x10, 0x27, 0xa9, 0x90, 0xf8, 0x87, 0x24, 0x0f, 0x1c,
+ 0x80, 0x79, 0xc6, 0x31, 0xef, 0x33, 0x59, 0x9d, 0x4a, 0xe3, 0xea, 0xa1, 0x31, 0x4a, 0xd4, 0xe6,
+ 0x92, 0xe6, 0x9c, 0x57, 0xff, 0x91, 0x66, 0x33, 0xbf, 0x99, 0x05, 0xab, 0x05, 0x9e, 0x2d, 0xdf,
+ 0xeb, 0x50, 0x4e, 0x7d, 0x0f, 0x5e, 0x06, 0x65, 0xbe, 0x13, 0x10, 0x2d, 0x81, 0x8b, 0x51, 0xf8,
+ 0x1b, 0x3b, 0x01, 0xd9, 0x1d, 0xd6, 0x9f, 0x7d, 0x9c, 0xbf, 0xb0, 0x43, 0x12, 0x01, 0xde, 0x8a,
+ 0xd3, 0x54, 0x62, 0x79, 0x33, 0x1b, 0xd6, 0xee, 0xb0, 0xbe, 0xa7, 0xee, 0xad, 0x18, 0x33, 0x9b,
+ 0x06, 0x1c, 0x00, 0xd8, 0xc3, 0x8c, 0x6f, 0x84, 0xd8, 0x63, 0x8a, 0x93, 0xba, 0x44, 0x97, 0xf2,
+ 0xf9, 0xfd, 0x49, 0x43, 0x78, 0x34, 0x57, 0x74, 0x3c, 0x70, 0x3d, 0x87, 0x86, 0x26, 0x30, 0xc0,
+ 0xe7, 0xc0, 0x7c, 0x48, 0x30, 0xf3, 0xbd, 0x6a, 0x59, 0xe6, 0x13, 0x97, 0x19, 0xc9, 0x55, 0xa4,
+ 0x77, 0xe1, 0x79, 0x70, 0xc4, 0x25, 0x8c, 0xe1, 0x2e, 0xa9, 0xce, 0x49, 0xc3, 0x65, 0x6d, 0x78,
+ 0xa4, 0xad, 0x96, 0x51, 0xb4, 0x6f, 0xfe, 0x6e, 0x80, 0x33, 0x05, 0x15, 0x5d, 0xa7, 0x8c, 0xc3,
+ 0x4f, 0x72, 0xda, 0xb7, 0xf6, 0x97, 0xa0, 0xf0, 0x96, 0xca, 0x3f, 0xa6, 0xb9, 0x17, 0xa2, 0x95,
+ 0x94, 0xee, 0x5d, 0x30, 0x47, 0x39, 0x71, 0x45, 0x7f, 0x66, 0xcf, 0x55, 0x1a, 0x97, 0x0f, 0x4b,
+ 0x86, 0xcd, 0xa3, 0x9a, 0x74, 0xee, 0x8a, 0x80, 0x47, 0x8a, 0xc5, 0xfc, 0xb3, 0x54, 0x98, 0xac,
+ 0x38, 0x1c, 0xf0, 0x6b, 0x03, 0x2c, 0xc9, 0xbf, 0x1b, 0x38, 0xec, 0x12, 0x31, 0x95, 0x74, 0xce,
+ 0xd3, 0x9f, 0xc8, 0x3d, 0x66, 0x5c, 0xf3, 0xa4, 0x0e, 0x6e, 0xe9, 0x66, 0x86, 0x0b, 0x8d, 0x71,
+ 0xc3, 0x0b, 0xa0, 0xe2, 0x52, 0x0f, 0x91, 0xa0, 0x47, 0x1d, 0xac, 0x34, 0x3c, 0xd7, 0x5c, 0x1e,
+ 0x0d, 0xeb, 0x95, 0x76, 0xb2, 0x8c, 0xd2, 0x36, 0xf0, 0x15, 0x50, 0x71, 0xf1, 0x17, 0xb1, 0xcb,
+ 0xac, 0x74, 0x39, 0xae, 0xf9, 0x2a, 0xed, 0x64, 0x0b, 0xa5, 0xed, 0xe0, 0x6d, 0x21, 0x18, 0x1e,
+ 0x52, 0x87, 0x55, 0xcb, 0xb2, 0x13, 0xaf, 0x4f, 0x9d, 0x70, 0x5b, 0xfa, 0xcb, 0x89, 0x93, 0x52,
+ 0x9b, 0xc4, 0x44, 0x11, 0xb8, 0xf9, 0x6b, 0x19, 0x9c, 0xdd, 0x73, 0x72, 0xc0, 0x77, 0x01, 0xf4,
+ 0x37, 0x19, 0x09, 0x07, 0xa4, 0xf3, 0x9e, 0xba, 0x3a, 0xc4, 0x0c, 0x17, 0x5d, 0x98, 0x6d, 0x9e,
+ 0x14, 0x47, 0xe5, 0x5a, 0x6e, 0x17, 0x4d, 0xf0, 0x80, 0x0e, 0x38, 0x2a, 0x0e, 0x90, 0xaa, 0x30,
+ 0xd5, 0xd7, 0xc5, 0x74, 0xa7, 0xf3, 0xff, 0xa3, 0x61, 0xfd, 0xe8, 0x7a, 0x1a, 0x04, 0x65, 0x31,
+ 0xe1, 0x1a, 0x58, 0x76, 0xfa, 0x61, 0x48, 0x3c, 0x3e, 0x56, 0xf1, 0x53, 0xba, 0x02, 0xcb, 0xad,
+ 0xec, 0x36, 0x1a, 0xb7, 0x17, 0x10, 0x1d, 0xc2, 0x68, 0x48, 0x3a, 0x31, 0x44, 0x39, 0x0b, 0xf1,
+ 0x76, 0x76, 0x1b, 0x8d, 0xdb, 0xc3, 0xbb, 0x60, 0x49, 0xa3, 0xea, 0x7a, 0x57, 0xe7, 0x64, 0x0f,
+ 0xdf, 0x38, 0x68, 0x0f, 0xd5, 0x0c, 0x8f, 0x55, 0xda, 0xca, 0x80, 0xa3, 0x31, 0x32, 0xf8, 0x95,
+ 0x01, 0x80, 0x13, 0x0d, 0x4a, 0x56, 0x9d, 0x97, 0xdc, 0x37, 0x0e, 0xeb, 0x24, 0xc7, 0x23, 0x38,
+ 0xb9, 0x41, 0xe3, 0x25, 0x86, 0x52, 0xc4, 0xe6, 0x1f, 0x25, 0x00, 0x12, 0x11, 0xc2, 0x8b, 0x99,
+ 0x5b, 0x64, 0x75, 0xec, 0x16, 0x39, 0xa6, 0x2d, 0xe5, 0x0b, 0x2f, 0x75, 0x63, 0x74, 0xc1, 0xbc,
+ 0x2f, 0x4f, 0xab, 0xd6, 0x4b, 0x6b, 0xea, 0x3c, 0xe2, 0xfb, 0x3d, 0x86, 0x6f, 0x02, 0x31, 0xa2,
+ 0xf5, 0x10, 0xd0, 0xf0, 0xf0, 0x53, 0x50, 0x0e, 0xfc, 0x4e, 0x74, 0xff, 0xae, 0x4d, 0x4d, 0x73,
+ 0xdd, 0xef, 0xb0, 0x0c, 0xc9, 0x82, 0xc8, 0x4e, 0xac, 0x22, 0x09, 0x0c, 0x7d, 0xb0, 0x10, 0xbd,
+ 0x60, 0xa5, 0xa2, 0x2a, 0x8d, 0x77, 0xa6, 0x26, 0x41, 0x1a, 0x20, 0x43, 0xb4, 0x28, 0x66, 0x79,
+ 0xb4, 0x83, 0x62, 0x12, 0xf3, 0xaf, 0x12, 0x58, 0x4c, 0x0b, 0xe8, 0xdf, 0xd1, 0x01, 0xa5, 0xe5,
+ 0x27, 0xdc, 0x01, 0x45, 0xf2, 0x14, 0x3a, 0xa0, 0x88, 0x8a, 0x3a, 0xf0, 0x7d, 0x09, 0xc0, 0xbc,
+ 0xfc, 0x20, 0x07, 0xf3, 0x5c, 0xde, 0x29, 0x4f, 0xe4, 0x32, 0x8b, 0xdf, 0x20, 0xfa, 0xde, 0xd2,
+ 0x5c, 0xe2, 0x11, 0xae, 0xa6, 0xfe, 0xd5, 0xe4, 0xb1, 0x1e, 0x1f, 0xe1, 0x76, 0xbc, 0x83, 0x52,
+ 0x56, 0x90, 0x80, 0x8a, 0xf2, 0xbe, 0x85, 0x7b, 0xfd, 0xe8, 0x41, 0xb5, 0xe7, 0x7b, 0xc3, 0x8a,
+ 0x92, 0xb7, 0x6e, 0xf4, 0xb1, 0xc7, 0x29, 0xdf, 0x49, 0x6e, 0xbb, 0x8d, 0x04, 0x0a, 0xa5, 0x71,
+ 0xcd, 0x1f, 0xc6, 0xeb, 0xa4, 0xf4, 0xfa, 0xdf, 0xa9, 0xd3, 0x16, 0x58, 0xd4, 0x43, 0xf8, 0x9f,
+ 0x14, 0xea, 0x84, 0x66, 0x59, 0x6c, 0xa5, 0xb0, 0x50, 0x06, 0xd9, 0xfc, 0xd9, 0x00, 0xc7, 0xc6,
+ 0x47, 0xcd, 0x58, 0xc8, 0xc6, 0xbe, 0x42, 0xbe, 0x03, 0xa0, 0x4a, 0x78, 0x6d, 0x40, 0x42, 0xdc,
+ 0x25, 0x2a, 0xf0, 0xd2, 0x81, 0x02, 0x8f, 0x9f, 0xcd, 0x1b, 0x39, 0x44, 0x34, 0x81, 0xc5, 0xfc,
+ 0x25, 0x9b, 0x84, 0xea, 0xf6, 0x41, 0x92, 0xb8, 0x0b, 0x8e, 0xeb, 0xea, 0x1c, 0x42, 0x16, 0x67,
+ 0x34, 0xd9, 0xf1, 0x56, 0x1e, 0x12, 0x4d, 0xe2, 0x31, 0x7f, 0x2c, 0x81, 0x13, 0x93, 0x46, 0x32,
+ 0x6c, 0xeb, 0x4f, 0x62, 0x95, 0xc5, 0xa5, 0xf4, 0x27, 0xf1, 0xee, 0xb0, 0x7e, 0x7e, 0xcf, 0x6f,
+ 0x9c, 0x08, 0x30, 0xf5, 0xfd, 0xfc, 0x21, 0xa8, 0x66, 0xaa, 0xf8, 0x01, 0xa7, 0x3d, 0x7a, 0x47,
+ 0xbd, 0xc4, 0xd4, 0x23, 0xf4, 0x99, 0xd1, 0xb0, 0x5e, 0xdd, 0x28, 0xb0, 0x41, 0x85, 0xde, 0xe2,
+ 0xc3, 0x69, 0x82, 0x0a, 0x0e, 0x26, 0xdf, 0x93, 0x53, 0x28, 0xe0, 0xa7, 0x7c, 0xe5, 0x94, 0x0a,
+ 0x0e, 0xb9, 0x72, 0x1f, 0x83, 0xd3, 0xd9, 0xc6, 0xe5, 0x4b, 0x77, 0x76, 0x34, 0xac, 0x9f, 0x6e,
+ 0x15, 0x19, 0xa1, 0x62, 0xff, 0x22, 0xf5, 0xcd, 0x3e, 0x1d, 0xf5, 0x35, 0xad, 0x7b, 0x0f, 0x6b,
+ 0x33, 0xf7, 0x1f, 0xd6, 0x66, 0x1e, 0x3c, 0xac, 0xcd, 0x7c, 0x39, 0xaa, 0x19, 0xf7, 0x46, 0x35,
+ 0xe3, 0xfe, 0xa8, 0x66, 0x3c, 0x18, 0xd5, 0x8c, 0xdf, 0x46, 0x35, 0xe3, 0xdb, 0x47, 0xb5, 0x99,
+ 0x8f, 0x16, 0xa2, 0x61, 0xf8, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4c, 0xa9, 0x91, 0xe9, 0xfe,
+ 0x13, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/generated.proto
new file mode 100644
index 000000000..21d9ea6f6
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/generated.proto
@@ -0,0 +1,302 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.client_go.pkg.apis.autoscaling.v2alpha1;
+
+import "k8s.io/apimachinery/pkg/api/resource/generated.proto";
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+import "k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v2alpha1";
+
+// CrossVersionObjectReference contains enough information to let you identify the referred resource.
+message CrossVersionObjectReference {
+ // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"
+ optional string kind = 1;
+
+ // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
+ optional string name = 2;
+
+ // API version of the referent
+ // +optional
+ optional string apiVersion = 3;
+}
+
+// HorizontalPodAutoscaler is the configuration for a horizontal pod
+// autoscaler, which automatically manages the replica count of any resource
+// implementing the scale subresource based on the metrics specified.
+message HorizontalPodAutoscaler {
+ // metadata is the standard object metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // spec is the specification for the behaviour of the autoscaler.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
+ // +optional
+ optional HorizontalPodAutoscalerSpec spec = 2;
+
+ // status is the current information about the autoscaler.
+ // +optional
+ optional HorizontalPodAutoscalerStatus status = 3;
+}
+
+// HorizontalPodAutoscalerCondition describes the state of
+// a HorizontalPodAutoscaler at a certain point.
+message HorizontalPodAutoscalerCondition {
+ // type describes the current condition
+ optional string type = 1;
+
+ // status is the status of the condition (True, False, Unknown)
+ optional string status = 2;
+
+ // lastTransitionTime is the last time the condition transitioned from
+ // one status to another
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
+
+ // reason is the reason for the condition's last transition.
+ // +optional
+ optional string reason = 4;
+
+ // message is a human-readable explanation containing details about
+ // the transition
+ // +optional
+ optional string message = 5;
+}
+
+// HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.
+message HorizontalPodAutoscalerList {
+ // metadata is the standard list metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // items is the list of horizontal pod autoscaler objects.
+ repeated HorizontalPodAutoscaler items = 2;
+}
+
+// HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.
+message HorizontalPodAutoscalerSpec {
+ // scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics
+ // should be collected, as well as to actually change the replica count.
+ optional CrossVersionObjectReference scaleTargetRef = 1;
+
+ // minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down.
+ // It defaults to 1 pod.
+ // +optional
+ optional int32 minReplicas = 2;
+
+ // maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.
+ // It cannot be less that minReplicas.
+ optional int32 maxReplicas = 3;
+
+ // metrics contains the specifications for which to use to calculate the
+ // desired replica count (the maximum replica count across all metrics will
+ // be used). The desired replica count is calculated multiplying the
+ // ratio between the target value and the current value by the current
+ // number of pods. Ergo, metrics used must decrease as the pod count is
+ // increased, and vice-versa. See the individual metric source types for
+ // more information about how each type of metric must respond.
+ // +optional
+ repeated MetricSpec metrics = 4;
+}
+
+// HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.
+message HorizontalPodAutoscalerStatus {
+ // observedGeneration is the most recent generation observed by this autoscaler.
+ // +optional
+ optional int64 observedGeneration = 1;
+
+ // lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods,
+ // used by the autoscaler to control how often the number of pods is changed.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScaleTime = 2;
+
+ // currentReplicas is current number of replicas of pods managed by this autoscaler,
+ // as last seen by the autoscaler.
+ optional int32 currentReplicas = 3;
+
+ // desiredReplicas is the desired number of replicas of pods managed by this autoscaler,
+ // as last calculated by the autoscaler.
+ optional int32 desiredReplicas = 4;
+
+ // currentMetrics is the last read state of the metrics used by this autoscaler.
+ repeated MetricStatus currentMetrics = 5;
+
+ // conditions is the set of conditions required for this autoscaler to scale its target,
+ // and indicates whether or not those conditions are met.
+ repeated HorizontalPodAutoscalerCondition conditions = 6;
+}
+
+// MetricSpec specifies how to scale based on a single metric
+// (only `type` and one other matching field should be set at once).
+message MetricSpec {
+ // type is the type of metric source. It should match one of the fields below.
+ optional string type = 1;
+
+ // object refers to a metric describing a single kubernetes object
+ // (for example, hits-per-second on an Ingress object).
+ // +optional
+ optional ObjectMetricSource object = 2;
+
+ // pods refers to a metric describing each pod in the current scale target
+ // (for example, transactions-processed-per-second). The values will be
+ // averaged together before being compared to the target value.
+ // +optional
+ optional PodsMetricSource pods = 3;
+
+ // resource refers to a resource metric (such as those specified in
+ // requests and limits) known to Kubernetes describing each pod in the
+ // current scale target (e.g. CPU or memory). Such metrics are built in to
+ // Kubernetes, and have special scaling options on top of those available
+ // to normal per-pod metrics using the "pods" source.
+ // +optional
+ optional ResourceMetricSource resource = 4;
+}
+
+// MetricStatus describes the last-read state of a single metric.
+message MetricStatus {
+ // type is the type of metric source. It will match one of the fields below.
+ optional string type = 1;
+
+ // object refers to a metric describing a single kubernetes object
+ // (for example, hits-per-second on an Ingress object).
+ // +optional
+ optional ObjectMetricStatus object = 2;
+
+ // pods refers to a metric describing each pod in the current scale target
+ // (for example, transactions-processed-per-second). The values will be
+ // averaged together before being compared to the target value.
+ // +optional
+ optional PodsMetricStatus pods = 3;
+
+ // resource refers to a resource metric (such as those specified in
+ // requests and limits) known to Kubernetes describing each pod in the
+ // current scale target (e.g. CPU or memory). Such metrics are built in to
+ // Kubernetes, and have special scaling options on top of those available
+ // to normal per-pod metrics using the "pods" source.
+ // +optional
+ optional ResourceMetricStatus resource = 4;
+}
+
+// ObjectMetricSource indicates how to scale on a metric describing a
+// kubernetes object (for example, hits-per-second on an Ingress object).
+message ObjectMetricSource {
+ // target is the described Kubernetes object.
+ optional CrossVersionObjectReference target = 1;
+
+ // metricName is the name of the metric in question.
+ optional string metricName = 2;
+
+ // targetValue is the target value of the metric (as a quantity).
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
+}
+
+// ObjectMetricStatus indicates the current value of a metric describing a
+// kubernetes object (for example, hits-per-second on an Ingress object).
+message ObjectMetricStatus {
+ // target is the described Kubernetes object.
+ optional CrossVersionObjectReference target = 1;
+
+ // metricName is the name of the metric in question.
+ optional string metricName = 2;
+
+ // currentValue is the current value of the metric (as a quantity).
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
+}
+
+// PodsMetricSource indicates how to scale on a metric describing each pod in
+// the current scale target (for example, transactions-processed-per-second).
+// The values will be averaged together before being compared to the target
+// value.
+message PodsMetricSource {
+ // metricName is the name of the metric in question
+ optional string metricName = 1;
+
+ // targetAverageValue is the target value of the average of the
+ // metric across all relevant pods (as a quantity)
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2;
+}
+
+// PodsMetricStatus indicates the current value of a metric describing each pod in
+// the current scale target (for example, transactions-processed-per-second).
+message PodsMetricStatus {
+ // metricName is the name of the metric in question
+ optional string metricName = 1;
+
+ // currentAverageValue is the current value of the average of the
+ // metric across all relevant pods (as a quantity)
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2;
+}
+
+// ResourceMetricSource indicates how to scale on a resource metric known to
+// Kubernetes, as specified in requests and limits, describing each pod in the
+// current scale target (e.g. CPU or memory). The values will be averaged
+// together before being compared to the target. Such metrics are built in to
+// Kubernetes, and have special scaling options on top of those available to
+// normal per-pod metrics using the "pods" source. Only one "target" type
+// should be set.
+message ResourceMetricSource {
+ // name is the name of the resource in question.
+ optional string name = 1;
+
+ // targetAverageUtilization is the target value of the average of the
+ // resource metric across all relevant pods, represented as a percentage of
+ // the requested value of the resource for the pods.
+ // +optional
+ optional int32 targetAverageUtilization = 2;
+
+ // targetAverageValue is the target value of the average of the
+ // resource metric across all relevant pods, as a raw value (instead of as
+ // a percentage of the request), similar to the "pods" metric source type.
+ // +optional
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
+}
+
+// ResourceMetricStatus indicates the current value of a resource metric known to
+// Kubernetes, as specified in requests and limits, describing each pod in the
+// current scale target (e.g. CPU or memory). Such metrics are built in to
+// Kubernetes, and have special scaling options on top of those available to
+// normal per-pod metrics using the "pods" source.
+message ResourceMetricStatus {
+ // name is the name of the resource in question.
+ optional string name = 1;
+
+ // currentAverageUtilization is the current value of the average of the
+ // resource metric across all relevant pods, represented as a percentage of
+ // the requested value of the resource for the pods. It will only be
+ // present if `targetAverageValue` was set in the corresponding metric
+ // specification.
+ // +optional
+ optional int32 currentAverageUtilization = 2;
+
+ // currentAverageValue is the current value of the average of the
+ // resource metric across all relevant pods, as a raw value (instead of as
+ // a percentage of the request), similar to the "pods" metric source type.
+ // It will always be set, regardless of the corresponding metric specification.
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
+}
+
diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/register.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/register.go
new file mode 100644
index 000000000..e623be7e3
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/register.go
@@ -0,0 +1,59 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "autoscaling"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v2alpha1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &HorizontalPodAutoscaler{},
+ &HorizontalPodAutoscalerList{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/types.generated.go
new file mode 100644
index 000000000..5f984e4f5
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/types.generated.go
@@ -0,0 +1,5218 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v2alpha1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg1_resource "k8s.io/apimachinery/pkg/api/resource"
+ pkg3_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ pkg4_types "k8s.io/apimachinery/pkg/types"
+ pkg2_v1 "k8s.io/client-go/pkg/api/v1"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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 pkg1_resource.Quantity
+ var v1 pkg3_v1.Time
+ var v2 pkg4_types.UID
+ var v3 pkg2_v1.ResourceName
+ var v4 time.Time
+ _, _, _, _, _ = v0, v1, v2, v3, v4
+ }
+}
+
+func (x *CrossVersionObjectReference) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = x.APIVersion != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(3)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CrossVersionObjectReference) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CrossVersionObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv6 := &x.Name
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv8 := &x.APIVersion
+ 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_containerMapEnd1234)
+}
+
+func (x *CrossVersionObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv11 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv13 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv15 := &x.APIVersion
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *HorizontalPodAutoscalerSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.MinReplicas != nil
+ yyq2[3] = len(x.Metrics) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy4 := &x.ScaleTargetRef
+ yy4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("scaleTargetRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ScaleTargetRef
+ yy6.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.MinReplicas == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.MinReplicas
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(yy9))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("minReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.MinReplicas == nil {
+ r.EncodeNil()
+ } else {
+ yy11 := *x.MinReplicas
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeInt(int64(yy11))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MaxReplicas))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("maxReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MaxReplicas))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Metrics == nil {
+ r.EncodeNil()
+ } else {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ h.encSliceMetricSpec(([]MetricSpec)(x.Metrics), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metrics"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Metrics == nil {
+ r.EncodeNil()
+ } else {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ h.encSliceMetricSpec(([]MetricSpec)(x.Metrics), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "scaleTargetRef":
+ if r.TryDecodeAsNil() {
+ x.ScaleTargetRef = CrossVersionObjectReference{}
+ } else {
+ yyv4 := &x.ScaleTargetRef
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "minReplicas":
+ if r.TryDecodeAsNil() {
+ if x.MinReplicas != nil {
+ x.MinReplicas = nil
+ }
+ } else {
+ if x.MinReplicas == nil {
+ x.MinReplicas = new(int32)
+ }
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*int32)(x.MinReplicas)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "maxReplicas":
+ if r.TryDecodeAsNil() {
+ x.MaxReplicas = 0
+ } else {
+ yyv7 := &x.MaxReplicas
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*int32)(yyv7)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "metrics":
+ if r.TryDecodeAsNil() {
+ x.Metrics = nil
+ } else {
+ yyv9 := &x.Metrics
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceMetricSpec((*[]MetricSpec)(yyv9), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HorizontalPodAutoscalerSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ScaleTargetRef = CrossVersionObjectReference{}
+ } else {
+ yyv12 := &x.ScaleTargetRef
+ yyv12.CodecDecodeSelf(d)
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.MinReplicas != nil {
+ x.MinReplicas = nil
+ }
+ } else {
+ if x.MinReplicas == nil {
+ x.MinReplicas = new(int32)
+ }
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ *((*int32)(x.MinReplicas)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MaxReplicas = 0
+ } else {
+ yyv15 := &x.MaxReplicas
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*int32)(yyv15)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Metrics = nil
+ } else {
+ yyv17 := &x.Metrics
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ h.decSliceMetricSpec((*[]MetricSpec)(yyv17), d)
+ }
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x MetricSourceType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *MetricSourceType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *MetricSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.Object != nil
+ yyq2[2] = x.Pods != nil
+ yyq2[3] = x.Resource != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Object == nil {
+ r.EncodeNil()
+ } else {
+ x.Object.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("object"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Object == nil {
+ r.EncodeNil()
+ } else {
+ x.Object.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Pods == nil {
+ r.EncodeNil()
+ } else {
+ x.Pods.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("pods"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Pods == nil {
+ r.EncodeNil()
+ } else {
+ x.Pods.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Resource == nil {
+ r.EncodeNil()
+ } else {
+ x.Resource.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resource"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Resource == nil {
+ r.EncodeNil()
+ } else {
+ x.Resource.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *MetricSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *MetricSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "object":
+ if r.TryDecodeAsNil() {
+ if x.Object != nil {
+ x.Object = nil
+ }
+ } else {
+ if x.Object == nil {
+ x.Object = new(ObjectMetricSource)
+ }
+ x.Object.CodecDecodeSelf(d)
+ }
+ case "pods":
+ if r.TryDecodeAsNil() {
+ if x.Pods != nil {
+ x.Pods = nil
+ }
+ } else {
+ if x.Pods == nil {
+ x.Pods = new(PodsMetricSource)
+ }
+ x.Pods.CodecDecodeSelf(d)
+ }
+ case "resource":
+ if r.TryDecodeAsNil() {
+ if x.Resource != nil {
+ x.Resource = nil
+ }
+ } else {
+ if x.Resource == nil {
+ x.Resource = new(ResourceMetricSource)
+ }
+ x.Resource.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *MetricSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv9 := &x.Type
+ yyv9.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Object != nil {
+ x.Object = nil
+ }
+ } else {
+ if x.Object == nil {
+ x.Object = new(ObjectMetricSource)
+ }
+ x.Object.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Pods != nil {
+ x.Pods = nil
+ }
+ } else {
+ if x.Pods == nil {
+ x.Pods = new(PodsMetricSource)
+ }
+ x.Pods.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Resource != nil {
+ x.Resource = nil
+ }
+ } else {
+ if x.Resource == nil {
+ x.Resource = new(ResourceMetricSource)
+ }
+ x.Resource.CodecDecodeSelf(d)
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ObjectMetricSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ yy4 := &x.Target
+ yy4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("target"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.Target
+ yy6.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metricName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy12 := &x.TargetValue
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetValue"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy14 := &x.TargetValue
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy14) {
+ } else if !yym15 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy14)
+ } else {
+ z.EncFallback(yy14)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ObjectMetricSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ObjectMetricSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "target":
+ if r.TryDecodeAsNil() {
+ x.Target = CrossVersionObjectReference{}
+ } else {
+ yyv4 := &x.Target
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "metricName":
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv5 := &x.MetricName
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*string)(yyv5)) = r.DecodeString()
+ }
+ }
+ case "targetValue":
+ if r.TryDecodeAsNil() {
+ x.TargetValue = pkg1_resource.Quantity{}
+ } else {
+ yyv7 := &x.TargetValue
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv7)
+ } else {
+ z.DecFallback(yyv7, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ObjectMetricSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Target = CrossVersionObjectReference{}
+ } else {
+ yyv10 := &x.Target
+ yyv10.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv11 := &x.MetricName
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*string)(yyv11)) = r.DecodeString()
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TargetValue = pkg1_resource.Quantity{}
+ } else {
+ yyv13 := &x.TargetValue
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv13) {
+ } else if !yym14 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv13)
+ } else {
+ z.DecFallback(yyv13, false)
+ }
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodsMetricSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metricName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy7 := &x.TargetAverageValue
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy7)
+ } else {
+ z.EncFallback(yy7)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetAverageValue"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.TargetAverageValue
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy9) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy9)
+ } else {
+ z.EncFallback(yy9)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodsMetricSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodsMetricSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "metricName":
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv4 := &x.MetricName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "targetAverageValue":
+ if r.TryDecodeAsNil() {
+ x.TargetAverageValue = pkg1_resource.Quantity{}
+ } else {
+ yyv6 := &x.TargetAverageValue
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodsMetricSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv9 := &x.MetricName
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TargetAverageValue = pkg1_resource.Quantity{}
+ } else {
+ yyv11 := &x.TargetAverageValue
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else if !yym12 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv11)
+ } else {
+ z.DecFallback(yyv11, false)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ResourceMetricSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.TargetAverageUtilization != nil
+ yyq2[2] = x.TargetAverageValue != nil
+ 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_containerArrayElem1234)
+ yysf4 := &x.Name
+ yysf4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yysf5 := &x.Name
+ yysf5.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.TargetAverageUtilization == nil {
+ r.EncodeNil()
+ } else {
+ yy7 := *x.TargetAverageUtilization
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(yy7))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetAverageUtilization"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TargetAverageUtilization == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.TargetAverageUtilization
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(yy9))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.TargetAverageValue == nil {
+ r.EncodeNil()
+ } else {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.TargetAverageValue) {
+ } else if !yym12 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.TargetAverageValue)
+ } else {
+ z.EncFallback(x.TargetAverageValue)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetAverageValue"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TargetAverageValue == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.TargetAverageValue) {
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.TargetAverageValue)
+ } else {
+ z.EncFallback(x.TargetAverageValue)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ResourceMetricSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ResourceMetricSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "targetAverageUtilization":
+ if r.TryDecodeAsNil() {
+ if x.TargetAverageUtilization != nil {
+ x.TargetAverageUtilization = nil
+ }
+ } else {
+ if x.TargetAverageUtilization == nil {
+ x.TargetAverageUtilization = new(int32)
+ }
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*int32)(x.TargetAverageUtilization)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "targetAverageValue":
+ if r.TryDecodeAsNil() {
+ if x.TargetAverageValue != nil {
+ x.TargetAverageValue = nil
+ }
+ } else {
+ if x.TargetAverageValue == nil {
+ x.TargetAverageValue = new(pkg1_resource.Quantity)
+ }
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.TargetAverageValue) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.TargetAverageValue)
+ } else {
+ z.DecFallback(x.TargetAverageValue, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ResourceMetricSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv10 := &x.Name
+ yyv10.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.TargetAverageUtilization != nil {
+ x.TargetAverageUtilization = nil
+ }
+ } else {
+ if x.TargetAverageUtilization == nil {
+ x.TargetAverageUtilization = new(int32)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int32)(x.TargetAverageUtilization)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.TargetAverageValue != nil {
+ x.TargetAverageValue = nil
+ }
+ } else {
+ if x.TargetAverageValue == nil {
+ x.TargetAverageValue = new(pkg1_resource.Quantity)
+ }
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.TargetAverageValue) {
+ } else if !yym14 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.TargetAverageValue)
+ } else {
+ z.DecFallback(x.TargetAverageValue, false)
+ }
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *HorizontalPodAutoscalerStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.ObservedGeneration != nil
+ yyq2[1] = x.LastScaleTime != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 4
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.ObservedGeneration == nil {
+ r.EncodeNil()
+ } else {
+ yy4 := *x.ObservedGeneration
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(yy4))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("observedGeneration"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ObservedGeneration == nil {
+ r.EncodeNil()
+ } else {
+ yy6 := *x.ObservedGeneration
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(yy6))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.LastScaleTime == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.LastScaleTime) {
+ } else if yym9 {
+ z.EncBinaryMarshal(x.LastScaleTime)
+ } else if !yym9 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.LastScaleTime)
+ } else {
+ z.EncFallback(x.LastScaleTime)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastScaleTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.LastScaleTime == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.LastScaleTime) {
+ } else if yym10 {
+ z.EncBinaryMarshal(x.LastScaleTime)
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.LastScaleTime)
+ } else {
+ z.EncFallback(x.LastScaleTime)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeInt(int64(x.CurrentReplicas))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.CurrentReplicas))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeInt(int64(x.DesiredReplicas))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("desiredReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(x.DesiredReplicas))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.CurrentMetrics == nil {
+ r.EncodeNil()
+ } else {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ h.encSliceMetricStatus(([]MetricStatus)(x.CurrentMetrics), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentMetrics"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.CurrentMetrics == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ h.encSliceMetricStatus(([]MetricStatus)(x.CurrentMetrics), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ h.encSliceHorizontalPodAutoscalerCondition(([]HorizontalPodAutoscalerCondition)(x.Conditions), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("conditions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ h.encSliceHorizontalPodAutoscalerCondition(([]HorizontalPodAutoscalerCondition)(x.Conditions), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "observedGeneration":
+ if r.TryDecodeAsNil() {
+ if x.ObservedGeneration != nil {
+ x.ObservedGeneration = nil
+ }
+ } else {
+ if x.ObservedGeneration == nil {
+ x.ObservedGeneration = new(int64)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "lastScaleTime":
+ if r.TryDecodeAsNil() {
+ if x.LastScaleTime != nil {
+ x.LastScaleTime = nil
+ }
+ } else {
+ if x.LastScaleTime == nil {
+ x.LastScaleTime = new(pkg3_v1.Time)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.LastScaleTime) {
+ } else if yym7 {
+ z.DecBinaryUnmarshal(x.LastScaleTime)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.LastScaleTime)
+ } else {
+ z.DecFallback(x.LastScaleTime, false)
+ }
+ }
+ case "currentReplicas":
+ if r.TryDecodeAsNil() {
+ x.CurrentReplicas = 0
+ } else {
+ yyv8 := &x.CurrentReplicas
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "desiredReplicas":
+ if r.TryDecodeAsNil() {
+ x.DesiredReplicas = 0
+ } else {
+ yyv10 := &x.DesiredReplicas
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(yyv10)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "currentMetrics":
+ if r.TryDecodeAsNil() {
+ x.CurrentMetrics = nil
+ } else {
+ yyv12 := &x.CurrentMetrics
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ h.decSliceMetricStatus((*[]MetricStatus)(yyv12), d)
+ }
+ }
+ case "conditions":
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv14 := &x.Conditions
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.decSliceHorizontalPodAutoscalerCondition((*[]HorizontalPodAutoscalerCondition)(yyv14), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HorizontalPodAutoscalerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj16 int
+ var yyb16 bool
+ var yyhl16 bool = l >= 0
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ObservedGeneration != nil {
+ x.ObservedGeneration = nil
+ }
+ } else {
+ if x.ObservedGeneration == nil {
+ x.ObservedGeneration = new(int64)
+ }
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.LastScaleTime != nil {
+ x.LastScaleTime = nil
+ }
+ } else {
+ if x.LastScaleTime == nil {
+ x.LastScaleTime = new(pkg3_v1.Time)
+ }
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.LastScaleTime) {
+ } else if yym20 {
+ z.DecBinaryUnmarshal(x.LastScaleTime)
+ } else if !yym20 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.LastScaleTime)
+ } else {
+ z.DecFallback(x.LastScaleTime, false)
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentReplicas = 0
+ } else {
+ yyv21 := &x.CurrentReplicas
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int32)(yyv21)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DesiredReplicas = 0
+ } else {
+ yyv23 := &x.DesiredReplicas
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*int32)(yyv23)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentMetrics = nil
+ } else {
+ yyv25 := &x.CurrentMetrics
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ h.decSliceMetricStatus((*[]MetricStatus)(yyv25), d)
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv27 := &x.Conditions
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ h.decSliceHorizontalPodAutoscalerCondition((*[]HorizontalPodAutoscalerCondition)(yyv27), d)
+ }
+ }
+ for {
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj16-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x HorizontalPodAutoscalerConditionType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *HorizontalPodAutoscalerConditionType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *HorizontalPodAutoscalerCondition) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = true
+ yyq2[3] = x.Reason != ""
+ yyq2[4] = x.Message != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yysf7 := &x.Status
+ yysf7.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yysf8 := &x.Status
+ yysf8.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy10 := &x.LastTransitionTime
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy10) {
+ } else if yym11 {
+ z.EncBinaryMarshal(yy10)
+ } else if !yym11 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy10)
+ } else {
+ z.EncFallback(yy10)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.LastTransitionTime
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if yym13 {
+ z.EncBinaryMarshal(yy12)
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerCondition) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "lastTransitionTime":
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg3_v1.Time{}
+ } else {
+ yyv6 := &x.LastTransitionTime
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if yym7 {
+ z.DecBinaryUnmarshal(yyv6)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv8 := &x.Reason
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv10 := &x.Message
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HorizontalPodAutoscalerCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv13 := &x.Type
+ yyv13.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv14 := &x.Status
+ yyv14.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg3_v1.Time{}
+ } else {
+ yyv15 := &x.LastTransitionTime
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv15) {
+ } else if yym16 {
+ z.DecBinaryUnmarshal(yyv15)
+ } else if !yym16 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv15)
+ } else {
+ z.DecFallback(yyv15, false)
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv17 := &x.Reason
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv19 := &x.Message
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *MetricStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.Object != nil
+ yyq2[2] = x.Pods != nil
+ yyq2[3] = x.Resource != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Object == nil {
+ r.EncodeNil()
+ } else {
+ x.Object.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("object"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Object == nil {
+ r.EncodeNil()
+ } else {
+ x.Object.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Pods == nil {
+ r.EncodeNil()
+ } else {
+ x.Pods.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("pods"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Pods == nil {
+ r.EncodeNil()
+ } else {
+ x.Pods.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Resource == nil {
+ r.EncodeNil()
+ } else {
+ x.Resource.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resource"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Resource == nil {
+ r.EncodeNil()
+ } else {
+ x.Resource.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *MetricStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *MetricStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "object":
+ if r.TryDecodeAsNil() {
+ if x.Object != nil {
+ x.Object = nil
+ }
+ } else {
+ if x.Object == nil {
+ x.Object = new(ObjectMetricStatus)
+ }
+ x.Object.CodecDecodeSelf(d)
+ }
+ case "pods":
+ if r.TryDecodeAsNil() {
+ if x.Pods != nil {
+ x.Pods = nil
+ }
+ } else {
+ if x.Pods == nil {
+ x.Pods = new(PodsMetricStatus)
+ }
+ x.Pods.CodecDecodeSelf(d)
+ }
+ case "resource":
+ if r.TryDecodeAsNil() {
+ if x.Resource != nil {
+ x.Resource = nil
+ }
+ } else {
+ if x.Resource == nil {
+ x.Resource = new(ResourceMetricStatus)
+ }
+ x.Resource.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *MetricStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv9 := &x.Type
+ yyv9.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Object != nil {
+ x.Object = nil
+ }
+ } else {
+ if x.Object == nil {
+ x.Object = new(ObjectMetricStatus)
+ }
+ x.Object.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Pods != nil {
+ x.Pods = nil
+ }
+ } else {
+ if x.Pods == nil {
+ x.Pods = new(PodsMetricStatus)
+ }
+ x.Pods.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Resource != nil {
+ x.Resource = nil
+ }
+ } else {
+ if x.Resource == nil {
+ x.Resource = new(ResourceMetricStatus)
+ }
+ x.Resource.CodecDecodeSelf(d)
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ObjectMetricStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ yy4 := &x.Target
+ yy4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("target"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.Target
+ yy6.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metricName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy12 := &x.CurrentValue
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentValue"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy14 := &x.CurrentValue
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy14) {
+ } else if !yym15 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy14)
+ } else {
+ z.EncFallback(yy14)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ObjectMetricStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ObjectMetricStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "target":
+ if r.TryDecodeAsNil() {
+ x.Target = CrossVersionObjectReference{}
+ } else {
+ yyv4 := &x.Target
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "metricName":
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv5 := &x.MetricName
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*string)(yyv5)) = r.DecodeString()
+ }
+ }
+ case "currentValue":
+ if r.TryDecodeAsNil() {
+ x.CurrentValue = pkg1_resource.Quantity{}
+ } else {
+ yyv7 := &x.CurrentValue
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv7)
+ } else {
+ z.DecFallback(yyv7, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ObjectMetricStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Target = CrossVersionObjectReference{}
+ } else {
+ yyv10 := &x.Target
+ yyv10.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv11 := &x.MetricName
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*string)(yyv11)) = r.DecodeString()
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentValue = pkg1_resource.Quantity{}
+ } else {
+ yyv13 := &x.CurrentValue
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv13) {
+ } else if !yym14 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv13)
+ } else {
+ z.DecFallback(yyv13, false)
+ }
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodsMetricStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metricName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy7 := &x.CurrentAverageValue
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy7)
+ } else {
+ z.EncFallback(yy7)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentAverageValue"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.CurrentAverageValue
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy9) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy9)
+ } else {
+ z.EncFallback(yy9)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodsMetricStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodsMetricStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "metricName":
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv4 := &x.MetricName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "currentAverageValue":
+ if r.TryDecodeAsNil() {
+ x.CurrentAverageValue = pkg1_resource.Quantity{}
+ } else {
+ yyv6 := &x.CurrentAverageValue
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodsMetricStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv9 := &x.MetricName
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentAverageValue = pkg1_resource.Quantity{}
+ } else {
+ yyv11 := &x.CurrentAverageValue
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else if !yym12 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv11)
+ } else {
+ z.DecFallback(yyv11, false)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ResourceMetricStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.CurrentAverageUtilization != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(3)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yysf4 := &x.Name
+ yysf4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yysf5 := &x.Name
+ yysf5.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.CurrentAverageUtilization == nil {
+ r.EncodeNil()
+ } else {
+ yy7 := *x.CurrentAverageUtilization
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(yy7))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentAverageUtilization"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.CurrentAverageUtilization == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.CurrentAverageUtilization
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(yy9))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy12 := &x.CurrentAverageValue
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentAverageValue"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy14 := &x.CurrentAverageValue
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy14) {
+ } else if !yym15 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy14)
+ } else {
+ z.EncFallback(yy14)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ResourceMetricStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ResourceMetricStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "currentAverageUtilization":
+ if r.TryDecodeAsNil() {
+ if x.CurrentAverageUtilization != nil {
+ x.CurrentAverageUtilization = nil
+ }
+ } else {
+ if x.CurrentAverageUtilization == nil {
+ x.CurrentAverageUtilization = new(int32)
+ }
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*int32)(x.CurrentAverageUtilization)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "currentAverageValue":
+ if r.TryDecodeAsNil() {
+ x.CurrentAverageValue = pkg1_resource.Quantity{}
+ } else {
+ yyv7 := &x.CurrentAverageValue
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv7)
+ } else {
+ z.DecFallback(yyv7, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ResourceMetricStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv10 := &x.Name
+ yyv10.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.CurrentAverageUtilization != nil {
+ x.CurrentAverageUtilization = nil
+ }
+ } else {
+ if x.CurrentAverageUtilization == nil {
+ x.CurrentAverageUtilization = new(int32)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int32)(x.CurrentAverageUtilization)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentAverageValue = pkg1_resource.Quantity{}
+ } else {
+ yyv13 := &x.CurrentAverageValue
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv13) {
+ } else if !yym14 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv13)
+ } else {
+ z.DecFallback(yyv13, false)
+ }
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *HorizontalPodAutoscaler) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscaler) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscaler) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg3_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 = HorizontalPodAutoscalerSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = HorizontalPodAutoscalerStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg3_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = HorizontalPodAutoscalerSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = HorizontalPodAutoscalerStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *HorizontalPodAutoscalerList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceHorizontalPodAutoscaler(([]HorizontalPodAutoscaler)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceHorizontalPodAutoscaler(([]HorizontalPodAutoscaler)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg3_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.decSliceHorizontalPodAutoscaler((*[]HorizontalPodAutoscaler)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HorizontalPodAutoscalerList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg3_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceHorizontalPodAutoscaler((*[]HorizontalPodAutoscaler)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encSliceMetricSpec(v []MetricSpec, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceMetricSpec(v *[]MetricSpec, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []MetricSpec{}
+ 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, 40)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]MetricSpec, yyrl1)
+ }
+ } else {
+ yyv1 = make([]MetricSpec, 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] = MetricSpec{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, MetricSpec{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = MetricSpec{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, MetricSpec{}) // var yyz1 MetricSpec
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = MetricSpec{}
+ } 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 = []MetricSpec{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceMetricStatus(v []MetricStatus, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceMetricStatus(v *[]MetricStatus, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []MetricStatus{}
+ 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, 40)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]MetricStatus, yyrl1)
+ }
+ } else {
+ yyv1 = make([]MetricStatus, 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] = MetricStatus{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, MetricStatus{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = MetricStatus{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, MetricStatus{}) // var yyz1 MetricStatus
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = MetricStatus{}
+ } 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 = []MetricStatus{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceHorizontalPodAutoscalerCondition(v []HorizontalPodAutoscalerCondition, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceHorizontalPodAutoscalerCondition(v *[]HorizontalPodAutoscalerCondition, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []HorizontalPodAutoscalerCondition{}
+ 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, 88)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]HorizontalPodAutoscalerCondition, yyrl1)
+ }
+ } else {
+ yyv1 = make([]HorizontalPodAutoscalerCondition, 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] = HorizontalPodAutoscalerCondition{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, HorizontalPodAutoscalerCondition{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = HorizontalPodAutoscalerCondition{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, HorizontalPodAutoscalerCondition{}) // var yyz1 HorizontalPodAutoscalerCondition
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = HorizontalPodAutoscalerCondition{}
+ } 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 = []HorizontalPodAutoscalerCondition{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceHorizontalPodAutoscaler(v []HorizontalPodAutoscaler, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceHorizontalPodAutoscaler(v *[]HorizontalPodAutoscaler, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []HorizontalPodAutoscaler{}
+ 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, 424)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]HorizontalPodAutoscaler, yyrl1)
+ }
+ } else {
+ yyv1 = make([]HorizontalPodAutoscaler, 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] = HorizontalPodAutoscaler{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, HorizontalPodAutoscaler{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = HorizontalPodAutoscaler{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, HorizontalPodAutoscaler{}) // var yyz1 HorizontalPodAutoscaler
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = HorizontalPodAutoscaler{}
+ } 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 = []HorizontalPodAutoscaler{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/types.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/types.go
new file mode 100644
index 000000000..bbdf7b09b
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/types.go
@@ -0,0 +1,309 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+import (
+ "k8s.io/apimachinery/pkg/api/resource"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/client-go/pkg/api/v1"
+)
+
+// CrossVersionObjectReference contains enough information to let you identify the referred resource.
+type CrossVersionObjectReference struct {
+ // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"
+ Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
+ // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
+ Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
+ // API version of the referent
+ // +optional
+ APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"`
+}
+
+// HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.
+type HorizontalPodAutoscalerSpec struct {
+ // scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics
+ // should be collected, as well as to actually change the replica count.
+ ScaleTargetRef CrossVersionObjectReference `json:"scaleTargetRef" protobuf:"bytes,1,opt,name=scaleTargetRef"`
+ // minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down.
+ // It defaults to 1 pod.
+ // +optional
+ MinReplicas *int32 `json:"minReplicas,omitempty" protobuf:"varint,2,opt,name=minReplicas"`
+ // maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.
+ // It cannot be less that minReplicas.
+ MaxReplicas int32 `json:"maxReplicas" protobuf:"varint,3,opt,name=maxReplicas"`
+ // metrics contains the specifications for which to use to calculate the
+ // desired replica count (the maximum replica count across all metrics will
+ // be used). The desired replica count is calculated multiplying the
+ // ratio between the target value and the current value by the current
+ // number of pods. Ergo, metrics used must decrease as the pod count is
+ // increased, and vice-versa. See the individual metric source types for
+ // more information about how each type of metric must respond.
+ // +optional
+ Metrics []MetricSpec `json:"metrics,omitempty" protobuf:"bytes,4,rep,name=metrics"`
+}
+
+// MetricSourceType indicates the type of metric.
+type MetricSourceType string
+
+var (
+ // ObjectMetricSourceType is a metric describing a kubernetes object
+ // (for example, hits-per-second on an Ingress object).
+ ObjectMetricSourceType MetricSourceType = "Object"
+ // PodsMetricSourceType is a metric describing each pod in the current scale
+ // target (for example, transactions-processed-per-second). The values
+ // will be averaged together before being compared to the target value.
+ PodsMetricSourceType MetricSourceType = "Pods"
+ // ResourceMetricSourceType is a resource metric known to Kubernetes, as
+ // specified in requests and limits, describing each pod in the current
+ // scale target (e.g. CPU or memory). Such metrics are built in to
+ // Kubernetes, and have special scaling options on top of those available
+ // to normal per-pod metrics (the "pods" source).
+ ResourceMetricSourceType MetricSourceType = "Resource"
+)
+
+// MetricSpec specifies how to scale based on a single metric
+// (only `type` and one other matching field should be set at once).
+type MetricSpec struct {
+ // type is the type of metric source. It should match one of the fields below.
+ Type MetricSourceType `json:"type" protobuf:"bytes,1,name=type"`
+
+ // object refers to a metric describing a single kubernetes object
+ // (for example, hits-per-second on an Ingress object).
+ // +optional
+ Object *ObjectMetricSource `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"`
+ // pods refers to a metric describing each pod in the current scale target
+ // (for example, transactions-processed-per-second). The values will be
+ // averaged together before being compared to the target value.
+ // +optional
+ Pods *PodsMetricSource `json:"pods,omitempty" protobuf:"bytes,3,opt,name=pods"`
+ // resource refers to a resource metric (such as those specified in
+ // requests and limits) known to Kubernetes describing each pod in the
+ // current scale target (e.g. CPU or memory). Such metrics are built in to
+ // Kubernetes, and have special scaling options on top of those available
+ // to normal per-pod metrics using the "pods" source.
+ // +optional
+ Resource *ResourceMetricSource `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"`
+}
+
+// ObjectMetricSource indicates how to scale on a metric describing a
+// kubernetes object (for example, hits-per-second on an Ingress object).
+type ObjectMetricSource struct {
+ // target is the described Kubernetes object.
+ Target CrossVersionObjectReference `json:"target" protobuf:"bytes,1,name=target"`
+
+ // metricName is the name of the metric in question.
+ MetricName string `json:"metricName" protobuf:"bytes,2,name=metricName"`
+ // targetValue is the target value of the metric (as a quantity).
+ TargetValue resource.Quantity `json:"targetValue" protobuf:"bytes,3,name=targetValue"`
+}
+
+// PodsMetricSource indicates how to scale on a metric describing each pod in
+// the current scale target (for example, transactions-processed-per-second).
+// The values will be averaged together before being compared to the target
+// value.
+type PodsMetricSource struct {
+ // metricName is the name of the metric in question
+ MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"`
+ // targetAverageValue is the target value of the average of the
+ // metric across all relevant pods (as a quantity)
+ TargetAverageValue resource.Quantity `json:"targetAverageValue" protobuf:"bytes,2,name=targetAverageValue"`
+}
+
+// ResourceMetricSource indicates how to scale on a resource metric known to
+// Kubernetes, as specified in requests and limits, describing each pod in the
+// current scale target (e.g. CPU or memory). The values will be averaged
+// together before being compared to the target. Such metrics are built in to
+// Kubernetes, and have special scaling options on top of those available to
+// normal per-pod metrics using the "pods" source. Only one "target" type
+// should be set.
+type ResourceMetricSource struct {
+ // name is the name of the resource in question.
+ Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
+ // targetAverageUtilization is the target value of the average of the
+ // resource metric across all relevant pods, represented as a percentage of
+ // the requested value of the resource for the pods.
+ // +optional
+ TargetAverageUtilization *int32 `json:"targetAverageUtilization,omitempty" protobuf:"varint,2,opt,name=targetAverageUtilization"`
+ // targetAverageValue is the target value of the average of the
+ // resource metric across all relevant pods, as a raw value (instead of as
+ // a percentage of the request), similar to the "pods" metric source type.
+ // +optional
+ TargetAverageValue *resource.Quantity `json:"targetAverageValue,omitempty" protobuf:"bytes,3,opt,name=targetAverageValue"`
+}
+
+// HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.
+type HorizontalPodAutoscalerStatus struct {
+ // observedGeneration is the most recent generation observed by this autoscaler.
+ // +optional
+ ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
+
+ // lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods,
+ // used by the autoscaler to control how often the number of pods is changed.
+ // +optional
+ LastScaleTime *metav1.Time `json:"lastScaleTime,omitempty" protobuf:"bytes,2,opt,name=lastScaleTime"`
+
+ // currentReplicas is current number of replicas of pods managed by this autoscaler,
+ // as last seen by the autoscaler.
+ CurrentReplicas int32 `json:"currentReplicas" protobuf:"varint,3,opt,name=currentReplicas"`
+
+ // desiredReplicas is the desired number of replicas of pods managed by this autoscaler,
+ // as last calculated by the autoscaler.
+ DesiredReplicas int32 `json:"desiredReplicas" protobuf:"varint,4,opt,name=desiredReplicas"`
+
+ // currentMetrics is the last read state of the metrics used by this autoscaler.
+ CurrentMetrics []MetricStatus `json:"currentMetrics" protobuf:"bytes,5,rep,name=currentMetrics"`
+
+ // conditions is the set of conditions required for this autoscaler to scale its target,
+ // and indicates whether or not those conditions are met.
+ Conditions []HorizontalPodAutoscalerCondition `json:"conditions" protobuf:"bytes,6,rep,name=conditions"`
+}
+
+// HorizontalPodAutoscalerConditionType are the valid conditions of
+// a HorizontalPodAutoscaler.
+type HorizontalPodAutoscalerConditionType string
+
+var (
+ // ScalingActive indicates that the HPA controller is able to scale if necessary:
+ // it's correctly configured, can fetch the desired metrics, and isn't disabled.
+ ScalingActive HorizontalPodAutoscalerConditionType = "ScalingActive"
+ // AbleToScale indicates a lack of transient issues which prevent scaling from occuring,
+ // such as being in a backoff window, or being unable to access/update the target scale.
+ AbleToScale HorizontalPodAutoscalerConditionType = "AbleToScale"
+ // ScalingLimited indicates that the calculated scale based on metrics would be above or
+ // below the range for the HPA, and has thus been capped.
+ ScalingLimited HorizontalPodAutoscalerConditionType = "ScalingLimited"
+)
+
+// HorizontalPodAutoscalerCondition describes the state of
+// a HorizontalPodAutoscaler at a certain point.
+type HorizontalPodAutoscalerCondition struct {
+ // type describes the current condition
+ Type HorizontalPodAutoscalerConditionType `json:"type" protobuf:"bytes,1,name=type"`
+ // status is the status of the condition (True, False, Unknown)
+ Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,name=status"`
+ // lastTransitionTime is the last time the condition transitioned from
+ // one status to another
+ // +optional
+ LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
+ // reason is the reason for the condition's last transition.
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
+ // message is a human-readable explanation containing details about
+ // the transition
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
+}
+
+// MetricStatus describes the last-read state of a single metric.
+type MetricStatus struct {
+ // type is the type of metric source. It will match one of the fields below.
+ Type MetricSourceType `json:"type" protobuf:"bytes,1,name=type"`
+
+ // object refers to a metric describing a single kubernetes object
+ // (for example, hits-per-second on an Ingress object).
+ // +optional
+ Object *ObjectMetricStatus `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"`
+ // pods refers to a metric describing each pod in the current scale target
+ // (for example, transactions-processed-per-second). The values will be
+ // averaged together before being compared to the target value.
+ // +optional
+ Pods *PodsMetricStatus `json:"pods,omitempty" protobuf:"bytes,3,opt,name=pods"`
+ // resource refers to a resource metric (such as those specified in
+ // requests and limits) known to Kubernetes describing each pod in the
+ // current scale target (e.g. CPU or memory). Such metrics are built in to
+ // Kubernetes, and have special scaling options on top of those available
+ // to normal per-pod metrics using the "pods" source.
+ // +optional
+ Resource *ResourceMetricStatus `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"`
+}
+
+// ObjectMetricStatus indicates the current value of a metric describing a
+// kubernetes object (for example, hits-per-second on an Ingress object).
+type ObjectMetricStatus struct {
+ // target is the described Kubernetes object.
+ Target CrossVersionObjectReference `json:"target" protobuf:"bytes,1,name=target"`
+
+ // metricName is the name of the metric in question.
+ MetricName string `json:"metricName" protobuf:"bytes,2,name=metricName"`
+ // currentValue is the current value of the metric (as a quantity).
+ CurrentValue resource.Quantity `json:"currentValue" protobuf:"bytes,3,name=currentValue"`
+}
+
+// PodsMetricStatus indicates the current value of a metric describing each pod in
+// the current scale target (for example, transactions-processed-per-second).
+type PodsMetricStatus struct {
+ // metricName is the name of the metric in question
+ MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"`
+ // currentAverageValue is the current value of the average of the
+ // metric across all relevant pods (as a quantity)
+ CurrentAverageValue resource.Quantity `json:"currentAverageValue" protobuf:"bytes,2,name=currentAverageValue"`
+}
+
+// ResourceMetricStatus indicates the current value of a resource metric known to
+// Kubernetes, as specified in requests and limits, describing each pod in the
+// current scale target (e.g. CPU or memory). Such metrics are built in to
+// Kubernetes, and have special scaling options on top of those available to
+// normal per-pod metrics using the "pods" source.
+type ResourceMetricStatus struct {
+ // name is the name of the resource in question.
+ Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
+ // currentAverageUtilization is the current value of the average of the
+ // resource metric across all relevant pods, represented as a percentage of
+ // the requested value of the resource for the pods. It will only be
+ // present if `targetAverageValue` was set in the corresponding metric
+ // specification.
+ // +optional
+ CurrentAverageUtilization *int32 `json:"currentAverageUtilization,omitempty" protobuf:"bytes,2,opt,name=currentAverageUtilization"`
+ // currentAverageValue is the current value of the average of the
+ // resource metric across all relevant pods, as a raw value (instead of as
+ // a percentage of the request), similar to the "pods" metric source type.
+ // It will always be set, regardless of the corresponding metric specification.
+ CurrentAverageValue resource.Quantity `json:"currentAverageValue" protobuf:"bytes,3,name=currentAverageValue"`
+}
+
+// +genclient=true
+
+// HorizontalPodAutoscaler is the configuration for a horizontal pod
+// autoscaler, which automatically manages the replica count of any resource
+// implementing the scale subresource based on the metrics specified.
+type HorizontalPodAutoscaler struct {
+ metav1.TypeMeta `json:",inline"`
+ // metadata is the standard object metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // spec is the specification for the behaviour of the autoscaler.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
+ // +optional
+ Spec HorizontalPodAutoscalerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // status is the current information about the autoscaler.
+ // +optional
+ Status HorizontalPodAutoscalerStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.
+type HorizontalPodAutoscalerList struct {
+ metav1.TypeMeta `json:",inline"`
+ // metadata is the standard list metadata.
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // items is the list of horizontal pod autoscaler objects.
+ Items []HorizontalPodAutoscaler `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..b1c140738
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/types_swagger_doc_generated.go
@@ -0,0 +1,189 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_CrossVersionObjectReference = map[string]string{
+ "": "CrossVersionObjectReference contains enough information to let you identify the referred resource.",
+ "kind": "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds\"",
+ "name": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
+ "apiVersion": "API version of the referent",
+}
+
+func (CrossVersionObjectReference) SwaggerDoc() map[string]string {
+ return map_CrossVersionObjectReference
+}
+
+var map_HorizontalPodAutoscaler = map[string]string{
+ "": "HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.",
+ "metadata": "metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.",
+ "status": "status is the current information about the autoscaler.",
+}
+
+func (HorizontalPodAutoscaler) SwaggerDoc() map[string]string {
+ return map_HorizontalPodAutoscaler
+}
+
+var map_HorizontalPodAutoscalerCondition = map[string]string{
+ "": "HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.",
+ "type": "type describes the current condition",
+ "status": "status is the status of the condition (True, False, Unknown)",
+ "lastTransitionTime": "lastTransitionTime is the last time the condition transitioned from one status to another",
+ "reason": "reason is the reason for the condition's last transition.",
+ "message": "message is a human-readable explanation containing details about the transition",
+}
+
+func (HorizontalPodAutoscalerCondition) SwaggerDoc() map[string]string {
+ return map_HorizontalPodAutoscalerCondition
+}
+
+var map_HorizontalPodAutoscalerList = map[string]string{
+ "": "HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.",
+ "metadata": "metadata is the standard list metadata.",
+ "items": "items is the list of horizontal pod autoscaler objects.",
+}
+
+func (HorizontalPodAutoscalerList) SwaggerDoc() map[string]string {
+ return map_HorizontalPodAutoscalerList
+}
+
+var map_HorizontalPodAutoscalerSpec = map[string]string{
+ "": "HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.",
+ "scaleTargetRef": "scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count.",
+ "minReplicas": "minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod.",
+ "maxReplicas": "maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.",
+ "metrics": "metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond.",
+}
+
+func (HorizontalPodAutoscalerSpec) SwaggerDoc() map[string]string {
+ return map_HorizontalPodAutoscalerSpec
+}
+
+var map_HorizontalPodAutoscalerStatus = map[string]string{
+ "": "HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.",
+ "observedGeneration": "observedGeneration is the most recent generation observed by this autoscaler.",
+ "lastScaleTime": "lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, used by the autoscaler to control how often the number of pods is changed.",
+ "currentReplicas": "currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.",
+ "desiredReplicas": "desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.",
+ "currentMetrics": "currentMetrics is the last read state of the metrics used by this autoscaler.",
+ "conditions": "conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.",
+}
+
+func (HorizontalPodAutoscalerStatus) SwaggerDoc() map[string]string {
+ return map_HorizontalPodAutoscalerStatus
+}
+
+var map_MetricSpec = map[string]string{
+ "": "MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).",
+ "type": "type is the type of metric source. It should match one of the fields below.",
+ "object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).",
+ "pods": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.",
+ "resource": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.",
+}
+
+func (MetricSpec) SwaggerDoc() map[string]string {
+ return map_MetricSpec
+}
+
+var map_MetricStatus = map[string]string{
+ "": "MetricStatus describes the last-read state of a single metric.",
+ "type": "type is the type of metric source. It will match one of the fields below.",
+ "object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).",
+ "pods": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.",
+ "resource": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.",
+}
+
+func (MetricStatus) SwaggerDoc() map[string]string {
+ return map_MetricStatus
+}
+
+var map_ObjectMetricSource = map[string]string{
+ "": "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).",
+ "target": "target is the described Kubernetes object.",
+ "metricName": "metricName is the name of the metric in question.",
+ "targetValue": "targetValue is the target value of the metric (as a quantity).",
+}
+
+func (ObjectMetricSource) SwaggerDoc() map[string]string {
+ return map_ObjectMetricSource
+}
+
+var map_ObjectMetricStatus = map[string]string{
+ "": "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).",
+ "target": "target is the described Kubernetes object.",
+ "metricName": "metricName is the name of the metric in question.",
+ "currentValue": "currentValue is the current value of the metric (as a quantity).",
+}
+
+func (ObjectMetricStatus) SwaggerDoc() map[string]string {
+ return map_ObjectMetricStatus
+}
+
+var map_PodsMetricSource = map[string]string{
+ "": "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.",
+ "metricName": "metricName is the name of the metric in question",
+ "targetAverageValue": "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)",
+}
+
+func (PodsMetricSource) SwaggerDoc() map[string]string {
+ return map_PodsMetricSource
+}
+
+var map_PodsMetricStatus = map[string]string{
+ "": "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).",
+ "metricName": "metricName is the name of the metric in question",
+ "currentAverageValue": "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)",
+}
+
+func (PodsMetricStatus) SwaggerDoc() map[string]string {
+ return map_PodsMetricStatus
+}
+
+var map_ResourceMetricSource = map[string]string{
+ "": "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.",
+ "name": "name is the name of the resource in question.",
+ "targetAverageUtilization": "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.",
+ "targetAverageValue": "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.",
+}
+
+func (ResourceMetricSource) SwaggerDoc() map[string]string {
+ return map_ResourceMetricSource
+}
+
+var map_ResourceMetricStatus = map[string]string{
+ "": "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.",
+ "name": "name is the name of the resource in question.",
+ "currentAverageUtilization": "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.",
+ "currentAverageValue": "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.",
+}
+
+func (ResourceMetricStatus) SwaggerDoc() map[string]string {
+ return map_ResourceMetricStatus
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/zz_generated.conversion.go
new file mode 100644
index 000000000..698ff6d1d
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/zz_generated.conversion.go
@@ -0,0 +1,449 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v2alpha1
+
+import (
+ resource "k8s.io/apimachinery/pkg/api/resource"
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api "k8s.io/client-go/pkg/api"
+ v1 "k8s.io/client-go/pkg/api/v1"
+ autoscaling "k8s.io/client-go/pkg/apis/autoscaling"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v2alpha1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference,
+ Convert_autoscaling_CrossVersionObjectReference_To_v2alpha1_CrossVersionObjectReference,
+ Convert_v2alpha1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler,
+ Convert_autoscaling_HorizontalPodAutoscaler_To_v2alpha1_HorizontalPodAutoscaler,
+ Convert_v2alpha1_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition,
+ Convert_autoscaling_HorizontalPodAutoscalerCondition_To_v2alpha1_HorizontalPodAutoscalerCondition,
+ Convert_v2alpha1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList,
+ Convert_autoscaling_HorizontalPodAutoscalerList_To_v2alpha1_HorizontalPodAutoscalerList,
+ Convert_v2alpha1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec,
+ Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v2alpha1_HorizontalPodAutoscalerSpec,
+ Convert_v2alpha1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus,
+ Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v2alpha1_HorizontalPodAutoscalerStatus,
+ Convert_v2alpha1_MetricSpec_To_autoscaling_MetricSpec,
+ Convert_autoscaling_MetricSpec_To_v2alpha1_MetricSpec,
+ Convert_v2alpha1_MetricStatus_To_autoscaling_MetricStatus,
+ Convert_autoscaling_MetricStatus_To_v2alpha1_MetricStatus,
+ Convert_v2alpha1_ObjectMetricSource_To_autoscaling_ObjectMetricSource,
+ Convert_autoscaling_ObjectMetricSource_To_v2alpha1_ObjectMetricSource,
+ Convert_v2alpha1_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus,
+ Convert_autoscaling_ObjectMetricStatus_To_v2alpha1_ObjectMetricStatus,
+ Convert_v2alpha1_PodsMetricSource_To_autoscaling_PodsMetricSource,
+ Convert_autoscaling_PodsMetricSource_To_v2alpha1_PodsMetricSource,
+ Convert_v2alpha1_PodsMetricStatus_To_autoscaling_PodsMetricStatus,
+ Convert_autoscaling_PodsMetricStatus_To_v2alpha1_PodsMetricStatus,
+ Convert_v2alpha1_ResourceMetricSource_To_autoscaling_ResourceMetricSource,
+ Convert_autoscaling_ResourceMetricSource_To_v2alpha1_ResourceMetricSource,
+ Convert_v2alpha1_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus,
+ Convert_autoscaling_ResourceMetricStatus_To_v2alpha1_ResourceMetricStatus,
+ )
+}
+
+func autoConvert_v2alpha1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in *CrossVersionObjectReference, out *autoscaling.CrossVersionObjectReference, s conversion.Scope) error {
+ out.Kind = in.Kind
+ out.Name = in.Name
+ out.APIVersion = in.APIVersion
+ return nil
+}
+
+// Convert_v2alpha1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference is an autogenerated conversion function.
+func Convert_v2alpha1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in *CrossVersionObjectReference, out *autoscaling.CrossVersionObjectReference, s conversion.Scope) error {
+ return autoConvert_v2alpha1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in, out, s)
+}
+
+func autoConvert_autoscaling_CrossVersionObjectReference_To_v2alpha1_CrossVersionObjectReference(in *autoscaling.CrossVersionObjectReference, out *CrossVersionObjectReference, s conversion.Scope) error {
+ out.Kind = in.Kind
+ out.Name = in.Name
+ out.APIVersion = in.APIVersion
+ return nil
+}
+
+// Convert_autoscaling_CrossVersionObjectReference_To_v2alpha1_CrossVersionObjectReference is an autogenerated conversion function.
+func Convert_autoscaling_CrossVersionObjectReference_To_v2alpha1_CrossVersionObjectReference(in *autoscaling.CrossVersionObjectReference, out *CrossVersionObjectReference, s conversion.Scope) error {
+ return autoConvert_autoscaling_CrossVersionObjectReference_To_v2alpha1_CrossVersionObjectReference(in, out, s)
+}
+
+func autoConvert_v2alpha1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v2alpha1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v2alpha1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v2alpha1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler is an autogenerated conversion function.
+func Convert_v2alpha1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error {
+ return autoConvert_v2alpha1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in, out, s)
+}
+
+func autoConvert_autoscaling_HorizontalPodAutoscaler_To_v2alpha1_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v2alpha1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v2alpha1_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_autoscaling_HorizontalPodAutoscaler_To_v2alpha1_HorizontalPodAutoscaler is an autogenerated conversion function.
+func Convert_autoscaling_HorizontalPodAutoscaler_To_v2alpha1_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, s conversion.Scope) error {
+ return autoConvert_autoscaling_HorizontalPodAutoscaler_To_v2alpha1_HorizontalPodAutoscaler(in, out, s)
+}
+
+func autoConvert_v2alpha1_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition(in *HorizontalPodAutoscalerCondition, out *autoscaling.HorizontalPodAutoscalerCondition, s conversion.Scope) error {
+ out.Type = autoscaling.HorizontalPodAutoscalerConditionType(in.Type)
+ out.Status = autoscaling.ConditionStatus(in.Status)
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_v2alpha1_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition is an autogenerated conversion function.
+func Convert_v2alpha1_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition(in *HorizontalPodAutoscalerCondition, out *autoscaling.HorizontalPodAutoscalerCondition, s conversion.Scope) error {
+ return autoConvert_v2alpha1_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition(in, out, s)
+}
+
+func autoConvert_autoscaling_HorizontalPodAutoscalerCondition_To_v2alpha1_HorizontalPodAutoscalerCondition(in *autoscaling.HorizontalPodAutoscalerCondition, out *HorizontalPodAutoscalerCondition, s conversion.Scope) error {
+ out.Type = HorizontalPodAutoscalerConditionType(in.Type)
+ out.Status = v1.ConditionStatus(in.Status)
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_autoscaling_HorizontalPodAutoscalerCondition_To_v2alpha1_HorizontalPodAutoscalerCondition is an autogenerated conversion function.
+func Convert_autoscaling_HorizontalPodAutoscalerCondition_To_v2alpha1_HorizontalPodAutoscalerCondition(in *autoscaling.HorizontalPodAutoscalerCondition, out *HorizontalPodAutoscalerCondition, s conversion.Scope) error {
+ return autoConvert_autoscaling_HorizontalPodAutoscalerCondition_To_v2alpha1_HorizontalPodAutoscalerCondition(in, out, s)
+}
+
+func autoConvert_v2alpha1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in *HorizontalPodAutoscalerList, out *autoscaling.HorizontalPodAutoscalerList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]autoscaling.HorizontalPodAutoscaler)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v2alpha1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList is an autogenerated conversion function.
+func Convert_v2alpha1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in *HorizontalPodAutoscalerList, out *autoscaling.HorizontalPodAutoscalerList, s conversion.Scope) error {
+ return autoConvert_v2alpha1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in, out, s)
+}
+
+func autoConvert_autoscaling_HorizontalPodAutoscalerList_To_v2alpha1_HorizontalPodAutoscalerList(in *autoscaling.HorizontalPodAutoscalerList, out *HorizontalPodAutoscalerList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]HorizontalPodAutoscaler, 0)
+ } else {
+ out.Items = *(*[]HorizontalPodAutoscaler)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_autoscaling_HorizontalPodAutoscalerList_To_v2alpha1_HorizontalPodAutoscalerList is an autogenerated conversion function.
+func Convert_autoscaling_HorizontalPodAutoscalerList_To_v2alpha1_HorizontalPodAutoscalerList(in *autoscaling.HorizontalPodAutoscalerList, out *HorizontalPodAutoscalerList, s conversion.Scope) error {
+ return autoConvert_autoscaling_HorizontalPodAutoscalerList_To_v2alpha1_HorizontalPodAutoscalerList(in, out, s)
+}
+
+func autoConvert_v2alpha1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in *HorizontalPodAutoscalerSpec, out *autoscaling.HorizontalPodAutoscalerSpec, s conversion.Scope) error {
+ if err := Convert_v2alpha1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(&in.ScaleTargetRef, &out.ScaleTargetRef, s); err != nil {
+ return err
+ }
+ out.MinReplicas = (*int32)(unsafe.Pointer(in.MinReplicas))
+ out.MaxReplicas = in.MaxReplicas
+ out.Metrics = *(*[]autoscaling.MetricSpec)(unsafe.Pointer(&in.Metrics))
+ return nil
+}
+
+// Convert_v2alpha1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec is an autogenerated conversion function.
+func Convert_v2alpha1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in *HorizontalPodAutoscalerSpec, out *autoscaling.HorizontalPodAutoscalerSpec, s conversion.Scope) error {
+ return autoConvert_v2alpha1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in, out, s)
+}
+
+func autoConvert_autoscaling_HorizontalPodAutoscalerSpec_To_v2alpha1_HorizontalPodAutoscalerSpec(in *autoscaling.HorizontalPodAutoscalerSpec, out *HorizontalPodAutoscalerSpec, s conversion.Scope) error {
+ if err := Convert_autoscaling_CrossVersionObjectReference_To_v2alpha1_CrossVersionObjectReference(&in.ScaleTargetRef, &out.ScaleTargetRef, s); err != nil {
+ return err
+ }
+ out.MinReplicas = (*int32)(unsafe.Pointer(in.MinReplicas))
+ out.MaxReplicas = in.MaxReplicas
+ out.Metrics = *(*[]MetricSpec)(unsafe.Pointer(&in.Metrics))
+ return nil
+}
+
+// Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v2alpha1_HorizontalPodAutoscalerSpec is an autogenerated conversion function.
+func Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v2alpha1_HorizontalPodAutoscalerSpec(in *autoscaling.HorizontalPodAutoscalerSpec, out *HorizontalPodAutoscalerSpec, s conversion.Scope) error {
+ return autoConvert_autoscaling_HorizontalPodAutoscalerSpec_To_v2alpha1_HorizontalPodAutoscalerSpec(in, out, s)
+}
+
+func autoConvert_v2alpha1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in *HorizontalPodAutoscalerStatus, out *autoscaling.HorizontalPodAutoscalerStatus, s conversion.Scope) error {
+ out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration))
+ out.LastScaleTime = (*meta_v1.Time)(unsafe.Pointer(in.LastScaleTime))
+ out.CurrentReplicas = in.CurrentReplicas
+ out.DesiredReplicas = in.DesiredReplicas
+ out.CurrentMetrics = *(*[]autoscaling.MetricStatus)(unsafe.Pointer(&in.CurrentMetrics))
+ out.Conditions = *(*[]autoscaling.HorizontalPodAutoscalerCondition)(unsafe.Pointer(&in.Conditions))
+ return nil
+}
+
+// Convert_v2alpha1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus is an autogenerated conversion function.
+func Convert_v2alpha1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in *HorizontalPodAutoscalerStatus, out *autoscaling.HorizontalPodAutoscalerStatus, s conversion.Scope) error {
+ return autoConvert_v2alpha1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in, out, s)
+}
+
+func autoConvert_autoscaling_HorizontalPodAutoscalerStatus_To_v2alpha1_HorizontalPodAutoscalerStatus(in *autoscaling.HorizontalPodAutoscalerStatus, out *HorizontalPodAutoscalerStatus, s conversion.Scope) error {
+ out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration))
+ out.LastScaleTime = (*meta_v1.Time)(unsafe.Pointer(in.LastScaleTime))
+ out.CurrentReplicas = in.CurrentReplicas
+ out.DesiredReplicas = in.DesiredReplicas
+ if in.CurrentMetrics == nil {
+ out.CurrentMetrics = make([]MetricStatus, 0)
+ } else {
+ out.CurrentMetrics = *(*[]MetricStatus)(unsafe.Pointer(&in.CurrentMetrics))
+ }
+ if in.Conditions == nil {
+ out.Conditions = make([]HorizontalPodAutoscalerCondition, 0)
+ } else {
+ out.Conditions = *(*[]HorizontalPodAutoscalerCondition)(unsafe.Pointer(&in.Conditions))
+ }
+ return nil
+}
+
+// Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v2alpha1_HorizontalPodAutoscalerStatus is an autogenerated conversion function.
+func Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v2alpha1_HorizontalPodAutoscalerStatus(in *autoscaling.HorizontalPodAutoscalerStatus, out *HorizontalPodAutoscalerStatus, s conversion.Scope) error {
+ return autoConvert_autoscaling_HorizontalPodAutoscalerStatus_To_v2alpha1_HorizontalPodAutoscalerStatus(in, out, s)
+}
+
+func autoConvert_v2alpha1_MetricSpec_To_autoscaling_MetricSpec(in *MetricSpec, out *autoscaling.MetricSpec, s conversion.Scope) error {
+ out.Type = autoscaling.MetricSourceType(in.Type)
+ out.Object = (*autoscaling.ObjectMetricSource)(unsafe.Pointer(in.Object))
+ out.Pods = (*autoscaling.PodsMetricSource)(unsafe.Pointer(in.Pods))
+ out.Resource = (*autoscaling.ResourceMetricSource)(unsafe.Pointer(in.Resource))
+ return nil
+}
+
+// Convert_v2alpha1_MetricSpec_To_autoscaling_MetricSpec is an autogenerated conversion function.
+func Convert_v2alpha1_MetricSpec_To_autoscaling_MetricSpec(in *MetricSpec, out *autoscaling.MetricSpec, s conversion.Scope) error {
+ return autoConvert_v2alpha1_MetricSpec_To_autoscaling_MetricSpec(in, out, s)
+}
+
+func autoConvert_autoscaling_MetricSpec_To_v2alpha1_MetricSpec(in *autoscaling.MetricSpec, out *MetricSpec, s conversion.Scope) error {
+ out.Type = MetricSourceType(in.Type)
+ out.Object = (*ObjectMetricSource)(unsafe.Pointer(in.Object))
+ out.Pods = (*PodsMetricSource)(unsafe.Pointer(in.Pods))
+ out.Resource = (*ResourceMetricSource)(unsafe.Pointer(in.Resource))
+ return nil
+}
+
+// Convert_autoscaling_MetricSpec_To_v2alpha1_MetricSpec is an autogenerated conversion function.
+func Convert_autoscaling_MetricSpec_To_v2alpha1_MetricSpec(in *autoscaling.MetricSpec, out *MetricSpec, s conversion.Scope) error {
+ return autoConvert_autoscaling_MetricSpec_To_v2alpha1_MetricSpec(in, out, s)
+}
+
+func autoConvert_v2alpha1_MetricStatus_To_autoscaling_MetricStatus(in *MetricStatus, out *autoscaling.MetricStatus, s conversion.Scope) error {
+ out.Type = autoscaling.MetricSourceType(in.Type)
+ out.Object = (*autoscaling.ObjectMetricStatus)(unsafe.Pointer(in.Object))
+ out.Pods = (*autoscaling.PodsMetricStatus)(unsafe.Pointer(in.Pods))
+ out.Resource = (*autoscaling.ResourceMetricStatus)(unsafe.Pointer(in.Resource))
+ return nil
+}
+
+// Convert_v2alpha1_MetricStatus_To_autoscaling_MetricStatus is an autogenerated conversion function.
+func Convert_v2alpha1_MetricStatus_To_autoscaling_MetricStatus(in *MetricStatus, out *autoscaling.MetricStatus, s conversion.Scope) error {
+ return autoConvert_v2alpha1_MetricStatus_To_autoscaling_MetricStatus(in, out, s)
+}
+
+func autoConvert_autoscaling_MetricStatus_To_v2alpha1_MetricStatus(in *autoscaling.MetricStatus, out *MetricStatus, s conversion.Scope) error {
+ out.Type = MetricSourceType(in.Type)
+ out.Object = (*ObjectMetricStatus)(unsafe.Pointer(in.Object))
+ out.Pods = (*PodsMetricStatus)(unsafe.Pointer(in.Pods))
+ out.Resource = (*ResourceMetricStatus)(unsafe.Pointer(in.Resource))
+ return nil
+}
+
+// Convert_autoscaling_MetricStatus_To_v2alpha1_MetricStatus is an autogenerated conversion function.
+func Convert_autoscaling_MetricStatus_To_v2alpha1_MetricStatus(in *autoscaling.MetricStatus, out *MetricStatus, s conversion.Scope) error {
+ return autoConvert_autoscaling_MetricStatus_To_v2alpha1_MetricStatus(in, out, s)
+}
+
+func autoConvert_v2alpha1_ObjectMetricSource_To_autoscaling_ObjectMetricSource(in *ObjectMetricSource, out *autoscaling.ObjectMetricSource, s conversion.Scope) error {
+ if err := Convert_v2alpha1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(&in.Target, &out.Target, s); err != nil {
+ return err
+ }
+ out.MetricName = in.MetricName
+ out.TargetValue = in.TargetValue
+ return nil
+}
+
+// Convert_v2alpha1_ObjectMetricSource_To_autoscaling_ObjectMetricSource is an autogenerated conversion function.
+func Convert_v2alpha1_ObjectMetricSource_To_autoscaling_ObjectMetricSource(in *ObjectMetricSource, out *autoscaling.ObjectMetricSource, s conversion.Scope) error {
+ return autoConvert_v2alpha1_ObjectMetricSource_To_autoscaling_ObjectMetricSource(in, out, s)
+}
+
+func autoConvert_autoscaling_ObjectMetricSource_To_v2alpha1_ObjectMetricSource(in *autoscaling.ObjectMetricSource, out *ObjectMetricSource, s conversion.Scope) error {
+ if err := Convert_autoscaling_CrossVersionObjectReference_To_v2alpha1_CrossVersionObjectReference(&in.Target, &out.Target, s); err != nil {
+ return err
+ }
+ out.MetricName = in.MetricName
+ out.TargetValue = in.TargetValue
+ return nil
+}
+
+// Convert_autoscaling_ObjectMetricSource_To_v2alpha1_ObjectMetricSource is an autogenerated conversion function.
+func Convert_autoscaling_ObjectMetricSource_To_v2alpha1_ObjectMetricSource(in *autoscaling.ObjectMetricSource, out *ObjectMetricSource, s conversion.Scope) error {
+ return autoConvert_autoscaling_ObjectMetricSource_To_v2alpha1_ObjectMetricSource(in, out, s)
+}
+
+func autoConvert_v2alpha1_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus(in *ObjectMetricStatus, out *autoscaling.ObjectMetricStatus, s conversion.Scope) error {
+ if err := Convert_v2alpha1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(&in.Target, &out.Target, s); err != nil {
+ return err
+ }
+ out.MetricName = in.MetricName
+ out.CurrentValue = in.CurrentValue
+ return nil
+}
+
+// Convert_v2alpha1_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus is an autogenerated conversion function.
+func Convert_v2alpha1_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus(in *ObjectMetricStatus, out *autoscaling.ObjectMetricStatus, s conversion.Scope) error {
+ return autoConvert_v2alpha1_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus(in, out, s)
+}
+
+func autoConvert_autoscaling_ObjectMetricStatus_To_v2alpha1_ObjectMetricStatus(in *autoscaling.ObjectMetricStatus, out *ObjectMetricStatus, s conversion.Scope) error {
+ if err := Convert_autoscaling_CrossVersionObjectReference_To_v2alpha1_CrossVersionObjectReference(&in.Target, &out.Target, s); err != nil {
+ return err
+ }
+ out.MetricName = in.MetricName
+ out.CurrentValue = in.CurrentValue
+ return nil
+}
+
+// Convert_autoscaling_ObjectMetricStatus_To_v2alpha1_ObjectMetricStatus is an autogenerated conversion function.
+func Convert_autoscaling_ObjectMetricStatus_To_v2alpha1_ObjectMetricStatus(in *autoscaling.ObjectMetricStatus, out *ObjectMetricStatus, s conversion.Scope) error {
+ return autoConvert_autoscaling_ObjectMetricStatus_To_v2alpha1_ObjectMetricStatus(in, out, s)
+}
+
+func autoConvert_v2alpha1_PodsMetricSource_To_autoscaling_PodsMetricSource(in *PodsMetricSource, out *autoscaling.PodsMetricSource, s conversion.Scope) error {
+ out.MetricName = in.MetricName
+ out.TargetAverageValue = in.TargetAverageValue
+ return nil
+}
+
+// Convert_v2alpha1_PodsMetricSource_To_autoscaling_PodsMetricSource is an autogenerated conversion function.
+func Convert_v2alpha1_PodsMetricSource_To_autoscaling_PodsMetricSource(in *PodsMetricSource, out *autoscaling.PodsMetricSource, s conversion.Scope) error {
+ return autoConvert_v2alpha1_PodsMetricSource_To_autoscaling_PodsMetricSource(in, out, s)
+}
+
+func autoConvert_autoscaling_PodsMetricSource_To_v2alpha1_PodsMetricSource(in *autoscaling.PodsMetricSource, out *PodsMetricSource, s conversion.Scope) error {
+ out.MetricName = in.MetricName
+ out.TargetAverageValue = in.TargetAverageValue
+ return nil
+}
+
+// Convert_autoscaling_PodsMetricSource_To_v2alpha1_PodsMetricSource is an autogenerated conversion function.
+func Convert_autoscaling_PodsMetricSource_To_v2alpha1_PodsMetricSource(in *autoscaling.PodsMetricSource, out *PodsMetricSource, s conversion.Scope) error {
+ return autoConvert_autoscaling_PodsMetricSource_To_v2alpha1_PodsMetricSource(in, out, s)
+}
+
+func autoConvert_v2alpha1_PodsMetricStatus_To_autoscaling_PodsMetricStatus(in *PodsMetricStatus, out *autoscaling.PodsMetricStatus, s conversion.Scope) error {
+ out.MetricName = in.MetricName
+ out.CurrentAverageValue = in.CurrentAverageValue
+ return nil
+}
+
+// Convert_v2alpha1_PodsMetricStatus_To_autoscaling_PodsMetricStatus is an autogenerated conversion function.
+func Convert_v2alpha1_PodsMetricStatus_To_autoscaling_PodsMetricStatus(in *PodsMetricStatus, out *autoscaling.PodsMetricStatus, s conversion.Scope) error {
+ return autoConvert_v2alpha1_PodsMetricStatus_To_autoscaling_PodsMetricStatus(in, out, s)
+}
+
+func autoConvert_autoscaling_PodsMetricStatus_To_v2alpha1_PodsMetricStatus(in *autoscaling.PodsMetricStatus, out *PodsMetricStatus, s conversion.Scope) error {
+ out.MetricName = in.MetricName
+ out.CurrentAverageValue = in.CurrentAverageValue
+ return nil
+}
+
+// Convert_autoscaling_PodsMetricStatus_To_v2alpha1_PodsMetricStatus is an autogenerated conversion function.
+func Convert_autoscaling_PodsMetricStatus_To_v2alpha1_PodsMetricStatus(in *autoscaling.PodsMetricStatus, out *PodsMetricStatus, s conversion.Scope) error {
+ return autoConvert_autoscaling_PodsMetricStatus_To_v2alpha1_PodsMetricStatus(in, out, s)
+}
+
+func autoConvert_v2alpha1_ResourceMetricSource_To_autoscaling_ResourceMetricSource(in *ResourceMetricSource, out *autoscaling.ResourceMetricSource, s conversion.Scope) error {
+ out.Name = api.ResourceName(in.Name)
+ out.TargetAverageUtilization = (*int32)(unsafe.Pointer(in.TargetAverageUtilization))
+ out.TargetAverageValue = (*resource.Quantity)(unsafe.Pointer(in.TargetAverageValue))
+ return nil
+}
+
+// Convert_v2alpha1_ResourceMetricSource_To_autoscaling_ResourceMetricSource is an autogenerated conversion function.
+func Convert_v2alpha1_ResourceMetricSource_To_autoscaling_ResourceMetricSource(in *ResourceMetricSource, out *autoscaling.ResourceMetricSource, s conversion.Scope) error {
+ return autoConvert_v2alpha1_ResourceMetricSource_To_autoscaling_ResourceMetricSource(in, out, s)
+}
+
+func autoConvert_autoscaling_ResourceMetricSource_To_v2alpha1_ResourceMetricSource(in *autoscaling.ResourceMetricSource, out *ResourceMetricSource, s conversion.Scope) error {
+ out.Name = v1.ResourceName(in.Name)
+ out.TargetAverageUtilization = (*int32)(unsafe.Pointer(in.TargetAverageUtilization))
+ out.TargetAverageValue = (*resource.Quantity)(unsafe.Pointer(in.TargetAverageValue))
+ return nil
+}
+
+// Convert_autoscaling_ResourceMetricSource_To_v2alpha1_ResourceMetricSource is an autogenerated conversion function.
+func Convert_autoscaling_ResourceMetricSource_To_v2alpha1_ResourceMetricSource(in *autoscaling.ResourceMetricSource, out *ResourceMetricSource, s conversion.Scope) error {
+ return autoConvert_autoscaling_ResourceMetricSource_To_v2alpha1_ResourceMetricSource(in, out, s)
+}
+
+func autoConvert_v2alpha1_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus(in *ResourceMetricStatus, out *autoscaling.ResourceMetricStatus, s conversion.Scope) error {
+ out.Name = api.ResourceName(in.Name)
+ out.CurrentAverageUtilization = (*int32)(unsafe.Pointer(in.CurrentAverageUtilization))
+ out.CurrentAverageValue = in.CurrentAverageValue
+ return nil
+}
+
+// Convert_v2alpha1_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus is an autogenerated conversion function.
+func Convert_v2alpha1_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus(in *ResourceMetricStatus, out *autoscaling.ResourceMetricStatus, s conversion.Scope) error {
+ return autoConvert_v2alpha1_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus(in, out, s)
+}
+
+func autoConvert_autoscaling_ResourceMetricStatus_To_v2alpha1_ResourceMetricStatus(in *autoscaling.ResourceMetricStatus, out *ResourceMetricStatus, s conversion.Scope) error {
+ out.Name = v1.ResourceName(in.Name)
+ out.CurrentAverageUtilization = (*int32)(unsafe.Pointer(in.CurrentAverageUtilization))
+ out.CurrentAverageValue = in.CurrentAverageValue
+ return nil
+}
+
+// Convert_autoscaling_ResourceMetricStatus_To_v2alpha1_ResourceMetricStatus is an autogenerated conversion function.
+func Convert_autoscaling_ResourceMetricStatus_To_v2alpha1_ResourceMetricStatus(in *autoscaling.ResourceMetricStatus, out *ResourceMetricStatus, s conversion.Scope) error {
+ return autoConvert_autoscaling_ResourceMetricStatus_To_v2alpha1_ResourceMetricStatus(in, out, s)
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..9a9dd690e
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/zz_generated.deepcopy.go
@@ -0,0 +1,319 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v2alpha1
+
+import (
+ resource "k8s.io/apimachinery/pkg/api/resource"
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_CrossVersionObjectReference, InType: reflect.TypeOf(&CrossVersionObjectReference{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_HorizontalPodAutoscaler, InType: reflect.TypeOf(&HorizontalPodAutoscaler{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_HorizontalPodAutoscalerCondition, InType: reflect.TypeOf(&HorizontalPodAutoscalerCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_HorizontalPodAutoscalerList, InType: reflect.TypeOf(&HorizontalPodAutoscalerList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_HorizontalPodAutoscalerSpec, InType: reflect.TypeOf(&HorizontalPodAutoscalerSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_HorizontalPodAutoscalerStatus, InType: reflect.TypeOf(&HorizontalPodAutoscalerStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_MetricSpec, InType: reflect.TypeOf(&MetricSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_MetricStatus, InType: reflect.TypeOf(&MetricStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_ObjectMetricSource, InType: reflect.TypeOf(&ObjectMetricSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_ObjectMetricStatus, InType: reflect.TypeOf(&ObjectMetricStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_PodsMetricSource, InType: reflect.TypeOf(&PodsMetricSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_PodsMetricStatus, InType: reflect.TypeOf(&PodsMetricStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_ResourceMetricSource, InType: reflect.TypeOf(&ResourceMetricSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_ResourceMetricStatus, InType: reflect.TypeOf(&ResourceMetricStatus{})},
+ )
+}
+
+// DeepCopy_v2alpha1_CrossVersionObjectReference is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_CrossVersionObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CrossVersionObjectReference)
+ out := out.(*CrossVersionObjectReference)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_HorizontalPodAutoscaler is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_HorizontalPodAutoscaler(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscaler)
+ out := out.(*HorizontalPodAutoscaler)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v2alpha1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v2alpha1_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_HorizontalPodAutoscalerCondition is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_HorizontalPodAutoscalerCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscalerCondition)
+ out := out.(*HorizontalPodAutoscalerCondition)
+ *out = *in
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_HorizontalPodAutoscalerList is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_HorizontalPodAutoscalerList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscalerList)
+ out := out.(*HorizontalPodAutoscalerList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]HorizontalPodAutoscaler, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v2alpha1_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_HorizontalPodAutoscalerSpec is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_HorizontalPodAutoscalerSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscalerSpec)
+ out := out.(*HorizontalPodAutoscalerSpec)
+ *out = *in
+ if in.MinReplicas != nil {
+ in, out := &in.MinReplicas, &out.MinReplicas
+ *out = new(int32)
+ **out = **in
+ }
+ if in.Metrics != nil {
+ in, out := &in.Metrics, &out.Metrics
+ *out = make([]MetricSpec, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v2alpha1_MetricSpec(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_HorizontalPodAutoscalerStatus is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_HorizontalPodAutoscalerStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscalerStatus)
+ out := out.(*HorizontalPodAutoscalerStatus)
+ *out = *in
+ if in.ObservedGeneration != nil {
+ in, out := &in.ObservedGeneration, &out.ObservedGeneration
+ *out = new(int64)
+ **out = **in
+ }
+ if in.LastScaleTime != nil {
+ in, out := &in.LastScaleTime, &out.LastScaleTime
+ *out = new(v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ if in.CurrentMetrics != nil {
+ in, out := &in.CurrentMetrics, &out.CurrentMetrics
+ *out = make([]MetricStatus, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v2alpha1_MetricStatus(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]HorizontalPodAutoscalerCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v2alpha1_HorizontalPodAutoscalerCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_MetricSpec is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_MetricSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*MetricSpec)
+ out := out.(*MetricSpec)
+ *out = *in
+ if in.Object != nil {
+ in, out := &in.Object, &out.Object
+ *out = new(ObjectMetricSource)
+ if err := DeepCopy_v2alpha1_ObjectMetricSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Pods != nil {
+ in, out := &in.Pods, &out.Pods
+ *out = new(PodsMetricSource)
+ if err := DeepCopy_v2alpha1_PodsMetricSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Resource != nil {
+ in, out := &in.Resource, &out.Resource
+ *out = new(ResourceMetricSource)
+ if err := DeepCopy_v2alpha1_ResourceMetricSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_MetricStatus is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_MetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*MetricStatus)
+ out := out.(*MetricStatus)
+ *out = *in
+ if in.Object != nil {
+ in, out := &in.Object, &out.Object
+ *out = new(ObjectMetricStatus)
+ if err := DeepCopy_v2alpha1_ObjectMetricStatus(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Pods != nil {
+ in, out := &in.Pods, &out.Pods
+ *out = new(PodsMetricStatus)
+ if err := DeepCopy_v2alpha1_PodsMetricStatus(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Resource != nil {
+ in, out := &in.Resource, &out.Resource
+ *out = new(ResourceMetricStatus)
+ if err := DeepCopy_v2alpha1_ResourceMetricStatus(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_ObjectMetricSource is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_ObjectMetricSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ObjectMetricSource)
+ out := out.(*ObjectMetricSource)
+ *out = *in
+ out.TargetValue = in.TargetValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_ObjectMetricStatus is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_ObjectMetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ObjectMetricStatus)
+ out := out.(*ObjectMetricStatus)
+ *out = *in
+ out.CurrentValue = in.CurrentValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_PodsMetricSource is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_PodsMetricSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodsMetricSource)
+ out := out.(*PodsMetricSource)
+ *out = *in
+ out.TargetAverageValue = in.TargetAverageValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_PodsMetricStatus is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_PodsMetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodsMetricStatus)
+ out := out.(*PodsMetricStatus)
+ *out = *in
+ out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_ResourceMetricSource is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_ResourceMetricSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceMetricSource)
+ out := out.(*ResourceMetricSource)
+ *out = *in
+ if in.TargetAverageUtilization != nil {
+ in, out := &in.TargetAverageUtilization, &out.TargetAverageUtilization
+ *out = new(int32)
+ **out = **in
+ }
+ if in.TargetAverageValue != nil {
+ in, out := &in.TargetAverageValue, &out.TargetAverageValue
+ *out = new(resource.Quantity)
+ **out = (*in).DeepCopy()
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_ResourceMetricStatus is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_ResourceMetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceMetricStatus)
+ out := out.(*ResourceMetricStatus)
+ *out = *in
+ if in.CurrentAverageUtilization != nil {
+ in, out := &in.CurrentAverageUtilization, &out.CurrentAverageUtilization
+ *out = new(int32)
+ **out = **in
+ }
+ out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy()
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/zz_generated.defaults.go
new file mode 100644
index 000000000..eb20be97c
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/v2alpha1/zz_generated.defaults.go
@@ -0,0 +1,47 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v2alpha1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ scheme.AddTypeDefaultingFunc(&HorizontalPodAutoscaler{}, func(obj interface{}) { SetObjectDefaults_HorizontalPodAutoscaler(obj.(*HorizontalPodAutoscaler)) })
+ scheme.AddTypeDefaultingFunc(&HorizontalPodAutoscalerList{}, func(obj interface{}) {
+ SetObjectDefaults_HorizontalPodAutoscalerList(obj.(*HorizontalPodAutoscalerList))
+ })
+ return nil
+}
+
+func SetObjectDefaults_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler) {
+ SetDefaults_HorizontalPodAutoscaler(in)
+}
+
+func SetObjectDefaults_HorizontalPodAutoscalerList(in *HorizontalPodAutoscalerList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_HorizontalPodAutoscaler(a)
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/autoscaling/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/autoscaling/zz_generated.deepcopy.go
new file mode 100644
index 000000000..a15d9b32b
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/autoscaling/zz_generated.deepcopy.go
@@ -0,0 +1,357 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package autoscaling
+
+import (
+ resource "k8s.io/apimachinery/pkg/api/resource"
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_CrossVersionObjectReference, InType: reflect.TypeOf(&CrossVersionObjectReference{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscaler, InType: reflect.TypeOf(&HorizontalPodAutoscaler{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscalerCondition, InType: reflect.TypeOf(&HorizontalPodAutoscalerCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscalerList, InType: reflect.TypeOf(&HorizontalPodAutoscalerList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscalerSpec, InType: reflect.TypeOf(&HorizontalPodAutoscalerSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscalerStatus, InType: reflect.TypeOf(&HorizontalPodAutoscalerStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_MetricSpec, InType: reflect.TypeOf(&MetricSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_MetricStatus, InType: reflect.TypeOf(&MetricStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ObjectMetricSource, InType: reflect.TypeOf(&ObjectMetricSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ObjectMetricStatus, InType: reflect.TypeOf(&ObjectMetricStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_PodsMetricSource, InType: reflect.TypeOf(&PodsMetricSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_PodsMetricStatus, InType: reflect.TypeOf(&PodsMetricStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ResourceMetricSource, InType: reflect.TypeOf(&ResourceMetricSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ResourceMetricStatus, InType: reflect.TypeOf(&ResourceMetricStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_Scale, InType: reflect.TypeOf(&Scale{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ScaleSpec, InType: reflect.TypeOf(&ScaleSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ScaleStatus, InType: reflect.TypeOf(&ScaleStatus{})},
+ )
+}
+
+// DeepCopy_autoscaling_CrossVersionObjectReference is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_CrossVersionObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CrossVersionObjectReference)
+ out := out.(*CrossVersionObjectReference)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_HorizontalPodAutoscaler is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_HorizontalPodAutoscaler(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscaler)
+ out := out.(*HorizontalPodAutoscaler)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_autoscaling_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_autoscaling_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_HorizontalPodAutoscalerCondition is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_HorizontalPodAutoscalerCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscalerCondition)
+ out := out.(*HorizontalPodAutoscalerCondition)
+ *out = *in
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_HorizontalPodAutoscalerList is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_HorizontalPodAutoscalerList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscalerList)
+ out := out.(*HorizontalPodAutoscalerList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]HorizontalPodAutoscaler, len(*in))
+ for i := range *in {
+ if err := DeepCopy_autoscaling_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_HorizontalPodAutoscalerSpec is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_HorizontalPodAutoscalerSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscalerSpec)
+ out := out.(*HorizontalPodAutoscalerSpec)
+ *out = *in
+ if in.MinReplicas != nil {
+ in, out := &in.MinReplicas, &out.MinReplicas
+ *out = new(int32)
+ **out = **in
+ }
+ if in.Metrics != nil {
+ in, out := &in.Metrics, &out.Metrics
+ *out = make([]MetricSpec, len(*in))
+ for i := range *in {
+ if err := DeepCopy_autoscaling_MetricSpec(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_HorizontalPodAutoscalerStatus is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_HorizontalPodAutoscalerStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscalerStatus)
+ out := out.(*HorizontalPodAutoscalerStatus)
+ *out = *in
+ if in.ObservedGeneration != nil {
+ in, out := &in.ObservedGeneration, &out.ObservedGeneration
+ *out = new(int64)
+ **out = **in
+ }
+ if in.LastScaleTime != nil {
+ in, out := &in.LastScaleTime, &out.LastScaleTime
+ *out = new(v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ if in.CurrentMetrics != nil {
+ in, out := &in.CurrentMetrics, &out.CurrentMetrics
+ *out = make([]MetricStatus, len(*in))
+ for i := range *in {
+ if err := DeepCopy_autoscaling_MetricStatus(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]HorizontalPodAutoscalerCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_autoscaling_HorizontalPodAutoscalerCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_MetricSpec is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_MetricSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*MetricSpec)
+ out := out.(*MetricSpec)
+ *out = *in
+ if in.Object != nil {
+ in, out := &in.Object, &out.Object
+ *out = new(ObjectMetricSource)
+ if err := DeepCopy_autoscaling_ObjectMetricSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Pods != nil {
+ in, out := &in.Pods, &out.Pods
+ *out = new(PodsMetricSource)
+ if err := DeepCopy_autoscaling_PodsMetricSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Resource != nil {
+ in, out := &in.Resource, &out.Resource
+ *out = new(ResourceMetricSource)
+ if err := DeepCopy_autoscaling_ResourceMetricSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_MetricStatus is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_MetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*MetricStatus)
+ out := out.(*MetricStatus)
+ *out = *in
+ if in.Object != nil {
+ in, out := &in.Object, &out.Object
+ *out = new(ObjectMetricStatus)
+ if err := DeepCopy_autoscaling_ObjectMetricStatus(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Pods != nil {
+ in, out := &in.Pods, &out.Pods
+ *out = new(PodsMetricStatus)
+ if err := DeepCopy_autoscaling_PodsMetricStatus(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Resource != nil {
+ in, out := &in.Resource, &out.Resource
+ *out = new(ResourceMetricStatus)
+ if err := DeepCopy_autoscaling_ResourceMetricStatus(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_ObjectMetricSource is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_ObjectMetricSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ObjectMetricSource)
+ out := out.(*ObjectMetricSource)
+ *out = *in
+ out.TargetValue = in.TargetValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_ObjectMetricStatus is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_ObjectMetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ObjectMetricStatus)
+ out := out.(*ObjectMetricStatus)
+ *out = *in
+ out.CurrentValue = in.CurrentValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_PodsMetricSource is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_PodsMetricSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodsMetricSource)
+ out := out.(*PodsMetricSource)
+ *out = *in
+ out.TargetAverageValue = in.TargetAverageValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_PodsMetricStatus is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_PodsMetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodsMetricStatus)
+ out := out.(*PodsMetricStatus)
+ *out = *in
+ out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_ResourceMetricSource is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_ResourceMetricSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceMetricSource)
+ out := out.(*ResourceMetricSource)
+ *out = *in
+ if in.TargetAverageUtilization != nil {
+ in, out := &in.TargetAverageUtilization, &out.TargetAverageUtilization
+ *out = new(int32)
+ **out = **in
+ }
+ if in.TargetAverageValue != nil {
+ in, out := &in.TargetAverageValue, &out.TargetAverageValue
+ *out = new(resource.Quantity)
+ **out = (*in).DeepCopy()
+ }
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_ResourceMetricStatus is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_ResourceMetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceMetricStatus)
+ out := out.(*ResourceMetricStatus)
+ *out = *in
+ if in.CurrentAverageUtilization != nil {
+ in, out := &in.CurrentAverageUtilization, &out.CurrentAverageUtilization
+ *out = new(int32)
+ **out = **in
+ }
+ out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_Scale is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_Scale(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Scale)
+ out := out.(*Scale)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_ScaleSpec is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_ScaleSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ScaleSpec)
+ out := out.(*ScaleSpec)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_ScaleStatus is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_ScaleStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ScaleStatus)
+ out := out.(*ScaleStatus)
+ *out = *in
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/doc.go b/vendor/k8s.io/client-go/pkg/apis/batch/doc.go
new file mode 100644
index 000000000..6fe952226
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/batch/doc.go
@@ -0,0 +1,17 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package batch
diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/register.go b/vendor/k8s.io/client-go/pkg/apis/batch/register.go
new file mode 100644
index 000000000..4601ca4ec
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/batch/register.go
@@ -0,0 +1,57 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package batch
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "batch"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Job{},
+ &JobList{},
+ &JobTemplate{},
+ &CronJob{},
+ &CronJobList{},
+ )
+ scheme.AddKnownTypeWithName(SchemeGroupVersion.WithKind("ScheduledJob"), &CronJob{})
+ scheme.AddKnownTypeWithName(SchemeGroupVersion.WithKind("ScheduledJobList"), &CronJobList{})
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/types.go b/vendor/k8s.io/client-go/pkg/apis/batch/types.go
new file mode 100644
index 000000000..d392074d4
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/batch/types.go
@@ -0,0 +1,285 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package batch
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/client-go/pkg/api"
+)
+
+// +genclient=true
+
+// Job represents the configuration of a single job.
+type Job struct {
+ metav1.TypeMeta
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta
+
+ // Specification of the desired behavior of a job.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec JobSpec
+
+ // Current status of a job.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status JobStatus
+}
+
+// JobList is a collection of jobs.
+type JobList struct {
+ metav1.TypeMeta
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta
+
+ // items is the list of Jobs.
+ Items []Job
+}
+
+// JobTemplate describes a template for creating copies of a predefined pod.
+type JobTemplate struct {
+ metav1.TypeMeta
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta
+
+ // Defines jobs that will be created from this template.
+ // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Template JobTemplateSpec
+}
+
+// JobTemplateSpec describes the data a Job should have when created from a template
+type JobTemplateSpec struct {
+ // Standard object's metadata of the jobs created from this template.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta
+
+ // Specification of the desired behavior of the job.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec JobSpec
+}
+
+// JobSpec describes how the job execution will look like.
+type JobSpec struct {
+
+ // Specifies the maximum desired number of pods the job should
+ // run at any given time. The actual number of pods running in steady state will
+ // be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism),
+ // i.e. when the work left to do is less than max parallelism.
+ // +optional
+ Parallelism *int32
+
+ // Specifies the desired number of successfully finished pods the
+ // job should be run with. Setting to nil means that the success of any
+ // pod signals the success of all pods, and allows parallelism to have any positive
+ // value. Setting to 1 means that parallelism is limited to 1 and the success of that
+ // pod signals the success of the job.
+ // +optional
+ Completions *int32
+
+ // Optional duration in seconds relative to the startTime that the job may be active
+ // before the system tries to terminate it; value must be positive integer
+ // +optional
+ ActiveDeadlineSeconds *int64
+
+ // A label query over pods that should match the pod count.
+ // Normally, the system sets this field for you.
+ // +optional
+ Selector *metav1.LabelSelector
+
+ // manualSelector controls generation of pod labels and pod selectors.
+ // Leave `manualSelector` unset unless you are certain what you are doing.
+ // When false or unset, the system pick labels unique to this job
+ // and appends those labels to the pod template. When true,
+ // the user is responsible for picking unique labels and specifying
+ // the selector. Failure to pick a unique label may cause this
+ // and other jobs to not function correctly. However, You may see
+ // `manualSelector=true` in jobs that were created with the old `extensions/v1beta1`
+ // API.
+ // +optional
+ ManualSelector *bool
+
+ // Describes the pod that will be created when executing a job.
+ Template api.PodTemplateSpec
+}
+
+// JobStatus represents the current state of a Job.
+type JobStatus struct {
+
+ // The latest available observations of an object's current state.
+ // +optional
+ Conditions []JobCondition
+
+ // Represents time when the job was acknowledged by the job controller.
+ // It is not guaranteed to be set in happens-before order across separate operations.
+ // It is represented in RFC3339 form and is in UTC.
+ // +optional
+ StartTime *metav1.Time
+
+ // Represents time when the job was completed. It is not guaranteed to
+ // be set in happens-before order across separate operations.
+ // It is represented in RFC3339 form and is in UTC.
+ // +optional
+ CompletionTime *metav1.Time
+
+ // The number of actively running pods.
+ // +optional
+ Active int32
+
+ // The number of pods which reached phase Succeeded.
+ // +optional
+ Succeeded int32
+
+ // The number of pods which reached phase Failed.
+ // +optional
+ Failed int32
+}
+
+type JobConditionType string
+
+// These are valid conditions of a job.
+const (
+ // JobComplete means the job has completed its execution.
+ JobComplete JobConditionType = "Complete"
+ // JobFailed means the job has failed its execution.
+ JobFailed JobConditionType = "Failed"
+)
+
+// JobCondition describes current state of a job.
+type JobCondition struct {
+ // Type of job condition, Complete or Failed.
+ Type JobConditionType
+ // Status of the condition, one of True, False, Unknown.
+ Status api.ConditionStatus
+ // Last time the condition was checked.
+ // +optional
+ LastProbeTime metav1.Time
+ // Last time the condition transit from one status to another.
+ // +optional
+ LastTransitionTime metav1.Time
+ // (brief) reason for the condition's last transition.
+ // +optional
+ Reason string
+ // Human readable message indicating details about last transition.
+ // +optional
+ Message string
+}
+
+// +genclient=true
+
+// CronJob represents the configuration of a single cron job.
+type CronJob struct {
+ metav1.TypeMeta
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta
+
+ // Specification of the desired behavior of a cron job, including the schedule.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec CronJobSpec
+
+ // Current status of a cron job.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status CronJobStatus
+}
+
+// CronJobList is a collection of cron jobs.
+type CronJobList struct {
+ metav1.TypeMeta
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta
+
+ // items is the list of CronJobs.
+ Items []CronJob
+}
+
+// CronJobSpec describes how the job execution will look like and when it will actually run.
+type CronJobSpec struct {
+
+ // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
+ Schedule string
+
+ // Optional deadline in seconds for starting the job if it misses scheduled
+ // time for any reason. Missed jobs executions will be counted as failed ones.
+ // +optional
+ StartingDeadlineSeconds *int64
+
+ // Specifies how to treat concurrent executions of a Job.
+ // Defaults to Allow.
+ // +optional
+ ConcurrencyPolicy ConcurrencyPolicy
+
+ // This flag tells the controller to suspend subsequent executions, it does
+ // not apply to already started executions. Defaults to false.
+ // +optional
+ Suspend *bool
+
+ // Specifies the job that will be created when executing a CronJob.
+ JobTemplate JobTemplateSpec
+
+ // The number of successful finished jobs to retain.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ // +optional
+ SuccessfulJobsHistoryLimit *int32
+
+ // The number of failed finished jobs to retain.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ // +optional
+ FailedJobsHistoryLimit *int32
+}
+
+// ConcurrencyPolicy describes how the job will be handled.
+// Only one of the following concurrent policies may be specified.
+// If none of the following policies is specified, the default one
+// is AllowConcurrent.
+type ConcurrencyPolicy string
+
+const (
+ // AllowConcurrent allows CronJobs to run concurrently.
+ AllowConcurrent ConcurrencyPolicy = "Allow"
+
+ // ForbidConcurrent forbids concurrent runs, skipping next run if previous
+ // hasn't finished yet.
+ ForbidConcurrent ConcurrencyPolicy = "Forbid"
+
+ // ReplaceConcurrent cancels currently running job and replaces it with a new one.
+ ReplaceConcurrent ConcurrencyPolicy = "Replace"
+)
+
+// CronJobStatus represents the current state of a cron job.
+type CronJobStatus struct {
+ // A list of pointers to currently running jobs.
+ // +optional
+ Active []api.ObjectReference
+
+ // Information when was the last time the job was successfully scheduled.
+ // +optional
+ LastScheduleTime *metav1.Time
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v1/conversion.go b/vendor/k8s.io/client-go/pkg/apis/batch/v1/conversion.go
new file mode 100644
index 000000000..7f2bc9d15
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/batch/v1/conversion.go
@@ -0,0 +1,84 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "fmt"
+
+ "k8s.io/apimachinery/pkg/conversion"
+ "k8s.io/apimachinery/pkg/runtime"
+ v1 "k8s.io/client-go/pkg/api/v1"
+ "k8s.io/client-go/pkg/apis/batch"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) error {
+ // Add non-generated conversion functions
+ err := scheme.AddConversionFuncs(
+ Convert_batch_JobSpec_To_v1_JobSpec,
+ Convert_v1_JobSpec_To_batch_JobSpec,
+ )
+ if err != nil {
+ return err
+ }
+
+ return scheme.AddFieldLabelConversionFunc("batch/v1", "Job",
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "metadata.name", "metadata.namespace", "status.successful":
+ return label, value, nil
+ default:
+ return "", "", fmt.Errorf("field label %q not supported for Job", label)
+ }
+ },
+ )
+}
+
+func Convert_batch_JobSpec_To_v1_JobSpec(in *batch.JobSpec, out *JobSpec, s conversion.Scope) error {
+ out.Parallelism = in.Parallelism
+ out.Completions = in.Completions
+ out.ActiveDeadlineSeconds = in.ActiveDeadlineSeconds
+ out.Selector = in.Selector
+ if in.ManualSelector != nil {
+ out.ManualSelector = new(bool)
+ *out.ManualSelector = *in.ManualSelector
+ } else {
+ out.ManualSelector = nil
+ }
+
+ if err := v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1_JobSpec_To_batch_JobSpec(in *JobSpec, out *batch.JobSpec, s conversion.Scope) error {
+ out.Parallelism = in.Parallelism
+ out.Completions = in.Completions
+ out.ActiveDeadlineSeconds = in.ActiveDeadlineSeconds
+ out.Selector = in.Selector
+ if in.ManualSelector != nil {
+ out.ManualSelector = new(bool)
+ *out.ManualSelector = *in.ManualSelector
+ } else {
+ out.ManualSelector = nil
+ }
+
+ if err := v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v1/defaults.go b/vendor/k8s.io/client-go/pkg/apis/batch/v1/defaults.go
new file mode 100644
index 000000000..9c246a594
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/batch/v1/defaults.go
@@ -0,0 +1,44 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
+
+func SetDefaults_Job(obj *Job) {
+ // For a non-parallel job, you can leave both `.spec.completions` and
+ // `.spec.parallelism` unset. When both are unset, both are defaulted to 1.
+ if obj.Spec.Completions == nil && obj.Spec.Parallelism == nil {
+ obj.Spec.Completions = new(int32)
+ *obj.Spec.Completions = 1
+ obj.Spec.Parallelism = new(int32)
+ *obj.Spec.Parallelism = 1
+ }
+ if obj.Spec.Parallelism == nil {
+ obj.Spec.Parallelism = new(int32)
+ *obj.Spec.Parallelism = 1
+ }
+ labels := obj.Spec.Template.Labels
+ if labels != nil && len(obj.Labels) == 0 {
+ obj.Labels = labels
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v1/doc.go b/vendor/k8s.io/client-go/pkg/apis/batch/v1/doc.go
new file mode 100644
index 000000000..c7be42d5a
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/batch/v1/doc.go
@@ -0,0 +1,17 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/batch/v1/generated.pb.go
new file mode 100644
index 000000000..bcc6cd9ce
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/batch/v1/generated.pb.go
@@ -0,0 +1,1585 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/batch/v1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/batch/v1/generated.proto
+
+ It has these top-level messages:
+ Job
+ JobCondition
+ JobList
+ JobSpec
+ JobStatus
+*/
+package v1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+import k8s_io_kubernetes_pkg_api_v1 "k8s.io/client-go/pkg/api/v1"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *Job) Reset() { *m = Job{} }
+func (*Job) ProtoMessage() {}
+func (*Job) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *JobCondition) Reset() { *m = JobCondition{} }
+func (*JobCondition) ProtoMessage() {}
+func (*JobCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *JobList) Reset() { *m = JobList{} }
+func (*JobList) ProtoMessage() {}
+func (*JobList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
+
+func (m *JobSpec) Reset() { *m = JobSpec{} }
+func (*JobSpec) ProtoMessage() {}
+func (*JobSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
+
+func (m *JobStatus) Reset() { *m = JobStatus{} }
+func (*JobStatus) ProtoMessage() {}
+func (*JobStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
+
+func init() {
+ proto.RegisterType((*Job)(nil), "k8s.io.client-go.pkg.apis.batch.v1.Job")
+ proto.RegisterType((*JobCondition)(nil), "k8s.io.client-go.pkg.apis.batch.v1.JobCondition")
+ proto.RegisterType((*JobList)(nil), "k8s.io.client-go.pkg.apis.batch.v1.JobList")
+ proto.RegisterType((*JobSpec)(nil), "k8s.io.client-go.pkg.apis.batch.v1.JobSpec")
+ proto.RegisterType((*JobStatus)(nil), "k8s.io.client-go.pkg.apis.batch.v1.JobStatus")
+}
+func (m *Job) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Job) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n2, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n3, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ return i, nil
+}
+
+func (m *JobCondition) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *JobCondition) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
+ i += copy(dAtA[i:], m.Status)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastProbeTime.Size()))
+ n4, err := m.LastProbeTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
+ n5, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ return i, nil
+}
+
+func (m *JobList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *JobList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n6, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *JobSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *JobSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Parallelism != nil {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.Parallelism))
+ }
+ if m.Completions != nil {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.Completions))
+ }
+ if m.ActiveDeadlineSeconds != nil {
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.ActiveDeadlineSeconds))
+ }
+ if m.Selector != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
+ n7, err := m.Selector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ }
+ if m.ManualSelector != nil {
+ dAtA[i] = 0x28
+ i++
+ if *m.ManualSelector {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
+ n8, err := m.Template.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n8
+ return i, nil
+}
+
+func (m *JobStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *JobStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Conditions) > 0 {
+ for _, msg := range m.Conditions {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.StartTime != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.StartTime.Size()))
+ n9, err := m.StartTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n9
+ }
+ if m.CompletionTime != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CompletionTime.Size()))
+ n10, err := m.CompletionTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n10
+ }
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Active))
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Succeeded))
+ dAtA[i] = 0x30
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Failed))
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *Job) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *JobCondition) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Status)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastProbeTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastTransitionTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *JobList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *JobSpec) Size() (n int) {
+ var l int
+ _ = l
+ if m.Parallelism != nil {
+ n += 1 + sovGenerated(uint64(*m.Parallelism))
+ }
+ if m.Completions != nil {
+ n += 1 + sovGenerated(uint64(*m.Completions))
+ }
+ if m.ActiveDeadlineSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.ActiveDeadlineSeconds))
+ }
+ if m.Selector != nil {
+ l = m.Selector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.ManualSelector != nil {
+ n += 2
+ }
+ l = m.Template.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *JobStatus) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Conditions) > 0 {
+ for _, e := range m.Conditions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.StartTime != nil {
+ l = m.StartTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.CompletionTime != nil {
+ l = m.CompletionTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ n += 1 + sovGenerated(uint64(m.Active))
+ n += 1 + sovGenerated(uint64(m.Succeeded))
+ n += 1 + sovGenerated(uint64(m.Failed))
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *Job) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Job{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "JobSpec", "JobSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "JobStatus", "JobStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *JobCondition) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&JobCondition{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
+ `LastProbeTime:` + strings.Replace(strings.Replace(this.LastProbeTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *JobList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&JobList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Job", "Job", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *JobSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&JobSpec{`,
+ `Parallelism:` + valueToStringGenerated(this.Parallelism) + `,`,
+ `Completions:` + valueToStringGenerated(this.Completions) + `,`,
+ `ActiveDeadlineSeconds:` + valueToStringGenerated(this.ActiveDeadlineSeconds) + `,`,
+ `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
+ `ManualSelector:` + valueToStringGenerated(this.ManualSelector) + `,`,
+ `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_kubernetes_pkg_api_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *JobStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&JobStatus{`,
+ `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "JobCondition", "JobCondition", 1), `&`, ``, 1) + `,`,
+ `StartTime:` + strings.Replace(fmt.Sprintf("%v", this.StartTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`,
+ `CompletionTime:` + strings.Replace(fmt.Sprintf("%v", this.CompletionTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`,
+ `Active:` + fmt.Sprintf("%v", this.Active) + `,`,
+ `Succeeded:` + fmt.Sprintf("%v", this.Succeeded) + `,`,
+ `Failed:` + fmt.Sprintf("%v", this.Failed) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *Job) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Job: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Job: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *JobCondition) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: JobCondition: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: JobCondition: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = JobConditionType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Status = k8s_io_kubernetes_pkg_api_v1.ConditionStatus(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastProbeTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastProbeTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *JobList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: JobList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: JobList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, Job{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *JobSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: JobSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: JobSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Parallelism", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Parallelism = &v
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Completions", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Completions = &v
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ActiveDeadlineSeconds", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ActiveDeadlineSeconds = &v
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Selector == nil {
+ m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
+ }
+ if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ManualSelector", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.ManualSelector = &b
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *JobStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: JobStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: JobStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Conditions = append(m.Conditions, JobCondition{})
+ if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.StartTime == nil {
+ m.StartTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{}
+ }
+ if err := m.StartTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CompletionTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.CompletionTime == nil {
+ m.CompletionTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{}
+ }
+ if err := m.CompletionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Active", wireType)
+ }
+ m.Active = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Active |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Succeeded", wireType)
+ }
+ m.Succeeded = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Succeeded |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Failed", wireType)
+ }
+ m.Failed = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Failed |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/client-go/pkg/apis/batch/v1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 873 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xdd, 0x6e, 0xe3, 0x44,
+ 0x14, 0xce, 0x4f, 0xd3, 0x26, 0x93, 0xb6, 0xbb, 0x8c, 0x54, 0x29, 0xf4, 0xc2, 0x59, 0x05, 0x09,
+ 0x15, 0xb4, 0x6b, 0x93, 0x76, 0x85, 0x10, 0x17, 0x48, 0xb8, 0x08, 0x89, 0xaa, 0x65, 0xab, 0x49,
+ 0x05, 0x12, 0x3f, 0x12, 0x63, 0xfb, 0x34, 0x1d, 0x6a, 0x7b, 0x2c, 0xcf, 0x24, 0x52, 0xef, 0x78,
+ 0x03, 0x78, 0x18, 0x84, 0x78, 0x84, 0x5e, 0xf6, 0x72, 0xaf, 0x22, 0x6a, 0xde, 0x62, 0xaf, 0xd0,
+ 0x8c, 0x27, 0xb6, 0xb3, 0x49, 0x21, 0xe5, 0xce, 0x3e, 0xf3, 0x7d, 0xdf, 0x39, 0x73, 0xce, 0x77,
+ 0x06, 0x1d, 0x5d, 0x7f, 0x22, 0x6c, 0xc6, 0x9d, 0xeb, 0x89, 0x07, 0x69, 0x0c, 0x12, 0x84, 0x93,
+ 0x5c, 0x8f, 0x1d, 0x9a, 0x30, 0xe1, 0x78, 0x54, 0xfa, 0x57, 0xce, 0x74, 0xe8, 0x8c, 0x21, 0x86,
+ 0x94, 0x4a, 0x08, 0xec, 0x24, 0xe5, 0x92, 0xe3, 0xf7, 0x72, 0x92, 0x5d, 0x92, 0xec, 0xe4, 0x7a,
+ 0x6c, 0x2b, 0x92, 0xad, 0x49, 0xf6, 0x74, 0xb8, 0xff, 0x62, 0xcc, 0xe4, 0xd5, 0xc4, 0xb3, 0x7d,
+ 0x1e, 0x39, 0x63, 0x3e, 0xe6, 0x8e, 0xe6, 0x7a, 0x93, 0x4b, 0xfd, 0xa7, 0x7f, 0xf4, 0x57, 0xae,
+ 0xb9, 0xff, 0xd2, 0x14, 0x42, 0x13, 0x16, 0x51, 0xff, 0x8a, 0xc5, 0x90, 0xde, 0x94, 0xa5, 0x44,
+ 0x20, 0xe9, 0x8a, 0x4a, 0xf6, 0x9d, 0x87, 0x58, 0xe9, 0x24, 0x96, 0x2c, 0x82, 0x25, 0xc2, 0xc7,
+ 0xff, 0x45, 0x10, 0xfe, 0x15, 0x44, 0x74, 0x89, 0x77, 0xf4, 0x10, 0x6f, 0x22, 0x59, 0xe8, 0xb0,
+ 0x58, 0x0a, 0x99, 0x2e, 0x91, 0x9e, 0x3f, 0xd8, 0xdc, 0x15, 0x77, 0x19, 0xfc, 0xda, 0x40, 0xcd,
+ 0x13, 0xee, 0xe1, 0x9f, 0x50, 0x5b, 0x5d, 0x37, 0xa0, 0x92, 0xf6, 0xea, 0xcf, 0xea, 0x07, 0xdd,
+ 0xc3, 0x8f, 0x6c, 0xd3, 0xf0, 0x6a, 0xf6, 0xb2, 0xe5, 0x0a, 0x6d, 0x4f, 0x87, 0xf6, 0x2b, 0xef,
+ 0x67, 0xf0, 0xe5, 0x19, 0x48, 0xea, 0xe2, 0xdb, 0x59, 0xbf, 0x96, 0xcd, 0xfa, 0xa8, 0x8c, 0x91,
+ 0x42, 0x15, 0x7f, 0x8d, 0x36, 0x44, 0x02, 0x7e, 0xaf, 0xa1, 0xd5, 0x9f, 0xdb, 0x6b, 0x8c, 0xd3,
+ 0x3e, 0xe1, 0xde, 0x28, 0x01, 0xdf, 0xdd, 0x36, 0xca, 0x1b, 0xea, 0x8f, 0x68, 0x1d, 0xfc, 0x0d,
+ 0xda, 0x14, 0x92, 0xca, 0x89, 0xe8, 0x35, 0xb5, 0xa2, 0xbd, 0xb6, 0xa2, 0x66, 0xb9, 0xbb, 0x46,
+ 0x73, 0x33, 0xff, 0x27, 0x46, 0x6d, 0x70, 0xd7, 0x44, 0xdb, 0x27, 0xdc, 0x3b, 0xe6, 0x71, 0xc0,
+ 0x24, 0xe3, 0x31, 0x7e, 0x89, 0x36, 0xe4, 0x4d, 0x02, 0xba, 0x2d, 0x1d, 0xf7, 0xd9, 0xbc, 0x94,
+ 0x8b, 0x9b, 0x04, 0xde, 0xcc, 0xfa, 0x4f, 0xab, 0x58, 0x15, 0x23, 0x1a, 0x5d, 0x29, 0xaf, 0xa1,
+ 0x79, 0x9f, 0x2d, 0xa6, 0x7b, 0x33, 0xeb, 0xff, 0xeb, 0xa0, 0xec, 0x42, 0x73, 0xb1, 0x3c, 0x3c,
+ 0x46, 0x3b, 0x21, 0x15, 0xf2, 0x3c, 0xe5, 0x1e, 0x5c, 0xb0, 0x08, 0xcc, 0xed, 0x3f, 0x5c, 0x6f,
+ 0x5a, 0x8a, 0xe1, 0xee, 0x99, 0x52, 0x76, 0x4e, 0xab, 0x42, 0x64, 0x51, 0x17, 0x4f, 0x11, 0x56,
+ 0x81, 0x8b, 0x94, 0xc6, 0x22, 0xbf, 0x9c, 0xca, 0xb6, 0xf1, 0xe8, 0x6c, 0xfb, 0x26, 0x1b, 0x3e,
+ 0x5d, 0x52, 0x23, 0x2b, 0x32, 0xe0, 0xf7, 0xd1, 0x66, 0x0a, 0x54, 0xf0, 0xb8, 0xd7, 0xd2, 0x8d,
+ 0x2b, 0xe6, 0x44, 0x74, 0x94, 0x98, 0x53, 0xfc, 0x01, 0xda, 0x8a, 0x40, 0x08, 0x3a, 0x86, 0xde,
+ 0xa6, 0x06, 0x3e, 0x31, 0xc0, 0xad, 0xb3, 0x3c, 0x4c, 0xe6, 0xe7, 0x83, 0x3f, 0xea, 0x68, 0xeb,
+ 0x84, 0x7b, 0xa7, 0x4c, 0x48, 0xfc, 0xc3, 0x92, 0xd1, 0xed, 0xf5, 0x2e, 0xa3, 0xd8, 0xda, 0xe6,
+ 0x4f, 0x4d, 0x9e, 0xf6, 0x3c, 0x52, 0x31, 0xf9, 0x19, 0x6a, 0x31, 0x09, 0x91, 0x1a, 0x7a, 0xf3,
+ 0xa0, 0x7b, 0x78, 0xb0, 0xae, 0x27, 0xdd, 0x1d, 0x23, 0xda, 0xfa, 0x4a, 0xd1, 0x49, 0xae, 0x32,
+ 0xf8, 0xb3, 0xa9, 0x0b, 0x57, 0xae, 0xc7, 0x43, 0xd4, 0x4d, 0x68, 0x4a, 0xc3, 0x10, 0x42, 0x26,
+ 0x22, 0x5d, 0x7b, 0xcb, 0x7d, 0x92, 0xcd, 0xfa, 0xdd, 0xf3, 0x32, 0x4c, 0xaa, 0x18, 0x45, 0xf1,
+ 0x79, 0x94, 0x84, 0xa0, 0x9a, 0x9b, 0x1b, 0xd1, 0x50, 0x8e, 0xcb, 0x30, 0xa9, 0x62, 0xf0, 0x2b,
+ 0xb4, 0x47, 0x7d, 0xc9, 0xa6, 0xf0, 0x05, 0xd0, 0x20, 0x64, 0x31, 0x8c, 0xc0, 0xe7, 0x71, 0x90,
+ 0x2f, 0x59, 0xd3, 0x7d, 0x37, 0x9b, 0xf5, 0xf7, 0x3e, 0x5f, 0x05, 0x20, 0xab, 0x79, 0xf8, 0x47,
+ 0xd4, 0x16, 0x10, 0x82, 0x2f, 0x79, 0x6a, 0xcc, 0x73, 0xb4, 0x66, 0xbf, 0xa9, 0x07, 0xe1, 0xc8,
+ 0x50, 0xdd, 0x6d, 0xd5, 0xf0, 0xf9, 0x1f, 0x29, 0x24, 0xf1, 0xa7, 0x68, 0x37, 0xa2, 0xf1, 0x84,
+ 0x16, 0x48, 0xed, 0x9a, 0xb6, 0x8b, 0xb3, 0x59, 0x7f, 0xf7, 0x6c, 0xe1, 0x84, 0xbc, 0x85, 0xc4,
+ 0xdf, 0xa3, 0xb6, 0x84, 0x28, 0x09, 0xa9, 0xcc, 0x2d, 0xd4, 0x3d, 0x7c, 0xf1, 0xf0, 0xbc, 0x54,
+ 0x49, 0xe7, 0x3c, 0xb8, 0x30, 0x04, 0xfd, 0x2c, 0x15, 0x4e, 0x98, 0x47, 0x49, 0x21, 0x38, 0xf8,
+ 0xbd, 0x89, 0x3a, 0xc5, 0x63, 0x83, 0x01, 0x21, 0x7f, 0xbe, 0xd0, 0xa2, 0x57, 0xd7, 0xe6, 0x18,
+ 0xae, 0x6b, 0x8e, 0xe2, 0x29, 0x28, 0x5f, 0xd8, 0x22, 0x24, 0x48, 0x45, 0x18, 0x7f, 0x8b, 0x3a,
+ 0x42, 0xd2, 0x54, 0xea, 0x55, 0x6d, 0x3c, 0x7a, 0x55, 0x77, 0xb2, 0x59, 0xbf, 0x33, 0x9a, 0x0b,
+ 0x90, 0x52, 0x0b, 0x5f, 0xa2, 0xdd, 0xd2, 0x25, 0xff, 0xf3, 0xd9, 0xd1, 0x23, 0x39, 0x5e, 0x50,
+ 0x21, 0x6f, 0xa9, 0xaa, 0xe5, 0xcf, 0x6d, 0xa4, 0xbd, 0xd2, 0x2a, 0x97, 0x3f, 0xf7, 0x1c, 0x31,
+ 0xa7, 0xd8, 0x41, 0x1d, 0x31, 0xf1, 0x7d, 0x80, 0x00, 0x02, 0x3d, 0xf1, 0x96, 0xfb, 0x8e, 0x81,
+ 0x76, 0x46, 0xf3, 0x03, 0x52, 0x62, 0x94, 0xf0, 0x25, 0x65, 0x21, 0x04, 0x7a, 0xd2, 0x15, 0xe1,
+ 0x2f, 0x75, 0x94, 0x98, 0x53, 0xf7, 0xe0, 0xf6, 0xde, 0xaa, 0xdd, 0xdd, 0x5b, 0xb5, 0xd7, 0xf7,
+ 0x56, 0xed, 0x97, 0xcc, 0xaa, 0xdf, 0x66, 0x56, 0xfd, 0x2e, 0xb3, 0xea, 0xaf, 0x33, 0xab, 0xfe,
+ 0x57, 0x66, 0xd5, 0x7f, 0xfb, 0xdb, 0xaa, 0x7d, 0xd7, 0x98, 0x0e, 0xff, 0x09, 0x00, 0x00, 0xff,
+ 0xff, 0xe1, 0x7e, 0xeb, 0x67, 0xc5, 0x08, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/batch/v1/generated.proto
new file mode 100644
index 000000000..946988550
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/batch/v1/generated.proto
@@ -0,0 +1,168 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.client_go.pkg.apis.batch.v1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1";
+
+// Job represents the configuration of a single job.
+message Job {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Specification of the desired behavior of a job.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional JobSpec spec = 2;
+
+ // Current status of a job.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional JobStatus status = 3;
+}
+
+// JobCondition describes current state of a job.
+message JobCondition {
+ // Type of job condition, Complete or Failed.
+ optional string type = 1;
+
+ // Status of the condition, one of True, False, Unknown.
+ optional string status = 2;
+
+ // Last time the condition was checked.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastProbeTime = 3;
+
+ // Last time the condition transit from one status to another.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4;
+
+ // (brief) reason for the condition's last transition.
+ // +optional
+ optional string reason = 5;
+
+ // Human readable message indicating details about last transition.
+ // +optional
+ optional string message = 6;
+}
+
+// JobList is a collection of jobs.
+message JobList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // items is the list of Jobs.
+ repeated Job items = 2;
+}
+
+// JobSpec describes how the job execution will look like.
+message JobSpec {
+ // Specifies the maximum desired number of pods the job should
+ // run at any given time. The actual number of pods running in steady state will
+ // be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism),
+ // i.e. when the work left to do is less than max parallelism.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
+ // +optional
+ optional int32 parallelism = 1;
+
+ // Specifies the desired number of successfully finished pods the
+ // job should be run with. Setting to nil means that the success of any
+ // pod signals the success of all pods, and allows parallelism to have any positive
+ // value. Setting to 1 means that parallelism is limited to 1 and the success of that
+ // pod signals the success of the job.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
+ // +optional
+ optional int32 completions = 2;
+
+ // Optional duration in seconds relative to the startTime that the job may be active
+ // before the system tries to terminate it; value must be positive integer
+ // +optional
+ optional int64 activeDeadlineSeconds = 3;
+
+ // A label query over pods that should match the pod count.
+ // Normally, the system sets this field for you.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
+
+ // manualSelector controls generation of pod labels and pod selectors.
+ // Leave `manualSelector` unset unless you are certain what you are doing.
+ // When false or unset, the system pick labels unique to this job
+ // and appends those labels to the pod template. When true,
+ // the user is responsible for picking unique labels and specifying
+ // the selector. Failure to pick a unique label may cause this
+ // and other jobs to not function correctly. However, You may see
+ // `manualSelector=true` in jobs that were created with the old `extensions/v1beta1`
+ // API.
+ // More info: https://git.k8s.io/community/contributors/design-proposals/selector-generation.md
+ // +optional
+ optional bool manualSelector = 5;
+
+ // Describes the pod that will be created when executing a job.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
+ optional k8s.io.client_go.pkg.api.v1.PodTemplateSpec template = 6;
+}
+
+// JobStatus represents the current state of a Job.
+message JobStatus {
+ // The latest available observations of an object's current state.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ repeated JobCondition conditions = 1;
+
+ // Represents time when the job was acknowledged by the job controller.
+ // It is not guaranteed to be set in happens-before order across separate operations.
+ // It is represented in RFC3339 form and is in UTC.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startTime = 2;
+
+ // Represents time when the job was completed. It is not guaranteed to
+ // be set in happens-before order across separate operations.
+ // It is represented in RFC3339 form and is in UTC.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time completionTime = 3;
+
+ // The number of actively running pods.
+ // +optional
+ optional int32 active = 4;
+
+ // The number of pods which reached phase Succeeded.
+ // +optional
+ optional int32 succeeded = 5;
+
+ // The number of pods which reached phase Failed.
+ // +optional
+ optional int32 failed = 6;
+}
+
diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v1/register.go b/vendor/k8s.io/client-go/pkg/apis/batch/v1/register.go
new file mode 100644
index 000000000..9256e829a
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/batch/v1/register.go
@@ -0,0 +1,59 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "batch"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Job{},
+ &JobList{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v1/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/batch/v1/types.generated.go
new file mode 100644
index 000000000..a7693119c
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/batch/v1/types.generated.go
@@ -0,0 +1,2681 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1
+
+import (
+ "errors"
+ "fmt"
+ 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"
+ pkg5_intstr "k8s.io/apimachinery/pkg/util/intstr"
+ pkg3_v1 "k8s.io/client-go/pkg/api/v1"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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 pkg5_intstr.IntOrString
+ var v4 pkg3_v1.PodTemplateSpec
+ var v5 time.Time
+ _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5
+ }
+}
+
+func (x *Job) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Job) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Job) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = JobSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = JobStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = JobSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = JobStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *JobList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceJob(([]Job)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceJob(([]Job)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *JobList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *JobList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceJob((*[]Job)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *JobList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceJob((*[]Job)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *JobSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Parallelism != nil
+ yyq2[1] = x.Completions != nil
+ yyq2[2] = x.ActiveDeadlineSeconds != nil
+ yyq2[3] = x.Selector != nil
+ yyq2[4] = x.ManualSelector != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Parallelism == nil {
+ r.EncodeNil()
+ } else {
+ yy4 := *x.Parallelism
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(yy4))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("parallelism"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Parallelism == nil {
+ r.EncodeNil()
+ } else {
+ yy6 := *x.Parallelism
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(yy6))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Completions == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.Completions
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(yy9))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("completions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Completions == nil {
+ r.EncodeNil()
+ } else {
+ yy11 := *x.Completions
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeInt(int64(yy11))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.ActiveDeadlineSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy14 := *x.ActiveDeadlineSeconds
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeInt(int64(yy14))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("activeDeadlineSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ActiveDeadlineSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy16 := *x.ActiveDeadlineSeconds
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(yy16))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.ManualSelector == nil {
+ r.EncodeNil()
+ } else {
+ yy22 := *x.ManualSelector
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeBool(bool(yy22))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("manualSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ManualSelector == nil {
+ r.EncodeNil()
+ } else {
+ yy24 := *x.ManualSelector
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeBool(bool(yy24))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy27 := &x.Template
+ yy27.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("template"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy29 := &x.Template
+ yy29.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *JobSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *JobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "parallelism":
+ if r.TryDecodeAsNil() {
+ if x.Parallelism != nil {
+ x.Parallelism = nil
+ }
+ } else {
+ if x.Parallelism == nil {
+ x.Parallelism = new(int32)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(x.Parallelism)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "completions":
+ if r.TryDecodeAsNil() {
+ if x.Completions != nil {
+ x.Completions = nil
+ }
+ } else {
+ if x.Completions == nil {
+ x.Completions = new(int32)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int32)(x.Completions)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "activeDeadlineSeconds":
+ if r.TryDecodeAsNil() {
+ if x.ActiveDeadlineSeconds != nil {
+ x.ActiveDeadlineSeconds = nil
+ }
+ } else {
+ if x.ActiveDeadlineSeconds == nil {
+ x.ActiveDeadlineSeconds = new(int64)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_v1.LabelSelector)
+ }
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ case "manualSelector":
+ if r.TryDecodeAsNil() {
+ if x.ManualSelector != nil {
+ x.ManualSelector = nil
+ }
+ } else {
+ if x.ManualSelector == nil {
+ x.ManualSelector = new(bool)
+ }
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*bool)(x.ManualSelector)) = r.DecodeBool()
+ }
+ }
+ case "template":
+ if r.TryDecodeAsNil() {
+ x.Template = pkg3_v1.PodTemplateSpec{}
+ } else {
+ yyv14 := &x.Template
+ yyv14.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *JobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj15 int
+ var yyb15 bool
+ var yyhl15 bool = l >= 0
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Parallelism != nil {
+ x.Parallelism = nil
+ }
+ } else {
+ if x.Parallelism == nil {
+ x.Parallelism = new(int32)
+ }
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*int32)(x.Parallelism)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Completions != nil {
+ x.Completions = nil
+ }
+ } else {
+ if x.Completions == nil {
+ x.Completions = new(int32)
+ }
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*int32)(x.Completions)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ActiveDeadlineSeconds != nil {
+ x.ActiveDeadlineSeconds = nil
+ }
+ } else {
+ if x.ActiveDeadlineSeconds == nil {
+ x.ActiveDeadlineSeconds = new(int64)
+ }
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_v1.LabelSelector)
+ }
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ManualSelector != nil {
+ x.ManualSelector = nil
+ }
+ } else {
+ if x.ManualSelector == nil {
+ x.ManualSelector = new(bool)
+ }
+ yym25 := z.DecBinary()
+ _ = yym25
+ if false {
+ } else {
+ *((*bool)(x.ManualSelector)) = r.DecodeBool()
+ }
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Template = pkg3_v1.PodTemplateSpec{}
+ } else {
+ yyv26 := &x.Template
+ yyv26.CodecDecodeSelf(d)
+ }
+ for {
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj15-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *JobStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Conditions) != 0
+ yyq2[1] = x.StartTime != nil
+ yyq2[2] = x.CompletionTime != nil
+ yyq2[3] = x.Active != 0
+ yyq2[4] = x.Succeeded != 0
+ yyq2[5] = x.Failed != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceJobCondition(([]JobCondition)(x.Conditions), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("conditions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceJobCondition(([]JobCondition)(x.Conditions), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.StartTime == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.StartTime) {
+ } else if yym7 {
+ z.EncBinaryMarshal(x.StartTime)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.StartTime)
+ } else {
+ z.EncFallback(x.StartTime)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("startTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.StartTime == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.StartTime) {
+ } else if yym8 {
+ z.EncBinaryMarshal(x.StartTime)
+ } else if !yym8 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.StartTime)
+ } else {
+ z.EncFallback(x.StartTime)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.CompletionTime == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.CompletionTime) {
+ } else if yym10 {
+ z.EncBinaryMarshal(x.CompletionTime)
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.CompletionTime)
+ } else {
+ z.EncFallback(x.CompletionTime)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("completionTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.CompletionTime == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.CompletionTime) {
+ } else if yym11 {
+ z.EncBinaryMarshal(x.CompletionTime)
+ } else if !yym11 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.CompletionTime)
+ } else {
+ z.EncFallback(x.CompletionTime)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Active))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("active"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Active))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Succeeded))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("succeeded"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Succeeded))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Failed))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("failed"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Failed))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *JobStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *JobStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "conditions":
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv4 := &x.Conditions
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceJobCondition((*[]JobCondition)(yyv4), d)
+ }
+ }
+ case "startTime":
+ if r.TryDecodeAsNil() {
+ if x.StartTime != nil {
+ x.StartTime = nil
+ }
+ } else {
+ if x.StartTime == nil {
+ x.StartTime = new(pkg1_v1.Time)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.StartTime) {
+ } else if yym7 {
+ z.DecBinaryUnmarshal(x.StartTime)
+ } else if !yym7 && 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)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.CompletionTime) {
+ } else if yym9 {
+ z.DecBinaryUnmarshal(x.CompletionTime)
+ } else if !yym9 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.CompletionTime)
+ } else {
+ z.DecFallback(x.CompletionTime, false)
+ }
+ }
+ case "active":
+ if r.TryDecodeAsNil() {
+ x.Active = 0
+ } else {
+ yyv10 := &x.Active
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(yyv10)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "succeeded":
+ if r.TryDecodeAsNil() {
+ x.Succeeded = 0
+ } else {
+ yyv12 := &x.Succeeded
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int32)(yyv12)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "failed":
+ if r.TryDecodeAsNil() {
+ x.Failed = 0
+ } else {
+ yyv14 := &x.Failed
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*int32)(yyv14)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *JobStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj16 int
+ var yyb16 bool
+ var yyhl16 bool = l >= 0
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv17 := &x.Conditions
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ h.decSliceJobCondition((*[]JobCondition)(yyv17), d)
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.StartTime != nil {
+ x.StartTime = nil
+ }
+ } else {
+ if x.StartTime == nil {
+ x.StartTime = new(pkg1_v1.Time)
+ }
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.StartTime) {
+ } else if yym20 {
+ z.DecBinaryUnmarshal(x.StartTime)
+ } else if !yym20 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.StartTime)
+ } else {
+ z.DecFallback(x.StartTime, false)
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.CompletionTime != nil {
+ x.CompletionTime = nil
+ }
+ } else {
+ if x.CompletionTime == nil {
+ x.CompletionTime = new(pkg1_v1.Time)
+ }
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.CompletionTime) {
+ } else if yym22 {
+ z.DecBinaryUnmarshal(x.CompletionTime)
+ } else if !yym22 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.CompletionTime)
+ } else {
+ z.DecFallback(x.CompletionTime, false)
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Active = 0
+ } else {
+ yyv23 := &x.Active
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*int32)(yyv23)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Succeeded = 0
+ } else {
+ yyv25 := &x.Succeeded
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*int32)(yyv25)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Failed = 0
+ } else {
+ yyv27 := &x.Failed
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*int32)(yyv27)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj16-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x JobConditionType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *JobConditionType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *JobCondition) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = true
+ yyq2[3] = true
+ yyq2[4] = x.Reason != ""
+ yyq2[5] = x.Message != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yysf7 := &x.Status
+ yysf7.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yysf8 := &x.Status
+ yysf8.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy10 := &x.LastProbeTime
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy10) {
+ } else if yym11 {
+ z.EncBinaryMarshal(yy10)
+ } else if !yym11 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy10)
+ } else {
+ z.EncFallback(yy10)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastProbeTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.LastProbeTime
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if yym13 {
+ z.EncBinaryMarshal(yy12)
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.LastTransitionTime
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy15) {
+ } else if yym16 {
+ z.EncBinaryMarshal(yy15)
+ } else if !yym16 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy15)
+ } else {
+ z.EncFallback(yy15)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.LastTransitionTime
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy17) {
+ } else if yym18 {
+ z.EncBinaryMarshal(yy17)
+ } else if !yym18 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy17)
+ } else {
+ z.EncFallback(yy17)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *JobCondition) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *JobCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "lastProbeTime":
+ if r.TryDecodeAsNil() {
+ x.LastProbeTime = pkg1_v1.Time{}
+ } else {
+ yyv6 := &x.LastProbeTime
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if yym7 {
+ z.DecBinaryUnmarshal(yyv6)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ case "lastTransitionTime":
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg1_v1.Time{}
+ } else {
+ yyv8 := &x.LastTransitionTime
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv8) {
+ } else if yym9 {
+ z.DecBinaryUnmarshal(yyv8)
+ } else if !yym9 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv8)
+ } else {
+ z.DecFallback(yyv8, false)
+ }
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv10 := &x.Reason
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv12 := &x.Message
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *JobCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv15 := &x.Type
+ yyv15.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv16 := &x.Status
+ yyv16.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastProbeTime = pkg1_v1.Time{}
+ } else {
+ yyv17 := &x.LastProbeTime
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv17) {
+ } else if yym18 {
+ z.DecBinaryUnmarshal(yyv17)
+ } else if !yym18 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv17)
+ } else {
+ z.DecFallback(yyv17, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg1_v1.Time{}
+ } else {
+ yyv19 := &x.LastTransitionTime
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv19) {
+ } else if yym20 {
+ z.DecBinaryUnmarshal(yyv19)
+ } else if !yym20 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv19)
+ } else {
+ z.DecFallback(yyv19, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv21 := &x.Reason
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv23 := &x.Message
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*string)(yyv23)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encSliceJob(v []Job, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceJob(v *[]Job, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Job{}
+ 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, 920)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Job, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Job, 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] = Job{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Job{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Job{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Job{}) // var yyz1 Job
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Job{}
+ } 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 = []Job{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceJobCondition(v []JobCondition, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceJobCondition(v *[]JobCondition, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []JobCondition{}
+ 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, 112)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]JobCondition, yyrl1)
+ }
+ } else {
+ yyv1 = make([]JobCondition, 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] = JobCondition{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, JobCondition{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = JobCondition{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, JobCondition{}) // var yyz1 JobCondition
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = JobCondition{}
+ } 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 = []JobCondition{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v1/types.go b/vendor/k8s.io/client-go/pkg/apis/batch/v1/types.go
new file mode 100644
index 000000000..bcc8c2089
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/batch/v1/types.go
@@ -0,0 +1,168 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/client-go/pkg/api/v1"
+)
+
+// +genclient=true
+
+// Job represents the configuration of a single job.
+type Job struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Specification of the desired behavior of a job.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Current status of a job.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status JobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// JobList is a collection of jobs.
+type JobList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // items is the list of Jobs.
+ Items []Job `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// JobSpec describes how the job execution will look like.
+type JobSpec struct {
+
+ // Specifies the maximum desired number of pods the job should
+ // run at any given time. The actual number of pods running in steady state will
+ // be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism),
+ // i.e. when the work left to do is less than max parallelism.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
+ // +optional
+ Parallelism *int32 `json:"parallelism,omitempty" protobuf:"varint,1,opt,name=parallelism"`
+
+ // Specifies the desired number of successfully finished pods the
+ // job should be run with. Setting to nil means that the success of any
+ // pod signals the success of all pods, and allows parallelism to have any positive
+ // value. Setting to 1 means that parallelism is limited to 1 and the success of that
+ // pod signals the success of the job.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
+ // +optional
+ Completions *int32 `json:"completions,omitempty" protobuf:"varint,2,opt,name=completions"`
+
+ // Optional duration in seconds relative to the startTime that the job may be active
+ // before the system tries to terminate it; value must be positive integer
+ // +optional
+ ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" protobuf:"varint,3,opt,name=activeDeadlineSeconds"`
+
+ // A label query over pods that should match the pod count.
+ // Normally, the system sets this field for you.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,opt,name=selector"`
+
+ // manualSelector controls generation of pod labels and pod selectors.
+ // Leave `manualSelector` unset unless you are certain what you are doing.
+ // When false or unset, the system pick labels unique to this job
+ // and appends those labels to the pod template. When true,
+ // the user is responsible for picking unique labels and specifying
+ // the selector. Failure to pick a unique label may cause this
+ // and other jobs to not function correctly. However, You may see
+ // `manualSelector=true` in jobs that were created with the old `extensions/v1beta1`
+ // API.
+ // More info: https://git.k8s.io/community/contributors/design-proposals/selector-generation.md
+ // +optional
+ ManualSelector *bool `json:"manualSelector,omitempty" protobuf:"varint,5,opt,name=manualSelector"`
+
+ // Describes the pod that will be created when executing a job.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
+ Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,6,opt,name=template"`
+}
+
+// JobStatus represents the current state of a Job.
+type JobStatus struct {
+ // The latest available observations of an object's current state.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ Conditions []JobCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
+
+ // Represents time when the job was acknowledged by the job controller.
+ // It is not guaranteed to be set in happens-before order across separate operations.
+ // It is represented in RFC3339 form and is in UTC.
+ // +optional
+ StartTime *metav1.Time `json:"startTime,omitempty" protobuf:"bytes,2,opt,name=startTime"`
+
+ // Represents time when the job was completed. It is not guaranteed to
+ // be set in happens-before order across separate operations.
+ // It is represented in RFC3339 form and is in UTC.
+ // +optional
+ CompletionTime *metav1.Time `json:"completionTime,omitempty" protobuf:"bytes,3,opt,name=completionTime"`
+
+ // The number of actively running pods.
+ // +optional
+ Active int32 `json:"active,omitempty" protobuf:"varint,4,opt,name=active"`
+
+ // The number of pods which reached phase Succeeded.
+ // +optional
+ Succeeded int32 `json:"succeeded,omitempty" protobuf:"varint,5,opt,name=succeeded"`
+
+ // The number of pods which reached phase Failed.
+ // +optional
+ Failed int32 `json:"failed,omitempty" protobuf:"varint,6,opt,name=failed"`
+}
+
+type JobConditionType string
+
+// These are valid conditions of a job.
+const (
+ // JobComplete means the job has completed its execution.
+ JobComplete JobConditionType = "Complete"
+ // JobFailed means the job has failed its execution.
+ JobFailed JobConditionType = "Failed"
+)
+
+// JobCondition describes current state of a job.
+type JobCondition struct {
+ // Type of job condition, Complete or Failed.
+ Type JobConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=JobConditionType"`
+ // Status of the condition, one of True, False, Unknown.
+ Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"`
+ // Last time the condition was checked.
+ // +optional
+ LastProbeTime metav1.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"`
+ // Last time the condition transit from one status to another.
+ // +optional
+ LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
+ // (brief) reason for the condition's last transition.
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
+ // Human readable message indicating details about last transition.
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/batch/v1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..da4985192
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/batch/v1/types_swagger_doc_generated.go
@@ -0,0 +1,93 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_Job = map[string]string{
+ "": "Job represents the configuration of a single job.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Specification of the desired behavior of a job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+ "status": "Current status of a job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (Job) SwaggerDoc() map[string]string {
+ return map_Job
+}
+
+var map_JobCondition = map[string]string{
+ "": "JobCondition describes current state of a job.",
+ "type": "Type of job condition, Complete or Failed.",
+ "status": "Status of the condition, one of True, False, Unknown.",
+ "lastProbeTime": "Last time the condition was checked.",
+ "lastTransitionTime": "Last time the condition transit from one status to another.",
+ "reason": "(brief) reason for the condition's last transition.",
+ "message": "Human readable message indicating details about last transition.",
+}
+
+func (JobCondition) SwaggerDoc() map[string]string {
+ return map_JobCondition
+}
+
+var map_JobList = map[string]string{
+ "": "JobList is a collection of jobs.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "items": "items is the list of Jobs.",
+}
+
+func (JobList) SwaggerDoc() map[string]string {
+ return map_JobList
+}
+
+var map_JobSpec = map[string]string{
+ "": "JobSpec describes how the job execution will look like.",
+ "parallelism": "Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/",
+ "completions": "Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/",
+ "activeDeadlineSeconds": "Optional duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer",
+ "selector": "A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
+ "manualSelector": "manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://git.k8s.io/community/contributors/design-proposals/selector-generation.md",
+ "template": "Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/",
+}
+
+func (JobSpec) SwaggerDoc() map[string]string {
+ return map_JobSpec
+}
+
+var map_JobStatus = map[string]string{
+ "": "JobStatus represents the current state of a Job.",
+ "conditions": "The latest available observations of an object's current state. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/",
+ "startTime": "Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.",
+ "completionTime": "Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.",
+ "active": "The number of actively running pods.",
+ "succeeded": "The number of pods which reached phase Succeeded.",
+ "failed": "The number of pods which reached phase Failed.",
+}
+
+func (JobStatus) SwaggerDoc() map[string]string {
+ return map_JobStatus
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.conversion.go
new file mode 100644
index 000000000..3e3e61dce
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.conversion.go
@@ -0,0 +1,210 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api "k8s.io/client-go/pkg/api"
+ api_v1 "k8s.io/client-go/pkg/api/v1"
+ batch "k8s.io/client-go/pkg/apis/batch"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1_Job_To_batch_Job,
+ Convert_batch_Job_To_v1_Job,
+ Convert_v1_JobCondition_To_batch_JobCondition,
+ Convert_batch_JobCondition_To_v1_JobCondition,
+ Convert_v1_JobList_To_batch_JobList,
+ Convert_batch_JobList_To_v1_JobList,
+ Convert_v1_JobSpec_To_batch_JobSpec,
+ Convert_batch_JobSpec_To_v1_JobSpec,
+ Convert_v1_JobStatus_To_batch_JobStatus,
+ Convert_batch_JobStatus_To_v1_JobStatus,
+ )
+}
+
+func autoConvert_v1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_JobSpec_To_batch_JobSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_JobStatus_To_batch_JobStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_Job_To_batch_Job is an autogenerated conversion function.
+func Convert_v1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error {
+ return autoConvert_v1_Job_To_batch_Job(in, out, s)
+}
+
+func autoConvert_batch_Job_To_v1_Job(in *batch.Job, out *Job, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_batch_JobSpec_To_v1_JobSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_batch_JobStatus_To_v1_JobStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_batch_Job_To_v1_Job is an autogenerated conversion function.
+func Convert_batch_Job_To_v1_Job(in *batch.Job, out *Job, s conversion.Scope) error {
+ return autoConvert_batch_Job_To_v1_Job(in, out, s)
+}
+
+func autoConvert_v1_JobCondition_To_batch_JobCondition(in *JobCondition, out *batch.JobCondition, s conversion.Scope) error {
+ out.Type = batch.JobConditionType(in.Type)
+ out.Status = api.ConditionStatus(in.Status)
+ out.LastProbeTime = in.LastProbeTime
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_v1_JobCondition_To_batch_JobCondition is an autogenerated conversion function.
+func Convert_v1_JobCondition_To_batch_JobCondition(in *JobCondition, out *batch.JobCondition, s conversion.Scope) error {
+ return autoConvert_v1_JobCondition_To_batch_JobCondition(in, out, s)
+}
+
+func autoConvert_batch_JobCondition_To_v1_JobCondition(in *batch.JobCondition, out *JobCondition, s conversion.Scope) error {
+ out.Type = JobConditionType(in.Type)
+ out.Status = api_v1.ConditionStatus(in.Status)
+ out.LastProbeTime = in.LastProbeTime
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_batch_JobCondition_To_v1_JobCondition is an autogenerated conversion function.
+func Convert_batch_JobCondition_To_v1_JobCondition(in *batch.JobCondition, out *JobCondition, s conversion.Scope) error {
+ return autoConvert_batch_JobCondition_To_v1_JobCondition(in, out, s)
+}
+
+func autoConvert_v1_JobList_To_batch_JobList(in *JobList, out *batch.JobList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]batch.Job, len(*in))
+ for i := range *in {
+ if err := Convert_v1_Job_To_batch_Job(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1_JobList_To_batch_JobList is an autogenerated conversion function.
+func Convert_v1_JobList_To_batch_JobList(in *JobList, out *batch.JobList, s conversion.Scope) error {
+ return autoConvert_v1_JobList_To_batch_JobList(in, out, s)
+}
+
+func autoConvert_batch_JobList_To_v1_JobList(in *batch.JobList, out *JobList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Job, len(*in))
+ for i := range *in {
+ if err := Convert_batch_Job_To_v1_Job(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]Job, 0)
+ }
+ return nil
+}
+
+// Convert_batch_JobList_To_v1_JobList is an autogenerated conversion function.
+func Convert_batch_JobList_To_v1_JobList(in *batch.JobList, out *JobList, s conversion.Scope) error {
+ return autoConvert_batch_JobList_To_v1_JobList(in, out, s)
+}
+
+func autoConvert_v1_JobSpec_To_batch_JobSpec(in *JobSpec, out *batch.JobSpec, s conversion.Scope) error {
+ out.Parallelism = (*int32)(unsafe.Pointer(in.Parallelism))
+ out.Completions = (*int32)(unsafe.Pointer(in.Completions))
+ out.ActiveDeadlineSeconds = (*int64)(unsafe.Pointer(in.ActiveDeadlineSeconds))
+ out.Selector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.Selector))
+ out.ManualSelector = (*bool)(unsafe.Pointer(in.ManualSelector))
+ if err := api_v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func autoConvert_batch_JobSpec_To_v1_JobSpec(in *batch.JobSpec, out *JobSpec, s conversion.Scope) error {
+ out.Parallelism = (*int32)(unsafe.Pointer(in.Parallelism))
+ out.Completions = (*int32)(unsafe.Pointer(in.Completions))
+ out.ActiveDeadlineSeconds = (*int64)(unsafe.Pointer(in.ActiveDeadlineSeconds))
+ out.Selector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.Selector))
+ out.ManualSelector = (*bool)(unsafe.Pointer(in.ManualSelector))
+ if err := api_v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func autoConvert_v1_JobStatus_To_batch_JobStatus(in *JobStatus, out *batch.JobStatus, s conversion.Scope) error {
+ out.Conditions = *(*[]batch.JobCondition)(unsafe.Pointer(&in.Conditions))
+ out.StartTime = (*meta_v1.Time)(unsafe.Pointer(in.StartTime))
+ out.CompletionTime = (*meta_v1.Time)(unsafe.Pointer(in.CompletionTime))
+ out.Active = in.Active
+ out.Succeeded = in.Succeeded
+ out.Failed = in.Failed
+ return nil
+}
+
+// Convert_v1_JobStatus_To_batch_JobStatus is an autogenerated conversion function.
+func Convert_v1_JobStatus_To_batch_JobStatus(in *JobStatus, out *batch.JobStatus, s conversion.Scope) error {
+ return autoConvert_v1_JobStatus_To_batch_JobStatus(in, out, s)
+}
+
+func autoConvert_batch_JobStatus_To_v1_JobStatus(in *batch.JobStatus, out *JobStatus, s conversion.Scope) error {
+ out.Conditions = *(*[]JobCondition)(unsafe.Pointer(&in.Conditions))
+ out.StartTime = (*meta_v1.Time)(unsafe.Pointer(in.StartTime))
+ out.CompletionTime = (*meta_v1.Time)(unsafe.Pointer(in.CompletionTime))
+ out.Active = in.Active
+ out.Succeeded = in.Succeeded
+ out.Failed = in.Failed
+ return nil
+}
+
+// Convert_batch_JobStatus_To_v1_JobStatus is an autogenerated conversion function.
+func Convert_batch_JobStatus_To_v1_JobStatus(in *batch.JobStatus, out *JobStatus, s conversion.Scope) error {
+ return autoConvert_batch_JobStatus_To_v1_JobStatus(in, out, s)
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..22bf94587
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.deepcopy.go
@@ -0,0 +1,167 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api_v1 "k8s.io/client-go/pkg/api/v1"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Job, InType: reflect.TypeOf(&Job{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_JobCondition, InType: reflect.TypeOf(&JobCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_JobList, InType: reflect.TypeOf(&JobList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_JobSpec, InType: reflect.TypeOf(&JobSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_JobStatus, InType: reflect.TypeOf(&JobStatus{})},
+ )
+}
+
+// DeepCopy_v1_Job is an autogenerated deepcopy function.
+func DeepCopy_v1_Job(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Job)
+ out := out.(*Job)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_JobSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1_JobStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_JobCondition is an autogenerated deepcopy function.
+func DeepCopy_v1_JobCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*JobCondition)
+ out := out.(*JobCondition)
+ *out = *in
+ out.LastProbeTime = in.LastProbeTime.DeepCopy()
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_JobList is an autogenerated deepcopy function.
+func DeepCopy_v1_JobList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*JobList)
+ out := out.(*JobList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Job, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_Job(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_JobSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_JobSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*JobSpec)
+ out := out.(*JobSpec)
+ *out = *in
+ if in.Parallelism != nil {
+ in, out := &in.Parallelism, &out.Parallelism
+ *out = new(int32)
+ **out = **in
+ }
+ if in.Completions != nil {
+ in, out := &in.Completions, &out.Completions
+ *out = new(int32)
+ **out = **in
+ }
+ if in.ActiveDeadlineSeconds != nil {
+ in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*meta_v1.LabelSelector)
+ }
+ }
+ if in.ManualSelector != nil {
+ in, out := &in.ManualSelector, &out.ManualSelector
+ *out = new(bool)
+ **out = **in
+ }
+ if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_JobStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_JobStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*JobStatus)
+ out := out.(*JobStatus)
+ *out = *in
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]JobCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_JobCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.StartTime != nil {
+ in, out := &in.StartTime, &out.StartTime
+ *out = new(meta_v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ if in.CompletionTime != nil {
+ in, out := &in.CompletionTime, &out.CompletionTime
+ *out = new(meta_v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.defaults.go
new file mode 100644
index 000000000..417024f62
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.defaults.go
@@ -0,0 +1,176 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api_v1 "k8s.io/client-go/pkg/api/v1"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ scheme.AddTypeDefaultingFunc(&Job{}, func(obj interface{}) { SetObjectDefaults_Job(obj.(*Job)) })
+ scheme.AddTypeDefaultingFunc(&JobList{}, func(obj interface{}) { SetObjectDefaults_JobList(obj.(*JobList)) })
+ return nil
+}
+
+func SetObjectDefaults_Job(in *Job) {
+ SetDefaults_Job(in)
+ api_v1.SetDefaults_PodSpec(&in.Spec.Template.Spec)
+ for i := range in.Spec.Template.Spec.Volumes {
+ a := &in.Spec.Template.Spec.Volumes[i]
+ api_v1.SetDefaults_Volume(a)
+ if a.VolumeSource.Secret != nil {
+ api_v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
+ }
+ if a.VolumeSource.ISCSI != nil {
+ api_v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
+ }
+ if a.VolumeSource.RBD != nil {
+ api_v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
+ }
+ if a.VolumeSource.DownwardAPI != nil {
+ api_v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
+ for j := range a.VolumeSource.DownwardAPI.Items {
+ b := &a.VolumeSource.DownwardAPI.Items[j]
+ if b.FieldRef != nil {
+ api_v1.SetDefaults_ObjectFieldSelector(b.FieldRef)
+ }
+ }
+ }
+ if a.VolumeSource.ConfigMap != nil {
+ api_v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
+ }
+ if a.VolumeSource.AzureDisk != nil {
+ api_v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
+ }
+ if a.VolumeSource.Projected != nil {
+ api_v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
+ for j := range a.VolumeSource.Projected.Sources {
+ b := &a.VolumeSource.Projected.Sources[j]
+ if b.DownwardAPI != nil {
+ for k := range b.DownwardAPI.Items {
+ c := &b.DownwardAPI.Items[k]
+ if c.FieldRef != nil {
+ api_v1.SetDefaults_ObjectFieldSelector(c.FieldRef)
+ }
+ }
+ }
+ }
+ }
+ if a.VolumeSource.ScaleIO != nil {
+ api_v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO)
+ }
+ }
+ for i := range in.Spec.Template.Spec.InitContainers {
+ a := &in.Spec.Template.Spec.InitContainers[i]
+ api_v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ api_v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ api_v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ api_v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ api_v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ api_v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ api_v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ api_v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ api_v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ api_v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ api_v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+ for i := range in.Spec.Template.Spec.Containers {
+ a := &in.Spec.Template.Spec.Containers[i]
+ api_v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ api_v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ api_v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ api_v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ api_v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ api_v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ api_v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ api_v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ api_v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ api_v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ api_v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+}
+
+func SetObjectDefaults_JobList(in *JobList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_Job(a)
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/conversion.go b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/conversion.go
new file mode 100644
index 000000000..2393fdca9
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/conversion.go
@@ -0,0 +1,44 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+import (
+ "fmt"
+
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) error {
+ var err error
+ // Add field label conversions for kinds having selectable nothing but ObjectMeta fields.
+ for _, k := range []string{"Job", "JobTemplate", "CronJob"} {
+ kind := k // don't close over range variables
+ err = scheme.AddFieldLabelConversionFunc("batch/v2alpha1", kind,
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "metadata.name", "metadata.namespace", "status.successful":
+ return label, value, nil
+ default:
+ return "", "", fmt.Errorf("field label %q not supported for %q", label, kind)
+ }
+ })
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/defaults.go b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/defaults.go
new file mode 100644
index 000000000..292f8886e
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/defaults.go
@@ -0,0 +1,34 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
+
+func SetDefaults_CronJob(obj *CronJob) {
+ if obj.Spec.ConcurrencyPolicy == "" {
+ obj.Spec.ConcurrencyPolicy = AllowConcurrent
+ }
+ if obj.Spec.Suspend == nil {
+ obj.Spec.Suspend = new(bool)
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/doc.go b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/doc.go
new file mode 100644
index 000000000..a9fe60b1c
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/doc.go
@@ -0,0 +1,17 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/generated.pb.go
new file mode 100644
index 000000000..28df224b8
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/generated.pb.go
@@ -0,0 +1,1511 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v2alpha1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.proto
+
+ It has these top-level messages:
+ CronJob
+ CronJobList
+ CronJobSpec
+ CronJobStatus
+ JobTemplate
+ JobTemplateSpec
+*/
+package v2alpha1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+import k8s_io_kubernetes_pkg_api_v1 "k8s.io/client-go/pkg/api/v1"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *CronJob) Reset() { *m = CronJob{} }
+func (*CronJob) ProtoMessage() {}
+func (*CronJob) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *CronJobList) Reset() { *m = CronJobList{} }
+func (*CronJobList) ProtoMessage() {}
+func (*CronJobList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *CronJobSpec) Reset() { *m = CronJobSpec{} }
+func (*CronJobSpec) ProtoMessage() {}
+func (*CronJobSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
+
+func (m *CronJobStatus) Reset() { *m = CronJobStatus{} }
+func (*CronJobStatus) ProtoMessage() {}
+func (*CronJobStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
+
+func (m *JobTemplate) Reset() { *m = JobTemplate{} }
+func (*JobTemplate) ProtoMessage() {}
+func (*JobTemplate) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
+
+func (m *JobTemplateSpec) Reset() { *m = JobTemplateSpec{} }
+func (*JobTemplateSpec) ProtoMessage() {}
+func (*JobTemplateSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
+
+func init() {
+ proto.RegisterType((*CronJob)(nil), "k8s.io.client-go.pkg.apis.batch.v2alpha1.CronJob")
+ proto.RegisterType((*CronJobList)(nil), "k8s.io.client-go.pkg.apis.batch.v2alpha1.CronJobList")
+ proto.RegisterType((*CronJobSpec)(nil), "k8s.io.client-go.pkg.apis.batch.v2alpha1.CronJobSpec")
+ proto.RegisterType((*CronJobStatus)(nil), "k8s.io.client-go.pkg.apis.batch.v2alpha1.CronJobStatus")
+ proto.RegisterType((*JobTemplate)(nil), "k8s.io.client-go.pkg.apis.batch.v2alpha1.JobTemplate")
+ proto.RegisterType((*JobTemplateSpec)(nil), "k8s.io.client-go.pkg.apis.batch.v2alpha1.JobTemplateSpec")
+}
+func (m *CronJob) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CronJob) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n2, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n3, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ return i, nil
+}
+
+func (m *CronJobList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CronJobList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n4, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *CronJobSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CronJobSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Schedule)))
+ i += copy(dAtA[i:], m.Schedule)
+ if m.StartingDeadlineSeconds != nil {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.StartingDeadlineSeconds))
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ConcurrencyPolicy)))
+ i += copy(dAtA[i:], m.ConcurrencyPolicy)
+ if m.Suspend != nil {
+ dAtA[i] = 0x20
+ i++
+ if *m.Suspend {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.JobTemplate.Size()))
+ n5, err := m.JobTemplate.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ if m.SuccessfulJobsHistoryLimit != nil {
+ dAtA[i] = 0x30
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.SuccessfulJobsHistoryLimit))
+ }
+ if m.FailedJobsHistoryLimit != nil {
+ dAtA[i] = 0x38
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.FailedJobsHistoryLimit))
+ }
+ return i, nil
+}
+
+func (m *CronJobStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CronJobStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Active) > 0 {
+ for _, msg := range m.Active {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.LastScheduleTime != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastScheduleTime.Size()))
+ n6, err := m.LastScheduleTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ }
+ return i, nil
+}
+
+func (m *JobTemplate) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *JobTemplate) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n7, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
+ n8, err := m.Template.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n8
+ return i, nil
+}
+
+func (m *JobTemplateSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *JobTemplateSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n9, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n9
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n10, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n10
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *CronJob) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *CronJobList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *CronJobSpec) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Schedule)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.StartingDeadlineSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.StartingDeadlineSeconds))
+ }
+ l = len(m.ConcurrencyPolicy)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Suspend != nil {
+ n += 2
+ }
+ l = m.JobTemplate.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.SuccessfulJobsHistoryLimit != nil {
+ n += 1 + sovGenerated(uint64(*m.SuccessfulJobsHistoryLimit))
+ }
+ if m.FailedJobsHistoryLimit != nil {
+ n += 1 + sovGenerated(uint64(*m.FailedJobsHistoryLimit))
+ }
+ return n
+}
+
+func (m *CronJobStatus) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Active) > 0 {
+ for _, e := range m.Active {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.LastScheduleTime != nil {
+ l = m.LastScheduleTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *JobTemplate) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Template.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *JobTemplateSpec) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *CronJob) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CronJob{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "CronJobSpec", "CronJobSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "CronJobStatus", "CronJobStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CronJobList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CronJobList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "CronJob", "CronJob", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CronJobSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CronJobSpec{`,
+ `Schedule:` + fmt.Sprintf("%v", this.Schedule) + `,`,
+ `StartingDeadlineSeconds:` + valueToStringGenerated(this.StartingDeadlineSeconds) + `,`,
+ `ConcurrencyPolicy:` + fmt.Sprintf("%v", this.ConcurrencyPolicy) + `,`,
+ `Suspend:` + valueToStringGenerated(this.Suspend) + `,`,
+ `JobTemplate:` + strings.Replace(strings.Replace(this.JobTemplate.String(), "JobTemplateSpec", "JobTemplateSpec", 1), `&`, ``, 1) + `,`,
+ `SuccessfulJobsHistoryLimit:` + valueToStringGenerated(this.SuccessfulJobsHistoryLimit) + `,`,
+ `FailedJobsHistoryLimit:` + valueToStringGenerated(this.FailedJobsHistoryLimit) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CronJobStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CronJobStatus{`,
+ `Active:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Active), "ObjectReference", "k8s_io_kubernetes_pkg_api_v1.ObjectReference", 1), `&`, ``, 1) + `,`,
+ `LastScheduleTime:` + strings.Replace(fmt.Sprintf("%v", this.LastScheduleTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *JobTemplate) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&JobTemplate{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Template:` + strings.Replace(strings.Replace(this.Template.String(), "JobTemplateSpec", "JobTemplateSpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *JobTemplateSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&JobTemplateSpec{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "JobSpec", "k8s_io_kubernetes_pkg_apis_batch_v1.JobSpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *CronJob) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CronJob: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CronJob: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CronJobList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CronJobList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CronJobList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, CronJob{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CronJobSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CronJobSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CronJobSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Schedule", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Schedule = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StartingDeadlineSeconds", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.StartingDeadlineSeconds = &v
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ConcurrencyPolicy", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ConcurrencyPolicy = ConcurrencyPolicy(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Suspend", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Suspend = &b
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field JobTemplate", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.JobTemplate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SuccessfulJobsHistoryLimit", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.SuccessfulJobsHistoryLimit = &v
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FailedJobsHistoryLimit", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.FailedJobsHistoryLimit = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CronJobStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CronJobStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CronJobStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Active", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Active = append(m.Active, k8s_io_kubernetes_pkg_api_v1.ObjectReference{})
+ if err := m.Active[len(m.Active)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastScheduleTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.LastScheduleTime == nil {
+ m.LastScheduleTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{}
+ }
+ if err := m.LastScheduleTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *JobTemplate) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: JobTemplate: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: JobTemplate: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *JobTemplateSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: JobTemplateSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: JobTemplateSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/client-go/pkg/apis/batch/v2alpha1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 786 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0x4d, 0x4f, 0xdb, 0x48,
+ 0x18, 0xc7, 0xe3, 0x90, 0x37, 0x26, 0xcb, 0x2e, 0x78, 0x57, 0x10, 0x65, 0x25, 0x27, 0x8a, 0xb4,
+ 0x52, 0x76, 0x05, 0xe3, 0x25, 0xac, 0x10, 0xdb, 0x5b, 0x4d, 0x55, 0xb5, 0x88, 0xbe, 0xc8, 0x01,
+ 0xb5, 0xaa, 0x50, 0xc5, 0xd8, 0x99, 0x24, 0x43, 0xfc, 0x56, 0xcf, 0x38, 0x52, 0x6e, 0xfd, 0x08,
+ 0xfd, 0x16, 0xfd, 0x16, 0xbd, 0xb4, 0x07, 0x8e, 0x1c, 0x7a, 0xa0, 0x97, 0xa8, 0xb8, 0xdf, 0xa2,
+ 0xa7, 0xca, 0x13, 0x27, 0x0e, 0x38, 0x2e, 0xa1, 0x95, 0xb8, 0x79, 0xc6, 0xcf, 0xff, 0x37, 0xcf,
+ 0xf3, 0x7f, 0x9e, 0x19, 0xf0, 0x7f, 0x6f, 0x87, 0x42, 0x62, 0xcb, 0x3d, 0x4f, 0xc3, 0xae, 0x85,
+ 0x19, 0xa6, 0xb2, 0xd3, 0xeb, 0xc8, 0xc8, 0x21, 0x54, 0xd6, 0x10, 0xd3, 0xbb, 0x72, 0xbf, 0x81,
+ 0x0c, 0xa7, 0x8b, 0x36, 0xe5, 0x0e, 0xb6, 0xb0, 0x8b, 0x18, 0x6e, 0x41, 0xc7, 0xb5, 0x99, 0x2d,
+ 0xfe, 0x3d, 0x92, 0xc2, 0x48, 0x0a, 0x9d, 0x5e, 0x07, 0x06, 0x52, 0xc8, 0xa5, 0x70, 0x2c, 0x2d,
+ 0x6f, 0x74, 0x08, 0xeb, 0x7a, 0x1a, 0xd4, 0x6d, 0x53, 0xee, 0xd8, 0x1d, 0x5b, 0xe6, 0x04, 0xcd,
+ 0x6b, 0xf3, 0x15, 0x5f, 0xf0, 0xaf, 0x11, 0xb9, 0xfc, 0x5f, 0x98, 0x14, 0x72, 0x88, 0x89, 0xf4,
+ 0x2e, 0xb1, 0xb0, 0x3b, 0x88, 0xd2, 0x32, 0x31, 0x43, 0x72, 0x3f, 0x96, 0x4f, 0x59, 0x4e, 0x52,
+ 0xb9, 0x9e, 0xc5, 0x88, 0x89, 0x63, 0x82, 0xed, 0xeb, 0x04, 0x54, 0xef, 0x62, 0x13, 0xc5, 0x74,
+ 0x5b, 0x49, 0x3a, 0x8f, 0x11, 0x43, 0x26, 0x16, 0xa3, 0xcc, 0x8d, 0x89, 0xd6, 0x13, 0x8d, 0x9e,
+ 0x55, 0xcb, 0xd6, 0xf5, 0x6d, 0x89, 0x89, 0x6a, 0x6f, 0xd3, 0x20, 0xbf, 0xeb, 0xda, 0xd6, 0x9e,
+ 0xad, 0x89, 0xc7, 0xa0, 0x10, 0xf8, 0xd4, 0x42, 0x0c, 0x95, 0x84, 0xaa, 0x50, 0x2f, 0x36, 0xfe,
+ 0x85, 0x61, 0xbf, 0xa6, 0xd3, 0x8e, 0x3a, 0x16, 0x44, 0xc3, 0xfe, 0x26, 0x7c, 0xa2, 0x9d, 0x60,
+ 0x9d, 0x3d, 0xc2, 0x0c, 0x29, 0xe2, 0xe9, 0xb0, 0x92, 0xf2, 0x87, 0x15, 0x10, 0xed, 0xa9, 0x13,
+ 0xaa, 0xf8, 0x1c, 0x64, 0xa8, 0x83, 0xf5, 0x52, 0x9a, 0xd3, 0xb7, 0xe1, 0xdc, 0xd3, 0x00, 0xc3,
+ 0x1c, 0x9b, 0x0e, 0xd6, 0x95, 0x5f, 0xc2, 0x33, 0x32, 0xc1, 0x4a, 0xe5, 0x44, 0xf1, 0x18, 0xe4,
+ 0x28, 0x43, 0xcc, 0xa3, 0xa5, 0x05, 0xce, 0xde, 0xf9, 0x01, 0x36, 0xd7, 0x2b, 0xbf, 0x86, 0xf4,
+ 0xdc, 0x68, 0xad, 0x86, 0xdc, 0xda, 0x07, 0x01, 0x14, 0xc3, 0xc8, 0x7d, 0x42, 0x99, 0x78, 0x14,
+ 0x73, 0x0b, 0xce, 0xe7, 0x56, 0xa0, 0xe6, 0x5e, 0x2d, 0x87, 0x27, 0x15, 0xc6, 0x3b, 0x53, 0x4e,
+ 0x3d, 0x03, 0x59, 0xc2, 0xb0, 0x49, 0x4b, 0xe9, 0xea, 0x42, 0xbd, 0xd8, 0x68, 0xdc, 0xbc, 0x1c,
+ 0x65, 0x29, 0xc4, 0x67, 0x1f, 0x06, 0x20, 0x75, 0xc4, 0xab, 0xbd, 0xcb, 0x4c, 0xca, 0x08, 0xec,
+ 0x13, 0xd7, 0x41, 0x21, 0x18, 0xd9, 0x96, 0x67, 0x60, 0x5e, 0xc6, 0x62, 0x94, 0x56, 0x33, 0xdc,
+ 0x57, 0x27, 0x11, 0xe2, 0x21, 0x58, 0xa3, 0x0c, 0xb9, 0x8c, 0x58, 0x9d, 0x7b, 0x18, 0xb5, 0x0c,
+ 0x62, 0xe1, 0x26, 0xd6, 0x6d, 0xab, 0x45, 0x79, 0x4f, 0x17, 0x94, 0x3f, 0xfd, 0x61, 0x65, 0xad,
+ 0x39, 0x3b, 0x44, 0x4d, 0xd2, 0x8a, 0x47, 0x60, 0x45, 0xb7, 0x2d, 0xdd, 0x73, 0x5d, 0x6c, 0xe9,
+ 0x83, 0xa7, 0xb6, 0x41, 0xf4, 0x01, 0x6f, 0xe4, 0xa2, 0x02, 0xc3, 0x6c, 0x56, 0x76, 0xaf, 0x06,
+ 0x7c, 0x9d, 0xb5, 0xa9, 0xc6, 0x41, 0xe2, 0x5f, 0x20, 0x4f, 0x3d, 0xea, 0x60, 0xab, 0x55, 0xca,
+ 0x54, 0x85, 0x7a, 0x41, 0x29, 0xfa, 0xc3, 0x4a, 0xbe, 0x39, 0xda, 0x52, 0xc7, 0xff, 0xc4, 0x57,
+ 0xa0, 0x78, 0x62, 0x6b, 0x07, 0xd8, 0x74, 0x0c, 0xc4, 0x70, 0x29, 0xcb, 0x7b, 0x7a, 0xe7, 0x06,
+ 0xc6, 0xef, 0x45, 0x6a, 0x3e, 0xa7, 0xbf, 0x87, 0xa9, 0x17, 0xa7, 0x7e, 0xa8, 0xd3, 0x67, 0x88,
+ 0x2f, 0x41, 0x99, 0x7a, 0xba, 0x8e, 0x29, 0x6d, 0x7b, 0xc6, 0x9e, 0xad, 0xd1, 0x07, 0x84, 0x32,
+ 0xdb, 0x1d, 0xec, 0x13, 0x93, 0xb0, 0x52, 0xae, 0x2a, 0xd4, 0xb3, 0x8a, 0xe4, 0x0f, 0x2b, 0xe5,
+ 0x66, 0x62, 0x94, 0xfa, 0x1d, 0x82, 0xa8, 0x82, 0xd5, 0x36, 0x22, 0x06, 0x6e, 0xc5, 0xd8, 0x79,
+ 0xce, 0x2e, 0xfb, 0xc3, 0xca, 0xea, 0xfd, 0x99, 0x11, 0x6a, 0x82, 0xb2, 0xf6, 0x51, 0x00, 0x4b,
+ 0x97, 0x6e, 0x8c, 0x78, 0x08, 0x72, 0x48, 0x67, 0xa4, 0x1f, 0x0c, 0x50, 0x30, 0xac, 0x1b, 0xc9,
+ 0x9e, 0x45, 0xaf, 0x85, 0x8a, 0xdb, 0x38, 0x68, 0x12, 0x8e, 0x2e, 0xdc, 0x5d, 0x0e, 0x51, 0x43,
+ 0x98, 0x68, 0x80, 0x65, 0x03, 0x51, 0x36, 0x9e, 0xc2, 0x03, 0x62, 0x62, 0xde, 0xbf, 0x62, 0xe3,
+ 0x9f, 0xf9, 0x2e, 0x5a, 0xa0, 0x50, 0xfe, 0xf0, 0x87, 0x95, 0xe5, 0xfd, 0x2b, 0x1c, 0x35, 0x46,
+ 0xae, 0x7d, 0x12, 0xc0, 0x74, 0x9f, 0x6e, 0xe1, 0x31, 0xec, 0x82, 0x02, 0x1b, 0x0f, 0x5b, 0xfa,
+ 0xa7, 0x87, 0x6d, 0x72, 0x6b, 0x27, 0x93, 0x36, 0xa1, 0xd7, 0xde, 0x0b, 0xe0, 0xb7, 0x2b, 0xf1,
+ 0xb7, 0x50, 0xdf, 0xe3, 0x4b, 0x8f, 0xfd, 0xfa, 0x1c, 0xb5, 0xf1, 0xaa, 0x92, 0x9e, 0x78, 0x05,
+ 0x9e, 0x5e, 0x48, 0xa9, 0xb3, 0x0b, 0x29, 0x75, 0x7e, 0x21, 0xa5, 0x5e, 0xfb, 0x92, 0x70, 0xea,
+ 0x4b, 0xc2, 0x99, 0x2f, 0x09, 0xe7, 0xbe, 0x24, 0x7c, 0xf6, 0x25, 0xe1, 0xcd, 0x17, 0x29, 0xf5,
+ 0xa2, 0x30, 0x76, 0xe8, 0x5b, 0x00, 0x00, 0x00, 0xff, 0xff, 0x88, 0x78, 0x12, 0x5b, 0xa7, 0x08,
+ 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/generated.proto
new file mode 100644
index 000000000..48509d6f5
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/generated.proto
@@ -0,0 +1,133 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.client_go.pkg.apis.batch.v2alpha1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+import "k8s.io/kubernetes/pkg/apis/batch/v1/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v2alpha1";
+
+// CronJob represents the configuration of a single cron job.
+message CronJob {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Specification of the desired behavior of a cron job, including the schedule.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional CronJobSpec spec = 2;
+
+ // Current status of a cron job.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional CronJobStatus status = 3;
+}
+
+// CronJobList is a collection of cron jobs.
+message CronJobList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // items is the list of CronJobs.
+ repeated CronJob items = 2;
+}
+
+// CronJobSpec describes how the job execution will look like and when it will actually run.
+message CronJobSpec {
+ // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
+ optional string schedule = 1;
+
+ // Optional deadline in seconds for starting the job if it misses scheduled
+ // time for any reason. Missed jobs executions will be counted as failed ones.
+ // +optional
+ optional int64 startingDeadlineSeconds = 2;
+
+ // Specifies how to treat concurrent executions of a Job.
+ // Defaults to Allow.
+ // +optional
+ optional string concurrencyPolicy = 3;
+
+ // This flag tells the controller to suspend subsequent executions, it does
+ // not apply to already started executions. Defaults to false.
+ // +optional
+ optional bool suspend = 4;
+
+ // Specifies the job that will be created when executing a CronJob.
+ optional JobTemplateSpec jobTemplate = 5;
+
+ // The number of successful finished jobs to retain.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ // +optional
+ optional int32 successfulJobsHistoryLimit = 6;
+
+ // The number of failed finished jobs to retain.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ // +optional
+ optional int32 failedJobsHistoryLimit = 7;
+}
+
+// CronJobStatus represents the current state of a cron job.
+message CronJobStatus {
+ // A list of pointers to currently running jobs.
+ // +optional
+ repeated k8s.io.client_go.pkg.api.v1.ObjectReference active = 1;
+
+ // Information when was the last time the job was successfully scheduled.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScheduleTime = 4;
+}
+
+// JobTemplate describes a template for creating copies of a predefined pod.
+message JobTemplate {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Defines jobs that will be created from this template.
+ // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional JobTemplateSpec template = 2;
+}
+
+// JobTemplateSpec describes the data a Job should have when created from a template
+message JobTemplateSpec {
+ // Standard object's metadata of the jobs created from this template.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Specification of the desired behavior of the job.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional k8s.io.client_go.pkg.apis.batch.v1.JobSpec spec = 2;
+}
+
diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/register.go b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/register.go
new file mode 100644
index 000000000..11a397820
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/register.go
@@ -0,0 +1,62 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "batch"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v2alpha1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &JobTemplate{},
+ &CronJob{},
+ &CronJobList{},
+ )
+ scheme.AddKnownTypeWithName(SchemeGroupVersion.WithKind("ScheduledJob"), &CronJob{})
+ scheme.AddKnownTypeWithName(SchemeGroupVersion.WithKind("ScheduledJobList"), &CronJobList{})
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/types.generated.go
new file mode 100644
index 000000000..9e72e7d22
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/types.generated.go
@@ -0,0 +1,2525 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v2alpha1
+
+import (
+ "errors"
+ "fmt"
+ 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"
+ pkg6_intstr "k8s.io/apimachinery/pkg/util/intstr"
+ pkg4_v1 "k8s.io/client-go/pkg/api/v1"
+ pkg3_v1 "k8s.io/client-go/pkg/apis/batch/v1"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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 pkg5_resource.Quantity
+ var v1 pkg1_v1.TypeMeta
+ var v2 pkg2_types.UID
+ var v3 pkg6_intstr.IntOrString
+ var v4 pkg4_v1.PodTemplateSpec
+ var v5 pkg3_v1.JobSpec
+ var v6 time.Time
+ _, _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5, v6
+ }
+}
+
+func (x *JobTemplate) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = true
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Template
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("template"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Template
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *JobTemplate) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *JobTemplate) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "template":
+ if r.TryDecodeAsNil() {
+ x.Template = JobTemplateSpec{}
+ } else {
+ yyv10 := &x.Template
+ yyv10.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *JobTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv12 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv14 := &x.APIVersion
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg1_v1.ObjectMeta{}
+ } else {
+ yyv16 := &x.ObjectMeta
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv16) {
+ } else {
+ z.DecFallback(yyv16, false)
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Template = JobTemplateSpec{}
+ } else {
+ yyv18 := &x.Template
+ yyv18.CodecDecodeSelf(d)
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *JobTemplateSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[1] {
+ yy9 := &x.Spec
+ yy9.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy11 := &x.Spec
+ yy11.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *JobTemplateSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *JobTemplateSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg3_v1.JobSpec{}
+ } else {
+ yyv6 := &x.Spec
+ yyv6.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *JobTemplateSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = pkg3_v1.JobSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *CronJob) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CronJob) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CronJob) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = CronJobSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = CronJobStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CronJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = CronJobSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = CronJobStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *CronJobList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceCronJob(([]CronJob)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceCronJob(([]CronJob)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CronJobList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CronJobList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceCronJob((*[]CronJob)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CronJobList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceCronJob((*[]CronJob)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *CronJobSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [7]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[1] = x.StartingDeadlineSeconds != nil
+ yyq2[2] = x.ConcurrencyPolicy != ""
+ yyq2[3] = x.Suspend != nil
+ yyq2[5] = x.SuccessfulJobsHistoryLimit != nil
+ yyq2[6] = x.FailedJobsHistoryLimit != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(7)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Schedule))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("schedule"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Schedule))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.StartingDeadlineSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy7 := *x.StartingDeadlineSeconds
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(yy7))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("startingDeadlineSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.StartingDeadlineSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.StartingDeadlineSeconds
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(yy9))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ x.ConcurrencyPolicy.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("concurrencyPolicy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.ConcurrencyPolicy.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Suspend == nil {
+ r.EncodeNil()
+ } else {
+ yy15 := *x.Suspend
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeBool(bool(yy15))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("suspend"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Suspend == nil {
+ r.EncodeNil()
+ } else {
+ yy17 := *x.Suspend
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeBool(bool(yy17))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy20 := &x.JobTemplate
+ yy20.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("jobTemplate"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.JobTemplate
+ yy22.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.SuccessfulJobsHistoryLimit == nil {
+ r.EncodeNil()
+ } else {
+ yy25 := *x.SuccessfulJobsHistoryLimit
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeInt(int64(yy25))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("successfulJobsHistoryLimit"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SuccessfulJobsHistoryLimit == nil {
+ r.EncodeNil()
+ } else {
+ yy27 := *x.SuccessfulJobsHistoryLimit
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeInt(int64(yy27))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.FailedJobsHistoryLimit == nil {
+ r.EncodeNil()
+ } else {
+ yy30 := *x.FailedJobsHistoryLimit
+ yym31 := z.EncBinary()
+ _ = yym31
+ if false {
+ } else {
+ r.EncodeInt(int64(yy30))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("failedJobsHistoryLimit"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.FailedJobsHistoryLimit == nil {
+ r.EncodeNil()
+ } else {
+ yy32 := *x.FailedJobsHistoryLimit
+ yym33 := z.EncBinary()
+ _ = yym33
+ if false {
+ } else {
+ r.EncodeInt(int64(yy32))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CronJobSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CronJobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "schedule":
+ if r.TryDecodeAsNil() {
+ x.Schedule = ""
+ } else {
+ yyv4 := &x.Schedule
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "startingDeadlineSeconds":
+ if r.TryDecodeAsNil() {
+ if x.StartingDeadlineSeconds != nil {
+ x.StartingDeadlineSeconds = nil
+ }
+ } else {
+ if x.StartingDeadlineSeconds == nil {
+ x.StartingDeadlineSeconds = new(int64)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int64)(x.StartingDeadlineSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "concurrencyPolicy":
+ if r.TryDecodeAsNil() {
+ x.ConcurrencyPolicy = ""
+ } else {
+ yyv8 := &x.ConcurrencyPolicy
+ yyv8.CodecDecodeSelf(d)
+ }
+ case "suspend":
+ if r.TryDecodeAsNil() {
+ if x.Suspend != nil {
+ x.Suspend = nil
+ }
+ } else {
+ if x.Suspend == nil {
+ x.Suspend = new(bool)
+ }
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ *((*bool)(x.Suspend)) = r.DecodeBool()
+ }
+ }
+ case "jobTemplate":
+ if r.TryDecodeAsNil() {
+ x.JobTemplate = JobTemplateSpec{}
+ } else {
+ yyv11 := &x.JobTemplate
+ yyv11.CodecDecodeSelf(d)
+ }
+ case "successfulJobsHistoryLimit":
+ if r.TryDecodeAsNil() {
+ if x.SuccessfulJobsHistoryLimit != nil {
+ x.SuccessfulJobsHistoryLimit = nil
+ }
+ } else {
+ if x.SuccessfulJobsHistoryLimit == nil {
+ x.SuccessfulJobsHistoryLimit = new(int32)
+ }
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int32)(x.SuccessfulJobsHistoryLimit)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "failedJobsHistoryLimit":
+ if r.TryDecodeAsNil() {
+ if x.FailedJobsHistoryLimit != nil {
+ x.FailedJobsHistoryLimit = nil
+ }
+ } else {
+ if x.FailedJobsHistoryLimit == nil {
+ x.FailedJobsHistoryLimit = new(int32)
+ }
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*int32)(x.FailedJobsHistoryLimit)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CronJobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj16 int
+ var yyb16 bool
+ var yyhl16 bool = l >= 0
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Schedule = ""
+ } else {
+ yyv17 := &x.Schedule
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.StartingDeadlineSeconds != nil {
+ x.StartingDeadlineSeconds = nil
+ }
+ } else {
+ if x.StartingDeadlineSeconds == nil {
+ x.StartingDeadlineSeconds = new(int64)
+ }
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*int64)(x.StartingDeadlineSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ConcurrencyPolicy = ""
+ } else {
+ yyv21 := &x.ConcurrencyPolicy
+ yyv21.CodecDecodeSelf(d)
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Suspend != nil {
+ x.Suspend = nil
+ }
+ } else {
+ if x.Suspend == nil {
+ x.Suspend = new(bool)
+ }
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else {
+ *((*bool)(x.Suspend)) = r.DecodeBool()
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.JobTemplate = JobTemplateSpec{}
+ } else {
+ yyv24 := &x.JobTemplate
+ yyv24.CodecDecodeSelf(d)
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SuccessfulJobsHistoryLimit != nil {
+ x.SuccessfulJobsHistoryLimit = nil
+ }
+ } else {
+ if x.SuccessfulJobsHistoryLimit == nil {
+ x.SuccessfulJobsHistoryLimit = new(int32)
+ }
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*int32)(x.SuccessfulJobsHistoryLimit)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FailedJobsHistoryLimit != nil {
+ x.FailedJobsHistoryLimit = nil
+ }
+ } else {
+ if x.FailedJobsHistoryLimit == nil {
+ x.FailedJobsHistoryLimit = new(int32)
+ }
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*int32)(x.FailedJobsHistoryLimit)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj16-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x ConcurrencyPolicy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *ConcurrencyPolicy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *CronJobStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Active) != 0
+ yyq2[1] = x.LastScheduleTime != 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Active == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSlicev1_ObjectReference(([]pkg4_v1.ObjectReference)(x.Active), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("active"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Active == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSlicev1_ObjectReference(([]pkg4_v1.ObjectReference)(x.Active), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.LastScheduleTime == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.LastScheduleTime) {
+ } else if yym7 {
+ z.EncBinaryMarshal(x.LastScheduleTime)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.LastScheduleTime)
+ } else {
+ z.EncFallback(x.LastScheduleTime)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastScheduleTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.LastScheduleTime == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.LastScheduleTime) {
+ } else if yym8 {
+ z.EncBinaryMarshal(x.LastScheduleTime)
+ } else if !yym8 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.LastScheduleTime)
+ } else {
+ z.EncFallback(x.LastScheduleTime)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CronJobStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CronJobStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "active":
+ if r.TryDecodeAsNil() {
+ x.Active = nil
+ } else {
+ yyv4 := &x.Active
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSlicev1_ObjectReference((*[]pkg4_v1.ObjectReference)(yyv4), d)
+ }
+ }
+ case "lastScheduleTime":
+ if r.TryDecodeAsNil() {
+ if x.LastScheduleTime != nil {
+ x.LastScheduleTime = nil
+ }
+ } else {
+ if x.LastScheduleTime == nil {
+ x.LastScheduleTime = new(pkg1_v1.Time)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.LastScheduleTime) {
+ } else if yym7 {
+ z.DecBinaryUnmarshal(x.LastScheduleTime)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.LastScheduleTime)
+ } else {
+ z.DecFallback(x.LastScheduleTime, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CronJobStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Active = nil
+ } else {
+ yyv9 := &x.Active
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSlicev1_ObjectReference((*[]pkg4_v1.ObjectReference)(yyv9), d)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.LastScheduleTime != nil {
+ x.LastScheduleTime = nil
+ }
+ } else {
+ if x.LastScheduleTime == nil {
+ x.LastScheduleTime = new(pkg1_v1.Time)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.LastScheduleTime) {
+ } else if yym12 {
+ z.DecBinaryUnmarshal(x.LastScheduleTime)
+ } else if !yym12 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.LastScheduleTime)
+ } else {
+ z.DecFallback(x.LastScheduleTime, false)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encSliceCronJob(v []CronJob, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceCronJob(v *[]CronJob, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []CronJob{}
+ 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, 1192)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]CronJob, yyrl1)
+ }
+ } else {
+ yyv1 = make([]CronJob, 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] = CronJob{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, CronJob{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = CronJob{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, CronJob{}) // var yyz1 CronJob
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = CronJob{}
+ } 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 = []CronJob{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSlicev1_ObjectReference(v []pkg4_v1.ObjectReference, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicev1_ObjectReference(v *[]pkg4_v1.ObjectReference, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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.ObjectReference{}
+ 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, 112)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]pkg4_v1.ObjectReference, yyrl1)
+ }
+ } else {
+ yyv1 = make([]pkg4_v1.ObjectReference, 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.ObjectReference{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, pkg4_v1.ObjectReference{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = pkg4_v1.ObjectReference{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, pkg4_v1.ObjectReference{}) // var yyz1 pkg4_v1.ObjectReference
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = pkg4_v1.ObjectReference{}
+ } 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.ObjectReference{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/types.go b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/types.go
new file mode 100644
index 000000000..d5b3c487f
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/types.go
@@ -0,0 +1,148 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/client-go/pkg/api/v1"
+ batchv1 "k8s.io/client-go/pkg/apis/batch/v1"
+)
+
+// JobTemplate describes a template for creating copies of a predefined pod.
+type JobTemplate struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Defines jobs that will be created from this template.
+ // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Template JobTemplateSpec `json:"template,omitempty" protobuf:"bytes,2,opt,name=template"`
+}
+
+// JobTemplateSpec describes the data a Job should have when created from a template
+type JobTemplateSpec struct {
+ // Standard object's metadata of the jobs created from this template.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Specification of the desired behavior of the job.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec batchv1.JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+}
+
+// +genclient=true
+
+// CronJob represents the configuration of a single cron job.
+type CronJob struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Specification of the desired behavior of a cron job, including the schedule.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec CronJobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Current status of a cron job.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status CronJobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// CronJobList is a collection of cron jobs.
+type CronJobList struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // items is the list of CronJobs.
+ Items []CronJob `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// CronJobSpec describes how the job execution will look like and when it will actually run.
+type CronJobSpec struct {
+
+ // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
+ Schedule string `json:"schedule" protobuf:"bytes,1,opt,name=schedule"`
+
+ // Optional deadline in seconds for starting the job if it misses scheduled
+ // time for any reason. Missed jobs executions will be counted as failed ones.
+ // +optional
+ StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty" protobuf:"varint,2,opt,name=startingDeadlineSeconds"`
+
+ // Specifies how to treat concurrent executions of a Job.
+ // Defaults to Allow.
+ // +optional
+ ConcurrencyPolicy ConcurrencyPolicy `json:"concurrencyPolicy,omitempty" protobuf:"bytes,3,opt,name=concurrencyPolicy,casttype=ConcurrencyPolicy"`
+
+ // This flag tells the controller to suspend subsequent executions, it does
+ // not apply to already started executions. Defaults to false.
+ // +optional
+ Suspend *bool `json:"suspend,omitempty" protobuf:"varint,4,opt,name=suspend"`
+
+ // Specifies the job that will be created when executing a CronJob.
+ JobTemplate JobTemplateSpec `json:"jobTemplate" protobuf:"bytes,5,opt,name=jobTemplate"`
+
+ // The number of successful finished jobs to retain.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ // +optional
+ SuccessfulJobsHistoryLimit *int32 `json:"successfulJobsHistoryLimit,omitempty" protobuf:"varint,6,opt,name=successfulJobsHistoryLimit"`
+
+ // The number of failed finished jobs to retain.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ // +optional
+ FailedJobsHistoryLimit *int32 `json:"failedJobsHistoryLimit,omitempty" protobuf:"varint,7,opt,name=failedJobsHistoryLimit"`
+}
+
+// ConcurrencyPolicy describes how the job will be handled.
+// Only one of the following concurrent policies may be specified.
+// If none of the following policies is specified, the default one
+// is AllowConcurrent.
+type ConcurrencyPolicy string
+
+const (
+ // AllowConcurrent allows CronJobs to run concurrently.
+ AllowConcurrent ConcurrencyPolicy = "Allow"
+
+ // ForbidConcurrent forbids concurrent runs, skipping next run if previous
+ // hasn't finished yet.
+ ForbidConcurrent ConcurrencyPolicy = "Forbid"
+
+ // ReplaceConcurrent cancels currently running job and replaces it with a new one.
+ ReplaceConcurrent ConcurrencyPolicy = "Replace"
+)
+
+// CronJobStatus represents the current state of a cron job.
+type CronJobStatus struct {
+ // A list of pointers to currently running jobs.
+ // +optional
+ Active []v1.ObjectReference `json:"active,omitempty" protobuf:"bytes,1,rep,name=active"`
+
+ // Information when was the last time the job was successfully scheduled.
+ // +optional
+ LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty" protobuf:"bytes,4,opt,name=lastScheduleTime"`
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..2b3ed4c56
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/types_swagger_doc_generated.go
@@ -0,0 +1,96 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_CronJob = map[string]string{
+ "": "CronJob represents the configuration of a single cron job.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+ "status": "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (CronJob) SwaggerDoc() map[string]string {
+ return map_CronJob
+}
+
+var map_CronJobList = map[string]string{
+ "": "CronJobList is a collection of cron jobs.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "items": "items is the list of CronJobs.",
+}
+
+func (CronJobList) SwaggerDoc() map[string]string {
+ return map_CronJobList
+}
+
+var map_CronJobSpec = map[string]string{
+ "": "CronJobSpec describes how the job execution will look like and when it will actually run.",
+ "schedule": "The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.",
+ "startingDeadlineSeconds": "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.",
+ "concurrencyPolicy": "Specifies how to treat concurrent executions of a Job. Defaults to Allow.",
+ "suspend": "This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.",
+ "jobTemplate": "Specifies the job that will be created when executing a CronJob.",
+ "successfulJobsHistoryLimit": "The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.",
+ "failedJobsHistoryLimit": "The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.",
+}
+
+func (CronJobSpec) SwaggerDoc() map[string]string {
+ return map_CronJobSpec
+}
+
+var map_CronJobStatus = map[string]string{
+ "": "CronJobStatus represents the current state of a cron job.",
+ "active": "A list of pointers to currently running jobs.",
+ "lastScheduleTime": "Information when was the last time the job was successfully scheduled.",
+}
+
+func (CronJobStatus) SwaggerDoc() map[string]string {
+ return map_CronJobStatus
+}
+
+var map_JobTemplate = map[string]string{
+ "": "JobTemplate describes a template for creating copies of a predefined pod.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "template": "Defines jobs that will be created from this template. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (JobTemplate) SwaggerDoc() map[string]string {
+ return map_JobTemplate
+}
+
+var map_JobTemplateSpec = map[string]string{
+ "": "JobTemplateSpec describes the data a Job should have when created from a template",
+ "metadata": "Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (JobTemplateSpec) SwaggerDoc() map[string]string {
+ return map_JobTemplateSpec
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.conversion.go
new file mode 100644
index 000000000..b422c4658
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.conversion.go
@@ -0,0 +1,239 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v2alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api "k8s.io/client-go/pkg/api"
+ api_v1 "k8s.io/client-go/pkg/api/v1"
+ batch "k8s.io/client-go/pkg/apis/batch"
+ batch_v1 "k8s.io/client-go/pkg/apis/batch/v1"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v2alpha1_CronJob_To_batch_CronJob,
+ Convert_batch_CronJob_To_v2alpha1_CronJob,
+ Convert_v2alpha1_CronJobList_To_batch_CronJobList,
+ Convert_batch_CronJobList_To_v2alpha1_CronJobList,
+ Convert_v2alpha1_CronJobSpec_To_batch_CronJobSpec,
+ Convert_batch_CronJobSpec_To_v2alpha1_CronJobSpec,
+ Convert_v2alpha1_CronJobStatus_To_batch_CronJobStatus,
+ Convert_batch_CronJobStatus_To_v2alpha1_CronJobStatus,
+ Convert_v2alpha1_JobTemplate_To_batch_JobTemplate,
+ Convert_batch_JobTemplate_To_v2alpha1_JobTemplate,
+ Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec,
+ Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec,
+ )
+}
+
+func autoConvert_v2alpha1_CronJob_To_batch_CronJob(in *CronJob, out *batch.CronJob, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v2alpha1_CronJobSpec_To_batch_CronJobSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v2alpha1_CronJobStatus_To_batch_CronJobStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v2alpha1_CronJob_To_batch_CronJob is an autogenerated conversion function.
+func Convert_v2alpha1_CronJob_To_batch_CronJob(in *CronJob, out *batch.CronJob, s conversion.Scope) error {
+ return autoConvert_v2alpha1_CronJob_To_batch_CronJob(in, out, s)
+}
+
+func autoConvert_batch_CronJob_To_v2alpha1_CronJob(in *batch.CronJob, out *CronJob, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_batch_CronJobSpec_To_v2alpha1_CronJobSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_batch_CronJobStatus_To_v2alpha1_CronJobStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_batch_CronJob_To_v2alpha1_CronJob is an autogenerated conversion function.
+func Convert_batch_CronJob_To_v2alpha1_CronJob(in *batch.CronJob, out *CronJob, s conversion.Scope) error {
+ return autoConvert_batch_CronJob_To_v2alpha1_CronJob(in, out, s)
+}
+
+func autoConvert_v2alpha1_CronJobList_To_batch_CronJobList(in *CronJobList, out *batch.CronJobList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]batch.CronJob, len(*in))
+ for i := range *in {
+ if err := Convert_v2alpha1_CronJob_To_batch_CronJob(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v2alpha1_CronJobList_To_batch_CronJobList is an autogenerated conversion function.
+func Convert_v2alpha1_CronJobList_To_batch_CronJobList(in *CronJobList, out *batch.CronJobList, s conversion.Scope) error {
+ return autoConvert_v2alpha1_CronJobList_To_batch_CronJobList(in, out, s)
+}
+
+func autoConvert_batch_CronJobList_To_v2alpha1_CronJobList(in *batch.CronJobList, out *CronJobList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]CronJob, len(*in))
+ for i := range *in {
+ if err := Convert_batch_CronJob_To_v2alpha1_CronJob(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]CronJob, 0)
+ }
+ return nil
+}
+
+// Convert_batch_CronJobList_To_v2alpha1_CronJobList is an autogenerated conversion function.
+func Convert_batch_CronJobList_To_v2alpha1_CronJobList(in *batch.CronJobList, out *CronJobList, s conversion.Scope) error {
+ return autoConvert_batch_CronJobList_To_v2alpha1_CronJobList(in, out, s)
+}
+
+func autoConvert_v2alpha1_CronJobSpec_To_batch_CronJobSpec(in *CronJobSpec, out *batch.CronJobSpec, s conversion.Scope) error {
+ out.Schedule = in.Schedule
+ out.StartingDeadlineSeconds = (*int64)(unsafe.Pointer(in.StartingDeadlineSeconds))
+ out.ConcurrencyPolicy = batch.ConcurrencyPolicy(in.ConcurrencyPolicy)
+ out.Suspend = (*bool)(unsafe.Pointer(in.Suspend))
+ if err := Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, s); err != nil {
+ return err
+ }
+ out.SuccessfulJobsHistoryLimit = (*int32)(unsafe.Pointer(in.SuccessfulJobsHistoryLimit))
+ out.FailedJobsHistoryLimit = (*int32)(unsafe.Pointer(in.FailedJobsHistoryLimit))
+ return nil
+}
+
+// Convert_v2alpha1_CronJobSpec_To_batch_CronJobSpec is an autogenerated conversion function.
+func Convert_v2alpha1_CronJobSpec_To_batch_CronJobSpec(in *CronJobSpec, out *batch.CronJobSpec, s conversion.Scope) error {
+ return autoConvert_v2alpha1_CronJobSpec_To_batch_CronJobSpec(in, out, s)
+}
+
+func autoConvert_batch_CronJobSpec_To_v2alpha1_CronJobSpec(in *batch.CronJobSpec, out *CronJobSpec, s conversion.Scope) error {
+ out.Schedule = in.Schedule
+ out.StartingDeadlineSeconds = (*int64)(unsafe.Pointer(in.StartingDeadlineSeconds))
+ out.ConcurrencyPolicy = ConcurrencyPolicy(in.ConcurrencyPolicy)
+ out.Suspend = (*bool)(unsafe.Pointer(in.Suspend))
+ if err := Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, s); err != nil {
+ return err
+ }
+ out.SuccessfulJobsHistoryLimit = (*int32)(unsafe.Pointer(in.SuccessfulJobsHistoryLimit))
+ out.FailedJobsHistoryLimit = (*int32)(unsafe.Pointer(in.FailedJobsHistoryLimit))
+ return nil
+}
+
+// Convert_batch_CronJobSpec_To_v2alpha1_CronJobSpec is an autogenerated conversion function.
+func Convert_batch_CronJobSpec_To_v2alpha1_CronJobSpec(in *batch.CronJobSpec, out *CronJobSpec, s conversion.Scope) error {
+ return autoConvert_batch_CronJobSpec_To_v2alpha1_CronJobSpec(in, out, s)
+}
+
+func autoConvert_v2alpha1_CronJobStatus_To_batch_CronJobStatus(in *CronJobStatus, out *batch.CronJobStatus, s conversion.Scope) error {
+ out.Active = *(*[]api.ObjectReference)(unsafe.Pointer(&in.Active))
+ out.LastScheduleTime = (*v1.Time)(unsafe.Pointer(in.LastScheduleTime))
+ return nil
+}
+
+// Convert_v2alpha1_CronJobStatus_To_batch_CronJobStatus is an autogenerated conversion function.
+func Convert_v2alpha1_CronJobStatus_To_batch_CronJobStatus(in *CronJobStatus, out *batch.CronJobStatus, s conversion.Scope) error {
+ return autoConvert_v2alpha1_CronJobStatus_To_batch_CronJobStatus(in, out, s)
+}
+
+func autoConvert_batch_CronJobStatus_To_v2alpha1_CronJobStatus(in *batch.CronJobStatus, out *CronJobStatus, s conversion.Scope) error {
+ out.Active = *(*[]api_v1.ObjectReference)(unsafe.Pointer(&in.Active))
+ out.LastScheduleTime = (*v1.Time)(unsafe.Pointer(in.LastScheduleTime))
+ return nil
+}
+
+// Convert_batch_CronJobStatus_To_v2alpha1_CronJobStatus is an autogenerated conversion function.
+func Convert_batch_CronJobStatus_To_v2alpha1_CronJobStatus(in *batch.CronJobStatus, out *CronJobStatus, s conversion.Scope) error {
+ return autoConvert_batch_CronJobStatus_To_v2alpha1_CronJobStatus(in, out, s)
+}
+
+func autoConvert_v2alpha1_JobTemplate_To_batch_JobTemplate(in *JobTemplate, out *batch.JobTemplate, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v2alpha1_JobTemplate_To_batch_JobTemplate is an autogenerated conversion function.
+func Convert_v2alpha1_JobTemplate_To_batch_JobTemplate(in *JobTemplate, out *batch.JobTemplate, s conversion.Scope) error {
+ return autoConvert_v2alpha1_JobTemplate_To_batch_JobTemplate(in, out, s)
+}
+
+func autoConvert_batch_JobTemplate_To_v2alpha1_JobTemplate(in *batch.JobTemplate, out *JobTemplate, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_batch_JobTemplate_To_v2alpha1_JobTemplate is an autogenerated conversion function.
+func Convert_batch_JobTemplate_To_v2alpha1_JobTemplate(in *batch.JobTemplate, out *JobTemplate, s conversion.Scope) error {
+ return autoConvert_batch_JobTemplate_To_v2alpha1_JobTemplate(in, out, s)
+}
+
+func autoConvert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(in *JobTemplateSpec, out *batch.JobTemplateSpec, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := batch_v1.Convert_v1_JobSpec_To_batch_JobSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec is an autogenerated conversion function.
+func Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(in *JobTemplateSpec, out *batch.JobTemplateSpec, s conversion.Scope) error {
+ return autoConvert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(in, out, s)
+}
+
+func autoConvert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(in *batch.JobTemplateSpec, out *JobTemplateSpec, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := batch_v1.Convert_batch_JobSpec_To_v1_JobSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec is an autogenerated conversion function.
+func Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(in *batch.JobTemplateSpec, out *JobTemplateSpec, s conversion.Scope) error {
+ return autoConvert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(in, out, s)
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..9442a216d
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go
@@ -0,0 +1,176 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v2alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api_v1 "k8s.io/client-go/pkg/api/v1"
+ batch_v1 "k8s.io/client-go/pkg/apis/batch/v1"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_CronJob, InType: reflect.TypeOf(&CronJob{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_CronJobList, InType: reflect.TypeOf(&CronJobList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_CronJobSpec, InType: reflect.TypeOf(&CronJobSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_CronJobStatus, InType: reflect.TypeOf(&CronJobStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_JobTemplate, InType: reflect.TypeOf(&JobTemplate{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_JobTemplateSpec, InType: reflect.TypeOf(&JobTemplateSpec{})},
+ )
+}
+
+// DeepCopy_v2alpha1_CronJob is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_CronJob(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CronJob)
+ out := out.(*CronJob)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v2alpha1_CronJobSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v2alpha1_CronJobStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_CronJobList is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_CronJobList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CronJobList)
+ out := out.(*CronJobList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]CronJob, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v2alpha1_CronJob(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_CronJobSpec is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_CronJobSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CronJobSpec)
+ out := out.(*CronJobSpec)
+ *out = *in
+ if in.StartingDeadlineSeconds != nil {
+ in, out := &in.StartingDeadlineSeconds, &out.StartingDeadlineSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.Suspend != nil {
+ in, out := &in.Suspend, &out.Suspend
+ *out = new(bool)
+ **out = **in
+ }
+ if err := DeepCopy_v2alpha1_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, c); err != nil {
+ return err
+ }
+ if in.SuccessfulJobsHistoryLimit != nil {
+ in, out := &in.SuccessfulJobsHistoryLimit, &out.SuccessfulJobsHistoryLimit
+ *out = new(int32)
+ **out = **in
+ }
+ if in.FailedJobsHistoryLimit != nil {
+ in, out := &in.FailedJobsHistoryLimit, &out.FailedJobsHistoryLimit
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_CronJobStatus is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_CronJobStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CronJobStatus)
+ out := out.(*CronJobStatus)
+ *out = *in
+ if in.Active != nil {
+ in, out := &in.Active, &out.Active
+ *out = make([]api_v1.ObjectReference, len(*in))
+ copy(*out, *in)
+ }
+ if in.LastScheduleTime != nil {
+ in, out := &in.LastScheduleTime, &out.LastScheduleTime
+ *out = new(v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_JobTemplate is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_JobTemplate(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*JobTemplate)
+ out := out.(*JobTemplate)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v2alpha1_JobTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_JobTemplateSpec is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_JobTemplateSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*JobTemplateSpec)
+ out := out.(*JobTemplateSpec)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := batch_v1.DeepCopy_v1_JobSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.defaults.go
new file mode 100644
index 000000000..1c0bd0ee0
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.defaults.go
@@ -0,0 +1,310 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v2alpha1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ v1 "k8s.io/client-go/pkg/api/v1"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ scheme.AddTypeDefaultingFunc(&CronJob{}, func(obj interface{}) { SetObjectDefaults_CronJob(obj.(*CronJob)) })
+ scheme.AddTypeDefaultingFunc(&CronJobList{}, func(obj interface{}) { SetObjectDefaults_CronJobList(obj.(*CronJobList)) })
+ scheme.AddTypeDefaultingFunc(&JobTemplate{}, func(obj interface{}) { SetObjectDefaults_JobTemplate(obj.(*JobTemplate)) })
+ return nil
+}
+
+func SetObjectDefaults_CronJob(in *CronJob) {
+ SetDefaults_CronJob(in)
+ v1.SetDefaults_PodSpec(&in.Spec.JobTemplate.Spec.Template.Spec)
+ for i := range in.Spec.JobTemplate.Spec.Template.Spec.Volumes {
+ a := &in.Spec.JobTemplate.Spec.Template.Spec.Volumes[i]
+ v1.SetDefaults_Volume(a)
+ if a.VolumeSource.Secret != nil {
+ v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
+ }
+ if a.VolumeSource.ISCSI != nil {
+ v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
+ }
+ if a.VolumeSource.RBD != nil {
+ v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
+ }
+ if a.VolumeSource.DownwardAPI != nil {
+ v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
+ for j := range a.VolumeSource.DownwardAPI.Items {
+ b := &a.VolumeSource.DownwardAPI.Items[j]
+ if b.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.FieldRef)
+ }
+ }
+ }
+ if a.VolumeSource.ConfigMap != nil {
+ v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
+ }
+ if a.VolumeSource.AzureDisk != nil {
+ v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
+ }
+ if a.VolumeSource.Projected != nil {
+ v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
+ for j := range a.VolumeSource.Projected.Sources {
+ b := &a.VolumeSource.Projected.Sources[j]
+ if b.DownwardAPI != nil {
+ for k := range b.DownwardAPI.Items {
+ c := &b.DownwardAPI.Items[k]
+ if c.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(c.FieldRef)
+ }
+ }
+ }
+ }
+ }
+ if a.VolumeSource.ScaleIO != nil {
+ v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO)
+ }
+ }
+ for i := range in.Spec.JobTemplate.Spec.Template.Spec.InitContainers {
+ a := &in.Spec.JobTemplate.Spec.Template.Spec.InitContainers[i]
+ v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+ for i := range in.Spec.JobTemplate.Spec.Template.Spec.Containers {
+ a := &in.Spec.JobTemplate.Spec.Template.Spec.Containers[i]
+ v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+}
+
+func SetObjectDefaults_CronJobList(in *CronJobList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_CronJob(a)
+ }
+}
+
+func SetObjectDefaults_JobTemplate(in *JobTemplate) {
+ v1.SetDefaults_PodSpec(&in.Template.Spec.Template.Spec)
+ for i := range in.Template.Spec.Template.Spec.Volumes {
+ a := &in.Template.Spec.Template.Spec.Volumes[i]
+ v1.SetDefaults_Volume(a)
+ if a.VolumeSource.Secret != nil {
+ v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
+ }
+ if a.VolumeSource.ISCSI != nil {
+ v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
+ }
+ if a.VolumeSource.RBD != nil {
+ v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
+ }
+ if a.VolumeSource.DownwardAPI != nil {
+ v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
+ for j := range a.VolumeSource.DownwardAPI.Items {
+ b := &a.VolumeSource.DownwardAPI.Items[j]
+ if b.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.FieldRef)
+ }
+ }
+ }
+ if a.VolumeSource.ConfigMap != nil {
+ v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
+ }
+ if a.VolumeSource.AzureDisk != nil {
+ v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
+ }
+ if a.VolumeSource.Projected != nil {
+ v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
+ for j := range a.VolumeSource.Projected.Sources {
+ b := &a.VolumeSource.Projected.Sources[j]
+ if b.DownwardAPI != nil {
+ for k := range b.DownwardAPI.Items {
+ c := &b.DownwardAPI.Items[k]
+ if c.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(c.FieldRef)
+ }
+ }
+ }
+ }
+ }
+ if a.VolumeSource.ScaleIO != nil {
+ v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO)
+ }
+ }
+ for i := range in.Template.Spec.Template.Spec.InitContainers {
+ a := &in.Template.Spec.Template.Spec.InitContainers[i]
+ v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+ for i := range in.Template.Spec.Template.Spec.Containers {
+ a := &in.Template.Spec.Template.Spec.Containers[i]
+ v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/batch/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/batch/zz_generated.deepcopy.go
new file mode 100644
index 000000000..4f07dbce1
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/batch/zz_generated.deepcopy.go
@@ -0,0 +1,302 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package batch
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api "k8s.io/client-go/pkg/api"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_CronJob, InType: reflect.TypeOf(&CronJob{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_CronJobList, InType: reflect.TypeOf(&CronJobList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_CronJobSpec, InType: reflect.TypeOf(&CronJobSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_CronJobStatus, InType: reflect.TypeOf(&CronJobStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_Job, InType: reflect.TypeOf(&Job{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_JobCondition, InType: reflect.TypeOf(&JobCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_JobList, InType: reflect.TypeOf(&JobList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_JobSpec, InType: reflect.TypeOf(&JobSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_JobStatus, InType: reflect.TypeOf(&JobStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_JobTemplate, InType: reflect.TypeOf(&JobTemplate{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_JobTemplateSpec, InType: reflect.TypeOf(&JobTemplateSpec{})},
+ )
+}
+
+// DeepCopy_batch_CronJob is an autogenerated deepcopy function.
+func DeepCopy_batch_CronJob(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CronJob)
+ out := out.(*CronJob)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_batch_CronJobSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_batch_CronJobStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_batch_CronJobList is an autogenerated deepcopy function.
+func DeepCopy_batch_CronJobList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CronJobList)
+ out := out.(*CronJobList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]CronJob, len(*in))
+ for i := range *in {
+ if err := DeepCopy_batch_CronJob(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_batch_CronJobSpec is an autogenerated deepcopy function.
+func DeepCopy_batch_CronJobSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CronJobSpec)
+ out := out.(*CronJobSpec)
+ *out = *in
+ if in.StartingDeadlineSeconds != nil {
+ in, out := &in.StartingDeadlineSeconds, &out.StartingDeadlineSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.Suspend != nil {
+ in, out := &in.Suspend, &out.Suspend
+ *out = new(bool)
+ **out = **in
+ }
+ if err := DeepCopy_batch_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, c); err != nil {
+ return err
+ }
+ if in.SuccessfulJobsHistoryLimit != nil {
+ in, out := &in.SuccessfulJobsHistoryLimit, &out.SuccessfulJobsHistoryLimit
+ *out = new(int32)
+ **out = **in
+ }
+ if in.FailedJobsHistoryLimit != nil {
+ in, out := &in.FailedJobsHistoryLimit, &out.FailedJobsHistoryLimit
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_batch_CronJobStatus is an autogenerated deepcopy function.
+func DeepCopy_batch_CronJobStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CronJobStatus)
+ out := out.(*CronJobStatus)
+ *out = *in
+ if in.Active != nil {
+ in, out := &in.Active, &out.Active
+ *out = make([]api.ObjectReference, len(*in))
+ copy(*out, *in)
+ }
+ if in.LastScheduleTime != nil {
+ in, out := &in.LastScheduleTime, &out.LastScheduleTime
+ *out = new(v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ return nil
+ }
+}
+
+// DeepCopy_batch_Job is an autogenerated deepcopy function.
+func DeepCopy_batch_Job(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Job)
+ out := out.(*Job)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_batch_JobSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_batch_JobStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_batch_JobCondition is an autogenerated deepcopy function.
+func DeepCopy_batch_JobCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*JobCondition)
+ out := out.(*JobCondition)
+ *out = *in
+ out.LastProbeTime = in.LastProbeTime.DeepCopy()
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_batch_JobList is an autogenerated deepcopy function.
+func DeepCopy_batch_JobList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*JobList)
+ out := out.(*JobList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Job, len(*in))
+ for i := range *in {
+ if err := DeepCopy_batch_Job(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_batch_JobSpec is an autogenerated deepcopy function.
+func DeepCopy_batch_JobSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*JobSpec)
+ out := out.(*JobSpec)
+ *out = *in
+ if in.Parallelism != nil {
+ in, out := &in.Parallelism, &out.Parallelism
+ *out = new(int32)
+ **out = **in
+ }
+ if in.Completions != nil {
+ in, out := &in.Completions, &out.Completions
+ *out = new(int32)
+ **out = **in
+ }
+ if in.ActiveDeadlineSeconds != nil {
+ in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if in.ManualSelector != nil {
+ in, out := &in.ManualSelector, &out.ManualSelector
+ *out = new(bool)
+ **out = **in
+ }
+ if err := api.DeepCopy_api_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_batch_JobStatus is an autogenerated deepcopy function.
+func DeepCopy_batch_JobStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*JobStatus)
+ out := out.(*JobStatus)
+ *out = *in
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]JobCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_batch_JobCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.StartTime != nil {
+ in, out := &in.StartTime, &out.StartTime
+ *out = new(v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ if in.CompletionTime != nil {
+ in, out := &in.CompletionTime, &out.CompletionTime
+ *out = new(v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ return nil
+ }
+}
+
+// DeepCopy_batch_JobTemplate is an autogenerated deepcopy function.
+func DeepCopy_batch_JobTemplate(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*JobTemplate)
+ out := out.(*JobTemplate)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_batch_JobTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_batch_JobTemplateSpec is an autogenerated deepcopy function.
+func DeepCopy_batch_JobTemplateSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*JobTemplateSpec)
+ out := out.(*JobTemplateSpec)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_batch_JobSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/doc.go b/vendor/k8s.io/client-go/pkg/apis/certificates/doc.go
new file mode 100644
index 000000000..a10177469
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/certificates/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +groupName=certificates.k8s.io
+package certificates
diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/helpers.go b/vendor/k8s.io/client-go/pkg/apis/certificates/helpers.go
new file mode 100644
index 000000000..2608e4076
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/certificates/helpers.go
@@ -0,0 +1,38 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package certificates
+
+import (
+ "crypto/x509"
+ "encoding/pem"
+ "errors"
+)
+
+// ParseCSR extracts the CSR from the API object and decodes it.
+func ParseCSR(obj *CertificateSigningRequest) (*x509.CertificateRequest, error) {
+ // extract PEM from request object
+ pemBytes := obj.Spec.Request
+ block, _ := pem.Decode(pemBytes)
+ if block == nil || block.Type != "CERTIFICATE REQUEST" {
+ return nil, errors.New("PEM block type must be CERTIFICATE REQUEST")
+ }
+ csr, err := x509.ParseCertificateRequest(block.Bytes)
+ if err != nil {
+ return nil, err
+ }
+ return csr, nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/register.go b/vendor/k8s.io/client-go/pkg/apis/certificates/register.go
new file mode 100644
index 000000000..085737583
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/certificates/register.go
@@ -0,0 +1,52 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package certificates
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+// GroupName is the group name use in this package
+const GroupName = "certificates.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &CertificateSigningRequest{},
+ &CertificateSigningRequestList{},
+ )
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/types.go b/vendor/k8s.io/client-go/pkg/apis/certificates/types.go
new file mode 100644
index 000000000..4a7884a1e
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/certificates/types.go
@@ -0,0 +1,143 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package certificates
+
+import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+// +genclient=true
+// +nonNamespaced=true
+
+// Describes a certificate signing request
+type CertificateSigningRequest struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // The certificate request itself and any additional information.
+ // +optional
+ Spec CertificateSigningRequestSpec
+
+ // Derived information about the request.
+ // +optional
+ Status CertificateSigningRequestStatus
+}
+
+// This information is immutable after the request is created. Only the Request
+// and Usages fields can be set on creation, other fields are derived by
+// Kubernetes and cannot be modified by users.
+type CertificateSigningRequestSpec struct {
+ // Base64-encoded PKCS#10 CSR data
+ Request []byte
+
+ // usages specifies a set of usage contexts the key will be
+ // valid for.
+ // See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3
+ // https://tools.ietf.org/html/rfc5280#section-4.2.1.12
+ Usages []KeyUsage
+
+ // Information about the requesting user.
+ // See user.Info interface for details.
+ // +optional
+ Username string
+ // UID information about the requesting user.
+ // See user.Info interface for details.
+ // +optional
+ UID string
+ // Group information about the requesting user.
+ // See user.Info interface for details.
+ // +optional
+ Groups []string
+ // Extra information about the requesting user.
+ // See user.Info interface for details.
+ // +optional
+ Extra map[string]ExtraValue
+}
+
+// ExtraValue masks the value so protobuf can generate
+type ExtraValue []string
+
+type CertificateSigningRequestStatus struct {
+ // Conditions applied to the request, such as approval or denial.
+ // +optional
+ Conditions []CertificateSigningRequestCondition
+
+ // If request was approved, the controller will place the issued certificate here.
+ // +optional
+ Certificate []byte
+}
+
+type RequestConditionType string
+
+// These are the possible conditions for a certificate request.
+const (
+ CertificateApproved RequestConditionType = "Approved"
+ CertificateDenied RequestConditionType = "Denied"
+)
+
+type CertificateSigningRequestCondition struct {
+ // request approval state, currently Approved or Denied.
+ Type RequestConditionType
+ // brief reason for the request state
+ // +optional
+ Reason string
+ // human readable message with details about the request state
+ // +optional
+ Message string
+ // timestamp for the last update to this condition
+ // +optional
+ LastUpdateTime metav1.Time
+}
+
+type CertificateSigningRequestList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ // +optional
+ Items []CertificateSigningRequest
+}
+
+// KeyUsages specifies valid usage contexts for keys.
+// See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3
+// https://tools.ietf.org/html/rfc5280#section-4.2.1.12
+type KeyUsage string
+
+const (
+ UsageSigning KeyUsage = "signing"
+ UsageDigitalSignature KeyUsage = "digital signature"
+ UsageContentCommittment KeyUsage = "content committment"
+ UsageKeyEncipherment KeyUsage = "key encipherment"
+ UsageKeyAgreement KeyUsage = "key agreement"
+ UsageDataEncipherment KeyUsage = "data encipherment"
+ UsageCertSign KeyUsage = "cert sign"
+ UsageCRLSign KeyUsage = "crl sign"
+ UsageEncipherOnly KeyUsage = "encipher only"
+ UsageDecipherOnly KeyUsage = "decipher only"
+ UsageAny KeyUsage = "any"
+ UsageServerAuth KeyUsage = "server auth"
+ UsageClientAuth KeyUsage = "client auth"
+ UsageCodeSigning KeyUsage = "code signing"
+ UsageEmailProtection KeyUsage = "email protection"
+ UsageSMIME KeyUsage = "s/mime"
+ UsageIPsecEndSystem KeyUsage = "ipsec end system"
+ UsageIPsecTunnel KeyUsage = "ipsec tunnel"
+ UsageIPsecUser KeyUsage = "ipsec user"
+ UsageTimestamping KeyUsage = "timestamping"
+ UsageOCSPSigning KeyUsage = "ocsp signing"
+ UsageMicrosoftSGC KeyUsage = "microsoft sgc"
+ UsageNetscapSGC KeyUsage = "netscape sgc"
+)
diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/conversion.go b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/conversion.go
new file mode 100644
index 000000000..b9cf0b016
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/conversion.go
@@ -0,0 +1,38 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "fmt"
+
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) error {
+ // Add non-generated conversion functions here. Currently there are none.
+
+ return scheme.AddFieldLabelConversionFunc(SchemeGroupVersion.String(), "CertificateSigningRequest",
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "metadata.name":
+ return label, value, nil
+ default:
+ return "", "", fmt.Errorf("field label not supported: %s", label)
+ }
+ },
+ )
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/defaults.go b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/defaults.go
new file mode 100644
index 000000000..e18af02f6
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/defaults.go
@@ -0,0 +1,28 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import "k8s.io/apimachinery/pkg/runtime"
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
+func SetDefaults_CertificateSigningRequestSpec(obj *CertificateSigningRequestSpec) {
+ if obj.Usages == nil {
+ obj.Usages = []KeyUsage{UsageDigitalSignature, UsageKeyEncipherment}
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/doc.go b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/doc.go
new file mode 100644
index 000000000..6f257909d
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +groupName=certificates.k8s.io
+package v1beta1
diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/generated.pb.go
new file mode 100644
index 000000000..347df9826
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/generated.pb.go
@@ -0,0 +1,1694 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/certificates/v1beta1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1beta1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/certificates/v1beta1/generated.proto
+
+ It has these top-level messages:
+ CertificateSigningRequest
+ CertificateSigningRequestCondition
+ CertificateSigningRequestList
+ CertificateSigningRequestSpec
+ CertificateSigningRequestStatus
+ ExtraValue
+*/
+package v1beta1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *CertificateSigningRequest) Reset() { *m = CertificateSigningRequest{} }
+func (*CertificateSigningRequest) ProtoMessage() {}
+func (*CertificateSigningRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{0}
+}
+
+func (m *CertificateSigningRequestCondition) Reset() { *m = CertificateSigningRequestCondition{} }
+func (*CertificateSigningRequestCondition) ProtoMessage() {}
+func (*CertificateSigningRequestCondition) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{1}
+}
+
+func (m *CertificateSigningRequestList) Reset() { *m = CertificateSigningRequestList{} }
+func (*CertificateSigningRequestList) ProtoMessage() {}
+func (*CertificateSigningRequestList) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{2}
+}
+
+func (m *CertificateSigningRequestSpec) Reset() { *m = CertificateSigningRequestSpec{} }
+func (*CertificateSigningRequestSpec) ProtoMessage() {}
+func (*CertificateSigningRequestSpec) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{3}
+}
+
+func (m *CertificateSigningRequestStatus) Reset() { *m = CertificateSigningRequestStatus{} }
+func (*CertificateSigningRequestStatus) ProtoMessage() {}
+func (*CertificateSigningRequestStatus) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{4}
+}
+
+func (m *ExtraValue) Reset() { *m = ExtraValue{} }
+func (*ExtraValue) ProtoMessage() {}
+func (*ExtraValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
+
+func init() {
+ proto.RegisterType((*CertificateSigningRequest)(nil), "k8s.io.client-go.pkg.apis.certificates.v1beta1.CertificateSigningRequest")
+ proto.RegisterType((*CertificateSigningRequestCondition)(nil), "k8s.io.client-go.pkg.apis.certificates.v1beta1.CertificateSigningRequestCondition")
+ proto.RegisterType((*CertificateSigningRequestList)(nil), "k8s.io.client-go.pkg.apis.certificates.v1beta1.CertificateSigningRequestList")
+ proto.RegisterType((*CertificateSigningRequestSpec)(nil), "k8s.io.client-go.pkg.apis.certificates.v1beta1.CertificateSigningRequestSpec")
+ proto.RegisterType((*CertificateSigningRequestStatus)(nil), "k8s.io.client-go.pkg.apis.certificates.v1beta1.CertificateSigningRequestStatus")
+ proto.RegisterType((*ExtraValue)(nil), "k8s.io.client-go.pkg.apis.certificates.v1beta1.ExtraValue")
+}
+func (m *CertificateSigningRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CertificateSigningRequest) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n2, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n3, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ return i, nil
+}
+
+func (m *CertificateSigningRequestCondition) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CertificateSigningRequestCondition) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastUpdateTime.Size()))
+ n4, err := m.LastUpdateTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ return i, nil
+}
+
+func (m *CertificateSigningRequestList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CertificateSigningRequestList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n5, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *CertificateSigningRequestSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CertificateSigningRequestSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Request != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Request)))
+ i += copy(dAtA[i:], m.Request)
+ }
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Username)))
+ i += copy(dAtA[i:], m.Username)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID)))
+ i += copy(dAtA[i:], m.UID)
+ if len(m.Groups) > 0 {
+ for _, s := range m.Groups {
+ dAtA[i] = 0x22
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Usages) > 0 {
+ for _, s := range m.Usages {
+ dAtA[i] = 0x2a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Extra) > 0 {
+ keysForExtra := make([]string, 0, len(m.Extra))
+ for k := range m.Extra {
+ keysForExtra = append(keysForExtra, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
+ for _, k := range keysForExtra {
+ dAtA[i] = 0x32
+ i++
+ v := m.Extra[string(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n6, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ }
+ }
+ return i, nil
+}
+
+func (m *CertificateSigningRequestStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CertificateSigningRequestStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Conditions) > 0 {
+ for _, msg := range m.Conditions {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.Certificate != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Certificate)))
+ i += copy(dAtA[i:], m.Certificate)
+ }
+ return i, nil
+}
+
+func (m ExtraValue) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m ExtraValue) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m) > 0 {
+ for _, s := range m {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *CertificateSigningRequest) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *CertificateSigningRequestCondition) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastUpdateTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *CertificateSigningRequestList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *CertificateSigningRequestSpec) Size() (n int) {
+ var l int
+ _ = l
+ if m.Request != nil {
+ l = len(m.Request)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ l = len(m.Username)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.UID)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Groups) > 0 {
+ for _, s := range m.Groups {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Usages) > 0 {
+ for _, s := range m.Usages {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Extra) > 0 {
+ for k, v := range m.Extra {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *CertificateSigningRequestStatus) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Conditions) > 0 {
+ for _, e := range m.Conditions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.Certificate != nil {
+ l = len(m.Certificate)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m ExtraValue) Size() (n int) {
+ var l int
+ _ = l
+ if len(m) > 0 {
+ for _, s := range m {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *CertificateSigningRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CertificateSigningRequest{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "CertificateSigningRequestSpec", "CertificateSigningRequestSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "CertificateSigningRequestStatus", "CertificateSigningRequestStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CertificateSigningRequestCondition) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CertificateSigningRequestCondition{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `LastUpdateTime:` + strings.Replace(strings.Replace(this.LastUpdateTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CertificateSigningRequestList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CertificateSigningRequestList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "CertificateSigningRequest", "CertificateSigningRequest", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CertificateSigningRequestSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForExtra := make([]string, 0, len(this.Extra))
+ for k := range this.Extra {
+ keysForExtra = append(keysForExtra, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
+ mapStringForExtra := "map[string]ExtraValue{"
+ for _, k := range keysForExtra {
+ mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k])
+ }
+ mapStringForExtra += "}"
+ s := strings.Join([]string{`&CertificateSigningRequestSpec{`,
+ `Request:` + valueToStringGenerated(this.Request) + `,`,
+ `Username:` + fmt.Sprintf("%v", this.Username) + `,`,
+ `UID:` + fmt.Sprintf("%v", this.UID) + `,`,
+ `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`,
+ `Usages:` + fmt.Sprintf("%v", this.Usages) + `,`,
+ `Extra:` + mapStringForExtra + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CertificateSigningRequestStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CertificateSigningRequestStatus{`,
+ `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "CertificateSigningRequestCondition", "CertificateSigningRequestCondition", 1), `&`, ``, 1) + `,`,
+ `Certificate:` + valueToStringGenerated(this.Certificate) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *CertificateSigningRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CertificateSigningRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CertificateSigningRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CertificateSigningRequestCondition) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CertificateSigningRequestCondition: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CertificateSigningRequestCondition: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = RequestConditionType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastUpdateTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastUpdateTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CertificateSigningRequestList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CertificateSigningRequestList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CertificateSigningRequestList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, CertificateSigningRequest{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CertificateSigningRequestSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CertificateSigningRequestSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CertificateSigningRequestSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType)
+ }
+ var byteLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ byteLen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if byteLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + byteLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Request = append(m.Request[:0], dAtA[iNdEx:postIndex]...)
+ if m.Request == nil {
+ m.Request = []byte{}
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Username = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.UID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Usages", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Usages = append(m.Usages, KeyUsage(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Extra", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Extra == nil {
+ m.Extra = make(map[string]ExtraValue)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &ExtraValue{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Extra[mapkey] = *mapvalue
+ } else {
+ var mapvalue ExtraValue
+ m.Extra[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CertificateSigningRequestStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CertificateSigningRequestStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CertificateSigningRequestStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Conditions = append(m.Conditions, CertificateSigningRequestCondition{})
+ if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Certificate", wireType)
+ }
+ var byteLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ byteLen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if byteLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + byteLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Certificate = append(m.Certificate[:0], dAtA[iNdEx:postIndex]...)
+ if m.Certificate == nil {
+ m.Certificate = []byte{}
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExtraValue) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExtraValue: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExtraValue: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ *m = append(*m, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/client-go/pkg/apis/certificates/v1beta1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 820 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcf, 0x8f, 0xdb, 0x44,
+ 0x14, 0x8e, 0xf3, 0x6b, 0x93, 0xc9, 0xb2, 0xad, 0x46, 0xa8, 0x32, 0x2b, 0xd5, 0x8e, 0x2c, 0x40,
+ 0x0b, 0xa2, 0x36, 0x59, 0x10, 0xac, 0xca, 0x01, 0xc9, 0xa5, 0x42, 0x85, 0x96, 0x1f, 0xb3, 0x0d,
+ 0x12, 0x88, 0x03, 0x13, 0xe7, 0xd5, 0x3b, 0xcd, 0xfa, 0x07, 0x9e, 0x71, 0xd4, 0x5c, 0x50, 0x6f,
+ 0x5c, 0x39, 0x72, 0x41, 0xe2, 0xcf, 0xd9, 0x63, 0x8f, 0x3d, 0xa0, 0x88, 0x35, 0x27, 0x2e, 0xfc,
+ 0x01, 0x3d, 0xa1, 0x19, 0x4f, 0xe2, 0x90, 0x28, 0xb4, 0x95, 0x72, 0x9b, 0xf9, 0xe6, 0xbd, 0xef,
+ 0x7b, 0xef, 0x9b, 0x37, 0x83, 0x3e, 0x9e, 0x9c, 0x70, 0x97, 0x25, 0xde, 0x24, 0x1f, 0x41, 0x16,
+ 0x83, 0x00, 0xee, 0xa5, 0x93, 0xd0, 0xa3, 0x29, 0xe3, 0x5e, 0x00, 0x99, 0x60, 0x0f, 0x58, 0x40,
+ 0x25, 0x3a, 0x1d, 0x8c, 0x40, 0xd0, 0x81, 0x17, 0x42, 0x0c, 0x19, 0x15, 0x30, 0x76, 0xd3, 0x2c,
+ 0x11, 0x09, 0xf6, 0x4a, 0x02, 0xb7, 0x22, 0x70, 0xd3, 0x49, 0xe8, 0x4a, 0x02, 0x77, 0x95, 0xc0,
+ 0xd5, 0x04, 0x87, 0x37, 0x42, 0x26, 0xce, 0xf2, 0x91, 0x1b, 0x24, 0x91, 0x17, 0x26, 0x61, 0xe2,
+ 0x29, 0x9e, 0x51, 0xfe, 0x40, 0xed, 0xd4, 0x46, 0xad, 0x4a, 0xfe, 0xc3, 0xf7, 0x75, 0x81, 0x34,
+ 0x65, 0x11, 0x0d, 0xce, 0x58, 0x0c, 0xd9, 0xac, 0x2a, 0x31, 0x02, 0x41, 0xbd, 0xe9, 0x46, 0x55,
+ 0x87, 0xde, 0xb6, 0xac, 0x2c, 0x8f, 0x05, 0x8b, 0x60, 0x23, 0xe1, 0x83, 0xe7, 0x25, 0xf0, 0xe0,
+ 0x0c, 0x22, 0xba, 0x91, 0xf7, 0xde, 0xb6, 0xbc, 0x5c, 0xb0, 0x73, 0x8f, 0xc5, 0x82, 0x8b, 0x6c,
+ 0x3d, 0xc9, 0xf9, 0xbb, 0x8e, 0x5e, 0xbb, 0x55, 0x79, 0x73, 0xca, 0xc2, 0x98, 0xc5, 0x21, 0x81,
+ 0x1f, 0x73, 0xe0, 0x02, 0xff, 0x80, 0x3a, 0xb2, 0xad, 0x31, 0x15, 0xd4, 0x34, 0xfa, 0xc6, 0x51,
+ 0xef, 0xf8, 0x5d, 0x57, 0x9b, 0xbc, 0xaa, 0x52, 0xd9, 0x2c, 0xa3, 0xdd, 0xe9, 0xc0, 0xfd, 0x72,
+ 0xf4, 0x10, 0x02, 0x71, 0x0f, 0x04, 0xf5, 0xf1, 0xc5, 0xdc, 0xae, 0x15, 0x73, 0x1b, 0x55, 0x18,
+ 0x59, 0xb2, 0xe2, 0x14, 0x35, 0x79, 0x0a, 0x81, 0x59, 0x57, 0xec, 0x5f, 0xb8, 0x2f, 0x79, 0x85,
+ 0xee, 0xd6, 0xda, 0x4f, 0x53, 0x08, 0xfc, 0x7d, 0xad, 0xdd, 0x94, 0x3b, 0xa2, 0x94, 0xf0, 0x23,
+ 0xd4, 0xe6, 0x82, 0x8a, 0x9c, 0x9b, 0x0d, 0xa5, 0xf9, 0xd5, 0x0e, 0x35, 0x15, 0xaf, 0x7f, 0xa0,
+ 0x55, 0xdb, 0xe5, 0x9e, 0x68, 0x3d, 0xe7, 0xb7, 0x3a, 0x72, 0xb6, 0xe6, 0xde, 0x4a, 0xe2, 0x31,
+ 0x13, 0x2c, 0x89, 0xf1, 0x09, 0x6a, 0x8a, 0x59, 0x0a, 0xca, 0xf0, 0xae, 0xff, 0xfa, 0xa2, 0x85,
+ 0xfb, 0xb3, 0x14, 0x9e, 0xcd, 0xed, 0x57, 0xd7, 0xe3, 0x25, 0x4e, 0x54, 0x06, 0x7e, 0x13, 0xb5,
+ 0x33, 0xa0, 0x3c, 0x89, 0x95, 0x9d, 0xdd, 0xaa, 0x10, 0xa2, 0x50, 0xa2, 0x4f, 0xf1, 0x5b, 0x68,
+ 0x2f, 0x02, 0xce, 0x69, 0x08, 0xca, 0x83, 0xae, 0x7f, 0x45, 0x07, 0xee, 0xdd, 0x2b, 0x61, 0xb2,
+ 0x38, 0xc7, 0x0f, 0xd1, 0xc1, 0x39, 0xe5, 0x62, 0x98, 0x8e, 0xa9, 0x80, 0xfb, 0x2c, 0x02, 0xb3,
+ 0xa9, 0x5c, 0x7b, 0xfb, 0xc5, 0xe6, 0x40, 0x66, 0xf8, 0xd7, 0x34, 0xfb, 0xc1, 0xdd, 0xff, 0x30,
+ 0x91, 0x35, 0x66, 0xe7, 0x1f, 0x03, 0x5d, 0xdf, 0xea, 0xcf, 0x5d, 0xc6, 0x05, 0xfe, 0x7e, 0x63,
+ 0x1e, 0xdd, 0x17, 0xab, 0x43, 0x66, 0xab, 0x69, 0xbc, 0xaa, 0x6b, 0xe9, 0x2c, 0x90, 0x95, 0x59,
+ 0x4c, 0x50, 0x8b, 0x09, 0x88, 0xb8, 0x59, 0xef, 0x37, 0x8e, 0x7a, 0xc7, 0x9f, 0xed, 0x6e, 0x30,
+ 0xfc, 0x57, 0xb4, 0x6c, 0xeb, 0x8e, 0x14, 0x20, 0xa5, 0x8e, 0x53, 0x34, 0xfe, 0xa7, 0x61, 0x39,
+ 0xb2, 0xf8, 0x0d, 0xb4, 0x97, 0x95, 0x5b, 0xd5, 0xef, 0xbe, 0xdf, 0x93, 0xb7, 0xa4, 0x23, 0xc8,
+ 0xe2, 0x0c, 0xbf, 0x83, 0x3a, 0x39, 0x87, 0x2c, 0xa6, 0x11, 0xe8, 0xab, 0x5f, 0xf6, 0x39, 0xd4,
+ 0x38, 0x59, 0x46, 0xe0, 0xeb, 0xa8, 0x91, 0xb3, 0xb1, 0xbe, 0xfa, 0x9e, 0x0e, 0x6c, 0x0c, 0xef,
+ 0x7c, 0x42, 0x24, 0x8e, 0x1d, 0xd4, 0x0e, 0xb3, 0x24, 0x4f, 0xb9, 0xd9, 0xec, 0x37, 0x8e, 0xba,
+ 0x3e, 0x92, 0x13, 0xf4, 0xa9, 0x42, 0x88, 0x3e, 0xc1, 0xc7, 0xa8, 0x33, 0x81, 0xd9, 0x50, 0x8d,
+ 0x50, 0x4b, 0x45, 0x5d, 0x93, 0x51, 0x0a, 0xe0, 0xcf, 0xe6, 0x76, 0xe7, 0x73, 0x7d, 0x4a, 0x96,
+ 0x71, 0xf8, 0x27, 0xd4, 0x82, 0x47, 0x22, 0xa3, 0x66, 0x5b, 0xd9, 0xfb, 0xed, 0x6e, 0xdf, 0xba,
+ 0x7b, 0x5b, 0x72, 0xdf, 0x8e, 0x45, 0x36, 0xab, 0xdc, 0x56, 0x18, 0x29, 0x65, 0x0f, 0x73, 0x84,
+ 0xaa, 0x18, 0x7c, 0x15, 0x35, 0x26, 0x30, 0x2b, 0x1f, 0x19, 0x91, 0x4b, 0xfc, 0x35, 0x6a, 0x4d,
+ 0xe9, 0x79, 0x0e, 0xfa, 0x2f, 0xfa, 0xe8, 0xa5, 0xeb, 0x53, 0xec, 0xdf, 0x48, 0x0a, 0x52, 0x32,
+ 0xdd, 0xac, 0x9f, 0x18, 0xce, 0xdc, 0x40, 0xf6, 0x73, 0x7e, 0x0c, 0xfc, 0xb3, 0x81, 0x50, 0xb0,
+ 0x78, 0xd0, 0xdc, 0x34, 0x94, 0x41, 0xa7, 0xbb, 0x33, 0x68, 0xf9, 0x59, 0x54, 0xbf, 0xf1, 0x12,
+ 0xe2, 0x64, 0x45, 0x1a, 0x0f, 0x50, 0x6f, 0x85, 0x5a, 0x59, 0xb1, 0xef, 0x5f, 0x29, 0xe6, 0x76,
+ 0x6f, 0x85, 0x9c, 0xac, 0xc6, 0x38, 0x1f, 0x6a, 0x5f, 0x55, 0xe7, 0xd8, 0x5e, 0x3c, 0x22, 0x43,
+ 0x8d, 0x45, 0x77, 0x7d, 0xe8, 0x6f, 0x76, 0x7e, 0xfd, 0xdd, 0xae, 0x3d, 0xfe, 0xa3, 0x5f, 0xf3,
+ 0x6f, 0x5c, 0x5c, 0x5a, 0xb5, 0x27, 0x97, 0x56, 0xed, 0xe9, 0xa5, 0x55, 0x7b, 0x5c, 0x58, 0xc6,
+ 0x45, 0x61, 0x19, 0x4f, 0x0a, 0xcb, 0x78, 0x5a, 0x58, 0xc6, 0x9f, 0x85, 0x65, 0xfc, 0xf2, 0x97,
+ 0x55, 0xfb, 0x6e, 0x4f, 0x77, 0xf7, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe1, 0xa1, 0xbb, 0xcc,
+ 0x20, 0x08, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/generated.proto
new file mode 100644
index 000000000..e62bd5724
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/generated.proto
@@ -0,0 +1,122 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.client_go.pkg.apis.certificates.v1beta1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1beta1";
+
+// Describes a certificate signing request
+message CertificateSigningRequest {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // The certificate request itself and any additional information.
+ // +optional
+ optional CertificateSigningRequestSpec spec = 2;
+
+ // Derived information about the request.
+ // +optional
+ optional CertificateSigningRequestStatus status = 3;
+}
+
+message CertificateSigningRequestCondition {
+ // request approval state, currently Approved or Denied.
+ optional string type = 1;
+
+ // brief reason for the request state
+ // +optional
+ optional string reason = 2;
+
+ // human readable message with details about the request state
+ // +optional
+ optional string message = 3;
+
+ // timestamp for the last update to this condition
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 4;
+}
+
+message CertificateSigningRequestList {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ repeated CertificateSigningRequest items = 2;
+}
+
+// This information is immutable after the request is created. Only the Request
+// and Usages fields can be set on creation, other fields are derived by
+// Kubernetes and cannot be modified by users.
+message CertificateSigningRequestSpec {
+ // Base64-encoded PKCS#10 CSR data
+ optional bytes request = 1;
+
+ // allowedUsages specifies a set of usage contexts the key will be
+ // valid for.
+ // See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3
+ // https://tools.ietf.org/html/rfc5280#section-4.2.1.12
+ repeated string keyUsage = 5;
+
+ // Information about the requesting user.
+ // See user.Info interface for details.
+ // +optional
+ optional string username = 2;
+
+ // UID information about the requesting user.
+ // See user.Info interface for details.
+ // +optional
+ optional string uid = 3;
+
+ // Group information about the requesting user.
+ // See user.Info interface for details.
+ // +optional
+ repeated string groups = 4;
+
+ // Extra information about the requesting user.
+ // See user.Info interface for details.
+ // +optional
+ map<string, ExtraValue> extra = 6;
+}
+
+message CertificateSigningRequestStatus {
+ // Conditions applied to the request, such as approval or denial.
+ // +optional
+ repeated CertificateSigningRequestCondition conditions = 1;
+
+ // If request was approved, the controller will place the issued certificate here.
+ // +optional
+ optional bytes certificate = 2;
+}
+
+// ExtraValue masks the value so protobuf can generate
+// +protobuf.nullable=true
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+message ExtraValue {
+ // items, if empty, will result in an empty slice
+
+ repeated string items = 1;
+}
+
diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/helpers.go b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/helpers.go
new file mode 100644
index 000000000..1375063c1
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/helpers.go
@@ -0,0 +1,38 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "crypto/x509"
+ "encoding/pem"
+ "errors"
+)
+
+// ParseCSR extracts the CSR from the API object and decodes it.
+func ParseCSR(obj *CertificateSigningRequest) (*x509.CertificateRequest, error) {
+ // extract PEM from request object
+ pemBytes := obj.Spec.Request
+ block, _ := pem.Decode(pemBytes)
+ if block == nil || block.Type != "CERTIFICATE REQUEST" {
+ return nil, errors.New("PEM block type must be CERTIFICATE REQUEST")
+ }
+ csr, err := x509.ParseCertificateRequest(block.Bytes)
+ if err != nil {
+ return nil, err
+ }
+ return csr, nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/register.go b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/register.go
new file mode 100644
index 000000000..582916c8b
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/register.go
@@ -0,0 +1,66 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "certificates.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addConversionFuncs, addDefaultingFuncs)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &CertificateSigningRequest{},
+ &CertificateSigningRequestList{},
+ )
+
+ // Add the watch version that applies
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/types.generated.go
new file mode 100644
index 000000000..3c4771bbd
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/types.generated.go
@@ -0,0 +1,2624 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1beta1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ pkg2_types "k8s.io/apimachinery/pkg/types"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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 pkg1_v1.TypeMeta
+ var v1 pkg2_types.UID
+ var v2 time.Time
+ _, _, _ = v0, v1, v2
+ }
+}
+
+func (x *CertificateSigningRequest) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CertificateSigningRequest) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CertificateSigningRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = CertificateSigningRequestSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = CertificateSigningRequestStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CertificateSigningRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = CertificateSigningRequestSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = CertificateSigningRequestStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *CertificateSigningRequestSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = len(x.Usages) != 0
+ yyq2[2] = x.Username != ""
+ yyq2[3] = x.UID != ""
+ yyq2[4] = len(x.Groups) != 0
+ yyq2[5] = len(x.Extra) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Request == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Request))
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("request"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Request == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Request))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Usages == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceKeyUsage(([]KeyUsage)(x.Usages), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("usages"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Usages == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceKeyUsage(([]KeyUsage)(x.Usages), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Username))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("username"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Username))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.UID))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("uid"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.UID))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.Groups == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Groups, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("groups"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Groups == nil {
+ r.EncodeNil()
+ } else {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Groups, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.Extra == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("extra"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Extra == nil {
+ r.EncodeNil()
+ } else {
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CertificateSigningRequestSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CertificateSigningRequestSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "request":
+ if r.TryDecodeAsNil() {
+ x.Request = nil
+ } else {
+ yyv4 := &x.Request
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *yyv4 = r.DecodeBytes(*(*[]byte)(yyv4), false, false)
+ }
+ }
+ case "usages":
+ if r.TryDecodeAsNil() {
+ x.Usages = nil
+ } else {
+ yyv6 := &x.Usages
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceKeyUsage((*[]KeyUsage)(yyv6), d)
+ }
+ }
+ case "username":
+ if r.TryDecodeAsNil() {
+ x.Username = ""
+ } else {
+ yyv8 := &x.Username
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "uid":
+ if r.TryDecodeAsNil() {
+ x.UID = ""
+ } else {
+ yyv10 := &x.UID
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "groups":
+ if r.TryDecodeAsNil() {
+ x.Groups = nil
+ } else {
+ yyv12 := &x.Groups
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv12, false, d)
+ }
+ }
+ case "extra":
+ if r.TryDecodeAsNil() {
+ x.Extra = nil
+ } else {
+ yyv14 := &x.Extra
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.decMapstringExtraValue((*map[string]ExtraValue)(yyv14), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CertificateSigningRequestSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj16 int
+ var yyb16 bool
+ var yyhl16 bool = l >= 0
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Request = nil
+ } else {
+ yyv17 := &x.Request
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *yyv17 = r.DecodeBytes(*(*[]byte)(yyv17), false, false)
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Usages = nil
+ } else {
+ yyv19 := &x.Usages
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceKeyUsage((*[]KeyUsage)(yyv19), d)
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Username = ""
+ } else {
+ yyv21 := &x.Username
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UID = ""
+ } else {
+ yyv23 := &x.UID
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*string)(yyv23)) = r.DecodeString()
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Groups = nil
+ } else {
+ yyv25 := &x.Groups
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv25, false, d)
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Extra = nil
+ } else {
+ yyv27 := &x.Extra
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ h.decMapstringExtraValue((*map[string]ExtraValue)(yyv27), d)
+ }
+ }
+ for {
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj16-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x ExtraValue) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 {
+ h.encExtraValue((ExtraValue)(x), e)
+ }
+ }
+}
+
+func (x *ExtraValue) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ h.decExtraValue((*ExtraValue)(x), d)
+ }
+}
+
+func (x *CertificateSigningRequestStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Conditions) != 0
+ yyq2[1] = len(x.Certificate) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceCertificateSigningRequestCondition(([]CertificateSigningRequestCondition)(x.Conditions), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("conditions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceCertificateSigningRequestCondition(([]CertificateSigningRequestCondition)(x.Conditions), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Certificate == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Certificate))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("certificate"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Certificate == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Certificate))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CertificateSigningRequestStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CertificateSigningRequestStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "conditions":
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv4 := &x.Conditions
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceCertificateSigningRequestCondition((*[]CertificateSigningRequestCondition)(yyv4), d)
+ }
+ }
+ case "certificate":
+ if r.TryDecodeAsNil() {
+ x.Certificate = nil
+ } else {
+ yyv6 := &x.Certificate
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *yyv6 = r.DecodeBytes(*(*[]byte)(yyv6), false, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CertificateSigningRequestStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv9 := &x.Conditions
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceCertificateSigningRequestCondition((*[]CertificateSigningRequestCondition)(yyv9), d)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Certificate = nil
+ } else {
+ yyv11 := &x.Certificate
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *yyv11 = r.DecodeBytes(*(*[]byte)(yyv11), false, false)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x RequestConditionType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *RequestConditionType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *CertificateSigningRequestCondition) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.Reason != ""
+ yyq2[2] = x.Message != ""
+ yyq2[3] = true
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yy13 := &x.LastUpdateTime
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy13) {
+ } else if yym14 {
+ z.EncBinaryMarshal(yy13)
+ } else if !yym14 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy13)
+ } else {
+ z.EncFallback(yy13)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastUpdateTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy15 := &x.LastUpdateTime
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy15) {
+ } else if yym16 {
+ z.EncBinaryMarshal(yy15)
+ } else if !yym16 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy15)
+ } else {
+ z.EncFallback(yy15)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CertificateSigningRequestCondition) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CertificateSigningRequestCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv5 := &x.Reason
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*string)(yyv5)) = r.DecodeString()
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv7 := &x.Message
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*string)(yyv7)) = r.DecodeString()
+ }
+ }
+ case "lastUpdateTime":
+ if r.TryDecodeAsNil() {
+ x.LastUpdateTime = pkg1_v1.Time{}
+ } else {
+ yyv9 := &x.LastUpdateTime
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv9) {
+ } else if yym10 {
+ z.DecBinaryUnmarshal(yyv9)
+ } else if !yym10 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv9)
+ } else {
+ z.DecFallback(yyv9, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CertificateSigningRequestCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv12 := &x.Type
+ yyv12.CodecDecodeSelf(d)
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv13 := &x.Reason
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ *((*string)(yyv13)) = r.DecodeString()
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv15 := &x.Message
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*string)(yyv15)) = r.DecodeString()
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastUpdateTime = pkg1_v1.Time{}
+ } else {
+ yyv17 := &x.LastUpdateTime
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv17) {
+ } else if yym18 {
+ z.DecBinaryUnmarshal(yyv17)
+ } else if !yym18 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv17)
+ } else {
+ z.DecFallback(yyv17, false)
+ }
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *CertificateSigningRequestList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceCertificateSigningRequest(([]CertificateSigningRequest)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceCertificateSigningRequest(([]CertificateSigningRequest)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CertificateSigningRequestList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CertificateSigningRequestList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceCertificateSigningRequest((*[]CertificateSigningRequest)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CertificateSigningRequestList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceCertificateSigningRequest((*[]CertificateSigningRequest)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x KeyUsage) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *KeyUsage) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 codecSelfer1234) encSliceKeyUsage(v []KeyUsage, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yyv1.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceKeyUsage(v *[]KeyUsage, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []KeyUsage{}
+ 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) {
+
+ yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]KeyUsage, yyrl1)
+ }
+ } else {
+ yyv1 = make([]KeyUsage, yyrl1)
+ }
+ yyc1 = true
+ yyrr1 = len(yyv1)
+ } else if yyl1 != len(yyv1) {
+ yyv1 = yyv1[:yyl1]
+ yyc1 = true
+ }
+ yyj1 := 0
+ for ; yyj1 < yyrr1; yyj1++ {
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, "") // var yyz1 KeyUsage
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } 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 = []KeyUsage{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encMapstringExtraValue(v map[string]ExtraValue, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeMapStart(len(v))
+ for yyk1, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ yym2 := z.EncBinary()
+ _ = yym2
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yyk1))
+ }
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyv1 == nil {
+ r.EncodeNil()
+ } else {
+ yyv1.CodecEncodeSelf(e)
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) decMapstringExtraValue(v *map[string]ExtraValue, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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, 40)
+ yyv1 = make(map[string]ExtraValue, yyrl1)
+ *v = yyv1
+ }
+ var yymk1 string
+ var yymv1 ExtraValue
+ var yymg1 bool
+ if yybh1.MapValueReset {
+ yymg1 = true
+ }
+ if yyl1 > 0 {
+ for yyj1 := 0; yyj1 < yyl1; yyj1++ {
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ if r.TryDecodeAsNil() {
+ yymk1 = ""
+ } else {
+ yyv2 := &yymk1
+ yym3 := z.DecBinary()
+ _ = yym3
+ if false {
+ } else {
+ *((*string)(yyv2)) = r.DecodeString()
+ }
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv4 := &yymv1
+ yyv4.CodecDecodeSelf(d)
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } else if yyl1 < 0 {
+ for yyj1 := 0; !r.CheckBreak(); yyj1++ {
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ if r.TryDecodeAsNil() {
+ yymk1 = ""
+ } else {
+ yyv5 := &yymk1
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*string)(yyv5)) = r.DecodeString()
+ }
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv7 := &yymv1
+ yyv7.CodecDecodeSelf(d)
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } // else len==0: TODO: Should we clear map entries?
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) encExtraValue(v ExtraValue, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym2 := z.EncBinary()
+ _ = yym2
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yyv1))
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decExtraValue(v *ExtraValue, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []string{}
+ 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) {
+
+ yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]string, yyrl1)
+ }
+ } else {
+ yyv1 = make([]string, yyrl1)
+ }
+ yyc1 = true
+ yyrr1 = len(yyv1)
+ } else if yyl1 != len(yyv1) {
+ yyv1 = yyv1[:yyl1]
+ yyc1 = true
+ }
+ yyj1 := 0
+ for ; yyj1 < yyrr1; yyj1++ {
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yym3 := z.DecBinary()
+ _ = yym3
+ if false {
+ } else {
+ *((*string)(yyv2)) = r.DecodeString()
+ }
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv4 := &yyv1[yyj1]
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, "") // var yyz1 string
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv6 := &yyv1[yyj1]
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+
+ } else {
+ z.DecSwallow()
+ }
+
+ }
+ if yyj1 < len(yyv1) {
+ yyv1 = yyv1[:yyj1]
+ yyc1 = true
+ } else if yyj1 == 0 && yyv1 == nil {
+ yyv1 = []string{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceCertificateSigningRequestCondition(v []CertificateSigningRequestCondition, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceCertificateSigningRequestCondition(v *[]CertificateSigningRequestCondition, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []CertificateSigningRequestCondition{}
+ 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([]CertificateSigningRequestCondition, yyrl1)
+ }
+ } else {
+ yyv1 = make([]CertificateSigningRequestCondition, 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] = CertificateSigningRequestCondition{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, CertificateSigningRequestCondition{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = CertificateSigningRequestCondition{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, CertificateSigningRequestCondition{}) // var yyz1 CertificateSigningRequestCondition
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = CertificateSigningRequestCondition{}
+ } 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 = []CertificateSigningRequestCondition{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceCertificateSigningRequest(v []CertificateSigningRequest, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceCertificateSigningRequest(v *[]CertificateSigningRequest, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []CertificateSigningRequest{}
+ 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, 424)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]CertificateSigningRequest, yyrl1)
+ }
+ } else {
+ yyv1 = make([]CertificateSigningRequest, 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] = CertificateSigningRequest{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, CertificateSigningRequest{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = CertificateSigningRequest{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, CertificateSigningRequest{}) // var yyz1 CertificateSigningRequest
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = CertificateSigningRequest{}
+ } 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 = []CertificateSigningRequest{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/types.go b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/types.go
new file mode 100644
index 000000000..a9149ba8d
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/types.go
@@ -0,0 +1,152 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "fmt"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+
+// Describes a certificate signing request
+type CertificateSigningRequest struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // The certificate request itself and any additional information.
+ // +optional
+ Spec CertificateSigningRequestSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Derived information about the request.
+ // +optional
+ Status CertificateSigningRequestStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// This information is immutable after the request is created. Only the Request
+// and Usages fields can be set on creation, other fields are derived by
+// Kubernetes and cannot be modified by users.
+type CertificateSigningRequestSpec struct {
+ // Base64-encoded PKCS#10 CSR data
+ Request []byte `json:"request" protobuf:"bytes,1,opt,name=request"`
+
+ // allowedUsages specifies a set of usage contexts the key will be
+ // valid for.
+ // See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3
+ // https://tools.ietf.org/html/rfc5280#section-4.2.1.12
+ Usages []KeyUsage `json:"usages,omitempty" protobuf:"bytes,5,opt,name=keyUsage"`
+
+ // Information about the requesting user.
+ // See user.Info interface for details.
+ // +optional
+ Username string `json:"username,omitempty" protobuf:"bytes,2,opt,name=username"`
+ // UID information about the requesting user.
+ // See user.Info interface for details.
+ // +optional
+ UID string `json:"uid,omitempty" protobuf:"bytes,3,opt,name=uid"`
+ // Group information about the requesting user.
+ // See user.Info interface for details.
+ // +optional
+ Groups []string `json:"groups,omitempty" protobuf:"bytes,4,rep,name=groups"`
+ // Extra information about the requesting user.
+ // See user.Info interface for details.
+ // +optional
+ Extra map[string]ExtraValue `json:"extra,omitempty" protobuf:"bytes,6,rep,name=extra"`
+}
+
+// ExtraValue masks the value so protobuf can generate
+// +protobuf.nullable=true
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+type ExtraValue []string
+
+func (t ExtraValue) String() string {
+ return fmt.Sprintf("%v", []string(t))
+}
+
+type CertificateSigningRequestStatus struct {
+ // Conditions applied to the request, such as approval or denial.
+ // +optional
+ Conditions []CertificateSigningRequestCondition `json:"conditions,omitempty" protobuf:"bytes,1,rep,name=conditions"`
+
+ // If request was approved, the controller will place the issued certificate here.
+ // +optional
+ Certificate []byte `json:"certificate,omitempty" protobuf:"bytes,2,opt,name=certificate"`
+}
+
+type RequestConditionType string
+
+// These are the possible conditions for a certificate request.
+const (
+ CertificateApproved RequestConditionType = "Approved"
+ CertificateDenied RequestConditionType = "Denied"
+)
+
+type CertificateSigningRequestCondition struct {
+ // request approval state, currently Approved or Denied.
+ Type RequestConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=RequestConditionType"`
+ // brief reason for the request state
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"`
+ // human readable message with details about the request state
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"`
+ // timestamp for the last update to this condition
+ // +optional
+ LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,4,opt,name=lastUpdateTime"`
+}
+
+type CertificateSigningRequestList struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ Items []CertificateSigningRequest `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// KeyUsages specifies valid usage contexts for keys.
+// See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3
+// https://tools.ietf.org/html/rfc5280#section-4.2.1.12
+type KeyUsage string
+
+const (
+ UsageSigning KeyUsage = "signing"
+ UsageDigitalSignature KeyUsage = "digital signature"
+ UsageContentCommittment KeyUsage = "content committment"
+ UsageKeyEncipherment KeyUsage = "key encipherment"
+ UsageKeyAgreement KeyUsage = "key agreement"
+ UsageDataEncipherment KeyUsage = "data encipherment"
+ UsageCertSign KeyUsage = "cert sign"
+ UsageCRLSign KeyUsage = "crl sign"
+ UsageEncipherOnly KeyUsage = "encipher only"
+ UsageDecipherOnly KeyUsage = "decipher only"
+ UsageAny KeyUsage = "any"
+ UsageServerAuth KeyUsage = "server auth"
+ UsageClientAuth KeyUsage = "client auth"
+ UsageCodeSigning KeyUsage = "code signing"
+ UsageEmailProtection KeyUsage = "email protection"
+ UsageSMIME KeyUsage = "s/mime"
+ UsageIPsecEndSystem KeyUsage = "ipsec end system"
+ UsageIPsecTunnel KeyUsage = "ipsec tunnel"
+ UsageIPsecUser KeyUsage = "ipsec user"
+ UsageTimestamping KeyUsage = "timestamping"
+ UsageOCSPSigning KeyUsage = "ocsp signing"
+ UsageMicrosoftSGC KeyUsage = "microsoft sgc"
+ UsageNetscapSGC KeyUsage = "netscape sgc"
+)
diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..4fd91df06
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/types_swagger_doc_generated.go
@@ -0,0 +1,74 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_CertificateSigningRequest = map[string]string{
+ "": "Describes a certificate signing request",
+ "spec": "The certificate request itself and any additional information.",
+ "status": "Derived information about the request.",
+}
+
+func (CertificateSigningRequest) SwaggerDoc() map[string]string {
+ return map_CertificateSigningRequest
+}
+
+var map_CertificateSigningRequestCondition = map[string]string{
+ "type": "request approval state, currently Approved or Denied.",
+ "reason": "brief reason for the request state",
+ "message": "human readable message with details about the request state",
+ "lastUpdateTime": "timestamp for the last update to this condition",
+}
+
+func (CertificateSigningRequestCondition) SwaggerDoc() map[string]string {
+ return map_CertificateSigningRequestCondition
+}
+
+var map_CertificateSigningRequestSpec = map[string]string{
+ "": "This information is immutable after the request is created. Only the Request and Usages fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users.",
+ "request": "Base64-encoded PKCS#10 CSR data",
+ "usages": "allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3\n https://tools.ietf.org/html/rfc5280#section-4.2.1.12",
+ "username": "Information about the requesting user. See user.Info interface for details.",
+ "uid": "UID information about the requesting user. See user.Info interface for details.",
+ "groups": "Group information about the requesting user. See user.Info interface for details.",
+ "extra": "Extra information about the requesting user. See user.Info interface for details.",
+}
+
+func (CertificateSigningRequestSpec) SwaggerDoc() map[string]string {
+ return map_CertificateSigningRequestSpec
+}
+
+var map_CertificateSigningRequestStatus = map[string]string{
+ "conditions": "Conditions applied to the request, such as approval or denial.",
+ "certificate": "If request was approved, the controller will place the issued certificate here.",
+}
+
+func (CertificateSigningRequestStatus) SwaggerDoc() map[string]string {
+ return map_CertificateSigningRequestStatus
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.conversion.go
new file mode 100644
index 000000000..f13317848
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.conversion.go
@@ -0,0 +1,189 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ certificates "k8s.io/client-go/pkg/apis/certificates"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1beta1_CertificateSigningRequest_To_certificates_CertificateSigningRequest,
+ Convert_certificates_CertificateSigningRequest_To_v1beta1_CertificateSigningRequest,
+ Convert_v1beta1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition,
+ Convert_certificates_CertificateSigningRequestCondition_To_v1beta1_CertificateSigningRequestCondition,
+ Convert_v1beta1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList,
+ Convert_certificates_CertificateSigningRequestList_To_v1beta1_CertificateSigningRequestList,
+ Convert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec,
+ Convert_certificates_CertificateSigningRequestSpec_To_v1beta1_CertificateSigningRequestSpec,
+ Convert_v1beta1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus,
+ Convert_certificates_CertificateSigningRequestStatus_To_v1beta1_CertificateSigningRequestStatus,
+ )
+}
+
+func autoConvert_v1beta1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in *CertificateSigningRequest, out *certificates.CertificateSigningRequest, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_CertificateSigningRequest_To_certificates_CertificateSigningRequest is an autogenerated conversion function.
+func Convert_v1beta1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in *CertificateSigningRequest, out *certificates.CertificateSigningRequest, s conversion.Scope) error {
+ return autoConvert_v1beta1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in, out, s)
+}
+
+func autoConvert_certificates_CertificateSigningRequest_To_v1beta1_CertificateSigningRequest(in *certificates.CertificateSigningRequest, out *CertificateSigningRequest, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_certificates_CertificateSigningRequestSpec_To_v1beta1_CertificateSigningRequestSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_certificates_CertificateSigningRequestStatus_To_v1beta1_CertificateSigningRequestStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_certificates_CertificateSigningRequest_To_v1beta1_CertificateSigningRequest is an autogenerated conversion function.
+func Convert_certificates_CertificateSigningRequest_To_v1beta1_CertificateSigningRequest(in *certificates.CertificateSigningRequest, out *CertificateSigningRequest, s conversion.Scope) error {
+ return autoConvert_certificates_CertificateSigningRequest_To_v1beta1_CertificateSigningRequest(in, out, s)
+}
+
+func autoConvert_v1beta1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in *CertificateSigningRequestCondition, out *certificates.CertificateSigningRequestCondition, s conversion.Scope) error {
+ out.Type = certificates.RequestConditionType(in.Type)
+ out.Reason = in.Reason
+ out.Message = in.Message
+ out.LastUpdateTime = in.LastUpdateTime
+ return nil
+}
+
+// Convert_v1beta1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition is an autogenerated conversion function.
+func Convert_v1beta1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in *CertificateSigningRequestCondition, out *certificates.CertificateSigningRequestCondition, s conversion.Scope) error {
+ return autoConvert_v1beta1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in, out, s)
+}
+
+func autoConvert_certificates_CertificateSigningRequestCondition_To_v1beta1_CertificateSigningRequestCondition(in *certificates.CertificateSigningRequestCondition, out *CertificateSigningRequestCondition, s conversion.Scope) error {
+ out.Type = RequestConditionType(in.Type)
+ out.Reason = in.Reason
+ out.Message = in.Message
+ out.LastUpdateTime = in.LastUpdateTime
+ return nil
+}
+
+// Convert_certificates_CertificateSigningRequestCondition_To_v1beta1_CertificateSigningRequestCondition is an autogenerated conversion function.
+func Convert_certificates_CertificateSigningRequestCondition_To_v1beta1_CertificateSigningRequestCondition(in *certificates.CertificateSigningRequestCondition, out *CertificateSigningRequestCondition, s conversion.Scope) error {
+ return autoConvert_certificates_CertificateSigningRequestCondition_To_v1beta1_CertificateSigningRequestCondition(in, out, s)
+}
+
+func autoConvert_v1beta1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in *CertificateSigningRequestList, out *certificates.CertificateSigningRequestList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]certificates.CertificateSigningRequest)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1beta1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList is an autogenerated conversion function.
+func Convert_v1beta1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in *CertificateSigningRequestList, out *certificates.CertificateSigningRequestList, s conversion.Scope) error {
+ return autoConvert_v1beta1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in, out, s)
+}
+
+func autoConvert_certificates_CertificateSigningRequestList_To_v1beta1_CertificateSigningRequestList(in *certificates.CertificateSigningRequestList, out *CertificateSigningRequestList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]CertificateSigningRequest, 0)
+ } else {
+ out.Items = *(*[]CertificateSigningRequest)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_certificates_CertificateSigningRequestList_To_v1beta1_CertificateSigningRequestList is an autogenerated conversion function.
+func Convert_certificates_CertificateSigningRequestList_To_v1beta1_CertificateSigningRequestList(in *certificates.CertificateSigningRequestList, out *CertificateSigningRequestList, s conversion.Scope) error {
+ return autoConvert_certificates_CertificateSigningRequestList_To_v1beta1_CertificateSigningRequestList(in, out, s)
+}
+
+func autoConvert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in *CertificateSigningRequestSpec, out *certificates.CertificateSigningRequestSpec, s conversion.Scope) error {
+ out.Request = *(*[]byte)(unsafe.Pointer(&in.Request))
+ out.Usages = *(*[]certificates.KeyUsage)(unsafe.Pointer(&in.Usages))
+ out.Username = in.Username
+ out.UID = in.UID
+ out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups))
+ out.Extra = *(*map[string]certificates.ExtraValue)(unsafe.Pointer(&in.Extra))
+ return nil
+}
+
+// Convert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec is an autogenerated conversion function.
+func Convert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in *CertificateSigningRequestSpec, out *certificates.CertificateSigningRequestSpec, s conversion.Scope) error {
+ return autoConvert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in, out, s)
+}
+
+func autoConvert_certificates_CertificateSigningRequestSpec_To_v1beta1_CertificateSigningRequestSpec(in *certificates.CertificateSigningRequestSpec, out *CertificateSigningRequestSpec, s conversion.Scope) error {
+ if in.Request == nil {
+ out.Request = make([]byte, 0)
+ } else {
+ out.Request = *(*[]byte)(unsafe.Pointer(&in.Request))
+ }
+ out.Usages = *(*[]KeyUsage)(unsafe.Pointer(&in.Usages))
+ out.Username = in.Username
+ out.UID = in.UID
+ out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups))
+ out.Extra = *(*map[string]ExtraValue)(unsafe.Pointer(&in.Extra))
+ return nil
+}
+
+// Convert_certificates_CertificateSigningRequestSpec_To_v1beta1_CertificateSigningRequestSpec is an autogenerated conversion function.
+func Convert_certificates_CertificateSigningRequestSpec_To_v1beta1_CertificateSigningRequestSpec(in *certificates.CertificateSigningRequestSpec, out *CertificateSigningRequestSpec, s conversion.Scope) error {
+ return autoConvert_certificates_CertificateSigningRequestSpec_To_v1beta1_CertificateSigningRequestSpec(in, out, s)
+}
+
+func autoConvert_v1beta1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in *CertificateSigningRequestStatus, out *certificates.CertificateSigningRequestStatus, s conversion.Scope) error {
+ out.Conditions = *(*[]certificates.CertificateSigningRequestCondition)(unsafe.Pointer(&in.Conditions))
+ out.Certificate = *(*[]byte)(unsafe.Pointer(&in.Certificate))
+ return nil
+}
+
+// Convert_v1beta1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus is an autogenerated conversion function.
+func Convert_v1beta1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in *CertificateSigningRequestStatus, out *certificates.CertificateSigningRequestStatus, s conversion.Scope) error {
+ return autoConvert_v1beta1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in, out, s)
+}
+
+func autoConvert_certificates_CertificateSigningRequestStatus_To_v1beta1_CertificateSigningRequestStatus(in *certificates.CertificateSigningRequestStatus, out *CertificateSigningRequestStatus, s conversion.Scope) error {
+ out.Conditions = *(*[]CertificateSigningRequestCondition)(unsafe.Pointer(&in.Conditions))
+ out.Certificate = *(*[]byte)(unsafe.Pointer(&in.Certificate))
+ return nil
+}
+
+// Convert_certificates_CertificateSigningRequestStatus_To_v1beta1_CertificateSigningRequestStatus is an autogenerated conversion function.
+func Convert_certificates_CertificateSigningRequestStatus_To_v1beta1_CertificateSigningRequestStatus(in *certificates.CertificateSigningRequestStatus, out *CertificateSigningRequestStatus, s conversion.Scope) error {
+ return autoConvert_certificates_CertificateSigningRequestStatus_To_v1beta1_CertificateSigningRequestStatus(in, out, s)
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..f3f172c70
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.deepcopy.go
@@ -0,0 +1,155 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CertificateSigningRequest, InType: reflect.TypeOf(&CertificateSigningRequest{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CertificateSigningRequestCondition, InType: reflect.TypeOf(&CertificateSigningRequestCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CertificateSigningRequestList, InType: reflect.TypeOf(&CertificateSigningRequestList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CertificateSigningRequestSpec, InType: reflect.TypeOf(&CertificateSigningRequestSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CertificateSigningRequestStatus, InType: reflect.TypeOf(&CertificateSigningRequestStatus{})},
+ )
+}
+
+// DeepCopy_v1beta1_CertificateSigningRequest is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_CertificateSigningRequest(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CertificateSigningRequest)
+ out := out.(*CertificateSigningRequest)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_CertificateSigningRequestSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_CertificateSigningRequestStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_CertificateSigningRequestCondition is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_CertificateSigningRequestCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CertificateSigningRequestCondition)
+ out := out.(*CertificateSigningRequestCondition)
+ *out = *in
+ out.LastUpdateTime = in.LastUpdateTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_CertificateSigningRequestList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_CertificateSigningRequestList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CertificateSigningRequestList)
+ out := out.(*CertificateSigningRequestList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]CertificateSigningRequest, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_CertificateSigningRequest(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_CertificateSigningRequestSpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_CertificateSigningRequestSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CertificateSigningRequestSpec)
+ out := out.(*CertificateSigningRequestSpec)
+ *out = *in
+ if in.Request != nil {
+ in, out := &in.Request, &out.Request
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ }
+ if in.Usages != nil {
+ in, out := &in.Usages, &out.Usages
+ *out = make([]KeyUsage, len(*in))
+ copy(*out, *in)
+ }
+ if in.Groups != nil {
+ in, out := &in.Groups, &out.Groups
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Extra != nil {
+ in, out := &in.Extra, &out.Extra
+ *out = make(map[string]ExtraValue)
+ for key, val := range *in {
+ if newVal, err := c.DeepCopy(&val); err != nil {
+ return err
+ } else {
+ (*out)[key] = *newVal.(*ExtraValue)
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_CertificateSigningRequestStatus is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_CertificateSigningRequestStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CertificateSigningRequestStatus)
+ out := out.(*CertificateSigningRequestStatus)
+ *out = *in
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]CertificateSigningRequestCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_CertificateSigningRequestCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Certificate != nil {
+ in, out := &in.Certificate, &out.Certificate
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.defaults.go
new file mode 100644
index 000000000..3c5ae0362
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.defaults.go
@@ -0,0 +1,47 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ scheme.AddTypeDefaultingFunc(&CertificateSigningRequest{}, func(obj interface{}) { SetObjectDefaults_CertificateSigningRequest(obj.(*CertificateSigningRequest)) })
+ scheme.AddTypeDefaultingFunc(&CertificateSigningRequestList{}, func(obj interface{}) {
+ SetObjectDefaults_CertificateSigningRequestList(obj.(*CertificateSigningRequestList))
+ })
+ return nil
+}
+
+func SetObjectDefaults_CertificateSigningRequest(in *CertificateSigningRequest) {
+ SetDefaults_CertificateSigningRequestSpec(&in.Spec)
+}
+
+func SetObjectDefaults_CertificateSigningRequestList(in *CertificateSigningRequestList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_CertificateSigningRequest(a)
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/certificates/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/certificates/zz_generated.deepcopy.go
new file mode 100644
index 000000000..589e94c0e
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/certificates/zz_generated.deepcopy.go
@@ -0,0 +1,155 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package certificates
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_certificates_CertificateSigningRequest, InType: reflect.TypeOf(&CertificateSigningRequest{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_certificates_CertificateSigningRequestCondition, InType: reflect.TypeOf(&CertificateSigningRequestCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_certificates_CertificateSigningRequestList, InType: reflect.TypeOf(&CertificateSigningRequestList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_certificates_CertificateSigningRequestSpec, InType: reflect.TypeOf(&CertificateSigningRequestSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_certificates_CertificateSigningRequestStatus, InType: reflect.TypeOf(&CertificateSigningRequestStatus{})},
+ )
+}
+
+// DeepCopy_certificates_CertificateSigningRequest is an autogenerated deepcopy function.
+func DeepCopy_certificates_CertificateSigningRequest(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CertificateSigningRequest)
+ out := out.(*CertificateSigningRequest)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_certificates_CertificateSigningRequestSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_certificates_CertificateSigningRequestStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_certificates_CertificateSigningRequestCondition is an autogenerated deepcopy function.
+func DeepCopy_certificates_CertificateSigningRequestCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CertificateSigningRequestCondition)
+ out := out.(*CertificateSigningRequestCondition)
+ *out = *in
+ out.LastUpdateTime = in.LastUpdateTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_certificates_CertificateSigningRequestList is an autogenerated deepcopy function.
+func DeepCopy_certificates_CertificateSigningRequestList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CertificateSigningRequestList)
+ out := out.(*CertificateSigningRequestList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]CertificateSigningRequest, len(*in))
+ for i := range *in {
+ if err := DeepCopy_certificates_CertificateSigningRequest(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_certificates_CertificateSigningRequestSpec is an autogenerated deepcopy function.
+func DeepCopy_certificates_CertificateSigningRequestSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CertificateSigningRequestSpec)
+ out := out.(*CertificateSigningRequestSpec)
+ *out = *in
+ if in.Request != nil {
+ in, out := &in.Request, &out.Request
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ }
+ if in.Usages != nil {
+ in, out := &in.Usages, &out.Usages
+ *out = make([]KeyUsage, len(*in))
+ copy(*out, *in)
+ }
+ if in.Groups != nil {
+ in, out := &in.Groups, &out.Groups
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Extra != nil {
+ in, out := &in.Extra, &out.Extra
+ *out = make(map[string]ExtraValue)
+ for key, val := range *in {
+ if newVal, err := c.DeepCopy(&val); err != nil {
+ return err
+ } else {
+ (*out)[key] = *newVal.(*ExtraValue)
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_certificates_CertificateSigningRequestStatus is an autogenerated deepcopy function.
+func DeepCopy_certificates_CertificateSigningRequestStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CertificateSigningRequestStatus)
+ out := out.(*CertificateSigningRequestStatus)
+ *out = *in
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]CertificateSigningRequestCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_certificates_CertificateSigningRequestCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Certificate != nil {
+ in, out := &in.Certificate, &out.Certificate
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/extensions/doc.go b/vendor/k8s.io/client-go/pkg/apis/extensions/doc.go
new file mode 100644
index 000000000..87edee41c
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/extensions/doc.go
@@ -0,0 +1,17 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package extensions
diff --git a/vendor/k8s.io/client-go/pkg/apis/extensions/helpers.go b/vendor/k8s.io/client-go/pkg/apis/extensions/helpers.go
new file mode 100644
index 000000000..27d3e23ad
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/extensions/helpers.go
@@ -0,0 +1,37 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package extensions
+
+import (
+ "strings"
+)
+
+// SysctlsFromPodSecurityPolicyAnnotation parses an annotation value of the key
+// SysctlsSecurityPolocyAnnotationKey into a slice of sysctls. An empty slice
+// is returned if annotation is the empty string.
+func SysctlsFromPodSecurityPolicyAnnotation(annotation string) ([]string, error) {
+ if len(annotation) == 0 {
+ return []string{}, nil
+ }
+
+ return strings.Split(annotation, ","), nil
+}
+
+// PodAnnotationsFromSysctls creates an annotation value for a slice of Sysctls.
+func PodAnnotationsFromSysctls(sysctls []string) string {
+ return strings.Join(sysctls, ",")
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/extensions/register.go b/vendor/k8s.io/client-go/pkg/apis/extensions/register.go
new file mode 100644
index 000000000..5983636c2
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/extensions/register.go
@@ -0,0 +1,70 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package extensions
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "extensions"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ // TODO this gets cleaned up when the types are fixed
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Deployment{},
+ &DeploymentList{},
+ &DeploymentRollback{},
+ &ReplicationControllerDummy{},
+ &Scale{},
+ &ThirdPartyResource{},
+ &ThirdPartyResourceList{},
+ &DaemonSetList{},
+ &DaemonSet{},
+ &ThirdPartyResourceData{},
+ &ThirdPartyResourceDataList{},
+ &Ingress{},
+ &IngressList{},
+ &ReplicaSet{},
+ &ReplicaSetList{},
+ &PodSecurityPolicy{},
+ &PodSecurityPolicyList{},
+ &NetworkPolicy{},
+ &NetworkPolicyList{},
+ )
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/extensions/types.go b/vendor/k8s.io/client-go/pkg/apis/extensions/types.go
new file mode 100644
index 000000000..48031d8df
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/extensions/types.go
@@ -0,0 +1,1147 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+/*
+This file (together with pkg/apis/extensions/v1beta1/types.go) contain the experimental
+types in kubernetes. These API objects are experimental, meaning that the
+APIs may be broken at any time by the kubernetes team.
+
+DISCLAIMER: The implementation of the experimental API group itself is
+a temporary one meant as a stopgap solution until kubernetes has proper
+support for multiple API groups. The transition may require changes
+beyond registration differences. In other words, experimental API group
+support is experimental.
+*/
+
+package extensions
+
+import (
+ "k8s.io/apimachinery/pkg/api/resource"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/util/intstr"
+ "k8s.io/client-go/pkg/api"
+)
+
+const (
+ // SysctlsPodSecurityPolicyAnnotationKey represents the key of a whitelist of
+ // allowed safe and unsafe sysctls in a pod spec. It's a comma-separated list of plain sysctl
+ // names or sysctl patterns (which end in *). The string "*" matches all sysctls.
+ SysctlsPodSecurityPolicyAnnotationKey string = "security.alpha.kubernetes.io/sysctls"
+)
+
+// describes the attributes of a scale subresource
+type ScaleSpec struct {
+ // desired number of instances for the scaled object.
+ // +optional
+ Replicas int32
+}
+
+// represents the current status of a scale subresource.
+type ScaleStatus struct {
+ // actual number of observed instances of the scaled object.
+ Replicas int32
+
+ // label query over pods that should match the replicas count.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ Selector *metav1.LabelSelector
+}
+
+// +genclient=true
+// +noMethods=true
+
+// represents a scaling request for a resource.
+type Scale struct {
+ metav1.TypeMeta
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
+ // +optional
+ metav1.ObjectMeta
+
+ // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
+ // +optional
+ Spec ScaleSpec
+
+ // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.
+ // +optional
+ Status ScaleStatus
+}
+
+// Dummy definition
+type ReplicationControllerDummy struct {
+ metav1.TypeMeta
+}
+
+// Alpha-level support for Custom Metrics in HPA (as annotations).
+type CustomMetricTarget struct {
+ // Custom Metric name.
+ Name string
+ // Custom Metric value (average).
+ TargetValue resource.Quantity
+}
+
+type CustomMetricTargetList struct {
+ Items []CustomMetricTarget
+}
+
+type CustomMetricCurrentStatus struct {
+ // Custom Metric name.
+ Name string
+ // Custom Metric value (average).
+ CurrentValue resource.Quantity
+}
+
+type CustomMetricCurrentStatusList struct {
+ Items []CustomMetricCurrentStatus
+}
+
+// +genclient=true
+// +nonNamespaced=true
+
+// A ThirdPartyResource is a generic representation of a resource, it is used by add-ons and plugins to add new resource
+// types to the API. It consists of one or more Versions of the api.
+type ThirdPartyResource struct {
+ metav1.TypeMeta
+
+ // Standard object metadata
+ // +optional
+ metav1.ObjectMeta
+
+ // Description is the description of this object.
+ // +optional
+ Description string
+
+ // Versions are versions for this third party object
+ Versions []APIVersion
+}
+
+type ThirdPartyResourceList struct {
+ metav1.TypeMeta
+
+ // Standard list metadata.
+ // +optional
+ metav1.ListMeta
+
+ // Items is the list of horizontal pod autoscalers.
+ Items []ThirdPartyResource
+}
+
+// An APIVersion represents a single concrete version of an object model.
+// TODO: we should consider merge this struct with GroupVersion in metav1.go
+type APIVersion struct {
+ // Name of this version (e.g. 'v1').
+ Name string
+}
+
+// An internal object, used for versioned storage in etcd. Not exposed to the end user.
+type ThirdPartyResourceData struct {
+ metav1.TypeMeta
+ // Standard object metadata.
+ // +optional
+ metav1.ObjectMeta
+
+ // Data is the raw JSON data for this data.
+ // +optional
+ Data []byte
+}
+
+// +genclient=true
+
+type Deployment struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Specification of the desired behavior of the Deployment.
+ // +optional
+ Spec DeploymentSpec
+
+ // Most recently observed status of the Deployment.
+ // +optional
+ Status DeploymentStatus
+}
+
+type DeploymentSpec struct {
+ // Number of desired pods. This is a pointer to distinguish between explicit
+ // zero and not specified. Defaults to 1.
+ // +optional
+ Replicas int32
+
+ // Label selector for pods. Existing ReplicaSets whose pods are
+ // selected by this will be the ones affected by this deployment.
+ // +optional
+ Selector *metav1.LabelSelector
+
+ // Template describes the pods that will be created.
+ Template api.PodTemplateSpec
+
+ // The deployment strategy to use to replace existing pods with new ones.
+ // +optional
+ Strategy DeploymentStrategy
+
+ // Minimum number of seconds for which a newly created pod should be ready
+ // without any of its container crashing, for it to be considered available.
+ // Defaults to 0 (pod will be considered available as soon as it is ready)
+ // +optional
+ MinReadySeconds int32
+
+ // The number of old ReplicaSets to retain to allow rollback.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ // +optional
+ RevisionHistoryLimit *int32
+
+ // Indicates that the deployment is paused and will not be processed by the
+ // deployment controller.
+ // +optional
+ Paused bool
+
+ // The config this deployment is rolling back to. Will be cleared after rollback is done.
+ // +optional
+ RollbackTo *RollbackConfig
+
+ // The maximum time in seconds for a deployment to make progress before it
+ // is considered to be failed. The deployment controller will continue to
+ // process failed deployments and a condition with a ProgressDeadlineExceeded
+ // reason will be surfaced in the deployment status. Once autoRollback is
+ // implemented, the deployment controller will automatically rollback failed
+ // deployments. Note that progress will not be estimated during the time a
+ // deployment is paused. This is not set by default.
+ ProgressDeadlineSeconds *int32
+}
+
+// DeploymentRollback stores the information required to rollback a deployment.
+type DeploymentRollback struct {
+ metav1.TypeMeta
+ // Required: This must match the Name of a deployment.
+ Name string
+ // The annotations to be updated to a deployment
+ // +optional
+ UpdatedAnnotations map[string]string
+ // The config of this deployment rollback.
+ RollbackTo RollbackConfig
+}
+
+type RollbackConfig struct {
+ // The revision to rollback to. If set to 0, rollback to the last revision.
+ // +optional
+ Revision int64
+}
+
+const (
+ // DefaultDeploymentUniqueLabelKey is the default key of the selector that is added
+ // to existing RCs (and label key that is added to its pods) to prevent the existing RCs
+ // to select new pods (and old pods being select by new RC).
+ DefaultDeploymentUniqueLabelKey string = "pod-template-hash"
+)
+
+type DeploymentStrategy struct {
+ // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
+ // +optional
+ Type DeploymentStrategyType
+
+ // Rolling update config params. Present only if DeploymentStrategyType =
+ // RollingUpdate.
+ //---
+ // TODO: Update this to follow our convention for oneOf, whatever we decide it
+ // to be.
+ // +optional
+ RollingUpdate *RollingUpdateDeployment
+}
+
+type DeploymentStrategyType string
+
+const (
+ // Kill all existing pods before creating new ones.
+ RecreateDeploymentStrategyType DeploymentStrategyType = "Recreate"
+
+ // Replace the old RCs by new one using rolling update i.e gradually scale down the old RCs and scale up the new one.
+ RollingUpdateDeploymentStrategyType DeploymentStrategyType = "RollingUpdate"
+)
+
+// Spec to control the desired behavior of rolling update.
+type RollingUpdateDeployment struct {
+ // The maximum number of pods that can be unavailable during the update.
+ // Value can be an absolute number (ex: 5) or a percentage of total pods at the start of update (ex: 10%).
+ // Absolute number is calculated from percentage by rounding down.
+ // This can not be 0 if MaxSurge is 0.
+ // By default, a fixed value of 1 is used.
+ // Example: when this is set to 30%, the old RC can be scaled down by 30%
+ // immediately when the rolling update starts. Once new pods are ready, old RC
+ // can be scaled down further, followed by scaling up the new RC, ensuring
+ // that at least 70% of original number of pods are available at all times
+ // during the update.
+ // +optional
+ MaxUnavailable intstr.IntOrString
+
+ // The maximum number of pods that can be scheduled above the original number of
+ // pods.
+ // Value can be an absolute number (ex: 5) or a percentage of total pods at
+ // the start of the update (ex: 10%). This can not be 0 if MaxUnavailable is 0.
+ // Absolute number is calculated from percentage by rounding up.
+ // By default, a value of 1 is used.
+ // Example: when this is set to 30%, the new RC can be scaled up by 30%
+ // immediately when the rolling update starts. Once old pods have been killed,
+ // new RC can be scaled up further, ensuring that total number of pods running
+ // at any time during the update is atmost 130% of original pods.
+ // +optional
+ MaxSurge intstr.IntOrString
+}
+
+type DeploymentStatus struct {
+ // The generation observed by the deployment controller.
+ // +optional
+ ObservedGeneration int64
+
+ // Total number of non-terminated pods targeted by this deployment (their labels match the selector).
+ // +optional
+ Replicas int32
+
+ // Total number of non-terminated pods targeted by this deployment that have the desired template spec.
+ // +optional
+ UpdatedReplicas int32
+
+ // Total number of ready pods targeted by this deployment.
+ // +optional
+ ReadyReplicas int32
+
+ // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
+ // +optional
+ AvailableReplicas int32
+
+ // Total number of unavailable pods targeted by this deployment.
+ // +optional
+ UnavailableReplicas int32
+
+ // Represents the latest available observations of a deployment's current state.
+ Conditions []DeploymentCondition
+
+ // Count of hash collisions for the Deployment. The Deployment controller uses this
+ // field as a collision avoidance mechanism when it needs to create the name for the
+ // newest ReplicaSet.
+ // +optional
+ CollisionCount *int64
+}
+
+type DeploymentConditionType string
+
+// These are valid conditions of a deployment.
+const (
+ // Available means the deployment is available, ie. at least the minimum available
+ // replicas required are up and running for at least minReadySeconds.
+ DeploymentAvailable DeploymentConditionType = "Available"
+ // Progressing means the deployment is progressing. Progress for a deployment is
+ // considered when a new replica set is created or adopted, and when new pods scale
+ // up or old pods scale down. Progress is not estimated for paused deployments or
+ // when progressDeadlineSeconds is not specified.
+ DeploymentProgressing DeploymentConditionType = "Progressing"
+ // ReplicaFailure is added in a deployment when one of its pods fails to be created
+ // or deleted.
+ DeploymentReplicaFailure DeploymentConditionType = "ReplicaFailure"
+)
+
+// DeploymentCondition describes the state of a deployment at a certain point.
+type DeploymentCondition struct {
+ // Type of deployment condition.
+ Type DeploymentConditionType
+ // Status of the condition, one of True, False, Unknown.
+ Status api.ConditionStatus
+ // The last time this condition was updated.
+ LastUpdateTime metav1.Time
+ // Last time the condition transitioned from one status to another.
+ LastTransitionTime metav1.Time
+ // The reason for the condition's last transition.
+ Reason string
+ // A human readable message indicating details about the transition.
+ Message string
+}
+
+type DeploymentList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ // Items is the list of deployments.
+ Items []Deployment
+}
+
+type DaemonSetUpdateStrategy struct {
+ // Type of daemon set update. Can be "RollingUpdate" or "OnDelete".
+ // Default is OnDelete.
+ // +optional
+ Type DaemonSetUpdateStrategyType
+
+ // Rolling update config params. Present only if type = "RollingUpdate".
+ //---
+ // TODO: Update this to follow our convention for oneOf, whatever we decide it
+ // to be. Same as Deployment `strategy.rollingUpdate`.
+ // See https://github.com/kubernetes/kubernetes/issues/35345
+ // +optional
+ RollingUpdate *RollingUpdateDaemonSet
+}
+
+type DaemonSetUpdateStrategyType string
+
+const (
+ // Replace the old daemons by new ones using rolling update i.e replace them on each node one after the other.
+ RollingUpdateDaemonSetStrategyType DaemonSetUpdateStrategyType = "RollingUpdate"
+
+ // Replace the old daemons only when it's killed
+ OnDeleteDaemonSetStrategyType DaemonSetUpdateStrategyType = "OnDelete"
+)
+
+// Spec to control the desired behavior of daemon set rolling update.
+type RollingUpdateDaemonSet struct {
+ // The maximum number of DaemonSet pods that can be unavailable during the
+ // update. Value can be an absolute number (ex: 5) or a percentage of total
+ // number of DaemonSet pods at the start of the update (ex: 10%). Absolute
+ // number is calculated from percentage by rounding up.
+ // This cannot be 0.
+ // Default value is 1.
+ // Example: when this is set to 30%, at most 30% of the total number of nodes
+ // that should be running the daemon pod (i.e. status.desiredNumberScheduled)
+ // can have their pods stopped for an update at any given
+ // time. The update starts by stopping at most 30% of those DaemonSet pods
+ // and then brings up new DaemonSet pods in their place. Once the new pods
+ // are available, it then proceeds onto other DaemonSet pods, thus ensuring
+ // that at least 70% of original number of DaemonSet pods are available at
+ // all times during the update.
+ // +optional
+ MaxUnavailable intstr.IntOrString
+}
+
+// DaemonSetSpec is the specification of a daemon set.
+type DaemonSetSpec struct {
+ // A label query over pods that are managed by the daemon set.
+ // Must match in order to be controlled.
+ // If empty, defaulted to labels on Pod template.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ Selector *metav1.LabelSelector
+
+ // An object that describes the pod that will be created.
+ // The DaemonSet will create exactly one copy of this pod on every node
+ // that matches the template's node selector (or on every node if no node
+ // selector is specified).
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
+ Template api.PodTemplateSpec
+
+ // An update strategy to replace existing DaemonSet pods with new pods.
+ // +optional
+ UpdateStrategy DaemonSetUpdateStrategy
+
+ // The minimum number of seconds for which a newly created DaemonSet pod should
+ // be ready without any of its container crashing, for it to be considered
+ // available. Defaults to 0 (pod will be considered available as soon as it
+ // is ready).
+ // +optional
+ MinReadySeconds int32
+
+ // DEPRECATED.
+ // A sequence number representing a specific generation of the template.
+ // Populated by the system. It can be set only during the creation.
+ // +optional
+ TemplateGeneration int64
+
+ // The number of old history to retain to allow rollback.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ // Defaults to 10.
+ // +optional
+ RevisionHistoryLimit *int32
+}
+
+// DaemonSetStatus represents the current status of a daemon set.
+type DaemonSetStatus struct {
+ // The number of nodes that are running at least 1
+ // daemon pod and are supposed to run the daemon pod.
+ CurrentNumberScheduled int32
+
+ // The number of nodes that are running the daemon pod, but are
+ // not supposed to run the daemon pod.
+ NumberMisscheduled int32
+
+ // The total number of nodes that should be running the daemon
+ // pod (including nodes correctly running the daemon pod).
+ DesiredNumberScheduled int32
+
+ // The number of nodes that should be running the daemon pod and have one
+ // or more of the daemon pod running and ready.
+ NumberReady int32
+
+ // The most recent generation observed by the daemon set controller.
+ // +optional
+ ObservedGeneration int64
+
+ // The total number of nodes that are running updated daemon pod
+ // +optional
+ UpdatedNumberScheduled int32
+
+ // The number of nodes that should be running the
+ // daemon pod and have one or more of the daemon pod running and
+ // available (ready for at least spec.minReadySeconds)
+ // +optional
+ NumberAvailable int32
+
+ // The number of nodes that should be running the
+ // daemon pod and have none of the daemon pod running and available
+ // (ready for at least spec.minReadySeconds)
+ // +optional
+ NumberUnavailable int32
+
+ // Count of hash collisions for the DaemonSet. The DaemonSet controller
+ // uses this field as a collision avoidance mechanism when it needs to
+ // create the name for the newest ControllerRevision.
+ // +optional
+ CollisionCount *int64
+}
+
+// +genclient=true
+
+// DaemonSet represents the configuration of a daemon set.
+type DaemonSet struct {
+ metav1.TypeMeta
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta
+
+ // The desired behavior of this daemon set.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec DaemonSetSpec
+
+ // The current status of this daemon set. This data may be
+ // out of date by some window of time.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status DaemonSetStatus
+}
+
+const (
+ // DEPRECATED: DefaultDaemonSetUniqueLabelKey is used instead.
+ // DaemonSetTemplateGenerationKey is the key of the labels that is added
+ // to daemon set pods to distinguish between old and new pod templates
+ // during DaemonSet template update.
+ DaemonSetTemplateGenerationKey string = "pod-template-generation"
+)
+
+// DaemonSetList is a collection of daemon sets.
+type DaemonSetList struct {
+ metav1.TypeMeta
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta
+
+ // A list of daemon sets.
+ Items []DaemonSet
+}
+
+type ThirdPartyResourceDataList struct {
+ metav1.TypeMeta
+ // Standard list metadata
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta
+ // Items is a list of third party objects
+ Items []ThirdPartyResourceData
+}
+
+// +genclient=true
+
+// Ingress is a collection of rules that allow inbound connections to reach the
+// endpoints defined by a backend. An Ingress can be configured to give services
+// externally-reachable urls, load balance traffic, terminate SSL, offer name
+// based virtual hosting etc.
+type Ingress struct {
+ metav1.TypeMeta
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta
+
+ // Spec is the desired state of the Ingress.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec IngressSpec
+
+ // Status is the current state of the Ingress.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status IngressStatus
+}
+
+// IngressList is a collection of Ingress.
+type IngressList struct {
+ metav1.TypeMeta
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta
+
+ // Items is the list of Ingress.
+ Items []Ingress
+}
+
+// IngressSpec describes the Ingress the user wishes to exist.
+type IngressSpec struct {
+ // A default backend capable of servicing requests that don't match any
+ // rule. At least one of 'backend' or 'rules' must be specified. This field
+ // is optional to allow the loadbalancer controller or defaulting logic to
+ // specify a global default.
+ // +optional
+ Backend *IngressBackend
+
+ // TLS configuration. Currently the Ingress only supports a single TLS
+ // port, 443. If multiple members of this list specify different hosts, they
+ // will be multiplexed on the same port according to the hostname specified
+ // through the SNI TLS extension, if the ingress controller fulfilling the
+ // ingress supports SNI.
+ // +optional
+ TLS []IngressTLS
+
+ // A list of host rules used to configure the Ingress. If unspecified, or
+ // no rule matches, all traffic is sent to the default backend.
+ // +optional
+ Rules []IngressRule
+ // TODO: Add the ability to specify load-balancer IP through claims
+}
+
+// IngressTLS describes the transport layer security associated with an Ingress.
+type IngressTLS struct {
+ // Hosts are a list of hosts included in the TLS certificate. The values in
+ // this list must match the name/s used in the tlsSecret. Defaults to the
+ // wildcard host setting for the loadbalancer controller fulfilling this
+ // Ingress, if left unspecified.
+ // +optional
+ Hosts []string
+ // SecretName is the name of the secret used to terminate SSL traffic on 443.
+ // Field is left optional to allow SSL routing based on SNI hostname alone.
+ // If the SNI host in a listener conflicts with the "Host" header field used
+ // by an IngressRule, the SNI host is used for termination and value of the
+ // Host header is used for routing.
+ // +optional
+ SecretName string
+ // TODO: Consider specifying different modes of termination, protocols etc.
+}
+
+// IngressStatus describe the current state of the Ingress.
+type IngressStatus struct {
+ // LoadBalancer contains the current status of the load-balancer.
+ // +optional
+ LoadBalancer api.LoadBalancerStatus
+}
+
+// IngressRule represents the rules mapping the paths under a specified host to
+// the related backend services. Incoming requests are first evaluated for a host
+// match, then routed to the backend associated with the matching IngressRuleValue.
+type IngressRule struct {
+ // Host is the fully qualified domain name of a network host, as defined
+ // by RFC 3986. Note the following deviations from the "host" part of the
+ // URI as defined in the RFC:
+ // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the
+ // IP in the Spec of the parent Ingress.
+ // 2. The `:` delimiter is not respected because ports are not allowed.
+ // Currently the port of an Ingress is implicitly :80 for http and
+ // :443 for https.
+ // Both these may change in the future.
+ // Incoming requests are matched against the host before the IngressRuleValue.
+ // If the host is unspecified, the Ingress routes all traffic based on the
+ // specified IngressRuleValue.
+ // +optional
+ Host string
+ // IngressRuleValue represents a rule to route requests for this IngressRule.
+ // If unspecified, the rule defaults to a http catch-all. Whether that sends
+ // just traffic matching the host to the default backend or all traffic to the
+ // default backend, is left to the controller fulfilling the Ingress. Http is
+ // currently the only supported IngressRuleValue.
+ // +optional
+ IngressRuleValue
+}
+
+// IngressRuleValue represents a rule to apply against incoming requests. If the
+// rule is satisfied, the request is routed to the specified backend. Currently
+// mixing different types of rules in a single Ingress is disallowed, so exactly
+// one of the following must be set.
+type IngressRuleValue struct {
+ //TODO:
+ // 1. Consider renaming this resource and the associated rules so they
+ // aren't tied to Ingress. They can be used to route intra-cluster traffic.
+ // 2. Consider adding fields for ingress-type specific global options
+ // usable by a loadbalancer, like http keep-alive.
+
+ // +optional
+ HTTP *HTTPIngressRuleValue
+}
+
+// HTTPIngressRuleValue is a list of http selectors pointing to backends.
+// In the example: http://<host>/<path>?<searchpart> -> backend where
+// where parts of the url correspond to RFC 3986, this resource will be used
+// to match against everything after the last '/' and before the first '?'
+// or '#'.
+type HTTPIngressRuleValue struct {
+ // A collection of paths that map requests to backends.
+ Paths []HTTPIngressPath
+ // TODO: Consider adding fields for ingress-type specific global
+ // options usable by a loadbalancer, like http keep-alive.
+}
+
+// HTTPIngressPath associates a path regex with a backend. Incoming urls matching
+// the path are forwarded to the backend.
+type HTTPIngressPath struct {
+ // Path is an extended POSIX regex as defined by IEEE Std 1003.1,
+ // (i.e this follows the egrep/unix syntax, not the perl syntax)
+ // matched against the path of an incoming request. Currently it can
+ // contain characters disallowed from the conventional "path"
+ // part of a URL as defined by RFC 3986. Paths must begin with
+ // a '/'. If unspecified, the path defaults to a catch all sending
+ // traffic to the backend.
+ // +optional
+ Path string
+
+ // Backend defines the referenced service endpoint to which the traffic
+ // will be forwarded to.
+ Backend IngressBackend
+}
+
+// IngressBackend describes all endpoints for a given service and port.
+type IngressBackend struct {
+ // Specifies the name of the referenced service.
+ ServiceName string
+
+ // Specifies the port of the referenced service.
+ ServicePort intstr.IntOrString
+}
+
+// +genclient=true
+
+// ReplicaSet represents the configuration of a replica set.
+type ReplicaSet struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Spec defines the desired behavior of this ReplicaSet.
+ // +optional
+ Spec ReplicaSetSpec
+
+ // Status is the current status of this ReplicaSet. This data may be
+ // out of date by some window of time.
+ // +optional
+ Status ReplicaSetStatus
+}
+
+// ReplicaSetList is a collection of ReplicaSets.
+type ReplicaSetList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []ReplicaSet
+}
+
+// ReplicaSetSpec is the specification of a ReplicaSet.
+// As the internal representation of a ReplicaSet, it must have
+// a Template set.
+type ReplicaSetSpec struct {
+ // Replicas is the number of desired replicas.
+ Replicas int32
+
+ // Minimum number of seconds for which a newly created pod should be ready
+ // without any of its container crashing, for it to be considered available.
+ // Defaults to 0 (pod will be considered available as soon as it is ready)
+ // +optional
+ MinReadySeconds int32
+
+ // Selector is a label query over pods that should match the replica count.
+ // Must match in order to be controlled.
+ // If empty, defaulted to labels on pod template.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ Selector *metav1.LabelSelector
+
+ // Template is the object that describes the pod that will be created if
+ // insufficient replicas are detected.
+ // +optional
+ Template api.PodTemplateSpec
+}
+
+// ReplicaSetStatus represents the current status of a ReplicaSet.
+type ReplicaSetStatus struct {
+ // Replicas is the number of actual replicas.
+ Replicas int32
+
+ // The number of pods that have labels matching the labels of the pod template of the replicaset.
+ // +optional
+ FullyLabeledReplicas int32
+
+ // The number of ready replicas for this replica set.
+ // +optional
+ ReadyReplicas int32
+
+ // The number of available replicas (ready for at least minReadySeconds) for this replica set.
+ // +optional
+ AvailableReplicas int32
+
+ // ObservedGeneration is the most recent generation observed by the controller.
+ // +optional
+ ObservedGeneration int64
+
+ // Represents the latest available observations of a replica set's current state.
+ // +optional
+ Conditions []ReplicaSetCondition
+}
+
+type ReplicaSetConditionType string
+
+// These are valid conditions of a replica set.
+const (
+ // ReplicaSetReplicaFailure is added in a replica set when one of its pods fails to be created
+ // due to insufficient quota, limit ranges, pod security policy, node selectors, etc. or deleted
+ // due to kubelet being down or finalizers are failing.
+ ReplicaSetReplicaFailure ReplicaSetConditionType = "ReplicaFailure"
+)
+
+// ReplicaSetCondition describes the state of a replica set at a certain point.
+type ReplicaSetCondition struct {
+ // Type of replica set condition.
+ Type ReplicaSetConditionType
+ // Status of the condition, one of True, False, Unknown.
+ Status api.ConditionStatus
+ // The last time the condition transitioned from one status to another.
+ // +optional
+ LastTransitionTime metav1.Time
+ // The reason for the condition's last transition.
+ // +optional
+ Reason string
+ // A human readable message indicating details about the transition.
+ // +optional
+ Message string
+}
+
+// +genclient=true
+// +nonNamespaced=true
+
+// PodSecurityPolicy governs the ability to make requests that affect the SecurityContext
+// that will be applied to a pod and container.
+type PodSecurityPolicy struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Spec defines the policy enforced.
+ // +optional
+ Spec PodSecurityPolicySpec
+}
+
+// PodSecurityPolicySpec defines the policy enforced.
+type PodSecurityPolicySpec struct {
+ // Privileged determines if a pod can request to be run as privileged.
+ // +optional
+ Privileged bool
+ // DefaultAddCapabilities is the default set of capabilities that will be added to the container
+ // unless the pod spec specifically drops the capability. You may not list a capability in both
+ // DefaultAddCapabilities and RequiredDropCapabilities.
+ // +optional
+ DefaultAddCapabilities []api.Capability
+ // RequiredDropCapabilities are the capabilities that will be dropped from the container. These
+ // are required to be dropped and cannot be added.
+ // +optional
+ RequiredDropCapabilities []api.Capability
+ // AllowedCapabilities is a list of capabilities that can be requested to add to the container.
+ // Capabilities in this field may be added at the pod author's discretion.
+ // You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities.
+ // +optional
+ AllowedCapabilities []api.Capability
+ // Volumes is a white list of allowed volume plugins. Empty indicates that all plugins
+ // may be used.
+ // +optional
+ Volumes []FSType
+ // HostNetwork determines if the policy allows the use of HostNetwork in the pod spec.
+ // +optional
+ HostNetwork bool
+ // HostPorts determines which host port ranges are allowed to be exposed.
+ // +optional
+ HostPorts []HostPortRange
+ // HostPID determines if the policy allows the use of HostPID in the pod spec.
+ // +optional
+ HostPID bool
+ // HostIPC determines if the policy allows the use of HostIPC in the pod spec.
+ // +optional
+ HostIPC bool
+ // SELinux is the strategy that will dictate the allowable labels that may be set.
+ SELinux SELinuxStrategyOptions
+ // RunAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.
+ RunAsUser RunAsUserStrategyOptions
+ // SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.
+ SupplementalGroups SupplementalGroupsStrategyOptions
+ // FSGroup is the strategy that will dictate what fs group is used by the SecurityContext.
+ FSGroup FSGroupStrategyOptions
+ // ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file
+ // system. If the container specifically requests to run with a non-read only root file system
+ // the PSP should deny the pod.
+ // If set to false the container may run with a read only root file system if it wishes but it
+ // will not be forced to.
+ // +optional
+ ReadOnlyRootFilesystem bool
+}
+
+// HostPortRange defines a range of host ports that will be enabled by a policy
+// for pods to use. It requires both the start and end to be defined.
+type HostPortRange struct {
+ // Min is the start of the range, inclusive.
+ Min int
+ // Max is the end of the range, inclusive.
+ Max int
+}
+
+// FSType gives strong typing to different file systems that are used by volumes.
+type FSType string
+
+var (
+ AzureFile FSType = "azureFile"
+ Flocker FSType = "flocker"
+ FlexVolume FSType = "flexVolume"
+ HostPath FSType = "hostPath"
+ EmptyDir FSType = "emptyDir"
+ GCEPersistentDisk FSType = "gcePersistentDisk"
+ AWSElasticBlockStore FSType = "awsElasticBlockStore"
+ GitRepo FSType = "gitRepo"
+ Secret FSType = "secret"
+ NFS FSType = "nfs"
+ ISCSI FSType = "iscsi"
+ Glusterfs FSType = "glusterfs"
+ PersistentVolumeClaim FSType = "persistentVolumeClaim"
+ RBD FSType = "rbd"
+ Cinder FSType = "cinder"
+ CephFS FSType = "cephFS"
+ DownwardAPI FSType = "downwardAPI"
+ FC FSType = "fc"
+ ConfigMap FSType = "configMap"
+ VsphereVolume FSType = "vsphereVolume"
+ Quobyte FSType = "quobyte"
+ AzureDisk FSType = "azureDisk"
+ PhotonPersistentDisk FSType = "photonPersistentDisk"
+ StorageOS FSType = "storageos"
+ Projected FSType = "projected"
+ PortworxVolume FSType = "portworxVolume"
+ ScaleIO FSType = "scaleIO"
+ All FSType = "*"
+)
+
+// SELinuxStrategyOptions defines the strategy type and any options used to create the strategy.
+type SELinuxStrategyOptions struct {
+ // Rule is the strategy that will dictate the allowable labels that may be set.
+ Rule SELinuxStrategy
+ // seLinuxOptions required to run as; required for MustRunAs
+ // More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md
+ // +optional
+ SELinuxOptions *api.SELinuxOptions
+}
+
+// SELinuxStrategy denotes strategy types for generating SELinux options for a
+// Security.
+type SELinuxStrategy string
+
+const (
+ // container must have SELinux labels of X applied.
+ SELinuxStrategyMustRunAs SELinuxStrategy = "MustRunAs"
+ // container may make requests for any SELinux context labels.
+ SELinuxStrategyRunAsAny SELinuxStrategy = "RunAsAny"
+)
+
+// RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy.
+type RunAsUserStrategyOptions struct {
+ // Rule is the strategy that will dictate the allowable RunAsUser values that may be set.
+ Rule RunAsUserStrategy
+ // Ranges are the allowed ranges of uids that may be used.
+ // +optional
+ Ranges []UserIDRange
+}
+
+// UserIDRange provides a min/max of an allowed range of UserIDs.
+type UserIDRange struct {
+ // Min is the start of the range, inclusive.
+ Min int64
+ // Max is the end of the range, inclusive.
+ Max int64
+}
+
+// GroupIDRange provides a min/max of an allowed range of GroupIDs.
+type GroupIDRange struct {
+ // Min is the start of the range, inclusive.
+ Min int64
+ // Max is the end of the range, inclusive.
+ Max int64
+}
+
+// RunAsUserStrategy denotes strategy types for generating RunAsUser values for a
+// SecurityContext.
+type RunAsUserStrategy string
+
+const (
+ // container must run as a particular uid.
+ RunAsUserStrategyMustRunAs RunAsUserStrategy = "MustRunAs"
+ // container must run as a non-root uid
+ RunAsUserStrategyMustRunAsNonRoot RunAsUserStrategy = "MustRunAsNonRoot"
+ // container may make requests for any uid.
+ RunAsUserStrategyRunAsAny RunAsUserStrategy = "RunAsAny"
+)
+
+// FSGroupStrategyOptions defines the strategy type and options used to create the strategy.
+type FSGroupStrategyOptions struct {
+ // Rule is the strategy that will dictate what FSGroup is used in the SecurityContext.
+ // +optional
+ Rule FSGroupStrategyType
+ // Ranges are the allowed ranges of fs groups. If you would like to force a single
+ // fs group then supply a single range with the same start and end.
+ // +optional
+ Ranges []GroupIDRange
+}
+
+// FSGroupStrategyType denotes strategy types for generating FSGroup values for a
+// SecurityContext
+type FSGroupStrategyType string
+
+const (
+ // container must have FSGroup of X applied.
+ FSGroupStrategyMustRunAs FSGroupStrategyType = "MustRunAs"
+ // container may make requests for any FSGroup labels.
+ FSGroupStrategyRunAsAny FSGroupStrategyType = "RunAsAny"
+)
+
+// SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.
+type SupplementalGroupsStrategyOptions struct {
+ // Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.
+ // +optional
+ Rule SupplementalGroupsStrategyType
+ // Ranges are the allowed ranges of supplemental groups. If you would like to force a single
+ // supplemental group then supply a single range with the same start and end.
+ // +optional
+ Ranges []GroupIDRange
+}
+
+// SupplementalGroupsStrategyType denotes strategy types for determining valid supplemental
+// groups for a SecurityContext.
+type SupplementalGroupsStrategyType string
+
+const (
+ // container must run as a particular gid.
+ SupplementalGroupsStrategyMustRunAs SupplementalGroupsStrategyType = "MustRunAs"
+ // container may make requests for any gid.
+ SupplementalGroupsStrategyRunAsAny SupplementalGroupsStrategyType = "RunAsAny"
+)
+
+// PodSecurityPolicyList is a list of PodSecurityPolicy objects.
+type PodSecurityPolicyList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []PodSecurityPolicy
+}
+
+// +genclient=true
+
+// NetworkPolicy describes what network traffic is allowed for a set of Pods
+type NetworkPolicy struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Specification of the desired behavior for this NetworkPolicy.
+ // +optional
+ Spec NetworkPolicySpec
+}
+
+type NetworkPolicySpec struct {
+ // Selects the pods to which this NetworkPolicy object applies. The array of ingress rules
+ // is applied to any pods selected by this field. Multiple network policies can select the
+ // same set of pods. In this case, the ingress rules for each are combined additively.
+ // This field is NOT optional and follows standard label selector semantics.
+ // An empty podSelector matches all pods in this namespace.
+ PodSelector metav1.LabelSelector
+
+ // List of ingress rules to be applied to the selected pods.
+ // Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod
+ // OR if the traffic source is the pod's local node,
+ // OR if the traffic matches at least one ingress rule across all of the NetworkPolicy
+ // objects whose podSelector matches the pod.
+ // If this field is empty then this NetworkPolicy does not allow any traffic
+ // (and serves solely to ensure that the pods it selects are isolated by default).
+ // +optional
+ Ingress []NetworkPolicyIngressRule
+}
+
+// This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.
+type NetworkPolicyIngressRule struct {
+ // List of ports which should be made accessible on the pods selected for this rule.
+ // Each item in this list is combined using a logical OR.
+ // If this field is empty or missing, this rule matches all ports (traffic not restricted by port).
+ // If this field is present and contains at least one item, then this rule allows traffic
+ // only if the traffic matches at least one port in the list.
+ // +optional
+ Ports []NetworkPolicyPort
+
+ // List of sources which should be able to access the pods selected for this rule.
+ // Items in this list are combined using a logical OR operation.
+ // If this field is empty or missing, this rule matches all sources (traffic not restricted by source).
+ // If this field is present and contains at least on item, this rule allows traffic only if the
+ // traffic matches at least one item in the from list.
+ // +optional
+ From []NetworkPolicyPeer
+}
+
+type NetworkPolicyPort struct {
+ // Optional. The protocol (TCP or UDP) which traffic must match.
+ // If not specified, this field defaults to TCP.
+ // +optional
+ Protocol *api.Protocol
+
+ // If specified, the port on the given protocol. This can
+ // either be a numerical or named port on a pod. If this field is not provided,
+ // this matches all port names and numbers.
+ // If present, only traffic on the specified protocol AND port
+ // will be matched.
+ // +optional
+ Port *intstr.IntOrString
+}
+
+type NetworkPolicyPeer struct {
+ // Exactly one of the following must be specified.
+
+ // This is a label selector which selects Pods in this namespace.
+ // This field follows standard label selector semantics.
+ // If present but empty, this selector selects all pods in this namespace.
+ // +optional
+ PodSelector *metav1.LabelSelector
+
+ // Selects Namespaces using cluster scoped-labels. This
+ // matches all pods in all namespaces selected by this label selector.
+ // This field follows standard label selector semantics.
+ // If present but empty, this selector selects all namespaces.
+ // +optional
+ NamespaceSelector *metav1.LabelSelector
+}
+
+// NetworkPolicyList is a list of NetworkPolicy objects.
+type NetworkPolicyList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []NetworkPolicy
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/conversion.go b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/conversion.go
new file mode 100644
index 000000000..cec1e5e43
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/conversion.go
@@ -0,0 +1,428 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "fmt"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/conversion"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/intstr"
+ "k8s.io/client-go/pkg/api"
+ v1 "k8s.io/client-go/pkg/api/v1"
+ "k8s.io/client-go/pkg/apis/extensions"
+ "k8s.io/client-go/pkg/apis/networking"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) error {
+ // Add non-generated conversion functions
+ err := scheme.AddConversionFuncs(
+ Convert_extensions_ScaleStatus_To_v1beta1_ScaleStatus,
+ Convert_v1beta1_ScaleStatus_To_extensions_ScaleStatus,
+ Convert_extensions_DeploymentSpec_To_v1beta1_DeploymentSpec,
+ Convert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec,
+ Convert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy,
+ Convert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy,
+ Convert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDeployment,
+ Convert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDeployment,
+ Convert_extensions_RollingUpdateDaemonSet_To_v1beta1_RollingUpdateDaemonSet,
+ Convert_v1beta1_RollingUpdateDaemonSet_To_extensions_RollingUpdateDaemonSet,
+ Convert_extensions_ReplicaSetSpec_To_v1beta1_ReplicaSetSpec,
+ Convert_v1beta1_ReplicaSetSpec_To_extensions_ReplicaSetSpec,
+ Convert_v1beta1_NetworkPolicy_To_networking_NetworkPolicy,
+ Convert_networking_NetworkPolicy_To_v1beta1_NetworkPolicy,
+ Convert_v1beta1_NetworkPolicyIngressRule_To_networking_NetworkPolicyIngressRule,
+ Convert_networking_NetworkPolicyIngressRule_To_v1beta1_NetworkPolicyIngressRule,
+ Convert_v1beta1_NetworkPolicyList_To_networking_NetworkPolicyList,
+ Convert_networking_NetworkPolicyList_To_v1beta1_NetworkPolicyList,
+ Convert_v1beta1_NetworkPolicyPeer_To_networking_NetworkPolicyPeer,
+ Convert_networking_NetworkPolicyPeer_To_v1beta1_NetworkPolicyPeer,
+ Convert_v1beta1_NetworkPolicyPort_To_networking_NetworkPolicyPort,
+ Convert_networking_NetworkPolicyPort_To_v1beta1_NetworkPolicyPort,
+ Convert_v1beta1_NetworkPolicySpec_To_networking_NetworkPolicySpec,
+ Convert_networking_NetworkPolicySpec_To_v1beta1_NetworkPolicySpec,
+ )
+ if err != nil {
+ return err
+ }
+
+ // Add field label conversions for kinds having selectable nothing but ObjectMeta fields.
+ for _, k := range []string{"DaemonSet", "Deployment", "Ingress"} {
+ kind := k // don't close over range variables
+ err = scheme.AddFieldLabelConversionFunc("extensions/v1beta1", kind,
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "metadata.name", "metadata.namespace":
+ return label, value, nil
+ default:
+ return "", "", fmt.Errorf("field label %q not supported for %q", label, kind)
+ }
+ },
+ )
+ if err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func Convert_extensions_ScaleStatus_To_v1beta1_ScaleStatus(in *extensions.ScaleStatus, out *ScaleStatus, s conversion.Scope) error {
+ out.Replicas = int32(in.Replicas)
+
+ out.Selector = nil
+ out.TargetSelector = ""
+ if in.Selector != nil {
+ if in.Selector.MatchExpressions == nil || len(in.Selector.MatchExpressions) == 0 {
+ out.Selector = in.Selector.MatchLabels
+ }
+
+ selector, err := metav1.LabelSelectorAsSelector(in.Selector)
+ if err != nil {
+ return fmt.Errorf("invalid label selector: %v", err)
+ }
+ out.TargetSelector = selector.String()
+ }
+ return nil
+}
+
+func Convert_v1beta1_ScaleStatus_To_extensions_ScaleStatus(in *ScaleStatus, out *extensions.ScaleStatus, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+
+ // Normally when 2 fields map to the same internal value we favor the old field, since
+ // old clients can't be expected to know about new fields but clients that know about the
+ // new field can be expected to know about the old field (though that's not quite true, due
+ // to kubectl apply). However, these fields are readonly, so any non-nil value should work.
+ if in.TargetSelector != "" {
+ labelSelector, err := metav1.ParseToLabelSelector(in.TargetSelector)
+ if err != nil {
+ out.Selector = nil
+ return fmt.Errorf("failed to parse target selector: %v", err)
+ }
+ out.Selector = labelSelector
+ } else if in.Selector != nil {
+ out.Selector = new(metav1.LabelSelector)
+ selector := make(map[string]string)
+ for key, val := range in.Selector {
+ selector[key] = val
+ }
+ out.Selector.MatchLabels = selector
+ } else {
+ out.Selector = nil
+ }
+ return nil
+}
+
+func Convert_extensions_DeploymentSpec_To_v1beta1_DeploymentSpec(in *extensions.DeploymentSpec, out *DeploymentSpec, s conversion.Scope) error {
+ out.Replicas = &in.Replicas
+ out.Selector = in.Selector
+ if err := v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ if err := Convert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy(&in.Strategy, &out.Strategy, s); err != nil {
+ return err
+ }
+ if in.RevisionHistoryLimit != nil {
+ out.RevisionHistoryLimit = new(int32)
+ *out.RevisionHistoryLimit = int32(*in.RevisionHistoryLimit)
+ }
+ out.MinReadySeconds = int32(in.MinReadySeconds)
+ out.Paused = in.Paused
+ if in.RollbackTo != nil {
+ out.RollbackTo = new(RollbackConfig)
+ out.RollbackTo.Revision = int64(in.RollbackTo.Revision)
+ } else {
+ out.RollbackTo = nil
+ }
+ if in.ProgressDeadlineSeconds != nil {
+ out.ProgressDeadlineSeconds = new(int32)
+ *out.ProgressDeadlineSeconds = *in.ProgressDeadlineSeconds
+ }
+ return nil
+}
+
+func Convert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec(in *DeploymentSpec, out *extensions.DeploymentSpec, s conversion.Scope) error {
+ if in.Replicas != nil {
+ out.Replicas = *in.Replicas
+ }
+ out.Selector = in.Selector
+ if err := v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy(&in.Strategy, &out.Strategy, s); err != nil {
+ return err
+ }
+ out.RevisionHistoryLimit = in.RevisionHistoryLimit
+ out.MinReadySeconds = in.MinReadySeconds
+ out.Paused = in.Paused
+ if in.RollbackTo != nil {
+ out.RollbackTo = new(extensions.RollbackConfig)
+ out.RollbackTo.Revision = in.RollbackTo.Revision
+ } else {
+ out.RollbackTo = nil
+ }
+ if in.ProgressDeadlineSeconds != nil {
+ out.ProgressDeadlineSeconds = new(int32)
+ *out.ProgressDeadlineSeconds = *in.ProgressDeadlineSeconds
+ }
+ return nil
+}
+
+func Convert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy(in *extensions.DeploymentStrategy, out *DeploymentStrategy, s conversion.Scope) error {
+ out.Type = DeploymentStrategyType(in.Type)
+ if in.RollingUpdate != nil {
+ out.RollingUpdate = new(RollingUpdateDeployment)
+ if err := Convert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDeployment(in.RollingUpdate, out.RollingUpdate, s); err != nil {
+ return err
+ }
+ } else {
+ out.RollingUpdate = nil
+ }
+ return nil
+}
+
+func Convert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy(in *DeploymentStrategy, out *extensions.DeploymentStrategy, s conversion.Scope) error {
+ out.Type = extensions.DeploymentStrategyType(in.Type)
+ if in.RollingUpdate != nil {
+ out.RollingUpdate = new(extensions.RollingUpdateDeployment)
+ if err := Convert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDeployment(in.RollingUpdate, out.RollingUpdate, s); err != nil {
+ return err
+ }
+ } else {
+ out.RollingUpdate = nil
+ }
+ return nil
+}
+
+func Convert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDeployment(in *extensions.RollingUpdateDeployment, out *RollingUpdateDeployment, s conversion.Scope) error {
+ if out.MaxUnavailable == nil {
+ out.MaxUnavailable = &intstr.IntOrString{}
+ }
+ if err := s.Convert(&in.MaxUnavailable, out.MaxUnavailable, 0); err != nil {
+ return err
+ }
+ if out.MaxSurge == nil {
+ out.MaxSurge = &intstr.IntOrString{}
+ }
+ if err := s.Convert(&in.MaxSurge, out.MaxSurge, 0); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDeployment(in *RollingUpdateDeployment, out *extensions.RollingUpdateDeployment, s conversion.Scope) error {
+ if err := s.Convert(in.MaxUnavailable, &out.MaxUnavailable, 0); err != nil {
+ return err
+ }
+ if err := s.Convert(in.MaxSurge, &out.MaxSurge, 0); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_extensions_RollingUpdateDaemonSet_To_v1beta1_RollingUpdateDaemonSet(in *extensions.RollingUpdateDaemonSet, out *RollingUpdateDaemonSet, s conversion.Scope) error {
+ if out.MaxUnavailable == nil {
+ out.MaxUnavailable = &intstr.IntOrString{}
+ }
+ if err := s.Convert(&in.MaxUnavailable, out.MaxUnavailable, 0); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1beta1_RollingUpdateDaemonSet_To_extensions_RollingUpdateDaemonSet(in *RollingUpdateDaemonSet, out *extensions.RollingUpdateDaemonSet, s conversion.Scope) error {
+ if err := s.Convert(in.MaxUnavailable, &out.MaxUnavailable, 0); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_extensions_ReplicaSetSpec_To_v1beta1_ReplicaSetSpec(in *extensions.ReplicaSetSpec, out *ReplicaSetSpec, s conversion.Scope) error {
+ out.Replicas = new(int32)
+ *out.Replicas = int32(in.Replicas)
+ out.MinReadySeconds = in.MinReadySeconds
+ out.Selector = in.Selector
+ if err := v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1beta1_ReplicaSetSpec_To_extensions_ReplicaSetSpec(in *ReplicaSetSpec, out *extensions.ReplicaSetSpec, s conversion.Scope) error {
+ if in.Replicas != nil {
+ out.Replicas = *in.Replicas
+ }
+ out.MinReadySeconds = in.MinReadySeconds
+ out.Selector = in.Selector
+ if err := v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1beta1_NetworkPolicy_To_networking_NetworkPolicy(in *NetworkPolicy, out *networking.NetworkPolicy, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ return Convert_v1beta1_NetworkPolicySpec_To_networking_NetworkPolicySpec(&in.Spec, &out.Spec, s)
+}
+
+func Convert_networking_NetworkPolicy_To_v1beta1_NetworkPolicy(in *networking.NetworkPolicy, out *NetworkPolicy, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ return Convert_networking_NetworkPolicySpec_To_v1beta1_NetworkPolicySpec(&in.Spec, &out.Spec, s)
+}
+
+func Convert_v1beta1_NetworkPolicySpec_To_networking_NetworkPolicySpec(in *NetworkPolicySpec, out *networking.NetworkPolicySpec, s conversion.Scope) error {
+ if err := s.Convert(&in.PodSelector, &out.PodSelector, 0); err != nil {
+ return err
+ }
+ out.Ingress = make([]networking.NetworkPolicyIngressRule, len(in.Ingress))
+ for i := range in.Ingress {
+ if err := Convert_v1beta1_NetworkPolicyIngressRule_To_networking_NetworkPolicyIngressRule(&in.Ingress[i], &out.Ingress[i], s); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func Convert_networking_NetworkPolicySpec_To_v1beta1_NetworkPolicySpec(in *networking.NetworkPolicySpec, out *NetworkPolicySpec, s conversion.Scope) error {
+ if err := s.Convert(&in.PodSelector, &out.PodSelector, 0); err != nil {
+ return err
+ }
+ out.Ingress = make([]NetworkPolicyIngressRule, len(in.Ingress))
+ for i := range in.Ingress {
+ if err := Convert_networking_NetworkPolicyIngressRule_To_v1beta1_NetworkPolicyIngressRule(&in.Ingress[i], &out.Ingress[i], s); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func Convert_v1beta1_NetworkPolicyIngressRule_To_networking_NetworkPolicyIngressRule(in *NetworkPolicyIngressRule, out *networking.NetworkPolicyIngressRule, s conversion.Scope) error {
+ out.Ports = make([]networking.NetworkPolicyPort, len(in.Ports))
+ for i := range in.Ports {
+ if err := Convert_v1beta1_NetworkPolicyPort_To_networking_NetworkPolicyPort(&in.Ports[i], &out.Ports[i], s); err != nil {
+ return err
+ }
+ }
+ out.From = make([]networking.NetworkPolicyPeer, len(in.From))
+ for i := range in.From {
+ if err := Convert_v1beta1_NetworkPolicyPeer_To_networking_NetworkPolicyPeer(&in.From[i], &out.From[i], s); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func Convert_networking_NetworkPolicyIngressRule_To_v1beta1_NetworkPolicyIngressRule(in *networking.NetworkPolicyIngressRule, out *NetworkPolicyIngressRule, s conversion.Scope) error {
+ out.Ports = make([]NetworkPolicyPort, len(in.Ports))
+ for i := range in.Ports {
+ if err := Convert_networking_NetworkPolicyPort_To_v1beta1_NetworkPolicyPort(&in.Ports[i], &out.Ports[i], s); err != nil {
+ return err
+ }
+ }
+ out.From = make([]NetworkPolicyPeer, len(in.From))
+ for i := range in.From {
+ if err := Convert_networking_NetworkPolicyPeer_To_v1beta1_NetworkPolicyPeer(&in.From[i], &out.From[i], s); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func Convert_v1beta1_NetworkPolicyPeer_To_networking_NetworkPolicyPeer(in *NetworkPolicyPeer, out *networking.NetworkPolicyPeer, s conversion.Scope) error {
+ if in.PodSelector != nil {
+ out.PodSelector = new(metav1.LabelSelector)
+ if err := s.Convert(in.PodSelector, out.PodSelector, 0); err != nil {
+ return err
+ }
+ } else {
+ out.PodSelector = nil
+ }
+ if in.NamespaceSelector != nil {
+ out.NamespaceSelector = new(metav1.LabelSelector)
+ if err := s.Convert(in.NamespaceSelector, out.NamespaceSelector, 0); err != nil {
+ return err
+ }
+ } else {
+ out.NamespaceSelector = nil
+ }
+ return nil
+}
+
+func Convert_networking_NetworkPolicyPeer_To_v1beta1_NetworkPolicyPeer(in *networking.NetworkPolicyPeer, out *NetworkPolicyPeer, s conversion.Scope) error {
+ if in.PodSelector != nil {
+ out.PodSelector = new(metav1.LabelSelector)
+ if err := s.Convert(in.PodSelector, out.PodSelector, 0); err != nil {
+ return err
+ }
+ } else {
+ out.PodSelector = nil
+ }
+ if in.NamespaceSelector != nil {
+ out.NamespaceSelector = new(metav1.LabelSelector)
+ if err := s.Convert(in.NamespaceSelector, out.NamespaceSelector, 0); err != nil {
+ return err
+ }
+ } else {
+ out.NamespaceSelector = nil
+ }
+ return nil
+}
+
+func Convert_v1beta1_NetworkPolicyPort_To_networking_NetworkPolicyPort(in *NetworkPolicyPort, out *networking.NetworkPolicyPort, s conversion.Scope) error {
+ if in.Protocol != nil {
+ out.Protocol = new(api.Protocol)
+ *out.Protocol = api.Protocol(*in.Protocol)
+ } else {
+ out.Protocol = nil
+ }
+ out.Port = in.Port
+ return nil
+}
+
+func Convert_networking_NetworkPolicyPort_To_v1beta1_NetworkPolicyPort(in *networking.NetworkPolicyPort, out *NetworkPolicyPort, s conversion.Scope) error {
+ if in.Protocol != nil {
+ out.Protocol = new(v1.Protocol)
+ *out.Protocol = v1.Protocol(*in.Protocol)
+ } else {
+ out.Protocol = nil
+ }
+ out.Port = in.Port
+ return nil
+}
+
+func Convert_v1beta1_NetworkPolicyList_To_networking_NetworkPolicyList(in *NetworkPolicyList, out *networking.NetworkPolicyList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = make([]networking.NetworkPolicy, len(in.Items))
+ for i := range in.Items {
+ if err := Convert_v1beta1_NetworkPolicy_To_networking_NetworkPolicy(&in.Items[i], &out.Items[i], s); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func Convert_networking_NetworkPolicyList_To_v1beta1_NetworkPolicyList(in *networking.NetworkPolicyList, out *NetworkPolicyList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = make([]NetworkPolicy, len(in.Items))
+ for i := range in.Items {
+ if err := Convert_networking_NetworkPolicy_To_v1beta1_NetworkPolicy(&in.Items[i], &out.Items[i], s); err != nil {
+ return err
+ }
+ }
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/defaults.go b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/defaults.go
new file mode 100644
index 000000000..a644e5ab9
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/defaults.go
@@ -0,0 +1,135 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/intstr"
+ "k8s.io/client-go/pkg/api/v1"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
+
+func SetDefaults_DaemonSet(obj *DaemonSet) {
+ labels := obj.Spec.Template.Labels
+
+ // TODO: support templates defined elsewhere when we support them in the API
+ if labels != nil {
+ if obj.Spec.Selector == nil {
+ obj.Spec.Selector = &metav1.LabelSelector{
+ MatchLabels: labels,
+ }
+ }
+ if len(obj.Labels) == 0 {
+ obj.Labels = labels
+ }
+ }
+ updateStrategy := &obj.Spec.UpdateStrategy
+ if updateStrategy.Type == "" {
+ updateStrategy.Type = OnDeleteDaemonSetStrategyType
+ }
+ if updateStrategy.Type == RollingUpdateDaemonSetStrategyType {
+ if updateStrategy.RollingUpdate == nil {
+ rollingUpdate := RollingUpdateDaemonSet{}
+ updateStrategy.RollingUpdate = &rollingUpdate
+ }
+ if updateStrategy.RollingUpdate.MaxUnavailable == nil {
+ // Set default MaxUnavailable as 1 by default.
+ maxUnavailable := intstr.FromInt(1)
+ updateStrategy.RollingUpdate.MaxUnavailable = &maxUnavailable
+ }
+ }
+ if obj.Spec.RevisionHistoryLimit == nil {
+ obj.Spec.RevisionHistoryLimit = new(int32)
+ *obj.Spec.RevisionHistoryLimit = 10
+ }
+}
+
+func SetDefaults_Deployment(obj *Deployment) {
+ // Default labels and selector to labels from pod template spec.
+ labels := obj.Spec.Template.Labels
+
+ if labels != nil {
+ if obj.Spec.Selector == nil {
+ obj.Spec.Selector = &metav1.LabelSelector{MatchLabels: labels}
+ }
+ if len(obj.Labels) == 0 {
+ obj.Labels = labels
+ }
+ }
+ // Set DeploymentSpec.Replicas to 1 if it is not set.
+ if obj.Spec.Replicas == nil {
+ obj.Spec.Replicas = new(int32)
+ *obj.Spec.Replicas = 1
+ }
+ strategy := &obj.Spec.Strategy
+ // Set default DeploymentStrategyType as RollingUpdate.
+ if strategy.Type == "" {
+ strategy.Type = RollingUpdateDeploymentStrategyType
+ }
+ if strategy.Type == RollingUpdateDeploymentStrategyType || strategy.RollingUpdate != nil {
+ if strategy.RollingUpdate == nil {
+ rollingUpdate := RollingUpdateDeployment{}
+ strategy.RollingUpdate = &rollingUpdate
+ }
+ if strategy.RollingUpdate.MaxUnavailable == nil {
+ // Set default MaxUnavailable as 1 by default.
+ maxUnavailable := intstr.FromInt(1)
+ strategy.RollingUpdate.MaxUnavailable = &maxUnavailable
+ }
+ if strategy.RollingUpdate.MaxSurge == nil {
+ // Set default MaxSurge as 1 by default.
+ maxSurge := intstr.FromInt(1)
+ strategy.RollingUpdate.MaxSurge = &maxSurge
+ }
+ }
+}
+
+func SetDefaults_ReplicaSet(obj *ReplicaSet) {
+ labels := obj.Spec.Template.Labels
+
+ // TODO: support templates defined elsewhere when we support them in the API
+ if labels != nil {
+ if obj.Spec.Selector == nil {
+ obj.Spec.Selector = &metav1.LabelSelector{
+ MatchLabels: labels,
+ }
+ }
+ if len(obj.Labels) == 0 {
+ obj.Labels = labels
+ }
+ }
+ if obj.Spec.Replicas == nil {
+ obj.Spec.Replicas = new(int32)
+ *obj.Spec.Replicas = 1
+ }
+}
+
+func SetDefaults_NetworkPolicy(obj *NetworkPolicy) {
+ // Default any undefined Protocol fields to TCP.
+ for _, i := range obj.Spec.Ingress {
+ for _, p := range i.Ports {
+ if p.Protocol == nil {
+ proto := v1.ProtocolTCP
+ p.Protocol = &proto
+ }
+ }
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/doc.go b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/doc.go
new file mode 100644
index 000000000..a397b30e9
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/doc.go
@@ -0,0 +1,17 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
diff --git a/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/generated.pb.go
new file mode 100644
index 000000000..871bd924d
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/generated.pb.go
@@ -0,0 +1,12108 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1beta1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.proto
+
+ It has these top-level messages:
+ APIVersion
+ CustomMetricCurrentStatus
+ CustomMetricCurrentStatusList
+ CustomMetricTarget
+ CustomMetricTargetList
+ DaemonSet
+ DaemonSetList
+ DaemonSetSpec
+ DaemonSetStatus
+ DaemonSetUpdateStrategy
+ Deployment
+ DeploymentCondition
+ DeploymentList
+ DeploymentRollback
+ DeploymentSpec
+ DeploymentStatus
+ DeploymentStrategy
+ FSGroupStrategyOptions
+ HTTPIngressPath
+ HTTPIngressRuleValue
+ HostPortRange
+ IDRange
+ Ingress
+ IngressBackend
+ IngressList
+ IngressRule
+ IngressRuleValue
+ IngressSpec
+ IngressStatus
+ IngressTLS
+ NetworkPolicy
+ NetworkPolicyIngressRule
+ NetworkPolicyList
+ NetworkPolicyPeer
+ NetworkPolicyPort
+ NetworkPolicySpec
+ PodSecurityPolicy
+ PodSecurityPolicyList
+ PodSecurityPolicySpec
+ ReplicaSet
+ ReplicaSetCondition
+ ReplicaSetList
+ ReplicaSetSpec
+ ReplicaSetStatus
+ ReplicationControllerDummy
+ RollbackConfig
+ RollingUpdateDaemonSet
+ RollingUpdateDeployment
+ RunAsUserStrategyOptions
+ SELinuxStrategyOptions
+ Scale
+ ScaleSpec
+ ScaleStatus
+ SupplementalGroupsStrategyOptions
+ ThirdPartyResource
+ ThirdPartyResourceData
+ ThirdPartyResourceDataList
+ ThirdPartyResourceList
+*/
+package v1beta1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+import k8s_io_apimachinery_pkg_util_intstr "k8s.io/apimachinery/pkg/util/intstr"
+import k8s_io_kubernetes_pkg_api_v1 "k8s.io/client-go/pkg/api/v1"
+
+import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *APIVersion) Reset() { *m = APIVersion{} }
+func (*APIVersion) ProtoMessage() {}
+func (*APIVersion) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *CustomMetricCurrentStatus) Reset() { *m = CustomMetricCurrentStatus{} }
+func (*CustomMetricCurrentStatus) ProtoMessage() {}
+func (*CustomMetricCurrentStatus) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{1}
+}
+
+func (m *CustomMetricCurrentStatusList) Reset() { *m = CustomMetricCurrentStatusList{} }
+func (*CustomMetricCurrentStatusList) ProtoMessage() {}
+func (*CustomMetricCurrentStatusList) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{2}
+}
+
+func (m *CustomMetricTarget) Reset() { *m = CustomMetricTarget{} }
+func (*CustomMetricTarget) ProtoMessage() {}
+func (*CustomMetricTarget) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
+
+func (m *CustomMetricTargetList) Reset() { *m = CustomMetricTargetList{} }
+func (*CustomMetricTargetList) ProtoMessage() {}
+func (*CustomMetricTargetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
+
+func (m *DaemonSet) Reset() { *m = DaemonSet{} }
+func (*DaemonSet) ProtoMessage() {}
+func (*DaemonSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
+
+func (m *DaemonSetList) Reset() { *m = DaemonSetList{} }
+func (*DaemonSetList) ProtoMessage() {}
+func (*DaemonSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
+
+func (m *DaemonSetSpec) Reset() { *m = DaemonSetSpec{} }
+func (*DaemonSetSpec) ProtoMessage() {}
+func (*DaemonSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
+
+func (m *DaemonSetStatus) Reset() { *m = DaemonSetStatus{} }
+func (*DaemonSetStatus) ProtoMessage() {}
+func (*DaemonSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
+
+func (m *DaemonSetUpdateStrategy) Reset() { *m = DaemonSetUpdateStrategy{} }
+func (*DaemonSetUpdateStrategy) ProtoMessage() {}
+func (*DaemonSetUpdateStrategy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
+
+func (m *Deployment) Reset() { *m = Deployment{} }
+func (*Deployment) ProtoMessage() {}
+func (*Deployment) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
+
+func (m *DeploymentCondition) Reset() { *m = DeploymentCondition{} }
+func (*DeploymentCondition) ProtoMessage() {}
+func (*DeploymentCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} }
+
+func (m *DeploymentList) Reset() { *m = DeploymentList{} }
+func (*DeploymentList) ProtoMessage() {}
+func (*DeploymentList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} }
+
+func (m *DeploymentRollback) Reset() { *m = DeploymentRollback{} }
+func (*DeploymentRollback) ProtoMessage() {}
+func (*DeploymentRollback) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} }
+
+func (m *DeploymentSpec) Reset() { *m = DeploymentSpec{} }
+func (*DeploymentSpec) ProtoMessage() {}
+func (*DeploymentSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} }
+
+func (m *DeploymentStatus) Reset() { *m = DeploymentStatus{} }
+func (*DeploymentStatus) ProtoMessage() {}
+func (*DeploymentStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} }
+
+func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} }
+func (*DeploymentStrategy) ProtoMessage() {}
+func (*DeploymentStrategy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} }
+
+func (m *FSGroupStrategyOptions) Reset() { *m = FSGroupStrategyOptions{} }
+func (*FSGroupStrategyOptions) ProtoMessage() {}
+func (*FSGroupStrategyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} }
+
+func (m *HTTPIngressPath) Reset() { *m = HTTPIngressPath{} }
+func (*HTTPIngressPath) ProtoMessage() {}
+func (*HTTPIngressPath) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} }
+
+func (m *HTTPIngressRuleValue) Reset() { *m = HTTPIngressRuleValue{} }
+func (*HTTPIngressRuleValue) ProtoMessage() {}
+func (*HTTPIngressRuleValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} }
+
+func (m *HostPortRange) Reset() { *m = HostPortRange{} }
+func (*HostPortRange) ProtoMessage() {}
+func (*HostPortRange) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{20} }
+
+func (m *IDRange) Reset() { *m = IDRange{} }
+func (*IDRange) ProtoMessage() {}
+func (*IDRange) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{21} }
+
+func (m *Ingress) Reset() { *m = Ingress{} }
+func (*Ingress) ProtoMessage() {}
+func (*Ingress) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{22} }
+
+func (m *IngressBackend) Reset() { *m = IngressBackend{} }
+func (*IngressBackend) ProtoMessage() {}
+func (*IngressBackend) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{23} }
+
+func (m *IngressList) Reset() { *m = IngressList{} }
+func (*IngressList) ProtoMessage() {}
+func (*IngressList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{24} }
+
+func (m *IngressRule) Reset() { *m = IngressRule{} }
+func (*IngressRule) ProtoMessage() {}
+func (*IngressRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} }
+
+func (m *IngressRuleValue) Reset() { *m = IngressRuleValue{} }
+func (*IngressRuleValue) ProtoMessage() {}
+func (*IngressRuleValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{26} }
+
+func (m *IngressSpec) Reset() { *m = IngressSpec{} }
+func (*IngressSpec) ProtoMessage() {}
+func (*IngressSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{27} }
+
+func (m *IngressStatus) Reset() { *m = IngressStatus{} }
+func (*IngressStatus) ProtoMessage() {}
+func (*IngressStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{28} }
+
+func (m *IngressTLS) Reset() { *m = IngressTLS{} }
+func (*IngressTLS) ProtoMessage() {}
+func (*IngressTLS) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{29} }
+
+func (m *NetworkPolicy) Reset() { *m = NetworkPolicy{} }
+func (*NetworkPolicy) ProtoMessage() {}
+func (*NetworkPolicy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{30} }
+
+func (m *NetworkPolicyIngressRule) Reset() { *m = NetworkPolicyIngressRule{} }
+func (*NetworkPolicyIngressRule) ProtoMessage() {}
+func (*NetworkPolicyIngressRule) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{31}
+}
+
+func (m *NetworkPolicyList) Reset() { *m = NetworkPolicyList{} }
+func (*NetworkPolicyList) ProtoMessage() {}
+func (*NetworkPolicyList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{32} }
+
+func (m *NetworkPolicyPeer) Reset() { *m = NetworkPolicyPeer{} }
+func (*NetworkPolicyPeer) ProtoMessage() {}
+func (*NetworkPolicyPeer) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{33} }
+
+func (m *NetworkPolicyPort) Reset() { *m = NetworkPolicyPort{} }
+func (*NetworkPolicyPort) ProtoMessage() {}
+func (*NetworkPolicyPort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{34} }
+
+func (m *NetworkPolicySpec) Reset() { *m = NetworkPolicySpec{} }
+func (*NetworkPolicySpec) ProtoMessage() {}
+func (*NetworkPolicySpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{35} }
+
+func (m *PodSecurityPolicy) Reset() { *m = PodSecurityPolicy{} }
+func (*PodSecurityPolicy) ProtoMessage() {}
+func (*PodSecurityPolicy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{36} }
+
+func (m *PodSecurityPolicyList) Reset() { *m = PodSecurityPolicyList{} }
+func (*PodSecurityPolicyList) ProtoMessage() {}
+func (*PodSecurityPolicyList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{37} }
+
+func (m *PodSecurityPolicySpec) Reset() { *m = PodSecurityPolicySpec{} }
+func (*PodSecurityPolicySpec) ProtoMessage() {}
+func (*PodSecurityPolicySpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{38} }
+
+func (m *ReplicaSet) Reset() { *m = ReplicaSet{} }
+func (*ReplicaSet) ProtoMessage() {}
+func (*ReplicaSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{39} }
+
+func (m *ReplicaSetCondition) Reset() { *m = ReplicaSetCondition{} }
+func (*ReplicaSetCondition) ProtoMessage() {}
+func (*ReplicaSetCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{40} }
+
+func (m *ReplicaSetList) Reset() { *m = ReplicaSetList{} }
+func (*ReplicaSetList) ProtoMessage() {}
+func (*ReplicaSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{41} }
+
+func (m *ReplicaSetSpec) Reset() { *m = ReplicaSetSpec{} }
+func (*ReplicaSetSpec) ProtoMessage() {}
+func (*ReplicaSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{42} }
+
+func (m *ReplicaSetStatus) Reset() { *m = ReplicaSetStatus{} }
+func (*ReplicaSetStatus) ProtoMessage() {}
+func (*ReplicaSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{43} }
+
+func (m *ReplicationControllerDummy) Reset() { *m = ReplicationControllerDummy{} }
+func (*ReplicationControllerDummy) ProtoMessage() {}
+func (*ReplicationControllerDummy) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{44}
+}
+
+func (m *RollbackConfig) Reset() { *m = RollbackConfig{} }
+func (*RollbackConfig) ProtoMessage() {}
+func (*RollbackConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{45} }
+
+func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} }
+func (*RollingUpdateDaemonSet) ProtoMessage() {}
+func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{46} }
+
+func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} }
+func (*RollingUpdateDeployment) ProtoMessage() {}
+func (*RollingUpdateDeployment) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{47}
+}
+
+func (m *RunAsUserStrategyOptions) Reset() { *m = RunAsUserStrategyOptions{} }
+func (*RunAsUserStrategyOptions) ProtoMessage() {}
+func (*RunAsUserStrategyOptions) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{48}
+}
+
+func (m *SELinuxStrategyOptions) Reset() { *m = SELinuxStrategyOptions{} }
+func (*SELinuxStrategyOptions) ProtoMessage() {}
+func (*SELinuxStrategyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{49} }
+
+func (m *Scale) Reset() { *m = Scale{} }
+func (*Scale) ProtoMessage() {}
+func (*Scale) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{50} }
+
+func (m *ScaleSpec) Reset() { *m = ScaleSpec{} }
+func (*ScaleSpec) ProtoMessage() {}
+func (*ScaleSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{51} }
+
+func (m *ScaleStatus) Reset() { *m = ScaleStatus{} }
+func (*ScaleStatus) ProtoMessage() {}
+func (*ScaleStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{52} }
+
+func (m *SupplementalGroupsStrategyOptions) Reset() { *m = SupplementalGroupsStrategyOptions{} }
+func (*SupplementalGroupsStrategyOptions) ProtoMessage() {}
+func (*SupplementalGroupsStrategyOptions) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{53}
+}
+
+func (m *ThirdPartyResource) Reset() { *m = ThirdPartyResource{} }
+func (*ThirdPartyResource) ProtoMessage() {}
+func (*ThirdPartyResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{54} }
+
+func (m *ThirdPartyResourceData) Reset() { *m = ThirdPartyResourceData{} }
+func (*ThirdPartyResourceData) ProtoMessage() {}
+func (*ThirdPartyResourceData) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{55} }
+
+func (m *ThirdPartyResourceDataList) Reset() { *m = ThirdPartyResourceDataList{} }
+func (*ThirdPartyResourceDataList) ProtoMessage() {}
+func (*ThirdPartyResourceDataList) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{56}
+}
+
+func (m *ThirdPartyResourceList) Reset() { *m = ThirdPartyResourceList{} }
+func (*ThirdPartyResourceList) ProtoMessage() {}
+func (*ThirdPartyResourceList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{57} }
+
+func init() {
+ proto.RegisterType((*APIVersion)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.APIVersion")
+ proto.RegisterType((*CustomMetricCurrentStatus)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.CustomMetricCurrentStatus")
+ proto.RegisterType((*CustomMetricCurrentStatusList)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.CustomMetricCurrentStatusList")
+ proto.RegisterType((*CustomMetricTarget)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.CustomMetricTarget")
+ proto.RegisterType((*CustomMetricTargetList)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.CustomMetricTargetList")
+ proto.RegisterType((*DaemonSet)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.DaemonSet")
+ proto.RegisterType((*DaemonSetList)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.DaemonSetList")
+ proto.RegisterType((*DaemonSetSpec)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.DaemonSetSpec")
+ proto.RegisterType((*DaemonSetStatus)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.DaemonSetStatus")
+ proto.RegisterType((*DaemonSetUpdateStrategy)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.DaemonSetUpdateStrategy")
+ proto.RegisterType((*Deployment)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.Deployment")
+ proto.RegisterType((*DeploymentCondition)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.DeploymentCondition")
+ proto.RegisterType((*DeploymentList)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.DeploymentList")
+ proto.RegisterType((*DeploymentRollback)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.DeploymentRollback")
+ proto.RegisterType((*DeploymentSpec)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.DeploymentSpec")
+ proto.RegisterType((*DeploymentStatus)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.DeploymentStatus")
+ proto.RegisterType((*DeploymentStrategy)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.DeploymentStrategy")
+ proto.RegisterType((*FSGroupStrategyOptions)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.FSGroupStrategyOptions")
+ proto.RegisterType((*HTTPIngressPath)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.HTTPIngressPath")
+ proto.RegisterType((*HTTPIngressRuleValue)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.HTTPIngressRuleValue")
+ proto.RegisterType((*HostPortRange)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.HostPortRange")
+ proto.RegisterType((*IDRange)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.IDRange")
+ proto.RegisterType((*Ingress)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.Ingress")
+ proto.RegisterType((*IngressBackend)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.IngressBackend")
+ proto.RegisterType((*IngressList)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.IngressList")
+ proto.RegisterType((*IngressRule)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.IngressRule")
+ proto.RegisterType((*IngressRuleValue)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.IngressRuleValue")
+ proto.RegisterType((*IngressSpec)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.IngressSpec")
+ proto.RegisterType((*IngressStatus)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.IngressStatus")
+ proto.RegisterType((*IngressTLS)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.IngressTLS")
+ proto.RegisterType((*NetworkPolicy)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.NetworkPolicy")
+ proto.RegisterType((*NetworkPolicyIngressRule)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.NetworkPolicyIngressRule")
+ proto.RegisterType((*NetworkPolicyList)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.NetworkPolicyList")
+ proto.RegisterType((*NetworkPolicyPeer)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.NetworkPolicyPeer")
+ proto.RegisterType((*NetworkPolicyPort)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.NetworkPolicyPort")
+ proto.RegisterType((*NetworkPolicySpec)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.NetworkPolicySpec")
+ proto.RegisterType((*PodSecurityPolicy)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.PodSecurityPolicy")
+ proto.RegisterType((*PodSecurityPolicyList)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.PodSecurityPolicyList")
+ proto.RegisterType((*PodSecurityPolicySpec)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.PodSecurityPolicySpec")
+ proto.RegisterType((*ReplicaSet)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.ReplicaSet")
+ proto.RegisterType((*ReplicaSetCondition)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.ReplicaSetCondition")
+ proto.RegisterType((*ReplicaSetList)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.ReplicaSetList")
+ proto.RegisterType((*ReplicaSetSpec)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.ReplicaSetSpec")
+ proto.RegisterType((*ReplicaSetStatus)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.ReplicaSetStatus")
+ proto.RegisterType((*ReplicationControllerDummy)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.ReplicationControllerDummy")
+ proto.RegisterType((*RollbackConfig)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.RollbackConfig")
+ proto.RegisterType((*RollingUpdateDaemonSet)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.RollingUpdateDaemonSet")
+ proto.RegisterType((*RollingUpdateDeployment)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.RollingUpdateDeployment")
+ proto.RegisterType((*RunAsUserStrategyOptions)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.RunAsUserStrategyOptions")
+ proto.RegisterType((*SELinuxStrategyOptions)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.SELinuxStrategyOptions")
+ proto.RegisterType((*Scale)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.Scale")
+ proto.RegisterType((*ScaleSpec)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.ScaleSpec")
+ proto.RegisterType((*ScaleStatus)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.ScaleStatus")
+ proto.RegisterType((*SupplementalGroupsStrategyOptions)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.SupplementalGroupsStrategyOptions")
+ proto.RegisterType((*ThirdPartyResource)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.ThirdPartyResource")
+ proto.RegisterType((*ThirdPartyResourceData)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.ThirdPartyResourceData")
+ proto.RegisterType((*ThirdPartyResourceDataList)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.ThirdPartyResourceDataList")
+ proto.RegisterType((*ThirdPartyResourceList)(nil), "k8s.io.client-go.pkg.apis.extensions.v1beta1.ThirdPartyResourceList")
+}
+func (m *APIVersion) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *APIVersion) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ return i, nil
+}
+
+func (m *CustomMetricCurrentStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CustomMetricCurrentStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentValue.Size()))
+ n1, err := m.CurrentValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ return i, nil
+}
+
+func (m *CustomMetricCurrentStatusList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CustomMetricCurrentStatusList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *CustomMetricTarget) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CustomMetricTarget) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.TargetValue.Size()))
+ n2, err := m.TargetValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ return i, nil
+}
+
+func (m *CustomMetricTargetList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CustomMetricTargetList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *DaemonSet) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DaemonSet) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n3, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n4, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n5, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ return i, nil
+}
+
+func (m *DaemonSetList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DaemonSetList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n6, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *DaemonSetSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DaemonSetSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Selector != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
+ n7, err := m.Selector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ }
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
+ n8, err := m.Template.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n8
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.UpdateStrategy.Size()))
+ n9, err := m.UpdateStrategy.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n9
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.MinReadySeconds))
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.TemplateGeneration))
+ if m.RevisionHistoryLimit != nil {
+ dAtA[i] = 0x30
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.RevisionHistoryLimit))
+ }
+ return i, nil
+}
+
+func (m *DaemonSetStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DaemonSetStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentNumberScheduled))
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NumberMisscheduled))
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.DesiredNumberScheduled))
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NumberReady))
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration))
+ dAtA[i] = 0x30
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.UpdatedNumberScheduled))
+ dAtA[i] = 0x38
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NumberAvailable))
+ dAtA[i] = 0x40
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NumberUnavailable))
+ if m.CollisionCount != nil {
+ dAtA[i] = 0x48
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.CollisionCount))
+ }
+ return i, nil
+}
+
+func (m *DaemonSetUpdateStrategy) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DaemonSetUpdateStrategy) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ if m.RollingUpdate != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RollingUpdate.Size()))
+ n10, err := m.RollingUpdate.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n10
+ }
+ return i, nil
+}
+
+func (m *Deployment) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Deployment) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n11, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n11
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n12, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n12
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n13, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n13
+ return i, nil
+}
+
+func (m *DeploymentCondition) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeploymentCondition) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
+ i += copy(dAtA[i:], m.Status)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastUpdateTime.Size()))
+ n14, err := m.LastUpdateTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n14
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
+ n15, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n15
+ return i, nil
+}
+
+func (m *DeploymentList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeploymentList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n16, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n16
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *DeploymentRollback) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeploymentRollback) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ if len(m.UpdatedAnnotations) > 0 {
+ keysForUpdatedAnnotations := make([]string, 0, len(m.UpdatedAnnotations))
+ for k := range m.UpdatedAnnotations {
+ keysForUpdatedAnnotations = append(keysForUpdatedAnnotations, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForUpdatedAnnotations)
+ for _, k := range keysForUpdatedAnnotations {
+ dAtA[i] = 0x12
+ i++
+ v := m.UpdatedAnnotations[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RollbackTo.Size()))
+ n17, err := m.RollbackTo.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n17
+ return i, nil
+}
+
+func (m *DeploymentSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeploymentSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Replicas != nil {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.Replicas))
+ }
+ if m.Selector != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
+ n18, err := m.Selector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n18
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
+ n19, err := m.Template.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n19
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Strategy.Size()))
+ n20, err := m.Strategy.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n20
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.MinReadySeconds))
+ if m.RevisionHistoryLimit != nil {
+ dAtA[i] = 0x30
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.RevisionHistoryLimit))
+ }
+ dAtA[i] = 0x38
+ i++
+ if m.Paused {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ if m.RollbackTo != nil {
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RollbackTo.Size()))
+ n21, err := m.RollbackTo.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n21
+ }
+ if m.ProgressDeadlineSeconds != nil {
+ dAtA[i] = 0x48
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.ProgressDeadlineSeconds))
+ }
+ return i, nil
+}
+
+func (m *DeploymentStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeploymentStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration))
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.UpdatedReplicas))
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.AvailableReplicas))
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.UnavailableReplicas))
+ if len(m.Conditions) > 0 {
+ for _, msg := range m.Conditions {
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x38
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ReadyReplicas))
+ if m.CollisionCount != nil {
+ dAtA[i] = 0x40
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.CollisionCount))
+ }
+ return i, nil
+}
+
+func (m *DeploymentStrategy) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeploymentStrategy) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ if m.RollingUpdate != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RollingUpdate.Size()))
+ n22, err := m.RollingUpdate.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n22
+ }
+ return i, nil
+}
+
+func (m *FSGroupStrategyOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *FSGroupStrategyOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Rule)))
+ i += copy(dAtA[i:], m.Rule)
+ if len(m.Ranges) > 0 {
+ for _, msg := range m.Ranges {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *HTTPIngressPath) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HTTPIngressPath) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i += copy(dAtA[i:], m.Path)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Backend.Size()))
+ n23, err := m.Backend.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n23
+ return i, nil
+}
+
+func (m *HTTPIngressRuleValue) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HTTPIngressRuleValue) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Paths) > 0 {
+ for _, msg := range m.Paths {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *HostPortRange) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HostPortRange) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Min))
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Max))
+ return i, nil
+}
+
+func (m *IDRange) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *IDRange) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Min))
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Max))
+ return i, nil
+}
+
+func (m *Ingress) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Ingress) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n24, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n24
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n25, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n25
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n26, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n26
+ return i, nil
+}
+
+func (m *IngressBackend) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *IngressBackend) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ServiceName)))
+ i += copy(dAtA[i:], m.ServiceName)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ServicePort.Size()))
+ n27, err := m.ServicePort.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n27
+ return i, nil
+}
+
+func (m *IngressList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *IngressList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n28, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n28
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *IngressRule) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *IngressRule) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Host)))
+ i += copy(dAtA[i:], m.Host)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.IngressRuleValue.Size()))
+ n29, err := m.IngressRuleValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n29
+ return i, nil
+}
+
+func (m *IngressRuleValue) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *IngressRuleValue) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.HTTP != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.HTTP.Size()))
+ n30, err := m.HTTP.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n30
+ }
+ return i, nil
+}
+
+func (m *IngressSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *IngressSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Backend != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Backend.Size()))
+ n31, err := m.Backend.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n31
+ }
+ if len(m.TLS) > 0 {
+ for _, msg := range m.TLS {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Rules) > 0 {
+ for _, msg := range m.Rules {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *IngressStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *IngressStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LoadBalancer.Size()))
+ n32, err := m.LoadBalancer.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n32
+ return i, nil
+}
+
+func (m *IngressTLS) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *IngressTLS) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Hosts) > 0 {
+ for _, s := range m.Hosts {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.SecretName)))
+ i += copy(dAtA[i:], m.SecretName)
+ return i, nil
+}
+
+func (m *NetworkPolicy) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NetworkPolicy) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n33, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n33
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n34, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n34
+ return i, nil
+}
+
+func (m *NetworkPolicyIngressRule) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NetworkPolicyIngressRule) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Ports) > 0 {
+ for _, msg := range m.Ports {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.From) > 0 {
+ for _, msg := range m.From {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *NetworkPolicyList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NetworkPolicyList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n35, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n35
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *NetworkPolicyPeer) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NetworkPolicyPeer) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.PodSelector != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PodSelector.Size()))
+ n36, err := m.PodSelector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n36
+ }
+ if m.NamespaceSelector != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NamespaceSelector.Size()))
+ n37, err := m.NamespaceSelector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n37
+ }
+ return i, nil
+}
+
+func (m *NetworkPolicyPort) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NetworkPolicyPort) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Protocol != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Protocol)))
+ i += copy(dAtA[i:], *m.Protocol)
+ }
+ if m.Port != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Port.Size()))
+ n38, err := m.Port.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n38
+ }
+ return i, nil
+}
+
+func (m *NetworkPolicySpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NetworkPolicySpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PodSelector.Size()))
+ n39, err := m.PodSelector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n39
+ if len(m.Ingress) > 0 {
+ for _, msg := range m.Ingress {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PodSecurityPolicy) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodSecurityPolicy) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n40, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n40
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n41, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n41
+ return i, nil
+}
+
+func (m *PodSecurityPolicyList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodSecurityPolicyList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n42, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n42
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PodSecurityPolicySpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodSecurityPolicySpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ if m.Privileged {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ if len(m.DefaultAddCapabilities) > 0 {
+ for _, s := range m.DefaultAddCapabilities {
+ dAtA[i] = 0x12
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.RequiredDropCapabilities) > 0 {
+ for _, s := range m.RequiredDropCapabilities {
+ dAtA[i] = 0x1a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.AllowedCapabilities) > 0 {
+ for _, s := range m.AllowedCapabilities {
+ dAtA[i] = 0x22
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Volumes) > 0 {
+ for _, s := range m.Volumes {
+ dAtA[i] = 0x2a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ dAtA[i] = 0x30
+ i++
+ if m.HostNetwork {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ if len(m.HostPorts) > 0 {
+ for _, msg := range m.HostPorts {
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x40
+ i++
+ if m.HostPID {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x48
+ i++
+ if m.HostIPC {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x52
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SELinux.Size()))
+ n43, err := m.SELinux.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n43
+ dAtA[i] = 0x5a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RunAsUser.Size()))
+ n44, err := m.RunAsUser.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n44
+ dAtA[i] = 0x62
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SupplementalGroups.Size()))
+ n45, err := m.SupplementalGroups.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n45
+ dAtA[i] = 0x6a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.FSGroup.Size()))
+ n46, err := m.FSGroup.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n46
+ dAtA[i] = 0x70
+ i++
+ if m.ReadOnlyRootFilesystem {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *ReplicaSet) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReplicaSet) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n47, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n47
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n48, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n48
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n49, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n49
+ return i, nil
+}
+
+func (m *ReplicaSetCondition) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReplicaSetCondition) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
+ i += copy(dAtA[i:], m.Status)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
+ n50, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n50
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ return i, nil
+}
+
+func (m *ReplicaSetList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReplicaSetList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n51, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n51
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ReplicaSetSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReplicaSetSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Replicas != nil {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.Replicas))
+ }
+ if m.Selector != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
+ n52, err := m.Selector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n52
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
+ n53, err := m.Template.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n53
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.MinReadySeconds))
+ return i, nil
+}
+
+func (m *ReplicaSetStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReplicaSetStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.FullyLabeledReplicas))
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration))
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ReadyReplicas))
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.AvailableReplicas))
+ if len(m.Conditions) > 0 {
+ for _, msg := range m.Conditions {
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ReplicationControllerDummy) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReplicationControllerDummy) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ return i, nil
+}
+
+func (m *RollbackConfig) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RollbackConfig) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Revision))
+ return i, nil
+}
+
+func (m *RollingUpdateDaemonSet) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RollingUpdateDaemonSet) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.MaxUnavailable != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.MaxUnavailable.Size()))
+ n54, err := m.MaxUnavailable.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n54
+ }
+ return i, nil
+}
+
+func (m *RollingUpdateDeployment) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RollingUpdateDeployment) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.MaxUnavailable != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.MaxUnavailable.Size()))
+ n55, err := m.MaxUnavailable.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n55
+ }
+ if m.MaxSurge != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.MaxSurge.Size()))
+ n56, err := m.MaxSurge.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n56
+ }
+ return i, nil
+}
+
+func (m *RunAsUserStrategyOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RunAsUserStrategyOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Rule)))
+ i += copy(dAtA[i:], m.Rule)
+ if len(m.Ranges) > 0 {
+ for _, msg := range m.Ranges {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *SELinuxStrategyOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SELinuxStrategyOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Rule)))
+ i += copy(dAtA[i:], m.Rule)
+ if m.SELinuxOptions != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SELinuxOptions.Size()))
+ n57, err := m.SELinuxOptions.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n57
+ }
+ return i, nil
+}
+
+func (m *Scale) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Scale) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n58, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n58
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n59, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n59
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n60, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n60
+ return i, nil
+}
+
+func (m *ScaleSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ScaleSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
+ return i, nil
+}
+
+func (m *ScaleStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ScaleStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
+ if len(m.Selector) > 0 {
+ keysForSelector := make([]string, 0, len(m.Selector))
+ for k := range m.Selector {
+ keysForSelector = append(keysForSelector, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForSelector)
+ for _, k := range keysForSelector {
+ dAtA[i] = 0x12
+ i++
+ v := m.Selector[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.TargetSelector)))
+ i += copy(dAtA[i:], m.TargetSelector)
+ return i, nil
+}
+
+func (m *SupplementalGroupsStrategyOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SupplementalGroupsStrategyOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Rule)))
+ i += copy(dAtA[i:], m.Rule)
+ if len(m.Ranges) > 0 {
+ for _, msg := range m.Ranges {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ThirdPartyResource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ThirdPartyResource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n61, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n61
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Description)))
+ i += copy(dAtA[i:], m.Description)
+ if len(m.Versions) > 0 {
+ for _, msg := range m.Versions {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ThirdPartyResourceData) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ThirdPartyResourceData) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n62, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n62
+ if m.Data != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Data)))
+ i += copy(dAtA[i:], m.Data)
+ }
+ return i, nil
+}
+
+func (m *ThirdPartyResourceDataList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ThirdPartyResourceDataList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n63, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n63
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ThirdPartyResourceList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ThirdPartyResourceList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n64, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n64
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *APIVersion) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *CustomMetricCurrentStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.CurrentValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *CustomMetricCurrentStatusList) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *CustomMetricTarget) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.TargetValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *CustomMetricTargetList) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *DaemonSet) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *DaemonSetList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *DaemonSetSpec) Size() (n int) {
+ var l int
+ _ = l
+ if m.Selector != nil {
+ l = m.Selector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ l = m.Template.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.UpdateStrategy.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.MinReadySeconds))
+ n += 1 + sovGenerated(uint64(m.TemplateGeneration))
+ if m.RevisionHistoryLimit != nil {
+ n += 1 + sovGenerated(uint64(*m.RevisionHistoryLimit))
+ }
+ return n
+}
+
+func (m *DaemonSetStatus) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.CurrentNumberScheduled))
+ n += 1 + sovGenerated(uint64(m.NumberMisscheduled))
+ n += 1 + sovGenerated(uint64(m.DesiredNumberScheduled))
+ n += 1 + sovGenerated(uint64(m.NumberReady))
+ n += 1 + sovGenerated(uint64(m.ObservedGeneration))
+ n += 1 + sovGenerated(uint64(m.UpdatedNumberScheduled))
+ n += 1 + sovGenerated(uint64(m.NumberAvailable))
+ n += 1 + sovGenerated(uint64(m.NumberUnavailable))
+ if m.CollisionCount != nil {
+ n += 1 + sovGenerated(uint64(*m.CollisionCount))
+ }
+ return n
+}
+
+func (m *DaemonSetUpdateStrategy) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.RollingUpdate != nil {
+ l = m.RollingUpdate.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *Deployment) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *DeploymentCondition) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Status)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastUpdateTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastTransitionTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *DeploymentList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *DeploymentRollback) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.UpdatedAnnotations) > 0 {
+ for k, v := range m.UpdatedAnnotations {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ l = m.RollbackTo.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *DeploymentSpec) Size() (n int) {
+ var l int
+ _ = l
+ if m.Replicas != nil {
+ n += 1 + sovGenerated(uint64(*m.Replicas))
+ }
+ if m.Selector != nil {
+ l = m.Selector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ l = m.Template.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Strategy.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.MinReadySeconds))
+ if m.RevisionHistoryLimit != nil {
+ n += 1 + sovGenerated(uint64(*m.RevisionHistoryLimit))
+ }
+ n += 2
+ if m.RollbackTo != nil {
+ l = m.RollbackTo.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.ProgressDeadlineSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.ProgressDeadlineSeconds))
+ }
+ return n
+}
+
+func (m *DeploymentStatus) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.ObservedGeneration))
+ n += 1 + sovGenerated(uint64(m.Replicas))
+ n += 1 + sovGenerated(uint64(m.UpdatedReplicas))
+ n += 1 + sovGenerated(uint64(m.AvailableReplicas))
+ n += 1 + sovGenerated(uint64(m.UnavailableReplicas))
+ if len(m.Conditions) > 0 {
+ for _, e := range m.Conditions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ n += 1 + sovGenerated(uint64(m.ReadyReplicas))
+ if m.CollisionCount != nil {
+ n += 1 + sovGenerated(uint64(*m.CollisionCount))
+ }
+ return n
+}
+
+func (m *DeploymentStrategy) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.RollingUpdate != nil {
+ l = m.RollingUpdate.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *FSGroupStrategyOptions) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Rule)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Ranges) > 0 {
+ for _, e := range m.Ranges {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *HTTPIngressPath) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Backend.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *HTTPIngressRuleValue) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Paths) > 0 {
+ for _, e := range m.Paths {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *HostPortRange) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Min))
+ n += 1 + sovGenerated(uint64(m.Max))
+ return n
+}
+
+func (m *IDRange) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Min))
+ n += 1 + sovGenerated(uint64(m.Max))
+ return n
+}
+
+func (m *Ingress) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *IngressBackend) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.ServiceName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.ServicePort.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *IngressList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *IngressRule) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Host)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.IngressRuleValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *IngressRuleValue) Size() (n int) {
+ var l int
+ _ = l
+ if m.HTTP != nil {
+ l = m.HTTP.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *IngressSpec) Size() (n int) {
+ var l int
+ _ = l
+ if m.Backend != nil {
+ l = m.Backend.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if len(m.TLS) > 0 {
+ for _, e := range m.TLS {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Rules) > 0 {
+ for _, e := range m.Rules {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *IngressStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = m.LoadBalancer.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *IngressTLS) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Hosts) > 0 {
+ for _, s := range m.Hosts {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.SecretName)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *NetworkPolicy) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *NetworkPolicyIngressRule) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Ports) > 0 {
+ for _, e := range m.Ports {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.From) > 0 {
+ for _, e := range m.From {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *NetworkPolicyList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *NetworkPolicyPeer) Size() (n int) {
+ var l int
+ _ = l
+ if m.PodSelector != nil {
+ l = m.PodSelector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.NamespaceSelector != nil {
+ l = m.NamespaceSelector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *NetworkPolicyPort) Size() (n int) {
+ var l int
+ _ = l
+ if m.Protocol != nil {
+ l = len(*m.Protocol)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Port != nil {
+ l = m.Port.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *NetworkPolicySpec) Size() (n int) {
+ var l int
+ _ = l
+ l = m.PodSelector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Ingress) > 0 {
+ for _, e := range m.Ingress {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PodSecurityPolicy) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodSecurityPolicyList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PodSecurityPolicySpec) Size() (n int) {
+ var l int
+ _ = l
+ n += 2
+ if len(m.DefaultAddCapabilities) > 0 {
+ for _, s := range m.DefaultAddCapabilities {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.RequiredDropCapabilities) > 0 {
+ for _, s := range m.RequiredDropCapabilities {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.AllowedCapabilities) > 0 {
+ for _, s := range m.AllowedCapabilities {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Volumes) > 0 {
+ for _, s := range m.Volumes {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ n += 2
+ if len(m.HostPorts) > 0 {
+ for _, e := range m.HostPorts {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ n += 2
+ n += 2
+ l = m.SELinux.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.RunAsUser.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.SupplementalGroups.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.FSGroup.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ return n
+}
+
+func (m *ReplicaSet) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ReplicaSetCondition) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Status)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastTransitionTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ReplicaSetList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ReplicaSetSpec) Size() (n int) {
+ var l int
+ _ = l
+ if m.Replicas != nil {
+ n += 1 + sovGenerated(uint64(*m.Replicas))
+ }
+ if m.Selector != nil {
+ l = m.Selector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ l = m.Template.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.MinReadySeconds))
+ return n
+}
+
+func (m *ReplicaSetStatus) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Replicas))
+ n += 1 + sovGenerated(uint64(m.FullyLabeledReplicas))
+ n += 1 + sovGenerated(uint64(m.ObservedGeneration))
+ n += 1 + sovGenerated(uint64(m.ReadyReplicas))
+ n += 1 + sovGenerated(uint64(m.AvailableReplicas))
+ if len(m.Conditions) > 0 {
+ for _, e := range m.Conditions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ReplicationControllerDummy) Size() (n int) {
+ var l int
+ _ = l
+ return n
+}
+
+func (m *RollbackConfig) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Revision))
+ return n
+}
+
+func (m *RollingUpdateDaemonSet) Size() (n int) {
+ var l int
+ _ = l
+ if m.MaxUnavailable != nil {
+ l = m.MaxUnavailable.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *RollingUpdateDeployment) Size() (n int) {
+ var l int
+ _ = l
+ if m.MaxUnavailable != nil {
+ l = m.MaxUnavailable.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.MaxSurge != nil {
+ l = m.MaxSurge.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *RunAsUserStrategyOptions) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Rule)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Ranges) > 0 {
+ for _, e := range m.Ranges {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *SELinuxStrategyOptions) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Rule)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.SELinuxOptions != nil {
+ l = m.SELinuxOptions.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *Scale) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ScaleSpec) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Replicas))
+ return n
+}
+
+func (m *ScaleStatus) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Replicas))
+ if len(m.Selector) > 0 {
+ for k, v := range m.Selector {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ l = len(m.TargetSelector)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *SupplementalGroupsStrategyOptions) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Rule)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Ranges) > 0 {
+ for _, e := range m.Ranges {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ThirdPartyResource) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Description)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Versions) > 0 {
+ for _, e := range m.Versions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ThirdPartyResourceData) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Data != nil {
+ l = len(m.Data)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *ThirdPartyResourceDataList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ThirdPartyResourceList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *APIVersion) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&APIVersion{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CustomMetricCurrentStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CustomMetricCurrentStatus{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `CurrentValue:` + strings.Replace(strings.Replace(this.CurrentValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CustomMetricCurrentStatusList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CustomMetricCurrentStatusList{`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "CustomMetricCurrentStatus", "CustomMetricCurrentStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CustomMetricTarget) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CustomMetricTarget{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `TargetValue:` + strings.Replace(strings.Replace(this.TargetValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CustomMetricTargetList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CustomMetricTargetList{`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "CustomMetricTarget", "CustomMetricTarget", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DaemonSet) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DaemonSet{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DaemonSetSpec", "DaemonSetSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DaemonSetStatus", "DaemonSetStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DaemonSetList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DaemonSetList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "DaemonSet", "DaemonSet", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DaemonSetSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DaemonSetSpec{`,
+ `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
+ `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_kubernetes_pkg_api_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
+ `UpdateStrategy:` + strings.Replace(strings.Replace(this.UpdateStrategy.String(), "DaemonSetUpdateStrategy", "DaemonSetUpdateStrategy", 1), `&`, ``, 1) + `,`,
+ `MinReadySeconds:` + fmt.Sprintf("%v", this.MinReadySeconds) + `,`,
+ `TemplateGeneration:` + fmt.Sprintf("%v", this.TemplateGeneration) + `,`,
+ `RevisionHistoryLimit:` + valueToStringGenerated(this.RevisionHistoryLimit) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DaemonSetStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DaemonSetStatus{`,
+ `CurrentNumberScheduled:` + fmt.Sprintf("%v", this.CurrentNumberScheduled) + `,`,
+ `NumberMisscheduled:` + fmt.Sprintf("%v", this.NumberMisscheduled) + `,`,
+ `DesiredNumberScheduled:` + fmt.Sprintf("%v", this.DesiredNumberScheduled) + `,`,
+ `NumberReady:` + fmt.Sprintf("%v", this.NumberReady) + `,`,
+ `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
+ `UpdatedNumberScheduled:` + fmt.Sprintf("%v", this.UpdatedNumberScheduled) + `,`,
+ `NumberAvailable:` + fmt.Sprintf("%v", this.NumberAvailable) + `,`,
+ `NumberUnavailable:` + fmt.Sprintf("%v", this.NumberUnavailable) + `,`,
+ `CollisionCount:` + valueToStringGenerated(this.CollisionCount) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DaemonSetUpdateStrategy) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DaemonSetUpdateStrategy{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `RollingUpdate:` + strings.Replace(fmt.Sprintf("%v", this.RollingUpdate), "RollingUpdateDaemonSet", "RollingUpdateDaemonSet", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Deployment) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Deployment{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DeploymentSpec", "DeploymentSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DeploymentStatus", "DeploymentStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeploymentCondition) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeploymentCondition{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `LastUpdateTime:` + strings.Replace(strings.Replace(this.LastUpdateTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeploymentList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeploymentList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Deployment", "Deployment", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeploymentRollback) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForUpdatedAnnotations := make([]string, 0, len(this.UpdatedAnnotations))
+ for k := range this.UpdatedAnnotations {
+ keysForUpdatedAnnotations = append(keysForUpdatedAnnotations, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForUpdatedAnnotations)
+ mapStringForUpdatedAnnotations := "map[string]string{"
+ for _, k := range keysForUpdatedAnnotations {
+ mapStringForUpdatedAnnotations += fmt.Sprintf("%v: %v,", k, this.UpdatedAnnotations[k])
+ }
+ mapStringForUpdatedAnnotations += "}"
+ s := strings.Join([]string{`&DeploymentRollback{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `UpdatedAnnotations:` + mapStringForUpdatedAnnotations + `,`,
+ `RollbackTo:` + strings.Replace(strings.Replace(this.RollbackTo.String(), "RollbackConfig", "RollbackConfig", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeploymentSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeploymentSpec{`,
+ `Replicas:` + valueToStringGenerated(this.Replicas) + `,`,
+ `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
+ `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_kubernetes_pkg_api_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
+ `Strategy:` + strings.Replace(strings.Replace(this.Strategy.String(), "DeploymentStrategy", "DeploymentStrategy", 1), `&`, ``, 1) + `,`,
+ `MinReadySeconds:` + fmt.Sprintf("%v", this.MinReadySeconds) + `,`,
+ `RevisionHistoryLimit:` + valueToStringGenerated(this.RevisionHistoryLimit) + `,`,
+ `Paused:` + fmt.Sprintf("%v", this.Paused) + `,`,
+ `RollbackTo:` + strings.Replace(fmt.Sprintf("%v", this.RollbackTo), "RollbackConfig", "RollbackConfig", 1) + `,`,
+ `ProgressDeadlineSeconds:` + valueToStringGenerated(this.ProgressDeadlineSeconds) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeploymentStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeploymentStatus{`,
+ `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
+ `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
+ `UpdatedReplicas:` + fmt.Sprintf("%v", this.UpdatedReplicas) + `,`,
+ `AvailableReplicas:` + fmt.Sprintf("%v", this.AvailableReplicas) + `,`,
+ `UnavailableReplicas:` + fmt.Sprintf("%v", this.UnavailableReplicas) + `,`,
+ `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "DeploymentCondition", "DeploymentCondition", 1), `&`, ``, 1) + `,`,
+ `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`,
+ `CollisionCount:` + valueToStringGenerated(this.CollisionCount) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeploymentStrategy) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeploymentStrategy{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `RollingUpdate:` + strings.Replace(fmt.Sprintf("%v", this.RollingUpdate), "RollingUpdateDeployment", "RollingUpdateDeployment", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *FSGroupStrategyOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&FSGroupStrategyOptions{`,
+ `Rule:` + fmt.Sprintf("%v", this.Rule) + `,`,
+ `Ranges:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ranges), "IDRange", "IDRange", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HTTPIngressPath) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HTTPIngressPath{`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `Backend:` + strings.Replace(strings.Replace(this.Backend.String(), "IngressBackend", "IngressBackend", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HTTPIngressRuleValue) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HTTPIngressRuleValue{`,
+ `Paths:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Paths), "HTTPIngressPath", "HTTPIngressPath", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HostPortRange) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HostPortRange{`,
+ `Min:` + fmt.Sprintf("%v", this.Min) + `,`,
+ `Max:` + fmt.Sprintf("%v", this.Max) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *IDRange) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&IDRange{`,
+ `Min:` + fmt.Sprintf("%v", this.Min) + `,`,
+ `Max:` + fmt.Sprintf("%v", this.Max) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Ingress) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Ingress{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "IngressSpec", "IngressSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "IngressStatus", "IngressStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *IngressBackend) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&IngressBackend{`,
+ `ServiceName:` + fmt.Sprintf("%v", this.ServiceName) + `,`,
+ `ServicePort:` + strings.Replace(strings.Replace(this.ServicePort.String(), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *IngressList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&IngressList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Ingress", "Ingress", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *IngressRule) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&IngressRule{`,
+ `Host:` + fmt.Sprintf("%v", this.Host) + `,`,
+ `IngressRuleValue:` + strings.Replace(strings.Replace(this.IngressRuleValue.String(), "IngressRuleValue", "IngressRuleValue", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *IngressRuleValue) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&IngressRuleValue{`,
+ `HTTP:` + strings.Replace(fmt.Sprintf("%v", this.HTTP), "HTTPIngressRuleValue", "HTTPIngressRuleValue", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *IngressSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&IngressSpec{`,
+ `Backend:` + strings.Replace(fmt.Sprintf("%v", this.Backend), "IngressBackend", "IngressBackend", 1) + `,`,
+ `TLS:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.TLS), "IngressTLS", "IngressTLS", 1), `&`, ``, 1) + `,`,
+ `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "IngressRule", "IngressRule", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *IngressStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&IngressStatus{`,
+ `LoadBalancer:` + strings.Replace(strings.Replace(this.LoadBalancer.String(), "LoadBalancerStatus", "k8s_io_kubernetes_pkg_api_v1.LoadBalancerStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *IngressTLS) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&IngressTLS{`,
+ `Hosts:` + fmt.Sprintf("%v", this.Hosts) + `,`,
+ `SecretName:` + fmt.Sprintf("%v", this.SecretName) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NetworkPolicy) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NetworkPolicy{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NetworkPolicySpec", "NetworkPolicySpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NetworkPolicyIngressRule) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NetworkPolicyIngressRule{`,
+ `Ports:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ports), "NetworkPolicyPort", "NetworkPolicyPort", 1), `&`, ``, 1) + `,`,
+ `From:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.From), "NetworkPolicyPeer", "NetworkPolicyPeer", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NetworkPolicyList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NetworkPolicyList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "NetworkPolicy", "NetworkPolicy", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NetworkPolicyPeer) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NetworkPolicyPeer{`,
+ `PodSelector:` + strings.Replace(fmt.Sprintf("%v", this.PodSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
+ `NamespaceSelector:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NetworkPolicyPort) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NetworkPolicyPort{`,
+ `Protocol:` + valueToStringGenerated(this.Protocol) + `,`,
+ `Port:` + strings.Replace(fmt.Sprintf("%v", this.Port), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NetworkPolicySpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NetworkPolicySpec{`,
+ `PodSelector:` + strings.Replace(strings.Replace(this.PodSelector.String(), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1), `&`, ``, 1) + `,`,
+ `Ingress:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ingress), "NetworkPolicyIngressRule", "NetworkPolicyIngressRule", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodSecurityPolicy) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodSecurityPolicy{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSecurityPolicySpec", "PodSecurityPolicySpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodSecurityPolicyList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodSecurityPolicyList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PodSecurityPolicy", "PodSecurityPolicy", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodSecurityPolicySpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodSecurityPolicySpec{`,
+ `Privileged:` + fmt.Sprintf("%v", this.Privileged) + `,`,
+ `DefaultAddCapabilities:` + fmt.Sprintf("%v", this.DefaultAddCapabilities) + `,`,
+ `RequiredDropCapabilities:` + fmt.Sprintf("%v", this.RequiredDropCapabilities) + `,`,
+ `AllowedCapabilities:` + fmt.Sprintf("%v", this.AllowedCapabilities) + `,`,
+ `Volumes:` + fmt.Sprintf("%v", this.Volumes) + `,`,
+ `HostNetwork:` + fmt.Sprintf("%v", this.HostNetwork) + `,`,
+ `HostPorts:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.HostPorts), "HostPortRange", "HostPortRange", 1), `&`, ``, 1) + `,`,
+ `HostPID:` + fmt.Sprintf("%v", this.HostPID) + `,`,
+ `HostIPC:` + fmt.Sprintf("%v", this.HostIPC) + `,`,
+ `SELinux:` + strings.Replace(strings.Replace(this.SELinux.String(), "SELinuxStrategyOptions", "SELinuxStrategyOptions", 1), `&`, ``, 1) + `,`,
+ `RunAsUser:` + strings.Replace(strings.Replace(this.RunAsUser.String(), "RunAsUserStrategyOptions", "RunAsUserStrategyOptions", 1), `&`, ``, 1) + `,`,
+ `SupplementalGroups:` + strings.Replace(strings.Replace(this.SupplementalGroups.String(), "SupplementalGroupsStrategyOptions", "SupplementalGroupsStrategyOptions", 1), `&`, ``, 1) + `,`,
+ `FSGroup:` + strings.Replace(strings.Replace(this.FSGroup.String(), "FSGroupStrategyOptions", "FSGroupStrategyOptions", 1), `&`, ``, 1) + `,`,
+ `ReadOnlyRootFilesystem:` + fmt.Sprintf("%v", this.ReadOnlyRootFilesystem) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ReplicaSet) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ReplicaSet{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ReplicaSetSpec", "ReplicaSetSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ReplicaSetStatus", "ReplicaSetStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ReplicaSetCondition) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ReplicaSetCondition{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
+ `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ReplicaSetList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ReplicaSetList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ReplicaSet", "ReplicaSet", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ReplicaSetSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ReplicaSetSpec{`,
+ `Replicas:` + valueToStringGenerated(this.Replicas) + `,`,
+ `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
+ `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_kubernetes_pkg_api_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
+ `MinReadySeconds:` + fmt.Sprintf("%v", this.MinReadySeconds) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ReplicaSetStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ReplicaSetStatus{`,
+ `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
+ `FullyLabeledReplicas:` + fmt.Sprintf("%v", this.FullyLabeledReplicas) + `,`,
+ `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
+ `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`,
+ `AvailableReplicas:` + fmt.Sprintf("%v", this.AvailableReplicas) + `,`,
+ `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "ReplicaSetCondition", "ReplicaSetCondition", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ReplicationControllerDummy) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ReplicationControllerDummy{`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RollbackConfig) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RollbackConfig{`,
+ `Revision:` + fmt.Sprintf("%v", this.Revision) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RollingUpdateDaemonSet) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RollingUpdateDaemonSet{`,
+ `MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RollingUpdateDeployment) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RollingUpdateDeployment{`,
+ `MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
+ `MaxSurge:` + strings.Replace(fmt.Sprintf("%v", this.MaxSurge), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RunAsUserStrategyOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RunAsUserStrategyOptions{`,
+ `Rule:` + fmt.Sprintf("%v", this.Rule) + `,`,
+ `Ranges:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ranges), "IDRange", "IDRange", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SELinuxStrategyOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SELinuxStrategyOptions{`,
+ `Rule:` + fmt.Sprintf("%v", this.Rule) + `,`,
+ `SELinuxOptions:` + strings.Replace(fmt.Sprintf("%v", this.SELinuxOptions), "SELinuxOptions", "k8s_io_kubernetes_pkg_api_v1.SELinuxOptions", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Scale) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Scale{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ScaleSpec", "ScaleSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ScaleStatus", "ScaleStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ScaleSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ScaleSpec{`,
+ `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ScaleStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForSelector := make([]string, 0, len(this.Selector))
+ for k := range this.Selector {
+ keysForSelector = append(keysForSelector, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForSelector)
+ mapStringForSelector := "map[string]string{"
+ for _, k := range keysForSelector {
+ mapStringForSelector += fmt.Sprintf("%v: %v,", k, this.Selector[k])
+ }
+ mapStringForSelector += "}"
+ s := strings.Join([]string{`&ScaleStatus{`,
+ `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
+ `Selector:` + mapStringForSelector + `,`,
+ `TargetSelector:` + fmt.Sprintf("%v", this.TargetSelector) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SupplementalGroupsStrategyOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SupplementalGroupsStrategyOptions{`,
+ `Rule:` + fmt.Sprintf("%v", this.Rule) + `,`,
+ `Ranges:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ranges), "IDRange", "IDRange", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ThirdPartyResource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ThirdPartyResource{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Description:` + fmt.Sprintf("%v", this.Description) + `,`,
+ `Versions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Versions), "APIVersion", "APIVersion", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ThirdPartyResourceData) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ThirdPartyResourceData{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Data:` + valueToStringGenerated(this.Data) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ThirdPartyResourceDataList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ThirdPartyResourceDataList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ThirdPartyResourceData", "ThirdPartyResourceData", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ThirdPartyResourceList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ThirdPartyResourceList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ThirdPartyResource", "ThirdPartyResource", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *APIVersion) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: APIVersion: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: APIVersion: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CustomMetricCurrentStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CustomMetricCurrentStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CustomMetricCurrentStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.CurrentValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CustomMetricCurrentStatusList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CustomMetricCurrentStatusList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CustomMetricCurrentStatusList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, CustomMetricCurrentStatus{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CustomMetricTarget) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CustomMetricTarget: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CustomMetricTarget: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.TargetValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CustomMetricTargetList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CustomMetricTargetList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CustomMetricTargetList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, CustomMetricTarget{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DaemonSet) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DaemonSet: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DaemonSet: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DaemonSetList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DaemonSetList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DaemonSetList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, DaemonSet{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DaemonSetSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DaemonSetSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DaemonSetSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Selector == nil {
+ m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
+ }
+ if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UpdateStrategy", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.UpdateStrategy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MinReadySeconds", wireType)
+ }
+ m.MinReadySeconds = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.MinReadySeconds |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TemplateGeneration", wireType)
+ }
+ m.TemplateGeneration = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.TemplateGeneration |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RevisionHistoryLimit", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.RevisionHistoryLimit = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DaemonSetStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DaemonSetStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DaemonSetStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentNumberScheduled", wireType)
+ }
+ m.CurrentNumberScheduled = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.CurrentNumberScheduled |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NumberMisscheduled", wireType)
+ }
+ m.NumberMisscheduled = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.NumberMisscheduled |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DesiredNumberScheduled", wireType)
+ }
+ m.DesiredNumberScheduled = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.DesiredNumberScheduled |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NumberReady", wireType)
+ }
+ m.NumberReady = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.NumberReady |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
+ }
+ m.ObservedGeneration = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ObservedGeneration |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UpdatedNumberScheduled", wireType)
+ }
+ m.UpdatedNumberScheduled = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.UpdatedNumberScheduled |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NumberAvailable", wireType)
+ }
+ m.NumberAvailable = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.NumberAvailable |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 8:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NumberUnavailable", wireType)
+ }
+ m.NumberUnavailable = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.NumberUnavailable |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 9:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CollisionCount", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.CollisionCount = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DaemonSetUpdateStrategy) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DaemonSetUpdateStrategy: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DaemonSetUpdateStrategy: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = DaemonSetUpdateStrategyType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RollingUpdate", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.RollingUpdate == nil {
+ m.RollingUpdate = &RollingUpdateDaemonSet{}
+ }
+ if err := m.RollingUpdate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Deployment) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Deployment: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Deployment: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeploymentCondition) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeploymentCondition: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeploymentCondition: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = DeploymentConditionType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Status = k8s_io_kubernetes_pkg_api_v1.ConditionStatus(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastUpdateTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastUpdateTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeploymentList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeploymentList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeploymentList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, Deployment{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeploymentRollback) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeploymentRollback: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeploymentRollback: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAnnotations", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.UpdatedAnnotations == nil {
+ m.UpdatedAnnotations = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.UpdatedAnnotations[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.UpdatedAnnotations[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RollbackTo", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.RollbackTo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeploymentSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeploymentSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeploymentSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Replicas = &v
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Selector == nil {
+ m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
+ }
+ if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Strategy", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Strategy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MinReadySeconds", wireType)
+ }
+ m.MinReadySeconds = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.MinReadySeconds |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RevisionHistoryLimit", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.RevisionHistoryLimit = &v
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Paused", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Paused = bool(v != 0)
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RollbackTo", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.RollbackTo == nil {
+ m.RollbackTo = &RollbackConfig{}
+ }
+ if err := m.RollbackTo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 9:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ProgressDeadlineSeconds", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ProgressDeadlineSeconds = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeploymentStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeploymentStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeploymentStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
+ }
+ m.ObservedGeneration = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ObservedGeneration |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ m.Replicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Replicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UpdatedReplicas", wireType)
+ }
+ m.UpdatedReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.UpdatedReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AvailableReplicas", wireType)
+ }
+ m.AvailableReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.AvailableReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UnavailableReplicas", wireType)
+ }
+ m.UnavailableReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.UnavailableReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Conditions = append(m.Conditions, DeploymentCondition{})
+ if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadyReplicas", wireType)
+ }
+ m.ReadyReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ReadyReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 8:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CollisionCount", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.CollisionCount = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeploymentStrategy) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeploymentStrategy: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeploymentStrategy: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = DeploymentStrategyType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RollingUpdate", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.RollingUpdate == nil {
+ m.RollingUpdate = &RollingUpdateDeployment{}
+ }
+ if err := m.RollingUpdate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *FSGroupStrategyOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: FSGroupStrategyOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: FSGroupStrategyOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Rule = FSGroupStrategyType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Ranges = append(m.Ranges, IDRange{})
+ if err := m.Ranges[len(m.Ranges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HTTPIngressPath) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HTTPIngressPath: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HTTPIngressPath: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Backend", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Backend.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HTTPIngressRuleValue) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HTTPIngressRuleValue: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HTTPIngressRuleValue: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Paths = append(m.Paths, HTTPIngressPath{})
+ if err := m.Paths[len(m.Paths)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HostPortRange) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HostPortRange: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HostPortRange: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType)
+ }
+ m.Min = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Min |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType)
+ }
+ m.Max = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Max |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *IDRange) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: IDRange: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: IDRange: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType)
+ }
+ m.Min = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Min |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType)
+ }
+ m.Max = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Max |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Ingress) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Ingress: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Ingress: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *IngressBackend) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: IngressBackend: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: IngressBackend: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ServiceName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ServiceName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ServicePort", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ServicePort.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *IngressList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: IngressList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: IngressList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, Ingress{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *IngressRule) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: IngressRule: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: IngressRule: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Host = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IngressRuleValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.IngressRuleValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *IngressRuleValue) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: IngressRuleValue: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: IngressRuleValue: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HTTP", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.HTTP == nil {
+ m.HTTP = &HTTPIngressRuleValue{}
+ }
+ if err := m.HTTP.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *IngressSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: IngressSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: IngressSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Backend", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Backend == nil {
+ m.Backend = &IngressBackend{}
+ }
+ if err := m.Backend.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TLS", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.TLS = append(m.TLS, IngressTLS{})
+ if err := m.TLS[len(m.TLS)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Rules = append(m.Rules, IngressRule{})
+ if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *IngressStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: IngressStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: IngressStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LoadBalancer", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LoadBalancer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *IngressTLS) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: IngressTLS: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: IngressTLS: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Hosts = append(m.Hosts, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecretName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SecretName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NetworkPolicy) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NetworkPolicy: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NetworkPolicy: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NetworkPolicyIngressRule) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NetworkPolicyIngressRule: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NetworkPolicyIngressRule: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Ports = append(m.Ports, NetworkPolicyPort{})
+ if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field From", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.From = append(m.From, NetworkPolicyPeer{})
+ if err := m.From[len(m.From)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NetworkPolicyList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NetworkPolicyList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NetworkPolicyList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, NetworkPolicy{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NetworkPolicyPeer) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NetworkPolicyPeer: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NetworkPolicyPeer: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodSelector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PodSelector == nil {
+ m.PodSelector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
+ }
+ if err := m.PodSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NamespaceSelector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.NamespaceSelector == nil {
+ m.NamespaceSelector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
+ }
+ if err := m.NamespaceSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NetworkPolicyPort) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NetworkPolicyPort: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NetworkPolicyPort: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := k8s_io_kubernetes_pkg_api_v1.Protocol(dAtA[iNdEx:postIndex])
+ m.Protocol = &s
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Port == nil {
+ m.Port = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
+ }
+ if err := m.Port.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NetworkPolicySpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NetworkPolicySpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NetworkPolicySpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodSelector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.PodSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Ingress", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Ingress = append(m.Ingress, NetworkPolicyIngressRule{})
+ if err := m.Ingress[len(m.Ingress)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodSecurityPolicy) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodSecurityPolicy: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodSecurityPolicy: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodSecurityPolicyList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodSecurityPolicyList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodSecurityPolicyList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, PodSecurityPolicy{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodSecurityPolicySpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodSecurityPolicySpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodSecurityPolicySpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Privileged", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Privileged = bool(v != 0)
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DefaultAddCapabilities", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.DefaultAddCapabilities = append(m.DefaultAddCapabilities, k8s_io_kubernetes_pkg_api_v1.Capability(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RequiredDropCapabilities", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.RequiredDropCapabilities = append(m.RequiredDropCapabilities, k8s_io_kubernetes_pkg_api_v1.Capability(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AllowedCapabilities", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.AllowedCapabilities = append(m.AllowedCapabilities, k8s_io_kubernetes_pkg_api_v1.Capability(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Volumes = append(m.Volumes, FSType(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostNetwork", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.HostNetwork = bool(v != 0)
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostPorts", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.HostPorts = append(m.HostPorts, HostPortRange{})
+ if err := m.HostPorts[len(m.HostPorts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostPID", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.HostPID = bool(v != 0)
+ case 9:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostIPC", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.HostIPC = bool(v != 0)
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SELinux", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.SELinux.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 11:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RunAsUser", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.RunAsUser.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 12:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SupplementalGroups", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.SupplementalGroups.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 13:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSGroup", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.FSGroup.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 14:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnlyRootFilesystem", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnlyRootFilesystem = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReplicaSet) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReplicaSet: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReplicaSet: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReplicaSetCondition) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReplicaSetCondition: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReplicaSetCondition: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = ReplicaSetConditionType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Status = k8s_io_kubernetes_pkg_api_v1.ConditionStatus(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReplicaSetList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReplicaSetList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReplicaSetList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ReplicaSet{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReplicaSetSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReplicaSetSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReplicaSetSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Replicas = &v
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Selector == nil {
+ m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
+ }
+ if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MinReadySeconds", wireType)
+ }
+ m.MinReadySeconds = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.MinReadySeconds |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReplicaSetStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReplicaSetStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReplicaSetStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ m.Replicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Replicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FullyLabeledReplicas", wireType)
+ }
+ m.FullyLabeledReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.FullyLabeledReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
+ }
+ m.ObservedGeneration = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ObservedGeneration |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadyReplicas", wireType)
+ }
+ m.ReadyReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ReadyReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AvailableReplicas", wireType)
+ }
+ m.AvailableReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.AvailableReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Conditions = append(m.Conditions, ReplicaSetCondition{})
+ if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReplicationControllerDummy) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReplicationControllerDummy: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReplicationControllerDummy: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RollbackConfig) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RollbackConfig: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RollbackConfig: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType)
+ }
+ m.Revision = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Revision |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RollingUpdateDaemonSet) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RollingUpdateDaemonSet: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RollingUpdateDaemonSet: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MaxUnavailable", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.MaxUnavailable == nil {
+ m.MaxUnavailable = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
+ }
+ if err := m.MaxUnavailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RollingUpdateDeployment) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RollingUpdateDeployment: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RollingUpdateDeployment: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MaxUnavailable", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.MaxUnavailable == nil {
+ m.MaxUnavailable = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
+ }
+ if err := m.MaxUnavailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MaxSurge", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.MaxSurge == nil {
+ m.MaxSurge = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
+ }
+ if err := m.MaxSurge.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RunAsUserStrategyOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RunAsUserStrategyOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RunAsUserStrategyOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Rule = RunAsUserStrategy(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Ranges = append(m.Ranges, IDRange{})
+ if err := m.Ranges[len(m.Ranges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SELinuxStrategyOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SELinuxStrategyOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SELinuxStrategyOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Rule = SELinuxStrategy(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SELinuxOptions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SELinuxOptions == nil {
+ m.SELinuxOptions = &k8s_io_kubernetes_pkg_api_v1.SELinuxOptions{}
+ }
+ if err := m.SELinuxOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Scale) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Scale: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Scale: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ScaleSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ScaleSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ScaleSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ m.Replicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Replicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ScaleStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ScaleStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ScaleStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ m.Replicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Replicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Selector == nil {
+ m.Selector = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Selector[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Selector[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetSelector", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.TargetSelector = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SupplementalGroupsStrategyOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SupplementalGroupsStrategyOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SupplementalGroupsStrategyOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Rule = SupplementalGroupsStrategyType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Ranges = append(m.Ranges, IDRange{})
+ if err := m.Ranges[len(m.Ranges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ThirdPartyResource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ThirdPartyResource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ThirdPartyResource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Description = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Versions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Versions = append(m.Versions, APIVersion{})
+ if err := m.Versions[len(m.Versions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ThirdPartyResourceData) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ThirdPartyResourceData: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ThirdPartyResourceData: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
+ }
+ var byteLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ byteLen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if byteLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + byteLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
+ if m.Data == nil {
+ m.Data = []byte{}
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ThirdPartyResourceDataList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ThirdPartyResourceDataList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ThirdPartyResourceDataList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ThirdPartyResourceData{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ThirdPartyResourceList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ThirdPartyResourceList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ThirdPartyResourceList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ThirdPartyResource{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/client-go/pkg/apis/extensions/v1beta1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 3406 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5b, 0xdd, 0x6f, 0x1b, 0xc7,
+ 0xb5, 0xf7, 0x8a, 0xa4, 0x44, 0x1d, 0x59, 0x92, 0x35, 0x72, 0x64, 0x46, 0x49, 0x24, 0x67, 0x2f,
+ 0x6e, 0xe2, 0xdc, 0x1b, 0x53, 0x37, 0xce, 0x75, 0x6e, 0xe2, 0x24, 0x4e, 0x44, 0xc9, 0x1f, 0xba,
+ 0x90, 0x64, 0x66, 0x48, 0x19, 0x8d, 0xf3, 0xd5, 0x15, 0x39, 0xa2, 0xd6, 0xde, 0xaf, 0xec, 0xce,
+ 0x2a, 0x22, 0x82, 0xb6, 0x01, 0x8a, 0xe6, 0xb1, 0x68, 0x5f, 0x8a, 0x14, 0x68, 0x1f, 0xfb, 0xd0,
+ 0x97, 0x36, 0x79, 0x68, 0xd3, 0xfe, 0x05, 0xf5, 0x43, 0x51, 0xa4, 0x40, 0x0b, 0x04, 0x45, 0x2a,
+ 0xd4, 0x0a, 0x9a, 0x7f, 0xa0, 0xc8, 0x8b, 0x9f, 0x8a, 0x99, 0x9d, 0xfd, 0xde, 0x95, 0x4d, 0x4a,
+ 0x26, 0x0a, 0xf4, 0x4d, 0x9c, 0x39, 0xe7, 0x77, 0x3e, 0xe6, 0xcc, 0x99, 0x33, 0x73, 0x56, 0xf0,
+ 0xf2, 0xad, 0xe7, 0x9d, 0xaa, 0x6a, 0x2e, 0xdc, 0x72, 0x37, 0x89, 0x6d, 0x10, 0x4a, 0x9c, 0x05,
+ 0xeb, 0x56, 0x67, 0x41, 0xb1, 0x54, 0x67, 0x81, 0xec, 0x52, 0x62, 0x38, 0xaa, 0x69, 0x38, 0x0b,
+ 0x3b, 0xcf, 0x6c, 0x12, 0xaa, 0x3c, 0xb3, 0xd0, 0x21, 0x06, 0xb1, 0x15, 0x4a, 0xda, 0x55, 0xcb,
+ 0x36, 0xa9, 0x89, 0xce, 0x7a, 0xec, 0xd5, 0x90, 0xbd, 0x6a, 0xdd, 0xea, 0x54, 0x19, 0x7b, 0x35,
+ 0x64, 0xaf, 0x0a, 0xf6, 0xd9, 0xb3, 0x1d, 0x95, 0x6e, 0xbb, 0x9b, 0xd5, 0x96, 0xa9, 0x2f, 0x74,
+ 0xcc, 0x8e, 0xb9, 0xc0, 0x51, 0x36, 0xdd, 0x2d, 0xfe, 0x8b, 0xff, 0xe0, 0x7f, 0x79, 0xe8, 0xb3,
+ 0xff, 0x2b, 0x94, 0x53, 0x2c, 0x55, 0x57, 0x5a, 0xdb, 0xaa, 0x41, 0xec, 0xae, 0xaf, 0xde, 0x82,
+ 0x4d, 0x1c, 0xd3, 0xb5, 0x5b, 0x24, 0xa9, 0xd3, 0x81, 0x5c, 0xce, 0x82, 0x4e, 0xa8, 0xb2, 0xb0,
+ 0x93, 0xb2, 0x64, 0x76, 0x21, 0x8f, 0xcb, 0x76, 0x0d, 0xaa, 0xea, 0x69, 0x31, 0xcf, 0xdd, 0x8b,
+ 0xc1, 0x69, 0x6d, 0x13, 0x5d, 0x49, 0xf1, 0x3d, 0x9b, 0xc7, 0xe7, 0x52, 0x55, 0x5b, 0x50, 0x0d,
+ 0xea, 0x50, 0x3b, 0xc5, 0xf4, 0x74, 0xee, 0x32, 0x65, 0xd9, 0xf2, 0xc2, 0x01, 0x8b, 0x6a, 0x99,
+ 0x9a, 0xda, 0xea, 0xe6, 0x2d, 0xa8, 0x5c, 0x05, 0x58, 0xac, 0xaf, 0x5c, 0x27, 0x36, 0x5b, 0x38,
+ 0x74, 0x1a, 0x8a, 0x86, 0xa2, 0x93, 0x8a, 0x74, 0x5a, 0x3a, 0x33, 0x5a, 0x3b, 0x7e, 0x7b, 0x6f,
+ 0xfe, 0xd8, 0xfe, 0xde, 0x7c, 0x71, 0x5d, 0xd1, 0x09, 0xe6, 0x33, 0xf2, 0x8f, 0x25, 0x78, 0x78,
+ 0xc9, 0x75, 0xa8, 0xa9, 0xaf, 0x11, 0x6a, 0xab, 0xad, 0x25, 0xd7, 0xb6, 0x89, 0x41, 0x1b, 0x54,
+ 0xa1, 0xae, 0x73, 0x6f, 0x7e, 0x74, 0x03, 0x4a, 0x3b, 0x8a, 0xe6, 0x92, 0xca, 0xd0, 0x69, 0xe9,
+ 0xcc, 0xd8, 0xb9, 0x6a, 0x55, 0x04, 0x54, 0xd4, 0x3b, 0x7e, 0x48, 0x55, 0xfd, 0x25, 0xaf, 0xbe,
+ 0xe6, 0x2a, 0x06, 0x55, 0x69, 0xb7, 0x76, 0x52, 0x40, 0x1e, 0x17, 0x72, 0xaf, 0x33, 0x2c, 0xec,
+ 0x41, 0xca, 0xdf, 0x97, 0xe0, 0xb1, 0x5c, 0xdd, 0x56, 0x55, 0x87, 0x22, 0x1d, 0x4a, 0x2a, 0x25,
+ 0xba, 0x53, 0x91, 0x4e, 0x17, 0xce, 0x8c, 0x9d, 0xbb, 0x5a, 0xed, 0x29, 0x9c, 0xab, 0xb9, 0xe0,
+ 0xb5, 0x71, 0xa1, 0x57, 0x69, 0x85, 0xc1, 0x63, 0x4f, 0x8a, 0xfc, 0x43, 0x09, 0x50, 0x94, 0xa7,
+ 0xa9, 0xd8, 0x1d, 0x42, 0xef, 0xc3, 0x4b, 0xaf, 0x1f, 0xce, 0x4b, 0xd3, 0x02, 0x72, 0xcc, 0x13,
+ 0x18, 0x73, 0xd2, 0x07, 0x12, 0xcc, 0xa4, 0x75, 0xe2, 0xde, 0xd9, 0x8a, 0x7b, 0x67, 0xf1, 0x10,
+ 0xde, 0xf1, 0x50, 0x73, 0xdc, 0xf2, 0xab, 0x21, 0x18, 0x5d, 0x56, 0x88, 0x6e, 0x1a, 0x0d, 0x42,
+ 0xd1, 0x37, 0xa1, 0xcc, 0xf6, 0x68, 0x5b, 0xa1, 0x0a, 0xf7, 0xc8, 0xd8, 0xb9, 0xff, 0x39, 0xc8,
+ 0x5c, 0xa7, 0xca, 0xa8, 0xab, 0x3b, 0xcf, 0x54, 0xaf, 0x6d, 0xde, 0x24, 0x2d, 0xba, 0x46, 0xa8,
+ 0x52, 0x43, 0x42, 0x0e, 0x84, 0x63, 0x38, 0x40, 0x45, 0x6f, 0x43, 0xd1, 0xb1, 0x48, 0x4b, 0x38,
+ 0xf3, 0xa5, 0x1e, 0xcd, 0x0a, 0x34, 0x6d, 0x58, 0xa4, 0x15, 0xae, 0x16, 0xfb, 0x85, 0x39, 0x2e,
+ 0xda, 0x82, 0x61, 0x87, 0x87, 0x41, 0xa5, 0xc0, 0x25, 0x5c, 0xec, 0x5b, 0x82, 0x17, 0x4c, 0x13,
+ 0x42, 0xc6, 0xb0, 0xf7, 0x1b, 0x0b, 0x74, 0xf9, 0xf7, 0x12, 0x8c, 0x07, 0xb4, 0x7c, 0xc5, 0xde,
+ 0x4c, 0xf9, 0xae, 0x7a, 0x7f, 0xbe, 0x63, 0xdc, 0xdc, 0x73, 0x27, 0x84, 0xac, 0xb2, 0x3f, 0x12,
+ 0xf1, 0xdb, 0x5b, 0x7e, 0x3c, 0x0c, 0xf1, 0x78, 0x78, 0xbe, 0x5f, 0xb3, 0x72, 0xc2, 0xe0, 0x93,
+ 0x62, 0xc4, 0x1c, 0xe6, 0x4e, 0xf4, 0x16, 0x94, 0x1d, 0xa2, 0x91, 0x16, 0x35, 0x6d, 0x61, 0xce,
+ 0xb3, 0xf7, 0x69, 0x8e, 0xb2, 0x49, 0xb4, 0x86, 0x60, 0xad, 0x1d, 0x67, 0xf6, 0xf8, 0xbf, 0x70,
+ 0x00, 0x89, 0xde, 0x80, 0x32, 0x25, 0xba, 0xa5, 0x29, 0xd4, 0xdf, 0x58, 0x67, 0xf3, 0x4d, 0x62,
+ 0xb0, 0x75, 0xb3, 0xdd, 0x14, 0x0c, 0x7c, 0xf1, 0x03, 0x67, 0xf9, 0xa3, 0x38, 0x00, 0x44, 0x1f,
+ 0x4a, 0x30, 0xe1, 0x5a, 0x6d, 0x46, 0x4a, 0x59, 0x82, 0xed, 0x74, 0x45, 0x34, 0x5c, 0xee, 0xd7,
+ 0x6d, 0x1b, 0x31, 0xb4, 0xda, 0x8c, 0x10, 0x3e, 0x11, 0x1f, 0xc7, 0x09, 0xa9, 0x68, 0x11, 0x26,
+ 0x75, 0xd5, 0xc0, 0x44, 0x69, 0x77, 0x1b, 0xa4, 0x65, 0x1a, 0x6d, 0xa7, 0x52, 0x3c, 0x2d, 0x9d,
+ 0x29, 0xd5, 0x4e, 0x09, 0x80, 0xc9, 0xb5, 0xf8, 0x34, 0x4e, 0xd2, 0xa3, 0xff, 0x07, 0xe4, 0xdb,
+ 0x75, 0xc5, 0x3b, 0x2f, 0x54, 0xd3, 0xa8, 0x94, 0x4e, 0x4b, 0x67, 0x0a, 0xb5, 0x59, 0x81, 0x82,
+ 0x9a, 0x29, 0x0a, 0x9c, 0xc1, 0x85, 0x56, 0xe1, 0xa4, 0x4d, 0x76, 0x54, 0x66, 0xe3, 0x55, 0xd5,
+ 0xa1, 0xa6, 0xdd, 0x5d, 0x55, 0x75, 0x95, 0x56, 0x86, 0xb9, 0x4e, 0x95, 0xfd, 0xbd, 0xf9, 0x93,
+ 0x38, 0x63, 0x1e, 0x67, 0x72, 0xc9, 0x1f, 0x97, 0x60, 0x32, 0xb1, 0x5d, 0xd0, 0x75, 0x98, 0x69,
+ 0x79, 0xc9, 0x78, 0xdd, 0xd5, 0x37, 0x89, 0xdd, 0x68, 0x6d, 0x93, 0xb6, 0xab, 0x91, 0x36, 0x8f,
+ 0xa1, 0x52, 0x6d, 0x4e, 0x68, 0x3c, 0xb3, 0x94, 0x49, 0x85, 0x73, 0xb8, 0x99, 0x17, 0x0c, 0x3e,
+ 0xb4, 0xa6, 0x3a, 0x4e, 0x80, 0x39, 0xc4, 0x31, 0x03, 0x2f, 0xac, 0xa7, 0x28, 0x70, 0x06, 0x17,
+ 0xd3, 0xb1, 0x4d, 0x1c, 0xd5, 0x26, 0xed, 0xa4, 0x8e, 0x85, 0xb8, 0x8e, 0xcb, 0x99, 0x54, 0x38,
+ 0x87, 0x1b, 0x9d, 0x87, 0x31, 0x4f, 0x1a, 0x5f, 0x3f, 0xb1, 0xd0, 0x41, 0xfa, 0x5f, 0x0f, 0xa7,
+ 0x70, 0x94, 0x8e, 0x99, 0x66, 0x6e, 0x3a, 0xc4, 0xde, 0x21, 0xed, 0xfc, 0x05, 0xbe, 0x96, 0xa2,
+ 0xc0, 0x19, 0x5c, 0xcc, 0x34, 0x2f, 0x02, 0x53, 0xa6, 0x0d, 0xc7, 0x4d, 0xdb, 0xc8, 0xa4, 0xc2,
+ 0x39, 0xdc, 0x2c, 0x8e, 0x3d, 0x95, 0x17, 0x77, 0x14, 0x55, 0x53, 0x36, 0x35, 0x52, 0x19, 0x89,
+ 0xc7, 0xf1, 0x7a, 0x7c, 0x1a, 0x27, 0xe9, 0xd1, 0x15, 0x98, 0xf2, 0x86, 0x36, 0x0c, 0x25, 0x00,
+ 0x29, 0x73, 0x90, 0x87, 0x05, 0xc8, 0xd4, 0x7a, 0x92, 0x00, 0xa7, 0x79, 0xd0, 0x05, 0x98, 0x68,
+ 0x99, 0x9a, 0xc6, 0xe3, 0x71, 0xc9, 0x74, 0x0d, 0x5a, 0x19, 0xe5, 0xbe, 0x42, 0x6c, 0x3f, 0x2e,
+ 0xc5, 0x66, 0x70, 0x82, 0x52, 0xfe, 0x8b, 0x04, 0xa7, 0x72, 0xf6, 0x34, 0x7a, 0x05, 0x8a, 0xb4,
+ 0x6b, 0xf9, 0x95, 0xc0, 0x7f, 0xfb, 0x67, 0x4b, 0xb3, 0x6b, 0x91, 0xbb, 0x7b, 0xf3, 0x8f, 0xe4,
+ 0xb0, 0xb1, 0x69, 0xcc, 0x19, 0xd1, 0xb7, 0x61, 0xdc, 0x66, 0xe2, 0x8c, 0x8e, 0x47, 0x22, 0xf2,
+ 0xda, 0xa5, 0x1e, 0x73, 0x0e, 0x8e, 0x62, 0x84, 0x79, 0x7b, 0x6a, 0x7f, 0x6f, 0x7e, 0x3c, 0x36,
+ 0x87, 0xe3, 0xe2, 0xe4, 0xdf, 0x0c, 0x01, 0x2c, 0x13, 0x4b, 0x33, 0xbb, 0x3a, 0x31, 0x06, 0x71,
+ 0x96, 0xbf, 0x13, 0x3b, 0xcb, 0x5f, 0xee, 0x35, 0xb7, 0x06, 0xaa, 0xe6, 0x1e, 0xe6, 0x9d, 0xc4,
+ 0x61, 0xfe, 0x4a, 0xff, 0x22, 0x0e, 0x3e, 0xcd, 0xef, 0x14, 0x60, 0x3a, 0x24, 0x5e, 0x32, 0x8d,
+ 0xb6, 0xca, 0xf7, 0xd3, 0x8b, 0xb1, 0x98, 0x78, 0x32, 0x11, 0x13, 0xa7, 0x32, 0x58, 0x22, 0xf1,
+ 0x70, 0x3d, 0xd0, 0x7e, 0x88, 0xb3, 0x5f, 0x8c, 0x0b, 0xbf, 0xbb, 0x37, 0x7f, 0xe0, 0xcd, 0xa2,
+ 0x1a, 0x60, 0xc6, 0x95, 0x45, 0x4f, 0xc0, 0xb0, 0x4d, 0x14, 0xc7, 0x34, 0x78, 0x8a, 0x19, 0x0d,
+ 0x8d, 0xc2, 0x7c, 0x14, 0x8b, 0x59, 0xf4, 0x14, 0x8c, 0xe8, 0xc4, 0x71, 0x94, 0x0e, 0xe1, 0xd9,
+ 0x64, 0xb4, 0x36, 0x29, 0x08, 0x47, 0xd6, 0xbc, 0x61, 0xec, 0xcf, 0xa3, 0x9b, 0x30, 0xa1, 0x29,
+ 0x8e, 0x08, 0xed, 0xa6, 0xaa, 0x13, 0x9e, 0x2f, 0xc6, 0xce, 0xfd, 0xd7, 0xfd, 0x45, 0x0c, 0xe3,
+ 0x08, 0xcf, 0xc4, 0xd5, 0x18, 0x12, 0x4e, 0x20, 0xa3, 0x1d, 0x40, 0x6c, 0xa4, 0x69, 0x2b, 0x86,
+ 0xe3, 0xb9, 0x8c, 0xc9, 0x1b, 0xe9, 0x59, 0x5e, 0x90, 0x1b, 0x57, 0x53, 0x68, 0x38, 0x43, 0x82,
+ 0xfc, 0x07, 0x09, 0x26, 0xc2, 0x05, 0x1b, 0x40, 0xc9, 0xf6, 0x76, 0xbc, 0x64, 0x7b, 0xa1, 0xef,
+ 0xe0, 0xcd, 0xa9, 0xd9, 0x3e, 0x2a, 0x00, 0x0a, 0x89, 0x58, 0x6a, 0xd8, 0x54, 0x5a, 0xb7, 0xee,
+ 0xe3, 0x46, 0xf3, 0x33, 0x09, 0x90, 0x48, 0xf4, 0x8b, 0x86, 0x61, 0x52, 0x7e, 0x76, 0xf8, 0x6a,
+ 0xbe, 0xde, 0xb7, 0x9a, 0xbe, 0x06, 0xd5, 0x8d, 0x14, 0xf6, 0x25, 0x83, 0xda, 0xdd, 0x70, 0xc5,
+ 0xd2, 0x04, 0x38, 0x43, 0x21, 0xf4, 0x2e, 0x80, 0x2d, 0x30, 0x9b, 0xa6, 0x48, 0x01, 0x2f, 0xf7,
+ 0x91, 0x4d, 0x19, 0xc0, 0x92, 0x69, 0x6c, 0xa9, 0x9d, 0x30, 0xa1, 0xe1, 0x00, 0x18, 0x47, 0x84,
+ 0xcc, 0x5e, 0x82, 0x53, 0x39, 0xda, 0xa3, 0x13, 0x50, 0xb8, 0x45, 0xba, 0x9e, 0x5b, 0x31, 0xfb,
+ 0x13, 0x9d, 0x8c, 0xde, 0x0c, 0x47, 0xc5, 0xa5, 0xee, 0xc2, 0xd0, 0xf3, 0x92, 0xfc, 0x55, 0x29,
+ 0x1a, 0x6b, 0xbc, 0x9e, 0x3e, 0x03, 0x65, 0x9b, 0x58, 0x9a, 0xda, 0x52, 0x1c, 0x51, 0x0b, 0xf1,
+ 0xd2, 0x18, 0x8b, 0x31, 0x1c, 0xcc, 0xc6, 0x2a, 0xef, 0xa1, 0x07, 0x5b, 0x79, 0x17, 0x8e, 0xba,
+ 0xf2, 0x36, 0xa1, 0xec, 0xf8, 0x25, 0x77, 0x91, 0x83, 0x2f, 0x1e, 0x22, 0x67, 0x8b, 0x6a, 0x3b,
+ 0x10, 0x18, 0xd4, 0xd9, 0x81, 0x90, 0xac, 0x0a, 0xbb, 0xd4, 0x63, 0x85, 0x7d, 0xa4, 0x55, 0x31,
+ 0xcb, 0xce, 0x96, 0xe2, 0x3a, 0xa4, 0xcd, 0x53, 0x5a, 0x39, 0xcc, 0xce, 0x75, 0x3e, 0x8a, 0xc5,
+ 0x2c, 0xd2, 0x63, 0xc1, 0x5d, 0x3e, 0x8a, 0xe0, 0x9e, 0xc8, 0x0f, 0x6c, 0xb4, 0x01, 0xa7, 0x2c,
+ 0xdb, 0xec, 0xd8, 0xc4, 0x71, 0x96, 0x89, 0xd2, 0xd6, 0x54, 0x83, 0xf8, 0xfe, 0x1a, 0xe5, 0x76,
+ 0x3e, 0xb2, 0xbf, 0x37, 0x7f, 0xaa, 0x9e, 0x4d, 0x82, 0xf3, 0x78, 0xe5, 0xcf, 0x8b, 0x70, 0x22,
+ 0x79, 0xca, 0xe6, 0x54, 0xb4, 0x52, 0x5f, 0x15, 0xed, 0xd3, 0x91, 0x6d, 0xe3, 0x95, 0xfb, 0x41,
+ 0x34, 0x64, 0x6c, 0x9d, 0x45, 0x98, 0x14, 0x79, 0xc4, 0x9f, 0x14, 0x35, 0x7d, 0x10, 0x0d, 0x1b,
+ 0xf1, 0x69, 0x9c, 0xa4, 0x67, 0x75, 0x6a, 0x58, 0x7e, 0xfa, 0x20, 0xc5, 0x78, 0x9d, 0xba, 0x98,
+ 0x24, 0xc0, 0x69, 0x1e, 0xb4, 0x06, 0xd3, 0xae, 0x91, 0x86, 0xf2, 0xa2, 0xf3, 0x11, 0x01, 0x35,
+ 0xbd, 0x91, 0x26, 0xc1, 0x59, 0x7c, 0x68, 0x07, 0xa0, 0xe5, 0x17, 0x04, 0x4e, 0x65, 0x98, 0xe7,
+ 0xea, 0x5a, 0xdf, 0x7b, 0x2b, 0xa8, 0x2d, 0xc2, 0x8c, 0x18, 0x0c, 0x39, 0x38, 0x22, 0x09, 0xbd,
+ 0x08, 0xe3, 0x36, 0xbf, 0xb4, 0xf8, 0x06, 0x78, 0x85, 0xff, 0x43, 0x82, 0x6d, 0x1c, 0x47, 0x27,
+ 0x71, 0x9c, 0x36, 0xa3, 0x56, 0x2f, 0xdf, 0x77, 0xad, 0xfe, 0x47, 0x29, 0x7a, 0xbc, 0x05, 0x65,
+ 0xfa, 0x85, 0x58, 0x49, 0xf6, 0x44, 0xa2, 0x24, 0x9b, 0x49, 0x73, 0x44, 0x2a, 0xb2, 0xef, 0x64,
+ 0x57, 0xe8, 0x97, 0x0f, 0x55, 0xa1, 0x87, 0xc7, 0xf4, 0xbd, 0x4b, 0xf4, 0x4f, 0x24, 0x98, 0xb9,
+ 0xdc, 0xb8, 0x62, 0x9b, 0xae, 0xe5, 0xab, 0x77, 0xcd, 0xf2, 0xfc, 0xfc, 0x7f, 0x50, 0xb4, 0x5d,
+ 0xcd, 0xb7, 0xeb, 0x3f, 0x7c, 0xbb, 0xb0, 0xab, 0x31, 0xbb, 0xa6, 0x13, 0x5c, 0x9e, 0x51, 0x8c,
+ 0x01, 0xbd, 0x0d, 0xc3, 0xb6, 0x62, 0x74, 0x88, 0x7f, 0x80, 0x3f, 0xd7, 0xa3, 0x35, 0x2b, 0xcb,
+ 0x98, 0xb1, 0x47, 0xca, 0x48, 0x8e, 0x86, 0x05, 0xaa, 0xfc, 0x53, 0x09, 0x26, 0xaf, 0x36, 0x9b,
+ 0xf5, 0x15, 0x83, 0x67, 0x80, 0xba, 0x42, 0xb7, 0x59, 0x8d, 0x61, 0x29, 0x74, 0x3b, 0x59, 0x63,
+ 0xb0, 0x39, 0xcc, 0x67, 0xd0, 0x36, 0x8c, 0xb0, 0xcc, 0x43, 0x8c, 0x76, 0x9f, 0xd7, 0x03, 0x21,
+ 0xae, 0xe6, 0x81, 0x84, 0xb5, 0xab, 0x18, 0xc0, 0x3e, 0xbc, 0xfc, 0x3e, 0x9c, 0x8c, 0xa8, 0xc7,
+ 0xfc, 0xc5, 0xdf, 0x58, 0x51, 0x0b, 0x4a, 0x4c, 0x13, 0xff, 0x05, 0xb5, 0xd7, 0x87, 0xc0, 0x84,
+ 0xc9, 0x61, 0x0d, 0xc6, 0x7e, 0x39, 0xd8, 0xc3, 0x96, 0xd7, 0x60, 0xfc, 0xaa, 0xe9, 0xd0, 0xba,
+ 0x69, 0x53, 0xee, 0x36, 0xf4, 0x18, 0x14, 0x74, 0xd5, 0x10, 0x27, 0xfc, 0x98, 0xe0, 0x29, 0xb0,
+ 0x33, 0x88, 0x8d, 0xf3, 0x69, 0x65, 0x57, 0x64, 0xb2, 0x70, 0x5a, 0xd9, 0xc5, 0x6c, 0x5c, 0xbe,
+ 0x02, 0x23, 0x62, 0x39, 0xa2, 0x40, 0x85, 0x83, 0x81, 0x0a, 0x19, 0x40, 0xbf, 0x1c, 0x82, 0x11,
+ 0xa1, 0xfd, 0x00, 0x2e, 0x82, 0x6f, 0xc6, 0x2e, 0x82, 0x17, 0xfa, 0x5b, 0xe9, 0xdc, 0x5b, 0x60,
+ 0x3b, 0x71, 0x0b, 0x7c, 0xa9, 0x4f, 0xfc, 0x83, 0xaf, 0x80, 0x1f, 0x4b, 0x30, 0x11, 0x8f, 0x39,
+ 0x74, 0x1e, 0xc6, 0xd8, 0x79, 0xa4, 0xb6, 0xc8, 0x7a, 0x58, 0x50, 0x07, 0x0f, 0x3a, 0x8d, 0x70,
+ 0x0a, 0x47, 0xe9, 0x50, 0x27, 0x60, 0x63, 0x61, 0x21, 0x9c, 0x92, 0xef, 0x72, 0x97, 0xaa, 0x5a,
+ 0xd5, 0x6b, 0x3d, 0x55, 0x57, 0x0c, 0x7a, 0xcd, 0x6e, 0x50, 0x5b, 0x35, 0x3a, 0x29, 0x41, 0x3c,
+ 0xc6, 0xa2, 0xc8, 0xf2, 0x6d, 0x09, 0xc6, 0x84, 0xca, 0x03, 0xb8, 0xce, 0xbc, 0x11, 0xbf, 0xce,
+ 0x3c, 0xd7, 0xe7, 0x7e, 0xce, 0xbe, 0xcb, 0x7c, 0x1a, 0x9a, 0xc2, 0x76, 0x30, 0x4b, 0x30, 0xdb,
+ 0xa6, 0x43, 0x93, 0x09, 0x86, 0xed, 0x35, 0xcc, 0x67, 0xd0, 0xf7, 0x24, 0x38, 0xa1, 0x26, 0xf6,
+ 0xbc, 0xf0, 0xf5, 0x2b, 0xfd, 0xa9, 0x16, 0xc0, 0xd4, 0x2a, 0x42, 0xde, 0x89, 0xe4, 0x0c, 0x4e,
+ 0x89, 0x94, 0x5d, 0x48, 0x51, 0x21, 0x05, 0x8a, 0xdb, 0x94, 0x5a, 0x62, 0x11, 0x96, 0xfa, 0xcf,
+ 0x3c, 0xa1, 0x4a, 0x65, 0x6e, 0x7e, 0xb3, 0x59, 0xc7, 0x1c, 0x5a, 0xfe, 0xc5, 0x50, 0xe0, 0xb0,
+ 0x86, 0xb7, 0x49, 0x82, 0x7c, 0x2b, 0x1d, 0x45, 0xbe, 0x1d, 0xcb, 0xca, 0xb5, 0xe8, 0x1b, 0x50,
+ 0xa0, 0x5a, 0xbf, 0x17, 0x5a, 0x21, 0xa1, 0xb9, 0xda, 0x08, 0x13, 0x56, 0x73, 0xb5, 0x81, 0x19,
+ 0x24, 0x7a, 0x07, 0x4a, 0xec, 0x34, 0x63, 0x7b, 0xbc, 0xd0, 0x7f, 0x0e, 0x61, 0xfe, 0x0a, 0x23,
+ 0x8c, 0xfd, 0x72, 0xb0, 0x87, 0x2b, 0xbf, 0x0f, 0xe3, 0xb1, 0x44, 0x80, 0x6e, 0xc2, 0x71, 0xcd,
+ 0x54, 0xda, 0x35, 0x45, 0x53, 0x8c, 0x16, 0xb1, 0x93, 0xa9, 0x31, 0xfb, 0x2e, 0xb4, 0x1a, 0xe1,
+ 0x10, 0x09, 0x25, 0x68, 0x83, 0x46, 0xe7, 0x70, 0x0c, 0x5b, 0x56, 0x00, 0x42, 0xeb, 0xd1, 0x3c,
+ 0x94, 0x58, 0x08, 0x7b, 0x27, 0xd3, 0x68, 0x6d, 0x94, 0xe9, 0xca, 0x22, 0xdb, 0xc1, 0xde, 0x38,
+ 0x3a, 0x07, 0xe0, 0x90, 0x96, 0x4d, 0x28, 0xcf, 0x3b, 0xde, 0xeb, 0x51, 0x90, 0x81, 0x1b, 0xc1,
+ 0x0c, 0x8e, 0x50, 0xc9, 0x7f, 0x96, 0x60, 0x7c, 0x9d, 0xd0, 0xf7, 0x4c, 0xfb, 0x56, 0x9d, 0xb7,
+ 0x99, 0x07, 0x90, 0xf7, 0x37, 0x63, 0x79, 0xff, 0xd5, 0x1e, 0xd7, 0x2c, 0xa6, 0x6d, 0x5e, 0xf6,
+ 0x97, 0xff, 0x2e, 0x41, 0x25, 0x46, 0x19, 0x4d, 0x13, 0x04, 0x4a, 0x96, 0x69, 0x53, 0xff, 0x8c,
+ 0x3f, 0x94, 0x06, 0x2c, 0xa5, 0x46, 0x4e, 0x79, 0x06, 0x8b, 0x3d, 0x74, 0x66, 0xe7, 0x96, 0x6d,
+ 0xea, 0x22, 0xee, 0x0f, 0x27, 0x85, 0x10, 0x3b, 0xb4, 0xf3, 0xb2, 0x6d, 0xea, 0x98, 0x63, 0xcb,
+ 0x7f, 0x92, 0x60, 0x2a, 0x46, 0x39, 0x80, 0x94, 0xae, 0xc4, 0x53, 0xfa, 0x4b, 0x87, 0x31, 0x2c,
+ 0x27, 0xb1, 0x7f, 0x9d, 0x34, 0x8b, 0x39, 0x00, 0x6d, 0xc1, 0x98, 0x65, 0xb6, 0x1b, 0x47, 0xd0,
+ 0x5f, 0x9c, 0x64, 0x27, 0x64, 0x3d, 0xc4, 0xc2, 0x51, 0x60, 0xb4, 0x0b, 0x53, 0x86, 0xa2, 0x13,
+ 0xc7, 0x52, 0x5a, 0xa4, 0x71, 0x04, 0x6f, 0x2a, 0x0f, 0xf1, 0x2e, 0x45, 0x12, 0x11, 0xa7, 0x85,
+ 0xc8, 0xbf, 0x4e, 0xd9, 0x6d, 0xda, 0x14, 0xbd, 0x06, 0x65, 0xfe, 0xa9, 0x47, 0xcb, 0xd4, 0xc4,
+ 0xd1, 0x76, 0x9e, 0x2d, 0x4d, 0x5d, 0x8c, 0xdd, 0xdd, 0x9b, 0xff, 0xcf, 0x03, 0x9f, 0x84, 0x7d,
+ 0x42, 0x1c, 0xc0, 0xa0, 0x75, 0x28, 0x5a, 0x87, 0x29, 0x33, 0xf8, 0xc1, 0xc2, 0x6b, 0x0b, 0x8e,
+ 0x23, 0xff, 0x23, 0xa9, 0x38, 0x3f, 0x5e, 0x6e, 0x1e, 0xd9, 0x82, 0x05, 0x65, 0x4d, 0xee, 0xa2,
+ 0xd9, 0x30, 0x22, 0x4e, 0x59, 0x11, 0x97, 0x57, 0x0e, 0x13, 0x97, 0xd1, 0x93, 0x21, 0xb8, 0x44,
+ 0xf8, 0x83, 0xbe, 0x20, 0xf9, 0xaf, 0x12, 0x4c, 0x71, 0x85, 0x5a, 0xae, 0xad, 0xd2, 0xee, 0xc0,
+ 0x32, 0xe8, 0x56, 0x2c, 0x83, 0x2e, 0xf7, 0x68, 0x68, 0x4a, 0xe3, 0xdc, 0x2c, 0xfa, 0x85, 0x04,
+ 0x0f, 0xa5, 0xa8, 0x07, 0x90, 0x61, 0x48, 0x3c, 0xc3, 0xbc, 0x7a, 0x58, 0x03, 0x73, 0xb2, 0xcc,
+ 0x6d, 0xc8, 0x30, 0x8f, 0x07, 0xee, 0x39, 0x00, 0xcb, 0x56, 0x77, 0x54, 0x8d, 0x74, 0x44, 0x13,
+ 0xba, 0x1c, 0x2e, 0x49, 0x3d, 0x98, 0xc1, 0x11, 0x2a, 0xf4, 0x2d, 0x98, 0x69, 0x93, 0x2d, 0xc5,
+ 0xd5, 0xe8, 0x62, 0xbb, 0xbd, 0xa4, 0x58, 0xca, 0xa6, 0xaa, 0xa9, 0x54, 0x15, 0x37, 0xec, 0xd1,
+ 0xda, 0x25, 0xaf, 0x39, 0x9c, 0x45, 0x71, 0x77, 0x6f, 0xfe, 0xc9, 0x83, 0x9b, 0x3a, 0x3e, 0x71,
+ 0x17, 0xe7, 0x08, 0x41, 0xdf, 0x95, 0xa0, 0x62, 0x93, 0x77, 0x5d, 0xd5, 0x26, 0xed, 0x65, 0xdb,
+ 0xb4, 0x62, 0x1a, 0x14, 0xb8, 0x06, 0x57, 0xf6, 0xf7, 0xe6, 0x2b, 0x38, 0x87, 0xa6, 0x17, 0x1d,
+ 0x72, 0x05, 0x21, 0x0a, 0xd3, 0x8a, 0xa6, 0x99, 0xef, 0x91, 0xb8, 0x07, 0x8a, 0x5c, 0x7e, 0x6d,
+ 0x7f, 0x6f, 0x7e, 0x7a, 0x31, 0x3d, 0xdd, 0x8b, 0xe8, 0x2c, 0x78, 0xb4, 0x00, 0x23, 0x3b, 0xa6,
+ 0xe6, 0xea, 0xc4, 0xa9, 0x94, 0xb8, 0x24, 0x96, 0x71, 0x47, 0xae, 0x7b, 0x43, 0x77, 0xf7, 0xe6,
+ 0x87, 0x2f, 0x37, 0xf8, 0xd3, 0x87, 0x4f, 0xc5, 0xee, 0x68, 0xac, 0x66, 0x12, 0x5b, 0x9e, 0xbf,
+ 0xd9, 0x96, 0xc3, 0x1c, 0x73, 0x35, 0x9c, 0xc2, 0x51, 0x3a, 0xa4, 0xc3, 0xe8, 0xb6, 0xb8, 0xb7,
+ 0x3b, 0x95, 0x91, 0xbe, 0x4e, 0xbf, 0xd8, 0xbd, 0xbf, 0x36, 0x25, 0x44, 0x8e, 0xfa, 0xc3, 0x0e,
+ 0x0e, 0x25, 0xa0, 0xa7, 0x60, 0x84, 0xff, 0x58, 0x59, 0xe6, 0x0f, 0x60, 0xe5, 0x30, 0x13, 0x5d,
+ 0xf5, 0x86, 0xb1, 0x3f, 0xef, 0x93, 0xae, 0xd4, 0x97, 0xf8, 0xc3, 0x6c, 0x82, 0x74, 0xa5, 0xbe,
+ 0x84, 0xfd, 0x79, 0x64, 0xc1, 0x88, 0x43, 0x56, 0x55, 0xc3, 0xdd, 0xad, 0x40, 0x5f, 0xad, 0xe6,
+ 0xc6, 0x25, 0xce, 0x9d, 0x78, 0x8a, 0x0a, 0x25, 0x8a, 0x79, 0xec, 0x8b, 0x41, 0xbb, 0x30, 0x6a,
+ 0xbb, 0xc6, 0xa2, 0xb3, 0xe1, 0x10, 0xbb, 0x32, 0xc6, 0x65, 0xf6, 0x9a, 0x9c, 0xb1, 0xcf, 0x9f,
+ 0x94, 0x1a, 0x78, 0x30, 0xa0, 0xc0, 0xa1, 0x30, 0xf4, 0x13, 0x09, 0x90, 0xe3, 0x5a, 0x96, 0x46,
+ 0x74, 0x62, 0x50, 0x45, 0xe3, 0xaf, 0x61, 0x4e, 0xe5, 0x38, 0xd7, 0xa1, 0xde, 0xab, 0xdd, 0x29,
+ 0xa0, 0xa4, 0x32, 0xc1, 0x33, 0x75, 0x9a, 0x14, 0x67, 0xe8, 0xc1, 0x96, 0x62, 0xcb, 0xe1, 0x7f,
+ 0x57, 0xc6, 0xfb, 0x5a, 0x8a, 0xec, 0x57, 0xc1, 0x70, 0x29, 0xc4, 0x3c, 0xf6, 0xc5, 0xa0, 0xeb,
+ 0x30, 0x63, 0x13, 0xa5, 0x7d, 0xcd, 0xd0, 0xba, 0xd8, 0x34, 0xe9, 0x65, 0x55, 0x23, 0x4e, 0xd7,
+ 0xa1, 0x44, 0xaf, 0x4c, 0xf0, 0xb0, 0x09, 0x3e, 0xf5, 0xc0, 0x99, 0x54, 0x38, 0x87, 0x9b, 0x7f,
+ 0x45, 0x20, 0xde, 0x6f, 0x07, 0xf3, 0x45, 0xe0, 0xe1, 0xbe, 0x22, 0x08, 0x55, 0x7d, 0x60, 0x5f,
+ 0x11, 0x44, 0x44, 0x1c, 0xfc, 0x84, 0xf4, 0xf5, 0x10, 0x4c, 0x87, 0xc4, 0xf7, 0xfd, 0x15, 0x41,
+ 0x06, 0xcb, 0x00, 0xbe, 0x22, 0xc8, 0x6e, 0xc3, 0x17, 0x1e, 0x74, 0x1b, 0xfe, 0x01, 0x7c, 0xbd,
+ 0xc0, 0x3b, 0xfb, 0xa1, 0x13, 0xff, 0xf5, 0x3b, 0xfb, 0xa1, 0xae, 0x39, 0xe5, 0xcc, 0x6f, 0x87,
+ 0xa2, 0x06, 0xfd, 0x1b, 0xb5, 0x8f, 0x0f, 0xff, 0xbd, 0xa4, 0xfc, 0x45, 0x01, 0x4e, 0x24, 0x77,
+ 0x6c, 0xac, 0x8b, 0x28, 0xdd, 0xb3, 0x8b, 0x58, 0x87, 0x93, 0x5b, 0xae, 0xa6, 0x75, 0xb9, 0x43,
+ 0x22, 0xad, 0x44, 0xef, 0xd5, 0xfe, 0x51, 0xc1, 0x79, 0xf2, 0x72, 0x06, 0x0d, 0xce, 0xe4, 0xcc,
+ 0xe9, 0x88, 0x16, 0xfa, 0xea, 0x88, 0xa6, 0x1a, 0x72, 0xc5, 0x1e, 0x1a, 0x72, 0x99, 0xdd, 0xcd,
+ 0x52, 0x1f, 0xdd, 0xcd, 0xa3, 0x68, 0x47, 0x66, 0x24, 0xbe, 0x7b, 0xb5, 0x23, 0xe5, 0x47, 0x61,
+ 0x56, 0xb0, 0x51, 0xde, 0x29, 0x34, 0xa8, 0x6d, 0x6a, 0x1a, 0xb1, 0x97, 0x5d, 0x5d, 0xef, 0xca,
+ 0x17, 0x61, 0x22, 0xde, 0x13, 0xf7, 0x56, 0xde, 0x6b, 0xd3, 0x8b, 0x5e, 0x4a, 0x64, 0xe5, 0xbd,
+ 0x71, 0x1c, 0x50, 0xc8, 0x1f, 0x4a, 0x30, 0x93, 0xfd, 0xfd, 0x1d, 0xd2, 0x60, 0x42, 0x57, 0x76,
+ 0xa3, 0x1f, 0x2f, 0x4a, 0x7d, 0xde, 0xb8, 0x79, 0xf3, 0x73, 0x2d, 0x86, 0x85, 0x13, 0xd8, 0xf2,
+ 0x97, 0x12, 0x9c, 0xca, 0x69, 0x33, 0x0e, 0x56, 0x13, 0x74, 0x03, 0xca, 0xba, 0xb2, 0xdb, 0x70,
+ 0xed, 0x0e, 0xe9, 0xfb, 0x8d, 0x81, 0xe7, 0x92, 0x35, 0x81, 0x82, 0x03, 0x3c, 0xf9, 0x13, 0x09,
+ 0x2a, 0x79, 0xf5, 0x20, 0x3a, 0x1f, 0x6b, 0x88, 0x3e, 0x9e, 0x68, 0x88, 0x4e, 0xa5, 0xf8, 0x06,
+ 0xd4, 0x0e, 0xfd, 0x54, 0x82, 0x99, 0xec, 0xba, 0x19, 0x3d, 0x1b, 0xd3, 0x78, 0x3e, 0xa1, 0xf1,
+ 0x64, 0x82, 0x4b, 0xe8, 0xbb, 0x0d, 0x13, 0xa2, 0xba, 0x16, 0x30, 0xc2, 0xcb, 0x4f, 0x1f, 0x9c,
+ 0x55, 0x05, 0x98, 0x5f, 0x27, 0xf2, 0x95, 0x8c, 0x8f, 0xe1, 0x04, 0xae, 0xfc, 0xf3, 0x21, 0x28,
+ 0x35, 0x5a, 0x8a, 0x46, 0x06, 0x50, 0xd4, 0xdd, 0x88, 0x15, 0x75, 0xbd, 0xfe, 0xb7, 0x02, 0xd7,
+ 0x32, 0xb7, 0x9e, 0xdb, 0x4c, 0xd4, 0x73, 0x17, 0xfa, 0x42, 0x3f, 0xb8, 0x94, 0x7b, 0x01, 0x46,
+ 0x03, 0x25, 0x7a, 0x3b, 0x3d, 0xe4, 0x8f, 0x87, 0x60, 0x2c, 0x22, 0xa2, 0xc7, 0xb3, 0x67, 0x27,
+ 0x76, 0x7a, 0xf7, 0xf3, 0x8f, 0x51, 0x11, 0xd9, 0x55, 0xff, 0xfc, 0xf6, 0xbe, 0xbf, 0x0b, 0xbf,
+ 0xa3, 0x4a, 0x1f, 0xeb, 0x17, 0x61, 0x82, 0xf2, 0xff, 0x13, 0x0a, 0xde, 0xf8, 0x0a, 0x3c, 0x8a,
+ 0x83, 0xaf, 0x3a, 0x9b, 0xb1, 0x59, 0x9c, 0xa0, 0x9e, 0x7d, 0x11, 0xc6, 0x63, 0xc2, 0x7a, 0xfa,
+ 0x5c, 0xee, 0x77, 0x12, 0x3c, 0x7e, 0xcf, 0x3b, 0x19, 0xaa, 0xc5, 0xb6, 0x57, 0x35, 0xb1, 0xbd,
+ 0xe6, 0xf2, 0x01, 0x06, 0xf8, 0xb1, 0xc4, 0x8f, 0x86, 0x00, 0x35, 0xb7, 0x55, 0xbb, 0x5d, 0x57,
+ 0x6c, 0xda, 0xc5, 0xe2, 0xbf, 0xc1, 0x06, 0xb0, 0xe1, 0xce, 0xc3, 0x58, 0x9b, 0x38, 0x2d, 0x5b,
+ 0xe5, 0xce, 0x12, 0x77, 0x85, 0xe0, 0x1d, 0x64, 0x39, 0x9c, 0xc2, 0x51, 0x3a, 0xd4, 0x81, 0xf2,
+ 0x8e, 0xf7, 0xff, 0x86, 0x7e, 0xe7, 0xad, 0xd7, 0x62, 0x36, 0xfc, 0x8f, 0xc5, 0x30, 0xbe, 0xc4,
+ 0x80, 0x83, 0x03, 0x70, 0xf9, 0x23, 0x09, 0x66, 0xd2, 0x8e, 0x59, 0x66, 0xaa, 0x3f, 0x78, 0xe7,
+ 0x3c, 0x0a, 0x45, 0x8e, 0xce, 0xbc, 0x72, 0xdc, 0x7b, 0xf1, 0x66, 0x92, 0x31, 0x1f, 0x95, 0xbf,
+ 0x92, 0x60, 0x36, 0x5b, 0xb5, 0x01, 0x5c, 0x25, 0x6e, 0xc6, 0xaf, 0x12, 0xbd, 0x3e, 0x1b, 0x64,
+ 0xeb, 0x9d, 0x73, 0xad, 0xd8, 0xcb, 0x5c, 0x83, 0x01, 0x18, 0xb9, 0x15, 0x37, 0x72, 0xf1, 0xd0,
+ 0x46, 0x66, 0x1b, 0x58, 0x3b, 0x7b, 0xfb, 0xce, 0xdc, 0xb1, 0xcf, 0xee, 0xcc, 0x1d, 0xfb, 0xfc,
+ 0xce, 0xdc, 0xb1, 0x0f, 0xf6, 0xe7, 0xa4, 0xdb, 0xfb, 0x73, 0xd2, 0x67, 0xfb, 0x73, 0xd2, 0xe7,
+ 0xfb, 0x73, 0xd2, 0xdf, 0xf6, 0xe7, 0xa4, 0x1f, 0x7c, 0x39, 0x77, 0xec, 0xc6, 0x88, 0xc0, 0xfd,
+ 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x10, 0x0e, 0x63, 0x80, 0x3d, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/generated.proto
new file mode 100644
index 000000000..3777741c5
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/generated.proto
@@ -0,0 +1,1022 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.client_go.pkg.apis.extensions.v1beta1;
+
+import "k8s.io/apimachinery/pkg/api/resource/generated.proto";
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+import "k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1beta1";
+
+// An APIVersion represents a single concrete version of an object model.
+message APIVersion {
+ // Name of this version (e.g. 'v1').
+ // +optional
+ optional string name = 1;
+}
+
+message CustomMetricCurrentStatus {
+ // Custom Metric name.
+ optional string name = 1;
+
+ // Custom Metric value (average).
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity value = 2;
+}
+
+message CustomMetricCurrentStatusList {
+ repeated CustomMetricCurrentStatus items = 1;
+}
+
+// Alpha-level support for Custom Metrics in HPA (as annotations).
+message CustomMetricTarget {
+ // Custom Metric name.
+ optional string name = 1;
+
+ // Custom Metric value (average).
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity value = 2;
+}
+
+message CustomMetricTargetList {
+ repeated CustomMetricTarget items = 1;
+}
+
+// DaemonSet represents the configuration of a daemon set.
+message DaemonSet {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // The desired behavior of this daemon set.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional DaemonSetSpec spec = 2;
+
+ // The current status of this daemon set. This data may be
+ // out of date by some window of time.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional DaemonSetStatus status = 3;
+}
+
+// DaemonSetList is a collection of daemon sets.
+message DaemonSetList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // A list of daemon sets.
+ repeated DaemonSet items = 2;
+}
+
+// DaemonSetSpec is the specification of a daemon set.
+message DaemonSetSpec {
+ // A label query over pods that are managed by the daemon set.
+ // Must match in order to be controlled.
+ // If empty, defaulted to labels on Pod template.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 1;
+
+ // An object that describes the pod that will be created.
+ // The DaemonSet will create exactly one copy of this pod on every node
+ // that matches the template's node selector (or on every node if no node
+ // selector is specified).
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
+ optional k8s.io.client_go.pkg.api.v1.PodTemplateSpec template = 2;
+
+ // An update strategy to replace existing DaemonSet pods with new pods.
+ // +optional
+ optional DaemonSetUpdateStrategy updateStrategy = 3;
+
+ // The minimum number of seconds for which a newly created DaemonSet pod should
+ // be ready without any of its container crashing, for it to be considered
+ // available. Defaults to 0 (pod will be considered available as soon as it
+ // is ready).
+ // +optional
+ optional int32 minReadySeconds = 4;
+
+ // DEPRECATED.
+ // A sequence number representing a specific generation of the template.
+ // Populated by the system. It can be set only during the creation.
+ // +optional
+ optional int64 templateGeneration = 5;
+
+ // The number of old history to retain to allow rollback.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ // Defaults to 10.
+ // +optional
+ optional int32 revisionHistoryLimit = 6;
+}
+
+// DaemonSetStatus represents the current status of a daemon set.
+message DaemonSetStatus {
+ // The number of nodes that are running at least 1
+ // daemon pod and are supposed to run the daemon pod.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
+ optional int32 currentNumberScheduled = 1;
+
+ // The number of nodes that are running the daemon pod, but are
+ // not supposed to run the daemon pod.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
+ optional int32 numberMisscheduled = 2;
+
+ // The total number of nodes that should be running the daemon
+ // pod (including nodes correctly running the daemon pod).
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
+ optional int32 desiredNumberScheduled = 3;
+
+ // The number of nodes that should be running the daemon pod and have one
+ // or more of the daemon pod running and ready.
+ optional int32 numberReady = 4;
+
+ // The most recent generation observed by the daemon set controller.
+ // +optional
+ optional int64 observedGeneration = 5;
+
+ // The total number of nodes that are running updated daemon pod
+ // +optional
+ optional int32 updatedNumberScheduled = 6;
+
+ // The number of nodes that should be running the
+ // daemon pod and have one or more of the daemon pod running and
+ // available (ready for at least spec.minReadySeconds)
+ // +optional
+ optional int32 numberAvailable = 7;
+
+ // The number of nodes that should be running the
+ // daemon pod and have none of the daemon pod running and available
+ // (ready for at least spec.minReadySeconds)
+ // +optional
+ optional int32 numberUnavailable = 8;
+
+ // Count of hash collisions for the DaemonSet. The DaemonSet controller
+ // uses this field as a collision avoidance mechanism when it needs to
+ // create the name for the newest ControllerRevision.
+ // +optional
+ optional int64 collisionCount = 9;
+}
+
+message DaemonSetUpdateStrategy {
+ // Type of daemon set update. Can be "RollingUpdate" or "OnDelete".
+ // Default is OnDelete.
+ // +optional
+ optional string type = 1;
+
+ // Rolling update config params. Present only if type = "RollingUpdate".
+ // ---
+ // TODO: Update this to follow our convention for oneOf, whatever we decide it
+ // to be. Same as Deployment `strategy.rollingUpdate`.
+ // See https://github.com/kubernetes/kubernetes/issues/35345
+ // +optional
+ optional RollingUpdateDaemonSet rollingUpdate = 2;
+}
+
+// Deployment enables declarative updates for Pods and ReplicaSets.
+message Deployment {
+ // Standard object metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Specification of the desired behavior of the Deployment.
+ // +optional
+ optional DeploymentSpec spec = 2;
+
+ // Most recently observed status of the Deployment.
+ // +optional
+ optional DeploymentStatus status = 3;
+}
+
+// DeploymentCondition describes the state of a deployment at a certain point.
+message DeploymentCondition {
+ // Type of deployment condition.
+ optional string type = 1;
+
+ // Status of the condition, one of True, False, Unknown.
+ optional string status = 2;
+
+ // The last time this condition was updated.
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 6;
+
+ // Last time the condition transitioned from one status to another.
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 7;
+
+ // The reason for the condition's last transition.
+ optional string reason = 4;
+
+ // A human readable message indicating details about the transition.
+ optional string message = 5;
+}
+
+// DeploymentList is a list of Deployments.
+message DeploymentList {
+ // Standard list metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is the list of Deployments.
+ repeated Deployment items = 2;
+}
+
+// DeploymentRollback stores the information required to rollback a deployment.
+message DeploymentRollback {
+ // Required: This must match the Name of a deployment.
+ optional string name = 1;
+
+ // The annotations to be updated to a deployment
+ // +optional
+ map<string, string> updatedAnnotations = 2;
+
+ // The config of this deployment rollback.
+ optional RollbackConfig rollbackTo = 3;
+}
+
+// DeploymentSpec is the specification of the desired behavior of the Deployment.
+message DeploymentSpec {
+ // Number of desired pods. This is a pointer to distinguish between explicit
+ // zero and not specified. Defaults to 1.
+ // +optional
+ optional int32 replicas = 1;
+
+ // Label selector for pods. Existing ReplicaSets whose pods are
+ // selected by this will be the ones affected by this deployment.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
+
+ // Template describes the pods that will be created.
+ optional k8s.io.client_go.pkg.api.v1.PodTemplateSpec template = 3;
+
+ // The deployment strategy to use to replace existing pods with new ones.
+ // +optional
+ optional DeploymentStrategy strategy = 4;
+
+ // Minimum number of seconds for which a newly created pod should be ready
+ // without any of its container crashing, for it to be considered available.
+ // Defaults to 0 (pod will be considered available as soon as it is ready)
+ // +optional
+ optional int32 minReadySeconds = 5;
+
+ // The number of old ReplicaSets to retain to allow rollback.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ // +optional
+ optional int32 revisionHistoryLimit = 6;
+
+ // Indicates that the deployment is paused and will not be processed by the
+ // deployment controller.
+ // +optional
+ optional bool paused = 7;
+
+ // The config this deployment is rolling back to. Will be cleared after rollback is done.
+ // +optional
+ optional RollbackConfig rollbackTo = 8;
+
+ // The maximum time in seconds for a deployment to make progress before it
+ // is considered to be failed. The deployment controller will continue to
+ // process failed deployments and a condition with a ProgressDeadlineExceeded
+ // reason will be surfaced in the deployment status. Once autoRollback is
+ // implemented, the deployment controller will automatically rollback failed
+ // deployments. Note that progress will not be estimated during the time a
+ // deployment is paused. This is not set by default.
+ optional int32 progressDeadlineSeconds = 9;
+}
+
+// DeploymentStatus is the most recently observed status of the Deployment.
+message DeploymentStatus {
+ // The generation observed by the deployment controller.
+ // +optional
+ optional int64 observedGeneration = 1;
+
+ // Total number of non-terminated pods targeted by this deployment (their labels match the selector).
+ // +optional
+ optional int32 replicas = 2;
+
+ // Total number of non-terminated pods targeted by this deployment that have the desired template spec.
+ // +optional
+ optional int32 updatedReplicas = 3;
+
+ // Total number of ready pods targeted by this deployment.
+ // +optional
+ optional int32 readyReplicas = 7;
+
+ // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
+ // +optional
+ optional int32 availableReplicas = 4;
+
+ // Total number of unavailable pods targeted by this deployment.
+ // +optional
+ optional int32 unavailableReplicas = 5;
+
+ // Represents the latest available observations of a deployment's current state.
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ repeated DeploymentCondition conditions = 6;
+
+ // Count of hash collisions for the Deployment. The Deployment controller uses this
+ // field as a collision avoidance mechanism when it needs to create the name for the
+ // newest ReplicaSet.
+ // +optional
+ optional int64 collisionCount = 8;
+}
+
+// DeploymentStrategy describes how to replace existing pods with new ones.
+message DeploymentStrategy {
+ // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
+ // +optional
+ optional string type = 1;
+
+ // Rolling update config params. Present only if DeploymentStrategyType =
+ // RollingUpdate.
+ // ---
+ // TODO: Update this to follow our convention for oneOf, whatever we decide it
+ // to be.
+ // +optional
+ optional RollingUpdateDeployment rollingUpdate = 2;
+}
+
+// FSGroupStrategyOptions defines the strategy type and options used to create the strategy.
+message FSGroupStrategyOptions {
+ // Rule is the strategy that will dictate what FSGroup is used in the SecurityContext.
+ // +optional
+ optional string rule = 1;
+
+ // Ranges are the allowed ranges of fs groups. If you would like to force a single
+ // fs group then supply a single range with the same start and end.
+ // +optional
+ repeated IDRange ranges = 2;
+}
+
+// HTTPIngressPath associates a path regex with a backend. Incoming urls matching
+// the path are forwarded to the backend.
+message HTTPIngressPath {
+ // Path is an extended POSIX regex as defined by IEEE Std 1003.1,
+ // (i.e this follows the egrep/unix syntax, not the perl syntax)
+ // matched against the path of an incoming request. Currently it can
+ // contain characters disallowed from the conventional "path"
+ // part of a URL as defined by RFC 3986. Paths must begin with
+ // a '/'. If unspecified, the path defaults to a catch all sending
+ // traffic to the backend.
+ // +optional
+ optional string path = 1;
+
+ // Backend defines the referenced service endpoint to which the traffic
+ // will be forwarded to.
+ optional IngressBackend backend = 2;
+}
+
+// HTTPIngressRuleValue is a list of http selectors pointing to backends.
+// In the example: http://<host>/<path>?<searchpart> -> backend where
+// where parts of the url correspond to RFC 3986, this resource will be used
+// to match against everything after the last '/' and before the first '?'
+// or '#'.
+message HTTPIngressRuleValue {
+ // A collection of paths that map requests to backends.
+ repeated HTTPIngressPath paths = 1;
+}
+
+// Host Port Range defines a range of host ports that will be enabled by a policy
+// for pods to use. It requires both the start and end to be defined.
+message HostPortRange {
+ // min is the start of the range, inclusive.
+ optional int32 min = 1;
+
+ // max is the end of the range, inclusive.
+ optional int32 max = 2;
+}
+
+// ID Range provides a min/max of an allowed range of IDs.
+message IDRange {
+ // Min is the start of the range, inclusive.
+ optional int64 min = 1;
+
+ // Max is the end of the range, inclusive.
+ optional int64 max = 2;
+}
+
+// Ingress is a collection of rules that allow inbound connections to reach the
+// endpoints defined by a backend. An Ingress can be configured to give services
+// externally-reachable urls, load balance traffic, terminate SSL, offer name
+// based virtual hosting etc.
+message Ingress {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec is the desired state of the Ingress.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional IngressSpec spec = 2;
+
+ // Status is the current state of the Ingress.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional IngressStatus status = 3;
+}
+
+// IngressBackend describes all endpoints for a given service and port.
+message IngressBackend {
+ // Specifies the name of the referenced service.
+ optional string serviceName = 1;
+
+ // Specifies the port of the referenced service.
+ optional k8s.io.apimachinery.pkg.util.intstr.IntOrString servicePort = 2;
+}
+
+// IngressList is a collection of Ingress.
+message IngressList {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is the list of Ingress.
+ repeated Ingress items = 2;
+}
+
+// IngressRule represents the rules mapping the paths under a specified host to
+// the related backend services. Incoming requests are first evaluated for a host
+// match, then routed to the backend associated with the matching IngressRuleValue.
+message IngressRule {
+ // Host is the fully qualified domain name of a network host, as defined
+ // by RFC 3986. Note the following deviations from the "host" part of the
+ // URI as defined in the RFC:
+ // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the
+ // IP in the Spec of the parent Ingress.
+ // 2. The `:` delimiter is not respected because ports are not allowed.
+ // Currently the port of an Ingress is implicitly :80 for http and
+ // :443 for https.
+ // Both these may change in the future.
+ // Incoming requests are matched against the host before the IngressRuleValue.
+ // If the host is unspecified, the Ingress routes all traffic based on the
+ // specified IngressRuleValue.
+ // +optional
+ optional string host = 1;
+
+ // IngressRuleValue represents a rule to route requests for this IngressRule.
+ // If unspecified, the rule defaults to a http catch-all. Whether that sends
+ // just traffic matching the host to the default backend or all traffic to the
+ // default backend, is left to the controller fulfilling the Ingress. Http is
+ // currently the only supported IngressRuleValue.
+ // +optional
+ optional IngressRuleValue ingressRuleValue = 2;
+}
+
+// IngressRuleValue represents a rule to apply against incoming requests. If the
+// rule is satisfied, the request is routed to the specified backend. Currently
+// mixing different types of rules in a single Ingress is disallowed, so exactly
+// one of the following must be set.
+message IngressRuleValue {
+ // +optional
+ optional HTTPIngressRuleValue http = 1;
+}
+
+// IngressSpec describes the Ingress the user wishes to exist.
+message IngressSpec {
+ // A default backend capable of servicing requests that don't match any
+ // rule. At least one of 'backend' or 'rules' must be specified. This field
+ // is optional to allow the loadbalancer controller or defaulting logic to
+ // specify a global default.
+ // +optional
+ optional IngressBackend backend = 1;
+
+ // TLS configuration. Currently the Ingress only supports a single TLS
+ // port, 443. If multiple members of this list specify different hosts, they
+ // will be multiplexed on the same port according to the hostname specified
+ // through the SNI TLS extension, if the ingress controller fulfilling the
+ // ingress supports SNI.
+ // +optional
+ repeated IngressTLS tls = 2;
+
+ // A list of host rules used to configure the Ingress. If unspecified, or
+ // no rule matches, all traffic is sent to the default backend.
+ // +optional
+ repeated IngressRule rules = 3;
+}
+
+// IngressStatus describe the current state of the Ingress.
+message IngressStatus {
+ // LoadBalancer contains the current status of the load-balancer.
+ // +optional
+ optional k8s.io.client_go.pkg.api.v1.LoadBalancerStatus loadBalancer = 1;
+}
+
+// IngressTLS describes the transport layer security associated with an Ingress.
+message IngressTLS {
+ // Hosts are a list of hosts included in the TLS certificate. The values in
+ // this list must match the name/s used in the tlsSecret. Defaults to the
+ // wildcard host setting for the loadbalancer controller fulfilling this
+ // Ingress, if left unspecified.
+ // +optional
+ repeated string hosts = 1;
+
+ // SecretName is the name of the secret used to terminate SSL traffic on 443.
+ // Field is left optional to allow SSL routing based on SNI hostname alone.
+ // If the SNI host in a listener conflicts with the "Host" header field used
+ // by an IngressRule, the SNI host is used for termination and value of the
+ // Host header is used for routing.
+ // +optional
+ optional string secretName = 2;
+}
+
+// NetworkPolicy describes what network traffic is allowed for a set of Pods
+message NetworkPolicy {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Specification of the desired behavior for this NetworkPolicy.
+ // +optional
+ optional NetworkPolicySpec spec = 2;
+}
+
+// This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.
+message NetworkPolicyIngressRule {
+ // List of ports which should be made accessible on the pods selected for this rule.
+ // Each item in this list is combined using a logical OR.
+ // If this field is empty or missing, this rule matches all ports (traffic not restricted by port).
+ // If this field is present and contains at least one item, then this rule allows traffic
+ // only if the traffic matches at least one port in the list.
+ // +optional
+ repeated NetworkPolicyPort ports = 1;
+
+ // List of sources which should be able to access the pods selected for this rule.
+ // Items in this list are combined using a logical OR operation.
+ // If this field is empty or missing, this rule matches all sources (traffic not restricted by source).
+ // If this field is present and contains at least on item, this rule allows traffic only if the
+ // traffic matches at least one item in the from list.
+ // +optional
+ repeated NetworkPolicyPeer from = 2;
+}
+
+// Network Policy List is a list of NetworkPolicy objects.
+message NetworkPolicyList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of schema objects.
+ repeated NetworkPolicy items = 2;
+}
+
+message NetworkPolicyPeer {
+ // This is a label selector which selects Pods in this namespace.
+ // This field follows standard label selector semantics.
+ // If present but empty, this selector selects all pods in this namespace.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
+
+ // Selects Namespaces using cluster scoped-labels. This
+ // matches all pods in all namespaces selected by this label selector.
+ // This field follows standard label selector semantics.
+ // If present but empty, this selector selects all namespaces.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 2;
+}
+
+message NetworkPolicyPort {
+ // Optional. The protocol (TCP or UDP) which traffic must match.
+ // If not specified, this field defaults to TCP.
+ // +optional
+ optional string protocol = 1;
+
+ // If specified, the port on the given protocol. This can
+ // either be a numerical or named port on a pod. If this field is not provided,
+ // this matches all port names and numbers.
+ // If present, only traffic on the specified protocol AND port
+ // will be matched.
+ // +optional
+ optional k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 2;
+}
+
+message NetworkPolicySpec {
+ // Selects the pods to which this NetworkPolicy object applies. The array of ingress rules
+ // is applied to any pods selected by this field. Multiple network policies can select the
+ // same set of pods. In this case, the ingress rules for each are combined additively.
+ // This field is NOT optional and follows standard label selector semantics.
+ // An empty podSelector matches all pods in this namespace.
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
+
+ // List of ingress rules to be applied to the selected pods.
+ // Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod
+ // OR if the traffic source is the pod's local node,
+ // OR if the traffic matches at least one ingress rule across all of the NetworkPolicy
+ // objects whose podSelector matches the pod.
+ // If this field is empty then this NetworkPolicy does not allow any traffic
+ // (and serves solely to ensure that the pods it selects are isolated by default).
+ // +optional
+ repeated NetworkPolicyIngressRule ingress = 2;
+}
+
+// Pod Security Policy governs the ability to make requests that affect the Security Context
+// that will be applied to a pod and container.
+message PodSecurityPolicy {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // spec defines the policy enforced.
+ // +optional
+ optional PodSecurityPolicySpec spec = 2;
+}
+
+// Pod Security Policy List is a list of PodSecurityPolicy objects.
+message PodSecurityPolicyList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of schema objects.
+ repeated PodSecurityPolicy items = 2;
+}
+
+// Pod Security Policy Spec defines the policy enforced.
+message PodSecurityPolicySpec {
+ // privileged determines if a pod can request to be run as privileged.
+ // +optional
+ optional bool privileged = 1;
+
+ // DefaultAddCapabilities is the default set of capabilities that will be added to the container
+ // unless the pod spec specifically drops the capability. You may not list a capabiility in both
+ // DefaultAddCapabilities and RequiredDropCapabilities.
+ // +optional
+ repeated string defaultAddCapabilities = 2;
+
+ // RequiredDropCapabilities are the capabilities that will be dropped from the container. These
+ // are required to be dropped and cannot be added.
+ // +optional
+ repeated string requiredDropCapabilities = 3;
+
+ // AllowedCapabilities is a list of capabilities that can be requested to add to the container.
+ // Capabilities in this field may be added at the pod author's discretion.
+ // You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities.
+ // +optional
+ repeated string allowedCapabilities = 4;
+
+ // volumes is a white list of allowed volume plugins. Empty indicates that all plugins
+ // may be used.
+ // +optional
+ repeated string volumes = 5;
+
+ // hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.
+ // +optional
+ optional bool hostNetwork = 6;
+
+ // hostPorts determines which host port ranges are allowed to be exposed.
+ // +optional
+ repeated HostPortRange hostPorts = 7;
+
+ // hostPID determines if the policy allows the use of HostPID in the pod spec.
+ // +optional
+ optional bool hostPID = 8;
+
+ // hostIPC determines if the policy allows the use of HostIPC in the pod spec.
+ // +optional
+ optional bool hostIPC = 9;
+
+ // seLinux is the strategy that will dictate the allowable labels that may be set.
+ optional SELinuxStrategyOptions seLinux = 10;
+
+ // runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.
+ optional RunAsUserStrategyOptions runAsUser = 11;
+
+ // SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.
+ optional SupplementalGroupsStrategyOptions supplementalGroups = 12;
+
+ // FSGroup is the strategy that will dictate what fs group is used by the SecurityContext.
+ optional FSGroupStrategyOptions fsGroup = 13;
+
+ // ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file
+ // system. If the container specifically requests to run with a non-read only root file system
+ // the PSP should deny the pod.
+ // If set to false the container may run with a read only root file system if it wishes but it
+ // will not be forced to.
+ // +optional
+ optional bool readOnlyRootFilesystem = 14;
+}
+
+// ReplicaSet represents the configuration of a ReplicaSet.
+message ReplicaSet {
+ // If the Labels of a ReplicaSet are empty, they are defaulted to
+ // be the same as the Pod(s) that the ReplicaSet manages.
+ // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec defines the specification of the desired behavior of the ReplicaSet.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional ReplicaSetSpec spec = 2;
+
+ // Status is the most recently observed status of the ReplicaSet.
+ // This data may be out of date by some window of time.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional ReplicaSetStatus status = 3;
+}
+
+// ReplicaSetCondition describes the state of a replica set at a certain point.
+message ReplicaSetCondition {
+ // Type of replica set condition.
+ optional string type = 1;
+
+ // Status of the condition, one of True, False, Unknown.
+ optional string status = 2;
+
+ // The last time the condition transitioned from one status to another.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
+
+ // The reason for the condition's last transition.
+ // +optional
+ optional string reason = 4;
+
+ // A human readable message indicating details about the transition.
+ // +optional
+ optional string message = 5;
+}
+
+// ReplicaSetList is a collection of ReplicaSets.
+message ReplicaSetList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of ReplicaSets.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
+ repeated ReplicaSet items = 2;
+}
+
+// ReplicaSetSpec is the specification of a ReplicaSet.
+message ReplicaSetSpec {
+ // Replicas is the number of desired replicas.
+ // This is a pointer to distinguish between explicit zero and unspecified.
+ // Defaults to 1.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
+ // +optional
+ optional int32 replicas = 1;
+
+ // Minimum number of seconds for which a newly created pod should be ready
+ // without any of its container crashing, for it to be considered available.
+ // Defaults to 0 (pod will be considered available as soon as it is ready)
+ // +optional
+ optional int32 minReadySeconds = 4;
+
+ // Selector is a label query over pods that should match the replica count.
+ // If the selector is empty, it is defaulted to the labels present on the pod template.
+ // Label keys and values that must match in order to be controlled by this replica set.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
+
+ // Template is the object that describes the pod that will be created if
+ // insufficient replicas are detected.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
+ // +optional
+ optional k8s.io.client_go.pkg.api.v1.PodTemplateSpec template = 3;
+}
+
+// ReplicaSetStatus represents the current status of a ReplicaSet.
+message ReplicaSetStatus {
+ // Replicas is the most recently oberved number of replicas.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
+ optional int32 replicas = 1;
+
+ // The number of pods that have labels matching the labels of the pod template of the replicaset.
+ // +optional
+ optional int32 fullyLabeledReplicas = 2;
+
+ // The number of ready replicas for this replica set.
+ // +optional
+ optional int32 readyReplicas = 4;
+
+ // The number of available replicas (ready for at least minReadySeconds) for this replica set.
+ // +optional
+ optional int32 availableReplicas = 5;
+
+ // ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
+ // +optional
+ optional int64 observedGeneration = 3;
+
+ // Represents the latest available observations of a replica set's current state.
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ repeated ReplicaSetCondition conditions = 6;
+}
+
+// Dummy definition
+message ReplicationControllerDummy {
+}
+
+message RollbackConfig {
+ // The revision to rollback to. If set to 0, rollback to the last revision.
+ // +optional
+ optional int64 revision = 1;
+}
+
+// Spec to control the desired behavior of daemon set rolling update.
+message RollingUpdateDaemonSet {
+ // The maximum number of DaemonSet pods that can be unavailable during the
+ // update. Value can be an absolute number (ex: 5) or a percentage of total
+ // number of DaemonSet pods at the start of the update (ex: 10%). Absolute
+ // number is calculated from percentage by rounding up.
+ // This cannot be 0.
+ // Default value is 1.
+ // Example: when this is set to 30%, at most 30% of the total number of nodes
+ // that should be running the daemon pod (i.e. status.desiredNumberScheduled)
+ // can have their pods stopped for an update at any given
+ // time. The update starts by stopping at most 30% of those DaemonSet pods
+ // and then brings up new DaemonSet pods in their place. Once the new pods
+ // are available, it then proceeds onto other DaemonSet pods, thus ensuring
+ // that at least 70% of original number of DaemonSet pods are available at
+ // all times during the update.
+ // +optional
+ optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1;
+}
+
+// Spec to control the desired behavior of rolling update.
+message RollingUpdateDeployment {
+ // The maximum number of pods that can be unavailable during the update.
+ // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
+ // Absolute number is calculated from percentage by rounding down.
+ // This can not be 0 if MaxSurge is 0.
+ // By default, a fixed value of 1 is used.
+ // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods
+ // immediately when the rolling update starts. Once new pods are ready, old RC
+ // can be scaled down further, followed by scaling up the new RC, ensuring
+ // that the total number of pods available at all times during the update is at
+ // least 70% of desired pods.
+ // +optional
+ optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1;
+
+ // The maximum number of pods that can be scheduled above the desired number of
+ // pods.
+ // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
+ // This can not be 0 if MaxUnavailable is 0.
+ // Absolute number is calculated from percentage by rounding up.
+ // By default, a value of 1 is used.
+ // Example: when this is set to 30%, the new RC can be scaled up immediately when
+ // the rolling update starts, such that the total number of old and new pods do not exceed
+ // 130% of desired pods. Once old pods have been killed,
+ // new RC can be scaled up further, ensuring that total number of pods running
+ // at any time during the update is atmost 130% of desired pods.
+ // +optional
+ optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxSurge = 2;
+}
+
+// Run A sUser Strategy Options defines the strategy type and any options used to create the strategy.
+message RunAsUserStrategyOptions {
+ // Rule is the strategy that will dictate the allowable RunAsUser values that may be set.
+ optional string rule = 1;
+
+ // Ranges are the allowed ranges of uids that may be used.
+ // +optional
+ repeated IDRange ranges = 2;
+}
+
+// SELinux Strategy Options defines the strategy type and any options used to create the strategy.
+message SELinuxStrategyOptions {
+ // type is the strategy that will dictate the allowable labels that may be set.
+ optional string rule = 1;
+
+ // seLinuxOptions required to run as; required for MustRunAs
+ // More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md
+ // +optional
+ optional k8s.io.client_go.pkg.api.v1.SELinuxOptions seLinuxOptions = 2;
+}
+
+// represents a scaling request for a resource.
+message Scale {
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
+ // +optional
+ optional ScaleSpec spec = 2;
+
+ // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.
+ // +optional
+ optional ScaleStatus status = 3;
+}
+
+// describes the attributes of a scale subresource
+message ScaleSpec {
+ // desired number of instances for the scaled object.
+ // +optional
+ optional int32 replicas = 1;
+}
+
+// represents the current status of a scale subresource.
+message ScaleStatus {
+ // actual number of observed instances of the scaled object.
+ optional int32 replicas = 1;
+
+ // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
+ // +optional
+ map<string, string> selector = 2;
+
+ // label selector for pods that should match the replicas count. This is a serializated
+ // version of both map-based and more expressive set-based selectors. This is done to
+ // avoid introspection in the clients. The string will be in the same format as the
+ // query-param syntax. If the target type only supports map-based selectors, both this
+ // field and map-based selector field are populated.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ optional string targetSelector = 3;
+}
+
+// SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.
+message SupplementalGroupsStrategyOptions {
+ // Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.
+ // +optional
+ optional string rule = 1;
+
+ // Ranges are the allowed ranges of supplemental groups. If you would like to force a single
+ // supplemental group then supply a single range with the same start and end.
+ // +optional
+ repeated IDRange ranges = 2;
+}
+
+// A ThirdPartyResource is a generic representation of a resource, it is used by add-ons and plugins to add new resource
+// types to the API. It consists of one or more Versions of the api.
+message ThirdPartyResource {
+ // Standard object metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Description is the description of this object.
+ // +optional
+ optional string description = 2;
+
+ // Versions are versions for this third party object
+ // +optional
+ repeated APIVersion versions = 3;
+}
+
+// An internal object, used for versioned storage in etcd. Not exposed to the end user.
+message ThirdPartyResourceData {
+ // Standard object metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Data is the raw JSON data for this data.
+ // +optional
+ optional bytes data = 2;
+}
+
+// ThirdPartyResrouceDataList is a list of ThirdPartyResourceData.
+message ThirdPartyResourceDataList {
+ // Standard list metadata
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is the list of ThirdpartyResourceData.
+ repeated ThirdPartyResourceData items = 2;
+}
+
+// ThirdPartyResourceList is a list of ThirdPartyResources.
+message ThirdPartyResourceList {
+ // Standard list metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is the list of ThirdPartyResources.
+ repeated ThirdPartyResource items = 2;
+}
+
diff --git a/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/register.go b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/register.go
new file mode 100644
index 000000000..bf8616b88
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/register.go
@@ -0,0 +1,77 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "extensions"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Deployment{},
+ &DeploymentList{},
+ &DeploymentRollback{},
+ &ReplicationControllerDummy{},
+ &Scale{},
+ &ThirdPartyResource{},
+ &ThirdPartyResourceList{},
+ &DaemonSetList{},
+ &DaemonSet{},
+ &ThirdPartyResourceData{},
+ &ThirdPartyResourceDataList{},
+ &Ingress{},
+ &IngressList{},
+ &ReplicaSet{},
+ &ReplicaSetList{},
+ &PodSecurityPolicy{},
+ &PodSecurityPolicyList{},
+ &NetworkPolicy{},
+ &NetworkPolicyList{},
+ )
+ // Add the watch version that applies
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.generated.go
new file mode 100644
index 000000000..8d4e39b66
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.generated.go
@@ -0,0 +1,21979 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1beta1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg3_resource "k8s.io/apimachinery/pkg/api/resource"
+ pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ pkg2_types "k8s.io/apimachinery/pkg/types"
+ pkg5_intstr "k8s.io/apimachinery/pkg/util/intstr"
+ pkg4_v1 "k8s.io/client-go/pkg/api/v1"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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_resource.Quantity
+ var v1 pkg1_v1.TypeMeta
+ var v2 pkg2_types.UID
+ var v3 pkg5_intstr.IntOrString
+ var v4 pkg4_v1.PodTemplateSpec
+ var v5 time.Time
+ _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5
+ }
+}
+
+func (x *ScaleSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = x.Replicas != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ScaleSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ScaleSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "replicas":
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv4 := &x.Replicas
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(yyv4)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ScaleSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv7 := &x.Replicas
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*int32)(yyv7)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ScaleStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = len(x.Selector) != 0
+ yyq2[2] = x.TargetSelector != ""
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Selector, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Selector, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.TargetSelector))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.TargetSelector))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ScaleStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ScaleStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "replicas":
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv4 := &x.Replicas
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(yyv4)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ x.Selector = nil
+ } else {
+ yyv6 := &x.Selector
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv6, false, d)
+ }
+ }
+ case "targetSelector":
+ if r.TryDecodeAsNil() {
+ x.TargetSelector = ""
+ } else {
+ yyv8 := &x.TargetSelector
+ 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_containerMapEnd1234)
+}
+
+func (x *ScaleStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv11 := &x.Replicas
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int32)(yyv11)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Selector = nil
+ } else {
+ yyv13 := &x.Selector
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TargetSelector = ""
+ } else {
+ yyv15 := &x.TargetSelector
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Scale) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Scale) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Scale) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = ScaleSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ScaleStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = ScaleSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ScaleStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ReplicationControllerDummy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Kind != ""
+ yyq2[1] = x.APIVersion != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ReplicationControllerDummy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ReplicationControllerDummy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ReplicationControllerDummy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv9 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv11 := &x.APIVersion
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *CustomMetricTarget) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy7 := &x.TargetValue
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy7)
+ } else {
+ z.EncFallback(yy7)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("value"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.TargetValue
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy9) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy9)
+ } else {
+ z.EncFallback(yy9)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CustomMetricTarget) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CustomMetricTarget) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "value":
+ if r.TryDecodeAsNil() {
+ x.TargetValue = pkg3_resource.Quantity{}
+ } else {
+ yyv6 := &x.TargetValue
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CustomMetricTarget) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv9 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TargetValue = pkg3_resource.Quantity{}
+ } else {
+ yyv11 := &x.TargetValue
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else if !yym12 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv11)
+ } else {
+ z.DecFallback(yyv11, false)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *CustomMetricTargetList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceCustomMetricTarget(([]CustomMetricTarget)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceCustomMetricTarget(([]CustomMetricTarget)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CustomMetricTargetList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CustomMetricTargetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv4 := &x.Items
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceCustomMetricTarget((*[]CustomMetricTarget)(yyv4), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CustomMetricTargetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv7 := &x.Items
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSliceCustomMetricTarget((*[]CustomMetricTarget)(yyv7), d)
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *CustomMetricCurrentStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy7 := &x.CurrentValue
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy7)
+ } else {
+ z.EncFallback(yy7)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("value"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.CurrentValue
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy9) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy9)
+ } else {
+ z.EncFallback(yy9)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CustomMetricCurrentStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CustomMetricCurrentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "value":
+ if r.TryDecodeAsNil() {
+ x.CurrentValue = pkg3_resource.Quantity{}
+ } else {
+ yyv6 := &x.CurrentValue
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CustomMetricCurrentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv9 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentValue = pkg3_resource.Quantity{}
+ } else {
+ yyv11 := &x.CurrentValue
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else if !yym12 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv11)
+ } else {
+ z.DecFallback(yyv11, false)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *CustomMetricCurrentStatusList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceCustomMetricCurrentStatus(([]CustomMetricCurrentStatus)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceCustomMetricCurrentStatus(([]CustomMetricCurrentStatus)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CustomMetricCurrentStatusList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CustomMetricCurrentStatusList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv4 := &x.Items
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceCustomMetricCurrentStatus((*[]CustomMetricCurrentStatus)(yyv4), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CustomMetricCurrentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv7 := &x.Items
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSliceCustomMetricCurrentStatus((*[]CustomMetricCurrentStatus)(yyv7), d)
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ThirdPartyResource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = x.Description != ""
+ yyq2[4] = len(x.Versions) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Description))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("description"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Description))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.Versions == nil {
+ r.EncodeNil()
+ } else {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ h.encSliceAPIVersion(([]APIVersion)(x.Versions), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("versions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Versions == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ h.encSliceAPIVersion(([]APIVersion)(x.Versions), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ThirdPartyResource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ThirdPartyResource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "description":
+ if r.TryDecodeAsNil() {
+ x.Description = ""
+ } else {
+ yyv10 := &x.Description
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "versions":
+ if r.TryDecodeAsNil() {
+ x.Versions = nil
+ } else {
+ yyv12 := &x.Versions
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ h.decSliceAPIVersion((*[]APIVersion)(yyv12), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ThirdPartyResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv15 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv17 := &x.APIVersion
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg1_v1.ObjectMeta{}
+ } else {
+ yyv19 := &x.ObjectMeta
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv19) {
+ } else {
+ z.DecFallback(yyv19, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Description = ""
+ } else {
+ yyv21 := &x.Description
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Versions = nil
+ } else {
+ yyv23 := &x.Versions
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ h.decSliceAPIVersion((*[]APIVersion)(yyv23), d)
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ThirdPartyResourceList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceThirdPartyResource(([]ThirdPartyResource)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceThirdPartyResource(([]ThirdPartyResource)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ThirdPartyResourceList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ThirdPartyResourceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceThirdPartyResource((*[]ThirdPartyResource)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ThirdPartyResourceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceThirdPartyResource((*[]ThirdPartyResource)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *APIVersion) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = x.Name != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *APIVersion) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *APIVersion) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *APIVersion) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv7 := &x.Name
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*string)(yyv7)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ThirdPartyResourceData) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Data) != 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Data))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("data"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Data))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ThirdPartyResourceData) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ThirdPartyResourceData) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "data":
+ if r.TryDecodeAsNil() {
+ x.Data = nil
+ } else {
+ yyv10 := &x.Data
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *yyv10 = r.DecodeBytes(*(*[]byte)(yyv10), false, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ThirdPartyResourceData) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Data = nil
+ } else {
+ yyv19 := &x.Data
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *yyv19 = r.DecodeBytes(*(*[]byte)(yyv19), false, false)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Deployment) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Deployment) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Deployment) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = DeploymentSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = DeploymentStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Deployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = DeploymentSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = DeploymentStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DeploymentSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [9]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Replicas != nil
+ yyq2[1] = x.Selector != nil
+ yyq2[3] = true
+ yyq2[4] = x.MinReadySeconds != 0
+ yyq2[5] = x.RevisionHistoryLimit != nil
+ yyq2[6] = x.Paused != false
+ yyq2[7] = x.RollbackTo != nil
+ yyq2[8] = x.ProgressDeadlineSeconds != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(9)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Replicas == nil {
+ r.EncodeNil()
+ } else {
+ yy4 := *x.Replicas
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(yy4))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Replicas == nil {
+ r.EncodeNil()
+ } else {
+ yy6 := *x.Replicas
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(yy6))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy12 := &x.Template
+ yy12.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("template"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy14 := &x.Template
+ yy14.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yy17 := &x.Strategy
+ yy17.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("strategy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy19 := &x.Strategy
+ yy19.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MinReadySeconds))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("minReadySeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MinReadySeconds))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.RevisionHistoryLimit == nil {
+ r.EncodeNil()
+ } else {
+ yy25 := *x.RevisionHistoryLimit
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeInt(int64(yy25))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("revisionHistoryLimit"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RevisionHistoryLimit == nil {
+ r.EncodeNil()
+ } else {
+ yy27 := *x.RevisionHistoryLimit
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeInt(int64(yy27))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym30 := z.EncBinary()
+ _ = yym30
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Paused))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("paused"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym31 := z.EncBinary()
+ _ = yym31
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Paused))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.RollbackTo == nil {
+ r.EncodeNil()
+ } else {
+ x.RollbackTo.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rollbackTo"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RollbackTo == nil {
+ r.EncodeNil()
+ } else {
+ x.RollbackTo.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ if x.ProgressDeadlineSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy36 := *x.ProgressDeadlineSeconds
+ yym37 := z.EncBinary()
+ _ = yym37
+ if false {
+ } else {
+ r.EncodeInt(int64(yy36))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("progressDeadlineSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ProgressDeadlineSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy38 := *x.ProgressDeadlineSeconds
+ yym39 := z.EncBinary()
+ _ = yym39
+ if false {
+ } else {
+ r.EncodeInt(int64(yy38))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DeploymentSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DeploymentSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "replicas":
+ if r.TryDecodeAsNil() {
+ if x.Replicas != nil {
+ x.Replicas = nil
+ }
+ } else {
+ if x.Replicas == nil {
+ x.Replicas = new(int32)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(x.Replicas)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_v1.LabelSelector)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ case "template":
+ if r.TryDecodeAsNil() {
+ x.Template = pkg4_v1.PodTemplateSpec{}
+ } else {
+ yyv8 := &x.Template
+ yyv8.CodecDecodeSelf(d)
+ }
+ case "strategy":
+ if r.TryDecodeAsNil() {
+ x.Strategy = DeploymentStrategy{}
+ } else {
+ yyv9 := &x.Strategy
+ yyv9.CodecDecodeSelf(d)
+ }
+ case "minReadySeconds":
+ if r.TryDecodeAsNil() {
+ x.MinReadySeconds = 0
+ } else {
+ yyv10 := &x.MinReadySeconds
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(yyv10)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "revisionHistoryLimit":
+ if r.TryDecodeAsNil() {
+ if x.RevisionHistoryLimit != nil {
+ x.RevisionHistoryLimit = nil
+ }
+ } else {
+ if x.RevisionHistoryLimit == nil {
+ x.RevisionHistoryLimit = new(int32)
+ }
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int32)(x.RevisionHistoryLimit)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "paused":
+ if r.TryDecodeAsNil() {
+ x.Paused = false
+ } else {
+ yyv14 := &x.Paused
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*bool)(yyv14)) = r.DecodeBool()
+ }
+ }
+ case "rollbackTo":
+ if r.TryDecodeAsNil() {
+ if x.RollbackTo != nil {
+ x.RollbackTo = nil
+ }
+ } else {
+ if x.RollbackTo == nil {
+ x.RollbackTo = new(RollbackConfig)
+ }
+ x.RollbackTo.CodecDecodeSelf(d)
+ }
+ case "progressDeadlineSeconds":
+ if r.TryDecodeAsNil() {
+ if x.ProgressDeadlineSeconds != nil {
+ x.ProgressDeadlineSeconds = nil
+ }
+ } else {
+ if x.ProgressDeadlineSeconds == nil {
+ x.ProgressDeadlineSeconds = new(int32)
+ }
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int32)(x.ProgressDeadlineSeconds)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj19 int
+ var yyb19 bool
+ var yyhl19 bool = l >= 0
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Replicas != nil {
+ x.Replicas = nil
+ }
+ } else {
+ if x.Replicas == nil {
+ x.Replicas = new(int32)
+ }
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ *((*int32)(x.Replicas)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_v1.LabelSelector)
+ }
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Template = pkg4_v1.PodTemplateSpec{}
+ } else {
+ yyv24 := &x.Template
+ yyv24.CodecDecodeSelf(d)
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Strategy = DeploymentStrategy{}
+ } else {
+ yyv25 := &x.Strategy
+ yyv25.CodecDecodeSelf(d)
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MinReadySeconds = 0
+ } else {
+ yyv26 := &x.MinReadySeconds
+ yym27 := z.DecBinary()
+ _ = yym27
+ if false {
+ } else {
+ *((*int32)(yyv26)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RevisionHistoryLimit != nil {
+ x.RevisionHistoryLimit = nil
+ }
+ } else {
+ if x.RevisionHistoryLimit == nil {
+ x.RevisionHistoryLimit = new(int32)
+ }
+ yym29 := z.DecBinary()
+ _ = yym29
+ if false {
+ } else {
+ *((*int32)(x.RevisionHistoryLimit)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Paused = false
+ } else {
+ yyv30 := &x.Paused
+ yym31 := z.DecBinary()
+ _ = yym31
+ if false {
+ } else {
+ *((*bool)(yyv30)) = r.DecodeBool()
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RollbackTo != nil {
+ x.RollbackTo = nil
+ }
+ } else {
+ if x.RollbackTo == nil {
+ x.RollbackTo = new(RollbackConfig)
+ }
+ x.RollbackTo.CodecDecodeSelf(d)
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ProgressDeadlineSeconds != nil {
+ x.ProgressDeadlineSeconds = nil
+ }
+ } else {
+ if x.ProgressDeadlineSeconds == nil {
+ x.ProgressDeadlineSeconds = new(int32)
+ }
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ *((*int32)(x.ProgressDeadlineSeconds)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj19-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DeploymentRollback) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[3] = len(x.UpdatedAnnotations) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.UpdatedAnnotations == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.UpdatedAnnotations, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("updatedAnnotations"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.UpdatedAnnotations == nil {
+ r.EncodeNil()
+ } else {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.UpdatedAnnotations, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy16 := &x.RollbackTo
+ yy16.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rollbackTo"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy18 := &x.RollbackTo
+ yy18.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DeploymentRollback) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DeploymentRollback) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv8 := &x.Name
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "updatedAnnotations":
+ if r.TryDecodeAsNil() {
+ x.UpdatedAnnotations = nil
+ } else {
+ yyv10 := &x.UpdatedAnnotations
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv10, false, d)
+ }
+ }
+ case "rollbackTo":
+ if r.TryDecodeAsNil() {
+ x.RollbackTo = RollbackConfig{}
+ } else {
+ yyv12 := &x.RollbackTo
+ yyv12.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DeploymentRollback) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv14 := &x.Kind
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv16 := &x.APIVersion
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv18 := &x.Name
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*string)(yyv18)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UpdatedAnnotations = nil
+ } else {
+ yyv20 := &x.UpdatedAnnotations
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv20, false, d)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RollbackTo = RollbackConfig{}
+ } else {
+ yyv22 := &x.RollbackTo
+ yyv22.CodecDecodeSelf(d)
+ }
+ for {
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj13-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *RollbackConfig) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = x.Revision != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Revision))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("revision"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Revision))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RollbackConfig) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RollbackConfig) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "revision":
+ if r.TryDecodeAsNil() {
+ x.Revision = 0
+ } else {
+ yyv4 := &x.Revision
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int64)(yyv4)) = int64(r.DecodeInt(64))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RollbackConfig) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Revision = 0
+ } else {
+ yyv7 := &x.Revision
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*int64)(yyv7)) = int64(r.DecodeInt(64))
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DeploymentStrategy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Type != ""
+ yyq2[1] = x.RollingUpdate != 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_containerArrayElem1234)
+ if yyq2[0] {
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.RollingUpdate == nil {
+ r.EncodeNil()
+ } else {
+ x.RollingUpdate.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rollingUpdate"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RollingUpdate == nil {
+ r.EncodeNil()
+ } else {
+ x.RollingUpdate.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DeploymentStrategy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DeploymentStrategy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "rollingUpdate":
+ if r.TryDecodeAsNil() {
+ if x.RollingUpdate != nil {
+ x.RollingUpdate = nil
+ }
+ } else {
+ if x.RollingUpdate == nil {
+ x.RollingUpdate = new(RollingUpdateDeployment)
+ }
+ x.RollingUpdate.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DeploymentStrategy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv7 := &x.Type
+ yyv7.CodecDecodeSelf(d)
+ }
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RollingUpdate != nil {
+ x.RollingUpdate = nil
+ }
+ } else {
+ if x.RollingUpdate == nil {
+ x.RollingUpdate = new(RollingUpdateDeployment)
+ }
+ x.RollingUpdate.CodecDecodeSelf(d)
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x DeploymentStrategyType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *DeploymentStrategyType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *RollingUpdateDeployment) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.MaxUnavailable != nil
+ yyq2[1] = x.MaxSurge != 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.MaxUnavailable == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.MaxUnavailable) {
+ } else if !yym4 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.MaxUnavailable)
+ } else {
+ z.EncFallback(x.MaxUnavailable)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("maxUnavailable"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.MaxUnavailable == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.MaxUnavailable) {
+ } else if !yym5 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.MaxUnavailable)
+ } else {
+ z.EncFallback(x.MaxUnavailable)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.MaxSurge == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.MaxSurge) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.MaxSurge)
+ } else {
+ z.EncFallback(x.MaxSurge)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("maxSurge"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.MaxSurge == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.MaxSurge) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.MaxSurge)
+ } else {
+ z.EncFallback(x.MaxSurge)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RollingUpdateDeployment) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RollingUpdateDeployment) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "maxUnavailable":
+ if r.TryDecodeAsNil() {
+ if x.MaxUnavailable != nil {
+ x.MaxUnavailable = nil
+ }
+ } else {
+ if x.MaxUnavailable == nil {
+ x.MaxUnavailable = new(pkg5_intstr.IntOrString)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.MaxUnavailable) {
+ } else if !yym5 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.MaxUnavailable)
+ } else {
+ z.DecFallback(x.MaxUnavailable, false)
+ }
+ }
+ case "maxSurge":
+ if r.TryDecodeAsNil() {
+ if x.MaxSurge != nil {
+ x.MaxSurge = nil
+ }
+ } else {
+ if x.MaxSurge == nil {
+ x.MaxSurge = new(pkg5_intstr.IntOrString)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.MaxSurge) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.MaxSurge)
+ } else {
+ z.DecFallback(x.MaxSurge, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RollingUpdateDeployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.MaxUnavailable != nil {
+ x.MaxUnavailable = nil
+ }
+ } else {
+ if x.MaxUnavailable == nil {
+ x.MaxUnavailable = new(pkg5_intstr.IntOrString)
+ }
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.MaxUnavailable) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.MaxUnavailable)
+ } else {
+ z.DecFallback(x.MaxUnavailable, false)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.MaxSurge != nil {
+ x.MaxSurge = nil
+ }
+ } else {
+ if x.MaxSurge == nil {
+ x.MaxSurge = new(pkg5_intstr.IntOrString)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.MaxSurge) {
+ } else if !yym12 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.MaxSurge)
+ } else {
+ z.DecFallback(x.MaxSurge, false)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DeploymentStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.ObservedGeneration != 0
+ yyq2[1] = x.Replicas != 0
+ yyq2[2] = x.UpdatedReplicas != 0
+ yyq2[3] = x.ReadyReplicas != 0
+ yyq2[4] = x.AvailableReplicas != 0
+ yyq2[5] = x.UnavailableReplicas != 0
+ yyq2[6] = len(x.Conditions) != 0
+ yyq2[7] = x.CollisionCount != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ObservedGeneration))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("observedGeneration"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ObservedGeneration))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.UpdatedReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("updatedReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.UpdatedReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ReadyReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readyReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ReadyReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(x.AvailableReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("availableReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(x.AvailableReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeInt(int64(x.UnavailableReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("unavailableReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeInt(int64(x.UnavailableReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ h.encSliceDeploymentCondition(([]DeploymentCondition)(x.Conditions), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("conditions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ h.encSliceDeploymentCondition(([]DeploymentCondition)(x.Conditions), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.CollisionCount == nil {
+ r.EncodeNil()
+ } else {
+ yy25 := *x.CollisionCount
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeInt(int64(yy25))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("collisionCount"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.CollisionCount == nil {
+ r.EncodeNil()
+ } else {
+ yy27 := *x.CollisionCount
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeInt(int64(yy27))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DeploymentStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DeploymentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "observedGeneration":
+ if r.TryDecodeAsNil() {
+ x.ObservedGeneration = 0
+ } else {
+ yyv4 := &x.ObservedGeneration
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int64)(yyv4)) = int64(r.DecodeInt(64))
+ }
+ }
+ 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 "updatedReplicas":
+ if r.TryDecodeAsNil() {
+ x.UpdatedReplicas = 0
+ } else {
+ yyv8 := &x.UpdatedReplicas
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "readyReplicas":
+ if r.TryDecodeAsNil() {
+ x.ReadyReplicas = 0
+ } else {
+ yyv10 := &x.ReadyReplicas
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(yyv10)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "availableReplicas":
+ if r.TryDecodeAsNil() {
+ x.AvailableReplicas = 0
+ } else {
+ yyv12 := &x.AvailableReplicas
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int32)(yyv12)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "unavailableReplicas":
+ if r.TryDecodeAsNil() {
+ x.UnavailableReplicas = 0
+ } else {
+ yyv14 := &x.UnavailableReplicas
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*int32)(yyv14)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "conditions":
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv16 := &x.Conditions
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ h.decSliceDeploymentCondition((*[]DeploymentCondition)(yyv16), d)
+ }
+ }
+ case "collisionCount":
+ if r.TryDecodeAsNil() {
+ if x.CollisionCount != nil {
+ x.CollisionCount = nil
+ }
+ } else {
+ if x.CollisionCount == nil {
+ x.CollisionCount = new(int64)
+ }
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*int64)(x.CollisionCount)) = int64(r.DecodeInt(64))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DeploymentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj20 int
+ var yyb20 bool
+ var yyhl20 bool = l >= 0
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObservedGeneration = 0
+ } else {
+ yyv21 := &x.ObservedGeneration
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int64)(yyv21)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv23 := &x.Replicas
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*int32)(yyv23)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UpdatedReplicas = 0
+ } else {
+ yyv25 := &x.UpdatedReplicas
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*int32)(yyv25)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadyReplicas = 0
+ } else {
+ yyv27 := &x.ReadyReplicas
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*int32)(yyv27)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.AvailableReplicas = 0
+ } else {
+ yyv29 := &x.AvailableReplicas
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*int32)(yyv29)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UnavailableReplicas = 0
+ } else {
+ yyv31 := &x.UnavailableReplicas
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*int32)(yyv31)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv33 := &x.Conditions
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ h.decSliceDeploymentCondition((*[]DeploymentCondition)(yyv33), d)
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.CollisionCount != nil {
+ x.CollisionCount = nil
+ }
+ } else {
+ if x.CollisionCount == nil {
+ x.CollisionCount = new(int64)
+ }
+ yym36 := z.DecBinary()
+ _ = yym36
+ if false {
+ } else {
+ *((*int64)(x.CollisionCount)) = int64(r.DecodeInt(64))
+ }
+ }
+ for {
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj20-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x DeploymentConditionType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *DeploymentConditionType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *DeploymentCondition) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = true
+ yyq2[3] = true
+ yyq2[4] = x.Reason != ""
+ yyq2[5] = x.Message != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yysf7 := &x.Status
+ yysf7.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yysf8 := &x.Status
+ yysf8.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy10 := &x.LastUpdateTime
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy10) {
+ } else if yym11 {
+ z.EncBinaryMarshal(yy10)
+ } else if !yym11 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy10)
+ } else {
+ z.EncFallback(yy10)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastUpdateTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.LastUpdateTime
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if yym13 {
+ z.EncBinaryMarshal(yy12)
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.LastTransitionTime
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy15) {
+ } else if yym16 {
+ z.EncBinaryMarshal(yy15)
+ } else if !yym16 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy15)
+ } else {
+ z.EncFallback(yy15)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.LastTransitionTime
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy17) {
+ } else if yym18 {
+ z.EncBinaryMarshal(yy17)
+ } else if !yym18 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy17)
+ } else {
+ z.EncFallback(yy17)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DeploymentCondition) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DeploymentCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "lastUpdateTime":
+ if r.TryDecodeAsNil() {
+ x.LastUpdateTime = pkg1_v1.Time{}
+ } else {
+ yyv6 := &x.LastUpdateTime
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if yym7 {
+ z.DecBinaryUnmarshal(yyv6)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ case "lastTransitionTime":
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg1_v1.Time{}
+ } else {
+ yyv8 := &x.LastTransitionTime
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv8) {
+ } else if yym9 {
+ z.DecBinaryUnmarshal(yyv8)
+ } else if !yym9 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv8)
+ } else {
+ z.DecFallback(yyv8, false)
+ }
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv10 := &x.Reason
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv12 := &x.Message
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DeploymentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv15 := &x.Type
+ yyv15.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv16 := &x.Status
+ yyv16.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastUpdateTime = pkg1_v1.Time{}
+ } else {
+ yyv17 := &x.LastUpdateTime
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv17) {
+ } else if yym18 {
+ z.DecBinaryUnmarshal(yyv17)
+ } else if !yym18 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv17)
+ } else {
+ z.DecFallback(yyv17, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg1_v1.Time{}
+ } else {
+ yyv19 := &x.LastTransitionTime
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv19) {
+ } else if yym20 {
+ z.DecBinaryUnmarshal(yyv19)
+ } else if !yym20 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv19)
+ } else {
+ z.DecFallback(yyv19, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv21 := &x.Reason
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv23 := &x.Message
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*string)(yyv23)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DeploymentList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceDeployment(([]Deployment)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceDeployment(([]Deployment)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DeploymentList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DeploymentList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceDeployment((*[]Deployment)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DeploymentList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceDeployment((*[]Deployment)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DaemonSetUpdateStrategy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Type != ""
+ yyq2[1] = x.RollingUpdate != 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_containerArrayElem1234)
+ if yyq2[0] {
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.RollingUpdate == nil {
+ r.EncodeNil()
+ } else {
+ x.RollingUpdate.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rollingUpdate"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RollingUpdate == nil {
+ r.EncodeNil()
+ } else {
+ x.RollingUpdate.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DaemonSetUpdateStrategy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DaemonSetUpdateStrategy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "rollingUpdate":
+ if r.TryDecodeAsNil() {
+ if x.RollingUpdate != nil {
+ x.RollingUpdate = nil
+ }
+ } else {
+ if x.RollingUpdate == nil {
+ x.RollingUpdate = new(RollingUpdateDaemonSet)
+ }
+ x.RollingUpdate.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DaemonSetUpdateStrategy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv7 := &x.Type
+ yyv7.CodecDecodeSelf(d)
+ }
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RollingUpdate != nil {
+ x.RollingUpdate = nil
+ }
+ } else {
+ if x.RollingUpdate == nil {
+ x.RollingUpdate = new(RollingUpdateDaemonSet)
+ }
+ x.RollingUpdate.CodecDecodeSelf(d)
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x DaemonSetUpdateStrategyType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *DaemonSetUpdateStrategyType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *RollingUpdateDaemonSet) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = x.MaxUnavailable != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.MaxUnavailable == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.MaxUnavailable) {
+ } else if !yym4 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.MaxUnavailable)
+ } else {
+ z.EncFallback(x.MaxUnavailable)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("maxUnavailable"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.MaxUnavailable == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.MaxUnavailable) {
+ } else if !yym5 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.MaxUnavailable)
+ } else {
+ z.EncFallback(x.MaxUnavailable)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RollingUpdateDaemonSet) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RollingUpdateDaemonSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "maxUnavailable":
+ if r.TryDecodeAsNil() {
+ if x.MaxUnavailable != nil {
+ x.MaxUnavailable = nil
+ }
+ } else {
+ if x.MaxUnavailable == nil {
+ x.MaxUnavailable = new(pkg5_intstr.IntOrString)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.MaxUnavailable) {
+ } else if !yym5 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.MaxUnavailable)
+ } else {
+ z.DecFallback(x.MaxUnavailable, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RollingUpdateDaemonSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.MaxUnavailable != nil {
+ x.MaxUnavailable = nil
+ }
+ } else {
+ if x.MaxUnavailable == nil {
+ x.MaxUnavailable = new(pkg5_intstr.IntOrString)
+ }
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.MaxUnavailable) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.MaxUnavailable)
+ } else {
+ z.DecFallback(x.MaxUnavailable, false)
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DaemonSetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Selector != nil
+ yyq2[2] = true
+ yyq2[3] = x.MinReadySeconds != 0
+ yyq2[4] = x.TemplateGeneration != 0
+ yyq2[5] = x.RevisionHistoryLimit != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy7 := &x.Template
+ yy7.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("template"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.Template
+ yy9.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy12 := &x.UpdateStrategy
+ yy12.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("updateStrategy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy14 := &x.UpdateStrategy
+ yy14.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MinReadySeconds))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("minReadySeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MinReadySeconds))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeInt(int64(x.TemplateGeneration))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("templateGeneration"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeInt(int64(x.TemplateGeneration))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.RevisionHistoryLimit == nil {
+ r.EncodeNil()
+ } else {
+ yy23 := *x.RevisionHistoryLimit
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else {
+ r.EncodeInt(int64(yy23))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("revisionHistoryLimit"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RevisionHistoryLimit == nil {
+ r.EncodeNil()
+ } else {
+ yy25 := *x.RevisionHistoryLimit
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeInt(int64(yy25))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DaemonSetSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DaemonSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "selector":
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_v1.LabelSelector)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ case "template":
+ if r.TryDecodeAsNil() {
+ x.Template = pkg4_v1.PodTemplateSpec{}
+ } else {
+ yyv6 := &x.Template
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "updateStrategy":
+ if r.TryDecodeAsNil() {
+ x.UpdateStrategy = DaemonSetUpdateStrategy{}
+ } else {
+ yyv7 := &x.UpdateStrategy
+ yyv7.CodecDecodeSelf(d)
+ }
+ case "minReadySeconds":
+ if r.TryDecodeAsNil() {
+ x.MinReadySeconds = 0
+ } else {
+ yyv8 := &x.MinReadySeconds
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "templateGeneration":
+ if r.TryDecodeAsNil() {
+ x.TemplateGeneration = 0
+ } else {
+ yyv10 := &x.TemplateGeneration
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int64)(yyv10)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "revisionHistoryLimit":
+ if r.TryDecodeAsNil() {
+ if x.RevisionHistoryLimit != nil {
+ x.RevisionHistoryLimit = nil
+ }
+ } else {
+ if x.RevisionHistoryLimit == nil {
+ x.RevisionHistoryLimit = new(int32)
+ }
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int32)(x.RevisionHistoryLimit)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DaemonSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_v1.LabelSelector)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Template = pkg4_v1.PodTemplateSpec{}
+ } else {
+ yyv17 := &x.Template
+ yyv17.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UpdateStrategy = DaemonSetUpdateStrategy{}
+ } else {
+ yyv18 := &x.UpdateStrategy
+ yyv18.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MinReadySeconds = 0
+ } else {
+ yyv19 := &x.MinReadySeconds
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*int32)(yyv19)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TemplateGeneration = 0
+ } else {
+ yyv21 := &x.TemplateGeneration
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int64)(yyv21)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RevisionHistoryLimit != nil {
+ x.RevisionHistoryLimit = nil
+ }
+ } else {
+ if x.RevisionHistoryLimit == nil {
+ x.RevisionHistoryLimit = new(int32)
+ }
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*int32)(x.RevisionHistoryLimit)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DaemonSetStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [9]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[4] = x.ObservedGeneration != 0
+ yyq2[5] = x.UpdatedNumberScheduled != 0
+ yyq2[6] = x.NumberAvailable != 0
+ yyq2[7] = x.NumberUnavailable != 0
+ yyq2[8] = x.CollisionCount != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(9)
+ } else {
+ yynn2 = 4
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.CurrentNumberScheduled))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentNumberScheduled"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.CurrentNumberScheduled))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(x.NumberMisscheduled))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("numberMisscheduled"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.NumberMisscheduled))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.DesiredNumberScheduled))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("desiredNumberScheduled"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.DesiredNumberScheduled))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.NumberReady))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("numberReady"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(x.NumberReady))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ObservedGeneration))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("observedGeneration"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ObservedGeneration))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeInt(int64(x.UpdatedNumberScheduled))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("updatedNumberScheduled"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeInt(int64(x.UpdatedNumberScheduled))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeInt(int64(x.NumberAvailable))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("numberAvailable"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeInt(int64(x.NumberAvailable))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeInt(int64(x.NumberUnavailable))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("numberUnavailable"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeInt(int64(x.NumberUnavailable))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ if x.CollisionCount == nil {
+ r.EncodeNil()
+ } else {
+ yy28 := *x.CollisionCount
+ yym29 := z.EncBinary()
+ _ = yym29
+ if false {
+ } else {
+ r.EncodeInt(int64(yy28))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("collisionCount"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.CollisionCount == nil {
+ r.EncodeNil()
+ } else {
+ yy30 := *x.CollisionCount
+ yym31 := z.EncBinary()
+ _ = yym31
+ if false {
+ } else {
+ r.EncodeInt(int64(yy30))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DaemonSetStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DaemonSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "currentNumberScheduled":
+ if r.TryDecodeAsNil() {
+ x.CurrentNumberScheduled = 0
+ } else {
+ yyv4 := &x.CurrentNumberScheduled
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(yyv4)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "numberMisscheduled":
+ if r.TryDecodeAsNil() {
+ x.NumberMisscheduled = 0
+ } else {
+ yyv6 := &x.NumberMisscheduled
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int32)(yyv6)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "desiredNumberScheduled":
+ if r.TryDecodeAsNil() {
+ x.DesiredNumberScheduled = 0
+ } else {
+ yyv8 := &x.DesiredNumberScheduled
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "numberReady":
+ if r.TryDecodeAsNil() {
+ x.NumberReady = 0
+ } else {
+ yyv10 := &x.NumberReady
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(yyv10)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "observedGeneration":
+ if r.TryDecodeAsNil() {
+ x.ObservedGeneration = 0
+ } else {
+ yyv12 := &x.ObservedGeneration
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int64)(yyv12)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "updatedNumberScheduled":
+ if r.TryDecodeAsNil() {
+ x.UpdatedNumberScheduled = 0
+ } else {
+ yyv14 := &x.UpdatedNumberScheduled
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*int32)(yyv14)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "numberAvailable":
+ if r.TryDecodeAsNil() {
+ x.NumberAvailable = 0
+ } else {
+ yyv16 := &x.NumberAvailable
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*int32)(yyv16)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "numberUnavailable":
+ if r.TryDecodeAsNil() {
+ x.NumberUnavailable = 0
+ } else {
+ yyv18 := &x.NumberUnavailable
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*int32)(yyv18)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "collisionCount":
+ if r.TryDecodeAsNil() {
+ if x.CollisionCount != nil {
+ x.CollisionCount = nil
+ }
+ } else {
+ if x.CollisionCount == nil {
+ x.CollisionCount = new(int64)
+ }
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ *((*int64)(x.CollisionCount)) = int64(r.DecodeInt(64))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DaemonSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentNumberScheduled = 0
+ } else {
+ yyv23 := &x.CurrentNumberScheduled
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*int32)(yyv23)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NumberMisscheduled = 0
+ } else {
+ yyv25 := &x.NumberMisscheduled
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DesiredNumberScheduled = 0
+ } else {
+ yyv27 := &x.DesiredNumberScheduled
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*int32)(yyv27)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NumberReady = 0
+ } else {
+ yyv29 := &x.NumberReady
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*int32)(yyv29)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObservedGeneration = 0
+ } else {
+ yyv31 := &x.ObservedGeneration
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*int64)(yyv31)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UpdatedNumberScheduled = 0
+ } else {
+ yyv33 := &x.UpdatedNumberScheduled
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ *((*int32)(yyv33)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NumberAvailable = 0
+ } else {
+ yyv35 := &x.NumberAvailable
+ yym36 := z.DecBinary()
+ _ = yym36
+ if false {
+ } else {
+ *((*int32)(yyv35)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NumberUnavailable = 0
+ } else {
+ yyv37 := &x.NumberUnavailable
+ yym38 := z.DecBinary()
+ _ = yym38
+ if false {
+ } else {
+ *((*int32)(yyv37)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.CollisionCount != nil {
+ x.CollisionCount = nil
+ }
+ } else {
+ if x.CollisionCount == nil {
+ x.CollisionCount = new(int64)
+ }
+ yym40 := z.DecBinary()
+ _ = yym40
+ if false {
+ } else {
+ *((*int64)(x.CollisionCount)) = int64(r.DecodeInt(64))
+ }
+ }
+ for {
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj22-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DaemonSet) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DaemonSet) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DaemonSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = DaemonSetSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = DaemonSetStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DaemonSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = DaemonSetSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = DaemonSetStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DaemonSetList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceDaemonSet(([]DaemonSet)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceDaemonSet(([]DaemonSet)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DaemonSetList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DaemonSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceDaemonSet((*[]DaemonSet)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DaemonSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceDaemonSet((*[]DaemonSet)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ThirdPartyResourceDataList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceThirdPartyResourceData(([]ThirdPartyResourceData)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceThirdPartyResourceData(([]ThirdPartyResourceData)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ThirdPartyResourceDataList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ThirdPartyResourceDataList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceThirdPartyResourceData((*[]ThirdPartyResourceData)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ThirdPartyResourceDataList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceThirdPartyResourceData((*[]ThirdPartyResourceData)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Ingress) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Ingress) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Ingress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = IngressSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = IngressStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Ingress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = IngressSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = IngressStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *IngressList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceIngress(([]Ingress)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceIngress(([]Ingress)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *IngressList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *IngressList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceIngress((*[]Ingress)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *IngressList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceIngress((*[]Ingress)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *IngressSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Backend != nil
+ yyq2[1] = len(x.TLS) != 0
+ yyq2[2] = len(x.Rules) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Backend == nil {
+ r.EncodeNil()
+ } else {
+ x.Backend.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("backend"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Backend == nil {
+ r.EncodeNil()
+ } else {
+ x.Backend.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.TLS == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceIngressTLS(([]IngressTLS)(x.TLS), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("tls"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TLS == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceIngressTLS(([]IngressTLS)(x.TLS), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceIngressRule(([]IngressRule)(x.Rules), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rules"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.encSliceIngressRule(([]IngressRule)(x.Rules), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *IngressSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *IngressSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "backend":
+ if r.TryDecodeAsNil() {
+ if x.Backend != nil {
+ x.Backend = nil
+ }
+ } else {
+ if x.Backend == nil {
+ x.Backend = new(IngressBackend)
+ }
+ x.Backend.CodecDecodeSelf(d)
+ }
+ case "tls":
+ if r.TryDecodeAsNil() {
+ x.TLS = nil
+ } else {
+ yyv5 := &x.TLS
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSliceIngressTLS((*[]IngressTLS)(yyv5), d)
+ }
+ }
+ case "rules":
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv7 := &x.Rules
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSliceIngressRule((*[]IngressRule)(yyv7), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *IngressSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Backend != nil {
+ x.Backend = nil
+ }
+ } else {
+ if x.Backend == nil {
+ x.Backend = new(IngressBackend)
+ }
+ x.Backend.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TLS = nil
+ } else {
+ yyv11 := &x.TLS
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceIngressTLS((*[]IngressTLS)(yyv11), d)
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv13 := &x.Rules
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceIngressRule((*[]IngressRule)(yyv13), d)
+ }
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *IngressTLS) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Hosts) != 0
+ yyq2[1] = x.SecretName != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Hosts == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Hosts, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hosts"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Hosts == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Hosts, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SecretName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secretName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SecretName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *IngressTLS) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *IngressTLS) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "hosts":
+ if r.TryDecodeAsNil() {
+ x.Hosts = nil
+ } else {
+ yyv4 := &x.Hosts
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv4, false, d)
+ }
+ }
+ case "secretName":
+ if r.TryDecodeAsNil() {
+ x.SecretName = ""
+ } else {
+ yyv6 := &x.SecretName
+ 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_containerMapEnd1234)
+}
+
+func (x *IngressTLS) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Hosts = nil
+ } else {
+ yyv9 := &x.Hosts
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv9, false, d)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SecretName = ""
+ } else {
+ yyv11 := &x.SecretName
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *IngressStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = true
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yy4 := &x.LoadBalancer
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("loadBalancer"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.LoadBalancer
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *IngressStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *IngressStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "loadBalancer":
+ if r.TryDecodeAsNil() {
+ x.LoadBalancer = pkg4_v1.LoadBalancerStatus{}
+ } else {
+ yyv4 := &x.LoadBalancer
+ yyv4.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *IngressStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj5 int
+ var yyb5 bool
+ var yyhl5 bool = l >= 0
+ yyj5++
+ if yyhl5 {
+ yyb5 = yyj5 > l
+ } else {
+ yyb5 = r.CheckBreak()
+ }
+ if yyb5 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LoadBalancer = pkg4_v1.LoadBalancerStatus{}
+ } else {
+ yyv6 := &x.LoadBalancer
+ yyv6.CodecDecodeSelf(d)
+ }
+ for {
+ yyj5++
+ if yyhl5 {
+ yyb5 = yyj5 > l
+ } else {
+ yyb5 = r.CheckBreak()
+ }
+ if yyb5 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj5-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *IngressRule) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Host != ""
+ yyq2[1] = x.IngressRuleValue.HTTP != nil && x.HTTP != 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Host))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("host"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Host))
+ }
+ }
+ }
+ var yyn6 bool
+ if x.IngressRuleValue.HTTP == nil {
+ yyn6 = true
+ goto LABEL6
+ }
+ LABEL6:
+ if yyr2 || yy2arr2 {
+ if yyn6 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.HTTP == nil {
+ r.EncodeNil()
+ } else {
+ x.HTTP.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("http"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn6 {
+ r.EncodeNil()
+ } else {
+ if x.HTTP == nil {
+ r.EncodeNil()
+ } else {
+ x.HTTP.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *IngressRule) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *IngressRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "host":
+ if r.TryDecodeAsNil() {
+ x.Host = ""
+ } else {
+ yyv4 := &x.Host
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "http":
+ if x.IngressRuleValue.HTTP == nil {
+ x.IngressRuleValue.HTTP = new(HTTPIngressRuleValue)
+ }
+ if r.TryDecodeAsNil() {
+ if x.HTTP != nil {
+ x.HTTP = nil
+ }
+ } else {
+ if x.HTTP == nil {
+ x.HTTP = new(HTTPIngressRuleValue)
+ }
+ x.HTTP.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *IngressRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Host = ""
+ } else {
+ yyv8 := &x.Host
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ if x.IngressRuleValue.HTTP == nil {
+ x.IngressRuleValue.HTTP = new(HTTPIngressRuleValue)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.HTTP != nil {
+ x.HTTP = nil
+ }
+ } else {
+ if x.HTTP == nil {
+ x.HTTP = new(HTTPIngressRuleValue)
+ }
+ x.HTTP.CodecDecodeSelf(d)
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *IngressRuleValue) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = x.HTTP != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.HTTP == nil {
+ r.EncodeNil()
+ } else {
+ x.HTTP.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("http"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.HTTP == nil {
+ r.EncodeNil()
+ } else {
+ x.HTTP.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *IngressRuleValue) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *IngressRuleValue) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "http":
+ if r.TryDecodeAsNil() {
+ if x.HTTP != nil {
+ x.HTTP = nil
+ }
+ } else {
+ if x.HTTP == nil {
+ x.HTTP = new(HTTPIngressRuleValue)
+ }
+ x.HTTP.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *IngressRuleValue) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj5 int
+ var yyb5 bool
+ var yyhl5 bool = l >= 0
+ yyj5++
+ if yyhl5 {
+ yyb5 = yyj5 > l
+ } else {
+ yyb5 = r.CheckBreak()
+ }
+ if yyb5 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.HTTP != nil {
+ x.HTTP = nil
+ }
+ } else {
+ if x.HTTP == nil {
+ x.HTTP = new(HTTPIngressRuleValue)
+ }
+ x.HTTP.CodecDecodeSelf(d)
+ }
+ for {
+ yyj5++
+ if yyhl5 {
+ yyb5 = yyj5 > l
+ } else {
+ yyb5 = r.CheckBreak()
+ }
+ if yyb5 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj5-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *HTTPIngressRuleValue) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if x.Paths == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceHTTPIngressPath(([]HTTPIngressPath)(x.Paths), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("paths"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Paths == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceHTTPIngressPath(([]HTTPIngressPath)(x.Paths), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HTTPIngressRuleValue) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HTTPIngressRuleValue) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "paths":
+ if r.TryDecodeAsNil() {
+ x.Paths = nil
+ } else {
+ yyv4 := &x.Paths
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceHTTPIngressPath((*[]HTTPIngressPath)(yyv4), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HTTPIngressRuleValue) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Paths = nil
+ } else {
+ yyv7 := &x.Paths
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSliceHTTPIngressPath((*[]HTTPIngressPath)(yyv7), d)
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *HTTPIngressPath) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Path != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("path"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy7 := &x.Backend
+ yy7.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("backend"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.Backend
+ yy9.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HTTPIngressPath) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HTTPIngressPath) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv4 := &x.Path
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "backend":
+ if r.TryDecodeAsNil() {
+ x.Backend = IngressBackend{}
+ } else {
+ yyv6 := &x.Backend
+ yyv6.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HTTPIngressPath) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv8 := &x.Path
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Backend = IngressBackend{}
+ } else {
+ yyv10 := &x.Backend
+ yyv10.CodecDecodeSelf(d)
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *IngressBackend) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ServiceName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("serviceName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ServiceName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy7 := &x.ServicePort
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy7)
+ } else {
+ z.EncFallback(yy7)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("servicePort"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.ServicePort
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy9) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy9)
+ } else {
+ z.EncFallback(yy9)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *IngressBackend) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *IngressBackend) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "serviceName":
+ if r.TryDecodeAsNil() {
+ x.ServiceName = ""
+ } else {
+ yyv4 := &x.ServiceName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "servicePort":
+ if r.TryDecodeAsNil() {
+ x.ServicePort = pkg5_intstr.IntOrString{}
+ } else {
+ yyv6 := &x.ServicePort
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *IngressBackend) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ServiceName = ""
+ } else {
+ yyv9 := &x.ServiceName
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ServicePort = pkg5_intstr.IntOrString{}
+ } else {
+ yyv11 := &x.ServicePort
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else if !yym12 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv11)
+ } else {
+ z.DecFallback(yyv11, false)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ReplicaSet) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ReplicaSet) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ReplicaSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = ReplicaSetSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ReplicaSetStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ReplicaSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = ReplicaSetSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ReplicaSetStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ReplicaSetList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceReplicaSet(([]ReplicaSet)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceReplicaSet(([]ReplicaSet)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ReplicaSetList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ReplicaSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceReplicaSet((*[]ReplicaSet)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ReplicaSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceReplicaSet((*[]ReplicaSet)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ReplicaSetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Replicas != nil
+ yyq2[1] = x.MinReadySeconds != 0
+ yyq2[2] = x.Selector != nil
+ yyq2[3] = true
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Replicas == nil {
+ r.EncodeNil()
+ } else {
+ yy4 := *x.Replicas
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(yy4))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Replicas == nil {
+ r.EncodeNil()
+ } else {
+ yy6 := *x.Replicas
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(yy6))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MinReadySeconds))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("minReadySeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MinReadySeconds))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Template
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("template"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Template
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ReplicaSetSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ReplicaSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "replicas":
+ if r.TryDecodeAsNil() {
+ if x.Replicas != nil {
+ x.Replicas = nil
+ }
+ } else {
+ if x.Replicas == nil {
+ x.Replicas = new(int32)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(x.Replicas)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "minReadySeconds":
+ if r.TryDecodeAsNil() {
+ x.MinReadySeconds = 0
+ } else {
+ yyv6 := &x.MinReadySeconds
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int32)(yyv6)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_v1.LabelSelector)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ case "template":
+ if r.TryDecodeAsNil() {
+ x.Template = pkg4_v1.PodTemplateSpec{}
+ } else {
+ yyv10 := &x.Template
+ yyv10.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ReplicaSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Replicas != nil {
+ x.Replicas = nil
+ }
+ } else {
+ if x.Replicas == nil {
+ x.Replicas = new(int32)
+ }
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int32)(x.Replicas)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MinReadySeconds = 0
+ } else {
+ yyv14 := &x.MinReadySeconds
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*int32)(yyv14)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_v1.LabelSelector)
+ }
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Template = pkg4_v1.PodTemplateSpec{}
+ } else {
+ yyv18 := &x.Template
+ yyv18.CodecDecodeSelf(d)
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ReplicaSetStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.FullyLabeledReplicas != 0
+ yyq2[2] = x.ReadyReplicas != 0
+ yyq2[3] = x.AvailableReplicas != 0
+ yyq2[4] = x.ObservedGeneration != 0
+ yyq2[5] = len(x.Conditions) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(x.FullyLabeledReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fullyLabeledReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.FullyLabeledReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ReadyReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readyReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ReadyReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.AvailableReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("availableReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(x.AvailableReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ObservedGeneration))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("observedGeneration"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ObservedGeneration))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ h.encSliceReplicaSetCondition(([]ReplicaSetCondition)(x.Conditions), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("conditions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.encSliceReplicaSetCondition(([]ReplicaSetCondition)(x.Conditions), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ReplicaSetStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ReplicaSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "replicas":
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv4 := &x.Replicas
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(yyv4)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "fullyLabeledReplicas":
+ if r.TryDecodeAsNil() {
+ x.FullyLabeledReplicas = 0
+ } else {
+ yyv6 := &x.FullyLabeledReplicas
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int32)(yyv6)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "readyReplicas":
+ if r.TryDecodeAsNil() {
+ x.ReadyReplicas = 0
+ } else {
+ yyv8 := &x.ReadyReplicas
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "availableReplicas":
+ if r.TryDecodeAsNil() {
+ x.AvailableReplicas = 0
+ } else {
+ yyv10 := &x.AvailableReplicas
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(yyv10)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "observedGeneration":
+ if r.TryDecodeAsNil() {
+ x.ObservedGeneration = 0
+ } else {
+ yyv12 := &x.ObservedGeneration
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int64)(yyv12)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "conditions":
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv14 := &x.Conditions
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.decSliceReplicaSetCondition((*[]ReplicaSetCondition)(yyv14), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ReplicaSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj16 int
+ var yyb16 bool
+ var yyhl16 bool = l >= 0
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv17 := &x.Replicas
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int32)(yyv17)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FullyLabeledReplicas = 0
+ } else {
+ yyv19 := &x.FullyLabeledReplicas
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*int32)(yyv19)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadyReplicas = 0
+ } else {
+ yyv21 := &x.ReadyReplicas
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int32)(yyv21)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.AvailableReplicas = 0
+ } else {
+ yyv23 := &x.AvailableReplicas
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*int32)(yyv23)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObservedGeneration = 0
+ } else {
+ yyv25 := &x.ObservedGeneration
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*int64)(yyv25)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv27 := &x.Conditions
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ h.decSliceReplicaSetCondition((*[]ReplicaSetCondition)(yyv27), d)
+ }
+ }
+ for {
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj16-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x ReplicaSetConditionType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *ReplicaSetConditionType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *ReplicaSetCondition) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = true
+ yyq2[3] = x.Reason != ""
+ yyq2[4] = x.Message != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yysf7 := &x.Status
+ yysf7.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yysf8 := &x.Status
+ yysf8.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy10 := &x.LastTransitionTime
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy10) {
+ } else if yym11 {
+ z.EncBinaryMarshal(yy10)
+ } else if !yym11 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy10)
+ } else {
+ z.EncFallback(yy10)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.LastTransitionTime
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if yym13 {
+ z.EncBinaryMarshal(yy12)
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ReplicaSetCondition) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ReplicaSetCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "lastTransitionTime":
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg1_v1.Time{}
+ } else {
+ yyv6 := &x.LastTransitionTime
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if yym7 {
+ z.DecBinaryUnmarshal(yyv6)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv8 := &x.Reason
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv10 := &x.Message
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ReplicaSetCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv13 := &x.Type
+ yyv13.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv14 := &x.Status
+ yyv14.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg1_v1.Time{}
+ } else {
+ yyv15 := &x.LastTransitionTime
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv15) {
+ } else if yym16 {
+ z.DecBinaryUnmarshal(yyv15)
+ } else if !yym16 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv15)
+ } else {
+ z.DecFallback(yyv15, false)
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv17 := &x.Reason
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv19 := &x.Message
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodSecurityPolicy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = true
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodSecurityPolicy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodSecurityPolicy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = PodSecurityPolicySpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodSecurityPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv12 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv14 := &x.APIVersion
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg1_v1.ObjectMeta{}
+ } else {
+ yyv16 := &x.ObjectMeta
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv16) {
+ } else {
+ z.DecFallback(yyv16, false)
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = PodSecurityPolicySpec{}
+ } else {
+ yyv18 := &x.Spec
+ yyv18.CodecDecodeSelf(d)
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [14]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Privileged != false
+ yyq2[1] = len(x.DefaultAddCapabilities) != 0
+ yyq2[2] = len(x.RequiredDropCapabilities) != 0
+ yyq2[3] = len(x.AllowedCapabilities) != 0
+ yyq2[4] = len(x.Volumes) != 0
+ yyq2[5] = x.HostNetwork != false
+ yyq2[6] = len(x.HostPorts) != 0
+ yyq2[7] = x.HostPID != false
+ yyq2[8] = x.HostIPC != false
+ yyq2[13] = x.ReadOnlyRootFilesystem != false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(14)
+ } else {
+ yynn2 = 4
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Privileged))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("privileged"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Privileged))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.DefaultAddCapabilities == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.DefaultAddCapabilities), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("defaultAddCapabilities"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.DefaultAddCapabilities == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.DefaultAddCapabilities), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.RequiredDropCapabilities == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.RequiredDropCapabilities), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("requiredDropCapabilities"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RequiredDropCapabilities == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.RequiredDropCapabilities), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.AllowedCapabilities == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.AllowedCapabilities), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("allowedCapabilities"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.AllowedCapabilities == nil {
+ r.EncodeNil()
+ } else {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.AllowedCapabilities), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.Volumes == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceFSType(([]FSType)(x.Volumes), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Volumes == nil {
+ r.EncodeNil()
+ } else {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ h.encSliceFSType(([]FSType)(x.Volumes), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostNetwork))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostNetwork"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostNetwork))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.HostPorts == nil {
+ r.EncodeNil()
+ } else {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ h.encSliceHostPortRange(([]HostPortRange)(x.HostPorts), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostPorts"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.HostPorts == nil {
+ r.EncodeNil()
+ } else {
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ h.encSliceHostPortRange(([]HostPortRange)(x.HostPorts), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostPID))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostPID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostPID))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostIPC))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostIPC"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym29 := z.EncBinary()
+ _ = yym29
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostIPC))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy31 := &x.SELinux
+ yy31.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("seLinux"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy33 := &x.SELinux
+ yy33.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy36 := &x.RunAsUser
+ yy36.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("runAsUser"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy38 := &x.RunAsUser
+ yy38.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy41 := &x.SupplementalGroups
+ yy41.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("supplementalGroups"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy43 := &x.SupplementalGroups
+ yy43.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy46 := &x.FSGroup
+ yy46.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsGroup"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy48 := &x.FSGroup
+ yy48.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[13] {
+ yym51 := z.EncBinary()
+ _ = yym51
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnlyRootFilesystem))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[13] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnlyRootFilesystem"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym52 := z.EncBinary()
+ _ = yym52
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnlyRootFilesystem))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodSecurityPolicySpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodSecurityPolicySpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "privileged":
+ if r.TryDecodeAsNil() {
+ x.Privileged = false
+ } else {
+ yyv4 := &x.Privileged
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*bool)(yyv4)) = r.DecodeBool()
+ }
+ }
+ case "defaultAddCapabilities":
+ if r.TryDecodeAsNil() {
+ x.DefaultAddCapabilities = nil
+ } else {
+ yyv6 := &x.DefaultAddCapabilities
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv6), d)
+ }
+ }
+ case "requiredDropCapabilities":
+ if r.TryDecodeAsNil() {
+ x.RequiredDropCapabilities = nil
+ } else {
+ yyv8 := &x.RequiredDropCapabilities
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv8), d)
+ }
+ }
+ case "allowedCapabilities":
+ if r.TryDecodeAsNil() {
+ x.AllowedCapabilities = nil
+ } else {
+ yyv10 := &x.AllowedCapabilities
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv10), d)
+ }
+ }
+ case "volumes":
+ if r.TryDecodeAsNil() {
+ x.Volumes = nil
+ } else {
+ yyv12 := &x.Volumes
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ h.decSliceFSType((*[]FSType)(yyv12), d)
+ }
+ }
+ case "hostNetwork":
+ if r.TryDecodeAsNil() {
+ x.HostNetwork = false
+ } else {
+ yyv14 := &x.HostNetwork
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*bool)(yyv14)) = r.DecodeBool()
+ }
+ }
+ case "hostPorts":
+ if r.TryDecodeAsNil() {
+ x.HostPorts = nil
+ } else {
+ yyv16 := &x.HostPorts
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ h.decSliceHostPortRange((*[]HostPortRange)(yyv16), d)
+ }
+ }
+ case "hostPID":
+ if r.TryDecodeAsNil() {
+ x.HostPID = false
+ } else {
+ yyv18 := &x.HostPID
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*bool)(yyv18)) = r.DecodeBool()
+ }
+ }
+ case "hostIPC":
+ if r.TryDecodeAsNil() {
+ x.HostIPC = false
+ } else {
+ yyv20 := &x.HostIPC
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ *((*bool)(yyv20)) = r.DecodeBool()
+ }
+ }
+ case "seLinux":
+ if r.TryDecodeAsNil() {
+ x.SELinux = SELinuxStrategyOptions{}
+ } else {
+ yyv22 := &x.SELinux
+ yyv22.CodecDecodeSelf(d)
+ }
+ case "runAsUser":
+ if r.TryDecodeAsNil() {
+ x.RunAsUser = RunAsUserStrategyOptions{}
+ } else {
+ yyv23 := &x.RunAsUser
+ yyv23.CodecDecodeSelf(d)
+ }
+ case "supplementalGroups":
+ if r.TryDecodeAsNil() {
+ x.SupplementalGroups = SupplementalGroupsStrategyOptions{}
+ } else {
+ yyv24 := &x.SupplementalGroups
+ yyv24.CodecDecodeSelf(d)
+ }
+ case "fsGroup":
+ if r.TryDecodeAsNil() {
+ x.FSGroup = FSGroupStrategyOptions{}
+ } else {
+ yyv25 := &x.FSGroup
+ yyv25.CodecDecodeSelf(d)
+ }
+ case "readOnlyRootFilesystem":
+ if r.TryDecodeAsNil() {
+ x.ReadOnlyRootFilesystem = false
+ } else {
+ yyv26 := &x.ReadOnlyRootFilesystem
+ yym27 := z.DecBinary()
+ _ = yym27
+ if false {
+ } else {
+ *((*bool)(yyv26)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj28 int
+ var yyb28 bool
+ var yyhl28 bool = l >= 0
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Privileged = false
+ } else {
+ yyv29 := &x.Privileged
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*bool)(yyv29)) = r.DecodeBool()
+ }
+ }
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DefaultAddCapabilities = nil
+ } else {
+ yyv31 := &x.DefaultAddCapabilities
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv31), d)
+ }
+ }
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RequiredDropCapabilities = nil
+ } else {
+ yyv33 := &x.RequiredDropCapabilities
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv33), d)
+ }
+ }
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.AllowedCapabilities = nil
+ } else {
+ yyv35 := &x.AllowedCapabilities
+ yym36 := z.DecBinary()
+ _ = yym36
+ if false {
+ } else {
+ h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv35), d)
+ }
+ }
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Volumes = nil
+ } else {
+ yyv37 := &x.Volumes
+ yym38 := z.DecBinary()
+ _ = yym38
+ if false {
+ } else {
+ h.decSliceFSType((*[]FSType)(yyv37), d)
+ }
+ }
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostNetwork = false
+ } else {
+ yyv39 := &x.HostNetwork
+ yym40 := z.DecBinary()
+ _ = yym40
+ if false {
+ } else {
+ *((*bool)(yyv39)) = r.DecodeBool()
+ }
+ }
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostPorts = nil
+ } else {
+ yyv41 := &x.HostPorts
+ yym42 := z.DecBinary()
+ _ = yym42
+ if false {
+ } else {
+ h.decSliceHostPortRange((*[]HostPortRange)(yyv41), d)
+ }
+ }
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostPID = false
+ } else {
+ yyv43 := &x.HostPID
+ yym44 := z.DecBinary()
+ _ = yym44
+ if false {
+ } else {
+ *((*bool)(yyv43)) = r.DecodeBool()
+ }
+ }
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostIPC = false
+ } else {
+ yyv45 := &x.HostIPC
+ yym46 := z.DecBinary()
+ _ = yym46
+ if false {
+ } else {
+ *((*bool)(yyv45)) = r.DecodeBool()
+ }
+ }
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SELinux = SELinuxStrategyOptions{}
+ } else {
+ yyv47 := &x.SELinux
+ yyv47.CodecDecodeSelf(d)
+ }
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RunAsUser = RunAsUserStrategyOptions{}
+ } else {
+ yyv48 := &x.RunAsUser
+ yyv48.CodecDecodeSelf(d)
+ }
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SupplementalGroups = SupplementalGroupsStrategyOptions{}
+ } else {
+ yyv49 := &x.SupplementalGroups
+ yyv49.CodecDecodeSelf(d)
+ }
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FSGroup = FSGroupStrategyOptions{}
+ } else {
+ yyv50 := &x.FSGroup
+ yyv50.CodecDecodeSelf(d)
+ }
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnlyRootFilesystem = false
+ } else {
+ yyv51 := &x.ReadOnlyRootFilesystem
+ yym52 := z.DecBinary()
+ _ = yym52
+ if false {
+ } else {
+ *((*bool)(yyv51)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj28-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x FSType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *FSType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *HostPortRange) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Min))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("min"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Min))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Max))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("max"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Max))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HostPortRange) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HostPortRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "min":
+ if r.TryDecodeAsNil() {
+ x.Min = 0
+ } else {
+ yyv4 := &x.Min
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(yyv4)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "max":
+ if r.TryDecodeAsNil() {
+ x.Max = 0
+ } else {
+ yyv6 := &x.Max
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int32)(yyv6)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HostPortRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Min = 0
+ } else {
+ yyv9 := &x.Min
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ *((*int32)(yyv9)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Max = 0
+ } else {
+ yyv11 := &x.Max
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int32)(yyv11)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *SELinuxStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.SELinuxOptions != nil
+ 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_containerArrayElem1234)
+ x.Rule.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rule"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Rule.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.SELinuxOptions == nil {
+ r.EncodeNil()
+ } else {
+ x.SELinuxOptions.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("seLinuxOptions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SELinuxOptions == nil {
+ r.EncodeNil()
+ } else {
+ x.SELinuxOptions.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SELinuxStrategyOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SELinuxStrategyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "rule":
+ if r.TryDecodeAsNil() {
+ x.Rule = ""
+ } else {
+ yyv4 := &x.Rule
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "seLinuxOptions":
+ if r.TryDecodeAsNil() {
+ if x.SELinuxOptions != nil {
+ x.SELinuxOptions = nil
+ }
+ } else {
+ if x.SELinuxOptions == nil {
+ x.SELinuxOptions = new(pkg4_v1.SELinuxOptions)
+ }
+ x.SELinuxOptions.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SELinuxStrategyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Rule = ""
+ } else {
+ yyv7 := &x.Rule
+ yyv7.CodecDecodeSelf(d)
+ }
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SELinuxOptions != nil {
+ x.SELinuxOptions = nil
+ }
+ } else {
+ if x.SELinuxOptions == nil {
+ x.SELinuxOptions = new(pkg4_v1.SELinuxOptions)
+ }
+ x.SELinuxOptions.CodecDecodeSelf(d)
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x SELinuxStrategy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *SELinuxStrategy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *RunAsUserStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Ranges) != 0
+ 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_containerArrayElem1234)
+ x.Rule.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rule"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Rule.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Ranges == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceIDRange(([]IDRange)(x.Ranges), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ranges"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Ranges == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceIDRange(([]IDRange)(x.Ranges), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RunAsUserStrategyOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RunAsUserStrategyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "rule":
+ if r.TryDecodeAsNil() {
+ x.Rule = ""
+ } else {
+ yyv4 := &x.Rule
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "ranges":
+ if r.TryDecodeAsNil() {
+ x.Ranges = nil
+ } else {
+ yyv5 := &x.Ranges
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSliceIDRange((*[]IDRange)(yyv5), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RunAsUserStrategyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Rule = ""
+ } else {
+ yyv8 := &x.Rule
+ yyv8.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Ranges = nil
+ } else {
+ yyv9 := &x.Ranges
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceIDRange((*[]IDRange)(yyv9), d)
+ }
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *IDRange) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Min))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("min"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Min))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Max))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("max"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Max))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *IDRange) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *IDRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "min":
+ if r.TryDecodeAsNil() {
+ x.Min = 0
+ } else {
+ yyv4 := &x.Min
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int64)(yyv4)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "max":
+ if r.TryDecodeAsNil() {
+ x.Max = 0
+ } else {
+ yyv6 := &x.Max
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int64)(yyv6)) = int64(r.DecodeInt(64))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *IDRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Min = 0
+ } else {
+ yyv9 := &x.Min
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ *((*int64)(yyv9)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Max = 0
+ } else {
+ yyv11 := &x.Max
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int64)(yyv11)) = int64(r.DecodeInt(64))
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x RunAsUserStrategy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *RunAsUserStrategy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *FSGroupStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Rule != ""
+ yyq2[1] = len(x.Ranges) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ x.Rule.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rule"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Rule.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Ranges == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceIDRange(([]IDRange)(x.Ranges), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ranges"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Ranges == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceIDRange(([]IDRange)(x.Ranges), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *FSGroupStrategyOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *FSGroupStrategyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "rule":
+ if r.TryDecodeAsNil() {
+ x.Rule = ""
+ } else {
+ yyv4 := &x.Rule
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "ranges":
+ if r.TryDecodeAsNil() {
+ x.Ranges = nil
+ } else {
+ yyv5 := &x.Ranges
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSliceIDRange((*[]IDRange)(yyv5), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *FSGroupStrategyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Rule = ""
+ } else {
+ yyv8 := &x.Rule
+ yyv8.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Ranges = nil
+ } else {
+ yyv9 := &x.Ranges
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceIDRange((*[]IDRange)(yyv9), d)
+ }
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x FSGroupStrategyType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *FSGroupStrategyType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *SupplementalGroupsStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Rule != ""
+ yyq2[1] = len(x.Ranges) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ x.Rule.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rule"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Rule.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Ranges == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceIDRange(([]IDRange)(x.Ranges), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ranges"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Ranges == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceIDRange(([]IDRange)(x.Ranges), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SupplementalGroupsStrategyOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SupplementalGroupsStrategyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "rule":
+ if r.TryDecodeAsNil() {
+ x.Rule = ""
+ } else {
+ yyv4 := &x.Rule
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "ranges":
+ if r.TryDecodeAsNil() {
+ x.Ranges = nil
+ } else {
+ yyv5 := &x.Ranges
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSliceIDRange((*[]IDRange)(yyv5), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SupplementalGroupsStrategyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Rule = ""
+ } else {
+ yyv8 := &x.Rule
+ yyv8.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Ranges = nil
+ } else {
+ yyv9 := &x.Ranges
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceIDRange((*[]IDRange)(yyv9), d)
+ }
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x SupplementalGroupsStrategyType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *SupplementalGroupsStrategyType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *PodSecurityPolicyList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSlicePodSecurityPolicy(([]PodSecurityPolicy)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSlicePodSecurityPolicy(([]PodSecurityPolicy)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodSecurityPolicyList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodSecurityPolicyList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSlicePodSecurityPolicy((*[]PodSecurityPolicy)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodSecurityPolicyList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSlicePodSecurityPolicy((*[]PodSecurityPolicy)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NetworkPolicy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = true
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NetworkPolicy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NetworkPolicy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = NetworkPolicySpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NetworkPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv12 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv14 := &x.APIVersion
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg1_v1.ObjectMeta{}
+ } else {
+ yyv16 := &x.ObjectMeta
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv16) {
+ } else {
+ z.DecFallback(yyv16, false)
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = NetworkPolicySpec{}
+ } else {
+ yyv18 := &x.Spec
+ yyv18.CodecDecodeSelf(d)
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NetworkPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Ingress) != 0
+ 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_containerArrayElem1234)
+ yy4 := &x.PodSelector
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy4) {
+ } else {
+ z.EncFallback(yy4)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.PodSelector
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy6) {
+ } else {
+ z.EncFallback(yy6)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Ingress == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.encSliceNetworkPolicyIngressRule(([]NetworkPolicyIngressRule)(x.Ingress), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ingress"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Ingress == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceNetworkPolicyIngressRule(([]NetworkPolicyIngressRule)(x.Ingress), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NetworkPolicySpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NetworkPolicySpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "podSelector":
+ if r.TryDecodeAsNil() {
+ x.PodSelector = pkg1_v1.LabelSelector{}
+ } else {
+ yyv4 := &x.PodSelector
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "ingress":
+ if r.TryDecodeAsNil() {
+ x.Ingress = nil
+ } else {
+ yyv6 := &x.Ingress
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceNetworkPolicyIngressRule((*[]NetworkPolicyIngressRule)(yyv6), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NetworkPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PodSelector = pkg1_v1.LabelSelector{}
+ } else {
+ yyv9 := &x.PodSelector
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv9) {
+ } else {
+ z.DecFallback(yyv9, false)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Ingress = nil
+ } else {
+ yyv11 := &x.Ingress
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceNetworkPolicyIngressRule((*[]NetworkPolicyIngressRule)(yyv11), d)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NetworkPolicyIngressRule) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Ports) != 0
+ yyq2[1] = len(x.From) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Ports == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceNetworkPolicyPort(([]NetworkPolicyPort)(x.Ports), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ports"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Ports == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceNetworkPolicyPort(([]NetworkPolicyPort)(x.Ports), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.From == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceNetworkPolicyPeer(([]NetworkPolicyPeer)(x.From), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("from"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.From == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceNetworkPolicyPeer(([]NetworkPolicyPeer)(x.From), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NetworkPolicyIngressRule) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NetworkPolicyIngressRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "ports":
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv4 := &x.Ports
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceNetworkPolicyPort((*[]NetworkPolicyPort)(yyv4), d)
+ }
+ }
+ case "from":
+ if r.TryDecodeAsNil() {
+ x.From = nil
+ } else {
+ yyv6 := &x.From
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceNetworkPolicyPeer((*[]NetworkPolicyPeer)(yyv6), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NetworkPolicyIngressRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv9 := &x.Ports
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceNetworkPolicyPort((*[]NetworkPolicyPort)(yyv9), d)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.From = nil
+ } else {
+ yyv11 := &x.From
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceNetworkPolicyPeer((*[]NetworkPolicyPeer)(yyv11), d)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NetworkPolicyPort) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Protocol != nil
+ yyq2[1] = x.Port != 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Protocol == nil {
+ r.EncodeNil()
+ } else {
+ yy4 := *x.Protocol
+ yysf5 := &yy4
+ yysf5.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("protocol"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Protocol == nil {
+ r.EncodeNil()
+ } else {
+ yy6 := *x.Protocol
+ yysf7 := &yy6
+ yysf7.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Port == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Port) {
+ } else if !yym9 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.Port)
+ } else {
+ z.EncFallback(x.Port)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("port"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Port == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Port) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.Port)
+ } else {
+ z.EncFallback(x.Port)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NetworkPolicyPort) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NetworkPolicyPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "protocol":
+ if r.TryDecodeAsNil() {
+ if x.Protocol != nil {
+ x.Protocol = nil
+ }
+ } else {
+ if x.Protocol == nil {
+ x.Protocol = new(pkg4_v1.Protocol)
+ }
+ x.Protocol.CodecDecodeSelf(d)
+ }
+ case "port":
+ if r.TryDecodeAsNil() {
+ if x.Port != nil {
+ x.Port = nil
+ }
+ } else {
+ if x.Port == nil {
+ x.Port = new(pkg5_intstr.IntOrString)
+ }
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Port) {
+ } else if !yym6 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.Port)
+ } else {
+ z.DecFallback(x.Port, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NetworkPolicyPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Protocol != nil {
+ x.Protocol = nil
+ }
+ } else {
+ if x.Protocol == nil {
+ x.Protocol = new(pkg4_v1.Protocol)
+ }
+ x.Protocol.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Port != nil {
+ x.Port = nil
+ }
+ } else {
+ if x.Port == nil {
+ x.Port = new(pkg5_intstr.IntOrString)
+ }
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Port) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.Port)
+ } else {
+ z.DecFallback(x.Port, false)
+ }
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NetworkPolicyPeer) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.PodSelector != nil
+ yyq2[1] = x.NamespaceSelector != 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.PodSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.PodSelector) {
+ } else {
+ z.EncFallback(x.PodSelector)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PodSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.PodSelector) {
+ } else {
+ z.EncFallback(x.PodSelector)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.NamespaceSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.NamespaceSelector) {
+ } else {
+ z.EncFallback(x.NamespaceSelector)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("namespaceSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NamespaceSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.NamespaceSelector) {
+ } else {
+ z.EncFallback(x.NamespaceSelector)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NetworkPolicyPeer) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NetworkPolicyPeer) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "podSelector":
+ if r.TryDecodeAsNil() {
+ if x.PodSelector != nil {
+ x.PodSelector = nil
+ }
+ } else {
+ if x.PodSelector == nil {
+ x.PodSelector = new(pkg1_v1.LabelSelector)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.PodSelector) {
+ } else {
+ z.DecFallback(x.PodSelector, false)
+ }
+ }
+ case "namespaceSelector":
+ if r.TryDecodeAsNil() {
+ if x.NamespaceSelector != nil {
+ x.NamespaceSelector = nil
+ }
+ } else {
+ if x.NamespaceSelector == nil {
+ x.NamespaceSelector = new(pkg1_v1.LabelSelector)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.NamespaceSelector) {
+ } else {
+ z.DecFallback(x.NamespaceSelector, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NetworkPolicyPeer) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PodSelector != nil {
+ x.PodSelector = nil
+ }
+ } else {
+ if x.PodSelector == nil {
+ x.PodSelector = new(pkg1_v1.LabelSelector)
+ }
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.PodSelector) {
+ } else {
+ z.DecFallback(x.PodSelector, false)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.NamespaceSelector != nil {
+ x.NamespaceSelector = nil
+ }
+ } else {
+ if x.NamespaceSelector == nil {
+ x.NamespaceSelector = new(pkg1_v1.LabelSelector)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.NamespaceSelector) {
+ } else {
+ z.DecFallback(x.NamespaceSelector, false)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NetworkPolicyList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceNetworkPolicy(([]NetworkPolicy)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceNetworkPolicy(([]NetworkPolicy)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NetworkPolicyList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NetworkPolicyList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceNetworkPolicy((*[]NetworkPolicy)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NetworkPolicyList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceNetworkPolicy((*[]NetworkPolicy)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encSliceCustomMetricTarget(v []CustomMetricTarget, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceCustomMetricTarget(v *[]CustomMetricTarget, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []CustomMetricTarget{}
+ 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([]CustomMetricTarget, yyrl1)
+ }
+ } else {
+ yyv1 = make([]CustomMetricTarget, 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] = CustomMetricTarget{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, CustomMetricTarget{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = CustomMetricTarget{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, CustomMetricTarget{}) // var yyz1 CustomMetricTarget
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = CustomMetricTarget{}
+ } 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 = []CustomMetricTarget{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceCustomMetricCurrentStatus(v []CustomMetricCurrentStatus, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceCustomMetricCurrentStatus(v *[]CustomMetricCurrentStatus, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []CustomMetricCurrentStatus{}
+ 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([]CustomMetricCurrentStatus, yyrl1)
+ }
+ } else {
+ yyv1 = make([]CustomMetricCurrentStatus, 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] = CustomMetricCurrentStatus{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, CustomMetricCurrentStatus{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = CustomMetricCurrentStatus{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, CustomMetricCurrentStatus{}) // var yyz1 CustomMetricCurrentStatus
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = CustomMetricCurrentStatus{}
+ } 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 = []CustomMetricCurrentStatus{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceAPIVersion(v []APIVersion, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceAPIVersion(v *[]APIVersion, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []APIVersion{}
+ 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, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]APIVersion, yyrl1)
+ }
+ } else {
+ yyv1 = make([]APIVersion, 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] = APIVersion{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, APIVersion{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = APIVersion{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, APIVersion{}) // var yyz1 APIVersion
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = APIVersion{}
+ } 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 = []APIVersion{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceThirdPartyResource(v []ThirdPartyResource, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceThirdPartyResource(v *[]ThirdPartyResource, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ThirdPartyResource{}
+ 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, 304)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ThirdPartyResource, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ThirdPartyResource, 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] = ThirdPartyResource{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ThirdPartyResource{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ThirdPartyResource{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ThirdPartyResource{}) // var yyz1 ThirdPartyResource
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ThirdPartyResource{}
+ } 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 = []ThirdPartyResource{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceDeploymentCondition(v []DeploymentCondition, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceDeploymentCondition(v *[]DeploymentCondition, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []DeploymentCondition{}
+ 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, 112)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]DeploymentCondition, yyrl1)
+ }
+ } else {
+ yyv1 = make([]DeploymentCondition, 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] = DeploymentCondition{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, DeploymentCondition{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = DeploymentCondition{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, DeploymentCondition{}) // var yyz1 DeploymentCondition
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = DeploymentCondition{}
+ } 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 = []DeploymentCondition{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceDeployment(v []Deployment, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceDeployment(v *[]Deployment, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Deployment{}
+ 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, 968)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Deployment, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Deployment, 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] = Deployment{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Deployment{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Deployment{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Deployment{}) // var yyz1 Deployment
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Deployment{}
+ } 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 = []Deployment{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceDaemonSet(v []DaemonSet, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceDaemonSet(v *[]DaemonSet, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []DaemonSet{}
+ 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, 928)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]DaemonSet, yyrl1)
+ }
+ } else {
+ yyv1 = make([]DaemonSet, 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] = DaemonSet{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, DaemonSet{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = DaemonSet{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, DaemonSet{}) // var yyz1 DaemonSet
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = DaemonSet{}
+ } 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 = []DaemonSet{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceThirdPartyResourceData(v []ThirdPartyResourceData, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceThirdPartyResourceData(v *[]ThirdPartyResourceData, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ThirdPartyResourceData{}
+ 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, 288)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ThirdPartyResourceData, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ThirdPartyResourceData, 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] = ThirdPartyResourceData{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ThirdPartyResourceData{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ThirdPartyResourceData{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ThirdPartyResourceData{}) // var yyz1 ThirdPartyResourceData
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ThirdPartyResourceData{}
+ } 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 = []ThirdPartyResourceData{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceIngress(v []Ingress, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceIngress(v *[]Ingress, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Ingress{}
+ 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, 344)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Ingress, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Ingress, 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] = Ingress{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Ingress{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Ingress{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Ingress{}) // var yyz1 Ingress
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Ingress{}
+ } 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 = []Ingress{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceIngressTLS(v []IngressTLS, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceIngressTLS(v *[]IngressTLS, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []IngressTLS{}
+ 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, 40)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]IngressTLS, yyrl1)
+ }
+ } else {
+ yyv1 = make([]IngressTLS, 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] = IngressTLS{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, IngressTLS{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = IngressTLS{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, IngressTLS{}) // var yyz1 IngressTLS
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = IngressTLS{}
+ } 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 = []IngressTLS{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceIngressRule(v []IngressRule, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceIngressRule(v *[]IngressRule, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []IngressRule{}
+ 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, 24)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]IngressRule, yyrl1)
+ }
+ } else {
+ yyv1 = make([]IngressRule, 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] = IngressRule{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, IngressRule{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = IngressRule{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, IngressRule{}) // var yyz1 IngressRule
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = IngressRule{}
+ } 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 = []IngressRule{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceHTTPIngressPath(v []HTTPIngressPath, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceHTTPIngressPath(v *[]HTTPIngressPath, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []HTTPIngressPath{}
+ 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, 64)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]HTTPIngressPath, yyrl1)
+ }
+ } else {
+ yyv1 = make([]HTTPIngressPath, 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] = HTTPIngressPath{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, HTTPIngressPath{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = HTTPIngressPath{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, HTTPIngressPath{}) // var yyz1 HTTPIngressPath
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = HTTPIngressPath{}
+ } 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 = []HTTPIngressPath{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceReplicaSet(v []ReplicaSet, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceReplicaSet(v *[]ReplicaSet, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ReplicaSet{}
+ 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, 896)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ReplicaSet, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ReplicaSet, 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] = ReplicaSet{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ReplicaSet{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ReplicaSet{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ReplicaSet{}) // var yyz1 ReplicaSet
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ReplicaSet{}
+ } 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 = []ReplicaSet{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceReplicaSetCondition(v []ReplicaSetCondition, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceReplicaSetCondition(v *[]ReplicaSetCondition, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ReplicaSetCondition{}
+ 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, 88)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ReplicaSetCondition, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ReplicaSetCondition, 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] = ReplicaSetCondition{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ReplicaSetCondition{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ReplicaSetCondition{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ReplicaSetCondition{}) // var yyz1 ReplicaSetCondition
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ReplicaSetCondition{}
+ } 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 = []ReplicaSetCondition{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSlicev1_Capability(v []pkg4_v1.Capability, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yysf2 := &yyv1
+ yysf2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicev1_Capability(v *[]pkg4_v1.Capability, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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.Capability{}
+ 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) {
+
+ yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]pkg4_v1.Capability, yyrl1)
+ }
+ } else {
+ yyv1 = make([]pkg4_v1.Capability, yyrl1)
+ }
+ yyc1 = true
+ yyrr1 = len(yyv1)
+ } else if yyl1 != len(yyv1) {
+ yyv1 = yyv1[:yyl1]
+ yyc1 = true
+ }
+ yyj1 := 0
+ for ; yyj1 < yyrr1; yyj1++ {
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, "") // var yyz1 pkg4_v1.Capability
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } 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.Capability{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceFSType(v []FSType, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yyv1.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceFSType(v *[]FSType, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []FSType{}
+ 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) {
+
+ yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]FSType, yyrl1)
+ }
+ } else {
+ yyv1 = make([]FSType, yyrl1)
+ }
+ yyc1 = true
+ yyrr1 = len(yyv1)
+ } else if yyl1 != len(yyv1) {
+ yyv1 = yyv1[:yyl1]
+ yyc1 = true
+ }
+ yyj1 := 0
+ for ; yyj1 < yyrr1; yyj1++ {
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, "") // var yyz1 FSType
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } 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 = []FSType{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceHostPortRange(v []HostPortRange, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceHostPortRange(v *[]HostPortRange, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []HostPortRange{}
+ 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, 8)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]HostPortRange, yyrl1)
+ }
+ } else {
+ yyv1 = make([]HostPortRange, 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] = HostPortRange{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, HostPortRange{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = HostPortRange{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, HostPortRange{}) // var yyz1 HostPortRange
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = HostPortRange{}
+ } 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 = []HostPortRange{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceIDRange(v []IDRange, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceIDRange(v *[]IDRange, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []IDRange{}
+ 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, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]IDRange, yyrl1)
+ }
+ } else {
+ yyv1 = make([]IDRange, 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] = IDRange{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, IDRange{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = IDRange{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, IDRange{}) // var yyz1 IDRange
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = IDRange{}
+ } 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 = []IDRange{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSlicePodSecurityPolicy(v []PodSecurityPolicy, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicePodSecurityPolicy(v *[]PodSecurityPolicy, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []PodSecurityPolicy{}
+ 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, 560)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]PodSecurityPolicy, yyrl1)
+ }
+ } else {
+ yyv1 = make([]PodSecurityPolicy, 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] = PodSecurityPolicy{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, PodSecurityPolicy{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PodSecurityPolicy{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, PodSecurityPolicy{}) // var yyz1 PodSecurityPolicy
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PodSecurityPolicy{}
+ } 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 = []PodSecurityPolicy{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceNetworkPolicyIngressRule(v []NetworkPolicyIngressRule, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceNetworkPolicyIngressRule(v *[]NetworkPolicyIngressRule, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []NetworkPolicyIngressRule{}
+ 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, 48)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]NetworkPolicyIngressRule, yyrl1)
+ }
+ } else {
+ yyv1 = make([]NetworkPolicyIngressRule, 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] = NetworkPolicyIngressRule{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, NetworkPolicyIngressRule{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicyIngressRule{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, NetworkPolicyIngressRule{}) // var yyz1 NetworkPolicyIngressRule
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicyIngressRule{}
+ } 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 = []NetworkPolicyIngressRule{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceNetworkPolicyPort(v []NetworkPolicyPort, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceNetworkPolicyPort(v *[]NetworkPolicyPort, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []NetworkPolicyPort{}
+ 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, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]NetworkPolicyPort, yyrl1)
+ }
+ } else {
+ yyv1 = make([]NetworkPolicyPort, 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] = NetworkPolicyPort{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, NetworkPolicyPort{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicyPort{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, NetworkPolicyPort{}) // var yyz1 NetworkPolicyPort
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicyPort{}
+ } 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 = []NetworkPolicyPort{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceNetworkPolicyPeer(v []NetworkPolicyPeer, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceNetworkPolicyPeer(v *[]NetworkPolicyPeer, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []NetworkPolicyPeer{}
+ 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, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]NetworkPolicyPeer, yyrl1)
+ }
+ } else {
+ yyv1 = make([]NetworkPolicyPeer, 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] = NetworkPolicyPeer{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, NetworkPolicyPeer{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicyPeer{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, NetworkPolicyPeer{}) // var yyz1 NetworkPolicyPeer
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicyPeer{}
+ } 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 = []NetworkPolicyPeer{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceNetworkPolicy(v []NetworkPolicy, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceNetworkPolicy(v *[]NetworkPolicy, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []NetworkPolicy{}
+ 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, 320)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]NetworkPolicy, yyrl1)
+ }
+ } else {
+ yyv1 = make([]NetworkPolicy, 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] = NetworkPolicy{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, NetworkPolicy{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicy{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, NetworkPolicy{}) // var yyz1 NetworkPolicy
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicy{}
+ } 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 = []NetworkPolicy{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.go b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.go
new file mode 100644
index 000000000..8f5ad4807
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.go
@@ -0,0 +1,1171 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "k8s.io/apimachinery/pkg/api/resource"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/util/intstr"
+ "k8s.io/client-go/pkg/api/v1"
+ appsv1beta1 "k8s.io/client-go/pkg/apis/apps/v1beta1"
+)
+
+// describes the attributes of a scale subresource
+type ScaleSpec struct {
+ // desired number of instances for the scaled object.
+ // +optional
+ Replicas int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
+}
+
+// represents the current status of a scale subresource.
+type ScaleStatus struct {
+ // actual number of observed instances of the scaled object.
+ Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"`
+
+ // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
+ // +optional
+ Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,2,rep,name=selector"`
+
+ // label selector for pods that should match the replicas count. This is a serializated
+ // version of both map-based and more expressive set-based selectors. This is done to
+ // avoid introspection in the clients. The string will be in the same format as the
+ // query-param syntax. If the target type only supports map-based selectors, both this
+ // field and map-based selector field are populated.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ TargetSelector string `json:"targetSelector,omitempty" protobuf:"bytes,3,opt,name=targetSelector"`
+}
+
+// +genclient=true
+// +noMethods=true
+
+// represents a scaling request for a resource.
+type Scale struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
+ // +optional
+ Spec ScaleSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.
+ // +optional
+ Status ScaleStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// Dummy definition
+type ReplicationControllerDummy struct {
+ metav1.TypeMeta `json:",inline"`
+}
+
+// Alpha-level support for Custom Metrics in HPA (as annotations).
+type CustomMetricTarget struct {
+ // Custom Metric name.
+ Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
+ // Custom Metric value (average).
+ TargetValue resource.Quantity `json:"value" protobuf:"bytes,2,opt,name=value"`
+}
+
+type CustomMetricTargetList struct {
+ Items []CustomMetricTarget `json:"items" protobuf:"bytes,1,rep,name=items"`
+}
+
+type CustomMetricCurrentStatus struct {
+ // Custom Metric name.
+ Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
+ // Custom Metric value (average).
+ CurrentValue resource.Quantity `json:"value" protobuf:"bytes,2,opt,name=value"`
+}
+
+type CustomMetricCurrentStatusList struct {
+ Items []CustomMetricCurrentStatus `json:"items" protobuf:"bytes,1,rep,name=items"`
+}
+
+// +genclient=true
+// +nonNamespaced=true
+
+// A ThirdPartyResource is a generic representation of a resource, it is used by add-ons and plugins to add new resource
+// types to the API. It consists of one or more Versions of the api.
+type ThirdPartyResource struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // Standard object metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Description is the description of this object.
+ // +optional
+ Description string `json:"description,omitempty" protobuf:"bytes,2,opt,name=description"`
+
+ // Versions are versions for this third party object
+ // +optional
+ Versions []APIVersion `json:"versions,omitempty" protobuf:"bytes,3,rep,name=versions"`
+}
+
+// ThirdPartyResourceList is a list of ThirdPartyResources.
+type ThirdPartyResourceList struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // Standard list metadata.
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of ThirdPartyResources.
+ Items []ThirdPartyResource `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// An APIVersion represents a single concrete version of an object model.
+type APIVersion struct {
+ // Name of this version (e.g. 'v1').
+ // +optional
+ Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
+}
+
+// An internal object, used for versioned storage in etcd. Not exposed to the end user.
+type ThirdPartyResourceData struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Data is the raw JSON data for this data.
+ // +optional
+ Data []byte `json:"data,omitempty" protobuf:"bytes,2,opt,name=data"`
+}
+
+// +genclient=true
+
+// Deployment enables declarative updates for Pods and ReplicaSets.
+type Deployment struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Specification of the desired behavior of the Deployment.
+ // +optional
+ Spec DeploymentSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Most recently observed status of the Deployment.
+ // +optional
+ Status DeploymentStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// DeploymentSpec is the specification of the desired behavior of the Deployment.
+type DeploymentSpec struct {
+ // Number of desired pods. This is a pointer to distinguish between explicit
+ // zero and not specified. Defaults to 1.
+ // +optional
+ Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
+
+ // Label selector for pods. Existing ReplicaSets whose pods are
+ // selected by this will be the ones affected by this deployment.
+ // +optional
+ Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
+
+ // Template describes the pods that will be created.
+ Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"`
+
+ // The deployment strategy to use to replace existing pods with new ones.
+ // +optional
+ Strategy DeploymentStrategy `json:"strategy,omitempty" protobuf:"bytes,4,opt,name=strategy"`
+
+ // Minimum number of seconds for which a newly created pod should be ready
+ // without any of its container crashing, for it to be considered available.
+ // Defaults to 0 (pod will be considered available as soon as it is ready)
+ // +optional
+ MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,5,opt,name=minReadySeconds"`
+
+ // The number of old ReplicaSets to retain to allow rollback.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ // +optional
+ RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,6,opt,name=revisionHistoryLimit"`
+
+ // Indicates that the deployment is paused and will not be processed by the
+ // deployment controller.
+ // +optional
+ Paused bool `json:"paused,omitempty" protobuf:"varint,7,opt,name=paused"`
+
+ // The config this deployment is rolling back to. Will be cleared after rollback is done.
+ // +optional
+ RollbackTo *RollbackConfig `json:"rollbackTo,omitempty" protobuf:"bytes,8,opt,name=rollbackTo"`
+
+ // The maximum time in seconds for a deployment to make progress before it
+ // is considered to be failed. The deployment controller will continue to
+ // process failed deployments and a condition with a ProgressDeadlineExceeded
+ // reason will be surfaced in the deployment status. Once autoRollback is
+ // implemented, the deployment controller will automatically rollback failed
+ // deployments. Note that progress will not be estimated during the time a
+ // deployment is paused. This is not set by default.
+ ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty" protobuf:"varint,9,opt,name=progressDeadlineSeconds"`
+}
+
+// DeploymentRollback stores the information required to rollback a deployment.
+type DeploymentRollback struct {
+ metav1.TypeMeta `json:",inline"`
+ // Required: This must match the Name of a deployment.
+ Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
+ // The annotations to be updated to a deployment
+ // +optional
+ UpdatedAnnotations map[string]string `json:"updatedAnnotations,omitempty" protobuf:"bytes,2,rep,name=updatedAnnotations"`
+ // The config of this deployment rollback.
+ RollbackTo RollbackConfig `json:"rollbackTo" protobuf:"bytes,3,opt,name=rollbackTo"`
+}
+
+type RollbackConfig struct {
+ // The revision to rollback to. If set to 0, rollback to the last revision.
+ // +optional
+ Revision int64 `json:"revision,omitempty" protobuf:"varint,1,opt,name=revision"`
+}
+
+const (
+ // DefaultDeploymentUniqueLabelKey is the default key of the selector that is added
+ // to existing RCs (and label key that is added to its pods) to prevent the existing RCs
+ // to select new pods (and old pods being select by new RC).
+ DefaultDeploymentUniqueLabelKey string = "pod-template-hash"
+)
+
+// DeploymentStrategy describes how to replace existing pods with new ones.
+type DeploymentStrategy struct {
+ // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
+ // +optional
+ Type DeploymentStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=DeploymentStrategyType"`
+
+ // Rolling update config params. Present only if DeploymentStrategyType =
+ // RollingUpdate.
+ //---
+ // TODO: Update this to follow our convention for oneOf, whatever we decide it
+ // to be.
+ // +optional
+ RollingUpdate *RollingUpdateDeployment `json:"rollingUpdate,omitempty" protobuf:"bytes,2,opt,name=rollingUpdate"`
+}
+
+type DeploymentStrategyType string
+
+const (
+ // Kill all existing pods before creating new ones.
+ RecreateDeploymentStrategyType DeploymentStrategyType = "Recreate"
+
+ // Replace the old RCs by new one using rolling update i.e gradually scale down the old RCs and scale up the new one.
+ RollingUpdateDeploymentStrategyType DeploymentStrategyType = "RollingUpdate"
+)
+
+// Spec to control the desired behavior of rolling update.
+type RollingUpdateDeployment struct {
+ // The maximum number of pods that can be unavailable during the update.
+ // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
+ // Absolute number is calculated from percentage by rounding down.
+ // This can not be 0 if MaxSurge is 0.
+ // By default, a fixed value of 1 is used.
+ // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods
+ // immediately when the rolling update starts. Once new pods are ready, old RC
+ // can be scaled down further, followed by scaling up the new RC, ensuring
+ // that the total number of pods available at all times during the update is at
+ // least 70% of desired pods.
+ // +optional
+ MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,1,opt,name=maxUnavailable"`
+
+ // The maximum number of pods that can be scheduled above the desired number of
+ // pods.
+ // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
+ // This can not be 0 if MaxUnavailable is 0.
+ // Absolute number is calculated from percentage by rounding up.
+ // By default, a value of 1 is used.
+ // Example: when this is set to 30%, the new RC can be scaled up immediately when
+ // the rolling update starts, such that the total number of old and new pods do not exceed
+ // 130% of desired pods. Once old pods have been killed,
+ // new RC can be scaled up further, ensuring that total number of pods running
+ // at any time during the update is atmost 130% of desired pods.
+ // +optional
+ MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty" protobuf:"bytes,2,opt,name=maxSurge"`
+}
+
+// DeploymentStatus is the most recently observed status of the Deployment.
+type DeploymentStatus struct {
+ // The generation observed by the deployment controller.
+ // +optional
+ ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
+
+ // Total number of non-terminated pods targeted by this deployment (their labels match the selector).
+ // +optional
+ Replicas int32 `json:"replicas,omitempty" protobuf:"varint,2,opt,name=replicas"`
+
+ // Total number of non-terminated pods targeted by this deployment that have the desired template spec.
+ // +optional
+ UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,3,opt,name=updatedReplicas"`
+
+ // Total number of ready pods targeted by this deployment.
+ // +optional
+ ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,7,opt,name=readyReplicas"`
+
+ // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
+ // +optional
+ AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,4,opt,name=availableReplicas"`
+
+ // Total number of unavailable pods targeted by this deployment.
+ // +optional
+ UnavailableReplicas int32 `json:"unavailableReplicas,omitempty" protobuf:"varint,5,opt,name=unavailableReplicas"`
+
+ // Represents the latest available observations of a deployment's current state.
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ Conditions []DeploymentCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"`
+
+ // Count of hash collisions for the Deployment. The Deployment controller uses this
+ // field as a collision avoidance mechanism when it needs to create the name for the
+ // newest ReplicaSet.
+ // +optional
+ CollisionCount *int64 `json:"collisionCount,omitempty" protobuf:"varint,8,opt,name=collisionCount"`
+}
+
+type DeploymentConditionType string
+
+// These are valid conditions of a deployment.
+const (
+ // Available means the deployment is available, ie. at least the minimum available
+ // replicas required are up and running for at least minReadySeconds.
+ DeploymentAvailable DeploymentConditionType = "Available"
+ // Progressing means the deployment is progressing. Progress for a deployment is
+ // considered when a new replica set is created or adopted, and when new pods scale
+ // up or old pods scale down. Progress is not estimated for paused deployments or
+ // when progressDeadlineSeconds is not specified.
+ DeploymentProgressing DeploymentConditionType = "Progressing"
+ // ReplicaFailure is added in a deployment when one of its pods fails to be created
+ // or deleted.
+ DeploymentReplicaFailure DeploymentConditionType = "ReplicaFailure"
+)
+
+// DeploymentCondition describes the state of a deployment at a certain point.
+type DeploymentCondition struct {
+ // Type of deployment condition.
+ Type DeploymentConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=DeploymentConditionType"`
+ // Status of the condition, one of True, False, Unknown.
+ Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"`
+ // The last time this condition was updated.
+ LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,6,opt,name=lastUpdateTime"`
+ // Last time the condition transitioned from one status to another.
+ LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,7,opt,name=lastTransitionTime"`
+ // The reason for the condition's last transition.
+ Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
+ // A human readable message indicating details about the transition.
+ Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
+}
+
+// DeploymentList is a list of Deployments.
+type DeploymentList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of Deployments.
+ Items []Deployment `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+type DaemonSetUpdateStrategy struct {
+ // Type of daemon set update. Can be "RollingUpdate" or "OnDelete".
+ // Default is OnDelete.
+ // +optional
+ Type DaemonSetUpdateStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type"`
+
+ // Rolling update config params. Present only if type = "RollingUpdate".
+ //---
+ // TODO: Update this to follow our convention for oneOf, whatever we decide it
+ // to be. Same as Deployment `strategy.rollingUpdate`.
+ // See https://github.com/kubernetes/kubernetes/issues/35345
+ // +optional
+ RollingUpdate *RollingUpdateDaemonSet `json:"rollingUpdate,omitempty" protobuf:"bytes,2,opt,name=rollingUpdate"`
+}
+
+type DaemonSetUpdateStrategyType string
+
+const (
+ // Replace the old daemons by new ones using rolling update i.e replace them on each node one after the other.
+ RollingUpdateDaemonSetStrategyType DaemonSetUpdateStrategyType = "RollingUpdate"
+
+ // Replace the old daemons only when it's killed
+ OnDeleteDaemonSetStrategyType DaemonSetUpdateStrategyType = "OnDelete"
+)
+
+// Spec to control the desired behavior of daemon set rolling update.
+type RollingUpdateDaemonSet struct {
+ // The maximum number of DaemonSet pods that can be unavailable during the
+ // update. Value can be an absolute number (ex: 5) or a percentage of total
+ // number of DaemonSet pods at the start of the update (ex: 10%). Absolute
+ // number is calculated from percentage by rounding up.
+ // This cannot be 0.
+ // Default value is 1.
+ // Example: when this is set to 30%, at most 30% of the total number of nodes
+ // that should be running the daemon pod (i.e. status.desiredNumberScheduled)
+ // can have their pods stopped for an update at any given
+ // time. The update starts by stopping at most 30% of those DaemonSet pods
+ // and then brings up new DaemonSet pods in their place. Once the new pods
+ // are available, it then proceeds onto other DaemonSet pods, thus ensuring
+ // that at least 70% of original number of DaemonSet pods are available at
+ // all times during the update.
+ // +optional
+ MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,1,opt,name=maxUnavailable"`
+}
+
+// DaemonSetSpec is the specification of a daemon set.
+type DaemonSetSpec struct {
+ // A label query over pods that are managed by the daemon set.
+ // Must match in order to be controlled.
+ // If empty, defaulted to labels on Pod template.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,1,opt,name=selector"`
+
+ // An object that describes the pod that will be created.
+ // The DaemonSet will create exactly one copy of this pod on every node
+ // that matches the template's node selector (or on every node if no node
+ // selector is specified).
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
+ Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,2,opt,name=template"`
+
+ // An update strategy to replace existing DaemonSet pods with new pods.
+ // +optional
+ UpdateStrategy DaemonSetUpdateStrategy `json:"updateStrategy,omitempty" protobuf:"bytes,3,opt,name=updateStrategy"`
+
+ // The minimum number of seconds for which a newly created DaemonSet pod should
+ // be ready without any of its container crashing, for it to be considered
+ // available. Defaults to 0 (pod will be considered available as soon as it
+ // is ready).
+ // +optional
+ MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,4,opt,name=minReadySeconds"`
+
+ // DEPRECATED.
+ // A sequence number representing a specific generation of the template.
+ // Populated by the system. It can be set only during the creation.
+ // +optional
+ TemplateGeneration int64 `json:"templateGeneration,omitempty" protobuf:"varint,5,opt,name=templateGeneration"`
+
+ // The number of old history to retain to allow rollback.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ // Defaults to 10.
+ // +optional
+ RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,6,opt,name=revisionHistoryLimit"`
+}
+
+// DaemonSetStatus represents the current status of a daemon set.
+type DaemonSetStatus struct {
+ // The number of nodes that are running at least 1
+ // daemon pod and are supposed to run the daemon pod.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
+ CurrentNumberScheduled int32 `json:"currentNumberScheduled" protobuf:"varint,1,opt,name=currentNumberScheduled"`
+
+ // The number of nodes that are running the daemon pod, but are
+ // not supposed to run the daemon pod.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
+ NumberMisscheduled int32 `json:"numberMisscheduled" protobuf:"varint,2,opt,name=numberMisscheduled"`
+
+ // The total number of nodes that should be running the daemon
+ // pod (including nodes correctly running the daemon pod).
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
+ DesiredNumberScheduled int32 `json:"desiredNumberScheduled" protobuf:"varint,3,opt,name=desiredNumberScheduled"`
+
+ // The number of nodes that should be running the daemon pod and have one
+ // or more of the daemon pod running and ready.
+ NumberReady int32 `json:"numberReady" protobuf:"varint,4,opt,name=numberReady"`
+
+ // The most recent generation observed by the daemon set controller.
+ // +optional
+ ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,5,opt,name=observedGeneration"`
+
+ // The total number of nodes that are running updated daemon pod
+ // +optional
+ UpdatedNumberScheduled int32 `json:"updatedNumberScheduled,omitempty" protobuf:"varint,6,opt,name=updatedNumberScheduled"`
+
+ // The number of nodes that should be running the
+ // daemon pod and have one or more of the daemon pod running and
+ // available (ready for at least spec.minReadySeconds)
+ // +optional
+ NumberAvailable int32 `json:"numberAvailable,omitempty" protobuf:"varint,7,opt,name=numberAvailable"`
+
+ // The number of nodes that should be running the
+ // daemon pod and have none of the daemon pod running and available
+ // (ready for at least spec.minReadySeconds)
+ // +optional
+ NumberUnavailable int32 `json:"numberUnavailable,omitempty" protobuf:"varint,8,opt,name=numberUnavailable"`
+
+ // Count of hash collisions for the DaemonSet. The DaemonSet controller
+ // uses this field as a collision avoidance mechanism when it needs to
+ // create the name for the newest ControllerRevision.
+ // +optional
+ CollisionCount *int64 `json:"collisionCount,omitempty" protobuf:"varint,9,opt,name=collisionCount"`
+}
+
+// +genclient=true
+
+// DaemonSet represents the configuration of a daemon set.
+type DaemonSet struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // The desired behavior of this daemon set.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec DaemonSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // The current status of this daemon set. This data may be
+ // out of date by some window of time.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status DaemonSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+const (
+ // DEPRECATED: DefaultDaemonSetUniqueLabelKey is used instead.
+ // DaemonSetTemplateGenerationKey is the key of the labels that is added
+ // to daemon set pods to distinguish between old and new pod templates
+ // during DaemonSet template update.
+ DaemonSetTemplateGenerationKey string = "pod-template-generation"
+
+ // DefaultDaemonSetUniqueLabelKey is the default label key that is added
+ // to existing DaemonSet pods to distinguish between old and new
+ // DaemonSet pods during DaemonSet template updates.
+ DefaultDaemonSetUniqueLabelKey = appsv1beta1.ControllerRevisionHashLabelKey
+)
+
+// DaemonSetList is a collection of daemon sets.
+type DaemonSetList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // A list of daemon sets.
+ Items []DaemonSet `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// ThirdPartyResrouceDataList is a list of ThirdPartyResourceData.
+type ThirdPartyResourceDataList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of ThirdpartyResourceData.
+ Items []ThirdPartyResourceData `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// +genclient=true
+
+// Ingress is a collection of rules that allow inbound connections to reach the
+// endpoints defined by a backend. An Ingress can be configured to give services
+// externally-reachable urls, load balance traffic, terminate SSL, offer name
+// based virtual hosting etc.
+type Ingress struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec is the desired state of the Ingress.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec IngressSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is the current state of the Ingress.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status IngressStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// IngressList is a collection of Ingress.
+type IngressList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of Ingress.
+ Items []Ingress `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// IngressSpec describes the Ingress the user wishes to exist.
+type IngressSpec struct {
+ // A default backend capable of servicing requests that don't match any
+ // rule. At least one of 'backend' or 'rules' must be specified. This field
+ // is optional to allow the loadbalancer controller or defaulting logic to
+ // specify a global default.
+ // +optional
+ Backend *IngressBackend `json:"backend,omitempty" protobuf:"bytes,1,opt,name=backend"`
+
+ // TLS configuration. Currently the Ingress only supports a single TLS
+ // port, 443. If multiple members of this list specify different hosts, they
+ // will be multiplexed on the same port according to the hostname specified
+ // through the SNI TLS extension, if the ingress controller fulfilling the
+ // ingress supports SNI.
+ // +optional
+ TLS []IngressTLS `json:"tls,omitempty" protobuf:"bytes,2,rep,name=tls"`
+
+ // A list of host rules used to configure the Ingress. If unspecified, or
+ // no rule matches, all traffic is sent to the default backend.
+ // +optional
+ Rules []IngressRule `json:"rules,omitempty" protobuf:"bytes,3,rep,name=rules"`
+ // TODO: Add the ability to specify load-balancer IP through claims
+}
+
+// IngressTLS describes the transport layer security associated with an Ingress.
+type IngressTLS struct {
+ // Hosts are a list of hosts included in the TLS certificate. The values in
+ // this list must match the name/s used in the tlsSecret. Defaults to the
+ // wildcard host setting for the loadbalancer controller fulfilling this
+ // Ingress, if left unspecified.
+ // +optional
+ Hosts []string `json:"hosts,omitempty" protobuf:"bytes,1,rep,name=hosts"`
+ // SecretName is the name of the secret used to terminate SSL traffic on 443.
+ // Field is left optional to allow SSL routing based on SNI hostname alone.
+ // If the SNI host in a listener conflicts with the "Host" header field used
+ // by an IngressRule, the SNI host is used for termination and value of the
+ // Host header is used for routing.
+ // +optional
+ SecretName string `json:"secretName,omitempty" protobuf:"bytes,2,opt,name=secretName"`
+ // TODO: Consider specifying different modes of termination, protocols etc.
+}
+
+// IngressStatus describe the current state of the Ingress.
+type IngressStatus struct {
+ // LoadBalancer contains the current status of the load-balancer.
+ // +optional
+ LoadBalancer v1.LoadBalancerStatus `json:"loadBalancer,omitempty" protobuf:"bytes,1,opt,name=loadBalancer"`
+}
+
+// IngressRule represents the rules mapping the paths under a specified host to
+// the related backend services. Incoming requests are first evaluated for a host
+// match, then routed to the backend associated with the matching IngressRuleValue.
+type IngressRule struct {
+ // Host is the fully qualified domain name of a network host, as defined
+ // by RFC 3986. Note the following deviations from the "host" part of the
+ // URI as defined in the RFC:
+ // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the
+ // IP in the Spec of the parent Ingress.
+ // 2. The `:` delimiter is not respected because ports are not allowed.
+ // Currently the port of an Ingress is implicitly :80 for http and
+ // :443 for https.
+ // Both these may change in the future.
+ // Incoming requests are matched against the host before the IngressRuleValue.
+ // If the host is unspecified, the Ingress routes all traffic based on the
+ // specified IngressRuleValue.
+ // +optional
+ Host string `json:"host,omitempty" protobuf:"bytes,1,opt,name=host"`
+ // IngressRuleValue represents a rule to route requests for this IngressRule.
+ // If unspecified, the rule defaults to a http catch-all. Whether that sends
+ // just traffic matching the host to the default backend or all traffic to the
+ // default backend, is left to the controller fulfilling the Ingress. Http is
+ // currently the only supported IngressRuleValue.
+ // +optional
+ IngressRuleValue `json:",inline,omitempty" protobuf:"bytes,2,opt,name=ingressRuleValue"`
+}
+
+// IngressRuleValue represents a rule to apply against incoming requests. If the
+// rule is satisfied, the request is routed to the specified backend. Currently
+// mixing different types of rules in a single Ingress is disallowed, so exactly
+// one of the following must be set.
+type IngressRuleValue struct {
+ //TODO:
+ // 1. Consider renaming this resource and the associated rules so they
+ // aren't tied to Ingress. They can be used to route intra-cluster traffic.
+ // 2. Consider adding fields for ingress-type specific global options
+ // usable by a loadbalancer, like http keep-alive.
+
+ // +optional
+ HTTP *HTTPIngressRuleValue `json:"http,omitempty" protobuf:"bytes,1,opt,name=http"`
+}
+
+// HTTPIngressRuleValue is a list of http selectors pointing to backends.
+// In the example: http://<host>/<path>?<searchpart> -> backend where
+// where parts of the url correspond to RFC 3986, this resource will be used
+// to match against everything after the last '/' and before the first '?'
+// or '#'.
+type HTTPIngressRuleValue struct {
+ // A collection of paths that map requests to backends.
+ Paths []HTTPIngressPath `json:"paths" protobuf:"bytes,1,rep,name=paths"`
+ // TODO: Consider adding fields for ingress-type specific global
+ // options usable by a loadbalancer, like http keep-alive.
+}
+
+// HTTPIngressPath associates a path regex with a backend. Incoming urls matching
+// the path are forwarded to the backend.
+type HTTPIngressPath struct {
+ // Path is an extended POSIX regex as defined by IEEE Std 1003.1,
+ // (i.e this follows the egrep/unix syntax, not the perl syntax)
+ // matched against the path of an incoming request. Currently it can
+ // contain characters disallowed from the conventional "path"
+ // part of a URL as defined by RFC 3986. Paths must begin with
+ // a '/'. If unspecified, the path defaults to a catch all sending
+ // traffic to the backend.
+ // +optional
+ Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"`
+
+ // Backend defines the referenced service endpoint to which the traffic
+ // will be forwarded to.
+ Backend IngressBackend `json:"backend" protobuf:"bytes,2,opt,name=backend"`
+}
+
+// IngressBackend describes all endpoints for a given service and port.
+type IngressBackend struct {
+ // Specifies the name of the referenced service.
+ ServiceName string `json:"serviceName" protobuf:"bytes,1,opt,name=serviceName"`
+
+ // Specifies the port of the referenced service.
+ ServicePort intstr.IntOrString `json:"servicePort" protobuf:"bytes,2,opt,name=servicePort"`
+}
+
+// +genclient=true
+
+// ReplicaSet represents the configuration of a ReplicaSet.
+type ReplicaSet struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // If the Labels of a ReplicaSet are empty, they are defaulted to
+ // be the same as the Pod(s) that the ReplicaSet manages.
+ // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines the specification of the desired behavior of the ReplicaSet.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec ReplicaSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is the most recently observed status of the ReplicaSet.
+ // This data may be out of date by some window of time.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status ReplicaSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// ReplicaSetList is a collection of ReplicaSets.
+type ReplicaSetList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of ReplicaSets.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
+ Items []ReplicaSet `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// ReplicaSetSpec is the specification of a ReplicaSet.
+type ReplicaSetSpec struct {
+ // Replicas is the number of desired replicas.
+ // This is a pointer to distinguish between explicit zero and unspecified.
+ // Defaults to 1.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
+ // +optional
+ Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
+
+ // Minimum number of seconds for which a newly created pod should be ready
+ // without any of its container crashing, for it to be considered available.
+ // Defaults to 0 (pod will be considered available as soon as it is ready)
+ // +optional
+ MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,4,opt,name=minReadySeconds"`
+
+ // Selector is a label query over pods that should match the replica count.
+ // If the selector is empty, it is defaulted to the labels present on the pod template.
+ // Label keys and values that must match in order to be controlled by this replica set.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
+
+ // Template is the object that describes the pod that will be created if
+ // insufficient replicas are detected.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
+ // +optional
+ Template v1.PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,3,opt,name=template"`
+}
+
+// ReplicaSetStatus represents the current status of a ReplicaSet.
+type ReplicaSetStatus struct {
+ // Replicas is the most recently oberved number of replicas.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
+ Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"`
+
+ // The number of pods that have labels matching the labels of the pod template of the replicaset.
+ // +optional
+ FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty" protobuf:"varint,2,opt,name=fullyLabeledReplicas"`
+
+ // The number of ready replicas for this replica set.
+ // +optional
+ ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,4,opt,name=readyReplicas"`
+
+ // The number of available replicas (ready for at least minReadySeconds) for this replica set.
+ // +optional
+ AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,5,opt,name=availableReplicas"`
+
+ // ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
+ // +optional
+ ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"`
+
+ // Represents the latest available observations of a replica set's current state.
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ Conditions []ReplicaSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"`
+}
+
+type ReplicaSetConditionType string
+
+// These are valid conditions of a replica set.
+const (
+ // ReplicaSetReplicaFailure is added in a replica set when one of its pods fails to be created
+ // due to insufficient quota, limit ranges, pod security policy, node selectors, etc. or deleted
+ // due to kubelet being down or finalizers are failing.
+ ReplicaSetReplicaFailure ReplicaSetConditionType = "ReplicaFailure"
+)
+
+// ReplicaSetCondition describes the state of a replica set at a certain point.
+type ReplicaSetCondition struct {
+ // Type of replica set condition.
+ Type ReplicaSetConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=ReplicaSetConditionType"`
+ // Status of the condition, one of True, False, Unknown.
+ Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"`
+ // The last time the condition transitioned from one status to another.
+ // +optional
+ LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
+ // The reason for the condition's last transition.
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
+ // A human readable message indicating details about the transition.
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
+}
+
+// +genclient=true
+// +nonNamespaced=true
+
+// Pod Security Policy governs the ability to make requests that affect the Security Context
+// that will be applied to a pod and container.
+type PodSecurityPolicy struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // spec defines the policy enforced.
+ // +optional
+ Spec PodSecurityPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+}
+
+// Pod Security Policy Spec defines the policy enforced.
+type PodSecurityPolicySpec struct {
+ // privileged determines if a pod can request to be run as privileged.
+ // +optional
+ Privileged bool `json:"privileged,omitempty" protobuf:"varint,1,opt,name=privileged"`
+ // DefaultAddCapabilities is the default set of capabilities that will be added to the container
+ // unless the pod spec specifically drops the capability. You may not list a capabiility in both
+ // DefaultAddCapabilities and RequiredDropCapabilities.
+ // +optional
+ DefaultAddCapabilities []v1.Capability `json:"defaultAddCapabilities,omitempty" protobuf:"bytes,2,rep,name=defaultAddCapabilities,casttype=k8s.io/kubernetes/pkg/api/v1.Capability"`
+ // RequiredDropCapabilities are the capabilities that will be dropped from the container. These
+ // are required to be dropped and cannot be added.
+ // +optional
+ RequiredDropCapabilities []v1.Capability `json:"requiredDropCapabilities,omitempty" protobuf:"bytes,3,rep,name=requiredDropCapabilities,casttype=k8s.io/kubernetes/pkg/api/v1.Capability"`
+ // AllowedCapabilities is a list of capabilities that can be requested to add to the container.
+ // Capabilities in this field may be added at the pod author's discretion.
+ // You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities.
+ // +optional
+ AllowedCapabilities []v1.Capability `json:"allowedCapabilities,omitempty" protobuf:"bytes,4,rep,name=allowedCapabilities,casttype=k8s.io/kubernetes/pkg/api/v1.Capability"`
+ // volumes is a white list of allowed volume plugins. Empty indicates that all plugins
+ // may be used.
+ // +optional
+ Volumes []FSType `json:"volumes,omitempty" protobuf:"bytes,5,rep,name=volumes,casttype=FSType"`
+ // hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.
+ // +optional
+ HostNetwork bool `json:"hostNetwork,omitempty" protobuf:"varint,6,opt,name=hostNetwork"`
+ // hostPorts determines which host port ranges are allowed to be exposed.
+ // +optional
+ HostPorts []HostPortRange `json:"hostPorts,omitempty" protobuf:"bytes,7,rep,name=hostPorts"`
+ // hostPID determines if the policy allows the use of HostPID in the pod spec.
+ // +optional
+ HostPID bool `json:"hostPID,omitempty" protobuf:"varint,8,opt,name=hostPID"`
+ // hostIPC determines if the policy allows the use of HostIPC in the pod spec.
+ // +optional
+ HostIPC bool `json:"hostIPC,omitempty" protobuf:"varint,9,opt,name=hostIPC"`
+ // seLinux is the strategy that will dictate the allowable labels that may be set.
+ SELinux SELinuxStrategyOptions `json:"seLinux" protobuf:"bytes,10,opt,name=seLinux"`
+ // runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.
+ RunAsUser RunAsUserStrategyOptions `json:"runAsUser" protobuf:"bytes,11,opt,name=runAsUser"`
+ // SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.
+ SupplementalGroups SupplementalGroupsStrategyOptions `json:"supplementalGroups" protobuf:"bytes,12,opt,name=supplementalGroups"`
+ // FSGroup is the strategy that will dictate what fs group is used by the SecurityContext.
+ FSGroup FSGroupStrategyOptions `json:"fsGroup" protobuf:"bytes,13,opt,name=fsGroup"`
+ // ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file
+ // system. If the container specifically requests to run with a non-read only root file system
+ // the PSP should deny the pod.
+ // If set to false the container may run with a read only root file system if it wishes but it
+ // will not be forced to.
+ // +optional
+ ReadOnlyRootFilesystem bool `json:"readOnlyRootFilesystem,omitempty" protobuf:"varint,14,opt,name=readOnlyRootFilesystem"`
+}
+
+// FS Type gives strong typing to different file systems that are used by volumes.
+type FSType string
+
+var (
+ AzureFile FSType = "azureFile"
+ Flocker FSType = "flocker"
+ FlexVolume FSType = "flexVolume"
+ HostPath FSType = "hostPath"
+ EmptyDir FSType = "emptyDir"
+ GCEPersistentDisk FSType = "gcePersistentDisk"
+ AWSElasticBlockStore FSType = "awsElasticBlockStore"
+ GitRepo FSType = "gitRepo"
+ Secret FSType = "secret"
+ NFS FSType = "nfs"
+ ISCSI FSType = "iscsi"
+ Glusterfs FSType = "glusterfs"
+ PersistentVolumeClaim FSType = "persistentVolumeClaim"
+ RBD FSType = "rbd"
+ Cinder FSType = "cinder"
+ CephFS FSType = "cephFS"
+ DownwardAPI FSType = "downwardAPI"
+ FC FSType = "fc"
+ ConfigMap FSType = "configMap"
+ Quobyte FSType = "quobyte"
+ AzureDisk FSType = "azureDisk"
+ All FSType = "*"
+)
+
+// Host Port Range defines a range of host ports that will be enabled by a policy
+// for pods to use. It requires both the start and end to be defined.
+type HostPortRange struct {
+ // min is the start of the range, inclusive.
+ Min int32 `json:"min" protobuf:"varint,1,opt,name=min"`
+ // max is the end of the range, inclusive.
+ Max int32 `json:"max" protobuf:"varint,2,opt,name=max"`
+}
+
+// SELinux Strategy Options defines the strategy type and any options used to create the strategy.
+type SELinuxStrategyOptions struct {
+ // type is the strategy that will dictate the allowable labels that may be set.
+ Rule SELinuxStrategy `json:"rule" protobuf:"bytes,1,opt,name=rule,casttype=SELinuxStrategy"`
+ // seLinuxOptions required to run as; required for MustRunAs
+ // More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md
+ // +optional
+ SELinuxOptions *v1.SELinuxOptions `json:"seLinuxOptions,omitempty" protobuf:"bytes,2,opt,name=seLinuxOptions"`
+}
+
+// SELinuxStrategy denotes strategy types for generating SELinux options for a
+// Security Context.
+type SELinuxStrategy string
+
+const (
+ // container must have SELinux labels of X applied.
+ SELinuxStrategyMustRunAs SELinuxStrategy = "MustRunAs"
+ // container may make requests for any SELinux context labels.
+ SELinuxStrategyRunAsAny SELinuxStrategy = "RunAsAny"
+)
+
+// Run A sUser Strategy Options defines the strategy type and any options used to create the strategy.
+type RunAsUserStrategyOptions struct {
+ // Rule is the strategy that will dictate the allowable RunAsUser values that may be set.
+ Rule RunAsUserStrategy `json:"rule" protobuf:"bytes,1,opt,name=rule,casttype=RunAsUserStrategy"`
+ // Ranges are the allowed ranges of uids that may be used.
+ // +optional
+ Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"`
+}
+
+// ID Range provides a min/max of an allowed range of IDs.
+type IDRange struct {
+ // Min is the start of the range, inclusive.
+ Min int64 `json:"min" protobuf:"varint,1,opt,name=min"`
+ // Max is the end of the range, inclusive.
+ Max int64 `json:"max" protobuf:"varint,2,opt,name=max"`
+}
+
+// RunAsUserStrategy denotes strategy types for generating RunAsUser values for a
+// Security Context.
+type RunAsUserStrategy string
+
+const (
+ // container must run as a particular uid.
+ RunAsUserStrategyMustRunAs RunAsUserStrategy = "MustRunAs"
+ // container must run as a non-root uid
+ RunAsUserStrategyMustRunAsNonRoot RunAsUserStrategy = "MustRunAsNonRoot"
+ // container may make requests for any uid.
+ RunAsUserStrategyRunAsAny RunAsUserStrategy = "RunAsAny"
+)
+
+// FSGroupStrategyOptions defines the strategy type and options used to create the strategy.
+type FSGroupStrategyOptions struct {
+ // Rule is the strategy that will dictate what FSGroup is used in the SecurityContext.
+ // +optional
+ Rule FSGroupStrategyType `json:"rule,omitempty" protobuf:"bytes,1,opt,name=rule,casttype=FSGroupStrategyType"`
+ // Ranges are the allowed ranges of fs groups. If you would like to force a single
+ // fs group then supply a single range with the same start and end.
+ // +optional
+ Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"`
+}
+
+// FSGroupStrategyType denotes strategy types for generating FSGroup values for a
+// SecurityContext
+type FSGroupStrategyType string
+
+const (
+ // container must have FSGroup of X applied.
+ FSGroupStrategyMustRunAs FSGroupStrategyType = "MustRunAs"
+ // container may make requests for any FSGroup labels.
+ FSGroupStrategyRunAsAny FSGroupStrategyType = "RunAsAny"
+)
+
+// SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.
+type SupplementalGroupsStrategyOptions struct {
+ // Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.
+ // +optional
+ Rule SupplementalGroupsStrategyType `json:"rule,omitempty" protobuf:"bytes,1,opt,name=rule,casttype=SupplementalGroupsStrategyType"`
+ // Ranges are the allowed ranges of supplemental groups. If you would like to force a single
+ // supplemental group then supply a single range with the same start and end.
+ // +optional
+ Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"`
+}
+
+// SupplementalGroupsStrategyType denotes strategy types for determining valid supplemental
+// groups for a SecurityContext.
+type SupplementalGroupsStrategyType string
+
+const (
+ // container must run as a particular gid.
+ SupplementalGroupsStrategyMustRunAs SupplementalGroupsStrategyType = "MustRunAs"
+ // container may make requests for any gid.
+ SupplementalGroupsStrategyRunAsAny SupplementalGroupsStrategyType = "RunAsAny"
+)
+
+// Pod Security Policy List is a list of PodSecurityPolicy objects.
+type PodSecurityPolicyList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of schema objects.
+ Items []PodSecurityPolicy `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// NetworkPolicy describes what network traffic is allowed for a set of Pods
+type NetworkPolicy struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Specification of the desired behavior for this NetworkPolicy.
+ // +optional
+ Spec NetworkPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+}
+
+type NetworkPolicySpec struct {
+ // Selects the pods to which this NetworkPolicy object applies. The array of ingress rules
+ // is applied to any pods selected by this field. Multiple network policies can select the
+ // same set of pods. In this case, the ingress rules for each are combined additively.
+ // This field is NOT optional and follows standard label selector semantics.
+ // An empty podSelector matches all pods in this namespace.
+ PodSelector metav1.LabelSelector `json:"podSelector" protobuf:"bytes,1,opt,name=podSelector"`
+
+ // List of ingress rules to be applied to the selected pods.
+ // Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod
+ // OR if the traffic source is the pod's local node,
+ // OR if the traffic matches at least one ingress rule across all of the NetworkPolicy
+ // objects whose podSelector matches the pod.
+ // If this field is empty then this NetworkPolicy does not allow any traffic
+ // (and serves solely to ensure that the pods it selects are isolated by default).
+ // +optional
+ Ingress []NetworkPolicyIngressRule `json:"ingress,omitempty" protobuf:"bytes,2,rep,name=ingress"`
+}
+
+// This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.
+type NetworkPolicyIngressRule struct {
+ // List of ports which should be made accessible on the pods selected for this rule.
+ // Each item in this list is combined using a logical OR.
+ // If this field is empty or missing, this rule matches all ports (traffic not restricted by port).
+ // If this field is present and contains at least one item, then this rule allows traffic
+ // only if the traffic matches at least one port in the list.
+ // +optional
+ Ports []NetworkPolicyPort `json:"ports,omitempty" protobuf:"bytes,1,rep,name=ports"`
+
+ // List of sources which should be able to access the pods selected for this rule.
+ // Items in this list are combined using a logical OR operation.
+ // If this field is empty or missing, this rule matches all sources (traffic not restricted by source).
+ // If this field is present and contains at least on item, this rule allows traffic only if the
+ // traffic matches at least one item in the from list.
+ // +optional
+ From []NetworkPolicyPeer `json:"from,omitempty" protobuf:"bytes,2,rep,name=from"`
+}
+
+type NetworkPolicyPort struct {
+ // Optional. The protocol (TCP or UDP) which traffic must match.
+ // If not specified, this field defaults to TCP.
+ // +optional
+ Protocol *v1.Protocol `json:"protocol,omitempty" protobuf:"bytes,1,opt,name=protocol,casttype=k8s.io/kubernetes/pkg/api/v1.Protocol"`
+
+ // If specified, the port on the given protocol. This can
+ // either be a numerical or named port on a pod. If this field is not provided,
+ // this matches all port names and numbers.
+ // If present, only traffic on the specified protocol AND port
+ // will be matched.
+ // +optional
+ Port *intstr.IntOrString `json:"port,omitempty" protobuf:"bytes,2,opt,name=port"`
+}
+
+type NetworkPolicyPeer struct {
+ // Exactly one of the following must be specified.
+
+ // This is a label selector which selects Pods in this namespace.
+ // This field follows standard label selector semantics.
+ // If present but empty, this selector selects all pods in this namespace.
+ // +optional
+ PodSelector *metav1.LabelSelector `json:"podSelector,omitempty" protobuf:"bytes,1,opt,name=podSelector"`
+
+ // Selects Namespaces using cluster scoped-labels. This
+ // matches all pods in all namespaces selected by this label selector.
+ // This field follows standard label selector semantics.
+ // If present but empty, this selector selects all namespaces.
+ // +optional
+ NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,2,opt,name=namespaceSelector"`
+}
+
+// Network Policy List is a list of NetworkPolicy objects.
+type NetworkPolicyList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of schema objects.
+ Items []NetworkPolicy `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..d9cc1d13e
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go
@@ -0,0 +1,631 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_APIVersion = map[string]string{
+ "": "An APIVersion represents a single concrete version of an object model.",
+ "name": "Name of this version (e.g. 'v1').",
+}
+
+func (APIVersion) SwaggerDoc() map[string]string {
+ return map_APIVersion
+}
+
+var map_CustomMetricCurrentStatus = map[string]string{
+ "name": "Custom Metric name.",
+ "value": "Custom Metric value (average).",
+}
+
+func (CustomMetricCurrentStatus) SwaggerDoc() map[string]string {
+ return map_CustomMetricCurrentStatus
+}
+
+var map_CustomMetricTarget = map[string]string{
+ "": "Alpha-level support for Custom Metrics in HPA (as annotations).",
+ "name": "Custom Metric name.",
+ "value": "Custom Metric value (average).",
+}
+
+func (CustomMetricTarget) SwaggerDoc() map[string]string {
+ return map_CustomMetricTarget
+}
+
+var map_DaemonSet = map[string]string{
+ "": "DaemonSet represents the configuration of a daemon set.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+ "status": "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (DaemonSet) SwaggerDoc() map[string]string {
+ return map_DaemonSet
+}
+
+var map_DaemonSetList = map[string]string{
+ "": "DaemonSetList is a collection of daemon sets.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "items": "A list of daemon sets.",
+}
+
+func (DaemonSetList) SwaggerDoc() map[string]string {
+ return map_DaemonSetList
+}
+
+var map_DaemonSetSpec = map[string]string{
+ "": "DaemonSetSpec is the specification of a daemon set.",
+ "selector": "A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
+ "template": "An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template",
+ "updateStrategy": "An update strategy to replace existing DaemonSet pods with new pods.",
+ "minReadySeconds": "The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready).",
+ "templateGeneration": "DEPRECATED. A sequence number representing a specific generation of the template. Populated by the system. It can be set only during the creation.",
+ "revisionHistoryLimit": "The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.",
+}
+
+func (DaemonSetSpec) SwaggerDoc() map[string]string {
+ return map_DaemonSetSpec
+}
+
+var map_DaemonSetStatus = map[string]string{
+ "": "DaemonSetStatus represents the current status of a daemon set.",
+ "currentNumberScheduled": "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/",
+ "numberMisscheduled": "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/",
+ "desiredNumberScheduled": "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/",
+ "numberReady": "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.",
+ "observedGeneration": "The most recent generation observed by the daemon set controller.",
+ "updatedNumberScheduled": "The total number of nodes that are running updated daemon pod",
+ "numberAvailable": "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds)",
+ "numberUnavailable": "The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds)",
+ "collisionCount": "Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.",
+}
+
+func (DaemonSetStatus) SwaggerDoc() map[string]string {
+ return map_DaemonSetStatus
+}
+
+var map_DaemonSetUpdateStrategy = map[string]string{
+ "type": "Type of daemon set update. Can be \"RollingUpdate\" or \"OnDelete\". Default is OnDelete.",
+ "rollingUpdate": "Rolling update config params. Present only if type = \"RollingUpdate\".",
+}
+
+func (DaemonSetUpdateStrategy) SwaggerDoc() map[string]string {
+ return map_DaemonSetUpdateStrategy
+}
+
+var map_Deployment = map[string]string{
+ "": "Deployment enables declarative updates for Pods and ReplicaSets.",
+ "metadata": "Standard object metadata.",
+ "spec": "Specification of the desired behavior of the Deployment.",
+ "status": "Most recently observed status of the Deployment.",
+}
+
+func (Deployment) SwaggerDoc() map[string]string {
+ return map_Deployment
+}
+
+var map_DeploymentCondition = map[string]string{
+ "": "DeploymentCondition describes the state of a deployment at a certain point.",
+ "type": "Type of deployment condition.",
+ "status": "Status of the condition, one of True, False, Unknown.",
+ "lastUpdateTime": "The last time this condition was updated.",
+ "lastTransitionTime": "Last time the condition transitioned from one status to another.",
+ "reason": "The reason for the condition's last transition.",
+ "message": "A human readable message indicating details about the transition.",
+}
+
+func (DeploymentCondition) SwaggerDoc() map[string]string {
+ return map_DeploymentCondition
+}
+
+var map_DeploymentList = map[string]string{
+ "": "DeploymentList is a list of Deployments.",
+ "metadata": "Standard list metadata.",
+ "items": "Items is the list of Deployments.",
+}
+
+func (DeploymentList) SwaggerDoc() map[string]string {
+ return map_DeploymentList
+}
+
+var map_DeploymentRollback = map[string]string{
+ "": "DeploymentRollback stores the information required to rollback a deployment.",
+ "name": "Required: This must match the Name of a deployment.",
+ "updatedAnnotations": "The annotations to be updated to a deployment",
+ "rollbackTo": "The config of this deployment rollback.",
+}
+
+func (DeploymentRollback) SwaggerDoc() map[string]string {
+ return map_DeploymentRollback
+}
+
+var map_DeploymentSpec = map[string]string{
+ "": "DeploymentSpec is the specification of the desired behavior of the Deployment.",
+ "replicas": "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.",
+ "selector": "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.",
+ "template": "Template describes the pods that will be created.",
+ "strategy": "The deployment strategy to use to replace existing pods with new ones.",
+ "minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)",
+ "revisionHistoryLimit": "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified.",
+ "paused": "Indicates that the deployment is paused and will not be processed by the deployment controller.",
+ "rollbackTo": "The config this deployment is rolling back to. Will be cleared after rollback is done.",
+ "progressDeadlineSeconds": "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Once autoRollback is implemented, the deployment controller will automatically rollback failed deployments. Note that progress will not be estimated during the time a deployment is paused. This is not set by default.",
+}
+
+func (DeploymentSpec) SwaggerDoc() map[string]string {
+ return map_DeploymentSpec
+}
+
+var map_DeploymentStatus = map[string]string{
+ "": "DeploymentStatus is the most recently observed status of the Deployment.",
+ "observedGeneration": "The generation observed by the deployment controller.",
+ "replicas": "Total number of non-terminated pods targeted by this deployment (their labels match the selector).",
+ "updatedReplicas": "Total number of non-terminated pods targeted by this deployment that have the desired template spec.",
+ "readyReplicas": "Total number of ready pods targeted by this deployment.",
+ "availableReplicas": "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.",
+ "unavailableReplicas": "Total number of unavailable pods targeted by this deployment.",
+ "conditions": "Represents the latest available observations of a deployment's current state.",
+ "collisionCount": "Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.",
+}
+
+func (DeploymentStatus) SwaggerDoc() map[string]string {
+ return map_DeploymentStatus
+}
+
+var map_DeploymentStrategy = map[string]string{
+ "": "DeploymentStrategy describes how to replace existing pods with new ones.",
+ "type": "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.",
+ "rollingUpdate": "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.",
+}
+
+func (DeploymentStrategy) SwaggerDoc() map[string]string {
+ return map_DeploymentStrategy
+}
+
+var map_FSGroupStrategyOptions = map[string]string{
+ "": "FSGroupStrategyOptions defines the strategy type and options used to create the strategy.",
+ "rule": "Rule is the strategy that will dictate what FSGroup is used in the SecurityContext.",
+ "ranges": "Ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end.",
+}
+
+func (FSGroupStrategyOptions) SwaggerDoc() map[string]string {
+ return map_FSGroupStrategyOptions
+}
+
+var map_HTTPIngressPath = map[string]string{
+ "": "HTTPIngressPath associates a path regex with a backend. Incoming urls matching the path are forwarded to the backend.",
+ "path": "Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. If unspecified, the path defaults to a catch all sending traffic to the backend.",
+ "backend": "Backend defines the referenced service endpoint to which the traffic will be forwarded to.",
+}
+
+func (HTTPIngressPath) SwaggerDoc() map[string]string {
+ return map_HTTPIngressPath
+}
+
+var map_HTTPIngressRuleValue = map[string]string{
+ "": "HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http://<host>/<path>?<searchpart> -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.",
+ "paths": "A collection of paths that map requests to backends.",
+}
+
+func (HTTPIngressRuleValue) SwaggerDoc() map[string]string {
+ return map_HTTPIngressRuleValue
+}
+
+var map_HostPortRange = map[string]string{
+ "": "Host Port Range defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined.",
+ "min": "min is the start of the range, inclusive.",
+ "max": "max is the end of the range, inclusive.",
+}
+
+func (HostPortRange) SwaggerDoc() map[string]string {
+ return map_HostPortRange
+}
+
+var map_IDRange = map[string]string{
+ "": "ID Range provides a min/max of an allowed range of IDs.",
+ "min": "Min is the start of the range, inclusive.",
+ "max": "Max is the end of the range, inclusive.",
+}
+
+func (IDRange) SwaggerDoc() map[string]string {
+ return map_IDRange
+}
+
+var map_Ingress = map[string]string{
+ "": "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+ "status": "Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (Ingress) SwaggerDoc() map[string]string {
+ return map_Ingress
+}
+
+var map_IngressBackend = map[string]string{
+ "": "IngressBackend describes all endpoints for a given service and port.",
+ "serviceName": "Specifies the name of the referenced service.",
+ "servicePort": "Specifies the port of the referenced service.",
+}
+
+func (IngressBackend) SwaggerDoc() map[string]string {
+ return map_IngressBackend
+}
+
+var map_IngressList = map[string]string{
+ "": "IngressList is a collection of Ingress.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "items": "Items is the list of Ingress.",
+}
+
+func (IngressList) SwaggerDoc() map[string]string {
+ return map_IngressList
+}
+
+var map_IngressRule = map[string]string{
+ "": "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.",
+ "host": "Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in the RFC: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the\n\t IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.",
+}
+
+func (IngressRule) SwaggerDoc() map[string]string {
+ return map_IngressRule
+}
+
+var map_IngressRuleValue = map[string]string{
+ "": "IngressRuleValue represents a rule to apply against incoming requests. If the rule is satisfied, the request is routed to the specified backend. Currently mixing different types of rules in a single Ingress is disallowed, so exactly one of the following must be set.",
+}
+
+func (IngressRuleValue) SwaggerDoc() map[string]string {
+ return map_IngressRuleValue
+}
+
+var map_IngressSpec = map[string]string{
+ "": "IngressSpec describes the Ingress the user wishes to exist.",
+ "backend": "A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.",
+ "tls": "TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.",
+ "rules": "A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.",
+}
+
+func (IngressSpec) SwaggerDoc() map[string]string {
+ return map_IngressSpec
+}
+
+var map_IngressStatus = map[string]string{
+ "": "IngressStatus describe the current state of the Ingress.",
+ "loadBalancer": "LoadBalancer contains the current status of the load-balancer.",
+}
+
+func (IngressStatus) SwaggerDoc() map[string]string {
+ return map_IngressStatus
+}
+
+var map_IngressTLS = map[string]string{
+ "": "IngressTLS describes the transport layer security associated with an Ingress.",
+ "hosts": "Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.",
+ "secretName": "SecretName is the name of the secret used to terminate SSL traffic on 443. Field is left optional to allow SSL routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.",
+}
+
+func (IngressTLS) SwaggerDoc() map[string]string {
+ return map_IngressTLS
+}
+
+var map_NetworkPolicy = map[string]string{
+ "": "NetworkPolicy describes what network traffic is allowed for a set of Pods",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Specification of the desired behavior for this NetworkPolicy.",
+}
+
+func (NetworkPolicy) SwaggerDoc() map[string]string {
+ return map_NetworkPolicy
+}
+
+var map_NetworkPolicyIngressRule = map[string]string{
+ "": "This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.",
+ "ports": "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.",
+ "from": "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list.",
+}
+
+func (NetworkPolicyIngressRule) SwaggerDoc() map[string]string {
+ return map_NetworkPolicyIngressRule
+}
+
+var map_NetworkPolicyList = map[string]string{
+ "": "Network Policy List is a list of NetworkPolicy objects.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "items": "Items is a list of schema objects.",
+}
+
+func (NetworkPolicyList) SwaggerDoc() map[string]string {
+ return map_NetworkPolicyList
+}
+
+var map_NetworkPolicyPeer = map[string]string{
+ "podSelector": "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace.",
+ "namespaceSelector": "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces.",
+}
+
+func (NetworkPolicyPeer) SwaggerDoc() map[string]string {
+ return map_NetworkPolicyPeer
+}
+
+var map_NetworkPolicyPort = map[string]string{
+ "protocol": "Optional. The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP.",
+ "port": "If specified, the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.",
+}
+
+func (NetworkPolicyPort) SwaggerDoc() map[string]string {
+ return map_NetworkPolicyPort
+}
+
+var map_NetworkPolicySpec = map[string]string{
+ "podSelector": "Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.",
+ "ingress": "List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default).",
+}
+
+func (NetworkPolicySpec) SwaggerDoc() map[string]string {
+ return map_NetworkPolicySpec
+}
+
+var map_PodSecurityPolicy = map[string]string{
+ "": "Pod Security Policy governs the ability to make requests that affect the Security Context that will be applied to a pod and container.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "spec defines the policy enforced.",
+}
+
+func (PodSecurityPolicy) SwaggerDoc() map[string]string {
+ return map_PodSecurityPolicy
+}
+
+var map_PodSecurityPolicyList = map[string]string{
+ "": "Pod Security Policy List is a list of PodSecurityPolicy objects.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "items": "Items is a list of schema objects.",
+}
+
+func (PodSecurityPolicyList) SwaggerDoc() map[string]string {
+ return map_PodSecurityPolicyList
+}
+
+var map_PodSecurityPolicySpec = map[string]string{
+ "": "Pod Security Policy Spec defines the policy enforced.",
+ "privileged": "privileged determines if a pod can request to be run as privileged.",
+ "defaultAddCapabilities": "DefaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capabiility in both DefaultAddCapabilities and RequiredDropCapabilities.",
+ "requiredDropCapabilities": "RequiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.",
+ "allowedCapabilities": "AllowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities.",
+ "volumes": "volumes is a white list of allowed volume plugins. Empty indicates that all plugins may be used.",
+ "hostNetwork": "hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.",
+ "hostPorts": "hostPorts determines which host port ranges are allowed to be exposed.",
+ "hostPID": "hostPID determines if the policy allows the use of HostPID in the pod spec.",
+ "hostIPC": "hostIPC determines if the policy allows the use of HostIPC in the pod spec.",
+ "seLinux": "seLinux is the strategy that will dictate the allowable labels that may be set.",
+ "runAsUser": "runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.",
+ "supplementalGroups": "SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.",
+ "fsGroup": "FSGroup is the strategy that will dictate what fs group is used by the SecurityContext.",
+ "readOnlyRootFilesystem": "ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.",
+}
+
+func (PodSecurityPolicySpec) SwaggerDoc() map[string]string {
+ return map_PodSecurityPolicySpec
+}
+
+var map_ReplicaSet = map[string]string{
+ "": "ReplicaSet represents the configuration of a ReplicaSet.",
+ "metadata": "If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+ "status": "Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (ReplicaSet) SwaggerDoc() map[string]string {
+ return map_ReplicaSet
+}
+
+var map_ReplicaSetCondition = map[string]string{
+ "": "ReplicaSetCondition describes the state of a replica set at a certain point.",
+ "type": "Type of replica set condition.",
+ "status": "Status of the condition, one of True, False, Unknown.",
+ "lastTransitionTime": "The last time the condition transitioned from one status to another.",
+ "reason": "The reason for the condition's last transition.",
+ "message": "A human readable message indicating details about the transition.",
+}
+
+func (ReplicaSetCondition) SwaggerDoc() map[string]string {
+ return map_ReplicaSetCondition
+}
+
+var map_ReplicaSetList = map[string]string{
+ "": "ReplicaSetList is a collection of ReplicaSets.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller",
+}
+
+func (ReplicaSetList) SwaggerDoc() map[string]string {
+ return map_ReplicaSetList
+}
+
+var map_ReplicaSetSpec = map[string]string{
+ "": "ReplicaSetSpec is the specification of a ReplicaSet.",
+ "replicas": "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller",
+ "minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)",
+ "selector": "Selector is a label query over pods that should match the replica count. If the selector is empty, it is defaulted to the labels present on the pod template. Label keys and values that must match in order to be controlled by this replica set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
+ "template": "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template",
+}
+
+func (ReplicaSetSpec) SwaggerDoc() map[string]string {
+ return map_ReplicaSetSpec
+}
+
+var map_ReplicaSetStatus = map[string]string{
+ "": "ReplicaSetStatus represents the current status of a ReplicaSet.",
+ "replicas": "Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller",
+ "fullyLabeledReplicas": "The number of pods that have labels matching the labels of the pod template of the replicaset.",
+ "readyReplicas": "The number of ready replicas for this replica set.",
+ "availableReplicas": "The number of available replicas (ready for at least minReadySeconds) for this replica set.",
+ "observedGeneration": "ObservedGeneration reflects the generation of the most recently observed ReplicaSet.",
+ "conditions": "Represents the latest available observations of a replica set's current state.",
+}
+
+func (ReplicaSetStatus) SwaggerDoc() map[string]string {
+ return map_ReplicaSetStatus
+}
+
+var map_ReplicationControllerDummy = map[string]string{
+ "": "Dummy definition",
+}
+
+func (ReplicationControllerDummy) SwaggerDoc() map[string]string {
+ return map_ReplicationControllerDummy
+}
+
+var map_RollbackConfig = map[string]string{
+ "revision": "The revision to rollback to. If set to 0, rollback to the last revision.",
+}
+
+func (RollbackConfig) SwaggerDoc() map[string]string {
+ return map_RollbackConfig
+}
+
+var map_RollingUpdateDaemonSet = map[string]string{
+ "": "Spec to control the desired behavior of daemon set rolling update.",
+ "maxUnavailable": "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.",
+}
+
+func (RollingUpdateDaemonSet) SwaggerDoc() map[string]string {
+ return map_RollingUpdateDaemonSet
+}
+
+var map_RollingUpdateDeployment = map[string]string{
+ "": "Spec to control the desired behavior of rolling update.",
+ "maxUnavailable": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.",
+ "maxSurge": "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. By default, a value of 1 is used. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.",
+}
+
+func (RollingUpdateDeployment) SwaggerDoc() map[string]string {
+ return map_RollingUpdateDeployment
+}
+
+var map_RunAsUserStrategyOptions = map[string]string{
+ "": "Run A sUser Strategy Options defines the strategy type and any options used to create the strategy.",
+ "rule": "Rule is the strategy that will dictate the allowable RunAsUser values that may be set.",
+ "ranges": "Ranges are the allowed ranges of uids that may be used.",
+}
+
+func (RunAsUserStrategyOptions) SwaggerDoc() map[string]string {
+ return map_RunAsUserStrategyOptions
+}
+
+var map_SELinuxStrategyOptions = map[string]string{
+ "": "SELinux Strategy Options defines the strategy type and any options used to create the strategy.",
+ "rule": "type is the strategy that will dictate the allowable labels that may be set.",
+ "seLinuxOptions": "seLinuxOptions required to run as; required for MustRunAs More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md",
+}
+
+func (SELinuxStrategyOptions) SwaggerDoc() map[string]string {
+ return map_SELinuxStrategyOptions
+}
+
+var map_Scale = map[string]string{
+ "": "represents a scaling request for a resource.",
+ "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.",
+ "spec": "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.",
+ "status": "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.",
+}
+
+func (Scale) SwaggerDoc() map[string]string {
+ return map_Scale
+}
+
+var map_ScaleSpec = map[string]string{
+ "": "describes the attributes of a scale subresource",
+ "replicas": "desired number of instances for the scaled object.",
+}
+
+func (ScaleSpec) SwaggerDoc() map[string]string {
+ return map_ScaleSpec
+}
+
+var map_ScaleStatus = map[string]string{
+ "": "represents the current status of a scale subresource.",
+ "replicas": "actual number of observed instances of the scaled object.",
+ "selector": "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors",
+ "targetSelector": "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
+}
+
+func (ScaleStatus) SwaggerDoc() map[string]string {
+ return map_ScaleStatus
+}
+
+var map_SupplementalGroupsStrategyOptions = map[string]string{
+ "": "SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.",
+ "rule": "Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.",
+ "ranges": "Ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end.",
+}
+
+func (SupplementalGroupsStrategyOptions) SwaggerDoc() map[string]string {
+ return map_SupplementalGroupsStrategyOptions
+}
+
+var map_ThirdPartyResource = map[string]string{
+ "": "A ThirdPartyResource is a generic representation of a resource, it is used by add-ons and plugins to add new resource types to the API. It consists of one or more Versions of the api.",
+ "metadata": "Standard object metadata",
+ "description": "Description is the description of this object.",
+ "versions": "Versions are versions for this third party object",
+}
+
+func (ThirdPartyResource) SwaggerDoc() map[string]string {
+ return map_ThirdPartyResource
+}
+
+var map_ThirdPartyResourceData = map[string]string{
+ "": "An internal object, used for versioned storage in etcd. Not exposed to the end user.",
+ "metadata": "Standard object metadata.",
+ "data": "Data is the raw JSON data for this data.",
+}
+
+func (ThirdPartyResourceData) SwaggerDoc() map[string]string {
+ return map_ThirdPartyResourceData
+}
+
+var map_ThirdPartyResourceDataList = map[string]string{
+ "": "ThirdPartyResrouceDataList is a list of ThirdPartyResourceData.",
+ "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "items": "Items is the list of ThirdpartyResourceData.",
+}
+
+func (ThirdPartyResourceDataList) SwaggerDoc() map[string]string {
+ return map_ThirdPartyResourceDataList
+}
+
+var map_ThirdPartyResourceList = map[string]string{
+ "": "ThirdPartyResourceList is a list of ThirdPartyResources.",
+ "metadata": "Standard list metadata.",
+ "items": "Items is the list of ThirdPartyResources.",
+}
+
+func (ThirdPartyResourceList) SwaggerDoc() map[string]string {
+ return map_ThirdPartyResourceList
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.conversion.go
new file mode 100644
index 000000000..efb81430a
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.conversion.go
@@ -0,0 +1,1714 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ intstr "k8s.io/apimachinery/pkg/util/intstr"
+ api "k8s.io/client-go/pkg/api"
+ api_v1 "k8s.io/client-go/pkg/api/v1"
+ extensions "k8s.io/client-go/pkg/apis/extensions"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1beta1_APIVersion_To_extensions_APIVersion,
+ Convert_extensions_APIVersion_To_v1beta1_APIVersion,
+ Convert_v1beta1_CustomMetricCurrentStatus_To_extensions_CustomMetricCurrentStatus,
+ Convert_extensions_CustomMetricCurrentStatus_To_v1beta1_CustomMetricCurrentStatus,
+ Convert_v1beta1_CustomMetricCurrentStatusList_To_extensions_CustomMetricCurrentStatusList,
+ Convert_extensions_CustomMetricCurrentStatusList_To_v1beta1_CustomMetricCurrentStatusList,
+ Convert_v1beta1_CustomMetricTarget_To_extensions_CustomMetricTarget,
+ Convert_extensions_CustomMetricTarget_To_v1beta1_CustomMetricTarget,
+ Convert_v1beta1_CustomMetricTargetList_To_extensions_CustomMetricTargetList,
+ Convert_extensions_CustomMetricTargetList_To_v1beta1_CustomMetricTargetList,
+ Convert_v1beta1_DaemonSet_To_extensions_DaemonSet,
+ Convert_extensions_DaemonSet_To_v1beta1_DaemonSet,
+ Convert_v1beta1_DaemonSetList_To_extensions_DaemonSetList,
+ Convert_extensions_DaemonSetList_To_v1beta1_DaemonSetList,
+ Convert_v1beta1_DaemonSetSpec_To_extensions_DaemonSetSpec,
+ Convert_extensions_DaemonSetSpec_To_v1beta1_DaemonSetSpec,
+ Convert_v1beta1_DaemonSetStatus_To_extensions_DaemonSetStatus,
+ Convert_extensions_DaemonSetStatus_To_v1beta1_DaemonSetStatus,
+ Convert_v1beta1_DaemonSetUpdateStrategy_To_extensions_DaemonSetUpdateStrategy,
+ Convert_extensions_DaemonSetUpdateStrategy_To_v1beta1_DaemonSetUpdateStrategy,
+ Convert_v1beta1_Deployment_To_extensions_Deployment,
+ Convert_extensions_Deployment_To_v1beta1_Deployment,
+ Convert_v1beta1_DeploymentCondition_To_extensions_DeploymentCondition,
+ Convert_extensions_DeploymentCondition_To_v1beta1_DeploymentCondition,
+ Convert_v1beta1_DeploymentList_To_extensions_DeploymentList,
+ Convert_extensions_DeploymentList_To_v1beta1_DeploymentList,
+ Convert_v1beta1_DeploymentRollback_To_extensions_DeploymentRollback,
+ Convert_extensions_DeploymentRollback_To_v1beta1_DeploymentRollback,
+ Convert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec,
+ Convert_extensions_DeploymentSpec_To_v1beta1_DeploymentSpec,
+ Convert_v1beta1_DeploymentStatus_To_extensions_DeploymentStatus,
+ Convert_extensions_DeploymentStatus_To_v1beta1_DeploymentStatus,
+ Convert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy,
+ Convert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy,
+ Convert_v1beta1_FSGroupStrategyOptions_To_extensions_FSGroupStrategyOptions,
+ Convert_extensions_FSGroupStrategyOptions_To_v1beta1_FSGroupStrategyOptions,
+ Convert_v1beta1_HTTPIngressPath_To_extensions_HTTPIngressPath,
+ Convert_extensions_HTTPIngressPath_To_v1beta1_HTTPIngressPath,
+ Convert_v1beta1_HTTPIngressRuleValue_To_extensions_HTTPIngressRuleValue,
+ Convert_extensions_HTTPIngressRuleValue_To_v1beta1_HTTPIngressRuleValue,
+ Convert_v1beta1_HostPortRange_To_extensions_HostPortRange,
+ Convert_extensions_HostPortRange_To_v1beta1_HostPortRange,
+ Convert_v1beta1_Ingress_To_extensions_Ingress,
+ Convert_extensions_Ingress_To_v1beta1_Ingress,
+ Convert_v1beta1_IngressBackend_To_extensions_IngressBackend,
+ Convert_extensions_IngressBackend_To_v1beta1_IngressBackend,
+ Convert_v1beta1_IngressList_To_extensions_IngressList,
+ Convert_extensions_IngressList_To_v1beta1_IngressList,
+ Convert_v1beta1_IngressRule_To_extensions_IngressRule,
+ Convert_extensions_IngressRule_To_v1beta1_IngressRule,
+ Convert_v1beta1_IngressRuleValue_To_extensions_IngressRuleValue,
+ Convert_extensions_IngressRuleValue_To_v1beta1_IngressRuleValue,
+ Convert_v1beta1_IngressSpec_To_extensions_IngressSpec,
+ Convert_extensions_IngressSpec_To_v1beta1_IngressSpec,
+ Convert_v1beta1_IngressStatus_To_extensions_IngressStatus,
+ Convert_extensions_IngressStatus_To_v1beta1_IngressStatus,
+ Convert_v1beta1_IngressTLS_To_extensions_IngressTLS,
+ Convert_extensions_IngressTLS_To_v1beta1_IngressTLS,
+ Convert_v1beta1_NetworkPolicy_To_extensions_NetworkPolicy,
+ Convert_extensions_NetworkPolicy_To_v1beta1_NetworkPolicy,
+ Convert_v1beta1_NetworkPolicyIngressRule_To_extensions_NetworkPolicyIngressRule,
+ Convert_extensions_NetworkPolicyIngressRule_To_v1beta1_NetworkPolicyIngressRule,
+ Convert_v1beta1_NetworkPolicyList_To_extensions_NetworkPolicyList,
+ Convert_extensions_NetworkPolicyList_To_v1beta1_NetworkPolicyList,
+ Convert_v1beta1_NetworkPolicyPeer_To_extensions_NetworkPolicyPeer,
+ Convert_extensions_NetworkPolicyPeer_To_v1beta1_NetworkPolicyPeer,
+ Convert_v1beta1_NetworkPolicyPort_To_extensions_NetworkPolicyPort,
+ Convert_extensions_NetworkPolicyPort_To_v1beta1_NetworkPolicyPort,
+ Convert_v1beta1_NetworkPolicySpec_To_extensions_NetworkPolicySpec,
+ Convert_extensions_NetworkPolicySpec_To_v1beta1_NetworkPolicySpec,
+ Convert_v1beta1_PodSecurityPolicy_To_extensions_PodSecurityPolicy,
+ Convert_extensions_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy,
+ Convert_v1beta1_PodSecurityPolicyList_To_extensions_PodSecurityPolicyList,
+ Convert_extensions_PodSecurityPolicyList_To_v1beta1_PodSecurityPolicyList,
+ Convert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySpec,
+ Convert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec,
+ Convert_v1beta1_ReplicaSet_To_extensions_ReplicaSet,
+ Convert_extensions_ReplicaSet_To_v1beta1_ReplicaSet,
+ Convert_v1beta1_ReplicaSetCondition_To_extensions_ReplicaSetCondition,
+ Convert_extensions_ReplicaSetCondition_To_v1beta1_ReplicaSetCondition,
+ Convert_v1beta1_ReplicaSetList_To_extensions_ReplicaSetList,
+ Convert_extensions_ReplicaSetList_To_v1beta1_ReplicaSetList,
+ Convert_v1beta1_ReplicaSetSpec_To_extensions_ReplicaSetSpec,
+ Convert_extensions_ReplicaSetSpec_To_v1beta1_ReplicaSetSpec,
+ Convert_v1beta1_ReplicaSetStatus_To_extensions_ReplicaSetStatus,
+ Convert_extensions_ReplicaSetStatus_To_v1beta1_ReplicaSetStatus,
+ Convert_v1beta1_ReplicationControllerDummy_To_extensions_ReplicationControllerDummy,
+ Convert_extensions_ReplicationControllerDummy_To_v1beta1_ReplicationControllerDummy,
+ Convert_v1beta1_RollbackConfig_To_extensions_RollbackConfig,
+ Convert_extensions_RollbackConfig_To_v1beta1_RollbackConfig,
+ Convert_v1beta1_RollingUpdateDaemonSet_To_extensions_RollingUpdateDaemonSet,
+ Convert_extensions_RollingUpdateDaemonSet_To_v1beta1_RollingUpdateDaemonSet,
+ Convert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDeployment,
+ Convert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDeployment,
+ Convert_v1beta1_RunAsUserStrategyOptions_To_extensions_RunAsUserStrategyOptions,
+ Convert_extensions_RunAsUserStrategyOptions_To_v1beta1_RunAsUserStrategyOptions,
+ Convert_v1beta1_SELinuxStrategyOptions_To_extensions_SELinuxStrategyOptions,
+ Convert_extensions_SELinuxStrategyOptions_To_v1beta1_SELinuxStrategyOptions,
+ Convert_v1beta1_Scale_To_extensions_Scale,
+ Convert_extensions_Scale_To_v1beta1_Scale,
+ Convert_v1beta1_ScaleSpec_To_extensions_ScaleSpec,
+ Convert_extensions_ScaleSpec_To_v1beta1_ScaleSpec,
+ Convert_v1beta1_ScaleStatus_To_extensions_ScaleStatus,
+ Convert_extensions_ScaleStatus_To_v1beta1_ScaleStatus,
+ Convert_v1beta1_SupplementalGroupsStrategyOptions_To_extensions_SupplementalGroupsStrategyOptions,
+ Convert_extensions_SupplementalGroupsStrategyOptions_To_v1beta1_SupplementalGroupsStrategyOptions,
+ Convert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource,
+ Convert_extensions_ThirdPartyResource_To_v1beta1_ThirdPartyResource,
+ Convert_v1beta1_ThirdPartyResourceData_To_extensions_ThirdPartyResourceData,
+ Convert_extensions_ThirdPartyResourceData_To_v1beta1_ThirdPartyResourceData,
+ Convert_v1beta1_ThirdPartyResourceDataList_To_extensions_ThirdPartyResourceDataList,
+ Convert_extensions_ThirdPartyResourceDataList_To_v1beta1_ThirdPartyResourceDataList,
+ Convert_v1beta1_ThirdPartyResourceList_To_extensions_ThirdPartyResourceList,
+ Convert_extensions_ThirdPartyResourceList_To_v1beta1_ThirdPartyResourceList,
+ )
+}
+
+func autoConvert_v1beta1_APIVersion_To_extensions_APIVersion(in *APIVersion, out *extensions.APIVersion, s conversion.Scope) error {
+ out.Name = in.Name
+ return nil
+}
+
+// Convert_v1beta1_APIVersion_To_extensions_APIVersion is an autogenerated conversion function.
+func Convert_v1beta1_APIVersion_To_extensions_APIVersion(in *APIVersion, out *extensions.APIVersion, s conversion.Scope) error {
+ return autoConvert_v1beta1_APIVersion_To_extensions_APIVersion(in, out, s)
+}
+
+func autoConvert_extensions_APIVersion_To_v1beta1_APIVersion(in *extensions.APIVersion, out *APIVersion, s conversion.Scope) error {
+ out.Name = in.Name
+ return nil
+}
+
+// Convert_extensions_APIVersion_To_v1beta1_APIVersion is an autogenerated conversion function.
+func Convert_extensions_APIVersion_To_v1beta1_APIVersion(in *extensions.APIVersion, out *APIVersion, s conversion.Scope) error {
+ return autoConvert_extensions_APIVersion_To_v1beta1_APIVersion(in, out, s)
+}
+
+func autoConvert_v1beta1_CustomMetricCurrentStatus_To_extensions_CustomMetricCurrentStatus(in *CustomMetricCurrentStatus, out *extensions.CustomMetricCurrentStatus, s conversion.Scope) error {
+ out.Name = in.Name
+ out.CurrentValue = in.CurrentValue
+ return nil
+}
+
+// Convert_v1beta1_CustomMetricCurrentStatus_To_extensions_CustomMetricCurrentStatus is an autogenerated conversion function.
+func Convert_v1beta1_CustomMetricCurrentStatus_To_extensions_CustomMetricCurrentStatus(in *CustomMetricCurrentStatus, out *extensions.CustomMetricCurrentStatus, s conversion.Scope) error {
+ return autoConvert_v1beta1_CustomMetricCurrentStatus_To_extensions_CustomMetricCurrentStatus(in, out, s)
+}
+
+func autoConvert_extensions_CustomMetricCurrentStatus_To_v1beta1_CustomMetricCurrentStatus(in *extensions.CustomMetricCurrentStatus, out *CustomMetricCurrentStatus, s conversion.Scope) error {
+ out.Name = in.Name
+ out.CurrentValue = in.CurrentValue
+ return nil
+}
+
+// Convert_extensions_CustomMetricCurrentStatus_To_v1beta1_CustomMetricCurrentStatus is an autogenerated conversion function.
+func Convert_extensions_CustomMetricCurrentStatus_To_v1beta1_CustomMetricCurrentStatus(in *extensions.CustomMetricCurrentStatus, out *CustomMetricCurrentStatus, s conversion.Scope) error {
+ return autoConvert_extensions_CustomMetricCurrentStatus_To_v1beta1_CustomMetricCurrentStatus(in, out, s)
+}
+
+func autoConvert_v1beta1_CustomMetricCurrentStatusList_To_extensions_CustomMetricCurrentStatusList(in *CustomMetricCurrentStatusList, out *extensions.CustomMetricCurrentStatusList, s conversion.Scope) error {
+ out.Items = *(*[]extensions.CustomMetricCurrentStatus)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1beta1_CustomMetricCurrentStatusList_To_extensions_CustomMetricCurrentStatusList is an autogenerated conversion function.
+func Convert_v1beta1_CustomMetricCurrentStatusList_To_extensions_CustomMetricCurrentStatusList(in *CustomMetricCurrentStatusList, out *extensions.CustomMetricCurrentStatusList, s conversion.Scope) error {
+ return autoConvert_v1beta1_CustomMetricCurrentStatusList_To_extensions_CustomMetricCurrentStatusList(in, out, s)
+}
+
+func autoConvert_extensions_CustomMetricCurrentStatusList_To_v1beta1_CustomMetricCurrentStatusList(in *extensions.CustomMetricCurrentStatusList, out *CustomMetricCurrentStatusList, s conversion.Scope) error {
+ if in.Items == nil {
+ out.Items = make([]CustomMetricCurrentStatus, 0)
+ } else {
+ out.Items = *(*[]CustomMetricCurrentStatus)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_extensions_CustomMetricCurrentStatusList_To_v1beta1_CustomMetricCurrentStatusList is an autogenerated conversion function.
+func Convert_extensions_CustomMetricCurrentStatusList_To_v1beta1_CustomMetricCurrentStatusList(in *extensions.CustomMetricCurrentStatusList, out *CustomMetricCurrentStatusList, s conversion.Scope) error {
+ return autoConvert_extensions_CustomMetricCurrentStatusList_To_v1beta1_CustomMetricCurrentStatusList(in, out, s)
+}
+
+func autoConvert_v1beta1_CustomMetricTarget_To_extensions_CustomMetricTarget(in *CustomMetricTarget, out *extensions.CustomMetricTarget, s conversion.Scope) error {
+ out.Name = in.Name
+ out.TargetValue = in.TargetValue
+ return nil
+}
+
+// Convert_v1beta1_CustomMetricTarget_To_extensions_CustomMetricTarget is an autogenerated conversion function.
+func Convert_v1beta1_CustomMetricTarget_To_extensions_CustomMetricTarget(in *CustomMetricTarget, out *extensions.CustomMetricTarget, s conversion.Scope) error {
+ return autoConvert_v1beta1_CustomMetricTarget_To_extensions_CustomMetricTarget(in, out, s)
+}
+
+func autoConvert_extensions_CustomMetricTarget_To_v1beta1_CustomMetricTarget(in *extensions.CustomMetricTarget, out *CustomMetricTarget, s conversion.Scope) error {
+ out.Name = in.Name
+ out.TargetValue = in.TargetValue
+ return nil
+}
+
+// Convert_extensions_CustomMetricTarget_To_v1beta1_CustomMetricTarget is an autogenerated conversion function.
+func Convert_extensions_CustomMetricTarget_To_v1beta1_CustomMetricTarget(in *extensions.CustomMetricTarget, out *CustomMetricTarget, s conversion.Scope) error {
+ return autoConvert_extensions_CustomMetricTarget_To_v1beta1_CustomMetricTarget(in, out, s)
+}
+
+func autoConvert_v1beta1_CustomMetricTargetList_To_extensions_CustomMetricTargetList(in *CustomMetricTargetList, out *extensions.CustomMetricTargetList, s conversion.Scope) error {
+ out.Items = *(*[]extensions.CustomMetricTarget)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1beta1_CustomMetricTargetList_To_extensions_CustomMetricTargetList is an autogenerated conversion function.
+func Convert_v1beta1_CustomMetricTargetList_To_extensions_CustomMetricTargetList(in *CustomMetricTargetList, out *extensions.CustomMetricTargetList, s conversion.Scope) error {
+ return autoConvert_v1beta1_CustomMetricTargetList_To_extensions_CustomMetricTargetList(in, out, s)
+}
+
+func autoConvert_extensions_CustomMetricTargetList_To_v1beta1_CustomMetricTargetList(in *extensions.CustomMetricTargetList, out *CustomMetricTargetList, s conversion.Scope) error {
+ if in.Items == nil {
+ out.Items = make([]CustomMetricTarget, 0)
+ } else {
+ out.Items = *(*[]CustomMetricTarget)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_extensions_CustomMetricTargetList_To_v1beta1_CustomMetricTargetList is an autogenerated conversion function.
+func Convert_extensions_CustomMetricTargetList_To_v1beta1_CustomMetricTargetList(in *extensions.CustomMetricTargetList, out *CustomMetricTargetList, s conversion.Scope) error {
+ return autoConvert_extensions_CustomMetricTargetList_To_v1beta1_CustomMetricTargetList(in, out, s)
+}
+
+func autoConvert_v1beta1_DaemonSet_To_extensions_DaemonSet(in *DaemonSet, out *extensions.DaemonSet, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1beta1_DaemonSetSpec_To_extensions_DaemonSetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_DaemonSetStatus_To_extensions_DaemonSetStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_DaemonSet_To_extensions_DaemonSet is an autogenerated conversion function.
+func Convert_v1beta1_DaemonSet_To_extensions_DaemonSet(in *DaemonSet, out *extensions.DaemonSet, s conversion.Scope) error {
+ return autoConvert_v1beta1_DaemonSet_To_extensions_DaemonSet(in, out, s)
+}
+
+func autoConvert_extensions_DaemonSet_To_v1beta1_DaemonSet(in *extensions.DaemonSet, out *DaemonSet, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_extensions_DaemonSetSpec_To_v1beta1_DaemonSetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_extensions_DaemonSetStatus_To_v1beta1_DaemonSetStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_extensions_DaemonSet_To_v1beta1_DaemonSet is an autogenerated conversion function.
+func Convert_extensions_DaemonSet_To_v1beta1_DaemonSet(in *extensions.DaemonSet, out *DaemonSet, s conversion.Scope) error {
+ return autoConvert_extensions_DaemonSet_To_v1beta1_DaemonSet(in, out, s)
+}
+
+func autoConvert_v1beta1_DaemonSetList_To_extensions_DaemonSetList(in *DaemonSetList, out *extensions.DaemonSetList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]extensions.DaemonSet, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_DaemonSet_To_extensions_DaemonSet(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1beta1_DaemonSetList_To_extensions_DaemonSetList is an autogenerated conversion function.
+func Convert_v1beta1_DaemonSetList_To_extensions_DaemonSetList(in *DaemonSetList, out *extensions.DaemonSetList, s conversion.Scope) error {
+ return autoConvert_v1beta1_DaemonSetList_To_extensions_DaemonSetList(in, out, s)
+}
+
+func autoConvert_extensions_DaemonSetList_To_v1beta1_DaemonSetList(in *extensions.DaemonSetList, out *DaemonSetList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]DaemonSet, len(*in))
+ for i := range *in {
+ if err := Convert_extensions_DaemonSet_To_v1beta1_DaemonSet(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]DaemonSet, 0)
+ }
+ return nil
+}
+
+// Convert_extensions_DaemonSetList_To_v1beta1_DaemonSetList is an autogenerated conversion function.
+func Convert_extensions_DaemonSetList_To_v1beta1_DaemonSetList(in *extensions.DaemonSetList, out *DaemonSetList, s conversion.Scope) error {
+ return autoConvert_extensions_DaemonSetList_To_v1beta1_DaemonSetList(in, out, s)
+}
+
+func autoConvert_v1beta1_DaemonSetSpec_To_extensions_DaemonSetSpec(in *DaemonSetSpec, out *extensions.DaemonSetSpec, s conversion.Scope) error {
+ out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector))
+ if err := api_v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_DaemonSetUpdateStrategy_To_extensions_DaemonSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, s); err != nil {
+ return err
+ }
+ out.MinReadySeconds = in.MinReadySeconds
+ out.TemplateGeneration = in.TemplateGeneration
+ out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit))
+ return nil
+}
+
+// Convert_v1beta1_DaemonSetSpec_To_extensions_DaemonSetSpec is an autogenerated conversion function.
+func Convert_v1beta1_DaemonSetSpec_To_extensions_DaemonSetSpec(in *DaemonSetSpec, out *extensions.DaemonSetSpec, s conversion.Scope) error {
+ return autoConvert_v1beta1_DaemonSetSpec_To_extensions_DaemonSetSpec(in, out, s)
+}
+
+func autoConvert_extensions_DaemonSetSpec_To_v1beta1_DaemonSetSpec(in *extensions.DaemonSetSpec, out *DaemonSetSpec, s conversion.Scope) error {
+ out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector))
+ if err := api_v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ if err := Convert_extensions_DaemonSetUpdateStrategy_To_v1beta1_DaemonSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, s); err != nil {
+ return err
+ }
+ out.MinReadySeconds = in.MinReadySeconds
+ out.TemplateGeneration = in.TemplateGeneration
+ out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit))
+ return nil
+}
+
+// Convert_extensions_DaemonSetSpec_To_v1beta1_DaemonSetSpec is an autogenerated conversion function.
+func Convert_extensions_DaemonSetSpec_To_v1beta1_DaemonSetSpec(in *extensions.DaemonSetSpec, out *DaemonSetSpec, s conversion.Scope) error {
+ return autoConvert_extensions_DaemonSetSpec_To_v1beta1_DaemonSetSpec(in, out, s)
+}
+
+func autoConvert_v1beta1_DaemonSetStatus_To_extensions_DaemonSetStatus(in *DaemonSetStatus, out *extensions.DaemonSetStatus, s conversion.Scope) error {
+ out.CurrentNumberScheduled = in.CurrentNumberScheduled
+ out.NumberMisscheduled = in.NumberMisscheduled
+ out.DesiredNumberScheduled = in.DesiredNumberScheduled
+ out.NumberReady = in.NumberReady
+ out.ObservedGeneration = in.ObservedGeneration
+ out.UpdatedNumberScheduled = in.UpdatedNumberScheduled
+ out.NumberAvailable = in.NumberAvailable
+ out.NumberUnavailable = in.NumberUnavailable
+ out.CollisionCount = (*int64)(unsafe.Pointer(in.CollisionCount))
+ return nil
+}
+
+// Convert_v1beta1_DaemonSetStatus_To_extensions_DaemonSetStatus is an autogenerated conversion function.
+func Convert_v1beta1_DaemonSetStatus_To_extensions_DaemonSetStatus(in *DaemonSetStatus, out *extensions.DaemonSetStatus, s conversion.Scope) error {
+ return autoConvert_v1beta1_DaemonSetStatus_To_extensions_DaemonSetStatus(in, out, s)
+}
+
+func autoConvert_extensions_DaemonSetStatus_To_v1beta1_DaemonSetStatus(in *extensions.DaemonSetStatus, out *DaemonSetStatus, s conversion.Scope) error {
+ out.CurrentNumberScheduled = in.CurrentNumberScheduled
+ out.NumberMisscheduled = in.NumberMisscheduled
+ out.DesiredNumberScheduled = in.DesiredNumberScheduled
+ out.NumberReady = in.NumberReady
+ out.ObservedGeneration = in.ObservedGeneration
+ out.UpdatedNumberScheduled = in.UpdatedNumberScheduled
+ out.NumberAvailable = in.NumberAvailable
+ out.NumberUnavailable = in.NumberUnavailable
+ out.CollisionCount = (*int64)(unsafe.Pointer(in.CollisionCount))
+ return nil
+}
+
+// Convert_extensions_DaemonSetStatus_To_v1beta1_DaemonSetStatus is an autogenerated conversion function.
+func Convert_extensions_DaemonSetStatus_To_v1beta1_DaemonSetStatus(in *extensions.DaemonSetStatus, out *DaemonSetStatus, s conversion.Scope) error {
+ return autoConvert_extensions_DaemonSetStatus_To_v1beta1_DaemonSetStatus(in, out, s)
+}
+
+func autoConvert_v1beta1_DaemonSetUpdateStrategy_To_extensions_DaemonSetUpdateStrategy(in *DaemonSetUpdateStrategy, out *extensions.DaemonSetUpdateStrategy, s conversion.Scope) error {
+ out.Type = extensions.DaemonSetUpdateStrategyType(in.Type)
+ if in.RollingUpdate != nil {
+ in, out := &in.RollingUpdate, &out.RollingUpdate
+ *out = new(extensions.RollingUpdateDaemonSet)
+ if err := Convert_v1beta1_RollingUpdateDaemonSet_To_extensions_RollingUpdateDaemonSet(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.RollingUpdate = nil
+ }
+ return nil
+}
+
+// Convert_v1beta1_DaemonSetUpdateStrategy_To_extensions_DaemonSetUpdateStrategy is an autogenerated conversion function.
+func Convert_v1beta1_DaemonSetUpdateStrategy_To_extensions_DaemonSetUpdateStrategy(in *DaemonSetUpdateStrategy, out *extensions.DaemonSetUpdateStrategy, s conversion.Scope) error {
+ return autoConvert_v1beta1_DaemonSetUpdateStrategy_To_extensions_DaemonSetUpdateStrategy(in, out, s)
+}
+
+func autoConvert_extensions_DaemonSetUpdateStrategy_To_v1beta1_DaemonSetUpdateStrategy(in *extensions.DaemonSetUpdateStrategy, out *DaemonSetUpdateStrategy, s conversion.Scope) error {
+ out.Type = DaemonSetUpdateStrategyType(in.Type)
+ if in.RollingUpdate != nil {
+ in, out := &in.RollingUpdate, &out.RollingUpdate
+ *out = new(RollingUpdateDaemonSet)
+ if err := Convert_extensions_RollingUpdateDaemonSet_To_v1beta1_RollingUpdateDaemonSet(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.RollingUpdate = nil
+ }
+ return nil
+}
+
+// Convert_extensions_DaemonSetUpdateStrategy_To_v1beta1_DaemonSetUpdateStrategy is an autogenerated conversion function.
+func Convert_extensions_DaemonSetUpdateStrategy_To_v1beta1_DaemonSetUpdateStrategy(in *extensions.DaemonSetUpdateStrategy, out *DaemonSetUpdateStrategy, s conversion.Scope) error {
+ return autoConvert_extensions_DaemonSetUpdateStrategy_To_v1beta1_DaemonSetUpdateStrategy(in, out, s)
+}
+
+func autoConvert_v1beta1_Deployment_To_extensions_Deployment(in *Deployment, out *extensions.Deployment, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_DeploymentStatus_To_extensions_DeploymentStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_Deployment_To_extensions_Deployment is an autogenerated conversion function.
+func Convert_v1beta1_Deployment_To_extensions_Deployment(in *Deployment, out *extensions.Deployment, s conversion.Scope) error {
+ return autoConvert_v1beta1_Deployment_To_extensions_Deployment(in, out, s)
+}
+
+func autoConvert_extensions_Deployment_To_v1beta1_Deployment(in *extensions.Deployment, out *Deployment, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_extensions_DeploymentSpec_To_v1beta1_DeploymentSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_extensions_DeploymentStatus_To_v1beta1_DeploymentStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_extensions_Deployment_To_v1beta1_Deployment is an autogenerated conversion function.
+func Convert_extensions_Deployment_To_v1beta1_Deployment(in *extensions.Deployment, out *Deployment, s conversion.Scope) error {
+ return autoConvert_extensions_Deployment_To_v1beta1_Deployment(in, out, s)
+}
+
+func autoConvert_v1beta1_DeploymentCondition_To_extensions_DeploymentCondition(in *DeploymentCondition, out *extensions.DeploymentCondition, s conversion.Scope) error {
+ out.Type = extensions.DeploymentConditionType(in.Type)
+ out.Status = api.ConditionStatus(in.Status)
+ out.LastUpdateTime = in.LastUpdateTime
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_v1beta1_DeploymentCondition_To_extensions_DeploymentCondition is an autogenerated conversion function.
+func Convert_v1beta1_DeploymentCondition_To_extensions_DeploymentCondition(in *DeploymentCondition, out *extensions.DeploymentCondition, s conversion.Scope) error {
+ return autoConvert_v1beta1_DeploymentCondition_To_extensions_DeploymentCondition(in, out, s)
+}
+
+func autoConvert_extensions_DeploymentCondition_To_v1beta1_DeploymentCondition(in *extensions.DeploymentCondition, out *DeploymentCondition, s conversion.Scope) error {
+ out.Type = DeploymentConditionType(in.Type)
+ out.Status = api_v1.ConditionStatus(in.Status)
+ out.LastUpdateTime = in.LastUpdateTime
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_extensions_DeploymentCondition_To_v1beta1_DeploymentCondition is an autogenerated conversion function.
+func Convert_extensions_DeploymentCondition_To_v1beta1_DeploymentCondition(in *extensions.DeploymentCondition, out *DeploymentCondition, s conversion.Scope) error {
+ return autoConvert_extensions_DeploymentCondition_To_v1beta1_DeploymentCondition(in, out, s)
+}
+
+func autoConvert_v1beta1_DeploymentList_To_extensions_DeploymentList(in *DeploymentList, out *extensions.DeploymentList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]extensions.Deployment, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_Deployment_To_extensions_Deployment(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1beta1_DeploymentList_To_extensions_DeploymentList is an autogenerated conversion function.
+func Convert_v1beta1_DeploymentList_To_extensions_DeploymentList(in *DeploymentList, out *extensions.DeploymentList, s conversion.Scope) error {
+ return autoConvert_v1beta1_DeploymentList_To_extensions_DeploymentList(in, out, s)
+}
+
+func autoConvert_extensions_DeploymentList_To_v1beta1_DeploymentList(in *extensions.DeploymentList, out *DeploymentList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Deployment, len(*in))
+ for i := range *in {
+ if err := Convert_extensions_Deployment_To_v1beta1_Deployment(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]Deployment, 0)
+ }
+ return nil
+}
+
+// Convert_extensions_DeploymentList_To_v1beta1_DeploymentList is an autogenerated conversion function.
+func Convert_extensions_DeploymentList_To_v1beta1_DeploymentList(in *extensions.DeploymentList, out *DeploymentList, s conversion.Scope) error {
+ return autoConvert_extensions_DeploymentList_To_v1beta1_DeploymentList(in, out, s)
+}
+
+func autoConvert_v1beta1_DeploymentRollback_To_extensions_DeploymentRollback(in *DeploymentRollback, out *extensions.DeploymentRollback, s conversion.Scope) error {
+ out.Name = in.Name
+ out.UpdatedAnnotations = *(*map[string]string)(unsafe.Pointer(&in.UpdatedAnnotations))
+ if err := Convert_v1beta1_RollbackConfig_To_extensions_RollbackConfig(&in.RollbackTo, &out.RollbackTo, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_DeploymentRollback_To_extensions_DeploymentRollback is an autogenerated conversion function.
+func Convert_v1beta1_DeploymentRollback_To_extensions_DeploymentRollback(in *DeploymentRollback, out *extensions.DeploymentRollback, s conversion.Scope) error {
+ return autoConvert_v1beta1_DeploymentRollback_To_extensions_DeploymentRollback(in, out, s)
+}
+
+func autoConvert_extensions_DeploymentRollback_To_v1beta1_DeploymentRollback(in *extensions.DeploymentRollback, out *DeploymentRollback, s conversion.Scope) error {
+ out.Name = in.Name
+ out.UpdatedAnnotations = *(*map[string]string)(unsafe.Pointer(&in.UpdatedAnnotations))
+ if err := Convert_extensions_RollbackConfig_To_v1beta1_RollbackConfig(&in.RollbackTo, &out.RollbackTo, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_extensions_DeploymentRollback_To_v1beta1_DeploymentRollback is an autogenerated conversion function.
+func Convert_extensions_DeploymentRollback_To_v1beta1_DeploymentRollback(in *extensions.DeploymentRollback, out *DeploymentRollback, s conversion.Scope) error {
+ return autoConvert_extensions_DeploymentRollback_To_v1beta1_DeploymentRollback(in, out, s)
+}
+
+func autoConvert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec(in *DeploymentSpec, out *extensions.DeploymentSpec, s conversion.Scope) error {
+ if err := v1.Convert_Pointer_int32_To_int32(&in.Replicas, &out.Replicas, s); err != nil {
+ return err
+ }
+ out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector))
+ if err := api_v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy(&in.Strategy, &out.Strategy, s); err != nil {
+ return err
+ }
+ out.MinReadySeconds = in.MinReadySeconds
+ out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit))
+ out.Paused = in.Paused
+ out.RollbackTo = (*extensions.RollbackConfig)(unsafe.Pointer(in.RollbackTo))
+ out.ProgressDeadlineSeconds = (*int32)(unsafe.Pointer(in.ProgressDeadlineSeconds))
+ return nil
+}
+
+func autoConvert_extensions_DeploymentSpec_To_v1beta1_DeploymentSpec(in *extensions.DeploymentSpec, out *DeploymentSpec, s conversion.Scope) error {
+ if err := v1.Convert_int32_To_Pointer_int32(&in.Replicas, &out.Replicas, s); err != nil {
+ return err
+ }
+ out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector))
+ if err := api_v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ if err := Convert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy(&in.Strategy, &out.Strategy, s); err != nil {
+ return err
+ }
+ out.MinReadySeconds = in.MinReadySeconds
+ out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit))
+ out.Paused = in.Paused
+ out.RollbackTo = (*RollbackConfig)(unsafe.Pointer(in.RollbackTo))
+ out.ProgressDeadlineSeconds = (*int32)(unsafe.Pointer(in.ProgressDeadlineSeconds))
+ return nil
+}
+
+func autoConvert_v1beta1_DeploymentStatus_To_extensions_DeploymentStatus(in *DeploymentStatus, out *extensions.DeploymentStatus, s conversion.Scope) error {
+ out.ObservedGeneration = in.ObservedGeneration
+ out.Replicas = in.Replicas
+ out.UpdatedReplicas = in.UpdatedReplicas
+ out.ReadyReplicas = in.ReadyReplicas
+ out.AvailableReplicas = in.AvailableReplicas
+ out.UnavailableReplicas = in.UnavailableReplicas
+ out.Conditions = *(*[]extensions.DeploymentCondition)(unsafe.Pointer(&in.Conditions))
+ out.CollisionCount = (*int64)(unsafe.Pointer(in.CollisionCount))
+ return nil
+}
+
+// Convert_v1beta1_DeploymentStatus_To_extensions_DeploymentStatus is an autogenerated conversion function.
+func Convert_v1beta1_DeploymentStatus_To_extensions_DeploymentStatus(in *DeploymentStatus, out *extensions.DeploymentStatus, s conversion.Scope) error {
+ return autoConvert_v1beta1_DeploymentStatus_To_extensions_DeploymentStatus(in, out, s)
+}
+
+func autoConvert_extensions_DeploymentStatus_To_v1beta1_DeploymentStatus(in *extensions.DeploymentStatus, out *DeploymentStatus, s conversion.Scope) error {
+ out.ObservedGeneration = in.ObservedGeneration
+ out.Replicas = in.Replicas
+ out.UpdatedReplicas = in.UpdatedReplicas
+ out.ReadyReplicas = in.ReadyReplicas
+ out.AvailableReplicas = in.AvailableReplicas
+ out.UnavailableReplicas = in.UnavailableReplicas
+ out.Conditions = *(*[]DeploymentCondition)(unsafe.Pointer(&in.Conditions))
+ out.CollisionCount = (*int64)(unsafe.Pointer(in.CollisionCount))
+ return nil
+}
+
+// Convert_extensions_DeploymentStatus_To_v1beta1_DeploymentStatus is an autogenerated conversion function.
+func Convert_extensions_DeploymentStatus_To_v1beta1_DeploymentStatus(in *extensions.DeploymentStatus, out *DeploymentStatus, s conversion.Scope) error {
+ return autoConvert_extensions_DeploymentStatus_To_v1beta1_DeploymentStatus(in, out, s)
+}
+
+func autoConvert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy(in *DeploymentStrategy, out *extensions.DeploymentStrategy, s conversion.Scope) error {
+ out.Type = extensions.DeploymentStrategyType(in.Type)
+ if in.RollingUpdate != nil {
+ in, out := &in.RollingUpdate, &out.RollingUpdate
+ *out = new(extensions.RollingUpdateDeployment)
+ if err := Convert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDeployment(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.RollingUpdate = nil
+ }
+ return nil
+}
+
+func autoConvert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy(in *extensions.DeploymentStrategy, out *DeploymentStrategy, s conversion.Scope) error {
+ out.Type = DeploymentStrategyType(in.Type)
+ if in.RollingUpdate != nil {
+ in, out := &in.RollingUpdate, &out.RollingUpdate
+ *out = new(RollingUpdateDeployment)
+ if err := Convert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDeployment(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.RollingUpdate = nil
+ }
+ return nil
+}
+
+func autoConvert_v1beta1_FSGroupStrategyOptions_To_extensions_FSGroupStrategyOptions(in *FSGroupStrategyOptions, out *extensions.FSGroupStrategyOptions, s conversion.Scope) error {
+ out.Rule = extensions.FSGroupStrategyType(in.Rule)
+ out.Ranges = *(*[]extensions.GroupIDRange)(unsafe.Pointer(&in.Ranges))
+ return nil
+}
+
+// Convert_v1beta1_FSGroupStrategyOptions_To_extensions_FSGroupStrategyOptions is an autogenerated conversion function.
+func Convert_v1beta1_FSGroupStrategyOptions_To_extensions_FSGroupStrategyOptions(in *FSGroupStrategyOptions, out *extensions.FSGroupStrategyOptions, s conversion.Scope) error {
+ return autoConvert_v1beta1_FSGroupStrategyOptions_To_extensions_FSGroupStrategyOptions(in, out, s)
+}
+
+func autoConvert_extensions_FSGroupStrategyOptions_To_v1beta1_FSGroupStrategyOptions(in *extensions.FSGroupStrategyOptions, out *FSGroupStrategyOptions, s conversion.Scope) error {
+ out.Rule = FSGroupStrategyType(in.Rule)
+ out.Ranges = *(*[]IDRange)(unsafe.Pointer(&in.Ranges))
+ return nil
+}
+
+// Convert_extensions_FSGroupStrategyOptions_To_v1beta1_FSGroupStrategyOptions is an autogenerated conversion function.
+func Convert_extensions_FSGroupStrategyOptions_To_v1beta1_FSGroupStrategyOptions(in *extensions.FSGroupStrategyOptions, out *FSGroupStrategyOptions, s conversion.Scope) error {
+ return autoConvert_extensions_FSGroupStrategyOptions_To_v1beta1_FSGroupStrategyOptions(in, out, s)
+}
+
+func autoConvert_v1beta1_HTTPIngressPath_To_extensions_HTTPIngressPath(in *HTTPIngressPath, out *extensions.HTTPIngressPath, s conversion.Scope) error {
+ out.Path = in.Path
+ if err := Convert_v1beta1_IngressBackend_To_extensions_IngressBackend(&in.Backend, &out.Backend, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_HTTPIngressPath_To_extensions_HTTPIngressPath is an autogenerated conversion function.
+func Convert_v1beta1_HTTPIngressPath_To_extensions_HTTPIngressPath(in *HTTPIngressPath, out *extensions.HTTPIngressPath, s conversion.Scope) error {
+ return autoConvert_v1beta1_HTTPIngressPath_To_extensions_HTTPIngressPath(in, out, s)
+}
+
+func autoConvert_extensions_HTTPIngressPath_To_v1beta1_HTTPIngressPath(in *extensions.HTTPIngressPath, out *HTTPIngressPath, s conversion.Scope) error {
+ out.Path = in.Path
+ if err := Convert_extensions_IngressBackend_To_v1beta1_IngressBackend(&in.Backend, &out.Backend, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_extensions_HTTPIngressPath_To_v1beta1_HTTPIngressPath is an autogenerated conversion function.
+func Convert_extensions_HTTPIngressPath_To_v1beta1_HTTPIngressPath(in *extensions.HTTPIngressPath, out *HTTPIngressPath, s conversion.Scope) error {
+ return autoConvert_extensions_HTTPIngressPath_To_v1beta1_HTTPIngressPath(in, out, s)
+}
+
+func autoConvert_v1beta1_HTTPIngressRuleValue_To_extensions_HTTPIngressRuleValue(in *HTTPIngressRuleValue, out *extensions.HTTPIngressRuleValue, s conversion.Scope) error {
+ out.Paths = *(*[]extensions.HTTPIngressPath)(unsafe.Pointer(&in.Paths))
+ return nil
+}
+
+// Convert_v1beta1_HTTPIngressRuleValue_To_extensions_HTTPIngressRuleValue is an autogenerated conversion function.
+func Convert_v1beta1_HTTPIngressRuleValue_To_extensions_HTTPIngressRuleValue(in *HTTPIngressRuleValue, out *extensions.HTTPIngressRuleValue, s conversion.Scope) error {
+ return autoConvert_v1beta1_HTTPIngressRuleValue_To_extensions_HTTPIngressRuleValue(in, out, s)
+}
+
+func autoConvert_extensions_HTTPIngressRuleValue_To_v1beta1_HTTPIngressRuleValue(in *extensions.HTTPIngressRuleValue, out *HTTPIngressRuleValue, s conversion.Scope) error {
+ if in.Paths == nil {
+ out.Paths = make([]HTTPIngressPath, 0)
+ } else {
+ out.Paths = *(*[]HTTPIngressPath)(unsafe.Pointer(&in.Paths))
+ }
+ return nil
+}
+
+// Convert_extensions_HTTPIngressRuleValue_To_v1beta1_HTTPIngressRuleValue is an autogenerated conversion function.
+func Convert_extensions_HTTPIngressRuleValue_To_v1beta1_HTTPIngressRuleValue(in *extensions.HTTPIngressRuleValue, out *HTTPIngressRuleValue, s conversion.Scope) error {
+ return autoConvert_extensions_HTTPIngressRuleValue_To_v1beta1_HTTPIngressRuleValue(in, out, s)
+}
+
+func autoConvert_v1beta1_HostPortRange_To_extensions_HostPortRange(in *HostPortRange, out *extensions.HostPortRange, s conversion.Scope) error {
+ out.Min = int(in.Min)
+ out.Max = int(in.Max)
+ return nil
+}
+
+// Convert_v1beta1_HostPortRange_To_extensions_HostPortRange is an autogenerated conversion function.
+func Convert_v1beta1_HostPortRange_To_extensions_HostPortRange(in *HostPortRange, out *extensions.HostPortRange, s conversion.Scope) error {
+ return autoConvert_v1beta1_HostPortRange_To_extensions_HostPortRange(in, out, s)
+}
+
+func autoConvert_extensions_HostPortRange_To_v1beta1_HostPortRange(in *extensions.HostPortRange, out *HostPortRange, s conversion.Scope) error {
+ out.Min = int32(in.Min)
+ out.Max = int32(in.Max)
+ return nil
+}
+
+// Convert_extensions_HostPortRange_To_v1beta1_HostPortRange is an autogenerated conversion function.
+func Convert_extensions_HostPortRange_To_v1beta1_HostPortRange(in *extensions.HostPortRange, out *HostPortRange, s conversion.Scope) error {
+ return autoConvert_extensions_HostPortRange_To_v1beta1_HostPortRange(in, out, s)
+}
+
+func autoConvert_v1beta1_Ingress_To_extensions_Ingress(in *Ingress, out *extensions.Ingress, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1beta1_IngressSpec_To_extensions_IngressSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_IngressStatus_To_extensions_IngressStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_Ingress_To_extensions_Ingress is an autogenerated conversion function.
+func Convert_v1beta1_Ingress_To_extensions_Ingress(in *Ingress, out *extensions.Ingress, s conversion.Scope) error {
+ return autoConvert_v1beta1_Ingress_To_extensions_Ingress(in, out, s)
+}
+
+func autoConvert_extensions_Ingress_To_v1beta1_Ingress(in *extensions.Ingress, out *Ingress, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_extensions_IngressSpec_To_v1beta1_IngressSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_extensions_IngressStatus_To_v1beta1_IngressStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_extensions_Ingress_To_v1beta1_Ingress is an autogenerated conversion function.
+func Convert_extensions_Ingress_To_v1beta1_Ingress(in *extensions.Ingress, out *Ingress, s conversion.Scope) error {
+ return autoConvert_extensions_Ingress_To_v1beta1_Ingress(in, out, s)
+}
+
+func autoConvert_v1beta1_IngressBackend_To_extensions_IngressBackend(in *IngressBackend, out *extensions.IngressBackend, s conversion.Scope) error {
+ out.ServiceName = in.ServiceName
+ out.ServicePort = in.ServicePort
+ return nil
+}
+
+// Convert_v1beta1_IngressBackend_To_extensions_IngressBackend is an autogenerated conversion function.
+func Convert_v1beta1_IngressBackend_To_extensions_IngressBackend(in *IngressBackend, out *extensions.IngressBackend, s conversion.Scope) error {
+ return autoConvert_v1beta1_IngressBackend_To_extensions_IngressBackend(in, out, s)
+}
+
+func autoConvert_extensions_IngressBackend_To_v1beta1_IngressBackend(in *extensions.IngressBackend, out *IngressBackend, s conversion.Scope) error {
+ out.ServiceName = in.ServiceName
+ out.ServicePort = in.ServicePort
+ return nil
+}
+
+// Convert_extensions_IngressBackend_To_v1beta1_IngressBackend is an autogenerated conversion function.
+func Convert_extensions_IngressBackend_To_v1beta1_IngressBackend(in *extensions.IngressBackend, out *IngressBackend, s conversion.Scope) error {
+ return autoConvert_extensions_IngressBackend_To_v1beta1_IngressBackend(in, out, s)
+}
+
+func autoConvert_v1beta1_IngressList_To_extensions_IngressList(in *IngressList, out *extensions.IngressList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]extensions.Ingress)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1beta1_IngressList_To_extensions_IngressList is an autogenerated conversion function.
+func Convert_v1beta1_IngressList_To_extensions_IngressList(in *IngressList, out *extensions.IngressList, s conversion.Scope) error {
+ return autoConvert_v1beta1_IngressList_To_extensions_IngressList(in, out, s)
+}
+
+func autoConvert_extensions_IngressList_To_v1beta1_IngressList(in *extensions.IngressList, out *IngressList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]Ingress, 0)
+ } else {
+ out.Items = *(*[]Ingress)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_extensions_IngressList_To_v1beta1_IngressList is an autogenerated conversion function.
+func Convert_extensions_IngressList_To_v1beta1_IngressList(in *extensions.IngressList, out *IngressList, s conversion.Scope) error {
+ return autoConvert_extensions_IngressList_To_v1beta1_IngressList(in, out, s)
+}
+
+func autoConvert_v1beta1_IngressRule_To_extensions_IngressRule(in *IngressRule, out *extensions.IngressRule, s conversion.Scope) error {
+ out.Host = in.Host
+ if err := Convert_v1beta1_IngressRuleValue_To_extensions_IngressRuleValue(&in.IngressRuleValue, &out.IngressRuleValue, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_IngressRule_To_extensions_IngressRule is an autogenerated conversion function.
+func Convert_v1beta1_IngressRule_To_extensions_IngressRule(in *IngressRule, out *extensions.IngressRule, s conversion.Scope) error {
+ return autoConvert_v1beta1_IngressRule_To_extensions_IngressRule(in, out, s)
+}
+
+func autoConvert_extensions_IngressRule_To_v1beta1_IngressRule(in *extensions.IngressRule, out *IngressRule, s conversion.Scope) error {
+ out.Host = in.Host
+ if err := Convert_extensions_IngressRuleValue_To_v1beta1_IngressRuleValue(&in.IngressRuleValue, &out.IngressRuleValue, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_extensions_IngressRule_To_v1beta1_IngressRule is an autogenerated conversion function.
+func Convert_extensions_IngressRule_To_v1beta1_IngressRule(in *extensions.IngressRule, out *IngressRule, s conversion.Scope) error {
+ return autoConvert_extensions_IngressRule_To_v1beta1_IngressRule(in, out, s)
+}
+
+func autoConvert_v1beta1_IngressRuleValue_To_extensions_IngressRuleValue(in *IngressRuleValue, out *extensions.IngressRuleValue, s conversion.Scope) error {
+ out.HTTP = (*extensions.HTTPIngressRuleValue)(unsafe.Pointer(in.HTTP))
+ return nil
+}
+
+// Convert_v1beta1_IngressRuleValue_To_extensions_IngressRuleValue is an autogenerated conversion function.
+func Convert_v1beta1_IngressRuleValue_To_extensions_IngressRuleValue(in *IngressRuleValue, out *extensions.IngressRuleValue, s conversion.Scope) error {
+ return autoConvert_v1beta1_IngressRuleValue_To_extensions_IngressRuleValue(in, out, s)
+}
+
+func autoConvert_extensions_IngressRuleValue_To_v1beta1_IngressRuleValue(in *extensions.IngressRuleValue, out *IngressRuleValue, s conversion.Scope) error {
+ out.HTTP = (*HTTPIngressRuleValue)(unsafe.Pointer(in.HTTP))
+ return nil
+}
+
+// Convert_extensions_IngressRuleValue_To_v1beta1_IngressRuleValue is an autogenerated conversion function.
+func Convert_extensions_IngressRuleValue_To_v1beta1_IngressRuleValue(in *extensions.IngressRuleValue, out *IngressRuleValue, s conversion.Scope) error {
+ return autoConvert_extensions_IngressRuleValue_To_v1beta1_IngressRuleValue(in, out, s)
+}
+
+func autoConvert_v1beta1_IngressSpec_To_extensions_IngressSpec(in *IngressSpec, out *extensions.IngressSpec, s conversion.Scope) error {
+ out.Backend = (*extensions.IngressBackend)(unsafe.Pointer(in.Backend))
+ out.TLS = *(*[]extensions.IngressTLS)(unsafe.Pointer(&in.TLS))
+ out.Rules = *(*[]extensions.IngressRule)(unsafe.Pointer(&in.Rules))
+ return nil
+}
+
+// Convert_v1beta1_IngressSpec_To_extensions_IngressSpec is an autogenerated conversion function.
+func Convert_v1beta1_IngressSpec_To_extensions_IngressSpec(in *IngressSpec, out *extensions.IngressSpec, s conversion.Scope) error {
+ return autoConvert_v1beta1_IngressSpec_To_extensions_IngressSpec(in, out, s)
+}
+
+func autoConvert_extensions_IngressSpec_To_v1beta1_IngressSpec(in *extensions.IngressSpec, out *IngressSpec, s conversion.Scope) error {
+ out.Backend = (*IngressBackend)(unsafe.Pointer(in.Backend))
+ out.TLS = *(*[]IngressTLS)(unsafe.Pointer(&in.TLS))
+ out.Rules = *(*[]IngressRule)(unsafe.Pointer(&in.Rules))
+ return nil
+}
+
+// Convert_extensions_IngressSpec_To_v1beta1_IngressSpec is an autogenerated conversion function.
+func Convert_extensions_IngressSpec_To_v1beta1_IngressSpec(in *extensions.IngressSpec, out *IngressSpec, s conversion.Scope) error {
+ return autoConvert_extensions_IngressSpec_To_v1beta1_IngressSpec(in, out, s)
+}
+
+func autoConvert_v1beta1_IngressStatus_To_extensions_IngressStatus(in *IngressStatus, out *extensions.IngressStatus, s conversion.Scope) error {
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.LoadBalancer, &out.LoadBalancer, 0); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_IngressStatus_To_extensions_IngressStatus is an autogenerated conversion function.
+func Convert_v1beta1_IngressStatus_To_extensions_IngressStatus(in *IngressStatus, out *extensions.IngressStatus, s conversion.Scope) error {
+ return autoConvert_v1beta1_IngressStatus_To_extensions_IngressStatus(in, out, s)
+}
+
+func autoConvert_extensions_IngressStatus_To_v1beta1_IngressStatus(in *extensions.IngressStatus, out *IngressStatus, s conversion.Scope) error {
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.LoadBalancer, &out.LoadBalancer, 0); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_extensions_IngressStatus_To_v1beta1_IngressStatus is an autogenerated conversion function.
+func Convert_extensions_IngressStatus_To_v1beta1_IngressStatus(in *extensions.IngressStatus, out *IngressStatus, s conversion.Scope) error {
+ return autoConvert_extensions_IngressStatus_To_v1beta1_IngressStatus(in, out, s)
+}
+
+func autoConvert_v1beta1_IngressTLS_To_extensions_IngressTLS(in *IngressTLS, out *extensions.IngressTLS, s conversion.Scope) error {
+ out.Hosts = *(*[]string)(unsafe.Pointer(&in.Hosts))
+ out.SecretName = in.SecretName
+ return nil
+}
+
+// Convert_v1beta1_IngressTLS_To_extensions_IngressTLS is an autogenerated conversion function.
+func Convert_v1beta1_IngressTLS_To_extensions_IngressTLS(in *IngressTLS, out *extensions.IngressTLS, s conversion.Scope) error {
+ return autoConvert_v1beta1_IngressTLS_To_extensions_IngressTLS(in, out, s)
+}
+
+func autoConvert_extensions_IngressTLS_To_v1beta1_IngressTLS(in *extensions.IngressTLS, out *IngressTLS, s conversion.Scope) error {
+ out.Hosts = *(*[]string)(unsafe.Pointer(&in.Hosts))
+ out.SecretName = in.SecretName
+ return nil
+}
+
+// Convert_extensions_IngressTLS_To_v1beta1_IngressTLS is an autogenerated conversion function.
+func Convert_extensions_IngressTLS_To_v1beta1_IngressTLS(in *extensions.IngressTLS, out *IngressTLS, s conversion.Scope) error {
+ return autoConvert_extensions_IngressTLS_To_v1beta1_IngressTLS(in, out, s)
+}
+
+func autoConvert_v1beta1_NetworkPolicy_To_extensions_NetworkPolicy(in *NetworkPolicy, out *extensions.NetworkPolicy, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1beta1_NetworkPolicySpec_To_extensions_NetworkPolicySpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_NetworkPolicy_To_extensions_NetworkPolicy is an autogenerated conversion function.
+func Convert_v1beta1_NetworkPolicy_To_extensions_NetworkPolicy(in *NetworkPolicy, out *extensions.NetworkPolicy, s conversion.Scope) error {
+ return autoConvert_v1beta1_NetworkPolicy_To_extensions_NetworkPolicy(in, out, s)
+}
+
+func autoConvert_extensions_NetworkPolicy_To_v1beta1_NetworkPolicy(in *extensions.NetworkPolicy, out *NetworkPolicy, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_extensions_NetworkPolicySpec_To_v1beta1_NetworkPolicySpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_extensions_NetworkPolicy_To_v1beta1_NetworkPolicy is an autogenerated conversion function.
+func Convert_extensions_NetworkPolicy_To_v1beta1_NetworkPolicy(in *extensions.NetworkPolicy, out *NetworkPolicy, s conversion.Scope) error {
+ return autoConvert_extensions_NetworkPolicy_To_v1beta1_NetworkPolicy(in, out, s)
+}
+
+func autoConvert_v1beta1_NetworkPolicyIngressRule_To_extensions_NetworkPolicyIngressRule(in *NetworkPolicyIngressRule, out *extensions.NetworkPolicyIngressRule, s conversion.Scope) error {
+ out.Ports = *(*[]extensions.NetworkPolicyPort)(unsafe.Pointer(&in.Ports))
+ out.From = *(*[]extensions.NetworkPolicyPeer)(unsafe.Pointer(&in.From))
+ return nil
+}
+
+// Convert_v1beta1_NetworkPolicyIngressRule_To_extensions_NetworkPolicyIngressRule is an autogenerated conversion function.
+func Convert_v1beta1_NetworkPolicyIngressRule_To_extensions_NetworkPolicyIngressRule(in *NetworkPolicyIngressRule, out *extensions.NetworkPolicyIngressRule, s conversion.Scope) error {
+ return autoConvert_v1beta1_NetworkPolicyIngressRule_To_extensions_NetworkPolicyIngressRule(in, out, s)
+}
+
+func autoConvert_extensions_NetworkPolicyIngressRule_To_v1beta1_NetworkPolicyIngressRule(in *extensions.NetworkPolicyIngressRule, out *NetworkPolicyIngressRule, s conversion.Scope) error {
+ out.Ports = *(*[]NetworkPolicyPort)(unsafe.Pointer(&in.Ports))
+ out.From = *(*[]NetworkPolicyPeer)(unsafe.Pointer(&in.From))
+ return nil
+}
+
+// Convert_extensions_NetworkPolicyIngressRule_To_v1beta1_NetworkPolicyIngressRule is an autogenerated conversion function.
+func Convert_extensions_NetworkPolicyIngressRule_To_v1beta1_NetworkPolicyIngressRule(in *extensions.NetworkPolicyIngressRule, out *NetworkPolicyIngressRule, s conversion.Scope) error {
+ return autoConvert_extensions_NetworkPolicyIngressRule_To_v1beta1_NetworkPolicyIngressRule(in, out, s)
+}
+
+func autoConvert_v1beta1_NetworkPolicyList_To_extensions_NetworkPolicyList(in *NetworkPolicyList, out *extensions.NetworkPolicyList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]extensions.NetworkPolicy)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1beta1_NetworkPolicyList_To_extensions_NetworkPolicyList is an autogenerated conversion function.
+func Convert_v1beta1_NetworkPolicyList_To_extensions_NetworkPolicyList(in *NetworkPolicyList, out *extensions.NetworkPolicyList, s conversion.Scope) error {
+ return autoConvert_v1beta1_NetworkPolicyList_To_extensions_NetworkPolicyList(in, out, s)
+}
+
+func autoConvert_extensions_NetworkPolicyList_To_v1beta1_NetworkPolicyList(in *extensions.NetworkPolicyList, out *NetworkPolicyList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]NetworkPolicy, 0)
+ } else {
+ out.Items = *(*[]NetworkPolicy)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_extensions_NetworkPolicyList_To_v1beta1_NetworkPolicyList is an autogenerated conversion function.
+func Convert_extensions_NetworkPolicyList_To_v1beta1_NetworkPolicyList(in *extensions.NetworkPolicyList, out *NetworkPolicyList, s conversion.Scope) error {
+ return autoConvert_extensions_NetworkPolicyList_To_v1beta1_NetworkPolicyList(in, out, s)
+}
+
+func autoConvert_v1beta1_NetworkPolicyPeer_To_extensions_NetworkPolicyPeer(in *NetworkPolicyPeer, out *extensions.NetworkPolicyPeer, s conversion.Scope) error {
+ out.PodSelector = (*v1.LabelSelector)(unsafe.Pointer(in.PodSelector))
+ out.NamespaceSelector = (*v1.LabelSelector)(unsafe.Pointer(in.NamespaceSelector))
+ return nil
+}
+
+// Convert_v1beta1_NetworkPolicyPeer_To_extensions_NetworkPolicyPeer is an autogenerated conversion function.
+func Convert_v1beta1_NetworkPolicyPeer_To_extensions_NetworkPolicyPeer(in *NetworkPolicyPeer, out *extensions.NetworkPolicyPeer, s conversion.Scope) error {
+ return autoConvert_v1beta1_NetworkPolicyPeer_To_extensions_NetworkPolicyPeer(in, out, s)
+}
+
+func autoConvert_extensions_NetworkPolicyPeer_To_v1beta1_NetworkPolicyPeer(in *extensions.NetworkPolicyPeer, out *NetworkPolicyPeer, s conversion.Scope) error {
+ out.PodSelector = (*v1.LabelSelector)(unsafe.Pointer(in.PodSelector))
+ out.NamespaceSelector = (*v1.LabelSelector)(unsafe.Pointer(in.NamespaceSelector))
+ return nil
+}
+
+// Convert_extensions_NetworkPolicyPeer_To_v1beta1_NetworkPolicyPeer is an autogenerated conversion function.
+func Convert_extensions_NetworkPolicyPeer_To_v1beta1_NetworkPolicyPeer(in *extensions.NetworkPolicyPeer, out *NetworkPolicyPeer, s conversion.Scope) error {
+ return autoConvert_extensions_NetworkPolicyPeer_To_v1beta1_NetworkPolicyPeer(in, out, s)
+}
+
+func autoConvert_v1beta1_NetworkPolicyPort_To_extensions_NetworkPolicyPort(in *NetworkPolicyPort, out *extensions.NetworkPolicyPort, s conversion.Scope) error {
+ out.Protocol = (*api.Protocol)(unsafe.Pointer(in.Protocol))
+ out.Port = (*intstr.IntOrString)(unsafe.Pointer(in.Port))
+ return nil
+}
+
+// Convert_v1beta1_NetworkPolicyPort_To_extensions_NetworkPolicyPort is an autogenerated conversion function.
+func Convert_v1beta1_NetworkPolicyPort_To_extensions_NetworkPolicyPort(in *NetworkPolicyPort, out *extensions.NetworkPolicyPort, s conversion.Scope) error {
+ return autoConvert_v1beta1_NetworkPolicyPort_To_extensions_NetworkPolicyPort(in, out, s)
+}
+
+func autoConvert_extensions_NetworkPolicyPort_To_v1beta1_NetworkPolicyPort(in *extensions.NetworkPolicyPort, out *NetworkPolicyPort, s conversion.Scope) error {
+ out.Protocol = (*api_v1.Protocol)(unsafe.Pointer(in.Protocol))
+ out.Port = (*intstr.IntOrString)(unsafe.Pointer(in.Port))
+ return nil
+}
+
+// Convert_extensions_NetworkPolicyPort_To_v1beta1_NetworkPolicyPort is an autogenerated conversion function.
+func Convert_extensions_NetworkPolicyPort_To_v1beta1_NetworkPolicyPort(in *extensions.NetworkPolicyPort, out *NetworkPolicyPort, s conversion.Scope) error {
+ return autoConvert_extensions_NetworkPolicyPort_To_v1beta1_NetworkPolicyPort(in, out, s)
+}
+
+func autoConvert_v1beta1_NetworkPolicySpec_To_extensions_NetworkPolicySpec(in *NetworkPolicySpec, out *extensions.NetworkPolicySpec, s conversion.Scope) error {
+ out.PodSelector = in.PodSelector
+ out.Ingress = *(*[]extensions.NetworkPolicyIngressRule)(unsafe.Pointer(&in.Ingress))
+ return nil
+}
+
+// Convert_v1beta1_NetworkPolicySpec_To_extensions_NetworkPolicySpec is an autogenerated conversion function.
+func Convert_v1beta1_NetworkPolicySpec_To_extensions_NetworkPolicySpec(in *NetworkPolicySpec, out *extensions.NetworkPolicySpec, s conversion.Scope) error {
+ return autoConvert_v1beta1_NetworkPolicySpec_To_extensions_NetworkPolicySpec(in, out, s)
+}
+
+func autoConvert_extensions_NetworkPolicySpec_To_v1beta1_NetworkPolicySpec(in *extensions.NetworkPolicySpec, out *NetworkPolicySpec, s conversion.Scope) error {
+ out.PodSelector = in.PodSelector
+ out.Ingress = *(*[]NetworkPolicyIngressRule)(unsafe.Pointer(&in.Ingress))
+ return nil
+}
+
+// Convert_extensions_NetworkPolicySpec_To_v1beta1_NetworkPolicySpec is an autogenerated conversion function.
+func Convert_extensions_NetworkPolicySpec_To_v1beta1_NetworkPolicySpec(in *extensions.NetworkPolicySpec, out *NetworkPolicySpec, s conversion.Scope) error {
+ return autoConvert_extensions_NetworkPolicySpec_To_v1beta1_NetworkPolicySpec(in, out, s)
+}
+
+func autoConvert_v1beta1_PodSecurityPolicy_To_extensions_PodSecurityPolicy(in *PodSecurityPolicy, out *extensions.PodSecurityPolicy, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_PodSecurityPolicy_To_extensions_PodSecurityPolicy is an autogenerated conversion function.
+func Convert_v1beta1_PodSecurityPolicy_To_extensions_PodSecurityPolicy(in *PodSecurityPolicy, out *extensions.PodSecurityPolicy, s conversion.Scope) error {
+ return autoConvert_v1beta1_PodSecurityPolicy_To_extensions_PodSecurityPolicy(in, out, s)
+}
+
+func autoConvert_extensions_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy(in *extensions.PodSecurityPolicy, out *PodSecurityPolicy, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_extensions_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy is an autogenerated conversion function.
+func Convert_extensions_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy(in *extensions.PodSecurityPolicy, out *PodSecurityPolicy, s conversion.Scope) error {
+ return autoConvert_extensions_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy(in, out, s)
+}
+
+func autoConvert_v1beta1_PodSecurityPolicyList_To_extensions_PodSecurityPolicyList(in *PodSecurityPolicyList, out *extensions.PodSecurityPolicyList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]extensions.PodSecurityPolicy, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_PodSecurityPolicy_To_extensions_PodSecurityPolicy(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1beta1_PodSecurityPolicyList_To_extensions_PodSecurityPolicyList is an autogenerated conversion function.
+func Convert_v1beta1_PodSecurityPolicyList_To_extensions_PodSecurityPolicyList(in *PodSecurityPolicyList, out *extensions.PodSecurityPolicyList, s conversion.Scope) error {
+ return autoConvert_v1beta1_PodSecurityPolicyList_To_extensions_PodSecurityPolicyList(in, out, s)
+}
+
+func autoConvert_extensions_PodSecurityPolicyList_To_v1beta1_PodSecurityPolicyList(in *extensions.PodSecurityPolicyList, out *PodSecurityPolicyList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodSecurityPolicy, len(*in))
+ for i := range *in {
+ if err := Convert_extensions_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]PodSecurityPolicy, 0)
+ }
+ return nil
+}
+
+// Convert_extensions_PodSecurityPolicyList_To_v1beta1_PodSecurityPolicyList is an autogenerated conversion function.
+func Convert_extensions_PodSecurityPolicyList_To_v1beta1_PodSecurityPolicyList(in *extensions.PodSecurityPolicyList, out *PodSecurityPolicyList, s conversion.Scope) error {
+ return autoConvert_extensions_PodSecurityPolicyList_To_v1beta1_PodSecurityPolicyList(in, out, s)
+}
+
+func autoConvert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySpec(in *PodSecurityPolicySpec, out *extensions.PodSecurityPolicySpec, s conversion.Scope) error {
+ out.Privileged = in.Privileged
+ out.DefaultAddCapabilities = *(*[]api.Capability)(unsafe.Pointer(&in.DefaultAddCapabilities))
+ out.RequiredDropCapabilities = *(*[]api.Capability)(unsafe.Pointer(&in.RequiredDropCapabilities))
+ out.AllowedCapabilities = *(*[]api.Capability)(unsafe.Pointer(&in.AllowedCapabilities))
+ out.Volumes = *(*[]extensions.FSType)(unsafe.Pointer(&in.Volumes))
+ out.HostNetwork = in.HostNetwork
+ if in.HostPorts != nil {
+ in, out := &in.HostPorts, &out.HostPorts
+ *out = make([]extensions.HostPortRange, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_HostPortRange_To_extensions_HostPortRange(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.HostPorts = nil
+ }
+ out.HostPID = in.HostPID
+ out.HostIPC = in.HostIPC
+ if err := Convert_v1beta1_SELinuxStrategyOptions_To_extensions_SELinuxStrategyOptions(&in.SELinux, &out.SELinux, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_RunAsUserStrategyOptions_To_extensions_RunAsUserStrategyOptions(&in.RunAsUser, &out.RunAsUser, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_SupplementalGroupsStrategyOptions_To_extensions_SupplementalGroupsStrategyOptions(&in.SupplementalGroups, &out.SupplementalGroups, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_FSGroupStrategyOptions_To_extensions_FSGroupStrategyOptions(&in.FSGroup, &out.FSGroup, s); err != nil {
+ return err
+ }
+ out.ReadOnlyRootFilesystem = in.ReadOnlyRootFilesystem
+ return nil
+}
+
+// Convert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySpec is an autogenerated conversion function.
+func Convert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySpec(in *PodSecurityPolicySpec, out *extensions.PodSecurityPolicySpec, s conversion.Scope) error {
+ return autoConvert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySpec(in, out, s)
+}
+
+func autoConvert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec(in *extensions.PodSecurityPolicySpec, out *PodSecurityPolicySpec, s conversion.Scope) error {
+ out.Privileged = in.Privileged
+ out.DefaultAddCapabilities = *(*[]api_v1.Capability)(unsafe.Pointer(&in.DefaultAddCapabilities))
+ out.RequiredDropCapabilities = *(*[]api_v1.Capability)(unsafe.Pointer(&in.RequiredDropCapabilities))
+ out.AllowedCapabilities = *(*[]api_v1.Capability)(unsafe.Pointer(&in.AllowedCapabilities))
+ out.Volumes = *(*[]FSType)(unsafe.Pointer(&in.Volumes))
+ out.HostNetwork = in.HostNetwork
+ if in.HostPorts != nil {
+ in, out := &in.HostPorts, &out.HostPorts
+ *out = make([]HostPortRange, len(*in))
+ for i := range *in {
+ if err := Convert_extensions_HostPortRange_To_v1beta1_HostPortRange(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.HostPorts = nil
+ }
+ out.HostPID = in.HostPID
+ out.HostIPC = in.HostIPC
+ if err := Convert_extensions_SELinuxStrategyOptions_To_v1beta1_SELinuxStrategyOptions(&in.SELinux, &out.SELinux, s); err != nil {
+ return err
+ }
+ if err := Convert_extensions_RunAsUserStrategyOptions_To_v1beta1_RunAsUserStrategyOptions(&in.RunAsUser, &out.RunAsUser, s); err != nil {
+ return err
+ }
+ if err := Convert_extensions_SupplementalGroupsStrategyOptions_To_v1beta1_SupplementalGroupsStrategyOptions(&in.SupplementalGroups, &out.SupplementalGroups, s); err != nil {
+ return err
+ }
+ if err := Convert_extensions_FSGroupStrategyOptions_To_v1beta1_FSGroupStrategyOptions(&in.FSGroup, &out.FSGroup, s); err != nil {
+ return err
+ }
+ out.ReadOnlyRootFilesystem = in.ReadOnlyRootFilesystem
+ return nil
+}
+
+// Convert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec is an autogenerated conversion function.
+func Convert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec(in *extensions.PodSecurityPolicySpec, out *PodSecurityPolicySpec, s conversion.Scope) error {
+ return autoConvert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec(in, out, s)
+}
+
+func autoConvert_v1beta1_ReplicaSet_To_extensions_ReplicaSet(in *ReplicaSet, out *extensions.ReplicaSet, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1beta1_ReplicaSetSpec_To_extensions_ReplicaSetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_ReplicaSetStatus_To_extensions_ReplicaSetStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_ReplicaSet_To_extensions_ReplicaSet is an autogenerated conversion function.
+func Convert_v1beta1_ReplicaSet_To_extensions_ReplicaSet(in *ReplicaSet, out *extensions.ReplicaSet, s conversion.Scope) error {
+ return autoConvert_v1beta1_ReplicaSet_To_extensions_ReplicaSet(in, out, s)
+}
+
+func autoConvert_extensions_ReplicaSet_To_v1beta1_ReplicaSet(in *extensions.ReplicaSet, out *ReplicaSet, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_extensions_ReplicaSetSpec_To_v1beta1_ReplicaSetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_extensions_ReplicaSetStatus_To_v1beta1_ReplicaSetStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_extensions_ReplicaSet_To_v1beta1_ReplicaSet is an autogenerated conversion function.
+func Convert_extensions_ReplicaSet_To_v1beta1_ReplicaSet(in *extensions.ReplicaSet, out *ReplicaSet, s conversion.Scope) error {
+ return autoConvert_extensions_ReplicaSet_To_v1beta1_ReplicaSet(in, out, s)
+}
+
+func autoConvert_v1beta1_ReplicaSetCondition_To_extensions_ReplicaSetCondition(in *ReplicaSetCondition, out *extensions.ReplicaSetCondition, s conversion.Scope) error {
+ out.Type = extensions.ReplicaSetConditionType(in.Type)
+ out.Status = api.ConditionStatus(in.Status)
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_v1beta1_ReplicaSetCondition_To_extensions_ReplicaSetCondition is an autogenerated conversion function.
+func Convert_v1beta1_ReplicaSetCondition_To_extensions_ReplicaSetCondition(in *ReplicaSetCondition, out *extensions.ReplicaSetCondition, s conversion.Scope) error {
+ return autoConvert_v1beta1_ReplicaSetCondition_To_extensions_ReplicaSetCondition(in, out, s)
+}
+
+func autoConvert_extensions_ReplicaSetCondition_To_v1beta1_ReplicaSetCondition(in *extensions.ReplicaSetCondition, out *ReplicaSetCondition, s conversion.Scope) error {
+ out.Type = ReplicaSetConditionType(in.Type)
+ out.Status = api_v1.ConditionStatus(in.Status)
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_extensions_ReplicaSetCondition_To_v1beta1_ReplicaSetCondition is an autogenerated conversion function.
+func Convert_extensions_ReplicaSetCondition_To_v1beta1_ReplicaSetCondition(in *extensions.ReplicaSetCondition, out *ReplicaSetCondition, s conversion.Scope) error {
+ return autoConvert_extensions_ReplicaSetCondition_To_v1beta1_ReplicaSetCondition(in, out, s)
+}
+
+func autoConvert_v1beta1_ReplicaSetList_To_extensions_ReplicaSetList(in *ReplicaSetList, out *extensions.ReplicaSetList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]extensions.ReplicaSet, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_ReplicaSet_To_extensions_ReplicaSet(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1beta1_ReplicaSetList_To_extensions_ReplicaSetList is an autogenerated conversion function.
+func Convert_v1beta1_ReplicaSetList_To_extensions_ReplicaSetList(in *ReplicaSetList, out *extensions.ReplicaSetList, s conversion.Scope) error {
+ return autoConvert_v1beta1_ReplicaSetList_To_extensions_ReplicaSetList(in, out, s)
+}
+
+func autoConvert_extensions_ReplicaSetList_To_v1beta1_ReplicaSetList(in *extensions.ReplicaSetList, out *ReplicaSetList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ReplicaSet, len(*in))
+ for i := range *in {
+ if err := Convert_extensions_ReplicaSet_To_v1beta1_ReplicaSet(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]ReplicaSet, 0)
+ }
+ return nil
+}
+
+// Convert_extensions_ReplicaSetList_To_v1beta1_ReplicaSetList is an autogenerated conversion function.
+func Convert_extensions_ReplicaSetList_To_v1beta1_ReplicaSetList(in *extensions.ReplicaSetList, out *ReplicaSetList, s conversion.Scope) error {
+ return autoConvert_extensions_ReplicaSetList_To_v1beta1_ReplicaSetList(in, out, s)
+}
+
+func autoConvert_v1beta1_ReplicaSetSpec_To_extensions_ReplicaSetSpec(in *ReplicaSetSpec, out *extensions.ReplicaSetSpec, s conversion.Scope) error {
+ if err := v1.Convert_Pointer_int32_To_int32(&in.Replicas, &out.Replicas, s); err != nil {
+ return err
+ }
+ out.MinReadySeconds = in.MinReadySeconds
+ out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector))
+ if err := api_v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func autoConvert_extensions_ReplicaSetSpec_To_v1beta1_ReplicaSetSpec(in *extensions.ReplicaSetSpec, out *ReplicaSetSpec, s conversion.Scope) error {
+ if err := v1.Convert_int32_To_Pointer_int32(&in.Replicas, &out.Replicas, s); err != nil {
+ return err
+ }
+ out.MinReadySeconds = in.MinReadySeconds
+ out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector))
+ if err := api_v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func autoConvert_v1beta1_ReplicaSetStatus_To_extensions_ReplicaSetStatus(in *ReplicaSetStatus, out *extensions.ReplicaSetStatus, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ out.FullyLabeledReplicas = in.FullyLabeledReplicas
+ out.ReadyReplicas = in.ReadyReplicas
+ out.AvailableReplicas = in.AvailableReplicas
+ out.ObservedGeneration = in.ObservedGeneration
+ out.Conditions = *(*[]extensions.ReplicaSetCondition)(unsafe.Pointer(&in.Conditions))
+ return nil
+}
+
+// Convert_v1beta1_ReplicaSetStatus_To_extensions_ReplicaSetStatus is an autogenerated conversion function.
+func Convert_v1beta1_ReplicaSetStatus_To_extensions_ReplicaSetStatus(in *ReplicaSetStatus, out *extensions.ReplicaSetStatus, s conversion.Scope) error {
+ return autoConvert_v1beta1_ReplicaSetStatus_To_extensions_ReplicaSetStatus(in, out, s)
+}
+
+func autoConvert_extensions_ReplicaSetStatus_To_v1beta1_ReplicaSetStatus(in *extensions.ReplicaSetStatus, out *ReplicaSetStatus, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ out.FullyLabeledReplicas = in.FullyLabeledReplicas
+ out.ReadyReplicas = in.ReadyReplicas
+ out.AvailableReplicas = in.AvailableReplicas
+ out.ObservedGeneration = in.ObservedGeneration
+ out.Conditions = *(*[]ReplicaSetCondition)(unsafe.Pointer(&in.Conditions))
+ return nil
+}
+
+// Convert_extensions_ReplicaSetStatus_To_v1beta1_ReplicaSetStatus is an autogenerated conversion function.
+func Convert_extensions_ReplicaSetStatus_To_v1beta1_ReplicaSetStatus(in *extensions.ReplicaSetStatus, out *ReplicaSetStatus, s conversion.Scope) error {
+ return autoConvert_extensions_ReplicaSetStatus_To_v1beta1_ReplicaSetStatus(in, out, s)
+}
+
+func autoConvert_v1beta1_ReplicationControllerDummy_To_extensions_ReplicationControllerDummy(in *ReplicationControllerDummy, out *extensions.ReplicationControllerDummy, s conversion.Scope) error {
+ return nil
+}
+
+// Convert_v1beta1_ReplicationControllerDummy_To_extensions_ReplicationControllerDummy is an autogenerated conversion function.
+func Convert_v1beta1_ReplicationControllerDummy_To_extensions_ReplicationControllerDummy(in *ReplicationControllerDummy, out *extensions.ReplicationControllerDummy, s conversion.Scope) error {
+ return autoConvert_v1beta1_ReplicationControllerDummy_To_extensions_ReplicationControllerDummy(in, out, s)
+}
+
+func autoConvert_extensions_ReplicationControllerDummy_To_v1beta1_ReplicationControllerDummy(in *extensions.ReplicationControllerDummy, out *ReplicationControllerDummy, s conversion.Scope) error {
+ return nil
+}
+
+// Convert_extensions_ReplicationControllerDummy_To_v1beta1_ReplicationControllerDummy is an autogenerated conversion function.
+func Convert_extensions_ReplicationControllerDummy_To_v1beta1_ReplicationControllerDummy(in *extensions.ReplicationControllerDummy, out *ReplicationControllerDummy, s conversion.Scope) error {
+ return autoConvert_extensions_ReplicationControllerDummy_To_v1beta1_ReplicationControllerDummy(in, out, s)
+}
+
+func autoConvert_v1beta1_RollbackConfig_To_extensions_RollbackConfig(in *RollbackConfig, out *extensions.RollbackConfig, s conversion.Scope) error {
+ out.Revision = in.Revision
+ return nil
+}
+
+// Convert_v1beta1_RollbackConfig_To_extensions_RollbackConfig is an autogenerated conversion function.
+func Convert_v1beta1_RollbackConfig_To_extensions_RollbackConfig(in *RollbackConfig, out *extensions.RollbackConfig, s conversion.Scope) error {
+ return autoConvert_v1beta1_RollbackConfig_To_extensions_RollbackConfig(in, out, s)
+}
+
+func autoConvert_extensions_RollbackConfig_To_v1beta1_RollbackConfig(in *extensions.RollbackConfig, out *RollbackConfig, s conversion.Scope) error {
+ out.Revision = in.Revision
+ return nil
+}
+
+// Convert_extensions_RollbackConfig_To_v1beta1_RollbackConfig is an autogenerated conversion function.
+func Convert_extensions_RollbackConfig_To_v1beta1_RollbackConfig(in *extensions.RollbackConfig, out *RollbackConfig, s conversion.Scope) error {
+ return autoConvert_extensions_RollbackConfig_To_v1beta1_RollbackConfig(in, out, s)
+}
+
+func autoConvert_v1beta1_RollingUpdateDaemonSet_To_extensions_RollingUpdateDaemonSet(in *RollingUpdateDaemonSet, out *extensions.RollingUpdateDaemonSet, s conversion.Scope) error {
+ // WARNING: in.MaxUnavailable requires manual conversion: inconvertible types (*k8s.io/apimachinery/pkg/util/intstr.IntOrString vs k8s.io/apimachinery/pkg/util/intstr.IntOrString)
+ return nil
+}
+
+func autoConvert_extensions_RollingUpdateDaemonSet_To_v1beta1_RollingUpdateDaemonSet(in *extensions.RollingUpdateDaemonSet, out *RollingUpdateDaemonSet, s conversion.Scope) error {
+ // WARNING: in.MaxUnavailable requires manual conversion: inconvertible types (k8s.io/apimachinery/pkg/util/intstr.IntOrString vs *k8s.io/apimachinery/pkg/util/intstr.IntOrString)
+ return nil
+}
+
+func autoConvert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDeployment(in *RollingUpdateDeployment, out *extensions.RollingUpdateDeployment, s conversion.Scope) error {
+ // WARNING: in.MaxUnavailable requires manual conversion: inconvertible types (*k8s.io/apimachinery/pkg/util/intstr.IntOrString vs k8s.io/apimachinery/pkg/util/intstr.IntOrString)
+ // WARNING: in.MaxSurge requires manual conversion: inconvertible types (*k8s.io/apimachinery/pkg/util/intstr.IntOrString vs k8s.io/apimachinery/pkg/util/intstr.IntOrString)
+ return nil
+}
+
+func autoConvert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDeployment(in *extensions.RollingUpdateDeployment, out *RollingUpdateDeployment, s conversion.Scope) error {
+ // WARNING: in.MaxUnavailable requires manual conversion: inconvertible types (k8s.io/apimachinery/pkg/util/intstr.IntOrString vs *k8s.io/apimachinery/pkg/util/intstr.IntOrString)
+ // WARNING: in.MaxSurge requires manual conversion: inconvertible types (k8s.io/apimachinery/pkg/util/intstr.IntOrString vs *k8s.io/apimachinery/pkg/util/intstr.IntOrString)
+ return nil
+}
+
+func autoConvert_v1beta1_RunAsUserStrategyOptions_To_extensions_RunAsUserStrategyOptions(in *RunAsUserStrategyOptions, out *extensions.RunAsUserStrategyOptions, s conversion.Scope) error {
+ out.Rule = extensions.RunAsUserStrategy(in.Rule)
+ out.Ranges = *(*[]extensions.UserIDRange)(unsafe.Pointer(&in.Ranges))
+ return nil
+}
+
+// Convert_v1beta1_RunAsUserStrategyOptions_To_extensions_RunAsUserStrategyOptions is an autogenerated conversion function.
+func Convert_v1beta1_RunAsUserStrategyOptions_To_extensions_RunAsUserStrategyOptions(in *RunAsUserStrategyOptions, out *extensions.RunAsUserStrategyOptions, s conversion.Scope) error {
+ return autoConvert_v1beta1_RunAsUserStrategyOptions_To_extensions_RunAsUserStrategyOptions(in, out, s)
+}
+
+func autoConvert_extensions_RunAsUserStrategyOptions_To_v1beta1_RunAsUserStrategyOptions(in *extensions.RunAsUserStrategyOptions, out *RunAsUserStrategyOptions, s conversion.Scope) error {
+ out.Rule = RunAsUserStrategy(in.Rule)
+ out.Ranges = *(*[]IDRange)(unsafe.Pointer(&in.Ranges))
+ return nil
+}
+
+// Convert_extensions_RunAsUserStrategyOptions_To_v1beta1_RunAsUserStrategyOptions is an autogenerated conversion function.
+func Convert_extensions_RunAsUserStrategyOptions_To_v1beta1_RunAsUserStrategyOptions(in *extensions.RunAsUserStrategyOptions, out *RunAsUserStrategyOptions, s conversion.Scope) error {
+ return autoConvert_extensions_RunAsUserStrategyOptions_To_v1beta1_RunAsUserStrategyOptions(in, out, s)
+}
+
+func autoConvert_v1beta1_SELinuxStrategyOptions_To_extensions_SELinuxStrategyOptions(in *SELinuxStrategyOptions, out *extensions.SELinuxStrategyOptions, s conversion.Scope) error {
+ out.Rule = extensions.SELinuxStrategy(in.Rule)
+ out.SELinuxOptions = (*api.SELinuxOptions)(unsafe.Pointer(in.SELinuxOptions))
+ return nil
+}
+
+// Convert_v1beta1_SELinuxStrategyOptions_To_extensions_SELinuxStrategyOptions is an autogenerated conversion function.
+func Convert_v1beta1_SELinuxStrategyOptions_To_extensions_SELinuxStrategyOptions(in *SELinuxStrategyOptions, out *extensions.SELinuxStrategyOptions, s conversion.Scope) error {
+ return autoConvert_v1beta1_SELinuxStrategyOptions_To_extensions_SELinuxStrategyOptions(in, out, s)
+}
+
+func autoConvert_extensions_SELinuxStrategyOptions_To_v1beta1_SELinuxStrategyOptions(in *extensions.SELinuxStrategyOptions, out *SELinuxStrategyOptions, s conversion.Scope) error {
+ out.Rule = SELinuxStrategy(in.Rule)
+ out.SELinuxOptions = (*api_v1.SELinuxOptions)(unsafe.Pointer(in.SELinuxOptions))
+ return nil
+}
+
+// Convert_extensions_SELinuxStrategyOptions_To_v1beta1_SELinuxStrategyOptions is an autogenerated conversion function.
+func Convert_extensions_SELinuxStrategyOptions_To_v1beta1_SELinuxStrategyOptions(in *extensions.SELinuxStrategyOptions, out *SELinuxStrategyOptions, s conversion.Scope) error {
+ return autoConvert_extensions_SELinuxStrategyOptions_To_v1beta1_SELinuxStrategyOptions(in, out, s)
+}
+
+func autoConvert_v1beta1_Scale_To_extensions_Scale(in *Scale, out *extensions.Scale, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1beta1_ScaleSpec_To_extensions_ScaleSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_ScaleStatus_To_extensions_ScaleStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_Scale_To_extensions_Scale is an autogenerated conversion function.
+func Convert_v1beta1_Scale_To_extensions_Scale(in *Scale, out *extensions.Scale, s conversion.Scope) error {
+ return autoConvert_v1beta1_Scale_To_extensions_Scale(in, out, s)
+}
+
+func autoConvert_extensions_Scale_To_v1beta1_Scale(in *extensions.Scale, out *Scale, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_extensions_ScaleSpec_To_v1beta1_ScaleSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_extensions_ScaleStatus_To_v1beta1_ScaleStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_extensions_Scale_To_v1beta1_Scale is an autogenerated conversion function.
+func Convert_extensions_Scale_To_v1beta1_Scale(in *extensions.Scale, out *Scale, s conversion.Scope) error {
+ return autoConvert_extensions_Scale_To_v1beta1_Scale(in, out, s)
+}
+
+func autoConvert_v1beta1_ScaleSpec_To_extensions_ScaleSpec(in *ScaleSpec, out *extensions.ScaleSpec, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ return nil
+}
+
+// Convert_v1beta1_ScaleSpec_To_extensions_ScaleSpec is an autogenerated conversion function.
+func Convert_v1beta1_ScaleSpec_To_extensions_ScaleSpec(in *ScaleSpec, out *extensions.ScaleSpec, s conversion.Scope) error {
+ return autoConvert_v1beta1_ScaleSpec_To_extensions_ScaleSpec(in, out, s)
+}
+
+func autoConvert_extensions_ScaleSpec_To_v1beta1_ScaleSpec(in *extensions.ScaleSpec, out *ScaleSpec, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ return nil
+}
+
+// Convert_extensions_ScaleSpec_To_v1beta1_ScaleSpec is an autogenerated conversion function.
+func Convert_extensions_ScaleSpec_To_v1beta1_ScaleSpec(in *extensions.ScaleSpec, out *ScaleSpec, s conversion.Scope) error {
+ return autoConvert_extensions_ScaleSpec_To_v1beta1_ScaleSpec(in, out, s)
+}
+
+func autoConvert_v1beta1_ScaleStatus_To_extensions_ScaleStatus(in *ScaleStatus, out *extensions.ScaleStatus, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ // WARNING: in.Selector requires manual conversion: inconvertible types (map[string]string vs *k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector)
+ // WARNING: in.TargetSelector requires manual conversion: does not exist in peer-type
+ return nil
+}
+
+func autoConvert_extensions_ScaleStatus_To_v1beta1_ScaleStatus(in *extensions.ScaleStatus, out *ScaleStatus, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ // WARNING: in.Selector requires manual conversion: inconvertible types (*k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector vs map[string]string)
+ return nil
+}
+
+func autoConvert_v1beta1_SupplementalGroupsStrategyOptions_To_extensions_SupplementalGroupsStrategyOptions(in *SupplementalGroupsStrategyOptions, out *extensions.SupplementalGroupsStrategyOptions, s conversion.Scope) error {
+ out.Rule = extensions.SupplementalGroupsStrategyType(in.Rule)
+ out.Ranges = *(*[]extensions.GroupIDRange)(unsafe.Pointer(&in.Ranges))
+ return nil
+}
+
+// Convert_v1beta1_SupplementalGroupsStrategyOptions_To_extensions_SupplementalGroupsStrategyOptions is an autogenerated conversion function.
+func Convert_v1beta1_SupplementalGroupsStrategyOptions_To_extensions_SupplementalGroupsStrategyOptions(in *SupplementalGroupsStrategyOptions, out *extensions.SupplementalGroupsStrategyOptions, s conversion.Scope) error {
+ return autoConvert_v1beta1_SupplementalGroupsStrategyOptions_To_extensions_SupplementalGroupsStrategyOptions(in, out, s)
+}
+
+func autoConvert_extensions_SupplementalGroupsStrategyOptions_To_v1beta1_SupplementalGroupsStrategyOptions(in *extensions.SupplementalGroupsStrategyOptions, out *SupplementalGroupsStrategyOptions, s conversion.Scope) error {
+ out.Rule = SupplementalGroupsStrategyType(in.Rule)
+ out.Ranges = *(*[]IDRange)(unsafe.Pointer(&in.Ranges))
+ return nil
+}
+
+// Convert_extensions_SupplementalGroupsStrategyOptions_To_v1beta1_SupplementalGroupsStrategyOptions is an autogenerated conversion function.
+func Convert_extensions_SupplementalGroupsStrategyOptions_To_v1beta1_SupplementalGroupsStrategyOptions(in *extensions.SupplementalGroupsStrategyOptions, out *SupplementalGroupsStrategyOptions, s conversion.Scope) error {
+ return autoConvert_extensions_SupplementalGroupsStrategyOptions_To_v1beta1_SupplementalGroupsStrategyOptions(in, out, s)
+}
+
+func autoConvert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource(in *ThirdPartyResource, out *extensions.ThirdPartyResource, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Description = in.Description
+ out.Versions = *(*[]extensions.APIVersion)(unsafe.Pointer(&in.Versions))
+ return nil
+}
+
+// Convert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource is an autogenerated conversion function.
+func Convert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource(in *ThirdPartyResource, out *extensions.ThirdPartyResource, s conversion.Scope) error {
+ return autoConvert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource(in, out, s)
+}
+
+func autoConvert_extensions_ThirdPartyResource_To_v1beta1_ThirdPartyResource(in *extensions.ThirdPartyResource, out *ThirdPartyResource, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Description = in.Description
+ out.Versions = *(*[]APIVersion)(unsafe.Pointer(&in.Versions))
+ return nil
+}
+
+// Convert_extensions_ThirdPartyResource_To_v1beta1_ThirdPartyResource is an autogenerated conversion function.
+func Convert_extensions_ThirdPartyResource_To_v1beta1_ThirdPartyResource(in *extensions.ThirdPartyResource, out *ThirdPartyResource, s conversion.Scope) error {
+ return autoConvert_extensions_ThirdPartyResource_To_v1beta1_ThirdPartyResource(in, out, s)
+}
+
+func autoConvert_v1beta1_ThirdPartyResourceData_To_extensions_ThirdPartyResourceData(in *ThirdPartyResourceData, out *extensions.ThirdPartyResourceData, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Data = *(*[]byte)(unsafe.Pointer(&in.Data))
+ return nil
+}
+
+// Convert_v1beta1_ThirdPartyResourceData_To_extensions_ThirdPartyResourceData is an autogenerated conversion function.
+func Convert_v1beta1_ThirdPartyResourceData_To_extensions_ThirdPartyResourceData(in *ThirdPartyResourceData, out *extensions.ThirdPartyResourceData, s conversion.Scope) error {
+ return autoConvert_v1beta1_ThirdPartyResourceData_To_extensions_ThirdPartyResourceData(in, out, s)
+}
+
+func autoConvert_extensions_ThirdPartyResourceData_To_v1beta1_ThirdPartyResourceData(in *extensions.ThirdPartyResourceData, out *ThirdPartyResourceData, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Data = *(*[]byte)(unsafe.Pointer(&in.Data))
+ return nil
+}
+
+// Convert_extensions_ThirdPartyResourceData_To_v1beta1_ThirdPartyResourceData is an autogenerated conversion function.
+func Convert_extensions_ThirdPartyResourceData_To_v1beta1_ThirdPartyResourceData(in *extensions.ThirdPartyResourceData, out *ThirdPartyResourceData, s conversion.Scope) error {
+ return autoConvert_extensions_ThirdPartyResourceData_To_v1beta1_ThirdPartyResourceData(in, out, s)
+}
+
+func autoConvert_v1beta1_ThirdPartyResourceDataList_To_extensions_ThirdPartyResourceDataList(in *ThirdPartyResourceDataList, out *extensions.ThirdPartyResourceDataList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]extensions.ThirdPartyResourceData)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1beta1_ThirdPartyResourceDataList_To_extensions_ThirdPartyResourceDataList is an autogenerated conversion function.
+func Convert_v1beta1_ThirdPartyResourceDataList_To_extensions_ThirdPartyResourceDataList(in *ThirdPartyResourceDataList, out *extensions.ThirdPartyResourceDataList, s conversion.Scope) error {
+ return autoConvert_v1beta1_ThirdPartyResourceDataList_To_extensions_ThirdPartyResourceDataList(in, out, s)
+}
+
+func autoConvert_extensions_ThirdPartyResourceDataList_To_v1beta1_ThirdPartyResourceDataList(in *extensions.ThirdPartyResourceDataList, out *ThirdPartyResourceDataList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]ThirdPartyResourceData, 0)
+ } else {
+ out.Items = *(*[]ThirdPartyResourceData)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_extensions_ThirdPartyResourceDataList_To_v1beta1_ThirdPartyResourceDataList is an autogenerated conversion function.
+func Convert_extensions_ThirdPartyResourceDataList_To_v1beta1_ThirdPartyResourceDataList(in *extensions.ThirdPartyResourceDataList, out *ThirdPartyResourceDataList, s conversion.Scope) error {
+ return autoConvert_extensions_ThirdPartyResourceDataList_To_v1beta1_ThirdPartyResourceDataList(in, out, s)
+}
+
+func autoConvert_v1beta1_ThirdPartyResourceList_To_extensions_ThirdPartyResourceList(in *ThirdPartyResourceList, out *extensions.ThirdPartyResourceList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]extensions.ThirdPartyResource)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1beta1_ThirdPartyResourceList_To_extensions_ThirdPartyResourceList is an autogenerated conversion function.
+func Convert_v1beta1_ThirdPartyResourceList_To_extensions_ThirdPartyResourceList(in *ThirdPartyResourceList, out *extensions.ThirdPartyResourceList, s conversion.Scope) error {
+ return autoConvert_v1beta1_ThirdPartyResourceList_To_extensions_ThirdPartyResourceList(in, out, s)
+}
+
+func autoConvert_extensions_ThirdPartyResourceList_To_v1beta1_ThirdPartyResourceList(in *extensions.ThirdPartyResourceList, out *ThirdPartyResourceList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]ThirdPartyResource, 0)
+ } else {
+ out.Items = *(*[]ThirdPartyResource)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_extensions_ThirdPartyResourceList_To_v1beta1_ThirdPartyResourceList is an autogenerated conversion function.
+func Convert_extensions_ThirdPartyResourceList_To_v1beta1_ThirdPartyResourceList(in *extensions.ThirdPartyResourceList, out *ThirdPartyResourceList, s conversion.Scope) error {
+ return autoConvert_extensions_ThirdPartyResourceList_To_v1beta1_ThirdPartyResourceList(in, out, s)
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..e6d3c5526
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.deepcopy.go
@@ -0,0 +1,1163 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ intstr "k8s.io/apimachinery/pkg/util/intstr"
+ api_v1 "k8s.io/client-go/pkg/api/v1"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_APIVersion, InType: reflect.TypeOf(&APIVersion{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CustomMetricCurrentStatus, InType: reflect.TypeOf(&CustomMetricCurrentStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CustomMetricCurrentStatusList, InType: reflect.TypeOf(&CustomMetricCurrentStatusList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CustomMetricTarget, InType: reflect.TypeOf(&CustomMetricTarget{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CustomMetricTargetList, InType: reflect.TypeOf(&CustomMetricTargetList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DaemonSet, InType: reflect.TypeOf(&DaemonSet{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DaemonSetList, InType: reflect.TypeOf(&DaemonSetList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DaemonSetSpec, InType: reflect.TypeOf(&DaemonSetSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DaemonSetStatus, InType: reflect.TypeOf(&DaemonSetStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DaemonSetUpdateStrategy, InType: reflect.TypeOf(&DaemonSetUpdateStrategy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Deployment, InType: reflect.TypeOf(&Deployment{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentCondition, InType: reflect.TypeOf(&DeploymentCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentList, InType: reflect.TypeOf(&DeploymentList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentRollback, InType: reflect.TypeOf(&DeploymentRollback{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentSpec, InType: reflect.TypeOf(&DeploymentSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentStatus, InType: reflect.TypeOf(&DeploymentStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentStrategy, InType: reflect.TypeOf(&DeploymentStrategy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_FSGroupStrategyOptions, InType: reflect.TypeOf(&FSGroupStrategyOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_HTTPIngressPath, InType: reflect.TypeOf(&HTTPIngressPath{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_HTTPIngressRuleValue, InType: reflect.TypeOf(&HTTPIngressRuleValue{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_HostPortRange, InType: reflect.TypeOf(&HostPortRange{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_IDRange, InType: reflect.TypeOf(&IDRange{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Ingress, InType: reflect.TypeOf(&Ingress{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_IngressBackend, InType: reflect.TypeOf(&IngressBackend{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_IngressList, InType: reflect.TypeOf(&IngressList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_IngressRule, InType: reflect.TypeOf(&IngressRule{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_IngressRuleValue, InType: reflect.TypeOf(&IngressRuleValue{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_IngressSpec, InType: reflect.TypeOf(&IngressSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_IngressStatus, InType: reflect.TypeOf(&IngressStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_IngressTLS, InType: reflect.TypeOf(&IngressTLS{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_NetworkPolicy, InType: reflect.TypeOf(&NetworkPolicy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_NetworkPolicyIngressRule, InType: reflect.TypeOf(&NetworkPolicyIngressRule{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_NetworkPolicyList, InType: reflect.TypeOf(&NetworkPolicyList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_NetworkPolicyPeer, InType: reflect.TypeOf(&NetworkPolicyPeer{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_NetworkPolicyPort, InType: reflect.TypeOf(&NetworkPolicyPort{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_NetworkPolicySpec, InType: reflect.TypeOf(&NetworkPolicySpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_PodSecurityPolicy, InType: reflect.TypeOf(&PodSecurityPolicy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_PodSecurityPolicyList, InType: reflect.TypeOf(&PodSecurityPolicyList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_PodSecurityPolicySpec, InType: reflect.TypeOf(&PodSecurityPolicySpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ReplicaSet, InType: reflect.TypeOf(&ReplicaSet{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ReplicaSetCondition, InType: reflect.TypeOf(&ReplicaSetCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ReplicaSetList, InType: reflect.TypeOf(&ReplicaSetList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ReplicaSetSpec, InType: reflect.TypeOf(&ReplicaSetSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ReplicaSetStatus, InType: reflect.TypeOf(&ReplicaSetStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ReplicationControllerDummy, InType: reflect.TypeOf(&ReplicationControllerDummy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RollbackConfig, InType: reflect.TypeOf(&RollbackConfig{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RollingUpdateDaemonSet, InType: reflect.TypeOf(&RollingUpdateDaemonSet{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RollingUpdateDeployment, InType: reflect.TypeOf(&RollingUpdateDeployment{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RunAsUserStrategyOptions, InType: reflect.TypeOf(&RunAsUserStrategyOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SELinuxStrategyOptions, InType: reflect.TypeOf(&SELinuxStrategyOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Scale, InType: reflect.TypeOf(&Scale{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ScaleSpec, InType: reflect.TypeOf(&ScaleSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ScaleStatus, InType: reflect.TypeOf(&ScaleStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SupplementalGroupsStrategyOptions, InType: reflect.TypeOf(&SupplementalGroupsStrategyOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ThirdPartyResource, InType: reflect.TypeOf(&ThirdPartyResource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ThirdPartyResourceData, InType: reflect.TypeOf(&ThirdPartyResourceData{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ThirdPartyResourceDataList, InType: reflect.TypeOf(&ThirdPartyResourceDataList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ThirdPartyResourceList, InType: reflect.TypeOf(&ThirdPartyResourceList{})},
+ )
+}
+
+// DeepCopy_v1beta1_APIVersion is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_APIVersion(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*APIVersion)
+ out := out.(*APIVersion)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_CustomMetricCurrentStatus is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_CustomMetricCurrentStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CustomMetricCurrentStatus)
+ out := out.(*CustomMetricCurrentStatus)
+ *out = *in
+ out.CurrentValue = in.CurrentValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_CustomMetricCurrentStatusList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_CustomMetricCurrentStatusList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CustomMetricCurrentStatusList)
+ out := out.(*CustomMetricCurrentStatusList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]CustomMetricCurrentStatus, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_CustomMetricCurrentStatus(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_CustomMetricTarget is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_CustomMetricTarget(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CustomMetricTarget)
+ out := out.(*CustomMetricTarget)
+ *out = *in
+ out.TargetValue = in.TargetValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_CustomMetricTargetList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_CustomMetricTargetList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CustomMetricTargetList)
+ out := out.(*CustomMetricTargetList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]CustomMetricTarget, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_CustomMetricTarget(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DaemonSet is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DaemonSet(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DaemonSet)
+ out := out.(*DaemonSet)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_DaemonSetSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_DaemonSetStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DaemonSetList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DaemonSetList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DaemonSetList)
+ out := out.(*DaemonSetList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]DaemonSet, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_DaemonSet(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DaemonSetSpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DaemonSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DaemonSetSpec)
+ out := out.(*DaemonSetSpec)
+ *out = *in
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_DaemonSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, c); err != nil {
+ return err
+ }
+ if in.RevisionHistoryLimit != nil {
+ in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DaemonSetStatus is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DaemonSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DaemonSetStatus)
+ out := out.(*DaemonSetStatus)
+ *out = *in
+ if in.CollisionCount != nil {
+ in, out := &in.CollisionCount, &out.CollisionCount
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DaemonSetUpdateStrategy is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DaemonSetUpdateStrategy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DaemonSetUpdateStrategy)
+ out := out.(*DaemonSetUpdateStrategy)
+ *out = *in
+ if in.RollingUpdate != nil {
+ in, out := &in.RollingUpdate, &out.RollingUpdate
+ *out = new(RollingUpdateDaemonSet)
+ if err := DeepCopy_v1beta1_RollingUpdateDaemonSet(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_Deployment is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_Deployment(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Deployment)
+ out := out.(*Deployment)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_DeploymentSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_DeploymentStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DeploymentCondition is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DeploymentCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentCondition)
+ out := out.(*DeploymentCondition)
+ *out = *in
+ out.LastUpdateTime = in.LastUpdateTime.DeepCopy()
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DeploymentList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DeploymentList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentList)
+ out := out.(*DeploymentList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Deployment, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_Deployment(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DeploymentRollback is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DeploymentRollback(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentRollback)
+ out := out.(*DeploymentRollback)
+ *out = *in
+ if in.UpdatedAnnotations != nil {
+ in, out := &in.UpdatedAnnotations, &out.UpdatedAnnotations
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DeploymentSpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DeploymentSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentSpec)
+ out := out.(*DeploymentSpec)
+ *out = *in
+ if in.Replicas != nil {
+ in, out := &in.Replicas, &out.Replicas
+ *out = new(int32)
+ **out = **in
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_DeploymentStrategy(&in.Strategy, &out.Strategy, c); err != nil {
+ return err
+ }
+ if in.RevisionHistoryLimit != nil {
+ in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
+ *out = new(int32)
+ **out = **in
+ }
+ if in.RollbackTo != nil {
+ in, out := &in.RollbackTo, &out.RollbackTo
+ *out = new(RollbackConfig)
+ **out = **in
+ }
+ if in.ProgressDeadlineSeconds != nil {
+ in, out := &in.ProgressDeadlineSeconds, &out.ProgressDeadlineSeconds
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DeploymentStatus is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DeploymentStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentStatus)
+ out := out.(*DeploymentStatus)
+ *out = *in
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]DeploymentCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_DeploymentCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.CollisionCount != nil {
+ in, out := &in.CollisionCount, &out.CollisionCount
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DeploymentStrategy is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DeploymentStrategy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentStrategy)
+ out := out.(*DeploymentStrategy)
+ *out = *in
+ if in.RollingUpdate != nil {
+ in, out := &in.RollingUpdate, &out.RollingUpdate
+ *out = new(RollingUpdateDeployment)
+ if err := DeepCopy_v1beta1_RollingUpdateDeployment(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_FSGroupStrategyOptions is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_FSGroupStrategyOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*FSGroupStrategyOptions)
+ out := out.(*FSGroupStrategyOptions)
+ *out = *in
+ if in.Ranges != nil {
+ in, out := &in.Ranges, &out.Ranges
+ *out = make([]IDRange, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_HTTPIngressPath is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_HTTPIngressPath(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HTTPIngressPath)
+ out := out.(*HTTPIngressPath)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_HTTPIngressRuleValue is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_HTTPIngressRuleValue(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HTTPIngressRuleValue)
+ out := out.(*HTTPIngressRuleValue)
+ *out = *in
+ if in.Paths != nil {
+ in, out := &in.Paths, &out.Paths
+ *out = make([]HTTPIngressPath, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_HostPortRange is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_HostPortRange(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HostPortRange)
+ out := out.(*HostPortRange)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_IDRange is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_IDRange(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IDRange)
+ out := out.(*IDRange)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_Ingress is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_Ingress(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Ingress)
+ out := out.(*Ingress)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_IngressSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_IngressStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_IngressBackend is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_IngressBackend(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IngressBackend)
+ out := out.(*IngressBackend)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_IngressList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_IngressList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IngressList)
+ out := out.(*IngressList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Ingress, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_Ingress(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_IngressRule is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_IngressRule(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IngressRule)
+ out := out.(*IngressRule)
+ *out = *in
+ if err := DeepCopy_v1beta1_IngressRuleValue(&in.IngressRuleValue, &out.IngressRuleValue, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_IngressRuleValue is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_IngressRuleValue(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IngressRuleValue)
+ out := out.(*IngressRuleValue)
+ *out = *in
+ if in.HTTP != nil {
+ in, out := &in.HTTP, &out.HTTP
+ *out = new(HTTPIngressRuleValue)
+ if err := DeepCopy_v1beta1_HTTPIngressRuleValue(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_IngressSpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_IngressSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IngressSpec)
+ out := out.(*IngressSpec)
+ *out = *in
+ if in.Backend != nil {
+ in, out := &in.Backend, &out.Backend
+ *out = new(IngressBackend)
+ **out = **in
+ }
+ if in.TLS != nil {
+ in, out := &in.TLS, &out.TLS
+ *out = make([]IngressTLS, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_IngressTLS(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]IngressRule, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_IngressRule(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_IngressStatus is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_IngressStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IngressStatus)
+ out := out.(*IngressStatus)
+ *out = *in
+ if err := api_v1.DeepCopy_v1_LoadBalancerStatus(&in.LoadBalancer, &out.LoadBalancer, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_IngressTLS is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_IngressTLS(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IngressTLS)
+ out := out.(*IngressTLS)
+ *out = *in
+ if in.Hosts != nil {
+ in, out := &in.Hosts, &out.Hosts
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_NetworkPolicy is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_NetworkPolicy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicy)
+ out := out.(*NetworkPolicy)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_NetworkPolicySpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_NetworkPolicyIngressRule is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_NetworkPolicyIngressRule(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyIngressRule)
+ out := out.(*NetworkPolicyIngressRule)
+ *out = *in
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]NetworkPolicyPort, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_NetworkPolicyPort(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.From != nil {
+ in, out := &in.From, &out.From
+ *out = make([]NetworkPolicyPeer, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_NetworkPolicyPeer(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_NetworkPolicyList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_NetworkPolicyList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyList)
+ out := out.(*NetworkPolicyList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]NetworkPolicy, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_NetworkPolicy(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_NetworkPolicyPeer is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_NetworkPolicyPeer(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyPeer)
+ out := out.(*NetworkPolicyPeer)
+ *out = *in
+ if in.PodSelector != nil {
+ in, out := &in.PodSelector, &out.PodSelector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if in.NamespaceSelector != nil {
+ in, out := &in.NamespaceSelector, &out.NamespaceSelector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_NetworkPolicyPort is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_NetworkPolicyPort(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyPort)
+ out := out.(*NetworkPolicyPort)
+ *out = *in
+ if in.Protocol != nil {
+ in, out := &in.Protocol, &out.Protocol
+ *out = new(api_v1.Protocol)
+ **out = **in
+ }
+ if in.Port != nil {
+ in, out := &in.Port, &out.Port
+ *out = new(intstr.IntOrString)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_NetworkPolicySpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_NetworkPolicySpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicySpec)
+ out := out.(*NetworkPolicySpec)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.PodSelector); err != nil {
+ return err
+ } else {
+ out.PodSelector = *newVal.(*v1.LabelSelector)
+ }
+ if in.Ingress != nil {
+ in, out := &in.Ingress, &out.Ingress
+ *out = make([]NetworkPolicyIngressRule, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_NetworkPolicyIngressRule(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_PodSecurityPolicy is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_PodSecurityPolicy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodSecurityPolicy)
+ out := out.(*PodSecurityPolicy)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_PodSecurityPolicySpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_PodSecurityPolicyList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_PodSecurityPolicyList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodSecurityPolicyList)
+ out := out.(*PodSecurityPolicyList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodSecurityPolicy, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_PodSecurityPolicy(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_PodSecurityPolicySpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_PodSecurityPolicySpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodSecurityPolicySpec)
+ out := out.(*PodSecurityPolicySpec)
+ *out = *in
+ if in.DefaultAddCapabilities != nil {
+ in, out := &in.DefaultAddCapabilities, &out.DefaultAddCapabilities
+ *out = make([]api_v1.Capability, len(*in))
+ copy(*out, *in)
+ }
+ if in.RequiredDropCapabilities != nil {
+ in, out := &in.RequiredDropCapabilities, &out.RequiredDropCapabilities
+ *out = make([]api_v1.Capability, len(*in))
+ copy(*out, *in)
+ }
+ if in.AllowedCapabilities != nil {
+ in, out := &in.AllowedCapabilities, &out.AllowedCapabilities
+ *out = make([]api_v1.Capability, len(*in))
+ copy(*out, *in)
+ }
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]FSType, len(*in))
+ copy(*out, *in)
+ }
+ if in.HostPorts != nil {
+ in, out := &in.HostPorts, &out.HostPorts
+ *out = make([]HostPortRange, len(*in))
+ copy(*out, *in)
+ }
+ if err := DeepCopy_v1beta1_SELinuxStrategyOptions(&in.SELinux, &out.SELinux, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_RunAsUserStrategyOptions(&in.RunAsUser, &out.RunAsUser, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_SupplementalGroupsStrategyOptions(&in.SupplementalGroups, &out.SupplementalGroups, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_FSGroupStrategyOptions(&in.FSGroup, &out.FSGroup, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ReplicaSet is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ReplicaSet(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicaSet)
+ out := out.(*ReplicaSet)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_ReplicaSetSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_ReplicaSetStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ReplicaSetCondition is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ReplicaSetCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicaSetCondition)
+ out := out.(*ReplicaSetCondition)
+ *out = *in
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ReplicaSetList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ReplicaSetList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicaSetList)
+ out := out.(*ReplicaSetList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ReplicaSet, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_ReplicaSet(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ReplicaSetSpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ReplicaSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicaSetSpec)
+ out := out.(*ReplicaSetSpec)
+ *out = *in
+ if in.Replicas != nil {
+ in, out := &in.Replicas, &out.Replicas
+ *out = new(int32)
+ **out = **in
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ReplicaSetStatus is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ReplicaSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicaSetStatus)
+ out := out.(*ReplicaSetStatus)
+ *out = *in
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]ReplicaSetCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_ReplicaSetCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ReplicationControllerDummy is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ReplicationControllerDummy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicationControllerDummy)
+ out := out.(*ReplicationControllerDummy)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_RollbackConfig is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_RollbackConfig(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RollbackConfig)
+ out := out.(*RollbackConfig)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_RollingUpdateDaemonSet is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_RollingUpdateDaemonSet(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RollingUpdateDaemonSet)
+ out := out.(*RollingUpdateDaemonSet)
+ *out = *in
+ if in.MaxUnavailable != nil {
+ in, out := &in.MaxUnavailable, &out.MaxUnavailable
+ *out = new(intstr.IntOrString)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_RollingUpdateDeployment is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_RollingUpdateDeployment(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RollingUpdateDeployment)
+ out := out.(*RollingUpdateDeployment)
+ *out = *in
+ if in.MaxUnavailable != nil {
+ in, out := &in.MaxUnavailable, &out.MaxUnavailable
+ *out = new(intstr.IntOrString)
+ **out = **in
+ }
+ if in.MaxSurge != nil {
+ in, out := &in.MaxSurge, &out.MaxSurge
+ *out = new(intstr.IntOrString)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_RunAsUserStrategyOptions is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_RunAsUserStrategyOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RunAsUserStrategyOptions)
+ out := out.(*RunAsUserStrategyOptions)
+ *out = *in
+ if in.Ranges != nil {
+ in, out := &in.Ranges, &out.Ranges
+ *out = make([]IDRange, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_SELinuxStrategyOptions is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_SELinuxStrategyOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SELinuxStrategyOptions)
+ out := out.(*SELinuxStrategyOptions)
+ *out = *in
+ if in.SELinuxOptions != nil {
+ in, out := &in.SELinuxOptions, &out.SELinuxOptions
+ *out = new(api_v1.SELinuxOptions)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_Scale is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_Scale(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Scale)
+ out := out.(*Scale)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_ScaleStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ScaleSpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ScaleSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ScaleSpec)
+ out := out.(*ScaleSpec)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ScaleStatus is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ScaleStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ScaleStatus)
+ out := out.(*ScaleStatus)
+ *out = *in
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_SupplementalGroupsStrategyOptions is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_SupplementalGroupsStrategyOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SupplementalGroupsStrategyOptions)
+ out := out.(*SupplementalGroupsStrategyOptions)
+ *out = *in
+ if in.Ranges != nil {
+ in, out := &in.Ranges, &out.Ranges
+ *out = make([]IDRange, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ThirdPartyResource is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ThirdPartyResource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ThirdPartyResource)
+ out := out.(*ThirdPartyResource)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Versions != nil {
+ in, out := &in.Versions, &out.Versions
+ *out = make([]APIVersion, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ThirdPartyResourceData is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ThirdPartyResourceData(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ThirdPartyResourceData)
+ out := out.(*ThirdPartyResourceData)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Data != nil {
+ in, out := &in.Data, &out.Data
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ThirdPartyResourceDataList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ThirdPartyResourceDataList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ThirdPartyResourceDataList)
+ out := out.(*ThirdPartyResourceDataList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ThirdPartyResourceData, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_ThirdPartyResourceData(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ThirdPartyResourceList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ThirdPartyResourceList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ThirdPartyResourceList)
+ out := out.(*ThirdPartyResourceList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ThirdPartyResource, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_ThirdPartyResource(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.defaults.go
new file mode 100644
index 000000000..770faa513
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.defaults.go
@@ -0,0 +1,475 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ v1 "k8s.io/client-go/pkg/api/v1"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ scheme.AddTypeDefaultingFunc(&DaemonSet{}, func(obj interface{}) { SetObjectDefaults_DaemonSet(obj.(*DaemonSet)) })
+ scheme.AddTypeDefaultingFunc(&DaemonSetList{}, func(obj interface{}) { SetObjectDefaults_DaemonSetList(obj.(*DaemonSetList)) })
+ scheme.AddTypeDefaultingFunc(&Deployment{}, func(obj interface{}) { SetObjectDefaults_Deployment(obj.(*Deployment)) })
+ scheme.AddTypeDefaultingFunc(&DeploymentList{}, func(obj interface{}) { SetObjectDefaults_DeploymentList(obj.(*DeploymentList)) })
+ scheme.AddTypeDefaultingFunc(&NetworkPolicy{}, func(obj interface{}) { SetObjectDefaults_NetworkPolicy(obj.(*NetworkPolicy)) })
+ scheme.AddTypeDefaultingFunc(&NetworkPolicyList{}, func(obj interface{}) { SetObjectDefaults_NetworkPolicyList(obj.(*NetworkPolicyList)) })
+ scheme.AddTypeDefaultingFunc(&ReplicaSet{}, func(obj interface{}) { SetObjectDefaults_ReplicaSet(obj.(*ReplicaSet)) })
+ scheme.AddTypeDefaultingFunc(&ReplicaSetList{}, func(obj interface{}) { SetObjectDefaults_ReplicaSetList(obj.(*ReplicaSetList)) })
+ return nil
+}
+
+func SetObjectDefaults_DaemonSet(in *DaemonSet) {
+ SetDefaults_DaemonSet(in)
+ v1.SetDefaults_PodSpec(&in.Spec.Template.Spec)
+ for i := range in.Spec.Template.Spec.Volumes {
+ a := &in.Spec.Template.Spec.Volumes[i]
+ v1.SetDefaults_Volume(a)
+ if a.VolumeSource.Secret != nil {
+ v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
+ }
+ if a.VolumeSource.ISCSI != nil {
+ v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
+ }
+ if a.VolumeSource.RBD != nil {
+ v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
+ }
+ if a.VolumeSource.DownwardAPI != nil {
+ v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
+ for j := range a.VolumeSource.DownwardAPI.Items {
+ b := &a.VolumeSource.DownwardAPI.Items[j]
+ if b.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.FieldRef)
+ }
+ }
+ }
+ if a.VolumeSource.ConfigMap != nil {
+ v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
+ }
+ if a.VolumeSource.AzureDisk != nil {
+ v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
+ }
+ if a.VolumeSource.Projected != nil {
+ v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
+ for j := range a.VolumeSource.Projected.Sources {
+ b := &a.VolumeSource.Projected.Sources[j]
+ if b.DownwardAPI != nil {
+ for k := range b.DownwardAPI.Items {
+ c := &b.DownwardAPI.Items[k]
+ if c.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(c.FieldRef)
+ }
+ }
+ }
+ }
+ }
+ if a.VolumeSource.ScaleIO != nil {
+ v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO)
+ }
+ }
+ for i := range in.Spec.Template.Spec.InitContainers {
+ a := &in.Spec.Template.Spec.InitContainers[i]
+ v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+ for i := range in.Spec.Template.Spec.Containers {
+ a := &in.Spec.Template.Spec.Containers[i]
+ v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+}
+
+func SetObjectDefaults_DaemonSetList(in *DaemonSetList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_DaemonSet(a)
+ }
+}
+
+func SetObjectDefaults_Deployment(in *Deployment) {
+ SetDefaults_Deployment(in)
+ v1.SetDefaults_PodSpec(&in.Spec.Template.Spec)
+ for i := range in.Spec.Template.Spec.Volumes {
+ a := &in.Spec.Template.Spec.Volumes[i]
+ v1.SetDefaults_Volume(a)
+ if a.VolumeSource.Secret != nil {
+ v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
+ }
+ if a.VolumeSource.ISCSI != nil {
+ v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
+ }
+ if a.VolumeSource.RBD != nil {
+ v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
+ }
+ if a.VolumeSource.DownwardAPI != nil {
+ v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
+ for j := range a.VolumeSource.DownwardAPI.Items {
+ b := &a.VolumeSource.DownwardAPI.Items[j]
+ if b.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.FieldRef)
+ }
+ }
+ }
+ if a.VolumeSource.ConfigMap != nil {
+ v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
+ }
+ if a.VolumeSource.AzureDisk != nil {
+ v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
+ }
+ if a.VolumeSource.Projected != nil {
+ v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
+ for j := range a.VolumeSource.Projected.Sources {
+ b := &a.VolumeSource.Projected.Sources[j]
+ if b.DownwardAPI != nil {
+ for k := range b.DownwardAPI.Items {
+ c := &b.DownwardAPI.Items[k]
+ if c.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(c.FieldRef)
+ }
+ }
+ }
+ }
+ }
+ if a.VolumeSource.ScaleIO != nil {
+ v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO)
+ }
+ }
+ for i := range in.Spec.Template.Spec.InitContainers {
+ a := &in.Spec.Template.Spec.InitContainers[i]
+ v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+ for i := range in.Spec.Template.Spec.Containers {
+ a := &in.Spec.Template.Spec.Containers[i]
+ v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+}
+
+func SetObjectDefaults_DeploymentList(in *DeploymentList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_Deployment(a)
+ }
+}
+
+func SetObjectDefaults_NetworkPolicy(in *NetworkPolicy) {
+ SetDefaults_NetworkPolicy(in)
+}
+
+func SetObjectDefaults_NetworkPolicyList(in *NetworkPolicyList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_NetworkPolicy(a)
+ }
+}
+
+func SetObjectDefaults_ReplicaSet(in *ReplicaSet) {
+ SetDefaults_ReplicaSet(in)
+ v1.SetDefaults_PodSpec(&in.Spec.Template.Spec)
+ for i := range in.Spec.Template.Spec.Volumes {
+ a := &in.Spec.Template.Spec.Volumes[i]
+ v1.SetDefaults_Volume(a)
+ if a.VolumeSource.Secret != nil {
+ v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
+ }
+ if a.VolumeSource.ISCSI != nil {
+ v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
+ }
+ if a.VolumeSource.RBD != nil {
+ v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
+ }
+ if a.VolumeSource.DownwardAPI != nil {
+ v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
+ for j := range a.VolumeSource.DownwardAPI.Items {
+ b := &a.VolumeSource.DownwardAPI.Items[j]
+ if b.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.FieldRef)
+ }
+ }
+ }
+ if a.VolumeSource.ConfigMap != nil {
+ v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
+ }
+ if a.VolumeSource.AzureDisk != nil {
+ v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
+ }
+ if a.VolumeSource.Projected != nil {
+ v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
+ for j := range a.VolumeSource.Projected.Sources {
+ b := &a.VolumeSource.Projected.Sources[j]
+ if b.DownwardAPI != nil {
+ for k := range b.DownwardAPI.Items {
+ c := &b.DownwardAPI.Items[k]
+ if c.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(c.FieldRef)
+ }
+ }
+ }
+ }
+ }
+ if a.VolumeSource.ScaleIO != nil {
+ v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO)
+ }
+ }
+ for i := range in.Spec.Template.Spec.InitContainers {
+ a := &in.Spec.Template.Spec.InitContainers[i]
+ v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+ for i := range in.Spec.Template.Spec.Containers {
+ a := &in.Spec.Template.Spec.Containers[i]
+ v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+}
+
+func SetObjectDefaults_ReplicaSetList(in *ReplicaSetList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_ReplicaSet(a)
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/extensions/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/extensions/zz_generated.deepcopy.go
new file mode 100644
index 000000000..2d88c85e7
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/extensions/zz_generated.deepcopy.go
@@ -0,0 +1,1146 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package extensions
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ intstr "k8s.io/apimachinery/pkg/util/intstr"
+ api "k8s.io/client-go/pkg/api"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_APIVersion, InType: reflect.TypeOf(&APIVersion{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_CustomMetricCurrentStatus, InType: reflect.TypeOf(&CustomMetricCurrentStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_CustomMetricCurrentStatusList, InType: reflect.TypeOf(&CustomMetricCurrentStatusList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_CustomMetricTarget, InType: reflect.TypeOf(&CustomMetricTarget{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_CustomMetricTargetList, InType: reflect.TypeOf(&CustomMetricTargetList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DaemonSet, InType: reflect.TypeOf(&DaemonSet{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DaemonSetList, InType: reflect.TypeOf(&DaemonSetList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DaemonSetSpec, InType: reflect.TypeOf(&DaemonSetSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DaemonSetStatus, InType: reflect.TypeOf(&DaemonSetStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DaemonSetUpdateStrategy, InType: reflect.TypeOf(&DaemonSetUpdateStrategy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_Deployment, InType: reflect.TypeOf(&Deployment{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DeploymentCondition, InType: reflect.TypeOf(&DeploymentCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DeploymentList, InType: reflect.TypeOf(&DeploymentList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DeploymentRollback, InType: reflect.TypeOf(&DeploymentRollback{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DeploymentSpec, InType: reflect.TypeOf(&DeploymentSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DeploymentStatus, InType: reflect.TypeOf(&DeploymentStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DeploymentStrategy, InType: reflect.TypeOf(&DeploymentStrategy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_FSGroupStrategyOptions, InType: reflect.TypeOf(&FSGroupStrategyOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_GroupIDRange, InType: reflect.TypeOf(&GroupIDRange{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_HTTPIngressPath, InType: reflect.TypeOf(&HTTPIngressPath{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_HTTPIngressRuleValue, InType: reflect.TypeOf(&HTTPIngressRuleValue{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_HostPortRange, InType: reflect.TypeOf(&HostPortRange{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_Ingress, InType: reflect.TypeOf(&Ingress{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_IngressBackend, InType: reflect.TypeOf(&IngressBackend{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_IngressList, InType: reflect.TypeOf(&IngressList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_IngressRule, InType: reflect.TypeOf(&IngressRule{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_IngressRuleValue, InType: reflect.TypeOf(&IngressRuleValue{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_IngressSpec, InType: reflect.TypeOf(&IngressSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_IngressStatus, InType: reflect.TypeOf(&IngressStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_IngressTLS, InType: reflect.TypeOf(&IngressTLS{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_NetworkPolicy, InType: reflect.TypeOf(&NetworkPolicy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_NetworkPolicyIngressRule, InType: reflect.TypeOf(&NetworkPolicyIngressRule{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_NetworkPolicyList, InType: reflect.TypeOf(&NetworkPolicyList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_NetworkPolicyPeer, InType: reflect.TypeOf(&NetworkPolicyPeer{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_NetworkPolicyPort, InType: reflect.TypeOf(&NetworkPolicyPort{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_NetworkPolicySpec, InType: reflect.TypeOf(&NetworkPolicySpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_PodSecurityPolicy, InType: reflect.TypeOf(&PodSecurityPolicy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_PodSecurityPolicyList, InType: reflect.TypeOf(&PodSecurityPolicyList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_PodSecurityPolicySpec, InType: reflect.TypeOf(&PodSecurityPolicySpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ReplicaSet, InType: reflect.TypeOf(&ReplicaSet{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ReplicaSetCondition, InType: reflect.TypeOf(&ReplicaSetCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ReplicaSetList, InType: reflect.TypeOf(&ReplicaSetList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ReplicaSetSpec, InType: reflect.TypeOf(&ReplicaSetSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ReplicaSetStatus, InType: reflect.TypeOf(&ReplicaSetStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ReplicationControllerDummy, InType: reflect.TypeOf(&ReplicationControllerDummy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_RollbackConfig, InType: reflect.TypeOf(&RollbackConfig{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_RollingUpdateDaemonSet, InType: reflect.TypeOf(&RollingUpdateDaemonSet{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_RollingUpdateDeployment, InType: reflect.TypeOf(&RollingUpdateDeployment{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_RunAsUserStrategyOptions, InType: reflect.TypeOf(&RunAsUserStrategyOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_SELinuxStrategyOptions, InType: reflect.TypeOf(&SELinuxStrategyOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_Scale, InType: reflect.TypeOf(&Scale{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ScaleSpec, InType: reflect.TypeOf(&ScaleSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ScaleStatus, InType: reflect.TypeOf(&ScaleStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_SupplementalGroupsStrategyOptions, InType: reflect.TypeOf(&SupplementalGroupsStrategyOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ThirdPartyResource, InType: reflect.TypeOf(&ThirdPartyResource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ThirdPartyResourceData, InType: reflect.TypeOf(&ThirdPartyResourceData{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ThirdPartyResourceDataList, InType: reflect.TypeOf(&ThirdPartyResourceDataList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ThirdPartyResourceList, InType: reflect.TypeOf(&ThirdPartyResourceList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_UserIDRange, InType: reflect.TypeOf(&UserIDRange{})},
+ )
+}
+
+// DeepCopy_extensions_APIVersion is an autogenerated deepcopy function.
+func DeepCopy_extensions_APIVersion(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*APIVersion)
+ out := out.(*APIVersion)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_extensions_CustomMetricCurrentStatus is an autogenerated deepcopy function.
+func DeepCopy_extensions_CustomMetricCurrentStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CustomMetricCurrentStatus)
+ out := out.(*CustomMetricCurrentStatus)
+ *out = *in
+ out.CurrentValue = in.CurrentValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_extensions_CustomMetricCurrentStatusList is an autogenerated deepcopy function.
+func DeepCopy_extensions_CustomMetricCurrentStatusList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CustomMetricCurrentStatusList)
+ out := out.(*CustomMetricCurrentStatusList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]CustomMetricCurrentStatus, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_CustomMetricCurrentStatus(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_CustomMetricTarget is an autogenerated deepcopy function.
+func DeepCopy_extensions_CustomMetricTarget(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CustomMetricTarget)
+ out := out.(*CustomMetricTarget)
+ *out = *in
+ out.TargetValue = in.TargetValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_extensions_CustomMetricTargetList is an autogenerated deepcopy function.
+func DeepCopy_extensions_CustomMetricTargetList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CustomMetricTargetList)
+ out := out.(*CustomMetricTargetList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]CustomMetricTarget, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_CustomMetricTarget(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_DaemonSet is an autogenerated deepcopy function.
+func DeepCopy_extensions_DaemonSet(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DaemonSet)
+ out := out.(*DaemonSet)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_extensions_DaemonSetSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_extensions_DaemonSetStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_DaemonSetList is an autogenerated deepcopy function.
+func DeepCopy_extensions_DaemonSetList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DaemonSetList)
+ out := out.(*DaemonSetList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]DaemonSet, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_DaemonSet(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_DaemonSetSpec is an autogenerated deepcopy function.
+func DeepCopy_extensions_DaemonSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DaemonSetSpec)
+ out := out.(*DaemonSetSpec)
+ *out = *in
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if err := api.DeepCopy_api_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_extensions_DaemonSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, c); err != nil {
+ return err
+ }
+ if in.RevisionHistoryLimit != nil {
+ in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_DaemonSetStatus is an autogenerated deepcopy function.
+func DeepCopy_extensions_DaemonSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DaemonSetStatus)
+ out := out.(*DaemonSetStatus)
+ *out = *in
+ if in.CollisionCount != nil {
+ in, out := &in.CollisionCount, &out.CollisionCount
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_DaemonSetUpdateStrategy is an autogenerated deepcopy function.
+func DeepCopy_extensions_DaemonSetUpdateStrategy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DaemonSetUpdateStrategy)
+ out := out.(*DaemonSetUpdateStrategy)
+ *out = *in
+ if in.RollingUpdate != nil {
+ in, out := &in.RollingUpdate, &out.RollingUpdate
+ *out = new(RollingUpdateDaemonSet)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_Deployment is an autogenerated deepcopy function.
+func DeepCopy_extensions_Deployment(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Deployment)
+ out := out.(*Deployment)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_extensions_DeploymentSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_extensions_DeploymentStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_DeploymentCondition is an autogenerated deepcopy function.
+func DeepCopy_extensions_DeploymentCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentCondition)
+ out := out.(*DeploymentCondition)
+ *out = *in
+ out.LastUpdateTime = in.LastUpdateTime.DeepCopy()
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_extensions_DeploymentList is an autogenerated deepcopy function.
+func DeepCopy_extensions_DeploymentList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentList)
+ out := out.(*DeploymentList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Deployment, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_Deployment(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_DeploymentRollback is an autogenerated deepcopy function.
+func DeepCopy_extensions_DeploymentRollback(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentRollback)
+ out := out.(*DeploymentRollback)
+ *out = *in
+ if in.UpdatedAnnotations != nil {
+ in, out := &in.UpdatedAnnotations, &out.UpdatedAnnotations
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_DeploymentSpec is an autogenerated deepcopy function.
+func DeepCopy_extensions_DeploymentSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentSpec)
+ out := out.(*DeploymentSpec)
+ *out = *in
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if err := api.DeepCopy_api_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_extensions_DeploymentStrategy(&in.Strategy, &out.Strategy, c); err != nil {
+ return err
+ }
+ if in.RevisionHistoryLimit != nil {
+ in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
+ *out = new(int32)
+ **out = **in
+ }
+ if in.RollbackTo != nil {
+ in, out := &in.RollbackTo, &out.RollbackTo
+ *out = new(RollbackConfig)
+ **out = **in
+ }
+ if in.ProgressDeadlineSeconds != nil {
+ in, out := &in.ProgressDeadlineSeconds, &out.ProgressDeadlineSeconds
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_DeploymentStatus is an autogenerated deepcopy function.
+func DeepCopy_extensions_DeploymentStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentStatus)
+ out := out.(*DeploymentStatus)
+ *out = *in
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]DeploymentCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_DeploymentCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.CollisionCount != nil {
+ in, out := &in.CollisionCount, &out.CollisionCount
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_DeploymentStrategy is an autogenerated deepcopy function.
+func DeepCopy_extensions_DeploymentStrategy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentStrategy)
+ out := out.(*DeploymentStrategy)
+ *out = *in
+ if in.RollingUpdate != nil {
+ in, out := &in.RollingUpdate, &out.RollingUpdate
+ *out = new(RollingUpdateDeployment)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_FSGroupStrategyOptions is an autogenerated deepcopy function.
+func DeepCopy_extensions_FSGroupStrategyOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*FSGroupStrategyOptions)
+ out := out.(*FSGroupStrategyOptions)
+ *out = *in
+ if in.Ranges != nil {
+ in, out := &in.Ranges, &out.Ranges
+ *out = make([]GroupIDRange, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_GroupIDRange is an autogenerated deepcopy function.
+func DeepCopy_extensions_GroupIDRange(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*GroupIDRange)
+ out := out.(*GroupIDRange)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_extensions_HTTPIngressPath is an autogenerated deepcopy function.
+func DeepCopy_extensions_HTTPIngressPath(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HTTPIngressPath)
+ out := out.(*HTTPIngressPath)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_extensions_HTTPIngressRuleValue is an autogenerated deepcopy function.
+func DeepCopy_extensions_HTTPIngressRuleValue(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HTTPIngressRuleValue)
+ out := out.(*HTTPIngressRuleValue)
+ *out = *in
+ if in.Paths != nil {
+ in, out := &in.Paths, &out.Paths
+ *out = make([]HTTPIngressPath, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_HostPortRange is an autogenerated deepcopy function.
+func DeepCopy_extensions_HostPortRange(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HostPortRange)
+ out := out.(*HostPortRange)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_extensions_Ingress is an autogenerated deepcopy function.
+func DeepCopy_extensions_Ingress(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Ingress)
+ out := out.(*Ingress)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_extensions_IngressSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_extensions_IngressStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_IngressBackend is an autogenerated deepcopy function.
+func DeepCopy_extensions_IngressBackend(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IngressBackend)
+ out := out.(*IngressBackend)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_extensions_IngressList is an autogenerated deepcopy function.
+func DeepCopy_extensions_IngressList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IngressList)
+ out := out.(*IngressList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Ingress, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_Ingress(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_IngressRule is an autogenerated deepcopy function.
+func DeepCopy_extensions_IngressRule(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IngressRule)
+ out := out.(*IngressRule)
+ *out = *in
+ if err := DeepCopy_extensions_IngressRuleValue(&in.IngressRuleValue, &out.IngressRuleValue, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_IngressRuleValue is an autogenerated deepcopy function.
+func DeepCopy_extensions_IngressRuleValue(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IngressRuleValue)
+ out := out.(*IngressRuleValue)
+ *out = *in
+ if in.HTTP != nil {
+ in, out := &in.HTTP, &out.HTTP
+ *out = new(HTTPIngressRuleValue)
+ if err := DeepCopy_extensions_HTTPIngressRuleValue(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_IngressSpec is an autogenerated deepcopy function.
+func DeepCopy_extensions_IngressSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IngressSpec)
+ out := out.(*IngressSpec)
+ *out = *in
+ if in.Backend != nil {
+ in, out := &in.Backend, &out.Backend
+ *out = new(IngressBackend)
+ **out = **in
+ }
+ if in.TLS != nil {
+ in, out := &in.TLS, &out.TLS
+ *out = make([]IngressTLS, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_IngressTLS(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]IngressRule, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_IngressRule(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_IngressStatus is an autogenerated deepcopy function.
+func DeepCopy_extensions_IngressStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IngressStatus)
+ out := out.(*IngressStatus)
+ *out = *in
+ if err := api.DeepCopy_api_LoadBalancerStatus(&in.LoadBalancer, &out.LoadBalancer, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_IngressTLS is an autogenerated deepcopy function.
+func DeepCopy_extensions_IngressTLS(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IngressTLS)
+ out := out.(*IngressTLS)
+ *out = *in
+ if in.Hosts != nil {
+ in, out := &in.Hosts, &out.Hosts
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_NetworkPolicy is an autogenerated deepcopy function.
+func DeepCopy_extensions_NetworkPolicy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicy)
+ out := out.(*NetworkPolicy)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_extensions_NetworkPolicySpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_NetworkPolicyIngressRule is an autogenerated deepcopy function.
+func DeepCopy_extensions_NetworkPolicyIngressRule(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyIngressRule)
+ out := out.(*NetworkPolicyIngressRule)
+ *out = *in
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]NetworkPolicyPort, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_NetworkPolicyPort(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.From != nil {
+ in, out := &in.From, &out.From
+ *out = make([]NetworkPolicyPeer, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_NetworkPolicyPeer(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_NetworkPolicyList is an autogenerated deepcopy function.
+func DeepCopy_extensions_NetworkPolicyList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyList)
+ out := out.(*NetworkPolicyList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]NetworkPolicy, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_NetworkPolicy(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_NetworkPolicyPeer is an autogenerated deepcopy function.
+func DeepCopy_extensions_NetworkPolicyPeer(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyPeer)
+ out := out.(*NetworkPolicyPeer)
+ *out = *in
+ if in.PodSelector != nil {
+ in, out := &in.PodSelector, &out.PodSelector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if in.NamespaceSelector != nil {
+ in, out := &in.NamespaceSelector, &out.NamespaceSelector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_NetworkPolicyPort is an autogenerated deepcopy function.
+func DeepCopy_extensions_NetworkPolicyPort(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyPort)
+ out := out.(*NetworkPolicyPort)
+ *out = *in
+ if in.Protocol != nil {
+ in, out := &in.Protocol, &out.Protocol
+ *out = new(api.Protocol)
+ **out = **in
+ }
+ if in.Port != nil {
+ in, out := &in.Port, &out.Port
+ *out = new(intstr.IntOrString)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_NetworkPolicySpec is an autogenerated deepcopy function.
+func DeepCopy_extensions_NetworkPolicySpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicySpec)
+ out := out.(*NetworkPolicySpec)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.PodSelector); err != nil {
+ return err
+ } else {
+ out.PodSelector = *newVal.(*v1.LabelSelector)
+ }
+ if in.Ingress != nil {
+ in, out := &in.Ingress, &out.Ingress
+ *out = make([]NetworkPolicyIngressRule, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_NetworkPolicyIngressRule(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_PodSecurityPolicy is an autogenerated deepcopy function.
+func DeepCopy_extensions_PodSecurityPolicy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodSecurityPolicy)
+ out := out.(*PodSecurityPolicy)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_extensions_PodSecurityPolicySpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_PodSecurityPolicyList is an autogenerated deepcopy function.
+func DeepCopy_extensions_PodSecurityPolicyList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodSecurityPolicyList)
+ out := out.(*PodSecurityPolicyList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodSecurityPolicy, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_PodSecurityPolicy(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_PodSecurityPolicySpec is an autogenerated deepcopy function.
+func DeepCopy_extensions_PodSecurityPolicySpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodSecurityPolicySpec)
+ out := out.(*PodSecurityPolicySpec)
+ *out = *in
+ if in.DefaultAddCapabilities != nil {
+ in, out := &in.DefaultAddCapabilities, &out.DefaultAddCapabilities
+ *out = make([]api.Capability, len(*in))
+ copy(*out, *in)
+ }
+ if in.RequiredDropCapabilities != nil {
+ in, out := &in.RequiredDropCapabilities, &out.RequiredDropCapabilities
+ *out = make([]api.Capability, len(*in))
+ copy(*out, *in)
+ }
+ if in.AllowedCapabilities != nil {
+ in, out := &in.AllowedCapabilities, &out.AllowedCapabilities
+ *out = make([]api.Capability, len(*in))
+ copy(*out, *in)
+ }
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]FSType, len(*in))
+ copy(*out, *in)
+ }
+ if in.HostPorts != nil {
+ in, out := &in.HostPorts, &out.HostPorts
+ *out = make([]HostPortRange, len(*in))
+ copy(*out, *in)
+ }
+ if err := DeepCopy_extensions_SELinuxStrategyOptions(&in.SELinux, &out.SELinux, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_extensions_RunAsUserStrategyOptions(&in.RunAsUser, &out.RunAsUser, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_extensions_SupplementalGroupsStrategyOptions(&in.SupplementalGroups, &out.SupplementalGroups, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_extensions_FSGroupStrategyOptions(&in.FSGroup, &out.FSGroup, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_ReplicaSet is an autogenerated deepcopy function.
+func DeepCopy_extensions_ReplicaSet(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicaSet)
+ out := out.(*ReplicaSet)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_extensions_ReplicaSetSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_extensions_ReplicaSetStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_ReplicaSetCondition is an autogenerated deepcopy function.
+func DeepCopy_extensions_ReplicaSetCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicaSetCondition)
+ out := out.(*ReplicaSetCondition)
+ *out = *in
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_extensions_ReplicaSetList is an autogenerated deepcopy function.
+func DeepCopy_extensions_ReplicaSetList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicaSetList)
+ out := out.(*ReplicaSetList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ReplicaSet, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_ReplicaSet(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_ReplicaSetSpec is an autogenerated deepcopy function.
+func DeepCopy_extensions_ReplicaSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicaSetSpec)
+ out := out.(*ReplicaSetSpec)
+ *out = *in
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if err := api.DeepCopy_api_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_ReplicaSetStatus is an autogenerated deepcopy function.
+func DeepCopy_extensions_ReplicaSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicaSetStatus)
+ out := out.(*ReplicaSetStatus)
+ *out = *in
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]ReplicaSetCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_ReplicaSetCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_ReplicationControllerDummy is an autogenerated deepcopy function.
+func DeepCopy_extensions_ReplicationControllerDummy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicationControllerDummy)
+ out := out.(*ReplicationControllerDummy)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_extensions_RollbackConfig is an autogenerated deepcopy function.
+func DeepCopy_extensions_RollbackConfig(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RollbackConfig)
+ out := out.(*RollbackConfig)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_extensions_RollingUpdateDaemonSet is an autogenerated deepcopy function.
+func DeepCopy_extensions_RollingUpdateDaemonSet(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RollingUpdateDaemonSet)
+ out := out.(*RollingUpdateDaemonSet)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_extensions_RollingUpdateDeployment is an autogenerated deepcopy function.
+func DeepCopy_extensions_RollingUpdateDeployment(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RollingUpdateDeployment)
+ out := out.(*RollingUpdateDeployment)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_extensions_RunAsUserStrategyOptions is an autogenerated deepcopy function.
+func DeepCopy_extensions_RunAsUserStrategyOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RunAsUserStrategyOptions)
+ out := out.(*RunAsUserStrategyOptions)
+ *out = *in
+ if in.Ranges != nil {
+ in, out := &in.Ranges, &out.Ranges
+ *out = make([]UserIDRange, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_SELinuxStrategyOptions is an autogenerated deepcopy function.
+func DeepCopy_extensions_SELinuxStrategyOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SELinuxStrategyOptions)
+ out := out.(*SELinuxStrategyOptions)
+ *out = *in
+ if in.SELinuxOptions != nil {
+ in, out := &in.SELinuxOptions, &out.SELinuxOptions
+ *out = new(api.SELinuxOptions)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_Scale is an autogenerated deepcopy function.
+func DeepCopy_extensions_Scale(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Scale)
+ out := out.(*Scale)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_extensions_ScaleStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_ScaleSpec is an autogenerated deepcopy function.
+func DeepCopy_extensions_ScaleSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ScaleSpec)
+ out := out.(*ScaleSpec)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_extensions_ScaleStatus is an autogenerated deepcopy function.
+func DeepCopy_extensions_ScaleStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ScaleStatus)
+ out := out.(*ScaleStatus)
+ *out = *in
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_SupplementalGroupsStrategyOptions is an autogenerated deepcopy function.
+func DeepCopy_extensions_SupplementalGroupsStrategyOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SupplementalGroupsStrategyOptions)
+ out := out.(*SupplementalGroupsStrategyOptions)
+ *out = *in
+ if in.Ranges != nil {
+ in, out := &in.Ranges, &out.Ranges
+ *out = make([]GroupIDRange, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_ThirdPartyResource is an autogenerated deepcopy function.
+func DeepCopy_extensions_ThirdPartyResource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ThirdPartyResource)
+ out := out.(*ThirdPartyResource)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Versions != nil {
+ in, out := &in.Versions, &out.Versions
+ *out = make([]APIVersion, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_ThirdPartyResourceData is an autogenerated deepcopy function.
+func DeepCopy_extensions_ThirdPartyResourceData(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ThirdPartyResourceData)
+ out := out.(*ThirdPartyResourceData)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Data != nil {
+ in, out := &in.Data, &out.Data
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_ThirdPartyResourceDataList is an autogenerated deepcopy function.
+func DeepCopy_extensions_ThirdPartyResourceDataList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ThirdPartyResourceDataList)
+ out := out.(*ThirdPartyResourceDataList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ThirdPartyResourceData, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_ThirdPartyResourceData(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_ThirdPartyResourceList is an autogenerated deepcopy function.
+func DeepCopy_extensions_ThirdPartyResourceList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ThirdPartyResourceList)
+ out := out.(*ThirdPartyResourceList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ThirdPartyResource, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_ThirdPartyResource(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_UserIDRange is an autogenerated deepcopy function.
+func DeepCopy_extensions_UserIDRange(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*UserIDRange)
+ out := out.(*UserIDRange)
+ *out = *in
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/networking/doc.go b/vendor/k8s.io/client-go/pkg/apis/networking/doc.go
new file mode 100644
index 000000000..bf91d786a
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/networking/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +groupName=networking.k8s.io
+package networking
diff --git a/vendor/k8s.io/client-go/pkg/apis/networking/register.go b/vendor/k8s.io/client-go/pkg/apis/networking/register.go
new file mode 100644
index 000000000..4d58a210d
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/networking/register.go
@@ -0,0 +1,51 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package networking
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "networking.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &NetworkPolicy{},
+ &NetworkPolicyList{},
+ )
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/networking/types.go b/vendor/k8s.io/client-go/pkg/apis/networking/types.go
new file mode 100644
index 000000000..010736f1b
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/networking/types.go
@@ -0,0 +1,115 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package networking
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/util/intstr"
+ "k8s.io/client-go/pkg/api"
+)
+
+// +genclient=true
+
+// NetworkPolicy describes what network traffic is allowed for a set of Pods
+type NetworkPolicy struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Specification of the desired behavior for this NetworkPolicy.
+ // +optional
+ Spec NetworkPolicySpec
+}
+
+// NetworkPolicySpec provides the specification of a NetworkPolicy
+type NetworkPolicySpec struct {
+ // Selects the pods to which this NetworkPolicy object applies. The array of
+ // ingress rules is applied to any pods selected by this field. Multiple network
+ // policies can select the same set of pods. In this case, the ingress rules for
+ // each are combined additively. This field is NOT optional and follows standard
+ // label selector semantics. An empty podSelector matches all pods in this
+ // namespace.
+ PodSelector metav1.LabelSelector
+
+ // List of ingress rules to be applied to the selected pods. Traffic is allowed to
+ // a pod if there are no NetworkPolicies selecting the pod
+ // (and cluster policy otherwise allows the traffic), OR if the traffic source is
+ // the pod's local node, OR if the traffic matches at least one ingress rule
+ // across all of the NetworkPolicy objects whose podSelector matches the pod. If
+ // this field is empty then this NetworkPolicy does not allow any traffic (and serves
+ // solely to ensure that the pods it selects are isolated by default)
+ // +optional
+ Ingress []NetworkPolicyIngressRule
+}
+
+// NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
+// matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
+type NetworkPolicyIngressRule struct {
+ // List of ports which should be made accessible on the pods selected for this
+ // rule. Each item in this list is combined using a logical OR. If this field is
+ // empty or missing, this rule matches all ports (traffic not restricted by port).
+ // If this field is present and contains at least one item, then this rule allows
+ // traffic only if the traffic matches at least one port in the list.
+ // +optional
+ Ports []NetworkPolicyPort
+
+ // List of sources which should be able to access the pods selected for this rule.
+ // Items in this list are combined using a logical OR operation. If this field is
+ // empty or missing, this rule matches all sources (traffic not restricted by
+ // source). If this field is present and contains at least on item, this rule
+ // allows traffic only if the traffic matches at least one item in the from list.
+ // +optional
+ From []NetworkPolicyPeer
+}
+
+// NetworkPolicyPort describes a port to allow traffic on
+type NetworkPolicyPort struct {
+ // The protocol (TCP or UDP) which traffic must match. If not specified, this
+ // field defaults to TCP.
+ // +optional
+ Protocol *api.Protocol
+
+ // The port on the given protocol. This can either be a numerical or named port on
+ // a pod. If this field is not provided, this matches all port names and numbers.
+ // +optional
+ Port *intstr.IntOrString
+}
+
+// NetworkPolicyPeer describes a peer to allow traffic from. Exactly one of its fields
+// must be specified.
+type NetworkPolicyPeer struct {
+ // This is a label selector which selects Pods in this namespace. This field
+ // follows standard label selector semantics. If present but empty, this selector
+ // selects all pods in this namespace.
+ // +optional
+ PodSelector *metav1.LabelSelector
+
+ // Selects Namespaces using cluster scoped-labels. This matches all pods in all
+ // namespaces selected by this label selector. This field follows standard label
+ // selector semantics. If present but empty, this selector selects all namespaces.
+ // +optional
+ NamespaceSelector *metav1.LabelSelector
+}
+
+// NetworkPolicyList is a list of NetworkPolicy objects.
+type NetworkPolicyList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []NetworkPolicy
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/networking/v1/conversion.go b/vendor/k8s.io/client-go/pkg/apis/networking/v1/conversion.go
new file mode 100644
index 000000000..21ec62576
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/networking/v1/conversion.go
@@ -0,0 +1,195 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/conversion"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/client-go/pkg/api"
+ "k8s.io/client-go/pkg/api/v1"
+ "k8s.io/client-go/pkg/apis/extensions"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) error {
+ return scheme.AddConversionFuncs(
+ Convert_v1_NetworkPolicy_To_extensions_NetworkPolicy,
+ Convert_extensions_NetworkPolicy_To_v1_NetworkPolicy,
+ Convert_v1_NetworkPolicyIngressRule_To_extensions_NetworkPolicyIngressRule,
+ Convert_extensions_NetworkPolicyIngressRule_To_v1_NetworkPolicyIngressRule,
+ Convert_v1_NetworkPolicyList_To_extensions_NetworkPolicyList,
+ Convert_extensions_NetworkPolicyList_To_v1_NetworkPolicyList,
+ Convert_v1_NetworkPolicyPeer_To_extensions_NetworkPolicyPeer,
+ Convert_extensions_NetworkPolicyPeer_To_v1_NetworkPolicyPeer,
+ Convert_v1_NetworkPolicyPort_To_extensions_NetworkPolicyPort,
+ Convert_extensions_NetworkPolicyPort_To_v1_NetworkPolicyPort,
+ Convert_v1_NetworkPolicySpec_To_extensions_NetworkPolicySpec,
+ Convert_extensions_NetworkPolicySpec_To_v1_NetworkPolicySpec,
+ )
+}
+
+func Convert_v1_NetworkPolicy_To_extensions_NetworkPolicy(in *NetworkPolicy, out *extensions.NetworkPolicy, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ return Convert_v1_NetworkPolicySpec_To_extensions_NetworkPolicySpec(&in.Spec, &out.Spec, s)
+}
+
+func Convert_extensions_NetworkPolicy_To_v1_NetworkPolicy(in *extensions.NetworkPolicy, out *NetworkPolicy, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ return Convert_extensions_NetworkPolicySpec_To_v1_NetworkPolicySpec(&in.Spec, &out.Spec, s)
+}
+
+func Convert_v1_NetworkPolicySpec_To_extensions_NetworkPolicySpec(in *NetworkPolicySpec, out *extensions.NetworkPolicySpec, s conversion.Scope) error {
+ if err := s.Convert(&in.PodSelector, &out.PodSelector, 0); err != nil {
+ return err
+ }
+ out.Ingress = make([]extensions.NetworkPolicyIngressRule, len(in.Ingress))
+ for i := range in.Ingress {
+ if err := Convert_v1_NetworkPolicyIngressRule_To_extensions_NetworkPolicyIngressRule(&in.Ingress[i], &out.Ingress[i], s); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func Convert_extensions_NetworkPolicySpec_To_v1_NetworkPolicySpec(in *extensions.NetworkPolicySpec, out *NetworkPolicySpec, s conversion.Scope) error {
+ if err := s.Convert(&in.PodSelector, &out.PodSelector, 0); err != nil {
+ return err
+ }
+ out.Ingress = make([]NetworkPolicyIngressRule, len(in.Ingress))
+ for i := range in.Ingress {
+ if err := Convert_extensions_NetworkPolicyIngressRule_To_v1_NetworkPolicyIngressRule(&in.Ingress[i], &out.Ingress[i], s); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func Convert_v1_NetworkPolicyIngressRule_To_extensions_NetworkPolicyIngressRule(in *NetworkPolicyIngressRule, out *extensions.NetworkPolicyIngressRule, s conversion.Scope) error {
+ out.Ports = make([]extensions.NetworkPolicyPort, len(in.Ports))
+ for i := range in.Ports {
+ if err := Convert_v1_NetworkPolicyPort_To_extensions_NetworkPolicyPort(&in.Ports[i], &out.Ports[i], s); err != nil {
+ return err
+ }
+ }
+ out.From = make([]extensions.NetworkPolicyPeer, len(in.From))
+ for i := range in.From {
+ if err := Convert_v1_NetworkPolicyPeer_To_extensions_NetworkPolicyPeer(&in.From[i], &out.From[i], s); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func Convert_extensions_NetworkPolicyIngressRule_To_v1_NetworkPolicyIngressRule(in *extensions.NetworkPolicyIngressRule, out *NetworkPolicyIngressRule, s conversion.Scope) error {
+ out.Ports = make([]NetworkPolicyPort, len(in.Ports))
+ for i := range in.Ports {
+ if err := Convert_extensions_NetworkPolicyPort_To_v1_NetworkPolicyPort(&in.Ports[i], &out.Ports[i], s); err != nil {
+ return err
+ }
+ }
+ out.From = make([]NetworkPolicyPeer, len(in.From))
+ for i := range in.From {
+ if err := Convert_extensions_NetworkPolicyPeer_To_v1_NetworkPolicyPeer(&in.From[i], &out.From[i], s); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func Convert_v1_NetworkPolicyPeer_To_extensions_NetworkPolicyPeer(in *NetworkPolicyPeer, out *extensions.NetworkPolicyPeer, s conversion.Scope) error {
+ if in.PodSelector != nil {
+ out.PodSelector = new(metav1.LabelSelector)
+ if err := s.Convert(in.PodSelector, out.PodSelector, 0); err != nil {
+ return err
+ }
+ } else {
+ out.PodSelector = nil
+ }
+ if in.NamespaceSelector != nil {
+ out.NamespaceSelector = new(metav1.LabelSelector)
+ if err := s.Convert(in.NamespaceSelector, out.NamespaceSelector, 0); err != nil {
+ return err
+ }
+ } else {
+ out.NamespaceSelector = nil
+ }
+ return nil
+}
+
+func Convert_extensions_NetworkPolicyPeer_To_v1_NetworkPolicyPeer(in *extensions.NetworkPolicyPeer, out *NetworkPolicyPeer, s conversion.Scope) error {
+ if in.PodSelector != nil {
+ out.PodSelector = new(metav1.LabelSelector)
+ if err := s.Convert(in.PodSelector, out.PodSelector, 0); err != nil {
+ return err
+ }
+ } else {
+ out.PodSelector = nil
+ }
+ if in.NamespaceSelector != nil {
+ out.NamespaceSelector = new(metav1.LabelSelector)
+ if err := s.Convert(in.NamespaceSelector, out.NamespaceSelector, 0); err != nil {
+ return err
+ }
+ } else {
+ out.NamespaceSelector = nil
+ }
+ return nil
+}
+
+func Convert_v1_NetworkPolicyPort_To_extensions_NetworkPolicyPort(in *NetworkPolicyPort, out *extensions.NetworkPolicyPort, s conversion.Scope) error {
+ if in.Protocol != nil {
+ out.Protocol = new(api.Protocol)
+ *out.Protocol = api.Protocol(*in.Protocol)
+ } else {
+ out.Protocol = nil
+ }
+ out.Port = in.Port
+ return nil
+}
+
+func Convert_extensions_NetworkPolicyPort_To_v1_NetworkPolicyPort(in *extensions.NetworkPolicyPort, out *NetworkPolicyPort, s conversion.Scope) error {
+ if in.Protocol != nil {
+ out.Protocol = new(v1.Protocol)
+ *out.Protocol = v1.Protocol(*in.Protocol)
+ } else {
+ out.Protocol = nil
+ }
+ out.Port = in.Port
+ return nil
+}
+
+func Convert_v1_NetworkPolicyList_To_extensions_NetworkPolicyList(in *NetworkPolicyList, out *extensions.NetworkPolicyList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = make([]extensions.NetworkPolicy, len(in.Items))
+ for i := range in.Items {
+ if err := Convert_v1_NetworkPolicy_To_extensions_NetworkPolicy(&in.Items[i], &out.Items[i], s); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func Convert_extensions_NetworkPolicyList_To_v1_NetworkPolicyList(in *extensions.NetworkPolicyList, out *NetworkPolicyList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = make([]NetworkPolicy, len(in.Items))
+ for i := range in.Items {
+ if err := Convert_extensions_NetworkPolicy_To_v1_NetworkPolicy(&in.Items[i], &out.Items[i], s); err != nil {
+ return err
+ }
+ }
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/networking/v1/defaults.go b/vendor/k8s.io/client-go/pkg/apis/networking/v1/defaults.go
new file mode 100644
index 000000000..7567cf751
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/networking/v1/defaults.go
@@ -0,0 +1,34 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/client-go/pkg/api/v1"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
+
+func SetDefaults_NetworkPolicyPort(obj *NetworkPolicyPort) {
+ // Default any undefined Protocol fields to TCP.
+ if obj.Protocol == nil {
+ proto := v1.ProtocolTCP
+ obj.Protocol = &proto
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/networking/v1/doc.go b/vendor/k8s.io/client-go/pkg/apis/networking/v1/doc.go
new file mode 100644
index 000000000..f1250e70e
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/networking/v1/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +groupName=networking.k8s.io
+package v1
diff --git a/vendor/k8s.io/client-go/pkg/apis/networking/v1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/networking/v1/generated.pb.go
new file mode 100644
index 000000000..671557dd5
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/networking/v1/generated.pb.go
@@ -0,0 +1,1345 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/networking/v1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/networking/v1/generated.proto
+
+ It has these top-level messages:
+ NetworkPolicy
+ NetworkPolicyIngressRule
+ NetworkPolicyList
+ NetworkPolicyPeer
+ NetworkPolicyPort
+ NetworkPolicySpec
+*/
+package v1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+import k8s_io_apimachinery_pkg_util_intstr "k8s.io/apimachinery/pkg/util/intstr"
+
+import k8s_io_kubernetes_pkg_api_v1 "k8s.io/client-go/pkg/api/v1"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *NetworkPolicy) Reset() { *m = NetworkPolicy{} }
+func (*NetworkPolicy) ProtoMessage() {}
+func (*NetworkPolicy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *NetworkPolicyIngressRule) Reset() { *m = NetworkPolicyIngressRule{} }
+func (*NetworkPolicyIngressRule) ProtoMessage() {}
+func (*NetworkPolicyIngressRule) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{1}
+}
+
+func (m *NetworkPolicyList) Reset() { *m = NetworkPolicyList{} }
+func (*NetworkPolicyList) ProtoMessage() {}
+func (*NetworkPolicyList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
+
+func (m *NetworkPolicyPeer) Reset() { *m = NetworkPolicyPeer{} }
+func (*NetworkPolicyPeer) ProtoMessage() {}
+func (*NetworkPolicyPeer) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
+
+func (m *NetworkPolicyPort) Reset() { *m = NetworkPolicyPort{} }
+func (*NetworkPolicyPort) ProtoMessage() {}
+func (*NetworkPolicyPort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
+
+func (m *NetworkPolicySpec) Reset() { *m = NetworkPolicySpec{} }
+func (*NetworkPolicySpec) ProtoMessage() {}
+func (*NetworkPolicySpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
+
+func init() {
+ proto.RegisterType((*NetworkPolicy)(nil), "k8s.io.client-go.pkg.apis.networking.v1.NetworkPolicy")
+ proto.RegisterType((*NetworkPolicyIngressRule)(nil), "k8s.io.client-go.pkg.apis.networking.v1.NetworkPolicyIngressRule")
+ proto.RegisterType((*NetworkPolicyList)(nil), "k8s.io.client-go.pkg.apis.networking.v1.NetworkPolicyList")
+ proto.RegisterType((*NetworkPolicyPeer)(nil), "k8s.io.client-go.pkg.apis.networking.v1.NetworkPolicyPeer")
+ proto.RegisterType((*NetworkPolicyPort)(nil), "k8s.io.client-go.pkg.apis.networking.v1.NetworkPolicyPort")
+ proto.RegisterType((*NetworkPolicySpec)(nil), "k8s.io.client-go.pkg.apis.networking.v1.NetworkPolicySpec")
+}
+func (m *NetworkPolicy) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NetworkPolicy) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n2, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ return i, nil
+}
+
+func (m *NetworkPolicyIngressRule) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NetworkPolicyIngressRule) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Ports) > 0 {
+ for _, msg := range m.Ports {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.From) > 0 {
+ for _, msg := range m.From {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *NetworkPolicyList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NetworkPolicyList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n3, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *NetworkPolicyPeer) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NetworkPolicyPeer) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.PodSelector != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PodSelector.Size()))
+ n4, err := m.PodSelector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ }
+ if m.NamespaceSelector != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NamespaceSelector.Size()))
+ n5, err := m.NamespaceSelector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ }
+ return i, nil
+}
+
+func (m *NetworkPolicyPort) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NetworkPolicyPort) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Protocol != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Protocol)))
+ i += copy(dAtA[i:], *m.Protocol)
+ }
+ if m.Port != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Port.Size()))
+ n6, err := m.Port.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ }
+ return i, nil
+}
+
+func (m *NetworkPolicySpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NetworkPolicySpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PodSelector.Size()))
+ n7, err := m.PodSelector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ if len(m.Ingress) > 0 {
+ for _, msg := range m.Ingress {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *NetworkPolicy) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *NetworkPolicyIngressRule) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Ports) > 0 {
+ for _, e := range m.Ports {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.From) > 0 {
+ for _, e := range m.From {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *NetworkPolicyList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *NetworkPolicyPeer) Size() (n int) {
+ var l int
+ _ = l
+ if m.PodSelector != nil {
+ l = m.PodSelector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.NamespaceSelector != nil {
+ l = m.NamespaceSelector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *NetworkPolicyPort) Size() (n int) {
+ var l int
+ _ = l
+ if m.Protocol != nil {
+ l = len(*m.Protocol)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Port != nil {
+ l = m.Port.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *NetworkPolicySpec) Size() (n int) {
+ var l int
+ _ = l
+ l = m.PodSelector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Ingress) > 0 {
+ for _, e := range m.Ingress {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *NetworkPolicy) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NetworkPolicy{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NetworkPolicySpec", "NetworkPolicySpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NetworkPolicyIngressRule) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NetworkPolicyIngressRule{`,
+ `Ports:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ports), "NetworkPolicyPort", "NetworkPolicyPort", 1), `&`, ``, 1) + `,`,
+ `From:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.From), "NetworkPolicyPeer", "NetworkPolicyPeer", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NetworkPolicyList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NetworkPolicyList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "NetworkPolicy", "NetworkPolicy", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NetworkPolicyPeer) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NetworkPolicyPeer{`,
+ `PodSelector:` + strings.Replace(fmt.Sprintf("%v", this.PodSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
+ `NamespaceSelector:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NetworkPolicyPort) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NetworkPolicyPort{`,
+ `Protocol:` + valueToStringGenerated(this.Protocol) + `,`,
+ `Port:` + strings.Replace(fmt.Sprintf("%v", this.Port), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NetworkPolicySpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NetworkPolicySpec{`,
+ `PodSelector:` + strings.Replace(strings.Replace(this.PodSelector.String(), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1), `&`, ``, 1) + `,`,
+ `Ingress:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ingress), "NetworkPolicyIngressRule", "NetworkPolicyIngressRule", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *NetworkPolicy) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NetworkPolicy: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NetworkPolicy: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NetworkPolicyIngressRule) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NetworkPolicyIngressRule: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NetworkPolicyIngressRule: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Ports = append(m.Ports, NetworkPolicyPort{})
+ if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field From", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.From = append(m.From, NetworkPolicyPeer{})
+ if err := m.From[len(m.From)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NetworkPolicyList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NetworkPolicyList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NetworkPolicyList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, NetworkPolicy{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NetworkPolicyPeer) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NetworkPolicyPeer: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NetworkPolicyPeer: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodSelector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PodSelector == nil {
+ m.PodSelector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
+ }
+ if err := m.PodSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NamespaceSelector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.NamespaceSelector == nil {
+ m.NamespaceSelector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
+ }
+ if err := m.NamespaceSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NetworkPolicyPort) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NetworkPolicyPort: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NetworkPolicyPort: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := k8s_io_kubernetes_pkg_api_v1.Protocol(dAtA[iNdEx:postIndex])
+ m.Protocol = &s
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Port == nil {
+ m.Port = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
+ }
+ if err := m.Port.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NetworkPolicySpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NetworkPolicySpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NetworkPolicySpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodSelector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.PodSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Ingress", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Ingress = append(m.Ingress, NetworkPolicyIngressRule{})
+ if err := m.Ingress[len(m.Ingress)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/client-go/pkg/apis/networking/v1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 666 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcf, 0x4f, 0x13, 0x41,
+ 0x18, 0xed, 0x56, 0x08, 0x75, 0x90, 0x20, 0x6b, 0x4c, 0x1a, 0x0e, 0x5b, 0xd2, 0xc4, 0x84, 0x83,
+ 0xce, 0x5a, 0xf1, 0x07, 0xc6, 0x78, 0xd9, 0x83, 0x09, 0x89, 0x42, 0x5d, 0x6e, 0x06, 0x13, 0xa6,
+ 0xcb, 0xc7, 0x32, 0xb4, 0x3b, 0xb3, 0x99, 0x99, 0x56, 0xb8, 0xf9, 0x27, 0xf8, 0xd7, 0xf8, 0x37,
+ 0x70, 0x93, 0x23, 0x89, 0x49, 0x23, 0xeb, 0xdd, 0x9b, 0x17, 0x4f, 0x66, 0x76, 0xa7, 0x6c, 0x61,
+ 0x59, 0x24, 0xc5, 0xdb, 0xcc, 0xe4, 0x7b, 0xef, 0x7d, 0x6f, 0xde, 0x37, 0x83, 0x56, 0xbb, 0xab,
+ 0x12, 0x53, 0xee, 0x76, 0xfb, 0x1d, 0x10, 0x0c, 0x14, 0x48, 0x37, 0xee, 0x86, 0x2e, 0x89, 0xa9,
+ 0x74, 0x19, 0xa8, 0x4f, 0x5c, 0x74, 0x29, 0x0b, 0xdd, 0x41, 0xcb, 0x0d, 0x81, 0x81, 0x20, 0x0a,
+ 0x76, 0x70, 0x2c, 0xb8, 0xe2, 0xf6, 0x72, 0x86, 0xc4, 0x39, 0x12, 0xc7, 0xdd, 0x10, 0x6b, 0x24,
+ 0xce, 0x91, 0x78, 0xd0, 0x5a, 0x7c, 0x14, 0x52, 0xb5, 0xd7, 0xef, 0xe0, 0x80, 0x47, 0x6e, 0xc8,
+ 0x43, 0xee, 0xa6, 0x04, 0x9d, 0xfe, 0x6e, 0xba, 0x4b, 0x37, 0xe9, 0x2a, 0x23, 0x5e, 0x7c, 0x6a,
+ 0x5a, 0x22, 0x31, 0x8d, 0x48, 0xb0, 0x47, 0x19, 0x88, 0xc3, 0xbc, 0xa9, 0x08, 0x14, 0xb9, 0xa4,
+ 0x9d, 0x45, 0xb7, 0x0c, 0x25, 0xfa, 0x4c, 0xd1, 0x08, 0x0a, 0x80, 0xe7, 0xff, 0x02, 0xc8, 0x60,
+ 0x0f, 0x22, 0x52, 0xc0, 0xad, 0x94, 0xe1, 0xfa, 0x8a, 0xf6, 0x5c, 0xca, 0x94, 0x54, 0xa2, 0x00,
+ 0x7a, 0x58, 0x7a, 0xcd, 0x97, 0x79, 0x79, 0x7d, 0x45, 0x28, 0x70, 0xa0, 0x80, 0x49, 0xca, 0x99,
+ 0x74, 0x07, 0xad, 0x0e, 0x28, 0x52, 0x84, 0xbf, 0xbc, 0x02, 0x1e, 0xf3, 0x1e, 0x0d, 0x0e, 0xcb,
+ 0xa0, 0xcd, 0x63, 0x0b, 0xcd, 0xad, 0x67, 0xe1, 0xb5, 0xd3, 0x4a, 0x7b, 0x1b, 0xd5, 0xf4, 0x95,
+ 0xef, 0x10, 0x45, 0xea, 0xd6, 0x92, 0xb5, 0x3c, 0xfb, 0xe4, 0x31, 0x36, 0xc9, 0x8f, 0xdf, 0x40,
+ 0x9e, 0xbd, 0xae, 0xc6, 0x83, 0x16, 0xde, 0xe8, 0xec, 0x43, 0xa0, 0xde, 0x81, 0x22, 0x9e, 0x7d,
+ 0x34, 0x6c, 0x54, 0x92, 0x61, 0x03, 0xe5, 0x67, 0xfe, 0x19, 0xab, 0xfd, 0x11, 0x4d, 0xc9, 0x18,
+ 0x82, 0x7a, 0x35, 0x65, 0x7f, 0x85, 0xaf, 0x3b, 0x57, 0xf8, 0x5c, 0xa3, 0x9b, 0x31, 0x04, 0xde,
+ 0x1d, 0x23, 0x34, 0xa5, 0x77, 0x7e, 0x4a, 0xdb, 0xfc, 0x6e, 0xa1, 0xfa, 0xb9, 0xca, 0x35, 0x16,
+ 0x0a, 0x90, 0xd2, 0xef, 0xf7, 0xc0, 0xde, 0x46, 0xd3, 0x31, 0x17, 0x4a, 0xd6, 0xad, 0xa5, 0x5b,
+ 0x37, 0x10, 0x6f, 0x73, 0xa1, 0xbc, 0x39, 0x23, 0x3e, 0xad, 0x77, 0xd2, 0xcf, 0x88, 0xb5, 0xbb,
+ 0x5d, 0xc1, 0xa3, 0x7a, 0xf5, 0x66, 0x02, 0x00, 0x22, 0x77, 0xf7, 0x46, 0xf0, 0xc8, 0x4f, 0x69,
+ 0x9b, 0xdf, 0x2c, 0xb4, 0x70, 0xae, 0xf2, 0x2d, 0x95, 0xca, 0xde, 0x2a, 0x84, 0x86, 0xaf, 0x17,
+ 0x9a, 0x46, 0xa7, 0x91, 0xdd, 0x35, 0x5a, 0xb5, 0xd1, 0xc9, 0x58, 0x60, 0x5b, 0x68, 0x9a, 0x2a,
+ 0x88, 0xa4, 0xf1, 0xf4, 0x62, 0x42, 0x4f, 0xf9, 0x85, 0xad, 0x69, 0x36, 0x3f, 0x23, 0x6d, 0xfe,
+ 0xbe, 0xe8, 0x48, 0x7b, 0xb7, 0x77, 0xd1, 0x6c, 0xcc, 0x77, 0x36, 0xa1, 0x07, 0x81, 0xe2, 0xc2,
+ 0x98, 0x5a, 0xb9, 0xa6, 0x29, 0xd2, 0x81, 0xde, 0x08, 0xea, 0xcd, 0x27, 0xc3, 0xc6, 0x6c, 0x3b,
+ 0xe7, 0xf2, 0xc7, 0x89, 0xed, 0x03, 0xb4, 0xc0, 0x48, 0x04, 0x32, 0x26, 0x01, 0x9c, 0xa9, 0x55,
+ 0x27, 0x57, 0xbb, 0x9f, 0x0c, 0x1b, 0x0b, 0xeb, 0x17, 0x19, 0xfd, 0xa2, 0x48, 0xf3, 0x6b, 0xc1,
+ 0x37, 0x17, 0xca, 0x7e, 0x8f, 0x6a, 0xe9, 0xcb, 0x0c, 0x78, 0x2f, 0x35, 0x7d, 0xdb, 0x7b, 0xa6,
+ 0x53, 0x69, 0x9b, 0xb3, 0x3f, 0xc3, 0xc6, 0x83, 0xab, 0xbe, 0x16, 0x3c, 0x2a, 0xf4, 0xcf, 0x68,
+ 0xec, 0x75, 0x34, 0xa5, 0x47, 0xd3, 0xb8, 0x2a, 0x7f, 0xcd, 0xfa, 0x3f, 0xc3, 0xd9, 0x7f, 0x86,
+ 0xd7, 0x98, 0xda, 0x10, 0x9b, 0x4a, 0x50, 0x16, 0x7a, 0x35, 0x3d, 0x82, 0xba, 0x39, 0x3f, 0xe5,
+ 0x69, 0xfe, 0xba, 0xd8, 0xb8, 0x7e, 0x7c, 0xf6, 0xfe, 0x7f, 0x0b, 0xec, 0x9e, 0x19, 0x93, 0xf2,
+ 0xd0, 0x22, 0x34, 0x43, 0xb3, 0x47, 0x6d, 0x46, 0xd2, 0x9b, 0x70, 0x24, 0xc7, 0xbe, 0x06, 0x6f,
+ 0xde, 0xc8, 0xce, 0x8c, 0x0e, 0x47, 0x1a, 0xde, 0xf2, 0xd1, 0xa9, 0x53, 0x39, 0x3e, 0x75, 0x2a,
+ 0x27, 0xa7, 0x4e, 0xe5, 0x73, 0xe2, 0x58, 0x47, 0x89, 0x63, 0x1d, 0x27, 0x8e, 0x75, 0x92, 0x38,
+ 0xd6, 0x8f, 0xc4, 0xb1, 0xbe, 0xfc, 0x74, 0x2a, 0x1f, 0xaa, 0x83, 0xd6, 0xdf, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xfa, 0x8d, 0x62, 0x1f, 0x5e, 0x07, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/networking/v1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/networking/v1/generated.proto
new file mode 100644
index 000000000..3170b55f8
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/networking/v1/generated.proto
@@ -0,0 +1,127 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.client_go.pkg.apis.networking.v1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+import "k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.proto";
+import "k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1";
+
+// NetworkPolicy describes what network traffic is allowed for a set of Pods
+message NetworkPolicy {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Specification of the desired behavior for this NetworkPolicy.
+ // +optional
+ optional NetworkPolicySpec spec = 2;
+}
+
+// NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
+// matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
+message NetworkPolicyIngressRule {
+ // List of ports which should be made accessible on the pods selected for this
+ // rule. Each item in this list is combined using a logical OR. If this field is
+ // empty or missing, this rule matches all ports (traffic not restricted by port).
+ // If this field is present and contains at least one item, then this rule allows
+ // traffic only if the traffic matches at least one port in the list.
+ // +optional
+ repeated NetworkPolicyPort ports = 1;
+
+ // List of sources which should be able to access the pods selected for this rule.
+ // Items in this list are combined using a logical OR operation. If this field is
+ // empty or missing, this rule matches all sources (traffic not restricted by
+ // source). If this field is present and contains at least on item, this rule
+ // allows traffic only if the traffic matches at least one item in the from list.
+ // +optional
+ repeated NetworkPolicyPeer from = 2;
+}
+
+// NetworkPolicyList is a list of NetworkPolicy objects.
+message NetworkPolicyList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of schema objects.
+ repeated NetworkPolicy items = 2;
+}
+
+// NetworkPolicyPeer describes a peer to allow traffic from. Exactly one of its fields
+// must be specified.
+message NetworkPolicyPeer {
+ // This is a label selector which selects Pods in this namespace. This field
+ // follows standard label selector semantics. If present but empty, this selector
+ // selects all pods in this namespace.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
+
+ // Selects Namespaces using cluster scoped-labels. This matches all pods in all
+ // namespaces selected by this label selector. This field follows standard label
+ // selector semantics. If present but empty, this selector selects all namespaces.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 2;
+}
+
+// NetworkPolicyPort describes a port to allow traffic on
+message NetworkPolicyPort {
+ // The protocol (TCP or UDP) which traffic must match. If not specified, this
+ // field defaults to TCP.
+ // +optional
+ optional string protocol = 1;
+
+ // The port on the given protocol. This can either be a numerical or named port on
+ // a pod. If this field is not provided, this matches all port names and numbers.
+ // +optional
+ optional k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 2;
+}
+
+// NetworkPolicySpec provides the specification of a NetworkPolicy
+message NetworkPolicySpec {
+ // Selects the pods to which this NetworkPolicy object applies. The array of
+ // ingress rules is applied to any pods selected by this field. Multiple network
+ // policies can select the same set of pods. In this case, the ingress rules for
+ // each are combined additively. This field is NOT optional and follows standard
+ // label selector semantics. An empty podSelector matches all pods in this
+ // namespace.
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
+
+ // List of ingress rules to be applied to the selected pods. Traffic is allowed to
+ // a pod if there are no NetworkPolicies selecting the pod
+ // (and cluster policy otherwise allows the traffic), OR if the traffic source is
+ // the pod's local node, OR if the traffic matches at least one ingress rule
+ // across all of the NetworkPolicy objects whose podSelector matches the pod. If
+ // this field is empty then this NetworkPolicy does not allow any traffic (and serves
+ // solely to ensure that the pods it selects are isolated by default)
+ // +optional
+ repeated NetworkPolicyIngressRule ingress = 2;
+}
+
diff --git a/vendor/k8s.io/client-go/pkg/apis/networking/v1/register.go b/vendor/k8s.io/client-go/pkg/apis/networking/v1/register.go
new file mode 100644
index 000000000..c8d3c83bc
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/networking/v1/register.go
@@ -0,0 +1,50 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "networking.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &NetworkPolicy{},
+ &NetworkPolicyList{},
+ )
+
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/networking/v1/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/networking/v1/types.generated.go
new file mode 100644
index 000000000..da04aee42
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/networking/v1/types.generated.go
@@ -0,0 +1,2322 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ pkg2_types "k8s.io/apimachinery/pkg/types"
+ pkg4_intstr "k8s.io/apimachinery/pkg/util/intstr"
+ pkg3_v1 "k8s.io/client-go/pkg/api/v1"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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 pkg1_v1.TypeMeta
+ var v1 pkg2_types.UID
+ var v2 pkg4_intstr.IntOrString
+ var v3 pkg3_v1.Protocol
+ var v4 time.Time
+ _, _, _, _, _ = v0, v1, v2, v3, v4
+ }
+}
+
+func (x *NetworkPolicy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = true
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NetworkPolicy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NetworkPolicy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = NetworkPolicySpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NetworkPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv12 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv14 := &x.APIVersion
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg1_v1.ObjectMeta{}
+ } else {
+ yyv16 := &x.ObjectMeta
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv16) {
+ } else {
+ z.DecFallback(yyv16, false)
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = NetworkPolicySpec{}
+ } else {
+ yyv18 := &x.Spec
+ yyv18.CodecDecodeSelf(d)
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NetworkPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Ingress) != 0
+ 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_containerArrayElem1234)
+ yy4 := &x.PodSelector
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy4) {
+ } else {
+ z.EncFallback(yy4)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.PodSelector
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy6) {
+ } else {
+ z.EncFallback(yy6)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Ingress == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.encSliceNetworkPolicyIngressRule(([]NetworkPolicyIngressRule)(x.Ingress), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ingress"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Ingress == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceNetworkPolicyIngressRule(([]NetworkPolicyIngressRule)(x.Ingress), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NetworkPolicySpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NetworkPolicySpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "podSelector":
+ if r.TryDecodeAsNil() {
+ x.PodSelector = pkg1_v1.LabelSelector{}
+ } else {
+ yyv4 := &x.PodSelector
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "ingress":
+ if r.TryDecodeAsNil() {
+ x.Ingress = nil
+ } else {
+ yyv6 := &x.Ingress
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceNetworkPolicyIngressRule((*[]NetworkPolicyIngressRule)(yyv6), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NetworkPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PodSelector = pkg1_v1.LabelSelector{}
+ } else {
+ yyv9 := &x.PodSelector
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv9) {
+ } else {
+ z.DecFallback(yyv9, false)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Ingress = nil
+ } else {
+ yyv11 := &x.Ingress
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceNetworkPolicyIngressRule((*[]NetworkPolicyIngressRule)(yyv11), d)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NetworkPolicyIngressRule) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Ports) != 0
+ yyq2[1] = len(x.From) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Ports == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceNetworkPolicyPort(([]NetworkPolicyPort)(x.Ports), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ports"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Ports == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceNetworkPolicyPort(([]NetworkPolicyPort)(x.Ports), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.From == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceNetworkPolicyPeer(([]NetworkPolicyPeer)(x.From), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("from"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.From == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceNetworkPolicyPeer(([]NetworkPolicyPeer)(x.From), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NetworkPolicyIngressRule) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NetworkPolicyIngressRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "ports":
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv4 := &x.Ports
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceNetworkPolicyPort((*[]NetworkPolicyPort)(yyv4), d)
+ }
+ }
+ case "from":
+ if r.TryDecodeAsNil() {
+ x.From = nil
+ } else {
+ yyv6 := &x.From
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceNetworkPolicyPeer((*[]NetworkPolicyPeer)(yyv6), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NetworkPolicyIngressRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv9 := &x.Ports
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceNetworkPolicyPort((*[]NetworkPolicyPort)(yyv9), d)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.From = nil
+ } else {
+ yyv11 := &x.From
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceNetworkPolicyPeer((*[]NetworkPolicyPeer)(yyv11), d)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NetworkPolicyPort) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Protocol != nil
+ yyq2[1] = x.Port != 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Protocol == nil {
+ r.EncodeNil()
+ } else {
+ yy4 := *x.Protocol
+ yysf5 := &yy4
+ yysf5.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("protocol"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Protocol == nil {
+ r.EncodeNil()
+ } else {
+ yy6 := *x.Protocol
+ yysf7 := &yy6
+ yysf7.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Port == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Port) {
+ } else if !yym9 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.Port)
+ } else {
+ z.EncFallback(x.Port)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("port"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Port == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Port) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.Port)
+ } else {
+ z.EncFallback(x.Port)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NetworkPolicyPort) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NetworkPolicyPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "protocol":
+ if r.TryDecodeAsNil() {
+ if x.Protocol != nil {
+ x.Protocol = nil
+ }
+ } else {
+ if x.Protocol == nil {
+ x.Protocol = new(pkg3_v1.Protocol)
+ }
+ x.Protocol.CodecDecodeSelf(d)
+ }
+ case "port":
+ if r.TryDecodeAsNil() {
+ if x.Port != nil {
+ x.Port = nil
+ }
+ } else {
+ if x.Port == nil {
+ x.Port = new(pkg4_intstr.IntOrString)
+ }
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Port) {
+ } else if !yym6 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.Port)
+ } else {
+ z.DecFallback(x.Port, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NetworkPolicyPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Protocol != nil {
+ x.Protocol = nil
+ }
+ } else {
+ if x.Protocol == nil {
+ x.Protocol = new(pkg3_v1.Protocol)
+ }
+ x.Protocol.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Port != nil {
+ x.Port = nil
+ }
+ } else {
+ if x.Port == nil {
+ x.Port = new(pkg4_intstr.IntOrString)
+ }
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Port) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.Port)
+ } else {
+ z.DecFallback(x.Port, false)
+ }
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NetworkPolicyPeer) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.PodSelector != nil
+ yyq2[1] = x.NamespaceSelector != 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.PodSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.PodSelector) {
+ } else {
+ z.EncFallback(x.PodSelector)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PodSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.PodSelector) {
+ } else {
+ z.EncFallback(x.PodSelector)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.NamespaceSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.NamespaceSelector) {
+ } else {
+ z.EncFallback(x.NamespaceSelector)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("namespaceSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NamespaceSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.NamespaceSelector) {
+ } else {
+ z.EncFallback(x.NamespaceSelector)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NetworkPolicyPeer) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NetworkPolicyPeer) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "podSelector":
+ if r.TryDecodeAsNil() {
+ if x.PodSelector != nil {
+ x.PodSelector = nil
+ }
+ } else {
+ if x.PodSelector == nil {
+ x.PodSelector = new(pkg1_v1.LabelSelector)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.PodSelector) {
+ } else {
+ z.DecFallback(x.PodSelector, false)
+ }
+ }
+ case "namespaceSelector":
+ if r.TryDecodeAsNil() {
+ if x.NamespaceSelector != nil {
+ x.NamespaceSelector = nil
+ }
+ } else {
+ if x.NamespaceSelector == nil {
+ x.NamespaceSelector = new(pkg1_v1.LabelSelector)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.NamespaceSelector) {
+ } else {
+ z.DecFallback(x.NamespaceSelector, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NetworkPolicyPeer) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PodSelector != nil {
+ x.PodSelector = nil
+ }
+ } else {
+ if x.PodSelector == nil {
+ x.PodSelector = new(pkg1_v1.LabelSelector)
+ }
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.PodSelector) {
+ } else {
+ z.DecFallback(x.PodSelector, false)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.NamespaceSelector != nil {
+ x.NamespaceSelector = nil
+ }
+ } else {
+ if x.NamespaceSelector == nil {
+ x.NamespaceSelector = new(pkg1_v1.LabelSelector)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.NamespaceSelector) {
+ } else {
+ z.DecFallback(x.NamespaceSelector, false)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NetworkPolicyList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceNetworkPolicy(([]NetworkPolicy)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceNetworkPolicy(([]NetworkPolicy)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NetworkPolicyList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NetworkPolicyList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceNetworkPolicy((*[]NetworkPolicy)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NetworkPolicyList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceNetworkPolicy((*[]NetworkPolicy)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encSliceNetworkPolicyIngressRule(v []NetworkPolicyIngressRule, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceNetworkPolicyIngressRule(v *[]NetworkPolicyIngressRule, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []NetworkPolicyIngressRule{}
+ 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, 48)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]NetworkPolicyIngressRule, yyrl1)
+ }
+ } else {
+ yyv1 = make([]NetworkPolicyIngressRule, 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] = NetworkPolicyIngressRule{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, NetworkPolicyIngressRule{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicyIngressRule{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, NetworkPolicyIngressRule{}) // var yyz1 NetworkPolicyIngressRule
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicyIngressRule{}
+ } 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 = []NetworkPolicyIngressRule{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceNetworkPolicyPort(v []NetworkPolicyPort, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceNetworkPolicyPort(v *[]NetworkPolicyPort, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []NetworkPolicyPort{}
+ 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, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]NetworkPolicyPort, yyrl1)
+ }
+ } else {
+ yyv1 = make([]NetworkPolicyPort, 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] = NetworkPolicyPort{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, NetworkPolicyPort{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicyPort{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, NetworkPolicyPort{}) // var yyz1 NetworkPolicyPort
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicyPort{}
+ } 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 = []NetworkPolicyPort{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceNetworkPolicyPeer(v []NetworkPolicyPeer, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceNetworkPolicyPeer(v *[]NetworkPolicyPeer, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []NetworkPolicyPeer{}
+ 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, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]NetworkPolicyPeer, yyrl1)
+ }
+ } else {
+ yyv1 = make([]NetworkPolicyPeer, 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] = NetworkPolicyPeer{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, NetworkPolicyPeer{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicyPeer{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, NetworkPolicyPeer{}) // var yyz1 NetworkPolicyPeer
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicyPeer{}
+ } 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 = []NetworkPolicyPeer{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceNetworkPolicy(v []NetworkPolicy, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceNetworkPolicy(v *[]NetworkPolicy, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []NetworkPolicy{}
+ 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, 320)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]NetworkPolicy, yyrl1)
+ }
+ } else {
+ yyv1 = make([]NetworkPolicy, 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] = NetworkPolicy{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, NetworkPolicy{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicy{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, NetworkPolicy{}) // var yyz1 NetworkPolicy
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicy{}
+ } 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 = []NetworkPolicy{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/networking/v1/types.go b/vendor/k8s.io/client-go/pkg/apis/networking/v1/types.go
new file mode 100644
index 000000000..a31026a67
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/networking/v1/types.go
@@ -0,0 +1,120 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/util/intstr"
+ "k8s.io/client-go/pkg/api/v1"
+)
+
+// +genclient=true
+
+// NetworkPolicy describes what network traffic is allowed for a set of Pods
+type NetworkPolicy struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Specification of the desired behavior for this NetworkPolicy.
+ // +optional
+ Spec NetworkPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+}
+
+// NetworkPolicySpec provides the specification of a NetworkPolicy
+type NetworkPolicySpec struct {
+ // Selects the pods to which this NetworkPolicy object applies. The array of
+ // ingress rules is applied to any pods selected by this field. Multiple network
+ // policies can select the same set of pods. In this case, the ingress rules for
+ // each are combined additively. This field is NOT optional and follows standard
+ // label selector semantics. An empty podSelector matches all pods in this
+ // namespace.
+ PodSelector metav1.LabelSelector `json:"podSelector" protobuf:"bytes,1,opt,name=podSelector"`
+
+ // List of ingress rules to be applied to the selected pods. Traffic is allowed to
+ // a pod if there are no NetworkPolicies selecting the pod
+ // (and cluster policy otherwise allows the traffic), OR if the traffic source is
+ // the pod's local node, OR if the traffic matches at least one ingress rule
+ // across all of the NetworkPolicy objects whose podSelector matches the pod. If
+ // this field is empty then this NetworkPolicy does not allow any traffic (and serves
+ // solely to ensure that the pods it selects are isolated by default)
+ // +optional
+ Ingress []NetworkPolicyIngressRule `json:"ingress,omitempty" protobuf:"bytes,2,rep,name=ingress"`
+}
+
+// NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
+// matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
+type NetworkPolicyIngressRule struct {
+ // List of ports which should be made accessible on the pods selected for this
+ // rule. Each item in this list is combined using a logical OR. If this field is
+ // empty or missing, this rule matches all ports (traffic not restricted by port).
+ // If this field is present and contains at least one item, then this rule allows
+ // traffic only if the traffic matches at least one port in the list.
+ // +optional
+ Ports []NetworkPolicyPort `json:"ports,omitempty" protobuf:"bytes,1,rep,name=ports"`
+
+ // List of sources which should be able to access the pods selected for this rule.
+ // Items in this list are combined using a logical OR operation. If this field is
+ // empty or missing, this rule matches all sources (traffic not restricted by
+ // source). If this field is present and contains at least on item, this rule
+ // allows traffic only if the traffic matches at least one item in the from list.
+ // +optional
+ From []NetworkPolicyPeer `json:"from,omitempty" protobuf:"bytes,2,rep,name=from"`
+}
+
+// NetworkPolicyPort describes a port to allow traffic on
+type NetworkPolicyPort struct {
+ // The protocol (TCP or UDP) which traffic must match. If not specified, this
+ // field defaults to TCP.
+ // +optional
+ Protocol *v1.Protocol `json:"protocol,omitempty" protobuf:"bytes,1,opt,name=protocol,casttype=k8s.io/kubernetes/pkg/api/v1.Protocol"`
+
+ // The port on the given protocol. This can either be a numerical or named port on
+ // a pod. If this field is not provided, this matches all port names and numbers.
+ // +optional
+ Port *intstr.IntOrString `json:"port,omitempty" protobuf:"bytes,2,opt,name=port"`
+}
+
+// NetworkPolicyPeer describes a peer to allow traffic from. Exactly one of its fields
+// must be specified.
+type NetworkPolicyPeer struct {
+ // This is a label selector which selects Pods in this namespace. This field
+ // follows standard label selector semantics. If present but empty, this selector
+ // selects all pods in this namespace.
+ // +optional
+ PodSelector *metav1.LabelSelector `json:"podSelector,omitempty" protobuf:"bytes,1,opt,name=podSelector"`
+
+ // Selects Namespaces using cluster scoped-labels. This matches all pods in all
+ // namespaces selected by this label selector. This field follows standard label
+ // selector semantics. If present but empty, this selector selects all namespaces.
+ // +optional
+ NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,2,opt,name=namespaceSelector"`
+}
+
+// NetworkPolicyList is a list of NetworkPolicy objects.
+type NetworkPolicyList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of schema objects.
+ Items []NetworkPolicy `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/networking/v1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/networking/v1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..c3c911631
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/networking/v1/types_swagger_doc_generated.go
@@ -0,0 +1,90 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_NetworkPolicy = map[string]string{
+ "": "NetworkPolicy describes what network traffic is allowed for a set of Pods",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Specification of the desired behavior for this NetworkPolicy.",
+}
+
+func (NetworkPolicy) SwaggerDoc() map[string]string {
+ return map_NetworkPolicy
+}
+
+var map_NetworkPolicyIngressRule = map[string]string{
+ "": "NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.",
+ "ports": "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.",
+ "from": "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list.",
+}
+
+func (NetworkPolicyIngressRule) SwaggerDoc() map[string]string {
+ return map_NetworkPolicyIngressRule
+}
+
+var map_NetworkPolicyList = map[string]string{
+ "": "NetworkPolicyList is a list of NetworkPolicy objects.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "items": "Items is a list of schema objects.",
+}
+
+func (NetworkPolicyList) SwaggerDoc() map[string]string {
+ return map_NetworkPolicyList
+}
+
+var map_NetworkPolicyPeer = map[string]string{
+ "": "NetworkPolicyPeer describes a peer to allow traffic from. Exactly one of its fields must be specified.",
+ "podSelector": "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace.",
+ "namespaceSelector": "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces.",
+}
+
+func (NetworkPolicyPeer) SwaggerDoc() map[string]string {
+ return map_NetworkPolicyPeer
+}
+
+var map_NetworkPolicyPort = map[string]string{
+ "": "NetworkPolicyPort describes a port to allow traffic on",
+ "protocol": "The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP.",
+ "port": "The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers.",
+}
+
+func (NetworkPolicyPort) SwaggerDoc() map[string]string {
+ return map_NetworkPolicyPort
+}
+
+var map_NetworkPolicySpec = map[string]string{
+ "": "NetworkPolicySpec provides the specification of a NetworkPolicy",
+ "podSelector": "Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.",
+ "ingress": "List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default)",
+}
+
+func (NetworkPolicySpec) SwaggerDoc() map[string]string {
+ return map_NetworkPolicySpec
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/client-go/pkg/apis/networking/v1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/networking/v1/zz_generated.conversion.go
new file mode 100644
index 000000000..500438e92
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/networking/v1/zz_generated.conversion.go
@@ -0,0 +1,195 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ intstr "k8s.io/apimachinery/pkg/util/intstr"
+ api "k8s.io/client-go/pkg/api"
+ api_v1 "k8s.io/client-go/pkg/api/v1"
+ networking "k8s.io/client-go/pkg/apis/networking"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1_NetworkPolicy_To_networking_NetworkPolicy,
+ Convert_networking_NetworkPolicy_To_v1_NetworkPolicy,
+ Convert_v1_NetworkPolicyIngressRule_To_networking_NetworkPolicyIngressRule,
+ Convert_networking_NetworkPolicyIngressRule_To_v1_NetworkPolicyIngressRule,
+ Convert_v1_NetworkPolicyList_To_networking_NetworkPolicyList,
+ Convert_networking_NetworkPolicyList_To_v1_NetworkPolicyList,
+ Convert_v1_NetworkPolicyPeer_To_networking_NetworkPolicyPeer,
+ Convert_networking_NetworkPolicyPeer_To_v1_NetworkPolicyPeer,
+ Convert_v1_NetworkPolicyPort_To_networking_NetworkPolicyPort,
+ Convert_networking_NetworkPolicyPort_To_v1_NetworkPolicyPort,
+ Convert_v1_NetworkPolicySpec_To_networking_NetworkPolicySpec,
+ Convert_networking_NetworkPolicySpec_To_v1_NetworkPolicySpec,
+ )
+}
+
+func autoConvert_v1_NetworkPolicy_To_networking_NetworkPolicy(in *NetworkPolicy, out *networking.NetworkPolicy, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_NetworkPolicySpec_To_networking_NetworkPolicySpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_NetworkPolicy_To_networking_NetworkPolicy is an autogenerated conversion function.
+func Convert_v1_NetworkPolicy_To_networking_NetworkPolicy(in *NetworkPolicy, out *networking.NetworkPolicy, s conversion.Scope) error {
+ return autoConvert_v1_NetworkPolicy_To_networking_NetworkPolicy(in, out, s)
+}
+
+func autoConvert_networking_NetworkPolicy_To_v1_NetworkPolicy(in *networking.NetworkPolicy, out *NetworkPolicy, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_networking_NetworkPolicySpec_To_v1_NetworkPolicySpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_networking_NetworkPolicy_To_v1_NetworkPolicy is an autogenerated conversion function.
+func Convert_networking_NetworkPolicy_To_v1_NetworkPolicy(in *networking.NetworkPolicy, out *NetworkPolicy, s conversion.Scope) error {
+ return autoConvert_networking_NetworkPolicy_To_v1_NetworkPolicy(in, out, s)
+}
+
+func autoConvert_v1_NetworkPolicyIngressRule_To_networking_NetworkPolicyIngressRule(in *NetworkPolicyIngressRule, out *networking.NetworkPolicyIngressRule, s conversion.Scope) error {
+ out.Ports = *(*[]networking.NetworkPolicyPort)(unsafe.Pointer(&in.Ports))
+ out.From = *(*[]networking.NetworkPolicyPeer)(unsafe.Pointer(&in.From))
+ return nil
+}
+
+// Convert_v1_NetworkPolicyIngressRule_To_networking_NetworkPolicyIngressRule is an autogenerated conversion function.
+func Convert_v1_NetworkPolicyIngressRule_To_networking_NetworkPolicyIngressRule(in *NetworkPolicyIngressRule, out *networking.NetworkPolicyIngressRule, s conversion.Scope) error {
+ return autoConvert_v1_NetworkPolicyIngressRule_To_networking_NetworkPolicyIngressRule(in, out, s)
+}
+
+func autoConvert_networking_NetworkPolicyIngressRule_To_v1_NetworkPolicyIngressRule(in *networking.NetworkPolicyIngressRule, out *NetworkPolicyIngressRule, s conversion.Scope) error {
+ out.Ports = *(*[]NetworkPolicyPort)(unsafe.Pointer(&in.Ports))
+ out.From = *(*[]NetworkPolicyPeer)(unsafe.Pointer(&in.From))
+ return nil
+}
+
+// Convert_networking_NetworkPolicyIngressRule_To_v1_NetworkPolicyIngressRule is an autogenerated conversion function.
+func Convert_networking_NetworkPolicyIngressRule_To_v1_NetworkPolicyIngressRule(in *networking.NetworkPolicyIngressRule, out *NetworkPolicyIngressRule, s conversion.Scope) error {
+ return autoConvert_networking_NetworkPolicyIngressRule_To_v1_NetworkPolicyIngressRule(in, out, s)
+}
+
+func autoConvert_v1_NetworkPolicyList_To_networking_NetworkPolicyList(in *NetworkPolicyList, out *networking.NetworkPolicyList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]networking.NetworkPolicy)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1_NetworkPolicyList_To_networking_NetworkPolicyList is an autogenerated conversion function.
+func Convert_v1_NetworkPolicyList_To_networking_NetworkPolicyList(in *NetworkPolicyList, out *networking.NetworkPolicyList, s conversion.Scope) error {
+ return autoConvert_v1_NetworkPolicyList_To_networking_NetworkPolicyList(in, out, s)
+}
+
+func autoConvert_networking_NetworkPolicyList_To_v1_NetworkPolicyList(in *networking.NetworkPolicyList, out *NetworkPolicyList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]NetworkPolicy, 0)
+ } else {
+ out.Items = *(*[]NetworkPolicy)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_networking_NetworkPolicyList_To_v1_NetworkPolicyList is an autogenerated conversion function.
+func Convert_networking_NetworkPolicyList_To_v1_NetworkPolicyList(in *networking.NetworkPolicyList, out *NetworkPolicyList, s conversion.Scope) error {
+ return autoConvert_networking_NetworkPolicyList_To_v1_NetworkPolicyList(in, out, s)
+}
+
+func autoConvert_v1_NetworkPolicyPeer_To_networking_NetworkPolicyPeer(in *NetworkPolicyPeer, out *networking.NetworkPolicyPeer, s conversion.Scope) error {
+ out.PodSelector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.PodSelector))
+ out.NamespaceSelector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.NamespaceSelector))
+ return nil
+}
+
+// Convert_v1_NetworkPolicyPeer_To_networking_NetworkPolicyPeer is an autogenerated conversion function.
+func Convert_v1_NetworkPolicyPeer_To_networking_NetworkPolicyPeer(in *NetworkPolicyPeer, out *networking.NetworkPolicyPeer, s conversion.Scope) error {
+ return autoConvert_v1_NetworkPolicyPeer_To_networking_NetworkPolicyPeer(in, out, s)
+}
+
+func autoConvert_networking_NetworkPolicyPeer_To_v1_NetworkPolicyPeer(in *networking.NetworkPolicyPeer, out *NetworkPolicyPeer, s conversion.Scope) error {
+ out.PodSelector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.PodSelector))
+ out.NamespaceSelector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.NamespaceSelector))
+ return nil
+}
+
+// Convert_networking_NetworkPolicyPeer_To_v1_NetworkPolicyPeer is an autogenerated conversion function.
+func Convert_networking_NetworkPolicyPeer_To_v1_NetworkPolicyPeer(in *networking.NetworkPolicyPeer, out *NetworkPolicyPeer, s conversion.Scope) error {
+ return autoConvert_networking_NetworkPolicyPeer_To_v1_NetworkPolicyPeer(in, out, s)
+}
+
+func autoConvert_v1_NetworkPolicyPort_To_networking_NetworkPolicyPort(in *NetworkPolicyPort, out *networking.NetworkPolicyPort, s conversion.Scope) error {
+ out.Protocol = (*api.Protocol)(unsafe.Pointer(in.Protocol))
+ out.Port = (*intstr.IntOrString)(unsafe.Pointer(in.Port))
+ return nil
+}
+
+// Convert_v1_NetworkPolicyPort_To_networking_NetworkPolicyPort is an autogenerated conversion function.
+func Convert_v1_NetworkPolicyPort_To_networking_NetworkPolicyPort(in *NetworkPolicyPort, out *networking.NetworkPolicyPort, s conversion.Scope) error {
+ return autoConvert_v1_NetworkPolicyPort_To_networking_NetworkPolicyPort(in, out, s)
+}
+
+func autoConvert_networking_NetworkPolicyPort_To_v1_NetworkPolicyPort(in *networking.NetworkPolicyPort, out *NetworkPolicyPort, s conversion.Scope) error {
+ out.Protocol = (*api_v1.Protocol)(unsafe.Pointer(in.Protocol))
+ out.Port = (*intstr.IntOrString)(unsafe.Pointer(in.Port))
+ return nil
+}
+
+// Convert_networking_NetworkPolicyPort_To_v1_NetworkPolicyPort is an autogenerated conversion function.
+func Convert_networking_NetworkPolicyPort_To_v1_NetworkPolicyPort(in *networking.NetworkPolicyPort, out *NetworkPolicyPort, s conversion.Scope) error {
+ return autoConvert_networking_NetworkPolicyPort_To_v1_NetworkPolicyPort(in, out, s)
+}
+
+func autoConvert_v1_NetworkPolicySpec_To_networking_NetworkPolicySpec(in *NetworkPolicySpec, out *networking.NetworkPolicySpec, s conversion.Scope) error {
+ out.PodSelector = in.PodSelector
+ out.Ingress = *(*[]networking.NetworkPolicyIngressRule)(unsafe.Pointer(&in.Ingress))
+ return nil
+}
+
+// Convert_v1_NetworkPolicySpec_To_networking_NetworkPolicySpec is an autogenerated conversion function.
+func Convert_v1_NetworkPolicySpec_To_networking_NetworkPolicySpec(in *NetworkPolicySpec, out *networking.NetworkPolicySpec, s conversion.Scope) error {
+ return autoConvert_v1_NetworkPolicySpec_To_networking_NetworkPolicySpec(in, out, s)
+}
+
+func autoConvert_networking_NetworkPolicySpec_To_v1_NetworkPolicySpec(in *networking.NetworkPolicySpec, out *NetworkPolicySpec, s conversion.Scope) error {
+ out.PodSelector = in.PodSelector
+ out.Ingress = *(*[]NetworkPolicyIngressRule)(unsafe.Pointer(&in.Ingress))
+ return nil
+}
+
+// Convert_networking_NetworkPolicySpec_To_v1_NetworkPolicySpec is an autogenerated conversion function.
+func Convert_networking_NetworkPolicySpec_To_v1_NetworkPolicySpec(in *networking.NetworkPolicySpec, out *NetworkPolicySpec, s conversion.Scope) error {
+ return autoConvert_networking_NetworkPolicySpec_To_v1_NetworkPolicySpec(in, out, s)
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/networking/v1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/networking/v1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..6d9b335d4
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/networking/v1/zz_generated.deepcopy.go
@@ -0,0 +1,182 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ intstr "k8s.io/apimachinery/pkg/util/intstr"
+ api_v1 "k8s.io/client-go/pkg/api/v1"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NetworkPolicy, InType: reflect.TypeOf(&NetworkPolicy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NetworkPolicyIngressRule, InType: reflect.TypeOf(&NetworkPolicyIngressRule{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NetworkPolicyList, InType: reflect.TypeOf(&NetworkPolicyList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NetworkPolicyPeer, InType: reflect.TypeOf(&NetworkPolicyPeer{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NetworkPolicyPort, InType: reflect.TypeOf(&NetworkPolicyPort{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NetworkPolicySpec, InType: reflect.TypeOf(&NetworkPolicySpec{})},
+ )
+}
+
+// DeepCopy_v1_NetworkPolicy is an autogenerated deepcopy function.
+func DeepCopy_v1_NetworkPolicy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicy)
+ out := out.(*NetworkPolicy)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_NetworkPolicySpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NetworkPolicyIngressRule is an autogenerated deepcopy function.
+func DeepCopy_v1_NetworkPolicyIngressRule(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyIngressRule)
+ out := out.(*NetworkPolicyIngressRule)
+ *out = *in
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]NetworkPolicyPort, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_NetworkPolicyPort(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.From != nil {
+ in, out := &in.From, &out.From
+ *out = make([]NetworkPolicyPeer, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_NetworkPolicyPeer(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NetworkPolicyList is an autogenerated deepcopy function.
+func DeepCopy_v1_NetworkPolicyList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyList)
+ out := out.(*NetworkPolicyList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]NetworkPolicy, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_NetworkPolicy(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NetworkPolicyPeer is an autogenerated deepcopy function.
+func DeepCopy_v1_NetworkPolicyPeer(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyPeer)
+ out := out.(*NetworkPolicyPeer)
+ *out = *in
+ if in.PodSelector != nil {
+ in, out := &in.PodSelector, &out.PodSelector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*meta_v1.LabelSelector)
+ }
+ }
+ if in.NamespaceSelector != nil {
+ in, out := &in.NamespaceSelector, &out.NamespaceSelector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*meta_v1.LabelSelector)
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NetworkPolicyPort is an autogenerated deepcopy function.
+func DeepCopy_v1_NetworkPolicyPort(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyPort)
+ out := out.(*NetworkPolicyPort)
+ *out = *in
+ if in.Protocol != nil {
+ in, out := &in.Protocol, &out.Protocol
+ *out = new(api_v1.Protocol)
+ **out = **in
+ }
+ if in.Port != nil {
+ in, out := &in.Port, &out.Port
+ *out = new(intstr.IntOrString)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NetworkPolicySpec is an autogenerated deepcopy function.
+func DeepCopy_v1_NetworkPolicySpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicySpec)
+ out := out.(*NetworkPolicySpec)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.PodSelector); err != nil {
+ return err
+ } else {
+ out.PodSelector = *newVal.(*meta_v1.LabelSelector)
+ }
+ if in.Ingress != nil {
+ in, out := &in.Ingress, &out.Ingress
+ *out = make([]NetworkPolicyIngressRule, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_NetworkPolicyIngressRule(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/networking/v1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/networking/v1/zz_generated.defaults.go
new file mode 100644
index 000000000..0319c88a7
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/networking/v1/zz_generated.defaults.go
@@ -0,0 +1,51 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ scheme.AddTypeDefaultingFunc(&NetworkPolicy{}, func(obj interface{}) { SetObjectDefaults_NetworkPolicy(obj.(*NetworkPolicy)) })
+ scheme.AddTypeDefaultingFunc(&NetworkPolicyList{}, func(obj interface{}) { SetObjectDefaults_NetworkPolicyList(obj.(*NetworkPolicyList)) })
+ return nil
+}
+
+func SetObjectDefaults_NetworkPolicy(in *NetworkPolicy) {
+ for i := range in.Spec.Ingress {
+ a := &in.Spec.Ingress[i]
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ SetDefaults_NetworkPolicyPort(b)
+ }
+ }
+}
+
+func SetObjectDefaults_NetworkPolicyList(in *NetworkPolicyList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_NetworkPolicy(a)
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/networking/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/networking/zz_generated.deepcopy.go
new file mode 100644
index 000000000..802868447
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/networking/zz_generated.deepcopy.go
@@ -0,0 +1,182 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package networking
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ intstr "k8s.io/apimachinery/pkg/util/intstr"
+ api "k8s.io/client-go/pkg/api"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_networking_NetworkPolicy, InType: reflect.TypeOf(&NetworkPolicy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_networking_NetworkPolicyIngressRule, InType: reflect.TypeOf(&NetworkPolicyIngressRule{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_networking_NetworkPolicyList, InType: reflect.TypeOf(&NetworkPolicyList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_networking_NetworkPolicyPeer, InType: reflect.TypeOf(&NetworkPolicyPeer{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_networking_NetworkPolicyPort, InType: reflect.TypeOf(&NetworkPolicyPort{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_networking_NetworkPolicySpec, InType: reflect.TypeOf(&NetworkPolicySpec{})},
+ )
+}
+
+// DeepCopy_networking_NetworkPolicy is an autogenerated deepcopy function.
+func DeepCopy_networking_NetworkPolicy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicy)
+ out := out.(*NetworkPolicy)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_networking_NetworkPolicySpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_networking_NetworkPolicyIngressRule is an autogenerated deepcopy function.
+func DeepCopy_networking_NetworkPolicyIngressRule(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyIngressRule)
+ out := out.(*NetworkPolicyIngressRule)
+ *out = *in
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]NetworkPolicyPort, len(*in))
+ for i := range *in {
+ if err := DeepCopy_networking_NetworkPolicyPort(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.From != nil {
+ in, out := &in.From, &out.From
+ *out = make([]NetworkPolicyPeer, len(*in))
+ for i := range *in {
+ if err := DeepCopy_networking_NetworkPolicyPeer(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_networking_NetworkPolicyList is an autogenerated deepcopy function.
+func DeepCopy_networking_NetworkPolicyList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyList)
+ out := out.(*NetworkPolicyList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]NetworkPolicy, len(*in))
+ for i := range *in {
+ if err := DeepCopy_networking_NetworkPolicy(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_networking_NetworkPolicyPeer is an autogenerated deepcopy function.
+func DeepCopy_networking_NetworkPolicyPeer(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyPeer)
+ out := out.(*NetworkPolicyPeer)
+ *out = *in
+ if in.PodSelector != nil {
+ in, out := &in.PodSelector, &out.PodSelector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if in.NamespaceSelector != nil {
+ in, out := &in.NamespaceSelector, &out.NamespaceSelector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_networking_NetworkPolicyPort is an autogenerated deepcopy function.
+func DeepCopy_networking_NetworkPolicyPort(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyPort)
+ out := out.(*NetworkPolicyPort)
+ *out = *in
+ if in.Protocol != nil {
+ in, out := &in.Protocol, &out.Protocol
+ *out = new(api.Protocol)
+ **out = **in
+ }
+ if in.Port != nil {
+ in, out := &in.Port, &out.Port
+ *out = new(intstr.IntOrString)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_networking_NetworkPolicySpec is an autogenerated deepcopy function.
+func DeepCopy_networking_NetworkPolicySpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicySpec)
+ out := out.(*NetworkPolicySpec)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.PodSelector); err != nil {
+ return err
+ } else {
+ out.PodSelector = *newVal.(*v1.LabelSelector)
+ }
+ if in.Ingress != nil {
+ in, out := &in.Ingress, &out.Ingress
+ *out = make([]NetworkPolicyIngressRule, len(*in))
+ for i := range *in {
+ if err := DeepCopy_networking_NetworkPolicyIngressRule(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/policy/doc.go b/vendor/k8s.io/client-go/pkg/apis/policy/doc.go
new file mode 100644
index 000000000..8feeef8e4
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/policy/doc.go
@@ -0,0 +1,17 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package policy
diff --git a/vendor/k8s.io/client-go/pkg/apis/policy/register.go b/vendor/k8s.io/client-go/pkg/apis/policy/register.go
new file mode 100644
index 000000000..5aadc3f1b
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/policy/register.go
@@ -0,0 +1,54 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package policy
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "policy"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ // TODO this gets cleaned up when the types are fixed
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &PodDisruptionBudget{},
+ &PodDisruptionBudgetList{},
+ &Eviction{},
+ )
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/policy/types.go b/vendor/k8s.io/client-go/pkg/apis/policy/types.go
new file mode 100644
index 000000000..4d49da174
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/policy/types.go
@@ -0,0 +1,120 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package policy
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/util/intstr"
+)
+
+// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
+type PodDisruptionBudgetSpec struct {
+ // An eviction is allowed if at least "minAvailable" pods selected by
+ // "selector" will still be available after the eviction, i.e. even in the
+ // absence of the evicted pod. So for example you can prevent all voluntary
+ // evictions by specifying "100%".
+ // +optional
+ MinAvailable *intstr.IntOrString
+
+ // Label query over pods whose evictions are managed by the disruption
+ // budget.
+ // +optional
+ Selector *metav1.LabelSelector
+
+ // An eviction is allowed if at most "maxUnavailable" pods selected by
+ // "selector" are unavailable after the eviction, i.e. even in absence of
+ // the evicted pod. For example, one can prevent all voluntary evictions
+ // by specifying 0. This is a mutually exclusive setting with "minAvailable".
+ // +optional
+ MaxUnavailable *intstr.IntOrString
+}
+
+// PodDisruptionBudgetStatus represents information about the status of a
+// PodDisruptionBudget. Status may trail the actual state of a system.
+type PodDisruptionBudgetStatus struct {
+ // Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other
+ // status informatio is valid only if observedGeneration equals to PDB's object generation.
+ // +optional
+ ObservedGeneration int64
+
+ // DisruptedPods contains information about pods whose eviction was
+ // processed by the API server eviction subresource handler but has not
+ // yet been observed by the PodDisruptionBudget controller.
+ // A pod will be in this map from the time when the API server processed the
+ // eviction request to the time when the pod is seen by PDB controller
+ // as having been marked for deletion (or after a timeout). The key in the map is the name of the pod
+ // and the value is the time when the API server processed the eviction request. If
+ // the deletion didn't occur and a pod is still there it will be removed from
+ // the list automatically by PodDisruptionBudget controller after some time.
+ // If everything goes smooth this map should be empty for the most of the time.
+ // Large number of entries in the map may indicate problems with pod deletions.
+ DisruptedPods map[string]metav1.Time
+
+ // Number of pod disruptions that are currently allowed.
+ PodDisruptionsAllowed int32
+
+ // current number of healthy pods
+ CurrentHealthy int32
+
+ // minimum desired number of healthy pods
+ DesiredHealthy int32
+
+ // total number of pods counted by this disruption budget
+ ExpectedPods int32
+}
+
+// +genclient=true
+
+// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
+type PodDisruptionBudget struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Specification of the desired behavior of the PodDisruptionBudget.
+ // +optional
+ Spec PodDisruptionBudgetSpec
+ // Most recently observed status of the PodDisruptionBudget.
+ // +optional
+ Status PodDisruptionBudgetStatus
+}
+
+// PodDisruptionBudgetList is a collection of PodDisruptionBudgets.
+type PodDisruptionBudgetList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+ Items []PodDisruptionBudget
+}
+
+// +genclient=true
+// +noMethods=true
+
+// Eviction evicts a pod from its node subject to certain policies and safety constraints.
+// This is a subresource of Pod. A request to cause such an eviction is
+// created by POSTing to .../pods/<pod name>/eviction.
+type Eviction struct {
+ metav1.TypeMeta
+
+ // ObjectMeta describes the pod that is being evicted.
+ // +optional
+ metav1.ObjectMeta
+
+ // DeleteOptions may be provided
+ // +optional
+ DeleteOptions *metav1.DeleteOptions
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/doc.go b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/doc.go
new file mode 100644
index 000000000..aadbe1416
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package policy is for any kind of policy object. Suitable examples, even if
+// they aren't all here, are PodDisruptionBudget, PodSecurityPolicy,
+// NetworkPolicy, etc.
+package v1beta1
diff --git a/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/generated.pb.go
new file mode 100644
index 000000000..0116ded29
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/generated.pb.go
@@ -0,0 +1,1454 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1beta1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.proto
+
+ It has these top-level messages:
+ Eviction
+ PodDisruptionBudget
+ PodDisruptionBudgetList
+ PodDisruptionBudgetSpec
+ PodDisruptionBudgetStatus
+*/
+package v1beta1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+import k8s_io_apimachinery_pkg_util_intstr "k8s.io/apimachinery/pkg/util/intstr"
+
+import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *Eviction) Reset() { *m = Eviction{} }
+func (*Eviction) ProtoMessage() {}
+func (*Eviction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *PodDisruptionBudget) Reset() { *m = PodDisruptionBudget{} }
+func (*PodDisruptionBudget) ProtoMessage() {}
+func (*PodDisruptionBudget) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *PodDisruptionBudgetList) Reset() { *m = PodDisruptionBudgetList{} }
+func (*PodDisruptionBudgetList) ProtoMessage() {}
+func (*PodDisruptionBudgetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
+
+func (m *PodDisruptionBudgetSpec) Reset() { *m = PodDisruptionBudgetSpec{} }
+func (*PodDisruptionBudgetSpec) ProtoMessage() {}
+func (*PodDisruptionBudgetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
+
+func (m *PodDisruptionBudgetStatus) Reset() { *m = PodDisruptionBudgetStatus{} }
+func (*PodDisruptionBudgetStatus) ProtoMessage() {}
+func (*PodDisruptionBudgetStatus) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{4}
+}
+
+func init() {
+ proto.RegisterType((*Eviction)(nil), "k8s.io.client-go.pkg.apis.policy.v1beta1.Eviction")
+ proto.RegisterType((*PodDisruptionBudget)(nil), "k8s.io.client-go.pkg.apis.policy.v1beta1.PodDisruptionBudget")
+ proto.RegisterType((*PodDisruptionBudgetList)(nil), "k8s.io.client-go.pkg.apis.policy.v1beta1.PodDisruptionBudgetList")
+ proto.RegisterType((*PodDisruptionBudgetSpec)(nil), "k8s.io.client-go.pkg.apis.policy.v1beta1.PodDisruptionBudgetSpec")
+ proto.RegisterType((*PodDisruptionBudgetStatus)(nil), "k8s.io.client-go.pkg.apis.policy.v1beta1.PodDisruptionBudgetStatus")
+}
+func (m *Eviction) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Eviction) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ if m.DeleteOptions != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.DeleteOptions.Size()))
+ n2, err := m.DeleteOptions.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ }
+ return i, nil
+}
+
+func (m *PodDisruptionBudget) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodDisruptionBudget) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n3, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n4, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n5, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ return i, nil
+}
+
+func (m *PodDisruptionBudgetList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodDisruptionBudgetList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n6, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PodDisruptionBudgetSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodDisruptionBudgetSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.MinAvailable != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.MinAvailable.Size()))
+ n7, err := m.MinAvailable.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ }
+ if m.Selector != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
+ n8, err := m.Selector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n8
+ }
+ if m.MaxUnavailable != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.MaxUnavailable.Size()))
+ n9, err := m.MaxUnavailable.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n9
+ }
+ return i, nil
+}
+
+func (m *PodDisruptionBudgetStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodDisruptionBudgetStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration))
+ if len(m.DisruptedPods) > 0 {
+ keysForDisruptedPods := make([]string, 0, len(m.DisruptedPods))
+ for k := range m.DisruptedPods {
+ keysForDisruptedPods = append(keysForDisruptedPods, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForDisruptedPods)
+ for _, k := range keysForDisruptedPods {
+ dAtA[i] = 0x12
+ i++
+ v := m.DisruptedPods[string(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n10, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n10
+ }
+ }
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PodDisruptionsAllowed))
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentHealthy))
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.DesiredHealthy))
+ dAtA[i] = 0x30
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ExpectedPods))
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *Eviction) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.DeleteOptions != nil {
+ l = m.DeleteOptions.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *PodDisruptionBudget) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodDisruptionBudgetList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PodDisruptionBudgetSpec) Size() (n int) {
+ var l int
+ _ = l
+ if m.MinAvailable != nil {
+ l = m.MinAvailable.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Selector != nil {
+ l = m.Selector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.MaxUnavailable != nil {
+ l = m.MaxUnavailable.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *PodDisruptionBudgetStatus) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.ObservedGeneration))
+ if len(m.DisruptedPods) > 0 {
+ for k, v := range m.DisruptedPods {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ n += 1 + sovGenerated(uint64(m.PodDisruptionsAllowed))
+ n += 1 + sovGenerated(uint64(m.CurrentHealthy))
+ n += 1 + sovGenerated(uint64(m.DesiredHealthy))
+ n += 1 + sovGenerated(uint64(m.ExpectedPods))
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *Eviction) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Eviction{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `DeleteOptions:` + strings.Replace(fmt.Sprintf("%v", this.DeleteOptions), "DeleteOptions", "k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodDisruptionBudget) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodDisruptionBudget{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodDisruptionBudgetSpec", "PodDisruptionBudgetSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodDisruptionBudgetStatus", "PodDisruptionBudgetStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodDisruptionBudgetList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodDisruptionBudgetList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PodDisruptionBudget", "PodDisruptionBudget", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodDisruptionBudgetSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodDisruptionBudgetSpec{`,
+ `MinAvailable:` + strings.Replace(fmt.Sprintf("%v", this.MinAvailable), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
+ `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
+ `MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodDisruptionBudgetStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForDisruptedPods := make([]string, 0, len(this.DisruptedPods))
+ for k := range this.DisruptedPods {
+ keysForDisruptedPods = append(keysForDisruptedPods, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForDisruptedPods)
+ mapStringForDisruptedPods := "map[string]k8s_io_apimachinery_pkg_apis_meta_v1.Time{"
+ for _, k := range keysForDisruptedPods {
+ mapStringForDisruptedPods += fmt.Sprintf("%v: %v,", k, this.DisruptedPods[k])
+ }
+ mapStringForDisruptedPods += "}"
+ s := strings.Join([]string{`&PodDisruptionBudgetStatus{`,
+ `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
+ `DisruptedPods:` + mapStringForDisruptedPods + `,`,
+ `PodDisruptionsAllowed:` + fmt.Sprintf("%v", this.PodDisruptionsAllowed) + `,`,
+ `CurrentHealthy:` + fmt.Sprintf("%v", this.CurrentHealthy) + `,`,
+ `DesiredHealthy:` + fmt.Sprintf("%v", this.DesiredHealthy) + `,`,
+ `ExpectedPods:` + fmt.Sprintf("%v", this.ExpectedPods) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *Eviction) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Eviction: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Eviction: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DeleteOptions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.DeleteOptions == nil {
+ m.DeleteOptions = &k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions{}
+ }
+ if err := m.DeleteOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodDisruptionBudget) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodDisruptionBudget: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodDisruptionBudget: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodDisruptionBudgetList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodDisruptionBudgetList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodDisruptionBudgetList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, PodDisruptionBudget{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodDisruptionBudgetSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodDisruptionBudgetSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodDisruptionBudgetSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MinAvailable", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.MinAvailable == nil {
+ m.MinAvailable = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
+ }
+ if err := m.MinAvailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Selector == nil {
+ m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
+ }
+ if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MaxUnavailable", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.MaxUnavailable == nil {
+ m.MaxUnavailable = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
+ }
+ if err := m.MaxUnavailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodDisruptionBudgetStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodDisruptionBudgetStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodDisruptionBudgetStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
+ }
+ m.ObservedGeneration = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ObservedGeneration |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DisruptedPods", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.DisruptedPods == nil {
+ m.DisruptedPods = make(map[string]k8s_io_apimachinery_pkg_apis_meta_v1.Time)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_apis_meta_v1.Time{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.DisruptedPods[mapkey] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_apis_meta_v1.Time
+ m.DisruptedPods[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodDisruptionsAllowed", wireType)
+ }
+ m.PodDisruptionsAllowed = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.PodDisruptionsAllowed |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentHealthy", wireType)
+ }
+ m.CurrentHealthy = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.CurrentHealthy |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DesiredHealthy", wireType)
+ }
+ m.DesiredHealthy = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.DesiredHealthy |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ExpectedPods", wireType)
+ }
+ m.ExpectedPods = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ExpectedPods |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/client-go/pkg/apis/policy/v1beta1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 791 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0x5b, 0x6f, 0xe3, 0x44,
+ 0x14, 0xc7, 0xe3, 0x5c, 0x4a, 0x98, 0x4d, 0xa2, 0x32, 0xb0, 0x10, 0x22, 0xe1, 0xa0, 0x3c, 0x2d,
+ 0x88, 0x1d, 0xd3, 0x5d, 0x84, 0x0a, 0x0f, 0x2b, 0xd6, 0xa4, 0x82, 0xa2, 0x46, 0xa9, 0xa6, 0x20,
+ 0x24, 0x04, 0x12, 0x63, 0xfb, 0xd4, 0x19, 0xe2, 0x9b, 0xec, 0x71, 0x68, 0xde, 0xf8, 0x08, 0x3c,
+ 0xf0, 0xa1, 0x2a, 0x21, 0xa1, 0x3e, 0x56, 0x08, 0x45, 0xd4, 0x7c, 0x06, 0xde, 0x91, 0xed, 0xc9,
+ 0xc5, 0x4d, 0xa2, 0x06, 0x8a, 0xf6, 0x2d, 0x73, 0xf9, 0xfd, 0xff, 0xe7, 0xfc, 0x7d, 0x26, 0xe8,
+ 0xa3, 0xf1, 0x61, 0x44, 0xb8, 0xaf, 0x8d, 0x63, 0x03, 0x42, 0x0f, 0x04, 0x44, 0x5a, 0x30, 0xb6,
+ 0x35, 0x16, 0xf0, 0x48, 0x0b, 0x7c, 0x87, 0x9b, 0x53, 0x6d, 0x72, 0x60, 0x80, 0x60, 0x07, 0x9a,
+ 0x0d, 0x1e, 0x84, 0x4c, 0x80, 0x45, 0x82, 0xd0, 0x17, 0x3e, 0x7e, 0x27, 0x47, 0xc9, 0x12, 0x25,
+ 0xc1, 0xd8, 0x26, 0x29, 0x4a, 0x72, 0x94, 0x48, 0xb4, 0xf3, 0xd8, 0xe6, 0x62, 0x14, 0x1b, 0xc4,
+ 0xf4, 0x5d, 0xcd, 0xf6, 0x6d, 0x5f, 0xcb, 0x14, 0x8c, 0xf8, 0x3c, 0x5b, 0x65, 0x8b, 0xec, 0x57,
+ 0xae, 0xdc, 0xf9, 0x40, 0x16, 0xc5, 0x02, 0xee, 0x32, 0x73, 0xc4, 0x3d, 0x08, 0xa7, 0xcb, 0xb2,
+ 0x5c, 0x10, 0x4c, 0x9b, 0xac, 0xd5, 0xd3, 0xd1, 0xb6, 0x51, 0x61, 0xec, 0x09, 0xee, 0xc2, 0x1a,
+ 0xf0, 0xe1, 0x5d, 0x40, 0x64, 0x8e, 0xc0, 0x65, 0x6b, 0xdc, 0xd3, 0x6d, 0x5c, 0x2c, 0xb8, 0xa3,
+ 0x71, 0x4f, 0x44, 0x22, 0x5c, 0x83, 0xde, 0xdb, 0x1a, 0xf4, 0x86, 0x5e, 0x7a, 0xbf, 0x2b, 0xa8,
+ 0x7e, 0x34, 0xe1, 0xa6, 0xe0, 0xbe, 0x87, 0xbf, 0x47, 0xf5, 0xb4, 0x67, 0x8b, 0x09, 0xd6, 0x56,
+ 0xde, 0x56, 0x1e, 0x3d, 0x78, 0xf2, 0x3e, 0x91, 0xd9, 0xaf, 0x96, 0xb0, 0x4c, 0x3f, 0xbd, 0x4d,
+ 0x26, 0x07, 0x64, 0x68, 0xfc, 0x00, 0xa6, 0x18, 0x80, 0x60, 0x3a, 0xbe, 0x9c, 0x75, 0x4b, 0xc9,
+ 0xac, 0x8b, 0x96, 0x7b, 0x74, 0xa1, 0x8a, 0x1d, 0xd4, 0xb4, 0xc0, 0x01, 0x01, 0xc3, 0x20, 0x75,
+ 0x8c, 0xda, 0xe5, 0xcc, 0xe6, 0xe9, 0x6e, 0x36, 0xfd, 0x55, 0x54, 0x7f, 0x25, 0x99, 0x75, 0x9b,
+ 0x85, 0x2d, 0x5a, 0x14, 0xef, 0xfd, 0x5a, 0x46, 0xaf, 0x9e, 0xfa, 0x56, 0x9f, 0x47, 0x61, 0x9c,
+ 0x6d, 0xe9, 0xb1, 0x65, 0x83, 0x78, 0x01, 0x7d, 0x5a, 0xa8, 0x1a, 0x05, 0x60, 0xca, 0xf6, 0x74,
+ 0xb2, 0xf3, 0x04, 0x93, 0x0d, 0xf5, 0x9e, 0x05, 0x60, 0xea, 0x0d, 0xe9, 0x57, 0x4d, 0x57, 0x34,
+ 0x53, 0xc7, 0x0e, 0xda, 0x8b, 0x04, 0x13, 0x71, 0xd4, 0xae, 0x64, 0x3e, 0xfd, 0x7b, 0xfa, 0x64,
+ 0x5a, 0x7a, 0x4b, 0x3a, 0xed, 0xe5, 0x6b, 0x2a, 0x3d, 0x7a, 0x7f, 0x28, 0xe8, 0x8d, 0x0d, 0xd4,
+ 0x09, 0x8f, 0x04, 0xfe, 0x76, 0x2d, 0x51, 0xb2, 0x5b, 0xa2, 0x29, 0x9d, 0xe5, 0xb9, 0x2f, 0x5d,
+ 0xeb, 0xf3, 0x9d, 0x95, 0x34, 0x4d, 0x54, 0xe3, 0x02, 0xdc, 0x74, 0x5a, 0x2a, 0x8f, 0x1e, 0x3c,
+ 0x79, 0x76, 0xbf, 0x36, 0xf5, 0xa6, 0xb4, 0xaa, 0x1d, 0xa7, 0xa2, 0x34, 0xd7, 0xee, 0xfd, 0x56,
+ 0xde, 0xd8, 0x5e, 0x1a, 0x37, 0x3e, 0x47, 0x0d, 0x97, 0x7b, 0xcf, 0x27, 0x8c, 0x3b, 0xcc, 0x70,
+ 0xe0, 0xce, 0xa1, 0x49, 0xdf, 0x27, 0xc9, 0xdf, 0x27, 0x39, 0xf6, 0xc4, 0x30, 0x3c, 0x13, 0x21,
+ 0xf7, 0x6c, 0x7d, 0x3f, 0x99, 0x75, 0x1b, 0x83, 0x15, 0x25, 0x5a, 0xd0, 0xc5, 0xdf, 0xa1, 0x7a,
+ 0x04, 0x0e, 0x98, 0xc2, 0x0f, 0xff, 0xdd, 0xcb, 0x38, 0x61, 0x06, 0x38, 0x67, 0x12, 0xd5, 0x1b,
+ 0x69, 0x8e, 0xf3, 0x15, 0x5d, 0x48, 0x62, 0x07, 0xb5, 0x5c, 0x76, 0xf1, 0x95, 0xc7, 0x16, 0x8d,
+ 0x54, 0xfe, 0x63, 0x23, 0x38, 0x99, 0x75, 0x5b, 0x83, 0x82, 0x16, 0xbd, 0xa5, 0xdd, 0xfb, 0xbb,
+ 0x8a, 0xde, 0xdc, 0x3a, 0x65, 0xf8, 0x0b, 0x84, 0x7d, 0x23, 0x82, 0x70, 0x02, 0xd6, 0x67, 0xf9,
+ 0x7f, 0x12, 0xf7, 0xbd, 0x2c, 0xd8, 0x8a, 0xde, 0x91, 0x1f, 0x08, 0x0f, 0xd7, 0x6e, 0xd0, 0x0d,
+ 0x14, 0xfe, 0x45, 0x41, 0x4d, 0x2b, 0xb7, 0x01, 0xeb, 0xd4, 0xb7, 0xe6, 0x83, 0xf2, 0xf5, 0xff,
+ 0xf1, 0x1e, 0x48, 0x7f, 0x55, 0xf9, 0xc8, 0x13, 0xe1, 0x54, 0x7f, 0x28, 0x0b, 0x6c, 0x16, 0xce,
+ 0x68, 0xb1, 0x08, 0x3c, 0x40, 0xd8, 0x5a, 0x48, 0x46, 0xcf, 0x1d, 0xc7, 0xff, 0x11, 0xac, 0x2c,
+ 0xf2, 0x9a, 0xfe, 0x96, 0x54, 0x78, 0x58, 0xf0, 0x9d, 0x5f, 0xa2, 0x1b, 0x40, 0xfc, 0x0c, 0xb5,
+ 0xcc, 0x38, 0x0c, 0xc1, 0x13, 0x9f, 0x03, 0x73, 0xc4, 0x68, 0xda, 0xae, 0x66, 0x52, 0xaf, 0x4b,
+ 0xa9, 0xd6, 0xa7, 0x85, 0x53, 0x7a, 0xeb, 0x76, 0xca, 0x5b, 0x10, 0xf1, 0x10, 0xac, 0x39, 0x5f,
+ 0x2b, 0xf2, 0xfd, 0xc2, 0x29, 0xbd, 0x75, 0x1b, 0x1f, 0xa2, 0x06, 0x5c, 0x04, 0x60, 0xce, 0x33,
+ 0xde, 0xcb, 0xe8, 0xd7, 0x24, 0xdd, 0x38, 0x5a, 0x39, 0xa3, 0x85, 0x9b, 0x1d, 0x07, 0xe1, 0xf5,
+ 0x10, 0xf1, 0x3e, 0xaa, 0x8c, 0x61, 0x9a, 0x7d, 0xf2, 0x97, 0x69, 0xfa, 0x13, 0x7f, 0x82, 0x6a,
+ 0x13, 0xe6, 0xc4, 0x20, 0x67, 0xff, 0xdd, 0xdd, 0x66, 0xff, 0x4b, 0xee, 0x02, 0xcd, 0xc1, 0x8f,
+ 0xcb, 0x87, 0x8a, 0xfe, 0xf8, 0xf2, 0x46, 0x2d, 0x5d, 0xdd, 0xa8, 0xa5, 0xeb, 0x1b, 0xb5, 0xf4,
+ 0x53, 0xa2, 0x2a, 0x97, 0x89, 0xaa, 0x5c, 0x25, 0xaa, 0x72, 0x9d, 0xa8, 0xca, 0x9f, 0x89, 0xaa,
+ 0xfc, 0xfc, 0x97, 0x5a, 0xfa, 0xe6, 0x25, 0xf9, 0xe1, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x58,
+ 0xfb, 0xa1, 0x14, 0x99, 0x08, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/generated.proto
new file mode 100644
index 000000000..1cdde5a18
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/generated.proto
@@ -0,0 +1,114 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.client_go.pkg.apis.policy.v1beta1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1beta1";
+
+// Eviction evicts a pod from its node subject to certain policies and safety constraints.
+// This is a subresource of Pod. A request to cause such an eviction is
+// created by POSTing to .../pods/<pod name>/evictions.
+message Eviction {
+ // ObjectMeta describes the pod that is being evicted.
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // DeleteOptions may be provided
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.DeleteOptions deleteOptions = 2;
+}
+
+// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
+message PodDisruptionBudget {
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Specification of the desired behavior of the PodDisruptionBudget.
+ optional PodDisruptionBudgetSpec spec = 2;
+
+ // Most recently observed status of the PodDisruptionBudget.
+ optional PodDisruptionBudgetStatus status = 3;
+}
+
+// PodDisruptionBudgetList is a collection of PodDisruptionBudgets.
+message PodDisruptionBudgetList {
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ repeated PodDisruptionBudget items = 2;
+}
+
+// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
+message PodDisruptionBudgetSpec {
+ // An eviction is allowed if at least "minAvailable" pods selected by
+ // "selector" will still be available after the eviction, i.e. even in the
+ // absence of the evicted pod. So for example you can prevent all voluntary
+ // evictions by specifying "100%".
+ optional k8s.io.apimachinery.pkg.util.intstr.IntOrString minAvailable = 1;
+
+ // Label query over pods whose evictions are managed by the disruption
+ // budget.
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
+
+ // An eviction is allowed if at most "maxUnavailable" pods selected by
+ // "selector" are unavailable after the eviction, i.e. even in absence of
+ // the evicted pod. For example, one can prevent all voluntary evictions
+ // by specifying 0. This is a mutually exclusive setting with "minAvailable".
+ optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 3;
+}
+
+// PodDisruptionBudgetStatus represents information about the status of a
+// PodDisruptionBudget. Status may trail the actual state of a system.
+message PodDisruptionBudgetStatus {
+ // Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other
+ // status informatio is valid only if observedGeneration equals to PDB's object generation.
+ // +optional
+ optional int64 observedGeneration = 1;
+
+ // DisruptedPods contains information about pods whose eviction was
+ // processed by the API server eviction subresource handler but has not
+ // yet been observed by the PodDisruptionBudget controller.
+ // A pod will be in this map from the time when the API server processed the
+ // eviction request to the time when the pod is seen by PDB controller
+ // as having been marked for deletion (or after a timeout). The key in the map is the name of the pod
+ // and the value is the time when the API server processed the eviction request. If
+ // the deletion didn't occur and a pod is still there it will be removed from
+ // the list automatically by PodDisruptionBudget controller after some time.
+ // If everything goes smooth this map should be empty for the most of the time.
+ // Large number of entries in the map may indicate problems with pod deletions.
+ map<string, k8s.io.apimachinery.pkg.apis.meta.v1.Time> disruptedPods = 2;
+
+ // Number of pod disruptions that are currently allowed.
+ optional int32 disruptionsAllowed = 3;
+
+ // current number of healthy pods
+ optional int32 currentHealthy = 4;
+
+ // minimum desired number of healthy pods
+ optional int32 desiredHealthy = 5;
+
+ // total number of pods counted by this disruption budget
+ optional int32 expectedPods = 6;
+}
+
diff --git a/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/register.go b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/register.go
new file mode 100644
index 000000000..a3ccc94e6
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/register.go
@@ -0,0 +1,61 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "policy"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, RegisterDefaults)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &PodDisruptionBudget{},
+ &PodDisruptionBudgetList{},
+ &Eviction{},
+ )
+ // Add the watch version that applies
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/types.generated.go
new file mode 100644
index 000000000..a4636a80a
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/types.generated.go
@@ -0,0 +1,2305 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1beta1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg2_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ pkg3_types "k8s.io/apimachinery/pkg/types"
+ pkg1_intstr "k8s.io/apimachinery/pkg/util/intstr"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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_v1.LabelSelector
+ var v1 pkg3_types.UID
+ var v2 pkg1_intstr.IntOrString
+ var v3 time.Time
+ _, _, _, _ = v0, v1, v2, v3
+ }
+}
+
+func (x *PodDisruptionBudgetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.MinAvailable != nil
+ yyq2[1] = x.Selector != nil
+ yyq2[2] = x.MaxUnavailable != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.MinAvailable == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.MinAvailable) {
+ } else if !yym4 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.MinAvailable)
+ } else {
+ z.EncFallback(x.MinAvailable)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("minAvailable"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.MinAvailable == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.MinAvailable) {
+ } else if !yym5 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.MinAvailable)
+ } else {
+ z.EncFallback(x.MinAvailable)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.MaxUnavailable == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.MaxUnavailable) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.MaxUnavailable)
+ } else {
+ z.EncFallback(x.MaxUnavailable)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("maxUnavailable"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.MaxUnavailable == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.MaxUnavailable) {
+ } else if !yym11 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.MaxUnavailable)
+ } else {
+ z.EncFallback(x.MaxUnavailable)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodDisruptionBudgetSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodDisruptionBudgetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "minAvailable":
+ if r.TryDecodeAsNil() {
+ if x.MinAvailable != nil {
+ x.MinAvailable = nil
+ }
+ } else {
+ if x.MinAvailable == nil {
+ x.MinAvailable = new(pkg1_intstr.IntOrString)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.MinAvailable) {
+ } else if !yym5 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.MinAvailable)
+ } else {
+ z.DecFallback(x.MinAvailable, false)
+ }
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg2_v1.LabelSelector)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ case "maxUnavailable":
+ if r.TryDecodeAsNil() {
+ if x.MaxUnavailable != nil {
+ x.MaxUnavailable = nil
+ }
+ } else {
+ if x.MaxUnavailable == nil {
+ x.MaxUnavailable = new(pkg1_intstr.IntOrString)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.MaxUnavailable) {
+ } else if !yym9 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.MaxUnavailable)
+ } else {
+ z.DecFallback(x.MaxUnavailable, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodDisruptionBudgetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.MinAvailable != nil {
+ x.MinAvailable = nil
+ }
+ } else {
+ if x.MinAvailable == nil {
+ x.MinAvailable = new(pkg1_intstr.IntOrString)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.MinAvailable) {
+ } else if !yym12 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.MinAvailable)
+ } else {
+ z.DecFallback(x.MinAvailable, false)
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg2_v1.LabelSelector)
+ }
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.MaxUnavailable != nil {
+ x.MaxUnavailable = nil
+ }
+ } else {
+ if x.MaxUnavailable == nil {
+ x.MaxUnavailable = new(pkg1_intstr.IntOrString)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.MaxUnavailable) {
+ } else if !yym16 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.MaxUnavailable)
+ } else {
+ z.DecFallback(x.MaxUnavailable, false)
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodDisruptionBudgetStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.ObservedGeneration != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 5
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ObservedGeneration))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("observedGeneration"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ObservedGeneration))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.DisruptedPods == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encMapstringv1_Time((map[string]pkg2_v1.Time)(x.DisruptedPods), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("disruptedPods"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.DisruptedPods == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encMapstringv1_Time((map[string]pkg2_v1.Time)(x.DisruptedPods), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.PodDisruptionsAllowed))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("disruptionsAllowed"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.PodDisruptionsAllowed))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.CurrentHealthy))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentHealthy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(x.CurrentHealthy))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(x.DesiredHealthy))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("desiredHealthy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(x.DesiredHealthy))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ExpectedPods))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("expectedPods"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ExpectedPods))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodDisruptionBudgetStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodDisruptionBudgetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "observedGeneration":
+ if r.TryDecodeAsNil() {
+ x.ObservedGeneration = 0
+ } else {
+ yyv4 := &x.ObservedGeneration
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int64)(yyv4)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "disruptedPods":
+ if r.TryDecodeAsNil() {
+ x.DisruptedPods = nil
+ } else {
+ yyv6 := &x.DisruptedPods
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decMapstringv1_Time((*map[string]pkg2_v1.Time)(yyv6), d)
+ }
+ }
+ case "disruptionsAllowed":
+ if r.TryDecodeAsNil() {
+ x.PodDisruptionsAllowed = 0
+ } else {
+ yyv8 := &x.PodDisruptionsAllowed
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "currentHealthy":
+ if r.TryDecodeAsNil() {
+ x.CurrentHealthy = 0
+ } else {
+ yyv10 := &x.CurrentHealthy
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(yyv10)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "desiredHealthy":
+ if r.TryDecodeAsNil() {
+ x.DesiredHealthy = 0
+ } else {
+ yyv12 := &x.DesiredHealthy
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int32)(yyv12)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "expectedPods":
+ if r.TryDecodeAsNil() {
+ x.ExpectedPods = 0
+ } else {
+ yyv14 := &x.ExpectedPods
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*int32)(yyv14)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodDisruptionBudgetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj16 int
+ var yyb16 bool
+ var yyhl16 bool = l >= 0
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObservedGeneration = 0
+ } else {
+ yyv17 := &x.ObservedGeneration
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int64)(yyv17)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DisruptedPods = nil
+ } else {
+ yyv19 := &x.DisruptedPods
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decMapstringv1_Time((*map[string]pkg2_v1.Time)(yyv19), d)
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PodDisruptionsAllowed = 0
+ } else {
+ yyv21 := &x.PodDisruptionsAllowed
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int32)(yyv21)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentHealthy = 0
+ } else {
+ yyv23 := &x.CurrentHealthy
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*int32)(yyv23)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DesiredHealthy = 0
+ } else {
+ yyv25 := &x.DesiredHealthy
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*int32)(yyv25)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ExpectedPods = 0
+ } else {
+ yyv27 := &x.ExpectedPods
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*int32)(yyv27)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj16-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodDisruptionBudget) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodDisruptionBudget) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodDisruptionBudget) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 = PodDisruptionBudgetSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = PodDisruptionBudgetStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodDisruptionBudget) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = PodDisruptionBudgetSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = PodDisruptionBudgetStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodDisruptionBudgetList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSlicePodDisruptionBudget(([]PodDisruptionBudget)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSlicePodDisruptionBudget(([]PodDisruptionBudget)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodDisruptionBudgetList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodDisruptionBudgetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSlicePodDisruptionBudget((*[]PodDisruptionBudget)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodDisruptionBudgetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSlicePodDisruptionBudget((*[]PodDisruptionBudget)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Eviction) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = x.DeleteOptions != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ if x.DeleteOptions == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.DeleteOptions) {
+ } else {
+ z.EncFallback(x.DeleteOptions)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("deleteOptions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.DeleteOptions == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.DeleteOptions) {
+ } else {
+ z.EncFallback(x.DeleteOptions)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Eviction) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Eviction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 "deleteOptions":
+ if r.TryDecodeAsNil() {
+ if x.DeleteOptions != nil {
+ x.DeleteOptions = nil
+ }
+ } else {
+ if x.DeleteOptions == nil {
+ x.DeleteOptions = new(pkg2_v1.DeleteOptions)
+ }
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.DeleteOptions) {
+ } else {
+ z.DecFallback(x.DeleteOptions, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Eviction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.DeleteOptions != nil {
+ x.DeleteOptions = nil
+ }
+ } else {
+ if x.DeleteOptions == nil {
+ x.DeleteOptions = new(pkg2_v1.DeleteOptions)
+ }
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.DeleteOptions) {
+ } else {
+ z.DecFallback(x.DeleteOptions, false)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encMapstringv1_Time(v map[string]pkg2_v1.Time, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeMapStart(len(v))
+ for yyk1, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ yym2 := z.EncBinary()
+ _ = yym2
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yyk1))
+ }
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy3 := &yyv1
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy3) {
+ } else if yym4 {
+ z.EncBinaryMarshal(yy3)
+ } else if !yym4 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy3)
+ } else {
+ z.EncFallback(yy3)
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) decMapstringv1_Time(v *map[string]pkg2_v1.Time, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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, 40)
+ yyv1 = make(map[string]pkg2_v1.Time, yyrl1)
+ *v = yyv1
+ }
+ var yymk1 string
+ var yymv1 pkg2_v1.Time
+ var yymg1 bool
+ if yybh1.MapValueReset {
+ yymg1 = true
+ }
+ if yyl1 > 0 {
+ for yyj1 := 0; yyj1 < yyl1; yyj1++ {
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ if r.TryDecodeAsNil() {
+ yymk1 = ""
+ } else {
+ yyv2 := &yymk1
+ yym3 := z.DecBinary()
+ _ = yym3
+ if false {
+ } else {
+ *((*string)(yyv2)) = r.DecodeString()
+ }
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = pkg2_v1.Time{}
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = pkg2_v1.Time{}
+ } else {
+ yyv4 := &yymv1
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else if yym5 {
+ z.DecBinaryUnmarshal(yyv4)
+ } else if !yym5 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv4)
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } else if yyl1 < 0 {
+ for yyj1 := 0; !r.CheckBreak(); yyj1++ {
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ if r.TryDecodeAsNil() {
+ yymk1 = ""
+ } else {
+ yyv6 := &yymk1
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = pkg2_v1.Time{}
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = pkg2_v1.Time{}
+ } else {
+ yyv8 := &yymv1
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv8) {
+ } else if yym9 {
+ z.DecBinaryUnmarshal(yyv8)
+ } else if !yym9 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv8)
+ } else {
+ z.DecFallback(yyv8, false)
+ }
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } // else len==0: TODO: Should we clear map entries?
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) encSlicePodDisruptionBudget(v []PodDisruptionBudget, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicePodDisruptionBudget(v *[]PodDisruptionBudget, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []PodDisruptionBudget{}
+ 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, 320)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]PodDisruptionBudget, yyrl1)
+ }
+ } else {
+ yyv1 = make([]PodDisruptionBudget, 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] = PodDisruptionBudget{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, PodDisruptionBudget{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PodDisruptionBudget{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, PodDisruptionBudget{}) // var yyz1 PodDisruptionBudget
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PodDisruptionBudget{}
+ } 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 = []PodDisruptionBudget{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/types.go b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/types.go
new file mode 100644
index 000000000..6cc56256a
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/types.go
@@ -0,0 +1,111 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/util/intstr"
+)
+
+// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
+type PodDisruptionBudgetSpec struct {
+ // An eviction is allowed if at least "minAvailable" pods selected by
+ // "selector" will still be available after the eviction, i.e. even in the
+ // absence of the evicted pod. So for example you can prevent all voluntary
+ // evictions by specifying "100%".
+ MinAvailable *intstr.IntOrString `json:"minAvailable,omitempty" protobuf:"bytes,1,opt,name=minAvailable"`
+
+ // Label query over pods whose evictions are managed by the disruption
+ // budget.
+ Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
+
+ // An eviction is allowed if at most "maxUnavailable" pods selected by
+ // "selector" are unavailable after the eviction, i.e. even in absence of
+ // the evicted pod. For example, one can prevent all voluntary evictions
+ // by specifying 0. This is a mutually exclusive setting with "minAvailable".
+ MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,3,opt,name=maxUnavailable"`
+}
+
+// PodDisruptionBudgetStatus represents information about the status of a
+// PodDisruptionBudget. Status may trail the actual state of a system.
+type PodDisruptionBudgetStatus struct {
+ // Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other
+ // status informatio is valid only if observedGeneration equals to PDB's object generation.
+ // +optional
+ ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
+
+ // DisruptedPods contains information about pods whose eviction was
+ // processed by the API server eviction subresource handler but has not
+ // yet been observed by the PodDisruptionBudget controller.
+ // A pod will be in this map from the time when the API server processed the
+ // eviction request to the time when the pod is seen by PDB controller
+ // as having been marked for deletion (or after a timeout). The key in the map is the name of the pod
+ // and the value is the time when the API server processed the eviction request. If
+ // the deletion didn't occur and a pod is still there it will be removed from
+ // the list automatically by PodDisruptionBudget controller after some time.
+ // If everything goes smooth this map should be empty for the most of the time.
+ // Large number of entries in the map may indicate problems with pod deletions.
+ DisruptedPods map[string]metav1.Time `json:"disruptedPods" protobuf:"bytes,2,rep,name=disruptedPods"`
+
+ // Number of pod disruptions that are currently allowed.
+ PodDisruptionsAllowed int32 `json:"disruptionsAllowed" protobuf:"varint,3,opt,name=disruptionsAllowed"`
+
+ // current number of healthy pods
+ CurrentHealthy int32 `json:"currentHealthy" protobuf:"varint,4,opt,name=currentHealthy"`
+
+ // minimum desired number of healthy pods
+ DesiredHealthy int32 `json:"desiredHealthy" protobuf:"varint,5,opt,name=desiredHealthy"`
+
+ // total number of pods counted by this disruption budget
+ ExpectedPods int32 `json:"expectedPods" protobuf:"varint,6,opt,name=expectedPods"`
+}
+
+// +genclient=true
+
+// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
+type PodDisruptionBudget struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Specification of the desired behavior of the PodDisruptionBudget.
+ Spec PodDisruptionBudgetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+ // Most recently observed status of the PodDisruptionBudget.
+ Status PodDisruptionBudgetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// PodDisruptionBudgetList is a collection of PodDisruptionBudgets.
+type PodDisruptionBudgetList struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+ Items []PodDisruptionBudget `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// +genclient=true
+// +noMethods=true
+
+// Eviction evicts a pod from its node subject to certain policies and safety constraints.
+// This is a subresource of Pod. A request to cause such an eviction is
+// created by POSTing to .../pods/<pod name>/evictions.
+type Eviction struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // ObjectMeta describes the pod that is being evicted.
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // DeleteOptions may be provided
+ DeleteOptions *metav1.DeleteOptions `json:"deleteOptions,omitempty" protobuf:"bytes,2,opt,name=deleteOptions"`
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..29432506d
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/types_swagger_doc_generated.go
@@ -0,0 +1,83 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_Eviction = map[string]string{
+ "": "Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods/<pod name>/evictions.",
+ "metadata": "ObjectMeta describes the pod that is being evicted.",
+ "deleteOptions": "DeleteOptions may be provided",
+}
+
+func (Eviction) SwaggerDoc() map[string]string {
+ return map_Eviction
+}
+
+var map_PodDisruptionBudget = map[string]string{
+ "": "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods",
+ "spec": "Specification of the desired behavior of the PodDisruptionBudget.",
+ "status": "Most recently observed status of the PodDisruptionBudget.",
+}
+
+func (PodDisruptionBudget) SwaggerDoc() map[string]string {
+ return map_PodDisruptionBudget
+}
+
+var map_PodDisruptionBudgetList = map[string]string{
+ "": "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.",
+}
+
+func (PodDisruptionBudgetList) SwaggerDoc() map[string]string {
+ return map_PodDisruptionBudgetList
+}
+
+var map_PodDisruptionBudgetSpec = map[string]string{
+ "": "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.",
+ "minAvailable": "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\".",
+ "selector": "Label query over pods whose evictions are managed by the disruption budget.",
+ "maxUnavailable": "An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\".",
+}
+
+func (PodDisruptionBudgetSpec) SwaggerDoc() map[string]string {
+ return map_PodDisruptionBudgetSpec
+}
+
+var map_PodDisruptionBudgetStatus = map[string]string{
+ "": "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.",
+ "observedGeneration": "Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other status informatio is valid only if observedGeneration equals to PDB's object generation.",
+ "disruptedPods": "DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.",
+ "disruptionsAllowed": "Number of pod disruptions that are currently allowed.",
+ "currentHealthy": "current number of healthy pods",
+ "desiredHealthy": "minimum desired number of healthy pods",
+ "expectedPods": "total number of pods counted by this disruption budget",
+}
+
+func (PodDisruptionBudgetStatus) SwaggerDoc() map[string]string {
+ return map_PodDisruptionBudgetStatus
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/zz_generated.conversion.go
new file mode 100644
index 000000000..b10663a02
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/zz_generated.conversion.go
@@ -0,0 +1,185 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ intstr "k8s.io/apimachinery/pkg/util/intstr"
+ policy "k8s.io/client-go/pkg/apis/policy"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1beta1_Eviction_To_policy_Eviction,
+ Convert_policy_Eviction_To_v1beta1_Eviction,
+ Convert_v1beta1_PodDisruptionBudget_To_policy_PodDisruptionBudget,
+ Convert_policy_PodDisruptionBudget_To_v1beta1_PodDisruptionBudget,
+ Convert_v1beta1_PodDisruptionBudgetList_To_policy_PodDisruptionBudgetList,
+ Convert_policy_PodDisruptionBudgetList_To_v1beta1_PodDisruptionBudgetList,
+ Convert_v1beta1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec,
+ Convert_policy_PodDisruptionBudgetSpec_To_v1beta1_PodDisruptionBudgetSpec,
+ Convert_v1beta1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus,
+ Convert_policy_PodDisruptionBudgetStatus_To_v1beta1_PodDisruptionBudgetStatus,
+ )
+}
+
+func autoConvert_v1beta1_Eviction_To_policy_Eviction(in *Eviction, out *policy.Eviction, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.DeleteOptions = (*v1.DeleteOptions)(unsafe.Pointer(in.DeleteOptions))
+ return nil
+}
+
+// Convert_v1beta1_Eviction_To_policy_Eviction is an autogenerated conversion function.
+func Convert_v1beta1_Eviction_To_policy_Eviction(in *Eviction, out *policy.Eviction, s conversion.Scope) error {
+ return autoConvert_v1beta1_Eviction_To_policy_Eviction(in, out, s)
+}
+
+func autoConvert_policy_Eviction_To_v1beta1_Eviction(in *policy.Eviction, out *Eviction, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.DeleteOptions = (*v1.DeleteOptions)(unsafe.Pointer(in.DeleteOptions))
+ return nil
+}
+
+// Convert_policy_Eviction_To_v1beta1_Eviction is an autogenerated conversion function.
+func Convert_policy_Eviction_To_v1beta1_Eviction(in *policy.Eviction, out *Eviction, s conversion.Scope) error {
+ return autoConvert_policy_Eviction_To_v1beta1_Eviction(in, out, s)
+}
+
+func autoConvert_v1beta1_PodDisruptionBudget_To_policy_PodDisruptionBudget(in *PodDisruptionBudget, out *policy.PodDisruptionBudget, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1beta1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_PodDisruptionBudget_To_policy_PodDisruptionBudget is an autogenerated conversion function.
+func Convert_v1beta1_PodDisruptionBudget_To_policy_PodDisruptionBudget(in *PodDisruptionBudget, out *policy.PodDisruptionBudget, s conversion.Scope) error {
+ return autoConvert_v1beta1_PodDisruptionBudget_To_policy_PodDisruptionBudget(in, out, s)
+}
+
+func autoConvert_policy_PodDisruptionBudget_To_v1beta1_PodDisruptionBudget(in *policy.PodDisruptionBudget, out *PodDisruptionBudget, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_policy_PodDisruptionBudgetSpec_To_v1beta1_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_policy_PodDisruptionBudgetStatus_To_v1beta1_PodDisruptionBudgetStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_policy_PodDisruptionBudget_To_v1beta1_PodDisruptionBudget is an autogenerated conversion function.
+func Convert_policy_PodDisruptionBudget_To_v1beta1_PodDisruptionBudget(in *policy.PodDisruptionBudget, out *PodDisruptionBudget, s conversion.Scope) error {
+ return autoConvert_policy_PodDisruptionBudget_To_v1beta1_PodDisruptionBudget(in, out, s)
+}
+
+func autoConvert_v1beta1_PodDisruptionBudgetList_To_policy_PodDisruptionBudgetList(in *PodDisruptionBudgetList, out *policy.PodDisruptionBudgetList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]policy.PodDisruptionBudget)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1beta1_PodDisruptionBudgetList_To_policy_PodDisruptionBudgetList is an autogenerated conversion function.
+func Convert_v1beta1_PodDisruptionBudgetList_To_policy_PodDisruptionBudgetList(in *PodDisruptionBudgetList, out *policy.PodDisruptionBudgetList, s conversion.Scope) error {
+ return autoConvert_v1beta1_PodDisruptionBudgetList_To_policy_PodDisruptionBudgetList(in, out, s)
+}
+
+func autoConvert_policy_PodDisruptionBudgetList_To_v1beta1_PodDisruptionBudgetList(in *policy.PodDisruptionBudgetList, out *PodDisruptionBudgetList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]PodDisruptionBudget, 0)
+ } else {
+ out.Items = *(*[]PodDisruptionBudget)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_policy_PodDisruptionBudgetList_To_v1beta1_PodDisruptionBudgetList is an autogenerated conversion function.
+func Convert_policy_PodDisruptionBudgetList_To_v1beta1_PodDisruptionBudgetList(in *policy.PodDisruptionBudgetList, out *PodDisruptionBudgetList, s conversion.Scope) error {
+ return autoConvert_policy_PodDisruptionBudgetList_To_v1beta1_PodDisruptionBudgetList(in, out, s)
+}
+
+func autoConvert_v1beta1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(in *PodDisruptionBudgetSpec, out *policy.PodDisruptionBudgetSpec, s conversion.Scope) error {
+ out.MinAvailable = (*intstr.IntOrString)(unsafe.Pointer(in.MinAvailable))
+ out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector))
+ out.MaxUnavailable = (*intstr.IntOrString)(unsafe.Pointer(in.MaxUnavailable))
+ return nil
+}
+
+// Convert_v1beta1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec is an autogenerated conversion function.
+func Convert_v1beta1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(in *PodDisruptionBudgetSpec, out *policy.PodDisruptionBudgetSpec, s conversion.Scope) error {
+ return autoConvert_v1beta1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(in, out, s)
+}
+
+func autoConvert_policy_PodDisruptionBudgetSpec_To_v1beta1_PodDisruptionBudgetSpec(in *policy.PodDisruptionBudgetSpec, out *PodDisruptionBudgetSpec, s conversion.Scope) error {
+ out.MinAvailable = (*intstr.IntOrString)(unsafe.Pointer(in.MinAvailable))
+ out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector))
+ out.MaxUnavailable = (*intstr.IntOrString)(unsafe.Pointer(in.MaxUnavailable))
+ return nil
+}
+
+// Convert_policy_PodDisruptionBudgetSpec_To_v1beta1_PodDisruptionBudgetSpec is an autogenerated conversion function.
+func Convert_policy_PodDisruptionBudgetSpec_To_v1beta1_PodDisruptionBudgetSpec(in *policy.PodDisruptionBudgetSpec, out *PodDisruptionBudgetSpec, s conversion.Scope) error {
+ return autoConvert_policy_PodDisruptionBudgetSpec_To_v1beta1_PodDisruptionBudgetSpec(in, out, s)
+}
+
+func autoConvert_v1beta1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus(in *PodDisruptionBudgetStatus, out *policy.PodDisruptionBudgetStatus, s conversion.Scope) error {
+ out.ObservedGeneration = in.ObservedGeneration
+ out.DisruptedPods = *(*map[string]v1.Time)(unsafe.Pointer(&in.DisruptedPods))
+ out.PodDisruptionsAllowed = in.PodDisruptionsAllowed
+ out.CurrentHealthy = in.CurrentHealthy
+ out.DesiredHealthy = in.DesiredHealthy
+ out.ExpectedPods = in.ExpectedPods
+ return nil
+}
+
+// Convert_v1beta1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus is an autogenerated conversion function.
+func Convert_v1beta1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus(in *PodDisruptionBudgetStatus, out *policy.PodDisruptionBudgetStatus, s conversion.Scope) error {
+ return autoConvert_v1beta1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus(in, out, s)
+}
+
+func autoConvert_policy_PodDisruptionBudgetStatus_To_v1beta1_PodDisruptionBudgetStatus(in *policy.PodDisruptionBudgetStatus, out *PodDisruptionBudgetStatus, s conversion.Scope) error {
+ out.ObservedGeneration = in.ObservedGeneration
+ out.DisruptedPods = *(*map[string]v1.Time)(unsafe.Pointer(&in.DisruptedPods))
+ out.PodDisruptionsAllowed = in.PodDisruptionsAllowed
+ out.CurrentHealthy = in.CurrentHealthy
+ out.DesiredHealthy = in.DesiredHealthy
+ out.ExpectedPods = in.ExpectedPods
+ return nil
+}
+
+// Convert_policy_PodDisruptionBudgetStatus_To_v1beta1_PodDisruptionBudgetStatus is an autogenerated conversion function.
+func Convert_policy_PodDisruptionBudgetStatus_To_v1beta1_PodDisruptionBudgetStatus(in *policy.PodDisruptionBudgetStatus, out *PodDisruptionBudgetStatus, s conversion.Scope) error {
+ return autoConvert_policy_PodDisruptionBudgetStatus_To_v1beta1_PodDisruptionBudgetStatus(in, out, s)
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..cf8ddbd62
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/zz_generated.deepcopy.go
@@ -0,0 +1,153 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ intstr "k8s.io/apimachinery/pkg/util/intstr"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Eviction, InType: reflect.TypeOf(&Eviction{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_PodDisruptionBudget, InType: reflect.TypeOf(&PodDisruptionBudget{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_PodDisruptionBudgetList, InType: reflect.TypeOf(&PodDisruptionBudgetList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_PodDisruptionBudgetSpec, InType: reflect.TypeOf(&PodDisruptionBudgetSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_PodDisruptionBudgetStatus, InType: reflect.TypeOf(&PodDisruptionBudgetStatus{})},
+ )
+}
+
+// DeepCopy_v1beta1_Eviction is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_Eviction(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Eviction)
+ out := out.(*Eviction)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.DeleteOptions != nil {
+ in, out := &in.DeleteOptions, &out.DeleteOptions
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.DeleteOptions)
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_PodDisruptionBudget is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_PodDisruptionBudget(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodDisruptionBudget)
+ out := out.(*PodDisruptionBudget)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_PodDisruptionBudgetStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_PodDisruptionBudgetList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_PodDisruptionBudgetList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodDisruptionBudgetList)
+ out := out.(*PodDisruptionBudgetList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodDisruptionBudget, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_PodDisruptionBudget(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_PodDisruptionBudgetSpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_PodDisruptionBudgetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodDisruptionBudgetSpec)
+ out := out.(*PodDisruptionBudgetSpec)
+ *out = *in
+ if in.MinAvailable != nil {
+ in, out := &in.MinAvailable, &out.MinAvailable
+ *out = new(intstr.IntOrString)
+ **out = **in
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if in.MaxUnavailable != nil {
+ in, out := &in.MaxUnavailable, &out.MaxUnavailable
+ *out = new(intstr.IntOrString)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_PodDisruptionBudgetStatus is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_PodDisruptionBudgetStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodDisruptionBudgetStatus)
+ out := out.(*PodDisruptionBudgetStatus)
+ *out = *in
+ if in.DisruptedPods != nil {
+ in, out := &in.DisruptedPods, &out.DisruptedPods
+ *out = make(map[string]v1.Time)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/zz_generated.defaults.go
new file mode 100644
index 000000000..e24e70be3
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/policy/v1beta1/zz_generated.defaults.go
@@ -0,0 +1,32 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/policy/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/policy/zz_generated.deepcopy.go
new file mode 100644
index 000000000..ba27f9072
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/policy/zz_generated.deepcopy.go
@@ -0,0 +1,153 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package policy
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ intstr "k8s.io/apimachinery/pkg/util/intstr"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_policy_Eviction, InType: reflect.TypeOf(&Eviction{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_policy_PodDisruptionBudget, InType: reflect.TypeOf(&PodDisruptionBudget{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_policy_PodDisruptionBudgetList, InType: reflect.TypeOf(&PodDisruptionBudgetList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_policy_PodDisruptionBudgetSpec, InType: reflect.TypeOf(&PodDisruptionBudgetSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_policy_PodDisruptionBudgetStatus, InType: reflect.TypeOf(&PodDisruptionBudgetStatus{})},
+ )
+}
+
+// DeepCopy_policy_Eviction is an autogenerated deepcopy function.
+func DeepCopy_policy_Eviction(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Eviction)
+ out := out.(*Eviction)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.DeleteOptions != nil {
+ in, out := &in.DeleteOptions, &out.DeleteOptions
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.DeleteOptions)
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_policy_PodDisruptionBudget is an autogenerated deepcopy function.
+func DeepCopy_policy_PodDisruptionBudget(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodDisruptionBudget)
+ out := out.(*PodDisruptionBudget)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_policy_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_policy_PodDisruptionBudgetStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_policy_PodDisruptionBudgetList is an autogenerated deepcopy function.
+func DeepCopy_policy_PodDisruptionBudgetList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodDisruptionBudgetList)
+ out := out.(*PodDisruptionBudgetList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodDisruptionBudget, len(*in))
+ for i := range *in {
+ if err := DeepCopy_policy_PodDisruptionBudget(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_policy_PodDisruptionBudgetSpec is an autogenerated deepcopy function.
+func DeepCopy_policy_PodDisruptionBudgetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodDisruptionBudgetSpec)
+ out := out.(*PodDisruptionBudgetSpec)
+ *out = *in
+ if in.MinAvailable != nil {
+ in, out := &in.MinAvailable, &out.MinAvailable
+ *out = new(intstr.IntOrString)
+ **out = **in
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if in.MaxUnavailable != nil {
+ in, out := &in.MaxUnavailable, &out.MaxUnavailable
+ *out = new(intstr.IntOrString)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_policy_PodDisruptionBudgetStatus is an autogenerated deepcopy function.
+func DeepCopy_policy_PodDisruptionBudgetStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodDisruptionBudgetStatus)
+ out := out.(*PodDisruptionBudgetStatus)
+ *out = *in
+ if in.DisruptedPods != nil {
+ in, out := &in.DisruptedPods, &out.DisruptedPods
+ *out = make(map[string]v1.Time)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/doc.go b/vendor/k8s.io/client-go/pkg/apis/rbac/doc.go
new file mode 100644
index 000000000..c5f057484
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +groupName=rbac.authorization.k8s.io
+package rbac
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/helpers.go b/vendor/k8s.io/client-go/pkg/apis/rbac/helpers.go
new file mode 100644
index 000000000..9895b484b
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/helpers.go
@@ -0,0 +1,396 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package rbac
+
+import (
+ "fmt"
+ "strings"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/util/sets"
+)
+
+func RoleRefGroupKind(roleRef RoleRef) schema.GroupKind {
+ return schema.GroupKind{Group: roleRef.APIGroup, Kind: roleRef.Kind}
+}
+
+func VerbMatches(rule *PolicyRule, requestedVerb string) bool {
+ for _, ruleVerb := range rule.Verbs {
+ if ruleVerb == VerbAll {
+ return true
+ }
+ if ruleVerb == requestedVerb {
+ return true
+ }
+ }
+
+ return false
+}
+
+func APIGroupMatches(rule *PolicyRule, requestedGroup string) bool {
+ for _, ruleGroup := range rule.APIGroups {
+ if ruleGroup == APIGroupAll {
+ return true
+ }
+ if ruleGroup == requestedGroup {
+ return true
+ }
+ }
+
+ return false
+}
+
+func ResourceMatches(rule *PolicyRule, requestedResource string) bool {
+ for _, ruleResource := range rule.Resources {
+ if ruleResource == ResourceAll {
+ return true
+ }
+ if ruleResource == requestedResource {
+ return true
+ }
+ }
+
+ return false
+}
+
+func ResourceNameMatches(rule *PolicyRule, requestedName string) bool {
+ if len(rule.ResourceNames) == 0 {
+ return true
+ }
+
+ for _, ruleName := range rule.ResourceNames {
+ if ruleName == requestedName {
+ return true
+ }
+ }
+
+ return false
+}
+
+func NonResourceURLMatches(rule *PolicyRule, requestedURL string) bool {
+ for _, ruleURL := range rule.NonResourceURLs {
+ if ruleURL == NonResourceAll {
+ return true
+ }
+ if ruleURL == requestedURL {
+ return true
+ }
+ if strings.HasSuffix(ruleURL, "*") && strings.HasPrefix(requestedURL, strings.TrimRight(ruleURL, "*")) {
+ return true
+ }
+ }
+
+ return false
+}
+
+// subjectsStrings returns users, groups, serviceaccounts, unknown for display purposes.
+func SubjectsStrings(subjects []Subject) ([]string, []string, []string, []string) {
+ users := []string{}
+ groups := []string{}
+ sas := []string{}
+ others := []string{}
+
+ for _, subject := range subjects {
+ switch subject.Kind {
+ case ServiceAccountKind:
+ sas = append(sas, fmt.Sprintf("%s/%s", subject.Namespace, subject.Name))
+
+ case UserKind:
+ users = append(users, subject.Name)
+
+ case GroupKind:
+ groups = append(groups, subject.Name)
+
+ default:
+ others = append(others, fmt.Sprintf("%s/%s/%s", subject.Kind, subject.Namespace, subject.Name))
+ }
+ }
+
+ return users, groups, sas, others
+}
+
+func (r PolicyRule) String() string {
+ return "PolicyRule" + r.CompactString()
+}
+
+// CompactString exposes a compact string representation for use in escalation error messages
+func (r PolicyRule) CompactString() string {
+ formatStringParts := []string{}
+ formatArgs := []interface{}{}
+ if len(r.Resources) > 0 {
+ formatStringParts = append(formatStringParts, "Resources:%q")
+ formatArgs = append(formatArgs, r.Resources)
+ }
+ if len(r.NonResourceURLs) > 0 {
+ formatStringParts = append(formatStringParts, "NonResourceURLs:%q")
+ formatArgs = append(formatArgs, r.NonResourceURLs)
+ }
+ if len(r.ResourceNames) > 0 {
+ formatStringParts = append(formatStringParts, "ResourceNames:%q")
+ formatArgs = append(formatArgs, r.ResourceNames)
+ }
+ if len(r.APIGroups) > 0 {
+ formatStringParts = append(formatStringParts, "APIGroups:%q")
+ formatArgs = append(formatArgs, r.APIGroups)
+ }
+ if len(r.Verbs) > 0 {
+ formatStringParts = append(formatStringParts, "Verbs:%q")
+ formatArgs = append(formatArgs, r.Verbs)
+ }
+ formatString := "{" + strings.Join(formatStringParts, ", ") + "}"
+ return fmt.Sprintf(formatString, formatArgs...)
+}
+
+// PolicyRuleBuilder let's us attach methods. A no-no for API types.
+// We use it to construct rules in code. It's more compact than trying to write them
+// out in a literal and allows us to perform some basic checking during construction
+type PolicyRuleBuilder struct {
+ PolicyRule PolicyRule
+}
+
+func NewRule(verbs ...string) *PolicyRuleBuilder {
+ return &PolicyRuleBuilder{
+ PolicyRule: PolicyRule{Verbs: sets.NewString(verbs...).List()},
+ }
+}
+
+func (r *PolicyRuleBuilder) Groups(groups ...string) *PolicyRuleBuilder {
+ r.PolicyRule.APIGroups = combine(r.PolicyRule.APIGroups, groups)
+ return r
+}
+
+func (r *PolicyRuleBuilder) Resources(resources ...string) *PolicyRuleBuilder {
+ r.PolicyRule.Resources = combine(r.PolicyRule.Resources, resources)
+ return r
+}
+
+func (r *PolicyRuleBuilder) Names(names ...string) *PolicyRuleBuilder {
+ r.PolicyRule.ResourceNames = combine(r.PolicyRule.ResourceNames, names)
+ return r
+}
+
+func (r *PolicyRuleBuilder) URLs(urls ...string) *PolicyRuleBuilder {
+ r.PolicyRule.NonResourceURLs = combine(r.PolicyRule.NonResourceURLs, urls)
+ return r
+}
+
+func (r *PolicyRuleBuilder) RuleOrDie() PolicyRule {
+ ret, err := r.Rule()
+ if err != nil {
+ panic(err)
+ }
+ return ret
+}
+
+func combine(s1, s2 []string) []string {
+ s := sets.NewString(s1...)
+ s.Insert(s2...)
+ return s.List()
+}
+
+func (r *PolicyRuleBuilder) Rule() (PolicyRule, error) {
+ if len(r.PolicyRule.Verbs) == 0 {
+ return PolicyRule{}, fmt.Errorf("verbs are required: %#v", r.PolicyRule)
+ }
+
+ switch {
+ case len(r.PolicyRule.NonResourceURLs) > 0:
+ if len(r.PolicyRule.APIGroups) != 0 || len(r.PolicyRule.Resources) != 0 || len(r.PolicyRule.ResourceNames) != 0 {
+ return PolicyRule{}, fmt.Errorf("non-resource rule may not have apiGroups, resources, or resourceNames: %#v", r.PolicyRule)
+ }
+ case len(r.PolicyRule.Resources) > 0:
+ if len(r.PolicyRule.NonResourceURLs) != 0 {
+ return PolicyRule{}, fmt.Errorf("resource rule may not have nonResourceURLs: %#v", r.PolicyRule)
+ }
+ if len(r.PolicyRule.APIGroups) == 0 {
+ // this a common bug
+ return PolicyRule{}, fmt.Errorf("resource rule must have apiGroups: %#v", r.PolicyRule)
+ }
+ // if resource names are set, then the verb must not be list, watch, create, or deletecollection
+ // since verbs are largely opaque, we don't want to accidentally prevent things like "impersonate", so
+ // we will backlist common mistakes, not whitelist acceptable options.
+ if len(r.PolicyRule.ResourceNames) != 0 {
+ illegalVerbs := []string{}
+ for _, verb := range r.PolicyRule.Verbs {
+ switch verb {
+ case "list", "watch", "create", "deletecollection":
+ illegalVerbs = append(illegalVerbs, verb)
+ }
+ }
+ if len(illegalVerbs) > 0 {
+ return PolicyRule{}, fmt.Errorf("verbs %v do not have names available: %#v", illegalVerbs, r.PolicyRule)
+ }
+ }
+
+ default:
+ return PolicyRule{}, fmt.Errorf("a rule must have either nonResourceURLs or resources: %#v", r.PolicyRule)
+ }
+
+ return r.PolicyRule, nil
+}
+
+// ClusterRoleBindingBuilder let's us attach methods. A no-no for API types.
+// We use it to construct bindings in code. It's more compact than trying to write them
+// out in a literal.
+type ClusterRoleBindingBuilder struct {
+ ClusterRoleBinding ClusterRoleBinding
+}
+
+func NewClusterBinding(clusterRoleName string) *ClusterRoleBindingBuilder {
+ return &ClusterRoleBindingBuilder{
+ ClusterRoleBinding: ClusterRoleBinding{
+ ObjectMeta: metav1.ObjectMeta{Name: clusterRoleName},
+ RoleRef: RoleRef{
+ APIGroup: GroupName,
+ Kind: "ClusterRole",
+ Name: clusterRoleName,
+ },
+ },
+ }
+}
+
+func (r *ClusterRoleBindingBuilder) Groups(groups ...string) *ClusterRoleBindingBuilder {
+ for _, group := range groups {
+ r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: GroupKind, APIGroup: GroupName, Name: group})
+ }
+ return r
+}
+
+func (r *ClusterRoleBindingBuilder) Users(users ...string) *ClusterRoleBindingBuilder {
+ for _, user := range users {
+ r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: UserKind, APIGroup: GroupName, Name: user})
+ }
+ return r
+}
+
+func (r *ClusterRoleBindingBuilder) SAs(namespace string, serviceAccountNames ...string) *ClusterRoleBindingBuilder {
+ for _, saName := range serviceAccountNames {
+ r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: ServiceAccountKind, Namespace: namespace, Name: saName})
+ }
+ return r
+}
+
+func (r *ClusterRoleBindingBuilder) BindingOrDie() ClusterRoleBinding {
+ ret, err := r.Binding()
+ if err != nil {
+ panic(err)
+ }
+ return ret
+}
+
+func (r *ClusterRoleBindingBuilder) Binding() (ClusterRoleBinding, error) {
+ if len(r.ClusterRoleBinding.Subjects) == 0 {
+ return ClusterRoleBinding{}, fmt.Errorf("subjects are required: %#v", r.ClusterRoleBinding)
+ }
+
+ return r.ClusterRoleBinding, nil
+}
+
+// RoleBindingBuilder let's us attach methods. It is similar to
+// ClusterRoleBindingBuilder above.
+type RoleBindingBuilder struct {
+ RoleBinding RoleBinding
+}
+
+// NewRoleBinding creates a RoleBinding builder that can be used
+// to define the subjects of a role binding. At least one of
+// the `Groups`, `Users` or `SAs` method must be called before
+// calling the `Binding*` methods.
+func NewRoleBinding(roleName, namespace string) *RoleBindingBuilder {
+ return &RoleBindingBuilder{
+ RoleBinding: RoleBinding{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: roleName,
+ Namespace: namespace,
+ },
+ RoleRef: RoleRef{
+ APIGroup: GroupName,
+ Kind: "Role",
+ Name: roleName,
+ },
+ },
+ }
+}
+
+func NewRoleBindingForClusterRole(roleName, namespace string) *RoleBindingBuilder {
+ return &RoleBindingBuilder{
+ RoleBinding: RoleBinding{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: roleName,
+ Namespace: namespace,
+ },
+ RoleRef: RoleRef{
+ APIGroup: GroupName,
+ Kind: "ClusterRole",
+ Name: roleName,
+ },
+ },
+ }
+}
+
+// Groups adds the specified groups as the subjects of the RoleBinding.
+func (r *RoleBindingBuilder) Groups(groups ...string) *RoleBindingBuilder {
+ for _, group := range groups {
+ r.RoleBinding.Subjects = append(r.RoleBinding.Subjects, Subject{Kind: GroupKind, Name: group})
+ }
+ return r
+}
+
+// Users adds the specified users as the subjects of the RoleBinding.
+func (r *RoleBindingBuilder) Users(users ...string) *RoleBindingBuilder {
+ for _, user := range users {
+ r.RoleBinding.Subjects = append(r.RoleBinding.Subjects, Subject{Kind: UserKind, Name: user})
+ }
+ return r
+}
+
+// SAs adds the specified service accounts as the subjects of the
+// RoleBinding.
+func (r *RoleBindingBuilder) SAs(namespace string, serviceAccountNames ...string) *RoleBindingBuilder {
+ for _, saName := range serviceAccountNames {
+ r.RoleBinding.Subjects = append(r.RoleBinding.Subjects, Subject{Kind: ServiceAccountKind, Namespace: namespace, Name: saName})
+ }
+ return r
+}
+
+// BindingOrDie calls the binding method and panics if there is an error.
+func (r *RoleBindingBuilder) BindingOrDie() RoleBinding {
+ ret, err := r.Binding()
+ if err != nil {
+ panic(err)
+ }
+ return ret
+}
+
+// Binding builds and returns the RoleBinding API object from the builder
+// object.
+func (r *RoleBindingBuilder) Binding() (RoleBinding, error) {
+ if len(r.RoleBinding.Subjects) == 0 {
+ return RoleBinding{}, fmt.Errorf("subjects are required: %#v", r.RoleBinding)
+ }
+
+ return r.RoleBinding, nil
+}
+
+type SortableRuleSlice []PolicyRule
+
+func (s SortableRuleSlice) Len() int { return len(s) }
+func (s SortableRuleSlice) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
+func (s SortableRuleSlice) Less(i, j int) bool {
+ return strings.Compare(s[i].String(), s[j].String()) < 0
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/register.go b/vendor/k8s.io/client-go/pkg/apis/rbac/register.go
new file mode 100644
index 000000000..f4a838bd8
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/register.go
@@ -0,0 +1,58 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package rbac
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+const GroupName = "rbac.authorization.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Role{},
+ &RoleBinding{},
+ &RoleBindingList{},
+ &RoleList{},
+
+ &ClusterRole{},
+ &ClusterRoleBinding{},
+ &ClusterRoleBindingList{},
+ &ClusterRoleList{},
+ )
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/types.go b/vendor/k8s.io/client-go/pkg/apis/rbac/types.go
new file mode 100644
index 000000000..ddc2456a0
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/types.go
@@ -0,0 +1,188 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package rbac
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// Authorization is calculated against
+// 1. evaluation of ClusterRoleBindings - short circuit on match
+// 2. evaluation of RoleBindings in the namespace requested - short circuit on match
+// 3. deny by default
+
+const (
+ APIGroupAll = "*"
+ ResourceAll = "*"
+ VerbAll = "*"
+ NonResourceAll = "*"
+
+ GroupKind = "Group"
+ ServiceAccountKind = "ServiceAccount"
+ UserKind = "User"
+
+ // AutoUpdateAnnotationKey is the name of an annotation which prevents reconciliation if set to "false"
+ AutoUpdateAnnotationKey = "rbac.authorization.kubernetes.io/autoupdate"
+)
+
+// PolicyRule holds information that describes a policy rule, but does not contain information
+// about who the rule applies to or which namespace the rule applies to.
+type PolicyRule struct {
+ // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.
+ Verbs []string
+
+ // APIGroups is the name of the APIGroup that contains the resources.
+ // If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.
+ APIGroups []string
+ // Resources is a list of resources this rule applies to. ResourceAll represents all resources.
+ Resources []string
+ // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
+ ResourceNames []string
+
+ // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path
+ // If an action is not a resource API request, then the URL is split on '/' and is checked against the NonResourceURLs to look for a match.
+ // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.
+ // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.
+ NonResourceURLs []string
+}
+
+// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference,
+// or a value for non-objects such as user and group names.
+type Subject struct {
+ // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
+ // If the Authorizer does not recognized the kind value, the Authorizer should report an error.
+ Kind string
+ // APIGroup holds the API group of the referenced subject.
+ // Defaults to "" for ServiceAccount subjects.
+ // Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
+ APIGroup string
+ // Name of the object being referenced.
+ Name string
+ // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty
+ // the Authorizer should report an error.
+ Namespace string
+}
+
+// RoleRef contains information that points to the role being used
+type RoleRef struct {
+ // APIGroup is the group for the resource being referenced
+ APIGroup string
+ // Kind is the type of resource being referenced
+ Kind string
+ // Name is the name of resource being referenced
+ Name string
+}
+
+// +genclient=true
+
+// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
+type Role struct {
+ metav1.TypeMeta
+ // Standard object's metadata.
+ metav1.ObjectMeta
+
+ // Rules holds all the PolicyRules for this Role
+ Rules []PolicyRule
+}
+
+// +genclient=true
+
+// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace.
+// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given
+// namespace only have effect in that namespace.
+type RoleBinding struct {
+ metav1.TypeMeta
+ metav1.ObjectMeta
+
+ // Subjects holds references to the objects the role applies to.
+ Subjects []Subject
+
+ // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
+ // If the RoleRef cannot be resolved, the Authorizer must return an error.
+ RoleRef RoleRef
+}
+
+// RoleBindingList is a collection of RoleBindings
+type RoleBindingList struct {
+ metav1.TypeMeta
+ // Standard object's metadata.
+ metav1.ListMeta
+
+ // Items is a list of roleBindings
+ Items []RoleBinding
+}
+
+// RoleList is a collection of Roles
+type RoleList struct {
+ metav1.TypeMeta
+ // Standard object's metadata.
+ metav1.ListMeta
+
+ // Items is a list of roles
+ Items []Role
+}
+
+// +genclient=true
+// +nonNamespaced=true
+
+// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
+type ClusterRole struct {
+ metav1.TypeMeta
+ // Standard object's metadata.
+ metav1.ObjectMeta
+
+ // Rules holds all the PolicyRules for this ClusterRole
+ Rules []PolicyRule
+}
+
+// +genclient=true
+// +nonNamespaced=true
+
+// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace,
+// and adds who information via Subject.
+type ClusterRoleBinding struct {
+ metav1.TypeMeta
+ // Standard object's metadata.
+ metav1.ObjectMeta
+
+ // Subjects holds references to the objects the role applies to.
+ Subjects []Subject
+
+ // RoleRef can only reference a ClusterRole in the global namespace.
+ // If the RoleRef cannot be resolved, the Authorizer must return an error.
+ RoleRef RoleRef
+}
+
+// ClusterRoleBindingList is a collection of ClusterRoleBindings
+type ClusterRoleBindingList struct {
+ metav1.TypeMeta
+ // Standard object's metadata.
+ metav1.ListMeta
+
+ // Items is a list of ClusterRoleBindings
+ Items []ClusterRoleBinding
+}
+
+// ClusterRoleList is a collection of ClusterRoles
+type ClusterRoleList struct {
+ metav1.TypeMeta
+ // Standard object's metadata.
+ metav1.ListMeta
+
+ // Items is a list of ClusterRoles
+ Items []ClusterRole
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/conversion.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/conversion.go
new file mode 100644
index 000000000..22b3c4076
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/conversion.go
@@ -0,0 +1,81 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ "k8s.io/apimachinery/pkg/conversion"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ api "k8s.io/client-go/pkg/apis/rbac"
+)
+
+// allAuthenticated matches k8s.io/apiserver/pkg/authentication/user.AllAuthenticated,
+// but we don't want an client library (which must include types), depending on a server library
+const allAuthenticated = "system:authenticated"
+
+func Convert_v1alpha1_Subject_To_rbac_Subject(in *Subject, out *api.Subject, s conversion.Scope) error {
+ if err := autoConvert_v1alpha1_Subject_To_rbac_Subject(in, out, s); err != nil {
+ return err
+ }
+
+ // specifically set the APIGroup for the three subjects recognized in v1alpha1
+ switch {
+ case in.Kind == ServiceAccountKind:
+ out.APIGroup = ""
+ case in.Kind == UserKind:
+ out.APIGroup = GroupName
+ case in.Kind == GroupKind:
+ out.APIGroup = GroupName
+ default:
+ // For unrecognized kinds, use the group portion of the APIVersion if we can get it
+ if gv, err := schema.ParseGroupVersion(in.APIVersion); err == nil {
+ out.APIGroup = gv.Group
+ }
+ }
+
+ // User * in v1alpha1 will only match all authenticated users
+ // This is only for compatibility with old RBAC bindings
+ // Special treatment for * should not be included in v1beta1
+ if out.Kind == UserKind && out.APIGroup == GroupName && out.Name == "*" {
+ out.Kind = GroupKind
+ out.Name = allAuthenticated
+ }
+
+ return nil
+}
+
+func Convert_rbac_Subject_To_v1alpha1_Subject(in *api.Subject, out *Subject, s conversion.Scope) error {
+ if err := autoConvert_rbac_Subject_To_v1alpha1_Subject(in, out, s); err != nil {
+ return err
+ }
+
+ switch {
+ case in.Kind == ServiceAccountKind && in.APIGroup == "":
+ // Make service accounts v1
+ out.APIVersion = "v1"
+ case in.Kind == UserKind && in.APIGroup == GroupName:
+ // users in the rbac API group get v1alpha
+ out.APIVersion = SchemeGroupVersion.String()
+ case in.Kind == GroupKind && in.APIGroup == GroupName:
+ // groups in the rbac API group get v1alpha
+ out.APIVersion = SchemeGroupVersion.String()
+ default:
+ // otherwise, they get an unspecified version of a group
+ out.APIVersion = schema.GroupVersion{Group: in.APIGroup}.String()
+ }
+
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/defaults.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/defaults.go
new file mode 100644
index 000000000..daa86a0e1
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/defaults.go
@@ -0,0 +1,48 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
+
+func SetDefaults_ClusterRoleBinding(obj *ClusterRoleBinding) {
+ if len(obj.RoleRef.APIGroup) == 0 {
+ obj.RoleRef.APIGroup = GroupName
+ }
+}
+func SetDefaults_RoleBinding(obj *RoleBinding) {
+ if len(obj.RoleRef.APIGroup) == 0 {
+ obj.RoleRef.APIGroup = GroupName
+ }
+}
+func SetDefaults_Subject(obj *Subject) {
+ if len(obj.APIVersion) == 0 {
+ switch obj.Kind {
+ case ServiceAccountKind:
+ obj.APIVersion = "v1"
+ case UserKind:
+ obj.APIVersion = SchemeGroupVersion.String()
+ case GroupKind:
+ obj.APIVersion = SchemeGroupVersion.String()
+ }
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/doc.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/doc.go
new file mode 100644
index 000000000..f43f7bc08
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +groupName=rbac.authorization.k8s.io
+package v1alpha1
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/generated.pb.go
new file mode 100644
index 000000000..3977142e4
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/generated.pb.go
@@ -0,0 +1,2822 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1alpha1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.proto
+
+ It has these top-level messages:
+ ClusterRole
+ ClusterRoleBinding
+ ClusterRoleBindingBuilder
+ ClusterRoleBindingList
+ ClusterRoleList
+ PolicyRule
+ PolicyRuleBuilder
+ Role
+ RoleBinding
+ RoleBindingList
+ RoleList
+ RoleRef
+ Subject
+*/
+package v1alpha1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *ClusterRole) Reset() { *m = ClusterRole{} }
+func (*ClusterRole) ProtoMessage() {}
+func (*ClusterRole) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} }
+func (*ClusterRoleBinding) ProtoMessage() {}
+func (*ClusterRoleBinding) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *ClusterRoleBindingBuilder) Reset() { *m = ClusterRoleBindingBuilder{} }
+func (*ClusterRoleBindingBuilder) ProtoMessage() {}
+func (*ClusterRoleBindingBuilder) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{2}
+}
+
+func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} }
+func (*ClusterRoleBindingList) ProtoMessage() {}
+func (*ClusterRoleBindingList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
+
+func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} }
+func (*ClusterRoleList) ProtoMessage() {}
+func (*ClusterRoleList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
+
+func (m *PolicyRule) Reset() { *m = PolicyRule{} }
+func (*PolicyRule) ProtoMessage() {}
+func (*PolicyRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
+
+func (m *PolicyRuleBuilder) Reset() { *m = PolicyRuleBuilder{} }
+func (*PolicyRuleBuilder) ProtoMessage() {}
+func (*PolicyRuleBuilder) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
+
+func (m *Role) Reset() { *m = Role{} }
+func (*Role) ProtoMessage() {}
+func (*Role) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
+
+func (m *RoleBinding) Reset() { *m = RoleBinding{} }
+func (*RoleBinding) ProtoMessage() {}
+func (*RoleBinding) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
+
+func (m *RoleBindingList) Reset() { *m = RoleBindingList{} }
+func (*RoleBindingList) ProtoMessage() {}
+func (*RoleBindingList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
+
+func (m *RoleList) Reset() { *m = RoleList{} }
+func (*RoleList) ProtoMessage() {}
+func (*RoleList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
+
+func (m *RoleRef) Reset() { *m = RoleRef{} }
+func (*RoleRef) ProtoMessage() {}
+func (*RoleRef) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} }
+
+func (m *Subject) Reset() { *m = Subject{} }
+func (*Subject) ProtoMessage() {}
+func (*Subject) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} }
+
+func init() {
+ proto.RegisterType((*ClusterRole)(nil), "k8s.io.client-go.pkg.apis.rbac.v1alpha1.ClusterRole")
+ proto.RegisterType((*ClusterRoleBinding)(nil), "k8s.io.client-go.pkg.apis.rbac.v1alpha1.ClusterRoleBinding")
+ proto.RegisterType((*ClusterRoleBindingBuilder)(nil), "k8s.io.client-go.pkg.apis.rbac.v1alpha1.ClusterRoleBindingBuilder")
+ proto.RegisterType((*ClusterRoleBindingList)(nil), "k8s.io.client-go.pkg.apis.rbac.v1alpha1.ClusterRoleBindingList")
+ proto.RegisterType((*ClusterRoleList)(nil), "k8s.io.client-go.pkg.apis.rbac.v1alpha1.ClusterRoleList")
+ proto.RegisterType((*PolicyRule)(nil), "k8s.io.client-go.pkg.apis.rbac.v1alpha1.PolicyRule")
+ proto.RegisterType((*PolicyRuleBuilder)(nil), "k8s.io.client-go.pkg.apis.rbac.v1alpha1.PolicyRuleBuilder")
+ proto.RegisterType((*Role)(nil), "k8s.io.client-go.pkg.apis.rbac.v1alpha1.Role")
+ proto.RegisterType((*RoleBinding)(nil), "k8s.io.client-go.pkg.apis.rbac.v1alpha1.RoleBinding")
+ proto.RegisterType((*RoleBindingList)(nil), "k8s.io.client-go.pkg.apis.rbac.v1alpha1.RoleBindingList")
+ proto.RegisterType((*RoleList)(nil), "k8s.io.client-go.pkg.apis.rbac.v1alpha1.RoleList")
+ proto.RegisterType((*RoleRef)(nil), "k8s.io.client-go.pkg.apis.rbac.v1alpha1.RoleRef")
+ proto.RegisterType((*Subject)(nil), "k8s.io.client-go.pkg.apis.rbac.v1alpha1.Subject")
+}
+func (m *ClusterRole) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ClusterRole) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ if len(m.Rules) > 0 {
+ for _, msg := range m.Rules {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ClusterRoleBinding) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ClusterRoleBinding) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n2, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ if len(m.Subjects) > 0 {
+ for _, msg := range m.Subjects {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RoleRef.Size()))
+ n3, err := m.RoleRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ return i, nil
+}
+
+func (m *ClusterRoleBindingBuilder) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ClusterRoleBindingBuilder) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ClusterRoleBinding.Size()))
+ n4, err := m.ClusterRoleBinding.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ return i, nil
+}
+
+func (m *ClusterRoleBindingList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ClusterRoleBindingList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n5, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ClusterRoleList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ClusterRoleList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n6, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PolicyRule) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PolicyRule) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Verbs) > 0 {
+ for _, s := range m.Verbs {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.APIGroups) > 0 {
+ for _, s := range m.APIGroups {
+ dAtA[i] = 0x1a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Resources) > 0 {
+ for _, s := range m.Resources {
+ dAtA[i] = 0x22
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.ResourceNames) > 0 {
+ for _, s := range m.ResourceNames {
+ dAtA[i] = 0x2a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.NonResourceURLs) > 0 {
+ for _, s := range m.NonResourceURLs {
+ dAtA[i] = 0x32
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *PolicyRuleBuilder) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PolicyRuleBuilder) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PolicyRule.Size()))
+ n7, err := m.PolicyRule.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ return i, nil
+}
+
+func (m *Role) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Role) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n8, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n8
+ if len(m.Rules) > 0 {
+ for _, msg := range m.Rules {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *RoleBinding) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RoleBinding) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n9, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n9
+ if len(m.Subjects) > 0 {
+ for _, msg := range m.Subjects {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RoleRef.Size()))
+ n10, err := m.RoleRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n10
+ return i, nil
+}
+
+func (m *RoleBindingList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RoleBindingList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n11, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n11
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *RoleList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RoleList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n12, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n12
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *RoleRef) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RoleRef) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup)))
+ i += copy(dAtA[i:], m.APIGroup)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
+ i += copy(dAtA[i:], m.Kind)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ return i, nil
+}
+
+func (m *Subject) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Subject) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
+ i += copy(dAtA[i:], m.Kind)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion)))
+ i += copy(dAtA[i:], m.APIVersion)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
+ i += copy(dAtA[i:], m.Namespace)
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *ClusterRole) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Rules) > 0 {
+ for _, e := range m.Rules {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ClusterRoleBinding) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Subjects) > 0 {
+ for _, e := range m.Subjects {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = m.RoleRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ClusterRoleBindingBuilder) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ClusterRoleBinding.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ClusterRoleBindingList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ClusterRoleList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PolicyRule) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Verbs) > 0 {
+ for _, s := range m.Verbs {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.APIGroups) > 0 {
+ for _, s := range m.APIGroups {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Resources) > 0 {
+ for _, s := range m.Resources {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.ResourceNames) > 0 {
+ for _, s := range m.ResourceNames {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.NonResourceURLs) > 0 {
+ for _, s := range m.NonResourceURLs {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PolicyRuleBuilder) Size() (n int) {
+ var l int
+ _ = l
+ l = m.PolicyRule.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Role) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Rules) > 0 {
+ for _, e := range m.Rules {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *RoleBinding) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Subjects) > 0 {
+ for _, e := range m.Subjects {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = m.RoleRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *RoleBindingList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *RoleList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *RoleRef) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.APIGroup)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Kind)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Subject) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Kind)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.APIVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Namespace)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *ClusterRole) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ClusterRole{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ClusterRoleBinding) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ClusterRoleBinding{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Subjects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subjects), "Subject", "Subject", 1), `&`, ``, 1) + `,`,
+ `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ClusterRoleBindingBuilder) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ClusterRoleBindingBuilder{`,
+ `ClusterRoleBinding:` + strings.Replace(strings.Replace(this.ClusterRoleBinding.String(), "ClusterRoleBinding", "ClusterRoleBinding", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ClusterRoleBindingList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ClusterRoleBindingList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ClusterRoleBinding", "ClusterRoleBinding", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ClusterRoleList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ClusterRoleList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ClusterRole", "ClusterRole", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PolicyRule) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PolicyRule{`,
+ `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`,
+ `APIGroups:` + fmt.Sprintf("%v", this.APIGroups) + `,`,
+ `Resources:` + fmt.Sprintf("%v", this.Resources) + `,`,
+ `ResourceNames:` + fmt.Sprintf("%v", this.ResourceNames) + `,`,
+ `NonResourceURLs:` + fmt.Sprintf("%v", this.NonResourceURLs) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PolicyRuleBuilder) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PolicyRuleBuilder{`,
+ `PolicyRule:` + strings.Replace(strings.Replace(this.PolicyRule.String(), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Role) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Role{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RoleBinding) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RoleBinding{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Subjects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subjects), "Subject", "Subject", 1), `&`, ``, 1) + `,`,
+ `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RoleBindingList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RoleBindingList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "RoleBinding", "RoleBinding", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RoleList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RoleList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Role", "Role", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RoleRef) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RoleRef{`,
+ `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`,
+ `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Subject) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Subject{`,
+ `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
+ `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *ClusterRole) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ClusterRole: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ClusterRole: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Rules = append(m.Rules, PolicyRule{})
+ if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ClusterRoleBinding) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ClusterRoleBinding: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ClusterRoleBinding: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Subjects = append(m.Subjects, Subject{})
+ if err := m.Subjects[len(m.Subjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.RoleRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ClusterRoleBindingBuilder) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ClusterRoleBindingBuilder: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ClusterRoleBindingBuilder: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ClusterRoleBinding", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ClusterRoleBinding.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ClusterRoleBindingList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ClusterRoleBindingList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ClusterRoleBindingList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ClusterRoleBinding{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ClusterRoleList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ClusterRoleList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ClusterRoleList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ClusterRole{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PolicyRule) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PolicyRule: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PolicyRule: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Verbs = append(m.Verbs, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIGroups", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIGroups = append(m.APIGroups, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Resources = append(m.Resources, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceNames", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ResourceNames = append(m.ResourceNames, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NonResourceURLs", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.NonResourceURLs = append(m.NonResourceURLs, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PolicyRuleBuilder) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PolicyRuleBuilder: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PolicyRuleBuilder: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PolicyRule", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.PolicyRule.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Role) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Role: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Role: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Rules = append(m.Rules, PolicyRule{})
+ if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RoleBinding) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RoleBinding: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RoleBinding: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Subjects = append(m.Subjects, Subject{})
+ if err := m.Subjects[len(m.Subjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.RoleRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RoleBindingList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RoleBindingList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RoleBindingList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, RoleBinding{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RoleList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RoleList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RoleList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, Role{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RoleRef) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RoleRef: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RoleRef: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIGroup", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIGroup = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Kind = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Subject) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Subject: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Subject: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Kind = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Namespace = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/client-go/pkg/apis/rbac/v1alpha1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 829 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x54, 0xcf, 0x6b, 0x24, 0x45,
+ 0x14, 0x9e, 0x4a, 0x66, 0xcc, 0xcc, 0x8b, 0x21, 0xa6, 0x04, 0x69, 0x73, 0xe8, 0x09, 0x7d, 0x0a,
+ 0xa8, 0xd5, 0x26, 0xae, 0xba, 0x07, 0x3d, 0x6c, 0x7b, 0x90, 0xe0, 0x1a, 0x43, 0x2d, 0x2e, 0xb8,
+ 0x2c, 0x68, 0x4d, 0x4f, 0xed, 0x4c, 0x39, 0xfd, 0x8b, 0xaa, 0xee, 0xc0, 0x22, 0x82, 0x47, 0x8f,
+ 0xfe, 0x15, 0x1e, 0x3d, 0x08, 0x1e, 0x3d, 0x79, 0x09, 0x7a, 0xd9, 0xe3, 0x7a, 0x19, 0x4c, 0xfb,
+ 0x87, 0x28, 0x5d, 0x5d, 0xfd, 0x23, 0x99, 0x09, 0xf9, 0x21, 0x04, 0x84, 0x3d, 0xcd, 0xf4, 0x7b,
+ 0xdf, 0xf7, 0xd5, 0xfb, 0xea, 0x75, 0x7f, 0x70, 0x77, 0x76, 0x57, 0x11, 0x11, 0xbb, 0xb3, 0x6c,
+ 0xc4, 0x65, 0xc4, 0x53, 0xae, 0xdc, 0x64, 0x36, 0x71, 0x59, 0x22, 0x94, 0x2b, 0x47, 0xcc, 0x77,
+ 0x8f, 0xf7, 0x58, 0x90, 0x4c, 0xd9, 0x9e, 0x3b, 0xe1, 0x11, 0x97, 0x2c, 0xe5, 0x63, 0x92, 0xc8,
+ 0x38, 0x8d, 0xf1, 0x6e, 0xc9, 0x24, 0x0d, 0x93, 0x24, 0xb3, 0x09, 0x29, 0x98, 0xa4, 0x60, 0x92,
+ 0x8a, 0xb9, 0xfd, 0xd6, 0x44, 0xa4, 0xd3, 0x6c, 0x44, 0xfc, 0x38, 0x74, 0x27, 0xf1, 0x24, 0x76,
+ 0xb5, 0xc0, 0x28, 0x7b, 0xa2, 0x9f, 0xf4, 0x83, 0xfe, 0x57, 0x0a, 0x6f, 0xdf, 0x31, 0x23, 0xb1,
+ 0x44, 0x84, 0xcc, 0x9f, 0x8a, 0x88, 0xcb, 0xa7, 0xcd, 0x50, 0x21, 0x4f, 0x99, 0x7b, 0xbc, 0x30,
+ 0xce, 0xb6, 0x7b, 0x11, 0x4b, 0x66, 0x51, 0x2a, 0x42, 0xbe, 0x40, 0x78, 0xef, 0x32, 0x82, 0xf2,
+ 0xa7, 0x3c, 0x64, 0x0b, 0xbc, 0x77, 0x2e, 0xe2, 0x65, 0xa9, 0x08, 0x5c, 0x11, 0xa5, 0x2a, 0x95,
+ 0xe7, 0x49, 0xce, 0xef, 0x08, 0xd6, 0x3f, 0x0a, 0x32, 0x95, 0x72, 0x49, 0xe3, 0x80, 0xe3, 0xaf,
+ 0xa0, 0x5f, 0x18, 0x19, 0xb3, 0x94, 0x59, 0x68, 0x07, 0xed, 0xae, 0xef, 0xbf, 0x4d, 0xcc, 0x7d,
+ 0xb6, 0x75, 0x9b, 0x1b, 0x2d, 0xd0, 0xe4, 0x78, 0x8f, 0x7c, 0x36, 0xfa, 0x9a, 0xfb, 0xe9, 0xa7,
+ 0x3c, 0x65, 0x1e, 0x3e, 0x99, 0x0f, 0x3b, 0xf9, 0x7c, 0x08, 0x4d, 0x8d, 0xd6, 0xaa, 0xf8, 0x0b,
+ 0xe8, 0xc9, 0x2c, 0xe0, 0xca, 0x5a, 0xd9, 0x59, 0xdd, 0x5d, 0xdf, 0xbf, 0x43, 0xae, 0xba, 0x2e,
+ 0x72, 0x14, 0x07, 0xc2, 0x7f, 0x4a, 0xb3, 0x80, 0x7b, 0x1b, 0xe6, 0x88, 0x5e, 0xf1, 0xa4, 0x68,
+ 0xa9, 0xe8, 0xfc, 0xb2, 0x02, 0xb8, 0x65, 0xc6, 0x13, 0xd1, 0x58, 0x44, 0x93, 0x5b, 0xf0, 0xf4,
+ 0x25, 0xf4, 0x55, 0xa6, 0x1b, 0x95, 0xad, 0xbd, 0xab, 0xdb, 0x7a, 0x50, 0x32, 0xbd, 0x57, 0xcc,
+ 0x11, 0x7d, 0x53, 0x50, 0xb4, 0x16, 0xc5, 0x8f, 0x61, 0x4d, 0xc6, 0x01, 0xa7, 0xfc, 0x89, 0xb5,
+ 0xaa, 0x1d, 0x5c, 0x43, 0x9f, 0x96, 0x44, 0x6f, 0xd3, 0xe8, 0xaf, 0x99, 0x02, 0xad, 0x24, 0x9d,
+ 0x1f, 0x11, 0xbc, 0xbe, 0x78, 0x6f, 0x5e, 0x26, 0x82, 0x31, 0x97, 0xf8, 0x7b, 0x04, 0xd8, 0x5f,
+ 0xe8, 0x9a, 0x9b, 0xfc, 0xe0, 0xea, 0x73, 0x2c, 0x39, 0x61, 0xdb, 0x8c, 0xb4, 0x64, 0x6b, 0x74,
+ 0xc9, 0x99, 0xce, 0x9f, 0x08, 0x5e, 0x5b, 0x84, 0xde, 0x17, 0x2a, 0xc5, 0x8f, 0x17, 0x96, 0x4c,
+ 0xae, 0xb6, 0xe4, 0x82, 0xad, 0x57, 0x5c, 0xdf, 0x7f, 0x55, 0x69, 0x2d, 0x98, 0x41, 0x4f, 0xa4,
+ 0x3c, 0xac, 0xb6, 0xfb, 0xdf, 0x5c, 0xd7, 0x2f, 0xef, 0x41, 0x21, 0x49, 0x4b, 0x65, 0xe7, 0x0f,
+ 0x04, 0x9b, 0x2d, 0xf0, 0x2d, 0x98, 0x7a, 0x74, 0xd6, 0xd4, 0xbb, 0x37, 0x33, 0xb5, 0xdc, 0xcd,
+ 0x3f, 0x08, 0xa0, 0xf9, 0x5e, 0xf1, 0x10, 0x7a, 0xc7, 0x5c, 0x8e, 0x94, 0x85, 0x76, 0x56, 0x77,
+ 0x07, 0xde, 0xa0, 0xc0, 0x3f, 0x2c, 0x0a, 0xb4, 0xac, 0xe3, 0x37, 0x60, 0xc0, 0x12, 0xf1, 0xb1,
+ 0x8c, 0xb3, 0x44, 0x59, 0xab, 0x1a, 0xb4, 0x91, 0xcf, 0x87, 0x83, 0x7b, 0x47, 0x07, 0x65, 0x91,
+ 0x36, 0xfd, 0x02, 0x2c, 0xb9, 0x8a, 0x33, 0xe9, 0x73, 0x65, 0x75, 0x1b, 0x30, 0xad, 0x8a, 0xb4,
+ 0xe9, 0xe3, 0xf7, 0x61, 0xa3, 0x7a, 0x38, 0x64, 0x21, 0x57, 0x56, 0x4f, 0x13, 0xb6, 0xf2, 0xf9,
+ 0x70, 0x83, 0xb6, 0x1b, 0xf4, 0x2c, 0x0e, 0x7f, 0x08, 0x9b, 0x51, 0x1c, 0x55, 0x90, 0xcf, 0xe9,
+ 0x7d, 0x65, 0xbd, 0xa4, 0xa9, 0xaf, 0xe6, 0xf3, 0xe1, 0xe6, 0xe1, 0xd9, 0x16, 0x3d, 0x8f, 0x75,
+ 0xbe, 0x85, 0xad, 0x56, 0x60, 0x99, 0x6f, 0x69, 0x0a, 0x90, 0xd4, 0x45, 0xb3, 0xd2, 0x9b, 0x25,
+ 0x60, 0x1d, 0x48, 0x4d, 0x8d, 0xb6, 0xb4, 0x9d, 0xdf, 0x10, 0x74, 0xff, 0xff, 0x89, 0xfe, 0xd3,
+ 0x0a, 0xac, 0xbf, 0x88, 0xf2, 0x6b, 0x44, 0x79, 0x91, 0x22, 0xb7, 0x1b, 0x8d, 0x37, 0x4f, 0x91,
+ 0xcb, 0x33, 0xf1, 0x57, 0x04, 0xfd, 0x5b, 0x0a, 0xc3, 0x07, 0x67, 0x6d, 0x90, 0x6b, 0xda, 0x58,
+ 0x3e, 0xff, 0x37, 0x50, 0x6d, 0x08, 0xbf, 0x09, 0xfd, 0x2a, 0xc0, 0xf4, 0xf4, 0x83, 0x66, 0x9a,
+ 0x2a, 0xe3, 0x68, 0x8d, 0xc0, 0x3b, 0xd0, 0x9d, 0x89, 0x68, 0x6c, 0xad, 0x68, 0xe4, 0xcb, 0x06,
+ 0xd9, 0xfd, 0x44, 0x44, 0x63, 0xaa, 0x3b, 0x05, 0x22, 0x62, 0x21, 0xd7, 0xef, 0x50, 0x0b, 0x51,
+ 0x44, 0x17, 0xd5, 0x1d, 0xe7, 0x67, 0x04, 0x6b, 0xe6, 0xfd, 0xab, 0xf5, 0xd0, 0x85, 0x7a, 0xfb,
+ 0x00, 0x2c, 0x11, 0x0f, 0xb9, 0x54, 0x22, 0x8e, 0xcc, 0xb9, 0xf5, 0x97, 0x72, 0xef, 0xe8, 0xc0,
+ 0x74, 0x68, 0x0b, 0x75, 0xf9, 0x0c, 0xd8, 0x85, 0x41, 0xf1, 0xab, 0x12, 0xe6, 0x73, 0xab, 0xab,
+ 0x61, 0x5b, 0x06, 0x36, 0x38, 0xac, 0x1a, 0xb4, 0xc1, 0x78, 0xe4, 0xe4, 0xd4, 0xee, 0x3c, 0x3b,
+ 0xb5, 0x3b, 0xcf, 0x4f, 0xed, 0xce, 0x77, 0xb9, 0x8d, 0x4e, 0x72, 0x1b, 0x3d, 0xcb, 0x6d, 0xf4,
+ 0x3c, 0xb7, 0xd1, 0x5f, 0xb9, 0x8d, 0x7e, 0xf8, 0xdb, 0xee, 0x3c, 0xea, 0x57, 0x97, 0xff, 0x6f,
+ 0x00, 0x00, 0x00, 0xff, 0xff, 0x20, 0x76, 0x05, 0x2e, 0x27, 0x0c, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/generated.proto
new file mode 100644
index 000000000..ba462c669
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/generated.proto
@@ -0,0 +1,200 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.client_go.pkg.apis.rbac.v1alpha1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1alpha1";
+
+// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
+message ClusterRole {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Rules holds all the PolicyRules for this ClusterRole
+ repeated PolicyRule rules = 2;
+}
+
+// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace,
+// and adds who information via Subject.
+message ClusterRoleBinding {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Subjects holds references to the objects the role applies to.
+ repeated Subject subjects = 2;
+
+ // RoleRef can only reference a ClusterRole in the global namespace.
+ // If the RoleRef cannot be resolved, the Authorizer must return an error.
+ optional RoleRef roleRef = 3;
+}
+
+// +k8s:deepcopy-gen=false
+// ClusterRoleBindingBuilder let's us attach methods. A no-no for API types.
+// We use it to construct bindings in code. It's more compact than trying to write them
+// out in a literal.
+message ClusterRoleBindingBuilder {
+ optional ClusterRoleBinding clusterRoleBinding = 1;
+}
+
+// ClusterRoleBindingList is a collection of ClusterRoleBindings
+message ClusterRoleBindingList {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of ClusterRoleBindings
+ repeated ClusterRoleBinding items = 2;
+}
+
+// ClusterRoleList is a collection of ClusterRoles
+message ClusterRoleList {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of ClusterRoles
+ repeated ClusterRole items = 2;
+}
+
+// PolicyRule holds information that describes a policy rule, but does not contain information
+// about who the rule applies to or which namespace the rule applies to.
+message PolicyRule {
+ // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.
+ repeated string verbs = 1;
+
+ // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of
+ // the enumerated resources in any API group will be allowed.
+ // +optional
+ repeated string apiGroups = 3;
+
+ // Resources is a list of resources this rule applies to. ResourceAll represents all resources.
+ // +optional
+ repeated string resources = 4;
+
+ // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
+ // +optional
+ repeated string resourceNames = 5;
+
+ // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path
+ // This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different.
+ // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.
+ // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.
+ // +optional
+ repeated string nonResourceURLs = 6;
+}
+
+// +k8s:deepcopy-gen=false
+// PolicyRuleBuilder let's us attach methods. A no-no for API types.
+// We use it to construct rules in code. It's more compact than trying to write them
+// out in a literal and allows us to perform some basic checking during construction
+message PolicyRuleBuilder {
+ optional PolicyRule policyRule = 1;
+}
+
+// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
+message Role {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Rules holds all the PolicyRules for this Role
+ repeated PolicyRule rules = 2;
+}
+
+// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace.
+// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given
+// namespace only have effect in that namespace.
+message RoleBinding {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Subjects holds references to the objects the role applies to.
+ repeated Subject subjects = 2;
+
+ // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
+ // If the RoleRef cannot be resolved, the Authorizer must return an error.
+ optional RoleRef roleRef = 3;
+}
+
+// RoleBindingList is a collection of RoleBindings
+message RoleBindingList {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of RoleBindings
+ repeated RoleBinding items = 2;
+}
+
+// RoleList is a collection of Roles
+message RoleList {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of Roles
+ repeated Role items = 2;
+}
+
+// RoleRef contains information that points to the role being used
+message RoleRef {
+ // APIGroup is the group for the resource being referenced
+ optional string apiGroup = 1;
+
+ // Kind is the type of resource being referenced
+ optional string kind = 2;
+
+ // Name is the name of resource being referenced
+ optional string name = 3;
+}
+
+// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference,
+// or a value for non-objects such as user and group names.
+message Subject {
+ // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
+ // If the Authorizer does not recognized the kind value, the Authorizer should report an error.
+ optional string kind = 1;
+
+ // APIVersion holds the API group and version of the referenced subject.
+ // Defaults to "v1" for ServiceAccount subjects.
+ // Defaults to "rbac.authorization.k8s.io/v1alpha1" for User and Group subjects.
+ // +k8s:conversion-gen=false
+ // +optional
+ optional string apiVersion = 2;
+
+ // Name of the object being referenced.
+ optional string name = 3;
+
+ // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty
+ // the Authorizer should report an error.
+ // +optional
+ optional string namespace = 4;
+}
+
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/helpers.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/helpers.go
new file mode 100644
index 000000000..f417f3be0
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/helpers.go
@@ -0,0 +1,146 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ "fmt"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// PolicyRuleBuilder let's us attach methods. A no-no for API types.
+// We use it to construct rules in code. It's more compact than trying to write them
+// out in a literal and allows us to perform some basic checking during construction
+type PolicyRuleBuilder struct {
+ PolicyRule PolicyRule `protobuf:"bytes,1,opt,name=policyRule"`
+}
+
+func NewRule(verbs ...string) *PolicyRuleBuilder {
+ return &PolicyRuleBuilder{
+ PolicyRule: PolicyRule{Verbs: verbs},
+ }
+}
+
+func (r *PolicyRuleBuilder) Groups(groups ...string) *PolicyRuleBuilder {
+ r.PolicyRule.APIGroups = append(r.PolicyRule.APIGroups, groups...)
+ return r
+}
+
+func (r *PolicyRuleBuilder) Resources(resources ...string) *PolicyRuleBuilder {
+ r.PolicyRule.Resources = append(r.PolicyRule.Resources, resources...)
+ return r
+}
+
+func (r *PolicyRuleBuilder) Names(names ...string) *PolicyRuleBuilder {
+ r.PolicyRule.ResourceNames = append(r.PolicyRule.ResourceNames, names...)
+ return r
+}
+
+func (r *PolicyRuleBuilder) URLs(urls ...string) *PolicyRuleBuilder {
+ r.PolicyRule.NonResourceURLs = append(r.PolicyRule.NonResourceURLs, urls...)
+ return r
+}
+
+func (r *PolicyRuleBuilder) RuleOrDie() PolicyRule {
+ ret, err := r.Rule()
+ if err != nil {
+ panic(err)
+ }
+ return ret
+}
+
+func (r *PolicyRuleBuilder) Rule() (PolicyRule, error) {
+ if len(r.PolicyRule.Verbs) == 0 {
+ return PolicyRule{}, fmt.Errorf("verbs are required: %#v", r.PolicyRule)
+ }
+
+ switch {
+ case len(r.PolicyRule.NonResourceURLs) > 0:
+ if len(r.PolicyRule.APIGroups) != 0 || len(r.PolicyRule.Resources) != 0 || len(r.PolicyRule.ResourceNames) != 0 {
+ return PolicyRule{}, fmt.Errorf("non-resource rule may not have apiGroups, resources, or resourceNames: %#v", r.PolicyRule)
+ }
+ case len(r.PolicyRule.Resources) > 0:
+ if len(r.PolicyRule.NonResourceURLs) != 0 {
+ return PolicyRule{}, fmt.Errorf("resource rule may not have nonResourceURLs: %#v", r.PolicyRule)
+ }
+ if len(r.PolicyRule.APIGroups) == 0 {
+ // this a common bug
+ return PolicyRule{}, fmt.Errorf("resource rule must have apiGroups: %#v", r.PolicyRule)
+ }
+ default:
+ return PolicyRule{}, fmt.Errorf("a rule must have either nonResourceURLs or resources: %#v", r.PolicyRule)
+ }
+
+ return r.PolicyRule, nil
+}
+
+// ClusterRoleBindingBuilder let's us attach methods. A no-no for API types.
+// We use it to construct bindings in code. It's more compact than trying to write them
+// out in a literal.
+type ClusterRoleBindingBuilder struct {
+ ClusterRoleBinding ClusterRoleBinding `protobuf:"bytes,1,opt,name=clusterRoleBinding"`
+}
+
+func NewClusterBinding(clusterRoleName string) *ClusterRoleBindingBuilder {
+ return &ClusterRoleBindingBuilder{
+ ClusterRoleBinding: ClusterRoleBinding{
+ ObjectMeta: metav1.ObjectMeta{Name: clusterRoleName},
+ RoleRef: RoleRef{
+ APIGroup: GroupName,
+ Kind: "ClusterRole",
+ Name: clusterRoleName,
+ },
+ },
+ }
+}
+
+func (r *ClusterRoleBindingBuilder) Groups(groups ...string) *ClusterRoleBindingBuilder {
+ for _, group := range groups {
+ r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: GroupKind, Name: group})
+ }
+ return r
+}
+
+func (r *ClusterRoleBindingBuilder) Users(users ...string) *ClusterRoleBindingBuilder {
+ for _, user := range users {
+ r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: UserKind, Name: user})
+ }
+ return r
+}
+
+func (r *ClusterRoleBindingBuilder) SAs(namespace string, serviceAccountNames ...string) *ClusterRoleBindingBuilder {
+ for _, saName := range serviceAccountNames {
+ r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: ServiceAccountKind, Namespace: namespace, Name: saName})
+ }
+ return r
+}
+
+func (r *ClusterRoleBindingBuilder) BindingOrDie() ClusterRoleBinding {
+ ret, err := r.Binding()
+ if err != nil {
+ panic(err)
+ }
+ return ret
+}
+
+func (r *ClusterRoleBindingBuilder) Binding() (ClusterRoleBinding, error) {
+ if len(r.ClusterRoleBinding.Subjects) == 0 {
+ return ClusterRoleBinding{}, fmt.Errorf("subjects are required: %#v", r.ClusterRoleBinding)
+ }
+
+ return r.ClusterRoleBinding, nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/register.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/register.go
new file mode 100644
index 000000000..956c800da
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/register.go
@@ -0,0 +1,65 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+const GroupName = "rbac.authorization.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Role{},
+ &RoleBinding{},
+ &RoleBindingList{},
+ &RoleList{},
+
+ &ClusterRole{},
+ &ClusterRoleBinding{},
+ &ClusterRoleBindingList{},
+ &ClusterRoleList{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types.generated.go
new file mode 100644
index 000000000..03ae6182a
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types.generated.go
@@ -0,0 +1,4879 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1alpha1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ pkg2_types "k8s.io/apimachinery/pkg/types"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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 pkg1_v1.TypeMeta
+ var v1 pkg2_types.UID
+ var v2 time.Time
+ _, _, _ = v0, v1, v2
+ }
+}
+
+func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = len(x.APIGroups) != 0
+ yyq2[2] = len(x.Resources) != 0
+ yyq2[3] = len(x.ResourceNames) != 0
+ yyq2[4] = len(x.NonResourceURLs) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Verbs == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Verbs, false, e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("verbs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Verbs == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Verbs, false, e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.APIGroups == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.APIGroups, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiGroups"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.APIGroups == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.APIGroups, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Resources == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Resources, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resources"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Resources == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Resources, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.ResourceNames == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.ResourceNames, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resourceNames"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ResourceNames == nil {
+ r.EncodeNil()
+ } else {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.ResourceNames, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.NonResourceURLs == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.NonResourceURLs, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nonResourceURLs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NonResourceURLs == nil {
+ r.EncodeNil()
+ } else {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.NonResourceURLs, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PolicyRule) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PolicyRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "verbs":
+ if r.TryDecodeAsNil() {
+ x.Verbs = nil
+ } else {
+ yyv4 := &x.Verbs
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv4, false, d)
+ }
+ }
+ case "apiGroups":
+ if r.TryDecodeAsNil() {
+ x.APIGroups = nil
+ } else {
+ yyv6 := &x.APIGroups
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv6, false, d)
+ }
+ }
+ case "resources":
+ if r.TryDecodeAsNil() {
+ x.Resources = nil
+ } else {
+ yyv8 := &x.Resources
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv8, false, d)
+ }
+ }
+ case "resourceNames":
+ if r.TryDecodeAsNil() {
+ x.ResourceNames = nil
+ } else {
+ yyv10 := &x.ResourceNames
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv10, false, d)
+ }
+ }
+ case "nonResourceURLs":
+ if r.TryDecodeAsNil() {
+ x.NonResourceURLs = nil
+ } else {
+ yyv12 := &x.NonResourceURLs
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv12, false, d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PolicyRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Verbs = nil
+ } else {
+ yyv15 := &x.Verbs
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv15, false, d)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIGroups = nil
+ } else {
+ yyv17 := &x.APIGroups
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv17, false, d)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Resources = nil
+ } else {
+ yyv19 := &x.Resources
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv19, false, d)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ResourceNames = nil
+ } else {
+ yyv21 := &x.ResourceNames
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv21, false, d)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NonResourceURLs = nil
+ } else {
+ yyv23 := &x.NonResourceURLs
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv23, false, d)
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Subject) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.APIVersion != ""
+ yyq2[3] = x.Namespace != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("namespace"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Subject) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Subject) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv8 := &x.Name
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "namespace":
+ if r.TryDecodeAsNil() {
+ x.Namespace = ""
+ } else {
+ yyv10 := &x.Namespace
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Subject) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv17 := &x.Name
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Namespace = ""
+ } else {
+ yyv19 := &x.Namespace
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *RoleRef) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIGroup))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiGroup"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIGroup))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RoleRef) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RoleRef) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "apiGroup":
+ if r.TryDecodeAsNil() {
+ x.APIGroup = ""
+ } else {
+ yyv4 := &x.APIGroup
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv6 := &x.Kind
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv8 := &x.Name
+ 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_containerMapEnd1234)
+}
+
+func (x *RoleRef) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIGroup = ""
+ } else {
+ yyv11 := &x.APIGroup
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv13 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv15 := &x.Name
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Role) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rules"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Role) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Role) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "rules":
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv10 := &x.Rules
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSlicePolicyRule((*[]PolicyRule)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Role) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv19 := &x.Rules
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSlicePolicyRule((*[]PolicyRule)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *RoleBinding) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Subjects == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceSubject(([]Subject)(x.Subjects), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("subjects"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Subjects == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceSubject(([]Subject)(x.Subjects), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy18 := &x.RoleRef
+ yy18.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("roleRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy20 := &x.RoleRef
+ yy20.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RoleBinding) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RoleBinding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "subjects":
+ if r.TryDecodeAsNil() {
+ x.Subjects = nil
+ } else {
+ yyv10 := &x.Subjects
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSliceSubject((*[]Subject)(yyv10), d)
+ }
+ }
+ case "roleRef":
+ if r.TryDecodeAsNil() {
+ x.RoleRef = RoleRef{}
+ } else {
+ yyv12 := &x.RoleRef
+ yyv12.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv14 := &x.Kind
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv16 := &x.APIVersion
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg1_v1.ObjectMeta{}
+ } else {
+ yyv18 := &x.ObjectMeta
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv18) {
+ } else {
+ z.DecFallback(yyv18, false)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Subjects = nil
+ } else {
+ yyv20 := &x.Subjects
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ h.decSliceSubject((*[]Subject)(yyv20), d)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RoleRef = RoleRef{}
+ } else {
+ yyv22 := &x.RoleRef
+ yyv22.CodecDecodeSelf(d)
+ }
+ for {
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj13-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *RoleBindingList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceRoleBinding(([]RoleBinding)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceRoleBinding(([]RoleBinding)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RoleBindingList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RoleBindingList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceRoleBinding((*[]RoleBinding)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RoleBindingList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceRoleBinding((*[]RoleBinding)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *RoleList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceRole(([]Role)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceRole(([]Role)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RoleList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RoleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceRole((*[]Role)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RoleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceRole((*[]Role)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ClusterRole) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rules"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ClusterRole) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ClusterRole) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "rules":
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv10 := &x.Rules
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSlicePolicyRule((*[]PolicyRule)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ClusterRole) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv19 := &x.Rules
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSlicePolicyRule((*[]PolicyRule)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ClusterRoleBinding) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Subjects == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceSubject(([]Subject)(x.Subjects), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("subjects"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Subjects == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceSubject(([]Subject)(x.Subjects), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy18 := &x.RoleRef
+ yy18.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("roleRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy20 := &x.RoleRef
+ yy20.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ClusterRoleBinding) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ClusterRoleBinding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "subjects":
+ if r.TryDecodeAsNil() {
+ x.Subjects = nil
+ } else {
+ yyv10 := &x.Subjects
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSliceSubject((*[]Subject)(yyv10), d)
+ }
+ }
+ case "roleRef":
+ if r.TryDecodeAsNil() {
+ x.RoleRef = RoleRef{}
+ } else {
+ yyv12 := &x.RoleRef
+ yyv12.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ClusterRoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv14 := &x.Kind
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv16 := &x.APIVersion
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg1_v1.ObjectMeta{}
+ } else {
+ yyv18 := &x.ObjectMeta
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv18) {
+ } else {
+ z.DecFallback(yyv18, false)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Subjects = nil
+ } else {
+ yyv20 := &x.Subjects
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ h.decSliceSubject((*[]Subject)(yyv20), d)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RoleRef = RoleRef{}
+ } else {
+ yyv22 := &x.RoleRef
+ yyv22.CodecDecodeSelf(d)
+ }
+ for {
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj13-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ClusterRoleBindingList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceClusterRoleBinding(([]ClusterRoleBinding)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceClusterRoleBinding(([]ClusterRoleBinding)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ClusterRoleBindingList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ClusterRoleBindingList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceClusterRoleBinding((*[]ClusterRoleBinding)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ClusterRoleBindingList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceClusterRoleBinding((*[]ClusterRoleBinding)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ClusterRoleList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceClusterRole(([]ClusterRole)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceClusterRole(([]ClusterRole)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ClusterRoleList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ClusterRoleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceClusterRole((*[]ClusterRole)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ClusterRoleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceClusterRole((*[]ClusterRole)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encSlicePolicyRule(v []PolicyRule, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicePolicyRule(v *[]PolicyRule, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []PolicyRule{}
+ 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, 120)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]PolicyRule, yyrl1)
+ }
+ } else {
+ yyv1 = make([]PolicyRule, 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] = PolicyRule{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, PolicyRule{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PolicyRule{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, PolicyRule{}) // var yyz1 PolicyRule
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PolicyRule{}
+ } 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 = []PolicyRule{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceSubject(v []Subject, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceSubject(v *[]Subject, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Subject{}
+ 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, 64)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Subject, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Subject, 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] = Subject{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Subject{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Subject{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Subject{}) // var yyz1 Subject
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Subject{}
+ } 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 = []Subject{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceRoleBinding(v []RoleBinding, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceRoleBinding(v *[]RoleBinding, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []RoleBinding{}
+ 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, 336)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]RoleBinding, yyrl1)
+ }
+ } else {
+ yyv1 = make([]RoleBinding, 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] = RoleBinding{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, RoleBinding{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = RoleBinding{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, RoleBinding{}) // var yyz1 RoleBinding
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = RoleBinding{}
+ } 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 = []RoleBinding{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceRole(v []Role, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceRole(v *[]Role, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Role{}
+ 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, 288)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Role, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Role, 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] = Role{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Role{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Role{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Role{}) // var yyz1 Role
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Role{}
+ } 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 = []Role{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceClusterRoleBinding(v []ClusterRoleBinding, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceClusterRoleBinding(v *[]ClusterRoleBinding, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ClusterRoleBinding{}
+ 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, 336)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ClusterRoleBinding, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ClusterRoleBinding, 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] = ClusterRoleBinding{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ClusterRoleBinding{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ClusterRoleBinding{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ClusterRoleBinding{}) // var yyz1 ClusterRoleBinding
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ClusterRoleBinding{}
+ } 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 = []ClusterRoleBinding{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceClusterRole(v []ClusterRole, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceClusterRole(v *[]ClusterRole, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ClusterRole{}
+ 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, 288)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ClusterRole, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ClusterRole, 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] = ClusterRole{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ClusterRole{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ClusterRole{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ClusterRole{}) // var yyz1 ClusterRole
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ClusterRole{}
+ } 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 = []ClusterRole{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types.go
new file mode 100644
index 000000000..e9f8efb3b
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types.go
@@ -0,0 +1,209 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// Authorization is calculated against
+// 1. evaluation of ClusterRoleBindings - short circuit on match
+// 2. evaluation of RoleBindings in the namespace requested - short circuit on match
+// 3. deny by default
+
+const (
+ APIGroupAll = "*"
+ ResourceAll = "*"
+ VerbAll = "*"
+ NonResourceAll = "*"
+
+ GroupKind = "Group"
+ ServiceAccountKind = "ServiceAccount"
+ UserKind = "User"
+
+ // AutoUpdateAnnotationKey is the name of an annotation which prevents reconciliation if set to "false"
+ AutoUpdateAnnotationKey = "rbac.authorization.kubernetes.io/autoupdate"
+)
+
+// Authorization is calculated against
+// 1. evaluation of ClusterRoleBindings - short circuit on match
+// 2. evaluation of RoleBindings in the namespace requested - short circuit on match
+// 3. deny by default
+
+// PolicyRule holds information that describes a policy rule, but does not contain information
+// about who the rule applies to or which namespace the rule applies to.
+type PolicyRule struct {
+ // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.
+ Verbs []string `json:"verbs" protobuf:"bytes,1,rep,name=verbs"`
+
+ // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of
+ // the enumerated resources in any API group will be allowed.
+ // +optional
+ APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,3,rep,name=apiGroups"`
+ // Resources is a list of resources this rule applies to. ResourceAll represents all resources.
+ // +optional
+ Resources []string `json:"resources,omitempty" protobuf:"bytes,4,rep,name=resources"`
+ // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
+ // +optional
+ ResourceNames []string `json:"resourceNames,omitempty" protobuf:"bytes,5,rep,name=resourceNames"`
+
+ // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path
+ // This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different.
+ // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.
+ // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.
+ // +optional
+ NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,6,rep,name=nonResourceURLs"`
+}
+
+// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference,
+// or a value for non-objects such as user and group names.
+type Subject struct {
+ // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
+ // If the Authorizer does not recognized the kind value, the Authorizer should report an error.
+ Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
+ // APIVersion holds the API group and version of the referenced subject.
+ // Defaults to "v1" for ServiceAccount subjects.
+ // Defaults to "rbac.authorization.k8s.io/v1alpha1" for User and Group subjects.
+ // +k8s:conversion-gen=false
+ // +optional
+ APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,2,opt.name=apiVersion"`
+ // Name of the object being referenced.
+ Name string `json:"name" protobuf:"bytes,3,opt,name=name"`
+ // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty
+ // the Authorizer should report an error.
+ // +optional
+ Namespace string `json:"namespace,omitempty" protobuf:"bytes,4,opt,name=namespace"`
+}
+
+// RoleRef contains information that points to the role being used
+type RoleRef struct {
+ // APIGroup is the group for the resource being referenced
+ APIGroup string `json:"apiGroup" protobuf:"bytes,1,opt,name=apiGroup"`
+ // Kind is the type of resource being referenced
+ Kind string `json:"kind" protobuf:"bytes,2,opt,name=kind"`
+ // Name is the name of resource being referenced
+ Name string `json:"name" protobuf:"bytes,3,opt,name=name"`
+}
+
+// +genclient=true
+
+// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
+type Role struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Rules holds all the PolicyRules for this Role
+ Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"`
+}
+
+// +genclient=true
+
+// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace.
+// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given
+// namespace only have effect in that namespace.
+type RoleBinding struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Subjects holds references to the objects the role applies to.
+ Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"`
+
+ // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
+ // If the RoleRef cannot be resolved, the Authorizer must return an error.
+ RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
+}
+
+// RoleBindingList is a collection of RoleBindings
+type RoleBindingList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of RoleBindings
+ Items []RoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// RoleList is a collection of Roles
+type RoleList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of Roles
+ Items []Role `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// +genclient=true
+// +nonNamespaced=true
+
+// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
+type ClusterRole struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Rules holds all the PolicyRules for this ClusterRole
+ Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"`
+}
+
+// +genclient=true
+// +nonNamespaced=true
+
+// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace,
+// and adds who information via Subject.
+type ClusterRoleBinding struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Subjects holds references to the objects the role applies to.
+ Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"`
+
+ // RoleRef can only reference a ClusterRole in the global namespace.
+ // If the RoleRef cannot be resolved, the Authorizer must return an error.
+ RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
+}
+
+// ClusterRoleBindingList is a collection of ClusterRoleBindings
+type ClusterRoleBindingList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of ClusterRoleBindings
+ Items []ClusterRoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// ClusterRoleList is a collection of ClusterRoles
+type ClusterRoleList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of ClusterRoles
+ Items []ClusterRole `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..d58a722af
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go
@@ -0,0 +1,148 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_ClusterRole = map[string]string{
+ "": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.",
+ "metadata": "Standard object's metadata.",
+ "rules": "Rules holds all the PolicyRules for this ClusterRole",
+}
+
+func (ClusterRole) SwaggerDoc() map[string]string {
+ return map_ClusterRole
+}
+
+var map_ClusterRoleBinding = map[string]string{
+ "": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.",
+ "metadata": "Standard object's metadata.",
+ "subjects": "Subjects holds references to the objects the role applies to.",
+ "roleRef": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.",
+}
+
+func (ClusterRoleBinding) SwaggerDoc() map[string]string {
+ return map_ClusterRoleBinding
+}
+
+var map_ClusterRoleBindingList = map[string]string{
+ "": "ClusterRoleBindingList is a collection of ClusterRoleBindings",
+ "metadata": "Standard object's metadata.",
+ "items": "Items is a list of ClusterRoleBindings",
+}
+
+func (ClusterRoleBindingList) SwaggerDoc() map[string]string {
+ return map_ClusterRoleBindingList
+}
+
+var map_ClusterRoleList = map[string]string{
+ "": "ClusterRoleList is a collection of ClusterRoles",
+ "metadata": "Standard object's metadata.",
+ "items": "Items is a list of ClusterRoles",
+}
+
+func (ClusterRoleList) SwaggerDoc() map[string]string {
+ return map_ClusterRoleList
+}
+
+var map_PolicyRule = map[string]string{
+ "": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.",
+ "verbs": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.",
+ "apiGroups": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.",
+ "resources": "Resources is a list of resources this rule applies to. ResourceAll represents all resources.",
+ "resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.",
+ "nonResourceURLs": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.",
+}
+
+func (PolicyRule) SwaggerDoc() map[string]string {
+ return map_PolicyRule
+}
+
+var map_Role = map[string]string{
+ "": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.",
+ "metadata": "Standard object's metadata.",
+ "rules": "Rules holds all the PolicyRules for this Role",
+}
+
+func (Role) SwaggerDoc() map[string]string {
+ return map_Role
+}
+
+var map_RoleBinding = map[string]string{
+ "": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.",
+ "metadata": "Standard object's metadata.",
+ "subjects": "Subjects holds references to the objects the role applies to.",
+ "roleRef": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.",
+}
+
+func (RoleBinding) SwaggerDoc() map[string]string {
+ return map_RoleBinding
+}
+
+var map_RoleBindingList = map[string]string{
+ "": "RoleBindingList is a collection of RoleBindings",
+ "metadata": "Standard object's metadata.",
+ "items": "Items is a list of RoleBindings",
+}
+
+func (RoleBindingList) SwaggerDoc() map[string]string {
+ return map_RoleBindingList
+}
+
+var map_RoleList = map[string]string{
+ "": "RoleList is a collection of Roles",
+ "metadata": "Standard object's metadata.",
+ "items": "Items is a list of Roles",
+}
+
+func (RoleList) SwaggerDoc() map[string]string {
+ return map_RoleList
+}
+
+var map_RoleRef = map[string]string{
+ "": "RoleRef contains information that points to the role being used",
+ "apiGroup": "APIGroup is the group for the resource being referenced",
+ "kind": "Kind is the type of resource being referenced",
+ "name": "Name is the name of resource being referenced",
+}
+
+func (RoleRef) SwaggerDoc() map[string]string {
+ return map_RoleRef
+}
+
+var map_Subject = map[string]string{
+ "": "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.",
+ "kind": "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.",
+ "apiVersion": "APIVersion holds the API group and version of the referenced subject. Defaults to \"v1\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io/v1alpha1\" for User and Group subjects.",
+ "name": "Name of the object being referenced.",
+ "namespace": "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.",
+}
+
+func (Subject) SwaggerDoc() map[string]string {
+ return map_Subject
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go
new file mode 100644
index 000000000..a3315156f
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go
@@ -0,0 +1,469 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1alpha1
+
+import (
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ rbac "k8s.io/client-go/pkg/apis/rbac"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1alpha1_ClusterRole_To_rbac_ClusterRole,
+ Convert_rbac_ClusterRole_To_v1alpha1_ClusterRole,
+ Convert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding,
+ Convert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding,
+ Convert_v1alpha1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder,
+ Convert_rbac_ClusterRoleBindingBuilder_To_v1alpha1_ClusterRoleBindingBuilder,
+ Convert_v1alpha1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList,
+ Convert_rbac_ClusterRoleBindingList_To_v1alpha1_ClusterRoleBindingList,
+ Convert_v1alpha1_ClusterRoleList_To_rbac_ClusterRoleList,
+ Convert_rbac_ClusterRoleList_To_v1alpha1_ClusterRoleList,
+ Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule,
+ Convert_rbac_PolicyRule_To_v1alpha1_PolicyRule,
+ Convert_v1alpha1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder,
+ Convert_rbac_PolicyRuleBuilder_To_v1alpha1_PolicyRuleBuilder,
+ Convert_v1alpha1_Role_To_rbac_Role,
+ Convert_rbac_Role_To_v1alpha1_Role,
+ Convert_v1alpha1_RoleBinding_To_rbac_RoleBinding,
+ Convert_rbac_RoleBinding_To_v1alpha1_RoleBinding,
+ Convert_v1alpha1_RoleBindingList_To_rbac_RoleBindingList,
+ Convert_rbac_RoleBindingList_To_v1alpha1_RoleBindingList,
+ Convert_v1alpha1_RoleList_To_rbac_RoleList,
+ Convert_rbac_RoleList_To_v1alpha1_RoleList,
+ Convert_v1alpha1_RoleRef_To_rbac_RoleRef,
+ Convert_rbac_RoleRef_To_v1alpha1_RoleRef,
+ Convert_v1alpha1_Subject_To_rbac_Subject,
+ Convert_rbac_Subject_To_v1alpha1_Subject,
+ )
+}
+
+func autoConvert_v1alpha1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac.ClusterRole, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Rules = *(*[]rbac.PolicyRule)(unsafe.Pointer(&in.Rules))
+ return nil
+}
+
+// Convert_v1alpha1_ClusterRole_To_rbac_ClusterRole is an autogenerated conversion function.
+func Convert_v1alpha1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac.ClusterRole, s conversion.Scope) error {
+ return autoConvert_v1alpha1_ClusterRole_To_rbac_ClusterRole(in, out, s)
+}
+
+func autoConvert_rbac_ClusterRole_To_v1alpha1_ClusterRole(in *rbac.ClusterRole, out *ClusterRole, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if in.Rules == nil {
+ out.Rules = make([]PolicyRule, 0)
+ } else {
+ out.Rules = *(*[]PolicyRule)(unsafe.Pointer(&in.Rules))
+ }
+ return nil
+}
+
+// Convert_rbac_ClusterRole_To_v1alpha1_ClusterRole is an autogenerated conversion function.
+func Convert_rbac_ClusterRole_To_v1alpha1_ClusterRole(in *rbac.ClusterRole, out *ClusterRole, s conversion.Scope) error {
+ return autoConvert_rbac_ClusterRole_To_v1alpha1_ClusterRole(in, out, s)
+}
+
+func autoConvert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in *ClusterRoleBinding, out *rbac.ClusterRoleBinding, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if in.Subjects != nil {
+ in, out := &in.Subjects, &out.Subjects
+ *out = make([]rbac.Subject, len(*in))
+ for i := range *in {
+ if err := Convert_v1alpha1_Subject_To_rbac_Subject(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Subjects = nil
+ }
+ if err := Convert_v1alpha1_RoleRef_To_rbac_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding is an autogenerated conversion function.
+func Convert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in *ClusterRoleBinding, out *rbac.ClusterRoleBinding, s conversion.Scope) error {
+ return autoConvert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in, out, s)
+}
+
+func autoConvert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding(in *rbac.ClusterRoleBinding, out *ClusterRoleBinding, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if in.Subjects != nil {
+ in, out := &in.Subjects, &out.Subjects
+ *out = make([]Subject, len(*in))
+ for i := range *in {
+ if err := Convert_rbac_Subject_To_v1alpha1_Subject(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Subjects = make([]Subject, 0)
+ }
+ if err := Convert_rbac_RoleRef_To_v1alpha1_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding is an autogenerated conversion function.
+func Convert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding(in *rbac.ClusterRoleBinding, out *ClusterRoleBinding, s conversion.Scope) error {
+ return autoConvert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding(in, out, s)
+}
+
+func autoConvert_v1alpha1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder(in *ClusterRoleBindingBuilder, out *rbac.ClusterRoleBindingBuilder, s conversion.Scope) error {
+ if err := Convert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(&in.ClusterRoleBinding, &out.ClusterRoleBinding, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1alpha1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder is an autogenerated conversion function.
+func Convert_v1alpha1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder(in *ClusterRoleBindingBuilder, out *rbac.ClusterRoleBindingBuilder, s conversion.Scope) error {
+ return autoConvert_v1alpha1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder(in, out, s)
+}
+
+func autoConvert_rbac_ClusterRoleBindingBuilder_To_v1alpha1_ClusterRoleBindingBuilder(in *rbac.ClusterRoleBindingBuilder, out *ClusterRoleBindingBuilder, s conversion.Scope) error {
+ if err := Convert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding(&in.ClusterRoleBinding, &out.ClusterRoleBinding, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_rbac_ClusterRoleBindingBuilder_To_v1alpha1_ClusterRoleBindingBuilder is an autogenerated conversion function.
+func Convert_rbac_ClusterRoleBindingBuilder_To_v1alpha1_ClusterRoleBindingBuilder(in *rbac.ClusterRoleBindingBuilder, out *ClusterRoleBindingBuilder, s conversion.Scope) error {
+ return autoConvert_rbac_ClusterRoleBindingBuilder_To_v1alpha1_ClusterRoleBindingBuilder(in, out, s)
+}
+
+func autoConvert_v1alpha1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in *ClusterRoleBindingList, out *rbac.ClusterRoleBindingList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]rbac.ClusterRoleBinding, len(*in))
+ for i := range *in {
+ if err := Convert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1alpha1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList is an autogenerated conversion function.
+func Convert_v1alpha1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in *ClusterRoleBindingList, out *rbac.ClusterRoleBindingList, s conversion.Scope) error {
+ return autoConvert_v1alpha1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in, out, s)
+}
+
+func autoConvert_rbac_ClusterRoleBindingList_To_v1alpha1_ClusterRoleBindingList(in *rbac.ClusterRoleBindingList, out *ClusterRoleBindingList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ClusterRoleBinding, len(*in))
+ for i := range *in {
+ if err := Convert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]ClusterRoleBinding, 0)
+ }
+ return nil
+}
+
+// Convert_rbac_ClusterRoleBindingList_To_v1alpha1_ClusterRoleBindingList is an autogenerated conversion function.
+func Convert_rbac_ClusterRoleBindingList_To_v1alpha1_ClusterRoleBindingList(in *rbac.ClusterRoleBindingList, out *ClusterRoleBindingList, s conversion.Scope) error {
+ return autoConvert_rbac_ClusterRoleBindingList_To_v1alpha1_ClusterRoleBindingList(in, out, s)
+}
+
+func autoConvert_v1alpha1_ClusterRoleList_To_rbac_ClusterRoleList(in *ClusterRoleList, out *rbac.ClusterRoleList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]rbac.ClusterRole)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1alpha1_ClusterRoleList_To_rbac_ClusterRoleList is an autogenerated conversion function.
+func Convert_v1alpha1_ClusterRoleList_To_rbac_ClusterRoleList(in *ClusterRoleList, out *rbac.ClusterRoleList, s conversion.Scope) error {
+ return autoConvert_v1alpha1_ClusterRoleList_To_rbac_ClusterRoleList(in, out, s)
+}
+
+func autoConvert_rbac_ClusterRoleList_To_v1alpha1_ClusterRoleList(in *rbac.ClusterRoleList, out *ClusterRoleList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]ClusterRole, 0)
+ } else {
+ out.Items = *(*[]ClusterRole)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_rbac_ClusterRoleList_To_v1alpha1_ClusterRoleList is an autogenerated conversion function.
+func Convert_rbac_ClusterRoleList_To_v1alpha1_ClusterRoleList(in *rbac.ClusterRoleList, out *ClusterRoleList, s conversion.Scope) error {
+ return autoConvert_rbac_ClusterRoleList_To_v1alpha1_ClusterRoleList(in, out, s)
+}
+
+func autoConvert_v1alpha1_PolicyRule_To_rbac_PolicyRule(in *PolicyRule, out *rbac.PolicyRule, s conversion.Scope) error {
+ out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs))
+ out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups))
+ out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources))
+ out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames))
+ out.NonResourceURLs = *(*[]string)(unsafe.Pointer(&in.NonResourceURLs))
+ return nil
+}
+
+// Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule is an autogenerated conversion function.
+func Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule(in *PolicyRule, out *rbac.PolicyRule, s conversion.Scope) error {
+ return autoConvert_v1alpha1_PolicyRule_To_rbac_PolicyRule(in, out, s)
+}
+
+func autoConvert_rbac_PolicyRule_To_v1alpha1_PolicyRule(in *rbac.PolicyRule, out *PolicyRule, s conversion.Scope) error {
+ if in.Verbs == nil {
+ out.Verbs = make([]string, 0)
+ } else {
+ out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs))
+ }
+ out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups))
+ out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources))
+ out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames))
+ out.NonResourceURLs = *(*[]string)(unsafe.Pointer(&in.NonResourceURLs))
+ return nil
+}
+
+// Convert_rbac_PolicyRule_To_v1alpha1_PolicyRule is an autogenerated conversion function.
+func Convert_rbac_PolicyRule_To_v1alpha1_PolicyRule(in *rbac.PolicyRule, out *PolicyRule, s conversion.Scope) error {
+ return autoConvert_rbac_PolicyRule_To_v1alpha1_PolicyRule(in, out, s)
+}
+
+func autoConvert_v1alpha1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder(in *PolicyRuleBuilder, out *rbac.PolicyRuleBuilder, s conversion.Scope) error {
+ if err := Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule(&in.PolicyRule, &out.PolicyRule, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1alpha1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder is an autogenerated conversion function.
+func Convert_v1alpha1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder(in *PolicyRuleBuilder, out *rbac.PolicyRuleBuilder, s conversion.Scope) error {
+ return autoConvert_v1alpha1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder(in, out, s)
+}
+
+func autoConvert_rbac_PolicyRuleBuilder_To_v1alpha1_PolicyRuleBuilder(in *rbac.PolicyRuleBuilder, out *PolicyRuleBuilder, s conversion.Scope) error {
+ if err := Convert_rbac_PolicyRule_To_v1alpha1_PolicyRule(&in.PolicyRule, &out.PolicyRule, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_rbac_PolicyRuleBuilder_To_v1alpha1_PolicyRuleBuilder is an autogenerated conversion function.
+func Convert_rbac_PolicyRuleBuilder_To_v1alpha1_PolicyRuleBuilder(in *rbac.PolicyRuleBuilder, out *PolicyRuleBuilder, s conversion.Scope) error {
+ return autoConvert_rbac_PolicyRuleBuilder_To_v1alpha1_PolicyRuleBuilder(in, out, s)
+}
+
+func autoConvert_v1alpha1_Role_To_rbac_Role(in *Role, out *rbac.Role, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Rules = *(*[]rbac.PolicyRule)(unsafe.Pointer(&in.Rules))
+ return nil
+}
+
+// Convert_v1alpha1_Role_To_rbac_Role is an autogenerated conversion function.
+func Convert_v1alpha1_Role_To_rbac_Role(in *Role, out *rbac.Role, s conversion.Scope) error {
+ return autoConvert_v1alpha1_Role_To_rbac_Role(in, out, s)
+}
+
+func autoConvert_rbac_Role_To_v1alpha1_Role(in *rbac.Role, out *Role, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if in.Rules == nil {
+ out.Rules = make([]PolicyRule, 0)
+ } else {
+ out.Rules = *(*[]PolicyRule)(unsafe.Pointer(&in.Rules))
+ }
+ return nil
+}
+
+// Convert_rbac_Role_To_v1alpha1_Role is an autogenerated conversion function.
+func Convert_rbac_Role_To_v1alpha1_Role(in *rbac.Role, out *Role, s conversion.Scope) error {
+ return autoConvert_rbac_Role_To_v1alpha1_Role(in, out, s)
+}
+
+func autoConvert_v1alpha1_RoleBinding_To_rbac_RoleBinding(in *RoleBinding, out *rbac.RoleBinding, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if in.Subjects != nil {
+ in, out := &in.Subjects, &out.Subjects
+ *out = make([]rbac.Subject, len(*in))
+ for i := range *in {
+ if err := Convert_v1alpha1_Subject_To_rbac_Subject(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Subjects = nil
+ }
+ if err := Convert_v1alpha1_RoleRef_To_rbac_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1alpha1_RoleBinding_To_rbac_RoleBinding is an autogenerated conversion function.
+func Convert_v1alpha1_RoleBinding_To_rbac_RoleBinding(in *RoleBinding, out *rbac.RoleBinding, s conversion.Scope) error {
+ return autoConvert_v1alpha1_RoleBinding_To_rbac_RoleBinding(in, out, s)
+}
+
+func autoConvert_rbac_RoleBinding_To_v1alpha1_RoleBinding(in *rbac.RoleBinding, out *RoleBinding, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if in.Subjects != nil {
+ in, out := &in.Subjects, &out.Subjects
+ *out = make([]Subject, len(*in))
+ for i := range *in {
+ if err := Convert_rbac_Subject_To_v1alpha1_Subject(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Subjects = make([]Subject, 0)
+ }
+ if err := Convert_rbac_RoleRef_To_v1alpha1_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_rbac_RoleBinding_To_v1alpha1_RoleBinding is an autogenerated conversion function.
+func Convert_rbac_RoleBinding_To_v1alpha1_RoleBinding(in *rbac.RoleBinding, out *RoleBinding, s conversion.Scope) error {
+ return autoConvert_rbac_RoleBinding_To_v1alpha1_RoleBinding(in, out, s)
+}
+
+func autoConvert_v1alpha1_RoleBindingList_To_rbac_RoleBindingList(in *RoleBindingList, out *rbac.RoleBindingList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]rbac.RoleBinding, len(*in))
+ for i := range *in {
+ if err := Convert_v1alpha1_RoleBinding_To_rbac_RoleBinding(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1alpha1_RoleBindingList_To_rbac_RoleBindingList is an autogenerated conversion function.
+func Convert_v1alpha1_RoleBindingList_To_rbac_RoleBindingList(in *RoleBindingList, out *rbac.RoleBindingList, s conversion.Scope) error {
+ return autoConvert_v1alpha1_RoleBindingList_To_rbac_RoleBindingList(in, out, s)
+}
+
+func autoConvert_rbac_RoleBindingList_To_v1alpha1_RoleBindingList(in *rbac.RoleBindingList, out *RoleBindingList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]RoleBinding, len(*in))
+ for i := range *in {
+ if err := Convert_rbac_RoleBinding_To_v1alpha1_RoleBinding(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]RoleBinding, 0)
+ }
+ return nil
+}
+
+// Convert_rbac_RoleBindingList_To_v1alpha1_RoleBindingList is an autogenerated conversion function.
+func Convert_rbac_RoleBindingList_To_v1alpha1_RoleBindingList(in *rbac.RoleBindingList, out *RoleBindingList, s conversion.Scope) error {
+ return autoConvert_rbac_RoleBindingList_To_v1alpha1_RoleBindingList(in, out, s)
+}
+
+func autoConvert_v1alpha1_RoleList_To_rbac_RoleList(in *RoleList, out *rbac.RoleList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]rbac.Role)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1alpha1_RoleList_To_rbac_RoleList is an autogenerated conversion function.
+func Convert_v1alpha1_RoleList_To_rbac_RoleList(in *RoleList, out *rbac.RoleList, s conversion.Scope) error {
+ return autoConvert_v1alpha1_RoleList_To_rbac_RoleList(in, out, s)
+}
+
+func autoConvert_rbac_RoleList_To_v1alpha1_RoleList(in *rbac.RoleList, out *RoleList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]Role, 0)
+ } else {
+ out.Items = *(*[]Role)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_rbac_RoleList_To_v1alpha1_RoleList is an autogenerated conversion function.
+func Convert_rbac_RoleList_To_v1alpha1_RoleList(in *rbac.RoleList, out *RoleList, s conversion.Scope) error {
+ return autoConvert_rbac_RoleList_To_v1alpha1_RoleList(in, out, s)
+}
+
+func autoConvert_v1alpha1_RoleRef_To_rbac_RoleRef(in *RoleRef, out *rbac.RoleRef, s conversion.Scope) error {
+ out.APIGroup = in.APIGroup
+ out.Kind = in.Kind
+ out.Name = in.Name
+ return nil
+}
+
+// Convert_v1alpha1_RoleRef_To_rbac_RoleRef is an autogenerated conversion function.
+func Convert_v1alpha1_RoleRef_To_rbac_RoleRef(in *RoleRef, out *rbac.RoleRef, s conversion.Scope) error {
+ return autoConvert_v1alpha1_RoleRef_To_rbac_RoleRef(in, out, s)
+}
+
+func autoConvert_rbac_RoleRef_To_v1alpha1_RoleRef(in *rbac.RoleRef, out *RoleRef, s conversion.Scope) error {
+ out.APIGroup = in.APIGroup
+ out.Kind = in.Kind
+ out.Name = in.Name
+ return nil
+}
+
+// Convert_rbac_RoleRef_To_v1alpha1_RoleRef is an autogenerated conversion function.
+func Convert_rbac_RoleRef_To_v1alpha1_RoleRef(in *rbac.RoleRef, out *RoleRef, s conversion.Scope) error {
+ return autoConvert_rbac_RoleRef_To_v1alpha1_RoleRef(in, out, s)
+}
+
+func autoConvert_v1alpha1_Subject_To_rbac_Subject(in *Subject, out *rbac.Subject, s conversion.Scope) error {
+ out.Kind = in.Kind
+ // INFO: in.APIVersion opted out of conversion generation
+ out.Name = in.Name
+ out.Namespace = in.Namespace
+ return nil
+}
+
+func autoConvert_rbac_Subject_To_v1alpha1_Subject(in *rbac.Subject, out *Subject, s conversion.Scope) error {
+ out.Kind = in.Kind
+ // WARNING: in.APIGroup requires manual conversion: does not exist in peer-type
+ out.Name = in.Name
+ out.Namespace = in.Namespace
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..21b4b8dc4
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.deepcopy.go
@@ -0,0 +1,269 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ClusterRole, InType: reflect.TypeOf(&ClusterRole{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ClusterRoleBinding, InType: reflect.TypeOf(&ClusterRoleBinding{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ClusterRoleBindingList, InType: reflect.TypeOf(&ClusterRoleBindingList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ClusterRoleList, InType: reflect.TypeOf(&ClusterRoleList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PolicyRule, InType: reflect.TypeOf(&PolicyRule{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_Role, InType: reflect.TypeOf(&Role{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_RoleBinding, InType: reflect.TypeOf(&RoleBinding{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_RoleBindingList, InType: reflect.TypeOf(&RoleBindingList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_RoleList, InType: reflect.TypeOf(&RoleList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_RoleRef, InType: reflect.TypeOf(&RoleRef{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_Subject, InType: reflect.TypeOf(&Subject{})},
+ )
+}
+
+// DeepCopy_v1alpha1_ClusterRole is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_ClusterRole(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ClusterRole)
+ out := out.(*ClusterRole)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]PolicyRule, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1alpha1_PolicyRule(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_ClusterRoleBinding is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_ClusterRoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ClusterRoleBinding)
+ out := out.(*ClusterRoleBinding)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Subjects != nil {
+ in, out := &in.Subjects, &out.Subjects
+ *out = make([]Subject, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_ClusterRoleBindingList is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_ClusterRoleBindingList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ClusterRoleBindingList)
+ out := out.(*ClusterRoleBindingList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ClusterRoleBinding, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1alpha1_ClusterRoleBinding(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_ClusterRoleList is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_ClusterRoleList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ClusterRoleList)
+ out := out.(*ClusterRoleList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ClusterRole, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1alpha1_ClusterRole(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_PolicyRule is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_PolicyRule(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PolicyRule)
+ out := out.(*PolicyRule)
+ *out = *in
+ if in.Verbs != nil {
+ in, out := &in.Verbs, &out.Verbs
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.APIGroups != nil {
+ in, out := &in.APIGroups, &out.APIGroups
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Resources != nil {
+ in, out := &in.Resources, &out.Resources
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.ResourceNames != nil {
+ in, out := &in.ResourceNames, &out.ResourceNames
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.NonResourceURLs != nil {
+ in, out := &in.NonResourceURLs, &out.NonResourceURLs
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_Role is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_Role(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Role)
+ out := out.(*Role)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]PolicyRule, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1alpha1_PolicyRule(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_RoleBinding is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_RoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RoleBinding)
+ out := out.(*RoleBinding)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Subjects != nil {
+ in, out := &in.Subjects, &out.Subjects
+ *out = make([]Subject, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_RoleBindingList is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_RoleBindingList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RoleBindingList)
+ out := out.(*RoleBindingList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]RoleBinding, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1alpha1_RoleBinding(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_RoleList is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_RoleList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RoleList)
+ out := out.(*RoleList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Role, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1alpha1_Role(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_RoleRef is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_RoleRef(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RoleRef)
+ out := out.(*RoleRef)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_Subject is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_Subject(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Subject)
+ out := out.(*Subject)
+ *out = *in
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.defaults.go
new file mode 100644
index 000000000..1a5749be3
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.defaults.go
@@ -0,0 +1,66 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1alpha1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ scheme.AddTypeDefaultingFunc(&ClusterRoleBinding{}, func(obj interface{}) { SetObjectDefaults_ClusterRoleBinding(obj.(*ClusterRoleBinding)) })
+ scheme.AddTypeDefaultingFunc(&ClusterRoleBindingList{}, func(obj interface{}) { SetObjectDefaults_ClusterRoleBindingList(obj.(*ClusterRoleBindingList)) })
+ scheme.AddTypeDefaultingFunc(&RoleBinding{}, func(obj interface{}) { SetObjectDefaults_RoleBinding(obj.(*RoleBinding)) })
+ scheme.AddTypeDefaultingFunc(&RoleBindingList{}, func(obj interface{}) { SetObjectDefaults_RoleBindingList(obj.(*RoleBindingList)) })
+ return nil
+}
+
+func SetObjectDefaults_ClusterRoleBinding(in *ClusterRoleBinding) {
+ SetDefaults_ClusterRoleBinding(in)
+ for i := range in.Subjects {
+ a := &in.Subjects[i]
+ SetDefaults_Subject(a)
+ }
+}
+
+func SetObjectDefaults_ClusterRoleBindingList(in *ClusterRoleBindingList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_ClusterRoleBinding(a)
+ }
+}
+
+func SetObjectDefaults_RoleBinding(in *RoleBinding) {
+ SetDefaults_RoleBinding(in)
+ for i := range in.Subjects {
+ a := &in.Subjects[i]
+ SetDefaults_Subject(a)
+ }
+}
+
+func SetObjectDefaults_RoleBindingList(in *RoleBindingList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_RoleBinding(a)
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/defaults.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/defaults.go
new file mode 100644
index 000000000..c1cf8c23c
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/defaults.go
@@ -0,0 +1,48 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
+
+func SetDefaults_ClusterRoleBinding(obj *ClusterRoleBinding) {
+ if len(obj.RoleRef.APIGroup) == 0 {
+ obj.RoleRef.APIGroup = GroupName
+ }
+}
+func SetDefaults_RoleBinding(obj *RoleBinding) {
+ if len(obj.RoleRef.APIGroup) == 0 {
+ obj.RoleRef.APIGroup = GroupName
+ }
+}
+func SetDefaults_Subject(obj *Subject) {
+ if len(obj.APIGroup) == 0 {
+ switch obj.Kind {
+ case ServiceAccountKind:
+ obj.APIGroup = ""
+ case UserKind:
+ obj.APIGroup = GroupName
+ case GroupKind:
+ obj.APIGroup = GroupName
+ }
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/doc.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/doc.go
new file mode 100644
index 000000000..a9ad4296e
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +groupName=rbac.authorization.k8s.io
+package v1beta1
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/generated.pb.go
new file mode 100644
index 000000000..07a719394
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/generated.pb.go
@@ -0,0 +1,2821 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/rbac/v1beta1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1beta1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/rbac/v1beta1/generated.proto
+
+ It has these top-level messages:
+ ClusterRole
+ ClusterRoleBinding
+ ClusterRoleBindingBuilder
+ ClusterRoleBindingList
+ ClusterRoleList
+ PolicyRule
+ PolicyRuleBuilder
+ Role
+ RoleBinding
+ RoleBindingList
+ RoleList
+ RoleRef
+ Subject
+*/
+package v1beta1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *ClusterRole) Reset() { *m = ClusterRole{} }
+func (*ClusterRole) ProtoMessage() {}
+func (*ClusterRole) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} }
+func (*ClusterRoleBinding) ProtoMessage() {}
+func (*ClusterRoleBinding) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *ClusterRoleBindingBuilder) Reset() { *m = ClusterRoleBindingBuilder{} }
+func (*ClusterRoleBindingBuilder) ProtoMessage() {}
+func (*ClusterRoleBindingBuilder) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{2}
+}
+
+func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} }
+func (*ClusterRoleBindingList) ProtoMessage() {}
+func (*ClusterRoleBindingList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
+
+func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} }
+func (*ClusterRoleList) ProtoMessage() {}
+func (*ClusterRoleList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
+
+func (m *PolicyRule) Reset() { *m = PolicyRule{} }
+func (*PolicyRule) ProtoMessage() {}
+func (*PolicyRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
+
+func (m *PolicyRuleBuilder) Reset() { *m = PolicyRuleBuilder{} }
+func (*PolicyRuleBuilder) ProtoMessage() {}
+func (*PolicyRuleBuilder) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
+
+func (m *Role) Reset() { *m = Role{} }
+func (*Role) ProtoMessage() {}
+func (*Role) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
+
+func (m *RoleBinding) Reset() { *m = RoleBinding{} }
+func (*RoleBinding) ProtoMessage() {}
+func (*RoleBinding) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
+
+func (m *RoleBindingList) Reset() { *m = RoleBindingList{} }
+func (*RoleBindingList) ProtoMessage() {}
+func (*RoleBindingList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
+
+func (m *RoleList) Reset() { *m = RoleList{} }
+func (*RoleList) ProtoMessage() {}
+func (*RoleList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
+
+func (m *RoleRef) Reset() { *m = RoleRef{} }
+func (*RoleRef) ProtoMessage() {}
+func (*RoleRef) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} }
+
+func (m *Subject) Reset() { *m = Subject{} }
+func (*Subject) ProtoMessage() {}
+func (*Subject) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} }
+
+func init() {
+ proto.RegisterType((*ClusterRole)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.ClusterRole")
+ proto.RegisterType((*ClusterRoleBinding)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.ClusterRoleBinding")
+ proto.RegisterType((*ClusterRoleBindingBuilder)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.ClusterRoleBindingBuilder")
+ proto.RegisterType((*ClusterRoleBindingList)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.ClusterRoleBindingList")
+ proto.RegisterType((*ClusterRoleList)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.ClusterRoleList")
+ proto.RegisterType((*PolicyRule)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.PolicyRule")
+ proto.RegisterType((*PolicyRuleBuilder)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.PolicyRuleBuilder")
+ proto.RegisterType((*Role)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.Role")
+ proto.RegisterType((*RoleBinding)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.RoleBinding")
+ proto.RegisterType((*RoleBindingList)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.RoleBindingList")
+ proto.RegisterType((*RoleList)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.RoleList")
+ proto.RegisterType((*RoleRef)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.RoleRef")
+ proto.RegisterType((*Subject)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.Subject")
+}
+func (m *ClusterRole) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ClusterRole) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ if len(m.Rules) > 0 {
+ for _, msg := range m.Rules {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ClusterRoleBinding) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ClusterRoleBinding) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n2, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ if len(m.Subjects) > 0 {
+ for _, msg := range m.Subjects {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RoleRef.Size()))
+ n3, err := m.RoleRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ return i, nil
+}
+
+func (m *ClusterRoleBindingBuilder) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ClusterRoleBindingBuilder) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ClusterRoleBinding.Size()))
+ n4, err := m.ClusterRoleBinding.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ return i, nil
+}
+
+func (m *ClusterRoleBindingList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ClusterRoleBindingList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n5, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ClusterRoleList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ClusterRoleList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n6, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PolicyRule) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PolicyRule) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Verbs) > 0 {
+ for _, s := range m.Verbs {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.APIGroups) > 0 {
+ for _, s := range m.APIGroups {
+ dAtA[i] = 0x12
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Resources) > 0 {
+ for _, s := range m.Resources {
+ dAtA[i] = 0x1a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.ResourceNames) > 0 {
+ for _, s := range m.ResourceNames {
+ dAtA[i] = 0x22
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.NonResourceURLs) > 0 {
+ for _, s := range m.NonResourceURLs {
+ dAtA[i] = 0x2a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *PolicyRuleBuilder) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PolicyRuleBuilder) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PolicyRule.Size()))
+ n7, err := m.PolicyRule.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ return i, nil
+}
+
+func (m *Role) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Role) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n8, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n8
+ if len(m.Rules) > 0 {
+ for _, msg := range m.Rules {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *RoleBinding) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RoleBinding) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n9, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n9
+ if len(m.Subjects) > 0 {
+ for _, msg := range m.Subjects {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RoleRef.Size()))
+ n10, err := m.RoleRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n10
+ return i, nil
+}
+
+func (m *RoleBindingList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RoleBindingList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n11, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n11
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *RoleList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RoleList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n12, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n12
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *RoleRef) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RoleRef) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup)))
+ i += copy(dAtA[i:], m.APIGroup)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
+ i += copy(dAtA[i:], m.Kind)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ return i, nil
+}
+
+func (m *Subject) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Subject) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
+ i += copy(dAtA[i:], m.Kind)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup)))
+ i += copy(dAtA[i:], m.APIGroup)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
+ i += copy(dAtA[i:], m.Namespace)
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *ClusterRole) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Rules) > 0 {
+ for _, e := range m.Rules {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ClusterRoleBinding) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Subjects) > 0 {
+ for _, e := range m.Subjects {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = m.RoleRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ClusterRoleBindingBuilder) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ClusterRoleBinding.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ClusterRoleBindingList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ClusterRoleList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PolicyRule) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Verbs) > 0 {
+ for _, s := range m.Verbs {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.APIGroups) > 0 {
+ for _, s := range m.APIGroups {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Resources) > 0 {
+ for _, s := range m.Resources {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.ResourceNames) > 0 {
+ for _, s := range m.ResourceNames {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.NonResourceURLs) > 0 {
+ for _, s := range m.NonResourceURLs {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PolicyRuleBuilder) Size() (n int) {
+ var l int
+ _ = l
+ l = m.PolicyRule.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Role) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Rules) > 0 {
+ for _, e := range m.Rules {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *RoleBinding) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Subjects) > 0 {
+ for _, e := range m.Subjects {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = m.RoleRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *RoleBindingList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *RoleList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *RoleRef) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.APIGroup)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Kind)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Subject) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Kind)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.APIGroup)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Namespace)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *ClusterRole) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ClusterRole{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ClusterRoleBinding) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ClusterRoleBinding{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Subjects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subjects), "Subject", "Subject", 1), `&`, ``, 1) + `,`,
+ `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ClusterRoleBindingBuilder) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ClusterRoleBindingBuilder{`,
+ `ClusterRoleBinding:` + strings.Replace(strings.Replace(this.ClusterRoleBinding.String(), "ClusterRoleBinding", "ClusterRoleBinding", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ClusterRoleBindingList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ClusterRoleBindingList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ClusterRoleBinding", "ClusterRoleBinding", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ClusterRoleList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ClusterRoleList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ClusterRole", "ClusterRole", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PolicyRule) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PolicyRule{`,
+ `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`,
+ `APIGroups:` + fmt.Sprintf("%v", this.APIGroups) + `,`,
+ `Resources:` + fmt.Sprintf("%v", this.Resources) + `,`,
+ `ResourceNames:` + fmt.Sprintf("%v", this.ResourceNames) + `,`,
+ `NonResourceURLs:` + fmt.Sprintf("%v", this.NonResourceURLs) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PolicyRuleBuilder) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PolicyRuleBuilder{`,
+ `PolicyRule:` + strings.Replace(strings.Replace(this.PolicyRule.String(), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Role) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Role{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RoleBinding) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RoleBinding{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Subjects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subjects), "Subject", "Subject", 1), `&`, ``, 1) + `,`,
+ `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RoleBindingList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RoleBindingList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "RoleBinding", "RoleBinding", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RoleList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RoleList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Role", "Role", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RoleRef) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RoleRef{`,
+ `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`,
+ `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Subject) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Subject{`,
+ `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
+ `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *ClusterRole) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ClusterRole: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ClusterRole: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Rules = append(m.Rules, PolicyRule{})
+ if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ClusterRoleBinding) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ClusterRoleBinding: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ClusterRoleBinding: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Subjects = append(m.Subjects, Subject{})
+ if err := m.Subjects[len(m.Subjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.RoleRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ClusterRoleBindingBuilder) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ClusterRoleBindingBuilder: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ClusterRoleBindingBuilder: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ClusterRoleBinding", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ClusterRoleBinding.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ClusterRoleBindingList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ClusterRoleBindingList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ClusterRoleBindingList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ClusterRoleBinding{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ClusterRoleList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ClusterRoleList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ClusterRoleList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ClusterRole{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PolicyRule) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PolicyRule: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PolicyRule: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Verbs = append(m.Verbs, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIGroups", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIGroups = append(m.APIGroups, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Resources = append(m.Resources, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceNames", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ResourceNames = append(m.ResourceNames, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NonResourceURLs", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.NonResourceURLs = append(m.NonResourceURLs, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PolicyRuleBuilder) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PolicyRuleBuilder: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PolicyRuleBuilder: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PolicyRule", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.PolicyRule.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Role) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Role: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Role: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Rules = append(m.Rules, PolicyRule{})
+ if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RoleBinding) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RoleBinding: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RoleBinding: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Subjects = append(m.Subjects, Subject{})
+ if err := m.Subjects[len(m.Subjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.RoleRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RoleBindingList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RoleBindingList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RoleBindingList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, RoleBinding{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RoleList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RoleList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RoleList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, Role{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RoleRef) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RoleRef: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RoleRef: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIGroup", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIGroup = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Kind = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Subject) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Subject: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Subject: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Kind = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIGroup", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIGroup = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Namespace = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/client-go/pkg/apis/rbac/v1beta1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 806 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x54, 0x3d, 0x6f, 0xc3, 0x44,
+ 0x18, 0xce, 0xe5, 0x43, 0x89, 0x2f, 0x44, 0xa1, 0x87, 0x84, 0x4c, 0x06, 0x27, 0xf2, 0x42, 0x25,
+ 0xa8, 0xdd, 0x2f, 0x51, 0x24, 0xc4, 0x80, 0x19, 0x50, 0x45, 0x29, 0xd5, 0x21, 0x10, 0x5f, 0x42,
+ 0x75, 0x9c, 0xab, 0x7b, 0xc4, 0x5f, 0xf2, 0x9d, 0x23, 0x55, 0x30, 0xb0, 0xb1, 0xf2, 0x27, 0xd8,
+ 0xba, 0xb1, 0x32, 0x31, 0x15, 0xa6, 0x8e, 0x9d, 0x22, 0x6a, 0x7e, 0x08, 0xc8, 0xf6, 0xf9, 0x23,
+ 0x4d, 0x4a, 0x43, 0x91, 0x22, 0x21, 0x31, 0xb5, 0xf7, 0xbe, 0xcf, 0xf3, 0xdc, 0xfb, 0xdc, 0xeb,
+ 0x3c, 0xf0, 0x68, 0xfa, 0x26, 0xd3, 0xa8, 0xaf, 0x4f, 0xa3, 0x31, 0x09, 0x3d, 0xc2, 0x09, 0xd3,
+ 0x83, 0xa9, 0xad, 0x9b, 0x01, 0x65, 0x7a, 0x38, 0x36, 0x2d, 0x7d, 0xb6, 0x37, 0x26, 0xdc, 0xdc,
+ 0xd3, 0x6d, 0xe2, 0x91, 0xd0, 0xe4, 0x64, 0xa2, 0x05, 0xa1, 0xcf, 0x7d, 0xf4, 0x6a, 0x46, 0xd4,
+ 0x4a, 0xa2, 0x16, 0x4c, 0x6d, 0x2d, 0x21, 0x6a, 0x09, 0x51, 0x13, 0xc4, 0xc1, 0x8e, 0x4d, 0xf9,
+ 0x65, 0x34, 0xd6, 0x2c, 0xdf, 0xd5, 0x6d, 0xdf, 0xf6, 0xf5, 0x94, 0x3f, 0x8e, 0x2e, 0xd2, 0x53,
+ 0x7a, 0x48, 0xff, 0xcb, 0x74, 0x07, 0x87, 0x62, 0x20, 0x33, 0xa0, 0xae, 0x69, 0x5d, 0x52, 0x8f,
+ 0x84, 0x57, 0xe5, 0x48, 0x2e, 0xe1, 0xa6, 0x3e, 0x5b, 0x9a, 0x66, 0xa0, 0x3f, 0xc6, 0x0a, 0x23,
+ 0x8f, 0x53, 0x97, 0x2c, 0x11, 0xde, 0x78, 0x8a, 0xc0, 0xac, 0x4b, 0xe2, 0x9a, 0x4b, 0xbc, 0x83,
+ 0xc7, 0x78, 0x11, 0xa7, 0x8e, 0x4e, 0x3d, 0xce, 0x78, 0xf8, 0x90, 0xa4, 0xfe, 0x0a, 0x60, 0xf7,
+ 0x5d, 0x27, 0x62, 0x9c, 0x84, 0xd8, 0x77, 0x08, 0x3a, 0x87, 0x9d, 0xc4, 0xc8, 0xc4, 0xe4, 0xa6,
+ 0x0c, 0x46, 0x60, 0xbb, 0xbb, 0xbf, 0xab, 0x89, 0xe7, 0xac, 0xea, 0x96, 0x0f, 0x9a, 0xa0, 0xb5,
+ 0xd9, 0x9e, 0xf6, 0xe1, 0xf8, 0x6b, 0x62, 0xf1, 0x0f, 0x08, 0x37, 0x0d, 0x74, 0x33, 0x1f, 0xd6,
+ 0xe2, 0xf9, 0x10, 0x96, 0x35, 0x5c, 0xa8, 0xa2, 0x4f, 0x61, 0x2b, 0x8c, 0x1c, 0xc2, 0xe4, 0xfa,
+ 0xa8, 0xb1, 0xdd, 0xdd, 0x3f, 0xd0, 0xd6, 0xdc, 0x96, 0x76, 0xe6, 0x3b, 0xd4, 0xba, 0xc2, 0x91,
+ 0x43, 0x8c, 0x9e, 0xb8, 0xa1, 0x95, 0x9c, 0x18, 0xce, 0x04, 0xd5, 0x9f, 0xea, 0x10, 0x55, 0xbc,
+ 0x18, 0xd4, 0x9b, 0x50, 0xcf, 0xde, 0x80, 0xa5, 0xaf, 0x60, 0x87, 0x45, 0x69, 0x23, 0x77, 0xb5,
+ 0xbb, 0xb6, 0xab, 0x8f, 0x32, 0xa2, 0xf1, 0xa2, 0xb8, 0xa1, 0x23, 0x0a, 0x0c, 0x17, 0x9a, 0xe8,
+ 0x0b, 0xd8, 0x0e, 0x7d, 0x87, 0x60, 0x72, 0x21, 0x37, 0x16, 0x0d, 0x3c, 0x29, 0x8f, 0x33, 0x9e,
+ 0xd1, 0x17, 0xf2, 0x6d, 0x51, 0xc0, 0xb9, 0xa2, 0xfa, 0x23, 0x80, 0xaf, 0x2c, 0xbf, 0x9a, 0x11,
+ 0x51, 0x67, 0x42, 0x42, 0xf4, 0x3d, 0x80, 0xc8, 0x5a, 0xea, 0x8a, 0x77, 0x7c, 0x6b, 0xed, 0x31,
+ 0x56, 0x5c, 0x30, 0x10, 0x13, 0xad, 0x58, 0x19, 0x5e, 0x71, 0xa5, 0x7a, 0x07, 0xe0, 0xcb, 0xcb,
+ 0xd0, 0x13, 0xca, 0x38, 0xfa, 0x72, 0x69, 0xc3, 0xda, 0x7a, 0x1b, 0x4e, 0xd8, 0xe9, 0x7e, 0x8b,
+ 0xd7, 0xcf, 0x2b, 0x95, 0xed, 0x9e, 0xc3, 0x16, 0xe5, 0xc4, 0xcd, 0x57, 0xfb, 0xaf, 0x4c, 0x17,
+ 0x1f, 0xee, 0x71, 0xa2, 0x88, 0x33, 0x61, 0xf5, 0x37, 0x00, 0xfb, 0x15, 0xf0, 0x06, 0x3c, 0x7d,
+ 0xb6, 0xe8, 0xe9, 0xf0, 0x59, 0x9e, 0x56, 0x9b, 0xf9, 0x13, 0x40, 0x58, 0xfe, 0x54, 0xd1, 0x10,
+ 0xb6, 0x66, 0x24, 0x1c, 0x33, 0x19, 0x8c, 0x1a, 0xdb, 0x92, 0x21, 0x25, 0xf8, 0x4f, 0x92, 0x02,
+ 0xce, 0xea, 0xe8, 0x35, 0x28, 0x99, 0x01, 0x7d, 0x2f, 0xf4, 0xa3, 0x20, 0x1b, 0x47, 0x32, 0x7a,
+ 0xf1, 0x7c, 0x28, 0xbd, 0x73, 0x76, 0x9c, 0x15, 0x71, 0xd9, 0x4f, 0xc0, 0x21, 0x61, 0x7e, 0x14,
+ 0x5a, 0x84, 0xc9, 0x8d, 0x12, 0x8c, 0xf3, 0x22, 0x2e, 0xfb, 0xe8, 0x08, 0xf6, 0xf2, 0xc3, 0xa9,
+ 0xe9, 0x12, 0x26, 0x37, 0x53, 0xc2, 0x56, 0x3c, 0x1f, 0xf6, 0x70, 0xb5, 0x81, 0x17, 0x71, 0xe8,
+ 0x6d, 0xd8, 0xf7, 0x7c, 0x2f, 0x87, 0x7c, 0x8c, 0x4f, 0x98, 0xdc, 0x4a, 0xa9, 0x2f, 0xc5, 0xf3,
+ 0x61, 0xff, 0x74, 0xb1, 0x85, 0x1f, 0x62, 0xd5, 0x6f, 0xe1, 0x56, 0x25, 0xab, 0xc4, 0x0f, 0xc9,
+ 0x86, 0x30, 0x28, 0x8a, 0x62, 0xa3, 0xcf, 0xca, 0xbe, 0x22, 0x8a, 0xca, 0x1a, 0xae, 0x48, 0xab,
+ 0xbf, 0x00, 0xd8, 0xfc, 0xcf, 0x47, 0xf9, 0x75, 0x1d, 0x76, 0xff, 0xcf, 0xf0, 0xb5, 0x33, 0x3c,
+ 0x09, 0x90, 0xcd, 0x86, 0xe2, 0xb3, 0x03, 0xe4, 0xe9, 0x34, 0xfc, 0x19, 0xc0, 0xce, 0x86, 0x62,
+ 0x10, 0x2f, 0xba, 0xd8, 0xf9, 0x67, 0x2e, 0x56, 0x8f, 0xff, 0x0d, 0xcc, 0xf7, 0x83, 0x5e, 0x87,
+ 0x9d, 0x3c, 0xba, 0xd2, 0xe1, 0xa5, 0x72, 0x98, 0x3c, 0xdd, 0x70, 0x81, 0x40, 0x23, 0xd8, 0x9c,
+ 0x52, 0x6f, 0x22, 0xd7, 0x53, 0xe4, 0x0b, 0x02, 0xd9, 0x7c, 0x9f, 0x7a, 0x13, 0x9c, 0x76, 0x12,
+ 0x84, 0x67, 0xba, 0x24, 0xfd, 0x80, 0x2a, 0x88, 0x24, 0xb4, 0x70, 0xda, 0x51, 0xaf, 0x01, 0x6c,
+ 0x8b, 0x8f, 0xaf, 0xd0, 0x03, 0x8f, 0xea, 0x55, 0xe7, 0xab, 0xaf, 0x33, 0xdf, 0xdf, 0xdf, 0x8e,
+ 0x74, 0x28, 0x25, 0x7f, 0x59, 0x60, 0x5a, 0x44, 0x6e, 0xa6, 0xb0, 0x2d, 0x01, 0x93, 0x4e, 0xf3,
+ 0x06, 0x2e, 0x31, 0xc6, 0xce, 0xcd, 0xbd, 0x52, 0xbb, 0xbd, 0x57, 0x6a, 0x77, 0xf7, 0x4a, 0xed,
+ 0xbb, 0x58, 0x01, 0x37, 0xb1, 0x02, 0x6e, 0x63, 0x05, 0xdc, 0xc5, 0x0a, 0xf8, 0x3d, 0x56, 0xc0,
+ 0x0f, 0x7f, 0x28, 0xb5, 0xcf, 0xdb, 0xe2, 0xd5, 0xff, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x6d, 0x2c,
+ 0xb9, 0x90, 0x12, 0x0c, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/generated.proto
new file mode 100644
index 000000000..d4a6ebcf6
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/generated.proto
@@ -0,0 +1,198 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.client_go.pkg.apis.rbac.v1beta1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1beta1";
+
+// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
+message ClusterRole {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Rules holds all the PolicyRules for this ClusterRole
+ repeated PolicyRule rules = 2;
+}
+
+// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace,
+// and adds who information via Subject.
+message ClusterRoleBinding {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Subjects holds references to the objects the role applies to.
+ repeated Subject subjects = 2;
+
+ // RoleRef can only reference a ClusterRole in the global namespace.
+ // If the RoleRef cannot be resolved, the Authorizer must return an error.
+ optional RoleRef roleRef = 3;
+}
+
+// +k8s:deepcopy-gen=false
+// ClusterRoleBindingBuilder let's us attach methods. A no-no for API types.
+// We use it to construct bindings in code. It's more compact than trying to write them
+// out in a literal.
+message ClusterRoleBindingBuilder {
+ optional ClusterRoleBinding clusterRoleBinding = 1;
+}
+
+// ClusterRoleBindingList is a collection of ClusterRoleBindings
+message ClusterRoleBindingList {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of ClusterRoleBindings
+ repeated ClusterRoleBinding items = 2;
+}
+
+// ClusterRoleList is a collection of ClusterRoles
+message ClusterRoleList {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of ClusterRoles
+ repeated ClusterRole items = 2;
+}
+
+// PolicyRule holds information that describes a policy rule, but does not contain information
+// about who the rule applies to or which namespace the rule applies to.
+message PolicyRule {
+ // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.
+ repeated string verbs = 1;
+
+ // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of
+ // the enumerated resources in any API group will be allowed.
+ // +optional
+ repeated string apiGroups = 2;
+
+ // Resources is a list of resources this rule applies to. ResourceAll represents all resources.
+ // +optional
+ repeated string resources = 3;
+
+ // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
+ // +optional
+ repeated string resourceNames = 4;
+
+ // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path
+ // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.
+ // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.
+ // +optional
+ repeated string nonResourceURLs = 5;
+}
+
+// +k8s:deepcopy-gen=false
+// PolicyRuleBuilder let's us attach methods. A no-no for API types.
+// We use it to construct rules in code. It's more compact than trying to write them
+// out in a literal and allows us to perform some basic checking during construction
+message PolicyRuleBuilder {
+ optional PolicyRule policyRule = 1;
+}
+
+// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
+message Role {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Rules holds all the PolicyRules for this Role
+ repeated PolicyRule rules = 2;
+}
+
+// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace.
+// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given
+// namespace only have effect in that namespace.
+message RoleBinding {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Subjects holds references to the objects the role applies to.
+ repeated Subject subjects = 2;
+
+ // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
+ // If the RoleRef cannot be resolved, the Authorizer must return an error.
+ optional RoleRef roleRef = 3;
+}
+
+// RoleBindingList is a collection of RoleBindings
+message RoleBindingList {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of RoleBindings
+ repeated RoleBinding items = 2;
+}
+
+// RoleList is a collection of Roles
+message RoleList {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of Roles
+ repeated Role items = 2;
+}
+
+// RoleRef contains information that points to the role being used
+message RoleRef {
+ // APIGroup is the group for the resource being referenced
+ optional string apiGroup = 1;
+
+ // Kind is the type of resource being referenced
+ optional string kind = 2;
+
+ // Name is the name of resource being referenced
+ optional string name = 3;
+}
+
+// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference,
+// or a value for non-objects such as user and group names.
+message Subject {
+ // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
+ // If the Authorizer does not recognized the kind value, the Authorizer should report an error.
+ optional string kind = 1;
+
+ // APIGroup holds the API group of the referenced subject.
+ // Defaults to "" for ServiceAccount subjects.
+ // Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
+ // +optional
+ optional string apiGroup = 2;
+
+ // Name of the object being referenced.
+ optional string name = 3;
+
+ // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty
+ // the Authorizer should report an error.
+ // +optional
+ optional string namespace = 4;
+}
+
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/helpers.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/helpers.go
new file mode 100644
index 000000000..063b9ed3f
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/helpers.go
@@ -0,0 +1,146 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "fmt"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// PolicyRuleBuilder let's us attach methods. A no-no for API types.
+// We use it to construct rules in code. It's more compact than trying to write them
+// out in a literal and allows us to perform some basic checking during construction
+type PolicyRuleBuilder struct {
+ PolicyRule PolicyRule `protobuf:"bytes,1,opt,name=policyRule"`
+}
+
+func NewRule(verbs ...string) *PolicyRuleBuilder {
+ return &PolicyRuleBuilder{
+ PolicyRule: PolicyRule{Verbs: verbs},
+ }
+}
+
+func (r *PolicyRuleBuilder) Groups(groups ...string) *PolicyRuleBuilder {
+ r.PolicyRule.APIGroups = append(r.PolicyRule.APIGroups, groups...)
+ return r
+}
+
+func (r *PolicyRuleBuilder) Resources(resources ...string) *PolicyRuleBuilder {
+ r.PolicyRule.Resources = append(r.PolicyRule.Resources, resources...)
+ return r
+}
+
+func (r *PolicyRuleBuilder) Names(names ...string) *PolicyRuleBuilder {
+ r.PolicyRule.ResourceNames = append(r.PolicyRule.ResourceNames, names...)
+ return r
+}
+
+func (r *PolicyRuleBuilder) URLs(urls ...string) *PolicyRuleBuilder {
+ r.PolicyRule.NonResourceURLs = append(r.PolicyRule.NonResourceURLs, urls...)
+ return r
+}
+
+func (r *PolicyRuleBuilder) RuleOrDie() PolicyRule {
+ ret, err := r.Rule()
+ if err != nil {
+ panic(err)
+ }
+ return ret
+}
+
+func (r *PolicyRuleBuilder) Rule() (PolicyRule, error) {
+ if len(r.PolicyRule.Verbs) == 0 {
+ return PolicyRule{}, fmt.Errorf("verbs are required: %#v", r.PolicyRule)
+ }
+
+ switch {
+ case len(r.PolicyRule.NonResourceURLs) > 0:
+ if len(r.PolicyRule.APIGroups) != 0 || len(r.PolicyRule.Resources) != 0 || len(r.PolicyRule.ResourceNames) != 0 {
+ return PolicyRule{}, fmt.Errorf("non-resource rule may not have apiGroups, resources, or resourceNames: %#v", r.PolicyRule)
+ }
+ case len(r.PolicyRule.Resources) > 0:
+ if len(r.PolicyRule.NonResourceURLs) != 0 {
+ return PolicyRule{}, fmt.Errorf("resource rule may not have nonResourceURLs: %#v", r.PolicyRule)
+ }
+ if len(r.PolicyRule.APIGroups) == 0 {
+ // this a common bug
+ return PolicyRule{}, fmt.Errorf("resource rule must have apiGroups: %#v", r.PolicyRule)
+ }
+ default:
+ return PolicyRule{}, fmt.Errorf("a rule must have either nonResourceURLs or resources: %#v", r.PolicyRule)
+ }
+
+ return r.PolicyRule, nil
+}
+
+// ClusterRoleBindingBuilder let's us attach methods. A no-no for API types.
+// We use it to construct bindings in code. It's more compact than trying to write them
+// out in a literal.
+type ClusterRoleBindingBuilder struct {
+ ClusterRoleBinding ClusterRoleBinding `protobuf:"bytes,1,opt,name=clusterRoleBinding"`
+}
+
+func NewClusterBinding(clusterRoleName string) *ClusterRoleBindingBuilder {
+ return &ClusterRoleBindingBuilder{
+ ClusterRoleBinding: ClusterRoleBinding{
+ ObjectMeta: metav1.ObjectMeta{Name: clusterRoleName},
+ RoleRef: RoleRef{
+ APIGroup: GroupName,
+ Kind: "ClusterRole",
+ Name: clusterRoleName,
+ },
+ },
+ }
+}
+
+func (r *ClusterRoleBindingBuilder) Groups(groups ...string) *ClusterRoleBindingBuilder {
+ for _, group := range groups {
+ r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: GroupKind, Name: group})
+ }
+ return r
+}
+
+func (r *ClusterRoleBindingBuilder) Users(users ...string) *ClusterRoleBindingBuilder {
+ for _, user := range users {
+ r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: UserKind, Name: user})
+ }
+ return r
+}
+
+func (r *ClusterRoleBindingBuilder) SAs(namespace string, serviceAccountNames ...string) *ClusterRoleBindingBuilder {
+ for _, saName := range serviceAccountNames {
+ r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: ServiceAccountKind, Namespace: namespace, Name: saName})
+ }
+ return r
+}
+
+func (r *ClusterRoleBindingBuilder) BindingOrDie() ClusterRoleBinding {
+ ret, err := r.Binding()
+ if err != nil {
+ panic(err)
+ }
+ return ret
+}
+
+func (r *ClusterRoleBindingBuilder) Binding() (ClusterRoleBinding, error) {
+ if len(r.ClusterRoleBinding.Subjects) == 0 {
+ return ClusterRoleBinding{}, fmt.Errorf("subjects are required: %#v", r.ClusterRoleBinding)
+ }
+
+ return r.ClusterRoleBinding, nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/register.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/register.go
new file mode 100644
index 000000000..aa64c0c6f
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/register.go
@@ -0,0 +1,65 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+const GroupName = "rbac.authorization.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Role{},
+ &RoleBinding{},
+ &RoleBindingList{},
+ &RoleList{},
+
+ &ClusterRole{},
+ &ClusterRoleBinding{},
+ &ClusterRoleBindingList{},
+ &ClusterRoleList{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/types.generated.go
new file mode 100644
index 000000000..bcb865cf8
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/types.generated.go
@@ -0,0 +1,4879 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1beta1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ pkg2_types "k8s.io/apimachinery/pkg/types"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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 pkg1_v1.TypeMeta
+ var v1 pkg2_types.UID
+ var v2 time.Time
+ _, _, _ = v0, v1, v2
+ }
+}
+
+func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = len(x.APIGroups) != 0
+ yyq2[2] = len(x.Resources) != 0
+ yyq2[3] = len(x.ResourceNames) != 0
+ yyq2[4] = len(x.NonResourceURLs) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Verbs == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Verbs, false, e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("verbs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Verbs == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Verbs, false, e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.APIGroups == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.APIGroups, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiGroups"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.APIGroups == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.APIGroups, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Resources == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Resources, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resources"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Resources == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Resources, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.ResourceNames == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.ResourceNames, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resourceNames"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ResourceNames == nil {
+ r.EncodeNil()
+ } else {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.ResourceNames, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.NonResourceURLs == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.NonResourceURLs, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nonResourceURLs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NonResourceURLs == nil {
+ r.EncodeNil()
+ } else {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.NonResourceURLs, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PolicyRule) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PolicyRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "verbs":
+ if r.TryDecodeAsNil() {
+ x.Verbs = nil
+ } else {
+ yyv4 := &x.Verbs
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv4, false, d)
+ }
+ }
+ case "apiGroups":
+ if r.TryDecodeAsNil() {
+ x.APIGroups = nil
+ } else {
+ yyv6 := &x.APIGroups
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv6, false, d)
+ }
+ }
+ case "resources":
+ if r.TryDecodeAsNil() {
+ x.Resources = nil
+ } else {
+ yyv8 := &x.Resources
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv8, false, d)
+ }
+ }
+ case "resourceNames":
+ if r.TryDecodeAsNil() {
+ x.ResourceNames = nil
+ } else {
+ yyv10 := &x.ResourceNames
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv10, false, d)
+ }
+ }
+ case "nonResourceURLs":
+ if r.TryDecodeAsNil() {
+ x.NonResourceURLs = nil
+ } else {
+ yyv12 := &x.NonResourceURLs
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv12, false, d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PolicyRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Verbs = nil
+ } else {
+ yyv15 := &x.Verbs
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv15, false, d)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIGroups = nil
+ } else {
+ yyv17 := &x.APIGroups
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv17, false, d)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Resources = nil
+ } else {
+ yyv19 := &x.Resources
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv19, false, d)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ResourceNames = nil
+ } else {
+ yyv21 := &x.ResourceNames
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv21, false, d)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NonResourceURLs = nil
+ } else {
+ yyv23 := &x.NonResourceURLs
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv23, false, d)
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Subject) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.APIGroup != ""
+ yyq2[3] = x.Namespace != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIGroup))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiGroup"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIGroup))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("namespace"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Subject) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Subject) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "apiGroup":
+ if r.TryDecodeAsNil() {
+ x.APIGroup = ""
+ } else {
+ yyv6 := &x.APIGroup
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv8 := &x.Name
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "namespace":
+ if r.TryDecodeAsNil() {
+ x.Namespace = ""
+ } else {
+ yyv10 := &x.Namespace
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Subject) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIGroup = ""
+ } else {
+ yyv15 := &x.APIGroup
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv17 := &x.Name
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Namespace = ""
+ } else {
+ yyv19 := &x.Namespace
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *RoleRef) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIGroup))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiGroup"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIGroup))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RoleRef) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RoleRef) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "apiGroup":
+ if r.TryDecodeAsNil() {
+ x.APIGroup = ""
+ } else {
+ yyv4 := &x.APIGroup
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv6 := &x.Kind
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv8 := &x.Name
+ 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_containerMapEnd1234)
+}
+
+func (x *RoleRef) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIGroup = ""
+ } else {
+ yyv11 := &x.APIGroup
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv13 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv15 := &x.Name
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Role) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rules"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Role) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Role) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "rules":
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv10 := &x.Rules
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSlicePolicyRule((*[]PolicyRule)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Role) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv19 := &x.Rules
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSlicePolicyRule((*[]PolicyRule)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *RoleBinding) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Subjects == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceSubject(([]Subject)(x.Subjects), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("subjects"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Subjects == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceSubject(([]Subject)(x.Subjects), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy18 := &x.RoleRef
+ yy18.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("roleRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy20 := &x.RoleRef
+ yy20.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RoleBinding) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RoleBinding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "subjects":
+ if r.TryDecodeAsNil() {
+ x.Subjects = nil
+ } else {
+ yyv10 := &x.Subjects
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSliceSubject((*[]Subject)(yyv10), d)
+ }
+ }
+ case "roleRef":
+ if r.TryDecodeAsNil() {
+ x.RoleRef = RoleRef{}
+ } else {
+ yyv12 := &x.RoleRef
+ yyv12.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv14 := &x.Kind
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv16 := &x.APIVersion
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg1_v1.ObjectMeta{}
+ } else {
+ yyv18 := &x.ObjectMeta
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv18) {
+ } else {
+ z.DecFallback(yyv18, false)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Subjects = nil
+ } else {
+ yyv20 := &x.Subjects
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ h.decSliceSubject((*[]Subject)(yyv20), d)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RoleRef = RoleRef{}
+ } else {
+ yyv22 := &x.RoleRef
+ yyv22.CodecDecodeSelf(d)
+ }
+ for {
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj13-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *RoleBindingList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceRoleBinding(([]RoleBinding)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceRoleBinding(([]RoleBinding)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RoleBindingList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RoleBindingList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceRoleBinding((*[]RoleBinding)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RoleBindingList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceRoleBinding((*[]RoleBinding)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *RoleList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceRole(([]Role)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceRole(([]Role)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RoleList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RoleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceRole((*[]Role)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RoleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceRole((*[]Role)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ClusterRole) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rules"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ClusterRole) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ClusterRole) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "rules":
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv10 := &x.Rules
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSlicePolicyRule((*[]PolicyRule)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ClusterRole) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv19 := &x.Rules
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSlicePolicyRule((*[]PolicyRule)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ClusterRoleBinding) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Subjects == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceSubject(([]Subject)(x.Subjects), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("subjects"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Subjects == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceSubject(([]Subject)(x.Subjects), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy18 := &x.RoleRef
+ yy18.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("roleRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy20 := &x.RoleRef
+ yy20.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ClusterRoleBinding) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ClusterRoleBinding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "subjects":
+ if r.TryDecodeAsNil() {
+ x.Subjects = nil
+ } else {
+ yyv10 := &x.Subjects
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSliceSubject((*[]Subject)(yyv10), d)
+ }
+ }
+ case "roleRef":
+ if r.TryDecodeAsNil() {
+ x.RoleRef = RoleRef{}
+ } else {
+ yyv12 := &x.RoleRef
+ yyv12.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ClusterRoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv14 := &x.Kind
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv16 := &x.APIVersion
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg1_v1.ObjectMeta{}
+ } else {
+ yyv18 := &x.ObjectMeta
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv18) {
+ } else {
+ z.DecFallback(yyv18, false)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Subjects = nil
+ } else {
+ yyv20 := &x.Subjects
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ h.decSliceSubject((*[]Subject)(yyv20), d)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RoleRef = RoleRef{}
+ } else {
+ yyv22 := &x.RoleRef
+ yyv22.CodecDecodeSelf(d)
+ }
+ for {
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj13-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ClusterRoleBindingList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceClusterRoleBinding(([]ClusterRoleBinding)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceClusterRoleBinding(([]ClusterRoleBinding)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ClusterRoleBindingList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ClusterRoleBindingList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceClusterRoleBinding((*[]ClusterRoleBinding)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ClusterRoleBindingList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceClusterRoleBinding((*[]ClusterRoleBinding)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ClusterRoleList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceClusterRole(([]ClusterRole)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceClusterRole(([]ClusterRole)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ClusterRoleList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ClusterRoleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceClusterRole((*[]ClusterRole)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ClusterRoleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceClusterRole((*[]ClusterRole)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encSlicePolicyRule(v []PolicyRule, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicePolicyRule(v *[]PolicyRule, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []PolicyRule{}
+ 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, 120)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]PolicyRule, yyrl1)
+ }
+ } else {
+ yyv1 = make([]PolicyRule, 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] = PolicyRule{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, PolicyRule{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PolicyRule{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, PolicyRule{}) // var yyz1 PolicyRule
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PolicyRule{}
+ } 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 = []PolicyRule{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceSubject(v []Subject, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceSubject(v *[]Subject, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Subject{}
+ 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, 64)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Subject, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Subject, 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] = Subject{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Subject{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Subject{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Subject{}) // var yyz1 Subject
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Subject{}
+ } 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 = []Subject{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceRoleBinding(v []RoleBinding, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceRoleBinding(v *[]RoleBinding, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []RoleBinding{}
+ 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, 336)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]RoleBinding, yyrl1)
+ }
+ } else {
+ yyv1 = make([]RoleBinding, 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] = RoleBinding{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, RoleBinding{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = RoleBinding{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, RoleBinding{}) // var yyz1 RoleBinding
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = RoleBinding{}
+ } 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 = []RoleBinding{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceRole(v []Role, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceRole(v *[]Role, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Role{}
+ 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, 288)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Role, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Role, 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] = Role{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Role{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Role{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Role{}) // var yyz1 Role
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Role{}
+ } 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 = []Role{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceClusterRoleBinding(v []ClusterRoleBinding, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceClusterRoleBinding(v *[]ClusterRoleBinding, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ClusterRoleBinding{}
+ 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, 336)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ClusterRoleBinding, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ClusterRoleBinding, 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] = ClusterRoleBinding{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ClusterRoleBinding{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ClusterRoleBinding{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ClusterRoleBinding{}) // var yyz1 ClusterRoleBinding
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ClusterRoleBinding{}
+ } 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 = []ClusterRoleBinding{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceClusterRole(v []ClusterRole, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceClusterRole(v *[]ClusterRole, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ClusterRole{}
+ 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, 288)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ClusterRole, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ClusterRole, 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] = ClusterRole{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ClusterRole{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ClusterRole{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ClusterRole{}) // var yyz1 ClusterRole
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ClusterRole{}
+ } 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 = []ClusterRole{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/types.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/types.go
new file mode 100644
index 000000000..89a47db9e
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/types.go
@@ -0,0 +1,207 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// Authorization is calculated against
+// 1. evaluation of ClusterRoleBindings - short circuit on match
+// 2. evaluation of RoleBindings in the namespace requested - short circuit on match
+// 3. deny by default
+
+const (
+ APIGroupAll = "*"
+ ResourceAll = "*"
+ VerbAll = "*"
+ NonResourceAll = "*"
+
+ GroupKind = "Group"
+ ServiceAccountKind = "ServiceAccount"
+ UserKind = "User"
+
+ // AutoUpdateAnnotationKey is the name of an annotation which prevents reconciliation if set to "false"
+ AutoUpdateAnnotationKey = "rbac.authorization.kubernetes.io/autoupdate"
+)
+
+// Authorization is calculated against
+// 1. evaluation of ClusterRoleBindings - short circuit on match
+// 2. evaluation of RoleBindings in the namespace requested - short circuit on match
+// 3. deny by default
+
+// PolicyRule holds information that describes a policy rule, but does not contain information
+// about who the rule applies to or which namespace the rule applies to.
+type PolicyRule struct {
+ // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.
+ Verbs []string `json:"verbs" protobuf:"bytes,1,rep,name=verbs"`
+
+ // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of
+ // the enumerated resources in any API group will be allowed.
+ // +optional
+ APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,2,rep,name=apiGroups"`
+ // Resources is a list of resources this rule applies to. ResourceAll represents all resources.
+ // +optional
+ Resources []string `json:"resources,omitempty" protobuf:"bytes,3,rep,name=resources"`
+ // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
+ // +optional
+ ResourceNames []string `json:"resourceNames,omitempty" protobuf:"bytes,4,rep,name=resourceNames"`
+
+ // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path
+ // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.
+ // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.
+ // +optional
+ NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,5,rep,name=nonResourceURLs"`
+}
+
+// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference,
+// or a value for non-objects such as user and group names.
+type Subject struct {
+ // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
+ // If the Authorizer does not recognized the kind value, the Authorizer should report an error.
+ Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
+ // APIGroup holds the API group of the referenced subject.
+ // Defaults to "" for ServiceAccount subjects.
+ // Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
+ // +optional
+ APIGroup string `json:"apiGroup,omitempty" protobuf:"bytes,2,opt.name=apiGroup"`
+ // Name of the object being referenced.
+ Name string `json:"name" protobuf:"bytes,3,opt,name=name"`
+ // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty
+ // the Authorizer should report an error.
+ // +optional
+ Namespace string `json:"namespace,omitempty" protobuf:"bytes,4,opt,name=namespace"`
+}
+
+// RoleRef contains information that points to the role being used
+type RoleRef struct {
+ // APIGroup is the group for the resource being referenced
+ APIGroup string `json:"apiGroup" protobuf:"bytes,1,opt,name=apiGroup"`
+ // Kind is the type of resource being referenced
+ Kind string `json:"kind" protobuf:"bytes,2,opt,name=kind"`
+ // Name is the name of resource being referenced
+ Name string `json:"name" protobuf:"bytes,3,opt,name=name"`
+}
+
+// +genclient=true
+
+// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
+type Role struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Rules holds all the PolicyRules for this Role
+ Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"`
+}
+
+// +genclient=true
+
+// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace.
+// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given
+// namespace only have effect in that namespace.
+type RoleBinding struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Subjects holds references to the objects the role applies to.
+ Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"`
+
+ // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
+ // If the RoleRef cannot be resolved, the Authorizer must return an error.
+ RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
+}
+
+// RoleBindingList is a collection of RoleBindings
+type RoleBindingList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of RoleBindings
+ Items []RoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// RoleList is a collection of Roles
+type RoleList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of Roles
+ Items []Role `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// +genclient=true
+// +nonNamespaced=true
+
+// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
+type ClusterRole struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Rules holds all the PolicyRules for this ClusterRole
+ Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"`
+}
+
+// +genclient=true
+// +nonNamespaced=true
+
+// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace,
+// and adds who information via Subject.
+type ClusterRoleBinding struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Subjects holds references to the objects the role applies to.
+ Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"`
+
+ // RoleRef can only reference a ClusterRole in the global namespace.
+ // If the RoleRef cannot be resolved, the Authorizer must return an error.
+ RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
+}
+
+// ClusterRoleBindingList is a collection of ClusterRoleBindings
+type ClusterRoleBindingList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of ClusterRoleBindings
+ Items []ClusterRoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// ClusterRoleList is a collection of ClusterRoles
+type ClusterRoleList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of ClusterRoles
+ Items []ClusterRole `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..1463d8fea
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/types_swagger_doc_generated.go
@@ -0,0 +1,148 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_ClusterRole = map[string]string{
+ "": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.",
+ "metadata": "Standard object's metadata.",
+ "rules": "Rules holds all the PolicyRules for this ClusterRole",
+}
+
+func (ClusterRole) SwaggerDoc() map[string]string {
+ return map_ClusterRole
+}
+
+var map_ClusterRoleBinding = map[string]string{
+ "": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.",
+ "metadata": "Standard object's metadata.",
+ "subjects": "Subjects holds references to the objects the role applies to.",
+ "roleRef": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.",
+}
+
+func (ClusterRoleBinding) SwaggerDoc() map[string]string {
+ return map_ClusterRoleBinding
+}
+
+var map_ClusterRoleBindingList = map[string]string{
+ "": "ClusterRoleBindingList is a collection of ClusterRoleBindings",
+ "metadata": "Standard object's metadata.",
+ "items": "Items is a list of ClusterRoleBindings",
+}
+
+func (ClusterRoleBindingList) SwaggerDoc() map[string]string {
+ return map_ClusterRoleBindingList
+}
+
+var map_ClusterRoleList = map[string]string{
+ "": "ClusterRoleList is a collection of ClusterRoles",
+ "metadata": "Standard object's metadata.",
+ "items": "Items is a list of ClusterRoles",
+}
+
+func (ClusterRoleList) SwaggerDoc() map[string]string {
+ return map_ClusterRoleList
+}
+
+var map_PolicyRule = map[string]string{
+ "": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.",
+ "verbs": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.",
+ "apiGroups": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.",
+ "resources": "Resources is a list of resources this rule applies to. ResourceAll represents all resources.",
+ "resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.",
+ "nonResourceURLs": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.",
+}
+
+func (PolicyRule) SwaggerDoc() map[string]string {
+ return map_PolicyRule
+}
+
+var map_Role = map[string]string{
+ "": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.",
+ "metadata": "Standard object's metadata.",
+ "rules": "Rules holds all the PolicyRules for this Role",
+}
+
+func (Role) SwaggerDoc() map[string]string {
+ return map_Role
+}
+
+var map_RoleBinding = map[string]string{
+ "": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.",
+ "metadata": "Standard object's metadata.",
+ "subjects": "Subjects holds references to the objects the role applies to.",
+ "roleRef": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.",
+}
+
+func (RoleBinding) SwaggerDoc() map[string]string {
+ return map_RoleBinding
+}
+
+var map_RoleBindingList = map[string]string{
+ "": "RoleBindingList is a collection of RoleBindings",
+ "metadata": "Standard object's metadata.",
+ "items": "Items is a list of RoleBindings",
+}
+
+func (RoleBindingList) SwaggerDoc() map[string]string {
+ return map_RoleBindingList
+}
+
+var map_RoleList = map[string]string{
+ "": "RoleList is a collection of Roles",
+ "metadata": "Standard object's metadata.",
+ "items": "Items is a list of Roles",
+}
+
+func (RoleList) SwaggerDoc() map[string]string {
+ return map_RoleList
+}
+
+var map_RoleRef = map[string]string{
+ "": "RoleRef contains information that points to the role being used",
+ "apiGroup": "APIGroup is the group for the resource being referenced",
+ "kind": "Kind is the type of resource being referenced",
+ "name": "Name is the name of resource being referenced",
+}
+
+func (RoleRef) SwaggerDoc() map[string]string {
+ return map_RoleRef
+}
+
+var map_Subject = map[string]string{
+ "": "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.",
+ "kind": "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.",
+ "apiGroup": "APIGroup holds the API group of the referenced subject. Defaults to \"\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io\" for User and Group subjects.",
+ "name": "Name of the object being referenced.",
+ "namespace": "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.",
+}
+
+func (Subject) SwaggerDoc() map[string]string {
+ return map_Subject
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.conversion.go
new file mode 100644
index 000000000..56e2c4ee4
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.conversion.go
@@ -0,0 +1,415 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ rbac "k8s.io/client-go/pkg/apis/rbac"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1beta1_ClusterRole_To_rbac_ClusterRole,
+ Convert_rbac_ClusterRole_To_v1beta1_ClusterRole,
+ Convert_v1beta1_ClusterRoleBinding_To_rbac_ClusterRoleBinding,
+ Convert_rbac_ClusterRoleBinding_To_v1beta1_ClusterRoleBinding,
+ Convert_v1beta1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder,
+ Convert_rbac_ClusterRoleBindingBuilder_To_v1beta1_ClusterRoleBindingBuilder,
+ Convert_v1beta1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList,
+ Convert_rbac_ClusterRoleBindingList_To_v1beta1_ClusterRoleBindingList,
+ Convert_v1beta1_ClusterRoleList_To_rbac_ClusterRoleList,
+ Convert_rbac_ClusterRoleList_To_v1beta1_ClusterRoleList,
+ Convert_v1beta1_PolicyRule_To_rbac_PolicyRule,
+ Convert_rbac_PolicyRule_To_v1beta1_PolicyRule,
+ Convert_v1beta1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder,
+ Convert_rbac_PolicyRuleBuilder_To_v1beta1_PolicyRuleBuilder,
+ Convert_v1beta1_Role_To_rbac_Role,
+ Convert_rbac_Role_To_v1beta1_Role,
+ Convert_v1beta1_RoleBinding_To_rbac_RoleBinding,
+ Convert_rbac_RoleBinding_To_v1beta1_RoleBinding,
+ Convert_v1beta1_RoleBindingList_To_rbac_RoleBindingList,
+ Convert_rbac_RoleBindingList_To_v1beta1_RoleBindingList,
+ Convert_v1beta1_RoleList_To_rbac_RoleList,
+ Convert_rbac_RoleList_To_v1beta1_RoleList,
+ Convert_v1beta1_RoleRef_To_rbac_RoleRef,
+ Convert_rbac_RoleRef_To_v1beta1_RoleRef,
+ Convert_v1beta1_Subject_To_rbac_Subject,
+ Convert_rbac_Subject_To_v1beta1_Subject,
+ )
+}
+
+func autoConvert_v1beta1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac.ClusterRole, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Rules = *(*[]rbac.PolicyRule)(unsafe.Pointer(&in.Rules))
+ return nil
+}
+
+// Convert_v1beta1_ClusterRole_To_rbac_ClusterRole is an autogenerated conversion function.
+func Convert_v1beta1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac.ClusterRole, s conversion.Scope) error {
+ return autoConvert_v1beta1_ClusterRole_To_rbac_ClusterRole(in, out, s)
+}
+
+func autoConvert_rbac_ClusterRole_To_v1beta1_ClusterRole(in *rbac.ClusterRole, out *ClusterRole, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if in.Rules == nil {
+ out.Rules = make([]PolicyRule, 0)
+ } else {
+ out.Rules = *(*[]PolicyRule)(unsafe.Pointer(&in.Rules))
+ }
+ return nil
+}
+
+// Convert_rbac_ClusterRole_To_v1beta1_ClusterRole is an autogenerated conversion function.
+func Convert_rbac_ClusterRole_To_v1beta1_ClusterRole(in *rbac.ClusterRole, out *ClusterRole, s conversion.Scope) error {
+ return autoConvert_rbac_ClusterRole_To_v1beta1_ClusterRole(in, out, s)
+}
+
+func autoConvert_v1beta1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in *ClusterRoleBinding, out *rbac.ClusterRoleBinding, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Subjects = *(*[]rbac.Subject)(unsafe.Pointer(&in.Subjects))
+ if err := Convert_v1beta1_RoleRef_To_rbac_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_ClusterRoleBinding_To_rbac_ClusterRoleBinding is an autogenerated conversion function.
+func Convert_v1beta1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in *ClusterRoleBinding, out *rbac.ClusterRoleBinding, s conversion.Scope) error {
+ return autoConvert_v1beta1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in, out, s)
+}
+
+func autoConvert_rbac_ClusterRoleBinding_To_v1beta1_ClusterRoleBinding(in *rbac.ClusterRoleBinding, out *ClusterRoleBinding, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if in.Subjects == nil {
+ out.Subjects = make([]Subject, 0)
+ } else {
+ out.Subjects = *(*[]Subject)(unsafe.Pointer(&in.Subjects))
+ }
+ if err := Convert_rbac_RoleRef_To_v1beta1_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_rbac_ClusterRoleBinding_To_v1beta1_ClusterRoleBinding is an autogenerated conversion function.
+func Convert_rbac_ClusterRoleBinding_To_v1beta1_ClusterRoleBinding(in *rbac.ClusterRoleBinding, out *ClusterRoleBinding, s conversion.Scope) error {
+ return autoConvert_rbac_ClusterRoleBinding_To_v1beta1_ClusterRoleBinding(in, out, s)
+}
+
+func autoConvert_v1beta1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder(in *ClusterRoleBindingBuilder, out *rbac.ClusterRoleBindingBuilder, s conversion.Scope) error {
+ if err := Convert_v1beta1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(&in.ClusterRoleBinding, &out.ClusterRoleBinding, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder is an autogenerated conversion function.
+func Convert_v1beta1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder(in *ClusterRoleBindingBuilder, out *rbac.ClusterRoleBindingBuilder, s conversion.Scope) error {
+ return autoConvert_v1beta1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder(in, out, s)
+}
+
+func autoConvert_rbac_ClusterRoleBindingBuilder_To_v1beta1_ClusterRoleBindingBuilder(in *rbac.ClusterRoleBindingBuilder, out *ClusterRoleBindingBuilder, s conversion.Scope) error {
+ if err := Convert_rbac_ClusterRoleBinding_To_v1beta1_ClusterRoleBinding(&in.ClusterRoleBinding, &out.ClusterRoleBinding, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_rbac_ClusterRoleBindingBuilder_To_v1beta1_ClusterRoleBindingBuilder is an autogenerated conversion function.
+func Convert_rbac_ClusterRoleBindingBuilder_To_v1beta1_ClusterRoleBindingBuilder(in *rbac.ClusterRoleBindingBuilder, out *ClusterRoleBindingBuilder, s conversion.Scope) error {
+ return autoConvert_rbac_ClusterRoleBindingBuilder_To_v1beta1_ClusterRoleBindingBuilder(in, out, s)
+}
+
+func autoConvert_v1beta1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in *ClusterRoleBindingList, out *rbac.ClusterRoleBindingList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]rbac.ClusterRoleBinding)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1beta1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList is an autogenerated conversion function.
+func Convert_v1beta1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in *ClusterRoleBindingList, out *rbac.ClusterRoleBindingList, s conversion.Scope) error {
+ return autoConvert_v1beta1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in, out, s)
+}
+
+func autoConvert_rbac_ClusterRoleBindingList_To_v1beta1_ClusterRoleBindingList(in *rbac.ClusterRoleBindingList, out *ClusterRoleBindingList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]ClusterRoleBinding, 0)
+ } else {
+ out.Items = *(*[]ClusterRoleBinding)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_rbac_ClusterRoleBindingList_To_v1beta1_ClusterRoleBindingList is an autogenerated conversion function.
+func Convert_rbac_ClusterRoleBindingList_To_v1beta1_ClusterRoleBindingList(in *rbac.ClusterRoleBindingList, out *ClusterRoleBindingList, s conversion.Scope) error {
+ return autoConvert_rbac_ClusterRoleBindingList_To_v1beta1_ClusterRoleBindingList(in, out, s)
+}
+
+func autoConvert_v1beta1_ClusterRoleList_To_rbac_ClusterRoleList(in *ClusterRoleList, out *rbac.ClusterRoleList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]rbac.ClusterRole)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1beta1_ClusterRoleList_To_rbac_ClusterRoleList is an autogenerated conversion function.
+func Convert_v1beta1_ClusterRoleList_To_rbac_ClusterRoleList(in *ClusterRoleList, out *rbac.ClusterRoleList, s conversion.Scope) error {
+ return autoConvert_v1beta1_ClusterRoleList_To_rbac_ClusterRoleList(in, out, s)
+}
+
+func autoConvert_rbac_ClusterRoleList_To_v1beta1_ClusterRoleList(in *rbac.ClusterRoleList, out *ClusterRoleList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]ClusterRole, 0)
+ } else {
+ out.Items = *(*[]ClusterRole)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_rbac_ClusterRoleList_To_v1beta1_ClusterRoleList is an autogenerated conversion function.
+func Convert_rbac_ClusterRoleList_To_v1beta1_ClusterRoleList(in *rbac.ClusterRoleList, out *ClusterRoleList, s conversion.Scope) error {
+ return autoConvert_rbac_ClusterRoleList_To_v1beta1_ClusterRoleList(in, out, s)
+}
+
+func autoConvert_v1beta1_PolicyRule_To_rbac_PolicyRule(in *PolicyRule, out *rbac.PolicyRule, s conversion.Scope) error {
+ out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs))
+ out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups))
+ out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources))
+ out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames))
+ out.NonResourceURLs = *(*[]string)(unsafe.Pointer(&in.NonResourceURLs))
+ return nil
+}
+
+// Convert_v1beta1_PolicyRule_To_rbac_PolicyRule is an autogenerated conversion function.
+func Convert_v1beta1_PolicyRule_To_rbac_PolicyRule(in *PolicyRule, out *rbac.PolicyRule, s conversion.Scope) error {
+ return autoConvert_v1beta1_PolicyRule_To_rbac_PolicyRule(in, out, s)
+}
+
+func autoConvert_rbac_PolicyRule_To_v1beta1_PolicyRule(in *rbac.PolicyRule, out *PolicyRule, s conversion.Scope) error {
+ if in.Verbs == nil {
+ out.Verbs = make([]string, 0)
+ } else {
+ out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs))
+ }
+ out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups))
+ out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources))
+ out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames))
+ out.NonResourceURLs = *(*[]string)(unsafe.Pointer(&in.NonResourceURLs))
+ return nil
+}
+
+// Convert_rbac_PolicyRule_To_v1beta1_PolicyRule is an autogenerated conversion function.
+func Convert_rbac_PolicyRule_To_v1beta1_PolicyRule(in *rbac.PolicyRule, out *PolicyRule, s conversion.Scope) error {
+ return autoConvert_rbac_PolicyRule_To_v1beta1_PolicyRule(in, out, s)
+}
+
+func autoConvert_v1beta1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder(in *PolicyRuleBuilder, out *rbac.PolicyRuleBuilder, s conversion.Scope) error {
+ if err := Convert_v1beta1_PolicyRule_To_rbac_PolicyRule(&in.PolicyRule, &out.PolicyRule, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder is an autogenerated conversion function.
+func Convert_v1beta1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder(in *PolicyRuleBuilder, out *rbac.PolicyRuleBuilder, s conversion.Scope) error {
+ return autoConvert_v1beta1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder(in, out, s)
+}
+
+func autoConvert_rbac_PolicyRuleBuilder_To_v1beta1_PolicyRuleBuilder(in *rbac.PolicyRuleBuilder, out *PolicyRuleBuilder, s conversion.Scope) error {
+ if err := Convert_rbac_PolicyRule_To_v1beta1_PolicyRule(&in.PolicyRule, &out.PolicyRule, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_rbac_PolicyRuleBuilder_To_v1beta1_PolicyRuleBuilder is an autogenerated conversion function.
+func Convert_rbac_PolicyRuleBuilder_To_v1beta1_PolicyRuleBuilder(in *rbac.PolicyRuleBuilder, out *PolicyRuleBuilder, s conversion.Scope) error {
+ return autoConvert_rbac_PolicyRuleBuilder_To_v1beta1_PolicyRuleBuilder(in, out, s)
+}
+
+func autoConvert_v1beta1_Role_To_rbac_Role(in *Role, out *rbac.Role, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Rules = *(*[]rbac.PolicyRule)(unsafe.Pointer(&in.Rules))
+ return nil
+}
+
+// Convert_v1beta1_Role_To_rbac_Role is an autogenerated conversion function.
+func Convert_v1beta1_Role_To_rbac_Role(in *Role, out *rbac.Role, s conversion.Scope) error {
+ return autoConvert_v1beta1_Role_To_rbac_Role(in, out, s)
+}
+
+func autoConvert_rbac_Role_To_v1beta1_Role(in *rbac.Role, out *Role, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if in.Rules == nil {
+ out.Rules = make([]PolicyRule, 0)
+ } else {
+ out.Rules = *(*[]PolicyRule)(unsafe.Pointer(&in.Rules))
+ }
+ return nil
+}
+
+// Convert_rbac_Role_To_v1beta1_Role is an autogenerated conversion function.
+func Convert_rbac_Role_To_v1beta1_Role(in *rbac.Role, out *Role, s conversion.Scope) error {
+ return autoConvert_rbac_Role_To_v1beta1_Role(in, out, s)
+}
+
+func autoConvert_v1beta1_RoleBinding_To_rbac_RoleBinding(in *RoleBinding, out *rbac.RoleBinding, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Subjects = *(*[]rbac.Subject)(unsafe.Pointer(&in.Subjects))
+ if err := Convert_v1beta1_RoleRef_To_rbac_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_RoleBinding_To_rbac_RoleBinding is an autogenerated conversion function.
+func Convert_v1beta1_RoleBinding_To_rbac_RoleBinding(in *RoleBinding, out *rbac.RoleBinding, s conversion.Scope) error {
+ return autoConvert_v1beta1_RoleBinding_To_rbac_RoleBinding(in, out, s)
+}
+
+func autoConvert_rbac_RoleBinding_To_v1beta1_RoleBinding(in *rbac.RoleBinding, out *RoleBinding, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if in.Subjects == nil {
+ out.Subjects = make([]Subject, 0)
+ } else {
+ out.Subjects = *(*[]Subject)(unsafe.Pointer(&in.Subjects))
+ }
+ if err := Convert_rbac_RoleRef_To_v1beta1_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_rbac_RoleBinding_To_v1beta1_RoleBinding is an autogenerated conversion function.
+func Convert_rbac_RoleBinding_To_v1beta1_RoleBinding(in *rbac.RoleBinding, out *RoleBinding, s conversion.Scope) error {
+ return autoConvert_rbac_RoleBinding_To_v1beta1_RoleBinding(in, out, s)
+}
+
+func autoConvert_v1beta1_RoleBindingList_To_rbac_RoleBindingList(in *RoleBindingList, out *rbac.RoleBindingList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]rbac.RoleBinding)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1beta1_RoleBindingList_To_rbac_RoleBindingList is an autogenerated conversion function.
+func Convert_v1beta1_RoleBindingList_To_rbac_RoleBindingList(in *RoleBindingList, out *rbac.RoleBindingList, s conversion.Scope) error {
+ return autoConvert_v1beta1_RoleBindingList_To_rbac_RoleBindingList(in, out, s)
+}
+
+func autoConvert_rbac_RoleBindingList_To_v1beta1_RoleBindingList(in *rbac.RoleBindingList, out *RoleBindingList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]RoleBinding, 0)
+ } else {
+ out.Items = *(*[]RoleBinding)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_rbac_RoleBindingList_To_v1beta1_RoleBindingList is an autogenerated conversion function.
+func Convert_rbac_RoleBindingList_To_v1beta1_RoleBindingList(in *rbac.RoleBindingList, out *RoleBindingList, s conversion.Scope) error {
+ return autoConvert_rbac_RoleBindingList_To_v1beta1_RoleBindingList(in, out, s)
+}
+
+func autoConvert_v1beta1_RoleList_To_rbac_RoleList(in *RoleList, out *rbac.RoleList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]rbac.Role)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1beta1_RoleList_To_rbac_RoleList is an autogenerated conversion function.
+func Convert_v1beta1_RoleList_To_rbac_RoleList(in *RoleList, out *rbac.RoleList, s conversion.Scope) error {
+ return autoConvert_v1beta1_RoleList_To_rbac_RoleList(in, out, s)
+}
+
+func autoConvert_rbac_RoleList_To_v1beta1_RoleList(in *rbac.RoleList, out *RoleList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]Role, 0)
+ } else {
+ out.Items = *(*[]Role)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_rbac_RoleList_To_v1beta1_RoleList is an autogenerated conversion function.
+func Convert_rbac_RoleList_To_v1beta1_RoleList(in *rbac.RoleList, out *RoleList, s conversion.Scope) error {
+ return autoConvert_rbac_RoleList_To_v1beta1_RoleList(in, out, s)
+}
+
+func autoConvert_v1beta1_RoleRef_To_rbac_RoleRef(in *RoleRef, out *rbac.RoleRef, s conversion.Scope) error {
+ out.APIGroup = in.APIGroup
+ out.Kind = in.Kind
+ out.Name = in.Name
+ return nil
+}
+
+// Convert_v1beta1_RoleRef_To_rbac_RoleRef is an autogenerated conversion function.
+func Convert_v1beta1_RoleRef_To_rbac_RoleRef(in *RoleRef, out *rbac.RoleRef, s conversion.Scope) error {
+ return autoConvert_v1beta1_RoleRef_To_rbac_RoleRef(in, out, s)
+}
+
+func autoConvert_rbac_RoleRef_To_v1beta1_RoleRef(in *rbac.RoleRef, out *RoleRef, s conversion.Scope) error {
+ out.APIGroup = in.APIGroup
+ out.Kind = in.Kind
+ out.Name = in.Name
+ return nil
+}
+
+// Convert_rbac_RoleRef_To_v1beta1_RoleRef is an autogenerated conversion function.
+func Convert_rbac_RoleRef_To_v1beta1_RoleRef(in *rbac.RoleRef, out *RoleRef, s conversion.Scope) error {
+ return autoConvert_rbac_RoleRef_To_v1beta1_RoleRef(in, out, s)
+}
+
+func autoConvert_v1beta1_Subject_To_rbac_Subject(in *Subject, out *rbac.Subject, s conversion.Scope) error {
+ out.Kind = in.Kind
+ out.APIGroup = in.APIGroup
+ out.Name = in.Name
+ out.Namespace = in.Namespace
+ return nil
+}
+
+// Convert_v1beta1_Subject_To_rbac_Subject is an autogenerated conversion function.
+func Convert_v1beta1_Subject_To_rbac_Subject(in *Subject, out *rbac.Subject, s conversion.Scope) error {
+ return autoConvert_v1beta1_Subject_To_rbac_Subject(in, out, s)
+}
+
+func autoConvert_rbac_Subject_To_v1beta1_Subject(in *rbac.Subject, out *Subject, s conversion.Scope) error {
+ out.Kind = in.Kind
+ out.APIGroup = in.APIGroup
+ out.Name = in.Name
+ out.Namespace = in.Namespace
+ return nil
+}
+
+// Convert_rbac_Subject_To_v1beta1_Subject is an autogenerated conversion function.
+func Convert_rbac_Subject_To_v1beta1_Subject(in *rbac.Subject, out *Subject, s conversion.Scope) error {
+ return autoConvert_rbac_Subject_To_v1beta1_Subject(in, out, s)
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..57c331ea9
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.deepcopy.go
@@ -0,0 +1,269 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterRole, InType: reflect.TypeOf(&ClusterRole{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterRoleBinding, InType: reflect.TypeOf(&ClusterRoleBinding{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterRoleBindingList, InType: reflect.TypeOf(&ClusterRoleBindingList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterRoleList, InType: reflect.TypeOf(&ClusterRoleList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_PolicyRule, InType: reflect.TypeOf(&PolicyRule{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Role, InType: reflect.TypeOf(&Role{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RoleBinding, InType: reflect.TypeOf(&RoleBinding{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RoleBindingList, InType: reflect.TypeOf(&RoleBindingList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RoleList, InType: reflect.TypeOf(&RoleList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RoleRef, InType: reflect.TypeOf(&RoleRef{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Subject, InType: reflect.TypeOf(&Subject{})},
+ )
+}
+
+// DeepCopy_v1beta1_ClusterRole is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ClusterRole(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ClusterRole)
+ out := out.(*ClusterRole)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]PolicyRule, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_PolicyRule(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ClusterRoleBinding is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ClusterRoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ClusterRoleBinding)
+ out := out.(*ClusterRoleBinding)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Subjects != nil {
+ in, out := &in.Subjects, &out.Subjects
+ *out = make([]Subject, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ClusterRoleBindingList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ClusterRoleBindingList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ClusterRoleBindingList)
+ out := out.(*ClusterRoleBindingList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ClusterRoleBinding, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_ClusterRoleBinding(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ClusterRoleList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ClusterRoleList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ClusterRoleList)
+ out := out.(*ClusterRoleList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ClusterRole, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_ClusterRole(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_PolicyRule is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_PolicyRule(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PolicyRule)
+ out := out.(*PolicyRule)
+ *out = *in
+ if in.Verbs != nil {
+ in, out := &in.Verbs, &out.Verbs
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.APIGroups != nil {
+ in, out := &in.APIGroups, &out.APIGroups
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Resources != nil {
+ in, out := &in.Resources, &out.Resources
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.ResourceNames != nil {
+ in, out := &in.ResourceNames, &out.ResourceNames
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.NonResourceURLs != nil {
+ in, out := &in.NonResourceURLs, &out.NonResourceURLs
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_Role is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_Role(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Role)
+ out := out.(*Role)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]PolicyRule, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_PolicyRule(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_RoleBinding is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_RoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RoleBinding)
+ out := out.(*RoleBinding)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Subjects != nil {
+ in, out := &in.Subjects, &out.Subjects
+ *out = make([]Subject, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_RoleBindingList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_RoleBindingList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RoleBindingList)
+ out := out.(*RoleBindingList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]RoleBinding, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_RoleBinding(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_RoleList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_RoleList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RoleList)
+ out := out.(*RoleList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Role, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_Role(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_RoleRef is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_RoleRef(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RoleRef)
+ out := out.(*RoleRef)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_Subject is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_Subject(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Subject)
+ out := out.(*Subject)
+ *out = *in
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.defaults.go
new file mode 100644
index 000000000..fa5bfb6ab
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.defaults.go
@@ -0,0 +1,66 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ scheme.AddTypeDefaultingFunc(&ClusterRoleBinding{}, func(obj interface{}) { SetObjectDefaults_ClusterRoleBinding(obj.(*ClusterRoleBinding)) })
+ scheme.AddTypeDefaultingFunc(&ClusterRoleBindingList{}, func(obj interface{}) { SetObjectDefaults_ClusterRoleBindingList(obj.(*ClusterRoleBindingList)) })
+ scheme.AddTypeDefaultingFunc(&RoleBinding{}, func(obj interface{}) { SetObjectDefaults_RoleBinding(obj.(*RoleBinding)) })
+ scheme.AddTypeDefaultingFunc(&RoleBindingList{}, func(obj interface{}) { SetObjectDefaults_RoleBindingList(obj.(*RoleBindingList)) })
+ return nil
+}
+
+func SetObjectDefaults_ClusterRoleBinding(in *ClusterRoleBinding) {
+ SetDefaults_ClusterRoleBinding(in)
+ for i := range in.Subjects {
+ a := &in.Subjects[i]
+ SetDefaults_Subject(a)
+ }
+}
+
+func SetObjectDefaults_ClusterRoleBindingList(in *ClusterRoleBindingList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_ClusterRoleBinding(a)
+ }
+}
+
+func SetObjectDefaults_RoleBinding(in *RoleBinding) {
+ SetDefaults_RoleBinding(in)
+ for i := range in.Subjects {
+ a := &in.Subjects[i]
+ SetDefaults_Subject(a)
+ }
+}
+
+func SetObjectDefaults_RoleBindingList(in *RoleBindingList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_RoleBinding(a)
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/rbac/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/rbac/zz_generated.deepcopy.go
new file mode 100644
index 000000000..ed8507e7f
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/rbac/zz_generated.deepcopy.go
@@ -0,0 +1,269 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package rbac
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_ClusterRole, InType: reflect.TypeOf(&ClusterRole{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_ClusterRoleBinding, InType: reflect.TypeOf(&ClusterRoleBinding{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_ClusterRoleBindingList, InType: reflect.TypeOf(&ClusterRoleBindingList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_ClusterRoleList, InType: reflect.TypeOf(&ClusterRoleList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_PolicyRule, InType: reflect.TypeOf(&PolicyRule{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_Role, InType: reflect.TypeOf(&Role{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_RoleBinding, InType: reflect.TypeOf(&RoleBinding{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_RoleBindingList, InType: reflect.TypeOf(&RoleBindingList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_RoleList, InType: reflect.TypeOf(&RoleList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_RoleRef, InType: reflect.TypeOf(&RoleRef{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_Subject, InType: reflect.TypeOf(&Subject{})},
+ )
+}
+
+// DeepCopy_rbac_ClusterRole is an autogenerated deepcopy function.
+func DeepCopy_rbac_ClusterRole(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ClusterRole)
+ out := out.(*ClusterRole)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]PolicyRule, len(*in))
+ for i := range *in {
+ if err := DeepCopy_rbac_PolicyRule(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_rbac_ClusterRoleBinding is an autogenerated deepcopy function.
+func DeepCopy_rbac_ClusterRoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ClusterRoleBinding)
+ out := out.(*ClusterRoleBinding)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Subjects != nil {
+ in, out := &in.Subjects, &out.Subjects
+ *out = make([]Subject, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_rbac_ClusterRoleBindingList is an autogenerated deepcopy function.
+func DeepCopy_rbac_ClusterRoleBindingList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ClusterRoleBindingList)
+ out := out.(*ClusterRoleBindingList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ClusterRoleBinding, len(*in))
+ for i := range *in {
+ if err := DeepCopy_rbac_ClusterRoleBinding(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_rbac_ClusterRoleList is an autogenerated deepcopy function.
+func DeepCopy_rbac_ClusterRoleList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ClusterRoleList)
+ out := out.(*ClusterRoleList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ClusterRole, len(*in))
+ for i := range *in {
+ if err := DeepCopy_rbac_ClusterRole(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_rbac_PolicyRule is an autogenerated deepcopy function.
+func DeepCopy_rbac_PolicyRule(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PolicyRule)
+ out := out.(*PolicyRule)
+ *out = *in
+ if in.Verbs != nil {
+ in, out := &in.Verbs, &out.Verbs
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.APIGroups != nil {
+ in, out := &in.APIGroups, &out.APIGroups
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Resources != nil {
+ in, out := &in.Resources, &out.Resources
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.ResourceNames != nil {
+ in, out := &in.ResourceNames, &out.ResourceNames
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.NonResourceURLs != nil {
+ in, out := &in.NonResourceURLs, &out.NonResourceURLs
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_rbac_Role is an autogenerated deepcopy function.
+func DeepCopy_rbac_Role(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Role)
+ out := out.(*Role)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]PolicyRule, len(*in))
+ for i := range *in {
+ if err := DeepCopy_rbac_PolicyRule(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_rbac_RoleBinding is an autogenerated deepcopy function.
+func DeepCopy_rbac_RoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RoleBinding)
+ out := out.(*RoleBinding)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Subjects != nil {
+ in, out := &in.Subjects, &out.Subjects
+ *out = make([]Subject, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_rbac_RoleBindingList is an autogenerated deepcopy function.
+func DeepCopy_rbac_RoleBindingList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RoleBindingList)
+ out := out.(*RoleBindingList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]RoleBinding, len(*in))
+ for i := range *in {
+ if err := DeepCopy_rbac_RoleBinding(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_rbac_RoleList is an autogenerated deepcopy function.
+func DeepCopy_rbac_RoleList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RoleList)
+ out := out.(*RoleList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Role, len(*in))
+ for i := range *in {
+ if err := DeepCopy_rbac_Role(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_rbac_RoleRef is an autogenerated deepcopy function.
+func DeepCopy_rbac_RoleRef(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RoleRef)
+ out := out.(*RoleRef)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_rbac_Subject is an autogenerated deepcopy function.
+func DeepCopy_rbac_Subject(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Subject)
+ out := out.(*Subject)
+ *out = *in
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/settings/doc.go b/vendor/k8s.io/client-go/pkg/apis/settings/doc.go
new file mode 100644
index 000000000..90ccf882a
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/settings/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +groupName=settings.k8s.io
+package settings
diff --git a/vendor/k8s.io/client-go/pkg/apis/settings/register.go b/vendor/k8s.io/client-go/pkg/apis/settings/register.go
new file mode 100644
index 000000000..858470127
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/settings/register.go
@@ -0,0 +1,52 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package settings
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+// GroupName is the group name use in this package
+const GroupName = "settings.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &PodPreset{},
+ &PodPresetList{},
+ )
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/settings/types.go b/vendor/k8s.io/client-go/pkg/apis/settings/types.go
new file mode 100644
index 000000000..b0589eedf
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/settings/types.go
@@ -0,0 +1,63 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package settings
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/client-go/pkg/api"
+)
+
+// +genclient=true
+
+// PodPreset is a policy resource that defines additional runtime
+// requirements for a Pod.
+type PodPreset struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // +optional
+ Spec PodPresetSpec
+}
+
+// PodPresetSpec is a description of a pod preset.
+type PodPresetSpec struct {
+ // Selector is a label query over a set of resources, in this case pods.
+ // Required.
+ Selector metav1.LabelSelector
+ // Env defines the collection of EnvVar to inject into containers.
+ // +optional
+ Env []api.EnvVar
+ // EnvFrom defines the collection of EnvFromSource to inject into containers.
+ // +optional
+ EnvFrom []api.EnvFromSource
+ // Volumes defines the collection of Volume to inject into the pod.
+ // +optional
+ Volumes []api.Volume
+ // VolumeMounts defines the collection of VolumeMount to inject into containers.
+ // +optional
+ VolumeMounts []api.VolumeMount
+}
+
+// PodPresetList is a list of PodPreset objects.
+type PodPresetList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []PodPreset
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/doc.go b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/doc.go
new file mode 100644
index 000000000..86390b523
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +groupName=settings.k8s.io
+package v1alpha1
diff --git a/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/generated.pb.go
new file mode 100644
index 000000000..64b15b1d2
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/generated.pb.go
@@ -0,0 +1,929 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/settings/v1alpha1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1alpha1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/settings/v1alpha1/generated.proto
+
+ It has these top-level messages:
+ PodPreset
+ PodPresetList
+ PodPresetSpec
+*/
+package v1alpha1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_kubernetes_pkg_api_v1 "k8s.io/client-go/pkg/api/v1"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *PodPreset) Reset() { *m = PodPreset{} }
+func (*PodPreset) ProtoMessage() {}
+func (*PodPreset) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *PodPresetList) Reset() { *m = PodPresetList{} }
+func (*PodPresetList) ProtoMessage() {}
+func (*PodPresetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *PodPresetSpec) Reset() { *m = PodPresetSpec{} }
+func (*PodPresetSpec) ProtoMessage() {}
+func (*PodPresetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
+
+func init() {
+ proto.RegisterType((*PodPreset)(nil), "k8s.io.client-go.pkg.apis.settings.v1alpha1.PodPreset")
+ proto.RegisterType((*PodPresetList)(nil), "k8s.io.client-go.pkg.apis.settings.v1alpha1.PodPresetList")
+ proto.RegisterType((*PodPresetSpec)(nil), "k8s.io.client-go.pkg.apis.settings.v1alpha1.PodPresetSpec")
+}
+func (m *PodPreset) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodPreset) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n2, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ return i, nil
+}
+
+func (m *PodPresetList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodPresetList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n3, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PodPresetSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodPresetSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
+ n4, err := m.Selector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ if len(m.Env) > 0 {
+ for _, msg := range m.Env {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.EnvFrom) > 0 {
+ for _, msg := range m.EnvFrom {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Volumes) > 0 {
+ for _, msg := range m.Volumes {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.VolumeMounts) > 0 {
+ for _, msg := range m.VolumeMounts {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *PodPreset) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodPresetList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PodPresetSpec) Size() (n int) {
+ var l int
+ _ = l
+ l = m.Selector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Env) > 0 {
+ for _, e := range m.Env {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.EnvFrom) > 0 {
+ for _, e := range m.EnvFrom {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Volumes) > 0 {
+ for _, e := range m.Volumes {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.VolumeMounts) > 0 {
+ for _, e := range m.VolumeMounts {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *PodPreset) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodPreset{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodPresetSpec", "PodPresetSpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodPresetList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodPresetList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PodPreset", "PodPreset", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodPresetSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodPresetSpec{`,
+ `Selector:` + strings.Replace(strings.Replace(this.Selector.String(), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1), `&`, ``, 1) + `,`,
+ `Env:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Env), "EnvVar", "k8s_io_kubernetes_pkg_api_v1.EnvVar", 1), `&`, ``, 1) + `,`,
+ `EnvFrom:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.EnvFrom), "EnvFromSource", "k8s_io_kubernetes_pkg_api_v1.EnvFromSource", 1), `&`, ``, 1) + `,`,
+ `Volumes:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Volumes), "Volume", "k8s_io_kubernetes_pkg_api_v1.Volume", 1), `&`, ``, 1) + `,`,
+ `VolumeMounts:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VolumeMounts), "VolumeMount", "k8s_io_kubernetes_pkg_api_v1.VolumeMount", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *PodPreset) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodPreset: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodPreset: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodPresetList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodPresetList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodPresetList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, PodPreset{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodPresetSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodPresetSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodPresetSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Env = append(m.Env, k8s_io_kubernetes_pkg_api_v1.EnvVar{})
+ if err := m.Env[len(m.Env)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field EnvFrom", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.EnvFrom = append(m.EnvFrom, k8s_io_kubernetes_pkg_api_v1.EnvFromSource{})
+ if err := m.EnvFrom[len(m.EnvFrom)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Volumes = append(m.Volumes, k8s_io_kubernetes_pkg_api_v1.Volume{})
+ if err := m.Volumes[len(m.Volumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeMounts", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumeMounts = append(m.VolumeMounts, k8s_io_kubernetes_pkg_api_v1.VolumeMount{})
+ if err := m.VolumeMounts[len(m.VolumeMounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/client-go/pkg/apis/settings/v1alpha1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 538 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0x41, 0x8b, 0xd3, 0x40,
+ 0x14, 0xc7, 0x9b, 0xed, 0x96, 0xd6, 0x69, 0x17, 0x25, 0x78, 0x08, 0x3d, 0x64, 0x97, 0xe2, 0x61,
+ 0xc5, 0x75, 0x62, 0x57, 0x51, 0x41, 0x4f, 0x91, 0x15, 0x04, 0x97, 0x5d, 0x52, 0xe8, 0x41, 0x56,
+ 0x70, 0x9a, 0x3e, 0xd3, 0xd8, 0x26, 0x13, 0x66, 0x26, 0x01, 0x6f, 0x7e, 0x04, 0xbf, 0x94, 0x50,
+ 0xd0, 0xc3, 0x1e, 0xf7, 0xb4, 0xd8, 0xf8, 0x45, 0x64, 0x26, 0x93, 0xa6, 0x52, 0xcb, 0x56, 0x6f,
+ 0xf3, 0x1e, 0xef, 0xff, 0x7b, 0xff, 0xff, 0x4b, 0xd0, 0xcb, 0xe9, 0x73, 0x8e, 0x43, 0xea, 0x4c,
+ 0xd3, 0x11, 0xb0, 0x18, 0x04, 0x70, 0x27, 0x99, 0x06, 0x0e, 0x49, 0x42, 0xee, 0x70, 0x10, 0x22,
+ 0x8c, 0x03, 0xee, 0x64, 0x7d, 0x32, 0x4b, 0x26, 0xa4, 0xef, 0x04, 0x10, 0x03, 0x23, 0x02, 0xc6,
+ 0x38, 0x61, 0x54, 0x50, 0xf3, 0xa8, 0x50, 0xe3, 0x4a, 0x8d, 0x93, 0x69, 0x80, 0xa5, 0x1a, 0x97,
+ 0x6a, 0x5c, 0xaa, 0xbb, 0x0f, 0x83, 0x50, 0x4c, 0xd2, 0x11, 0xf6, 0x69, 0xe4, 0x04, 0x34, 0xa0,
+ 0x8e, 0x82, 0x8c, 0xd2, 0x8f, 0xaa, 0x52, 0x85, 0x7a, 0x15, 0xf0, 0xee, 0x13, 0x6d, 0x8d, 0x24,
+ 0x61, 0x44, 0xfc, 0x49, 0x18, 0x03, 0xfb, 0x5c, 0x99, 0x8b, 0x40, 0x10, 0x27, 0x5b, 0xb3, 0xd4,
+ 0x75, 0x36, 0xa9, 0x58, 0x1a, 0x8b, 0x30, 0x82, 0x35, 0xc1, 0xd3, 0x9b, 0x04, 0xdc, 0x9f, 0x40,
+ 0x44, 0xd6, 0x74, 0x47, 0x1b, 0x2f, 0xf7, 0x17, 0x5b, 0xbd, 0x1f, 0x06, 0xba, 0x75, 0x4e, 0xc7,
+ 0xe7, 0x0c, 0x38, 0x08, 0xf3, 0x03, 0x6a, 0x49, 0xff, 0x63, 0x22, 0x88, 0x65, 0x1c, 0x18, 0x87,
+ 0xed, 0xe3, 0x47, 0x58, 0x9f, 0x72, 0xd5, 0x46, 0x75, 0x4c, 0x39, 0x8d, 0xb3, 0x3e, 0x3e, 0x1b,
+ 0x7d, 0x02, 0x5f, 0x9c, 0x82, 0x20, 0xae, 0x39, 0xbf, 0xde, 0xaf, 0xe5, 0xd7, 0xfb, 0xa8, 0xea,
+ 0x79, 0x4b, 0xaa, 0xf9, 0x1e, 0xed, 0xf2, 0x04, 0x7c, 0x6b, 0x47, 0xd1, 0x5f, 0xe0, 0x7f, 0xf9,
+ 0x50, 0x78, 0x69, 0x74, 0x90, 0x80, 0xef, 0x76, 0xf4, 0xa2, 0x5d, 0x59, 0x79, 0x0a, 0xdb, 0xfb,
+ 0x6e, 0xa0, 0xbd, 0xe5, 0xd4, 0xdb, 0x90, 0x0b, 0xf3, 0x62, 0x2d, 0x12, 0xde, 0x2e, 0x92, 0x54,
+ 0xab, 0x40, 0x77, 0xf4, 0x9e, 0x56, 0xd9, 0x59, 0x89, 0x73, 0x81, 0x1a, 0xa1, 0x80, 0x88, 0x5b,
+ 0x3b, 0x07, 0xf5, 0xc3, 0xf6, 0xf1, 0xb3, 0xff, 0xcc, 0xe3, 0xee, 0xe9, 0x1d, 0x8d, 0x37, 0x92,
+ 0xe6, 0x15, 0xd0, 0xde, 0xb7, 0xfa, 0x4a, 0x1a, 0x99, 0xd2, 0x24, 0xa8, 0xc5, 0x61, 0x06, 0xbe,
+ 0xa0, 0x4c, 0xa7, 0x79, 0xbc, 0x65, 0x1a, 0x32, 0x82, 0xd9, 0x40, 0x4b, 0xab, 0x48, 0x65, 0xc7,
+ 0x5b, 0x62, 0xcd, 0x57, 0xa8, 0x0e, 0x71, 0xa6, 0x03, 0xdd, 0xdb, 0x1c, 0x48, 0x52, 0x4f, 0xe2,
+ 0x6c, 0x48, 0x98, 0xdb, 0xd6, 0xb8, 0xfa, 0x49, 0x9c, 0x79, 0x52, 0x6d, 0x0e, 0x51, 0x13, 0xe2,
+ 0xec, 0x35, 0xa3, 0x91, 0x55, 0x57, 0xa0, 0x07, 0x37, 0x82, 0xe4, 0xf0, 0x80, 0xa6, 0xcc, 0x07,
+ 0xf7, 0xb6, 0xe6, 0x35, 0x75, 0xdb, 0x2b, 0x61, 0xe6, 0x19, 0x6a, 0x66, 0x74, 0x96, 0x46, 0xc0,
+ 0xad, 0xdd, 0x6d, 0x0c, 0x0e, 0xd5, 0x70, 0x05, 0x2c, 0x6a, 0xee, 0x95, 0x14, 0xd3, 0x47, 0x9d,
+ 0xe2, 0x79, 0x4a, 0xd3, 0x58, 0x70, 0xab, 0xa1, 0xa8, 0xf7, 0xb7, 0xa1, 0x2a, 0x85, 0x7b, 0x57,
+ 0xa3, 0x3b, 0x2b, 0x4d, 0xee, 0xfd, 0x01, 0x75, 0xf1, 0x7c, 0x61, 0xd7, 0x2e, 0x17, 0x76, 0xed,
+ 0x6a, 0x61, 0xd7, 0xbe, 0xe4, 0xb6, 0x31, 0xcf, 0x6d, 0xe3, 0x32, 0xb7, 0x8d, 0xab, 0xdc, 0x36,
+ 0x7e, 0xe6, 0xb6, 0xf1, 0xf5, 0x97, 0x5d, 0x7b, 0xd7, 0x2a, 0xff, 0x8b, 0xdf, 0x01, 0x00, 0x00,
+ 0xff, 0xff, 0x80, 0x75, 0x96, 0xb8, 0xfd, 0x04, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/generated.proto
new file mode 100644
index 000000000..5b0c9e5cb
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/generated.proto
@@ -0,0 +1,75 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.client_go.pkg.apis.settings.v1alpha1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1alpha1";
+
+// PodPreset is a policy resource that defines additional runtime
+// requirements for a Pod.
+message PodPreset {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // +optional
+ optional PodPresetSpec spec = 2;
+}
+
+// PodPresetList is a list of PodPreset objects.
+message PodPresetList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of schema objects.
+ repeated PodPreset items = 2;
+}
+
+// PodPresetSpec is a description of a pod preset.
+message PodPresetSpec {
+ // Selector is a label query over a set of resources, in this case pods.
+ // Required.
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 1;
+
+ // Env defines the collection of EnvVar to inject into containers.
+ // +optional
+ repeated k8s.io.client_go.pkg.api.v1.EnvVar env = 2;
+
+ // EnvFrom defines the collection of EnvFromSource to inject into containers.
+ // +optional
+ repeated k8s.io.client_go.pkg.api.v1.EnvFromSource envFrom = 3;
+
+ // Volumes defines the collection of Volume to inject into the pod.
+ // +optional
+ repeated k8s.io.client_go.pkg.api.v1.Volume volumes = 4;
+
+ // VolumeMounts defines the collection of VolumeMount to inject into containers.
+ // +optional
+ repeated k8s.io.client_go.pkg.api.v1.VolumeMount volumeMounts = 5;
+}
+
diff --git a/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/register.go b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/register.go
new file mode 100644
index 000000000..ddcd2259c
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/register.go
@@ -0,0 +1,59 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "settings.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, RegisterDefaults)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &PodPreset{},
+ &PodPresetList{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/types.go b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/types.go
new file mode 100644
index 000000000..0565f7c60
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/types.go
@@ -0,0 +1,67 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/client-go/pkg/api/v1"
+)
+
+// +genclient=true
+
+// PodPreset is a policy resource that defines additional runtime
+// requirements for a Pod.
+type PodPreset struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // +optional
+ Spec PodPresetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+}
+
+// PodPresetSpec is a description of a pod preset.
+type PodPresetSpec struct {
+ // Selector is a label query over a set of resources, in this case pods.
+ // Required.
+ Selector metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,1,opt,name=selector"`
+
+ // Env defines the collection of EnvVar to inject into containers.
+ // +optional
+ Env []v1.EnvVar `json:"env,omitempty" protobuf:"bytes,2,rep,name=env"`
+ // EnvFrom defines the collection of EnvFromSource to inject into containers.
+ // +optional
+ EnvFrom []v1.EnvFromSource `json:"envFrom,omitempty" protobuf:"bytes,3,rep,name=envFrom"`
+ // Volumes defines the collection of Volume to inject into the pod.
+ // +optional
+ Volumes []v1.Volume `json:"volumes,omitempty" protobuf:"bytes,4,rep,name=volumes"`
+ // VolumeMounts defines the collection of VolumeMount to inject into containers.
+ // +optional
+ VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty" protobuf:"bytes,5,rep,name=volumeMounts"`
+}
+
+// PodPresetList is a list of PodPreset objects.
+type PodPresetList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of schema objects.
+ Items []PodPreset `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..2a89e5566
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/types_swagger_doc_generated.go
@@ -0,0 +1,61 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_PodPreset = map[string]string{
+ "": "PodPreset is a policy resource that defines additional runtime requirements for a Pod.",
+}
+
+func (PodPreset) SwaggerDoc() map[string]string {
+ return map_PodPreset
+}
+
+var map_PodPresetList = map[string]string{
+ "": "PodPresetList is a list of PodPreset objects.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "items": "Items is a list of schema objects.",
+}
+
+func (PodPresetList) SwaggerDoc() map[string]string {
+ return map_PodPresetList
+}
+
+var map_PodPresetSpec = map[string]string{
+ "": "PodPresetSpec is a description of a pod preset.",
+ "selector": "Selector is a label query over a set of resources, in this case pods. Required.",
+ "env": "Env defines the collection of EnvVar to inject into containers.",
+ "envFrom": "EnvFrom defines the collection of EnvFromSource to inject into containers.",
+ "volumes": "Volumes defines the collection of Volume to inject into the pod.",
+ "volumeMounts": "VolumeMounts defines the collection of VolumeMount to inject into containers.",
+}
+
+func (PodPresetSpec) SwaggerDoc() map[string]string {
+ return map_PodPresetSpec
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.conversion.go
new file mode 100644
index 000000000..453301861
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.conversion.go
@@ -0,0 +1,165 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1alpha1
+
+import (
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api "k8s.io/client-go/pkg/api"
+ v1 "k8s.io/client-go/pkg/api/v1"
+ settings "k8s.io/client-go/pkg/apis/settings"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1alpha1_PodPreset_To_settings_PodPreset,
+ Convert_settings_PodPreset_To_v1alpha1_PodPreset,
+ Convert_v1alpha1_PodPresetList_To_settings_PodPresetList,
+ Convert_settings_PodPresetList_To_v1alpha1_PodPresetList,
+ Convert_v1alpha1_PodPresetSpec_To_settings_PodPresetSpec,
+ Convert_settings_PodPresetSpec_To_v1alpha1_PodPresetSpec,
+ )
+}
+
+func autoConvert_v1alpha1_PodPreset_To_settings_PodPreset(in *PodPreset, out *settings.PodPreset, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1alpha1_PodPresetSpec_To_settings_PodPresetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1alpha1_PodPreset_To_settings_PodPreset is an autogenerated conversion function.
+func Convert_v1alpha1_PodPreset_To_settings_PodPreset(in *PodPreset, out *settings.PodPreset, s conversion.Scope) error {
+ return autoConvert_v1alpha1_PodPreset_To_settings_PodPreset(in, out, s)
+}
+
+func autoConvert_settings_PodPreset_To_v1alpha1_PodPreset(in *settings.PodPreset, out *PodPreset, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_settings_PodPresetSpec_To_v1alpha1_PodPresetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_settings_PodPreset_To_v1alpha1_PodPreset is an autogenerated conversion function.
+func Convert_settings_PodPreset_To_v1alpha1_PodPreset(in *settings.PodPreset, out *PodPreset, s conversion.Scope) error {
+ return autoConvert_settings_PodPreset_To_v1alpha1_PodPreset(in, out, s)
+}
+
+func autoConvert_v1alpha1_PodPresetList_To_settings_PodPresetList(in *PodPresetList, out *settings.PodPresetList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]settings.PodPreset, len(*in))
+ for i := range *in {
+ if err := Convert_v1alpha1_PodPreset_To_settings_PodPreset(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1alpha1_PodPresetList_To_settings_PodPresetList is an autogenerated conversion function.
+func Convert_v1alpha1_PodPresetList_To_settings_PodPresetList(in *PodPresetList, out *settings.PodPresetList, s conversion.Scope) error {
+ return autoConvert_v1alpha1_PodPresetList_To_settings_PodPresetList(in, out, s)
+}
+
+func autoConvert_settings_PodPresetList_To_v1alpha1_PodPresetList(in *settings.PodPresetList, out *PodPresetList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodPreset, len(*in))
+ for i := range *in {
+ if err := Convert_settings_PodPreset_To_v1alpha1_PodPreset(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]PodPreset, 0)
+ }
+ return nil
+}
+
+// Convert_settings_PodPresetList_To_v1alpha1_PodPresetList is an autogenerated conversion function.
+func Convert_settings_PodPresetList_To_v1alpha1_PodPresetList(in *settings.PodPresetList, out *PodPresetList, s conversion.Scope) error {
+ return autoConvert_settings_PodPresetList_To_v1alpha1_PodPresetList(in, out, s)
+}
+
+func autoConvert_v1alpha1_PodPresetSpec_To_settings_PodPresetSpec(in *PodPresetSpec, out *settings.PodPresetSpec, s conversion.Scope) error {
+ out.Selector = in.Selector
+ out.Env = *(*[]api.EnvVar)(unsafe.Pointer(&in.Env))
+ out.EnvFrom = *(*[]api.EnvFromSource)(unsafe.Pointer(&in.EnvFrom))
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]api.Volume, len(*in))
+ for i := range *in {
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&(*in)[i], &(*out)[i], 0); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Volumes = nil
+ }
+ out.VolumeMounts = *(*[]api.VolumeMount)(unsafe.Pointer(&in.VolumeMounts))
+ return nil
+}
+
+// Convert_v1alpha1_PodPresetSpec_To_settings_PodPresetSpec is an autogenerated conversion function.
+func Convert_v1alpha1_PodPresetSpec_To_settings_PodPresetSpec(in *PodPresetSpec, out *settings.PodPresetSpec, s conversion.Scope) error {
+ return autoConvert_v1alpha1_PodPresetSpec_To_settings_PodPresetSpec(in, out, s)
+}
+
+func autoConvert_settings_PodPresetSpec_To_v1alpha1_PodPresetSpec(in *settings.PodPresetSpec, out *PodPresetSpec, s conversion.Scope) error {
+ out.Selector = in.Selector
+ out.Env = *(*[]v1.EnvVar)(unsafe.Pointer(&in.Env))
+ out.EnvFrom = *(*[]v1.EnvFromSource)(unsafe.Pointer(&in.EnvFrom))
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]v1.Volume, len(*in))
+ for i := range *in {
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&(*in)[i], &(*out)[i], 0); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Volumes = nil
+ }
+ out.VolumeMounts = *(*[]v1.VolumeMount)(unsafe.Pointer(&in.VolumeMounts))
+ return nil
+}
+
+// Convert_settings_PodPresetSpec_To_v1alpha1_PodPresetSpec is an autogenerated conversion function.
+func Convert_settings_PodPresetSpec_To_v1alpha1_PodPresetSpec(in *settings.PodPresetSpec, out *PodPresetSpec, s conversion.Scope) error {
+ return autoConvert_settings_PodPresetSpec_To_v1alpha1_PodPresetSpec(in, out, s)
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..4f2e35494
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.deepcopy.go
@@ -0,0 +1,127 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api_v1 "k8s.io/client-go/pkg/api/v1"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PodPreset, InType: reflect.TypeOf(&PodPreset{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PodPresetList, InType: reflect.TypeOf(&PodPresetList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PodPresetSpec, InType: reflect.TypeOf(&PodPresetSpec{})},
+ )
+}
+
+// DeepCopy_v1alpha1_PodPreset is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_PodPreset(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodPreset)
+ out := out.(*PodPreset)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1alpha1_PodPresetSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_PodPresetList is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_PodPresetList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodPresetList)
+ out := out.(*PodPresetList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodPreset, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1alpha1_PodPreset(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_PodPresetSpec is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_PodPresetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodPresetSpec)
+ out := out.(*PodPresetSpec)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.Selector); err != nil {
+ return err
+ } else {
+ out.Selector = *newVal.(*v1.LabelSelector)
+ }
+ if in.Env != nil {
+ in, out := &in.Env, &out.Env
+ *out = make([]api_v1.EnvVar, len(*in))
+ for i := range *in {
+ if err := api_v1.DeepCopy_v1_EnvVar(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.EnvFrom != nil {
+ in, out := &in.EnvFrom, &out.EnvFrom
+ *out = make([]api_v1.EnvFromSource, len(*in))
+ for i := range *in {
+ if err := api_v1.DeepCopy_v1_EnvFromSource(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]api_v1.Volume, len(*in))
+ for i := range *in {
+ if err := api_v1.DeepCopy_v1_Volume(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.VolumeMounts != nil {
+ in, out := &in.VolumeMounts, &out.VolumeMounts
+ *out = make([]api_v1.VolumeMount, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.defaults.go
new file mode 100644
index 000000000..c178a3072
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/settings/v1alpha1/zz_generated.defaults.go
@@ -0,0 +1,98 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1alpha1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ v1 "k8s.io/client-go/pkg/api/v1"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ scheme.AddTypeDefaultingFunc(&PodPreset{}, func(obj interface{}) { SetObjectDefaults_PodPreset(obj.(*PodPreset)) })
+ scheme.AddTypeDefaultingFunc(&PodPresetList{}, func(obj interface{}) { SetObjectDefaults_PodPresetList(obj.(*PodPresetList)) })
+ return nil
+}
+
+func SetObjectDefaults_PodPreset(in *PodPreset) {
+ for i := range in.Spec.Env {
+ a := &in.Spec.Env[i]
+ if a.ValueFrom != nil {
+ if a.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(a.ValueFrom.FieldRef)
+ }
+ }
+ }
+ for i := range in.Spec.Volumes {
+ a := &in.Spec.Volumes[i]
+ v1.SetDefaults_Volume(a)
+ if a.VolumeSource.Secret != nil {
+ v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
+ }
+ if a.VolumeSource.ISCSI != nil {
+ v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
+ }
+ if a.VolumeSource.RBD != nil {
+ v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
+ }
+ if a.VolumeSource.DownwardAPI != nil {
+ v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
+ for j := range a.VolumeSource.DownwardAPI.Items {
+ b := &a.VolumeSource.DownwardAPI.Items[j]
+ if b.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.FieldRef)
+ }
+ }
+ }
+ if a.VolumeSource.ConfigMap != nil {
+ v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
+ }
+ if a.VolumeSource.AzureDisk != nil {
+ v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
+ }
+ if a.VolumeSource.Projected != nil {
+ v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
+ for j := range a.VolumeSource.Projected.Sources {
+ b := &a.VolumeSource.Projected.Sources[j]
+ if b.DownwardAPI != nil {
+ for k := range b.DownwardAPI.Items {
+ c := &b.DownwardAPI.Items[k]
+ if c.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(c.FieldRef)
+ }
+ }
+ }
+ }
+ }
+ if a.VolumeSource.ScaleIO != nil {
+ v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO)
+ }
+ }
+}
+
+func SetObjectDefaults_PodPresetList(in *PodPresetList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_PodPreset(a)
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/settings/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/settings/zz_generated.deepcopy.go
new file mode 100644
index 000000000..2e475f7ce
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/settings/zz_generated.deepcopy.go
@@ -0,0 +1,127 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package settings
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api "k8s.io/client-go/pkg/api"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_settings_PodPreset, InType: reflect.TypeOf(&PodPreset{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_settings_PodPresetList, InType: reflect.TypeOf(&PodPresetList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_settings_PodPresetSpec, InType: reflect.TypeOf(&PodPresetSpec{})},
+ )
+}
+
+// DeepCopy_settings_PodPreset is an autogenerated deepcopy function.
+func DeepCopy_settings_PodPreset(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodPreset)
+ out := out.(*PodPreset)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_settings_PodPresetSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_settings_PodPresetList is an autogenerated deepcopy function.
+func DeepCopy_settings_PodPresetList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodPresetList)
+ out := out.(*PodPresetList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodPreset, len(*in))
+ for i := range *in {
+ if err := DeepCopy_settings_PodPreset(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_settings_PodPresetSpec is an autogenerated deepcopy function.
+func DeepCopy_settings_PodPresetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodPresetSpec)
+ out := out.(*PodPresetSpec)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.Selector); err != nil {
+ return err
+ } else {
+ out.Selector = *newVal.(*v1.LabelSelector)
+ }
+ if in.Env != nil {
+ in, out := &in.Env, &out.Env
+ *out = make([]api.EnvVar, len(*in))
+ for i := range *in {
+ if err := api.DeepCopy_api_EnvVar(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.EnvFrom != nil {
+ in, out := &in.EnvFrom, &out.EnvFrom
+ *out = make([]api.EnvFromSource, len(*in))
+ for i := range *in {
+ if err := api.DeepCopy_api_EnvFromSource(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]api.Volume, len(*in))
+ for i := range *in {
+ if err := api.DeepCopy_api_Volume(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.VolumeMounts != nil {
+ in, out := &in.VolumeMounts, &out.VolumeMounts
+ *out = make([]api.VolumeMount, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/doc.go b/vendor/k8s.io/client-go/pkg/apis/storage/doc.go
new file mode 100644
index 000000000..ef6d2a9ba
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/storage/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +groupName=storage.k8s.io
+package storage
diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/register.go b/vendor/k8s.io/client-go/pkg/apis/storage/register.go
new file mode 100644
index 000000000..aaa619b4d
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/storage/register.go
@@ -0,0 +1,51 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package storage
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "storage.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &StorageClass{},
+ &StorageClassList{},
+ )
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/types.go b/vendor/k8s.io/client-go/pkg/apis/storage/types.go
new file mode 100644
index 000000000..827e7c666
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/storage/types.go
@@ -0,0 +1,60 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package storage
+
+import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+// +genclient=true
+// +nonNamespaced=true
+
+// StorageClass describes a named "class" of storage offered in a cluster.
+// Different classes might map to quality-of-service levels, or to backup policies,
+// or to arbitrary policies determined by the cluster administrators. Kubernetes
+// itself is unopinionated about what classes represent. This concept is sometimes
+// called "profiles" in other storage systems.
+// The name of a StorageClass object is significant, and is how users can request a particular class.
+type StorageClass struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // provisioner is the driver expected to handle this StorageClass.
+ // This is an optionally-prefixed name, like a label key.
+ // For example: "kubernetes.io/gce-pd" or "kubernetes.io/aws-ebs".
+ // This value may not be empty.
+ Provisioner string
+
+ // parameters holds parameters for the provisioner.
+ // These values are opaque to the system and are passed directly
+ // to the provisioner. The only validation done on keys is that they are
+ // not empty. The maximum number of parameters is
+ // 512, with a cumulative max size of 256K
+ // +optional
+ Parameters map[string]string
+}
+
+// StorageClassList is a collection of storage classes.
+type StorageClassList struct {
+ metav1.TypeMeta
+ // Standard list metadata
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta
+
+ // Items is the list of StorageClasses
+ Items []StorageClass
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1/doc.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1/doc.go
new file mode 100644
index 000000000..2b8d05cfd
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +groupName=storage.k8s.io
+package v1
diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1/generated.pb.go
new file mode 100644
index 000000000..cc241c5b0
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1/generated.pb.go
@@ -0,0 +1,746 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/storage/v1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/storage/v1/generated.proto
+
+ It has these top-level messages:
+ StorageClass
+ StorageClassList
+*/
+package v1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *StorageClass) Reset() { *m = StorageClass{} }
+func (*StorageClass) ProtoMessage() {}
+func (*StorageClass) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *StorageClassList) Reset() { *m = StorageClassList{} }
+func (*StorageClassList) ProtoMessage() {}
+func (*StorageClassList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func init() {
+ proto.RegisterType((*StorageClass)(nil), "k8s.io.client-go.pkg.apis.storage.v1.StorageClass")
+ proto.RegisterType((*StorageClassList)(nil), "k8s.io.client-go.pkg.apis.storage.v1.StorageClassList")
+}
+func (m *StorageClass) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StorageClass) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Provisioner)))
+ i += copy(dAtA[i:], m.Provisioner)
+ if len(m.Parameters) > 0 {
+ keysForParameters := make([]string, 0, len(m.Parameters))
+ for k := range m.Parameters {
+ keysForParameters = append(keysForParameters, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForParameters)
+ for _, k := range keysForParameters {
+ dAtA[i] = 0x1a
+ i++
+ v := m.Parameters[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ return i, nil
+}
+
+func (m *StorageClassList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StorageClassList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n2, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *StorageClass) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Provisioner)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Parameters) > 0 {
+ for k, v := range m.Parameters {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *StorageClassList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *StorageClass) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForParameters := make([]string, 0, len(this.Parameters))
+ for k := range this.Parameters {
+ keysForParameters = append(keysForParameters, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForParameters)
+ mapStringForParameters := "map[string]string{"
+ for _, k := range keysForParameters {
+ mapStringForParameters += fmt.Sprintf("%v: %v,", k, this.Parameters[k])
+ }
+ mapStringForParameters += "}"
+ s := strings.Join([]string{`&StorageClass{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Provisioner:` + fmt.Sprintf("%v", this.Provisioner) + `,`,
+ `Parameters:` + mapStringForParameters + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StorageClassList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StorageClassList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "StorageClass", "StorageClass", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *StorageClass) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StorageClass: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StorageClass: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Provisioner", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Provisioner = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Parameters == nil {
+ m.Parameters = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Parameters[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Parameters[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StorageClassList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StorageClassList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StorageClassList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, StorageClass{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/client-go/pkg/apis/storage/v1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 460 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x91, 0xcf, 0x6f, 0xd3, 0x30,
+ 0x14, 0xc7, 0xe3, 0x54, 0x95, 0x36, 0x17, 0x44, 0x15, 0x38, 0x54, 0x3d, 0x78, 0xd5, 0x24, 0xa4,
+ 0x5e, 0xb0, 0xe9, 0xc6, 0xd0, 0x84, 0xc4, 0xa5, 0x13, 0x07, 0x24, 0x10, 0x53, 0xb8, 0x20, 0xc4,
+ 0x01, 0xb7, 0x7b, 0xa4, 0x26, 0x4d, 0x1c, 0xd9, 0x2f, 0x41, 0xbd, 0xf1, 0x27, 0xf0, 0x67, 0x55,
+ 0x9c, 0x76, 0xdc, 0x69, 0xd0, 0xf0, 0x8f, 0xa0, 0xfc, 0x60, 0x89, 0x56, 0x26, 0x26, 0x6e, 0x7e,
+ 0xb6, 0x3f, 0x5f, 0xbf, 0xf7, 0x31, 0x3d, 0x0a, 0x8f, 0x2d, 0x57, 0x5a, 0x84, 0xe9, 0x0c, 0x4c,
+ 0x0c, 0x08, 0x56, 0x24, 0x61, 0x20, 0x64, 0xa2, 0xac, 0xb0, 0xa8, 0x8d, 0x0c, 0x40, 0x64, 0x13,
+ 0x11, 0x40, 0x0c, 0x46, 0x22, 0x9c, 0xf1, 0xc4, 0x68, 0xd4, 0xde, 0xc3, 0x0a, 0xe3, 0x0d, 0xc6,
+ 0x93, 0x30, 0xe0, 0x05, 0xc6, 0x6b, 0x8c, 0x67, 0x93, 0xe1, 0xa3, 0x40, 0xe1, 0x22, 0x9d, 0xf1,
+ 0xb9, 0x8e, 0x44, 0xa0, 0x03, 0x2d, 0x4a, 0x7a, 0x96, 0x7e, 0x2a, 0xab, 0xb2, 0x28, 0x57, 0x55,
+ 0xea, 0xf0, 0x49, 0xdd, 0x8c, 0x4c, 0x54, 0x24, 0xe7, 0x0b, 0x15, 0x83, 0x59, 0x35, 0xed, 0x44,
+ 0x80, 0xf2, 0x2f, 0xbd, 0x0c, 0xc5, 0x4d, 0x94, 0x49, 0x63, 0x54, 0x11, 0x6c, 0x01, 0x4f, 0xff,
+ 0x05, 0xd8, 0xf9, 0x02, 0x22, 0xb9, 0xc5, 0x1d, 0xde, 0xc4, 0xa5, 0xa8, 0x96, 0x42, 0xc5, 0x68,
+ 0xd1, 0x5c, 0x87, 0xf6, 0x7f, 0xb8, 0xf4, 0xce, 0xdb, 0xca, 0xc8, 0xc9, 0x52, 0x5a, 0xeb, 0x7d,
+ 0xa4, 0x3b, 0xc5, 0x24, 0x67, 0x12, 0xe5, 0x80, 0x8c, 0xc8, 0xb8, 0x77, 0xf0, 0x98, 0xd7, 0x36,
+ 0xdb, 0xc1, 0x8d, 0xcf, 0xe2, 0x36, 0xcf, 0x26, 0xfc, 0xcd, 0xec, 0x33, 0xcc, 0xf1, 0x35, 0xa0,
+ 0x9c, 0x7a, 0xeb, 0xcb, 0x3d, 0x27, 0xbf, 0xdc, 0xa3, 0xcd, 0x9e, 0x7f, 0x95, 0xea, 0x1d, 0xd1,
+ 0x5e, 0x62, 0x74, 0xa6, 0xac, 0xd2, 0x31, 0x98, 0x81, 0x3b, 0x22, 0xe3, 0xdd, 0xe9, 0xfd, 0x1a,
+ 0xe9, 0x9d, 0x36, 0x47, 0x7e, 0xfb, 0x9e, 0xf7, 0x85, 0xd2, 0x44, 0x1a, 0x19, 0x01, 0x82, 0xb1,
+ 0x83, 0xce, 0xa8, 0x33, 0xee, 0x1d, 0x9c, 0xf0, 0x5b, 0x7d, 0x34, 0x6f, 0x4f, 0xc8, 0x4f, 0xaf,
+ 0x52, 0x5e, 0xc4, 0x68, 0x56, 0x4d, 0xb7, 0xcd, 0x81, 0xdf, 0x7a, 0x6a, 0xf8, 0x9c, 0xde, 0xbb,
+ 0x86, 0x78, 0x7d, 0xda, 0x09, 0x61, 0x55, 0xfa, 0xd9, 0xf5, 0x8b, 0xa5, 0xf7, 0x80, 0x76, 0x33,
+ 0xb9, 0x4c, 0xa1, 0x1a, 0xc7, 0xaf, 0x8a, 0x67, 0xee, 0x31, 0xd9, 0xff, 0x4e, 0x68, 0xbf, 0xfd,
+ 0xfe, 0x2b, 0x65, 0xd1, 0xfb, 0xb0, 0x65, 0x99, 0xdf, 0xce, 0x72, 0x41, 0x97, 0x8e, 0xfb, 0x75,
+ 0xd7, 0x3b, 0x7f, 0x76, 0x5a, 0x86, 0xdf, 0xd1, 0xae, 0x42, 0x88, 0xec, 0xc0, 0x2d, 0x2d, 0x1d,
+ 0xfe, 0x87, 0xa5, 0xe9, 0xdd, 0x3a, 0xbf, 0xfb, 0xb2, 0x48, 0xf2, 0xab, 0xc0, 0xe9, 0x78, 0xbd,
+ 0x61, 0xce, 0xf9, 0x86, 0x39, 0x17, 0x1b, 0xe6, 0x7c, 0xcd, 0x19, 0x59, 0xe7, 0x8c, 0x9c, 0xe7,
+ 0x8c, 0x5c, 0xe4, 0x8c, 0xfc, 0xcc, 0x19, 0xf9, 0xf6, 0x8b, 0x39, 0xef, 0xdd, 0x6c, 0xf2, 0x3b,
+ 0x00, 0x00, 0xff, 0xff, 0x0b, 0xb7, 0x00, 0xe1, 0xba, 0x03, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/storage/v1/generated.proto
new file mode 100644
index 000000000..1a7849eaa
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1/generated.proto
@@ -0,0 +1,62 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.client_go.pkg.apis.storage.v1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1";
+
+// StorageClass describes the parameters for a class of storage for
+// which PersistentVolumes can be dynamically provisioned.
+//
+// StorageClasses are non-namespaced; the name of the storage class
+// according to etcd is in ObjectMeta.Name.
+message StorageClass {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Provisioner indicates the type of the provisioner.
+ optional string provisioner = 2;
+
+ // Parameters holds the parameters for the provisioner that should
+ // create volumes of this storage class.
+ // +optional
+ map<string, string> parameters = 3;
+}
+
+// StorageClassList is a collection of storage classes.
+message StorageClassList {
+ // Standard list metadata
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is the list of StorageClasses
+ repeated StorageClass items = 2;
+}
+
diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1/register.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1/register.go
new file mode 100644
index 000000000..a727a9b20
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1/register.go
@@ -0,0 +1,60 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "storage.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, RegisterDefaults)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &StorageClass{},
+ &StorageClassList{},
+ )
+
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1/types.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1/types.go
new file mode 100644
index 000000000..971db769e
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1/types.go
@@ -0,0 +1,57 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+
+// StorageClass describes the parameters for a class of storage for
+// which PersistentVolumes can be dynamically provisioned.
+//
+// StorageClasses are non-namespaced; the name of the storage class
+// according to etcd is in ObjectMeta.Name.
+type StorageClass struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Provisioner indicates the type of the provisioner.
+ Provisioner string `json:"provisioner" protobuf:"bytes,2,opt,name=provisioner"`
+
+ // Parameters holds the parameters for the provisioner that should
+ // create volumes of this storage class.
+ // +optional
+ Parameters map[string]string `json:"parameters,omitempty" protobuf:"bytes,3,rep,name=parameters"`
+}
+
+// StorageClassList is a collection of storage classes.
+type StorageClassList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of StorageClasses
+ Items []StorageClass `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..a13106fa3
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1/types_swagger_doc_generated.go
@@ -0,0 +1,51 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_StorageClass = map[string]string{
+ "": "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "provisioner": "Provisioner indicates the type of the provisioner.",
+ "parameters": "Parameters holds the parameters for the provisioner that should create volumes of this storage class.",
+}
+
+func (StorageClass) SwaggerDoc() map[string]string {
+ return map_StorageClass
+}
+
+var map_StorageClassList = map[string]string{
+ "": "StorageClassList is a collection of storage classes.",
+ "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "items": "Items is the list of StorageClasses",
+}
+
+func (StorageClassList) SwaggerDoc() map[string]string {
+ return map_StorageClassList
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1/zz_generated.conversion.go
new file mode 100644
index 000000000..aac6bac29
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1/zz_generated.conversion.go
@@ -0,0 +1,93 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1
+
+import (
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ storage "k8s.io/client-go/pkg/apis/storage"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1_StorageClass_To_storage_StorageClass,
+ Convert_storage_StorageClass_To_v1_StorageClass,
+ Convert_v1_StorageClassList_To_storage_StorageClassList,
+ Convert_storage_StorageClassList_To_v1_StorageClassList,
+ )
+}
+
+func autoConvert_v1_StorageClass_To_storage_StorageClass(in *StorageClass, out *storage.StorageClass, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Provisioner = in.Provisioner
+ out.Parameters = *(*map[string]string)(unsafe.Pointer(&in.Parameters))
+ return nil
+}
+
+// Convert_v1_StorageClass_To_storage_StorageClass is an autogenerated conversion function.
+func Convert_v1_StorageClass_To_storage_StorageClass(in *StorageClass, out *storage.StorageClass, s conversion.Scope) error {
+ return autoConvert_v1_StorageClass_To_storage_StorageClass(in, out, s)
+}
+
+func autoConvert_storage_StorageClass_To_v1_StorageClass(in *storage.StorageClass, out *StorageClass, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Provisioner = in.Provisioner
+ out.Parameters = *(*map[string]string)(unsafe.Pointer(&in.Parameters))
+ return nil
+}
+
+// Convert_storage_StorageClass_To_v1_StorageClass is an autogenerated conversion function.
+func Convert_storage_StorageClass_To_v1_StorageClass(in *storage.StorageClass, out *StorageClass, s conversion.Scope) error {
+ return autoConvert_storage_StorageClass_To_v1_StorageClass(in, out, s)
+}
+
+func autoConvert_v1_StorageClassList_To_storage_StorageClassList(in *StorageClassList, out *storage.StorageClassList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]storage.StorageClass)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1_StorageClassList_To_storage_StorageClassList is an autogenerated conversion function.
+func Convert_v1_StorageClassList_To_storage_StorageClassList(in *StorageClassList, out *storage.StorageClassList, s conversion.Scope) error {
+ return autoConvert_v1_StorageClassList_To_storage_StorageClassList(in, out, s)
+}
+
+func autoConvert_storage_StorageClassList_To_v1_StorageClassList(in *storage.StorageClassList, out *StorageClassList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]StorageClass, 0)
+ } else {
+ out.Items = *(*[]StorageClass)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_storage_StorageClassList_To_v1_StorageClassList is an autogenerated conversion function.
+func Convert_storage_StorageClassList_To_v1_StorageClassList(in *storage.StorageClassList, out *StorageClassList, s conversion.Scope) error {
+ return autoConvert_storage_StorageClassList_To_v1_StorageClassList(in, out, s)
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..649b354f2
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1/zz_generated.deepcopy.go
@@ -0,0 +1,82 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_StorageClass, InType: reflect.TypeOf(&StorageClass{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_StorageClassList, InType: reflect.TypeOf(&StorageClassList{})},
+ )
+}
+
+// DeepCopy_v1_StorageClass is an autogenerated deepcopy function.
+func DeepCopy_v1_StorageClass(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StorageClass)
+ out := out.(*StorageClass)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if in.Parameters != nil {
+ in, out := &in.Parameters, &out.Parameters
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_StorageClassList is an autogenerated deepcopy function.
+func DeepCopy_v1_StorageClassList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StorageClassList)
+ out := out.(*StorageClassList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]StorageClass, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_StorageClass(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1/zz_generated.defaults.go
new file mode 100644
index 000000000..6df448eb9
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1/zz_generated.defaults.go
@@ -0,0 +1,32 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/doc.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/doc.go
new file mode 100644
index 000000000..364321710
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +groupName=storage.k8s.io
+package v1beta1
diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/generated.pb.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/generated.pb.go
new file mode 100644
index 000000000..8f446c0bf
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/generated.pb.go
@@ -0,0 +1,747 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/storage/v1beta1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1beta1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/storage/v1beta1/generated.proto
+
+ It has these top-level messages:
+ StorageClass
+ StorageClassList
+*/
+package v1beta1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *StorageClass) Reset() { *m = StorageClass{} }
+func (*StorageClass) ProtoMessage() {}
+func (*StorageClass) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *StorageClassList) Reset() { *m = StorageClassList{} }
+func (*StorageClassList) ProtoMessage() {}
+func (*StorageClassList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func init() {
+ proto.RegisterType((*StorageClass)(nil), "k8s.io.client-go.pkg.apis.storage.v1beta1.StorageClass")
+ proto.RegisterType((*StorageClassList)(nil), "k8s.io.client-go.pkg.apis.storage.v1beta1.StorageClassList")
+}
+func (m *StorageClass) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StorageClass) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Provisioner)))
+ i += copy(dAtA[i:], m.Provisioner)
+ if len(m.Parameters) > 0 {
+ keysForParameters := make([]string, 0, len(m.Parameters))
+ for k := range m.Parameters {
+ keysForParameters = append(keysForParameters, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForParameters)
+ for _, k := range keysForParameters {
+ dAtA[i] = 0x1a
+ i++
+ v := m.Parameters[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ return i, nil
+}
+
+func (m *StorageClassList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StorageClassList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n2, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *StorageClass) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Provisioner)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Parameters) > 0 {
+ for k, v := range m.Parameters {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *StorageClassList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *StorageClass) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForParameters := make([]string, 0, len(this.Parameters))
+ for k := range this.Parameters {
+ keysForParameters = append(keysForParameters, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForParameters)
+ mapStringForParameters := "map[string]string{"
+ for _, k := range keysForParameters {
+ mapStringForParameters += fmt.Sprintf("%v: %v,", k, this.Parameters[k])
+ }
+ mapStringForParameters += "}"
+ s := strings.Join([]string{`&StorageClass{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Provisioner:` + fmt.Sprintf("%v", this.Provisioner) + `,`,
+ `Parameters:` + mapStringForParameters + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StorageClassList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StorageClassList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "StorageClass", "StorageClass", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *StorageClass) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StorageClass: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StorageClass: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Provisioner", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Provisioner = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Parameters == nil {
+ m.Parameters = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Parameters[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Parameters[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StorageClassList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StorageClassList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StorageClassList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, StorageClass{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/client-go/pkg/apis/storage/v1beta1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 466 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x91, 0xcf, 0x6b, 0x13, 0x41,
+ 0x14, 0xc7, 0x77, 0x52, 0x82, 0xed, 0x44, 0x31, 0xac, 0x1e, 0x42, 0x0e, 0xd3, 0xd0, 0x53, 0x10,
+ 0x3a, 0x63, 0xea, 0x0f, 0x42, 0xc1, 0x4b, 0x44, 0x50, 0x50, 0x2c, 0xeb, 0x4d, 0x14, 0x9c, 0x4d,
+ 0x9f, 0x9b, 0x71, 0xb3, 0x3b, 0xcb, 0xcc, 0xdb, 0x85, 0x80, 0x07, 0xff, 0x04, 0xff, 0xac, 0xdc,
+ 0xec, 0xb1, 0xa7, 0x62, 0x56, 0xff, 0x10, 0xd9, 0x1f, 0x76, 0x97, 0x86, 0x62, 0xf1, 0xb6, 0x6f,
+ 0x66, 0x3e, 0xdf, 0xf7, 0xde, 0x67, 0xe9, 0x71, 0x38, 0xb5, 0x5c, 0x69, 0x11, 0xa6, 0x3e, 0x98,
+ 0x18, 0x10, 0xac, 0x48, 0xc2, 0x40, 0xc8, 0x44, 0x59, 0x61, 0x51, 0x1b, 0x19, 0x80, 0xc8, 0x26,
+ 0x3e, 0xa0, 0x9c, 0x88, 0x00, 0x62, 0x30, 0x12, 0xe1, 0x94, 0x27, 0x46, 0xa3, 0x76, 0x1f, 0x54,
+ 0x2c, 0x6f, 0x58, 0x9e, 0x84, 0x01, 0x2f, 0x58, 0x5e, 0xb3, 0xbc, 0x66, 0x87, 0x87, 0x81, 0xc2,
+ 0x45, 0xea, 0xf3, 0xb9, 0x8e, 0x44, 0xa0, 0x03, 0x2d, 0xca, 0x08, 0x3f, 0xfd, 0x5c, 0x56, 0x65,
+ 0x51, 0x7e, 0x55, 0xd1, 0xc3, 0xc7, 0xf5, 0x58, 0x32, 0x51, 0x91, 0x9c, 0x2f, 0x54, 0x0c, 0x66,
+ 0xd5, 0x0c, 0x16, 0x01, 0x4a, 0x91, 0x6d, 0x0d, 0x34, 0x14, 0xd7, 0x51, 0x26, 0x8d, 0x51, 0x45,
+ 0xb0, 0x05, 0x3c, 0xfd, 0x17, 0x60, 0xe7, 0x0b, 0x88, 0xe4, 0x16, 0xf7, 0xe8, 0x3a, 0x2e, 0x45,
+ 0xb5, 0x14, 0x2a, 0x46, 0x8b, 0xe6, 0x2a, 0x74, 0xf0, 0xbb, 0x43, 0x6f, 0xbf, 0xab, 0xb4, 0x3c,
+ 0x5f, 0x4a, 0x6b, 0xdd, 0x4f, 0x74, 0xb7, 0xd8, 0xe4, 0x54, 0xa2, 0x1c, 0x90, 0x11, 0x19, 0xf7,
+ 0x8e, 0x1e, 0xf2, 0x5a, 0x69, 0x3b, 0xb8, 0x91, 0x5a, 0xbc, 0xe6, 0xd9, 0x84, 0xbf, 0xf5, 0xbf,
+ 0xc0, 0x1c, 0xdf, 0x00, 0xca, 0x99, 0xbb, 0xbe, 0xd8, 0x77, 0xf2, 0x8b, 0x7d, 0xda, 0x9c, 0x79,
+ 0x97, 0xa9, 0xee, 0x13, 0xda, 0x4b, 0x8c, 0xce, 0x94, 0x55, 0x3a, 0x06, 0x33, 0xe8, 0x8c, 0xc8,
+ 0x78, 0x6f, 0x76, 0xaf, 0x46, 0x7a, 0x27, 0xcd, 0x95, 0xd7, 0x7e, 0xe7, 0x7e, 0xa5, 0x34, 0x91,
+ 0x46, 0x46, 0x80, 0x60, 0xec, 0x60, 0x67, 0xb4, 0x33, 0xee, 0x1d, 0xbd, 0xe4, 0x37, 0xff, 0xdb,
+ 0xbc, 0xbd, 0x26, 0x3f, 0xb9, 0x8c, 0x7a, 0x11, 0xa3, 0x59, 0x35, 0x23, 0x37, 0x17, 0x5e, 0xab,
+ 0xdf, 0xf0, 0x19, 0xbd, 0x7b, 0x05, 0x71, 0xfb, 0x74, 0x27, 0x84, 0x55, 0x29, 0x69, 0xcf, 0x2b,
+ 0x3e, 0xdd, 0xfb, 0xb4, 0x9b, 0xc9, 0x65, 0x0a, 0xd5, 0x4e, 0x5e, 0x55, 0x1c, 0x77, 0xa6, 0xe4,
+ 0xe0, 0x07, 0xa1, 0xfd, 0x76, 0xff, 0xd7, 0xca, 0xa2, 0xfb, 0x61, 0x4b, 0x35, 0xbf, 0x99, 0xea,
+ 0x82, 0x2e, 0x45, 0xf7, 0xeb, 0xa9, 0x77, 0xff, 0x9e, 0xb4, 0x34, 0x7f, 0xa4, 0x5d, 0x85, 0x10,
+ 0xd9, 0x41, 0xa7, 0x54, 0x35, 0xfd, 0x5f, 0x55, 0xb3, 0x3b, 0x75, 0x93, 0xee, 0xab, 0x22, 0xce,
+ 0xab, 0x52, 0x67, 0x87, 0xeb, 0x0d, 0x73, 0xce, 0x36, 0xcc, 0x39, 0xdf, 0x30, 0xe7, 0x5b, 0xce,
+ 0xc8, 0x3a, 0x67, 0xe4, 0x2c, 0x67, 0xe4, 0x3c, 0x67, 0xe4, 0x67, 0xce, 0xc8, 0xf7, 0x5f, 0xcc,
+ 0x79, 0x7f, 0xab, 0x4e, 0xfc, 0x13, 0x00, 0x00, 0xff, 0xff, 0xaf, 0x85, 0xaa, 0xb3, 0xd3, 0x03,
+ 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/generated.proto b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/generated.proto
new file mode 100644
index 000000000..5fb696598
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/generated.proto
@@ -0,0 +1,62 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.client_go.pkg.apis.storage.v1beta1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1beta1";
+
+// StorageClass describes the parameters for a class of storage for
+// which PersistentVolumes can be dynamically provisioned.
+//
+// StorageClasses are non-namespaced; the name of the storage class
+// according to etcd is in ObjectMeta.Name.
+message StorageClass {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Provisioner indicates the type of the provisioner.
+ optional string provisioner = 2;
+
+ // Parameters holds the parameters for the provisioner that should
+ // create volumes of this storage class.
+ // +optional
+ map<string, string> parameters = 3;
+}
+
+// StorageClassList is a collection of storage classes.
+message StorageClassList {
+ // Standard list metadata
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is the list of StorageClasses
+ repeated StorageClass items = 2;
+}
+
diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/register.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/register.go
new file mode 100644
index 000000000..f10a1a572
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/register.go
@@ -0,0 +1,60 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "storage.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, RegisterDefaults)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &StorageClass{},
+ &StorageClassList{},
+ )
+
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/types.generated.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/types.generated.go
new file mode 100644
index 000000000..d9f5d5f77
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/types.generated.go
@@ -0,0 +1,985 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1beta1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ pkg2_types "k8s.io/apimachinery/pkg/types"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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 pkg1_v1.TypeMeta
+ var v1 pkg2_types.UID
+ var v2 time.Time
+ _, _, _ = v0, v1, v2
+ }
+}
+
+func (x *StorageClass) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[4] = len(x.Parameters) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Provisioner))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("provisioner"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Provisioner))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.Parameters == nil {
+ r.EncodeNil()
+ } else {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Parameters, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("parameters"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Parameters == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Parameters, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *StorageClass) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *StorageClass) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "provisioner":
+ if r.TryDecodeAsNil() {
+ x.Provisioner = ""
+ } else {
+ yyv10 := &x.Provisioner
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "parameters":
+ if r.TryDecodeAsNil() {
+ x.Parameters = nil
+ } else {
+ yyv12 := &x.Parameters
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv12, false, d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv15 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv17 := &x.APIVersion
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg1_v1.ObjectMeta{}
+ } else {
+ yyv19 := &x.ObjectMeta
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv19) {
+ } else {
+ z.DecFallback(yyv19, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Provisioner = ""
+ } else {
+ yyv21 := &x.Provisioner
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Parameters = nil
+ } else {
+ yyv23 := &x.Parameters
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv23, false, d)
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *StorageClassList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceStorageClass(([]StorageClass)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceStorageClass(([]StorageClass)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *StorageClassList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *StorageClassList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceStorageClass((*[]StorageClass)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *StorageClassList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceStorageClass((*[]StorageClass)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encSliceStorageClass(v []StorageClass, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceStorageClass(v *[]StorageClass, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []StorageClass{}
+ 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, 288)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]StorageClass, yyrl1)
+ }
+ } else {
+ yyv1 = make([]StorageClass, 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] = StorageClass{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, StorageClass{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = StorageClass{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, StorageClass{}) // var yyz1 StorageClass
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = StorageClass{}
+ } 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 = []StorageClass{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/types.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/types.go
new file mode 100644
index 000000000..8b4756784
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/types.go
@@ -0,0 +1,57 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+
+// StorageClass describes the parameters for a class of storage for
+// which PersistentVolumes can be dynamically provisioned.
+//
+// StorageClasses are non-namespaced; the name of the storage class
+// according to etcd is in ObjectMeta.Name.
+type StorageClass struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Provisioner indicates the type of the provisioner.
+ Provisioner string `json:"provisioner" protobuf:"bytes,2,opt,name=provisioner"`
+
+ // Parameters holds the parameters for the provisioner that should
+ // create volumes of this storage class.
+ // +optional
+ Parameters map[string]string `json:"parameters,omitempty" protobuf:"bytes,3,rep,name=parameters"`
+}
+
+// StorageClassList is a collection of storage classes.
+type StorageClassList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of StorageClasses
+ Items []StorageClass `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..0d43bb03c
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/types_swagger_doc_generated.go
@@ -0,0 +1,51 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_StorageClass = map[string]string{
+ "": "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "provisioner": "Provisioner indicates the type of the provisioner.",
+ "parameters": "Parameters holds the parameters for the provisioner that should create volumes of this storage class.",
+}
+
+func (StorageClass) SwaggerDoc() map[string]string {
+ return map_StorageClass
+}
+
+var map_StorageClassList = map[string]string{
+ "": "StorageClassList is a collection of storage classes.",
+ "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "items": "Items is the list of StorageClasses",
+}
+
+func (StorageClassList) SwaggerDoc() map[string]string {
+ return map_StorageClassList
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.conversion.go
new file mode 100644
index 000000000..630fff327
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.conversion.go
@@ -0,0 +1,93 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ storage "k8s.io/client-go/pkg/apis/storage"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1beta1_StorageClass_To_storage_StorageClass,
+ Convert_storage_StorageClass_To_v1beta1_StorageClass,
+ Convert_v1beta1_StorageClassList_To_storage_StorageClassList,
+ Convert_storage_StorageClassList_To_v1beta1_StorageClassList,
+ )
+}
+
+func autoConvert_v1beta1_StorageClass_To_storage_StorageClass(in *StorageClass, out *storage.StorageClass, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Provisioner = in.Provisioner
+ out.Parameters = *(*map[string]string)(unsafe.Pointer(&in.Parameters))
+ return nil
+}
+
+// Convert_v1beta1_StorageClass_To_storage_StorageClass is an autogenerated conversion function.
+func Convert_v1beta1_StorageClass_To_storage_StorageClass(in *StorageClass, out *storage.StorageClass, s conversion.Scope) error {
+ return autoConvert_v1beta1_StorageClass_To_storage_StorageClass(in, out, s)
+}
+
+func autoConvert_storage_StorageClass_To_v1beta1_StorageClass(in *storage.StorageClass, out *StorageClass, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Provisioner = in.Provisioner
+ out.Parameters = *(*map[string]string)(unsafe.Pointer(&in.Parameters))
+ return nil
+}
+
+// Convert_storage_StorageClass_To_v1beta1_StorageClass is an autogenerated conversion function.
+func Convert_storage_StorageClass_To_v1beta1_StorageClass(in *storage.StorageClass, out *StorageClass, s conversion.Scope) error {
+ return autoConvert_storage_StorageClass_To_v1beta1_StorageClass(in, out, s)
+}
+
+func autoConvert_v1beta1_StorageClassList_To_storage_StorageClassList(in *StorageClassList, out *storage.StorageClassList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]storage.StorageClass)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1beta1_StorageClassList_To_storage_StorageClassList is an autogenerated conversion function.
+func Convert_v1beta1_StorageClassList_To_storage_StorageClassList(in *StorageClassList, out *storage.StorageClassList, s conversion.Scope) error {
+ return autoConvert_v1beta1_StorageClassList_To_storage_StorageClassList(in, out, s)
+}
+
+func autoConvert_storage_StorageClassList_To_v1beta1_StorageClassList(in *storage.StorageClassList, out *StorageClassList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]StorageClass, 0)
+ } else {
+ out.Items = *(*[]StorageClass)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_storage_StorageClassList_To_v1beta1_StorageClassList is an autogenerated conversion function.
+func Convert_storage_StorageClassList_To_v1beta1_StorageClassList(in *storage.StorageClassList, out *StorageClassList, s conversion.Scope) error {
+ return autoConvert_storage_StorageClassList_To_v1beta1_StorageClassList(in, out, s)
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..1f2176994
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.deepcopy.go
@@ -0,0 +1,82 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StorageClass, InType: reflect.TypeOf(&StorageClass{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StorageClassList, InType: reflect.TypeOf(&StorageClassList{})},
+ )
+}
+
+// DeepCopy_v1beta1_StorageClass is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_StorageClass(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StorageClass)
+ out := out.(*StorageClass)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Parameters != nil {
+ in, out := &in.Parameters, &out.Parameters
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_StorageClassList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_StorageClassList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StorageClassList)
+ out := out.(*StorageClassList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]StorageClass, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_StorageClass(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.defaults.go
new file mode 100644
index 000000000..e24e70be3
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.defaults.go
@@ -0,0 +1,32 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/apis/storage/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/storage/zz_generated.deepcopy.go
new file mode 100644
index 000000000..bf8ba1b80
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/apis/storage/zz_generated.deepcopy.go
@@ -0,0 +1,82 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package storage
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_storage_StorageClass, InType: reflect.TypeOf(&StorageClass{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_storage_StorageClassList, InType: reflect.TypeOf(&StorageClassList{})},
+ )
+}
+
+// DeepCopy_storage_StorageClass is an autogenerated deepcopy function.
+func DeepCopy_storage_StorageClass(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StorageClass)
+ out := out.(*StorageClass)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Parameters != nil {
+ in, out := &in.Parameters, &out.Parameters
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_storage_StorageClassList is an autogenerated deepcopy function.
+func DeepCopy_storage_StorageClassList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StorageClassList)
+ out := out.(*StorageClassList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]StorageClass, len(*in))
+ for i := range *in {
+ if err := DeepCopy_storage_StorageClass(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/client-go/pkg/util/doc.go b/vendor/k8s.io/client-go/pkg/util/doc.go
new file mode 100644
index 000000000..1747db550
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/util/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package util implements various utility functions used in both testing and implementation
+// of Kubernetes. Package util may not depend on any other package in the Kubernetes
+// package tree.
+package util
diff --git a/vendor/k8s.io/client-go/pkg/util/parsers/parsers.go b/vendor/k8s.io/client-go/pkg/util/parsers/parsers.go
new file mode 100644
index 000000000..4e70cc682
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/util/parsers/parsers.go
@@ -0,0 +1,54 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package parsers
+
+import (
+ "fmt"
+
+ dockerref "github.com/docker/distribution/reference"
+)
+
+const (
+ DefaultImageTag = "latest"
+)
+
+// ParseImageName parses a docker image string into three parts: repo, tag and digest.
+// If both tag and digest are empty, a default image tag will be returned.
+func ParseImageName(image string) (string, string, string, error) {
+ named, err := dockerref.ParseNamed(image)
+ if err != nil {
+ return "", "", "", fmt.Errorf("couldn't parse image name: %v", err)
+ }
+
+ repoToPull := named.Name()
+ var tag, digest string
+
+ tagged, ok := named.(dockerref.Tagged)
+ if ok {
+ tag = tagged.Tag()
+ }
+
+ digested, ok := named.(dockerref.Digested)
+ if ok {
+ digest = digested.Digest().String()
+ }
+ // If no tag was specified, use the default "latest".
+ if len(tag) == 0 && len(digest) == 0 {
+ tag = DefaultImageTag
+ }
+ return repoToPull, tag, digest, nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/util/template.go b/vendor/k8s.io/client-go/pkg/util/template.go
new file mode 100644
index 000000000..d09d7dc86
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/util/template.go
@@ -0,0 +1,48 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package util
+
+import (
+ "bytes"
+ "go/doc"
+ "io"
+ "strings"
+ "text/template"
+)
+
+func wrap(indent string, s string) string {
+ var buf bytes.Buffer
+ doc.ToText(&buf, s, indent, indent+" ", 80-len(indent))
+ return buf.String()
+}
+
+// ExecuteTemplate executes templateText with data and output written to w.
+func ExecuteTemplate(w io.Writer, templateText string, data interface{}) error {
+ t := template.New("top")
+ t.Funcs(template.FuncMap{
+ "trim": strings.TrimSpace,
+ "wrap": wrap,
+ })
+ template.Must(t.Parse(templateText))
+ return t.Execute(w, data)
+}
+
+func ExecuteTemplateToString(templateText string, data interface{}) (string, error) {
+ b := bytes.Buffer{}
+ err := ExecuteTemplate(&b, templateText, data)
+ return b.String(), err
+}
diff --git a/vendor/k8s.io/client-go/pkg/util/umask.go b/vendor/k8s.io/client-go/pkg/util/umask.go
new file mode 100644
index 000000000..35ccce50b
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/util/umask.go
@@ -0,0 +1,27 @@
+// +build !windows
+
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package util
+
+import (
+ "syscall"
+)
+
+func Umask(mask int) (old int, err error) {
+ return syscall.Umask(mask), nil
+}
diff --git a/vendor/k8s.io/client-go/pkg/util/umask_windows.go b/vendor/k8s.io/client-go/pkg/util/umask_windows.go
new file mode 100644
index 000000000..7a1ba1538
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/util/umask_windows.go
@@ -0,0 +1,27 @@
+// +build windows
+
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package util
+
+import (
+ "errors"
+)
+
+func Umask(mask int) (int, error) {
+ return 0, errors.New("platform and architecture is not supported")
+}
diff --git a/vendor/k8s.io/client-go/pkg/util/util.go b/vendor/k8s.io/client-go/pkg/util/util.go
new file mode 100644
index 000000000..389e145e8
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/util/util.go
@@ -0,0 +1,140 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package util
+
+import (
+ "fmt"
+ "os"
+ "reflect"
+ "regexp"
+)
+
+// Takes a list of strings and compiles them into a list of regular expressions
+func CompileRegexps(regexpStrings []string) ([]*regexp.Regexp, error) {
+ regexps := []*regexp.Regexp{}
+ for _, regexpStr := range regexpStrings {
+ r, err := regexp.Compile(regexpStr)
+ if err != nil {
+ return []*regexp.Regexp{}, err
+ }
+ regexps = append(regexps, r)
+ }
+ return regexps, nil
+}
+
+// Detects if using systemd as the init system
+// Please note that simply reading /proc/1/cmdline can be misleading because
+// some installation of various init programs can automatically make /sbin/init
+// a symlink or even a renamed version of their main program.
+// TODO(dchen1107): realiably detects the init system using on the system:
+// systemd, upstart, initd, etc.
+func UsingSystemdInitSystem() bool {
+ if _, err := os.Stat("/run/systemd/system"); err == nil {
+ return true
+ }
+
+ return false
+}
+
+// Tests whether all pointer fields in a struct are nil. This is useful when,
+// for example, an API struct is handled by plugins which need to distinguish
+// "no plugin accepted this spec" from "this spec is empty".
+//
+// This function is only valid for structs and pointers to structs. Any other
+// type will cause a panic. Passing a typed nil pointer will return true.
+func AllPtrFieldsNil(obj interface{}) bool {
+ v := reflect.ValueOf(obj)
+ if !v.IsValid() {
+ panic(fmt.Sprintf("reflect.ValueOf() produced a non-valid Value for %#v", obj))
+ }
+ if v.Kind() == reflect.Ptr {
+ if v.IsNil() {
+ return true
+ }
+ v = v.Elem()
+ }
+ for i := 0; i < v.NumField(); i++ {
+ if v.Field(i).Kind() == reflect.Ptr && !v.Field(i).IsNil() {
+ return false
+ }
+ }
+ return true
+}
+
+func FileExists(filename string) (bool, error) {
+ if _, err := os.Stat(filename); os.IsNotExist(err) {
+ return false, nil
+ } else if err != nil {
+ return false, err
+ }
+ return true, nil
+}
+
+func FileOrSymlinkExists(filename string) (bool, error) {
+ if _, err := os.Lstat(filename); os.IsNotExist(err) {
+ return false, nil
+ } else if err != nil {
+ return false, err
+ }
+ return true, nil
+}
+
+// ReadDirNoStat returns a string of files/directories contained
+// in dirname without calling lstat on them.
+func ReadDirNoStat(dirname string) ([]string, error) {
+ if dirname == "" {
+ dirname = "."
+ }
+
+ f, err := os.Open(dirname)
+ if err != nil {
+ return nil, err
+ }
+ defer f.Close()
+
+ return f.Readdirnames(-1)
+}
+
+// IntPtr returns a pointer to an int
+func IntPtr(i int) *int {
+ o := i
+ return &o
+}
+
+// Int32Ptr returns a pointer to an int32
+func Int32Ptr(i int32) *int32 {
+ o := i
+ return &o
+}
+
+// IntPtrDerefOr dereference the int ptr and returns it i not nil,
+// else returns def.
+func IntPtrDerefOr(ptr *int, def int) int {
+ if ptr != nil {
+ return *ptr
+ }
+ return def
+}
+
+// Int32PtrDerefOr dereference the int32 ptr and returns it i not nil,
+// else returns def.
+func Int32PtrDerefOr(ptr *int32, def int32) int32 {
+ if ptr != nil {
+ return *ptr
+ }
+ return def
+}
diff --git a/vendor/k8s.io/client-go/pkg/version/base.go b/vendor/k8s.io/client-go/pkg/version/base.go
new file mode 100644
index 000000000..e9e65bcb8
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/version/base.go
@@ -0,0 +1,59 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package version
+
+// Base version information.
+//
+// This is the fallback data used when version information from git is not
+// provided via go ldflags. It provides an approximation of the Kubernetes
+// version for ad-hoc builds (e.g. `go build`) that cannot get the version
+// information from git.
+//
+// If you are looking at these fields in the git tree, they look
+// strange. They are modified on the fly by the build process. The
+// in-tree values are dummy values used for "git archive", which also
+// works for GitHub tar downloads.
+//
+// When releasing a new Kubernetes version, this file is updated by
+// build/mark_new_version.sh to reflect the new version, and then a
+// git annotated tag (using format vX.Y where X == Major version and Y
+// == Minor version) is created to point to the commit that updates
+// pkg/version/base.go
+var (
+ // TODO: Deprecate gitMajor and gitMinor, use only gitVersion
+ // instead. First step in deprecation, keep the fields but make
+ // them irrelevant. (Next we'll take it out, which may muck with
+ // scripts consuming the kubectl version output - but most of
+ // these should be looking at gitVersion already anyways.)
+ gitMajor string = "1" // major version, always numeric
+ gitMinor string = "7+" // minor version, numeric possibly followed by "+"
+
+ // semantic version, derived by build scripts (see
+ // https://github.com/kubernetes/kubernetes/blob/master/docs/design/versioning.md
+ // for a detailed discussion of this field)
+ //
+ // TODO: This field is still called "gitVersion" for legacy
+ // reasons. For prerelease versions, the build metadata on the
+ // 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.5-beta.0+$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"
+
+ buildDate string = "1970-01-01T00:00:00Z" // build date in ISO8601 format, output of $(date -u +'%Y-%m-%dT%H:%M:%SZ')
+)
diff --git a/vendor/k8s.io/client-go/pkg/version/doc.go b/vendor/k8s.io/client-go/pkg/version/doc.go
new file mode 100644
index 000000000..4bf139ce8
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/version/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package version supplies version information collected at build time to
+// kubernetes components.
+package version // import "k8s.io/client-go/pkg/version"
diff --git a/vendor/k8s.io/client-go/pkg/version/version.go b/vendor/k8s.io/client-go/pkg/version/version.go
new file mode 100644
index 000000000..8c8350d13
--- /dev/null
+++ b/vendor/k8s.io/client-go/pkg/version/version.go
@@ -0,0 +1,42 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package version
+
+import (
+ "fmt"
+ "runtime"
+
+ apimachineryversion "k8s.io/apimachinery/pkg/version"
+)
+
+// Get returns the overall codebase version. It's for detecting
+// what code a binary was built from.
+func Get() apimachineryversion.Info {
+ // These variables typically come from -ldflags settings and in
+ // their absence fallback to the settings in pkg/version/base.go
+ return apimachineryversion.Info{
+ Major: gitMajor,
+ Minor: gitMinor,
+ GitVersion: gitVersion,
+ GitCommit: gitCommit,
+ GitTreeState: gitTreeState,
+ BuildDate: buildDate,
+ GoVersion: runtime.Version(),
+ Compiler: runtime.Compiler,
+ Platform: fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH),
+ }
+}
diff --git a/vendor/k8s.io/client-go/rest/client.go b/vendor/k8s.io/client-go/rest/client.go
new file mode 100644
index 000000000..524e0d8eb
--- /dev/null
+++ b/vendor/k8s.io/client-go/rest/client.go
@@ -0,0 +1,258 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package rest
+
+import (
+ "fmt"
+ "mime"
+ "net/http"
+ "net/url"
+ "os"
+ "strconv"
+ "strings"
+ "time"
+
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/types"
+ "k8s.io/client-go/util/flowcontrol"
+)
+
+const (
+ // Environment variables: Note that the duration should be long enough that the backoff
+ // persists for some reasonable time (i.e. 120 seconds). The typical base might be "1".
+ envBackoffBase = "KUBE_CLIENT_BACKOFF_BASE"
+ envBackoffDuration = "KUBE_CLIENT_BACKOFF_DURATION"
+)
+
+// Interface captures the set of operations for generically interacting with Kubernetes REST apis.
+type Interface interface {
+ GetRateLimiter() flowcontrol.RateLimiter
+ Verb(verb string) *Request
+ Post() *Request
+ Put() *Request
+ Patch(pt types.PatchType) *Request
+ Get() *Request
+ Delete() *Request
+ APIVersion() schema.GroupVersion
+}
+
+// RESTClient imposes common Kubernetes API conventions on a set of resource paths.
+// The baseURL is expected to point to an HTTP or HTTPS path that is the parent
+// of one or more resources. The server should return a decodable API resource
+// object, or an api.Status object which contains information about the reason for
+// any failure.
+//
+// Most consumers should use client.New() to get a Kubernetes API client.
+type RESTClient struct {
+ // base is the root URL for all invocations of the client
+ base *url.URL
+ // versionedAPIPath is a path segment connecting the base URL to the resource root
+ versionedAPIPath string
+
+ // contentConfig is the information used to communicate with the server.
+ contentConfig ContentConfig
+
+ // serializers contain all serializers for underlying content type.
+ serializers Serializers
+
+ // creates BackoffManager that is passed to requests.
+ createBackoffMgr func() BackoffManager
+
+ // TODO extract this into a wrapper interface via the RESTClient interface in kubectl.
+ Throttle flowcontrol.RateLimiter
+
+ // Set specific behavior of the client. If not set http.DefaultClient will be used.
+ Client *http.Client
+}
+
+type Serializers struct {
+ Encoder runtime.Encoder
+ Decoder runtime.Decoder
+ StreamingSerializer runtime.Serializer
+ Framer runtime.Framer
+ RenegotiatedDecoder func(contentType string, params map[string]string) (runtime.Decoder, error)
+}
+
+// NewRESTClient creates a new RESTClient. This client performs generic REST functions
+// such as Get, Put, Post, and Delete on specified paths. Codec controls encoding and
+// decoding of responses from the server.
+func NewRESTClient(baseURL *url.URL, versionedAPIPath string, config ContentConfig, maxQPS float32, maxBurst int, rateLimiter flowcontrol.RateLimiter, client *http.Client) (*RESTClient, error) {
+ base := *baseURL
+ if !strings.HasSuffix(base.Path, "/") {
+ base.Path += "/"
+ }
+ base.RawQuery = ""
+ base.Fragment = ""
+
+ if config.GroupVersion == nil {
+ config.GroupVersion = &schema.GroupVersion{}
+ }
+ if len(config.ContentType) == 0 {
+ config.ContentType = "application/json"
+ }
+ serializers, err := createSerializers(config)
+ if err != nil {
+ return nil, err
+ }
+
+ var throttle flowcontrol.RateLimiter
+ if maxQPS > 0 && rateLimiter == nil {
+ throttle = flowcontrol.NewTokenBucketRateLimiter(maxQPS, maxBurst)
+ } else if rateLimiter != nil {
+ throttle = rateLimiter
+ }
+ return &RESTClient{
+ base: &base,
+ versionedAPIPath: versionedAPIPath,
+ contentConfig: config,
+ serializers: *serializers,
+ createBackoffMgr: readExpBackoffConfig,
+ Throttle: throttle,
+ Client: client,
+ }, nil
+}
+
+// GetRateLimiter returns rate limier for a given client, or nil if it's called on a nil client
+func (c *RESTClient) GetRateLimiter() flowcontrol.RateLimiter {
+ if c == nil {
+ return nil
+ }
+ return c.Throttle
+}
+
+// readExpBackoffConfig handles the internal logic of determining what the
+// backoff policy is. By default if no information is available, NoBackoff.
+// TODO Generalize this see #17727 .
+func readExpBackoffConfig() BackoffManager {
+ backoffBase := os.Getenv(envBackoffBase)
+ backoffDuration := os.Getenv(envBackoffDuration)
+
+ backoffBaseInt, errBase := strconv.ParseInt(backoffBase, 10, 64)
+ backoffDurationInt, errDuration := strconv.ParseInt(backoffDuration, 10, 64)
+ if errBase != nil || errDuration != nil {
+ return &NoBackoff{}
+ }
+ return &URLBackoff{
+ Backoff: flowcontrol.NewBackOff(
+ time.Duration(backoffBaseInt)*time.Second,
+ time.Duration(backoffDurationInt)*time.Second)}
+}
+
+// createSerializers creates all necessary serializers for given contentType.
+// TODO: the negotiated serializer passed to this method should probably return
+// serializers that control decoding and versioning without this package
+// being aware of the types. Depends on whether RESTClient must deal with
+// generic infrastructure.
+func createSerializers(config ContentConfig) (*Serializers, error) {
+ mediaTypes := config.NegotiatedSerializer.SupportedMediaTypes()
+ contentType := config.ContentType
+ mediaType, _, err := mime.ParseMediaType(contentType)
+ if err != nil {
+ return nil, fmt.Errorf("the content type specified in the client configuration is not recognized: %v", err)
+ }
+ info, ok := runtime.SerializerInfoForMediaType(mediaTypes, mediaType)
+ if !ok {
+ if len(contentType) != 0 || len(mediaTypes) == 0 {
+ return nil, fmt.Errorf("no serializers registered for %s", contentType)
+ }
+ info = mediaTypes[0]
+ }
+
+ internalGV := schema.GroupVersions{
+ {
+ Group: config.GroupVersion.Group,
+ Version: runtime.APIVersionInternal,
+ },
+ // always include the legacy group as a decoding target to handle non-error `Status` return types
+ {
+ Group: "",
+ Version: runtime.APIVersionInternal,
+ },
+ }
+
+ s := &Serializers{
+ Encoder: config.NegotiatedSerializer.EncoderForVersion(info.Serializer, *config.GroupVersion),
+ Decoder: config.NegotiatedSerializer.DecoderToVersion(info.Serializer, internalGV),
+
+ RenegotiatedDecoder: func(contentType string, params map[string]string) (runtime.Decoder, error) {
+ info, ok := runtime.SerializerInfoForMediaType(mediaTypes, contentType)
+ if !ok {
+ return nil, fmt.Errorf("serializer for %s not registered", contentType)
+ }
+ return config.NegotiatedSerializer.DecoderToVersion(info.Serializer, internalGV), nil
+ },
+ }
+ if info.StreamSerializer != nil {
+ s.StreamingSerializer = info.StreamSerializer.Serializer
+ s.Framer = info.StreamSerializer.Framer
+ }
+
+ return s, nil
+}
+
+// Verb begins a request with a verb (GET, POST, PUT, DELETE).
+//
+// Example usage of RESTClient's request building interface:
+// c, err := NewRESTClient(...)
+// if err != nil { ... }
+// resp, err := c.Verb("GET").
+// Path("pods").
+// SelectorParam("labels", "area=staging").
+// Timeout(10*time.Second).
+// Do()
+// if err != nil { ... }
+// list, ok := resp.(*api.PodList)
+//
+func (c *RESTClient) Verb(verb string) *Request {
+ backoff := c.createBackoffMgr()
+
+ if c.Client == nil {
+ return NewRequest(nil, verb, c.base, c.versionedAPIPath, c.contentConfig, c.serializers, backoff, c.Throttle)
+ }
+ return NewRequest(c.Client, verb, c.base, c.versionedAPIPath, c.contentConfig, c.serializers, backoff, c.Throttle)
+}
+
+// Post begins a POST request. Short for c.Verb("POST").
+func (c *RESTClient) Post() *Request {
+ return c.Verb("POST")
+}
+
+// Put begins a PUT request. Short for c.Verb("PUT").
+func (c *RESTClient) Put() *Request {
+ return c.Verb("PUT")
+}
+
+// Patch begins a PATCH request. Short for c.Verb("Patch").
+func (c *RESTClient) Patch(pt types.PatchType) *Request {
+ return c.Verb("PATCH").SetHeader("Content-Type", string(pt))
+}
+
+// Get begins a GET request. Short for c.Verb("GET").
+func (c *RESTClient) Get() *Request {
+ return c.Verb("GET")
+}
+
+// Delete begins a DELETE request. Short for c.Verb("DELETE").
+func (c *RESTClient) Delete() *Request {
+ return c.Verb("DELETE")
+}
+
+// APIVersion returns the APIVersion this RESTClient is expected to use.
+func (c *RESTClient) APIVersion() schema.GroupVersion {
+ return *c.contentConfig.GroupVersion
+}
diff --git a/vendor/k8s.io/client-go/rest/config.go b/vendor/k8s.io/client-go/rest/config.go
new file mode 100644
index 000000000..b45114865
--- /dev/null
+++ b/vendor/k8s.io/client-go/rest/config.go
@@ -0,0 +1,416 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package rest
+
+import (
+ "fmt"
+ "io/ioutil"
+ "net"
+ "net/http"
+ "os"
+ "path/filepath"
+ gruntime "runtime"
+ "strings"
+ "time"
+
+ "github.com/golang/glog"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/client-go/pkg/api/v1"
+ "k8s.io/client-go/pkg/version"
+ clientcmdapi "k8s.io/client-go/tools/clientcmd/api"
+ certutil "k8s.io/client-go/util/cert"
+ "k8s.io/client-go/util/flowcontrol"
+)
+
+const (
+ DefaultQPS float32 = 5.0
+ DefaultBurst int = 10
+)
+
+// Config holds the common attributes that can be passed to a Kubernetes client on
+// initialization.
+type Config struct {
+ // Host must be a host string, a host:port pair, or a URL to the base of the apiserver.
+ // If a URL is given then the (optional) Path of that URL represents a prefix that must
+ // be appended to all request URIs used to access the apiserver. This allows a frontend
+ // proxy to easily relocate all of the apiserver endpoints.
+ Host string
+ // APIPath is a sub-path that points to an API root.
+ APIPath string
+ // Prefix is the sub path of the server. If not specified, the client will set
+ // a default value. Use "/" to indicate the server root should be used
+ Prefix string
+
+ // ContentConfig contains settings that affect how objects are transformed when
+ // sent to the server.
+ ContentConfig
+
+ // Server requires Basic authentication
+ Username string
+ Password string
+
+ // Server requires Bearer authentication. This client will not attempt to use
+ // refresh tokens for an OAuth2 flow.
+ // TODO: demonstrate an OAuth2 compatible client.
+ BearerToken string
+
+ // Impersonate is the configuration that RESTClient will use for impersonation.
+ Impersonate ImpersonationConfig
+
+ // Server requires plugin-specified authentication.
+ AuthProvider *clientcmdapi.AuthProviderConfig
+
+ // Callback to persist config for AuthProvider.
+ AuthConfigPersister AuthProviderConfigPersister
+
+ // TLSClientConfig contains settings to enable transport layer security
+ TLSClientConfig
+
+ // UserAgent is an optional field that specifies the caller of this request.
+ UserAgent string
+
+ // Transport may be used for custom HTTP behavior. This attribute may not
+ // be specified with the TLS client certificate options. Use WrapTransport
+ // for most client level operations.
+ Transport http.RoundTripper
+ // WrapTransport will be invoked for custom HTTP behavior after the underlying
+ // transport is initialized (either the transport created from TLSClientConfig,
+ // Transport, or http.DefaultTransport). The config may layer other RoundTrippers
+ // on top of the returned RoundTripper.
+ WrapTransport func(rt http.RoundTripper) http.RoundTripper
+
+ // QPS indicates the maximum QPS to the master from this client.
+ // If it's zero, the created RESTClient will use DefaultQPS: 5
+ QPS float32
+
+ // Maximum burst for throttle.
+ // If it's zero, the created RESTClient will use DefaultBurst: 10.
+ Burst int
+
+ // Rate limiter for limiting connections to the master from this client. If present overwrites QPS/Burst
+ RateLimiter flowcontrol.RateLimiter
+
+ // The maximum length of time to wait before giving up on a server request. A value of zero means no timeout.
+ Timeout time.Duration
+
+ // Version forces a specific version to be used (if registered)
+ // Do we need this?
+ // Version string
+}
+
+// ImpersonationConfig has all the available impersonation options
+type ImpersonationConfig struct {
+ // UserName is the username to impersonate on each request.
+ UserName string
+ // Groups are the groups to impersonate on each request.
+ Groups []string
+ // Extra is a free-form field which can be used to link some authentication information
+ // to authorization information. This field allows you to impersonate it.
+ Extra map[string][]string
+}
+
+// TLSClientConfig contains settings to enable transport layer security
+type TLSClientConfig struct {
+ // Server should be accessed without verifying the TLS certificate. For testing only.
+ Insecure bool
+ // ServerName is passed to the server for SNI and is used in the client to check server
+ // ceritificates against. If ServerName is empty, the hostname used to contact the
+ // server is used.
+ ServerName string
+
+ // Server requires TLS client certificate authentication
+ CertFile string
+ // Server requires TLS client certificate authentication
+ KeyFile string
+ // Trusted root certificates for server
+ CAFile string
+
+ // CertData holds PEM-encoded bytes (typically read from a client certificate file).
+ // CertData takes precedence over CertFile
+ CertData []byte
+ // KeyData holds PEM-encoded bytes (typically read from a client certificate key file).
+ // KeyData takes precedence over KeyFile
+ KeyData []byte
+ // CAData holds PEM-encoded bytes (typically read from a root certificates bundle).
+ // CAData takes precedence over CAFile
+ CAData []byte
+}
+
+type ContentConfig struct {
+ // AcceptContentTypes specifies the types the client will accept and is optional.
+ // If not set, ContentType will be used to define the Accept header
+ AcceptContentTypes string
+ // ContentType specifies the wire format used to communicate with the server.
+ // This value will be set as the Accept header on requests made to the server, and
+ // as the default content type on any object sent to the server. If not set,
+ // "application/json" is used.
+ ContentType string
+ // GroupVersion is the API version to talk to. Must be provided when initializing
+ // a RESTClient directly. When initializing a Client, will be set with the default
+ // code version.
+ GroupVersion *schema.GroupVersion
+ // NegotiatedSerializer is used for obtaining encoders and decoders for multiple
+ // supported media types.
+ NegotiatedSerializer runtime.NegotiatedSerializer
+}
+
+// RESTClientFor returns a RESTClient that satisfies the requested attributes on a client Config
+// object. Note that a RESTClient may require fields that are optional when initializing a Client.
+// A RESTClient created by this method is generic - it expects to operate on an API that follows
+// the Kubernetes conventions, but may not be the Kubernetes API.
+func RESTClientFor(config *Config) (*RESTClient, error) {
+ if config.GroupVersion == nil {
+ return nil, fmt.Errorf("GroupVersion is required when initializing a RESTClient")
+ }
+ if config.NegotiatedSerializer == nil {
+ return nil, fmt.Errorf("NegotiatedSerializer is required when initializing a RESTClient")
+ }
+ qps := config.QPS
+ if config.QPS == 0.0 {
+ qps = DefaultQPS
+ }
+ burst := config.Burst
+ if config.Burst == 0 {
+ burst = DefaultBurst
+ }
+
+ baseURL, versionedAPIPath, err := defaultServerUrlFor(config)
+ if err != nil {
+ return nil, err
+ }
+
+ transport, err := TransportFor(config)
+ if err != nil {
+ return nil, err
+ }
+
+ var httpClient *http.Client
+ if transport != http.DefaultTransport {
+ httpClient = &http.Client{Transport: transport}
+ if config.Timeout > 0 {
+ httpClient.Timeout = config.Timeout
+ }
+ }
+
+ return NewRESTClient(baseURL, versionedAPIPath, config.ContentConfig, qps, burst, config.RateLimiter, httpClient)
+}
+
+// UnversionedRESTClientFor is the same as RESTClientFor, except that it allows
+// the config.Version to be empty.
+func UnversionedRESTClientFor(config *Config) (*RESTClient, error) {
+ if config.NegotiatedSerializer == nil {
+ return nil, fmt.Errorf("NeogitatedSerializer is required when initializing a RESTClient")
+ }
+
+ baseURL, versionedAPIPath, err := defaultServerUrlFor(config)
+ if err != nil {
+ return nil, err
+ }
+
+ transport, err := TransportFor(config)
+ if err != nil {
+ return nil, err
+ }
+
+ var httpClient *http.Client
+ if transport != http.DefaultTransport {
+ httpClient = &http.Client{Transport: transport}
+ if config.Timeout > 0 {
+ httpClient.Timeout = config.Timeout
+ }
+ }
+
+ versionConfig := config.ContentConfig
+ if versionConfig.GroupVersion == nil {
+ v := metav1.SchemeGroupVersion
+ versionConfig.GroupVersion = &v
+ }
+
+ return NewRESTClient(baseURL, versionedAPIPath, versionConfig, config.QPS, config.Burst, config.RateLimiter, httpClient)
+}
+
+// SetKubernetesDefaults sets default values on the provided client config for accessing the
+// Kubernetes API or returns an error if any of the defaults are impossible or invalid.
+func SetKubernetesDefaults(config *Config) error {
+ if len(config.UserAgent) == 0 {
+ config.UserAgent = DefaultKubernetesUserAgent()
+ }
+ return nil
+}
+
+// adjustCommit returns sufficient significant figures of the commit's git hash.
+func adjustCommit(c string) string {
+ if len(c) == 0 {
+ return "unknown"
+ }
+ if len(c) > 7 {
+ return c[:7]
+ }
+ return c
+}
+
+// adjustVersion strips "alpha", "beta", etc. from version in form
+// major.minor.patch-[alpha|beta|etc].
+func adjustVersion(v string) string {
+ if len(v) == 0 {
+ return "unknown"
+ }
+ seg := strings.SplitN(v, "-", 2)
+ return seg[0]
+}
+
+// adjustCommand returns the last component of the
+// OS-specific command path for use in User-Agent.
+func adjustCommand(p string) string {
+ // Unlikely, but better than returning "".
+ if len(p) == 0 {
+ return "unknown"
+ }
+ return filepath.Base(p)
+}
+
+// buildUserAgent builds a User-Agent string from given args.
+func buildUserAgent(command, version, os, arch, commit string) string {
+ return fmt.Sprintf(
+ "%s/%s (%s/%s) kubernetes/%s", command, version, os, arch, commit)
+}
+
+// DefaultKubernetesUserAgent returns a User-Agent string built from static global vars.
+func DefaultKubernetesUserAgent() string {
+ return buildUserAgent(
+ adjustCommand(os.Args[0]),
+ adjustVersion(version.Get().GitVersion),
+ gruntime.GOOS,
+ gruntime.GOARCH,
+ adjustCommit(version.Get().GitCommit))
+}
+
+// InClusterConfig returns a config object which uses the service account
+// kubernetes gives to pods. It's intended for clients that expect to be
+// running inside a pod running on kubernetes. It will return an error if
+// called from a process not running in a kubernetes environment.
+func InClusterConfig() (*Config, error) {
+ host, port := os.Getenv("KUBERNETES_SERVICE_HOST"), os.Getenv("KUBERNETES_SERVICE_PORT")
+ if len(host) == 0 || len(port) == 0 {
+ return nil, fmt.Errorf("unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined")
+ }
+
+ token, err := ioutil.ReadFile("/var/run/secrets/kubernetes.io/serviceaccount/" + v1.ServiceAccountTokenKey)
+ if err != nil {
+ return nil, err
+ }
+ tlsClientConfig := TLSClientConfig{}
+ rootCAFile := "/var/run/secrets/kubernetes.io/serviceaccount/" + v1.ServiceAccountRootCAKey
+ if _, err := certutil.NewPool(rootCAFile); err != nil {
+ glog.Errorf("Expected to load root CA config from %s, but got err: %v", rootCAFile, err)
+ } else {
+ tlsClientConfig.CAFile = rootCAFile
+ }
+
+ return &Config{
+ // TODO: switch to using cluster DNS.
+ Host: "https://" + net.JoinHostPort(host, port),
+ BearerToken: string(token),
+ TLSClientConfig: tlsClientConfig,
+ }, nil
+}
+
+// IsConfigTransportTLS returns true if and only if the provided
+// config will result in a protected connection to the server when it
+// is passed to restclient.RESTClientFor(). Use to determine when to
+// send credentials over the wire.
+//
+// Note: the Insecure flag is ignored when testing for this value, so MITM attacks are
+// still possible.
+func IsConfigTransportTLS(config Config) bool {
+ baseURL, _, err := defaultServerUrlFor(&config)
+ if err != nil {
+ return false
+ }
+ return baseURL.Scheme == "https"
+}
+
+// LoadTLSFiles copies the data from the CertFile, KeyFile, and CAFile fields into the CertData,
+// KeyData, and CAFile fields, or returns an error. If no error is returned, all three fields are
+// either populated or were empty to start.
+func LoadTLSFiles(c *Config) error {
+ var err error
+ c.CAData, err = dataFromSliceOrFile(c.CAData, c.CAFile)
+ if err != nil {
+ return err
+ }
+
+ c.CertData, err = dataFromSliceOrFile(c.CertData, c.CertFile)
+ if err != nil {
+ return err
+ }
+
+ c.KeyData, err = dataFromSliceOrFile(c.KeyData, c.KeyFile)
+ if err != nil {
+ return err
+ }
+ return nil
+}
+
+// dataFromSliceOrFile returns data from the slice (if non-empty), or from the file,
+// or an error if an error occurred reading the file
+func dataFromSliceOrFile(data []byte, file string) ([]byte, error) {
+ if len(data) > 0 {
+ return data, nil
+ }
+ if len(file) > 0 {
+ fileData, err := ioutil.ReadFile(file)
+ if err != nil {
+ return []byte{}, err
+ }
+ return fileData, nil
+ }
+ return nil, nil
+}
+
+func AddUserAgent(config *Config, userAgent string) *Config {
+ fullUserAgent := DefaultKubernetesUserAgent() + "/" + userAgent
+ config.UserAgent = fullUserAgent
+ return config
+}
+
+// AnonymousClientConfig returns a copy of the given config with all user credentials (cert/key, bearer token, and username/password) removed
+func AnonymousClientConfig(config *Config) *Config {
+ // copy only known safe fields
+ return &Config{
+ Host: config.Host,
+ APIPath: config.APIPath,
+ Prefix: config.Prefix,
+ ContentConfig: config.ContentConfig,
+ TLSClientConfig: TLSClientConfig{
+ Insecure: config.Insecure,
+ ServerName: config.ServerName,
+ CAFile: config.TLSClientConfig.CAFile,
+ CAData: config.TLSClientConfig.CAData,
+ },
+ RateLimiter: config.RateLimiter,
+ UserAgent: config.UserAgent,
+ Transport: config.Transport,
+ WrapTransport: config.WrapTransport,
+ QPS: config.QPS,
+ Burst: config.Burst,
+ Timeout: config.Timeout,
+ }
+}
diff --git a/vendor/k8s.io/client-go/rest/plugin.go b/vendor/k8s.io/client-go/rest/plugin.go
new file mode 100644
index 000000000..cf8fbabfd
--- /dev/null
+++ b/vendor/k8s.io/client-go/rest/plugin.go
@@ -0,0 +1,73 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package rest
+
+import (
+ "fmt"
+ "net/http"
+ "sync"
+
+ "github.com/golang/glog"
+
+ clientcmdapi "k8s.io/client-go/tools/clientcmd/api"
+)
+
+type AuthProvider interface {
+ // WrapTransport allows the plugin to create a modified RoundTripper that
+ // attaches authorization headers (or other info) to requests.
+ WrapTransport(http.RoundTripper) http.RoundTripper
+ // Login allows the plugin to initialize its configuration. It must not
+ // require direct user interaction.
+ Login() error
+}
+
+// Factory generates an AuthProvider plugin.
+// clusterAddress is the address of the current cluster.
+// config is the initial configuration for this plugin.
+// persister allows the plugin to save updated configuration.
+type Factory func(clusterAddress string, config map[string]string, persister AuthProviderConfigPersister) (AuthProvider, error)
+
+// AuthProviderConfigPersister allows a plugin to persist configuration info
+// for just itself.
+type AuthProviderConfigPersister interface {
+ Persist(map[string]string) error
+}
+
+// All registered auth provider plugins.
+var pluginsLock sync.Mutex
+var plugins = make(map[string]Factory)
+
+func RegisterAuthProviderPlugin(name string, plugin Factory) error {
+ pluginsLock.Lock()
+ defer pluginsLock.Unlock()
+ if _, found := plugins[name]; found {
+ return fmt.Errorf("Auth Provider Plugin %q was registered twice", name)
+ }
+ glog.V(4).Infof("Registered Auth Provider Plugin %q", name)
+ plugins[name] = plugin
+ return nil
+}
+
+func GetAuthProvider(clusterAddress string, apc *clientcmdapi.AuthProviderConfig, persister AuthProviderConfigPersister) (AuthProvider, error) {
+ pluginsLock.Lock()
+ defer pluginsLock.Unlock()
+ p, ok := plugins[apc.Name]
+ if !ok {
+ return nil, fmt.Errorf("No Auth Provider found for name %q", apc.Name)
+ }
+ return p(clusterAddress, apc.Config, persister)
+}
diff --git a/vendor/k8s.io/client-go/rest/request.go b/vendor/k8s.io/client-go/rest/request.go
new file mode 100644
index 000000000..cfb4511ba
--- /dev/null
+++ b/vendor/k8s.io/client-go/rest/request.go
@@ -0,0 +1,1250 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package rest
+
+import (
+ "bytes"
+ "context"
+ "encoding/hex"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "mime"
+ "net/http"
+ "net/url"
+ "path"
+ "reflect"
+ "strconv"
+ "strings"
+ "time"
+
+ "github.com/golang/glog"
+ "k8s.io/apimachinery/pkg/api/errors"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/fields"
+ "k8s.io/apimachinery/pkg/labels"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/runtime/serializer/streaming"
+ "k8s.io/apimachinery/pkg/util/net"
+ "k8s.io/apimachinery/pkg/util/sets"
+ "k8s.io/apimachinery/pkg/watch"
+ "k8s.io/client-go/pkg/api/v1"
+ restclientwatch "k8s.io/client-go/rest/watch"
+ "k8s.io/client-go/tools/metrics"
+ "k8s.io/client-go/util/flowcontrol"
+)
+
+var (
+ // specialParams lists parameters that are handled specially and which users of Request
+ // are therefore not allowed to set manually.
+ specialParams = sets.NewString("timeout")
+
+ // longThrottleLatency defines threshold for logging requests. All requests being
+ // throttle for more than longThrottleLatency will be logged.
+ longThrottleLatency = 50 * time.Millisecond
+)
+
+// HTTPClient is an interface for testing a request object.
+type HTTPClient interface {
+ Do(req *http.Request) (*http.Response, error)
+}
+
+// ResponseWrapper is an interface for getting a response.
+// The response may be either accessed as a raw data (the whole output is put into memory) or as a stream.
+type ResponseWrapper interface {
+ DoRaw() ([]byte, error)
+ Stream() (io.ReadCloser, error)
+}
+
+// RequestConstructionError is returned when there's an error assembling a request.
+type RequestConstructionError struct {
+ Err error
+}
+
+// Error returns a textual description of 'r'.
+func (r *RequestConstructionError) Error() string {
+ return fmt.Sprintf("request construction error: '%v'", r.Err)
+}
+
+// Request allows for building up a request to a server in a chained fashion.
+// Any errors are stored until the end of your call, so you only have to
+// check once.
+type Request struct {
+ // required
+ client HTTPClient
+ verb string
+
+ baseURL *url.URL
+ content ContentConfig
+ serializers Serializers
+
+ // generic components accessible via method setters
+ pathPrefix string
+ subpath string
+ params url.Values
+ headers http.Header
+
+ // structural elements of the request that are part of the Kubernetes API conventions
+ namespace string
+ namespaceSet bool
+ resource string
+ resourceName string
+ subresource string
+ timeout time.Duration
+
+ // output
+ err error
+ body io.Reader
+
+ // This is only used for per-request timeouts, deadlines, and cancellations.
+ ctx context.Context
+
+ backoffMgr BackoffManager
+ throttle flowcontrol.RateLimiter
+}
+
+// NewRequest creates a new request helper object for accessing runtime.Objects on a server.
+func NewRequest(client HTTPClient, verb string, baseURL *url.URL, versionedAPIPath string, content ContentConfig, serializers Serializers, backoff BackoffManager, throttle flowcontrol.RateLimiter) *Request {
+ if backoff == nil {
+ glog.V(2).Infof("Not implementing request backoff strategy.")
+ backoff = &NoBackoff{}
+ }
+
+ pathPrefix := "/"
+ if baseURL != nil {
+ pathPrefix = path.Join(pathPrefix, baseURL.Path)
+ }
+ r := &Request{
+ client: client,
+ verb: verb,
+ baseURL: baseURL,
+ pathPrefix: path.Join(pathPrefix, versionedAPIPath),
+ content: content,
+ serializers: serializers,
+ backoffMgr: backoff,
+ throttle: throttle,
+ }
+ switch {
+ case len(content.AcceptContentTypes) > 0:
+ r.SetHeader("Accept", content.AcceptContentTypes)
+ case len(content.ContentType) > 0:
+ r.SetHeader("Accept", content.ContentType+", */*")
+ }
+ return r
+}
+
+// Prefix adds segments to the relative beginning to the request path. These
+// items will be placed before the optional Namespace, Resource, or Name sections.
+// Setting AbsPath will clear any previously set Prefix segments
+func (r *Request) Prefix(segments ...string) *Request {
+ if r.err != nil {
+ return r
+ }
+ r.pathPrefix = path.Join(r.pathPrefix, path.Join(segments...))
+ return r
+}
+
+// Suffix appends segments to the end of the path. These items will be placed after the prefix and optional
+// Namespace, Resource, or Name sections.
+func (r *Request) Suffix(segments ...string) *Request {
+ if r.err != nil {
+ return r
+ }
+ r.subpath = path.Join(r.subpath, path.Join(segments...))
+ return r
+}
+
+// Resource sets the resource to access (<resource>/[ns/<namespace>/]<name>)
+func (r *Request) Resource(resource string) *Request {
+ if r.err != nil {
+ return r
+ }
+ if len(r.resource) != 0 {
+ r.err = fmt.Errorf("resource already set to %q, cannot change to %q", r.resource, resource)
+ return r
+ }
+ if msgs := IsValidPathSegmentName(resource); len(msgs) != 0 {
+ r.err = fmt.Errorf("invalid resource %q: %v", resource, msgs)
+ return r
+ }
+ r.resource = resource
+ return r
+}
+
+// SubResource sets a sub-resource path which can be multiple segments segment after the resource
+// name but before the suffix.
+func (r *Request) SubResource(subresources ...string) *Request {
+ if r.err != nil {
+ return r
+ }
+ subresource := path.Join(subresources...)
+ if len(r.subresource) != 0 {
+ r.err = fmt.Errorf("subresource already set to %q, cannot change to %q", r.resource, subresource)
+ return r
+ }
+ for _, s := range subresources {
+ if msgs := IsValidPathSegmentName(s); len(msgs) != 0 {
+ r.err = fmt.Errorf("invalid subresource %q: %v", s, msgs)
+ return r
+ }
+ }
+ r.subresource = subresource
+ return r
+}
+
+// Name sets the name of a resource to access (<resource>/[ns/<namespace>/]<name>)
+func (r *Request) Name(resourceName string) *Request {
+ if r.err != nil {
+ return r
+ }
+ if len(resourceName) == 0 {
+ r.err = fmt.Errorf("resource name may not be empty")
+ return r
+ }
+ if len(r.resourceName) != 0 {
+ r.err = fmt.Errorf("resource name already set to %q, cannot change to %q", r.resourceName, resourceName)
+ return r
+ }
+ if msgs := IsValidPathSegmentName(resourceName); len(msgs) != 0 {
+ r.err = fmt.Errorf("invalid resource name %q: %v", resourceName, msgs)
+ return r
+ }
+ r.resourceName = resourceName
+ return r
+}
+
+// Namespace applies the namespace scope to a request (<resource>/[ns/<namespace>/]<name>)
+func (r *Request) Namespace(namespace string) *Request {
+ if r.err != nil {
+ return r
+ }
+ if r.namespaceSet {
+ r.err = fmt.Errorf("namespace already set to %q, cannot change to %q", r.namespace, namespace)
+ return r
+ }
+ if msgs := IsValidPathSegmentName(namespace); len(msgs) != 0 {
+ r.err = fmt.Errorf("invalid namespace %q: %v", namespace, msgs)
+ return r
+ }
+ r.namespaceSet = true
+ r.namespace = namespace
+ return r
+}
+
+// NamespaceIfScoped is a convenience function to set a namespace if scoped is true
+func (r *Request) NamespaceIfScoped(namespace string, scoped bool) *Request {
+ if scoped {
+ return r.Namespace(namespace)
+ }
+ return r
+}
+
+// AbsPath overwrites an existing path with the segments provided. Trailing slashes are preserved
+// when a single segment is passed.
+func (r *Request) AbsPath(segments ...string) *Request {
+ if r.err != nil {
+ return r
+ }
+ r.pathPrefix = path.Join(r.baseURL.Path, path.Join(segments...))
+ if len(segments) == 1 && (len(r.baseURL.Path) > 1 || len(segments[0]) > 1) && strings.HasSuffix(segments[0], "/") {
+ // preserve any trailing slashes for legacy behavior
+ r.pathPrefix += "/"
+ }
+ return r
+}
+
+// RequestURI overwrites existing path and parameters with the value of the provided server relative
+// URI. Some parameters (those in specialParameters) cannot be overwritten.
+func (r *Request) RequestURI(uri string) *Request {
+ if r.err != nil {
+ return r
+ }
+ locator, err := url.Parse(uri)
+ if err != nil {
+ r.err = err
+ return r
+ }
+ r.pathPrefix = locator.Path
+ if len(locator.Query()) > 0 {
+ if r.params == nil {
+ r.params = make(url.Values)
+ }
+ for k, v := range locator.Query() {
+ r.params[k] = v
+ }
+ }
+ return r
+}
+
+const (
+ // A constant that clients can use to refer in a field selector to the object name field.
+ // Will be automatically emitted as the correct name for the API version.
+ nodeUnschedulable = "spec.unschedulable"
+ objectNameField = "metadata.name"
+ podHost = "spec.nodeName"
+ podStatus = "status.phase"
+ secretType = "type"
+
+ eventReason = "reason"
+ eventSource = "source"
+ eventType = "type"
+ eventInvolvedKind = "involvedObject.kind"
+ eventInvolvedNamespace = "involvedObject.namespace"
+ eventInvolvedName = "involvedObject.name"
+ eventInvolvedUID = "involvedObject.uid"
+ eventInvolvedAPIVersion = "involvedObject.apiVersion"
+ eventInvolvedResourceVersion = "involvedObject.resourceVersion"
+ eventInvolvedFieldPath = "involvedObject.fieldPath"
+)
+
+type clientFieldNameToAPIVersionFieldName map[string]string
+
+func (c clientFieldNameToAPIVersionFieldName) filterField(field, value string) (newField, newValue string, err error) {
+ newFieldName, ok := c[field]
+ if !ok {
+ return "", "", fmt.Errorf("%v - %v - no field mapping defined", field, value)
+ }
+ return newFieldName, value, nil
+}
+
+type resourceTypeToFieldMapping map[string]clientFieldNameToAPIVersionFieldName
+
+func (r resourceTypeToFieldMapping) filterField(resourceType, field, value string) (newField, newValue string, err error) {
+ fMapping, ok := r[resourceType]
+ if !ok {
+ return "", "", fmt.Errorf("%v - %v - %v - no field mapping defined", resourceType, field, value)
+ }
+ return fMapping.filterField(field, value)
+}
+
+type versionToResourceToFieldMapping map[schema.GroupVersion]resourceTypeToFieldMapping
+
+// filterField transforms the given field/value selector for the given groupVersion and resource
+func (v versionToResourceToFieldMapping) filterField(groupVersion *schema.GroupVersion, resourceType, field, value string) (newField, newValue string, err error) {
+ rMapping, ok := v[*groupVersion]
+ if !ok {
+ // no groupVersion overrides registered, default to identity mapping
+ return field, value, nil
+ }
+ newField, newValue, err = rMapping.filterField(resourceType, field, value)
+ if err != nil {
+ // no groupVersionResource overrides registered, default to identity mapping
+ return field, value, nil
+ }
+ return newField, newValue, nil
+}
+
+var fieldMappings = versionToResourceToFieldMapping{
+ v1.SchemeGroupVersion: resourceTypeToFieldMapping{
+ "nodes": clientFieldNameToAPIVersionFieldName{
+ objectNameField: objectNameField,
+ nodeUnschedulable: nodeUnschedulable,
+ },
+ "pods": clientFieldNameToAPIVersionFieldName{
+ objectNameField: objectNameField,
+ podHost: podHost,
+ podStatus: podStatus,
+ },
+ "secrets": clientFieldNameToAPIVersionFieldName{
+ secretType: secretType,
+ },
+ "serviceAccounts": clientFieldNameToAPIVersionFieldName{
+ objectNameField: objectNameField,
+ },
+ "endpoints": clientFieldNameToAPIVersionFieldName{
+ objectNameField: objectNameField,
+ },
+ "events": clientFieldNameToAPIVersionFieldName{
+ objectNameField: objectNameField,
+ eventReason: eventReason,
+ eventSource: eventSource,
+ eventType: eventType,
+ eventInvolvedKind: eventInvolvedKind,
+ eventInvolvedNamespace: eventInvolvedNamespace,
+ eventInvolvedName: eventInvolvedName,
+ eventInvolvedUID: eventInvolvedUID,
+ eventInvolvedAPIVersion: eventInvolvedAPIVersion,
+ eventInvolvedResourceVersion: eventInvolvedResourceVersion,
+ eventInvolvedFieldPath: eventInvolvedFieldPath,
+ },
+ },
+}
+
+// FieldsSelectorParam adds the given selector as a query parameter with the name paramName.
+func (r *Request) FieldsSelectorParam(s fields.Selector) *Request {
+ if r.err != nil {
+ return r
+ }
+ if s == nil {
+ return r
+ }
+ if s.Empty() {
+ return r
+ }
+ s2, err := s.Transform(func(field, value string) (newField, newValue string, err error) {
+ return fieldMappings.filterField(r.content.GroupVersion, r.resource, field, value)
+ })
+ if err != nil {
+ r.err = err
+ return r
+ }
+ return r.setParam(metav1.FieldSelectorQueryParam(r.content.GroupVersion.String()), s2.String())
+}
+
+// LabelsSelectorParam adds the given selector as a query parameter
+func (r *Request) LabelsSelectorParam(s labels.Selector) *Request {
+ if r.err != nil {
+ return r
+ }
+ if s == nil {
+ return r
+ }
+ if s.Empty() {
+ return r
+ }
+ return r.setParam(metav1.LabelSelectorQueryParam(r.content.GroupVersion.String()), s.String())
+}
+
+// UintParam creates a query parameter with the given value.
+func (r *Request) UintParam(paramName string, u uint64) *Request {
+ if r.err != nil {
+ return r
+ }
+ return r.setParam(paramName, strconv.FormatUint(u, 10))
+}
+
+// Param creates a query parameter with the given string value.
+func (r *Request) Param(paramName, s string) *Request {
+ if r.err != nil {
+ return r
+ }
+ return r.setParam(paramName, s)
+}
+
+// VersionedParams will take the provided object, serialize it to a map[string][]string using the
+// implicit RESTClient API version and the default parameter codec, and then add those as parameters
+// to the request. Use this to provide versioned query parameters from client libraries.
+func (r *Request) VersionedParams(obj runtime.Object, codec runtime.ParameterCodec) *Request {
+ if r.err != nil {
+ return r
+ }
+ params, err := codec.EncodeParameters(obj, *r.content.GroupVersion)
+ if err != nil {
+ r.err = err
+ return r
+ }
+ for k, v := range params {
+ for _, value := range v {
+ // TODO: Move it to setParam method, once we get rid of
+ // FieldSelectorParam & LabelSelectorParam methods.
+ if k == metav1.LabelSelectorQueryParam(r.content.GroupVersion.String()) && value == "" {
+ // Don't set an empty selector for backward compatibility.
+ // Since there is no way to get the difference between empty
+ // and unspecified string, we don't set it to avoid having
+ // labelSelector= param in every request.
+ continue
+ }
+ if k == metav1.FieldSelectorQueryParam(r.content.GroupVersion.String()) {
+ if len(value) == 0 {
+ // Don't set an empty selector for backward compatibility.
+ // Since there is no way to get the difference between empty
+ // and unspecified string, we don't set it to avoid having
+ // fieldSelector= param in every request.
+ continue
+ }
+ // TODO: Filtering should be handled somewhere else.
+ selector, err := fields.ParseSelector(value)
+ if err != nil {
+ r.err = fmt.Errorf("unparsable field selector: %v", err)
+ return r
+ }
+ filteredSelector, err := selector.Transform(
+ func(field, value string) (newField, newValue string, err error) {
+ return fieldMappings.filterField(r.content.GroupVersion, r.resource, field, value)
+ })
+ if err != nil {
+ r.err = fmt.Errorf("untransformable field selector: %v", err)
+ return r
+ }
+ value = filteredSelector.String()
+ }
+
+ r.setParam(k, value)
+ }
+ }
+ return r
+}
+
+func (r *Request) setParam(paramName, value string) *Request {
+ if specialParams.Has(paramName) {
+ r.err = fmt.Errorf("must set %v through the corresponding function, not directly.", paramName)
+ return r
+ }
+ if r.params == nil {
+ r.params = make(url.Values)
+ }
+ r.params[paramName] = append(r.params[paramName], value)
+ return r
+}
+
+func (r *Request) SetHeader(key, value string) *Request {
+ if r.headers == nil {
+ r.headers = http.Header{}
+ }
+ r.headers.Set(key, value)
+ return r
+}
+
+// Timeout makes the request use the given duration as a timeout. Sets the "timeout"
+// parameter.
+func (r *Request) Timeout(d time.Duration) *Request {
+ if r.err != nil {
+ return r
+ }
+ r.timeout = d
+ return r
+}
+
+// Body makes the request use obj as the body. Optional.
+// If obj is a string, try to read a file of that name.
+// If obj is a []byte, send it directly.
+// If obj is an io.Reader, use it directly.
+// If obj is a runtime.Object, marshal it correctly, and set Content-Type header.
+// If obj is a runtime.Object and nil, do nothing.
+// Otherwise, set an error.
+func (r *Request) Body(obj interface{}) *Request {
+ if r.err != nil {
+ return r
+ }
+ switch t := obj.(type) {
+ case string:
+ data, err := ioutil.ReadFile(t)
+ if err != nil {
+ r.err = err
+ return r
+ }
+ glogBody("Request Body", data)
+ r.body = bytes.NewReader(data)
+ case []byte:
+ glogBody("Request Body", t)
+ r.body = bytes.NewReader(t)
+ case io.Reader:
+ r.body = t
+ case runtime.Object:
+ // callers may pass typed interface pointers, therefore we must check nil with reflection
+ if reflect.ValueOf(t).IsNil() {
+ return r
+ }
+ data, err := runtime.Encode(r.serializers.Encoder, t)
+ if err != nil {
+ r.err = err
+ return r
+ }
+ glogBody("Request Body", data)
+ r.body = bytes.NewReader(data)
+ r.SetHeader("Content-Type", r.content.ContentType)
+ default:
+ r.err = fmt.Errorf("unknown type used for body: %+v", obj)
+ }
+ return r
+}
+
+// Context adds a context to the request. Contexts are only used for
+// timeouts, deadlines, and cancellations.
+func (r *Request) Context(ctx context.Context) *Request {
+ r.ctx = ctx
+ return r
+}
+
+// URL returns the current working URL.
+func (r *Request) URL() *url.URL {
+ p := r.pathPrefix
+ if r.namespaceSet && len(r.namespace) > 0 {
+ p = path.Join(p, "namespaces", r.namespace)
+ }
+ if len(r.resource) != 0 {
+ p = path.Join(p, strings.ToLower(r.resource))
+ }
+ // Join trims trailing slashes, so preserve r.pathPrefix's trailing slash for backwards compatibility if nothing was changed
+ if len(r.resourceName) != 0 || len(r.subpath) != 0 || len(r.subresource) != 0 {
+ p = path.Join(p, r.resourceName, r.subresource, r.subpath)
+ }
+
+ finalURL := &url.URL{}
+ if r.baseURL != nil {
+ *finalURL = *r.baseURL
+ }
+ finalURL.Path = p
+
+ query := url.Values{}
+ for key, values := range r.params {
+ for _, value := range values {
+ query.Add(key, value)
+ }
+ }
+
+ // timeout is handled specially here.
+ if r.timeout != 0 {
+ query.Set("timeout", r.timeout.String())
+ }
+ finalURL.RawQuery = query.Encode()
+ return finalURL
+}
+
+// finalURLTemplate is similar to URL(), but will make all specific parameter values equal
+// - instead of name or namespace, "{name}" and "{namespace}" will be used, and all query
+// parameters will be reset. This creates a copy of the request so as not to change the
+// underyling object. This means some useful request info (like the types of field
+// selectors in use) will be lost.
+// TODO: preserve field selector keys
+func (r Request) finalURLTemplate() url.URL {
+ if len(r.resourceName) != 0 {
+ r.resourceName = "{name}"
+ }
+ if r.namespaceSet && len(r.namespace) != 0 {
+ r.namespace = "{namespace}"
+ }
+ newParams := url.Values{}
+ v := []string{"{value}"}
+ for k := range r.params {
+ newParams[k] = v
+ }
+ r.params = newParams
+ url := r.URL()
+ return *url
+}
+
+func (r *Request) tryThrottle() {
+ now := time.Now()
+ if r.throttle != nil {
+ r.throttle.Accept()
+ }
+ if latency := time.Since(now); latency > longThrottleLatency {
+ glog.V(4).Infof("Throttling request took %v, request: %s:%s", latency, r.verb, r.URL().String())
+ }
+}
+
+// Watch attempts to begin watching the requested location.
+// Returns a watch.Interface, or an error.
+func (r *Request) Watch() (watch.Interface, error) {
+ // We specifically don't want to rate limit watches, so we
+ // don't use r.throttle here.
+ if r.err != nil {
+ return nil, r.err
+ }
+ if r.serializers.Framer == nil {
+ return nil, fmt.Errorf("watching resources is not possible with this client (content-type: %s)", r.content.ContentType)
+ }
+
+ url := r.URL().String()
+ req, err := http.NewRequest(r.verb, url, r.body)
+ if err != nil {
+ return nil, err
+ }
+ if r.ctx != nil {
+ req = req.WithContext(r.ctx)
+ }
+ req.Header = r.headers
+ client := r.client
+ if client == nil {
+ client = http.DefaultClient
+ }
+ r.backoffMgr.Sleep(r.backoffMgr.CalculateBackoff(r.URL()))
+ resp, err := client.Do(req)
+ updateURLMetrics(r, resp, err)
+ if r.baseURL != nil {
+ if err != nil {
+ r.backoffMgr.UpdateBackoff(r.baseURL, err, 0)
+ } else {
+ r.backoffMgr.UpdateBackoff(r.baseURL, err, resp.StatusCode)
+ }
+ }
+ if err != nil {
+ // The watch stream mechanism handles many common partial data errors, so closed
+ // connections can be retried in many cases.
+ if net.IsProbableEOF(err) {
+ return watch.NewEmptyWatch(), nil
+ }
+ return nil, err
+ }
+ if resp.StatusCode != http.StatusOK {
+ defer resp.Body.Close()
+ if result := r.transformResponse(resp, req); result.err != nil {
+ return nil, result.err
+ }
+ return nil, fmt.Errorf("for request '%+v', got status: %v", url, resp.StatusCode)
+ }
+ framer := r.serializers.Framer.NewFrameReader(resp.Body)
+ decoder := streaming.NewDecoder(framer, r.serializers.StreamingSerializer)
+ return watch.NewStreamWatcher(restclientwatch.NewDecoder(decoder, r.serializers.Decoder)), nil
+}
+
+// updateURLMetrics is a convenience function for pushing metrics.
+// It also handles corner cases for incomplete/invalid request data.
+func updateURLMetrics(req *Request, resp *http.Response, err error) {
+ url := "none"
+ if req.baseURL != nil {
+ url = req.baseURL.Host
+ }
+
+ // Errors can be arbitrary strings. Unbound label cardinality is not suitable for a metric
+ // system so we just report them as `<error>`.
+ if err != nil {
+ metrics.RequestResult.Increment("<error>", req.verb, url)
+ } else {
+ //Metrics for failure codes
+ metrics.RequestResult.Increment(strconv.Itoa(resp.StatusCode), req.verb, url)
+ }
+}
+
+// Stream formats and executes the request, and offers streaming of the response.
+// Returns io.ReadCloser which could be used for streaming of the response, or an error
+// Any non-2xx http status code causes an error. If we get a non-2xx code, we try to convert the body into an APIStatus object.
+// If we can, we return that as an error. Otherwise, we create an error that lists the http status and the content of the response.
+func (r *Request) Stream() (io.ReadCloser, error) {
+ if r.err != nil {
+ return nil, r.err
+ }
+
+ r.tryThrottle()
+
+ url := r.URL().String()
+ req, err := http.NewRequest(r.verb, url, nil)
+ if err != nil {
+ return nil, err
+ }
+ if r.ctx != nil {
+ req = req.WithContext(r.ctx)
+ }
+ req.Header = r.headers
+ client := r.client
+ if client == nil {
+ client = http.DefaultClient
+ }
+ r.backoffMgr.Sleep(r.backoffMgr.CalculateBackoff(r.URL()))
+ resp, err := client.Do(req)
+ updateURLMetrics(r, resp, err)
+ if r.baseURL != nil {
+ if err != nil {
+ r.backoffMgr.UpdateBackoff(r.URL(), err, 0)
+ } else {
+ r.backoffMgr.UpdateBackoff(r.URL(), err, resp.StatusCode)
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+
+ switch {
+ case (resp.StatusCode >= 200) && (resp.StatusCode < 300):
+ return resp.Body, nil
+
+ default:
+ // ensure we close the body before returning the error
+ defer resp.Body.Close()
+
+ result := r.transformResponse(resp, req)
+ err := result.Error()
+ if err == nil {
+ err = fmt.Errorf("%d while accessing %v: %s", result.statusCode, url, string(result.body))
+ }
+ return nil, err
+ }
+}
+
+// request connects to the server and invokes the provided function when a server response is
+// received. It handles retry behavior and up front validation of requests. It will invoke
+// fn at most once. It will return an error if a problem occurred prior to connecting to the
+// server - the provided function is responsible for handling server errors.
+func (r *Request) request(fn func(*http.Request, *http.Response)) error {
+ //Metrics for total request latency
+ start := time.Now()
+ defer func() {
+ metrics.RequestLatency.Observe(r.verb, r.finalURLTemplate(), time.Since(start))
+ }()
+
+ if r.err != nil {
+ glog.V(4).Infof("Error in request: %v", r.err)
+ return r.err
+ }
+
+ // TODO: added to catch programmer errors (invoking operations with an object with an empty namespace)
+ if (r.verb == "GET" || r.verb == "PUT" || r.verb == "DELETE") && r.namespaceSet && len(r.resourceName) > 0 && len(r.namespace) == 0 {
+ return fmt.Errorf("an empty namespace may not be set when a resource name is provided")
+ }
+ if (r.verb == "POST") && r.namespaceSet && len(r.namespace) == 0 {
+ return fmt.Errorf("an empty namespace may not be set during creation")
+ }
+
+ client := r.client
+ if client == nil {
+ client = http.DefaultClient
+ }
+
+ // Right now we make about ten retry attempts if we get a Retry-After response.
+ // TODO: Change to a timeout based approach.
+ maxRetries := 10
+ retries := 0
+ for {
+ url := r.URL().String()
+ req, err := http.NewRequest(r.verb, url, r.body)
+ if err != nil {
+ return err
+ }
+ if r.ctx != nil {
+ req = req.WithContext(r.ctx)
+ }
+ req.Header = r.headers
+
+ r.backoffMgr.Sleep(r.backoffMgr.CalculateBackoff(r.URL()))
+ if retries > 0 {
+ // We are retrying the request that we already send to apiserver
+ // at least once before.
+ // This request should also be throttled with the client-internal throttler.
+ r.tryThrottle()
+ }
+ resp, err := client.Do(req)
+ updateURLMetrics(r, resp, err)
+ if err != nil {
+ r.backoffMgr.UpdateBackoff(r.URL(), err, 0)
+ } else {
+ r.backoffMgr.UpdateBackoff(r.URL(), err, resp.StatusCode)
+ }
+ if err != nil {
+ // "Connection reset by peer" is usually a transient error.
+ // Thus in case of "GET" operations, we simply retry it.
+ // We are not automatically retrying "write" operations, as
+ // they are not idempotent.
+ if !net.IsConnectionReset(err) || r.verb != "GET" {
+ return err
+ }
+ // For the purpose of retry, we set the artificial "retry-after" response.
+ // TODO: Should we clean the original response if it exists?
+ resp = &http.Response{
+ StatusCode: http.StatusInternalServerError,
+ Header: http.Header{"Retry-After": []string{"1"}},
+ Body: ioutil.NopCloser(bytes.NewReader([]byte{})),
+ }
+ }
+
+ done := func() bool {
+ // Ensure the response body is fully read and closed
+ // before we reconnect, so that we reuse the same TCP
+ // connection.
+ defer func() {
+ const maxBodySlurpSize = 2 << 10
+ if resp.ContentLength <= maxBodySlurpSize {
+ io.Copy(ioutil.Discard, &io.LimitedReader{R: resp.Body, N: maxBodySlurpSize})
+ }
+ resp.Body.Close()
+ }()
+
+ retries++
+ if seconds, wait := checkWait(resp); wait && retries < maxRetries {
+ if seeker, ok := r.body.(io.Seeker); ok && r.body != nil {
+ _, err := seeker.Seek(0, 0)
+ if err != nil {
+ glog.V(4).Infof("Could not retry request, can't Seek() back to beginning of body for %T", r.body)
+ fn(req, resp)
+ return true
+ }
+ }
+
+ glog.V(4).Infof("Got a Retry-After %s response for attempt %d to %v", seconds, retries, url)
+ r.backoffMgr.Sleep(time.Duration(seconds) * time.Second)
+ return false
+ }
+ fn(req, resp)
+ return true
+ }()
+ if done {
+ return nil
+ }
+ }
+}
+
+// Do formats and executes the request. Returns a Result object for easy response
+// processing.
+//
+// Error type:
+// * If the request can't be constructed, or an error happened earlier while building its
+// arguments: *RequestConstructionError
+// * If the server responds with a status: *errors.StatusError or *errors.UnexpectedObjectError
+// * http.Client.Do errors are returned directly.
+func (r *Request) Do() Result {
+ r.tryThrottle()
+
+ var result Result
+ err := r.request(func(req *http.Request, resp *http.Response) {
+ result = r.transformResponse(resp, req)
+ })
+ if err != nil {
+ return Result{err: err}
+ }
+ return result
+}
+
+// DoRaw executes the request but does not process the response body.
+func (r *Request) DoRaw() ([]byte, error) {
+ r.tryThrottle()
+
+ var result Result
+ err := r.request(func(req *http.Request, resp *http.Response) {
+ result.body, result.err = ioutil.ReadAll(resp.Body)
+ glogBody("Response Body", result.body)
+ if resp.StatusCode < http.StatusOK || resp.StatusCode > http.StatusPartialContent {
+ result.err = r.transformUnstructuredResponseError(resp, req, result.body)
+ }
+ })
+ if err != nil {
+ return nil, err
+ }
+ return result.body, result.err
+}
+
+// transformResponse converts an API response into a structured API object
+func (r *Request) transformResponse(resp *http.Response, req *http.Request) Result {
+ var body []byte
+ if resp.Body != nil {
+ if data, err := ioutil.ReadAll(resp.Body); err == nil {
+ body = data
+ }
+ }
+
+ glogBody("Response Body", body)
+
+ // verify the content type is accurate
+ contentType := resp.Header.Get("Content-Type")
+ decoder := r.serializers.Decoder
+ if len(contentType) > 0 && (decoder == nil || (len(r.content.ContentType) > 0 && contentType != r.content.ContentType)) {
+ mediaType, params, err := mime.ParseMediaType(contentType)
+ if err != nil {
+ return Result{err: errors.NewInternalError(err)}
+ }
+ decoder, err = r.serializers.RenegotiatedDecoder(mediaType, params)
+ if err != nil {
+ // if we fail to negotiate a decoder, treat this as an unstructured error
+ switch {
+ case resp.StatusCode == http.StatusSwitchingProtocols:
+ // no-op, we've been upgraded
+ case resp.StatusCode < http.StatusOK || resp.StatusCode > http.StatusPartialContent:
+ return Result{err: r.transformUnstructuredResponseError(resp, req, body)}
+ }
+ return Result{
+ body: body,
+ contentType: contentType,
+ statusCode: resp.StatusCode,
+ }
+ }
+ }
+
+ switch {
+ case resp.StatusCode == http.StatusSwitchingProtocols:
+ // no-op, we've been upgraded
+ case resp.StatusCode < http.StatusOK || resp.StatusCode > http.StatusPartialContent:
+ // calculate an unstructured error from the response which the Result object may use if the caller
+ // did not return a structured error.
+ retryAfter, _ := retryAfterSeconds(resp)
+ err := r.newUnstructuredResponseError(body, isTextResponse(resp), resp.StatusCode, req.Method, retryAfter)
+ return Result{
+ body: body,
+ contentType: contentType,
+ statusCode: resp.StatusCode,
+ decoder: decoder,
+ err: err,
+ }
+ }
+
+ return Result{
+ body: body,
+ contentType: contentType,
+ statusCode: resp.StatusCode,
+ decoder: decoder,
+ }
+}
+
+// glogBody logs a body output that could be either JSON or protobuf. It explicitly guards against
+// allocating a new string for the body output unless necessary. Uses a simple heuristic to determine
+// whether the body is printable.
+func glogBody(prefix string, body []byte) {
+ if glog.V(8) {
+ if bytes.IndexFunc(body, func(r rune) bool {
+ return r < 0x0a
+ }) != -1 {
+ glog.Infof("%s:\n%s", prefix, hex.Dump(body))
+ } else {
+ glog.Infof("%s: %s", prefix, string(body))
+ }
+ }
+}
+
+// maxUnstructuredResponseTextBytes is an upper bound on how much output to include in the unstructured error.
+const maxUnstructuredResponseTextBytes = 2048
+
+// transformUnstructuredResponseError handles an error from the server that is not in a structured form.
+// It is expected to transform any response that is not recognizable as a clear server sent error from the
+// K8S API using the information provided with the request. In practice, HTTP proxies and client libraries
+// introduce a level of uncertainty to the responses returned by servers that in common use result in
+// unexpected responses. The rough structure is:
+//
+// 1. Assume the server sends you something sane - JSON + well defined error objects + proper codes
+// - this is the happy path
+// - when you get this output, trust what the server sends
+// 2. Guard against empty fields / bodies in received JSON and attempt to cull sufficient info from them to
+// generate a reasonable facsimile of the original failure.
+// - Be sure to use a distinct error type or flag that allows a client to distinguish between this and error 1 above
+// 3. Handle true disconnect failures / completely malformed data by moving up to a more generic client error
+// 4. Distinguish between various connection failures like SSL certificates, timeouts, proxy errors, unexpected
+// initial contact, the presence of mismatched body contents from posted content types
+// - Give these a separate distinct error type and capture as much as possible of the original message
+//
+// TODO: introduce transformation of generic http.Client.Do() errors that separates 4.
+func (r *Request) transformUnstructuredResponseError(resp *http.Response, req *http.Request, body []byte) error {
+ if body == nil && resp.Body != nil {
+ if data, err := ioutil.ReadAll(&io.LimitedReader{R: resp.Body, N: maxUnstructuredResponseTextBytes}); err == nil {
+ body = data
+ }
+ }
+ retryAfter, _ := retryAfterSeconds(resp)
+ return r.newUnstructuredResponseError(body, isTextResponse(resp), resp.StatusCode, req.Method, retryAfter)
+}
+
+// newUnstructuredResponseError instantiates the appropriate generic error for the provided input. It also logs the body.
+func (r *Request) newUnstructuredResponseError(body []byte, isTextResponse bool, statusCode int, method string, retryAfter int) error {
+ // cap the amount of output we create
+ if len(body) > maxUnstructuredResponseTextBytes {
+ body = body[:maxUnstructuredResponseTextBytes]
+ }
+
+ message := "unknown"
+ if isTextResponse {
+ message = strings.TrimSpace(string(body))
+ }
+ var groupResource schema.GroupResource
+ if len(r.resource) > 0 {
+ groupResource.Group = r.content.GroupVersion.Group
+ groupResource.Resource = r.resource
+ }
+ return errors.NewGenericServerResponse(
+ statusCode,
+ method,
+ groupResource,
+ r.resourceName,
+ message,
+ retryAfter,
+ true,
+ )
+}
+
+// isTextResponse returns true if the response appears to be a textual media type.
+func isTextResponse(resp *http.Response) bool {
+ contentType := resp.Header.Get("Content-Type")
+ if len(contentType) == 0 {
+ return true
+ }
+ media, _, err := mime.ParseMediaType(contentType)
+ if err != nil {
+ return false
+ }
+ return strings.HasPrefix(media, "text/")
+}
+
+// checkWait returns true along with a number of seconds if the server instructed us to wait
+// before retrying.
+func checkWait(resp *http.Response) (int, bool) {
+ switch r := resp.StatusCode; {
+ // any 500 error code and 429 can trigger a wait
+ case r == errors.StatusTooManyRequests, r >= 500:
+ default:
+ return 0, false
+ }
+ i, ok := retryAfterSeconds(resp)
+ return i, ok
+}
+
+// retryAfterSeconds returns the value of the Retry-After header and true, or 0 and false if
+// the header was missing or not a valid number.
+func retryAfterSeconds(resp *http.Response) (int, bool) {
+ if h := resp.Header.Get("Retry-After"); len(h) > 0 {
+ if i, err := strconv.Atoi(h); err == nil {
+ return i, true
+ }
+ }
+ return 0, false
+}
+
+// Result contains the result of calling Request.Do().
+type Result struct {
+ body []byte
+ contentType string
+ err error
+ statusCode int
+
+ decoder runtime.Decoder
+}
+
+// Raw returns the raw result.
+func (r Result) Raw() ([]byte, error) {
+ return r.body, r.err
+}
+
+// Get returns the result as an object, which means it passes through the decoder.
+// If the returned object is of type Status and has .Status != StatusSuccess, the
+// additional information in Status will be used to enrich the error.
+func (r Result) Get() (runtime.Object, error) {
+ if r.err != nil {
+ // Check whether the result has a Status object in the body and prefer that.
+ return nil, r.Error()
+ }
+ if r.decoder == nil {
+ return nil, fmt.Errorf("serializer for %s doesn't exist", r.contentType)
+ }
+
+ // decode, but if the result is Status return that as an error instead.
+ out, _, err := r.decoder.Decode(r.body, nil, nil)
+ if err != nil {
+ return nil, err
+ }
+ switch t := out.(type) {
+ case *metav1.Status:
+ // any status besides StatusSuccess is considered an error.
+ if t.Status != metav1.StatusSuccess {
+ return nil, errors.FromObject(t)
+ }
+ }
+ return out, nil
+}
+
+// StatusCode returns the HTTP status code of the request. (Only valid if no
+// error was returned.)
+func (r Result) StatusCode(statusCode *int) Result {
+ *statusCode = r.statusCode
+ return r
+}
+
+// Into stores the result into obj, if possible. If obj is nil it is ignored.
+// If the returned object is of type Status and has .Status != StatusSuccess, the
+// additional information in Status will be used to enrich the error.
+func (r Result) Into(obj runtime.Object) error {
+ if r.err != nil {
+ // Check whether the result has a Status object in the body and prefer that.
+ return r.Error()
+ }
+ if r.decoder == nil {
+ return fmt.Errorf("serializer for %s doesn't exist", r.contentType)
+ }
+ if len(r.body) == 0 {
+ return fmt.Errorf("0-length response")
+ }
+
+ out, _, err := r.decoder.Decode(r.body, nil, obj)
+ if err != nil || out == obj {
+ return err
+ }
+ // if a different object is returned, see if it is Status and avoid double decoding
+ // the object.
+ switch t := out.(type) {
+ case *metav1.Status:
+ // any status besides StatusSuccess is considered an error.
+ if t.Status != metav1.StatusSuccess {
+ return errors.FromObject(t)
+ }
+ }
+ return nil
+}
+
+// WasCreated updates the provided bool pointer to whether the server returned
+// 201 created or a different response.
+func (r Result) WasCreated(wasCreated *bool) Result {
+ *wasCreated = r.statusCode == http.StatusCreated
+ return r
+}
+
+// Error returns the error executing the request, nil if no error occurred.
+// If the returned object is of type Status and has Status != StatusSuccess, the
+// additional information in Status will be used to enrich the error.
+// See the Request.Do() comment for what errors you might get.
+func (r Result) Error() error {
+ // if we have received an unexpected server error, and we have a body and decoder, we can try to extract
+ // a Status object.
+ if r.err == nil || !errors.IsUnexpectedServerError(r.err) || len(r.body) == 0 || r.decoder == nil {
+ return r.err
+ }
+
+ // attempt to convert the body into a Status object
+ // to be backwards compatible with old servers that do not return a version, default to "v1"
+ out, _, err := r.decoder.Decode(r.body, &schema.GroupVersionKind{Version: "v1"}, nil)
+ if err != nil {
+ glog.V(5).Infof("body was not decodable (unable to check for Status): %v", err)
+ return r.err
+ }
+ switch t := out.(type) {
+ case *metav1.Status:
+ // because we default the kind, we *must* check for StatusFailure
+ if t.Status == metav1.StatusFailure {
+ return errors.FromObject(t)
+ }
+ }
+ return r.err
+}
+
+// NameMayNotBe specifies strings that cannot be used as names specified as path segments (like the REST API or etcd store)
+var NameMayNotBe = []string{".", ".."}
+
+// NameMayNotContain specifies substrings that cannot be used in names specified as path segments (like the REST API or etcd store)
+var NameMayNotContain = []string{"/", "%"}
+
+// IsValidPathSegmentName validates the name can be safely encoded as a path segment
+func IsValidPathSegmentName(name string) []string {
+ for _, illegalName := range NameMayNotBe {
+ if name == illegalName {
+ return []string{fmt.Sprintf(`may not be '%s'`, illegalName)}
+ }
+ }
+
+ var errors []string
+ for _, illegalContent := range NameMayNotContain {
+ if strings.Contains(name, illegalContent) {
+ errors = append(errors, fmt.Sprintf(`may not contain '%s'`, illegalContent))
+ }
+ }
+
+ return errors
+}
+
+// IsValidPathSegmentPrefix validates the name can be used as a prefix for a name which will be encoded as a path segment
+// It does not check for exact matches with disallowed names, since an arbitrary suffix might make the name valid
+func IsValidPathSegmentPrefix(name string) []string {
+ var errors []string
+ for _, illegalContent := range NameMayNotContain {
+ if strings.Contains(name, illegalContent) {
+ errors = append(errors, fmt.Sprintf(`may not contain '%s'`, illegalContent))
+ }
+ }
+
+ return errors
+}
+
+// ValidatePathSegmentName validates the name can be safely encoded as a path segment
+func ValidatePathSegmentName(name string, prefix bool) []string {
+ if prefix {
+ return IsValidPathSegmentPrefix(name)
+ } else {
+ return IsValidPathSegmentName(name)
+ }
+}
diff --git a/vendor/k8s.io/client-go/rest/transport.go b/vendor/k8s.io/client-go/rest/transport.go
new file mode 100644
index 000000000..ba43752bc
--- /dev/null
+++ b/vendor/k8s.io/client-go/rest/transport.go
@@ -0,0 +1,99 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package rest
+
+import (
+ "crypto/tls"
+ "net/http"
+
+ "k8s.io/client-go/transport"
+)
+
+// TLSConfigFor returns a tls.Config that will provide the transport level security defined
+// by the provided Config. Will return nil if no transport level security is requested.
+func TLSConfigFor(config *Config) (*tls.Config, error) {
+ cfg, err := config.TransportConfig()
+ if err != nil {
+ return nil, err
+ }
+ return transport.TLSConfigFor(cfg)
+}
+
+// TransportFor returns an http.RoundTripper that will provide the authentication
+// or transport level security defined by the provided Config. Will return the
+// default http.DefaultTransport if no special case behavior is needed.
+func TransportFor(config *Config) (http.RoundTripper, error) {
+ cfg, err := config.TransportConfig()
+ if err != nil {
+ return nil, err
+ }
+ return transport.New(cfg)
+}
+
+// HTTPWrappersForConfig wraps a round tripper with any relevant layered behavior from the
+// config. Exposed to allow more clients that need HTTP-like behavior but then must hijack
+// the underlying connection (like WebSocket or HTTP2 clients). Pure HTTP clients should use
+// the higher level TransportFor or RESTClientFor methods.
+func HTTPWrappersForConfig(config *Config, rt http.RoundTripper) (http.RoundTripper, error) {
+ cfg, err := config.TransportConfig()
+ if err != nil {
+ return nil, err
+ }
+ return transport.HTTPWrappersForConfig(cfg, rt)
+}
+
+// TransportConfig converts a client config to an appropriate transport config.
+func (c *Config) TransportConfig() (*transport.Config, error) {
+ wt := c.WrapTransport
+ if c.AuthProvider != nil {
+ provider, err := GetAuthProvider(c.Host, c.AuthProvider, c.AuthConfigPersister)
+ if err != nil {
+ return nil, err
+ }
+ if wt != nil {
+ previousWT := wt
+ wt = func(rt http.RoundTripper) http.RoundTripper {
+ return provider.WrapTransport(previousWT(rt))
+ }
+ } else {
+ wt = provider.WrapTransport
+ }
+ }
+ return &transport.Config{
+ UserAgent: c.UserAgent,
+ Transport: c.Transport,
+ WrapTransport: wt,
+ TLS: transport.TLSConfig{
+ Insecure: c.Insecure,
+ ServerName: c.ServerName,
+ CAFile: c.CAFile,
+ CAData: c.CAData,
+ CertFile: c.CertFile,
+ CertData: c.CertData,
+ KeyFile: c.KeyFile,
+ KeyData: c.KeyData,
+ },
+ Username: c.Username,
+ Password: c.Password,
+ BearerToken: c.BearerToken,
+ Impersonate: transport.ImpersonationConfig{
+ UserName: c.Impersonate.UserName,
+ Groups: c.Impersonate.Groups,
+ Extra: c.Impersonate.Extra,
+ },
+ }, nil
+}
diff --git a/vendor/k8s.io/client-go/rest/url_utils.go b/vendor/k8s.io/client-go/rest/url_utils.go
new file mode 100644
index 000000000..14f94650a
--- /dev/null
+++ b/vendor/k8s.io/client-go/rest/url_utils.go
@@ -0,0 +1,90 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package rest
+
+import (
+ "fmt"
+ "net/url"
+ "path"
+
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// DefaultServerURL converts a host, host:port, or URL string to the default base server API path
+// to use with a Client at a given API version following the standard conventions for a
+// Kubernetes API.
+func DefaultServerURL(host, apiPath string, groupVersion schema.GroupVersion, defaultTLS bool) (*url.URL, string, error) {
+ if host == "" {
+ return nil, "", fmt.Errorf("host must be a URL or a host:port pair")
+ }
+ base := host
+ hostURL, err := url.Parse(base)
+ if err != nil || hostURL.Scheme == "" || hostURL.Host == "" {
+ scheme := "http://"
+ if defaultTLS {
+ scheme = "https://"
+ }
+ hostURL, err = url.Parse(scheme + base)
+ if err != nil {
+ return nil, "", err
+ }
+ if hostURL.Path != "" && hostURL.Path != "/" {
+ return nil, "", fmt.Errorf("host must be a URL or a host:port pair: %q", base)
+ }
+ }
+
+ // hostURL.Path is optional; a non-empty Path is treated as a prefix that is to be applied to
+ // all URIs used to access the host. this is useful when there's a proxy in front of the
+ // apiserver that has relocated the apiserver endpoints, forwarding all requests from, for
+ // example, /a/b/c to the apiserver. in this case the Path should be /a/b/c.
+ //
+ // if running without a frontend proxy (that changes the location of the apiserver), then
+ // hostURL.Path should be blank.
+ //
+ // versionedAPIPath, a path relative to baseURL.Path, points to a versioned API base
+ versionedAPIPath := path.Join("/", apiPath)
+
+ // Add the version to the end of the path
+ if len(groupVersion.Group) > 0 {
+ versionedAPIPath = path.Join(versionedAPIPath, groupVersion.Group, groupVersion.Version)
+
+ } else {
+ versionedAPIPath = path.Join(versionedAPIPath, groupVersion.Version)
+
+ }
+
+ return hostURL, versionedAPIPath, nil
+}
+
+// defaultServerUrlFor is shared between IsConfigTransportTLS and RESTClientFor. It
+// requires Host and Version to be set prior to being called.
+func defaultServerUrlFor(config *Config) (*url.URL, string, error) {
+ // TODO: move the default to secure when the apiserver supports TLS by default
+ // config.Insecure is taken to mean "I want HTTPS but don't bother checking the certs against a CA."
+ hasCA := len(config.CAFile) != 0 || len(config.CAData) != 0
+ hasCert := len(config.CertFile) != 0 || len(config.CertData) != 0
+ defaultTLS := hasCA || hasCert || config.Insecure
+ host := config.Host
+ if host == "" {
+ host = "localhost"
+ }
+
+ if config.GroupVersion != nil {
+ return DefaultServerURL(host, config.APIPath, *config.GroupVersion, defaultTLS)
+ }
+ return DefaultServerURL(host, config.APIPath, schema.GroupVersion{}, defaultTLS)
+}
diff --git a/vendor/k8s.io/client-go/rest/urlbackoff.go b/vendor/k8s.io/client-go/rest/urlbackoff.go
new file mode 100644
index 000000000..eff848abc
--- /dev/null
+++ b/vendor/k8s.io/client-go/rest/urlbackoff.go
@@ -0,0 +1,107 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package rest
+
+import (
+ "net/url"
+ "time"
+
+ "github.com/golang/glog"
+ "k8s.io/apimachinery/pkg/util/sets"
+ "k8s.io/client-go/util/flowcontrol"
+)
+
+// Set of resp. Codes that we backoff for.
+// In general these should be errors that indicate a server is overloaded.
+// These shouldn't be configured by any user, we set them based on conventions
+// described in
+var serverIsOverloadedSet = sets.NewInt(429)
+var maxResponseCode = 499
+
+type BackoffManager interface {
+ UpdateBackoff(actualUrl *url.URL, err error, responseCode int)
+ CalculateBackoff(actualUrl *url.URL) time.Duration
+ Sleep(d time.Duration)
+}
+
+// URLBackoff struct implements the semantics on top of Backoff which
+// we need for URL specific exponential backoff.
+type URLBackoff struct {
+ // Uses backoff as underlying implementation.
+ Backoff *flowcontrol.Backoff
+}
+
+// NoBackoff is a stub implementation, can be used for mocking or else as a default.
+type NoBackoff struct {
+}
+
+func (n *NoBackoff) UpdateBackoff(actualUrl *url.URL, err error, responseCode int) {
+ // do nothing.
+}
+
+func (n *NoBackoff) CalculateBackoff(actualUrl *url.URL) time.Duration {
+ return 0 * time.Second
+}
+
+func (n *NoBackoff) Sleep(d time.Duration) {
+ time.Sleep(d)
+}
+
+// Disable makes the backoff trivial, i.e., sets it to zero. This might be used
+// by tests which want to run 1000s of mock requests without slowing down.
+func (b *URLBackoff) Disable() {
+ glog.V(4).Infof("Disabling backoff strategy")
+ b.Backoff = flowcontrol.NewBackOff(0*time.Second, 0*time.Second)
+}
+
+// baseUrlKey returns the key which urls will be mapped to.
+// For example, 127.0.0.1:8080/api/v2/abcde -> 127.0.0.1:8080.
+func (b *URLBackoff) baseUrlKey(rawurl *url.URL) string {
+ // Simple implementation for now, just the host.
+ // We may backoff specific paths (i.e. "pods") differentially
+ // in the future.
+ host, err := url.Parse(rawurl.String())
+ if err != nil {
+ glog.V(4).Infof("Error extracting url: %v", rawurl)
+ panic("bad url!")
+ }
+ return host.Host
+}
+
+// UpdateBackoff updates backoff metadata
+func (b *URLBackoff) UpdateBackoff(actualUrl *url.URL, err error, responseCode int) {
+ // range for retry counts that we store is [0,13]
+ if responseCode > maxResponseCode || serverIsOverloadedSet.Has(responseCode) {
+ b.Backoff.Next(b.baseUrlKey(actualUrl), b.Backoff.Clock.Now())
+ return
+ } else if responseCode >= 300 || err != nil {
+ glog.V(4).Infof("Client is returning errors: code %v, error %v", responseCode, err)
+ }
+
+ //If we got this far, there is no backoff required for this URL anymore.
+ b.Backoff.Reset(b.baseUrlKey(actualUrl))
+}
+
+// CalculateBackoff takes a url and back's off exponentially,
+// based on its knowledge of existing failures.
+func (b *URLBackoff) CalculateBackoff(actualUrl *url.URL) time.Duration {
+ return b.Backoff.Get(b.baseUrlKey(actualUrl))
+}
+
+func (b *URLBackoff) Sleep(d time.Duration) {
+ b.Backoff.Clock.Sleep(d)
+}
diff --git a/vendor/k8s.io/client-go/rest/versions.go b/vendor/k8s.io/client-go/rest/versions.go
new file mode 100644
index 000000000..9d41812f2
--- /dev/null
+++ b/vendor/k8s.io/client-go/rest/versions.go
@@ -0,0 +1,88 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package rest
+
+import (
+ "encoding/json"
+ "fmt"
+ "net/http"
+ "path"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+const (
+ legacyAPIPath = "/api"
+ defaultAPIPath = "/apis"
+)
+
+// TODO: Is this obsoleted by the discovery client?
+
+// ServerAPIVersions returns the GroupVersions supported by the API server.
+// It creates a RESTClient based on the passed in config, but it doesn't rely
+// on the Version and Codec of the config, because it uses AbsPath and
+// takes the raw response.
+func ServerAPIVersions(c *Config) (groupVersions []string, err error) {
+ transport, err := TransportFor(c)
+ if err != nil {
+ return nil, err
+ }
+ client := http.Client{Transport: transport}
+
+ configCopy := *c
+ configCopy.GroupVersion = nil
+ configCopy.APIPath = ""
+ baseURL, _, err := defaultServerUrlFor(&configCopy)
+ if err != nil {
+ return nil, err
+ }
+ // Get the groupVersions exposed at /api
+ originalPath := baseURL.Path
+ baseURL.Path = path.Join(originalPath, legacyAPIPath)
+ resp, err := client.Get(baseURL.String())
+ if err != nil {
+ return nil, err
+ }
+ var v metav1.APIVersions
+ defer resp.Body.Close()
+ err = json.NewDecoder(resp.Body).Decode(&v)
+ if err != nil {
+ return nil, fmt.Errorf("unexpected error: %v", err)
+ }
+
+ groupVersions = append(groupVersions, v.Versions...)
+ // Get the groupVersions exposed at /apis
+ baseURL.Path = path.Join(originalPath, defaultAPIPath)
+ resp2, err := client.Get(baseURL.String())
+ if err != nil {
+ return nil, err
+ }
+ var apiGroupList metav1.APIGroupList
+ defer resp2.Body.Close()
+ err = json.NewDecoder(resp2.Body).Decode(&apiGroupList)
+ if err != nil {
+ return nil, fmt.Errorf("unexpected error: %v", err)
+ }
+
+ for _, g := range apiGroupList.Groups {
+ for _, gv := range g.Versions {
+ groupVersions = append(groupVersions, gv.GroupVersion)
+ }
+ }
+
+ return groupVersions, nil
+}
diff --git a/vendor/k8s.io/client-go/rest/watch/decoder.go b/vendor/k8s.io/client-go/rest/watch/decoder.go
new file mode 100644
index 000000000..73bb63add
--- /dev/null
+++ b/vendor/k8s.io/client-go/rest/watch/decoder.go
@@ -0,0 +1,72 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package versioned
+
+import (
+ "fmt"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/serializer/streaming"
+ "k8s.io/apimachinery/pkg/watch"
+)
+
+// Decoder implements the watch.Decoder interface for io.ReadClosers that
+// have contents which consist of a series of watchEvent objects encoded
+// with the given streaming decoder. The internal objects will be then
+// decoded by the embedded decoder.
+type Decoder struct {
+ decoder streaming.Decoder
+ embeddedDecoder runtime.Decoder
+}
+
+// NewDecoder creates an Decoder for the given writer and codec.
+func NewDecoder(decoder streaming.Decoder, embeddedDecoder runtime.Decoder) *Decoder {
+ return &Decoder{
+ decoder: decoder,
+ embeddedDecoder: embeddedDecoder,
+ }
+}
+
+// Decode blocks until it can return the next object in the reader. Returns an error
+// if the reader is closed or an object can't be decoded.
+func (d *Decoder) Decode() (watch.EventType, runtime.Object, error) {
+ var got metav1.WatchEvent
+ res, _, err := d.decoder.Decode(nil, &got)
+ if err != nil {
+ return "", nil, err
+ }
+ if res != &got {
+ return "", nil, fmt.Errorf("unable to decode to metav1.Event")
+ }
+ switch got.Type {
+ case string(watch.Added), string(watch.Modified), string(watch.Deleted), string(watch.Error):
+ default:
+ return "", nil, fmt.Errorf("got invalid watch event type: %v", got.Type)
+ }
+
+ obj, err := runtime.Decode(d.embeddedDecoder, got.Object.Raw)
+ if err != nil {
+ return "", nil, fmt.Errorf("unable to decode watch event: %v", err)
+ }
+ return watch.EventType(got.Type), obj, nil
+}
+
+// Close closes the underlying r.
+func (d *Decoder) Close() {
+ d.decoder.Close()
+}
diff --git a/vendor/k8s.io/client-go/rest/watch/encoder.go b/vendor/k8s.io/client-go/rest/watch/encoder.go
new file mode 100644
index 000000000..e55aa12d9
--- /dev/null
+++ b/vendor/k8s.io/client-go/rest/watch/encoder.go
@@ -0,0 +1,56 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package versioned
+
+import (
+ "encoding/json"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/serializer/streaming"
+ "k8s.io/apimachinery/pkg/watch"
+)
+
+// Encoder serializes watch.Events into io.Writer. The internal objects
+// are encoded using embedded encoder, and the outer Event is serialized
+// using encoder.
+// TODO: this type is only used by tests
+type Encoder struct {
+ encoder streaming.Encoder
+ embeddedEncoder runtime.Encoder
+}
+
+func NewEncoder(encoder streaming.Encoder, embeddedEncoder runtime.Encoder) *Encoder {
+ return &Encoder{
+ encoder: encoder,
+ embeddedEncoder: embeddedEncoder,
+ }
+}
+
+// Encode writes an event to the writer. Returns an error
+// if the writer is closed or an object can't be encoded.
+func (e *Encoder) Encode(event *watch.Event) error {
+ data, err := runtime.Encode(e.embeddedEncoder, event.Object)
+ if err != nil {
+ return err
+ }
+ // FIXME: get rid of json.RawMessage.
+ return e.encoder.Encode(&metav1.WatchEvent{
+ Type: string(event.Type),
+ Object: runtime.RawExtension{Raw: json.RawMessage(data)},
+ })
+}
diff --git a/vendor/k8s.io/client-go/tools/cache/controller.go b/vendor/k8s.io/client-go/tools/cache/controller.go
new file mode 100644
index 000000000..2c97b8658
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/cache/controller.go
@@ -0,0 +1,391 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package cache
+
+import (
+ "sync"
+ "time"
+
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/clock"
+ utilruntime "k8s.io/apimachinery/pkg/util/runtime"
+ "k8s.io/apimachinery/pkg/util/wait"
+)
+
+// Config contains all the settings for a Controller.
+type Config struct {
+ // The queue for your objects; either a FIFO or
+ // a DeltaFIFO. Your Process() function should accept
+ // the output of this Queue's Pop() method.
+ Queue
+
+ // Something that can list and watch your objects.
+ ListerWatcher
+
+ // Something that can process your objects.
+ Process ProcessFunc
+
+ // The type of your objects.
+ ObjectType runtime.Object
+
+ // Reprocess everything at least this often.
+ // Note that if it takes longer for you to clear the queue than this
+ // period, you will end up processing items in the order determined
+ // by FIFO.Replace(). Currently, this is random. If this is a
+ // problem, we can change that replacement policy to append new
+ // things to the end of the queue instead of replacing the entire
+ // queue.
+ FullResyncPeriod time.Duration
+
+ // ShouldResync, if specified, is invoked when the controller's reflector determines the next
+ // periodic sync should occur. If this returns true, it means the reflector should proceed with
+ // the resync.
+ ShouldResync ShouldResyncFunc
+
+ // If true, when Process() returns an error, re-enqueue the object.
+ // TODO: add interface to let you inject a delay/backoff or drop
+ // the object completely if desired. Pass the object in
+ // question to this interface as a parameter.
+ RetryOnError bool
+}
+
+// ShouldResyncFunc is a type of function that indicates if a reflector should perform a
+// resync or not. It can be used by a shared informer to support multiple event handlers with custom
+// resync periods.
+type ShouldResyncFunc func() bool
+
+// ProcessFunc processes a single object.
+type ProcessFunc func(obj interface{}) error
+
+// Controller is a generic controller framework.
+type controller struct {
+ config Config
+ reflector *Reflector
+ reflectorMutex sync.RWMutex
+ clock clock.Clock
+}
+
+type Controller interface {
+ Run(stopCh <-chan struct{})
+ HasSynced() bool
+ LastSyncResourceVersion() string
+}
+
+// New makes a new Controller from the given Config.
+func New(c *Config) Controller {
+ ctlr := &controller{
+ config: *c,
+ clock: &clock.RealClock{},
+ }
+ return ctlr
+}
+
+// Run begins processing items, and will continue until a value is sent down stopCh.
+// It's an error to call Run more than once.
+// Run blocks; call via go.
+func (c *controller) Run(stopCh <-chan struct{}) {
+ defer utilruntime.HandleCrash()
+ go func() {
+ <-stopCh
+ c.config.Queue.Close()
+ }()
+ r := NewReflector(
+ c.config.ListerWatcher,
+ c.config.ObjectType,
+ c.config.Queue,
+ c.config.FullResyncPeriod,
+ )
+ r.ShouldResync = c.config.ShouldResync
+ r.clock = c.clock
+
+ c.reflectorMutex.Lock()
+ c.reflector = r
+ c.reflectorMutex.Unlock()
+
+ r.RunUntil(stopCh)
+
+ wait.Until(c.processLoop, time.Second, stopCh)
+}
+
+// Returns true once this controller has completed an initial resource listing
+func (c *controller) HasSynced() bool {
+ return c.config.Queue.HasSynced()
+}
+
+func (c *controller) LastSyncResourceVersion() string {
+ if c.reflector == nil {
+ return ""
+ }
+ return c.reflector.LastSyncResourceVersion()
+}
+
+// processLoop drains the work queue.
+// TODO: Consider doing the processing in parallel. This will require a little thought
+// to make sure that we don't end up processing the same object multiple times
+// concurrently.
+//
+// TODO: Plumb through the stopCh here (and down to the queue) so that this can
+// actually exit when the controller is stopped. Or just give up on this stuff
+// ever being stoppable. Converting this whole package to use Context would
+// also be helpful.
+func (c *controller) processLoop() {
+ for {
+ obj, err := c.config.Queue.Pop(PopProcessFunc(c.config.Process))
+ if err != nil {
+ if err == FIFOClosedError {
+ return
+ }
+ if c.config.RetryOnError {
+ // This is the safe way to re-enqueue.
+ c.config.Queue.AddIfNotPresent(obj)
+ }
+ }
+ }
+}
+
+// ResourceEventHandler can handle notifications for events that happen to a
+// resource. The events are informational only, so you can't return an
+// error.
+// * OnAdd is called when an object is added.
+// * OnUpdate is called when an object is modified. Note that oldObj is the
+// last known state of the object-- it is possible that several changes
+// were combined together, so you can't use this to see every single
+// change. OnUpdate is also called when a re-list happens, and it will
+// get called even if nothing changed. This is useful for periodically
+// evaluating or syncing something.
+// * OnDelete will get the final state of the item if it is known, otherwise
+// it will get an object of type DeletedFinalStateUnknown. This can
+// happen if the watch is closed and misses the delete event and we don't
+// notice the deletion until the subsequent re-list.
+type ResourceEventHandler interface {
+ OnAdd(obj interface{})
+ OnUpdate(oldObj, newObj interface{})
+ OnDelete(obj interface{})
+}
+
+// ResourceEventHandlerFuncs is an adaptor to let you easily specify as many or
+// as few of the notification functions as you want while still implementing
+// ResourceEventHandler.
+type ResourceEventHandlerFuncs struct {
+ AddFunc func(obj interface{})
+ UpdateFunc func(oldObj, newObj interface{})
+ DeleteFunc func(obj interface{})
+}
+
+// OnAdd calls AddFunc if it's not nil.
+func (r ResourceEventHandlerFuncs) OnAdd(obj interface{}) {
+ if r.AddFunc != nil {
+ r.AddFunc(obj)
+ }
+}
+
+// OnUpdate calls UpdateFunc if it's not nil.
+func (r ResourceEventHandlerFuncs) OnUpdate(oldObj, newObj interface{}) {
+ if r.UpdateFunc != nil {
+ r.UpdateFunc(oldObj, newObj)
+ }
+}
+
+// OnDelete calls DeleteFunc if it's not nil.
+func (r ResourceEventHandlerFuncs) OnDelete(obj interface{}) {
+ if r.DeleteFunc != nil {
+ r.DeleteFunc(obj)
+ }
+}
+
+// FilteringResourceEventHandler applies the provided filter to all events coming
+// in, ensuring the appropriate nested handler method is invoked. An object
+// that starts passing the filter after an update is considered an add, and an
+// object that stops passing the filter after an update is considered a delete.
+type FilteringResourceEventHandler struct {
+ FilterFunc func(obj interface{}) bool
+ Handler ResourceEventHandler
+}
+
+// OnAdd calls the nested handler only if the filter succeeds
+func (r FilteringResourceEventHandler) OnAdd(obj interface{}) {
+ if !r.FilterFunc(obj) {
+ return
+ }
+ r.Handler.OnAdd(obj)
+}
+
+// OnUpdate ensures the proper handler is called depending on whether the filter matches
+func (r FilteringResourceEventHandler) OnUpdate(oldObj, newObj interface{}) {
+ newer := r.FilterFunc(newObj)
+ older := r.FilterFunc(oldObj)
+ switch {
+ case newer && older:
+ r.Handler.OnUpdate(oldObj, newObj)
+ case newer && !older:
+ r.Handler.OnAdd(newObj)
+ case !newer && older:
+ r.Handler.OnDelete(oldObj)
+ default:
+ // do nothing
+ }
+}
+
+// OnDelete calls the nested handler only if the filter succeeds
+func (r FilteringResourceEventHandler) OnDelete(obj interface{}) {
+ if !r.FilterFunc(obj) {
+ return
+ }
+ r.Handler.OnDelete(obj)
+}
+
+// DeletionHandlingMetaNamespaceKeyFunc checks for
+// DeletedFinalStateUnknown objects before calling
+// MetaNamespaceKeyFunc.
+func DeletionHandlingMetaNamespaceKeyFunc(obj interface{}) (string, error) {
+ if d, ok := obj.(DeletedFinalStateUnknown); ok {
+ return d.Key, nil
+ }
+ return MetaNamespaceKeyFunc(obj)
+}
+
+// NewInformer returns a Store and a controller for populating the store
+// while also providing event notifications. You should only used the returned
+// Store for Get/List operations; Add/Modify/Deletes will cause the event
+// notifications to be faulty.
+//
+// Parameters:
+// * lw is list and watch functions for the source of the resource you want to
+// be informed of.
+// * objType is an object of the type that you expect to receive.
+// * resyncPeriod: if non-zero, will re-list this often (you will get OnUpdate
+// calls, even if nothing changed). Otherwise, re-list will be delayed as
+// long as possible (until the upstream source closes the watch or times out,
+// or you stop the controller).
+// * h is the object you want notifications sent to.
+//
+func NewInformer(
+ lw ListerWatcher,
+ objType runtime.Object,
+ resyncPeriod time.Duration,
+ h ResourceEventHandler,
+) (Store, Controller) {
+ // This will hold the client state, as we know it.
+ clientState := NewStore(DeletionHandlingMetaNamespaceKeyFunc)
+
+ // This will hold incoming changes. Note how we pass clientState in as a
+ // KeyLister, that way resync operations will result in the correct set
+ // of update/delete deltas.
+ fifo := NewDeltaFIFO(MetaNamespaceKeyFunc, nil, clientState)
+
+ cfg := &Config{
+ Queue: fifo,
+ ListerWatcher: lw,
+ ObjectType: objType,
+ FullResyncPeriod: resyncPeriod,
+ RetryOnError: false,
+
+ Process: func(obj interface{}) error {
+ // from oldest to newest
+ for _, d := range obj.(Deltas) {
+ switch d.Type {
+ case Sync, Added, Updated:
+ if old, exists, err := clientState.Get(d.Object); err == nil && exists {
+ if err := clientState.Update(d.Object); err != nil {
+ return err
+ }
+ h.OnUpdate(old, d.Object)
+ } else {
+ if err := clientState.Add(d.Object); err != nil {
+ return err
+ }
+ h.OnAdd(d.Object)
+ }
+ case Deleted:
+ if err := clientState.Delete(d.Object); err != nil {
+ return err
+ }
+ h.OnDelete(d.Object)
+ }
+ }
+ return nil
+ },
+ }
+ return clientState, New(cfg)
+}
+
+// NewIndexerInformer returns a Indexer and a controller for populating the index
+// while also providing event notifications. You should only used the returned
+// Index for Get/List operations; Add/Modify/Deletes will cause the event
+// notifications to be faulty.
+//
+// Parameters:
+// * lw is list and watch functions for the source of the resource you want to
+// be informed of.
+// * objType is an object of the type that you expect to receive.
+// * resyncPeriod: if non-zero, will re-list this often (you will get OnUpdate
+// calls, even if nothing changed). Otherwise, re-list will be delayed as
+// long as possible (until the upstream source closes the watch or times out,
+// or you stop the controller).
+// * h is the object you want notifications sent to.
+// * indexers is the indexer for the received object type.
+//
+func NewIndexerInformer(
+ lw ListerWatcher,
+ objType runtime.Object,
+ resyncPeriod time.Duration,
+ h ResourceEventHandler,
+ indexers Indexers,
+) (Indexer, Controller) {
+ // This will hold the client state, as we know it.
+ clientState := NewIndexer(DeletionHandlingMetaNamespaceKeyFunc, indexers)
+
+ // This will hold incoming changes. Note how we pass clientState in as a
+ // KeyLister, that way resync operations will result in the correct set
+ // of update/delete deltas.
+ fifo := NewDeltaFIFO(MetaNamespaceKeyFunc, nil, clientState)
+
+ cfg := &Config{
+ Queue: fifo,
+ ListerWatcher: lw,
+ ObjectType: objType,
+ FullResyncPeriod: resyncPeriod,
+ RetryOnError: false,
+
+ Process: func(obj interface{}) error {
+ // from oldest to newest
+ for _, d := range obj.(Deltas) {
+ switch d.Type {
+ case Sync, Added, Updated:
+ if old, exists, err := clientState.Get(d.Object); err == nil && exists {
+ if err := clientState.Update(d.Object); err != nil {
+ return err
+ }
+ h.OnUpdate(old, d.Object)
+ } else {
+ if err := clientState.Add(d.Object); err != nil {
+ return err
+ }
+ h.OnAdd(d.Object)
+ }
+ case Deleted:
+ if err := clientState.Delete(d.Object); err != nil {
+ return err
+ }
+ h.OnDelete(d.Object)
+ }
+ }
+ return nil
+ },
+ }
+ return clientState, New(cfg)
+}
diff --git a/vendor/k8s.io/client-go/tools/cache/delta_fifo.go b/vendor/k8s.io/client-go/tools/cache/delta_fifo.go
new file mode 100644
index 000000000..a71db6048
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/cache/delta_fifo.go
@@ -0,0 +1,681 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package cache
+
+import (
+ "errors"
+ "fmt"
+ "sync"
+
+ "k8s.io/apimachinery/pkg/util/sets"
+
+ "github.com/golang/glog"
+)
+
+// NewDeltaFIFO returns a Store which can be used process changes to items.
+//
+// keyFunc is used to figure out what key an object should have. (It's
+// exposed in the returned DeltaFIFO's KeyOf() method, with bonus features.)
+//
+// 'compressor' may compress as many or as few items as it wants
+// (including returning an empty slice), but it should do what it
+// does quickly since it is called while the queue is locked.
+// 'compressor' may be nil if you don't want any delta compression.
+//
+// 'keyLister' is expected to return a list of keys that the consumer of
+// this queue "knows about". It is used to decide which items are missing
+// when Replace() is called; 'Deleted' deltas are produced for these items.
+// It may be nil if you don't need to detect all deletions.
+// TODO: consider merging keyLister with this object, tracking a list of
+// "known" keys when Pop() is called. Have to think about how that
+// affects error retrying.
+// TODO(lavalamp): I believe there is a possible race only when using an
+// external known object source that the above TODO would
+// fix.
+//
+// Also see the comment on DeltaFIFO.
+func NewDeltaFIFO(keyFunc KeyFunc, compressor DeltaCompressor, knownObjects KeyListerGetter) *DeltaFIFO {
+ f := &DeltaFIFO{
+ items: map[string]Deltas{},
+ queue: []string{},
+ keyFunc: keyFunc,
+ deltaCompressor: compressor,
+ knownObjects: knownObjects,
+ }
+ f.cond.L = &f.lock
+ return f
+}
+
+// DeltaFIFO is like FIFO, but allows you to process deletes.
+//
+// DeltaFIFO is a producer-consumer queue, where a Reflector is
+// intended to be the producer, and the consumer is whatever calls
+// the Pop() method.
+//
+// DeltaFIFO solves this use case:
+// * You want to process every object change (delta) at most once.
+// * When you process an object, you want to see everything
+// that's happened to it since you last processed it.
+// * You want to process the deletion of objects.
+// * You might want to periodically reprocess objects.
+//
+// DeltaFIFO's Pop(), Get(), and GetByKey() methods return
+// interface{} to satisfy the Store/Queue interfaces, but it
+// will always return an object of type Deltas.
+//
+// A note on threading: If you call Pop() in parallel from multiple
+// threads, you could end up with multiple threads processing slightly
+// different versions of the same object.
+//
+// A note on the KeyLister used by the DeltaFIFO: It's main purpose is
+// to list keys that are "known", for the purpose of figuring out which
+// items have been deleted when Replace() or Delete() are called. The deleted
+// object will be included in the DeleteFinalStateUnknown markers. These objects
+// could be stale.
+//
+// You may provide a function to compress deltas (e.g., represent a
+// series of Updates as a single Update).
+type DeltaFIFO struct {
+ // lock/cond protects access to 'items' and 'queue'.
+ lock sync.RWMutex
+ cond sync.Cond
+
+ // We depend on the property that items in the set are in
+ // the queue and vice versa, and that all Deltas in this
+ // map have at least one Delta.
+ items map[string]Deltas
+ queue []string
+
+ // populated is true if the first batch of items inserted by Replace() has been populated
+ // or Delete/Add/Update was called first.
+ populated bool
+ // initialPopulationCount is the number of items inserted by the first call of Replace()
+ initialPopulationCount int
+
+ // keyFunc is used to make the key used for queued item
+ // insertion and retrieval, and should be deterministic.
+ keyFunc KeyFunc
+
+ // deltaCompressor tells us how to combine two or more
+ // deltas. It may be nil.
+ deltaCompressor DeltaCompressor
+
+ // knownObjects list keys that are "known", for the
+ // purpose of figuring out which items have been deleted
+ // when Replace() or Delete() is called.
+ knownObjects KeyListerGetter
+
+ // Indication the queue is closed.
+ // Used to indicate a queue is closed so a control loop can exit when a queue is empty.
+ // Currently, not used to gate any of CRED operations.
+ closed bool
+ closedLock sync.Mutex
+}
+
+var (
+ _ = Queue(&DeltaFIFO{}) // DeltaFIFO is a Queue
+)
+
+var (
+ // ErrZeroLengthDeltasObject is returned in a KeyError if a Deltas
+ // object with zero length is encountered (should be impossible,
+ // even if such an object is accidentally produced by a DeltaCompressor--
+ // but included for completeness).
+ ErrZeroLengthDeltasObject = errors.New("0 length Deltas object; can't get key")
+)
+
+// Close the queue.
+func (f *DeltaFIFO) Close() {
+ f.closedLock.Lock()
+ defer f.closedLock.Unlock()
+ f.closed = true
+ f.cond.Broadcast()
+}
+
+// KeyOf exposes f's keyFunc, but also detects the key of a Deltas object or
+// DeletedFinalStateUnknown objects.
+func (f *DeltaFIFO) KeyOf(obj interface{}) (string, error) {
+ if d, ok := obj.(Deltas); ok {
+ if len(d) == 0 {
+ return "", KeyError{obj, ErrZeroLengthDeltasObject}
+ }
+ obj = d.Newest().Object
+ }
+ if d, ok := obj.(DeletedFinalStateUnknown); ok {
+ return d.Key, nil
+ }
+ return f.keyFunc(obj)
+}
+
+// Return true if an Add/Update/Delete/AddIfNotPresent are called first,
+// or an Update called first but the first batch of items inserted by Replace() has been popped
+func (f *DeltaFIFO) HasSynced() bool {
+ f.lock.Lock()
+ defer f.lock.Unlock()
+ return f.populated && f.initialPopulationCount == 0
+}
+
+// Add inserts an item, and puts it in the queue. The item is only enqueued
+// if it doesn't already exist in the set.
+func (f *DeltaFIFO) Add(obj interface{}) error {
+ f.lock.Lock()
+ defer f.lock.Unlock()
+ f.populated = true
+ return f.queueActionLocked(Added, obj)
+}
+
+// Update is just like Add, but makes an Updated Delta.
+func (f *DeltaFIFO) Update(obj interface{}) error {
+ f.lock.Lock()
+ defer f.lock.Unlock()
+ f.populated = true
+ return f.queueActionLocked(Updated, obj)
+}
+
+// Delete is just like Add, but makes an Deleted Delta. If the item does not
+// already exist, it will be ignored. (It may have already been deleted by a
+// Replace (re-list), for example.
+func (f *DeltaFIFO) Delete(obj interface{}) error {
+ id, err := f.KeyOf(obj)
+ if err != nil {
+ return KeyError{obj, err}
+ }
+ f.lock.Lock()
+ defer f.lock.Unlock()
+ f.populated = true
+ if f.knownObjects == nil {
+ if _, exists := f.items[id]; !exists {
+ // Presumably, this was deleted when a relist happened.
+ // Don't provide a second report of the same deletion.
+ return nil
+ }
+ } else {
+ // We only want to skip the "deletion" action if the object doesn't
+ // exist in knownObjects and it doesn't have corresponding item in items.
+ // Note that even if there is a "deletion" action in items, we can ignore it,
+ // because it will be deduped automatically in "queueActionLocked"
+ _, exists, err := f.knownObjects.GetByKey(id)
+ _, itemsExist := f.items[id]
+ if err == nil && !exists && !itemsExist {
+ // Presumably, this was deleted when a relist happened.
+ // Don't provide a second report of the same deletion.
+ // TODO(lavalamp): This may be racy-- we aren't properly locked
+ // with knownObjects.
+ return nil
+ }
+ }
+
+ return f.queueActionLocked(Deleted, obj)
+}
+
+// AddIfNotPresent inserts an item, and puts it in the queue. If the item is already
+// present in the set, it is neither enqueued nor added to the set.
+//
+// This is useful in a single producer/consumer scenario so that the consumer can
+// safely retry items without contending with the producer and potentially enqueueing
+// stale items.
+//
+// Important: obj must be a Deltas (the output of the Pop() function). Yes, this is
+// different from the Add/Update/Delete functions.
+func (f *DeltaFIFO) AddIfNotPresent(obj interface{}) error {
+ deltas, ok := obj.(Deltas)
+ if !ok {
+ return fmt.Errorf("object must be of type deltas, but got: %#v", obj)
+ }
+ id, err := f.KeyOf(deltas.Newest().Object)
+ if err != nil {
+ return KeyError{obj, err}
+ }
+ f.lock.Lock()
+ defer f.lock.Unlock()
+ f.addIfNotPresent(id, deltas)
+ return nil
+}
+
+// addIfNotPresent inserts deltas under id if it does not exist, and assumes the caller
+// already holds the fifo lock.
+func (f *DeltaFIFO) addIfNotPresent(id string, deltas Deltas) {
+ f.populated = true
+ if _, exists := f.items[id]; exists {
+ return
+ }
+
+ f.queue = append(f.queue, id)
+ f.items[id] = deltas
+ f.cond.Broadcast()
+}
+
+// re-listing and watching can deliver the same update multiple times in any
+// order. This will combine the most recent two deltas if they are the same.
+func dedupDeltas(deltas Deltas) Deltas {
+ n := len(deltas)
+ if n < 2 {
+ return deltas
+ }
+ a := &deltas[n-1]
+ b := &deltas[n-2]
+ if out := isDup(a, b); out != nil {
+ d := append(Deltas{}, deltas[:n-2]...)
+ return append(d, *out)
+ }
+ return deltas
+}
+
+// If a & b represent the same event, returns the delta that ought to be kept.
+// Otherwise, returns nil.
+// TODO: is there anything other than deletions that need deduping?
+func isDup(a, b *Delta) *Delta {
+ if out := isDeletionDup(a, b); out != nil {
+ return out
+ }
+ // TODO: Detect other duplicate situations? Are there any?
+ return nil
+}
+
+// keep the one with the most information if both are deletions.
+func isDeletionDup(a, b *Delta) *Delta {
+ if b.Type != Deleted || a.Type != Deleted {
+ return nil
+ }
+ // Do more sophisticated checks, or is this sufficient?
+ if _, ok := b.Object.(DeletedFinalStateUnknown); ok {
+ return a
+ }
+ return b
+}
+
+// willObjectBeDeletedLocked returns true only if the last delta for the
+// given object is Delete. Caller must lock first.
+func (f *DeltaFIFO) willObjectBeDeletedLocked(id string) bool {
+ deltas := f.items[id]
+ return len(deltas) > 0 && deltas[len(deltas)-1].Type == Deleted
+}
+
+// queueActionLocked appends to the delta list for the object, calling
+// f.deltaCompressor if needed. Caller must lock first.
+func (f *DeltaFIFO) queueActionLocked(actionType DeltaType, obj interface{}) error {
+ id, err := f.KeyOf(obj)
+ if err != nil {
+ return KeyError{obj, err}
+ }
+
+ // If object is supposed to be deleted (last event is Deleted),
+ // then we should ignore Sync events, because it would result in
+ // recreation of this object.
+ if actionType == Sync && f.willObjectBeDeletedLocked(id) {
+ return nil
+ }
+
+ newDeltas := append(f.items[id], Delta{actionType, obj})
+ newDeltas = dedupDeltas(newDeltas)
+ if f.deltaCompressor != nil {
+ newDeltas = f.deltaCompressor.Compress(newDeltas)
+ }
+
+ _, exists := f.items[id]
+ if len(newDeltas) > 0 {
+ if !exists {
+ f.queue = append(f.queue, id)
+ }
+ f.items[id] = newDeltas
+ f.cond.Broadcast()
+ } else if exists {
+ // The compression step removed all deltas, so
+ // we need to remove this from our map (extra items
+ // in the queue are ignored if they are not in the
+ // map).
+ delete(f.items, id)
+ }
+ return nil
+}
+
+// List returns a list of all the items; it returns the object
+// from the most recent Delta.
+// You should treat the items returned inside the deltas as immutable.
+func (f *DeltaFIFO) List() []interface{} {
+ f.lock.RLock()
+ defer f.lock.RUnlock()
+ return f.listLocked()
+}
+
+func (f *DeltaFIFO) listLocked() []interface{} {
+ list := make([]interface{}, 0, len(f.items))
+ for _, item := range f.items {
+ // Copy item's slice so operations on this slice (delta
+ // compression) won't interfere with the object we return.
+ item = copyDeltas(item)
+ list = append(list, item.Newest().Object)
+ }
+ return list
+}
+
+// ListKeys returns a list of all the keys of the objects currently
+// in the FIFO.
+func (f *DeltaFIFO) ListKeys() []string {
+ f.lock.RLock()
+ defer f.lock.RUnlock()
+ list := make([]string, 0, len(f.items))
+ for key := range f.items {
+ list = append(list, key)
+ }
+ return list
+}
+
+// Get returns the complete list of deltas for the requested item,
+// or sets exists=false.
+// You should treat the items returned inside the deltas as immutable.
+func (f *DeltaFIFO) Get(obj interface{}) (item interface{}, exists bool, err error) {
+ key, err := f.KeyOf(obj)
+ if err != nil {
+ return nil, false, KeyError{obj, err}
+ }
+ return f.GetByKey(key)
+}
+
+// GetByKey returns the complete list of deltas for the requested item,
+// setting exists=false if that list is empty.
+// You should treat the items returned inside the deltas as immutable.
+func (f *DeltaFIFO) GetByKey(key string) (item interface{}, exists bool, err error) {
+ f.lock.RLock()
+ defer f.lock.RUnlock()
+ d, exists := f.items[key]
+ if exists {
+ // Copy item's slice so operations on this slice (delta
+ // compression) won't interfere with the object we return.
+ d = copyDeltas(d)
+ }
+ return d, exists, nil
+}
+
+// Checks if the queue is closed
+func (f *DeltaFIFO) IsClosed() bool {
+ f.closedLock.Lock()
+ defer f.closedLock.Unlock()
+ if f.closed {
+ return true
+ }
+ return false
+}
+
+// Pop blocks until an item is added to the queue, and then returns it. If
+// multiple items are ready, they are returned in the order in which they were
+// added/updated. The item is removed from the queue (and the store) before it
+// is returned, so if you don't successfully process it, you need to add it back
+// with AddIfNotPresent().
+// process function is called under lock, so it is safe update data structures
+// in it that need to be in sync with the queue (e.g. knownKeys). The PopProcessFunc
+// may return an instance of ErrRequeue with a nested error to indicate the current
+// item should be requeued (equivalent to calling AddIfNotPresent under the lock).
+//
+// Pop returns a 'Deltas', which has a complete list of all the things
+// that happened to the object (deltas) while it was sitting in the queue.
+func (f *DeltaFIFO) Pop(process PopProcessFunc) (interface{}, error) {
+ f.lock.Lock()
+ defer f.lock.Unlock()
+ for {
+ for len(f.queue) == 0 {
+ // When the queue is empty, invocation of Pop() is blocked until new item is enqueued.
+ // When Close() is called, the f.closed is set and the condition is broadcasted.
+ // Which causes this loop to continue and return from the Pop().
+ if f.IsClosed() {
+ return nil, FIFOClosedError
+ }
+
+ f.cond.Wait()
+ }
+ id := f.queue[0]
+ f.queue = f.queue[1:]
+ item, ok := f.items[id]
+ if f.initialPopulationCount > 0 {
+ f.initialPopulationCount--
+ }
+ if !ok {
+ // Item may have been deleted subsequently.
+ continue
+ }
+ delete(f.items, id)
+ err := process(item)
+ if e, ok := err.(ErrRequeue); ok {
+ f.addIfNotPresent(id, item)
+ err = e.Err
+ }
+ // Don't need to copyDeltas here, because we're transferring
+ // ownership to the caller.
+ return item, err
+ }
+}
+
+// Replace will delete the contents of 'f', using instead the given map.
+// 'f' takes ownership of the map, you should not reference the map again
+// after calling this function. f's queue is reset, too; upon return, it
+// will contain the items in the map, in no particular order.
+func (f *DeltaFIFO) Replace(list []interface{}, resourceVersion string) error {
+ f.lock.Lock()
+ defer f.lock.Unlock()
+ keys := make(sets.String, len(list))
+
+ for _, item := range list {
+ key, err := f.KeyOf(item)
+ if err != nil {
+ return KeyError{item, err}
+ }
+ keys.Insert(key)
+ if err := f.queueActionLocked(Sync, item); err != nil {
+ return fmt.Errorf("couldn't enqueue object: %v", err)
+ }
+ }
+
+ if f.knownObjects == nil {
+ // Do deletion detection against our own list.
+ for k, oldItem := range f.items {
+ if keys.Has(k) {
+ continue
+ }
+ var deletedObj interface{}
+ if n := oldItem.Newest(); n != nil {
+ deletedObj = n.Object
+ }
+ if err := f.queueActionLocked(Deleted, DeletedFinalStateUnknown{k, deletedObj}); err != nil {
+ return err
+ }
+ }
+
+ if !f.populated {
+ f.populated = true
+ f.initialPopulationCount = len(list)
+ }
+
+ return nil
+ }
+
+ // Detect deletions not already in the queue.
+ // TODO(lavalamp): This may be racy-- we aren't properly locked
+ // with knownObjects. Unproven.
+ knownKeys := f.knownObjects.ListKeys()
+ queuedDeletions := 0
+ for _, k := range knownKeys {
+ if keys.Has(k) {
+ continue
+ }
+
+ deletedObj, exists, err := f.knownObjects.GetByKey(k)
+ if err != nil {
+ deletedObj = nil
+ glog.Errorf("Unexpected error %v during lookup of key %v, placing DeleteFinalStateUnknown marker without object", err, k)
+ } else if !exists {
+ deletedObj = nil
+ glog.Infof("Key %v does not exist in known objects store, placing DeleteFinalStateUnknown marker without object", k)
+ }
+ queuedDeletions++
+ if err := f.queueActionLocked(Deleted, DeletedFinalStateUnknown{k, deletedObj}); err != nil {
+ return err
+ }
+ }
+
+ if !f.populated {
+ f.populated = true
+ f.initialPopulationCount = len(list) + queuedDeletions
+ }
+
+ return nil
+}
+
+// Resync will send a sync event for each item
+func (f *DeltaFIFO) Resync() error {
+ f.lock.Lock()
+ defer f.lock.Unlock()
+
+ keys := f.knownObjects.ListKeys()
+ for _, k := range keys {
+ if err := f.syncKeyLocked(k); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func (f *DeltaFIFO) syncKey(key string) error {
+ f.lock.Lock()
+ defer f.lock.Unlock()
+
+ return f.syncKeyLocked(key)
+}
+
+func (f *DeltaFIFO) syncKeyLocked(key string) error {
+ obj, exists, err := f.knownObjects.GetByKey(key)
+ if err != nil {
+ glog.Errorf("Unexpected error %v during lookup of key %v, unable to queue object for sync", err, key)
+ return nil
+ } else if !exists {
+ glog.Infof("Key %v does not exist in known objects store, unable to queue object for sync", key)
+ return nil
+ }
+
+ // If we are doing Resync() and there is already an event queued for that object,
+ // we ignore the Resync for it. This is to avoid the race, in which the resync
+ // comes with the previous value of object (since queueing an event for the object
+ // doesn't trigger changing the underlying store <knownObjects>.
+ id, err := f.KeyOf(obj)
+ if err != nil {
+ return KeyError{obj, err}
+ }
+ if len(f.items[id]) > 0 {
+ return nil
+ }
+
+ if err := f.queueActionLocked(Sync, obj); err != nil {
+ return fmt.Errorf("couldn't queue object: %v", err)
+ }
+ return nil
+}
+
+// A KeyListerGetter is anything that knows how to list its keys and look up by key.
+type KeyListerGetter interface {
+ KeyLister
+ KeyGetter
+}
+
+// A KeyLister is anything that knows how to list its keys.
+type KeyLister interface {
+ ListKeys() []string
+}
+
+// A KeyGetter is anything that knows how to get the value stored under a given key.
+type KeyGetter interface {
+ GetByKey(key string) (interface{}, bool, error)
+}
+
+// DeltaCompressor is an algorithm that removes redundant changes.
+type DeltaCompressor interface {
+ Compress(Deltas) Deltas
+}
+
+// DeltaCompressorFunc should remove redundant changes; but changes that
+// are redundant depend on one's desired semantics, so this is an
+// injectable function.
+//
+// DeltaCompressorFunc adapts a raw function to be a DeltaCompressor.
+type DeltaCompressorFunc func(Deltas) Deltas
+
+// Compress just calls dc.
+func (dc DeltaCompressorFunc) Compress(d Deltas) Deltas {
+ return dc(d)
+}
+
+// DeltaType is the type of a change (addition, deletion, etc)
+type DeltaType string
+
+const (
+ Added DeltaType = "Added"
+ Updated DeltaType = "Updated"
+ Deleted DeltaType = "Deleted"
+ // The other types are obvious. You'll get Sync deltas when:
+ // * A watch expires/errors out and a new list/watch cycle is started.
+ // * You've turned on periodic syncs.
+ // (Anything that trigger's DeltaFIFO's Replace() method.)
+ Sync DeltaType = "Sync"
+)
+
+// Delta is the type stored by a DeltaFIFO. It tells you what change
+// happened, and the object's state after* that change.
+//
+// [*] Unless the change is a deletion, and then you'll get the final
+// state of the object before it was deleted.
+type Delta struct {
+ Type DeltaType
+ Object interface{}
+}
+
+// Deltas is a list of one or more 'Delta's to an individual object.
+// The oldest delta is at index 0, the newest delta is the last one.
+type Deltas []Delta
+
+// Oldest is a convenience function that returns the oldest delta, or
+// nil if there are no deltas.
+func (d Deltas) Oldest() *Delta {
+ if len(d) > 0 {
+ return &d[0]
+ }
+ return nil
+}
+
+// Newest is a convenience function that returns the newest delta, or
+// nil if there are no deltas.
+func (d Deltas) Newest() *Delta {
+ if n := len(d); n > 0 {
+ return &d[n-1]
+ }
+ return nil
+}
+
+// copyDeltas returns a shallow copy of d; that is, it copies the slice but not
+// the objects in the slice. This allows Get/List to return an object that we
+// know won't be clobbered by a subsequent call to a delta compressor.
+func copyDeltas(d Deltas) Deltas {
+ d2 := make(Deltas, len(d))
+ copy(d2, d)
+ return d2
+}
+
+// DeletedFinalStateUnknown is placed into a DeltaFIFO in the case where
+// an object was deleted but the watch deletion event was missed. In this
+// case we don't know the final "resting" state of the object, so there's
+// a chance the included `Obj` is stale.
+type DeletedFinalStateUnknown struct {
+ Key string
+ Obj interface{}
+}
diff --git a/vendor/k8s.io/client-go/tools/cache/doc.go b/vendor/k8s.io/client-go/tools/cache/doc.go
new file mode 100644
index 000000000..56b61d300
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/cache/doc.go
@@ -0,0 +1,24 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package cache is a client-side caching mechanism. It is useful for
+// reducing the number of server calls you'd otherwise need to make.
+// Reflector watches a server and updates a Store. Two stores are provided;
+// one that simply caches objects (for example, to allow a scheduler to
+// list currently available nodes), and one that additionally acts as
+// a FIFO queue (for example, to allow a scheduler to process incoming
+// pods).
+package cache // import "k8s.io/client-go/tools/cache"
diff --git a/vendor/k8s.io/client-go/tools/cache/expiration_cache.go b/vendor/k8s.io/client-go/tools/cache/expiration_cache.go
new file mode 100644
index 000000000..fa88fc407
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/cache/expiration_cache.go
@@ -0,0 +1,208 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package cache
+
+import (
+ "sync"
+ "time"
+
+ "github.com/golang/glog"
+ "k8s.io/apimachinery/pkg/util/clock"
+)
+
+// ExpirationCache implements the store interface
+// 1. All entries are automatically time stamped on insert
+// a. The key is computed based off the original item/keyFunc
+// b. The value inserted under that key is the timestamped item
+// 2. Expiration happens lazily on read based on the expiration policy
+// a. No item can be inserted into the store while we're expiring
+// *any* item in the cache.
+// 3. Time-stamps are stripped off unexpired entries before return
+// Note that the ExpirationCache is inherently slower than a normal
+// threadSafeStore because it takes a write lock every time it checks if
+// an item has expired.
+type ExpirationCache struct {
+ cacheStorage ThreadSafeStore
+ keyFunc KeyFunc
+ clock clock.Clock
+ expirationPolicy ExpirationPolicy
+ // expirationLock is a write lock used to guarantee that we don't clobber
+ // newly inserted objects because of a stale expiration timestamp comparison
+ expirationLock sync.Mutex
+}
+
+// ExpirationPolicy dictates when an object expires. Currently only abstracted out
+// so unittests don't rely on the system clock.
+type ExpirationPolicy interface {
+ IsExpired(obj *timestampedEntry) bool
+}
+
+// TTLPolicy implements a ttl based ExpirationPolicy.
+type TTLPolicy struct {
+ // >0: Expire entries with an age > ttl
+ // <=0: Don't expire any entry
+ Ttl time.Duration
+
+ // Clock used to calculate ttl expiration
+ Clock clock.Clock
+}
+
+// IsExpired returns true if the given object is older than the ttl, or it can't
+// determine its age.
+func (p *TTLPolicy) IsExpired(obj *timestampedEntry) bool {
+ return p.Ttl > 0 && p.Clock.Since(obj.timestamp) > p.Ttl
+}
+
+// timestampedEntry is the only type allowed in a ExpirationCache.
+type timestampedEntry struct {
+ obj interface{}
+ timestamp time.Time
+}
+
+// getTimestampedEntry returns the timestampedEntry stored under the given key.
+func (c *ExpirationCache) getTimestampedEntry(key string) (*timestampedEntry, bool) {
+ item, _ := c.cacheStorage.Get(key)
+ if tsEntry, ok := item.(*timestampedEntry); ok {
+ return tsEntry, true
+ }
+ return nil, false
+}
+
+// getOrExpire retrieves the object from the timestampedEntry if and only if it hasn't
+// already expired. It holds a write lock across deletion.
+func (c *ExpirationCache) getOrExpire(key string) (interface{}, bool) {
+ // Prevent all inserts from the time we deem an item as "expired" to when we
+ // delete it, so an un-expired item doesn't sneak in under the same key, just
+ // before the Delete.
+ c.expirationLock.Lock()
+ defer c.expirationLock.Unlock()
+ timestampedItem, exists := c.getTimestampedEntry(key)
+ if !exists {
+ return nil, false
+ }
+ if c.expirationPolicy.IsExpired(timestampedItem) {
+ glog.V(4).Infof("Entry %v: %+v has expired", key, timestampedItem.obj)
+ c.cacheStorage.Delete(key)
+ return nil, false
+ }
+ return timestampedItem.obj, true
+}
+
+// GetByKey returns the item stored under the key, or sets exists=false.
+func (c *ExpirationCache) GetByKey(key string) (interface{}, bool, error) {
+ obj, exists := c.getOrExpire(key)
+ return obj, exists, nil
+}
+
+// Get returns unexpired items. It purges the cache of expired items in the
+// process.
+func (c *ExpirationCache) Get(obj interface{}) (interface{}, bool, error) {
+ key, err := c.keyFunc(obj)
+ if err != nil {
+ return nil, false, KeyError{obj, err}
+ }
+ obj, exists := c.getOrExpire(key)
+ return obj, exists, nil
+}
+
+// List retrieves a list of unexpired items. It purges the cache of expired
+// items in the process.
+func (c *ExpirationCache) List() []interface{} {
+ items := c.cacheStorage.List()
+
+ list := make([]interface{}, 0, len(items))
+ for _, item := range items {
+ obj := item.(*timestampedEntry).obj
+ if key, err := c.keyFunc(obj); err != nil {
+ list = append(list, obj)
+ } else if obj, exists := c.getOrExpire(key); exists {
+ list = append(list, obj)
+ }
+ }
+ return list
+}
+
+// ListKeys returns a list of all keys in the expiration cache.
+func (c *ExpirationCache) ListKeys() []string {
+ return c.cacheStorage.ListKeys()
+}
+
+// Add timestamps an item and inserts it into the cache, overwriting entries
+// that might exist under the same key.
+func (c *ExpirationCache) Add(obj interface{}) error {
+ c.expirationLock.Lock()
+ defer c.expirationLock.Unlock()
+
+ key, err := c.keyFunc(obj)
+ if err != nil {
+ return KeyError{obj, err}
+ }
+ c.cacheStorage.Add(key, &timestampedEntry{obj, c.clock.Now()})
+ return nil
+}
+
+// Update has not been implemented yet for lack of a use case, so this method
+// simply calls `Add`. This effectively refreshes the timestamp.
+func (c *ExpirationCache) Update(obj interface{}) error {
+ return c.Add(obj)
+}
+
+// Delete removes an item from the cache.
+func (c *ExpirationCache) Delete(obj interface{}) error {
+ c.expirationLock.Lock()
+ defer c.expirationLock.Unlock()
+ key, err := c.keyFunc(obj)
+ if err != nil {
+ return KeyError{obj, err}
+ }
+ c.cacheStorage.Delete(key)
+ return nil
+}
+
+// Replace will convert all items in the given list to TimestampedEntries
+// before attempting the replace operation. The replace operation will
+// delete the contents of the ExpirationCache `c`.
+func (c *ExpirationCache) Replace(list []interface{}, resourceVersion string) error {
+ c.expirationLock.Lock()
+ defer c.expirationLock.Unlock()
+ items := map[string]interface{}{}
+ ts := c.clock.Now()
+ for _, item := range list {
+ key, err := c.keyFunc(item)
+ if err != nil {
+ return KeyError{item, err}
+ }
+ items[key] = &timestampedEntry{item, ts}
+ }
+ c.cacheStorage.Replace(items, resourceVersion)
+ return nil
+}
+
+// Resync will touch all objects to put them into the processing queue
+func (c *ExpirationCache) Resync() error {
+ return c.cacheStorage.Resync()
+}
+
+// NewTTLStore creates and returns a ExpirationCache with a TTLPolicy
+func NewTTLStore(keyFunc KeyFunc, ttl time.Duration) Store {
+ return &ExpirationCache{
+ cacheStorage: NewThreadSafeStore(Indexers{}, Indices{}),
+ keyFunc: keyFunc,
+ clock: clock.RealClock{},
+ expirationPolicy: &TTLPolicy{ttl, clock.RealClock{}},
+ }
+}
diff --git a/vendor/k8s.io/client-go/tools/cache/expiration_cache_fakes.go b/vendor/k8s.io/client-go/tools/cache/expiration_cache_fakes.go
new file mode 100644
index 000000000..a096765f6
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/cache/expiration_cache_fakes.go
@@ -0,0 +1,54 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package cache
+
+import (
+ "k8s.io/apimachinery/pkg/util/clock"
+ "k8s.io/apimachinery/pkg/util/sets"
+)
+
+type fakeThreadSafeMap struct {
+ ThreadSafeStore
+ deletedKeys chan<- string
+}
+
+func (c *fakeThreadSafeMap) Delete(key string) {
+ if c.deletedKeys != nil {
+ c.ThreadSafeStore.Delete(key)
+ c.deletedKeys <- key
+ }
+}
+
+type FakeExpirationPolicy struct {
+ NeverExpire sets.String
+ RetrieveKeyFunc KeyFunc
+}
+
+func (p *FakeExpirationPolicy) IsExpired(obj *timestampedEntry) bool {
+ key, _ := p.RetrieveKeyFunc(obj)
+ return !p.NeverExpire.Has(key)
+}
+
+func NewFakeExpirationStore(keyFunc KeyFunc, deletedKeys chan<- string, expirationPolicy ExpirationPolicy, cacheClock clock.Clock) Store {
+ cacheStorage := NewThreadSafeStore(Indexers{}, Indices{})
+ return &ExpirationCache{
+ cacheStorage: &fakeThreadSafeMap{cacheStorage, deletedKeys},
+ keyFunc: keyFunc,
+ clock: cacheClock,
+ expirationPolicy: expirationPolicy,
+ }
+}
diff --git a/vendor/k8s.io/client-go/tools/cache/fake_custom_store.go b/vendor/k8s.io/client-go/tools/cache/fake_custom_store.go
new file mode 100644
index 000000000..8d71c2474
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/cache/fake_custom_store.go
@@ -0,0 +1,102 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package cache
+
+// FakeStore lets you define custom functions for store operations
+type FakeCustomStore struct {
+ AddFunc func(obj interface{}) error
+ UpdateFunc func(obj interface{}) error
+ DeleteFunc func(obj interface{}) error
+ ListFunc func() []interface{}
+ ListKeysFunc func() []string
+ GetFunc func(obj interface{}) (item interface{}, exists bool, err error)
+ GetByKeyFunc func(key string) (item interface{}, exists bool, err error)
+ ReplaceFunc func(list []interface{}, resourceVerion string) error
+ ResyncFunc func() error
+}
+
+// Add calls the custom Add function if defined
+func (f *FakeCustomStore) Add(obj interface{}) error {
+ if f.AddFunc != nil {
+ return f.AddFunc(obj)
+ }
+ return nil
+}
+
+// Update calls the custom Update function if defined
+func (f *FakeCustomStore) Update(obj interface{}) error {
+ if f.UpdateFunc != nil {
+ return f.Update(obj)
+ }
+ return nil
+}
+
+// Delete calls the custom Delete function if defined
+func (f *FakeCustomStore) Delete(obj interface{}) error {
+ if f.DeleteFunc != nil {
+ return f.DeleteFunc(obj)
+ }
+ return nil
+}
+
+// List calls the custom List function if defined
+func (f *FakeCustomStore) List() []interface{} {
+ if f.ListFunc != nil {
+ return f.ListFunc()
+ }
+ return nil
+}
+
+// ListKeys calls the custom ListKeys function if defined
+func (f *FakeCustomStore) ListKeys() []string {
+ if f.ListKeysFunc != nil {
+ return f.ListKeysFunc()
+ }
+ return nil
+}
+
+// Get calls the custom Get function if defined
+func (f *FakeCustomStore) Get(obj interface{}) (item interface{}, exists bool, err error) {
+ if f.GetFunc != nil {
+ return f.GetFunc(obj)
+ }
+ return nil, false, nil
+}
+
+// GetByKey calls the custom GetByKey function if defined
+func (f *FakeCustomStore) GetByKey(key string) (item interface{}, exists bool, err error) {
+ if f.GetByKeyFunc != nil {
+ return f.GetByKeyFunc(key)
+ }
+ return nil, false, nil
+}
+
+// Replace calls the custom Replace function if defined
+func (f *FakeCustomStore) Replace(list []interface{}, resourceVersion string) error {
+ if f.ReplaceFunc != nil {
+ return f.ReplaceFunc(list, resourceVersion)
+ }
+ return nil
+}
+
+// Resync calls the custom Resync function if defined
+func (f *FakeCustomStore) Resync() error {
+ if f.ResyncFunc != nil {
+ return f.ResyncFunc()
+ }
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/tools/cache/fifo.go b/vendor/k8s.io/client-go/tools/cache/fifo.go
new file mode 100644
index 000000000..3f6e2a948
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/cache/fifo.go
@@ -0,0 +1,358 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package cache
+
+import (
+ "errors"
+ "sync"
+
+ "k8s.io/apimachinery/pkg/util/sets"
+)
+
+// PopProcessFunc is passed to Pop() method of Queue interface.
+// It is supposed to process the element popped from the queue.
+type PopProcessFunc func(interface{}) error
+
+// ErrRequeue may be returned by a PopProcessFunc to safely requeue
+// the current item. The value of Err will be returned from Pop.
+type ErrRequeue struct {
+ // Err is returned by the Pop function
+ Err error
+}
+
+var FIFOClosedError error = errors.New("DeltaFIFO: manipulating with closed queue")
+
+func (e ErrRequeue) Error() string {
+ if e.Err == nil {
+ return "the popped item should be requeued without returning an error"
+ }
+ return e.Err.Error()
+}
+
+// Queue is exactly like a Store, but has a Pop() method too.
+type Queue interface {
+ Store
+
+ // Pop blocks until it has something to process.
+ // It returns the object that was process and the result of processing.
+ // The PopProcessFunc may return an ErrRequeue{...} to indicate the item
+ // should be requeued before releasing the lock on the queue.
+ Pop(PopProcessFunc) (interface{}, error)
+
+ // AddIfNotPresent adds a value previously
+ // returned by Pop back into the queue as long
+ // as nothing else (presumably more recent)
+ // has since been added.
+ AddIfNotPresent(interface{}) error
+
+ // Return true if the first batch of items has been popped
+ HasSynced() bool
+
+ // Close queue
+ Close()
+}
+
+// Helper function for popping from Queue.
+// WARNING: Do NOT use this function in non-test code to avoid races
+// unless you really really really really know what you are doing.
+func Pop(queue Queue) interface{} {
+ var result interface{}
+ queue.Pop(func(obj interface{}) error {
+ result = obj
+ return nil
+ })
+ return result
+}
+
+// FIFO receives adds and updates from a Reflector, and puts them in a queue for
+// FIFO order processing. If multiple adds/updates of a single item happen while
+// an item is in the queue before it has been processed, it will only be
+// processed once, and when it is processed, the most recent version will be
+// processed. This can't be done with a channel.
+//
+// FIFO solves this use case:
+// * You want to process every object (exactly) once.
+// * You want to process the most recent version of the object when you process it.
+// * You do not want to process deleted objects, they should be removed from the queue.
+// * You do not want to periodically reprocess objects.
+// Compare with DeltaFIFO for other use cases.
+type FIFO struct {
+ lock sync.RWMutex
+ cond sync.Cond
+ // We depend on the property that items in the set are in the queue and vice versa.
+ items map[string]interface{}
+ queue []string
+
+ // populated is true if the first batch of items inserted by Replace() has been populated
+ // or Delete/Add/Update was called first.
+ populated bool
+ // initialPopulationCount is the number of items inserted by the first call of Replace()
+ initialPopulationCount int
+
+ // keyFunc is used to make the key used for queued item insertion and retrieval, and
+ // should be deterministic.
+ keyFunc KeyFunc
+
+ // Indication the queue is closed.
+ // Used to indicate a queue is closed so a control loop can exit when a queue is empty.
+ // Currently, not used to gate any of CRED operations.
+ closed bool
+ closedLock sync.Mutex
+}
+
+var (
+ _ = Queue(&FIFO{}) // FIFO is a Queue
+)
+
+// Close the queue.
+func (f *FIFO) Close() {
+ f.closedLock.Lock()
+ defer f.closedLock.Unlock()
+ f.closed = true
+ f.cond.Broadcast()
+}
+
+// Return true if an Add/Update/Delete/AddIfNotPresent are called first,
+// or an Update called first but the first batch of items inserted by Replace() has been popped
+func (f *FIFO) HasSynced() bool {
+ f.lock.Lock()
+ defer f.lock.Unlock()
+ return f.populated && f.initialPopulationCount == 0
+}
+
+// Add inserts an item, and puts it in the queue. The item is only enqueued
+// if it doesn't already exist in the set.
+func (f *FIFO) Add(obj interface{}) error {
+ id, err := f.keyFunc(obj)
+ if err != nil {
+ return KeyError{obj, err}
+ }
+ f.lock.Lock()
+ defer f.lock.Unlock()
+ f.populated = true
+ if _, exists := f.items[id]; !exists {
+ f.queue = append(f.queue, id)
+ }
+ f.items[id] = obj
+ f.cond.Broadcast()
+ return nil
+}
+
+// AddIfNotPresent inserts an item, and puts it in the queue. If the item is already
+// present in the set, it is neither enqueued nor added to the set.
+//
+// This is useful in a single producer/consumer scenario so that the consumer can
+// safely retry items without contending with the producer and potentially enqueueing
+// stale items.
+func (f *FIFO) AddIfNotPresent(obj interface{}) error {
+ id, err := f.keyFunc(obj)
+ if err != nil {
+ return KeyError{obj, err}
+ }
+ f.lock.Lock()
+ defer f.lock.Unlock()
+ f.addIfNotPresent(id, obj)
+ return nil
+}
+
+// addIfNotPresent assumes the fifo lock is already held and adds the the provided
+// item to the queue under id if it does not already exist.
+func (f *FIFO) addIfNotPresent(id string, obj interface{}) {
+ f.populated = true
+ if _, exists := f.items[id]; exists {
+ return
+ }
+
+ f.queue = append(f.queue, id)
+ f.items[id] = obj
+ f.cond.Broadcast()
+}
+
+// Update is the same as Add in this implementation.
+func (f *FIFO) Update(obj interface{}) error {
+ return f.Add(obj)
+}
+
+// Delete removes an item. It doesn't add it to the queue, because
+// this implementation assumes the consumer only cares about the objects,
+// not the order in which they were created/added.
+func (f *FIFO) Delete(obj interface{}) error {
+ id, err := f.keyFunc(obj)
+ if err != nil {
+ return KeyError{obj, err}
+ }
+ f.lock.Lock()
+ defer f.lock.Unlock()
+ f.populated = true
+ delete(f.items, id)
+ return err
+}
+
+// List returns a list of all the items.
+func (f *FIFO) List() []interface{} {
+ f.lock.RLock()
+ defer f.lock.RUnlock()
+ list := make([]interface{}, 0, len(f.items))
+ for _, item := range f.items {
+ list = append(list, item)
+ }
+ return list
+}
+
+// ListKeys returns a list of all the keys of the objects currently
+// in the FIFO.
+func (f *FIFO) ListKeys() []string {
+ f.lock.RLock()
+ defer f.lock.RUnlock()
+ list := make([]string, 0, len(f.items))
+ for key := range f.items {
+ list = append(list, key)
+ }
+ return list
+}
+
+// Get returns the requested item, or sets exists=false.
+func (f *FIFO) Get(obj interface{}) (item interface{}, exists bool, err error) {
+ key, err := f.keyFunc(obj)
+ if err != nil {
+ return nil, false, KeyError{obj, err}
+ }
+ return f.GetByKey(key)
+}
+
+// GetByKey returns the requested item, or sets exists=false.
+func (f *FIFO) GetByKey(key string) (item interface{}, exists bool, err error) {
+ f.lock.RLock()
+ defer f.lock.RUnlock()
+ item, exists = f.items[key]
+ return item, exists, nil
+}
+
+// Checks if the queue is closed
+func (f *FIFO) IsClosed() bool {
+ f.closedLock.Lock()
+ defer f.closedLock.Unlock()
+ if f.closed {
+ return true
+ }
+ return false
+}
+
+// Pop waits until an item is ready and processes it. If multiple items are
+// ready, they are returned in the order in which they were added/updated.
+// The item is removed from the queue (and the store) before it is processed,
+// so if you don't successfully process it, it should be added back with
+// AddIfNotPresent(). process function is called under lock, so it is safe
+// update data structures in it that need to be in sync with the queue.
+func (f *FIFO) Pop(process PopProcessFunc) (interface{}, error) {
+ f.lock.Lock()
+ defer f.lock.Unlock()
+ for {
+ for len(f.queue) == 0 {
+ // When the queue is empty, invocation of Pop() is blocked until new item is enqueued.
+ // When Close() is called, the f.closed is set and the condition is broadcasted.
+ // Which causes this loop to continue and return from the Pop().
+ if f.IsClosed() {
+ return nil, FIFOClosedError
+ }
+
+ f.cond.Wait()
+ }
+ id := f.queue[0]
+ f.queue = f.queue[1:]
+ if f.initialPopulationCount > 0 {
+ f.initialPopulationCount--
+ }
+ item, ok := f.items[id]
+ if !ok {
+ // Item may have been deleted subsequently.
+ continue
+ }
+ delete(f.items, id)
+ err := process(item)
+ if e, ok := err.(ErrRequeue); ok {
+ f.addIfNotPresent(id, item)
+ err = e.Err
+ }
+ return item, err
+ }
+}
+
+// Replace will delete the contents of 'f', using instead the given map.
+// 'f' takes ownership of the map, you should not reference the map again
+// after calling this function. f's queue is reset, too; upon return, it
+// will contain the items in the map, in no particular order.
+func (f *FIFO) Replace(list []interface{}, resourceVersion string) error {
+ items := map[string]interface{}{}
+ for _, item := range list {
+ key, err := f.keyFunc(item)
+ if err != nil {
+ return KeyError{item, err}
+ }
+ items[key] = item
+ }
+
+ f.lock.Lock()
+ defer f.lock.Unlock()
+
+ if !f.populated {
+ f.populated = true
+ f.initialPopulationCount = len(items)
+ }
+
+ f.items = items
+ f.queue = f.queue[:0]
+ for id := range items {
+ f.queue = append(f.queue, id)
+ }
+ if len(f.queue) > 0 {
+ f.cond.Broadcast()
+ }
+ return nil
+}
+
+// Resync will touch all objects to put them into the processing queue
+func (f *FIFO) Resync() error {
+ f.lock.Lock()
+ defer f.lock.Unlock()
+
+ inQueue := sets.NewString()
+ for _, id := range f.queue {
+ inQueue.Insert(id)
+ }
+ for id := range f.items {
+ if !inQueue.Has(id) {
+ f.queue = append(f.queue, id)
+ }
+ }
+ if len(f.queue) > 0 {
+ f.cond.Broadcast()
+ }
+ return nil
+}
+
+// NewFIFO returns a Store which can be used to queue up items to
+// process.
+func NewFIFO(keyFunc KeyFunc) *FIFO {
+ f := &FIFO{
+ items: map[string]interface{}{},
+ queue: []string{},
+ keyFunc: keyFunc,
+ }
+ f.cond.L = &f.lock
+ return f
+}
diff --git a/vendor/k8s.io/client-go/tools/cache/index.go b/vendor/k8s.io/client-go/tools/cache/index.go
new file mode 100644
index 000000000..15acb168e
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/cache/index.go
@@ -0,0 +1,87 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package cache
+
+import (
+ "fmt"
+
+ "k8s.io/apimachinery/pkg/api/meta"
+ "k8s.io/apimachinery/pkg/util/sets"
+)
+
+// Indexer is a storage interface that lets you list objects using multiple indexing functions
+type Indexer interface {
+ Store
+ // Retrieve list of objects that match on the named indexing function
+ Index(indexName string, obj interface{}) ([]interface{}, error)
+ // IndexKeys returns the set of keys that match on the named indexing function.
+ IndexKeys(indexName, indexKey string) ([]string, error)
+ // ListIndexFuncValues returns the list of generated values of an Index func
+ ListIndexFuncValues(indexName string) []string
+ // ByIndex lists object that match on the named indexing function with the exact key
+ ByIndex(indexName, indexKey string) ([]interface{}, error)
+ // GetIndexer return the indexers
+ GetIndexers() Indexers
+
+ // AddIndexers adds more indexers to this store. If you call this after you already have data
+ // in the store, the results are undefined.
+ AddIndexers(newIndexers Indexers) error
+}
+
+// IndexFunc knows how to provide an indexed value for an object.
+type IndexFunc func(obj interface{}) ([]string, error)
+
+// IndexFuncToKeyFuncAdapter adapts an indexFunc to a keyFunc. This is only useful if your index function returns
+// unique values for every object. This is conversion can create errors when more than one key is found. You
+// should prefer to make proper key and index functions.
+func IndexFuncToKeyFuncAdapter(indexFunc IndexFunc) KeyFunc {
+ return func(obj interface{}) (string, error) {
+ indexKeys, err := indexFunc(obj)
+ if err != nil {
+ return "", err
+ }
+ if len(indexKeys) > 1 {
+ return "", fmt.Errorf("too many keys: %v", indexKeys)
+ }
+ if len(indexKeys) == 0 {
+ return "", fmt.Errorf("unexpected empty indexKeys")
+ }
+ return indexKeys[0], nil
+ }
+}
+
+const (
+ NamespaceIndex string = "namespace"
+)
+
+// MetaNamespaceIndexFunc is a default index function that indexes based on an object's namespace
+func MetaNamespaceIndexFunc(obj interface{}) ([]string, error) {
+ meta, err := meta.Accessor(obj)
+ if err != nil {
+ return []string{""}, fmt.Errorf("object has no meta: %v", err)
+ }
+ return []string{meta.GetNamespace()}, nil
+}
+
+// Index maps the indexed value to a set of keys in the store that match on that value
+type Index map[string]sets.String
+
+// Indexers maps a name to a IndexFunc
+type Indexers map[string]IndexFunc
+
+// Indices maps a name to an Index
+type Indices map[string]Index
diff --git a/vendor/k8s.io/client-go/tools/cache/listers.go b/vendor/k8s.io/client-go/tools/cache/listers.go
new file mode 100644
index 000000000..27d51a6b3
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/cache/listers.go
@@ -0,0 +1,160 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package cache
+
+import (
+ "github.com/golang/glog"
+
+ "k8s.io/apimachinery/pkg/api/errors"
+ "k8s.io/apimachinery/pkg/api/meta"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/labels"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// AppendFunc is used to add a matching item to whatever list the caller is using
+type AppendFunc func(interface{})
+
+func ListAll(store Store, selector labels.Selector, appendFn AppendFunc) error {
+ for _, m := range store.List() {
+ metadata, err := meta.Accessor(m)
+ if err != nil {
+ return err
+ }
+ if selector.Matches(labels.Set(metadata.GetLabels())) {
+ appendFn(m)
+ }
+ }
+ return nil
+}
+
+func ListAllByNamespace(indexer Indexer, namespace string, selector labels.Selector, appendFn AppendFunc) error {
+ if namespace == metav1.NamespaceAll {
+ for _, m := range indexer.List() {
+ metadata, err := meta.Accessor(m)
+ if err != nil {
+ return err
+ }
+ if selector.Matches(labels.Set(metadata.GetLabels())) {
+ appendFn(m)
+ }
+ }
+ return nil
+ }
+
+ items, err := indexer.Index(NamespaceIndex, &metav1.ObjectMeta{Namespace: namespace})
+ if err != nil {
+ // Ignore error; do slow search without index.
+ glog.Warningf("can not retrieve list of objects using index : %v", err)
+ for _, m := range indexer.List() {
+ metadata, err := meta.Accessor(m)
+ if err != nil {
+ return err
+ }
+ if metadata.GetNamespace() == namespace && selector.Matches(labels.Set(metadata.GetLabels())) {
+ appendFn(m)
+ }
+
+ }
+ return nil
+ }
+ for _, m := range items {
+ metadata, err := meta.Accessor(m)
+ if err != nil {
+ return err
+ }
+ if selector.Matches(labels.Set(metadata.GetLabels())) {
+ appendFn(m)
+ }
+ }
+
+ return nil
+}
+
+// GenericLister is a lister skin on a generic Indexer
+type GenericLister interface {
+ // List will return all objects across namespaces
+ List(selector labels.Selector) (ret []runtime.Object, err error)
+ // Get will attempt to retrieve assuming that name==key
+ Get(name string) (runtime.Object, error)
+ // ByNamespace will give you a GenericNamespaceLister for one namespace
+ ByNamespace(namespace string) GenericNamespaceLister
+}
+
+// GenericNamespaceLister is a lister skin on a generic Indexer
+type GenericNamespaceLister interface {
+ // List will return all objects in this namespace
+ List(selector labels.Selector) (ret []runtime.Object, err error)
+ // Get will attempt to retrieve by namespace and name
+ Get(name string) (runtime.Object, error)
+}
+
+func NewGenericLister(indexer Indexer, resource schema.GroupResource) GenericLister {
+ return &genericLister{indexer: indexer, resource: resource}
+}
+
+type genericLister struct {
+ indexer Indexer
+ resource schema.GroupResource
+}
+
+func (s *genericLister) List(selector labels.Selector) (ret []runtime.Object, err error) {
+ err = ListAll(s.indexer, selector, func(m interface{}) {
+ ret = append(ret, m.(runtime.Object))
+ })
+ return ret, err
+}
+
+func (s *genericLister) ByNamespace(namespace string) GenericNamespaceLister {
+ return &genericNamespaceLister{indexer: s.indexer, namespace: namespace, resource: s.resource}
+}
+
+func (s *genericLister) Get(name string) (runtime.Object, error) {
+ obj, exists, err := s.indexer.GetByKey(name)
+ if err != nil {
+ return nil, err
+ }
+ if !exists {
+ return nil, errors.NewNotFound(s.resource, name)
+ }
+ return obj.(runtime.Object), nil
+}
+
+type genericNamespaceLister struct {
+ indexer Indexer
+ namespace string
+ resource schema.GroupResource
+}
+
+func (s *genericNamespaceLister) List(selector labels.Selector) (ret []runtime.Object, err error) {
+ err = ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
+ ret = append(ret, m.(runtime.Object))
+ })
+ return ret, err
+}
+
+func (s *genericNamespaceLister) Get(name string) (runtime.Object, error) {
+ obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
+ if err != nil {
+ return nil, err
+ }
+ if !exists {
+ return nil, errors.NewNotFound(s.resource, name)
+ }
+ return obj.(runtime.Object), nil
+}
diff --git a/vendor/k8s.io/client-go/tools/cache/listwatch.go b/vendor/k8s.io/client-go/tools/cache/listwatch.go
new file mode 100644
index 000000000..af01d4745
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/cache/listwatch.go
@@ -0,0 +1,162 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package cache
+
+import (
+ "time"
+
+ "k8s.io/apimachinery/pkg/api/meta"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/fields"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/watch"
+ restclient "k8s.io/client-go/rest"
+)
+
+// ListerWatcher is any object that knows how to perform an initial list and start a watch on a resource.
+type ListerWatcher interface {
+ // List should return a list type object; the Items field will be extracted, and the
+ // ResourceVersion field will be used to start the watch in the right place.
+ List(options metav1.ListOptions) (runtime.Object, error)
+ // Watch should begin a watch at the specified version.
+ Watch(options metav1.ListOptions) (watch.Interface, error)
+}
+
+// ListFunc knows how to list resources
+type ListFunc func(options metav1.ListOptions) (runtime.Object, error)
+
+// WatchFunc knows how to watch resources
+type WatchFunc func(options metav1.ListOptions) (watch.Interface, error)
+
+// ListWatch knows how to list and watch a set of apiserver resources. It satisfies the ListerWatcher interface.
+// It is a convenience function for users of NewReflector, etc.
+// ListFunc and WatchFunc must not be nil
+type ListWatch struct {
+ ListFunc ListFunc
+ WatchFunc WatchFunc
+}
+
+// Getter interface knows how to access Get method from RESTClient.
+type Getter interface {
+ Get() *restclient.Request
+}
+
+// NewListWatchFromClient creates a new ListWatch from the specified client, resource, namespace and field selector.
+func NewListWatchFromClient(c Getter, resource string, namespace string, fieldSelector fields.Selector) *ListWatch {
+ listFunc := func(options metav1.ListOptions) (runtime.Object, error) {
+ return c.Get().
+ Namespace(namespace).
+ Resource(resource).
+ VersionedParams(&options, metav1.ParameterCodec).
+ FieldsSelectorParam(fieldSelector).
+ Do().
+ Get()
+ }
+ watchFunc := func(options metav1.ListOptions) (watch.Interface, error) {
+ options.Watch = true
+ return c.Get().
+ Namespace(namespace).
+ Resource(resource).
+ VersionedParams(&options, metav1.ParameterCodec).
+ FieldsSelectorParam(fieldSelector).
+ Watch()
+ }
+ return &ListWatch{ListFunc: listFunc, WatchFunc: watchFunc}
+}
+
+func timeoutFromListOptions(options metav1.ListOptions) time.Duration {
+ if options.TimeoutSeconds != nil {
+ return time.Duration(*options.TimeoutSeconds) * time.Second
+ }
+ return 0
+}
+
+// List a set of apiserver resources
+func (lw *ListWatch) List(options metav1.ListOptions) (runtime.Object, error) {
+ return lw.ListFunc(options)
+}
+
+// Watch a set of apiserver resources
+func (lw *ListWatch) Watch(options metav1.ListOptions) (watch.Interface, error) {
+ return lw.WatchFunc(options)
+}
+
+// TODO: check for watch expired error and retry watch from latest point? Same issue exists for Until.
+func ListWatchUntil(timeout time.Duration, lw ListerWatcher, conditions ...watch.ConditionFunc) (*watch.Event, error) {
+ if len(conditions) == 0 {
+ return nil, nil
+ }
+
+ list, err := lw.List(metav1.ListOptions{})
+ if err != nil {
+ return nil, err
+ }
+ initialItems, err := meta.ExtractList(list)
+ if err != nil {
+ return nil, err
+ }
+
+ // use the initial items as simulated "adds"
+ var lastEvent *watch.Event
+ currIndex := 0
+ passedConditions := 0
+ for _, condition := range conditions {
+ // check the next condition against the previous event and short circuit waiting for the next watch
+ if lastEvent != nil {
+ done, err := condition(*lastEvent)
+ if err != nil {
+ return lastEvent, err
+ }
+ if done {
+ passedConditions = passedConditions + 1
+ continue
+ }
+ }
+
+ ConditionSucceeded:
+ for currIndex < len(initialItems) {
+ lastEvent = &watch.Event{Type: watch.Added, Object: initialItems[currIndex]}
+ currIndex++
+
+ done, err := condition(*lastEvent)
+ if err != nil {
+ return lastEvent, err
+ }
+ if done {
+ passedConditions = passedConditions + 1
+ break ConditionSucceeded
+ }
+ }
+ }
+ if passedConditions == len(conditions) {
+ return lastEvent, nil
+ }
+ remainingConditions := conditions[passedConditions:]
+
+ metaObj, err := meta.ListAccessor(list)
+ if err != nil {
+ return nil, err
+ }
+ currResourceVersion := metaObj.GetResourceVersion()
+
+ watchInterface, err := lw.Watch(metav1.ListOptions{ResourceVersion: currResourceVersion})
+ if err != nil {
+ return nil, err
+ }
+
+ return watch.Until(timeout, watchInterface, remainingConditions...)
+}
diff --git a/vendor/k8s.io/client-go/tools/cache/mutation_cache.go b/vendor/k8s.io/client-go/tools/cache/mutation_cache.go
new file mode 100644
index 000000000..0fa06bf77
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/cache/mutation_cache.go
@@ -0,0 +1,261 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package cache
+
+import (
+ "fmt"
+ "strconv"
+ "sync"
+ "time"
+
+ "github.com/golang/glog"
+
+ "k8s.io/apimachinery/pkg/api/meta"
+ "k8s.io/apimachinery/pkg/runtime"
+ utilcache "k8s.io/apimachinery/pkg/util/cache"
+ utilruntime "k8s.io/apimachinery/pkg/util/runtime"
+ "k8s.io/apimachinery/pkg/util/sets"
+)
+
+// MutationCache is able to take the result of update operations and stores them in an LRU
+// that can be used to provide a more current view of a requested object. It requires interpreting
+// resourceVersions for comparisons.
+// Implementations must be thread-safe.
+// TODO find a way to layer this into an informer/lister
+type MutationCache interface {
+ GetByKey(key string) (interface{}, bool, error)
+ ByIndex(indexName, indexKey string) ([]interface{}, error)
+ Mutation(interface{})
+}
+
+type ResourceVersionComparator interface {
+ CompareResourceVersion(lhs, rhs runtime.Object) int
+}
+
+// NewIntegerResourceVersionMutationCache returns a MutationCache that understands how to
+// deal with objects that have a resource version that:
+//
+// - is an integer
+// - increases when updated
+// - is comparable across the same resource in a namespace
+//
+// Most backends will have these semantics. Indexer may be nil. ttl controls how long an item
+// remains in the mutation cache before it is removed.
+//
+// If includeAdds is true, objects in the mutation cache will be returned even if they don't exist
+// in the underlying store. This is only safe if your use of the cache can handle mutation entries
+// remaining in the cache for up to ttl when mutations and deletes occur very closely in time.
+func NewIntegerResourceVersionMutationCache(backingCache Store, indexer Indexer, ttl time.Duration, includeAdds bool) MutationCache {
+ return &mutationCache{
+ backingCache: backingCache,
+ indexer: indexer,
+ mutationCache: utilcache.NewLRUExpireCache(100),
+ comparator: etcdObjectVersioner{},
+ ttl: ttl,
+ includeAdds: includeAdds,
+ }
+}
+
+// mutationCache doesn't guarantee that it returns values added via Mutation since they can page out and
+// since you can't distinguish between, "didn't observe create" and "was deleted after create",
+// if the key is missing from the backing cache, we always return it as missing
+type mutationCache struct {
+ lock sync.Mutex
+ backingCache Store
+ indexer Indexer
+ mutationCache *utilcache.LRUExpireCache
+ includeAdds bool
+ ttl time.Duration
+
+ comparator ResourceVersionComparator
+}
+
+// GetByKey is never guaranteed to return back the value set in Mutation. It could be paged out, it could
+// be older than another copy, the backingCache may be more recent or, you might have written twice into the same key.
+// You get a value that was valid at some snapshot of time and will always return the newer of backingCache and mutationCache.
+func (c *mutationCache) GetByKey(key string) (interface{}, bool, error) {
+ c.lock.Lock()
+ defer c.lock.Unlock()
+
+ obj, exists, err := c.backingCache.GetByKey(key)
+ if err != nil {
+ return nil, false, err
+ }
+ if !exists {
+ if !c.includeAdds {
+ // we can't distinguish between, "didn't observe create" and "was deleted after create", so
+ // if the key is missing, we always return it as missing
+ return nil, false, nil
+ }
+ obj, exists = c.mutationCache.Get(key)
+ if !exists {
+ return nil, false, nil
+ }
+ }
+ objRuntime, ok := obj.(runtime.Object)
+ if !ok {
+ return obj, true, nil
+ }
+ return c.newerObject(key, objRuntime), true, nil
+}
+
+// ByIndex returns the newer objects that match the provided index and indexer key.
+// Will return an error if no indexer was provided.
+func (c *mutationCache) ByIndex(name string, indexKey string) ([]interface{}, error) {
+ c.lock.Lock()
+ defer c.lock.Unlock()
+ if c.indexer == nil {
+ return nil, fmt.Errorf("no indexer has been provided to the mutation cache")
+ }
+ keys, err := c.indexer.IndexKeys(name, indexKey)
+ if err != nil {
+ return nil, err
+ }
+ var items []interface{}
+ keySet := sets.NewString()
+ for _, key := range keys {
+ keySet.Insert(key)
+ obj, exists, err := c.indexer.GetByKey(key)
+ if err != nil {
+ return nil, err
+ }
+ if !exists {
+ continue
+ }
+ if objRuntime, ok := obj.(runtime.Object); ok {
+ items = append(items, c.newerObject(key, objRuntime))
+ } else {
+ items = append(items, obj)
+ }
+ }
+
+ if c.includeAdds {
+ fn := c.indexer.GetIndexers()[name]
+ // Keys() is returned oldest to newest, so full traversal does not alter the LRU behavior
+ for _, key := range c.mutationCache.Keys() {
+ updated, ok := c.mutationCache.Get(key)
+ if !ok {
+ continue
+ }
+ if keySet.Has(key.(string)) {
+ continue
+ }
+ elements, err := fn(updated)
+ if err != nil {
+ glog.V(4).Info("Unable to calculate an index entry for mutation cache entry %s: %v", key, err)
+ continue
+ }
+ for _, inIndex := range elements {
+ if inIndex != indexKey {
+ continue
+ }
+ items = append(items, updated)
+ break
+ }
+ }
+ }
+
+ return items, nil
+}
+
+// newerObject checks the mutation cache for a newer object and returns one if found. If the
+// mutated object is older than the backing object, it is removed from the Must be
+// called while the lock is held.
+func (c *mutationCache) newerObject(key string, backing runtime.Object) runtime.Object {
+ mutatedObj, exists := c.mutationCache.Get(key)
+ if !exists {
+ return backing
+ }
+ mutatedObjRuntime, ok := mutatedObj.(runtime.Object)
+ if !ok {
+ return backing
+ }
+ if c.comparator.CompareResourceVersion(backing, mutatedObjRuntime) >= 0 {
+ c.mutationCache.Remove(key)
+ return backing
+ }
+ return mutatedObjRuntime
+}
+
+// Mutation adds a change to the cache that can be returned in GetByKey if it is newer than the backingCache
+// copy. If you call Mutation twice with the same object on different threads, one will win, but its not defined
+// which one. This doesn't affect correctness, since the GetByKey guaranteed of "later of these two caches" is
+// preserved, but you may not get the version of the object you want. The object you get is only guaranteed to
+// "one that was valid at some point in time", not "the one that I want".
+func (c *mutationCache) Mutation(obj interface{}) {
+ c.lock.Lock()
+ defer c.lock.Unlock()
+
+ key, err := DeletionHandlingMetaNamespaceKeyFunc(obj)
+ if err != nil {
+ // this is a "nice to have", so failures shouldn't do anything weird
+ utilruntime.HandleError(err)
+ return
+ }
+
+ if objRuntime, ok := obj.(runtime.Object); ok {
+ if mutatedObj, exists := c.mutationCache.Get(key); exists {
+ if mutatedObjRuntime, ok := mutatedObj.(runtime.Object); ok {
+ if c.comparator.CompareResourceVersion(objRuntime, mutatedObjRuntime) < 0 {
+ return
+ }
+ }
+ }
+ }
+ c.mutationCache.Add(key, obj, c.ttl)
+}
+
+// etcdObjectVersioner implements versioning and extracting etcd node information
+// for objects that have an embedded ObjectMeta or ListMeta field.
+type etcdObjectVersioner struct{}
+
+// ObjectResourceVersion implements Versioner
+func (a etcdObjectVersioner) ObjectResourceVersion(obj runtime.Object) (uint64, error) {
+ accessor, err := meta.Accessor(obj)
+ if err != nil {
+ return 0, err
+ }
+ version := accessor.GetResourceVersion()
+ if len(version) == 0 {
+ return 0, nil
+ }
+ return strconv.ParseUint(version, 10, 64)
+}
+
+// CompareResourceVersion compares etcd resource versions. Outside this API they are all strings,
+// but etcd resource versions are special, they're actually ints, so we can easily compare them.
+func (a etcdObjectVersioner) CompareResourceVersion(lhs, rhs runtime.Object) int {
+ lhsVersion, err := a.ObjectResourceVersion(lhs)
+ if err != nil {
+ // coder error
+ panic(err)
+ }
+ rhsVersion, err := a.ObjectResourceVersion(rhs)
+ if err != nil {
+ // coder error
+ panic(err)
+ }
+
+ if lhsVersion == rhsVersion {
+ return 0
+ }
+ if lhsVersion < rhsVersion {
+ return -1
+ }
+
+ return 1
+}
diff --git a/vendor/k8s.io/client-go/tools/cache/mutation_detector.go b/vendor/k8s.io/client-go/tools/cache/mutation_detector.go
new file mode 100644
index 000000000..cc6094ce4
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/cache/mutation_detector.go
@@ -0,0 +1,135 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package cache
+
+import (
+ "fmt"
+ "os"
+ "reflect"
+ "strconv"
+ "sync"
+ "time"
+
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/diff"
+ "k8s.io/client-go/kubernetes/scheme"
+)
+
+var mutationDetectionEnabled = false
+
+func init() {
+ mutationDetectionEnabled, _ = strconv.ParseBool(os.Getenv("KUBE_CACHE_MUTATION_DETECTOR"))
+}
+
+type CacheMutationDetector interface {
+ AddObject(obj interface{})
+ Run(stopCh <-chan struct{})
+}
+
+func NewCacheMutationDetector(name string) CacheMutationDetector {
+ if !mutationDetectionEnabled {
+ return dummyMutationDetector{}
+ }
+ return &defaultCacheMutationDetector{name: name, period: 1 * time.Second}
+}
+
+type dummyMutationDetector struct{}
+
+func (dummyMutationDetector) Run(stopCh <-chan struct{}) {
+}
+func (dummyMutationDetector) AddObject(obj interface{}) {
+}
+
+// defaultCacheMutationDetector gives a way to detect if a cached object has been mutated
+// It has a list of cached objects and their copies. I haven't thought of a way
+// to see WHO is mutating it, just that it's getting mutated.
+type defaultCacheMutationDetector struct {
+ name string
+ period time.Duration
+
+ lock sync.Mutex
+ cachedObjs []cacheObj
+
+ // failureFunc is injectable for unit testing. If you don't have it, the process will panic.
+ // This panic is intentional, since turning on this detection indicates you want a strong
+ // failure signal. This failure is effectively a p0 bug and you can't trust process results
+ // after a mutation anyway.
+ failureFunc func(message string)
+}
+
+// cacheObj holds the actual object and a copy
+type cacheObj struct {
+ cached interface{}
+ copied interface{}
+}
+
+func (d *defaultCacheMutationDetector) Run(stopCh <-chan struct{}) {
+ // we DON'T want protection from panics. If we're running this code, we want to die
+ go func() {
+ for {
+ d.CompareObjects()
+
+ select {
+ case <-stopCh:
+ return
+ case <-time.After(d.period):
+ }
+ }
+ }()
+}
+
+// AddObject makes a deep copy of the object for later comparison. It only works on runtime.Object
+// but that covers the vast majority of our cached objects
+func (d *defaultCacheMutationDetector) AddObject(obj interface{}) {
+ if _, ok := obj.(DeletedFinalStateUnknown); ok {
+ return
+ }
+ if _, ok := obj.(runtime.Object); !ok {
+ return
+ }
+
+ copiedObj, err := scheme.Scheme.Copy(obj.(runtime.Object))
+ if err != nil {
+ return
+ }
+
+ d.lock.Lock()
+ defer d.lock.Unlock()
+ d.cachedObjs = append(d.cachedObjs, cacheObj{cached: obj, copied: copiedObj})
+}
+
+func (d *defaultCacheMutationDetector) CompareObjects() {
+ d.lock.Lock()
+ defer d.lock.Unlock()
+
+ altered := false
+ for i, obj := range d.cachedObjs {
+ if !reflect.DeepEqual(obj.cached, obj.copied) {
+ fmt.Printf("CACHE %s[%d] ALTERED!\n%v\n", d.name, i, diff.ObjectDiff(obj.cached, obj.copied))
+ altered = true
+ }
+ }
+
+ if altered {
+ msg := fmt.Sprintf("cache %s modified", d.name)
+ if d.failureFunc != nil {
+ d.failureFunc(msg)
+ return
+ }
+ panic(msg)
+ }
+}
diff --git a/vendor/k8s.io/client-go/tools/cache/reflector.go b/vendor/k8s.io/client-go/tools/cache/reflector.go
new file mode 100644
index 000000000..9a730610c
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/cache/reflector.go
@@ -0,0 +1,421 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package cache
+
+import (
+ "errors"
+ "fmt"
+ "io"
+ "math/rand"
+ "net"
+ "net/url"
+ "reflect"
+ "regexp"
+ goruntime "runtime"
+ "runtime/debug"
+ "strconv"
+ "strings"
+ "sync"
+ "syscall"
+ "time"
+
+ "github.com/golang/glog"
+ apierrs "k8s.io/apimachinery/pkg/api/errors"
+ "k8s.io/apimachinery/pkg/api/meta"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/clock"
+ utilruntime "k8s.io/apimachinery/pkg/util/runtime"
+ "k8s.io/apimachinery/pkg/util/wait"
+ "k8s.io/apimachinery/pkg/watch"
+)
+
+// Reflector watches a specified resource and causes all changes to be reflected in the given store.
+type Reflector struct {
+ // name identifies this reflector. By default it will be a file:line if possible.
+ name string
+
+ // The type of object we expect to place in the store.
+ expectedType reflect.Type
+ // The destination to sync up with the watch source
+ store Store
+ // listerWatcher is used to perform lists and watches.
+ listerWatcher ListerWatcher
+ // period controls timing between one watch ending and
+ // the beginning of the next one.
+ period time.Duration
+ resyncPeriod time.Duration
+ ShouldResync func() bool
+ // clock allows tests to manipulate time
+ clock clock.Clock
+ // lastSyncResourceVersion is the resource version token last
+ // observed when doing a sync with the underlying store
+ // it is thread safe, but not synchronized with the underlying store
+ lastSyncResourceVersion string
+ // lastSyncResourceVersionMutex guards read/write access to lastSyncResourceVersion
+ lastSyncResourceVersionMutex sync.RWMutex
+}
+
+var (
+ // We try to spread the load on apiserver by setting timeouts for
+ // watch requests - it is random in [minWatchTimeout, 2*minWatchTimeout].
+ // However, it can be modified to avoid periodic resync to break the
+ // TCP connection.
+ minWatchTimeout = 5 * time.Minute
+)
+
+// NewNamespaceKeyedIndexerAndReflector creates an Indexer and a Reflector
+// The indexer is configured to key on namespace
+func NewNamespaceKeyedIndexerAndReflector(lw ListerWatcher, expectedType interface{}, resyncPeriod time.Duration) (indexer Indexer, reflector *Reflector) {
+ indexer = NewIndexer(MetaNamespaceKeyFunc, Indexers{"namespace": MetaNamespaceIndexFunc})
+ reflector = NewReflector(lw, expectedType, indexer, resyncPeriod)
+ return indexer, reflector
+}
+
+// NewReflector creates a new Reflector object which will keep the given store up to
+// date with the server's contents for the given resource. Reflector promises to
+// only put things in the store that have the type of expectedType, unless expectedType
+// is nil. If resyncPeriod is non-zero, then lists will be executed after every
+// resyncPeriod, so that you can use reflectors to periodically process everything as
+// well as incrementally processing the things that change.
+func NewReflector(lw ListerWatcher, expectedType interface{}, store Store, resyncPeriod time.Duration) *Reflector {
+ return NewNamedReflector(getDefaultReflectorName(internalPackages...), lw, expectedType, store, resyncPeriod)
+}
+
+// NewNamedReflector same as NewReflector, but with a specified name for logging
+func NewNamedReflector(name string, lw ListerWatcher, expectedType interface{}, store Store, resyncPeriod time.Duration) *Reflector {
+ r := &Reflector{
+ name: name,
+ listerWatcher: lw,
+ store: store,
+ expectedType: reflect.TypeOf(expectedType),
+ period: time.Second,
+ resyncPeriod: resyncPeriod,
+ clock: &clock.RealClock{},
+ }
+ return r
+}
+
+// internalPackages are packages that ignored when creating a default reflector name. These packages are in the common
+// call chains to NewReflector, so they'd be low entropy names for reflectors
+var internalPackages = []string{"client-go/tools/cache/", "/runtime/asm_"}
+
+// getDefaultReflectorName walks back through the call stack until we find a caller from outside of the ignoredPackages
+// it returns back a shortpath/filename:line to aid in identification of this reflector when it starts logging
+func getDefaultReflectorName(ignoredPackages ...string) string {
+ name := "????"
+ const maxStack = 10
+ for i := 1; i < maxStack; i++ {
+ _, file, line, ok := goruntime.Caller(i)
+ if !ok {
+ file, line, ok = extractStackCreator()
+ if !ok {
+ break
+ }
+ i += maxStack
+ }
+ if hasPackage(file, ignoredPackages) {
+ continue
+ }
+
+ file = trimPackagePrefix(file)
+ name = fmt.Sprintf("%s:%d", file, line)
+ break
+ }
+ return name
+}
+
+// hasPackage returns true if the file is in one of the ignored packages.
+func hasPackage(file string, ignoredPackages []string) bool {
+ for _, ignoredPackage := range ignoredPackages {
+ if strings.Contains(file, ignoredPackage) {
+ return true
+ }
+ }
+ return false
+}
+
+// trimPackagePrefix reduces duplicate values off the front of a package name.
+func trimPackagePrefix(file string) string {
+ if l := strings.LastIndex(file, "k8s.io/client-go/pkg/"); l >= 0 {
+ return file[l+len("k8s.io/client-go/"):]
+ }
+ if l := strings.LastIndex(file, "/src/"); l >= 0 {
+ return file[l+5:]
+ }
+ if l := strings.LastIndex(file, "/pkg/"); l >= 0 {
+ return file[l+1:]
+ }
+ return file
+}
+
+var stackCreator = regexp.MustCompile(`(?m)^created by (.*)\n\s+(.*):(\d+) \+0x[[:xdigit:]]+$`)
+
+// extractStackCreator retrieves the goroutine file and line that launched this stack. Returns false
+// if the creator cannot be located.
+// TODO: Go does not expose this via runtime https://github.com/golang/go/issues/11440
+func extractStackCreator() (string, int, bool) {
+ stack := debug.Stack()
+ matches := stackCreator.FindStringSubmatch(string(stack))
+ if matches == nil || len(matches) != 4 {
+ return "", 0, false
+ }
+ line, err := strconv.Atoi(matches[3])
+ if err != nil {
+ return "", 0, false
+ }
+ return matches[2], line, true
+}
+
+// Run starts a watch and handles watch events. Will restart the watch if it is closed.
+// Run starts a goroutine and returns immediately.
+func (r *Reflector) Run() {
+ glog.V(3).Infof("Starting reflector %v (%s) from %s", r.expectedType, r.resyncPeriod, r.name)
+ go wait.Until(func() {
+ if err := r.ListAndWatch(wait.NeverStop); err != nil {
+ utilruntime.HandleError(err)
+ }
+ }, r.period, wait.NeverStop)
+}
+
+// RunUntil starts a watch and handles watch events. Will restart the watch if it is closed.
+// RunUntil starts a goroutine and returns immediately. It will exit when stopCh is closed.
+func (r *Reflector) RunUntil(stopCh <-chan struct{}) {
+ glog.V(3).Infof("Starting reflector %v (%s) from %s", r.expectedType, r.resyncPeriod, r.name)
+ go wait.Until(func() {
+ if err := r.ListAndWatch(stopCh); err != nil {
+ utilruntime.HandleError(err)
+ }
+ }, r.period, stopCh)
+}
+
+var (
+ // nothing will ever be sent down this channel
+ neverExitWatch <-chan time.Time = make(chan time.Time)
+
+ // Used to indicate that watching stopped so that a resync could happen.
+ errorResyncRequested = errors.New("resync channel fired")
+
+ // Used to indicate that watching stopped because of a signal from the stop
+ // channel passed in from a client of the reflector.
+ errorStopRequested = errors.New("Stop requested")
+)
+
+// resyncChan returns a channel which will receive something when a resync is
+// required, and a cleanup function.
+func (r *Reflector) resyncChan() (<-chan time.Time, func() bool) {
+ if r.resyncPeriod == 0 {
+ return neverExitWatch, func() bool { return false }
+ }
+ // The cleanup function is required: imagine the scenario where watches
+ // always fail so we end up listing frequently. Then, if we don't
+ // manually stop the timer, we could end up with many timers active
+ // concurrently.
+ t := r.clock.NewTimer(r.resyncPeriod)
+ return t.C(), t.Stop
+}
+
+// ListAndWatch first lists all items and get the resource version at the moment of call,
+// and then use the resource version to watch.
+// It returns error if ListAndWatch didn't even try to initialize watch.
+func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error {
+ glog.V(3).Infof("Listing and watching %v from %s", r.expectedType, r.name)
+ var resourceVersion string
+ resyncCh, cleanup := r.resyncChan()
+ defer cleanup()
+
+ // Explicitly set "0" as resource version - it's fine for the List()
+ // to be served from cache and potentially be delayed relative to
+ // etcd contents. Reflector framework will catch up via Watch() eventually.
+ options := metav1.ListOptions{ResourceVersion: "0"}
+ list, err := r.listerWatcher.List(options)
+ if err != nil {
+ return fmt.Errorf("%s: Failed to list %v: %v", r.name, r.expectedType, err)
+ }
+ listMetaInterface, err := meta.ListAccessor(list)
+ if err != nil {
+ return fmt.Errorf("%s: Unable to understand list result %#v: %v", r.name, list, err)
+ }
+ resourceVersion = listMetaInterface.GetResourceVersion()
+ items, err := meta.ExtractList(list)
+ if err != nil {
+ return fmt.Errorf("%s: Unable to understand list result %#v (%v)", r.name, list, err)
+ }
+ if err := r.syncWith(items, resourceVersion); err != nil {
+ return fmt.Errorf("%s: Unable to sync list result: %v", r.name, err)
+ }
+ r.setLastSyncResourceVersion(resourceVersion)
+
+ resyncerrc := make(chan error, 1)
+ cancelCh := make(chan struct{})
+ defer close(cancelCh)
+ go func() {
+ for {
+ select {
+ case <-resyncCh:
+ case <-stopCh:
+ return
+ case <-cancelCh:
+ return
+ }
+ if r.ShouldResync == nil || r.ShouldResync() {
+ glog.V(4).Infof("%s: forcing resync", r.name)
+ if err := r.store.Resync(); err != nil {
+ resyncerrc <- err
+ return
+ }
+ }
+ cleanup()
+ resyncCh, cleanup = r.resyncChan()
+ }
+ }()
+
+ for {
+ timemoutseconds := int64(minWatchTimeout.Seconds() * (rand.Float64() + 1.0))
+ options = metav1.ListOptions{
+ ResourceVersion: resourceVersion,
+ // We want to avoid situations of hanging watchers. Stop any wachers that do not
+ // receive any events within the timeout window.
+ TimeoutSeconds: &timemoutseconds,
+ }
+
+ w, err := r.listerWatcher.Watch(options)
+ if err != nil {
+ switch err {
+ case io.EOF:
+ // watch closed normally
+ case io.ErrUnexpectedEOF:
+ glog.V(1).Infof("%s: Watch for %v closed with unexpected EOF: %v", r.name, r.expectedType, err)
+ default:
+ utilruntime.HandleError(fmt.Errorf("%s: Failed to watch %v: %v", r.name, r.expectedType, err))
+ }
+ // If this is "connection refused" error, it means that most likely apiserver is not responsive.
+ // It doesn't make sense to re-list all objects because most likely we will be able to restart
+ // watch where we ended.
+ // If that's the case wait and resend watch request.
+ if urlError, ok := err.(*url.Error); ok {
+ if opError, ok := urlError.Err.(*net.OpError); ok {
+ if errno, ok := opError.Err.(syscall.Errno); ok && errno == syscall.ECONNREFUSED {
+ time.Sleep(time.Second)
+ continue
+ }
+ }
+ }
+ return nil
+ }
+
+ if err := r.watchHandler(w, &resourceVersion, resyncerrc, stopCh); err != nil {
+ if err != errorStopRequested {
+ glog.Warningf("%s: watch of %v ended with: %v", r.name, r.expectedType, err)
+ }
+ return nil
+ }
+ }
+}
+
+// syncWith replaces the store's items with the given list.
+func (r *Reflector) syncWith(items []runtime.Object, resourceVersion string) error {
+ found := make([]interface{}, 0, len(items))
+ for _, item := range items {
+ found = append(found, item)
+ }
+ return r.store.Replace(found, resourceVersion)
+}
+
+// watchHandler watches w and keeps *resourceVersion up to date.
+func (r *Reflector) watchHandler(w watch.Interface, resourceVersion *string, errc chan error, stopCh <-chan struct{}) error {
+ start := r.clock.Now()
+ eventCount := 0
+
+ // Stopping the watcher should be idempotent and if we return from this function there's no way
+ // we're coming back in with the same watch interface.
+ defer w.Stop()
+
+loop:
+ for {
+ select {
+ case <-stopCh:
+ return errorStopRequested
+ case err := <-errc:
+ return err
+ case event, ok := <-w.ResultChan():
+ if !ok {
+ break loop
+ }
+ if event.Type == watch.Error {
+ return apierrs.FromObject(event.Object)
+ }
+ if e, a := r.expectedType, reflect.TypeOf(event.Object); e != nil && e != a {
+ utilruntime.HandleError(fmt.Errorf("%s: expected type %v, but watch event object had type %v", r.name, e, a))
+ continue
+ }
+ meta, err := meta.Accessor(event.Object)
+ if err != nil {
+ utilruntime.HandleError(fmt.Errorf("%s: unable to understand watch event %#v", r.name, event))
+ continue
+ }
+ newResourceVersion := meta.GetResourceVersion()
+ switch event.Type {
+ case watch.Added:
+ err := r.store.Add(event.Object)
+ if err != nil {
+ utilruntime.HandleError(fmt.Errorf("%s: unable to add watch event object (%#v) to store: %v", r.name, event.Object, err))
+ }
+ case watch.Modified:
+ err := r.store.Update(event.Object)
+ if err != nil {
+ utilruntime.HandleError(fmt.Errorf("%s: unable to update watch event object (%#v) to store: %v", r.name, event.Object, err))
+ }
+ case watch.Deleted:
+ // TODO: Will any consumers need access to the "last known
+ // state", which is passed in event.Object? If so, may need
+ // to change this.
+ err := r.store.Delete(event.Object)
+ if err != nil {
+ utilruntime.HandleError(fmt.Errorf("%s: unable to delete watch event object (%#v) from store: %v", r.name, event.Object, err))
+ }
+ default:
+ utilruntime.HandleError(fmt.Errorf("%s: unable to understand watch event %#v", r.name, event))
+ }
+ *resourceVersion = newResourceVersion
+ r.setLastSyncResourceVersion(newResourceVersion)
+ eventCount++
+ }
+ }
+
+ watchDuration := r.clock.Now().Sub(start)
+ if watchDuration < 1*time.Second && eventCount == 0 {
+ glog.V(4).Infof("%s: Unexpected watch close - watch lasted less than a second and no items received", r.name)
+ return errors.New("very short watch")
+ }
+ glog.V(4).Infof("%s: Watch close - %v total %v items received", r.name, r.expectedType, eventCount)
+ return nil
+}
+
+// LastSyncResourceVersion is the resource version observed when last sync with the underlying store
+// The value returned is not synchronized with access to the underlying store and is not thread-safe
+func (r *Reflector) LastSyncResourceVersion() string {
+ r.lastSyncResourceVersionMutex.RLock()
+ defer r.lastSyncResourceVersionMutex.RUnlock()
+ return r.lastSyncResourceVersion
+}
+
+func (r *Reflector) setLastSyncResourceVersion(v string) {
+ r.lastSyncResourceVersionMutex.Lock()
+ defer r.lastSyncResourceVersionMutex.Unlock()
+ r.lastSyncResourceVersion = v
+}
diff --git a/vendor/k8s.io/client-go/tools/cache/shared_informer.go b/vendor/k8s.io/client-go/tools/cache/shared_informer.go
new file mode 100644
index 000000000..a0dbbb697
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/cache/shared_informer.go
@@ -0,0 +1,581 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package cache
+
+import (
+ "fmt"
+ "sync"
+ "time"
+
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/clock"
+ utilruntime "k8s.io/apimachinery/pkg/util/runtime"
+ "k8s.io/apimachinery/pkg/util/wait"
+
+ "github.com/golang/glog"
+)
+
+// SharedInformer has a shared data cache and is capable of distributing notifications for changes
+// to the cache to multiple listeners who registered via AddEventHandler. If you use this, there is
+// one behavior change compared to a standard Informer. When you receive a notification, the cache
+// will be AT LEAST as fresh as the notification, but it MAY be more fresh. You should NOT depend
+// on the contents of the cache exactly matching the notification you've received in handler
+// functions. If there was a create, followed by a delete, the cache may NOT have your item. This
+// has advantages over the broadcaster since it allows us to share a common cache across many
+// controllers. Extending the broadcaster would have required us keep duplicate caches for each
+// watch.
+type SharedInformer interface {
+ // AddEventHandler adds an event handler to the shared informer using the shared informer's resync
+ // period. Events to a single handler are delivered sequentially, but there is no coordination
+ // between different handlers.
+ AddEventHandler(handler ResourceEventHandler)
+ // AddEventHandlerWithResyncPeriod adds an event handler to the shared informer using the
+ // specified resync period. Events to a single handler are delivered sequentially, but there is
+ // no coordination between different handlers.
+ AddEventHandlerWithResyncPeriod(handler ResourceEventHandler, resyncPeriod time.Duration)
+ // GetStore returns the Store.
+ GetStore() Store
+ // GetController gives back a synthetic interface that "votes" to start the informer
+ GetController() Controller
+ // Run starts the shared informer, which will be stopped when stopCh is closed.
+ Run(stopCh <-chan struct{})
+ // HasSynced returns true if the shared informer's store has synced.
+ HasSynced() bool
+ // LastSyncResourceVersion is the resource version observed when last synced with the underlying
+ // store. The value returned is not synchronized with access to the underlying store and is not
+ // thread-safe.
+ LastSyncResourceVersion() string
+}
+
+type SharedIndexInformer interface {
+ SharedInformer
+ // AddIndexers add indexers to the informer before it starts.
+ AddIndexers(indexers Indexers) error
+ GetIndexer() Indexer
+}
+
+// NewSharedInformer creates a new instance for the listwatcher.
+func NewSharedInformer(lw ListerWatcher, objType runtime.Object, resyncPeriod time.Duration) SharedInformer {
+ return NewSharedIndexInformer(lw, objType, resyncPeriod, Indexers{})
+}
+
+// NewSharedIndexInformer creates a new instance for the listwatcher.
+func NewSharedIndexInformer(lw ListerWatcher, objType runtime.Object, defaultEventHandlerResyncPeriod time.Duration, indexers Indexers) SharedIndexInformer {
+ realClock := &clock.RealClock{}
+ sharedIndexInformer := &sharedIndexInformer{
+ processor: &sharedProcessor{clock: realClock},
+ indexer: NewIndexer(DeletionHandlingMetaNamespaceKeyFunc, indexers),
+ listerWatcher: lw,
+ objectType: objType,
+ resyncCheckPeriod: defaultEventHandlerResyncPeriod,
+ defaultEventHandlerResyncPeriod: defaultEventHandlerResyncPeriod,
+ cacheMutationDetector: NewCacheMutationDetector(fmt.Sprintf("%T", objType)),
+ clock: realClock,
+ }
+ return sharedIndexInformer
+}
+
+// InformerSynced is a function that can be used to determine if an informer has synced. This is useful for determining if caches have synced.
+type InformerSynced func() bool
+
+// syncedPollPeriod controls how often you look at the status of your sync funcs
+const syncedPollPeriod = 100 * time.Millisecond
+
+// WaitForCacheSync waits for caches to populate. It returns true if it was successful, false
+// if the controller should shutdown
+func WaitForCacheSync(stopCh <-chan struct{}, cacheSyncs ...InformerSynced) bool {
+ err := wait.PollUntil(syncedPollPeriod,
+ func() (bool, error) {
+ for _, syncFunc := range cacheSyncs {
+ if !syncFunc() {
+ return false, nil
+ }
+ }
+ return true, nil
+ },
+ stopCh)
+ if err != nil {
+ glog.V(2).Infof("stop requested")
+ return false
+ }
+
+ glog.V(4).Infof("caches populated")
+ return true
+}
+
+type sharedIndexInformer struct {
+ indexer Indexer
+ controller Controller
+
+ processor *sharedProcessor
+ cacheMutationDetector CacheMutationDetector
+
+ // This block is tracked to handle late initialization of the controller
+ listerWatcher ListerWatcher
+ objectType runtime.Object
+
+ // resyncCheckPeriod is how often we want the reflector's resync timer to fire so it can call
+ // shouldResync to check if any of our listeners need a resync.
+ resyncCheckPeriod time.Duration
+ // defaultEventHandlerResyncPeriod is the default resync period for any handlers added via
+ // AddEventHandler (i.e. they don't specify one and just want to use the shared informer's default
+ // value).
+ defaultEventHandlerResyncPeriod time.Duration
+ // clock allows for testability
+ clock clock.Clock
+
+ started bool
+ startedLock sync.Mutex
+
+ // blockDeltas gives a way to stop all event distribution so that a late event handler
+ // can safely join the shared informer.
+ blockDeltas sync.Mutex
+ // stopCh is the channel used to stop the main Run process. We have to track it so that
+ // late joiners can have a proper stop
+ stopCh <-chan struct{}
+}
+
+// dummyController hides the fact that a SharedInformer is different from a dedicated one
+// where a caller can `Run`. The run method is disconnected in this case, because higher
+// level logic will decide when to start the SharedInformer and related controller.
+// Because returning information back is always asynchronous, the legacy callers shouldn't
+// notice any change in behavior.
+type dummyController struct {
+ informer *sharedIndexInformer
+}
+
+func (v *dummyController) Run(stopCh <-chan struct{}) {
+}
+
+func (v *dummyController) HasSynced() bool {
+ return v.informer.HasSynced()
+}
+
+func (c *dummyController) LastSyncResourceVersion() string {
+ return ""
+}
+
+type updateNotification struct {
+ oldObj interface{}
+ newObj interface{}
+}
+
+type addNotification struct {
+ newObj interface{}
+}
+
+type deleteNotification struct {
+ oldObj interface{}
+}
+
+func (s *sharedIndexInformer) Run(stopCh <-chan struct{}) {
+ defer utilruntime.HandleCrash()
+
+ fifo := NewDeltaFIFO(MetaNamespaceKeyFunc, nil, s.indexer)
+
+ cfg := &Config{
+ Queue: fifo,
+ ListerWatcher: s.listerWatcher,
+ ObjectType: s.objectType,
+ FullResyncPeriod: s.resyncCheckPeriod,
+ RetryOnError: false,
+ ShouldResync: s.processor.shouldResync,
+
+ Process: s.HandleDeltas,
+ }
+
+ func() {
+ s.startedLock.Lock()
+ defer s.startedLock.Unlock()
+
+ s.controller = New(cfg)
+ s.controller.(*controller).clock = s.clock
+ s.started = true
+ }()
+
+ s.stopCh = stopCh
+ s.cacheMutationDetector.Run(stopCh)
+ s.processor.run(stopCh)
+ s.controller.Run(stopCh)
+}
+
+func (s *sharedIndexInformer) isStarted() bool {
+ s.startedLock.Lock()
+ defer s.startedLock.Unlock()
+ return s.started
+}
+
+func (s *sharedIndexInformer) HasSynced() bool {
+ s.startedLock.Lock()
+ defer s.startedLock.Unlock()
+
+ if s.controller == nil {
+ return false
+ }
+ return s.controller.HasSynced()
+}
+
+func (s *sharedIndexInformer) LastSyncResourceVersion() string {
+ s.startedLock.Lock()
+ defer s.startedLock.Unlock()
+
+ if s.controller == nil {
+ return ""
+ }
+ return s.controller.LastSyncResourceVersion()
+}
+
+func (s *sharedIndexInformer) GetStore() Store {
+ return s.indexer
+}
+
+func (s *sharedIndexInformer) GetIndexer() Indexer {
+ return s.indexer
+}
+
+func (s *sharedIndexInformer) AddIndexers(indexers Indexers) error {
+ s.startedLock.Lock()
+ defer s.startedLock.Unlock()
+
+ if s.started {
+ return fmt.Errorf("informer has already started")
+ }
+
+ return s.indexer.AddIndexers(indexers)
+}
+
+func (s *sharedIndexInformer) GetController() Controller {
+ return &dummyController{informer: s}
+}
+
+func (s *sharedIndexInformer) AddEventHandler(handler ResourceEventHandler) {
+ s.AddEventHandlerWithResyncPeriod(handler, s.defaultEventHandlerResyncPeriod)
+}
+
+func determineResyncPeriod(desired, check time.Duration) time.Duration {
+ if desired == 0 {
+ return desired
+ }
+ if check == 0 {
+ glog.Warningf("The specified resyncPeriod %v is invalid because this shared informer doesn't support resyncing", desired)
+ return 0
+ }
+ if desired < check {
+ glog.Warningf("The specified resyncPeriod %v is being increased to the minimum resyncCheckPeriod %v", desired, check)
+ return check
+ }
+ return desired
+}
+
+const minimumResyncPeriod = 1 * time.Second
+
+func (s *sharedIndexInformer) AddEventHandlerWithResyncPeriod(handler ResourceEventHandler, resyncPeriod time.Duration) {
+ s.startedLock.Lock()
+ defer s.startedLock.Unlock()
+
+ if resyncPeriod > 0 {
+ if resyncPeriod < minimumResyncPeriod {
+ glog.Warningf("resyncPeriod %d is too small. Changing it to the minimum allowed value of %d", resyncPeriod, minimumResyncPeriod)
+ resyncPeriod = minimumResyncPeriod
+ }
+
+ if resyncPeriod < s.resyncCheckPeriod {
+ if s.started {
+ glog.Warningf("resyncPeriod %d is smaller than resyncCheckPeriod %d and the informer has already started. Changing it to %d", resyncPeriod, s.resyncCheckPeriod, s.resyncCheckPeriod)
+ resyncPeriod = s.resyncCheckPeriod
+ } else {
+ // if the event handler's resyncPeriod is smaller than the current resyncCheckPeriod, update
+ // resyncCheckPeriod to match resyncPeriod and adjust the resync periods of all the listeners
+ // accordingly
+ s.resyncCheckPeriod = resyncPeriod
+ s.processor.resyncCheckPeriodChanged(resyncPeriod)
+ }
+ }
+ }
+
+ listener := newProcessListener(handler, resyncPeriod, determineResyncPeriod(resyncPeriod, s.resyncCheckPeriod), s.clock.Now())
+
+ if !s.started {
+ s.processor.addListener(listener)
+ return
+ }
+
+ // in order to safely join, we have to
+ // 1. stop sending add/update/delete notifications
+ // 2. do a list against the store
+ // 3. send synthetic "Add" events to the new handler
+ // 4. unblock
+ s.blockDeltas.Lock()
+ defer s.blockDeltas.Unlock()
+
+ s.processor.addListener(listener)
+
+ go listener.run(s.stopCh)
+ go listener.pop(s.stopCh)
+
+ items := s.indexer.List()
+ for i := range items {
+ listener.add(addNotification{newObj: items[i]})
+ }
+}
+
+func (s *sharedIndexInformer) HandleDeltas(obj interface{}) error {
+ s.blockDeltas.Lock()
+ defer s.blockDeltas.Unlock()
+
+ // from oldest to newest
+ for _, d := range obj.(Deltas) {
+ switch d.Type {
+ case Sync, Added, Updated:
+ isSync := d.Type == Sync
+ s.cacheMutationDetector.AddObject(d.Object)
+ if old, exists, err := s.indexer.Get(d.Object); err == nil && exists {
+ if err := s.indexer.Update(d.Object); err != nil {
+ return err
+ }
+ s.processor.distribute(updateNotification{oldObj: old, newObj: d.Object}, isSync)
+ } else {
+ if err := s.indexer.Add(d.Object); err != nil {
+ return err
+ }
+ s.processor.distribute(addNotification{newObj: d.Object}, isSync)
+ }
+ case Deleted:
+ if err := s.indexer.Delete(d.Object); err != nil {
+ return err
+ }
+ s.processor.distribute(deleteNotification{oldObj: d.Object}, false)
+ }
+ }
+ return nil
+}
+
+type sharedProcessor struct {
+ listenersLock sync.RWMutex
+ listeners []*processorListener
+ syncingListeners []*processorListener
+ clock clock.Clock
+}
+
+func (p *sharedProcessor) addListener(listener *processorListener) {
+ p.listenersLock.Lock()
+ defer p.listenersLock.Unlock()
+
+ p.listeners = append(p.listeners, listener)
+ p.syncingListeners = append(p.syncingListeners, listener)
+}
+
+func (p *sharedProcessor) distribute(obj interface{}, sync bool) {
+ p.listenersLock.RLock()
+ defer p.listenersLock.RUnlock()
+
+ if sync {
+ for _, listener := range p.syncingListeners {
+ listener.add(obj)
+ }
+ } else {
+ for _, listener := range p.listeners {
+ listener.add(obj)
+ }
+ }
+}
+
+func (p *sharedProcessor) run(stopCh <-chan struct{}) {
+ p.listenersLock.RLock()
+ defer p.listenersLock.RUnlock()
+
+ for _, listener := range p.listeners {
+ go listener.run(stopCh)
+ go listener.pop(stopCh)
+ }
+}
+
+// shouldResync queries every listener to determine if any of them need a resync, based on each
+// listener's resyncPeriod.
+func (p *sharedProcessor) shouldResync() bool {
+ p.listenersLock.Lock()
+ defer p.listenersLock.Unlock()
+
+ p.syncingListeners = []*processorListener{}
+
+ resyncNeeded := false
+ now := p.clock.Now()
+ for _, listener := range p.listeners {
+ // need to loop through all the listeners to see if they need to resync so we can prepare any
+ // listeners that are going to be resyncing.
+ if listener.shouldResync(now) {
+ resyncNeeded = true
+ p.syncingListeners = append(p.syncingListeners, listener)
+ listener.determineNextResync(now)
+ }
+ }
+ return resyncNeeded
+}
+
+func (p *sharedProcessor) resyncCheckPeriodChanged(resyncCheckPeriod time.Duration) {
+ p.listenersLock.RLock()
+ defer p.listenersLock.RUnlock()
+
+ for _, listener := range p.listeners {
+ resyncPeriod := determineResyncPeriod(listener.requestedResyncPeriod, resyncCheckPeriod)
+ listener.setResyncPeriod(resyncPeriod)
+ }
+}
+
+type processorListener struct {
+ // lock/cond protects access to 'pendingNotifications'.
+ lock sync.RWMutex
+ cond sync.Cond
+
+ // pendingNotifications is an unbounded slice that holds all notifications not yet distributed
+ // there is one per listener, but a failing/stalled listener will have infinite pendingNotifications
+ // added until we OOM.
+ // TODO This is no worse that before, since reflectors were backed by unbounded DeltaFIFOs, but
+ // we should try to do something better
+ pendingNotifications []interface{}
+
+ nextCh chan interface{}
+
+ handler ResourceEventHandler
+
+ // requestedResyncPeriod is how frequently the listener wants a full resync from the shared informer
+ requestedResyncPeriod time.Duration
+ // resyncPeriod is how frequently the listener wants a full resync from the shared informer. This
+ // value may differ from requestedResyncPeriod if the shared informer adjusts it to align with the
+ // informer's overall resync check period.
+ resyncPeriod time.Duration
+ // nextResync is the earliest time the listener should get a full resync
+ nextResync time.Time
+ // resyncLock guards access to resyncPeriod and nextResync
+ resyncLock sync.Mutex
+}
+
+func newProcessListener(handler ResourceEventHandler, requestedResyncPeriod, resyncPeriod time.Duration, now time.Time) *processorListener {
+ ret := &processorListener{
+ pendingNotifications: []interface{}{},
+ nextCh: make(chan interface{}),
+ handler: handler,
+ requestedResyncPeriod: requestedResyncPeriod,
+ resyncPeriod: resyncPeriod,
+ }
+
+ ret.cond.L = &ret.lock
+
+ ret.determineNextResync(now)
+
+ return ret
+}
+
+func (p *processorListener) add(notification interface{}) {
+ p.lock.Lock()
+ defer p.lock.Unlock()
+
+ p.pendingNotifications = append(p.pendingNotifications, notification)
+ p.cond.Broadcast()
+}
+
+func (p *processorListener) pop(stopCh <-chan struct{}) {
+ defer utilruntime.HandleCrash()
+
+ for {
+ blockingGet := func() (interface{}, bool) {
+ p.lock.Lock()
+ defer p.lock.Unlock()
+
+ for len(p.pendingNotifications) == 0 {
+ // check if we're shutdown
+ select {
+ case <-stopCh:
+ return nil, true
+ default:
+ }
+ p.cond.Wait()
+ }
+
+ nt := p.pendingNotifications[0]
+ p.pendingNotifications = p.pendingNotifications[1:]
+ return nt, false
+ }
+
+ notification, stopped := blockingGet()
+ if stopped {
+ return
+ }
+
+ select {
+ case <-stopCh:
+ return
+ case p.nextCh <- notification:
+ }
+ }
+}
+
+func (p *processorListener) run(stopCh <-chan struct{}) {
+ defer utilruntime.HandleCrash()
+
+ for {
+ var next interface{}
+ select {
+ case <-stopCh:
+ func() {
+ p.lock.Lock()
+ defer p.lock.Unlock()
+ p.cond.Broadcast()
+ }()
+ return
+ case next = <-p.nextCh:
+ }
+
+ switch notification := next.(type) {
+ case updateNotification:
+ p.handler.OnUpdate(notification.oldObj, notification.newObj)
+ case addNotification:
+ p.handler.OnAdd(notification.newObj)
+ case deleteNotification:
+ p.handler.OnDelete(notification.oldObj)
+ default:
+ utilruntime.HandleError(fmt.Errorf("unrecognized notification: %#v", next))
+ }
+ }
+}
+
+// shouldResync deterimines if the listener needs a resync. If the listener's resyncPeriod is 0,
+// this always returns false.
+func (p *processorListener) shouldResync(now time.Time) bool {
+ p.resyncLock.Lock()
+ defer p.resyncLock.Unlock()
+
+ if p.resyncPeriod == 0 {
+ return false
+ }
+
+ return now.After(p.nextResync) || now.Equal(p.nextResync)
+}
+
+func (p *processorListener) determineNextResync(now time.Time) {
+ p.resyncLock.Lock()
+ defer p.resyncLock.Unlock()
+
+ p.nextResync = now.Add(p.resyncPeriod)
+}
+
+func (p *processorListener) setResyncPeriod(resyncPeriod time.Duration) {
+ p.resyncLock.Lock()
+ defer p.resyncLock.Unlock()
+
+ p.resyncPeriod = resyncPeriod
+}
diff --git a/vendor/k8s.io/client-go/tools/cache/store.go b/vendor/k8s.io/client-go/tools/cache/store.go
new file mode 100755
index 000000000..4958987f0
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/cache/store.go
@@ -0,0 +1,244 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package cache
+
+import (
+ "fmt"
+ "strings"
+
+ "k8s.io/apimachinery/pkg/api/meta"
+)
+
+// Store is a generic object storage interface. Reflector knows how to watch a server
+// and update a store. A generic store is provided, which allows Reflector to be used
+// as a local caching system, and an LRU store, which allows Reflector to work like a
+// queue of items yet to be processed.
+//
+// Store makes no assumptions about stored object identity; it is the responsibility
+// of a Store implementation to provide a mechanism to correctly key objects and to
+// define the contract for obtaining objects by some arbitrary key type.
+type Store interface {
+ Add(obj interface{}) error
+ Update(obj interface{}) error
+ Delete(obj interface{}) error
+ List() []interface{}
+ ListKeys() []string
+ Get(obj interface{}) (item interface{}, exists bool, err error)
+ GetByKey(key string) (item interface{}, exists bool, err error)
+
+ // Replace will delete the contents of the store, using instead the
+ // given list. Store takes ownership of the list, you should not reference
+ // it after calling this function.
+ Replace([]interface{}, string) error
+ Resync() error
+}
+
+// KeyFunc knows how to make a key from an object. Implementations should be deterministic.
+type KeyFunc func(obj interface{}) (string, error)
+
+// KeyError will be returned any time a KeyFunc gives an error; it includes the object
+// at fault.
+type KeyError struct {
+ Obj interface{}
+ Err error
+}
+
+// Error gives a human-readable description of the error.
+func (k KeyError) Error() string {
+ return fmt.Sprintf("couldn't create key for object %+v: %v", k.Obj, k.Err)
+}
+
+// ExplicitKey can be passed to MetaNamespaceKeyFunc if you have the key for
+// the object but not the object itself.
+type ExplicitKey string
+
+// MetaNamespaceKeyFunc is a convenient default KeyFunc which knows how to make
+// keys for API objects which implement meta.Interface.
+// The key uses the format <namespace>/<name> unless <namespace> is empty, then
+// it's just <name>.
+//
+// TODO: replace key-as-string with a key-as-struct so that this
+// packing/unpacking won't be necessary.
+func MetaNamespaceKeyFunc(obj interface{}) (string, error) {
+ if key, ok := obj.(ExplicitKey); ok {
+ return string(key), nil
+ }
+ meta, err := meta.Accessor(obj)
+ if err != nil {
+ return "", fmt.Errorf("object has no meta: %v", err)
+ }
+ if len(meta.GetNamespace()) > 0 {
+ return meta.GetNamespace() + "/" + meta.GetName(), nil
+ }
+ return meta.GetName(), nil
+}
+
+// SplitMetaNamespaceKey returns the namespace and name that
+// MetaNamespaceKeyFunc encoded into key.
+//
+// TODO: replace key-as-string with a key-as-struct so that this
+// packing/unpacking won't be necessary.
+func SplitMetaNamespaceKey(key string) (namespace, name string, err error) {
+ parts := strings.Split(key, "/")
+ switch len(parts) {
+ case 1:
+ // name only, no namespace
+ return "", parts[0], nil
+ case 2:
+ // namespace and name
+ return parts[0], parts[1], nil
+ }
+
+ return "", "", fmt.Errorf("unexpected key format: %q", key)
+}
+
+// cache responsibilities are limited to:
+// 1. Computing keys for objects via keyFunc
+// 2. Invoking methods of a ThreadSafeStorage interface
+type cache struct {
+ // cacheStorage bears the burden of thread safety for the cache
+ cacheStorage ThreadSafeStore
+ // keyFunc is used to make the key for objects stored in and retrieved from items, and
+ // should be deterministic.
+ keyFunc KeyFunc
+}
+
+var _ Store = &cache{}
+
+// Add inserts an item into the cache.
+func (c *cache) Add(obj interface{}) error {
+ key, err := c.keyFunc(obj)
+ if err != nil {
+ return KeyError{obj, err}
+ }
+ c.cacheStorage.Add(key, obj)
+ return nil
+}
+
+// Update sets an item in the cache to its updated state.
+func (c *cache) Update(obj interface{}) error {
+ key, err := c.keyFunc(obj)
+ if err != nil {
+ return KeyError{obj, err}
+ }
+ c.cacheStorage.Update(key, obj)
+ return nil
+}
+
+// Delete removes an item from the cache.
+func (c *cache) Delete(obj interface{}) error {
+ key, err := c.keyFunc(obj)
+ if err != nil {
+ return KeyError{obj, err}
+ }
+ c.cacheStorage.Delete(key)
+ return nil
+}
+
+// List returns a list of all the items.
+// List is completely threadsafe as long as you treat all items as immutable.
+func (c *cache) List() []interface{} {
+ return c.cacheStorage.List()
+}
+
+// ListKeys returns a list of all the keys of the objects currently
+// in the cache.
+func (c *cache) ListKeys() []string {
+ return c.cacheStorage.ListKeys()
+}
+
+// GetIndexers returns the indexers of cache
+func (c *cache) GetIndexers() Indexers {
+ return c.cacheStorage.GetIndexers()
+}
+
+// Index returns a list of items that match on the index function
+// Index is thread-safe so long as you treat all items as immutable
+func (c *cache) Index(indexName string, obj interface{}) ([]interface{}, error) {
+ return c.cacheStorage.Index(indexName, obj)
+}
+
+func (c *cache) IndexKeys(indexName, indexKey string) ([]string, error) {
+ return c.cacheStorage.IndexKeys(indexName, indexKey)
+}
+
+// ListIndexFuncValues returns the list of generated values of an Index func
+func (c *cache) ListIndexFuncValues(indexName string) []string {
+ return c.cacheStorage.ListIndexFuncValues(indexName)
+}
+
+func (c *cache) ByIndex(indexName, indexKey string) ([]interface{}, error) {
+ return c.cacheStorage.ByIndex(indexName, indexKey)
+}
+
+func (c *cache) AddIndexers(newIndexers Indexers) error {
+ return c.cacheStorage.AddIndexers(newIndexers)
+}
+
+// Get returns the requested item, or sets exists=false.
+// Get is completely threadsafe as long as you treat all items as immutable.
+func (c *cache) Get(obj interface{}) (item interface{}, exists bool, err error) {
+ key, err := c.keyFunc(obj)
+ if err != nil {
+ return nil, false, KeyError{obj, err}
+ }
+ return c.GetByKey(key)
+}
+
+// GetByKey returns the request item, or exists=false.
+// GetByKey is completely threadsafe as long as you treat all items as immutable.
+func (c *cache) GetByKey(key string) (item interface{}, exists bool, err error) {
+ item, exists = c.cacheStorage.Get(key)
+ return item, exists, nil
+}
+
+// Replace will delete the contents of 'c', using instead the given list.
+// 'c' takes ownership of the list, you should not reference the list again
+// after calling this function.
+func (c *cache) Replace(list []interface{}, resourceVersion string) error {
+ items := map[string]interface{}{}
+ for _, item := range list {
+ key, err := c.keyFunc(item)
+ if err != nil {
+ return KeyError{item, err}
+ }
+ items[key] = item
+ }
+ c.cacheStorage.Replace(items, resourceVersion)
+ return nil
+}
+
+// Resync touches all items in the store to force processing
+func (c *cache) Resync() error {
+ return c.cacheStorage.Resync()
+}
+
+// NewStore returns a Store implemented simply with a map and a lock.
+func NewStore(keyFunc KeyFunc) Store {
+ return &cache{
+ cacheStorage: NewThreadSafeStore(Indexers{}, Indices{}),
+ keyFunc: keyFunc,
+ }
+}
+
+// NewIndexer returns an Indexer implemented simply with a map and a lock.
+func NewIndexer(keyFunc KeyFunc, indexers Indexers) Indexer {
+ return &cache{
+ cacheStorage: NewThreadSafeStore(indexers, Indices{}),
+ keyFunc: keyFunc,
+ }
+}
diff --git a/vendor/k8s.io/client-go/tools/cache/thread_safe_store.go b/vendor/k8s.io/client-go/tools/cache/thread_safe_store.go
new file mode 100644
index 000000000..4eb350c43
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/cache/thread_safe_store.go
@@ -0,0 +1,306 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package cache
+
+import (
+ "fmt"
+ "sync"
+
+ "k8s.io/apimachinery/pkg/util/sets"
+)
+
+// ThreadSafeStore is an interface that allows concurrent access to a storage backend.
+// TL;DR caveats: you must not modify anything returned by Get or List as it will break
+// the indexing feature in addition to not being thread safe.
+//
+// The guarantees of thread safety provided by List/Get are only valid if the caller
+// treats returned items as read-only. For example, a pointer inserted in the store
+// through `Add` will be returned as is by `Get`. Multiple clients might invoke `Get`
+// on the same key and modify the pointer in a non-thread-safe way. Also note that
+// modifying objects stored by the indexers (if any) will *not* automatically lead
+// to a re-index. So it's not a good idea to directly modify the objects returned by
+// Get/List, in general.
+type ThreadSafeStore interface {
+ Add(key string, obj interface{})
+ Update(key string, obj interface{})
+ Delete(key string)
+ Get(key string) (item interface{}, exists bool)
+ List() []interface{}
+ ListKeys() []string
+ Replace(map[string]interface{}, string)
+ Index(indexName string, obj interface{}) ([]interface{}, error)
+ IndexKeys(indexName, indexKey string) ([]string, error)
+ ListIndexFuncValues(name string) []string
+ ByIndex(indexName, indexKey string) ([]interface{}, error)
+ GetIndexers() Indexers
+
+ // AddIndexers adds more indexers to this store. If you call this after you already have data
+ // in the store, the results are undefined.
+ AddIndexers(newIndexers Indexers) error
+ Resync() error
+}
+
+// threadSafeMap implements ThreadSafeStore
+type threadSafeMap struct {
+ lock sync.RWMutex
+ items map[string]interface{}
+
+ // indexers maps a name to an IndexFunc
+ indexers Indexers
+ // indices maps a name to an Index
+ indices Indices
+}
+
+func (c *threadSafeMap) Add(key string, obj interface{}) {
+ c.lock.Lock()
+ defer c.lock.Unlock()
+ oldObject := c.items[key]
+ c.items[key] = obj
+ c.updateIndices(oldObject, obj, key)
+}
+
+func (c *threadSafeMap) Update(key string, obj interface{}) {
+ c.lock.Lock()
+ defer c.lock.Unlock()
+ oldObject := c.items[key]
+ c.items[key] = obj
+ c.updateIndices(oldObject, obj, key)
+}
+
+func (c *threadSafeMap) Delete(key string) {
+ c.lock.Lock()
+ defer c.lock.Unlock()
+ if obj, exists := c.items[key]; exists {
+ c.deleteFromIndices(obj, key)
+ delete(c.items, key)
+ }
+}
+
+func (c *threadSafeMap) Get(key string) (item interface{}, exists bool) {
+ c.lock.RLock()
+ defer c.lock.RUnlock()
+ item, exists = c.items[key]
+ return item, exists
+}
+
+func (c *threadSafeMap) List() []interface{} {
+ c.lock.RLock()
+ defer c.lock.RUnlock()
+ list := make([]interface{}, 0, len(c.items))
+ for _, item := range c.items {
+ list = append(list, item)
+ }
+ return list
+}
+
+// ListKeys returns a list of all the keys of the objects currently
+// in the threadSafeMap.
+func (c *threadSafeMap) ListKeys() []string {
+ c.lock.RLock()
+ defer c.lock.RUnlock()
+ list := make([]string, 0, len(c.items))
+ for key := range c.items {
+ list = append(list, key)
+ }
+ return list
+}
+
+func (c *threadSafeMap) Replace(items map[string]interface{}, resourceVersion string) {
+ c.lock.Lock()
+ defer c.lock.Unlock()
+ c.items = items
+
+ // rebuild any index
+ c.indices = Indices{}
+ for key, item := range c.items {
+ c.updateIndices(nil, item, key)
+ }
+}
+
+// Index returns a list of items that match on the index function
+// Index is thread-safe so long as you treat all items as immutable
+func (c *threadSafeMap) Index(indexName string, obj interface{}) ([]interface{}, error) {
+ c.lock.RLock()
+ defer c.lock.RUnlock()
+
+ indexFunc := c.indexers[indexName]
+ if indexFunc == nil {
+ return nil, fmt.Errorf("Index with name %s does not exist", indexName)
+ }
+
+ indexKeys, err := indexFunc(obj)
+ if err != nil {
+ return nil, err
+ }
+ index := c.indices[indexName]
+
+ // need to de-dupe the return list. Since multiple keys are allowed, this can happen.
+ returnKeySet := sets.String{}
+ for _, indexKey := range indexKeys {
+ set := index[indexKey]
+ for _, key := range set.UnsortedList() {
+ returnKeySet.Insert(key)
+ }
+ }
+
+ list := make([]interface{}, 0, returnKeySet.Len())
+ for absoluteKey := range returnKeySet {
+ list = append(list, c.items[absoluteKey])
+ }
+ return list, nil
+}
+
+// ByIndex returns a list of items that match an exact value on the index function
+func (c *threadSafeMap) ByIndex(indexName, indexKey string) ([]interface{}, error) {
+ c.lock.RLock()
+ defer c.lock.RUnlock()
+
+ indexFunc := c.indexers[indexName]
+ if indexFunc == nil {
+ return nil, fmt.Errorf("Index with name %s does not exist", indexName)
+ }
+
+ index := c.indices[indexName]
+
+ set := index[indexKey]
+ list := make([]interface{}, 0, set.Len())
+ for _, key := range set.List() {
+ list = append(list, c.items[key])
+ }
+
+ return list, nil
+}
+
+// IndexKeys returns a list of keys that match on the index function.
+// IndexKeys is thread-safe so long as you treat all items as immutable.
+func (c *threadSafeMap) IndexKeys(indexName, indexKey string) ([]string, error) {
+ c.lock.RLock()
+ defer c.lock.RUnlock()
+
+ indexFunc := c.indexers[indexName]
+ if indexFunc == nil {
+ return nil, fmt.Errorf("Index with name %s does not exist", indexName)
+ }
+
+ index := c.indices[indexName]
+
+ set := index[indexKey]
+ return set.List(), nil
+}
+
+func (c *threadSafeMap) ListIndexFuncValues(indexName string) []string {
+ c.lock.RLock()
+ defer c.lock.RUnlock()
+
+ index := c.indices[indexName]
+ names := make([]string, 0, len(index))
+ for key := range index {
+ names = append(names, key)
+ }
+ return names
+}
+
+func (c *threadSafeMap) GetIndexers() Indexers {
+ return c.indexers
+}
+
+func (c *threadSafeMap) AddIndexers(newIndexers Indexers) error {
+ c.lock.Lock()
+ defer c.lock.Unlock()
+
+ if len(c.items) > 0 {
+ return fmt.Errorf("cannot add indexers to running index")
+ }
+
+ oldKeys := sets.StringKeySet(c.indexers)
+ newKeys := sets.StringKeySet(newIndexers)
+
+ if oldKeys.HasAny(newKeys.List()...) {
+ return fmt.Errorf("indexer conflict: %v", oldKeys.Intersection(newKeys))
+ }
+
+ for k, v := range newIndexers {
+ c.indexers[k] = v
+ }
+ return nil
+}
+
+// updateIndices modifies the objects location in the managed indexes, if this is an update, you must provide an oldObj
+// updateIndices must be called from a function that already has a lock on the cache
+func (c *threadSafeMap) updateIndices(oldObj interface{}, newObj interface{}, key string) error {
+ // if we got an old object, we need to remove it before we add it again
+ if oldObj != nil {
+ c.deleteFromIndices(oldObj, key)
+ }
+ for name, indexFunc := range c.indexers {
+ indexValues, err := indexFunc(newObj)
+ if err != nil {
+ return err
+ }
+ index := c.indices[name]
+ if index == nil {
+ index = Index{}
+ c.indices[name] = index
+ }
+
+ for _, indexValue := range indexValues {
+ set := index[indexValue]
+ if set == nil {
+ set = sets.String{}
+ index[indexValue] = set
+ }
+ set.Insert(key)
+ }
+ }
+ return nil
+}
+
+// deleteFromIndices removes the object from each of the managed indexes
+// it is intended to be called from a function that already has a lock on the cache
+func (c *threadSafeMap) deleteFromIndices(obj interface{}, key string) error {
+ for name, indexFunc := range c.indexers {
+ indexValues, err := indexFunc(obj)
+ if err != nil {
+ return err
+ }
+
+ index := c.indices[name]
+ if index == nil {
+ continue
+ }
+ for _, indexValue := range indexValues {
+ set := index[indexValue]
+ if set != nil {
+ set.Delete(key)
+ }
+ }
+ }
+ return nil
+}
+
+func (c *threadSafeMap) Resync() error {
+ // Nothing to do
+ return nil
+}
+
+func NewThreadSafeStore(indexers Indexers, indices Indices) ThreadSafeStore {
+ return &threadSafeMap{
+ items: map[string]interface{}{},
+ indexers: indexers,
+ indices: indices,
+ }
+}
diff --git a/vendor/k8s.io/client-go/tools/cache/undelta_store.go b/vendor/k8s.io/client-go/tools/cache/undelta_store.go
new file mode 100644
index 000000000..117df46c4
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/cache/undelta_store.go
@@ -0,0 +1,83 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package cache
+
+// UndeltaStore listens to incremental updates and sends complete state on every change.
+// It implements the Store interface so that it can receive a stream of mirrored objects
+// from Reflector. Whenever it receives any complete (Store.Replace) or incremental change
+// (Store.Add, Store.Update, Store.Delete), it sends the complete state by calling PushFunc.
+// It is thread-safe. It guarantees that every change (Add, Update, Replace, Delete) results
+// in one call to PushFunc, but sometimes PushFunc may be called twice with the same values.
+// PushFunc should be thread safe.
+type UndeltaStore struct {
+ Store
+ PushFunc func([]interface{})
+}
+
+// Assert that it implements the Store interface.
+var _ Store = &UndeltaStore{}
+
+// Note about thread safety. The Store implementation (cache.cache) uses a lock for all methods.
+// In the functions below, the lock gets released and reacquired betweend the {Add,Delete,etc}
+// and the List. So, the following can happen, resulting in two identical calls to PushFunc.
+// time thread 1 thread 2
+// 0 UndeltaStore.Add(a)
+// 1 UndeltaStore.Add(b)
+// 2 Store.Add(a)
+// 3 Store.Add(b)
+// 4 Store.List() -> [a,b]
+// 5 Store.List() -> [a,b]
+
+func (u *UndeltaStore) Add(obj interface{}) error {
+ if err := u.Store.Add(obj); err != nil {
+ return err
+ }
+ u.PushFunc(u.Store.List())
+ return nil
+}
+
+func (u *UndeltaStore) Update(obj interface{}) error {
+ if err := u.Store.Update(obj); err != nil {
+ return err
+ }
+ u.PushFunc(u.Store.List())
+ return nil
+}
+
+func (u *UndeltaStore) Delete(obj interface{}) error {
+ if err := u.Store.Delete(obj); err != nil {
+ return err
+ }
+ u.PushFunc(u.Store.List())
+ return nil
+}
+
+func (u *UndeltaStore) Replace(list []interface{}, resourceVersion string) error {
+ if err := u.Store.Replace(list, resourceVersion); err != nil {
+ return err
+ }
+ u.PushFunc(u.Store.List())
+ return nil
+}
+
+// NewUndeltaStore returns an UndeltaStore implemented with a Store.
+func NewUndeltaStore(pushFunc func([]interface{}), keyFunc KeyFunc) *UndeltaStore {
+ return &UndeltaStore{
+ Store: NewStore(keyFunc),
+ PushFunc: pushFunc,
+ }
+}
diff --git a/vendor/k8s.io/client-go/tools/clientcmd/api/helpers.go b/vendor/k8s.io/client-go/tools/clientcmd/api/helpers.go
new file mode 100644
index 000000000..43e26487c
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/clientcmd/api/helpers.go
@@ -0,0 +1,183 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package api
+
+import (
+ "encoding/base64"
+ "errors"
+ "fmt"
+ "io/ioutil"
+ "os"
+ "path"
+ "path/filepath"
+)
+
+func init() {
+ sDec, _ := base64.StdEncoding.DecodeString("REDACTED+")
+ redactedBytes = []byte(string(sDec))
+}
+
+// IsConfigEmpty returns true if the config is empty.
+func IsConfigEmpty(config *Config) bool {
+ return len(config.AuthInfos) == 0 && len(config.Clusters) == 0 && len(config.Contexts) == 0 &&
+ len(config.CurrentContext) == 0 &&
+ len(config.Preferences.Extensions) == 0 && !config.Preferences.Colors &&
+ len(config.Extensions) == 0
+}
+
+// MinifyConfig read the current context and uses that to keep only the relevant pieces of config
+// This is useful for making secrets based on kubeconfig files
+func MinifyConfig(config *Config) error {
+ if len(config.CurrentContext) == 0 {
+ return errors.New("current-context must exist in order to minify")
+ }
+
+ currContext, exists := config.Contexts[config.CurrentContext]
+ if !exists {
+ return fmt.Errorf("cannot locate context %v", config.CurrentContext)
+ }
+
+ newContexts := map[string]*Context{}
+ newContexts[config.CurrentContext] = currContext
+
+ newClusters := map[string]*Cluster{}
+ if len(currContext.Cluster) > 0 {
+ if _, exists := config.Clusters[currContext.Cluster]; !exists {
+ return fmt.Errorf("cannot locate cluster %v", currContext.Cluster)
+ }
+
+ newClusters[currContext.Cluster] = config.Clusters[currContext.Cluster]
+ }
+
+ newAuthInfos := map[string]*AuthInfo{}
+ if len(currContext.AuthInfo) > 0 {
+ if _, exists := config.AuthInfos[currContext.AuthInfo]; !exists {
+ return fmt.Errorf("cannot locate user %v", currContext.AuthInfo)
+ }
+
+ newAuthInfos[currContext.AuthInfo] = config.AuthInfos[currContext.AuthInfo]
+ }
+
+ config.AuthInfos = newAuthInfos
+ config.Clusters = newClusters
+ config.Contexts = newContexts
+
+ return nil
+}
+
+var redactedBytes []byte
+
+// Flatten redacts raw data entries from the config object for a human-readable view.
+func ShortenConfig(config *Config) {
+ // trick json encoder into printing a human readable string in the raw data
+ // by base64 decoding what we want to print. Relies on implementation of
+ // http://golang.org/pkg/encoding/json/#Marshal using base64 to encode []byte
+ for key, authInfo := range config.AuthInfos {
+ if len(authInfo.ClientKeyData) > 0 {
+ authInfo.ClientKeyData = redactedBytes
+ }
+ if len(authInfo.ClientCertificateData) > 0 {
+ authInfo.ClientCertificateData = redactedBytes
+ }
+ config.AuthInfos[key] = authInfo
+ }
+ for key, cluster := range config.Clusters {
+ if len(cluster.CertificateAuthorityData) > 0 {
+ cluster.CertificateAuthorityData = redactedBytes
+ }
+ config.Clusters[key] = cluster
+ }
+}
+
+// Flatten changes the config object into a self contained config (useful for making secrets)
+func FlattenConfig(config *Config) error {
+ for key, authInfo := range config.AuthInfos {
+ baseDir, err := MakeAbs(path.Dir(authInfo.LocationOfOrigin), "")
+ if err != nil {
+ return err
+ }
+
+ if err := FlattenContent(&authInfo.ClientCertificate, &authInfo.ClientCertificateData, baseDir); err != nil {
+ return err
+ }
+ if err := FlattenContent(&authInfo.ClientKey, &authInfo.ClientKeyData, baseDir); err != nil {
+ return err
+ }
+
+ config.AuthInfos[key] = authInfo
+ }
+ for key, cluster := range config.Clusters {
+ baseDir, err := MakeAbs(path.Dir(cluster.LocationOfOrigin), "")
+ if err != nil {
+ return err
+ }
+
+ if err := FlattenContent(&cluster.CertificateAuthority, &cluster.CertificateAuthorityData, baseDir); err != nil {
+ return err
+ }
+
+ config.Clusters[key] = cluster
+ }
+
+ return nil
+}
+
+func FlattenContent(path *string, contents *[]byte, baseDir string) error {
+ if len(*path) != 0 {
+ if len(*contents) > 0 {
+ return errors.New("cannot have values for both path and contents")
+ }
+
+ var err error
+ absPath := ResolvePath(*path, baseDir)
+ *contents, err = ioutil.ReadFile(absPath)
+ if err != nil {
+ return err
+ }
+
+ *path = ""
+ }
+
+ return nil
+}
+
+// ResolvePath returns the path as an absolute paths, relative to the given base directory
+func ResolvePath(path string, base string) string {
+ // Don't resolve empty paths
+ if len(path) > 0 {
+ // Don't resolve absolute paths
+ if !filepath.IsAbs(path) {
+ return filepath.Join(base, path)
+ }
+ }
+
+ return path
+}
+
+func MakeAbs(path, base string) (string, error) {
+ if filepath.IsAbs(path) {
+ return path, nil
+ }
+ if len(base) == 0 {
+ cwd, err := os.Getwd()
+ if err != nil {
+ return "", err
+ }
+ base = cwd
+ }
+ return filepath.Join(base, path), nil
+}
diff --git a/vendor/k8s.io/client-go/tools/clientcmd/api/register.go b/vendor/k8s.io/client-go/tools/clientcmd/api/register.go
new file mode 100644
index 000000000..2eec3881c
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/clientcmd/api/register.go
@@ -0,0 +1,46 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package api
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// SchemeGroupVersion is group version used to register these objects
+// TODO this should be in the "kubeconfig" group
+var SchemeGroupVersion = schema.GroupVersion{Group: "", Version: runtime.APIVersionInternal}
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Config{},
+ )
+ return nil
+}
+
+func (obj *Config) GetObjectKind() schema.ObjectKind { return obj }
+func (obj *Config) SetGroupVersionKind(gvk schema.GroupVersionKind) {
+ obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind()
+}
+func (obj *Config) GroupVersionKind() schema.GroupVersionKind {
+ return schema.FromAPIVersionAndKind(obj.APIVersion, obj.Kind)
+}
diff --git a/vendor/k8s.io/client-go/tools/clientcmd/api/types.go b/vendor/k8s.io/client-go/tools/clientcmd/api/types.go
new file mode 100644
index 000000000..76090c6f5
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/clientcmd/api/types.go
@@ -0,0 +1,185 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package api
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+// Where possible, json tags match the cli argument names.
+// Top level config objects and all values required for proper functioning are not "omitempty". Any truly optional piece of config is allowed to be omitted.
+
+// Config holds the information needed to build connect to remote kubernetes clusters as a given user
+// IMPORTANT if you add fields to this struct, please update IsConfigEmpty()
+type Config struct {
+ // Legacy field from pkg/api/types.go TypeMeta.
+ // TODO(jlowdermilk): remove this after eliminating downstream dependencies.
+ // +optional
+ Kind string `json:"kind,omitempty"`
+ // Legacy field from pkg/api/types.go TypeMeta.
+ // TODO(jlowdermilk): remove this after eliminating downstream dependencies.
+ // +optional
+ APIVersion string `json:"apiVersion,omitempty"`
+ // Preferences holds general information to be use for cli interactions
+ Preferences Preferences `json:"preferences"`
+ // Clusters is a map of referencable names to cluster configs
+ Clusters map[string]*Cluster `json:"clusters"`
+ // AuthInfos is a map of referencable names to user configs
+ AuthInfos map[string]*AuthInfo `json:"users"`
+ // Contexts is a map of referencable names to context configs
+ Contexts map[string]*Context `json:"contexts"`
+ // CurrentContext is the name of the context that you would like to use by default
+ CurrentContext string `json:"current-context"`
+ // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
+ // +optional
+ Extensions map[string]runtime.Object `json:"extensions,omitempty"`
+}
+
+// IMPORTANT if you add fields to this struct, please update IsConfigEmpty()
+type Preferences struct {
+ // +optional
+ Colors bool `json:"colors,omitempty"`
+ // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
+ // +optional
+ Extensions map[string]runtime.Object `json:"extensions,omitempty"`
+}
+
+// Cluster contains information about how to communicate with a kubernetes cluster
+type Cluster struct {
+ // LocationOfOrigin indicates where this object came from. It is used for round tripping config post-merge, but never serialized.
+ LocationOfOrigin string
+ // Server is the address of the kubernetes cluster (https://hostname:port).
+ Server string `json:"server"`
+ // InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure.
+ // +optional
+ InsecureSkipTLSVerify bool `json:"insecure-skip-tls-verify,omitempty"`
+ // CertificateAuthority is the path to a cert file for the certificate authority.
+ // +optional
+ CertificateAuthority string `json:"certificate-authority,omitempty"`
+ // CertificateAuthorityData contains PEM-encoded certificate authority certificates. Overrides CertificateAuthority
+ // +optional
+ CertificateAuthorityData []byte `json:"certificate-authority-data,omitempty"`
+ // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
+ // +optional
+ Extensions map[string]runtime.Object `json:"extensions,omitempty"`
+}
+
+// AuthInfo contains information that describes identity information. This is use to tell the kubernetes cluster who you are.
+type AuthInfo struct {
+ // LocationOfOrigin indicates where this object came from. It is used for round tripping config post-merge, but never serialized.
+ LocationOfOrigin string
+ // ClientCertificate is the path to a client cert file for TLS.
+ // +optional
+ ClientCertificate string `json:"client-certificate,omitempty"`
+ // ClientCertificateData contains PEM-encoded data from a client cert file for TLS. Overrides ClientCertificate
+ // +optional
+ ClientCertificateData []byte `json:"client-certificate-data,omitempty"`
+ // ClientKey is the path to a client key file for TLS.
+ // +optional
+ ClientKey string `json:"client-key,omitempty"`
+ // ClientKeyData contains PEM-encoded data from a client key file for TLS. Overrides ClientKey
+ // +optional
+ ClientKeyData []byte `json:"client-key-data,omitempty"`
+ // Token is the bearer token for authentication to the kubernetes cluster.
+ // +optional
+ Token string `json:"token,omitempty"`
+ // TokenFile is a pointer to a file that contains a bearer token (as described above). If both Token and TokenFile are present, Token takes precedence.
+ // +optional
+ TokenFile string `json:"tokenFile,omitempty"`
+ // Impersonate is the username to act-as.
+ // +optional
+ Impersonate string `json:"act-as,omitempty"`
+ // ImpersonateGroups is the groups to imperonate.
+ // +optional
+ ImpersonateGroups []string `json:"act-as-groups,omitempty"`
+ // ImpersonateUserExtra contains additional information for impersonated user.
+ // +optional
+ ImpersonateUserExtra map[string][]string `json:"act-as-user-extra,omitempty"`
+ // Username is the username for basic authentication to the kubernetes cluster.
+ // +optional
+ Username string `json:"username,omitempty"`
+ // Password is the password for basic authentication to the kubernetes cluster.
+ // +optional
+ Password string `json:"password,omitempty"`
+ // AuthProvider specifies a custom authentication plugin for the kubernetes cluster.
+ // +optional
+ AuthProvider *AuthProviderConfig `json:"auth-provider,omitempty"`
+ // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
+ // +optional
+ Extensions map[string]runtime.Object `json:"extensions,omitempty"`
+}
+
+// Context is a tuple of references to a cluster (how do I communicate with a kubernetes cluster), a user (how do I identify myself), and a namespace (what subset of resources do I want to work with)
+type Context struct {
+ // LocationOfOrigin indicates where this object came from. It is used for round tripping config post-merge, but never serialized.
+ LocationOfOrigin string
+ // Cluster is the name of the cluster for this context
+ Cluster string `json:"cluster"`
+ // AuthInfo is the name of the authInfo for this context
+ AuthInfo string `json:"user"`
+ // Namespace is the default namespace to use on unspecified requests
+ // +optional
+ Namespace string `json:"namespace,omitempty"`
+ // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
+ // +optional
+ Extensions map[string]runtime.Object `json:"extensions,omitempty"`
+}
+
+// AuthProviderConfig holds the configuration for a specified auth provider.
+type AuthProviderConfig struct {
+ Name string `json:"name"`
+ // +optional
+ Config map[string]string `json:"config,omitempty"`
+}
+
+// NewConfig is a convenience function that returns a new Config object with non-nil maps
+func NewConfig() *Config {
+ return &Config{
+ Preferences: *NewPreferences(),
+ Clusters: make(map[string]*Cluster),
+ AuthInfos: make(map[string]*AuthInfo),
+ Contexts: make(map[string]*Context),
+ Extensions: make(map[string]runtime.Object),
+ }
+}
+
+// NewContext is a convenience function that returns a new Context
+// object with non-nil maps
+func NewContext() *Context {
+ return &Context{Extensions: make(map[string]runtime.Object)}
+}
+
+// NewCluster is a convenience function that returns a new Cluster
+// object with non-nil maps
+func NewCluster() *Cluster {
+ return &Cluster{Extensions: make(map[string]runtime.Object)}
+}
+
+// NewAuthInfo is a convenience function that returns a new AuthInfo
+// object with non-nil maps
+func NewAuthInfo() *AuthInfo {
+ return &AuthInfo{
+ Extensions: make(map[string]runtime.Object),
+ ImpersonateUserExtra: make(map[string][]string),
+ }
+}
+
+// NewPreferences is a convenience function that returns a new
+// Preferences object with non-nil maps
+func NewPreferences() *Preferences {
+ return &Preferences{Extensions: make(map[string]runtime.Object)}
+}
diff --git a/vendor/k8s.io/client-go/tools/metrics/metrics.go b/vendor/k8s.io/client-go/tools/metrics/metrics.go
new file mode 100644
index 000000000..a01306c65
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/metrics/metrics.go
@@ -0,0 +1,61 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package metrics provides abstractions for registering which metrics
+// to record.
+package metrics
+
+import (
+ "net/url"
+ "sync"
+ "time"
+)
+
+var registerMetrics sync.Once
+
+// LatencyMetric observes client latency partitioned by verb and url.
+type LatencyMetric interface {
+ Observe(verb string, u url.URL, latency time.Duration)
+}
+
+// ResultMetric counts response codes partitioned by method and host.
+type ResultMetric interface {
+ Increment(code string, method string, host string)
+}
+
+var (
+ // RequestLatency is the latency metric that rest clients will update.
+ RequestLatency LatencyMetric = noopLatency{}
+ // RequestResult is the result metric that rest clients will update.
+ RequestResult ResultMetric = noopResult{}
+)
+
+// Register registers metrics for the rest client to use. This can
+// only be called once.
+func Register(lm LatencyMetric, rm ResultMetric) {
+ registerMetrics.Do(func() {
+ RequestLatency = lm
+ RequestResult = rm
+ })
+}
+
+type noopLatency struct{}
+
+func (noopLatency) Observe(string, url.URL, time.Duration) {}
+
+type noopResult struct{}
+
+func (noopResult) Increment(string, string, string) {}
diff --git a/vendor/k8s.io/client-go/tools/record/doc.go b/vendor/k8s.io/client-go/tools/record/doc.go
new file mode 100644
index 000000000..657ddecbc
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/record/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package record has all client logic for recording and reporting events.
+package record // import "k8s.io/client-go/tools/record"
diff --git a/vendor/k8s.io/client-go/tools/record/event.go b/vendor/k8s.io/client-go/tools/record/event.go
new file mode 100644
index 000000000..6b2fad409
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/record/event.go
@@ -0,0 +1,318 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package record
+
+import (
+ "fmt"
+ "math/rand"
+ "time"
+
+ "k8s.io/apimachinery/pkg/api/errors"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/clock"
+ utilruntime "k8s.io/apimachinery/pkg/util/runtime"
+ "k8s.io/apimachinery/pkg/watch"
+ "k8s.io/client-go/pkg/api/v1"
+ "k8s.io/client-go/pkg/api/v1/ref"
+ restclient "k8s.io/client-go/rest"
+
+ "net/http"
+
+ "github.com/golang/glog"
+)
+
+const maxTriesPerEvent = 12
+
+var defaultSleepDuration = 10 * time.Second
+
+const maxQueuedEvents = 1000
+
+// EventSink knows how to store events (client.Client implements it.)
+// EventSink must respect the namespace that will be embedded in 'event'.
+// It is assumed that EventSink will return the same sorts of errors as
+// pkg/client's REST client.
+type EventSink interface {
+ Create(event *v1.Event) (*v1.Event, error)
+ Update(event *v1.Event) (*v1.Event, error)
+ Patch(oldEvent *v1.Event, data []byte) (*v1.Event, error)
+}
+
+// EventRecorder knows how to record events on behalf of an EventSource.
+type EventRecorder interface {
+ // Event constructs an event from the given information and puts it in the queue for sending.
+ // 'object' is the object this event is about. Event will make a reference-- or you may also
+ // pass a reference to the object directly.
+ // 'type' of this event, and can be one of Normal, Warning. New types could be added in future
+ // 'reason' is the reason this event is generated. 'reason' should be short and unique; it
+ // should be in UpperCamelCase format (starting with a capital letter). "reason" will be used
+ // to automate handling of events, so imagine people writing switch statements to handle them.
+ // You want to make that easy.
+ // 'message' is intended to be human readable.
+ //
+ // The resulting event will be created in the same namespace as the reference object.
+ Event(object runtime.Object, eventtype, reason, message string)
+
+ // Eventf is just like Event, but with Sprintf for the message field.
+ Eventf(object runtime.Object, eventtype, reason, messageFmt string, args ...interface{})
+
+ // PastEventf is just like Eventf, but with an option to specify the event's 'timestamp' field.
+ PastEventf(object runtime.Object, timestamp metav1.Time, eventtype, reason, messageFmt string, args ...interface{})
+}
+
+// EventBroadcaster knows how to receive events and send them to any EventSink, watcher, or log.
+type EventBroadcaster interface {
+ // StartEventWatcher starts sending events received from this EventBroadcaster to the given
+ // event handler function. The return value can be ignored or used to stop recording, if
+ // desired.
+ StartEventWatcher(eventHandler func(*v1.Event)) watch.Interface
+
+ // StartRecordingToSink starts sending events received from this EventBroadcaster to the given
+ // sink. The return value can be ignored or used to stop recording, if desired.
+ StartRecordingToSink(sink EventSink) watch.Interface
+
+ // StartLogging starts sending events received from this EventBroadcaster to the given logging
+ // function. The return value can be ignored or used to stop recording, if desired.
+ StartLogging(logf func(format string, args ...interface{})) watch.Interface
+
+ // NewRecorder returns an EventRecorder that can be used to send events to this EventBroadcaster
+ // with the event source set to the given event source.
+ NewRecorder(scheme *runtime.Scheme, source v1.EventSource) EventRecorder
+}
+
+// Creates a new event broadcaster.
+func NewBroadcaster() EventBroadcaster {
+ return &eventBroadcasterImpl{watch.NewBroadcaster(maxQueuedEvents, watch.DropIfChannelFull), defaultSleepDuration}
+}
+
+func NewBroadcasterForTests(sleepDuration time.Duration) EventBroadcaster {
+ return &eventBroadcasterImpl{watch.NewBroadcaster(maxQueuedEvents, watch.DropIfChannelFull), sleepDuration}
+}
+
+type eventBroadcasterImpl struct {
+ *watch.Broadcaster
+ sleepDuration time.Duration
+}
+
+// StartRecordingToSink starts sending events received from the specified eventBroadcaster to the given sink.
+// The return value can be ignored or used to stop recording, if desired.
+// TODO: make me an object with parameterizable queue length and retry interval
+func (eventBroadcaster *eventBroadcasterImpl) StartRecordingToSink(sink EventSink) watch.Interface {
+ // The default math/rand package functions aren't thread safe, so create a
+ // new Rand object for each StartRecording call.
+ randGen := rand.New(rand.NewSource(time.Now().UnixNano()))
+ eventCorrelator := NewEventCorrelator(clock.RealClock{})
+ return eventBroadcaster.StartEventWatcher(
+ func(event *v1.Event) {
+ recordToSink(sink, event, eventCorrelator, randGen, eventBroadcaster.sleepDuration)
+ })
+}
+
+func recordToSink(sink EventSink, event *v1.Event, eventCorrelator *EventCorrelator, randGen *rand.Rand, sleepDuration time.Duration) {
+ // Make a copy before modification, because there could be multiple listeners.
+ // Events are safe to copy like this.
+ eventCopy := *event
+ event = &eventCopy
+ result, err := eventCorrelator.EventCorrelate(event)
+ if err != nil {
+ utilruntime.HandleError(err)
+ }
+ if result.Skip {
+ return
+ }
+ tries := 0
+ for {
+ if recordEvent(sink, result.Event, result.Patch, result.Event.Count > 1, eventCorrelator) {
+ break
+ }
+ tries++
+ if tries >= maxTriesPerEvent {
+ glog.Errorf("Unable to write event '%#v' (retry limit exceeded!)", event)
+ break
+ }
+ // Randomize the first sleep so that various clients won't all be
+ // synced up if the master goes down.
+ if tries == 1 {
+ time.Sleep(time.Duration(float64(sleepDuration) * randGen.Float64()))
+ } else {
+ time.Sleep(sleepDuration)
+ }
+ }
+}
+
+func isKeyNotFoundError(err error) bool {
+ statusErr, _ := err.(*errors.StatusError)
+
+ if statusErr != nil && statusErr.Status().Code == http.StatusNotFound {
+ return true
+ }
+
+ return false
+}
+
+// recordEvent attempts to write event to a sink. It returns true if the event
+// was successfully recorded or discarded, false if it should be retried.
+// If updateExistingEvent is false, it creates a new event, otherwise it updates
+// existing event.
+func recordEvent(sink EventSink, event *v1.Event, patch []byte, updateExistingEvent bool, eventCorrelator *EventCorrelator) bool {
+ var newEvent *v1.Event
+ var err error
+ if updateExistingEvent {
+ newEvent, err = sink.Patch(event, patch)
+ }
+ // Update can fail because the event may have been removed and it no longer exists.
+ if !updateExistingEvent || (updateExistingEvent && isKeyNotFoundError(err)) {
+ // Making sure that ResourceVersion is empty on creation
+ event.ResourceVersion = ""
+ newEvent, err = sink.Create(event)
+ }
+ if err == nil {
+ // we need to update our event correlator with the server returned state to handle name/resourceversion
+ eventCorrelator.UpdateState(newEvent)
+ return true
+ }
+
+ // If we can't contact the server, then hold everything while we keep trying.
+ // Otherwise, something about the event is malformed and we should abandon it.
+ switch err.(type) {
+ case *restclient.RequestConstructionError:
+ // We will construct the request the same next time, so don't keep trying.
+ glog.Errorf("Unable to construct event '%#v': '%v' (will not retry!)", event, err)
+ return true
+ case *errors.StatusError:
+ if errors.IsAlreadyExists(err) {
+ glog.V(5).Infof("Server rejected event '%#v': '%v' (will not retry!)", event, err)
+ } else {
+ glog.Errorf("Server rejected event '%#v': '%v' (will not retry!)", event, err)
+ }
+ return true
+ case *errors.UnexpectedObjectError:
+ // We don't expect this; it implies the server's response didn't match a
+ // known pattern. Go ahead and retry.
+ default:
+ // This case includes actual http transport errors. Go ahead and retry.
+ }
+ glog.Errorf("Unable to write event: '%v' (may retry after sleeping)", err)
+ return false
+}
+
+// StartLogging starts sending events received from this EventBroadcaster to the given logging function.
+// The return value can be ignored or used to stop recording, if desired.
+func (eventBroadcaster *eventBroadcasterImpl) StartLogging(logf func(format string, args ...interface{})) watch.Interface {
+ return eventBroadcaster.StartEventWatcher(
+ func(e *v1.Event) {
+ logf("Event(%#v): type: '%v' reason: '%v' %v", e.InvolvedObject, e.Type, e.Reason, e.Message)
+ })
+}
+
+// StartEventWatcher starts sending events received from this EventBroadcaster to the given event handler function.
+// The return value can be ignored or used to stop recording, if desired.
+func (eventBroadcaster *eventBroadcasterImpl) StartEventWatcher(eventHandler func(*v1.Event)) watch.Interface {
+ watcher := eventBroadcaster.Watch()
+ go func() {
+ defer utilruntime.HandleCrash()
+ for {
+ watchEvent, open := <-watcher.ResultChan()
+ if !open {
+ return
+ }
+ event, ok := watchEvent.Object.(*v1.Event)
+ if !ok {
+ // This is all local, so there's no reason this should
+ // ever happen.
+ continue
+ }
+ eventHandler(event)
+ }
+ }()
+ return watcher
+}
+
+// NewRecorder returns an EventRecorder that records events with the given event source.
+func (eventBroadcaster *eventBroadcasterImpl) NewRecorder(scheme *runtime.Scheme, source v1.EventSource) EventRecorder {
+ return &recorderImpl{scheme, source, eventBroadcaster.Broadcaster, clock.RealClock{}}
+}
+
+type recorderImpl struct {
+ scheme *runtime.Scheme
+ source v1.EventSource
+ *watch.Broadcaster
+ clock clock.Clock
+}
+
+func (recorder *recorderImpl) generateEvent(object runtime.Object, timestamp metav1.Time, eventtype, reason, message string) {
+ ref, err := ref.GetReference(recorder.scheme, object)
+ if err != nil {
+ glog.Errorf("Could not construct reference to: '%#v' due to: '%v'. Will not report event: '%v' '%v' '%v'", object, err, eventtype, reason, message)
+ return
+ }
+
+ if !validateEventType(eventtype) {
+ glog.Errorf("Unsupported event type: '%v'", eventtype)
+ return
+ }
+
+ event := recorder.makeEvent(ref, eventtype, reason, message)
+ event.Source = recorder.source
+
+ go func() {
+ // NOTE: events should be a non-blocking operation
+ defer utilruntime.HandleCrash()
+ recorder.Action(watch.Added, event)
+ }()
+}
+
+func validateEventType(eventtype string) bool {
+ switch eventtype {
+ case v1.EventTypeNormal, v1.EventTypeWarning:
+ return true
+ }
+ return false
+}
+
+func (recorder *recorderImpl) Event(object runtime.Object, eventtype, reason, message string) {
+ recorder.generateEvent(object, metav1.Now(), eventtype, reason, message)
+}
+
+func (recorder *recorderImpl) Eventf(object runtime.Object, eventtype, reason, messageFmt string, args ...interface{}) {
+ recorder.Event(object, eventtype, reason, fmt.Sprintf(messageFmt, args...))
+}
+
+func (recorder *recorderImpl) PastEventf(object runtime.Object, timestamp metav1.Time, eventtype, reason, messageFmt string, args ...interface{}) {
+ recorder.generateEvent(object, timestamp, eventtype, reason, fmt.Sprintf(messageFmt, args...))
+}
+
+func (recorder *recorderImpl) makeEvent(ref *v1.ObjectReference, eventtype, reason, message string) *v1.Event {
+ t := metav1.Time{Time: recorder.clock.Now()}
+ namespace := ref.Namespace
+ if namespace == "" {
+ namespace = metav1.NamespaceDefault
+ }
+ return &v1.Event{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: fmt.Sprintf("%v.%x", ref.Name, t.UnixNano()),
+ Namespace: namespace,
+ },
+ InvolvedObject: *ref,
+ Reason: reason,
+ Message: message,
+ FirstTimestamp: t,
+ LastTimestamp: t,
+ Count: 1,
+ Type: eventtype,
+ }
+}
diff --git a/vendor/k8s.io/client-go/tools/record/events_cache.go b/vendor/k8s.io/client-go/tools/record/events_cache.go
new file mode 100644
index 000000000..785ec6477
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/record/events_cache.go
@@ -0,0 +1,377 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package record
+
+import (
+ "encoding/json"
+ "fmt"
+ "strings"
+ "sync"
+ "time"
+
+ "github.com/golang/groupcache/lru"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/util/clock"
+ "k8s.io/apimachinery/pkg/util/sets"
+ "k8s.io/apimachinery/pkg/util/strategicpatch"
+ "k8s.io/client-go/pkg/api/v1"
+)
+
+const (
+ maxLruCacheEntries = 4096
+
+ // if we see the same event that varies only by message
+ // more than 10 times in a 10 minute period, aggregate the event
+ defaultAggregateMaxEvents = 10
+ defaultAggregateIntervalInSeconds = 600
+)
+
+// getEventKey builds unique event key based on source, involvedObject, reason, message
+func getEventKey(event *v1.Event) string {
+ return strings.Join([]string{
+ event.Source.Component,
+ event.Source.Host,
+ event.InvolvedObject.Kind,
+ event.InvolvedObject.Namespace,
+ event.InvolvedObject.Name,
+ event.InvolvedObject.FieldPath,
+ string(event.InvolvedObject.UID),
+ event.InvolvedObject.APIVersion,
+ event.Type,
+ event.Reason,
+ event.Message,
+ },
+ "")
+}
+
+// EventFilterFunc is a function that returns true if the event should be skipped
+type EventFilterFunc func(event *v1.Event) bool
+
+// DefaultEventFilterFunc returns false for all incoming events
+func DefaultEventFilterFunc(event *v1.Event) bool {
+ return false
+}
+
+// EventAggregatorKeyFunc is responsible for grouping events for aggregation
+// It returns a tuple of the following:
+// aggregateKey - key the identifies the aggregate group to bucket this event
+// localKey - key that makes this event in the local group
+type EventAggregatorKeyFunc func(event *v1.Event) (aggregateKey string, localKey string)
+
+// EventAggregatorByReasonFunc aggregates events by exact match on event.Source, event.InvolvedObject, event.Type and event.Reason
+func EventAggregatorByReasonFunc(event *v1.Event) (string, string) {
+ return strings.Join([]string{
+ event.Source.Component,
+ event.Source.Host,
+ event.InvolvedObject.Kind,
+ event.InvolvedObject.Namespace,
+ event.InvolvedObject.Name,
+ string(event.InvolvedObject.UID),
+ event.InvolvedObject.APIVersion,
+ event.Type,
+ event.Reason,
+ },
+ ""), event.Message
+}
+
+// EventAggregatorMessageFunc is responsible for producing an aggregation message
+type EventAggregatorMessageFunc func(event *v1.Event) string
+
+// EventAggregratorByReasonMessageFunc returns an aggregate message by prefixing the incoming message
+func EventAggregatorByReasonMessageFunc(event *v1.Event) string {
+ return "(combined from similar events): " + event.Message
+}
+
+// EventAggregator identifies similar events and aggregates them into a single event
+type EventAggregator struct {
+ sync.RWMutex
+
+ // The cache that manages aggregation state
+ cache *lru.Cache
+
+ // The function that groups events for aggregation
+ keyFunc EventAggregatorKeyFunc
+
+ // The function that generates a message for an aggregate event
+ messageFunc EventAggregatorMessageFunc
+
+ // The maximum number of events in the specified interval before aggregation occurs
+ maxEvents uint
+
+ // The amount of time in seconds that must transpire since the last occurrence of a similar event before it's considered new
+ maxIntervalInSeconds uint
+
+ // clock is used to allow for testing over a time interval
+ clock clock.Clock
+}
+
+// NewEventAggregator returns a new instance of an EventAggregator
+func NewEventAggregator(lruCacheSize int, keyFunc EventAggregatorKeyFunc, messageFunc EventAggregatorMessageFunc,
+ maxEvents int, maxIntervalInSeconds int, clock clock.Clock) *EventAggregator {
+ return &EventAggregator{
+ cache: lru.New(lruCacheSize),
+ keyFunc: keyFunc,
+ messageFunc: messageFunc,
+ maxEvents: uint(maxEvents),
+ maxIntervalInSeconds: uint(maxIntervalInSeconds),
+ clock: clock,
+ }
+}
+
+// aggregateRecord holds data used to perform aggregation decisions
+type aggregateRecord struct {
+ // we track the number of unique local keys we have seen in the aggregate set to know when to actually aggregate
+ // if the size of this set exceeds the max, we know we need to aggregate
+ localKeys sets.String
+ // The last time at which the aggregate was recorded
+ lastTimestamp metav1.Time
+}
+
+// EventAggregate checks if a similar event has been seen according to the
+// aggregation configuration (max events, max interval, etc) and returns:
+//
+// - The (potentially modified) event that should be created
+// - The cache key for the event, for correlation purposes. This will be set to
+// the full key for normal events, and to the result of
+// EventAggregatorMessageFunc for aggregate events.
+func (e *EventAggregator) EventAggregate(newEvent *v1.Event) (*v1.Event, string) {
+ now := metav1.NewTime(e.clock.Now())
+ var record aggregateRecord
+ // eventKey is the full cache key for this event
+ eventKey := getEventKey(newEvent)
+ // aggregateKey is for the aggregate event, if one is needed.
+ aggregateKey, localKey := e.keyFunc(newEvent)
+
+ // Do we have a record of similar events in our cache?
+ e.Lock()
+ defer e.Unlock()
+ value, found := e.cache.Get(aggregateKey)
+ if found {
+ record = value.(aggregateRecord)
+ }
+
+ // Is the previous record too old? If so, make a fresh one. Note: if we didn't
+ // find a similar record, its lastTimestamp will be the zero value, so we
+ // create a new one in that case.
+ maxInterval := time.Duration(e.maxIntervalInSeconds) * time.Second
+ interval := now.Time.Sub(record.lastTimestamp.Time)
+ if interval > maxInterval {
+ record = aggregateRecord{localKeys: sets.NewString()}
+ }
+
+ // Write the new event into the aggregation record and put it on the cache
+ record.localKeys.Insert(localKey)
+ record.lastTimestamp = now
+ e.cache.Add(aggregateKey, record)
+
+ // If we are not yet over the threshold for unique events, don't correlate them
+ if uint(record.localKeys.Len()) < e.maxEvents {
+ return newEvent, eventKey
+ }
+
+ // do not grow our local key set any larger than max
+ record.localKeys.PopAny()
+
+ // create a new aggregate event, and return the aggregateKey as the cache key
+ // (so that it can be overwritten.)
+ eventCopy := &v1.Event{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: fmt.Sprintf("%v.%x", newEvent.InvolvedObject.Name, now.UnixNano()),
+ Namespace: newEvent.Namespace,
+ },
+ Count: 1,
+ FirstTimestamp: now,
+ InvolvedObject: newEvent.InvolvedObject,
+ LastTimestamp: now,
+ Message: e.messageFunc(newEvent),
+ Type: newEvent.Type,
+ Reason: newEvent.Reason,
+ Source: newEvent.Source,
+ }
+ return eventCopy, aggregateKey
+}
+
+// eventLog records data about when an event was observed
+type eventLog struct {
+ // The number of times the event has occurred since first occurrence.
+ count uint
+
+ // The time at which the event was first recorded.
+ firstTimestamp metav1.Time
+
+ // The unique name of the first occurrence of this event
+ name string
+
+ // Resource version returned from previous interaction with server
+ resourceVersion string
+}
+
+// eventLogger logs occurrences of an event
+type eventLogger struct {
+ sync.RWMutex
+ cache *lru.Cache
+ clock clock.Clock
+}
+
+// newEventLogger observes events and counts their frequencies
+func newEventLogger(lruCacheEntries int, clock clock.Clock) *eventLogger {
+ return &eventLogger{cache: lru.New(lruCacheEntries), clock: clock}
+}
+
+// eventObserve records an event, or updates an existing one if key is a cache hit
+func (e *eventLogger) eventObserve(newEvent *v1.Event, key string) (*v1.Event, []byte, error) {
+ var (
+ patch []byte
+ err error
+ )
+ eventCopy := *newEvent
+ event := &eventCopy
+
+ e.Lock()
+ defer e.Unlock()
+
+ // Check if there is an existing event we should update
+ lastObservation := e.lastEventObservationFromCache(key)
+
+ // If we found a result, prepare a patch
+ if lastObservation.count > 0 {
+ // update the event based on the last observation so patch will work as desired
+ event.Name = lastObservation.name
+ event.ResourceVersion = lastObservation.resourceVersion
+ event.FirstTimestamp = lastObservation.firstTimestamp
+ event.Count = int32(lastObservation.count) + 1
+
+ eventCopy2 := *event
+ eventCopy2.Count = 0
+ eventCopy2.LastTimestamp = metav1.NewTime(time.Unix(0, 0))
+ eventCopy2.Message = ""
+
+ newData, _ := json.Marshal(event)
+ oldData, _ := json.Marshal(eventCopy2)
+ patch, err = strategicpatch.CreateTwoWayMergePatch(oldData, newData, event)
+ }
+
+ // record our new observation
+ e.cache.Add(
+ key,
+ eventLog{
+ count: uint(event.Count),
+ firstTimestamp: event.FirstTimestamp,
+ name: event.Name,
+ resourceVersion: event.ResourceVersion,
+ },
+ )
+ return event, patch, err
+}
+
+// updateState updates its internal tracking information based on latest server state
+func (e *eventLogger) updateState(event *v1.Event) {
+ key := getEventKey(event)
+ e.Lock()
+ defer e.Unlock()
+ // record our new observation
+ e.cache.Add(
+ key,
+ eventLog{
+ count: uint(event.Count),
+ firstTimestamp: event.FirstTimestamp,
+ name: event.Name,
+ resourceVersion: event.ResourceVersion,
+ },
+ )
+}
+
+// lastEventObservationFromCache returns the event from the cache, reads must be protected via external lock
+func (e *eventLogger) lastEventObservationFromCache(key string) eventLog {
+ value, ok := e.cache.Get(key)
+ if ok {
+ observationValue, ok := value.(eventLog)
+ if ok {
+ return observationValue
+ }
+ }
+ return eventLog{}
+}
+
+// EventCorrelator processes all incoming events and performs analysis to avoid overwhelming the system. It can filter all
+// incoming events to see if the event should be filtered from further processing. It can aggregate similar events that occur
+// frequently to protect the system from spamming events that are difficult for users to distinguish. It performs de-duplication
+// to ensure events that are observed multiple times are compacted into a single event with increasing counts.
+type EventCorrelator struct {
+ // the function to filter the event
+ filterFunc EventFilterFunc
+ // the object that performs event aggregation
+ aggregator *EventAggregator
+ // the object that observes events as they come through
+ logger *eventLogger
+}
+
+// EventCorrelateResult is the result of a Correlate
+type EventCorrelateResult struct {
+ // the event after correlation
+ Event *v1.Event
+ // if provided, perform a strategic patch when updating the record on the server
+ Patch []byte
+ // if true, do no further processing of the event
+ Skip bool
+}
+
+// NewEventCorrelator returns an EventCorrelator configured with default values.
+//
+// The EventCorrelator is responsible for event filtering, aggregating, and counting
+// prior to interacting with the API server to record the event.
+//
+// The default behavior is as follows:
+// * No events are filtered from being recorded
+// * Aggregation is performed if a similar event is recorded 10 times in a
+// in a 10 minute rolling interval. A similar event is an event that varies only by
+// the Event.Message field. Rather than recording the precise event, aggregation
+// will create a new event whose message reports that it has combined events with
+// the same reason.
+// * Events are incrementally counted if the exact same event is encountered multiple
+// times.
+func NewEventCorrelator(clock clock.Clock) *EventCorrelator {
+ cacheSize := maxLruCacheEntries
+ return &EventCorrelator{
+ filterFunc: DefaultEventFilterFunc,
+ aggregator: NewEventAggregator(
+ cacheSize,
+ EventAggregatorByReasonFunc,
+ EventAggregatorByReasonMessageFunc,
+ defaultAggregateMaxEvents,
+ defaultAggregateIntervalInSeconds,
+ clock),
+
+ logger: newEventLogger(cacheSize, clock),
+ }
+}
+
+// EventCorrelate filters, aggregates, counts, and de-duplicates all incoming events
+func (c *EventCorrelator) EventCorrelate(newEvent *v1.Event) (*EventCorrelateResult, error) {
+ if c.filterFunc(newEvent) {
+ return &EventCorrelateResult{Skip: true}, nil
+ }
+ aggregateEvent, ckey := c.aggregator.EventAggregate(newEvent)
+ observedEvent, patch, err := c.logger.eventObserve(aggregateEvent, ckey)
+ return &EventCorrelateResult{Event: observedEvent, Patch: patch}, err
+}
+
+// UpdateState based on the latest observed state from server
+func (c *EventCorrelator) UpdateState(event *v1.Event) {
+ c.logger.updateState(event)
+}
diff --git a/vendor/k8s.io/client-go/tools/record/fake.go b/vendor/k8s.io/client-go/tools/record/fake.go
new file mode 100644
index 000000000..c0e8eedbb
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/record/fake.go
@@ -0,0 +1,54 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package record
+
+import (
+ "fmt"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+// FakeRecorder is used as a fake during tests. It is thread safe. It is usable
+// when created manually and not by NewFakeRecorder, however all events may be
+// thrown away in this case.
+type FakeRecorder struct {
+ Events chan string
+}
+
+func (f *FakeRecorder) Event(object runtime.Object, eventtype, reason, message string) {
+ if f.Events != nil {
+ f.Events <- fmt.Sprintf("%s %s %s", eventtype, reason, message)
+ }
+}
+
+func (f *FakeRecorder) Eventf(object runtime.Object, eventtype, reason, messageFmt string, args ...interface{}) {
+ if f.Events != nil {
+ f.Events <- fmt.Sprintf(eventtype+" "+reason+" "+messageFmt, args...)
+ }
+}
+
+func (f *FakeRecorder) PastEventf(object runtime.Object, timestamp metav1.Time, eventtype, reason, messageFmt string, args ...interface{}) {
+}
+
+// NewFakeRecorder creates new fake event recorder with event channel with
+// buffer of given size.
+func NewFakeRecorder(bufferSize int) *FakeRecorder {
+ return &FakeRecorder{
+ Events: make(chan string, bufferSize),
+ }
+}
diff --git a/vendor/k8s.io/client-go/tools/remotecommand/doc.go b/vendor/k8s.io/client-go/tools/remotecommand/doc.go
new file mode 100644
index 000000000..ac06a9cd3
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/remotecommand/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package remotecommand adds support for executing commands in containers,
+// with support for separate stdin, stdout, and stderr streams, as well as
+// TTY.
+package remotecommand // import "k8s.io/client-go/tools/remotecommand"
diff --git a/vendor/k8s.io/client-go/tools/remotecommand/errorstream.go b/vendor/k8s.io/client-go/tools/remotecommand/errorstream.go
new file mode 100644
index 000000000..360276b65
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/remotecommand/errorstream.go
@@ -0,0 +1,55 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package remotecommand
+
+import (
+ "fmt"
+ "io"
+ "io/ioutil"
+
+ "k8s.io/apimachinery/pkg/util/runtime"
+)
+
+// errorStreamDecoder interprets the data on the error channel and creates a go error object from it.
+type errorStreamDecoder interface {
+ decode(message []byte) error
+}
+
+// watchErrorStream watches the errorStream for remote command error data,
+// decodes it with the given errorStreamDecoder, sends the decoded error (or nil if the remote
+// command exited successfully) to the returned error channel, and closes it.
+// This function returns immediately.
+func watchErrorStream(errorStream io.Reader, d errorStreamDecoder) chan error {
+ errorChan := make(chan error)
+
+ go func() {
+ defer runtime.HandleCrash()
+
+ message, err := ioutil.ReadAll(errorStream)
+ switch {
+ case err != nil && err != io.EOF:
+ errorChan <- fmt.Errorf("error reading from error stream: %s", err)
+ case len(message) > 0:
+ errorChan <- d.decode(message)
+ default:
+ errorChan <- nil
+ }
+ close(errorChan)
+ }()
+
+ return errorChan
+}
diff --git a/vendor/k8s.io/client-go/tools/remotecommand/remotecommand.go b/vendor/k8s.io/client-go/tools/remotecommand/remotecommand.go
new file mode 100644
index 000000000..a90fab1fe
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/remotecommand/remotecommand.go
@@ -0,0 +1,178 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package remotecommand
+
+import (
+ "fmt"
+ "io"
+ "net/http"
+ "net/url"
+
+ "github.com/golang/glog"
+
+ "k8s.io/apimachinery/pkg/util/httpstream"
+ "k8s.io/apimachinery/pkg/util/httpstream/spdy"
+ "k8s.io/apimachinery/pkg/util/remotecommand"
+ restclient "k8s.io/client-go/rest"
+ "k8s.io/client-go/transport"
+)
+
+// StreamOptions holds information pertaining to the current streaming session: supported stream
+// protocols, input/output streams, if the client is requesting a TTY, and a terminal size queue to
+// support terminal resizing.
+type StreamOptions struct {
+ SupportedProtocols []string
+ Stdin io.Reader
+ Stdout io.Writer
+ Stderr io.Writer
+ Tty bool
+ TerminalSizeQueue TerminalSizeQueue
+}
+
+// Executor is an interface for transporting shell-style streams.
+type Executor interface {
+ // Stream initiates the transport of the standard shell streams. It will transport any
+ // non-nil stream to a remote system, and return an error if a problem occurs. If tty
+ // is set, the stderr stream is not used (raw TTY manages stdout and stderr over the
+ // stdout stream).
+ Stream(options StreamOptions) error
+}
+
+// StreamExecutor supports the ability to dial an httpstream connection and the ability to
+// run a command line stream protocol over that dialer.
+type StreamExecutor interface {
+ Executor
+ httpstream.Dialer
+}
+
+// streamExecutor handles transporting standard shell streams over an httpstream connection.
+type streamExecutor struct {
+ upgrader httpstream.UpgradeRoundTripper
+ transport http.RoundTripper
+
+ method string
+ url *url.URL
+}
+
+// NewExecutor connects to the provided server and upgrades the connection to
+// multiplexed bidirectional streams. The current implementation uses SPDY,
+// but this could be replaced with HTTP/2 once it's available, or something else.
+// TODO: the common code between this and portforward could be abstracted.
+func NewExecutor(config *restclient.Config, method string, url *url.URL) (StreamExecutor, error) {
+ tlsConfig, err := restclient.TLSConfigFor(config)
+ if err != nil {
+ return nil, err
+ }
+
+ upgradeRoundTripper := spdy.NewRoundTripper(tlsConfig, true)
+ wrapper, err := restclient.HTTPWrappersForConfig(config, upgradeRoundTripper)
+ if err != nil {
+ return nil, err
+ }
+
+ return &streamExecutor{
+ upgrader: upgradeRoundTripper,
+ transport: wrapper,
+ method: method,
+ url: url,
+ }, nil
+}
+
+// NewStreamExecutor upgrades the request so that it supports multiplexed bidirectional
+// streams. This method takes a stream upgrader and an optional function that is invoked
+// to wrap the round tripper. This method may be used by clients that are lower level than
+// Kubernetes clients or need to provide their own upgrade round tripper.
+func NewStreamExecutor(upgrader httpstream.UpgradeRoundTripper, fn func(http.RoundTripper) http.RoundTripper, method string, url *url.URL) (StreamExecutor, error) {
+ rt := http.RoundTripper(upgrader)
+ if fn != nil {
+ rt = fn(rt)
+ }
+ return &streamExecutor{
+ upgrader: upgrader,
+ transport: rt,
+ method: method,
+ url: url,
+ }, nil
+}
+
+// Dial opens a connection to a remote server and attempts to negotiate a SPDY
+// connection. Upon success, it returns the connection and the protocol
+// selected by the server.
+func (e *streamExecutor) Dial(protocols ...string) (httpstream.Connection, string, error) {
+ rt := transport.DebugWrappers(e.transport)
+
+ // TODO the client probably shouldn't be created here, as it doesn't allow
+ // flexibility to allow callers to configure it.
+ client := &http.Client{Transport: rt}
+
+ req, err := http.NewRequest(e.method, e.url.String(), nil)
+ if err != nil {
+ return nil, "", fmt.Errorf("error creating request: %v", err)
+ }
+ for i := range protocols {
+ req.Header.Add(httpstream.HeaderProtocolVersion, protocols[i])
+ }
+
+ resp, err := client.Do(req)
+ if err != nil {
+ return nil, "", fmt.Errorf("error sending request: %v", err)
+ }
+ defer resp.Body.Close()
+
+ conn, err := e.upgrader.NewConnection(resp)
+ if err != nil {
+ return nil, "", err
+ }
+
+ return conn, resp.Header.Get(httpstream.HeaderProtocolVersion), nil
+}
+
+type streamCreator interface {
+ CreateStream(headers http.Header) (httpstream.Stream, error)
+}
+
+type streamProtocolHandler interface {
+ stream(conn streamCreator) error
+}
+
+// Stream opens a protocol streamer to the server and streams until a client closes
+// the connection or the server disconnects.
+func (e *streamExecutor) Stream(options StreamOptions) error {
+ conn, protocol, err := e.Dial(options.SupportedProtocols...)
+ if err != nil {
+ return err
+ }
+ defer conn.Close()
+
+ var streamer streamProtocolHandler
+
+ switch protocol {
+ case remotecommand.StreamProtocolV4Name:
+ streamer = newStreamProtocolV4(options)
+ case remotecommand.StreamProtocolV3Name:
+ streamer = newStreamProtocolV3(options)
+ case remotecommand.StreamProtocolV2Name:
+ streamer = newStreamProtocolV2(options)
+ case "":
+ glog.V(4).Infof("The server did not negotiate a streaming protocol version. Falling back to %s", remotecommand.StreamProtocolV1Name)
+ fallthrough
+ case remotecommand.StreamProtocolV1Name:
+ streamer = newStreamProtocolV1(options)
+ }
+
+ return streamer.stream(conn)
+}
diff --git a/vendor/k8s.io/client-go/tools/remotecommand/resize.go b/vendor/k8s.io/client-go/tools/remotecommand/resize.go
new file mode 100644
index 000000000..c838f21ba
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/remotecommand/resize.go
@@ -0,0 +1,33 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package remotecommand
+
+// TerminalSize and TerminalSizeQueue was a part of k8s.io/kubernetes/pkg/util/term
+// and were moved in order to decouple client from other term dependencies
+
+// TerminalSize represents the width and height of a terminal.
+type TerminalSize struct {
+ Width uint16
+ Height uint16
+}
+
+// TerminalSizeQueue is capable of returning terminal resize events as they occur.
+type TerminalSizeQueue interface {
+ // Next returns the new terminal size after the terminal has been resized. It returns nil when
+ // monitoring has been stopped.
+ Next() *TerminalSize
+}
diff --git a/vendor/k8s.io/client-go/tools/remotecommand/v1.go b/vendor/k8s.io/client-go/tools/remotecommand/v1.go
new file mode 100644
index 000000000..1db917c0b
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/remotecommand/v1.go
@@ -0,0 +1,160 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package remotecommand
+
+import (
+ "fmt"
+ "io"
+ "io/ioutil"
+ "net/http"
+
+ "github.com/golang/glog"
+ "k8s.io/apimachinery/pkg/util/httpstream"
+ "k8s.io/client-go/pkg/api/v1"
+)
+
+// streamProtocolV1 implements the first version of the streaming exec & attach
+// protocol. This version has some bugs, such as not being able to detect when
+// non-interactive stdin data has ended. See http://issues.k8s.io/13394 and
+// http://issues.k8s.io/13395 for more details.
+type streamProtocolV1 struct {
+ StreamOptions
+
+ errorStream httpstream.Stream
+ remoteStdin httpstream.Stream
+ remoteStdout httpstream.Stream
+ remoteStderr httpstream.Stream
+}
+
+var _ streamProtocolHandler = &streamProtocolV1{}
+
+func newStreamProtocolV1(options StreamOptions) streamProtocolHandler {
+ return &streamProtocolV1{
+ StreamOptions: options,
+ }
+}
+
+func (p *streamProtocolV1) stream(conn streamCreator) error {
+ doneChan := make(chan struct{}, 2)
+ errorChan := make(chan error)
+
+ cp := func(s string, dst io.Writer, src io.Reader) {
+ glog.V(6).Infof("Copying %s", s)
+ defer glog.V(6).Infof("Done copying %s", s)
+ if _, err := io.Copy(dst, src); err != nil && err != io.EOF {
+ glog.Errorf("Error copying %s: %v", s, err)
+ }
+ if s == v1.StreamTypeStdout || s == v1.StreamTypeStderr {
+ doneChan <- struct{}{}
+ }
+ }
+
+ // set up all the streams first
+ var err error
+ headers := http.Header{}
+ headers.Set(v1.StreamType, v1.StreamTypeError)
+ p.errorStream, err = conn.CreateStream(headers)
+ if err != nil {
+ return err
+ }
+ defer p.errorStream.Reset()
+
+ // Create all the streams first, then start the copy goroutines. The server doesn't start its copy
+ // goroutines until it's received all of the streams. If the client creates the stdin stream and
+ // immediately begins copying stdin data to the server, it's possible to overwhelm and wedge the
+ // spdy frame handler in the server so that it is full of unprocessed frames. The frames aren't
+ // getting processed because the server hasn't started its copying, and it won't do that until it
+ // gets all the streams. By creating all the streams first, we ensure that the server is ready to
+ // process data before the client starts sending any. See https://issues.k8s.io/16373 for more info.
+ if p.Stdin != nil {
+ headers.Set(v1.StreamType, v1.StreamTypeStdin)
+ p.remoteStdin, err = conn.CreateStream(headers)
+ if err != nil {
+ return err
+ }
+ defer p.remoteStdin.Reset()
+ }
+
+ if p.Stdout != nil {
+ headers.Set(v1.StreamType, v1.StreamTypeStdout)
+ p.remoteStdout, err = conn.CreateStream(headers)
+ if err != nil {
+ return err
+ }
+ defer p.remoteStdout.Reset()
+ }
+
+ if p.Stderr != nil && !p.Tty {
+ headers.Set(v1.StreamType, v1.StreamTypeStderr)
+ p.remoteStderr, err = conn.CreateStream(headers)
+ if err != nil {
+ return err
+ }
+ defer p.remoteStderr.Reset()
+ }
+
+ // now that all the streams have been created, proceed with reading & copying
+
+ // always read from errorStream
+ go func() {
+ message, err := ioutil.ReadAll(p.errorStream)
+ if err != nil && err != io.EOF {
+ errorChan <- fmt.Errorf("Error reading from error stream: %s", err)
+ return
+ }
+ if len(message) > 0 {
+ errorChan <- fmt.Errorf("Error executing remote command: %s", message)
+ return
+ }
+ }()
+
+ if p.Stdin != nil {
+ // TODO this goroutine will never exit cleanly (the io.Copy never unblocks)
+ // because stdin is not closed until the process exits. If we try to call
+ // stdin.Close(), it returns no error but doesn't unblock the copy. It will
+ // exit when the process exits, instead.
+ go cp(v1.StreamTypeStdin, p.remoteStdin, p.Stdin)
+ }
+
+ waitCount := 0
+ completedStreams := 0
+
+ if p.Stdout != nil {
+ waitCount++
+ go cp(v1.StreamTypeStdout, p.Stdout, p.remoteStdout)
+ }
+
+ if p.Stderr != nil && !p.Tty {
+ waitCount++
+ go cp(v1.StreamTypeStderr, p.Stderr, p.remoteStderr)
+ }
+
+Loop:
+ for {
+ select {
+ case <-doneChan:
+ completedStreams++
+ if completedStreams == waitCount {
+ break Loop
+ }
+ case err := <-errorChan:
+ return err
+ }
+ }
+
+ return nil
+}
diff --git a/vendor/k8s.io/client-go/tools/remotecommand/v2.go b/vendor/k8s.io/client-go/tools/remotecommand/v2.go
new file mode 100644
index 000000000..95346a439
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/remotecommand/v2.go
@@ -0,0 +1,195 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package remotecommand
+
+import (
+ "fmt"
+ "io"
+ "io/ioutil"
+ "net/http"
+ "sync"
+
+ "k8s.io/apimachinery/pkg/util/runtime"
+ "k8s.io/client-go/pkg/api/v1"
+)
+
+// streamProtocolV2 implements version 2 of the streaming protocol for attach
+// and exec. The original streaming protocol was metav1. As a result, this
+// version is referred to as version 2, even though it is the first actual
+// numbered version.
+type streamProtocolV2 struct {
+ StreamOptions
+
+ errorStream io.Reader
+ remoteStdin io.ReadWriteCloser
+ remoteStdout io.Reader
+ remoteStderr io.Reader
+}
+
+var _ streamProtocolHandler = &streamProtocolV2{}
+
+func newStreamProtocolV2(options StreamOptions) streamProtocolHandler {
+ return &streamProtocolV2{
+ StreamOptions: options,
+ }
+}
+
+func (p *streamProtocolV2) createStreams(conn streamCreator) error {
+ var err error
+ headers := http.Header{}
+
+ // set up error stream
+ headers.Set(v1.StreamType, v1.StreamTypeError)
+ p.errorStream, err = conn.CreateStream(headers)
+ if err != nil {
+ return err
+ }
+
+ // set up stdin stream
+ if p.Stdin != nil {
+ headers.Set(v1.StreamType, v1.StreamTypeStdin)
+ p.remoteStdin, err = conn.CreateStream(headers)
+ if err != nil {
+ return err
+ }
+ }
+
+ // set up stdout stream
+ if p.Stdout != nil {
+ headers.Set(v1.StreamType, v1.StreamTypeStdout)
+ p.remoteStdout, err = conn.CreateStream(headers)
+ if err != nil {
+ return err
+ }
+ }
+
+ // set up stderr stream
+ if p.Stderr != nil && !p.Tty {
+ headers.Set(v1.StreamType, v1.StreamTypeStderr)
+ p.remoteStderr, err = conn.CreateStream(headers)
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func (p *streamProtocolV2) copyStdin() {
+ if p.Stdin != nil {
+ var once sync.Once
+
+ // copy from client's stdin to container's stdin
+ go func() {
+ defer runtime.HandleCrash()
+
+ // if p.stdin is noninteractive, p.g. `echo abc | kubectl exec -i <pod> -- cat`, make sure
+ // we close remoteStdin as soon as the copy from p.stdin to remoteStdin finishes. Otherwise
+ // the executed command will remain running.
+ defer once.Do(func() { p.remoteStdin.Close() })
+
+ if _, err := io.Copy(p.remoteStdin, p.Stdin); err != nil {
+ runtime.HandleError(err)
+ }
+ }()
+
+ // read from remoteStdin until the stream is closed. this is essential to
+ // be able to exit interactive sessions cleanly and not leak goroutines or
+ // hang the client's terminal.
+ //
+ // TODO we aren't using go-dockerclient any more; revisit this to determine if it's still
+ // required by engine-api.
+ //
+ // go-dockerclient's current hijack implementation
+ // (https://github.com/fsouza/go-dockerclient/blob/89f3d56d93788dfe85f864a44f85d9738fca0670/client.go#L564)
+ // waits for all three streams (stdin/stdout/stderr) to finish copying
+ // before returning. When hijack finishes copying stdout/stderr, it calls
+ // Close() on its side of remoteStdin, which allows this copy to complete.
+ // When that happens, we must Close() on our side of remoteStdin, to
+ // allow the copy in hijack to complete, and hijack to return.
+ go func() {
+ defer runtime.HandleCrash()
+ defer once.Do(func() { p.remoteStdin.Close() })
+
+ // this "copy" doesn't actually read anything - it's just here to wait for
+ // the server to close remoteStdin.
+ if _, err := io.Copy(ioutil.Discard, p.remoteStdin); err != nil {
+ runtime.HandleError(err)
+ }
+ }()
+ }
+}
+
+func (p *streamProtocolV2) copyStdout(wg *sync.WaitGroup) {
+ if p.Stdout == nil {
+ return
+ }
+
+ wg.Add(1)
+ go func() {
+ defer runtime.HandleCrash()
+ defer wg.Done()
+
+ if _, err := io.Copy(p.Stdout, p.remoteStdout); err != nil {
+ runtime.HandleError(err)
+ }
+ }()
+}
+
+func (p *streamProtocolV2) copyStderr(wg *sync.WaitGroup) {
+ if p.Stderr == nil || p.Tty {
+ return
+ }
+
+ wg.Add(1)
+ go func() {
+ defer runtime.HandleCrash()
+ defer wg.Done()
+
+ if _, err := io.Copy(p.Stderr, p.remoteStderr); err != nil {
+ runtime.HandleError(err)
+ }
+ }()
+}
+
+func (p *streamProtocolV2) stream(conn streamCreator) error {
+ if err := p.createStreams(conn); err != nil {
+ return err
+ }
+
+ // now that all the streams have been created, proceed with reading & copying
+
+ errorChan := watchErrorStream(p.errorStream, &errorDecoderV2{})
+
+ p.copyStdin()
+
+ var wg sync.WaitGroup
+ p.copyStdout(&wg)
+ p.copyStderr(&wg)
+
+ // we're waiting for stdout/stderr to finish copying
+ wg.Wait()
+
+ // waits for errorStream to finish reading with an error or nil
+ return <-errorChan
+}
+
+// errorDecoderV2 interprets the error channel data as plain text.
+type errorDecoderV2 struct{}
+
+func (d *errorDecoderV2) decode(message []byte) error {
+ return fmt.Errorf("error executing remote command: %s", message)
+}
diff --git a/vendor/k8s.io/client-go/tools/remotecommand/v3.go b/vendor/k8s.io/client-go/tools/remotecommand/v3.go
new file mode 100644
index 000000000..03b9e2a68
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/remotecommand/v3.go
@@ -0,0 +1,111 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package remotecommand
+
+import (
+ "encoding/json"
+ "io"
+ "net/http"
+ "sync"
+
+ "k8s.io/apimachinery/pkg/util/runtime"
+ "k8s.io/client-go/pkg/api/v1"
+)
+
+// streamProtocolV3 implements version 3 of the streaming protocol for attach
+// and exec. This version adds support for resizing the container's terminal.
+type streamProtocolV3 struct {
+ *streamProtocolV2
+
+ resizeStream io.Writer
+}
+
+var _ streamProtocolHandler = &streamProtocolV3{}
+
+func newStreamProtocolV3(options StreamOptions) streamProtocolHandler {
+ return &streamProtocolV3{
+ streamProtocolV2: newStreamProtocolV2(options).(*streamProtocolV2),
+ }
+}
+
+func (p *streamProtocolV3) createStreams(conn streamCreator) error {
+ // set up the streams from v2
+ if err := p.streamProtocolV2.createStreams(conn); err != nil {
+ return err
+ }
+
+ // set up resize stream
+ if p.Tty {
+ headers := http.Header{}
+ headers.Set(v1.StreamType, v1.StreamTypeResize)
+ var err error
+ p.resizeStream, err = conn.CreateStream(headers)
+ if err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (p *streamProtocolV3) handleResizes() {
+ if p.resizeStream == nil || p.TerminalSizeQueue == nil {
+ return
+ }
+ go func() {
+ defer runtime.HandleCrash()
+
+ encoder := json.NewEncoder(p.resizeStream)
+ for {
+ size := p.TerminalSizeQueue.Next()
+ if size == nil {
+ return
+ }
+ if err := encoder.Encode(&size); err != nil {
+ runtime.HandleError(err)
+ }
+ }
+ }()
+}
+
+func (p *streamProtocolV3) stream(conn streamCreator) error {
+ if err := p.createStreams(conn); err != nil {
+ return err
+ }
+
+ // now that all the streams have been created, proceed with reading & copying
+
+ errorChan := watchErrorStream(p.errorStream, &errorDecoderV3{})
+
+ p.handleResizes()
+
+ p.copyStdin()
+
+ var wg sync.WaitGroup
+ p.copyStdout(&wg)
+ p.copyStderr(&wg)
+
+ // we're waiting for stdout/stderr to finish copying
+ wg.Wait()
+
+ // waits for errorStream to finish reading with an error or nil
+ return <-errorChan
+}
+
+type errorDecoderV3 struct {
+ errorDecoderV2
+}
diff --git a/vendor/k8s.io/client-go/tools/remotecommand/v4.go b/vendor/k8s.io/client-go/tools/remotecommand/v4.go
new file mode 100644
index 000000000..69ca934a0
--- /dev/null
+++ b/vendor/k8s.io/client-go/tools/remotecommand/v4.go
@@ -0,0 +1,119 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package remotecommand
+
+import (
+ "encoding/json"
+ "errors"
+ "fmt"
+ "strconv"
+ "sync"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/util/remotecommand"
+ "k8s.io/client-go/util/exec"
+)
+
+// streamProtocolV4 implements version 4 of the streaming protocol for attach
+// and exec. This version adds support for exit codes on the error stream through
+// the use of metav1.Status instead of plain text messages.
+type streamProtocolV4 struct {
+ *streamProtocolV3
+}
+
+var _ streamProtocolHandler = &streamProtocolV4{}
+
+func newStreamProtocolV4(options StreamOptions) streamProtocolHandler {
+ return &streamProtocolV4{
+ streamProtocolV3: newStreamProtocolV3(options).(*streamProtocolV3),
+ }
+}
+
+func (p *streamProtocolV4) createStreams(conn streamCreator) error {
+ return p.streamProtocolV3.createStreams(conn)
+}
+
+func (p *streamProtocolV4) handleResizes() {
+ p.streamProtocolV3.handleResizes()
+}
+
+func (p *streamProtocolV4) stream(conn streamCreator) error {
+ if err := p.createStreams(conn); err != nil {
+ return err
+ }
+
+ // now that all the streams have been created, proceed with reading & copying
+
+ errorChan := watchErrorStream(p.errorStream, &errorDecoderV4{})
+
+ p.handleResizes()
+
+ p.copyStdin()
+
+ var wg sync.WaitGroup
+ p.copyStdout(&wg)
+ p.copyStderr(&wg)
+
+ // we're waiting for stdout/stderr to finish copying
+ wg.Wait()
+
+ // waits for errorStream to finish reading with an error or nil
+ return <-errorChan
+}
+
+// errorDecoderV4 interprets the json-marshaled metav1.Status on the error channel
+// and creates an exec.ExitError from it.
+type errorDecoderV4 struct{}
+
+func (d *errorDecoderV4) decode(message []byte) error {
+ status := metav1.Status{}
+ err := json.Unmarshal(message, &status)
+ if err != nil {
+ return fmt.Errorf("error stream protocol error: %v in %q", err, string(message))
+ }
+ switch status.Status {
+ case metav1.StatusSuccess:
+ return nil
+ case metav1.StatusFailure:
+ if status.Reason == remotecommand.NonZeroExitCodeReason {
+ if status.Details == nil {
+ return errors.New("error stream protocol error: details must be set")
+ }
+ for i := range status.Details.Causes {
+ c := &status.Details.Causes[i]
+ if c.Type != remotecommand.ExitCodeCauseType {
+ continue
+ }
+
+ rc, err := strconv.ParseUint(c.Message, 10, 8)
+ if err != nil {
+ return fmt.Errorf("error stream protocol error: invalid exit code value %q", c.Message)
+ }
+ return exec.CodeExitError{
+ Err: fmt.Errorf("command terminated with exit code %d", rc),
+ Code: int(rc),
+ }
+ }
+
+ return fmt.Errorf("error stream protocol error: no %s cause given", remotecommand.ExitCodeCauseType)
+ }
+ default:
+ return errors.New("error stream protocol error: unknown error")
+ }
+
+ return fmt.Errorf(status.Message)
+}
diff --git a/vendor/k8s.io/client-go/transport/cache.go b/vendor/k8s.io/client-go/transport/cache.go
new file mode 100644
index 000000000..8d76def34
--- /dev/null
+++ b/vendor/k8s.io/client-go/transport/cache.go
@@ -0,0 +1,88 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package transport
+
+import (
+ "fmt"
+ "net"
+ "net/http"
+ "sync"
+ "time"
+
+ utilnet "k8s.io/apimachinery/pkg/util/net"
+)
+
+// TlsTransportCache caches TLS http.RoundTrippers different configurations. The
+// same RoundTripper will be returned for configs with identical TLS options If
+// the config has no custom TLS options, http.DefaultTransport is returned.
+type tlsTransportCache struct {
+ mu sync.Mutex
+ transports map[string]*http.Transport
+}
+
+const idleConnsPerHost = 25
+
+var tlsCache = &tlsTransportCache{transports: make(map[string]*http.Transport)}
+
+func (c *tlsTransportCache) get(config *Config) (http.RoundTripper, error) {
+ key, err := tlsConfigKey(config)
+ if err != nil {
+ return nil, err
+ }
+
+ // Ensure we only create a single transport for the given TLS options
+ c.mu.Lock()
+ defer c.mu.Unlock()
+
+ // See if we already have a custom transport for this config
+ if t, ok := c.transports[key]; ok {
+ return t, nil
+ }
+
+ // Get the TLS options for this client config
+ tlsConfig, err := TLSConfigFor(config)
+ if err != nil {
+ return nil, err
+ }
+ // The options didn't require a custom TLS config
+ if tlsConfig == nil {
+ return http.DefaultTransport, nil
+ }
+
+ // Cache a single transport for these options
+ c.transports[key] = utilnet.SetTransportDefaults(&http.Transport{
+ Proxy: http.ProxyFromEnvironment,
+ TLSHandshakeTimeout: 10 * time.Second,
+ TLSClientConfig: tlsConfig,
+ MaxIdleConnsPerHost: idleConnsPerHost,
+ Dial: (&net.Dialer{
+ Timeout: 30 * time.Second,
+ KeepAlive: 30 * time.Second,
+ }).Dial,
+ })
+ return c.transports[key], nil
+}
+
+// tlsConfigKey returns a unique key for tls.Config objects returned from TLSConfigFor
+func tlsConfigKey(c *Config) (string, error) {
+ // Make sure ca/key/cert content is loaded
+ if err := loadTLSFiles(c); err != nil {
+ return "", err
+ }
+ // Only include the things that actually affect the tls.Config
+ return fmt.Sprintf("%v/%x/%x/%x", c.TLS.Insecure, c.TLS.CAData, c.TLS.CertData, c.TLS.KeyData), nil
+}
diff --git a/vendor/k8s.io/client-go/transport/config.go b/vendor/k8s.io/client-go/transport/config.go
new file mode 100644
index 000000000..820594ba3
--- /dev/null
+++ b/vendor/k8s.io/client-go/transport/config.go
@@ -0,0 +1,95 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package transport
+
+import "net/http"
+
+// Config holds various options for establishing a transport.
+type Config struct {
+ // UserAgent is an optional field that specifies the caller of this
+ // request.
+ UserAgent string
+
+ // The base TLS configuration for this transport.
+ TLS TLSConfig
+
+ // Username and password for basic authentication
+ Username string
+ Password string
+
+ // Bearer token for authentication
+ BearerToken string
+
+ // Impersonate is the config that this Config will impersonate using
+ Impersonate ImpersonationConfig
+
+ // Transport may be used for custom HTTP behavior. This attribute may
+ // not be specified with the TLS client certificate options. Use
+ // WrapTransport for most client level operations.
+ Transport http.RoundTripper
+
+ // WrapTransport will be invoked for custom HTTP behavior after the
+ // underlying transport is initialized (either the transport created
+ // from TLSClientConfig, Transport, or http.DefaultTransport). The
+ // config may layer other RoundTrippers on top of the returned
+ // RoundTripper.
+ WrapTransport func(rt http.RoundTripper) http.RoundTripper
+}
+
+// ImpersonationConfig has all the available impersonation options
+type ImpersonationConfig struct {
+ // UserName matches user.Info.GetName()
+ UserName string
+ // Groups matches user.Info.GetGroups()
+ Groups []string
+ // Extra matches user.Info.GetExtra()
+ Extra map[string][]string
+}
+
+// HasCA returns whether the configuration has a certificate authority or not.
+func (c *Config) HasCA() bool {
+ return len(c.TLS.CAData) > 0 || len(c.TLS.CAFile) > 0
+}
+
+// HasBasicAuth returns whether the configuration has basic authentication or not.
+func (c *Config) HasBasicAuth() bool {
+ return len(c.Username) != 0
+}
+
+// HasTokenAuth returns whether the configuration has token authentication or not.
+func (c *Config) HasTokenAuth() bool {
+ return len(c.BearerToken) != 0
+}
+
+// HasCertAuth returns whether the configuration has certificate authentication or not.
+func (c *Config) HasCertAuth() bool {
+ return len(c.TLS.CertData) != 0 || len(c.TLS.CertFile) != 0
+}
+
+// TLSConfig holds the information needed to set up a TLS transport.
+type TLSConfig struct {
+ CAFile string // Path of the PEM-encoded server trusted root certificates.
+ CertFile string // Path of the PEM-encoded client certificate.
+ KeyFile string // Path of the PEM-encoded client key.
+
+ Insecure bool // Server should be accessed without verifying the certificate. For testing only.
+ ServerName string // Override for the server name passed to the server for SNI and used to verify certificates.
+
+ CAData []byte // Bytes of the PEM-encoded server trusted root certificates. Supercedes CAFile.
+ CertData []byte // Bytes of the PEM-encoded client certificate. Supercedes CertFile.
+ KeyData []byte // Bytes of the PEM-encoded client key. Supercedes KeyFile.
+}
diff --git a/vendor/k8s.io/client-go/transport/round_trippers.go b/vendor/k8s.io/client-go/transport/round_trippers.go
new file mode 100644
index 000000000..c728b1877
--- /dev/null
+++ b/vendor/k8s.io/client-go/transport/round_trippers.go
@@ -0,0 +1,424 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package transport
+
+import (
+ "fmt"
+ "net/http"
+ "strings"
+ "time"
+
+ "github.com/golang/glog"
+
+ utilnet "k8s.io/apimachinery/pkg/util/net"
+)
+
+// HTTPWrappersForConfig wraps a round tripper with any relevant layered
+// behavior from the config. Exposed to allow more clients that need HTTP-like
+// behavior but then must hijack the underlying connection (like WebSocket or
+// HTTP2 clients). Pure HTTP clients should use the RoundTripper returned from
+// New.
+func HTTPWrappersForConfig(config *Config, rt http.RoundTripper) (http.RoundTripper, error) {
+ if config.WrapTransport != nil {
+ rt = config.WrapTransport(rt)
+ }
+
+ rt = DebugWrappers(rt)
+
+ // Set authentication wrappers
+ switch {
+ case config.HasBasicAuth() && config.HasTokenAuth():
+ return nil, fmt.Errorf("username/password or bearer token may be set, but not both")
+ case config.HasTokenAuth():
+ rt = NewBearerAuthRoundTripper(config.BearerToken, rt)
+ case config.HasBasicAuth():
+ rt = NewBasicAuthRoundTripper(config.Username, config.Password, rt)
+ }
+ if len(config.UserAgent) > 0 {
+ rt = NewUserAgentRoundTripper(config.UserAgent, rt)
+ }
+ if len(config.Impersonate.UserName) > 0 ||
+ len(config.Impersonate.Groups) > 0 ||
+ len(config.Impersonate.Extra) > 0 {
+ rt = NewImpersonatingRoundTripper(config.Impersonate, rt)
+ }
+ return rt, nil
+}
+
+// DebugWrappers wraps a round tripper and logs based on the current log level.
+func DebugWrappers(rt http.RoundTripper) http.RoundTripper {
+ switch {
+ case bool(glog.V(9)):
+ rt = newDebuggingRoundTripper(rt, debugCurlCommand, debugURLTiming, debugResponseHeaders)
+ case bool(glog.V(8)):
+ rt = newDebuggingRoundTripper(rt, debugJustURL, debugRequestHeaders, debugResponseStatus, debugResponseHeaders)
+ case bool(glog.V(7)):
+ rt = newDebuggingRoundTripper(rt, debugJustURL, debugRequestHeaders, debugResponseStatus)
+ case bool(glog.V(6)):
+ rt = newDebuggingRoundTripper(rt, debugURLTiming)
+ }
+
+ return rt
+}
+
+type requestCanceler interface {
+ CancelRequest(*http.Request)
+}
+
+type authProxyRoundTripper struct {
+ username string
+ groups []string
+ extra map[string][]string
+
+ rt http.RoundTripper
+}
+
+// NewAuthProxyRoundTripper provides a roundtripper which will add auth proxy fields to requests for
+// authentication terminating proxy cases
+// assuming you pull the user from the context:
+// username is the user.Info.GetName() of the user
+// groups is the user.Info.GetGroups() of the user
+// extra is the user.Info.GetExtra() of the user
+// extra can contain any additional information that the authenticator
+// thought was interesting, for example authorization scopes.
+// In order to faithfully round-trip through an impersonation flow, these keys
+// MUST be lowercase.
+func NewAuthProxyRoundTripper(username string, groups []string, extra map[string][]string, rt http.RoundTripper) http.RoundTripper {
+ return &authProxyRoundTripper{
+ username: username,
+ groups: groups,
+ extra: extra,
+ rt: rt,
+ }
+}
+
+func (rt *authProxyRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
+ req = utilnet.CloneRequest(req)
+ SetAuthProxyHeaders(req, rt.username, rt.groups, rt.extra)
+
+ return rt.rt.RoundTrip(req)
+}
+
+// SetAuthProxyHeaders stomps the auth proxy header fields. It mutates its argument.
+func SetAuthProxyHeaders(req *http.Request, username string, groups []string, extra map[string][]string) {
+ req.Header.Del("X-Remote-User")
+ req.Header.Del("X-Remote-Group")
+ for key := range req.Header {
+ if strings.HasPrefix(strings.ToLower(key), strings.ToLower("X-Remote-Extra-")) {
+ req.Header.Del(key)
+ }
+ }
+
+ req.Header.Set("X-Remote-User", username)
+ for _, group := range groups {
+ req.Header.Add("X-Remote-Group", group)
+ }
+ for key, values := range extra {
+ for _, value := range values {
+ req.Header.Add("X-Remote-Extra-"+key, value)
+ }
+ }
+}
+
+func (rt *authProxyRoundTripper) CancelRequest(req *http.Request) {
+ if canceler, ok := rt.rt.(requestCanceler); ok {
+ canceler.CancelRequest(req)
+ } else {
+ glog.Errorf("CancelRequest not implemented")
+ }
+}
+
+func (rt *authProxyRoundTripper) WrappedRoundTripper() http.RoundTripper { return rt.rt }
+
+type userAgentRoundTripper struct {
+ agent string
+ rt http.RoundTripper
+}
+
+func NewUserAgentRoundTripper(agent string, rt http.RoundTripper) http.RoundTripper {
+ return &userAgentRoundTripper{agent, rt}
+}
+
+func (rt *userAgentRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
+ if len(req.Header.Get("User-Agent")) != 0 {
+ return rt.rt.RoundTrip(req)
+ }
+ req = utilnet.CloneRequest(req)
+ req.Header.Set("User-Agent", rt.agent)
+ return rt.rt.RoundTrip(req)
+}
+
+func (rt *userAgentRoundTripper) CancelRequest(req *http.Request) {
+ if canceler, ok := rt.rt.(requestCanceler); ok {
+ canceler.CancelRequest(req)
+ } else {
+ glog.Errorf("CancelRequest not implemented")
+ }
+}
+
+func (rt *userAgentRoundTripper) WrappedRoundTripper() http.RoundTripper { return rt.rt }
+
+type basicAuthRoundTripper struct {
+ username string
+ password string
+ rt http.RoundTripper
+}
+
+// NewBasicAuthRoundTripper will apply a BASIC auth authorization header to a
+// request unless it has already been set.
+func NewBasicAuthRoundTripper(username, password string, rt http.RoundTripper) http.RoundTripper {
+ return &basicAuthRoundTripper{username, password, rt}
+}
+
+func (rt *basicAuthRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
+ if len(req.Header.Get("Authorization")) != 0 {
+ return rt.rt.RoundTrip(req)
+ }
+ req = utilnet.CloneRequest(req)
+ req.SetBasicAuth(rt.username, rt.password)
+ return rt.rt.RoundTrip(req)
+}
+
+func (rt *basicAuthRoundTripper) CancelRequest(req *http.Request) {
+ if canceler, ok := rt.rt.(requestCanceler); ok {
+ canceler.CancelRequest(req)
+ } else {
+ glog.Errorf("CancelRequest not implemented")
+ }
+}
+
+func (rt *basicAuthRoundTripper) WrappedRoundTripper() http.RoundTripper { return rt.rt }
+
+// These correspond to the headers used in pkg/apis/authentication. We don't want the package dependency,
+// but you must not change the values.
+const (
+ // ImpersonateUserHeader is used to impersonate a particular user during an API server request
+ ImpersonateUserHeader = "Impersonate-User"
+
+ // ImpersonateGroupHeader is used to impersonate a particular group during an API server request.
+ // It can be repeated multiplied times for multiple groups.
+ ImpersonateGroupHeader = "Impersonate-Group"
+
+ // ImpersonateUserExtraHeaderPrefix is a prefix for a header used to impersonate an entry in the
+ // extra map[string][]string for user.Info. The key for the `extra` map is suffix.
+ // The same key can be repeated multiple times to have multiple elements in the slice under a single key.
+ // For instance:
+ // Impersonate-Extra-Foo: one
+ // Impersonate-Extra-Foo: two
+ // results in extra["Foo"] = []string{"one", "two"}
+ ImpersonateUserExtraHeaderPrefix = "Impersonate-Extra-"
+)
+
+type impersonatingRoundTripper struct {
+ impersonate ImpersonationConfig
+ delegate http.RoundTripper
+}
+
+// NewImpersonatingRoundTripper will add an Act-As header to a request unless it has already been set.
+func NewImpersonatingRoundTripper(impersonate ImpersonationConfig, delegate http.RoundTripper) http.RoundTripper {
+ return &impersonatingRoundTripper{impersonate, delegate}
+}
+
+func (rt *impersonatingRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
+ // use the user header as marker for the rest.
+ if len(req.Header.Get(ImpersonateUserHeader)) != 0 {
+ return rt.delegate.RoundTrip(req)
+ }
+ req = utilnet.CloneRequest(req)
+ req.Header.Set(ImpersonateUserHeader, rt.impersonate.UserName)
+
+ for _, group := range rt.impersonate.Groups {
+ req.Header.Add(ImpersonateGroupHeader, group)
+ }
+ for k, vv := range rt.impersonate.Extra {
+ for _, v := range vv {
+ req.Header.Add(ImpersonateUserExtraHeaderPrefix+k, v)
+ }
+ }
+
+ return rt.delegate.RoundTrip(req)
+}
+
+func (rt *impersonatingRoundTripper) CancelRequest(req *http.Request) {
+ if canceler, ok := rt.delegate.(requestCanceler); ok {
+ canceler.CancelRequest(req)
+ } else {
+ glog.Errorf("CancelRequest not implemented")
+ }
+}
+
+func (rt *impersonatingRoundTripper) WrappedRoundTripper() http.RoundTripper { return rt.delegate }
+
+type bearerAuthRoundTripper struct {
+ bearer string
+ rt http.RoundTripper
+}
+
+// NewBearerAuthRoundTripper adds the provided bearer token to a request
+// unless the authorization header has already been set.
+func NewBearerAuthRoundTripper(bearer string, rt http.RoundTripper) http.RoundTripper {
+ return &bearerAuthRoundTripper{bearer, rt}
+}
+
+func (rt *bearerAuthRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
+ if len(req.Header.Get("Authorization")) != 0 {
+ return rt.rt.RoundTrip(req)
+ }
+
+ req = utilnet.CloneRequest(req)
+ req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", rt.bearer))
+ return rt.rt.RoundTrip(req)
+}
+
+func (rt *bearerAuthRoundTripper) CancelRequest(req *http.Request) {
+ if canceler, ok := rt.rt.(requestCanceler); ok {
+ canceler.CancelRequest(req)
+ } else {
+ glog.Errorf("CancelRequest not implemented")
+ }
+}
+
+func (rt *bearerAuthRoundTripper) WrappedRoundTripper() http.RoundTripper { return rt.rt }
+
+// requestInfo keeps track of information about a request/response combination
+type requestInfo struct {
+ RequestHeaders http.Header
+ RequestVerb string
+ RequestURL string
+
+ ResponseStatus string
+ ResponseHeaders http.Header
+ ResponseErr error
+
+ Duration time.Duration
+}
+
+// newRequestInfo creates a new RequestInfo based on an http request
+func newRequestInfo(req *http.Request) *requestInfo {
+ return &requestInfo{
+ RequestURL: req.URL.String(),
+ RequestVerb: req.Method,
+ RequestHeaders: req.Header,
+ }
+}
+
+// complete adds information about the response to the requestInfo
+func (r *requestInfo) complete(response *http.Response, err error) {
+ if err != nil {
+ r.ResponseErr = err
+ return
+ }
+ r.ResponseStatus = response.Status
+ r.ResponseHeaders = response.Header
+}
+
+// toCurl returns a string that can be run as a command in a terminal (minus the body)
+func (r *requestInfo) toCurl() string {
+ headers := ""
+ for key, values := range r.RequestHeaders {
+ for _, value := range values {
+ headers += fmt.Sprintf(` -H %q`, fmt.Sprintf("%s: %s", key, value))
+ }
+ }
+
+ return fmt.Sprintf("curl -k -v -X%s %s %s", r.RequestVerb, headers, r.RequestURL)
+}
+
+// debuggingRoundTripper will display information about the requests passing
+// through it based on what is configured
+type debuggingRoundTripper struct {
+ delegatedRoundTripper http.RoundTripper
+
+ levels map[debugLevel]bool
+}
+
+type debugLevel int
+
+const (
+ debugJustURL debugLevel = iota
+ debugURLTiming
+ debugCurlCommand
+ debugRequestHeaders
+ debugResponseStatus
+ debugResponseHeaders
+)
+
+func newDebuggingRoundTripper(rt http.RoundTripper, levels ...debugLevel) *debuggingRoundTripper {
+ drt := &debuggingRoundTripper{
+ delegatedRoundTripper: rt,
+ levels: make(map[debugLevel]bool, len(levels)),
+ }
+ for _, v := range levels {
+ drt.levels[v] = true
+ }
+ return drt
+}
+
+func (rt *debuggingRoundTripper) CancelRequest(req *http.Request) {
+ if canceler, ok := rt.delegatedRoundTripper.(requestCanceler); ok {
+ canceler.CancelRequest(req)
+ } else {
+ glog.Errorf("CancelRequest not implemented")
+ }
+}
+
+func (rt *debuggingRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
+ reqInfo := newRequestInfo(req)
+
+ if rt.levels[debugJustURL] {
+ glog.Infof("%s %s", reqInfo.RequestVerb, reqInfo.RequestURL)
+ }
+ if rt.levels[debugCurlCommand] {
+ glog.Infof("%s", reqInfo.toCurl())
+
+ }
+ if rt.levels[debugRequestHeaders] {
+ glog.Infof("Request Headers:")
+ for key, values := range reqInfo.RequestHeaders {
+ for _, value := range values {
+ glog.Infof(" %s: %s", key, value)
+ }
+ }
+ }
+
+ startTime := time.Now()
+ response, err := rt.delegatedRoundTripper.RoundTrip(req)
+ reqInfo.Duration = time.Since(startTime)
+
+ reqInfo.complete(response, err)
+
+ if rt.levels[debugURLTiming] {
+ glog.Infof("%s %s %s in %d milliseconds", reqInfo.RequestVerb, reqInfo.RequestURL, reqInfo.ResponseStatus, reqInfo.Duration.Nanoseconds()/int64(time.Millisecond))
+ }
+ if rt.levels[debugResponseStatus] {
+ glog.Infof("Response Status: %s in %d milliseconds", reqInfo.ResponseStatus, reqInfo.Duration.Nanoseconds()/int64(time.Millisecond))
+ }
+ if rt.levels[debugResponseHeaders] {
+ glog.Infof("Response Headers:")
+ for key, values := range reqInfo.ResponseHeaders {
+ for _, value := range values {
+ glog.Infof(" %s: %s", key, value)
+ }
+ }
+ }
+
+ return response, err
+}
+
+func (rt *debuggingRoundTripper) WrappedRoundTripper() http.RoundTripper {
+ return rt.delegatedRoundTripper
+}
diff --git a/vendor/k8s.io/client-go/transport/transport.go b/vendor/k8s.io/client-go/transport/transport.go
new file mode 100644
index 000000000..15be0a3e6
--- /dev/null
+++ b/vendor/k8s.io/client-go/transport/transport.go
@@ -0,0 +1,141 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package transport
+
+import (
+ "crypto/tls"
+ "crypto/x509"
+ "fmt"
+ "io/ioutil"
+ "net/http"
+)
+
+// New returns an http.RoundTripper that will provide the authentication
+// or transport level security defined by the provided Config.
+func New(config *Config) (http.RoundTripper, error) {
+ // Set transport level security
+ if config.Transport != nil && (config.HasCA() || config.HasCertAuth() || config.TLS.Insecure) {
+ return nil, fmt.Errorf("using a custom transport with TLS certificate options or the insecure flag is not allowed")
+ }
+
+ var (
+ rt http.RoundTripper
+ err error
+ )
+
+ if config.Transport != nil {
+ rt = config.Transport
+ } else {
+ rt, err = tlsCache.get(config)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ return HTTPWrappersForConfig(config, rt)
+}
+
+// TLSConfigFor returns a tls.Config that will provide the transport level security defined
+// by the provided Config. Will return nil if no transport level security is requested.
+func TLSConfigFor(c *Config) (*tls.Config, error) {
+ if !(c.HasCA() || c.HasCertAuth() || c.TLS.Insecure) {
+ return nil, nil
+ }
+ if c.HasCA() && c.TLS.Insecure {
+ return nil, fmt.Errorf("specifying a root certificates file with the insecure flag is not allowed")
+ }
+ if err := loadTLSFiles(c); err != nil {
+ return nil, err
+ }
+
+ tlsConfig := &tls.Config{
+ // Can't use SSLv3 because of POODLE and BEAST
+ // Can't use TLSv1.0 because of POODLE and BEAST using CBC cipher
+ // Can't use TLSv1.1 because of RC4 cipher usage
+ MinVersion: tls.VersionTLS12,
+ InsecureSkipVerify: c.TLS.Insecure,
+ ServerName: c.TLS.ServerName,
+ }
+
+ if c.HasCA() {
+ tlsConfig.RootCAs = rootCertPool(c.TLS.CAData)
+ }
+
+ if c.HasCertAuth() {
+ cert, err := tls.X509KeyPair(c.TLS.CertData, c.TLS.KeyData)
+ if err != nil {
+ return nil, err
+ }
+ tlsConfig.Certificates = []tls.Certificate{cert}
+ }
+
+ return tlsConfig, nil
+}
+
+// loadTLSFiles copies the data from the CertFile, KeyFile, and CAFile fields into the CertData,
+// KeyData, and CAFile fields, or returns an error. If no error is returned, all three fields are
+// either populated or were empty to start.
+func loadTLSFiles(c *Config) error {
+ var err error
+ c.TLS.CAData, err = dataFromSliceOrFile(c.TLS.CAData, c.TLS.CAFile)
+ if err != nil {
+ return err
+ }
+
+ c.TLS.CertData, err = dataFromSliceOrFile(c.TLS.CertData, c.TLS.CertFile)
+ if err != nil {
+ return err
+ }
+
+ c.TLS.KeyData, err = dataFromSliceOrFile(c.TLS.KeyData, c.TLS.KeyFile)
+ if err != nil {
+ return err
+ }
+ return nil
+}
+
+// dataFromSliceOrFile returns data from the slice (if non-empty), or from the file,
+// or an error if an error occurred reading the file
+func dataFromSliceOrFile(data []byte, file string) ([]byte, error) {
+ if len(data) > 0 {
+ return data, nil
+ }
+ if len(file) > 0 {
+ fileData, err := ioutil.ReadFile(file)
+ if err != nil {
+ return []byte{}, err
+ }
+ return fileData, nil
+ }
+ return nil, nil
+}
+
+// rootCertPool returns nil if caData is empty. When passed along, this will mean "use system CAs".
+// When caData is not empty, it will be the ONLY information used in the CertPool.
+func rootCertPool(caData []byte) *x509.CertPool {
+ // What we really want is a copy of x509.systemRootsPool, but that isn't exposed. It's difficult to build (see the go
+ // code for a look at the platform specific insanity), so we'll use the fact that RootCAs == nil gives us the system values
+ // It doesn't allow trusting either/or, but hopefully that won't be an issue
+ if len(caData) == 0 {
+ return nil
+ }
+
+ // if we have caData, use it
+ certPool := x509.NewCertPool()
+ certPool.AppendCertsFromPEM(caData)
+ return certPool
+}
diff --git a/vendor/k8s.io/client-go/util/cert/cert.go b/vendor/k8s.io/client-go/util/cert/cert.go
new file mode 100644
index 000000000..6854d4152
--- /dev/null
+++ b/vendor/k8s.io/client-go/util/cert/cert.go
@@ -0,0 +1,215 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package cert
+
+import (
+ "bytes"
+ "crypto/ecdsa"
+ "crypto/elliptic"
+ cryptorand "crypto/rand"
+ "crypto/rsa"
+ "crypto/x509"
+ "crypto/x509/pkix"
+ "encoding/pem"
+ "errors"
+ "fmt"
+ "math"
+ "math/big"
+ "net"
+ "time"
+)
+
+const (
+ rsaKeySize = 2048
+ duration365d = time.Hour * 24 * 365
+)
+
+// Config containes the basic fields required for creating a certificate
+type Config struct {
+ CommonName string
+ Organization []string
+ AltNames AltNames
+ Usages []x509.ExtKeyUsage
+}
+
+// AltNames contains the domain names and IP addresses that will be added
+// to the API Server's x509 certificate SubAltNames field. The values will
+// be passed directly to the x509.Certificate object.
+type AltNames struct {
+ DNSNames []string
+ IPs []net.IP
+}
+
+// NewPrivateKey creates an RSA private key
+func NewPrivateKey() (*rsa.PrivateKey, error) {
+ return rsa.GenerateKey(cryptorand.Reader, rsaKeySize)
+}
+
+// NewSelfSignedCACert creates a CA certificate
+func NewSelfSignedCACert(cfg Config, key *rsa.PrivateKey) (*x509.Certificate, error) {
+ now := time.Now()
+ tmpl := x509.Certificate{
+ SerialNumber: new(big.Int).SetInt64(0),
+ Subject: pkix.Name{
+ CommonName: cfg.CommonName,
+ Organization: cfg.Organization,
+ },
+ NotBefore: now.UTC(),
+ NotAfter: now.Add(duration365d * 10).UTC(),
+ KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign,
+ BasicConstraintsValid: true,
+ IsCA: true,
+ }
+
+ certDERBytes, err := x509.CreateCertificate(cryptorand.Reader, &tmpl, &tmpl, key.Public(), key)
+ if err != nil {
+ return nil, err
+ }
+ return x509.ParseCertificate(certDERBytes)
+}
+
+// NewSignedCert creates a signed certificate using the given CA certificate and key
+func NewSignedCert(cfg Config, key *rsa.PrivateKey, caCert *x509.Certificate, caKey *rsa.PrivateKey) (*x509.Certificate, error) {
+ serial, err := cryptorand.Int(cryptorand.Reader, new(big.Int).SetInt64(math.MaxInt64))
+ if err != nil {
+ return nil, err
+ }
+ if len(cfg.CommonName) == 0 {
+ return nil, errors.New("must specify a CommonName")
+ }
+ if len(cfg.Usages) == 0 {
+ return nil, errors.New("must specify at least one ExtKeyUsage")
+ }
+
+ certTmpl := x509.Certificate{
+ Subject: pkix.Name{
+ CommonName: cfg.CommonName,
+ Organization: cfg.Organization,
+ },
+ DNSNames: cfg.AltNames.DNSNames,
+ IPAddresses: cfg.AltNames.IPs,
+ SerialNumber: serial,
+ NotBefore: caCert.NotBefore,
+ NotAfter: time.Now().Add(duration365d).UTC(),
+ KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature,
+ ExtKeyUsage: cfg.Usages,
+ }
+ certDERBytes, err := x509.CreateCertificate(cryptorand.Reader, &certTmpl, caCert, key.Public(), caKey)
+ if err != nil {
+ return nil, err
+ }
+ return x509.ParseCertificate(certDERBytes)
+}
+
+// MakeEllipticPrivateKeyPEM creates an ECDSA private key
+func MakeEllipticPrivateKeyPEM() ([]byte, error) {
+ privateKey, err := ecdsa.GenerateKey(elliptic.P256(), cryptorand.Reader)
+ if err != nil {
+ return nil, err
+ }
+
+ derBytes, err := x509.MarshalECPrivateKey(privateKey)
+ if err != nil {
+ return nil, err
+ }
+
+ privateKeyPemBlock := &pem.Block{
+ Type: ECPrivateKeyBlockType,
+ Bytes: derBytes,
+ }
+ return pem.EncodeToMemory(privateKeyPemBlock), nil
+}
+
+// GenerateSelfSignedCertKey creates a self-signed certificate and key for the given host.
+// Host may be an IP or a DNS name
+// You may also specify additional subject alt names (either ip or dns names) for the certificate
+func GenerateSelfSignedCertKey(host string, alternateIPs []net.IP, alternateDNS []string) ([]byte, []byte, error) {
+ priv, err := rsa.GenerateKey(cryptorand.Reader, 2048)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ template := x509.Certificate{
+ SerialNumber: big.NewInt(1),
+ Subject: pkix.Name{
+ CommonName: fmt.Sprintf("%s@%d", host, time.Now().Unix()),
+ },
+ NotBefore: time.Now(),
+ NotAfter: time.Now().Add(time.Hour * 24 * 365),
+
+ KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign,
+ ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth},
+ BasicConstraintsValid: true,
+ IsCA: true,
+ }
+
+ if ip := net.ParseIP(host); ip != nil {
+ template.IPAddresses = append(template.IPAddresses, ip)
+ } else {
+ template.DNSNames = append(template.DNSNames, host)
+ }
+
+ template.IPAddresses = append(template.IPAddresses, alternateIPs...)
+ template.DNSNames = append(template.DNSNames, alternateDNS...)
+
+ derBytes, err := x509.CreateCertificate(cryptorand.Reader, &template, &template, &priv.PublicKey, priv)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ // Generate cert
+ certBuffer := bytes.Buffer{}
+ if err := pem.Encode(&certBuffer, &pem.Block{Type: CertificateBlockType, Bytes: derBytes}); err != nil {
+ return nil, nil, err
+ }
+
+ // Generate key
+ keyBuffer := bytes.Buffer{}
+ if err := pem.Encode(&keyBuffer, &pem.Block{Type: RSAPrivateKeyBlockType, Bytes: x509.MarshalPKCS1PrivateKey(priv)}); err != nil {
+ return nil, nil, err
+ }
+
+ return certBuffer.Bytes(), keyBuffer.Bytes(), nil
+}
+
+// FormatBytesCert receives byte array certificate and formats in human-readable format
+func FormatBytesCert(cert []byte) (string, error) {
+ block, _ := pem.Decode(cert)
+ c, err := x509.ParseCertificate(block.Bytes)
+ if err != nil {
+ return "", fmt.Errorf("failed to parse certificate [%v]", err)
+ }
+ return FormatCert(c), nil
+}
+
+// FormatCert receives certificate and formats in human-readable format
+func FormatCert(c *x509.Certificate) string {
+ var ips []string
+ for _, ip := range c.IPAddresses {
+ ips = append(ips, ip.String())
+ }
+ altNames := append(ips, c.DNSNames...)
+ res := fmt.Sprintf(
+ "Issuer: CN=%s | Subject: CN=%s | CA: %t\n",
+ c.Issuer.CommonName, c.Subject.CommonName, c.IsCA,
+ )
+ res += fmt.Sprintf("Not before: %s Not After: %s", c.NotBefore, c.NotAfter)
+ if len(altNames) > 0 {
+ res += fmt.Sprintf("\nAlternate Names: %v", altNames)
+ }
+ return res
+}
diff --git a/vendor/k8s.io/client-go/util/cert/csr.go b/vendor/k8s.io/client-go/util/cert/csr.go
new file mode 100644
index 000000000..39a6751f7
--- /dev/null
+++ b/vendor/k8s.io/client-go/util/cert/csr.go
@@ -0,0 +1,75 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package cert
+
+import (
+ cryptorand "crypto/rand"
+ "crypto/rsa"
+ "crypto/x509"
+ "crypto/x509/pkix"
+ "encoding/pem"
+ "net"
+)
+
+// MakeCSR generates a PEM-encoded CSR using the supplied private key, subject, and SANs.
+// All key types that are implemented via crypto.Signer are supported (This includes *rsa.PrivateKey and *ecdsa.PrivateKey.)
+func MakeCSR(privateKey interface{}, subject *pkix.Name, dnsSANs []string, ipSANs []net.IP) (csr []byte, err error) {
+ template := &x509.CertificateRequest{
+ Subject: *subject,
+ DNSNames: dnsSANs,
+ IPAddresses: ipSANs,
+ }
+
+ return MakeCSRFromTemplate(privateKey, template)
+}
+
+// MakeCSRFromTemplate generates a PEM-encoded CSR using the supplied private
+// key and certificate request as a template. All key types that are
+// implemented via crypto.Signer are supported (This includes *rsa.PrivateKey
+// and *ecdsa.PrivateKey.)
+func MakeCSRFromTemplate(privateKey interface{}, template *x509.CertificateRequest) ([]byte, error) {
+ t := *template
+ t.SignatureAlgorithm = sigType(privateKey)
+
+ csrDER, err := x509.CreateCertificateRequest(cryptorand.Reader, &t, privateKey)
+ if err != nil {
+ return nil, err
+ }
+
+ csrPemBlock := &pem.Block{
+ Type: CertificateRequestBlockType,
+ Bytes: csrDER,
+ }
+
+ return pem.EncodeToMemory(csrPemBlock), nil
+}
+
+func sigType(privateKey interface{}) x509.SignatureAlgorithm {
+ // Customize the signature for RSA keys, depending on the key size
+ if privateKey, ok := privateKey.(*rsa.PrivateKey); ok {
+ keySize := privateKey.N.BitLen()
+ switch {
+ case keySize >= 4096:
+ return x509.SHA512WithRSA
+ case keySize >= 3072:
+ return x509.SHA384WithRSA
+ default:
+ return x509.SHA256WithRSA
+ }
+ }
+ return x509.UnknownSignatureAlgorithm
+}
diff --git a/vendor/k8s.io/client-go/util/cert/io.go b/vendor/k8s.io/client-go/util/cert/io.go
new file mode 100644
index 000000000..b6b690383
--- /dev/null
+++ b/vendor/k8s.io/client-go/util/cert/io.go
@@ -0,0 +1,150 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package cert
+
+import (
+ "crypto/x509"
+ "fmt"
+ "io/ioutil"
+ "os"
+ "path/filepath"
+)
+
+// CanReadCertAndKey returns true if the certificate and key files already exists,
+// otherwise returns false. If lost one of cert and key, returns error.
+func CanReadCertAndKey(certPath, keyPath string) (bool, error) {
+ certReadable := canReadFile(certPath)
+ keyReadable := canReadFile(keyPath)
+
+ if certReadable == false && keyReadable == false {
+ return false, nil
+ }
+
+ if certReadable == false {
+ return false, fmt.Errorf("error reading %s, certificate and key must be supplied as a pair", certPath)
+ }
+
+ if keyReadable == false {
+ return false, fmt.Errorf("error reading %s, certificate and key must be supplied as a pair", keyPath)
+ }
+
+ return true, nil
+}
+
+// If the file represented by path exists and
+// readable, returns true otherwise returns false.
+func canReadFile(path string) bool {
+ f, err := os.Open(path)
+ if err != nil {
+ return false
+ }
+
+ defer f.Close()
+
+ return true
+}
+
+// WriteCert writes the pem-encoded certificate data to certPath.
+// The certificate file will be created with file mode 0644.
+// If the certificate file already exists, it will be overwritten.
+// The parent directory of the certPath will be created as needed with file mode 0755.
+func WriteCert(certPath string, data []byte) error {
+ if err := os.MkdirAll(filepath.Dir(certPath), os.FileMode(0755)); err != nil {
+ return err
+ }
+ if err := ioutil.WriteFile(certPath, data, os.FileMode(0644)); err != nil {
+ return err
+ }
+ return nil
+}
+
+// WriteKey writes the pem-encoded key data to keyPath.
+// The key file will be created with file mode 0600.
+// If the key file already exists, it will be overwritten.
+// The parent directory of the keyPath will be created as needed with file mode 0755.
+func WriteKey(keyPath string, data []byte) error {
+ if err := os.MkdirAll(filepath.Dir(keyPath), os.FileMode(0755)); err != nil {
+ return err
+ }
+ if err := ioutil.WriteFile(keyPath, data, os.FileMode(0600)); err != nil {
+ return err
+ }
+ return nil
+}
+
+// LoadOrGenerateKeyFile looks for a key in the file at the given path. If it
+// can't find one, it will generate a new key and store it there.
+func LoadOrGenerateKeyFile(keyPath string) (data []byte, wasGenerated bool, err error) {
+ loadedData, err := ioutil.ReadFile(keyPath)
+ if err == nil {
+ return loadedData, false, err
+ }
+ if !os.IsNotExist(err) {
+ return nil, false, fmt.Errorf("error loading key from %s: %v", keyPath, err)
+ }
+
+ generatedData, err := MakeEllipticPrivateKeyPEM()
+ if err != nil {
+ return nil, false, fmt.Errorf("error generating key: %v", err)
+ }
+ if err := WriteKey(keyPath, generatedData); err != nil {
+ return nil, false, fmt.Errorf("error writing key to %s: %v", keyPath, err)
+ }
+ return generatedData, true, nil
+}
+
+// NewPool returns an x509.CertPool containing the certificates in the given PEM-encoded file.
+// Returns an error if the file could not be read, a certificate could not be parsed, or if the file does not contain any certificates
+func NewPool(filename string) (*x509.CertPool, error) {
+ certs, err := CertsFromFile(filename)
+ if err != nil {
+ return nil, err
+ }
+ pool := x509.NewCertPool()
+ for _, cert := range certs {
+ pool.AddCert(cert)
+ }
+ return pool, nil
+}
+
+// CertsFromFile returns the x509.Certificates contained in the given PEM-encoded file.
+// Returns an error if the file could not be read, a certificate could not be parsed, or if the file does not contain any certificates
+func CertsFromFile(file string) ([]*x509.Certificate, error) {
+ pemBlock, err := ioutil.ReadFile(file)
+ if err != nil {
+ return nil, err
+ }
+ certs, err := ParseCertsPEM(pemBlock)
+ if err != nil {
+ return nil, fmt.Errorf("error reading %s: %s", file, err)
+ }
+ return certs, nil
+}
+
+// PrivateKeyFromFile returns the private key in rsa.PrivateKey or ecdsa.PrivateKey format from a given PEM-encoded file.
+// Returns an error if the file could not be read or if the private key could not be parsed.
+func PrivateKeyFromFile(file string) (interface{}, error) {
+ pemBlock, err := ioutil.ReadFile(file)
+ if err != nil {
+ return nil, err
+ }
+ key, err := ParsePrivateKeyPEM(pemBlock)
+ if err != nil {
+ return nil, fmt.Errorf("error reading %s: %v", file, err)
+ }
+ return key, nil
+}
diff --git a/vendor/k8s.io/client-go/util/cert/pem.go b/vendor/k8s.io/client-go/util/cert/pem.go
new file mode 100644
index 000000000..899845857
--- /dev/null
+++ b/vendor/k8s.io/client-go/util/cert/pem.go
@@ -0,0 +1,138 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package cert
+
+import (
+ "crypto/rsa"
+ "crypto/x509"
+ "encoding/pem"
+ "errors"
+ "fmt"
+)
+
+const (
+ // ECPrivateKeyBlockType is a possible value for pem.Block.Type.
+ ECPrivateKeyBlockType = "EC PRIVATE KEY"
+ // RSAPrivateKeyBlockType is a possible value for pem.Block.Type.
+ RSAPrivateKeyBlockType = "RSA PRIVATE KEY"
+ // CertificateBlockType is a possible value for pem.Block.Type.
+ CertificateBlockType = "CERTIFICATE"
+ // CertificateRequestBlockType is a possible value for pem.Block.Type.
+ CertificateRequestBlockType = "CERTIFICATE REQUEST"
+ // PrivateKeyBlockType is a possible value for pem.Block.Type.
+ PrivateKeyBlockType = "PRIVATE KEY"
+ // PublicKeyBlockType is a possible value for pem.Block.Type.
+ PublicKeyBlockType = "PUBLIC KEY"
+)
+
+// EncodePublicKeyPEM returns PEM-endcode public data
+func EncodePublicKeyPEM(key *rsa.PublicKey) ([]byte, error) {
+ der, err := x509.MarshalPKIXPublicKey(key)
+ if err != nil {
+ return []byte{}, err
+ }
+ block := pem.Block{
+ Type: PublicKeyBlockType,
+ Bytes: der,
+ }
+ return pem.EncodeToMemory(&block), nil
+}
+
+// EncodePrivateKeyPEM returns PEM-encoded private key data
+func EncodePrivateKeyPEM(key *rsa.PrivateKey) []byte {
+ block := pem.Block{
+ Type: RSAPrivateKeyBlockType,
+ Bytes: x509.MarshalPKCS1PrivateKey(key),
+ }
+ return pem.EncodeToMemory(&block)
+}
+
+// EncodeCertPEM returns PEM-endcoded certificate data
+func EncodeCertPEM(cert *x509.Certificate) []byte {
+ block := pem.Block{
+ Type: CertificateBlockType,
+ Bytes: cert.Raw,
+ }
+ return pem.EncodeToMemory(&block)
+}
+
+// ParsePrivateKeyPEM returns a private key parsed from a PEM block in the supplied data.
+// Recognizes PEM blocks for "EC PRIVATE KEY", "RSA PRIVATE KEY", or "PRIVATE KEY"
+func ParsePrivateKeyPEM(keyData []byte) (interface{}, error) {
+ var privateKeyPemBlock *pem.Block
+ for {
+ privateKeyPemBlock, keyData = pem.Decode(keyData)
+ if privateKeyPemBlock == nil {
+ break
+ }
+
+ switch privateKeyPemBlock.Type {
+ case ECPrivateKeyBlockType:
+ // ECDSA Private Key in ASN.1 format
+ if key, err := x509.ParseECPrivateKey(privateKeyPemBlock.Bytes); err == nil {
+ return key, nil
+ }
+ case RSAPrivateKeyBlockType:
+ // RSA Private Key in PKCS#1 format
+ if key, err := x509.ParsePKCS1PrivateKey(privateKeyPemBlock.Bytes); err == nil {
+ return key, nil
+ }
+ case PrivateKeyBlockType:
+ // RSA or ECDSA Private Key in unencrypted PKCS#8 format
+ if key, err := x509.ParsePKCS8PrivateKey(privateKeyPemBlock.Bytes); err == nil {
+ return key, nil
+ }
+ }
+
+ // tolerate non-key PEM blocks for compatibility with things like "EC PARAMETERS" blocks
+ // originally, only the first PEM block was parsed and expected to be a key block
+ }
+
+ // we read all the PEM blocks and didn't recognize one
+ return nil, fmt.Errorf("data does not contain a valid RSA or ECDSA private key")
+}
+
+// ParseCertsPEM returns the x509.Certificates contained in the given PEM-encoded byte array
+// Returns an error if a certificate could not be parsed, or if the data does not contain any certificates
+func ParseCertsPEM(pemCerts []byte) ([]*x509.Certificate, error) {
+ ok := false
+ certs := []*x509.Certificate{}
+ for len(pemCerts) > 0 {
+ var block *pem.Block
+ block, pemCerts = pem.Decode(pemCerts)
+ if block == nil {
+ break
+ }
+ // Only use PEM "CERTIFICATE" blocks without extra headers
+ if block.Type != CertificateBlockType || len(block.Headers) != 0 {
+ continue
+ }
+
+ cert, err := x509.ParseCertificate(block.Bytes)
+ if err != nil {
+ return certs, err
+ }
+
+ certs = append(certs, cert)
+ ok = true
+ }
+
+ if !ok {
+ return certs, errors.New("could not read any certificates")
+ }
+ return certs, nil
+}
diff --git a/vendor/k8s.io/client-go/util/exec/exec.go b/vendor/k8s.io/client-go/util/exec/exec.go
new file mode 100644
index 000000000..d170badb6
--- /dev/null
+++ b/vendor/k8s.io/client-go/util/exec/exec.go
@@ -0,0 +1,52 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package exec
+
+// ExitError is an interface that presents an API similar to os.ProcessState, which is
+// what ExitError from os/exec is. This is designed to make testing a bit easier and
+// probably loses some of the cross-platform properties of the underlying library.
+type ExitError interface {
+ String() string
+ Error() string
+ Exited() bool
+ ExitStatus() int
+}
+
+// CodeExitError is an implementation of ExitError consisting of an error object
+// and an exit code (the upper bits of os.exec.ExitStatus).
+type CodeExitError struct {
+ Err error
+ Code int
+}
+
+var _ ExitError = CodeExitError{}
+
+func (e CodeExitError) Error() string {
+ return e.Err.Error()
+}
+
+func (e CodeExitError) String() string {
+ return e.Err.Error()
+}
+
+func (e CodeExitError) Exited() bool {
+ return true
+}
+
+func (e CodeExitError) ExitStatus() int {
+ return e.Code
+}
diff --git a/vendor/k8s.io/client-go/util/flowcontrol/backoff.go b/vendor/k8s.io/client-go/util/flowcontrol/backoff.go
new file mode 100644
index 000000000..71d442a62
--- /dev/null
+++ b/vendor/k8s.io/client-go/util/flowcontrol/backoff.go
@@ -0,0 +1,149 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package flowcontrol
+
+import (
+ "sync"
+ "time"
+
+ "k8s.io/apimachinery/pkg/util/clock"
+ "k8s.io/client-go/util/integer"
+)
+
+type backoffEntry struct {
+ backoff time.Duration
+ lastUpdate time.Time
+}
+
+type Backoff struct {
+ sync.Mutex
+ Clock clock.Clock
+ defaultDuration time.Duration
+ maxDuration time.Duration
+ perItemBackoff map[string]*backoffEntry
+}
+
+func NewFakeBackOff(initial, max time.Duration, tc *clock.FakeClock) *Backoff {
+ return &Backoff{
+ perItemBackoff: map[string]*backoffEntry{},
+ Clock: tc,
+ defaultDuration: initial,
+ maxDuration: max,
+ }
+}
+
+func NewBackOff(initial, max time.Duration) *Backoff {
+ return &Backoff{
+ perItemBackoff: map[string]*backoffEntry{},
+ Clock: clock.RealClock{},
+ defaultDuration: initial,
+ maxDuration: max,
+ }
+}
+
+// Get the current backoff Duration
+func (p *Backoff) Get(id string) time.Duration {
+ p.Lock()
+ defer p.Unlock()
+ var delay time.Duration
+ entry, ok := p.perItemBackoff[id]
+ if ok {
+ delay = entry.backoff
+ }
+ return delay
+}
+
+// move backoff to the next mark, capping at maxDuration
+func (p *Backoff) Next(id string, eventTime time.Time) {
+ p.Lock()
+ defer p.Unlock()
+ entry, ok := p.perItemBackoff[id]
+ if !ok || hasExpired(eventTime, entry.lastUpdate, p.maxDuration) {
+ entry = p.initEntryUnsafe(id)
+ } else {
+ delay := entry.backoff * 2 // exponential
+ entry.backoff = time.Duration(integer.Int64Min(int64(delay), int64(p.maxDuration)))
+ }
+ entry.lastUpdate = p.Clock.Now()
+}
+
+// Reset forces clearing of all backoff data for a given key.
+func (p *Backoff) Reset(id string) {
+ p.Lock()
+ defer p.Unlock()
+ delete(p.perItemBackoff, id)
+}
+
+// Returns True if the elapsed time since eventTime is smaller than the current backoff window
+func (p *Backoff) IsInBackOffSince(id string, eventTime time.Time) bool {
+ p.Lock()
+ defer p.Unlock()
+ entry, ok := p.perItemBackoff[id]
+ if !ok {
+ return false
+ }
+ if hasExpired(eventTime, entry.lastUpdate, p.maxDuration) {
+ return false
+ }
+ return p.Clock.Now().Sub(eventTime) < entry.backoff
+}
+
+// Returns True if time since lastupdate is less than the current backoff window.
+func (p *Backoff) IsInBackOffSinceUpdate(id string, eventTime time.Time) bool {
+ p.Lock()
+ defer p.Unlock()
+ entry, ok := p.perItemBackoff[id]
+ if !ok {
+ return false
+ }
+ if hasExpired(eventTime, entry.lastUpdate, p.maxDuration) {
+ return false
+ }
+ return eventTime.Sub(entry.lastUpdate) < entry.backoff
+}
+
+// Garbage collect records that have aged past maxDuration. Backoff users are expected
+// to invoke this periodically.
+func (p *Backoff) GC() {
+ p.Lock()
+ defer p.Unlock()
+ now := p.Clock.Now()
+ for id, entry := range p.perItemBackoff {
+ if now.Sub(entry.lastUpdate) > p.maxDuration*2 {
+ // GC when entry has not been updated for 2*maxDuration
+ delete(p.perItemBackoff, id)
+ }
+ }
+}
+
+func (p *Backoff) DeleteEntry(id string) {
+ p.Lock()
+ defer p.Unlock()
+ delete(p.perItemBackoff, id)
+}
+
+// Take a lock on *Backoff, before calling initEntryUnsafe
+func (p *Backoff) initEntryUnsafe(id string) *backoffEntry {
+ entry := &backoffEntry{backoff: p.defaultDuration}
+ p.perItemBackoff[id] = entry
+ return entry
+}
+
+// After 2*maxDuration we restart the backoff factor to the beginning
+func hasExpired(eventTime time.Time, lastUpdate time.Time, maxDuration time.Duration) bool {
+ return eventTime.Sub(lastUpdate) > maxDuration*2 // consider stable if it's ok for twice the maxDuration
+}
diff --git a/vendor/k8s.io/client-go/util/flowcontrol/throttle.go b/vendor/k8s.io/client-go/util/flowcontrol/throttle.go
new file mode 100644
index 000000000..c45169c40
--- /dev/null
+++ b/vendor/k8s.io/client-go/util/flowcontrol/throttle.go
@@ -0,0 +1,148 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package flowcontrol
+
+import (
+ "sync"
+
+ "github.com/juju/ratelimit"
+)
+
+type RateLimiter interface {
+ // TryAccept returns true if a token is taken immediately. Otherwise,
+ // it returns false.
+ TryAccept() bool
+ // Accept returns once a token becomes available.
+ Accept()
+ // Stop stops the rate limiter, subsequent calls to CanAccept will return false
+ Stop()
+ // Saturation returns a percentage number which describes how saturated
+ // this rate limiter is.
+ // Usually we use token bucket rate limiter. In that case,
+ // 1.0 means no tokens are available; 0.0 means we have a full bucket of tokens to use.
+ Saturation() float64
+ // QPS returns QPS of this rate limiter
+ QPS() float32
+}
+
+type tokenBucketRateLimiter struct {
+ limiter *ratelimit.Bucket
+ qps float32
+}
+
+// NewTokenBucketRateLimiter creates a rate limiter which implements a token bucket approach.
+// The rate limiter allows bursts of up to 'burst' to exceed the QPS, while still maintaining a
+// smoothed qps rate of 'qps'.
+// The bucket is initially filled with 'burst' tokens, and refills at a rate of 'qps'.
+// The maximum number of tokens in the bucket is capped at 'burst'.
+func NewTokenBucketRateLimiter(qps float32, burst int) RateLimiter {
+ limiter := ratelimit.NewBucketWithRate(float64(qps), int64(burst))
+ return newTokenBucketRateLimiter(limiter, qps)
+}
+
+// An injectable, mockable clock interface.
+type Clock interface {
+ ratelimit.Clock
+}
+
+// NewTokenBucketRateLimiterWithClock is identical to NewTokenBucketRateLimiter
+// but allows an injectable clock, for testing.
+func NewTokenBucketRateLimiterWithClock(qps float32, burst int, clock Clock) RateLimiter {
+ limiter := ratelimit.NewBucketWithRateAndClock(float64(qps), int64(burst), clock)
+ return newTokenBucketRateLimiter(limiter, qps)
+}
+
+func newTokenBucketRateLimiter(limiter *ratelimit.Bucket, qps float32) RateLimiter {
+ return &tokenBucketRateLimiter{
+ limiter: limiter,
+ qps: qps,
+ }
+}
+
+func (t *tokenBucketRateLimiter) TryAccept() bool {
+ return t.limiter.TakeAvailable(1) == 1
+}
+
+func (t *tokenBucketRateLimiter) Saturation() float64 {
+ capacity := t.limiter.Capacity()
+ avail := t.limiter.Available()
+ return float64(capacity-avail) / float64(capacity)
+}
+
+// Accept will block until a token becomes available
+func (t *tokenBucketRateLimiter) Accept() {
+ t.limiter.Wait(1)
+}
+
+func (t *tokenBucketRateLimiter) Stop() {
+}
+
+func (t *tokenBucketRateLimiter) QPS() float32 {
+ return t.qps
+}
+
+type fakeAlwaysRateLimiter struct{}
+
+func NewFakeAlwaysRateLimiter() RateLimiter {
+ return &fakeAlwaysRateLimiter{}
+}
+
+func (t *fakeAlwaysRateLimiter) TryAccept() bool {
+ return true
+}
+
+func (t *fakeAlwaysRateLimiter) Saturation() float64 {
+ return 0
+}
+
+func (t *fakeAlwaysRateLimiter) Stop() {}
+
+func (t *fakeAlwaysRateLimiter) Accept() {}
+
+func (t *fakeAlwaysRateLimiter) QPS() float32 {
+ return 1
+}
+
+type fakeNeverRateLimiter struct {
+ wg sync.WaitGroup
+}
+
+func NewFakeNeverRateLimiter() RateLimiter {
+ rl := fakeNeverRateLimiter{}
+ rl.wg.Add(1)
+ return &rl
+}
+
+func (t *fakeNeverRateLimiter) TryAccept() bool {
+ return false
+}
+
+func (t *fakeNeverRateLimiter) Saturation() float64 {
+ return 1
+}
+
+func (t *fakeNeverRateLimiter) Stop() {
+ t.wg.Done()
+}
+
+func (t *fakeNeverRateLimiter) Accept() {
+ t.wg.Wait()
+}
+
+func (t *fakeNeverRateLimiter) QPS() float32 {
+ return 1
+}
diff --git a/vendor/k8s.io/client-go/util/homedir/homedir.go b/vendor/k8s.io/client-go/util/homedir/homedir.go
new file mode 100644
index 000000000..816db57f5
--- /dev/null
+++ b/vendor/k8s.io/client-go/util/homedir/homedir.go
@@ -0,0 +1,47 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package homedir
+
+import (
+ "os"
+ "runtime"
+)
+
+// HomeDir returns the home directory for the current user
+func HomeDir() string {
+ if runtime.GOOS == "windows" {
+
+ // First prefer the HOME environmental variable
+ if home := os.Getenv("HOME"); len(home) > 0 {
+ if _, err := os.Stat(home); err == nil {
+ return home
+ }
+ }
+ if homeDrive, homePath := os.Getenv("HOMEDRIVE"), os.Getenv("HOMEPATH"); len(homeDrive) > 0 && len(homePath) > 0 {
+ homeDir := homeDrive + homePath
+ if _, err := os.Stat(homeDir); err == nil {
+ return homeDir
+ }
+ }
+ if userProfile := os.Getenv("USERPROFILE"); len(userProfile) > 0 {
+ if _, err := os.Stat(userProfile); err == nil {
+ return userProfile
+ }
+ }
+ }
+ return os.Getenv("HOME")
+}
diff --git a/vendor/k8s.io/client-go/util/integer/integer.go b/vendor/k8s.io/client-go/util/integer/integer.go
new file mode 100644
index 000000000..c6ea106f9
--- /dev/null
+++ b/vendor/k8s.io/client-go/util/integer/integer.go
@@ -0,0 +1,67 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package integer
+
+func IntMax(a, b int) int {
+ if b > a {
+ return b
+ }
+ return a
+}
+
+func IntMin(a, b int) int {
+ if b < a {
+ return b
+ }
+ return a
+}
+
+func Int32Max(a, b int32) int32 {
+ if b > a {
+ return b
+ }
+ return a
+}
+
+func Int32Min(a, b int32) int32 {
+ if b < a {
+ return b
+ }
+ return a
+}
+
+func Int64Max(a, b int64) int64 {
+ if b > a {
+ return b
+ }
+ return a
+}
+
+func Int64Min(a, b int64) int64 {
+ if b < a {
+ return b
+ }
+ return a
+}
+
+// RoundToInt32 rounds floats into integer numbers.
+func RoundToInt32(a float64) int32 {
+ if a < 0 {
+ return int32(a - 0.5)
+ }
+ return int32(a + 0.5)
+}
diff --git a/vendor/k8s.io/kubernetes/LICENSE b/vendor/k8s.io/kubernetes/LICENSE
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/k8s.io/kubernetes/README.md b/vendor/k8s.io/kubernetes/README.md
new file mode 100644
index 000000000..e859cd7a1
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/README.md
@@ -0,0 +1,86 @@
+# Kubernetes
+
+[![Submit Queue Widget]][Submit Queue] [![GoDoc Widget]][GoDoc]
+
+<img src="https://github.com/kubernetes/kubernetes/raw/master/logo/logo.png" width="100">
+
+----
+
+Kubernetes is an open source system for managing [containerized applications]
+across multiple hosts, providing basic mechanisms for deployment, maintenance,
+and scaling of applications.
+
+Kubernetes builds upon a decade and a half of experience at Google running
+production workloads at scale using a system called [Borg],
+combined with best-of-breed ideas and practices from the community.
+
+Kubernetes is hosted by the Cloud Native Computing Foundation ([CNCF]).
+If you are a company that wants to help shape the evolution of
+technologies that are container-packaged, dynamically-scheduled
+and microservices-oriented, consider joining the CNCF.
+For details about who's involved and how Kubernetes plays a role,
+read the CNCF [announcement].
+
+----
+
+## To start using Kubernetes
+
+See our documentation on [kubernetes.io].
+
+Try our [interactive tutorial].
+
+Take a free course on [Scalable Microservices with Kubernetes].
+
+## To start developing Kubernetes
+
+The [community repository] hosts all information about
+building Kubernetes from source, how to contribute code
+and documentation, who to contact about what, etc.
+
+If you want to build Kubernetes right away there are two options:
+
+##### You have a working [Go environment].
+
+```
+$ go get -d k8s.io/kubernetes
+$ cd $GOPATH/src/k8s.io/kubernetes
+$ make
+```
+
+##### You have a working [Docker environment].
+
+```
+$ git clone https://github.com/kubernetes/kubernetes
+$ cd kubernetes
+$ make quick-release
+```
+
+If you are less impatient, head over to the [developer's documentation].
+
+## Support
+
+If you need support, start with the [troubleshooting guide]
+and work your way through the process that we've outlined.
+
+That said, if you have questions, reach out to us
+[one way or another][communication].
+
+[announcement]: https://cncf.io/news/announcement/2015/07/new-cloud-native-computing-foundation-drive-alignment-among-container
+[Borg]: https://research.google.com/pubs/pub43438.html
+[CNCF]: https://www.cncf.io/about
+[communication]: https://github.com/kubernetes/community/blob/master/communication.md
+[community repository]: https://github.com/kubernetes/community
+[containerized applications]: https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/
+[developer's documentation]: https://github.com/kubernetes/community/tree/master/contributors/devel
+[Docker environment]: https://docs.docker.com/engine
+[Go environment]: https://golang.org/doc/install
+[GoDoc]: https://godoc.org/k8s.io/kubernetes
+[GoDoc Widget]: https://godoc.org/k8s.io/kubernetes?status.svg
+[interactive tutorial]: http://kubernetes.io/docs/tutorials/kubernetes-basics
+[kubernetes.io]: http://kubernetes.io
+[Scalable Microservices with Kubernetes]: https://www.udacity.com/course/scalable-microservices-with-kubernetes--ud615
+[Submit Queue]: http://submit-queue.k8s.io/#/e2e
+[Submit Queue Widget]: http://submit-queue.k8s.io/health.svg?v=1
+[troubleshooting guide]: https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/
+
+[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/README.md?pixel)]()
diff --git a/vendor/k8s.io/kubernetes/pkg/api/annotation_key_constants.go b/vendor/k8s.io/kubernetes/pkg/api/annotation_key_constants.go
new file mode 100644
index 000000000..e1080a34a
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/annotation_key_constants.go
@@ -0,0 +1,113 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file should be consistent with pkg/api/v1/annotation_key_constants.go.
+
+package api
+
+const (
+ // ImagePolicyFailedOpenKey is added to pods created by failing open when the image policy
+ // webhook backend fails.
+ ImagePolicyFailedOpenKey string = "alpha.image-policy.k8s.io/failed-open"
+
+ // PodPresetOptOutAnnotationKey represents the annotation key for a pod to exempt itself from pod preset manipulation
+ PodPresetOptOutAnnotationKey string = "podpreset.admission.kubernetes.io/exclude"
+
+ // MirrorAnnotationKey represents the annotation key set by kubelets when creating mirror pods
+ MirrorPodAnnotationKey string = "kubernetes.io/config.mirror"
+
+ // TolerationsAnnotationKey represents the key of tolerations data (json serialized)
+ // in the Annotations of a Pod.
+ TolerationsAnnotationKey string = "scheduler.alpha.kubernetes.io/tolerations"
+
+ // TaintsAnnotationKey represents the key of taints data (json serialized)
+ // in the Annotations of a Node.
+ TaintsAnnotationKey string = "scheduler.alpha.kubernetes.io/taints"
+
+ // SeccompPodAnnotationKey represents the key of a seccomp profile applied
+ // to all containers of a pod.
+ SeccompPodAnnotationKey string = "seccomp.security.alpha.kubernetes.io/pod"
+
+ // SeccompContainerAnnotationKeyPrefix represents the key of a seccomp profile applied
+ // to one container of a pod.
+ SeccompContainerAnnotationKeyPrefix string = "container.seccomp.security.alpha.kubernetes.io/"
+
+ // CreatedByAnnotation represents the key used to store the spec(json)
+ // used to create the resource.
+ CreatedByAnnotation = "kubernetes.io/created-by"
+
+ // PreferAvoidPodsAnnotationKey represents the key of preferAvoidPods data (json serialized)
+ // in the Annotations of a Node.
+ PreferAvoidPodsAnnotationKey string = "scheduler.alpha.kubernetes.io/preferAvoidPods"
+
+ // SysctlsPodAnnotationKey represents the key of sysctls which are set for the infrastructure
+ // container of a pod. The annotation value is a comma separated list of sysctl_name=value
+ // key-value pairs. Only a limited set of whitelisted and isolated sysctls is supported by
+ // the kubelet. Pods with other sysctls will fail to launch.
+ SysctlsPodAnnotationKey string = "security.alpha.kubernetes.io/sysctls"
+
+ // UnsafeSysctlsPodAnnotationKey represents the key of sysctls which are set for the infrastructure
+ // container of a pod. The annotation value is a comma separated list of sysctl_name=value
+ // key-value pairs. Unsafe sysctls must be explicitly enabled for a kubelet. They are properly
+ // namespaced to a pod or a container, but their isolation is usually unclear or weak. Their use
+ // is at-your-own-risk. Pods that attempt to set an unsafe sysctl that is not enabled for a kubelet
+ // will fail to launch.
+ UnsafeSysctlsPodAnnotationKey string = "security.alpha.kubernetes.io/unsafe-sysctls"
+
+ // ObjectTTLAnnotations represents a suggestion for kubelet for how long it can cache
+ // an object (e.g. secret, config map) before fetching it again from apiserver.
+ // This annotation can be attached to node.
+ ObjectTTLAnnotationKey string = "node.alpha.kubernetes.io/ttl"
+
+ // AffinityAnnotationKey represents the key of affinity data (json serialized)
+ // in the Annotations of a Pod.
+ // TODO: remove when alpha support for affinity is removed
+ AffinityAnnotationKey string = "scheduler.alpha.kubernetes.io/affinity"
+
+ // annotation key prefix used to identify non-convertible json paths.
+ NonConvertibleAnnotationPrefix = "non-convertible.kubernetes.io"
+
+ kubectlPrefix = "kubectl.kubernetes.io/"
+
+ // LastAppliedConfigAnnotation is the annotation used to store the previous
+ // configuration of a resource for use in a three way diff by UpdateApplyAnnotation.
+ LastAppliedConfigAnnotation = kubectlPrefix + "last-applied-configuration"
+
+ // AnnotationLoadBalancerSourceRangesKey is the key of the annotation on a service to set allowed ingress ranges on their LoadBalancers
+ //
+ // It should be a comma-separated list of CIDRs, e.g. `0.0.0.0/0` to
+ // allow full access (the default) or `18.0.0.0/8,56.0.0.0/8` to allow
+ // access only from the CIDRs currently allocated to MIT & the USPS.
+ //
+ // Not all cloud providers support this annotation, though AWS & GCE do.
+ AnnotationLoadBalancerSourceRangesKey = "service.beta.kubernetes.io/load-balancer-source-ranges"
+
+ // AnnotationValueExternalTrafficLocal Value of annotation to specify local endpoints behavior.
+ AnnotationValueExternalTrafficLocal = "OnlyLocal"
+ // AnnotationValueExternalTrafficGlobal Value of annotation to specify global (legacy) behavior.
+ AnnotationValueExternalTrafficGlobal = "Global"
+
+ // TODO: The beta annotations have been deprecated, remove them when we release k8s 1.8.
+
+ // BetaAnnotationHealthCheckNodePort Annotation specifying the healthcheck nodePort for the service.
+ // If not specified, annotation is created by the service api backend with the allocated nodePort.
+ // Will use user-specified nodePort value if specified by the client.
+ BetaAnnotationHealthCheckNodePort = "service.beta.kubernetes.io/healthcheck-nodeport"
+
+ // BetaAnnotationExternalTraffic An annotation that denotes if this Service desires to route
+ // external traffic to local endpoints only. This preserves Source IP and avoids a second hop.
+ BetaAnnotationExternalTraffic = "service.beta.kubernetes.io/external-traffic"
+)
diff --git a/vendor/k8s.io/kubernetes/pkg/api/doc.go b/vendor/k8s.io/kubernetes/pkg/api/doc.go
new file mode 100644
index 000000000..283a83e40
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/doc.go
@@ -0,0 +1,24 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+
+// Package api contains the latest (or "internal") version of the
+// Kubernetes API objects. This is the API objects as represented in memory.
+// The contract presented to clients is located in the versioned packages,
+// which are sub-directories. The first one is "v1". Those packages
+// describe how a particular version is serialized to storage/network.
+package api // import "k8s.io/kubernetes/pkg/api"
diff --git a/vendor/k8s.io/kubernetes/pkg/api/field_constants.go b/vendor/k8s.io/kubernetes/pkg/api/field_constants.go
new file mode 100644
index 000000000..5ead0f13f
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/field_constants.go
@@ -0,0 +1,38 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package api
+
+// Field path constants that are specific to the internal API
+// representation.
+const (
+ NodeUnschedulableField = "spec.unschedulable"
+ ObjectNameField = "metadata.name"
+ PodHostField = "spec.nodeName"
+ PodStatusField = "status.phase"
+ SecretTypeField = "type"
+
+ EventReasonField = "reason"
+ EventSourceField = "source"
+ EventTypeField = "type"
+ EventInvolvedKindField = "involvedObject.kind"
+ EventInvolvedNamespaceField = "involvedObject.namespace"
+ EventInvolvedNameField = "involvedObject.name"
+ EventInvolvedUIDField = "involvedObject.uid"
+ EventInvolvedAPIVersionField = "involvedObject.apiVersion"
+ EventInvolvedResourceVersionField = "involvedObject.resourceVersion"
+ EventInvolvedFieldPathField = "involvedObject.fieldPath"
+)
diff --git a/vendor/k8s.io/kubernetes/pkg/api/helper/helpers.go b/vendor/k8s.io/kubernetes/pkg/api/helper/helpers.go
new file mode 100644
index 000000000..46916b785
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/helper/helpers.go
@@ -0,0 +1,604 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package helper
+
+import (
+ "encoding/json"
+ "fmt"
+ "strings"
+
+ "k8s.io/apimachinery/pkg/api/resource"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/conversion"
+ "k8s.io/apimachinery/pkg/fields"
+ "k8s.io/apimachinery/pkg/labels"
+ "k8s.io/apimachinery/pkg/selection"
+ "k8s.io/apimachinery/pkg/util/sets"
+ "k8s.io/kubernetes/pkg/api"
+)
+
+// NonConvertibleFields iterates over the provided map and filters out all but
+// any keys with the "non-convertible.kubernetes.io" prefix.
+func NonConvertibleFields(annotations map[string]string) map[string]string {
+ nonConvertibleKeys := map[string]string{}
+ for key, value := range annotations {
+ if strings.HasPrefix(key, api.NonConvertibleAnnotationPrefix) {
+ nonConvertibleKeys[key] = value
+ }
+ }
+ return nonConvertibleKeys
+}
+
+// Semantic can do semantic deep equality checks for api objects.
+// Example: apiequality.Semantic.DeepEqual(aPod, aPodWithNonNilButEmptyMaps) == true
+var Semantic = conversion.EqualitiesOrDie(
+ func(a, b resource.Quantity) bool {
+ // Ignore formatting, only care that numeric value stayed the same.
+ // TODO: if we decide it's important, it should be safe to start comparing the format.
+ //
+ // Uninitialized quantities are equivalent to 0 quantities.
+ return a.Cmp(b) == 0
+ },
+ func(a, b metav1.Time) bool {
+ return a.UTC() == b.UTC()
+ },
+ func(a, b labels.Selector) bool {
+ return a.String() == b.String()
+ },
+ func(a, b fields.Selector) bool {
+ return a.String() == b.String()
+ },
+)
+
+var standardResourceQuotaScopes = sets.NewString(
+ string(api.ResourceQuotaScopeTerminating),
+ string(api.ResourceQuotaScopeNotTerminating),
+ string(api.ResourceQuotaScopeBestEffort),
+ string(api.ResourceQuotaScopeNotBestEffort),
+)
+
+// IsStandardResourceQuotaScope returns true if the scope is a standard value
+func IsStandardResourceQuotaScope(str string) bool {
+ return standardResourceQuotaScopes.Has(str)
+}
+
+var podObjectCountQuotaResources = sets.NewString(
+ string(api.ResourcePods),
+)
+
+var podComputeQuotaResources = sets.NewString(
+ string(api.ResourceCPU),
+ string(api.ResourceMemory),
+ string(api.ResourceLimitsCPU),
+ string(api.ResourceLimitsMemory),
+ string(api.ResourceRequestsCPU),
+ string(api.ResourceRequestsMemory),
+)
+
+// IsResourceQuotaScopeValidForResource returns true if the resource applies to the specified scope
+func IsResourceQuotaScopeValidForResource(scope api.ResourceQuotaScope, resource string) bool {
+ switch scope {
+ case api.ResourceQuotaScopeTerminating, api.ResourceQuotaScopeNotTerminating, api.ResourceQuotaScopeNotBestEffort:
+ return podObjectCountQuotaResources.Has(resource) || podComputeQuotaResources.Has(resource)
+ case api.ResourceQuotaScopeBestEffort:
+ return podObjectCountQuotaResources.Has(resource)
+ default:
+ return true
+ }
+}
+
+var standardContainerResources = sets.NewString(
+ string(api.ResourceCPU),
+ string(api.ResourceMemory),
+)
+
+// IsStandardContainerResourceName returns true if the container can make a resource request
+// for the specified resource
+func IsStandardContainerResourceName(str string) bool {
+ return standardContainerResources.Has(str)
+}
+
+// IsOpaqueIntResourceName returns true if the resource name has the opaque
+// integer resource prefix.
+func IsOpaqueIntResourceName(name api.ResourceName) bool {
+ return strings.HasPrefix(string(name), api.ResourceOpaqueIntPrefix)
+}
+
+// OpaqueIntResourceName returns a ResourceName with the canonical opaque
+// integer prefix prepended. If the argument already has the prefix, it is
+// returned unmodified.
+func OpaqueIntResourceName(name string) api.ResourceName {
+ if IsOpaqueIntResourceName(api.ResourceName(name)) {
+ return api.ResourceName(name)
+ }
+ return api.ResourceName(fmt.Sprintf("%s%s", api.ResourceOpaqueIntPrefix, name))
+}
+
+var standardLimitRangeTypes = sets.NewString(
+ string(api.LimitTypePod),
+ string(api.LimitTypeContainer),
+ string(api.LimitTypePersistentVolumeClaim),
+)
+
+// IsStandardLimitRangeType returns true if the type is Pod or Container
+func IsStandardLimitRangeType(str string) bool {
+ return standardLimitRangeTypes.Has(str)
+}
+
+var standardQuotaResources = sets.NewString(
+ string(api.ResourceCPU),
+ string(api.ResourceMemory),
+ string(api.ResourceRequestsCPU),
+ string(api.ResourceRequestsMemory),
+ string(api.ResourceRequestsStorage),
+ string(api.ResourceLimitsCPU),
+ string(api.ResourceLimitsMemory),
+ string(api.ResourcePods),
+ string(api.ResourceQuotas),
+ string(api.ResourceServices),
+ string(api.ResourceReplicationControllers),
+ string(api.ResourceSecrets),
+ string(api.ResourcePersistentVolumeClaims),
+ string(api.ResourceConfigMaps),
+ string(api.ResourceServicesNodePorts),
+ string(api.ResourceServicesLoadBalancers),
+)
+
+// IsStandardQuotaResourceName returns true if the resource is known to
+// the quota tracking system
+func IsStandardQuotaResourceName(str string) bool {
+ return standardQuotaResources.Has(str)
+}
+
+var standardResources = sets.NewString(
+ string(api.ResourceCPU),
+ string(api.ResourceMemory),
+ string(api.ResourceRequestsCPU),
+ string(api.ResourceRequestsMemory),
+ string(api.ResourceLimitsCPU),
+ string(api.ResourceLimitsMemory),
+ string(api.ResourcePods),
+ string(api.ResourceQuotas),
+ string(api.ResourceServices),
+ string(api.ResourceReplicationControllers),
+ string(api.ResourceSecrets),
+ string(api.ResourceConfigMaps),
+ string(api.ResourcePersistentVolumeClaims),
+ string(api.ResourceStorage),
+ string(api.ResourceRequestsStorage),
+)
+
+// IsStandardResourceName returns true if the resource is known to the system
+func IsStandardResourceName(str string) bool {
+ return standardResources.Has(str)
+}
+
+var integerResources = sets.NewString(
+ string(api.ResourcePods),
+ string(api.ResourceQuotas),
+ string(api.ResourceServices),
+ string(api.ResourceReplicationControllers),
+ string(api.ResourceSecrets),
+ string(api.ResourceConfigMaps),
+ string(api.ResourcePersistentVolumeClaims),
+ string(api.ResourceServicesNodePorts),
+ string(api.ResourceServicesLoadBalancers),
+)
+
+// IsIntegerResourceName returns true if the resource is measured in integer values
+func IsIntegerResourceName(str string) bool {
+ return integerResources.Has(str) || IsOpaqueIntResourceName(api.ResourceName(str))
+}
+
+// this function aims to check if the service's ClusterIP is set or not
+// the objective is not to perform validation here
+func IsServiceIPSet(service *api.Service) bool {
+ return service.Spec.ClusterIP != api.ClusterIPNone && service.Spec.ClusterIP != ""
+}
+
+// this function aims to check if the service's cluster IP is requested or not
+func IsServiceIPRequested(service *api.Service) bool {
+ // ExternalName services are CNAME aliases to external ones. Ignore the IP.
+ if service.Spec.Type == api.ServiceTypeExternalName {
+ return false
+ }
+ return service.Spec.ClusterIP == ""
+}
+
+var standardFinalizers = sets.NewString(
+ string(api.FinalizerKubernetes),
+ metav1.FinalizerOrphanDependents,
+ metav1.FinalizerDeleteDependents,
+)
+
+// HasAnnotation returns a bool if passed in annotation exists
+func HasAnnotation(obj api.ObjectMeta, ann string) bool {
+ _, found := obj.Annotations[ann]
+ return found
+}
+
+// SetMetaDataAnnotation sets the annotation and value
+func SetMetaDataAnnotation(obj *api.ObjectMeta, ann string, value string) {
+ if obj.Annotations == nil {
+ obj.Annotations = make(map[string]string)
+ }
+ obj.Annotations[ann] = value
+}
+
+func IsStandardFinalizerName(str string) bool {
+ return standardFinalizers.Has(str)
+}
+
+// AddToNodeAddresses appends the NodeAddresses to the passed-by-pointer slice,
+// only if they do not already exist
+func AddToNodeAddresses(addresses *[]api.NodeAddress, addAddresses ...api.NodeAddress) {
+ for _, add := range addAddresses {
+ exists := false
+ for _, existing := range *addresses {
+ if existing.Address == add.Address && existing.Type == add.Type {
+ exists = true
+ break
+ }
+ }
+ if !exists {
+ *addresses = append(*addresses, add)
+ }
+ }
+}
+
+// TODO: make method on LoadBalancerStatus?
+func LoadBalancerStatusEqual(l, r *api.LoadBalancerStatus) bool {
+ return ingressSliceEqual(l.Ingress, r.Ingress)
+}
+
+func ingressSliceEqual(lhs, rhs []api.LoadBalancerIngress) bool {
+ if len(lhs) != len(rhs) {
+ return false
+ }
+ for i := range lhs {
+ if !ingressEqual(&lhs[i], &rhs[i]) {
+ return false
+ }
+ }
+ return true
+}
+
+func ingressEqual(lhs, rhs *api.LoadBalancerIngress) bool {
+ if lhs.IP != rhs.IP {
+ return false
+ }
+ if lhs.Hostname != rhs.Hostname {
+ return false
+ }
+ return true
+}
+
+// TODO: make method on LoadBalancerStatus?
+func LoadBalancerStatusDeepCopy(lb *api.LoadBalancerStatus) *api.LoadBalancerStatus {
+ c := &api.LoadBalancerStatus{}
+ c.Ingress = make([]api.LoadBalancerIngress, len(lb.Ingress))
+ for i := range lb.Ingress {
+ c.Ingress[i] = lb.Ingress[i]
+ }
+ return c
+}
+
+// GetAccessModesAsString returns a string representation of an array of access modes.
+// modes, when present, are always in the same order: RWO,ROX,RWX.
+func GetAccessModesAsString(modes []api.PersistentVolumeAccessMode) string {
+ modes = removeDuplicateAccessModes(modes)
+ modesStr := []string{}
+ if containsAccessMode(modes, api.ReadWriteOnce) {
+ modesStr = append(modesStr, "RWO")
+ }
+ if containsAccessMode(modes, api.ReadOnlyMany) {
+ modesStr = append(modesStr, "ROX")
+ }
+ if containsAccessMode(modes, api.ReadWriteMany) {
+ modesStr = append(modesStr, "RWX")
+ }
+ return strings.Join(modesStr, ",")
+}
+
+// GetAccessModesAsString returns an array of AccessModes from a string created by GetAccessModesAsString
+func GetAccessModesFromString(modes string) []api.PersistentVolumeAccessMode {
+ strmodes := strings.Split(modes, ",")
+ accessModes := []api.PersistentVolumeAccessMode{}
+ for _, s := range strmodes {
+ s = strings.Trim(s, " ")
+ switch {
+ case s == "RWO":
+ accessModes = append(accessModes, api.ReadWriteOnce)
+ case s == "ROX":
+ accessModes = append(accessModes, api.ReadOnlyMany)
+ case s == "RWX":
+ accessModes = append(accessModes, api.ReadWriteMany)
+ }
+ }
+ return accessModes
+}
+
+// removeDuplicateAccessModes returns an array of access modes without any duplicates
+func removeDuplicateAccessModes(modes []api.PersistentVolumeAccessMode) []api.PersistentVolumeAccessMode {
+ accessModes := []api.PersistentVolumeAccessMode{}
+ for _, m := range modes {
+ if !containsAccessMode(accessModes, m) {
+ accessModes = append(accessModes, m)
+ }
+ }
+ return accessModes
+}
+
+func containsAccessMode(modes []api.PersistentVolumeAccessMode, mode api.PersistentVolumeAccessMode) bool {
+ for _, m := range modes {
+ if m == mode {
+ return true
+ }
+ }
+ return false
+}
+
+// NodeSelectorRequirementsAsSelector converts the []NodeSelectorRequirement api type into a struct that implements
+// labels.Selector.
+func NodeSelectorRequirementsAsSelector(nsm []api.NodeSelectorRequirement) (labels.Selector, error) {
+ if len(nsm) == 0 {
+ return labels.Nothing(), nil
+ }
+ selector := labels.NewSelector()
+ for _, expr := range nsm {
+ var op selection.Operator
+ switch expr.Operator {
+ case api.NodeSelectorOpIn:
+ op = selection.In
+ case api.NodeSelectorOpNotIn:
+ op = selection.NotIn
+ case api.NodeSelectorOpExists:
+ op = selection.Exists
+ case api.NodeSelectorOpDoesNotExist:
+ op = selection.DoesNotExist
+ case api.NodeSelectorOpGt:
+ op = selection.GreaterThan
+ case api.NodeSelectorOpLt:
+ op = selection.LessThan
+ default:
+ return nil, fmt.Errorf("%q is not a valid node selector operator", expr.Operator)
+ }
+ r, err := labels.NewRequirement(expr.Key, op, expr.Values)
+ if err != nil {
+ return nil, err
+ }
+ selector = selector.Add(*r)
+ }
+ return selector, nil
+}
+
+// GetTolerationsFromPodAnnotations gets the json serialized tolerations data from Pod.Annotations
+// and converts it to the []Toleration type in api.
+func GetTolerationsFromPodAnnotations(annotations map[string]string) ([]api.Toleration, error) {
+ var tolerations []api.Toleration
+ if len(annotations) > 0 && annotations[api.TolerationsAnnotationKey] != "" {
+ err := json.Unmarshal([]byte(annotations[api.TolerationsAnnotationKey]), &tolerations)
+ if err != nil {
+ return tolerations, err
+ }
+ }
+ return tolerations, nil
+}
+
+// AddOrUpdateTolerationInPod tries to add a toleration to the pod's toleration list.
+// Returns true if something was updated, false otherwise.
+func AddOrUpdateTolerationInPod(pod *api.Pod, toleration *api.Toleration) bool {
+ podTolerations := pod.Spec.Tolerations
+
+ var newTolerations []api.Toleration
+ updated := false
+ for i := range podTolerations {
+ if toleration.MatchToleration(&podTolerations[i]) {
+ if Semantic.DeepEqual(toleration, podTolerations[i]) {
+ return false
+ }
+ newTolerations = append(newTolerations, *toleration)
+ updated = true
+ continue
+ }
+
+ newTolerations = append(newTolerations, podTolerations[i])
+ }
+
+ if !updated {
+ newTolerations = append(newTolerations, *toleration)
+ }
+
+ pod.Spec.Tolerations = newTolerations
+ return true
+}
+
+// TolerationToleratesTaint checks if the toleration tolerates the taint.
+func TolerationToleratesTaint(toleration *api.Toleration, taint *api.Taint) bool {
+ if len(toleration.Effect) != 0 && toleration.Effect != taint.Effect {
+ return false
+ }
+
+ if toleration.Key != taint.Key {
+ return false
+ }
+ // TODO: Use proper defaulting when Toleration becomes a field of PodSpec
+ if (len(toleration.Operator) == 0 || toleration.Operator == api.TolerationOpEqual) && toleration.Value == taint.Value {
+ return true
+ }
+ if toleration.Operator == api.TolerationOpExists {
+ return true
+ }
+ return false
+}
+
+// TaintToleratedByTolerations checks if taint is tolerated by any of the tolerations.
+func TaintToleratedByTolerations(taint *api.Taint, tolerations []api.Toleration) bool {
+ tolerated := false
+ for i := range tolerations {
+ if TolerationToleratesTaint(&tolerations[i], taint) {
+ tolerated = true
+ break
+ }
+ }
+ return tolerated
+}
+
+// GetTaintsFromNodeAnnotations gets the json serialized taints data from Pod.Annotations
+// and converts it to the []Taint type in api.
+func GetTaintsFromNodeAnnotations(annotations map[string]string) ([]api.Taint, error) {
+ var taints []api.Taint
+ if len(annotations) > 0 && annotations[api.TaintsAnnotationKey] != "" {
+ err := json.Unmarshal([]byte(annotations[api.TaintsAnnotationKey]), &taints)
+ if err != nil {
+ return []api.Taint{}, err
+ }
+ }
+ return taints, nil
+}
+
+// SysctlsFromPodAnnotations parses the sysctl annotations into a slice of safe Sysctls
+// and a slice of unsafe Sysctls. This is only a convenience wrapper around
+// SysctlsFromPodAnnotation.
+func SysctlsFromPodAnnotations(a map[string]string) ([]api.Sysctl, []api.Sysctl, error) {
+ safe, err := SysctlsFromPodAnnotation(a[api.SysctlsPodAnnotationKey])
+ if err != nil {
+ return nil, nil, err
+ }
+ unsafe, err := SysctlsFromPodAnnotation(a[api.UnsafeSysctlsPodAnnotationKey])
+ if err != nil {
+ return nil, nil, err
+ }
+
+ return safe, unsafe, nil
+}
+
+// SysctlsFromPodAnnotation parses an annotation value into a slice of Sysctls.
+func SysctlsFromPodAnnotation(annotation string) ([]api.Sysctl, error) {
+ if len(annotation) == 0 {
+ return nil, nil
+ }
+
+ kvs := strings.Split(annotation, ",")
+ sysctls := make([]api.Sysctl, len(kvs))
+ for i, kv := range kvs {
+ cs := strings.Split(kv, "=")
+ if len(cs) != 2 || len(cs[0]) == 0 {
+ return nil, fmt.Errorf("sysctl %q not of the format sysctl_name=value", kv)
+ }
+ sysctls[i].Name = cs[0]
+ sysctls[i].Value = cs[1]
+ }
+ return sysctls, nil
+}
+
+// PodAnnotationsFromSysctls creates an annotation value for a slice of Sysctls.
+func PodAnnotationsFromSysctls(sysctls []api.Sysctl) string {
+ if len(sysctls) == 0 {
+ return ""
+ }
+
+ kvs := make([]string, len(sysctls))
+ for i := range sysctls {
+ kvs[i] = fmt.Sprintf("%s=%s", sysctls[i].Name, sysctls[i].Value)
+ }
+ return strings.Join(kvs, ",")
+}
+
+// GetAffinityFromPodAnnotations gets the json serialized affinity data from Pod.Annotations
+// and converts it to the Affinity type in api.
+// TODO: remove when alpha support for affinity is removed
+func GetAffinityFromPodAnnotations(annotations map[string]string) (*api.Affinity, error) {
+ if len(annotations) > 0 && annotations[api.AffinityAnnotationKey] != "" {
+ var affinity api.Affinity
+ err := json.Unmarshal([]byte(annotations[api.AffinityAnnotationKey]), &affinity)
+ if err != nil {
+ return nil, err
+ }
+ return &affinity, nil
+ }
+ return nil, nil
+}
+
+// GetPersistentVolumeClass returns StorageClassName.
+func GetPersistentVolumeClass(volume *api.PersistentVolume) string {
+ // Use beta annotation first
+ if class, found := volume.Annotations[api.BetaStorageClassAnnotation]; found {
+ return class
+ }
+
+ return volume.Spec.StorageClassName
+}
+
+// GetPersistentVolumeClaimClass returns StorageClassName. If no storage class was
+// requested, it returns "".
+func GetPersistentVolumeClaimClass(claim *api.PersistentVolumeClaim) string {
+ // Use beta annotation first
+ if class, found := claim.Annotations[api.BetaStorageClassAnnotation]; found {
+ return class
+ }
+
+ if claim.Spec.StorageClassName != nil {
+ return *claim.Spec.StorageClassName
+ }
+
+ return ""
+}
+
+// PersistentVolumeClaimHasClass returns true if given claim has set StorageClassName field.
+func PersistentVolumeClaimHasClass(claim *api.PersistentVolumeClaim) bool {
+ // Use beta annotation first
+ if _, found := claim.Annotations[api.BetaStorageClassAnnotation]; found {
+ return true
+ }
+
+ if claim.Spec.StorageClassName != nil {
+ return true
+ }
+
+ return false
+}
+
+// GetStorageNodeAffinityFromAnnotation gets the json serialized data from PersistentVolume.Annotations
+// and converts it to the NodeAffinity type in api.
+// TODO: update when storage node affinity graduates to beta
+func GetStorageNodeAffinityFromAnnotation(annotations map[string]string) (*api.NodeAffinity, error) {
+ if len(annotations) > 0 && annotations[api.AlphaStorageNodeAffinityAnnotation] != "" {
+ var affinity api.NodeAffinity
+ err := json.Unmarshal([]byte(annotations[api.AlphaStorageNodeAffinityAnnotation]), &affinity)
+ if err != nil {
+ return nil, err
+ }
+ return &affinity, nil
+ }
+ return nil, nil
+}
+
+// Converts NodeAffinity type to Alpha annotation for use in PersistentVolumes
+// TODO: update when storage node affinity graduates to beta
+func StorageNodeAffinityToAlphaAnnotation(annotations map[string]string, affinity *api.NodeAffinity) error {
+ if affinity == nil {
+ return nil
+ }
+
+ json, err := json.Marshal(*affinity)
+ if err != nil {
+ return err
+ }
+ annotations[api.AlphaStorageNodeAffinityAnnotation] = string(json)
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/api/install/install.go b/vendor/k8s.io/kubernetes/pkg/api/install/install.go
new file mode 100644
index 000000000..53730940a
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/install/install.go
@@ -0,0 +1,70 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package install installs the v1 monolithic api, making it available as an
+// option to all of the API encoding/decoding machinery.
+package install
+
+import (
+ "k8s.io/apimachinery/pkg/apimachinery/announced"
+ "k8s.io/apimachinery/pkg/apimachinery/registered"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/sets"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/v1"
+)
+
+func init() {
+ Install(api.GroupFactoryRegistry, api.Registry, api.Scheme)
+}
+
+// Install registers the API group and adds types to a scheme
+func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
+ if err := announced.NewGroupMetaFactory(
+ &announced.GroupMetaFactoryArgs{
+ GroupName: api.GroupName,
+ VersionPreferenceOrder: []string{v1.SchemeGroupVersion.Version},
+ ImportPrefix: "k8s.io/kubernetes/pkg/api",
+ AddInternalObjectsToScheme: api.AddToScheme,
+ RootScopedKinds: sets.NewString(
+ "Node",
+ "Namespace",
+ "PersistentVolume",
+ "ComponentStatus",
+ ),
+ IgnoredKinds: sets.NewString(
+ "ListOptions",
+ "DeleteOptions",
+ "Status",
+ "PodLogOptions",
+ "PodExecOptions",
+ "PodAttachOptions",
+ "PodPortForwardOptions",
+ "PodProxyOptions",
+ "NodeProxyOptions",
+ "ServiceProxyOptions",
+ "ThirdPartyResource",
+ "ThirdPartyResourceData",
+ "ThirdPartyResourceList",
+ ),
+ },
+ announced.VersionToSchemeFunc{
+ v1.SchemeGroupVersion.Version: v1.AddToScheme,
+ },
+ ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil {
+ panic(err)
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/api/json.go b/vendor/k8s.io/kubernetes/pkg/api/json.go
new file mode 100644
index 000000000..3a6e04c18
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/json.go
@@ -0,0 +1,28 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package api
+
+import "encoding/json"
+
+// This file implements json marshaling/unmarshaling interfaces on objects that are currently marshaled into annotations
+// to prevent anyone from marshaling these internal structs.
+
+var _ = json.Marshaler(&AvoidPods{})
+var _ = json.Unmarshaler(&AvoidPods{})
+
+func (AvoidPods) MarshalJSON() ([]byte, error) { panic("do not marshal internal struct") }
+func (*AvoidPods) UnmarshalJSON([]byte) error { panic("do not unmarshal to internal struct") }
diff --git a/vendor/k8s.io/kubernetes/pkg/api/objectreference.go b/vendor/k8s.io/kubernetes/pkg/api/objectreference.go
new file mode 100644
index 000000000..b36ecab27
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/objectreference.go
@@ -0,0 +1,34 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+//TODO: consider making these methods functions, because we don't want helper
+//functions in the k8s.io/api repo.
+
+package api
+
+import (
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+func (obj *ObjectReference) SetGroupVersionKind(gvk schema.GroupVersionKind) {
+ obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind()
+}
+
+func (obj *ObjectReference) GroupVersionKind() schema.GroupVersionKind {
+ return schema.FromAPIVersionAndKind(obj.APIVersion, obj.Kind)
+}
+
+func (obj *ObjectReference) GetObjectKind() schema.ObjectKind { return obj }
diff --git a/vendor/k8s.io/kubernetes/pkg/api/register.go b/vendor/k8s.io/kubernetes/pkg/api/register.go
new file mode 100644
index 000000000..5f261bdfb
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/register.go
@@ -0,0 +1,123 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package api
+
+import (
+ "os"
+
+ "k8s.io/apimachinery/pkg/apimachinery/announced"
+ "k8s.io/apimachinery/pkg/apimachinery/registered"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/runtime/serializer"
+)
+
+// GroupFactoryRegistry is the APIGroupFactoryRegistry (overlaps a bit with Registry, see comments in package for details)
+var GroupFactoryRegistry = make(announced.APIGroupFactoryRegistry)
+
+// Registry is an instance of an API registry. This is an interim step to start removing the idea of a global
+// API registry.
+var Registry = registered.NewOrDie(os.Getenv("KUBE_API_VERSIONS"))
+
+// Scheme is the default instance of runtime.Scheme to which types in the Kubernetes API are already registered.
+// NOTE: If you are copying this file to start a new api group, STOP! Copy the
+// extensions group instead. This Scheme is special and should appear ONLY in
+// the api group, unless you really know what you're doing.
+// TODO(lavalamp): make the above error impossible.
+var Scheme = runtime.NewScheme()
+
+// Codecs provides access to encoding and decoding for the scheme
+var Codecs = serializer.NewCodecFactory(Scheme)
+
+// GroupName is the group name use in this package
+const GroupName = ""
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// ParameterCodec handles versioning of objects that are converted to query parameters.
+var ParameterCodec = runtime.NewParameterCodec(Scheme)
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+func addKnownTypes(scheme *runtime.Scheme) error {
+ if err := scheme.AddIgnoredConversionType(&metav1.TypeMeta{}, &metav1.TypeMeta{}); err != nil {
+ return err
+ }
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Pod{},
+ &PodList{},
+ &PodStatusResult{},
+ &PodTemplate{},
+ &PodTemplateList{},
+ &ReplicationControllerList{},
+ &ReplicationController{},
+ &ServiceList{},
+ &Service{},
+ &ServiceProxyOptions{},
+ &NodeList{},
+ &Node{},
+ &NodeProxyOptions{},
+ &Endpoints{},
+ &EndpointsList{},
+ &Binding{},
+ &Event{},
+ &EventList{},
+ &List{},
+ &LimitRange{},
+ &LimitRangeList{},
+ &ResourceQuota{},
+ &ResourceQuotaList{},
+ &Namespace{},
+ &NamespaceList{},
+ &ServiceAccount{},
+ &ServiceAccountList{},
+ &Secret{},
+ &SecretList{},
+ &PersistentVolume{},
+ &PersistentVolumeList{},
+ &PersistentVolumeClaim{},
+ &PersistentVolumeClaimList{},
+ &PodAttachOptions{},
+ &PodLogOptions{},
+ &PodExecOptions{},
+ &PodPortForwardOptions{},
+ &PodProxyOptions{},
+ &ComponentStatus{},
+ &ComponentStatusList{},
+ &SerializedReference{},
+ &RangeAllocation{},
+ &ConfigMap{},
+ &ConfigMapList{},
+ )
+
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/api/resource.go b/vendor/k8s.io/kubernetes/pkg/api/resource.go
new file mode 100644
index 000000000..27b7fd665
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/resource.go
@@ -0,0 +1,62 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package api
+
+import (
+ "k8s.io/apimachinery/pkg/api/resource"
+)
+
+func (self ResourceName) String() string {
+ return string(self)
+}
+
+// Returns the CPU limit if specified.
+func (self *ResourceList) Cpu() *resource.Quantity {
+ if val, ok := (*self)[ResourceCPU]; ok {
+ return &val
+ }
+ return &resource.Quantity{Format: resource.DecimalSI}
+}
+
+// Returns the Memory limit if specified.
+func (self *ResourceList) Memory() *resource.Quantity {
+ if val, ok := (*self)[ResourceMemory]; ok {
+ return &val
+ }
+ return &resource.Quantity{Format: resource.BinarySI}
+}
+
+func (self *ResourceList) Pods() *resource.Quantity {
+ if val, ok := (*self)[ResourcePods]; ok {
+ return &val
+ }
+ return &resource.Quantity{}
+}
+
+func (self *ResourceList) NvidiaGPU() *resource.Quantity {
+ if val, ok := (*self)[ResourceNvidiaGPU]; ok {
+ return &val
+ }
+ return &resource.Quantity{}
+}
+
+func (self *ResourceList) StorageOverlay() *resource.Quantity {
+ if val, ok := (*self)[ResourceStorageOverlay]; ok {
+ return &val
+ }
+ return &resource.Quantity{}
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/api/service/util.go b/vendor/k8s.io/kubernetes/pkg/api/service/util.go
new file mode 100644
index 000000000..50041f77e
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/service/util.go
@@ -0,0 +1,148 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package service
+
+import (
+ "fmt"
+ "strconv"
+ "strings"
+
+ "k8s.io/kubernetes/pkg/api"
+ netsets "k8s.io/kubernetes/pkg/util/net/sets"
+
+ "github.com/golang/glog"
+)
+
+const (
+ defaultLoadBalancerSourceRanges = "0.0.0.0/0"
+)
+
+// IsAllowAll checks whether the netsets.IPNet allows traffic from 0.0.0.0/0
+func IsAllowAll(ipnets netsets.IPNet) bool {
+ for _, s := range ipnets.StringSlice() {
+ if s == "0.0.0.0/0" {
+ return true
+ }
+ }
+ return false
+}
+
+// GetLoadBalancerSourceRanges first try to parse and verify LoadBalancerSourceRanges field from a service.
+// If the field is not specified, turn to parse and verify the AnnotationLoadBalancerSourceRangesKey annotation from a service,
+// extracting the source ranges to allow, and if not present returns a default (allow-all) value.
+func GetLoadBalancerSourceRanges(service *api.Service) (netsets.IPNet, error) {
+ var ipnets netsets.IPNet
+ var err error
+ // if SourceRange field is specified, ignore sourceRange annotation
+ if len(service.Spec.LoadBalancerSourceRanges) > 0 {
+ specs := service.Spec.LoadBalancerSourceRanges
+ ipnets, err = netsets.ParseIPNets(specs...)
+
+ if err != nil {
+ return nil, fmt.Errorf("service.Spec.LoadBalancerSourceRanges: %v is not valid. Expecting a list of IP ranges. For example, 10.0.0.0/24. Error msg: %v", specs, err)
+ }
+ } else {
+ val := service.Annotations[api.AnnotationLoadBalancerSourceRangesKey]
+ val = strings.TrimSpace(val)
+ if val == "" {
+ val = defaultLoadBalancerSourceRanges
+ }
+ specs := strings.Split(val, ",")
+ ipnets, err = netsets.ParseIPNets(specs...)
+ if err != nil {
+ return nil, fmt.Errorf("%s: %s is not valid. Expecting a comma-separated list of source IP ranges. For example, 10.0.0.0/24,192.168.2.0/24", api.AnnotationLoadBalancerSourceRangesKey, val)
+ }
+ }
+ return ipnets, nil
+}
+
+// RequestsOnlyLocalTraffic checks if service requests OnlyLocal traffic.
+func RequestsOnlyLocalTraffic(service *api.Service) bool {
+ if service.Spec.Type != api.ServiceTypeLoadBalancer &&
+ service.Spec.Type != api.ServiceTypeNodePort {
+ return false
+ }
+
+ // First check the beta annotation and then the first class field. This is so that
+ // existing Services continue to work till the user decides to transition to the
+ // first class field.
+ if l, ok := service.Annotations[api.BetaAnnotationExternalTraffic]; ok {
+ switch l {
+ case api.AnnotationValueExternalTrafficLocal:
+ return true
+ case api.AnnotationValueExternalTrafficGlobal:
+ return false
+ default:
+ glog.Errorf("Invalid value for annotation %v: %v", api.BetaAnnotationExternalTraffic, l)
+ return false
+ }
+ }
+ return service.Spec.ExternalTrafficPolicy == api.ServiceExternalTrafficPolicyTypeLocal
+}
+
+// NeedsHealthCheck Check if service needs health check.
+func NeedsHealthCheck(service *api.Service) bool {
+ if service.Spec.Type != api.ServiceTypeLoadBalancer {
+ return false
+ }
+ return RequestsOnlyLocalTraffic(service)
+}
+
+// GetServiceHealthCheckNodePort Return health check node port for service, if one exists
+func GetServiceHealthCheckNodePort(service *api.Service) int32 {
+ // First check the beta annotation and then the first class field. This is so that
+ // existing Services continue to work till the user decides to transition to the
+ // first class field.
+ if l, ok := service.Annotations[api.BetaAnnotationHealthCheckNodePort]; ok {
+ p, err := strconv.Atoi(l)
+ if err != nil {
+ glog.Errorf("Failed to parse annotation %v: %v", api.BetaAnnotationHealthCheckNodePort, err)
+ return 0
+ }
+ return int32(p)
+ }
+ return service.Spec.HealthCheckNodePort
+}
+
+// ClearExternalTrafficPolicy resets the ExternalTrafficPolicy field.
+func ClearExternalTrafficPolicy(service *api.Service) {
+ // First check the beta annotation and then the first class field. This is so that
+ // existing Services continue to work till the user decides to transition to the
+ // first class field.
+ if _, ok := service.Annotations[api.BetaAnnotationExternalTraffic]; ok {
+ delete(service.Annotations, api.BetaAnnotationExternalTraffic)
+ return
+ }
+ service.Spec.ExternalTrafficPolicy = api.ServiceExternalTrafficPolicyType("")
+}
+
+// SetServiceHealthCheckNodePort sets the given health check node port on service.
+// It does not check whether this service needs healthCheckNodePort.
+func SetServiceHealthCheckNodePort(service *api.Service, hcNodePort int32) {
+ // First check the beta annotation and then the first class field. This is so that
+ // existing Services continue to work till the user decides to transition to the
+ // first class field.
+ if _, ok := service.Annotations[api.BetaAnnotationExternalTraffic]; ok {
+ if hcNodePort == 0 {
+ delete(service.Annotations, api.BetaAnnotationHealthCheckNodePort)
+ } else {
+ service.Annotations[api.BetaAnnotationHealthCheckNodePort] = fmt.Sprintf("%d", hcNodePort)
+ }
+ return
+ }
+ service.Spec.HealthCheckNodePort = hcNodePort
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/api/taint.go b/vendor/k8s.io/kubernetes/pkg/api/taint.go
new file mode 100644
index 000000000..173e4e601
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/taint.go
@@ -0,0 +1,36 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+//TODO: consider making these methods functions, because we don't want helper
+//functions in the k8s.io/api repo.
+
+package api
+
+import "fmt"
+
+// MatchTaint checks if the taint matches taintToMatch. Taints are unique by key:effect,
+// if the two taints have same key:effect, regard as they match.
+func (t *Taint) MatchTaint(taintToMatch Taint) bool {
+ return t.Key == taintToMatch.Key && t.Effect == taintToMatch.Effect
+}
+
+// taint.ToString() converts taint struct to string in format key=value:effect or key:effect.
+func (t *Taint) ToString() string {
+ if len(t.Value) == 0 {
+ return fmt.Sprintf("%v:%v", t.Key, t.Effect)
+ }
+ return fmt.Sprintf("%v=%v:%v", t.Key, t.Value, t.Effect)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/api/toleration.go b/vendor/k8s.io/kubernetes/pkg/api/toleration.go
new file mode 100644
index 000000000..edb73b74e
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/toleration.go
@@ -0,0 +1,30 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+//TODO: consider making these methods functions, because we don't want helper
+//functions in the k8s.io/api repo.
+
+package api
+
+// MatchToleration checks if the toleration matches tolerationToMatch. Tolerations are unique by <key,effect,operator,value>,
+// if the two tolerations have same <key,effect,operator,value> combination, regard as they match.
+// TODO: uniqueness check for tolerations in api validations.
+func (t *Toleration) MatchToleration(tolerationToMatch *Toleration) bool {
+ return t.Key == tolerationToMatch.Key &&
+ t.Effect == tolerationToMatch.Effect &&
+ t.Operator == tolerationToMatch.Operator &&
+ t.Value == tolerationToMatch.Value
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/api/types.go b/vendor/k8s.io/kubernetes/pkg/api/types.go
new file mode 100644
index 000000000..454b94ef2
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/types.go
@@ -0,0 +1,3989 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package api
+
+import (
+ "k8s.io/apimachinery/pkg/api/resource"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/fields"
+ "k8s.io/apimachinery/pkg/labels"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/types"
+ "k8s.io/apimachinery/pkg/util/intstr"
+)
+
+// Common string formats
+// ---------------------
+// Many fields in this API have formatting requirements. The commonly used
+// formats are defined here.
+//
+// C_IDENTIFIER: This is a string that conforms to the definition of an "identifier"
+// in the C language. This is captured by the following regex:
+// [A-Za-z_][A-Za-z0-9_]*
+// This defines the format, but not the length restriction, which should be
+// specified at the definition of any field of this type.
+//
+// DNS_LABEL: This is a string, no more than 63 characters long, that conforms
+// to the definition of a "label" in RFCs 1035 and 1123. This is captured
+// by the following regex:
+// [a-z0-9]([-a-z0-9]*[a-z0-9])?
+//
+// DNS_SUBDOMAIN: This is a string, no more than 253 characters long, that conforms
+// to the definition of a "subdomain" in RFCs 1035 and 1123. This is captured
+// by the following regex:
+// [a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*
+// or more simply:
+// DNS_LABEL(\.DNS_LABEL)*
+//
+// IANA_SVC_NAME: This is a string, no more than 15 characters long, that
+// conforms to the definition of IANA service name in RFC 6335.
+// It must contains at least one letter [a-z] and it must contains only [a-z0-9-].
+// Hypens ('-') cannot be leading or trailing character of the string
+// and cannot be adjacent to other hyphens.
+
+// ObjectMeta is metadata that all persisted resources must have, which includes all objects
+// users must create.
+// DEPRECATED: Use k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta instead - this type will be removed soon.
+type ObjectMeta struct {
+ // Name is unique within a namespace. Name is required when creating resources, although
+ // some resources may allow a client to request the generation of an appropriate name
+ // automatically. Name is primarily intended for creation idempotence and configuration
+ // definition.
+ // +optional
+ Name string
+
+ // GenerateName indicates that the name should be made unique by the server prior to persisting
+ // it. A non-empty value for the field indicates the name will be made unique (and the name
+ // returned to the client will be different than the name passed). The value of this field will
+ // be combined with a unique suffix on the server if the Name field has not been provided.
+ // The provided value must be valid within the rules for Name, and may be truncated by the length
+ // of the suffix required to make the value unique on the server.
+ //
+ // If this field is specified, and Name is not present, the server will NOT return a 409 if the
+ // generated name exists - instead, it will either return 201 Created or 500 with Reason
+ // ServerTimeout indicating a unique name could not be found in the time allotted, and the client
+ // should retry (optionally after the time indicated in the Retry-After header).
+ // +optional
+ GenerateName string
+
+ // Namespace defines the space within which name must be unique. An empty namespace is
+ // equivalent to the "default" namespace, but "default" is the canonical representation.
+ // Not all objects are required to be scoped to a namespace - the value of this field for
+ // those objects will be empty.
+ // +optional
+ Namespace string
+
+ // SelfLink is a URL representing this object.
+ // +optional
+ SelfLink string
+
+ // UID is the unique in time and space value for this object. It is typically generated by
+ // the server on successful creation of a resource and is not allowed to change on PUT
+ // operations.
+ // +optional
+ UID types.UID
+
+ // An opaque value that represents the version of this resource. May be used for optimistic
+ // concurrency, change detection, and the watch operation on a resource or set of resources.
+ // Clients must treat these values as opaque and values may only be valid for a particular
+ // resource or set of resources. Only servers will generate resource versions.
+ // +optional
+ ResourceVersion string
+
+ // A sequence number representing a specific generation of the desired state.
+ // Populated by the system. Read-only.
+ // +optional
+ Generation int64
+
+ // CreationTimestamp is a timestamp representing the server time when this object was
+ // created. It is not guaranteed to be set in happens-before order across separate operations.
+ // Clients may not set this value. It is represented in RFC3339 form and is in UTC.
+ // +optional
+ CreationTimestamp metav1.Time
+
+ // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This
+ // field is set by the server when a graceful deletion is requested by the user, and is not
+ // directly settable by a client. The resource is expected to be deleted (no longer visible
+ // from resource lists, and not reachable by name) after the time in this field. Once set,
+ // this value may not be unset or be set further into the future, although it may be shortened
+ // or the resource may be deleted prior to this time. For example, a user may request that
+ // a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination
+ // signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard
+ // termination signal (SIGKILL) to the container and after cleanup, remove the pod from the
+ // API. In the presence of network partitions, this object may still exist after this
+ // timestamp, until an administrator or automated process can determine the resource is
+ // fully terminated.
+ // If not set, graceful deletion of the object has not been requested.
+ //
+ // Populated by the system when a graceful deletion is requested.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ DeletionTimestamp *metav1.Time
+
+ // DeletionGracePeriodSeconds records the graceful deletion value set when graceful deletion
+ // was requested. Represents the most recent grace period, and may only be shortened once set.
+ // +optional
+ DeletionGracePeriodSeconds *int64
+
+ // Labels are key value pairs that may be used to scope and select individual resources.
+ // Label keys are of the form:
+ // label-key ::= prefixed-name | name
+ // prefixed-name ::= prefix '/' name
+ // prefix ::= DNS_SUBDOMAIN
+ // name ::= DNS_LABEL
+ // The prefix is optional. If the prefix is not specified, the key is assumed to be private
+ // to the user. Other system components that wish to use labels must specify a prefix. The
+ // "kubernetes.io/" prefix is reserved for use by kubernetes components.
+ // +optional
+ Labels map[string]string
+
+ // Annotations are unstructured key value data stored with a resource that may be set by
+ // external tooling. They are not queryable and should be preserved when modifying
+ // objects. Annotation keys have the same formatting restrictions as Label keys. See the
+ // comments on Labels for details.
+ // +optional
+ Annotations map[string]string
+
+ // List of objects depended by this object. If ALL objects in the list have
+ // been deleted, this object will be garbage collected. If this object is managed by a controller,
+ // then an entry in this list will point to this controller, with the controller field set to true.
+ // There cannot be more than one managing controller.
+ // +optional
+ OwnerReferences []metav1.OwnerReference
+
+ // An initializer is a controller which enforces some system invariant at object creation time.
+ // This field is a list of initializers that have not yet acted on this object. If nil or empty,
+ // this object has been completely initialized. Otherwise, the object is considered uninitialized
+ // and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to
+ // observe uninitialized objects.
+ //
+ // When an object is created, the system will populate this list with the current set of initializers.
+ // Only privileged users may set or modify this list. Once it is empty, it may not be modified further
+ // by any user.
+ Initializers *metav1.Initializers
+
+ // Must be empty before the object is deleted from the registry. Each entry
+ // is an identifier for the responsible component that will remove the entry
+ // from the list. If the deletionTimestamp of the object is non-nil, entries
+ // in this list can only be removed.
+ // +optional
+ Finalizers []string
+
+ // The name of the cluster which the object belongs to.
+ // This is used to distinguish resources with same name and namespace in different clusters.
+ // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.
+ // +optional
+ ClusterName string
+}
+
+const (
+ // NamespaceDefault means the object is in the default namespace which is applied when not specified by clients
+ NamespaceDefault string = "default"
+ // NamespaceAll is the default argument to specify on a context when you want to list or filter resources across all namespaces
+ NamespaceAll string = ""
+ // NamespaceNone is the argument for a context when there is no namespace.
+ NamespaceNone string = ""
+ // NamespaceSystem is the system namespace where we place system components.
+ NamespaceSystem string = "kube-system"
+ // NamespacePublic is the namespace where we place public info (ConfigMaps)
+ NamespacePublic string = "kube-public"
+ // TerminationMessagePathDefault means the default path to capture the application termination message running in a container
+ TerminationMessagePathDefault string = "/dev/termination-log"
+)
+
+// Volume represents a named volume in a pod that may be accessed by any containers in the pod.
+type Volume struct {
+ // Required: This must be a DNS_LABEL. Each volume in a pod must have
+ // a unique name.
+ Name string
+ // The VolumeSource represents the location and type of a volume to mount.
+ // This is optional for now. If not specified, the Volume is implied to be an EmptyDir.
+ // This implied behavior is deprecated and will be removed in a future version.
+ // +optional
+ VolumeSource
+}
+
+// VolumeSource represents the source location of a volume to mount.
+// Only one of its members may be specified.
+type VolumeSource struct {
+ // HostPath represents file or directory on the host machine that is
+ // directly exposed to the container. This is generally used for system
+ // agents or other privileged things that are allowed to see the host
+ // machine. Most containers will NOT need this.
+ // ---
+ // TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not
+ // mount host directories as read/write.
+ // +optional
+ HostPath *HostPathVolumeSource
+ // EmptyDir represents a temporary directory that shares a pod's lifetime.
+ // +optional
+ EmptyDir *EmptyDirVolumeSource
+ // GCEPersistentDisk represents a GCE Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ // +optional
+ GCEPersistentDisk *GCEPersistentDiskVolumeSource
+ // AWSElasticBlockStore represents an AWS EBS disk that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ // +optional
+ AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource
+ // GitRepo represents a git repository at a particular revision.
+ // +optional
+ GitRepo *GitRepoVolumeSource
+ // Secret represents a secret that should populate this volume.
+ // +optional
+ Secret *SecretVolumeSource
+ // NFS represents an NFS mount on the host that shares a pod's lifetime
+ // +optional
+ NFS *NFSVolumeSource
+ // ISCSIVolumeSource represents an ISCSI Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ // +optional
+ ISCSI *ISCSIVolumeSource
+ // Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime
+ // +optional
+ Glusterfs *GlusterfsVolumeSource
+ // PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace
+ // +optional
+ PersistentVolumeClaim *PersistentVolumeClaimVolumeSource
+ // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime
+ // +optional
+ RBD *RBDVolumeSource
+
+ // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
+ // +optional
+ Quobyte *QuobyteVolumeSource
+
+ // FlexVolume represents a generic volume resource that is
+ // provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.
+ // +optional
+ FlexVolume *FlexVolumeSource
+
+ // Cinder represents a cinder volume attached and mounted on kubelets host machine
+ // +optional
+ Cinder *CinderVolumeSource
+
+ // CephFS represents a Cephfs mount on the host that shares a pod's lifetime
+ // +optional
+ CephFS *CephFSVolumeSource
+
+ // Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
+ // +optional
+ Flocker *FlockerVolumeSource
+
+ // DownwardAPI represents metadata about the pod that should populate this volume
+ // +optional
+ DownwardAPI *DownwardAPIVolumeSource
+ // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
+ // +optional
+ FC *FCVolumeSource
+ // AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
+ // +optional
+ AzureFile *AzureFileVolumeSource
+ // ConfigMap represents a configMap that should populate this volume
+ // +optional
+ ConfigMap *ConfigMapVolumeSource
+ // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
+ // +optional
+ VsphereVolume *VsphereVirtualDiskVolumeSource
+ // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
+ // +optional
+ AzureDisk *AzureDiskVolumeSource
+ // PhotonPersistentDisk represents a Photon Controller persistent disk attached and mounted on kubelets host machine
+ PhotonPersistentDisk *PhotonPersistentDiskVolumeSource
+ // Items for all in one resources secrets, configmaps, and downward API
+ Projected *ProjectedVolumeSource
+ // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine
+ // +optional
+ PortworxVolume *PortworxVolumeSource
+ // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
+ // +optional
+ ScaleIO *ScaleIOVolumeSource
+ // StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod
+ // +optional
+ StorageOS *StorageOSVolumeSource
+}
+
+// Similar to VolumeSource but meant for the administrator who creates PVs.
+// Exactly one of its members must be set.
+type PersistentVolumeSource struct {
+ // GCEPersistentDisk represents a GCE Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ // +optional
+ GCEPersistentDisk *GCEPersistentDiskVolumeSource
+ // AWSElasticBlockStore represents an AWS EBS disk that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ // +optional
+ AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource
+ // HostPath represents a directory on the host.
+ // Provisioned by a developer or tester.
+ // This is useful for single-node development and testing only!
+ // On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster.
+ // +optional
+ HostPath *HostPathVolumeSource
+ // Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod
+ // +optional
+ Glusterfs *GlusterfsVolumeSource
+ // NFS represents an NFS mount on the host that shares a pod's lifetime
+ // +optional
+ NFS *NFSVolumeSource
+ // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime
+ // +optional
+ RBD *RBDVolumeSource
+ // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
+ // +optional
+ Quobyte *QuobyteVolumeSource
+ // ISCSIVolumeSource represents an ISCSI resource that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ // +optional
+ ISCSI *ISCSIVolumeSource
+ // FlexVolume represents a generic volume resource that is
+ // provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.
+ // +optional
+ FlexVolume *FlexVolumeSource
+ // Cinder represents a cinder volume attached and mounted on kubelets host machine
+ // +optional
+ Cinder *CinderVolumeSource
+ // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
+ // +optional
+ CephFS *CephFSVolumeSource
+ // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
+ // +optional
+ FC *FCVolumeSource
+ // Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
+ // +optional
+ Flocker *FlockerVolumeSource
+ // AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
+ // +optional
+ AzureFile *AzureFileVolumeSource
+ // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
+ // +optional
+ VsphereVolume *VsphereVirtualDiskVolumeSource
+ // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
+ // +optional
+ AzureDisk *AzureDiskVolumeSource
+ // PhotonPersistentDisk represents a Photon Controller persistent disk attached and mounted on kubelets host machine
+ PhotonPersistentDisk *PhotonPersistentDiskVolumeSource
+ // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine
+ // +optional
+ PortworxVolume *PortworxVolumeSource
+ // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
+ // +optional
+ ScaleIO *ScaleIOVolumeSource
+ // Local represents directly-attached storage with node affinity
+ // +optional
+ Local *LocalVolumeSource
+ // StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md
+ // +optional
+ StorageOS *StorageOSPersistentVolumeSource
+}
+
+type PersistentVolumeClaimVolumeSource struct {
+ // ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume
+ ClaimName string
+ // Optional: Defaults to false (read/write). ReadOnly here
+ // will force the ReadOnly setting in VolumeMounts
+ // +optional
+ ReadOnly bool
+}
+
+const (
+ // BetaStorageClassAnnotation represents the beta/previous StorageClass annotation.
+ // It's currently still used and will be held for backwards compatibility
+ BetaStorageClassAnnotation = "volume.beta.kubernetes.io/storage-class"
+
+ // MountOptionAnnotation defines mount option annotation used in PVs
+ MountOptionAnnotation = "volume.beta.kubernetes.io/mount-options"
+
+ // AlphaStorageNodeAffinityAnnotation defines node affinity policies for a PersistentVolume.
+ // Value is a string of the json representation of type NodeAffinity
+ AlphaStorageNodeAffinityAnnotation = "volume.alpha.kubernetes.io/node-affinity"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+
+type PersistentVolume struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ //Spec defines a persistent volume owned by the cluster
+ // +optional
+ Spec PersistentVolumeSpec
+
+ // Status represents the current information about persistent volume.
+ // +optional
+ Status PersistentVolumeStatus
+}
+
+type PersistentVolumeSpec struct {
+ // Resources represents the actual resources of the volume
+ Capacity ResourceList
+ // Source represents the location and type of a volume to mount.
+ PersistentVolumeSource
+ // AccessModes contains all ways the volume can be mounted
+ // +optional
+ AccessModes []PersistentVolumeAccessMode
+ // ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim.
+ // ClaimRef is expected to be non-nil when bound.
+ // claim.VolumeName is the authoritative bind between PV and PVC.
+ // When set to non-nil value, PVC.Spec.Selector of the referenced PVC is
+ // ignored, i.e. labels of this PV do not need to match PVC selector.
+ // +optional
+ ClaimRef *ObjectReference
+ // Optional: what happens to a persistent volume when released from its claim.
+ // +optional
+ PersistentVolumeReclaimPolicy PersistentVolumeReclaimPolicy
+ // Name of StorageClass to which this persistent volume belongs. Empty value
+ // means that this volume does not belong to any StorageClass.
+ // +optional
+ StorageClassName string
+}
+
+// PersistentVolumeReclaimPolicy describes a policy for end-of-life maintenance of persistent volumes
+type PersistentVolumeReclaimPolicy string
+
+const (
+ // PersistentVolumeReclaimRecycle means the volume will be recycled back into the pool of unbound persistent volumes on release from its claim.
+ // The volume plugin must support Recycling.
+ PersistentVolumeReclaimRecycle PersistentVolumeReclaimPolicy = "Recycle"
+ // PersistentVolumeReclaimDelete means the volume will be deleted from Kubernetes on release from its claim.
+ // The volume plugin must support Deletion.
+ PersistentVolumeReclaimDelete PersistentVolumeReclaimPolicy = "Delete"
+ // PersistentVolumeReclaimRetain means the volume will be left in its current phase (Released) for manual reclamation by the administrator.
+ // The default policy is Retain.
+ PersistentVolumeReclaimRetain PersistentVolumeReclaimPolicy = "Retain"
+)
+
+type PersistentVolumeStatus struct {
+ // Phase indicates if a volume is available, bound to a claim, or released by a claim
+ // +optional
+ Phase PersistentVolumePhase
+ // A human-readable message indicating details about why the volume is in this state.
+ // +optional
+ Message string
+ // Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI
+ // +optional
+ Reason string
+}
+
+type PersistentVolumeList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+ Items []PersistentVolume
+}
+
+// +genclient=true
+
+// PersistentVolumeClaim is a user's request for and claim to a persistent volume
+type PersistentVolumeClaim struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Spec defines the volume requested by a pod author
+ // +optional
+ Spec PersistentVolumeClaimSpec
+
+ // Status represents the current information about a claim
+ // +optional
+ Status PersistentVolumeClaimStatus
+}
+
+type PersistentVolumeClaimList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+ Items []PersistentVolumeClaim
+}
+
+// PersistentVolumeClaimSpec describes the common attributes of storage devices
+// and allows a Source for provider-specific attributes
+type PersistentVolumeClaimSpec struct {
+ // Contains the types of access modes required
+ // +optional
+ AccessModes []PersistentVolumeAccessMode
+ // A label query over volumes to consider for binding. This selector is
+ // ignored when VolumeName is set
+ // +optional
+ Selector *metav1.LabelSelector
+ // Resources represents the minimum resources required
+ // +optional
+ Resources ResourceRequirements
+ // VolumeName is the binding reference to the PersistentVolume backing this
+ // claim. When set to non-empty value Selector is not evaluated
+ // +optional
+ VolumeName string
+ // Name of the StorageClass required by the claim.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class-1
+ // +optional
+ StorageClassName *string
+}
+
+type PersistentVolumeClaimStatus struct {
+ // Phase represents the current phase of PersistentVolumeClaim
+ // +optional
+ Phase PersistentVolumeClaimPhase
+ // AccessModes contains all ways the volume backing the PVC can be mounted
+ // +optional
+ AccessModes []PersistentVolumeAccessMode
+ // Represents the actual resources of the underlying volume
+ // +optional
+ Capacity ResourceList
+}
+
+type PersistentVolumeAccessMode string
+
+const (
+ // can be mounted read/write mode to exactly 1 host
+ ReadWriteOnce PersistentVolumeAccessMode = "ReadWriteOnce"
+ // can be mounted in read-only mode to many hosts
+ ReadOnlyMany PersistentVolumeAccessMode = "ReadOnlyMany"
+ // can be mounted in read/write mode to many hosts
+ ReadWriteMany PersistentVolumeAccessMode = "ReadWriteMany"
+)
+
+type PersistentVolumePhase string
+
+const (
+ // used for PersistentVolumes that are not available
+ VolumePending PersistentVolumePhase = "Pending"
+ // used for PersistentVolumes that are not yet bound
+ // Available volumes are held by the binder and matched to PersistentVolumeClaims
+ VolumeAvailable PersistentVolumePhase = "Available"
+ // used for PersistentVolumes that are bound
+ VolumeBound PersistentVolumePhase = "Bound"
+ // used for PersistentVolumes where the bound PersistentVolumeClaim was deleted
+ // released volumes must be recycled before becoming available again
+ // this phase is used by the persistent volume claim binder to signal to another process to reclaim the resource
+ VolumeReleased PersistentVolumePhase = "Released"
+ // used for PersistentVolumes that failed to be correctly recycled or deleted after being released from a claim
+ VolumeFailed PersistentVolumePhase = "Failed"
+)
+
+type PersistentVolumeClaimPhase string
+
+const (
+ // used for PersistentVolumeClaims that are not yet bound
+ ClaimPending PersistentVolumeClaimPhase = "Pending"
+ // used for PersistentVolumeClaims that are bound
+ ClaimBound PersistentVolumeClaimPhase = "Bound"
+ // used for PersistentVolumeClaims that lost their underlying
+ // PersistentVolume. The claim was bound to a PersistentVolume and this
+ // volume does not exist any longer and all data on it was lost.
+ ClaimLost PersistentVolumeClaimPhase = "Lost"
+)
+
+// Represents a host path mapped into a pod.
+// Host path volumes do not support ownership management or SELinux relabeling.
+type HostPathVolumeSource struct {
+ Path string
+}
+
+// Represents an empty directory for a pod.
+// Empty directory volumes support ownership management and SELinux relabeling.
+type EmptyDirVolumeSource struct {
+ // TODO: Longer term we want to represent the selection of underlying
+ // media more like a scheduling problem - user says what traits they
+ // need, we give them a backing store that satisfies that. For now
+ // this will cover the most common needs.
+ // Optional: what type of storage medium should back this directory.
+ // The default is "" which means to use the node's default medium.
+ // +optional
+ Medium StorageMedium
+ // Total amount of local storage required for this EmptyDir volume.
+ // The size limit is also applicable for memory medium.
+ // The maximum usage on memory medium EmptyDir would be the minimum value between
+ // the SizeLimit specified here and the sum of memory limits of all containers in a pod.
+ // The default is nil which means that the limit is undefined.
+ // More info: http://kubernetes.io/docs/user-guide/volumes#emptydir
+ // +optional
+ SizeLimit *resource.Quantity
+}
+
+// StorageMedium defines ways that storage can be allocated to a volume.
+type StorageMedium string
+
+const (
+ StorageMediumDefault StorageMedium = "" // use whatever the default is for the node
+ StorageMediumMemory StorageMedium = "Memory" // use memory (tmpfs)
+)
+
+// Protocol defines network protocols supported for things like container ports.
+type Protocol string
+
+const (
+ // ProtocolTCP is the TCP protocol.
+ ProtocolTCP Protocol = "TCP"
+ // ProtocolUDP is the UDP protocol.
+ ProtocolUDP Protocol = "UDP"
+)
+
+// Represents a Persistent Disk resource in Google Compute Engine.
+//
+// A GCE PD must exist before mounting to a container. The disk must
+// also be in the same GCE project and zone as the kubelet. A GCE PD
+// can only be mounted as read/write once or read-only many times. GCE
+// PDs support ownership management and SELinux relabeling.
+type GCEPersistentDiskVolumeSource struct {
+ // Unique name of the PD resource. Used to identify the disk in GCE
+ PDName string
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ FSType string
+ // Optional: Partition on the disk to mount.
+ // If omitted, kubelet will attempt to mount the device name.
+ // Ex. For /dev/sda1, this field is "1", for /dev/sda, this field is 0 or empty.
+ // +optional
+ Partition int32
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool
+}
+
+// Represents an ISCSI disk.
+// ISCSI volumes can only be mounted as read/write once.
+// ISCSI volumes support ownership management and SELinux relabeling.
+type ISCSIVolumeSource struct {
+ // Required: iSCSI target portal
+ // the portal is either an IP or ip_addr:port if port is other than default (typically TCP ports 860 and 3260)
+ // +optional
+ TargetPortal string
+ // Required: target iSCSI Qualified Name
+ // +optional
+ IQN string
+ // Required: iSCSI target lun number
+ // +optional
+ Lun int32
+ // Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport.
+ // +optional
+ ISCSIInterface string
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ FSType string
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool
+ // Optional: list of iSCSI target portal ips for high availability.
+ // the portal is either an IP or ip_addr:port if port is other than default (typically TCP ports 860 and 3260)
+ // +optional
+ Portals []string
+ // Optional: whether support iSCSI Discovery CHAP authentication
+ // +optional
+ DiscoveryCHAPAuth bool
+ // Optional: whether support iSCSI Session CHAP authentication
+ // +optional
+ SessionCHAPAuth bool
+ // Optional: CHAP secret for iSCSI target and initiator authentication.
+ // The secret is used if either DiscoveryCHAPAuth or SessionCHAPAuth is true
+ // +optional
+ SecretRef *LocalObjectReference
+}
+
+// Represents a Fibre Channel volume.
+// Fibre Channel volumes can only be mounted as read/write once.
+// Fibre Channel volumes support ownership management and SELinux relabeling.
+type FCVolumeSource struct {
+ // Required: FC target worldwide names (WWNs)
+ TargetWWNs []string
+ // Required: FC target lun number
+ Lun *int32
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ FSType string
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool
+}
+
+// FlexVolume represents a generic volume resource that is
+// provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.
+type FlexVolumeSource struct {
+ // Driver is the name of the driver to use for this volume.
+ Driver string
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script.
+ // +optional
+ FSType string
+ // Optional: SecretRef is reference to the secret object containing
+ // sensitive information to pass to the plugin scripts. This may be
+ // empty if no secret object is specified. If the secret object
+ // contains more than one secret, all secrets are passed to the plugin
+ // scripts.
+ // +optional
+ SecretRef *LocalObjectReference
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool
+ // Optional: Extra driver options if any.
+ // +optional
+ Options map[string]string
+}
+
+// Represents a Persistent Disk resource in AWS.
+//
+// An AWS EBS disk must exist before mounting to a container. The disk
+// must also be in the same AWS zone as the kubelet. An AWS EBS disk
+// can only be mounted as read/write once. AWS EBS volumes support
+// ownership management and SELinux relabeling.
+type AWSElasticBlockStoreVolumeSource struct {
+ // Unique id of the persistent disk resource. Used to identify the disk in AWS
+ VolumeID string
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ FSType string
+ // Optional: Partition on the disk to mount.
+ // If omitted, kubelet will attempt to mount the device name.
+ // Ex. For /dev/sda1, this field is "1", for /dev/sda, this field is 0 or empty.
+ // +optional
+ Partition int32
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool
+}
+
+// Represents a volume that is populated with the contents of a git repository.
+// Git repo volumes do not support ownership management.
+// Git repo volumes support SELinux relabeling.
+type GitRepoVolumeSource struct {
+ // Repository URL
+ Repository string
+ // Commit hash, this is optional
+ // +optional
+ Revision string
+ // Clone target, this is optional
+ // Must not contain or start with '..'. If '.' is supplied, the volume directory will be the
+ // git repository. Otherwise, if specified, the volume will contain the git repository in
+ // the subdirectory with the given name.
+ // +optional
+ Directory string
+ // TODO: Consider credentials here.
+}
+
+// Adapts a Secret into a volume.
+//
+// The contents of the target Secret's Data field will be presented in a volume
+// as files using the keys in the Data field as the file names.
+// Secret volumes support ownership management and SELinux relabeling.
+type SecretVolumeSource struct {
+ // Name of the secret in the pod's namespace to use.
+ // +optional
+ SecretName string
+ // If unspecified, each key-value pair in the Data field of the referenced
+ // Secret will be projected into the volume as a file whose name is the
+ // key and content is the value. If specified, the listed keys will be
+ // projected into the specified paths, and unlisted keys will not be
+ // present. If a key is specified which is not present in the Secret,
+ // the volume setup will error unless it is marked optional. Paths must be
+ // relative and may not contain the '..' path or start with '..'.
+ // +optional
+ Items []KeyToPath
+ // Mode bits to use on created files by default. Must be a value between
+ // 0 and 0777.
+ // Directories within the path are not affected by this setting.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ DefaultMode *int32
+ // Specify whether the Secret or its key must be defined
+ // +optional
+ Optional *bool
+}
+
+// Adapts a secret into a projected volume.
+//
+// The contents of the target Secret's Data field will be presented in a
+// projected volume as files using the keys in the Data field as the file names.
+// Note that this is identical to a secret volume source without the default
+// mode.
+type SecretProjection struct {
+ LocalObjectReference
+ // If unspecified, each key-value pair in the Data field of the referenced
+ // Secret will be projected into the volume as a file whose name is the
+ // key and content is the value. If specified, the listed keys will be
+ // projected into the specified paths, and unlisted keys will not be
+ // present. If a key is specified which is not present in the Secret,
+ // the volume setup will error unless it is marked optional. Paths must be
+ // relative and may not contain the '..' path or start with '..'.
+ // +optional
+ Items []KeyToPath
+ // Specify whether the Secret or its key must be defined
+ // +optional
+ Optional *bool
+}
+
+// Represents an NFS mount that lasts the lifetime of a pod.
+// NFS volumes do not support ownership management or SELinux relabeling.
+type NFSVolumeSource struct {
+ // Server is the hostname or IP address of the NFS server
+ Server string
+
+ // Path is the exported NFS share
+ Path string
+
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the NFS export to be mounted with read-only permissions
+ // +optional
+ ReadOnly bool
+}
+
+// Represents a Quobyte mount that lasts the lifetime of a pod.
+// Quobyte volumes do not support ownership management or SELinux relabeling.
+type QuobyteVolumeSource struct {
+ // Registry represents a single or multiple Quobyte Registry services
+ // specified as a string as host:port pair (multiple entries are separated with commas)
+ // which acts as the central registry for volumes
+ Registry string
+
+ // Volume is a string that references an already created Quobyte volume by name.
+ Volume string
+
+ // Defaults to false (read/write). ReadOnly here will force
+ // the Quobyte to be mounted with read-only permissions
+ // +optional
+ ReadOnly bool
+
+ // User to map volume access to
+ // Defaults to the root user
+ // +optional
+ User string
+
+ // Group to map volume access to
+ // Default is no group
+ // +optional
+ Group string
+}
+
+// Represents a Glusterfs mount that lasts the lifetime of a pod.
+// Glusterfs volumes do not support ownership management or SELinux relabeling.
+type GlusterfsVolumeSource struct {
+ // Required: EndpointsName is the endpoint name that details Glusterfs topology
+ EndpointsName string
+
+ // Required: Path is the Glusterfs volume path
+ Path string
+
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the Glusterfs to be mounted with read-only permissions
+ // +optional
+ ReadOnly bool
+}
+
+// Represents a Rados Block Device mount that lasts the lifetime of a pod.
+// RBD volumes support ownership management and SELinux relabeling.
+type RBDVolumeSource struct {
+ // Required: CephMonitors is a collection of Ceph monitors
+ CephMonitors []string
+ // Required: RBDImage is the rados image name
+ RBDImage string
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ FSType string
+ // Optional: RadosPool is the rados pool name,default is rbd
+ // +optional
+ RBDPool string
+ // Optional: RBDUser is the rados user name, default is admin
+ // +optional
+ RadosUser string
+ // Optional: Keyring is the path to key ring for RBDUser, default is /etc/ceph/keyring
+ // +optional
+ Keyring string
+ // Optional: SecretRef is name of the authentication secret for RBDUser, default is nil.
+ // +optional
+ SecretRef *LocalObjectReference
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool
+}
+
+// Represents a cinder volume resource in Openstack. A Cinder volume
+// must exist before mounting to a container. The volume must also be
+// in the same region as the kubelet. Cinder volumes support ownership
+// management and SELinux relabeling.
+type CinderVolumeSource struct {
+ // Unique id of the volume used to identify the cinder volume
+ VolumeID string
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ FSType string
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool
+}
+
+// Represents a Ceph Filesystem mount that lasts the lifetime of a pod
+// Cephfs volumes do not support ownership management or SELinux relabeling.
+type CephFSVolumeSource struct {
+ // Required: Monitors is a collection of Ceph monitors
+ Monitors []string
+ // Optional: Used as the mounted root, rather than the full Ceph tree, default is /
+ // +optional
+ Path string
+ // Optional: User is the rados user name, default is admin
+ // +optional
+ User string
+ // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret
+ // +optional
+ SecretFile string
+ // Optional: SecretRef is reference to the authentication secret for User, default is empty.
+ // +optional
+ SecretRef *LocalObjectReference
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool
+}
+
+// Represents a Flocker volume mounted by the Flocker agent.
+// One and only one of datasetName and datasetUUID should be set.
+// Flocker volumes do not support ownership management or SELinux relabeling.
+type FlockerVolumeSource struct {
+ // Name of the dataset stored as metadata -> name on the dataset for Flocker
+ // should be considered as deprecated
+ // +optional
+ DatasetName string
+ // UUID of the dataset. This is unique identifier of a Flocker dataset
+ // +optional
+ DatasetUUID string
+}
+
+// Represents a volume containing downward API info.
+// Downward API volumes support ownership management and SELinux relabeling.
+type DownwardAPIVolumeSource struct {
+ // Items is a list of DownwardAPIVolume file
+ // +optional
+ Items []DownwardAPIVolumeFile
+ // Mode bits to use on created files by default. Must be a value between
+ // 0 and 0777.
+ // Directories within the path are not affected by this setting.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ DefaultMode *int32
+}
+
+// Represents a single file containing information from the downward API
+type DownwardAPIVolumeFile struct {
+ // Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'
+ Path string
+ // Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.
+ // +optional
+ FieldRef *ObjectFieldSelector
+ // Selects a resource of the container: only resources limits and requests
+ // (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
+ // +optional
+ ResourceFieldRef *ResourceFieldSelector
+ // Optional: mode bits to use on this file, must be a value between 0
+ // and 0777. If not specified, the volume defaultMode will be used.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ Mode *int32
+}
+
+// Represents downward API info for projecting into a projected volume.
+// Note that this is identical to a downwardAPI volume source without the default
+// mode.
+type DownwardAPIProjection struct {
+ // Items is a list of DownwardAPIVolume file
+ // +optional
+ Items []DownwardAPIVolumeFile
+}
+
+// AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
+type AzureFileVolumeSource struct {
+ // the name of secret that contains Azure Storage Account Name and Key
+ SecretName string
+ // Share Name
+ ShareName string
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool
+}
+
+// Represents a vSphere volume resource.
+type VsphereVirtualDiskVolumeSource struct {
+ // Path that identifies vSphere volume vmdk
+ VolumePath string
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ FSType string
+ // Storage Policy Based Management (SPBM) profile name.
+ // +optional
+ StoragePolicyName string
+ // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.
+ // +optional
+ StoragePolicyID string
+}
+
+// Represents a Photon Controller persistent disk resource.
+type PhotonPersistentDiskVolumeSource struct {
+ // ID that identifies Photon Controller persistent disk
+ PdID string
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ FSType string
+}
+
+// PortworxVolumeSource represents a Portworx volume resource.
+type PortworxVolumeSource struct {
+ // VolumeID uniquely identifies a Portworx volume
+ VolumeID string
+ // FSType represents the filesystem type to mount
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ FSType string
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool
+}
+
+type AzureDataDiskCachingMode string
+type AzureDataDiskKind string
+
+const (
+ AzureDataDiskCachingNone AzureDataDiskCachingMode = "None"
+ AzureDataDiskCachingReadOnly AzureDataDiskCachingMode = "ReadOnly"
+ AzureDataDiskCachingReadWrite AzureDataDiskCachingMode = "ReadWrite"
+
+ AzureSharedBlobDisk AzureDataDiskKind = "Shared"
+ AzureDedicatedBlobDisk AzureDataDiskKind = "Dedicated"
+ AzureManagedDisk AzureDataDiskKind = "Managed"
+)
+
+// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
+type AzureDiskVolumeSource struct {
+ // The Name of the data disk in the blob storage
+ DiskName string
+ // The URI of the data disk in the blob storage
+ DataDiskURI string
+ // Host Caching mode: None, Read Only, Read Write.
+ // +optional
+ CachingMode *AzureDataDiskCachingMode
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ FSType *string
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly *bool
+ // Expected values Shared: mulitple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared
+ Kind *AzureDataDiskKind
+}
+
+// ScaleIOVolumeSource represents a persistent ScaleIO volume
+type ScaleIOVolumeSource struct {
+ // The host address of the ScaleIO API Gateway.
+ Gateway string
+ // The name of the storage system as configured in ScaleIO.
+ System string
+ // SecretRef references to the secret for ScaleIO user and other
+ // sensitive information. If this is not provided, Login operation will fail.
+ SecretRef *LocalObjectReference
+ // Flag to enable/disable SSL communication with Gateway, default false
+ // +optional
+ SSLEnabled bool
+ // The name of the Protection Domain for the configured storage (defaults to "default").
+ // +optional
+ ProtectionDomain string
+ // The Storage Pool associated with the protection domain (defaults to "default").
+ // +optional
+ StoragePool string
+ // Indicates whether the storage for a volume should be thick or thin (defaults to "thin").
+ // +optional
+ StorageMode string
+ // The name of a volume already created in the ScaleIO system
+ // that is associated with this volume source.
+ VolumeName string
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ FSType string
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool
+}
+
+// Represents a StorageOS persistent volume resource.
+type StorageOSVolumeSource struct {
+ // VolumeName is the human-readable name of the StorageOS volume. Volume
+ // names are only unique within a namespace.
+ VolumeName string
+ // VolumeNamespace specifies the scope of the volume within StorageOS. If no
+ // namespace is specified then the Pod's namespace will be used. This allows the
+ // Kubernetes name scoping to be mirrored within StorageOS for tighter integration.
+ // Set VolumeName to any name to override the default behaviour.
+ // Set to "default" if you are not using namespaces within StorageOS.
+ // Namespaces that do not pre-exist within StorageOS will be created.
+ // +optional
+ VolumeNamespace string
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ FSType string
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool
+ // SecretRef specifies the secret to use for obtaining the StorageOS API
+ // credentials. If not specified, default values will be attempted.
+ // +optional
+ SecretRef *LocalObjectReference
+}
+
+// Represents a StorageOS persistent volume resource.
+type StorageOSPersistentVolumeSource struct {
+ // VolumeName is the human-readable name of the StorageOS volume. Volume
+ // names are only unique within a namespace.
+ VolumeName string
+ // VolumeNamespace specifies the scope of the volume within StorageOS. If no
+ // namespace is specified then the Pod's namespace will be used. This allows the
+ // Kubernetes name scoping to be mirrored within StorageOS for tighter integration.
+ // Set VolumeName to any name to override the default behaviour.
+ // Set to "default" if you are not using namespaces within StorageOS.
+ // Namespaces that do not pre-exist within StorageOS will be created.
+ // +optional
+ VolumeNamespace string
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ FSType string
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool
+ // SecretRef specifies the secret to use for obtaining the StorageOS API
+ // credentials. If not specified, default values will be attempted.
+ // +optional
+ SecretRef *ObjectReference
+}
+
+// Adapts a ConfigMap into a volume.
+//
+// The contents of the target ConfigMap's Data field will be presented in a
+// volume as files using the keys in the Data field as the file names, unless
+// the items element is populated with specific mappings of keys to paths.
+// ConfigMap volumes support ownership management and SELinux relabeling.
+type ConfigMapVolumeSource struct {
+ LocalObjectReference
+ // If unspecified, each key-value pair in the Data field of the referenced
+ // ConfigMap will be projected into the volume as a file whose name is the
+ // key and content is the value. If specified, the listed keys will be
+ // projected into the specified paths, and unlisted keys will not be
+ // present. If a key is specified which is not present in the ConfigMap,
+ // the volume setup will error unless it is marked optional. Paths must be
+ // relative and may not contain the '..' path or start with '..'.
+ // +optional
+ Items []KeyToPath
+ // Mode bits to use on created files by default. Must be a value between
+ // 0 and 0777.
+ // Directories within the path are not affected by this setting.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ DefaultMode *int32
+ // Specify whether the ConfigMap or it's keys must be defined
+ // +optional
+ Optional *bool
+}
+
+// Adapts a ConfigMap into a projected volume.
+//
+// The contents of the target ConfigMap's Data field will be presented in a
+// projected volume as files using the keys in the Data field as the file names,
+// unless the items element is populated with specific mappings of keys to paths.
+// Note that this is identical to a configmap volume source without the default
+// mode.
+type ConfigMapProjection struct {
+ LocalObjectReference
+ // If unspecified, each key-value pair in the Data field of the referenced
+ // ConfigMap will be projected into the volume as a file whose name is the
+ // key and content is the value. If specified, the listed keys will be
+ // projected into the specified paths, and unlisted keys will not be
+ // present. If a key is specified which is not present in the ConfigMap,
+ // the volume setup will error unless it is marked optional. Paths must be
+ // relative and may not contain the '..' path or start with '..'.
+ // +optional
+ Items []KeyToPath
+ // Specify whether the ConfigMap or it's keys must be defined
+ // +optional
+ Optional *bool
+}
+
+// Represents a projected volume source
+type ProjectedVolumeSource struct {
+ // list of volume projections
+ Sources []VolumeProjection
+ // Mode bits to use on created files by default. Must be a value between
+ // 0 and 0777.
+ // Directories within the path are not affected by this setting.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ DefaultMode *int32
+}
+
+// Projection that may be projected along with other supported volume types
+type VolumeProjection struct {
+ // all types below are the supported types for projection into the same volume
+
+ // information about the secret data to project
+ Secret *SecretProjection
+ // information about the downwardAPI data to project
+ DownwardAPI *DownwardAPIProjection
+ // information about the configMap data to project
+ ConfigMap *ConfigMapProjection
+}
+
+// Maps a string key to a path within a volume.
+type KeyToPath struct {
+ // The key to project.
+ Key string
+
+ // The relative path of the file to map the key to.
+ // May not be an absolute path.
+ // May not contain the path element '..'.
+ // May not start with the string '..'.
+ Path string
+ // Optional: mode bits to use on this file, should be a value between 0
+ // and 0777. If not specified, the volume defaultMode will be used.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ Mode *int32
+}
+
+// Local represents directly-attached storage with node affinity
+type LocalVolumeSource struct {
+ // The full path to the volume on the node
+ // For alpha, this path must be a directory
+ // Once block as a source is supported, then this path can point to a block device
+ Path string
+}
+
+// ContainerPort represents a network port in a single container
+type ContainerPort struct {
+ // Optional: If specified, this must be an IANA_SVC_NAME Each named port
+ // in a pod must have a unique name.
+ // +optional
+ Name string
+ // Optional: If specified, this must be a valid port number, 0 < x < 65536.
+ // If HostNetwork is specified, this must match ContainerPort.
+ // +optional
+ HostPort int32
+ // Required: This must be a valid port number, 0 < x < 65536.
+ ContainerPort int32
+ // Required: Supports "TCP" and "UDP".
+ // +optional
+ Protocol Protocol
+ // Optional: What host IP to bind the external port to.
+ // +optional
+ HostIP string
+}
+
+// VolumeMount describes a mounting of a Volume within a container.
+type VolumeMount struct {
+ // Required: This must match the Name of a Volume [above].
+ Name string
+ // Optional: Defaults to false (read-write).
+ // +optional
+ ReadOnly bool
+ // Required. Must not contain ':'.
+ MountPath string
+ // Path within the volume from which the container's volume should be mounted.
+ // Defaults to "" (volume's root).
+ // +optional
+ SubPath string
+}
+
+// EnvVar represents an environment variable present in a Container.
+type EnvVar struct {
+ // Required: This must be a C_IDENTIFIER.
+ Name string
+ // Optional: no more than one of the following may be specified.
+ // Optional: Defaults to ""; variable references $(VAR_NAME) are expanded
+ // using the previous defined environment variables in the container and
+ // any service environment variables. If a variable cannot be resolved,
+ // the reference in the input string will be unchanged. The $(VAR_NAME)
+ // syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped
+ // references will never be expanded, regardless of whether the variable
+ // exists or not.
+ // +optional
+ Value string
+ // Optional: Specifies a source the value of this var should come from.
+ // +optional
+ ValueFrom *EnvVarSource
+}
+
+// EnvVarSource represents a source for the value of an EnvVar.
+// Only one of its fields may be set.
+type EnvVarSource struct {
+ // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations,
+ // spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP.
+ // +optional
+ FieldRef *ObjectFieldSelector
+ // Selects a resource of the container: only resources limits and requests
+ // (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
+ // +optional
+ ResourceFieldRef *ResourceFieldSelector
+ // Selects a key of a ConfigMap.
+ // +optional
+ ConfigMapKeyRef *ConfigMapKeySelector
+ // Selects a key of a secret in the pod's namespace.
+ // +optional
+ SecretKeyRef *SecretKeySelector
+}
+
+// ObjectFieldSelector selects an APIVersioned field of an object.
+type ObjectFieldSelector struct {
+ // Required: Version of the schema the FieldPath is written in terms of.
+ // If no value is specified, it will be defaulted to the APIVersion of the
+ // enclosing object.
+ APIVersion string
+ // Required: Path of the field to select in the specified API version
+ FieldPath string
+}
+
+// ResourceFieldSelector represents container resources (cpu, memory) and their output format
+type ResourceFieldSelector struct {
+ // Container name: required for volumes, optional for env vars
+ // +optional
+ ContainerName string
+ // Required: resource to select
+ Resource string
+ // Specifies the output format of the exposed resources, defaults to "1"
+ // +optional
+ Divisor resource.Quantity
+}
+
+// Selects a key from a ConfigMap.
+type ConfigMapKeySelector struct {
+ // The ConfigMap to select from.
+ LocalObjectReference
+ // The key to select.
+ Key string
+ // Specify whether the ConfigMap or it's key must be defined
+ // +optional
+ Optional *bool
+}
+
+// SecretKeySelector selects a key of a Secret.
+type SecretKeySelector struct {
+ // The name of the secret in the pod's namespace to select from.
+ LocalObjectReference
+ // The key of the secret to select from. Must be a valid secret key.
+ Key string
+ // Specify whether the Secret or it's key must be defined
+ // +optional
+ Optional *bool
+}
+
+// EnvFromSource represents the source of a set of ConfigMaps
+type EnvFromSource struct {
+ // An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.
+ // +optional
+ Prefix string
+ // The ConfigMap to select from.
+ //+optional
+ ConfigMapRef *ConfigMapEnvSource
+ // The Secret to select from.
+ //+optional
+ SecretRef *SecretEnvSource
+}
+
+// ConfigMapEnvSource selects a ConfigMap to populate the environment
+// variables with.
+//
+// The contents of the target ConfigMap's Data field will represent the
+// key-value pairs as environment variables.
+type ConfigMapEnvSource struct {
+ // The ConfigMap to select from.
+ LocalObjectReference
+ // Specify whether the ConfigMap must be defined
+ // +optional
+ Optional *bool
+}
+
+// SecretEnvSource selects a Secret to populate the environment
+// variables with.
+//
+// The contents of the target Secret's Data field will represent the
+// key-value pairs as environment variables.
+type SecretEnvSource struct {
+ // The Secret to select from.
+ LocalObjectReference
+ // Specify whether the Secret must be defined
+ // +optional
+ Optional *bool
+}
+
+// HTTPHeader describes a custom header to be used in HTTP probes
+type HTTPHeader struct {
+ // The header field name
+ Name string
+ // The header field value
+ Value string
+}
+
+// HTTPGetAction describes an action based on HTTP Get requests.
+type HTTPGetAction struct {
+ // Optional: Path to access on the HTTP server.
+ // +optional
+ Path string
+ // Required: Name or number of the port to access on the container.
+ // +optional
+ Port intstr.IntOrString
+ // Optional: Host name to connect to, defaults to the pod IP. You
+ // probably want to set "Host" in httpHeaders instead.
+ // +optional
+ Host string
+ // Optional: Scheme to use for connecting to the host, defaults to HTTP.
+ // +optional
+ Scheme URIScheme
+ // Optional: Custom headers to set in the request. HTTP allows repeated headers.
+ // +optional
+ HTTPHeaders []HTTPHeader
+}
+
+// URIScheme identifies the scheme used for connection to a host for Get actions
+type URIScheme string
+
+const (
+ // URISchemeHTTP means that the scheme used will be http://
+ URISchemeHTTP URIScheme = "HTTP"
+ // URISchemeHTTPS means that the scheme used will be https://
+ URISchemeHTTPS URIScheme = "HTTPS"
+)
+
+// TCPSocketAction describes an action based on opening a socket
+type TCPSocketAction struct {
+ // Required: Port to connect to.
+ // +optional
+ Port intstr.IntOrString
+ // Optional: Host name to connect to, defaults to the pod IP.
+ // +optional
+ Host string
+}
+
+// ExecAction describes a "run in container" action.
+type ExecAction struct {
+ // Command is the command line to execute inside the container, the working directory for the
+ // command is root ('/') in the container's filesystem. The command is simply exec'd, it is
+ // not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use
+ // a shell, you need to explicitly call out to that shell.
+ // +optional
+ Command []string
+}
+
+// Probe describes a health check to be performed against a container to determine whether it is
+// alive or ready to receive traffic.
+type Probe struct {
+ // The action taken to determine the health of a container
+ Handler
+ // Length of time before health checking is activated. In seconds.
+ // +optional
+ InitialDelaySeconds int32
+ // Length of time before health checking times out. In seconds.
+ // +optional
+ TimeoutSeconds int32
+ // How often (in seconds) to perform the probe.
+ // +optional
+ PeriodSeconds int32
+ // Minimum consecutive successes for the probe to be considered successful after having failed.
+ // Must be 1 for liveness.
+ // +optional
+ SuccessThreshold int32
+ // Minimum consecutive failures for the probe to be considered failed after having succeeded.
+ // +optional
+ FailureThreshold int32
+}
+
+// PullPolicy describes a policy for if/when to pull a container image
+type PullPolicy string
+
+const (
+ // PullAlways means that kubelet always attempts to pull the latest image. Container will fail If the pull fails.
+ PullAlways PullPolicy = "Always"
+ // PullNever means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present
+ PullNever PullPolicy = "Never"
+ // PullIfNotPresent means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails.
+ PullIfNotPresent PullPolicy = "IfNotPresent"
+)
+
+// TerminationMessagePolicy describes how termination messages are retrieved from a container.
+type TerminationMessagePolicy string
+
+const (
+ // TerminationMessageReadFile is the default behavior and will set the container status message to
+ // the contents of the container's terminationMessagePath when the container exits.
+ TerminationMessageReadFile TerminationMessagePolicy = "File"
+ // TerminationMessageFallbackToLogsOnError will read the most recent contents of the container logs
+ // for the container status message when the container exits with an error and the
+ // terminationMessagePath has no contents.
+ TerminationMessageFallbackToLogsOnError TerminationMessagePolicy = "FallbackToLogsOnError"
+)
+
+// Capability represent POSIX capabilities type
+type Capability string
+
+// Capabilities represent POSIX capabilities that can be added or removed to a running container.
+type Capabilities struct {
+ // Added capabilities
+ // +optional
+ Add []Capability
+ // Removed capabilities
+ // +optional
+ Drop []Capability
+}
+
+// ResourceRequirements describes the compute resource requirements.
+type ResourceRequirements struct {
+ // Limits describes the maximum amount of compute resources allowed.
+ // +optional
+ Limits ResourceList
+ // Requests describes the minimum amount of compute resources required.
+ // If Request is omitted for a container, it defaults to Limits if that is explicitly specified,
+ // otherwise to an implementation-defined value
+ // +optional
+ Requests ResourceList
+}
+
+// Container represents a single container that is expected to be run on the host.
+type Container struct {
+ // Required: This must be a DNS_LABEL. Each container in a pod must
+ // have a unique name.
+ Name string
+ // Required.
+ Image string
+ // Optional: The docker image's entrypoint is used if this is not provided; cannot be updated.
+ // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
+ // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
+ // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
+ // regardless of whether the variable exists or not.
+ // +optional
+ Command []string
+ // Optional: The docker image's cmd is used if this is not provided; cannot be updated.
+ // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
+ // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
+ // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
+ // regardless of whether the variable exists or not.
+ // +optional
+ Args []string
+ // Optional: Defaults to Docker's default.
+ // +optional
+ WorkingDir string
+ // +optional
+ Ports []ContainerPort
+ // List of sources to populate environment variables in the container.
+ // The keys defined within a source must be a C_IDENTIFIER. All invalid keys
+ // will be reported as an event when the container is starting. When a key exists in multiple
+ // sources, the value associated with the last source will take precedence.
+ // Values defined by an Env with a duplicate key will take precedence.
+ // Cannot be updated.
+ // +optional
+ EnvFrom []EnvFromSource
+ // +optional
+ Env []EnvVar
+ // Compute resource requirements.
+ // +optional
+ Resources ResourceRequirements
+ // +optional
+ VolumeMounts []VolumeMount
+ // +optional
+ LivenessProbe *Probe
+ // +optional
+ ReadinessProbe *Probe
+ // +optional
+ Lifecycle *Lifecycle
+ // Required.
+ // +optional
+ TerminationMessagePath string
+ // +optional
+ TerminationMessagePolicy TerminationMessagePolicy
+ // Required: Policy for pulling images for this container
+ ImagePullPolicy PullPolicy
+ // Optional: SecurityContext defines the security options the container should be run with.
+ // If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.
+ // +optional
+ SecurityContext *SecurityContext
+
+ // Variables for interactive containers, these have very specialized use-cases (e.g. debugging)
+ // and shouldn't be used for general purpose containers.
+ // +optional
+ Stdin bool
+ // +optional
+ StdinOnce bool
+ // +optional
+ TTY bool
+}
+
+// Handler defines a specific action that should be taken
+// TODO: pass structured data to these actions, and document that data here.
+type Handler struct {
+ // One and only one of the following should be specified.
+ // Exec specifies the action to take.
+ // +optional
+ Exec *ExecAction
+ // HTTPGet specifies the http request to perform.
+ // +optional
+ HTTPGet *HTTPGetAction
+ // TCPSocket specifies an action involving a TCP port.
+ // TODO: implement a realistic TCP lifecycle hook
+ // +optional
+ TCPSocket *TCPSocketAction
+}
+
+// Lifecycle describes actions that the management system should take in response to container lifecycle
+// events. For the PostStart and PreStop lifecycle handlers, management of the container blocks
+// until the action is complete, unless the container process fails, in which case the handler is aborted.
+type Lifecycle struct {
+ // PostStart is called immediately after a container is created. If the handler fails, the container
+ // is terminated and restarted.
+ // +optional
+ PostStart *Handler
+ // PreStop is called immediately before a container is terminated. The reason for termination is
+ // passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated.
+ // +optional
+ PreStop *Handler
+}
+
+// The below types are used by kube_client and api_server.
+
+type ConditionStatus string
+
+// These are valid condition statuses. "ConditionTrue" means a resource is in the condition;
+// "ConditionFalse" means a resource is not in the condition; "ConditionUnknown" means kubernetes
+// can't decide if a resource is in the condition or not. In the future, we could add other
+// intermediate conditions, e.g. ConditionDegraded.
+const (
+ ConditionTrue ConditionStatus = "True"
+ ConditionFalse ConditionStatus = "False"
+ ConditionUnknown ConditionStatus = "Unknown"
+)
+
+type ContainerStateWaiting struct {
+ // A brief CamelCase string indicating details about why the container is in waiting state.
+ // +optional
+ Reason string
+ // A human-readable message indicating details about why the container is in waiting state.
+ // +optional
+ Message string
+}
+
+type ContainerStateRunning struct {
+ // +optional
+ StartedAt metav1.Time
+}
+
+type ContainerStateTerminated struct {
+ ExitCode int32
+ // +optional
+ Signal int32
+ // +optional
+ Reason string
+ // +optional
+ Message string
+ // +optional
+ StartedAt metav1.Time
+ // +optional
+ FinishedAt metav1.Time
+ // +optional
+ ContainerID string
+}
+
+// ContainerState holds a possible state of container.
+// Only one of its members may be specified.
+// If none of them is specified, the default one is ContainerStateWaiting.
+type ContainerState struct {
+ // +optional
+ Waiting *ContainerStateWaiting
+ // +optional
+ Running *ContainerStateRunning
+ // +optional
+ Terminated *ContainerStateTerminated
+}
+
+type ContainerStatus struct {
+ // Each container in a pod must have a unique name.
+ Name string
+ // +optional
+ State ContainerState
+ // +optional
+ LastTerminationState ContainerState
+ // Ready specifies whether the container has passed its readiness check.
+ Ready bool
+ // Note that this is calculated from dead containers. But those containers are subject to
+ // garbage collection. This value will get capped at 5 by GC.
+ RestartCount int32
+ Image string
+ ImageID string
+ // +optional
+ ContainerID string
+}
+
+// PodPhase is a label for the condition of a pod at the current time.
+type PodPhase string
+
+// These are the valid statuses of pods.
+const (
+ // PodPending means the pod has been accepted by the system, but one or more of the containers
+ // has not been started. This includes time before being bound to a node, as well as time spent
+ // pulling images onto the host.
+ PodPending PodPhase = "Pending"
+ // PodRunning means the pod has been bound to a node and all of the containers have been started.
+ // At least one container is still running or is in the process of being restarted.
+ PodRunning PodPhase = "Running"
+ // PodSucceeded means that all containers in the pod have voluntarily terminated
+ // with a container exit code of 0, and the system is not going to restart any of these containers.
+ PodSucceeded PodPhase = "Succeeded"
+ // PodFailed means that all containers in the pod have terminated, and at least one container has
+ // terminated in a failure (exited with a non-zero exit code or was stopped by the system).
+ PodFailed PodPhase = "Failed"
+ // PodUnknown means that for some reason the state of the pod could not be obtained, typically due
+ // to an error in communicating with the host of the pod.
+ PodUnknown PodPhase = "Unknown"
+)
+
+type PodConditionType string
+
+// These are valid conditions of pod.
+const (
+ // PodScheduled represents status of the scheduling process for this pod.
+ PodScheduled PodConditionType = "PodScheduled"
+ // PodReady means the pod is able to service requests and should be added to the
+ // load balancing pools of all matching services.
+ PodReady PodConditionType = "Ready"
+ // PodInitialized means that all init containers in the pod have started successfully.
+ PodInitialized PodConditionType = "Initialized"
+ // PodReasonUnschedulable reason in PodScheduled PodCondition means that the scheduler
+ // can't schedule the pod right now, for example due to insufficient resources in the cluster.
+ PodReasonUnschedulable = "Unschedulable"
+)
+
+type PodCondition struct {
+ Type PodConditionType
+ Status ConditionStatus
+ // +optional
+ LastProbeTime metav1.Time
+ // +optional
+ LastTransitionTime metav1.Time
+ // +optional
+ Reason string
+ // +optional
+ Message string
+}
+
+// RestartPolicy describes how the container should be restarted.
+// Only one of the following restart policies may be specified.
+// If none of the following policies is specified, the default one
+// is RestartPolicyAlways.
+type RestartPolicy string
+
+const (
+ RestartPolicyAlways RestartPolicy = "Always"
+ RestartPolicyOnFailure RestartPolicy = "OnFailure"
+ RestartPolicyNever RestartPolicy = "Never"
+)
+
+// PodList is a list of Pods.
+type PodList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []Pod
+}
+
+// DNSPolicy defines how a pod's DNS will be configured.
+type DNSPolicy string
+
+const (
+ // DNSClusterFirstWithHostNet indicates that the pod should use cluster DNS
+ // first, if it is available, then fall back on the default
+ // (as determined by kubelet) DNS settings.
+ DNSClusterFirstWithHostNet DNSPolicy = "ClusterFirstWithHostNet"
+
+ // DNSClusterFirst indicates that the pod should use cluster DNS
+ // first unless hostNetwork is true, if it is available, then
+ // fall back on the default (as determined by kubelet) DNS settings.
+ DNSClusterFirst DNSPolicy = "ClusterFirst"
+
+ // DNSDefault indicates that the pod should use the default (as
+ // determined by kubelet) DNS settings.
+ DNSDefault DNSPolicy = "Default"
+)
+
+// A node selector represents the union of the results of one or more label queries
+// over a set of nodes; that is, it represents the OR of the selectors represented
+// by the node selector terms.
+type NodeSelector struct {
+ //Required. A list of node selector terms. The terms are ORed.
+ NodeSelectorTerms []NodeSelectorTerm
+}
+
+// A null or empty node selector term matches no objects.
+type NodeSelectorTerm struct {
+ //Required. A list of node selector requirements. The requirements are ANDed.
+ MatchExpressions []NodeSelectorRequirement
+}
+
+// A node selector requirement is a selector that contains values, a key, and an operator
+// that relates the key and values.
+type NodeSelectorRequirement struct {
+ // The label key that the selector applies to.
+ Key string
+ // Represents a key's relationship to a set of values.
+ // Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
+ Operator NodeSelectorOperator
+ // An array of string values. If the operator is In or NotIn,
+ // the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ // the values array must be empty. If the operator is Gt or Lt, the values
+ // array must have a single element, which will be interpreted as an integer.
+ // This array is replaced during a strategic merge patch.
+ // +optional
+ Values []string
+}
+
+// A node selector operator is the set of operators that can be used in
+// a node selector requirement.
+type NodeSelectorOperator string
+
+const (
+ NodeSelectorOpIn NodeSelectorOperator = "In"
+ NodeSelectorOpNotIn NodeSelectorOperator = "NotIn"
+ NodeSelectorOpExists NodeSelectorOperator = "Exists"
+ NodeSelectorOpDoesNotExist NodeSelectorOperator = "DoesNotExist"
+ NodeSelectorOpGt NodeSelectorOperator = "Gt"
+ NodeSelectorOpLt NodeSelectorOperator = "Lt"
+)
+
+// Affinity is a group of affinity scheduling rules.
+type Affinity struct {
+ // Describes node affinity scheduling rules for the pod.
+ // +optional
+ NodeAffinity *NodeAffinity
+ // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
+ // +optional
+ PodAffinity *PodAffinity
+ // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
+ // +optional
+ PodAntiAffinity *PodAntiAffinity
+}
+
+// Pod affinity is a group of inter pod affinity scheduling rules.
+type PodAffinity struct {
+ // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented.
+ // If the affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to a pod label update), the
+ // system will try to eventually evict the pod from its node.
+ // When there are multiple elements, the lists of nodes corresponding to each
+ // podAffinityTerm are intersected, i.e. all terms must be satisfied.
+ // +optional
+ // RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm
+ // If the affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to a pod label update), the
+ // system may or may not try to eventually evict the pod from its node.
+ // When there are multiple elements, the lists of nodes corresponding to each
+ // podAffinityTerm are intersected, i.e. all terms must be satisfied.
+ // +optional
+ RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm
+ // The scheduler will prefer to schedule pods to nodes that satisfy
+ // the affinity expressions specified by this field, but it may choose
+ // a node that violates one or more of the expressions. The node that is
+ // most preferred is the one with the greatest sum of weights, i.e.
+ // for each node that meets all of the scheduling requirements (resource
+ // request, requiredDuringScheduling affinity expressions, etc.),
+ // compute a sum by iterating through the elements of this field and adding
+ // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
+ // node(s) with the highest sum are the most preferred.
+ // +optional
+ PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm
+}
+
+// Pod anti affinity is a group of inter pod anti affinity scheduling rules.
+type PodAntiAffinity struct {
+ // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented.
+ // If the anti-affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the anti-affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to a pod label update), the
+ // system will try to eventually evict the pod from its node.
+ // When there are multiple elements, the lists of nodes corresponding to each
+ // podAffinityTerm are intersected, i.e. all terms must be satisfied.
+ // +optional
+ // RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm
+ // If the anti-affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the anti-affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to a pod label update), the
+ // system may or may not try to eventually evict the pod from its node.
+ // When there are multiple elements, the lists of nodes corresponding to each
+ // podAffinityTerm are intersected, i.e. all terms must be satisfied.
+ // +optional
+ RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm
+ // The scheduler will prefer to schedule pods to nodes that satisfy
+ // the anti-affinity expressions specified by this field, but it may choose
+ // a node that violates one or more of the expressions. The node that is
+ // most preferred is the one with the greatest sum of weights, i.e.
+ // for each node that meets all of the scheduling requirements (resource
+ // request, requiredDuringScheduling anti-affinity expressions, etc.),
+ // compute a sum by iterating through the elements of this field and adding
+ // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
+ // node(s) with the highest sum are the most preferred.
+ // +optional
+ PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm
+}
+
+// The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)
+type WeightedPodAffinityTerm struct {
+ // weight associated with matching the corresponding podAffinityTerm,
+ // in the range 1-100.
+ Weight int32
+ // Required. A pod affinity term, associated with the corresponding weight.
+ PodAffinityTerm PodAffinityTerm
+}
+
+// Defines a set of pods (namely those matching the labelSelector
+// relative to the given namespace(s)) that this pod should be
+// co-located (affinity) or not co-located (anti-affinity) with,
+// where co-located is defined as running on a node whose value of
+// the label with key <topologyKey> matches that of any node on which
+// a pod of the set of pods is running.
+type PodAffinityTerm struct {
+ // A label query over a set of resources, in this case pods.
+ // +optional
+ LabelSelector *metav1.LabelSelector
+ // namespaces specifies which namespaces the labelSelector applies to (matches against);
+ // null or empty list means "this pod's namespace"
+ Namespaces []string
+ // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
+ // the labelSelector in the specified namespaces, where co-located is defined as running on a node
+ // whose value of the label with key topologyKey matches that of any node on which any of the
+ // selected pods is running.
+ // For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as "all topologies"
+ // ("all topologies" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains);
+ // for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed.
+ // +optional
+ TopologyKey string
+}
+
+// Node affinity is a group of node affinity scheduling rules.
+type NodeAffinity struct {
+ // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented.
+ // If the affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to an update), the system
+ // will try to eventually evict the pod from its node.
+ // +optional
+ // RequiredDuringSchedulingRequiredDuringExecution *NodeSelector
+
+ // If the affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to an update), the system
+ // may or may not try to eventually evict the pod from its node.
+ // +optional
+ RequiredDuringSchedulingIgnoredDuringExecution *NodeSelector
+ // The scheduler will prefer to schedule pods to nodes that satisfy
+ // the affinity expressions specified by this field, but it may choose
+ // a node that violates one or more of the expressions. The node that is
+ // most preferred is the one with the greatest sum of weights, i.e.
+ // for each node that meets all of the scheduling requirements (resource
+ // request, requiredDuringScheduling affinity expressions, etc.),
+ // compute a sum by iterating through the elements of this field and adding
+ // "weight" to the sum if the node matches the corresponding matchExpressions; the
+ // node(s) with the highest sum are the most preferred.
+ // +optional
+ PreferredDuringSchedulingIgnoredDuringExecution []PreferredSchedulingTerm
+}
+
+// An empty preferred scheduling term matches all objects with implicit weight 0
+// (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).
+type PreferredSchedulingTerm struct {
+ // Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.
+ Weight int32
+ // A node selector term, associated with the corresponding weight.
+ Preference NodeSelectorTerm
+}
+
+// The node this Taint is attached to has the effect "effect" on
+// any pod that that does not tolerate the Taint.
+type Taint struct {
+ // Required. The taint key to be applied to a node.
+ Key string
+ // Required. The taint value corresponding to the taint key.
+ // +optional
+ Value string
+ // Required. The effect of the taint on pods
+ // that do not tolerate the taint.
+ // Valid effects are NoSchedule, PreferNoSchedule and NoExecute.
+ Effect TaintEffect
+ // TimeAdded represents the time at which the taint was added.
+ // It is only written for NoExecute taints.
+ // +optional
+ TimeAdded metav1.Time
+}
+
+type TaintEffect string
+
+const (
+ // Do not allow new pods to schedule onto the node unless they tolerate the taint,
+ // but allow all pods submitted to Kubelet without going through the scheduler
+ // to start, and allow all already-running pods to continue running.
+ // Enforced by the scheduler.
+ TaintEffectNoSchedule TaintEffect = "NoSchedule"
+ // Like TaintEffectNoSchedule, but the scheduler tries not to schedule
+ // new pods onto the node, rather than prohibiting new pods from scheduling
+ // onto the node entirely. Enforced by the scheduler.
+ TaintEffectPreferNoSchedule TaintEffect = "PreferNoSchedule"
+ // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented.
+ // Like TaintEffectNoSchedule, but additionally do not allow pods submitted to
+ // Kubelet without going through the scheduler to start.
+ // Enforced by Kubelet and the scheduler.
+ // TaintEffectNoScheduleNoAdmit TaintEffect = "NoScheduleNoAdmit"
+ // Evict any already-running pods that do not tolerate the taint.
+ // Currently enforced by NodeController.
+ TaintEffectNoExecute TaintEffect = "NoExecute"
+)
+
+// The pod this Toleration is attached to tolerates any taint that matches
+// the triple <key,value,effect> using the matching operator <operator>.
+type Toleration struct {
+ // Key is the taint key that the toleration applies to. Empty means match all taint keys.
+ // If the key is empty, operator must be Exists; this combination means to match all values and all keys.
+ // +optional
+ Key string
+ // Operator represents a key's relationship to the value.
+ // Valid operators are Exists and Equal. Defaults to Equal.
+ // Exists is equivalent to wildcard for value, so that a pod can
+ // tolerate all taints of a particular category.
+ // +optional
+ Operator TolerationOperator
+ // Value is the taint value the toleration matches to.
+ // If the operator is Exists, the value should be empty, otherwise just a regular string.
+ // +optional
+ Value string
+ // Effect indicates the taint effect to match. Empty means match all taint effects.
+ // When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
+ // +optional
+ Effect TaintEffect
+ // TolerationSeconds represents the period of time the toleration (which must be
+ // of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
+ // it is not set, which means tolerate the taint forever (do not evict). Zero and
+ // negative values will be treated as 0 (evict immediately) by the system.
+ // +optional
+ TolerationSeconds *int64
+}
+
+// A toleration operator is the set of operators that can be used in a toleration.
+type TolerationOperator string
+
+const (
+ TolerationOpExists TolerationOperator = "Exists"
+ TolerationOpEqual TolerationOperator = "Equal"
+)
+
+// PodSpec is a description of a pod
+type PodSpec struct {
+ Volumes []Volume
+ // List of initialization containers belonging to the pod.
+ InitContainers []Container
+ // List of containers belonging to the pod.
+ Containers []Container
+ // +optional
+ RestartPolicy RestartPolicy
+ // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request.
+ // Value must be non-negative integer. The value zero indicates delete immediately.
+ // If this value is nil, the default grace period will be used instead.
+ // The grace period is the duration in seconds after the processes running in the pod are sent
+ // a termination signal and the time when the processes are forcibly halted with a kill signal.
+ // Set this value longer than the expected cleanup time for your process.
+ // +optional
+ TerminationGracePeriodSeconds *int64
+ // Optional duration in seconds relative to the StartTime that the pod may be active on a node
+ // before the system actively tries to terminate the pod; value must be positive integer
+ // +optional
+ ActiveDeadlineSeconds *int64
+ // Required: Set DNS policy.
+ // +optional
+ DNSPolicy DNSPolicy
+ // NodeSelector is a selector which must be true for the pod to fit on a node
+ // +optional
+ NodeSelector map[string]string
+
+ // ServiceAccountName is the name of the ServiceAccount to use to run this pod
+ // The pod will be allowed to use secrets referenced by the ServiceAccount
+ ServiceAccountName string
+ // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.
+ // +optional
+ AutomountServiceAccountToken *bool
+
+ // NodeName is a request to schedule this pod onto a specific node. If it is non-empty,
+ // the scheduler simply schedules this pod onto that node, assuming that it fits resource
+ // requirements.
+ // +optional
+ NodeName string
+ // SecurityContext holds pod-level security attributes and common container settings.
+ // Optional: Defaults to empty. See type description for default values of each field.
+ // +optional
+ SecurityContext *PodSecurityContext
+ // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec.
+ // If specified, these secrets will be passed to individual puller implementations for them to use. For example,
+ // in the case of docker, only DockerConfig type secrets are honored.
+ // +optional
+ ImagePullSecrets []LocalObjectReference
+ // Specifies the hostname of the Pod.
+ // If not specified, the pod's hostname will be set to a system-defined value.
+ // +optional
+ Hostname string
+ // If specified, the fully qualified Pod hostname will be "<hostname>.<subdomain>.<pod namespace>.svc.<cluster domain>".
+ // If not specified, the pod will not have a domainname at all.
+ // +optional
+ Subdomain string
+ // If specified, the pod's scheduling constraints
+ // +optional
+ Affinity *Affinity
+ // If specified, the pod will be dispatched by specified scheduler.
+ // If not specified, the pod will be dispatched by default scheduler.
+ // +optional
+ SchedulerName string
+ // If specified, the pod's tolerations.
+ // +optional
+ Tolerations []Toleration
+ // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts
+ // file if specified. This is only valid for non-hostNetwork pods.
+ // +optional
+ HostAliases []HostAlias
+}
+
+// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
+// pod's hosts file.
+type HostAlias struct {
+ IP string
+ Hostnames []string
+}
+
+// Sysctl defines a kernel parameter to be set
+type Sysctl struct {
+ // Name of a property to set
+ Name string
+ // Value of a property to set
+ Value string
+}
+
+// PodSecurityContext holds pod-level security attributes and common container settings.
+// Some fields are also present in container.securityContext. Field values of
+// container.securityContext take precedence over field values of PodSecurityContext.
+type PodSecurityContext struct {
+ // Use the host's network namespace. If this option is set, the ports that will be
+ // used must be specified.
+ // Optional: Default to false
+ // +k8s:conversion-gen=false
+ // +optional
+ HostNetwork bool
+ // Use the host's pid namespace.
+ // Optional: Default to false.
+ // +k8s:conversion-gen=false
+ // +optional
+ HostPID bool
+ // Use the host's ipc namespace.
+ // Optional: Default to false.
+ // +k8s:conversion-gen=false
+ // +optional
+ HostIPC bool
+ // The SELinux context to be applied to all containers.
+ // If unspecified, the container runtime will allocate a random SELinux context for each
+ // container. May also be set in SecurityContext. If set in
+ // both SecurityContext and PodSecurityContext, the value specified in SecurityContext
+ // takes precedence for that container.
+ // +optional
+ SELinuxOptions *SELinuxOptions
+ // The UID to run the entrypoint of the container process.
+ // Defaults to user specified in image metadata if unspecified.
+ // May also be set in SecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence
+ // for that container.
+ // +optional
+ RunAsUser *int64
+ // Indicates that the container must run as a non-root user.
+ // If true, the Kubelet will validate the image at runtime to ensure that it
+ // does not run as UID 0 (root) and fail to start the container if it does.
+ // If unset or false, no such validation will be performed.
+ // May also be set in SecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence.
+ // +optional
+ RunAsNonRoot *bool
+ // A list of groups applied to the first process run in each container, in addition
+ // to the container's primary GID. If unspecified, no groups will be added to
+ // any container.
+ // +optional
+ SupplementalGroups []int64
+ // A special supplemental group that applies to all containers in a pod.
+ // Some volume types allow the Kubelet to change the ownership of that volume
+ // to be owned by the pod:
+ //
+ // 1. The owning GID will be the FSGroup
+ // 2. The setgid bit is set (new files created in the volume will be owned by FSGroup)
+ // 3. The permission bits are OR'd with rw-rw----
+ //
+ // If unset, the Kubelet will not modify the ownership and permissions of any volume.
+ // +optional
+ FSGroup *int64
+}
+
+// PodQOSClass defines the supported qos classes of Pods.
+type PodQOSClass string
+
+const (
+ // PodQOSGuaranteed is the Guaranteed qos class.
+ PodQOSGuaranteed PodQOSClass = "Guaranteed"
+ // PodQOSBurstable is the Burstable qos class.
+ PodQOSBurstable PodQOSClass = "Burstable"
+ // PodQOSBestEffort is the BestEffort qos class.
+ PodQOSBestEffort PodQOSClass = "BestEffort"
+)
+
+// PodStatus represents information about the status of a pod. Status may trail the actual
+// state of a system.
+type PodStatus struct {
+ // +optional
+ Phase PodPhase
+ // +optional
+ Conditions []PodCondition
+ // A human readable message indicating details about why the pod is in this state.
+ // +optional
+ Message string
+ // A brief CamelCase message indicating details about why the pod is in this state. e.g. 'OutOfDisk'
+ // +optional
+ Reason string
+
+ // +optional
+ HostIP string
+ // +optional
+ PodIP string
+
+ // Date and time at which the object was acknowledged by the Kubelet.
+ // This is before the Kubelet pulled the container image(s) for the pod.
+ // +optional
+ StartTime *metav1.Time
+ // +optional
+ QOSClass PodQOSClass
+
+ // The list has one entry per init container in the manifest. The most recent successful
+ // init container will have ready = true, the most recently started container will have
+ // startTime set.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-and-container-status
+ InitContainerStatuses []ContainerStatus
+ // The list has one entry per container in the manifest. Each entry is
+ // currently the output of `docker inspect`. This output format is *not*
+ // final and should not be relied upon.
+ // TODO: Make real decisions about what our info should look like. Re-enable fuzz test
+ // when we have done this.
+ // +optional
+ ContainerStatuses []ContainerStatus
+}
+
+// PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded
+type PodStatusResult struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+ // Status represents the current information about a pod. This data may not be up
+ // to date.
+ // +optional
+ Status PodStatus
+}
+
+// +genclient=true
+
+// Pod is a collection of containers, used as either input (create, update) or as output (list, get).
+type Pod struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Spec defines the behavior of a pod.
+ // +optional
+ Spec PodSpec
+
+ // Status represents the current information about a pod. This data may not be up
+ // to date.
+ // +optional
+ Status PodStatus
+}
+
+// PodTemplateSpec describes the data a pod should have when created from a template
+type PodTemplateSpec struct {
+ // Metadata of the pods created from this template.
+ // +optional
+ metav1.ObjectMeta
+
+ // Spec defines the behavior of a pod.
+ // +optional
+ Spec PodSpec
+}
+
+// +genclient=true
+
+// PodTemplate describes a template for creating copies of a predefined pod.
+type PodTemplate struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Template defines the pods that will be created from this pod template
+ // +optional
+ Template PodTemplateSpec
+}
+
+// PodTemplateList is a list of PodTemplates.
+type PodTemplateList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []PodTemplate
+}
+
+// ReplicationControllerSpec is the specification of a replication controller.
+// As the internal representation of a replication controller, it may have either
+// a TemplateRef or a Template set.
+type ReplicationControllerSpec struct {
+ // Replicas is the number of desired replicas.
+ Replicas int32
+
+ // Minimum number of seconds for which a newly created pod should be ready
+ // without any of its container crashing, for it to be considered available.
+ // Defaults to 0 (pod will be considered available as soon as it is ready)
+ // +optional
+ MinReadySeconds int32
+
+ // Selector is a label query over pods that should match the Replicas count.
+ Selector map[string]string
+
+ // TemplateRef is a reference to an object that describes the pod that will be created if
+ // insufficient replicas are detected. This reference is ignored if a Template is set.
+ // Must be set before converting to a versioned API object
+ // +optional
+ //TemplateRef *ObjectReference
+
+ // Template is the object that describes the pod that will be created if
+ // insufficient replicas are detected. Internally, this takes precedence over a
+ // TemplateRef.
+ // +optional
+ Template *PodTemplateSpec
+}
+
+// ReplicationControllerStatus represents the current status of a replication
+// controller.
+type ReplicationControllerStatus struct {
+ // Replicas is the number of actual replicas.
+ Replicas int32
+
+ // The number of pods that have labels matching the labels of the pod template of the replication controller.
+ // +optional
+ FullyLabeledReplicas int32
+
+ // The number of ready replicas for this replication controller.
+ // +optional
+ ReadyReplicas int32
+
+ // The number of available replicas (ready for at least minReadySeconds) for this replication controller.
+ // +optional
+ AvailableReplicas int32
+
+ // ObservedGeneration is the most recent generation observed by the controller.
+ // +optional
+ ObservedGeneration int64
+
+ // Represents the latest available observations of a replication controller's current state.
+ // +optional
+ Conditions []ReplicationControllerCondition
+}
+
+type ReplicationControllerConditionType string
+
+// These are valid conditions of a replication controller.
+const (
+ // ReplicationControllerReplicaFailure is added in a replication controller when one of its pods
+ // fails to be created due to insufficient quota, limit ranges, pod security policy, node selectors,
+ // etc. or deleted due to kubelet being down or finalizers are failing.
+ ReplicationControllerReplicaFailure ReplicationControllerConditionType = "ReplicaFailure"
+)
+
+// ReplicationControllerCondition describes the state of a replication controller at a certain point.
+type ReplicationControllerCondition struct {
+ // Type of replication controller condition.
+ Type ReplicationControllerConditionType
+ // Status of the condition, one of True, False, Unknown.
+ Status ConditionStatus
+ // The last time the condition transitioned from one status to another.
+ // +optional
+ LastTransitionTime metav1.Time
+ // The reason for the condition's last transition.
+ // +optional
+ Reason string
+ // A human readable message indicating details about the transition.
+ // +optional
+ Message string
+}
+
+// +genclient=true
+
+// ReplicationController represents the configuration of a replication controller.
+type ReplicationController struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Spec defines the desired behavior of this replication controller.
+ // +optional
+ Spec ReplicationControllerSpec
+
+ // Status is the current status of this replication controller. This data may be
+ // out of date by some window of time.
+ // +optional
+ Status ReplicationControllerStatus
+}
+
+// ReplicationControllerList is a collection of replication controllers.
+type ReplicationControllerList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []ReplicationController
+}
+
+const (
+ // ClusterIPNone - do not assign a cluster IP
+ // no proxying required and no environment variables should be created for pods
+ ClusterIPNone = "None"
+)
+
+// ServiceList holds a list of services.
+type ServiceList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []Service
+}
+
+// Session Affinity Type string
+type ServiceAffinity string
+
+const (
+ // ServiceAffinityClientIP is the Client IP based.
+ ServiceAffinityClientIP ServiceAffinity = "ClientIP"
+
+ // ServiceAffinityNone - no session affinity.
+ ServiceAffinityNone ServiceAffinity = "None"
+)
+
+// Service Type string describes ingress methods for a service
+type ServiceType string
+
+const (
+ // ServiceTypeClusterIP means a service will only be accessible inside the
+ // cluster, via the ClusterIP.
+ ServiceTypeClusterIP ServiceType = "ClusterIP"
+
+ // ServiceTypeNodePort means a service will be exposed on one port of
+ // every node, in addition to 'ClusterIP' type.
+ ServiceTypeNodePort ServiceType = "NodePort"
+
+ // ServiceTypeLoadBalancer means a service will be exposed via an
+ // external load balancer (if the cloud provider supports it), in addition
+ // to 'NodePort' type.
+ ServiceTypeLoadBalancer ServiceType = "LoadBalancer"
+
+ // ServiceTypeExternalName means a service consists of only a reference to
+ // an external name that kubedns or equivalent will return as a CNAME
+ // record, with no exposing or proxying of any pods involved.
+ ServiceTypeExternalName ServiceType = "ExternalName"
+)
+
+// Service External Traffic Policy Type string
+type ServiceExternalTrafficPolicyType string
+
+const (
+ // ServiceExternalTrafficPolicyTypeLocal specifies node-local endpoints behavior.
+ ServiceExternalTrafficPolicyTypeLocal ServiceExternalTrafficPolicyType = "Local"
+ // ServiceExternalTrafficPolicyTypeCluster specifies cluster-wide (legacy) behavior.
+ ServiceExternalTrafficPolicyTypeCluster ServiceExternalTrafficPolicyType = "Cluster"
+)
+
+// ServiceStatus represents the current status of a service
+type ServiceStatus struct {
+ // LoadBalancer contains the current status of the load-balancer,
+ // if one is present.
+ // +optional
+ LoadBalancer LoadBalancerStatus
+}
+
+// LoadBalancerStatus represents the status of a load-balancer
+type LoadBalancerStatus struct {
+ // Ingress is a list containing ingress points for the load-balancer;
+ // traffic intended for the service should be sent to these ingress points.
+ // +optional
+ Ingress []LoadBalancerIngress
+}
+
+// LoadBalancerIngress represents the status of a load-balancer ingress point:
+// traffic intended for the service should be sent to an ingress point.
+type LoadBalancerIngress struct {
+ // IP is set for load-balancer ingress points that are IP based
+ // (typically GCE or OpenStack load-balancers)
+ // +optional
+ IP string
+
+ // Hostname is set for load-balancer ingress points that are DNS based
+ // (typically AWS load-balancers)
+ // +optional
+ Hostname string
+}
+
+// ServiceSpec describes the attributes that a user creates on a service
+type ServiceSpec struct {
+ // Type determines how the Service is exposed. Defaults to ClusterIP. Valid
+ // options are ExternalName, ClusterIP, NodePort, and LoadBalancer.
+ // "ExternalName" maps to the specified externalName.
+ // "ClusterIP" allocates a cluster-internal IP address for load-balancing to
+ // endpoints. Endpoints are determined by the selector or if that is not
+ // specified, by manual construction of an Endpoints object. If clusterIP is
+ // "None", no virtual IP is allocated and the endpoints are published as a
+ // set of endpoints rather than a stable IP.
+ // "NodePort" builds on ClusterIP and allocates a port on every node which
+ // routes to the clusterIP.
+ // "LoadBalancer" builds on NodePort and creates an
+ // external load-balancer (if supported in the current cloud) which routes
+ // to the clusterIP.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/
+ // +optional
+ Type ServiceType
+
+ // Required: The list of ports that are exposed by this service.
+ Ports []ServicePort
+
+ // Route service traffic to pods with label keys and values matching this
+ // selector. If empty or not present, the service is assumed to have an
+ // external process managing its endpoints, which Kubernetes will not
+ // modify. Only applies to types ClusterIP, NodePort, and LoadBalancer.
+ // Ignored if type is ExternalName.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/
+ Selector map[string]string
+
+ // ClusterIP is the IP address of the service and is usually assigned
+ // randomly by the master. If an address is specified manually and is not in
+ // use by others, it will be allocated to the service; otherwise, creation
+ // of the service will fail. This field can not be changed through updates.
+ // Valid values are "None", empty string (""), or a valid IP address. "None"
+ // can be specified for headless services when proxying is not required.
+ // Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if
+ // type is ExternalName.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
+ // +optional
+ ClusterIP string
+
+ // ExternalName is the external reference that kubedns or equivalent will
+ // return as a CNAME record for this service. No proxying will be involved.
+ // Must be a valid DNS name and requires Type to be ExternalName.
+ ExternalName string
+
+ // ExternalIPs are used by external load balancers, or can be set by
+ // users to handle external traffic that arrives at a node.
+ // +optional
+ ExternalIPs []string
+
+ // Only applies to Service Type: LoadBalancer
+ // LoadBalancer will get created with the IP specified in this field.
+ // This feature depends on whether the underlying cloud-provider supports specifying
+ // the loadBalancerIP when a load balancer is created.
+ // This field will be ignored if the cloud-provider does not support the feature.
+ // +optional
+ LoadBalancerIP string
+
+ // Optional: Supports "ClientIP" and "None". Used to maintain session affinity.
+ // +optional
+ SessionAffinity ServiceAffinity
+
+ // Optional: If specified and supported by the platform, this will restrict traffic through the cloud-provider
+ // load-balancer will be restricted to the specified client IPs. This field will be ignored if the
+ // cloud-provider does not support the feature."
+ // +optional
+ LoadBalancerSourceRanges []string
+
+ // externalTrafficPolicy denotes if this Service desires to route external
+ // traffic to node-local or cluster-wide endpoints. "Local" preserves the
+ // client source IP and avoids a second hop for LoadBalancer and Nodeport
+ // type services, but risks potentially imbalanced traffic spreading.
+ // "Cluster" obscures the client source IP and may cause a second hop to
+ // another node, but should have good overall load-spreading.
+ // +optional
+ ExternalTrafficPolicy ServiceExternalTrafficPolicyType
+
+ // healthCheckNodePort specifies the healthcheck nodePort for the service.
+ // If not specified, HealthCheckNodePort is created by the service api
+ // backend with the allocated nodePort. Will use user-specified nodePort value
+ // if specified by the client. Only effects when Type is set to LoadBalancer
+ // and ExternalTrafficPolicy is set to Local.
+ // +optional
+ HealthCheckNodePort int32
+}
+
+type ServicePort struct {
+ // Optional if only one ServicePort is defined on this service: The
+ // name of this port within the service. This must be a DNS_LABEL.
+ // All ports within a ServiceSpec must have unique names. This maps to
+ // the 'Name' field in EndpointPort objects.
+ Name string
+
+ // The IP protocol for this port. Supports "TCP" and "UDP".
+ Protocol Protocol
+
+ // The port that will be exposed on the service.
+ Port int32
+
+ // Optional: The target port on pods selected by this service. If this
+ // is a string, it will be looked up as a named port in the target
+ // Pod's container ports. If this is not specified, the value
+ // of the 'port' field is used (an identity map).
+ // This field is ignored for services with clusterIP=None, and should be
+ // omitted or set equal to the 'port' field.
+ TargetPort intstr.IntOrString
+
+ // The port on each node on which this service is exposed.
+ // Default is to auto-allocate a port if the ServiceType of this Service requires one.
+ NodePort int32
+}
+
+// +genclient=true
+
+// Service is a named abstraction of software service (for example, mysql) consisting of local port
+// (for example 3306) that the proxy listens on, and the selector that determines which pods
+// will answer requests sent through the proxy.
+type Service struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Spec defines the behavior of a service.
+ // +optional
+ Spec ServiceSpec
+
+ // Status represents the current status of a service.
+ // +optional
+ Status ServiceStatus
+}
+
+// +genclient=true
+
+// ServiceAccount binds together:
+// * a name, understood by users, and perhaps by peripheral systems, for an identity
+// * a principal that can be authenticated and authorized
+// * a set of secrets
+type ServiceAccount struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount
+ Secrets []ObjectReference
+
+ // ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images
+ // in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets
+ // can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet.
+ // +optional
+ ImagePullSecrets []LocalObjectReference
+
+ // AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted.
+ // Can be overridden at the pod level.
+ // +optional
+ AutomountServiceAccountToken *bool
+}
+
+// ServiceAccountList is a list of ServiceAccount objects
+type ServiceAccountList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []ServiceAccount
+}
+
+// +genclient=true
+
+// Endpoints is a collection of endpoints that implement the actual service. Example:
+// Name: "mysvc",
+// Subsets: [
+// {
+// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
+// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
+// },
+// {
+// Addresses: [{"ip": "10.10.3.3"}],
+// Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}]
+// },
+// ]
+type Endpoints struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // The set of all endpoints is the union of all subsets.
+ Subsets []EndpointSubset
+}
+
+// EndpointSubset is a group of addresses with a common set of ports. The
+// expanded set of endpoints is the Cartesian product of Addresses x Ports.
+// For example, given:
+// {
+// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
+// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
+// }
+// The resulting set of endpoints can be viewed as:
+// a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],
+// b: [ 10.10.1.1:309, 10.10.2.2:309 ]
+type EndpointSubset struct {
+ Addresses []EndpointAddress
+ NotReadyAddresses []EndpointAddress
+ Ports []EndpointPort
+}
+
+// EndpointAddress is a tuple that describes single IP address.
+type EndpointAddress struct {
+ // The IP of this endpoint.
+ // IPv6 is also accepted but not fully supported on all platforms. Also, certain
+ // kubernetes components, like kube-proxy, are not IPv6 ready.
+ // TODO: This should allow hostname or IP, see #4447.
+ IP string
+ // Optional: Hostname of this endpoint
+ // Meant to be used by DNS servers etc.
+ // +optional
+ Hostname string
+ // Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.
+ // +optional
+ NodeName *string
+ // Optional: The kubernetes object related to the entry point.
+ TargetRef *ObjectReference
+}
+
+// EndpointPort is a tuple that describes a single port.
+type EndpointPort struct {
+ // The name of this port (corresponds to ServicePort.Name). Optional
+ // if only one port is defined. Must be a DNS_LABEL.
+ Name string
+
+ // The port number.
+ Port int32
+
+ // The IP protocol for this port.
+ Protocol Protocol
+}
+
+// EndpointsList is a list of endpoints.
+type EndpointsList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []Endpoints
+}
+
+// NodeSpec describes the attributes that a node is created with.
+type NodeSpec struct {
+ // PodCIDR represents the pod IP range assigned to the node
+ // Note: assigning IP ranges to nodes might need to be revisited when we support migratable IPs.
+ // +optional
+ PodCIDR string
+
+ // External ID of the node assigned by some machine database (e.g. a cloud provider)
+ // +optional
+ ExternalID string
+
+ // ID of the node assigned by the cloud provider
+ // Note: format is "<ProviderName>://<ProviderSpecificNodeID>"
+ // +optional
+ ProviderID string
+
+ // Unschedulable controls node schedulability of new pods. By default node is schedulable.
+ // +optional
+ Unschedulable bool
+
+ // If specified, the node's taints.
+ // +optional
+ Taints []Taint
+}
+
+// DaemonEndpoint contains information about a single Daemon endpoint.
+type DaemonEndpoint struct {
+ /*
+ The port tag was not properly in quotes in earlier releases, so it must be
+ uppercased for backwards compat (since it was falling back to var name of
+ 'Port').
+ */
+
+ // Port number of the given endpoint.
+ Port int32
+}
+
+// NodeDaemonEndpoints lists ports opened by daemons running on the Node.
+type NodeDaemonEndpoints struct {
+ // Endpoint on which Kubelet is listening.
+ // +optional
+ KubeletEndpoint DaemonEndpoint
+}
+
+// NodeSystemInfo is a set of ids/uuids to uniquely identify the node.
+type NodeSystemInfo struct {
+ // MachineID reported by the node. For unique machine identification
+ // in the cluster this field is preferred. Learn more from man(5)
+ // machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html
+ MachineID string
+ // SystemUUID reported by the node. For unique machine identification
+ // MachineID is preferred. This field is specific to Red Hat hosts
+ // https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html
+ SystemUUID string
+ // Boot ID reported by the node.
+ BootID string
+ // Kernel Version reported by the node.
+ KernelVersion string
+ // OS Image reported by the node.
+ OSImage string
+ // ContainerRuntime Version reported by the node.
+ ContainerRuntimeVersion string
+ // Kubelet Version reported by the node.
+ KubeletVersion string
+ // KubeProxy Version reported by the node.
+ KubeProxyVersion string
+ // The Operating System reported by the node
+ OperatingSystem string
+ // The Architecture reported by the node
+ Architecture string
+}
+
+// NodeStatus is information about the current status of a node.
+type NodeStatus struct {
+ // Capacity represents the total resources of a node.
+ // +optional
+ Capacity ResourceList
+ // Allocatable represents the resources of a node that are available for scheduling.
+ // +optional
+ Allocatable ResourceList
+ // NodePhase is the current lifecycle phase of the node.
+ // +optional
+ Phase NodePhase
+ // Conditions is an array of current node conditions.
+ // +optional
+ Conditions []NodeCondition
+ // Queried from cloud provider, if available.
+ // +optional
+ Addresses []NodeAddress
+ // Endpoints of daemons running on the Node.
+ // +optional
+ DaemonEndpoints NodeDaemonEndpoints
+ // Set of ids/uuids to uniquely identify the node.
+ // +optional
+ NodeInfo NodeSystemInfo
+ // List of container images on this node
+ // +optional
+ Images []ContainerImage
+ // List of attachable volumes in use (mounted) by the node.
+ // +optional
+ VolumesInUse []UniqueVolumeName
+ // List of volumes that are attached to the node.
+ // +optional
+ VolumesAttached []AttachedVolume
+}
+
+type UniqueVolumeName string
+
+// AttachedVolume describes a volume attached to a node
+type AttachedVolume struct {
+ // Name of the attached volume
+ Name UniqueVolumeName
+
+ // DevicePath represents the device path where the volume should be available
+ DevicePath string
+}
+
+// AvoidPods describes pods that should avoid this node. This is the value for a
+// Node annotation with key scheduler.alpha.kubernetes.io/preferAvoidPods and
+// will eventually become a field of NodeStatus.
+type AvoidPods struct {
+ // Bounded-sized list of signatures of pods that should avoid this node, sorted
+ // in timestamp order from oldest to newest. Size of the slice is unspecified.
+ // +optional
+ PreferAvoidPods []PreferAvoidPodsEntry
+}
+
+// Describes a class of pods that should avoid this node.
+type PreferAvoidPodsEntry struct {
+ // The class of pods.
+ PodSignature PodSignature
+ // Time at which this entry was added to the list.
+ // +optional
+ EvictionTime metav1.Time
+ // (brief) reason why this entry was added to the list.
+ // +optional
+ Reason string
+ // Human readable message indicating why this entry was added to the list.
+ // +optional
+ Message string
+}
+
+// Describes the class of pods that should avoid this node.
+// Exactly one field should be set.
+type PodSignature struct {
+ // Reference to controller whose pods should avoid this node.
+ // +optional
+ PodController *metav1.OwnerReference
+}
+
+// Describe a container image
+type ContainerImage struct {
+ // Names by which this image is known.
+ Names []string
+ // The size of the image in bytes.
+ // +optional
+ SizeBytes int64
+}
+
+type NodePhase string
+
+// These are the valid phases of node.
+const (
+ // NodePending means the node has been created/added by the system, but not configured.
+ NodePending NodePhase = "Pending"
+ // NodeRunning means the node has been configured and has Kubernetes components running.
+ NodeRunning NodePhase = "Running"
+ // NodeTerminated means the node has been removed from the cluster.
+ NodeTerminated NodePhase = "Terminated"
+)
+
+type NodeConditionType string
+
+// These are valid conditions of node. Currently, we don't have enough information to decide
+// node condition. In the future, we will add more. The proposed set of conditions are:
+// NodeReady, NodeReachable
+const (
+ // NodeReady means kubelet is healthy and ready to accept pods.
+ NodeReady NodeConditionType = "Ready"
+ // NodeOutOfDisk means the kubelet will not accept new pods due to insufficient free disk
+ // space on the node.
+ NodeOutOfDisk NodeConditionType = "OutOfDisk"
+ // NodeMemoryPressure means the kubelet is under pressure due to insufficient available memory.
+ NodeMemoryPressure NodeConditionType = "MemoryPressure"
+ // NodeDiskPressure means the kubelet is under pressure due to insufficient available disk.
+ NodeDiskPressure NodeConditionType = "DiskPressure"
+ // NodeNetworkUnavailable means that network for the node is not correctly configured.
+ NodeNetworkUnavailable NodeConditionType = "NetworkUnavailable"
+)
+
+type NodeCondition struct {
+ Type NodeConditionType
+ Status ConditionStatus
+ // +optional
+ LastHeartbeatTime metav1.Time
+ // +optional
+ LastTransitionTime metav1.Time
+ // +optional
+ Reason string
+ // +optional
+ Message string
+}
+
+type NodeAddressType string
+
+const (
+ NodeHostName NodeAddressType = "Hostname"
+ NodeExternalIP NodeAddressType = "ExternalIP"
+ NodeInternalIP NodeAddressType = "InternalIP"
+ NodeExternalDNS NodeAddressType = "ExternalDNS"
+ NodeInternalDNS NodeAddressType = "InternalDNS"
+)
+
+type NodeAddress struct {
+ Type NodeAddressType
+ Address string
+}
+
+// NodeResources is an object for conveying resource information about a node.
+// see http://releases.k8s.io/HEAD/docs/design/resources.md for more details.
+type NodeResources struct {
+ // Capacity represents the available resources of a node
+ // +optional
+ Capacity ResourceList
+}
+
+// ResourceName is the name identifying various resources in a ResourceList.
+type ResourceName string
+
+// Resource names must be not more than 63 characters, consisting of upper- or lower-case alphanumeric characters,
+// with the -, _, and . characters allowed anywhere, except the first or last character.
+// The default convention, matching that for annotations, is to use lower-case names, with dashes, rather than
+// camel case, separating compound words.
+// Fully-qualified resource typenames are constructed from a DNS-style subdomain, followed by a slash `/` and a name.
+const (
+ // CPU, in cores. (500m = .5 cores)
+ ResourceCPU ResourceName = "cpu"
+ // Memory, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
+ ResourceMemory ResourceName = "memory"
+ // Volume size, in bytes (e,g. 5Gi = 5GiB = 5 * 1024 * 1024 * 1024)
+ ResourceStorage ResourceName = "storage"
+ // Local Storage for overlay filesystem, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
+ // The resource name for ResourceStorageOverlay is alpha and it can change across releases.
+ ResourceStorageOverlay ResourceName = "storage.kubernetes.io/overlay"
+ // Local Storage for scratch space, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
+ // The resource name for ResourceStorageScratch is alpha and it can change across releases.
+ ResourceStorageScratch ResourceName = "storage.kubernetes.io/scratch"
+ // NVIDIA GPU, in devices. Alpha, might change: although fractional and allowing values >1, only one whole device per node is assigned.
+ ResourceNvidiaGPU ResourceName = "alpha.kubernetes.io/nvidia-gpu"
+ // Number of Pods that may be running on this Node: see ResourcePods
+)
+
+const (
+ // Namespace prefix for opaque counted resources (alpha).
+ ResourceOpaqueIntPrefix = "pod.alpha.kubernetes.io/opaque-int-resource-"
+)
+
+// ResourceList is a set of (resource name, quantity) pairs.
+type ResourceList map[ResourceName]resource.Quantity
+
+// +genclient=true
+// +nonNamespaced=true
+
+// Node is a worker node in Kubernetes
+// The name of the node according to etcd is in ObjectMeta.Name.
+type Node struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Spec defines the behavior of a node.
+ // +optional
+ Spec NodeSpec
+
+ // Status describes the current status of a Node
+ // +optional
+ Status NodeStatus
+}
+
+// NodeList is a list of nodes.
+type NodeList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []Node
+}
+
+// NamespaceSpec describes the attributes on a Namespace
+type NamespaceSpec struct {
+ // Finalizers is an opaque list of values that must be empty to permanently remove object from storage
+ Finalizers []FinalizerName
+}
+
+// FinalizerName is the name identifying a finalizer during namespace lifecycle.
+type FinalizerName string
+
+// These are internal finalizer values to Kubernetes, must be qualified name unless defined here or
+// in metav1.
+const (
+ FinalizerKubernetes FinalizerName = "kubernetes"
+)
+
+// NamespaceStatus is information about the current status of a Namespace.
+type NamespaceStatus struct {
+ // Phase is the current lifecycle phase of the namespace.
+ // +optional
+ Phase NamespacePhase
+}
+
+type NamespacePhase string
+
+// These are the valid phases of a namespace.
+const (
+ // NamespaceActive means the namespace is available for use in the system
+ NamespaceActive NamespacePhase = "Active"
+ // NamespaceTerminating means the namespace is undergoing graceful termination
+ NamespaceTerminating NamespacePhase = "Terminating"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+
+// A namespace provides a scope for Names.
+// Use of multiple namespaces is optional
+type Namespace struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Spec defines the behavior of the Namespace.
+ // +optional
+ Spec NamespaceSpec
+
+ // Status describes the current status of a Namespace
+ // +optional
+ Status NamespaceStatus
+}
+
+// NamespaceList is a list of Namespaces.
+type NamespaceList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []Namespace
+}
+
+// Binding ties one object to another; for example, a pod is bound to a node by a scheduler.
+// Deprecated in 1.7, please use the bindings subresource of pods instead.
+type Binding struct {
+ metav1.TypeMeta
+ // ObjectMeta describes the object that is being bound.
+ // +optional
+ metav1.ObjectMeta
+
+ // Target is the object to bind to.
+ Target ObjectReference
+}
+
+// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
+type Preconditions struct {
+ // Specifies the target UID.
+ // +optional
+ UID *types.UID
+}
+
+// DeletionPropagation decides whether and how garbage collection will be performed.
+type DeletionPropagation string
+
+const (
+ // Orphans the dependents.
+ DeletePropagationOrphan DeletionPropagation = "Orphan"
+ // Deletes the object from the key-value store, the garbage collector will delete the dependents in the background.
+ DeletePropagationBackground DeletionPropagation = "Background"
+ // The object exists in the key-value store until the garbage collector deletes all the dependents whose ownerReference.blockOwnerDeletion=true from the key-value store.
+ // API sever will put the "DeletingDependents" finalizer on the object, and sets its deletionTimestamp.
+ // This policy is cascading, i.e., the dependents will be deleted with Foreground.
+ DeletePropagationForeground DeletionPropagation = "Foreground"
+)
+
+// DeleteOptions may be provided when deleting an API object
+// DEPRECATED: This type has been moved to meta/v1 and will be removed soon.
+type DeleteOptions struct {
+ metav1.TypeMeta
+
+ // Optional duration in seconds before the object should be deleted. Value must be non-negative integer.
+ // The value zero indicates delete immediately. If this value is nil, the default grace period for the
+ // specified type will be used.
+ // +optional
+ GracePeriodSeconds *int64
+
+ // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be
+ // returned.
+ // +optional
+ Preconditions *Preconditions
+
+ // Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7.
+ // Should the dependent objects be orphaned. If true/false, the "orphan"
+ // finalizer will be added to/removed from the object's finalizers list.
+ // Either this field or PropagationPolicy may be set, but not both.
+ // +optional
+ OrphanDependents *bool
+
+ // Whether and how garbage collection will be performed.
+ // Either this field or OrphanDependents may be set, but not both.
+ // The default policy is decided by the existing finalizer set in the
+ // metadata.finalizers and the resource-specific default policy.
+ // +optional
+ PropagationPolicy *DeletionPropagation
+}
+
+// ListOptions is the query options to a standard REST list call, and has future support for
+// watch calls.
+// DEPRECATED: This type has been moved to meta/v1 and will be removed soon.
+type ListOptions struct {
+ metav1.TypeMeta
+
+ // A selector based on labels
+ LabelSelector labels.Selector
+ // A selector based on fields
+ FieldSelector fields.Selector
+
+ // If true, partially initialized resources are included in the response.
+ IncludeUninitialized bool
+
+ // If true, watch for changes to this list
+ Watch bool
+ // When specified with a watch call, shows changes that occur after that particular version of a resource.
+ // Defaults to changes from the beginning of history.
+ // When specified for list:
+ // - if unset, then the result is returned from remote storage based on quorum-read flag;
+ // - if it's 0, then we simply return what we currently have in cache, no guarantee;
+ // - if set to non zero, then the result is at least as fresh as given rv.
+ ResourceVersion string
+ // Timeout for the list/watch call.
+ TimeoutSeconds *int64
+}
+
+// PodLogOptions is the query options for a Pod's logs REST call
+type PodLogOptions struct {
+ metav1.TypeMeta
+
+ // Container for which to return logs
+ Container string
+ // If true, follow the logs for the pod
+ Follow bool
+ // If true, return previous terminated container logs
+ Previous bool
+ // A relative time in seconds before the current time from which to show logs. If this value
+ // precedes the time a pod was started, only logs since the pod start will be returned.
+ // If this value is in the future, no logs will be returned.
+ // Only one of sinceSeconds or sinceTime may be specified.
+ SinceSeconds *int64
+ // An RFC3339 timestamp from which to show logs. If this value
+ // precedes the time a pod was started, only logs since the pod start will be returned.
+ // If this value is in the future, no logs will be returned.
+ // Only one of sinceSeconds or sinceTime may be specified.
+ SinceTime *metav1.Time
+ // If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line
+ // of log output.
+ Timestamps bool
+ // If set, the number of lines from the end of the logs to show. If not specified,
+ // logs are shown from the creation of the container or sinceSeconds or sinceTime
+ TailLines *int64
+ // If set, the number of bytes to read from the server before terminating the
+ // log output. This may not display a complete final line of logging, and may return
+ // slightly more or slightly less than the specified limit.
+ LimitBytes *int64
+}
+
+// PodAttachOptions is the query options to a Pod's remote attach call
+// TODO: merge w/ PodExecOptions below for stdin, stdout, etc
+type PodAttachOptions struct {
+ metav1.TypeMeta
+
+ // Stdin if true indicates that stdin is to be redirected for the attach call
+ // +optional
+ Stdin bool
+
+ // Stdout if true indicates that stdout is to be redirected for the attach call
+ // +optional
+ Stdout bool
+
+ // Stderr if true indicates that stderr is to be redirected for the attach call
+ // +optional
+ Stderr bool
+
+ // TTY if true indicates that a tty will be allocated for the attach call
+ // +optional
+ TTY bool
+
+ // Container to attach to.
+ // +optional
+ Container string
+}
+
+// PodExecOptions is the query options to a Pod's remote exec call
+type PodExecOptions struct {
+ metav1.TypeMeta
+
+ // Stdin if true indicates that stdin is to be redirected for the exec call
+ Stdin bool
+
+ // Stdout if true indicates that stdout is to be redirected for the exec call
+ Stdout bool
+
+ // Stderr if true indicates that stderr is to be redirected for the exec call
+ Stderr bool
+
+ // TTY if true indicates that a tty will be allocated for the exec call
+ TTY bool
+
+ // Container in which to execute the command.
+ Container string
+
+ // Command is the remote command to execute; argv array; not executed within a shell.
+ Command []string
+}
+
+// PodPortForwardOptions is the query options to a Pod's port forward call
+type PodPortForwardOptions struct {
+ metav1.TypeMeta
+
+ // The list of ports to forward
+ // +optional
+ Ports []int32
+}
+
+// PodProxyOptions is the query options to a Pod's proxy call
+type PodProxyOptions struct {
+ metav1.TypeMeta
+
+ // Path is the URL path to use for the current proxy request
+ Path string
+}
+
+// NodeProxyOptions is the query options to a Node's proxy call
+type NodeProxyOptions struct {
+ metav1.TypeMeta
+
+ // Path is the URL path to use for the current proxy request
+ Path string
+}
+
+// ServiceProxyOptions is the query options to a Service's proxy call.
+type ServiceProxyOptions struct {
+ metav1.TypeMeta
+
+ // Path is the part of URLs that include service endpoints, suffixes,
+ // and parameters to use for the current proxy request to service.
+ // For example, the whole request URL is
+ // http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy.
+ // Path is _search?q=user:kimchy.
+ Path string
+}
+
+// ObjectReference contains enough information to let you inspect or modify the referred object.
+type ObjectReference struct {
+ // +optional
+ Kind string
+ // +optional
+ Namespace string
+ // +optional
+ Name string
+ // +optional
+ UID types.UID
+ // +optional
+ APIVersion string
+ // +optional
+ ResourceVersion string
+
+ // Optional. If referring to a piece of an object instead of an entire object, this string
+ // should contain information to identify the sub-object. For example, if the object
+ // reference is to a container within a pod, this would take on a value like:
+ // "spec.containers{name}" (where "name" refers to the name of the container that triggered
+ // the event) or if no container name is specified "spec.containers[2]" (container with
+ // index 2 in this pod). This syntax is chosen only to have some well-defined way of
+ // referencing a part of an object.
+ // TODO: this design is not final and this field is subject to change in the future.
+ // +optional
+ FieldPath string
+}
+
+// LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
+type LocalObjectReference struct {
+ //TODO: Add other useful fields. apiVersion, kind, uid?
+ Name string
+}
+
+type SerializedReference struct {
+ metav1.TypeMeta
+ // +optional
+ Reference ObjectReference
+}
+
+type EventSource struct {
+ // Component from which the event is generated.
+ // +optional
+ Component string
+ // Node name on which the event is generated.
+ // +optional
+ Host string
+}
+
+// Valid values for event types (new types could be added in future)
+const (
+ // Information only and will not cause any problems
+ EventTypeNormal string = "Normal"
+ // These events are to warn that something might go wrong
+ EventTypeWarning string = "Warning"
+)
+
+// +genclient=true
+
+// Event is a report of an event somewhere in the cluster.
+// TODO: Decide whether to store these separately or with the object they apply to.
+type Event struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Required. The object that this event is about.
+ // +optional
+ InvolvedObject ObjectReference
+
+ // Optional; this should be a short, machine understandable string that gives the reason
+ // for this event being generated. For example, if the event is reporting that a container
+ // can't start, the Reason might be "ImageNotFound".
+ // TODO: provide exact specification for format.
+ // +optional
+ Reason string
+
+ // Optional. A human-readable description of the status of this operation.
+ // TODO: decide on maximum length.
+ // +optional
+ Message string
+
+ // Optional. The component reporting this event. Should be a short machine understandable string.
+ // +optional
+ Source EventSource
+
+ // The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)
+ // +optional
+ FirstTimestamp metav1.Time
+
+ // The time at which the most recent occurrence of this event was recorded.
+ // +optional
+ LastTimestamp metav1.Time
+
+ // The number of times this event has occurred.
+ // +optional
+ Count int32
+
+ // Type of this event (Normal, Warning), new types could be added in the future.
+ // +optional
+ Type string
+}
+
+// EventList is a list of events.
+type EventList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []Event
+}
+
+// List holds a list of objects, which may not be known by the server.
+type List struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []runtime.Object
+}
+
+// A type of object that is limited
+type LimitType string
+
+const (
+ // Limit that applies to all pods in a namespace
+ LimitTypePod LimitType = "Pod"
+ // Limit that applies to all containers in a namespace
+ LimitTypeContainer LimitType = "Container"
+ // Limit that applies to all persistent volume claims in a namespace
+ LimitTypePersistentVolumeClaim LimitType = "PersistentVolumeClaim"
+)
+
+// LimitRangeItem defines a min/max usage limit for any resource that matches on kind
+type LimitRangeItem struct {
+ // Type of resource that this limit applies to
+ // +optional
+ Type LimitType
+ // Max usage constraints on this kind by resource name
+ // +optional
+ Max ResourceList
+ // Min usage constraints on this kind by resource name
+ // +optional
+ Min ResourceList
+ // Default resource requirement limit value by resource name.
+ // +optional
+ Default ResourceList
+ // DefaultRequest resource requirement request value by resource name.
+ // +optional
+ DefaultRequest ResourceList
+ // MaxLimitRequestRatio represents the max burst value for the named resource
+ // +optional
+ MaxLimitRequestRatio ResourceList
+}
+
+// LimitRangeSpec defines a min/max usage limit for resources that match on kind
+type LimitRangeSpec struct {
+ // Limits is the list of LimitRangeItem objects that are enforced
+ Limits []LimitRangeItem
+}
+
+// +genclient=true
+
+// LimitRange sets resource usage limits for each kind of resource in a Namespace
+type LimitRange struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Spec defines the limits enforced
+ // +optional
+ Spec LimitRangeSpec
+}
+
+// LimitRangeList is a list of LimitRange items.
+type LimitRangeList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ // Items is a list of LimitRange objects
+ Items []LimitRange
+}
+
+// The following identify resource constants for Kubernetes object types
+const (
+ // Pods, number
+ ResourcePods ResourceName = "pods"
+ // Services, number
+ ResourceServices ResourceName = "services"
+ // ReplicationControllers, number
+ ResourceReplicationControllers ResourceName = "replicationcontrollers"
+ // ResourceQuotas, number
+ ResourceQuotas ResourceName = "resourcequotas"
+ // ResourceSecrets, number
+ ResourceSecrets ResourceName = "secrets"
+ // ResourceConfigMaps, number
+ ResourceConfigMaps ResourceName = "configmaps"
+ // ResourcePersistentVolumeClaims, number
+ ResourcePersistentVolumeClaims ResourceName = "persistentvolumeclaims"
+ // ResourceServicesNodePorts, number
+ ResourceServicesNodePorts ResourceName = "services.nodeports"
+ // ResourceServicesLoadBalancers, number
+ ResourceServicesLoadBalancers ResourceName = "services.loadbalancers"
+ // CPU request, in cores. (500m = .5 cores)
+ ResourceRequestsCPU ResourceName = "requests.cpu"
+ // Memory request, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
+ ResourceRequestsMemory ResourceName = "requests.memory"
+ // Storage request, in bytes
+ ResourceRequestsStorage ResourceName = "requests.storage"
+ // CPU limit, in cores. (500m = .5 cores)
+ ResourceLimitsCPU ResourceName = "limits.cpu"
+ // Memory limit, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
+ ResourceLimitsMemory ResourceName = "limits.memory"
+)
+
+// A ResourceQuotaScope defines a filter that must match each object tracked by a quota
+type ResourceQuotaScope string
+
+const (
+ // Match all pod objects where spec.activeDeadlineSeconds
+ ResourceQuotaScopeTerminating ResourceQuotaScope = "Terminating"
+ // Match all pod objects where !spec.activeDeadlineSeconds
+ ResourceQuotaScopeNotTerminating ResourceQuotaScope = "NotTerminating"
+ // Match all pod objects that have best effort quality of service
+ ResourceQuotaScopeBestEffort ResourceQuotaScope = "BestEffort"
+ // Match all pod objects that do not have best effort quality of service
+ ResourceQuotaScopeNotBestEffort ResourceQuotaScope = "NotBestEffort"
+)
+
+// ResourceQuotaSpec defines the desired hard limits to enforce for Quota
+type ResourceQuotaSpec struct {
+ // Hard is the set of desired hard limits for each named resource
+ // +optional
+ Hard ResourceList
+ // A collection of filters that must match each object tracked by a quota.
+ // If not specified, the quota matches all objects.
+ // +optional
+ Scopes []ResourceQuotaScope
+}
+
+// ResourceQuotaStatus defines the enforced hard limits and observed use
+type ResourceQuotaStatus struct {
+ // Hard is the set of enforced hard limits for each named resource
+ // +optional
+ Hard ResourceList
+ // Used is the current observed total usage of the resource in the namespace
+ // +optional
+ Used ResourceList
+}
+
+// +genclient=true
+
+// ResourceQuota sets aggregate quota restrictions enforced per namespace
+type ResourceQuota struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Spec defines the desired quota
+ // +optional
+ Spec ResourceQuotaSpec
+
+ // Status defines the actual enforced quota and its current usage
+ // +optional
+ Status ResourceQuotaStatus
+}
+
+// ResourceQuotaList is a list of ResourceQuota items
+type ResourceQuotaList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ // Items is a list of ResourceQuota objects
+ Items []ResourceQuota
+}
+
+// +genclient=true
+
+// Secret holds secret data of a certain type. The total bytes of the values in
+// the Data field must be less than MaxSecretSize bytes.
+type Secret struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Data contains the secret data. Each key must consist of alphanumeric
+ // characters, '-', '_' or '.'. The serialized form of the secret data is a
+ // base64 encoded string, representing the arbitrary (possibly non-string)
+ // data value here.
+ // +optional
+ Data map[string][]byte
+
+ // Used to facilitate programmatic handling of secret data.
+ // +optional
+ Type SecretType
+}
+
+const MaxSecretSize = 1 * 1024 * 1024
+
+type SecretType string
+
+const (
+ // SecretTypeOpaque is the default; arbitrary user-defined data
+ SecretTypeOpaque SecretType = "Opaque"
+
+ // SecretTypeServiceAccountToken contains a token that identifies a service account to the API
+ //
+ // Required fields:
+ // - Secret.Annotations["kubernetes.io/service-account.name"] - the name of the ServiceAccount the token identifies
+ // - Secret.Annotations["kubernetes.io/service-account.uid"] - the UID of the ServiceAccount the token identifies
+ // - Secret.Data["token"] - a token that identifies the service account to the API
+ SecretTypeServiceAccountToken SecretType = "kubernetes.io/service-account-token"
+
+ // ServiceAccountNameKey is the key of the required annotation for SecretTypeServiceAccountToken secrets
+ ServiceAccountNameKey = "kubernetes.io/service-account.name"
+ // ServiceAccountUIDKey is the key of the required annotation for SecretTypeServiceAccountToken secrets
+ ServiceAccountUIDKey = "kubernetes.io/service-account.uid"
+ // ServiceAccountTokenKey is the key of the required data for SecretTypeServiceAccountToken secrets
+ ServiceAccountTokenKey = "token"
+ // ServiceAccountKubeconfigKey is the key of the optional kubeconfig data for SecretTypeServiceAccountToken secrets
+ ServiceAccountKubeconfigKey = "kubernetes.kubeconfig"
+ // ServiceAccountRootCAKey is the key of the optional root certificate authority for SecretTypeServiceAccountToken secrets
+ ServiceAccountRootCAKey = "ca.crt"
+ // ServiceAccountNamespaceKey is the key of the optional namespace to use as the default for namespaced API calls
+ ServiceAccountNamespaceKey = "namespace"
+
+ // SecretTypeDockercfg contains a dockercfg file that follows the same format rules as ~/.dockercfg
+ //
+ // Required fields:
+ // - Secret.Data[".dockercfg"] - a serialized ~/.dockercfg file
+ SecretTypeDockercfg SecretType = "kubernetes.io/dockercfg"
+
+ // DockerConfigKey is the key of the required data for SecretTypeDockercfg secrets
+ DockerConfigKey = ".dockercfg"
+
+ // SecretTypeDockerConfigJson contains a dockercfg file that follows the same format rules as ~/.docker/config.json
+ //
+ // Required fields:
+ // - Secret.Data[".dockerconfigjson"] - a serialized ~/.docker/config.json file
+ SecretTypeDockerConfigJson SecretType = "kubernetes.io/dockerconfigjson"
+
+ // DockerConfigJsonKey is the key of the required data for SecretTypeDockerConfigJson secrets
+ DockerConfigJsonKey = ".dockerconfigjson"
+
+ // SecretTypeBasicAuth contains data needed for basic authentication.
+ //
+ // Required at least one of fields:
+ // - Secret.Data["username"] - username used for authentication
+ // - Secret.Data["password"] - password or token needed for authentication
+ SecretTypeBasicAuth SecretType = "kubernetes.io/basic-auth"
+
+ // BasicAuthUsernameKey is the key of the username for SecretTypeBasicAuth secrets
+ BasicAuthUsernameKey = "username"
+ // BasicAuthPasswordKey is the key of the password or token for SecretTypeBasicAuth secrets
+ BasicAuthPasswordKey = "password"
+
+ // SecretTypeSSHAuth contains data needed for SSH authetication.
+ //
+ // Required field:
+ // - Secret.Data["ssh-privatekey"] - private SSH key needed for authentication
+ SecretTypeSSHAuth SecretType = "kubernetes.io/ssh-auth"
+
+ // SSHAuthPrivateKey is the key of the required SSH private key for SecretTypeSSHAuth secrets
+ SSHAuthPrivateKey = "ssh-privatekey"
+
+ // SecretTypeTLS contains information about a TLS client or server secret. It
+ // is primarily used with TLS termination of the Ingress resource, but may be
+ // used in other types.
+ //
+ // Required fields:
+ // - Secret.Data["tls.key"] - TLS private key.
+ // Secret.Data["tls.crt"] - TLS certificate.
+ // TODO: Consider supporting different formats, specifying CA/destinationCA.
+ SecretTypeTLS SecretType = "kubernetes.io/tls"
+
+ // TLSCertKey is the key for tls certificates in a TLS secret.
+ TLSCertKey = "tls.crt"
+ // TLSPrivateKeyKey is the key for the private key field in a TLS secret.
+ TLSPrivateKeyKey = "tls.key"
+)
+
+type SecretList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []Secret
+}
+
+// +genclient=true
+
+// ConfigMap holds configuration data for components or applications to consume.
+type ConfigMap struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Data contains the configuration data.
+ // Each key must consist of alphanumeric characters, '-', '_' or '.'.
+ // +optional
+ Data map[string]string
+}
+
+// ConfigMapList is a resource containing a list of ConfigMap objects.
+type ConfigMapList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ // Items is the list of ConfigMaps.
+ Items []ConfigMap
+}
+
+// These constants are for remote command execution and port forwarding and are
+// used by both the client side and server side components.
+//
+// This is probably not the ideal place for them, but it didn't seem worth it
+// to create pkg/exec and pkg/portforward just to contain a single file with
+// constants in it. Suggestions for more appropriate alternatives are
+// definitely welcome!
+const (
+ // Enable stdin for remote command execution
+ ExecStdinParam = "input"
+ // Enable stdout for remote command execution
+ ExecStdoutParam = "output"
+ // Enable stderr for remote command execution
+ ExecStderrParam = "error"
+ // Enable TTY for remote command execution
+ ExecTTYParam = "tty"
+ // Command to run for remote command execution
+ ExecCommandParamm = "command"
+
+ // Name of header that specifies stream type
+ StreamType = "streamType"
+ // Value for streamType header for stdin stream
+ StreamTypeStdin = "stdin"
+ // Value for streamType header for stdout stream
+ StreamTypeStdout = "stdout"
+ // Value for streamType header for stderr stream
+ StreamTypeStderr = "stderr"
+ // Value for streamType header for data stream
+ StreamTypeData = "data"
+ // Value for streamType header for error stream
+ StreamTypeError = "error"
+ // Value for streamType header for terminal resize stream
+ StreamTypeResize = "resize"
+
+ // Name of header that specifies the port being forwarded
+ PortHeader = "port"
+ // Name of header that specifies a request ID used to associate the error
+ // and data streams for a single forwarded connection
+ PortForwardRequestIDHeader = "requestID"
+)
+
+// Type and constants for component health validation.
+type ComponentConditionType string
+
+// These are the valid conditions for the component.
+const (
+ ComponentHealthy ComponentConditionType = "Healthy"
+)
+
+type ComponentCondition struct {
+ Type ComponentConditionType
+ Status ConditionStatus
+ // +optional
+ Message string
+ // +optional
+ Error string
+}
+
+// +genclient=true
+// +nonNamespaced=true
+
+// ComponentStatus (and ComponentStatusList) holds the cluster validation info.
+type ComponentStatus struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // +optional
+ Conditions []ComponentCondition
+}
+
+type ComponentStatusList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []ComponentStatus
+}
+
+// SecurityContext holds security configuration that will be applied to a container.
+// Some fields are present in both SecurityContext and PodSecurityContext. When both
+// are set, the values in SecurityContext take precedence.
+type SecurityContext struct {
+ // The capabilities to add/drop when running containers.
+ // Defaults to the default set of capabilities granted by the container runtime.
+ // +optional
+ Capabilities *Capabilities
+ // Run container in privileged mode.
+ // Processes in privileged containers are essentially equivalent to root on the host.
+ // Defaults to false.
+ // +optional
+ Privileged *bool
+ // The SELinux context to be applied to the container.
+ // If unspecified, the container runtime will allocate a random SELinux context for each
+ // container. May also be set in PodSecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence.
+ // +optional
+ SELinuxOptions *SELinuxOptions
+ // The UID to run the entrypoint of the container process.
+ // Defaults to user specified in image metadata if unspecified.
+ // May also be set in PodSecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence.
+ // +optional
+ RunAsUser *int64
+ // Indicates that the container must run as a non-root user.
+ // If true, the Kubelet will validate the image at runtime to ensure that it
+ // does not run as UID 0 (root) and fail to start the container if it does.
+ // If unset or false, no such validation will be performed.
+ // May also be set in PodSecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence.
+ // +optional
+ RunAsNonRoot *bool
+ // The read-only root filesystem allows you to restrict the locations that an application can write
+ // files to, ensuring the persistent data can only be written to mounts.
+ // +optional
+ ReadOnlyRootFilesystem *bool
+}
+
+// SELinuxOptions are the labels to be applied to the container.
+type SELinuxOptions struct {
+ // SELinux user label
+ // +optional
+ User string
+ // SELinux role label
+ // +optional
+ Role string
+ // SELinux type label
+ // +optional
+ Type string
+ // SELinux level label.
+ // +optional
+ Level string
+}
+
+// RangeAllocation is an opaque API object (not exposed to end users) that can be persisted to record
+// the global allocation state of the cluster. The schema of Range and Data generic, in that Range
+// should be a string representation of the inputs to a range (for instance, for IP allocation it
+// might be a CIDR) and Data is an opaque blob understood by an allocator which is typically a
+// binary range. Consumers should use annotations to record additional information (schema version,
+// data encoding hints). A range allocation should *ALWAYS* be recreatable at any time by observation
+// of the cluster, thus the object is less strongly typed than most.
+type RangeAllocation struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+ // A string representing a unique label for a range of resources, such as a CIDR "10.0.0.0/8" or
+ // port range "10000-30000". Range is not strongly schema'd here. The Range is expected to define
+ // a start and end unless there is an implicit end.
+ Range string
+ // A byte array representing the serialized state of a range allocation. Additional clarifiers on
+ // the type or format of data should be represented with annotations. For IP allocations, this is
+ // represented as a bit array starting at the base IP of the CIDR in Range, with each bit representing
+ // a single allocated address (the fifth bit on CIDR 10.0.0.0/8 is 10.0.0.4).
+ Data []byte
+}
+
+const (
+ // "default-scheduler" is the name of default scheduler.
+ DefaultSchedulerName = "default-scheduler"
+
+ // RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule
+ // corresponding to every RequiredDuringScheduling affinity rule.
+ // When the --hard-pod-affinity-weight scheduler flag is not specified,
+ // DefaultHardPodAffinityWeight defines the weight of the implicit PreferredDuringScheduling affinity rule.
+ DefaultHardPodAffinitySymmetricWeight int = 1
+)
diff --git a/vendor/k8s.io/kubernetes/pkg/api/util/group_version.go b/vendor/k8s.io/kubernetes/pkg/api/util/group_version.go
new file mode 100644
index 000000000..fea2f17f8
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/util/group_version.go
@@ -0,0 +1,48 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// TODO: This GetVersion/GetGroup arrangement is temporary and will be replaced
+// with a GroupAndVersion type.
+package util
+
+import "strings"
+
+func GetVersion(groupVersion string) string {
+ s := strings.Split(groupVersion, "/")
+ if len(s) != 2 {
+ // e.g. return "v1" for groupVersion="v1"
+ return s[len(s)-1]
+ }
+ return s[1]
+}
+
+func GetGroup(groupVersion string) string {
+ s := strings.Split(groupVersion, "/")
+ if len(s) == 1 {
+ // e.g. return "" for groupVersion="v1"
+ return ""
+ }
+ return s[0]
+}
+
+// GetGroupVersion returns the "group/version". It returns "version" is if group
+// is empty. It returns "group/" if version is empty.
+func GetGroupVersion(group, version string) string {
+ if len(group) == 0 {
+ return version
+ }
+ return group + "/" + version
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/annotation_key_constants.go b/vendor/k8s.io/kubernetes/pkg/api/v1/annotation_key_constants.go
new file mode 100644
index 000000000..bb4588554
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/v1/annotation_key_constants.go
@@ -0,0 +1,113 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file should be consistent with pkg/api/annotation_key_constants.go.
+
+package v1
+
+const (
+ // ImagePolicyFailedOpenKey is added to pods created by failing open when the image policy
+ // webhook backend fails.
+ ImagePolicyFailedOpenKey string = "alpha.image-policy.k8s.io/failed-open"
+
+ // PodPresetOptOutAnnotationKey represents the annotation key for a pod to exempt itself from pod preset manipulation
+ PodPresetOptOutAnnotationKey string = "podpreset.admission.kubernetes.io/exclude"
+
+ // MirrorAnnotationKey represents the annotation key set by kubelets when creating mirror pods
+ MirrorPodAnnotationKey string = "kubernetes.io/config.mirror"
+
+ // TolerationsAnnotationKey represents the key of tolerations data (json serialized)
+ // in the Annotations of a Pod.
+ TolerationsAnnotationKey string = "scheduler.alpha.kubernetes.io/tolerations"
+
+ // TaintsAnnotationKey represents the key of taints data (json serialized)
+ // in the Annotations of a Node.
+ TaintsAnnotationKey string = "scheduler.alpha.kubernetes.io/taints"
+
+ // SeccompPodAnnotationKey represents the key of a seccomp profile applied
+ // to all containers of a pod.
+ SeccompPodAnnotationKey string = "seccomp.security.alpha.kubernetes.io/pod"
+
+ // SeccompContainerAnnotationKeyPrefix represents the key of a seccomp profile applied
+ // to one container of a pod.
+ SeccompContainerAnnotationKeyPrefix string = "container.seccomp.security.alpha.kubernetes.io/"
+
+ // CreatedByAnnotation represents the key used to store the spec(json)
+ // used to create the resource.
+ CreatedByAnnotation = "kubernetes.io/created-by"
+
+ // PreferAvoidPodsAnnotationKey represents the key of preferAvoidPods data (json serialized)
+ // in the Annotations of a Node.
+ PreferAvoidPodsAnnotationKey string = "scheduler.alpha.kubernetes.io/preferAvoidPods"
+
+ // SysctlsPodAnnotationKey represents the key of sysctls which are set for the infrastructure
+ // container of a pod. The annotation value is a comma separated list of sysctl_name=value
+ // key-value pairs. Only a limited set of whitelisted and isolated sysctls is supported by
+ // the kubelet. Pods with other sysctls will fail to launch.
+ SysctlsPodAnnotationKey string = "security.alpha.kubernetes.io/sysctls"
+
+ // UnsafeSysctlsPodAnnotationKey represents the key of sysctls which are set for the infrastructure
+ // container of a pod. The annotation value is a comma separated list of sysctl_name=value
+ // key-value pairs. Unsafe sysctls must be explicitly enabled for a kubelet. They are properly
+ // namespaced to a pod or a container, but their isolation is usually unclear or weak. Their use
+ // is at-your-own-risk. Pods that attempt to set an unsafe sysctl that is not enabled for a kubelet
+ // will fail to launch.
+ UnsafeSysctlsPodAnnotationKey string = "security.alpha.kubernetes.io/unsafe-sysctls"
+
+ // ObjectTTLAnnotations represents a suggestion for kubelet for how long it can cache
+ // an object (e.g. secret, config map) before fetching it again from apiserver.
+ // This annotation can be attached to node.
+ ObjectTTLAnnotationKey string = "node.alpha.kubernetes.io/ttl"
+
+ // AffinityAnnotationKey represents the key of affinity data (json serialized)
+ // in the Annotations of a Pod.
+ // TODO: remove when alpha support for affinity is removed
+ AffinityAnnotationKey string = "scheduler.alpha.kubernetes.io/affinity"
+
+ // annotation key prefix used to identify non-convertible json paths.
+ NonConvertibleAnnotationPrefix = "non-convertible.kubernetes.io"
+
+ kubectlPrefix = "kubectl.kubernetes.io/"
+
+ // LastAppliedConfigAnnotation is the annotation used to store the previous
+ // configuration of a resource for use in a three way diff by UpdateApplyAnnotation.
+ LastAppliedConfigAnnotation = kubectlPrefix + "last-applied-configuration"
+
+ // AnnotationLoadBalancerSourceRangesKey is the key of the annotation on a service to set allowed ingress ranges on their LoadBalancers
+ //
+ // It should be a comma-separated list of CIDRs, e.g. `0.0.0.0/0` to
+ // allow full access (the default) or `18.0.0.0/8,56.0.0.0/8` to allow
+ // access only from the CIDRs currently allocated to MIT & the USPS.
+ //
+ // Not all cloud providers support this annotation, though AWS & GCE do.
+ AnnotationLoadBalancerSourceRangesKey = "service.beta.kubernetes.io/load-balancer-source-ranges"
+
+ // AnnotationValueExternalTrafficLocal Value of annotation to specify local endpoints behavior.
+ AnnotationValueExternalTrafficLocal = "OnlyLocal"
+ // AnnotationValueExternalTrafficGlobal Value of annotation to specify global (legacy) behavior.
+ AnnotationValueExternalTrafficGlobal = "Global"
+
+ // TODO: The beta annotations have been deprecated, remove them when we release k8s 1.8.
+
+ // BetaAnnotationHealthCheckNodePort Annotation specifying the healthcheck nodePort for the service.
+ // If not specified, annotation is created by the service api backend with the allocated nodePort.
+ // Will use user-specified nodePort value if specified by the client.
+ BetaAnnotationHealthCheckNodePort = "service.beta.kubernetes.io/healthcheck-nodeport"
+
+ // BetaAnnotationExternalTraffic An annotation that denotes if this Service desires to route
+ // external traffic to local endpoints only. This preserves Source IP and avoids a second hop.
+ BetaAnnotationExternalTraffic = "service.beta.kubernetes.io/external-traffic"
+)
diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/conversion.go b/vendor/k8s.io/kubernetes/pkg/api/v1/conversion.go
new file mode 100644
index 000000000..629533741
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/v1/conversion.go
@@ -0,0 +1,776 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "encoding/json"
+ "fmt"
+ "reflect"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/conversion"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/validation/field"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/extensions"
+)
+
+// This is a "fast-path" that avoids reflection for common types. It focuses on the objects that are
+// converted the most in the cluster.
+// TODO: generate one of these for every external API group - this is to prove the impact
+func addFastPathConversionFuncs(scheme *runtime.Scheme) error {
+ scheme.AddGenericConversionFunc(func(objA, objB interface{}, s conversion.Scope) (bool, error) {
+ switch a := objA.(type) {
+ case *Pod:
+ switch b := objB.(type) {
+ case *api.Pod:
+ return true, Convert_v1_Pod_To_api_Pod(a, b, s)
+ }
+ case *api.Pod:
+ switch b := objB.(type) {
+ case *Pod:
+ return true, Convert_api_Pod_To_v1_Pod(a, b, s)
+ }
+
+ case *Event:
+ switch b := objB.(type) {
+ case *api.Event:
+ return true, Convert_v1_Event_To_api_Event(a, b, s)
+ }
+ case *api.Event:
+ switch b := objB.(type) {
+ case *Event:
+ return true, Convert_api_Event_To_v1_Event(a, b, s)
+ }
+
+ case *ReplicationController:
+ switch b := objB.(type) {
+ case *api.ReplicationController:
+ return true, Convert_v1_ReplicationController_To_api_ReplicationController(a, b, s)
+ }
+ case *api.ReplicationController:
+ switch b := objB.(type) {
+ case *ReplicationController:
+ return true, Convert_api_ReplicationController_To_v1_ReplicationController(a, b, s)
+ }
+
+ case *Node:
+ switch b := objB.(type) {
+ case *api.Node:
+ return true, Convert_v1_Node_To_api_Node(a, b, s)
+ }
+ case *api.Node:
+ switch b := objB.(type) {
+ case *Node:
+ return true, Convert_api_Node_To_v1_Node(a, b, s)
+ }
+
+ case *Namespace:
+ switch b := objB.(type) {
+ case *api.Namespace:
+ return true, Convert_v1_Namespace_To_api_Namespace(a, b, s)
+ }
+ case *api.Namespace:
+ switch b := objB.(type) {
+ case *Namespace:
+ return true, Convert_api_Namespace_To_v1_Namespace(a, b, s)
+ }
+
+ case *Service:
+ switch b := objB.(type) {
+ case *api.Service:
+ return true, Convert_v1_Service_To_api_Service(a, b, s)
+ }
+ case *api.Service:
+ switch b := objB.(type) {
+ case *Service:
+ return true, Convert_api_Service_To_v1_Service(a, b, s)
+ }
+
+ case *Endpoints:
+ switch b := objB.(type) {
+ case *api.Endpoints:
+ return true, Convert_v1_Endpoints_To_api_Endpoints(a, b, s)
+ }
+ case *api.Endpoints:
+ switch b := objB.(type) {
+ case *Endpoints:
+ return true, Convert_api_Endpoints_To_v1_Endpoints(a, b, s)
+ }
+
+ case *metav1.WatchEvent:
+ switch b := objB.(type) {
+ case *metav1.InternalEvent:
+ return true, metav1.Convert_versioned_Event_to_versioned_InternalEvent(a, b, s)
+ }
+ case *metav1.InternalEvent:
+ switch b := objB.(type) {
+ case *metav1.WatchEvent:
+ return true, metav1.Convert_versioned_InternalEvent_to_versioned_Event(a, b, s)
+ }
+ }
+ return false, nil
+ })
+ return nil
+}
+
+func addConversionFuncs(scheme *runtime.Scheme) error {
+ // Add non-generated conversion functions
+ err := scheme.AddConversionFuncs(
+ Convert_api_Pod_To_v1_Pod,
+ Convert_api_PodSpec_To_v1_PodSpec,
+ Convert_api_ReplicationControllerSpec_To_v1_ReplicationControllerSpec,
+ Convert_api_ServiceSpec_To_v1_ServiceSpec,
+ Convert_v1_Pod_To_api_Pod,
+ Convert_v1_PodSpec_To_api_PodSpec,
+ Convert_v1_ReplicationControllerSpec_To_api_ReplicationControllerSpec,
+ Convert_v1_Secret_To_api_Secret,
+ Convert_v1_ServiceSpec_To_api_ServiceSpec,
+ Convert_v1_ResourceList_To_api_ResourceList,
+ Convert_v1_ReplicationController_to_extensions_ReplicaSet,
+ Convert_v1_ReplicationControllerSpec_to_extensions_ReplicaSetSpec,
+ Convert_v1_ReplicationControllerStatus_to_extensions_ReplicaSetStatus,
+ Convert_extensions_ReplicaSet_to_v1_ReplicationController,
+ Convert_extensions_ReplicaSetSpec_to_v1_ReplicationControllerSpec,
+ Convert_extensions_ReplicaSetStatus_to_v1_ReplicationControllerStatus,
+ )
+ if err != nil {
+ return err
+ }
+
+ // Add field label conversions for kinds having selectable nothing but ObjectMeta fields.
+ for _, k := range []string{
+ "Endpoints",
+ "ResourceQuota",
+ "PersistentVolumeClaim",
+ "Service",
+ "ServiceAccount",
+ "ConfigMap",
+ } {
+ kind := k // don't close over range variables
+ err = scheme.AddFieldLabelConversionFunc("v1", kind,
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "metadata.namespace",
+ "metadata.name":
+ return label, value, nil
+ default:
+ return "", "", fmt.Errorf("field label %q not supported for %q", label, kind)
+ }
+ },
+ )
+ if err != nil {
+ return err
+ }
+ }
+
+ // Add field conversion funcs.
+ err = scheme.AddFieldLabelConversionFunc("v1", "Pod",
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "metadata.annotations",
+ "metadata.labels",
+ "metadata.name",
+ "metadata.namespace",
+ "spec.nodeName",
+ "spec.restartPolicy",
+ "spec.serviceAccountName",
+ "status.phase",
+ "status.hostIP",
+ "status.podIP":
+ return label, value, nil
+ // This is for backwards compatibility with old v1 clients which send spec.host
+ case "spec.host":
+ return "spec.nodeName", value, nil
+ default:
+ return "", "", fmt.Errorf("field label not supported: %s", label)
+ }
+ },
+ )
+ if err != nil {
+ return err
+ }
+ err = scheme.AddFieldLabelConversionFunc("v1", "Node",
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "metadata.name":
+ return label, value, nil
+ case "spec.unschedulable":
+ return label, value, nil
+ default:
+ return "", "", fmt.Errorf("field label not supported: %s", label)
+ }
+ },
+ )
+ if err != nil {
+ return err
+ }
+ err = scheme.AddFieldLabelConversionFunc("v1", "ReplicationController",
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "metadata.name",
+ "metadata.namespace",
+ "status.replicas":
+ return label, value, nil
+ default:
+ return "", "", fmt.Errorf("field label not supported: %s", label)
+ }
+ })
+ if err != nil {
+ return err
+ }
+ err = scheme.AddFieldLabelConversionFunc("v1", "PersistentVolume",
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "metadata.name":
+ return label, value, nil
+ default:
+ return "", "", fmt.Errorf("field label not supported: %s", label)
+ }
+ },
+ )
+ if err != nil {
+ return err
+ }
+ if err := AddFieldLabelConversionsForEvent(scheme); err != nil {
+ return err
+ }
+ if err := AddFieldLabelConversionsForNamespace(scheme); err != nil {
+ return err
+ }
+ if err := AddFieldLabelConversionsForSecret(scheme); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1_ReplicationController_to_extensions_ReplicaSet(in *ReplicationController, out *extensions.ReplicaSet, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_ReplicationControllerSpec_to_extensions_ReplicaSetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ReplicationControllerStatus_to_extensions_ReplicaSetStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1_ReplicationControllerSpec_to_extensions_ReplicaSetSpec(in *ReplicationControllerSpec, out *extensions.ReplicaSetSpec, s conversion.Scope) error {
+ out.Replicas = *in.Replicas
+ if in.Selector != nil {
+ metav1.Convert_map_to_unversioned_LabelSelector(&in.Selector, out.Selector, s)
+ }
+ if in.Template != nil {
+ if err := Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func Convert_v1_ReplicationControllerStatus_to_extensions_ReplicaSetStatus(in *ReplicationControllerStatus, out *extensions.ReplicaSetStatus, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ out.FullyLabeledReplicas = in.FullyLabeledReplicas
+ out.ReadyReplicas = in.ReadyReplicas
+ out.AvailableReplicas = in.AvailableReplicas
+ out.ObservedGeneration = in.ObservedGeneration
+ return nil
+}
+
+func Convert_extensions_ReplicaSet_to_v1_ReplicationController(in *extensions.ReplicaSet, out *ReplicationController, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_extensions_ReplicaSetSpec_to_v1_ReplicationControllerSpec(&in.Spec, &out.Spec, s); err != nil {
+ fieldErr, ok := err.(*field.Error)
+ if !ok {
+ return err
+ }
+ if out.Annotations == nil {
+ out.Annotations = make(map[string]string)
+ }
+ out.Annotations[NonConvertibleAnnotationPrefix+"/"+fieldErr.Field] = reflect.ValueOf(fieldErr.BadValue).String()
+ }
+ if err := Convert_extensions_ReplicaSetStatus_to_v1_ReplicationControllerStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_extensions_ReplicaSetSpec_to_v1_ReplicationControllerSpec(in *extensions.ReplicaSetSpec, out *ReplicationControllerSpec, s conversion.Scope) error {
+ out.Replicas = new(int32)
+ *out.Replicas = in.Replicas
+ out.MinReadySeconds = in.MinReadySeconds
+ var invalidErr error
+ if in.Selector != nil {
+ invalidErr = metav1.Convert_unversioned_LabelSelector_to_map(in.Selector, &out.Selector, s)
+ }
+ out.Template = new(PodTemplateSpec)
+ if err := Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, out.Template, s); err != nil {
+ return err
+ }
+ return invalidErr
+}
+
+func Convert_extensions_ReplicaSetStatus_to_v1_ReplicationControllerStatus(in *extensions.ReplicaSetStatus, out *ReplicationControllerStatus, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ out.FullyLabeledReplicas = in.FullyLabeledReplicas
+ out.ReadyReplicas = in.ReadyReplicas
+ out.AvailableReplicas = in.AvailableReplicas
+ out.ObservedGeneration = in.ObservedGeneration
+ return nil
+}
+
+func Convert_api_ReplicationControllerSpec_To_v1_ReplicationControllerSpec(in *api.ReplicationControllerSpec, out *ReplicationControllerSpec, s conversion.Scope) error {
+ out.Replicas = &in.Replicas
+ out.MinReadySeconds = in.MinReadySeconds
+ out.Selector = in.Selector
+ if in.Template != nil {
+ out.Template = new(PodTemplateSpec)
+ if err := Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(in.Template, out.Template, s); err != nil {
+ return err
+ }
+ } else {
+ out.Template = nil
+ }
+ return nil
+}
+
+func Convert_v1_ReplicationControllerSpec_To_api_ReplicationControllerSpec(in *ReplicationControllerSpec, out *api.ReplicationControllerSpec, s conversion.Scope) error {
+ if in.Replicas != nil {
+ out.Replicas = *in.Replicas
+ }
+ out.MinReadySeconds = in.MinReadySeconds
+ out.Selector = in.Selector
+ if in.Template != nil {
+ out.Template = new(api.PodTemplateSpec)
+ if err := Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in.Template, out.Template, s); err != nil {
+ return err
+ }
+ } else {
+ out.Template = nil
+ }
+ return nil
+}
+
+func Convert_api_PodStatusResult_To_v1_PodStatusResult(in *api.PodStatusResult, out *PodStatusResult, s conversion.Scope) error {
+ if err := autoConvert_api_PodStatusResult_To_v1_PodStatusResult(in, out, s); err != nil {
+ return err
+ }
+
+ if old := out.Annotations; old != nil {
+ out.Annotations = make(map[string]string, len(old))
+ for k, v := range old {
+ out.Annotations[k] = v
+ }
+ }
+ if len(out.Status.InitContainerStatuses) > 0 {
+ if out.Annotations == nil {
+ out.Annotations = make(map[string]string)
+ }
+ value, err := json.Marshal(out.Status.InitContainerStatuses)
+ if err != nil {
+ return err
+ }
+ out.Annotations[PodInitContainerStatusesAnnotationKey] = string(value)
+ out.Annotations[PodInitContainerStatusesBetaAnnotationKey] = string(value)
+ } else {
+ delete(out.Annotations, PodInitContainerStatusesAnnotationKey)
+ delete(out.Annotations, PodInitContainerStatusesBetaAnnotationKey)
+ }
+ return nil
+}
+
+func Convert_v1_PodStatusResult_To_api_PodStatusResult(in *PodStatusResult, out *api.PodStatusResult, s conversion.Scope) error {
+ // TODO: sometime after we move init container to stable, remove these conversions
+ // If there is a beta annotation, copy to alpha key.
+ // See commit log for PR #31026 for why we do this.
+ if valueBeta, okBeta := in.Annotations[PodInitContainerStatusesBetaAnnotationKey]; okBeta {
+ in.Annotations[PodInitContainerStatusesAnnotationKey] = valueBeta
+ }
+ // Move the annotation to the internal repr. field
+ if value, ok := in.Annotations[PodInitContainerStatusesAnnotationKey]; ok {
+ var values []ContainerStatus
+ if err := json.Unmarshal([]byte(value), &values); err != nil {
+ return err
+ }
+ // Conversion from external to internal version exists more to
+ // satisfy the needs of the decoder than it does to be a general
+ // purpose tool. And Decode always creates an intermediate object
+ // to decode to. Thus the caller of UnsafeConvertToVersion is
+ // taking responsibility to ensure mutation of in is not exposed
+ // back to the caller.
+ in.Status.InitContainerStatuses = values
+ }
+
+ if err := autoConvert_v1_PodStatusResult_To_api_PodStatusResult(in, out, s); err != nil {
+ return err
+ }
+ if len(out.Annotations) > 0 {
+ old := out.Annotations
+ out.Annotations = make(map[string]string, len(old))
+ for k, v := range old {
+ out.Annotations[k] = v
+ }
+ delete(out.Annotations, PodInitContainerStatusesAnnotationKey)
+ delete(out.Annotations, PodInitContainerStatusesBetaAnnotationKey)
+ }
+ return nil
+}
+
+func Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(in *api.PodTemplateSpec, out *PodTemplateSpec, s conversion.Scope) error {
+ if err := autoConvert_api_PodTemplateSpec_To_v1_PodTemplateSpec(in, out, s); err != nil {
+ return err
+ }
+
+ // TODO: sometime after we move init container to stable, remove these conversions.
+ if old := out.Annotations; old != nil {
+ out.Annotations = make(map[string]string, len(old))
+ for k, v := range old {
+ out.Annotations[k] = v
+ }
+ }
+ if len(out.Spec.InitContainers) > 0 {
+ if out.Annotations == nil {
+ out.Annotations = make(map[string]string)
+ }
+ value, err := json.Marshal(out.Spec.InitContainers)
+ if err != nil {
+ return err
+ }
+ out.Annotations[PodInitContainersAnnotationKey] = string(value)
+ out.Annotations[PodInitContainersBetaAnnotationKey] = string(value)
+ } else {
+ delete(out.Annotations, PodInitContainersAnnotationKey)
+ delete(out.Annotations, PodInitContainersBetaAnnotationKey)
+ }
+ return nil
+}
+
+func Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in *PodTemplateSpec, out *api.PodTemplateSpec, s conversion.Scope) error {
+ // TODO: sometime after we move init container to stable, remove these conversions
+ // If there is a beta annotation, copy to alpha key.
+ // See commit log for PR #31026 for why we do this.
+ if valueBeta, okBeta := in.Annotations[PodInitContainersBetaAnnotationKey]; okBeta {
+ in.Annotations[PodInitContainersAnnotationKey] = valueBeta
+ }
+ // Move the annotation to the internal repr. field
+ if value, ok := in.Annotations[PodInitContainersAnnotationKey]; ok {
+ var values []Container
+ if err := json.Unmarshal([]byte(value), &values); err != nil {
+ return err
+ }
+ // Conversion from external to internal version exists more to
+ // satisfy the needs of the decoder than it does to be a general
+ // purpose tool. And Decode always creates an intermediate object
+ // to decode to. Thus the caller of UnsafeConvertToVersion is
+ // taking responsibility to ensure mutation of in is not exposed
+ // back to the caller.
+ in.Spec.InitContainers = values
+
+ // Call defaulters explicitly until annotations are removed
+ tmpPodTemp := &PodTemplate{
+ Template: PodTemplateSpec{
+ Spec: PodSpec{
+ HostNetwork: in.Spec.HostNetwork,
+ InitContainers: values,
+ },
+ },
+ }
+ SetObjectDefaults_PodTemplate(tmpPodTemp)
+ in.Spec.InitContainers = tmpPodTemp.Template.Spec.InitContainers
+ }
+
+ if err := autoConvert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in, out, s); err != nil {
+ return err
+ }
+ if len(out.Annotations) > 0 {
+ old := out.Annotations
+ out.Annotations = make(map[string]string, len(old))
+ for k, v := range old {
+ out.Annotations[k] = v
+ }
+ delete(out.Annotations, PodInitContainersAnnotationKey)
+ delete(out.Annotations, PodInitContainersBetaAnnotationKey)
+ }
+ return nil
+}
+
+// The following two PodSpec conversions are done here to support ServiceAccount
+// as an alias for ServiceAccountName.
+func Convert_api_PodSpec_To_v1_PodSpec(in *api.PodSpec, out *PodSpec, s conversion.Scope) error {
+ if err := autoConvert_api_PodSpec_To_v1_PodSpec(in, out, s); err != nil {
+ return err
+ }
+
+ // DeprecatedServiceAccount is an alias for ServiceAccountName.
+ out.DeprecatedServiceAccount = in.ServiceAccountName
+
+ if in.SecurityContext != nil {
+ // the host namespace fields have to be handled here for backward compatibility
+ // with v1.0.0
+ out.HostPID = in.SecurityContext.HostPID
+ out.HostNetwork = in.SecurityContext.HostNetwork
+ out.HostIPC = in.SecurityContext.HostIPC
+ }
+
+ return nil
+}
+
+func Convert_v1_PodSpec_To_api_PodSpec(in *PodSpec, out *api.PodSpec, s conversion.Scope) error {
+ if err := autoConvert_v1_PodSpec_To_api_PodSpec(in, out, s); err != nil {
+ return err
+ }
+
+ // We support DeprecatedServiceAccount as an alias for ServiceAccountName.
+ // If both are specified, ServiceAccountName (the new field) wins.
+ if in.ServiceAccountName == "" {
+ out.ServiceAccountName = in.DeprecatedServiceAccount
+ }
+
+ // the host namespace fields have to be handled specially for backward compatibility
+ // with v1.0.0
+ if out.SecurityContext == nil {
+ out.SecurityContext = new(api.PodSecurityContext)
+ }
+ out.SecurityContext.HostNetwork = in.HostNetwork
+ out.SecurityContext.HostPID = in.HostPID
+ out.SecurityContext.HostIPC = in.HostIPC
+
+ return nil
+}
+
+func Convert_api_Pod_To_v1_Pod(in *api.Pod, out *Pod, s conversion.Scope) error {
+ if err := autoConvert_api_Pod_To_v1_Pod(in, out, s); err != nil {
+ return err
+ }
+
+ // TODO: sometime after we move init container to stable, remove these conversions
+ if len(out.Spec.InitContainers) > 0 || len(out.Status.InitContainerStatuses) > 0 {
+ old := out.Annotations
+ out.Annotations = make(map[string]string, len(old))
+ for k, v := range old {
+ out.Annotations[k] = v
+ }
+ delete(out.Annotations, PodInitContainersAnnotationKey)
+ delete(out.Annotations, PodInitContainersBetaAnnotationKey)
+ delete(out.Annotations, PodInitContainerStatusesAnnotationKey)
+ delete(out.Annotations, PodInitContainerStatusesBetaAnnotationKey)
+ }
+ if len(out.Spec.InitContainers) > 0 {
+ value, err := json.Marshal(out.Spec.InitContainers)
+ if err != nil {
+ return err
+ }
+ out.Annotations[PodInitContainersAnnotationKey] = string(value)
+ out.Annotations[PodInitContainersBetaAnnotationKey] = string(value)
+ }
+ if len(out.Status.InitContainerStatuses) > 0 {
+ value, err := json.Marshal(out.Status.InitContainerStatuses)
+ if err != nil {
+ return err
+ }
+ out.Annotations[PodInitContainerStatusesAnnotationKey] = string(value)
+ out.Annotations[PodInitContainerStatusesBetaAnnotationKey] = string(value)
+ }
+
+ return nil
+}
+
+func Convert_v1_Pod_To_api_Pod(in *Pod, out *api.Pod, s conversion.Scope) error {
+ // If there is a beta annotation, copy to alpha key.
+ // See commit log for PR #31026 for why we do this.
+ if valueBeta, okBeta := in.Annotations[PodInitContainersBetaAnnotationKey]; okBeta {
+ in.Annotations[PodInitContainersAnnotationKey] = valueBeta
+ }
+ // TODO: sometime after we move init container to stable, remove these conversions
+ // Move the annotation to the internal repr. field
+ if value, ok := in.Annotations[PodInitContainersAnnotationKey]; ok {
+ var values []Container
+ if err := json.Unmarshal([]byte(value), &values); err != nil {
+ return err
+ }
+ // Conversion from external to internal version exists more to
+ // satisfy the needs of the decoder than it does to be a general
+ // purpose tool. And Decode always creates an intermediate object
+ // to decode to. Thus the caller of UnsafeConvertToVersion is
+ // taking responsibility to ensure mutation of in is not exposed
+ // back to the caller.
+ in.Spec.InitContainers = values
+ // Call defaulters explicitly until annotations are removed
+ tmpPod := &Pod{
+ Spec: PodSpec{
+ HostNetwork: in.Spec.HostNetwork,
+ InitContainers: values,
+ },
+ }
+ SetObjectDefaults_Pod(tmpPod)
+ in.Spec.InitContainers = tmpPod.Spec.InitContainers
+ }
+ // If there is a beta annotation, copy to alpha key.
+ // See commit log for PR #31026 for why we do this.
+ if valueBeta, okBeta := in.Annotations[PodInitContainerStatusesBetaAnnotationKey]; okBeta {
+ in.Annotations[PodInitContainerStatusesAnnotationKey] = valueBeta
+ }
+ if value, ok := in.Annotations[PodInitContainerStatusesAnnotationKey]; ok {
+ var values []ContainerStatus
+ if err := json.Unmarshal([]byte(value), &values); err != nil {
+ return err
+ }
+ // Conversion from external to internal version exists more to
+ // satisfy the needs of the decoder than it does to be a general
+ // purpose tool. And Decode always creates an intermediate object
+ // to decode to. Thus the caller of UnsafeConvertToVersion is
+ // taking responsibility to ensure mutation of in is not exposed
+ // back to the caller.
+ in.Status.InitContainerStatuses = values
+ }
+
+ if err := autoConvert_v1_Pod_To_api_Pod(in, out, s); err != nil {
+ return err
+ }
+ if len(out.Annotations) > 0 {
+ old := out.Annotations
+ out.Annotations = make(map[string]string, len(old))
+ for k, v := range old {
+ out.Annotations[k] = v
+ }
+ delete(out.Annotations, PodInitContainersAnnotationKey)
+ delete(out.Annotations, PodInitContainersBetaAnnotationKey)
+ delete(out.Annotations, PodInitContainerStatusesAnnotationKey)
+ delete(out.Annotations, PodInitContainerStatusesBetaAnnotationKey)
+ }
+ return nil
+}
+
+func Convert_v1_Secret_To_api_Secret(in *Secret, out *api.Secret, s conversion.Scope) error {
+ if err := autoConvert_v1_Secret_To_api_Secret(in, out, s); err != nil {
+ return err
+ }
+
+ // StringData overwrites Data
+ if len(in.StringData) > 0 {
+ if out.Data == nil {
+ out.Data = map[string][]byte{}
+ }
+ for k, v := range in.StringData {
+ out.Data[k] = []byte(v)
+ }
+ }
+
+ return nil
+}
+
+func Convert_api_PodSecurityContext_To_v1_PodSecurityContext(in *api.PodSecurityContext, out *PodSecurityContext, s conversion.Scope) error {
+ out.SupplementalGroups = in.SupplementalGroups
+ if in.SELinuxOptions != nil {
+ out.SELinuxOptions = new(SELinuxOptions)
+ if err := Convert_api_SELinuxOptions_To_v1_SELinuxOptions(in.SELinuxOptions, out.SELinuxOptions, s); err != nil {
+ return err
+ }
+ } else {
+ out.SELinuxOptions = nil
+ }
+ out.RunAsUser = in.RunAsUser
+ out.RunAsNonRoot = in.RunAsNonRoot
+ out.FSGroup = in.FSGroup
+ return nil
+}
+
+func Convert_v1_PodSecurityContext_To_api_PodSecurityContext(in *PodSecurityContext, out *api.PodSecurityContext, s conversion.Scope) error {
+ out.SupplementalGroups = in.SupplementalGroups
+ if in.SELinuxOptions != nil {
+ out.SELinuxOptions = new(api.SELinuxOptions)
+ if err := Convert_v1_SELinuxOptions_To_api_SELinuxOptions(in.SELinuxOptions, out.SELinuxOptions, s); err != nil {
+ return err
+ }
+ } else {
+ out.SELinuxOptions = nil
+ }
+ out.RunAsUser = in.RunAsUser
+ out.RunAsNonRoot = in.RunAsNonRoot
+ out.FSGroup = in.FSGroup
+ return nil
+}
+
+// +k8s:conversion-fn=copy-only
+func Convert_v1_ResourceList_To_api_ResourceList(in *ResourceList, out *api.ResourceList, s conversion.Scope) error {
+ if *in == nil {
+ return nil
+ }
+ if *out == nil {
+ *out = make(api.ResourceList, len(*in))
+ }
+ for key, val := range *in {
+ // Moved to defaults
+ // TODO(#18538): We round up resource values to milli scale to maintain API compatibility.
+ // In the future, we should instead reject values that need rounding.
+ // const milliScale = -3
+ // val.RoundUp(milliScale)
+
+ (*out)[api.ResourceName(key)] = val
+ }
+ return nil
+}
+
+func AddFieldLabelConversionsForEvent(scheme *runtime.Scheme) error {
+ return scheme.AddFieldLabelConversionFunc("v1", "Event",
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "involvedObject.kind",
+ "involvedObject.namespace",
+ "involvedObject.name",
+ "involvedObject.uid",
+ "involvedObject.apiVersion",
+ "involvedObject.resourceVersion",
+ "involvedObject.fieldPath",
+ "reason",
+ "source",
+ "type",
+ "metadata.namespace",
+ "metadata.name":
+ return label, value, nil
+ default:
+ return "", "", fmt.Errorf("field label not supported: %s", label)
+ }
+ })
+}
+
+func AddFieldLabelConversionsForNamespace(scheme *runtime.Scheme) error {
+ return scheme.AddFieldLabelConversionFunc("v1", "Namespace",
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "status.phase",
+ "metadata.name":
+ return label, value, nil
+ default:
+ return "", "", fmt.Errorf("field label not supported: %s", label)
+ }
+ })
+}
+
+func AddFieldLabelConversionsForSecret(scheme *runtime.Scheme) error {
+ return scheme.AddFieldLabelConversionFunc("v1", "Secret",
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "type",
+ "metadata.namespace",
+ "metadata.name":
+ return label, value, nil
+ default:
+ return "", "", fmt.Errorf("field label not supported: %s", label)
+ }
+ })
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/defaults.go b/vendor/k8s.io/kubernetes/pkg/api/v1/defaults.go
new file mode 100644
index 000000000..d6cf9fc28
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/v1/defaults.go
@@ -0,0 +1,373 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/intstr"
+ "k8s.io/kubernetes/pkg/util"
+ "k8s.io/kubernetes/pkg/util/parsers"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
+
+func SetDefaults_ResourceList(obj *ResourceList) {
+ for key, val := range *obj {
+ // TODO(#18538): We round up resource values to milli scale to maintain API compatibility.
+ // In the future, we should instead reject values that need rounding.
+ const milliScale = -3
+ val.RoundUp(milliScale)
+
+ (*obj)[ResourceName(key)] = val
+ }
+}
+
+func SetDefaults_PodExecOptions(obj *PodExecOptions) {
+ obj.Stdout = true
+ obj.Stderr = true
+}
+func SetDefaults_PodAttachOptions(obj *PodAttachOptions) {
+ obj.Stdout = true
+ obj.Stderr = true
+}
+func SetDefaults_ReplicationController(obj *ReplicationController) {
+ var labels map[string]string
+ if obj.Spec.Template != nil {
+ labels = obj.Spec.Template.Labels
+ }
+ // TODO: support templates defined elsewhere when we support them in the API
+ if labels != nil {
+ if len(obj.Spec.Selector) == 0 {
+ obj.Spec.Selector = labels
+ }
+ if len(obj.Labels) == 0 {
+ obj.Labels = labels
+ }
+ }
+ if obj.Spec.Replicas == nil {
+ obj.Spec.Replicas = new(int32)
+ *obj.Spec.Replicas = 1
+ }
+}
+func SetDefaults_Volume(obj *Volume) {
+ if util.AllPtrFieldsNil(&obj.VolumeSource) {
+ obj.VolumeSource = VolumeSource{
+ EmptyDir: &EmptyDirVolumeSource{},
+ }
+ }
+}
+func SetDefaults_ContainerPort(obj *ContainerPort) {
+ if obj.Protocol == "" {
+ obj.Protocol = ProtocolTCP
+ }
+}
+func SetDefaults_Container(obj *Container) {
+ if obj.ImagePullPolicy == "" {
+ // Ignore error and assume it has been validated elsewhere
+ _, tag, _, _ := parsers.ParseImageName(obj.Image)
+
+ // Check image tag
+ if tag == "latest" {
+ obj.ImagePullPolicy = PullAlways
+ } else {
+ obj.ImagePullPolicy = PullIfNotPresent
+ }
+ }
+ if obj.TerminationMessagePath == "" {
+ obj.TerminationMessagePath = TerminationMessagePathDefault
+ }
+ if obj.TerminationMessagePolicy == "" {
+ obj.TerminationMessagePolicy = TerminationMessageReadFile
+ }
+}
+func SetDefaults_Service(obj *Service) {
+ if obj.Spec.SessionAffinity == "" {
+ obj.Spec.SessionAffinity = ServiceAffinityNone
+ }
+ if obj.Spec.Type == "" {
+ obj.Spec.Type = ServiceTypeClusterIP
+ }
+ for i := range obj.Spec.Ports {
+ sp := &obj.Spec.Ports[i]
+ if sp.Protocol == "" {
+ sp.Protocol = ProtocolTCP
+ }
+ if sp.TargetPort == intstr.FromInt(0) || sp.TargetPort == intstr.FromString("") {
+ sp.TargetPort = intstr.FromInt(int(sp.Port))
+ }
+ }
+ // Defaults ExternalTrafficPolicy field for NodePort / LoadBalancer service
+ // to Global for consistency.
+ if _, ok := obj.Annotations[BetaAnnotationExternalTraffic]; ok {
+ // Don't default this field if beta annotation exists.
+ return
+ } else if (obj.Spec.Type == ServiceTypeNodePort ||
+ obj.Spec.Type == ServiceTypeLoadBalancer) &&
+ obj.Spec.ExternalTrafficPolicy == "" {
+ obj.Spec.ExternalTrafficPolicy = ServiceExternalTrafficPolicyTypeCluster
+ }
+}
+func SetDefaults_Pod(obj *Pod) {
+ // If limits are specified, but requests are not, default requests to limits
+ // This is done here rather than a more specific defaulting pass on ResourceRequirements
+ // because we only want this defaulting semantic to take place on a Pod and not a PodTemplate
+ for i := range obj.Spec.Containers {
+ // set requests to limits if requests are not specified, but limits are
+ if obj.Spec.Containers[i].Resources.Limits != nil {
+ if obj.Spec.Containers[i].Resources.Requests == nil {
+ obj.Spec.Containers[i].Resources.Requests = make(ResourceList)
+ }
+ for key, value := range obj.Spec.Containers[i].Resources.Limits {
+ if _, exists := obj.Spec.Containers[i].Resources.Requests[key]; !exists {
+ obj.Spec.Containers[i].Resources.Requests[key] = *(value.Copy())
+ }
+ }
+ }
+ }
+ for i := range obj.Spec.InitContainers {
+ if obj.Spec.InitContainers[i].Resources.Limits != nil {
+ if obj.Spec.InitContainers[i].Resources.Requests == nil {
+ obj.Spec.InitContainers[i].Resources.Requests = make(ResourceList)
+ }
+ for key, value := range obj.Spec.InitContainers[i].Resources.Limits {
+ if _, exists := obj.Spec.InitContainers[i].Resources.Requests[key]; !exists {
+ obj.Spec.InitContainers[i].Resources.Requests[key] = *(value.Copy())
+ }
+ }
+ }
+ }
+}
+func SetDefaults_PodSpec(obj *PodSpec) {
+ if obj.DNSPolicy == "" {
+ obj.DNSPolicy = DNSClusterFirst
+ }
+ if obj.RestartPolicy == "" {
+ obj.RestartPolicy = RestartPolicyAlways
+ }
+ if obj.HostNetwork {
+ defaultHostNetworkPorts(&obj.Containers)
+ defaultHostNetworkPorts(&obj.InitContainers)
+ }
+ if obj.SecurityContext == nil {
+ obj.SecurityContext = &PodSecurityContext{}
+ }
+ if obj.TerminationGracePeriodSeconds == nil {
+ period := int64(DefaultTerminationGracePeriodSeconds)
+ obj.TerminationGracePeriodSeconds = &period
+ }
+ if obj.SchedulerName == "" {
+ obj.SchedulerName = DefaultSchedulerName
+ }
+}
+func SetDefaults_Probe(obj *Probe) {
+ if obj.TimeoutSeconds == 0 {
+ obj.TimeoutSeconds = 1
+ }
+ if obj.PeriodSeconds == 0 {
+ obj.PeriodSeconds = 10
+ }
+ if obj.SuccessThreshold == 0 {
+ obj.SuccessThreshold = 1
+ }
+ if obj.FailureThreshold == 0 {
+ obj.FailureThreshold = 3
+ }
+}
+func SetDefaults_SecretVolumeSource(obj *SecretVolumeSource) {
+ if obj.DefaultMode == nil {
+ perm := int32(SecretVolumeSourceDefaultMode)
+ obj.DefaultMode = &perm
+ }
+}
+func SetDefaults_ConfigMapVolumeSource(obj *ConfigMapVolumeSource) {
+ if obj.DefaultMode == nil {
+ perm := int32(ConfigMapVolumeSourceDefaultMode)
+ obj.DefaultMode = &perm
+ }
+}
+func SetDefaults_DownwardAPIVolumeSource(obj *DownwardAPIVolumeSource) {
+ if obj.DefaultMode == nil {
+ perm := int32(DownwardAPIVolumeSourceDefaultMode)
+ obj.DefaultMode = &perm
+ }
+}
+func SetDefaults_Secret(obj *Secret) {
+ if obj.Type == "" {
+ obj.Type = SecretTypeOpaque
+ }
+}
+func SetDefaults_ProjectedVolumeSource(obj *ProjectedVolumeSource) {
+ if obj.DefaultMode == nil {
+ perm := int32(ProjectedVolumeSourceDefaultMode)
+ obj.DefaultMode = &perm
+ }
+}
+func SetDefaults_PersistentVolume(obj *PersistentVolume) {
+ if obj.Status.Phase == "" {
+ obj.Status.Phase = VolumePending
+ }
+ if obj.Spec.PersistentVolumeReclaimPolicy == "" {
+ obj.Spec.PersistentVolumeReclaimPolicy = PersistentVolumeReclaimRetain
+ }
+}
+func SetDefaults_PersistentVolumeClaim(obj *PersistentVolumeClaim) {
+ if obj.Status.Phase == "" {
+ obj.Status.Phase = ClaimPending
+ }
+}
+func SetDefaults_ISCSIVolumeSource(obj *ISCSIVolumeSource) {
+ if obj.ISCSIInterface == "" {
+ obj.ISCSIInterface = "default"
+ }
+}
+func SetDefaults_AzureDiskVolumeSource(obj *AzureDiskVolumeSource) {
+ if obj.CachingMode == nil {
+ obj.CachingMode = new(AzureDataDiskCachingMode)
+ *obj.CachingMode = AzureDataDiskCachingReadWrite
+ }
+ if obj.Kind == nil {
+ obj.Kind = new(AzureDataDiskKind)
+ *obj.Kind = AzureSharedBlobDisk
+ }
+ if obj.FSType == nil {
+ obj.FSType = new(string)
+ *obj.FSType = "ext4"
+ }
+ if obj.ReadOnly == nil {
+ obj.ReadOnly = new(bool)
+ *obj.ReadOnly = false
+ }
+}
+func SetDefaults_Endpoints(obj *Endpoints) {
+ for i := range obj.Subsets {
+ ss := &obj.Subsets[i]
+ for i := range ss.Ports {
+ ep := &ss.Ports[i]
+ if ep.Protocol == "" {
+ ep.Protocol = ProtocolTCP
+ }
+ }
+ }
+}
+func SetDefaults_HTTPGetAction(obj *HTTPGetAction) {
+ if obj.Path == "" {
+ obj.Path = "/"
+ }
+ if obj.Scheme == "" {
+ obj.Scheme = URISchemeHTTP
+ }
+}
+func SetDefaults_NamespaceStatus(obj *NamespaceStatus) {
+ if obj.Phase == "" {
+ obj.Phase = NamespaceActive
+ }
+}
+func SetDefaults_Node(obj *Node) {
+ if obj.Spec.ExternalID == "" {
+ obj.Spec.ExternalID = obj.Name
+ }
+}
+func SetDefaults_NodeStatus(obj *NodeStatus) {
+ if obj.Allocatable == nil && obj.Capacity != nil {
+ obj.Allocatable = make(ResourceList, len(obj.Capacity))
+ for key, value := range obj.Capacity {
+ obj.Allocatable[key] = *(value.Copy())
+ }
+ obj.Allocatable = obj.Capacity
+ }
+}
+func SetDefaults_ObjectFieldSelector(obj *ObjectFieldSelector) {
+ if obj.APIVersion == "" {
+ obj.APIVersion = "v1"
+ }
+}
+func SetDefaults_LimitRangeItem(obj *LimitRangeItem) {
+ // for container limits, we apply default values
+ if obj.Type == LimitTypeContainer {
+
+ if obj.Default == nil {
+ obj.Default = make(ResourceList)
+ }
+ if obj.DefaultRequest == nil {
+ obj.DefaultRequest = make(ResourceList)
+ }
+
+ // If a default limit is unspecified, but the max is specified, default the limit to the max
+ for key, value := range obj.Max {
+ if _, exists := obj.Default[key]; !exists {
+ obj.Default[key] = *(value.Copy())
+ }
+ }
+ // If a default limit is specified, but the default request is not, default request to limit
+ for key, value := range obj.Default {
+ if _, exists := obj.DefaultRequest[key]; !exists {
+ obj.DefaultRequest[key] = *(value.Copy())
+ }
+ }
+ // If a default request is not specified, but the min is provided, default request to the min
+ for key, value := range obj.Min {
+ if _, exists := obj.DefaultRequest[key]; !exists {
+ obj.DefaultRequest[key] = *(value.Copy())
+ }
+ }
+ }
+}
+func SetDefaults_ConfigMap(obj *ConfigMap) {
+ if obj.Data == nil {
+ obj.Data = make(map[string]string)
+ }
+}
+
+// With host networking default all container ports to host ports.
+func defaultHostNetworkPorts(containers *[]Container) {
+ for i := range *containers {
+ for j := range (*containers)[i].Ports {
+ if (*containers)[i].Ports[j].HostPort == 0 {
+ (*containers)[i].Ports[j].HostPort = (*containers)[i].Ports[j].ContainerPort
+ }
+ }
+ }
+}
+
+func SetDefaults_RBDVolumeSource(obj *RBDVolumeSource) {
+ if obj.RBDPool == "" {
+ obj.RBDPool = "rbd"
+ }
+ if obj.RadosUser == "" {
+ obj.RadosUser = "admin"
+ }
+ if obj.Keyring == "" {
+ obj.Keyring = "/etc/ceph/keyring"
+ }
+}
+
+func SetDefaults_ScaleIOVolumeSource(obj *ScaleIOVolumeSource) {
+ if obj.ProtectionDomain == "" {
+ obj.ProtectionDomain = "default"
+ }
+ if obj.StoragePool == "" {
+ obj.StoragePool = "default"
+ }
+ if obj.StorageMode == "" {
+ obj.StorageMode = "ThinProvisioned"
+ }
+ if obj.FSType == "" {
+ obj.FSType = "xfs"
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/doc.go b/vendor/k8s.io/kubernetes/pkg/api/v1/doc.go
new file mode 100644
index 000000000..e97948d49
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/v1/doc.go
@@ -0,0 +1,23 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/api
+// +k8s:openapi-gen=true
+// +k8s:defaulter-gen=TypeMeta
+
+// Package v1 is the v1 version of the API.
+package v1 // import "k8s.io/kubernetes/pkg/api/v1"
diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/generate.go b/vendor/k8s.io/kubernetes/pkg/api/v1/generate.go
new file mode 100644
index 000000000..b8c44e4c7
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/v1/generate.go
@@ -0,0 +1,64 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "fmt"
+
+ utilrand "k8s.io/apimachinery/pkg/util/rand"
+)
+
+// NameGenerator generates names for objects. Some backends may have more information
+// available to guide selection of new names and this interface hides those details.
+type NameGenerator interface {
+ // GenerateName generates a valid name from the base name, adding a random suffix to the
+ // the base. If base is valid, the returned name must also be valid. The generator is
+ // responsible for knowing the maximum valid name length.
+ GenerateName(base string) string
+}
+
+// GenerateName will resolve the object name of the provided ObjectMeta to a generated version if
+// necessary. It expects that validation for ObjectMeta has already completed (that Base is a
+// valid name) and that the NameGenerator generates a name that is also valid.
+func GenerateName(u NameGenerator, meta *ObjectMeta) {
+ if len(meta.GenerateName) == 0 || len(meta.Name) != 0 {
+ return
+ }
+ meta.Name = u.GenerateName(meta.GenerateName)
+}
+
+// simpleNameGenerator generates random names.
+type simpleNameGenerator struct{}
+
+// SimpleNameGenerator is a generator that returns the name plus a random suffix of five alphanumerics
+// when a name is requested. The string is guaranteed to not exceed the length of a standard Kubernetes
+// name (63 characters)
+var SimpleNameGenerator NameGenerator = simpleNameGenerator{}
+
+const (
+ // TODO: make this flexible for non-core resources with alternate naming rules.
+ maxNameLength = 63
+ randomLength = 5
+ maxGeneratedNameLength = maxNameLength - randomLength
+)
+
+func (simpleNameGenerator) GenerateName(base string) string {
+ if len(base) > maxGeneratedNameLength {
+ base = base[:maxGeneratedNameLength]
+ }
+ return fmt.Sprintf("%s%s", base, utilrand.String(randomLength))
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/api/v1/generated.pb.go
new file mode 100644
index 000000000..f159e3e42
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/v1/generated.pb.go
@@ -0,0 +1,45117 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/api/v1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/api/v1/generated.proto
+
+ It has these top-level messages:
+ AWSElasticBlockStoreVolumeSource
+ Affinity
+ AttachedVolume
+ AvoidPods
+ AzureDiskVolumeSource
+ AzureFileVolumeSource
+ Binding
+ Capabilities
+ CephFSVolumeSource
+ CinderVolumeSource
+ ComponentCondition
+ ComponentStatus
+ ComponentStatusList
+ ConfigMap
+ ConfigMapEnvSource
+ ConfigMapKeySelector
+ ConfigMapList
+ ConfigMapProjection
+ ConfigMapVolumeSource
+ Container
+ ContainerImage
+ ContainerPort
+ ContainerState
+ ContainerStateRunning
+ ContainerStateTerminated
+ ContainerStateWaiting
+ ContainerStatus
+ DaemonEndpoint
+ DeleteOptions
+ DownwardAPIProjection
+ DownwardAPIVolumeFile
+ DownwardAPIVolumeSource
+ EmptyDirVolumeSource
+ EndpointAddress
+ EndpointPort
+ EndpointSubset
+ Endpoints
+ EndpointsList
+ EnvFromSource
+ EnvVar
+ EnvVarSource
+ Event
+ EventList
+ EventSource
+ ExecAction
+ FCVolumeSource
+ FlexVolumeSource
+ FlockerVolumeSource
+ GCEPersistentDiskVolumeSource
+ GitRepoVolumeSource
+ GlusterfsVolumeSource
+ HTTPGetAction
+ HTTPHeader
+ Handler
+ HostAlias
+ HostPathVolumeSource
+ ISCSIVolumeSource
+ KeyToPath
+ Lifecycle
+ LimitRange
+ LimitRangeItem
+ LimitRangeList
+ LimitRangeSpec
+ List
+ ListOptions
+ LoadBalancerIngress
+ LoadBalancerStatus
+ LocalObjectReference
+ LocalVolumeSource
+ NFSVolumeSource
+ Namespace
+ NamespaceList
+ NamespaceSpec
+ NamespaceStatus
+ Node
+ NodeAddress
+ NodeAffinity
+ NodeCondition
+ NodeDaemonEndpoints
+ NodeList
+ NodeProxyOptions
+ NodeResources
+ NodeSelector
+ NodeSelectorRequirement
+ NodeSelectorTerm
+ NodeSpec
+ NodeStatus
+ NodeSystemInfo
+ ObjectFieldSelector
+ ObjectMeta
+ ObjectReference
+ PersistentVolume
+ PersistentVolumeClaim
+ PersistentVolumeClaimList
+ PersistentVolumeClaimSpec
+ PersistentVolumeClaimStatus
+ PersistentVolumeClaimVolumeSource
+ PersistentVolumeList
+ PersistentVolumeSource
+ PersistentVolumeSpec
+ PersistentVolumeStatus
+ PhotonPersistentDiskVolumeSource
+ Pod
+ PodAffinity
+ PodAffinityTerm
+ PodAntiAffinity
+ PodAttachOptions
+ PodCondition
+ PodExecOptions
+ PodList
+ PodLogOptions
+ PodPortForwardOptions
+ PodProxyOptions
+ PodSecurityContext
+ PodSignature
+ PodSpec
+ PodStatus
+ PodStatusResult
+ PodTemplate
+ PodTemplateList
+ PodTemplateSpec
+ PortworxVolumeSource
+ Preconditions
+ PreferAvoidPodsEntry
+ PreferredSchedulingTerm
+ Probe
+ ProjectedVolumeSource
+ QuobyteVolumeSource
+ RBDVolumeSource
+ RangeAllocation
+ ReplicationController
+ ReplicationControllerCondition
+ ReplicationControllerList
+ ReplicationControllerSpec
+ ReplicationControllerStatus
+ ResourceFieldSelector
+ ResourceQuota
+ ResourceQuotaList
+ ResourceQuotaSpec
+ ResourceQuotaStatus
+ ResourceRequirements
+ SELinuxOptions
+ ScaleIOVolumeSource
+ Secret
+ SecretEnvSource
+ SecretKeySelector
+ SecretList
+ SecretProjection
+ SecretVolumeSource
+ SecurityContext
+ SerializedReference
+ Service
+ ServiceAccount
+ ServiceAccountList
+ ServiceList
+ ServicePort
+ ServiceProxyOptions
+ ServiceSpec
+ ServiceStatus
+ StorageOSPersistentVolumeSource
+ StorageOSVolumeSource
+ Sysctl
+ TCPSocketAction
+ Taint
+ Toleration
+ Volume
+ VolumeMount
+ VolumeProjection
+ VolumeSource
+ VsphereVirtualDiskVolumeSource
+ WeightedPodAffinityTerm
+*/
+package v1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_apimachinery_pkg_api_resource "k8s.io/apimachinery/pkg/api/resource"
+import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+import k8s_io_apimachinery_pkg_runtime "k8s.io/apimachinery/pkg/runtime"
+
+import k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types"
+
+import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *AWSElasticBlockStoreVolumeSource) Reset() { *m = AWSElasticBlockStoreVolumeSource{} }
+func (*AWSElasticBlockStoreVolumeSource) ProtoMessage() {}
+func (*AWSElasticBlockStoreVolumeSource) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{0}
+}
+
+func (m *Affinity) Reset() { *m = Affinity{} }
+func (*Affinity) ProtoMessage() {}
+func (*Affinity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *AttachedVolume) Reset() { *m = AttachedVolume{} }
+func (*AttachedVolume) ProtoMessage() {}
+func (*AttachedVolume) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
+
+func (m *AvoidPods) Reset() { *m = AvoidPods{} }
+func (*AvoidPods) ProtoMessage() {}
+func (*AvoidPods) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
+
+func (m *AzureDiskVolumeSource) Reset() { *m = AzureDiskVolumeSource{} }
+func (*AzureDiskVolumeSource) ProtoMessage() {}
+func (*AzureDiskVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
+
+func (m *AzureFileVolumeSource) Reset() { *m = AzureFileVolumeSource{} }
+func (*AzureFileVolumeSource) ProtoMessage() {}
+func (*AzureFileVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
+
+func (m *Binding) Reset() { *m = Binding{} }
+func (*Binding) ProtoMessage() {}
+func (*Binding) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
+
+func (m *Capabilities) Reset() { *m = Capabilities{} }
+func (*Capabilities) ProtoMessage() {}
+func (*Capabilities) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
+
+func (m *CephFSVolumeSource) Reset() { *m = CephFSVolumeSource{} }
+func (*CephFSVolumeSource) ProtoMessage() {}
+func (*CephFSVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
+
+func (m *CinderVolumeSource) Reset() { *m = CinderVolumeSource{} }
+func (*CinderVolumeSource) ProtoMessage() {}
+func (*CinderVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
+
+func (m *ComponentCondition) Reset() { *m = ComponentCondition{} }
+func (*ComponentCondition) ProtoMessage() {}
+func (*ComponentCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
+
+func (m *ComponentStatus) Reset() { *m = ComponentStatus{} }
+func (*ComponentStatus) ProtoMessage() {}
+func (*ComponentStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} }
+
+func (m *ComponentStatusList) Reset() { *m = ComponentStatusList{} }
+func (*ComponentStatusList) ProtoMessage() {}
+func (*ComponentStatusList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} }
+
+func (m *ConfigMap) Reset() { *m = ConfigMap{} }
+func (*ConfigMap) ProtoMessage() {}
+func (*ConfigMap) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} }
+
+func (m *ConfigMapEnvSource) Reset() { *m = ConfigMapEnvSource{} }
+func (*ConfigMapEnvSource) ProtoMessage() {}
+func (*ConfigMapEnvSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} }
+
+func (m *ConfigMapKeySelector) Reset() { *m = ConfigMapKeySelector{} }
+func (*ConfigMapKeySelector) ProtoMessage() {}
+func (*ConfigMapKeySelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} }
+
+func (m *ConfigMapList) Reset() { *m = ConfigMapList{} }
+func (*ConfigMapList) ProtoMessage() {}
+func (*ConfigMapList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} }
+
+func (m *ConfigMapProjection) Reset() { *m = ConfigMapProjection{} }
+func (*ConfigMapProjection) ProtoMessage() {}
+func (*ConfigMapProjection) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} }
+
+func (m *ConfigMapVolumeSource) Reset() { *m = ConfigMapVolumeSource{} }
+func (*ConfigMapVolumeSource) ProtoMessage() {}
+func (*ConfigMapVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} }
+
+func (m *Container) Reset() { *m = Container{} }
+func (*Container) ProtoMessage() {}
+func (*Container) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} }
+
+func (m *ContainerImage) Reset() { *m = ContainerImage{} }
+func (*ContainerImage) ProtoMessage() {}
+func (*ContainerImage) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{20} }
+
+func (m *ContainerPort) Reset() { *m = ContainerPort{} }
+func (*ContainerPort) ProtoMessage() {}
+func (*ContainerPort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{21} }
+
+func (m *ContainerState) Reset() { *m = ContainerState{} }
+func (*ContainerState) ProtoMessage() {}
+func (*ContainerState) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{22} }
+
+func (m *ContainerStateRunning) Reset() { *m = ContainerStateRunning{} }
+func (*ContainerStateRunning) ProtoMessage() {}
+func (*ContainerStateRunning) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{23} }
+
+func (m *ContainerStateTerminated) Reset() { *m = ContainerStateTerminated{} }
+func (*ContainerStateTerminated) ProtoMessage() {}
+func (*ContainerStateTerminated) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{24}
+}
+
+func (m *ContainerStateWaiting) Reset() { *m = ContainerStateWaiting{} }
+func (*ContainerStateWaiting) ProtoMessage() {}
+func (*ContainerStateWaiting) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} }
+
+func (m *ContainerStatus) Reset() { *m = ContainerStatus{} }
+func (*ContainerStatus) ProtoMessage() {}
+func (*ContainerStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{26} }
+
+func (m *DaemonEndpoint) Reset() { *m = DaemonEndpoint{} }
+func (*DaemonEndpoint) ProtoMessage() {}
+func (*DaemonEndpoint) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{27} }
+
+func (m *DeleteOptions) Reset() { *m = DeleteOptions{} }
+func (*DeleteOptions) ProtoMessage() {}
+func (*DeleteOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{28} }
+
+func (m *DownwardAPIProjection) Reset() { *m = DownwardAPIProjection{} }
+func (*DownwardAPIProjection) ProtoMessage() {}
+func (*DownwardAPIProjection) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{29} }
+
+func (m *DownwardAPIVolumeFile) Reset() { *m = DownwardAPIVolumeFile{} }
+func (*DownwardAPIVolumeFile) ProtoMessage() {}
+func (*DownwardAPIVolumeFile) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{30} }
+
+func (m *DownwardAPIVolumeSource) Reset() { *m = DownwardAPIVolumeSource{} }
+func (*DownwardAPIVolumeSource) ProtoMessage() {}
+func (*DownwardAPIVolumeSource) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{31}
+}
+
+func (m *EmptyDirVolumeSource) Reset() { *m = EmptyDirVolumeSource{} }
+func (*EmptyDirVolumeSource) ProtoMessage() {}
+func (*EmptyDirVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{32} }
+
+func (m *EndpointAddress) Reset() { *m = EndpointAddress{} }
+func (*EndpointAddress) ProtoMessage() {}
+func (*EndpointAddress) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{33} }
+
+func (m *EndpointPort) Reset() { *m = EndpointPort{} }
+func (*EndpointPort) ProtoMessage() {}
+func (*EndpointPort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{34} }
+
+func (m *EndpointSubset) Reset() { *m = EndpointSubset{} }
+func (*EndpointSubset) ProtoMessage() {}
+func (*EndpointSubset) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{35} }
+
+func (m *Endpoints) Reset() { *m = Endpoints{} }
+func (*Endpoints) ProtoMessage() {}
+func (*Endpoints) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{36} }
+
+func (m *EndpointsList) Reset() { *m = EndpointsList{} }
+func (*EndpointsList) ProtoMessage() {}
+func (*EndpointsList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{37} }
+
+func (m *EnvFromSource) Reset() { *m = EnvFromSource{} }
+func (*EnvFromSource) ProtoMessage() {}
+func (*EnvFromSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{38} }
+
+func (m *EnvVar) Reset() { *m = EnvVar{} }
+func (*EnvVar) ProtoMessage() {}
+func (*EnvVar) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{39} }
+
+func (m *EnvVarSource) Reset() { *m = EnvVarSource{} }
+func (*EnvVarSource) ProtoMessage() {}
+func (*EnvVarSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{40} }
+
+func (m *Event) Reset() { *m = Event{} }
+func (*Event) ProtoMessage() {}
+func (*Event) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{41} }
+
+func (m *EventList) Reset() { *m = EventList{} }
+func (*EventList) ProtoMessage() {}
+func (*EventList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{42} }
+
+func (m *EventSource) Reset() { *m = EventSource{} }
+func (*EventSource) ProtoMessage() {}
+func (*EventSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{43} }
+
+func (m *ExecAction) Reset() { *m = ExecAction{} }
+func (*ExecAction) ProtoMessage() {}
+func (*ExecAction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{44} }
+
+func (m *FCVolumeSource) Reset() { *m = FCVolumeSource{} }
+func (*FCVolumeSource) ProtoMessage() {}
+func (*FCVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{45} }
+
+func (m *FlexVolumeSource) Reset() { *m = FlexVolumeSource{} }
+func (*FlexVolumeSource) ProtoMessage() {}
+func (*FlexVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{46} }
+
+func (m *FlockerVolumeSource) Reset() { *m = FlockerVolumeSource{} }
+func (*FlockerVolumeSource) ProtoMessage() {}
+func (*FlockerVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{47} }
+
+func (m *GCEPersistentDiskVolumeSource) Reset() { *m = GCEPersistentDiskVolumeSource{} }
+func (*GCEPersistentDiskVolumeSource) ProtoMessage() {}
+func (*GCEPersistentDiskVolumeSource) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{48}
+}
+
+func (m *GitRepoVolumeSource) Reset() { *m = GitRepoVolumeSource{} }
+func (*GitRepoVolumeSource) ProtoMessage() {}
+func (*GitRepoVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{49} }
+
+func (m *GlusterfsVolumeSource) Reset() { *m = GlusterfsVolumeSource{} }
+func (*GlusterfsVolumeSource) ProtoMessage() {}
+func (*GlusterfsVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{50} }
+
+func (m *HTTPGetAction) Reset() { *m = HTTPGetAction{} }
+func (*HTTPGetAction) ProtoMessage() {}
+func (*HTTPGetAction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{51} }
+
+func (m *HTTPHeader) Reset() { *m = HTTPHeader{} }
+func (*HTTPHeader) ProtoMessage() {}
+func (*HTTPHeader) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{52} }
+
+func (m *Handler) Reset() { *m = Handler{} }
+func (*Handler) ProtoMessage() {}
+func (*Handler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{53} }
+
+func (m *HostAlias) Reset() { *m = HostAlias{} }
+func (*HostAlias) ProtoMessage() {}
+func (*HostAlias) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{54} }
+
+func (m *HostPathVolumeSource) Reset() { *m = HostPathVolumeSource{} }
+func (*HostPathVolumeSource) ProtoMessage() {}
+func (*HostPathVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{55} }
+
+func (m *ISCSIVolumeSource) Reset() { *m = ISCSIVolumeSource{} }
+func (*ISCSIVolumeSource) ProtoMessage() {}
+func (*ISCSIVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{56} }
+
+func (m *KeyToPath) Reset() { *m = KeyToPath{} }
+func (*KeyToPath) ProtoMessage() {}
+func (*KeyToPath) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{57} }
+
+func (m *Lifecycle) Reset() { *m = Lifecycle{} }
+func (*Lifecycle) ProtoMessage() {}
+func (*Lifecycle) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{58} }
+
+func (m *LimitRange) Reset() { *m = LimitRange{} }
+func (*LimitRange) ProtoMessage() {}
+func (*LimitRange) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{59} }
+
+func (m *LimitRangeItem) Reset() { *m = LimitRangeItem{} }
+func (*LimitRangeItem) ProtoMessage() {}
+func (*LimitRangeItem) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{60} }
+
+func (m *LimitRangeList) Reset() { *m = LimitRangeList{} }
+func (*LimitRangeList) ProtoMessage() {}
+func (*LimitRangeList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{61} }
+
+func (m *LimitRangeSpec) Reset() { *m = LimitRangeSpec{} }
+func (*LimitRangeSpec) ProtoMessage() {}
+func (*LimitRangeSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{62} }
+
+func (m *List) Reset() { *m = List{} }
+func (*List) ProtoMessage() {}
+func (*List) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{63} }
+
+func (m *ListOptions) Reset() { *m = ListOptions{} }
+func (*ListOptions) ProtoMessage() {}
+func (*ListOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{64} }
+
+func (m *LoadBalancerIngress) Reset() { *m = LoadBalancerIngress{} }
+func (*LoadBalancerIngress) ProtoMessage() {}
+func (*LoadBalancerIngress) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{65} }
+
+func (m *LoadBalancerStatus) Reset() { *m = LoadBalancerStatus{} }
+func (*LoadBalancerStatus) ProtoMessage() {}
+func (*LoadBalancerStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{66} }
+
+func (m *LocalObjectReference) Reset() { *m = LocalObjectReference{} }
+func (*LocalObjectReference) ProtoMessage() {}
+func (*LocalObjectReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{67} }
+
+func (m *LocalVolumeSource) Reset() { *m = LocalVolumeSource{} }
+func (*LocalVolumeSource) ProtoMessage() {}
+func (*LocalVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{68} }
+
+func (m *NFSVolumeSource) Reset() { *m = NFSVolumeSource{} }
+func (*NFSVolumeSource) ProtoMessage() {}
+func (*NFSVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{69} }
+
+func (m *Namespace) Reset() { *m = Namespace{} }
+func (*Namespace) ProtoMessage() {}
+func (*Namespace) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{70} }
+
+func (m *NamespaceList) Reset() { *m = NamespaceList{} }
+func (*NamespaceList) ProtoMessage() {}
+func (*NamespaceList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{71} }
+
+func (m *NamespaceSpec) Reset() { *m = NamespaceSpec{} }
+func (*NamespaceSpec) ProtoMessage() {}
+func (*NamespaceSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{72} }
+
+func (m *NamespaceStatus) Reset() { *m = NamespaceStatus{} }
+func (*NamespaceStatus) ProtoMessage() {}
+func (*NamespaceStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{73} }
+
+func (m *Node) Reset() { *m = Node{} }
+func (*Node) ProtoMessage() {}
+func (*Node) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{74} }
+
+func (m *NodeAddress) Reset() { *m = NodeAddress{} }
+func (*NodeAddress) ProtoMessage() {}
+func (*NodeAddress) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{75} }
+
+func (m *NodeAffinity) Reset() { *m = NodeAffinity{} }
+func (*NodeAffinity) ProtoMessage() {}
+func (*NodeAffinity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{76} }
+
+func (m *NodeCondition) Reset() { *m = NodeCondition{} }
+func (*NodeCondition) ProtoMessage() {}
+func (*NodeCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{77} }
+
+func (m *NodeDaemonEndpoints) Reset() { *m = NodeDaemonEndpoints{} }
+func (*NodeDaemonEndpoints) ProtoMessage() {}
+func (*NodeDaemonEndpoints) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{78} }
+
+func (m *NodeList) Reset() { *m = NodeList{} }
+func (*NodeList) ProtoMessage() {}
+func (*NodeList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{79} }
+
+func (m *NodeProxyOptions) Reset() { *m = NodeProxyOptions{} }
+func (*NodeProxyOptions) ProtoMessage() {}
+func (*NodeProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{80} }
+
+func (m *NodeResources) Reset() { *m = NodeResources{} }
+func (*NodeResources) ProtoMessage() {}
+func (*NodeResources) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{81} }
+
+func (m *NodeSelector) Reset() { *m = NodeSelector{} }
+func (*NodeSelector) ProtoMessage() {}
+func (*NodeSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{82} }
+
+func (m *NodeSelectorRequirement) Reset() { *m = NodeSelectorRequirement{} }
+func (*NodeSelectorRequirement) ProtoMessage() {}
+func (*NodeSelectorRequirement) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{83}
+}
+
+func (m *NodeSelectorTerm) Reset() { *m = NodeSelectorTerm{} }
+func (*NodeSelectorTerm) ProtoMessage() {}
+func (*NodeSelectorTerm) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{84} }
+
+func (m *NodeSpec) Reset() { *m = NodeSpec{} }
+func (*NodeSpec) ProtoMessage() {}
+func (*NodeSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{85} }
+
+func (m *NodeStatus) Reset() { *m = NodeStatus{} }
+func (*NodeStatus) ProtoMessage() {}
+func (*NodeStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{86} }
+
+func (m *NodeSystemInfo) Reset() { *m = NodeSystemInfo{} }
+func (*NodeSystemInfo) ProtoMessage() {}
+func (*NodeSystemInfo) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{87} }
+
+func (m *ObjectFieldSelector) Reset() { *m = ObjectFieldSelector{} }
+func (*ObjectFieldSelector) ProtoMessage() {}
+func (*ObjectFieldSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{88} }
+
+func (m *ObjectMeta) Reset() { *m = ObjectMeta{} }
+func (*ObjectMeta) ProtoMessage() {}
+func (*ObjectMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{89} }
+
+func (m *ObjectReference) Reset() { *m = ObjectReference{} }
+func (*ObjectReference) ProtoMessage() {}
+func (*ObjectReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{90} }
+
+func (m *PersistentVolume) Reset() { *m = PersistentVolume{} }
+func (*PersistentVolume) ProtoMessage() {}
+func (*PersistentVolume) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{91} }
+
+func (m *PersistentVolumeClaim) Reset() { *m = PersistentVolumeClaim{} }
+func (*PersistentVolumeClaim) ProtoMessage() {}
+func (*PersistentVolumeClaim) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{92} }
+
+func (m *PersistentVolumeClaimList) Reset() { *m = PersistentVolumeClaimList{} }
+func (*PersistentVolumeClaimList) ProtoMessage() {}
+func (*PersistentVolumeClaimList) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{93}
+}
+
+func (m *PersistentVolumeClaimSpec) Reset() { *m = PersistentVolumeClaimSpec{} }
+func (*PersistentVolumeClaimSpec) ProtoMessage() {}
+func (*PersistentVolumeClaimSpec) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{94}
+}
+
+func (m *PersistentVolumeClaimStatus) Reset() { *m = PersistentVolumeClaimStatus{} }
+func (*PersistentVolumeClaimStatus) ProtoMessage() {}
+func (*PersistentVolumeClaimStatus) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{95}
+}
+
+func (m *PersistentVolumeClaimVolumeSource) Reset() { *m = PersistentVolumeClaimVolumeSource{} }
+func (*PersistentVolumeClaimVolumeSource) ProtoMessage() {}
+func (*PersistentVolumeClaimVolumeSource) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{96}
+}
+
+func (m *PersistentVolumeList) Reset() { *m = PersistentVolumeList{} }
+func (*PersistentVolumeList) ProtoMessage() {}
+func (*PersistentVolumeList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{97} }
+
+func (m *PersistentVolumeSource) Reset() { *m = PersistentVolumeSource{} }
+func (*PersistentVolumeSource) ProtoMessage() {}
+func (*PersistentVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{98} }
+
+func (m *PersistentVolumeSpec) Reset() { *m = PersistentVolumeSpec{} }
+func (*PersistentVolumeSpec) ProtoMessage() {}
+func (*PersistentVolumeSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{99} }
+
+func (m *PersistentVolumeStatus) Reset() { *m = PersistentVolumeStatus{} }
+func (*PersistentVolumeStatus) ProtoMessage() {}
+func (*PersistentVolumeStatus) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{100}
+}
+
+func (m *PhotonPersistentDiskVolumeSource) Reset() { *m = PhotonPersistentDiskVolumeSource{} }
+func (*PhotonPersistentDiskVolumeSource) ProtoMessage() {}
+func (*PhotonPersistentDiskVolumeSource) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{101}
+}
+
+func (m *Pod) Reset() { *m = Pod{} }
+func (*Pod) ProtoMessage() {}
+func (*Pod) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{102} }
+
+func (m *PodAffinity) Reset() { *m = PodAffinity{} }
+func (*PodAffinity) ProtoMessage() {}
+func (*PodAffinity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{103} }
+
+func (m *PodAffinityTerm) Reset() { *m = PodAffinityTerm{} }
+func (*PodAffinityTerm) ProtoMessage() {}
+func (*PodAffinityTerm) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{104} }
+
+func (m *PodAntiAffinity) Reset() { *m = PodAntiAffinity{} }
+func (*PodAntiAffinity) ProtoMessage() {}
+func (*PodAntiAffinity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{105} }
+
+func (m *PodAttachOptions) Reset() { *m = PodAttachOptions{} }
+func (*PodAttachOptions) ProtoMessage() {}
+func (*PodAttachOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{106} }
+
+func (m *PodCondition) Reset() { *m = PodCondition{} }
+func (*PodCondition) ProtoMessage() {}
+func (*PodCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{107} }
+
+func (m *PodExecOptions) Reset() { *m = PodExecOptions{} }
+func (*PodExecOptions) ProtoMessage() {}
+func (*PodExecOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{108} }
+
+func (m *PodList) Reset() { *m = PodList{} }
+func (*PodList) ProtoMessage() {}
+func (*PodList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{109} }
+
+func (m *PodLogOptions) Reset() { *m = PodLogOptions{} }
+func (*PodLogOptions) ProtoMessage() {}
+func (*PodLogOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{110} }
+
+func (m *PodPortForwardOptions) Reset() { *m = PodPortForwardOptions{} }
+func (*PodPortForwardOptions) ProtoMessage() {}
+func (*PodPortForwardOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{111} }
+
+func (m *PodProxyOptions) Reset() { *m = PodProxyOptions{} }
+func (*PodProxyOptions) ProtoMessage() {}
+func (*PodProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{112} }
+
+func (m *PodSecurityContext) Reset() { *m = PodSecurityContext{} }
+func (*PodSecurityContext) ProtoMessage() {}
+func (*PodSecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{113} }
+
+func (m *PodSignature) Reset() { *m = PodSignature{} }
+func (*PodSignature) ProtoMessage() {}
+func (*PodSignature) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{114} }
+
+func (m *PodSpec) Reset() { *m = PodSpec{} }
+func (*PodSpec) ProtoMessage() {}
+func (*PodSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{115} }
+
+func (m *PodStatus) Reset() { *m = PodStatus{} }
+func (*PodStatus) ProtoMessage() {}
+func (*PodStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{116} }
+
+func (m *PodStatusResult) Reset() { *m = PodStatusResult{} }
+func (*PodStatusResult) ProtoMessage() {}
+func (*PodStatusResult) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{117} }
+
+func (m *PodTemplate) Reset() { *m = PodTemplate{} }
+func (*PodTemplate) ProtoMessage() {}
+func (*PodTemplate) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{118} }
+
+func (m *PodTemplateList) Reset() { *m = PodTemplateList{} }
+func (*PodTemplateList) ProtoMessage() {}
+func (*PodTemplateList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{119} }
+
+func (m *PodTemplateSpec) Reset() { *m = PodTemplateSpec{} }
+func (*PodTemplateSpec) ProtoMessage() {}
+func (*PodTemplateSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{120} }
+
+func (m *PortworxVolumeSource) Reset() { *m = PortworxVolumeSource{} }
+func (*PortworxVolumeSource) ProtoMessage() {}
+func (*PortworxVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{121} }
+
+func (m *Preconditions) Reset() { *m = Preconditions{} }
+func (*Preconditions) ProtoMessage() {}
+func (*Preconditions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{122} }
+
+func (m *PreferAvoidPodsEntry) Reset() { *m = PreferAvoidPodsEntry{} }
+func (*PreferAvoidPodsEntry) ProtoMessage() {}
+func (*PreferAvoidPodsEntry) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{123} }
+
+func (m *PreferredSchedulingTerm) Reset() { *m = PreferredSchedulingTerm{} }
+func (*PreferredSchedulingTerm) ProtoMessage() {}
+func (*PreferredSchedulingTerm) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{124}
+}
+
+func (m *Probe) Reset() { *m = Probe{} }
+func (*Probe) ProtoMessage() {}
+func (*Probe) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{125} }
+
+func (m *ProjectedVolumeSource) Reset() { *m = ProjectedVolumeSource{} }
+func (*ProjectedVolumeSource) ProtoMessage() {}
+func (*ProjectedVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{126} }
+
+func (m *QuobyteVolumeSource) Reset() { *m = QuobyteVolumeSource{} }
+func (*QuobyteVolumeSource) ProtoMessage() {}
+func (*QuobyteVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{127} }
+
+func (m *RBDVolumeSource) Reset() { *m = RBDVolumeSource{} }
+func (*RBDVolumeSource) ProtoMessage() {}
+func (*RBDVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{128} }
+
+func (m *RangeAllocation) Reset() { *m = RangeAllocation{} }
+func (*RangeAllocation) ProtoMessage() {}
+func (*RangeAllocation) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{129} }
+
+func (m *ReplicationController) Reset() { *m = ReplicationController{} }
+func (*ReplicationController) ProtoMessage() {}
+func (*ReplicationController) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{130} }
+
+func (m *ReplicationControllerCondition) Reset() { *m = ReplicationControllerCondition{} }
+func (*ReplicationControllerCondition) ProtoMessage() {}
+func (*ReplicationControllerCondition) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{131}
+}
+
+func (m *ReplicationControllerList) Reset() { *m = ReplicationControllerList{} }
+func (*ReplicationControllerList) ProtoMessage() {}
+func (*ReplicationControllerList) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{132}
+}
+
+func (m *ReplicationControllerSpec) Reset() { *m = ReplicationControllerSpec{} }
+func (*ReplicationControllerSpec) ProtoMessage() {}
+func (*ReplicationControllerSpec) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{133}
+}
+
+func (m *ReplicationControllerStatus) Reset() { *m = ReplicationControllerStatus{} }
+func (*ReplicationControllerStatus) ProtoMessage() {}
+func (*ReplicationControllerStatus) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{134}
+}
+
+func (m *ResourceFieldSelector) Reset() { *m = ResourceFieldSelector{} }
+func (*ResourceFieldSelector) ProtoMessage() {}
+func (*ResourceFieldSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{135} }
+
+func (m *ResourceQuota) Reset() { *m = ResourceQuota{} }
+func (*ResourceQuota) ProtoMessage() {}
+func (*ResourceQuota) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{136} }
+
+func (m *ResourceQuotaList) Reset() { *m = ResourceQuotaList{} }
+func (*ResourceQuotaList) ProtoMessage() {}
+func (*ResourceQuotaList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{137} }
+
+func (m *ResourceQuotaSpec) Reset() { *m = ResourceQuotaSpec{} }
+func (*ResourceQuotaSpec) ProtoMessage() {}
+func (*ResourceQuotaSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{138} }
+
+func (m *ResourceQuotaStatus) Reset() { *m = ResourceQuotaStatus{} }
+func (*ResourceQuotaStatus) ProtoMessage() {}
+func (*ResourceQuotaStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{139} }
+
+func (m *ResourceRequirements) Reset() { *m = ResourceRequirements{} }
+func (*ResourceRequirements) ProtoMessage() {}
+func (*ResourceRequirements) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{140} }
+
+func (m *SELinuxOptions) Reset() { *m = SELinuxOptions{} }
+func (*SELinuxOptions) ProtoMessage() {}
+func (*SELinuxOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{141} }
+
+func (m *ScaleIOVolumeSource) Reset() { *m = ScaleIOVolumeSource{} }
+func (*ScaleIOVolumeSource) ProtoMessage() {}
+func (*ScaleIOVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{142} }
+
+func (m *Secret) Reset() { *m = Secret{} }
+func (*Secret) ProtoMessage() {}
+func (*Secret) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{143} }
+
+func (m *SecretEnvSource) Reset() { *m = SecretEnvSource{} }
+func (*SecretEnvSource) ProtoMessage() {}
+func (*SecretEnvSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{144} }
+
+func (m *SecretKeySelector) Reset() { *m = SecretKeySelector{} }
+func (*SecretKeySelector) ProtoMessage() {}
+func (*SecretKeySelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{145} }
+
+func (m *SecretList) Reset() { *m = SecretList{} }
+func (*SecretList) ProtoMessage() {}
+func (*SecretList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{146} }
+
+func (m *SecretProjection) Reset() { *m = SecretProjection{} }
+func (*SecretProjection) ProtoMessage() {}
+func (*SecretProjection) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{147} }
+
+func (m *SecretVolumeSource) Reset() { *m = SecretVolumeSource{} }
+func (*SecretVolumeSource) ProtoMessage() {}
+func (*SecretVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{148} }
+
+func (m *SecurityContext) Reset() { *m = SecurityContext{} }
+func (*SecurityContext) ProtoMessage() {}
+func (*SecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{149} }
+
+func (m *SerializedReference) Reset() { *m = SerializedReference{} }
+func (*SerializedReference) ProtoMessage() {}
+func (*SerializedReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{150} }
+
+func (m *Service) Reset() { *m = Service{} }
+func (*Service) ProtoMessage() {}
+func (*Service) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{151} }
+
+func (m *ServiceAccount) Reset() { *m = ServiceAccount{} }
+func (*ServiceAccount) ProtoMessage() {}
+func (*ServiceAccount) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{152} }
+
+func (m *ServiceAccountList) Reset() { *m = ServiceAccountList{} }
+func (*ServiceAccountList) ProtoMessage() {}
+func (*ServiceAccountList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{153} }
+
+func (m *ServiceList) Reset() { *m = ServiceList{} }
+func (*ServiceList) ProtoMessage() {}
+func (*ServiceList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{154} }
+
+func (m *ServicePort) Reset() { *m = ServicePort{} }
+func (*ServicePort) ProtoMessage() {}
+func (*ServicePort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{155} }
+
+func (m *ServiceProxyOptions) Reset() { *m = ServiceProxyOptions{} }
+func (*ServiceProxyOptions) ProtoMessage() {}
+func (*ServiceProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{156} }
+
+func (m *ServiceSpec) Reset() { *m = ServiceSpec{} }
+func (*ServiceSpec) ProtoMessage() {}
+func (*ServiceSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{157} }
+
+func (m *ServiceStatus) Reset() { *m = ServiceStatus{} }
+func (*ServiceStatus) ProtoMessage() {}
+func (*ServiceStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{158} }
+
+func (m *StorageOSPersistentVolumeSource) Reset() { *m = StorageOSPersistentVolumeSource{} }
+func (*StorageOSPersistentVolumeSource) ProtoMessage() {}
+func (*StorageOSPersistentVolumeSource) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{159}
+}
+
+func (m *StorageOSVolumeSource) Reset() { *m = StorageOSVolumeSource{} }
+func (*StorageOSVolumeSource) ProtoMessage() {}
+func (*StorageOSVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{160} }
+
+func (m *Sysctl) Reset() { *m = Sysctl{} }
+func (*Sysctl) ProtoMessage() {}
+func (*Sysctl) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{161} }
+
+func (m *TCPSocketAction) Reset() { *m = TCPSocketAction{} }
+func (*TCPSocketAction) ProtoMessage() {}
+func (*TCPSocketAction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{162} }
+
+func (m *Taint) Reset() { *m = Taint{} }
+func (*Taint) ProtoMessage() {}
+func (*Taint) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{163} }
+
+func (m *Toleration) Reset() { *m = Toleration{} }
+func (*Toleration) ProtoMessage() {}
+func (*Toleration) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{164} }
+
+func (m *Volume) Reset() { *m = Volume{} }
+func (*Volume) ProtoMessage() {}
+func (*Volume) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{165} }
+
+func (m *VolumeMount) Reset() { *m = VolumeMount{} }
+func (*VolumeMount) ProtoMessage() {}
+func (*VolumeMount) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{166} }
+
+func (m *VolumeProjection) Reset() { *m = VolumeProjection{} }
+func (*VolumeProjection) ProtoMessage() {}
+func (*VolumeProjection) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{167} }
+
+func (m *VolumeSource) Reset() { *m = VolumeSource{} }
+func (*VolumeSource) ProtoMessage() {}
+func (*VolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{168} }
+
+func (m *VsphereVirtualDiskVolumeSource) Reset() { *m = VsphereVirtualDiskVolumeSource{} }
+func (*VsphereVirtualDiskVolumeSource) ProtoMessage() {}
+func (*VsphereVirtualDiskVolumeSource) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{169}
+}
+
+func (m *WeightedPodAffinityTerm) Reset() { *m = WeightedPodAffinityTerm{} }
+func (*WeightedPodAffinityTerm) ProtoMessage() {}
+func (*WeightedPodAffinityTerm) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{170}
+}
+
+func init() {
+ proto.RegisterType((*AWSElasticBlockStoreVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.AWSElasticBlockStoreVolumeSource")
+ proto.RegisterType((*Affinity)(nil), "k8s.io.kubernetes.pkg.api.v1.Affinity")
+ proto.RegisterType((*AttachedVolume)(nil), "k8s.io.kubernetes.pkg.api.v1.AttachedVolume")
+ proto.RegisterType((*AvoidPods)(nil), "k8s.io.kubernetes.pkg.api.v1.AvoidPods")
+ proto.RegisterType((*AzureDiskVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.AzureDiskVolumeSource")
+ proto.RegisterType((*AzureFileVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.AzureFileVolumeSource")
+ proto.RegisterType((*Binding)(nil), "k8s.io.kubernetes.pkg.api.v1.Binding")
+ proto.RegisterType((*Capabilities)(nil), "k8s.io.kubernetes.pkg.api.v1.Capabilities")
+ proto.RegisterType((*CephFSVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.CephFSVolumeSource")
+ proto.RegisterType((*CinderVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.CinderVolumeSource")
+ proto.RegisterType((*ComponentCondition)(nil), "k8s.io.kubernetes.pkg.api.v1.ComponentCondition")
+ proto.RegisterType((*ComponentStatus)(nil), "k8s.io.kubernetes.pkg.api.v1.ComponentStatus")
+ proto.RegisterType((*ComponentStatusList)(nil), "k8s.io.kubernetes.pkg.api.v1.ComponentStatusList")
+ proto.RegisterType((*ConfigMap)(nil), "k8s.io.kubernetes.pkg.api.v1.ConfigMap")
+ proto.RegisterType((*ConfigMapEnvSource)(nil), "k8s.io.kubernetes.pkg.api.v1.ConfigMapEnvSource")
+ proto.RegisterType((*ConfigMapKeySelector)(nil), "k8s.io.kubernetes.pkg.api.v1.ConfigMapKeySelector")
+ proto.RegisterType((*ConfigMapList)(nil), "k8s.io.kubernetes.pkg.api.v1.ConfigMapList")
+ proto.RegisterType((*ConfigMapProjection)(nil), "k8s.io.kubernetes.pkg.api.v1.ConfigMapProjection")
+ proto.RegisterType((*ConfigMapVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.ConfigMapVolumeSource")
+ proto.RegisterType((*Container)(nil), "k8s.io.kubernetes.pkg.api.v1.Container")
+ proto.RegisterType((*ContainerImage)(nil), "k8s.io.kubernetes.pkg.api.v1.ContainerImage")
+ proto.RegisterType((*ContainerPort)(nil), "k8s.io.kubernetes.pkg.api.v1.ContainerPort")
+ proto.RegisterType((*ContainerState)(nil), "k8s.io.kubernetes.pkg.api.v1.ContainerState")
+ proto.RegisterType((*ContainerStateRunning)(nil), "k8s.io.kubernetes.pkg.api.v1.ContainerStateRunning")
+ proto.RegisterType((*ContainerStateTerminated)(nil), "k8s.io.kubernetes.pkg.api.v1.ContainerStateTerminated")
+ proto.RegisterType((*ContainerStateWaiting)(nil), "k8s.io.kubernetes.pkg.api.v1.ContainerStateWaiting")
+ proto.RegisterType((*ContainerStatus)(nil), "k8s.io.kubernetes.pkg.api.v1.ContainerStatus")
+ proto.RegisterType((*DaemonEndpoint)(nil), "k8s.io.kubernetes.pkg.api.v1.DaemonEndpoint")
+ proto.RegisterType((*DeleteOptions)(nil), "k8s.io.kubernetes.pkg.api.v1.DeleteOptions")
+ proto.RegisterType((*DownwardAPIProjection)(nil), "k8s.io.kubernetes.pkg.api.v1.DownwardAPIProjection")
+ proto.RegisterType((*DownwardAPIVolumeFile)(nil), "k8s.io.kubernetes.pkg.api.v1.DownwardAPIVolumeFile")
+ proto.RegisterType((*DownwardAPIVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.DownwardAPIVolumeSource")
+ proto.RegisterType((*EmptyDirVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.EmptyDirVolumeSource")
+ proto.RegisterType((*EndpointAddress)(nil), "k8s.io.kubernetes.pkg.api.v1.EndpointAddress")
+ proto.RegisterType((*EndpointPort)(nil), "k8s.io.kubernetes.pkg.api.v1.EndpointPort")
+ proto.RegisterType((*EndpointSubset)(nil), "k8s.io.kubernetes.pkg.api.v1.EndpointSubset")
+ proto.RegisterType((*Endpoints)(nil), "k8s.io.kubernetes.pkg.api.v1.Endpoints")
+ proto.RegisterType((*EndpointsList)(nil), "k8s.io.kubernetes.pkg.api.v1.EndpointsList")
+ proto.RegisterType((*EnvFromSource)(nil), "k8s.io.kubernetes.pkg.api.v1.EnvFromSource")
+ proto.RegisterType((*EnvVar)(nil), "k8s.io.kubernetes.pkg.api.v1.EnvVar")
+ proto.RegisterType((*EnvVarSource)(nil), "k8s.io.kubernetes.pkg.api.v1.EnvVarSource")
+ proto.RegisterType((*Event)(nil), "k8s.io.kubernetes.pkg.api.v1.Event")
+ proto.RegisterType((*EventList)(nil), "k8s.io.kubernetes.pkg.api.v1.EventList")
+ proto.RegisterType((*EventSource)(nil), "k8s.io.kubernetes.pkg.api.v1.EventSource")
+ proto.RegisterType((*ExecAction)(nil), "k8s.io.kubernetes.pkg.api.v1.ExecAction")
+ proto.RegisterType((*FCVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.FCVolumeSource")
+ proto.RegisterType((*FlexVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.FlexVolumeSource")
+ proto.RegisterType((*FlockerVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.FlockerVolumeSource")
+ proto.RegisterType((*GCEPersistentDiskVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.GCEPersistentDiskVolumeSource")
+ proto.RegisterType((*GitRepoVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.GitRepoVolumeSource")
+ proto.RegisterType((*GlusterfsVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.GlusterfsVolumeSource")
+ proto.RegisterType((*HTTPGetAction)(nil), "k8s.io.kubernetes.pkg.api.v1.HTTPGetAction")
+ proto.RegisterType((*HTTPHeader)(nil), "k8s.io.kubernetes.pkg.api.v1.HTTPHeader")
+ proto.RegisterType((*Handler)(nil), "k8s.io.kubernetes.pkg.api.v1.Handler")
+ proto.RegisterType((*HostAlias)(nil), "k8s.io.kubernetes.pkg.api.v1.HostAlias")
+ proto.RegisterType((*HostPathVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.HostPathVolumeSource")
+ proto.RegisterType((*ISCSIVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.ISCSIVolumeSource")
+ proto.RegisterType((*KeyToPath)(nil), "k8s.io.kubernetes.pkg.api.v1.KeyToPath")
+ proto.RegisterType((*Lifecycle)(nil), "k8s.io.kubernetes.pkg.api.v1.Lifecycle")
+ proto.RegisterType((*LimitRange)(nil), "k8s.io.kubernetes.pkg.api.v1.LimitRange")
+ proto.RegisterType((*LimitRangeItem)(nil), "k8s.io.kubernetes.pkg.api.v1.LimitRangeItem")
+ proto.RegisterType((*LimitRangeList)(nil), "k8s.io.kubernetes.pkg.api.v1.LimitRangeList")
+ proto.RegisterType((*LimitRangeSpec)(nil), "k8s.io.kubernetes.pkg.api.v1.LimitRangeSpec")
+ proto.RegisterType((*List)(nil), "k8s.io.kubernetes.pkg.api.v1.List")
+ proto.RegisterType((*ListOptions)(nil), "k8s.io.kubernetes.pkg.api.v1.ListOptions")
+ proto.RegisterType((*LoadBalancerIngress)(nil), "k8s.io.kubernetes.pkg.api.v1.LoadBalancerIngress")
+ proto.RegisterType((*LoadBalancerStatus)(nil), "k8s.io.kubernetes.pkg.api.v1.LoadBalancerStatus")
+ proto.RegisterType((*LocalObjectReference)(nil), "k8s.io.kubernetes.pkg.api.v1.LocalObjectReference")
+ proto.RegisterType((*LocalVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.LocalVolumeSource")
+ proto.RegisterType((*NFSVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.NFSVolumeSource")
+ proto.RegisterType((*Namespace)(nil), "k8s.io.kubernetes.pkg.api.v1.Namespace")
+ proto.RegisterType((*NamespaceList)(nil), "k8s.io.kubernetes.pkg.api.v1.NamespaceList")
+ proto.RegisterType((*NamespaceSpec)(nil), "k8s.io.kubernetes.pkg.api.v1.NamespaceSpec")
+ proto.RegisterType((*NamespaceStatus)(nil), "k8s.io.kubernetes.pkg.api.v1.NamespaceStatus")
+ proto.RegisterType((*Node)(nil), "k8s.io.kubernetes.pkg.api.v1.Node")
+ proto.RegisterType((*NodeAddress)(nil), "k8s.io.kubernetes.pkg.api.v1.NodeAddress")
+ proto.RegisterType((*NodeAffinity)(nil), "k8s.io.kubernetes.pkg.api.v1.NodeAffinity")
+ proto.RegisterType((*NodeCondition)(nil), "k8s.io.kubernetes.pkg.api.v1.NodeCondition")
+ proto.RegisterType((*NodeDaemonEndpoints)(nil), "k8s.io.kubernetes.pkg.api.v1.NodeDaemonEndpoints")
+ proto.RegisterType((*NodeList)(nil), "k8s.io.kubernetes.pkg.api.v1.NodeList")
+ proto.RegisterType((*NodeProxyOptions)(nil), "k8s.io.kubernetes.pkg.api.v1.NodeProxyOptions")
+ proto.RegisterType((*NodeResources)(nil), "k8s.io.kubernetes.pkg.api.v1.NodeResources")
+ proto.RegisterType((*NodeSelector)(nil), "k8s.io.kubernetes.pkg.api.v1.NodeSelector")
+ proto.RegisterType((*NodeSelectorRequirement)(nil), "k8s.io.kubernetes.pkg.api.v1.NodeSelectorRequirement")
+ proto.RegisterType((*NodeSelectorTerm)(nil), "k8s.io.kubernetes.pkg.api.v1.NodeSelectorTerm")
+ proto.RegisterType((*NodeSpec)(nil), "k8s.io.kubernetes.pkg.api.v1.NodeSpec")
+ proto.RegisterType((*NodeStatus)(nil), "k8s.io.kubernetes.pkg.api.v1.NodeStatus")
+ proto.RegisterType((*NodeSystemInfo)(nil), "k8s.io.kubernetes.pkg.api.v1.NodeSystemInfo")
+ proto.RegisterType((*ObjectFieldSelector)(nil), "k8s.io.kubernetes.pkg.api.v1.ObjectFieldSelector")
+ proto.RegisterType((*ObjectMeta)(nil), "k8s.io.kubernetes.pkg.api.v1.ObjectMeta")
+ proto.RegisterType((*ObjectReference)(nil), "k8s.io.kubernetes.pkg.api.v1.ObjectReference")
+ proto.RegisterType((*PersistentVolume)(nil), "k8s.io.kubernetes.pkg.api.v1.PersistentVolume")
+ proto.RegisterType((*PersistentVolumeClaim)(nil), "k8s.io.kubernetes.pkg.api.v1.PersistentVolumeClaim")
+ proto.RegisterType((*PersistentVolumeClaimList)(nil), "k8s.io.kubernetes.pkg.api.v1.PersistentVolumeClaimList")
+ proto.RegisterType((*PersistentVolumeClaimSpec)(nil), "k8s.io.kubernetes.pkg.api.v1.PersistentVolumeClaimSpec")
+ proto.RegisterType((*PersistentVolumeClaimStatus)(nil), "k8s.io.kubernetes.pkg.api.v1.PersistentVolumeClaimStatus")
+ proto.RegisterType((*PersistentVolumeClaimVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.PersistentVolumeClaimVolumeSource")
+ proto.RegisterType((*PersistentVolumeList)(nil), "k8s.io.kubernetes.pkg.api.v1.PersistentVolumeList")
+ proto.RegisterType((*PersistentVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.PersistentVolumeSource")
+ proto.RegisterType((*PersistentVolumeSpec)(nil), "k8s.io.kubernetes.pkg.api.v1.PersistentVolumeSpec")
+ proto.RegisterType((*PersistentVolumeStatus)(nil), "k8s.io.kubernetes.pkg.api.v1.PersistentVolumeStatus")
+ proto.RegisterType((*PhotonPersistentDiskVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.PhotonPersistentDiskVolumeSource")
+ proto.RegisterType((*Pod)(nil), "k8s.io.kubernetes.pkg.api.v1.Pod")
+ proto.RegisterType((*PodAffinity)(nil), "k8s.io.kubernetes.pkg.api.v1.PodAffinity")
+ proto.RegisterType((*PodAffinityTerm)(nil), "k8s.io.kubernetes.pkg.api.v1.PodAffinityTerm")
+ proto.RegisterType((*PodAntiAffinity)(nil), "k8s.io.kubernetes.pkg.api.v1.PodAntiAffinity")
+ proto.RegisterType((*PodAttachOptions)(nil), "k8s.io.kubernetes.pkg.api.v1.PodAttachOptions")
+ proto.RegisterType((*PodCondition)(nil), "k8s.io.kubernetes.pkg.api.v1.PodCondition")
+ proto.RegisterType((*PodExecOptions)(nil), "k8s.io.kubernetes.pkg.api.v1.PodExecOptions")
+ proto.RegisterType((*PodList)(nil), "k8s.io.kubernetes.pkg.api.v1.PodList")
+ proto.RegisterType((*PodLogOptions)(nil), "k8s.io.kubernetes.pkg.api.v1.PodLogOptions")
+ proto.RegisterType((*PodPortForwardOptions)(nil), "k8s.io.kubernetes.pkg.api.v1.PodPortForwardOptions")
+ proto.RegisterType((*PodProxyOptions)(nil), "k8s.io.kubernetes.pkg.api.v1.PodProxyOptions")
+ proto.RegisterType((*PodSecurityContext)(nil), "k8s.io.kubernetes.pkg.api.v1.PodSecurityContext")
+ proto.RegisterType((*PodSignature)(nil), "k8s.io.kubernetes.pkg.api.v1.PodSignature")
+ proto.RegisterType((*PodSpec)(nil), "k8s.io.kubernetes.pkg.api.v1.PodSpec")
+ proto.RegisterType((*PodStatus)(nil), "k8s.io.kubernetes.pkg.api.v1.PodStatus")
+ proto.RegisterType((*PodStatusResult)(nil), "k8s.io.kubernetes.pkg.api.v1.PodStatusResult")
+ proto.RegisterType((*PodTemplate)(nil), "k8s.io.kubernetes.pkg.api.v1.PodTemplate")
+ proto.RegisterType((*PodTemplateList)(nil), "k8s.io.kubernetes.pkg.api.v1.PodTemplateList")
+ proto.RegisterType((*PodTemplateSpec)(nil), "k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec")
+ proto.RegisterType((*PortworxVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.PortworxVolumeSource")
+ proto.RegisterType((*Preconditions)(nil), "k8s.io.kubernetes.pkg.api.v1.Preconditions")
+ proto.RegisterType((*PreferAvoidPodsEntry)(nil), "k8s.io.kubernetes.pkg.api.v1.PreferAvoidPodsEntry")
+ proto.RegisterType((*PreferredSchedulingTerm)(nil), "k8s.io.kubernetes.pkg.api.v1.PreferredSchedulingTerm")
+ proto.RegisterType((*Probe)(nil), "k8s.io.kubernetes.pkg.api.v1.Probe")
+ proto.RegisterType((*ProjectedVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.ProjectedVolumeSource")
+ proto.RegisterType((*QuobyteVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.QuobyteVolumeSource")
+ proto.RegisterType((*RBDVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.RBDVolumeSource")
+ proto.RegisterType((*RangeAllocation)(nil), "k8s.io.kubernetes.pkg.api.v1.RangeAllocation")
+ proto.RegisterType((*ReplicationController)(nil), "k8s.io.kubernetes.pkg.api.v1.ReplicationController")
+ proto.RegisterType((*ReplicationControllerCondition)(nil), "k8s.io.kubernetes.pkg.api.v1.ReplicationControllerCondition")
+ proto.RegisterType((*ReplicationControllerList)(nil), "k8s.io.kubernetes.pkg.api.v1.ReplicationControllerList")
+ proto.RegisterType((*ReplicationControllerSpec)(nil), "k8s.io.kubernetes.pkg.api.v1.ReplicationControllerSpec")
+ proto.RegisterType((*ReplicationControllerStatus)(nil), "k8s.io.kubernetes.pkg.api.v1.ReplicationControllerStatus")
+ proto.RegisterType((*ResourceFieldSelector)(nil), "k8s.io.kubernetes.pkg.api.v1.ResourceFieldSelector")
+ proto.RegisterType((*ResourceQuota)(nil), "k8s.io.kubernetes.pkg.api.v1.ResourceQuota")
+ proto.RegisterType((*ResourceQuotaList)(nil), "k8s.io.kubernetes.pkg.api.v1.ResourceQuotaList")
+ proto.RegisterType((*ResourceQuotaSpec)(nil), "k8s.io.kubernetes.pkg.api.v1.ResourceQuotaSpec")
+ proto.RegisterType((*ResourceQuotaStatus)(nil), "k8s.io.kubernetes.pkg.api.v1.ResourceQuotaStatus")
+ proto.RegisterType((*ResourceRequirements)(nil), "k8s.io.kubernetes.pkg.api.v1.ResourceRequirements")
+ proto.RegisterType((*SELinuxOptions)(nil), "k8s.io.kubernetes.pkg.api.v1.SELinuxOptions")
+ proto.RegisterType((*ScaleIOVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.ScaleIOVolumeSource")
+ proto.RegisterType((*Secret)(nil), "k8s.io.kubernetes.pkg.api.v1.Secret")
+ proto.RegisterType((*SecretEnvSource)(nil), "k8s.io.kubernetes.pkg.api.v1.SecretEnvSource")
+ proto.RegisterType((*SecretKeySelector)(nil), "k8s.io.kubernetes.pkg.api.v1.SecretKeySelector")
+ proto.RegisterType((*SecretList)(nil), "k8s.io.kubernetes.pkg.api.v1.SecretList")
+ proto.RegisterType((*SecretProjection)(nil), "k8s.io.kubernetes.pkg.api.v1.SecretProjection")
+ proto.RegisterType((*SecretVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.SecretVolumeSource")
+ proto.RegisterType((*SecurityContext)(nil), "k8s.io.kubernetes.pkg.api.v1.SecurityContext")
+ proto.RegisterType((*SerializedReference)(nil), "k8s.io.kubernetes.pkg.api.v1.SerializedReference")
+ proto.RegisterType((*Service)(nil), "k8s.io.kubernetes.pkg.api.v1.Service")
+ proto.RegisterType((*ServiceAccount)(nil), "k8s.io.kubernetes.pkg.api.v1.ServiceAccount")
+ proto.RegisterType((*ServiceAccountList)(nil), "k8s.io.kubernetes.pkg.api.v1.ServiceAccountList")
+ proto.RegisterType((*ServiceList)(nil), "k8s.io.kubernetes.pkg.api.v1.ServiceList")
+ proto.RegisterType((*ServicePort)(nil), "k8s.io.kubernetes.pkg.api.v1.ServicePort")
+ proto.RegisterType((*ServiceProxyOptions)(nil), "k8s.io.kubernetes.pkg.api.v1.ServiceProxyOptions")
+ proto.RegisterType((*ServiceSpec)(nil), "k8s.io.kubernetes.pkg.api.v1.ServiceSpec")
+ proto.RegisterType((*ServiceStatus)(nil), "k8s.io.kubernetes.pkg.api.v1.ServiceStatus")
+ proto.RegisterType((*StorageOSPersistentVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.StorageOSPersistentVolumeSource")
+ proto.RegisterType((*StorageOSVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.StorageOSVolumeSource")
+ proto.RegisterType((*Sysctl)(nil), "k8s.io.kubernetes.pkg.api.v1.Sysctl")
+ proto.RegisterType((*TCPSocketAction)(nil), "k8s.io.kubernetes.pkg.api.v1.TCPSocketAction")
+ proto.RegisterType((*Taint)(nil), "k8s.io.kubernetes.pkg.api.v1.Taint")
+ proto.RegisterType((*Toleration)(nil), "k8s.io.kubernetes.pkg.api.v1.Toleration")
+ proto.RegisterType((*Volume)(nil), "k8s.io.kubernetes.pkg.api.v1.Volume")
+ proto.RegisterType((*VolumeMount)(nil), "k8s.io.kubernetes.pkg.api.v1.VolumeMount")
+ proto.RegisterType((*VolumeProjection)(nil), "k8s.io.kubernetes.pkg.api.v1.VolumeProjection")
+ proto.RegisterType((*VolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.VolumeSource")
+ proto.RegisterType((*VsphereVirtualDiskVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.VsphereVirtualDiskVolumeSource")
+ proto.RegisterType((*WeightedPodAffinityTerm)(nil), "k8s.io.kubernetes.pkg.api.v1.WeightedPodAffinityTerm")
+}
+func (m *AWSElasticBlockStoreVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *AWSElasticBlockStoreVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.VolumeID)))
+ i += copy(dAtA[i:], m.VolumeID)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FSType)))
+ i += copy(dAtA[i:], m.FSType)
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Partition))
+ dAtA[i] = 0x20
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *Affinity) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Affinity) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.NodeAffinity != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NodeAffinity.Size()))
+ n1, err := m.NodeAffinity.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ }
+ if m.PodAffinity != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PodAffinity.Size()))
+ n2, err := m.PodAffinity.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ }
+ if m.PodAntiAffinity != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PodAntiAffinity.Size()))
+ n3, err := m.PodAntiAffinity.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ }
+ return i, nil
+}
+
+func (m *AttachedVolume) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *AttachedVolume) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.DevicePath)))
+ i += copy(dAtA[i:], m.DevicePath)
+ return i, nil
+}
+
+func (m *AvoidPods) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *AvoidPods) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.PreferAvoidPods) > 0 {
+ for _, msg := range m.PreferAvoidPods {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *AzureDiskVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *AzureDiskVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.DiskName)))
+ i += copy(dAtA[i:], m.DiskName)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.DataDiskURI)))
+ i += copy(dAtA[i:], m.DataDiskURI)
+ if m.CachingMode != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.CachingMode)))
+ i += copy(dAtA[i:], *m.CachingMode)
+ }
+ if m.FSType != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.FSType)))
+ i += copy(dAtA[i:], *m.FSType)
+ }
+ if m.ReadOnly != nil {
+ dAtA[i] = 0x28
+ i++
+ if *m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if m.Kind != nil {
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Kind)))
+ i += copy(dAtA[i:], *m.Kind)
+ }
+ return i, nil
+}
+
+func (m *AzureFileVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *AzureFileVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.SecretName)))
+ i += copy(dAtA[i:], m.SecretName)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ShareName)))
+ i += copy(dAtA[i:], m.ShareName)
+ dAtA[i] = 0x18
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *Binding) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Binding) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n4, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Target.Size()))
+ n5, err := m.Target.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ return i, nil
+}
+
+func (m *Capabilities) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Capabilities) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Add) > 0 {
+ for _, s := range m.Add {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Drop) > 0 {
+ for _, s := range m.Drop {
+ dAtA[i] = 0x12
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *CephFSVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CephFSVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Monitors) > 0 {
+ for _, s := range m.Monitors {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i += copy(dAtA[i:], m.Path)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.User)))
+ i += copy(dAtA[i:], m.User)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.SecretFile)))
+ i += copy(dAtA[i:], m.SecretFile)
+ if m.SecretRef != nil {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size()))
+ n6, err := m.SecretRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ }
+ dAtA[i] = 0x30
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *CinderVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CinderVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.VolumeID)))
+ i += copy(dAtA[i:], m.VolumeID)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FSType)))
+ i += copy(dAtA[i:], m.FSType)
+ dAtA[i] = 0x18
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *ComponentCondition) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ComponentCondition) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
+ i += copy(dAtA[i:], m.Status)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Error)))
+ i += copy(dAtA[i:], m.Error)
+ return i, nil
+}
+
+func (m *ComponentStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ComponentStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n7, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ if len(m.Conditions) > 0 {
+ for _, msg := range m.Conditions {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ComponentStatusList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ComponentStatusList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n8, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n8
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ConfigMap) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ConfigMap) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n9, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n9
+ if len(m.Data) > 0 {
+ keysForData := make([]string, 0, len(m.Data))
+ for k := range m.Data {
+ keysForData = append(keysForData, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForData)
+ for _, k := range keysForData {
+ dAtA[i] = 0x12
+ i++
+ v := m.Data[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ return i, nil
+}
+
+func (m *ConfigMapEnvSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ConfigMapEnvSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LocalObjectReference.Size()))
+ n10, err := m.LocalObjectReference.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n10
+ if m.Optional != nil {
+ dAtA[i] = 0x10
+ i++
+ if *m.Optional {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ return i, nil
+}
+
+func (m *ConfigMapKeySelector) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ConfigMapKeySelector) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LocalObjectReference.Size()))
+ n11, err := m.LocalObjectReference.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n11
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key)))
+ i += copy(dAtA[i:], m.Key)
+ if m.Optional != nil {
+ dAtA[i] = 0x18
+ i++
+ if *m.Optional {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ return i, nil
+}
+
+func (m *ConfigMapList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ConfigMapList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n12, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n12
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ConfigMapProjection) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ConfigMapProjection) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LocalObjectReference.Size()))
+ n13, err := m.LocalObjectReference.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n13
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.Optional != nil {
+ dAtA[i] = 0x20
+ i++
+ if *m.Optional {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ return i, nil
+}
+
+func (m *ConfigMapVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ConfigMapVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LocalObjectReference.Size()))
+ n14, err := m.LocalObjectReference.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n14
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.DefaultMode != nil {
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.DefaultMode))
+ }
+ if m.Optional != nil {
+ dAtA[i] = 0x20
+ i++
+ if *m.Optional {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ return i, nil
+}
+
+func (m *Container) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Container) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Image)))
+ i += copy(dAtA[i:], m.Image)
+ if len(m.Command) > 0 {
+ for _, s := range m.Command {
+ dAtA[i] = 0x1a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Args) > 0 {
+ for _, s := range m.Args {
+ dAtA[i] = 0x22
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.WorkingDir)))
+ i += copy(dAtA[i:], m.WorkingDir)
+ if len(m.Ports) > 0 {
+ for _, msg := range m.Ports {
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Env) > 0 {
+ for _, msg := range m.Env {
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Resources.Size()))
+ n15, err := m.Resources.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n15
+ if len(m.VolumeMounts) > 0 {
+ for _, msg := range m.VolumeMounts {
+ dAtA[i] = 0x4a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.LivenessProbe != nil {
+ dAtA[i] = 0x52
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LivenessProbe.Size()))
+ n16, err := m.LivenessProbe.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n16
+ }
+ if m.ReadinessProbe != nil {
+ dAtA[i] = 0x5a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ReadinessProbe.Size()))
+ n17, err := m.ReadinessProbe.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n17
+ }
+ if m.Lifecycle != nil {
+ dAtA[i] = 0x62
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Lifecycle.Size()))
+ n18, err := m.Lifecycle.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n18
+ }
+ dAtA[i] = 0x6a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.TerminationMessagePath)))
+ i += copy(dAtA[i:], m.TerminationMessagePath)
+ dAtA[i] = 0x72
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ImagePullPolicy)))
+ i += copy(dAtA[i:], m.ImagePullPolicy)
+ if m.SecurityContext != nil {
+ dAtA[i] = 0x7a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SecurityContext.Size()))
+ n19, err := m.SecurityContext.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n19
+ }
+ dAtA[i] = 0x80
+ i++
+ dAtA[i] = 0x1
+ i++
+ if m.Stdin {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x88
+ i++
+ dAtA[i] = 0x1
+ i++
+ if m.StdinOnce {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x90
+ i++
+ dAtA[i] = 0x1
+ i++
+ if m.TTY {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ if len(m.EnvFrom) > 0 {
+ for _, msg := range m.EnvFrom {
+ dAtA[i] = 0x9a
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0xa2
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.TerminationMessagePolicy)))
+ i += copy(dAtA[i:], m.TerminationMessagePolicy)
+ return i, nil
+}
+
+func (m *ContainerImage) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerImage) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Names) > 0 {
+ for _, s := range m.Names {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SizeBytes))
+ return i, nil
+}
+
+func (m *ContainerPort) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerPort) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.HostPort))
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ContainerPort))
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Protocol)))
+ i += copy(dAtA[i:], m.Protocol)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.HostIP)))
+ i += copy(dAtA[i:], m.HostIP)
+ return i, nil
+}
+
+func (m *ContainerState) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerState) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Waiting != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Waiting.Size()))
+ n20, err := m.Waiting.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n20
+ }
+ if m.Running != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Running.Size()))
+ n21, err := m.Running.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n21
+ }
+ if m.Terminated != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Terminated.Size()))
+ n22, err := m.Terminated.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n22
+ }
+ return i, nil
+}
+
+func (m *ContainerStateRunning) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerStateRunning) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.StartedAt.Size()))
+ n23, err := m.StartedAt.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n23
+ return i, nil
+}
+
+func (m *ContainerStateTerminated) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerStateTerminated) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ExitCode))
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Signal))
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.StartedAt.Size()))
+ n24, err := m.StartedAt.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n24
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.FinishedAt.Size()))
+ n25, err := m.FinishedAt.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n25
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ContainerID)))
+ i += copy(dAtA[i:], m.ContainerID)
+ return i, nil
+}
+
+func (m *ContainerStateWaiting) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerStateWaiting) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ return i, nil
+}
+
+func (m *ContainerStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.State.Size()))
+ n26, err := m.State.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n26
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTerminationState.Size()))
+ n27, err := m.LastTerminationState.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n27
+ dAtA[i] = 0x20
+ i++
+ if m.Ready {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RestartCount))
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Image)))
+ i += copy(dAtA[i:], m.Image)
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ImageID)))
+ i += copy(dAtA[i:], m.ImageID)
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ContainerID)))
+ i += copy(dAtA[i:], m.ContainerID)
+ return i, nil
+}
+
+func (m *DaemonEndpoint) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DaemonEndpoint) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Port))
+ return i, nil
+}
+
+func (m *DeleteOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeleteOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.GracePeriodSeconds != nil {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.GracePeriodSeconds))
+ }
+ if m.Preconditions != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Preconditions.Size()))
+ n28, err := m.Preconditions.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n28
+ }
+ if m.OrphanDependents != nil {
+ dAtA[i] = 0x18
+ i++
+ if *m.OrphanDependents {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if m.PropagationPolicy != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.PropagationPolicy)))
+ i += copy(dAtA[i:], *m.PropagationPolicy)
+ }
+ return i, nil
+}
+
+func (m *DownwardAPIProjection) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DownwardAPIProjection) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *DownwardAPIVolumeFile) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DownwardAPIVolumeFile) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i += copy(dAtA[i:], m.Path)
+ if m.FieldRef != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.FieldRef.Size()))
+ n29, err := m.FieldRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n29
+ }
+ if m.ResourceFieldRef != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ResourceFieldRef.Size()))
+ n30, err := m.ResourceFieldRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n30
+ }
+ if m.Mode != nil {
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.Mode))
+ }
+ return i, nil
+}
+
+func (m *DownwardAPIVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DownwardAPIVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.DefaultMode != nil {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.DefaultMode))
+ }
+ return i, nil
+}
+
+func (m *EmptyDirVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *EmptyDirVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Medium)))
+ i += copy(dAtA[i:], m.Medium)
+ if m.SizeLimit != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SizeLimit.Size()))
+ n31, err := m.SizeLimit.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n31
+ }
+ return i, nil
+}
+
+func (m *EndpointAddress) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *EndpointAddress) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.IP)))
+ i += copy(dAtA[i:], m.IP)
+ if m.TargetRef != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.TargetRef.Size()))
+ n32, err := m.TargetRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n32
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Hostname)))
+ i += copy(dAtA[i:], m.Hostname)
+ if m.NodeName != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.NodeName)))
+ i += copy(dAtA[i:], *m.NodeName)
+ }
+ return i, nil
+}
+
+func (m *EndpointPort) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *EndpointPort) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Port))
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Protocol)))
+ i += copy(dAtA[i:], m.Protocol)
+ return i, nil
+}
+
+func (m *EndpointSubset) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *EndpointSubset) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Addresses) > 0 {
+ for _, msg := range m.Addresses {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.NotReadyAddresses) > 0 {
+ for _, msg := range m.NotReadyAddresses {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Ports) > 0 {
+ for _, msg := range m.Ports {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *Endpoints) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Endpoints) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n33, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n33
+ if len(m.Subsets) > 0 {
+ for _, msg := range m.Subsets {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *EndpointsList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *EndpointsList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n34, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n34
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *EnvFromSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *EnvFromSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Prefix)))
+ i += copy(dAtA[i:], m.Prefix)
+ if m.ConfigMapRef != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ConfigMapRef.Size()))
+ n35, err := m.ConfigMapRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n35
+ }
+ if m.SecretRef != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size()))
+ n36, err := m.SecretRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n36
+ }
+ return i, nil
+}
+
+func (m *EnvVar) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *EnvVar) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Value)))
+ i += copy(dAtA[i:], m.Value)
+ if m.ValueFrom != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ValueFrom.Size()))
+ n37, err := m.ValueFrom.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n37
+ }
+ return i, nil
+}
+
+func (m *EnvVarSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *EnvVarSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.FieldRef != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.FieldRef.Size()))
+ n38, err := m.FieldRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n38
+ }
+ if m.ResourceFieldRef != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ResourceFieldRef.Size()))
+ n39, err := m.ResourceFieldRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n39
+ }
+ if m.ConfigMapKeyRef != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ConfigMapKeyRef.Size()))
+ n40, err := m.ConfigMapKeyRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n40
+ }
+ if m.SecretKeyRef != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretKeyRef.Size()))
+ n41, err := m.SecretKeyRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n41
+ }
+ return i, nil
+}
+
+func (m *Event) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Event) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n42, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n42
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.InvolvedObject.Size()))
+ n43, err := m.InvolvedObject.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n43
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Source.Size()))
+ n44, err := m.Source.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n44
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.FirstTimestamp.Size()))
+ n45, err := m.FirstTimestamp.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n45
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTimestamp.Size()))
+ n46, err := m.LastTimestamp.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n46
+ dAtA[i] = 0x40
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Count))
+ dAtA[i] = 0x4a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ return i, nil
+}
+
+func (m *EventList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *EventList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n47, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n47
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *EventSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *EventSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Component)))
+ i += copy(dAtA[i:], m.Component)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Host)))
+ i += copy(dAtA[i:], m.Host)
+ return i, nil
+}
+
+func (m *ExecAction) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExecAction) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Command) > 0 {
+ for _, s := range m.Command {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *FCVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *FCVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.TargetWWNs) > 0 {
+ for _, s := range m.TargetWWNs {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if m.Lun != nil {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.Lun))
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FSType)))
+ i += copy(dAtA[i:], m.FSType)
+ dAtA[i] = 0x20
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *FlexVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *FlexVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Driver)))
+ i += copy(dAtA[i:], m.Driver)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FSType)))
+ i += copy(dAtA[i:], m.FSType)
+ if m.SecretRef != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size()))
+ n48, err := m.SecretRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n48
+ }
+ dAtA[i] = 0x20
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ if len(m.Options) > 0 {
+ keysForOptions := make([]string, 0, len(m.Options))
+ for k := range m.Options {
+ keysForOptions = append(keysForOptions, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForOptions)
+ for _, k := range keysForOptions {
+ dAtA[i] = 0x2a
+ i++
+ v := m.Options[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ return i, nil
+}
+
+func (m *FlockerVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *FlockerVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.DatasetName)))
+ i += copy(dAtA[i:], m.DatasetName)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.DatasetUUID)))
+ i += copy(dAtA[i:], m.DatasetUUID)
+ return i, nil
+}
+
+func (m *GCEPersistentDiskVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *GCEPersistentDiskVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.PDName)))
+ i += copy(dAtA[i:], m.PDName)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FSType)))
+ i += copy(dAtA[i:], m.FSType)
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Partition))
+ dAtA[i] = 0x20
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *GitRepoVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *GitRepoVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Repository)))
+ i += copy(dAtA[i:], m.Repository)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Revision)))
+ i += copy(dAtA[i:], m.Revision)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Directory)))
+ i += copy(dAtA[i:], m.Directory)
+ return i, nil
+}
+
+func (m *GlusterfsVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *GlusterfsVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.EndpointsName)))
+ i += copy(dAtA[i:], m.EndpointsName)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i += copy(dAtA[i:], m.Path)
+ dAtA[i] = 0x18
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *HTTPGetAction) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HTTPGetAction) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i += copy(dAtA[i:], m.Path)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Port.Size()))
+ n49, err := m.Port.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n49
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Host)))
+ i += copy(dAtA[i:], m.Host)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Scheme)))
+ i += copy(dAtA[i:], m.Scheme)
+ if len(m.HTTPHeaders) > 0 {
+ for _, msg := range m.HTTPHeaders {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *HTTPHeader) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HTTPHeader) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Value)))
+ i += copy(dAtA[i:], m.Value)
+ return i, nil
+}
+
+func (m *Handler) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Handler) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Exec != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Exec.Size()))
+ n50, err := m.Exec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n50
+ }
+ if m.HTTPGet != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.HTTPGet.Size()))
+ n51, err := m.HTTPGet.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n51
+ }
+ if m.TCPSocket != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.TCPSocket.Size()))
+ n52, err := m.TCPSocket.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n52
+ }
+ return i, nil
+}
+
+func (m *HostAlias) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HostAlias) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.IP)))
+ i += copy(dAtA[i:], m.IP)
+ if len(m.Hostnames) > 0 {
+ for _, s := range m.Hostnames {
+ dAtA[i] = 0x12
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *HostPathVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HostPathVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i += copy(dAtA[i:], m.Path)
+ return i, nil
+}
+
+func (m *ISCSIVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ISCSIVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.TargetPortal)))
+ i += copy(dAtA[i:], m.TargetPortal)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.IQN)))
+ i += copy(dAtA[i:], m.IQN)
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Lun))
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ISCSIInterface)))
+ i += copy(dAtA[i:], m.ISCSIInterface)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FSType)))
+ i += copy(dAtA[i:], m.FSType)
+ dAtA[i] = 0x30
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ if len(m.Portals) > 0 {
+ for _, s := range m.Portals {
+ dAtA[i] = 0x3a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ dAtA[i] = 0x40
+ i++
+ if m.DiscoveryCHAPAuth {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ if m.SecretRef != nil {
+ dAtA[i] = 0x52
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size()))
+ n53, err := m.SecretRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n53
+ }
+ dAtA[i] = 0x58
+ i++
+ if m.SessionCHAPAuth {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *KeyToPath) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *KeyToPath) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key)))
+ i += copy(dAtA[i:], m.Key)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i += copy(dAtA[i:], m.Path)
+ if m.Mode != nil {
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.Mode))
+ }
+ return i, nil
+}
+
+func (m *Lifecycle) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Lifecycle) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.PostStart != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PostStart.Size()))
+ n54, err := m.PostStart.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n54
+ }
+ if m.PreStop != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PreStop.Size()))
+ n55, err := m.PreStop.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n55
+ }
+ return i, nil
+}
+
+func (m *LimitRange) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LimitRange) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n56, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n56
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n57, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n57
+ return i, nil
+}
+
+func (m *LimitRangeItem) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LimitRangeItem) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ if len(m.Max) > 0 {
+ keysForMax := make([]string, 0, len(m.Max))
+ for k := range m.Max {
+ keysForMax = append(keysForMax, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForMax)
+ for _, k := range keysForMax {
+ dAtA[i] = 0x12
+ i++
+ v := m.Max[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n58, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n58
+ }
+ }
+ if len(m.Min) > 0 {
+ keysForMin := make([]string, 0, len(m.Min))
+ for k := range m.Min {
+ keysForMin = append(keysForMin, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForMin)
+ for _, k := range keysForMin {
+ dAtA[i] = 0x1a
+ i++
+ v := m.Min[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n59, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n59
+ }
+ }
+ if len(m.Default) > 0 {
+ keysForDefault := make([]string, 0, len(m.Default))
+ for k := range m.Default {
+ keysForDefault = append(keysForDefault, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForDefault)
+ for _, k := range keysForDefault {
+ dAtA[i] = 0x22
+ i++
+ v := m.Default[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n60, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n60
+ }
+ }
+ if len(m.DefaultRequest) > 0 {
+ keysForDefaultRequest := make([]string, 0, len(m.DefaultRequest))
+ for k := range m.DefaultRequest {
+ keysForDefaultRequest = append(keysForDefaultRequest, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForDefaultRequest)
+ for _, k := range keysForDefaultRequest {
+ dAtA[i] = 0x2a
+ i++
+ v := m.DefaultRequest[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n61, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n61
+ }
+ }
+ if len(m.MaxLimitRequestRatio) > 0 {
+ keysForMaxLimitRequestRatio := make([]string, 0, len(m.MaxLimitRequestRatio))
+ for k := range m.MaxLimitRequestRatio {
+ keysForMaxLimitRequestRatio = append(keysForMaxLimitRequestRatio, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForMaxLimitRequestRatio)
+ for _, k := range keysForMaxLimitRequestRatio {
+ dAtA[i] = 0x32
+ i++
+ v := m.MaxLimitRequestRatio[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n62, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n62
+ }
+ }
+ return i, nil
+}
+
+func (m *LimitRangeList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LimitRangeList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n63, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n63
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *LimitRangeSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LimitRangeSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Limits) > 0 {
+ for _, msg := range m.Limits {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *List) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *List) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n64, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n64
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ListOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ListOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.LabelSelector)))
+ i += copy(dAtA[i:], m.LabelSelector)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FieldSelector)))
+ i += copy(dAtA[i:], m.FieldSelector)
+ dAtA[i] = 0x18
+ i++
+ if m.Watch {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceVersion)))
+ i += copy(dAtA[i:], m.ResourceVersion)
+ if m.TimeoutSeconds != nil {
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.TimeoutSeconds))
+ }
+ dAtA[i] = 0x30
+ i++
+ if m.IncludeUninitialized {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *LoadBalancerIngress) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LoadBalancerIngress) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.IP)))
+ i += copy(dAtA[i:], m.IP)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Hostname)))
+ i += copy(dAtA[i:], m.Hostname)
+ return i, nil
+}
+
+func (m *LoadBalancerStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LoadBalancerStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Ingress) > 0 {
+ for _, msg := range m.Ingress {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *LocalObjectReference) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LocalObjectReference) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ return i, nil
+}
+
+func (m *LocalVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LocalVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i += copy(dAtA[i:], m.Path)
+ return i, nil
+}
+
+func (m *NFSVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NFSVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Server)))
+ i += copy(dAtA[i:], m.Server)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i += copy(dAtA[i:], m.Path)
+ dAtA[i] = 0x18
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *Namespace) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Namespace) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n65, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n65
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n66, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n66
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n67, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n67
+ return i, nil
+}
+
+func (m *NamespaceList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NamespaceList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n68, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n68
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *NamespaceSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NamespaceSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Finalizers) > 0 {
+ for _, s := range m.Finalizers {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *NamespaceStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NamespaceStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Phase)))
+ i += copy(dAtA[i:], m.Phase)
+ return i, nil
+}
+
+func (m *Node) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Node) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n69, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n69
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n70, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n70
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n71, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n71
+ return i, nil
+}
+
+func (m *NodeAddress) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NodeAddress) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Address)))
+ i += copy(dAtA[i:], m.Address)
+ return i, nil
+}
+
+func (m *NodeAffinity) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NodeAffinity) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RequiredDuringSchedulingIgnoredDuringExecution.Size()))
+ n72, err := m.RequiredDuringSchedulingIgnoredDuringExecution.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n72
+ }
+ if len(m.PreferredDuringSchedulingIgnoredDuringExecution) > 0 {
+ for _, msg := range m.PreferredDuringSchedulingIgnoredDuringExecution {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *NodeCondition) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NodeCondition) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
+ i += copy(dAtA[i:], m.Status)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastHeartbeatTime.Size()))
+ n73, err := m.LastHeartbeatTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n73
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
+ n74, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n74
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ return i, nil
+}
+
+func (m *NodeDaemonEndpoints) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NodeDaemonEndpoints) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.KubeletEndpoint.Size()))
+ n75, err := m.KubeletEndpoint.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n75
+ return i, nil
+}
+
+func (m *NodeList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NodeList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n76, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n76
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *NodeProxyOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NodeProxyOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i += copy(dAtA[i:], m.Path)
+ return i, nil
+}
+
+func (m *NodeResources) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NodeResources) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Capacity) > 0 {
+ keysForCapacity := make([]string, 0, len(m.Capacity))
+ for k := range m.Capacity {
+ keysForCapacity = append(keysForCapacity, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity)
+ for _, k := range keysForCapacity {
+ dAtA[i] = 0xa
+ i++
+ v := m.Capacity[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n77, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n77
+ }
+ }
+ return i, nil
+}
+
+func (m *NodeSelector) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NodeSelector) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.NodeSelectorTerms) > 0 {
+ for _, msg := range m.NodeSelectorTerms {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *NodeSelectorRequirement) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NodeSelectorRequirement) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key)))
+ i += copy(dAtA[i:], m.Key)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Operator)))
+ i += copy(dAtA[i:], m.Operator)
+ if len(m.Values) > 0 {
+ for _, s := range m.Values {
+ dAtA[i] = 0x1a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *NodeSelectorTerm) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NodeSelectorTerm) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.MatchExpressions) > 0 {
+ for _, msg := range m.MatchExpressions {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *NodeSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NodeSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.PodCIDR)))
+ i += copy(dAtA[i:], m.PodCIDR)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ExternalID)))
+ i += copy(dAtA[i:], m.ExternalID)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ProviderID)))
+ i += copy(dAtA[i:], m.ProviderID)
+ dAtA[i] = 0x20
+ i++
+ if m.Unschedulable {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ if len(m.Taints) > 0 {
+ for _, msg := range m.Taints {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *NodeStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NodeStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Capacity) > 0 {
+ keysForCapacity := make([]string, 0, len(m.Capacity))
+ for k := range m.Capacity {
+ keysForCapacity = append(keysForCapacity, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity)
+ for _, k := range keysForCapacity {
+ dAtA[i] = 0xa
+ i++
+ v := m.Capacity[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n78, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n78
+ }
+ }
+ if len(m.Allocatable) > 0 {
+ keysForAllocatable := make([]string, 0, len(m.Allocatable))
+ for k := range m.Allocatable {
+ keysForAllocatable = append(keysForAllocatable, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForAllocatable)
+ for _, k := range keysForAllocatable {
+ dAtA[i] = 0x12
+ i++
+ v := m.Allocatable[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n79, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n79
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Phase)))
+ i += copy(dAtA[i:], m.Phase)
+ if len(m.Conditions) > 0 {
+ for _, msg := range m.Conditions {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Addresses) > 0 {
+ for _, msg := range m.Addresses {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.DaemonEndpoints.Size()))
+ n80, err := m.DaemonEndpoints.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n80
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NodeInfo.Size()))
+ n81, err := m.NodeInfo.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n81
+ if len(m.Images) > 0 {
+ for _, msg := range m.Images {
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.VolumesInUse) > 0 {
+ for _, s := range m.VolumesInUse {
+ dAtA[i] = 0x4a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.VolumesAttached) > 0 {
+ for _, msg := range m.VolumesAttached {
+ dAtA[i] = 0x52
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *NodeSystemInfo) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NodeSystemInfo) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.MachineID)))
+ i += copy(dAtA[i:], m.MachineID)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.SystemUUID)))
+ i += copy(dAtA[i:], m.SystemUUID)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.BootID)))
+ i += copy(dAtA[i:], m.BootID)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.KernelVersion)))
+ i += copy(dAtA[i:], m.KernelVersion)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.OSImage)))
+ i += copy(dAtA[i:], m.OSImage)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ContainerRuntimeVersion)))
+ i += copy(dAtA[i:], m.ContainerRuntimeVersion)
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.KubeletVersion)))
+ i += copy(dAtA[i:], m.KubeletVersion)
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.KubeProxyVersion)))
+ i += copy(dAtA[i:], m.KubeProxyVersion)
+ dAtA[i] = 0x4a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.OperatingSystem)))
+ i += copy(dAtA[i:], m.OperatingSystem)
+ dAtA[i] = 0x52
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Architecture)))
+ i += copy(dAtA[i:], m.Architecture)
+ return i, nil
+}
+
+func (m *ObjectFieldSelector) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ObjectFieldSelector) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion)))
+ i += copy(dAtA[i:], m.APIVersion)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FieldPath)))
+ i += copy(dAtA[i:], m.FieldPath)
+ return i, nil
+}
+
+func (m *ObjectMeta) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ObjectMeta) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.GenerateName)))
+ i += copy(dAtA[i:], m.GenerateName)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
+ i += copy(dAtA[i:], m.Namespace)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.SelfLink)))
+ i += copy(dAtA[i:], m.SelfLink)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID)))
+ i += copy(dAtA[i:], m.UID)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceVersion)))
+ i += copy(dAtA[i:], m.ResourceVersion)
+ dAtA[i] = 0x38
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Generation))
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CreationTimestamp.Size()))
+ n82, err := m.CreationTimestamp.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n82
+ if m.DeletionTimestamp != nil {
+ dAtA[i] = 0x4a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.DeletionTimestamp.Size()))
+ n83, err := m.DeletionTimestamp.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n83
+ }
+ if m.DeletionGracePeriodSeconds != nil {
+ dAtA[i] = 0x50
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.DeletionGracePeriodSeconds))
+ }
+ if len(m.Labels) > 0 {
+ keysForLabels := make([]string, 0, len(m.Labels))
+ for k := range m.Labels {
+ keysForLabels = append(keysForLabels, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
+ for _, k := range keysForLabels {
+ dAtA[i] = 0x5a
+ i++
+ v := m.Labels[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ if len(m.Annotations) > 0 {
+ keysForAnnotations := make([]string, 0, len(m.Annotations))
+ for k := range m.Annotations {
+ keysForAnnotations = append(keysForAnnotations, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations)
+ for _, k := range keysForAnnotations {
+ dAtA[i] = 0x62
+ i++
+ v := m.Annotations[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ if len(m.OwnerReferences) > 0 {
+ for _, msg := range m.OwnerReferences {
+ dAtA[i] = 0x6a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Finalizers) > 0 {
+ for _, s := range m.Finalizers {
+ dAtA[i] = 0x72
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ dAtA[i] = 0x7a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ClusterName)))
+ i += copy(dAtA[i:], m.ClusterName)
+ if m.Initializers != nil {
+ dAtA[i] = 0x82
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Initializers.Size()))
+ n84, err := m.Initializers.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n84
+ }
+ return i, nil
+}
+
+func (m *ObjectReference) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ObjectReference) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
+ i += copy(dAtA[i:], m.Kind)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
+ i += copy(dAtA[i:], m.Namespace)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID)))
+ i += copy(dAtA[i:], m.UID)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion)))
+ i += copy(dAtA[i:], m.APIVersion)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceVersion)))
+ i += copy(dAtA[i:], m.ResourceVersion)
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FieldPath)))
+ i += copy(dAtA[i:], m.FieldPath)
+ return i, nil
+}
+
+func (m *PersistentVolume) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PersistentVolume) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n85, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n85
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n86, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n86
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n87, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n87
+ return i, nil
+}
+
+func (m *PersistentVolumeClaim) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PersistentVolumeClaim) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n88, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n88
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n89, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n89
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n90, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n90
+ return i, nil
+}
+
+func (m *PersistentVolumeClaimList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PersistentVolumeClaimList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n91, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n91
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PersistentVolumeClaimSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PersistentVolumeClaimSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.AccessModes) > 0 {
+ for _, s := range m.AccessModes {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Resources.Size()))
+ n92, err := m.Resources.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n92
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.VolumeName)))
+ i += copy(dAtA[i:], m.VolumeName)
+ if m.Selector != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
+ n93, err := m.Selector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n93
+ }
+ if m.StorageClassName != nil {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.StorageClassName)))
+ i += copy(dAtA[i:], *m.StorageClassName)
+ }
+ return i, nil
+}
+
+func (m *PersistentVolumeClaimStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PersistentVolumeClaimStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Phase)))
+ i += copy(dAtA[i:], m.Phase)
+ if len(m.AccessModes) > 0 {
+ for _, s := range m.AccessModes {
+ dAtA[i] = 0x12
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Capacity) > 0 {
+ keysForCapacity := make([]string, 0, len(m.Capacity))
+ for k := range m.Capacity {
+ keysForCapacity = append(keysForCapacity, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity)
+ for _, k := range keysForCapacity {
+ dAtA[i] = 0x1a
+ i++
+ v := m.Capacity[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n94, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n94
+ }
+ }
+ return i, nil
+}
+
+func (m *PersistentVolumeClaimVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PersistentVolumeClaimVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ClaimName)))
+ i += copy(dAtA[i:], m.ClaimName)
+ dAtA[i] = 0x10
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *PersistentVolumeList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PersistentVolumeList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n95, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n95
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PersistentVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PersistentVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.GCEPersistentDisk != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.GCEPersistentDisk.Size()))
+ n96, err := m.GCEPersistentDisk.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n96
+ }
+ if m.AWSElasticBlockStore != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.AWSElasticBlockStore.Size()))
+ n97, err := m.AWSElasticBlockStore.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n97
+ }
+ if m.HostPath != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.HostPath.Size()))
+ n98, err := m.HostPath.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n98
+ }
+ if m.Glusterfs != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Glusterfs.Size()))
+ n99, err := m.Glusterfs.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n99
+ }
+ if m.NFS != nil {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NFS.Size()))
+ n100, err := m.NFS.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n100
+ }
+ if m.RBD != nil {
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RBD.Size()))
+ n101, err := m.RBD.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n101
+ }
+ if m.ISCSI != nil {
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ISCSI.Size()))
+ n102, err := m.ISCSI.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n102
+ }
+ if m.Cinder != nil {
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Cinder.Size()))
+ n103, err := m.Cinder.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n103
+ }
+ if m.CephFS != nil {
+ dAtA[i] = 0x4a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CephFS.Size()))
+ n104, err := m.CephFS.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n104
+ }
+ if m.FC != nil {
+ dAtA[i] = 0x52
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.FC.Size()))
+ n105, err := m.FC.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n105
+ }
+ if m.Flocker != nil {
+ dAtA[i] = 0x5a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Flocker.Size()))
+ n106, err := m.Flocker.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n106
+ }
+ if m.FlexVolume != nil {
+ dAtA[i] = 0x62
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.FlexVolume.Size()))
+ n107, err := m.FlexVolume.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n107
+ }
+ if m.AzureFile != nil {
+ dAtA[i] = 0x6a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.AzureFile.Size()))
+ n108, err := m.AzureFile.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n108
+ }
+ if m.VsphereVolume != nil {
+ dAtA[i] = 0x72
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.VsphereVolume.Size()))
+ n109, err := m.VsphereVolume.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n109
+ }
+ if m.Quobyte != nil {
+ dAtA[i] = 0x7a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Quobyte.Size()))
+ n110, err := m.Quobyte.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n110
+ }
+ if m.AzureDisk != nil {
+ dAtA[i] = 0x82
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.AzureDisk.Size()))
+ n111, err := m.AzureDisk.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n111
+ }
+ if m.PhotonPersistentDisk != nil {
+ dAtA[i] = 0x8a
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PhotonPersistentDisk.Size()))
+ n112, err := m.PhotonPersistentDisk.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n112
+ }
+ if m.PortworxVolume != nil {
+ dAtA[i] = 0x92
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PortworxVolume.Size()))
+ n113, err := m.PortworxVolume.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n113
+ }
+ if m.ScaleIO != nil {
+ dAtA[i] = 0x9a
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ScaleIO.Size()))
+ n114, err := m.ScaleIO.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n114
+ }
+ if m.Local != nil {
+ dAtA[i] = 0xa2
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Local.Size()))
+ n115, err := m.Local.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n115
+ }
+ if m.StorageOS != nil {
+ dAtA[i] = 0xaa
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.StorageOS.Size()))
+ n116, err := m.StorageOS.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n116
+ }
+ return i, nil
+}
+
+func (m *PersistentVolumeSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PersistentVolumeSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Capacity) > 0 {
+ keysForCapacity := make([]string, 0, len(m.Capacity))
+ for k := range m.Capacity {
+ keysForCapacity = append(keysForCapacity, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity)
+ for _, k := range keysForCapacity {
+ dAtA[i] = 0xa
+ i++
+ v := m.Capacity[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n117, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n117
+ }
+ }
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PersistentVolumeSource.Size()))
+ n118, err := m.PersistentVolumeSource.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n118
+ if len(m.AccessModes) > 0 {
+ for _, s := range m.AccessModes {
+ dAtA[i] = 0x1a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if m.ClaimRef != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ClaimRef.Size()))
+ n119, err := m.ClaimRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n119
+ }
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.PersistentVolumeReclaimPolicy)))
+ i += copy(dAtA[i:], m.PersistentVolumeReclaimPolicy)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.StorageClassName)))
+ i += copy(dAtA[i:], m.StorageClassName)
+ return i, nil
+}
+
+func (m *PersistentVolumeStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PersistentVolumeStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Phase)))
+ i += copy(dAtA[i:], m.Phase)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ return i, nil
+}
+
+func (m *PhotonPersistentDiskVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PhotonPersistentDiskVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.PdID)))
+ i += copy(dAtA[i:], m.PdID)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FSType)))
+ i += copy(dAtA[i:], m.FSType)
+ return i, nil
+}
+
+func (m *Pod) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Pod) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n120, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n120
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n121, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n121
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n122, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n122
+ return i, nil
+}
+
+func (m *PodAffinity) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodAffinity) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.RequiredDuringSchedulingIgnoredDuringExecution) > 0 {
+ for _, msg := range m.RequiredDuringSchedulingIgnoredDuringExecution {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.PreferredDuringSchedulingIgnoredDuringExecution) > 0 {
+ for _, msg := range m.PreferredDuringSchedulingIgnoredDuringExecution {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PodAffinityTerm) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodAffinityTerm) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.LabelSelector != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LabelSelector.Size()))
+ n123, err := m.LabelSelector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n123
+ }
+ if len(m.Namespaces) > 0 {
+ for _, s := range m.Namespaces {
+ dAtA[i] = 0x12
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.TopologyKey)))
+ i += copy(dAtA[i:], m.TopologyKey)
+ return i, nil
+}
+
+func (m *PodAntiAffinity) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodAntiAffinity) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.RequiredDuringSchedulingIgnoredDuringExecution) > 0 {
+ for _, msg := range m.RequiredDuringSchedulingIgnoredDuringExecution {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.PreferredDuringSchedulingIgnoredDuringExecution) > 0 {
+ for _, msg := range m.PreferredDuringSchedulingIgnoredDuringExecution {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PodAttachOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodAttachOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ if m.Stdin {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x10
+ i++
+ if m.Stdout {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x18
+ i++
+ if m.Stderr {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x20
+ i++
+ if m.TTY {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Container)))
+ i += copy(dAtA[i:], m.Container)
+ return i, nil
+}
+
+func (m *PodCondition) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodCondition) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
+ i += copy(dAtA[i:], m.Status)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastProbeTime.Size()))
+ n124, err := m.LastProbeTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n124
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
+ n125, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n125
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ return i, nil
+}
+
+func (m *PodExecOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodExecOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ if m.Stdin {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x10
+ i++
+ if m.Stdout {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x18
+ i++
+ if m.Stderr {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x20
+ i++
+ if m.TTY {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Container)))
+ i += copy(dAtA[i:], m.Container)
+ if len(m.Command) > 0 {
+ for _, s := range m.Command {
+ dAtA[i] = 0x32
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *PodList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n126, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n126
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PodLogOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodLogOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Container)))
+ i += copy(dAtA[i:], m.Container)
+ dAtA[i] = 0x10
+ i++
+ if m.Follow {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x18
+ i++
+ if m.Previous {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ if m.SinceSeconds != nil {
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.SinceSeconds))
+ }
+ if m.SinceTime != nil {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SinceTime.Size()))
+ n127, err := m.SinceTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n127
+ }
+ dAtA[i] = 0x30
+ i++
+ if m.Timestamps {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ if m.TailLines != nil {
+ dAtA[i] = 0x38
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.TailLines))
+ }
+ if m.LimitBytes != nil {
+ dAtA[i] = 0x40
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.LimitBytes))
+ }
+ return i, nil
+}
+
+func (m *PodPortForwardOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodPortForwardOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Ports) > 0 {
+ for _, num := range m.Ports {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(num))
+ }
+ }
+ return i, nil
+}
+
+func (m *PodProxyOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodProxyOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i += copy(dAtA[i:], m.Path)
+ return i, nil
+}
+
+func (m *PodSecurityContext) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodSecurityContext) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.SELinuxOptions != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SELinuxOptions.Size()))
+ n128, err := m.SELinuxOptions.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n128
+ }
+ if m.RunAsUser != nil {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.RunAsUser))
+ }
+ if m.RunAsNonRoot != nil {
+ dAtA[i] = 0x18
+ i++
+ if *m.RunAsNonRoot {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if len(m.SupplementalGroups) > 0 {
+ for _, num := range m.SupplementalGroups {
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(num))
+ }
+ }
+ if m.FSGroup != nil {
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.FSGroup))
+ }
+ return i, nil
+}
+
+func (m *PodSignature) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodSignature) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.PodController != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PodController.Size()))
+ n129, err := m.PodController.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n129
+ }
+ return i, nil
+}
+
+func (m *PodSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Volumes) > 0 {
+ for _, msg := range m.Volumes {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Containers) > 0 {
+ for _, msg := range m.Containers {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.RestartPolicy)))
+ i += copy(dAtA[i:], m.RestartPolicy)
+ if m.TerminationGracePeriodSeconds != nil {
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.TerminationGracePeriodSeconds))
+ }
+ if m.ActiveDeadlineSeconds != nil {
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.ActiveDeadlineSeconds))
+ }
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.DNSPolicy)))
+ i += copy(dAtA[i:], m.DNSPolicy)
+ if len(m.NodeSelector) > 0 {
+ keysForNodeSelector := make([]string, 0, len(m.NodeSelector))
+ for k := range m.NodeSelector {
+ keysForNodeSelector = append(keysForNodeSelector, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForNodeSelector)
+ for _, k := range keysForNodeSelector {
+ dAtA[i] = 0x3a
+ i++
+ v := m.NodeSelector[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ServiceAccountName)))
+ i += copy(dAtA[i:], m.ServiceAccountName)
+ dAtA[i] = 0x4a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.DeprecatedServiceAccount)))
+ i += copy(dAtA[i:], m.DeprecatedServiceAccount)
+ dAtA[i] = 0x52
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.NodeName)))
+ i += copy(dAtA[i:], m.NodeName)
+ dAtA[i] = 0x58
+ i++
+ if m.HostNetwork {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x60
+ i++
+ if m.HostPID {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x68
+ i++
+ if m.HostIPC {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ if m.SecurityContext != nil {
+ dAtA[i] = 0x72
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SecurityContext.Size()))
+ n130, err := m.SecurityContext.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n130
+ }
+ if len(m.ImagePullSecrets) > 0 {
+ for _, msg := range m.ImagePullSecrets {
+ dAtA[i] = 0x7a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x82
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Hostname)))
+ i += copy(dAtA[i:], m.Hostname)
+ dAtA[i] = 0x8a
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Subdomain)))
+ i += copy(dAtA[i:], m.Subdomain)
+ if m.Affinity != nil {
+ dAtA[i] = 0x92
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Affinity.Size()))
+ n131, err := m.Affinity.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n131
+ }
+ dAtA[i] = 0x9a
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.SchedulerName)))
+ i += copy(dAtA[i:], m.SchedulerName)
+ if len(m.InitContainers) > 0 {
+ for _, msg := range m.InitContainers {
+ dAtA[i] = 0xa2
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.AutomountServiceAccountToken != nil {
+ dAtA[i] = 0xa8
+ i++
+ dAtA[i] = 0x1
+ i++
+ if *m.AutomountServiceAccountToken {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if len(m.Tolerations) > 0 {
+ for _, msg := range m.Tolerations {
+ dAtA[i] = 0xb2
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.HostAliases) > 0 {
+ for _, msg := range m.HostAliases {
+ dAtA[i] = 0xba
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PodStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Phase)))
+ i += copy(dAtA[i:], m.Phase)
+ if len(m.Conditions) > 0 {
+ for _, msg := range m.Conditions {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.HostIP)))
+ i += copy(dAtA[i:], m.HostIP)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.PodIP)))
+ i += copy(dAtA[i:], m.PodIP)
+ if m.StartTime != nil {
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.StartTime.Size()))
+ n132, err := m.StartTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n132
+ }
+ if len(m.ContainerStatuses) > 0 {
+ for _, msg := range m.ContainerStatuses {
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x4a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.QOSClass)))
+ i += copy(dAtA[i:], m.QOSClass)
+ if len(m.InitContainerStatuses) > 0 {
+ for _, msg := range m.InitContainerStatuses {
+ dAtA[i] = 0x52
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PodStatusResult) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodStatusResult) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n133, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n133
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n134, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n134
+ return i, nil
+}
+
+func (m *PodTemplate) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodTemplate) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n135, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n135
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
+ n136, err := m.Template.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n136
+ return i, nil
+}
+
+func (m *PodTemplateList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodTemplateList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n137, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n137
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PodTemplateSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodTemplateSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n138, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n138
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n139, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n139
+ return i, nil
+}
+
+func (m *PortworxVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PortworxVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.VolumeID)))
+ i += copy(dAtA[i:], m.VolumeID)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FSType)))
+ i += copy(dAtA[i:], m.FSType)
+ dAtA[i] = 0x18
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *Preconditions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Preconditions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.UID != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.UID)))
+ i += copy(dAtA[i:], *m.UID)
+ }
+ return i, nil
+}
+
+func (m *PreferAvoidPodsEntry) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PreferAvoidPodsEntry) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PodSignature.Size()))
+ n140, err := m.PodSignature.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n140
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.EvictionTime.Size()))
+ n141, err := m.EvictionTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n141
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ return i, nil
+}
+
+func (m *PreferredSchedulingTerm) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PreferredSchedulingTerm) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Weight))
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Preference.Size()))
+ n142, err := m.Preference.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n142
+ return i, nil
+}
+
+func (m *Probe) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Probe) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Handler.Size()))
+ n143, err := m.Handler.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n143
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.InitialDelaySeconds))
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.TimeoutSeconds))
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PeriodSeconds))
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SuccessThreshold))
+ dAtA[i] = 0x30
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.FailureThreshold))
+ return i, nil
+}
+
+func (m *ProjectedVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ProjectedVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Sources) > 0 {
+ for _, msg := range m.Sources {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.DefaultMode != nil {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.DefaultMode))
+ }
+ return i, nil
+}
+
+func (m *QuobyteVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *QuobyteVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Registry)))
+ i += copy(dAtA[i:], m.Registry)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Volume)))
+ i += copy(dAtA[i:], m.Volume)
+ dAtA[i] = 0x18
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.User)))
+ i += copy(dAtA[i:], m.User)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group)))
+ i += copy(dAtA[i:], m.Group)
+ return i, nil
+}
+
+func (m *RBDVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RBDVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.CephMonitors) > 0 {
+ for _, s := range m.CephMonitors {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.RBDImage)))
+ i += copy(dAtA[i:], m.RBDImage)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FSType)))
+ i += copy(dAtA[i:], m.FSType)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.RBDPool)))
+ i += copy(dAtA[i:], m.RBDPool)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.RadosUser)))
+ i += copy(dAtA[i:], m.RadosUser)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Keyring)))
+ i += copy(dAtA[i:], m.Keyring)
+ if m.SecretRef != nil {
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size()))
+ n144, err := m.SecretRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n144
+ }
+ dAtA[i] = 0x40
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *RangeAllocation) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RangeAllocation) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n145, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n145
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Range)))
+ i += copy(dAtA[i:], m.Range)
+ if m.Data != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Data)))
+ i += copy(dAtA[i:], m.Data)
+ }
+ return i, nil
+}
+
+func (m *ReplicationController) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReplicationController) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n146, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n146
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n147, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n147
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n148, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n148
+ return i, nil
+}
+
+func (m *ReplicationControllerCondition) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReplicationControllerCondition) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
+ i += copy(dAtA[i:], m.Status)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
+ n149, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n149
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ return i, nil
+}
+
+func (m *ReplicationControllerList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReplicationControllerList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n150, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n150
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ReplicationControllerSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReplicationControllerSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Replicas != nil {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.Replicas))
+ }
+ if len(m.Selector) > 0 {
+ keysForSelector := make([]string, 0, len(m.Selector))
+ for k := range m.Selector {
+ keysForSelector = append(keysForSelector, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForSelector)
+ for _, k := range keysForSelector {
+ dAtA[i] = 0x12
+ i++
+ v := m.Selector[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ if m.Template != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
+ n151, err := m.Template.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n151
+ }
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.MinReadySeconds))
+ return i, nil
+}
+
+func (m *ReplicationControllerStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReplicationControllerStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.FullyLabeledReplicas))
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration))
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ReadyReplicas))
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.AvailableReplicas))
+ if len(m.Conditions) > 0 {
+ for _, msg := range m.Conditions {
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ResourceFieldSelector) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceFieldSelector) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ContainerName)))
+ i += copy(dAtA[i:], m.ContainerName)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource)))
+ i += copy(dAtA[i:], m.Resource)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Divisor.Size()))
+ n152, err := m.Divisor.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n152
+ return i, nil
+}
+
+func (m *ResourceQuota) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceQuota) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n153, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n153
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n154, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n154
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n155, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n155
+ return i, nil
+}
+
+func (m *ResourceQuotaList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceQuotaList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n156, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n156
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ResourceQuotaSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceQuotaSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Hard) > 0 {
+ keysForHard := make([]string, 0, len(m.Hard))
+ for k := range m.Hard {
+ keysForHard = append(keysForHard, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForHard)
+ for _, k := range keysForHard {
+ dAtA[i] = 0xa
+ i++
+ v := m.Hard[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n157, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n157
+ }
+ }
+ if len(m.Scopes) > 0 {
+ for _, s := range m.Scopes {
+ dAtA[i] = 0x12
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *ResourceQuotaStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceQuotaStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Hard) > 0 {
+ keysForHard := make([]string, 0, len(m.Hard))
+ for k := range m.Hard {
+ keysForHard = append(keysForHard, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForHard)
+ for _, k := range keysForHard {
+ dAtA[i] = 0xa
+ i++
+ v := m.Hard[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n158, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n158
+ }
+ }
+ if len(m.Used) > 0 {
+ keysForUsed := make([]string, 0, len(m.Used))
+ for k := range m.Used {
+ keysForUsed = append(keysForUsed, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForUsed)
+ for _, k := range keysForUsed {
+ dAtA[i] = 0x12
+ i++
+ v := m.Used[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n159, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n159
+ }
+ }
+ return i, nil
+}
+
+func (m *ResourceRequirements) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceRequirements) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Limits) > 0 {
+ keysForLimits := make([]string, 0, len(m.Limits))
+ for k := range m.Limits {
+ keysForLimits = append(keysForLimits, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLimits)
+ for _, k := range keysForLimits {
+ dAtA[i] = 0xa
+ i++
+ v := m.Limits[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n160, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n160
+ }
+ }
+ if len(m.Requests) > 0 {
+ keysForRequests := make([]string, 0, len(m.Requests))
+ for k := range m.Requests {
+ keysForRequests = append(keysForRequests, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForRequests)
+ for _, k := range keysForRequests {
+ dAtA[i] = 0x12
+ i++
+ v := m.Requests[ResourceName(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n161, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n161
+ }
+ }
+ return i, nil
+}
+
+func (m *SELinuxOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SELinuxOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.User)))
+ i += copy(dAtA[i:], m.User)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Role)))
+ i += copy(dAtA[i:], m.Role)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Level)))
+ i += copy(dAtA[i:], m.Level)
+ return i, nil
+}
+
+func (m *ScaleIOVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ScaleIOVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Gateway)))
+ i += copy(dAtA[i:], m.Gateway)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.System)))
+ i += copy(dAtA[i:], m.System)
+ if m.SecretRef != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size()))
+ n162, err := m.SecretRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n162
+ }
+ dAtA[i] = 0x20
+ i++
+ if m.SSLEnabled {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ProtectionDomain)))
+ i += copy(dAtA[i:], m.ProtectionDomain)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.StoragePool)))
+ i += copy(dAtA[i:], m.StoragePool)
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.StorageMode)))
+ i += copy(dAtA[i:], m.StorageMode)
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.VolumeName)))
+ i += copy(dAtA[i:], m.VolumeName)
+ dAtA[i] = 0x4a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FSType)))
+ i += copy(dAtA[i:], m.FSType)
+ dAtA[i] = 0x50
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *Secret) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Secret) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n163, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n163
+ if len(m.Data) > 0 {
+ keysForData := make([]string, 0, len(m.Data))
+ for k := range m.Data {
+ keysForData = append(keysForData, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForData)
+ for _, k := range keysForData {
+ dAtA[i] = 0x12
+ i++
+ v := m.Data[string(k)]
+ byteSize := 0
+ if v != nil {
+ byteSize = 1 + len(v) + sovGenerated(uint64(len(v)))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + byteSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ if v != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ if len(m.StringData) > 0 {
+ keysForStringData := make([]string, 0, len(m.StringData))
+ for k := range m.StringData {
+ keysForStringData = append(keysForStringData, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForStringData)
+ for _, k := range keysForStringData {
+ dAtA[i] = 0x22
+ i++
+ v := m.StringData[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ return i, nil
+}
+
+func (m *SecretEnvSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SecretEnvSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LocalObjectReference.Size()))
+ n164, err := m.LocalObjectReference.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n164
+ if m.Optional != nil {
+ dAtA[i] = 0x10
+ i++
+ if *m.Optional {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ return i, nil
+}
+
+func (m *SecretKeySelector) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SecretKeySelector) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LocalObjectReference.Size()))
+ n165, err := m.LocalObjectReference.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n165
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key)))
+ i += copy(dAtA[i:], m.Key)
+ if m.Optional != nil {
+ dAtA[i] = 0x18
+ i++
+ if *m.Optional {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ return i, nil
+}
+
+func (m *SecretList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SecretList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n166, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n166
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *SecretProjection) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SecretProjection) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LocalObjectReference.Size()))
+ n167, err := m.LocalObjectReference.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n167
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.Optional != nil {
+ dAtA[i] = 0x20
+ i++
+ if *m.Optional {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ return i, nil
+}
+
+func (m *SecretVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SecretVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.SecretName)))
+ i += copy(dAtA[i:], m.SecretName)
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.DefaultMode != nil {
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.DefaultMode))
+ }
+ if m.Optional != nil {
+ dAtA[i] = 0x20
+ i++
+ if *m.Optional {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ return i, nil
+}
+
+func (m *SecurityContext) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SecurityContext) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Capabilities != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Capabilities.Size()))
+ n168, err := m.Capabilities.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n168
+ }
+ if m.Privileged != nil {
+ dAtA[i] = 0x10
+ i++
+ if *m.Privileged {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if m.SELinuxOptions != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SELinuxOptions.Size()))
+ n169, err := m.SELinuxOptions.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n169
+ }
+ if m.RunAsUser != nil {
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.RunAsUser))
+ }
+ if m.RunAsNonRoot != nil {
+ dAtA[i] = 0x28
+ i++
+ if *m.RunAsNonRoot {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if m.ReadOnlyRootFilesystem != nil {
+ dAtA[i] = 0x30
+ i++
+ if *m.ReadOnlyRootFilesystem {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ return i, nil
+}
+
+func (m *SerializedReference) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SerializedReference) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Reference.Size()))
+ n170, err := m.Reference.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n170
+ return i, nil
+}
+
+func (m *Service) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Service) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n171, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n171
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n172, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n172
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n173, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n173
+ return i, nil
+}
+
+func (m *ServiceAccount) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ServiceAccount) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n174, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n174
+ if len(m.Secrets) > 0 {
+ for _, msg := range m.Secrets {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.ImagePullSecrets) > 0 {
+ for _, msg := range m.ImagePullSecrets {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.AutomountServiceAccountToken != nil {
+ dAtA[i] = 0x20
+ i++
+ if *m.AutomountServiceAccountToken {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ return i, nil
+}
+
+func (m *ServiceAccountList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ServiceAccountList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n175, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n175
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ServiceList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ServiceList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n176, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n176
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ServicePort) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ServicePort) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Protocol)))
+ i += copy(dAtA[i:], m.Protocol)
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Port))
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.TargetPort.Size()))
+ n177, err := m.TargetPort.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n177
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NodePort))
+ return i, nil
+}
+
+func (m *ServiceProxyOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ServiceProxyOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i += copy(dAtA[i:], m.Path)
+ return i, nil
+}
+
+func (m *ServiceSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ServiceSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Ports) > 0 {
+ for _, msg := range m.Ports {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Selector) > 0 {
+ keysForSelector := make([]string, 0, len(m.Selector))
+ for k := range m.Selector {
+ keysForSelector = append(keysForSelector, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForSelector)
+ for _, k := range keysForSelector {
+ dAtA[i] = 0x12
+ i++
+ v := m.Selector[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ClusterIP)))
+ i += copy(dAtA[i:], m.ClusterIP)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ if len(m.ExternalIPs) > 0 {
+ for _, s := range m.ExternalIPs {
+ dAtA[i] = 0x2a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.SessionAffinity)))
+ i += copy(dAtA[i:], m.SessionAffinity)
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.LoadBalancerIP)))
+ i += copy(dAtA[i:], m.LoadBalancerIP)
+ if len(m.LoadBalancerSourceRanges) > 0 {
+ for _, s := range m.LoadBalancerSourceRanges {
+ dAtA[i] = 0x4a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ dAtA[i] = 0x52
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ExternalName)))
+ i += copy(dAtA[i:], m.ExternalName)
+ dAtA[i] = 0x5a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ExternalTrafficPolicy)))
+ i += copy(dAtA[i:], m.ExternalTrafficPolicy)
+ dAtA[i] = 0x60
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.HealthCheckNodePort))
+ return i, nil
+}
+
+func (m *ServiceStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ServiceStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LoadBalancer.Size()))
+ n178, err := m.LoadBalancer.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n178
+ return i, nil
+}
+
+func (m *StorageOSPersistentVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StorageOSPersistentVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.VolumeName)))
+ i += copy(dAtA[i:], m.VolumeName)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.VolumeNamespace)))
+ i += copy(dAtA[i:], m.VolumeNamespace)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FSType)))
+ i += copy(dAtA[i:], m.FSType)
+ dAtA[i] = 0x20
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ if m.SecretRef != nil {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size()))
+ n179, err := m.SecretRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n179
+ }
+ return i, nil
+}
+
+func (m *StorageOSVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StorageOSVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.VolumeName)))
+ i += copy(dAtA[i:], m.VolumeName)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.VolumeNamespace)))
+ i += copy(dAtA[i:], m.VolumeNamespace)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FSType)))
+ i += copy(dAtA[i:], m.FSType)
+ dAtA[i] = 0x20
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ if m.SecretRef != nil {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size()))
+ n180, err := m.SecretRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n180
+ }
+ return i, nil
+}
+
+func (m *Sysctl) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Sysctl) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Value)))
+ i += copy(dAtA[i:], m.Value)
+ return i, nil
+}
+
+func (m *TCPSocketAction) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *TCPSocketAction) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Port.Size()))
+ n181, err := m.Port.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n181
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Host)))
+ i += copy(dAtA[i:], m.Host)
+ return i, nil
+}
+
+func (m *Taint) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Taint) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key)))
+ i += copy(dAtA[i:], m.Key)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Value)))
+ i += copy(dAtA[i:], m.Value)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Effect)))
+ i += copy(dAtA[i:], m.Effect)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.TimeAdded.Size()))
+ n182, err := m.TimeAdded.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n182
+ return i, nil
+}
+
+func (m *Toleration) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Toleration) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key)))
+ i += copy(dAtA[i:], m.Key)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Operator)))
+ i += copy(dAtA[i:], m.Operator)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Value)))
+ i += copy(dAtA[i:], m.Value)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Effect)))
+ i += copy(dAtA[i:], m.Effect)
+ if m.TolerationSeconds != nil {
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.TolerationSeconds))
+ }
+ return i, nil
+}
+
+func (m *Volume) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Volume) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.VolumeSource.Size()))
+ n183, err := m.VolumeSource.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n183
+ return i, nil
+}
+
+func (m *VolumeMount) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *VolumeMount) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x10
+ i++
+ if m.ReadOnly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.MountPath)))
+ i += copy(dAtA[i:], m.MountPath)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.SubPath)))
+ i += copy(dAtA[i:], m.SubPath)
+ return i, nil
+}
+
+func (m *VolumeProjection) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *VolumeProjection) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Secret != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Secret.Size()))
+ n184, err := m.Secret.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n184
+ }
+ if m.DownwardAPI != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.DownwardAPI.Size()))
+ n185, err := m.DownwardAPI.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n185
+ }
+ if m.ConfigMap != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ConfigMap.Size()))
+ n186, err := m.ConfigMap.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n186
+ }
+ return i, nil
+}
+
+func (m *VolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *VolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.HostPath != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.HostPath.Size()))
+ n187, err := m.HostPath.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n187
+ }
+ if m.EmptyDir != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.EmptyDir.Size()))
+ n188, err := m.EmptyDir.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n188
+ }
+ if m.GCEPersistentDisk != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.GCEPersistentDisk.Size()))
+ n189, err := m.GCEPersistentDisk.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n189
+ }
+ if m.AWSElasticBlockStore != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.AWSElasticBlockStore.Size()))
+ n190, err := m.AWSElasticBlockStore.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n190
+ }
+ if m.GitRepo != nil {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.GitRepo.Size()))
+ n191, err := m.GitRepo.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n191
+ }
+ if m.Secret != nil {
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Secret.Size()))
+ n192, err := m.Secret.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n192
+ }
+ if m.NFS != nil {
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NFS.Size()))
+ n193, err := m.NFS.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n193
+ }
+ if m.ISCSI != nil {
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ISCSI.Size()))
+ n194, err := m.ISCSI.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n194
+ }
+ if m.Glusterfs != nil {
+ dAtA[i] = 0x4a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Glusterfs.Size()))
+ n195, err := m.Glusterfs.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n195
+ }
+ if m.PersistentVolumeClaim != nil {
+ dAtA[i] = 0x52
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PersistentVolumeClaim.Size()))
+ n196, err := m.PersistentVolumeClaim.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n196
+ }
+ if m.RBD != nil {
+ dAtA[i] = 0x5a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RBD.Size()))
+ n197, err := m.RBD.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n197
+ }
+ if m.FlexVolume != nil {
+ dAtA[i] = 0x62
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.FlexVolume.Size()))
+ n198, err := m.FlexVolume.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n198
+ }
+ if m.Cinder != nil {
+ dAtA[i] = 0x6a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Cinder.Size()))
+ n199, err := m.Cinder.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n199
+ }
+ if m.CephFS != nil {
+ dAtA[i] = 0x72
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CephFS.Size()))
+ n200, err := m.CephFS.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n200
+ }
+ if m.Flocker != nil {
+ dAtA[i] = 0x7a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Flocker.Size()))
+ n201, err := m.Flocker.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n201
+ }
+ if m.DownwardAPI != nil {
+ dAtA[i] = 0x82
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.DownwardAPI.Size()))
+ n202, err := m.DownwardAPI.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n202
+ }
+ if m.FC != nil {
+ dAtA[i] = 0x8a
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.FC.Size()))
+ n203, err := m.FC.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n203
+ }
+ if m.AzureFile != nil {
+ dAtA[i] = 0x92
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.AzureFile.Size()))
+ n204, err := m.AzureFile.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n204
+ }
+ if m.ConfigMap != nil {
+ dAtA[i] = 0x9a
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ConfigMap.Size()))
+ n205, err := m.ConfigMap.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n205
+ }
+ if m.VsphereVolume != nil {
+ dAtA[i] = 0xa2
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.VsphereVolume.Size()))
+ n206, err := m.VsphereVolume.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n206
+ }
+ if m.Quobyte != nil {
+ dAtA[i] = 0xaa
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Quobyte.Size()))
+ n207, err := m.Quobyte.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n207
+ }
+ if m.AzureDisk != nil {
+ dAtA[i] = 0xb2
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.AzureDisk.Size()))
+ n208, err := m.AzureDisk.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n208
+ }
+ if m.PhotonPersistentDisk != nil {
+ dAtA[i] = 0xba
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PhotonPersistentDisk.Size()))
+ n209, err := m.PhotonPersistentDisk.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n209
+ }
+ if m.PortworxVolume != nil {
+ dAtA[i] = 0xc2
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PortworxVolume.Size()))
+ n210, err := m.PortworxVolume.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n210
+ }
+ if m.ScaleIO != nil {
+ dAtA[i] = 0xca
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ScaleIO.Size()))
+ n211, err := m.ScaleIO.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n211
+ }
+ if m.Projected != nil {
+ dAtA[i] = 0xd2
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Projected.Size()))
+ n212, err := m.Projected.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n212
+ }
+ if m.StorageOS != nil {
+ dAtA[i] = 0xda
+ i++
+ dAtA[i] = 0x1
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.StorageOS.Size()))
+ n213, err := m.StorageOS.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n213
+ }
+ return i, nil
+}
+
+func (m *VsphereVirtualDiskVolumeSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *VsphereVirtualDiskVolumeSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.VolumePath)))
+ i += copy(dAtA[i:], m.VolumePath)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FSType)))
+ i += copy(dAtA[i:], m.FSType)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.StoragePolicyName)))
+ i += copy(dAtA[i:], m.StoragePolicyName)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.StoragePolicyID)))
+ i += copy(dAtA[i:], m.StoragePolicyID)
+ return i, nil
+}
+
+func (m *WeightedPodAffinityTerm) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *WeightedPodAffinityTerm) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Weight))
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PodAffinityTerm.Size()))
+ n214, err := m.PodAffinityTerm.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n214
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *AWSElasticBlockStoreVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.VolumeID)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FSType)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.Partition))
+ n += 2
+ return n
+}
+
+func (m *Affinity) Size() (n int) {
+ var l int
+ _ = l
+ if m.NodeAffinity != nil {
+ l = m.NodeAffinity.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.PodAffinity != nil {
+ l = m.PodAffinity.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.PodAntiAffinity != nil {
+ l = m.PodAntiAffinity.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *AttachedVolume) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.DevicePath)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *AvoidPods) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.PreferAvoidPods) > 0 {
+ for _, e := range m.PreferAvoidPods {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *AzureDiskVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.DiskName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.DataDiskURI)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.CachingMode != nil {
+ l = len(*m.CachingMode)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.FSType != nil {
+ l = len(*m.FSType)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.ReadOnly != nil {
+ n += 2
+ }
+ if m.Kind != nil {
+ l = len(*m.Kind)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *AzureFileVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.SecretName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ShareName)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ return n
+}
+
+func (m *Binding) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Target.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Capabilities) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Add) > 0 {
+ for _, s := range m.Add {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Drop) > 0 {
+ for _, s := range m.Drop {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *CephFSVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Monitors) > 0 {
+ for _, s := range m.Monitors {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.User)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.SecretFile)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.SecretRef != nil {
+ l = m.SecretRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ n += 2
+ return n
+}
+
+func (m *CinderVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.VolumeID)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FSType)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ return n
+}
+
+func (m *ComponentCondition) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Status)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Error)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ComponentStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Conditions) > 0 {
+ for _, e := range m.Conditions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ComponentStatusList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ConfigMap) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Data) > 0 {
+ for k, v := range m.Data {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *ConfigMapEnvSource) Size() (n int) {
+ var l int
+ _ = l
+ l = m.LocalObjectReference.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Optional != nil {
+ n += 2
+ }
+ return n
+}
+
+func (m *ConfigMapKeySelector) Size() (n int) {
+ var l int
+ _ = l
+ l = m.LocalObjectReference.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Key)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Optional != nil {
+ n += 2
+ }
+ return n
+}
+
+func (m *ConfigMapList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ConfigMapProjection) Size() (n int) {
+ var l int
+ _ = l
+ l = m.LocalObjectReference.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.Optional != nil {
+ n += 2
+ }
+ return n
+}
+
+func (m *ConfigMapVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = m.LocalObjectReference.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.DefaultMode != nil {
+ n += 1 + sovGenerated(uint64(*m.DefaultMode))
+ }
+ if m.Optional != nil {
+ n += 2
+ }
+ return n
+}
+
+func (m *Container) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Image)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Command) > 0 {
+ for _, s := range m.Command {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Args) > 0 {
+ for _, s := range m.Args {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.WorkingDir)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Ports) > 0 {
+ for _, e := range m.Ports {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Env) > 0 {
+ for _, e := range m.Env {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = m.Resources.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.VolumeMounts) > 0 {
+ for _, e := range m.VolumeMounts {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.LivenessProbe != nil {
+ l = m.LivenessProbe.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.ReadinessProbe != nil {
+ l = m.ReadinessProbe.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Lifecycle != nil {
+ l = m.Lifecycle.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ l = len(m.TerminationMessagePath)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ImagePullPolicy)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.SecurityContext != nil {
+ l = m.SecurityContext.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ n += 3
+ n += 3
+ n += 3
+ if len(m.EnvFrom) > 0 {
+ for _, e := range m.EnvFrom {
+ l = e.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.TerminationMessagePolicy)
+ n += 2 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ContainerImage) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Names) > 0 {
+ for _, s := range m.Names {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ n += 1 + sovGenerated(uint64(m.SizeBytes))
+ return n
+}
+
+func (m *ContainerPort) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.HostPort))
+ n += 1 + sovGenerated(uint64(m.ContainerPort))
+ l = len(m.Protocol)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.HostIP)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ContainerState) Size() (n int) {
+ var l int
+ _ = l
+ if m.Waiting != nil {
+ l = m.Waiting.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Running != nil {
+ l = m.Running.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Terminated != nil {
+ l = m.Terminated.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *ContainerStateRunning) Size() (n int) {
+ var l int
+ _ = l
+ l = m.StartedAt.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ContainerStateTerminated) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.ExitCode))
+ n += 1 + sovGenerated(uint64(m.Signal))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.StartedAt.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.FinishedAt.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ContainerID)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ContainerStateWaiting) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ContainerStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.State.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastTerminationState.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ n += 1 + sovGenerated(uint64(m.RestartCount))
+ l = len(m.Image)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ImageID)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ContainerID)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *DaemonEndpoint) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Port))
+ return n
+}
+
+func (m *DeleteOptions) Size() (n int) {
+ var l int
+ _ = l
+ if m.GracePeriodSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.GracePeriodSeconds))
+ }
+ if m.Preconditions != nil {
+ l = m.Preconditions.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.OrphanDependents != nil {
+ n += 2
+ }
+ if m.PropagationPolicy != nil {
+ l = len(*m.PropagationPolicy)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *DownwardAPIProjection) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *DownwardAPIVolumeFile) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.FieldRef != nil {
+ l = m.FieldRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.ResourceFieldRef != nil {
+ l = m.ResourceFieldRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Mode != nil {
+ n += 1 + sovGenerated(uint64(*m.Mode))
+ }
+ return n
+}
+
+func (m *DownwardAPIVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.DefaultMode != nil {
+ n += 1 + sovGenerated(uint64(*m.DefaultMode))
+ }
+ return n
+}
+
+func (m *EmptyDirVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Medium)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.SizeLimit != nil {
+ l = m.SizeLimit.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *EndpointAddress) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.IP)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.TargetRef != nil {
+ l = m.TargetRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ l = len(m.Hostname)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.NodeName != nil {
+ l = len(*m.NodeName)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *EndpointPort) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.Port))
+ l = len(m.Protocol)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *EndpointSubset) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Addresses) > 0 {
+ for _, e := range m.Addresses {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.NotReadyAddresses) > 0 {
+ for _, e := range m.NotReadyAddresses {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Ports) > 0 {
+ for _, e := range m.Ports {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *Endpoints) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Subsets) > 0 {
+ for _, e := range m.Subsets {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *EndpointsList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *EnvFromSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Prefix)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.ConfigMapRef != nil {
+ l = m.ConfigMapRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.SecretRef != nil {
+ l = m.SecretRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *EnvVar) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Value)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.ValueFrom != nil {
+ l = m.ValueFrom.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *EnvVarSource) Size() (n int) {
+ var l int
+ _ = l
+ if m.FieldRef != nil {
+ l = m.FieldRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.ResourceFieldRef != nil {
+ l = m.ResourceFieldRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.ConfigMapKeyRef != nil {
+ l = m.ConfigMapKeyRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.SecretKeyRef != nil {
+ l = m.SecretKeyRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *Event) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.InvolvedObject.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Source.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.FirstTimestamp.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastTimestamp.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.Count))
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *EventList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *EventSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Component)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Host)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ExecAction) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Command) > 0 {
+ for _, s := range m.Command {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *FCVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.TargetWWNs) > 0 {
+ for _, s := range m.TargetWWNs {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.Lun != nil {
+ n += 1 + sovGenerated(uint64(*m.Lun))
+ }
+ l = len(m.FSType)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ return n
+}
+
+func (m *FlexVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Driver)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FSType)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.SecretRef != nil {
+ l = m.SecretRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ n += 2
+ if len(m.Options) > 0 {
+ for k, v := range m.Options {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *FlockerVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.DatasetName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.DatasetUUID)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *GCEPersistentDiskVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.PDName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FSType)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.Partition))
+ n += 2
+ return n
+}
+
+func (m *GitRepoVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Repository)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Revision)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Directory)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *GlusterfsVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.EndpointsName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ return n
+}
+
+func (m *HTTPGetAction) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Port.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Host)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Scheme)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.HTTPHeaders) > 0 {
+ for _, e := range m.HTTPHeaders {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *HTTPHeader) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Value)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Handler) Size() (n int) {
+ var l int
+ _ = l
+ if m.Exec != nil {
+ l = m.Exec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.HTTPGet != nil {
+ l = m.HTTPGet.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.TCPSocket != nil {
+ l = m.TCPSocket.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *HostAlias) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.IP)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Hostnames) > 0 {
+ for _, s := range m.Hostnames {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *HostPathVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ISCSIVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.TargetPortal)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.IQN)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.Lun))
+ l = len(m.ISCSIInterface)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FSType)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ if len(m.Portals) > 0 {
+ for _, s := range m.Portals {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ n += 2
+ if m.SecretRef != nil {
+ l = m.SecretRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ n += 2
+ return n
+}
+
+func (m *KeyToPath) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Key)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Mode != nil {
+ n += 1 + sovGenerated(uint64(*m.Mode))
+ }
+ return n
+}
+
+func (m *Lifecycle) Size() (n int) {
+ var l int
+ _ = l
+ if m.PostStart != nil {
+ l = m.PostStart.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.PreStop != nil {
+ l = m.PreStop.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *LimitRange) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *LimitRangeItem) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Max) > 0 {
+ for k, v := range m.Max {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ if len(m.Min) > 0 {
+ for k, v := range m.Min {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ if len(m.Default) > 0 {
+ for k, v := range m.Default {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ if len(m.DefaultRequest) > 0 {
+ for k, v := range m.DefaultRequest {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ if len(m.MaxLimitRequestRatio) > 0 {
+ for k, v := range m.MaxLimitRequestRatio {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *LimitRangeList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *LimitRangeSpec) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Limits) > 0 {
+ for _, e := range m.Limits {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *List) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ListOptions) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.LabelSelector)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FieldSelector)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ l = len(m.ResourceVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.TimeoutSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.TimeoutSeconds))
+ }
+ n += 2
+ return n
+}
+
+func (m *LoadBalancerIngress) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.IP)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Hostname)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *LoadBalancerStatus) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Ingress) > 0 {
+ for _, e := range m.Ingress {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *LocalObjectReference) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *LocalVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *NFSVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Server)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ return n
+}
+
+func (m *Namespace) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *NamespaceList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *NamespaceSpec) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Finalizers) > 0 {
+ for _, s := range m.Finalizers {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *NamespaceStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Phase)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Node) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *NodeAddress) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Address)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *NodeAffinity) Size() (n int) {
+ var l int
+ _ = l
+ if m.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ l = m.RequiredDuringSchedulingIgnoredDuringExecution.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if len(m.PreferredDuringSchedulingIgnoredDuringExecution) > 0 {
+ for _, e := range m.PreferredDuringSchedulingIgnoredDuringExecution {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *NodeCondition) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Status)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastHeartbeatTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastTransitionTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *NodeDaemonEndpoints) Size() (n int) {
+ var l int
+ _ = l
+ l = m.KubeletEndpoint.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *NodeList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *NodeProxyOptions) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *NodeResources) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Capacity) > 0 {
+ for k, v := range m.Capacity {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *NodeSelector) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.NodeSelectorTerms) > 0 {
+ for _, e := range m.NodeSelectorTerms {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *NodeSelectorRequirement) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Key)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Operator)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Values) > 0 {
+ for _, s := range m.Values {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *NodeSelectorTerm) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.MatchExpressions) > 0 {
+ for _, e := range m.MatchExpressions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *NodeSpec) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.PodCIDR)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ExternalID)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ProviderID)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ if len(m.Taints) > 0 {
+ for _, e := range m.Taints {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *NodeStatus) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Capacity) > 0 {
+ for k, v := range m.Capacity {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ if len(m.Allocatable) > 0 {
+ for k, v := range m.Allocatable {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ l = len(m.Phase)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Conditions) > 0 {
+ for _, e := range m.Conditions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Addresses) > 0 {
+ for _, e := range m.Addresses {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = m.DaemonEndpoints.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.NodeInfo.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Images) > 0 {
+ for _, e := range m.Images {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.VolumesInUse) > 0 {
+ for _, s := range m.VolumesInUse {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.VolumesAttached) > 0 {
+ for _, e := range m.VolumesAttached {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *NodeSystemInfo) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.MachineID)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.SystemUUID)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.BootID)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.KernelVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.OSImage)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ContainerRuntimeVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.KubeletVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.KubeProxyVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.OperatingSystem)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Architecture)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ObjectFieldSelector) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.APIVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FieldPath)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ObjectMeta) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.GenerateName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Namespace)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.SelfLink)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.UID)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ResourceVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.Generation))
+ l = m.CreationTimestamp.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.DeletionTimestamp != nil {
+ l = m.DeletionTimestamp.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.DeletionGracePeriodSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.DeletionGracePeriodSeconds))
+ }
+ if len(m.Labels) > 0 {
+ for k, v := range m.Labels {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ if len(m.Annotations) > 0 {
+ for k, v := range m.Annotations {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ if len(m.OwnerReferences) > 0 {
+ for _, e := range m.OwnerReferences {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Finalizers) > 0 {
+ for _, s := range m.Finalizers {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.ClusterName)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Initializers != nil {
+ l = m.Initializers.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *ObjectReference) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Kind)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Namespace)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.UID)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.APIVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ResourceVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FieldPath)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PersistentVolume) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PersistentVolumeClaim) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PersistentVolumeClaimList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PersistentVolumeClaimSpec) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.AccessModes) > 0 {
+ for _, s := range m.AccessModes {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = m.Resources.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.VolumeName)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Selector != nil {
+ l = m.Selector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.StorageClassName != nil {
+ l = len(*m.StorageClassName)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *PersistentVolumeClaimStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Phase)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.AccessModes) > 0 {
+ for _, s := range m.AccessModes {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Capacity) > 0 {
+ for k, v := range m.Capacity {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *PersistentVolumeClaimVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.ClaimName)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ return n
+}
+
+func (m *PersistentVolumeList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PersistentVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ if m.GCEPersistentDisk != nil {
+ l = m.GCEPersistentDisk.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.AWSElasticBlockStore != nil {
+ l = m.AWSElasticBlockStore.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.HostPath != nil {
+ l = m.HostPath.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Glusterfs != nil {
+ l = m.Glusterfs.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.NFS != nil {
+ l = m.NFS.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.RBD != nil {
+ l = m.RBD.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.ISCSI != nil {
+ l = m.ISCSI.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Cinder != nil {
+ l = m.Cinder.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.CephFS != nil {
+ l = m.CephFS.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.FC != nil {
+ l = m.FC.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Flocker != nil {
+ l = m.Flocker.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.FlexVolume != nil {
+ l = m.FlexVolume.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.AzureFile != nil {
+ l = m.AzureFile.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.VsphereVolume != nil {
+ l = m.VsphereVolume.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Quobyte != nil {
+ l = m.Quobyte.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.AzureDisk != nil {
+ l = m.AzureDisk.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.PhotonPersistentDisk != nil {
+ l = m.PhotonPersistentDisk.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.PortworxVolume != nil {
+ l = m.PortworxVolume.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.ScaleIO != nil {
+ l = m.ScaleIO.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.Local != nil {
+ l = m.Local.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.StorageOS != nil {
+ l = m.StorageOS.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *PersistentVolumeSpec) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Capacity) > 0 {
+ for k, v := range m.Capacity {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ l = m.PersistentVolumeSource.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.AccessModes) > 0 {
+ for _, s := range m.AccessModes {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.ClaimRef != nil {
+ l = m.ClaimRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ l = len(m.PersistentVolumeReclaimPolicy)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.StorageClassName)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PersistentVolumeStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Phase)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PhotonPersistentDiskVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.PdID)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FSType)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Pod) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodAffinity) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.RequiredDuringSchedulingIgnoredDuringExecution) > 0 {
+ for _, e := range m.RequiredDuringSchedulingIgnoredDuringExecution {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.PreferredDuringSchedulingIgnoredDuringExecution) > 0 {
+ for _, e := range m.PreferredDuringSchedulingIgnoredDuringExecution {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PodAffinityTerm) Size() (n int) {
+ var l int
+ _ = l
+ if m.LabelSelector != nil {
+ l = m.LabelSelector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if len(m.Namespaces) > 0 {
+ for _, s := range m.Namespaces {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.TopologyKey)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodAntiAffinity) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.RequiredDuringSchedulingIgnoredDuringExecution) > 0 {
+ for _, e := range m.RequiredDuringSchedulingIgnoredDuringExecution {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.PreferredDuringSchedulingIgnoredDuringExecution) > 0 {
+ for _, e := range m.PreferredDuringSchedulingIgnoredDuringExecution {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PodAttachOptions) Size() (n int) {
+ var l int
+ _ = l
+ n += 2
+ n += 2
+ n += 2
+ n += 2
+ l = len(m.Container)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodCondition) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Status)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastProbeTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastTransitionTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodExecOptions) Size() (n int) {
+ var l int
+ _ = l
+ n += 2
+ n += 2
+ n += 2
+ n += 2
+ l = len(m.Container)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Command) > 0 {
+ for _, s := range m.Command {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PodList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PodLogOptions) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Container)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ n += 2
+ if m.SinceSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.SinceSeconds))
+ }
+ if m.SinceTime != nil {
+ l = m.SinceTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ n += 2
+ if m.TailLines != nil {
+ n += 1 + sovGenerated(uint64(*m.TailLines))
+ }
+ if m.LimitBytes != nil {
+ n += 1 + sovGenerated(uint64(*m.LimitBytes))
+ }
+ return n
+}
+
+func (m *PodPortForwardOptions) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Ports) > 0 {
+ for _, e := range m.Ports {
+ n += 1 + sovGenerated(uint64(e))
+ }
+ }
+ return n
+}
+
+func (m *PodProxyOptions) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodSecurityContext) Size() (n int) {
+ var l int
+ _ = l
+ if m.SELinuxOptions != nil {
+ l = m.SELinuxOptions.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.RunAsUser != nil {
+ n += 1 + sovGenerated(uint64(*m.RunAsUser))
+ }
+ if m.RunAsNonRoot != nil {
+ n += 2
+ }
+ if len(m.SupplementalGroups) > 0 {
+ for _, e := range m.SupplementalGroups {
+ n += 1 + sovGenerated(uint64(e))
+ }
+ }
+ if m.FSGroup != nil {
+ n += 1 + sovGenerated(uint64(*m.FSGroup))
+ }
+ return n
+}
+
+func (m *PodSignature) Size() (n int) {
+ var l int
+ _ = l
+ if m.PodController != nil {
+ l = m.PodController.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *PodSpec) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Volumes) > 0 {
+ for _, e := range m.Volumes {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Containers) > 0 {
+ for _, e := range m.Containers {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.RestartPolicy)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.TerminationGracePeriodSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.TerminationGracePeriodSeconds))
+ }
+ if m.ActiveDeadlineSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.ActiveDeadlineSeconds))
+ }
+ l = len(m.DNSPolicy)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.NodeSelector) > 0 {
+ for k, v := range m.NodeSelector {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ l = len(m.ServiceAccountName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.DeprecatedServiceAccount)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.NodeName)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ n += 2
+ n += 2
+ if m.SecurityContext != nil {
+ l = m.SecurityContext.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if len(m.ImagePullSecrets) > 0 {
+ for _, e := range m.ImagePullSecrets {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.Hostname)
+ n += 2 + l + sovGenerated(uint64(l))
+ l = len(m.Subdomain)
+ n += 2 + l + sovGenerated(uint64(l))
+ if m.Affinity != nil {
+ l = m.Affinity.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ l = len(m.SchedulerName)
+ n += 2 + l + sovGenerated(uint64(l))
+ if len(m.InitContainers) > 0 {
+ for _, e := range m.InitContainers {
+ l = e.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.AutomountServiceAccountToken != nil {
+ n += 3
+ }
+ if len(m.Tolerations) > 0 {
+ for _, e := range m.Tolerations {
+ l = e.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.HostAliases) > 0 {
+ for _, e := range m.HostAliases {
+ l = e.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PodStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Phase)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Conditions) > 0 {
+ for _, e := range m.Conditions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.HostIP)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.PodIP)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.StartTime != nil {
+ l = m.StartTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if len(m.ContainerStatuses) > 0 {
+ for _, e := range m.ContainerStatuses {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.QOSClass)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.InitContainerStatuses) > 0 {
+ for _, e := range m.InitContainerStatuses {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PodStatusResult) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodTemplate) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Template.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodTemplateList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PodTemplateSpec) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PortworxVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.VolumeID)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FSType)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ return n
+}
+
+func (m *Preconditions) Size() (n int) {
+ var l int
+ _ = l
+ if m.UID != nil {
+ l = len(*m.UID)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *PreferAvoidPodsEntry) Size() (n int) {
+ var l int
+ _ = l
+ l = m.PodSignature.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.EvictionTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PreferredSchedulingTerm) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Weight))
+ l = m.Preference.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Probe) Size() (n int) {
+ var l int
+ _ = l
+ l = m.Handler.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.InitialDelaySeconds))
+ n += 1 + sovGenerated(uint64(m.TimeoutSeconds))
+ n += 1 + sovGenerated(uint64(m.PeriodSeconds))
+ n += 1 + sovGenerated(uint64(m.SuccessThreshold))
+ n += 1 + sovGenerated(uint64(m.FailureThreshold))
+ return n
+}
+
+func (m *ProjectedVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Sources) > 0 {
+ for _, e := range m.Sources {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.DefaultMode != nil {
+ n += 1 + sovGenerated(uint64(*m.DefaultMode))
+ }
+ return n
+}
+
+func (m *QuobyteVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Registry)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Volume)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ l = len(m.User)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Group)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *RBDVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.CephMonitors) > 0 {
+ for _, s := range m.CephMonitors {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.RBDImage)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FSType)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.RBDPool)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.RadosUser)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Keyring)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.SecretRef != nil {
+ l = m.SecretRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ n += 2
+ return n
+}
+
+func (m *RangeAllocation) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Range)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Data != nil {
+ l = len(m.Data)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *ReplicationController) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ReplicationControllerCondition) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Status)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastTransitionTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ReplicationControllerList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ReplicationControllerSpec) Size() (n int) {
+ var l int
+ _ = l
+ if m.Replicas != nil {
+ n += 1 + sovGenerated(uint64(*m.Replicas))
+ }
+ if len(m.Selector) > 0 {
+ for k, v := range m.Selector {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ if m.Template != nil {
+ l = m.Template.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ n += 1 + sovGenerated(uint64(m.MinReadySeconds))
+ return n
+}
+
+func (m *ReplicationControllerStatus) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Replicas))
+ n += 1 + sovGenerated(uint64(m.FullyLabeledReplicas))
+ n += 1 + sovGenerated(uint64(m.ObservedGeneration))
+ n += 1 + sovGenerated(uint64(m.ReadyReplicas))
+ n += 1 + sovGenerated(uint64(m.AvailableReplicas))
+ if len(m.Conditions) > 0 {
+ for _, e := range m.Conditions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ResourceFieldSelector) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.ContainerName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Resource)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Divisor.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ResourceQuota) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ResourceQuotaList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ResourceQuotaSpec) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Hard) > 0 {
+ for k, v := range m.Hard {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ if len(m.Scopes) > 0 {
+ for _, s := range m.Scopes {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ResourceQuotaStatus) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Hard) > 0 {
+ for k, v := range m.Hard {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ if len(m.Used) > 0 {
+ for k, v := range m.Used {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *ResourceRequirements) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Limits) > 0 {
+ for k, v := range m.Limits {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ if len(m.Requests) > 0 {
+ for k, v := range m.Requests {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *SELinuxOptions) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.User)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Role)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Level)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ScaleIOVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Gateway)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.System)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.SecretRef != nil {
+ l = m.SecretRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ n += 2
+ l = len(m.ProtectionDomain)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.StoragePool)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.StorageMode)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.VolumeName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FSType)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ return n
+}
+
+func (m *Secret) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Data) > 0 {
+ for k, v := range m.Data {
+ _ = k
+ _ = v
+ l = 0
+ if v != nil {
+ l = 1 + len(v) + sovGenerated(uint64(len(v)))
+ }
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + l
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.StringData) > 0 {
+ for k, v := range m.StringData {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *SecretEnvSource) Size() (n int) {
+ var l int
+ _ = l
+ l = m.LocalObjectReference.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Optional != nil {
+ n += 2
+ }
+ return n
+}
+
+func (m *SecretKeySelector) Size() (n int) {
+ var l int
+ _ = l
+ l = m.LocalObjectReference.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Key)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Optional != nil {
+ n += 2
+ }
+ return n
+}
+
+func (m *SecretList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *SecretProjection) Size() (n int) {
+ var l int
+ _ = l
+ l = m.LocalObjectReference.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.Optional != nil {
+ n += 2
+ }
+ return n
+}
+
+func (m *SecretVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.SecretName)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.DefaultMode != nil {
+ n += 1 + sovGenerated(uint64(*m.DefaultMode))
+ }
+ if m.Optional != nil {
+ n += 2
+ }
+ return n
+}
+
+func (m *SecurityContext) Size() (n int) {
+ var l int
+ _ = l
+ if m.Capabilities != nil {
+ l = m.Capabilities.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Privileged != nil {
+ n += 2
+ }
+ if m.SELinuxOptions != nil {
+ l = m.SELinuxOptions.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.RunAsUser != nil {
+ n += 1 + sovGenerated(uint64(*m.RunAsUser))
+ }
+ if m.RunAsNonRoot != nil {
+ n += 2
+ }
+ if m.ReadOnlyRootFilesystem != nil {
+ n += 2
+ }
+ return n
+}
+
+func (m *SerializedReference) Size() (n int) {
+ var l int
+ _ = l
+ l = m.Reference.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Service) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ServiceAccount) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Secrets) > 0 {
+ for _, e := range m.Secrets {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.ImagePullSecrets) > 0 {
+ for _, e := range m.ImagePullSecrets {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.AutomountServiceAccountToken != nil {
+ n += 2
+ }
+ return n
+}
+
+func (m *ServiceAccountList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ServiceList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ServicePort) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Protocol)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.Port))
+ l = m.TargetPort.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.NodePort))
+ return n
+}
+
+func (m *ServiceProxyOptions) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ServiceSpec) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Ports) > 0 {
+ for _, e := range m.Ports {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Selector) > 0 {
+ for k, v := range m.Selector {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ l = len(m.ClusterIP)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.ExternalIPs) > 0 {
+ for _, s := range m.ExternalIPs {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.SessionAffinity)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.LoadBalancerIP)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.LoadBalancerSourceRanges) > 0 {
+ for _, s := range m.LoadBalancerSourceRanges {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.ExternalName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.ExternalTrafficPolicy)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.HealthCheckNodePort))
+ return n
+}
+
+func (m *ServiceStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = m.LoadBalancer.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *StorageOSPersistentVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.VolumeName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.VolumeNamespace)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FSType)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ if m.SecretRef != nil {
+ l = m.SecretRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *StorageOSVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.VolumeName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.VolumeNamespace)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FSType)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ if m.SecretRef != nil {
+ l = m.SecretRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *Sysctl) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Value)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *TCPSocketAction) Size() (n int) {
+ var l int
+ _ = l
+ l = m.Port.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Host)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Taint) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Key)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Value)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Effect)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.TimeAdded.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Toleration) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Key)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Operator)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Value)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Effect)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.TolerationSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.TolerationSeconds))
+ }
+ return n
+}
+
+func (m *Volume) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.VolumeSource.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *VolumeMount) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ l = len(m.MountPath)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.SubPath)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *VolumeProjection) Size() (n int) {
+ var l int
+ _ = l
+ if m.Secret != nil {
+ l = m.Secret.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.DownwardAPI != nil {
+ l = m.DownwardAPI.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.ConfigMap != nil {
+ l = m.ConfigMap.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *VolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ if m.HostPath != nil {
+ l = m.HostPath.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.EmptyDir != nil {
+ l = m.EmptyDir.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.GCEPersistentDisk != nil {
+ l = m.GCEPersistentDisk.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.AWSElasticBlockStore != nil {
+ l = m.AWSElasticBlockStore.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.GitRepo != nil {
+ l = m.GitRepo.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Secret != nil {
+ l = m.Secret.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.NFS != nil {
+ l = m.NFS.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.ISCSI != nil {
+ l = m.ISCSI.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Glusterfs != nil {
+ l = m.Glusterfs.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.PersistentVolumeClaim != nil {
+ l = m.PersistentVolumeClaim.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.RBD != nil {
+ l = m.RBD.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.FlexVolume != nil {
+ l = m.FlexVolume.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Cinder != nil {
+ l = m.Cinder.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.CephFS != nil {
+ l = m.CephFS.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Flocker != nil {
+ l = m.Flocker.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.DownwardAPI != nil {
+ l = m.DownwardAPI.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.FC != nil {
+ l = m.FC.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.AzureFile != nil {
+ l = m.AzureFile.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.ConfigMap != nil {
+ l = m.ConfigMap.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.VsphereVolume != nil {
+ l = m.VsphereVolume.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.Quobyte != nil {
+ l = m.Quobyte.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.AzureDisk != nil {
+ l = m.AzureDisk.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.PhotonPersistentDisk != nil {
+ l = m.PhotonPersistentDisk.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.PortworxVolume != nil {
+ l = m.PortworxVolume.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.ScaleIO != nil {
+ l = m.ScaleIO.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.Projected != nil {
+ l = m.Projected.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ if m.StorageOS != nil {
+ l = m.StorageOS.Size()
+ n += 2 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *VsphereVirtualDiskVolumeSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.VolumePath)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.FSType)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.StoragePolicyName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.StoragePolicyID)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *WeightedPodAffinityTerm) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Weight))
+ l = m.PodAffinityTerm.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *AWSElasticBlockStoreVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&AWSElasticBlockStoreVolumeSource{`,
+ `VolumeID:` + fmt.Sprintf("%v", this.VolumeID) + `,`,
+ `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`,
+ `Partition:` + fmt.Sprintf("%v", this.Partition) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Affinity) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Affinity{`,
+ `NodeAffinity:` + strings.Replace(fmt.Sprintf("%v", this.NodeAffinity), "NodeAffinity", "NodeAffinity", 1) + `,`,
+ `PodAffinity:` + strings.Replace(fmt.Sprintf("%v", this.PodAffinity), "PodAffinity", "PodAffinity", 1) + `,`,
+ `PodAntiAffinity:` + strings.Replace(fmt.Sprintf("%v", this.PodAntiAffinity), "PodAntiAffinity", "PodAntiAffinity", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *AttachedVolume) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&AttachedVolume{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `DevicePath:` + fmt.Sprintf("%v", this.DevicePath) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *AvoidPods) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&AvoidPods{`,
+ `PreferAvoidPods:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.PreferAvoidPods), "PreferAvoidPodsEntry", "PreferAvoidPodsEntry", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *AzureDiskVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&AzureDiskVolumeSource{`,
+ `DiskName:` + fmt.Sprintf("%v", this.DiskName) + `,`,
+ `DataDiskURI:` + fmt.Sprintf("%v", this.DataDiskURI) + `,`,
+ `CachingMode:` + valueToStringGenerated(this.CachingMode) + `,`,
+ `FSType:` + valueToStringGenerated(this.FSType) + `,`,
+ `ReadOnly:` + valueToStringGenerated(this.ReadOnly) + `,`,
+ `Kind:` + valueToStringGenerated(this.Kind) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *AzureFileVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&AzureFileVolumeSource{`,
+ `SecretName:` + fmt.Sprintf("%v", this.SecretName) + `,`,
+ `ShareName:` + fmt.Sprintf("%v", this.ShareName) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Binding) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Binding{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Target:` + strings.Replace(strings.Replace(this.Target.String(), "ObjectReference", "ObjectReference", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Capabilities) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Capabilities{`,
+ `Add:` + fmt.Sprintf("%v", this.Add) + `,`,
+ `Drop:` + fmt.Sprintf("%v", this.Drop) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CephFSVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CephFSVolumeSource{`,
+ `Monitors:` + fmt.Sprintf("%v", this.Monitors) + `,`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `User:` + fmt.Sprintf("%v", this.User) + `,`,
+ `SecretFile:` + fmt.Sprintf("%v", this.SecretFile) + `,`,
+ `SecretRef:` + strings.Replace(fmt.Sprintf("%v", this.SecretRef), "LocalObjectReference", "LocalObjectReference", 1) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CinderVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CinderVolumeSource{`,
+ `VolumeID:` + fmt.Sprintf("%v", this.VolumeID) + `,`,
+ `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ComponentCondition) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ComponentCondition{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `Error:` + fmt.Sprintf("%v", this.Error) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ComponentStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ComponentStatus{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "ComponentCondition", "ComponentCondition", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ComponentStatusList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ComponentStatusList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ComponentStatus", "ComponentStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ConfigMap) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForData := make([]string, 0, len(this.Data))
+ for k := range this.Data {
+ keysForData = append(keysForData, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForData)
+ mapStringForData := "map[string]string{"
+ for _, k := range keysForData {
+ mapStringForData += fmt.Sprintf("%v: %v,", k, this.Data[k])
+ }
+ mapStringForData += "}"
+ s := strings.Join([]string{`&ConfigMap{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Data:` + mapStringForData + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ConfigMapEnvSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ConfigMapEnvSource{`,
+ `LocalObjectReference:` + strings.Replace(strings.Replace(this.LocalObjectReference.String(), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`,
+ `Optional:` + valueToStringGenerated(this.Optional) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ConfigMapKeySelector) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ConfigMapKeySelector{`,
+ `LocalObjectReference:` + strings.Replace(strings.Replace(this.LocalObjectReference.String(), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`,
+ `Key:` + fmt.Sprintf("%v", this.Key) + `,`,
+ `Optional:` + valueToStringGenerated(this.Optional) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ConfigMapList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ConfigMapList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ConfigMap", "ConfigMap", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ConfigMapProjection) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ConfigMapProjection{`,
+ `LocalObjectReference:` + strings.Replace(strings.Replace(this.LocalObjectReference.String(), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "KeyToPath", "KeyToPath", 1), `&`, ``, 1) + `,`,
+ `Optional:` + valueToStringGenerated(this.Optional) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ConfigMapVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ConfigMapVolumeSource{`,
+ `LocalObjectReference:` + strings.Replace(strings.Replace(this.LocalObjectReference.String(), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "KeyToPath", "KeyToPath", 1), `&`, ``, 1) + `,`,
+ `DefaultMode:` + valueToStringGenerated(this.DefaultMode) + `,`,
+ `Optional:` + valueToStringGenerated(this.Optional) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Container) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Container{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Image:` + fmt.Sprintf("%v", this.Image) + `,`,
+ `Command:` + fmt.Sprintf("%v", this.Command) + `,`,
+ `Args:` + fmt.Sprintf("%v", this.Args) + `,`,
+ `WorkingDir:` + fmt.Sprintf("%v", this.WorkingDir) + `,`,
+ `Ports:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ports), "ContainerPort", "ContainerPort", 1), `&`, ``, 1) + `,`,
+ `Env:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Env), "EnvVar", "EnvVar", 1), `&`, ``, 1) + `,`,
+ `Resources:` + strings.Replace(strings.Replace(this.Resources.String(), "ResourceRequirements", "ResourceRequirements", 1), `&`, ``, 1) + `,`,
+ `VolumeMounts:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VolumeMounts), "VolumeMount", "VolumeMount", 1), `&`, ``, 1) + `,`,
+ `LivenessProbe:` + strings.Replace(fmt.Sprintf("%v", this.LivenessProbe), "Probe", "Probe", 1) + `,`,
+ `ReadinessProbe:` + strings.Replace(fmt.Sprintf("%v", this.ReadinessProbe), "Probe", "Probe", 1) + `,`,
+ `Lifecycle:` + strings.Replace(fmt.Sprintf("%v", this.Lifecycle), "Lifecycle", "Lifecycle", 1) + `,`,
+ `TerminationMessagePath:` + fmt.Sprintf("%v", this.TerminationMessagePath) + `,`,
+ `ImagePullPolicy:` + fmt.Sprintf("%v", this.ImagePullPolicy) + `,`,
+ `SecurityContext:` + strings.Replace(fmt.Sprintf("%v", this.SecurityContext), "SecurityContext", "SecurityContext", 1) + `,`,
+ `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`,
+ `StdinOnce:` + fmt.Sprintf("%v", this.StdinOnce) + `,`,
+ `TTY:` + fmt.Sprintf("%v", this.TTY) + `,`,
+ `EnvFrom:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.EnvFrom), "EnvFromSource", "EnvFromSource", 1), `&`, ``, 1) + `,`,
+ `TerminationMessagePolicy:` + fmt.Sprintf("%v", this.TerminationMessagePolicy) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ContainerImage) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ContainerImage{`,
+ `Names:` + fmt.Sprintf("%v", this.Names) + `,`,
+ `SizeBytes:` + fmt.Sprintf("%v", this.SizeBytes) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ContainerPort) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ContainerPort{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `HostPort:` + fmt.Sprintf("%v", this.HostPort) + `,`,
+ `ContainerPort:` + fmt.Sprintf("%v", this.ContainerPort) + `,`,
+ `Protocol:` + fmt.Sprintf("%v", this.Protocol) + `,`,
+ `HostIP:` + fmt.Sprintf("%v", this.HostIP) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ContainerState) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ContainerState{`,
+ `Waiting:` + strings.Replace(fmt.Sprintf("%v", this.Waiting), "ContainerStateWaiting", "ContainerStateWaiting", 1) + `,`,
+ `Running:` + strings.Replace(fmt.Sprintf("%v", this.Running), "ContainerStateRunning", "ContainerStateRunning", 1) + `,`,
+ `Terminated:` + strings.Replace(fmt.Sprintf("%v", this.Terminated), "ContainerStateTerminated", "ContainerStateTerminated", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ContainerStateRunning) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ContainerStateRunning{`,
+ `StartedAt:` + strings.Replace(strings.Replace(this.StartedAt.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ContainerStateTerminated) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ContainerStateTerminated{`,
+ `ExitCode:` + fmt.Sprintf("%v", this.ExitCode) + `,`,
+ `Signal:` + fmt.Sprintf("%v", this.Signal) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `StartedAt:` + strings.Replace(strings.Replace(this.StartedAt.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `FinishedAt:` + strings.Replace(strings.Replace(this.FinishedAt.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ContainerStateWaiting) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ContainerStateWaiting{`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ContainerStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ContainerStatus{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `State:` + strings.Replace(strings.Replace(this.State.String(), "ContainerState", "ContainerState", 1), `&`, ``, 1) + `,`,
+ `LastTerminationState:` + strings.Replace(strings.Replace(this.LastTerminationState.String(), "ContainerState", "ContainerState", 1), `&`, ``, 1) + `,`,
+ `Ready:` + fmt.Sprintf("%v", this.Ready) + `,`,
+ `RestartCount:` + fmt.Sprintf("%v", this.RestartCount) + `,`,
+ `Image:` + fmt.Sprintf("%v", this.Image) + `,`,
+ `ImageID:` + fmt.Sprintf("%v", this.ImageID) + `,`,
+ `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DaemonEndpoint) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DaemonEndpoint{`,
+ `Port:` + fmt.Sprintf("%v", this.Port) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeleteOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeleteOptions{`,
+ `GracePeriodSeconds:` + valueToStringGenerated(this.GracePeriodSeconds) + `,`,
+ `Preconditions:` + strings.Replace(fmt.Sprintf("%v", this.Preconditions), "Preconditions", "Preconditions", 1) + `,`,
+ `OrphanDependents:` + valueToStringGenerated(this.OrphanDependents) + `,`,
+ `PropagationPolicy:` + valueToStringGenerated(this.PropagationPolicy) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DownwardAPIProjection) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DownwardAPIProjection{`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "DownwardAPIVolumeFile", "DownwardAPIVolumeFile", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DownwardAPIVolumeFile) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DownwardAPIVolumeFile{`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `FieldRef:` + strings.Replace(fmt.Sprintf("%v", this.FieldRef), "ObjectFieldSelector", "ObjectFieldSelector", 1) + `,`,
+ `ResourceFieldRef:` + strings.Replace(fmt.Sprintf("%v", this.ResourceFieldRef), "ResourceFieldSelector", "ResourceFieldSelector", 1) + `,`,
+ `Mode:` + valueToStringGenerated(this.Mode) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DownwardAPIVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DownwardAPIVolumeSource{`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "DownwardAPIVolumeFile", "DownwardAPIVolumeFile", 1), `&`, ``, 1) + `,`,
+ `DefaultMode:` + valueToStringGenerated(this.DefaultMode) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *EmptyDirVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&EmptyDirVolumeSource{`,
+ `Medium:` + fmt.Sprintf("%v", this.Medium) + `,`,
+ `SizeLimit:` + strings.Replace(fmt.Sprintf("%v", this.SizeLimit), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *EndpointAddress) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&EndpointAddress{`,
+ `IP:` + fmt.Sprintf("%v", this.IP) + `,`,
+ `TargetRef:` + strings.Replace(fmt.Sprintf("%v", this.TargetRef), "ObjectReference", "ObjectReference", 1) + `,`,
+ `Hostname:` + fmt.Sprintf("%v", this.Hostname) + `,`,
+ `NodeName:` + valueToStringGenerated(this.NodeName) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *EndpointPort) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&EndpointPort{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Port:` + fmt.Sprintf("%v", this.Port) + `,`,
+ `Protocol:` + fmt.Sprintf("%v", this.Protocol) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *EndpointSubset) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&EndpointSubset{`,
+ `Addresses:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Addresses), "EndpointAddress", "EndpointAddress", 1), `&`, ``, 1) + `,`,
+ `NotReadyAddresses:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.NotReadyAddresses), "EndpointAddress", "EndpointAddress", 1), `&`, ``, 1) + `,`,
+ `Ports:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ports), "EndpointPort", "EndpointPort", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Endpoints) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Endpoints{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Subsets:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subsets), "EndpointSubset", "EndpointSubset", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *EndpointsList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&EndpointsList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Endpoints", "Endpoints", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *EnvFromSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&EnvFromSource{`,
+ `Prefix:` + fmt.Sprintf("%v", this.Prefix) + `,`,
+ `ConfigMapRef:` + strings.Replace(fmt.Sprintf("%v", this.ConfigMapRef), "ConfigMapEnvSource", "ConfigMapEnvSource", 1) + `,`,
+ `SecretRef:` + strings.Replace(fmt.Sprintf("%v", this.SecretRef), "SecretEnvSource", "SecretEnvSource", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *EnvVar) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&EnvVar{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Value:` + fmt.Sprintf("%v", this.Value) + `,`,
+ `ValueFrom:` + strings.Replace(fmt.Sprintf("%v", this.ValueFrom), "EnvVarSource", "EnvVarSource", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *EnvVarSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&EnvVarSource{`,
+ `FieldRef:` + strings.Replace(fmt.Sprintf("%v", this.FieldRef), "ObjectFieldSelector", "ObjectFieldSelector", 1) + `,`,
+ `ResourceFieldRef:` + strings.Replace(fmt.Sprintf("%v", this.ResourceFieldRef), "ResourceFieldSelector", "ResourceFieldSelector", 1) + `,`,
+ `ConfigMapKeyRef:` + strings.Replace(fmt.Sprintf("%v", this.ConfigMapKeyRef), "ConfigMapKeySelector", "ConfigMapKeySelector", 1) + `,`,
+ `SecretKeyRef:` + strings.Replace(fmt.Sprintf("%v", this.SecretKeyRef), "SecretKeySelector", "SecretKeySelector", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Event) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Event{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `InvolvedObject:` + strings.Replace(strings.Replace(this.InvolvedObject.String(), "ObjectReference", "ObjectReference", 1), `&`, ``, 1) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `Source:` + strings.Replace(strings.Replace(this.Source.String(), "EventSource", "EventSource", 1), `&`, ``, 1) + `,`,
+ `FirstTimestamp:` + strings.Replace(strings.Replace(this.FirstTimestamp.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `LastTimestamp:` + strings.Replace(strings.Replace(this.LastTimestamp.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `Count:` + fmt.Sprintf("%v", this.Count) + `,`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *EventList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&EventList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Event", "Event", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *EventSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&EventSource{`,
+ `Component:` + fmt.Sprintf("%v", this.Component) + `,`,
+ `Host:` + fmt.Sprintf("%v", this.Host) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ExecAction) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ExecAction{`,
+ `Command:` + fmt.Sprintf("%v", this.Command) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *FCVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&FCVolumeSource{`,
+ `TargetWWNs:` + fmt.Sprintf("%v", this.TargetWWNs) + `,`,
+ `Lun:` + valueToStringGenerated(this.Lun) + `,`,
+ `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *FlexVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForOptions := make([]string, 0, len(this.Options))
+ for k := range this.Options {
+ keysForOptions = append(keysForOptions, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForOptions)
+ mapStringForOptions := "map[string]string{"
+ for _, k := range keysForOptions {
+ mapStringForOptions += fmt.Sprintf("%v: %v,", k, this.Options[k])
+ }
+ mapStringForOptions += "}"
+ s := strings.Join([]string{`&FlexVolumeSource{`,
+ `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`,
+ `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`,
+ `SecretRef:` + strings.Replace(fmt.Sprintf("%v", this.SecretRef), "LocalObjectReference", "LocalObjectReference", 1) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `Options:` + mapStringForOptions + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *FlockerVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&FlockerVolumeSource{`,
+ `DatasetName:` + fmt.Sprintf("%v", this.DatasetName) + `,`,
+ `DatasetUUID:` + fmt.Sprintf("%v", this.DatasetUUID) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *GCEPersistentDiskVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&GCEPersistentDiskVolumeSource{`,
+ `PDName:` + fmt.Sprintf("%v", this.PDName) + `,`,
+ `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`,
+ `Partition:` + fmt.Sprintf("%v", this.Partition) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *GitRepoVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&GitRepoVolumeSource{`,
+ `Repository:` + fmt.Sprintf("%v", this.Repository) + `,`,
+ `Revision:` + fmt.Sprintf("%v", this.Revision) + `,`,
+ `Directory:` + fmt.Sprintf("%v", this.Directory) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *GlusterfsVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&GlusterfsVolumeSource{`,
+ `EndpointsName:` + fmt.Sprintf("%v", this.EndpointsName) + `,`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HTTPGetAction) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HTTPGetAction{`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `Port:` + strings.Replace(strings.Replace(this.Port.String(), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1), `&`, ``, 1) + `,`,
+ `Host:` + fmt.Sprintf("%v", this.Host) + `,`,
+ `Scheme:` + fmt.Sprintf("%v", this.Scheme) + `,`,
+ `HTTPHeaders:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.HTTPHeaders), "HTTPHeader", "HTTPHeader", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HTTPHeader) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HTTPHeader{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Value:` + fmt.Sprintf("%v", this.Value) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Handler) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Handler{`,
+ `Exec:` + strings.Replace(fmt.Sprintf("%v", this.Exec), "ExecAction", "ExecAction", 1) + `,`,
+ `HTTPGet:` + strings.Replace(fmt.Sprintf("%v", this.HTTPGet), "HTTPGetAction", "HTTPGetAction", 1) + `,`,
+ `TCPSocket:` + strings.Replace(fmt.Sprintf("%v", this.TCPSocket), "TCPSocketAction", "TCPSocketAction", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HostAlias) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HostAlias{`,
+ `IP:` + fmt.Sprintf("%v", this.IP) + `,`,
+ `Hostnames:` + fmt.Sprintf("%v", this.Hostnames) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HostPathVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HostPathVolumeSource{`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ISCSIVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ISCSIVolumeSource{`,
+ `TargetPortal:` + fmt.Sprintf("%v", this.TargetPortal) + `,`,
+ `IQN:` + fmt.Sprintf("%v", this.IQN) + `,`,
+ `Lun:` + fmt.Sprintf("%v", this.Lun) + `,`,
+ `ISCSIInterface:` + fmt.Sprintf("%v", this.ISCSIInterface) + `,`,
+ `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `Portals:` + fmt.Sprintf("%v", this.Portals) + `,`,
+ `DiscoveryCHAPAuth:` + fmt.Sprintf("%v", this.DiscoveryCHAPAuth) + `,`,
+ `SecretRef:` + strings.Replace(fmt.Sprintf("%v", this.SecretRef), "LocalObjectReference", "LocalObjectReference", 1) + `,`,
+ `SessionCHAPAuth:` + fmt.Sprintf("%v", this.SessionCHAPAuth) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *KeyToPath) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&KeyToPath{`,
+ `Key:` + fmt.Sprintf("%v", this.Key) + `,`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `Mode:` + valueToStringGenerated(this.Mode) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Lifecycle) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Lifecycle{`,
+ `PostStart:` + strings.Replace(fmt.Sprintf("%v", this.PostStart), "Handler", "Handler", 1) + `,`,
+ `PreStop:` + strings.Replace(fmt.Sprintf("%v", this.PreStop), "Handler", "Handler", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *LimitRange) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&LimitRange{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "LimitRangeSpec", "LimitRangeSpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *LimitRangeItem) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForMax := make([]string, 0, len(this.Max))
+ for k := range this.Max {
+ keysForMax = append(keysForMax, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForMax)
+ mapStringForMax := "ResourceList{"
+ for _, k := range keysForMax {
+ mapStringForMax += fmt.Sprintf("%v: %v,", k, this.Max[ResourceName(k)])
+ }
+ mapStringForMax += "}"
+ keysForMin := make([]string, 0, len(this.Min))
+ for k := range this.Min {
+ keysForMin = append(keysForMin, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForMin)
+ mapStringForMin := "ResourceList{"
+ for _, k := range keysForMin {
+ mapStringForMin += fmt.Sprintf("%v: %v,", k, this.Min[ResourceName(k)])
+ }
+ mapStringForMin += "}"
+ keysForDefault := make([]string, 0, len(this.Default))
+ for k := range this.Default {
+ keysForDefault = append(keysForDefault, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForDefault)
+ mapStringForDefault := "ResourceList{"
+ for _, k := range keysForDefault {
+ mapStringForDefault += fmt.Sprintf("%v: %v,", k, this.Default[ResourceName(k)])
+ }
+ mapStringForDefault += "}"
+ keysForDefaultRequest := make([]string, 0, len(this.DefaultRequest))
+ for k := range this.DefaultRequest {
+ keysForDefaultRequest = append(keysForDefaultRequest, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForDefaultRequest)
+ mapStringForDefaultRequest := "ResourceList{"
+ for _, k := range keysForDefaultRequest {
+ mapStringForDefaultRequest += fmt.Sprintf("%v: %v,", k, this.DefaultRequest[ResourceName(k)])
+ }
+ mapStringForDefaultRequest += "}"
+ keysForMaxLimitRequestRatio := make([]string, 0, len(this.MaxLimitRequestRatio))
+ for k := range this.MaxLimitRequestRatio {
+ keysForMaxLimitRequestRatio = append(keysForMaxLimitRequestRatio, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForMaxLimitRequestRatio)
+ mapStringForMaxLimitRequestRatio := "ResourceList{"
+ for _, k := range keysForMaxLimitRequestRatio {
+ mapStringForMaxLimitRequestRatio += fmt.Sprintf("%v: %v,", k, this.MaxLimitRequestRatio[ResourceName(k)])
+ }
+ mapStringForMaxLimitRequestRatio += "}"
+ s := strings.Join([]string{`&LimitRangeItem{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Max:` + mapStringForMax + `,`,
+ `Min:` + mapStringForMin + `,`,
+ `Default:` + mapStringForDefault + `,`,
+ `DefaultRequest:` + mapStringForDefaultRequest + `,`,
+ `MaxLimitRequestRatio:` + mapStringForMaxLimitRequestRatio + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *LimitRangeList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&LimitRangeList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "LimitRange", "LimitRange", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *LimitRangeSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&LimitRangeSpec{`,
+ `Limits:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Limits), "LimitRangeItem", "LimitRangeItem", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *List) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&List{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "RawExtension", "k8s_io_apimachinery_pkg_runtime.RawExtension", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ListOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ListOptions{`,
+ `LabelSelector:` + fmt.Sprintf("%v", this.LabelSelector) + `,`,
+ `FieldSelector:` + fmt.Sprintf("%v", this.FieldSelector) + `,`,
+ `Watch:` + fmt.Sprintf("%v", this.Watch) + `,`,
+ `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`,
+ `TimeoutSeconds:` + valueToStringGenerated(this.TimeoutSeconds) + `,`,
+ `IncludeUninitialized:` + fmt.Sprintf("%v", this.IncludeUninitialized) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *LoadBalancerIngress) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&LoadBalancerIngress{`,
+ `IP:` + fmt.Sprintf("%v", this.IP) + `,`,
+ `Hostname:` + fmt.Sprintf("%v", this.Hostname) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *LoadBalancerStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&LoadBalancerStatus{`,
+ `Ingress:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ingress), "LoadBalancerIngress", "LoadBalancerIngress", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *LocalObjectReference) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&LocalObjectReference{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *LocalVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&LocalVolumeSource{`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NFSVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NFSVolumeSource{`,
+ `Server:` + fmt.Sprintf("%v", this.Server) + `,`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Namespace) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Namespace{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NamespaceSpec", "NamespaceSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "NamespaceStatus", "NamespaceStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NamespaceList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NamespaceList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Namespace", "Namespace", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NamespaceSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NamespaceSpec{`,
+ `Finalizers:` + fmt.Sprintf("%v", this.Finalizers) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NamespaceStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NamespaceStatus{`,
+ `Phase:` + fmt.Sprintf("%v", this.Phase) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Node) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Node{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NodeSpec", "NodeSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "NodeStatus", "NodeStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NodeAddress) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NodeAddress{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Address:` + fmt.Sprintf("%v", this.Address) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NodeAffinity) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NodeAffinity{`,
+ `RequiredDuringSchedulingIgnoredDuringExecution:` + strings.Replace(fmt.Sprintf("%v", this.RequiredDuringSchedulingIgnoredDuringExecution), "NodeSelector", "NodeSelector", 1) + `,`,
+ `PreferredDuringSchedulingIgnoredDuringExecution:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.PreferredDuringSchedulingIgnoredDuringExecution), "PreferredSchedulingTerm", "PreferredSchedulingTerm", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NodeCondition) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NodeCondition{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
+ `LastHeartbeatTime:` + strings.Replace(strings.Replace(this.LastHeartbeatTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NodeDaemonEndpoints) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NodeDaemonEndpoints{`,
+ `KubeletEndpoint:` + strings.Replace(strings.Replace(this.KubeletEndpoint.String(), "DaemonEndpoint", "DaemonEndpoint", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NodeList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NodeList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Node", "Node", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NodeProxyOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NodeProxyOptions{`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NodeResources) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForCapacity := make([]string, 0, len(this.Capacity))
+ for k := range this.Capacity {
+ keysForCapacity = append(keysForCapacity, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity)
+ mapStringForCapacity := "ResourceList{"
+ for _, k := range keysForCapacity {
+ mapStringForCapacity += fmt.Sprintf("%v: %v,", k, this.Capacity[ResourceName(k)])
+ }
+ mapStringForCapacity += "}"
+ s := strings.Join([]string{`&NodeResources{`,
+ `Capacity:` + mapStringForCapacity + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NodeSelector) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NodeSelector{`,
+ `NodeSelectorTerms:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.NodeSelectorTerms), "NodeSelectorTerm", "NodeSelectorTerm", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NodeSelectorRequirement) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NodeSelectorRequirement{`,
+ `Key:` + fmt.Sprintf("%v", this.Key) + `,`,
+ `Operator:` + fmt.Sprintf("%v", this.Operator) + `,`,
+ `Values:` + fmt.Sprintf("%v", this.Values) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NodeSelectorTerm) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NodeSelectorTerm{`,
+ `MatchExpressions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.MatchExpressions), "NodeSelectorRequirement", "NodeSelectorRequirement", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NodeSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NodeSpec{`,
+ `PodCIDR:` + fmt.Sprintf("%v", this.PodCIDR) + `,`,
+ `ExternalID:` + fmt.Sprintf("%v", this.ExternalID) + `,`,
+ `ProviderID:` + fmt.Sprintf("%v", this.ProviderID) + `,`,
+ `Unschedulable:` + fmt.Sprintf("%v", this.Unschedulable) + `,`,
+ `Taints:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Taints), "Taint", "Taint", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NodeStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForCapacity := make([]string, 0, len(this.Capacity))
+ for k := range this.Capacity {
+ keysForCapacity = append(keysForCapacity, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity)
+ mapStringForCapacity := "ResourceList{"
+ for _, k := range keysForCapacity {
+ mapStringForCapacity += fmt.Sprintf("%v: %v,", k, this.Capacity[ResourceName(k)])
+ }
+ mapStringForCapacity += "}"
+ keysForAllocatable := make([]string, 0, len(this.Allocatable))
+ for k := range this.Allocatable {
+ keysForAllocatable = append(keysForAllocatable, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForAllocatable)
+ mapStringForAllocatable := "ResourceList{"
+ for _, k := range keysForAllocatable {
+ mapStringForAllocatable += fmt.Sprintf("%v: %v,", k, this.Allocatable[ResourceName(k)])
+ }
+ mapStringForAllocatable += "}"
+ s := strings.Join([]string{`&NodeStatus{`,
+ `Capacity:` + mapStringForCapacity + `,`,
+ `Allocatable:` + mapStringForAllocatable + `,`,
+ `Phase:` + fmt.Sprintf("%v", this.Phase) + `,`,
+ `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "NodeCondition", "NodeCondition", 1), `&`, ``, 1) + `,`,
+ `Addresses:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Addresses), "NodeAddress", "NodeAddress", 1), `&`, ``, 1) + `,`,
+ `DaemonEndpoints:` + strings.Replace(strings.Replace(this.DaemonEndpoints.String(), "NodeDaemonEndpoints", "NodeDaemonEndpoints", 1), `&`, ``, 1) + `,`,
+ `NodeInfo:` + strings.Replace(strings.Replace(this.NodeInfo.String(), "NodeSystemInfo", "NodeSystemInfo", 1), `&`, ``, 1) + `,`,
+ `Images:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Images), "ContainerImage", "ContainerImage", 1), `&`, ``, 1) + `,`,
+ `VolumesInUse:` + fmt.Sprintf("%v", this.VolumesInUse) + `,`,
+ `VolumesAttached:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VolumesAttached), "AttachedVolume", "AttachedVolume", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NodeSystemInfo) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NodeSystemInfo{`,
+ `MachineID:` + fmt.Sprintf("%v", this.MachineID) + `,`,
+ `SystemUUID:` + fmt.Sprintf("%v", this.SystemUUID) + `,`,
+ `BootID:` + fmt.Sprintf("%v", this.BootID) + `,`,
+ `KernelVersion:` + fmt.Sprintf("%v", this.KernelVersion) + `,`,
+ `OSImage:` + fmt.Sprintf("%v", this.OSImage) + `,`,
+ `ContainerRuntimeVersion:` + fmt.Sprintf("%v", this.ContainerRuntimeVersion) + `,`,
+ `KubeletVersion:` + fmt.Sprintf("%v", this.KubeletVersion) + `,`,
+ `KubeProxyVersion:` + fmt.Sprintf("%v", this.KubeProxyVersion) + `,`,
+ `OperatingSystem:` + fmt.Sprintf("%v", this.OperatingSystem) + `,`,
+ `Architecture:` + fmt.Sprintf("%v", this.Architecture) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ObjectFieldSelector) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ObjectFieldSelector{`,
+ `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`,
+ `FieldPath:` + fmt.Sprintf("%v", this.FieldPath) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ObjectMeta) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForLabels := make([]string, 0, len(this.Labels))
+ for k := range this.Labels {
+ keysForLabels = append(keysForLabels, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
+ mapStringForLabels := "map[string]string{"
+ for _, k := range keysForLabels {
+ mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
+ }
+ mapStringForLabels += "}"
+ keysForAnnotations := make([]string, 0, len(this.Annotations))
+ for k := range this.Annotations {
+ keysForAnnotations = append(keysForAnnotations, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations)
+ mapStringForAnnotations := "map[string]string{"
+ for _, k := range keysForAnnotations {
+ mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k])
+ }
+ mapStringForAnnotations += "}"
+ s := strings.Join([]string{`&ObjectMeta{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `GenerateName:` + fmt.Sprintf("%v", this.GenerateName) + `,`,
+ `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
+ `SelfLink:` + fmt.Sprintf("%v", this.SelfLink) + `,`,
+ `UID:` + fmt.Sprintf("%v", this.UID) + `,`,
+ `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`,
+ `Generation:` + fmt.Sprintf("%v", this.Generation) + `,`,
+ `CreationTimestamp:` + strings.Replace(strings.Replace(this.CreationTimestamp.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `DeletionTimestamp:` + strings.Replace(fmt.Sprintf("%v", this.DeletionTimestamp), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`,
+ `DeletionGracePeriodSeconds:` + valueToStringGenerated(this.DeletionGracePeriodSeconds) + `,`,
+ `Labels:` + mapStringForLabels + `,`,
+ `Annotations:` + mapStringForAnnotations + `,`,
+ `OwnerReferences:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.OwnerReferences), "OwnerReference", "k8s_io_apimachinery_pkg_apis_meta_v1.OwnerReference", 1), `&`, ``, 1) + `,`,
+ `Finalizers:` + fmt.Sprintf("%v", this.Finalizers) + `,`,
+ `ClusterName:` + fmt.Sprintf("%v", this.ClusterName) + `,`,
+ `Initializers:` + strings.Replace(fmt.Sprintf("%v", this.Initializers), "Initializers", "k8s_io_apimachinery_pkg_apis_meta_v1.Initializers", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ObjectReference) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ObjectReference{`,
+ `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
+ `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `UID:` + fmt.Sprintf("%v", this.UID) + `,`,
+ `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`,
+ `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`,
+ `FieldPath:` + fmt.Sprintf("%v", this.FieldPath) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PersistentVolume) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PersistentVolume{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PersistentVolumeSpec", "PersistentVolumeSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PersistentVolumeStatus", "PersistentVolumeStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PersistentVolumeClaim) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PersistentVolumeClaim{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PersistentVolumeClaimSpec", "PersistentVolumeClaimSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PersistentVolumeClaimStatus", "PersistentVolumeClaimStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PersistentVolumeClaimList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PersistentVolumeClaimList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PersistentVolumeClaim", "PersistentVolumeClaim", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PersistentVolumeClaimSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PersistentVolumeClaimSpec{`,
+ `AccessModes:` + fmt.Sprintf("%v", this.AccessModes) + `,`,
+ `Resources:` + strings.Replace(strings.Replace(this.Resources.String(), "ResourceRequirements", "ResourceRequirements", 1), `&`, ``, 1) + `,`,
+ `VolumeName:` + fmt.Sprintf("%v", this.VolumeName) + `,`,
+ `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
+ `StorageClassName:` + valueToStringGenerated(this.StorageClassName) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PersistentVolumeClaimStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForCapacity := make([]string, 0, len(this.Capacity))
+ for k := range this.Capacity {
+ keysForCapacity = append(keysForCapacity, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity)
+ mapStringForCapacity := "ResourceList{"
+ for _, k := range keysForCapacity {
+ mapStringForCapacity += fmt.Sprintf("%v: %v,", k, this.Capacity[ResourceName(k)])
+ }
+ mapStringForCapacity += "}"
+ s := strings.Join([]string{`&PersistentVolumeClaimStatus{`,
+ `Phase:` + fmt.Sprintf("%v", this.Phase) + `,`,
+ `AccessModes:` + fmt.Sprintf("%v", this.AccessModes) + `,`,
+ `Capacity:` + mapStringForCapacity + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PersistentVolumeClaimVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PersistentVolumeClaimVolumeSource{`,
+ `ClaimName:` + fmt.Sprintf("%v", this.ClaimName) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PersistentVolumeList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PersistentVolumeList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PersistentVolume", "PersistentVolume", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PersistentVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PersistentVolumeSource{`,
+ `GCEPersistentDisk:` + strings.Replace(fmt.Sprintf("%v", this.GCEPersistentDisk), "GCEPersistentDiskVolumeSource", "GCEPersistentDiskVolumeSource", 1) + `,`,
+ `AWSElasticBlockStore:` + strings.Replace(fmt.Sprintf("%v", this.AWSElasticBlockStore), "AWSElasticBlockStoreVolumeSource", "AWSElasticBlockStoreVolumeSource", 1) + `,`,
+ `HostPath:` + strings.Replace(fmt.Sprintf("%v", this.HostPath), "HostPathVolumeSource", "HostPathVolumeSource", 1) + `,`,
+ `Glusterfs:` + strings.Replace(fmt.Sprintf("%v", this.Glusterfs), "GlusterfsVolumeSource", "GlusterfsVolumeSource", 1) + `,`,
+ `NFS:` + strings.Replace(fmt.Sprintf("%v", this.NFS), "NFSVolumeSource", "NFSVolumeSource", 1) + `,`,
+ `RBD:` + strings.Replace(fmt.Sprintf("%v", this.RBD), "RBDVolumeSource", "RBDVolumeSource", 1) + `,`,
+ `ISCSI:` + strings.Replace(fmt.Sprintf("%v", this.ISCSI), "ISCSIVolumeSource", "ISCSIVolumeSource", 1) + `,`,
+ `Cinder:` + strings.Replace(fmt.Sprintf("%v", this.Cinder), "CinderVolumeSource", "CinderVolumeSource", 1) + `,`,
+ `CephFS:` + strings.Replace(fmt.Sprintf("%v", this.CephFS), "CephFSVolumeSource", "CephFSVolumeSource", 1) + `,`,
+ `FC:` + strings.Replace(fmt.Sprintf("%v", this.FC), "FCVolumeSource", "FCVolumeSource", 1) + `,`,
+ `Flocker:` + strings.Replace(fmt.Sprintf("%v", this.Flocker), "FlockerVolumeSource", "FlockerVolumeSource", 1) + `,`,
+ `FlexVolume:` + strings.Replace(fmt.Sprintf("%v", this.FlexVolume), "FlexVolumeSource", "FlexVolumeSource", 1) + `,`,
+ `AzureFile:` + strings.Replace(fmt.Sprintf("%v", this.AzureFile), "AzureFileVolumeSource", "AzureFileVolumeSource", 1) + `,`,
+ `VsphereVolume:` + strings.Replace(fmt.Sprintf("%v", this.VsphereVolume), "VsphereVirtualDiskVolumeSource", "VsphereVirtualDiskVolumeSource", 1) + `,`,
+ `Quobyte:` + strings.Replace(fmt.Sprintf("%v", this.Quobyte), "QuobyteVolumeSource", "QuobyteVolumeSource", 1) + `,`,
+ `AzureDisk:` + strings.Replace(fmt.Sprintf("%v", this.AzureDisk), "AzureDiskVolumeSource", "AzureDiskVolumeSource", 1) + `,`,
+ `PhotonPersistentDisk:` + strings.Replace(fmt.Sprintf("%v", this.PhotonPersistentDisk), "PhotonPersistentDiskVolumeSource", "PhotonPersistentDiskVolumeSource", 1) + `,`,
+ `PortworxVolume:` + strings.Replace(fmt.Sprintf("%v", this.PortworxVolume), "PortworxVolumeSource", "PortworxVolumeSource", 1) + `,`,
+ `ScaleIO:` + strings.Replace(fmt.Sprintf("%v", this.ScaleIO), "ScaleIOVolumeSource", "ScaleIOVolumeSource", 1) + `,`,
+ `Local:` + strings.Replace(fmt.Sprintf("%v", this.Local), "LocalVolumeSource", "LocalVolumeSource", 1) + `,`,
+ `StorageOS:` + strings.Replace(fmt.Sprintf("%v", this.StorageOS), "StorageOSPersistentVolumeSource", "StorageOSPersistentVolumeSource", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PersistentVolumeSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForCapacity := make([]string, 0, len(this.Capacity))
+ for k := range this.Capacity {
+ keysForCapacity = append(keysForCapacity, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity)
+ mapStringForCapacity := "ResourceList{"
+ for _, k := range keysForCapacity {
+ mapStringForCapacity += fmt.Sprintf("%v: %v,", k, this.Capacity[ResourceName(k)])
+ }
+ mapStringForCapacity += "}"
+ s := strings.Join([]string{`&PersistentVolumeSpec{`,
+ `Capacity:` + mapStringForCapacity + `,`,
+ `PersistentVolumeSource:` + strings.Replace(strings.Replace(this.PersistentVolumeSource.String(), "PersistentVolumeSource", "PersistentVolumeSource", 1), `&`, ``, 1) + `,`,
+ `AccessModes:` + fmt.Sprintf("%v", this.AccessModes) + `,`,
+ `ClaimRef:` + strings.Replace(fmt.Sprintf("%v", this.ClaimRef), "ObjectReference", "ObjectReference", 1) + `,`,
+ `PersistentVolumeReclaimPolicy:` + fmt.Sprintf("%v", this.PersistentVolumeReclaimPolicy) + `,`,
+ `StorageClassName:` + fmt.Sprintf("%v", this.StorageClassName) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PersistentVolumeStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PersistentVolumeStatus{`,
+ `Phase:` + fmt.Sprintf("%v", this.Phase) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PhotonPersistentDiskVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PhotonPersistentDiskVolumeSource{`,
+ `PdID:` + fmt.Sprintf("%v", this.PdID) + `,`,
+ `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Pod) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Pod{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSpec", "PodSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodStatus", "PodStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodAffinity) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodAffinity{`,
+ `RequiredDuringSchedulingIgnoredDuringExecution:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.RequiredDuringSchedulingIgnoredDuringExecution), "PodAffinityTerm", "PodAffinityTerm", 1), `&`, ``, 1) + `,`,
+ `PreferredDuringSchedulingIgnoredDuringExecution:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.PreferredDuringSchedulingIgnoredDuringExecution), "WeightedPodAffinityTerm", "WeightedPodAffinityTerm", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodAffinityTerm) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodAffinityTerm{`,
+ `LabelSelector:` + strings.Replace(fmt.Sprintf("%v", this.LabelSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
+ `Namespaces:` + fmt.Sprintf("%v", this.Namespaces) + `,`,
+ `TopologyKey:` + fmt.Sprintf("%v", this.TopologyKey) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodAntiAffinity) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodAntiAffinity{`,
+ `RequiredDuringSchedulingIgnoredDuringExecution:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.RequiredDuringSchedulingIgnoredDuringExecution), "PodAffinityTerm", "PodAffinityTerm", 1), `&`, ``, 1) + `,`,
+ `PreferredDuringSchedulingIgnoredDuringExecution:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.PreferredDuringSchedulingIgnoredDuringExecution), "WeightedPodAffinityTerm", "WeightedPodAffinityTerm", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodAttachOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodAttachOptions{`,
+ `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`,
+ `Stdout:` + fmt.Sprintf("%v", this.Stdout) + `,`,
+ `Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`,
+ `TTY:` + fmt.Sprintf("%v", this.TTY) + `,`,
+ `Container:` + fmt.Sprintf("%v", this.Container) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodCondition) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodCondition{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
+ `LastProbeTime:` + strings.Replace(strings.Replace(this.LastProbeTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodExecOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodExecOptions{`,
+ `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`,
+ `Stdout:` + fmt.Sprintf("%v", this.Stdout) + `,`,
+ `Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`,
+ `TTY:` + fmt.Sprintf("%v", this.TTY) + `,`,
+ `Container:` + fmt.Sprintf("%v", this.Container) + `,`,
+ `Command:` + fmt.Sprintf("%v", this.Command) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Pod", "Pod", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodLogOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodLogOptions{`,
+ `Container:` + fmt.Sprintf("%v", this.Container) + `,`,
+ `Follow:` + fmt.Sprintf("%v", this.Follow) + `,`,
+ `Previous:` + fmt.Sprintf("%v", this.Previous) + `,`,
+ `SinceSeconds:` + valueToStringGenerated(this.SinceSeconds) + `,`,
+ `SinceTime:` + strings.Replace(fmt.Sprintf("%v", this.SinceTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`,
+ `Timestamps:` + fmt.Sprintf("%v", this.Timestamps) + `,`,
+ `TailLines:` + valueToStringGenerated(this.TailLines) + `,`,
+ `LimitBytes:` + valueToStringGenerated(this.LimitBytes) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodPortForwardOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodPortForwardOptions{`,
+ `Ports:` + fmt.Sprintf("%v", this.Ports) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodProxyOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodProxyOptions{`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodSecurityContext) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodSecurityContext{`,
+ `SELinuxOptions:` + strings.Replace(fmt.Sprintf("%v", this.SELinuxOptions), "SELinuxOptions", "SELinuxOptions", 1) + `,`,
+ `RunAsUser:` + valueToStringGenerated(this.RunAsUser) + `,`,
+ `RunAsNonRoot:` + valueToStringGenerated(this.RunAsNonRoot) + `,`,
+ `SupplementalGroups:` + fmt.Sprintf("%v", this.SupplementalGroups) + `,`,
+ `FSGroup:` + valueToStringGenerated(this.FSGroup) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodSignature) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodSignature{`,
+ `PodController:` + strings.Replace(fmt.Sprintf("%v", this.PodController), "OwnerReference", "k8s_io_apimachinery_pkg_apis_meta_v1.OwnerReference", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForNodeSelector := make([]string, 0, len(this.NodeSelector))
+ for k := range this.NodeSelector {
+ keysForNodeSelector = append(keysForNodeSelector, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForNodeSelector)
+ mapStringForNodeSelector := "map[string]string{"
+ for _, k := range keysForNodeSelector {
+ mapStringForNodeSelector += fmt.Sprintf("%v: %v,", k, this.NodeSelector[k])
+ }
+ mapStringForNodeSelector += "}"
+ s := strings.Join([]string{`&PodSpec{`,
+ `Volumes:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Volumes), "Volume", "Volume", 1), `&`, ``, 1) + `,`,
+ `Containers:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Containers), "Container", "Container", 1), `&`, ``, 1) + `,`,
+ `RestartPolicy:` + fmt.Sprintf("%v", this.RestartPolicy) + `,`,
+ `TerminationGracePeriodSeconds:` + valueToStringGenerated(this.TerminationGracePeriodSeconds) + `,`,
+ `ActiveDeadlineSeconds:` + valueToStringGenerated(this.ActiveDeadlineSeconds) + `,`,
+ `DNSPolicy:` + fmt.Sprintf("%v", this.DNSPolicy) + `,`,
+ `NodeSelector:` + mapStringForNodeSelector + `,`,
+ `ServiceAccountName:` + fmt.Sprintf("%v", this.ServiceAccountName) + `,`,
+ `DeprecatedServiceAccount:` + fmt.Sprintf("%v", this.DeprecatedServiceAccount) + `,`,
+ `NodeName:` + fmt.Sprintf("%v", this.NodeName) + `,`,
+ `HostNetwork:` + fmt.Sprintf("%v", this.HostNetwork) + `,`,
+ `HostPID:` + fmt.Sprintf("%v", this.HostPID) + `,`,
+ `HostIPC:` + fmt.Sprintf("%v", this.HostIPC) + `,`,
+ `SecurityContext:` + strings.Replace(fmt.Sprintf("%v", this.SecurityContext), "PodSecurityContext", "PodSecurityContext", 1) + `,`,
+ `ImagePullSecrets:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ImagePullSecrets), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`,
+ `Hostname:` + fmt.Sprintf("%v", this.Hostname) + `,`,
+ `Subdomain:` + fmt.Sprintf("%v", this.Subdomain) + `,`,
+ `Affinity:` + strings.Replace(fmt.Sprintf("%v", this.Affinity), "Affinity", "Affinity", 1) + `,`,
+ `SchedulerName:` + fmt.Sprintf("%v", this.SchedulerName) + `,`,
+ `InitContainers:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.InitContainers), "Container", "Container", 1), `&`, ``, 1) + `,`,
+ `AutomountServiceAccountToken:` + valueToStringGenerated(this.AutomountServiceAccountToken) + `,`,
+ `Tolerations:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Tolerations), "Toleration", "Toleration", 1), `&`, ``, 1) + `,`,
+ `HostAliases:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.HostAliases), "HostAlias", "HostAlias", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodStatus{`,
+ `Phase:` + fmt.Sprintf("%v", this.Phase) + `,`,
+ `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "PodCondition", "PodCondition", 1), `&`, ``, 1) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `HostIP:` + fmt.Sprintf("%v", this.HostIP) + `,`,
+ `PodIP:` + fmt.Sprintf("%v", this.PodIP) + `,`,
+ `StartTime:` + strings.Replace(fmt.Sprintf("%v", this.StartTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`,
+ `ContainerStatuses:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ContainerStatuses), "ContainerStatus", "ContainerStatus", 1), `&`, ``, 1) + `,`,
+ `QOSClass:` + fmt.Sprintf("%v", this.QOSClass) + `,`,
+ `InitContainerStatuses:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.InitContainerStatuses), "ContainerStatus", "ContainerStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodStatusResult) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodStatusResult{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodStatus", "PodStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodTemplate) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodTemplate{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "PodTemplateSpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodTemplateList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodTemplateList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PodTemplate", "PodTemplate", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodTemplateSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodTemplateSpec{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSpec", "PodSpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PortworxVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PortworxVolumeSource{`,
+ `VolumeID:` + fmt.Sprintf("%v", this.VolumeID) + `,`,
+ `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Preconditions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Preconditions{`,
+ `UID:` + valueToStringGenerated(this.UID) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PreferAvoidPodsEntry) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PreferAvoidPodsEntry{`,
+ `PodSignature:` + strings.Replace(strings.Replace(this.PodSignature.String(), "PodSignature", "PodSignature", 1), `&`, ``, 1) + `,`,
+ `EvictionTime:` + strings.Replace(strings.Replace(this.EvictionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PreferredSchedulingTerm) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PreferredSchedulingTerm{`,
+ `Weight:` + fmt.Sprintf("%v", this.Weight) + `,`,
+ `Preference:` + strings.Replace(strings.Replace(this.Preference.String(), "NodeSelectorTerm", "NodeSelectorTerm", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Probe) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Probe{`,
+ `Handler:` + strings.Replace(strings.Replace(this.Handler.String(), "Handler", "Handler", 1), `&`, ``, 1) + `,`,
+ `InitialDelaySeconds:` + fmt.Sprintf("%v", this.InitialDelaySeconds) + `,`,
+ `TimeoutSeconds:` + fmt.Sprintf("%v", this.TimeoutSeconds) + `,`,
+ `PeriodSeconds:` + fmt.Sprintf("%v", this.PeriodSeconds) + `,`,
+ `SuccessThreshold:` + fmt.Sprintf("%v", this.SuccessThreshold) + `,`,
+ `FailureThreshold:` + fmt.Sprintf("%v", this.FailureThreshold) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ProjectedVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ProjectedVolumeSource{`,
+ `Sources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Sources), "VolumeProjection", "VolumeProjection", 1), `&`, ``, 1) + `,`,
+ `DefaultMode:` + valueToStringGenerated(this.DefaultMode) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *QuobyteVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&QuobyteVolumeSource{`,
+ `Registry:` + fmt.Sprintf("%v", this.Registry) + `,`,
+ `Volume:` + fmt.Sprintf("%v", this.Volume) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `User:` + fmt.Sprintf("%v", this.User) + `,`,
+ `Group:` + fmt.Sprintf("%v", this.Group) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RBDVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RBDVolumeSource{`,
+ `CephMonitors:` + fmt.Sprintf("%v", this.CephMonitors) + `,`,
+ `RBDImage:` + fmt.Sprintf("%v", this.RBDImage) + `,`,
+ `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`,
+ `RBDPool:` + fmt.Sprintf("%v", this.RBDPool) + `,`,
+ `RadosUser:` + fmt.Sprintf("%v", this.RadosUser) + `,`,
+ `Keyring:` + fmt.Sprintf("%v", this.Keyring) + `,`,
+ `SecretRef:` + strings.Replace(fmt.Sprintf("%v", this.SecretRef), "LocalObjectReference", "LocalObjectReference", 1) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RangeAllocation) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RangeAllocation{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Range:` + fmt.Sprintf("%v", this.Range) + `,`,
+ `Data:` + valueToStringGenerated(this.Data) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ReplicationController) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ReplicationController{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ReplicationControllerSpec", "ReplicationControllerSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ReplicationControllerStatus", "ReplicationControllerStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ReplicationControllerCondition) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ReplicationControllerCondition{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
+ `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ReplicationControllerList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ReplicationControllerList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ReplicationController", "ReplicationController", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ReplicationControllerSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForSelector := make([]string, 0, len(this.Selector))
+ for k := range this.Selector {
+ keysForSelector = append(keysForSelector, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForSelector)
+ mapStringForSelector := "map[string]string{"
+ for _, k := range keysForSelector {
+ mapStringForSelector += fmt.Sprintf("%v: %v,", k, this.Selector[k])
+ }
+ mapStringForSelector += "}"
+ s := strings.Join([]string{`&ReplicationControllerSpec{`,
+ `Replicas:` + valueToStringGenerated(this.Replicas) + `,`,
+ `Selector:` + mapStringForSelector + `,`,
+ `Template:` + strings.Replace(fmt.Sprintf("%v", this.Template), "PodTemplateSpec", "PodTemplateSpec", 1) + `,`,
+ `MinReadySeconds:` + fmt.Sprintf("%v", this.MinReadySeconds) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ReplicationControllerStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ReplicationControllerStatus{`,
+ `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
+ `FullyLabeledReplicas:` + fmt.Sprintf("%v", this.FullyLabeledReplicas) + `,`,
+ `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
+ `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`,
+ `AvailableReplicas:` + fmt.Sprintf("%v", this.AvailableReplicas) + `,`,
+ `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "ReplicationControllerCondition", "ReplicationControllerCondition", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceFieldSelector) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ResourceFieldSelector{`,
+ `ContainerName:` + fmt.Sprintf("%v", this.ContainerName) + `,`,
+ `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`,
+ `Divisor:` + strings.Replace(strings.Replace(this.Divisor.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceQuota) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ResourceQuota{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceQuotaSpec", "ResourceQuotaSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ResourceQuotaStatus", "ResourceQuotaStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceQuotaList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ResourceQuotaList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ResourceQuota", "ResourceQuota", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceQuotaSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForHard := make([]string, 0, len(this.Hard))
+ for k := range this.Hard {
+ keysForHard = append(keysForHard, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForHard)
+ mapStringForHard := "ResourceList{"
+ for _, k := range keysForHard {
+ mapStringForHard += fmt.Sprintf("%v: %v,", k, this.Hard[ResourceName(k)])
+ }
+ mapStringForHard += "}"
+ s := strings.Join([]string{`&ResourceQuotaSpec{`,
+ `Hard:` + mapStringForHard + `,`,
+ `Scopes:` + fmt.Sprintf("%v", this.Scopes) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceQuotaStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForHard := make([]string, 0, len(this.Hard))
+ for k := range this.Hard {
+ keysForHard = append(keysForHard, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForHard)
+ mapStringForHard := "ResourceList{"
+ for _, k := range keysForHard {
+ mapStringForHard += fmt.Sprintf("%v: %v,", k, this.Hard[ResourceName(k)])
+ }
+ mapStringForHard += "}"
+ keysForUsed := make([]string, 0, len(this.Used))
+ for k := range this.Used {
+ keysForUsed = append(keysForUsed, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForUsed)
+ mapStringForUsed := "ResourceList{"
+ for _, k := range keysForUsed {
+ mapStringForUsed += fmt.Sprintf("%v: %v,", k, this.Used[ResourceName(k)])
+ }
+ mapStringForUsed += "}"
+ s := strings.Join([]string{`&ResourceQuotaStatus{`,
+ `Hard:` + mapStringForHard + `,`,
+ `Used:` + mapStringForUsed + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceRequirements) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForLimits := make([]string, 0, len(this.Limits))
+ for k := range this.Limits {
+ keysForLimits = append(keysForLimits, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLimits)
+ mapStringForLimits := "ResourceList{"
+ for _, k := range keysForLimits {
+ mapStringForLimits += fmt.Sprintf("%v: %v,", k, this.Limits[ResourceName(k)])
+ }
+ mapStringForLimits += "}"
+ keysForRequests := make([]string, 0, len(this.Requests))
+ for k := range this.Requests {
+ keysForRequests = append(keysForRequests, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForRequests)
+ mapStringForRequests := "ResourceList{"
+ for _, k := range keysForRequests {
+ mapStringForRequests += fmt.Sprintf("%v: %v,", k, this.Requests[ResourceName(k)])
+ }
+ mapStringForRequests += "}"
+ s := strings.Join([]string{`&ResourceRequirements{`,
+ `Limits:` + mapStringForLimits + `,`,
+ `Requests:` + mapStringForRequests + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SELinuxOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SELinuxOptions{`,
+ `User:` + fmt.Sprintf("%v", this.User) + `,`,
+ `Role:` + fmt.Sprintf("%v", this.Role) + `,`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Level:` + fmt.Sprintf("%v", this.Level) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ScaleIOVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ScaleIOVolumeSource{`,
+ `Gateway:` + fmt.Sprintf("%v", this.Gateway) + `,`,
+ `System:` + fmt.Sprintf("%v", this.System) + `,`,
+ `SecretRef:` + strings.Replace(fmt.Sprintf("%v", this.SecretRef), "LocalObjectReference", "LocalObjectReference", 1) + `,`,
+ `SSLEnabled:` + fmt.Sprintf("%v", this.SSLEnabled) + `,`,
+ `ProtectionDomain:` + fmt.Sprintf("%v", this.ProtectionDomain) + `,`,
+ `StoragePool:` + fmt.Sprintf("%v", this.StoragePool) + `,`,
+ `StorageMode:` + fmt.Sprintf("%v", this.StorageMode) + `,`,
+ `VolumeName:` + fmt.Sprintf("%v", this.VolumeName) + `,`,
+ `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Secret) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForData := make([]string, 0, len(this.Data))
+ for k := range this.Data {
+ keysForData = append(keysForData, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForData)
+ mapStringForData := "map[string][]byte{"
+ for _, k := range keysForData {
+ mapStringForData += fmt.Sprintf("%v: %v,", k, this.Data[k])
+ }
+ mapStringForData += "}"
+ keysForStringData := make([]string, 0, len(this.StringData))
+ for k := range this.StringData {
+ keysForStringData = append(keysForStringData, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForStringData)
+ mapStringForStringData := "map[string]string{"
+ for _, k := range keysForStringData {
+ mapStringForStringData += fmt.Sprintf("%v: %v,", k, this.StringData[k])
+ }
+ mapStringForStringData += "}"
+ s := strings.Join([]string{`&Secret{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Data:` + mapStringForData + `,`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `StringData:` + mapStringForStringData + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SecretEnvSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SecretEnvSource{`,
+ `LocalObjectReference:` + strings.Replace(strings.Replace(this.LocalObjectReference.String(), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`,
+ `Optional:` + valueToStringGenerated(this.Optional) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SecretKeySelector) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SecretKeySelector{`,
+ `LocalObjectReference:` + strings.Replace(strings.Replace(this.LocalObjectReference.String(), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`,
+ `Key:` + fmt.Sprintf("%v", this.Key) + `,`,
+ `Optional:` + valueToStringGenerated(this.Optional) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SecretList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SecretList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Secret", "Secret", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SecretProjection) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SecretProjection{`,
+ `LocalObjectReference:` + strings.Replace(strings.Replace(this.LocalObjectReference.String(), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "KeyToPath", "KeyToPath", 1), `&`, ``, 1) + `,`,
+ `Optional:` + valueToStringGenerated(this.Optional) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SecretVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SecretVolumeSource{`,
+ `SecretName:` + fmt.Sprintf("%v", this.SecretName) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "KeyToPath", "KeyToPath", 1), `&`, ``, 1) + `,`,
+ `DefaultMode:` + valueToStringGenerated(this.DefaultMode) + `,`,
+ `Optional:` + valueToStringGenerated(this.Optional) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SecurityContext) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SecurityContext{`,
+ `Capabilities:` + strings.Replace(fmt.Sprintf("%v", this.Capabilities), "Capabilities", "Capabilities", 1) + `,`,
+ `Privileged:` + valueToStringGenerated(this.Privileged) + `,`,
+ `SELinuxOptions:` + strings.Replace(fmt.Sprintf("%v", this.SELinuxOptions), "SELinuxOptions", "SELinuxOptions", 1) + `,`,
+ `RunAsUser:` + valueToStringGenerated(this.RunAsUser) + `,`,
+ `RunAsNonRoot:` + valueToStringGenerated(this.RunAsNonRoot) + `,`,
+ `ReadOnlyRootFilesystem:` + valueToStringGenerated(this.ReadOnlyRootFilesystem) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SerializedReference) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SerializedReference{`,
+ `Reference:` + strings.Replace(strings.Replace(this.Reference.String(), "ObjectReference", "ObjectReference", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Service) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Service{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ServiceSpec", "ServiceSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ServiceStatus", "ServiceStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ServiceAccount) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ServiceAccount{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Secrets:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Secrets), "ObjectReference", "ObjectReference", 1), `&`, ``, 1) + `,`,
+ `ImagePullSecrets:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ImagePullSecrets), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`,
+ `AutomountServiceAccountToken:` + valueToStringGenerated(this.AutomountServiceAccountToken) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ServiceAccountList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ServiceAccountList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ServiceAccount", "ServiceAccount", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ServiceList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ServiceList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Service", "Service", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ServicePort) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ServicePort{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Protocol:` + fmt.Sprintf("%v", this.Protocol) + `,`,
+ `Port:` + fmt.Sprintf("%v", this.Port) + `,`,
+ `TargetPort:` + strings.Replace(strings.Replace(this.TargetPort.String(), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1), `&`, ``, 1) + `,`,
+ `NodePort:` + fmt.Sprintf("%v", this.NodePort) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ServiceProxyOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ServiceProxyOptions{`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ServiceSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForSelector := make([]string, 0, len(this.Selector))
+ for k := range this.Selector {
+ keysForSelector = append(keysForSelector, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForSelector)
+ mapStringForSelector := "map[string]string{"
+ for _, k := range keysForSelector {
+ mapStringForSelector += fmt.Sprintf("%v: %v,", k, this.Selector[k])
+ }
+ mapStringForSelector += "}"
+ s := strings.Join([]string{`&ServiceSpec{`,
+ `Ports:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ports), "ServicePort", "ServicePort", 1), `&`, ``, 1) + `,`,
+ `Selector:` + mapStringForSelector + `,`,
+ `ClusterIP:` + fmt.Sprintf("%v", this.ClusterIP) + `,`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `ExternalIPs:` + fmt.Sprintf("%v", this.ExternalIPs) + `,`,
+ `SessionAffinity:` + fmt.Sprintf("%v", this.SessionAffinity) + `,`,
+ `LoadBalancerIP:` + fmt.Sprintf("%v", this.LoadBalancerIP) + `,`,
+ `LoadBalancerSourceRanges:` + fmt.Sprintf("%v", this.LoadBalancerSourceRanges) + `,`,
+ `ExternalName:` + fmt.Sprintf("%v", this.ExternalName) + `,`,
+ `ExternalTrafficPolicy:` + fmt.Sprintf("%v", this.ExternalTrafficPolicy) + `,`,
+ `HealthCheckNodePort:` + fmt.Sprintf("%v", this.HealthCheckNodePort) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ServiceStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ServiceStatus{`,
+ `LoadBalancer:` + strings.Replace(strings.Replace(this.LoadBalancer.String(), "LoadBalancerStatus", "LoadBalancerStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StorageOSPersistentVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StorageOSPersistentVolumeSource{`,
+ `VolumeName:` + fmt.Sprintf("%v", this.VolumeName) + `,`,
+ `VolumeNamespace:` + fmt.Sprintf("%v", this.VolumeNamespace) + `,`,
+ `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `SecretRef:` + strings.Replace(fmt.Sprintf("%v", this.SecretRef), "ObjectReference", "ObjectReference", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StorageOSVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StorageOSVolumeSource{`,
+ `VolumeName:` + fmt.Sprintf("%v", this.VolumeName) + `,`,
+ `VolumeNamespace:` + fmt.Sprintf("%v", this.VolumeNamespace) + `,`,
+ `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `SecretRef:` + strings.Replace(fmt.Sprintf("%v", this.SecretRef), "LocalObjectReference", "LocalObjectReference", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Sysctl) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Sysctl{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Value:` + fmt.Sprintf("%v", this.Value) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *TCPSocketAction) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&TCPSocketAction{`,
+ `Port:` + strings.Replace(strings.Replace(this.Port.String(), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1), `&`, ``, 1) + `,`,
+ `Host:` + fmt.Sprintf("%v", this.Host) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Taint) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Taint{`,
+ `Key:` + fmt.Sprintf("%v", this.Key) + `,`,
+ `Value:` + fmt.Sprintf("%v", this.Value) + `,`,
+ `Effect:` + fmt.Sprintf("%v", this.Effect) + `,`,
+ `TimeAdded:` + strings.Replace(strings.Replace(this.TimeAdded.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Toleration) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Toleration{`,
+ `Key:` + fmt.Sprintf("%v", this.Key) + `,`,
+ `Operator:` + fmt.Sprintf("%v", this.Operator) + `,`,
+ `Value:` + fmt.Sprintf("%v", this.Value) + `,`,
+ `Effect:` + fmt.Sprintf("%v", this.Effect) + `,`,
+ `TolerationSeconds:` + valueToStringGenerated(this.TolerationSeconds) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Volume) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Volume{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `VolumeSource:` + strings.Replace(strings.Replace(this.VolumeSource.String(), "VolumeSource", "VolumeSource", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *VolumeMount) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&VolumeMount{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
+ `MountPath:` + fmt.Sprintf("%v", this.MountPath) + `,`,
+ `SubPath:` + fmt.Sprintf("%v", this.SubPath) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *VolumeProjection) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&VolumeProjection{`,
+ `Secret:` + strings.Replace(fmt.Sprintf("%v", this.Secret), "SecretProjection", "SecretProjection", 1) + `,`,
+ `DownwardAPI:` + strings.Replace(fmt.Sprintf("%v", this.DownwardAPI), "DownwardAPIProjection", "DownwardAPIProjection", 1) + `,`,
+ `ConfigMap:` + strings.Replace(fmt.Sprintf("%v", this.ConfigMap), "ConfigMapProjection", "ConfigMapProjection", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *VolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&VolumeSource{`,
+ `HostPath:` + strings.Replace(fmt.Sprintf("%v", this.HostPath), "HostPathVolumeSource", "HostPathVolumeSource", 1) + `,`,
+ `EmptyDir:` + strings.Replace(fmt.Sprintf("%v", this.EmptyDir), "EmptyDirVolumeSource", "EmptyDirVolumeSource", 1) + `,`,
+ `GCEPersistentDisk:` + strings.Replace(fmt.Sprintf("%v", this.GCEPersistentDisk), "GCEPersistentDiskVolumeSource", "GCEPersistentDiskVolumeSource", 1) + `,`,
+ `AWSElasticBlockStore:` + strings.Replace(fmt.Sprintf("%v", this.AWSElasticBlockStore), "AWSElasticBlockStoreVolumeSource", "AWSElasticBlockStoreVolumeSource", 1) + `,`,
+ `GitRepo:` + strings.Replace(fmt.Sprintf("%v", this.GitRepo), "GitRepoVolumeSource", "GitRepoVolumeSource", 1) + `,`,
+ `Secret:` + strings.Replace(fmt.Sprintf("%v", this.Secret), "SecretVolumeSource", "SecretVolumeSource", 1) + `,`,
+ `NFS:` + strings.Replace(fmt.Sprintf("%v", this.NFS), "NFSVolumeSource", "NFSVolumeSource", 1) + `,`,
+ `ISCSI:` + strings.Replace(fmt.Sprintf("%v", this.ISCSI), "ISCSIVolumeSource", "ISCSIVolumeSource", 1) + `,`,
+ `Glusterfs:` + strings.Replace(fmt.Sprintf("%v", this.Glusterfs), "GlusterfsVolumeSource", "GlusterfsVolumeSource", 1) + `,`,
+ `PersistentVolumeClaim:` + strings.Replace(fmt.Sprintf("%v", this.PersistentVolumeClaim), "PersistentVolumeClaimVolumeSource", "PersistentVolumeClaimVolumeSource", 1) + `,`,
+ `RBD:` + strings.Replace(fmt.Sprintf("%v", this.RBD), "RBDVolumeSource", "RBDVolumeSource", 1) + `,`,
+ `FlexVolume:` + strings.Replace(fmt.Sprintf("%v", this.FlexVolume), "FlexVolumeSource", "FlexVolumeSource", 1) + `,`,
+ `Cinder:` + strings.Replace(fmt.Sprintf("%v", this.Cinder), "CinderVolumeSource", "CinderVolumeSource", 1) + `,`,
+ `CephFS:` + strings.Replace(fmt.Sprintf("%v", this.CephFS), "CephFSVolumeSource", "CephFSVolumeSource", 1) + `,`,
+ `Flocker:` + strings.Replace(fmt.Sprintf("%v", this.Flocker), "FlockerVolumeSource", "FlockerVolumeSource", 1) + `,`,
+ `DownwardAPI:` + strings.Replace(fmt.Sprintf("%v", this.DownwardAPI), "DownwardAPIVolumeSource", "DownwardAPIVolumeSource", 1) + `,`,
+ `FC:` + strings.Replace(fmt.Sprintf("%v", this.FC), "FCVolumeSource", "FCVolumeSource", 1) + `,`,
+ `AzureFile:` + strings.Replace(fmt.Sprintf("%v", this.AzureFile), "AzureFileVolumeSource", "AzureFileVolumeSource", 1) + `,`,
+ `ConfigMap:` + strings.Replace(fmt.Sprintf("%v", this.ConfigMap), "ConfigMapVolumeSource", "ConfigMapVolumeSource", 1) + `,`,
+ `VsphereVolume:` + strings.Replace(fmt.Sprintf("%v", this.VsphereVolume), "VsphereVirtualDiskVolumeSource", "VsphereVirtualDiskVolumeSource", 1) + `,`,
+ `Quobyte:` + strings.Replace(fmt.Sprintf("%v", this.Quobyte), "QuobyteVolumeSource", "QuobyteVolumeSource", 1) + `,`,
+ `AzureDisk:` + strings.Replace(fmt.Sprintf("%v", this.AzureDisk), "AzureDiskVolumeSource", "AzureDiskVolumeSource", 1) + `,`,
+ `PhotonPersistentDisk:` + strings.Replace(fmt.Sprintf("%v", this.PhotonPersistentDisk), "PhotonPersistentDiskVolumeSource", "PhotonPersistentDiskVolumeSource", 1) + `,`,
+ `PortworxVolume:` + strings.Replace(fmt.Sprintf("%v", this.PortworxVolume), "PortworxVolumeSource", "PortworxVolumeSource", 1) + `,`,
+ `ScaleIO:` + strings.Replace(fmt.Sprintf("%v", this.ScaleIO), "ScaleIOVolumeSource", "ScaleIOVolumeSource", 1) + `,`,
+ `Projected:` + strings.Replace(fmt.Sprintf("%v", this.Projected), "ProjectedVolumeSource", "ProjectedVolumeSource", 1) + `,`,
+ `StorageOS:` + strings.Replace(fmt.Sprintf("%v", this.StorageOS), "StorageOSVolumeSource", "StorageOSVolumeSource", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *VsphereVirtualDiskVolumeSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&VsphereVirtualDiskVolumeSource{`,
+ `VolumePath:` + fmt.Sprintf("%v", this.VolumePath) + `,`,
+ `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`,
+ `StoragePolicyName:` + fmt.Sprintf("%v", this.StoragePolicyName) + `,`,
+ `StoragePolicyID:` + fmt.Sprintf("%v", this.StoragePolicyID) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *WeightedPodAffinityTerm) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&WeightedPodAffinityTerm{`,
+ `Weight:` + fmt.Sprintf("%v", this.Weight) + `,`,
+ `PodAffinityTerm:` + strings.Replace(strings.Replace(this.PodAffinityTerm.String(), "PodAffinityTerm", "PodAffinityTerm", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *AWSElasticBlockStoreVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: AWSElasticBlockStoreVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: AWSElasticBlockStoreVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumeID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FSType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Partition", wireType)
+ }
+ m.Partition = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Partition |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Affinity) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Affinity: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Affinity: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NodeAffinity", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.NodeAffinity == nil {
+ m.NodeAffinity = &NodeAffinity{}
+ }
+ if err := m.NodeAffinity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodAffinity", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PodAffinity == nil {
+ m.PodAffinity = &PodAffinity{}
+ }
+ if err := m.PodAffinity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodAntiAffinity", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PodAntiAffinity == nil {
+ m.PodAntiAffinity = &PodAntiAffinity{}
+ }
+ if err := m.PodAntiAffinity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *AttachedVolume) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: AttachedVolume: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: AttachedVolume: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = UniqueVolumeName(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DevicePath", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.DevicePath = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *AvoidPods) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: AvoidPods: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: AvoidPods: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PreferAvoidPods", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PreferAvoidPods = append(m.PreferAvoidPods, PreferAvoidPodsEntry{})
+ if err := m.PreferAvoidPods[len(m.PreferAvoidPods)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *AzureDiskVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: AzureDiskVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: AzureDiskVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DiskName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.DiskName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DataDiskURI", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.DataDiskURI = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CachingMode", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := AzureDataDiskCachingMode(dAtA[iNdEx:postIndex])
+ m.CachingMode = &s
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := string(dAtA[iNdEx:postIndex])
+ m.FSType = &s
+ iNdEx = postIndex
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.ReadOnly = &b
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := AzureDataDiskKind(dAtA[iNdEx:postIndex])
+ m.Kind = &s
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *AzureFileVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: AzureFileVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: AzureFileVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecretName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SecretName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ShareName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ShareName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Binding) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Binding: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Binding: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Capabilities) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Capabilities: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Capabilities: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Add", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Add = append(m.Add, Capability(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Drop", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Drop = append(m.Drop, Capability(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CephFSVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CephFSVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CephFSVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Monitors", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Monitors = append(m.Monitors, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.User = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecretFile", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SecretFile = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecretRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SecretRef == nil {
+ m.SecretRef = &LocalObjectReference{}
+ }
+ if err := m.SecretRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CinderVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CinderVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CinderVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumeID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FSType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ComponentCondition) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ComponentCondition: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ComponentCondition: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = ComponentConditionType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Status = ConditionStatus(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Error = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ComponentStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ComponentStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ComponentStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Conditions = append(m.Conditions, ComponentCondition{})
+ if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ComponentStatusList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ComponentStatusList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ComponentStatusList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ComponentStatus{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ConfigMap) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ConfigMap: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ConfigMap: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Data == nil {
+ m.Data = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Data[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Data[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ConfigMapEnvSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ConfigMapEnvSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ConfigMapEnvSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LocalObjectReference", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LocalObjectReference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Optional = &b
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ConfigMapKeySelector) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ConfigMapKeySelector: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ConfigMapKeySelector: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LocalObjectReference", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LocalObjectReference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Key = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Optional = &b
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ConfigMapList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ConfigMapList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ConfigMapList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ConfigMap{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ConfigMapProjection) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ConfigMapProjection: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ConfigMapProjection: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LocalObjectReference", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LocalObjectReference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, KeyToPath{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Optional = &b
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ConfigMapVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ConfigMapVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ConfigMapVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LocalObjectReference", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LocalObjectReference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, KeyToPath{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DefaultMode", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.DefaultMode = &v
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Optional = &b
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Container) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Container: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Container: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Image = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Command = append(m.Command, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Args = append(m.Args, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field WorkingDir", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.WorkingDir = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Ports = append(m.Ports, ContainerPort{})
+ if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Env = append(m.Env, EnvVar{})
+ if err := m.Env[len(m.Env)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Resources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeMounts", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumeMounts = append(m.VolumeMounts, VolumeMount{})
+ if err := m.VolumeMounts[len(m.VolumeMounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LivenessProbe", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.LivenessProbe == nil {
+ m.LivenessProbe = &Probe{}
+ }
+ if err := m.LivenessProbe.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 11:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadinessProbe", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ReadinessProbe == nil {
+ m.ReadinessProbe = &Probe{}
+ }
+ if err := m.ReadinessProbe.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 12:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Lifecycle", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Lifecycle == nil {
+ m.Lifecycle = &Lifecycle{}
+ }
+ if err := m.Lifecycle.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 13:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TerminationMessagePath", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.TerminationMessagePath = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 14:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ImagePullPolicy", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ImagePullPolicy = PullPolicy(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 15:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecurityContext", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SecurityContext == nil {
+ m.SecurityContext = &SecurityContext{}
+ }
+ if err := m.SecurityContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 16:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Stdin = bool(v != 0)
+ case 17:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StdinOnce", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.StdinOnce = bool(v != 0)
+ case 18:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TTY", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.TTY = bool(v != 0)
+ case 19:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field EnvFrom", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.EnvFrom = append(m.EnvFrom, EnvFromSource{})
+ if err := m.EnvFrom[len(m.EnvFrom)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 20:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TerminationMessagePolicy", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.TerminationMessagePolicy = TerminationMessagePolicy(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerImage) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerImage: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerImage: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Names", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Names = append(m.Names, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SizeBytes", wireType)
+ }
+ m.SizeBytes = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.SizeBytes |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerPort) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerPort: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerPort: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostPort", wireType)
+ }
+ m.HostPort = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.HostPort |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ContainerPort", wireType)
+ }
+ m.ContainerPort = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ContainerPort |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Protocol = Protocol(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostIP", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.HostIP = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerState) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerState: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerState: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Waiting", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Waiting == nil {
+ m.Waiting = &ContainerStateWaiting{}
+ }
+ if err := m.Waiting.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Running", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Running == nil {
+ m.Running = &ContainerStateRunning{}
+ }
+ if err := m.Running.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Terminated", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Terminated == nil {
+ m.Terminated = &ContainerStateTerminated{}
+ }
+ if err := m.Terminated.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerStateRunning) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerStateRunning: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerStateRunning: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.StartedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerStateTerminated) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerStateTerminated: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerStateTerminated: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ExitCode", wireType)
+ }
+ m.ExitCode = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ExitCode |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Signal", wireType)
+ }
+ m.Signal = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Signal |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.StartedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FinishedAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.FinishedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ContainerID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerStateWaiting) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerStateWaiting: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerStateWaiting: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.State.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastTerminationState", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastTerminationState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Ready", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Ready = bool(v != 0)
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RestartCount", wireType)
+ }
+ m.RestartCount = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.RestartCount |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Image = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ImageID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ImageID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ContainerID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DaemonEndpoint) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DaemonEndpoint: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DaemonEndpoint: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
+ }
+ m.Port = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Port |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeleteOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeleteOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeleteOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field GracePeriodSeconds", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.GracePeriodSeconds = &v
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Preconditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Preconditions == nil {
+ m.Preconditions = &Preconditions{}
+ }
+ if err := m.Preconditions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OrphanDependents", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.OrphanDependents = &b
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PropagationPolicy", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := DeletionPropagation(dAtA[iNdEx:postIndex])
+ m.PropagationPolicy = &s
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DownwardAPIProjection) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DownwardAPIProjection: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DownwardAPIProjection: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, DownwardAPIVolumeFile{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DownwardAPIVolumeFile) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DownwardAPIVolumeFile: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DownwardAPIVolumeFile: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FieldRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.FieldRef == nil {
+ m.FieldRef = &ObjectFieldSelector{}
+ }
+ if err := m.FieldRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceFieldRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ResourceFieldRef == nil {
+ m.ResourceFieldRef = &ResourceFieldSelector{}
+ }
+ if err := m.ResourceFieldRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Mode = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DownwardAPIVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DownwardAPIVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DownwardAPIVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, DownwardAPIVolumeFile{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DefaultMode", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.DefaultMode = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *EmptyDirVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: EmptyDirVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: EmptyDirVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Medium", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Medium = StorageMedium(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SizeLimit", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SizeLimit == nil {
+ m.SizeLimit = &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ }
+ if err := m.SizeLimit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *EndpointAddress) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: EndpointAddress: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: EndpointAddress: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IP", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.IP = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.TargetRef == nil {
+ m.TargetRef = &ObjectReference{}
+ }
+ if err := m.TargetRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Hostname = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := string(dAtA[iNdEx:postIndex])
+ m.NodeName = &s
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *EndpointPort) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: EndpointPort: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: EndpointPort: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
+ }
+ m.Port = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Port |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Protocol = Protocol(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *EndpointSubset) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: EndpointSubset: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: EndpointSubset: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Addresses = append(m.Addresses, EndpointAddress{})
+ if err := m.Addresses[len(m.Addresses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NotReadyAddresses", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.NotReadyAddresses = append(m.NotReadyAddresses, EndpointAddress{})
+ if err := m.NotReadyAddresses[len(m.NotReadyAddresses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Ports = append(m.Ports, EndpointPort{})
+ if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Endpoints) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Endpoints: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Endpoints: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Subsets", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Subsets = append(m.Subsets, EndpointSubset{})
+ if err := m.Subsets[len(m.Subsets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *EndpointsList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: EndpointsList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: EndpointsList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, Endpoints{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *EnvFromSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: EnvFromSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: EnvFromSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Prefix", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Prefix = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ConfigMapRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ConfigMapRef == nil {
+ m.ConfigMapRef = &ConfigMapEnvSource{}
+ }
+ if err := m.ConfigMapRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecretRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SecretRef == nil {
+ m.SecretRef = &SecretEnvSource{}
+ }
+ if err := m.SecretRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *EnvVar) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: EnvVar: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: EnvVar: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Value = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ValueFrom", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ValueFrom == nil {
+ m.ValueFrom = &EnvVarSource{}
+ }
+ if err := m.ValueFrom.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *EnvVarSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: EnvVarSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: EnvVarSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FieldRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.FieldRef == nil {
+ m.FieldRef = &ObjectFieldSelector{}
+ }
+ if err := m.FieldRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceFieldRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ResourceFieldRef == nil {
+ m.ResourceFieldRef = &ResourceFieldSelector{}
+ }
+ if err := m.ResourceFieldRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ConfigMapKeyRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ConfigMapKeyRef == nil {
+ m.ConfigMapKeyRef = &ConfigMapKeySelector{}
+ }
+ if err := m.ConfigMapKeyRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecretKeyRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SecretKeyRef == nil {
+ m.SecretKeyRef = &SecretKeySelector{}
+ }
+ if err := m.SecretKeyRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Event) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Event: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field InvolvedObject", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.InvolvedObject.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FirstTimestamp", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.FirstTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastTimestamp", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType)
+ }
+ m.Count = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Count |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *EventList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: EventList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: EventList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, Event{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *EventSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: EventSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: EventSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Component", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Component = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Host = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExecAction) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExecAction: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExecAction: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Command = append(m.Command, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *FCVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: FCVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: FCVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetWWNs", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.TargetWWNs = append(m.TargetWWNs, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Lun", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Lun = &v
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FSType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *FlexVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: FlexVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: FlexVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Driver = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FSType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecretRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SecretRef == nil {
+ m.SecretRef = &LocalObjectReference{}
+ }
+ if err := m.SecretRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Options == nil {
+ m.Options = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Options[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Options[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *FlockerVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: FlockerVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: FlockerVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DatasetName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.DatasetName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DatasetUUID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.DatasetUUID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *GCEPersistentDiskVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: GCEPersistentDiskVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: GCEPersistentDiskVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PDName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PDName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FSType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Partition", wireType)
+ }
+ m.Partition = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Partition |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *GitRepoVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: GitRepoVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: GitRepoVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Repository", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Repository = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Revision = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Directory", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Directory = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *GlusterfsVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: GlusterfsVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: GlusterfsVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field EndpointsName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.EndpointsName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HTTPGetAction) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HTTPGetAction: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HTTPGetAction: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Port.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Host = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Scheme", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Scheme = URIScheme(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HTTPHeaders", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.HTTPHeaders = append(m.HTTPHeaders, HTTPHeader{})
+ if err := m.HTTPHeaders[len(m.HTTPHeaders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HTTPHeader) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HTTPHeader: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HTTPHeader: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Value = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Handler) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Handler: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Handler: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Exec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Exec == nil {
+ m.Exec = &ExecAction{}
+ }
+ if err := m.Exec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HTTPGet", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.HTTPGet == nil {
+ m.HTTPGet = &HTTPGetAction{}
+ }
+ if err := m.HTTPGet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TCPSocket", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.TCPSocket == nil {
+ m.TCPSocket = &TCPSocketAction{}
+ }
+ if err := m.TCPSocket.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HostAlias) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HostAlias: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HostAlias: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IP", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.IP = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Hostnames", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Hostnames = append(m.Hostnames, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HostPathVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HostPathVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HostPathVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ISCSIVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ISCSIVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ISCSIVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetPortal", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.TargetPortal = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IQN", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.IQN = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Lun", wireType)
+ }
+ m.Lun = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Lun |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ISCSIInterface", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ISCSIInterface = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FSType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Portals", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Portals = append(m.Portals, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 8:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DiscoveryCHAPAuth", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.DiscoveryCHAPAuth = bool(v != 0)
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecretRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SecretRef == nil {
+ m.SecretRef = &LocalObjectReference{}
+ }
+ if err := m.SecretRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 11:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SessionCHAPAuth", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.SessionCHAPAuth = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *KeyToPath) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: KeyToPath: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: KeyToPath: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Key = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Mode = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Lifecycle) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Lifecycle: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Lifecycle: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PostStart", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PostStart == nil {
+ m.PostStart = &Handler{}
+ }
+ if err := m.PostStart.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PreStop", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PreStop == nil {
+ m.PreStop = &Handler{}
+ }
+ if err := m.PreStop.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LimitRange) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LimitRange: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LimitRange: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LimitRangeItem) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LimitRangeItem: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LimitRangeItem: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = LimitType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Max == nil {
+ m.Max = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Max[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.Max[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Min == nil {
+ m.Min = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Min[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.Min[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Default", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Default == nil {
+ m.Default = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Default[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.Default[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DefaultRequest", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.DefaultRequest == nil {
+ m.DefaultRequest = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.DefaultRequest[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.DefaultRequest[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MaxLimitRequestRatio", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.MaxLimitRequestRatio == nil {
+ m.MaxLimitRequestRatio = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.MaxLimitRequestRatio[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.MaxLimitRequestRatio[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LimitRangeList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LimitRangeList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LimitRangeList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, LimitRange{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LimitRangeSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LimitRangeSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LimitRangeSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Limits", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Limits = append(m.Limits, LimitRangeItem{})
+ if err := m.Limits[len(m.Limits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *List) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: List: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: List: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, k8s_io_apimachinery_pkg_runtime.RawExtension{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ListOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ListOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ListOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.LabelSelector = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FieldSelector", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FieldSelector = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Watch", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Watch = bool(v != 0)
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ResourceVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TimeoutSeconds", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.TimeoutSeconds = &v
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IncludeUninitialized", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.IncludeUninitialized = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LoadBalancerIngress) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LoadBalancerIngress: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LoadBalancerIngress: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IP", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.IP = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Hostname = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LoadBalancerStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LoadBalancerStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LoadBalancerStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Ingress", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Ingress = append(m.Ingress, LoadBalancerIngress{})
+ if err := m.Ingress[len(m.Ingress)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LocalObjectReference) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LocalObjectReference: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LocalObjectReference: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LocalVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LocalVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LocalVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NFSVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NFSVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NFSVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Server", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Server = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Namespace) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Namespace: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Namespace: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NamespaceList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NamespaceList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NamespaceList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, Namespace{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NamespaceSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NamespaceSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NamespaceSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Finalizers", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Finalizers = append(m.Finalizers, FinalizerName(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NamespaceStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NamespaceStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NamespaceStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Phase", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Phase = NamespacePhase(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Node) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Node: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Node: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NodeAddress) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NodeAddress: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NodeAddress: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = NodeAddressType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Address = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NodeAffinity) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NodeAffinity: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NodeAffinity: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RequiredDuringSchedulingIgnoredDuringExecution", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.RequiredDuringSchedulingIgnoredDuringExecution == nil {
+ m.RequiredDuringSchedulingIgnoredDuringExecution = &NodeSelector{}
+ }
+ if err := m.RequiredDuringSchedulingIgnoredDuringExecution.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PreferredDuringSchedulingIgnoredDuringExecution", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PreferredDuringSchedulingIgnoredDuringExecution = append(m.PreferredDuringSchedulingIgnoredDuringExecution, PreferredSchedulingTerm{})
+ if err := m.PreferredDuringSchedulingIgnoredDuringExecution[len(m.PreferredDuringSchedulingIgnoredDuringExecution)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NodeCondition) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NodeCondition: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NodeCondition: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = NodeConditionType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Status = ConditionStatus(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastHeartbeatTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastHeartbeatTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NodeDaemonEndpoints) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NodeDaemonEndpoints: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NodeDaemonEndpoints: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field KubeletEndpoint", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.KubeletEndpoint.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NodeList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NodeList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NodeList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, Node{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NodeProxyOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NodeProxyOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NodeProxyOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NodeResources) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NodeResources: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NodeResources: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Capacity == nil {
+ m.Capacity = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Capacity[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.Capacity[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NodeSelector) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NodeSelector: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NodeSelector: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NodeSelectorTerms", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.NodeSelectorTerms = append(m.NodeSelectorTerms, NodeSelectorTerm{})
+ if err := m.NodeSelectorTerms[len(m.NodeSelectorTerms)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NodeSelectorRequirement) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NodeSelectorRequirement: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NodeSelectorRequirement: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Key = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Operator = NodeSelectorOperator(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Values = append(m.Values, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NodeSelectorTerm) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NodeSelectorTerm: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NodeSelectorTerm: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MatchExpressions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MatchExpressions = append(m.MatchExpressions, NodeSelectorRequirement{})
+ if err := m.MatchExpressions[len(m.MatchExpressions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NodeSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NodeSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NodeSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodCIDR", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PodCIDR = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ExternalID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ExternalID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ProviderID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ProviderID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Unschedulable", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Unschedulable = bool(v != 0)
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Taints", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Taints = append(m.Taints, Taint{})
+ if err := m.Taints[len(m.Taints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NodeStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NodeStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NodeStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Capacity == nil {
+ m.Capacity = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Capacity[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.Capacity[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Allocatable", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Allocatable == nil {
+ m.Allocatable = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Allocatable[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.Allocatable[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Phase", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Phase = NodePhase(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Conditions = append(m.Conditions, NodeCondition{})
+ if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Addresses = append(m.Addresses, NodeAddress{})
+ if err := m.Addresses[len(m.Addresses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DaemonEndpoints", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.DaemonEndpoints.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NodeInfo", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.NodeInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Images", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Images = append(m.Images, ContainerImage{})
+ if err := m.Images[len(m.Images)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumesInUse", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumesInUse = append(m.VolumesInUse, UniqueVolumeName(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumesAttached", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumesAttached = append(m.VolumesAttached, AttachedVolume{})
+ if err := m.VolumesAttached[len(m.VolumesAttached)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NodeSystemInfo) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NodeSystemInfo: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NodeSystemInfo: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MachineID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MachineID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SystemUUID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SystemUUID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field BootID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.BootID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field KernelVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.KernelVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OSImage", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OSImage = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ContainerRuntimeVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ContainerRuntimeVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field KubeletVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.KubeletVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field KubeProxyVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.KubeProxyVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OperatingSystem", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OperatingSystem = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Architecture", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Architecture = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ObjectFieldSelector) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ObjectFieldSelector: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ObjectFieldSelector: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FieldPath", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FieldPath = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ObjectMeta) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ObjectMeta: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ObjectMeta: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field GenerateName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.GenerateName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Namespace = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SelfLink", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SelfLink = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ResourceVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Generation", wireType)
+ }
+ m.Generation = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Generation |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CreationTimestamp", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.CreationTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DeletionTimestamp", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.DeletionTimestamp == nil {
+ m.DeletionTimestamp = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{}
+ }
+ if err := m.DeletionTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 10:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DeletionGracePeriodSeconds", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.DeletionGracePeriodSeconds = &v
+ case 11:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Labels == nil {
+ m.Labels = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Labels[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Labels[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 12:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Annotations == nil {
+ m.Annotations = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Annotations[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Annotations[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 13:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OwnerReferences", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OwnerReferences = append(m.OwnerReferences, k8s_io_apimachinery_pkg_apis_meta_v1.OwnerReference{})
+ if err := m.OwnerReferences[len(m.OwnerReferences)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 14:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Finalizers", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Finalizers = append(m.Finalizers, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 15:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ClusterName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ClusterName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 16:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Initializers", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Initializers == nil {
+ m.Initializers = &k8s_io_apimachinery_pkg_apis_meta_v1.Initializers{}
+ }
+ if err := m.Initializers.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ObjectReference) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ObjectReference: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ObjectReference: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Kind = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Namespace = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ResourceVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FieldPath", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FieldPath = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PersistentVolume) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PersistentVolume: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PersistentVolume: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PersistentVolumeClaim) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PersistentVolumeClaim: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PersistentVolumeClaim: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PersistentVolumeClaimList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PersistentVolumeClaimList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PersistentVolumeClaimList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, PersistentVolumeClaim{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PersistentVolumeClaimSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PersistentVolumeClaimSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PersistentVolumeClaimSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AccessModes", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.AccessModes = append(m.AccessModes, PersistentVolumeAccessMode(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Resources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumeName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Selector == nil {
+ m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
+ }
+ if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StorageClassName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := string(dAtA[iNdEx:postIndex])
+ m.StorageClassName = &s
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PersistentVolumeClaimStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PersistentVolumeClaimStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PersistentVolumeClaimStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Phase", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Phase = PersistentVolumeClaimPhase(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AccessModes", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.AccessModes = append(m.AccessModes, PersistentVolumeAccessMode(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Capacity == nil {
+ m.Capacity = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Capacity[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.Capacity[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PersistentVolumeClaimVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PersistentVolumeClaimVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PersistentVolumeClaimVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ClaimName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ClaimName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PersistentVolumeList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PersistentVolumeList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PersistentVolumeList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, PersistentVolume{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PersistentVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PersistentVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PersistentVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field GCEPersistentDisk", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.GCEPersistentDisk == nil {
+ m.GCEPersistentDisk = &GCEPersistentDiskVolumeSource{}
+ }
+ if err := m.GCEPersistentDisk.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AWSElasticBlockStore", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.AWSElasticBlockStore == nil {
+ m.AWSElasticBlockStore = &AWSElasticBlockStoreVolumeSource{}
+ }
+ if err := m.AWSElasticBlockStore.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostPath", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.HostPath == nil {
+ m.HostPath = &HostPathVolumeSource{}
+ }
+ if err := m.HostPath.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Glusterfs", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Glusterfs == nil {
+ m.Glusterfs = &GlusterfsVolumeSource{}
+ }
+ if err := m.Glusterfs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NFS", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.NFS == nil {
+ m.NFS = &NFSVolumeSource{}
+ }
+ if err := m.NFS.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RBD", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.RBD == nil {
+ m.RBD = &RBDVolumeSource{}
+ }
+ if err := m.RBD.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ISCSI", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ISCSI == nil {
+ m.ISCSI = &ISCSIVolumeSource{}
+ }
+ if err := m.ISCSI.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Cinder", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Cinder == nil {
+ m.Cinder = &CinderVolumeSource{}
+ }
+ if err := m.Cinder.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CephFS", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.CephFS == nil {
+ m.CephFS = &CephFSVolumeSource{}
+ }
+ if err := m.CephFS.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FC", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.FC == nil {
+ m.FC = &FCVolumeSource{}
+ }
+ if err := m.FC.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 11:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Flocker", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Flocker == nil {
+ m.Flocker = &FlockerVolumeSource{}
+ }
+ if err := m.Flocker.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 12:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FlexVolume", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.FlexVolume == nil {
+ m.FlexVolume = &FlexVolumeSource{}
+ }
+ if err := m.FlexVolume.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 13:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AzureFile", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.AzureFile == nil {
+ m.AzureFile = &AzureFileVolumeSource{}
+ }
+ if err := m.AzureFile.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 14:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VsphereVolume", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.VsphereVolume == nil {
+ m.VsphereVolume = &VsphereVirtualDiskVolumeSource{}
+ }
+ if err := m.VsphereVolume.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 15:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Quobyte", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Quobyte == nil {
+ m.Quobyte = &QuobyteVolumeSource{}
+ }
+ if err := m.Quobyte.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 16:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AzureDisk", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.AzureDisk == nil {
+ m.AzureDisk = &AzureDiskVolumeSource{}
+ }
+ if err := m.AzureDisk.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 17:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PhotonPersistentDisk", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PhotonPersistentDisk == nil {
+ m.PhotonPersistentDisk = &PhotonPersistentDiskVolumeSource{}
+ }
+ if err := m.PhotonPersistentDisk.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 18:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PortworxVolume", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PortworxVolume == nil {
+ m.PortworxVolume = &PortworxVolumeSource{}
+ }
+ if err := m.PortworxVolume.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 19:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ScaleIO", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ScaleIO == nil {
+ m.ScaleIO = &ScaleIOVolumeSource{}
+ }
+ if err := m.ScaleIO.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 20:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Local", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Local == nil {
+ m.Local = &LocalVolumeSource{}
+ }
+ if err := m.Local.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 21:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StorageOS", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.StorageOS == nil {
+ m.StorageOS = &StorageOSPersistentVolumeSource{}
+ }
+ if err := m.StorageOS.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PersistentVolumeSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PersistentVolumeSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PersistentVolumeSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Capacity == nil {
+ m.Capacity = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Capacity[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.Capacity[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PersistentVolumeSource", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.PersistentVolumeSource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AccessModes", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.AccessModes = append(m.AccessModes, PersistentVolumeAccessMode(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ClaimRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ClaimRef == nil {
+ m.ClaimRef = &ObjectReference{}
+ }
+ if err := m.ClaimRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PersistentVolumeReclaimPolicy", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PersistentVolumeReclaimPolicy = PersistentVolumeReclaimPolicy(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StorageClassName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.StorageClassName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PersistentVolumeStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PersistentVolumeStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PersistentVolumeStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Phase", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Phase = PersistentVolumePhase(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PhotonPersistentDiskVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PhotonPersistentDiskVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PhotonPersistentDiskVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PdID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PdID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FSType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Pod) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Pod: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Pod: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodAffinity) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodAffinity: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodAffinity: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RequiredDuringSchedulingIgnoredDuringExecution", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.RequiredDuringSchedulingIgnoredDuringExecution = append(m.RequiredDuringSchedulingIgnoredDuringExecution, PodAffinityTerm{})
+ if err := m.RequiredDuringSchedulingIgnoredDuringExecution[len(m.RequiredDuringSchedulingIgnoredDuringExecution)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PreferredDuringSchedulingIgnoredDuringExecution", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PreferredDuringSchedulingIgnoredDuringExecution = append(m.PreferredDuringSchedulingIgnoredDuringExecution, WeightedPodAffinityTerm{})
+ if err := m.PreferredDuringSchedulingIgnoredDuringExecution[len(m.PreferredDuringSchedulingIgnoredDuringExecution)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodAffinityTerm) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodAffinityTerm: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodAffinityTerm: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.LabelSelector == nil {
+ m.LabelSelector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
+ }
+ if err := m.LabelSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Namespaces", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Namespaces = append(m.Namespaces, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TopologyKey", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.TopologyKey = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodAntiAffinity) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodAntiAffinity: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodAntiAffinity: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RequiredDuringSchedulingIgnoredDuringExecution", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.RequiredDuringSchedulingIgnoredDuringExecution = append(m.RequiredDuringSchedulingIgnoredDuringExecution, PodAffinityTerm{})
+ if err := m.RequiredDuringSchedulingIgnoredDuringExecution[len(m.RequiredDuringSchedulingIgnoredDuringExecution)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PreferredDuringSchedulingIgnoredDuringExecution", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PreferredDuringSchedulingIgnoredDuringExecution = append(m.PreferredDuringSchedulingIgnoredDuringExecution, WeightedPodAffinityTerm{})
+ if err := m.PreferredDuringSchedulingIgnoredDuringExecution[len(m.PreferredDuringSchedulingIgnoredDuringExecution)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodAttachOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodAttachOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodAttachOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Stdin = bool(v != 0)
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Stdout", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Stdout = bool(v != 0)
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Stderr", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Stderr = bool(v != 0)
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TTY", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.TTY = bool(v != 0)
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Container = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodCondition) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodCondition: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodCondition: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = PodConditionType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Status = ConditionStatus(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastProbeTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastProbeTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodExecOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodExecOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodExecOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Stdin = bool(v != 0)
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Stdout", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Stdout = bool(v != 0)
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Stderr", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Stderr = bool(v != 0)
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TTY", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.TTY = bool(v != 0)
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Container = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Command = append(m.Command, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, Pod{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodLogOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodLogOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodLogOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Container = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Follow", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Follow = bool(v != 0)
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Previous", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Previous = bool(v != 0)
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SinceSeconds", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.SinceSeconds = &v
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SinceTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SinceTime == nil {
+ m.SinceTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{}
+ }
+ if err := m.SinceTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Timestamps", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Timestamps = bool(v != 0)
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TailLines", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.TailLines = &v
+ case 8:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LimitBytes", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.LimitBytes = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodPortForwardOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodPortForwardOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodPortForwardOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType == 0 {
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Ports = append(m.Ports, v)
+ } else if wireType == 2 {
+ var packedLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ packedLen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if packedLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + packedLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ for iNdEx < postIndex {
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Ports = append(m.Ports, v)
+ }
+ } else {
+ return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType)
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodProxyOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodProxyOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodProxyOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodSecurityContext) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodSecurityContext: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodSecurityContext: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SELinuxOptions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SELinuxOptions == nil {
+ m.SELinuxOptions = &SELinuxOptions{}
+ }
+ if err := m.SELinuxOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RunAsUser", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.RunAsUser = &v
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RunAsNonRoot", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.RunAsNonRoot = &b
+ case 4:
+ if wireType == 0 {
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.SupplementalGroups = append(m.SupplementalGroups, v)
+ } else if wireType == 2 {
+ var packedLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ packedLen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if packedLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + packedLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ for iNdEx < postIndex {
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.SupplementalGroups = append(m.SupplementalGroups, v)
+ }
+ } else {
+ return fmt.Errorf("proto: wrong wireType = %d for field SupplementalGroups", wireType)
+ }
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSGroup", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.FSGroup = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodSignature) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodSignature: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodSignature: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodController", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PodController == nil {
+ m.PodController = &k8s_io_apimachinery_pkg_apis_meta_v1.OwnerReference{}
+ }
+ if err := m.PodController.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Volumes = append(m.Volumes, Volume{})
+ if err := m.Volumes[len(m.Volumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Containers", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Containers = append(m.Containers, Container{})
+ if err := m.Containers[len(m.Containers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RestartPolicy", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.RestartPolicy = RestartPolicy(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TerminationGracePeriodSeconds", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.TerminationGracePeriodSeconds = &v
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ActiveDeadlineSeconds", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ActiveDeadlineSeconds = &v
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DNSPolicy", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.DNSPolicy = DNSPolicy(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NodeSelector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.NodeSelector == nil {
+ m.NodeSelector = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.NodeSelector[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.NodeSelector[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ServiceAccountName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ServiceAccountName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedServiceAccount", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.DeprecatedServiceAccount = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.NodeName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 11:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostNetwork", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.HostNetwork = bool(v != 0)
+ case 12:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostPID", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.HostPID = bool(v != 0)
+ case 13:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostIPC", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.HostIPC = bool(v != 0)
+ case 14:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecurityContext", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SecurityContext == nil {
+ m.SecurityContext = &PodSecurityContext{}
+ }
+ if err := m.SecurityContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 15:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ImagePullSecrets", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ImagePullSecrets = append(m.ImagePullSecrets, LocalObjectReference{})
+ if err := m.ImagePullSecrets[len(m.ImagePullSecrets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 16:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Hostname = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 17:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Subdomain", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Subdomain = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 18:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Affinity", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Affinity == nil {
+ m.Affinity = &Affinity{}
+ }
+ if err := m.Affinity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 19:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SchedulerName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SchedulerName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 20:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field InitContainers", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.InitContainers = append(m.InitContainers, Container{})
+ if err := m.InitContainers[len(m.InitContainers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 21:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AutomountServiceAccountToken", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.AutomountServiceAccountToken = &b
+ case 22:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Tolerations", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Tolerations = append(m.Tolerations, Toleration{})
+ if err := m.Tolerations[len(m.Tolerations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 23:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostAliases", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.HostAliases = append(m.HostAliases, HostAlias{})
+ if err := m.HostAliases[len(m.HostAliases)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Phase", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Phase = PodPhase(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Conditions = append(m.Conditions, PodCondition{})
+ if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostIP", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.HostIP = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodIP", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PodIP = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.StartTime == nil {
+ m.StartTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{}
+ }
+ if err := m.StartTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ContainerStatuses", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ContainerStatuses = append(m.ContainerStatuses, ContainerStatus{})
+ if err := m.ContainerStatuses[len(m.ContainerStatuses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field QOSClass", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.QOSClass = PodQOSClass(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field InitContainerStatuses", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.InitContainerStatuses = append(m.InitContainerStatuses, ContainerStatus{})
+ if err := m.InitContainerStatuses[len(m.InitContainerStatuses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodStatusResult) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodStatusResult: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodStatusResult: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodTemplate) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodTemplate: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodTemplate: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodTemplateList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodTemplateList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodTemplateList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, PodTemplate{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodTemplateSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodTemplateSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodTemplateSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PortworxVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PortworxVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PortworxVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumeID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FSType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Preconditions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Preconditions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Preconditions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex])
+ m.UID = &s
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PreferAvoidPodsEntry) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PreferAvoidPodsEntry: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PreferAvoidPodsEntry: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodSignature", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.PodSignature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field EvictionTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.EvictionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PreferredSchedulingTerm) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PreferredSchedulingTerm: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PreferredSchedulingTerm: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType)
+ }
+ m.Weight = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Weight |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Preference", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Preference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Probe) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Probe: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Probe: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Handler", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Handler.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field InitialDelaySeconds", wireType)
+ }
+ m.InitialDelaySeconds = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.InitialDelaySeconds |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TimeoutSeconds", wireType)
+ }
+ m.TimeoutSeconds = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.TimeoutSeconds |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PeriodSeconds", wireType)
+ }
+ m.PeriodSeconds = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.PeriodSeconds |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SuccessThreshold", wireType)
+ }
+ m.SuccessThreshold = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.SuccessThreshold |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FailureThreshold", wireType)
+ }
+ m.FailureThreshold = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.FailureThreshold |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ProjectedVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ProjectedVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ProjectedVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Sources", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Sources = append(m.Sources, VolumeProjection{})
+ if err := m.Sources[len(m.Sources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DefaultMode", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.DefaultMode = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *QuobyteVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: QuobyteVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: QuobyteVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Registry", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Registry = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Volume", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Volume = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.User = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Group = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RBDVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RBDVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RBDVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CephMonitors", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.CephMonitors = append(m.CephMonitors, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RBDImage", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.RBDImage = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FSType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RBDPool", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.RBDPool = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RadosUser", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.RadosUser = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Keyring", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Keyring = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecretRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SecretRef == nil {
+ m.SecretRef = &LocalObjectReference{}
+ }
+ if err := m.SecretRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RangeAllocation) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RangeAllocation: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RangeAllocation: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Range", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Range = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
+ }
+ var byteLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ byteLen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if byteLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + byteLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
+ if m.Data == nil {
+ m.Data = []byte{}
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReplicationController) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReplicationController: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReplicationController: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReplicationControllerCondition) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReplicationControllerCondition: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReplicationControllerCondition: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = ReplicationControllerConditionType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Status = ConditionStatus(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReplicationControllerList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReplicationControllerList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReplicationControllerList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ReplicationController{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReplicationControllerSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReplicationControllerSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReplicationControllerSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Replicas = &v
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Selector == nil {
+ m.Selector = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Selector[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Selector[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Template == nil {
+ m.Template = &PodTemplateSpec{}
+ }
+ if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MinReadySeconds", wireType)
+ }
+ m.MinReadySeconds = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.MinReadySeconds |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReplicationControllerStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReplicationControllerStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReplicationControllerStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ m.Replicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Replicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FullyLabeledReplicas", wireType)
+ }
+ m.FullyLabeledReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.FullyLabeledReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
+ }
+ m.ObservedGeneration = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ObservedGeneration |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadyReplicas", wireType)
+ }
+ m.ReadyReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ReadyReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AvailableReplicas", wireType)
+ }
+ m.AvailableReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.AvailableReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Conditions = append(m.Conditions, ReplicationControllerCondition{})
+ if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceFieldSelector) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceFieldSelector: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceFieldSelector: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ContainerName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ContainerName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Resource = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Divisor", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Divisor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceQuota) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceQuota: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceQuota: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceQuotaList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceQuotaList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceQuotaList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ResourceQuota{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceQuotaSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceQuotaSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceQuotaSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Hard", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Hard == nil {
+ m.Hard = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Hard[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.Hard[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Scopes = append(m.Scopes, ResourceQuotaScope(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceQuotaStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceQuotaStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceQuotaStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Hard", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Hard == nil {
+ m.Hard = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Hard[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.Hard[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Used", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Used == nil {
+ m.Used = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Used[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.Used[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceRequirements) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceRequirements: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceRequirements: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Limits", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Limits == nil {
+ m.Limits = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Limits[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.Limits[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Requests == nil {
+ m.Requests = make(ResourceList)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Requests[ResourceName(mapkey)] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity
+ m.Requests[ResourceName(mapkey)] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SELinuxOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SELinuxOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SELinuxOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.User = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Role = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Level = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ScaleIOVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ScaleIOVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ScaleIOVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Gateway", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Gateway = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field System", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.System = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecretRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SecretRef == nil {
+ m.SecretRef = &LocalObjectReference{}
+ }
+ if err := m.SecretRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SSLEnabled", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.SSLEnabled = bool(v != 0)
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ProtectionDomain", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ProtectionDomain = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StoragePool", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.StoragePool = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StorageMode", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.StorageMode = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumeName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FSType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 10:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Secret) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Secret: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Secret: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Data == nil {
+ m.Data = make(map[string][]byte)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapbyteLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapbyteLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intMapbyteLen := int(mapbyteLen)
+ if intMapbyteLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postbytesIndex := iNdEx + intMapbyteLen
+ if postbytesIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := make([]byte, mapbyteLen)
+ copy(mapvalue, dAtA[iNdEx:postbytesIndex])
+ iNdEx = postbytesIndex
+ m.Data[mapkey] = mapvalue
+ } else {
+ var mapvalue []byte
+ m.Data[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = SecretType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StringData", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.StringData == nil {
+ m.StringData = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.StringData[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.StringData[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SecretEnvSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SecretEnvSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SecretEnvSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LocalObjectReference", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LocalObjectReference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Optional = &b
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SecretKeySelector) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SecretKeySelector: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SecretKeySelector: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LocalObjectReference", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LocalObjectReference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Key = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Optional = &b
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SecretList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SecretList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SecretList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, Secret{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SecretProjection) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SecretProjection: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SecretProjection: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LocalObjectReference", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LocalObjectReference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, KeyToPath{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Optional = &b
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SecretVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SecretVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SecretVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecretName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SecretName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, KeyToPath{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DefaultMode", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.DefaultMode = &v
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Optional = &b
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SecurityContext) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SecurityContext: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SecurityContext: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Capabilities", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Capabilities == nil {
+ m.Capabilities = &Capabilities{}
+ }
+ if err := m.Capabilities.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Privileged", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Privileged = &b
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SELinuxOptions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SELinuxOptions == nil {
+ m.SELinuxOptions = &SELinuxOptions{}
+ }
+ if err := m.SELinuxOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RunAsUser", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.RunAsUser = &v
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RunAsNonRoot", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.RunAsNonRoot = &b
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnlyRootFilesystem", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.ReadOnlyRootFilesystem = &b
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SerializedReference) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SerializedReference: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SerializedReference: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reference", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Reference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Service) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Service: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Service: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ServiceAccount) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ServiceAccount: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ServiceAccount: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Secrets", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Secrets = append(m.Secrets, ObjectReference{})
+ if err := m.Secrets[len(m.Secrets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ImagePullSecrets", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ImagePullSecrets = append(m.ImagePullSecrets, LocalObjectReference{})
+ if err := m.ImagePullSecrets[len(m.ImagePullSecrets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AutomountServiceAccountToken", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.AutomountServiceAccountToken = &b
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ServiceAccountList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ServiceAccountList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ServiceAccountList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ServiceAccount{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ServiceList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ServiceList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ServiceList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, Service{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ServicePort) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ServicePort: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ServicePort: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Protocol = Protocol(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
+ }
+ m.Port = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Port |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetPort", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.TargetPort.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NodePort", wireType)
+ }
+ m.NodePort = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.NodePort |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ServiceProxyOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ServiceProxyOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ServiceProxyOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ServiceSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ServiceSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ServiceSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Ports = append(m.Ports, ServicePort{})
+ if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Selector == nil {
+ m.Selector = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Selector[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Selector[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ClusterIP", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ClusterIP = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = ServiceType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ExternalIPs", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ExternalIPs = append(m.ExternalIPs, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SessionAffinity", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SessionAffinity = ServiceAffinity(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LoadBalancerIP", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.LoadBalancerIP = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LoadBalancerSourceRanges", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.LoadBalancerSourceRanges = append(m.LoadBalancerSourceRanges, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ExternalName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ExternalName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 11:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ExternalTrafficPolicy", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ExternalTrafficPolicy = ServiceExternalTrafficPolicyType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 12:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HealthCheckNodePort", wireType)
+ }
+ m.HealthCheckNodePort = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.HealthCheckNodePort |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ServiceStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ServiceStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ServiceStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LoadBalancer", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LoadBalancer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StorageOSPersistentVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StorageOSPersistentVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StorageOSPersistentVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumeName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeNamespace", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumeNamespace = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FSType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecretRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SecretRef == nil {
+ m.SecretRef = &ObjectReference{}
+ }
+ if err := m.SecretRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StorageOSVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StorageOSVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StorageOSVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumeName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeNamespace", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumeNamespace = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FSType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecretRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SecretRef == nil {
+ m.SecretRef = &LocalObjectReference{}
+ }
+ if err := m.SecretRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Sysctl) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Sysctl: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Sysctl: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Value = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *TCPSocketAction) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: TCPSocketAction: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: TCPSocketAction: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Port.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Host = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Taint) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Taint: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Taint: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Key = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Value = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Effect", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Effect = TaintEffect(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TimeAdded", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.TimeAdded.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Toleration) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Toleration: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Toleration: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Key = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Operator = TolerationOperator(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Value = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Effect", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Effect = TaintEffect(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TolerationSeconds", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.TolerationSeconds = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Volume) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Volume: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Volume: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeSource", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.VolumeSource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *VolumeMount) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: VolumeMount: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: VolumeMount: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnly = bool(v != 0)
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MountPath", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MountPath = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SubPath", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SubPath = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *VolumeProjection) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: VolumeProjection: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: VolumeProjection: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Secret == nil {
+ m.Secret = &SecretProjection{}
+ }
+ if err := m.Secret.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DownwardAPI", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.DownwardAPI == nil {
+ m.DownwardAPI = &DownwardAPIProjection{}
+ }
+ if err := m.DownwardAPI.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ConfigMap", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ConfigMap == nil {
+ m.ConfigMap = &ConfigMapProjection{}
+ }
+ if err := m.ConfigMap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *VolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: VolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: VolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostPath", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.HostPath == nil {
+ m.HostPath = &HostPathVolumeSource{}
+ }
+ if err := m.HostPath.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field EmptyDir", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.EmptyDir == nil {
+ m.EmptyDir = &EmptyDirVolumeSource{}
+ }
+ if err := m.EmptyDir.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field GCEPersistentDisk", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.GCEPersistentDisk == nil {
+ m.GCEPersistentDisk = &GCEPersistentDiskVolumeSource{}
+ }
+ if err := m.GCEPersistentDisk.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AWSElasticBlockStore", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.AWSElasticBlockStore == nil {
+ m.AWSElasticBlockStore = &AWSElasticBlockStoreVolumeSource{}
+ }
+ if err := m.AWSElasticBlockStore.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field GitRepo", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.GitRepo == nil {
+ m.GitRepo = &GitRepoVolumeSource{}
+ }
+ if err := m.GitRepo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Secret == nil {
+ m.Secret = &SecretVolumeSource{}
+ }
+ if err := m.Secret.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NFS", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.NFS == nil {
+ m.NFS = &NFSVolumeSource{}
+ }
+ if err := m.NFS.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ISCSI", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ISCSI == nil {
+ m.ISCSI = &ISCSIVolumeSource{}
+ }
+ if err := m.ISCSI.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Glusterfs", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Glusterfs == nil {
+ m.Glusterfs = &GlusterfsVolumeSource{}
+ }
+ if err := m.Glusterfs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PersistentVolumeClaim", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PersistentVolumeClaim == nil {
+ m.PersistentVolumeClaim = &PersistentVolumeClaimVolumeSource{}
+ }
+ if err := m.PersistentVolumeClaim.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 11:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RBD", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.RBD == nil {
+ m.RBD = &RBDVolumeSource{}
+ }
+ if err := m.RBD.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 12:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FlexVolume", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.FlexVolume == nil {
+ m.FlexVolume = &FlexVolumeSource{}
+ }
+ if err := m.FlexVolume.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 13:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Cinder", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Cinder == nil {
+ m.Cinder = &CinderVolumeSource{}
+ }
+ if err := m.Cinder.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 14:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CephFS", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.CephFS == nil {
+ m.CephFS = &CephFSVolumeSource{}
+ }
+ if err := m.CephFS.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 15:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Flocker", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Flocker == nil {
+ m.Flocker = &FlockerVolumeSource{}
+ }
+ if err := m.Flocker.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 16:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DownwardAPI", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.DownwardAPI == nil {
+ m.DownwardAPI = &DownwardAPIVolumeSource{}
+ }
+ if err := m.DownwardAPI.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 17:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FC", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.FC == nil {
+ m.FC = &FCVolumeSource{}
+ }
+ if err := m.FC.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 18:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AzureFile", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.AzureFile == nil {
+ m.AzureFile = &AzureFileVolumeSource{}
+ }
+ if err := m.AzureFile.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 19:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ConfigMap", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ConfigMap == nil {
+ m.ConfigMap = &ConfigMapVolumeSource{}
+ }
+ if err := m.ConfigMap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 20:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VsphereVolume", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.VsphereVolume == nil {
+ m.VsphereVolume = &VsphereVirtualDiskVolumeSource{}
+ }
+ if err := m.VsphereVolume.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 21:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Quobyte", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Quobyte == nil {
+ m.Quobyte = &QuobyteVolumeSource{}
+ }
+ if err := m.Quobyte.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 22:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AzureDisk", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.AzureDisk == nil {
+ m.AzureDisk = &AzureDiskVolumeSource{}
+ }
+ if err := m.AzureDisk.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 23:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PhotonPersistentDisk", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PhotonPersistentDisk == nil {
+ m.PhotonPersistentDisk = &PhotonPersistentDiskVolumeSource{}
+ }
+ if err := m.PhotonPersistentDisk.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 24:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PortworxVolume", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PortworxVolume == nil {
+ m.PortworxVolume = &PortworxVolumeSource{}
+ }
+ if err := m.PortworxVolume.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 25:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ScaleIO", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ScaleIO == nil {
+ m.ScaleIO = &ScaleIOVolumeSource{}
+ }
+ if err := m.ScaleIO.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 26:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Projected", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Projected == nil {
+ m.Projected = &ProjectedVolumeSource{}
+ }
+ if err := m.Projected.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 27:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StorageOS", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.StorageOS == nil {
+ m.StorageOS = &StorageOSVolumeSource{}
+ }
+ if err := m.StorageOS.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *VsphereVirtualDiskVolumeSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: VsphereVirtualDiskVolumeSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: VsphereVirtualDiskVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumePath", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumePath = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FSType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StoragePolicyName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.StoragePolicyName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StoragePolicyID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.StoragePolicyID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *WeightedPodAffinityTerm) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: WeightedPodAffinityTerm: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: WeightedPodAffinityTerm: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType)
+ }
+ m.Weight = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Weight |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodAffinityTerm", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.PodAffinityTerm.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/kubernetes/pkg/api/v1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 11430 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x6d, 0x8c, 0x24, 0xc7,
+ 0x75, 0x98, 0x7a, 0x66, 0xf6, 0x63, 0xde, 0x7e, 0xd7, 0xed, 0x1d, 0x97, 0x2b, 0xf2, 0xf6, 0xd8,
+ 0x14, 0xe9, 0x23, 0x79, 0xdc, 0xd3, 0x1d, 0x49, 0x91, 0x12, 0x65, 0x5a, 0xbb, 0x3b, 0xbb, 0x77,
+ 0xeb, 0xfb, 0x1a, 0xd6, 0xec, 0xdd, 0x51, 0x14, 0x43, 0xb2, 0x6f, 0xba, 0x76, 0xb7, 0x79, 0xb3,
+ 0xdd, 0xc3, 0xee, 0x9e, 0xbd, 0x5b, 0x1a, 0x06, 0x6c, 0x45, 0xb0, 0x14, 0x40, 0x49, 0x64, 0x38,
+ 0x02, 0x02, 0x27, 0x80, 0x02, 0x03, 0x71, 0x94, 0xc4, 0xf9, 0x50, 0x04, 0x7d, 0x18, 0x96, 0x13,
+ 0xc4, 0x91, 0x1c, 0x39, 0x48, 0x1c, 0x01, 0x46, 0x62, 0x05, 0x86, 0xd7, 0xd6, 0x0a, 0xf1, 0x9f,
+ 0x00, 0xf9, 0x91, 0xfc, 0xdb, 0x7c, 0x20, 0xa8, 0xcf, 0xae, 0xea, 0xe9, 0xd9, 0xee, 0x59, 0xde,
+ 0xae, 0x29, 0x21, 0xff, 0x66, 0xde, 0x7b, 0xf5, 0xaa, 0xba, 0x3e, 0x5e, 0xbd, 0x7a, 0xf5, 0xde,
+ 0x2b, 0x38, 0x77, 0xf7, 0xa5, 0x68, 0xde, 0x0b, 0xce, 0xdf, 0xed, 0xdc, 0x21, 0xa1, 0x4f, 0x62,
+ 0x12, 0x9d, 0x6f, 0xdf, 0xdd, 0x38, 0xef, 0xb4, 0xbd, 0xf3, 0xdb, 0x17, 0xce, 0x6f, 0x10, 0x9f,
+ 0x84, 0x4e, 0x4c, 0xdc, 0xf9, 0x76, 0x18, 0xc4, 0x01, 0x7a, 0x84, 0x53, 0xcf, 0x27, 0xd4, 0xf3,
+ 0xed, 0xbb, 0x1b, 0xf3, 0x4e, 0xdb, 0x9b, 0xdf, 0xbe, 0x30, 0xfb, 0xec, 0x86, 0x17, 0x6f, 0x76,
+ 0xee, 0xcc, 0x37, 0x83, 0xad, 0xf3, 0x1b, 0xc1, 0x46, 0x70, 0x9e, 0x15, 0xba, 0xd3, 0x59, 0x67,
+ 0xff, 0xd8, 0x1f, 0xf6, 0x8b, 0x33, 0x9b, 0x7d, 0x5e, 0x54, 0xed, 0xb4, 0xbd, 0x2d, 0xa7, 0xb9,
+ 0xe9, 0xf9, 0x24, 0xdc, 0x51, 0x95, 0x87, 0x24, 0x0a, 0x3a, 0x61, 0x93, 0xa4, 0x9b, 0x70, 0x60,
+ 0xa9, 0xe8, 0xfc, 0x16, 0x89, 0x9d, 0x8c, 0x86, 0xcf, 0x9e, 0xef, 0x55, 0x2a, 0xec, 0xf8, 0xb1,
+ 0xb7, 0xd5, 0x5d, 0xcd, 0xc7, 0xf2, 0x0a, 0x44, 0xcd, 0x4d, 0xb2, 0xe5, 0x74, 0x95, 0x7b, 0xae,
+ 0x57, 0xb9, 0x4e, 0xec, 0xb5, 0xce, 0x7b, 0x7e, 0x1c, 0xc5, 0x61, 0xba, 0x90, 0xfd, 0xc7, 0x16,
+ 0x9c, 0x59, 0xb8, 0xdd, 0x58, 0x6e, 0x39, 0x51, 0xec, 0x35, 0x17, 0x5b, 0x41, 0xf3, 0x6e, 0x23,
+ 0x0e, 0x42, 0x72, 0x2b, 0x68, 0x75, 0xb6, 0x48, 0x83, 0x75, 0x04, 0x3a, 0x07, 0xc3, 0xdb, 0xec,
+ 0xff, 0x6a, 0x6d, 0xc6, 0x3a, 0x63, 0x9d, 0xad, 0x2e, 0x4e, 0x7e, 0x7f, 0x77, 0xee, 0x43, 0x7b,
+ 0xbb, 0x73, 0xc3, 0xb7, 0x04, 0x1c, 0x2b, 0x0a, 0xf4, 0x24, 0x0c, 0xae, 0x47, 0x6b, 0x3b, 0x6d,
+ 0x32, 0x53, 0x62, 0xb4, 0xe3, 0x82, 0x76, 0x70, 0xa5, 0x41, 0xa1, 0x58, 0x60, 0xd1, 0x79, 0xa8,
+ 0xb6, 0x9d, 0x30, 0xf6, 0x62, 0x2f, 0xf0, 0x67, 0xca, 0x67, 0xac, 0xb3, 0x03, 0x8b, 0x53, 0x82,
+ 0xb4, 0x5a, 0x97, 0x08, 0x9c, 0xd0, 0xd0, 0x66, 0x84, 0xc4, 0x71, 0x6f, 0xf8, 0xad, 0x9d, 0x99,
+ 0xca, 0x19, 0xeb, 0xec, 0x70, 0xd2, 0x0c, 0x2c, 0xe0, 0x58, 0x51, 0xd8, 0xdf, 0x2e, 0xc1, 0xf0,
+ 0xc2, 0xfa, 0xba, 0xe7, 0x7b, 0xf1, 0x0e, 0x7a, 0x1b, 0x46, 0xfd, 0xc0, 0x25, 0xf2, 0x3f, 0xfb,
+ 0x8a, 0x91, 0x8b, 0x4f, 0xcf, 0x1f, 0x34, 0xa9, 0xe6, 0xaf, 0x6b, 0x25, 0x16, 0x27, 0xf7, 0x76,
+ 0xe7, 0x46, 0x75, 0x08, 0x36, 0x38, 0xa2, 0x37, 0x60, 0xa4, 0x1d, 0xb8, 0xaa, 0x82, 0x12, 0xab,
+ 0xe0, 0xa9, 0x83, 0x2b, 0xa8, 0x27, 0x05, 0x16, 0x27, 0xf6, 0x76, 0xe7, 0x46, 0x34, 0x00, 0xd6,
+ 0xd9, 0xa1, 0x16, 0x4c, 0xd0, 0xbf, 0x7e, 0xec, 0xa9, 0x1a, 0xca, 0xac, 0x86, 0x67, 0xf3, 0x6b,
+ 0xd0, 0x0a, 0x2d, 0x9e, 0xd8, 0xdb, 0x9d, 0x9b, 0x48, 0x01, 0x71, 0x9a, 0xb5, 0xfd, 0x1e, 0x8c,
+ 0x2f, 0xc4, 0xb1, 0xd3, 0xdc, 0x24, 0x2e, 0x1f, 0x5f, 0xf4, 0x3c, 0x54, 0x7c, 0x67, 0x8b, 0x88,
+ 0xd1, 0x3f, 0x23, 0xba, 0xbd, 0x72, 0xdd, 0xd9, 0x22, 0xfb, 0xbb, 0x73, 0x93, 0x37, 0x7d, 0xef,
+ 0xdd, 0x8e, 0x98, 0x33, 0x14, 0x86, 0x19, 0x35, 0xba, 0x08, 0xe0, 0x92, 0x6d, 0xaf, 0x49, 0xea,
+ 0x4e, 0xbc, 0x29, 0x66, 0x03, 0x12, 0x65, 0xa1, 0xa6, 0x30, 0x58, 0xa3, 0xb2, 0x3f, 0x6b, 0x41,
+ 0x75, 0x61, 0x3b, 0xf0, 0xdc, 0x7a, 0xe0, 0x46, 0xa8, 0x03, 0x13, 0xed, 0x90, 0xac, 0x93, 0x50,
+ 0x81, 0x66, 0xac, 0x33, 0xe5, 0xb3, 0x23, 0x17, 0x2f, 0xe6, 0x7c, 0xb7, 0x59, 0x68, 0xd9, 0x8f,
+ 0xc3, 0x9d, 0xc5, 0x87, 0x44, 0xd5, 0x13, 0x29, 0x2c, 0x4e, 0xd7, 0x61, 0x7f, 0xb7, 0x04, 0x27,
+ 0x17, 0xde, 0xeb, 0x84, 0xa4, 0xe6, 0x45, 0x77, 0xd3, 0x4b, 0xc1, 0xf5, 0xa2, 0xbb, 0xd7, 0x93,
+ 0xce, 0x50, 0x73, 0xb0, 0x26, 0xe0, 0x58, 0x51, 0xa0, 0x67, 0x61, 0x88, 0xfe, 0xbe, 0x89, 0x57,
+ 0xc5, 0xd7, 0x9f, 0x10, 0xc4, 0x23, 0x35, 0x27, 0x76, 0x6a, 0x1c, 0x85, 0x25, 0x0d, 0xba, 0x06,
+ 0x23, 0x4d, 0xb6, 0x72, 0x37, 0xae, 0x05, 0x2e, 0x61, 0x23, 0x5c, 0x5d, 0x7c, 0x86, 0x92, 0x2f,
+ 0x25, 0xe0, 0xfd, 0xdd, 0xb9, 0x19, 0xde, 0x36, 0xc1, 0x42, 0xc3, 0x61, 0xbd, 0x3c, 0xb2, 0xd5,
+ 0x42, 0xac, 0x30, 0x4e, 0x90, 0xb1, 0x08, 0xcf, 0x6a, 0x6b, 0x6a, 0x80, 0xad, 0xa9, 0xd1, 0xec,
+ 0xf5, 0x84, 0x2e, 0x40, 0xe5, 0xae, 0xe7, 0xbb, 0x33, 0x83, 0x8c, 0xd7, 0xa3, 0x74, 0xf8, 0xaf,
+ 0x78, 0xbe, 0xbb, 0xbf, 0x3b, 0x37, 0x65, 0x34, 0x87, 0x02, 0x31, 0x23, 0xb5, 0xff, 0x91, 0x25,
+ 0xba, 0x71, 0xc5, 0x6b, 0x99, 0x12, 0xe5, 0x22, 0x40, 0x44, 0x9a, 0x21, 0x89, 0xb5, 0x8e, 0x54,
+ 0x33, 0xa3, 0xa1, 0x30, 0x58, 0xa3, 0xa2, 0xf2, 0x22, 0xda, 0x74, 0x42, 0x36, 0xc1, 0x44, 0x77,
+ 0x2a, 0x79, 0xd1, 0x90, 0x08, 0x9c, 0xd0, 0x18, 0xf2, 0xa2, 0x9c, 0x2b, 0x2f, 0x7e, 0xcf, 0x82,
+ 0xa1, 0x45, 0xcf, 0x77, 0x3d, 0x7f, 0x03, 0xbd, 0x0d, 0xc3, 0x54, 0x9c, 0xbb, 0x4e, 0xec, 0x08,
+ 0x51, 0xf1, 0x51, 0x39, 0xdf, 0x74, 0xe9, 0x2a, 0x67, 0x5c, 0x34, 0x4f, 0xa9, 0xe9, 0xbc, 0xbb,
+ 0x71, 0xe7, 0x1d, 0xd2, 0x8c, 0xaf, 0x91, 0xd8, 0x49, 0x3e, 0x27, 0x81, 0x61, 0xc5, 0x15, 0xdd,
+ 0x84, 0xc1, 0xd8, 0x09, 0x37, 0x48, 0x2c, 0x24, 0x45, 0xce, 0x3a, 0xe6, 0x3c, 0x30, 0x9d, 0xa5,
+ 0xc4, 0x6f, 0x92, 0x44, 0xa6, 0xae, 0x31, 0x26, 0x58, 0x30, 0xb3, 0x9b, 0x30, 0xba, 0xe4, 0xb4,
+ 0x9d, 0x3b, 0x5e, 0xcb, 0x8b, 0x3d, 0x12, 0xa1, 0x9f, 0x81, 0xb2, 0xe3, 0xba, 0x6c, 0xcd, 0x54,
+ 0x17, 0x4f, 0xee, 0xed, 0xce, 0x95, 0x17, 0x5c, 0x3a, 0x64, 0xa0, 0xa8, 0x76, 0x30, 0xa5, 0x40,
+ 0x4f, 0x43, 0xc5, 0x0d, 0x83, 0xf6, 0x4c, 0x89, 0x51, 0x9e, 0xa2, 0xa3, 0x5b, 0x0b, 0x83, 0x76,
+ 0x8a, 0x94, 0xd1, 0xd8, 0xdf, 0x2b, 0x01, 0x5a, 0x22, 0xed, 0xcd, 0x95, 0x86, 0x31, 0xa6, 0x67,
+ 0x61, 0x78, 0x2b, 0xf0, 0xbd, 0x38, 0x08, 0x23, 0x51, 0x21, 0x9b, 0x4a, 0xd7, 0x04, 0x0c, 0x2b,
+ 0x2c, 0x3a, 0x03, 0x95, 0x76, 0x22, 0x11, 0x46, 0xa5, 0x34, 0x61, 0xb2, 0x80, 0x61, 0x28, 0x45,
+ 0x27, 0x22, 0xa1, 0x58, 0x02, 0x8a, 0xe2, 0x66, 0x44, 0x42, 0xcc, 0x30, 0xc9, 0x0c, 0xa2, 0x73,
+ 0x4b, 0x4c, 0xf0, 0xd4, 0x0c, 0xa2, 0x18, 0xac, 0x51, 0xa1, 0xb7, 0xa0, 0xca, 0xff, 0x61, 0xb2,
+ 0xce, 0x66, 0x7b, 0xae, 0x1c, 0xb9, 0x1a, 0x34, 0x9d, 0x56, 0xba, 0xf3, 0xc7, 0xd8, 0x8c, 0x93,
+ 0x8c, 0x70, 0xc2, 0xd3, 0x98, 0x71, 0x83, 0xb9, 0x33, 0xee, 0x6f, 0x5b, 0x80, 0x96, 0x3c, 0xdf,
+ 0x25, 0xe1, 0x31, 0xec, 0xb6, 0xfd, 0x2d, 0x86, 0x3f, 0xa1, 0x4d, 0x0b, 0xb6, 0xda, 0x81, 0x4f,
+ 0xfc, 0x78, 0x29, 0xf0, 0x5d, 0xbe, 0x03, 0x7f, 0x02, 0x2a, 0x31, 0xad, 0x8a, 0x37, 0xeb, 0x49,
+ 0x39, 0x2c, 0xb4, 0x82, 0xfd, 0xdd, 0xb9, 0x53, 0xdd, 0x25, 0x58, 0x13, 0x58, 0x19, 0xf4, 0x71,
+ 0x18, 0x8c, 0x62, 0x27, 0xee, 0x44, 0xa2, 0xa1, 0x8f, 0xc9, 0x86, 0x36, 0x18, 0x74, 0x7f, 0x77,
+ 0x6e, 0x42, 0x15, 0xe3, 0x20, 0x2c, 0x0a, 0xa0, 0xa7, 0x60, 0x68, 0x8b, 0x44, 0x91, 0xb3, 0x21,
+ 0x65, 0xe2, 0x84, 0x28, 0x3b, 0x74, 0x8d, 0x83, 0xb1, 0xc4, 0xa3, 0xc7, 0x61, 0x80, 0x84, 0x61,
+ 0x10, 0x8a, 0x19, 0x31, 0x26, 0x08, 0x07, 0x96, 0x29, 0x10, 0x73, 0x9c, 0xfd, 0x5f, 0x2c, 0x98,
+ 0x50, 0x6d, 0xe5, 0x75, 0x1d, 0xc3, 0x92, 0x77, 0x01, 0x9a, 0xf2, 0x03, 0x23, 0xb6, 0xd0, 0xb4,
+ 0x3a, 0xb2, 0xa7, 0x5f, 0x77, 0x87, 0x26, 0x75, 0x28, 0x50, 0x84, 0x35, 0xbe, 0xf6, 0xbf, 0xb5,
+ 0xe0, 0x44, 0xea, 0xdb, 0xae, 0x7a, 0x51, 0x8c, 0xde, 0xe8, 0xfa, 0xbe, 0xf9, 0x62, 0xdf, 0x47,
+ 0x4b, 0xb3, 0xaf, 0x53, 0xf3, 0x45, 0x42, 0xb4, 0x6f, 0xc3, 0x30, 0xe0, 0xc5, 0x64, 0x4b, 0x7e,
+ 0xd6, 0xb3, 0x05, 0x3f, 0x8b, 0xb7, 0x2f, 0x19, 0xa5, 0x55, 0xca, 0x03, 0x73, 0x56, 0xf6, 0xff,
+ 0xb2, 0xa0, 0xba, 0x14, 0xf8, 0xeb, 0xde, 0xc6, 0x35, 0xa7, 0x7d, 0x0c, 0xe3, 0xd3, 0x80, 0x0a,
+ 0xe3, 0xce, 0x3f, 0xe1, 0x42, 0xde, 0x27, 0x88, 0x86, 0xcd, 0xd3, 0x7d, 0x8f, 0xeb, 0x17, 0x4a,
+ 0x4c, 0x51, 0x10, 0x66, 0xcc, 0x66, 0x5f, 0x84, 0xaa, 0x22, 0x40, 0x93, 0x50, 0xbe, 0x4b, 0xb8,
+ 0xf2, 0x59, 0xc5, 0xf4, 0x27, 0x9a, 0x86, 0x81, 0x6d, 0xa7, 0xd5, 0x11, 0x8b, 0x17, 0xf3, 0x3f,
+ 0x9f, 0x28, 0xbd, 0x64, 0xd9, 0xdf, 0x63, 0x2b, 0x50, 0x54, 0xb2, 0xec, 0x6f, 0x0b, 0xe1, 0xf0,
+ 0x39, 0x0b, 0xa6, 0x5b, 0x19, 0x42, 0x49, 0xf4, 0xc9, 0x61, 0xc4, 0xd9, 0x23, 0xa2, 0xd9, 0xd3,
+ 0x59, 0x58, 0x9c, 0x59, 0x1b, 0x95, 0xf5, 0x41, 0x9b, 0x4e, 0x38, 0xa7, 0xc5, 0x9a, 0x2e, 0xd4,
+ 0x86, 0x1b, 0x02, 0x86, 0x15, 0xd6, 0xfe, 0x0b, 0x0b, 0xa6, 0xd5, 0x77, 0x5c, 0x21, 0x3b, 0x0d,
+ 0xd2, 0x22, 0xcd, 0x38, 0x08, 0x3f, 0x28, 0x5f, 0xf2, 0x28, 0x1f, 0x13, 0x2e, 0x93, 0x46, 0x04,
+ 0x83, 0xf2, 0x15, 0xb2, 0xc3, 0x07, 0x48, 0xff, 0xd0, 0xf2, 0x81, 0x1f, 0xfa, 0x3b, 0x16, 0x8c,
+ 0xa9, 0x0f, 0x3d, 0x86, 0x25, 0x77, 0xd5, 0x5c, 0x72, 0x3f, 0x53, 0x70, 0xbe, 0xf6, 0x58, 0x6c,
+ 0x7f, 0xab, 0x44, 0xc5, 0x86, 0xa0, 0xa9, 0x87, 0x01, 0xed, 0x24, 0x2a, 0xf1, 0x3f, 0x20, 0xa3,
+ 0xd4, 0xdf, 0xc7, 0x5e, 0x21, 0x3b, 0x6b, 0x01, 0xd5, 0x26, 0xb2, 0x3f, 0xd6, 0x18, 0xd4, 0xca,
+ 0x81, 0x83, 0xfa, 0x07, 0x25, 0x38, 0xa9, 0xba, 0xc5, 0xd8, 0xa5, 0x7f, 0x2a, 0x3b, 0xe6, 0x02,
+ 0x8c, 0xb8, 0x64, 0xdd, 0xe9, 0xb4, 0x62, 0x75, 0x00, 0x19, 0xe0, 0x27, 0xd3, 0x5a, 0x02, 0xc6,
+ 0x3a, 0x4d, 0x1f, 0x7d, 0xf9, 0x95, 0x11, 0x26, 0xcf, 0x63, 0x87, 0xce, 0x7a, 0xaa, 0xe1, 0x69,
+ 0x27, 0xca, 0x51, 0xfd, 0x44, 0x29, 0x4e, 0x8f, 0x8f, 0xc3, 0x80, 0xb7, 0x45, 0xf7, 0xfc, 0x92,
+ 0xb9, 0x95, 0xaf, 0x52, 0x20, 0xe6, 0x38, 0xf4, 0x04, 0x0c, 0x35, 0x83, 0xad, 0x2d, 0xc7, 0x77,
+ 0x67, 0xca, 0x4c, 0xe7, 0x1c, 0xa1, 0x6a, 0xc1, 0x12, 0x07, 0x61, 0x89, 0x43, 0x8f, 0x40, 0xc5,
+ 0x09, 0x37, 0xa2, 0x99, 0x0a, 0xa3, 0x19, 0xa6, 0x35, 0x2d, 0x84, 0x1b, 0x11, 0x66, 0x50, 0xaa,
+ 0x4b, 0xde, 0x0b, 0xc2, 0xbb, 0x9e, 0xbf, 0x51, 0xf3, 0x42, 0xa6, 0x18, 0x6a, 0xba, 0xe4, 0x6d,
+ 0x85, 0xc1, 0x1a, 0x15, 0xaa, 0xc3, 0x40, 0x3b, 0x08, 0xe3, 0x68, 0x66, 0x90, 0x75, 0xfc, 0x33,
+ 0xb9, 0xcb, 0x8f, 0x7f, 0x77, 0x3d, 0x08, 0xe3, 0xe4, 0x53, 0xe8, 0xbf, 0x08, 0x73, 0x46, 0x68,
+ 0x09, 0xca, 0xc4, 0xdf, 0x9e, 0x19, 0x62, 0xfc, 0x3e, 0x72, 0x30, 0xbf, 0x65, 0x7f, 0xfb, 0x96,
+ 0x13, 0x26, 0xf2, 0x6a, 0xd9, 0xdf, 0xc6, 0xb4, 0x34, 0x6a, 0x42, 0x55, 0xda, 0xaf, 0xa2, 0x99,
+ 0xe1, 0x22, 0x53, 0x11, 0x0b, 0x72, 0x4c, 0xde, 0xed, 0x78, 0x21, 0xd9, 0x22, 0x7e, 0x1c, 0x25,
+ 0x07, 0x2b, 0x89, 0x8d, 0x70, 0xc2, 0x17, 0x35, 0x61, 0x94, 0xeb, 0x9f, 0xd7, 0x82, 0x8e, 0x1f,
+ 0x47, 0x33, 0x55, 0xd6, 0xe4, 0x1c, 0x63, 0xc7, 0xad, 0xa4, 0xc4, 0xe2, 0xb4, 0x60, 0x3f, 0xaa,
+ 0x01, 0x23, 0x6c, 0x30, 0x45, 0x6f, 0xc0, 0x58, 0xcb, 0xdb, 0x26, 0x3e, 0x89, 0xa2, 0x7a, 0x18,
+ 0xdc, 0x21, 0x33, 0xc0, 0xbe, 0xe6, 0xf1, 0xbc, 0x83, 0x7f, 0x70, 0x87, 0x2c, 0x4e, 0xed, 0xed,
+ 0xce, 0x8d, 0x5d, 0xd5, 0x4b, 0x63, 0x93, 0x19, 0x7a, 0x0b, 0xc6, 0xa9, 0xb2, 0xeb, 0x25, 0xec,
+ 0x47, 0x8a, 0xb3, 0x47, 0x7b, 0xbb, 0x73, 0xe3, 0xd8, 0x28, 0x8e, 0x53, 0xec, 0xd0, 0x1a, 0x54,
+ 0x5b, 0xde, 0x3a, 0x69, 0xee, 0x34, 0x5b, 0x64, 0x66, 0x94, 0xf1, 0xce, 0x59, 0x9c, 0x57, 0x25,
+ 0x39, 0x3f, 0x60, 0xa8, 0xbf, 0x38, 0x61, 0x84, 0x6e, 0xc1, 0xa9, 0x98, 0x84, 0x5b, 0x9e, 0xef,
+ 0xd0, 0x45, 0x25, 0xb4, 0x5f, 0x66, 0x5d, 0x19, 0x63, 0xb3, 0xf6, 0xb4, 0xe8, 0xd8, 0x53, 0x6b,
+ 0x99, 0x54, 0xb8, 0x47, 0x69, 0x74, 0x03, 0x26, 0xd8, 0x7a, 0xaa, 0x77, 0x5a, 0xad, 0x7a, 0xd0,
+ 0xf2, 0x9a, 0x3b, 0x33, 0xe3, 0x8c, 0xe1, 0x13, 0xd2, 0x66, 0xb2, 0x6a, 0xa2, 0xe9, 0xc1, 0x30,
+ 0xf9, 0x87, 0xd3, 0xa5, 0x51, 0x0b, 0x26, 0x22, 0xd2, 0xec, 0x84, 0x5e, 0xbc, 0x43, 0xe7, 0x3e,
+ 0xb9, 0x1f, 0xcf, 0x4c, 0x14, 0x39, 0xe8, 0x36, 0xcc, 0x42, 0xdc, 0x60, 0x95, 0x02, 0xe2, 0x34,
+ 0x6b, 0x2a, 0x2a, 0xa2, 0xd8, 0xf5, 0xfc, 0x99, 0x49, 0x26, 0x81, 0xd4, 0xfa, 0x6a, 0x50, 0x20,
+ 0xe6, 0x38, 0x66, 0x3f, 0xa0, 0x3f, 0x6e, 0x50, 0x29, 0x3d, 0xc5, 0x08, 0x13, 0xfb, 0x81, 0x44,
+ 0xe0, 0x84, 0x86, 0xaa, 0x06, 0x71, 0xbc, 0x33, 0x83, 0x18, 0xa9, 0x5a, 0x6a, 0x6b, 0x6b, 0x9f,
+ 0xc6, 0x14, 0x8e, 0x6e, 0xc1, 0x10, 0xf1, 0xb7, 0x57, 0xc2, 0x60, 0x6b, 0xe6, 0x44, 0x11, 0x19,
+ 0xb0, 0xcc, 0x89, 0xf9, 0xfe, 0x91, 0x1c, 0x61, 0x04, 0x18, 0x4b, 0x66, 0xe8, 0x3e, 0xcc, 0x64,
+ 0x8c, 0x12, 0x1f, 0x94, 0x69, 0x36, 0x28, 0x9f, 0x14, 0x65, 0x67, 0xd6, 0x7a, 0xd0, 0xed, 0x1f,
+ 0x80, 0xc3, 0x3d, 0xb9, 0xdb, 0x77, 0x60, 0x5c, 0x09, 0x2a, 0x36, 0xde, 0x68, 0x0e, 0x06, 0xa8,
+ 0x2c, 0x96, 0x07, 0xfa, 0x2a, 0xed, 0x54, 0x2a, 0xa2, 0x23, 0xcc, 0xe1, 0xac, 0x53, 0xbd, 0xf7,
+ 0xc8, 0xe2, 0x4e, 0x4c, 0xf8, 0xc1, 0xae, 0xac, 0x75, 0xaa, 0x44, 0xe0, 0x84, 0xc6, 0xfe, 0xbf,
+ 0x5c, 0x4d, 0x4a, 0xa4, 0x61, 0x81, 0x9d, 0xe0, 0x1c, 0x0c, 0x6f, 0x06, 0x51, 0x4c, 0xa9, 0x59,
+ 0x1d, 0x03, 0x89, 0x62, 0x74, 0x59, 0xc0, 0xb1, 0xa2, 0x40, 0x2f, 0xc3, 0x58, 0x53, 0xaf, 0x40,
+ 0x6c, 0x63, 0x27, 0x45, 0x11, 0xb3, 0x76, 0x6c, 0xd2, 0xa2, 0x97, 0x60, 0x98, 0x19, 0xc6, 0x9b,
+ 0x41, 0x4b, 0x1c, 0x21, 0xe5, 0xae, 0x3c, 0x5c, 0x17, 0xf0, 0x7d, 0xed, 0x37, 0x56, 0xd4, 0xf4,
+ 0x20, 0x4e, 0x9b, 0xb0, 0x5a, 0x17, 0x1b, 0x88, 0x3a, 0x88, 0x5f, 0x66, 0x50, 0x2c, 0xb0, 0xf6,
+ 0x3f, 0x2f, 0x69, 0xbd, 0x4c, 0x0f, 0x40, 0x04, 0xbd, 0x0e, 0x43, 0xf7, 0x1c, 0x2f, 0xf6, 0xfc,
+ 0x0d, 0xa1, 0x3d, 0x3c, 0x57, 0x70, 0x37, 0x61, 0xc5, 0x6f, 0xf3, 0xa2, 0x7c, 0xe7, 0x13, 0x7f,
+ 0xb0, 0x64, 0x48, 0x79, 0x87, 0x1d, 0xdf, 0xa7, 0xbc, 0x4b, 0xfd, 0xf3, 0xc6, 0xbc, 0x28, 0xe7,
+ 0x2d, 0xfe, 0x60, 0xc9, 0x10, 0xad, 0x03, 0xc8, 0xb9, 0x44, 0x5c, 0x61, 0x90, 0xfe, 0x58, 0x3f,
+ 0xec, 0xd7, 0x54, 0xe9, 0xc5, 0x71, 0xba, 0xd7, 0x26, 0xff, 0xb1, 0xc6, 0xd9, 0x8e, 0x99, 0x12,
+ 0xd6, 0xdd, 0x2c, 0xf4, 0x19, 0xba, 0xa4, 0x9d, 0x30, 0x26, 0xee, 0x42, 0x9c, 0xb6, 0xe9, 0x1f,
+ 0xac, 0x62, 0xaf, 0x79, 0x5b, 0x44, 0x5f, 0xfe, 0x82, 0x09, 0x4e, 0xf8, 0xd9, 0xdf, 0x2a, 0xc3,
+ 0x4c, 0xaf, 0xe6, 0xd2, 0x29, 0x49, 0xee, 0x7b, 0xf1, 0x12, 0x55, 0x93, 0x2c, 0x73, 0x4a, 0x2e,
+ 0x0b, 0x38, 0x56, 0x14, 0x74, 0x6e, 0x44, 0xde, 0x86, 0x3c, 0x2c, 0x0d, 0x24, 0x73, 0xa3, 0xc1,
+ 0xa0, 0x58, 0x60, 0x29, 0x5d, 0x48, 0x9c, 0x48, 0xdc, 0x87, 0x68, 0x73, 0x08, 0x33, 0x28, 0x16,
+ 0x58, 0xdd, 0x20, 0x52, 0xc9, 0x31, 0x88, 0x18, 0x5d, 0x34, 0xf0, 0x60, 0xbb, 0x08, 0xbd, 0x09,
+ 0xb0, 0xee, 0xf9, 0x5e, 0xb4, 0xc9, 0xb8, 0x0f, 0xf6, 0xcd, 0x5d, 0x29, 0x59, 0x2b, 0x8a, 0x0b,
+ 0xd6, 0x38, 0xa2, 0x17, 0x60, 0x44, 0x2d, 0xcf, 0xd5, 0xda, 0xcc, 0x90, 0x69, 0x43, 0x4f, 0x64,
+ 0x55, 0x0d, 0xeb, 0x74, 0xf6, 0x3b, 0xe9, 0xf9, 0x22, 0x56, 0x85, 0xd6, 0xbf, 0x56, 0xd1, 0xfe,
+ 0x2d, 0x1d, 0xdc, 0xbf, 0xf6, 0x7f, 0x2e, 0xc3, 0x84, 0x51, 0x59, 0x27, 0x2a, 0x20, 0xd1, 0x5e,
+ 0xa5, 0x1b, 0x96, 0x13, 0x13, 0xb1, 0x26, 0xcf, 0xf5, 0xb3, 0x68, 0xf4, 0xed, 0x8d, 0xae, 0x05,
+ 0xce, 0x09, 0x6d, 0x42, 0xb5, 0xe5, 0x44, 0xcc, 0xa4, 0x42, 0xc4, 0x5a, 0xec, 0x8f, 0x6d, 0x72,
+ 0xfc, 0x70, 0xa2, 0x58, 0xdb, 0x3d, 0x78, 0x2d, 0x09, 0x73, 0xba, 0xdb, 0x52, 0x65, 0x47, 0x5e,
+ 0xc2, 0xa9, 0xe6, 0x50, 0x8d, 0x68, 0x07, 0x73, 0x1c, 0x7a, 0x09, 0x46, 0x43, 0xc2, 0x66, 0xca,
+ 0x12, 0xd5, 0xe7, 0xd8, 0xd4, 0x1b, 0x48, 0x14, 0x3f, 0xac, 0xe1, 0xb0, 0x41, 0x99, 0xe8, 0xfd,
+ 0x83, 0x07, 0xe8, 0xfd, 0x4f, 0xc1, 0x10, 0xfb, 0xa1, 0x66, 0x85, 0x1a, 0xa1, 0x55, 0x0e, 0xc6,
+ 0x12, 0x9f, 0x9e, 0x44, 0xc3, 0x05, 0x27, 0xd1, 0xd3, 0x30, 0x5e, 0x73, 0xc8, 0x56, 0xe0, 0x2f,
+ 0xfb, 0x6e, 0x3b, 0xf0, 0xfc, 0x18, 0xcd, 0x40, 0x85, 0xed, 0x27, 0x7c, 0xbd, 0x57, 0x28, 0x07,
+ 0x5c, 0xa1, 0xba, 0xbb, 0xfd, 0x27, 0x25, 0x18, 0xab, 0x91, 0x16, 0x89, 0x09, 0x3f, 0xf7, 0x44,
+ 0x68, 0x05, 0xd0, 0x46, 0xe8, 0x34, 0x49, 0x9d, 0x84, 0x5e, 0xe0, 0x36, 0x48, 0x33, 0xf0, 0xd9,
+ 0xdd, 0x15, 0xdd, 0x20, 0x4f, 0xed, 0xed, 0xce, 0xa1, 0x4b, 0x5d, 0x58, 0x9c, 0x51, 0x02, 0xb9,
+ 0x30, 0xd6, 0x0e, 0x89, 0x61, 0x37, 0xb4, 0xf2, 0x55, 0x8d, 0xba, 0x5e, 0x84, 0x6b, 0xc3, 0x06,
+ 0x08, 0x9b, 0x4c, 0xd1, 0xa7, 0x60, 0x32, 0x08, 0xdb, 0x9b, 0x8e, 0x5f, 0x23, 0x6d, 0xe2, 0xbb,
+ 0xf4, 0x08, 0x20, 0xac, 0x1d, 0xd3, 0x7b, 0xbb, 0x73, 0x93, 0x37, 0x52, 0x38, 0xdc, 0x45, 0x8d,
+ 0x5e, 0x87, 0xa9, 0x76, 0x18, 0xb4, 0x9d, 0x0d, 0x36, 0x65, 0x84, 0xb6, 0xc2, 0x65, 0xd3, 0xb9,
+ 0xbd, 0xdd, 0xb9, 0xa9, 0x7a, 0x1a, 0xb9, 0xbf, 0x3b, 0x77, 0x82, 0x75, 0x19, 0x85, 0x24, 0x48,
+ 0xdc, 0xcd, 0xc6, 0x7e, 0x17, 0x4e, 0xd6, 0x82, 0x7b, 0xfe, 0x3d, 0x27, 0x74, 0x17, 0xea, 0xab,
+ 0x9a, 0x71, 0xe2, 0x35, 0x79, 0xf8, 0xe5, 0x77, 0x82, 0x39, 0x3b, 0x9b, 0xc6, 0x83, 0x1f, 0x3b,
+ 0x56, 0xbc, 0x16, 0xe9, 0x61, 0x0e, 0xf9, 0xc7, 0x25, 0xa3, 0xce, 0x84, 0x5e, 0xdd, 0x5d, 0x58,
+ 0x3d, 0xef, 0x2e, 0x3e, 0x03, 0xc3, 0xeb, 0x1e, 0x69, 0xb9, 0x98, 0xac, 0x8b, 0xd1, 0xba, 0x50,
+ 0xe4, 0x72, 0x67, 0x85, 0x96, 0x91, 0xd6, 0x31, 0x7e, 0x88, 0x5e, 0x11, 0x6c, 0xb0, 0x62, 0x88,
+ 0x3a, 0x30, 0x29, 0xcf, 0x61, 0x12, 0x2b, 0x16, 0xfb, 0x73, 0xc5, 0x8e, 0x79, 0x66, 0x35, 0x6c,
+ 0x78, 0x71, 0x8a, 0x21, 0xee, 0xaa, 0x82, 0x9e, 0x9f, 0xb7, 0xe8, 0x56, 0x57, 0x61, 0x53, 0x9f,
+ 0x9d, 0x9f, 0x99, 0x29, 0x80, 0x41, 0xed, 0xdf, 0xb4, 0xe0, 0xa1, 0xae, 0xde, 0x12, 0x76, 0x92,
+ 0x23, 0x1b, 0xa3, 0xb4, 0xb1, 0xa2, 0x94, 0x6f, 0xac, 0xb0, 0x7f, 0xcb, 0x82, 0xe9, 0xe5, 0xad,
+ 0x76, 0xbc, 0x53, 0xf3, 0xcc, 0x3b, 0x97, 0x17, 0x61, 0x70, 0x8b, 0xb8, 0x5e, 0x67, 0x4b, 0x8c,
+ 0xeb, 0x9c, 0xdc, 0x18, 0xae, 0x31, 0xe8, 0xfe, 0xee, 0xdc, 0x58, 0x23, 0x0e, 0x42, 0x67, 0x83,
+ 0x70, 0x00, 0x16, 0xe4, 0x6c, 0x7b, 0xf5, 0xde, 0x23, 0x57, 0xbd, 0x2d, 0x4f, 0x5e, 0xe5, 0x1d,
+ 0x68, 0xe4, 0x9b, 0x97, 0x5d, 0x3b, 0xff, 0x6a, 0xc7, 0xf1, 0x63, 0x2f, 0xde, 0x11, 0xd7, 0x49,
+ 0x92, 0x09, 0x4e, 0xf8, 0xd9, 0x3f, 0xb2, 0x60, 0x42, 0x4a, 0x9f, 0x05, 0xd7, 0x0d, 0x49, 0x14,
+ 0xa1, 0x59, 0x28, 0x79, 0x6d, 0xd1, 0x4a, 0x10, 0xad, 0x2c, 0xad, 0xd6, 0x71, 0xc9, 0x6b, 0xa3,
+ 0xd7, 0xa1, 0xca, 0xef, 0x01, 0x93, 0xa9, 0xd7, 0xe7, 0xbd, 0x22, 0x6b, 0xcb, 0x9a, 0xe4, 0x81,
+ 0x13, 0x76, 0x52, 0x07, 0x67, 0xfb, 0x5a, 0xd9, 0xbc, 0x95, 0xba, 0x2c, 0xe0, 0x58, 0x51, 0xa0,
+ 0xb3, 0x30, 0xec, 0x07, 0x2e, 0xbf, 0xaa, 0xe5, 0x52, 0x80, 0x4d, 0xe8, 0xeb, 0x02, 0x86, 0x15,
+ 0xd6, 0xfe, 0xa2, 0x05, 0xa3, 0xf2, 0x1b, 0x0b, 0x1e, 0x07, 0xe8, 0x12, 0x4c, 0x8e, 0x02, 0xc9,
+ 0x12, 0xa4, 0xea, 0x3c, 0xc3, 0x18, 0x5a, 0x7c, 0xb9, 0x1f, 0x2d, 0xde, 0xfe, 0xed, 0x12, 0x8c,
+ 0xcb, 0xe6, 0x34, 0x3a, 0x77, 0x22, 0x42, 0x95, 0x9c, 0xaa, 0xc3, 0x3b, 0x9f, 0xc8, 0x59, 0xfc,
+ 0x6c, 0xde, 0x49, 0xcf, 0x18, 0xb3, 0x44, 0x89, 0x5a, 0x90, 0x7c, 0x70, 0xc2, 0x12, 0x6d, 0xc3,
+ 0x94, 0x1f, 0xc4, 0x6c, 0xf3, 0x54, 0xf8, 0x62, 0xf7, 0x28, 0xe9, 0x7a, 0x1e, 0x16, 0xf5, 0x4c,
+ 0x5d, 0x4f, 0xf3, 0xc3, 0xdd, 0x55, 0xa0, 0x1b, 0xd2, 0x82, 0x55, 0x66, 0x75, 0x3d, 0x5d, 0xac,
+ 0xae, 0xde, 0x06, 0x2c, 0xfb, 0xf7, 0x2d, 0xa8, 0x4a, 0xb2, 0xe3, 0xb8, 0x50, 0xbb, 0x0d, 0x43,
+ 0x11, 0x1b, 0x22, 0xd9, 0x5d, 0xe7, 0x8a, 0x7d, 0x02, 0x1f, 0xd7, 0x44, 0x63, 0xe0, 0xff, 0x23,
+ 0x2c, 0xb9, 0x31, 0x53, 0xbe, 0xfa, 0x90, 0x0f, 0x9c, 0x29, 0x5f, 0xb5, 0xac, 0xf7, 0xbd, 0xd9,
+ 0x98, 0x61, 0x6b, 0xa0, 0x6a, 0x6f, 0x3b, 0x24, 0xeb, 0xde, 0xfd, 0xb4, 0xda, 0x5b, 0x67, 0x50,
+ 0x2c, 0xb0, 0x68, 0x1d, 0x46, 0x9b, 0xd2, 0xd8, 0x9d, 0x88, 0x90, 0x8f, 0x16, 0xbc, 0x59, 0x50,
+ 0x97, 0x54, 0xdc, 0x57, 0x6a, 0x49, 0xe3, 0x84, 0x0d, 0xbe, 0x54, 0x4e, 0x25, 0xf7, 0xf0, 0xe5,
+ 0x82, 0x66, 0xa1, 0x90, 0xc4, 0x49, 0x0d, 0x3d, 0xaf, 0xe0, 0xed, 0xaf, 0x5a, 0x30, 0xc8, 0xad,
+ 0xa3, 0xc5, 0x4c, 0xcc, 0xda, 0xf5, 0x5b, 0xd2, 0x9f, 0xb7, 0x28, 0x50, 0xdc, 0xc6, 0xa1, 0xdb,
+ 0x50, 0x65, 0x3f, 0x98, 0xa5, 0xa7, 0x5c, 0xc4, 0x71, 0x8c, 0xd7, 0xaf, 0x37, 0xf5, 0x96, 0x64,
+ 0x80, 0x13, 0x5e, 0xf6, 0x77, 0xca, 0x54, 0xf4, 0x25, 0xa4, 0x86, 0xe6, 0x60, 0x1d, 0x87, 0xe6,
+ 0x50, 0x3a, 0x7a, 0xcd, 0xe1, 0x5d, 0x98, 0x68, 0x6a, 0xd7, 0x7f, 0xc9, 0x88, 0x5f, 0x2c, 0x38,
+ 0xad, 0xb4, 0x3b, 0x43, 0x6e, 0x0d, 0x5c, 0x32, 0xd9, 0xe1, 0x34, 0x7f, 0x44, 0x60, 0x94, 0xcf,
+ 0x07, 0x51, 0x5f, 0x85, 0xd5, 0x77, 0xbe, 0xc8, 0x0c, 0xd3, 0x2b, 0x63, 0xb3, 0xb8, 0xa1, 0x31,
+ 0xc2, 0x06, 0x5b, 0xfb, 0xd7, 0x07, 0x60, 0x60, 0x79, 0x9b, 0xf8, 0xf1, 0x31, 0x88, 0xba, 0x2d,
+ 0x18, 0xf7, 0xfc, 0xed, 0xa0, 0xb5, 0x4d, 0x5c, 0x8e, 0x3f, 0xdc, 0xf6, 0x7e, 0x4a, 0x54, 0x32,
+ 0xbe, 0x6a, 0x30, 0xc3, 0x29, 0xe6, 0x47, 0x61, 0x87, 0x78, 0x15, 0x06, 0xf9, 0xcc, 0x10, 0x46,
+ 0x88, 0x9c, 0xdb, 0x02, 0xd6, 0xb1, 0x62, 0x05, 0x25, 0xd6, 0x12, 0x7e, 0x51, 0x21, 0x18, 0xa1,
+ 0x77, 0x60, 0x7c, 0xdd, 0x0b, 0xa3, 0x78, 0xcd, 0xdb, 0xa2, 0xe7, 0xc7, 0xad, 0xf6, 0x21, 0x2c,
+ 0x10, 0xaa, 0x47, 0x56, 0x0c, 0x4e, 0x38, 0xc5, 0x19, 0x6d, 0xc0, 0x18, 0x3d, 0x00, 0x27, 0x55,
+ 0x0d, 0xf5, 0x5d, 0x95, 0x32, 0x40, 0x5e, 0xd5, 0x19, 0x61, 0x93, 0x2f, 0x15, 0x49, 0x4d, 0x76,
+ 0x60, 0x1e, 0x66, 0xda, 0x8d, 0x12, 0x49, 0xfc, 0xa4, 0xcc, 0x71, 0x54, 0xb2, 0x31, 0x3f, 0x9c,
+ 0xaa, 0x29, 0xd9, 0x12, 0x6f, 0x1b, 0xfb, 0xeb, 0x74, 0x2f, 0xa6, 0x7d, 0x78, 0x0c, 0xdb, 0xd7,
+ 0x65, 0x73, 0xfb, 0x7a, 0xbc, 0xc0, 0xc8, 0xf6, 0xd8, 0xba, 0xde, 0x86, 0x11, 0x6d, 0xe0, 0xd1,
+ 0x79, 0xa8, 0x36, 0xa5, 0xab, 0x88, 0x90, 0xe2, 0x4a, 0x95, 0x52, 0x3e, 0x24, 0x38, 0xa1, 0xa1,
+ 0xfd, 0x42, 0x55, 0xd0, 0xb4, 0x63, 0x19, 0x55, 0x50, 0x31, 0xc3, 0xd8, 0xcf, 0x01, 0x2c, 0xdf,
+ 0x27, 0xcd, 0x05, 0x7e, 0x80, 0xd4, 0x6e, 0x0f, 0xad, 0xde, 0xb7, 0x87, 0xf6, 0xd7, 0x2c, 0x18,
+ 0x5f, 0x59, 0x32, 0x0e, 0x0c, 0xf3, 0x00, 0x5c, 0x37, 0xbe, 0x7d, 0xfb, 0xba, 0xb4, 0x8e, 0x73,
+ 0x13, 0xa6, 0x82, 0x62, 0x8d, 0x02, 0x3d, 0x0c, 0xe5, 0x56, 0xc7, 0x17, 0x2a, 0xeb, 0xd0, 0xde,
+ 0xee, 0x5c, 0xf9, 0x6a, 0xc7, 0xc7, 0x14, 0xa6, 0x79, 0x70, 0x95, 0x0b, 0x7b, 0x70, 0xe5, 0xbb,
+ 0x3f, 0x7f, 0xb9, 0x0c, 0x93, 0x2b, 0x2d, 0x72, 0xdf, 0x68, 0xf5, 0x93, 0x30, 0xe8, 0x86, 0xde,
+ 0x36, 0x09, 0xd3, 0x8a, 0x40, 0x8d, 0x41, 0xb1, 0xc0, 0x16, 0x76, 0x2a, 0x7b, 0xab, 0x7b, 0x23,
+ 0x3f, 0x3a, 0x87, 0xba, 0xdc, 0x6f, 0x46, 0xeb, 0x30, 0xc4, 0x6f, 0x9b, 0xa3, 0x99, 0x01, 0x36,
+ 0x15, 0x5f, 0x3e, 0xb8, 0x31, 0xe9, 0xfe, 0x99, 0x17, 0xd6, 0x1b, 0xee, 0xce, 0xa3, 0x64, 0x99,
+ 0x80, 0x62, 0xc9, 0x7c, 0xf6, 0x13, 0x30, 0xaa, 0x53, 0xf6, 0xe5, 0xd7, 0xf3, 0x57, 0x2d, 0x38,
+ 0xb1, 0xd2, 0x0a, 0x9a, 0x77, 0x53, 0x5e, 0x7f, 0x2f, 0xc0, 0x08, 0x5d, 0x4c, 0x91, 0xe1, 0x12,
+ 0x6b, 0xb8, 0x0b, 0x0b, 0x14, 0xd6, 0xe9, 0xb4, 0x62, 0x37, 0x6f, 0xae, 0xd6, 0xb2, 0xbc, 0x8c,
+ 0x05, 0x0a, 0xeb, 0x74, 0xf6, 0x1f, 0x5a, 0xf0, 0xe8, 0xa5, 0xa5, 0xe5, 0x3a, 0x09, 0x23, 0x2f,
+ 0x8a, 0x89, 0x1f, 0x77, 0x39, 0x3a, 0x53, 0x9d, 0xd1, 0xd5, 0x9a, 0x92, 0xe8, 0x8c, 0x35, 0xd6,
+ 0x0a, 0x81, 0xfd, 0xa0, 0x78, 0xfb, 0x7f, 0xd5, 0x82, 0x13, 0x97, 0xbc, 0x18, 0x93, 0x76, 0x90,
+ 0x76, 0x34, 0x0e, 0x49, 0x3b, 0x88, 0xbc, 0x38, 0x08, 0x77, 0xd2, 0x8e, 0xc6, 0x58, 0x61, 0xb0,
+ 0x46, 0xc5, 0x6b, 0xde, 0xf6, 0x22, 0xda, 0xd2, 0x92, 0x79, 0xd4, 0xc5, 0x02, 0x8e, 0x15, 0x05,
+ 0xfd, 0x30, 0xd7, 0x0b, 0x99, 0xca, 0xb0, 0x23, 0x56, 0xb0, 0xfa, 0xb0, 0x9a, 0x44, 0xe0, 0x84,
+ 0xc6, 0xfe, 0xbb, 0x16, 0x9c, 0xbc, 0xd4, 0xea, 0x44, 0x31, 0x09, 0xd7, 0x23, 0xa3, 0xb1, 0xcf,
+ 0x41, 0x95, 0x48, 0xe5, 0x5e, 0xb4, 0x55, 0x6d, 0x1a, 0x4a, 0xeb, 0xe7, 0x5e, 0xce, 0x8a, 0xae,
+ 0x80, 0x33, 0x6d, 0x7f, 0xae, 0x9f, 0xbf, 0x5b, 0x82, 0xb1, 0xcb, 0x6b, 0x6b, 0xf5, 0x4b, 0x24,
+ 0x16, 0x52, 0x32, 0xdf, 0xe4, 0x85, 0xb5, 0x13, 0xf9, 0x41, 0xca, 0x4f, 0x27, 0xf6, 0x5a, 0xf3,
+ 0x3c, 0x12, 0x65, 0x7e, 0xd5, 0x8f, 0x6f, 0x84, 0x8d, 0x38, 0xf4, 0xfc, 0x8d, 0xcc, 0x33, 0xbc,
+ 0x94, 0xe5, 0xe5, 0x5e, 0xb2, 0x1c, 0x3d, 0x07, 0x83, 0x2c, 0x14, 0x46, 0x2a, 0x1f, 0x1f, 0x56,
+ 0x7a, 0x02, 0x83, 0xee, 0xef, 0xce, 0x55, 0x6f, 0xe2, 0x55, 0xfe, 0x07, 0x0b, 0x52, 0xf4, 0x16,
+ 0x8c, 0x6c, 0xc6, 0x71, 0xfb, 0x32, 0x71, 0x5c, 0x12, 0x4a, 0x39, 0x71, 0xf6, 0x60, 0x39, 0x41,
+ 0xbb, 0x83, 0x17, 0x48, 0x96, 0x56, 0x02, 0x8b, 0xb0, 0xce, 0xd1, 0x6e, 0x00, 0x24, 0xb8, 0x07,
+ 0x74, 0x06, 0xb1, 0x7f, 0xb9, 0x04, 0x43, 0x97, 0x1d, 0xdf, 0x6d, 0x91, 0x10, 0xad, 0x40, 0x85,
+ 0xdc, 0x27, 0x4d, 0xb1, 0x91, 0xe7, 0x34, 0x3d, 0xd9, 0xec, 0xb8, 0xd5, 0x8e, 0xfe, 0xc7, 0xac,
+ 0x3c, 0xc2, 0x30, 0x44, 0xdb, 0x7d, 0x49, 0xf9, 0xa0, 0x3f, 0x93, 0xdf, 0x0b, 0x6a, 0x52, 0xf0,
+ 0x9d, 0x52, 0x80, 0xb0, 0x64, 0xc4, 0x2c, 0x50, 0xcd, 0x76, 0x83, 0x8a, 0xb7, 0xb8, 0xd8, 0xc9,
+ 0x6e, 0x6d, 0xa9, 0xce, 0xc9, 0x05, 0x5f, 0x6e, 0x81, 0x92, 0x40, 0x9c, 0xb0, 0xb3, 0xd7, 0xa0,
+ 0x4a, 0x07, 0x7f, 0xa1, 0xe5, 0x39, 0x07, 0x9b, 0xc1, 0x9e, 0x81, 0xaa, 0x34, 0x44, 0x45, 0xc2,
+ 0xa1, 0x9d, 0x71, 0x95, 0x76, 0xaa, 0x08, 0x27, 0x78, 0xfb, 0x25, 0x98, 0x66, 0x77, 0xc8, 0x4e,
+ 0xbc, 0x69, 0xac, 0xc5, 0xdc, 0x49, 0x6f, 0x7f, 0xa3, 0x02, 0x53, 0xab, 0x8d, 0xa5, 0x86, 0x69,
+ 0xef, 0x7c, 0x09, 0x46, 0xf9, 0xb6, 0x4f, 0xa7, 0xb2, 0xd3, 0x12, 0xe5, 0xd5, 0xbd, 0xc7, 0x9a,
+ 0x86, 0xc3, 0x06, 0x25, 0x7a, 0x14, 0xca, 0xde, 0xbb, 0x7e, 0xda, 0x13, 0x71, 0xf5, 0xd5, 0xeb,
+ 0x98, 0xc2, 0x29, 0x9a, 0x6a, 0x10, 0x5c, 0x74, 0x2a, 0xb4, 0xd2, 0x22, 0x5e, 0x81, 0x71, 0x2f,
+ 0x6a, 0x46, 0xde, 0xaa, 0x4f, 0xe5, 0x8a, 0xd3, 0x94, 0x8b, 0x22, 0x51, 0xf9, 0x69, 0x53, 0x15,
+ 0x16, 0xa7, 0xa8, 0x35, 0x39, 0x3e, 0x50, 0x58, 0x0b, 0xc9, 0x75, 0x71, 0xa7, 0x0a, 0x56, 0x9b,
+ 0x7d, 0x5d, 0xc4, 0xfc, 0x9a, 0x84, 0x82, 0xc5, 0x3f, 0x38, 0xc2, 0x12, 0x87, 0x2e, 0xc1, 0x54,
+ 0x73, 0xd3, 0x69, 0x2f, 0x74, 0xe2, 0xcd, 0x9a, 0x17, 0x35, 0x83, 0x6d, 0x12, 0xee, 0x30, 0x05,
+ 0x78, 0x38, 0xb1, 0x69, 0x29, 0xc4, 0xd2, 0xe5, 0x85, 0x3a, 0xa5, 0xc4, 0xdd, 0x65, 0x4c, 0x85,
+ 0x04, 0x8e, 0x40, 0x21, 0x59, 0x80, 0x09, 0x59, 0x6b, 0x83, 0x44, 0x6c, 0x8b, 0x18, 0x61, 0xed,
+ 0x54, 0xc1, 0x45, 0x02, 0xac, 0x5a, 0x99, 0xa6, 0xb7, 0xdf, 0x81, 0xaa, 0xf2, 0xc3, 0x93, 0xee,
+ 0xa7, 0x56, 0x0f, 0xf7, 0xd3, 0x7c, 0xe1, 0x2e, 0x2d, 0xf3, 0xe5, 0x4c, 0xcb, 0xfc, 0x3f, 0xb1,
+ 0x20, 0x71, 0x24, 0x42, 0x18, 0xaa, 0xed, 0x80, 0xdd, 0xe2, 0x85, 0xf2, 0xba, 0xfc, 0x89, 0x9c,
+ 0x35, 0xcf, 0x65, 0x0e, 0xef, 0x90, 0xba, 0x2c, 0x8b, 0x13, 0x36, 0xe8, 0x2a, 0x0c, 0xb5, 0x43,
+ 0xd2, 0x88, 0x59, 0xec, 0x48, 0x1f, 0x1c, 0xf9, 0x44, 0xe0, 0x25, 0xb1, 0x64, 0x61, 0xff, 0x4b,
+ 0x0b, 0x80, 0x9b, 0xc1, 0x1d, 0x7f, 0x83, 0x1c, 0xc3, 0xc1, 0xfa, 0x3a, 0x54, 0xa2, 0x36, 0x69,
+ 0x16, 0xbb, 0x87, 0x4d, 0x5a, 0xd6, 0x68, 0x93, 0x66, 0x32, 0x1c, 0xf4, 0x1f, 0x66, 0x7c, 0xec,
+ 0x6f, 0x03, 0x8c, 0x27, 0x64, 0xf4, 0x70, 0x83, 0x9e, 0x35, 0x82, 0x26, 0x1e, 0x4e, 0x05, 0x4d,
+ 0x54, 0x19, 0xb5, 0x16, 0x27, 0x11, 0x43, 0x79, 0xcb, 0xb9, 0x2f, 0xce, 0x52, 0x2f, 0x14, 0x6d,
+ 0x10, 0xad, 0x69, 0xfe, 0x9a, 0x73, 0x9f, 0xab, 0xae, 0xcf, 0xc8, 0x89, 0x74, 0xcd, 0xb9, 0xbf,
+ 0xcf, 0x6f, 0x5b, 0x99, 0x74, 0xa2, 0x87, 0xb7, 0xcf, 0xfe, 0x59, 0xf2, 0x9f, 0x6d, 0x43, 0xb4,
+ 0x3a, 0x56, 0xab, 0xe7, 0x0b, 0x53, 0x70, 0x9f, 0xb5, 0x7a, 0x7e, 0xba, 0x56, 0xcf, 0x2f, 0x50,
+ 0xab, 0xc7, 0xbc, 0x8b, 0x87, 0xc4, 0xfd, 0x0c, 0x73, 0xcd, 0x1c, 0xb9, 0xf8, 0xf1, 0xbe, 0xaa,
+ 0x16, 0x17, 0x3d, 0xbc, 0xfa, 0xf3, 0x52, 0x5f, 0x17, 0xd0, 0xdc, 0x26, 0xc8, 0xaa, 0xd1, 0xdf,
+ 0xb3, 0x60, 0x5c, 0xfc, 0xc6, 0xe4, 0xdd, 0x0e, 0x89, 0x62, 0xa1, 0x17, 0x7c, 0xea, 0x30, 0xad,
+ 0x11, 0x2c, 0x78, 0xa3, 0x3e, 0x26, 0xc5, 0xaf, 0x89, 0xcc, 0x6d, 0x5b, 0xaa, 0x3d, 0xe8, 0xdb,
+ 0x16, 0x4c, 0x6f, 0x39, 0xf7, 0x79, 0x8d, 0x1c, 0x86, 0x9d, 0xd8, 0x0b, 0x84, 0xfb, 0xe9, 0x4a,
+ 0xbf, 0xf3, 0xa4, 0x8b, 0x11, 0x6f, 0xae, 0xf4, 0x2c, 0x9b, 0xce, 0x22, 0xc9, 0x6d, 0x74, 0x66,
+ 0x0b, 0x67, 0xd7, 0x61, 0x58, 0x4e, 0xcc, 0x8c, 0x93, 0x52, 0x4d, 0x57, 0x7f, 0xfa, 0xbe, 0x3c,
+ 0xd3, 0x4e, 0x56, 0xac, 0x1e, 0x31, 0x15, 0x8f, 0xb4, 0x9e, 0x77, 0x60, 0x54, 0x9f, 0x77, 0x47,
+ 0x5a, 0xd7, 0xbb, 0x70, 0x22, 0x63, 0x56, 0x1d, 0x69, 0x95, 0xf7, 0xe0, 0xe1, 0x9e, 0xf3, 0xe3,
+ 0x28, 0x2b, 0xb6, 0x7f, 0xd7, 0xd2, 0x45, 0xe7, 0x31, 0xd8, 0xad, 0xae, 0x99, 0x76, 0xab, 0xb3,
+ 0x45, 0xd7, 0x50, 0x0f, 0xe3, 0xd5, 0xba, 0xde, 0x7c, 0xba, 0x25, 0xa0, 0x35, 0x18, 0x6c, 0x51,
+ 0x88, 0xbc, 0x36, 0x3c, 0xd7, 0xcf, 0x2a, 0x4d, 0x34, 0x30, 0x06, 0x8f, 0xb0, 0xe0, 0x65, 0x7f,
+ 0xdb, 0x82, 0xca, 0x5f, 0x62, 0x48, 0x57, 0x17, 0x6b, 0x91, 0x96, 0x60, 0x1e, 0x3b, 0xf7, 0x96,
+ 0xef, 0xc7, 0xc4, 0x8f, 0x98, 0x1a, 0x9f, 0xd9, 0x45, 0xff, 0xa7, 0x04, 0x23, 0xb4, 0x2a, 0xe9,
+ 0x25, 0xf3, 0x32, 0x8c, 0xb5, 0x9c, 0x3b, 0xa4, 0x25, 0x6d, 0xee, 0xe9, 0x43, 0xef, 0x55, 0x1d,
+ 0x89, 0x4d, 0x5a, 0x5a, 0x78, 0x5d, 0xbf, 0x92, 0x10, 0x4a, 0x92, 0x2a, 0x6c, 0xdc, 0x57, 0x60,
+ 0x93, 0x96, 0x9e, 0xba, 0xee, 0x39, 0x71, 0x73, 0x53, 0x1c, 0x88, 0x55, 0x73, 0x6f, 0x53, 0x20,
+ 0xe6, 0x38, 0xaa, 0xec, 0xc9, 0x19, 0x7b, 0x8b, 0x84, 0x4c, 0xd9, 0xe3, 0x4a, 0xb5, 0x52, 0xf6,
+ 0xb0, 0x89, 0xc6, 0x69, 0x7a, 0xf4, 0x09, 0x18, 0xa7, 0x9d, 0x13, 0x74, 0x62, 0xe9, 0x03, 0x34,
+ 0xc0, 0x7c, 0x80, 0x98, 0x0b, 0xf9, 0x9a, 0x81, 0xc1, 0x29, 0x4a, 0x54, 0x87, 0x69, 0xcf, 0x6f,
+ 0xb6, 0x3a, 0x2e, 0xb9, 0xe9, 0x7b, 0xbe, 0x17, 0x7b, 0x4e, 0xcb, 0x7b, 0x8f, 0xb8, 0x42, 0xed,
+ 0x56, 0xee, 0x5a, 0xab, 0x19, 0x34, 0x38, 0xb3, 0xa4, 0xfd, 0x16, 0x9c, 0xb8, 0x1a, 0x38, 0xee,
+ 0xa2, 0xd3, 0x72, 0xfc, 0x26, 0x09, 0x57, 0xfd, 0x8d, 0x5c, 0x9f, 0x02, 0xfd, 0xde, 0xbf, 0x94,
+ 0x77, 0xef, 0x6f, 0x87, 0x80, 0xf4, 0x0a, 0x84, 0x3f, 0xdc, 0x1b, 0x30, 0xe4, 0xf1, 0xaa, 0xc4,
+ 0x42, 0xb8, 0x90, 0xa7, 0x93, 0x77, 0xb5, 0x51, 0xf3, 0xef, 0xe2, 0x00, 0x2c, 0x59, 0xd2, 0x13,
+ 0x5c, 0x96, 0x12, 0x9f, 0x7f, 0xf4, 0xb6, 0x5f, 0x80, 0x29, 0x56, 0xb2, 0xcf, 0x83, 0xdf, 0x5f,
+ 0xb3, 0x60, 0xe2, 0x7a, 0x2a, 0xf8, 0xf9, 0x49, 0x18, 0x8c, 0x48, 0x98, 0x61, 0x59, 0x6d, 0x30,
+ 0x28, 0x16, 0xd8, 0x07, 0x6e, 0xad, 0xf9, 0xb5, 0x12, 0x54, 0x99, 0x43, 0x76, 0x9b, 0x1e, 0xe2,
+ 0x8e, 0x5e, 0x5f, 0xbe, 0x66, 0xe8, 0xcb, 0x39, 0x16, 0x03, 0xd5, 0xb0, 0x5e, 0xea, 0x32, 0xba,
+ 0xa9, 0x82, 0x82, 0x0b, 0x19, 0x0b, 0x12, 0x86, 0x3c, 0x70, 0x74, 0xdc, 0x8c, 0x21, 0x96, 0x01,
+ 0xc3, 0xec, 0x02, 0x5f, 0xd1, 0x7e, 0xe0, 0x2e, 0xf0, 0x55, 0xcb, 0x7a, 0x48, 0xc9, 0xba, 0xd6,
+ 0x78, 0xb6, 0x8f, 0xfc, 0x1c, 0x73, 0xb3, 0x65, 0x6b, 0x58, 0xc5, 0xd6, 0xcf, 0x09, 0xb7, 0x59,
+ 0x01, 0xdd, 0x67, 0x02, 0x4f, 0xfc, 0xe3, 0xa9, 0x13, 0x92, 0x22, 0xf6, 0x65, 0x98, 0x48, 0x75,
+ 0x1d, 0x7a, 0x01, 0x06, 0xda, 0x9b, 0x4e, 0x44, 0x52, 0x0e, 0x4f, 0x03, 0x75, 0x0a, 0xdc, 0xdf,
+ 0x9d, 0x1b, 0x57, 0x05, 0x18, 0x04, 0x73, 0x6a, 0xfb, 0x73, 0x25, 0xa8, 0x5c, 0x0f, 0xdc, 0xe3,
+ 0x98, 0x6a, 0x97, 0x8d, 0xa9, 0xf6, 0x64, 0x7e, 0xae, 0x96, 0x9e, 0xb3, 0xac, 0x9e, 0x9a, 0x65,
+ 0x67, 0x0b, 0xf0, 0x3a, 0x78, 0x82, 0x6d, 0xc1, 0x08, 0xcb, 0x05, 0x23, 0x9c, 0xb2, 0x9e, 0x33,
+ 0x8e, 0x78, 0x73, 0xa9, 0x23, 0xde, 0x84, 0x46, 0xaa, 0x1d, 0xf4, 0x9e, 0x82, 0x21, 0xe1, 0x04,
+ 0x94, 0x76, 0x32, 0x16, 0xb4, 0x58, 0xe2, 0xed, 0x7f, 0x51, 0x06, 0x23, 0xf7, 0x0c, 0xfa, 0x7d,
+ 0x0b, 0xe6, 0x43, 0x1e, 0xb0, 0xe5, 0xd6, 0x3a, 0xa1, 0xe7, 0x6f, 0x34, 0x9a, 0x9b, 0xc4, 0xed,
+ 0xb4, 0x3c, 0x7f, 0x63, 0x75, 0xc3, 0x0f, 0x14, 0x78, 0xf9, 0x3e, 0x69, 0x76, 0x98, 0xcd, 0xbd,
+ 0x70, 0xca, 0x1b, 0x75, 0x01, 0x7e, 0x71, 0x6f, 0x77, 0x6e, 0x1e, 0xf7, 0x55, 0x0b, 0xee, 0xb3,
+ 0x55, 0xe8, 0x87, 0x16, 0x9c, 0xe7, 0xd9, 0x57, 0x8a, 0x7f, 0x49, 0xa1, 0xa3, 0x71, 0x5d, 0x32,
+ 0x4d, 0xd8, 0xad, 0x91, 0x70, 0x6b, 0xf1, 0x45, 0xd1, 0xc9, 0xe7, 0xeb, 0xfd, 0xd5, 0x8a, 0xfb,
+ 0x6d, 0xa6, 0xfd, 0xaf, 0xcb, 0x30, 0x46, 0xfb, 0x33, 0x49, 0x9f, 0xf0, 0x82, 0x31, 0x4d, 0x1e,
+ 0x4b, 0x4d, 0x93, 0x29, 0x83, 0xf8, 0xc1, 0x64, 0x4e, 0x88, 0x60, 0xaa, 0xe5, 0x44, 0xf1, 0x65,
+ 0xe2, 0x84, 0xf1, 0x1d, 0xe2, 0xb0, 0x7b, 0xe6, 0xb4, 0x0f, 0x4b, 0x81, 0xab, 0x6b, 0x65, 0x84,
+ 0xbb, 0x9a, 0x66, 0x86, 0xbb, 0xf9, 0xa3, 0x6d, 0x40, 0xec, 0x4e, 0x3b, 0x74, 0xfc, 0x88, 0x7f,
+ 0x8b, 0x27, 0x6c, 0xf4, 0xfd, 0xd5, 0x3a, 0x2b, 0x6a, 0x45, 0x57, 0xbb, 0xb8, 0xe1, 0x8c, 0x1a,
+ 0x34, 0xaf, 0x85, 0x81, 0xa2, 0x5e, 0x0b, 0x83, 0x39, 0xde, 0xfd, 0xbf, 0x62, 0xc1, 0x09, 0x3a,
+ 0x2c, 0xa6, 0x27, 0x78, 0x84, 0x02, 0x98, 0xa0, 0xd3, 0xae, 0x45, 0x62, 0x09, 0x13, 0xeb, 0x2b,
+ 0x47, 0xc5, 0x37, 0xf9, 0x24, 0x7a, 0xe4, 0x15, 0x93, 0x19, 0x4e, 0x73, 0xb7, 0xbf, 0x66, 0x01,
+ 0xf3, 0x9e, 0x3c, 0x86, 0xcd, 0xec, 0x92, 0xb9, 0x99, 0xd9, 0xf9, 0x12, 0xa3, 0xc7, 0x3e, 0xf6,
+ 0x3c, 0x4c, 0x52, 0x6c, 0x3d, 0x0c, 0xee, 0xef, 0x48, 0x8d, 0x3f, 0x5f, 0xbb, 0xfa, 0x95, 0x12,
+ 0x5f, 0x36, 0x2a, 0xf2, 0x14, 0x7d, 0xde, 0x82, 0xe1, 0xa6, 0xd3, 0x76, 0x9a, 0x3c, 0x73, 0x57,
+ 0x01, 0x33, 0x91, 0x51, 0x7e, 0x7e, 0x49, 0x94, 0xe5, 0x26, 0x8e, 0x8f, 0xca, 0x4f, 0x97, 0xe0,
+ 0x5c, 0xb3, 0x86, 0xaa, 0x7c, 0xf6, 0x2e, 0x8c, 0x19, 0xcc, 0x8e, 0xf4, 0x3c, 0xfc, 0x79, 0x8b,
+ 0x0b, 0x7d, 0x75, 0x66, 0xb9, 0x07, 0x53, 0xbe, 0xf6, 0x9f, 0x8a, 0x33, 0xa9, 0x50, 0xcf, 0x17,
+ 0x17, 0xeb, 0x4c, 0x0a, 0x6a, 0x9e, 0xa2, 0x29, 0x86, 0xb8, 0xbb, 0x0e, 0xfb, 0x37, 0x2c, 0x78,
+ 0x48, 0x27, 0xd4, 0x42, 0x85, 0xf3, 0x0c, 0xd8, 0x35, 0x18, 0x0e, 0xda, 0x24, 0x74, 0x92, 0xf3,
+ 0xd9, 0x59, 0xd9, 0xff, 0x37, 0x04, 0x7c, 0x7f, 0x77, 0x6e, 0x5a, 0xe7, 0x2e, 0xe1, 0x58, 0x95,
+ 0x44, 0x36, 0x0c, 0xb2, 0x7e, 0x89, 0x44, 0x90, 0x37, 0xcb, 0x64, 0xc5, 0x2e, 0xc8, 0x22, 0x2c,
+ 0x30, 0xf6, 0xdf, 0xb4, 0xf8, 0x74, 0xd3, 0x9b, 0x8e, 0x7e, 0x01, 0x26, 0xb7, 0xe8, 0x51, 0x6e,
+ 0xf9, 0x7e, 0x3b, 0xe4, 0xe6, 0x77, 0xd9, 0x63, 0x2f, 0x14, 0xef, 0x31, 0xed, 0x73, 0x17, 0x67,
+ 0x44, 0xeb, 0x27, 0xaf, 0xa5, 0xd8, 0xe2, 0xae, 0x8a, 0xec, 0x7f, 0x50, 0xe2, 0x6b, 0x96, 0xe9,
+ 0x70, 0x4f, 0xc1, 0x50, 0x3b, 0x70, 0x97, 0x56, 0x6b, 0x58, 0xf4, 0x95, 0x12, 0x3a, 0x75, 0x0e,
+ 0xc6, 0x12, 0x8f, 0x2e, 0x02, 0x90, 0xfb, 0x31, 0x09, 0x7d, 0xa7, 0xa5, 0xae, 0xf4, 0x95, 0xaa,
+ 0xb4, 0xac, 0x30, 0x58, 0xa3, 0xa2, 0x65, 0xda, 0x61, 0xb0, 0xed, 0xb9, 0x2c, 0xc6, 0xa5, 0x6c,
+ 0x96, 0xa9, 0x2b, 0x0c, 0xd6, 0xa8, 0xe8, 0x01, 0xba, 0xe3, 0x47, 0x7c, 0x1b, 0x73, 0xee, 0x88,
+ 0x2c, 0x4a, 0xc3, 0xc9, 0x01, 0xfa, 0xa6, 0x8e, 0xc4, 0x26, 0x2d, 0xba, 0x02, 0x83, 0xb1, 0xc3,
+ 0x2e, 0xaa, 0x07, 0x8a, 0x78, 0xfd, 0xac, 0x51, 0x5a, 0x3d, 0x6d, 0x15, 0x2d, 0x8a, 0x05, 0x0b,
+ 0xfb, 0x3f, 0x55, 0x01, 0x12, 0xad, 0x0b, 0x7d, 0xae, 0x7b, 0xc1, 0x7f, 0xac, 0xa8, 0xca, 0xf6,
+ 0xe0, 0x56, 0x3b, 0xfa, 0x92, 0x05, 0x23, 0x4e, 0xab, 0x15, 0x34, 0x9d, 0x98, 0x75, 0x4f, 0xa9,
+ 0xa8, 0xe8, 0x11, 0x2d, 0x59, 0x48, 0xca, 0xf2, 0xc6, 0x3c, 0x27, 0x2f, 0x8f, 0x35, 0x4c, 0x6e,
+ 0x7b, 0xf4, 0x26, 0xa0, 0x8f, 0x4a, 0xad, 0x9d, 0x8f, 0xf0, 0x6c, 0x5a, 0x6b, 0xaf, 0x32, 0x81,
+ 0xab, 0x29, 0xec, 0xe8, 0x2d, 0x23, 0xeb, 0x50, 0xa5, 0x48, 0xa0, 0xb2, 0xa1, 0x87, 0xe4, 0x25,
+ 0x1c, 0x42, 0xaf, 0xeb, 0xee, 0xf1, 0x03, 0x45, 0x32, 0x01, 0x68, 0xea, 0x70, 0x8e, 0x6b, 0x7c,
+ 0x0c, 0x13, 0xae, 0xb9, 0xf3, 0x0a, 0x17, 0xbf, 0x0b, 0xf9, 0x35, 0xa4, 0xb6, 0xec, 0x64, 0xaf,
+ 0x4d, 0x21, 0x70, 0xba, 0x0a, 0xf4, 0x3a, 0x0f, 0x5e, 0x58, 0xf5, 0xd7, 0x03, 0xe1, 0xe6, 0x77,
+ 0xae, 0xc0, 0x98, 0xef, 0x44, 0x31, 0xd9, 0xa2, 0x65, 0x92, 0xcd, 0xf5, 0xba, 0xe0, 0x82, 0x15,
+ 0x3f, 0xb4, 0x06, 0x83, 0x2c, 0x2e, 0x2d, 0x9a, 0x19, 0x2e, 0x62, 0x12, 0x34, 0xc3, 0xb1, 0x93,
+ 0xf5, 0xc3, 0xfe, 0x46, 0x58, 0xf0, 0x42, 0x97, 0x65, 0x42, 0x86, 0x68, 0xd5, 0xbf, 0x19, 0x11,
+ 0x96, 0x90, 0xa1, 0xba, 0xf8, 0x91, 0x24, 0xc3, 0x02, 0x87, 0x67, 0xa6, 0x6a, 0x34, 0x4a, 0x52,
+ 0xc5, 0x46, 0xfc, 0x97, 0x19, 0x20, 0x67, 0xa0, 0x48, 0x43, 0xcd, 0x7c, 0x91, 0x49, 0x67, 0xdf,
+ 0x32, 0x99, 0xe1, 0x34, 0xf7, 0x63, 0xdd, 0x52, 0x67, 0x7d, 0x98, 0x4c, 0x2f, 0xca, 0x23, 0xdd,
+ 0xc2, 0x7f, 0x5c, 0x81, 0x71, 0x73, 0x72, 0xa0, 0xf3, 0x50, 0x15, 0x4c, 0x54, 0x7a, 0x37, 0xb5,
+ 0x06, 0xae, 0x49, 0x04, 0x4e, 0x68, 0x58, 0xa2, 0x3b, 0x56, 0x5c, 0x73, 0xf0, 0x4a, 0x12, 0xdd,
+ 0x29, 0x0c, 0xd6, 0xa8, 0xa8, 0x26, 0x7c, 0x27, 0x08, 0x62, 0xb5, 0x13, 0xa8, 0x79, 0xb3, 0xc8,
+ 0xa0, 0x58, 0x60, 0xe9, 0x0e, 0x70, 0x97, 0x0e, 0x66, 0xcb, 0x34, 0x6f, 0xaa, 0x1d, 0xe0, 0x8a,
+ 0x8e, 0xc4, 0x26, 0x2d, 0xdd, 0xd1, 0x82, 0x88, 0x4d, 0x44, 0xa1, 0x6f, 0x27, 0x0e, 0x73, 0x0d,
+ 0x1e, 0xab, 0x29, 0xf1, 0xe8, 0xd3, 0xf0, 0x90, 0x0a, 0xad, 0xc4, 0xdc, 0x5c, 0x2c, 0x6b, 0x1c,
+ 0x34, 0x8e, 0xcc, 0x0f, 0x2d, 0x65, 0x93, 0xe1, 0x5e, 0xe5, 0xd1, 0x2b, 0x30, 0x2e, 0x74, 0x65,
+ 0xc9, 0x71, 0xc8, 0xf4, 0x7b, 0xb8, 0x62, 0x60, 0x71, 0x8a, 0x1a, 0xd5, 0x60, 0x92, 0x42, 0x98,
+ 0x92, 0x2a, 0x39, 0xf0, 0x10, 0x51, 0xb5, 0xd5, 0x5f, 0x49, 0xe1, 0x71, 0x57, 0x09, 0xb4, 0x00,
+ 0x13, 0x5c, 0x59, 0xa1, 0x07, 0x43, 0x36, 0x0e, 0xc2, 0x37, 0x57, 0x2d, 0x84, 0x1b, 0x26, 0x1a,
+ 0xa7, 0xe9, 0xd1, 0x4b, 0x30, 0xea, 0x84, 0xcd, 0x4d, 0x2f, 0x26, 0xcd, 0xb8, 0x13, 0xf2, 0x74,
+ 0x27, 0x9a, 0xe3, 0xc8, 0x82, 0x86, 0xc3, 0x06, 0xa5, 0xfd, 0x1e, 0x9c, 0xc8, 0x08, 0x04, 0xa0,
+ 0x13, 0xc7, 0x69, 0x7b, 0xf2, 0x9b, 0x52, 0xae, 0x6f, 0x0b, 0xf5, 0x55, 0xf9, 0x35, 0x1a, 0x15,
+ 0x9d, 0x9d, 0xcc, 0x4e, 0xae, 0x25, 0x6c, 0x55, 0xb3, 0x73, 0x45, 0x22, 0x70, 0x42, 0x63, 0xff,
+ 0x29, 0x80, 0x66, 0xbd, 0x29, 0xe0, 0xee, 0xf4, 0x12, 0x8c, 0xca, 0x1c, 0xc4, 0x5a, 0x22, 0x4f,
+ 0xf5, 0x99, 0x97, 0x34, 0x1c, 0x36, 0x28, 0x69, 0xdb, 0x7c, 0x69, 0x93, 0x4a, 0x3b, 0xda, 0x29,
+ 0x63, 0x15, 0x4e, 0x68, 0xd0, 0x39, 0x18, 0x8e, 0x48, 0x6b, 0xfd, 0xaa, 0xe7, 0xdf, 0x15, 0x13,
+ 0x5b, 0x49, 0xe6, 0x86, 0x80, 0x63, 0x45, 0x81, 0x16, 0xa1, 0xdc, 0xf1, 0x5c, 0x31, 0x95, 0xa5,
+ 0xda, 0x50, 0xbe, 0xb9, 0x5a, 0xdb, 0xdf, 0x9d, 0x7b, 0xac, 0x57, 0x6a, 0x65, 0x7a, 0x3e, 0x8f,
+ 0xe6, 0xe9, 0xf2, 0xa3, 0x85, 0xb3, 0x2e, 0x0c, 0x06, 0xfb, 0xbc, 0x30, 0xb8, 0x08, 0x20, 0xbe,
+ 0x5a, 0xce, 0xe5, 0x72, 0x32, 0x6a, 0x97, 0x14, 0x06, 0x6b, 0x54, 0xf4, 0x94, 0xdf, 0x0c, 0x89,
+ 0x23, 0x0f, 0xc2, 0xdc, 0x41, 0x7d, 0xf8, 0xf0, 0xa7, 0xfc, 0xa5, 0x34, 0x33, 0xdc, 0xcd, 0x1f,
+ 0x05, 0x30, 0xe5, 0x8a, 0xf8, 0xdd, 0xa4, 0xd2, 0x6a, 0xff, 0x5e, 0xf1, 0xcc, 0xb7, 0x27, 0xcd,
+ 0x08, 0x77, 0xf3, 0x46, 0x6f, 0xc2, 0xac, 0x04, 0x76, 0x07, 0x4f, 0xb3, 0xe5, 0x52, 0x5e, 0x3c,
+ 0xbd, 0xb7, 0x3b, 0x37, 0x5b, 0xeb, 0x49, 0x85, 0x0f, 0xe0, 0x80, 0xde, 0x80, 0x41, 0x76, 0xc1,
+ 0x14, 0xcd, 0x8c, 0xb0, 0x1d, 0xef, 0xf9, 0x22, 0xb1, 0x15, 0x74, 0xd6, 0xcf, 0xb3, 0x6b, 0x2a,
+ 0xe1, 0x35, 0x9c, 0xdc, 0xda, 0x31, 0x20, 0x16, 0x3c, 0x51, 0x1b, 0x46, 0x1c, 0xdf, 0x0f, 0x62,
+ 0x87, 0x2b, 0x62, 0xa3, 0x45, 0x74, 0x49, 0xad, 0x8a, 0x85, 0xa4, 0x2c, 0xaf, 0x47, 0x39, 0x22,
+ 0x6a, 0x18, 0xac, 0x57, 0x81, 0xee, 0xc1, 0x44, 0x70, 0x8f, 0x0a, 0x4c, 0x79, 0x23, 0x12, 0xcd,
+ 0x8c, 0x99, 0x1f, 0x96, 0x63, 0xa8, 0x35, 0x0a, 0x6b, 0x92, 0xcc, 0x64, 0x8a, 0xd3, 0xb5, 0xa0,
+ 0x79, 0xc3, 0x5c, 0x3d, 0x9e, 0xf8, 0xc6, 0x27, 0xe6, 0x6a, 0xdd, 0x3a, 0xcd, 0x02, 0xf4, 0xb9,
+ 0x3f, 0x2c, 0x93, 0x08, 0x13, 0xa9, 0x00, 0xfd, 0x04, 0x85, 0x75, 0x3a, 0xb4, 0x09, 0xa3, 0xc9,
+ 0xdd, 0x56, 0x18, 0xb1, 0xdc, 0x3f, 0x9a, 0xbb, 0xd7, 0xc1, 0x1f, 0xb7, 0xaa, 0x95, 0xe4, 0x91,
+ 0x3e, 0x3a, 0x04, 0x1b, 0x9c, 0x67, 0x3f, 0x0e, 0x23, 0xda, 0x10, 0xf7, 0xe3, 0xee, 0x3d, 0xfb,
+ 0x0a, 0x4c, 0xa6, 0x87, 0xae, 0x2f, 0x77, 0xf1, 0xff, 0x51, 0x82, 0x89, 0x8c, 0x8b, 0x2d, 0x96,
+ 0x89, 0x39, 0x25, 0x64, 0x93, 0xc4, 0xcb, 0xa6, 0xa8, 0x2c, 0x15, 0x10, 0x95, 0x52, 0x6e, 0x97,
+ 0x7b, 0xca, 0x6d, 0x21, 0x1e, 0x2b, 0xef, 0x47, 0x3c, 0x9a, 0x3b, 0xd2, 0x40, 0xa1, 0x1d, 0xe9,
+ 0x01, 0x88, 0x54, 0x63, 0x53, 0x1b, 0x2a, 0xb0, 0xa9, 0x7d, 0xb5, 0x04, 0x93, 0x89, 0x6b, 0xbc,
+ 0x48, 0x81, 0x7e, 0xf4, 0x17, 0x1e, 0x6b, 0xc6, 0x85, 0x47, 0x5e, 0x86, 0xf3, 0x54, 0xfb, 0x7a,
+ 0x5e, 0x7e, 0xbc, 0x91, 0xba, 0xfc, 0x78, 0xbe, 0x4f, 0xbe, 0x07, 0x5f, 0x84, 0x7c, 0xab, 0x04,
+ 0x27, 0xd3, 0x45, 0x96, 0x5a, 0x8e, 0xb7, 0x75, 0x0c, 0xfd, 0xf5, 0x69, 0xa3, 0xbf, 0x5e, 0xec,
+ 0xef, 0xbb, 0x58, 0x23, 0x7b, 0x76, 0x9a, 0x93, 0xea, 0xb4, 0x8f, 0x1f, 0x86, 0xf9, 0xc1, 0x3d,
+ 0xf7, 0x47, 0x16, 0x3c, 0x9c, 0x59, 0xee, 0x18, 0x4c, 0xbc, 0xaf, 0x99, 0x26, 0xde, 0xe7, 0x0e,
+ 0xf1, 0x75, 0x3d, 0x6c, 0xbe, 0xbf, 0x59, 0xee, 0xf1, 0x55, 0xcc, 0x08, 0x76, 0x03, 0x46, 0x9c,
+ 0x66, 0x93, 0x44, 0xd1, 0xb5, 0xc0, 0x55, 0x49, 0xc5, 0x9e, 0x65, 0xbb, 0x58, 0x02, 0xde, 0xdf,
+ 0x9d, 0x9b, 0x4d, 0xb3, 0x48, 0xd0, 0x58, 0xe7, 0x60, 0xa6, 0x3b, 0x2c, 0x1d, 0x51, 0xba, 0xc3,
+ 0x8b, 0x00, 0xdb, 0xea, 0xbc, 0x9c, 0xb6, 0xad, 0x69, 0x27, 0x69, 0x8d, 0x0a, 0xfd, 0x15, 0xa6,
+ 0x7b, 0x72, 0xbf, 0x94, 0x8a, 0x19, 0x65, 0x9b, 0x33, 0x7e, 0xba, 0x8f, 0x0b, 0x0f, 0xe6, 0x55,
+ 0x76, 0x48, 0xc5, 0x12, 0x7d, 0x0a, 0x26, 0x23, 0x9e, 0x8f, 0x62, 0xa9, 0xe5, 0x44, 0x2c, 0x26,
+ 0x44, 0xc8, 0x53, 0x16, 0x97, 0xdb, 0x48, 0xe1, 0x70, 0x17, 0xb5, 0xfd, 0xcd, 0x32, 0x7c, 0xf8,
+ 0x80, 0x69, 0x8b, 0x16, 0xcc, 0xfb, 0xe1, 0x67, 0xd2, 0x96, 0xa6, 0xd9, 0xcc, 0xc2, 0x86, 0xe9,
+ 0x29, 0x35, 0xda, 0xa5, 0xf7, 0x3d, 0xda, 0x5f, 0xd6, 0xed, 0x82, 0xdc, 0x55, 0xf5, 0xd2, 0xa1,
+ 0x17, 0xe6, 0x4f, 0xea, 0xb5, 0xc0, 0x67, 0x2d, 0x78, 0x2c, 0xf3, 0xb3, 0x0c, 0x7f, 0x94, 0xf3,
+ 0x50, 0x6d, 0x52, 0xa0, 0x16, 0xc1, 0x95, 0x84, 0x4e, 0x4a, 0x04, 0x4e, 0x68, 0x0c, 0xb7, 0x93,
+ 0x52, 0xae, 0xdb, 0xc9, 0x1f, 0x58, 0x30, 0x9d, 0x6e, 0xc4, 0x31, 0xc8, 0xad, 0x86, 0x29, 0xb7,
+ 0xe6, 0xfb, 0x1b, 0xfc, 0x1e, 0x22, 0xeb, 0xab, 0x93, 0x70, 0xaa, 0x6b, 0xd7, 0xe3, 0xbd, 0xf8,
+ 0x4b, 0x16, 0x4c, 0x6d, 0xb0, 0x73, 0x82, 0x16, 0x26, 0x27, 0xbe, 0x2b, 0x27, 0xb6, 0xf0, 0xc0,
+ 0xe8, 0x3a, 0x7e, 0xea, 0xe9, 0x22, 0xc1, 0xdd, 0x95, 0xa1, 0x2f, 0x5a, 0x30, 0xed, 0xdc, 0x8b,
+ 0xba, 0x1e, 0xe8, 0x11, 0x13, 0xe9, 0x95, 0x1c, 0xb3, 0x5c, 0xce, 0xd3, 0x3e, 0x8b, 0x33, 0x7b,
+ 0xbb, 0x73, 0xd3, 0x59, 0x54, 0x38, 0xb3, 0x56, 0x3a, 0xbe, 0x9b, 0x22, 0x5c, 0xa6, 0x58, 0xc0,
+ 0x67, 0x56, 0x70, 0x0d, 0x17, 0x6b, 0x12, 0x83, 0x15, 0x47, 0xf4, 0x36, 0x54, 0x37, 0x64, 0x64,
+ 0x5c, 0x5a, 0x6c, 0xf6, 0xe8, 0xe6, 0xac, 0x40, 0x3a, 0x1e, 0xae, 0xa0, 0x50, 0x38, 0x61, 0x8a,
+ 0x2e, 0x43, 0xd9, 0x5f, 0x8f, 0x44, 0x0c, 0x7a, 0x9e, 0xb7, 0x91, 0xe9, 0xe3, 0xc5, 0xc3, 0x76,
+ 0xaf, 0xaf, 0x34, 0x30, 0x65, 0x41, 0x39, 0x85, 0x77, 0x5c, 0x61, 0x8f, 0xce, 0xe1, 0x84, 0x17,
+ 0x6b, 0xdd, 0x9c, 0xf0, 0x62, 0x0d, 0x53, 0x16, 0xa8, 0x0e, 0x03, 0x2c, 0x18, 0x47, 0x18, 0x9b,
+ 0x73, 0x12, 0x15, 0x74, 0x85, 0x1c, 0xf1, 0xac, 0x9c, 0x0c, 0x8c, 0x39, 0x23, 0xb4, 0x06, 0x83,
+ 0x4d, 0xf6, 0xb0, 0x84, 0xb0, 0x02, 0xe4, 0xa5, 0xf0, 0xe8, 0x7a, 0x84, 0x82, 0xdf, 0xb0, 0x71,
+ 0x38, 0x16, 0xbc, 0x18, 0x57, 0xd2, 0xde, 0x5c, 0x8f, 0xc4, 0x31, 0x3f, 0x8f, 0x6b, 0xd7, 0x13,
+ 0x21, 0x82, 0x2b, 0x83, 0x63, 0xc1, 0x0b, 0xd5, 0xa0, 0xb4, 0xde, 0x14, 0xb1, 0x3a, 0x39, 0x46,
+ 0x66, 0x33, 0x06, 0x7b, 0x71, 0x70, 0x6f, 0x77, 0xae, 0xb4, 0xb2, 0x84, 0x4b, 0xeb, 0x4d, 0xf4,
+ 0x1a, 0x0c, 0xad, 0xf3, 0xa8, 0x5a, 0x91, 0xc8, 0xf7, 0x42, 0x5e, 0xe8, 0x6f, 0x57, 0x08, 0x2e,
+ 0x0f, 0x49, 0x11, 0x08, 0x2c, 0xd9, 0xb1, 0x1c, 0x87, 0x2a, 0x4e, 0x58, 0x64, 0xf2, 0x9d, 0xef,
+ 0x2f, 0xae, 0x58, 0x9c, 0x7e, 0x15, 0x14, 0x6b, 0x1c, 0xe9, 0x9c, 0x77, 0xe4, 0x1b, 0x39, 0x2c,
+ 0x8b, 0x6f, 0xee, 0x9c, 0xcf, 0x7c, 0x52, 0x87, 0xcf, 0x79, 0x85, 0xc2, 0x09, 0x53, 0xd4, 0x81,
+ 0xb1, 0xed, 0xa8, 0xbd, 0x49, 0xe4, 0xd2, 0x67, 0xa9, 0x7d, 0x47, 0x2e, 0x7e, 0x32, 0x27, 0x5f,
+ 0xb3, 0x28, 0xe2, 0x85, 0x71, 0xc7, 0x69, 0x75, 0x49, 0x30, 0x96, 0x54, 0xee, 0x96, 0xce, 0x16,
+ 0x9b, 0xb5, 0xd0, 0x21, 0x79, 0xb7, 0x13, 0xdc, 0xd9, 0x89, 0x89, 0x48, 0xfd, 0x9b, 0x33, 0x24,
+ 0xaf, 0x72, 0xe2, 0xee, 0x21, 0x11, 0x08, 0x2c, 0xd9, 0xa9, 0x2e, 0x63, 0xd2, 0x78, 0xb2, 0x70,
+ 0x97, 0x75, 0x7d, 0x43, 0xd2, 0x65, 0x4c, 0xfa, 0x26, 0x4c, 0x99, 0xd4, 0x6d, 0x6f, 0x06, 0x71,
+ 0xe0, 0xa7, 0x64, 0xff, 0x54, 0x11, 0xa9, 0x5b, 0xcf, 0x28, 0xd9, 0x2d, 0x75, 0xb3, 0xa8, 0x70,
+ 0x66, 0xad, 0xc8, 0x87, 0xf1, 0x76, 0x10, 0xc6, 0xf7, 0x82, 0x50, 0xce, 0x43, 0x54, 0xe8, 0x8c,
+ 0x68, 0x94, 0x11, 0x75, 0x33, 0xcf, 0x63, 0x13, 0x83, 0x53, 0xdc, 0xe9, 0xd0, 0x45, 0x4d, 0xa7,
+ 0x45, 0x56, 0x6f, 0xcc, 0x9c, 0x28, 0x32, 0x74, 0x0d, 0x4e, 0xdc, 0x3d, 0x74, 0x02, 0x81, 0x25,
+ 0x3b, 0x2a, 0xeb, 0x58, 0x1e, 0x7b, 0x96, 0xc9, 0x38, 0x57, 0xd6, 0x75, 0x79, 0xe7, 0x72, 0x59,
+ 0xc7, 0xc0, 0x98, 0x33, 0x42, 0xef, 0x40, 0x55, 0x28, 0xb7, 0x41, 0x34, 0x73, 0x92, 0x71, 0xfd,
+ 0xd9, 0x9c, 0xd6, 0x72, 0xf2, 0x1b, 0x8d, 0xec, 0x5d, 0x5f, 0x44, 0xff, 0x49, 0x22, 0x9c, 0xb0,
+ 0xb7, 0x7f, 0x63, 0xb0, 0x5b, 0xed, 0x61, 0x07, 0x9b, 0xbf, 0xd1, 0x7d, 0x63, 0xfd, 0xa9, 0xfe,
+ 0xcf, 0xef, 0x0f, 0xf0, 0xee, 0xfa, 0x8b, 0x16, 0x9c, 0x6a, 0x67, 0x7e, 0x9e, 0x50, 0x1c, 0xfa,
+ 0x35, 0x03, 0xf0, 0xae, 0x51, 0xf9, 0xc5, 0xb3, 0xf1, 0xb8, 0x47, 0x9d, 0xe9, 0xa3, 0x40, 0xf9,
+ 0x7d, 0x1f, 0x05, 0x6e, 0xc3, 0x30, 0xd3, 0x5d, 0x93, 0xfc, 0x3e, 0x7d, 0xa6, 0xc2, 0x61, 0x2a,
+ 0xc8, 0x92, 0x60, 0x81, 0x15, 0x33, 0xda, 0x71, 0x8f, 0xa6, 0x3f, 0x02, 0x13, 0x86, 0x16, 0x59,
+ 0x2d, 0xf9, 0x39, 0x6b, 0x45, 0xf4, 0xc4, 0xa3, 0xf5, 0x83, 0x88, 0xf7, 0xf3, 0x08, 0xf0, 0xc1,
+ 0x95, 0xa1, 0x5a, 0xc6, 0x41, 0x6f, 0xd0, 0xbc, 0x9e, 0xca, 0x3f, 0xec, 0x1d, 0xef, 0x01, 0xe5,
+ 0x1f, 0x5a, 0x19, 0xfa, 0x34, 0x3f, 0x54, 0x7e, 0xd2, 0x3c, 0x54, 0x3e, 0x99, 0x3e, 0x54, 0x76,
+ 0x99, 0x92, 0x8c, 0xf3, 0x64, 0xf1, 0xac, 0xbc, 0x45, 0x13, 0x18, 0xd9, 0x2d, 0x38, 0x93, 0x27,
+ 0xac, 0x99, 0xcb, 0x9a, 0xab, 0x2e, 0x6b, 0x13, 0x97, 0x35, 0x77, 0xb5, 0x86, 0x19, 0xa6, 0x68,
+ 0x0e, 0x0c, 0xfb, 0x97, 0x4b, 0x50, 0xae, 0x07, 0xee, 0x31, 0x98, 0xc6, 0x2e, 0x19, 0xa6, 0xb1,
+ 0x27, 0x72, 0x1f, 0x89, 0xec, 0x69, 0x08, 0xbb, 0x91, 0x32, 0x84, 0xfd, 0x4c, 0x3e, 0xab, 0x83,
+ 0xcd, 0x5e, 0xdf, 0x2e, 0x83, 0xfe, 0xcc, 0x25, 0xfa, 0x0f, 0x87, 0xf1, 0x64, 0x2e, 0x17, 0x7b,
+ 0xf9, 0x52, 0xd4, 0xc1, 0x3c, 0xde, 0x64, 0x20, 0xe6, 0x4f, 0xac, 0x43, 0xf3, 0x6d, 0xe2, 0x6d,
+ 0x6c, 0xc6, 0xc4, 0x4d, 0x7f, 0xd8, 0xf1, 0x39, 0x34, 0xff, 0x85, 0x05, 0x13, 0xa9, 0xda, 0x51,
+ 0x2b, 0x2b, 0x82, 0xeb, 0x90, 0xc6, 0xae, 0xa9, 0xdc, 0x90, 0xaf, 0x79, 0x00, 0x75, 0x67, 0x21,
+ 0x0d, 0x4a, 0x4c, 0xb7, 0x56, 0x97, 0x1a, 0x11, 0xd6, 0x28, 0xd0, 0x0b, 0x30, 0x12, 0x07, 0xed,
+ 0xa0, 0x15, 0x6c, 0xec, 0x5c, 0x21, 0x32, 0x3b, 0x8b, 0xba, 0x59, 0x5a, 0x4b, 0x50, 0x58, 0xa7,
+ 0xb3, 0xbf, 0x53, 0x86, 0xf4, 0x23, 0xa9, 0xff, 0x7f, 0x9e, 0xfe, 0xe4, 0xcc, 0xd3, 0x3f, 0xb6,
+ 0x60, 0x92, 0xd6, 0xce, 0x5c, 0x8c, 0xa4, 0xe3, 0xb1, 0x7a, 0x22, 0xc4, 0x3a, 0xe0, 0x89, 0x90,
+ 0x27, 0xa9, 0xb4, 0x73, 0x83, 0x4e, 0x2c, 0x4c, 0x60, 0x9a, 0x10, 0xa3, 0x50, 0x2c, 0xb0, 0x82,
+ 0x8e, 0x84, 0xa1, 0x88, 0xd0, 0xd2, 0xe9, 0x48, 0x18, 0x62, 0x81, 0x95, 0x2f, 0x88, 0x54, 0x7a,
+ 0xbc, 0x20, 0xc2, 0xf2, 0x9b, 0x09, 0xb7, 0x16, 0xa1, 0x56, 0x68, 0xf9, 0xcd, 0xa4, 0xbf, 0x4b,
+ 0x42, 0x63, 0x7f, 0xbd, 0x0c, 0xa3, 0xf5, 0xc0, 0x4d, 0x22, 0x0a, 0x9e, 0x37, 0x22, 0x0a, 0xce,
+ 0xa4, 0x22, 0x0a, 0x26, 0x75, 0xda, 0x07, 0x13, 0x50, 0x20, 0xf2, 0xe0, 0xb1, 0x37, 0x6e, 0x0e,
+ 0x19, 0x4c, 0x60, 0xe4, 0xc1, 0x53, 0x8c, 0xb0, 0xc9, 0xf7, 0xa7, 0x29, 0x88, 0xe0, 0x7f, 0x5b,
+ 0x30, 0x5e, 0x0f, 0x5c, 0x3a, 0x41, 0x7f, 0x9a, 0x66, 0xa3, 0x9e, 0x3d, 0x6f, 0xf0, 0x80, 0xec,
+ 0x79, 0xff, 0xcc, 0x82, 0xa1, 0x7a, 0xe0, 0x1e, 0x83, 0x79, 0x78, 0xc5, 0x34, 0x0f, 0x3f, 0x96,
+ 0x2b, 0x79, 0x7b, 0x58, 0x84, 0xbf, 0x59, 0x86, 0x31, 0xda, 0xe2, 0x60, 0x43, 0x8e, 0x97, 0xd1,
+ 0x37, 0x56, 0x81, 0xbe, 0xa1, 0x2a, 0x61, 0xd0, 0x6a, 0x05, 0xf7, 0xd2, 0x63, 0xb7, 0xc2, 0xa0,
+ 0x58, 0x60, 0xd1, 0x39, 0x18, 0x6e, 0x87, 0x64, 0xdb, 0x0b, 0x3a, 0x51, 0x3a, 0xda, 0xb3, 0x2e,
+ 0xe0, 0x58, 0x51, 0xa0, 0xe7, 0x61, 0x34, 0xf2, 0xfc, 0x26, 0x91, 0x4e, 0x2f, 0x15, 0xe6, 0xf4,
+ 0xc2, 0x13, 0x95, 0x6a, 0x70, 0x6c, 0x50, 0xa1, 0xdb, 0x50, 0x65, 0xff, 0xd9, 0x0a, 0xea, 0xff,
+ 0x09, 0x10, 0x91, 0x9f, 0x5c, 0x30, 0xc0, 0x09, 0x2f, 0x74, 0x11, 0x20, 0x96, 0xee, 0x39, 0x91,
+ 0x08, 0x4b, 0x56, 0x7a, 0xa9, 0x72, 0xdc, 0x89, 0xb0, 0x46, 0x85, 0x9e, 0x81, 0x6a, 0xec, 0x78,
+ 0xad, 0xab, 0x9e, 0x4f, 0x22, 0xe1, 0xde, 0x24, 0x92, 0x8e, 0x0b, 0x20, 0x4e, 0xf0, 0x74, 0xbf,
+ 0x67, 0x41, 0xef, 0xfc, 0x79, 0xa1, 0x61, 0x46, 0xcd, 0xf6, 0xfb, 0xab, 0x0a, 0x8a, 0x35, 0x0a,
+ 0xfb, 0x25, 0x38, 0x59, 0x0f, 0xdc, 0x7a, 0x10, 0xc6, 0x2b, 0x41, 0x78, 0xcf, 0x09, 0x5d, 0x39,
+ 0x7e, 0x73, 0x32, 0xd7, 0x35, 0xdd, 0x93, 0x07, 0xb8, 0x15, 0xc1, 0xc8, 0x5d, 0xfd, 0x1c, 0xdb,
+ 0xf1, 0xfb, 0x0c, 0x55, 0xf9, 0x41, 0x09, 0x50, 0x9d, 0x39, 0x10, 0x19, 0xaf, 0x51, 0x6d, 0xc2,
+ 0x78, 0x44, 0xae, 0x7a, 0x7e, 0xe7, 0xbe, 0x60, 0x55, 0x2c, 0x36, 0xa8, 0xb1, 0xac, 0x97, 0xe1,
+ 0x76, 0x1a, 0x13, 0x86, 0x53, 0x7c, 0x69, 0x67, 0x86, 0x1d, 0x7f, 0x21, 0xba, 0x19, 0x91, 0x50,
+ 0xbc, 0xbe, 0xc4, 0x3a, 0x13, 0x4b, 0x20, 0x4e, 0xf0, 0x74, 0xf2, 0xb0, 0x3f, 0xd7, 0x03, 0x1f,
+ 0x07, 0x41, 0x2c, 0xa7, 0x1b, 0x7b, 0x8d, 0x43, 0x83, 0x63, 0x83, 0x0a, 0xad, 0x00, 0x8a, 0x3a,
+ 0xed, 0x76, 0x8b, 0xdd, 0x94, 0x3a, 0xad, 0x4b, 0x61, 0xd0, 0x69, 0x73, 0x3f, 0x72, 0xf1, 0x90,
+ 0x45, 0xa3, 0x0b, 0x8b, 0x33, 0x4a, 0x50, 0x61, 0xb1, 0x1e, 0xb1, 0xdf, 0x22, 0x02, 0x9e, 0x5b,
+ 0x5b, 0x1b, 0x0c, 0x84, 0x25, 0xce, 0xfe, 0x45, 0xb6, 0xc1, 0xb1, 0x67, 0x71, 0xe2, 0x4e, 0x48,
+ 0xd0, 0x16, 0x8c, 0xb5, 0xd9, 0x26, 0x16, 0x87, 0x41, 0xab, 0x45, 0xa4, 0x7e, 0x79, 0x38, 0x17,
+ 0x26, 0xfe, 0x10, 0x86, 0xce, 0x0e, 0x9b, 0xdc, 0xed, 0xff, 0x36, 0xce, 0x64, 0x95, 0xb8, 0xac,
+ 0x1e, 0x12, 0xce, 0xca, 0x42, 0x93, 0xfb, 0x48, 0x91, 0x07, 0xee, 0x92, 0x7d, 0x40, 0xb8, 0x3e,
+ 0x63, 0xc9, 0x05, 0x7d, 0x86, 0xb9, 0xe2, 0x73, 0x01, 0x51, 0xfc, 0xd9, 0x4e, 0x4e, 0x6f, 0xb8,
+ 0xe1, 0x0b, 0x16, 0x58, 0x63, 0x87, 0xae, 0xc2, 0x98, 0x78, 0x45, 0x45, 0x98, 0x29, 0xca, 0xc6,
+ 0x11, 0x7b, 0x0c, 0xeb, 0xc8, 0xfd, 0x34, 0x00, 0x9b, 0x85, 0xd1, 0x06, 0x3c, 0xaa, 0xbd, 0x12,
+ 0x96, 0xe1, 0x6e, 0xc7, 0x25, 0xcf, 0x63, 0x7b, 0xbb, 0x73, 0x8f, 0xae, 0x1d, 0x44, 0x88, 0x0f,
+ 0xe6, 0x83, 0x6e, 0xc0, 0x49, 0xa7, 0x19, 0x7b, 0xdb, 0xa4, 0x46, 0x1c, 0xb7, 0xe5, 0xf9, 0xc4,
+ 0x4c, 0x93, 0xf0, 0xf0, 0xde, 0xee, 0xdc, 0xc9, 0x85, 0x2c, 0x02, 0x9c, 0x5d, 0x0e, 0x7d, 0x12,
+ 0xaa, 0xae, 0x1f, 0x89, 0x3e, 0x18, 0x34, 0x1e, 0xc5, 0xab, 0xd6, 0xae, 0x37, 0xd4, 0xf7, 0x27,
+ 0x7f, 0x70, 0x52, 0x00, 0xbd, 0x0b, 0xa3, 0x7a, 0xf8, 0x93, 0x78, 0x8c, 0xf1, 0xc5, 0x42, 0xe7,
+ 0x67, 0x23, 0x66, 0x88, 0x5b, 0xf0, 0x94, 0x5b, 0xab, 0x11, 0x4e, 0x64, 0x54, 0x81, 0x7e, 0x1e,
+ 0x50, 0x44, 0xc2, 0x6d, 0xaf, 0x49, 0x16, 0x9a, 0x2c, 0xbb, 0x2f, 0xb3, 0xf1, 0x0c, 0x1b, 0xf1,
+ 0x1d, 0xa8, 0xd1, 0x45, 0x81, 0x33, 0x4a, 0xa1, 0xcb, 0x54, 0xf2, 0xe8, 0x50, 0xe1, 0x85, 0x2c,
+ 0x15, 0xc3, 0x99, 0x1a, 0x69, 0x87, 0xa4, 0xe9, 0xc4, 0xc4, 0x35, 0x39, 0xe2, 0x54, 0x39, 0xba,
+ 0x2f, 0xa9, 0x07, 0x1c, 0xc0, 0xf4, 0x9d, 0xed, 0x7e, 0xc4, 0x81, 0x9e, 0xb3, 0x36, 0x83, 0x28,
+ 0xbe, 0x4e, 0xe2, 0x7b, 0x41, 0x78, 0x57, 0x64, 0x44, 0x4b, 0x52, 0x25, 0x26, 0x28, 0xac, 0xd3,
+ 0x51, 0x1d, 0x8a, 0x5d, 0xfd, 0xad, 0xd6, 0xd8, 0xbd, 0xca, 0x70, 0xb2, 0x76, 0x2e, 0x73, 0x30,
+ 0x96, 0x78, 0x49, 0xba, 0x5a, 0x5f, 0x62, 0x77, 0x24, 0x29, 0xd2, 0xd5, 0xfa, 0x12, 0x96, 0x78,
+ 0x14, 0x74, 0x3f, 0x3d, 0x38, 0x5e, 0xe4, 0xbe, 0xaa, 0x5b, 0x92, 0x17, 0x7c, 0x7d, 0xf0, 0x3e,
+ 0x4c, 0xaa, 0xe7, 0x0f, 0x79, 0xd2, 0xb8, 0x68, 0x66, 0x82, 0x4d, 0x9c, 0xc3, 0xe4, 0x9e, 0x53,
+ 0x76, 0xbd, 0xd5, 0x14, 0x4f, 0xdc, 0x55, 0x8b, 0x91, 0x9c, 0x63, 0x32, 0xf7, 0x51, 0x8e, 0xf3,
+ 0x50, 0x8d, 0x3a, 0x77, 0xdc, 0x60, 0xcb, 0xf1, 0x7c, 0x76, 0x91, 0xa1, 0x29, 0x31, 0x0d, 0x89,
+ 0xc0, 0x09, 0x0d, 0xaa, 0xc3, 0xb0, 0x23, 0x8e, 0x70, 0xe2, 0xc2, 0x21, 0x27, 0x0a, 0x5f, 0x1e,
+ 0xf8, 0xb8, 0x75, 0x55, 0xfe, 0xc3, 0x8a, 0x0b, 0x7a, 0x19, 0xc6, 0x44, 0x10, 0x99, 0x70, 0xf6,
+ 0x3c, 0x61, 0x06, 0x1c, 0x34, 0x74, 0x24, 0x36, 0x69, 0xd1, 0x06, 0x8c, 0x53, 0x2e, 0x89, 0x00,
+ 0x9c, 0x99, 0xee, 0x4f, 0x86, 0x6a, 0xe9, 0xcf, 0x75, 0x36, 0x38, 0xc5, 0x16, 0xb9, 0xf0, 0x88,
+ 0xd3, 0x89, 0x83, 0x2d, 0xba, 0x12, 0xcc, 0x75, 0xb2, 0x16, 0xdc, 0x25, 0x3e, 0xbb, 0x65, 0x18,
+ 0x5e, 0x3c, 0xb3, 0xb7, 0x3b, 0xf7, 0xc8, 0xc2, 0x01, 0x74, 0xf8, 0x40, 0x2e, 0xe8, 0x2d, 0x18,
+ 0x89, 0x83, 0x96, 0xf0, 0xe1, 0x8e, 0x66, 0x4e, 0x15, 0x49, 0x42, 0xb4, 0xa6, 0x0a, 0xe8, 0x66,
+ 0x0c, 0xc5, 0x04, 0xeb, 0x1c, 0xd1, 0x9b, 0x7c, 0x55, 0xb2, 0x84, 0x99, 0x24, 0x9a, 0x79, 0xa8,
+ 0x48, 0x67, 0xa9, 0x0c, 0x9b, 0xe6, 0xf2, 0x15, 0x3c, 0xb0, 0xce, 0x70, 0xf6, 0xe7, 0x60, 0xaa,
+ 0x4b, 0xe4, 0xf5, 0xe5, 0xdc, 0xfa, 0x1f, 0x07, 0xa0, 0xaa, 0x2c, 0x86, 0xe8, 0xbc, 0x69, 0x1c,
+ 0x7e, 0x38, 0x6d, 0x1c, 0x1e, 0xa6, 0x0a, 0x9a, 0x6e, 0x0f, 0x7e, 0x33, 0xe3, 0x41, 0xfd, 0xa7,
+ 0x73, 0xd7, 0x78, 0xf1, 0xc8, 0x36, 0xed, 0x88, 0x57, 0x2e, 0x6c, 0x6f, 0xae, 0x1c, 0x78, 0x6a,
+ 0x2c, 0xf8, 0x48, 0x24, 0x3d, 0x1f, 0xb6, 0x03, 0x77, 0xb5, 0x9e, 0x7e, 0x03, 0xad, 0x4e, 0x81,
+ 0x98, 0xe3, 0x98, 0x5e, 0x4f, 0xf7, 0x6c, 0xa6, 0xd7, 0x0f, 0x1d, 0x52, 0xaf, 0x97, 0x0c, 0x70,
+ 0xc2, 0x0b, 0x6d, 0xc3, 0x54, 0xd3, 0x7c, 0xd2, 0x4e, 0xc5, 0xab, 0x3d, 0xdb, 0xc7, 0x93, 0x72,
+ 0x1d, 0xed, 0x45, 0x9a, 0xa5, 0x34, 0x3f, 0xdc, 0x5d, 0x05, 0x7a, 0x19, 0x86, 0xdf, 0x0d, 0x22,
+ 0x76, 0x6d, 0x21, 0x36, 0x2e, 0x19, 0x17, 0x34, 0xfc, 0xea, 0x8d, 0x06, 0x83, 0xef, 0xef, 0xce,
+ 0x8d, 0xd4, 0x03, 0x57, 0xfe, 0xc5, 0xaa, 0x00, 0xfa, 0xac, 0x05, 0x27, 0x8d, 0x75, 0xac, 0x5a,
+ 0x0e, 0x87, 0x69, 0xf9, 0xa3, 0xa2, 0xe6, 0x93, 0xab, 0x59, 0x3c, 0x71, 0x76, 0x55, 0xf6, 0x77,
+ 0xb9, 0x89, 0x54, 0x18, 0x4d, 0x48, 0xd4, 0x69, 0x1d, 0xc7, 0xeb, 0x10, 0x37, 0x0c, 0x7b, 0xce,
+ 0x03, 0x30, 0xd2, 0xff, 0x7b, 0x8b, 0x19, 0xe9, 0xd7, 0xc8, 0x56, 0xbb, 0xe5, 0xc4, 0xc7, 0xe1,
+ 0xfb, 0xfc, 0x19, 0x18, 0x8e, 0x45, 0x6d, 0xc5, 0x9e, 0xb6, 0xd0, 0x9a, 0xc7, 0x2e, 0x2f, 0xd4,
+ 0xc6, 0x27, 0xa1, 0x58, 0x31, 0xb4, 0xff, 0x15, 0x1f, 0x15, 0x89, 0x39, 0x06, 0x4b, 0xc4, 0x75,
+ 0xd3, 0x12, 0xf1, 0x54, 0xe1, 0x6f, 0xe9, 0x61, 0x91, 0xf8, 0x8e, 0xf9, 0x05, 0xec, 0x7c, 0xf2,
+ 0x93, 0x73, 0x8b, 0x64, 0xff, 0xba, 0x05, 0xd3, 0x59, 0xce, 0x08, 0x54, 0x81, 0xe1, 0xa7, 0x23,
+ 0x75, 0xbf, 0xa6, 0x7a, 0xf5, 0x96, 0x80, 0x63, 0x45, 0x51, 0x38, 0xd7, 0x7c, 0x7f, 0x29, 0xb4,
+ 0x6e, 0x80, 0xf9, 0x38, 0x22, 0x7a, 0x85, 0x87, 0x3a, 0x58, 0xea, 0xf5, 0xc2, 0xfe, 0xc2, 0x1c,
+ 0xec, 0x6f, 0x94, 0x60, 0x9a, 0x1b, 0xb9, 0x17, 0xb6, 0x03, 0xcf, 0xad, 0x07, 0xae, 0x08, 0xfc,
+ 0x70, 0x61, 0xb4, 0xad, 0x1d, 0x6e, 0x8b, 0xa5, 0xe4, 0xd1, 0x8f, 0xc3, 0xc9, 0x81, 0x42, 0x87,
+ 0x62, 0x83, 0x2b, 0xad, 0x85, 0x6c, 0x7b, 0x4d, 0x65, 0x33, 0x2d, 0xf5, 0xbd, 0x33, 0xa8, 0x5a,
+ 0x96, 0x35, 0x3e, 0xd8, 0xe0, 0x7a, 0x04, 0x4f, 0xc4, 0xd8, 0x7f, 0xdf, 0x82, 0x87, 0x7a, 0xa4,
+ 0xed, 0xa1, 0xd5, 0xdd, 0x63, 0x17, 0x0b, 0xe2, 0xf5, 0x4d, 0x55, 0x1d, 0xbf, 0x6e, 0xc0, 0x02,
+ 0x8b, 0xee, 0x00, 0xf0, 0xeb, 0x02, 0xaa, 0x4b, 0xa7, 0xef, 0xb2, 0x0b, 0x26, 0xc7, 0xd0, 0xf2,
+ 0x26, 0x48, 0x4e, 0x58, 0xe3, 0x6a, 0x7f, 0xad, 0x0c, 0x03, 0xfc, 0x91, 0xf7, 0x3a, 0x0c, 0x6d,
+ 0xf2, 0x7c, 0xc6, 0xfd, 0xa5, 0x53, 0x4e, 0x0e, 0x2f, 0x1c, 0x80, 0x25, 0x1b, 0x74, 0x0d, 0x4e,
+ 0x88, 0xd0, 0xa3, 0x1a, 0x69, 0x39, 0x3b, 0xf2, 0x34, 0xcc, 0xdf, 0x0d, 0x91, 0x09, 0xee, 0x4f,
+ 0xac, 0x76, 0x93, 0xe0, 0xac, 0x72, 0xe8, 0x95, 0xae, 0xf4, 0x83, 0x3c, 0x4f, 0xb4, 0xd2, 0x84,
+ 0x73, 0x52, 0x10, 0xbe, 0x0c, 0x63, 0xed, 0xae, 0x73, 0xbf, 0xf6, 0x96, 0xb6, 0x79, 0xd6, 0x37,
+ 0x69, 0x99, 0xef, 0x42, 0x87, 0xf9, 0x6c, 0xac, 0x6d, 0x86, 0x24, 0xda, 0x0c, 0x5a, 0xae, 0x78,
+ 0x06, 0x36, 0xf1, 0x5d, 0x48, 0xe1, 0x71, 0x57, 0x09, 0xca, 0x65, 0xdd, 0xf1, 0x5a, 0x9d, 0x90,
+ 0x24, 0x5c, 0x06, 0x4d, 0x2e, 0x2b, 0x29, 0x3c, 0xee, 0x2a, 0x41, 0xe7, 0xd6, 0x49, 0xf1, 0x72,
+ 0xa8, 0x0c, 0x52, 0x17, 0x22, 0xe8, 0xd3, 0x30, 0x24, 0x03, 0x08, 0x0a, 0xe5, 0x52, 0x11, 0x8e,
+ 0x09, 0xea, 0x15, 0x52, 0xed, 0x1d, 0x39, 0x11, 0x3a, 0x20, 0xf9, 0x1d, 0xe6, 0x85, 0xca, 0x3f,
+ 0xb7, 0xe0, 0x44, 0x86, 0x23, 0x1c, 0x17, 0x69, 0x1b, 0x5e, 0x14, 0xab, 0x57, 0x2c, 0x34, 0x91,
+ 0xc6, 0xe1, 0x58, 0x51, 0xd0, 0xd5, 0xc2, 0x85, 0x66, 0x5a, 0x50, 0x0a, 0x17, 0x13, 0x81, 0xed,
+ 0x4f, 0x50, 0xa2, 0x33, 0x50, 0xe9, 0x44, 0x24, 0x94, 0x0f, 0x3a, 0x4a, 0x39, 0xcf, 0xec, 0x8c,
+ 0x0c, 0x43, 0xd5, 0xd6, 0x0d, 0x65, 0xe2, 0xd3, 0xd4, 0x56, 0x6e, 0xe4, 0xe3, 0x38, 0xfb, 0xcb,
+ 0x65, 0x98, 0x48, 0x39, 0xc4, 0xd2, 0x86, 0x6c, 0x05, 0xbe, 0x17, 0x07, 0x2a, 0xbf, 0x1d, 0x7f,
+ 0x43, 0x8e, 0xb4, 0x37, 0xaf, 0x09, 0x38, 0x56, 0x14, 0xe8, 0x49, 0xf9, 0x42, 0x70, 0xfa, 0x75,
+ 0x8e, 0xc5, 0x9a, 0xf1, 0x48, 0x70, 0xd1, 0x97, 0x75, 0x1e, 0x87, 0x4a, 0x3b, 0x50, 0x0f, 0xbe,
+ 0xab, 0xf1, 0xc4, 0x8b, 0xb5, 0x7a, 0x10, 0xb4, 0x30, 0x43, 0xa2, 0x27, 0xc4, 0xd7, 0xa7, 0x6e,
+ 0x46, 0xb0, 0xe3, 0x06, 0x91, 0xd6, 0x05, 0x4f, 0xc1, 0xd0, 0x5d, 0xb2, 0x13, 0x7a, 0xfe, 0x46,
+ 0xfa, 0x5e, 0xe8, 0x0a, 0x07, 0x63, 0x89, 0x37, 0x93, 0xd5, 0x0f, 0x1d, 0xf1, 0xeb, 0x39, 0xc3,
+ 0xb9, 0xfb, 0xe0, 0x37, 0x2d, 0x98, 0x60, 0xd9, 0x67, 0x45, 0x8a, 0x04, 0x2f, 0xf0, 0x8f, 0x41,
+ 0xc7, 0x78, 0x1c, 0x06, 0x42, 0x5a, 0x69, 0xfa, 0xf9, 0x0b, 0xd6, 0x12, 0xcc, 0x71, 0xe8, 0x11,
+ 0xa8, 0xb0, 0x26, 0xd0, 0x61, 0x1c, 0xe5, 0x49, 0xee, 0x6b, 0x4e, 0xec, 0x60, 0x06, 0x65, 0x31,
+ 0x68, 0x98, 0xb4, 0x5b, 0x1e, 0x6f, 0x74, 0x62, 0xce, 0xfd, 0xa0, 0xc5, 0xa0, 0x65, 0x36, 0xf2,
+ 0x41, 0xc5, 0xa0, 0x65, 0x33, 0x3f, 0x58, 0xcf, 0xff, 0xef, 0x25, 0x38, 0x9d, 0x59, 0x2e, 0xb9,
+ 0x61, 0x5e, 0x31, 0x6e, 0x98, 0x2f, 0xa6, 0x6e, 0x98, 0xed, 0x83, 0x4b, 0x3f, 0x98, 0x3b, 0xe7,
+ 0xec, 0xab, 0xe0, 0xf2, 0x31, 0x5e, 0x05, 0x57, 0x8a, 0xaa, 0x38, 0x03, 0x39, 0x2a, 0xce, 0x1f,
+ 0x59, 0xf0, 0x70, 0x66, 0x97, 0x7d, 0xe0, 0x82, 0xfe, 0x32, 0x5b, 0xd9, 0xe3, 0x74, 0xf2, 0x6b,
+ 0xe5, 0x1e, 0x5f, 0xc5, 0xce, 0x29, 0x67, 0xa9, 0x14, 0x62, 0xc8, 0x48, 0x28, 0x6f, 0xa3, 0x5c,
+ 0x02, 0x71, 0x18, 0x56, 0x58, 0x14, 0x69, 0x41, 0x73, 0xbc, 0x91, 0xcb, 0x87, 0x5c, 0x50, 0xf3,
+ 0xa6, 0x1d, 0x5e, 0xcf, 0xfb, 0x90, 0x0e, 0xa5, 0xbb, 0xad, 0x9d, 0x3c, 0xcb, 0x87, 0x39, 0x79,
+ 0x8e, 0x66, 0x9f, 0x3a, 0xd1, 0x02, 0x4c, 0x6c, 0x79, 0x3e, 0x7b, 0x74, 0xd7, 0xd4, 0x9e, 0x54,
+ 0xe4, 0xf2, 0x35, 0x13, 0x8d, 0xd3, 0xf4, 0xb3, 0x2f, 0xc3, 0xd8, 0xe1, 0xad, 0x6b, 0x3f, 0x2a,
+ 0xc3, 0x87, 0x0f, 0x10, 0x0a, 0x7c, 0x77, 0x30, 0xc6, 0x45, 0xdb, 0x1d, 0xba, 0xc6, 0xa6, 0x0e,
+ 0xd3, 0xeb, 0x9d, 0x56, 0x6b, 0x87, 0xf9, 0x67, 0x11, 0x57, 0x52, 0x08, 0xa5, 0x46, 0x25, 0xa3,
+ 0x5e, 0xc9, 0xa0, 0xc1, 0x99, 0x25, 0xd1, 0xcf, 0x03, 0x0a, 0xee, 0xb0, 0xb4, 0xc8, 0x6e, 0x92,
+ 0xd7, 0x82, 0x0d, 0x41, 0x39, 0x59, 0xaa, 0x37, 0xba, 0x28, 0x70, 0x46, 0x29, 0xaa, 0xa7, 0xd2,
+ 0x7d, 0x6c, 0x47, 0x35, 0x2b, 0xa5, 0xa7, 0x62, 0x1d, 0x89, 0x4d, 0x5a, 0x74, 0x09, 0xa6, 0x9c,
+ 0x6d, 0xc7, 0xe3, 0x69, 0xce, 0x24, 0x03, 0xae, 0xa8, 0x2a, 0xfb, 0xd5, 0x42, 0x9a, 0x00, 0x77,
+ 0x97, 0x41, 0x6d, 0xc3, 0x20, 0xc9, 0x5f, 0x66, 0xf8, 0xe4, 0x21, 0x66, 0x70, 0x61, 0x13, 0xa5,
+ 0xfd, 0xa7, 0x16, 0xdd, 0xfa, 0x32, 0xde, 0x67, 0xa5, 0x3d, 0xa2, 0x0c, 0x6c, 0x5a, 0x10, 0xa0,
+ 0xea, 0x91, 0x25, 0x1d, 0x89, 0x4d, 0x5a, 0x3e, 0x35, 0xa2, 0xc4, 0x5d, 0xdc, 0xd0, 0x36, 0x45,
+ 0xfc, 0xac, 0xa2, 0xa0, 0x1a, 0xb4, 0xeb, 0x6d, 0x7b, 0x51, 0x10, 0x8a, 0x05, 0xd4, 0xef, 0x0b,
+ 0xe8, 0x4a, 0x5e, 0xd6, 0x38, 0x1b, 0x2c, 0xf9, 0xd9, 0x5f, 0x29, 0xc1, 0x98, 0xac, 0xf1, 0xd5,
+ 0x4e, 0x10, 0x3b, 0xc7, 0xb0, 0xa5, 0xbf, 0x6a, 0x6c, 0xe9, 0xe7, 0x8b, 0x85, 0x13, 0xb3, 0xc6,
+ 0xf5, 0xdc, 0xca, 0x3f, 0x9d, 0xda, 0xca, 0x2f, 0xf4, 0xc3, 0xf4, 0xe0, 0x2d, 0xfc, 0xdf, 0x58,
+ 0x30, 0x65, 0xd0, 0x1f, 0xc3, 0x4e, 0x52, 0x37, 0x77, 0x92, 0x67, 0xfa, 0xf8, 0x9a, 0x1e, 0x3b,
+ 0xc8, 0xd7, 0x4b, 0xa9, 0xaf, 0x60, 0x3b, 0xc7, 0x2f, 0x40, 0x65, 0xd3, 0x09, 0xdd, 0x62, 0x39,
+ 0x3f, 0xbb, 0x8a, 0xcf, 0x5f, 0x76, 0x42, 0x97, 0xcb, 0xff, 0x73, 0xea, 0xf5, 0x38, 0x27, 0x74,
+ 0x73, 0xa3, 0x28, 0x58, 0xa5, 0xe8, 0x25, 0x18, 0x8c, 0x9a, 0x41, 0x5b, 0xf9, 0x99, 0x9e, 0xe1,
+ 0x2f, 0xcb, 0x51, 0xc8, 0xfe, 0xee, 0x1c, 0x32, 0xab, 0xa3, 0x60, 0x2c, 0xe8, 0x67, 0x37, 0xa0,
+ 0xaa, 0xaa, 0x3e, 0x52, 0x4f, 0xfb, 0xff, 0x5a, 0x86, 0x13, 0x19, 0x73, 0x05, 0xfd, 0xa2, 0xd1,
+ 0x6f, 0x2f, 0xf7, 0x3d, 0xd9, 0xde, 0x67, 0xcf, 0xfd, 0x22, 0x3b, 0x29, 0xb9, 0x62, 0x76, 0x1c,
+ 0xa2, 0xfa, 0x9b, 0x11, 0x49, 0x57, 0x4f, 0x41, 0xf9, 0xd5, 0xd3, 0x6a, 0x8f, 0xad, 0xfb, 0x69,
+ 0x45, 0xaa, 0xa5, 0x47, 0x3a, 0xce, 0x5f, 0xa8, 0xc0, 0x74, 0x56, 0xde, 0x02, 0xf4, 0x2b, 0x56,
+ 0xea, 0x85, 0x91, 0x57, 0xfa, 0x4f, 0x7e, 0xc0, 0x9f, 0x1d, 0x11, 0x59, 0x85, 0xe6, 0xcd, 0x37,
+ 0x47, 0x72, 0x7b, 0x5c, 0xd4, 0xce, 0xe2, 0x9f, 0x42, 0xfe, 0x5a, 0x8c, 0x94, 0x0a, 0x9f, 0x3a,
+ 0x44, 0x53, 0xc4, 0x83, 0x33, 0x51, 0x2a, 0xfe, 0x49, 0x82, 0xf3, 0xe3, 0x9f, 0x64, 0x1b, 0x66,
+ 0x3d, 0x18, 0xd1, 0xbe, 0xeb, 0x48, 0xa7, 0xc1, 0x5d, 0xba, 0x45, 0x69, 0xed, 0x3e, 0xd2, 0xa9,
+ 0xf0, 0x77, 0x2c, 0x48, 0x39, 0x85, 0x29, 0xb3, 0x8c, 0xd5, 0xd3, 0x2c, 0x73, 0x06, 0x2a, 0x61,
+ 0xd0, 0x22, 0xe9, 0x47, 0x27, 0x70, 0xd0, 0x22, 0x98, 0x61, 0xd4, 0x83, 0xd2, 0xe5, 0x5e, 0x0f,
+ 0x4a, 0xd3, 0x73, 0x7a, 0x8b, 0x6c, 0x13, 0x69, 0x24, 0x51, 0x62, 0xfc, 0x2a, 0x05, 0x62, 0x8e,
+ 0xb3, 0x7f, 0xa7, 0x02, 0x27, 0x32, 0x62, 0x01, 0xe9, 0x09, 0x69, 0xc3, 0x89, 0xc9, 0x3d, 0x67,
+ 0x27, 0x9d, 0xfc, 0xf6, 0x12, 0x07, 0x63, 0x89, 0x67, 0xce, 0xac, 0x3c, 0x81, 0x5e, 0xca, 0x74,
+ 0x25, 0xf2, 0xe6, 0x09, 0xec, 0xd1, 0x3f, 0x3d, 0x7c, 0x11, 0x20, 0x8a, 0x5a, 0xcb, 0x3e, 0xd5,
+ 0xf0, 0x5c, 0xe1, 0x34, 0x9b, 0xe4, 0x5d, 0x6c, 0x5c, 0x15, 0x18, 0xac, 0x51, 0xa1, 0x1a, 0x4c,
+ 0xb6, 0xc3, 0x20, 0xe6, 0x86, 0xc1, 0x1a, 0x77, 0xb4, 0x18, 0x30, 0xa3, 0xb5, 0xea, 0x29, 0x3c,
+ 0xee, 0x2a, 0x81, 0x5e, 0x80, 0x11, 0x11, 0xc1, 0x55, 0x0f, 0x82, 0x96, 0x30, 0x23, 0xa9, 0xeb,
+ 0xf8, 0x46, 0x82, 0xc2, 0x3a, 0x9d, 0x56, 0x8c, 0x59, 0x1b, 0x87, 0x32, 0x8b, 0x71, 0x8b, 0xa3,
+ 0x46, 0x97, 0xca, 0x6e, 0x32, 0x5c, 0x28, 0xbb, 0x49, 0x62, 0x58, 0xab, 0x16, 0xbe, 0x88, 0x81,
+ 0x5c, 0x03, 0xd4, 0x1f, 0x96, 0x61, 0x90, 0x0f, 0xc5, 0x31, 0x68, 0x79, 0x75, 0x61, 0x52, 0x2a,
+ 0x94, 0x49, 0x82, 0xb7, 0x6a, 0xbe, 0xe6, 0xc4, 0x0e, 0x17, 0x4d, 0x6a, 0x85, 0x24, 0x66, 0x28,
+ 0x34, 0x6f, 0xac, 0xa1, 0xd9, 0x94, 0xa5, 0x04, 0x38, 0x0f, 0x6d, 0x45, 0x6d, 0x02, 0x44, 0xec,
+ 0xf9, 0x5b, 0xca, 0x43, 0x64, 0xe6, 0x7d, 0xbe, 0x50, 0x3b, 0x1a, 0xaa, 0x18, 0x6f, 0x4d, 0x32,
+ 0x2d, 0x15, 0x02, 0x6b, 0xbc, 0x67, 0x5f, 0x84, 0xaa, 0x22, 0xce, 0x3b, 0x42, 0x8e, 0xea, 0xa2,
+ 0xed, 0x67, 0x61, 0x22, 0x55, 0x57, 0x5f, 0x27, 0xd0, 0xdf, 0xb3, 0x60, 0x82, 0x37, 0x79, 0xd9,
+ 0xdf, 0x16, 0xa2, 0xe0, 0x73, 0x16, 0x4c, 0xb7, 0x32, 0x56, 0xa2, 0x18, 0xe6, 0xc3, 0xac, 0x61,
+ 0x75, 0xf8, 0xcc, 0xc2, 0xe2, 0xcc, 0xda, 0xd0, 0x59, 0x18, 0xe6, 0xaf, 0x79, 0x3b, 0x2d, 0xe1,
+ 0xa1, 0x3d, 0xca, 0x73, 0x92, 0x73, 0x18, 0x56, 0x58, 0xfb, 0xc7, 0x16, 0x4c, 0xf1, 0x8f, 0xb8,
+ 0x42, 0x76, 0xd4, 0xf1, 0xea, 0x03, 0xf2, 0x19, 0x22, 0xfb, 0x7a, 0xa9, 0x47, 0xf6, 0x75, 0xfd,
+ 0x2b, 0xcb, 0x07, 0x7e, 0xe5, 0x37, 0x2c, 0x10, 0x33, 0xf4, 0x18, 0xce, 0x0f, 0xab, 0xe6, 0xf9,
+ 0xe1, 0x23, 0x45, 0x26, 0x7d, 0x8f, 0x83, 0xc3, 0xaf, 0x96, 0x60, 0x92, 0x13, 0x24, 0x37, 0x32,
+ 0x1f, 0x94, 0xc1, 0xe9, 0xef, 0x55, 0x20, 0xf5, 0x26, 0x6c, 0xf6, 0x97, 0x1a, 0x63, 0x59, 0x39,
+ 0x70, 0x2c, 0xff, 0xa7, 0x05, 0x88, 0xf7, 0x49, 0xfa, 0x29, 0x74, 0xbe, 0xbb, 0x69, 0xe6, 0x80,
+ 0x44, 0x72, 0x28, 0x0c, 0xd6, 0xa8, 0x1e, 0xf0, 0x27, 0xa4, 0xee, 0xc3, 0xca, 0xf9, 0xf7, 0x61,
+ 0x7d, 0x7c, 0xf5, 0x77, 0xcb, 0x90, 0x76, 0xd5, 0x44, 0x6f, 0xc3, 0x68, 0xd3, 0x69, 0x3b, 0x77,
+ 0xbc, 0x96, 0x17, 0x7b, 0x24, 0x2a, 0x76, 0xe1, 0xbe, 0xa4, 0x95, 0x10, 0xd7, 0x50, 0x1a, 0x04,
+ 0x1b, 0x1c, 0xd1, 0x3c, 0x40, 0x3b, 0xf4, 0xb6, 0xbd, 0x16, 0xd9, 0x60, 0x27, 0x1e, 0x16, 0xeb,
+ 0xc1, 0xef, 0x8e, 0x25, 0x14, 0x6b, 0x14, 0x19, 0xb1, 0x01, 0xe5, 0xe3, 0x88, 0x0d, 0xa8, 0xf4,
+ 0x19, 0x1b, 0x30, 0x50, 0x28, 0x36, 0x00, 0xc3, 0x29, 0xb9, 0x79, 0xd3, 0xff, 0x2b, 0x5e, 0x8b,
+ 0x08, 0xdd, 0x8d, 0xc7, 0x82, 0xcc, 0xee, 0xed, 0xce, 0x9d, 0xc2, 0x99, 0x14, 0xb8, 0x47, 0x49,
+ 0xbb, 0x03, 0x27, 0x1a, 0x24, 0x94, 0xcf, 0xd8, 0xa9, 0xb5, 0xf4, 0x26, 0x54, 0xc3, 0xd4, 0x32,
+ 0xee, 0x33, 0xe0, 0x5f, 0xcb, 0xf1, 0x26, 0x97, 0x6d, 0xc2, 0xd2, 0xfe, 0xeb, 0x25, 0x18, 0x12,
+ 0x4e, 0x9a, 0xc7, 0xa0, 0x7c, 0x5c, 0x31, 0x4c, 0x4c, 0x4f, 0xe5, 0xc9, 0x3f, 0xd6, 0xac, 0x9e,
+ 0xc6, 0xa5, 0x46, 0xca, 0xb8, 0xf4, 0x4c, 0x31, 0x76, 0x07, 0x9b, 0x95, 0x7e, 0xab, 0x0c, 0xe3,
+ 0xa6, 0xd3, 0xea, 0x31, 0x74, 0xcb, 0x6b, 0x30, 0x14, 0x09, 0xff, 0xe9, 0x52, 0x11, 0x9f, 0xbd,
+ 0xf4, 0x10, 0x27, 0x37, 0xf1, 0xc2, 0x63, 0x5a, 0xb2, 0xcb, 0x74, 0xd1, 0x2e, 0x1f, 0x8b, 0x8b,
+ 0x76, 0x9e, 0x2f, 0x71, 0xe5, 0x41, 0xf8, 0x12, 0xdb, 0xdf, 0x63, 0x22, 0x5f, 0x87, 0x1f, 0xc3,
+ 0x36, 0xfe, 0xaa, 0xb9, 0x39, 0x9c, 0x2b, 0x34, 0xef, 0x44, 0xf3, 0x7a, 0x6c, 0xe7, 0xdf, 0xb2,
+ 0x60, 0x44, 0x10, 0x1e, 0xc3, 0x07, 0xfc, 0xbc, 0xf9, 0x01, 0x4f, 0x14, 0xfa, 0x80, 0x1e, 0x2d,
+ 0xff, 0x4a, 0x49, 0xb5, 0xbc, 0x1e, 0x84, 0x71, 0xa1, 0x4c, 0xe8, 0xc3, 0xf4, 0xe8, 0x17, 0x34,
+ 0x83, 0x96, 0x50, 0xe0, 0x1e, 0x49, 0x42, 0xff, 0x38, 0x7c, 0x5f, 0xfb, 0x8d, 0x15, 0x35, 0x8b,
+ 0x4c, 0x0b, 0xc2, 0x58, 0x6c, 0xa0, 0x49, 0x64, 0x5a, 0x10, 0xc6, 0x98, 0x61, 0x90, 0x0b, 0x10,
+ 0x3b, 0xe1, 0x06, 0x89, 0x29, 0x4c, 0x44, 0xcd, 0xf6, 0x5e, 0xad, 0x9d, 0xd8, 0x6b, 0xcd, 0x7b,
+ 0x7e, 0x1c, 0xc5, 0xe1, 0xfc, 0xaa, 0x1f, 0xdf, 0x08, 0xb9, 0xd2, 0xaf, 0xc5, 0xf2, 0x29, 0x5e,
+ 0x58, 0xe3, 0x2b, 0x83, 0x44, 0x58, 0x1d, 0x03, 0xe6, 0x0d, 0xd2, 0x75, 0x01, 0xc7, 0x8a, 0xc2,
+ 0x7e, 0x91, 0x49, 0x76, 0xd6, 0x41, 0xfd, 0x85, 0xd9, 0x7d, 0x61, 0x48, 0x75, 0x2d, 0x33, 0x0b,
+ 0x5f, 0xd7, 0x83, 0xf9, 0x8a, 0x8a, 0x4f, 0xda, 0x04, 0xdd, 0x8f, 0x3a, 0x89, 0xfd, 0x43, 0xa4,
+ 0xeb, 0xda, 0xf1, 0xc5, 0xc2, 0x12, 0xb9, 0x8f, 0x8b, 0x46, 0x96, 0x92, 0x91, 0xe5, 0xa1, 0x5b,
+ 0xad, 0xa7, 0xf3, 0xd7, 0x2f, 0x49, 0x04, 0x4e, 0x68, 0xd0, 0x79, 0x71, 0xa0, 0xe4, 0x16, 0x97,
+ 0x0f, 0xa7, 0x0e, 0x94, 0xb2, 0x4b, 0xb4, 0x13, 0xe5, 0x05, 0x18, 0x51, 0x4f, 0x02, 0xd5, 0xf9,
+ 0x63, 0x2c, 0x55, 0xae, 0x5f, 0x2d, 0x27, 0x60, 0xac, 0xd3, 0xa0, 0x35, 0x98, 0x88, 0xf8, 0x7b,
+ 0x45, 0x32, 0x5a, 0x43, 0x18, 0x0e, 0x9e, 0x96, 0x97, 0x94, 0x0d, 0x13, 0xbd, 0xcf, 0x40, 0x7c,
+ 0x29, 0xcb, 0xf8, 0x8e, 0x34, 0x0b, 0xf4, 0x0a, 0x8c, 0xb7, 0xf4, 0x37, 0x5c, 0xeb, 0xc2, 0xae,
+ 0xa0, 0xdc, 0xce, 0x8c, 0x17, 0x5e, 0xeb, 0x38, 0x45, 0x8d, 0x5e, 0x83, 0x19, 0x1d, 0x22, 0x92,
+ 0x0b, 0x39, 0xfe, 0x06, 0x89, 0xc4, 0xdb, 0x26, 0x8f, 0xec, 0xed, 0xce, 0xcd, 0x5c, 0xed, 0x41,
+ 0x83, 0x7b, 0x96, 0x46, 0x2f, 0xc1, 0xa8, 0xfc, 0x7c, 0x2d, 0xb6, 0x29, 0x71, 0x78, 0xd4, 0x70,
+ 0xd8, 0xa0, 0x44, 0xf7, 0xe0, 0xa4, 0xfc, 0xbf, 0x16, 0x3a, 0xeb, 0xeb, 0x5e, 0x53, 0x04, 0x99,
+ 0x8d, 0x30, 0x16, 0x0b, 0xd2, 0x5f, 0x7c, 0x39, 0x8b, 0x68, 0x7f, 0x77, 0xee, 0x8c, 0xe8, 0xb5,
+ 0x4c, 0x3c, 0x1b, 0xc4, 0x6c, 0xfe, 0xe8, 0x1a, 0x9c, 0xd8, 0x24, 0x4e, 0x2b, 0xde, 0x5c, 0xda,
+ 0x24, 0xcd, 0xbb, 0x72, 0x61, 0xb1, 0x88, 0x29, 0xcd, 0x25, 0xf0, 0x72, 0x37, 0x09, 0xce, 0x2a,
+ 0xf7, 0xfe, 0xee, 0x94, 0x7f, 0x81, 0x16, 0xd6, 0xf4, 0x07, 0xf4, 0x0e, 0x8c, 0xea, 0x7d, 0x9d,
+ 0x56, 0x0c, 0xf2, 0xdf, 0xf7, 0x15, 0x7a, 0x88, 0x1a, 0x01, 0x1d, 0x87, 0x0d, 0xde, 0xf6, 0xbf,
+ 0x2b, 0xc1, 0x5c, 0x4e, 0xee, 0xae, 0x94, 0x35, 0xcb, 0x2a, 0x64, 0xcd, 0x5a, 0x90, 0x6f, 0xde,
+ 0x5c, 0x4f, 0xe5, 0x4c, 0x4f, 0xbd, 0x62, 0x93, 0x64, 0x4e, 0x4f, 0xd3, 0x17, 0xf6, 0x34, 0xd3,
+ 0x0d, 0x62, 0x95, 0x5c, 0x87, 0xbb, 0xd7, 0x75, 0x1b, 0xe7, 0xc0, 0x61, 0x94, 0xde, 0x9e, 0xe6,
+ 0x4d, 0xfb, 0x7b, 0x25, 0x38, 0xa9, 0x3a, 0xf3, 0xa7, 0xb7, 0x0b, 0xdf, 0xea, 0xee, 0xc2, 0x07,
+ 0x6a, 0x26, 0xb6, 0x6f, 0xc0, 0x60, 0x63, 0x27, 0x6a, 0xc6, 0xad, 0x02, 0x3b, 0xfe, 0xe3, 0xc6,
+ 0xba, 0x4a, 0x76, 0x23, 0xf6, 0x92, 0x9d, 0x58, 0x66, 0xf6, 0xe7, 0x2d, 0x98, 0x58, 0x5b, 0xaa,
+ 0x37, 0x82, 0xe6, 0x5d, 0x12, 0x2f, 0x70, 0x83, 0x06, 0x16, 0x1b, 0xbe, 0x75, 0xc8, 0x8d, 0x3c,
+ 0x4b, 0x45, 0x38, 0x03, 0x95, 0xcd, 0x20, 0x8a, 0xd3, 0x97, 0x02, 0x97, 0x83, 0x28, 0xc6, 0x0c,
+ 0x63, 0xff, 0x99, 0x05, 0x03, 0xec, 0xa1, 0xb6, 0xbc, 0x47, 0xfe, 0x8a, 0x7c, 0x17, 0x7a, 0x01,
+ 0x06, 0xc9, 0xfa, 0x3a, 0x69, 0xc6, 0x62, 0x7c, 0x65, 0x80, 0xcd, 0xe0, 0x32, 0x83, 0xd2, 0x1d,
+ 0x8d, 0x55, 0xc6, 0xff, 0x62, 0x41, 0x8c, 0x3e, 0x03, 0xd5, 0xd8, 0xdb, 0x22, 0x0b, 0xae, 0x2b,
+ 0xac, 0xf0, 0xfd, 0xf9, 0x7c, 0xa9, 0x1d, 0x76, 0x4d, 0x32, 0xc1, 0x09, 0x3f, 0xfb, 0x4b, 0x25,
+ 0x80, 0x24, 0x7c, 0x2e, 0xef, 0x33, 0x17, 0xbb, 0xde, 0x32, 0x7c, 0x32, 0xe3, 0x2d, 0x43, 0x94,
+ 0x30, 0xcc, 0x78, 0xc9, 0x50, 0x75, 0x55, 0xb9, 0x50, 0x57, 0x55, 0xfa, 0xe9, 0xaa, 0x25, 0x98,
+ 0x4a, 0xc2, 0xff, 0xcc, 0x38, 0x6a, 0x96, 0x6f, 0x78, 0x2d, 0x8d, 0xc4, 0xdd, 0xf4, 0xf6, 0x97,
+ 0x2c, 0x10, 0x5e, 0xc2, 0x05, 0x26, 0xb4, 0x2b, 0xdf, 0x1d, 0x33, 0x52, 0x0b, 0x3e, 0x5d, 0xc4,
+ 0x81, 0x5a, 0x24, 0x14, 0x54, 0x72, 0xdf, 0x48, 0x23, 0x68, 0x70, 0xb5, 0x7f, 0xdb, 0x82, 0x11,
+ 0x8e, 0xbe, 0xc6, 0x0e, 0xa2, 0xf9, 0xed, 0xea, 0x2b, 0x99, 0x35, 0x7b, 0x92, 0x8b, 0x32, 0x56,
+ 0x49, 0x8d, 0xf5, 0x27, 0xb9, 0x24, 0x02, 0x27, 0x34, 0xe8, 0x29, 0x18, 0x8a, 0x3a, 0x77, 0x18,
+ 0x79, 0xca, 0x65, 0xb8, 0xc1, 0xc1, 0x58, 0xe2, 0xed, 0x7f, 0x5a, 0x82, 0xc9, 0xb4, 0xc7, 0x38,
+ 0xc2, 0x30, 0xc8, 0x05, 0x48, 0xfa, 0x4c, 0x73, 0x90, 0x01, 0x54, 0xf3, 0x38, 0x07, 0xfe, 0xb0,
+ 0x3c, 0x13, 0x41, 0x82, 0x13, 0x5a, 0x87, 0x11, 0x37, 0xb8, 0xe7, 0xdf, 0x73, 0x42, 0x77, 0xa1,
+ 0xbe, 0x2a, 0x46, 0x22, 0xc7, 0xc7, 0xaf, 0x96, 0x14, 0xd0, 0xfd, 0xd9, 0x99, 0x41, 0x2e, 0x41,
+ 0x61, 0x9d, 0x31, 0x7a, 0x93, 0x65, 0x42, 0x59, 0xf7, 0x36, 0xae, 0x39, 0xed, 0x62, 0xde, 0x2c,
+ 0x4b, 0x92, 0x5c, 0xab, 0x63, 0x4c, 0x24, 0x4e, 0xe1, 0x08, 0x9c, 0xb0, 0xb4, 0x7f, 0xf5, 0x24,
+ 0x18, 0x73, 0xc1, 0xc8, 0x38, 0x6d, 0x3d, 0xf0, 0x8c, 0xd3, 0x6f, 0xc0, 0x30, 0xd9, 0x6a, 0xc7,
+ 0x3b, 0x35, 0x2f, 0x2c, 0xf6, 0x7e, 0xc0, 0xb2, 0xa0, 0xee, 0xe6, 0x2e, 0x31, 0x58, 0x71, 0xec,
+ 0x91, 0x3f, 0xbc, 0xfc, 0x81, 0xc8, 0x1f, 0x5e, 0xf9, 0x4b, 0xc9, 0x1f, 0xfe, 0x1a, 0x0c, 0x6d,
+ 0x78, 0x31, 0x26, 0xed, 0x40, 0xec, 0xc6, 0x39, 0x93, 0xe7, 0x12, 0x27, 0xee, 0xce, 0x2c, 0x2b,
+ 0x10, 0x58, 0xb2, 0x43, 0x6b, 0x6a, 0x51, 0x0d, 0x16, 0xd1, 0x41, 0xbb, 0x0d, 0xe4, 0x99, 0xcb,
+ 0x4a, 0xe4, 0x0b, 0x1f, 0x7a, 0xff, 0xf9, 0xc2, 0x55, 0x96, 0xef, 0xe1, 0x07, 0x95, 0xe5, 0xdb,
+ 0xc8, 0x96, 0x5e, 0x3d, 0x8a, 0x6c, 0xe9, 0x5f, 0xb2, 0xe0, 0x64, 0x3b, 0xeb, 0xad, 0x01, 0x91,
+ 0xaf, 0xfb, 0xe7, 0x0e, 0xf1, 0xfa, 0x82, 0x51, 0x35, 0xcb, 0xef, 0x91, 0x49, 0x86, 0xb3, 0x2b,
+ 0x96, 0x69, 0xd7, 0x47, 0xde, 0x7f, 0xda, 0xf5, 0xa3, 0x4e, 0xec, 0x9d, 0x24, 0x61, 0x1f, 0x3b,
+ 0x92, 0x24, 0xec, 0xe3, 0x0f, 0x30, 0x09, 0xbb, 0x96, 0x3e, 0x7d, 0xe2, 0xc1, 0xa6, 0x4f, 0xdf,
+ 0x34, 0xf7, 0x25, 0x9e, 0xad, 0xfb, 0x85, 0xc2, 0xfb, 0x92, 0x51, 0xc3, 0xc1, 0x3b, 0x13, 0x4f,
+ 0x24, 0x3f, 0xf5, 0x3e, 0x13, 0xc9, 0x1b, 0xe9, 0xd8, 0xd1, 0x51, 0xa4, 0x63, 0x7f, 0x5b, 0xdf,
+ 0x41, 0x4f, 0x14, 0xa9, 0x41, 0x6d, 0x94, 0xdd, 0x35, 0x64, 0xed, 0xa1, 0xdd, 0x09, 0xdf, 0xa7,
+ 0x8f, 0x3b, 0xe1, 0xfb, 0xc9, 0x23, 0x4c, 0xf8, 0x7e, 0xea, 0x58, 0x13, 0xbe, 0x3f, 0xf4, 0x01,
+ 0x49, 0xf8, 0x3e, 0x73, 0x5c, 0x09, 0xdf, 0x1f, 0x7e, 0xb0, 0x09, 0xdf, 0xdf, 0x86, 0x6a, 0x5b,
+ 0xc6, 0x5d, 0xce, 0xcc, 0x16, 0x19, 0xba, 0xcc, 0x30, 0x4d, 0x3e, 0x74, 0x0a, 0x85, 0x13, 0xa6,
+ 0xb4, 0x86, 0x24, 0x01, 0xfc, 0x87, 0x8b, 0xd4, 0x90, 0x69, 0xf7, 0x38, 0x20, 0xed, 0xfb, 0x17,
+ 0x4a, 0x70, 0xfa, 0xe0, 0xd5, 0x91, 0x18, 0x4d, 0xea, 0x89, 0x2d, 0x3b, 0x65, 0x34, 0x61, 0x9a,
+ 0xa7, 0x46, 0x55, 0x38, 0x9c, 0xfd, 0x12, 0x4c, 0x29, 0x3f, 0xaf, 0x96, 0xd7, 0xdc, 0xd1, 0x9e,
+ 0xa1, 0x52, 0xf1, 0x09, 0x8d, 0x34, 0x01, 0xee, 0x2e, 0x83, 0x16, 0x60, 0xc2, 0x00, 0xae, 0xd6,
+ 0xc4, 0xf9, 0x45, 0x59, 0x69, 0x1a, 0x26, 0x1a, 0xa7, 0xe9, 0xed, 0xaf, 0x5b, 0xf0, 0x50, 0x8f,
+ 0x0c, 0xaf, 0x85, 0x63, 0xb4, 0xdb, 0x30, 0xd1, 0x36, 0x8b, 0x16, 0x4e, 0xf9, 0x60, 0x64, 0x94,
+ 0x55, 0xad, 0x4e, 0x21, 0x70, 0x9a, 0xfd, 0xe2, 0xd9, 0xef, 0xff, 0xe8, 0xf4, 0x87, 0x7e, 0xf0,
+ 0xa3, 0xd3, 0x1f, 0xfa, 0xe1, 0x8f, 0x4e, 0x7f, 0xe8, 0x97, 0xf6, 0x4e, 0x5b, 0xdf, 0xdf, 0x3b,
+ 0x6d, 0xfd, 0x60, 0xef, 0xb4, 0xf5, 0xc3, 0xbd, 0xd3, 0xd6, 0x9f, 0xef, 0x9d, 0xb6, 0xbe, 0xf4,
+ 0xe3, 0xd3, 0x1f, 0x7a, 0xbd, 0xb4, 0x7d, 0xe1, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x6b, 0x1c,
+ 0xd0, 0x1f, 0x95, 0xd0, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/generated.proto b/vendor/k8s.io/kubernetes/pkg/api/v1/generated.proto
new file mode 100644
index 000000000..0e9ff7b87
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/v1/generated.proto
@@ -0,0 +1,4117 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.pkg.api.v1;
+
+import "k8s.io/apimachinery/pkg/api/resource/generated.proto";
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1";
+
+// Represents a Persistent Disk resource in AWS.
+//
+// An AWS EBS disk must exist before mounting to a container. The disk
+// must also be in the same AWS zone as the kubelet. An AWS EBS disk
+// can only be mounted as read/write once. AWS EBS volumes support
+// ownership management and SELinux relabeling.
+message AWSElasticBlockStoreVolumeSource {
+ // Unique ID of the persistent disk resource in AWS (Amazon EBS volume).
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+ optional string volumeID = 1;
+
+ // Filesystem type of the volume that you want to mount.
+ // Tip: Ensure that the filesystem type is supported by the host operating system.
+ // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ optional string fsType = 2;
+
+ // The partition in the volume that you want to mount.
+ // If omitted, the default is to mount by volume name.
+ // Examples: For volume /dev/sda1, you specify the partition as "1".
+ // Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).
+ // +optional
+ optional int32 partition = 3;
+
+ // Specify "true" to force and set the ReadOnly property in VolumeMounts to "true".
+ // If omitted, the default is "false".
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+ // +optional
+ optional bool readOnly = 4;
+}
+
+// Affinity is a group of affinity scheduling rules.
+message Affinity {
+ // Describes node affinity scheduling rules for the pod.
+ // +optional
+ optional NodeAffinity nodeAffinity = 1;
+
+ // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
+ // +optional
+ optional PodAffinity podAffinity = 2;
+
+ // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
+ // +optional
+ optional PodAntiAffinity podAntiAffinity = 3;
+}
+
+// AttachedVolume describes a volume attached to a node
+message AttachedVolume {
+ // Name of the attached volume
+ optional string name = 1;
+
+ // DevicePath represents the device path where the volume should be available
+ optional string devicePath = 2;
+}
+
+// AvoidPods describes pods that should avoid this node. This is the value for a
+// Node annotation with key scheduler.alpha.kubernetes.io/preferAvoidPods and
+// will eventually become a field of NodeStatus.
+message AvoidPods {
+ // Bounded-sized list of signatures of pods that should avoid this node, sorted
+ // in timestamp order from oldest to newest. Size of the slice is unspecified.
+ // +optional
+ repeated PreferAvoidPodsEntry preferAvoidPods = 1;
+}
+
+// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
+message AzureDiskVolumeSource {
+ // The Name of the data disk in the blob storage
+ optional string diskName = 1;
+
+ // The URI the data disk in the blob storage
+ optional string diskURI = 2;
+
+ // Host Caching mode: None, Read Only, Read Write.
+ // +optional
+ optional string cachingMode = 3;
+
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ optional string fsType = 4;
+
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ optional bool readOnly = 5;
+
+ // Expected values Shared: mulitple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared
+ optional string kind = 6;
+}
+
+// AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
+message AzureFileVolumeSource {
+ // the name of secret that contains Azure Storage Account Name and Key
+ optional string secretName = 1;
+
+ // Share Name
+ optional string shareName = 2;
+
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ optional bool readOnly = 3;
+}
+
+// Binding ties one object to another; for example, a pod is bound to a node by a scheduler.
+// Deprecated in 1.7, please use the bindings subresource of pods instead.
+message Binding {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // The target object that you want to bind to the standard object.
+ optional ObjectReference target = 2;
+}
+
+// Adds and removes POSIX capabilities from running containers.
+message Capabilities {
+ // Added capabilities
+ // +optional
+ repeated string add = 1;
+
+ // Removed capabilities
+ // +optional
+ repeated string drop = 2;
+}
+
+// Represents a Ceph Filesystem mount that lasts the lifetime of a pod
+// Cephfs volumes do not support ownership management or SELinux relabeling.
+message CephFSVolumeSource {
+ // Required: Monitors is a collection of Ceph monitors
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ repeated string monitors = 1;
+
+ // Optional: Used as the mounted root, rather than the full Ceph tree, default is /
+ // +optional
+ optional string path = 2;
+
+ // Optional: User is the rados user name, default is admin
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ // +optional
+ optional string user = 3;
+
+ // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ // +optional
+ optional string secretFile = 4;
+
+ // Optional: SecretRef is reference to the authentication secret for User, default is empty.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ // +optional
+ optional LocalObjectReference secretRef = 5;
+
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ // +optional
+ optional bool readOnly = 6;
+}
+
+// Represents a cinder volume resource in Openstack.
+// A Cinder volume must exist before mounting to a container.
+// The volume must also be in the same region as the kubelet.
+// Cinder volumes support ownership management and SELinux relabeling.
+message CinderVolumeSource {
+ // volume id used to identify the volume in cinder
+ // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ optional string volumeID = 1;
+
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ // +optional
+ optional string fsType = 2;
+
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ // +optional
+ optional bool readOnly = 3;
+}
+
+// Information about the condition of a component.
+message ComponentCondition {
+ // Type of condition for a component.
+ // Valid value: "Healthy"
+ optional string type = 1;
+
+ // Status of the condition for a component.
+ // Valid values for "Healthy": "True", "False", or "Unknown".
+ optional string status = 2;
+
+ // Message about the condition for a component.
+ // For example, information about a health check.
+ // +optional
+ optional string message = 3;
+
+ // Condition error code for a component.
+ // For example, a health check error code.
+ // +optional
+ optional string error = 4;
+}
+
+// ComponentStatus (and ComponentStatusList) holds the cluster validation info.
+message ComponentStatus {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // List of component conditions observed
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ repeated ComponentCondition conditions = 2;
+}
+
+// Status of all the conditions for the component as a list of ComponentStatus objects.
+message ComponentStatusList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of ComponentStatus objects.
+ repeated ComponentStatus items = 2;
+}
+
+// ConfigMap holds configuration data for pods to consume.
+message ConfigMap {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Data contains the configuration data.
+ // Each key must consist of alphanumeric characters, '-', '_' or '.'.
+ // +optional
+ map<string, string> data = 2;
+}
+
+// ConfigMapEnvSource selects a ConfigMap to populate the environment
+// variables with.
+//
+// The contents of the target ConfigMap's Data field will represent the
+// key-value pairs as environment variables.
+message ConfigMapEnvSource {
+ // The ConfigMap to select from.
+ optional LocalObjectReference localObjectReference = 1;
+
+ // Specify whether the ConfigMap must be defined
+ // +optional
+ optional bool optional = 2;
+}
+
+// Selects a key from a ConfigMap.
+message ConfigMapKeySelector {
+ // The ConfigMap to select from.
+ optional LocalObjectReference localObjectReference = 1;
+
+ // The key to select.
+ optional string key = 2;
+
+ // Specify whether the ConfigMap or it's key must be defined
+ // +optional
+ optional bool optional = 3;
+}
+
+// ConfigMapList is a resource containing a list of ConfigMap objects.
+message ConfigMapList {
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is the list of ConfigMaps.
+ repeated ConfigMap items = 2;
+}
+
+// Adapts a ConfigMap into a projected volume.
+//
+// The contents of the target ConfigMap's Data field will be presented in a
+// projected volume as files using the keys in the Data field as the file names,
+// unless the items element is populated with specific mappings of keys to paths.
+// Note that this is identical to a configmap volume source without the default
+// mode.
+message ConfigMapProjection {
+ optional LocalObjectReference localObjectReference = 1;
+
+ // If unspecified, each key-value pair in the Data field of the referenced
+ // ConfigMap will be projected into the volume as a file whose name is the
+ // key and content is the value. If specified, the listed keys will be
+ // projected into the specified paths, and unlisted keys will not be
+ // present. If a key is specified which is not present in the ConfigMap,
+ // the volume setup will error unless it is marked optional. Paths must be
+ // relative and may not contain the '..' path or start with '..'.
+ // +optional
+ repeated KeyToPath items = 2;
+
+ // Specify whether the ConfigMap or it's keys must be defined
+ // +optional
+ optional bool optional = 4;
+}
+
+// Adapts a ConfigMap into a volume.
+//
+// The contents of the target ConfigMap's Data field will be presented in a
+// volume as files using the keys in the Data field as the file names, unless
+// the items element is populated with specific mappings of keys to paths.
+// ConfigMap volumes support ownership management and SELinux relabeling.
+message ConfigMapVolumeSource {
+ optional LocalObjectReference localObjectReference = 1;
+
+ // If unspecified, each key-value pair in the Data field of the referenced
+ // ConfigMap will be projected into the volume as a file whose name is the
+ // key and content is the value. If specified, the listed keys will be
+ // projected into the specified paths, and unlisted keys will not be
+ // present. If a key is specified which is not present in the ConfigMap,
+ // the volume setup will error unless it is marked optional. Paths must be
+ // relative and may not contain the '..' path or start with '..'.
+ // +optional
+ repeated KeyToPath items = 2;
+
+ // Optional: mode bits to use on created files by default. Must be a
+ // value between 0 and 0777. Defaults to 0644.
+ // Directories within the path are not affected by this setting.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ optional int32 defaultMode = 3;
+
+ // Specify whether the ConfigMap or it's keys must be defined
+ // +optional
+ optional bool optional = 4;
+}
+
+// A single application container that you want to run within a pod.
+message Container {
+ // Name of the container specified as a DNS_LABEL.
+ // Each container in a pod must have a unique name (DNS_LABEL).
+ // Cannot be updated.
+ optional string name = 1;
+
+ // Docker image name.
+ // More info: https://kubernetes.io/docs/concepts/containers/images
+ optional string image = 2;
+
+ // Entrypoint array. Not executed within a shell.
+ // The docker image's ENTRYPOINT is used if this is not provided.
+ // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
+ // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
+ // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
+ // regardless of whether the variable exists or not.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
+ // +optional
+ repeated string command = 3;
+
+ // Arguments to the entrypoint.
+ // The docker image's CMD is used if this is not provided.
+ // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
+ // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
+ // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
+ // regardless of whether the variable exists or not.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
+ // +optional
+ repeated string args = 4;
+
+ // Container's working directory.
+ // If not specified, the container runtime's default will be used, which
+ // might be configured in the container image.
+ // Cannot be updated.
+ // +optional
+ optional string workingDir = 5;
+
+ // List of ports to expose from the container. Exposing a port here gives
+ // the system additional information about the network connections a
+ // container uses, but is primarily informational. Not specifying a port here
+ // DOES NOT prevent that port from being exposed. Any port which is
+ // listening on the default "0.0.0.0" address inside a container will be
+ // accessible from the network.
+ // Cannot be updated.
+ // +optional
+ // +patchMergeKey=containerPort
+ // +patchStrategy=merge
+ repeated ContainerPort ports = 6;
+
+ // List of sources to populate environment variables in the container.
+ // The keys defined within a source must be a C_IDENTIFIER. All invalid keys
+ // will be reported as an event when the container is starting. When a key exists in multiple
+ // sources, the value associated with the last source will take precedence.
+ // Values defined by an Env with a duplicate key will take precedence.
+ // Cannot be updated.
+ // +optional
+ repeated EnvFromSource envFrom = 19;
+
+ // List of environment variables to set in the container.
+ // Cannot be updated.
+ // +optional
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ repeated EnvVar env = 7;
+
+ // Compute Resources required by this container.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
+ // +optional
+ optional ResourceRequirements resources = 8;
+
+ // Pod volumes to mount into the container's filesystem.
+ // Cannot be updated.
+ // +optional
+ // +patchMergeKey=mountPath
+ // +patchStrategy=merge
+ repeated VolumeMount volumeMounts = 9;
+
+ // Periodic probe of container liveness.
+ // Container will be restarted if the probe fails.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+ // +optional
+ optional Probe livenessProbe = 10;
+
+ // Periodic probe of container service readiness.
+ // Container will be removed from service endpoints if the probe fails.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+ // +optional
+ optional Probe readinessProbe = 11;
+
+ // Actions that the management system should take in response to container lifecycle events.
+ // Cannot be updated.
+ // +optional
+ optional Lifecycle lifecycle = 12;
+
+ // Optional: Path at which the file to which the container's termination message
+ // will be written is mounted into the container's filesystem.
+ // Message written is intended to be brief final status, such as an assertion failure message.
+ // Will be truncated by the node if greater than 4096 bytes. The total message length across
+ // all containers will be limited to 12kb.
+ // Defaults to /dev/termination-log.
+ // Cannot be updated.
+ // +optional
+ optional string terminationMessagePath = 13;
+
+ // Indicate how the termination message should be populated. File will use the contents of
+ // terminationMessagePath to populate the container status message on both success and failure.
+ // FallbackToLogsOnError will use the last chunk of container log output if the termination
+ // message file is empty and the container exited with an error.
+ // The log output is limited to 2048 bytes or 80 lines, whichever is smaller.
+ // Defaults to File.
+ // Cannot be updated.
+ // +optional
+ optional string terminationMessagePolicy = 20;
+
+ // Image pull policy.
+ // One of Always, Never, IfNotPresent.
+ // Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
+ // +optional
+ optional string imagePullPolicy = 14;
+
+ // Security options the pod should run with.
+ // More info: https://kubernetes.io/docs/concepts/policy/security-context/
+ // More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md
+ // +optional
+ optional SecurityContext securityContext = 15;
+
+ // Whether this container should allocate a buffer for stdin in the container runtime. If this
+ // is not set, reads from stdin in the container will always result in EOF.
+ // Default is false.
+ // +optional
+ optional bool stdin = 16;
+
+ // Whether the container runtime should close the stdin channel after it has been opened by
+ // a single attach. When stdin is true the stdin stream will remain open across multiple attach
+ // sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the
+ // first client attaches to stdin, and then remains open and accepts data until the client disconnects,
+ // at which time stdin is closed and remains closed until the container is restarted. If this
+ // flag is false, a container processes that reads from stdin will never receive an EOF.
+ // Default is false
+ // +optional
+ optional bool stdinOnce = 17;
+
+ // Whether this container should allocate a TTY for itself, also requires 'stdin' to be true.
+ // Default is false.
+ // +optional
+ optional bool tty = 18;
+}
+
+// Describe a container image
+message ContainerImage {
+ // Names by which this image is known.
+ // e.g. ["gcr.io/google_containers/hyperkube:v1.0.7", "dockerhub.io/google_containers/hyperkube:v1.0.7"]
+ repeated string names = 1;
+
+ // The size of the image in bytes.
+ // +optional
+ optional int64 sizeBytes = 2;
+}
+
+// ContainerPort represents a network port in a single container.
+message ContainerPort {
+ // If specified, this must be an IANA_SVC_NAME and unique within the pod. Each
+ // named port in a pod must have a unique name. Name for the port that can be
+ // referred to by services.
+ // +optional
+ optional string name = 1;
+
+ // Number of port to expose on the host.
+ // If specified, this must be a valid port number, 0 < x < 65536.
+ // If HostNetwork is specified, this must match ContainerPort.
+ // Most containers do not need this.
+ // +optional
+ optional int32 hostPort = 2;
+
+ // Number of port to expose on the pod's IP address.
+ // This must be a valid port number, 0 < x < 65536.
+ optional int32 containerPort = 3;
+
+ // Protocol for port. Must be UDP or TCP.
+ // Defaults to "TCP".
+ // +optional
+ optional string protocol = 4;
+
+ // What host IP to bind the external port to.
+ // +optional
+ optional string hostIP = 5;
+}
+
+// ContainerState holds a possible state of container.
+// Only one of its members may be specified.
+// If none of them is specified, the default one is ContainerStateWaiting.
+message ContainerState {
+ // Details about a waiting container
+ // +optional
+ optional ContainerStateWaiting waiting = 1;
+
+ // Details about a running container
+ // +optional
+ optional ContainerStateRunning running = 2;
+
+ // Details about a terminated container
+ // +optional
+ optional ContainerStateTerminated terminated = 3;
+}
+
+// ContainerStateRunning is a running state of a container.
+message ContainerStateRunning {
+ // Time at which the container was last (re-)started
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startedAt = 1;
+}
+
+// ContainerStateTerminated is a terminated state of a container.
+message ContainerStateTerminated {
+ // Exit status from the last termination of the container
+ optional int32 exitCode = 1;
+
+ // Signal from the last termination of the container
+ // +optional
+ optional int32 signal = 2;
+
+ // (brief) reason from the last termination of the container
+ // +optional
+ optional string reason = 3;
+
+ // Message regarding the last termination of the container
+ // +optional
+ optional string message = 4;
+
+ // Time at which previous execution of the container started
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startedAt = 5;
+
+ // Time at which the container last terminated
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time finishedAt = 6;
+
+ // Container's ID in the format 'docker://<container_id>'
+ // +optional
+ optional string containerID = 7;
+}
+
+// ContainerStateWaiting is a waiting state of a container.
+message ContainerStateWaiting {
+ // (brief) reason the container is not yet running.
+ // +optional
+ optional string reason = 1;
+
+ // Message regarding why the container is not yet running.
+ // +optional
+ optional string message = 2;
+}
+
+// ContainerStatus contains details for the current status of this container.
+message ContainerStatus {
+ // This must be a DNS_LABEL. Each container in a pod must have a unique name.
+ // Cannot be updated.
+ optional string name = 1;
+
+ // Details about the container's current condition.
+ // +optional
+ optional ContainerState state = 2;
+
+ // Details about the container's last termination condition.
+ // +optional
+ optional ContainerState lastState = 3;
+
+ // Specifies whether the container has passed its readiness probe.
+ optional bool ready = 4;
+
+ // The number of times the container has been restarted, currently based on
+ // the number of dead containers that have not yet been removed.
+ // Note that this is calculated from dead containers. But those containers are subject to
+ // garbage collection. This value will get capped at 5 by GC.
+ optional int32 restartCount = 5;
+
+ // The image the container is running.
+ // More info: https://kubernetes.io/docs/concepts/containers/images
+ // TODO(dchen1107): Which image the container is running with?
+ optional string image = 6;
+
+ // ImageID of the container's image.
+ optional string imageID = 7;
+
+ // Container's ID in the format 'docker://<container_id>'.
+ // +optional
+ optional string containerID = 8;
+}
+
+// DaemonEndpoint contains information about a single Daemon endpoint.
+message DaemonEndpoint {
+ // Port number of the given endpoint.
+ optional int32 Port = 1;
+}
+
+// DeleteOptions may be provided when deleting an API object
+// DEPRECATED: This type has been moved to meta/v1 and will be removed soon.
+// +k8s:openapi-gen=false
+message DeleteOptions {
+ // The duration in seconds before the object should be deleted. Value must be non-negative integer.
+ // The value zero indicates delete immediately. If this value is nil, the default grace period for the
+ // specified type will be used.
+ // Defaults to a per object value if not specified. zero means delete immediately.
+ // +optional
+ optional int64 gracePeriodSeconds = 1;
+
+ // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be
+ // returned.
+ // +optional
+ optional Preconditions preconditions = 2;
+
+ // Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7.
+ // Should the dependent objects be orphaned. If true/false, the "orphan"
+ // finalizer will be added to/removed from the object's finalizers list.
+ // Either this field or PropagationPolicy may be set, but not both.
+ // +optional
+ optional bool orphanDependents = 3;
+
+ // Whether and how garbage collection will be performed.
+ // Either this field or OrphanDependents may be set, but not both.
+ // The default policy is decided by the existing finalizer set in the
+ // metadata.finalizers and the resource-specific default policy.
+ // +optional
+ optional string propagationPolicy = 4;
+}
+
+// Represents downward API info for projecting into a projected volume.
+// Note that this is identical to a downwardAPI volume source without the default
+// mode.
+message DownwardAPIProjection {
+ // Items is a list of DownwardAPIVolume file
+ // +optional
+ repeated DownwardAPIVolumeFile items = 1;
+}
+
+// DownwardAPIVolumeFile represents information to create the file containing the pod field
+message DownwardAPIVolumeFile {
+ // Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'
+ optional string path = 1;
+
+ // Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.
+ // +optional
+ optional ObjectFieldSelector fieldRef = 2;
+
+ // Selects a resource of the container: only resources limits and requests
+ // (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
+ // +optional
+ optional ResourceFieldSelector resourceFieldRef = 3;
+
+ // Optional: mode bits to use on this file, must be a value between 0
+ // and 0777. If not specified, the volume defaultMode will be used.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ optional int32 mode = 4;
+}
+
+// DownwardAPIVolumeSource represents a volume containing downward API info.
+// Downward API volumes support ownership management and SELinux relabeling.
+message DownwardAPIVolumeSource {
+ // Items is a list of downward API volume file
+ // +optional
+ repeated DownwardAPIVolumeFile items = 1;
+
+ // Optional: mode bits to use on created files by default. Must be a
+ // value between 0 and 0777. Defaults to 0644.
+ // Directories within the path are not affected by this setting.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ optional int32 defaultMode = 2;
+}
+
+// Represents an empty directory for a pod.
+// Empty directory volumes support ownership management and SELinux relabeling.
+message EmptyDirVolumeSource {
+ // What type of storage medium should back this directory.
+ // The default is "" which means to use the node's default medium.
+ // Must be an empty string (default) or Memory.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
+ // +optional
+ optional string medium = 1;
+
+ // Total amount of local storage required for this EmptyDir volume.
+ // The size limit is also applicable for memory medium.
+ // The maximum usage on memory medium EmptyDir would be the minimum value between
+ // the SizeLimit specified here and the sum of memory limits of all containers in a pod.
+ // The default is nil which means that the limit is undefined.
+ // More info: http://kubernetes.io/docs/user-guide/volumes#emptydir
+ // +optional
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity sizeLimit = 2;
+}
+
+// EndpointAddress is a tuple that describes single IP address.
+message EndpointAddress {
+ // The IP of this endpoint.
+ // May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16),
+ // or link-local multicast ((224.0.0.0/24).
+ // IPv6 is also accepted but not fully supported on all platforms. Also, certain
+ // kubernetes components, like kube-proxy, are not IPv6 ready.
+ // TODO: This should allow hostname or IP, See #4447.
+ optional string ip = 1;
+
+ // The Hostname of this endpoint
+ // +optional
+ optional string hostname = 3;
+
+ // Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.
+ // +optional
+ optional string nodeName = 4;
+
+ // Reference to object providing the endpoint.
+ // +optional
+ optional ObjectReference targetRef = 2;
+}
+
+// EndpointPort is a tuple that describes a single port.
+message EndpointPort {
+ // The name of this port (corresponds to ServicePort.Name).
+ // Must be a DNS_LABEL.
+ // Optional only if one port is defined.
+ // +optional
+ optional string name = 1;
+
+ // The port number of the endpoint.
+ optional int32 port = 2;
+
+ // The IP protocol for this port.
+ // Must be UDP or TCP.
+ // Default is TCP.
+ // +optional
+ optional string protocol = 3;
+}
+
+// EndpointSubset is a group of addresses with a common set of ports. The
+// expanded set of endpoints is the Cartesian product of Addresses x Ports.
+// For example, given:
+// {
+// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
+// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
+// }
+// The resulting set of endpoints can be viewed as:
+// a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],
+// b: [ 10.10.1.1:309, 10.10.2.2:309 ]
+message EndpointSubset {
+ // IP addresses which offer the related ports that are marked as ready. These endpoints
+ // should be considered safe for load balancers and clients to utilize.
+ // +optional
+ repeated EndpointAddress addresses = 1;
+
+ // IP addresses which offer the related ports but are not currently marked as ready
+ // because they have not yet finished starting, have recently failed a readiness check,
+ // or have recently failed a liveness check.
+ // +optional
+ repeated EndpointAddress notReadyAddresses = 2;
+
+ // Port numbers available on the related IP addresses.
+ // +optional
+ repeated EndpointPort ports = 3;
+}
+
+// Endpoints is a collection of endpoints that implement the actual service. Example:
+// Name: "mysvc",
+// Subsets: [
+// {
+// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
+// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
+// },
+// {
+// Addresses: [{"ip": "10.10.3.3"}],
+// Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}]
+// },
+// ]
+message Endpoints {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // The set of all endpoints is the union of all subsets. Addresses are placed into
+ // subsets according to the IPs they share. A single address with multiple ports,
+ // some of which are ready and some of which are not (because they come from
+ // different containers) will result in the address being displayed in different
+ // subsets for the different ports. No address will appear in both Addresses and
+ // NotReadyAddresses in the same subset.
+ // Sets of addresses and ports that comprise a service.
+ repeated EndpointSubset subsets = 2;
+}
+
+// EndpointsList is a list of endpoints.
+message EndpointsList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of endpoints.
+ repeated Endpoints items = 2;
+}
+
+// EnvFromSource represents the source of a set of ConfigMaps
+message EnvFromSource {
+ // An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.
+ // +optional
+ optional string prefix = 1;
+
+ // The ConfigMap to select from
+ // +optional
+ optional ConfigMapEnvSource configMapRef = 2;
+
+ // The Secret to select from
+ // +optional
+ optional SecretEnvSource secretRef = 3;
+}
+
+// EnvVar represents an environment variable present in a Container.
+message EnvVar {
+ // Name of the environment variable. Must be a C_IDENTIFIER.
+ optional string name = 1;
+
+ // Variable references $(VAR_NAME) are expanded
+ // using the previous defined environment variables in the container and
+ // any service environment variables. If a variable cannot be resolved,
+ // the reference in the input string will be unchanged. The $(VAR_NAME)
+ // syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped
+ // references will never be expanded, regardless of whether the variable
+ // exists or not.
+ // Defaults to "".
+ // +optional
+ optional string value = 2;
+
+ // Source for the environment variable's value. Cannot be used if value is not empty.
+ // +optional
+ optional EnvVarSource valueFrom = 3;
+}
+
+// EnvVarSource represents a source for the value of an EnvVar.
+message EnvVarSource {
+ // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations,
+ // spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP.
+ // +optional
+ optional ObjectFieldSelector fieldRef = 1;
+
+ // Selects a resource of the container: only resources limits and requests
+ // (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
+ // +optional
+ optional ResourceFieldSelector resourceFieldRef = 2;
+
+ // Selects a key of a ConfigMap.
+ // +optional
+ optional ConfigMapKeySelector configMapKeyRef = 3;
+
+ // Selects a key of a secret in the pod's namespace
+ // +optional
+ optional SecretKeySelector secretKeyRef = 4;
+}
+
+// Event is a report of an event somewhere in the cluster.
+// TODO: Decide whether to store these separately or with the object they apply to.
+message Event {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // The object that this event is about.
+ optional ObjectReference involvedObject = 2;
+
+ // This should be a short, machine understandable string that gives the reason
+ // for the transition into the object's current status.
+ // TODO: provide exact specification for format.
+ // +optional
+ optional string reason = 3;
+
+ // A human-readable description of the status of this operation.
+ // TODO: decide on maximum length.
+ // +optional
+ optional string message = 4;
+
+ // The component reporting this event. Should be a short machine understandable string.
+ // +optional
+ optional EventSource source = 5;
+
+ // The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time firstTimestamp = 6;
+
+ // The time at which the most recent occurrence of this event was recorded.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTimestamp = 7;
+
+ // The number of times this event has occurred.
+ // +optional
+ optional int32 count = 8;
+
+ // Type of this event (Normal, Warning), new types could be added in the future
+ // +optional
+ optional string type = 9;
+}
+
+// EventList is a list of events.
+message EventList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of events
+ repeated Event items = 2;
+}
+
+// EventSource contains information for an event.
+message EventSource {
+ // Component from which the event is generated.
+ // +optional
+ optional string component = 1;
+
+ // Node name on which the event is generated.
+ // +optional
+ optional string host = 2;
+}
+
+// ExecAction describes a "run in container" action.
+message ExecAction {
+ // Command is the command line to execute inside the container, the working directory for the
+ // command is root ('/') in the container's filesystem. The command is simply exec'd, it is
+ // not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use
+ // a shell, you need to explicitly call out to that shell.
+ // Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
+ // +optional
+ repeated string command = 1;
+}
+
+// Represents a Fibre Channel volume.
+// Fibre Channel volumes can only be mounted as read/write once.
+// Fibre Channel volumes support ownership management and SELinux relabeling.
+message FCVolumeSource {
+ // Required: FC target worldwide names (WWNs)
+ repeated string targetWWNs = 1;
+
+ // Required: FC target lun number
+ optional int32 lun = 2;
+
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ optional string fsType = 3;
+
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ optional bool readOnly = 4;
+}
+
+// FlexVolume represents a generic volume resource that is
+// provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.
+message FlexVolumeSource {
+ // Driver is the name of the driver to use for this volume.
+ optional string driver = 1;
+
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script.
+ // +optional
+ optional string fsType = 2;
+
+ // Optional: SecretRef is reference to the secret object containing
+ // sensitive information to pass to the plugin scripts. This may be
+ // empty if no secret object is specified. If the secret object
+ // contains more than one secret, all secrets are passed to the plugin
+ // scripts.
+ // +optional
+ optional LocalObjectReference secretRef = 3;
+
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ optional bool readOnly = 4;
+
+ // Optional: Extra command options if any.
+ // +optional
+ map<string, string> options = 5;
+}
+
+// Represents a Flocker volume mounted by the Flocker agent.
+// One and only one of datasetName and datasetUUID should be set.
+// Flocker volumes do not support ownership management or SELinux relabeling.
+message FlockerVolumeSource {
+ // Name of the dataset stored as metadata -> name on the dataset for Flocker
+ // should be considered as deprecated
+ // +optional
+ optional string datasetName = 1;
+
+ // UUID of the dataset. This is unique identifier of a Flocker dataset
+ // +optional
+ optional string datasetUUID = 2;
+}
+
+// Represents a Persistent Disk resource in Google Compute Engine.
+//
+// A GCE PD must exist before mounting to a container. The disk must
+// also be in the same GCE project and zone as the kubelet. A GCE PD
+// can only be mounted as read/write once or read-only many times. GCE
+// PDs support ownership management and SELinux relabeling.
+message GCEPersistentDiskVolumeSource {
+ // Unique name of the PD resource in GCE. Used to identify the disk in GCE.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ optional string pdName = 1;
+
+ // Filesystem type of the volume that you want to mount.
+ // Tip: Ensure that the filesystem type is supported by the host operating system.
+ // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ optional string fsType = 2;
+
+ // The partition in the volume that you want to mount.
+ // If omitted, the default is to mount by volume name.
+ // Examples: For volume /dev/sda1, you specify the partition as "1".
+ // Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ // +optional
+ optional int32 partition = 3;
+
+ // ReadOnly here will force the ReadOnly setting in VolumeMounts.
+ // Defaults to false.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ // +optional
+ optional bool readOnly = 4;
+}
+
+// Represents a volume that is populated with the contents of a git repository.
+// Git repo volumes do not support ownership management.
+// Git repo volumes support SELinux relabeling.
+message GitRepoVolumeSource {
+ // Repository URL
+ optional string repository = 1;
+
+ // Commit hash for the specified revision.
+ // +optional
+ optional string revision = 2;
+
+ // Target directory name.
+ // Must not contain or start with '..'. If '.' is supplied, the volume directory will be the
+ // git repository. Otherwise, if specified, the volume will contain the git repository in
+ // the subdirectory with the given name.
+ // +optional
+ optional string directory = 3;
+}
+
+// Represents a Glusterfs mount that lasts the lifetime of a pod.
+// Glusterfs volumes do not support ownership management or SELinux relabeling.
+message GlusterfsVolumeSource {
+ // EndpointsName is the endpoint name that details Glusterfs topology.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
+ optional string endpoints = 1;
+
+ // Path is the Glusterfs volume path.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
+ optional string path = 2;
+
+ // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions.
+ // Defaults to false.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
+ // +optional
+ optional bool readOnly = 3;
+}
+
+// HTTPGetAction describes an action based on HTTP Get requests.
+message HTTPGetAction {
+ // Path to access on the HTTP server.
+ // +optional
+ optional string path = 1;
+
+ // Name or number of the port to access on the container.
+ // Number must be in the range 1 to 65535.
+ // Name must be an IANA_SVC_NAME.
+ optional k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 2;
+
+ // Host name to connect to, defaults to the pod IP. You probably want to set
+ // "Host" in httpHeaders instead.
+ // +optional
+ optional string host = 3;
+
+ // Scheme to use for connecting to the host.
+ // Defaults to HTTP.
+ // +optional
+ optional string scheme = 4;
+
+ // Custom headers to set in the request. HTTP allows repeated headers.
+ // +optional
+ repeated HTTPHeader httpHeaders = 5;
+}
+
+// HTTPHeader describes a custom header to be used in HTTP probes
+message HTTPHeader {
+ // The header field name
+ optional string name = 1;
+
+ // The header field value
+ optional string value = 2;
+}
+
+// Handler defines a specific action that should be taken
+// TODO: pass structured data to these actions, and document that data here.
+message Handler {
+ // One and only one of the following should be specified.
+ // Exec specifies the action to take.
+ // +optional
+ optional ExecAction exec = 1;
+
+ // HTTPGet specifies the http request to perform.
+ // +optional
+ optional HTTPGetAction httpGet = 2;
+
+ // TCPSocket specifies an action involving a TCP port.
+ // TCP hooks not yet supported
+ // TODO: implement a realistic TCP lifecycle hook
+ // +optional
+ optional TCPSocketAction tcpSocket = 3;
+}
+
+// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
+// pod's hosts file.
+message HostAlias {
+ // IP address of the host file entry.
+ optional string ip = 1;
+
+ // Hostnames for the above IP address.
+ repeated string hostnames = 2;
+}
+
+// Represents a host path mapped into a pod.
+// Host path volumes do not support ownership management or SELinux relabeling.
+message HostPathVolumeSource {
+ // Path of the directory on the host.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
+ optional string path = 1;
+}
+
+// Represents an ISCSI disk.
+// ISCSI volumes can only be mounted as read/write once.
+// ISCSI volumes support ownership management and SELinux relabeling.
+message ISCSIVolumeSource {
+ // iSCSI target portal. The portal is either an IP or ip_addr:port if the port
+ // is other than default (typically TCP ports 860 and 3260).
+ optional string targetPortal = 1;
+
+ // Target iSCSI Qualified Name.
+ optional string iqn = 2;
+
+ // iSCSI target lun number.
+ optional int32 lun = 3;
+
+ // Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport.
+ // +optional
+ optional string iscsiInterface = 4;
+
+ // Filesystem type of the volume that you want to mount.
+ // Tip: Ensure that the filesystem type is supported by the host operating system.
+ // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ optional string fsType = 5;
+
+ // ReadOnly here will force the ReadOnly setting in VolumeMounts.
+ // Defaults to false.
+ // +optional
+ optional bool readOnly = 6;
+
+ // iSCSI target portal List. The portal is either an IP or ip_addr:port if the port
+ // is other than default (typically TCP ports 860 and 3260).
+ // +optional
+ repeated string portals = 7;
+
+ // whether support iSCSI Discovery CHAP authentication
+ // +optional
+ optional bool chapAuthDiscovery = 8;
+
+ // whether support iSCSI Session CHAP authentication
+ // +optional
+ optional bool chapAuthSession = 11;
+
+ // CHAP secret for iSCSI target and initiator authentication
+ // +optional
+ optional LocalObjectReference secretRef = 10;
+}
+
+// Maps a string key to a path within a volume.
+message KeyToPath {
+ // The key to project.
+ optional string key = 1;
+
+ // The relative path of the file to map the key to.
+ // May not be an absolute path.
+ // May not contain the path element '..'.
+ // May not start with the string '..'.
+ optional string path = 2;
+
+ // Optional: mode bits to use on this file, must be a value between 0
+ // and 0777. If not specified, the volume defaultMode will be used.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ optional int32 mode = 3;
+}
+
+// Lifecycle describes actions that the management system should take in response to container lifecycle
+// events. For the PostStart and PreStop lifecycle handlers, management of the container blocks
+// until the action is complete, unless the container process fails, in which case the handler is aborted.
+message Lifecycle {
+ // PostStart is called immediately after a container is created. If the handler fails,
+ // the container is terminated and restarted according to its restart policy.
+ // Other management of the container blocks until the hook completes.
+ // More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
+ // +optional
+ optional Handler postStart = 1;
+
+ // PreStop is called immediately before a container is terminated.
+ // The container is terminated after the handler completes.
+ // The reason for termination is passed to the handler.
+ // Regardless of the outcome of the handler, the container is eventually terminated.
+ // Other management of the container blocks until the hook completes.
+ // More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
+ // +optional
+ optional Handler preStop = 2;
+}
+
+// LimitRange sets resource usage limits for each kind of resource in a Namespace.
+message LimitRange {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec defines the limits enforced.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional LimitRangeSpec spec = 2;
+}
+
+// LimitRangeItem defines a min/max usage limit for any resource that matches on kind.
+message LimitRangeItem {
+ // Type of resource that this limit applies to.
+ // +optional
+ optional string type = 1;
+
+ // Max usage constraints on this kind by resource name.
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> max = 2;
+
+ // Min usage constraints on this kind by resource name.
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> min = 3;
+
+ // Default resource requirement limit value by resource name if resource limit is omitted.
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> default = 4;
+
+ // DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> defaultRequest = 5;
+
+ // MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> maxLimitRequestRatio = 6;
+}
+
+// LimitRangeList is a list of LimitRange items.
+message LimitRangeList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of LimitRange objects.
+ // More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_limit_range.md
+ repeated LimitRange items = 2;
+}
+
+// LimitRangeSpec defines a min/max usage limit for resources that match on kind.
+message LimitRangeSpec {
+ // Limits is the list of LimitRangeItem objects that are enforced.
+ repeated LimitRangeItem limits = 1;
+}
+
+// List holds a list of objects, which may not be known by the server.
+message List {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of objects
+ repeated k8s.io.apimachinery.pkg.runtime.RawExtension items = 2;
+}
+
+// ListOptions is the query options to a standard REST list call.
+// DEPRECATED: This type has been moved to meta/v1 and will be removed soon.
+// +k8s:openapi-gen=false
+message ListOptions {
+ // A selector to restrict the list of returned objects by their labels.
+ // Defaults to everything.
+ // +optional
+ optional string labelSelector = 1;
+
+ // A selector to restrict the list of returned objects by their fields.
+ // Defaults to everything.
+ // +optional
+ optional string fieldSelector = 2;
+
+ // If true, partially initialized resources are included in the response.
+ // +optional
+ optional bool includeUninitialized = 6;
+
+ // Watch for changes to the described resources and return them as a stream of
+ // add, update, and remove notifications. Specify resourceVersion.
+ // +optional
+ optional bool watch = 3;
+
+ // When specified with a watch call, shows changes that occur after that particular version of a resource.
+ // Defaults to changes from the beginning of history.
+ // When specified for list:
+ // - if unset, then the result is returned from remote storage based on quorum-read flag;
+ // - if it's 0, then we simply return what we currently have in cache, no guarantee;
+ // - if set to non zero, then the result is at least as fresh as given rv.
+ // +optional
+ optional string resourceVersion = 4;
+
+ // Timeout for the list/watch call.
+ // +optional
+ optional int64 timeoutSeconds = 5;
+}
+
+// LoadBalancerIngress represents the status of a load-balancer ingress point:
+// traffic intended for the service should be sent to an ingress point.
+message LoadBalancerIngress {
+ // IP is set for load-balancer ingress points that are IP based
+ // (typically GCE or OpenStack load-balancers)
+ // +optional
+ optional string ip = 1;
+
+ // Hostname is set for load-balancer ingress points that are DNS based
+ // (typically AWS load-balancers)
+ // +optional
+ optional string hostname = 2;
+}
+
+// LoadBalancerStatus represents the status of a load-balancer.
+message LoadBalancerStatus {
+ // Ingress is a list containing ingress points for the load-balancer.
+ // Traffic intended for the service should be sent to these ingress points.
+ // +optional
+ repeated LoadBalancerIngress ingress = 1;
+}
+
+// LocalObjectReference contains enough information to let you locate the
+// referenced object inside the same namespace.
+message LocalObjectReference {
+ // Name of the referent.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ // TODO: Add other useful fields. apiVersion, kind, uid?
+ // +optional
+ optional string name = 1;
+}
+
+// Local represents directly-attached storage with node affinity
+message LocalVolumeSource {
+ // The full path to the volume on the node
+ // For alpha, this path must be a directory
+ // Once block as a source is supported, then this path can point to a block device
+ optional string path = 1;
+}
+
+// Represents an NFS mount that lasts the lifetime of a pod.
+// NFS volumes do not support ownership management or SELinux relabeling.
+message NFSVolumeSource {
+ // Server is the hostname or IP address of the NFS server.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+ optional string server = 1;
+
+ // Path that is exported by the NFS server.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+ optional string path = 2;
+
+ // ReadOnly here will force
+ // the NFS export to be mounted with read-only permissions.
+ // Defaults to false.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+ // +optional
+ optional bool readOnly = 3;
+}
+
+// Namespace provides a scope for Names.
+// Use of multiple namespaces is optional.
+message Namespace {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec defines the behavior of the Namespace.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional NamespaceSpec spec = 2;
+
+ // Status describes the current status of a Namespace.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional NamespaceStatus status = 3;
+}
+
+// NamespaceList is a list of Namespaces.
+message NamespaceList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is the list of Namespace objects in the list.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
+ repeated Namespace items = 2;
+}
+
+// NamespaceSpec describes the attributes on a Namespace.
+message NamespaceSpec {
+ // Finalizers is an opaque list of values that must be empty to permanently remove object from storage.
+ // More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#finalizers
+ // +optional
+ repeated string finalizers = 1;
+}
+
+// NamespaceStatus is information about the current status of a Namespace.
+message NamespaceStatus {
+ // Phase is the current lifecycle phase of the namespace.
+ // More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#phases
+ // +optional
+ optional string phase = 1;
+}
+
+// Node is a worker node in Kubernetes.
+// Each node will have a unique identifier in the cache (i.e. in etcd).
+message Node {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec defines the behavior of a node.
+ // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional NodeSpec spec = 2;
+
+ // Most recently observed status of the node.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional NodeStatus status = 3;
+}
+
+// NodeAddress contains information for the node's address.
+message NodeAddress {
+ // Node address type, one of Hostname, ExternalIP or InternalIP.
+ optional string type = 1;
+
+ // The node address.
+ optional string address = 2;
+}
+
+// Node affinity is a group of node affinity scheduling rules.
+message NodeAffinity {
+ // If the affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to an update), the system
+ // may or may not try to eventually evict the pod from its node.
+ // +optional
+ optional NodeSelector requiredDuringSchedulingIgnoredDuringExecution = 1;
+
+ // The scheduler will prefer to schedule pods to nodes that satisfy
+ // the affinity expressions specified by this field, but it may choose
+ // a node that violates one or more of the expressions. The node that is
+ // most preferred is the one with the greatest sum of weights, i.e.
+ // for each node that meets all of the scheduling requirements (resource
+ // request, requiredDuringScheduling affinity expressions, etc.),
+ // compute a sum by iterating through the elements of this field and adding
+ // "weight" to the sum if the node matches the corresponding matchExpressions; the
+ // node(s) with the highest sum are the most preferred.
+ // +optional
+ repeated PreferredSchedulingTerm preferredDuringSchedulingIgnoredDuringExecution = 2;
+}
+
+// NodeCondition contains condition information for a node.
+message NodeCondition {
+ // Type of node condition.
+ optional string type = 1;
+
+ // Status of the condition, one of True, False, Unknown.
+ optional string status = 2;
+
+ // Last time we got an update on a given condition.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastHeartbeatTime = 3;
+
+ // Last time the condition transit from one status to another.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4;
+
+ // (brief) reason for the condition's last transition.
+ // +optional
+ optional string reason = 5;
+
+ // Human readable message indicating details about last transition.
+ // +optional
+ optional string message = 6;
+}
+
+// NodeDaemonEndpoints lists ports opened by daemons running on the Node.
+message NodeDaemonEndpoints {
+ // Endpoint on which Kubelet is listening.
+ // +optional
+ optional DaemonEndpoint kubeletEndpoint = 1;
+}
+
+// NodeList is the whole list of all Nodes which have been registered with master.
+message NodeList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of nodes
+ repeated Node items = 2;
+}
+
+// NodeProxyOptions is the query options to a Node's proxy call.
+message NodeProxyOptions {
+ // Path is the URL path to use for the current proxy request to node.
+ // +optional
+ optional string path = 1;
+}
+
+// NodeResources is an object for conveying resource information about a node.
+// see http://releases.k8s.io/HEAD/docs/design/resources.md for more details.
+message NodeResources {
+ // Capacity represents the available resources of a node
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> capacity = 1;
+}
+
+// A node selector represents the union of the results of one or more label queries
+// over a set of nodes; that is, it represents the OR of the selectors represented
+// by the node selector terms.
+message NodeSelector {
+ // Required. A list of node selector terms. The terms are ORed.
+ repeated NodeSelectorTerm nodeSelectorTerms = 1;
+}
+
+// A node selector requirement is a selector that contains values, a key, and an operator
+// that relates the key and values.
+message NodeSelectorRequirement {
+ // The label key that the selector applies to.
+ // +patchMergeKey=key
+ // +patchStrategy=merge
+ optional string key = 1;
+
+ // Represents a key's relationship to a set of values.
+ // Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
+ optional string operator = 2;
+
+ // An array of string values. If the operator is In or NotIn,
+ // the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ // the values array must be empty. If the operator is Gt or Lt, the values
+ // array must have a single element, which will be interpreted as an integer.
+ // This array is replaced during a strategic merge patch.
+ // +optional
+ repeated string values = 3;
+}
+
+// A null or empty node selector term matches no objects.
+message NodeSelectorTerm {
+ // Required. A list of node selector requirements. The requirements are ANDed.
+ repeated NodeSelectorRequirement matchExpressions = 1;
+}
+
+// NodeSpec describes the attributes that a node is created with.
+message NodeSpec {
+ // PodCIDR represents the pod IP range assigned to the node.
+ // +optional
+ optional string podCIDR = 1;
+
+ // External ID of the node assigned by some machine database (e.g. a cloud provider).
+ // Deprecated.
+ // +optional
+ optional string externalID = 2;
+
+ // ID of the node assigned by the cloud provider in the format: <ProviderName>://<ProviderSpecificNodeID>
+ // +optional
+ optional string providerID = 3;
+
+ // Unschedulable controls node schedulability of new pods. By default, node is schedulable.
+ // More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration
+ // +optional
+ optional bool unschedulable = 4;
+
+ // If specified, the node's taints.
+ // +optional
+ repeated Taint taints = 5;
+}
+
+// NodeStatus is information about the current status of a node.
+message NodeStatus {
+ // Capacity represents the total resources of a node.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> capacity = 1;
+
+ // Allocatable represents the resources of a node that are available for scheduling.
+ // Defaults to Capacity.
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> allocatable = 2;
+
+ // NodePhase is the recently observed lifecycle phase of the node.
+ // More info: https://kubernetes.io/docs/concepts/nodes/node/#phase
+ // The field is never populated, and now is deprecated.
+ // +optional
+ optional string phase = 3;
+
+ // Conditions is an array of current observed node conditions.
+ // More info: https://kubernetes.io/docs/concepts/nodes/node/#condition
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ repeated NodeCondition conditions = 4;
+
+ // List of addresses reachable to the node.
+ // Queried from cloud provider, if available.
+ // More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ repeated NodeAddress addresses = 5;
+
+ // Endpoints of daemons running on the Node.
+ // +optional
+ optional NodeDaemonEndpoints daemonEndpoints = 6;
+
+ // Set of ids/uuids to uniquely identify the node.
+ // More info: https://kubernetes.io/docs/concepts/nodes/node/#info
+ // +optional
+ optional NodeSystemInfo nodeInfo = 7;
+
+ // List of container images on this node
+ // +optional
+ repeated ContainerImage images = 8;
+
+ // List of attachable volumes in use (mounted) by the node.
+ // +optional
+ repeated string volumesInUse = 9;
+
+ // List of volumes that are attached to the node.
+ // +optional
+ repeated AttachedVolume volumesAttached = 10;
+}
+
+// NodeSystemInfo is a set of ids/uuids to uniquely identify the node.
+message NodeSystemInfo {
+ // MachineID reported by the node. For unique machine identification
+ // in the cluster this field is preferred. Learn more from man(5)
+ // machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html
+ optional string machineID = 1;
+
+ // SystemUUID reported by the node. For unique machine identification
+ // MachineID is preferred. This field is specific to Red Hat hosts
+ // https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html
+ optional string systemUUID = 2;
+
+ // Boot ID reported by the node.
+ optional string bootID = 3;
+
+ // Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).
+ optional string kernelVersion = 4;
+
+ // OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).
+ optional string osImage = 5;
+
+ // ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0).
+ optional string containerRuntimeVersion = 6;
+
+ // Kubelet Version reported by the node.
+ optional string kubeletVersion = 7;
+
+ // KubeProxy Version reported by the node.
+ optional string kubeProxyVersion = 8;
+
+ // The Operating System reported by the node
+ optional string operatingSystem = 9;
+
+ // The Architecture reported by the node
+ optional string architecture = 10;
+}
+
+// ObjectFieldSelector selects an APIVersioned field of an object.
+message ObjectFieldSelector {
+ // Version of the schema the FieldPath is written in terms of, defaults to "v1".
+ // +optional
+ optional string apiVersion = 1;
+
+ // Path of the field to select in the specified API version.
+ optional string fieldPath = 2;
+}
+
+// ObjectMeta is metadata that all persisted resources must have, which includes all objects
+// users must create.
+// DEPRECATED: Use k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta instead - this type will be removed soon.
+// +k8s:openapi-gen=false
+message ObjectMeta {
+ // Name must be unique within a namespace. Is required when creating resources, although
+ // some resources may allow a client to request the generation of an appropriate name
+ // automatically. Name is primarily intended for creation idempotence and configuration
+ // definition.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ // +optional
+ optional string name = 1;
+
+ // GenerateName is an optional prefix, used by the server, to generate a unique
+ // name ONLY IF the Name field has not been provided.
+ // If this field is used, the name returned to the client will be different
+ // than the name passed. This value will also be combined with a unique suffix.
+ // The provided value has the same validation rules as the Name field,
+ // and may be truncated by the length of the suffix required to make the value
+ // unique on the server.
+ //
+ // If this field is specified and the generated name exists, the server will
+ // NOT return a 409 - instead, it will either return 201 Created or 500 with Reason
+ // ServerTimeout indicating a unique name could not be found in the time allotted, and the client
+ // should retry (optionally after the time indicated in the Retry-After header).
+ //
+ // Applied only if Name is not specified.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency
+ // +optional
+ optional string generateName = 2;
+
+ // Namespace defines the space within each name must be unique. An empty namespace is
+ // equivalent to the "default" namespace, but "default" is the canonical representation.
+ // Not all objects are required to be scoped to a namespace - the value of this field for
+ // those objects will be empty.
+ //
+ // Must be a DNS_LABEL.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
+ // +optional
+ optional string namespace = 3;
+
+ // SelfLink is a URL representing this object.
+ // Populated by the system.
+ // Read-only.
+ // +optional
+ optional string selfLink = 4;
+
+ // UID is the unique in time and space value for this object. It is typically generated by
+ // the server on successful creation of a resource and is not allowed to change on PUT
+ // operations.
+ //
+ // Populated by the system.
+ // Read-only.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
+ // +optional
+ optional string uid = 5;
+
+ // An opaque value that represents the internal version of this object that can
+ // be used by clients to determine when objects have changed. May be used for optimistic
+ // concurrency, change detection, and the watch operation on a resource or set of resources.
+ // Clients must treat these values as opaque and passed unmodified back to the server.
+ // They may only be valid for a particular resource or set of resources.
+ //
+ // Populated by the system.
+ // Read-only.
+ // Value must be treated as opaque by clients and .
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
+ // +optional
+ optional string resourceVersion = 6;
+
+ // A sequence number representing a specific generation of the desired state.
+ // Populated by the system. Read-only.
+ // +optional
+ optional int64 generation = 7;
+
+ // CreationTimestamp is a timestamp representing the server time when this object was
+ // created. It is not guaranteed to be set in happens-before order across separate operations.
+ // Clients may not set this value. It is represented in RFC3339 form and is in UTC.
+ //
+ // Populated by the system.
+ // Read-only.
+ // Null for lists.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time creationTimestamp = 8;
+
+ // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This
+ // field is set by the server when a graceful deletion is requested by the user, and is not
+ // directly settable by a client. The resource is expected to be deleted (no longer visible
+ // from resource lists, and not reachable by name) after the time in this field. Once set,
+ // this value may not be unset or be set further into the future, although it may be shortened
+ // or the resource may be deleted prior to this time. For example, a user may request that
+ // a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination
+ // signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard
+ // termination signal (SIGKILL) to the container and after cleanup, remove the pod from the
+ // API. In the presence of network partitions, this object may still exist after this
+ // timestamp, until an administrator or automated process can determine the resource is
+ // fully terminated.
+ // If not set, graceful deletion of the object has not been requested.
+ //
+ // Populated by the system when a graceful deletion is requested.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time deletionTimestamp = 9;
+
+ // Number of seconds allowed for this object to gracefully terminate before
+ // it will be removed from the system. Only set when deletionTimestamp is also set.
+ // May only be shortened.
+ // Read-only.
+ // +optional
+ optional int64 deletionGracePeriodSeconds = 10;
+
+ // Map of string keys and values that can be used to organize and categorize
+ // (scope and select) objects. May match selectors of replication controllers
+ // and services.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
+ // +optional
+ map<string, string> labels = 11;
+
+ // Annotations is an unstructured key value map stored with a resource that may be
+ // set by external tools to store and retrieve arbitrary metadata. They are not
+ // queryable and should be preserved when modifying objects.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
+ // +optional
+ map<string, string> annotations = 12;
+
+ // List of objects depended by this object. If ALL objects in the list have
+ // been deleted, this object will be garbage collected. If this object is managed by a controller,
+ // then an entry in this list will point to this controller, with the controller field set to true.
+ // There cannot be more than one managing controller.
+ // +optional
+ // +patchMergeKey=uid
+ // +patchStrategy=merge
+ repeated k8s.io.apimachinery.pkg.apis.meta.v1.OwnerReference ownerReferences = 13;
+
+ // An initializer is a controller which enforces some system invariant at object creation time.
+ // This field is a list of initializers that have not yet acted on this object. If nil or empty,
+ // this object has been completely initialized. Otherwise, the object is considered uninitialized
+ // and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to
+ // observe uninitialized objects.
+ //
+ // When an object is created, the system will populate this list with the current set of initializers.
+ // Only privileged users may set or modify this list. Once it is empty, it may not be modified further
+ // by any user.
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Initializers initializers = 16;
+
+ // Must be empty before the object is deleted from the registry. Each entry
+ // is an identifier for the responsible component that will remove the entry
+ // from the list. If the deletionTimestamp of the object is non-nil, entries
+ // in this list can only be removed.
+ // +optional
+ // +patchStrategy=merge
+ repeated string finalizers = 14;
+
+ // The name of the cluster which the object belongs to.
+ // This is used to distinguish resources with same name and namespace in different clusters.
+ // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.
+ // +optional
+ optional string clusterName = 15;
+}
+
+// ObjectReference contains enough information to let you inspect or modify the referred object.
+message ObjectReference {
+ // Kind of the referent.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional string kind = 1;
+
+ // Namespace of the referent.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
+ // +optional
+ optional string namespace = 2;
+
+ // Name of the referent.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ // +optional
+ optional string name = 3;
+
+ // UID of the referent.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
+ // +optional
+ optional string uid = 4;
+
+ // API version of the referent.
+ // +optional
+ optional string apiVersion = 5;
+
+ // Specific resourceVersion to which this reference is made, if any.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
+ // +optional
+ optional string resourceVersion = 6;
+
+ // If referring to a piece of an object instead of an entire object, this string
+ // should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
+ // For example, if the object reference is to a container within a pod, this would take on a value like:
+ // "spec.containers{name}" (where "name" refers to the name of the container that triggered
+ // the event) or if no container name is specified "spec.containers[2]" (container with
+ // index 2 in this pod). This syntax is chosen only to have some well-defined way of
+ // referencing a part of an object.
+ // TODO: this design is not final and this field is subject to change in the future.
+ // +optional
+ optional string fieldPath = 7;
+}
+
+// PersistentVolume (PV) is a storage resource provisioned by an administrator.
+// It is analogous to a node.
+// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
+message PersistentVolume {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec defines a specification of a persistent volume owned by the cluster.
+ // Provisioned by an administrator.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes
+ // +optional
+ optional PersistentVolumeSpec spec = 2;
+
+ // Status represents the current information/status for the persistent volume.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes
+ // +optional
+ optional PersistentVolumeStatus status = 3;
+}
+
+// PersistentVolumeClaim is a user's request for and claim to a persistent volume
+message PersistentVolumeClaim {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec defines the desired characteristics of a volume requested by a pod author.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+ // +optional
+ optional PersistentVolumeClaimSpec spec = 2;
+
+ // Status represents the current information/status of a persistent volume claim.
+ // Read-only.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+ // +optional
+ optional PersistentVolumeClaimStatus status = 3;
+}
+
+// PersistentVolumeClaimList is a list of PersistentVolumeClaim items.
+message PersistentVolumeClaimList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // A list of persistent volume claims.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+ repeated PersistentVolumeClaim items = 2;
+}
+
+// PersistentVolumeClaimSpec describes the common attributes of storage devices
+// and allows a Source for provider-specific attributes
+message PersistentVolumeClaimSpec {
+ // AccessModes contains the desired access modes the volume should have.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
+ // +optional
+ repeated string accessModes = 1;
+
+ // A label query over volumes to consider for binding.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
+
+ // Resources represents the minimum resources the volume should have.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
+ // +optional
+ optional ResourceRequirements resources = 2;
+
+ // VolumeName is the binding reference to the PersistentVolume backing this claim.
+ // +optional
+ optional string volumeName = 3;
+
+ // Name of the StorageClass required by the claim.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
+ // +optional
+ optional string storageClassName = 5;
+}
+
+// PersistentVolumeClaimStatus is the current status of a persistent volume claim.
+message PersistentVolumeClaimStatus {
+ // Phase represents the current phase of PersistentVolumeClaim.
+ // +optional
+ optional string phase = 1;
+
+ // AccessModes contains the actual access modes the volume backing the PVC has.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
+ // +optional
+ repeated string accessModes = 2;
+
+ // Represents the actual resources of the underlying volume.
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> capacity = 3;
+}
+
+// PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace.
+// This volume finds the bound PV and mounts that volume for the pod. A
+// PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another
+// type of volume that is owned by someone else (the system).
+message PersistentVolumeClaimVolumeSource {
+ // ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+ optional string claimName = 1;
+
+ // Will force the ReadOnly setting in VolumeMounts.
+ // Default false.
+ // +optional
+ optional bool readOnly = 2;
+}
+
+// PersistentVolumeList is a list of PersistentVolume items.
+message PersistentVolumeList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of persistent volumes.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
+ repeated PersistentVolume items = 2;
+}
+
+// PersistentVolumeSource is similar to VolumeSource but meant for the
+// administrator who creates PVs. Exactly one of its members must be set.
+message PersistentVolumeSource {
+ // GCEPersistentDisk represents a GCE Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod. Provisioned by an admin.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ // +optional
+ optional GCEPersistentDiskVolumeSource gcePersistentDisk = 1;
+
+ // AWSElasticBlockStore represents an AWS Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+ // +optional
+ optional AWSElasticBlockStoreVolumeSource awsElasticBlockStore = 2;
+
+ // HostPath represents a directory on the host.
+ // Provisioned by a developer or tester.
+ // This is useful for single-node development and testing only!
+ // On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
+ // +optional
+ optional HostPathVolumeSource hostPath = 3;
+
+ // Glusterfs represents a Glusterfs volume that is attached to a host and
+ // exposed to the pod. Provisioned by an admin.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md
+ // +optional
+ optional GlusterfsVolumeSource glusterfs = 4;
+
+ // NFS represents an NFS mount on the host. Provisioned by an admin.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+ // +optional
+ optional NFSVolumeSource nfs = 5;
+
+ // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md
+ // +optional
+ optional RBDVolumeSource rbd = 6;
+
+ // ISCSI represents an ISCSI Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod. Provisioned by an admin.
+ // +optional
+ optional ISCSIVolumeSource iscsi = 7;
+
+ // Cinder represents a cinder volume attached and mounted on kubelets host machine
+ // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ // +optional
+ optional CinderVolumeSource cinder = 8;
+
+ // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
+ // +optional
+ optional CephFSVolumeSource cephfs = 9;
+
+ // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
+ // +optional
+ optional FCVolumeSource fc = 10;
+
+ // Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running
+ // +optional
+ optional FlockerVolumeSource flocker = 11;
+
+ // FlexVolume represents a generic volume resource that is
+ // provisioned/attached using an exec based plugin. This is an
+ // alpha feature and may change in future.
+ // +optional
+ optional FlexVolumeSource flexVolume = 12;
+
+ // AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
+ // +optional
+ optional AzureFileVolumeSource azureFile = 13;
+
+ // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
+ // +optional
+ optional VsphereVirtualDiskVolumeSource vsphereVolume = 14;
+
+ // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
+ // +optional
+ optional QuobyteVolumeSource quobyte = 15;
+
+ // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
+ // +optional
+ optional AzureDiskVolumeSource azureDisk = 16;
+
+ // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine
+ optional PhotonPersistentDiskVolumeSource photonPersistentDisk = 17;
+
+ // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine
+ // +optional
+ optional PortworxVolumeSource portworxVolume = 18;
+
+ // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
+ // +optional
+ optional ScaleIOVolumeSource scaleIO = 19;
+
+ // Local represents directly-attached storage with node affinity
+ // +optional
+ optional LocalVolumeSource local = 20;
+
+ // StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md
+ // +optional
+ optional StorageOSPersistentVolumeSource storageos = 21;
+}
+
+// PersistentVolumeSpec is the specification of a persistent volume.
+message PersistentVolumeSpec {
+ // A description of the persistent volume's resources and capacity.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> capacity = 1;
+
+ // The actual volume backing the persistent volume.
+ optional PersistentVolumeSource persistentVolumeSource = 2;
+
+ // AccessModes contains all ways the volume can be mounted.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes
+ // +optional
+ repeated string accessModes = 3;
+
+ // ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim.
+ // Expected to be non-nil when bound.
+ // claim.VolumeName is the authoritative bind between PV and PVC.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding
+ // +optional
+ optional ObjectReference claimRef = 4;
+
+ // What happens to a persistent volume when released from its claim.
+ // Valid options are Retain (default) and Recycle.
+ // Recycling must be supported by the volume plugin underlying this persistent volume.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming
+ // +optional
+ optional string persistentVolumeReclaimPolicy = 5;
+
+ // Name of StorageClass to which this persistent volume belongs. Empty value
+ // means that this volume does not belong to any StorageClass.
+ // +optional
+ optional string storageClassName = 6;
+}
+
+// PersistentVolumeStatus is the current status of a persistent volume.
+message PersistentVolumeStatus {
+ // Phase indicates if a volume is available, bound to a claim, or released by a claim.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase
+ // +optional
+ optional string phase = 1;
+
+ // A human-readable message indicating details about why the volume is in this state.
+ // +optional
+ optional string message = 2;
+
+ // Reason is a brief CamelCase string that describes any failure and is meant
+ // for machine parsing and tidy display in the CLI.
+ // +optional
+ optional string reason = 3;
+}
+
+// Represents a Photon Controller persistent disk resource.
+message PhotonPersistentDiskVolumeSource {
+ // ID that identifies Photon Controller persistent disk
+ optional string pdID = 1;
+
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ optional string fsType = 2;
+}
+
+// Pod is a collection of containers that can run on a host. This resource is created
+// by clients and scheduled onto hosts.
+message Pod {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Specification of the desired behavior of the pod.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional PodSpec spec = 2;
+
+ // Most recently observed status of the pod.
+ // This data may not be up to date.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional PodStatus status = 3;
+}
+
+// Pod affinity is a group of inter pod affinity scheduling rules.
+message PodAffinity {
+ // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented.
+ // If the affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to a pod label update), the
+ // system will try to eventually evict the pod from its node.
+ // When there are multiple elements, the lists of nodes corresponding to each
+ // podAffinityTerm are intersected, i.e. all terms must be satisfied.
+ // +optional
+ // RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"`
+ // If the affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to a pod label update), the
+ // system may or may not try to eventually evict the pod from its node.
+ // When there are multiple elements, the lists of nodes corresponding to each
+ // podAffinityTerm are intersected, i.e. all terms must be satisfied.
+ // +optional
+ repeated PodAffinityTerm requiredDuringSchedulingIgnoredDuringExecution = 1;
+
+ // The scheduler will prefer to schedule pods to nodes that satisfy
+ // the affinity expressions specified by this field, but it may choose
+ // a node that violates one or more of the expressions. The node that is
+ // most preferred is the one with the greatest sum of weights, i.e.
+ // for each node that meets all of the scheduling requirements (resource
+ // request, requiredDuringScheduling affinity expressions, etc.),
+ // compute a sum by iterating through the elements of this field and adding
+ // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
+ // node(s) with the highest sum are the most preferred.
+ // +optional
+ repeated WeightedPodAffinityTerm preferredDuringSchedulingIgnoredDuringExecution = 2;
+}
+
+// Defines a set of pods (namely those matching the labelSelector
+// relative to the given namespace(s)) that this pod should be
+// co-located (affinity) or not co-located (anti-affinity) with,
+// where co-located is defined as running on a node whose value of
+// the label with key <topologyKey> tches that of any node on which
+// a pod of the set of pods is running
+message PodAffinityTerm {
+ // A label query over a set of resources, in this case pods.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector labelSelector = 1;
+
+ // namespaces specifies which namespaces the labelSelector applies to (matches against);
+ // null or empty list means "this pod's namespace"
+ repeated string namespaces = 2;
+
+ // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
+ // the labelSelector in the specified namespaces, where co-located is defined as running on a node
+ // whose value of the label with key topologyKey matches that of any node on which any of the
+ // selected pods is running.
+ // For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as "all topologies"
+ // ("all topologies" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains);
+ // for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed.
+ // +optional
+ optional string topologyKey = 3;
+}
+
+// Pod anti affinity is a group of inter pod anti affinity scheduling rules.
+message PodAntiAffinity {
+ // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented.
+ // If the anti-affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the anti-affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to a pod label update), the
+ // system will try to eventually evict the pod from its node.
+ // When there are multiple elements, the lists of nodes corresponding to each
+ // podAffinityTerm are intersected, i.e. all terms must be satisfied.
+ // +optional
+ // RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"`
+ // If the anti-affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the anti-affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to a pod label update), the
+ // system may or may not try to eventually evict the pod from its node.
+ // When there are multiple elements, the lists of nodes corresponding to each
+ // podAffinityTerm are intersected, i.e. all terms must be satisfied.
+ // +optional
+ repeated PodAffinityTerm requiredDuringSchedulingIgnoredDuringExecution = 1;
+
+ // The scheduler will prefer to schedule pods to nodes that satisfy
+ // the anti-affinity expressions specified by this field, but it may choose
+ // a node that violates one or more of the expressions. The node that is
+ // most preferred is the one with the greatest sum of weights, i.e.
+ // for each node that meets all of the scheduling requirements (resource
+ // request, requiredDuringScheduling anti-affinity expressions, etc.),
+ // compute a sum by iterating through the elements of this field and adding
+ // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
+ // node(s) with the highest sum are the most preferred.
+ // +optional
+ repeated WeightedPodAffinityTerm preferredDuringSchedulingIgnoredDuringExecution = 2;
+}
+
+// PodAttachOptions is the query options to a Pod's remote attach call.
+// ---
+// TODO: merge w/ PodExecOptions below for stdin, stdout, etc
+// and also when we cut V2, we should export a "StreamOptions" or somesuch that contains Stdin, Stdout, Stder and TTY
+message PodAttachOptions {
+ // Stdin if true, redirects the standard input stream of the pod for this call.
+ // Defaults to false.
+ // +optional
+ optional bool stdin = 1;
+
+ // Stdout if true indicates that stdout is to be redirected for the attach call.
+ // Defaults to true.
+ // +optional
+ optional bool stdout = 2;
+
+ // Stderr if true indicates that stderr is to be redirected for the attach call.
+ // Defaults to true.
+ // +optional
+ optional bool stderr = 3;
+
+ // TTY if true indicates that a tty will be allocated for the attach call.
+ // This is passed through the container runtime so the tty
+ // is allocated on the worker node by the container runtime.
+ // Defaults to false.
+ // +optional
+ optional bool tty = 4;
+
+ // The container in which to execute the command.
+ // Defaults to only container if there is only one container in the pod.
+ // +optional
+ optional string container = 5;
+}
+
+// PodCondition contains details for the current condition of this pod.
+message PodCondition {
+ // Type is the type of the condition.
+ // Currently only Ready.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
+ optional string type = 1;
+
+ // Status is the status of the condition.
+ // Can be True, False, Unknown.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
+ optional string status = 2;
+
+ // Last time we probed the condition.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastProbeTime = 3;
+
+ // Last time the condition transitioned from one status to another.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4;
+
+ // Unique, one-word, CamelCase reason for the condition's last transition.
+ // +optional
+ optional string reason = 5;
+
+ // Human-readable message indicating details about last transition.
+ // +optional
+ optional string message = 6;
+}
+
+// PodExecOptions is the query options to a Pod's remote exec call.
+// ---
+// TODO: This is largely identical to PodAttachOptions above, make sure they stay in sync and see about merging
+// and also when we cut V2, we should export a "StreamOptions" or somesuch that contains Stdin, Stdout, Stder and TTY
+message PodExecOptions {
+ // Redirect the standard input stream of the pod for this call.
+ // Defaults to false.
+ // +optional
+ optional bool stdin = 1;
+
+ // Redirect the standard output stream of the pod for this call.
+ // Defaults to true.
+ // +optional
+ optional bool stdout = 2;
+
+ // Redirect the standard error stream of the pod for this call.
+ // Defaults to true.
+ // +optional
+ optional bool stderr = 3;
+
+ // TTY if true indicates that a tty will be allocated for the exec call.
+ // Defaults to false.
+ // +optional
+ optional bool tty = 4;
+
+ // Container in which to execute the command.
+ // Defaults to only container if there is only one container in the pod.
+ // +optional
+ optional string container = 5;
+
+ // Command is the remote command to execute. argv array. Not executed within a shell.
+ repeated string command = 6;
+}
+
+// PodList is a list of Pods.
+message PodList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of pods.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md
+ repeated Pod items = 2;
+}
+
+// PodLogOptions is the query options for a Pod's logs REST call.
+message PodLogOptions {
+ // The container for which to stream logs. Defaults to only container if there is one container in the pod.
+ // +optional
+ optional string container = 1;
+
+ // Follow the log stream of the pod. Defaults to false.
+ // +optional
+ optional bool follow = 2;
+
+ // Return previous terminated container logs. Defaults to false.
+ // +optional
+ optional bool previous = 3;
+
+ // A relative time in seconds before the current time from which to show logs. If this value
+ // precedes the time a pod was started, only logs since the pod start will be returned.
+ // If this value is in the future, no logs will be returned.
+ // Only one of sinceSeconds or sinceTime may be specified.
+ // +optional
+ optional int64 sinceSeconds = 4;
+
+ // An RFC3339 timestamp from which to show logs. If this value
+ // precedes the time a pod was started, only logs since the pod start will be returned.
+ // If this value is in the future, no logs will be returned.
+ // Only one of sinceSeconds or sinceTime may be specified.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time sinceTime = 5;
+
+ // If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line
+ // of log output. Defaults to false.
+ // +optional
+ optional bool timestamps = 6;
+
+ // If set, the number of lines from the end of the logs to show. If not specified,
+ // logs are shown from the creation of the container or sinceSeconds or sinceTime
+ // +optional
+ optional int64 tailLines = 7;
+
+ // If set, the number of bytes to read from the server before terminating the
+ // log output. This may not display a complete final line of logging, and may return
+ // slightly more or slightly less than the specified limit.
+ // +optional
+ optional int64 limitBytes = 8;
+}
+
+// PodPortForwardOptions is the query options to a Pod's port forward call
+// when using WebSockets.
+// The `port` query parameter must specify the port or
+// ports (comma separated) to forward over.
+// Port forwarding over SPDY does not use these options. It requires the port
+// to be passed in the `port` header as part of request.
+message PodPortForwardOptions {
+ // List of ports to forward
+ // Required when using WebSockets
+ // +optional
+ repeated int32 ports = 1;
+}
+
+// PodProxyOptions is the query options to a Pod's proxy call.
+message PodProxyOptions {
+ // Path is the URL path to use for the current proxy request to pod.
+ // +optional
+ optional string path = 1;
+}
+
+// PodSecurityContext holds pod-level security attributes and common container settings.
+// Some fields are also present in container.securityContext. Field values of
+// container.securityContext take precedence over field values of PodSecurityContext.
+message PodSecurityContext {
+ // The SELinux context to be applied to all containers.
+ // If unspecified, the container runtime will allocate a random SELinux context for each
+ // container. May also be set in SecurityContext. If set in
+ // both SecurityContext and PodSecurityContext, the value specified in SecurityContext
+ // takes precedence for that container.
+ // +optional
+ optional SELinuxOptions seLinuxOptions = 1;
+
+ // The UID to run the entrypoint of the container process.
+ // Defaults to user specified in image metadata if unspecified.
+ // May also be set in SecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence
+ // for that container.
+ // +optional
+ optional int64 runAsUser = 2;
+
+ // Indicates that the container must run as a non-root user.
+ // If true, the Kubelet will validate the image at runtime to ensure that it
+ // does not run as UID 0 (root) and fail to start the container if it does.
+ // If unset or false, no such validation will be performed.
+ // May also be set in SecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence.
+ // +optional
+ optional bool runAsNonRoot = 3;
+
+ // A list of groups applied to the first process run in each container, in addition
+ // to the container's primary GID. If unspecified, no groups will be added to
+ // any container.
+ // +optional
+ repeated int64 supplementalGroups = 4;
+
+ // A special supplemental group that applies to all containers in a pod.
+ // Some volume types allow the Kubelet to change the ownership of that volume
+ // to be owned by the pod:
+ //
+ // 1. The owning GID will be the FSGroup
+ // 2. The setgid bit is set (new files created in the volume will be owned by FSGroup)
+ // 3. The permission bits are OR'd with rw-rw----
+ //
+ // If unset, the Kubelet will not modify the ownership and permissions of any volume.
+ // +optional
+ optional int64 fsGroup = 5;
+}
+
+// Describes the class of pods that should avoid this node.
+// Exactly one field should be set.
+message PodSignature {
+ // Reference to controller whose pods should avoid this node.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.OwnerReference podController = 1;
+}
+
+// PodSpec is a description of a pod.
+message PodSpec {
+ // List of volumes that can be mounted by containers belonging to the pod.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes
+ // +optional
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ repeated Volume volumes = 1;
+
+ // List of initialization containers belonging to the pod.
+ // Init containers are executed in order prior to containers being started. If any
+ // init container fails, the pod is considered to have failed and is handled according
+ // to its restartPolicy. The name for an init container or normal container must be
+ // unique among all containers.
+ // Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes.
+ // The resourceRequirements of an init container are taken into account during scheduling
+ // by finding the highest request/limit for each resource type, and then using the max of
+ // of that value or the sum of the normal containers. Limits are applied to init containers
+ // in a similar fashion.
+ // Init containers cannot currently be added or removed.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ repeated Container initContainers = 20;
+
+ // List of containers belonging to the pod.
+ // Containers cannot currently be added or removed.
+ // There must be at least one container in a Pod.
+ // Cannot be updated.
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ repeated Container containers = 2;
+
+ // Restart policy for all containers within the pod.
+ // One of Always, OnFailure, Never.
+ // Default to Always.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy
+ // +optional
+ optional string restartPolicy = 3;
+
+ // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request.
+ // Value must be non-negative integer. The value zero indicates delete immediately.
+ // If this value is nil, the default grace period will be used instead.
+ // The grace period is the duration in seconds after the processes running in the pod are sent
+ // a termination signal and the time when the processes are forcibly halted with a kill signal.
+ // Set this value longer than the expected cleanup time for your process.
+ // Defaults to 30 seconds.
+ // +optional
+ optional int64 terminationGracePeriodSeconds = 4;
+
+ // Optional duration in seconds the pod may be active on the node relative to
+ // StartTime before the system will actively try to mark it failed and kill associated containers.
+ // Value must be a positive integer.
+ // +optional
+ optional int64 activeDeadlineSeconds = 5;
+
+ // Set DNS policy for containers within the pod.
+ // One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'.
+ // Defaults to "ClusterFirst".
+ // To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.
+ // +optional
+ optional string dnsPolicy = 6;
+
+ // NodeSelector is a selector which must be true for the pod to fit on a node.
+ // Selector which must match a node's labels for the pod to be scheduled on that node.
+ // More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
+ // +optional
+ map<string, string> nodeSelector = 7;
+
+ // ServiceAccountName is the name of the ServiceAccount to use to run this pod.
+ // More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
+ // +optional
+ optional string serviceAccountName = 8;
+
+ // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName.
+ // Deprecated: Use serviceAccountName instead.
+ // +k8s:conversion-gen=false
+ // +optional
+ optional string serviceAccount = 9;
+
+ // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.
+ // +optional
+ optional bool automountServiceAccountToken = 21;
+
+ // NodeName is a request to schedule this pod onto a specific node. If it is non-empty,
+ // the scheduler simply schedules this pod onto that node, assuming that it fits resource
+ // requirements.
+ // +optional
+ optional string nodeName = 10;
+
+ // Host networking requested for this pod. Use the host's network namespace.
+ // If this option is set, the ports that will be used must be specified.
+ // Default to false.
+ // +k8s:conversion-gen=false
+ // +optional
+ optional bool hostNetwork = 11;
+
+ // Use the host's pid namespace.
+ // Optional: Default to false.
+ // +k8s:conversion-gen=false
+ // +optional
+ optional bool hostPID = 12;
+
+ // Use the host's ipc namespace.
+ // Optional: Default to false.
+ // +k8s:conversion-gen=false
+ // +optional
+ optional bool hostIPC = 13;
+
+ // SecurityContext holds pod-level security attributes and common container settings.
+ // Optional: Defaults to empty. See type description for default values of each field.
+ // +optional
+ optional PodSecurityContext securityContext = 14;
+
+ // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec.
+ // If specified, these secrets will be passed to individual puller implementations for them to use. For example,
+ // in the case of docker, only DockerConfig type secrets are honored.
+ // More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod
+ // +optional
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ repeated LocalObjectReference imagePullSecrets = 15;
+
+ // Specifies the hostname of the Pod
+ // If not specified, the pod's hostname will be set to a system-defined value.
+ // +optional
+ optional string hostname = 16;
+
+ // If specified, the fully qualified Pod hostname will be "<hostname>.<subdomain>.<pod namespace>.svc.<cluster domain>".
+ // If not specified, the pod will not have a domainname at all.
+ // +optional
+ optional string subdomain = 17;
+
+ // If specified, the pod's scheduling constraints
+ // +optional
+ optional Affinity affinity = 18;
+
+ // If specified, the pod will be dispatched by specified scheduler.
+ // If not specified, the pod will be dispatched by default scheduler.
+ // +optional
+ optional string schedulerName = 19;
+
+ // If specified, the pod's tolerations.
+ // +optional
+ repeated Toleration tolerations = 22;
+
+ // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts
+ // file if specified. This is only valid for non-hostNetwork pods.
+ // +optional
+ // +patchMergeKey=ip
+ // +patchStrategy=merge
+ repeated HostAlias hostAliases = 23;
+}
+
+// PodStatus represents information about the status of a pod. Status may trail the actual
+// state of a system.
+message PodStatus {
+ // Current condition of the pod.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase
+ // +optional
+ optional string phase = 1;
+
+ // Current service state of pod.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ repeated PodCondition conditions = 2;
+
+ // A human readable message indicating details about why the pod is in this condition.
+ // +optional
+ optional string message = 3;
+
+ // A brief CamelCase message indicating details about why the pod is in this state.
+ // e.g. 'OutOfDisk'
+ // +optional
+ optional string reason = 4;
+
+ // IP address of the host to which the pod is assigned. Empty if not yet scheduled.
+ // +optional
+ optional string hostIP = 5;
+
+ // IP address allocated to the pod. Routable at least within the cluster.
+ // Empty if not yet allocated.
+ // +optional
+ optional string podIP = 6;
+
+ // RFC 3339 date and time at which the object was acknowledged by the Kubelet.
+ // This is before the Kubelet pulled the container image(s) for the pod.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startTime = 7;
+
+ // The list has one entry per init container in the manifest. The most recent successful
+ // init container will have ready = true, the most recently started container will have
+ // startTime set.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status
+ repeated ContainerStatus initContainerStatuses = 10;
+
+ // The list has one entry per container in the manifest. Each entry is currently the output
+ // of `docker inspect`.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status
+ // +optional
+ repeated ContainerStatus containerStatuses = 8;
+
+ // The Quality of Service (QOS) classification assigned to the pod based on resource requirements
+ // See PodQOSClass type for available QOS classes
+ // More info: https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md
+ // +optional
+ optional string qosClass = 9;
+}
+
+// PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded
+message PodStatusResult {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Most recently observed status of the pod.
+ // This data may not be up to date.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional PodStatus status = 2;
+}
+
+// PodTemplate describes a template for creating copies of a predefined pod.
+message PodTemplate {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Template defines the pods that will be created from this pod template.
+ // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional PodTemplateSpec template = 2;
+}
+
+// PodTemplateList is a list of PodTemplates.
+message PodTemplateList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of pod templates
+ repeated PodTemplate items = 2;
+}
+
+// PodTemplateSpec describes the data a pod should have when created from a template
+message PodTemplateSpec {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Specification of the desired behavior of the pod.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional PodSpec spec = 2;
+}
+
+// PortworxVolumeSource represents a Portworx volume resource.
+message PortworxVolumeSource {
+ // VolumeID uniquely identifies a Portworx volume
+ optional string volumeID = 1;
+
+ // FSType represents the filesystem type to mount
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified.
+ optional string fsType = 2;
+
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ optional bool readOnly = 3;
+}
+
+// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
+// +k8s:openapi-gen=false
+message Preconditions {
+ // Specifies the target UID.
+ // +optional
+ optional string uid = 1;
+}
+
+// Describes a class of pods that should avoid this node.
+message PreferAvoidPodsEntry {
+ // The class of pods.
+ optional PodSignature podSignature = 1;
+
+ // Time at which this entry was added to the list.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time evictionTime = 2;
+
+ // (brief) reason why this entry was added to the list.
+ // +optional
+ optional string reason = 3;
+
+ // Human readable message indicating why this entry was added to the list.
+ // +optional
+ optional string message = 4;
+}
+
+// An empty preferred scheduling term matches all objects with implicit weight 0
+// (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).
+message PreferredSchedulingTerm {
+ // Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.
+ optional int32 weight = 1;
+
+ // A node selector term, associated with the corresponding weight.
+ optional NodeSelectorTerm preference = 2;
+}
+
+// Probe describes a health check to be performed against a container to determine whether it is
+// alive or ready to receive traffic.
+message Probe {
+ // The action taken to determine the health of a container
+ optional Handler handler = 1;
+
+ // Number of seconds after the container has started before liveness probes are initiated.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+ // +optional
+ optional int32 initialDelaySeconds = 2;
+
+ // Number of seconds after which the probe times out.
+ // Defaults to 1 second. Minimum value is 1.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+ // +optional
+ optional int32 timeoutSeconds = 3;
+
+ // How often (in seconds) to perform the probe.
+ // Default to 10 seconds. Minimum value is 1.
+ // +optional
+ optional int32 periodSeconds = 4;
+
+ // Minimum consecutive successes for the probe to be considered successful after having failed.
+ // Defaults to 1. Must be 1 for liveness. Minimum value is 1.
+ // +optional
+ optional int32 successThreshold = 5;
+
+ // Minimum consecutive failures for the probe to be considered failed after having succeeded.
+ // Defaults to 3. Minimum value is 1.
+ // +optional
+ optional int32 failureThreshold = 6;
+}
+
+// Represents a projected volume source
+message ProjectedVolumeSource {
+ // list of volume projections
+ repeated VolumeProjection sources = 1;
+
+ // Mode bits to use on created files by default. Must be a value between
+ // 0 and 0777.
+ // Directories within the path are not affected by this setting.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ optional int32 defaultMode = 2;
+}
+
+// Represents a Quobyte mount that lasts the lifetime of a pod.
+// Quobyte volumes do not support ownership management or SELinux relabeling.
+message QuobyteVolumeSource {
+ // Registry represents a single or multiple Quobyte Registry services
+ // specified as a string as host:port pair (multiple entries are separated with commas)
+ // which acts as the central registry for volumes
+ optional string registry = 1;
+
+ // Volume is a string that references an already created Quobyte volume by name.
+ optional string volume = 2;
+
+ // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions.
+ // Defaults to false.
+ // +optional
+ optional bool readOnly = 3;
+
+ // User to map volume access to
+ // Defaults to serivceaccount user
+ // +optional
+ optional string user = 4;
+
+ // Group to map volume access to
+ // Default is no group
+ // +optional
+ optional string group = 5;
+}
+
+// Represents a Rados Block Device mount that lasts the lifetime of a pod.
+// RBD volumes support ownership management and SELinux relabeling.
+message RBDVolumeSource {
+ // A collection of Ceph monitors.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ repeated string monitors = 1;
+
+ // The rados image name.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ optional string image = 2;
+
+ // Filesystem type of the volume that you want to mount.
+ // Tip: Ensure that the filesystem type is supported by the host operating system.
+ // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ optional string fsType = 3;
+
+ // The rados pool name.
+ // Default is rbd.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // +optional
+ optional string pool = 4;
+
+ // The rados user name.
+ // Default is admin.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // +optional
+ optional string user = 5;
+
+ // Keyring is the path to key ring for RBDUser.
+ // Default is /etc/ceph/keyring.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // +optional
+ optional string keyring = 6;
+
+ // SecretRef is name of the authentication secret for RBDUser. If provided
+ // overrides keyring.
+ // Default is nil.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // +optional
+ optional LocalObjectReference secretRef = 7;
+
+ // ReadOnly here will force the ReadOnly setting in VolumeMounts.
+ // Defaults to false.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // +optional
+ optional bool readOnly = 8;
+}
+
+// RangeAllocation is not a public type.
+message RangeAllocation {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Range is string that identifies the range represented by 'data'.
+ optional string range = 2;
+
+ // Data is a bit array containing all allocated addresses in the previous segment.
+ optional bytes data = 3;
+}
+
+// ReplicationController represents the configuration of a replication controller.
+message ReplicationController {
+ // If the Labels of a ReplicationController are empty, they are defaulted to
+ // be the same as the Pod(s) that the replication controller manages.
+ // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec defines the specification of the desired behavior of the replication controller.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional ReplicationControllerSpec spec = 2;
+
+ // Status is the most recently observed status of the replication controller.
+ // This data may be out of date by some window of time.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional ReplicationControllerStatus status = 3;
+}
+
+// ReplicationControllerCondition describes the state of a replication controller at a certain point.
+message ReplicationControllerCondition {
+ // Type of replication controller condition.
+ optional string type = 1;
+
+ // Status of the condition, one of True, False, Unknown.
+ optional string status = 2;
+
+ // The last time the condition transitioned from one status to another.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
+
+ // The reason for the condition's last transition.
+ // +optional
+ optional string reason = 4;
+
+ // A human readable message indicating details about the transition.
+ // +optional
+ optional string message = 5;
+}
+
+// ReplicationControllerList is a collection of replication controllers.
+message ReplicationControllerList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of replication controllers.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
+ repeated ReplicationController items = 2;
+}
+
+// ReplicationControllerSpec is the specification of a replication controller.
+message ReplicationControllerSpec {
+ // Replicas is the number of desired replicas.
+ // This is a pointer to distinguish between explicit zero and unspecified.
+ // Defaults to 1.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller
+ // +optional
+ optional int32 replicas = 1;
+
+ // Minimum number of seconds for which a newly created pod should be ready
+ // without any of its container crashing, for it to be considered available.
+ // Defaults to 0 (pod will be considered available as soon as it is ready)
+ // +optional
+ optional int32 minReadySeconds = 4;
+
+ // Selector is a label query over pods that should match the Replicas count.
+ // If Selector is empty, it is defaulted to the labels present on the Pod template.
+ // Label keys and values that must match in order to be controlled by this replication
+ // controller, if empty defaulted to labels on Pod template.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ map<string, string> selector = 2;
+
+ // Template is the object that describes the pod that will be created if
+ // insufficient replicas are detected. This takes precedence over a TemplateRef.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
+ // +optional
+ optional PodTemplateSpec template = 3;
+}
+
+// ReplicationControllerStatus represents the current status of a replication
+// controller.
+message ReplicationControllerStatus {
+ // Replicas is the most recently oberved number of replicas.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller
+ optional int32 replicas = 1;
+
+ // The number of pods that have labels matching the labels of the pod template of the replication controller.
+ // +optional
+ optional int32 fullyLabeledReplicas = 2;
+
+ // The number of ready replicas for this replication controller.
+ // +optional
+ optional int32 readyReplicas = 4;
+
+ // The number of available replicas (ready for at least minReadySeconds) for this replication controller.
+ // +optional
+ optional int32 availableReplicas = 5;
+
+ // ObservedGeneration reflects the generation of the most recently observed replication controller.
+ // +optional
+ optional int64 observedGeneration = 3;
+
+ // Represents the latest available observations of a replication controller's current state.
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ repeated ReplicationControllerCondition conditions = 6;
+}
+
+// ResourceFieldSelector represents container resources (cpu, memory) and their output format
+message ResourceFieldSelector {
+ // Container name: required for volumes, optional for env vars
+ // +optional
+ optional string containerName = 1;
+
+ // Required: resource to select
+ optional string resource = 2;
+
+ // Specifies the output format of the exposed resources, defaults to "1"
+ // +optional
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity divisor = 3;
+}
+
+// ResourceQuota sets aggregate quota restrictions enforced per namespace
+message ResourceQuota {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec defines the desired quota.
+ // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional ResourceQuotaSpec spec = 2;
+
+ // Status defines the actual enforced quota and its current usage.
+ // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional ResourceQuotaStatus status = 3;
+}
+
+// ResourceQuotaList is a list of ResourceQuota items.
+message ResourceQuotaList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of ResourceQuota objects.
+ // More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md
+ repeated ResourceQuota items = 2;
+}
+
+// ResourceQuotaSpec defines the desired hard limits to enforce for Quota.
+message ResourceQuotaSpec {
+ // Hard is the set of desired hard limits for each named resource.
+ // More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> hard = 1;
+
+ // A collection of filters that must match each object tracked by a quota.
+ // If not specified, the quota matches all objects.
+ // +optional
+ repeated string scopes = 2;
+}
+
+// ResourceQuotaStatus defines the enforced hard limits and observed use.
+message ResourceQuotaStatus {
+ // Hard is the set of enforced hard limits for each named resource.
+ // More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> hard = 1;
+
+ // Used is the current observed total usage of the resource in the namespace.
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> used = 2;
+}
+
+// ResourceRequirements describes the compute resource requirements.
+message ResourceRequirements {
+ // Limits describes the maximum amount of compute resources allowed.
+ // More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> limits = 1;
+
+ // Requests describes the minimum amount of compute resources required.
+ // If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
+ // otherwise to an implementation-defined value.
+ // More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
+ // +optional
+ map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> requests = 2;
+}
+
+// SELinuxOptions are the labels to be applied to the container
+message SELinuxOptions {
+ // User is a SELinux user label that applies to the container.
+ // +optional
+ optional string user = 1;
+
+ // Role is a SELinux role label that applies to the container.
+ // +optional
+ optional string role = 2;
+
+ // Type is a SELinux type label that applies to the container.
+ // +optional
+ optional string type = 3;
+
+ // Level is SELinux level label that applies to the container.
+ // +optional
+ optional string level = 4;
+}
+
+// ScaleIOVolumeSource represents a persistent ScaleIO volume
+message ScaleIOVolumeSource {
+ // The host address of the ScaleIO API Gateway.
+ optional string gateway = 1;
+
+ // The name of the storage system as configured in ScaleIO.
+ optional string system = 2;
+
+ // SecretRef references to the secret for ScaleIO user and other
+ // sensitive information. If this is not provided, Login operation will fail.
+ optional LocalObjectReference secretRef = 3;
+
+ // Flag to enable/disable SSL communication with Gateway, default false
+ // +optional
+ optional bool sslEnabled = 4;
+
+ // The name of the Protection Domain for the configured storage (defaults to "default").
+ // +optional
+ optional string protectionDomain = 5;
+
+ // The Storage Pool associated with the protection domain (defaults to "default").
+ // +optional
+ optional string storagePool = 6;
+
+ // Indicates whether the storage for a volume should be thick or thin (defaults to "thin").
+ // +optional
+ optional string storageMode = 7;
+
+ // The name of a volume already created in the ScaleIO system
+ // that is associated with this volume source.
+ optional string volumeName = 8;
+
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ optional string fsType = 9;
+
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ optional bool readOnly = 10;
+}
+
+// Secret holds secret data of a certain type. The total bytes of the values in
+// the Data field must be less than MaxSecretSize bytes.
+message Secret {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Data contains the secret data. Each key must consist of alphanumeric
+ // characters, '-', '_' or '.'. The serialized form of the secret data is a
+ // base64 encoded string, representing the arbitrary (possibly non-string)
+ // data value here. Described in https://tools.ietf.org/html/rfc4648#section-4
+ // +optional
+ map<string, bytes> data = 2;
+
+ // stringData allows specifying non-binary secret data in string form.
+ // It is provided as a write-only convenience method.
+ // All keys and values are merged into the data field on write, overwriting any existing values.
+ // It is never output when reading from the API.
+ // +k8s:conversion-gen=false
+ // +optional
+ map<string, string> stringData = 4;
+
+ // Used to facilitate programmatic handling of secret data.
+ // +optional
+ optional string type = 3;
+}
+
+// SecretEnvSource selects a Secret to populate the environment
+// variables with.
+//
+// The contents of the target Secret's Data field will represent the
+// key-value pairs as environment variables.
+message SecretEnvSource {
+ // The Secret to select from.
+ optional LocalObjectReference localObjectReference = 1;
+
+ // Specify whether the Secret must be defined
+ // +optional
+ optional bool optional = 2;
+}
+
+// SecretKeySelector selects a key of a Secret.
+message SecretKeySelector {
+ // The name of the secret in the pod's namespace to select from.
+ optional LocalObjectReference localObjectReference = 1;
+
+ // The key of the secret to select from. Must be a valid secret key.
+ optional string key = 2;
+
+ // Specify whether the Secret or it's key must be defined
+ // +optional
+ optional bool optional = 3;
+}
+
+// SecretList is a list of Secret.
+message SecretList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of secret objects.
+ // More info: https://kubernetes.io/docs/concepts/configuration/secret
+ repeated Secret items = 2;
+}
+
+// Adapts a secret into a projected volume.
+//
+// The contents of the target Secret's Data field will be presented in a
+// projected volume as files using the keys in the Data field as the file names.
+// Note that this is identical to a secret volume source without the default
+// mode.
+message SecretProjection {
+ optional LocalObjectReference localObjectReference = 1;
+
+ // If unspecified, each key-value pair in the Data field of the referenced
+ // Secret will be projected into the volume as a file whose name is the
+ // key and content is the value. If specified, the listed keys will be
+ // projected into the specified paths, and unlisted keys will not be
+ // present. If a key is specified which is not present in the Secret,
+ // the volume setup will error unless it is marked optional. Paths must be
+ // relative and may not contain the '..' path or start with '..'.
+ // +optional
+ repeated KeyToPath items = 2;
+
+ // Specify whether the Secret or its key must be defined
+ // +optional
+ optional bool optional = 4;
+}
+
+// Adapts a Secret into a volume.
+//
+// The contents of the target Secret's Data field will be presented in a volume
+// as files using the keys in the Data field as the file names.
+// Secret volumes support ownership management and SELinux relabeling.
+message SecretVolumeSource {
+ // Name of the secret in the pod's namespace to use.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
+ // +optional
+ optional string secretName = 1;
+
+ // If unspecified, each key-value pair in the Data field of the referenced
+ // Secret will be projected into the volume as a file whose name is the
+ // key and content is the value. If specified, the listed keys will be
+ // projected into the specified paths, and unlisted keys will not be
+ // present. If a key is specified which is not present in the Secret,
+ // the volume setup will error unless it is marked optional. Paths must be
+ // relative and may not contain the '..' path or start with '..'.
+ // +optional
+ repeated KeyToPath items = 2;
+
+ // Optional: mode bits to use on created files by default. Must be a
+ // value between 0 and 0777. Defaults to 0644.
+ // Directories within the path are not affected by this setting.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ optional int32 defaultMode = 3;
+
+ // Specify whether the Secret or it's keys must be defined
+ // +optional
+ optional bool optional = 4;
+}
+
+// SecurityContext holds security configuration that will be applied to a container.
+// Some fields are present in both SecurityContext and PodSecurityContext. When both
+// are set, the values in SecurityContext take precedence.
+message SecurityContext {
+ // The capabilities to add/drop when running containers.
+ // Defaults to the default set of capabilities granted by the container runtime.
+ // +optional
+ optional Capabilities capabilities = 1;
+
+ // Run container in privileged mode.
+ // Processes in privileged containers are essentially equivalent to root on the host.
+ // Defaults to false.
+ // +optional
+ optional bool privileged = 2;
+
+ // The SELinux context to be applied to the container.
+ // If unspecified, the container runtime will allocate a random SELinux context for each
+ // container. May also be set in PodSecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence.
+ // +optional
+ optional SELinuxOptions seLinuxOptions = 3;
+
+ // The UID to run the entrypoint of the container process.
+ // Defaults to user specified in image metadata if unspecified.
+ // May also be set in PodSecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence.
+ // +optional
+ optional int64 runAsUser = 4;
+
+ // Indicates that the container must run as a non-root user.
+ // If true, the Kubelet will validate the image at runtime to ensure that it
+ // does not run as UID 0 (root) and fail to start the container if it does.
+ // If unset or false, no such validation will be performed.
+ // May also be set in PodSecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence.
+ // +optional
+ optional bool runAsNonRoot = 5;
+
+ // Whether this container has a read-only root filesystem.
+ // Default is false.
+ // +optional
+ optional bool readOnlyRootFilesystem = 6;
+}
+
+// SerializedReference is a reference to serialized object.
+message SerializedReference {
+ // The reference to an object in the system.
+ // +optional
+ optional ObjectReference reference = 1;
+}
+
+// Service is a named abstraction of software service (for example, mysql) consisting of local port
+// (for example 3306) that the proxy listens on, and the selector that determines which pods
+// will answer requests sent through the proxy.
+message Service {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec defines the behavior of a service.
+ // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional ServiceSpec spec = 2;
+
+ // Most recently observed status of the service.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional ServiceStatus status = 3;
+}
+
+// ServiceAccount binds together:
+// * a name, understood by users, and perhaps by peripheral systems, for an identity
+// * a principal that can be authenticated and authorized
+// * a set of secrets
+message ServiceAccount {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount.
+ // More info: https://kubernetes.io/docs/concepts/configuration/secret
+ // +optional
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ repeated ObjectReference secrets = 2;
+
+ // ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images
+ // in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets
+ // can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet.
+ // More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
+ // +optional
+ repeated LocalObjectReference imagePullSecrets = 3;
+
+ // AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted.
+ // Can be overridden at the pod level.
+ // +optional
+ optional bool automountServiceAccountToken = 4;
+}
+
+// ServiceAccountList is a list of ServiceAccount objects
+message ServiceAccountList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of ServiceAccounts.
+ // More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
+ repeated ServiceAccount items = 2;
+}
+
+// ServiceList holds a list of services.
+message ServiceList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of services
+ repeated Service items = 2;
+}
+
+// ServicePort contains information on service's port.
+message ServicePort {
+ // The name of this port within the service. This must be a DNS_LABEL.
+ // All ports within a ServiceSpec must have unique names. This maps to
+ // the 'Name' field in EndpointPort objects.
+ // Optional if only one ServicePort is defined on this service.
+ // +optional
+ optional string name = 1;
+
+ // The IP protocol for this port. Supports "TCP" and "UDP".
+ // Default is TCP.
+ // +optional
+ optional string protocol = 2;
+
+ // The port that will be exposed by this service.
+ optional int32 port = 3;
+
+ // Number or name of the port to access on the pods targeted by the service.
+ // Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+ // If this is a string, it will be looked up as a named port in the
+ // target Pod's container ports. If this is not specified, the value
+ // of the 'port' field is used (an identity map).
+ // This field is ignored for services with clusterIP=None, and should be
+ // omitted or set equal to the 'port' field.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service
+ // +optional
+ optional k8s.io.apimachinery.pkg.util.intstr.IntOrString targetPort = 4;
+
+ // The port on each node on which this service is exposed when type=NodePort or LoadBalancer.
+ // Usually assigned by the system. If specified, it will be allocated to the service
+ // if unused or else creation of the service will fail.
+ // Default is to auto-allocate a port if the ServiceType of this Service requires one.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
+ // +optional
+ optional int32 nodePort = 5;
+}
+
+// ServiceProxyOptions is the query options to a Service's proxy call.
+message ServiceProxyOptions {
+ // Path is the part of URLs that include service endpoints, suffixes,
+ // and parameters to use for the current proxy request to service.
+ // For example, the whole request URL is
+ // http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy.
+ // Path is _search?q=user:kimchy.
+ // +optional
+ optional string path = 1;
+}
+
+// ServiceSpec describes the attributes that a user creates on a service.
+message ServiceSpec {
+ // The list of ports that are exposed by this service.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
+ // +patchMergeKey=port
+ // +patchStrategy=merge
+ repeated ServicePort ports = 1;
+
+ // Route service traffic to pods with label keys and values matching this
+ // selector. If empty or not present, the service is assumed to have an
+ // external process managing its endpoints, which Kubernetes will not
+ // modify. Only applies to types ClusterIP, NodePort, and LoadBalancer.
+ // Ignored if type is ExternalName.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/
+ // +optional
+ map<string, string> selector = 2;
+
+ // clusterIP is the IP address of the service and is usually assigned
+ // randomly by the master. If an address is specified manually and is not in
+ // use by others, it will be allocated to the service; otherwise, creation
+ // of the service will fail. This field can not be changed through updates.
+ // Valid values are "None", empty string (""), or a valid IP address. "None"
+ // can be specified for headless services when proxying is not required.
+ // Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if
+ // type is ExternalName.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
+ // +optional
+ optional string clusterIP = 3;
+
+ // type determines how the Service is exposed. Defaults to ClusterIP. Valid
+ // options are ExternalName, ClusterIP, NodePort, and LoadBalancer.
+ // "ExternalName" maps to the specified externalName.
+ // "ClusterIP" allocates a cluster-internal IP address for load-balancing to
+ // endpoints. Endpoints are determined by the selector or if that is not
+ // specified, by manual construction of an Endpoints object. If clusterIP is
+ // "None", no virtual IP is allocated and the endpoints are published as a
+ // set of endpoints rather than a stable IP.
+ // "NodePort" builds on ClusterIP and allocates a port on every node which
+ // routes to the clusterIP.
+ // "LoadBalancer" builds on NodePort and creates an
+ // external load-balancer (if supported in the current cloud) which routes
+ // to the clusterIP.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services---service-types
+ // +optional
+ optional string type = 4;
+
+ // externalIPs is a list of IP addresses for which nodes in the cluster
+ // will also accept traffic for this service. These IPs are not managed by
+ // Kubernetes. The user is responsible for ensuring that traffic arrives
+ // at a node with this IP. A common example is external load-balancers
+ // that are not part of the Kubernetes system.
+ // +optional
+ repeated string externalIPs = 5;
+
+ // Supports "ClientIP" and "None". Used to maintain session affinity.
+ // Enable client IP based session affinity.
+ // Must be ClientIP or None.
+ // Defaults to None.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
+ // +optional
+ optional string sessionAffinity = 7;
+
+ // Only applies to Service Type: LoadBalancer
+ // LoadBalancer will get created with the IP specified in this field.
+ // This feature depends on whether the underlying cloud-provider supports specifying
+ // the loadBalancerIP when a load balancer is created.
+ // This field will be ignored if the cloud-provider does not support the feature.
+ // +optional
+ optional string loadBalancerIP = 8;
+
+ // If specified and supported by the platform, this will restrict traffic through the cloud-provider
+ // load-balancer will be restricted to the specified client IPs. This field will be ignored if the
+ // cloud-provider does not support the feature."
+ // More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/
+ // +optional
+ repeated string loadBalancerSourceRanges = 9;
+
+ // externalName is the external reference that kubedns or equivalent will
+ // return as a CNAME record for this service. No proxying will be involved.
+ // Must be a valid DNS name and requires Type to be ExternalName.
+ // +optional
+ optional string externalName = 10;
+
+ // externalTrafficPolicy denotes if this Service desires to route external
+ // traffic to node-local or cluster-wide endpoints. "Local" preserves the
+ // client source IP and avoids a second hop for LoadBalancer and Nodeport
+ // type services, but risks potentially imbalanced traffic spreading.
+ // "Cluster" obscures the client source IP and may cause a second hop to
+ // another node, but should have good overall load-spreading.
+ // +optional
+ optional string externalTrafficPolicy = 11;
+
+ // healthCheckNodePort specifies the healthcheck nodePort for the service.
+ // If not specified, HealthCheckNodePort is created by the service api
+ // backend with the allocated nodePort. Will use user-specified nodePort value
+ // if specified by the client. Only effects when Type is set to LoadBalancer
+ // and ExternalTrafficPolicy is set to Local.
+ // +optional
+ optional int32 healthCheckNodePort = 12;
+}
+
+// ServiceStatus represents the current status of a service.
+message ServiceStatus {
+ // LoadBalancer contains the current status of the load-balancer,
+ // if one is present.
+ // +optional
+ optional LoadBalancerStatus loadBalancer = 1;
+}
+
+// Represents a StorageOS persistent volume resource.
+message StorageOSPersistentVolumeSource {
+ // VolumeName is the human-readable name of the StorageOS volume. Volume
+ // names are only unique within a namespace.
+ optional string volumeName = 1;
+
+ // VolumeNamespace specifies the scope of the volume within StorageOS. If no
+ // namespace is specified then the Pod's namespace will be used. This allows the
+ // Kubernetes name scoping to be mirrored within StorageOS for tighter integration.
+ // Set VolumeName to any name to override the default behaviour.
+ // Set to "default" if you are not using namespaces within StorageOS.
+ // Namespaces that do not pre-exist within StorageOS will be created.
+ // +optional
+ optional string volumeNamespace = 2;
+
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ optional string fsType = 3;
+
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ optional bool readOnly = 4;
+
+ // SecretRef specifies the secret to use for obtaining the StorageOS API
+ // credentials. If not specified, default values will be attempted.
+ // +optional
+ optional ObjectReference secretRef = 5;
+}
+
+// Represents a StorageOS persistent volume resource.
+message StorageOSVolumeSource {
+ // VolumeName is the human-readable name of the StorageOS volume. Volume
+ // names are only unique within a namespace.
+ optional string volumeName = 1;
+
+ // VolumeNamespace specifies the scope of the volume within StorageOS. If no
+ // namespace is specified then the Pod's namespace will be used. This allows the
+ // Kubernetes name scoping to be mirrored within StorageOS for tighter integration.
+ // Set VolumeName to any name to override the default behaviour.
+ // Set to "default" if you are not using namespaces within StorageOS.
+ // Namespaces that do not pre-exist within StorageOS will be created.
+ // +optional
+ optional string volumeNamespace = 2;
+
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ optional string fsType = 3;
+
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ optional bool readOnly = 4;
+
+ // SecretRef specifies the secret to use for obtaining the StorageOS API
+ // credentials. If not specified, default values will be attempted.
+ // +optional
+ optional LocalObjectReference secretRef = 5;
+}
+
+// Sysctl defines a kernel parameter to be set
+message Sysctl {
+ // Name of a property to set
+ optional string name = 1;
+
+ // Value of a property to set
+ optional string value = 2;
+}
+
+// TCPSocketAction describes an action based on opening a socket
+message TCPSocketAction {
+ // Number or name of the port to access on the container.
+ // Number must be in the range 1 to 65535.
+ // Name must be an IANA_SVC_NAME.
+ optional k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 1;
+
+ // Optional: Host name to connect to, defaults to the pod IP.
+ // +optional
+ optional string host = 2;
+}
+
+// The node this Taint is attached to has the effect "effect" on
+// any pod that that does not tolerate the Taint.
+message Taint {
+ // Required. The taint key to be applied to a node.
+ // +patchMergeKey=key
+ // +patchStrategy=merge
+ optional string key = 1;
+
+ // Required. The taint value corresponding to the taint key.
+ // +optional
+ optional string value = 2;
+
+ // Required. The effect of the taint on pods
+ // that do not tolerate the taint.
+ // Valid effects are NoSchedule, PreferNoSchedule and NoExecute.
+ optional string effect = 3;
+
+ // TimeAdded represents the time at which the taint was added.
+ // It is only written for NoExecute taints.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time timeAdded = 4;
+}
+
+// The pod this Toleration is attached to tolerates any taint that matches
+// the triple <key,value,effect> using the matching operator <operator>.
+message Toleration {
+ // Key is the taint key that the toleration applies to. Empty means match all taint keys.
+ // If the key is empty, operator must be Exists; this combination means to match all values and all keys.
+ // +optional
+ // +patchMergeKey=key
+ // +patchStrategy=merge
+ optional string key = 1;
+
+ // Operator represents a key's relationship to the value.
+ // Valid operators are Exists and Equal. Defaults to Equal.
+ // Exists is equivalent to wildcard for value, so that a pod can
+ // tolerate all taints of a particular category.
+ // +optional
+ optional string operator = 2;
+
+ // Value is the taint value the toleration matches to.
+ // If the operator is Exists, the value should be empty, otherwise just a regular string.
+ // +optional
+ optional string value = 3;
+
+ // Effect indicates the taint effect to match. Empty means match all taint effects.
+ // When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
+ // +optional
+ optional string effect = 4;
+
+ // TolerationSeconds represents the period of time the toleration (which must be
+ // of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
+ // it is not set, which means tolerate the taint forever (do not evict). Zero and
+ // negative values will be treated as 0 (evict immediately) by the system.
+ // +optional
+ optional int64 tolerationSeconds = 5;
+}
+
+// Volume represents a named volume in a pod that may be accessed by any container in the pod.
+message Volume {
+ // Volume's name.
+ // Must be a DNS_LABEL and unique within the pod.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ optional string name = 1;
+
+ // VolumeSource represents the location and type of the mounted volume.
+ // If not specified, the Volume is implied to be an EmptyDir.
+ // This implied behavior is deprecated and will be removed in a future version.
+ optional VolumeSource volumeSource = 2;
+}
+
+// VolumeMount describes a mounting of a Volume within a container.
+message VolumeMount {
+ // This must match the Name of a Volume.
+ optional string name = 1;
+
+ // Mounted read-only if true, read-write otherwise (false or unspecified).
+ // Defaults to false.
+ // +optional
+ optional bool readOnly = 2;
+
+ // Path within the container at which the volume should be mounted. Must
+ // not contain ':'.
+ optional string mountPath = 3;
+
+ // Path within the volume from which the container's volume should be mounted.
+ // Defaults to "" (volume's root).
+ // +optional
+ optional string subPath = 4;
+}
+
+// Projection that may be projected along with other supported volume types
+message VolumeProjection {
+ // information about the secret data to project
+ optional SecretProjection secret = 1;
+
+ // information about the downwardAPI data to project
+ optional DownwardAPIProjection downwardAPI = 2;
+
+ // information about the configMap data to project
+ optional ConfigMapProjection configMap = 3;
+}
+
+// Represents the source of a volume to mount.
+// Only one of its members may be specified.
+message VolumeSource {
+ // HostPath represents a pre-existing file or directory on the host
+ // machine that is directly exposed to the container. This is generally
+ // used for system agents or other privileged things that are allowed
+ // to see the host machine. Most containers will NOT need this.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
+ // ---
+ // TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not
+ // mount host directories as read/write.
+ // +optional
+ optional HostPathVolumeSource hostPath = 1;
+
+ // EmptyDir represents a temporary directory that shares a pod's lifetime.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
+ // +optional
+ optional EmptyDirVolumeSource emptyDir = 2;
+
+ // GCEPersistentDisk represents a GCE Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ // +optional
+ optional GCEPersistentDiskVolumeSource gcePersistentDisk = 3;
+
+ // AWSElasticBlockStore represents an AWS Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+ // +optional
+ optional AWSElasticBlockStoreVolumeSource awsElasticBlockStore = 4;
+
+ // GitRepo represents a git repository at a particular revision.
+ // +optional
+ optional GitRepoVolumeSource gitRepo = 5;
+
+ // Secret represents a secret that should populate this volume.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
+ // +optional
+ optional SecretVolumeSource secret = 6;
+
+ // NFS represents an NFS mount on the host that shares a pod's lifetime
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+ // +optional
+ optional NFSVolumeSource nfs = 7;
+
+ // ISCSI represents an ISCSI Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md
+ // +optional
+ optional ISCSIVolumeSource iscsi = 8;
+
+ // Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md
+ // +optional
+ optional GlusterfsVolumeSource glusterfs = 9;
+
+ // PersistentVolumeClaimVolumeSource represents a reference to a
+ // PersistentVolumeClaim in the same namespace.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+ // +optional
+ optional PersistentVolumeClaimVolumeSource persistentVolumeClaim = 10;
+
+ // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md
+ // +optional
+ optional RBDVolumeSource rbd = 11;
+
+ // FlexVolume represents a generic volume resource that is
+ // provisioned/attached using an exec based plugin. This is an
+ // alpha feature and may change in future.
+ // +optional
+ optional FlexVolumeSource flexVolume = 12;
+
+ // Cinder represents a cinder volume attached and mounted on kubelets host machine
+ // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ // +optional
+ optional CinderVolumeSource cinder = 13;
+
+ // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
+ // +optional
+ optional CephFSVolumeSource cephfs = 14;
+
+ // Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
+ // +optional
+ optional FlockerVolumeSource flocker = 15;
+
+ // DownwardAPI represents downward API about the pod that should populate this volume
+ // +optional
+ optional DownwardAPIVolumeSource downwardAPI = 16;
+
+ // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
+ // +optional
+ optional FCVolumeSource fc = 17;
+
+ // AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
+ // +optional
+ optional AzureFileVolumeSource azureFile = 18;
+
+ // ConfigMap represents a configMap that should populate this volume
+ // +optional
+ optional ConfigMapVolumeSource configMap = 19;
+
+ // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
+ // +optional
+ optional VsphereVirtualDiskVolumeSource vsphereVolume = 20;
+
+ // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
+ // +optional
+ optional QuobyteVolumeSource quobyte = 21;
+
+ // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
+ // +optional
+ optional AzureDiskVolumeSource azureDisk = 22;
+
+ // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine
+ optional PhotonPersistentDiskVolumeSource photonPersistentDisk = 23;
+
+ // Items for all in one resources secrets, configmaps, and downward API
+ optional ProjectedVolumeSource projected = 26;
+
+ // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine
+ // +optional
+ optional PortworxVolumeSource portworxVolume = 24;
+
+ // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
+ // +optional
+ optional ScaleIOVolumeSource scaleIO = 25;
+
+ // StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.
+ // +optional
+ optional StorageOSVolumeSource storageos = 27;
+}
+
+// Represents a vSphere volume resource.
+message VsphereVirtualDiskVolumeSource {
+ // Path that identifies vSphere volume vmdk
+ optional string volumePath = 1;
+
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ optional string fsType = 2;
+
+ // Storage Policy Based Management (SPBM) profile name.
+ // +optional
+ optional string storagePolicyName = 3;
+
+ // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.
+ // +optional
+ optional string storagePolicyID = 4;
+}
+
+// The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)
+message WeightedPodAffinityTerm {
+ // weight associated with matching the corresponding podAffinityTerm,
+ // in the range 1-100.
+ optional int32 weight = 1;
+
+ // Required. A pod affinity term, associated with the corresponding weight.
+ optional PodAffinityTerm podAffinityTerm = 2;
+}
+
diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/helper/helpers.go b/vendor/k8s.io/kubernetes/pkg/api/v1/helper/helpers.go
new file mode 100644
index 000000000..6b51c5c83
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/v1/helper/helpers.go
@@ -0,0 +1,530 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package helper
+
+import (
+ "encoding/json"
+ "fmt"
+ "strings"
+
+ "k8s.io/apimachinery/pkg/labels"
+ "k8s.io/apimachinery/pkg/selection"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/helper"
+ "k8s.io/kubernetes/pkg/api/v1"
+)
+
+// IsOpaqueIntResourceName returns true if the resource name has the opaque
+// integer resource prefix.
+func IsOpaqueIntResourceName(name v1.ResourceName) bool {
+ return strings.HasPrefix(string(name), v1.ResourceOpaqueIntPrefix)
+}
+
+// OpaqueIntResourceName returns a ResourceName with the canonical opaque
+// integer prefix prepended. If the argument already has the prefix, it is
+// returned unmodified.
+func OpaqueIntResourceName(name string) v1.ResourceName {
+ if IsOpaqueIntResourceName(v1.ResourceName(name)) {
+ return v1.ResourceName(name)
+ }
+ return v1.ResourceName(fmt.Sprintf("%s%s", v1.ResourceOpaqueIntPrefix, name))
+}
+
+// this function aims to check if the service's ClusterIP is set or not
+// the objective is not to perform validation here
+func IsServiceIPSet(service *v1.Service) bool {
+ return service.Spec.ClusterIP != v1.ClusterIPNone && service.Spec.ClusterIP != ""
+}
+
+// this function aims to check if the service's cluster IP is requested or not
+func IsServiceIPRequested(service *v1.Service) bool {
+ // ExternalName services are CNAME aliases to external ones. Ignore the IP.
+ if service.Spec.Type == v1.ServiceTypeExternalName {
+ return false
+ }
+ return service.Spec.ClusterIP == ""
+}
+
+// AddToNodeAddresses appends the NodeAddresses to the passed-by-pointer slice,
+// only if they do not already exist
+func AddToNodeAddresses(addresses *[]v1.NodeAddress, addAddresses ...v1.NodeAddress) {
+ for _, add := range addAddresses {
+ exists := false
+ for _, existing := range *addresses {
+ if existing.Address == add.Address && existing.Type == add.Type {
+ exists = true
+ break
+ }
+ }
+ if !exists {
+ *addresses = append(*addresses, add)
+ }
+ }
+}
+
+// TODO: make method on LoadBalancerStatus?
+func LoadBalancerStatusEqual(l, r *v1.LoadBalancerStatus) bool {
+ return ingressSliceEqual(l.Ingress, r.Ingress)
+}
+
+func ingressSliceEqual(lhs, rhs []v1.LoadBalancerIngress) bool {
+ if len(lhs) != len(rhs) {
+ return false
+ }
+ for i := range lhs {
+ if !ingressEqual(&lhs[i], &rhs[i]) {
+ return false
+ }
+ }
+ return true
+}
+
+func ingressEqual(lhs, rhs *v1.LoadBalancerIngress) bool {
+ if lhs.IP != rhs.IP {
+ return false
+ }
+ if lhs.Hostname != rhs.Hostname {
+ return false
+ }
+ return true
+}
+
+// TODO: make method on LoadBalancerStatus?
+func LoadBalancerStatusDeepCopy(lb *v1.LoadBalancerStatus) *v1.LoadBalancerStatus {
+ c := &v1.LoadBalancerStatus{}
+ c.Ingress = make([]v1.LoadBalancerIngress, len(lb.Ingress))
+ for i := range lb.Ingress {
+ c.Ingress[i] = lb.Ingress[i]
+ }
+ return c
+}
+
+// GetAccessModesAsString returns a string representation of an array of access modes.
+// modes, when present, are always in the same order: RWO,ROX,RWX.
+func GetAccessModesAsString(modes []v1.PersistentVolumeAccessMode) string {
+ modes = removeDuplicateAccessModes(modes)
+ modesStr := []string{}
+ if containsAccessMode(modes, v1.ReadWriteOnce) {
+ modesStr = append(modesStr, "RWO")
+ }
+ if containsAccessMode(modes, v1.ReadOnlyMany) {
+ modesStr = append(modesStr, "ROX")
+ }
+ if containsAccessMode(modes, v1.ReadWriteMany) {
+ modesStr = append(modesStr, "RWX")
+ }
+ return strings.Join(modesStr, ",")
+}
+
+// GetAccessModesAsString returns an array of AccessModes from a string created by GetAccessModesAsString
+func GetAccessModesFromString(modes string) []v1.PersistentVolumeAccessMode {
+ strmodes := strings.Split(modes, ",")
+ accessModes := []v1.PersistentVolumeAccessMode{}
+ for _, s := range strmodes {
+ s = strings.Trim(s, " ")
+ switch {
+ case s == "RWO":
+ accessModes = append(accessModes, v1.ReadWriteOnce)
+ case s == "ROX":
+ accessModes = append(accessModes, v1.ReadOnlyMany)
+ case s == "RWX":
+ accessModes = append(accessModes, v1.ReadWriteMany)
+ }
+ }
+ return accessModes
+}
+
+// removeDuplicateAccessModes returns an array of access modes without any duplicates
+func removeDuplicateAccessModes(modes []v1.PersistentVolumeAccessMode) []v1.PersistentVolumeAccessMode {
+ accessModes := []v1.PersistentVolumeAccessMode{}
+ for _, m := range modes {
+ if !containsAccessMode(accessModes, m) {
+ accessModes = append(accessModes, m)
+ }
+ }
+ return accessModes
+}
+
+func containsAccessMode(modes []v1.PersistentVolumeAccessMode, mode v1.PersistentVolumeAccessMode) bool {
+ for _, m := range modes {
+ if m == mode {
+ return true
+ }
+ }
+ return false
+}
+
+// NodeSelectorRequirementsAsSelector converts the []NodeSelectorRequirement api type into a struct that implements
+// labels.Selector.
+func NodeSelectorRequirementsAsSelector(nsm []v1.NodeSelectorRequirement) (labels.Selector, error) {
+ if len(nsm) == 0 {
+ return labels.Nothing(), nil
+ }
+ selector := labels.NewSelector()
+ for _, expr := range nsm {
+ var op selection.Operator
+ switch expr.Operator {
+ case v1.NodeSelectorOpIn:
+ op = selection.In
+ case v1.NodeSelectorOpNotIn:
+ op = selection.NotIn
+ case v1.NodeSelectorOpExists:
+ op = selection.Exists
+ case v1.NodeSelectorOpDoesNotExist:
+ op = selection.DoesNotExist
+ case v1.NodeSelectorOpGt:
+ op = selection.GreaterThan
+ case v1.NodeSelectorOpLt:
+ op = selection.LessThan
+ default:
+ return nil, fmt.Errorf("%q is not a valid node selector operator", expr.Operator)
+ }
+ r, err := labels.NewRequirement(expr.Key, op, expr.Values)
+ if err != nil {
+ return nil, err
+ }
+ selector = selector.Add(*r)
+ }
+ return selector, nil
+}
+
+// AddOrUpdateTolerationInPodSpec tries to add a toleration to the toleration list in PodSpec.
+// Returns true if something was updated, false otherwise.
+func AddOrUpdateTolerationInPodSpec(spec *v1.PodSpec, toleration *v1.Toleration) bool {
+ podTolerations := spec.Tolerations
+
+ var newTolerations []v1.Toleration
+ updated := false
+ for i := range podTolerations {
+ if toleration.MatchToleration(&podTolerations[i]) {
+ if helper.Semantic.DeepEqual(toleration, podTolerations[i]) {
+ return false
+ }
+ newTolerations = append(newTolerations, *toleration)
+ updated = true
+ continue
+ }
+
+ newTolerations = append(newTolerations, podTolerations[i])
+ }
+
+ if !updated {
+ newTolerations = append(newTolerations, *toleration)
+ }
+
+ spec.Tolerations = newTolerations
+ return true
+}
+
+// AddOrUpdateTolerationInPod tries to add a toleration to the pod's toleration list.
+// Returns true if something was updated, false otherwise.
+func AddOrUpdateTolerationInPod(pod *v1.Pod, toleration *v1.Toleration) bool {
+ return AddOrUpdateTolerationInPodSpec(&pod.Spec, toleration)
+}
+
+// TolerationsTolerateTaint checks if taint is tolerated by any of the tolerations.
+func TolerationsTolerateTaint(tolerations []v1.Toleration, taint *v1.Taint) bool {
+ for i := range tolerations {
+ if tolerations[i].ToleratesTaint(taint) {
+ return true
+ }
+ }
+ return false
+}
+
+type taintsFilterFunc func(*v1.Taint) bool
+
+// TolerationsTolerateTaintsWithFilter checks if given tolerations tolerates
+// all the taints that apply to the filter in given taint list.
+func TolerationsTolerateTaintsWithFilter(tolerations []v1.Toleration, taints []v1.Taint, applyFilter taintsFilterFunc) bool {
+ if len(taints) == 0 {
+ return true
+ }
+
+ for i := range taints {
+ if applyFilter != nil && !applyFilter(&taints[i]) {
+ continue
+ }
+
+ if !TolerationsTolerateTaint(tolerations, &taints[i]) {
+ return false
+ }
+ }
+
+ return true
+}
+
+// DeleteTaintsByKey removes all the taints that have the same key to given taintKey
+func DeleteTaintsByKey(taints []v1.Taint, taintKey string) ([]v1.Taint, bool) {
+ newTaints := []v1.Taint{}
+ deleted := false
+ for i := range taints {
+ if taintKey == taints[i].Key {
+ deleted = true
+ continue
+ }
+ newTaints = append(newTaints, taints[i])
+ }
+ return newTaints, deleted
+}
+
+// DeleteTaint removes all the the taints that have the same key and effect to given taintToDelete.
+func DeleteTaint(taints []v1.Taint, taintToDelete *v1.Taint) ([]v1.Taint, bool) {
+ newTaints := []v1.Taint{}
+ deleted := false
+ for i := range taints {
+ if taintToDelete.MatchTaint(&taints[i]) {
+ deleted = true
+ continue
+ }
+ newTaints = append(newTaints, taints[i])
+ }
+ return newTaints, deleted
+}
+
+// Returns true and list of Tolerations matching all Taints if all are tolerated, or false otherwise.
+func GetMatchingTolerations(taints []v1.Taint, tolerations []v1.Toleration) (bool, []v1.Toleration) {
+ if len(taints) == 0 {
+ return true, []v1.Toleration{}
+ }
+ if len(tolerations) == 0 && len(taints) > 0 {
+ return false, []v1.Toleration{}
+ }
+ result := []v1.Toleration{}
+ for i := range taints {
+ tolerated := false
+ for j := range tolerations {
+ if tolerations[j].ToleratesTaint(&taints[i]) {
+ result = append(result, tolerations[j])
+ tolerated = true
+ break
+ }
+ }
+ if !tolerated {
+ return false, []v1.Toleration{}
+ }
+ }
+ return true, result
+}
+
+func GetAvoidPodsFromNodeAnnotations(annotations map[string]string) (v1.AvoidPods, error) {
+ var avoidPods v1.AvoidPods
+ if len(annotations) > 0 && annotations[v1.PreferAvoidPodsAnnotationKey] != "" {
+ err := json.Unmarshal([]byte(annotations[v1.PreferAvoidPodsAnnotationKey]), &avoidPods)
+ if err != nil {
+ return avoidPods, err
+ }
+ }
+ return avoidPods, nil
+}
+
+// SysctlsFromPodAnnotations parses the sysctl annotations into a slice of safe Sysctls
+// and a slice of unsafe Sysctls. This is only a convenience wrapper around
+// SysctlsFromPodAnnotation.
+func SysctlsFromPodAnnotations(a map[string]string) ([]v1.Sysctl, []v1.Sysctl, error) {
+ safe, err := SysctlsFromPodAnnotation(a[v1.SysctlsPodAnnotationKey])
+ if err != nil {
+ return nil, nil, err
+ }
+ unsafe, err := SysctlsFromPodAnnotation(a[v1.UnsafeSysctlsPodAnnotationKey])
+ if err != nil {
+ return nil, nil, err
+ }
+
+ return safe, unsafe, nil
+}
+
+// SysctlsFromPodAnnotation parses an annotation value into a slice of Sysctls.
+func SysctlsFromPodAnnotation(annotation string) ([]v1.Sysctl, error) {
+ if len(annotation) == 0 {
+ return nil, nil
+ }
+
+ kvs := strings.Split(annotation, ",")
+ sysctls := make([]v1.Sysctl, len(kvs))
+ for i, kv := range kvs {
+ cs := strings.Split(kv, "=")
+ if len(cs) != 2 || len(cs[0]) == 0 {
+ return nil, fmt.Errorf("sysctl %q not of the format sysctl_name=value", kv)
+ }
+ sysctls[i].Name = cs[0]
+ sysctls[i].Value = cs[1]
+ }
+ return sysctls, nil
+}
+
+// PodAnnotationsFromSysctls creates an annotation value for a slice of Sysctls.
+func PodAnnotationsFromSysctls(sysctls []v1.Sysctl) string {
+ if len(sysctls) == 0 {
+ return ""
+ }
+
+ kvs := make([]string, len(sysctls))
+ for i := range sysctls {
+ kvs[i] = fmt.Sprintf("%s=%s", sysctls[i].Name, sysctls[i].Value)
+ }
+ return strings.Join(kvs, ",")
+}
+
+// Tries to add a taint to annotations list. Returns a new copy of updated Node and true if something was updated
+// false otherwise.
+func AddOrUpdateTaint(node *v1.Node, taint *v1.Taint) (*v1.Node, bool, error) {
+ objCopy, err := api.Scheme.DeepCopy(node)
+ if err != nil {
+ return nil, false, err
+ }
+ newNode := objCopy.(*v1.Node)
+ nodeTaints := newNode.Spec.Taints
+
+ var newTaints []v1.Taint
+ updated := false
+ for i := range nodeTaints {
+ if taint.MatchTaint(&nodeTaints[i]) {
+ if helper.Semantic.DeepEqual(taint, nodeTaints[i]) {
+ return newNode, false, nil
+ }
+ newTaints = append(newTaints, *taint)
+ updated = true
+ continue
+ }
+
+ newTaints = append(newTaints, nodeTaints[i])
+ }
+
+ if !updated {
+ newTaints = append(newTaints, *taint)
+ }
+
+ newNode.Spec.Taints = newTaints
+ return newNode, true, nil
+}
+
+func TaintExists(taints []v1.Taint, taintToFind *v1.Taint) bool {
+ for _, taint := range taints {
+ if taint.MatchTaint(taintToFind) {
+ return true
+ }
+ }
+ return false
+}
+
+// Tries to remove a taint from annotations list. Returns a new copy of updated Node and true if something was updated
+// false otherwise.
+func RemoveTaint(node *v1.Node, taint *v1.Taint) (*v1.Node, bool, error) {
+ objCopy, err := api.Scheme.DeepCopy(node)
+ if err != nil {
+ return nil, false, err
+ }
+ newNode := objCopy.(*v1.Node)
+ nodeTaints := newNode.Spec.Taints
+ if len(nodeTaints) == 0 {
+ return newNode, false, nil
+ }
+
+ if !TaintExists(nodeTaints, taint) {
+ return newNode, false, nil
+ }
+
+ newTaints, _ := DeleteTaint(nodeTaints, taint)
+ newNode.Spec.Taints = newTaints
+ return newNode, true, nil
+}
+
+// GetAffinityFromPodAnnotations gets the json serialized affinity data from Pod.Annotations
+// and converts it to the Affinity type in api.
+// TODO: remove when alpha support for affinity is removed
+func GetAffinityFromPodAnnotations(annotations map[string]string) (*v1.Affinity, error) {
+ if len(annotations) > 0 && annotations[v1.AffinityAnnotationKey] != "" {
+ var affinity v1.Affinity
+ err := json.Unmarshal([]byte(annotations[v1.AffinityAnnotationKey]), &affinity)
+ if err != nil {
+ return nil, err
+ }
+ return &affinity, nil
+ }
+ return nil, nil
+}
+
+// GetPersistentVolumeClass returns StorageClassName.
+func GetPersistentVolumeClass(volume *v1.PersistentVolume) string {
+ // Use beta annotation first
+ if class, found := volume.Annotations[v1.BetaStorageClassAnnotation]; found {
+ return class
+ }
+
+ return volume.Spec.StorageClassName
+}
+
+// GetPersistentVolumeClaimClass returns StorageClassName. If no storage class was
+// requested, it returns "".
+func GetPersistentVolumeClaimClass(claim *v1.PersistentVolumeClaim) string {
+ // Use beta annotation first
+ if class, found := claim.Annotations[v1.BetaStorageClassAnnotation]; found {
+ return class
+ }
+
+ if claim.Spec.StorageClassName != nil {
+ return *claim.Spec.StorageClassName
+ }
+
+ return ""
+}
+
+// PersistentVolumeClaimHasClass returns true if given claim has set StorageClassName field.
+func PersistentVolumeClaimHasClass(claim *v1.PersistentVolumeClaim) bool {
+ // Use beta annotation first
+ if _, found := claim.Annotations[v1.BetaStorageClassAnnotation]; found {
+ return true
+ }
+
+ if claim.Spec.StorageClassName != nil {
+ return true
+ }
+
+ return false
+}
+
+// GetStorageNodeAffinityFromAnnotation gets the json serialized data from PersistentVolume.Annotations
+// and converts it to the NodeAffinity type in api.
+// TODO: update when storage node affinity graduates to beta
+func GetStorageNodeAffinityFromAnnotation(annotations map[string]string) (*v1.NodeAffinity, error) {
+ if len(annotations) > 0 && annotations[v1.AlphaStorageNodeAffinityAnnotation] != "" {
+ var affinity v1.NodeAffinity
+ err := json.Unmarshal([]byte(annotations[v1.AlphaStorageNodeAffinityAnnotation]), &affinity)
+ if err != nil {
+ return nil, err
+ }
+ return &affinity, nil
+ }
+ return nil, nil
+}
+
+// Converts NodeAffinity type to Alpha annotation for use in PersistentVolumes
+// TODO: update when storage node affinity graduates to beta
+func StorageNodeAffinityToAlphaAnnotation(annotations map[string]string, affinity *v1.NodeAffinity) error {
+ if affinity == nil {
+ return nil
+ }
+
+ json, err := json.Marshal(*affinity)
+ if err != nil {
+ return err
+ }
+ annotations[v1.AlphaStorageNodeAffinityAnnotation] = string(json)
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/meta.go b/vendor/k8s.io/kubernetes/pkg/api/v1/meta.go
new file mode 100644
index 000000000..0e3f5d920
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/v1/meta.go
@@ -0,0 +1,108 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/types"
+)
+
+func (obj *ObjectMeta) GetObjectMeta() metav1.Object { return obj }
+
+// Namespace implements metav1.Object for any object with an ObjectMeta typed field. Allows
+// fast, direct access to metadata fields for API objects.
+func (meta *ObjectMeta) GetNamespace() string { return meta.Namespace }
+func (meta *ObjectMeta) SetNamespace(namespace string) { meta.Namespace = namespace }
+func (meta *ObjectMeta) GetName() string { return meta.Name }
+func (meta *ObjectMeta) SetName(name string) { meta.Name = name }
+func (meta *ObjectMeta) GetGenerateName() string { return meta.GenerateName }
+func (meta *ObjectMeta) SetGenerateName(generateName string) { meta.GenerateName = generateName }
+func (meta *ObjectMeta) GetUID() types.UID { return meta.UID }
+func (meta *ObjectMeta) SetUID(uid types.UID) { meta.UID = uid }
+func (meta *ObjectMeta) GetResourceVersion() string { return meta.ResourceVersion }
+func (meta *ObjectMeta) SetResourceVersion(version string) { meta.ResourceVersion = version }
+func (meta *ObjectMeta) GetGeneration() int64 { return meta.Generation }
+func (meta *ObjectMeta) SetGeneration(generation int64) { meta.Generation = generation }
+func (meta *ObjectMeta) GetSelfLink() string { return meta.SelfLink }
+func (meta *ObjectMeta) SetSelfLink(selfLink string) { meta.SelfLink = selfLink }
+func (meta *ObjectMeta) GetCreationTimestamp() metav1.Time { return meta.CreationTimestamp }
+func (meta *ObjectMeta) SetCreationTimestamp(creationTimestamp metav1.Time) {
+ meta.CreationTimestamp = creationTimestamp
+}
+func (meta *ObjectMeta) GetDeletionTimestamp() *metav1.Time { return meta.DeletionTimestamp }
+func (meta *ObjectMeta) SetDeletionTimestamp(deletionTimestamp *metav1.Time) {
+ meta.DeletionTimestamp = deletionTimestamp
+}
+func (meta *ObjectMeta) GetDeletionGracePeriodSeconds() *int64 { return meta.DeletionGracePeriodSeconds }
+func (meta *ObjectMeta) SetDeletionGracePeriodSeconds(deletionGracePeriodSeconds *int64) {
+ meta.DeletionGracePeriodSeconds = deletionGracePeriodSeconds
+}
+func (meta *ObjectMeta) GetLabels() map[string]string { return meta.Labels }
+func (meta *ObjectMeta) SetLabels(labels map[string]string) { meta.Labels = labels }
+func (meta *ObjectMeta) GetAnnotations() map[string]string { return meta.Annotations }
+func (meta *ObjectMeta) SetAnnotations(annotations map[string]string) { meta.Annotations = annotations }
+func (meta *ObjectMeta) GetInitializers() *metav1.Initializers { return meta.Initializers }
+func (meta *ObjectMeta) SetInitializers(initializers *metav1.Initializers) {
+ meta.Initializers = initializers
+}
+func (meta *ObjectMeta) GetFinalizers() []string { return meta.Finalizers }
+func (meta *ObjectMeta) SetFinalizers(finalizers []string) { meta.Finalizers = finalizers }
+
+func (meta *ObjectMeta) GetOwnerReferences() []metav1.OwnerReference {
+ ret := make([]metav1.OwnerReference, len(meta.OwnerReferences))
+ for i := 0; i < len(meta.OwnerReferences); i++ {
+ ret[i].Kind = meta.OwnerReferences[i].Kind
+ ret[i].Name = meta.OwnerReferences[i].Name
+ ret[i].UID = meta.OwnerReferences[i].UID
+ ret[i].APIVersion = meta.OwnerReferences[i].APIVersion
+ if meta.OwnerReferences[i].Controller != nil {
+ value := *meta.OwnerReferences[i].Controller
+ ret[i].Controller = &value
+ }
+ if meta.OwnerReferences[i].BlockOwnerDeletion != nil {
+ value := *meta.OwnerReferences[i].BlockOwnerDeletion
+ ret[i].BlockOwnerDeletion = &value
+ }
+ }
+ return ret
+}
+
+func (meta *ObjectMeta) SetOwnerReferences(references []metav1.OwnerReference) {
+ newReferences := make([]metav1.OwnerReference, len(references))
+ for i := 0; i < len(references); i++ {
+ newReferences[i].Kind = references[i].Kind
+ newReferences[i].Name = references[i].Name
+ newReferences[i].UID = references[i].UID
+ newReferences[i].APIVersion = references[i].APIVersion
+ if references[i].Controller != nil {
+ value := *references[i].Controller
+ newReferences[i].Controller = &value
+ }
+ if references[i].BlockOwnerDeletion != nil {
+ value := *references[i].BlockOwnerDeletion
+ newReferences[i].BlockOwnerDeletion = &value
+ }
+ }
+ meta.OwnerReferences = newReferences
+}
+
+func (meta *ObjectMeta) GetClusterName() string {
+ return meta.ClusterName
+}
+func (meta *ObjectMeta) SetClusterName(clusterName string) {
+ meta.ClusterName = clusterName
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/objectreference.go b/vendor/k8s.io/kubernetes/pkg/api/v1/objectreference.go
new file mode 100644
index 000000000..ee5335ee8
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/v1/objectreference.go
@@ -0,0 +1,33 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// IsAnAPIObject allows clients to preemptively get a reference to an API object and pass it to places that
+// intend only to get a reference to that object. This simplifies the event recording interface.
+func (obj *ObjectReference) SetGroupVersionKind(gvk schema.GroupVersionKind) {
+ obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind()
+}
+
+func (obj *ObjectReference) GroupVersionKind() schema.GroupVersionKind {
+ return schema.FromAPIVersionAndKind(obj.APIVersion, obj.Kind)
+}
+
+func (obj *ObjectReference) GetObjectKind() schema.ObjectKind { return obj }
diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/pod/util.go b/vendor/k8s.io/kubernetes/pkg/api/v1/pod/util.go
new file mode 100644
index 000000000..aa7b0a4a8
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/v1/pod/util.go
@@ -0,0 +1,358 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package pod
+
+import (
+ "encoding/json"
+ "fmt"
+ "time"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/util/intstr"
+ "k8s.io/kubernetes/pkg/api/v1"
+)
+
+// FindPort locates the container port for the given pod and portName. If the
+// targetPort is a number, use that. If the targetPort is a string, look that
+// string up in all named ports in all containers in the target pod. If no
+// match is found, fail.
+func FindPort(pod *v1.Pod, svcPort *v1.ServicePort) (int, error) {
+ portName := svcPort.TargetPort
+ switch portName.Type {
+ case intstr.String:
+ name := portName.StrVal
+ for _, container := range pod.Spec.Containers {
+ for _, port := range container.Ports {
+ if port.Name == name && port.Protocol == svcPort.Protocol {
+ return int(port.ContainerPort), nil
+ }
+ }
+ }
+ case intstr.Int:
+ return portName.IntValue(), nil
+ }
+
+ return 0, fmt.Errorf("no suitable port for manifest: %s", pod.UID)
+}
+
+// TODO: remove this function when init containers becomes a stable feature
+func SetInitContainersAndStatuses(pod *v1.Pod) error {
+ var initContainersAnnotation string
+ initContainersAnnotation = pod.Annotations[v1.PodInitContainersAnnotationKey]
+ initContainersAnnotation = pod.Annotations[v1.PodInitContainersBetaAnnotationKey]
+ if len(initContainersAnnotation) > 0 {
+ var values []v1.Container
+ if err := json.Unmarshal([]byte(initContainersAnnotation), &values); err != nil {
+ return err
+ }
+ pod.Spec.InitContainers = values
+ }
+
+ var initContainerStatusesAnnotation string
+ initContainerStatusesAnnotation = pod.Annotations[v1.PodInitContainerStatusesAnnotationKey]
+ initContainerStatusesAnnotation = pod.Annotations[v1.PodInitContainerStatusesBetaAnnotationKey]
+ if len(initContainerStatusesAnnotation) > 0 {
+ var values []v1.ContainerStatus
+ if err := json.Unmarshal([]byte(initContainerStatusesAnnotation), &values); err != nil {
+ return err
+ }
+ pod.Status.InitContainerStatuses = values
+ }
+ return nil
+}
+
+// TODO: remove this function when init containers becomes a stable feature
+func SetInitContainersAnnotations(pod *v1.Pod) error {
+ if len(pod.Spec.InitContainers) > 0 {
+ value, err := json.Marshal(pod.Spec.InitContainers)
+ if err != nil {
+ return err
+ }
+ if pod.Annotations == nil {
+ pod.Annotations = make(map[string]string)
+ }
+ pod.Annotations[v1.PodInitContainersAnnotationKey] = string(value)
+ pod.Annotations[v1.PodInitContainersBetaAnnotationKey] = string(value)
+ }
+ return nil
+}
+
+// TODO: remove this function when init containers becomes a stable feature
+func SetInitContainersStatusesAnnotations(pod *v1.Pod) error {
+ if len(pod.Status.InitContainerStatuses) > 0 {
+ value, err := json.Marshal(pod.Status.InitContainerStatuses)
+ if err != nil {
+ return err
+ }
+ if pod.Annotations == nil {
+ pod.Annotations = make(map[string]string)
+ }
+ pod.Annotations[v1.PodInitContainerStatusesAnnotationKey] = string(value)
+ pod.Annotations[v1.PodInitContainerStatusesBetaAnnotationKey] = string(value)
+ } else {
+ delete(pod.Annotations, v1.PodInitContainerStatusesAnnotationKey)
+ delete(pod.Annotations, v1.PodInitContainerStatusesBetaAnnotationKey)
+ }
+ return nil
+}
+
+// Visitor is called with each object name, and returns true if visiting should continue
+type Visitor func(name string) (shouldContinue bool)
+
+// VisitPodSecretNames invokes the visitor function with the name of every secret
+// referenced by the pod spec. If visitor returns false, visiting is short-circuited.
+// Transitive references (e.g. pod -> pvc -> pv -> secret) are not visited.
+// Returns true if visiting completed, false if visiting was short-circuited.
+func VisitPodSecretNames(pod *v1.Pod, visitor Visitor) bool {
+ for _, reference := range pod.Spec.ImagePullSecrets {
+ if !visitor(reference.Name) {
+ return false
+ }
+ }
+ for i := range pod.Spec.InitContainers {
+ if !visitContainerSecretNames(&pod.Spec.InitContainers[i], visitor) {
+ return false
+ }
+ }
+ for i := range pod.Spec.Containers {
+ if !visitContainerSecretNames(&pod.Spec.Containers[i], visitor) {
+ return false
+ }
+ }
+ var source *v1.VolumeSource
+
+ for i := range pod.Spec.Volumes {
+ source = &pod.Spec.Volumes[i].VolumeSource
+ switch {
+ case source.AzureFile != nil:
+ if len(source.AzureFile.SecretName) > 0 && !visitor(source.AzureFile.SecretName) {
+ return false
+ }
+ case source.CephFS != nil:
+ if source.CephFS.SecretRef != nil && !visitor(source.CephFS.SecretRef.Name) {
+ return false
+ }
+ case source.FlexVolume != nil:
+ if source.FlexVolume.SecretRef != nil && !visitor(source.FlexVolume.SecretRef.Name) {
+ return false
+ }
+ case source.Projected != nil:
+ for j := range source.Projected.Sources {
+ if source.Projected.Sources[j].Secret != nil {
+ if !visitor(source.Projected.Sources[j].Secret.Name) {
+ return false
+ }
+ }
+ }
+ case source.RBD != nil:
+ if source.RBD.SecretRef != nil && !visitor(source.RBD.SecretRef.Name) {
+ return false
+ }
+ case source.Secret != nil:
+ if !visitor(source.Secret.SecretName) {
+ return false
+ }
+ case source.ScaleIO != nil:
+ if source.ScaleIO.SecretRef != nil && !visitor(source.ScaleIO.SecretRef.Name) {
+ return false
+ }
+ case source.ISCSI != nil:
+ if source.ISCSI.SecretRef != nil && !visitor(source.ISCSI.SecretRef.Name) {
+ return false
+ }
+ case source.StorageOS != nil:
+ if source.StorageOS.SecretRef != nil && !visitor(source.StorageOS.SecretRef.Name) {
+ return false
+ }
+ }
+ }
+ return true
+}
+
+func visitContainerSecretNames(container *v1.Container, visitor Visitor) bool {
+ for _, env := range container.EnvFrom {
+ if env.SecretRef != nil {
+ if !visitor(env.SecretRef.Name) {
+ return false
+ }
+ }
+ }
+ for _, envVar := range container.Env {
+ if envVar.ValueFrom != nil && envVar.ValueFrom.SecretKeyRef != nil {
+ if !visitor(envVar.ValueFrom.SecretKeyRef.Name) {
+ return false
+ }
+ }
+ }
+ return true
+}
+
+// VisitPodConfigmapNames invokes the visitor function with the name of every configmap
+// referenced by the pod spec. If visitor returns false, visiting is short-circuited.
+// Transitive references (e.g. pod -> pvc -> pv -> secret) are not visited.
+// Returns true if visiting completed, false if visiting was short-circuited.
+func VisitPodConfigmapNames(pod *v1.Pod, visitor Visitor) bool {
+ for i := range pod.Spec.InitContainers {
+ if !visitContainerConfigmapNames(&pod.Spec.InitContainers[i], visitor) {
+ return false
+ }
+ }
+ for i := range pod.Spec.Containers {
+ if !visitContainerConfigmapNames(&pod.Spec.Containers[i], visitor) {
+ return false
+ }
+ }
+ var source *v1.VolumeSource
+ for i := range pod.Spec.Volumes {
+ source = &pod.Spec.Volumes[i].VolumeSource
+ switch {
+ case source.Projected != nil:
+ for j := range source.Projected.Sources {
+ if source.Projected.Sources[j].ConfigMap != nil {
+ if !visitor(source.Projected.Sources[j].ConfigMap.Name) {
+ return false
+ }
+ }
+ }
+ case source.ConfigMap != nil:
+ if !visitor(source.ConfigMap.Name) {
+ return false
+ }
+ }
+ }
+ return true
+}
+
+func visitContainerConfigmapNames(container *v1.Container, visitor Visitor) bool {
+ for _, env := range container.EnvFrom {
+ if env.ConfigMapRef != nil {
+ if !visitor(env.ConfigMapRef.Name) {
+ return false
+ }
+ }
+ }
+ for _, envVar := range container.Env {
+ if envVar.ValueFrom != nil && envVar.ValueFrom.ConfigMapKeyRef != nil {
+ if !visitor(envVar.ValueFrom.ConfigMapKeyRef.Name) {
+ return false
+ }
+ }
+ }
+ return true
+}
+
+// GetContainerStatus extracts the status of container "name" from "statuses".
+// It also returns if "name" exists.
+func GetContainerStatus(statuses []v1.ContainerStatus, name string) (v1.ContainerStatus, bool) {
+ for i := range statuses {
+ if statuses[i].Name == name {
+ return statuses[i], true
+ }
+ }
+ return v1.ContainerStatus{}, false
+}
+
+// GetExistingContainerStatus extracts the status of container "name" from "statuses",
+// and returns empty status if "name" does not exist.
+func GetExistingContainerStatus(statuses []v1.ContainerStatus, name string) v1.ContainerStatus {
+ for i := range statuses {
+ if statuses[i].Name == name {
+ return statuses[i]
+ }
+ }
+ return v1.ContainerStatus{}
+}
+
+// IsPodAvailable returns true if a pod is available; false otherwise.
+// Precondition for an available pod is that it must be ready. On top
+// of that, there are two cases when a pod can be considered available:
+// 1. minReadySeconds == 0, or
+// 2. LastTransitionTime (is set) + minReadySeconds < current time
+func IsPodAvailable(pod *v1.Pod, minReadySeconds int32, now metav1.Time) bool {
+ if !IsPodReady(pod) {
+ return false
+ }
+
+ c := GetPodReadyCondition(pod.Status)
+ minReadySecondsDuration := time.Duration(minReadySeconds) * time.Second
+ if minReadySeconds == 0 || !c.LastTransitionTime.IsZero() && c.LastTransitionTime.Add(minReadySecondsDuration).Before(now.Time) {
+ return true
+ }
+ return false
+}
+
+// IsPodReady returns true if a pod is ready; false otherwise.
+func IsPodReady(pod *v1.Pod) bool {
+ return IsPodReadyConditionTrue(pod.Status)
+}
+
+// IsPodReady retruns true if a pod is ready; false otherwise.
+func IsPodReadyConditionTrue(status v1.PodStatus) bool {
+ condition := GetPodReadyCondition(status)
+ return condition != nil && condition.Status == v1.ConditionTrue
+}
+
+// Extracts the pod ready condition from the given status and returns that.
+// Returns nil if the condition is not present.
+func GetPodReadyCondition(status v1.PodStatus) *v1.PodCondition {
+ _, condition := GetPodCondition(&status, v1.PodReady)
+ return condition
+}
+
+// GetPodCondition extracts the provided condition from the given status and returns that.
+// Returns nil and -1 if the condition is not present, and the index of the located condition.
+func GetPodCondition(status *v1.PodStatus, conditionType v1.PodConditionType) (int, *v1.PodCondition) {
+ if status == nil {
+ return -1, nil
+ }
+ for i := range status.Conditions {
+ if status.Conditions[i].Type == conditionType {
+ return i, &status.Conditions[i]
+ }
+ }
+ return -1, nil
+}
+
+// Updates existing pod condition or creates a new one. Sets LastTransitionTime to now if the
+// status has changed.
+// Returns true if pod condition has changed or has been added.
+func UpdatePodCondition(status *v1.PodStatus, condition *v1.PodCondition) bool {
+ condition.LastTransitionTime = metav1.Now()
+ // Try to find this pod condition.
+ conditionIndex, oldCondition := GetPodCondition(status, condition.Type)
+
+ if oldCondition == nil {
+ // We are adding new pod condition.
+ status.Conditions = append(status.Conditions, *condition)
+ return true
+ } else {
+ // We are updating an existing condition, so we need to check if it has changed.
+ if condition.Status == oldCondition.Status {
+ condition.LastTransitionTime = oldCondition.LastTransitionTime
+ }
+
+ isEqual := condition.Status == oldCondition.Status &&
+ condition.Reason == oldCondition.Reason &&
+ condition.Message == oldCondition.Message &&
+ condition.LastProbeTime.Equal(oldCondition.LastProbeTime) &&
+ condition.LastTransitionTime.Equal(oldCondition.LastTransitionTime)
+
+ status.Conditions[conditionIndex] = *condition
+ // Return true if one of the fields have changed.
+ return !isEqual
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/ref/ref.go b/vendor/k8s.io/kubernetes/pkg/api/v1/ref/ref.go
new file mode 100644
index 000000000..5f6f692f6
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/v1/ref/ref.go
@@ -0,0 +1,121 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package ref
+
+import (
+ "errors"
+ "fmt"
+ "net/url"
+ "strings"
+
+ "k8s.io/apimachinery/pkg/api/meta"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/kubernetes/pkg/api/v1"
+)
+
+var (
+ // Errors that could be returned by GetReference.
+ ErrNilObject = errors.New("can't reference a nil object")
+ ErrNoSelfLink = errors.New("selfLink was empty, can't make reference")
+)
+
+// GetReference returns an ObjectReference which refers to the given
+// object, or an error if the object doesn't follow the conventions
+// that would allow this.
+// TODO: should take a meta.Interface see http://issue.k8s.io/7127
+func GetReference(scheme *runtime.Scheme, obj runtime.Object) (*v1.ObjectReference, error) {
+ if obj == nil {
+ return nil, ErrNilObject
+ }
+ if ref, ok := obj.(*v1.ObjectReference); ok {
+ // Don't make a reference to a reference.
+ return ref, nil
+ }
+
+ gvk := obj.GetObjectKind().GroupVersionKind()
+
+ // if the object referenced is actually persisted, we can just get kind from meta
+ // if we are building an object reference to something not yet persisted, we should fallback to scheme
+ kind := gvk.Kind
+ if len(kind) == 0 {
+ // TODO: this is wrong
+ gvks, _, err := scheme.ObjectKinds(obj)
+ if err != nil {
+ return nil, err
+ }
+ kind = gvks[0].Kind
+ }
+
+ // An object that implements only List has enough metadata to build a reference
+ var listMeta meta.List
+ objectMeta, err := meta.Accessor(obj)
+ if err != nil {
+ listMeta, err = meta.ListAccessor(obj)
+ if err != nil {
+ return nil, err
+ }
+ } else {
+ listMeta = objectMeta
+ }
+
+ // if the object referenced is actually persisted, we can also get version from meta
+ version := gvk.GroupVersion().String()
+ if len(version) == 0 {
+ selfLink := listMeta.GetSelfLink()
+ if len(selfLink) == 0 {
+ return nil, ErrNoSelfLink
+ }
+ selfLinkUrl, err := url.Parse(selfLink)
+ if err != nil {
+ return nil, err
+ }
+ // example paths: /<prefix>/<version>/*
+ parts := strings.Split(selfLinkUrl.Path, "/")
+ if len(parts) < 3 {
+ return nil, fmt.Errorf("unexpected self link format: '%v'; got version '%v'", selfLink, version)
+ }
+ version = parts[2]
+ }
+
+ // only has list metadata
+ if objectMeta == nil {
+ return &v1.ObjectReference{
+ Kind: kind,
+ APIVersion: version,
+ ResourceVersion: listMeta.GetResourceVersion(),
+ }, nil
+ }
+
+ return &v1.ObjectReference{
+ Kind: kind,
+ APIVersion: version,
+ Name: objectMeta.GetName(),
+ Namespace: objectMeta.GetNamespace(),
+ UID: objectMeta.GetUID(),
+ ResourceVersion: objectMeta.GetResourceVersion(),
+ }, nil
+}
+
+// GetPartialReference is exactly like GetReference, but allows you to set the FieldPath.
+func GetPartialReference(scheme *runtime.Scheme, obj runtime.Object, fieldPath string) (*v1.ObjectReference, error) {
+ ref, err := GetReference(scheme, obj)
+ if err != nil {
+ return nil, err
+ }
+ ref.FieldPath = fieldPath
+ return ref, nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/register.go b/vendor/k8s.io/kubernetes/pkg/api/v1/register.go
new file mode 100644
index 000000000..c70d6ac56
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/v1/register.go
@@ -0,0 +1,106 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = ""
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs, addConversionFuncs, addFastPathConversionFuncs)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Pod{},
+ &PodList{},
+ &PodStatusResult{},
+ &PodTemplate{},
+ &PodTemplateList{},
+ &ReplicationController{},
+ &ReplicationControllerList{},
+ &Service{},
+ &ServiceProxyOptions{},
+ &ServiceList{},
+ &Endpoints{},
+ &EndpointsList{},
+ &Node{},
+ &NodeList{},
+ &NodeProxyOptions{},
+ &Binding{},
+ &Event{},
+ &EventList{},
+ &List{},
+ &LimitRange{},
+ &LimitRangeList{},
+ &ResourceQuota{},
+ &ResourceQuotaList{},
+ &Namespace{},
+ &NamespaceList{},
+ &Secret{},
+ &SecretList{},
+ &ServiceAccount{},
+ &ServiceAccountList{},
+ &PersistentVolume{},
+ &PersistentVolumeList{},
+ &PersistentVolumeClaim{},
+ &PersistentVolumeClaimList{},
+ &PodAttachOptions{},
+ &PodLogOptions{},
+ &PodExecOptions{},
+ &PodPortForwardOptions{},
+ &PodProxyOptions{},
+ &ComponentStatus{},
+ &ComponentStatusList{},
+ &SerializedReference{},
+ &RangeAllocation{},
+ &ConfigMap{},
+ &ConfigMapList{},
+ )
+
+ // Add common types
+ scheme.AddKnownTypes(SchemeGroupVersion, &metav1.Status{})
+
+ // Add the watch version that applies
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/resource.go b/vendor/k8s.io/kubernetes/pkg/api/v1/resource.go
new file mode 100644
index 000000000..0d1c1dccd
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/v1/resource.go
@@ -0,0 +1,63 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/api/resource"
+)
+
+// Returns string version of ResourceName.
+func (self ResourceName) String() string {
+ return string(self)
+}
+
+// Returns the CPU limit if specified.
+func (self *ResourceList) Cpu() *resource.Quantity {
+ if val, ok := (*self)[ResourceCPU]; ok {
+ return &val
+ }
+ return &resource.Quantity{Format: resource.DecimalSI}
+}
+
+// Returns the Memory limit if specified.
+func (self *ResourceList) Memory() *resource.Quantity {
+ if val, ok := (*self)[ResourceMemory]; ok {
+ return &val
+ }
+ return &resource.Quantity{Format: resource.BinarySI}
+}
+
+func (self *ResourceList) Pods() *resource.Quantity {
+ if val, ok := (*self)[ResourcePods]; ok {
+ return &val
+ }
+ return &resource.Quantity{}
+}
+
+func (self *ResourceList) NvidiaGPU() *resource.Quantity {
+ if val, ok := (*self)[ResourceNvidiaGPU]; ok {
+ return &val
+ }
+ return &resource.Quantity{}
+}
+
+func (self *ResourceList) StorageOverlay() *resource.Quantity {
+ if val, ok := (*self)[ResourceStorageOverlay]; ok {
+ return &val
+ }
+ return &resource.Quantity{}
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/taint.go b/vendor/k8s.io/kubernetes/pkg/api/v1/taint.go
new file mode 100644
index 000000000..7b606a309
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/v1/taint.go
@@ -0,0 +1,33 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import "fmt"
+
+// MatchTaint checks if the taint matches taintToMatch. Taints are unique by key:effect,
+// if the two taints have same key:effect, regard as they match.
+func (t *Taint) MatchTaint(taintToMatch *Taint) bool {
+ return t.Key == taintToMatch.Key && t.Effect == taintToMatch.Effect
+}
+
+// taint.ToString() converts taint struct to string in format key=value:effect or key:effect.
+func (t *Taint) ToString() string {
+ if len(t.Value) == 0 {
+ return fmt.Sprintf("%v:%v", t.Key, t.Effect)
+ }
+ return fmt.Sprintf("%v=%v:%v", t.Key, t.Value, t.Effect)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/toleration.go b/vendor/k8s.io/kubernetes/pkg/api/v1/toleration.go
new file mode 100644
index 000000000..b203d335b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/v1/toleration.go
@@ -0,0 +1,56 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+// MatchToleration checks if the toleration matches tolerationToMatch. Tolerations are unique by <key,effect,operator,value>,
+// if the two tolerations have same <key,effect,operator,value> combination, regard as they match.
+// TODO: uniqueness check for tolerations in api validations.
+func (t *Toleration) MatchToleration(tolerationToMatch *Toleration) bool {
+ return t.Key == tolerationToMatch.Key &&
+ t.Effect == tolerationToMatch.Effect &&
+ t.Operator == tolerationToMatch.Operator &&
+ t.Value == tolerationToMatch.Value
+}
+
+// ToleratesTaint checks if the toleration tolerates the taint.
+// The matching follows the rules below:
+// (1) Empty toleration.effect means to match all taint effects,
+// otherwise taint effect must equal to toleration.effect.
+// (2) If toleration.operator is 'Exists', it means to match all taint values.
+// (3) Empty toleration.key means to match all taint keys.
+// If toleration.key is empty, toleration.operator must be 'Exists';
+// this combination means to match all taint values and all taint keys.
+func (t *Toleration) ToleratesTaint(taint *Taint) bool {
+ if len(t.Effect) > 0 && t.Effect != taint.Effect {
+ return false
+ }
+
+ if len(t.Key) > 0 && t.Key != taint.Key {
+ return false
+ }
+
+ // TODO: Use proper defaulting when Toleration becomes a field of PodSpec
+ switch t.Operator {
+ // empty operator means Equal
+ case "", TolerationOpEqual:
+ return t.Value == taint.Value
+ case TolerationOpExists:
+ return true
+ default:
+ return false
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/api/v1/types.generated.go
new file mode 100644
index 000000000..e289f199b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/v1/types.generated.go
@@ -0,0 +1,76748 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg3_resource "k8s.io/apimachinery/pkg/api/resource"
+ pkg2_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ pkg5_runtime "k8s.io/apimachinery/pkg/runtime"
+ pkg1_types "k8s.io/apimachinery/pkg/types"
+ pkg4_intstr "k8s.io/apimachinery/pkg/util/intstr"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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_resource.Quantity
+ var v1 pkg2_v1.Time
+ var v2 pkg5_runtime.RawExtension
+ var v3 pkg1_types.UID
+ var v4 pkg4_intstr.IntOrString
+ var v5 time.Time
+ _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5
+ }
+}
+
+func (x *ObjectMeta) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [16]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Name != ""
+ yyq2[1] = x.GenerateName != ""
+ yyq2[2] = x.Namespace != ""
+ yyq2[3] = x.SelfLink != ""
+ yyq2[4] = x.UID != ""
+ yyq2[5] = x.ResourceVersion != ""
+ yyq2[6] = x.Generation != 0
+ yyq2[7] = true
+ yyq2[8] = x.DeletionTimestamp != nil
+ yyq2[9] = x.DeletionGracePeriodSeconds != nil
+ yyq2[10] = len(x.Labels) != 0
+ yyq2[11] = len(x.Annotations) != 0
+ yyq2[12] = len(x.OwnerReferences) != 0
+ yyq2[13] = x.Initializers != nil
+ yyq2[14] = len(x.Finalizers) != 0
+ yyq2[15] = x.ClusterName != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(16)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.GenerateName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("generateName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.GenerateName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("namespace"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SelfLink))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selfLink"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SelfLink))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.UID) {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.UID))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("uid"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.UID) {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.UID))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resourceVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Generation))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("generation"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Generation))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ yy25 := &x.CreationTimestamp
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy25) {
+ } else if yym26 {
+ z.EncBinaryMarshal(yy25)
+ } else if !yym26 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy25)
+ } else {
+ z.EncFallback(yy25)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("creationTimestamp"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy27 := &x.CreationTimestamp
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy27) {
+ } else if yym28 {
+ z.EncBinaryMarshal(yy27)
+ } else if !yym28 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy27)
+ } else {
+ z.EncFallback(yy27)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ if x.DeletionTimestamp == nil {
+ r.EncodeNil()
+ } else {
+ yym30 := z.EncBinary()
+ _ = yym30
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.DeletionTimestamp) {
+ } else if yym30 {
+ z.EncBinaryMarshal(x.DeletionTimestamp)
+ } else if !yym30 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.DeletionTimestamp)
+ } else {
+ z.EncFallback(x.DeletionTimestamp)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("deletionTimestamp"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.DeletionTimestamp == nil {
+ r.EncodeNil()
+ } else {
+ yym31 := z.EncBinary()
+ _ = yym31
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.DeletionTimestamp) {
+ } else if yym31 {
+ z.EncBinaryMarshal(x.DeletionTimestamp)
+ } else if !yym31 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.DeletionTimestamp)
+ } else {
+ z.EncFallback(x.DeletionTimestamp)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ if x.DeletionGracePeriodSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy33 := *x.DeletionGracePeriodSeconds
+ yym34 := z.EncBinary()
+ _ = yym34
+ if false {
+ } else {
+ r.EncodeInt(int64(yy33))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("deletionGracePeriodSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.DeletionGracePeriodSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy35 := *x.DeletionGracePeriodSeconds
+ yym36 := z.EncBinary()
+ _ = yym36
+ if false {
+ } else {
+ r.EncodeInt(int64(yy35))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[10] {
+ if x.Labels == nil {
+ r.EncodeNil()
+ } else {
+ yym38 := z.EncBinary()
+ _ = yym38
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Labels, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[10] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("labels"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Labels == nil {
+ r.EncodeNil()
+ } else {
+ yym39 := z.EncBinary()
+ _ = yym39
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Labels, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[11] {
+ if x.Annotations == nil {
+ r.EncodeNil()
+ } else {
+ yym41 := z.EncBinary()
+ _ = yym41
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Annotations, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[11] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("annotations"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Annotations == nil {
+ r.EncodeNil()
+ } else {
+ yym42 := z.EncBinary()
+ _ = yym42
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Annotations, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[12] {
+ if x.OwnerReferences == nil {
+ r.EncodeNil()
+ } else {
+ yym44 := z.EncBinary()
+ _ = yym44
+ if false {
+ } else {
+ h.encSlicev1_OwnerReference(([]pkg2_v1.OwnerReference)(x.OwnerReferences), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[12] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ownerReferences"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.OwnerReferences == nil {
+ r.EncodeNil()
+ } else {
+ yym45 := z.EncBinary()
+ _ = yym45
+ if false {
+ } else {
+ h.encSlicev1_OwnerReference(([]pkg2_v1.OwnerReference)(x.OwnerReferences), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[13] {
+ if x.Initializers == nil {
+ r.EncodeNil()
+ } else {
+ yym47 := z.EncBinary()
+ _ = yym47
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Initializers) {
+ } else {
+ z.EncFallback(x.Initializers)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[13] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("initializers"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Initializers == nil {
+ r.EncodeNil()
+ } else {
+ yym48 := z.EncBinary()
+ _ = yym48
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Initializers) {
+ } else {
+ z.EncFallback(x.Initializers)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[14] {
+ if x.Finalizers == nil {
+ r.EncodeNil()
+ } else {
+ yym50 := z.EncBinary()
+ _ = yym50
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Finalizers, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[14] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("finalizers"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Finalizers == nil {
+ r.EncodeNil()
+ } else {
+ yym51 := z.EncBinary()
+ _ = yym51
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Finalizers, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[15] {
+ yym53 := z.EncBinary()
+ _ = yym53
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[15] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("clusterName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym54 := z.EncBinary()
+ _ = yym54
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ObjectMeta) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ObjectMeta) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "generateName":
+ if r.TryDecodeAsNil() {
+ x.GenerateName = ""
+ } else {
+ yyv6 := &x.GenerateName
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "namespace":
+ if r.TryDecodeAsNil() {
+ x.Namespace = ""
+ } else {
+ yyv8 := &x.Namespace
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "selfLink":
+ if r.TryDecodeAsNil() {
+ x.SelfLink = ""
+ } else {
+ yyv10 := &x.SelfLink
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "uid":
+ if r.TryDecodeAsNil() {
+ x.UID = ""
+ } else {
+ yyv12 := &x.UID
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv12) {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ case "resourceVersion":
+ if r.TryDecodeAsNil() {
+ x.ResourceVersion = ""
+ } else {
+ yyv14 := &x.ResourceVersion
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ case "generation":
+ if r.TryDecodeAsNil() {
+ x.Generation = 0
+ } else {
+ yyv16 := &x.Generation
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*int64)(yyv16)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "creationTimestamp":
+ if r.TryDecodeAsNil() {
+ x.CreationTimestamp = pkg2_v1.Time{}
+ } else {
+ yyv18 := &x.CreationTimestamp
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv18) {
+ } else if yym19 {
+ z.DecBinaryUnmarshal(yyv18)
+ } else if !yym19 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv18)
+ } else {
+ z.DecFallback(yyv18, false)
+ }
+ }
+ case "deletionTimestamp":
+ if r.TryDecodeAsNil() {
+ if x.DeletionTimestamp != nil {
+ x.DeletionTimestamp = nil
+ }
+ } else {
+ if x.DeletionTimestamp == nil {
+ x.DeletionTimestamp = new(pkg2_v1.Time)
+ }
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.DeletionTimestamp) {
+ } else if yym21 {
+ z.DecBinaryUnmarshal(x.DeletionTimestamp)
+ } else if !yym21 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.DeletionTimestamp)
+ } else {
+ z.DecFallback(x.DeletionTimestamp, false)
+ }
+ }
+ case "deletionGracePeriodSeconds":
+ if r.TryDecodeAsNil() {
+ if x.DeletionGracePeriodSeconds != nil {
+ x.DeletionGracePeriodSeconds = nil
+ }
+ } else {
+ if x.DeletionGracePeriodSeconds == nil {
+ x.DeletionGracePeriodSeconds = new(int64)
+ }
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else {
+ *((*int64)(x.DeletionGracePeriodSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "labels":
+ if r.TryDecodeAsNil() {
+ x.Labels = nil
+ } else {
+ yyv24 := &x.Labels
+ yym25 := z.DecBinary()
+ _ = yym25
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv24, false, d)
+ }
+ }
+ case "annotations":
+ if r.TryDecodeAsNil() {
+ x.Annotations = nil
+ } else {
+ yyv26 := &x.Annotations
+ yym27 := z.DecBinary()
+ _ = yym27
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv26, false, d)
+ }
+ }
+ case "ownerReferences":
+ if r.TryDecodeAsNil() {
+ x.OwnerReferences = nil
+ } else {
+ yyv28 := &x.OwnerReferences
+ yym29 := z.DecBinary()
+ _ = yym29
+ if false {
+ } else {
+ h.decSlicev1_OwnerReference((*[]pkg2_v1.OwnerReference)(yyv28), d)
+ }
+ }
+ case "initializers":
+ if r.TryDecodeAsNil() {
+ if x.Initializers != nil {
+ x.Initializers = nil
+ }
+ } else {
+ if x.Initializers == nil {
+ x.Initializers = new(pkg2_v1.Initializers)
+ }
+ yym31 := z.DecBinary()
+ _ = yym31
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Initializers) {
+ } else {
+ z.DecFallback(x.Initializers, false)
+ }
+ }
+ case "finalizers":
+ if r.TryDecodeAsNil() {
+ x.Finalizers = nil
+ } else {
+ yyv32 := &x.Finalizers
+ yym33 := z.DecBinary()
+ _ = yym33
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv32, false, d)
+ }
+ }
+ case "clusterName":
+ if r.TryDecodeAsNil() {
+ x.ClusterName = ""
+ } else {
+ yyv34 := &x.ClusterName
+ yym35 := z.DecBinary()
+ _ = yym35
+ if false {
+ } else {
+ *((*string)(yyv34)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ObjectMeta) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj36 int
+ var yyb36 bool
+ var yyhl36 bool = l >= 0
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv37 := &x.Name
+ yym38 := z.DecBinary()
+ _ = yym38
+ if false {
+ } else {
+ *((*string)(yyv37)) = r.DecodeString()
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.GenerateName = ""
+ } else {
+ yyv39 := &x.GenerateName
+ yym40 := z.DecBinary()
+ _ = yym40
+ if false {
+ } else {
+ *((*string)(yyv39)) = r.DecodeString()
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Namespace = ""
+ } else {
+ yyv41 := &x.Namespace
+ yym42 := z.DecBinary()
+ _ = yym42
+ if false {
+ } else {
+ *((*string)(yyv41)) = r.DecodeString()
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SelfLink = ""
+ } else {
+ yyv43 := &x.SelfLink
+ yym44 := z.DecBinary()
+ _ = yym44
+ if false {
+ } else {
+ *((*string)(yyv43)) = r.DecodeString()
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UID = ""
+ } else {
+ yyv45 := &x.UID
+ yym46 := z.DecBinary()
+ _ = yym46
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv45) {
+ } else {
+ *((*string)(yyv45)) = r.DecodeString()
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ResourceVersion = ""
+ } else {
+ yyv47 := &x.ResourceVersion
+ yym48 := z.DecBinary()
+ _ = yym48
+ if false {
+ } else {
+ *((*string)(yyv47)) = r.DecodeString()
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Generation = 0
+ } else {
+ yyv49 := &x.Generation
+ yym50 := z.DecBinary()
+ _ = yym50
+ if false {
+ } else {
+ *((*int64)(yyv49)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CreationTimestamp = pkg2_v1.Time{}
+ } else {
+ yyv51 := &x.CreationTimestamp
+ yym52 := z.DecBinary()
+ _ = yym52
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv51) {
+ } else if yym52 {
+ z.DecBinaryUnmarshal(yyv51)
+ } else if !yym52 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv51)
+ } else {
+ z.DecFallback(yyv51, false)
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.DeletionTimestamp != nil {
+ x.DeletionTimestamp = nil
+ }
+ } else {
+ if x.DeletionTimestamp == nil {
+ x.DeletionTimestamp = new(pkg2_v1.Time)
+ }
+ yym54 := z.DecBinary()
+ _ = yym54
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.DeletionTimestamp) {
+ } else if yym54 {
+ z.DecBinaryUnmarshal(x.DeletionTimestamp)
+ } else if !yym54 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.DeletionTimestamp)
+ } else {
+ z.DecFallback(x.DeletionTimestamp, false)
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.DeletionGracePeriodSeconds != nil {
+ x.DeletionGracePeriodSeconds = nil
+ }
+ } else {
+ if x.DeletionGracePeriodSeconds == nil {
+ x.DeletionGracePeriodSeconds = new(int64)
+ }
+ yym56 := z.DecBinary()
+ _ = yym56
+ if false {
+ } else {
+ *((*int64)(x.DeletionGracePeriodSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Labels = nil
+ } else {
+ yyv57 := &x.Labels
+ yym58 := z.DecBinary()
+ _ = yym58
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv57, false, d)
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Annotations = nil
+ } else {
+ yyv59 := &x.Annotations
+ yym60 := z.DecBinary()
+ _ = yym60
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv59, false, d)
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.OwnerReferences = nil
+ } else {
+ yyv61 := &x.OwnerReferences
+ yym62 := z.DecBinary()
+ _ = yym62
+ if false {
+ } else {
+ h.decSlicev1_OwnerReference((*[]pkg2_v1.OwnerReference)(yyv61), d)
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Initializers != nil {
+ x.Initializers = nil
+ }
+ } else {
+ if x.Initializers == nil {
+ x.Initializers = new(pkg2_v1.Initializers)
+ }
+ yym64 := z.DecBinary()
+ _ = yym64
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Initializers) {
+ } else {
+ z.DecFallback(x.Initializers, false)
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Finalizers = nil
+ } else {
+ yyv65 := &x.Finalizers
+ yym66 := z.DecBinary()
+ _ = yym66
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv65, false, d)
+ }
+ }
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ClusterName = ""
+ } else {
+ yyv67 := &x.ClusterName
+ yym68 := z.DecBinary()
+ _ = yym68
+ if false {
+ } else {
+ *((*string)(yyv67)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj36++
+ if yyhl36 {
+ yyb36 = yyj36 > l
+ } else {
+ yyb36 = r.CheckBreak()
+ }
+ if yyb36 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj36-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Volume) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[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 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ var yyn6 bool
+ if x.VolumeSource.HostPath == nil {
+ yyn6 = true
+ goto LABEL6
+ }
+ LABEL6:
+ if yyr2 || yy2arr2 {
+ if yyn6 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.HostPath == nil {
+ r.EncodeNil()
+ } else {
+ x.HostPath.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostPath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[2] {
+ if x.EmptyDir == nil {
+ r.EncodeNil()
+ } else {
+ x.EmptyDir.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("emptyDir"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ if x.GCEPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.GCEPersistentDisk.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("gcePersistentDisk"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[4] {
+ if x.AWSElasticBlockStore == nil {
+ r.EncodeNil()
+ } else {
+ x.AWSElasticBlockStore.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("awsElasticBlockStore"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[5] {
+ if x.GitRepo == nil {
+ r.EncodeNil()
+ } else {
+ x.GitRepo.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("gitRepo"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[6] {
+ if x.Secret == nil {
+ r.EncodeNil()
+ } else {
+ x.Secret.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secret"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[7] {
+ if x.NFS == nil {
+ r.EncodeNil()
+ } else {
+ x.NFS.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[8] {
+ if x.ISCSI == nil {
+ r.EncodeNil()
+ } else {
+ x.ISCSI.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("iscsi"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[9] {
+ if x.Glusterfs == nil {
+ r.EncodeNil()
+ } else {
+ x.Glusterfs.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("glusterfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[10] {
+ if x.PersistentVolumeClaim == nil {
+ r.EncodeNil()
+ } else {
+ x.PersistentVolumeClaim.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[10] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("persistentVolumeClaim"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[11] {
+ if x.RBD == nil {
+ r.EncodeNil()
+ } else {
+ x.RBD.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[11] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rbd"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[12] {
+ if x.FlexVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.FlexVolume.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[12] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("flexVolume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[13] {
+ if x.Cinder == nil {
+ r.EncodeNil()
+ } else {
+ x.Cinder.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[13] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("cinder"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[14] {
+ if x.CephFS == nil {
+ r.EncodeNil()
+ } else {
+ x.CephFS.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[14] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("cephfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[15] {
+ if x.Flocker == nil {
+ r.EncodeNil()
+ } else {
+ x.Flocker.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[15] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("flocker"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[16] {
+ if x.DownwardAPI == nil {
+ r.EncodeNil()
+ } else {
+ x.DownwardAPI.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[16] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("downwardAPI"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[17] {
+ if x.FC == nil {
+ r.EncodeNil()
+ } else {
+ x.FC.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[17] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fc"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[18] {
+ if x.AzureFile == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureFile.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[18] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("azureFile"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[19] {
+ if x.ConfigMap == nil {
+ r.EncodeNil()
+ } else {
+ x.ConfigMap.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[19] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("configMap"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[20] {
+ if x.VsphereVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.VsphereVolume.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[20] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("vsphereVolume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[21] {
+ if x.Quobyte == nil {
+ r.EncodeNil()
+ } else {
+ x.Quobyte.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[21] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("quobyte"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[22] {
+ if x.AzureDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureDisk.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[22] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("azureDisk"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[23] {
+ if x.PhotonPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.PhotonPersistentDisk.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[23] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("photonPersistentDisk"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[24] {
+ if x.Projected == nil {
+ r.EncodeNil()
+ } else {
+ x.Projected.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[24] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("projected"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[25] {
+ if x.PortworxVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.PortworxVolume.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[25] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("portworxVolume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[26] {
+ if x.ScaleIO == nil {
+ r.EncodeNil()
+ } else {
+ x.ScaleIO.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[26] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("scaleIO"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[27] {
+ if x.StorageOS == nil {
+ r.EncodeNil()
+ } else {
+ x.StorageOS.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[27] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("storageos"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn84 {
+ r.EncodeNil()
+ } else {
+ if x.StorageOS == nil {
+ r.EncodeNil()
+ } else {
+ x.StorageOS.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Volume) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Volume) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "hostPath":
+ if x.VolumeSource.HostPath == nil {
+ x.VolumeSource.HostPath = new(HostPathVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.HostPath != nil {
+ x.HostPath = nil
+ }
+ } else {
+ if x.HostPath == nil {
+ x.HostPath = new(HostPathVolumeSource)
+ }
+ x.HostPath.CodecDecodeSelf(d)
+ }
+ case "emptyDir":
+ if x.VolumeSource.EmptyDir == nil {
+ x.VolumeSource.EmptyDir = new(EmptyDirVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.EmptyDir != nil {
+ x.EmptyDir = nil
+ }
+ } else {
+ if x.EmptyDir == nil {
+ x.EmptyDir = new(EmptyDirVolumeSource)
+ }
+ x.EmptyDir.CodecDecodeSelf(d)
+ }
+ case "gcePersistentDisk":
+ if x.VolumeSource.GCEPersistentDisk == nil {
+ x.VolumeSource.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.GCEPersistentDisk != nil {
+ x.GCEPersistentDisk = nil
+ }
+ } else {
+ if x.GCEPersistentDisk == nil {
+ x.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ x.GCEPersistentDisk.CodecDecodeSelf(d)
+ }
+ case "awsElasticBlockStore":
+ if x.VolumeSource.AWSElasticBlockStore == nil {
+ x.VolumeSource.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.AWSElasticBlockStore != nil {
+ x.AWSElasticBlockStore = nil
+ }
+ } else {
+ if x.AWSElasticBlockStore == nil {
+ x.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ x.AWSElasticBlockStore.CodecDecodeSelf(d)
+ }
+ case "gitRepo":
+ if x.VolumeSource.GitRepo == nil {
+ x.VolumeSource.GitRepo = new(GitRepoVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.GitRepo != nil {
+ x.GitRepo = nil
+ }
+ } else {
+ if x.GitRepo == nil {
+ x.GitRepo = new(GitRepoVolumeSource)
+ }
+ x.GitRepo.CodecDecodeSelf(d)
+ }
+ case "secret":
+ if x.VolumeSource.Secret == nil {
+ x.VolumeSource.Secret = new(SecretVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.Secret != nil {
+ x.Secret = nil
+ }
+ } else {
+ if x.Secret == nil {
+ x.Secret = new(SecretVolumeSource)
+ }
+ x.Secret.CodecDecodeSelf(d)
+ }
+ case "nfs":
+ if x.VolumeSource.NFS == nil {
+ x.VolumeSource.NFS = new(NFSVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.NFS != nil {
+ x.NFS = nil
+ }
+ } else {
+ if x.NFS == nil {
+ x.NFS = new(NFSVolumeSource)
+ }
+ x.NFS.CodecDecodeSelf(d)
+ }
+ case "iscsi":
+ if x.VolumeSource.ISCSI == nil {
+ x.VolumeSource.ISCSI = new(ISCSIVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.ISCSI != nil {
+ x.ISCSI = nil
+ }
+ } else {
+ if x.ISCSI == nil {
+ x.ISCSI = new(ISCSIVolumeSource)
+ }
+ x.ISCSI.CodecDecodeSelf(d)
+ }
+ case "glusterfs":
+ if x.VolumeSource.Glusterfs == nil {
+ x.VolumeSource.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.Glusterfs != nil {
+ x.Glusterfs = nil
+ }
+ } else {
+ if x.Glusterfs == nil {
+ x.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ x.Glusterfs.CodecDecodeSelf(d)
+ }
+ case "persistentVolumeClaim":
+ if x.VolumeSource.PersistentVolumeClaim == nil {
+ x.VolumeSource.PersistentVolumeClaim = new(PersistentVolumeClaimVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.PersistentVolumeClaim != nil {
+ x.PersistentVolumeClaim = nil
+ }
+ } else {
+ if x.PersistentVolumeClaim == nil {
+ x.PersistentVolumeClaim = new(PersistentVolumeClaimVolumeSource)
+ }
+ x.PersistentVolumeClaim.CodecDecodeSelf(d)
+ }
+ case "rbd":
+ if x.VolumeSource.RBD == nil {
+ x.VolumeSource.RBD = new(RBDVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.RBD != nil {
+ x.RBD = nil
+ }
+ } else {
+ if x.RBD == nil {
+ x.RBD = new(RBDVolumeSource)
+ }
+ x.RBD.CodecDecodeSelf(d)
+ }
+ case "flexVolume":
+ if x.VolumeSource.FlexVolume == nil {
+ x.VolumeSource.FlexVolume = new(FlexVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.FlexVolume != nil {
+ x.FlexVolume = nil
+ }
+ } else {
+ if x.FlexVolume == nil {
+ x.FlexVolume = new(FlexVolumeSource)
+ }
+ x.FlexVolume.CodecDecodeSelf(d)
+ }
+ case "cinder":
+ if x.VolumeSource.Cinder == nil {
+ x.VolumeSource.Cinder = new(CinderVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.Cinder != nil {
+ x.Cinder = nil
+ }
+ } else {
+ if x.Cinder == nil {
+ x.Cinder = new(CinderVolumeSource)
+ }
+ x.Cinder.CodecDecodeSelf(d)
+ }
+ case "cephfs":
+ if x.VolumeSource.CephFS == nil {
+ x.VolumeSource.CephFS = new(CephFSVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.CephFS != nil {
+ x.CephFS = nil
+ }
+ } else {
+ if x.CephFS == nil {
+ x.CephFS = new(CephFSVolumeSource)
+ }
+ x.CephFS.CodecDecodeSelf(d)
+ }
+ case "flocker":
+ if x.VolumeSource.Flocker == nil {
+ x.VolumeSource.Flocker = new(FlockerVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.Flocker != nil {
+ x.Flocker = nil
+ }
+ } else {
+ if x.Flocker == nil {
+ x.Flocker = new(FlockerVolumeSource)
+ }
+ x.Flocker.CodecDecodeSelf(d)
+ }
+ case "downwardAPI":
+ if x.VolumeSource.DownwardAPI == nil {
+ x.VolumeSource.DownwardAPI = new(DownwardAPIVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.DownwardAPI != nil {
+ x.DownwardAPI = nil
+ }
+ } else {
+ if x.DownwardAPI == nil {
+ x.DownwardAPI = new(DownwardAPIVolumeSource)
+ }
+ x.DownwardAPI.CodecDecodeSelf(d)
+ }
+ case "fc":
+ if x.VolumeSource.FC == nil {
+ x.VolumeSource.FC = new(FCVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.FC != nil {
+ x.FC = nil
+ }
+ } else {
+ if x.FC == nil {
+ x.FC = new(FCVolumeSource)
+ }
+ x.FC.CodecDecodeSelf(d)
+ }
+ case "azureFile":
+ if x.VolumeSource.AzureFile == nil {
+ x.VolumeSource.AzureFile = new(AzureFileVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.AzureFile != nil {
+ x.AzureFile = nil
+ }
+ } else {
+ if x.AzureFile == nil {
+ x.AzureFile = new(AzureFileVolumeSource)
+ }
+ x.AzureFile.CodecDecodeSelf(d)
+ }
+ case "configMap":
+ if x.VolumeSource.ConfigMap == nil {
+ x.VolumeSource.ConfigMap = new(ConfigMapVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.ConfigMap != nil {
+ x.ConfigMap = nil
+ }
+ } else {
+ if x.ConfigMap == nil {
+ x.ConfigMap = new(ConfigMapVolumeSource)
+ }
+ x.ConfigMap.CodecDecodeSelf(d)
+ }
+ case "vsphereVolume":
+ if x.VolumeSource.VsphereVolume == nil {
+ x.VolumeSource.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.VsphereVolume != nil {
+ x.VsphereVolume = nil
+ }
+ } else {
+ if x.VsphereVolume == nil {
+ x.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ x.VsphereVolume.CodecDecodeSelf(d)
+ }
+ case "quobyte":
+ if x.VolumeSource.Quobyte == nil {
+ x.VolumeSource.Quobyte = new(QuobyteVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.Quobyte != nil {
+ x.Quobyte = nil
+ }
+ } else {
+ if x.Quobyte == nil {
+ x.Quobyte = new(QuobyteVolumeSource)
+ }
+ x.Quobyte.CodecDecodeSelf(d)
+ }
+ case "azureDisk":
+ if x.VolumeSource.AzureDisk == nil {
+ x.VolumeSource.AzureDisk = new(AzureDiskVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.AzureDisk != nil {
+ x.AzureDisk = nil
+ }
+ } else {
+ if x.AzureDisk == nil {
+ x.AzureDisk = new(AzureDiskVolumeSource)
+ }
+ x.AzureDisk.CodecDecodeSelf(d)
+ }
+ case "photonPersistentDisk":
+ if x.VolumeSource.PhotonPersistentDisk == nil {
+ x.VolumeSource.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.PhotonPersistentDisk != nil {
+ x.PhotonPersistentDisk = nil
+ }
+ } else {
+ if x.PhotonPersistentDisk == nil {
+ x.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource)
+ }
+ x.PhotonPersistentDisk.CodecDecodeSelf(d)
+ }
+ case "projected":
+ if x.VolumeSource.Projected == nil {
+ x.VolumeSource.Projected = new(ProjectedVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.Projected != nil {
+ x.Projected = nil
+ }
+ } else {
+ if x.Projected == nil {
+ x.Projected = new(ProjectedVolumeSource)
+ }
+ x.Projected.CodecDecodeSelf(d)
+ }
+ case "portworxVolume":
+ if x.VolumeSource.PortworxVolume == nil {
+ x.VolumeSource.PortworxVolume = new(PortworxVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.PortworxVolume != nil {
+ x.PortworxVolume = nil
+ }
+ } else {
+ if x.PortworxVolume == nil {
+ x.PortworxVolume = new(PortworxVolumeSource)
+ }
+ x.PortworxVolume.CodecDecodeSelf(d)
+ }
+ case "scaleIO":
+ if x.VolumeSource.ScaleIO == nil {
+ x.VolumeSource.ScaleIO = new(ScaleIOVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.ScaleIO != nil {
+ x.ScaleIO = nil
+ }
+ } else {
+ if x.ScaleIO == nil {
+ x.ScaleIO = new(ScaleIOVolumeSource)
+ }
+ x.ScaleIO.CodecDecodeSelf(d)
+ }
+ case "storageos":
+ if x.VolumeSource.StorageOS == nil {
+ x.VolumeSource.StorageOS = new(StorageOSVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.StorageOS != nil {
+ x.StorageOS = nil
+ }
+ } else {
+ if x.StorageOS == nil {
+ x.StorageOS = new(StorageOSVolumeSource)
+ }
+ x.StorageOS.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Volume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv34 := &x.Name
+ yym35 := z.DecBinary()
+ _ = yym35
+ if false {
+ } else {
+ *((*string)(yyv34)) = r.DecodeString()
+ }
+ }
+ if x.VolumeSource.HostPath == nil {
+ x.VolumeSource.HostPath = new(HostPathVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.HostPath != nil {
+ x.HostPath = nil
+ }
+ } else {
+ if x.HostPath == nil {
+ x.HostPath = new(HostPathVolumeSource)
+ }
+ x.HostPath.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.EmptyDir == nil {
+ x.VolumeSource.EmptyDir = new(EmptyDirVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.EmptyDir != nil {
+ x.EmptyDir = nil
+ }
+ } else {
+ if x.EmptyDir == nil {
+ x.EmptyDir = new(EmptyDirVolumeSource)
+ }
+ x.EmptyDir.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.GCEPersistentDisk == nil {
+ x.VolumeSource.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.GCEPersistentDisk != nil {
+ x.GCEPersistentDisk = nil
+ }
+ } else {
+ if x.GCEPersistentDisk == nil {
+ x.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ x.GCEPersistentDisk.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.AWSElasticBlockStore == nil {
+ x.VolumeSource.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.AWSElasticBlockStore != nil {
+ x.AWSElasticBlockStore = nil
+ }
+ } else {
+ if x.AWSElasticBlockStore == nil {
+ x.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ x.AWSElasticBlockStore.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.GitRepo == nil {
+ x.VolumeSource.GitRepo = new(GitRepoVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.GitRepo != nil {
+ x.GitRepo = nil
+ }
+ } else {
+ if x.GitRepo == nil {
+ x.GitRepo = new(GitRepoVolumeSource)
+ }
+ x.GitRepo.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.Secret == nil {
+ x.VolumeSource.Secret = new(SecretVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Secret != nil {
+ x.Secret = nil
+ }
+ } else {
+ if x.Secret == nil {
+ x.Secret = new(SecretVolumeSource)
+ }
+ x.Secret.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.NFS == nil {
+ x.VolumeSource.NFS = new(NFSVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.NFS != nil {
+ x.NFS = nil
+ }
+ } else {
+ if x.NFS == nil {
+ x.NFS = new(NFSVolumeSource)
+ }
+ x.NFS.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.ISCSI == nil {
+ x.VolumeSource.ISCSI = new(ISCSIVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ISCSI != nil {
+ x.ISCSI = nil
+ }
+ } else {
+ if x.ISCSI == nil {
+ x.ISCSI = new(ISCSIVolumeSource)
+ }
+ x.ISCSI.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.Glusterfs == nil {
+ x.VolumeSource.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Glusterfs != nil {
+ x.Glusterfs = nil
+ }
+ } else {
+ if x.Glusterfs == nil {
+ x.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ x.Glusterfs.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.PersistentVolumeClaim == nil {
+ x.VolumeSource.PersistentVolumeClaim = new(PersistentVolumeClaimVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PersistentVolumeClaim != nil {
+ x.PersistentVolumeClaim = nil
+ }
+ } else {
+ if x.PersistentVolumeClaim == nil {
+ x.PersistentVolumeClaim = new(PersistentVolumeClaimVolumeSource)
+ }
+ x.PersistentVolumeClaim.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.RBD == nil {
+ x.VolumeSource.RBD = new(RBDVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RBD != nil {
+ x.RBD = nil
+ }
+ } else {
+ if x.RBD == nil {
+ x.RBD = new(RBDVolumeSource)
+ }
+ x.RBD.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.FlexVolume == nil {
+ x.VolumeSource.FlexVolume = new(FlexVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FlexVolume != nil {
+ x.FlexVolume = nil
+ }
+ } else {
+ if x.FlexVolume == nil {
+ x.FlexVolume = new(FlexVolumeSource)
+ }
+ x.FlexVolume.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.Cinder == nil {
+ x.VolumeSource.Cinder = new(CinderVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Cinder != nil {
+ x.Cinder = nil
+ }
+ } else {
+ if x.Cinder == nil {
+ x.Cinder = new(CinderVolumeSource)
+ }
+ x.Cinder.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.CephFS == nil {
+ x.VolumeSource.CephFS = new(CephFSVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.CephFS != nil {
+ x.CephFS = nil
+ }
+ } else {
+ if x.CephFS == nil {
+ x.CephFS = new(CephFSVolumeSource)
+ }
+ x.CephFS.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.Flocker == nil {
+ x.VolumeSource.Flocker = new(FlockerVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Flocker != nil {
+ x.Flocker = nil
+ }
+ } else {
+ if x.Flocker == nil {
+ x.Flocker = new(FlockerVolumeSource)
+ }
+ x.Flocker.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.DownwardAPI == nil {
+ x.VolumeSource.DownwardAPI = new(DownwardAPIVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.DownwardAPI != nil {
+ x.DownwardAPI = nil
+ }
+ } else {
+ if x.DownwardAPI == nil {
+ x.DownwardAPI = new(DownwardAPIVolumeSource)
+ }
+ x.DownwardAPI.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.FC == nil {
+ x.VolumeSource.FC = new(FCVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FC != nil {
+ x.FC = nil
+ }
+ } else {
+ if x.FC == nil {
+ x.FC = new(FCVolumeSource)
+ }
+ x.FC.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.AzureFile == nil {
+ x.VolumeSource.AzureFile = new(AzureFileVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.AzureFile != nil {
+ x.AzureFile = nil
+ }
+ } else {
+ if x.AzureFile == nil {
+ x.AzureFile = new(AzureFileVolumeSource)
+ }
+ x.AzureFile.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.ConfigMap == nil {
+ x.VolumeSource.ConfigMap = new(ConfigMapVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ConfigMap != nil {
+ x.ConfigMap = nil
+ }
+ } else {
+ if x.ConfigMap == nil {
+ x.ConfigMap = new(ConfigMapVolumeSource)
+ }
+ x.ConfigMap.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.VsphereVolume == nil {
+ x.VolumeSource.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.VsphereVolume != nil {
+ x.VsphereVolume = nil
+ }
+ } else {
+ if x.VsphereVolume == nil {
+ x.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ x.VsphereVolume.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.Quobyte == nil {
+ x.VolumeSource.Quobyte = new(QuobyteVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Quobyte != nil {
+ x.Quobyte = nil
+ }
+ } else {
+ if x.Quobyte == nil {
+ x.Quobyte = new(QuobyteVolumeSource)
+ }
+ x.Quobyte.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.AzureDisk == nil {
+ x.VolumeSource.AzureDisk = new(AzureDiskVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.AzureDisk != nil {
+ x.AzureDisk = nil
+ }
+ } else {
+ if x.AzureDisk == nil {
+ x.AzureDisk = new(AzureDiskVolumeSource)
+ }
+ x.AzureDisk.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.PhotonPersistentDisk == nil {
+ x.VolumeSource.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PhotonPersistentDisk != nil {
+ x.PhotonPersistentDisk = nil
+ }
+ } else {
+ if x.PhotonPersistentDisk == nil {
+ x.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource)
+ }
+ x.PhotonPersistentDisk.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.Projected == nil {
+ x.VolumeSource.Projected = new(ProjectedVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Projected != nil {
+ x.Projected = nil
+ }
+ } else {
+ if x.Projected == nil {
+ x.Projected = new(ProjectedVolumeSource)
+ }
+ x.Projected.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.PortworxVolume == nil {
+ x.VolumeSource.PortworxVolume = new(PortworxVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PortworxVolume != nil {
+ x.PortworxVolume = nil
+ }
+ } else {
+ if x.PortworxVolume == nil {
+ x.PortworxVolume = new(PortworxVolumeSource)
+ }
+ x.PortworxVolume.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.ScaleIO == nil {
+ x.VolumeSource.ScaleIO = new(ScaleIOVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ScaleIO != nil {
+ x.ScaleIO = nil
+ }
+ } else {
+ if x.ScaleIO == nil {
+ x.ScaleIO = new(ScaleIOVolumeSource)
+ }
+ x.ScaleIO.CodecDecodeSelf(d)
+ }
+ if x.VolumeSource.StorageOS == nil {
+ x.VolumeSource.StorageOS = new(StorageOSVolumeSource)
+ }
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.StorageOS != nil {
+ x.StorageOS = nil
+ }
+ } else {
+ if x.StorageOS == nil {
+ x.StorageOS = new(StorageOSVolumeSource)
+ }
+ x.StorageOS.CodecDecodeSelf(d)
+ }
+ for {
+ yyj33++
+ if yyhl33 {
+ yyb33 = yyj33 > l
+ } else {
+ yyb33 = r.CheckBreak()
+ }
+ if yyb33 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj33-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *VolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [27]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.HostPath != nil
+ yyq2[1] = x.EmptyDir != nil
+ yyq2[2] = x.GCEPersistentDisk != nil
+ yyq2[3] = x.AWSElasticBlockStore != nil
+ yyq2[4] = x.GitRepo != nil
+ yyq2[5] = x.Secret != nil
+ yyq2[6] = x.NFS != nil
+ yyq2[7] = x.ISCSI != nil
+ yyq2[8] = x.Glusterfs != nil
+ yyq2[9] = x.PersistentVolumeClaim != nil
+ yyq2[10] = x.RBD != nil
+ yyq2[11] = x.FlexVolume != nil
+ yyq2[12] = x.Cinder != nil
+ yyq2[13] = x.CephFS != nil
+ yyq2[14] = x.Flocker != nil
+ yyq2[15] = x.DownwardAPI != nil
+ yyq2[16] = x.FC != nil
+ yyq2[17] = x.AzureFile != nil
+ yyq2[18] = x.ConfigMap != nil
+ yyq2[19] = x.VsphereVolume != nil
+ yyq2[20] = x.Quobyte != nil
+ yyq2[21] = x.AzureDisk != nil
+ yyq2[22] = x.PhotonPersistentDisk != nil
+ yyq2[23] = x.Projected != nil
+ yyq2[24] = x.PortworxVolume != nil
+ yyq2[25] = x.ScaleIO != nil
+ yyq2[26] = x.StorageOS != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(27)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.HostPath == nil {
+ r.EncodeNil()
+ } else {
+ x.HostPath.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostPath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.HostPath == nil {
+ r.EncodeNil()
+ } else {
+ x.HostPath.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.EmptyDir == nil {
+ r.EncodeNil()
+ } else {
+ x.EmptyDir.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("emptyDir"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.EmptyDir == nil {
+ r.EncodeNil()
+ } else {
+ x.EmptyDir.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.GCEPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.GCEPersistentDisk.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("gcePersistentDisk"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.GCEPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.GCEPersistentDisk.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.AWSElasticBlockStore == nil {
+ r.EncodeNil()
+ } else {
+ x.AWSElasticBlockStore.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("awsElasticBlockStore"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.AWSElasticBlockStore == nil {
+ r.EncodeNil()
+ } else {
+ x.AWSElasticBlockStore.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.GitRepo == nil {
+ r.EncodeNil()
+ } else {
+ x.GitRepo.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("gitRepo"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.GitRepo == nil {
+ r.EncodeNil()
+ } else {
+ x.GitRepo.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.Secret == nil {
+ r.EncodeNil()
+ } else {
+ x.Secret.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secret"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Secret == nil {
+ r.EncodeNil()
+ } else {
+ x.Secret.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.NFS == nil {
+ r.EncodeNil()
+ } else {
+ x.NFS.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NFS == nil {
+ r.EncodeNil()
+ } else {
+ x.NFS.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.ISCSI == nil {
+ r.EncodeNil()
+ } else {
+ x.ISCSI.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("iscsi"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ISCSI == nil {
+ r.EncodeNil()
+ } else {
+ x.ISCSI.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ if x.Glusterfs == nil {
+ r.EncodeNil()
+ } else {
+ x.Glusterfs.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("glusterfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Glusterfs == nil {
+ r.EncodeNil()
+ } else {
+ x.Glusterfs.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ if x.PersistentVolumeClaim == nil {
+ r.EncodeNil()
+ } else {
+ x.PersistentVolumeClaim.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("persistentVolumeClaim"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PersistentVolumeClaim == nil {
+ r.EncodeNil()
+ } else {
+ x.PersistentVolumeClaim.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[10] {
+ if x.RBD == nil {
+ r.EncodeNil()
+ } else {
+ x.RBD.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[10] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rbd"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RBD == nil {
+ r.EncodeNil()
+ } else {
+ x.RBD.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[11] {
+ if x.FlexVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.FlexVolume.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[11] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("flexVolume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.FlexVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.FlexVolume.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[12] {
+ if x.Cinder == nil {
+ r.EncodeNil()
+ } else {
+ x.Cinder.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[12] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("cinder"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Cinder == nil {
+ r.EncodeNil()
+ } else {
+ x.Cinder.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[13] {
+ if x.CephFS == nil {
+ r.EncodeNil()
+ } else {
+ x.CephFS.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[13] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("cephfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.CephFS == nil {
+ r.EncodeNil()
+ } else {
+ x.CephFS.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[14] {
+ if x.Flocker == nil {
+ r.EncodeNil()
+ } else {
+ x.Flocker.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[14] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("flocker"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Flocker == nil {
+ r.EncodeNil()
+ } else {
+ x.Flocker.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[15] {
+ if x.DownwardAPI == nil {
+ r.EncodeNil()
+ } else {
+ x.DownwardAPI.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[15] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("downwardAPI"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.DownwardAPI == nil {
+ r.EncodeNil()
+ } else {
+ x.DownwardAPI.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[16] {
+ if x.FC == nil {
+ r.EncodeNil()
+ } else {
+ x.FC.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[16] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fc"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.FC == nil {
+ r.EncodeNil()
+ } else {
+ x.FC.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[17] {
+ if x.AzureFile == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureFile.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[17] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("azureFile"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.AzureFile == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureFile.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[18] {
+ if x.ConfigMap == nil {
+ r.EncodeNil()
+ } else {
+ x.ConfigMap.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[18] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("configMap"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ConfigMap == nil {
+ r.EncodeNil()
+ } else {
+ x.ConfigMap.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[19] {
+ if x.VsphereVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.VsphereVolume.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[19] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("vsphereVolume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.VsphereVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.VsphereVolume.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[20] {
+ if x.Quobyte == nil {
+ r.EncodeNil()
+ } else {
+ x.Quobyte.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[20] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("quobyte"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Quobyte == nil {
+ r.EncodeNil()
+ } else {
+ x.Quobyte.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[21] {
+ if x.AzureDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureDisk.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[21] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("azureDisk"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.AzureDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureDisk.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[22] {
+ if x.PhotonPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.PhotonPersistentDisk.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[22] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("photonPersistentDisk"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PhotonPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.PhotonPersistentDisk.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[23] {
+ if x.Projected == nil {
+ r.EncodeNil()
+ } else {
+ x.Projected.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[23] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("projected"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Projected == nil {
+ r.EncodeNil()
+ } else {
+ x.Projected.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[24] {
+ if x.PortworxVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.PortworxVolume.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[24] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("portworxVolume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PortworxVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.PortworxVolume.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[25] {
+ if x.ScaleIO == nil {
+ r.EncodeNil()
+ } else {
+ x.ScaleIO.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[25] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("scaleIO"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ScaleIO == nil {
+ r.EncodeNil()
+ } else {
+ x.ScaleIO.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[26] {
+ if x.StorageOS == nil {
+ r.EncodeNil()
+ } else {
+ x.StorageOS.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[26] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("storageos"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.StorageOS == nil {
+ r.EncodeNil()
+ } else {
+ x.StorageOS.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *VolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *VolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "hostPath":
+ if r.TryDecodeAsNil() {
+ if x.HostPath != nil {
+ x.HostPath = nil
+ }
+ } else {
+ if x.HostPath == nil {
+ x.HostPath = new(HostPathVolumeSource)
+ }
+ x.HostPath.CodecDecodeSelf(d)
+ }
+ case "emptyDir":
+ if r.TryDecodeAsNil() {
+ if x.EmptyDir != nil {
+ x.EmptyDir = nil
+ }
+ } else {
+ if x.EmptyDir == nil {
+ x.EmptyDir = new(EmptyDirVolumeSource)
+ }
+ x.EmptyDir.CodecDecodeSelf(d)
+ }
+ case "gcePersistentDisk":
+ if r.TryDecodeAsNil() {
+ if x.GCEPersistentDisk != nil {
+ x.GCEPersistentDisk = nil
+ }
+ } else {
+ if x.GCEPersistentDisk == nil {
+ x.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ x.GCEPersistentDisk.CodecDecodeSelf(d)
+ }
+ case "awsElasticBlockStore":
+ if r.TryDecodeAsNil() {
+ if x.AWSElasticBlockStore != nil {
+ x.AWSElasticBlockStore = nil
+ }
+ } else {
+ if x.AWSElasticBlockStore == nil {
+ x.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ x.AWSElasticBlockStore.CodecDecodeSelf(d)
+ }
+ case "gitRepo":
+ if r.TryDecodeAsNil() {
+ if x.GitRepo != nil {
+ x.GitRepo = nil
+ }
+ } else {
+ if x.GitRepo == nil {
+ x.GitRepo = new(GitRepoVolumeSource)
+ }
+ x.GitRepo.CodecDecodeSelf(d)
+ }
+ case "secret":
+ if r.TryDecodeAsNil() {
+ if x.Secret != nil {
+ x.Secret = nil
+ }
+ } else {
+ if x.Secret == nil {
+ x.Secret = new(SecretVolumeSource)
+ }
+ x.Secret.CodecDecodeSelf(d)
+ }
+ case "nfs":
+ if r.TryDecodeAsNil() {
+ if x.NFS != nil {
+ x.NFS = nil
+ }
+ } else {
+ if x.NFS == nil {
+ x.NFS = new(NFSVolumeSource)
+ }
+ x.NFS.CodecDecodeSelf(d)
+ }
+ case "iscsi":
+ if r.TryDecodeAsNil() {
+ if x.ISCSI != nil {
+ x.ISCSI = nil
+ }
+ } else {
+ if x.ISCSI == nil {
+ x.ISCSI = new(ISCSIVolumeSource)
+ }
+ x.ISCSI.CodecDecodeSelf(d)
+ }
+ case "glusterfs":
+ if r.TryDecodeAsNil() {
+ if x.Glusterfs != nil {
+ x.Glusterfs = nil
+ }
+ } else {
+ if x.Glusterfs == nil {
+ x.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ x.Glusterfs.CodecDecodeSelf(d)
+ }
+ case "persistentVolumeClaim":
+ if r.TryDecodeAsNil() {
+ if x.PersistentVolumeClaim != nil {
+ x.PersistentVolumeClaim = nil
+ }
+ } else {
+ if x.PersistentVolumeClaim == nil {
+ x.PersistentVolumeClaim = new(PersistentVolumeClaimVolumeSource)
+ }
+ x.PersistentVolumeClaim.CodecDecodeSelf(d)
+ }
+ case "rbd":
+ if r.TryDecodeAsNil() {
+ if x.RBD != nil {
+ x.RBD = nil
+ }
+ } else {
+ if x.RBD == nil {
+ x.RBD = new(RBDVolumeSource)
+ }
+ x.RBD.CodecDecodeSelf(d)
+ }
+ case "flexVolume":
+ if r.TryDecodeAsNil() {
+ if x.FlexVolume != nil {
+ x.FlexVolume = nil
+ }
+ } else {
+ if x.FlexVolume == nil {
+ x.FlexVolume = new(FlexVolumeSource)
+ }
+ x.FlexVolume.CodecDecodeSelf(d)
+ }
+ case "cinder":
+ if r.TryDecodeAsNil() {
+ if x.Cinder != nil {
+ x.Cinder = nil
+ }
+ } else {
+ if x.Cinder == nil {
+ x.Cinder = new(CinderVolumeSource)
+ }
+ x.Cinder.CodecDecodeSelf(d)
+ }
+ case "cephfs":
+ if r.TryDecodeAsNil() {
+ if x.CephFS != nil {
+ x.CephFS = nil
+ }
+ } else {
+ if x.CephFS == nil {
+ x.CephFS = new(CephFSVolumeSource)
+ }
+ x.CephFS.CodecDecodeSelf(d)
+ }
+ case "flocker":
+ if r.TryDecodeAsNil() {
+ if x.Flocker != nil {
+ x.Flocker = nil
+ }
+ } else {
+ if x.Flocker == nil {
+ x.Flocker = new(FlockerVolumeSource)
+ }
+ x.Flocker.CodecDecodeSelf(d)
+ }
+ case "downwardAPI":
+ if r.TryDecodeAsNil() {
+ if x.DownwardAPI != nil {
+ x.DownwardAPI = nil
+ }
+ } else {
+ if x.DownwardAPI == nil {
+ x.DownwardAPI = new(DownwardAPIVolumeSource)
+ }
+ x.DownwardAPI.CodecDecodeSelf(d)
+ }
+ case "fc":
+ if r.TryDecodeAsNil() {
+ if x.FC != nil {
+ x.FC = nil
+ }
+ } else {
+ if x.FC == nil {
+ x.FC = new(FCVolumeSource)
+ }
+ x.FC.CodecDecodeSelf(d)
+ }
+ case "azureFile":
+ if r.TryDecodeAsNil() {
+ if x.AzureFile != nil {
+ x.AzureFile = nil
+ }
+ } else {
+ if x.AzureFile == nil {
+ x.AzureFile = new(AzureFileVolumeSource)
+ }
+ x.AzureFile.CodecDecodeSelf(d)
+ }
+ case "configMap":
+ if r.TryDecodeAsNil() {
+ if x.ConfigMap != nil {
+ x.ConfigMap = nil
+ }
+ } else {
+ if x.ConfigMap == nil {
+ x.ConfigMap = new(ConfigMapVolumeSource)
+ }
+ x.ConfigMap.CodecDecodeSelf(d)
+ }
+ case "vsphereVolume":
+ if r.TryDecodeAsNil() {
+ if x.VsphereVolume != nil {
+ x.VsphereVolume = nil
+ }
+ } else {
+ if x.VsphereVolume == nil {
+ x.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ x.VsphereVolume.CodecDecodeSelf(d)
+ }
+ case "quobyte":
+ if r.TryDecodeAsNil() {
+ if x.Quobyte != nil {
+ x.Quobyte = nil
+ }
+ } else {
+ if x.Quobyte == nil {
+ x.Quobyte = new(QuobyteVolumeSource)
+ }
+ x.Quobyte.CodecDecodeSelf(d)
+ }
+ case "azureDisk":
+ if r.TryDecodeAsNil() {
+ if x.AzureDisk != nil {
+ x.AzureDisk = nil
+ }
+ } else {
+ if x.AzureDisk == nil {
+ x.AzureDisk = new(AzureDiskVolumeSource)
+ }
+ x.AzureDisk.CodecDecodeSelf(d)
+ }
+ case "photonPersistentDisk":
+ if r.TryDecodeAsNil() {
+ if x.PhotonPersistentDisk != nil {
+ x.PhotonPersistentDisk = nil
+ }
+ } else {
+ if x.PhotonPersistentDisk == nil {
+ x.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource)
+ }
+ x.PhotonPersistentDisk.CodecDecodeSelf(d)
+ }
+ case "projected":
+ if r.TryDecodeAsNil() {
+ if x.Projected != nil {
+ x.Projected = nil
+ }
+ } else {
+ if x.Projected == nil {
+ x.Projected = new(ProjectedVolumeSource)
+ }
+ x.Projected.CodecDecodeSelf(d)
+ }
+ case "portworxVolume":
+ if r.TryDecodeAsNil() {
+ if x.PortworxVolume != nil {
+ x.PortworxVolume = nil
+ }
+ } else {
+ if x.PortworxVolume == nil {
+ x.PortworxVolume = new(PortworxVolumeSource)
+ }
+ x.PortworxVolume.CodecDecodeSelf(d)
+ }
+ case "scaleIO":
+ if r.TryDecodeAsNil() {
+ if x.ScaleIO != nil {
+ x.ScaleIO = nil
+ }
+ } else {
+ if x.ScaleIO == nil {
+ x.ScaleIO = new(ScaleIOVolumeSource)
+ }
+ x.ScaleIO.CodecDecodeSelf(d)
+ }
+ case "storageos":
+ if r.TryDecodeAsNil() {
+ if x.StorageOS != nil {
+ x.StorageOS = nil
+ }
+ } else {
+ if x.StorageOS == nil {
+ x.StorageOS = new(StorageOSVolumeSource)
+ }
+ x.StorageOS.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *VolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj31 int
+ var yyb31 bool
+ var yyhl31 bool = l >= 0
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.HostPath != nil {
+ x.HostPath = nil
+ }
+ } else {
+ if x.HostPath == nil {
+ x.HostPath = new(HostPathVolumeSource)
+ }
+ x.HostPath.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.EmptyDir != nil {
+ x.EmptyDir = nil
+ }
+ } else {
+ if x.EmptyDir == nil {
+ x.EmptyDir = new(EmptyDirVolumeSource)
+ }
+ x.EmptyDir.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.GCEPersistentDisk != nil {
+ x.GCEPersistentDisk = nil
+ }
+ } else {
+ if x.GCEPersistentDisk == nil {
+ x.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ x.GCEPersistentDisk.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.AWSElasticBlockStore != nil {
+ x.AWSElasticBlockStore = nil
+ }
+ } else {
+ if x.AWSElasticBlockStore == nil {
+ x.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ x.AWSElasticBlockStore.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.GitRepo != nil {
+ x.GitRepo = nil
+ }
+ } else {
+ if x.GitRepo == nil {
+ x.GitRepo = new(GitRepoVolumeSource)
+ }
+ x.GitRepo.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Secret != nil {
+ x.Secret = nil
+ }
+ } else {
+ if x.Secret == nil {
+ x.Secret = new(SecretVolumeSource)
+ }
+ x.Secret.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.NFS != nil {
+ x.NFS = nil
+ }
+ } else {
+ if x.NFS == nil {
+ x.NFS = new(NFSVolumeSource)
+ }
+ x.NFS.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ISCSI != nil {
+ x.ISCSI = nil
+ }
+ } else {
+ if x.ISCSI == nil {
+ x.ISCSI = new(ISCSIVolumeSource)
+ }
+ x.ISCSI.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Glusterfs != nil {
+ x.Glusterfs = nil
+ }
+ } else {
+ if x.Glusterfs == nil {
+ x.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ x.Glusterfs.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PersistentVolumeClaim != nil {
+ x.PersistentVolumeClaim = nil
+ }
+ } else {
+ if x.PersistentVolumeClaim == nil {
+ x.PersistentVolumeClaim = new(PersistentVolumeClaimVolumeSource)
+ }
+ x.PersistentVolumeClaim.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RBD != nil {
+ x.RBD = nil
+ }
+ } else {
+ if x.RBD == nil {
+ x.RBD = new(RBDVolumeSource)
+ }
+ x.RBD.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FlexVolume != nil {
+ x.FlexVolume = nil
+ }
+ } else {
+ if x.FlexVolume == nil {
+ x.FlexVolume = new(FlexVolumeSource)
+ }
+ x.FlexVolume.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Cinder != nil {
+ x.Cinder = nil
+ }
+ } else {
+ if x.Cinder == nil {
+ x.Cinder = new(CinderVolumeSource)
+ }
+ x.Cinder.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.CephFS != nil {
+ x.CephFS = nil
+ }
+ } else {
+ if x.CephFS == nil {
+ x.CephFS = new(CephFSVolumeSource)
+ }
+ x.CephFS.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Flocker != nil {
+ x.Flocker = nil
+ }
+ } else {
+ if x.Flocker == nil {
+ x.Flocker = new(FlockerVolumeSource)
+ }
+ x.Flocker.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.DownwardAPI != nil {
+ x.DownwardAPI = nil
+ }
+ } else {
+ if x.DownwardAPI == nil {
+ x.DownwardAPI = new(DownwardAPIVolumeSource)
+ }
+ x.DownwardAPI.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FC != nil {
+ x.FC = nil
+ }
+ } else {
+ if x.FC == nil {
+ x.FC = new(FCVolumeSource)
+ }
+ x.FC.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.AzureFile != nil {
+ x.AzureFile = nil
+ }
+ } else {
+ if x.AzureFile == nil {
+ x.AzureFile = new(AzureFileVolumeSource)
+ }
+ x.AzureFile.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ConfigMap != nil {
+ x.ConfigMap = nil
+ }
+ } else {
+ if x.ConfigMap == nil {
+ x.ConfigMap = new(ConfigMapVolumeSource)
+ }
+ x.ConfigMap.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.VsphereVolume != nil {
+ x.VsphereVolume = nil
+ }
+ } else {
+ if x.VsphereVolume == nil {
+ x.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ x.VsphereVolume.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Quobyte != nil {
+ x.Quobyte = nil
+ }
+ } else {
+ if x.Quobyte == nil {
+ x.Quobyte = new(QuobyteVolumeSource)
+ }
+ x.Quobyte.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.AzureDisk != nil {
+ x.AzureDisk = nil
+ }
+ } else {
+ if x.AzureDisk == nil {
+ x.AzureDisk = new(AzureDiskVolumeSource)
+ }
+ x.AzureDisk.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PhotonPersistentDisk != nil {
+ x.PhotonPersistentDisk = nil
+ }
+ } else {
+ if x.PhotonPersistentDisk == nil {
+ x.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource)
+ }
+ x.PhotonPersistentDisk.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Projected != nil {
+ x.Projected = nil
+ }
+ } else {
+ if x.Projected == nil {
+ x.Projected = new(ProjectedVolumeSource)
+ }
+ x.Projected.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PortworxVolume != nil {
+ x.PortworxVolume = nil
+ }
+ } else {
+ if x.PortworxVolume == nil {
+ x.PortworxVolume = new(PortworxVolumeSource)
+ }
+ x.PortworxVolume.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ScaleIO != nil {
+ x.ScaleIO = nil
+ }
+ } else {
+ if x.ScaleIO == nil {
+ x.ScaleIO = new(ScaleIOVolumeSource)
+ }
+ x.ScaleIO.CodecDecodeSelf(d)
+ }
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.StorageOS != nil {
+ x.StorageOS = nil
+ }
+ } else {
+ if x.StorageOS == nil {
+ x.StorageOS = new(StorageOSVolumeSource)
+ }
+ x.StorageOS.CodecDecodeSelf(d)
+ }
+ for {
+ yyj31++
+ if yyhl31 {
+ yyb31 = yyj31 > l
+ } else {
+ yyb31 = r.CheckBreak()
+ }
+ if yyb31 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj31-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PersistentVolumeClaimVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.ReadOnly != false
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ClaimName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("claimName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ClaimName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PersistentVolumeClaimVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PersistentVolumeClaimVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "claimName":
+ if r.TryDecodeAsNil() {
+ x.ClaimName = ""
+ } else {
+ yyv4 := &x.ClaimName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv6 := &x.ReadOnly
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*bool)(yyv6)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PersistentVolumeClaimVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ClaimName = ""
+ } else {
+ yyv9 := &x.ClaimName
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv11 := &x.ReadOnly
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*bool)(yyv11)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [21]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.GCEPersistentDisk != nil
+ yyq2[1] = x.AWSElasticBlockStore != nil
+ yyq2[2] = x.HostPath != nil
+ yyq2[3] = x.Glusterfs != nil
+ yyq2[4] = x.NFS != nil
+ yyq2[5] = x.RBD != nil
+ yyq2[6] = x.ISCSI != nil
+ yyq2[7] = x.Cinder != nil
+ yyq2[8] = x.CephFS != nil
+ yyq2[9] = x.FC != nil
+ yyq2[10] = x.Flocker != nil
+ yyq2[11] = x.FlexVolume != nil
+ yyq2[12] = x.AzureFile != nil
+ yyq2[13] = x.VsphereVolume != nil
+ yyq2[14] = x.Quobyte != nil
+ yyq2[15] = x.AzureDisk != nil
+ yyq2[16] = x.PhotonPersistentDisk != nil
+ yyq2[17] = x.PortworxVolume != nil
+ yyq2[18] = x.ScaleIO != nil
+ yyq2[19] = x.Local != nil
+ yyq2[20] = x.StorageOS != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(21)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.GCEPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.GCEPersistentDisk.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("gcePersistentDisk"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.GCEPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.GCEPersistentDisk.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.AWSElasticBlockStore == nil {
+ r.EncodeNil()
+ } else {
+ x.AWSElasticBlockStore.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("awsElasticBlockStore"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.AWSElasticBlockStore == nil {
+ r.EncodeNil()
+ } else {
+ x.AWSElasticBlockStore.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.HostPath == nil {
+ r.EncodeNil()
+ } else {
+ x.HostPath.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostPath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.HostPath == nil {
+ r.EncodeNil()
+ } else {
+ x.HostPath.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Glusterfs == nil {
+ r.EncodeNil()
+ } else {
+ x.Glusterfs.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("glusterfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Glusterfs == nil {
+ r.EncodeNil()
+ } else {
+ x.Glusterfs.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.NFS == nil {
+ r.EncodeNil()
+ } else {
+ x.NFS.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NFS == nil {
+ r.EncodeNil()
+ } else {
+ x.NFS.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.RBD == nil {
+ r.EncodeNil()
+ } else {
+ x.RBD.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rbd"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RBD == nil {
+ r.EncodeNil()
+ } else {
+ x.RBD.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.ISCSI == nil {
+ r.EncodeNil()
+ } else {
+ x.ISCSI.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("iscsi"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ISCSI == nil {
+ r.EncodeNil()
+ } else {
+ x.ISCSI.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.Cinder == nil {
+ r.EncodeNil()
+ } else {
+ x.Cinder.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("cinder"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Cinder == nil {
+ r.EncodeNil()
+ } else {
+ x.Cinder.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ if x.CephFS == nil {
+ r.EncodeNil()
+ } else {
+ x.CephFS.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("cephfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.CephFS == nil {
+ r.EncodeNil()
+ } else {
+ x.CephFS.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ if x.FC == nil {
+ r.EncodeNil()
+ } else {
+ x.FC.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fc"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.FC == nil {
+ r.EncodeNil()
+ } else {
+ x.FC.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[10] {
+ if x.Flocker == nil {
+ r.EncodeNil()
+ } else {
+ x.Flocker.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[10] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("flocker"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Flocker == nil {
+ r.EncodeNil()
+ } else {
+ x.Flocker.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[11] {
+ if x.FlexVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.FlexVolume.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[11] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("flexVolume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.FlexVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.FlexVolume.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[12] {
+ if x.AzureFile == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureFile.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[12] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("azureFile"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.AzureFile == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureFile.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[13] {
+ if x.VsphereVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.VsphereVolume.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[13] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("vsphereVolume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.VsphereVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.VsphereVolume.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[14] {
+ if x.Quobyte == nil {
+ r.EncodeNil()
+ } else {
+ x.Quobyte.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[14] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("quobyte"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Quobyte == nil {
+ r.EncodeNil()
+ } else {
+ x.Quobyte.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[15] {
+ if x.AzureDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureDisk.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[15] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("azureDisk"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.AzureDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureDisk.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[16] {
+ if x.PhotonPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.PhotonPersistentDisk.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[16] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("photonPersistentDisk"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PhotonPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.PhotonPersistentDisk.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[17] {
+ if x.PortworxVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.PortworxVolume.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[17] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("portworxVolume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PortworxVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.PortworxVolume.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[18] {
+ if x.ScaleIO == nil {
+ r.EncodeNil()
+ } else {
+ x.ScaleIO.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[18] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("scaleIO"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ScaleIO == nil {
+ r.EncodeNil()
+ } else {
+ x.ScaleIO.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[19] {
+ if x.Local == nil {
+ r.EncodeNil()
+ } else {
+ x.Local.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[19] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("local"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Local == nil {
+ r.EncodeNil()
+ } else {
+ x.Local.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[20] {
+ if x.StorageOS == nil {
+ r.EncodeNil()
+ } else {
+ x.StorageOS.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[20] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("storageos"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.StorageOS == nil {
+ r.EncodeNil()
+ } else {
+ x.StorageOS.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PersistentVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PersistentVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "gcePersistentDisk":
+ if r.TryDecodeAsNil() {
+ if x.GCEPersistentDisk != nil {
+ x.GCEPersistentDisk = nil
+ }
+ } else {
+ if x.GCEPersistentDisk == nil {
+ x.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ x.GCEPersistentDisk.CodecDecodeSelf(d)
+ }
+ case "awsElasticBlockStore":
+ if r.TryDecodeAsNil() {
+ if x.AWSElasticBlockStore != nil {
+ x.AWSElasticBlockStore = nil
+ }
+ } else {
+ if x.AWSElasticBlockStore == nil {
+ x.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ x.AWSElasticBlockStore.CodecDecodeSelf(d)
+ }
+ case "hostPath":
+ if r.TryDecodeAsNil() {
+ if x.HostPath != nil {
+ x.HostPath = nil
+ }
+ } else {
+ if x.HostPath == nil {
+ x.HostPath = new(HostPathVolumeSource)
+ }
+ x.HostPath.CodecDecodeSelf(d)
+ }
+ case "glusterfs":
+ if r.TryDecodeAsNil() {
+ if x.Glusterfs != nil {
+ x.Glusterfs = nil
+ }
+ } else {
+ if x.Glusterfs == nil {
+ x.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ x.Glusterfs.CodecDecodeSelf(d)
+ }
+ case "nfs":
+ if r.TryDecodeAsNil() {
+ if x.NFS != nil {
+ x.NFS = nil
+ }
+ } else {
+ if x.NFS == nil {
+ x.NFS = new(NFSVolumeSource)
+ }
+ x.NFS.CodecDecodeSelf(d)
+ }
+ case "rbd":
+ if r.TryDecodeAsNil() {
+ if x.RBD != nil {
+ x.RBD = nil
+ }
+ } else {
+ if x.RBD == nil {
+ x.RBD = new(RBDVolumeSource)
+ }
+ x.RBD.CodecDecodeSelf(d)
+ }
+ case "iscsi":
+ if r.TryDecodeAsNil() {
+ if x.ISCSI != nil {
+ x.ISCSI = nil
+ }
+ } else {
+ if x.ISCSI == nil {
+ x.ISCSI = new(ISCSIVolumeSource)
+ }
+ x.ISCSI.CodecDecodeSelf(d)
+ }
+ case "cinder":
+ if r.TryDecodeAsNil() {
+ if x.Cinder != nil {
+ x.Cinder = nil
+ }
+ } else {
+ if x.Cinder == nil {
+ x.Cinder = new(CinderVolumeSource)
+ }
+ x.Cinder.CodecDecodeSelf(d)
+ }
+ case "cephfs":
+ if r.TryDecodeAsNil() {
+ if x.CephFS != nil {
+ x.CephFS = nil
+ }
+ } else {
+ if x.CephFS == nil {
+ x.CephFS = new(CephFSVolumeSource)
+ }
+ x.CephFS.CodecDecodeSelf(d)
+ }
+ case "fc":
+ if r.TryDecodeAsNil() {
+ if x.FC != nil {
+ x.FC = nil
+ }
+ } else {
+ if x.FC == nil {
+ x.FC = new(FCVolumeSource)
+ }
+ x.FC.CodecDecodeSelf(d)
+ }
+ case "flocker":
+ if r.TryDecodeAsNil() {
+ if x.Flocker != nil {
+ x.Flocker = nil
+ }
+ } else {
+ if x.Flocker == nil {
+ x.Flocker = new(FlockerVolumeSource)
+ }
+ x.Flocker.CodecDecodeSelf(d)
+ }
+ case "flexVolume":
+ if r.TryDecodeAsNil() {
+ if x.FlexVolume != nil {
+ x.FlexVolume = nil
+ }
+ } else {
+ if x.FlexVolume == nil {
+ x.FlexVolume = new(FlexVolumeSource)
+ }
+ x.FlexVolume.CodecDecodeSelf(d)
+ }
+ case "azureFile":
+ if r.TryDecodeAsNil() {
+ if x.AzureFile != nil {
+ x.AzureFile = nil
+ }
+ } else {
+ if x.AzureFile == nil {
+ x.AzureFile = new(AzureFileVolumeSource)
+ }
+ x.AzureFile.CodecDecodeSelf(d)
+ }
+ case "vsphereVolume":
+ if r.TryDecodeAsNil() {
+ if x.VsphereVolume != nil {
+ x.VsphereVolume = nil
+ }
+ } else {
+ if x.VsphereVolume == nil {
+ x.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ x.VsphereVolume.CodecDecodeSelf(d)
+ }
+ case "quobyte":
+ if r.TryDecodeAsNil() {
+ if x.Quobyte != nil {
+ x.Quobyte = nil
+ }
+ } else {
+ if x.Quobyte == nil {
+ x.Quobyte = new(QuobyteVolumeSource)
+ }
+ x.Quobyte.CodecDecodeSelf(d)
+ }
+ case "azureDisk":
+ if r.TryDecodeAsNil() {
+ if x.AzureDisk != nil {
+ x.AzureDisk = nil
+ }
+ } else {
+ if x.AzureDisk == nil {
+ x.AzureDisk = new(AzureDiskVolumeSource)
+ }
+ x.AzureDisk.CodecDecodeSelf(d)
+ }
+ case "photonPersistentDisk":
+ if r.TryDecodeAsNil() {
+ if x.PhotonPersistentDisk != nil {
+ x.PhotonPersistentDisk = nil
+ }
+ } else {
+ if x.PhotonPersistentDisk == nil {
+ x.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource)
+ }
+ x.PhotonPersistentDisk.CodecDecodeSelf(d)
+ }
+ case "portworxVolume":
+ if r.TryDecodeAsNil() {
+ if x.PortworxVolume != nil {
+ x.PortworxVolume = nil
+ }
+ } else {
+ if x.PortworxVolume == nil {
+ x.PortworxVolume = new(PortworxVolumeSource)
+ }
+ x.PortworxVolume.CodecDecodeSelf(d)
+ }
+ case "scaleIO":
+ if r.TryDecodeAsNil() {
+ if x.ScaleIO != nil {
+ x.ScaleIO = nil
+ }
+ } else {
+ if x.ScaleIO == nil {
+ x.ScaleIO = new(ScaleIOVolumeSource)
+ }
+ x.ScaleIO.CodecDecodeSelf(d)
+ }
+ case "local":
+ if r.TryDecodeAsNil() {
+ if x.Local != nil {
+ x.Local = nil
+ }
+ } else {
+ if x.Local == nil {
+ x.Local = new(LocalVolumeSource)
+ }
+ x.Local.CodecDecodeSelf(d)
+ }
+ case "storageos":
+ if r.TryDecodeAsNil() {
+ if x.StorageOS != nil {
+ x.StorageOS = nil
+ }
+ } else {
+ if x.StorageOS == nil {
+ x.StorageOS = new(StorageOSPersistentVolumeSource)
+ }
+ x.StorageOS.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PersistentVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj25 int
+ var yyb25 bool
+ var yyhl25 bool = l >= 0
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.GCEPersistentDisk != nil {
+ x.GCEPersistentDisk = nil
+ }
+ } else {
+ if x.GCEPersistentDisk == nil {
+ x.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ x.GCEPersistentDisk.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.AWSElasticBlockStore != nil {
+ x.AWSElasticBlockStore = nil
+ }
+ } else {
+ if x.AWSElasticBlockStore == nil {
+ x.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ x.AWSElasticBlockStore.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.HostPath != nil {
+ x.HostPath = nil
+ }
+ } else {
+ if x.HostPath == nil {
+ x.HostPath = new(HostPathVolumeSource)
+ }
+ x.HostPath.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Glusterfs != nil {
+ x.Glusterfs = nil
+ }
+ } else {
+ if x.Glusterfs == nil {
+ x.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ x.Glusterfs.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.NFS != nil {
+ x.NFS = nil
+ }
+ } else {
+ if x.NFS == nil {
+ x.NFS = new(NFSVolumeSource)
+ }
+ x.NFS.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RBD != nil {
+ x.RBD = nil
+ }
+ } else {
+ if x.RBD == nil {
+ x.RBD = new(RBDVolumeSource)
+ }
+ x.RBD.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ISCSI != nil {
+ x.ISCSI = nil
+ }
+ } else {
+ if x.ISCSI == nil {
+ x.ISCSI = new(ISCSIVolumeSource)
+ }
+ x.ISCSI.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Cinder != nil {
+ x.Cinder = nil
+ }
+ } else {
+ if x.Cinder == nil {
+ x.Cinder = new(CinderVolumeSource)
+ }
+ x.Cinder.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.CephFS != nil {
+ x.CephFS = nil
+ }
+ } else {
+ if x.CephFS == nil {
+ x.CephFS = new(CephFSVolumeSource)
+ }
+ x.CephFS.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FC != nil {
+ x.FC = nil
+ }
+ } else {
+ if x.FC == nil {
+ x.FC = new(FCVolumeSource)
+ }
+ x.FC.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Flocker != nil {
+ x.Flocker = nil
+ }
+ } else {
+ if x.Flocker == nil {
+ x.Flocker = new(FlockerVolumeSource)
+ }
+ x.Flocker.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FlexVolume != nil {
+ x.FlexVolume = nil
+ }
+ } else {
+ if x.FlexVolume == nil {
+ x.FlexVolume = new(FlexVolumeSource)
+ }
+ x.FlexVolume.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.AzureFile != nil {
+ x.AzureFile = nil
+ }
+ } else {
+ if x.AzureFile == nil {
+ x.AzureFile = new(AzureFileVolumeSource)
+ }
+ x.AzureFile.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.VsphereVolume != nil {
+ x.VsphereVolume = nil
+ }
+ } else {
+ if x.VsphereVolume == nil {
+ x.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ x.VsphereVolume.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Quobyte != nil {
+ x.Quobyte = nil
+ }
+ } else {
+ if x.Quobyte == nil {
+ x.Quobyte = new(QuobyteVolumeSource)
+ }
+ x.Quobyte.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.AzureDisk != nil {
+ x.AzureDisk = nil
+ }
+ } else {
+ if x.AzureDisk == nil {
+ x.AzureDisk = new(AzureDiskVolumeSource)
+ }
+ x.AzureDisk.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PhotonPersistentDisk != nil {
+ x.PhotonPersistentDisk = nil
+ }
+ } else {
+ if x.PhotonPersistentDisk == nil {
+ x.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource)
+ }
+ x.PhotonPersistentDisk.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PortworxVolume != nil {
+ x.PortworxVolume = nil
+ }
+ } else {
+ if x.PortworxVolume == nil {
+ x.PortworxVolume = new(PortworxVolumeSource)
+ }
+ x.PortworxVolume.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ScaleIO != nil {
+ x.ScaleIO = nil
+ }
+ } else {
+ if x.ScaleIO == nil {
+ x.ScaleIO = new(ScaleIOVolumeSource)
+ }
+ x.ScaleIO.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Local != nil {
+ x.Local = nil
+ }
+ } else {
+ if x.Local == nil {
+ x.Local = new(LocalVolumeSource)
+ }
+ x.Local.CodecDecodeSelf(d)
+ }
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.StorageOS != nil {
+ x.StorageOS = nil
+ }
+ } else {
+ if x.StorageOS == nil {
+ x.StorageOS = new(StorageOSPersistentVolumeSource)
+ }
+ x.StorageOS.CodecDecodeSelf(d)
+ }
+ for {
+ yyj25++
+ if yyhl25 {
+ yyb25 = yyj25 > l
+ } else {
+ yyb25 = r.CheckBreak()
+ }
+ if yyb25 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj25-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PersistentVolume) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PersistentVolume) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PersistentVolume) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 = PersistentVolumeSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = PersistentVolumeStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PersistentVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = PersistentVolumeSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = PersistentVolumeStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PersistentVolumeSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [26]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = len(x.Capacity) != 0
+ yyq2[1] = x.PersistentVolumeSource.GCEPersistentDisk != nil && x.GCEPersistentDisk != nil
+ yyq2[2] = x.PersistentVolumeSource.AWSElasticBlockStore != nil && x.AWSElasticBlockStore != nil
+ yyq2[3] = x.PersistentVolumeSource.HostPath != nil && x.HostPath != nil
+ yyq2[4] = x.PersistentVolumeSource.Glusterfs != nil && x.Glusterfs != nil
+ yyq2[5] = x.PersistentVolumeSource.NFS != nil && x.NFS != nil
+ yyq2[6] = x.PersistentVolumeSource.RBD != nil && x.RBD != nil
+ yyq2[7] = x.PersistentVolumeSource.ISCSI != nil && x.ISCSI != nil
+ yyq2[8] = x.PersistentVolumeSource.Cinder != nil && x.Cinder != nil
+ yyq2[9] = x.PersistentVolumeSource.CephFS != nil && x.CephFS != nil
+ yyq2[10] = x.PersistentVolumeSource.FC != nil && x.FC != nil
+ yyq2[11] = x.PersistentVolumeSource.Flocker != nil && x.Flocker != nil
+ yyq2[12] = x.PersistentVolumeSource.FlexVolume != nil && x.FlexVolume != nil
+ yyq2[13] = x.PersistentVolumeSource.AzureFile != nil && x.AzureFile != nil
+ yyq2[14] = x.PersistentVolumeSource.VsphereVolume != nil && x.VsphereVolume != nil
+ yyq2[15] = x.PersistentVolumeSource.Quobyte != nil && x.Quobyte != nil
+ yyq2[16] = x.PersistentVolumeSource.AzureDisk != nil && x.AzureDisk != nil
+ yyq2[17] = x.PersistentVolumeSource.PhotonPersistentDisk != nil && x.PhotonPersistentDisk != nil
+ yyq2[18] = x.PersistentVolumeSource.PortworxVolume != nil && x.PortworxVolume != nil
+ yyq2[19] = x.PersistentVolumeSource.ScaleIO != nil && x.ScaleIO != nil
+ yyq2[20] = x.PersistentVolumeSource.Local != nil && x.Local != nil
+ yyq2[21] = x.PersistentVolumeSource.StorageOS != nil && x.StorageOS != nil
+ yyq2[22] = len(x.AccessModes) != 0
+ yyq2[23] = x.ClaimRef != nil
+ yyq2[24] = x.PersistentVolumeReclaimPolicy != ""
+ yyq2[25] = x.StorageClassName != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(26)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Capacity == nil {
+ r.EncodeNil()
+ } else {
+ x.Capacity.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("capacity"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Capacity == nil {
+ r.EncodeNil()
+ } else {
+ x.Capacity.CodecEncodeSelf(e)
+ }
+ }
+ }
+ var yyn6 bool
+ if x.PersistentVolumeSource.GCEPersistentDisk == nil {
+ yyn6 = true
+ goto LABEL6
+ }
+ LABEL6:
+ if yyr2 || yy2arr2 {
+ if yyn6 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.GCEPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.GCEPersistentDisk.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("gcePersistentDisk"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn6 {
+ r.EncodeNil()
+ } else {
+ if x.GCEPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.GCEPersistentDisk.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn9 bool
+ if x.PersistentVolumeSource.AWSElasticBlockStore == nil {
+ yyn9 = true
+ goto LABEL9
+ }
+ LABEL9:
+ if yyr2 || yy2arr2 {
+ if yyn9 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.AWSElasticBlockStore == nil {
+ r.EncodeNil()
+ } else {
+ x.AWSElasticBlockStore.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("awsElasticBlockStore"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn9 {
+ r.EncodeNil()
+ } else {
+ if x.AWSElasticBlockStore == nil {
+ r.EncodeNil()
+ } else {
+ x.AWSElasticBlockStore.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn12 bool
+ if x.PersistentVolumeSource.HostPath == nil {
+ yyn12 = true
+ goto LABEL12
+ }
+ LABEL12:
+ if yyr2 || yy2arr2 {
+ if yyn12 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.HostPath == nil {
+ r.EncodeNil()
+ } else {
+ x.HostPath.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostPath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn12 {
+ r.EncodeNil()
+ } else {
+ if x.HostPath == nil {
+ r.EncodeNil()
+ } else {
+ x.HostPath.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn15 bool
+ if x.PersistentVolumeSource.Glusterfs == nil {
+ yyn15 = true
+ goto LABEL15
+ }
+ LABEL15:
+ if yyr2 || yy2arr2 {
+ if yyn15 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.Glusterfs == nil {
+ r.EncodeNil()
+ } else {
+ x.Glusterfs.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("glusterfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn15 {
+ r.EncodeNil()
+ } else {
+ if x.Glusterfs == nil {
+ r.EncodeNil()
+ } else {
+ x.Glusterfs.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn18 bool
+ if x.PersistentVolumeSource.NFS == nil {
+ yyn18 = true
+ goto LABEL18
+ }
+ LABEL18:
+ if yyr2 || yy2arr2 {
+ if yyn18 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.NFS == nil {
+ r.EncodeNil()
+ } else {
+ x.NFS.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn18 {
+ r.EncodeNil()
+ } else {
+ if x.NFS == nil {
+ r.EncodeNil()
+ } else {
+ x.NFS.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn21 bool
+ if x.PersistentVolumeSource.RBD == nil {
+ yyn21 = true
+ goto LABEL21
+ }
+ LABEL21:
+ if yyr2 || yy2arr2 {
+ if yyn21 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.RBD == nil {
+ r.EncodeNil()
+ } else {
+ x.RBD.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rbd"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn21 {
+ r.EncodeNil()
+ } else {
+ if x.RBD == nil {
+ r.EncodeNil()
+ } else {
+ x.RBD.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn24 bool
+ if x.PersistentVolumeSource.ISCSI == nil {
+ yyn24 = true
+ goto LABEL24
+ }
+ LABEL24:
+ if yyr2 || yy2arr2 {
+ if yyn24 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.ISCSI == nil {
+ r.EncodeNil()
+ } else {
+ x.ISCSI.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("iscsi"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn24 {
+ r.EncodeNil()
+ } else {
+ if x.ISCSI == nil {
+ r.EncodeNil()
+ } else {
+ x.ISCSI.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn27 bool
+ if x.PersistentVolumeSource.Cinder == nil {
+ yyn27 = true
+ goto LABEL27
+ }
+ LABEL27:
+ if yyr2 || yy2arr2 {
+ if yyn27 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ if x.Cinder == nil {
+ r.EncodeNil()
+ } else {
+ x.Cinder.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("cinder"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn27 {
+ r.EncodeNil()
+ } else {
+ if x.Cinder == nil {
+ r.EncodeNil()
+ } else {
+ x.Cinder.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn30 bool
+ if x.PersistentVolumeSource.CephFS == nil {
+ yyn30 = true
+ goto LABEL30
+ }
+ LABEL30:
+ if yyr2 || yy2arr2 {
+ if yyn30 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ if x.CephFS == nil {
+ r.EncodeNil()
+ } else {
+ x.CephFS.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("cephfs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn30 {
+ r.EncodeNil()
+ } else {
+ if x.CephFS == nil {
+ r.EncodeNil()
+ } else {
+ x.CephFS.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn33 bool
+ if x.PersistentVolumeSource.FC == nil {
+ yyn33 = true
+ goto LABEL33
+ }
+ LABEL33:
+ if yyr2 || yy2arr2 {
+ if yyn33 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[10] {
+ if x.FC == nil {
+ r.EncodeNil()
+ } else {
+ x.FC.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[10] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fc"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn33 {
+ r.EncodeNil()
+ } else {
+ if x.FC == nil {
+ r.EncodeNil()
+ } else {
+ x.FC.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn36 bool
+ if x.PersistentVolumeSource.Flocker == nil {
+ yyn36 = true
+ goto LABEL36
+ }
+ LABEL36:
+ if yyr2 || yy2arr2 {
+ if yyn36 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[11] {
+ if x.Flocker == nil {
+ r.EncodeNil()
+ } else {
+ x.Flocker.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[11] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("flocker"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn36 {
+ r.EncodeNil()
+ } else {
+ if x.Flocker == nil {
+ r.EncodeNil()
+ } else {
+ x.Flocker.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn39 bool
+ if x.PersistentVolumeSource.FlexVolume == nil {
+ yyn39 = true
+ goto LABEL39
+ }
+ LABEL39:
+ if yyr2 || yy2arr2 {
+ if yyn39 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[12] {
+ if x.FlexVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.FlexVolume.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[12] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("flexVolume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn39 {
+ r.EncodeNil()
+ } else {
+ if x.FlexVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.FlexVolume.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn42 bool
+ if x.PersistentVolumeSource.AzureFile == nil {
+ yyn42 = true
+ goto LABEL42
+ }
+ LABEL42:
+ if yyr2 || yy2arr2 {
+ if yyn42 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[13] {
+ if x.AzureFile == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureFile.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[13] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("azureFile"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn42 {
+ r.EncodeNil()
+ } else {
+ if x.AzureFile == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureFile.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn45 bool
+ if x.PersistentVolumeSource.VsphereVolume == nil {
+ yyn45 = true
+ goto LABEL45
+ }
+ LABEL45:
+ if yyr2 || yy2arr2 {
+ if yyn45 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[14] {
+ if x.VsphereVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.VsphereVolume.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[14] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("vsphereVolume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn45 {
+ r.EncodeNil()
+ } else {
+ if x.VsphereVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.VsphereVolume.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn48 bool
+ if x.PersistentVolumeSource.Quobyte == nil {
+ yyn48 = true
+ goto LABEL48
+ }
+ LABEL48:
+ if yyr2 || yy2arr2 {
+ if yyn48 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[15] {
+ if x.Quobyte == nil {
+ r.EncodeNil()
+ } else {
+ x.Quobyte.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[15] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("quobyte"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn48 {
+ r.EncodeNil()
+ } else {
+ if x.Quobyte == nil {
+ r.EncodeNil()
+ } else {
+ x.Quobyte.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn51 bool
+ if x.PersistentVolumeSource.AzureDisk == nil {
+ yyn51 = true
+ goto LABEL51
+ }
+ LABEL51:
+ if yyr2 || yy2arr2 {
+ if yyn51 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[16] {
+ if x.AzureDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureDisk.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[16] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("azureDisk"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn51 {
+ r.EncodeNil()
+ } else {
+ if x.AzureDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.AzureDisk.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn54 bool
+ if x.PersistentVolumeSource.PhotonPersistentDisk == nil {
+ yyn54 = true
+ goto LABEL54
+ }
+ LABEL54:
+ if yyr2 || yy2arr2 {
+ if yyn54 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[17] {
+ if x.PhotonPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.PhotonPersistentDisk.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[17] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("photonPersistentDisk"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn54 {
+ r.EncodeNil()
+ } else {
+ if x.PhotonPersistentDisk == nil {
+ r.EncodeNil()
+ } else {
+ x.PhotonPersistentDisk.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn57 bool
+ if x.PersistentVolumeSource.PortworxVolume == nil {
+ yyn57 = true
+ goto LABEL57
+ }
+ LABEL57:
+ if yyr2 || yy2arr2 {
+ if yyn57 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[18] {
+ if x.PortworxVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.PortworxVolume.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[18] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("portworxVolume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn57 {
+ r.EncodeNil()
+ } else {
+ if x.PortworxVolume == nil {
+ r.EncodeNil()
+ } else {
+ x.PortworxVolume.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn60 bool
+ if x.PersistentVolumeSource.ScaleIO == nil {
+ yyn60 = true
+ goto LABEL60
+ }
+ LABEL60:
+ if yyr2 || yy2arr2 {
+ if yyn60 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[19] {
+ if x.ScaleIO == nil {
+ r.EncodeNil()
+ } else {
+ x.ScaleIO.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[19] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("scaleIO"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn60 {
+ r.EncodeNil()
+ } else {
+ if x.ScaleIO == nil {
+ r.EncodeNil()
+ } else {
+ x.ScaleIO.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn63 bool
+ if x.PersistentVolumeSource.Local == nil {
+ yyn63 = true
+ goto LABEL63
+ }
+ LABEL63:
+ if yyr2 || yy2arr2 {
+ if yyn63 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[20] {
+ if x.Local == nil {
+ r.EncodeNil()
+ } else {
+ x.Local.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[20] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("local"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn63 {
+ r.EncodeNil()
+ } else {
+ if x.Local == nil {
+ r.EncodeNil()
+ } else {
+ x.Local.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn66 bool
+ if x.PersistentVolumeSource.StorageOS == nil {
+ yyn66 = true
+ goto LABEL66
+ }
+ LABEL66:
+ if yyr2 || yy2arr2 {
+ if yyn66 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[21] {
+ if x.StorageOS == nil {
+ r.EncodeNil()
+ } else {
+ x.StorageOS.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[21] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("storageos"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn66 {
+ r.EncodeNil()
+ } else {
+ if x.StorageOS == nil {
+ r.EncodeNil()
+ } else {
+ x.StorageOS.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[22] {
+ if x.AccessModes == nil {
+ r.EncodeNil()
+ } else {
+ yym70 := z.EncBinary()
+ _ = yym70
+ if false {
+ } else {
+ h.encSlicePersistentVolumeAccessMode(([]PersistentVolumeAccessMode)(x.AccessModes), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[22] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("accessModes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.AccessModes == nil {
+ r.EncodeNil()
+ } else {
+ yym71 := z.EncBinary()
+ _ = yym71
+ if false {
+ } else {
+ h.encSlicePersistentVolumeAccessMode(([]PersistentVolumeAccessMode)(x.AccessModes), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[23] {
+ if x.ClaimRef == nil {
+ r.EncodeNil()
+ } else {
+ x.ClaimRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[23] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("claimRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ClaimRef == nil {
+ r.EncodeNil()
+ } else {
+ x.ClaimRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[24] {
+ x.PersistentVolumeReclaimPolicy.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[24] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("persistentVolumeReclaimPolicy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.PersistentVolumeReclaimPolicy.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[25] {
+ yym79 := z.EncBinary()
+ _ = yym79
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.StorageClassName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[25] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("storageClassName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym80 := z.EncBinary()
+ _ = yym80
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.StorageClassName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PersistentVolumeSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PersistentVolumeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "capacity":
+ if r.TryDecodeAsNil() {
+ x.Capacity = nil
+ } else {
+ yyv4 := &x.Capacity
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "gcePersistentDisk":
+ if x.PersistentVolumeSource.GCEPersistentDisk == nil {
+ x.PersistentVolumeSource.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.GCEPersistentDisk != nil {
+ x.GCEPersistentDisk = nil
+ }
+ } else {
+ if x.GCEPersistentDisk == nil {
+ x.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ x.GCEPersistentDisk.CodecDecodeSelf(d)
+ }
+ case "awsElasticBlockStore":
+ if x.PersistentVolumeSource.AWSElasticBlockStore == nil {
+ x.PersistentVolumeSource.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.AWSElasticBlockStore != nil {
+ x.AWSElasticBlockStore = nil
+ }
+ } else {
+ if x.AWSElasticBlockStore == nil {
+ x.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ x.AWSElasticBlockStore.CodecDecodeSelf(d)
+ }
+ case "hostPath":
+ if x.PersistentVolumeSource.HostPath == nil {
+ x.PersistentVolumeSource.HostPath = new(HostPathVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.HostPath != nil {
+ x.HostPath = nil
+ }
+ } else {
+ if x.HostPath == nil {
+ x.HostPath = new(HostPathVolumeSource)
+ }
+ x.HostPath.CodecDecodeSelf(d)
+ }
+ case "glusterfs":
+ if x.PersistentVolumeSource.Glusterfs == nil {
+ x.PersistentVolumeSource.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.Glusterfs != nil {
+ x.Glusterfs = nil
+ }
+ } else {
+ if x.Glusterfs == nil {
+ x.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ x.Glusterfs.CodecDecodeSelf(d)
+ }
+ case "nfs":
+ if x.PersistentVolumeSource.NFS == nil {
+ x.PersistentVolumeSource.NFS = new(NFSVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.NFS != nil {
+ x.NFS = nil
+ }
+ } else {
+ if x.NFS == nil {
+ x.NFS = new(NFSVolumeSource)
+ }
+ x.NFS.CodecDecodeSelf(d)
+ }
+ case "rbd":
+ if x.PersistentVolumeSource.RBD == nil {
+ x.PersistentVolumeSource.RBD = new(RBDVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.RBD != nil {
+ x.RBD = nil
+ }
+ } else {
+ if x.RBD == nil {
+ x.RBD = new(RBDVolumeSource)
+ }
+ x.RBD.CodecDecodeSelf(d)
+ }
+ case "iscsi":
+ if x.PersistentVolumeSource.ISCSI == nil {
+ x.PersistentVolumeSource.ISCSI = new(ISCSIVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.ISCSI != nil {
+ x.ISCSI = nil
+ }
+ } else {
+ if x.ISCSI == nil {
+ x.ISCSI = new(ISCSIVolumeSource)
+ }
+ x.ISCSI.CodecDecodeSelf(d)
+ }
+ case "cinder":
+ if x.PersistentVolumeSource.Cinder == nil {
+ x.PersistentVolumeSource.Cinder = new(CinderVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.Cinder != nil {
+ x.Cinder = nil
+ }
+ } else {
+ if x.Cinder == nil {
+ x.Cinder = new(CinderVolumeSource)
+ }
+ x.Cinder.CodecDecodeSelf(d)
+ }
+ case "cephfs":
+ if x.PersistentVolumeSource.CephFS == nil {
+ x.PersistentVolumeSource.CephFS = new(CephFSVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.CephFS != nil {
+ x.CephFS = nil
+ }
+ } else {
+ if x.CephFS == nil {
+ x.CephFS = new(CephFSVolumeSource)
+ }
+ x.CephFS.CodecDecodeSelf(d)
+ }
+ case "fc":
+ if x.PersistentVolumeSource.FC == nil {
+ x.PersistentVolumeSource.FC = new(FCVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.FC != nil {
+ x.FC = nil
+ }
+ } else {
+ if x.FC == nil {
+ x.FC = new(FCVolumeSource)
+ }
+ x.FC.CodecDecodeSelf(d)
+ }
+ case "flocker":
+ if x.PersistentVolumeSource.Flocker == nil {
+ x.PersistentVolumeSource.Flocker = new(FlockerVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.Flocker != nil {
+ x.Flocker = nil
+ }
+ } else {
+ if x.Flocker == nil {
+ x.Flocker = new(FlockerVolumeSource)
+ }
+ x.Flocker.CodecDecodeSelf(d)
+ }
+ case "flexVolume":
+ if x.PersistentVolumeSource.FlexVolume == nil {
+ x.PersistentVolumeSource.FlexVolume = new(FlexVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.FlexVolume != nil {
+ x.FlexVolume = nil
+ }
+ } else {
+ if x.FlexVolume == nil {
+ x.FlexVolume = new(FlexVolumeSource)
+ }
+ x.FlexVolume.CodecDecodeSelf(d)
+ }
+ case "azureFile":
+ if x.PersistentVolumeSource.AzureFile == nil {
+ x.PersistentVolumeSource.AzureFile = new(AzureFileVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.AzureFile != nil {
+ x.AzureFile = nil
+ }
+ } else {
+ if x.AzureFile == nil {
+ x.AzureFile = new(AzureFileVolumeSource)
+ }
+ x.AzureFile.CodecDecodeSelf(d)
+ }
+ case "vsphereVolume":
+ if x.PersistentVolumeSource.VsphereVolume == nil {
+ x.PersistentVolumeSource.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.VsphereVolume != nil {
+ x.VsphereVolume = nil
+ }
+ } else {
+ if x.VsphereVolume == nil {
+ x.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ x.VsphereVolume.CodecDecodeSelf(d)
+ }
+ case "quobyte":
+ if x.PersistentVolumeSource.Quobyte == nil {
+ x.PersistentVolumeSource.Quobyte = new(QuobyteVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.Quobyte != nil {
+ x.Quobyte = nil
+ }
+ } else {
+ if x.Quobyte == nil {
+ x.Quobyte = new(QuobyteVolumeSource)
+ }
+ x.Quobyte.CodecDecodeSelf(d)
+ }
+ case "azureDisk":
+ if x.PersistentVolumeSource.AzureDisk == nil {
+ x.PersistentVolumeSource.AzureDisk = new(AzureDiskVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.AzureDisk != nil {
+ x.AzureDisk = nil
+ }
+ } else {
+ if x.AzureDisk == nil {
+ x.AzureDisk = new(AzureDiskVolumeSource)
+ }
+ x.AzureDisk.CodecDecodeSelf(d)
+ }
+ case "photonPersistentDisk":
+ if x.PersistentVolumeSource.PhotonPersistentDisk == nil {
+ x.PersistentVolumeSource.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.PhotonPersistentDisk != nil {
+ x.PhotonPersistentDisk = nil
+ }
+ } else {
+ if x.PhotonPersistentDisk == nil {
+ x.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource)
+ }
+ x.PhotonPersistentDisk.CodecDecodeSelf(d)
+ }
+ case "portworxVolume":
+ if x.PersistentVolumeSource.PortworxVolume == nil {
+ x.PersistentVolumeSource.PortworxVolume = new(PortworxVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.PortworxVolume != nil {
+ x.PortworxVolume = nil
+ }
+ } else {
+ if x.PortworxVolume == nil {
+ x.PortworxVolume = new(PortworxVolumeSource)
+ }
+ x.PortworxVolume.CodecDecodeSelf(d)
+ }
+ case "scaleIO":
+ if x.PersistentVolumeSource.ScaleIO == nil {
+ x.PersistentVolumeSource.ScaleIO = new(ScaleIOVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.ScaleIO != nil {
+ x.ScaleIO = nil
+ }
+ } else {
+ if x.ScaleIO == nil {
+ x.ScaleIO = new(ScaleIOVolumeSource)
+ }
+ x.ScaleIO.CodecDecodeSelf(d)
+ }
+ case "local":
+ if x.PersistentVolumeSource.Local == nil {
+ x.PersistentVolumeSource.Local = new(LocalVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.Local != nil {
+ x.Local = nil
+ }
+ } else {
+ if x.Local == nil {
+ x.Local = new(LocalVolumeSource)
+ }
+ x.Local.CodecDecodeSelf(d)
+ }
+ case "storageos":
+ if x.PersistentVolumeSource.StorageOS == nil {
+ x.PersistentVolumeSource.StorageOS = new(StorageOSPersistentVolumeSource)
+ }
+ if r.TryDecodeAsNil() {
+ if x.StorageOS != nil {
+ x.StorageOS = nil
+ }
+ } else {
+ if x.StorageOS == nil {
+ x.StorageOS = new(StorageOSPersistentVolumeSource)
+ }
+ x.StorageOS.CodecDecodeSelf(d)
+ }
+ case "accessModes":
+ if r.TryDecodeAsNil() {
+ x.AccessModes = nil
+ } else {
+ yyv26 := &x.AccessModes
+ yym27 := z.DecBinary()
+ _ = yym27
+ if false {
+ } else {
+ h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv26), d)
+ }
+ }
+ case "claimRef":
+ if r.TryDecodeAsNil() {
+ if x.ClaimRef != nil {
+ x.ClaimRef = nil
+ }
+ } else {
+ if x.ClaimRef == nil {
+ x.ClaimRef = new(ObjectReference)
+ }
+ x.ClaimRef.CodecDecodeSelf(d)
+ }
+ case "persistentVolumeReclaimPolicy":
+ if r.TryDecodeAsNil() {
+ x.PersistentVolumeReclaimPolicy = ""
+ } else {
+ yyv29 := &x.PersistentVolumeReclaimPolicy
+ yyv29.CodecDecodeSelf(d)
+ }
+ case "storageClassName":
+ if r.TryDecodeAsNil() {
+ x.StorageClassName = ""
+ } else {
+ yyv30 := &x.StorageClassName
+ yym31 := z.DecBinary()
+ _ = yym31
+ if false {
+ } else {
+ *((*string)(yyv30)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PersistentVolumeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj32 int
+ var yyb32 bool
+ var yyhl32 bool = l >= 0
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Capacity = nil
+ } else {
+ yyv33 := &x.Capacity
+ yyv33.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.GCEPersistentDisk == nil {
+ x.PersistentVolumeSource.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.GCEPersistentDisk != nil {
+ x.GCEPersistentDisk = nil
+ }
+ } else {
+ if x.GCEPersistentDisk == nil {
+ x.GCEPersistentDisk = new(GCEPersistentDiskVolumeSource)
+ }
+ x.GCEPersistentDisk.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.AWSElasticBlockStore == nil {
+ x.PersistentVolumeSource.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.AWSElasticBlockStore != nil {
+ x.AWSElasticBlockStore = nil
+ }
+ } else {
+ if x.AWSElasticBlockStore == nil {
+ x.AWSElasticBlockStore = new(AWSElasticBlockStoreVolumeSource)
+ }
+ x.AWSElasticBlockStore.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.HostPath == nil {
+ x.PersistentVolumeSource.HostPath = new(HostPathVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.HostPath != nil {
+ x.HostPath = nil
+ }
+ } else {
+ if x.HostPath == nil {
+ x.HostPath = new(HostPathVolumeSource)
+ }
+ x.HostPath.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.Glusterfs == nil {
+ x.PersistentVolumeSource.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Glusterfs != nil {
+ x.Glusterfs = nil
+ }
+ } else {
+ if x.Glusterfs == nil {
+ x.Glusterfs = new(GlusterfsVolumeSource)
+ }
+ x.Glusterfs.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.NFS == nil {
+ x.PersistentVolumeSource.NFS = new(NFSVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.NFS != nil {
+ x.NFS = nil
+ }
+ } else {
+ if x.NFS == nil {
+ x.NFS = new(NFSVolumeSource)
+ }
+ x.NFS.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.RBD == nil {
+ x.PersistentVolumeSource.RBD = new(RBDVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RBD != nil {
+ x.RBD = nil
+ }
+ } else {
+ if x.RBD == nil {
+ x.RBD = new(RBDVolumeSource)
+ }
+ x.RBD.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.ISCSI == nil {
+ x.PersistentVolumeSource.ISCSI = new(ISCSIVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ISCSI != nil {
+ x.ISCSI = nil
+ }
+ } else {
+ if x.ISCSI == nil {
+ x.ISCSI = new(ISCSIVolumeSource)
+ }
+ x.ISCSI.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.Cinder == nil {
+ x.PersistentVolumeSource.Cinder = new(CinderVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Cinder != nil {
+ x.Cinder = nil
+ }
+ } else {
+ if x.Cinder == nil {
+ x.Cinder = new(CinderVolumeSource)
+ }
+ x.Cinder.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.CephFS == nil {
+ x.PersistentVolumeSource.CephFS = new(CephFSVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.CephFS != nil {
+ x.CephFS = nil
+ }
+ } else {
+ if x.CephFS == nil {
+ x.CephFS = new(CephFSVolumeSource)
+ }
+ x.CephFS.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.FC == nil {
+ x.PersistentVolumeSource.FC = new(FCVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FC != nil {
+ x.FC = nil
+ }
+ } else {
+ if x.FC == nil {
+ x.FC = new(FCVolumeSource)
+ }
+ x.FC.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.Flocker == nil {
+ x.PersistentVolumeSource.Flocker = new(FlockerVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Flocker != nil {
+ x.Flocker = nil
+ }
+ } else {
+ if x.Flocker == nil {
+ x.Flocker = new(FlockerVolumeSource)
+ }
+ x.Flocker.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.FlexVolume == nil {
+ x.PersistentVolumeSource.FlexVolume = new(FlexVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FlexVolume != nil {
+ x.FlexVolume = nil
+ }
+ } else {
+ if x.FlexVolume == nil {
+ x.FlexVolume = new(FlexVolumeSource)
+ }
+ x.FlexVolume.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.AzureFile == nil {
+ x.PersistentVolumeSource.AzureFile = new(AzureFileVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.AzureFile != nil {
+ x.AzureFile = nil
+ }
+ } else {
+ if x.AzureFile == nil {
+ x.AzureFile = new(AzureFileVolumeSource)
+ }
+ x.AzureFile.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.VsphereVolume == nil {
+ x.PersistentVolumeSource.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.VsphereVolume != nil {
+ x.VsphereVolume = nil
+ }
+ } else {
+ if x.VsphereVolume == nil {
+ x.VsphereVolume = new(VsphereVirtualDiskVolumeSource)
+ }
+ x.VsphereVolume.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.Quobyte == nil {
+ x.PersistentVolumeSource.Quobyte = new(QuobyteVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Quobyte != nil {
+ x.Quobyte = nil
+ }
+ } else {
+ if x.Quobyte == nil {
+ x.Quobyte = new(QuobyteVolumeSource)
+ }
+ x.Quobyte.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.AzureDisk == nil {
+ x.PersistentVolumeSource.AzureDisk = new(AzureDiskVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.AzureDisk != nil {
+ x.AzureDisk = nil
+ }
+ } else {
+ if x.AzureDisk == nil {
+ x.AzureDisk = new(AzureDiskVolumeSource)
+ }
+ x.AzureDisk.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.PhotonPersistentDisk == nil {
+ x.PersistentVolumeSource.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PhotonPersistentDisk != nil {
+ x.PhotonPersistentDisk = nil
+ }
+ } else {
+ if x.PhotonPersistentDisk == nil {
+ x.PhotonPersistentDisk = new(PhotonPersistentDiskVolumeSource)
+ }
+ x.PhotonPersistentDisk.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.PortworxVolume == nil {
+ x.PersistentVolumeSource.PortworxVolume = new(PortworxVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PortworxVolume != nil {
+ x.PortworxVolume = nil
+ }
+ } else {
+ if x.PortworxVolume == nil {
+ x.PortworxVolume = new(PortworxVolumeSource)
+ }
+ x.PortworxVolume.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.ScaleIO == nil {
+ x.PersistentVolumeSource.ScaleIO = new(ScaleIOVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ScaleIO != nil {
+ x.ScaleIO = nil
+ }
+ } else {
+ if x.ScaleIO == nil {
+ x.ScaleIO = new(ScaleIOVolumeSource)
+ }
+ x.ScaleIO.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.Local == nil {
+ x.PersistentVolumeSource.Local = new(LocalVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Local != nil {
+ x.Local = nil
+ }
+ } else {
+ if x.Local == nil {
+ x.Local = new(LocalVolumeSource)
+ }
+ x.Local.CodecDecodeSelf(d)
+ }
+ if x.PersistentVolumeSource.StorageOS == nil {
+ x.PersistentVolumeSource.StorageOS = new(StorageOSPersistentVolumeSource)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.StorageOS != nil {
+ x.StorageOS = nil
+ }
+ } else {
+ if x.StorageOS == nil {
+ x.StorageOS = new(StorageOSPersistentVolumeSource)
+ }
+ x.StorageOS.CodecDecodeSelf(d)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.AccessModes = nil
+ } else {
+ yyv55 := &x.AccessModes
+ yym56 := z.DecBinary()
+ _ = yym56
+ if false {
+ } else {
+ h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv55), d)
+ }
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ClaimRef != nil {
+ x.ClaimRef = nil
+ }
+ } else {
+ if x.ClaimRef == nil {
+ x.ClaimRef = new(ObjectReference)
+ }
+ x.ClaimRef.CodecDecodeSelf(d)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PersistentVolumeReclaimPolicy = ""
+ } else {
+ yyv58 := &x.PersistentVolumeReclaimPolicy
+ yyv58.CodecDecodeSelf(d)
+ }
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.StorageClassName = ""
+ } else {
+ yyv59 := &x.StorageClassName
+ yym60 := z.DecBinary()
+ _ = yym60
+ if false {
+ } else {
+ *((*string)(yyv59)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj32++
+ if yyhl32 {
+ yyb32 = yyj32 > l
+ } else {
+ yyb32 = r.CheckBreak()
+ }
+ if yyb32 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj32-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x PersistentVolumeReclaimPolicy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *PersistentVolumeReclaimPolicy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *PersistentVolumeStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Phase != ""
+ yyq2[1] = x.Message != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ x.Phase.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("phase"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Phase.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PersistentVolumeStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PersistentVolumeStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "phase":
+ if r.TryDecodeAsNil() {
+ x.Phase = ""
+ } else {
+ yyv4 := &x.Phase
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv5 := &x.Message
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*string)(yyv5)) = r.DecodeString()
+ }
+ }
+ 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_containerMapEnd1234)
+}
+
+func (x *PersistentVolumeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Phase = ""
+ } else {
+ yyv10 := &x.Phase
+ yyv10.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv11 := &x.Message
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*string)(yyv11)) = r.DecodeString()
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PersistentVolumeList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSlicePersistentVolume(([]PersistentVolume)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSlicePersistentVolume(([]PersistentVolume)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PersistentVolumeList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PersistentVolumeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSlicePersistentVolume((*[]PersistentVolume)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PersistentVolumeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSlicePersistentVolume((*[]PersistentVolume)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PersistentVolumeClaim) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PersistentVolumeClaim) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PersistentVolumeClaim) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 = PersistentVolumeClaimSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = PersistentVolumeClaimStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PersistentVolumeClaim) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = PersistentVolumeClaimSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = PersistentVolumeClaimStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PersistentVolumeClaimList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSlicePersistentVolumeClaim(([]PersistentVolumeClaim)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSlicePersistentVolumeClaim(([]PersistentVolumeClaim)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PersistentVolumeClaimList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PersistentVolumeClaimList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSlicePersistentVolumeClaim((*[]PersistentVolumeClaim)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PersistentVolumeClaimList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSlicePersistentVolumeClaim((*[]PersistentVolumeClaim)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PersistentVolumeClaimSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.AccessModes) != 0
+ yyq2[1] = x.Selector != nil
+ yyq2[2] = true
+ yyq2[3] = x.VolumeName != ""
+ yyq2[4] = x.StorageClassName != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.AccessModes == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSlicePersistentVolumeAccessMode(([]PersistentVolumeAccessMode)(x.AccessModes), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("accessModes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.AccessModes == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSlicePersistentVolumeAccessMode(([]PersistentVolumeAccessMode)(x.AccessModes), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy10 := &x.Resources
+ yy10.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resources"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.Resources
+ yy12.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumeName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.StorageClassName == nil {
+ r.EncodeNil()
+ } else {
+ yy18 := *x.StorageClassName
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yy18))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("storageClassName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.StorageClassName == nil {
+ r.EncodeNil()
+ } else {
+ yy20 := *x.StorageClassName
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yy20))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PersistentVolumeClaimSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PersistentVolumeClaimSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "accessModes":
+ if r.TryDecodeAsNil() {
+ x.AccessModes = nil
+ } else {
+ yyv4 := &x.AccessModes
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv4), d)
+ }
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg2_v1.LabelSelector)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ case "resources":
+ if r.TryDecodeAsNil() {
+ x.Resources = ResourceRequirements{}
+ } else {
+ yyv8 := &x.Resources
+ yyv8.CodecDecodeSelf(d)
+ }
+ case "volumeName":
+ if r.TryDecodeAsNil() {
+ x.VolumeName = ""
+ } else {
+ yyv9 := &x.VolumeName
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ *((*string)(yyv9)) = r.DecodeString()
+ }
+ }
+ case "storageClassName":
+ if r.TryDecodeAsNil() {
+ if x.StorageClassName != nil {
+ x.StorageClassName = nil
+ }
+ } else {
+ if x.StorageClassName == nil {
+ x.StorageClassName = new(string)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*string)(x.StorageClassName)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PersistentVolumeClaimSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.AccessModes = nil
+ } else {
+ yyv14 := &x.AccessModes
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv14), d)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg2_v1.LabelSelector)
+ }
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Resources = ResourceRequirements{}
+ } else {
+ yyv18 := &x.Resources
+ yyv18.CodecDecodeSelf(d)
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumeName = ""
+ } else {
+ yyv19 := &x.VolumeName
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.StorageClassName != nil {
+ x.StorageClassName = nil
+ }
+ } else {
+ if x.StorageClassName == nil {
+ x.StorageClassName = new(string)
+ }
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(x.StorageClassName)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj13-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PersistentVolumeClaimStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Phase != ""
+ yyq2[1] = len(x.AccessModes) != 0
+ yyq2[2] = len(x.Capacity) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ x.Phase.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("phase"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Phase.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.AccessModes == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSlicePersistentVolumeAccessMode(([]PersistentVolumeAccessMode)(x.AccessModes), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("accessModes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.AccessModes == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSlicePersistentVolumeAccessMode(([]PersistentVolumeAccessMode)(x.AccessModes), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Capacity == nil {
+ r.EncodeNil()
+ } else {
+ x.Capacity.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("capacity"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Capacity == nil {
+ r.EncodeNil()
+ } else {
+ x.Capacity.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PersistentVolumeClaimStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PersistentVolumeClaimStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "phase":
+ if r.TryDecodeAsNil() {
+ x.Phase = ""
+ } else {
+ yyv4 := &x.Phase
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "accessModes":
+ if r.TryDecodeAsNil() {
+ x.AccessModes = nil
+ } else {
+ yyv5 := &x.AccessModes
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv5), d)
+ }
+ }
+ case "capacity":
+ if r.TryDecodeAsNil() {
+ x.Capacity = nil
+ } else {
+ yyv7 := &x.Capacity
+ yyv7.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PersistentVolumeClaimStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Phase = ""
+ } else {
+ yyv9 := &x.Phase
+ yyv9.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.AccessModes = nil
+ } else {
+ yyv10 := &x.AccessModes
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSlicePersistentVolumeAccessMode((*[]PersistentVolumeAccessMode)(yyv10), d)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Capacity = nil
+ } else {
+ yyv12 := &x.Capacity
+ yyv12.CodecDecodeSelf(d)
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x PersistentVolumeAccessMode) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *PersistentVolumeAccessMode) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 PersistentVolumePhase) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *PersistentVolumePhase) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 PersistentVolumeClaimPhase) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *PersistentVolumeClaimPhase) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *HostPathVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("path"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HostPathVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HostPathVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv4 := &x.Path
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HostPathVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv7 := &x.Path
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*string)(yyv7)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *EmptyDirVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Medium != ""
+ yyq2[1] = x.SizeLimit != 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_containerArrayElem1234)
+ if yyq2[0] {
+ x.Medium.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("medium"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Medium.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.SizeLimit == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.SizeLimit) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.SizeLimit)
+ } else {
+ z.EncFallback(x.SizeLimit)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("sizeLimit"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SizeLimit == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.SizeLimit) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.SizeLimit)
+ } else {
+ z.EncFallback(x.SizeLimit)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *EmptyDirVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *EmptyDirVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "medium":
+ if r.TryDecodeAsNil() {
+ x.Medium = ""
+ } else {
+ yyv4 := &x.Medium
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "sizeLimit":
+ if r.TryDecodeAsNil() {
+ if x.SizeLimit != nil {
+ x.SizeLimit = nil
+ }
+ } else {
+ if x.SizeLimit == nil {
+ x.SizeLimit = new(pkg3_resource.Quantity)
+ }
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.SizeLimit) {
+ } else if !yym6 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.SizeLimit)
+ } else {
+ z.DecFallback(x.SizeLimit, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *EmptyDirVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Medium = ""
+ } else {
+ yyv8 := &x.Medium
+ yyv8.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SizeLimit != nil {
+ x.SizeLimit = nil
+ }
+ } else {
+ if x.SizeLimit == nil {
+ x.SizeLimit = new(pkg3_resource.Quantity)
+ }
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.SizeLimit) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.SizeLimit)
+ } else {
+ z.DecFallback(x.SizeLimit, false)
+ }
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *GlusterfsVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = x.ReadOnly != false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(3)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.EndpointsName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("endpoints"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.EndpointsName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("path"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *GlusterfsVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *GlusterfsVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "endpoints":
+ if r.TryDecodeAsNil() {
+ x.EndpointsName = ""
+ } else {
+ yyv4 := &x.EndpointsName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv6 := &x.Path
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv8 := &x.ReadOnly
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(yyv8)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *GlusterfsVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.EndpointsName = ""
+ } else {
+ yyv11 := &x.EndpointsName
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv13 := &x.Path
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv15 := &x.ReadOnly
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*bool)(yyv15)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *RBDVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = x.FSType != ""
+ yyq2[3] = x.RBDPool != ""
+ yyq2[4] = x.RadosUser != ""
+ yyq2[5] = x.Keyring != ""
+ yyq2[6] = x.SecretRef != nil
+ yyq2[7] = x.ReadOnly != false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(8)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.CephMonitors == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.CephMonitors, false, e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("monitors"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.CephMonitors == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.CephMonitors, false, e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.RBDImage))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("image"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.RBDImage))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.RBDPool))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("pool"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.RBDPool))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.RadosUser))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("user"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.RadosUser))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Keyring))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("keyring"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Keyring))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secretRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RBDVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RBDVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "monitors":
+ if r.TryDecodeAsNil() {
+ x.CephMonitors = nil
+ } else {
+ yyv4 := &x.CephMonitors
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv4, false, d)
+ }
+ }
+ case "image":
+ if r.TryDecodeAsNil() {
+ x.RBDImage = ""
+ } else {
+ yyv6 := &x.RBDImage
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv8 := &x.FSType
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "pool":
+ if r.TryDecodeAsNil() {
+ x.RBDPool = ""
+ } else {
+ yyv10 := &x.RBDPool
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "user":
+ if r.TryDecodeAsNil() {
+ x.RadosUser = ""
+ } else {
+ yyv12 := &x.RadosUser
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ case "keyring":
+ if r.TryDecodeAsNil() {
+ x.Keyring = ""
+ } else {
+ yyv14 := &x.Keyring
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ case "secretRef":
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(LocalObjectReference)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv17 := &x.ReadOnly
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*bool)(yyv17)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RBDVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj19 int
+ var yyb19 bool
+ var yyhl19 bool = l >= 0
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CephMonitors = nil
+ } else {
+ yyv20 := &x.CephMonitors
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv20, false, d)
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RBDImage = ""
+ } else {
+ yyv22 := &x.RBDImage
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else {
+ *((*string)(yyv22)) = r.DecodeString()
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv24 := &x.FSType
+ yym25 := z.DecBinary()
+ _ = yym25
+ if false {
+ } else {
+ *((*string)(yyv24)) = r.DecodeString()
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RBDPool = ""
+ } else {
+ yyv26 := &x.RBDPool
+ yym27 := z.DecBinary()
+ _ = yym27
+ if false {
+ } else {
+ *((*string)(yyv26)) = r.DecodeString()
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RadosUser = ""
+ } else {
+ yyv28 := &x.RadosUser
+ yym29 := z.DecBinary()
+ _ = yym29
+ if false {
+ } else {
+ *((*string)(yyv28)) = r.DecodeString()
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Keyring = ""
+ } else {
+ yyv30 := &x.Keyring
+ yym31 := z.DecBinary()
+ _ = yym31
+ if false {
+ } else {
+ *((*string)(yyv30)) = r.DecodeString()
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(LocalObjectReference)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv33 := &x.ReadOnly
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ *((*bool)(yyv33)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj19-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *CinderVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.FSType != ""
+ yyq2[2] = x.ReadOnly != false
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeID))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumeID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeID))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CinderVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CinderVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "volumeID":
+ if r.TryDecodeAsNil() {
+ x.VolumeID = ""
+ } else {
+ yyv4 := &x.VolumeID
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv6 := &x.FSType
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv8 := &x.ReadOnly
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(yyv8)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CinderVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumeID = ""
+ } else {
+ yyv11 := &x.VolumeID
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv13 := &x.FSType
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv15 := &x.ReadOnly
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*bool)(yyv15)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *CephFSVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.Path != ""
+ yyq2[2] = x.User != ""
+ yyq2[3] = x.SecretFile != ""
+ yyq2[4] = x.SecretRef != nil
+ yyq2[5] = x.ReadOnly != false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Monitors == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Monitors, false, e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("monitors"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Monitors == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Monitors, false, e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("path"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.User))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("user"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.User))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SecretFile))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secretFile"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SecretFile))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secretRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CephFSVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CephFSVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "monitors":
+ if r.TryDecodeAsNil() {
+ x.Monitors = nil
+ } else {
+ yyv4 := &x.Monitors
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv4, false, d)
+ }
+ }
+ case "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv6 := &x.Path
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "user":
+ if r.TryDecodeAsNil() {
+ x.User = ""
+ } else {
+ yyv8 := &x.User
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "secretFile":
+ if r.TryDecodeAsNil() {
+ x.SecretFile = ""
+ } else {
+ yyv10 := &x.SecretFile
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "secretRef":
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(LocalObjectReference)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv13 := &x.ReadOnly
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ *((*bool)(yyv13)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CephFSVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj15 int
+ var yyb15 bool
+ var yyhl15 bool = l >= 0
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Monitors = nil
+ } else {
+ yyv16 := &x.Monitors
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv16, false, d)
+ }
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv18 := &x.Path
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*string)(yyv18)) = r.DecodeString()
+ }
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.User = ""
+ } else {
+ yyv20 := &x.User
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ *((*string)(yyv20)) = r.DecodeString()
+ }
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SecretFile = ""
+ } else {
+ yyv22 := &x.SecretFile
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else {
+ *((*string)(yyv22)) = r.DecodeString()
+ }
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(LocalObjectReference)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv25 := &x.ReadOnly
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*bool)(yyv25)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj15-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *FlockerVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.DatasetName != ""
+ yyq2[1] = x.DatasetUUID != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DatasetName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("datasetName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DatasetName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DatasetUUID))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("datasetUUID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DatasetUUID))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *FlockerVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *FlockerVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "datasetName":
+ if r.TryDecodeAsNil() {
+ x.DatasetName = ""
+ } else {
+ yyv4 := &x.DatasetName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "datasetUUID":
+ if r.TryDecodeAsNil() {
+ x.DatasetUUID = ""
+ } else {
+ yyv6 := &x.DatasetUUID
+ 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_containerMapEnd1234)
+}
+
+func (x *FlockerVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DatasetName = ""
+ } else {
+ yyv9 := &x.DatasetName
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DatasetUUID = ""
+ } else {
+ yyv11 := &x.DatasetUUID
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x StorageMedium) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *StorageMedium) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 Protocol) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *Protocol) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *GCEPersistentDiskVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.FSType != ""
+ yyq2[2] = x.Partition != 0
+ yyq2[3] = x.ReadOnly != false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.PDName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("pdName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.PDName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Partition))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("partition"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Partition))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *GCEPersistentDiskVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *GCEPersistentDiskVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "pdName":
+ if r.TryDecodeAsNil() {
+ x.PDName = ""
+ } else {
+ yyv4 := &x.PDName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv6 := &x.FSType
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "partition":
+ if r.TryDecodeAsNil() {
+ x.Partition = 0
+ } else {
+ yyv8 := &x.Partition
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv10 := &x.ReadOnly
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*bool)(yyv10)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *GCEPersistentDiskVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PDName = ""
+ } else {
+ yyv13 := &x.PDName
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv15 := &x.FSType
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Partition = 0
+ } else {
+ yyv17 := &x.Partition
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int32)(yyv17)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv19 := &x.ReadOnly
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*bool)(yyv19)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *QuobyteVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = x.ReadOnly != false
+ yyq2[3] = x.User != ""
+ yyq2[4] = x.Group != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Registry))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("registry"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Registry))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Volume))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volume"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Volume))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.User))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("user"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.User))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Group))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("group"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Group))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *QuobyteVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *QuobyteVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "registry":
+ if r.TryDecodeAsNil() {
+ x.Registry = ""
+ } else {
+ yyv4 := &x.Registry
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "volume":
+ if r.TryDecodeAsNil() {
+ x.Volume = ""
+ } else {
+ yyv6 := &x.Volume
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv8 := &x.ReadOnly
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(yyv8)) = r.DecodeBool()
+ }
+ }
+ case "user":
+ if r.TryDecodeAsNil() {
+ x.User = ""
+ } else {
+ yyv10 := &x.User
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "group":
+ if r.TryDecodeAsNil() {
+ x.Group = ""
+ } else {
+ yyv12 := &x.Group
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *QuobyteVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Registry = ""
+ } else {
+ yyv15 := &x.Registry
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Volume = ""
+ } else {
+ yyv17 := &x.Volume
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv19 := &x.ReadOnly
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*bool)(yyv19)) = r.DecodeBool()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.User = ""
+ } else {
+ yyv21 := &x.User
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Group = ""
+ } else {
+ yyv23 := &x.Group
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*string)(yyv23)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *FlexVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.FSType != ""
+ yyq2[2] = x.SecretRef != nil
+ yyq2[3] = x.ReadOnly != false
+ yyq2[4] = len(x.Options) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Driver))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("driver"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Driver))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secretRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.Options == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Options, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("options"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Options == nil {
+ r.EncodeNil()
+ } else {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Options, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *FlexVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *FlexVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "driver":
+ if r.TryDecodeAsNil() {
+ x.Driver = ""
+ } else {
+ yyv4 := &x.Driver
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv6 := &x.FSType
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "secretRef":
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(LocalObjectReference)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv9 := &x.ReadOnly
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ *((*bool)(yyv9)) = r.DecodeBool()
+ }
+ }
+ case "options":
+ if r.TryDecodeAsNil() {
+ x.Options = nil
+ } else {
+ yyv11 := &x.Options
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv11, false, d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *FlexVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Driver = ""
+ } else {
+ yyv14 := &x.Driver
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv16 := &x.FSType
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(LocalObjectReference)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv19 := &x.ReadOnly
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*bool)(yyv19)) = r.DecodeBool()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Options = nil
+ } else {
+ yyv21 := &x.Options
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv21, false, d)
+ }
+ }
+ for {
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj13-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *AWSElasticBlockStoreVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.FSType != ""
+ yyq2[2] = x.Partition != 0
+ yyq2[3] = x.ReadOnly != false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeID))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumeID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeID))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Partition))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("partition"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Partition))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *AWSElasticBlockStoreVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *AWSElasticBlockStoreVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "volumeID":
+ if r.TryDecodeAsNil() {
+ x.VolumeID = ""
+ } else {
+ yyv4 := &x.VolumeID
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv6 := &x.FSType
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "partition":
+ if r.TryDecodeAsNil() {
+ x.Partition = 0
+ } else {
+ yyv8 := &x.Partition
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv10 := &x.ReadOnly
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*bool)(yyv10)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *AWSElasticBlockStoreVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumeID = ""
+ } else {
+ yyv13 := &x.VolumeID
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv15 := &x.FSType
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Partition = 0
+ } else {
+ yyv17 := &x.Partition
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int32)(yyv17)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv19 := &x.ReadOnly
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*bool)(yyv19)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *GitRepoVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.Revision != ""
+ yyq2[2] = x.Directory != ""
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Repository))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("repository"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Repository))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Revision))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("revision"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Revision))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Directory))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("directory"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Directory))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *GitRepoVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *GitRepoVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "repository":
+ if r.TryDecodeAsNil() {
+ x.Repository = ""
+ } else {
+ yyv4 := &x.Repository
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "revision":
+ if r.TryDecodeAsNil() {
+ x.Revision = ""
+ } else {
+ yyv6 := &x.Revision
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "directory":
+ if r.TryDecodeAsNil() {
+ x.Directory = ""
+ } else {
+ yyv8 := &x.Directory
+ 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_containerMapEnd1234)
+}
+
+func (x *GitRepoVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Repository = ""
+ } else {
+ yyv11 := &x.Repository
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Revision = ""
+ } else {
+ yyv13 := &x.Revision
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Directory = ""
+ } else {
+ yyv15 := &x.Directory
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *SecretVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.SecretName != ""
+ yyq2[1] = len(x.Items) != 0
+ yyq2[2] = x.DefaultMode != nil
+ yyq2[3] = x.Optional != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SecretName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secretName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SecretName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceKeyToPath(([]KeyToPath)(x.Items), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceKeyToPath(([]KeyToPath)(x.Items), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.DefaultMode == nil {
+ r.EncodeNil()
+ } else {
+ yy10 := *x.DefaultMode
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(yy10))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("defaultMode"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.DefaultMode == nil {
+ r.EncodeNil()
+ } else {
+ yy12 := *x.DefaultMode
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(yy12))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy15 := *x.Optional
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeBool(bool(yy15))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("optional"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy17 := *x.Optional
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeBool(bool(yy17))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SecretVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SecretVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "secretName":
+ if r.TryDecodeAsNil() {
+ x.SecretName = ""
+ } else {
+ yyv4 := &x.SecretName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceKeyToPath((*[]KeyToPath)(yyv6), d)
+ }
+ }
+ case "defaultMode":
+ if r.TryDecodeAsNil() {
+ if x.DefaultMode != nil {
+ x.DefaultMode = nil
+ }
+ } else {
+ if x.DefaultMode == nil {
+ x.DefaultMode = new(int32)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "optional":
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SecretVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SecretName = ""
+ } else {
+ yyv13 := &x.SecretName
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv15 := &x.Items
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.decSliceKeyToPath((*[]KeyToPath)(yyv15), d)
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.DefaultMode != nil {
+ x.DefaultMode = nil
+ }
+ } else {
+ if x.DefaultMode == nil {
+ x.DefaultMode = new(int32)
+ }
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *SecretProjection) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Name != ""
+ yyq2[1] = len(x.Items) != 0
+ yyq2[2] = x.Optional != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceKeyToPath(([]KeyToPath)(x.Items), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceKeyToPath(([]KeyToPath)(x.Items), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy10 := *x.Optional
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(yy10))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("optional"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy12 := *x.Optional
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(yy12))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SecretProjection) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SecretProjection) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceKeyToPath((*[]KeyToPath)(yyv6), d)
+ }
+ }
+ case "optional":
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SecretProjection) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv11 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceKeyToPath((*[]KeyToPath)(yyv13), d)
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NFSVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = x.ReadOnly != false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(3)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Server))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("server"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Server))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("path"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NFSVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NFSVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "server":
+ if r.TryDecodeAsNil() {
+ x.Server = ""
+ } else {
+ yyv4 := &x.Server
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv6 := &x.Path
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv8 := &x.ReadOnly
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(yyv8)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NFSVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Server = ""
+ } else {
+ yyv11 := &x.Server
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv13 := &x.Path
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv15 := &x.ReadOnly
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*bool)(yyv15)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ISCSIVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [10]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[3] = x.ISCSIInterface != ""
+ yyq2[4] = x.FSType != ""
+ yyq2[5] = x.ReadOnly != false
+ yyq2[6] = len(x.Portals) != 0
+ yyq2[7] = x.DiscoveryCHAPAuth != false
+ yyq2[8] = x.SessionCHAPAuth != false
+ yyq2[9] = x.SecretRef != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(10)
+ } else {
+ yynn2 = 3
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.TargetPortal))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetPortal"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.TargetPortal))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.IQN))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("iqn"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.IQN))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Lun))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lun"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Lun))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ISCSIInterface))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("iscsiInterface"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ISCSIInterface))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.Portals == nil {
+ r.EncodeNil()
+ } else {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Portals, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("portals"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Portals == nil {
+ r.EncodeNil()
+ } else {
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Portals, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeBool(bool(x.DiscoveryCHAPAuth))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("chapAuthDiscovery"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeBool(bool(x.DiscoveryCHAPAuth))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeBool(bool(x.SessionCHAPAuth))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("chapAuthSession"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym29 := z.EncBinary()
+ _ = yym29
+ if false {
+ } else {
+ r.EncodeBool(bool(x.SessionCHAPAuth))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secretRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ISCSIVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ISCSIVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "targetPortal":
+ if r.TryDecodeAsNil() {
+ x.TargetPortal = ""
+ } else {
+ yyv4 := &x.TargetPortal
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "iqn":
+ if r.TryDecodeAsNil() {
+ x.IQN = ""
+ } else {
+ yyv6 := &x.IQN
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "lun":
+ if r.TryDecodeAsNil() {
+ x.Lun = 0
+ } else {
+ yyv8 := &x.Lun
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "iscsiInterface":
+ if r.TryDecodeAsNil() {
+ x.ISCSIInterface = ""
+ } else {
+ yyv10 := &x.ISCSIInterface
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv12 := &x.FSType
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv14 := &x.ReadOnly
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*bool)(yyv14)) = r.DecodeBool()
+ }
+ }
+ case "portals":
+ if r.TryDecodeAsNil() {
+ x.Portals = nil
+ } else {
+ yyv16 := &x.Portals
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv16, false, d)
+ }
+ }
+ case "chapAuthDiscovery":
+ if r.TryDecodeAsNil() {
+ x.DiscoveryCHAPAuth = false
+ } else {
+ yyv18 := &x.DiscoveryCHAPAuth
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*bool)(yyv18)) = r.DecodeBool()
+ }
+ }
+ case "chapAuthSession":
+ if r.TryDecodeAsNil() {
+ x.SessionCHAPAuth = false
+ } else {
+ yyv20 := &x.SessionCHAPAuth
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ *((*bool)(yyv20)) = r.DecodeBool()
+ }
+ }
+ case "secretRef":
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(LocalObjectReference)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ISCSIVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj23 int
+ var yyb23 bool
+ var yyhl23 bool = l >= 0
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TargetPortal = ""
+ } else {
+ yyv24 := &x.TargetPortal
+ yym25 := z.DecBinary()
+ _ = yym25
+ if false {
+ } else {
+ *((*string)(yyv24)) = r.DecodeString()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.IQN = ""
+ } else {
+ yyv26 := &x.IQN
+ yym27 := z.DecBinary()
+ _ = yym27
+ if false {
+ } else {
+ *((*string)(yyv26)) = r.DecodeString()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Lun = 0
+ } else {
+ yyv28 := &x.Lun
+ yym29 := z.DecBinary()
+ _ = yym29
+ if false {
+ } else {
+ *((*int32)(yyv28)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ISCSIInterface = ""
+ } else {
+ yyv30 := &x.ISCSIInterface
+ yym31 := z.DecBinary()
+ _ = yym31
+ if false {
+ } else {
+ *((*string)(yyv30)) = r.DecodeString()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv32 := &x.FSType
+ yym33 := z.DecBinary()
+ _ = yym33
+ if false {
+ } else {
+ *((*string)(yyv32)) = r.DecodeString()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv34 := &x.ReadOnly
+ yym35 := z.DecBinary()
+ _ = yym35
+ if false {
+ } else {
+ *((*bool)(yyv34)) = r.DecodeBool()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Portals = nil
+ } else {
+ yyv36 := &x.Portals
+ yym37 := z.DecBinary()
+ _ = yym37
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv36, false, d)
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DiscoveryCHAPAuth = false
+ } else {
+ yyv38 := &x.DiscoveryCHAPAuth
+ yym39 := z.DecBinary()
+ _ = yym39
+ if false {
+ } else {
+ *((*bool)(yyv38)) = r.DecodeBool()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SessionCHAPAuth = false
+ } else {
+ yyv40 := &x.SessionCHAPAuth
+ yym41 := z.DecBinary()
+ _ = yym41
+ if false {
+ } else {
+ *((*bool)(yyv40)) = r.DecodeBool()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(LocalObjectReference)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ for {
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj23-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *FCVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = x.FSType != ""
+ yyq2[3] = x.ReadOnly != false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.TargetWWNs == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.TargetWWNs, false, e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetWWNs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TargetWWNs == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.TargetWWNs, false, e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Lun == nil {
+ r.EncodeNil()
+ } else {
+ yy7 := *x.Lun
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(yy7))
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lun"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Lun == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.Lun
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(yy9))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *FCVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *FCVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "targetWWNs":
+ if r.TryDecodeAsNil() {
+ x.TargetWWNs = nil
+ } else {
+ yyv4 := &x.TargetWWNs
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv4, false, d)
+ }
+ }
+ case "lun":
+ if r.TryDecodeAsNil() {
+ if x.Lun != nil {
+ x.Lun = nil
+ }
+ } else {
+ if x.Lun == nil {
+ x.Lun = new(int32)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int32)(x.Lun)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv8 := &x.FSType
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv10 := &x.ReadOnly
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*bool)(yyv10)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *FCVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TargetWWNs = nil
+ } else {
+ yyv13 := &x.TargetWWNs
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv13, false, d)
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Lun != nil {
+ x.Lun = nil
+ }
+ } else {
+ if x.Lun == nil {
+ x.Lun = new(int32)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*int32)(x.Lun)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv17 := &x.FSType
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv19 := &x.ReadOnly
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*bool)(yyv19)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *AzureFileVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = x.ReadOnly != false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(3)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SecretName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secretName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SecretName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ShareName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("shareName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ShareName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *AzureFileVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *AzureFileVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "secretName":
+ if r.TryDecodeAsNil() {
+ x.SecretName = ""
+ } else {
+ yyv4 := &x.SecretName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "shareName":
+ if r.TryDecodeAsNil() {
+ x.ShareName = ""
+ } else {
+ yyv6 := &x.ShareName
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv8 := &x.ReadOnly
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(yyv8)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *AzureFileVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SecretName = ""
+ } else {
+ yyv11 := &x.SecretName
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ShareName = ""
+ } else {
+ yyv13 := &x.ShareName
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv15 := &x.ReadOnly
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*bool)(yyv15)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *VsphereVirtualDiskVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.FSType != ""
+ yyq2[2] = x.StoragePolicyName != ""
+ yyq2[3] = x.StoragePolicyID != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumePath))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumePath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumePath))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.StoragePolicyName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("storagePolicyName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.StoragePolicyName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.StoragePolicyID))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("storagePolicyID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.StoragePolicyID))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *VsphereVirtualDiskVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *VsphereVirtualDiskVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "volumePath":
+ if r.TryDecodeAsNil() {
+ x.VolumePath = ""
+ } else {
+ yyv4 := &x.VolumePath
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv6 := &x.FSType
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "storagePolicyName":
+ if r.TryDecodeAsNil() {
+ x.StoragePolicyName = ""
+ } else {
+ yyv8 := &x.StoragePolicyName
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "storagePolicyID":
+ if r.TryDecodeAsNil() {
+ x.StoragePolicyID = ""
+ } else {
+ yyv10 := &x.StoragePolicyID
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *VsphereVirtualDiskVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumePath = ""
+ } else {
+ yyv13 := &x.VolumePath
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv15 := &x.FSType
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.StoragePolicyName = ""
+ } else {
+ yyv17 := &x.StoragePolicyName
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.StoragePolicyID = ""
+ } else {
+ yyv19 := &x.StoragePolicyID
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PhotonPersistentDiskVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.FSType != ""
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.PdID))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("pdID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.PdID))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PhotonPersistentDiskVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PhotonPersistentDiskVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "pdID":
+ if r.TryDecodeAsNil() {
+ x.PdID = ""
+ } else {
+ yyv4 := &x.PdID
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv6 := &x.FSType
+ 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_containerMapEnd1234)
+}
+
+func (x *PhotonPersistentDiskVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PdID = ""
+ } else {
+ yyv9 := &x.PdID
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv11 := &x.FSType
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x AzureDataDiskCachingMode) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *AzureDataDiskCachingMode) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 AzureDataDiskKind) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *AzureDataDiskKind) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *AzureDiskVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = x.CachingMode != nil
+ yyq2[3] = x.FSType != nil
+ yyq2[4] = x.ReadOnly != nil
+ yyq2[5] = x.Kind != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DiskName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("diskName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DiskName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DataDiskURI))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("diskURI"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DataDiskURI))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.CachingMode == nil {
+ r.EncodeNil()
+ } else {
+ yy10 := *x.CachingMode
+ yy10.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("cachingMode"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.CachingMode == nil {
+ r.EncodeNil()
+ } else {
+ yy12 := *x.CachingMode
+ yy12.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.FSType == nil {
+ r.EncodeNil()
+ } else {
+ yy15 := *x.FSType
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yy15))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.FSType == nil {
+ r.EncodeNil()
+ } else {
+ yy17 := *x.FSType
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yy17))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.ReadOnly == nil {
+ r.EncodeNil()
+ } else {
+ yy20 := *x.ReadOnly
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeBool(bool(yy20))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ReadOnly == nil {
+ r.EncodeNil()
+ } else {
+ yy22 := *x.ReadOnly
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeBool(bool(yy22))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.Kind == nil {
+ r.EncodeNil()
+ } else {
+ yy25 := *x.Kind
+ yy25.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Kind == nil {
+ r.EncodeNil()
+ } else {
+ yy27 := *x.Kind
+ yy27.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *AzureDiskVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *AzureDiskVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "diskName":
+ if r.TryDecodeAsNil() {
+ x.DiskName = ""
+ } else {
+ yyv4 := &x.DiskName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "diskURI":
+ if r.TryDecodeAsNil() {
+ x.DataDiskURI = ""
+ } else {
+ yyv6 := &x.DataDiskURI
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "cachingMode":
+ if r.TryDecodeAsNil() {
+ if x.CachingMode != nil {
+ x.CachingMode = nil
+ }
+ } else {
+ if x.CachingMode == nil {
+ x.CachingMode = new(AzureDataDiskCachingMode)
+ }
+ x.CachingMode.CodecDecodeSelf(d)
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ if x.FSType != nil {
+ x.FSType = nil
+ }
+ } else {
+ if x.FSType == nil {
+ x.FSType = new(string)
+ }
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ *((*string)(x.FSType)) = r.DecodeString()
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ if x.ReadOnly != nil {
+ x.ReadOnly = nil
+ }
+ } else {
+ if x.ReadOnly == nil {
+ x.ReadOnly = new(bool)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*bool)(x.ReadOnly)) = r.DecodeBool()
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ if x.Kind != nil {
+ x.Kind = nil
+ }
+ } else {
+ if x.Kind == nil {
+ x.Kind = new(AzureDataDiskKind)
+ }
+ x.Kind.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *AzureDiskVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DiskName = ""
+ } else {
+ yyv15 := &x.DiskName
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DataDiskURI = ""
+ } else {
+ yyv17 := &x.DataDiskURI
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.CachingMode != nil {
+ x.CachingMode = nil
+ }
+ } else {
+ if x.CachingMode == nil {
+ x.CachingMode = new(AzureDataDiskCachingMode)
+ }
+ x.CachingMode.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FSType != nil {
+ x.FSType = nil
+ }
+ } else {
+ if x.FSType == nil {
+ x.FSType = new(string)
+ }
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ *((*string)(x.FSType)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ReadOnly != nil {
+ x.ReadOnly = nil
+ }
+ } else {
+ if x.ReadOnly == nil {
+ x.ReadOnly = new(bool)
+ }
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else {
+ *((*bool)(x.ReadOnly)) = r.DecodeBool()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Kind != nil {
+ x.Kind = nil
+ }
+ } else {
+ if x.Kind == nil {
+ x.Kind = new(AzureDataDiskKind)
+ }
+ x.Kind.CodecDecodeSelf(d)
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PortworxVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.FSType != ""
+ yyq2[2] = x.ReadOnly != false
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeID))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumeID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeID))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PortworxVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PortworxVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "volumeID":
+ if r.TryDecodeAsNil() {
+ x.VolumeID = ""
+ } else {
+ yyv4 := &x.VolumeID
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv6 := &x.FSType
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv8 := &x.ReadOnly
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(yyv8)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PortworxVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumeID = ""
+ } else {
+ yyv11 := &x.VolumeID
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv13 := &x.FSType
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv15 := &x.ReadOnly
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*bool)(yyv15)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ScaleIOVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [10]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[3] = x.SSLEnabled != false
+ yyq2[4] = x.ProtectionDomain != ""
+ yyq2[5] = x.StoragePool != ""
+ yyq2[6] = x.StorageMode != ""
+ yyq2[7] = x.VolumeName != ""
+ yyq2[8] = x.FSType != ""
+ yyq2[9] = x.ReadOnly != false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(10)
+ } else {
+ yynn2 = 3
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Gateway))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("gateway"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Gateway))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.System))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("system"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.System))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secretRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(x.SSLEnabled))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("sslEnabled"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeBool(bool(x.SSLEnabled))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ProtectionDomain))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("protectionDomain"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ProtectionDomain))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.StoragePool))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("storagePool"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.StoragePool))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.StorageMode))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("storageMode"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.StorageMode))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumeName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym29 := z.EncBinary()
+ _ = yym29
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ yym31 := z.EncBinary()
+ _ = yym31
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym32 := z.EncBinary()
+ _ = yym32
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ScaleIOVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ScaleIOVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "gateway":
+ if r.TryDecodeAsNil() {
+ x.Gateway = ""
+ } else {
+ yyv4 := &x.Gateway
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "system":
+ if r.TryDecodeAsNil() {
+ x.System = ""
+ } else {
+ yyv6 := &x.System
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "secretRef":
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(LocalObjectReference)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ case "sslEnabled":
+ if r.TryDecodeAsNil() {
+ x.SSLEnabled = false
+ } else {
+ yyv9 := &x.SSLEnabled
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ *((*bool)(yyv9)) = r.DecodeBool()
+ }
+ }
+ case "protectionDomain":
+ if r.TryDecodeAsNil() {
+ x.ProtectionDomain = ""
+ } else {
+ yyv11 := &x.ProtectionDomain
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*string)(yyv11)) = r.DecodeString()
+ }
+ }
+ case "storagePool":
+ if r.TryDecodeAsNil() {
+ x.StoragePool = ""
+ } else {
+ yyv13 := &x.StoragePool
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ *((*string)(yyv13)) = r.DecodeString()
+ }
+ }
+ case "storageMode":
+ if r.TryDecodeAsNil() {
+ x.StorageMode = ""
+ } else {
+ yyv15 := &x.StorageMode
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*string)(yyv15)) = r.DecodeString()
+ }
+ }
+ case "volumeName":
+ if r.TryDecodeAsNil() {
+ x.VolumeName = ""
+ } else {
+ yyv17 := &x.VolumeName
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv19 := &x.FSType
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv21 := &x.ReadOnly
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*bool)(yyv21)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ScaleIOVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj23 int
+ var yyb23 bool
+ var yyhl23 bool = l >= 0
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Gateway = ""
+ } else {
+ yyv24 := &x.Gateway
+ yym25 := z.DecBinary()
+ _ = yym25
+ if false {
+ } else {
+ *((*string)(yyv24)) = r.DecodeString()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.System = ""
+ } else {
+ yyv26 := &x.System
+ yym27 := z.DecBinary()
+ _ = yym27
+ if false {
+ } else {
+ *((*string)(yyv26)) = r.DecodeString()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(LocalObjectReference)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SSLEnabled = false
+ } else {
+ yyv29 := &x.SSLEnabled
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*bool)(yyv29)) = r.DecodeBool()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ProtectionDomain = ""
+ } else {
+ yyv31 := &x.ProtectionDomain
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*string)(yyv31)) = r.DecodeString()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.StoragePool = ""
+ } else {
+ yyv33 := &x.StoragePool
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ *((*string)(yyv33)) = r.DecodeString()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.StorageMode = ""
+ } else {
+ yyv35 := &x.StorageMode
+ yym36 := z.DecBinary()
+ _ = yym36
+ if false {
+ } else {
+ *((*string)(yyv35)) = r.DecodeString()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumeName = ""
+ } else {
+ yyv37 := &x.VolumeName
+ yym38 := z.DecBinary()
+ _ = yym38
+ if false {
+ } else {
+ *((*string)(yyv37)) = r.DecodeString()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv39 := &x.FSType
+ yym40 := z.DecBinary()
+ _ = yym40
+ if false {
+ } else {
+ *((*string)(yyv39)) = r.DecodeString()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv41 := &x.ReadOnly
+ yym42 := z.DecBinary()
+ _ = yym42
+ if false {
+ } else {
+ *((*bool)(yyv41)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj23-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *StorageOSVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.VolumeName != ""
+ yyq2[1] = x.VolumeNamespace != ""
+ yyq2[2] = x.FSType != ""
+ yyq2[3] = x.ReadOnly != false
+ yyq2[4] = x.SecretRef != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumeName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeNamespace))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumeNamespace"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeNamespace))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secretRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *StorageOSVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *StorageOSVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "volumeName":
+ if r.TryDecodeAsNil() {
+ x.VolumeName = ""
+ } else {
+ yyv4 := &x.VolumeName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "volumeNamespace":
+ if r.TryDecodeAsNil() {
+ x.VolumeNamespace = ""
+ } else {
+ yyv6 := &x.VolumeNamespace
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv8 := &x.FSType
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv10 := &x.ReadOnly
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*bool)(yyv10)) = r.DecodeBool()
+ }
+ }
+ case "secretRef":
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(LocalObjectReference)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *StorageOSVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumeName = ""
+ } else {
+ yyv14 := &x.VolumeName
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumeNamespace = ""
+ } else {
+ yyv16 := &x.VolumeNamespace
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv18 := &x.FSType
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*string)(yyv18)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv20 := &x.ReadOnly
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ *((*bool)(yyv20)) = r.DecodeBool()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(LocalObjectReference)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ for {
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj13-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *StorageOSPersistentVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.VolumeName != ""
+ yyq2[1] = x.VolumeNamespace != ""
+ yyq2[2] = x.FSType != ""
+ yyq2[3] = x.ReadOnly != false
+ yyq2[4] = x.SecretRef != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumeName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeNamespace))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumeNamespace"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.VolumeNamespace))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsType"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FSType))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secretRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *StorageOSPersistentVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *StorageOSPersistentVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "volumeName":
+ if r.TryDecodeAsNil() {
+ x.VolumeName = ""
+ } else {
+ yyv4 := &x.VolumeName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "volumeNamespace":
+ if r.TryDecodeAsNil() {
+ x.VolumeNamespace = ""
+ } else {
+ yyv6 := &x.VolumeNamespace
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "fsType":
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv8 := &x.FSType
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv10 := &x.ReadOnly
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*bool)(yyv10)) = r.DecodeBool()
+ }
+ }
+ case "secretRef":
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(ObjectReference)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *StorageOSPersistentVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumeName = ""
+ } else {
+ yyv14 := &x.VolumeName
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumeNamespace = ""
+ } else {
+ yyv16 := &x.VolumeNamespace
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FSType = ""
+ } else {
+ yyv18 := &x.FSType
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*string)(yyv18)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv20 := &x.ReadOnly
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ *((*bool)(yyv20)) = r.DecodeBool()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(ObjectReference)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ for {
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj13-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ConfigMapVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Name != ""
+ yyq2[1] = len(x.Items) != 0
+ yyq2[2] = x.DefaultMode != nil
+ yyq2[3] = x.Optional != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceKeyToPath(([]KeyToPath)(x.Items), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceKeyToPath(([]KeyToPath)(x.Items), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.DefaultMode == nil {
+ r.EncodeNil()
+ } else {
+ yy10 := *x.DefaultMode
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(yy10))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("defaultMode"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.DefaultMode == nil {
+ r.EncodeNil()
+ } else {
+ yy12 := *x.DefaultMode
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(yy12))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy15 := *x.Optional
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeBool(bool(yy15))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("optional"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy17 := *x.Optional
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeBool(bool(yy17))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ConfigMapVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ConfigMapVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceKeyToPath((*[]KeyToPath)(yyv6), d)
+ }
+ }
+ case "defaultMode":
+ if r.TryDecodeAsNil() {
+ if x.DefaultMode != nil {
+ x.DefaultMode = nil
+ }
+ } else {
+ if x.DefaultMode == nil {
+ x.DefaultMode = new(int32)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "optional":
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ConfigMapVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv13 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv15 := &x.Items
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.decSliceKeyToPath((*[]KeyToPath)(yyv15), d)
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.DefaultMode != nil {
+ x.DefaultMode = nil
+ }
+ } else {
+ if x.DefaultMode == nil {
+ x.DefaultMode = new(int32)
+ }
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ConfigMapProjection) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Name != ""
+ yyq2[1] = len(x.Items) != 0
+ yyq2[2] = x.Optional != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceKeyToPath(([]KeyToPath)(x.Items), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceKeyToPath(([]KeyToPath)(x.Items), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy10 := *x.Optional
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(yy10))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("optional"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy12 := *x.Optional
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(yy12))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ConfigMapProjection) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ConfigMapProjection) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv6 := &x.Items
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceKeyToPath((*[]KeyToPath)(yyv6), d)
+ }
+ }
+ case "optional":
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ConfigMapProjection) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv11 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv13 := &x.Items
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceKeyToPath((*[]KeyToPath)(yyv13), d)
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ProjectedVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.DefaultMode != nil
+ 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_containerArrayElem1234)
+ if x.Sources == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceVolumeProjection(([]VolumeProjection)(x.Sources), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("sources"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Sources == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceVolumeProjection(([]VolumeProjection)(x.Sources), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.DefaultMode == nil {
+ r.EncodeNil()
+ } else {
+ yy7 := *x.DefaultMode
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(yy7))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("defaultMode"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.DefaultMode == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.DefaultMode
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(yy9))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ProjectedVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ProjectedVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "sources":
+ if r.TryDecodeAsNil() {
+ x.Sources = nil
+ } else {
+ yyv4 := &x.Sources
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceVolumeProjection((*[]VolumeProjection)(yyv4), d)
+ }
+ }
+ case "defaultMode":
+ if r.TryDecodeAsNil() {
+ if x.DefaultMode != nil {
+ x.DefaultMode = nil
+ }
+ } else {
+ if x.DefaultMode == nil {
+ x.DefaultMode = new(int32)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ProjectedVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Sources = nil
+ } else {
+ yyv9 := &x.Sources
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceVolumeProjection((*[]VolumeProjection)(yyv9), d)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.DefaultMode != nil {
+ x.DefaultMode = nil
+ }
+ } else {
+ if x.DefaultMode == nil {
+ x.DefaultMode = new(int32)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *VolumeProjection) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Secret != nil
+ yyq2[1] = x.DownwardAPI != nil
+ yyq2[2] = x.ConfigMap != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Secret == nil {
+ r.EncodeNil()
+ } else {
+ x.Secret.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secret"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Secret == nil {
+ r.EncodeNil()
+ } else {
+ x.Secret.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.DownwardAPI == nil {
+ r.EncodeNil()
+ } else {
+ x.DownwardAPI.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("downwardAPI"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.DownwardAPI == nil {
+ r.EncodeNil()
+ } else {
+ x.DownwardAPI.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.ConfigMap == nil {
+ r.EncodeNil()
+ } else {
+ x.ConfigMap.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("configMap"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ConfigMap == nil {
+ r.EncodeNil()
+ } else {
+ x.ConfigMap.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *VolumeProjection) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *VolumeProjection) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "secret":
+ if r.TryDecodeAsNil() {
+ if x.Secret != nil {
+ x.Secret = nil
+ }
+ } else {
+ if x.Secret == nil {
+ x.Secret = new(SecretProjection)
+ }
+ x.Secret.CodecDecodeSelf(d)
+ }
+ case "downwardAPI":
+ if r.TryDecodeAsNil() {
+ if x.DownwardAPI != nil {
+ x.DownwardAPI = nil
+ }
+ } else {
+ if x.DownwardAPI == nil {
+ x.DownwardAPI = new(DownwardAPIProjection)
+ }
+ x.DownwardAPI.CodecDecodeSelf(d)
+ }
+ case "configMap":
+ if r.TryDecodeAsNil() {
+ if x.ConfigMap != nil {
+ x.ConfigMap = nil
+ }
+ } else {
+ if x.ConfigMap == nil {
+ x.ConfigMap = new(ConfigMapProjection)
+ }
+ x.ConfigMap.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *VolumeProjection) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Secret != nil {
+ x.Secret = nil
+ }
+ } else {
+ if x.Secret == nil {
+ x.Secret = new(SecretProjection)
+ }
+ x.Secret.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.DownwardAPI != nil {
+ x.DownwardAPI = nil
+ }
+ } else {
+ if x.DownwardAPI == nil {
+ x.DownwardAPI = new(DownwardAPIProjection)
+ }
+ x.DownwardAPI.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ConfigMap != nil {
+ x.ConfigMap = nil
+ }
+ } else {
+ if x.ConfigMap == nil {
+ x.ConfigMap = new(ConfigMapProjection)
+ }
+ x.ConfigMap.CodecDecodeSelf(d)
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *KeyToPath) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = x.Mode != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(3)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Key))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("key"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Key))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("path"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Mode == nil {
+ r.EncodeNil()
+ } else {
+ yy10 := *x.Mode
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(yy10))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("mode"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Mode == nil {
+ r.EncodeNil()
+ } else {
+ yy12 := *x.Mode
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(yy12))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *KeyToPath) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *KeyToPath) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "key":
+ if r.TryDecodeAsNil() {
+ x.Key = ""
+ } else {
+ yyv4 := &x.Key
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv6 := &x.Path
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "mode":
+ if r.TryDecodeAsNil() {
+ if x.Mode != nil {
+ x.Mode = nil
+ }
+ } else {
+ if x.Mode == nil {
+ x.Mode = new(int32)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(x.Mode)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *KeyToPath) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Key = ""
+ } else {
+ yyv11 := &x.Key
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv13 := &x.Path
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Mode != nil {
+ x.Mode = nil
+ }
+ } else {
+ if x.Mode == nil {
+ x.Mode = new(int32)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*int32)(x.Mode)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *LocalVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("path"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *LocalVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *LocalVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv4 := &x.Path
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *LocalVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv7 := &x.Path
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*string)(yyv7)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ContainerPort) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Name != ""
+ yyq2[1] = x.HostPort != 0
+ yyq2[3] = x.Protocol != ""
+ yyq2[4] = x.HostIP != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(x.HostPort))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostPort"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.HostPort))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ContainerPort))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("containerPort"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ContainerPort))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ x.Protocol.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("protocol"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Protocol.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.HostIP))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostIP"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.HostIP))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ContainerPort) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ContainerPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "hostPort":
+ if r.TryDecodeAsNil() {
+ x.HostPort = 0
+ } else {
+ yyv6 := &x.HostPort
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int32)(yyv6)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "containerPort":
+ if r.TryDecodeAsNil() {
+ x.ContainerPort = 0
+ } else {
+ yyv8 := &x.ContainerPort
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "protocol":
+ if r.TryDecodeAsNil() {
+ x.Protocol = ""
+ } else {
+ yyv10 := &x.Protocol
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "hostIP":
+ if r.TryDecodeAsNil() {
+ x.HostIP = ""
+ } else {
+ yyv11 := &x.HostIP
+ 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_containerMapEnd1234)
+}
+
+func (x *ContainerPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv14 := &x.Name
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostPort = 0
+ } else {
+ yyv16 := &x.HostPort
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*int32)(yyv16)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ContainerPort = 0
+ } else {
+ yyv18 := &x.ContainerPort
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*int32)(yyv18)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Protocol = ""
+ } else {
+ yyv20 := &x.Protocol
+ yyv20.CodecDecodeSelf(d)
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostIP = ""
+ } else {
+ yyv21 := &x.HostIP
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj13-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *VolumeMount) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.ReadOnly != false
+ yyq2[3] = x.SubPath != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnly"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnly))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MountPath))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("mountPath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MountPath))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SubPath))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("subPath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SubPath))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *VolumeMount) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *VolumeMount) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "readOnly":
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv6 := &x.ReadOnly
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*bool)(yyv6)) = r.DecodeBool()
+ }
+ }
+ case "mountPath":
+ if r.TryDecodeAsNil() {
+ x.MountPath = ""
+ } else {
+ yyv8 := &x.MountPath
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "subPath":
+ if r.TryDecodeAsNil() {
+ x.SubPath = ""
+ } else {
+ yyv10 := &x.SubPath
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *VolumeMount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv13 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnly = false
+ } else {
+ yyv15 := &x.ReadOnly
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*bool)(yyv15)) = r.DecodeBool()
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MountPath = ""
+ } else {
+ yyv17 := &x.MountPath
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SubPath = ""
+ } else {
+ yyv19 := &x.SubPath
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *EnvVar) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.Value != ""
+ yyq2[2] = x.ValueFrom != nil
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Value))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("value"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Value))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.ValueFrom == nil {
+ r.EncodeNil()
+ } else {
+ x.ValueFrom.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("valueFrom"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ValueFrom == nil {
+ r.EncodeNil()
+ } else {
+ x.ValueFrom.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *EnvVar) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *EnvVar) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "value":
+ if r.TryDecodeAsNil() {
+ x.Value = ""
+ } else {
+ yyv6 := &x.Value
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "valueFrom":
+ if r.TryDecodeAsNil() {
+ if x.ValueFrom != nil {
+ x.ValueFrom = nil
+ }
+ } else {
+ if x.ValueFrom == nil {
+ x.ValueFrom = new(EnvVarSource)
+ }
+ x.ValueFrom.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *EnvVar) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv10 := &x.Name
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Value = ""
+ } else {
+ yyv12 := &x.Value
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ValueFrom != nil {
+ x.ValueFrom = nil
+ }
+ } else {
+ if x.ValueFrom == nil {
+ x.ValueFrom = new(EnvVarSource)
+ }
+ x.ValueFrom.CodecDecodeSelf(d)
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *EnvVarSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.FieldRef != nil
+ yyq2[1] = x.ResourceFieldRef != nil
+ yyq2[2] = x.ConfigMapKeyRef != nil
+ yyq2[3] = x.SecretKeyRef != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.FieldRef == nil {
+ r.EncodeNil()
+ } else {
+ x.FieldRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fieldRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.FieldRef == nil {
+ r.EncodeNil()
+ } else {
+ x.FieldRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.ResourceFieldRef == nil {
+ r.EncodeNil()
+ } else {
+ x.ResourceFieldRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resourceFieldRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ResourceFieldRef == nil {
+ r.EncodeNil()
+ } else {
+ x.ResourceFieldRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.ConfigMapKeyRef == nil {
+ r.EncodeNil()
+ } else {
+ x.ConfigMapKeyRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("configMapKeyRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ConfigMapKeyRef == nil {
+ r.EncodeNil()
+ } else {
+ x.ConfigMapKeyRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.SecretKeyRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretKeyRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secretKeyRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SecretKeyRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretKeyRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *EnvVarSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *EnvVarSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "fieldRef":
+ if r.TryDecodeAsNil() {
+ if x.FieldRef != nil {
+ x.FieldRef = nil
+ }
+ } else {
+ if x.FieldRef == nil {
+ x.FieldRef = new(ObjectFieldSelector)
+ }
+ x.FieldRef.CodecDecodeSelf(d)
+ }
+ case "resourceFieldRef":
+ if r.TryDecodeAsNil() {
+ if x.ResourceFieldRef != nil {
+ x.ResourceFieldRef = nil
+ }
+ } else {
+ if x.ResourceFieldRef == nil {
+ x.ResourceFieldRef = new(ResourceFieldSelector)
+ }
+ x.ResourceFieldRef.CodecDecodeSelf(d)
+ }
+ case "configMapKeyRef":
+ if r.TryDecodeAsNil() {
+ if x.ConfigMapKeyRef != nil {
+ x.ConfigMapKeyRef = nil
+ }
+ } else {
+ if x.ConfigMapKeyRef == nil {
+ x.ConfigMapKeyRef = new(ConfigMapKeySelector)
+ }
+ x.ConfigMapKeyRef.CodecDecodeSelf(d)
+ }
+ case "secretKeyRef":
+ if r.TryDecodeAsNil() {
+ if x.SecretKeyRef != nil {
+ x.SecretKeyRef = nil
+ }
+ } else {
+ if x.SecretKeyRef == nil {
+ x.SecretKeyRef = new(SecretKeySelector)
+ }
+ x.SecretKeyRef.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *EnvVarSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FieldRef != nil {
+ x.FieldRef = nil
+ }
+ } else {
+ if x.FieldRef == nil {
+ x.FieldRef = new(ObjectFieldSelector)
+ }
+ x.FieldRef.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ResourceFieldRef != nil {
+ x.ResourceFieldRef = nil
+ }
+ } else {
+ if x.ResourceFieldRef == nil {
+ x.ResourceFieldRef = new(ResourceFieldSelector)
+ }
+ x.ResourceFieldRef.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ConfigMapKeyRef != nil {
+ x.ConfigMapKeyRef = nil
+ }
+ } else {
+ if x.ConfigMapKeyRef == nil {
+ x.ConfigMapKeyRef = new(ConfigMapKeySelector)
+ }
+ x.ConfigMapKeyRef.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SecretKeyRef != nil {
+ x.SecretKeyRef = nil
+ }
+ } else {
+ if x.SecretKeyRef == nil {
+ x.SecretKeyRef = new(SecretKeySelector)
+ }
+ x.SecretKeyRef.CodecDecodeSelf(d)
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ObjectFieldSelector) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.APIVersion != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FieldPath))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fieldPath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FieldPath))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ObjectFieldSelector) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ObjectFieldSelector) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv4 := &x.APIVersion
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "fieldPath":
+ if r.TryDecodeAsNil() {
+ x.FieldPath = ""
+ } else {
+ yyv6 := &x.FieldPath
+ 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_containerMapEnd1234)
+}
+
+func (x *ObjectFieldSelector) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv9 := &x.APIVersion
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FieldPath = ""
+ } else {
+ yyv11 := &x.FieldPath
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ResourceFieldSelector) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.ContainerName != ""
+ yyq2[2] = true
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ContainerName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("containerName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ContainerName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Resource))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resource"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Resource))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy10 := &x.Divisor
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy10) {
+ } else if !yym11 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy10)
+ } else {
+ z.EncFallback(yy10)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("divisor"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.Divisor
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ResourceFieldSelector) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ResourceFieldSelector) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "containerName":
+ if r.TryDecodeAsNil() {
+ x.ContainerName = ""
+ } else {
+ yyv4 := &x.ContainerName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "resource":
+ if r.TryDecodeAsNil() {
+ x.Resource = ""
+ } else {
+ yyv6 := &x.Resource
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "divisor":
+ if r.TryDecodeAsNil() {
+ x.Divisor = pkg3_resource.Quantity{}
+ } else {
+ yyv8 := &x.Divisor
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv8) {
+ } else if !yym9 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv8)
+ } else {
+ z.DecFallback(yyv8, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ResourceFieldSelector) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ContainerName = ""
+ } else {
+ yyv11 := &x.ContainerName
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Resource = ""
+ } else {
+ yyv13 := &x.Resource
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Divisor = pkg3_resource.Quantity{}
+ } else {
+ yyv15 := &x.Divisor
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv15) {
+ } else if !yym16 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv15)
+ } else {
+ z.DecFallback(yyv15, false)
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ConfigMapKeySelector) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Name != ""
+ yyq2[2] = x.Optional != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Key))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("key"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Key))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy10 := *x.Optional
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(yy10))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("optional"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy12 := *x.Optional
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(yy12))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ConfigMapKeySelector) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ConfigMapKeySelector) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "key":
+ if r.TryDecodeAsNil() {
+ x.Key = ""
+ } else {
+ yyv6 := &x.Key
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "optional":
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ConfigMapKeySelector) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv11 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Key = ""
+ } else {
+ yyv13 := &x.Key
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *SecretKeySelector) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Name != ""
+ yyq2[2] = x.Optional != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Key))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("key"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Key))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy10 := *x.Optional
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(yy10))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("optional"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy12 := *x.Optional
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(yy12))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SecretKeySelector) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SecretKeySelector) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "key":
+ if r.TryDecodeAsNil() {
+ x.Key = ""
+ } else {
+ yyv6 := &x.Key
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "optional":
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SecretKeySelector) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv11 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Key = ""
+ } else {
+ yyv13 := &x.Key
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *EnvFromSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Prefix != ""
+ yyq2[1] = x.ConfigMapRef != nil
+ yyq2[2] = x.SecretRef != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Prefix))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("prefix"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Prefix))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.ConfigMapRef == nil {
+ r.EncodeNil()
+ } else {
+ x.ConfigMapRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("configMapRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ConfigMapRef == nil {
+ r.EncodeNil()
+ } else {
+ x.ConfigMapRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secretRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SecretRef == nil {
+ r.EncodeNil()
+ } else {
+ x.SecretRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *EnvFromSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *EnvFromSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "prefix":
+ if r.TryDecodeAsNil() {
+ x.Prefix = ""
+ } else {
+ yyv4 := &x.Prefix
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "configMapRef":
+ if r.TryDecodeAsNil() {
+ if x.ConfigMapRef != nil {
+ x.ConfigMapRef = nil
+ }
+ } else {
+ if x.ConfigMapRef == nil {
+ x.ConfigMapRef = new(ConfigMapEnvSource)
+ }
+ x.ConfigMapRef.CodecDecodeSelf(d)
+ }
+ case "secretRef":
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(SecretEnvSource)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *EnvFromSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Prefix = ""
+ } else {
+ yyv9 := &x.Prefix
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ConfigMapRef != nil {
+ x.ConfigMapRef = nil
+ }
+ } else {
+ if x.ConfigMapRef == nil {
+ x.ConfigMapRef = new(ConfigMapEnvSource)
+ }
+ x.ConfigMapRef.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SecretRef != nil {
+ x.SecretRef = nil
+ }
+ } else {
+ if x.SecretRef == nil {
+ x.SecretRef = new(SecretEnvSource)
+ }
+ x.SecretRef.CodecDecodeSelf(d)
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ConfigMapEnvSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Name != ""
+ yyq2[1] = x.Optional != 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy7 := *x.Optional
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeBool(bool(yy7))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("optional"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.Optional
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(yy9))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ConfigMapEnvSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ConfigMapEnvSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "optional":
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ConfigMapEnvSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv9 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *SecretEnvSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Name != ""
+ yyq2[1] = x.Optional != 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy7 := *x.Optional
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeBool(bool(yy7))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("optional"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Optional == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.Optional
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(yy9))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SecretEnvSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SecretEnvSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "optional":
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SecretEnvSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv9 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Optional != nil {
+ x.Optional = nil
+ }
+ } else {
+ if x.Optional == nil {
+ x.Optional = new(bool)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*bool)(x.Optional)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *HTTPHeader) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Value))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("value"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Value))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HTTPHeader) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HTTPHeader) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "value":
+ if r.TryDecodeAsNil() {
+ x.Value = ""
+ } else {
+ yyv6 := &x.Value
+ 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_containerMapEnd1234)
+}
+
+func (x *HTTPHeader) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv9 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Value = ""
+ } else {
+ yyv11 := &x.Value
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *HTTPGetAction) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Path != ""
+ yyq2[2] = x.Host != ""
+ yyq2[3] = x.Scheme != ""
+ yyq2[4] = len(x.HTTPHeaders) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("path"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy7 := &x.Port
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy7)
+ } else {
+ z.EncFallback(yy7)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("port"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.Port
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy9) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy9)
+ } else {
+ z.EncFallback(yy9)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Host))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("host"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Host))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ x.Scheme.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("scheme"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Scheme.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.HTTPHeaders == nil {
+ r.EncodeNil()
+ } else {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ h.encSliceHTTPHeader(([]HTTPHeader)(x.HTTPHeaders), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("httpHeaders"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.HTTPHeaders == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ h.encSliceHTTPHeader(([]HTTPHeader)(x.HTTPHeaders), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HTTPGetAction) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HTTPGetAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv4 := &x.Path
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "port":
+ if r.TryDecodeAsNil() {
+ x.Port = pkg4_intstr.IntOrString{}
+ } else {
+ yyv6 := &x.Port
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ case "host":
+ if r.TryDecodeAsNil() {
+ x.Host = ""
+ } else {
+ yyv8 := &x.Host
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "scheme":
+ if r.TryDecodeAsNil() {
+ x.Scheme = ""
+ } else {
+ yyv10 := &x.Scheme
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "httpHeaders":
+ if r.TryDecodeAsNil() {
+ x.HTTPHeaders = nil
+ } else {
+ yyv11 := &x.HTTPHeaders
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceHTTPHeader((*[]HTTPHeader)(yyv11), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HTTPGetAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv14 := &x.Path
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Port = pkg4_intstr.IntOrString{}
+ } else {
+ yyv16 := &x.Port
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv16) {
+ } else if !yym17 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv16)
+ } else {
+ z.DecFallback(yyv16, false)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Host = ""
+ } else {
+ yyv18 := &x.Host
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*string)(yyv18)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Scheme = ""
+ } else {
+ yyv20 := &x.Scheme
+ yyv20.CodecDecodeSelf(d)
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HTTPHeaders = nil
+ } else {
+ yyv21 := &x.HTTPHeaders
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ h.decSliceHTTPHeader((*[]HTTPHeader)(yyv21), d)
+ }
+ }
+ for {
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj13-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x URIScheme) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *URIScheme) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *TCPSocketAction) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Host != ""
+ 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_containerArrayElem1234)
+ yy4 := &x.Port
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy4) {
+ } else if !yym5 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy4)
+ } else {
+ z.EncFallback(yy4)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("port"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.Port
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy6) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy6)
+ } else {
+ z.EncFallback(yy6)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Host))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("host"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Host))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *TCPSocketAction) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *TCPSocketAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "port":
+ if r.TryDecodeAsNil() {
+ x.Port = pkg4_intstr.IntOrString{}
+ } else {
+ yyv4 := &x.Port
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else if !yym5 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv4)
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "host":
+ if r.TryDecodeAsNil() {
+ x.Host = ""
+ } else {
+ yyv6 := &x.Host
+ 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_containerMapEnd1234)
+}
+
+func (x *TCPSocketAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Port = pkg4_intstr.IntOrString{}
+ } else {
+ yyv9 := &x.Port
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv9) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv9)
+ } else {
+ z.DecFallback(yyv9, false)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Host = ""
+ } else {
+ yyv11 := &x.Host
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ExecAction) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = len(x.Command) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Command == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Command, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("command"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Command == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Command, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ExecAction) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ExecAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "command":
+ if r.TryDecodeAsNil() {
+ x.Command = nil
+ } else {
+ yyv4 := &x.Command
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv4, false, d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ExecAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Command = nil
+ } else {
+ yyv7 := &x.Command
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv7, false, d)
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Probe) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Handler.Exec != nil && x.Exec != nil
+ yyq2[1] = x.Handler.HTTPGet != nil && x.HTTPGet != nil
+ yyq2[2] = x.Handler.TCPSocket != nil && x.TCPSocket != nil
+ yyq2[3] = x.InitialDelaySeconds != 0
+ yyq2[4] = x.TimeoutSeconds != 0
+ yyq2[5] = x.PeriodSeconds != 0
+ yyq2[6] = x.SuccessThreshold != 0
+ yyq2[7] = x.FailureThreshold != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(8)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ var yyn3 bool
+ if x.Handler.Exec == nil {
+ yyn3 = true
+ goto LABEL3
+ }
+ LABEL3:
+ if yyr2 || yy2arr2 {
+ if yyn3 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Exec == nil {
+ r.EncodeNil()
+ } else {
+ x.Exec.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("exec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn3 {
+ r.EncodeNil()
+ } else {
+ if x.Exec == nil {
+ r.EncodeNil()
+ } else {
+ x.Exec.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn6 bool
+ if x.Handler.HTTPGet == nil {
+ yyn6 = true
+ goto LABEL6
+ }
+ LABEL6:
+ if yyr2 || yy2arr2 {
+ if yyn6 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.HTTPGet == nil {
+ r.EncodeNil()
+ } else {
+ x.HTTPGet.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("httpGet"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn6 {
+ r.EncodeNil()
+ } else {
+ if x.HTTPGet == nil {
+ r.EncodeNil()
+ } else {
+ x.HTTPGet.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ var yyn9 bool
+ if x.Handler.TCPSocket == nil {
+ yyn9 = true
+ goto LABEL9
+ }
+ LABEL9:
+ if yyr2 || yy2arr2 {
+ if yyn9 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.TCPSocket == nil {
+ r.EncodeNil()
+ } else {
+ x.TCPSocket.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("tcpSocket"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn9 {
+ r.EncodeNil()
+ } else {
+ if x.TCPSocket == nil {
+ r.EncodeNil()
+ } else {
+ x.TCPSocket.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.InitialDelaySeconds))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("initialDelaySeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(x.InitialDelaySeconds))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(x.TimeoutSeconds))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("timeoutSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(x.TimeoutSeconds))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeInt(int64(x.PeriodSeconds))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("periodSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeInt(int64(x.PeriodSeconds))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeInt(int64(x.SuccessThreshold))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("successThreshold"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeInt(int64(x.SuccessThreshold))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeInt(int64(x.FailureThreshold))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("failureThreshold"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeInt(int64(x.FailureThreshold))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Probe) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Probe) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "exec":
+ if x.Handler.Exec == nil {
+ x.Handler.Exec = new(ExecAction)
+ }
+ if r.TryDecodeAsNil() {
+ if x.Exec != nil {
+ x.Exec = nil
+ }
+ } else {
+ if x.Exec == nil {
+ x.Exec = new(ExecAction)
+ }
+ x.Exec.CodecDecodeSelf(d)
+ }
+ case "httpGet":
+ if x.Handler.HTTPGet == nil {
+ x.Handler.HTTPGet = new(HTTPGetAction)
+ }
+ if r.TryDecodeAsNil() {
+ if x.HTTPGet != nil {
+ x.HTTPGet = nil
+ }
+ } else {
+ if x.HTTPGet == nil {
+ x.HTTPGet = new(HTTPGetAction)
+ }
+ x.HTTPGet.CodecDecodeSelf(d)
+ }
+ case "tcpSocket":
+ if x.Handler.TCPSocket == nil {
+ x.Handler.TCPSocket = new(TCPSocketAction)
+ }
+ if r.TryDecodeAsNil() {
+ if x.TCPSocket != nil {
+ x.TCPSocket = nil
+ }
+ } else {
+ if x.TCPSocket == nil {
+ x.TCPSocket = new(TCPSocketAction)
+ }
+ x.TCPSocket.CodecDecodeSelf(d)
+ }
+ case "initialDelaySeconds":
+ if r.TryDecodeAsNil() {
+ x.InitialDelaySeconds = 0
+ } else {
+ yyv7 := &x.InitialDelaySeconds
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*int32)(yyv7)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "timeoutSeconds":
+ if r.TryDecodeAsNil() {
+ x.TimeoutSeconds = 0
+ } else {
+ yyv9 := &x.TimeoutSeconds
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ *((*int32)(yyv9)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "periodSeconds":
+ if r.TryDecodeAsNil() {
+ x.PeriodSeconds = 0
+ } else {
+ yyv11 := &x.PeriodSeconds
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int32)(yyv11)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "successThreshold":
+ if r.TryDecodeAsNil() {
+ x.SuccessThreshold = 0
+ } else {
+ yyv13 := &x.SuccessThreshold
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ *((*int32)(yyv13)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "failureThreshold":
+ if r.TryDecodeAsNil() {
+ x.FailureThreshold = 0
+ } else {
+ yyv15 := &x.FailureThreshold
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*int32)(yyv15)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Probe) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj17 int
+ var yyb17 bool
+ var yyhl17 bool = l >= 0
+ if x.Handler.Exec == nil {
+ x.Handler.Exec = new(ExecAction)
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Exec != nil {
+ x.Exec = nil
+ }
+ } else {
+ if x.Exec == nil {
+ x.Exec = new(ExecAction)
+ }
+ x.Exec.CodecDecodeSelf(d)
+ }
+ if x.Handler.HTTPGet == nil {
+ x.Handler.HTTPGet = new(HTTPGetAction)
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.HTTPGet != nil {
+ x.HTTPGet = nil
+ }
+ } else {
+ if x.HTTPGet == nil {
+ x.HTTPGet = new(HTTPGetAction)
+ }
+ x.HTTPGet.CodecDecodeSelf(d)
+ }
+ if x.Handler.TCPSocket == nil {
+ x.Handler.TCPSocket = new(TCPSocketAction)
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.TCPSocket != nil {
+ x.TCPSocket = nil
+ }
+ } else {
+ if x.TCPSocket == nil {
+ x.TCPSocket = new(TCPSocketAction)
+ }
+ x.TCPSocket.CodecDecodeSelf(d)
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.InitialDelaySeconds = 0
+ } else {
+ yyv21 := &x.InitialDelaySeconds
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int32)(yyv21)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TimeoutSeconds = 0
+ } else {
+ yyv23 := &x.TimeoutSeconds
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*int32)(yyv23)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PeriodSeconds = 0
+ } else {
+ yyv25 := &x.PeriodSeconds
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*int32)(yyv25)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SuccessThreshold = 0
+ } else {
+ yyv27 := &x.SuccessThreshold
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*int32)(yyv27)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FailureThreshold = 0
+ } else {
+ yyv29 := &x.FailureThreshold
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*int32)(yyv29)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj17-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x PullPolicy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *PullPolicy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 TerminationMessagePolicy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *TerminationMessagePolicy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 Capability) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *Capability) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *Capabilities) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Add) != 0
+ yyq2[1] = len(x.Drop) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Add == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceCapability(([]Capability)(x.Add), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("add"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Add == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceCapability(([]Capability)(x.Add), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Drop == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceCapability(([]Capability)(x.Drop), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("drop"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Drop == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceCapability(([]Capability)(x.Drop), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Capabilities) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Capabilities) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "add":
+ if r.TryDecodeAsNil() {
+ x.Add = nil
+ } else {
+ yyv4 := &x.Add
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceCapability((*[]Capability)(yyv4), d)
+ }
+ }
+ case "drop":
+ if r.TryDecodeAsNil() {
+ x.Drop = nil
+ } else {
+ yyv6 := &x.Drop
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceCapability((*[]Capability)(yyv6), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Capabilities) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Add = nil
+ } else {
+ yyv9 := &x.Add
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceCapability((*[]Capability)(yyv9), d)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Drop = nil
+ } else {
+ yyv11 := &x.Drop
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceCapability((*[]Capability)(yyv11), d)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ResourceRequirements) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Limits) != 0
+ yyq2[1] = len(x.Requests) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Limits == nil {
+ r.EncodeNil()
+ } else {
+ x.Limits.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("limits"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Limits == nil {
+ r.EncodeNil()
+ } else {
+ x.Limits.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Requests == nil {
+ r.EncodeNil()
+ } else {
+ x.Requests.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("requests"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Requests == nil {
+ r.EncodeNil()
+ } else {
+ x.Requests.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ResourceRequirements) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ResourceRequirements) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "limits":
+ if r.TryDecodeAsNil() {
+ x.Limits = nil
+ } else {
+ yyv4 := &x.Limits
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "requests":
+ if r.TryDecodeAsNil() {
+ x.Requests = nil
+ } else {
+ yyv5 := &x.Requests
+ yyv5.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ResourceRequirements) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Limits = nil
+ } else {
+ yyv7 := &x.Limits
+ yyv7.CodecDecodeSelf(d)
+ }
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Requests = nil
+ } else {
+ yyv8 := &x.Requests
+ yyv8.CodecDecodeSelf(d)
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [20]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[2] = len(x.Command) != 0
+ yyq2[3] = len(x.Args) != 0
+ yyq2[4] = x.WorkingDir != ""
+ yyq2[5] = len(x.Ports) != 0
+ yyq2[6] = len(x.EnvFrom) != 0
+ yyq2[7] = len(x.Env) != 0
+ yyq2[8] = true
+ yyq2[9] = len(x.VolumeMounts) != 0
+ yyq2[10] = x.LivenessProbe != nil
+ yyq2[11] = x.ReadinessProbe != nil
+ yyq2[12] = x.Lifecycle != nil
+ yyq2[13] = x.TerminationMessagePath != ""
+ yyq2[14] = x.TerminationMessagePolicy != ""
+ yyq2[15] = x.ImagePullPolicy != ""
+ yyq2[16] = x.SecurityContext != nil
+ yyq2[17] = x.Stdin != false
+ yyq2[18] = x.StdinOnce != false
+ yyq2[19] = x.TTY != false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(20)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Image))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("image"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Image))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Command == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Command, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("command"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Command == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Command, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Args == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Args, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("args"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Args == nil {
+ r.EncodeNil()
+ } else {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Args, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.WorkingDir))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("workingDir"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.WorkingDir))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.Ports == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ h.encSliceContainerPort(([]ContainerPort)(x.Ports), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ports"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Ports == nil {
+ r.EncodeNil()
+ } else {
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.encSliceContainerPort(([]ContainerPort)(x.Ports), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.EnvFrom == nil {
+ r.EncodeNil()
+ } else {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ h.encSliceEnvFromSource(([]EnvFromSource)(x.EnvFrom), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("envFrom"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.EnvFrom == nil {
+ r.EncodeNil()
+ } else {
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ h.encSliceEnvFromSource(([]EnvFromSource)(x.EnvFrom), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.Env == nil {
+ r.EncodeNil()
+ } else {
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ h.encSliceEnvVar(([]EnvVar)(x.Env), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("env"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Env == nil {
+ r.EncodeNil()
+ } else {
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ h.encSliceEnvVar(([]EnvVar)(x.Env), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ yy28 := &x.Resources
+ yy28.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resources"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy30 := &x.Resources
+ yy30.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ if x.VolumeMounts == nil {
+ r.EncodeNil()
+ } else {
+ yym33 := z.EncBinary()
+ _ = yym33
+ if false {
+ } else {
+ h.encSliceVolumeMount(([]VolumeMount)(x.VolumeMounts), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumeMounts"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.VolumeMounts == nil {
+ r.EncodeNil()
+ } else {
+ yym34 := z.EncBinary()
+ _ = yym34
+ if false {
+ } else {
+ h.encSliceVolumeMount(([]VolumeMount)(x.VolumeMounts), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[10] {
+ if x.LivenessProbe == nil {
+ r.EncodeNil()
+ } else {
+ x.LivenessProbe.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[10] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("livenessProbe"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.LivenessProbe == nil {
+ r.EncodeNil()
+ } else {
+ x.LivenessProbe.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[11] {
+ if x.ReadinessProbe == nil {
+ r.EncodeNil()
+ } else {
+ x.ReadinessProbe.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[11] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readinessProbe"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ReadinessProbe == nil {
+ r.EncodeNil()
+ } else {
+ x.ReadinessProbe.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[12] {
+ if x.Lifecycle == nil {
+ r.EncodeNil()
+ } else {
+ x.Lifecycle.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[12] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lifecycle"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Lifecycle == nil {
+ r.EncodeNil()
+ } else {
+ x.Lifecycle.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[13] {
+ yym45 := z.EncBinary()
+ _ = yym45
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.TerminationMessagePath))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[13] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("terminationMessagePath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym46 := z.EncBinary()
+ _ = yym46
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.TerminationMessagePath))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[14] {
+ x.TerminationMessagePolicy.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[14] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("terminationMessagePolicy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.TerminationMessagePolicy.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[15] {
+ x.ImagePullPolicy.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[15] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("imagePullPolicy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.ImagePullPolicy.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[16] {
+ if x.SecurityContext == nil {
+ r.EncodeNil()
+ } else {
+ x.SecurityContext.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[16] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("securityContext"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SecurityContext == nil {
+ r.EncodeNil()
+ } else {
+ x.SecurityContext.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[17] {
+ yym57 := z.EncBinary()
+ _ = yym57
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdin))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[17] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stdin"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym58 := z.EncBinary()
+ _ = yym58
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdin))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[18] {
+ yym60 := z.EncBinary()
+ _ = yym60
+ if false {
+ } else {
+ r.EncodeBool(bool(x.StdinOnce))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[18] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stdinOnce"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym61 := z.EncBinary()
+ _ = yym61
+ if false {
+ } else {
+ r.EncodeBool(bool(x.StdinOnce))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[19] {
+ yym63 := z.EncBinary()
+ _ = yym63
+ if false {
+ } else {
+ r.EncodeBool(bool(x.TTY))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[19] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("tty"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym64 := z.EncBinary()
+ _ = yym64
+ if false {
+ } else {
+ r.EncodeBool(bool(x.TTY))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Container) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Container) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "image":
+ if r.TryDecodeAsNil() {
+ x.Image = ""
+ } else {
+ yyv6 := &x.Image
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "command":
+ if r.TryDecodeAsNil() {
+ x.Command = nil
+ } else {
+ yyv8 := &x.Command
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv8, false, d)
+ }
+ }
+ case "args":
+ if r.TryDecodeAsNil() {
+ x.Args = nil
+ } else {
+ yyv10 := &x.Args
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv10, false, d)
+ }
+ }
+ case "workingDir":
+ if r.TryDecodeAsNil() {
+ x.WorkingDir = ""
+ } else {
+ yyv12 := &x.WorkingDir
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ case "ports":
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv14 := &x.Ports
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.decSliceContainerPort((*[]ContainerPort)(yyv14), d)
+ }
+ }
+ case "envFrom":
+ if r.TryDecodeAsNil() {
+ x.EnvFrom = nil
+ } else {
+ yyv16 := &x.EnvFrom
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ h.decSliceEnvFromSource((*[]EnvFromSource)(yyv16), d)
+ }
+ }
+ case "env":
+ if r.TryDecodeAsNil() {
+ x.Env = nil
+ } else {
+ yyv18 := &x.Env
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ h.decSliceEnvVar((*[]EnvVar)(yyv18), d)
+ }
+ }
+ case "resources":
+ if r.TryDecodeAsNil() {
+ x.Resources = ResourceRequirements{}
+ } else {
+ yyv20 := &x.Resources
+ yyv20.CodecDecodeSelf(d)
+ }
+ case "volumeMounts":
+ if r.TryDecodeAsNil() {
+ x.VolumeMounts = nil
+ } else {
+ yyv21 := &x.VolumeMounts
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ h.decSliceVolumeMount((*[]VolumeMount)(yyv21), d)
+ }
+ }
+ case "livenessProbe":
+ if r.TryDecodeAsNil() {
+ if x.LivenessProbe != nil {
+ x.LivenessProbe = nil
+ }
+ } else {
+ if x.LivenessProbe == nil {
+ x.LivenessProbe = new(Probe)
+ }
+ x.LivenessProbe.CodecDecodeSelf(d)
+ }
+ case "readinessProbe":
+ if r.TryDecodeAsNil() {
+ if x.ReadinessProbe != nil {
+ x.ReadinessProbe = nil
+ }
+ } else {
+ if x.ReadinessProbe == nil {
+ x.ReadinessProbe = new(Probe)
+ }
+ x.ReadinessProbe.CodecDecodeSelf(d)
+ }
+ case "lifecycle":
+ if r.TryDecodeAsNil() {
+ if x.Lifecycle != nil {
+ x.Lifecycle = nil
+ }
+ } else {
+ if x.Lifecycle == nil {
+ x.Lifecycle = new(Lifecycle)
+ }
+ x.Lifecycle.CodecDecodeSelf(d)
+ }
+ case "terminationMessagePath":
+ if r.TryDecodeAsNil() {
+ x.TerminationMessagePath = ""
+ } else {
+ yyv26 := &x.TerminationMessagePath
+ yym27 := z.DecBinary()
+ _ = yym27
+ if false {
+ } else {
+ *((*string)(yyv26)) = r.DecodeString()
+ }
+ }
+ case "terminationMessagePolicy":
+ if r.TryDecodeAsNil() {
+ x.TerminationMessagePolicy = ""
+ } else {
+ yyv28 := &x.TerminationMessagePolicy
+ yyv28.CodecDecodeSelf(d)
+ }
+ case "imagePullPolicy":
+ if r.TryDecodeAsNil() {
+ x.ImagePullPolicy = ""
+ } else {
+ yyv29 := &x.ImagePullPolicy
+ yyv29.CodecDecodeSelf(d)
+ }
+ case "securityContext":
+ if r.TryDecodeAsNil() {
+ if x.SecurityContext != nil {
+ x.SecurityContext = nil
+ }
+ } else {
+ if x.SecurityContext == nil {
+ x.SecurityContext = new(SecurityContext)
+ }
+ x.SecurityContext.CodecDecodeSelf(d)
+ }
+ case "stdin":
+ if r.TryDecodeAsNil() {
+ x.Stdin = false
+ } else {
+ yyv31 := &x.Stdin
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*bool)(yyv31)) = r.DecodeBool()
+ }
+ }
+ case "stdinOnce":
+ if r.TryDecodeAsNil() {
+ x.StdinOnce = false
+ } else {
+ yyv33 := &x.StdinOnce
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ *((*bool)(yyv33)) = r.DecodeBool()
+ }
+ }
+ case "tty":
+ if r.TryDecodeAsNil() {
+ x.TTY = false
+ } else {
+ yyv35 := &x.TTY
+ yym36 := z.DecBinary()
+ _ = yym36
+ if false {
+ } else {
+ *((*bool)(yyv35)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj37 int
+ var yyb37 bool
+ var yyhl37 bool = l >= 0
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv38 := &x.Name
+ yym39 := z.DecBinary()
+ _ = yym39
+ if false {
+ } else {
+ *((*string)(yyv38)) = r.DecodeString()
+ }
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Image = ""
+ } else {
+ yyv40 := &x.Image
+ yym41 := z.DecBinary()
+ _ = yym41
+ if false {
+ } else {
+ *((*string)(yyv40)) = r.DecodeString()
+ }
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Command = nil
+ } else {
+ yyv42 := &x.Command
+ yym43 := z.DecBinary()
+ _ = yym43
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv42, false, d)
+ }
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Args = nil
+ } else {
+ yyv44 := &x.Args
+ yym45 := z.DecBinary()
+ _ = yym45
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv44, false, d)
+ }
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.WorkingDir = ""
+ } else {
+ yyv46 := &x.WorkingDir
+ yym47 := z.DecBinary()
+ _ = yym47
+ if false {
+ } else {
+ *((*string)(yyv46)) = r.DecodeString()
+ }
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv48 := &x.Ports
+ yym49 := z.DecBinary()
+ _ = yym49
+ if false {
+ } else {
+ h.decSliceContainerPort((*[]ContainerPort)(yyv48), d)
+ }
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.EnvFrom = nil
+ } else {
+ yyv50 := &x.EnvFrom
+ yym51 := z.DecBinary()
+ _ = yym51
+ if false {
+ } else {
+ h.decSliceEnvFromSource((*[]EnvFromSource)(yyv50), d)
+ }
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Env = nil
+ } else {
+ yyv52 := &x.Env
+ yym53 := z.DecBinary()
+ _ = yym53
+ if false {
+ } else {
+ h.decSliceEnvVar((*[]EnvVar)(yyv52), d)
+ }
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Resources = ResourceRequirements{}
+ } else {
+ yyv54 := &x.Resources
+ yyv54.CodecDecodeSelf(d)
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumeMounts = nil
+ } else {
+ yyv55 := &x.VolumeMounts
+ yym56 := z.DecBinary()
+ _ = yym56
+ if false {
+ } else {
+ h.decSliceVolumeMount((*[]VolumeMount)(yyv55), d)
+ }
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.LivenessProbe != nil {
+ x.LivenessProbe = nil
+ }
+ } else {
+ if x.LivenessProbe == nil {
+ x.LivenessProbe = new(Probe)
+ }
+ x.LivenessProbe.CodecDecodeSelf(d)
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ReadinessProbe != nil {
+ x.ReadinessProbe = nil
+ }
+ } else {
+ if x.ReadinessProbe == nil {
+ x.ReadinessProbe = new(Probe)
+ }
+ x.ReadinessProbe.CodecDecodeSelf(d)
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Lifecycle != nil {
+ x.Lifecycle = nil
+ }
+ } else {
+ if x.Lifecycle == nil {
+ x.Lifecycle = new(Lifecycle)
+ }
+ x.Lifecycle.CodecDecodeSelf(d)
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TerminationMessagePath = ""
+ } else {
+ yyv60 := &x.TerminationMessagePath
+ yym61 := z.DecBinary()
+ _ = yym61
+ if false {
+ } else {
+ *((*string)(yyv60)) = r.DecodeString()
+ }
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TerminationMessagePolicy = ""
+ } else {
+ yyv62 := &x.TerminationMessagePolicy
+ yyv62.CodecDecodeSelf(d)
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ImagePullPolicy = ""
+ } else {
+ yyv63 := &x.ImagePullPolicy
+ yyv63.CodecDecodeSelf(d)
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SecurityContext != nil {
+ x.SecurityContext = nil
+ }
+ } else {
+ if x.SecurityContext == nil {
+ x.SecurityContext = new(SecurityContext)
+ }
+ x.SecurityContext.CodecDecodeSelf(d)
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Stdin = false
+ } else {
+ yyv65 := &x.Stdin
+ yym66 := z.DecBinary()
+ _ = yym66
+ if false {
+ } else {
+ *((*bool)(yyv65)) = r.DecodeBool()
+ }
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.StdinOnce = false
+ } else {
+ yyv67 := &x.StdinOnce
+ yym68 := z.DecBinary()
+ _ = yym68
+ if false {
+ } else {
+ *((*bool)(yyv67)) = r.DecodeBool()
+ }
+ }
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TTY = false
+ } else {
+ yyv69 := &x.TTY
+ yym70 := z.DecBinary()
+ _ = yym70
+ if false {
+ } else {
+ *((*bool)(yyv69)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj37++
+ if yyhl37 {
+ yyb37 = yyj37 > l
+ } else {
+ yyb37 = r.CheckBreak()
+ }
+ if yyb37 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj37-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Handler) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Exec != nil
+ yyq2[1] = x.HTTPGet != nil
+ yyq2[2] = x.TCPSocket != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Exec == nil {
+ r.EncodeNil()
+ } else {
+ x.Exec.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("exec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Exec == nil {
+ r.EncodeNil()
+ } else {
+ x.Exec.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.HTTPGet == nil {
+ r.EncodeNil()
+ } else {
+ x.HTTPGet.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("httpGet"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.HTTPGet == nil {
+ r.EncodeNil()
+ } else {
+ x.HTTPGet.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.TCPSocket == nil {
+ r.EncodeNil()
+ } else {
+ x.TCPSocket.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("tcpSocket"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TCPSocket == nil {
+ r.EncodeNil()
+ } else {
+ x.TCPSocket.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Handler) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Handler) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "exec":
+ if r.TryDecodeAsNil() {
+ if x.Exec != nil {
+ x.Exec = nil
+ }
+ } else {
+ if x.Exec == nil {
+ x.Exec = new(ExecAction)
+ }
+ x.Exec.CodecDecodeSelf(d)
+ }
+ case "httpGet":
+ if r.TryDecodeAsNil() {
+ if x.HTTPGet != nil {
+ x.HTTPGet = nil
+ }
+ } else {
+ if x.HTTPGet == nil {
+ x.HTTPGet = new(HTTPGetAction)
+ }
+ x.HTTPGet.CodecDecodeSelf(d)
+ }
+ case "tcpSocket":
+ if r.TryDecodeAsNil() {
+ if x.TCPSocket != nil {
+ x.TCPSocket = nil
+ }
+ } else {
+ if x.TCPSocket == nil {
+ x.TCPSocket = new(TCPSocketAction)
+ }
+ x.TCPSocket.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Handler) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Exec != nil {
+ x.Exec = nil
+ }
+ } else {
+ if x.Exec == nil {
+ x.Exec = new(ExecAction)
+ }
+ x.Exec.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.HTTPGet != nil {
+ x.HTTPGet = nil
+ }
+ } else {
+ if x.HTTPGet == nil {
+ x.HTTPGet = new(HTTPGetAction)
+ }
+ x.HTTPGet.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.TCPSocket != nil {
+ x.TCPSocket = nil
+ }
+ } else {
+ if x.TCPSocket == nil {
+ x.TCPSocket = new(TCPSocketAction)
+ }
+ x.TCPSocket.CodecDecodeSelf(d)
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Lifecycle) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.PostStart != nil
+ yyq2[1] = x.PreStop != 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.PostStart == nil {
+ r.EncodeNil()
+ } else {
+ x.PostStart.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("postStart"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PostStart == nil {
+ r.EncodeNil()
+ } else {
+ x.PostStart.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.PreStop == nil {
+ r.EncodeNil()
+ } else {
+ x.PreStop.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("preStop"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PreStop == nil {
+ r.EncodeNil()
+ } else {
+ x.PreStop.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Lifecycle) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Lifecycle) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "postStart":
+ if r.TryDecodeAsNil() {
+ if x.PostStart != nil {
+ x.PostStart = nil
+ }
+ } else {
+ if x.PostStart == nil {
+ x.PostStart = new(Handler)
+ }
+ x.PostStart.CodecDecodeSelf(d)
+ }
+ case "preStop":
+ if r.TryDecodeAsNil() {
+ if x.PreStop != nil {
+ x.PreStop = nil
+ }
+ } else {
+ if x.PreStop == nil {
+ x.PreStop = new(Handler)
+ }
+ x.PreStop.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Lifecycle) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PostStart != nil {
+ x.PostStart = nil
+ }
+ } else {
+ if x.PostStart == nil {
+ x.PostStart = new(Handler)
+ }
+ x.PostStart.CodecDecodeSelf(d)
+ }
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PreStop != nil {
+ x.PreStop = nil
+ }
+ } else {
+ if x.PreStop == nil {
+ x.PreStop = new(Handler)
+ }
+ x.PreStop.CodecDecodeSelf(d)
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x ConditionStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *ConditionStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *ContainerStateWaiting) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Reason != ""
+ yyq2[1] = x.Message != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ContainerStateWaiting) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ContainerStateWaiting) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv4 := &x.Reason
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv6 := &x.Message
+ 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_containerMapEnd1234)
+}
+
+func (x *ContainerStateWaiting) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv9 := &x.Reason
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv11 := &x.Message
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ContainerStateRunning) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = true
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yy4 := &x.StartedAt
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy4) {
+ } else if yym5 {
+ z.EncBinaryMarshal(yy4)
+ } else if !yym5 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy4)
+ } else {
+ z.EncFallback(yy4)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("startedAt"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.StartedAt
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy6) {
+ } else if yym7 {
+ z.EncBinaryMarshal(yy6)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy6)
+ } else {
+ z.EncFallback(yy6)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ContainerStateRunning) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ContainerStateRunning) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "startedAt":
+ if r.TryDecodeAsNil() {
+ x.StartedAt = pkg2_v1.Time{}
+ } else {
+ yyv4 := &x.StartedAt
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else if yym5 {
+ z.DecBinaryUnmarshal(yyv4)
+ } else if !yym5 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv4)
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ContainerStateRunning) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.StartedAt = pkg2_v1.Time{}
+ } else {
+ yyv7 := &x.StartedAt
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv7) {
+ } else if yym8 {
+ z.DecBinaryUnmarshal(yyv7)
+ } else if !yym8 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv7)
+ } else {
+ z.DecFallback(yyv7, false)
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ContainerStateTerminated) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [7]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[1] = x.Signal != 0
+ yyq2[2] = x.Reason != ""
+ yyq2[3] = x.Message != ""
+ yyq2[4] = true
+ yyq2[5] = true
+ yyq2[6] = x.ContainerID != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(7)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ExitCode))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("exitCode"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ExitCode))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Signal))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("signal"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Signal))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy16 := &x.StartedAt
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy16) {
+ } else if yym17 {
+ z.EncBinaryMarshal(yy16)
+ } else if !yym17 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy16)
+ } else {
+ z.EncFallback(yy16)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("startedAt"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy18 := &x.StartedAt
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy18) {
+ } else if yym19 {
+ z.EncBinaryMarshal(yy18)
+ } else if !yym19 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy18)
+ } else {
+ z.EncFallback(yy18)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yy21 := &x.FinishedAt
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy21) {
+ } else if yym22 {
+ z.EncBinaryMarshal(yy21)
+ } else if !yym22 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy21)
+ } else {
+ z.EncFallback(yy21)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("finishedAt"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy23 := &x.FinishedAt
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy23) {
+ } else if yym24 {
+ z.EncBinaryMarshal(yy23)
+ } else if !yym24 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy23)
+ } else {
+ z.EncFallback(yy23)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ContainerID))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("containerID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym27 := z.EncBinary()
+ _ = yym27
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ContainerID))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ContainerStateTerminated) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ContainerStateTerminated) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "exitCode":
+ if r.TryDecodeAsNil() {
+ x.ExitCode = 0
+ } else {
+ yyv4 := &x.ExitCode
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(yyv4)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "signal":
+ if r.TryDecodeAsNil() {
+ x.Signal = 0
+ } else {
+ yyv6 := &x.Signal
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int32)(yyv6)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv8 := &x.Reason
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv10 := &x.Message
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "startedAt":
+ if r.TryDecodeAsNil() {
+ x.StartedAt = pkg2_v1.Time{}
+ } else {
+ yyv12 := &x.StartedAt
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv12) {
+ } else if yym13 {
+ z.DecBinaryUnmarshal(yyv12)
+ } else if !yym13 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv12)
+ } else {
+ z.DecFallback(yyv12, false)
+ }
+ }
+ case "finishedAt":
+ if r.TryDecodeAsNil() {
+ x.FinishedAt = pkg2_v1.Time{}
+ } else {
+ yyv14 := &x.FinishedAt
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv14) {
+ } else if yym15 {
+ z.DecBinaryUnmarshal(yyv14)
+ } else if !yym15 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv14)
+ } else {
+ z.DecFallback(yyv14, false)
+ }
+ }
+ case "containerID":
+ if r.TryDecodeAsNil() {
+ x.ContainerID = ""
+ } else {
+ yyv16 := &x.ContainerID
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ContainerStateTerminated) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj18 int
+ var yyb18 bool
+ var yyhl18 bool = l >= 0
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ExitCode = 0
+ } else {
+ yyv19 := &x.ExitCode
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*int32)(yyv19)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Signal = 0
+ } else {
+ yyv21 := &x.Signal
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int32)(yyv21)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv23 := &x.Reason
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*string)(yyv23)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv25 := &x.Message
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*string)(yyv25)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.StartedAt = pkg2_v1.Time{}
+ } else {
+ yyv27 := &x.StartedAt
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv27) {
+ } else if yym28 {
+ z.DecBinaryUnmarshal(yyv27)
+ } else if !yym28 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv27)
+ } else {
+ z.DecFallback(yyv27, false)
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FinishedAt = pkg2_v1.Time{}
+ } else {
+ yyv29 := &x.FinishedAt
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv29) {
+ } else if yym30 {
+ z.DecBinaryUnmarshal(yyv29)
+ } else if !yym30 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv29)
+ } else {
+ z.DecFallback(yyv29, false)
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ContainerID = ""
+ } else {
+ yyv31 := &x.ContainerID
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*string)(yyv31)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj18-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ContainerState) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Waiting != nil
+ yyq2[1] = x.Running != nil
+ yyq2[2] = x.Terminated != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Waiting == nil {
+ r.EncodeNil()
+ } else {
+ x.Waiting.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("waiting"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Waiting == nil {
+ r.EncodeNil()
+ } else {
+ x.Waiting.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Running == nil {
+ r.EncodeNil()
+ } else {
+ x.Running.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("running"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Running == nil {
+ r.EncodeNil()
+ } else {
+ x.Running.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Terminated == nil {
+ r.EncodeNil()
+ } else {
+ x.Terminated.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("terminated"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Terminated == nil {
+ r.EncodeNil()
+ } else {
+ x.Terminated.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ContainerState) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ContainerState) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "waiting":
+ if r.TryDecodeAsNil() {
+ if x.Waiting != nil {
+ x.Waiting = nil
+ }
+ } else {
+ if x.Waiting == nil {
+ x.Waiting = new(ContainerStateWaiting)
+ }
+ x.Waiting.CodecDecodeSelf(d)
+ }
+ case "running":
+ if r.TryDecodeAsNil() {
+ if x.Running != nil {
+ x.Running = nil
+ }
+ } else {
+ if x.Running == nil {
+ x.Running = new(ContainerStateRunning)
+ }
+ x.Running.CodecDecodeSelf(d)
+ }
+ case "terminated":
+ if r.TryDecodeAsNil() {
+ if x.Terminated != nil {
+ x.Terminated = nil
+ }
+ } else {
+ if x.Terminated == nil {
+ x.Terminated = new(ContainerStateTerminated)
+ }
+ x.Terminated.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ContainerState) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Waiting != nil {
+ x.Waiting = nil
+ }
+ } else {
+ if x.Waiting == nil {
+ x.Waiting = new(ContainerStateWaiting)
+ }
+ x.Waiting.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Running != nil {
+ x.Running = nil
+ }
+ } else {
+ if x.Running == nil {
+ x.Running = new(ContainerStateRunning)
+ }
+ x.Running.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Terminated != nil {
+ x.Terminated = nil
+ }
+ } else {
+ if x.Terminated == nil {
+ x.Terminated = new(ContainerStateTerminated)
+ }
+ x.Terminated.CodecDecodeSelf(d)
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ContainerStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = true
+ yyq2[2] = true
+ yyq2[7] = x.ContainerID != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(8)
+ } else {
+ yynn2 = 5
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yy7 := &x.State
+ yy7.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("state"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.State
+ yy9.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy12 := &x.LastTerminationState
+ yy12.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastState"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy14 := &x.LastTerminationState
+ yy14.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Ready))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ready"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Ready))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeInt(int64(x.RestartCount))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("restartCount"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeInt(int64(x.RestartCount))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Image))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("image"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Image))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ImageID))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("imageID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym27 := z.EncBinary()
+ _ = yym27
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ImageID))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ yym29 := z.EncBinary()
+ _ = yym29
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ContainerID))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("containerID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym30 := z.EncBinary()
+ _ = yym30
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ContainerID))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ContainerStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ContainerStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "state":
+ if r.TryDecodeAsNil() {
+ x.State = ContainerState{}
+ } else {
+ yyv6 := &x.State
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "lastState":
+ if r.TryDecodeAsNil() {
+ x.LastTerminationState = ContainerState{}
+ } else {
+ yyv7 := &x.LastTerminationState
+ yyv7.CodecDecodeSelf(d)
+ }
+ case "ready":
+ if r.TryDecodeAsNil() {
+ x.Ready = false
+ } else {
+ yyv8 := &x.Ready
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(yyv8)) = r.DecodeBool()
+ }
+ }
+ case "restartCount":
+ if r.TryDecodeAsNil() {
+ x.RestartCount = 0
+ } else {
+ yyv10 := &x.RestartCount
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(yyv10)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "image":
+ if r.TryDecodeAsNil() {
+ x.Image = ""
+ } else {
+ yyv12 := &x.Image
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ case "imageID":
+ if r.TryDecodeAsNil() {
+ x.ImageID = ""
+ } else {
+ yyv14 := &x.ImageID
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ case "containerID":
+ if r.TryDecodeAsNil() {
+ x.ContainerID = ""
+ } else {
+ yyv16 := &x.ContainerID
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ContainerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj18 int
+ var yyb18 bool
+ var yyhl18 bool = l >= 0
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv19 := &x.Name
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.State = ContainerState{}
+ } else {
+ yyv21 := &x.State
+ yyv21.CodecDecodeSelf(d)
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastTerminationState = ContainerState{}
+ } else {
+ yyv22 := &x.LastTerminationState
+ yyv22.CodecDecodeSelf(d)
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Ready = false
+ } else {
+ yyv23 := &x.Ready
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*bool)(yyv23)) = r.DecodeBool()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RestartCount = 0
+ } else {
+ yyv25 := &x.RestartCount
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*int32)(yyv25)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Image = ""
+ } else {
+ yyv27 := &x.Image
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*string)(yyv27)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ImageID = ""
+ } else {
+ yyv29 := &x.ImageID
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*string)(yyv29)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ContainerID = ""
+ } else {
+ yyv31 := &x.ContainerID
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*string)(yyv31)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj18-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x PodPhase) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *PodPhase) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 PodConditionType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *PodConditionType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *PodCondition) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = true
+ yyq2[3] = true
+ yyq2[4] = x.Reason != ""
+ yyq2[5] = x.Message != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Status.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Status.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy10 := &x.LastProbeTime
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy10) {
+ } else if yym11 {
+ z.EncBinaryMarshal(yy10)
+ } else if !yym11 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy10)
+ } else {
+ z.EncFallback(yy10)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastProbeTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.LastProbeTime
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if yym13 {
+ z.EncBinaryMarshal(yy12)
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.LastTransitionTime
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy15) {
+ } else if yym16 {
+ z.EncBinaryMarshal(yy15)
+ } else if !yym16 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy15)
+ } else {
+ z.EncFallback(yy15)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.LastTransitionTime
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy17) {
+ } else if yym18 {
+ z.EncBinaryMarshal(yy17)
+ } else if !yym18 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy17)
+ } else {
+ z.EncFallback(yy17)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodCondition) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "lastProbeTime":
+ if r.TryDecodeAsNil() {
+ x.LastProbeTime = pkg2_v1.Time{}
+ } else {
+ yyv6 := &x.LastProbeTime
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if yym7 {
+ z.DecBinaryUnmarshal(yyv6)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ case "lastTransitionTime":
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg2_v1.Time{}
+ } else {
+ yyv8 := &x.LastTransitionTime
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv8) {
+ } else if yym9 {
+ z.DecBinaryUnmarshal(yyv8)
+ } else if !yym9 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv8)
+ } else {
+ z.DecFallback(yyv8, false)
+ }
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv10 := &x.Reason
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv12 := &x.Message
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv15 := &x.Type
+ yyv15.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv16 := &x.Status
+ yyv16.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastProbeTime = pkg2_v1.Time{}
+ } else {
+ yyv17 := &x.LastProbeTime
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv17) {
+ } else if yym18 {
+ z.DecBinaryUnmarshal(yyv17)
+ } else if !yym18 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv17)
+ } else {
+ z.DecFallback(yyv17, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg2_v1.Time{}
+ } else {
+ yyv19 := &x.LastTransitionTime
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv19) {
+ } else if yym20 {
+ z.DecBinaryUnmarshal(yyv19)
+ } else if !yym20 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv19)
+ } else {
+ z.DecFallback(yyv19, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv21 := &x.Reason
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv23 := &x.Message
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*string)(yyv23)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x RestartPolicy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *RestartPolicy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 DNSPolicy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *DNSPolicy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *NodeSelector) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if x.NodeSelectorTerms == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceNodeSelectorTerm(([]NodeSelectorTerm)(x.NodeSelectorTerms), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nodeSelectorTerms"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NodeSelectorTerms == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceNodeSelectorTerm(([]NodeSelectorTerm)(x.NodeSelectorTerms), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NodeSelector) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NodeSelector) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "nodeSelectorTerms":
+ if r.TryDecodeAsNil() {
+ x.NodeSelectorTerms = nil
+ } else {
+ yyv4 := &x.NodeSelectorTerms
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceNodeSelectorTerm((*[]NodeSelectorTerm)(yyv4), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NodeSelector) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NodeSelectorTerms = nil
+ } else {
+ yyv7 := &x.NodeSelectorTerms
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSliceNodeSelectorTerm((*[]NodeSelectorTerm)(yyv7), d)
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NodeSelectorTerm) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if x.MatchExpressions == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceNodeSelectorRequirement(([]NodeSelectorRequirement)(x.MatchExpressions), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("matchExpressions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.MatchExpressions == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceNodeSelectorRequirement(([]NodeSelectorRequirement)(x.MatchExpressions), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NodeSelectorTerm) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NodeSelectorTerm) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "matchExpressions":
+ if r.TryDecodeAsNil() {
+ x.MatchExpressions = nil
+ } else {
+ yyv4 := &x.MatchExpressions
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceNodeSelectorRequirement((*[]NodeSelectorRequirement)(yyv4), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NodeSelectorTerm) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MatchExpressions = nil
+ } else {
+ yyv7 := &x.MatchExpressions
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSliceNodeSelectorRequirement((*[]NodeSelectorRequirement)(yyv7), d)
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NodeSelectorRequirement) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = len(x.Values) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(3)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Key))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("key"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Key))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Operator.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("operator"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Operator.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Values == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Values, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("values"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Values == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Values, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NodeSelectorRequirement) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NodeSelectorRequirement) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "key":
+ if r.TryDecodeAsNil() {
+ x.Key = ""
+ } else {
+ yyv4 := &x.Key
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "operator":
+ if r.TryDecodeAsNil() {
+ x.Operator = ""
+ } else {
+ yyv6 := &x.Operator
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "values":
+ if r.TryDecodeAsNil() {
+ x.Values = nil
+ } else {
+ yyv7 := &x.Values
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv7, false, d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NodeSelectorRequirement) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Key = ""
+ } else {
+ yyv10 := &x.Key
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Operator = ""
+ } else {
+ yyv12 := &x.Operator
+ yyv12.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Values = nil
+ } else {
+ yyv13 := &x.Values
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv13, false, d)
+ }
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x NodeSelectorOperator) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *NodeSelectorOperator) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *Affinity) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.NodeAffinity != nil
+ yyq2[1] = x.PodAffinity != nil
+ yyq2[2] = x.PodAntiAffinity != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.NodeAffinity == nil {
+ r.EncodeNil()
+ } else {
+ x.NodeAffinity.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nodeAffinity"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NodeAffinity == nil {
+ r.EncodeNil()
+ } else {
+ x.NodeAffinity.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.PodAffinity == nil {
+ r.EncodeNil()
+ } else {
+ x.PodAffinity.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podAffinity"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PodAffinity == nil {
+ r.EncodeNil()
+ } else {
+ x.PodAffinity.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.PodAntiAffinity == nil {
+ r.EncodeNil()
+ } else {
+ x.PodAntiAffinity.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podAntiAffinity"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PodAntiAffinity == nil {
+ r.EncodeNil()
+ } else {
+ x.PodAntiAffinity.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Affinity) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Affinity) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "nodeAffinity":
+ if r.TryDecodeAsNil() {
+ if x.NodeAffinity != nil {
+ x.NodeAffinity = nil
+ }
+ } else {
+ if x.NodeAffinity == nil {
+ x.NodeAffinity = new(NodeAffinity)
+ }
+ x.NodeAffinity.CodecDecodeSelf(d)
+ }
+ case "podAffinity":
+ if r.TryDecodeAsNil() {
+ if x.PodAffinity != nil {
+ x.PodAffinity = nil
+ }
+ } else {
+ if x.PodAffinity == nil {
+ x.PodAffinity = new(PodAffinity)
+ }
+ x.PodAffinity.CodecDecodeSelf(d)
+ }
+ case "podAntiAffinity":
+ if r.TryDecodeAsNil() {
+ if x.PodAntiAffinity != nil {
+ x.PodAntiAffinity = nil
+ }
+ } else {
+ if x.PodAntiAffinity == nil {
+ x.PodAntiAffinity = new(PodAntiAffinity)
+ }
+ x.PodAntiAffinity.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Affinity) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.NodeAffinity != nil {
+ x.NodeAffinity = nil
+ }
+ } else {
+ if x.NodeAffinity == nil {
+ x.NodeAffinity = new(NodeAffinity)
+ }
+ x.NodeAffinity.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PodAffinity != nil {
+ x.PodAffinity = nil
+ }
+ } else {
+ if x.PodAffinity == nil {
+ x.PodAffinity = new(PodAffinity)
+ }
+ x.PodAffinity.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PodAntiAffinity != nil {
+ x.PodAntiAffinity = nil
+ }
+ } else {
+ if x.PodAntiAffinity == nil {
+ x.PodAntiAffinity = new(PodAntiAffinity)
+ }
+ x.PodAntiAffinity.CodecDecodeSelf(d)
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodAffinity) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.RequiredDuringSchedulingIgnoredDuringExecution) != 0
+ yyq2[1] = len(x.PreferredDuringSchedulingIgnoredDuringExecution) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.RequiredDuringSchedulingIgnoredDuringExecution == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSlicePodAffinityTerm(([]PodAffinityTerm)(x.RequiredDuringSchedulingIgnoredDuringExecution), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("requiredDuringSchedulingIgnoredDuringExecution"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RequiredDuringSchedulingIgnoredDuringExecution == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSlicePodAffinityTerm(([]PodAffinityTerm)(x.RequiredDuringSchedulingIgnoredDuringExecution), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.PreferredDuringSchedulingIgnoredDuringExecution == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceWeightedPodAffinityTerm(([]WeightedPodAffinityTerm)(x.PreferredDuringSchedulingIgnoredDuringExecution), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("preferredDuringSchedulingIgnoredDuringExecution"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PreferredDuringSchedulingIgnoredDuringExecution == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceWeightedPodAffinityTerm(([]WeightedPodAffinityTerm)(x.PreferredDuringSchedulingIgnoredDuringExecution), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodAffinity) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodAffinity) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "requiredDuringSchedulingIgnoredDuringExecution":
+ if r.TryDecodeAsNil() {
+ x.RequiredDuringSchedulingIgnoredDuringExecution = nil
+ } else {
+ yyv4 := &x.RequiredDuringSchedulingIgnoredDuringExecution
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSlicePodAffinityTerm((*[]PodAffinityTerm)(yyv4), d)
+ }
+ }
+ case "preferredDuringSchedulingIgnoredDuringExecution":
+ if r.TryDecodeAsNil() {
+ x.PreferredDuringSchedulingIgnoredDuringExecution = nil
+ } else {
+ yyv6 := &x.PreferredDuringSchedulingIgnoredDuringExecution
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceWeightedPodAffinityTerm((*[]WeightedPodAffinityTerm)(yyv6), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodAffinity) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RequiredDuringSchedulingIgnoredDuringExecution = nil
+ } else {
+ yyv9 := &x.RequiredDuringSchedulingIgnoredDuringExecution
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSlicePodAffinityTerm((*[]PodAffinityTerm)(yyv9), d)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PreferredDuringSchedulingIgnoredDuringExecution = nil
+ } else {
+ yyv11 := &x.PreferredDuringSchedulingIgnoredDuringExecution
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceWeightedPodAffinityTerm((*[]WeightedPodAffinityTerm)(yyv11), d)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodAntiAffinity) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.RequiredDuringSchedulingIgnoredDuringExecution) != 0
+ yyq2[1] = len(x.PreferredDuringSchedulingIgnoredDuringExecution) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.RequiredDuringSchedulingIgnoredDuringExecution == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSlicePodAffinityTerm(([]PodAffinityTerm)(x.RequiredDuringSchedulingIgnoredDuringExecution), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("requiredDuringSchedulingIgnoredDuringExecution"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RequiredDuringSchedulingIgnoredDuringExecution == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSlicePodAffinityTerm(([]PodAffinityTerm)(x.RequiredDuringSchedulingIgnoredDuringExecution), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.PreferredDuringSchedulingIgnoredDuringExecution == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceWeightedPodAffinityTerm(([]WeightedPodAffinityTerm)(x.PreferredDuringSchedulingIgnoredDuringExecution), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("preferredDuringSchedulingIgnoredDuringExecution"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PreferredDuringSchedulingIgnoredDuringExecution == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceWeightedPodAffinityTerm(([]WeightedPodAffinityTerm)(x.PreferredDuringSchedulingIgnoredDuringExecution), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodAntiAffinity) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodAntiAffinity) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "requiredDuringSchedulingIgnoredDuringExecution":
+ if r.TryDecodeAsNil() {
+ x.RequiredDuringSchedulingIgnoredDuringExecution = nil
+ } else {
+ yyv4 := &x.RequiredDuringSchedulingIgnoredDuringExecution
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSlicePodAffinityTerm((*[]PodAffinityTerm)(yyv4), d)
+ }
+ }
+ case "preferredDuringSchedulingIgnoredDuringExecution":
+ if r.TryDecodeAsNil() {
+ x.PreferredDuringSchedulingIgnoredDuringExecution = nil
+ } else {
+ yyv6 := &x.PreferredDuringSchedulingIgnoredDuringExecution
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceWeightedPodAffinityTerm((*[]WeightedPodAffinityTerm)(yyv6), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodAntiAffinity) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RequiredDuringSchedulingIgnoredDuringExecution = nil
+ } else {
+ yyv9 := &x.RequiredDuringSchedulingIgnoredDuringExecution
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSlicePodAffinityTerm((*[]PodAffinityTerm)(yyv9), d)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PreferredDuringSchedulingIgnoredDuringExecution = nil
+ } else {
+ yyv11 := &x.PreferredDuringSchedulingIgnoredDuringExecution
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceWeightedPodAffinityTerm((*[]WeightedPodAffinityTerm)(yyv11), d)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *WeightedPodAffinityTerm) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Weight))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("weight"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Weight))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy7 := &x.PodAffinityTerm
+ yy7.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podAffinityTerm"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.PodAffinityTerm
+ yy9.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *WeightedPodAffinityTerm) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *WeightedPodAffinityTerm) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "weight":
+ if r.TryDecodeAsNil() {
+ x.Weight = 0
+ } else {
+ yyv4 := &x.Weight
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(yyv4)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "podAffinityTerm":
+ if r.TryDecodeAsNil() {
+ x.PodAffinityTerm = PodAffinityTerm{}
+ } else {
+ yyv6 := &x.PodAffinityTerm
+ yyv6.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *WeightedPodAffinityTerm) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Weight = 0
+ } else {
+ yyv8 := &x.Weight
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PodAffinityTerm = PodAffinityTerm{}
+ } else {
+ yyv10 := &x.PodAffinityTerm
+ yyv10.CodecDecodeSelf(d)
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodAffinityTerm) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.LabelSelector != nil
+ yyq2[1] = len(x.Namespaces) != 0
+ yyq2[2] = x.TopologyKey != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.LabelSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.LabelSelector) {
+ } else {
+ z.EncFallback(x.LabelSelector)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("labelSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.LabelSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.LabelSelector) {
+ } else {
+ z.EncFallback(x.LabelSelector)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Namespaces == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Namespaces, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("namespaces"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Namespaces == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Namespaces, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.TopologyKey))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("topologyKey"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.TopologyKey))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodAffinityTerm) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodAffinityTerm) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "labelSelector":
+ if r.TryDecodeAsNil() {
+ if x.LabelSelector != nil {
+ x.LabelSelector = nil
+ }
+ } else {
+ if x.LabelSelector == nil {
+ x.LabelSelector = new(pkg2_v1.LabelSelector)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.LabelSelector) {
+ } else {
+ z.DecFallback(x.LabelSelector, false)
+ }
+ }
+ case "namespaces":
+ if r.TryDecodeAsNil() {
+ x.Namespaces = nil
+ } else {
+ yyv6 := &x.Namespaces
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv6, false, d)
+ }
+ }
+ case "topologyKey":
+ if r.TryDecodeAsNil() {
+ x.TopologyKey = ""
+ } else {
+ yyv8 := &x.TopologyKey
+ 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_containerMapEnd1234)
+}
+
+func (x *PodAffinityTerm) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.LabelSelector != nil {
+ x.LabelSelector = nil
+ }
+ } else {
+ if x.LabelSelector == nil {
+ x.LabelSelector = new(pkg2_v1.LabelSelector)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.LabelSelector) {
+ } else {
+ z.DecFallback(x.LabelSelector, false)
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Namespaces = nil
+ } else {
+ yyv13 := &x.Namespaces
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv13, false, d)
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TopologyKey = ""
+ } else {
+ yyv15 := &x.TopologyKey
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NodeAffinity) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.RequiredDuringSchedulingIgnoredDuringExecution != nil
+ yyq2[1] = len(x.PreferredDuringSchedulingIgnoredDuringExecution) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.RequiredDuringSchedulingIgnoredDuringExecution == nil {
+ r.EncodeNil()
+ } else {
+ x.RequiredDuringSchedulingIgnoredDuringExecution.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("requiredDuringSchedulingIgnoredDuringExecution"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RequiredDuringSchedulingIgnoredDuringExecution == nil {
+ r.EncodeNil()
+ } else {
+ x.RequiredDuringSchedulingIgnoredDuringExecution.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.PreferredDuringSchedulingIgnoredDuringExecution == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSlicePreferredSchedulingTerm(([]PreferredSchedulingTerm)(x.PreferredDuringSchedulingIgnoredDuringExecution), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("preferredDuringSchedulingIgnoredDuringExecution"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PreferredDuringSchedulingIgnoredDuringExecution == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSlicePreferredSchedulingTerm(([]PreferredSchedulingTerm)(x.PreferredDuringSchedulingIgnoredDuringExecution), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NodeAffinity) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NodeAffinity) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "requiredDuringSchedulingIgnoredDuringExecution":
+ if r.TryDecodeAsNil() {
+ if x.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ x.RequiredDuringSchedulingIgnoredDuringExecution = nil
+ }
+ } else {
+ if x.RequiredDuringSchedulingIgnoredDuringExecution == nil {
+ x.RequiredDuringSchedulingIgnoredDuringExecution = new(NodeSelector)
+ }
+ x.RequiredDuringSchedulingIgnoredDuringExecution.CodecDecodeSelf(d)
+ }
+ case "preferredDuringSchedulingIgnoredDuringExecution":
+ if r.TryDecodeAsNil() {
+ x.PreferredDuringSchedulingIgnoredDuringExecution = nil
+ } else {
+ yyv5 := &x.PreferredDuringSchedulingIgnoredDuringExecution
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSlicePreferredSchedulingTerm((*[]PreferredSchedulingTerm)(yyv5), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NodeAffinity) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ x.RequiredDuringSchedulingIgnoredDuringExecution = nil
+ }
+ } else {
+ if x.RequiredDuringSchedulingIgnoredDuringExecution == nil {
+ x.RequiredDuringSchedulingIgnoredDuringExecution = new(NodeSelector)
+ }
+ x.RequiredDuringSchedulingIgnoredDuringExecution.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PreferredDuringSchedulingIgnoredDuringExecution = nil
+ } else {
+ yyv9 := &x.PreferredDuringSchedulingIgnoredDuringExecution
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSlicePreferredSchedulingTerm((*[]PreferredSchedulingTerm)(yyv9), d)
+ }
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PreferredSchedulingTerm) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Weight))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("weight"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Weight))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy7 := &x.Preference
+ yy7.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("preference"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.Preference
+ yy9.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PreferredSchedulingTerm) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PreferredSchedulingTerm) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "weight":
+ if r.TryDecodeAsNil() {
+ x.Weight = 0
+ } else {
+ yyv4 := &x.Weight
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(yyv4)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "preference":
+ if r.TryDecodeAsNil() {
+ x.Preference = NodeSelectorTerm{}
+ } else {
+ yyv6 := &x.Preference
+ yyv6.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PreferredSchedulingTerm) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Weight = 0
+ } else {
+ yyv8 := &x.Weight
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Preference = NodeSelectorTerm{}
+ } else {
+ yyv10 := &x.Preference
+ yyv10.CodecDecodeSelf(d)
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Taint) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.Value != ""
+ yyq2[3] = true
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Key))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("key"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Key))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Value))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("value"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Value))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Effect.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("effect"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Effect.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yy13 := &x.TimeAdded
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy13) {
+ } else if yym14 {
+ z.EncBinaryMarshal(yy13)
+ } else if !yym14 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy13)
+ } else {
+ z.EncFallback(yy13)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("timeAdded"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy15 := &x.TimeAdded
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy15) {
+ } else if yym16 {
+ z.EncBinaryMarshal(yy15)
+ } else if !yym16 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy15)
+ } else {
+ z.EncFallback(yy15)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Taint) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Taint) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "key":
+ if r.TryDecodeAsNil() {
+ x.Key = ""
+ } else {
+ yyv4 := &x.Key
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "value":
+ if r.TryDecodeAsNil() {
+ x.Value = ""
+ } else {
+ yyv6 := &x.Value
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "effect":
+ if r.TryDecodeAsNil() {
+ x.Effect = ""
+ } else {
+ yyv8 := &x.Effect
+ yyv8.CodecDecodeSelf(d)
+ }
+ case "timeAdded":
+ if r.TryDecodeAsNil() {
+ x.TimeAdded = pkg2_v1.Time{}
+ } else {
+ yyv9 := &x.TimeAdded
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv9) {
+ } else if yym10 {
+ z.DecBinaryUnmarshal(yyv9)
+ } else if !yym10 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv9)
+ } else {
+ z.DecFallback(yyv9, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Taint) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Key = ""
+ } else {
+ yyv12 := &x.Key
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Value = ""
+ } else {
+ yyv14 := &x.Value
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Effect = ""
+ } else {
+ yyv16 := &x.Effect
+ yyv16.CodecDecodeSelf(d)
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TimeAdded = pkg2_v1.Time{}
+ } else {
+ yyv17 := &x.TimeAdded
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv17) {
+ } else if yym18 {
+ z.DecBinaryUnmarshal(yyv17)
+ } else if !yym18 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv17)
+ } else {
+ z.DecFallback(yyv17, false)
+ }
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x TaintEffect) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *TaintEffect) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *Toleration) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Key != ""
+ yyq2[1] = x.Operator != ""
+ yyq2[2] = x.Value != ""
+ yyq2[3] = x.Effect != ""
+ yyq2[4] = x.TolerationSeconds != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Key))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("key"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Key))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ x.Operator.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("operator"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Operator.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Value))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("value"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Value))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ x.Effect.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("effect"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Effect.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.TolerationSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy16 := *x.TolerationSeconds
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(yy16))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("tolerationSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TolerationSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy18 := *x.TolerationSeconds
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeInt(int64(yy18))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Toleration) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Toleration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "key":
+ if r.TryDecodeAsNil() {
+ x.Key = ""
+ } else {
+ yyv4 := &x.Key
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "operator":
+ if r.TryDecodeAsNil() {
+ x.Operator = ""
+ } else {
+ yyv6 := &x.Operator
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "value":
+ if r.TryDecodeAsNil() {
+ x.Value = ""
+ } else {
+ yyv7 := &x.Value
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*string)(yyv7)) = r.DecodeString()
+ }
+ }
+ case "effect":
+ if r.TryDecodeAsNil() {
+ x.Effect = ""
+ } else {
+ yyv9 := &x.Effect
+ yyv9.CodecDecodeSelf(d)
+ }
+ case "tolerationSeconds":
+ if r.TryDecodeAsNil() {
+ if x.TolerationSeconds != nil {
+ x.TolerationSeconds = nil
+ }
+ } else {
+ if x.TolerationSeconds == nil {
+ x.TolerationSeconds = new(int64)
+ }
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int64)(x.TolerationSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Toleration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Key = ""
+ } else {
+ yyv13 := &x.Key
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Operator = ""
+ } else {
+ yyv15 := &x.Operator
+ yyv15.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Value = ""
+ } else {
+ yyv16 := &x.Value
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Effect = ""
+ } else {
+ yyv18 := &x.Effect
+ yyv18.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.TolerationSeconds != nil {
+ x.TolerationSeconds = nil
+ }
+ } else {
+ if x.TolerationSeconds == nil {
+ x.TolerationSeconds = new(int64)
+ }
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*int64)(x.TolerationSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x TolerationOperator) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *TolerationOperator) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [23]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = len(x.Volumes) != 0
+ yyq2[1] = len(x.InitContainers) != 0
+ yyq2[3] = x.RestartPolicy != ""
+ yyq2[4] = x.TerminationGracePeriodSeconds != nil
+ yyq2[5] = x.ActiveDeadlineSeconds != nil
+ yyq2[6] = x.DNSPolicy != ""
+ yyq2[7] = len(x.NodeSelector) != 0
+ yyq2[8] = x.ServiceAccountName != ""
+ yyq2[9] = x.DeprecatedServiceAccount != ""
+ yyq2[10] = x.AutomountServiceAccountToken != nil
+ yyq2[11] = x.NodeName != ""
+ yyq2[12] = x.HostNetwork != false
+ yyq2[13] = x.HostPID != false
+ yyq2[14] = x.HostIPC != false
+ yyq2[15] = x.SecurityContext != nil
+ yyq2[16] = len(x.ImagePullSecrets) != 0
+ yyq2[17] = x.Hostname != ""
+ yyq2[18] = x.Subdomain != ""
+ yyq2[19] = x.Affinity != nil
+ yyq2[20] = x.SchedulerName != ""
+ yyq2[21] = len(x.Tolerations) != 0
+ yyq2[22] = len(x.HostAliases) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(23)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Volumes == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceVolume(([]Volume)(x.Volumes), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Volumes == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceVolume(([]Volume)(x.Volumes), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.InitContainers == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceContainer(([]Container)(x.InitContainers), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("initContainers"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.InitContainers == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceContainer(([]Container)(x.InitContainers), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Containers == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceContainer(([]Container)(x.Containers), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("containers"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Containers == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.encSliceContainer(([]Container)(x.Containers), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ x.RestartPolicy.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("restartPolicy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.RestartPolicy.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.TerminationGracePeriodSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy16 := *x.TerminationGracePeriodSeconds
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(yy16))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("terminationGracePeriodSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TerminationGracePeriodSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy18 := *x.TerminationGracePeriodSeconds
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeInt(int64(yy18))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.ActiveDeadlineSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy21 := *x.ActiveDeadlineSeconds
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeInt(int64(yy21))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("activeDeadlineSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ActiveDeadlineSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy23 := *x.ActiveDeadlineSeconds
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else {
+ r.EncodeInt(int64(yy23))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ x.DNSPolicy.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("dnsPolicy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.DNSPolicy.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.NodeSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym29 := z.EncBinary()
+ _ = yym29
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.NodeSelector, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nodeSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NodeSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym30 := z.EncBinary()
+ _ = yym30
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.NodeSelector, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ yym32 := z.EncBinary()
+ _ = yym32
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("serviceAccountName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym33 := z.EncBinary()
+ _ = yym33
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ yym35 := z.EncBinary()
+ _ = yym35
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DeprecatedServiceAccount))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("serviceAccount"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym36 := z.EncBinary()
+ _ = yym36
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DeprecatedServiceAccount))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[10] {
+ if x.AutomountServiceAccountToken == nil {
+ r.EncodeNil()
+ } else {
+ yy38 := *x.AutomountServiceAccountToken
+ yym39 := z.EncBinary()
+ _ = yym39
+ if false {
+ } else {
+ r.EncodeBool(bool(yy38))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[10] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("automountServiceAccountToken"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.AutomountServiceAccountToken == nil {
+ r.EncodeNil()
+ } else {
+ yy40 := *x.AutomountServiceAccountToken
+ yym41 := z.EncBinary()
+ _ = yym41
+ if false {
+ } else {
+ r.EncodeBool(bool(yy40))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[11] {
+ yym43 := z.EncBinary()
+ _ = yym43
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.NodeName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[11] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nodeName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym44 := z.EncBinary()
+ _ = yym44
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.NodeName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[12] {
+ yym46 := z.EncBinary()
+ _ = yym46
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostNetwork))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[12] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostNetwork"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym47 := z.EncBinary()
+ _ = yym47
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostNetwork))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[13] {
+ yym49 := z.EncBinary()
+ _ = yym49
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostPID))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[13] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostPID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym50 := z.EncBinary()
+ _ = yym50
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostPID))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[14] {
+ yym52 := z.EncBinary()
+ _ = yym52
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostIPC))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[14] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostIPC"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym53 := z.EncBinary()
+ _ = yym53
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostIPC))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[15] {
+ if x.SecurityContext == nil {
+ r.EncodeNil()
+ } else {
+ x.SecurityContext.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[15] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("securityContext"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SecurityContext == nil {
+ r.EncodeNil()
+ } else {
+ x.SecurityContext.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[16] {
+ if x.ImagePullSecrets == nil {
+ r.EncodeNil()
+ } else {
+ yym58 := z.EncBinary()
+ _ = yym58
+ if false {
+ } else {
+ h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[16] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("imagePullSecrets"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ImagePullSecrets == nil {
+ r.EncodeNil()
+ } else {
+ yym59 := z.EncBinary()
+ _ = yym59
+ if false {
+ } else {
+ h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[17] {
+ yym61 := z.EncBinary()
+ _ = yym61
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Hostname))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[17] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostname"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym62 := z.EncBinary()
+ _ = yym62
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Hostname))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[18] {
+ yym64 := z.EncBinary()
+ _ = yym64
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Subdomain))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[18] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("subdomain"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym65 := z.EncBinary()
+ _ = yym65
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Subdomain))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[19] {
+ if x.Affinity == nil {
+ r.EncodeNil()
+ } else {
+ x.Affinity.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[19] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("affinity"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Affinity == nil {
+ r.EncodeNil()
+ } else {
+ x.Affinity.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[20] {
+ yym70 := z.EncBinary()
+ _ = yym70
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[20] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("schedulerName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym71 := z.EncBinary()
+ _ = yym71
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[21] {
+ if x.Tolerations == nil {
+ r.EncodeNil()
+ } else {
+ yym73 := z.EncBinary()
+ _ = yym73
+ if false {
+ } else {
+ h.encSliceToleration(([]Toleration)(x.Tolerations), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[21] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("tolerations"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Tolerations == nil {
+ r.EncodeNil()
+ } else {
+ yym74 := z.EncBinary()
+ _ = yym74
+ if false {
+ } else {
+ h.encSliceToleration(([]Toleration)(x.Tolerations), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[22] {
+ if x.HostAliases == nil {
+ r.EncodeNil()
+ } else {
+ yym76 := z.EncBinary()
+ _ = yym76
+ if false {
+ } else {
+ h.encSliceHostAlias(([]HostAlias)(x.HostAliases), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[22] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostAliases"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.HostAliases == nil {
+ r.EncodeNil()
+ } else {
+ yym77 := z.EncBinary()
+ _ = yym77
+ if false {
+ } else {
+ h.encSliceHostAlias(([]HostAlias)(x.HostAliases), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "volumes":
+ if r.TryDecodeAsNil() {
+ x.Volumes = nil
+ } else {
+ yyv4 := &x.Volumes
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceVolume((*[]Volume)(yyv4), d)
+ }
+ }
+ case "initContainers":
+ if r.TryDecodeAsNil() {
+ x.InitContainers = nil
+ } else {
+ yyv6 := &x.InitContainers
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceContainer((*[]Container)(yyv6), d)
+ }
+ }
+ case "containers":
+ if r.TryDecodeAsNil() {
+ x.Containers = nil
+ } else {
+ yyv8 := &x.Containers
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.decSliceContainer((*[]Container)(yyv8), d)
+ }
+ }
+ case "restartPolicy":
+ if r.TryDecodeAsNil() {
+ x.RestartPolicy = ""
+ } else {
+ yyv10 := &x.RestartPolicy
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "terminationGracePeriodSeconds":
+ if r.TryDecodeAsNil() {
+ if x.TerminationGracePeriodSeconds != nil {
+ x.TerminationGracePeriodSeconds = nil
+ }
+ } else {
+ if x.TerminationGracePeriodSeconds == nil {
+ x.TerminationGracePeriodSeconds = new(int64)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int64)(x.TerminationGracePeriodSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "activeDeadlineSeconds":
+ if r.TryDecodeAsNil() {
+ if x.ActiveDeadlineSeconds != nil {
+ x.ActiveDeadlineSeconds = nil
+ }
+ } else {
+ if x.ActiveDeadlineSeconds == nil {
+ x.ActiveDeadlineSeconds = new(int64)
+ }
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "dnsPolicy":
+ if r.TryDecodeAsNil() {
+ x.DNSPolicy = ""
+ } else {
+ yyv15 := &x.DNSPolicy
+ yyv15.CodecDecodeSelf(d)
+ }
+ case "nodeSelector":
+ if r.TryDecodeAsNil() {
+ x.NodeSelector = nil
+ } else {
+ yyv16 := &x.NodeSelector
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv16, false, d)
+ }
+ }
+ case "serviceAccountName":
+ if r.TryDecodeAsNil() {
+ x.ServiceAccountName = ""
+ } else {
+ yyv18 := &x.ServiceAccountName
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*string)(yyv18)) = r.DecodeString()
+ }
+ }
+ case "serviceAccount":
+ if r.TryDecodeAsNil() {
+ x.DeprecatedServiceAccount = ""
+ } else {
+ yyv20 := &x.DeprecatedServiceAccount
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ *((*string)(yyv20)) = r.DecodeString()
+ }
+ }
+ case "automountServiceAccountToken":
+ if r.TryDecodeAsNil() {
+ if x.AutomountServiceAccountToken != nil {
+ x.AutomountServiceAccountToken = nil
+ }
+ } else {
+ if x.AutomountServiceAccountToken == nil {
+ x.AutomountServiceAccountToken = new(bool)
+ }
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else {
+ *((*bool)(x.AutomountServiceAccountToken)) = r.DecodeBool()
+ }
+ }
+ case "nodeName":
+ if r.TryDecodeAsNil() {
+ x.NodeName = ""
+ } else {
+ yyv24 := &x.NodeName
+ yym25 := z.DecBinary()
+ _ = yym25
+ if false {
+ } else {
+ *((*string)(yyv24)) = r.DecodeString()
+ }
+ }
+ case "hostNetwork":
+ if r.TryDecodeAsNil() {
+ x.HostNetwork = false
+ } else {
+ yyv26 := &x.HostNetwork
+ yym27 := z.DecBinary()
+ _ = yym27
+ if false {
+ } else {
+ *((*bool)(yyv26)) = r.DecodeBool()
+ }
+ }
+ case "hostPID":
+ if r.TryDecodeAsNil() {
+ x.HostPID = false
+ } else {
+ yyv28 := &x.HostPID
+ yym29 := z.DecBinary()
+ _ = yym29
+ if false {
+ } else {
+ *((*bool)(yyv28)) = r.DecodeBool()
+ }
+ }
+ case "hostIPC":
+ if r.TryDecodeAsNil() {
+ x.HostIPC = false
+ } else {
+ yyv30 := &x.HostIPC
+ yym31 := z.DecBinary()
+ _ = yym31
+ if false {
+ } else {
+ *((*bool)(yyv30)) = r.DecodeBool()
+ }
+ }
+ case "securityContext":
+ if r.TryDecodeAsNil() {
+ if x.SecurityContext != nil {
+ x.SecurityContext = nil
+ }
+ } else {
+ if x.SecurityContext == nil {
+ x.SecurityContext = new(PodSecurityContext)
+ }
+ x.SecurityContext.CodecDecodeSelf(d)
+ }
+ case "imagePullSecrets":
+ if r.TryDecodeAsNil() {
+ x.ImagePullSecrets = nil
+ } else {
+ yyv33 := &x.ImagePullSecrets
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv33), d)
+ }
+ }
+ case "hostname":
+ if r.TryDecodeAsNil() {
+ x.Hostname = ""
+ } else {
+ yyv35 := &x.Hostname
+ yym36 := z.DecBinary()
+ _ = yym36
+ if false {
+ } else {
+ *((*string)(yyv35)) = r.DecodeString()
+ }
+ }
+ case "subdomain":
+ if r.TryDecodeAsNil() {
+ x.Subdomain = ""
+ } else {
+ yyv37 := &x.Subdomain
+ yym38 := z.DecBinary()
+ _ = yym38
+ if false {
+ } else {
+ *((*string)(yyv37)) = r.DecodeString()
+ }
+ }
+ case "affinity":
+ if r.TryDecodeAsNil() {
+ if x.Affinity != nil {
+ x.Affinity = nil
+ }
+ } else {
+ if x.Affinity == nil {
+ x.Affinity = new(Affinity)
+ }
+ x.Affinity.CodecDecodeSelf(d)
+ }
+ case "schedulerName":
+ if r.TryDecodeAsNil() {
+ x.SchedulerName = ""
+ } else {
+ yyv40 := &x.SchedulerName
+ yym41 := z.DecBinary()
+ _ = yym41
+ if false {
+ } else {
+ *((*string)(yyv40)) = r.DecodeString()
+ }
+ }
+ case "tolerations":
+ if r.TryDecodeAsNil() {
+ x.Tolerations = nil
+ } else {
+ yyv42 := &x.Tolerations
+ yym43 := z.DecBinary()
+ _ = yym43
+ if false {
+ } else {
+ h.decSliceToleration((*[]Toleration)(yyv42), d)
+ }
+ }
+ case "hostAliases":
+ if r.TryDecodeAsNil() {
+ x.HostAliases = nil
+ } else {
+ yyv44 := &x.HostAliases
+ yym45 := z.DecBinary()
+ _ = yym45
+ if false {
+ } else {
+ h.decSliceHostAlias((*[]HostAlias)(yyv44), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj46 int
+ var yyb46 bool
+ var yyhl46 bool = l >= 0
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Volumes = nil
+ } else {
+ yyv47 := &x.Volumes
+ yym48 := z.DecBinary()
+ _ = yym48
+ if false {
+ } else {
+ h.decSliceVolume((*[]Volume)(yyv47), d)
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.InitContainers = nil
+ } else {
+ yyv49 := &x.InitContainers
+ yym50 := z.DecBinary()
+ _ = yym50
+ if false {
+ } else {
+ h.decSliceContainer((*[]Container)(yyv49), d)
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Containers = nil
+ } else {
+ yyv51 := &x.Containers
+ yym52 := z.DecBinary()
+ _ = yym52
+ if false {
+ } else {
+ h.decSliceContainer((*[]Container)(yyv51), d)
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RestartPolicy = ""
+ } else {
+ yyv53 := &x.RestartPolicy
+ yyv53.CodecDecodeSelf(d)
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.TerminationGracePeriodSeconds != nil {
+ x.TerminationGracePeriodSeconds = nil
+ }
+ } else {
+ if x.TerminationGracePeriodSeconds == nil {
+ x.TerminationGracePeriodSeconds = new(int64)
+ }
+ yym55 := z.DecBinary()
+ _ = yym55
+ if false {
+ } else {
+ *((*int64)(x.TerminationGracePeriodSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ActiveDeadlineSeconds != nil {
+ x.ActiveDeadlineSeconds = nil
+ }
+ } else {
+ if x.ActiveDeadlineSeconds == nil {
+ x.ActiveDeadlineSeconds = new(int64)
+ }
+ yym57 := z.DecBinary()
+ _ = yym57
+ if false {
+ } else {
+ *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DNSPolicy = ""
+ } else {
+ yyv58 := &x.DNSPolicy
+ yyv58.CodecDecodeSelf(d)
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NodeSelector = nil
+ } else {
+ yyv59 := &x.NodeSelector
+ yym60 := z.DecBinary()
+ _ = yym60
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv59, false, d)
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ServiceAccountName = ""
+ } else {
+ yyv61 := &x.ServiceAccountName
+ yym62 := z.DecBinary()
+ _ = yym62
+ if false {
+ } else {
+ *((*string)(yyv61)) = r.DecodeString()
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DeprecatedServiceAccount = ""
+ } else {
+ yyv63 := &x.DeprecatedServiceAccount
+ yym64 := z.DecBinary()
+ _ = yym64
+ if false {
+ } else {
+ *((*string)(yyv63)) = r.DecodeString()
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.AutomountServiceAccountToken != nil {
+ x.AutomountServiceAccountToken = nil
+ }
+ } else {
+ if x.AutomountServiceAccountToken == nil {
+ x.AutomountServiceAccountToken = new(bool)
+ }
+ yym66 := z.DecBinary()
+ _ = yym66
+ if false {
+ } else {
+ *((*bool)(x.AutomountServiceAccountToken)) = r.DecodeBool()
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NodeName = ""
+ } else {
+ yyv67 := &x.NodeName
+ yym68 := z.DecBinary()
+ _ = yym68
+ if false {
+ } else {
+ *((*string)(yyv67)) = r.DecodeString()
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostNetwork = false
+ } else {
+ yyv69 := &x.HostNetwork
+ yym70 := z.DecBinary()
+ _ = yym70
+ if false {
+ } else {
+ *((*bool)(yyv69)) = r.DecodeBool()
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostPID = false
+ } else {
+ yyv71 := &x.HostPID
+ yym72 := z.DecBinary()
+ _ = yym72
+ if false {
+ } else {
+ *((*bool)(yyv71)) = r.DecodeBool()
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostIPC = false
+ } else {
+ yyv73 := &x.HostIPC
+ yym74 := z.DecBinary()
+ _ = yym74
+ if false {
+ } else {
+ *((*bool)(yyv73)) = r.DecodeBool()
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SecurityContext != nil {
+ x.SecurityContext = nil
+ }
+ } else {
+ if x.SecurityContext == nil {
+ x.SecurityContext = new(PodSecurityContext)
+ }
+ x.SecurityContext.CodecDecodeSelf(d)
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ImagePullSecrets = nil
+ } else {
+ yyv76 := &x.ImagePullSecrets
+ yym77 := z.DecBinary()
+ _ = yym77
+ if false {
+ } else {
+ h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv76), d)
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Hostname = ""
+ } else {
+ yyv78 := &x.Hostname
+ yym79 := z.DecBinary()
+ _ = yym79
+ if false {
+ } else {
+ *((*string)(yyv78)) = r.DecodeString()
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Subdomain = ""
+ } else {
+ yyv80 := &x.Subdomain
+ yym81 := z.DecBinary()
+ _ = yym81
+ if false {
+ } else {
+ *((*string)(yyv80)) = r.DecodeString()
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Affinity != nil {
+ x.Affinity = nil
+ }
+ } else {
+ if x.Affinity == nil {
+ x.Affinity = new(Affinity)
+ }
+ x.Affinity.CodecDecodeSelf(d)
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SchedulerName = ""
+ } else {
+ yyv83 := &x.SchedulerName
+ yym84 := z.DecBinary()
+ _ = yym84
+ if false {
+ } else {
+ *((*string)(yyv83)) = r.DecodeString()
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Tolerations = nil
+ } else {
+ yyv85 := &x.Tolerations
+ yym86 := z.DecBinary()
+ _ = yym86
+ if false {
+ } else {
+ h.decSliceToleration((*[]Toleration)(yyv85), d)
+ }
+ }
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostAliases = nil
+ } else {
+ yyv87 := &x.HostAliases
+ yym88 := z.DecBinary()
+ _ = yym88
+ if false {
+ } else {
+ h.decSliceHostAlias((*[]HostAlias)(yyv87), d)
+ }
+ }
+ for {
+ yyj46++
+ if yyhl46 {
+ yyb46 = yyj46 > l
+ } else {
+ yyb46 = r.CheckBreak()
+ }
+ if yyb46 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj46-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *HostAlias) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.IP != ""
+ yyq2[1] = len(x.Hostnames) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.IP))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ip"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.IP))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Hostnames == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Hostnames, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostnames"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Hostnames == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Hostnames, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HostAlias) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HostAlias) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "ip":
+ if r.TryDecodeAsNil() {
+ x.IP = ""
+ } else {
+ yyv4 := &x.IP
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "hostnames":
+ if r.TryDecodeAsNil() {
+ x.Hostnames = nil
+ } else {
+ yyv6 := &x.Hostnames
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv6, false, d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HostAlias) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.IP = ""
+ } else {
+ yyv9 := &x.IP
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Hostnames = nil
+ } else {
+ yyv11 := &x.Hostnames
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv11, false, d)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodSecurityContext) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.SELinuxOptions != nil
+ yyq2[1] = x.RunAsUser != nil
+ yyq2[2] = x.RunAsNonRoot != nil
+ yyq2[3] = len(x.SupplementalGroups) != 0
+ yyq2[4] = x.FSGroup != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.SELinuxOptions == nil {
+ r.EncodeNil()
+ } else {
+ x.SELinuxOptions.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("seLinuxOptions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SELinuxOptions == nil {
+ r.EncodeNil()
+ } else {
+ x.SELinuxOptions.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.RunAsUser == nil {
+ r.EncodeNil()
+ } else {
+ yy7 := *x.RunAsUser
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(yy7))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("runAsUser"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RunAsUser == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.RunAsUser
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(yy9))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.RunAsNonRoot == nil {
+ r.EncodeNil()
+ } else {
+ yy12 := *x.RunAsNonRoot
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(yy12))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("runAsNonRoot"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RunAsNonRoot == nil {
+ r.EncodeNil()
+ } else {
+ yy14 := *x.RunAsNonRoot
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeBool(bool(yy14))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.SupplementalGroups == nil {
+ r.EncodeNil()
+ } else {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ z.F.EncSliceInt64V(x.SupplementalGroups, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("supplementalGroups"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SupplementalGroups == nil {
+ r.EncodeNil()
+ } else {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ z.F.EncSliceInt64V(x.SupplementalGroups, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.FSGroup == nil {
+ r.EncodeNil()
+ } else {
+ yy20 := *x.FSGroup
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeInt(int64(yy20))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsGroup"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.FSGroup == nil {
+ r.EncodeNil()
+ } else {
+ yy22 := *x.FSGroup
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeInt(int64(yy22))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodSecurityContext) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodSecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "seLinuxOptions":
+ if r.TryDecodeAsNil() {
+ if x.SELinuxOptions != nil {
+ x.SELinuxOptions = nil
+ }
+ } else {
+ if x.SELinuxOptions == nil {
+ x.SELinuxOptions = new(SELinuxOptions)
+ }
+ x.SELinuxOptions.CodecDecodeSelf(d)
+ }
+ case "runAsUser":
+ if r.TryDecodeAsNil() {
+ if x.RunAsUser != nil {
+ x.RunAsUser = nil
+ }
+ } else {
+ if x.RunAsUser == nil {
+ x.RunAsUser = new(int64)
+ }
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*int64)(x.RunAsUser)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "runAsNonRoot":
+ if r.TryDecodeAsNil() {
+ if x.RunAsNonRoot != nil {
+ x.RunAsNonRoot = nil
+ }
+ } else {
+ if x.RunAsNonRoot == nil {
+ x.RunAsNonRoot = new(bool)
+ }
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*bool)(x.RunAsNonRoot)) = r.DecodeBool()
+ }
+ }
+ case "supplementalGroups":
+ if r.TryDecodeAsNil() {
+ x.SupplementalGroups = nil
+ } else {
+ yyv9 := &x.SupplementalGroups
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.DecSliceInt64X(yyv9, false, d)
+ }
+ }
+ case "fsGroup":
+ if r.TryDecodeAsNil() {
+ if x.FSGroup != nil {
+ x.FSGroup = nil
+ }
+ } else {
+ if x.FSGroup == nil {
+ x.FSGroup = new(int64)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int64)(x.FSGroup)) = int64(r.DecodeInt(64))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodSecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SELinuxOptions != nil {
+ x.SELinuxOptions = nil
+ }
+ } else {
+ if x.SELinuxOptions == nil {
+ x.SELinuxOptions = new(SELinuxOptions)
+ }
+ x.SELinuxOptions.CodecDecodeSelf(d)
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RunAsUser != nil {
+ x.RunAsUser = nil
+ }
+ } else {
+ if x.RunAsUser == nil {
+ x.RunAsUser = new(int64)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*int64)(x.RunAsUser)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RunAsNonRoot != nil {
+ x.RunAsNonRoot = nil
+ }
+ } else {
+ if x.RunAsNonRoot == nil {
+ x.RunAsNonRoot = new(bool)
+ }
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*bool)(x.RunAsNonRoot)) = r.DecodeBool()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SupplementalGroups = nil
+ } else {
+ yyv19 := &x.SupplementalGroups
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ z.F.DecSliceInt64X(yyv19, false, d)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FSGroup != nil {
+ x.FSGroup = nil
+ }
+ } else {
+ if x.FSGroup == nil {
+ x.FSGroup = new(int64)
+ }
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int64)(x.FSGroup)) = int64(r.DecodeInt(64))
+ }
+ }
+ for {
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj13-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x PodQOSClass) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *PodQOSClass) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *PodStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [10]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Phase != ""
+ yyq2[1] = len(x.Conditions) != 0
+ yyq2[2] = x.Message != ""
+ yyq2[3] = x.Reason != ""
+ yyq2[4] = x.HostIP != ""
+ yyq2[5] = x.PodIP != ""
+ yyq2[6] = x.StartTime != nil
+ yyq2[7] = len(x.InitContainerStatuses) != 0
+ yyq2[8] = len(x.ContainerStatuses) != 0
+ yyq2[9] = x.QOSClass != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(10)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ x.Phase.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("phase"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Phase.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSlicePodCondition(([]PodCondition)(x.Conditions), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("conditions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSlicePodCondition(([]PodCondition)(x.Conditions), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.HostIP))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostIP"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.HostIP))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.PodIP))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podIP"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.PodIP))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.StartTime == nil {
+ r.EncodeNil()
+ } else {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.StartTime) {
+ } else if yym22 {
+ z.EncBinaryMarshal(x.StartTime)
+ } else if !yym22 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.StartTime)
+ } else {
+ z.EncFallback(x.StartTime)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("startTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.StartTime == nil {
+ r.EncodeNil()
+ } else {
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.StartTime) {
+ } else if yym23 {
+ z.EncBinaryMarshal(x.StartTime)
+ } else if !yym23 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.StartTime)
+ } else {
+ z.EncFallback(x.StartTime)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.InitContainerStatuses == nil {
+ r.EncodeNil()
+ } else {
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ h.encSliceContainerStatus(([]ContainerStatus)(x.InitContainerStatuses), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("initContainerStatuses"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.InitContainerStatuses == nil {
+ r.EncodeNil()
+ } else {
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ h.encSliceContainerStatus(([]ContainerStatus)(x.InitContainerStatuses), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ if x.ContainerStatuses == nil {
+ r.EncodeNil()
+ } else {
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ h.encSliceContainerStatus(([]ContainerStatus)(x.ContainerStatuses), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("containerStatuses"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ContainerStatuses == nil {
+ r.EncodeNil()
+ } else {
+ yym29 := z.EncBinary()
+ _ = yym29
+ if false {
+ } else {
+ h.encSliceContainerStatus(([]ContainerStatus)(x.ContainerStatuses), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ x.QOSClass.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("qosClass"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.QOSClass.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "phase":
+ if r.TryDecodeAsNil() {
+ x.Phase = ""
+ } else {
+ yyv4 := &x.Phase
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "conditions":
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv5 := &x.Conditions
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSlicePodCondition((*[]PodCondition)(yyv5), d)
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv7 := &x.Message
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*string)(yyv7)) = r.DecodeString()
+ }
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv9 := &x.Reason
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ *((*string)(yyv9)) = r.DecodeString()
+ }
+ }
+ case "hostIP":
+ if r.TryDecodeAsNil() {
+ x.HostIP = ""
+ } else {
+ yyv11 := &x.HostIP
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*string)(yyv11)) = r.DecodeString()
+ }
+ }
+ case "podIP":
+ if r.TryDecodeAsNil() {
+ x.PodIP = ""
+ } else {
+ yyv13 := &x.PodIP
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ *((*string)(yyv13)) = r.DecodeString()
+ }
+ }
+ case "startTime":
+ if r.TryDecodeAsNil() {
+ if x.StartTime != nil {
+ x.StartTime = nil
+ }
+ } else {
+ if x.StartTime == nil {
+ x.StartTime = new(pkg2_v1.Time)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.StartTime) {
+ } else if yym16 {
+ z.DecBinaryUnmarshal(x.StartTime)
+ } else if !yym16 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.StartTime)
+ } else {
+ z.DecFallback(x.StartTime, false)
+ }
+ }
+ case "initContainerStatuses":
+ if r.TryDecodeAsNil() {
+ x.InitContainerStatuses = nil
+ } else {
+ yyv17 := &x.InitContainerStatuses
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ h.decSliceContainerStatus((*[]ContainerStatus)(yyv17), d)
+ }
+ }
+ case "containerStatuses":
+ if r.TryDecodeAsNil() {
+ x.ContainerStatuses = nil
+ } else {
+ yyv19 := &x.ContainerStatuses
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceContainerStatus((*[]ContainerStatus)(yyv19), d)
+ }
+ }
+ case "qosClass":
+ if r.TryDecodeAsNil() {
+ x.QOSClass = ""
+ } else {
+ yyv21 := &x.QOSClass
+ yyv21.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Phase = ""
+ } else {
+ yyv23 := &x.Phase
+ yyv23.CodecDecodeSelf(d)
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv24 := &x.Conditions
+ yym25 := z.DecBinary()
+ _ = yym25
+ if false {
+ } else {
+ h.decSlicePodCondition((*[]PodCondition)(yyv24), d)
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv26 := &x.Message
+ yym27 := z.DecBinary()
+ _ = yym27
+ if false {
+ } else {
+ *((*string)(yyv26)) = r.DecodeString()
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv28 := &x.Reason
+ yym29 := z.DecBinary()
+ _ = yym29
+ if false {
+ } else {
+ *((*string)(yyv28)) = r.DecodeString()
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostIP = ""
+ } else {
+ yyv30 := &x.HostIP
+ yym31 := z.DecBinary()
+ _ = yym31
+ if false {
+ } else {
+ *((*string)(yyv30)) = r.DecodeString()
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PodIP = ""
+ } else {
+ yyv32 := &x.PodIP
+ yym33 := z.DecBinary()
+ _ = yym33
+ if false {
+ } else {
+ *((*string)(yyv32)) = r.DecodeString()
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.StartTime != nil {
+ x.StartTime = nil
+ }
+ } else {
+ if x.StartTime == nil {
+ x.StartTime = new(pkg2_v1.Time)
+ }
+ yym35 := z.DecBinary()
+ _ = yym35
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.StartTime) {
+ } else if yym35 {
+ z.DecBinaryUnmarshal(x.StartTime)
+ } else if !yym35 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.StartTime)
+ } else {
+ z.DecFallback(x.StartTime, false)
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.InitContainerStatuses = nil
+ } else {
+ yyv36 := &x.InitContainerStatuses
+ yym37 := z.DecBinary()
+ _ = yym37
+ if false {
+ } else {
+ h.decSliceContainerStatus((*[]ContainerStatus)(yyv36), d)
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ContainerStatuses = nil
+ } else {
+ yyv38 := &x.ContainerStatuses
+ yym39 := z.DecBinary()
+ _ = yym39
+ if false {
+ } else {
+ h.decSliceContainerStatus((*[]ContainerStatus)(yyv38), d)
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.QOSClass = ""
+ } else {
+ yyv40 := &x.QOSClass
+ yyv40.CodecDecodeSelf(d)
+ }
+ for {
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj22-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodStatusResult) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = true
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Status
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Status
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodStatusResult) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodStatusResult) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 "status":
+ if r.TryDecodeAsNil() {
+ x.Status = PodStatus{}
+ } else {
+ yyv10 := &x.Status
+ yyv10.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodStatusResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv12 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv14 := &x.APIVersion
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv16 := &x.ObjectMeta
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv16) {
+ } else {
+ z.DecFallback(yyv16, false)
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = PodStatus{}
+ } else {
+ yyv18 := &x.Status
+ yyv18.CodecDecodeSelf(d)
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Pod) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Pod) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Pod) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 = PodSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = PodStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = PodSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = PodStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSlicePod(([]Pod)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSlicePod(([]Pod)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSlicePod((*[]Pod)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSlicePod((*[]Pod)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodTemplateSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[1] {
+ yy9 := &x.Spec
+ yy9.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy11 := &x.Spec
+ yy11.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodTemplateSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodTemplateSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "metadata":
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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 = PodSpec{}
+ } else {
+ yyv6 := &x.Spec
+ yyv6.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodTemplateSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = PodSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodTemplate) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = true
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Template
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("template"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Template
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodTemplate) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodTemplate) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 "template":
+ if r.TryDecodeAsNil() {
+ x.Template = PodTemplateSpec{}
+ } else {
+ yyv10 := &x.Template
+ yyv10.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv12 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv14 := &x.APIVersion
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv16 := &x.ObjectMeta
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv16) {
+ } else {
+ z.DecFallback(yyv16, false)
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Template = PodTemplateSpec{}
+ } else {
+ yyv18 := &x.Template
+ yyv18.CodecDecodeSelf(d)
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodTemplateList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSlicePodTemplate(([]PodTemplate)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSlicePodTemplate(([]PodTemplate)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodTemplateList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodTemplateList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSlicePodTemplate((*[]PodTemplate)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodTemplateList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSlicePodTemplate((*[]PodTemplate)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ReplicationControllerSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Replicas != nil
+ yyq2[1] = x.MinReadySeconds != 0
+ yyq2[2] = len(x.Selector) != 0
+ yyq2[3] = x.Template != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Replicas == nil {
+ r.EncodeNil()
+ } else {
+ yy4 := *x.Replicas
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(yy4))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Replicas == nil {
+ r.EncodeNil()
+ } else {
+ yy6 := *x.Replicas
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(yy6))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MinReadySeconds))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("minReadySeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MinReadySeconds))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Selector, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Selector, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Template == nil {
+ r.EncodeNil()
+ } else {
+ x.Template.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("template"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Template == nil {
+ r.EncodeNil()
+ } else {
+ x.Template.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ReplicationControllerSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ReplicationControllerSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "replicas":
+ if r.TryDecodeAsNil() {
+ if x.Replicas != nil {
+ x.Replicas = nil
+ }
+ } else {
+ if x.Replicas == nil {
+ x.Replicas = new(int32)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(x.Replicas)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "minReadySeconds":
+ if r.TryDecodeAsNil() {
+ x.MinReadySeconds = 0
+ } else {
+ yyv6 := &x.MinReadySeconds
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int32)(yyv6)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ x.Selector = nil
+ } else {
+ yyv8 := &x.Selector
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv8, false, d)
+ }
+ }
+ case "template":
+ if r.TryDecodeAsNil() {
+ if x.Template != nil {
+ x.Template = nil
+ }
+ } else {
+ if x.Template == nil {
+ x.Template = new(PodTemplateSpec)
+ }
+ x.Template.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ReplicationControllerSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Replicas != nil {
+ x.Replicas = nil
+ }
+ } else {
+ if x.Replicas == nil {
+ x.Replicas = new(int32)
+ }
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int32)(x.Replicas)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MinReadySeconds = 0
+ } else {
+ yyv14 := &x.MinReadySeconds
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*int32)(yyv14)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Selector = nil
+ } else {
+ yyv16 := &x.Selector
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv16, false, d)
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Template != nil {
+ x.Template = nil
+ }
+ } else {
+ if x.Template == nil {
+ x.Template = new(PodTemplateSpec)
+ }
+ x.Template.CodecDecodeSelf(d)
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ReplicationControllerStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.FullyLabeledReplicas != 0
+ yyq2[2] = x.ReadyReplicas != 0
+ yyq2[3] = x.AvailableReplicas != 0
+ yyq2[4] = x.ObservedGeneration != 0
+ yyq2[5] = len(x.Conditions) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(x.FullyLabeledReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fullyLabeledReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.FullyLabeledReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ReadyReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readyReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ReadyReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.AvailableReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("availableReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(x.AvailableReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ObservedGeneration))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("observedGeneration"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ObservedGeneration))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ h.encSliceReplicationControllerCondition(([]ReplicationControllerCondition)(x.Conditions), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("conditions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.encSliceReplicationControllerCondition(([]ReplicationControllerCondition)(x.Conditions), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ReplicationControllerStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ReplicationControllerStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "replicas":
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv4 := &x.Replicas
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(yyv4)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "fullyLabeledReplicas":
+ if r.TryDecodeAsNil() {
+ x.FullyLabeledReplicas = 0
+ } else {
+ yyv6 := &x.FullyLabeledReplicas
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int32)(yyv6)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "readyReplicas":
+ if r.TryDecodeAsNil() {
+ x.ReadyReplicas = 0
+ } else {
+ yyv8 := &x.ReadyReplicas
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "availableReplicas":
+ if r.TryDecodeAsNil() {
+ x.AvailableReplicas = 0
+ } else {
+ yyv10 := &x.AvailableReplicas
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(yyv10)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "observedGeneration":
+ if r.TryDecodeAsNil() {
+ x.ObservedGeneration = 0
+ } else {
+ yyv12 := &x.ObservedGeneration
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int64)(yyv12)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "conditions":
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv14 := &x.Conditions
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.decSliceReplicationControllerCondition((*[]ReplicationControllerCondition)(yyv14), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ReplicationControllerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj16 int
+ var yyb16 bool
+ var yyhl16 bool = l >= 0
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv17 := &x.Replicas
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int32)(yyv17)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FullyLabeledReplicas = 0
+ } else {
+ yyv19 := &x.FullyLabeledReplicas
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*int32)(yyv19)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadyReplicas = 0
+ } else {
+ yyv21 := &x.ReadyReplicas
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int32)(yyv21)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.AvailableReplicas = 0
+ } else {
+ yyv23 := &x.AvailableReplicas
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*int32)(yyv23)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObservedGeneration = 0
+ } else {
+ yyv25 := &x.ObservedGeneration
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*int64)(yyv25)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv27 := &x.Conditions
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ h.decSliceReplicationControllerCondition((*[]ReplicationControllerCondition)(yyv27), d)
+ }
+ }
+ for {
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj16-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x ReplicationControllerConditionType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *ReplicationControllerConditionType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *ReplicationControllerCondition) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = true
+ yyq2[3] = x.Reason != ""
+ yyq2[4] = x.Message != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Status.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Status.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy10 := &x.LastTransitionTime
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy10) {
+ } else if yym11 {
+ z.EncBinaryMarshal(yy10)
+ } else if !yym11 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy10)
+ } else {
+ z.EncFallback(yy10)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.LastTransitionTime
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if yym13 {
+ z.EncBinaryMarshal(yy12)
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ReplicationControllerCondition) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ReplicationControllerCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "lastTransitionTime":
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg2_v1.Time{}
+ } else {
+ yyv6 := &x.LastTransitionTime
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if yym7 {
+ z.DecBinaryUnmarshal(yyv6)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv8 := &x.Reason
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv10 := &x.Message
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ReplicationControllerCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv13 := &x.Type
+ yyv13.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv14 := &x.Status
+ yyv14.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg2_v1.Time{}
+ } else {
+ yyv15 := &x.LastTransitionTime
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv15) {
+ } else if yym16 {
+ z.DecBinaryUnmarshal(yyv15)
+ } else if !yym16 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv15)
+ } else {
+ z.DecFallback(yyv15, false)
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv17 := &x.Reason
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv19 := &x.Message
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ReplicationController) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ReplicationController) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ReplicationController) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 = ReplicationControllerSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ReplicationControllerStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = ReplicationControllerSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ReplicationControllerStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ReplicationControllerList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceReplicationController(([]ReplicationController)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceReplicationController(([]ReplicationController)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ReplicationControllerList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ReplicationControllerList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSliceReplicationController((*[]ReplicationController)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ReplicationControllerList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceReplicationController((*[]ReplicationController)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x ServiceAffinity) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *ServiceAffinity) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 ServiceType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *ServiceType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 ServiceExternalTrafficPolicyType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *ServiceExternalTrafficPolicyType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *ServiceStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = true
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yy4 := &x.LoadBalancer
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("loadBalancer"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.LoadBalancer
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ServiceStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ServiceStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "loadBalancer":
+ if r.TryDecodeAsNil() {
+ x.LoadBalancer = LoadBalancerStatus{}
+ } else {
+ yyv4 := &x.LoadBalancer
+ yyv4.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ServiceStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj5 int
+ var yyb5 bool
+ var yyhl5 bool = l >= 0
+ yyj5++
+ if yyhl5 {
+ yyb5 = yyj5 > l
+ } else {
+ yyb5 = r.CheckBreak()
+ }
+ if yyb5 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LoadBalancer = LoadBalancerStatus{}
+ } else {
+ yyv6 := &x.LoadBalancer
+ yyv6.CodecDecodeSelf(d)
+ }
+ for {
+ yyj5++
+ if yyhl5 {
+ yyb5 = yyj5 > l
+ } else {
+ yyb5 = r.CheckBreak()
+ }
+ if yyb5 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj5-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *LoadBalancerStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = len(x.Ingress) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Ingress == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceLoadBalancerIngress(([]LoadBalancerIngress)(x.Ingress), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ingress"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Ingress == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceLoadBalancerIngress(([]LoadBalancerIngress)(x.Ingress), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *LoadBalancerStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *LoadBalancerStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "ingress":
+ if r.TryDecodeAsNil() {
+ x.Ingress = nil
+ } else {
+ yyv4 := &x.Ingress
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceLoadBalancerIngress((*[]LoadBalancerIngress)(yyv4), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *LoadBalancerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Ingress = nil
+ } else {
+ yyv7 := &x.Ingress
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSliceLoadBalancerIngress((*[]LoadBalancerIngress)(yyv7), d)
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *LoadBalancerIngress) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.IP != ""
+ yyq2[1] = x.Hostname != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.IP))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ip"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.IP))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Hostname))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostname"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Hostname))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *LoadBalancerIngress) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *LoadBalancerIngress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "ip":
+ if r.TryDecodeAsNil() {
+ x.IP = ""
+ } else {
+ yyv4 := &x.IP
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "hostname":
+ if r.TryDecodeAsNil() {
+ x.Hostname = ""
+ } else {
+ yyv6 := &x.Hostname
+ 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_containerMapEnd1234)
+}
+
+func (x *LoadBalancerIngress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.IP = ""
+ } else {
+ yyv9 := &x.IP
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Hostname = ""
+ } else {
+ yyv11 := &x.Hostname
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ServiceSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [11]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = len(x.Ports) != 0
+ yyq2[1] = len(x.Selector) != 0
+ yyq2[2] = x.ClusterIP != ""
+ yyq2[3] = x.Type != ""
+ yyq2[4] = len(x.ExternalIPs) != 0
+ yyq2[5] = x.SessionAffinity != ""
+ yyq2[6] = x.LoadBalancerIP != ""
+ yyq2[7] = len(x.LoadBalancerSourceRanges) != 0
+ yyq2[8] = x.ExternalName != ""
+ yyq2[9] = x.ExternalTrafficPolicy != ""
+ yyq2[10] = x.HealthCheckNodePort != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(11)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Ports == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceServicePort(([]ServicePort)(x.Ports), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ports"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Ports == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceServicePort(([]ServicePort)(x.Ports), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Selector, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Selector, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ClusterIP))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("clusterIP"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ClusterIP))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.ExternalIPs == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.ExternalIPs, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("externalIPs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ExternalIPs == nil {
+ r.EncodeNil()
+ } else {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.ExternalIPs, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ x.SessionAffinity.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("sessionAffinity"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.SessionAffinity.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.LoadBalancerIP))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("loadBalancerIP"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.LoadBalancerIP))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.LoadBalancerSourceRanges == nil {
+ r.EncodeNil()
+ } else {
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.LoadBalancerSourceRanges, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("loadBalancerSourceRanges"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.LoadBalancerSourceRanges == nil {
+ r.EncodeNil()
+ } else {
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.LoadBalancerSourceRanges, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ExternalName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("externalName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym29 := z.EncBinary()
+ _ = yym29
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ExternalName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ x.ExternalTrafficPolicy.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("externalTrafficPolicy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.ExternalTrafficPolicy.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[10] {
+ yym34 := z.EncBinary()
+ _ = yym34
+ if false {
+ } else {
+ r.EncodeInt(int64(x.HealthCheckNodePort))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[10] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("healthCheckNodePort"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym35 := z.EncBinary()
+ _ = yym35
+ if false {
+ } else {
+ r.EncodeInt(int64(x.HealthCheckNodePort))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ServiceSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ServiceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "ports":
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv4 := &x.Ports
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceServicePort((*[]ServicePort)(yyv4), d)
+ }
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ x.Selector = nil
+ } else {
+ yyv6 := &x.Selector
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv6, false, d)
+ }
+ }
+ case "clusterIP":
+ if r.TryDecodeAsNil() {
+ x.ClusterIP = ""
+ } else {
+ yyv8 := &x.ClusterIP
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv10 := &x.Type
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "externalIPs":
+ if r.TryDecodeAsNil() {
+ x.ExternalIPs = nil
+ } else {
+ yyv11 := &x.ExternalIPs
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv11, false, d)
+ }
+ }
+ case "sessionAffinity":
+ if r.TryDecodeAsNil() {
+ x.SessionAffinity = ""
+ } else {
+ yyv13 := &x.SessionAffinity
+ yyv13.CodecDecodeSelf(d)
+ }
+ case "loadBalancerIP":
+ if r.TryDecodeAsNil() {
+ x.LoadBalancerIP = ""
+ } else {
+ yyv14 := &x.LoadBalancerIP
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ case "loadBalancerSourceRanges":
+ if r.TryDecodeAsNil() {
+ x.LoadBalancerSourceRanges = nil
+ } else {
+ yyv16 := &x.LoadBalancerSourceRanges
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv16, false, d)
+ }
+ }
+ case "externalName":
+ if r.TryDecodeAsNil() {
+ x.ExternalName = ""
+ } else {
+ yyv18 := &x.ExternalName
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*string)(yyv18)) = r.DecodeString()
+ }
+ }
+ case "externalTrafficPolicy":
+ if r.TryDecodeAsNil() {
+ x.ExternalTrafficPolicy = ""
+ } else {
+ yyv20 := &x.ExternalTrafficPolicy
+ yyv20.CodecDecodeSelf(d)
+ }
+ case "healthCheckNodePort":
+ if r.TryDecodeAsNil() {
+ x.HealthCheckNodePort = 0
+ } else {
+ yyv21 := &x.HealthCheckNodePort
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int32)(yyv21)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ServiceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj23 int
+ var yyb23 bool
+ var yyhl23 bool = l >= 0
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv24 := &x.Ports
+ yym25 := z.DecBinary()
+ _ = yym25
+ if false {
+ } else {
+ h.decSliceServicePort((*[]ServicePort)(yyv24), d)
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Selector = nil
+ } else {
+ yyv26 := &x.Selector
+ yym27 := z.DecBinary()
+ _ = yym27
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv26, false, d)
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ClusterIP = ""
+ } else {
+ yyv28 := &x.ClusterIP
+ yym29 := z.DecBinary()
+ _ = yym29
+ if false {
+ } else {
+ *((*string)(yyv28)) = r.DecodeString()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv30 := &x.Type
+ yyv30.CodecDecodeSelf(d)
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ExternalIPs = nil
+ } else {
+ yyv31 := &x.ExternalIPs
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv31, false, d)
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SessionAffinity = ""
+ } else {
+ yyv33 := &x.SessionAffinity
+ yyv33.CodecDecodeSelf(d)
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LoadBalancerIP = ""
+ } else {
+ yyv34 := &x.LoadBalancerIP
+ yym35 := z.DecBinary()
+ _ = yym35
+ if false {
+ } else {
+ *((*string)(yyv34)) = r.DecodeString()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LoadBalancerSourceRanges = nil
+ } else {
+ yyv36 := &x.LoadBalancerSourceRanges
+ yym37 := z.DecBinary()
+ _ = yym37
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv36, false, d)
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ExternalName = ""
+ } else {
+ yyv38 := &x.ExternalName
+ yym39 := z.DecBinary()
+ _ = yym39
+ if false {
+ } else {
+ *((*string)(yyv38)) = r.DecodeString()
+ }
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ExternalTrafficPolicy = ""
+ } else {
+ yyv40 := &x.ExternalTrafficPolicy
+ yyv40.CodecDecodeSelf(d)
+ }
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HealthCheckNodePort = 0
+ } else {
+ yyv41 := &x.HealthCheckNodePort
+ yym42 := z.DecBinary()
+ _ = yym42
+ if false {
+ } else {
+ *((*int32)(yyv41)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj23++
+ if yyhl23 {
+ yyb23 = yyj23 > l
+ } else {
+ yyb23 = r.CheckBreak()
+ }
+ if yyb23 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj23-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ServicePort) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Name != ""
+ yyq2[1] = x.Protocol != ""
+ yyq2[3] = true
+ yyq2[4] = x.NodePort != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ x.Protocol.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("protocol"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Protocol.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Port))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("port"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Port))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yy13 := &x.TargetPort
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy13) {
+ } else if !yym14 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy13)
+ } else {
+ z.EncFallback(yy13)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetPort"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy15 := &x.TargetPort
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy15) {
+ } else if !yym16 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy15)
+ } else {
+ z.EncFallback(yy15)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeInt(int64(x.NodePort))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nodePort"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeInt(int64(x.NodePort))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ServicePort) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ServicePort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "protocol":
+ if r.TryDecodeAsNil() {
+ x.Protocol = ""
+ } else {
+ yyv6 := &x.Protocol
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "port":
+ if r.TryDecodeAsNil() {
+ x.Port = 0
+ } else {
+ yyv7 := &x.Port
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*int32)(yyv7)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "targetPort":
+ if r.TryDecodeAsNil() {
+ x.TargetPort = pkg4_intstr.IntOrString{}
+ } else {
+ yyv9 := &x.TargetPort
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv9) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv9)
+ } else {
+ z.DecFallback(yyv9, false)
+ }
+ }
+ case "nodePort":
+ if r.TryDecodeAsNil() {
+ x.NodePort = 0
+ } else {
+ yyv11 := &x.NodePort
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int32)(yyv11)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ServicePort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv14 := &x.Name
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Protocol = ""
+ } else {
+ yyv16 := &x.Protocol
+ yyv16.CodecDecodeSelf(d)
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Port = 0
+ } else {
+ yyv17 := &x.Port
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int32)(yyv17)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TargetPort = pkg4_intstr.IntOrString{}
+ } else {
+ yyv19 := &x.TargetPort
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv19) {
+ } else if !yym20 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv19)
+ } else {
+ z.DecFallback(yyv19, false)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NodePort = 0
+ } else {
+ yyv21 := &x.NodePort
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int32)(yyv21)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj13-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Service) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Service) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Service) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 = ServiceSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ServiceStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = ServiceSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ServiceStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ServiceList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceService(([]Service)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceService(([]Service)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ServiceList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ServiceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSliceService((*[]Service)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ServiceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceService((*[]Service)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ServiceAccount) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Kind != ""
+ yyq2[1] = x.APIVersion != ""
+ yyq2[2] = true
+ yyq2[3] = len(x.Secrets) != 0
+ yyq2[4] = len(x.ImagePullSecrets) != 0
+ yyq2[5] = x.AutomountServiceAccountToken != 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Secrets == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceObjectReference(([]ObjectReference)(x.Secrets), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secrets"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Secrets == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceObjectReference(([]ObjectReference)(x.Secrets), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.ImagePullSecrets == nil {
+ r.EncodeNil()
+ } else {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("imagePullSecrets"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ImagePullSecrets == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ h.encSliceLocalObjectReference(([]LocalObjectReference)(x.ImagePullSecrets), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.AutomountServiceAccountToken == nil {
+ r.EncodeNil()
+ } else {
+ yy21 := *x.AutomountServiceAccountToken
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeBool(bool(yy21))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("automountServiceAccountToken"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.AutomountServiceAccountToken == nil {
+ r.EncodeNil()
+ } else {
+ yy23 := *x.AutomountServiceAccountToken
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else {
+ r.EncodeBool(bool(yy23))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ServiceAccount) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ServiceAccount) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 "secrets":
+ if r.TryDecodeAsNil() {
+ x.Secrets = nil
+ } else {
+ yyv10 := &x.Secrets
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSliceObjectReference((*[]ObjectReference)(yyv10), d)
+ }
+ }
+ case "imagePullSecrets":
+ if r.TryDecodeAsNil() {
+ x.ImagePullSecrets = nil
+ } else {
+ yyv12 := &x.ImagePullSecrets
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv12), d)
+ }
+ }
+ case "automountServiceAccountToken":
+ if r.TryDecodeAsNil() {
+ if x.AutomountServiceAccountToken != nil {
+ x.AutomountServiceAccountToken = nil
+ }
+ } else {
+ if x.AutomountServiceAccountToken == nil {
+ x.AutomountServiceAccountToken = new(bool)
+ }
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*bool)(x.AutomountServiceAccountToken)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj16 int
+ var yyb16 bool
+ var yyhl16 bool = l >= 0
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv17 := &x.Kind
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv19 := &x.APIVersion
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv21 := &x.ObjectMeta
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv21) {
+ } else {
+ z.DecFallback(yyv21, false)
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Secrets = nil
+ } else {
+ yyv23 := &x.Secrets
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ h.decSliceObjectReference((*[]ObjectReference)(yyv23), d)
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ImagePullSecrets = nil
+ } else {
+ yyv25 := &x.ImagePullSecrets
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv25), d)
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.AutomountServiceAccountToken != nil {
+ x.AutomountServiceAccountToken = nil
+ }
+ } else {
+ if x.AutomountServiceAccountToken == nil {
+ x.AutomountServiceAccountToken = new(bool)
+ }
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*bool)(x.AutomountServiceAccountToken)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj16-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ServiceAccountList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceServiceAccount(([]ServiceAccount)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceServiceAccount(([]ServiceAccount)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ServiceAccountList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ServiceAccountList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSliceServiceAccount((*[]ServiceAccount)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ServiceAccountList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceServiceAccount((*[]ServiceAccount)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Endpoints) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Subsets == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceEndpointSubset(([]EndpointSubset)(x.Subsets), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("subsets"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Subsets == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceEndpointSubset(([]EndpointSubset)(x.Subsets), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Endpoints) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Endpoints) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 "subsets":
+ if r.TryDecodeAsNil() {
+ x.Subsets = nil
+ } else {
+ yyv10 := &x.Subsets
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSliceEndpointSubset((*[]EndpointSubset)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Endpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Subsets = nil
+ } else {
+ yyv19 := &x.Subsets
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceEndpointSubset((*[]EndpointSubset)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *EndpointSubset) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Addresses) != 0
+ yyq2[1] = len(x.NotReadyAddresses) != 0
+ yyq2[2] = len(x.Ports) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Addresses == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceEndpointAddress(([]EndpointAddress)(x.Addresses), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("addresses"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Addresses == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceEndpointAddress(([]EndpointAddress)(x.Addresses), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.NotReadyAddresses == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceEndpointAddress(([]EndpointAddress)(x.NotReadyAddresses), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("notReadyAddresses"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NotReadyAddresses == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceEndpointAddress(([]EndpointAddress)(x.NotReadyAddresses), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Ports == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceEndpointPort(([]EndpointPort)(x.Ports), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ports"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Ports == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.encSliceEndpointPort(([]EndpointPort)(x.Ports), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *EndpointSubset) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *EndpointSubset) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "addresses":
+ if r.TryDecodeAsNil() {
+ x.Addresses = nil
+ } else {
+ yyv4 := &x.Addresses
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceEndpointAddress((*[]EndpointAddress)(yyv4), d)
+ }
+ }
+ case "notReadyAddresses":
+ if r.TryDecodeAsNil() {
+ x.NotReadyAddresses = nil
+ } else {
+ yyv6 := &x.NotReadyAddresses
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceEndpointAddress((*[]EndpointAddress)(yyv6), d)
+ }
+ }
+ case "ports":
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv8 := &x.Ports
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.decSliceEndpointPort((*[]EndpointPort)(yyv8), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *EndpointSubset) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Addresses = nil
+ } else {
+ yyv11 := &x.Addresses
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceEndpointAddress((*[]EndpointAddress)(yyv11), d)
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NotReadyAddresses = nil
+ } else {
+ yyv13 := &x.NotReadyAddresses
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceEndpointAddress((*[]EndpointAddress)(yyv13), d)
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv15 := &x.Ports
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.decSliceEndpointPort((*[]EndpointPort)(yyv15), d)
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *EndpointAddress) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.Hostname != ""
+ yyq2[2] = x.NodeName != nil
+ yyq2[3] = x.TargetRef != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.IP))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ip"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.IP))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Hostname))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostname"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Hostname))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.NodeName == nil {
+ r.EncodeNil()
+ } else {
+ yy10 := *x.NodeName
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yy10))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nodeName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NodeName == nil {
+ r.EncodeNil()
+ } else {
+ yy12 := *x.NodeName
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yy12))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.TargetRef == nil {
+ r.EncodeNil()
+ } else {
+ x.TargetRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TargetRef == nil {
+ r.EncodeNil()
+ } else {
+ x.TargetRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *EndpointAddress) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *EndpointAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "ip":
+ if r.TryDecodeAsNil() {
+ x.IP = ""
+ } else {
+ yyv4 := &x.IP
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "hostname":
+ if r.TryDecodeAsNil() {
+ x.Hostname = ""
+ } else {
+ yyv6 := &x.Hostname
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "nodeName":
+ if r.TryDecodeAsNil() {
+ if x.NodeName != nil {
+ x.NodeName = nil
+ }
+ } else {
+ if x.NodeName == nil {
+ x.NodeName = new(string)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(x.NodeName)) = r.DecodeString()
+ }
+ }
+ case "targetRef":
+ if r.TryDecodeAsNil() {
+ if x.TargetRef != nil {
+ x.TargetRef = nil
+ }
+ } else {
+ if x.TargetRef == nil {
+ x.TargetRef = new(ObjectReference)
+ }
+ x.TargetRef.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *EndpointAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.IP = ""
+ } else {
+ yyv12 := &x.IP
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Hostname = ""
+ } else {
+ yyv14 := &x.Hostname
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.NodeName != nil {
+ x.NodeName = nil
+ }
+ } else {
+ if x.NodeName == nil {
+ x.NodeName = new(string)
+ }
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(x.NodeName)) = r.DecodeString()
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.TargetRef != nil {
+ x.TargetRef = nil
+ }
+ } else {
+ if x.TargetRef == nil {
+ x.TargetRef = new(ObjectReference)
+ }
+ x.TargetRef.CodecDecodeSelf(d)
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *EndpointPort) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Name != ""
+ yyq2[2] = x.Protocol != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Port))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("port"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Port))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ x.Protocol.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("protocol"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Protocol.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *EndpointPort) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *EndpointPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "port":
+ if r.TryDecodeAsNil() {
+ x.Port = 0
+ } else {
+ yyv6 := &x.Port
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int32)(yyv6)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "protocol":
+ if r.TryDecodeAsNil() {
+ x.Protocol = ""
+ } else {
+ yyv8 := &x.Protocol
+ yyv8.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *EndpointPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv10 := &x.Name
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Port = 0
+ } else {
+ yyv12 := &x.Port
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int32)(yyv12)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Protocol = ""
+ } else {
+ yyv14 := &x.Protocol
+ yyv14.CodecDecodeSelf(d)
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *EndpointsList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceEndpoints(([]Endpoints)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceEndpoints(([]Endpoints)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *EndpointsList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *EndpointsList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSliceEndpoints((*[]Endpoints)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *EndpointsList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceEndpoints((*[]Endpoints)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NodeSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.PodCIDR != ""
+ yyq2[1] = x.ExternalID != ""
+ yyq2[2] = x.ProviderID != ""
+ yyq2[3] = x.Unschedulable != false
+ yyq2[4] = len(x.Taints) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.PodCIDR))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podCIDR"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.PodCIDR))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ExternalID))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("externalID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ExternalID))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ProviderID))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("providerID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ProviderID))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Unschedulable))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("unschedulable"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Unschedulable))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.Taints == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceTaint(([]Taint)(x.Taints), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("taints"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Taints == nil {
+ r.EncodeNil()
+ } else {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ h.encSliceTaint(([]Taint)(x.Taints), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NodeSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NodeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "podCIDR":
+ if r.TryDecodeAsNil() {
+ x.PodCIDR = ""
+ } else {
+ yyv4 := &x.PodCIDR
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "externalID":
+ if r.TryDecodeAsNil() {
+ x.ExternalID = ""
+ } else {
+ yyv6 := &x.ExternalID
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "providerID":
+ if r.TryDecodeAsNil() {
+ x.ProviderID = ""
+ } else {
+ yyv8 := &x.ProviderID
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "unschedulable":
+ if r.TryDecodeAsNil() {
+ x.Unschedulable = false
+ } else {
+ yyv10 := &x.Unschedulable
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*bool)(yyv10)) = r.DecodeBool()
+ }
+ }
+ case "taints":
+ if r.TryDecodeAsNil() {
+ x.Taints = nil
+ } else {
+ yyv12 := &x.Taints
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ h.decSliceTaint((*[]Taint)(yyv12), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NodeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PodCIDR = ""
+ } else {
+ yyv15 := &x.PodCIDR
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ExternalID = ""
+ } else {
+ yyv17 := &x.ExternalID
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ProviderID = ""
+ } else {
+ yyv19 := &x.ProviderID
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Unschedulable = false
+ } else {
+ yyv21 := &x.Unschedulable
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*bool)(yyv21)) = r.DecodeBool()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Taints = nil
+ } else {
+ yyv23 := &x.Taints
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ h.decSliceTaint((*[]Taint)(yyv23), d)
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DaemonEndpoint) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Port))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("Port"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Port))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DaemonEndpoint) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DaemonEndpoint) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "Port":
+ if r.TryDecodeAsNil() {
+ x.Port = 0
+ } else {
+ yyv4 := &x.Port
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(yyv4)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DaemonEndpoint) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Port = 0
+ } else {
+ yyv7 := &x.Port
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*int32)(yyv7)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NodeDaemonEndpoints) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = true
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yy4 := &x.KubeletEndpoint
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kubeletEndpoint"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.KubeletEndpoint
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NodeDaemonEndpoints) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NodeDaemonEndpoints) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "kubeletEndpoint":
+ if r.TryDecodeAsNil() {
+ x.KubeletEndpoint = DaemonEndpoint{}
+ } else {
+ yyv4 := &x.KubeletEndpoint
+ yyv4.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NodeDaemonEndpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj5 int
+ var yyb5 bool
+ var yyhl5 bool = l >= 0
+ yyj5++
+ if yyhl5 {
+ yyb5 = yyj5 > l
+ } else {
+ yyb5 = r.CheckBreak()
+ }
+ if yyb5 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.KubeletEndpoint = DaemonEndpoint{}
+ } else {
+ yyv6 := &x.KubeletEndpoint
+ yyv6.CodecDecodeSelf(d)
+ }
+ for {
+ yyj5++
+ if yyhl5 {
+ yyb5 = yyj5 > l
+ } else {
+ yyb5 = r.CheckBreak()
+ }
+ if yyb5 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj5-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NodeSystemInfo) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [10]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(10)
+ } else {
+ yynn2 = 10
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MachineID))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("machineID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MachineID))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SystemUUID))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("systemUUID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SystemUUID))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.BootID))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("bootID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.BootID))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.KernelVersion))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kernelVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.KernelVersion))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.OSImage))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("osImage"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.OSImage))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ContainerRuntimeVersion))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("containerRuntimeVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ContainerRuntimeVersion))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.KubeletVersion))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kubeletVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.KubeletVersion))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.KubeProxyVersion))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kubeProxyVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.KubeProxyVersion))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.OperatingSystem))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("operatingSystem"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym29 := z.EncBinary()
+ _ = yym29
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.OperatingSystem))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym31 := z.EncBinary()
+ _ = yym31
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Architecture))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("architecture"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym32 := z.EncBinary()
+ _ = yym32
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Architecture))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NodeSystemInfo) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NodeSystemInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "machineID":
+ if r.TryDecodeAsNil() {
+ x.MachineID = ""
+ } else {
+ yyv4 := &x.MachineID
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "systemUUID":
+ if r.TryDecodeAsNil() {
+ x.SystemUUID = ""
+ } else {
+ yyv6 := &x.SystemUUID
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "bootID":
+ if r.TryDecodeAsNil() {
+ x.BootID = ""
+ } else {
+ yyv8 := &x.BootID
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "kernelVersion":
+ if r.TryDecodeAsNil() {
+ x.KernelVersion = ""
+ } else {
+ yyv10 := &x.KernelVersion
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "osImage":
+ if r.TryDecodeAsNil() {
+ x.OSImage = ""
+ } else {
+ yyv12 := &x.OSImage
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ case "containerRuntimeVersion":
+ if r.TryDecodeAsNil() {
+ x.ContainerRuntimeVersion = ""
+ } else {
+ yyv14 := &x.ContainerRuntimeVersion
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ case "kubeletVersion":
+ if r.TryDecodeAsNil() {
+ x.KubeletVersion = ""
+ } else {
+ yyv16 := &x.KubeletVersion
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ case "kubeProxyVersion":
+ if r.TryDecodeAsNil() {
+ x.KubeProxyVersion = ""
+ } else {
+ yyv18 := &x.KubeProxyVersion
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*string)(yyv18)) = r.DecodeString()
+ }
+ }
+ case "operatingSystem":
+ if r.TryDecodeAsNil() {
+ x.OperatingSystem = ""
+ } else {
+ yyv20 := &x.OperatingSystem
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ *((*string)(yyv20)) = r.DecodeString()
+ }
+ }
+ case "architecture":
+ if r.TryDecodeAsNil() {
+ x.Architecture = ""
+ } else {
+ yyv22 := &x.Architecture
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else {
+ *((*string)(yyv22)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NodeSystemInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj24 int
+ var yyb24 bool
+ var yyhl24 bool = l >= 0
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MachineID = ""
+ } else {
+ yyv25 := &x.MachineID
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*string)(yyv25)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SystemUUID = ""
+ } else {
+ yyv27 := &x.SystemUUID
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*string)(yyv27)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.BootID = ""
+ } else {
+ yyv29 := &x.BootID
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*string)(yyv29)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.KernelVersion = ""
+ } else {
+ yyv31 := &x.KernelVersion
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*string)(yyv31)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.OSImage = ""
+ } else {
+ yyv33 := &x.OSImage
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ *((*string)(yyv33)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ContainerRuntimeVersion = ""
+ } else {
+ yyv35 := &x.ContainerRuntimeVersion
+ yym36 := z.DecBinary()
+ _ = yym36
+ if false {
+ } else {
+ *((*string)(yyv35)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.KubeletVersion = ""
+ } else {
+ yyv37 := &x.KubeletVersion
+ yym38 := z.DecBinary()
+ _ = yym38
+ if false {
+ } else {
+ *((*string)(yyv37)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.KubeProxyVersion = ""
+ } else {
+ yyv39 := &x.KubeProxyVersion
+ yym40 := z.DecBinary()
+ _ = yym40
+ if false {
+ } else {
+ *((*string)(yyv39)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.OperatingSystem = ""
+ } else {
+ yyv41 := &x.OperatingSystem
+ yym42 := z.DecBinary()
+ _ = yym42
+ if false {
+ } else {
+ *((*string)(yyv41)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Architecture = ""
+ } else {
+ yyv43 := &x.Architecture
+ yym44 := z.DecBinary()
+ _ = yym44
+ if false {
+ } else {
+ *((*string)(yyv43)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj24-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NodeStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [10]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = len(x.Capacity) != 0
+ yyq2[1] = len(x.Allocatable) != 0
+ yyq2[2] = x.Phase != ""
+ yyq2[3] = len(x.Conditions) != 0
+ yyq2[4] = len(x.Addresses) != 0
+ yyq2[5] = true
+ yyq2[6] = true
+ yyq2[7] = len(x.Images) != 0
+ yyq2[8] = len(x.VolumesInUse) != 0
+ yyq2[9] = len(x.VolumesAttached) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(10)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Capacity == nil {
+ r.EncodeNil()
+ } else {
+ x.Capacity.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("capacity"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Capacity == nil {
+ r.EncodeNil()
+ } else {
+ x.Capacity.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Allocatable == nil {
+ r.EncodeNil()
+ } else {
+ x.Allocatable.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("allocatable"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Allocatable == nil {
+ r.EncodeNil()
+ } else {
+ x.Allocatable.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ x.Phase.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("phase"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Phase.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ h.encSliceNodeCondition(([]NodeCondition)(x.Conditions), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("conditions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.encSliceNodeCondition(([]NodeCondition)(x.Conditions), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.Addresses == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceNodeAddress(([]NodeAddress)(x.Addresses), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("addresses"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Addresses == nil {
+ r.EncodeNil()
+ } else {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ h.encSliceNodeAddress(([]NodeAddress)(x.Addresses), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yy19 := &x.DaemonEndpoints
+ yy19.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("daemonEndpoints"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy21 := &x.DaemonEndpoints
+ yy21.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yy24 := &x.NodeInfo
+ yy24.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nodeInfo"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy26 := &x.NodeInfo
+ yy26.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.Images == nil {
+ r.EncodeNil()
+ } else {
+ yym29 := z.EncBinary()
+ _ = yym29
+ if false {
+ } else {
+ h.encSliceContainerImage(([]ContainerImage)(x.Images), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("images"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Images == nil {
+ r.EncodeNil()
+ } else {
+ yym30 := z.EncBinary()
+ _ = yym30
+ if false {
+ } else {
+ h.encSliceContainerImage(([]ContainerImage)(x.Images), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ if x.VolumesInUse == nil {
+ r.EncodeNil()
+ } else {
+ yym32 := z.EncBinary()
+ _ = yym32
+ if false {
+ } else {
+ h.encSliceUniqueVolumeName(([]UniqueVolumeName)(x.VolumesInUse), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumesInUse"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.VolumesInUse == nil {
+ r.EncodeNil()
+ } else {
+ yym33 := z.EncBinary()
+ _ = yym33
+ if false {
+ } else {
+ h.encSliceUniqueVolumeName(([]UniqueVolumeName)(x.VolumesInUse), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ if x.VolumesAttached == nil {
+ r.EncodeNil()
+ } else {
+ yym35 := z.EncBinary()
+ _ = yym35
+ if false {
+ } else {
+ h.encSliceAttachedVolume(([]AttachedVolume)(x.VolumesAttached), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumesAttached"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.VolumesAttached == nil {
+ r.EncodeNil()
+ } else {
+ yym36 := z.EncBinary()
+ _ = yym36
+ if false {
+ } else {
+ h.encSliceAttachedVolume(([]AttachedVolume)(x.VolumesAttached), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NodeStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NodeStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "capacity":
+ if r.TryDecodeAsNil() {
+ x.Capacity = nil
+ } else {
+ yyv4 := &x.Capacity
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "allocatable":
+ if r.TryDecodeAsNil() {
+ x.Allocatable = nil
+ } else {
+ yyv5 := &x.Allocatable
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "phase":
+ if r.TryDecodeAsNil() {
+ x.Phase = ""
+ } else {
+ yyv6 := &x.Phase
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "conditions":
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv7 := &x.Conditions
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSliceNodeCondition((*[]NodeCondition)(yyv7), d)
+ }
+ }
+ case "addresses":
+ if r.TryDecodeAsNil() {
+ x.Addresses = nil
+ } else {
+ yyv9 := &x.Addresses
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceNodeAddress((*[]NodeAddress)(yyv9), d)
+ }
+ }
+ case "daemonEndpoints":
+ if r.TryDecodeAsNil() {
+ x.DaemonEndpoints = NodeDaemonEndpoints{}
+ } else {
+ yyv11 := &x.DaemonEndpoints
+ yyv11.CodecDecodeSelf(d)
+ }
+ case "nodeInfo":
+ if r.TryDecodeAsNil() {
+ x.NodeInfo = NodeSystemInfo{}
+ } else {
+ yyv12 := &x.NodeInfo
+ yyv12.CodecDecodeSelf(d)
+ }
+ case "images":
+ if r.TryDecodeAsNil() {
+ x.Images = nil
+ } else {
+ yyv13 := &x.Images
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceContainerImage((*[]ContainerImage)(yyv13), d)
+ }
+ }
+ case "volumesInUse":
+ if r.TryDecodeAsNil() {
+ x.VolumesInUse = nil
+ } else {
+ yyv15 := &x.VolumesInUse
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.decSliceUniqueVolumeName((*[]UniqueVolumeName)(yyv15), d)
+ }
+ }
+ case "volumesAttached":
+ if r.TryDecodeAsNil() {
+ x.VolumesAttached = nil
+ } else {
+ yyv17 := &x.VolumesAttached
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ h.decSliceAttachedVolume((*[]AttachedVolume)(yyv17), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NodeStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj19 int
+ var yyb19 bool
+ var yyhl19 bool = l >= 0
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Capacity = nil
+ } else {
+ yyv20 := &x.Capacity
+ yyv20.CodecDecodeSelf(d)
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Allocatable = nil
+ } else {
+ yyv21 := &x.Allocatable
+ yyv21.CodecDecodeSelf(d)
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Phase = ""
+ } else {
+ yyv22 := &x.Phase
+ yyv22.CodecDecodeSelf(d)
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv23 := &x.Conditions
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ h.decSliceNodeCondition((*[]NodeCondition)(yyv23), d)
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Addresses = nil
+ } else {
+ yyv25 := &x.Addresses
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ h.decSliceNodeAddress((*[]NodeAddress)(yyv25), d)
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DaemonEndpoints = NodeDaemonEndpoints{}
+ } else {
+ yyv27 := &x.DaemonEndpoints
+ yyv27.CodecDecodeSelf(d)
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NodeInfo = NodeSystemInfo{}
+ } else {
+ yyv28 := &x.NodeInfo
+ yyv28.CodecDecodeSelf(d)
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Images = nil
+ } else {
+ yyv29 := &x.Images
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ h.decSliceContainerImage((*[]ContainerImage)(yyv29), d)
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumesInUse = nil
+ } else {
+ yyv31 := &x.VolumesInUse
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ h.decSliceUniqueVolumeName((*[]UniqueVolumeName)(yyv31), d)
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumesAttached = nil
+ } else {
+ yyv33 := &x.VolumesAttached
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ h.decSliceAttachedVolume((*[]AttachedVolume)(yyv33), d)
+ }
+ }
+ for {
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj19-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x UniqueVolumeName) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *UniqueVolumeName) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *AttachedVolume) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Name.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Name.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DevicePath))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("devicePath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.DevicePath))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *AttachedVolume) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *AttachedVolume) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "devicePath":
+ if r.TryDecodeAsNil() {
+ x.DevicePath = ""
+ } else {
+ yyv5 := &x.DevicePath
+ 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_containerMapEnd1234)
+}
+
+func (x *AttachedVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv8 := &x.Name
+ yyv8.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DevicePath = ""
+ } else {
+ yyv9 := &x.DevicePath
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *AvoidPods) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = len(x.PreferAvoidPods) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.PreferAvoidPods == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSlicePreferAvoidPodsEntry(([]PreferAvoidPodsEntry)(x.PreferAvoidPods), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("preferAvoidPods"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PreferAvoidPods == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSlicePreferAvoidPodsEntry(([]PreferAvoidPodsEntry)(x.PreferAvoidPods), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *AvoidPods) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *AvoidPods) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "preferAvoidPods":
+ if r.TryDecodeAsNil() {
+ x.PreferAvoidPods = nil
+ } else {
+ yyv4 := &x.PreferAvoidPods
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSlicePreferAvoidPodsEntry((*[]PreferAvoidPodsEntry)(yyv4), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *AvoidPods) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PreferAvoidPods = nil
+ } else {
+ yyv7 := &x.PreferAvoidPods
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSlicePreferAvoidPodsEntry((*[]PreferAvoidPodsEntry)(yyv7), d)
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PreferAvoidPodsEntry) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = true
+ yyq2[2] = x.Reason != ""
+ yyq2[3] = x.Message != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy4 := &x.PodSignature
+ yy4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podSignature"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.PodSignature
+ yy6.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yy9 := &x.EvictionTime
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy9) {
+ } else if yym10 {
+ z.EncBinaryMarshal(yy9)
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy9)
+ } else {
+ z.EncFallback(yy9)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("evictionTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy11 := &x.EvictionTime
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy11) {
+ } else if yym12 {
+ z.EncBinaryMarshal(yy11)
+ } else if !yym12 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy11)
+ } else {
+ z.EncFallback(yy11)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PreferAvoidPodsEntry) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PreferAvoidPodsEntry) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "podSignature":
+ if r.TryDecodeAsNil() {
+ x.PodSignature = PodSignature{}
+ } else {
+ yyv4 := &x.PodSignature
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "evictionTime":
+ if r.TryDecodeAsNil() {
+ x.EvictionTime = pkg2_v1.Time{}
+ } else {
+ yyv5 := &x.EvictionTime
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv5) {
+ } else if yym6 {
+ z.DecBinaryUnmarshal(yyv5)
+ } else if !yym6 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv5)
+ } else {
+ z.DecFallback(yyv5, false)
+ }
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv7 := &x.Reason
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*string)(yyv7)) = r.DecodeString()
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv9 := &x.Message
+ 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_containerMapEnd1234)
+}
+
+func (x *PreferAvoidPodsEntry) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PodSignature = PodSignature{}
+ } else {
+ yyv12 := &x.PodSignature
+ yyv12.CodecDecodeSelf(d)
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.EvictionTime = pkg2_v1.Time{}
+ } else {
+ yyv13 := &x.EvictionTime
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv13) {
+ } else if yym14 {
+ z.DecBinaryUnmarshal(yyv13)
+ } else if !yym14 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv13)
+ } else {
+ z.DecFallback(yyv13, false)
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv15 := &x.Reason
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*string)(yyv15)) = r.DecodeString()
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv17 := &x.Message
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodSignature) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = x.PodController != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.PodController == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.PodController) {
+ } else {
+ z.EncFallback(x.PodController)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podController"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PodController == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.PodController) {
+ } else {
+ z.EncFallback(x.PodController)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodSignature) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodSignature) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "podController":
+ if r.TryDecodeAsNil() {
+ if x.PodController != nil {
+ x.PodController = nil
+ }
+ } else {
+ if x.PodController == nil {
+ x.PodController = new(pkg2_v1.OwnerReference)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.PodController) {
+ } else {
+ z.DecFallback(x.PodController, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodSignature) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PodController != nil {
+ x.PodController = nil
+ }
+ } else {
+ if x.PodController == nil {
+ x.PodController = new(pkg2_v1.OwnerReference)
+ }
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.PodController) {
+ } else {
+ z.DecFallback(x.PodController, false)
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ContainerImage) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.SizeBytes != 0
+ 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_containerArrayElem1234)
+ if x.Names == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Names, false, e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("names"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Names == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Names, false, e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(x.SizeBytes))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("sizeBytes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.SizeBytes))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ContainerImage) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ContainerImage) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "names":
+ if r.TryDecodeAsNil() {
+ x.Names = nil
+ } else {
+ yyv4 := &x.Names
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv4, false, d)
+ }
+ }
+ case "sizeBytes":
+ if r.TryDecodeAsNil() {
+ x.SizeBytes = 0
+ } else {
+ yyv6 := &x.SizeBytes
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int64)(yyv6)) = int64(r.DecodeInt(64))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ContainerImage) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Names = nil
+ } else {
+ yyv9 := &x.Names
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv9, false, d)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SizeBytes = 0
+ } else {
+ yyv11 := &x.SizeBytes
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int64)(yyv11)) = int64(r.DecodeInt(64))
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x NodePhase) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *NodePhase) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 NodeConditionType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *NodeConditionType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *NodeCondition) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = true
+ yyq2[3] = true
+ yyq2[4] = x.Reason != ""
+ yyq2[5] = x.Message != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Status.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Status.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy10 := &x.LastHeartbeatTime
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy10) {
+ } else if yym11 {
+ z.EncBinaryMarshal(yy10)
+ } else if !yym11 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy10)
+ } else {
+ z.EncFallback(yy10)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastHeartbeatTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.LastHeartbeatTime
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if yym13 {
+ z.EncBinaryMarshal(yy12)
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.LastTransitionTime
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy15) {
+ } else if yym16 {
+ z.EncBinaryMarshal(yy15)
+ } else if !yym16 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy15)
+ } else {
+ z.EncFallback(yy15)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.LastTransitionTime
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy17) {
+ } else if yym18 {
+ z.EncBinaryMarshal(yy17)
+ } else if !yym18 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy17)
+ } else {
+ z.EncFallback(yy17)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NodeCondition) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NodeCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "lastHeartbeatTime":
+ if r.TryDecodeAsNil() {
+ x.LastHeartbeatTime = pkg2_v1.Time{}
+ } else {
+ yyv6 := &x.LastHeartbeatTime
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if yym7 {
+ z.DecBinaryUnmarshal(yyv6)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ case "lastTransitionTime":
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg2_v1.Time{}
+ } else {
+ yyv8 := &x.LastTransitionTime
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv8) {
+ } else if yym9 {
+ z.DecBinaryUnmarshal(yyv8)
+ } else if !yym9 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv8)
+ } else {
+ z.DecFallback(yyv8, false)
+ }
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv10 := &x.Reason
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv12 := &x.Message
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NodeCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv15 := &x.Type
+ yyv15.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv16 := &x.Status
+ yyv16.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastHeartbeatTime = pkg2_v1.Time{}
+ } else {
+ yyv17 := &x.LastHeartbeatTime
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv17) {
+ } else if yym18 {
+ z.DecBinaryUnmarshal(yyv17)
+ } else if !yym18 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv17)
+ } else {
+ z.DecFallback(yyv17, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg2_v1.Time{}
+ } else {
+ yyv19 := &x.LastTransitionTime
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv19) {
+ } else if yym20 {
+ z.DecBinaryUnmarshal(yyv19)
+ } else if !yym20 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv19)
+ } else {
+ z.DecFallback(yyv19, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv21 := &x.Reason
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv23 := &x.Message
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*string)(yyv23)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x NodeAddressType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *NodeAddressType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *NodeAddress) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Address))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("address"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Address))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NodeAddress) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NodeAddress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "address":
+ if r.TryDecodeAsNil() {
+ x.Address = ""
+ } else {
+ yyv5 := &x.Address
+ 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_containerMapEnd1234)
+}
+
+func (x *NodeAddress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv8 := &x.Type
+ yyv8.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Address = ""
+ } else {
+ yyv9 := &x.Address
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x ResourceName) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *ResourceName) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 ResourceList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 {
+ h.encResourceList((ResourceList)(x), e)
+ }
+ }
+}
+
+func (x *ResourceList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ h.decResourceList((*ResourceList)(x), d)
+ }
+}
+
+func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Node) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 = NodeSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = NodeStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = NodeSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = NodeStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NodeList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceNode(([]Node)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceNode(([]Node)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NodeList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NodeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSliceNode((*[]Node)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NodeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceNode((*[]Node)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x FinalizerName) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *FinalizerName) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *NamespaceSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = len(x.Finalizers) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Finalizers == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceFinalizerName(([]FinalizerName)(x.Finalizers), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("finalizers"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Finalizers == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceFinalizerName(([]FinalizerName)(x.Finalizers), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NamespaceSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NamespaceSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "finalizers":
+ if r.TryDecodeAsNil() {
+ x.Finalizers = nil
+ } else {
+ yyv4 := &x.Finalizers
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceFinalizerName((*[]FinalizerName)(yyv4), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NamespaceSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Finalizers = nil
+ } else {
+ yyv7 := &x.Finalizers
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSliceFinalizerName((*[]FinalizerName)(yyv7), d)
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NamespaceStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = x.Phase != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ x.Phase.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("phase"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Phase.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NamespaceStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NamespaceStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "phase":
+ if r.TryDecodeAsNil() {
+ x.Phase = ""
+ } else {
+ yyv4 := &x.Phase
+ yyv4.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NamespaceStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj5 int
+ var yyb5 bool
+ var yyhl5 bool = l >= 0
+ yyj5++
+ if yyhl5 {
+ yyb5 = yyj5 > l
+ } else {
+ yyb5 = r.CheckBreak()
+ }
+ if yyb5 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Phase = ""
+ } else {
+ yyv6 := &x.Phase
+ yyv6.CodecDecodeSelf(d)
+ }
+ for {
+ yyj5++
+ if yyhl5 {
+ yyb5 = yyj5 > l
+ } else {
+ yyb5 = r.CheckBreak()
+ }
+ if yyb5 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj5-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x NamespacePhase) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *NamespacePhase) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *Namespace) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Namespace) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Namespace) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 = NamespaceSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = NamespaceStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = NamespaceSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = NamespaceStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NamespaceList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceNamespace(([]Namespace)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceNamespace(([]Namespace)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NamespaceList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NamespaceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSliceNamespace((*[]Namespace)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NamespaceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceNamespace((*[]Namespace)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Binding) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ yy15 := &x.Target
+ yy15.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("target"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Target
+ yy17.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Binding) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Binding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 "target":
+ if r.TryDecodeAsNil() {
+ x.Target = ObjectReference{}
+ } else {
+ yyv10 := &x.Target
+ yyv10.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv12 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv14 := &x.APIVersion
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv16 := &x.ObjectMeta
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv16) {
+ } else {
+ z.DecFallback(yyv16, false)
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Target = ObjectReference{}
+ } else {
+ yyv18 := &x.Target
+ yyv18.CodecDecodeSelf(d)
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Preconditions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = x.UID != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.UID == nil {
+ r.EncodeNil()
+ } else {
+ yy4 := *x.UID
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy4) {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yy4))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("uid"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.UID == nil {
+ r.EncodeNil()
+ } else {
+ yy6 := *x.UID
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy6) {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yy6))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Preconditions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Preconditions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "uid":
+ if r.TryDecodeAsNil() {
+ if x.UID != nil {
+ x.UID = nil
+ }
+ } else {
+ if x.UID == nil {
+ x.UID = new(pkg1_types.UID)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.UID) {
+ } else {
+ *((*string)(x.UID)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Preconditions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.UID != nil {
+ x.UID = nil
+ }
+ } else {
+ if x.UID == nil {
+ x.UID = new(pkg1_types.UID)
+ }
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.UID) {
+ } else {
+ *((*string)(x.UID)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x DeletionPropagation) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *DeletionPropagation) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Kind != ""
+ yyq2[1] = x.APIVersion != ""
+ yyq2[2] = x.GracePeriodSeconds != nil
+ yyq2[3] = x.Preconditions != nil
+ yyq2[4] = x.OrphanDependents != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.GracePeriodSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy10 := *x.GracePeriodSeconds
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(yy10))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("gracePeriodSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.GracePeriodSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy12 := *x.GracePeriodSeconds
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(yy12))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Preconditions == nil {
+ r.EncodeNil()
+ } else {
+ x.Preconditions.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("preconditions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Preconditions == nil {
+ r.EncodeNil()
+ } else {
+ x.Preconditions.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.OrphanDependents == nil {
+ r.EncodeNil()
+ } else {
+ yy18 := *x.OrphanDependents
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeBool(bool(yy18))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("orphanDependents"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.OrphanDependents == nil {
+ r.EncodeNil()
+ } else {
+ yy20 := *x.OrphanDependents
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeBool(bool(yy20))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.PropagationPolicy == nil {
+ r.EncodeNil()
+ } else {
+ yy23 := *x.PropagationPolicy
+ yy23.CodecEncodeSelf(e)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("PropagationPolicy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PropagationPolicy == nil {
+ r.EncodeNil()
+ } else {
+ yy25 := *x.PropagationPolicy
+ yy25.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DeleteOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DeleteOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "gracePeriodSeconds":
+ if r.TryDecodeAsNil() {
+ if x.GracePeriodSeconds != nil {
+ x.GracePeriodSeconds = nil
+ }
+ } else {
+ if x.GracePeriodSeconds == nil {
+ x.GracePeriodSeconds = new(int64)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int64)(x.GracePeriodSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "preconditions":
+ if r.TryDecodeAsNil() {
+ if x.Preconditions != nil {
+ x.Preconditions = nil
+ }
+ } else {
+ if x.Preconditions == nil {
+ x.Preconditions = new(Preconditions)
+ }
+ x.Preconditions.CodecDecodeSelf(d)
+ }
+ case "orphanDependents":
+ if r.TryDecodeAsNil() {
+ if x.OrphanDependents != nil {
+ x.OrphanDependents = nil
+ }
+ } else {
+ if x.OrphanDependents == nil {
+ x.OrphanDependents = new(bool)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*bool)(x.OrphanDependents)) = r.DecodeBool()
+ }
+ }
+ case "PropagationPolicy":
+ if r.TryDecodeAsNil() {
+ if x.PropagationPolicy != nil {
+ x.PropagationPolicy = nil
+ }
+ } else {
+ if x.PropagationPolicy == nil {
+ x.PropagationPolicy = new(DeletionPropagation)
+ }
+ x.PropagationPolicy.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv15 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv17 := &x.APIVersion
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.GracePeriodSeconds != nil {
+ x.GracePeriodSeconds = nil
+ }
+ } else {
+ if x.GracePeriodSeconds == nil {
+ x.GracePeriodSeconds = new(int64)
+ }
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*int64)(x.GracePeriodSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Preconditions != nil {
+ x.Preconditions = nil
+ }
+ } else {
+ if x.Preconditions == nil {
+ x.Preconditions = new(Preconditions)
+ }
+ x.Preconditions.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.OrphanDependents != nil {
+ x.OrphanDependents = nil
+ }
+ } else {
+ if x.OrphanDependents == nil {
+ x.OrphanDependents = new(bool)
+ }
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else {
+ *((*bool)(x.OrphanDependents)) = r.DecodeBool()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PropagationPolicy != nil {
+ x.PropagationPolicy = nil
+ }
+ } else {
+ if x.PropagationPolicy == nil {
+ x.PropagationPolicy = new(DeletionPropagation)
+ }
+ x.PropagationPolicy.CodecDecodeSelf(d)
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ListOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Kind != ""
+ yyq2[1] = x.APIVersion != ""
+ yyq2[2] = x.LabelSelector != ""
+ yyq2[3] = x.FieldSelector != ""
+ yyq2[4] = x.IncludeUninitialized != false
+ yyq2[5] = x.Watch != false
+ yyq2[6] = x.ResourceVersion != ""
+ yyq2[7] = x.TimeoutSeconds != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.LabelSelector))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("labelSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.LabelSelector))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FieldSelector))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fieldSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FieldSelector))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeBool(bool(x.IncludeUninitialized))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("includeUninitialized"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeBool(bool(x.IncludeUninitialized))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Watch))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("watch"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Watch))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resourceVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.TimeoutSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy25 := *x.TimeoutSeconds
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeInt(int64(yy25))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("timeoutSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TimeoutSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy27 := *x.TimeoutSeconds
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeInt(int64(yy27))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ListOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ListOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "labelSelector":
+ if r.TryDecodeAsNil() {
+ x.LabelSelector = ""
+ } else {
+ yyv8 := &x.LabelSelector
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "fieldSelector":
+ if r.TryDecodeAsNil() {
+ x.FieldSelector = ""
+ } else {
+ yyv10 := &x.FieldSelector
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "includeUninitialized":
+ if r.TryDecodeAsNil() {
+ x.IncludeUninitialized = false
+ } else {
+ yyv12 := &x.IncludeUninitialized
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*bool)(yyv12)) = r.DecodeBool()
+ }
+ }
+ case "watch":
+ if r.TryDecodeAsNil() {
+ x.Watch = false
+ } else {
+ yyv14 := &x.Watch
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*bool)(yyv14)) = r.DecodeBool()
+ }
+ }
+ case "resourceVersion":
+ if r.TryDecodeAsNil() {
+ x.ResourceVersion = ""
+ } else {
+ yyv16 := &x.ResourceVersion
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ case "timeoutSeconds":
+ if r.TryDecodeAsNil() {
+ if x.TimeoutSeconds != nil {
+ x.TimeoutSeconds = nil
+ }
+ } else {
+ if x.TimeoutSeconds == nil {
+ x.TimeoutSeconds = new(int64)
+ }
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*int64)(x.TimeoutSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ListOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj20 int
+ var yyb20 bool
+ var yyhl20 bool = l >= 0
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv21 := &x.Kind
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv23 := &x.APIVersion
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*string)(yyv23)) = r.DecodeString()
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LabelSelector = ""
+ } else {
+ yyv25 := &x.LabelSelector
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*string)(yyv25)) = r.DecodeString()
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FieldSelector = ""
+ } else {
+ yyv27 := &x.FieldSelector
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*string)(yyv27)) = r.DecodeString()
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.IncludeUninitialized = false
+ } else {
+ yyv29 := &x.IncludeUninitialized
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*bool)(yyv29)) = r.DecodeBool()
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Watch = false
+ } else {
+ yyv31 := &x.Watch
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*bool)(yyv31)) = r.DecodeBool()
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ResourceVersion = ""
+ } else {
+ yyv33 := &x.ResourceVersion
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ *((*string)(yyv33)) = r.DecodeString()
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.TimeoutSeconds != nil {
+ x.TimeoutSeconds = nil
+ }
+ } else {
+ if x.TimeoutSeconds == nil {
+ x.TimeoutSeconds = new(int64)
+ }
+ yym36 := z.DecBinary()
+ _ = yym36
+ if false {
+ } else {
+ *((*int64)(x.TimeoutSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ for {
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj20-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodLogOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [10]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Kind != ""
+ yyq2[1] = x.APIVersion != ""
+ yyq2[2] = x.Container != ""
+ yyq2[3] = x.Follow != false
+ yyq2[4] = x.Previous != false
+ yyq2[5] = x.SinceSeconds != nil
+ yyq2[6] = x.SinceTime != nil
+ yyq2[7] = x.Timestamps != false
+ yyq2[8] = x.TailLines != nil
+ yyq2[9] = x.LimitBytes != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(10)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Container))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("container"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Container))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Follow))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("follow"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Follow))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Previous))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("previous"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Previous))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.SinceSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy19 := *x.SinceSeconds
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeInt(int64(yy19))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("sinceSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SinceSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy21 := *x.SinceSeconds
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeInt(int64(yy21))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.SinceTime == nil {
+ r.EncodeNil()
+ } else {
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.SinceTime) {
+ } else if yym24 {
+ z.EncBinaryMarshal(x.SinceTime)
+ } else if !yym24 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.SinceTime)
+ } else {
+ z.EncFallback(x.SinceTime)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("sinceTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SinceTime == nil {
+ r.EncodeNil()
+ } else {
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.SinceTime) {
+ } else if yym25 {
+ z.EncBinaryMarshal(x.SinceTime)
+ } else if !yym25 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.SinceTime)
+ } else {
+ z.EncFallback(x.SinceTime)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ yym27 := z.EncBinary()
+ _ = yym27
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Timestamps))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("timestamps"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Timestamps))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ if x.TailLines == nil {
+ r.EncodeNil()
+ } else {
+ yy30 := *x.TailLines
+ yym31 := z.EncBinary()
+ _ = yym31
+ if false {
+ } else {
+ r.EncodeInt(int64(yy30))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("tailLines"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TailLines == nil {
+ r.EncodeNil()
+ } else {
+ yy32 := *x.TailLines
+ yym33 := z.EncBinary()
+ _ = yym33
+ if false {
+ } else {
+ r.EncodeInt(int64(yy32))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ if x.LimitBytes == nil {
+ r.EncodeNil()
+ } else {
+ yy35 := *x.LimitBytes
+ yym36 := z.EncBinary()
+ _ = yym36
+ if false {
+ } else {
+ r.EncodeInt(int64(yy35))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("limitBytes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.LimitBytes == nil {
+ r.EncodeNil()
+ } else {
+ yy37 := *x.LimitBytes
+ yym38 := z.EncBinary()
+ _ = yym38
+ if false {
+ } else {
+ r.EncodeInt(int64(yy37))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodLogOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodLogOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "container":
+ if r.TryDecodeAsNil() {
+ x.Container = ""
+ } else {
+ yyv8 := &x.Container
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "follow":
+ if r.TryDecodeAsNil() {
+ x.Follow = false
+ } else {
+ yyv10 := &x.Follow
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*bool)(yyv10)) = r.DecodeBool()
+ }
+ }
+ case "previous":
+ if r.TryDecodeAsNil() {
+ x.Previous = false
+ } else {
+ yyv12 := &x.Previous
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*bool)(yyv12)) = r.DecodeBool()
+ }
+ }
+ case "sinceSeconds":
+ if r.TryDecodeAsNil() {
+ if x.SinceSeconds != nil {
+ x.SinceSeconds = nil
+ }
+ } else {
+ if x.SinceSeconds == nil {
+ x.SinceSeconds = new(int64)
+ }
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*int64)(x.SinceSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "sinceTime":
+ if r.TryDecodeAsNil() {
+ if x.SinceTime != nil {
+ x.SinceTime = nil
+ }
+ } else {
+ if x.SinceTime == nil {
+ x.SinceTime = new(pkg2_v1.Time)
+ }
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.SinceTime) {
+ } else if yym17 {
+ z.DecBinaryUnmarshal(x.SinceTime)
+ } else if !yym17 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.SinceTime)
+ } else {
+ z.DecFallback(x.SinceTime, false)
+ }
+ }
+ case "timestamps":
+ if r.TryDecodeAsNil() {
+ x.Timestamps = false
+ } else {
+ yyv18 := &x.Timestamps
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*bool)(yyv18)) = r.DecodeBool()
+ }
+ }
+ case "tailLines":
+ if r.TryDecodeAsNil() {
+ if x.TailLines != nil {
+ x.TailLines = nil
+ }
+ } else {
+ if x.TailLines == nil {
+ x.TailLines = new(int64)
+ }
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ *((*int64)(x.TailLines)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "limitBytes":
+ if r.TryDecodeAsNil() {
+ if x.LimitBytes != nil {
+ x.LimitBytes = nil
+ }
+ } else {
+ if x.LimitBytes == nil {
+ x.LimitBytes = new(int64)
+ }
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else {
+ *((*int64)(x.LimitBytes)) = int64(r.DecodeInt(64))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodLogOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj24 int
+ var yyb24 bool
+ var yyhl24 bool = l >= 0
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv25 := &x.Kind
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*string)(yyv25)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv27 := &x.APIVersion
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*string)(yyv27)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Container = ""
+ } else {
+ yyv29 := &x.Container
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*string)(yyv29)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Follow = false
+ } else {
+ yyv31 := &x.Follow
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*bool)(yyv31)) = r.DecodeBool()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Previous = false
+ } else {
+ yyv33 := &x.Previous
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ *((*bool)(yyv33)) = r.DecodeBool()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SinceSeconds != nil {
+ x.SinceSeconds = nil
+ }
+ } else {
+ if x.SinceSeconds == nil {
+ x.SinceSeconds = new(int64)
+ }
+ yym36 := z.DecBinary()
+ _ = yym36
+ if false {
+ } else {
+ *((*int64)(x.SinceSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SinceTime != nil {
+ x.SinceTime = nil
+ }
+ } else {
+ if x.SinceTime == nil {
+ x.SinceTime = new(pkg2_v1.Time)
+ }
+ yym38 := z.DecBinary()
+ _ = yym38
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.SinceTime) {
+ } else if yym38 {
+ z.DecBinaryUnmarshal(x.SinceTime)
+ } else if !yym38 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.SinceTime)
+ } else {
+ z.DecFallback(x.SinceTime, false)
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Timestamps = false
+ } else {
+ yyv39 := &x.Timestamps
+ yym40 := z.DecBinary()
+ _ = yym40
+ if false {
+ } else {
+ *((*bool)(yyv39)) = r.DecodeBool()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.TailLines != nil {
+ x.TailLines = nil
+ }
+ } else {
+ if x.TailLines == nil {
+ x.TailLines = new(int64)
+ }
+ yym42 := z.DecBinary()
+ _ = yym42
+ if false {
+ } else {
+ *((*int64)(x.TailLines)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.LimitBytes != nil {
+ x.LimitBytes = nil
+ }
+ } else {
+ if x.LimitBytes == nil {
+ x.LimitBytes = new(int64)
+ }
+ yym44 := z.DecBinary()
+ _ = yym44
+ if false {
+ } else {
+ *((*int64)(x.LimitBytes)) = int64(r.DecodeInt(64))
+ }
+ }
+ for {
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj24-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodAttachOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [7]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Kind != ""
+ yyq2[1] = x.APIVersion != ""
+ yyq2[2] = x.Stdin != false
+ yyq2[3] = x.Stdout != false
+ yyq2[4] = x.Stderr != false
+ yyq2[5] = x.TTY != false
+ yyq2[6] = x.Container != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(7)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdin))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stdin"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdin))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdout))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stdout"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdout))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stderr))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stderr"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stderr))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeBool(bool(x.TTY))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("tty"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeBool(bool(x.TTY))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Container))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("container"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Container))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodAttachOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodAttachOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "stdin":
+ if r.TryDecodeAsNil() {
+ x.Stdin = false
+ } else {
+ yyv8 := &x.Stdin
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(yyv8)) = r.DecodeBool()
+ }
+ }
+ case "stdout":
+ if r.TryDecodeAsNil() {
+ x.Stdout = false
+ } else {
+ yyv10 := &x.Stdout
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*bool)(yyv10)) = r.DecodeBool()
+ }
+ }
+ case "stderr":
+ if r.TryDecodeAsNil() {
+ x.Stderr = false
+ } else {
+ yyv12 := &x.Stderr
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*bool)(yyv12)) = r.DecodeBool()
+ }
+ }
+ case "tty":
+ if r.TryDecodeAsNil() {
+ x.TTY = false
+ } else {
+ yyv14 := &x.TTY
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*bool)(yyv14)) = r.DecodeBool()
+ }
+ }
+ case "container":
+ if r.TryDecodeAsNil() {
+ x.Container = ""
+ } else {
+ yyv16 := &x.Container
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodAttachOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj18 int
+ var yyb18 bool
+ var yyhl18 bool = l >= 0
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv19 := &x.Kind
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv21 := &x.APIVersion
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Stdin = false
+ } else {
+ yyv23 := &x.Stdin
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*bool)(yyv23)) = r.DecodeBool()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Stdout = false
+ } else {
+ yyv25 := &x.Stdout
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*bool)(yyv25)) = r.DecodeBool()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Stderr = false
+ } else {
+ yyv27 := &x.Stderr
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*bool)(yyv27)) = r.DecodeBool()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TTY = false
+ } else {
+ yyv29 := &x.TTY
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*bool)(yyv29)) = r.DecodeBool()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Container = ""
+ } else {
+ yyv31 := &x.Container
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*string)(yyv31)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj18-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodExecOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Kind != ""
+ yyq2[1] = x.APIVersion != ""
+ yyq2[2] = x.Stdin != false
+ yyq2[3] = x.Stdout != false
+ yyq2[4] = x.Stderr != false
+ yyq2[5] = x.TTY != false
+ yyq2[6] = x.Container != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(8)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdin))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stdin"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdin))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdout))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stdout"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stdout))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stderr))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stderr"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Stderr))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeBool(bool(x.TTY))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("tty"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeBool(bool(x.TTY))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Container))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("container"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Container))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Command == nil {
+ r.EncodeNil()
+ } else {
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Command, false, e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("command"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Command == nil {
+ r.EncodeNil()
+ } else {
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Command, false, e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodExecOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodExecOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "stdin":
+ if r.TryDecodeAsNil() {
+ x.Stdin = false
+ } else {
+ yyv8 := &x.Stdin
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*bool)(yyv8)) = r.DecodeBool()
+ }
+ }
+ case "stdout":
+ if r.TryDecodeAsNil() {
+ x.Stdout = false
+ } else {
+ yyv10 := &x.Stdout
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*bool)(yyv10)) = r.DecodeBool()
+ }
+ }
+ case "stderr":
+ if r.TryDecodeAsNil() {
+ x.Stderr = false
+ } else {
+ yyv12 := &x.Stderr
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*bool)(yyv12)) = r.DecodeBool()
+ }
+ }
+ case "tty":
+ if r.TryDecodeAsNil() {
+ x.TTY = false
+ } else {
+ yyv14 := &x.TTY
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*bool)(yyv14)) = r.DecodeBool()
+ }
+ }
+ case "container":
+ if r.TryDecodeAsNil() {
+ x.Container = ""
+ } else {
+ yyv16 := &x.Container
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ case "command":
+ if r.TryDecodeAsNil() {
+ x.Command = nil
+ } else {
+ yyv18 := &x.Command
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv18, false, d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj20 int
+ var yyb20 bool
+ var yyhl20 bool = l >= 0
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv21 := &x.Kind
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv23 := &x.APIVersion
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*string)(yyv23)) = r.DecodeString()
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Stdin = false
+ } else {
+ yyv25 := &x.Stdin
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*bool)(yyv25)) = r.DecodeBool()
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Stdout = false
+ } else {
+ yyv27 := &x.Stdout
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*bool)(yyv27)) = r.DecodeBool()
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Stderr = false
+ } else {
+ yyv29 := &x.Stderr
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*bool)(yyv29)) = r.DecodeBool()
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TTY = false
+ } else {
+ yyv31 := &x.TTY
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*bool)(yyv31)) = r.DecodeBool()
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Container = ""
+ } else {
+ yyv33 := &x.Container
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ *((*string)(yyv33)) = r.DecodeString()
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Command = nil
+ } else {
+ yyv35 := &x.Command
+ yym36 := z.DecBinary()
+ _ = yym36
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv35, false, d)
+ }
+ }
+ for {
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj20-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodPortForwardOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Kind != ""
+ yyq2[1] = x.APIVersion != ""
+ yyq2[2] = len(x.Ports) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Ports == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.EncSliceInt32V(x.Ports, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ports"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Ports == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.EncSliceInt32V(x.Ports, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodPortForwardOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodPortForwardOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "ports":
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv8 := &x.Ports
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.DecSliceInt32X(yyv8, false, d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodPortForwardOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv11 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv13 := &x.APIVersion
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv15 := &x.Ports
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ z.F.DecSliceInt32X(yyv15, false, d)
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Kind != ""
+ yyq2[1] = x.APIVersion != ""
+ yyq2[2] = x.Path != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("path"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodProxyOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv8 := &x.Path
+ 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_containerMapEnd1234)
+}
+
+func (x *PodProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv11 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv13 := &x.APIVersion
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv15 := &x.Path
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NodeProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Kind != ""
+ yyq2[1] = x.APIVersion != ""
+ yyq2[2] = x.Path != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("path"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NodeProxyOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NodeProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv8 := &x.Path
+ 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_containerMapEnd1234)
+}
+
+func (x *NodeProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv11 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv13 := &x.APIVersion
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv15 := &x.Path
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ServiceProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Kind != ""
+ yyq2[1] = x.APIVersion != ""
+ yyq2[2] = x.Path != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("path"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ServiceProxyOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ServiceProxyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv8 := &x.Path
+ 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_containerMapEnd1234)
+}
+
+func (x *ServiceProxyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv11 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv13 := &x.APIVersion
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv15 := &x.Path
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ObjectReference) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [7]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Kind != ""
+ yyq2[1] = x.Namespace != ""
+ yyq2[2] = x.Name != ""
+ yyq2[3] = x.UID != ""
+ yyq2[4] = x.APIVersion != ""
+ yyq2[5] = x.ResourceVersion != ""
+ yyq2[6] = x.FieldPath != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(7)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("namespace"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.UID) {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.UID))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("uid"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.UID) {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.UID))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resourceVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ResourceVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FieldPath))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fieldPath"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.FieldPath))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ObjectReference) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "namespace":
+ if r.TryDecodeAsNil() {
+ x.Namespace = ""
+ } else {
+ yyv6 := &x.Namespace
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv8 := &x.Name
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "uid":
+ if r.TryDecodeAsNil() {
+ x.UID = ""
+ } else {
+ yyv10 := &x.UID
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv10) {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv12 := &x.APIVersion
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ case "resourceVersion":
+ if r.TryDecodeAsNil() {
+ x.ResourceVersion = ""
+ } else {
+ yyv14 := &x.ResourceVersion
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ case "fieldPath":
+ if r.TryDecodeAsNil() {
+ x.FieldPath = ""
+ } else {
+ yyv16 := &x.FieldPath
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj18 int
+ var yyb18 bool
+ var yyhl18 bool = l >= 0
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv19 := &x.Kind
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Namespace = ""
+ } else {
+ yyv21 := &x.Namespace
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv23 := &x.Name
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*string)(yyv23)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UID = ""
+ } else {
+ yyv25 := &x.UID
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv25) {
+ } else {
+ *((*string)(yyv25)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv27 := &x.APIVersion
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*string)(yyv27)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ResourceVersion = ""
+ } else {
+ yyv29 := &x.ResourceVersion
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*string)(yyv29)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FieldPath = ""
+ } else {
+ yyv31 := &x.FieldPath
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*string)(yyv31)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj18-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *LocalObjectReference) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = x.Name != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *LocalObjectReference) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *LocalObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *LocalObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv7 := &x.Name
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*string)(yyv7)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *SerializedReference) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Kind != ""
+ yyq2[1] = x.APIVersion != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy10 := &x.Reference
+ yy10.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reference"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.Reference
+ yy12.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SerializedReference) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SerializedReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "reference":
+ if r.TryDecodeAsNil() {
+ x.Reference = ObjectReference{}
+ } else {
+ yyv8 := &x.Reference
+ yyv8.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SerializedReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv10 := &x.Kind
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv12 := &x.APIVersion
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reference = ObjectReference{}
+ } else {
+ yyv14 := &x.Reference
+ yyv14.CodecDecodeSelf(d)
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *EventSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Component != ""
+ yyq2[1] = x.Host != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Component))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("component"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Component))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Host))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("host"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Host))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *EventSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *EventSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "component":
+ if r.TryDecodeAsNil() {
+ x.Component = ""
+ } else {
+ yyv4 := &x.Component
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "host":
+ if r.TryDecodeAsNil() {
+ x.Host = ""
+ } else {
+ yyv6 := &x.Host
+ 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_containerMapEnd1234)
+}
+
+func (x *EventSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Component = ""
+ } else {
+ yyv9 := &x.Component
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Host = ""
+ } else {
+ yyv11 := &x.Host
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [11]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Kind != ""
+ yyq2[1] = x.APIVersion != ""
+ yyq2[4] = x.Reason != ""
+ yyq2[5] = x.Message != ""
+ yyq2[6] = true
+ yyq2[7] = true
+ yyq2[8] = true
+ yyq2[9] = x.Count != 0
+ yyq2[10] = x.Type != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(11)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy10 := &x.ObjectMeta
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy10) {
+ } else {
+ z.EncFallback(yy10)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ yy15 := &x.InvolvedObject
+ yy15.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("involvedObject"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.InvolvedObject
+ yy17.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yy26 := &x.Source
+ yy26.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("source"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy28 := &x.Source
+ yy28.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ yy31 := &x.FirstTimestamp
+ yym32 := z.EncBinary()
+ _ = yym32
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy31) {
+ } else if yym32 {
+ z.EncBinaryMarshal(yy31)
+ } else if !yym32 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy31)
+ } else {
+ z.EncFallback(yy31)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("firstTimestamp"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy33 := &x.FirstTimestamp
+ yym34 := z.EncBinary()
+ _ = yym34
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy33) {
+ } else if yym34 {
+ z.EncBinaryMarshal(yy33)
+ } else if !yym34 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy33)
+ } else {
+ z.EncFallback(yy33)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ yy36 := &x.LastTimestamp
+ yym37 := z.EncBinary()
+ _ = yym37
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy36) {
+ } else if yym37 {
+ z.EncBinaryMarshal(yy36)
+ } else if !yym37 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy36)
+ } else {
+ z.EncFallback(yy36)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastTimestamp"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy38 := &x.LastTimestamp
+ yym39 := z.EncBinary()
+ _ = yym39
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy38) {
+ } else if yym39 {
+ z.EncBinaryMarshal(yy38)
+ } else if !yym39 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy38)
+ } else {
+ z.EncFallback(yy38)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[9] {
+ yym41 := z.EncBinary()
+ _ = yym41
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Count))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[9] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("count"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym42 := z.EncBinary()
+ _ = yym42
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Count))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[10] {
+ yym44 := z.EncBinary()
+ _ = yym44
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Type))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[10] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym45 := z.EncBinary()
+ _ = yym45
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Type))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Event) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Event) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 "involvedObject":
+ if r.TryDecodeAsNil() {
+ x.InvolvedObject = ObjectReference{}
+ } else {
+ yyv10 := &x.InvolvedObject
+ 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()
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv13 := &x.Message
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ *((*string)(yyv13)) = r.DecodeString()
+ }
+ }
+ case "source":
+ if r.TryDecodeAsNil() {
+ x.Source = EventSource{}
+ } else {
+ yyv15 := &x.Source
+ yyv15.CodecDecodeSelf(d)
+ }
+ case "firstTimestamp":
+ if r.TryDecodeAsNil() {
+ x.FirstTimestamp = pkg2_v1.Time{}
+ } else {
+ yyv16 := &x.FirstTimestamp
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv16) {
+ } else if yym17 {
+ z.DecBinaryUnmarshal(yyv16)
+ } else if !yym17 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv16)
+ } else {
+ z.DecFallback(yyv16, false)
+ }
+ }
+ case "lastTimestamp":
+ if r.TryDecodeAsNil() {
+ x.LastTimestamp = pkg2_v1.Time{}
+ } else {
+ yyv18 := &x.LastTimestamp
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv18) {
+ } else if yym19 {
+ z.DecBinaryUnmarshal(yyv18)
+ } else if !yym19 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv18)
+ } else {
+ z.DecFallback(yyv18, false)
+ }
+ }
+ case "count":
+ if r.TryDecodeAsNil() {
+ x.Count = 0
+ } else {
+ yyv20 := &x.Count
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ *((*int32)(yyv20)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv22 := &x.Type
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else {
+ *((*string)(yyv22)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj24 int
+ var yyb24 bool
+ var yyhl24 bool = l >= 0
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv25 := &x.Kind
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*string)(yyv25)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv27 := &x.APIVersion
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*string)(yyv27)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv29 := &x.ObjectMeta
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv29) {
+ } else {
+ z.DecFallback(yyv29, false)
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.InvolvedObject = ObjectReference{}
+ } else {
+ yyv31 := &x.InvolvedObject
+ yyv31.CodecDecodeSelf(d)
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv32 := &x.Reason
+ yym33 := z.DecBinary()
+ _ = yym33
+ if false {
+ } else {
+ *((*string)(yyv32)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv34 := &x.Message
+ yym35 := z.DecBinary()
+ _ = yym35
+ if false {
+ } else {
+ *((*string)(yyv34)) = r.DecodeString()
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Source = EventSource{}
+ } else {
+ yyv36 := &x.Source
+ yyv36.CodecDecodeSelf(d)
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FirstTimestamp = pkg2_v1.Time{}
+ } else {
+ yyv37 := &x.FirstTimestamp
+ yym38 := z.DecBinary()
+ _ = yym38
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv37) {
+ } else if yym38 {
+ z.DecBinaryUnmarshal(yyv37)
+ } else if !yym38 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv37)
+ } else {
+ z.DecFallback(yyv37, false)
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastTimestamp = pkg2_v1.Time{}
+ } else {
+ yyv39 := &x.LastTimestamp
+ yym40 := z.DecBinary()
+ _ = yym40
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv39) {
+ } else if yym40 {
+ z.DecBinaryUnmarshal(yyv39)
+ } else if !yym40 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv39)
+ } else {
+ z.DecFallback(yyv39, false)
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Count = 0
+ } else {
+ yyv41 := &x.Count
+ yym42 := z.DecBinary()
+ _ = yym42
+ if false {
+ } else {
+ *((*int32)(yyv41)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv43 := &x.Type
+ yym44 := z.DecBinary()
+ _ = yym44
+ if false {
+ } else {
+ *((*string)(yyv43)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj24++
+ if yyhl24 {
+ yyb24 = yyj24 > l
+ } else {
+ yyb24 = r.CheckBreak()
+ }
+ if yyb24 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj24-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *EventList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceEvent(([]Event)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceEvent(([]Event)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *EventList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *EventList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSliceEvent((*[]Event)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *EventList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceEvent((*[]Event)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *List) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceruntime_RawExtension(([]pkg5_runtime.RawExtension)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceruntime_RawExtension(([]pkg5_runtime.RawExtension)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *List) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *List) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSliceruntime_RawExtension((*[]pkg5_runtime.RawExtension)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *List) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceruntime_RawExtension((*[]pkg5_runtime.RawExtension)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x LimitType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *LimitType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *LimitRangeItem) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Type != ""
+ yyq2[1] = len(x.Max) != 0
+ yyq2[2] = len(x.Min) != 0
+ yyq2[3] = len(x.Default) != 0
+ yyq2[4] = len(x.DefaultRequest) != 0
+ yyq2[5] = len(x.MaxLimitRequestRatio) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Max == nil {
+ r.EncodeNil()
+ } else {
+ x.Max.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("max"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Max == nil {
+ r.EncodeNil()
+ } else {
+ x.Max.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Min == nil {
+ r.EncodeNil()
+ } else {
+ x.Min.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("min"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Min == nil {
+ r.EncodeNil()
+ } else {
+ x.Min.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Default == nil {
+ r.EncodeNil()
+ } else {
+ x.Default.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("default"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Default == nil {
+ r.EncodeNil()
+ } else {
+ x.Default.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.DefaultRequest == nil {
+ r.EncodeNil()
+ } else {
+ x.DefaultRequest.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("defaultRequest"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.DefaultRequest == nil {
+ r.EncodeNil()
+ } else {
+ x.DefaultRequest.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.MaxLimitRequestRatio == nil {
+ r.EncodeNil()
+ } else {
+ x.MaxLimitRequestRatio.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("maxLimitRequestRatio"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.MaxLimitRequestRatio == nil {
+ r.EncodeNil()
+ } else {
+ x.MaxLimitRequestRatio.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *LimitRangeItem) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *LimitRangeItem) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "max":
+ if r.TryDecodeAsNil() {
+ x.Max = nil
+ } else {
+ yyv5 := &x.Max
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "min":
+ if r.TryDecodeAsNil() {
+ x.Min = nil
+ } else {
+ yyv6 := &x.Min
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "default":
+ if r.TryDecodeAsNil() {
+ x.Default = nil
+ } else {
+ yyv7 := &x.Default
+ yyv7.CodecDecodeSelf(d)
+ }
+ case "defaultRequest":
+ if r.TryDecodeAsNil() {
+ x.DefaultRequest = nil
+ } else {
+ yyv8 := &x.DefaultRequest
+ yyv8.CodecDecodeSelf(d)
+ }
+ case "maxLimitRequestRatio":
+ if r.TryDecodeAsNil() {
+ x.MaxLimitRequestRatio = nil
+ } else {
+ yyv9 := &x.MaxLimitRequestRatio
+ yyv9.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *LimitRangeItem) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv11 := &x.Type
+ yyv11.CodecDecodeSelf(d)
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Max = nil
+ } else {
+ yyv12 := &x.Max
+ yyv12.CodecDecodeSelf(d)
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Min = nil
+ } else {
+ yyv13 := &x.Min
+ yyv13.CodecDecodeSelf(d)
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Default = nil
+ } else {
+ yyv14 := &x.Default
+ yyv14.CodecDecodeSelf(d)
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DefaultRequest = nil
+ } else {
+ yyv15 := &x.DefaultRequest
+ yyv15.CodecDecodeSelf(d)
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MaxLimitRequestRatio = nil
+ } else {
+ yyv16 := &x.MaxLimitRequestRatio
+ yyv16.CodecDecodeSelf(d)
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *LimitRangeSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if x.Limits == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceLimitRangeItem(([]LimitRangeItem)(x.Limits), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("limits"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Limits == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceLimitRangeItem(([]LimitRangeItem)(x.Limits), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *LimitRangeSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *LimitRangeSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "limits":
+ if r.TryDecodeAsNil() {
+ x.Limits = nil
+ } else {
+ yyv4 := &x.Limits
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceLimitRangeItem((*[]LimitRangeItem)(yyv4), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *LimitRangeSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Limits = nil
+ } else {
+ yyv7 := &x.Limits
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSliceLimitRangeItem((*[]LimitRangeItem)(yyv7), d)
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *LimitRange) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = true
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *LimitRange) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *LimitRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 = LimitRangeSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv12 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv14 := &x.APIVersion
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv16 := &x.ObjectMeta
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv16) {
+ } else {
+ z.DecFallback(yyv16, false)
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = LimitRangeSpec{}
+ } else {
+ yyv18 := &x.Spec
+ yyv18.CodecDecodeSelf(d)
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *LimitRangeList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceLimitRange(([]LimitRange)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceLimitRange(([]LimitRange)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *LimitRangeList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *LimitRangeList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSliceLimitRange((*[]LimitRange)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *LimitRangeList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceLimitRange((*[]LimitRange)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x ResourceQuotaScope) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *ResourceQuotaScope) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *ResourceQuotaSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Hard) != 0
+ yyq2[1] = len(x.Scopes) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Hard == nil {
+ r.EncodeNil()
+ } else {
+ x.Hard.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hard"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Hard == nil {
+ r.EncodeNil()
+ } else {
+ x.Hard.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Scopes == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceResourceQuotaScope(([]ResourceQuotaScope)(x.Scopes), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("scopes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Scopes == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceResourceQuotaScope(([]ResourceQuotaScope)(x.Scopes), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ResourceQuotaSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ResourceQuotaSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "hard":
+ if r.TryDecodeAsNil() {
+ x.Hard = nil
+ } else {
+ yyv4 := &x.Hard
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "scopes":
+ if r.TryDecodeAsNil() {
+ x.Scopes = nil
+ } else {
+ yyv5 := &x.Scopes
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSliceResourceQuotaScope((*[]ResourceQuotaScope)(yyv5), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ResourceQuotaSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Hard = nil
+ } else {
+ yyv8 := &x.Hard
+ yyv8.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Scopes = nil
+ } else {
+ yyv9 := &x.Scopes
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceResourceQuotaScope((*[]ResourceQuotaScope)(yyv9), d)
+ }
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ResourceQuotaStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Hard) != 0
+ yyq2[1] = len(x.Used) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Hard == nil {
+ r.EncodeNil()
+ } else {
+ x.Hard.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hard"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Hard == nil {
+ r.EncodeNil()
+ } else {
+ x.Hard.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Used == nil {
+ r.EncodeNil()
+ } else {
+ x.Used.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("used"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Used == nil {
+ r.EncodeNil()
+ } else {
+ x.Used.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ResourceQuotaStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ResourceQuotaStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "hard":
+ if r.TryDecodeAsNil() {
+ x.Hard = nil
+ } else {
+ yyv4 := &x.Hard
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "used":
+ if r.TryDecodeAsNil() {
+ x.Used = nil
+ } else {
+ yyv5 := &x.Used
+ yyv5.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ResourceQuotaStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Hard = nil
+ } else {
+ yyv7 := &x.Hard
+ yyv7.CodecDecodeSelf(d)
+ }
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Used = nil
+ } else {
+ yyv8 := &x.Used
+ yyv8.CodecDecodeSelf(d)
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ResourceQuota) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ResourceQuota) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ResourceQuota) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 = ResourceQuotaSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ResourceQuotaStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = ResourceQuotaSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ResourceQuotaStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ResourceQuotaList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceResourceQuota(([]ResourceQuota)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceResourceQuota(([]ResourceQuota)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ResourceQuotaList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ResourceQuotaList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSliceResourceQuota((*[]ResourceQuota)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ResourceQuotaList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceResourceQuota((*[]ResourceQuota)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Kind != ""
+ yyq2[1] = x.APIVersion != ""
+ yyq2[2] = true
+ yyq2[3] = len(x.Data) != 0
+ yyq2[4] = len(x.StringData) != 0
+ yyq2[5] = x.Type != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encMapstringSliceuint8((map[string][]uint8)(x.Data), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("data"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encMapstringSliceuint8((map[string][]uint8)(x.Data), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.StringData == nil {
+ r.EncodeNil()
+ } else {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.StringData, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("stringData"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.StringData == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.StringData, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Secret) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Secret) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 "data":
+ if r.TryDecodeAsNil() {
+ x.Data = nil
+ } else {
+ yyv10 := &x.Data
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decMapstringSliceuint8((*map[string][]uint8)(yyv10), d)
+ }
+ }
+ case "stringData":
+ if r.TryDecodeAsNil() {
+ x.StringData = nil
+ } else {
+ yyv12 := &x.StringData
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv12, false, d)
+ }
+ }
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv14 := &x.Type
+ yyv14.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj15 int
+ var yyb15 bool
+ var yyhl15 bool = l >= 0
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv16 := &x.Kind
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv18 := &x.APIVersion
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*string)(yyv18)) = r.DecodeString()
+ }
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv20 := &x.ObjectMeta
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv20) {
+ } else {
+ z.DecFallback(yyv20, false)
+ }
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Data = nil
+ } else {
+ yyv22 := &x.Data
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else {
+ h.decMapstringSliceuint8((*map[string][]uint8)(yyv22), d)
+ }
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.StringData = nil
+ } else {
+ yyv24 := &x.StringData
+ yym25 := z.DecBinary()
+ _ = yym25
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv24, false, d)
+ }
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv26 := &x.Type
+ yyv26.CodecDecodeSelf(d)
+ }
+ for {
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj15-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x SecretType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *SecretType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *SecretList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceSecret(([]Secret)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceSecret(([]Secret)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SecretList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SecretList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSliceSecret((*[]Secret)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SecretList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceSecret((*[]Secret)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ConfigMap) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Data) != 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Data, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("data"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Data, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ConfigMap) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ConfigMap) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 "data":
+ if r.TryDecodeAsNil() {
+ x.Data = nil
+ } else {
+ yyv10 := &x.Data
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv10, false, d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Data = nil
+ } else {
+ yyv19 := &x.Data
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv19, false, d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ConfigMapList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceConfigMap(([]ConfigMap)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceConfigMap(([]ConfigMap)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ConfigMapList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ConfigMapList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSliceConfigMap((*[]ConfigMap)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ConfigMapList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceConfigMap((*[]ConfigMap)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x ComponentConditionType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *ComponentConditionType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *ComponentCondition) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = x.Message != ""
+ yyq2[3] = x.Error != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Status.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Status.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Error))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("error"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Error))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ComponentCondition) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ComponentCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv6 := &x.Message
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "error":
+ if r.TryDecodeAsNil() {
+ x.Error = ""
+ } else {
+ yyv8 := &x.Error
+ 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_containerMapEnd1234)
+}
+
+func (x *ComponentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv11 := &x.Type
+ yyv11.CodecDecodeSelf(d)
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv12 := &x.Status
+ yyv12.CodecDecodeSelf(d)
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv13 := &x.Message
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Error = ""
+ } else {
+ yyv15 := &x.Error
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Conditions) != 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceComponentCondition(([]ComponentCondition)(x.Conditions), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("conditions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceComponentCondition(([]ComponentCondition)(x.Conditions), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ComponentStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ComponentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 "conditions":
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv10 := &x.Conditions
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSliceComponentCondition((*[]ComponentCondition)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv19 := &x.Conditions
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceComponentCondition((*[]ComponentCondition)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ComponentStatusList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceComponentStatus(([]ComponentStatus)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceComponentStatus(([]ComponentStatus)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ComponentStatusList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ComponentStatusList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSliceComponentStatus((*[]ComponentStatus)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ComponentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceComponentStatus((*[]ComponentStatus)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DownwardAPIVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Items) != 0
+ yyq2[1] = x.DefaultMode != 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceDownwardAPIVolumeFile(([]DownwardAPIVolumeFile)(x.Items), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceDownwardAPIVolumeFile(([]DownwardAPIVolumeFile)(x.Items), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.DefaultMode == nil {
+ r.EncodeNil()
+ } else {
+ yy7 := *x.DefaultMode
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(yy7))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("defaultMode"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.DefaultMode == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.DefaultMode
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(yy9))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DownwardAPIVolumeSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DownwardAPIVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv4 := &x.Items
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceDownwardAPIVolumeFile((*[]DownwardAPIVolumeFile)(yyv4), d)
+ }
+ }
+ case "defaultMode":
+ if r.TryDecodeAsNil() {
+ if x.DefaultMode != nil {
+ x.DefaultMode = nil
+ }
+ } else {
+ if x.DefaultMode == nil {
+ x.DefaultMode = new(int32)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DownwardAPIVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv9 := &x.Items
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceDownwardAPIVolumeFile((*[]DownwardAPIVolumeFile)(yyv9), d)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.DefaultMode != nil {
+ x.DefaultMode = nil
+ }
+ } else {
+ if x.DefaultMode == nil {
+ x.DefaultMode = new(int32)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DownwardAPIVolumeFile) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.FieldRef != nil
+ yyq2[2] = x.ResourceFieldRef != nil
+ yyq2[3] = x.Mode != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("path"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.FieldRef == nil {
+ r.EncodeNil()
+ } else {
+ x.FieldRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fieldRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.FieldRef == nil {
+ r.EncodeNil()
+ } else {
+ x.FieldRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.ResourceFieldRef == nil {
+ r.EncodeNil()
+ } else {
+ x.ResourceFieldRef.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resourceFieldRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ResourceFieldRef == nil {
+ r.EncodeNil()
+ } else {
+ x.ResourceFieldRef.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Mode == nil {
+ r.EncodeNil()
+ } else {
+ yy13 := *x.Mode
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(yy13))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("mode"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Mode == nil {
+ r.EncodeNil()
+ } else {
+ yy15 := *x.Mode
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(yy15))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DownwardAPIVolumeFile) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DownwardAPIVolumeFile) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv4 := &x.Path
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "fieldRef":
+ if r.TryDecodeAsNil() {
+ if x.FieldRef != nil {
+ x.FieldRef = nil
+ }
+ } else {
+ if x.FieldRef == nil {
+ x.FieldRef = new(ObjectFieldSelector)
+ }
+ x.FieldRef.CodecDecodeSelf(d)
+ }
+ case "resourceFieldRef":
+ if r.TryDecodeAsNil() {
+ if x.ResourceFieldRef != nil {
+ x.ResourceFieldRef = nil
+ }
+ } else {
+ if x.ResourceFieldRef == nil {
+ x.ResourceFieldRef = new(ResourceFieldSelector)
+ }
+ x.ResourceFieldRef.CodecDecodeSelf(d)
+ }
+ case "mode":
+ if r.TryDecodeAsNil() {
+ if x.Mode != nil {
+ x.Mode = nil
+ }
+ } else {
+ if x.Mode == nil {
+ x.Mode = new(int32)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(x.Mode)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DownwardAPIVolumeFile) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv11 := &x.Path
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FieldRef != nil {
+ x.FieldRef = nil
+ }
+ } else {
+ if x.FieldRef == nil {
+ x.FieldRef = new(ObjectFieldSelector)
+ }
+ x.FieldRef.CodecDecodeSelf(d)
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ResourceFieldRef != nil {
+ x.ResourceFieldRef = nil
+ }
+ } else {
+ if x.ResourceFieldRef == nil {
+ x.ResourceFieldRef = new(ResourceFieldSelector)
+ }
+ x.ResourceFieldRef.CodecDecodeSelf(d)
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Mode != nil {
+ x.Mode = nil
+ }
+ } else {
+ if x.Mode == nil {
+ x.Mode = new(int32)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*int32)(x.Mode)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DownwardAPIProjection) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = len(x.Items) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceDownwardAPIVolumeFile(([]DownwardAPIVolumeFile)(x.Items), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceDownwardAPIVolumeFile(([]DownwardAPIVolumeFile)(x.Items), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DownwardAPIProjection) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DownwardAPIProjection) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv4 := &x.Items
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceDownwardAPIVolumeFile((*[]DownwardAPIVolumeFile)(yyv4), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DownwardAPIProjection) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv7 := &x.Items
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSliceDownwardAPIVolumeFile((*[]DownwardAPIVolumeFile)(yyv7), d)
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *SecurityContext) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Capabilities != nil
+ yyq2[1] = x.Privileged != nil
+ yyq2[2] = x.SELinuxOptions != nil
+ yyq2[3] = x.RunAsUser != nil
+ yyq2[4] = x.RunAsNonRoot != nil
+ yyq2[5] = x.ReadOnlyRootFilesystem != 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Capabilities == nil {
+ r.EncodeNil()
+ } else {
+ x.Capabilities.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("capabilities"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Capabilities == nil {
+ r.EncodeNil()
+ } else {
+ x.Capabilities.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Privileged == nil {
+ r.EncodeNil()
+ } else {
+ yy7 := *x.Privileged
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeBool(bool(yy7))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("privileged"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Privileged == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.Privileged
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeBool(bool(yy9))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.SELinuxOptions == nil {
+ r.EncodeNil()
+ } else {
+ x.SELinuxOptions.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("seLinuxOptions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SELinuxOptions == nil {
+ r.EncodeNil()
+ } else {
+ x.SELinuxOptions.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.RunAsUser == nil {
+ r.EncodeNil()
+ } else {
+ yy15 := *x.RunAsUser
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(yy15))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("runAsUser"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RunAsUser == nil {
+ r.EncodeNil()
+ } else {
+ yy17 := *x.RunAsUser
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeInt(int64(yy17))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.RunAsNonRoot == nil {
+ r.EncodeNil()
+ } else {
+ yy20 := *x.RunAsNonRoot
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeBool(bool(yy20))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("runAsNonRoot"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RunAsNonRoot == nil {
+ r.EncodeNil()
+ } else {
+ yy22 := *x.RunAsNonRoot
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeBool(bool(yy22))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.ReadOnlyRootFilesystem == nil {
+ r.EncodeNil()
+ } else {
+ yy25 := *x.ReadOnlyRootFilesystem
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeBool(bool(yy25))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnlyRootFilesystem"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ReadOnlyRootFilesystem == nil {
+ r.EncodeNil()
+ } else {
+ yy27 := *x.ReadOnlyRootFilesystem
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeBool(bool(yy27))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SecurityContext) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SecurityContext) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "capabilities":
+ if r.TryDecodeAsNil() {
+ if x.Capabilities != nil {
+ x.Capabilities = nil
+ }
+ } else {
+ if x.Capabilities == nil {
+ x.Capabilities = new(Capabilities)
+ }
+ x.Capabilities.CodecDecodeSelf(d)
+ }
+ case "privileged":
+ if r.TryDecodeAsNil() {
+ if x.Privileged != nil {
+ x.Privileged = nil
+ }
+ } else {
+ if x.Privileged == nil {
+ x.Privileged = new(bool)
+ }
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*bool)(x.Privileged)) = r.DecodeBool()
+ }
+ }
+ case "seLinuxOptions":
+ if r.TryDecodeAsNil() {
+ if x.SELinuxOptions != nil {
+ x.SELinuxOptions = nil
+ }
+ } else {
+ if x.SELinuxOptions == nil {
+ x.SELinuxOptions = new(SELinuxOptions)
+ }
+ x.SELinuxOptions.CodecDecodeSelf(d)
+ }
+ case "runAsUser":
+ if r.TryDecodeAsNil() {
+ if x.RunAsUser != nil {
+ x.RunAsUser = nil
+ }
+ } else {
+ if x.RunAsUser == nil {
+ x.RunAsUser = new(int64)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int64)(x.RunAsUser)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "runAsNonRoot":
+ if r.TryDecodeAsNil() {
+ if x.RunAsNonRoot != nil {
+ x.RunAsNonRoot = nil
+ }
+ } else {
+ if x.RunAsNonRoot == nil {
+ x.RunAsNonRoot = new(bool)
+ }
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*bool)(x.RunAsNonRoot)) = r.DecodeBool()
+ }
+ }
+ case "readOnlyRootFilesystem":
+ if r.TryDecodeAsNil() {
+ if x.ReadOnlyRootFilesystem != nil {
+ x.ReadOnlyRootFilesystem = nil
+ }
+ } else {
+ if x.ReadOnlyRootFilesystem == nil {
+ x.ReadOnlyRootFilesystem = new(bool)
+ }
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*bool)(x.ReadOnlyRootFilesystem)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SecurityContext) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Capabilities != nil {
+ x.Capabilities = nil
+ }
+ } else {
+ if x.Capabilities == nil {
+ x.Capabilities = new(Capabilities)
+ }
+ x.Capabilities.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Privileged != nil {
+ x.Privileged = nil
+ }
+ } else {
+ if x.Privileged == nil {
+ x.Privileged = new(bool)
+ }
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*bool)(x.Privileged)) = r.DecodeBool()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SELinuxOptions != nil {
+ x.SELinuxOptions = nil
+ }
+ } else {
+ if x.SELinuxOptions == nil {
+ x.SELinuxOptions = new(SELinuxOptions)
+ }
+ x.SELinuxOptions.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RunAsUser != nil {
+ x.RunAsUser = nil
+ }
+ } else {
+ if x.RunAsUser == nil {
+ x.RunAsUser = new(int64)
+ }
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*int64)(x.RunAsUser)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RunAsNonRoot != nil {
+ x.RunAsNonRoot = nil
+ }
+ } else {
+ if x.RunAsNonRoot == nil {
+ x.RunAsNonRoot = new(bool)
+ }
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*bool)(x.RunAsNonRoot)) = r.DecodeBool()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ReadOnlyRootFilesystem != nil {
+ x.ReadOnlyRootFilesystem = nil
+ }
+ } else {
+ if x.ReadOnlyRootFilesystem == nil {
+ x.ReadOnlyRootFilesystem = new(bool)
+ }
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*bool)(x.ReadOnlyRootFilesystem)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *SELinuxOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.User != ""
+ yyq2[1] = x.Role != ""
+ yyq2[2] = x.Type != ""
+ yyq2[3] = x.Level != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.User))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("user"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.User))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Role))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("role"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Role))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Type))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Type))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Level))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("level"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Level))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SELinuxOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SELinuxOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "user":
+ if r.TryDecodeAsNil() {
+ x.User = ""
+ } else {
+ yyv4 := &x.User
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "role":
+ if r.TryDecodeAsNil() {
+ x.Role = ""
+ } else {
+ yyv6 := &x.Role
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv8 := &x.Type
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "level":
+ if r.TryDecodeAsNil() {
+ x.Level = ""
+ } else {
+ yyv10 := &x.Level
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SELinuxOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.User = ""
+ } else {
+ yyv13 := &x.User
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Role = ""
+ } else {
+ yyv15 := &x.Role
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv17 := &x.Type
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Level = ""
+ } else {
+ yyv19 := &x.Level
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Range))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("range"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Range))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Data))
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("data"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Data))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RangeAllocation) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RangeAllocation) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 "range":
+ if r.TryDecodeAsNil() {
+ x.Range = ""
+ } else {
+ yyv10 := &x.Range
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "data":
+ if r.TryDecodeAsNil() {
+ x.Data = nil
+ } else {
+ yyv12 := &x.Data
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *yyv12 = r.DecodeBytes(*(*[]byte)(yyv12), false, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv15 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv17 := &x.APIVersion
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_v1.ObjectMeta{}
+ } else {
+ yyv19 := &x.ObjectMeta
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv19) {
+ } else {
+ z.DecFallback(yyv19, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Range = ""
+ } else {
+ yyv21 := &x.Range
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Data = nil
+ } else {
+ yyv23 := &x.Data
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *yyv23 = r.DecodeBytes(*(*[]byte)(yyv23), false, false)
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Sysctl) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("Name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Value))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("Value"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Value))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Sysctl) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Sysctl) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "Name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "Value":
+ if r.TryDecodeAsNil() {
+ x.Value = ""
+ } else {
+ yyv6 := &x.Value
+ 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_containerMapEnd1234)
+}
+
+func (x *Sysctl) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv9 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Value = ""
+ } else {
+ yyv11 := &x.Value
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NodeResources) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if x.Capacity == nil {
+ r.EncodeNil()
+ } else {
+ x.Capacity.CodecEncodeSelf(e)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("Capacity"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Capacity == nil {
+ r.EncodeNil()
+ } else {
+ x.Capacity.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NodeResources) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NodeResources) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "Capacity":
+ if r.TryDecodeAsNil() {
+ x.Capacity = nil
+ } else {
+ yyv4 := &x.Capacity
+ yyv4.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NodeResources) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj5 int
+ var yyb5 bool
+ var yyhl5 bool = l >= 0
+ yyj5++
+ if yyhl5 {
+ yyb5 = yyj5 > l
+ } else {
+ yyb5 = r.CheckBreak()
+ }
+ if yyb5 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Capacity = nil
+ } else {
+ yyv6 := &x.Capacity
+ yyv6.CodecDecodeSelf(d)
+ }
+ for {
+ yyj5++
+ if yyhl5 {
+ yyb5 = yyj5 > l
+ } else {
+ yyb5 = r.CheckBreak()
+ }
+ if yyb5 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj5-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encSlicev1_OwnerReference(v []pkg2_v1.OwnerReference, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yym3 := z.EncBinary()
+ _ = yym3
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy2) {
+ } else {
+ z.EncFallback(yy2)
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicev1_OwnerReference(v *[]pkg2_v1.OwnerReference, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+
+ yyv1 := *v
+ yyh1, yyl1 := z.DecSliceHelperStart()
+ var yyc1 bool
+ _ = yyc1
+ if yyl1 == 0 {
+ if yyv1 == nil {
+ yyv1 = []pkg2_v1.OwnerReference{}
+ 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, 80)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]pkg2_v1.OwnerReference, yyrl1)
+ }
+ } else {
+ yyv1 = make([]pkg2_v1.OwnerReference, 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] = pkg2_v1.OwnerReference{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yym3 := z.DecBinary()
+ _ = yym3
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv2) {
+ } else {
+ z.DecFallback(yyv2, false)
+ }
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, pkg2_v1.OwnerReference{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = pkg2_v1.OwnerReference{}
+ } else {
+ yyv4 := &yyv1[yyj1]
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, pkg2_v1.OwnerReference{}) // var yyz1 pkg2_v1.OwnerReference
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = pkg2_v1.OwnerReference{}
+ } else {
+ yyv6 := &yyv1[yyj1]
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+
+ } else {
+ z.DecSwallow()
+ }
+
+ }
+ if yyj1 < len(yyv1) {
+ yyv1 = yyv1[:yyj1]
+ yyc1 = true
+ } else if yyj1 == 0 && yyv1 == nil {
+ yyv1 = []pkg2_v1.OwnerReference{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSlicePersistentVolumeAccessMode(v []PersistentVolumeAccessMode, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yyv1.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicePersistentVolumeAccessMode(v *[]PersistentVolumeAccessMode, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []PersistentVolumeAccessMode{}
+ 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) {
+
+ yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]PersistentVolumeAccessMode, yyrl1)
+ }
+ } else {
+ yyv1 = make([]PersistentVolumeAccessMode, yyrl1)
+ }
+ yyc1 = true
+ yyrr1 = len(yyv1)
+ } else if yyl1 != len(yyv1) {
+ yyv1 = yyv1[:yyl1]
+ yyc1 = true
+ }
+ yyj1 := 0
+ for ; yyj1 < yyrr1; yyj1++ {
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, "") // var yyz1 PersistentVolumeAccessMode
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } 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 = []PersistentVolumeAccessMode{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSlicePersistentVolume(v []PersistentVolume, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicePersistentVolume(v *[]PersistentVolume, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []PersistentVolume{}
+ 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, 552)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]PersistentVolume, yyrl1)
+ }
+ } else {
+ yyv1 = make([]PersistentVolume, 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] = PersistentVolume{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, PersistentVolume{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PersistentVolume{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, PersistentVolume{}) // var yyz1 PersistentVolume
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PersistentVolume{}
+ } 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 = []PersistentVolume{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSlicePersistentVolumeClaim(v []PersistentVolumeClaim, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicePersistentVolumeClaim(v *[]PersistentVolumeClaim, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []PersistentVolumeClaim{}
+ 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, 384)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]PersistentVolumeClaim, yyrl1)
+ }
+ } else {
+ yyv1 = make([]PersistentVolumeClaim, 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] = PersistentVolumeClaim{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, PersistentVolumeClaim{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PersistentVolumeClaim{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, PersistentVolumeClaim{}) // var yyz1 PersistentVolumeClaim
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PersistentVolumeClaim{}
+ } 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 = []PersistentVolumeClaim{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceKeyToPath(v []KeyToPath, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceKeyToPath(v *[]KeyToPath, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []KeyToPath{}
+ 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, 40)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]KeyToPath, yyrl1)
+ }
+ } else {
+ yyv1 = make([]KeyToPath, 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] = KeyToPath{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, KeyToPath{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = KeyToPath{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, KeyToPath{}) // var yyz1 KeyToPath
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = KeyToPath{}
+ } 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 = []KeyToPath{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceVolumeProjection(v []VolumeProjection, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceVolumeProjection(v *[]VolumeProjection, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []VolumeProjection{}
+ 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, 24)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]VolumeProjection, yyrl1)
+ }
+ } else {
+ yyv1 = make([]VolumeProjection, 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] = VolumeProjection{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, VolumeProjection{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = VolumeProjection{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, VolumeProjection{}) // var yyz1 VolumeProjection
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = VolumeProjection{}
+ } 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 = []VolumeProjection{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceHTTPHeader(v []HTTPHeader, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceHTTPHeader(v *[]HTTPHeader, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []HTTPHeader{}
+ 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, 32)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]HTTPHeader, yyrl1)
+ }
+ } else {
+ yyv1 = make([]HTTPHeader, 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] = HTTPHeader{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, HTTPHeader{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = HTTPHeader{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, HTTPHeader{}) // var yyz1 HTTPHeader
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = HTTPHeader{}
+ } 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 = []HTTPHeader{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceCapability(v []Capability, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yyv1.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceCapability(v *[]Capability, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Capability{}
+ 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) {
+
+ yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Capability, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Capability, yyrl1)
+ }
+ yyc1 = true
+ yyrr1 = len(yyv1)
+ } else if yyl1 != len(yyv1) {
+ yyv1 = yyv1[:yyl1]
+ yyc1 = true
+ }
+ yyj1 := 0
+ for ; yyj1 < yyrr1; yyj1++ {
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, "") // var yyz1 Capability
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } 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 = []Capability{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceContainerPort(v []ContainerPort, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceContainerPort(v *[]ContainerPort, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ContainerPort{}
+ 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, 56)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ContainerPort, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ContainerPort, 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] = ContainerPort{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ContainerPort{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ContainerPort{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ContainerPort{}) // var yyz1 ContainerPort
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ContainerPort{}
+ } 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 = []ContainerPort{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceEnvFromSource(v []EnvFromSource, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceEnvFromSource(v *[]EnvFromSource, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []EnvFromSource{}
+ 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, 32)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]EnvFromSource, yyrl1)
+ }
+ } else {
+ yyv1 = make([]EnvFromSource, 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] = EnvFromSource{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, EnvFromSource{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = EnvFromSource{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, EnvFromSource{}) // var yyz1 EnvFromSource
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = EnvFromSource{}
+ } 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 = []EnvFromSource{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceEnvVar(v []EnvVar, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceEnvVar(v *[]EnvVar, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []EnvVar{}
+ 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, 40)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]EnvVar, yyrl1)
+ }
+ } else {
+ yyv1 = make([]EnvVar, 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] = EnvVar{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, EnvVar{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = EnvVar{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, EnvVar{}) // var yyz1 EnvVar
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = EnvVar{}
+ } 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 = []EnvVar{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceVolumeMount(v []VolumeMount, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceVolumeMount(v *[]VolumeMount, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []VolumeMount{}
+ 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, 56)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]VolumeMount, yyrl1)
+ }
+ } else {
+ yyv1 = make([]VolumeMount, 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] = VolumeMount{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, VolumeMount{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = VolumeMount{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, VolumeMount{}) // var yyz1 VolumeMount
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = VolumeMount{}
+ } 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 = []VolumeMount{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceNodeSelectorTerm(v []NodeSelectorTerm, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceNodeSelectorTerm(v *[]NodeSelectorTerm, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []NodeSelectorTerm{}
+ 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, 24)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]NodeSelectorTerm, yyrl1)
+ }
+ } else {
+ yyv1 = make([]NodeSelectorTerm, 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] = NodeSelectorTerm{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, NodeSelectorTerm{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NodeSelectorTerm{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, NodeSelectorTerm{}) // var yyz1 NodeSelectorTerm
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NodeSelectorTerm{}
+ } 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 = []NodeSelectorTerm{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceNodeSelectorRequirement(v []NodeSelectorRequirement, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceNodeSelectorRequirement(v *[]NodeSelectorRequirement, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []NodeSelectorRequirement{}
+ 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, 56)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]NodeSelectorRequirement, yyrl1)
+ }
+ } else {
+ yyv1 = make([]NodeSelectorRequirement, 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] = NodeSelectorRequirement{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, NodeSelectorRequirement{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NodeSelectorRequirement{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, NodeSelectorRequirement{}) // var yyz1 NodeSelectorRequirement
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NodeSelectorRequirement{}
+ } 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 = []NodeSelectorRequirement{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSlicePodAffinityTerm(v []PodAffinityTerm, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicePodAffinityTerm(v *[]PodAffinityTerm, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []PodAffinityTerm{}
+ 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, 48)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]PodAffinityTerm, yyrl1)
+ }
+ } else {
+ yyv1 = make([]PodAffinityTerm, 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] = PodAffinityTerm{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, PodAffinityTerm{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PodAffinityTerm{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, PodAffinityTerm{}) // var yyz1 PodAffinityTerm
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PodAffinityTerm{}
+ } 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 = []PodAffinityTerm{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceWeightedPodAffinityTerm(v []WeightedPodAffinityTerm, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceWeightedPodAffinityTerm(v *[]WeightedPodAffinityTerm, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []WeightedPodAffinityTerm{}
+ 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, 56)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]WeightedPodAffinityTerm, yyrl1)
+ }
+ } else {
+ yyv1 = make([]WeightedPodAffinityTerm, 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] = WeightedPodAffinityTerm{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, WeightedPodAffinityTerm{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = WeightedPodAffinityTerm{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, WeightedPodAffinityTerm{}) // var yyz1 WeightedPodAffinityTerm
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = WeightedPodAffinityTerm{}
+ } 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 = []WeightedPodAffinityTerm{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSlicePreferredSchedulingTerm(v []PreferredSchedulingTerm, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicePreferredSchedulingTerm(v *[]PreferredSchedulingTerm, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []PreferredSchedulingTerm{}
+ 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, 32)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]PreferredSchedulingTerm, yyrl1)
+ }
+ } else {
+ yyv1 = make([]PreferredSchedulingTerm, 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] = PreferredSchedulingTerm{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, PreferredSchedulingTerm{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PreferredSchedulingTerm{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, PreferredSchedulingTerm{}) // var yyz1 PreferredSchedulingTerm
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PreferredSchedulingTerm{}
+ } 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 = []PreferredSchedulingTerm{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceVolume(v []Volume, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceVolume(v *[]Volume, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Volume{}
+ 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, 232)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Volume, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Volume, 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] = Volume{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Volume{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Volume{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Volume{}) // var yyz1 Volume
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Volume{}
+ } 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 = []Volume{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceContainer(v []Container, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceContainer(v *[]Container, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Container{}
+ 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, 296)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Container, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Container, 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] = Container{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Container{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Container{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Container{}) // var yyz1 Container
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Container{}
+ } 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 = []Container{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceLocalObjectReference(v []LocalObjectReference, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceLocalObjectReference(v *[]LocalObjectReference, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []LocalObjectReference{}
+ 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, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]LocalObjectReference, yyrl1)
+ }
+ } else {
+ yyv1 = make([]LocalObjectReference, 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] = LocalObjectReference{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, LocalObjectReference{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = LocalObjectReference{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, LocalObjectReference{}) // var yyz1 LocalObjectReference
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = LocalObjectReference{}
+ } 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 = []LocalObjectReference{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceToleration(v []Toleration, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceToleration(v *[]Toleration, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []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([]Toleration, yyrl1)
+ }
+ } else {
+ yyv1 = make([]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] = Toleration{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Toleration{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Toleration{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Toleration{}) // var yyz1 Toleration
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = 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 = []Toleration{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceHostAlias(v []HostAlias, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceHostAlias(v *[]HostAlias, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []HostAlias{}
+ 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, 40)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]HostAlias, yyrl1)
+ }
+ } else {
+ yyv1 = make([]HostAlias, 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] = HostAlias{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, HostAlias{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = HostAlias{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, HostAlias{}) // var yyz1 HostAlias
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = HostAlias{}
+ } 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 = []HostAlias{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSlicePodCondition(v []PodCondition, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicePodCondition(v *[]PodCondition, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []PodCondition{}
+ 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, 112)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]PodCondition, yyrl1)
+ }
+ } else {
+ yyv1 = make([]PodCondition, 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] = PodCondition{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, PodCondition{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PodCondition{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, PodCondition{}) // var yyz1 PodCondition
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PodCondition{}
+ } 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 = []PodCondition{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceContainerStatus(v []ContainerStatus, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceContainerStatus(v *[]ContainerStatus, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ContainerStatus{}
+ 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, 120)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ContainerStatus, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ContainerStatus, 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] = ContainerStatus{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ContainerStatus{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ContainerStatus{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ContainerStatus{}) // var yyz1 ContainerStatus
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ContainerStatus{}
+ } 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 = []ContainerStatus{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSlicePod(v []Pod, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicePod(v *[]Pod, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Pod{}
+ 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, 768)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Pod, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Pod, 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] = Pod{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Pod{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Pod{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Pod{}) // var yyz1 Pod
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Pod{}
+ } 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 = []Pod{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSlicePodTemplate(v []PodTemplate, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicePodTemplate(v *[]PodTemplate, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []PodTemplate{}
+ 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, 824)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]PodTemplate, yyrl1)
+ }
+ } else {
+ yyv1 = make([]PodTemplate, 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] = PodTemplate{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, PodTemplate{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PodTemplate{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, PodTemplate{}) // var yyz1 PodTemplate
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PodTemplate{}
+ } 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 = []PodTemplate{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceReplicationControllerCondition(v []ReplicationControllerCondition, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceReplicationControllerCondition(v *[]ReplicationControllerCondition, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ReplicationControllerCondition{}
+ 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, 88)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ReplicationControllerCondition, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ReplicationControllerCondition, 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] = ReplicationControllerCondition{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ReplicationControllerCondition{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ReplicationControllerCondition{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ReplicationControllerCondition{}) // var yyz1 ReplicationControllerCondition
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ReplicationControllerCondition{}
+ } 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 = []ReplicationControllerCondition{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceReplicationController(v []ReplicationController, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceReplicationController(v *[]ReplicationController, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ReplicationController{}
+ 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, 344)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ReplicationController, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ReplicationController, 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] = ReplicationController{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ReplicationController{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ReplicationController{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ReplicationController{}) // var yyz1 ReplicationController
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ReplicationController{}
+ } 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 = []ReplicationController{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceLoadBalancerIngress(v []LoadBalancerIngress, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceLoadBalancerIngress(v *[]LoadBalancerIngress, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []LoadBalancerIngress{}
+ 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, 32)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]LoadBalancerIngress, yyrl1)
+ }
+ } else {
+ yyv1 = make([]LoadBalancerIngress, 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] = LoadBalancerIngress{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, LoadBalancerIngress{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = LoadBalancerIngress{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, LoadBalancerIngress{}) // var yyz1 LoadBalancerIngress
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = LoadBalancerIngress{}
+ } 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 = []LoadBalancerIngress{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceServicePort(v []ServicePort, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceServicePort(v *[]ServicePort, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ServicePort{}
+ 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, 80)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ServicePort, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ServicePort, 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] = ServicePort{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ServicePort{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ServicePort{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ServicePort{}) // var yyz1 ServicePort
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ServicePort{}
+ } 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 = []ServicePort{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceService(v []Service, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceService(v *[]Service, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Service{}
+ 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, 472)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Service, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Service, 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] = Service{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Service{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Service{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Service{}) // var yyz1 Service
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Service{}
+ } 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 = []Service{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceObjectReference(v []ObjectReference, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceObjectReference(v *[]ObjectReference, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ObjectReference{}
+ 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, 112)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ObjectReference, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ObjectReference, 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] = ObjectReference{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ObjectReference{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ObjectReference{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ObjectReference{}) // var yyz1 ObjectReference
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ObjectReference{}
+ } 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 = []ObjectReference{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceServiceAccount(v []ServiceAccount, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceServiceAccount(v *[]ServiceAccount, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ServiceAccount{}
+ 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, 320)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ServiceAccount, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ServiceAccount, 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] = ServiceAccount{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ServiceAccount{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ServiceAccount{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ServiceAccount{}) // var yyz1 ServiceAccount
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ServiceAccount{}
+ } 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 = []ServiceAccount{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceEndpointSubset(v []EndpointSubset, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceEndpointSubset(v *[]EndpointSubset, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []EndpointSubset{}
+ 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([]EndpointSubset, yyrl1)
+ }
+ } else {
+ yyv1 = make([]EndpointSubset, 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] = EndpointSubset{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, EndpointSubset{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = EndpointSubset{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, EndpointSubset{}) // var yyz1 EndpointSubset
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = EndpointSubset{}
+ } 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 = []EndpointSubset{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceEndpointAddress(v []EndpointAddress, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceEndpointAddress(v *[]EndpointAddress, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []EndpointAddress{}
+ 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, 48)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]EndpointAddress, yyrl1)
+ }
+ } else {
+ yyv1 = make([]EndpointAddress, 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] = EndpointAddress{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, EndpointAddress{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = EndpointAddress{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, EndpointAddress{}) // var yyz1 EndpointAddress
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = EndpointAddress{}
+ } 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 = []EndpointAddress{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceEndpointPort(v []EndpointPort, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceEndpointPort(v *[]EndpointPort, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []EndpointPort{}
+ 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, 40)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]EndpointPort, yyrl1)
+ }
+ } else {
+ yyv1 = make([]EndpointPort, 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] = EndpointPort{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, EndpointPort{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = EndpointPort{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, EndpointPort{}) // var yyz1 EndpointPort
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = EndpointPort{}
+ } 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 = []EndpointPort{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceEndpoints(v []Endpoints, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceEndpoints(v *[]Endpoints, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Endpoints{}
+ 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, 288)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Endpoints, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Endpoints, 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] = Endpoints{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Endpoints{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Endpoints{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Endpoints{}) // var yyz1 Endpoints
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Endpoints{}
+ } 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 = []Endpoints{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceTaint(v []Taint, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceTaint(v *[]Taint, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Taint{}
+ 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([]Taint, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Taint, 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] = Taint{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Taint{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Taint{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Taint{}) // var yyz1 Taint
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Taint{}
+ } 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 = []Taint{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceNodeCondition(v []NodeCondition, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceNodeCondition(v *[]NodeCondition, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []NodeCondition{}
+ 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, 112)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]NodeCondition, yyrl1)
+ }
+ } else {
+ yyv1 = make([]NodeCondition, 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] = NodeCondition{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, NodeCondition{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NodeCondition{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, NodeCondition{}) // var yyz1 NodeCondition
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NodeCondition{}
+ } 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 = []NodeCondition{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceNodeAddress(v []NodeAddress, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceNodeAddress(v *[]NodeAddress, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []NodeAddress{}
+ 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, 32)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]NodeAddress, yyrl1)
+ }
+ } else {
+ yyv1 = make([]NodeAddress, 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] = NodeAddress{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, NodeAddress{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NodeAddress{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, NodeAddress{}) // var yyz1 NodeAddress
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NodeAddress{}
+ } 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 = []NodeAddress{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceContainerImage(v []ContainerImage, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceContainerImage(v *[]ContainerImage, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ContainerImage{}
+ 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, 32)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ContainerImage, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ContainerImage, 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] = ContainerImage{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ContainerImage{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ContainerImage{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ContainerImage{}) // var yyz1 ContainerImage
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ContainerImage{}
+ } 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 = []ContainerImage{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceUniqueVolumeName(v []UniqueVolumeName, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yyv1.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceUniqueVolumeName(v *[]UniqueVolumeName, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []UniqueVolumeName{}
+ 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) {
+
+ yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]UniqueVolumeName, yyrl1)
+ }
+ } else {
+ yyv1 = make([]UniqueVolumeName, yyrl1)
+ }
+ yyc1 = true
+ yyrr1 = len(yyv1)
+ } else if yyl1 != len(yyv1) {
+ yyv1 = yyv1[:yyl1]
+ yyc1 = true
+ }
+ yyj1 := 0
+ for ; yyj1 < yyrr1; yyj1++ {
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, "") // var yyz1 UniqueVolumeName
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } 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 = []UniqueVolumeName{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceAttachedVolume(v []AttachedVolume, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceAttachedVolume(v *[]AttachedVolume, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []AttachedVolume{}
+ 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, 32)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]AttachedVolume, yyrl1)
+ }
+ } else {
+ yyv1 = make([]AttachedVolume, 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] = AttachedVolume{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, AttachedVolume{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = AttachedVolume{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, AttachedVolume{}) // var yyz1 AttachedVolume
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = AttachedVolume{}
+ } 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 = []AttachedVolume{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSlicePreferAvoidPodsEntry(v []PreferAvoidPodsEntry, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicePreferAvoidPodsEntry(v *[]PreferAvoidPodsEntry, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []PreferAvoidPodsEntry{}
+ 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, 64)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]PreferAvoidPodsEntry, yyrl1)
+ }
+ } else {
+ yyv1 = make([]PreferAvoidPodsEntry, 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] = PreferAvoidPodsEntry{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, PreferAvoidPodsEntry{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PreferAvoidPodsEntry{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, PreferAvoidPodsEntry{}) // var yyz1 PreferAvoidPodsEntry
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PreferAvoidPodsEntry{}
+ } 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 = []PreferAvoidPodsEntry{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encResourceList(v ResourceList, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeMapStart(len(v))
+ for yyk1, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ yyk1.CodecEncodeSelf(e)
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy3 := &yyv1
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy3) {
+ } else if !yym4 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy3)
+ } else {
+ z.EncFallback(yy3)
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) decResourceList(v *ResourceList, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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, 72)
+ yyv1 = make(map[ResourceName]pkg3_resource.Quantity, yyrl1)
+ *v = yyv1
+ }
+ var yymk1 ResourceName
+ var yymv1 pkg3_resource.Quantity
+ var yymg1 bool
+ if yybh1.MapValueReset {
+ yymg1 = true
+ }
+ if yyl1 > 0 {
+ for yyj1 := 0; yyj1 < yyl1; yyj1++ {
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ if r.TryDecodeAsNil() {
+ yymk1 = ""
+ } else {
+ yyv2 := &yymk1
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = pkg3_resource.Quantity{}
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = pkg3_resource.Quantity{}
+ } else {
+ yyv3 := &yymv1
+ yym4 := z.DecBinary()
+ _ = yym4
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv3) {
+ } else if !yym4 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv3)
+ } else {
+ z.DecFallback(yyv3, false)
+ }
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } else if yyl1 < 0 {
+ for yyj1 := 0; !r.CheckBreak(); yyj1++ {
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ if r.TryDecodeAsNil() {
+ yymk1 = ""
+ } else {
+ yyv5 := &yymk1
+ yyv5.CodecDecodeSelf(d)
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = pkg3_resource.Quantity{}
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = pkg3_resource.Quantity{}
+ } else {
+ yyv6 := &yymv1
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } // else len==0: TODO: Should we clear map entries?
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) encSliceNode(v []Node, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceNode(v *[]Node, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Node{}
+ 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, 664)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Node, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Node, 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] = Node{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Node{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Node{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Node{}) // var yyz1 Node
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Node{}
+ } 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 = []Node{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceFinalizerName(v []FinalizerName, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yyv1.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceFinalizerName(v *[]FinalizerName, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []FinalizerName{}
+ 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) {
+
+ yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]FinalizerName, yyrl1)
+ }
+ } else {
+ yyv1 = make([]FinalizerName, yyrl1)
+ }
+ yyc1 = true
+ yyrr1 = len(yyv1)
+ } else if yyl1 != len(yyv1) {
+ yyv1 = yyv1[:yyl1]
+ yyc1 = true
+ }
+ yyj1 := 0
+ for ; yyj1 < yyrr1; yyj1++ {
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, "") // var yyz1 FinalizerName
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } 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 = []FinalizerName{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceNamespace(v []Namespace, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceNamespace(v *[]Namespace, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+
+ yyv1 := *v
+ yyh1, yyl1 := z.DecSliceHelperStart()
+ var yyc1 bool
+ _ = yyc1
+ if yyl1 == 0 {
+ if yyv1 == nil {
+ yyv1 = []Namespace{}
+ yyc1 = true
+ } else if len(yyv1) != 0 {
+ yyv1 = yyv1[:0]
+ yyc1 = true
+ }
+ } else 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, 304)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Namespace, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Namespace, 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] = Namespace{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Namespace{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Namespace{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Namespace{}) // var yyz1 Namespace
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Namespace{}
+ } 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 = []Namespace{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceEvent(v []Event, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceEvent(v *[]Event, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Event{}
+ 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, 512)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Event, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Event, 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] = Event{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Event{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Event{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Event{}) // var yyz1 Event
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Event{}
+ } 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 = []Event{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceruntime_RawExtension(v []pkg5_runtime.RawExtension, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yym3 := z.EncBinary()
+ _ = yym3
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy2) {
+ } else if !yym3 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy2)
+ } else {
+ z.EncFallback(yy2)
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceruntime_RawExtension(v *[]pkg5_runtime.RawExtension, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []pkg5_runtime.RawExtension{}
+ 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, 40)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]pkg5_runtime.RawExtension, yyrl1)
+ }
+ } else {
+ yyv1 = make([]pkg5_runtime.RawExtension, 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] = pkg5_runtime.RawExtension{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yym3 := z.DecBinary()
+ _ = yym3
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv2) {
+ } else if !yym3 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv2)
+ } else {
+ z.DecFallback(yyv2, false)
+ }
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, pkg5_runtime.RawExtension{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = pkg5_runtime.RawExtension{}
+ } else {
+ yyv4 := &yyv1[yyj1]
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else if !yym5 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv4)
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, pkg5_runtime.RawExtension{}) // var yyz1 pkg5_runtime.RawExtension
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = pkg5_runtime.RawExtension{}
+ } else {
+ yyv6 := &yyv1[yyj1]
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+
+ } else {
+ z.DecSwallow()
+ }
+
+ }
+ if yyj1 < len(yyv1) {
+ yyv1 = yyv1[:yyj1]
+ yyc1 = true
+ } else if yyj1 == 0 && yyv1 == nil {
+ yyv1 = []pkg5_runtime.RawExtension{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceLimitRangeItem(v []LimitRangeItem, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceLimitRangeItem(v *[]LimitRangeItem, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []LimitRangeItem{}
+ 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, 56)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]LimitRangeItem, yyrl1)
+ }
+ } else {
+ yyv1 = make([]LimitRangeItem, 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] = LimitRangeItem{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, LimitRangeItem{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = LimitRangeItem{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, LimitRangeItem{}) // var yyz1 LimitRangeItem
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = LimitRangeItem{}
+ } 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 = []LimitRangeItem{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceLimitRange(v []LimitRange, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceLimitRange(v *[]LimitRange, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []LimitRange{}
+ 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, 288)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]LimitRange, yyrl1)
+ }
+ } else {
+ yyv1 = make([]LimitRange, 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] = LimitRange{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, LimitRange{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = LimitRange{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, LimitRange{}) // var yyz1 LimitRange
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = LimitRange{}
+ } 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 = []LimitRange{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceResourceQuotaScope(v []ResourceQuotaScope, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yyv1.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceResourceQuotaScope(v *[]ResourceQuotaScope, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ResourceQuotaScope{}
+ 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) {
+
+ yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ResourceQuotaScope, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ResourceQuotaScope, yyrl1)
+ }
+ yyc1 = true
+ yyrr1 = len(yyv1)
+ } else if yyl1 != len(yyv1) {
+ yyv1 = yyv1[:yyl1]
+ yyc1 = true
+ }
+ yyj1 := 0
+ for ; yyj1 < yyrr1; yyj1++ {
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, "") // var yyz1 ResourceQuotaScope
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } 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 = []ResourceQuotaScope{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceResourceQuota(v []ResourceQuota, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceResourceQuota(v *[]ResourceQuota, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ResourceQuota{}
+ 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, 312)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ResourceQuota, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ResourceQuota, 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] = ResourceQuota{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ResourceQuota{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ResourceQuota{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ResourceQuota{}) // var yyz1 ResourceQuota
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ResourceQuota{}
+ } 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 = []ResourceQuota{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encMapstringSliceuint8(v map[string][]uint8, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeMapStart(len(v))
+ for yyk1, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ yym2 := z.EncBinary()
+ _ = yym2
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yyk1))
+ }
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyv1 == nil {
+ r.EncodeNil()
+ } else {
+ yym3 := z.EncBinary()
+ _ = yym3
+ if false {
+ } else {
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(yyv1))
+ }
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) decMapstringSliceuint8(v *map[string][]uint8, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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, 40)
+ yyv1 = make(map[string][]uint8, yyrl1)
+ *v = yyv1
+ }
+ var yymk1 string
+ var yymv1 []uint8
+ var yymg1 bool
+ if yybh1.MapValueReset {
+ yymg1 = true
+ }
+ if yyl1 > 0 {
+ for yyj1 := 0; yyj1 < yyl1; yyj1++ {
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ if r.TryDecodeAsNil() {
+ yymk1 = ""
+ } else {
+ yyv2 := &yymk1
+ yym3 := z.DecBinary()
+ _ = yym3
+ if false {
+ } else {
+ *((*string)(yyv2)) = r.DecodeString()
+ }
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv4 := &yymv1
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *yyv4 = r.DecodeBytes(*(*[]byte)(yyv4), false, false)
+ }
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } else if yyl1 < 0 {
+ for yyj1 := 0; !r.CheckBreak(); yyj1++ {
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ if r.TryDecodeAsNil() {
+ yymk1 = ""
+ } else {
+ yyv6 := &yymk1
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv8 := &yymv1
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *yyv8 = r.DecodeBytes(*(*[]byte)(yyv8), false, false)
+ }
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } // else len==0: TODO: Should we clear map entries?
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) encSliceuint8(v []uint8, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(v))
+}
+
+func (x codecSelfer1234) decSliceuint8(v *[]uint8, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ *v = r.DecodeBytes(*((*[]byte)(v)), false, false)
+}
+
+func (x codecSelfer1234) encSliceSecret(v []Secret, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceSecret(v *[]Secret, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Secret{}
+ 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, 296)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Secret, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Secret, 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] = Secret{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Secret{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Secret{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Secret{}) // var yyz1 Secret
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Secret{}
+ } 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 = []Secret{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceConfigMap(v []ConfigMap, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceConfigMap(v *[]ConfigMap, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ConfigMap{}
+ 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, 272)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ConfigMap, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ConfigMap, 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] = ConfigMap{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ConfigMap{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ConfigMap{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ConfigMap{}) // var yyz1 ConfigMap
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ConfigMap{}
+ } 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 = []ConfigMap{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceComponentCondition(v []ComponentCondition, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceComponentCondition(v *[]ComponentCondition, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ComponentCondition{}
+ 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, 64)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ComponentCondition, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ComponentCondition, 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] = ComponentCondition{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ComponentCondition{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ComponentCondition{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ComponentCondition{}) // var yyz1 ComponentCondition
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ComponentCondition{}
+ } 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 = []ComponentCondition{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceComponentStatus(v []ComponentStatus, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceComponentStatus(v *[]ComponentStatus, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ComponentStatus{}
+ 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, 288)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ComponentStatus, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ComponentStatus, 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] = ComponentStatus{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ComponentStatus{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ComponentStatus{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ComponentStatus{}) // var yyz1 ComponentStatus
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ComponentStatus{}
+ } 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 = []ComponentStatus{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceDownwardAPIVolumeFile(v []DownwardAPIVolumeFile, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceDownwardAPIVolumeFile(v *[]DownwardAPIVolumeFile, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []DownwardAPIVolumeFile{}
+ 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, 40)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]DownwardAPIVolumeFile, yyrl1)
+ }
+ } else {
+ yyv1 = make([]DownwardAPIVolumeFile, 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] = DownwardAPIVolumeFile{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, DownwardAPIVolumeFile{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = DownwardAPIVolumeFile{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, DownwardAPIVolumeFile{}) // var yyz1 DownwardAPIVolumeFile
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = DownwardAPIVolumeFile{}
+ } 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 = []DownwardAPIVolumeFile{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/types.go b/vendor/k8s.io/kubernetes/pkg/api/v1/types.go
new file mode 100644
index 000000000..940f0e325
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/v1/types.go
@@ -0,0 +1,4617 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/api/resource"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/types"
+ "k8s.io/apimachinery/pkg/util/intstr"
+)
+
+// The comments for the structs and fields can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored and not exported to the SwaggerAPI.
+//
+// The aforementioned methods can be generated by hack/update-generated-swagger-docs.sh
+
+// Common string formats
+// ---------------------
+// Many fields in this API have formatting requirements. The commonly used
+// formats are defined here.
+//
+// C_IDENTIFIER: This is a string that conforms to the definition of an "identifier"
+// in the C language. This is captured by the following regex:
+// [A-Za-z_][A-Za-z0-9_]*
+// This defines the format, but not the length restriction, which should be
+// specified at the definition of any field of this type.
+//
+// DNS_LABEL: This is a string, no more than 63 characters long, that conforms
+// to the definition of a "label" in RFCs 1035 and 1123. This is captured
+// by the following regex:
+// [a-z0-9]([-a-z0-9]*[a-z0-9])?
+//
+// DNS_SUBDOMAIN: This is a string, no more than 253 characters long, that conforms
+// to the definition of a "subdomain" in RFCs 1035 and 1123. This is captured
+// by the following regex:
+// [a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*
+// or more simply:
+// DNS_LABEL(\.DNS_LABEL)*
+//
+// IANA_SVC_NAME: This is a string, no more than 15 characters long, that
+// conforms to the definition of IANA service name in RFC 6335.
+// It must contains at least one letter [a-z] and it must contains only [a-z0-9-].
+// Hypens ('-') cannot be leading or trailing character of the string
+// and cannot be adjacent to other hyphens.
+
+// ObjectMeta is metadata that all persisted resources must have, which includes all objects
+// users must create.
+// DEPRECATED: Use k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta instead - this type will be removed soon.
+// +k8s:openapi-gen=false
+type ObjectMeta struct {
+ // Name must be unique within a namespace. Is required when creating resources, although
+ // some resources may allow a client to request the generation of an appropriate name
+ // automatically. Name is primarily intended for creation idempotence and configuration
+ // definition.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ // +optional
+ Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
+
+ // GenerateName is an optional prefix, used by the server, to generate a unique
+ // name ONLY IF the Name field has not been provided.
+ // If this field is used, the name returned to the client will be different
+ // than the name passed. This value will also be combined with a unique suffix.
+ // The provided value has the same validation rules as the Name field,
+ // and may be truncated by the length of the suffix required to make the value
+ // unique on the server.
+ //
+ // If this field is specified and the generated name exists, the server will
+ // NOT return a 409 - instead, it will either return 201 Created or 500 with Reason
+ // ServerTimeout indicating a unique name could not be found in the time allotted, and the client
+ // should retry (optionally after the time indicated in the Retry-After header).
+ //
+ // Applied only if Name is not specified.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency
+ // +optional
+ GenerateName string `json:"generateName,omitempty" protobuf:"bytes,2,opt,name=generateName"`
+
+ // Namespace defines the space within each name must be unique. An empty namespace is
+ // equivalent to the "default" namespace, but "default" is the canonical representation.
+ // Not all objects are required to be scoped to a namespace - the value of this field for
+ // those objects will be empty.
+ //
+ // Must be a DNS_LABEL.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
+ // +optional
+ Namespace string `json:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"`
+
+ // SelfLink is a URL representing this object.
+ // Populated by the system.
+ // Read-only.
+ // +optional
+ SelfLink string `json:"selfLink,omitempty" protobuf:"bytes,4,opt,name=selfLink"`
+
+ // UID is the unique in time and space value for this object. It is typically generated by
+ // the server on successful creation of a resource and is not allowed to change on PUT
+ // operations.
+ //
+ // Populated by the system.
+ // Read-only.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
+ // +optional
+ UID types.UID `json:"uid,omitempty" protobuf:"bytes,5,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"`
+
+ // An opaque value that represents the internal version of this object that can
+ // be used by clients to determine when objects have changed. May be used for optimistic
+ // concurrency, change detection, and the watch operation on a resource or set of resources.
+ // Clients must treat these values as opaque and passed unmodified back to the server.
+ // They may only be valid for a particular resource or set of resources.
+ //
+ // Populated by the system.
+ // Read-only.
+ // Value must be treated as opaque by clients and .
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
+ // +optional
+ ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,6,opt,name=resourceVersion"`
+
+ // A sequence number representing a specific generation of the desired state.
+ // Populated by the system. Read-only.
+ // +optional
+ Generation int64 `json:"generation,omitempty" protobuf:"varint,7,opt,name=generation"`
+
+ // CreationTimestamp is a timestamp representing the server time when this object was
+ // created. It is not guaranteed to be set in happens-before order across separate operations.
+ // Clients may not set this value. It is represented in RFC3339 form and is in UTC.
+ //
+ // Populated by the system.
+ // Read-only.
+ // Null for lists.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ CreationTimestamp metav1.Time `json:"creationTimestamp,omitempty" protobuf:"bytes,8,opt,name=creationTimestamp"`
+
+ // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This
+ // field is set by the server when a graceful deletion is requested by the user, and is not
+ // directly settable by a client. The resource is expected to be deleted (no longer visible
+ // from resource lists, and not reachable by name) after the time in this field. Once set,
+ // this value may not be unset or be set further into the future, although it may be shortened
+ // or the resource may be deleted prior to this time. For example, a user may request that
+ // a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination
+ // signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard
+ // termination signal (SIGKILL) to the container and after cleanup, remove the pod from the
+ // API. In the presence of network partitions, this object may still exist after this
+ // timestamp, until an administrator or automated process can determine the resource is
+ // fully terminated.
+ // If not set, graceful deletion of the object has not been requested.
+ //
+ // Populated by the system when a graceful deletion is requested.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ DeletionTimestamp *metav1.Time `json:"deletionTimestamp,omitempty" protobuf:"bytes,9,opt,name=deletionTimestamp"`
+
+ // Number of seconds allowed for this object to gracefully terminate before
+ // it will be removed from the system. Only set when deletionTimestamp is also set.
+ // May only be shortened.
+ // Read-only.
+ // +optional
+ DeletionGracePeriodSeconds *int64 `json:"deletionGracePeriodSeconds,omitempty" protobuf:"varint,10,opt,name=deletionGracePeriodSeconds"`
+
+ // Map of string keys and values that can be used to organize and categorize
+ // (scope and select) objects. May match selectors of replication controllers
+ // and services.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
+ // +optional
+ Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,11,rep,name=labels"`
+
+ // Annotations is an unstructured key value map stored with a resource that may be
+ // set by external tools to store and retrieve arbitrary metadata. They are not
+ // queryable and should be preserved when modifying objects.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
+ // +optional
+ Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,12,rep,name=annotations"`
+
+ // List of objects depended by this object. If ALL objects in the list have
+ // been deleted, this object will be garbage collected. If this object is managed by a controller,
+ // then an entry in this list will point to this controller, with the controller field set to true.
+ // There cannot be more than one managing controller.
+ // +optional
+ // +patchMergeKey=uid
+ // +patchStrategy=merge
+ OwnerReferences []metav1.OwnerReference `json:"ownerReferences,omitempty" patchStrategy:"merge" patchMergeKey:"uid" protobuf:"bytes,13,rep,name=ownerReferences"`
+
+ // An initializer is a controller which enforces some system invariant at object creation time.
+ // This field is a list of initializers that have not yet acted on this object. If nil or empty,
+ // this object has been completely initialized. Otherwise, the object is considered uninitialized
+ // and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to
+ // observe uninitialized objects.
+ //
+ // When an object is created, the system will populate this list with the current set of initializers.
+ // Only privileged users may set or modify this list. Once it is empty, it may not be modified further
+ // by any user.
+ Initializers *metav1.Initializers `json:"initializers,omitempty" patchStrategy:"merge" protobuf:"bytes,16,rep,name=initializers"`
+
+ // Must be empty before the object is deleted from the registry. Each entry
+ // is an identifier for the responsible component that will remove the entry
+ // from the list. If the deletionTimestamp of the object is non-nil, entries
+ // in this list can only be removed.
+ // +optional
+ // +patchStrategy=merge
+ Finalizers []string `json:"finalizers,omitempty" patchStrategy:"merge" protobuf:"bytes,14,rep,name=finalizers"`
+
+ // The name of the cluster which the object belongs to.
+ // This is used to distinguish resources with same name and namespace in different clusters.
+ // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.
+ // +optional
+ ClusterName string `json:"clusterName,omitempty" protobuf:"bytes,15,opt,name=clusterName"`
+}
+
+const (
+ // NamespaceDefault means the object is in the default namespace which is applied when not specified by clients
+ NamespaceDefault string = "default"
+ // NamespaceAll is the default argument to specify on a context when you want to list or filter resources across all namespaces
+ NamespaceAll string = ""
+)
+
+// Volume represents a named volume in a pod that may be accessed by any container in the pod.
+type Volume struct {
+ // Volume's name.
+ // Must be a DNS_LABEL and unique within the pod.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
+ // VolumeSource represents the location and type of the mounted volume.
+ // If not specified, the Volume is implied to be an EmptyDir.
+ // This implied behavior is deprecated and will be removed in a future version.
+ VolumeSource `json:",inline" protobuf:"bytes,2,opt,name=volumeSource"`
+}
+
+// Represents the source of a volume to mount.
+// Only one of its members may be specified.
+type VolumeSource struct {
+ // HostPath represents a pre-existing file or directory on the host
+ // machine that is directly exposed to the container. This is generally
+ // used for system agents or other privileged things that are allowed
+ // to see the host machine. Most containers will NOT need this.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
+ // ---
+ // TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not
+ // mount host directories as read/write.
+ // +optional
+ HostPath *HostPathVolumeSource `json:"hostPath,omitempty" protobuf:"bytes,1,opt,name=hostPath"`
+ // EmptyDir represents a temporary directory that shares a pod's lifetime.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
+ // +optional
+ EmptyDir *EmptyDirVolumeSource `json:"emptyDir,omitempty" protobuf:"bytes,2,opt,name=emptyDir"`
+ // GCEPersistentDisk represents a GCE Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ // +optional
+ GCEPersistentDisk *GCEPersistentDiskVolumeSource `json:"gcePersistentDisk,omitempty" protobuf:"bytes,3,opt,name=gcePersistentDisk"`
+ // AWSElasticBlockStore represents an AWS Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+ // +optional
+ AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource `json:"awsElasticBlockStore,omitempty" protobuf:"bytes,4,opt,name=awsElasticBlockStore"`
+ // GitRepo represents a git repository at a particular revision.
+ // +optional
+ GitRepo *GitRepoVolumeSource `json:"gitRepo,omitempty" protobuf:"bytes,5,opt,name=gitRepo"`
+ // Secret represents a secret that should populate this volume.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
+ // +optional
+ Secret *SecretVolumeSource `json:"secret,omitempty" protobuf:"bytes,6,opt,name=secret"`
+ // NFS represents an NFS mount on the host that shares a pod's lifetime
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+ // +optional
+ NFS *NFSVolumeSource `json:"nfs,omitempty" protobuf:"bytes,7,opt,name=nfs"`
+ // ISCSI represents an ISCSI Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md
+ // +optional
+ ISCSI *ISCSIVolumeSource `json:"iscsi,omitempty" protobuf:"bytes,8,opt,name=iscsi"`
+ // Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md
+ // +optional
+ Glusterfs *GlusterfsVolumeSource `json:"glusterfs,omitempty" protobuf:"bytes,9,opt,name=glusterfs"`
+ // PersistentVolumeClaimVolumeSource represents a reference to a
+ // PersistentVolumeClaim in the same namespace.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+ // +optional
+ PersistentVolumeClaim *PersistentVolumeClaimVolumeSource `json:"persistentVolumeClaim,omitempty" protobuf:"bytes,10,opt,name=persistentVolumeClaim"`
+ // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md
+ // +optional
+ RBD *RBDVolumeSource `json:"rbd,omitempty" protobuf:"bytes,11,opt,name=rbd"`
+ // FlexVolume represents a generic volume resource that is
+ // provisioned/attached using an exec based plugin. This is an
+ // alpha feature and may change in future.
+ // +optional
+ FlexVolume *FlexVolumeSource `json:"flexVolume,omitempty" protobuf:"bytes,12,opt,name=flexVolume"`
+ // Cinder represents a cinder volume attached and mounted on kubelets host machine
+ // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ // +optional
+ Cinder *CinderVolumeSource `json:"cinder,omitempty" protobuf:"bytes,13,opt,name=cinder"`
+ // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
+ // +optional
+ CephFS *CephFSVolumeSource `json:"cephfs,omitempty" protobuf:"bytes,14,opt,name=cephfs"`
+ // Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
+ // +optional
+ Flocker *FlockerVolumeSource `json:"flocker,omitempty" protobuf:"bytes,15,opt,name=flocker"`
+ // DownwardAPI represents downward API about the pod that should populate this volume
+ // +optional
+ DownwardAPI *DownwardAPIVolumeSource `json:"downwardAPI,omitempty" protobuf:"bytes,16,opt,name=downwardAPI"`
+ // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
+ // +optional
+ FC *FCVolumeSource `json:"fc,omitempty" protobuf:"bytes,17,opt,name=fc"`
+ // AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
+ // +optional
+ AzureFile *AzureFileVolumeSource `json:"azureFile,omitempty" protobuf:"bytes,18,opt,name=azureFile"`
+ // ConfigMap represents a configMap that should populate this volume
+ // +optional
+ ConfigMap *ConfigMapVolumeSource `json:"configMap,omitempty" protobuf:"bytes,19,opt,name=configMap"`
+ // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
+ // +optional
+ VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty" protobuf:"bytes,20,opt,name=vsphereVolume"`
+ // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
+ // +optional
+ Quobyte *QuobyteVolumeSource `json:"quobyte,omitempty" protobuf:"bytes,21,opt,name=quobyte"`
+ // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
+ // +optional
+ AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty" protobuf:"bytes,22,opt,name=azureDisk"`
+ // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine
+ PhotonPersistentDisk *PhotonPersistentDiskVolumeSource `json:"photonPersistentDisk,omitempty" protobuf:"bytes,23,opt,name=photonPersistentDisk"`
+ // Items for all in one resources secrets, configmaps, and downward API
+ Projected *ProjectedVolumeSource `json:"projected,omitempty" protobuf:"bytes,26,opt,name=projected"`
+ // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine
+ // +optional
+ PortworxVolume *PortworxVolumeSource `json:"portworxVolume,omitempty" protobuf:"bytes,24,opt,name=portworxVolume"`
+ // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
+ // +optional
+ ScaleIO *ScaleIOVolumeSource `json:"scaleIO,omitempty" protobuf:"bytes,25,opt,name=scaleIO"`
+ // StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.
+ // +optional
+ StorageOS *StorageOSVolumeSource `json:"storageos,omitempty" protobuf:"bytes,27,opt,name=storageos"`
+}
+
+// PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace.
+// This volume finds the bound PV and mounts that volume for the pod. A
+// PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another
+// type of volume that is owned by someone else (the system).
+type PersistentVolumeClaimVolumeSource struct {
+ // ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+ ClaimName string `json:"claimName" protobuf:"bytes,1,opt,name=claimName"`
+ // Will force the ReadOnly setting in VolumeMounts.
+ // Default false.
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,2,opt,name=readOnly"`
+}
+
+// PersistentVolumeSource is similar to VolumeSource but meant for the
+// administrator who creates PVs. Exactly one of its members must be set.
+type PersistentVolumeSource struct {
+ // GCEPersistentDisk represents a GCE Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod. Provisioned by an admin.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ // +optional
+ GCEPersistentDisk *GCEPersistentDiskVolumeSource `json:"gcePersistentDisk,omitempty" protobuf:"bytes,1,opt,name=gcePersistentDisk"`
+ // AWSElasticBlockStore represents an AWS Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+ // +optional
+ AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource `json:"awsElasticBlockStore,omitempty" protobuf:"bytes,2,opt,name=awsElasticBlockStore"`
+ // HostPath represents a directory on the host.
+ // Provisioned by a developer or tester.
+ // This is useful for single-node development and testing only!
+ // On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
+ // +optional
+ HostPath *HostPathVolumeSource `json:"hostPath,omitempty" protobuf:"bytes,3,opt,name=hostPath"`
+ // Glusterfs represents a Glusterfs volume that is attached to a host and
+ // exposed to the pod. Provisioned by an admin.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md
+ // +optional
+ Glusterfs *GlusterfsVolumeSource `json:"glusterfs,omitempty" protobuf:"bytes,4,opt,name=glusterfs"`
+ // NFS represents an NFS mount on the host. Provisioned by an admin.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+ // +optional
+ NFS *NFSVolumeSource `json:"nfs,omitempty" protobuf:"bytes,5,opt,name=nfs"`
+ // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md
+ // +optional
+ RBD *RBDVolumeSource `json:"rbd,omitempty" protobuf:"bytes,6,opt,name=rbd"`
+ // ISCSI represents an ISCSI Disk resource that is attached to a
+ // kubelet's host machine and then exposed to the pod. Provisioned by an admin.
+ // +optional
+ ISCSI *ISCSIVolumeSource `json:"iscsi,omitempty" protobuf:"bytes,7,opt,name=iscsi"`
+ // Cinder represents a cinder volume attached and mounted on kubelets host machine
+ // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ // +optional
+ Cinder *CinderVolumeSource `json:"cinder,omitempty" protobuf:"bytes,8,opt,name=cinder"`
+ // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
+ // +optional
+ CephFS *CephFSVolumeSource `json:"cephfs,omitempty" protobuf:"bytes,9,opt,name=cephfs"`
+ // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
+ // +optional
+ FC *FCVolumeSource `json:"fc,omitempty" protobuf:"bytes,10,opt,name=fc"`
+ // Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running
+ // +optional
+ Flocker *FlockerVolumeSource `json:"flocker,omitempty" protobuf:"bytes,11,opt,name=flocker"`
+ // FlexVolume represents a generic volume resource that is
+ // provisioned/attached using an exec based plugin. This is an
+ // alpha feature and may change in future.
+ // +optional
+ FlexVolume *FlexVolumeSource `json:"flexVolume,omitempty" protobuf:"bytes,12,opt,name=flexVolume"`
+ // AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
+ // +optional
+ AzureFile *AzureFileVolumeSource `json:"azureFile,omitempty" protobuf:"bytes,13,opt,name=azureFile"`
+ // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
+ // +optional
+ VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty" protobuf:"bytes,14,opt,name=vsphereVolume"`
+ // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
+ // +optional
+ Quobyte *QuobyteVolumeSource `json:"quobyte,omitempty" protobuf:"bytes,15,opt,name=quobyte"`
+ // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
+ // +optional
+ AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty" protobuf:"bytes,16,opt,name=azureDisk"`
+ // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine
+ PhotonPersistentDisk *PhotonPersistentDiskVolumeSource `json:"photonPersistentDisk,omitempty" protobuf:"bytes,17,opt,name=photonPersistentDisk"`
+ // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine
+ // +optional
+ PortworxVolume *PortworxVolumeSource `json:"portworxVolume,omitempty" protobuf:"bytes,18,opt,name=portworxVolume"`
+ // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
+ // +optional
+ ScaleIO *ScaleIOVolumeSource `json:"scaleIO,omitempty" protobuf:"bytes,19,opt,name=scaleIO"`
+ // Local represents directly-attached storage with node affinity
+ // +optional
+ Local *LocalVolumeSource `json:"local,omitempty" protobuf:"bytes,20,opt,name=local"`
+ // StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md
+ // +optional
+ StorageOS *StorageOSPersistentVolumeSource `json:"storageos,omitempty" protobuf:"bytes,21,opt,name=storageos"`
+}
+
+const (
+ // BetaStorageClassAnnotation represents the beta/previous StorageClass annotation.
+ // It's currently still used and will be held for backwards compatibility
+ BetaStorageClassAnnotation = "volume.beta.kubernetes.io/storage-class"
+
+ // MountOptionAnnotation defines mount option annotation used in PVs
+ MountOptionAnnotation = "volume.beta.kubernetes.io/mount-options"
+
+ // AlphaStorageNodeAffinityAnnotation defines node affinity policies for a PersistentVolume.
+ // Value is a string of the json representation of type NodeAffinity
+ AlphaStorageNodeAffinityAnnotation = "volume.alpha.kubernetes.io/node-affinity"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+
+// PersistentVolume (PV) is a storage resource provisioned by an administrator.
+// It is analogous to a node.
+// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
+type PersistentVolume struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines a specification of a persistent volume owned by the cluster.
+ // Provisioned by an administrator.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes
+ // +optional
+ Spec PersistentVolumeSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status represents the current information/status for the persistent volume.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes
+ // +optional
+ Status PersistentVolumeStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// PersistentVolumeSpec is the specification of a persistent volume.
+type PersistentVolumeSpec struct {
+ // A description of the persistent volume's resources and capacity.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity
+ // +optional
+ Capacity ResourceList `json:"capacity,omitempty" protobuf:"bytes,1,rep,name=capacity,casttype=ResourceList,castkey=ResourceName"`
+ // The actual volume backing the persistent volume.
+ PersistentVolumeSource `json:",inline" protobuf:"bytes,2,opt,name=persistentVolumeSource"`
+ // AccessModes contains all ways the volume can be mounted.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes
+ // +optional
+ AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,3,rep,name=accessModes,casttype=PersistentVolumeAccessMode"`
+ // ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim.
+ // Expected to be non-nil when bound.
+ // claim.VolumeName is the authoritative bind between PV and PVC.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding
+ // +optional
+ ClaimRef *ObjectReference `json:"claimRef,omitempty" protobuf:"bytes,4,opt,name=claimRef"`
+ // What happens to a persistent volume when released from its claim.
+ // Valid options are Retain (default) and Recycle.
+ // Recycling must be supported by the volume plugin underlying this persistent volume.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming
+ // +optional
+ PersistentVolumeReclaimPolicy PersistentVolumeReclaimPolicy `json:"persistentVolumeReclaimPolicy,omitempty" protobuf:"bytes,5,opt,name=persistentVolumeReclaimPolicy,casttype=PersistentVolumeReclaimPolicy"`
+ // Name of StorageClass to which this persistent volume belongs. Empty value
+ // means that this volume does not belong to any StorageClass.
+ // +optional
+ StorageClassName string `json:"storageClassName,omitempty" protobuf:"bytes,6,opt,name=storageClassName"`
+}
+
+// PersistentVolumeReclaimPolicy describes a policy for end-of-life maintenance of persistent volumes.
+type PersistentVolumeReclaimPolicy string
+
+const (
+ // PersistentVolumeReclaimRecycle means the volume will be recycled back into the pool of unbound persistent volumes on release from its claim.
+ // The volume plugin must support Recycling.
+ PersistentVolumeReclaimRecycle PersistentVolumeReclaimPolicy = "Recycle"
+ // PersistentVolumeReclaimDelete means the volume will be deleted from Kubernetes on release from its claim.
+ // The volume plugin must support Deletion.
+ PersistentVolumeReclaimDelete PersistentVolumeReclaimPolicy = "Delete"
+ // PersistentVolumeReclaimRetain means the volume will be left in its current phase (Released) for manual reclamation by the administrator.
+ // The default policy is Retain.
+ PersistentVolumeReclaimRetain PersistentVolumeReclaimPolicy = "Retain"
+)
+
+// PersistentVolumeStatus is the current status of a persistent volume.
+type PersistentVolumeStatus struct {
+ // Phase indicates if a volume is available, bound to a claim, or released by a claim.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase
+ // +optional
+ Phase PersistentVolumePhase `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=PersistentVolumePhase"`
+ // A human-readable message indicating details about why the volume is in this state.
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"`
+ // Reason is a brief CamelCase string that describes any failure and is meant
+ // for machine parsing and tidy display in the CLI.
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"`
+}
+
+// PersistentVolumeList is a list of PersistentVolume items.
+type PersistentVolumeList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+ // List of persistent volumes.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
+ Items []PersistentVolume `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// +genclient=true
+
+// PersistentVolumeClaim is a user's request for and claim to a persistent volume
+type PersistentVolumeClaim struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines the desired characteristics of a volume requested by a pod author.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+ // +optional
+ Spec PersistentVolumeClaimSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status represents the current information/status of a persistent volume claim.
+ // Read-only.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+ // +optional
+ Status PersistentVolumeClaimStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// PersistentVolumeClaimList is a list of PersistentVolumeClaim items.
+type PersistentVolumeClaimList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+ // A list of persistent volume claims.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+ Items []PersistentVolumeClaim `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// PersistentVolumeClaimSpec describes the common attributes of storage devices
+// and allows a Source for provider-specific attributes
+type PersistentVolumeClaimSpec struct {
+ // AccessModes contains the desired access modes the volume should have.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
+ // +optional
+ AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,1,rep,name=accessModes,casttype=PersistentVolumeAccessMode"`
+ // A label query over volumes to consider for binding.
+ // +optional
+ Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,opt,name=selector"`
+ // Resources represents the minimum resources the volume should have.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
+ // +optional
+ Resources ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,2,opt,name=resources"`
+ // VolumeName is the binding reference to the PersistentVolume backing this claim.
+ // +optional
+ VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,3,opt,name=volumeName"`
+ // Name of the StorageClass required by the claim.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
+ // +optional
+ StorageClassName *string `json:"storageClassName,omitempty" protobuf:"bytes,5,opt,name=storageClassName"`
+}
+
+// PersistentVolumeClaimStatus is the current status of a persistent volume claim.
+type PersistentVolumeClaimStatus struct {
+ // Phase represents the current phase of PersistentVolumeClaim.
+ // +optional
+ Phase PersistentVolumeClaimPhase `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=PersistentVolumeClaimPhase"`
+ // AccessModes contains the actual access modes the volume backing the PVC has.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
+ // +optional
+ AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,2,rep,name=accessModes,casttype=PersistentVolumeAccessMode"`
+ // Represents the actual resources of the underlying volume.
+ // +optional
+ Capacity ResourceList `json:"capacity,omitempty" protobuf:"bytes,3,rep,name=capacity,casttype=ResourceList,castkey=ResourceName"`
+}
+
+type PersistentVolumeAccessMode string
+
+const (
+ // can be mounted read/write mode to exactly 1 host
+ ReadWriteOnce PersistentVolumeAccessMode = "ReadWriteOnce"
+ // can be mounted in read-only mode to many hosts
+ ReadOnlyMany PersistentVolumeAccessMode = "ReadOnlyMany"
+ // can be mounted in read/write mode to many hosts
+ ReadWriteMany PersistentVolumeAccessMode = "ReadWriteMany"
+)
+
+type PersistentVolumePhase string
+
+const (
+ // used for PersistentVolumes that are not available
+ VolumePending PersistentVolumePhase = "Pending"
+ // used for PersistentVolumes that are not yet bound
+ // Available volumes are held by the binder and matched to PersistentVolumeClaims
+ VolumeAvailable PersistentVolumePhase = "Available"
+ // used for PersistentVolumes that are bound
+ VolumeBound PersistentVolumePhase = "Bound"
+ // used for PersistentVolumes where the bound PersistentVolumeClaim was deleted
+ // released volumes must be recycled before becoming available again
+ // this phase is used by the persistent volume claim binder to signal to another process to reclaim the resource
+ VolumeReleased PersistentVolumePhase = "Released"
+ // used for PersistentVolumes that failed to be correctly recycled or deleted after being released from a claim
+ VolumeFailed PersistentVolumePhase = "Failed"
+)
+
+type PersistentVolumeClaimPhase string
+
+const (
+ // used for PersistentVolumeClaims that are not yet bound
+ ClaimPending PersistentVolumeClaimPhase = "Pending"
+ // used for PersistentVolumeClaims that are bound
+ ClaimBound PersistentVolumeClaimPhase = "Bound"
+ // used for PersistentVolumeClaims that lost their underlying
+ // PersistentVolume. The claim was bound to a PersistentVolume and this
+ // volume does not exist any longer and all data on it was lost.
+ ClaimLost PersistentVolumeClaimPhase = "Lost"
+)
+
+// Represents a host path mapped into a pod.
+// Host path volumes do not support ownership management or SELinux relabeling.
+type HostPathVolumeSource struct {
+ // Path of the directory on the host.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
+ Path string `json:"path" protobuf:"bytes,1,opt,name=path"`
+}
+
+// Represents an empty directory for a pod.
+// Empty directory volumes support ownership management and SELinux relabeling.
+type EmptyDirVolumeSource struct {
+ // What type of storage medium should back this directory.
+ // The default is "" which means to use the node's default medium.
+ // Must be an empty string (default) or Memory.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
+ // +optional
+ Medium StorageMedium `json:"medium,omitempty" protobuf:"bytes,1,opt,name=medium,casttype=StorageMedium"`
+ // Total amount of local storage required for this EmptyDir volume.
+ // The size limit is also applicable for memory medium.
+ // The maximum usage on memory medium EmptyDir would be the minimum value between
+ // the SizeLimit specified here and the sum of memory limits of all containers in a pod.
+ // The default is nil which means that the limit is undefined.
+ // More info: http://kubernetes.io/docs/user-guide/volumes#emptydir
+ // +optional
+ SizeLimit *resource.Quantity `json:"sizeLimit,omitempty" protobuf:"bytes,2,opt,name=sizeLimit"`
+}
+
+// Represents a Glusterfs mount that lasts the lifetime of a pod.
+// Glusterfs volumes do not support ownership management or SELinux relabeling.
+type GlusterfsVolumeSource struct {
+ // EndpointsName is the endpoint name that details Glusterfs topology.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
+ EndpointsName string `json:"endpoints" protobuf:"bytes,1,opt,name=endpoints"`
+
+ // Path is the Glusterfs volume path.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
+ Path string `json:"path" protobuf:"bytes,2,opt,name=path"`
+
+ // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions.
+ // Defaults to false.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"`
+}
+
+// Represents a Rados Block Device mount that lasts the lifetime of a pod.
+// RBD volumes support ownership management and SELinux relabeling.
+type RBDVolumeSource struct {
+ // A collection of Ceph monitors.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ CephMonitors []string `json:"monitors" protobuf:"bytes,1,rep,name=monitors"`
+ // The rados image name.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ RBDImage string `json:"image" protobuf:"bytes,2,opt,name=image"`
+ // Filesystem type of the volume that you want to mount.
+ // Tip: Ensure that the filesystem type is supported by the host operating system.
+ // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"`
+ // The rados pool name.
+ // Default is rbd.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // +optional
+ RBDPool string `json:"pool,omitempty" protobuf:"bytes,4,opt,name=pool"`
+ // The rados user name.
+ // Default is admin.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // +optional
+ RadosUser string `json:"user,omitempty" protobuf:"bytes,5,opt,name=user"`
+ // Keyring is the path to key ring for RBDUser.
+ // Default is /etc/ceph/keyring.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // +optional
+ Keyring string `json:"keyring,omitempty" protobuf:"bytes,6,opt,name=keyring"`
+ // SecretRef is name of the authentication secret for RBDUser. If provided
+ // overrides keyring.
+ // Default is nil.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // +optional
+ SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,7,opt,name=secretRef"`
+ // ReadOnly here will force the ReadOnly setting in VolumeMounts.
+ // Defaults to false.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,8,opt,name=readOnly"`
+}
+
+// Represents a cinder volume resource in Openstack.
+// A Cinder volume must exist before mounting to a container.
+// The volume must also be in the same region as the kubelet.
+// Cinder volumes support ownership management and SELinux relabeling.
+type CinderVolumeSource struct {
+ // volume id used to identify the volume in cinder
+ // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ VolumeID string `json:"volumeID" protobuf:"bytes,1,opt,name=volumeID"`
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ // +optional
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"`
+}
+
+// Represents a Ceph Filesystem mount that lasts the lifetime of a pod
+// Cephfs volumes do not support ownership management or SELinux relabeling.
+type CephFSVolumeSource struct {
+ // Required: Monitors is a collection of Ceph monitors
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ Monitors []string `json:"monitors" protobuf:"bytes,1,rep,name=monitors"`
+ // Optional: Used as the mounted root, rather than the full Ceph tree, default is /
+ // +optional
+ Path string `json:"path,omitempty" protobuf:"bytes,2,opt,name=path"`
+ // Optional: User is the rados user name, default is admin
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ // +optional
+ User string `json:"user,omitempty" protobuf:"bytes,3,opt,name=user"`
+ // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ // +optional
+ SecretFile string `json:"secretFile,omitempty" protobuf:"bytes,4,opt,name=secretFile"`
+ // Optional: SecretRef is reference to the authentication secret for User, default is empty.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ // +optional
+ SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,5,opt,name=secretRef"`
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,6,opt,name=readOnly"`
+}
+
+// Represents a Flocker volume mounted by the Flocker agent.
+// One and only one of datasetName and datasetUUID should be set.
+// Flocker volumes do not support ownership management or SELinux relabeling.
+type FlockerVolumeSource struct {
+ // Name of the dataset stored as metadata -> name on the dataset for Flocker
+ // should be considered as deprecated
+ // +optional
+ DatasetName string `json:"datasetName,omitempty" protobuf:"bytes,1,opt,name=datasetName"`
+ // UUID of the dataset. This is unique identifier of a Flocker dataset
+ // +optional
+ DatasetUUID string `json:"datasetUUID,omitempty" protobuf:"bytes,2,opt,name=datasetUUID"`
+}
+
+// StorageMedium defines ways that storage can be allocated to a volume.
+type StorageMedium string
+
+const (
+ StorageMediumDefault StorageMedium = "" // use whatever the default is for the node
+ StorageMediumMemory StorageMedium = "Memory" // use memory (tmpfs)
+)
+
+// Protocol defines network protocols supported for things like container ports.
+type Protocol string
+
+const (
+ // ProtocolTCP is the TCP protocol.
+ ProtocolTCP Protocol = "TCP"
+ // ProtocolUDP is the UDP protocol.
+ ProtocolUDP Protocol = "UDP"
+)
+
+// Represents a Persistent Disk resource in Google Compute Engine.
+//
+// A GCE PD must exist before mounting to a container. The disk must
+// also be in the same GCE project and zone as the kubelet. A GCE PD
+// can only be mounted as read/write once or read-only many times. GCE
+// PDs support ownership management and SELinux relabeling.
+type GCEPersistentDiskVolumeSource struct {
+ // Unique name of the PD resource in GCE. Used to identify the disk in GCE.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ PDName string `json:"pdName" protobuf:"bytes,1,opt,name=pdName"`
+ // Filesystem type of the volume that you want to mount.
+ // Tip: Ensure that the filesystem type is supported by the host operating system.
+ // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
+ // The partition in the volume that you want to mount.
+ // If omitted, the default is to mount by volume name.
+ // Examples: For volume /dev/sda1, you specify the partition as "1".
+ // Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ // +optional
+ Partition int32 `json:"partition,omitempty" protobuf:"varint,3,opt,name=partition"`
+ // ReadOnly here will force the ReadOnly setting in VolumeMounts.
+ // Defaults to false.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"`
+}
+
+// Represents a Quobyte mount that lasts the lifetime of a pod.
+// Quobyte volumes do not support ownership management or SELinux relabeling.
+type QuobyteVolumeSource struct {
+ // Registry represents a single or multiple Quobyte Registry services
+ // specified as a string as host:port pair (multiple entries are separated with commas)
+ // which acts as the central registry for volumes
+ Registry string `json:"registry" protobuf:"bytes,1,opt,name=registry"`
+
+ // Volume is a string that references an already created Quobyte volume by name.
+ Volume string `json:"volume" protobuf:"bytes,2,opt,name=volume"`
+
+ // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions.
+ // Defaults to false.
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"`
+
+ // User to map volume access to
+ // Defaults to serivceaccount user
+ // +optional
+ User string `json:"user,omitempty" protobuf:"bytes,4,opt,name=user"`
+
+ // Group to map volume access to
+ // Default is no group
+ // +optional
+ Group string `json:"group,omitempty" protobuf:"bytes,5,opt,name=group"`
+}
+
+// FlexVolume represents a generic volume resource that is
+// provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.
+type FlexVolumeSource struct {
+ // Driver is the name of the driver to use for this volume.
+ Driver string `json:"driver" protobuf:"bytes,1,opt,name=driver"`
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script.
+ // +optional
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
+ // Optional: SecretRef is reference to the secret object containing
+ // sensitive information to pass to the plugin scripts. This may be
+ // empty if no secret object is specified. If the secret object
+ // contains more than one secret, all secrets are passed to the plugin
+ // scripts.
+ // +optional
+ SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,3,opt,name=secretRef"`
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"`
+ // Optional: Extra command options if any.
+ // +optional
+ Options map[string]string `json:"options,omitempty" protobuf:"bytes,5,rep,name=options"`
+}
+
+// Represents a Persistent Disk resource in AWS.
+//
+// An AWS EBS disk must exist before mounting to a container. The disk
+// must also be in the same AWS zone as the kubelet. An AWS EBS disk
+// can only be mounted as read/write once. AWS EBS volumes support
+// ownership management and SELinux relabeling.
+type AWSElasticBlockStoreVolumeSource struct {
+ // Unique ID of the persistent disk resource in AWS (Amazon EBS volume).
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+ VolumeID string `json:"volumeID" protobuf:"bytes,1,opt,name=volumeID"`
+ // Filesystem type of the volume that you want to mount.
+ // Tip: Ensure that the filesystem type is supported by the host operating system.
+ // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
+ // The partition in the volume that you want to mount.
+ // If omitted, the default is to mount by volume name.
+ // Examples: For volume /dev/sda1, you specify the partition as "1".
+ // Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).
+ // +optional
+ Partition int32 `json:"partition,omitempty" protobuf:"varint,3,opt,name=partition"`
+ // Specify "true" to force and set the ReadOnly property in VolumeMounts to "true".
+ // If omitted, the default is "false".
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"`
+}
+
+// Represents a volume that is populated with the contents of a git repository.
+// Git repo volumes do not support ownership management.
+// Git repo volumes support SELinux relabeling.
+type GitRepoVolumeSource struct {
+ // Repository URL
+ Repository string `json:"repository" protobuf:"bytes,1,opt,name=repository"`
+ // Commit hash for the specified revision.
+ // +optional
+ Revision string `json:"revision,omitempty" protobuf:"bytes,2,opt,name=revision"`
+ // Target directory name.
+ // Must not contain or start with '..'. If '.' is supplied, the volume directory will be the
+ // git repository. Otherwise, if specified, the volume will contain the git repository in
+ // the subdirectory with the given name.
+ // +optional
+ Directory string `json:"directory,omitempty" protobuf:"bytes,3,opt,name=directory"`
+}
+
+// Adapts a Secret into a volume.
+//
+// The contents of the target Secret's Data field will be presented in a volume
+// as files using the keys in the Data field as the file names.
+// Secret volumes support ownership management and SELinux relabeling.
+type SecretVolumeSource struct {
+ // Name of the secret in the pod's namespace to use.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
+ // +optional
+ SecretName string `json:"secretName,omitempty" protobuf:"bytes,1,opt,name=secretName"`
+ // If unspecified, each key-value pair in the Data field of the referenced
+ // Secret will be projected into the volume as a file whose name is the
+ // key and content is the value. If specified, the listed keys will be
+ // projected into the specified paths, and unlisted keys will not be
+ // present. If a key is specified which is not present in the Secret,
+ // the volume setup will error unless it is marked optional. Paths must be
+ // relative and may not contain the '..' path or start with '..'.
+ // +optional
+ Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"`
+ // Optional: mode bits to use on created files by default. Must be a
+ // value between 0 and 0777. Defaults to 0644.
+ // Directories within the path are not affected by this setting.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"bytes,3,opt,name=defaultMode"`
+ // Specify whether the Secret or it's keys must be defined
+ // +optional
+ Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"`
+}
+
+const (
+ SecretVolumeSourceDefaultMode int32 = 0644
+)
+
+// Adapts a secret into a projected volume.
+//
+// The contents of the target Secret's Data field will be presented in a
+// projected volume as files using the keys in the Data field as the file names.
+// Note that this is identical to a secret volume source without the default
+// mode.
+type SecretProjection struct {
+ LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"`
+ // If unspecified, each key-value pair in the Data field of the referenced
+ // Secret will be projected into the volume as a file whose name is the
+ // key and content is the value. If specified, the listed keys will be
+ // projected into the specified paths, and unlisted keys will not be
+ // present. If a key is specified which is not present in the Secret,
+ // the volume setup will error unless it is marked optional. Paths must be
+ // relative and may not contain the '..' path or start with '..'.
+ // +optional
+ Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"`
+ // Specify whether the Secret or its key must be defined
+ // +optional
+ Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"`
+}
+
+// Represents an NFS mount that lasts the lifetime of a pod.
+// NFS volumes do not support ownership management or SELinux relabeling.
+type NFSVolumeSource struct {
+ // Server is the hostname or IP address of the NFS server.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+ Server string `json:"server" protobuf:"bytes,1,opt,name=server"`
+
+ // Path that is exported by the NFS server.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+ Path string `json:"path" protobuf:"bytes,2,opt,name=path"`
+
+ // ReadOnly here will force
+ // the NFS export to be mounted with read-only permissions.
+ // Defaults to false.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"`
+}
+
+// Represents an ISCSI disk.
+// ISCSI volumes can only be mounted as read/write once.
+// ISCSI volumes support ownership management and SELinux relabeling.
+type ISCSIVolumeSource struct {
+ // iSCSI target portal. The portal is either an IP or ip_addr:port if the port
+ // is other than default (typically TCP ports 860 and 3260).
+ TargetPortal string `json:"targetPortal" protobuf:"bytes,1,opt,name=targetPortal"`
+ // Target iSCSI Qualified Name.
+ IQN string `json:"iqn" protobuf:"bytes,2,opt,name=iqn"`
+ // iSCSI target lun number.
+ Lun int32 `json:"lun" protobuf:"varint,3,opt,name=lun"`
+ // Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport.
+ // +optional
+ ISCSIInterface string `json:"iscsiInterface,omitempty" protobuf:"bytes,4,opt,name=iscsiInterface"`
+ // Filesystem type of the volume that you want to mount.
+ // Tip: Ensure that the filesystem type is supported by the host operating system.
+ // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,5,opt,name=fsType"`
+ // ReadOnly here will force the ReadOnly setting in VolumeMounts.
+ // Defaults to false.
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,6,opt,name=readOnly"`
+ // iSCSI target portal List. The portal is either an IP or ip_addr:port if the port
+ // is other than default (typically TCP ports 860 and 3260).
+ // +optional
+ Portals []string `json:"portals,omitempty" protobuf:"bytes,7,opt,name=portals"`
+ // whether support iSCSI Discovery CHAP authentication
+ // +optional
+ DiscoveryCHAPAuth bool `json:"chapAuthDiscovery,omitempty" protobuf:"varint,8,opt,name=chapAuthDiscovery"`
+ // whether support iSCSI Session CHAP authentication
+ // +optional
+ SessionCHAPAuth bool `json:"chapAuthSession,omitempty" protobuf:"varint,11,opt,name=chapAuthSession"`
+ // CHAP secret for iSCSI target and initiator authentication
+ // +optional
+ SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,10,opt,name=secretRef"`
+}
+
+// Represents a Fibre Channel volume.
+// Fibre Channel volumes can only be mounted as read/write once.
+// Fibre Channel volumes support ownership management and SELinux relabeling.
+type FCVolumeSource struct {
+ // Required: FC target worldwide names (WWNs)
+ TargetWWNs []string `json:"targetWWNs" protobuf:"bytes,1,rep,name=targetWWNs"`
+ // Required: FC target lun number
+ Lun *int32 `json:"lun" protobuf:"varint,2,opt,name=lun"`
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // TODO: how do we prevent errors in the filesystem from compromising the machine
+ // +optional
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"`
+ // Optional: Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"`
+}
+
+// AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
+type AzureFileVolumeSource struct {
+ // the name of secret that contains Azure Storage Account Name and Key
+ SecretName string `json:"secretName" protobuf:"bytes,1,opt,name=secretName"`
+ // Share Name
+ ShareName string `json:"shareName" protobuf:"bytes,2,opt,name=shareName"`
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"`
+}
+
+// Represents a vSphere volume resource.
+type VsphereVirtualDiskVolumeSource struct {
+ // Path that identifies vSphere volume vmdk
+ VolumePath string `json:"volumePath" protobuf:"bytes,1,opt,name=volumePath"`
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
+ // Storage Policy Based Management (SPBM) profile name.
+ // +optional
+ StoragePolicyName string `json:"storagePolicyName,omitempty" protobuf:"bytes,3,opt,name=storagePolicyName"`
+ // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.
+ // +optional
+ StoragePolicyID string `json:"storagePolicyID,omitempty" protobuf:"bytes,4,opt,name=storagePolicyID"`
+}
+
+// Represents a Photon Controller persistent disk resource.
+type PhotonPersistentDiskVolumeSource struct {
+ // ID that identifies Photon Controller persistent disk
+ PdID string `json:"pdID" protobuf:"bytes,1,opt,name=pdID"`
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
+}
+
+type AzureDataDiskCachingMode string
+type AzureDataDiskKind string
+
+const (
+ AzureDataDiskCachingNone AzureDataDiskCachingMode = "None"
+ AzureDataDiskCachingReadOnly AzureDataDiskCachingMode = "ReadOnly"
+ AzureDataDiskCachingReadWrite AzureDataDiskCachingMode = "ReadWrite"
+
+ AzureSharedBlobDisk AzureDataDiskKind = "Shared"
+ AzureDedicatedBlobDisk AzureDataDiskKind = "Dedicated"
+ AzureManagedDisk AzureDataDiskKind = "Managed"
+)
+
+// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
+type AzureDiskVolumeSource struct {
+ // The Name of the data disk in the blob storage
+ DiskName string `json:"diskName" protobuf:"bytes,1,opt,name=diskName"`
+ // The URI the data disk in the blob storage
+ DataDiskURI string `json:"diskURI" protobuf:"bytes,2,opt,name=diskURI"`
+ // Host Caching mode: None, Read Only, Read Write.
+ // +optional
+ CachingMode *AzureDataDiskCachingMode `json:"cachingMode,omitempty" protobuf:"bytes,3,opt,name=cachingMode,casttype=AzureDataDiskCachingMode"`
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ FSType *string `json:"fsType,omitempty" protobuf:"bytes,4,opt,name=fsType"`
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly *bool `json:"readOnly,omitempty" protobuf:"varint,5,opt,name=readOnly"`
+ // Expected values Shared: mulitple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared
+ Kind *AzureDataDiskKind `json:"kind,omitempty" protobuf:"bytes,6,opt,name=kind,casttype=AzureDataDiskKind"`
+}
+
+// PortworxVolumeSource represents a Portworx volume resource.
+type PortworxVolumeSource struct {
+ // VolumeID uniquely identifies a Portworx volume
+ VolumeID string `json:"volumeID" protobuf:"bytes,1,opt,name=volumeID"`
+ // FSType represents the filesystem type to mount
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified.
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"`
+}
+
+// ScaleIOVolumeSource represents a persistent ScaleIO volume
+type ScaleIOVolumeSource struct {
+ // The host address of the ScaleIO API Gateway.
+ Gateway string `json:"gateway" protobuf:"bytes,1,opt,name=gateway"`
+ // The name of the storage system as configured in ScaleIO.
+ System string `json:"system" protobuf:"bytes,2,opt,name=system"`
+ // SecretRef references to the secret for ScaleIO user and other
+ // sensitive information. If this is not provided, Login operation will fail.
+ SecretRef *LocalObjectReference `json:"secretRef" protobuf:"bytes,3,opt,name=secretRef"`
+ // Flag to enable/disable SSL communication with Gateway, default false
+ // +optional
+ SSLEnabled bool `json:"sslEnabled,omitempty" protobuf:"varint,4,opt,name=sslEnabled"`
+ // The name of the Protection Domain for the configured storage (defaults to "default").
+ // +optional
+ ProtectionDomain string `json:"protectionDomain,omitempty" protobuf:"bytes,5,opt,name=protectionDomain"`
+ // The Storage Pool associated with the protection domain (defaults to "default").
+ // +optional
+ StoragePool string `json:"storagePool,omitempty" protobuf:"bytes,6,opt,name=storagePool"`
+ // Indicates whether the storage for a volume should be thick or thin (defaults to "thin").
+ // +optional
+ StorageMode string `json:"storageMode,omitempty" protobuf:"bytes,7,opt,name=storageMode"`
+ // The name of a volume already created in the ScaleIO system
+ // that is associated with this volume source.
+ VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,8,opt,name=volumeName"`
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,9,opt,name=fsType"`
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,10,opt,name=readOnly"`
+}
+
+// Represents a StorageOS persistent volume resource.
+type StorageOSVolumeSource struct {
+ // VolumeName is the human-readable name of the StorageOS volume. Volume
+ // names are only unique within a namespace.
+ VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,1,opt,name=volumeName"`
+ // VolumeNamespace specifies the scope of the volume within StorageOS. If no
+ // namespace is specified then the Pod's namespace will be used. This allows the
+ // Kubernetes name scoping to be mirrored within StorageOS for tighter integration.
+ // Set VolumeName to any name to override the default behaviour.
+ // Set to "default" if you are not using namespaces within StorageOS.
+ // Namespaces that do not pre-exist within StorageOS will be created.
+ // +optional
+ VolumeNamespace string `json:"volumeNamespace,omitempty" protobuf:"bytes,2,opt,name=volumeNamespace"`
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"`
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"`
+ // SecretRef specifies the secret to use for obtaining the StorageOS API
+ // credentials. If not specified, default values will be attempted.
+ // +optional
+ SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,5,opt,name=secretRef"`
+}
+
+// Represents a StorageOS persistent volume resource.
+type StorageOSPersistentVolumeSource struct {
+ // VolumeName is the human-readable name of the StorageOS volume. Volume
+ // names are only unique within a namespace.
+ VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,1,opt,name=volumeName"`
+ // VolumeNamespace specifies the scope of the volume within StorageOS. If no
+ // namespace is specified then the Pod's namespace will be used. This allows the
+ // Kubernetes name scoping to be mirrored within StorageOS for tighter integration.
+ // Set VolumeName to any name to override the default behaviour.
+ // Set to "default" if you are not using namespaces within StorageOS.
+ // Namespaces that do not pre-exist within StorageOS will be created.
+ // +optional
+ VolumeNamespace string `json:"volumeNamespace,omitempty" protobuf:"bytes,2,opt,name=volumeNamespace"`
+ // Filesystem type to mount.
+ // Must be a filesystem type supported by the host operating system.
+ // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ // +optional
+ FSType string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"`
+ // Defaults to false (read/write). ReadOnly here will force
+ // the ReadOnly setting in VolumeMounts.
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"`
+ // SecretRef specifies the secret to use for obtaining the StorageOS API
+ // credentials. If not specified, default values will be attempted.
+ // +optional
+ SecretRef *ObjectReference `json:"secretRef,omitempty" protobuf:"bytes,5,opt,name=secretRef"`
+}
+
+// Adapts a ConfigMap into a volume.
+//
+// The contents of the target ConfigMap's Data field will be presented in a
+// volume as files using the keys in the Data field as the file names, unless
+// the items element is populated with specific mappings of keys to paths.
+// ConfigMap volumes support ownership management and SELinux relabeling.
+type ConfigMapVolumeSource struct {
+ LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"`
+ // If unspecified, each key-value pair in the Data field of the referenced
+ // ConfigMap will be projected into the volume as a file whose name is the
+ // key and content is the value. If specified, the listed keys will be
+ // projected into the specified paths, and unlisted keys will not be
+ // present. If a key is specified which is not present in the ConfigMap,
+ // the volume setup will error unless it is marked optional. Paths must be
+ // relative and may not contain the '..' path or start with '..'.
+ // +optional
+ Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"`
+ // Optional: mode bits to use on created files by default. Must be a
+ // value between 0 and 0777. Defaults to 0644.
+ // Directories within the path are not affected by this setting.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"varint,3,opt,name=defaultMode"`
+ // Specify whether the ConfigMap or it's keys must be defined
+ // +optional
+ Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"`
+}
+
+const (
+ ConfigMapVolumeSourceDefaultMode int32 = 0644
+)
+
+// Adapts a ConfigMap into a projected volume.
+//
+// The contents of the target ConfigMap's Data field will be presented in a
+// projected volume as files using the keys in the Data field as the file names,
+// unless the items element is populated with specific mappings of keys to paths.
+// Note that this is identical to a configmap volume source without the default
+// mode.
+type ConfigMapProjection struct {
+ LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"`
+ // If unspecified, each key-value pair in the Data field of the referenced
+ // ConfigMap will be projected into the volume as a file whose name is the
+ // key and content is the value. If specified, the listed keys will be
+ // projected into the specified paths, and unlisted keys will not be
+ // present. If a key is specified which is not present in the ConfigMap,
+ // the volume setup will error unless it is marked optional. Paths must be
+ // relative and may not contain the '..' path or start with '..'.
+ // +optional
+ Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"`
+ // Specify whether the ConfigMap or it's keys must be defined
+ // +optional
+ Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"`
+}
+
+// Represents a projected volume source
+type ProjectedVolumeSource struct {
+ // list of volume projections
+ Sources []VolumeProjection `json:"sources" protobuf:"bytes,1,rep,name=sources"`
+ // Mode bits to use on created files by default. Must be a value between
+ // 0 and 0777.
+ // Directories within the path are not affected by this setting.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"varint,2,opt,name=defaultMode"`
+}
+
+// Projection that may be projected along with other supported volume types
+type VolumeProjection struct {
+ // all types below are the supported types for projection into the same volume
+
+ // information about the secret data to project
+ Secret *SecretProjection `json:"secret,omitempty" protobuf:"bytes,1,opt,name=secret"`
+ // information about the downwardAPI data to project
+ DownwardAPI *DownwardAPIProjection `json:"downwardAPI,omitempty" protobuf:"bytes,2,opt,name=downwardAPI"`
+ // information about the configMap data to project
+ ConfigMap *ConfigMapProjection `json:"configMap,omitempty" protobuf:"bytes,3,opt,name=configMap"`
+}
+
+const (
+ ProjectedVolumeSourceDefaultMode int32 = 0644
+)
+
+// Maps a string key to a path within a volume.
+type KeyToPath struct {
+ // The key to project.
+ Key string `json:"key" protobuf:"bytes,1,opt,name=key"`
+
+ // The relative path of the file to map the key to.
+ // May not be an absolute path.
+ // May not contain the path element '..'.
+ // May not start with the string '..'.
+ Path string `json:"path" protobuf:"bytes,2,opt,name=path"`
+ // Optional: mode bits to use on this file, must be a value between 0
+ // and 0777. If not specified, the volume defaultMode will be used.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ Mode *int32 `json:"mode,omitempty" protobuf:"varint,3,opt,name=mode"`
+}
+
+// Local represents directly-attached storage with node affinity
+type LocalVolumeSource struct {
+ // The full path to the volume on the node
+ // For alpha, this path must be a directory
+ // Once block as a source is supported, then this path can point to a block device
+ Path string `json:"path" protobuf:"bytes,1,opt,name=path"`
+}
+
+// ContainerPort represents a network port in a single container.
+type ContainerPort struct {
+ // If specified, this must be an IANA_SVC_NAME and unique within the pod. Each
+ // named port in a pod must have a unique name. Name for the port that can be
+ // referred to by services.
+ // +optional
+ Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
+ // Number of port to expose on the host.
+ // If specified, this must be a valid port number, 0 < x < 65536.
+ // If HostNetwork is specified, this must match ContainerPort.
+ // Most containers do not need this.
+ // +optional
+ HostPort int32 `json:"hostPort,omitempty" protobuf:"varint,2,opt,name=hostPort"`
+ // Number of port to expose on the pod's IP address.
+ // This must be a valid port number, 0 < x < 65536.
+ ContainerPort int32 `json:"containerPort" protobuf:"varint,3,opt,name=containerPort"`
+ // Protocol for port. Must be UDP or TCP.
+ // Defaults to "TCP".
+ // +optional
+ Protocol Protocol `json:"protocol,omitempty" protobuf:"bytes,4,opt,name=protocol,casttype=Protocol"`
+ // What host IP to bind the external port to.
+ // +optional
+ HostIP string `json:"hostIP,omitempty" protobuf:"bytes,5,opt,name=hostIP"`
+}
+
+// VolumeMount describes a mounting of a Volume within a container.
+type VolumeMount struct {
+ // This must match the Name of a Volume.
+ Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
+ // Mounted read-only if true, read-write otherwise (false or unspecified).
+ // Defaults to false.
+ // +optional
+ ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,2,opt,name=readOnly"`
+ // Path within the container at which the volume should be mounted. Must
+ // not contain ':'.
+ MountPath string `json:"mountPath" protobuf:"bytes,3,opt,name=mountPath"`
+ // Path within the volume from which the container's volume should be mounted.
+ // Defaults to "" (volume's root).
+ // +optional
+ SubPath string `json:"subPath,omitempty" protobuf:"bytes,4,opt,name=subPath"`
+}
+
+// EnvVar represents an environment variable present in a Container.
+type EnvVar struct {
+ // Name of the environment variable. Must be a C_IDENTIFIER.
+ Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
+
+ // Optional: no more than one of the following may be specified.
+
+ // Variable references $(VAR_NAME) are expanded
+ // using the previous defined environment variables in the container and
+ // any service environment variables. If a variable cannot be resolved,
+ // the reference in the input string will be unchanged. The $(VAR_NAME)
+ // syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped
+ // references will never be expanded, regardless of whether the variable
+ // exists or not.
+ // Defaults to "".
+ // +optional
+ Value string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"`
+ // Source for the environment variable's value. Cannot be used if value is not empty.
+ // +optional
+ ValueFrom *EnvVarSource `json:"valueFrom,omitempty" protobuf:"bytes,3,opt,name=valueFrom"`
+}
+
+// EnvVarSource represents a source for the value of an EnvVar.
+type EnvVarSource struct {
+ // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations,
+ // spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP.
+ // +optional
+ FieldRef *ObjectFieldSelector `json:"fieldRef,omitempty" protobuf:"bytes,1,opt,name=fieldRef"`
+ // Selects a resource of the container: only resources limits and requests
+ // (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
+ // +optional
+ ResourceFieldRef *ResourceFieldSelector `json:"resourceFieldRef,omitempty" protobuf:"bytes,2,opt,name=resourceFieldRef"`
+ // Selects a key of a ConfigMap.
+ // +optional
+ ConfigMapKeyRef *ConfigMapKeySelector `json:"configMapKeyRef,omitempty" protobuf:"bytes,3,opt,name=configMapKeyRef"`
+ // Selects a key of a secret in the pod's namespace
+ // +optional
+ SecretKeyRef *SecretKeySelector `json:"secretKeyRef,omitempty" protobuf:"bytes,4,opt,name=secretKeyRef"`
+}
+
+// ObjectFieldSelector selects an APIVersioned field of an object.
+type ObjectFieldSelector struct {
+ // Version of the schema the FieldPath is written in terms of, defaults to "v1".
+ // +optional
+ APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,1,opt,name=apiVersion"`
+ // Path of the field to select in the specified API version.
+ FieldPath string `json:"fieldPath" protobuf:"bytes,2,opt,name=fieldPath"`
+}
+
+// ResourceFieldSelector represents container resources (cpu, memory) and their output format
+type ResourceFieldSelector struct {
+ // Container name: required for volumes, optional for env vars
+ // +optional
+ ContainerName string `json:"containerName,omitempty" protobuf:"bytes,1,opt,name=containerName"`
+ // Required: resource to select
+ Resource string `json:"resource" protobuf:"bytes,2,opt,name=resource"`
+ // Specifies the output format of the exposed resources, defaults to "1"
+ // +optional
+ Divisor resource.Quantity `json:"divisor,omitempty" protobuf:"bytes,3,opt,name=divisor"`
+}
+
+// Selects a key from a ConfigMap.
+type ConfigMapKeySelector struct {
+ // The ConfigMap to select from.
+ LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"`
+ // The key to select.
+ Key string `json:"key" protobuf:"bytes,2,opt,name=key"`
+ // Specify whether the ConfigMap or it's key must be defined
+ // +optional
+ Optional *bool `json:"optional,omitempty" protobuf:"varint,3,opt,name=optional"`
+}
+
+// SecretKeySelector selects a key of a Secret.
+type SecretKeySelector struct {
+ // The name of the secret in the pod's namespace to select from.
+ LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"`
+ // The key of the secret to select from. Must be a valid secret key.
+ Key string `json:"key" protobuf:"bytes,2,opt,name=key"`
+ // Specify whether the Secret or it's key must be defined
+ // +optional
+ Optional *bool `json:"optional,omitempty" protobuf:"varint,3,opt,name=optional"`
+}
+
+// EnvFromSource represents the source of a set of ConfigMaps
+type EnvFromSource struct {
+ // An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.
+ // +optional
+ Prefix string `json:"prefix,omitempty" protobuf:"bytes,1,opt,name=prefix"`
+ // The ConfigMap to select from
+ // +optional
+ ConfigMapRef *ConfigMapEnvSource `json:"configMapRef,omitempty" protobuf:"bytes,2,opt,name=configMapRef"`
+ // The Secret to select from
+ // +optional
+ SecretRef *SecretEnvSource `json:"secretRef,omitempty" protobuf:"bytes,3,opt,name=secretRef"`
+}
+
+// ConfigMapEnvSource selects a ConfigMap to populate the environment
+// variables with.
+//
+// The contents of the target ConfigMap's Data field will represent the
+// key-value pairs as environment variables.
+type ConfigMapEnvSource struct {
+ // The ConfigMap to select from.
+ LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"`
+ // Specify whether the ConfigMap must be defined
+ // +optional
+ Optional *bool `json:"optional,omitempty" protobuf:"varint,2,opt,name=optional"`
+}
+
+// SecretEnvSource selects a Secret to populate the environment
+// variables with.
+//
+// The contents of the target Secret's Data field will represent the
+// key-value pairs as environment variables.
+type SecretEnvSource struct {
+ // The Secret to select from.
+ LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"`
+ // Specify whether the Secret must be defined
+ // +optional
+ Optional *bool `json:"optional,omitempty" protobuf:"varint,2,opt,name=optional"`
+}
+
+// HTTPHeader describes a custom header to be used in HTTP probes
+type HTTPHeader struct {
+ // The header field name
+ Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
+ // The header field value
+ Value string `json:"value" protobuf:"bytes,2,opt,name=value"`
+}
+
+// HTTPGetAction describes an action based on HTTP Get requests.
+type HTTPGetAction struct {
+ // Path to access on the HTTP server.
+ // +optional
+ Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"`
+ // Name or number of the port to access on the container.
+ // Number must be in the range 1 to 65535.
+ // Name must be an IANA_SVC_NAME.
+ Port intstr.IntOrString `json:"port" protobuf:"bytes,2,opt,name=port"`
+ // Host name to connect to, defaults to the pod IP. You probably want to set
+ // "Host" in httpHeaders instead.
+ // +optional
+ Host string `json:"host,omitempty" protobuf:"bytes,3,opt,name=host"`
+ // Scheme to use for connecting to the host.
+ // Defaults to HTTP.
+ // +optional
+ Scheme URIScheme `json:"scheme,omitempty" protobuf:"bytes,4,opt,name=scheme,casttype=URIScheme"`
+ // Custom headers to set in the request. HTTP allows repeated headers.
+ // +optional
+ HTTPHeaders []HTTPHeader `json:"httpHeaders,omitempty" protobuf:"bytes,5,rep,name=httpHeaders"`
+}
+
+// URIScheme identifies the scheme used for connection to a host for Get actions
+type URIScheme string
+
+const (
+ // URISchemeHTTP means that the scheme used will be http://
+ URISchemeHTTP URIScheme = "HTTP"
+ // URISchemeHTTPS means that the scheme used will be https://
+ URISchemeHTTPS URIScheme = "HTTPS"
+)
+
+// TCPSocketAction describes an action based on opening a socket
+type TCPSocketAction struct {
+ // Number or name of the port to access on the container.
+ // Number must be in the range 1 to 65535.
+ // Name must be an IANA_SVC_NAME.
+ Port intstr.IntOrString `json:"port" protobuf:"bytes,1,opt,name=port"`
+ // Optional: Host name to connect to, defaults to the pod IP.
+ // +optional
+ Host string `json:"host,omitempty" protobuf:"bytes,2,opt,name=host"`
+}
+
+// ExecAction describes a "run in container" action.
+type ExecAction struct {
+ // Command is the command line to execute inside the container, the working directory for the
+ // command is root ('/') in the container's filesystem. The command is simply exec'd, it is
+ // not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use
+ // a shell, you need to explicitly call out to that shell.
+ // Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
+ // +optional
+ Command []string `json:"command,omitempty" protobuf:"bytes,1,rep,name=command"`
+}
+
+// Probe describes a health check to be performed against a container to determine whether it is
+// alive or ready to receive traffic.
+type Probe struct {
+ // The action taken to determine the health of a container
+ Handler `json:",inline" protobuf:"bytes,1,opt,name=handler"`
+ // Number of seconds after the container has started before liveness probes are initiated.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+ // +optional
+ InitialDelaySeconds int32 `json:"initialDelaySeconds,omitempty" protobuf:"varint,2,opt,name=initialDelaySeconds"`
+ // Number of seconds after which the probe times out.
+ // Defaults to 1 second. Minimum value is 1.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+ // +optional
+ TimeoutSeconds int32 `json:"timeoutSeconds,omitempty" protobuf:"varint,3,opt,name=timeoutSeconds"`
+ // How often (in seconds) to perform the probe.
+ // Default to 10 seconds. Minimum value is 1.
+ // +optional
+ PeriodSeconds int32 `json:"periodSeconds,omitempty" protobuf:"varint,4,opt,name=periodSeconds"`
+ // Minimum consecutive successes for the probe to be considered successful after having failed.
+ // Defaults to 1. Must be 1 for liveness. Minimum value is 1.
+ // +optional
+ SuccessThreshold int32 `json:"successThreshold,omitempty" protobuf:"varint,5,opt,name=successThreshold"`
+ // Minimum consecutive failures for the probe to be considered failed after having succeeded.
+ // Defaults to 3. Minimum value is 1.
+ // +optional
+ FailureThreshold int32 `json:"failureThreshold,omitempty" protobuf:"varint,6,opt,name=failureThreshold"`
+}
+
+// PullPolicy describes a policy for if/when to pull a container image
+type PullPolicy string
+
+const (
+ // PullAlways means that kubelet always attempts to pull the latest image. Container will fail If the pull fails.
+ PullAlways PullPolicy = "Always"
+ // PullNever means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present
+ PullNever PullPolicy = "Never"
+ // PullIfNotPresent means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails.
+ PullIfNotPresent PullPolicy = "IfNotPresent"
+)
+
+// TerminationMessagePolicy describes how termination messages are retrieved from a container.
+type TerminationMessagePolicy string
+
+const (
+ // TerminationMessageReadFile is the default behavior and will set the container status message to
+ // the contents of the container's terminationMessagePath when the container exits.
+ TerminationMessageReadFile TerminationMessagePolicy = "File"
+ // TerminationMessageFallbackToLogsOnError will read the most recent contents of the container logs
+ // for the container status message when the container exits with an error and the
+ // terminationMessagePath has no contents.
+ TerminationMessageFallbackToLogsOnError TerminationMessagePolicy = "FallbackToLogsOnError"
+)
+
+// Capability represent POSIX capabilities type
+type Capability string
+
+// Adds and removes POSIX capabilities from running containers.
+type Capabilities struct {
+ // Added capabilities
+ // +optional
+ Add []Capability `json:"add,omitempty" protobuf:"bytes,1,rep,name=add,casttype=Capability"`
+ // Removed capabilities
+ // +optional
+ Drop []Capability `json:"drop,omitempty" protobuf:"bytes,2,rep,name=drop,casttype=Capability"`
+}
+
+// ResourceRequirements describes the compute resource requirements.
+type ResourceRequirements struct {
+ // Limits describes the maximum amount of compute resources allowed.
+ // More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
+ // +optional
+ Limits ResourceList `json:"limits,omitempty" protobuf:"bytes,1,rep,name=limits,casttype=ResourceList,castkey=ResourceName"`
+ // Requests describes the minimum amount of compute resources required.
+ // If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
+ // otherwise to an implementation-defined value.
+ // More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
+ // +optional
+ Requests ResourceList `json:"requests,omitempty" protobuf:"bytes,2,rep,name=requests,casttype=ResourceList,castkey=ResourceName"`
+}
+
+const (
+ // TerminationMessagePathDefault means the default path to capture the application termination message running in a container
+ TerminationMessagePathDefault string = "/dev/termination-log"
+)
+
+// A single application container that you want to run within a pod.
+type Container struct {
+ // Name of the container specified as a DNS_LABEL.
+ // Each container in a pod must have a unique name (DNS_LABEL).
+ // Cannot be updated.
+ Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
+ // Docker image name.
+ // More info: https://kubernetes.io/docs/concepts/containers/images
+ Image string `json:"image" protobuf:"bytes,2,opt,name=image"`
+ // Entrypoint array. Not executed within a shell.
+ // The docker image's ENTRYPOINT is used if this is not provided.
+ // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
+ // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
+ // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
+ // regardless of whether the variable exists or not.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
+ // +optional
+ Command []string `json:"command,omitempty" protobuf:"bytes,3,rep,name=command"`
+ // Arguments to the entrypoint.
+ // The docker image's CMD is used if this is not provided.
+ // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
+ // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
+ // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
+ // regardless of whether the variable exists or not.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
+ // +optional
+ Args []string `json:"args,omitempty" protobuf:"bytes,4,rep,name=args"`
+ // Container's working directory.
+ // If not specified, the container runtime's default will be used, which
+ // might be configured in the container image.
+ // Cannot be updated.
+ // +optional
+ WorkingDir string `json:"workingDir,omitempty" protobuf:"bytes,5,opt,name=workingDir"`
+ // List of ports to expose from the container. Exposing a port here gives
+ // the system additional information about the network connections a
+ // container uses, but is primarily informational. Not specifying a port here
+ // DOES NOT prevent that port from being exposed. Any port which is
+ // listening on the default "0.0.0.0" address inside a container will be
+ // accessible from the network.
+ // Cannot be updated.
+ // +optional
+ // +patchMergeKey=containerPort
+ // +patchStrategy=merge
+ Ports []ContainerPort `json:"ports,omitempty" patchStrategy:"merge" patchMergeKey:"containerPort" protobuf:"bytes,6,rep,name=ports"`
+ // List of sources to populate environment variables in the container.
+ // The keys defined within a source must be a C_IDENTIFIER. All invalid keys
+ // will be reported as an event when the container is starting. When a key exists in multiple
+ // sources, the value associated with the last source will take precedence.
+ // Values defined by an Env with a duplicate key will take precedence.
+ // Cannot be updated.
+ // +optional
+ EnvFrom []EnvFromSource `json:"envFrom,omitempty" protobuf:"bytes,19,rep,name=envFrom"`
+ // List of environment variables to set in the container.
+ // Cannot be updated.
+ // +optional
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ Env []EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,7,rep,name=env"`
+ // Compute Resources required by this container.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
+ // +optional
+ Resources ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,8,opt,name=resources"`
+ // Pod volumes to mount into the container's filesystem.
+ // Cannot be updated.
+ // +optional
+ // +patchMergeKey=mountPath
+ // +patchStrategy=merge
+ VolumeMounts []VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,9,rep,name=volumeMounts"`
+ // Periodic probe of container liveness.
+ // Container will be restarted if the probe fails.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+ // +optional
+ LivenessProbe *Probe `json:"livenessProbe,omitempty" protobuf:"bytes,10,opt,name=livenessProbe"`
+ // Periodic probe of container service readiness.
+ // Container will be removed from service endpoints if the probe fails.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+ // +optional
+ ReadinessProbe *Probe `json:"readinessProbe,omitempty" protobuf:"bytes,11,opt,name=readinessProbe"`
+ // Actions that the management system should take in response to container lifecycle events.
+ // Cannot be updated.
+ // +optional
+ Lifecycle *Lifecycle `json:"lifecycle,omitempty" protobuf:"bytes,12,opt,name=lifecycle"`
+ // Optional: Path at which the file to which the container's termination message
+ // will be written is mounted into the container's filesystem.
+ // Message written is intended to be brief final status, such as an assertion failure message.
+ // Will be truncated by the node if greater than 4096 bytes. The total message length across
+ // all containers will be limited to 12kb.
+ // Defaults to /dev/termination-log.
+ // Cannot be updated.
+ // +optional
+ TerminationMessagePath string `json:"terminationMessagePath,omitempty" protobuf:"bytes,13,opt,name=terminationMessagePath"`
+ // Indicate how the termination message should be populated. File will use the contents of
+ // terminationMessagePath to populate the container status message on both success and failure.
+ // FallbackToLogsOnError will use the last chunk of container log output if the termination
+ // message file is empty and the container exited with an error.
+ // The log output is limited to 2048 bytes or 80 lines, whichever is smaller.
+ // Defaults to File.
+ // Cannot be updated.
+ // +optional
+ TerminationMessagePolicy TerminationMessagePolicy `json:"terminationMessagePolicy,omitempty" protobuf:"bytes,20,opt,name=terminationMessagePolicy,casttype=TerminationMessagePolicy"`
+ // Image pull policy.
+ // One of Always, Never, IfNotPresent.
+ // Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
+ // +optional
+ ImagePullPolicy PullPolicy `json:"imagePullPolicy,omitempty" protobuf:"bytes,14,opt,name=imagePullPolicy,casttype=PullPolicy"`
+ // Security options the pod should run with.
+ // More info: https://kubernetes.io/docs/concepts/policy/security-context/
+ // More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md
+ // +optional
+ SecurityContext *SecurityContext `json:"securityContext,omitempty" protobuf:"bytes,15,opt,name=securityContext"`
+
+ // Variables for interactive containers, these have very specialized use-cases (e.g. debugging)
+ // and shouldn't be used for general purpose containers.
+
+ // Whether this container should allocate a buffer for stdin in the container runtime. If this
+ // is not set, reads from stdin in the container will always result in EOF.
+ // Default is false.
+ // +optional
+ Stdin bool `json:"stdin,omitempty" protobuf:"varint,16,opt,name=stdin"`
+ // Whether the container runtime should close the stdin channel after it has been opened by
+ // a single attach. When stdin is true the stdin stream will remain open across multiple attach
+ // sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the
+ // first client attaches to stdin, and then remains open and accepts data until the client disconnects,
+ // at which time stdin is closed and remains closed until the container is restarted. If this
+ // flag is false, a container processes that reads from stdin will never receive an EOF.
+ // Default is false
+ // +optional
+ StdinOnce bool `json:"stdinOnce,omitempty" protobuf:"varint,17,opt,name=stdinOnce"`
+ // Whether this container should allocate a TTY for itself, also requires 'stdin' to be true.
+ // Default is false.
+ // +optional
+ TTY bool `json:"tty,omitempty" protobuf:"varint,18,opt,name=tty"`
+}
+
+// Handler defines a specific action that should be taken
+// TODO: pass structured data to these actions, and document that data here.
+type Handler struct {
+ // One and only one of the following should be specified.
+ // Exec specifies the action to take.
+ // +optional
+ Exec *ExecAction `json:"exec,omitempty" protobuf:"bytes,1,opt,name=exec"`
+ // HTTPGet specifies the http request to perform.
+ // +optional
+ HTTPGet *HTTPGetAction `json:"httpGet,omitempty" protobuf:"bytes,2,opt,name=httpGet"`
+ // TCPSocket specifies an action involving a TCP port.
+ // TCP hooks not yet supported
+ // TODO: implement a realistic TCP lifecycle hook
+ // +optional
+ TCPSocket *TCPSocketAction `json:"tcpSocket,omitempty" protobuf:"bytes,3,opt,name=tcpSocket"`
+}
+
+// Lifecycle describes actions that the management system should take in response to container lifecycle
+// events. For the PostStart and PreStop lifecycle handlers, management of the container blocks
+// until the action is complete, unless the container process fails, in which case the handler is aborted.
+type Lifecycle struct {
+ // PostStart is called immediately after a container is created. If the handler fails,
+ // the container is terminated and restarted according to its restart policy.
+ // Other management of the container blocks until the hook completes.
+ // More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
+ // +optional
+ PostStart *Handler `json:"postStart,omitempty" protobuf:"bytes,1,opt,name=postStart"`
+ // PreStop is called immediately before a container is terminated.
+ // The container is terminated after the handler completes.
+ // The reason for termination is passed to the handler.
+ // Regardless of the outcome of the handler, the container is eventually terminated.
+ // Other management of the container blocks until the hook completes.
+ // More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
+ // +optional
+ PreStop *Handler `json:"preStop,omitempty" protobuf:"bytes,2,opt,name=preStop"`
+}
+
+type ConditionStatus string
+
+// These are valid condition statuses. "ConditionTrue" means a resource is in the condition.
+// "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes
+// can't decide if a resource is in the condition or not. In the future, we could add other
+// intermediate conditions, e.g. ConditionDegraded.
+const (
+ ConditionTrue ConditionStatus = "True"
+ ConditionFalse ConditionStatus = "False"
+ ConditionUnknown ConditionStatus = "Unknown"
+)
+
+// ContainerStateWaiting is a waiting state of a container.
+type ContainerStateWaiting struct {
+ // (brief) reason the container is not yet running.
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,1,opt,name=reason"`
+ // Message regarding why the container is not yet running.
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"`
+}
+
+// ContainerStateRunning is a running state of a container.
+type ContainerStateRunning struct {
+ // Time at which the container was last (re-)started
+ // +optional
+ StartedAt metav1.Time `json:"startedAt,omitempty" protobuf:"bytes,1,opt,name=startedAt"`
+}
+
+// ContainerStateTerminated is a terminated state of a container.
+type ContainerStateTerminated struct {
+ // Exit status from the last termination of the container
+ ExitCode int32 `json:"exitCode" protobuf:"varint,1,opt,name=exitCode"`
+ // Signal from the last termination of the container
+ // +optional
+ Signal int32 `json:"signal,omitempty" protobuf:"varint,2,opt,name=signal"`
+ // (brief) reason from the last termination of the container
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"`
+ // Message regarding the last termination of the container
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,4,opt,name=message"`
+ // Time at which previous execution of the container started
+ // +optional
+ StartedAt metav1.Time `json:"startedAt,omitempty" protobuf:"bytes,5,opt,name=startedAt"`
+ // Time at which the container last terminated
+ // +optional
+ FinishedAt metav1.Time `json:"finishedAt,omitempty" protobuf:"bytes,6,opt,name=finishedAt"`
+ // Container's ID in the format 'docker://<container_id>'
+ // +optional
+ ContainerID string `json:"containerID,omitempty" protobuf:"bytes,7,opt,name=containerID"`
+}
+
+// ContainerState holds a possible state of container.
+// Only one of its members may be specified.
+// If none of them is specified, the default one is ContainerStateWaiting.
+type ContainerState struct {
+ // Details about a waiting container
+ // +optional
+ Waiting *ContainerStateWaiting `json:"waiting,omitempty" protobuf:"bytes,1,opt,name=waiting"`
+ // Details about a running container
+ // +optional
+ Running *ContainerStateRunning `json:"running,omitempty" protobuf:"bytes,2,opt,name=running"`
+ // Details about a terminated container
+ // +optional
+ Terminated *ContainerStateTerminated `json:"terminated,omitempty" protobuf:"bytes,3,opt,name=terminated"`
+}
+
+// ContainerStatus contains details for the current status of this container.
+type ContainerStatus struct {
+ // This must be a DNS_LABEL. Each container in a pod must have a unique name.
+ // Cannot be updated.
+ Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
+ // Details about the container's current condition.
+ // +optional
+ State ContainerState `json:"state,omitempty" protobuf:"bytes,2,opt,name=state"`
+ // Details about the container's last termination condition.
+ // +optional
+ LastTerminationState ContainerState `json:"lastState,omitempty" protobuf:"bytes,3,opt,name=lastState"`
+ // Specifies whether the container has passed its readiness probe.
+ Ready bool `json:"ready" protobuf:"varint,4,opt,name=ready"`
+ // The number of times the container has been restarted, currently based on
+ // the number of dead containers that have not yet been removed.
+ // Note that this is calculated from dead containers. But those containers are subject to
+ // garbage collection. This value will get capped at 5 by GC.
+ RestartCount int32 `json:"restartCount" protobuf:"varint,5,opt,name=restartCount"`
+ // The image the container is running.
+ // More info: https://kubernetes.io/docs/concepts/containers/images
+ // TODO(dchen1107): Which image the container is running with?
+ Image string `json:"image" protobuf:"bytes,6,opt,name=image"`
+ // ImageID of the container's image.
+ ImageID string `json:"imageID" protobuf:"bytes,7,opt,name=imageID"`
+ // Container's ID in the format 'docker://<container_id>'.
+ // +optional
+ ContainerID string `json:"containerID,omitempty" protobuf:"bytes,8,opt,name=containerID"`
+}
+
+// PodPhase is a label for the condition of a pod at the current time.
+type PodPhase string
+
+// These are the valid statuses of pods.
+const (
+ // PodPending means the pod has been accepted by the system, but one or more of the containers
+ // has not been started. This includes time before being bound to a node, as well as time spent
+ // pulling images onto the host.
+ PodPending PodPhase = "Pending"
+ // PodRunning means the pod has been bound to a node and all of the containers have been started.
+ // At least one container is still running or is in the process of being restarted.
+ PodRunning PodPhase = "Running"
+ // PodSucceeded means that all containers in the pod have voluntarily terminated
+ // with a container exit code of 0, and the system is not going to restart any of these containers.
+ PodSucceeded PodPhase = "Succeeded"
+ // PodFailed means that all containers in the pod have terminated, and at least one container has
+ // terminated in a failure (exited with a non-zero exit code or was stopped by the system).
+ PodFailed PodPhase = "Failed"
+ // PodUnknown means that for some reason the state of the pod could not be obtained, typically due
+ // to an error in communicating with the host of the pod.
+ PodUnknown PodPhase = "Unknown"
+)
+
+// PodConditionType is a valid value for PodCondition.Type
+type PodConditionType string
+
+// These are valid conditions of pod.
+const (
+ // PodScheduled represents status of the scheduling process for this pod.
+ PodScheduled PodConditionType = "PodScheduled"
+ // PodReady means the pod is able to service requests and should be added to the
+ // load balancing pools of all matching services.
+ PodReady PodConditionType = "Ready"
+ // PodInitialized means that all init containers in the pod have started successfully.
+ PodInitialized PodConditionType = "Initialized"
+ // PodReasonUnschedulable reason in PodScheduled PodCondition means that the scheduler
+ // can't schedule the pod right now, for example due to insufficient resources in the cluster.
+ PodReasonUnschedulable = "Unschedulable"
+)
+
+// PodCondition contains details for the current condition of this pod.
+type PodCondition struct {
+ // Type is the type of the condition.
+ // Currently only Ready.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
+ Type PodConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=PodConditionType"`
+ // Status is the status of the condition.
+ // Can be True, False, Unknown.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
+ Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"`
+ // Last time we probed the condition.
+ // +optional
+ LastProbeTime metav1.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"`
+ // Last time the condition transitioned from one status to another.
+ // +optional
+ LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
+ // Unique, one-word, CamelCase reason for the condition's last transition.
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
+ // Human-readable message indicating details about last transition.
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
+}
+
+// RestartPolicy describes how the container should be restarted.
+// Only one of the following restart policies may be specified.
+// If none of the following policies is specified, the default one
+// is RestartPolicyAlways.
+type RestartPolicy string
+
+const (
+ RestartPolicyAlways RestartPolicy = "Always"
+ RestartPolicyOnFailure RestartPolicy = "OnFailure"
+ RestartPolicyNever RestartPolicy = "Never"
+)
+
+// DNSPolicy defines how a pod's DNS will be configured.
+type DNSPolicy string
+
+const (
+ // DNSClusterFirstWithHostNet indicates that the pod should use cluster DNS
+ // first, if it is available, then fall back on the default
+ // (as determined by kubelet) DNS settings.
+ DNSClusterFirstWithHostNet DNSPolicy = "ClusterFirstWithHostNet"
+
+ // DNSClusterFirst indicates that the pod should use cluster DNS
+ // first unless hostNetwork is true, if it is available, then
+ // fall back on the default (as determined by kubelet) DNS settings.
+ DNSClusterFirst DNSPolicy = "ClusterFirst"
+
+ // DNSDefault indicates that the pod should use the default (as
+ // determined by kubelet) DNS settings.
+ DNSDefault DNSPolicy = "Default"
+
+ DefaultTerminationGracePeriodSeconds = 30
+)
+
+// A node selector represents the union of the results of one or more label queries
+// over a set of nodes; that is, it represents the OR of the selectors represented
+// by the node selector terms.
+type NodeSelector struct {
+ //Required. A list of node selector terms. The terms are ORed.
+ NodeSelectorTerms []NodeSelectorTerm `json:"nodeSelectorTerms" protobuf:"bytes,1,rep,name=nodeSelectorTerms"`
+}
+
+// A null or empty node selector term matches no objects.
+type NodeSelectorTerm struct {
+ //Required. A list of node selector requirements. The requirements are ANDed.
+ MatchExpressions []NodeSelectorRequirement `json:"matchExpressions" protobuf:"bytes,1,rep,name=matchExpressions"`
+}
+
+// A node selector requirement is a selector that contains values, a key, and an operator
+// that relates the key and values.
+type NodeSelectorRequirement struct {
+ // The label key that the selector applies to.
+ // +patchMergeKey=key
+ // +patchStrategy=merge
+ Key string `json:"key" patchStrategy:"merge" patchMergeKey:"key" protobuf:"bytes,1,opt,name=key"`
+ // Represents a key's relationship to a set of values.
+ // Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
+ Operator NodeSelectorOperator `json:"operator" protobuf:"bytes,2,opt,name=operator,casttype=NodeSelectorOperator"`
+ // An array of string values. If the operator is In or NotIn,
+ // the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ // the values array must be empty. If the operator is Gt or Lt, the values
+ // array must have a single element, which will be interpreted as an integer.
+ // This array is replaced during a strategic merge patch.
+ // +optional
+ Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"`
+}
+
+// A node selector operator is the set of operators that can be used in
+// a node selector requirement.
+type NodeSelectorOperator string
+
+const (
+ NodeSelectorOpIn NodeSelectorOperator = "In"
+ NodeSelectorOpNotIn NodeSelectorOperator = "NotIn"
+ NodeSelectorOpExists NodeSelectorOperator = "Exists"
+ NodeSelectorOpDoesNotExist NodeSelectorOperator = "DoesNotExist"
+ NodeSelectorOpGt NodeSelectorOperator = "Gt"
+ NodeSelectorOpLt NodeSelectorOperator = "Lt"
+)
+
+// Affinity is a group of affinity scheduling rules.
+type Affinity struct {
+ // Describes node affinity scheduling rules for the pod.
+ // +optional
+ NodeAffinity *NodeAffinity `json:"nodeAffinity,omitempty" protobuf:"bytes,1,opt,name=nodeAffinity"`
+ // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
+ // +optional
+ PodAffinity *PodAffinity `json:"podAffinity,omitempty" protobuf:"bytes,2,opt,name=podAffinity"`
+ // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
+ // +optional
+ PodAntiAffinity *PodAntiAffinity `json:"podAntiAffinity,omitempty" protobuf:"bytes,3,opt,name=podAntiAffinity"`
+}
+
+// Pod affinity is a group of inter pod affinity scheduling rules.
+type PodAffinity struct {
+ // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented.
+ // If the affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to a pod label update), the
+ // system will try to eventually evict the pod from its node.
+ // When there are multiple elements, the lists of nodes corresponding to each
+ // podAffinityTerm are intersected, i.e. all terms must be satisfied.
+ // +optional
+ // RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"`
+ // If the affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to a pod label update), the
+ // system may or may not try to eventually evict the pod from its node.
+ // When there are multiple elements, the lists of nodes corresponding to each
+ // podAffinityTerm are intersected, i.e. all terms must be satisfied.
+ // +optional
+ RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,1,rep,name=requiredDuringSchedulingIgnoredDuringExecution"`
+ // The scheduler will prefer to schedule pods to nodes that satisfy
+ // the affinity expressions specified by this field, but it may choose
+ // a node that violates one or more of the expressions. The node that is
+ // most preferred is the one with the greatest sum of weights, i.e.
+ // for each node that meets all of the scheduling requirements (resource
+ // request, requiredDuringScheduling affinity expressions, etc.),
+ // compute a sum by iterating through the elements of this field and adding
+ // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
+ // node(s) with the highest sum are the most preferred.
+ // +optional
+ PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,2,rep,name=preferredDuringSchedulingIgnoredDuringExecution"`
+}
+
+// Pod anti affinity is a group of inter pod anti affinity scheduling rules.
+type PodAntiAffinity struct {
+ // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented.
+ // If the anti-affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the anti-affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to a pod label update), the
+ // system will try to eventually evict the pod from its node.
+ // When there are multiple elements, the lists of nodes corresponding to each
+ // podAffinityTerm are intersected, i.e. all terms must be satisfied.
+ // +optional
+ // RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"`
+ // If the anti-affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the anti-affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to a pod label update), the
+ // system may or may not try to eventually evict the pod from its node.
+ // When there are multiple elements, the lists of nodes corresponding to each
+ // podAffinityTerm are intersected, i.e. all terms must be satisfied.
+ // +optional
+ RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,1,rep,name=requiredDuringSchedulingIgnoredDuringExecution"`
+ // The scheduler will prefer to schedule pods to nodes that satisfy
+ // the anti-affinity expressions specified by this field, but it may choose
+ // a node that violates one or more of the expressions. The node that is
+ // most preferred is the one with the greatest sum of weights, i.e.
+ // for each node that meets all of the scheduling requirements (resource
+ // request, requiredDuringScheduling anti-affinity expressions, etc.),
+ // compute a sum by iterating through the elements of this field and adding
+ // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
+ // node(s) with the highest sum are the most preferred.
+ // +optional
+ PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,2,rep,name=preferredDuringSchedulingIgnoredDuringExecution"`
+}
+
+// The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)
+type WeightedPodAffinityTerm struct {
+ // weight associated with matching the corresponding podAffinityTerm,
+ // in the range 1-100.
+ Weight int32 `json:"weight" protobuf:"varint,1,opt,name=weight"`
+ // Required. A pod affinity term, associated with the corresponding weight.
+ PodAffinityTerm PodAffinityTerm `json:"podAffinityTerm" protobuf:"bytes,2,opt,name=podAffinityTerm"`
+}
+
+// Defines a set of pods (namely those matching the labelSelector
+// relative to the given namespace(s)) that this pod should be
+// co-located (affinity) or not co-located (anti-affinity) with,
+// where co-located is defined as running on a node whose value of
+// the label with key <topologyKey> tches that of any node on which
+// a pod of the set of pods is running
+type PodAffinityTerm struct {
+ // A label query over a set of resources, in this case pods.
+ // +optional
+ LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty" protobuf:"bytes,1,opt,name=labelSelector"`
+ // namespaces specifies which namespaces the labelSelector applies to (matches against);
+ // null or empty list means "this pod's namespace"
+ Namespaces []string `json:"namespaces,omitempty" protobuf:"bytes,2,rep,name=namespaces"`
+ // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
+ // the labelSelector in the specified namespaces, where co-located is defined as running on a node
+ // whose value of the label with key topologyKey matches that of any node on which any of the
+ // selected pods is running.
+ // For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as "all topologies"
+ // ("all topologies" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains);
+ // for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed.
+ // +optional
+ TopologyKey string `json:"topologyKey,omitempty" protobuf:"bytes,3,opt,name=topologyKey"`
+}
+
+// Node affinity is a group of node affinity scheduling rules.
+type NodeAffinity struct {
+ // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented.
+ // If the affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to an update), the system
+ // will try to eventually evict the pod from its node.
+ // +optional
+ // RequiredDuringSchedulingRequiredDuringExecution *NodeSelector `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"`
+
+ // If the affinity requirements specified by this field are not met at
+ // scheduling time, the pod will not be scheduled onto the node.
+ // If the affinity requirements specified by this field cease to be met
+ // at some point during pod execution (e.g. due to an update), the system
+ // may or may not try to eventually evict the pod from its node.
+ // +optional
+ RequiredDuringSchedulingIgnoredDuringExecution *NodeSelector `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,1,opt,name=requiredDuringSchedulingIgnoredDuringExecution"`
+ // The scheduler will prefer to schedule pods to nodes that satisfy
+ // the affinity expressions specified by this field, but it may choose
+ // a node that violates one or more of the expressions. The node that is
+ // most preferred is the one with the greatest sum of weights, i.e.
+ // for each node that meets all of the scheduling requirements (resource
+ // request, requiredDuringScheduling affinity expressions, etc.),
+ // compute a sum by iterating through the elements of this field and adding
+ // "weight" to the sum if the node matches the corresponding matchExpressions; the
+ // node(s) with the highest sum are the most preferred.
+ // +optional
+ PreferredDuringSchedulingIgnoredDuringExecution []PreferredSchedulingTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty" protobuf:"bytes,2,rep,name=preferredDuringSchedulingIgnoredDuringExecution"`
+}
+
+// An empty preferred scheduling term matches all objects with implicit weight 0
+// (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).
+type PreferredSchedulingTerm struct {
+ // Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.
+ Weight int32 `json:"weight" protobuf:"varint,1,opt,name=weight"`
+ // A node selector term, associated with the corresponding weight.
+ Preference NodeSelectorTerm `json:"preference" protobuf:"bytes,2,opt,name=preference"`
+}
+
+// The node this Taint is attached to has the effect "effect" on
+// any pod that that does not tolerate the Taint.
+type Taint struct {
+ // Required. The taint key to be applied to a node.
+ // +patchMergeKey=key
+ // +patchStrategy=merge
+ Key string `json:"key" patchStrategy:"merge" patchMergeKey:"key" protobuf:"bytes,1,opt,name=key"`
+ // Required. The taint value corresponding to the taint key.
+ // +optional
+ Value string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"`
+ // Required. The effect of the taint on pods
+ // that do not tolerate the taint.
+ // Valid effects are NoSchedule, PreferNoSchedule and NoExecute.
+ Effect TaintEffect `json:"effect" protobuf:"bytes,3,opt,name=effect,casttype=TaintEffect"`
+ // TimeAdded represents the time at which the taint was added.
+ // It is only written for NoExecute taints.
+ // +optional
+ TimeAdded metav1.Time `json:"timeAdded,omitempty" protobuf:"bytes,4,opt,name=timeAdded"`
+}
+
+type TaintEffect string
+
+const (
+ // Do not allow new pods to schedule onto the node unless they tolerate the taint,
+ // but allow all pods submitted to Kubelet without going through the scheduler
+ // to start, and allow all already-running pods to continue running.
+ // Enforced by the scheduler.
+ TaintEffectNoSchedule TaintEffect = "NoSchedule"
+ // Like TaintEffectNoSchedule, but the scheduler tries not to schedule
+ // new pods onto the node, rather than prohibiting new pods from scheduling
+ // onto the node entirely. Enforced by the scheduler.
+ TaintEffectPreferNoSchedule TaintEffect = "PreferNoSchedule"
+ // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented.
+ // Like TaintEffectNoSchedule, but additionally do not allow pods submitted to
+ // Kubelet without going through the scheduler to start.
+ // Enforced by Kubelet and the scheduler.
+ // TaintEffectNoScheduleNoAdmit TaintEffect = "NoScheduleNoAdmit"
+ // Evict any already-running pods that do not tolerate the taint.
+ // Currently enforced by NodeController.
+ TaintEffectNoExecute TaintEffect = "NoExecute"
+)
+
+// The pod this Toleration is attached to tolerates any taint that matches
+// the triple <key,value,effect> using the matching operator <operator>.
+type Toleration struct {
+ // Key is the taint key that the toleration applies to. Empty means match all taint keys.
+ // If the key is empty, operator must be Exists; this combination means to match all values and all keys.
+ // +optional
+ // +patchMergeKey=key
+ // +patchStrategy=merge
+ Key string `json:"key,omitempty" patchStrategy:"merge" patchMergeKey:"key" protobuf:"bytes,1,opt,name=key"`
+ // Operator represents a key's relationship to the value.
+ // Valid operators are Exists and Equal. Defaults to Equal.
+ // Exists is equivalent to wildcard for value, so that a pod can
+ // tolerate all taints of a particular category.
+ // +optional
+ Operator TolerationOperator `json:"operator,omitempty" protobuf:"bytes,2,opt,name=operator,casttype=TolerationOperator"`
+ // Value is the taint value the toleration matches to.
+ // If the operator is Exists, the value should be empty, otherwise just a regular string.
+ // +optional
+ Value string `json:"value,omitempty" protobuf:"bytes,3,opt,name=value"`
+ // Effect indicates the taint effect to match. Empty means match all taint effects.
+ // When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
+ // +optional
+ Effect TaintEffect `json:"effect,omitempty" protobuf:"bytes,4,opt,name=effect,casttype=TaintEffect"`
+ // TolerationSeconds represents the period of time the toleration (which must be
+ // of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
+ // it is not set, which means tolerate the taint forever (do not evict). Zero and
+ // negative values will be treated as 0 (evict immediately) by the system.
+ // +optional
+ TolerationSeconds *int64 `json:"tolerationSeconds,omitempty" protobuf:"varint,5,opt,name=tolerationSeconds"`
+}
+
+// A toleration operator is the set of operators that can be used in a toleration.
+type TolerationOperator string
+
+const (
+ TolerationOpExists TolerationOperator = "Exists"
+ TolerationOpEqual TolerationOperator = "Equal"
+)
+
+const (
+ // This annotation key will be used to contain an array of v1 JSON encoded Containers
+ // for init containers. The annotation will be placed into the internal type and cleared.
+ // This key is only recognized by version >= 1.4.
+ PodInitContainersBetaAnnotationKey = "pod.beta.kubernetes.io/init-containers"
+ // This annotation key will be used to contain an array of v1 JSON encoded Containers
+ // for init containers. The annotation will be placed into the internal type and cleared.
+ // This key is recognized by version >= 1.3. For version 1.4 code, this key
+ // will have its value copied to the beta key.
+ PodInitContainersAnnotationKey = "pod.alpha.kubernetes.io/init-containers"
+ // This annotation key will be used to contain an array of v1 JSON encoded
+ // ContainerStatuses for init containers. The annotation will be placed into the internal
+ // type and cleared. This key is only recognized by version >= 1.4.
+ PodInitContainerStatusesBetaAnnotationKey = "pod.beta.kubernetes.io/init-container-statuses"
+ // This annotation key will be used to contain an array of v1 JSON encoded
+ // ContainerStatuses for init containers. The annotation will be placed into the internal
+ // type and cleared. This key is recognized by version >= 1.3. For version 1.4 code,
+ // this key will have its value copied to the beta key.
+ PodInitContainerStatusesAnnotationKey = "pod.alpha.kubernetes.io/init-container-statuses"
+)
+
+// PodSpec is a description of a pod.
+type PodSpec struct {
+ // List of volumes that can be mounted by containers belonging to the pod.
+ // More info: https://kubernetes.io/docs/concepts/storage/volumes
+ // +optional
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ Volumes []Volume `json:"volumes,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,1,rep,name=volumes"`
+ // List of initialization containers belonging to the pod.
+ // Init containers are executed in order prior to containers being started. If any
+ // init container fails, the pod is considered to have failed and is handled according
+ // to its restartPolicy. The name for an init container or normal container must be
+ // unique among all containers.
+ // Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes.
+ // The resourceRequirements of an init container are taken into account during scheduling
+ // by finding the highest request/limit for each resource type, and then using the max of
+ // of that value or the sum of the normal containers. Limits are applied to init containers
+ // in a similar fashion.
+ // Init containers cannot currently be added or removed.
+ // Cannot be updated.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ InitContainers []Container `json:"initContainers,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,20,rep,name=initContainers"`
+ // List of containers belonging to the pod.
+ // Containers cannot currently be added or removed.
+ // There must be at least one container in a Pod.
+ // Cannot be updated.
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ Containers []Container `json:"containers" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=containers"`
+ // Restart policy for all containers within the pod.
+ // One of Always, OnFailure, Never.
+ // Default to Always.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy
+ // +optional
+ RestartPolicy RestartPolicy `json:"restartPolicy,omitempty" protobuf:"bytes,3,opt,name=restartPolicy,casttype=RestartPolicy"`
+ // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request.
+ // Value must be non-negative integer. The value zero indicates delete immediately.
+ // If this value is nil, the default grace period will be used instead.
+ // The grace period is the duration in seconds after the processes running in the pod are sent
+ // a termination signal and the time when the processes are forcibly halted with a kill signal.
+ // Set this value longer than the expected cleanup time for your process.
+ // Defaults to 30 seconds.
+ // +optional
+ TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty" protobuf:"varint,4,opt,name=terminationGracePeriodSeconds"`
+ // Optional duration in seconds the pod may be active on the node relative to
+ // StartTime before the system will actively try to mark it failed and kill associated containers.
+ // Value must be a positive integer.
+ // +optional
+ ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" protobuf:"varint,5,opt,name=activeDeadlineSeconds"`
+ // Set DNS policy for containers within the pod.
+ // One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'.
+ // Defaults to "ClusterFirst".
+ // To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.
+ // +optional
+ DNSPolicy DNSPolicy `json:"dnsPolicy,omitempty" protobuf:"bytes,6,opt,name=dnsPolicy,casttype=DNSPolicy"`
+ // NodeSelector is a selector which must be true for the pod to fit on a node.
+ // Selector which must match a node's labels for the pod to be scheduled on that node.
+ // More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
+ // +optional
+ NodeSelector map[string]string `json:"nodeSelector,omitempty" protobuf:"bytes,7,rep,name=nodeSelector"`
+
+ // ServiceAccountName is the name of the ServiceAccount to use to run this pod.
+ // More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
+ // +optional
+ ServiceAccountName string `json:"serviceAccountName,omitempty" protobuf:"bytes,8,opt,name=serviceAccountName"`
+ // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName.
+ // Deprecated: Use serviceAccountName instead.
+ // +k8s:conversion-gen=false
+ // +optional
+ DeprecatedServiceAccount string `json:"serviceAccount,omitempty" protobuf:"bytes,9,opt,name=serviceAccount"`
+ // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.
+ // +optional
+ AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty" protobuf:"varint,21,opt,name=automountServiceAccountToken"`
+
+ // NodeName is a request to schedule this pod onto a specific node. If it is non-empty,
+ // the scheduler simply schedules this pod onto that node, assuming that it fits resource
+ // requirements.
+ // +optional
+ NodeName string `json:"nodeName,omitempty" protobuf:"bytes,10,opt,name=nodeName"`
+ // Host networking requested for this pod. Use the host's network namespace.
+ // If this option is set, the ports that will be used must be specified.
+ // Default to false.
+ // +k8s:conversion-gen=false
+ // +optional
+ HostNetwork bool `json:"hostNetwork,omitempty" protobuf:"varint,11,opt,name=hostNetwork"`
+ // Use the host's pid namespace.
+ // Optional: Default to false.
+ // +k8s:conversion-gen=false
+ // +optional
+ HostPID bool `json:"hostPID,omitempty" protobuf:"varint,12,opt,name=hostPID"`
+ // Use the host's ipc namespace.
+ // Optional: Default to false.
+ // +k8s:conversion-gen=false
+ // +optional
+ HostIPC bool `json:"hostIPC,omitempty" protobuf:"varint,13,opt,name=hostIPC"`
+ // SecurityContext holds pod-level security attributes and common container settings.
+ // Optional: Defaults to empty. See type description for default values of each field.
+ // +optional
+ SecurityContext *PodSecurityContext `json:"securityContext,omitempty" protobuf:"bytes,14,opt,name=securityContext"`
+ // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec.
+ // If specified, these secrets will be passed to individual puller implementations for them to use. For example,
+ // in the case of docker, only DockerConfig type secrets are honored.
+ // More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod
+ // +optional
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ ImagePullSecrets []LocalObjectReference `json:"imagePullSecrets,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,15,rep,name=imagePullSecrets"`
+ // Specifies the hostname of the Pod
+ // If not specified, the pod's hostname will be set to a system-defined value.
+ // +optional
+ Hostname string `json:"hostname,omitempty" protobuf:"bytes,16,opt,name=hostname"`
+ // If specified, the fully qualified Pod hostname will be "<hostname>.<subdomain>.<pod namespace>.svc.<cluster domain>".
+ // If not specified, the pod will not have a domainname at all.
+ // +optional
+ Subdomain string `json:"subdomain,omitempty" protobuf:"bytes,17,opt,name=subdomain"`
+ // If specified, the pod's scheduling constraints
+ // +optional
+ Affinity *Affinity `json:"affinity,omitempty" protobuf:"bytes,18,opt,name=affinity"`
+ // If specified, the pod will be dispatched by specified scheduler.
+ // If not specified, the pod will be dispatched by default scheduler.
+ // +optional
+ SchedulerName string `json:"schedulerName,omitempty" protobuf:"bytes,19,opt,name=schedulerName"`
+ // If specified, the pod's tolerations.
+ // +optional
+ Tolerations []Toleration `json:"tolerations,omitempty" protobuf:"bytes,22,opt,name=tolerations"`
+ // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts
+ // file if specified. This is only valid for non-hostNetwork pods.
+ // +optional
+ // +patchMergeKey=ip
+ // +patchStrategy=merge
+ HostAliases []HostAlias `json:"hostAliases,omitempty" patchStrategy:"merge" patchMergeKey:"ip" protobuf:"bytes,23,rep,name=hostAliases"`
+}
+
+// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
+// pod's hosts file.
+type HostAlias struct {
+ // IP address of the host file entry.
+ IP string `json:"ip,omitempty" protobuf:"bytes,1,opt,name=ip"`
+ // Hostnames for the above IP address.
+ Hostnames []string `json:"hostnames,omitempty" protobuf:"bytes,2,rep,name=hostnames"`
+}
+
+// PodSecurityContext holds pod-level security attributes and common container settings.
+// Some fields are also present in container.securityContext. Field values of
+// container.securityContext take precedence over field values of PodSecurityContext.
+type PodSecurityContext struct {
+ // The SELinux context to be applied to all containers.
+ // If unspecified, the container runtime will allocate a random SELinux context for each
+ // container. May also be set in SecurityContext. If set in
+ // both SecurityContext and PodSecurityContext, the value specified in SecurityContext
+ // takes precedence for that container.
+ // +optional
+ SELinuxOptions *SELinuxOptions `json:"seLinuxOptions,omitempty" protobuf:"bytes,1,opt,name=seLinuxOptions"`
+ // The UID to run the entrypoint of the container process.
+ // Defaults to user specified in image metadata if unspecified.
+ // May also be set in SecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence
+ // for that container.
+ // +optional
+ RunAsUser *int64 `json:"runAsUser,omitempty" protobuf:"varint,2,opt,name=runAsUser"`
+ // Indicates that the container must run as a non-root user.
+ // If true, the Kubelet will validate the image at runtime to ensure that it
+ // does not run as UID 0 (root) and fail to start the container if it does.
+ // If unset or false, no such validation will be performed.
+ // May also be set in SecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence.
+ // +optional
+ RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" protobuf:"varint,3,opt,name=runAsNonRoot"`
+ // A list of groups applied to the first process run in each container, in addition
+ // to the container's primary GID. If unspecified, no groups will be added to
+ // any container.
+ // +optional
+ SupplementalGroups []int64 `json:"supplementalGroups,omitempty" protobuf:"varint,4,rep,name=supplementalGroups"`
+ // A special supplemental group that applies to all containers in a pod.
+ // Some volume types allow the Kubelet to change the ownership of that volume
+ // to be owned by the pod:
+ //
+ // 1. The owning GID will be the FSGroup
+ // 2. The setgid bit is set (new files created in the volume will be owned by FSGroup)
+ // 3. The permission bits are OR'd with rw-rw----
+ //
+ // If unset, the Kubelet will not modify the ownership and permissions of any volume.
+ // +optional
+ FSGroup *int64 `json:"fsGroup,omitempty" protobuf:"varint,5,opt,name=fsGroup"`
+}
+
+// PodQOSClass defines the supported qos classes of Pods.
+type PodQOSClass string
+
+const (
+ // PodQOSGuaranteed is the Guaranteed qos class.
+ PodQOSGuaranteed PodQOSClass = "Guaranteed"
+ // PodQOSBurstable is the Burstable qos class.
+ PodQOSBurstable PodQOSClass = "Burstable"
+ // PodQOSBestEffort is the BestEffort qos class.
+ PodQOSBestEffort PodQOSClass = "BestEffort"
+)
+
+// PodStatus represents information about the status of a pod. Status may trail the actual
+// state of a system.
+type PodStatus struct {
+ // Current condition of the pod.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase
+ // +optional
+ Phase PodPhase `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=PodPhase"`
+ // Current service state of pod.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ Conditions []PodCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=conditions"`
+ // A human readable message indicating details about why the pod is in this condition.
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"`
+ // A brief CamelCase message indicating details about why the pod is in this state.
+ // e.g. 'OutOfDisk'
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
+
+ // IP address of the host to which the pod is assigned. Empty if not yet scheduled.
+ // +optional
+ HostIP string `json:"hostIP,omitempty" protobuf:"bytes,5,opt,name=hostIP"`
+ // IP address allocated to the pod. Routable at least within the cluster.
+ // Empty if not yet allocated.
+ // +optional
+ PodIP string `json:"podIP,omitempty" protobuf:"bytes,6,opt,name=podIP"`
+
+ // RFC 3339 date and time at which the object was acknowledged by the Kubelet.
+ // This is before the Kubelet pulled the container image(s) for the pod.
+ // +optional
+ StartTime *metav1.Time `json:"startTime,omitempty" protobuf:"bytes,7,opt,name=startTime"`
+
+ // The list has one entry per init container in the manifest. The most recent successful
+ // init container will have ready = true, the most recently started container will have
+ // startTime set.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status
+ InitContainerStatuses []ContainerStatus `json:"initContainerStatuses,omitempty" protobuf:"bytes,10,rep,name=initContainerStatuses"`
+
+ // The list has one entry per container in the manifest. Each entry is currently the output
+ // of `docker inspect`.
+ // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status
+ // +optional
+ ContainerStatuses []ContainerStatus `json:"containerStatuses,omitempty" protobuf:"bytes,8,rep,name=containerStatuses"`
+ // The Quality of Service (QOS) classification assigned to the pod based on resource requirements
+ // See PodQOSClass type for available QOS classes
+ // More info: https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md
+ // +optional
+ QOSClass PodQOSClass `json:"qosClass,omitempty" protobuf:"bytes,9,rep,name=qosClass"`
+}
+
+// PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded
+type PodStatusResult struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+ // Most recently observed status of the pod.
+ // This data may not be up to date.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status PodStatus `json:"status,omitempty" protobuf:"bytes,2,opt,name=status"`
+}
+
+// +genclient=true
+
+// Pod is a collection of containers that can run on a host. This resource is created
+// by clients and scheduled onto hosts.
+type Pod struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Specification of the desired behavior of the pod.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec PodSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Most recently observed status of the pod.
+ // This data may not be up to date.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status PodStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// PodList is a list of Pods.
+type PodList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of pods.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md
+ Items []Pod `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// PodTemplateSpec describes the data a pod should have when created from a template
+type PodTemplateSpec struct {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Specification of the desired behavior of the pod.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec PodSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+}
+
+// +genclient=true
+
+// PodTemplate describes a template for creating copies of a predefined pod.
+type PodTemplate struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Template defines the pods that will be created from this pod template.
+ // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Template PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,2,opt,name=template"`
+}
+
+// PodTemplateList is a list of PodTemplates.
+type PodTemplateList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of pod templates
+ Items []PodTemplate `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// ReplicationControllerSpec is the specification of a replication controller.
+type ReplicationControllerSpec struct {
+ // Replicas is the number of desired replicas.
+ // This is a pointer to distinguish between explicit zero and unspecified.
+ // Defaults to 1.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller
+ // +optional
+ Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
+
+ // Minimum number of seconds for which a newly created pod should be ready
+ // without any of its container crashing, for it to be considered available.
+ // Defaults to 0 (pod will be considered available as soon as it is ready)
+ // +optional
+ MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,4,opt,name=minReadySeconds"`
+
+ // Selector is a label query over pods that should match the Replicas count.
+ // If Selector is empty, it is defaulted to the labels present on the Pod template.
+ // Label keys and values that must match in order to be controlled by this replication
+ // controller, if empty defaulted to labels on Pod template.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,2,rep,name=selector"`
+
+ // TemplateRef is a reference to an object that describes the pod that will be created if
+ // insufficient replicas are detected.
+ // Reference to an object that describes the pod that will be created if insufficient replicas are detected.
+ // +optional
+ // TemplateRef *ObjectReference `json:"templateRef,omitempty"`
+
+ // Template is the object that describes the pod that will be created if
+ // insufficient replicas are detected. This takes precedence over a TemplateRef.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
+ // +optional
+ Template *PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,3,opt,name=template"`
+}
+
+// ReplicationControllerStatus represents the current status of a replication
+// controller.
+type ReplicationControllerStatus struct {
+ // Replicas is the most recently oberved number of replicas.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller
+ Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"`
+
+ // The number of pods that have labels matching the labels of the pod template of the replication controller.
+ // +optional
+ FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty" protobuf:"varint,2,opt,name=fullyLabeledReplicas"`
+
+ // The number of ready replicas for this replication controller.
+ // +optional
+ ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,4,opt,name=readyReplicas"`
+
+ // The number of available replicas (ready for at least minReadySeconds) for this replication controller.
+ // +optional
+ AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,5,opt,name=availableReplicas"`
+
+ // ObservedGeneration reflects the generation of the most recently observed replication controller.
+ // +optional
+ ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"`
+
+ // Represents the latest available observations of a replication controller's current state.
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ Conditions []ReplicationControllerCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"`
+}
+
+type ReplicationControllerConditionType string
+
+// These are valid conditions of a replication controller.
+const (
+ // ReplicationControllerReplicaFailure is added in a replication controller when one of its pods
+ // fails to be created due to insufficient quota, limit ranges, pod security policy, node selectors,
+ // etc. or deleted due to kubelet being down or finalizers are failing.
+ ReplicationControllerReplicaFailure ReplicationControllerConditionType = "ReplicaFailure"
+)
+
+// ReplicationControllerCondition describes the state of a replication controller at a certain point.
+type ReplicationControllerCondition struct {
+ // Type of replication controller condition.
+ Type ReplicationControllerConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=ReplicationControllerConditionType"`
+ // Status of the condition, one of True, False, Unknown.
+ Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"`
+ // The last time the condition transitioned from one status to another.
+ // +optional
+ LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
+ // The reason for the condition's last transition.
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
+ // A human readable message indicating details about the transition.
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
+}
+
+// +genclient=true
+
+// ReplicationController represents the configuration of a replication controller.
+type ReplicationController struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // If the Labels of a ReplicationController are empty, they are defaulted to
+ // be the same as the Pod(s) that the replication controller manages.
+ // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines the specification of the desired behavior of the replication controller.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec ReplicationControllerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is the most recently observed status of the replication controller.
+ // This data may be out of date by some window of time.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status ReplicationControllerStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// ReplicationControllerList is a collection of replication controllers.
+type ReplicationControllerList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of replication controllers.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
+ Items []ReplicationController `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// Session Affinity Type string
+type ServiceAffinity string
+
+const (
+ // ServiceAffinityClientIP is the Client IP based.
+ ServiceAffinityClientIP ServiceAffinity = "ClientIP"
+
+ // ServiceAffinityNone - no session affinity.
+ ServiceAffinityNone ServiceAffinity = "None"
+)
+
+// Service Type string describes ingress methods for a service
+type ServiceType string
+
+const (
+ // ServiceTypeClusterIP means a service will only be accessible inside the
+ // cluster, via the cluster IP.
+ ServiceTypeClusterIP ServiceType = "ClusterIP"
+
+ // ServiceTypeNodePort means a service will be exposed on one port of
+ // every node, in addition to 'ClusterIP' type.
+ ServiceTypeNodePort ServiceType = "NodePort"
+
+ // ServiceTypeLoadBalancer means a service will be exposed via an
+ // external load balancer (if the cloud provider supports it), in addition
+ // to 'NodePort' type.
+ ServiceTypeLoadBalancer ServiceType = "LoadBalancer"
+
+ // ServiceTypeExternalName means a service consists of only a reference to
+ // an external name that kubedns or equivalent will return as a CNAME
+ // record, with no exposing or proxying of any pods involved.
+ ServiceTypeExternalName ServiceType = "ExternalName"
+)
+
+// Service External Traffic Policy Type string
+type ServiceExternalTrafficPolicyType string
+
+const (
+ // ServiceExternalTrafficPolicyTypeLocal specifies node-local endpoints behavior.
+ ServiceExternalTrafficPolicyTypeLocal ServiceExternalTrafficPolicyType = "Local"
+ // ServiceExternalTrafficPolicyTypeCluster specifies node-global (legacy) behavior.
+ ServiceExternalTrafficPolicyTypeCluster ServiceExternalTrafficPolicyType = "Cluster"
+)
+
+// ServiceStatus represents the current status of a service.
+type ServiceStatus struct {
+ // LoadBalancer contains the current status of the load-balancer,
+ // if one is present.
+ // +optional
+ LoadBalancer LoadBalancerStatus `json:"loadBalancer,omitempty" protobuf:"bytes,1,opt,name=loadBalancer"`
+}
+
+// LoadBalancerStatus represents the status of a load-balancer.
+type LoadBalancerStatus struct {
+ // Ingress is a list containing ingress points for the load-balancer.
+ // Traffic intended for the service should be sent to these ingress points.
+ // +optional
+ Ingress []LoadBalancerIngress `json:"ingress,omitempty" protobuf:"bytes,1,rep,name=ingress"`
+}
+
+// LoadBalancerIngress represents the status of a load-balancer ingress point:
+// traffic intended for the service should be sent to an ingress point.
+type LoadBalancerIngress struct {
+ // IP is set for load-balancer ingress points that are IP based
+ // (typically GCE or OpenStack load-balancers)
+ // +optional
+ IP string `json:"ip,omitempty" protobuf:"bytes,1,opt,name=ip"`
+
+ // Hostname is set for load-balancer ingress points that are DNS based
+ // (typically AWS load-balancers)
+ // +optional
+ Hostname string `json:"hostname,omitempty" protobuf:"bytes,2,opt,name=hostname"`
+}
+
+// ServiceSpec describes the attributes that a user creates on a service.
+type ServiceSpec struct {
+ // The list of ports that are exposed by this service.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
+ // +patchMergeKey=port
+ // +patchStrategy=merge
+ Ports []ServicePort `json:"ports,omitempty" patchStrategy:"merge" patchMergeKey:"port" protobuf:"bytes,1,rep,name=ports"`
+
+ // Route service traffic to pods with label keys and values matching this
+ // selector. If empty or not present, the service is assumed to have an
+ // external process managing its endpoints, which Kubernetes will not
+ // modify. Only applies to types ClusterIP, NodePort, and LoadBalancer.
+ // Ignored if type is ExternalName.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/
+ // +optional
+ Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,2,rep,name=selector"`
+
+ // clusterIP is the IP address of the service and is usually assigned
+ // randomly by the master. If an address is specified manually and is not in
+ // use by others, it will be allocated to the service; otherwise, creation
+ // of the service will fail. This field can not be changed through updates.
+ // Valid values are "None", empty string (""), or a valid IP address. "None"
+ // can be specified for headless services when proxying is not required.
+ // Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if
+ // type is ExternalName.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
+ // +optional
+ ClusterIP string `json:"clusterIP,omitempty" protobuf:"bytes,3,opt,name=clusterIP"`
+
+ // type determines how the Service is exposed. Defaults to ClusterIP. Valid
+ // options are ExternalName, ClusterIP, NodePort, and LoadBalancer.
+ // "ExternalName" maps to the specified externalName.
+ // "ClusterIP" allocates a cluster-internal IP address for load-balancing to
+ // endpoints. Endpoints are determined by the selector or if that is not
+ // specified, by manual construction of an Endpoints object. If clusterIP is
+ // "None", no virtual IP is allocated and the endpoints are published as a
+ // set of endpoints rather than a stable IP.
+ // "NodePort" builds on ClusterIP and allocates a port on every node which
+ // routes to the clusterIP.
+ // "LoadBalancer" builds on NodePort and creates an
+ // external load-balancer (if supported in the current cloud) which routes
+ // to the clusterIP.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services---service-types
+ // +optional
+ Type ServiceType `json:"type,omitempty" protobuf:"bytes,4,opt,name=type,casttype=ServiceType"`
+
+ // externalIPs is a list of IP addresses for which nodes in the cluster
+ // will also accept traffic for this service. These IPs are not managed by
+ // Kubernetes. The user is responsible for ensuring that traffic arrives
+ // at a node with this IP. A common example is external load-balancers
+ // that are not part of the Kubernetes system.
+ // +optional
+ ExternalIPs []string `json:"externalIPs,omitempty" protobuf:"bytes,5,rep,name=externalIPs"`
+
+ // Supports "ClientIP" and "None". Used to maintain session affinity.
+ // Enable client IP based session affinity.
+ // Must be ClientIP or None.
+ // Defaults to None.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
+ // +optional
+ SessionAffinity ServiceAffinity `json:"sessionAffinity,omitempty" protobuf:"bytes,7,opt,name=sessionAffinity,casttype=ServiceAffinity"`
+
+ // Only applies to Service Type: LoadBalancer
+ // LoadBalancer will get created with the IP specified in this field.
+ // This feature depends on whether the underlying cloud-provider supports specifying
+ // the loadBalancerIP when a load balancer is created.
+ // This field will be ignored if the cloud-provider does not support the feature.
+ // +optional
+ LoadBalancerIP string `json:"loadBalancerIP,omitempty" protobuf:"bytes,8,opt,name=loadBalancerIP"`
+
+ // If specified and supported by the platform, this will restrict traffic through the cloud-provider
+ // load-balancer will be restricted to the specified client IPs. This field will be ignored if the
+ // cloud-provider does not support the feature."
+ // More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/
+ // +optional
+ LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty" protobuf:"bytes,9,opt,name=loadBalancerSourceRanges"`
+
+ // externalName is the external reference that kubedns or equivalent will
+ // return as a CNAME record for this service. No proxying will be involved.
+ // Must be a valid DNS name and requires Type to be ExternalName.
+ // +optional
+ ExternalName string `json:"externalName,omitempty" protobuf:"bytes,10,opt,name=externalName"`
+
+ // externalTrafficPolicy denotes if this Service desires to route external
+ // traffic to node-local or cluster-wide endpoints. "Local" preserves the
+ // client source IP and avoids a second hop for LoadBalancer and Nodeport
+ // type services, but risks potentially imbalanced traffic spreading.
+ // "Cluster" obscures the client source IP and may cause a second hop to
+ // another node, but should have good overall load-spreading.
+ // +optional
+ ExternalTrafficPolicy ServiceExternalTrafficPolicyType `json:"externalTrafficPolicy,omitempty" protobuf:"bytes,11,opt,name=externalTrafficPolicy"`
+
+ // healthCheckNodePort specifies the healthcheck nodePort for the service.
+ // If not specified, HealthCheckNodePort is created by the service api
+ // backend with the allocated nodePort. Will use user-specified nodePort value
+ // if specified by the client. Only effects when Type is set to LoadBalancer
+ // and ExternalTrafficPolicy is set to Local.
+ // +optional
+ HealthCheckNodePort int32 `json:"healthCheckNodePort,omitempty" protobuf:"bytes,12,opt,name=healthCheckNodePort"`
+}
+
+// ServicePort contains information on service's port.
+type ServicePort struct {
+ // The name of this port within the service. This must be a DNS_LABEL.
+ // All ports within a ServiceSpec must have unique names. This maps to
+ // the 'Name' field in EndpointPort objects.
+ // Optional if only one ServicePort is defined on this service.
+ // +optional
+ Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
+
+ // The IP protocol for this port. Supports "TCP" and "UDP".
+ // Default is TCP.
+ // +optional
+ Protocol Protocol `json:"protocol,omitempty" protobuf:"bytes,2,opt,name=protocol,casttype=Protocol"`
+
+ // The port that will be exposed by this service.
+ Port int32 `json:"port" protobuf:"varint,3,opt,name=port"`
+
+ // Number or name of the port to access on the pods targeted by the service.
+ // Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+ // If this is a string, it will be looked up as a named port in the
+ // target Pod's container ports. If this is not specified, the value
+ // of the 'port' field is used (an identity map).
+ // This field is ignored for services with clusterIP=None, and should be
+ // omitted or set equal to the 'port' field.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service
+ // +optional
+ TargetPort intstr.IntOrString `json:"targetPort,omitempty" protobuf:"bytes,4,opt,name=targetPort"`
+
+ // The port on each node on which this service is exposed when type=NodePort or LoadBalancer.
+ // Usually assigned by the system. If specified, it will be allocated to the service
+ // if unused or else creation of the service will fail.
+ // Default is to auto-allocate a port if the ServiceType of this Service requires one.
+ // More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
+ // +optional
+ NodePort int32 `json:"nodePort,omitempty" protobuf:"varint,5,opt,name=nodePort"`
+}
+
+// +genclient=true
+
+// Service is a named abstraction of software service (for example, mysql) consisting of local port
+// (for example 3306) that the proxy listens on, and the selector that determines which pods
+// will answer requests sent through the proxy.
+type Service struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines the behavior of a service.
+ // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec ServiceSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Most recently observed status of the service.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status ServiceStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+const (
+ // ClusterIPNone - do not assign a cluster IP
+ // no proxying required and no environment variables should be created for pods
+ ClusterIPNone = "None"
+)
+
+// ServiceList holds a list of services.
+type ServiceList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of services
+ Items []Service `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// +genclient=true
+
+// ServiceAccount binds together:
+// * a name, understood by users, and perhaps by peripheral systems, for an identity
+// * a principal that can be authenticated and authorized
+// * a set of secrets
+type ServiceAccount struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount.
+ // More info: https://kubernetes.io/docs/concepts/configuration/secret
+ // +optional
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ Secrets []ObjectReference `json:"secrets,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=secrets"`
+
+ // ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images
+ // in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets
+ // can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet.
+ // More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
+ // +optional
+ ImagePullSecrets []LocalObjectReference `json:"imagePullSecrets,omitempty" protobuf:"bytes,3,rep,name=imagePullSecrets"`
+
+ // AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted.
+ // Can be overridden at the pod level.
+ // +optional
+ AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty" protobuf:"varint,4,opt,name=automountServiceAccountToken"`
+}
+
+// ServiceAccountList is a list of ServiceAccount objects
+type ServiceAccountList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of ServiceAccounts.
+ // More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
+ Items []ServiceAccount `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// +genclient=true
+
+// Endpoints is a collection of endpoints that implement the actual service. Example:
+// Name: "mysvc",
+// Subsets: [
+// {
+// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
+// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
+// },
+// {
+// Addresses: [{"ip": "10.10.3.3"}],
+// Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}]
+// },
+// ]
+type Endpoints struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // The set of all endpoints is the union of all subsets. Addresses are placed into
+ // subsets according to the IPs they share. A single address with multiple ports,
+ // some of which are ready and some of which are not (because they come from
+ // different containers) will result in the address being displayed in different
+ // subsets for the different ports. No address will appear in both Addresses and
+ // NotReadyAddresses in the same subset.
+ // Sets of addresses and ports that comprise a service.
+ Subsets []EndpointSubset `json:"subsets" protobuf:"bytes,2,rep,name=subsets"`
+}
+
+// EndpointSubset is a group of addresses with a common set of ports. The
+// expanded set of endpoints is the Cartesian product of Addresses x Ports.
+// For example, given:
+// {
+// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
+// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
+// }
+// The resulting set of endpoints can be viewed as:
+// a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],
+// b: [ 10.10.1.1:309, 10.10.2.2:309 ]
+type EndpointSubset struct {
+ // IP addresses which offer the related ports that are marked as ready. These endpoints
+ // should be considered safe for load balancers and clients to utilize.
+ // +optional
+ Addresses []EndpointAddress `json:"addresses,omitempty" protobuf:"bytes,1,rep,name=addresses"`
+ // IP addresses which offer the related ports but are not currently marked as ready
+ // because they have not yet finished starting, have recently failed a readiness check,
+ // or have recently failed a liveness check.
+ // +optional
+ NotReadyAddresses []EndpointAddress `json:"notReadyAddresses,omitempty" protobuf:"bytes,2,rep,name=notReadyAddresses"`
+ // Port numbers available on the related IP addresses.
+ // +optional
+ Ports []EndpointPort `json:"ports,omitempty" protobuf:"bytes,3,rep,name=ports"`
+}
+
+// EndpointAddress is a tuple that describes single IP address.
+type EndpointAddress struct {
+ // The IP of this endpoint.
+ // May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16),
+ // or link-local multicast ((224.0.0.0/24).
+ // IPv6 is also accepted but not fully supported on all platforms. Also, certain
+ // kubernetes components, like kube-proxy, are not IPv6 ready.
+ // TODO: This should allow hostname or IP, See #4447.
+ IP string `json:"ip" protobuf:"bytes,1,opt,name=ip"`
+ // The Hostname of this endpoint
+ // +optional
+ Hostname string `json:"hostname,omitempty" protobuf:"bytes,3,opt,name=hostname"`
+ // Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.
+ // +optional
+ NodeName *string `json:"nodeName,omitempty" protobuf:"bytes,4,opt,name=nodeName"`
+ // Reference to object providing the endpoint.
+ // +optional
+ TargetRef *ObjectReference `json:"targetRef,omitempty" protobuf:"bytes,2,opt,name=targetRef"`
+}
+
+// EndpointPort is a tuple that describes a single port.
+type EndpointPort struct {
+ // The name of this port (corresponds to ServicePort.Name).
+ // Must be a DNS_LABEL.
+ // Optional only if one port is defined.
+ // +optional
+ Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
+
+ // The port number of the endpoint.
+ Port int32 `json:"port" protobuf:"varint,2,opt,name=port"`
+
+ // The IP protocol for this port.
+ // Must be UDP or TCP.
+ // Default is TCP.
+ // +optional
+ Protocol Protocol `json:"protocol,omitempty" protobuf:"bytes,3,opt,name=protocol,casttype=Protocol"`
+}
+
+// EndpointsList is a list of endpoints.
+type EndpointsList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of endpoints.
+ Items []Endpoints `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// NodeSpec describes the attributes that a node is created with.
+type NodeSpec struct {
+ // PodCIDR represents the pod IP range assigned to the node.
+ // +optional
+ PodCIDR string `json:"podCIDR,omitempty" protobuf:"bytes,1,opt,name=podCIDR"`
+ // External ID of the node assigned by some machine database (e.g. a cloud provider).
+ // Deprecated.
+ // +optional
+ ExternalID string `json:"externalID,omitempty" protobuf:"bytes,2,opt,name=externalID"`
+ // ID of the node assigned by the cloud provider in the format: <ProviderName>://<ProviderSpecificNodeID>
+ // +optional
+ ProviderID string `json:"providerID,omitempty" protobuf:"bytes,3,opt,name=providerID"`
+ // Unschedulable controls node schedulability of new pods. By default, node is schedulable.
+ // More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration
+ // +optional
+ Unschedulable bool `json:"unschedulable,omitempty" protobuf:"varint,4,opt,name=unschedulable"`
+ // If specified, the node's taints.
+ // +optional
+ Taints []Taint `json:"taints,omitempty" protobuf:"bytes,5,opt,name=taints"`
+}
+
+// DaemonEndpoint contains information about a single Daemon endpoint.
+type DaemonEndpoint struct {
+ /*
+ The port tag was not properly in quotes in earlier releases, so it must be
+ uppercased for backwards compat (since it was falling back to var name of
+ 'Port').
+ */
+
+ // Port number of the given endpoint.
+ Port int32 `json:"Port" protobuf:"varint,1,opt,name=Port"`
+}
+
+// NodeDaemonEndpoints lists ports opened by daemons running on the Node.
+type NodeDaemonEndpoints struct {
+ // Endpoint on which Kubelet is listening.
+ // +optional
+ KubeletEndpoint DaemonEndpoint `json:"kubeletEndpoint,omitempty" protobuf:"bytes,1,opt,name=kubeletEndpoint"`
+}
+
+// NodeSystemInfo is a set of ids/uuids to uniquely identify the node.
+type NodeSystemInfo struct {
+ // MachineID reported by the node. For unique machine identification
+ // in the cluster this field is preferred. Learn more from man(5)
+ // machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html
+ MachineID string `json:"machineID" protobuf:"bytes,1,opt,name=machineID"`
+ // SystemUUID reported by the node. For unique machine identification
+ // MachineID is preferred. This field is specific to Red Hat hosts
+ // https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html
+ SystemUUID string `json:"systemUUID" protobuf:"bytes,2,opt,name=systemUUID"`
+ // Boot ID reported by the node.
+ BootID string `json:"bootID" protobuf:"bytes,3,opt,name=bootID"`
+ // Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).
+ KernelVersion string `json:"kernelVersion" protobuf:"bytes,4,opt,name=kernelVersion"`
+ // OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).
+ OSImage string `json:"osImage" protobuf:"bytes,5,opt,name=osImage"`
+ // ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0).
+ ContainerRuntimeVersion string `json:"containerRuntimeVersion" protobuf:"bytes,6,opt,name=containerRuntimeVersion"`
+ // Kubelet Version reported by the node.
+ KubeletVersion string `json:"kubeletVersion" protobuf:"bytes,7,opt,name=kubeletVersion"`
+ // KubeProxy Version reported by the node.
+ KubeProxyVersion string `json:"kubeProxyVersion" protobuf:"bytes,8,opt,name=kubeProxyVersion"`
+ // The Operating System reported by the node
+ OperatingSystem string `json:"operatingSystem" protobuf:"bytes,9,opt,name=operatingSystem"`
+ // The Architecture reported by the node
+ Architecture string `json:"architecture" protobuf:"bytes,10,opt,name=architecture"`
+}
+
+// NodeStatus is information about the current status of a node.
+type NodeStatus struct {
+ // Capacity represents the total resources of a node.
+ // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity
+ // +optional
+ Capacity ResourceList `json:"capacity,omitempty" protobuf:"bytes,1,rep,name=capacity,casttype=ResourceList,castkey=ResourceName"`
+ // Allocatable represents the resources of a node that are available for scheduling.
+ // Defaults to Capacity.
+ // +optional
+ Allocatable ResourceList `json:"allocatable,omitempty" protobuf:"bytes,2,rep,name=allocatable,casttype=ResourceList,castkey=ResourceName"`
+ // NodePhase is the recently observed lifecycle phase of the node.
+ // More info: https://kubernetes.io/docs/concepts/nodes/node/#phase
+ // The field is never populated, and now is deprecated.
+ // +optional
+ Phase NodePhase `json:"phase,omitempty" protobuf:"bytes,3,opt,name=phase,casttype=NodePhase"`
+ // Conditions is an array of current observed node conditions.
+ // More info: https://kubernetes.io/docs/concepts/nodes/node/#condition
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ Conditions []NodeCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,4,rep,name=conditions"`
+ // List of addresses reachable to the node.
+ // Queried from cloud provider, if available.
+ // More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ Addresses []NodeAddress `json:"addresses,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,5,rep,name=addresses"`
+ // Endpoints of daemons running on the Node.
+ // +optional
+ DaemonEndpoints NodeDaemonEndpoints `json:"daemonEndpoints,omitempty" protobuf:"bytes,6,opt,name=daemonEndpoints"`
+ // Set of ids/uuids to uniquely identify the node.
+ // More info: https://kubernetes.io/docs/concepts/nodes/node/#info
+ // +optional
+ NodeInfo NodeSystemInfo `json:"nodeInfo,omitempty" protobuf:"bytes,7,opt,name=nodeInfo"`
+ // List of container images on this node
+ // +optional
+ Images []ContainerImage `json:"images,omitempty" protobuf:"bytes,8,rep,name=images"`
+ // List of attachable volumes in use (mounted) by the node.
+ // +optional
+ VolumesInUse []UniqueVolumeName `json:"volumesInUse,omitempty" protobuf:"bytes,9,rep,name=volumesInUse"`
+ // List of volumes that are attached to the node.
+ // +optional
+ VolumesAttached []AttachedVolume `json:"volumesAttached,omitempty" protobuf:"bytes,10,rep,name=volumesAttached"`
+}
+
+type UniqueVolumeName string
+
+// AttachedVolume describes a volume attached to a node
+type AttachedVolume struct {
+ // Name of the attached volume
+ Name UniqueVolumeName `json:"name" protobuf:"bytes,1,rep,name=name"`
+
+ // DevicePath represents the device path where the volume should be available
+ DevicePath string `json:"devicePath" protobuf:"bytes,2,rep,name=devicePath"`
+}
+
+// AvoidPods describes pods that should avoid this node. This is the value for a
+// Node annotation with key scheduler.alpha.kubernetes.io/preferAvoidPods and
+// will eventually become a field of NodeStatus.
+type AvoidPods struct {
+ // Bounded-sized list of signatures of pods that should avoid this node, sorted
+ // in timestamp order from oldest to newest. Size of the slice is unspecified.
+ // +optional
+ PreferAvoidPods []PreferAvoidPodsEntry `json:"preferAvoidPods,omitempty" protobuf:"bytes,1,rep,name=preferAvoidPods"`
+}
+
+// Describes a class of pods that should avoid this node.
+type PreferAvoidPodsEntry struct {
+ // The class of pods.
+ PodSignature PodSignature `json:"podSignature" protobuf:"bytes,1,opt,name=podSignature"`
+ // Time at which this entry was added to the list.
+ // +optional
+ EvictionTime metav1.Time `json:"evictionTime,omitempty" protobuf:"bytes,2,opt,name=evictionTime"`
+ // (brief) reason why this entry was added to the list.
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"`
+ // Human readable message indicating why this entry was added to the list.
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,4,opt,name=message"`
+}
+
+// Describes the class of pods that should avoid this node.
+// Exactly one field should be set.
+type PodSignature struct {
+ // Reference to controller whose pods should avoid this node.
+ // +optional
+ PodController *metav1.OwnerReference `json:"podController,omitempty" protobuf:"bytes,1,opt,name=podController"`
+}
+
+// Describe a container image
+type ContainerImage struct {
+ // Names by which this image is known.
+ // e.g. ["gcr.io/google_containers/hyperkube:v1.0.7", "dockerhub.io/google_containers/hyperkube:v1.0.7"]
+ Names []string `json:"names" protobuf:"bytes,1,rep,name=names"`
+ // The size of the image in bytes.
+ // +optional
+ SizeBytes int64 `json:"sizeBytes,omitempty" protobuf:"varint,2,opt,name=sizeBytes"`
+}
+
+type NodePhase string
+
+// These are the valid phases of node.
+const (
+ // NodePending means the node has been created/added by the system, but not configured.
+ NodePending NodePhase = "Pending"
+ // NodeRunning means the node has been configured and has Kubernetes components running.
+ NodeRunning NodePhase = "Running"
+ // NodeTerminated means the node has been removed from the cluster.
+ NodeTerminated NodePhase = "Terminated"
+)
+
+type NodeConditionType string
+
+// These are valid conditions of node. Currently, we don't have enough information to decide
+// node condition. In the future, we will add more. The proposed set of conditions are:
+// NodeReachable, NodeLive, NodeReady, NodeSchedulable, NodeRunnable.
+const (
+ // NodeReady means kubelet is healthy and ready to accept pods.
+ NodeReady NodeConditionType = "Ready"
+ // NodeOutOfDisk means the kubelet will not accept new pods due to insufficient free disk
+ // space on the node.
+ NodeOutOfDisk NodeConditionType = "OutOfDisk"
+ // NodeMemoryPressure means the kubelet is under pressure due to insufficient available memory.
+ NodeMemoryPressure NodeConditionType = "MemoryPressure"
+ // NodeDiskPressure means the kubelet is under pressure due to insufficient available disk.
+ NodeDiskPressure NodeConditionType = "DiskPressure"
+ // NodeNetworkUnavailable means that network for the node is not correctly configured.
+ NodeNetworkUnavailable NodeConditionType = "NetworkUnavailable"
+ // NodeInodePressure means the kubelet is under pressure due to insufficient available inodes.
+ NodeInodePressure NodeConditionType = "InodePressure"
+)
+
+// NodeCondition contains condition information for a node.
+type NodeCondition struct {
+ // Type of node condition.
+ Type NodeConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=NodeConditionType"`
+ // Status of the condition, one of True, False, Unknown.
+ Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"`
+ // Last time we got an update on a given condition.
+ // +optional
+ LastHeartbeatTime metav1.Time `json:"lastHeartbeatTime,omitempty" protobuf:"bytes,3,opt,name=lastHeartbeatTime"`
+ // Last time the condition transit from one status to another.
+ // +optional
+ LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
+ // (brief) reason for the condition's last transition.
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
+ // Human readable message indicating details about last transition.
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
+}
+
+type NodeAddressType string
+
+// These are valid address type of node.
+const (
+ NodeHostName NodeAddressType = "Hostname"
+ NodeExternalIP NodeAddressType = "ExternalIP"
+ NodeInternalIP NodeAddressType = "InternalIP"
+ NodeExternalDNS NodeAddressType = "ExternalDNS"
+ NodeInternalDNS NodeAddressType = "InternalDNS"
+)
+
+// NodeAddress contains information for the node's address.
+type NodeAddress struct {
+ // Node address type, one of Hostname, ExternalIP or InternalIP.
+ Type NodeAddressType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=NodeAddressType"`
+ // The node address.
+ Address string `json:"address" protobuf:"bytes,2,opt,name=address"`
+}
+
+// ResourceName is the name identifying various resources in a ResourceList.
+type ResourceName string
+
+// Resource names must be not more than 63 characters, consisting of upper- or lower-case alphanumeric characters,
+// with the -, _, and . characters allowed anywhere, except the first or last character.
+// The default convention, matching that for annotations, is to use lower-case names, with dashes, rather than
+// camel case, separating compound words.
+// Fully-qualified resource typenames are constructed from a DNS-style subdomain, followed by a slash `/` and a name.
+const (
+ // CPU, in cores. (500m = .5 cores)
+ ResourceCPU ResourceName = "cpu"
+ // Memory, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
+ ResourceMemory ResourceName = "memory"
+ // Volume size, in bytes (e,g. 5Gi = 5GiB = 5 * 1024 * 1024 * 1024)
+ ResourceStorage ResourceName = "storage"
+ // Local Storage for container overlay filesystem, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
+ // The resource name for ResourceStorageOverlay is alpha and it can change across releases.
+ ResourceStorageOverlay ResourceName = "storage.kubernetes.io/overlay"
+ // Local Storage for scratch space, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
+ // The resource name for ResourceStorageScratch is alpha and it can change across releases.
+ ResourceStorageScratch ResourceName = "storage.kubernetes.io/scratch"
+ // NVIDIA GPU, in devices. Alpha, might change: although fractional and allowing values >1, only one whole device per node is assigned.
+ ResourceNvidiaGPU ResourceName = "alpha.kubernetes.io/nvidia-gpu"
+ // Number of Pods that may be running on this Node: see ResourcePods
+)
+
+const (
+ // Namespace prefix for opaque counted resources (alpha).
+ ResourceOpaqueIntPrefix = "pod.alpha.kubernetes.io/opaque-int-resource-"
+)
+
+// ResourceList is a set of (resource name, quantity) pairs.
+type ResourceList map[ResourceName]resource.Quantity
+
+// +genclient=true
+// +nonNamespaced=true
+
+// Node is a worker node in Kubernetes.
+// Each node will have a unique identifier in the cache (i.e. in etcd).
+type Node struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines the behavior of a node.
+ // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec NodeSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Most recently observed status of the node.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status NodeStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// NodeList is the whole list of all Nodes which have been registered with master.
+type NodeList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of nodes
+ Items []Node `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// FinalizerName is the name identifying a finalizer during namespace lifecycle.
+type FinalizerName string
+
+// These are internal finalizer values to Kubernetes, must be qualified name unless defined here or
+// in metav1.
+const (
+ FinalizerKubernetes FinalizerName = "kubernetes"
+)
+
+// NamespaceSpec describes the attributes on a Namespace.
+type NamespaceSpec struct {
+ // Finalizers is an opaque list of values that must be empty to permanently remove object from storage.
+ // More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#finalizers
+ // +optional
+ Finalizers []FinalizerName `json:"finalizers,omitempty" protobuf:"bytes,1,rep,name=finalizers,casttype=FinalizerName"`
+}
+
+// NamespaceStatus is information about the current status of a Namespace.
+type NamespaceStatus struct {
+ // Phase is the current lifecycle phase of the namespace.
+ // More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#phases
+ // +optional
+ Phase NamespacePhase `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=NamespacePhase"`
+}
+
+type NamespacePhase string
+
+// These are the valid phases of a namespace.
+const (
+ // NamespaceActive means the namespace is available for use in the system
+ NamespaceActive NamespacePhase = "Active"
+ // NamespaceTerminating means the namespace is undergoing graceful termination
+ NamespaceTerminating NamespacePhase = "Terminating"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+
+// Namespace provides a scope for Names.
+// Use of multiple namespaces is optional.
+type Namespace struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines the behavior of the Namespace.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec NamespaceSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status describes the current status of a Namespace.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status NamespaceStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// NamespaceList is a list of Namespaces.
+type NamespaceList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of Namespace objects in the list.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
+ Items []Namespace `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// Binding ties one object to another; for example, a pod is bound to a node by a scheduler.
+// Deprecated in 1.7, please use the bindings subresource of pods instead.
+type Binding struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // The target object that you want to bind to the standard object.
+ Target ObjectReference `json:"target" protobuf:"bytes,2,opt,name=target"`
+}
+
+// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
+// +k8s:openapi-gen=false
+type Preconditions struct {
+ // Specifies the target UID.
+ // +optional
+ UID *types.UID `json:"uid,omitempty" protobuf:"bytes,1,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"`
+}
+
+// DeletionPropagation decides if a deletion will propagate to the dependents of the object, and how the garbage collector will handle the propagation.
+type DeletionPropagation string
+
+const (
+ // Orphans the dependents.
+ DeletePropagationOrphan DeletionPropagation = "Orphan"
+ // Deletes the object from the key-value store, the garbage collector will delete the dependents in the background.
+ DeletePropagationBackground DeletionPropagation = "Background"
+ // The object exists in the key-value store until the garbage collector deletes all the dependents whose ownerReference.blockOwnerDeletion=true from the key-value store.
+ // API sever will put the "DeletingDependents" finalizer on the object, and sets its deletionTimestamp.
+ // This policy is cascading, i.e., the dependents will be deleted with Foreground.
+ DeletePropagationForeground DeletionPropagation = "Foreground"
+)
+
+// DeleteOptions may be provided when deleting an API object
+// DEPRECATED: This type has been moved to meta/v1 and will be removed soon.
+// +k8s:openapi-gen=false
+type DeleteOptions struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // The duration in seconds before the object should be deleted. Value must be non-negative integer.
+ // The value zero indicates delete immediately. If this value is nil, the default grace period for the
+ // specified type will be used.
+ // Defaults to a per object value if not specified. zero means delete immediately.
+ // +optional
+ GracePeriodSeconds *int64 `json:"gracePeriodSeconds,omitempty" protobuf:"varint,1,opt,name=gracePeriodSeconds"`
+
+ // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be
+ // returned.
+ // +optional
+ Preconditions *Preconditions `json:"preconditions,omitempty" protobuf:"bytes,2,opt,name=preconditions"`
+
+ // Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7.
+ // Should the dependent objects be orphaned. If true/false, the "orphan"
+ // finalizer will be added to/removed from the object's finalizers list.
+ // Either this field or PropagationPolicy may be set, but not both.
+ // +optional
+ OrphanDependents *bool `json:"orphanDependents,omitempty" protobuf:"varint,3,opt,name=orphanDependents"`
+
+ // Whether and how garbage collection will be performed.
+ // Either this field or OrphanDependents may be set, but not both.
+ // The default policy is decided by the existing finalizer set in the
+ // metadata.finalizers and the resource-specific default policy.
+ // +optional
+ PropagationPolicy *DeletionPropagation `protobuf:"bytes,4,opt,name=propagationPolicy,casttype=DeletionPropagation"`
+}
+
+// ListOptions is the query options to a standard REST list call.
+// DEPRECATED: This type has been moved to meta/v1 and will be removed soon.
+// +k8s:openapi-gen=false
+type ListOptions struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // A selector to restrict the list of returned objects by their labels.
+ // Defaults to everything.
+ // +optional
+ LabelSelector string `json:"labelSelector,omitempty" protobuf:"bytes,1,opt,name=labelSelector"`
+ // A selector to restrict the list of returned objects by their fields.
+ // Defaults to everything.
+ // +optional
+ FieldSelector string `json:"fieldSelector,omitempty" protobuf:"bytes,2,opt,name=fieldSelector"`
+ // If true, partially initialized resources are included in the response.
+ // +optional
+ IncludeUninitialized bool `json:"includeUninitialized,omitempty" protobuf:"varint,6,opt,name=includeUninitialized"`
+ // Watch for changes to the described resources and return them as a stream of
+ // add, update, and remove notifications. Specify resourceVersion.
+ // +optional
+ Watch bool `json:"watch,omitempty" protobuf:"varint,3,opt,name=watch"`
+ // When specified with a watch call, shows changes that occur after that particular version of a resource.
+ // Defaults to changes from the beginning of history.
+ // When specified for list:
+ // - if unset, then the result is returned from remote storage based on quorum-read flag;
+ // - if it's 0, then we simply return what we currently have in cache, no guarantee;
+ // - if set to non zero, then the result is at least as fresh as given rv.
+ // +optional
+ ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,4,opt,name=resourceVersion"`
+ // Timeout for the list/watch call.
+ // +optional
+ TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty" protobuf:"varint,5,opt,name=timeoutSeconds"`
+}
+
+// PodLogOptions is the query options for a Pod's logs REST call.
+type PodLogOptions struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // The container for which to stream logs. Defaults to only container if there is one container in the pod.
+ // +optional
+ Container string `json:"container,omitempty" protobuf:"bytes,1,opt,name=container"`
+ // Follow the log stream of the pod. Defaults to false.
+ // +optional
+ Follow bool `json:"follow,omitempty" protobuf:"varint,2,opt,name=follow"`
+ // Return previous terminated container logs. Defaults to false.
+ // +optional
+ Previous bool `json:"previous,omitempty" protobuf:"varint,3,opt,name=previous"`
+ // A relative time in seconds before the current time from which to show logs. If this value
+ // precedes the time a pod was started, only logs since the pod start will be returned.
+ // If this value is in the future, no logs will be returned.
+ // Only one of sinceSeconds or sinceTime may be specified.
+ // +optional
+ SinceSeconds *int64 `json:"sinceSeconds,omitempty" protobuf:"varint,4,opt,name=sinceSeconds"`
+ // An RFC3339 timestamp from which to show logs. If this value
+ // precedes the time a pod was started, only logs since the pod start will be returned.
+ // If this value is in the future, no logs will be returned.
+ // Only one of sinceSeconds or sinceTime may be specified.
+ // +optional
+ SinceTime *metav1.Time `json:"sinceTime,omitempty" protobuf:"bytes,5,opt,name=sinceTime"`
+ // If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line
+ // of log output. Defaults to false.
+ // +optional
+ Timestamps bool `json:"timestamps,omitempty" protobuf:"varint,6,opt,name=timestamps"`
+ // If set, the number of lines from the end of the logs to show. If not specified,
+ // logs are shown from the creation of the container or sinceSeconds or sinceTime
+ // +optional
+ TailLines *int64 `json:"tailLines,omitempty" protobuf:"varint,7,opt,name=tailLines"`
+ // If set, the number of bytes to read from the server before terminating the
+ // log output. This may not display a complete final line of logging, and may return
+ // slightly more or slightly less than the specified limit.
+ // +optional
+ LimitBytes *int64 `json:"limitBytes,omitempty" protobuf:"varint,8,opt,name=limitBytes"`
+}
+
+// PodAttachOptions is the query options to a Pod's remote attach call.
+// ---
+// TODO: merge w/ PodExecOptions below for stdin, stdout, etc
+// and also when we cut V2, we should export a "StreamOptions" or somesuch that contains Stdin, Stdout, Stder and TTY
+type PodAttachOptions struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // Stdin if true, redirects the standard input stream of the pod for this call.
+ // Defaults to false.
+ // +optional
+ Stdin bool `json:"stdin,omitempty" protobuf:"varint,1,opt,name=stdin"`
+
+ // Stdout if true indicates that stdout is to be redirected for the attach call.
+ // Defaults to true.
+ // +optional
+ Stdout bool `json:"stdout,omitempty" protobuf:"varint,2,opt,name=stdout"`
+
+ // Stderr if true indicates that stderr is to be redirected for the attach call.
+ // Defaults to true.
+ // +optional
+ Stderr bool `json:"stderr,omitempty" protobuf:"varint,3,opt,name=stderr"`
+
+ // TTY if true indicates that a tty will be allocated for the attach call.
+ // This is passed through the container runtime so the tty
+ // is allocated on the worker node by the container runtime.
+ // Defaults to false.
+ // +optional
+ TTY bool `json:"tty,omitempty" protobuf:"varint,4,opt,name=tty"`
+
+ // The container in which to execute the command.
+ // Defaults to only container if there is only one container in the pod.
+ // +optional
+ Container string `json:"container,omitempty" protobuf:"bytes,5,opt,name=container"`
+}
+
+// PodExecOptions is the query options to a Pod's remote exec call.
+// ---
+// TODO: This is largely identical to PodAttachOptions above, make sure they stay in sync and see about merging
+// and also when we cut V2, we should export a "StreamOptions" or somesuch that contains Stdin, Stdout, Stder and TTY
+type PodExecOptions struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // Redirect the standard input stream of the pod for this call.
+ // Defaults to false.
+ // +optional
+ Stdin bool `json:"stdin,omitempty" protobuf:"varint,1,opt,name=stdin"`
+
+ // Redirect the standard output stream of the pod for this call.
+ // Defaults to true.
+ // +optional
+ Stdout bool `json:"stdout,omitempty" protobuf:"varint,2,opt,name=stdout"`
+
+ // Redirect the standard error stream of the pod for this call.
+ // Defaults to true.
+ // +optional
+ Stderr bool `json:"stderr,omitempty" protobuf:"varint,3,opt,name=stderr"`
+
+ // TTY if true indicates that a tty will be allocated for the exec call.
+ // Defaults to false.
+ // +optional
+ TTY bool `json:"tty,omitempty" protobuf:"varint,4,opt,name=tty"`
+
+ // Container in which to execute the command.
+ // Defaults to only container if there is only one container in the pod.
+ // +optional
+ Container string `json:"container,omitempty" protobuf:"bytes,5,opt,name=container"`
+
+ // Command is the remote command to execute. argv array. Not executed within a shell.
+ Command []string `json:"command" protobuf:"bytes,6,rep,name=command"`
+}
+
+// PodPortForwardOptions is the query options to a Pod's port forward call
+// when using WebSockets.
+// The `port` query parameter must specify the port or
+// ports (comma separated) to forward over.
+// Port forwarding over SPDY does not use these options. It requires the port
+// to be passed in the `port` header as part of request.
+type PodPortForwardOptions struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // List of ports to forward
+ // Required when using WebSockets
+ // +optional
+ Ports []int32 `json:"ports,omitempty" protobuf:"varint,1,rep,name=ports"`
+}
+
+// PodProxyOptions is the query options to a Pod's proxy call.
+type PodProxyOptions struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // Path is the URL path to use for the current proxy request to pod.
+ // +optional
+ Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"`
+}
+
+// NodeProxyOptions is the query options to a Node's proxy call.
+type NodeProxyOptions struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // Path is the URL path to use for the current proxy request to node.
+ // +optional
+ Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"`
+}
+
+// ServiceProxyOptions is the query options to a Service's proxy call.
+type ServiceProxyOptions struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // Path is the part of URLs that include service endpoints, suffixes,
+ // and parameters to use for the current proxy request to service.
+ // For example, the whole request URL is
+ // http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy.
+ // Path is _search?q=user:kimchy.
+ // +optional
+ Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"`
+}
+
+// ObjectReference contains enough information to let you inspect or modify the referred object.
+type ObjectReference struct {
+ // Kind of the referent.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ Kind string `json:"kind,omitempty" protobuf:"bytes,1,opt,name=kind"`
+ // Namespace of the referent.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
+ // +optional
+ Namespace string `json:"namespace,omitempty" protobuf:"bytes,2,opt,name=namespace"`
+ // Name of the referent.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ // +optional
+ Name string `json:"name,omitempty" protobuf:"bytes,3,opt,name=name"`
+ // UID of the referent.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
+ // +optional
+ UID types.UID `json:"uid,omitempty" protobuf:"bytes,4,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"`
+ // API version of the referent.
+ // +optional
+ APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,5,opt,name=apiVersion"`
+ // Specific resourceVersion to which this reference is made, if any.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
+ // +optional
+ ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,6,opt,name=resourceVersion"`
+
+ // If referring to a piece of an object instead of an entire object, this string
+ // should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
+ // For example, if the object reference is to a container within a pod, this would take on a value like:
+ // "spec.containers{name}" (where "name" refers to the name of the container that triggered
+ // the event) or if no container name is specified "spec.containers[2]" (container with
+ // index 2 in this pod). This syntax is chosen only to have some well-defined way of
+ // referencing a part of an object.
+ // TODO: this design is not final and this field is subject to change in the future.
+ // +optional
+ FieldPath string `json:"fieldPath,omitempty" protobuf:"bytes,7,opt,name=fieldPath"`
+}
+
+// LocalObjectReference contains enough information to let you locate the
+// referenced object inside the same namespace.
+type LocalObjectReference struct {
+ // Name of the referent.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ // TODO: Add other useful fields. apiVersion, kind, uid?
+ // +optional
+ Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
+}
+
+// SerializedReference is a reference to serialized object.
+type SerializedReference struct {
+ metav1.TypeMeta `json:",inline"`
+ // The reference to an object in the system.
+ // +optional
+ Reference ObjectReference `json:"reference,omitempty" protobuf:"bytes,1,opt,name=reference"`
+}
+
+// EventSource contains information for an event.
+type EventSource struct {
+ // Component from which the event is generated.
+ // +optional
+ Component string `json:"component,omitempty" protobuf:"bytes,1,opt,name=component"`
+ // Node name on which the event is generated.
+ // +optional
+ Host string `json:"host,omitempty" protobuf:"bytes,2,opt,name=host"`
+}
+
+// Valid values for event types (new types could be added in future)
+const (
+ // Information only and will not cause any problems
+ EventTypeNormal string = "Normal"
+ // These events are to warn that something might go wrong
+ EventTypeWarning string = "Warning"
+)
+
+// +genclient=true
+
+// Event is a report of an event somewhere in the cluster.
+// TODO: Decide whether to store these separately or with the object they apply to.
+type Event struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ metav1.ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"`
+
+ // The object that this event is about.
+ InvolvedObject ObjectReference `json:"involvedObject" protobuf:"bytes,2,opt,name=involvedObject"`
+
+ // This should be a short, machine understandable string that gives the reason
+ // for the transition into the object's current status.
+ // TODO: provide exact specification for format.
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"`
+
+ // A human-readable description of the status of this operation.
+ // TODO: decide on maximum length.
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,4,opt,name=message"`
+
+ // The component reporting this event. Should be a short machine understandable string.
+ // +optional
+ Source EventSource `json:"source,omitempty" protobuf:"bytes,5,opt,name=source"`
+
+ // The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)
+ // +optional
+ FirstTimestamp metav1.Time `json:"firstTimestamp,omitempty" protobuf:"bytes,6,opt,name=firstTimestamp"`
+
+ // The time at which the most recent occurrence of this event was recorded.
+ // +optional
+ LastTimestamp metav1.Time `json:"lastTimestamp,omitempty" protobuf:"bytes,7,opt,name=lastTimestamp"`
+
+ // The number of times this event has occurred.
+ // +optional
+ Count int32 `json:"count,omitempty" protobuf:"varint,8,opt,name=count"`
+
+ // Type of this event (Normal, Warning), new types could be added in the future
+ // +optional
+ Type string `json:"type,omitempty" protobuf:"bytes,9,opt,name=type"`
+}
+
+// EventList is a list of events.
+type EventList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of events
+ Items []Event `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// List holds a list of objects, which may not be known by the server.
+type List struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of objects
+ Items []runtime.RawExtension `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// LimitType is a type of object that is limited
+type LimitType string
+
+const (
+ // Limit that applies to all pods in a namespace
+ LimitTypePod LimitType = "Pod"
+ // Limit that applies to all containers in a namespace
+ LimitTypeContainer LimitType = "Container"
+ // Limit that applies to all persistent volume claims in a namespace
+ LimitTypePersistentVolumeClaim LimitType = "PersistentVolumeClaim"
+)
+
+// LimitRangeItem defines a min/max usage limit for any resource that matches on kind.
+type LimitRangeItem struct {
+ // Type of resource that this limit applies to.
+ // +optional
+ Type LimitType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=LimitType"`
+ // Max usage constraints on this kind by resource name.
+ // +optional
+ Max ResourceList `json:"max,omitempty" protobuf:"bytes,2,rep,name=max,casttype=ResourceList,castkey=ResourceName"`
+ // Min usage constraints on this kind by resource name.
+ // +optional
+ Min ResourceList `json:"min,omitempty" protobuf:"bytes,3,rep,name=min,casttype=ResourceList,castkey=ResourceName"`
+ // Default resource requirement limit value by resource name if resource limit is omitted.
+ // +optional
+ Default ResourceList `json:"default,omitempty" protobuf:"bytes,4,rep,name=default,casttype=ResourceList,castkey=ResourceName"`
+ // DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.
+ // +optional
+ DefaultRequest ResourceList `json:"defaultRequest,omitempty" protobuf:"bytes,5,rep,name=defaultRequest,casttype=ResourceList,castkey=ResourceName"`
+ // MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.
+ // +optional
+ MaxLimitRequestRatio ResourceList `json:"maxLimitRequestRatio,omitempty" protobuf:"bytes,6,rep,name=maxLimitRequestRatio,casttype=ResourceList,castkey=ResourceName"`
+}
+
+// LimitRangeSpec defines a min/max usage limit for resources that match on kind.
+type LimitRangeSpec struct {
+ // Limits is the list of LimitRangeItem objects that are enforced.
+ Limits []LimitRangeItem `json:"limits" protobuf:"bytes,1,rep,name=limits"`
+}
+
+// +genclient=true
+
+// LimitRange sets resource usage limits for each kind of resource in a Namespace.
+type LimitRange struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines the limits enforced.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec LimitRangeSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+}
+
+// LimitRangeList is a list of LimitRange items.
+type LimitRangeList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of LimitRange objects.
+ // More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_limit_range.md
+ Items []LimitRange `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// The following identify resource constants for Kubernetes object types
+const (
+ // Pods, number
+ ResourcePods ResourceName = "pods"
+ // Services, number
+ ResourceServices ResourceName = "services"
+ // ReplicationControllers, number
+ ResourceReplicationControllers ResourceName = "replicationcontrollers"
+ // ResourceQuotas, number
+ ResourceQuotas ResourceName = "resourcequotas"
+ // ResourceSecrets, number
+ ResourceSecrets ResourceName = "secrets"
+ // ResourceConfigMaps, number
+ ResourceConfigMaps ResourceName = "configmaps"
+ // ResourcePersistentVolumeClaims, number
+ ResourcePersistentVolumeClaims ResourceName = "persistentvolumeclaims"
+ // ResourceServicesNodePorts, number
+ ResourceServicesNodePorts ResourceName = "services.nodeports"
+ // ResourceServicesLoadBalancers, number
+ ResourceServicesLoadBalancers ResourceName = "services.loadbalancers"
+ // CPU request, in cores. (500m = .5 cores)
+ ResourceRequestsCPU ResourceName = "requests.cpu"
+ // Memory request, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
+ ResourceRequestsMemory ResourceName = "requests.memory"
+ // Storage request, in bytes
+ ResourceRequestsStorage ResourceName = "requests.storage"
+ // CPU limit, in cores. (500m = .5 cores)
+ ResourceLimitsCPU ResourceName = "limits.cpu"
+ // Memory limit, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
+ ResourceLimitsMemory ResourceName = "limits.memory"
+)
+
+// A ResourceQuotaScope defines a filter that must match each object tracked by a quota
+type ResourceQuotaScope string
+
+const (
+ // Match all pod objects where spec.activeDeadlineSeconds
+ ResourceQuotaScopeTerminating ResourceQuotaScope = "Terminating"
+ // Match all pod objects where !spec.activeDeadlineSeconds
+ ResourceQuotaScopeNotTerminating ResourceQuotaScope = "NotTerminating"
+ // Match all pod objects that have best effort quality of service
+ ResourceQuotaScopeBestEffort ResourceQuotaScope = "BestEffort"
+ // Match all pod objects that do not have best effort quality of service
+ ResourceQuotaScopeNotBestEffort ResourceQuotaScope = "NotBestEffort"
+)
+
+// ResourceQuotaSpec defines the desired hard limits to enforce for Quota.
+type ResourceQuotaSpec struct {
+ // Hard is the set of desired hard limits for each named resource.
+ // More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md
+ // +optional
+ Hard ResourceList `json:"hard,omitempty" protobuf:"bytes,1,rep,name=hard,casttype=ResourceList,castkey=ResourceName"`
+ // A collection of filters that must match each object tracked by a quota.
+ // If not specified, the quota matches all objects.
+ // +optional
+ Scopes []ResourceQuotaScope `json:"scopes,omitempty" protobuf:"bytes,2,rep,name=scopes,casttype=ResourceQuotaScope"`
+}
+
+// ResourceQuotaStatus defines the enforced hard limits and observed use.
+type ResourceQuotaStatus struct {
+ // Hard is the set of enforced hard limits for each named resource.
+ // More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md
+ // +optional
+ Hard ResourceList `json:"hard,omitempty" protobuf:"bytes,1,rep,name=hard,casttype=ResourceList,castkey=ResourceName"`
+ // Used is the current observed total usage of the resource in the namespace.
+ // +optional
+ Used ResourceList `json:"used,omitempty" protobuf:"bytes,2,rep,name=used,casttype=ResourceList,castkey=ResourceName"`
+}
+
+// +genclient=true
+
+// ResourceQuota sets aggregate quota restrictions enforced per namespace
+type ResourceQuota struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines the desired quota.
+ // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec ResourceQuotaSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status defines the actual enforced quota and its current usage.
+ // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status ResourceQuotaStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// ResourceQuotaList is a list of ResourceQuota items.
+type ResourceQuotaList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of ResourceQuota objects.
+ // More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md
+ Items []ResourceQuota `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// +genclient=true
+
+// Secret holds secret data of a certain type. The total bytes of the values in
+// the Data field must be less than MaxSecretSize bytes.
+type Secret struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Data contains the secret data. Each key must consist of alphanumeric
+ // characters, '-', '_' or '.'. The serialized form of the secret data is a
+ // base64 encoded string, representing the arbitrary (possibly non-string)
+ // data value here. Described in https://tools.ietf.org/html/rfc4648#section-4
+ // +optional
+ Data map[string][]byte `json:"data,omitempty" protobuf:"bytes,2,rep,name=data"`
+
+ // stringData allows specifying non-binary secret data in string form.
+ // It is provided as a write-only convenience method.
+ // All keys and values are merged into the data field on write, overwriting any existing values.
+ // It is never output when reading from the API.
+ // +k8s:conversion-gen=false
+ // +optional
+ StringData map[string]string `json:"stringData,omitempty" protobuf:"bytes,4,rep,name=stringData"`
+
+ // Used to facilitate programmatic handling of secret data.
+ // +optional
+ Type SecretType `json:"type,omitempty" protobuf:"bytes,3,opt,name=type,casttype=SecretType"`
+}
+
+const MaxSecretSize = 1 * 1024 * 1024
+
+type SecretType string
+
+const (
+ // SecretTypeOpaque is the default. Arbitrary user-defined data
+ SecretTypeOpaque SecretType = "Opaque"
+
+ // SecretTypeServiceAccountToken contains a token that identifies a service account to the API
+ //
+ // Required fields:
+ // - Secret.Annotations["kubernetes.io/service-account.name"] - the name of the ServiceAccount the token identifies
+ // - Secret.Annotations["kubernetes.io/service-account.uid"] - the UID of the ServiceAccount the token identifies
+ // - Secret.Data["token"] - a token that identifies the service account to the API
+ SecretTypeServiceAccountToken SecretType = "kubernetes.io/service-account-token"
+
+ // ServiceAccountNameKey is the key of the required annotation for SecretTypeServiceAccountToken secrets
+ ServiceAccountNameKey = "kubernetes.io/service-account.name"
+ // ServiceAccountUIDKey is the key of the required annotation for SecretTypeServiceAccountToken secrets
+ ServiceAccountUIDKey = "kubernetes.io/service-account.uid"
+ // ServiceAccountTokenKey is the key of the required data for SecretTypeServiceAccountToken secrets
+ ServiceAccountTokenKey = "token"
+ // ServiceAccountKubeconfigKey is the key of the optional kubeconfig data for SecretTypeServiceAccountToken secrets
+ ServiceAccountKubeconfigKey = "kubernetes.kubeconfig"
+ // ServiceAccountRootCAKey is the key of the optional root certificate authority for SecretTypeServiceAccountToken secrets
+ ServiceAccountRootCAKey = "ca.crt"
+ // ServiceAccountNamespaceKey is the key of the optional namespace to use as the default for namespaced API calls
+ ServiceAccountNamespaceKey = "namespace"
+
+ // SecretTypeDockercfg contains a dockercfg file that follows the same format rules as ~/.dockercfg
+ //
+ // Required fields:
+ // - Secret.Data[".dockercfg"] - a serialized ~/.dockercfg file
+ SecretTypeDockercfg SecretType = "kubernetes.io/dockercfg"
+
+ // DockerConfigKey is the key of the required data for SecretTypeDockercfg secrets
+ DockerConfigKey = ".dockercfg"
+
+ // SecretTypeDockerConfigJson contains a dockercfg file that follows the same format rules as ~/.docker/config.json
+ //
+ // Required fields:
+ // - Secret.Data[".dockerconfigjson"] - a serialized ~/.docker/config.json file
+ SecretTypeDockerConfigJson SecretType = "kubernetes.io/dockerconfigjson"
+
+ // DockerConfigJsonKey is the key of the required data for SecretTypeDockerConfigJson secrets
+ DockerConfigJsonKey = ".dockerconfigjson"
+
+ // SecretTypeBasicAuth contains data needed for basic authentication.
+ //
+ // Required at least one of fields:
+ // - Secret.Data["username"] - username used for authentication
+ // - Secret.Data["password"] - password or token needed for authentication
+ SecretTypeBasicAuth SecretType = "kubernetes.io/basic-auth"
+
+ // BasicAuthUsernameKey is the key of the username for SecretTypeBasicAuth secrets
+ BasicAuthUsernameKey = "username"
+ // BasicAuthPasswordKey is the key of the password or token for SecretTypeBasicAuth secrets
+ BasicAuthPasswordKey = "password"
+
+ // SecretTypeSSHAuth contains data needed for SSH authetication.
+ //
+ // Required field:
+ // - Secret.Data["ssh-privatekey"] - private SSH key needed for authentication
+ SecretTypeSSHAuth SecretType = "kubernetes.io/ssh-auth"
+
+ // SSHAuthPrivateKey is the key of the required SSH private key for SecretTypeSSHAuth secrets
+ SSHAuthPrivateKey = "ssh-privatekey"
+ // SecretTypeTLS contains information about a TLS client or server secret. It
+ // is primarily used with TLS termination of the Ingress resource, but may be
+ // used in other types.
+ //
+ // Required fields:
+ // - Secret.Data["tls.key"] - TLS private key.
+ // Secret.Data["tls.crt"] - TLS certificate.
+ // TODO: Consider supporting different formats, specifying CA/destinationCA.
+ SecretTypeTLS SecretType = "kubernetes.io/tls"
+
+ // TLSCertKey is the key for tls certificates in a TLS secert.
+ TLSCertKey = "tls.crt"
+ // TLSPrivateKeyKey is the key for the private key field in a TLS secret.
+ TLSPrivateKeyKey = "tls.key"
+)
+
+// SecretList is a list of Secret.
+type SecretList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of secret objects.
+ // More info: https://kubernetes.io/docs/concepts/configuration/secret
+ Items []Secret `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// +genclient=true
+
+// ConfigMap holds configuration data for pods to consume.
+type ConfigMap struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Data contains the configuration data.
+ // Each key must consist of alphanumeric characters, '-', '_' or '.'.
+ // +optional
+ Data map[string]string `json:"data,omitempty" protobuf:"bytes,2,rep,name=data"`
+}
+
+// ConfigMapList is a resource containing a list of ConfigMap objects.
+type ConfigMapList struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of ConfigMaps.
+ Items []ConfigMap `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// Type and constants for component health validation.
+type ComponentConditionType string
+
+// These are the valid conditions for the component.
+const (
+ ComponentHealthy ComponentConditionType = "Healthy"
+)
+
+// Information about the condition of a component.
+type ComponentCondition struct {
+ // Type of condition for a component.
+ // Valid value: "Healthy"
+ Type ComponentConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=ComponentConditionType"`
+ // Status of the condition for a component.
+ // Valid values for "Healthy": "True", "False", or "Unknown".
+ Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"`
+ // Message about the condition for a component.
+ // For example, information about a health check.
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"`
+ // Condition error code for a component.
+ // For example, a health check error code.
+ // +optional
+ Error string `json:"error,omitempty" protobuf:"bytes,4,opt,name=error"`
+}
+
+// +genclient=true
+// +nonNamespaced=true
+
+// ComponentStatus (and ComponentStatusList) holds the cluster validation info.
+type ComponentStatus struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of component conditions observed
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ Conditions []ComponentCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=conditions"`
+}
+
+// Status of all the conditions for the component as a list of ComponentStatus objects.
+type ComponentStatusList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of ComponentStatus objects.
+ Items []ComponentStatus `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// DownwardAPIVolumeSource represents a volume containing downward API info.
+// Downward API volumes support ownership management and SELinux relabeling.
+type DownwardAPIVolumeSource struct {
+ // Items is a list of downward API volume file
+ // +optional
+ Items []DownwardAPIVolumeFile `json:"items,omitempty" protobuf:"bytes,1,rep,name=items"`
+ // Optional: mode bits to use on created files by default. Must be a
+ // value between 0 and 0777. Defaults to 0644.
+ // Directories within the path are not affected by this setting.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"varint,2,opt,name=defaultMode"`
+}
+
+const (
+ DownwardAPIVolumeSourceDefaultMode int32 = 0644
+)
+
+// DownwardAPIVolumeFile represents information to create the file containing the pod field
+type DownwardAPIVolumeFile struct {
+ // Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'
+ Path string `json:"path" protobuf:"bytes,1,opt,name=path"`
+ // Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.
+ // +optional
+ FieldRef *ObjectFieldSelector `json:"fieldRef,omitempty" protobuf:"bytes,2,opt,name=fieldRef"`
+ // Selects a resource of the container: only resources limits and requests
+ // (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
+ // +optional
+ ResourceFieldRef *ResourceFieldSelector `json:"resourceFieldRef,omitempty" protobuf:"bytes,3,opt,name=resourceFieldRef"`
+ // Optional: mode bits to use on this file, must be a value between 0
+ // and 0777. If not specified, the volume defaultMode will be used.
+ // This might be in conflict with other options that affect the file
+ // mode, like fsGroup, and the result can be other mode bits set.
+ // +optional
+ Mode *int32 `json:"mode,omitempty" protobuf:"varint,4,opt,name=mode"`
+}
+
+// Represents downward API info for projecting into a projected volume.
+// Note that this is identical to a downwardAPI volume source without the default
+// mode.
+type DownwardAPIProjection struct {
+ // Items is a list of DownwardAPIVolume file
+ // +optional
+ Items []DownwardAPIVolumeFile `json:"items,omitempty" protobuf:"bytes,1,rep,name=items"`
+}
+
+// SecurityContext holds security configuration that will be applied to a container.
+// Some fields are present in both SecurityContext and PodSecurityContext. When both
+// are set, the values in SecurityContext take precedence.
+type SecurityContext struct {
+ // The capabilities to add/drop when running containers.
+ // Defaults to the default set of capabilities granted by the container runtime.
+ // +optional
+ Capabilities *Capabilities `json:"capabilities,omitempty" protobuf:"bytes,1,opt,name=capabilities"`
+ // Run container in privileged mode.
+ // Processes in privileged containers are essentially equivalent to root on the host.
+ // Defaults to false.
+ // +optional
+ Privileged *bool `json:"privileged,omitempty" protobuf:"varint,2,opt,name=privileged"`
+ // The SELinux context to be applied to the container.
+ // If unspecified, the container runtime will allocate a random SELinux context for each
+ // container. May also be set in PodSecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence.
+ // +optional
+ SELinuxOptions *SELinuxOptions `json:"seLinuxOptions,omitempty" protobuf:"bytes,3,opt,name=seLinuxOptions"`
+ // The UID to run the entrypoint of the container process.
+ // Defaults to user specified in image metadata if unspecified.
+ // May also be set in PodSecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence.
+ // +optional
+ RunAsUser *int64 `json:"runAsUser,omitempty" protobuf:"varint,4,opt,name=runAsUser"`
+ // Indicates that the container must run as a non-root user.
+ // If true, the Kubelet will validate the image at runtime to ensure that it
+ // does not run as UID 0 (root) and fail to start the container if it does.
+ // If unset or false, no such validation will be performed.
+ // May also be set in PodSecurityContext. If set in both SecurityContext and
+ // PodSecurityContext, the value specified in SecurityContext takes precedence.
+ // +optional
+ RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" protobuf:"varint,5,opt,name=runAsNonRoot"`
+ // Whether this container has a read-only root filesystem.
+ // Default is false.
+ // +optional
+ ReadOnlyRootFilesystem *bool `json:"readOnlyRootFilesystem,omitempty" protobuf:"varint,6,opt,name=readOnlyRootFilesystem"`
+}
+
+// SELinuxOptions are the labels to be applied to the container
+type SELinuxOptions struct {
+ // User is a SELinux user label that applies to the container.
+ // +optional
+ User string `json:"user,omitempty" protobuf:"bytes,1,opt,name=user"`
+ // Role is a SELinux role label that applies to the container.
+ // +optional
+ Role string `json:"role,omitempty" protobuf:"bytes,2,opt,name=role"`
+ // Type is a SELinux type label that applies to the container.
+ // +optional
+ Type string `json:"type,omitempty" protobuf:"bytes,3,opt,name=type"`
+ // Level is SELinux level label that applies to the container.
+ // +optional
+ Level string `json:"level,omitempty" protobuf:"bytes,4,opt,name=level"`
+}
+
+// RangeAllocation is not a public type.
+type RangeAllocation struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Range is string that identifies the range represented by 'data'.
+ Range string `json:"range" protobuf:"bytes,2,opt,name=range"`
+ // Data is a bit array containing all allocated addresses in the previous segment.
+ Data []byte `json:"data" protobuf:"bytes,3,opt,name=data"`
+}
+
+const (
+ // "default-scheduler" is the name of default scheduler.
+ DefaultSchedulerName = "default-scheduler"
+
+ // RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule
+ // corresponding to every RequiredDuringScheduling affinity rule.
+ // When the --hard-pod-affinity-weight scheduler flag is not specified,
+ // DefaultHardPodAffinityWeight defines the weight of the implicit PreferredDuringScheduling affinity rule.
+ DefaultHardPodAffinitySymmetricWeight int = 1
+)
+
+// Sysctl defines a kernel parameter to be set
+type Sysctl struct {
+ // Name of a property to set
+ Name string `protobuf:"bytes,1,opt,name=name"`
+ // Value of a property to set
+ Value string `protobuf:"bytes,2,opt,name=value"`
+}
+
+// NodeResources is an object for conveying resource information about a node.
+// see http://releases.k8s.io/HEAD/docs/design/resources.md for more details.
+type NodeResources struct {
+ // Capacity represents the available resources of a node
+ Capacity ResourceList `protobuf:"bytes,1,rep,name=capacity,casttype=ResourceList,castkey=ResourceName"`
+}
+
+const (
+ // Enable stdin for remote command execution
+ ExecStdinParam = "input"
+ // Enable stdout for remote command execution
+ ExecStdoutParam = "output"
+ // Enable stderr for remote command execution
+ ExecStderrParam = "error"
+ // Enable TTY for remote command execution
+ ExecTTYParam = "tty"
+ // Command to run for remote command execution
+ ExecCommandParamm = "command"
+
+ // Name of header that specifies stream type
+ StreamType = "streamType"
+ // Value for streamType header for stdin stream
+ StreamTypeStdin = "stdin"
+ // Value for streamType header for stdout stream
+ StreamTypeStdout = "stdout"
+ // Value for streamType header for stderr stream
+ StreamTypeStderr = "stderr"
+ // Value for streamType header for data stream
+ StreamTypeData = "data"
+ // Value for streamType header for error stream
+ StreamTypeError = "error"
+ // Value for streamType header for terminal resize stream
+ StreamTypeResize = "resize"
+
+ // Name of header that specifies the port being forwarded
+ PortHeader = "port"
+ // Name of header that specifies a request ID used to associate the error
+ // and data streams for a single forwarded connection
+ PortForwardRequestIDHeader = "requestID"
+)
diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/pkg/api/v1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..f78b69307
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/v1/types_swagger_doc_generated.go
@@ -0,0 +1,2039 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_AWSElasticBlockStoreVolumeSource = map[string]string{
+ "": "Represents a Persistent Disk resource in AWS.\n\nAn AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling.",
+ "volumeID": "Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore",
+ "fsType": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore",
+ "partition": "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty).",
+ "readOnly": "Specify \"true\" to force and set the ReadOnly property in VolumeMounts to \"true\". If omitted, the default is \"false\". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore",
+}
+
+func (AWSElasticBlockStoreVolumeSource) SwaggerDoc() map[string]string {
+ return map_AWSElasticBlockStoreVolumeSource
+}
+
+var map_Affinity = map[string]string{
+ "": "Affinity is a group of affinity scheduling rules.",
+ "nodeAffinity": "Describes node affinity scheduling rules for the pod.",
+ "podAffinity": "Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).",
+ "podAntiAffinity": "Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).",
+}
+
+func (Affinity) SwaggerDoc() map[string]string {
+ return map_Affinity
+}
+
+var map_AttachedVolume = map[string]string{
+ "": "AttachedVolume describes a volume attached to a node",
+ "name": "Name of the attached volume",
+ "devicePath": "DevicePath represents the device path where the volume should be available",
+}
+
+func (AttachedVolume) SwaggerDoc() map[string]string {
+ return map_AttachedVolume
+}
+
+var map_AvoidPods = map[string]string{
+ "": "AvoidPods describes pods that should avoid this node. This is the value for a Node annotation with key scheduler.alpha.kubernetes.io/preferAvoidPods and will eventually become a field of NodeStatus.",
+ "preferAvoidPods": "Bounded-sized list of signatures of pods that should avoid this node, sorted in timestamp order from oldest to newest. Size of the slice is unspecified.",
+}
+
+func (AvoidPods) SwaggerDoc() map[string]string {
+ return map_AvoidPods
+}
+
+var map_AzureDiskVolumeSource = map[string]string{
+ "": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.",
+ "diskName": "The Name of the data disk in the blob storage",
+ "diskURI": "The URI the data disk in the blob storage",
+ "cachingMode": "Host Caching mode: None, Read Only, Read Write.",
+ "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.",
+ "readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.",
+ "kind": "Expected values Shared: mulitple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared",
+}
+
+func (AzureDiskVolumeSource) SwaggerDoc() map[string]string {
+ return map_AzureDiskVolumeSource
+}
+
+var map_AzureFileVolumeSource = map[string]string{
+ "": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.",
+ "secretName": "the name of secret that contains Azure Storage Account Name and Key",
+ "shareName": "Share Name",
+ "readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.",
+}
+
+func (AzureFileVolumeSource) SwaggerDoc() map[string]string {
+ return map_AzureFileVolumeSource
+}
+
+var map_Binding = map[string]string{
+ "": "Binding ties one object to another; for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "target": "The target object that you want to bind to the standard object.",
+}
+
+func (Binding) SwaggerDoc() map[string]string {
+ return map_Binding
+}
+
+var map_Capabilities = map[string]string{
+ "": "Adds and removes POSIX capabilities from running containers.",
+ "add": "Added capabilities",
+ "drop": "Removed capabilities",
+}
+
+func (Capabilities) SwaggerDoc() map[string]string {
+ return map_Capabilities
+}
+
+var map_CephFSVolumeSource = map[string]string{
+ "": "Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.",
+ "monitors": "Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it",
+ "path": "Optional: Used as the mounted root, rather than the full Ceph tree, default is /",
+ "user": "Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it",
+ "secretFile": "Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it",
+ "secretRef": "Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it",
+ "readOnly": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it",
+}
+
+func (CephFSVolumeSource) SwaggerDoc() map[string]string {
+ return map_CephFSVolumeSource
+}
+
+var map_CinderVolumeSource = map[string]string{
+ "": "Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.",
+ "volumeID": "volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md",
+ "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md",
+ "readOnly": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md",
+}
+
+func (CinderVolumeSource) SwaggerDoc() map[string]string {
+ return map_CinderVolumeSource
+}
+
+var map_ComponentCondition = map[string]string{
+ "": "Information about the condition of a component.",
+ "type": "Type of condition for a component. Valid value: \"Healthy\"",
+ "status": "Status of the condition for a component. Valid values for \"Healthy\": \"True\", \"False\", or \"Unknown\".",
+ "message": "Message about the condition for a component. For example, information about a health check.",
+ "error": "Condition error code for a component. For example, a health check error code.",
+}
+
+func (ComponentCondition) SwaggerDoc() map[string]string {
+ return map_ComponentCondition
+}
+
+var map_ComponentStatus = map[string]string{
+ "": "ComponentStatus (and ComponentStatusList) holds the cluster validation info.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "conditions": "List of component conditions observed",
+}
+
+func (ComponentStatus) SwaggerDoc() map[string]string {
+ return map_ComponentStatus
+}
+
+var map_ComponentStatusList = map[string]string{
+ "": "Status of all the conditions for the component as a list of ComponentStatus objects.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "List of ComponentStatus objects.",
+}
+
+func (ComponentStatusList) SwaggerDoc() map[string]string {
+ return map_ComponentStatusList
+}
+
+var map_ConfigMap = map[string]string{
+ "": "ConfigMap holds configuration data for pods to consume.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "data": "Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'.",
+}
+
+func (ConfigMap) SwaggerDoc() map[string]string {
+ return map_ConfigMap
+}
+
+var map_ConfigMapEnvSource = map[string]string{
+ "": "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.",
+ "optional": "Specify whether the ConfigMap must be defined",
+}
+
+func (ConfigMapEnvSource) SwaggerDoc() map[string]string {
+ return map_ConfigMapEnvSource
+}
+
+var map_ConfigMapKeySelector = map[string]string{
+ "": "Selects a key from a ConfigMap.",
+ "key": "The key to select.",
+ "optional": "Specify whether the ConfigMap or it's key must be defined",
+}
+
+func (ConfigMapKeySelector) SwaggerDoc() map[string]string {
+ return map_ConfigMapKeySelector
+}
+
+var map_ConfigMapList = map[string]string{
+ "": "ConfigMapList is a resource containing a list of ConfigMap objects.",
+ "metadata": "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "items": "Items is the list of ConfigMaps.",
+}
+
+func (ConfigMapList) SwaggerDoc() map[string]string {
+ return map_ConfigMapList
+}
+
+var map_ConfigMapProjection = map[string]string{
+ "": "Adapts a ConfigMap into a projected volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.",
+ "items": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.",
+ "optional": "Specify whether the ConfigMap or it's keys must be defined",
+}
+
+func (ConfigMapProjection) SwaggerDoc() map[string]string {
+ return map_ConfigMapProjection
+}
+
+var map_ConfigMapVolumeSource = map[string]string{
+ "": "Adapts a ConfigMap into a volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.",
+ "items": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.",
+ "defaultMode": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.",
+ "optional": "Specify whether the ConfigMap or it's keys must be defined",
+}
+
+func (ConfigMapVolumeSource) SwaggerDoc() map[string]string {
+ return map_ConfigMapVolumeSource
+}
+
+var map_Container = map[string]string{
+ "": "A single application container that you want to run within a pod.",
+ "name": "Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.",
+ "image": "Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images",
+ "command": "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell",
+ "args": "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell",
+ "workingDir": "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.",
+ "ports": "List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated.",
+ "envFrom": "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.",
+ "env": "List of environment variables to set in the container. Cannot be updated.",
+ "resources": "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources",
+ "volumeMounts": "Pod volumes to mount into the container's filesystem. Cannot be updated.",
+ "livenessProbe": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes",
+ "readinessProbe": "Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes",
+ "lifecycle": "Actions that the management system should take in response to container lifecycle events. Cannot be updated.",
+ "terminationMessagePath": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.",
+ "terminationMessagePolicy": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.",
+ "imagePullPolicy": "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images",
+ "securityContext": "Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md",
+ "stdin": "Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.",
+ "stdinOnce": "Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false",
+ "tty": "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.",
+}
+
+func (Container) SwaggerDoc() map[string]string {
+ return map_Container
+}
+
+var map_ContainerImage = map[string]string{
+ "": "Describe a container image",
+ "names": "Names by which this image is known. e.g. [\"gcr.io/google_containers/hyperkube:v1.0.7\", \"dockerhub.io/google_containers/hyperkube:v1.0.7\"]",
+ "sizeBytes": "The size of the image in bytes.",
+}
+
+func (ContainerImage) SwaggerDoc() map[string]string {
+ return map_ContainerImage
+}
+
+var map_ContainerPort = map[string]string{
+ "": "ContainerPort represents a network port in a single container.",
+ "name": "If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.",
+ "hostPort": "Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.",
+ "containerPort": "Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536.",
+ "protocol": "Protocol for port. Must be UDP or TCP. Defaults to \"TCP\".",
+ "hostIP": "What host IP to bind the external port to.",
+}
+
+func (ContainerPort) SwaggerDoc() map[string]string {
+ return map_ContainerPort
+}
+
+var map_ContainerState = map[string]string{
+ "": "ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting.",
+ "waiting": "Details about a waiting container",
+ "running": "Details about a running container",
+ "terminated": "Details about a terminated container",
+}
+
+func (ContainerState) SwaggerDoc() map[string]string {
+ return map_ContainerState
+}
+
+var map_ContainerStateRunning = map[string]string{
+ "": "ContainerStateRunning is a running state of a container.",
+ "startedAt": "Time at which the container was last (re-)started",
+}
+
+func (ContainerStateRunning) SwaggerDoc() map[string]string {
+ return map_ContainerStateRunning
+}
+
+var map_ContainerStateTerminated = map[string]string{
+ "": "ContainerStateTerminated is a terminated state of a container.",
+ "exitCode": "Exit status from the last termination of the container",
+ "signal": "Signal from the last termination of the container",
+ "reason": "(brief) reason from the last termination of the container",
+ "message": "Message regarding the last termination of the container",
+ "startedAt": "Time at which previous execution of the container started",
+ "finishedAt": "Time at which the container last terminated",
+ "containerID": "Container's ID in the format 'docker://<container_id>'",
+}
+
+func (ContainerStateTerminated) SwaggerDoc() map[string]string {
+ return map_ContainerStateTerminated
+}
+
+var map_ContainerStateWaiting = map[string]string{
+ "": "ContainerStateWaiting is a waiting state of a container.",
+ "reason": "(brief) reason the container is not yet running.",
+ "message": "Message regarding why the container is not yet running.",
+}
+
+func (ContainerStateWaiting) SwaggerDoc() map[string]string {
+ return map_ContainerStateWaiting
+}
+
+var map_ContainerStatus = map[string]string{
+ "": "ContainerStatus contains details for the current status of this container.",
+ "name": "This must be a DNS_LABEL. Each container in a pod must have a unique name. Cannot be updated.",
+ "state": "Details about the container's current condition.",
+ "lastState": "Details about the container's last termination condition.",
+ "ready": "Specifies whether the container has passed its readiness probe.",
+ "restartCount": "The number of times the container has been restarted, currently based on the number of dead containers that have not yet been removed. Note that this is calculated from dead containers. But those containers are subject to garbage collection. This value will get capped at 5 by GC.",
+ "image": "The image the container is running. More info: https://kubernetes.io/docs/concepts/containers/images",
+ "imageID": "ImageID of the container's image.",
+ "containerID": "Container's ID in the format 'docker://<container_id>'.",
+}
+
+func (ContainerStatus) SwaggerDoc() map[string]string {
+ return map_ContainerStatus
+}
+
+var map_DaemonEndpoint = map[string]string{
+ "": "DaemonEndpoint contains information about a single Daemon endpoint.",
+ "Port": "Port number of the given endpoint.",
+}
+
+func (DaemonEndpoint) SwaggerDoc() map[string]string {
+ return map_DaemonEndpoint
+}
+
+var map_DeleteOptions = map[string]string{
+ "": "DeleteOptions may be provided when deleting an API object DEPRECATED: This type has been moved to meta/v1 and will be removed soon.",
+ "gracePeriodSeconds": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.",
+ "preconditions": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.",
+ "orphanDependents": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.",
+ "PropagationPolicy": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.",
+}
+
+func (DeleteOptions) SwaggerDoc() map[string]string {
+ return map_DeleteOptions
+}
+
+var map_DownwardAPIProjection = map[string]string{
+ "": "Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.",
+ "items": "Items is a list of DownwardAPIVolume file",
+}
+
+func (DownwardAPIProjection) SwaggerDoc() map[string]string {
+ return map_DownwardAPIProjection
+}
+
+var map_DownwardAPIVolumeFile = map[string]string{
+ "": "DownwardAPIVolumeFile represents information to create the file containing the pod field",
+ "path": "Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'",
+ "fieldRef": "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.",
+ "resourceFieldRef": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.",
+ "mode": "Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.",
+}
+
+func (DownwardAPIVolumeFile) SwaggerDoc() map[string]string {
+ return map_DownwardAPIVolumeFile
+}
+
+var map_DownwardAPIVolumeSource = map[string]string{
+ "": "DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.",
+ "items": "Items is a list of downward API volume file",
+ "defaultMode": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.",
+}
+
+func (DownwardAPIVolumeSource) SwaggerDoc() map[string]string {
+ return map_DownwardAPIVolumeSource
+}
+
+var map_EmptyDirVolumeSource = map[string]string{
+ "": "Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.",
+ "medium": "What type of storage medium should back this directory. The default is \"\" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir",
+ "sizeLimit": "Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir",
+}
+
+func (EmptyDirVolumeSource) SwaggerDoc() map[string]string {
+ return map_EmptyDirVolumeSource
+}
+
+var map_EndpointAddress = map[string]string{
+ "": "EndpointAddress is a tuple that describes single IP address.",
+ "ip": "The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). IPv6 is also accepted but not fully supported on all platforms. Also, certain kubernetes components, like kube-proxy, are not IPv6 ready.",
+ "hostname": "The Hostname of this endpoint",
+ "nodeName": "Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.",
+ "targetRef": "Reference to object providing the endpoint.",
+}
+
+func (EndpointAddress) SwaggerDoc() map[string]string {
+ return map_EndpointAddress
+}
+
+var map_EndpointPort = map[string]string{
+ "": "EndpointPort is a tuple that describes a single port.",
+ "name": "The name of this port (corresponds to ServicePort.Name). Must be a DNS_LABEL. Optional only if one port is defined.",
+ "port": "The port number of the endpoint.",
+ "protocol": "The IP protocol for this port. Must be UDP or TCP. Default is TCP.",
+}
+
+func (EndpointPort) SwaggerDoc() map[string]string {
+ return map_EndpointPort
+}
+
+var map_EndpointSubset = map[string]string{
+ "": "EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given:\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n }\nThe resulting set of endpoints can be viewed as:\n a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],\n b: [ 10.10.1.1:309, 10.10.2.2:309 ]",
+ "addresses": "IP addresses which offer the related ports that are marked as ready. These endpoints should be considered safe for load balancers and clients to utilize.",
+ "notReadyAddresses": "IP addresses which offer the related ports but are not currently marked as ready because they have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check.",
+ "ports": "Port numbers available on the related IP addresses.",
+}
+
+func (EndpointSubset) SwaggerDoc() map[string]string {
+ return map_EndpointSubset
+}
+
+var map_Endpoints = map[string]string{
+ "": "Endpoints is a collection of endpoints that implement the actual service. Example:\n Name: \"mysvc\",\n Subsets: [\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n },\n {\n Addresses: [{\"ip\": \"10.10.3.3\"}],\n Ports: [{\"name\": \"a\", \"port\": 93}, {\"name\": \"b\", \"port\": 76}]\n },\n ]",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "subsets": "The set of all endpoints is the union of all subsets. Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service.",
+}
+
+func (Endpoints) SwaggerDoc() map[string]string {
+ return map_Endpoints
+}
+
+var map_EndpointsList = map[string]string{
+ "": "EndpointsList is a list of endpoints.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "List of endpoints.",
+}
+
+func (EndpointsList) SwaggerDoc() map[string]string {
+ return map_EndpointsList
+}
+
+var map_EnvFromSource = map[string]string{
+ "": "EnvFromSource represents the source of a set of ConfigMaps",
+ "prefix": "An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.",
+ "configMapRef": "The ConfigMap to select from",
+ "secretRef": "The Secret to select from",
+}
+
+func (EnvFromSource) SwaggerDoc() map[string]string {
+ return map_EnvFromSource
+}
+
+var map_EnvVar = map[string]string{
+ "": "EnvVar represents an environment variable present in a Container.",
+ "name": "Name of the environment variable. Must be a C_IDENTIFIER.",
+ "value": "Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".",
+ "valueFrom": "Source for the environment variable's value. Cannot be used if value is not empty.",
+}
+
+func (EnvVar) SwaggerDoc() map[string]string {
+ return map_EnvVar
+}
+
+var map_EnvVarSource = map[string]string{
+ "": "EnvVarSource represents a source for the value of an EnvVar.",
+ "fieldRef": "Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP.",
+ "resourceFieldRef": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.",
+ "configMapKeyRef": "Selects a key of a ConfigMap.",
+ "secretKeyRef": "Selects a key of a secret in the pod's namespace",
+}
+
+func (EnvVarSource) SwaggerDoc() map[string]string {
+ return map_EnvVarSource
+}
+
+var map_Event = map[string]string{
+ "": "Event is a report of an event somewhere in the cluster.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "involvedObject": "The object that this event is about.",
+ "reason": "This should be a short, machine understandable string that gives the reason for the transition into the object's current status.",
+ "message": "A human-readable description of the status of this operation.",
+ "source": "The component reporting this event. Should be a short machine understandable string.",
+ "firstTimestamp": "The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)",
+ "lastTimestamp": "The time at which the most recent occurrence of this event was recorded.",
+ "count": "The number of times this event has occurred.",
+ "type": "Type of this event (Normal, Warning), new types could be added in the future",
+}
+
+func (Event) SwaggerDoc() map[string]string {
+ return map_Event
+}
+
+var map_EventList = map[string]string{
+ "": "EventList is a list of events.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "List of events",
+}
+
+func (EventList) SwaggerDoc() map[string]string {
+ return map_EventList
+}
+
+var map_EventSource = map[string]string{
+ "": "EventSource contains information for an event.",
+ "component": "Component from which the event is generated.",
+ "host": "Node name on which the event is generated.",
+}
+
+func (EventSource) SwaggerDoc() map[string]string {
+ return map_EventSource
+}
+
+var map_ExecAction = map[string]string{
+ "": "ExecAction describes a \"run in container\" action.",
+ "command": "Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.",
+}
+
+func (ExecAction) SwaggerDoc() map[string]string {
+ return map_ExecAction
+}
+
+var map_FCVolumeSource = map[string]string{
+ "": "Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.",
+ "targetWWNs": "Required: FC target worldwide names (WWNs)",
+ "lun": "Required: FC target lun number",
+ "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.",
+ "readOnly": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.",
+}
+
+func (FCVolumeSource) SwaggerDoc() map[string]string {
+ return map_FCVolumeSource
+}
+
+var map_FlexVolumeSource = map[string]string{
+ "": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.",
+ "driver": "Driver is the name of the driver to use for this volume.",
+ "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.",
+ "secretRef": "Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.",
+ "readOnly": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.",
+ "options": "Optional: Extra command options if any.",
+}
+
+func (FlexVolumeSource) SwaggerDoc() map[string]string {
+ return map_FlexVolumeSource
+}
+
+var map_FlockerVolumeSource = map[string]string{
+ "": "Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.",
+ "datasetName": "Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated",
+ "datasetUUID": "UUID of the dataset. This is unique identifier of a Flocker dataset",
+}
+
+func (FlockerVolumeSource) SwaggerDoc() map[string]string {
+ return map_FlockerVolumeSource
+}
+
+var map_GCEPersistentDiskVolumeSource = map[string]string{
+ "": "Represents a Persistent Disk resource in Google Compute Engine.\n\nA GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling.",
+ "pdName": "Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk",
+ "fsType": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk",
+ "partition": "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk",
+ "readOnly": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk",
+}
+
+func (GCEPersistentDiskVolumeSource) SwaggerDoc() map[string]string {
+ return map_GCEPersistentDiskVolumeSource
+}
+
+var map_GitRepoVolumeSource = map[string]string{
+ "": "Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling.",
+ "repository": "Repository URL",
+ "revision": "Commit hash for the specified revision.",
+ "directory": "Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.",
+}
+
+func (GitRepoVolumeSource) SwaggerDoc() map[string]string {
+ return map_GitRepoVolumeSource
+}
+
+var map_GlusterfsVolumeSource = map[string]string{
+ "": "Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.",
+ "endpoints": "EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod",
+ "path": "Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod",
+ "readOnly": "ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod",
+}
+
+func (GlusterfsVolumeSource) SwaggerDoc() map[string]string {
+ return map_GlusterfsVolumeSource
+}
+
+var map_HTTPGetAction = map[string]string{
+ "": "HTTPGetAction describes an action based on HTTP Get requests.",
+ "path": "Path to access on the HTTP server.",
+ "port": "Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.",
+ "host": "Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.",
+ "scheme": "Scheme to use for connecting to the host. Defaults to HTTP.",
+ "httpHeaders": "Custom headers to set in the request. HTTP allows repeated headers.",
+}
+
+func (HTTPGetAction) SwaggerDoc() map[string]string {
+ return map_HTTPGetAction
+}
+
+var map_HTTPHeader = map[string]string{
+ "": "HTTPHeader describes a custom header to be used in HTTP probes",
+ "name": "The header field name",
+ "value": "The header field value",
+}
+
+func (HTTPHeader) SwaggerDoc() map[string]string {
+ return map_HTTPHeader
+}
+
+var map_Handler = map[string]string{
+ "": "Handler defines a specific action that should be taken",
+ "exec": "One and only one of the following should be specified. Exec specifies the action to take.",
+ "httpGet": "HTTPGet specifies the http request to perform.",
+ "tcpSocket": "TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported",
+}
+
+func (Handler) SwaggerDoc() map[string]string {
+ return map_Handler
+}
+
+var map_HostAlias = map[string]string{
+ "": "HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.",
+ "ip": "IP address of the host file entry.",
+ "hostnames": "Hostnames for the above IP address.",
+}
+
+func (HostAlias) SwaggerDoc() map[string]string {
+ return map_HostAlias
+}
+
+var map_HostPathVolumeSource = map[string]string{
+ "": "Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.",
+ "path": "Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath",
+}
+
+func (HostPathVolumeSource) SwaggerDoc() map[string]string {
+ return map_HostPathVolumeSource
+}
+
+var map_ISCSIVolumeSource = map[string]string{
+ "": "Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.",
+ "targetPortal": "iSCSI target portal. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).",
+ "iqn": "Target iSCSI Qualified Name.",
+ "lun": "iSCSI target lun number.",
+ "iscsiInterface": "Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport.",
+ "fsType": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi",
+ "readOnly": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.",
+ "portals": "iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).",
+ "chapAuthDiscovery": "whether support iSCSI Discovery CHAP authentication",
+ "chapAuthSession": "whether support iSCSI Session CHAP authentication",
+ "secretRef": "CHAP secret for iSCSI target and initiator authentication",
+}
+
+func (ISCSIVolumeSource) SwaggerDoc() map[string]string {
+ return map_ISCSIVolumeSource
+}
+
+var map_KeyToPath = map[string]string{
+ "": "Maps a string key to a path within a volume.",
+ "key": "The key to project.",
+ "path": "The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.",
+ "mode": "Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.",
+}
+
+func (KeyToPath) SwaggerDoc() map[string]string {
+ return map_KeyToPath
+}
+
+var map_Lifecycle = map[string]string{
+ "": "Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.",
+ "postStart": "PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks",
+ "preStop": "PreStop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks",
+}
+
+func (Lifecycle) SwaggerDoc() map[string]string {
+ return map_Lifecycle
+}
+
+var map_LimitRange = map[string]string{
+ "": "LimitRange sets resource usage limits for each kind of resource in a Namespace.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Spec defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (LimitRange) SwaggerDoc() map[string]string {
+ return map_LimitRange
+}
+
+var map_LimitRangeItem = map[string]string{
+ "": "LimitRangeItem defines a min/max usage limit for any resource that matches on kind.",
+ "type": "Type of resource that this limit applies to.",
+ "max": "Max usage constraints on this kind by resource name.",
+ "min": "Min usage constraints on this kind by resource name.",
+ "default": "Default resource requirement limit value by resource name if resource limit is omitted.",
+ "defaultRequest": "DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.",
+ "maxLimitRequestRatio": "MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.",
+}
+
+func (LimitRangeItem) SwaggerDoc() map[string]string {
+ return map_LimitRangeItem
+}
+
+var map_LimitRangeList = map[string]string{
+ "": "LimitRangeList is a list of LimitRange items.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "Items is a list of LimitRange objects. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_limit_range.md",
+}
+
+func (LimitRangeList) SwaggerDoc() map[string]string {
+ return map_LimitRangeList
+}
+
+var map_LimitRangeSpec = map[string]string{
+ "": "LimitRangeSpec defines a min/max usage limit for resources that match on kind.",
+ "limits": "Limits is the list of LimitRangeItem objects that are enforced.",
+}
+
+func (LimitRangeSpec) SwaggerDoc() map[string]string {
+ return map_LimitRangeSpec
+}
+
+var map_List = map[string]string{
+ "": "List holds a list of objects, which may not be known by the server.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "List of objects",
+}
+
+func (List) SwaggerDoc() map[string]string {
+ return map_List
+}
+
+var map_ListOptions = map[string]string{
+ "": "ListOptions is the query options to a standard REST list call. DEPRECATED: This type has been moved to meta/v1 and will be removed soon.",
+ "labelSelector": "A selector to restrict the list of returned objects by their labels. Defaults to everything.",
+ "fieldSelector": "A selector to restrict the list of returned objects by their fields. Defaults to everything.",
+ "includeUninitialized": "If true, partially initialized resources are included in the response.",
+ "watch": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.",
+ "resourceVersion": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.",
+ "timeoutSeconds": "Timeout for the list/watch call.",
+}
+
+func (ListOptions) SwaggerDoc() map[string]string {
+ return map_ListOptions
+}
+
+var map_LoadBalancerIngress = map[string]string{
+ "": "LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.",
+ "ip": "IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers)",
+ "hostname": "Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers)",
+}
+
+func (LoadBalancerIngress) SwaggerDoc() map[string]string {
+ return map_LoadBalancerIngress
+}
+
+var map_LoadBalancerStatus = map[string]string{
+ "": "LoadBalancerStatus represents the status of a load-balancer.",
+ "ingress": "Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points.",
+}
+
+func (LoadBalancerStatus) SwaggerDoc() map[string]string {
+ return map_LoadBalancerStatus
+}
+
+var map_LocalObjectReference = map[string]string{
+ "": "LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.",
+ "name": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
+}
+
+func (LocalObjectReference) SwaggerDoc() map[string]string {
+ return map_LocalObjectReference
+}
+
+var map_LocalVolumeSource = map[string]string{
+ "": "Local represents directly-attached storage with node affinity",
+ "path": "The full path to the volume on the node For alpha, this path must be a directory Once block as a source is supported, then this path can point to a block device",
+}
+
+func (LocalVolumeSource) SwaggerDoc() map[string]string {
+ return map_LocalVolumeSource
+}
+
+var map_NFSVolumeSource = map[string]string{
+ "": "Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling.",
+ "server": "Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs",
+ "path": "Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs",
+ "readOnly": "ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs",
+}
+
+func (NFSVolumeSource) SwaggerDoc() map[string]string {
+ return map_NFSVolumeSource
+}
+
+var map_Namespace = map[string]string{
+ "": "Namespace provides a scope for Names. Use of multiple namespaces is optional.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Spec defines the behavior of the Namespace. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+ "status": "Status describes the current status of a Namespace. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (Namespace) SwaggerDoc() map[string]string {
+ return map_Namespace
+}
+
+var map_NamespaceList = map[string]string{
+ "": "NamespaceList is a list of Namespaces.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "Items is the list of Namespace objects in the list. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/",
+}
+
+func (NamespaceList) SwaggerDoc() map[string]string {
+ return map_NamespaceList
+}
+
+var map_NamespaceSpec = map[string]string{
+ "": "NamespaceSpec describes the attributes on a Namespace.",
+ "finalizers": "Finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#finalizers",
+}
+
+func (NamespaceSpec) SwaggerDoc() map[string]string {
+ return map_NamespaceSpec
+}
+
+var map_NamespaceStatus = map[string]string{
+ "": "NamespaceStatus is information about the current status of a Namespace.",
+ "phase": "Phase is the current lifecycle phase of the namespace. More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#phases",
+}
+
+func (NamespaceStatus) SwaggerDoc() map[string]string {
+ return map_NamespaceStatus
+}
+
+var map_Node = map[string]string{
+ "": "Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd).",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Spec defines the behavior of a node. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+ "status": "Most recently observed status of the node. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (Node) SwaggerDoc() map[string]string {
+ return map_Node
+}
+
+var map_NodeAddress = map[string]string{
+ "": "NodeAddress contains information for the node's address.",
+ "type": "Node address type, one of Hostname, ExternalIP or InternalIP.",
+ "address": "The node address.",
+}
+
+func (NodeAddress) SwaggerDoc() map[string]string {
+ return map_NodeAddress
+}
+
+var map_NodeAffinity = map[string]string{
+ "": "Node affinity is a group of node affinity scheduling rules.",
+ "requiredDuringSchedulingIgnoredDuringExecution": "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.",
+ "preferredDuringSchedulingIgnoredDuringExecution": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.",
+}
+
+func (NodeAffinity) SwaggerDoc() map[string]string {
+ return map_NodeAffinity
+}
+
+var map_NodeCondition = map[string]string{
+ "": "NodeCondition contains condition information for a node.",
+ "type": "Type of node condition.",
+ "status": "Status of the condition, one of True, False, Unknown.",
+ "lastHeartbeatTime": "Last time we got an update on a given condition.",
+ "lastTransitionTime": "Last time the condition transit from one status to another.",
+ "reason": "(brief) reason for the condition's last transition.",
+ "message": "Human readable message indicating details about last transition.",
+}
+
+func (NodeCondition) SwaggerDoc() map[string]string {
+ return map_NodeCondition
+}
+
+var map_NodeDaemonEndpoints = map[string]string{
+ "": "NodeDaemonEndpoints lists ports opened by daemons running on the Node.",
+ "kubeletEndpoint": "Endpoint on which Kubelet is listening.",
+}
+
+func (NodeDaemonEndpoints) SwaggerDoc() map[string]string {
+ return map_NodeDaemonEndpoints
+}
+
+var map_NodeList = map[string]string{
+ "": "NodeList is the whole list of all Nodes which have been registered with master.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "List of nodes",
+}
+
+func (NodeList) SwaggerDoc() map[string]string {
+ return map_NodeList
+}
+
+var map_NodeProxyOptions = map[string]string{
+ "": "NodeProxyOptions is the query options to a Node's proxy call.",
+ "path": "Path is the URL path to use for the current proxy request to node.",
+}
+
+func (NodeProxyOptions) SwaggerDoc() map[string]string {
+ return map_NodeProxyOptions
+}
+
+var map_NodeResources = map[string]string{
+ "": "NodeResources is an object for conveying resource information about a node. see http://releases.k8s.io/HEAD/docs/design/resources.md for more details.",
+ "Capacity": "Capacity represents the available resources of a node",
+}
+
+func (NodeResources) SwaggerDoc() map[string]string {
+ return map_NodeResources
+}
+
+var map_NodeSelector = map[string]string{
+ "": "A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.",
+ "nodeSelectorTerms": "Required. A list of node selector terms. The terms are ORed.",
+}
+
+func (NodeSelector) SwaggerDoc() map[string]string {
+ return map_NodeSelector
+}
+
+var map_NodeSelectorRequirement = map[string]string{
+ "": "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.",
+ "key": "The label key that the selector applies to.",
+ "operator": "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.",
+ "values": "An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.",
+}
+
+func (NodeSelectorRequirement) SwaggerDoc() map[string]string {
+ return map_NodeSelectorRequirement
+}
+
+var map_NodeSelectorTerm = map[string]string{
+ "": "A null or empty node selector term matches no objects.",
+ "matchExpressions": "Required. A list of node selector requirements. The requirements are ANDed.",
+}
+
+func (NodeSelectorTerm) SwaggerDoc() map[string]string {
+ return map_NodeSelectorTerm
+}
+
+var map_NodeSpec = map[string]string{
+ "": "NodeSpec describes the attributes that a node is created with.",
+ "podCIDR": "PodCIDR represents the pod IP range assigned to the node.",
+ "externalID": "External ID of the node assigned by some machine database (e.g. a cloud provider). Deprecated.",
+ "providerID": "ID of the node assigned by the cloud provider in the format: <ProviderName>://<ProviderSpecificNodeID>",
+ "unschedulable": "Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration",
+ "taints": "If specified, the node's taints.",
+}
+
+func (NodeSpec) SwaggerDoc() map[string]string {
+ return map_NodeSpec
+}
+
+var map_NodeStatus = map[string]string{
+ "": "NodeStatus is information about the current status of a node.",
+ "capacity": "Capacity represents the total resources of a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity",
+ "allocatable": "Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity.",
+ "phase": "NodePhase is the recently observed lifecycle phase of the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#phase The field is never populated, and now is deprecated.",
+ "conditions": "Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/concepts/nodes/node/#condition",
+ "addresses": "List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses",
+ "daemonEndpoints": "Endpoints of daemons running on the Node.",
+ "nodeInfo": "Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#info",
+ "images": "List of container images on this node",
+ "volumesInUse": "List of attachable volumes in use (mounted) by the node.",
+ "volumesAttached": "List of volumes that are attached to the node.",
+}
+
+func (NodeStatus) SwaggerDoc() map[string]string {
+ return map_NodeStatus
+}
+
+var map_NodeSystemInfo = map[string]string{
+ "": "NodeSystemInfo is a set of ids/uuids to uniquely identify the node.",
+ "machineID": "MachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html",
+ "systemUUID": "SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html",
+ "bootID": "Boot ID reported by the node.",
+ "kernelVersion": "Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).",
+ "osImage": "OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).",
+ "containerRuntimeVersion": "ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0).",
+ "kubeletVersion": "Kubelet Version reported by the node.",
+ "kubeProxyVersion": "KubeProxy Version reported by the node.",
+ "operatingSystem": "The Operating System reported by the node",
+ "architecture": "The Architecture reported by the node",
+}
+
+func (NodeSystemInfo) SwaggerDoc() map[string]string {
+ return map_NodeSystemInfo
+}
+
+var map_ObjectFieldSelector = map[string]string{
+ "": "ObjectFieldSelector selects an APIVersioned field of an object.",
+ "apiVersion": "Version of the schema the FieldPath is written in terms of, defaults to \"v1\".",
+ "fieldPath": "Path of the field to select in the specified API version.",
+}
+
+func (ObjectFieldSelector) SwaggerDoc() map[string]string {
+ return map_ObjectFieldSelector
+}
+
+var map_ObjectMeta = map[string]string{
+ "": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. DEPRECATED: Use k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta instead - this type will be removed soon.",
+ "name": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
+ "generateName": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency",
+ "namespace": "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/",
+ "selfLink": "SelfLink is a URL representing this object. Populated by the system. Read-only.",
+ "uid": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids",
+ "resourceVersion": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency",
+ "generation": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.",
+ "creationTimestamp": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "deletionTimestamp": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "deletionGracePeriodSeconds": "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.",
+ "labels": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/",
+ "annotations": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/",
+ "ownerReferences": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.",
+ "initializers": "An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects.\n\nWhen an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user.",
+ "finalizers": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.",
+ "clusterName": "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.",
+}
+
+func (ObjectMeta) SwaggerDoc() map[string]string {
+ return map_ObjectMeta
+}
+
+var map_ObjectReference = map[string]string{
+ "": "ObjectReference contains enough information to let you inspect or modify the referred object.",
+ "kind": "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "namespace": "Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/",
+ "name": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
+ "uid": "UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids",
+ "apiVersion": "API version of the referent.",
+ "resourceVersion": "Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency",
+ "fieldPath": "If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: \"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered the event) or if no container name is specified \"spec.containers[2]\" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.",
+}
+
+func (ObjectReference) SwaggerDoc() map[string]string {
+ return map_ObjectReference
+}
+
+var map_PersistentVolume = map[string]string{
+ "": "PersistentVolume (PV) is a storage resource provisioned by an administrator. It is analogous to a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Spec defines a specification of a persistent volume owned by the cluster. Provisioned by an administrator. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes",
+ "status": "Status represents the current information/status for the persistent volume. Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes",
+}
+
+func (PersistentVolume) SwaggerDoc() map[string]string {
+ return map_PersistentVolume
+}
+
+var map_PersistentVolumeClaim = map[string]string{
+ "": "PersistentVolumeClaim is a user's request for and claim to a persistent volume",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims",
+ "status": "Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims",
+}
+
+func (PersistentVolumeClaim) SwaggerDoc() map[string]string {
+ return map_PersistentVolumeClaim
+}
+
+var map_PersistentVolumeClaimList = map[string]string{
+ "": "PersistentVolumeClaimList is a list of PersistentVolumeClaim items.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "A list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims",
+}
+
+func (PersistentVolumeClaimList) SwaggerDoc() map[string]string {
+ return map_PersistentVolumeClaimList
+}
+
+var map_PersistentVolumeClaimSpec = map[string]string{
+ "": "PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes",
+ "accessModes": "AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1",
+ "selector": "A label query over volumes to consider for binding.",
+ "resources": "Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources",
+ "volumeName": "VolumeName is the binding reference to the PersistentVolume backing this claim.",
+ "storageClassName": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1",
+}
+
+func (PersistentVolumeClaimSpec) SwaggerDoc() map[string]string {
+ return map_PersistentVolumeClaimSpec
+}
+
+var map_PersistentVolumeClaimStatus = map[string]string{
+ "": "PersistentVolumeClaimStatus is the current status of a persistent volume claim.",
+ "phase": "Phase represents the current phase of PersistentVolumeClaim.",
+ "accessModes": "AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1",
+ "capacity": "Represents the actual resources of the underlying volume.",
+}
+
+func (PersistentVolumeClaimStatus) SwaggerDoc() map[string]string {
+ return map_PersistentVolumeClaimStatus
+}
+
+var map_PersistentVolumeClaimVolumeSource = map[string]string{
+ "": "PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system).",
+ "claimName": "ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims",
+ "readOnly": "Will force the ReadOnly setting in VolumeMounts. Default false.",
+}
+
+func (PersistentVolumeClaimVolumeSource) SwaggerDoc() map[string]string {
+ return map_PersistentVolumeClaimVolumeSource
+}
+
+var map_PersistentVolumeList = map[string]string{
+ "": "PersistentVolumeList is a list of PersistentVolume items.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "List of persistent volumes. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes",
+}
+
+func (PersistentVolumeList) SwaggerDoc() map[string]string {
+ return map_PersistentVolumeList
+}
+
+var map_PersistentVolumeSource = map[string]string{
+ "": "PersistentVolumeSource is similar to VolumeSource but meant for the administrator who creates PVs. Exactly one of its members must be set.",
+ "gcePersistentDisk": "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk",
+ "awsElasticBlockStore": "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore",
+ "hostPath": "HostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath",
+ "glusterfs": "Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md",
+ "nfs": "NFS represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs",
+ "rbd": "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md",
+ "iscsi": "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin.",
+ "cinder": "Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md",
+ "cephfs": "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime",
+ "fc": "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.",
+ "flocker": "Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running",
+ "flexVolume": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.",
+ "azureFile": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.",
+ "vsphereVolume": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine",
+ "quobyte": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime",
+ "azureDisk": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.",
+ "photonPersistentDisk": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine",
+ "portworxVolume": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine",
+ "scaleIO": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.",
+ "local": "Local represents directly-attached storage with node affinity",
+ "storageos": "StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md",
+}
+
+func (PersistentVolumeSource) SwaggerDoc() map[string]string {
+ return map_PersistentVolumeSource
+}
+
+var map_PersistentVolumeSpec = map[string]string{
+ "": "PersistentVolumeSpec is the specification of a persistent volume.",
+ "capacity": "A description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity",
+ "accessModes": "AccessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes",
+ "claimRef": "ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding",
+ "persistentVolumeReclaimPolicy": "What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming",
+ "storageClassName": "Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.",
+}
+
+func (PersistentVolumeSpec) SwaggerDoc() map[string]string {
+ return map_PersistentVolumeSpec
+}
+
+var map_PersistentVolumeStatus = map[string]string{
+ "": "PersistentVolumeStatus is the current status of a persistent volume.",
+ "phase": "Phase indicates if a volume is available, bound to a claim, or released by a claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase",
+ "message": "A human-readable message indicating details about why the volume is in this state.",
+ "reason": "Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.",
+}
+
+func (PersistentVolumeStatus) SwaggerDoc() map[string]string {
+ return map_PersistentVolumeStatus
+}
+
+var map_PhotonPersistentDiskVolumeSource = map[string]string{
+ "": "Represents a Photon Controller persistent disk resource.",
+ "pdID": "ID that identifies Photon Controller persistent disk",
+ "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.",
+}
+
+func (PhotonPersistentDiskVolumeSource) SwaggerDoc() map[string]string {
+ return map_PhotonPersistentDiskVolumeSource
+}
+
+var map_Pod = map[string]string{
+ "": "Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+ "status": "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (Pod) SwaggerDoc() map[string]string {
+ return map_Pod
+}
+
+var map_PodAffinity = map[string]string{
+ "": "Pod affinity is a group of inter pod affinity scheduling rules.",
+ "requiredDuringSchedulingIgnoredDuringExecution": "NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system will try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:\"requiredDuringSchedulingRequiredDuringExecution,omitempty\"` If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.",
+ "preferredDuringSchedulingIgnoredDuringExecution": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.",
+}
+
+func (PodAffinity) SwaggerDoc() map[string]string {
+ return map_PodAffinity
+}
+
+var map_PodAffinityTerm = map[string]string{
+ "": "Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key <topologyKey> tches that of any node on which a pod of the set of pods is running",
+ "labelSelector": "A label query over a set of resources, in this case pods.",
+ "namespaces": "namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"",
+ "topologyKey": "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as \"all topologies\" (\"all topologies\" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed.",
+}
+
+func (PodAffinityTerm) SwaggerDoc() map[string]string {
+ return map_PodAffinityTerm
+}
+
+var map_PodAntiAffinity = map[string]string{
+ "": "Pod anti affinity is a group of inter pod anti affinity scheduling rules.",
+ "requiredDuringSchedulingIgnoredDuringExecution": "NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system will try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:\"requiredDuringSchedulingRequiredDuringExecution,omitempty\"` If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.",
+ "preferredDuringSchedulingIgnoredDuringExecution": "The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.",
+}
+
+func (PodAntiAffinity) SwaggerDoc() map[string]string {
+ return map_PodAntiAffinity
+}
+
+var map_PodAttachOptions = map[string]string{
+ "": "PodAttachOptions is the query options to a Pod's remote attach call.",
+ "stdin": "Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false.",
+ "stdout": "Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true.",
+ "stderr": "Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true.",
+ "tty": "TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false.",
+ "container": "The container in which to execute the command. Defaults to only container if there is only one container in the pod.",
+}
+
+func (PodAttachOptions) SwaggerDoc() map[string]string {
+ return map_PodAttachOptions
+}
+
+var map_PodCondition = map[string]string{
+ "": "PodCondition contains details for the current condition of this pod.",
+ "type": "Type is the type of the condition. Currently only Ready. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions",
+ "status": "Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions",
+ "lastProbeTime": "Last time we probed the condition.",
+ "lastTransitionTime": "Last time the condition transitioned from one status to another.",
+ "reason": "Unique, one-word, CamelCase reason for the condition's last transition.",
+ "message": "Human-readable message indicating details about last transition.",
+}
+
+func (PodCondition) SwaggerDoc() map[string]string {
+ return map_PodCondition
+}
+
+var map_PodExecOptions = map[string]string{
+ "": "PodExecOptions is the query options to a Pod's remote exec call.",
+ "stdin": "Redirect the standard input stream of the pod for this call. Defaults to false.",
+ "stdout": "Redirect the standard output stream of the pod for this call. Defaults to true.",
+ "stderr": "Redirect the standard error stream of the pod for this call. Defaults to true.",
+ "tty": "TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.",
+ "container": "Container in which to execute the command. Defaults to only container if there is only one container in the pod.",
+ "command": "Command is the remote command to execute. argv array. Not executed within a shell.",
+}
+
+func (PodExecOptions) SwaggerDoc() map[string]string {
+ return map_PodExecOptions
+}
+
+var map_PodList = map[string]string{
+ "": "PodList is a list of Pods.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "List of pods. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md",
+}
+
+func (PodList) SwaggerDoc() map[string]string {
+ return map_PodList
+}
+
+var map_PodLogOptions = map[string]string{
+ "": "PodLogOptions is the query options for a Pod's logs REST call.",
+ "container": "The container for which to stream logs. Defaults to only container if there is one container in the pod.",
+ "follow": "Follow the log stream of the pod. Defaults to false.",
+ "previous": "Return previous terminated container logs. Defaults to false.",
+ "sinceSeconds": "A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.",
+ "sinceTime": "An RFC3339 timestamp from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.",
+ "timestamps": "If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.",
+ "tailLines": "If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime",
+ "limitBytes": "If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit.",
+}
+
+func (PodLogOptions) SwaggerDoc() map[string]string {
+ return map_PodLogOptions
+}
+
+var map_PodPortForwardOptions = map[string]string{
+ "": "PodPortForwardOptions is the query options to a Pod's port forward call when using WebSockets. The `port` query parameter must specify the port or ports (comma separated) to forward over. Port forwarding over SPDY does not use these options. It requires the port to be passed in the `port` header as part of request.",
+ "ports": "List of ports to forward Required when using WebSockets",
+}
+
+func (PodPortForwardOptions) SwaggerDoc() map[string]string {
+ return map_PodPortForwardOptions
+}
+
+var map_PodProxyOptions = map[string]string{
+ "": "PodProxyOptions is the query options to a Pod's proxy call.",
+ "path": "Path is the URL path to use for the current proxy request to pod.",
+}
+
+func (PodProxyOptions) SwaggerDoc() map[string]string {
+ return map_PodProxyOptions
+}
+
+var map_PodSecurityContext = map[string]string{
+ "": "PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.",
+ "seLinuxOptions": "The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.",
+ "runAsUser": "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.",
+ "runAsNonRoot": "Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.",
+ "supplementalGroups": "A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container.",
+ "fsGroup": "A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:\n\n1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw ",
+}
+
+func (PodSecurityContext) SwaggerDoc() map[string]string {
+ return map_PodSecurityContext
+}
+
+var map_PodSignature = map[string]string{
+ "": "Describes the class of pods that should avoid this node. Exactly one field should be set.",
+ "podController": "Reference to controller whose pods should avoid this node.",
+}
+
+func (PodSignature) SwaggerDoc() map[string]string {
+ return map_PodSignature
+}
+
+var map_PodSpec = map[string]string{
+ "": "PodSpec is a description of a pod.",
+ "volumes": "List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes",
+ "initContainers": "List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/",
+ "containers": "List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated.",
+ "restartPolicy": "Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy",
+ "terminationGracePeriodSeconds": "Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds.",
+ "activeDeadlineSeconds": "Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer.",
+ "dnsPolicy": "Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to \"ClusterFirst\". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.",
+ "nodeSelector": "NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/",
+ "serviceAccountName": "ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/",
+ "serviceAccount": "DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.",
+ "automountServiceAccountToken": "AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.",
+ "nodeName": "NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements.",
+ "hostNetwork": "Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false.",
+ "hostPID": "Use the host's pid namespace. Optional: Default to false.",
+ "hostIPC": "Use the host's ipc namespace. Optional: Default to false.",
+ "securityContext": "SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.",
+ "imagePullSecrets": "ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod",
+ "hostname": "Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value.",
+ "subdomain": "If specified, the fully qualified Pod hostname will be \"<hostname>.<subdomain>.<pod namespace>.svc.<cluster domain>\". If not specified, the pod will not have a domainname at all.",
+ "affinity": "If specified, the pod's scheduling constraints",
+ "schedulerName": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.",
+ "tolerations": "If specified, the pod's tolerations.",
+ "hostAliases": "HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods.",
+}
+
+func (PodSpec) SwaggerDoc() map[string]string {
+ return map_PodSpec
+}
+
+var map_PodStatus = map[string]string{
+ "": "PodStatus represents information about the status of a pod. Status may trail the actual state of a system.",
+ "phase": "Current condition of the pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase",
+ "conditions": "Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions",
+ "message": "A human readable message indicating details about why the pod is in this condition.",
+ "reason": "A brief CamelCase message indicating details about why the pod is in this state. e.g. 'OutOfDisk'",
+ "hostIP": "IP address of the host to which the pod is assigned. Empty if not yet scheduled.",
+ "podIP": "IP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated.",
+ "startTime": "RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod.",
+ "initContainerStatuses": "The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status",
+ "containerStatuses": "The list has one entry per container in the manifest. Each entry is currently the output of `docker inspect`. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status",
+ "qosClass": "The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md",
+}
+
+func (PodStatus) SwaggerDoc() map[string]string {
+ return map_PodStatus
+}
+
+var map_PodStatusResult = map[string]string{
+ "": "PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "status": "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (PodStatusResult) SwaggerDoc() map[string]string {
+ return map_PodStatusResult
+}
+
+var map_PodTemplate = map[string]string{
+ "": "PodTemplate describes a template for creating copies of a predefined pod.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "template": "Template defines the pods that will be created from this pod template. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (PodTemplate) SwaggerDoc() map[string]string {
+ return map_PodTemplate
+}
+
+var map_PodTemplateList = map[string]string{
+ "": "PodTemplateList is a list of PodTemplates.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "List of pod templates",
+}
+
+func (PodTemplateList) SwaggerDoc() map[string]string {
+ return map_PodTemplateList
+}
+
+var map_PodTemplateSpec = map[string]string{
+ "": "PodTemplateSpec describes the data a pod should have when created from a template",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (PodTemplateSpec) SwaggerDoc() map[string]string {
+ return map_PodTemplateSpec
+}
+
+var map_PortworxVolumeSource = map[string]string{
+ "": "PortworxVolumeSource represents a Portworx volume resource.",
+ "volumeID": "VolumeID uniquely identifies a Portworx volume",
+ "fsType": "FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified.",
+ "readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.",
+}
+
+func (PortworxVolumeSource) SwaggerDoc() map[string]string {
+ return map_PortworxVolumeSource
+}
+
+var map_Preconditions = map[string]string{
+ "": "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.",
+ "uid": "Specifies the target UID.",
+}
+
+func (Preconditions) SwaggerDoc() map[string]string {
+ return map_Preconditions
+}
+
+var map_PreferAvoidPodsEntry = map[string]string{
+ "": "Describes a class of pods that should avoid this node.",
+ "podSignature": "The class of pods.",
+ "evictionTime": "Time at which this entry was added to the list.",
+ "reason": "(brief) reason why this entry was added to the list.",
+ "message": "Human readable message indicating why this entry was added to the list.",
+}
+
+func (PreferAvoidPodsEntry) SwaggerDoc() map[string]string {
+ return map_PreferAvoidPodsEntry
+}
+
+var map_PreferredSchedulingTerm = map[string]string{
+ "": "An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).",
+ "weight": "Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.",
+ "preference": "A node selector term, associated with the corresponding weight.",
+}
+
+func (PreferredSchedulingTerm) SwaggerDoc() map[string]string {
+ return map_PreferredSchedulingTerm
+}
+
+var map_Probe = map[string]string{
+ "": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.",
+ "initialDelaySeconds": "Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes",
+ "timeoutSeconds": "Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes",
+ "periodSeconds": "How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.",
+ "successThreshold": "Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.",
+ "failureThreshold": "Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.",
+}
+
+func (Probe) SwaggerDoc() map[string]string {
+ return map_Probe
+}
+
+var map_ProjectedVolumeSource = map[string]string{
+ "": "Represents a projected volume source",
+ "sources": "list of volume projections",
+ "defaultMode": "Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.",
+}
+
+func (ProjectedVolumeSource) SwaggerDoc() map[string]string {
+ return map_ProjectedVolumeSource
+}
+
+var map_QuobyteVolumeSource = map[string]string{
+ "": "Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.",
+ "registry": "Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes",
+ "volume": "Volume is a string that references an already created Quobyte volume by name.",
+ "readOnly": "ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.",
+ "user": "User to map volume access to Defaults to serivceaccount user",
+ "group": "Group to map volume access to Default is no group",
+}
+
+func (QuobyteVolumeSource) SwaggerDoc() map[string]string {
+ return map_QuobyteVolumeSource
+}
+
+var map_RBDVolumeSource = map[string]string{
+ "": "Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.",
+ "monitors": "A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it",
+ "image": "The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it",
+ "fsType": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd",
+ "pool": "The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it",
+ "user": "The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it",
+ "keyring": "Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it",
+ "secretRef": "SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it",
+ "readOnly": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it",
+}
+
+func (RBDVolumeSource) SwaggerDoc() map[string]string {
+ return map_RBDVolumeSource
+}
+
+var map_RangeAllocation = map[string]string{
+ "": "RangeAllocation is not a public type.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "range": "Range is string that identifies the range represented by 'data'.",
+ "data": "Data is a bit array containing all allocated addresses in the previous segment.",
+}
+
+func (RangeAllocation) SwaggerDoc() map[string]string {
+ return map_RangeAllocation
+}
+
+var map_ReplicationController = map[string]string{
+ "": "ReplicationController represents the configuration of a replication controller.",
+ "metadata": "If the Labels of a ReplicationController are empty, they are defaulted to be the same as the Pod(s) that the replication controller manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Spec defines the specification of the desired behavior of the replication controller. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+ "status": "Status is the most recently observed status of the replication controller. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (ReplicationController) SwaggerDoc() map[string]string {
+ return map_ReplicationController
+}
+
+var map_ReplicationControllerCondition = map[string]string{
+ "": "ReplicationControllerCondition describes the state of a replication controller at a certain point.",
+ "type": "Type of replication controller condition.",
+ "status": "Status of the condition, one of True, False, Unknown.",
+ "lastTransitionTime": "The last time the condition transitioned from one status to another.",
+ "reason": "The reason for the condition's last transition.",
+ "message": "A human readable message indicating details about the transition.",
+}
+
+func (ReplicationControllerCondition) SwaggerDoc() map[string]string {
+ return map_ReplicationControllerCondition
+}
+
+var map_ReplicationControllerList = map[string]string{
+ "": "ReplicationControllerList is a collection of replication controllers.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "List of replication controllers. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller",
+}
+
+func (ReplicationControllerList) SwaggerDoc() map[string]string {
+ return map_ReplicationControllerList
+}
+
+var map_ReplicationControllerSpec = map[string]string{
+ "": "ReplicationControllerSpec is the specification of a replication controller.",
+ "replicas": "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller",
+ "minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)",
+ "selector": "Selector is a label query over pods that should match the Replicas count. If Selector is empty, it is defaulted to the labels present on the Pod template. Label keys and values that must match in order to be controlled by this replication controller, if empty defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
+ "template": "Template is the object that describes the pod that will be created if insufficient replicas are detected. This takes precedence over a TemplateRef. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template",
+}
+
+func (ReplicationControllerSpec) SwaggerDoc() map[string]string {
+ return map_ReplicationControllerSpec
+}
+
+var map_ReplicationControllerStatus = map[string]string{
+ "": "ReplicationControllerStatus represents the current status of a replication controller.",
+ "replicas": "Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller",
+ "fullyLabeledReplicas": "The number of pods that have labels matching the labels of the pod template of the replication controller.",
+ "readyReplicas": "The number of ready replicas for this replication controller.",
+ "availableReplicas": "The number of available replicas (ready for at least minReadySeconds) for this replication controller.",
+ "observedGeneration": "ObservedGeneration reflects the generation of the most recently observed replication controller.",
+ "conditions": "Represents the latest available observations of a replication controller's current state.",
+}
+
+func (ReplicationControllerStatus) SwaggerDoc() map[string]string {
+ return map_ReplicationControllerStatus
+}
+
+var map_ResourceFieldSelector = map[string]string{
+ "": "ResourceFieldSelector represents container resources (cpu, memory) and their output format",
+ "containerName": "Container name: required for volumes, optional for env vars",
+ "resource": "Required: resource to select",
+ "divisor": "Specifies the output format of the exposed resources, defaults to \"1\"",
+}
+
+func (ResourceFieldSelector) SwaggerDoc() map[string]string {
+ return map_ResourceFieldSelector
+}
+
+var map_ResourceQuota = map[string]string{
+ "": "ResourceQuota sets aggregate quota restrictions enforced per namespace",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Spec defines the desired quota. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+ "status": "Status defines the actual enforced quota and its current usage. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (ResourceQuota) SwaggerDoc() map[string]string {
+ return map_ResourceQuota
+}
+
+var map_ResourceQuotaList = map[string]string{
+ "": "ResourceQuotaList is a list of ResourceQuota items.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "Items is a list of ResourceQuota objects. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md",
+}
+
+func (ResourceQuotaList) SwaggerDoc() map[string]string {
+ return map_ResourceQuotaList
+}
+
+var map_ResourceQuotaSpec = map[string]string{
+ "": "ResourceQuotaSpec defines the desired hard limits to enforce for Quota.",
+ "hard": "Hard is the set of desired hard limits for each named resource. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md",
+ "scopes": "A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.",
+}
+
+func (ResourceQuotaSpec) SwaggerDoc() map[string]string {
+ return map_ResourceQuotaSpec
+}
+
+var map_ResourceQuotaStatus = map[string]string{
+ "": "ResourceQuotaStatus defines the enforced hard limits and observed use.",
+ "hard": "Hard is the set of enforced hard limits for each named resource. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md",
+ "used": "Used is the current observed total usage of the resource in the namespace.",
+}
+
+func (ResourceQuotaStatus) SwaggerDoc() map[string]string {
+ return map_ResourceQuotaStatus
+}
+
+var map_ResourceRequirements = map[string]string{
+ "": "ResourceRequirements describes the compute resource requirements.",
+ "limits": "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/",
+ "requests": "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/",
+}
+
+func (ResourceRequirements) SwaggerDoc() map[string]string {
+ return map_ResourceRequirements
+}
+
+var map_SELinuxOptions = map[string]string{
+ "": "SELinuxOptions are the labels to be applied to the container",
+ "user": "User is a SELinux user label that applies to the container.",
+ "role": "Role is a SELinux role label that applies to the container.",
+ "type": "Type is a SELinux type label that applies to the container.",
+ "level": "Level is SELinux level label that applies to the container.",
+}
+
+func (SELinuxOptions) SwaggerDoc() map[string]string {
+ return map_SELinuxOptions
+}
+
+var map_ScaleIOVolumeSource = map[string]string{
+ "": "ScaleIOVolumeSource represents a persistent ScaleIO volume",
+ "gateway": "The host address of the ScaleIO API Gateway.",
+ "system": "The name of the storage system as configured in ScaleIO.",
+ "secretRef": "SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.",
+ "sslEnabled": "Flag to enable/disable SSL communication with Gateway, default false",
+ "protectionDomain": "The name of the Protection Domain for the configured storage (defaults to \"default\").",
+ "storagePool": "The Storage Pool associated with the protection domain (defaults to \"default\").",
+ "storageMode": "Indicates whether the storage for a volume should be thick or thin (defaults to \"thin\").",
+ "volumeName": "The name of a volume already created in the ScaleIO system that is associated with this volume source.",
+ "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.",
+ "readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.",
+}
+
+func (ScaleIOVolumeSource) SwaggerDoc() map[string]string {
+ return map_ScaleIOVolumeSource
+}
+
+var map_Secret = map[string]string{
+ "": "Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "data": "Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4",
+ "stringData": "stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API.",
+ "type": "Used to facilitate programmatic handling of secret data.",
+}
+
+func (Secret) SwaggerDoc() map[string]string {
+ return map_Secret
+}
+
+var map_SecretEnvSource = map[string]string{
+ "": "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.",
+ "optional": "Specify whether the Secret must be defined",
+}
+
+func (SecretEnvSource) SwaggerDoc() map[string]string {
+ return map_SecretEnvSource
+}
+
+var map_SecretKeySelector = map[string]string{
+ "": "SecretKeySelector selects a key of a Secret.",
+ "key": "The key of the secret to select from. Must be a valid secret key.",
+ "optional": "Specify whether the Secret or it's key must be defined",
+}
+
+func (SecretKeySelector) SwaggerDoc() map[string]string {
+ return map_SecretKeySelector
+}
+
+var map_SecretList = map[string]string{
+ "": "SecretList is a list of Secret.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "Items is a list of secret objects. More info: https://kubernetes.io/docs/concepts/configuration/secret",
+}
+
+func (SecretList) SwaggerDoc() map[string]string {
+ return map_SecretList
+}
+
+var map_SecretProjection = map[string]string{
+ "": "Adapts a secret into a projected volume.\n\nThe contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.",
+ "items": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.",
+ "optional": "Specify whether the Secret or its key must be defined",
+}
+
+func (SecretProjection) SwaggerDoc() map[string]string {
+ return map_SecretProjection
+}
+
+var map_SecretVolumeSource = map[string]string{
+ "": "Adapts a Secret into a volume.\n\nThe contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.",
+ "secretName": "Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret",
+ "items": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.",
+ "defaultMode": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.",
+ "optional": "Specify whether the Secret or it's keys must be defined",
+}
+
+func (SecretVolumeSource) SwaggerDoc() map[string]string {
+ return map_SecretVolumeSource
+}
+
+var map_SecurityContext = map[string]string{
+ "": "SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence.",
+ "capabilities": "The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime.",
+ "privileged": "Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false.",
+ "seLinuxOptions": "The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.",
+ "runAsUser": "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.",
+ "runAsNonRoot": "Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.",
+ "readOnlyRootFilesystem": "Whether this container has a read-only root filesystem. Default is false.",
+}
+
+func (SecurityContext) SwaggerDoc() map[string]string {
+ return map_SecurityContext
+}
+
+var map_SerializedReference = map[string]string{
+ "": "SerializedReference is a reference to serialized object.",
+ "reference": "The reference to an object in the system.",
+}
+
+func (SerializedReference) SwaggerDoc() map[string]string {
+ return map_SerializedReference
+}
+
+var map_Service = map[string]string{
+ "": "Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+ "status": "Most recently observed status of the service. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (Service) SwaggerDoc() map[string]string {
+ return map_Service
+}
+
+var map_ServiceAccount = map[string]string{
+ "": "ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "secrets": "Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. More info: https://kubernetes.io/docs/concepts/configuration/secret",
+ "imagePullSecrets": "ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod",
+ "automountServiceAccountToken": "AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level.",
+}
+
+func (ServiceAccount) SwaggerDoc() map[string]string {
+ return map_ServiceAccount
+}
+
+var map_ServiceAccountList = map[string]string{
+ "": "ServiceAccountList is a list of ServiceAccount objects",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "List of ServiceAccounts. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/",
+}
+
+func (ServiceAccountList) SwaggerDoc() map[string]string {
+ return map_ServiceAccountList
+}
+
+var map_ServiceList = map[string]string{
+ "": "ServiceList holds a list of services.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "List of services",
+}
+
+func (ServiceList) SwaggerDoc() map[string]string {
+ return map_ServiceList
+}
+
+var map_ServicePort = map[string]string{
+ "": "ServicePort contains information on service's port.",
+ "name": "The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. This maps to the 'Name' field in EndpointPort objects. Optional if only one ServicePort is defined on this service.",
+ "protocol": "The IP protocol for this port. Supports \"TCP\" and \"UDP\". Default is TCP.",
+ "port": "The port that will be exposed by this service.",
+ "targetPort": "Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod's container ports. If this is not specified, the value of the 'port' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the 'port' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service",
+ "nodePort": "The port on each node on which this service is exposed when type=NodePort or LoadBalancer. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport",
+}
+
+func (ServicePort) SwaggerDoc() map[string]string {
+ return map_ServicePort
+}
+
+var map_ServiceProxyOptions = map[string]string{
+ "": "ServiceProxyOptions is the query options to a Service's proxy call.",
+ "path": "Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.",
+}
+
+func (ServiceProxyOptions) SwaggerDoc() map[string]string {
+ return map_ServiceProxyOptions
+}
+
+var map_ServiceSpec = map[string]string{
+ "": "ServiceSpec describes the attributes that a user creates on a service.",
+ "ports": "The list of ports that are exposed by this service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies",
+ "selector": "Route service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/",
+ "clusterIP": "clusterIP is the IP address of the service and is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are \"None\", empty string (\"\"), or a valid IP address. \"None\" can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies",
+ "type": "type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. \"ExternalName\" maps to the specified externalName. \"ClusterIP\" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object. If clusterIP is \"None\", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. \"NodePort\" builds on ClusterIP and allocates a port on every node which routes to the clusterIP. \"LoadBalancer\" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services ",
+ "externalIPs": "externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system.",
+ "sessionAffinity": "Supports \"ClientIP\" and \"None\". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies",
+ "loadBalancerIP": "Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature.",
+ "loadBalancerSourceRanges": "If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature.\" More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/",
+ "externalName": "externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid DNS name and requires Type to be ExternalName.",
+ "externalTrafficPolicy": "externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. \"Local\" preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. \"Cluster\" obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading.",
+ "healthCheckNodePort": "healthCheckNodePort specifies the healthcheck nodePort for the service. If not specified, HealthCheckNodePort is created by the service api backend with the allocated nodePort. Will use user-specified nodePort value if specified by the client. Only effects when Type is set to LoadBalancer and ExternalTrafficPolicy is set to Local.",
+}
+
+func (ServiceSpec) SwaggerDoc() map[string]string {
+ return map_ServiceSpec
+}
+
+var map_ServiceStatus = map[string]string{
+ "": "ServiceStatus represents the current status of a service.",
+ "loadBalancer": "LoadBalancer contains the current status of the load-balancer, if one is present.",
+}
+
+func (ServiceStatus) SwaggerDoc() map[string]string {
+ return map_ServiceStatus
+}
+
+var map_StorageOSPersistentVolumeSource = map[string]string{
+ "": "Represents a StorageOS persistent volume resource.",
+ "volumeName": "VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.",
+ "volumeNamespace": "VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.",
+ "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.",
+ "readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.",
+ "secretRef": "SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.",
+}
+
+func (StorageOSPersistentVolumeSource) SwaggerDoc() map[string]string {
+ return map_StorageOSPersistentVolumeSource
+}
+
+var map_StorageOSVolumeSource = map[string]string{
+ "": "Represents a StorageOS persistent volume resource.",
+ "volumeName": "VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.",
+ "volumeNamespace": "VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.",
+ "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.",
+ "readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.",
+ "secretRef": "SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.",
+}
+
+func (StorageOSVolumeSource) SwaggerDoc() map[string]string {
+ return map_StorageOSVolumeSource
+}
+
+var map_Sysctl = map[string]string{
+ "": "Sysctl defines a kernel parameter to be set",
+ "Name": "Name of a property to set",
+ "Value": "Value of a property to set",
+}
+
+func (Sysctl) SwaggerDoc() map[string]string {
+ return map_Sysctl
+}
+
+var map_TCPSocketAction = map[string]string{
+ "": "TCPSocketAction describes an action based on opening a socket",
+ "port": "Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.",
+ "host": "Optional: Host name to connect to, defaults to the pod IP.",
+}
+
+func (TCPSocketAction) SwaggerDoc() map[string]string {
+ return map_TCPSocketAction
+}
+
+var map_Taint = map[string]string{
+ "": "The node this Taint is attached to has the effect \"effect\" on any pod that that does not tolerate the Taint.",
+ "key": "Required. The taint key to be applied to a node.",
+ "value": "Required. The taint value corresponding to the taint key.",
+ "effect": "Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute.",
+ "timeAdded": "TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints.",
+}
+
+func (Taint) SwaggerDoc() map[string]string {
+ return map_Taint
+}
+
+var map_Toleration = map[string]string{
+ "": "The pod this Toleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>.",
+ "key": "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.",
+ "operator": "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.",
+ "value": "Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.",
+ "effect": "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.",
+ "tolerationSeconds": "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.",
+}
+
+func (Toleration) SwaggerDoc() map[string]string {
+ return map_Toleration
+}
+
+var map_Volume = map[string]string{
+ "": "Volume represents a named volume in a pod that may be accessed by any container in the pod.",
+ "name": "Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
+}
+
+func (Volume) SwaggerDoc() map[string]string {
+ return map_Volume
+}
+
+var map_VolumeMount = map[string]string{
+ "": "VolumeMount describes a mounting of a Volume within a container.",
+ "name": "This must match the Name of a Volume.",
+ "readOnly": "Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.",
+ "mountPath": "Path within the container at which the volume should be mounted. Must not contain ':'.",
+ "subPath": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).",
+}
+
+func (VolumeMount) SwaggerDoc() map[string]string {
+ return map_VolumeMount
+}
+
+var map_VolumeProjection = map[string]string{
+ "": "Projection that may be projected along with other supported volume types",
+ "secret": "information about the secret data to project",
+ "downwardAPI": "information about the downwardAPI data to project",
+ "configMap": "information about the configMap data to project",
+}
+
+func (VolumeProjection) SwaggerDoc() map[string]string {
+ return map_VolumeProjection
+}
+
+var map_VolumeSource = map[string]string{
+ "": "Represents the source of a volume to mount. Only one of its members may be specified.",
+ "hostPath": "HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath",
+ "emptyDir": "EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir",
+ "gcePersistentDisk": "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk",
+ "awsElasticBlockStore": "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore",
+ "gitRepo": "GitRepo represents a git repository at a particular revision.",
+ "secret": "Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret",
+ "nfs": "NFS represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs",
+ "iscsi": "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md",
+ "glusterfs": "Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md",
+ "persistentVolumeClaim": "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims",
+ "rbd": "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md",
+ "flexVolume": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.",
+ "cinder": "Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md",
+ "cephfs": "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime",
+ "flocker": "Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running",
+ "downwardAPI": "DownwardAPI represents downward API about the pod that should populate this volume",
+ "fc": "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.",
+ "azureFile": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.",
+ "configMap": "ConfigMap represents a configMap that should populate this volume",
+ "vsphereVolume": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine",
+ "quobyte": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime",
+ "azureDisk": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.",
+ "photonPersistentDisk": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine",
+ "projected": "Items for all in one resources secrets, configmaps, and downward API",
+ "portworxVolume": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine",
+ "scaleIO": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.",
+ "storageos": "StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.",
+}
+
+func (VolumeSource) SwaggerDoc() map[string]string {
+ return map_VolumeSource
+}
+
+var map_VsphereVirtualDiskVolumeSource = map[string]string{
+ "": "Represents a vSphere volume resource.",
+ "volumePath": "Path that identifies vSphere volume vmdk",
+ "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.",
+ "storagePolicyName": "Storage Policy Based Management (SPBM) profile name.",
+ "storagePolicyID": "Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.",
+}
+
+func (VsphereVirtualDiskVolumeSource) SwaggerDoc() map[string]string {
+ return map_VsphereVirtualDiskVolumeSource
+}
+
+var map_WeightedPodAffinityTerm = map[string]string{
+ "": "The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)",
+ "weight": "weight associated with matching the corresponding podAffinityTerm, in the range 1-100.",
+ "podAffinityTerm": "Required. A pod affinity term, associated with the corresponding weight.",
+}
+
+func (WeightedPodAffinityTerm) SwaggerDoc() map[string]string {
+ return map_WeightedPodAffinityTerm
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/api/v1/zz_generated.conversion.go
new file mode 100644
index 000000000..4492a0637
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/v1/zz_generated.conversion.go
@@ -0,0 +1,5169 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1
+
+import (
+ resource "k8s.io/apimachinery/pkg/api/resource"
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ types "k8s.io/apimachinery/pkg/types"
+ api "k8s.io/kubernetes/pkg/api"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1_AWSElasticBlockStoreVolumeSource_To_api_AWSElasticBlockStoreVolumeSource,
+ Convert_api_AWSElasticBlockStoreVolumeSource_To_v1_AWSElasticBlockStoreVolumeSource,
+ Convert_v1_Affinity_To_api_Affinity,
+ Convert_api_Affinity_To_v1_Affinity,
+ Convert_v1_AttachedVolume_To_api_AttachedVolume,
+ Convert_api_AttachedVolume_To_v1_AttachedVolume,
+ Convert_v1_AvoidPods_To_api_AvoidPods,
+ Convert_api_AvoidPods_To_v1_AvoidPods,
+ Convert_v1_AzureDiskVolumeSource_To_api_AzureDiskVolumeSource,
+ Convert_api_AzureDiskVolumeSource_To_v1_AzureDiskVolumeSource,
+ Convert_v1_AzureFileVolumeSource_To_api_AzureFileVolumeSource,
+ Convert_api_AzureFileVolumeSource_To_v1_AzureFileVolumeSource,
+ Convert_v1_Binding_To_api_Binding,
+ Convert_api_Binding_To_v1_Binding,
+ Convert_v1_Capabilities_To_api_Capabilities,
+ Convert_api_Capabilities_To_v1_Capabilities,
+ Convert_v1_CephFSVolumeSource_To_api_CephFSVolumeSource,
+ Convert_api_CephFSVolumeSource_To_v1_CephFSVolumeSource,
+ Convert_v1_CinderVolumeSource_To_api_CinderVolumeSource,
+ Convert_api_CinderVolumeSource_To_v1_CinderVolumeSource,
+ Convert_v1_ComponentCondition_To_api_ComponentCondition,
+ Convert_api_ComponentCondition_To_v1_ComponentCondition,
+ Convert_v1_ComponentStatus_To_api_ComponentStatus,
+ Convert_api_ComponentStatus_To_v1_ComponentStatus,
+ Convert_v1_ComponentStatusList_To_api_ComponentStatusList,
+ Convert_api_ComponentStatusList_To_v1_ComponentStatusList,
+ Convert_v1_ConfigMap_To_api_ConfigMap,
+ Convert_api_ConfigMap_To_v1_ConfigMap,
+ Convert_v1_ConfigMapEnvSource_To_api_ConfigMapEnvSource,
+ Convert_api_ConfigMapEnvSource_To_v1_ConfigMapEnvSource,
+ Convert_v1_ConfigMapKeySelector_To_api_ConfigMapKeySelector,
+ Convert_api_ConfigMapKeySelector_To_v1_ConfigMapKeySelector,
+ Convert_v1_ConfigMapList_To_api_ConfigMapList,
+ Convert_api_ConfigMapList_To_v1_ConfigMapList,
+ Convert_v1_ConfigMapProjection_To_api_ConfigMapProjection,
+ Convert_api_ConfigMapProjection_To_v1_ConfigMapProjection,
+ Convert_v1_ConfigMapVolumeSource_To_api_ConfigMapVolumeSource,
+ Convert_api_ConfigMapVolumeSource_To_v1_ConfigMapVolumeSource,
+ Convert_v1_Container_To_api_Container,
+ Convert_api_Container_To_v1_Container,
+ Convert_v1_ContainerImage_To_api_ContainerImage,
+ Convert_api_ContainerImage_To_v1_ContainerImage,
+ Convert_v1_ContainerPort_To_api_ContainerPort,
+ Convert_api_ContainerPort_To_v1_ContainerPort,
+ Convert_v1_ContainerState_To_api_ContainerState,
+ Convert_api_ContainerState_To_v1_ContainerState,
+ Convert_v1_ContainerStateRunning_To_api_ContainerStateRunning,
+ Convert_api_ContainerStateRunning_To_v1_ContainerStateRunning,
+ Convert_v1_ContainerStateTerminated_To_api_ContainerStateTerminated,
+ Convert_api_ContainerStateTerminated_To_v1_ContainerStateTerminated,
+ Convert_v1_ContainerStateWaiting_To_api_ContainerStateWaiting,
+ Convert_api_ContainerStateWaiting_To_v1_ContainerStateWaiting,
+ Convert_v1_ContainerStatus_To_api_ContainerStatus,
+ Convert_api_ContainerStatus_To_v1_ContainerStatus,
+ Convert_v1_DaemonEndpoint_To_api_DaemonEndpoint,
+ Convert_api_DaemonEndpoint_To_v1_DaemonEndpoint,
+ Convert_v1_DeleteOptions_To_api_DeleteOptions,
+ Convert_api_DeleteOptions_To_v1_DeleteOptions,
+ Convert_v1_DownwardAPIProjection_To_api_DownwardAPIProjection,
+ Convert_api_DownwardAPIProjection_To_v1_DownwardAPIProjection,
+ Convert_v1_DownwardAPIVolumeFile_To_api_DownwardAPIVolumeFile,
+ Convert_api_DownwardAPIVolumeFile_To_v1_DownwardAPIVolumeFile,
+ Convert_v1_DownwardAPIVolumeSource_To_api_DownwardAPIVolumeSource,
+ Convert_api_DownwardAPIVolumeSource_To_v1_DownwardAPIVolumeSource,
+ Convert_v1_EmptyDirVolumeSource_To_api_EmptyDirVolumeSource,
+ Convert_api_EmptyDirVolumeSource_To_v1_EmptyDirVolumeSource,
+ Convert_v1_EndpointAddress_To_api_EndpointAddress,
+ Convert_api_EndpointAddress_To_v1_EndpointAddress,
+ Convert_v1_EndpointPort_To_api_EndpointPort,
+ Convert_api_EndpointPort_To_v1_EndpointPort,
+ Convert_v1_EndpointSubset_To_api_EndpointSubset,
+ Convert_api_EndpointSubset_To_v1_EndpointSubset,
+ Convert_v1_Endpoints_To_api_Endpoints,
+ Convert_api_Endpoints_To_v1_Endpoints,
+ Convert_v1_EndpointsList_To_api_EndpointsList,
+ Convert_api_EndpointsList_To_v1_EndpointsList,
+ Convert_v1_EnvFromSource_To_api_EnvFromSource,
+ Convert_api_EnvFromSource_To_v1_EnvFromSource,
+ Convert_v1_EnvVar_To_api_EnvVar,
+ Convert_api_EnvVar_To_v1_EnvVar,
+ Convert_v1_EnvVarSource_To_api_EnvVarSource,
+ Convert_api_EnvVarSource_To_v1_EnvVarSource,
+ Convert_v1_Event_To_api_Event,
+ Convert_api_Event_To_v1_Event,
+ Convert_v1_EventList_To_api_EventList,
+ Convert_api_EventList_To_v1_EventList,
+ Convert_v1_EventSource_To_api_EventSource,
+ Convert_api_EventSource_To_v1_EventSource,
+ Convert_v1_ExecAction_To_api_ExecAction,
+ Convert_api_ExecAction_To_v1_ExecAction,
+ Convert_v1_FCVolumeSource_To_api_FCVolumeSource,
+ Convert_api_FCVolumeSource_To_v1_FCVolumeSource,
+ Convert_v1_FlexVolumeSource_To_api_FlexVolumeSource,
+ Convert_api_FlexVolumeSource_To_v1_FlexVolumeSource,
+ Convert_v1_FlockerVolumeSource_To_api_FlockerVolumeSource,
+ Convert_api_FlockerVolumeSource_To_v1_FlockerVolumeSource,
+ Convert_v1_GCEPersistentDiskVolumeSource_To_api_GCEPersistentDiskVolumeSource,
+ Convert_api_GCEPersistentDiskVolumeSource_To_v1_GCEPersistentDiskVolumeSource,
+ Convert_v1_GitRepoVolumeSource_To_api_GitRepoVolumeSource,
+ Convert_api_GitRepoVolumeSource_To_v1_GitRepoVolumeSource,
+ Convert_v1_GlusterfsVolumeSource_To_api_GlusterfsVolumeSource,
+ Convert_api_GlusterfsVolumeSource_To_v1_GlusterfsVolumeSource,
+ Convert_v1_HTTPGetAction_To_api_HTTPGetAction,
+ Convert_api_HTTPGetAction_To_v1_HTTPGetAction,
+ Convert_v1_HTTPHeader_To_api_HTTPHeader,
+ Convert_api_HTTPHeader_To_v1_HTTPHeader,
+ Convert_v1_Handler_To_api_Handler,
+ Convert_api_Handler_To_v1_Handler,
+ Convert_v1_HostAlias_To_api_HostAlias,
+ Convert_api_HostAlias_To_v1_HostAlias,
+ Convert_v1_HostPathVolumeSource_To_api_HostPathVolumeSource,
+ Convert_api_HostPathVolumeSource_To_v1_HostPathVolumeSource,
+ Convert_v1_ISCSIVolumeSource_To_api_ISCSIVolumeSource,
+ Convert_api_ISCSIVolumeSource_To_v1_ISCSIVolumeSource,
+ Convert_v1_KeyToPath_To_api_KeyToPath,
+ Convert_api_KeyToPath_To_v1_KeyToPath,
+ Convert_v1_Lifecycle_To_api_Lifecycle,
+ Convert_api_Lifecycle_To_v1_Lifecycle,
+ Convert_v1_LimitRange_To_api_LimitRange,
+ Convert_api_LimitRange_To_v1_LimitRange,
+ Convert_v1_LimitRangeItem_To_api_LimitRangeItem,
+ Convert_api_LimitRangeItem_To_v1_LimitRangeItem,
+ Convert_v1_LimitRangeList_To_api_LimitRangeList,
+ Convert_api_LimitRangeList_To_v1_LimitRangeList,
+ Convert_v1_LimitRangeSpec_To_api_LimitRangeSpec,
+ Convert_api_LimitRangeSpec_To_v1_LimitRangeSpec,
+ Convert_v1_List_To_api_List,
+ Convert_api_List_To_v1_List,
+ Convert_v1_ListOptions_To_api_ListOptions,
+ Convert_api_ListOptions_To_v1_ListOptions,
+ Convert_v1_LoadBalancerIngress_To_api_LoadBalancerIngress,
+ Convert_api_LoadBalancerIngress_To_v1_LoadBalancerIngress,
+ Convert_v1_LoadBalancerStatus_To_api_LoadBalancerStatus,
+ Convert_api_LoadBalancerStatus_To_v1_LoadBalancerStatus,
+ Convert_v1_LocalObjectReference_To_api_LocalObjectReference,
+ Convert_api_LocalObjectReference_To_v1_LocalObjectReference,
+ Convert_v1_LocalVolumeSource_To_api_LocalVolumeSource,
+ Convert_api_LocalVolumeSource_To_v1_LocalVolumeSource,
+ Convert_v1_NFSVolumeSource_To_api_NFSVolumeSource,
+ Convert_api_NFSVolumeSource_To_v1_NFSVolumeSource,
+ Convert_v1_Namespace_To_api_Namespace,
+ Convert_api_Namespace_To_v1_Namespace,
+ Convert_v1_NamespaceList_To_api_NamespaceList,
+ Convert_api_NamespaceList_To_v1_NamespaceList,
+ Convert_v1_NamespaceSpec_To_api_NamespaceSpec,
+ Convert_api_NamespaceSpec_To_v1_NamespaceSpec,
+ Convert_v1_NamespaceStatus_To_api_NamespaceStatus,
+ Convert_api_NamespaceStatus_To_v1_NamespaceStatus,
+ Convert_v1_Node_To_api_Node,
+ Convert_api_Node_To_v1_Node,
+ Convert_v1_NodeAddress_To_api_NodeAddress,
+ Convert_api_NodeAddress_To_v1_NodeAddress,
+ Convert_v1_NodeAffinity_To_api_NodeAffinity,
+ Convert_api_NodeAffinity_To_v1_NodeAffinity,
+ Convert_v1_NodeCondition_To_api_NodeCondition,
+ Convert_api_NodeCondition_To_v1_NodeCondition,
+ Convert_v1_NodeDaemonEndpoints_To_api_NodeDaemonEndpoints,
+ Convert_api_NodeDaemonEndpoints_To_v1_NodeDaemonEndpoints,
+ Convert_v1_NodeList_To_api_NodeList,
+ Convert_api_NodeList_To_v1_NodeList,
+ Convert_v1_NodeProxyOptions_To_api_NodeProxyOptions,
+ Convert_api_NodeProxyOptions_To_v1_NodeProxyOptions,
+ Convert_v1_NodeResources_To_api_NodeResources,
+ Convert_api_NodeResources_To_v1_NodeResources,
+ Convert_v1_NodeSelector_To_api_NodeSelector,
+ Convert_api_NodeSelector_To_v1_NodeSelector,
+ Convert_v1_NodeSelectorRequirement_To_api_NodeSelectorRequirement,
+ Convert_api_NodeSelectorRequirement_To_v1_NodeSelectorRequirement,
+ Convert_v1_NodeSelectorTerm_To_api_NodeSelectorTerm,
+ Convert_api_NodeSelectorTerm_To_v1_NodeSelectorTerm,
+ Convert_v1_NodeSpec_To_api_NodeSpec,
+ Convert_api_NodeSpec_To_v1_NodeSpec,
+ Convert_v1_NodeStatus_To_api_NodeStatus,
+ Convert_api_NodeStatus_To_v1_NodeStatus,
+ Convert_v1_NodeSystemInfo_To_api_NodeSystemInfo,
+ Convert_api_NodeSystemInfo_To_v1_NodeSystemInfo,
+ Convert_v1_ObjectFieldSelector_To_api_ObjectFieldSelector,
+ Convert_api_ObjectFieldSelector_To_v1_ObjectFieldSelector,
+ Convert_v1_ObjectMeta_To_api_ObjectMeta,
+ Convert_api_ObjectMeta_To_v1_ObjectMeta,
+ Convert_v1_ObjectReference_To_api_ObjectReference,
+ Convert_api_ObjectReference_To_v1_ObjectReference,
+ Convert_v1_PersistentVolume_To_api_PersistentVolume,
+ Convert_api_PersistentVolume_To_v1_PersistentVolume,
+ Convert_v1_PersistentVolumeClaim_To_api_PersistentVolumeClaim,
+ Convert_api_PersistentVolumeClaim_To_v1_PersistentVolumeClaim,
+ Convert_v1_PersistentVolumeClaimList_To_api_PersistentVolumeClaimList,
+ Convert_api_PersistentVolumeClaimList_To_v1_PersistentVolumeClaimList,
+ Convert_v1_PersistentVolumeClaimSpec_To_api_PersistentVolumeClaimSpec,
+ Convert_api_PersistentVolumeClaimSpec_To_v1_PersistentVolumeClaimSpec,
+ Convert_v1_PersistentVolumeClaimStatus_To_api_PersistentVolumeClaimStatus,
+ Convert_api_PersistentVolumeClaimStatus_To_v1_PersistentVolumeClaimStatus,
+ Convert_v1_PersistentVolumeClaimVolumeSource_To_api_PersistentVolumeClaimVolumeSource,
+ Convert_api_PersistentVolumeClaimVolumeSource_To_v1_PersistentVolumeClaimVolumeSource,
+ Convert_v1_PersistentVolumeList_To_api_PersistentVolumeList,
+ Convert_api_PersistentVolumeList_To_v1_PersistentVolumeList,
+ Convert_v1_PersistentVolumeSource_To_api_PersistentVolumeSource,
+ Convert_api_PersistentVolumeSource_To_v1_PersistentVolumeSource,
+ Convert_v1_PersistentVolumeSpec_To_api_PersistentVolumeSpec,
+ Convert_api_PersistentVolumeSpec_To_v1_PersistentVolumeSpec,
+ Convert_v1_PersistentVolumeStatus_To_api_PersistentVolumeStatus,
+ Convert_api_PersistentVolumeStatus_To_v1_PersistentVolumeStatus,
+ Convert_v1_PhotonPersistentDiskVolumeSource_To_api_PhotonPersistentDiskVolumeSource,
+ Convert_api_PhotonPersistentDiskVolumeSource_To_v1_PhotonPersistentDiskVolumeSource,
+ Convert_v1_Pod_To_api_Pod,
+ Convert_api_Pod_To_v1_Pod,
+ Convert_v1_PodAffinity_To_api_PodAffinity,
+ Convert_api_PodAffinity_To_v1_PodAffinity,
+ Convert_v1_PodAffinityTerm_To_api_PodAffinityTerm,
+ Convert_api_PodAffinityTerm_To_v1_PodAffinityTerm,
+ Convert_v1_PodAntiAffinity_To_api_PodAntiAffinity,
+ Convert_api_PodAntiAffinity_To_v1_PodAntiAffinity,
+ Convert_v1_PodAttachOptions_To_api_PodAttachOptions,
+ Convert_api_PodAttachOptions_To_v1_PodAttachOptions,
+ Convert_v1_PodCondition_To_api_PodCondition,
+ Convert_api_PodCondition_To_v1_PodCondition,
+ Convert_v1_PodExecOptions_To_api_PodExecOptions,
+ Convert_api_PodExecOptions_To_v1_PodExecOptions,
+ Convert_v1_PodList_To_api_PodList,
+ Convert_api_PodList_To_v1_PodList,
+ Convert_v1_PodLogOptions_To_api_PodLogOptions,
+ Convert_api_PodLogOptions_To_v1_PodLogOptions,
+ Convert_v1_PodPortForwardOptions_To_api_PodPortForwardOptions,
+ Convert_api_PodPortForwardOptions_To_v1_PodPortForwardOptions,
+ Convert_v1_PodProxyOptions_To_api_PodProxyOptions,
+ Convert_api_PodProxyOptions_To_v1_PodProxyOptions,
+ Convert_v1_PodSecurityContext_To_api_PodSecurityContext,
+ Convert_api_PodSecurityContext_To_v1_PodSecurityContext,
+ Convert_v1_PodSignature_To_api_PodSignature,
+ Convert_api_PodSignature_To_v1_PodSignature,
+ Convert_v1_PodSpec_To_api_PodSpec,
+ Convert_api_PodSpec_To_v1_PodSpec,
+ Convert_v1_PodStatus_To_api_PodStatus,
+ Convert_api_PodStatus_To_v1_PodStatus,
+ Convert_v1_PodStatusResult_To_api_PodStatusResult,
+ Convert_api_PodStatusResult_To_v1_PodStatusResult,
+ Convert_v1_PodTemplate_To_api_PodTemplate,
+ Convert_api_PodTemplate_To_v1_PodTemplate,
+ Convert_v1_PodTemplateList_To_api_PodTemplateList,
+ Convert_api_PodTemplateList_To_v1_PodTemplateList,
+ Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec,
+ Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec,
+ Convert_v1_PortworxVolumeSource_To_api_PortworxVolumeSource,
+ Convert_api_PortworxVolumeSource_To_v1_PortworxVolumeSource,
+ Convert_v1_Preconditions_To_api_Preconditions,
+ Convert_api_Preconditions_To_v1_Preconditions,
+ Convert_v1_PreferAvoidPodsEntry_To_api_PreferAvoidPodsEntry,
+ Convert_api_PreferAvoidPodsEntry_To_v1_PreferAvoidPodsEntry,
+ Convert_v1_PreferredSchedulingTerm_To_api_PreferredSchedulingTerm,
+ Convert_api_PreferredSchedulingTerm_To_v1_PreferredSchedulingTerm,
+ Convert_v1_Probe_To_api_Probe,
+ Convert_api_Probe_To_v1_Probe,
+ Convert_v1_ProjectedVolumeSource_To_api_ProjectedVolumeSource,
+ Convert_api_ProjectedVolumeSource_To_v1_ProjectedVolumeSource,
+ Convert_v1_QuobyteVolumeSource_To_api_QuobyteVolumeSource,
+ Convert_api_QuobyteVolumeSource_To_v1_QuobyteVolumeSource,
+ Convert_v1_RBDVolumeSource_To_api_RBDVolumeSource,
+ Convert_api_RBDVolumeSource_To_v1_RBDVolumeSource,
+ Convert_v1_RangeAllocation_To_api_RangeAllocation,
+ Convert_api_RangeAllocation_To_v1_RangeAllocation,
+ Convert_v1_ReplicationController_To_api_ReplicationController,
+ Convert_api_ReplicationController_To_v1_ReplicationController,
+ Convert_v1_ReplicationControllerCondition_To_api_ReplicationControllerCondition,
+ Convert_api_ReplicationControllerCondition_To_v1_ReplicationControllerCondition,
+ Convert_v1_ReplicationControllerList_To_api_ReplicationControllerList,
+ Convert_api_ReplicationControllerList_To_v1_ReplicationControllerList,
+ Convert_v1_ReplicationControllerSpec_To_api_ReplicationControllerSpec,
+ Convert_api_ReplicationControllerSpec_To_v1_ReplicationControllerSpec,
+ Convert_v1_ReplicationControllerStatus_To_api_ReplicationControllerStatus,
+ Convert_api_ReplicationControllerStatus_To_v1_ReplicationControllerStatus,
+ Convert_v1_ResourceFieldSelector_To_api_ResourceFieldSelector,
+ Convert_api_ResourceFieldSelector_To_v1_ResourceFieldSelector,
+ Convert_v1_ResourceQuota_To_api_ResourceQuota,
+ Convert_api_ResourceQuota_To_v1_ResourceQuota,
+ Convert_v1_ResourceQuotaList_To_api_ResourceQuotaList,
+ Convert_api_ResourceQuotaList_To_v1_ResourceQuotaList,
+ Convert_v1_ResourceQuotaSpec_To_api_ResourceQuotaSpec,
+ Convert_api_ResourceQuotaSpec_To_v1_ResourceQuotaSpec,
+ Convert_v1_ResourceQuotaStatus_To_api_ResourceQuotaStatus,
+ Convert_api_ResourceQuotaStatus_To_v1_ResourceQuotaStatus,
+ Convert_v1_ResourceRequirements_To_api_ResourceRequirements,
+ Convert_api_ResourceRequirements_To_v1_ResourceRequirements,
+ Convert_v1_SELinuxOptions_To_api_SELinuxOptions,
+ Convert_api_SELinuxOptions_To_v1_SELinuxOptions,
+ Convert_v1_ScaleIOVolumeSource_To_api_ScaleIOVolumeSource,
+ Convert_api_ScaleIOVolumeSource_To_v1_ScaleIOVolumeSource,
+ Convert_v1_Secret_To_api_Secret,
+ Convert_api_Secret_To_v1_Secret,
+ Convert_v1_SecretEnvSource_To_api_SecretEnvSource,
+ Convert_api_SecretEnvSource_To_v1_SecretEnvSource,
+ Convert_v1_SecretKeySelector_To_api_SecretKeySelector,
+ Convert_api_SecretKeySelector_To_v1_SecretKeySelector,
+ Convert_v1_SecretList_To_api_SecretList,
+ Convert_api_SecretList_To_v1_SecretList,
+ Convert_v1_SecretProjection_To_api_SecretProjection,
+ Convert_api_SecretProjection_To_v1_SecretProjection,
+ Convert_v1_SecretVolumeSource_To_api_SecretVolumeSource,
+ Convert_api_SecretVolumeSource_To_v1_SecretVolumeSource,
+ Convert_v1_SecurityContext_To_api_SecurityContext,
+ Convert_api_SecurityContext_To_v1_SecurityContext,
+ Convert_v1_SerializedReference_To_api_SerializedReference,
+ Convert_api_SerializedReference_To_v1_SerializedReference,
+ Convert_v1_Service_To_api_Service,
+ Convert_api_Service_To_v1_Service,
+ Convert_v1_ServiceAccount_To_api_ServiceAccount,
+ Convert_api_ServiceAccount_To_v1_ServiceAccount,
+ Convert_v1_ServiceAccountList_To_api_ServiceAccountList,
+ Convert_api_ServiceAccountList_To_v1_ServiceAccountList,
+ Convert_v1_ServiceList_To_api_ServiceList,
+ Convert_api_ServiceList_To_v1_ServiceList,
+ Convert_v1_ServicePort_To_api_ServicePort,
+ Convert_api_ServicePort_To_v1_ServicePort,
+ Convert_v1_ServiceProxyOptions_To_api_ServiceProxyOptions,
+ Convert_api_ServiceProxyOptions_To_v1_ServiceProxyOptions,
+ Convert_v1_ServiceSpec_To_api_ServiceSpec,
+ Convert_api_ServiceSpec_To_v1_ServiceSpec,
+ Convert_v1_ServiceStatus_To_api_ServiceStatus,
+ Convert_api_ServiceStatus_To_v1_ServiceStatus,
+ Convert_v1_StorageOSPersistentVolumeSource_To_api_StorageOSPersistentVolumeSource,
+ Convert_api_StorageOSPersistentVolumeSource_To_v1_StorageOSPersistentVolumeSource,
+ Convert_v1_StorageOSVolumeSource_To_api_StorageOSVolumeSource,
+ Convert_api_StorageOSVolumeSource_To_v1_StorageOSVolumeSource,
+ Convert_v1_Sysctl_To_api_Sysctl,
+ Convert_api_Sysctl_To_v1_Sysctl,
+ Convert_v1_TCPSocketAction_To_api_TCPSocketAction,
+ Convert_api_TCPSocketAction_To_v1_TCPSocketAction,
+ Convert_v1_Taint_To_api_Taint,
+ Convert_api_Taint_To_v1_Taint,
+ Convert_v1_Toleration_To_api_Toleration,
+ Convert_api_Toleration_To_v1_Toleration,
+ Convert_v1_Volume_To_api_Volume,
+ Convert_api_Volume_To_v1_Volume,
+ Convert_v1_VolumeMount_To_api_VolumeMount,
+ Convert_api_VolumeMount_To_v1_VolumeMount,
+ Convert_v1_VolumeProjection_To_api_VolumeProjection,
+ Convert_api_VolumeProjection_To_v1_VolumeProjection,
+ Convert_v1_VolumeSource_To_api_VolumeSource,
+ Convert_api_VolumeSource_To_v1_VolumeSource,
+ Convert_v1_VsphereVirtualDiskVolumeSource_To_api_VsphereVirtualDiskVolumeSource,
+ Convert_api_VsphereVirtualDiskVolumeSource_To_v1_VsphereVirtualDiskVolumeSource,
+ Convert_v1_WeightedPodAffinityTerm_To_api_WeightedPodAffinityTerm,
+ Convert_api_WeightedPodAffinityTerm_To_v1_WeightedPodAffinityTerm,
+ )
+}
+
+func autoConvert_v1_AWSElasticBlockStoreVolumeSource_To_api_AWSElasticBlockStoreVolumeSource(in *AWSElasticBlockStoreVolumeSource, out *api.AWSElasticBlockStoreVolumeSource, s conversion.Scope) error {
+ out.VolumeID = in.VolumeID
+ out.FSType = in.FSType
+ out.Partition = in.Partition
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_v1_AWSElasticBlockStoreVolumeSource_To_api_AWSElasticBlockStoreVolumeSource is an autogenerated conversion function.
+func Convert_v1_AWSElasticBlockStoreVolumeSource_To_api_AWSElasticBlockStoreVolumeSource(in *AWSElasticBlockStoreVolumeSource, out *api.AWSElasticBlockStoreVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_AWSElasticBlockStoreVolumeSource_To_api_AWSElasticBlockStoreVolumeSource(in, out, s)
+}
+
+func autoConvert_api_AWSElasticBlockStoreVolumeSource_To_v1_AWSElasticBlockStoreVolumeSource(in *api.AWSElasticBlockStoreVolumeSource, out *AWSElasticBlockStoreVolumeSource, s conversion.Scope) error {
+ out.VolumeID = in.VolumeID
+ out.FSType = in.FSType
+ out.Partition = in.Partition
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_api_AWSElasticBlockStoreVolumeSource_To_v1_AWSElasticBlockStoreVolumeSource is an autogenerated conversion function.
+func Convert_api_AWSElasticBlockStoreVolumeSource_To_v1_AWSElasticBlockStoreVolumeSource(in *api.AWSElasticBlockStoreVolumeSource, out *AWSElasticBlockStoreVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_AWSElasticBlockStoreVolumeSource_To_v1_AWSElasticBlockStoreVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_Affinity_To_api_Affinity(in *Affinity, out *api.Affinity, s conversion.Scope) error {
+ out.NodeAffinity = (*api.NodeAffinity)(unsafe.Pointer(in.NodeAffinity))
+ out.PodAffinity = (*api.PodAffinity)(unsafe.Pointer(in.PodAffinity))
+ out.PodAntiAffinity = (*api.PodAntiAffinity)(unsafe.Pointer(in.PodAntiAffinity))
+ return nil
+}
+
+// Convert_v1_Affinity_To_api_Affinity is an autogenerated conversion function.
+func Convert_v1_Affinity_To_api_Affinity(in *Affinity, out *api.Affinity, s conversion.Scope) error {
+ return autoConvert_v1_Affinity_To_api_Affinity(in, out, s)
+}
+
+func autoConvert_api_Affinity_To_v1_Affinity(in *api.Affinity, out *Affinity, s conversion.Scope) error {
+ out.NodeAffinity = (*NodeAffinity)(unsafe.Pointer(in.NodeAffinity))
+ out.PodAffinity = (*PodAffinity)(unsafe.Pointer(in.PodAffinity))
+ out.PodAntiAffinity = (*PodAntiAffinity)(unsafe.Pointer(in.PodAntiAffinity))
+ return nil
+}
+
+// Convert_api_Affinity_To_v1_Affinity is an autogenerated conversion function.
+func Convert_api_Affinity_To_v1_Affinity(in *api.Affinity, out *Affinity, s conversion.Scope) error {
+ return autoConvert_api_Affinity_To_v1_Affinity(in, out, s)
+}
+
+func autoConvert_v1_AttachedVolume_To_api_AttachedVolume(in *AttachedVolume, out *api.AttachedVolume, s conversion.Scope) error {
+ out.Name = api.UniqueVolumeName(in.Name)
+ out.DevicePath = in.DevicePath
+ return nil
+}
+
+// Convert_v1_AttachedVolume_To_api_AttachedVolume is an autogenerated conversion function.
+func Convert_v1_AttachedVolume_To_api_AttachedVolume(in *AttachedVolume, out *api.AttachedVolume, s conversion.Scope) error {
+ return autoConvert_v1_AttachedVolume_To_api_AttachedVolume(in, out, s)
+}
+
+func autoConvert_api_AttachedVolume_To_v1_AttachedVolume(in *api.AttachedVolume, out *AttachedVolume, s conversion.Scope) error {
+ out.Name = UniqueVolumeName(in.Name)
+ out.DevicePath = in.DevicePath
+ return nil
+}
+
+// Convert_api_AttachedVolume_To_v1_AttachedVolume is an autogenerated conversion function.
+func Convert_api_AttachedVolume_To_v1_AttachedVolume(in *api.AttachedVolume, out *AttachedVolume, s conversion.Scope) error {
+ return autoConvert_api_AttachedVolume_To_v1_AttachedVolume(in, out, s)
+}
+
+func autoConvert_v1_AvoidPods_To_api_AvoidPods(in *AvoidPods, out *api.AvoidPods, s conversion.Scope) error {
+ out.PreferAvoidPods = *(*[]api.PreferAvoidPodsEntry)(unsafe.Pointer(&in.PreferAvoidPods))
+ return nil
+}
+
+// Convert_v1_AvoidPods_To_api_AvoidPods is an autogenerated conversion function.
+func Convert_v1_AvoidPods_To_api_AvoidPods(in *AvoidPods, out *api.AvoidPods, s conversion.Scope) error {
+ return autoConvert_v1_AvoidPods_To_api_AvoidPods(in, out, s)
+}
+
+func autoConvert_api_AvoidPods_To_v1_AvoidPods(in *api.AvoidPods, out *AvoidPods, s conversion.Scope) error {
+ out.PreferAvoidPods = *(*[]PreferAvoidPodsEntry)(unsafe.Pointer(&in.PreferAvoidPods))
+ return nil
+}
+
+// Convert_api_AvoidPods_To_v1_AvoidPods is an autogenerated conversion function.
+func Convert_api_AvoidPods_To_v1_AvoidPods(in *api.AvoidPods, out *AvoidPods, s conversion.Scope) error {
+ return autoConvert_api_AvoidPods_To_v1_AvoidPods(in, out, s)
+}
+
+func autoConvert_v1_AzureDiskVolumeSource_To_api_AzureDiskVolumeSource(in *AzureDiskVolumeSource, out *api.AzureDiskVolumeSource, s conversion.Scope) error {
+ out.DiskName = in.DiskName
+ out.DataDiskURI = in.DataDiskURI
+ out.CachingMode = (*api.AzureDataDiskCachingMode)(unsafe.Pointer(in.CachingMode))
+ out.FSType = (*string)(unsafe.Pointer(in.FSType))
+ out.ReadOnly = (*bool)(unsafe.Pointer(in.ReadOnly))
+ out.Kind = (*api.AzureDataDiskKind)(unsafe.Pointer(in.Kind))
+ return nil
+}
+
+// Convert_v1_AzureDiskVolumeSource_To_api_AzureDiskVolumeSource is an autogenerated conversion function.
+func Convert_v1_AzureDiskVolumeSource_To_api_AzureDiskVolumeSource(in *AzureDiskVolumeSource, out *api.AzureDiskVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_AzureDiskVolumeSource_To_api_AzureDiskVolumeSource(in, out, s)
+}
+
+func autoConvert_api_AzureDiskVolumeSource_To_v1_AzureDiskVolumeSource(in *api.AzureDiskVolumeSource, out *AzureDiskVolumeSource, s conversion.Scope) error {
+ out.DiskName = in.DiskName
+ out.DataDiskURI = in.DataDiskURI
+ out.CachingMode = (*AzureDataDiskCachingMode)(unsafe.Pointer(in.CachingMode))
+ out.FSType = (*string)(unsafe.Pointer(in.FSType))
+ out.ReadOnly = (*bool)(unsafe.Pointer(in.ReadOnly))
+ out.Kind = (*AzureDataDiskKind)(unsafe.Pointer(in.Kind))
+ return nil
+}
+
+// Convert_api_AzureDiskVolumeSource_To_v1_AzureDiskVolumeSource is an autogenerated conversion function.
+func Convert_api_AzureDiskVolumeSource_To_v1_AzureDiskVolumeSource(in *api.AzureDiskVolumeSource, out *AzureDiskVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_AzureDiskVolumeSource_To_v1_AzureDiskVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_AzureFileVolumeSource_To_api_AzureFileVolumeSource(in *AzureFileVolumeSource, out *api.AzureFileVolumeSource, s conversion.Scope) error {
+ out.SecretName = in.SecretName
+ out.ShareName = in.ShareName
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_v1_AzureFileVolumeSource_To_api_AzureFileVolumeSource is an autogenerated conversion function.
+func Convert_v1_AzureFileVolumeSource_To_api_AzureFileVolumeSource(in *AzureFileVolumeSource, out *api.AzureFileVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_AzureFileVolumeSource_To_api_AzureFileVolumeSource(in, out, s)
+}
+
+func autoConvert_api_AzureFileVolumeSource_To_v1_AzureFileVolumeSource(in *api.AzureFileVolumeSource, out *AzureFileVolumeSource, s conversion.Scope) error {
+ out.SecretName = in.SecretName
+ out.ShareName = in.ShareName
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_api_AzureFileVolumeSource_To_v1_AzureFileVolumeSource is an autogenerated conversion function.
+func Convert_api_AzureFileVolumeSource_To_v1_AzureFileVolumeSource(in *api.AzureFileVolumeSource, out *AzureFileVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_AzureFileVolumeSource_To_v1_AzureFileVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_Binding_To_api_Binding(in *Binding, out *api.Binding, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_ObjectReference_To_api_ObjectReference(&in.Target, &out.Target, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_Binding_To_api_Binding is an autogenerated conversion function.
+func Convert_v1_Binding_To_api_Binding(in *Binding, out *api.Binding, s conversion.Scope) error {
+ return autoConvert_v1_Binding_To_api_Binding(in, out, s)
+}
+
+func autoConvert_api_Binding_To_v1_Binding(in *api.Binding, out *Binding, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_api_ObjectReference_To_v1_ObjectReference(&in.Target, &out.Target, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_Binding_To_v1_Binding is an autogenerated conversion function.
+func Convert_api_Binding_To_v1_Binding(in *api.Binding, out *Binding, s conversion.Scope) error {
+ return autoConvert_api_Binding_To_v1_Binding(in, out, s)
+}
+
+func autoConvert_v1_Capabilities_To_api_Capabilities(in *Capabilities, out *api.Capabilities, s conversion.Scope) error {
+ out.Add = *(*[]api.Capability)(unsafe.Pointer(&in.Add))
+ out.Drop = *(*[]api.Capability)(unsafe.Pointer(&in.Drop))
+ return nil
+}
+
+// Convert_v1_Capabilities_To_api_Capabilities is an autogenerated conversion function.
+func Convert_v1_Capabilities_To_api_Capabilities(in *Capabilities, out *api.Capabilities, s conversion.Scope) error {
+ return autoConvert_v1_Capabilities_To_api_Capabilities(in, out, s)
+}
+
+func autoConvert_api_Capabilities_To_v1_Capabilities(in *api.Capabilities, out *Capabilities, s conversion.Scope) error {
+ out.Add = *(*[]Capability)(unsafe.Pointer(&in.Add))
+ out.Drop = *(*[]Capability)(unsafe.Pointer(&in.Drop))
+ return nil
+}
+
+// Convert_api_Capabilities_To_v1_Capabilities is an autogenerated conversion function.
+func Convert_api_Capabilities_To_v1_Capabilities(in *api.Capabilities, out *Capabilities, s conversion.Scope) error {
+ return autoConvert_api_Capabilities_To_v1_Capabilities(in, out, s)
+}
+
+func autoConvert_v1_CephFSVolumeSource_To_api_CephFSVolumeSource(in *CephFSVolumeSource, out *api.CephFSVolumeSource, s conversion.Scope) error {
+ out.Monitors = *(*[]string)(unsafe.Pointer(&in.Monitors))
+ out.Path = in.Path
+ out.User = in.User
+ out.SecretFile = in.SecretFile
+ out.SecretRef = (*api.LocalObjectReference)(unsafe.Pointer(in.SecretRef))
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_v1_CephFSVolumeSource_To_api_CephFSVolumeSource is an autogenerated conversion function.
+func Convert_v1_CephFSVolumeSource_To_api_CephFSVolumeSource(in *CephFSVolumeSource, out *api.CephFSVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_CephFSVolumeSource_To_api_CephFSVolumeSource(in, out, s)
+}
+
+func autoConvert_api_CephFSVolumeSource_To_v1_CephFSVolumeSource(in *api.CephFSVolumeSource, out *CephFSVolumeSource, s conversion.Scope) error {
+ if in.Monitors == nil {
+ out.Monitors = make([]string, 0)
+ } else {
+ out.Monitors = *(*[]string)(unsafe.Pointer(&in.Monitors))
+ }
+ out.Path = in.Path
+ out.User = in.User
+ out.SecretFile = in.SecretFile
+ out.SecretRef = (*LocalObjectReference)(unsafe.Pointer(in.SecretRef))
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_api_CephFSVolumeSource_To_v1_CephFSVolumeSource is an autogenerated conversion function.
+func Convert_api_CephFSVolumeSource_To_v1_CephFSVolumeSource(in *api.CephFSVolumeSource, out *CephFSVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_CephFSVolumeSource_To_v1_CephFSVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_CinderVolumeSource_To_api_CinderVolumeSource(in *CinderVolumeSource, out *api.CinderVolumeSource, s conversion.Scope) error {
+ out.VolumeID = in.VolumeID
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_v1_CinderVolumeSource_To_api_CinderVolumeSource is an autogenerated conversion function.
+func Convert_v1_CinderVolumeSource_To_api_CinderVolumeSource(in *CinderVolumeSource, out *api.CinderVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_CinderVolumeSource_To_api_CinderVolumeSource(in, out, s)
+}
+
+func autoConvert_api_CinderVolumeSource_To_v1_CinderVolumeSource(in *api.CinderVolumeSource, out *CinderVolumeSource, s conversion.Scope) error {
+ out.VolumeID = in.VolumeID
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_api_CinderVolumeSource_To_v1_CinderVolumeSource is an autogenerated conversion function.
+func Convert_api_CinderVolumeSource_To_v1_CinderVolumeSource(in *api.CinderVolumeSource, out *CinderVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_CinderVolumeSource_To_v1_CinderVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_ComponentCondition_To_api_ComponentCondition(in *ComponentCondition, out *api.ComponentCondition, s conversion.Scope) error {
+ out.Type = api.ComponentConditionType(in.Type)
+ out.Status = api.ConditionStatus(in.Status)
+ out.Message = in.Message
+ out.Error = in.Error
+ return nil
+}
+
+// Convert_v1_ComponentCondition_To_api_ComponentCondition is an autogenerated conversion function.
+func Convert_v1_ComponentCondition_To_api_ComponentCondition(in *ComponentCondition, out *api.ComponentCondition, s conversion.Scope) error {
+ return autoConvert_v1_ComponentCondition_To_api_ComponentCondition(in, out, s)
+}
+
+func autoConvert_api_ComponentCondition_To_v1_ComponentCondition(in *api.ComponentCondition, out *ComponentCondition, s conversion.Scope) error {
+ out.Type = ComponentConditionType(in.Type)
+ out.Status = ConditionStatus(in.Status)
+ out.Message = in.Message
+ out.Error = in.Error
+ return nil
+}
+
+// Convert_api_ComponentCondition_To_v1_ComponentCondition is an autogenerated conversion function.
+func Convert_api_ComponentCondition_To_v1_ComponentCondition(in *api.ComponentCondition, out *ComponentCondition, s conversion.Scope) error {
+ return autoConvert_api_ComponentCondition_To_v1_ComponentCondition(in, out, s)
+}
+
+func autoConvert_v1_ComponentStatus_To_api_ComponentStatus(in *ComponentStatus, out *api.ComponentStatus, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Conditions = *(*[]api.ComponentCondition)(unsafe.Pointer(&in.Conditions))
+ return nil
+}
+
+// Convert_v1_ComponentStatus_To_api_ComponentStatus is an autogenerated conversion function.
+func Convert_v1_ComponentStatus_To_api_ComponentStatus(in *ComponentStatus, out *api.ComponentStatus, s conversion.Scope) error {
+ return autoConvert_v1_ComponentStatus_To_api_ComponentStatus(in, out, s)
+}
+
+func autoConvert_api_ComponentStatus_To_v1_ComponentStatus(in *api.ComponentStatus, out *ComponentStatus, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Conditions = *(*[]ComponentCondition)(unsafe.Pointer(&in.Conditions))
+ return nil
+}
+
+// Convert_api_ComponentStatus_To_v1_ComponentStatus is an autogenerated conversion function.
+func Convert_api_ComponentStatus_To_v1_ComponentStatus(in *api.ComponentStatus, out *ComponentStatus, s conversion.Scope) error {
+ return autoConvert_api_ComponentStatus_To_v1_ComponentStatus(in, out, s)
+}
+
+func autoConvert_v1_ComponentStatusList_To_api_ComponentStatusList(in *ComponentStatusList, out *api.ComponentStatusList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]api.ComponentStatus)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1_ComponentStatusList_To_api_ComponentStatusList is an autogenerated conversion function.
+func Convert_v1_ComponentStatusList_To_api_ComponentStatusList(in *ComponentStatusList, out *api.ComponentStatusList, s conversion.Scope) error {
+ return autoConvert_v1_ComponentStatusList_To_api_ComponentStatusList(in, out, s)
+}
+
+func autoConvert_api_ComponentStatusList_To_v1_ComponentStatusList(in *api.ComponentStatusList, out *ComponentStatusList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]ComponentStatus, 0)
+ } else {
+ out.Items = *(*[]ComponentStatus)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_api_ComponentStatusList_To_v1_ComponentStatusList is an autogenerated conversion function.
+func Convert_api_ComponentStatusList_To_v1_ComponentStatusList(in *api.ComponentStatusList, out *ComponentStatusList, s conversion.Scope) error {
+ return autoConvert_api_ComponentStatusList_To_v1_ComponentStatusList(in, out, s)
+}
+
+func autoConvert_v1_ConfigMap_To_api_ConfigMap(in *ConfigMap, out *api.ConfigMap, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Data = *(*map[string]string)(unsafe.Pointer(&in.Data))
+ return nil
+}
+
+// Convert_v1_ConfigMap_To_api_ConfigMap is an autogenerated conversion function.
+func Convert_v1_ConfigMap_To_api_ConfigMap(in *ConfigMap, out *api.ConfigMap, s conversion.Scope) error {
+ return autoConvert_v1_ConfigMap_To_api_ConfigMap(in, out, s)
+}
+
+func autoConvert_api_ConfigMap_To_v1_ConfigMap(in *api.ConfigMap, out *ConfigMap, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Data = *(*map[string]string)(unsafe.Pointer(&in.Data))
+ return nil
+}
+
+// Convert_api_ConfigMap_To_v1_ConfigMap is an autogenerated conversion function.
+func Convert_api_ConfigMap_To_v1_ConfigMap(in *api.ConfigMap, out *ConfigMap, s conversion.Scope) error {
+ return autoConvert_api_ConfigMap_To_v1_ConfigMap(in, out, s)
+}
+
+func autoConvert_v1_ConfigMapEnvSource_To_api_ConfigMapEnvSource(in *ConfigMapEnvSource, out *api.ConfigMapEnvSource, s conversion.Scope) error {
+ if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
+ return err
+ }
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_v1_ConfigMapEnvSource_To_api_ConfigMapEnvSource is an autogenerated conversion function.
+func Convert_v1_ConfigMapEnvSource_To_api_ConfigMapEnvSource(in *ConfigMapEnvSource, out *api.ConfigMapEnvSource, s conversion.Scope) error {
+ return autoConvert_v1_ConfigMapEnvSource_To_api_ConfigMapEnvSource(in, out, s)
+}
+
+func autoConvert_api_ConfigMapEnvSource_To_v1_ConfigMapEnvSource(in *api.ConfigMapEnvSource, out *ConfigMapEnvSource, s conversion.Scope) error {
+ if err := Convert_api_LocalObjectReference_To_v1_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
+ return err
+ }
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_api_ConfigMapEnvSource_To_v1_ConfigMapEnvSource is an autogenerated conversion function.
+func Convert_api_ConfigMapEnvSource_To_v1_ConfigMapEnvSource(in *api.ConfigMapEnvSource, out *ConfigMapEnvSource, s conversion.Scope) error {
+ return autoConvert_api_ConfigMapEnvSource_To_v1_ConfigMapEnvSource(in, out, s)
+}
+
+func autoConvert_v1_ConfigMapKeySelector_To_api_ConfigMapKeySelector(in *ConfigMapKeySelector, out *api.ConfigMapKeySelector, s conversion.Scope) error {
+ if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
+ return err
+ }
+ out.Key = in.Key
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_v1_ConfigMapKeySelector_To_api_ConfigMapKeySelector is an autogenerated conversion function.
+func Convert_v1_ConfigMapKeySelector_To_api_ConfigMapKeySelector(in *ConfigMapKeySelector, out *api.ConfigMapKeySelector, s conversion.Scope) error {
+ return autoConvert_v1_ConfigMapKeySelector_To_api_ConfigMapKeySelector(in, out, s)
+}
+
+func autoConvert_api_ConfigMapKeySelector_To_v1_ConfigMapKeySelector(in *api.ConfigMapKeySelector, out *ConfigMapKeySelector, s conversion.Scope) error {
+ if err := Convert_api_LocalObjectReference_To_v1_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
+ return err
+ }
+ out.Key = in.Key
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_api_ConfigMapKeySelector_To_v1_ConfigMapKeySelector is an autogenerated conversion function.
+func Convert_api_ConfigMapKeySelector_To_v1_ConfigMapKeySelector(in *api.ConfigMapKeySelector, out *ConfigMapKeySelector, s conversion.Scope) error {
+ return autoConvert_api_ConfigMapKeySelector_To_v1_ConfigMapKeySelector(in, out, s)
+}
+
+func autoConvert_v1_ConfigMapList_To_api_ConfigMapList(in *ConfigMapList, out *api.ConfigMapList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]api.ConfigMap)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1_ConfigMapList_To_api_ConfigMapList is an autogenerated conversion function.
+func Convert_v1_ConfigMapList_To_api_ConfigMapList(in *ConfigMapList, out *api.ConfigMapList, s conversion.Scope) error {
+ return autoConvert_v1_ConfigMapList_To_api_ConfigMapList(in, out, s)
+}
+
+func autoConvert_api_ConfigMapList_To_v1_ConfigMapList(in *api.ConfigMapList, out *ConfigMapList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]ConfigMap, 0)
+ } else {
+ out.Items = *(*[]ConfigMap)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_api_ConfigMapList_To_v1_ConfigMapList is an autogenerated conversion function.
+func Convert_api_ConfigMapList_To_v1_ConfigMapList(in *api.ConfigMapList, out *ConfigMapList, s conversion.Scope) error {
+ return autoConvert_api_ConfigMapList_To_v1_ConfigMapList(in, out, s)
+}
+
+func autoConvert_v1_ConfigMapProjection_To_api_ConfigMapProjection(in *ConfigMapProjection, out *api.ConfigMapProjection, s conversion.Scope) error {
+ if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
+ return err
+ }
+ out.Items = *(*[]api.KeyToPath)(unsafe.Pointer(&in.Items))
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_v1_ConfigMapProjection_To_api_ConfigMapProjection is an autogenerated conversion function.
+func Convert_v1_ConfigMapProjection_To_api_ConfigMapProjection(in *ConfigMapProjection, out *api.ConfigMapProjection, s conversion.Scope) error {
+ return autoConvert_v1_ConfigMapProjection_To_api_ConfigMapProjection(in, out, s)
+}
+
+func autoConvert_api_ConfigMapProjection_To_v1_ConfigMapProjection(in *api.ConfigMapProjection, out *ConfigMapProjection, s conversion.Scope) error {
+ if err := Convert_api_LocalObjectReference_To_v1_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
+ return err
+ }
+ out.Items = *(*[]KeyToPath)(unsafe.Pointer(&in.Items))
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_api_ConfigMapProjection_To_v1_ConfigMapProjection is an autogenerated conversion function.
+func Convert_api_ConfigMapProjection_To_v1_ConfigMapProjection(in *api.ConfigMapProjection, out *ConfigMapProjection, s conversion.Scope) error {
+ return autoConvert_api_ConfigMapProjection_To_v1_ConfigMapProjection(in, out, s)
+}
+
+func autoConvert_v1_ConfigMapVolumeSource_To_api_ConfigMapVolumeSource(in *ConfigMapVolumeSource, out *api.ConfigMapVolumeSource, s conversion.Scope) error {
+ if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
+ return err
+ }
+ out.Items = *(*[]api.KeyToPath)(unsafe.Pointer(&in.Items))
+ out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode))
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_v1_ConfigMapVolumeSource_To_api_ConfigMapVolumeSource is an autogenerated conversion function.
+func Convert_v1_ConfigMapVolumeSource_To_api_ConfigMapVolumeSource(in *ConfigMapVolumeSource, out *api.ConfigMapVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_ConfigMapVolumeSource_To_api_ConfigMapVolumeSource(in, out, s)
+}
+
+func autoConvert_api_ConfigMapVolumeSource_To_v1_ConfigMapVolumeSource(in *api.ConfigMapVolumeSource, out *ConfigMapVolumeSource, s conversion.Scope) error {
+ if err := Convert_api_LocalObjectReference_To_v1_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
+ return err
+ }
+ out.Items = *(*[]KeyToPath)(unsafe.Pointer(&in.Items))
+ out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode))
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_api_ConfigMapVolumeSource_To_v1_ConfigMapVolumeSource is an autogenerated conversion function.
+func Convert_api_ConfigMapVolumeSource_To_v1_ConfigMapVolumeSource(in *api.ConfigMapVolumeSource, out *ConfigMapVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_ConfigMapVolumeSource_To_v1_ConfigMapVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_Container_To_api_Container(in *Container, out *api.Container, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Image = in.Image
+ out.Command = *(*[]string)(unsafe.Pointer(&in.Command))
+ out.Args = *(*[]string)(unsafe.Pointer(&in.Args))
+ out.WorkingDir = in.WorkingDir
+ out.Ports = *(*[]api.ContainerPort)(unsafe.Pointer(&in.Ports))
+ out.EnvFrom = *(*[]api.EnvFromSource)(unsafe.Pointer(&in.EnvFrom))
+ out.Env = *(*[]api.EnvVar)(unsafe.Pointer(&in.Env))
+ if err := Convert_v1_ResourceRequirements_To_api_ResourceRequirements(&in.Resources, &out.Resources, s); err != nil {
+ return err
+ }
+ out.VolumeMounts = *(*[]api.VolumeMount)(unsafe.Pointer(&in.VolumeMounts))
+ out.LivenessProbe = (*api.Probe)(unsafe.Pointer(in.LivenessProbe))
+ out.ReadinessProbe = (*api.Probe)(unsafe.Pointer(in.ReadinessProbe))
+ out.Lifecycle = (*api.Lifecycle)(unsafe.Pointer(in.Lifecycle))
+ out.TerminationMessagePath = in.TerminationMessagePath
+ out.TerminationMessagePolicy = api.TerminationMessagePolicy(in.TerminationMessagePolicy)
+ out.ImagePullPolicy = api.PullPolicy(in.ImagePullPolicy)
+ out.SecurityContext = (*api.SecurityContext)(unsafe.Pointer(in.SecurityContext))
+ out.Stdin = in.Stdin
+ out.StdinOnce = in.StdinOnce
+ out.TTY = in.TTY
+ return nil
+}
+
+// Convert_v1_Container_To_api_Container is an autogenerated conversion function.
+func Convert_v1_Container_To_api_Container(in *Container, out *api.Container, s conversion.Scope) error {
+ return autoConvert_v1_Container_To_api_Container(in, out, s)
+}
+
+func autoConvert_api_Container_To_v1_Container(in *api.Container, out *Container, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Image = in.Image
+ out.Command = *(*[]string)(unsafe.Pointer(&in.Command))
+ out.Args = *(*[]string)(unsafe.Pointer(&in.Args))
+ out.WorkingDir = in.WorkingDir
+ out.Ports = *(*[]ContainerPort)(unsafe.Pointer(&in.Ports))
+ out.EnvFrom = *(*[]EnvFromSource)(unsafe.Pointer(&in.EnvFrom))
+ out.Env = *(*[]EnvVar)(unsafe.Pointer(&in.Env))
+ if err := Convert_api_ResourceRequirements_To_v1_ResourceRequirements(&in.Resources, &out.Resources, s); err != nil {
+ return err
+ }
+ out.VolumeMounts = *(*[]VolumeMount)(unsafe.Pointer(&in.VolumeMounts))
+ out.LivenessProbe = (*Probe)(unsafe.Pointer(in.LivenessProbe))
+ out.ReadinessProbe = (*Probe)(unsafe.Pointer(in.ReadinessProbe))
+ out.Lifecycle = (*Lifecycle)(unsafe.Pointer(in.Lifecycle))
+ out.TerminationMessagePath = in.TerminationMessagePath
+ out.TerminationMessagePolicy = TerminationMessagePolicy(in.TerminationMessagePolicy)
+ out.ImagePullPolicy = PullPolicy(in.ImagePullPolicy)
+ out.SecurityContext = (*SecurityContext)(unsafe.Pointer(in.SecurityContext))
+ out.Stdin = in.Stdin
+ out.StdinOnce = in.StdinOnce
+ out.TTY = in.TTY
+ return nil
+}
+
+// Convert_api_Container_To_v1_Container is an autogenerated conversion function.
+func Convert_api_Container_To_v1_Container(in *api.Container, out *Container, s conversion.Scope) error {
+ return autoConvert_api_Container_To_v1_Container(in, out, s)
+}
+
+func autoConvert_v1_ContainerImage_To_api_ContainerImage(in *ContainerImage, out *api.ContainerImage, s conversion.Scope) error {
+ out.Names = *(*[]string)(unsafe.Pointer(&in.Names))
+ out.SizeBytes = in.SizeBytes
+ return nil
+}
+
+// Convert_v1_ContainerImage_To_api_ContainerImage is an autogenerated conversion function.
+func Convert_v1_ContainerImage_To_api_ContainerImage(in *ContainerImage, out *api.ContainerImage, s conversion.Scope) error {
+ return autoConvert_v1_ContainerImage_To_api_ContainerImage(in, out, s)
+}
+
+func autoConvert_api_ContainerImage_To_v1_ContainerImage(in *api.ContainerImage, out *ContainerImage, s conversion.Scope) error {
+ if in.Names == nil {
+ out.Names = make([]string, 0)
+ } else {
+ out.Names = *(*[]string)(unsafe.Pointer(&in.Names))
+ }
+ out.SizeBytes = in.SizeBytes
+ return nil
+}
+
+// Convert_api_ContainerImage_To_v1_ContainerImage is an autogenerated conversion function.
+func Convert_api_ContainerImage_To_v1_ContainerImage(in *api.ContainerImage, out *ContainerImage, s conversion.Scope) error {
+ return autoConvert_api_ContainerImage_To_v1_ContainerImage(in, out, s)
+}
+
+func autoConvert_v1_ContainerPort_To_api_ContainerPort(in *ContainerPort, out *api.ContainerPort, s conversion.Scope) error {
+ out.Name = in.Name
+ out.HostPort = in.HostPort
+ out.ContainerPort = in.ContainerPort
+ out.Protocol = api.Protocol(in.Protocol)
+ out.HostIP = in.HostIP
+ return nil
+}
+
+// Convert_v1_ContainerPort_To_api_ContainerPort is an autogenerated conversion function.
+func Convert_v1_ContainerPort_To_api_ContainerPort(in *ContainerPort, out *api.ContainerPort, s conversion.Scope) error {
+ return autoConvert_v1_ContainerPort_To_api_ContainerPort(in, out, s)
+}
+
+func autoConvert_api_ContainerPort_To_v1_ContainerPort(in *api.ContainerPort, out *ContainerPort, s conversion.Scope) error {
+ out.Name = in.Name
+ out.HostPort = in.HostPort
+ out.ContainerPort = in.ContainerPort
+ out.Protocol = Protocol(in.Protocol)
+ out.HostIP = in.HostIP
+ return nil
+}
+
+// Convert_api_ContainerPort_To_v1_ContainerPort is an autogenerated conversion function.
+func Convert_api_ContainerPort_To_v1_ContainerPort(in *api.ContainerPort, out *ContainerPort, s conversion.Scope) error {
+ return autoConvert_api_ContainerPort_To_v1_ContainerPort(in, out, s)
+}
+
+func autoConvert_v1_ContainerState_To_api_ContainerState(in *ContainerState, out *api.ContainerState, s conversion.Scope) error {
+ out.Waiting = (*api.ContainerStateWaiting)(unsafe.Pointer(in.Waiting))
+ out.Running = (*api.ContainerStateRunning)(unsafe.Pointer(in.Running))
+ out.Terminated = (*api.ContainerStateTerminated)(unsafe.Pointer(in.Terminated))
+ return nil
+}
+
+// Convert_v1_ContainerState_To_api_ContainerState is an autogenerated conversion function.
+func Convert_v1_ContainerState_To_api_ContainerState(in *ContainerState, out *api.ContainerState, s conversion.Scope) error {
+ return autoConvert_v1_ContainerState_To_api_ContainerState(in, out, s)
+}
+
+func autoConvert_api_ContainerState_To_v1_ContainerState(in *api.ContainerState, out *ContainerState, s conversion.Scope) error {
+ out.Waiting = (*ContainerStateWaiting)(unsafe.Pointer(in.Waiting))
+ out.Running = (*ContainerStateRunning)(unsafe.Pointer(in.Running))
+ out.Terminated = (*ContainerStateTerminated)(unsafe.Pointer(in.Terminated))
+ return nil
+}
+
+// Convert_api_ContainerState_To_v1_ContainerState is an autogenerated conversion function.
+func Convert_api_ContainerState_To_v1_ContainerState(in *api.ContainerState, out *ContainerState, s conversion.Scope) error {
+ return autoConvert_api_ContainerState_To_v1_ContainerState(in, out, s)
+}
+
+func autoConvert_v1_ContainerStateRunning_To_api_ContainerStateRunning(in *ContainerStateRunning, out *api.ContainerStateRunning, s conversion.Scope) error {
+ out.StartedAt = in.StartedAt
+ return nil
+}
+
+// Convert_v1_ContainerStateRunning_To_api_ContainerStateRunning is an autogenerated conversion function.
+func Convert_v1_ContainerStateRunning_To_api_ContainerStateRunning(in *ContainerStateRunning, out *api.ContainerStateRunning, s conversion.Scope) error {
+ return autoConvert_v1_ContainerStateRunning_To_api_ContainerStateRunning(in, out, s)
+}
+
+func autoConvert_api_ContainerStateRunning_To_v1_ContainerStateRunning(in *api.ContainerStateRunning, out *ContainerStateRunning, s conversion.Scope) error {
+ out.StartedAt = in.StartedAt
+ return nil
+}
+
+// Convert_api_ContainerStateRunning_To_v1_ContainerStateRunning is an autogenerated conversion function.
+func Convert_api_ContainerStateRunning_To_v1_ContainerStateRunning(in *api.ContainerStateRunning, out *ContainerStateRunning, s conversion.Scope) error {
+ return autoConvert_api_ContainerStateRunning_To_v1_ContainerStateRunning(in, out, s)
+}
+
+func autoConvert_v1_ContainerStateTerminated_To_api_ContainerStateTerminated(in *ContainerStateTerminated, out *api.ContainerStateTerminated, s conversion.Scope) error {
+ out.ExitCode = in.ExitCode
+ out.Signal = in.Signal
+ out.Reason = in.Reason
+ out.Message = in.Message
+ out.StartedAt = in.StartedAt
+ out.FinishedAt = in.FinishedAt
+ out.ContainerID = in.ContainerID
+ return nil
+}
+
+// Convert_v1_ContainerStateTerminated_To_api_ContainerStateTerminated is an autogenerated conversion function.
+func Convert_v1_ContainerStateTerminated_To_api_ContainerStateTerminated(in *ContainerStateTerminated, out *api.ContainerStateTerminated, s conversion.Scope) error {
+ return autoConvert_v1_ContainerStateTerminated_To_api_ContainerStateTerminated(in, out, s)
+}
+
+func autoConvert_api_ContainerStateTerminated_To_v1_ContainerStateTerminated(in *api.ContainerStateTerminated, out *ContainerStateTerminated, s conversion.Scope) error {
+ out.ExitCode = in.ExitCode
+ out.Signal = in.Signal
+ out.Reason = in.Reason
+ out.Message = in.Message
+ out.StartedAt = in.StartedAt
+ out.FinishedAt = in.FinishedAt
+ out.ContainerID = in.ContainerID
+ return nil
+}
+
+// Convert_api_ContainerStateTerminated_To_v1_ContainerStateTerminated is an autogenerated conversion function.
+func Convert_api_ContainerStateTerminated_To_v1_ContainerStateTerminated(in *api.ContainerStateTerminated, out *ContainerStateTerminated, s conversion.Scope) error {
+ return autoConvert_api_ContainerStateTerminated_To_v1_ContainerStateTerminated(in, out, s)
+}
+
+func autoConvert_v1_ContainerStateWaiting_To_api_ContainerStateWaiting(in *ContainerStateWaiting, out *api.ContainerStateWaiting, s conversion.Scope) error {
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_v1_ContainerStateWaiting_To_api_ContainerStateWaiting is an autogenerated conversion function.
+func Convert_v1_ContainerStateWaiting_To_api_ContainerStateWaiting(in *ContainerStateWaiting, out *api.ContainerStateWaiting, s conversion.Scope) error {
+ return autoConvert_v1_ContainerStateWaiting_To_api_ContainerStateWaiting(in, out, s)
+}
+
+func autoConvert_api_ContainerStateWaiting_To_v1_ContainerStateWaiting(in *api.ContainerStateWaiting, out *ContainerStateWaiting, s conversion.Scope) error {
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_api_ContainerStateWaiting_To_v1_ContainerStateWaiting is an autogenerated conversion function.
+func Convert_api_ContainerStateWaiting_To_v1_ContainerStateWaiting(in *api.ContainerStateWaiting, out *ContainerStateWaiting, s conversion.Scope) error {
+ return autoConvert_api_ContainerStateWaiting_To_v1_ContainerStateWaiting(in, out, s)
+}
+
+func autoConvert_v1_ContainerStatus_To_api_ContainerStatus(in *ContainerStatus, out *api.ContainerStatus, s conversion.Scope) error {
+ out.Name = in.Name
+ if err := Convert_v1_ContainerState_To_api_ContainerState(&in.State, &out.State, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ContainerState_To_api_ContainerState(&in.LastTerminationState, &out.LastTerminationState, s); err != nil {
+ return err
+ }
+ out.Ready = in.Ready
+ out.RestartCount = in.RestartCount
+ out.Image = in.Image
+ out.ImageID = in.ImageID
+ out.ContainerID = in.ContainerID
+ return nil
+}
+
+// Convert_v1_ContainerStatus_To_api_ContainerStatus is an autogenerated conversion function.
+func Convert_v1_ContainerStatus_To_api_ContainerStatus(in *ContainerStatus, out *api.ContainerStatus, s conversion.Scope) error {
+ return autoConvert_v1_ContainerStatus_To_api_ContainerStatus(in, out, s)
+}
+
+func autoConvert_api_ContainerStatus_To_v1_ContainerStatus(in *api.ContainerStatus, out *ContainerStatus, s conversion.Scope) error {
+ out.Name = in.Name
+ if err := Convert_api_ContainerState_To_v1_ContainerState(&in.State, &out.State, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ContainerState_To_v1_ContainerState(&in.LastTerminationState, &out.LastTerminationState, s); err != nil {
+ return err
+ }
+ out.Ready = in.Ready
+ out.RestartCount = in.RestartCount
+ out.Image = in.Image
+ out.ImageID = in.ImageID
+ out.ContainerID = in.ContainerID
+ return nil
+}
+
+// Convert_api_ContainerStatus_To_v1_ContainerStatus is an autogenerated conversion function.
+func Convert_api_ContainerStatus_To_v1_ContainerStatus(in *api.ContainerStatus, out *ContainerStatus, s conversion.Scope) error {
+ return autoConvert_api_ContainerStatus_To_v1_ContainerStatus(in, out, s)
+}
+
+func autoConvert_v1_DaemonEndpoint_To_api_DaemonEndpoint(in *DaemonEndpoint, out *api.DaemonEndpoint, s conversion.Scope) error {
+ out.Port = in.Port
+ return nil
+}
+
+// Convert_v1_DaemonEndpoint_To_api_DaemonEndpoint is an autogenerated conversion function.
+func Convert_v1_DaemonEndpoint_To_api_DaemonEndpoint(in *DaemonEndpoint, out *api.DaemonEndpoint, s conversion.Scope) error {
+ return autoConvert_v1_DaemonEndpoint_To_api_DaemonEndpoint(in, out, s)
+}
+
+func autoConvert_api_DaemonEndpoint_To_v1_DaemonEndpoint(in *api.DaemonEndpoint, out *DaemonEndpoint, s conversion.Scope) error {
+ out.Port = in.Port
+ return nil
+}
+
+// Convert_api_DaemonEndpoint_To_v1_DaemonEndpoint is an autogenerated conversion function.
+func Convert_api_DaemonEndpoint_To_v1_DaemonEndpoint(in *api.DaemonEndpoint, out *DaemonEndpoint, s conversion.Scope) error {
+ return autoConvert_api_DaemonEndpoint_To_v1_DaemonEndpoint(in, out, s)
+}
+
+func autoConvert_v1_DeleteOptions_To_api_DeleteOptions(in *DeleteOptions, out *api.DeleteOptions, s conversion.Scope) error {
+ out.GracePeriodSeconds = (*int64)(unsafe.Pointer(in.GracePeriodSeconds))
+ out.Preconditions = (*api.Preconditions)(unsafe.Pointer(in.Preconditions))
+ out.OrphanDependents = (*bool)(unsafe.Pointer(in.OrphanDependents))
+ out.PropagationPolicy = (*api.DeletionPropagation)(unsafe.Pointer(in.PropagationPolicy))
+ return nil
+}
+
+// Convert_v1_DeleteOptions_To_api_DeleteOptions is an autogenerated conversion function.
+func Convert_v1_DeleteOptions_To_api_DeleteOptions(in *DeleteOptions, out *api.DeleteOptions, s conversion.Scope) error {
+ return autoConvert_v1_DeleteOptions_To_api_DeleteOptions(in, out, s)
+}
+
+func autoConvert_api_DeleteOptions_To_v1_DeleteOptions(in *api.DeleteOptions, out *DeleteOptions, s conversion.Scope) error {
+ out.GracePeriodSeconds = (*int64)(unsafe.Pointer(in.GracePeriodSeconds))
+ out.Preconditions = (*Preconditions)(unsafe.Pointer(in.Preconditions))
+ out.OrphanDependents = (*bool)(unsafe.Pointer(in.OrphanDependents))
+ out.PropagationPolicy = (*DeletionPropagation)(unsafe.Pointer(in.PropagationPolicy))
+ return nil
+}
+
+// Convert_api_DeleteOptions_To_v1_DeleteOptions is an autogenerated conversion function.
+func Convert_api_DeleteOptions_To_v1_DeleteOptions(in *api.DeleteOptions, out *DeleteOptions, s conversion.Scope) error {
+ return autoConvert_api_DeleteOptions_To_v1_DeleteOptions(in, out, s)
+}
+
+func autoConvert_v1_DownwardAPIProjection_To_api_DownwardAPIProjection(in *DownwardAPIProjection, out *api.DownwardAPIProjection, s conversion.Scope) error {
+ out.Items = *(*[]api.DownwardAPIVolumeFile)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1_DownwardAPIProjection_To_api_DownwardAPIProjection is an autogenerated conversion function.
+func Convert_v1_DownwardAPIProjection_To_api_DownwardAPIProjection(in *DownwardAPIProjection, out *api.DownwardAPIProjection, s conversion.Scope) error {
+ return autoConvert_v1_DownwardAPIProjection_To_api_DownwardAPIProjection(in, out, s)
+}
+
+func autoConvert_api_DownwardAPIProjection_To_v1_DownwardAPIProjection(in *api.DownwardAPIProjection, out *DownwardAPIProjection, s conversion.Scope) error {
+ out.Items = *(*[]DownwardAPIVolumeFile)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_api_DownwardAPIProjection_To_v1_DownwardAPIProjection is an autogenerated conversion function.
+func Convert_api_DownwardAPIProjection_To_v1_DownwardAPIProjection(in *api.DownwardAPIProjection, out *DownwardAPIProjection, s conversion.Scope) error {
+ return autoConvert_api_DownwardAPIProjection_To_v1_DownwardAPIProjection(in, out, s)
+}
+
+func autoConvert_v1_DownwardAPIVolumeFile_To_api_DownwardAPIVolumeFile(in *DownwardAPIVolumeFile, out *api.DownwardAPIVolumeFile, s conversion.Scope) error {
+ out.Path = in.Path
+ out.FieldRef = (*api.ObjectFieldSelector)(unsafe.Pointer(in.FieldRef))
+ out.ResourceFieldRef = (*api.ResourceFieldSelector)(unsafe.Pointer(in.ResourceFieldRef))
+ out.Mode = (*int32)(unsafe.Pointer(in.Mode))
+ return nil
+}
+
+// Convert_v1_DownwardAPIVolumeFile_To_api_DownwardAPIVolumeFile is an autogenerated conversion function.
+func Convert_v1_DownwardAPIVolumeFile_To_api_DownwardAPIVolumeFile(in *DownwardAPIVolumeFile, out *api.DownwardAPIVolumeFile, s conversion.Scope) error {
+ return autoConvert_v1_DownwardAPIVolumeFile_To_api_DownwardAPIVolumeFile(in, out, s)
+}
+
+func autoConvert_api_DownwardAPIVolumeFile_To_v1_DownwardAPIVolumeFile(in *api.DownwardAPIVolumeFile, out *DownwardAPIVolumeFile, s conversion.Scope) error {
+ out.Path = in.Path
+ out.FieldRef = (*ObjectFieldSelector)(unsafe.Pointer(in.FieldRef))
+ out.ResourceFieldRef = (*ResourceFieldSelector)(unsafe.Pointer(in.ResourceFieldRef))
+ out.Mode = (*int32)(unsafe.Pointer(in.Mode))
+ return nil
+}
+
+// Convert_api_DownwardAPIVolumeFile_To_v1_DownwardAPIVolumeFile is an autogenerated conversion function.
+func Convert_api_DownwardAPIVolumeFile_To_v1_DownwardAPIVolumeFile(in *api.DownwardAPIVolumeFile, out *DownwardAPIVolumeFile, s conversion.Scope) error {
+ return autoConvert_api_DownwardAPIVolumeFile_To_v1_DownwardAPIVolumeFile(in, out, s)
+}
+
+func autoConvert_v1_DownwardAPIVolumeSource_To_api_DownwardAPIVolumeSource(in *DownwardAPIVolumeSource, out *api.DownwardAPIVolumeSource, s conversion.Scope) error {
+ out.Items = *(*[]api.DownwardAPIVolumeFile)(unsafe.Pointer(&in.Items))
+ out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode))
+ return nil
+}
+
+// Convert_v1_DownwardAPIVolumeSource_To_api_DownwardAPIVolumeSource is an autogenerated conversion function.
+func Convert_v1_DownwardAPIVolumeSource_To_api_DownwardAPIVolumeSource(in *DownwardAPIVolumeSource, out *api.DownwardAPIVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_DownwardAPIVolumeSource_To_api_DownwardAPIVolumeSource(in, out, s)
+}
+
+func autoConvert_api_DownwardAPIVolumeSource_To_v1_DownwardAPIVolumeSource(in *api.DownwardAPIVolumeSource, out *DownwardAPIVolumeSource, s conversion.Scope) error {
+ out.Items = *(*[]DownwardAPIVolumeFile)(unsafe.Pointer(&in.Items))
+ out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode))
+ return nil
+}
+
+// Convert_api_DownwardAPIVolumeSource_To_v1_DownwardAPIVolumeSource is an autogenerated conversion function.
+func Convert_api_DownwardAPIVolumeSource_To_v1_DownwardAPIVolumeSource(in *api.DownwardAPIVolumeSource, out *DownwardAPIVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_DownwardAPIVolumeSource_To_v1_DownwardAPIVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_EmptyDirVolumeSource_To_api_EmptyDirVolumeSource(in *EmptyDirVolumeSource, out *api.EmptyDirVolumeSource, s conversion.Scope) error {
+ out.Medium = api.StorageMedium(in.Medium)
+ out.SizeLimit = (*resource.Quantity)(unsafe.Pointer(in.SizeLimit))
+ return nil
+}
+
+// Convert_v1_EmptyDirVolumeSource_To_api_EmptyDirVolumeSource is an autogenerated conversion function.
+func Convert_v1_EmptyDirVolumeSource_To_api_EmptyDirVolumeSource(in *EmptyDirVolumeSource, out *api.EmptyDirVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_EmptyDirVolumeSource_To_api_EmptyDirVolumeSource(in, out, s)
+}
+
+func autoConvert_api_EmptyDirVolumeSource_To_v1_EmptyDirVolumeSource(in *api.EmptyDirVolumeSource, out *EmptyDirVolumeSource, s conversion.Scope) error {
+ out.Medium = StorageMedium(in.Medium)
+ out.SizeLimit = (*resource.Quantity)(unsafe.Pointer(in.SizeLimit))
+ return nil
+}
+
+// Convert_api_EmptyDirVolumeSource_To_v1_EmptyDirVolumeSource is an autogenerated conversion function.
+func Convert_api_EmptyDirVolumeSource_To_v1_EmptyDirVolumeSource(in *api.EmptyDirVolumeSource, out *EmptyDirVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_EmptyDirVolumeSource_To_v1_EmptyDirVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_EndpointAddress_To_api_EndpointAddress(in *EndpointAddress, out *api.EndpointAddress, s conversion.Scope) error {
+ out.IP = in.IP
+ out.Hostname = in.Hostname
+ out.NodeName = (*string)(unsafe.Pointer(in.NodeName))
+ out.TargetRef = (*api.ObjectReference)(unsafe.Pointer(in.TargetRef))
+ return nil
+}
+
+// Convert_v1_EndpointAddress_To_api_EndpointAddress is an autogenerated conversion function.
+func Convert_v1_EndpointAddress_To_api_EndpointAddress(in *EndpointAddress, out *api.EndpointAddress, s conversion.Scope) error {
+ return autoConvert_v1_EndpointAddress_To_api_EndpointAddress(in, out, s)
+}
+
+func autoConvert_api_EndpointAddress_To_v1_EndpointAddress(in *api.EndpointAddress, out *EndpointAddress, s conversion.Scope) error {
+ out.IP = in.IP
+ out.Hostname = in.Hostname
+ out.NodeName = (*string)(unsafe.Pointer(in.NodeName))
+ out.TargetRef = (*ObjectReference)(unsafe.Pointer(in.TargetRef))
+ return nil
+}
+
+// Convert_api_EndpointAddress_To_v1_EndpointAddress is an autogenerated conversion function.
+func Convert_api_EndpointAddress_To_v1_EndpointAddress(in *api.EndpointAddress, out *EndpointAddress, s conversion.Scope) error {
+ return autoConvert_api_EndpointAddress_To_v1_EndpointAddress(in, out, s)
+}
+
+func autoConvert_v1_EndpointPort_To_api_EndpointPort(in *EndpointPort, out *api.EndpointPort, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Port = in.Port
+ out.Protocol = api.Protocol(in.Protocol)
+ return nil
+}
+
+// Convert_v1_EndpointPort_To_api_EndpointPort is an autogenerated conversion function.
+func Convert_v1_EndpointPort_To_api_EndpointPort(in *EndpointPort, out *api.EndpointPort, s conversion.Scope) error {
+ return autoConvert_v1_EndpointPort_To_api_EndpointPort(in, out, s)
+}
+
+func autoConvert_api_EndpointPort_To_v1_EndpointPort(in *api.EndpointPort, out *EndpointPort, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Port = in.Port
+ out.Protocol = Protocol(in.Protocol)
+ return nil
+}
+
+// Convert_api_EndpointPort_To_v1_EndpointPort is an autogenerated conversion function.
+func Convert_api_EndpointPort_To_v1_EndpointPort(in *api.EndpointPort, out *EndpointPort, s conversion.Scope) error {
+ return autoConvert_api_EndpointPort_To_v1_EndpointPort(in, out, s)
+}
+
+func autoConvert_v1_EndpointSubset_To_api_EndpointSubset(in *EndpointSubset, out *api.EndpointSubset, s conversion.Scope) error {
+ out.Addresses = *(*[]api.EndpointAddress)(unsafe.Pointer(&in.Addresses))
+ out.NotReadyAddresses = *(*[]api.EndpointAddress)(unsafe.Pointer(&in.NotReadyAddresses))
+ out.Ports = *(*[]api.EndpointPort)(unsafe.Pointer(&in.Ports))
+ return nil
+}
+
+// Convert_v1_EndpointSubset_To_api_EndpointSubset is an autogenerated conversion function.
+func Convert_v1_EndpointSubset_To_api_EndpointSubset(in *EndpointSubset, out *api.EndpointSubset, s conversion.Scope) error {
+ return autoConvert_v1_EndpointSubset_To_api_EndpointSubset(in, out, s)
+}
+
+func autoConvert_api_EndpointSubset_To_v1_EndpointSubset(in *api.EndpointSubset, out *EndpointSubset, s conversion.Scope) error {
+ out.Addresses = *(*[]EndpointAddress)(unsafe.Pointer(&in.Addresses))
+ out.NotReadyAddresses = *(*[]EndpointAddress)(unsafe.Pointer(&in.NotReadyAddresses))
+ out.Ports = *(*[]EndpointPort)(unsafe.Pointer(&in.Ports))
+ return nil
+}
+
+// Convert_api_EndpointSubset_To_v1_EndpointSubset is an autogenerated conversion function.
+func Convert_api_EndpointSubset_To_v1_EndpointSubset(in *api.EndpointSubset, out *EndpointSubset, s conversion.Scope) error {
+ return autoConvert_api_EndpointSubset_To_v1_EndpointSubset(in, out, s)
+}
+
+func autoConvert_v1_Endpoints_To_api_Endpoints(in *Endpoints, out *api.Endpoints, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Subsets = *(*[]api.EndpointSubset)(unsafe.Pointer(&in.Subsets))
+ return nil
+}
+
+// Convert_v1_Endpoints_To_api_Endpoints is an autogenerated conversion function.
+func Convert_v1_Endpoints_To_api_Endpoints(in *Endpoints, out *api.Endpoints, s conversion.Scope) error {
+ return autoConvert_v1_Endpoints_To_api_Endpoints(in, out, s)
+}
+
+func autoConvert_api_Endpoints_To_v1_Endpoints(in *api.Endpoints, out *Endpoints, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if in.Subsets == nil {
+ out.Subsets = make([]EndpointSubset, 0)
+ } else {
+ out.Subsets = *(*[]EndpointSubset)(unsafe.Pointer(&in.Subsets))
+ }
+ return nil
+}
+
+// Convert_api_Endpoints_To_v1_Endpoints is an autogenerated conversion function.
+func Convert_api_Endpoints_To_v1_Endpoints(in *api.Endpoints, out *Endpoints, s conversion.Scope) error {
+ return autoConvert_api_Endpoints_To_v1_Endpoints(in, out, s)
+}
+
+func autoConvert_v1_EndpointsList_To_api_EndpointsList(in *EndpointsList, out *api.EndpointsList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]api.Endpoints)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1_EndpointsList_To_api_EndpointsList is an autogenerated conversion function.
+func Convert_v1_EndpointsList_To_api_EndpointsList(in *EndpointsList, out *api.EndpointsList, s conversion.Scope) error {
+ return autoConvert_v1_EndpointsList_To_api_EndpointsList(in, out, s)
+}
+
+func autoConvert_api_EndpointsList_To_v1_EndpointsList(in *api.EndpointsList, out *EndpointsList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]Endpoints, 0)
+ } else {
+ out.Items = *(*[]Endpoints)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_api_EndpointsList_To_v1_EndpointsList is an autogenerated conversion function.
+func Convert_api_EndpointsList_To_v1_EndpointsList(in *api.EndpointsList, out *EndpointsList, s conversion.Scope) error {
+ return autoConvert_api_EndpointsList_To_v1_EndpointsList(in, out, s)
+}
+
+func autoConvert_v1_EnvFromSource_To_api_EnvFromSource(in *EnvFromSource, out *api.EnvFromSource, s conversion.Scope) error {
+ out.Prefix = in.Prefix
+ out.ConfigMapRef = (*api.ConfigMapEnvSource)(unsafe.Pointer(in.ConfigMapRef))
+ out.SecretRef = (*api.SecretEnvSource)(unsafe.Pointer(in.SecretRef))
+ return nil
+}
+
+// Convert_v1_EnvFromSource_To_api_EnvFromSource is an autogenerated conversion function.
+func Convert_v1_EnvFromSource_To_api_EnvFromSource(in *EnvFromSource, out *api.EnvFromSource, s conversion.Scope) error {
+ return autoConvert_v1_EnvFromSource_To_api_EnvFromSource(in, out, s)
+}
+
+func autoConvert_api_EnvFromSource_To_v1_EnvFromSource(in *api.EnvFromSource, out *EnvFromSource, s conversion.Scope) error {
+ out.Prefix = in.Prefix
+ out.ConfigMapRef = (*ConfigMapEnvSource)(unsafe.Pointer(in.ConfigMapRef))
+ out.SecretRef = (*SecretEnvSource)(unsafe.Pointer(in.SecretRef))
+ return nil
+}
+
+// Convert_api_EnvFromSource_To_v1_EnvFromSource is an autogenerated conversion function.
+func Convert_api_EnvFromSource_To_v1_EnvFromSource(in *api.EnvFromSource, out *EnvFromSource, s conversion.Scope) error {
+ return autoConvert_api_EnvFromSource_To_v1_EnvFromSource(in, out, s)
+}
+
+func autoConvert_v1_EnvVar_To_api_EnvVar(in *EnvVar, out *api.EnvVar, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Value = in.Value
+ out.ValueFrom = (*api.EnvVarSource)(unsafe.Pointer(in.ValueFrom))
+ return nil
+}
+
+// Convert_v1_EnvVar_To_api_EnvVar is an autogenerated conversion function.
+func Convert_v1_EnvVar_To_api_EnvVar(in *EnvVar, out *api.EnvVar, s conversion.Scope) error {
+ return autoConvert_v1_EnvVar_To_api_EnvVar(in, out, s)
+}
+
+func autoConvert_api_EnvVar_To_v1_EnvVar(in *api.EnvVar, out *EnvVar, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Value = in.Value
+ out.ValueFrom = (*EnvVarSource)(unsafe.Pointer(in.ValueFrom))
+ return nil
+}
+
+// Convert_api_EnvVar_To_v1_EnvVar is an autogenerated conversion function.
+func Convert_api_EnvVar_To_v1_EnvVar(in *api.EnvVar, out *EnvVar, s conversion.Scope) error {
+ return autoConvert_api_EnvVar_To_v1_EnvVar(in, out, s)
+}
+
+func autoConvert_v1_EnvVarSource_To_api_EnvVarSource(in *EnvVarSource, out *api.EnvVarSource, s conversion.Scope) error {
+ out.FieldRef = (*api.ObjectFieldSelector)(unsafe.Pointer(in.FieldRef))
+ out.ResourceFieldRef = (*api.ResourceFieldSelector)(unsafe.Pointer(in.ResourceFieldRef))
+ out.ConfigMapKeyRef = (*api.ConfigMapKeySelector)(unsafe.Pointer(in.ConfigMapKeyRef))
+ out.SecretKeyRef = (*api.SecretKeySelector)(unsafe.Pointer(in.SecretKeyRef))
+ return nil
+}
+
+// Convert_v1_EnvVarSource_To_api_EnvVarSource is an autogenerated conversion function.
+func Convert_v1_EnvVarSource_To_api_EnvVarSource(in *EnvVarSource, out *api.EnvVarSource, s conversion.Scope) error {
+ return autoConvert_v1_EnvVarSource_To_api_EnvVarSource(in, out, s)
+}
+
+func autoConvert_api_EnvVarSource_To_v1_EnvVarSource(in *api.EnvVarSource, out *EnvVarSource, s conversion.Scope) error {
+ out.FieldRef = (*ObjectFieldSelector)(unsafe.Pointer(in.FieldRef))
+ out.ResourceFieldRef = (*ResourceFieldSelector)(unsafe.Pointer(in.ResourceFieldRef))
+ out.ConfigMapKeyRef = (*ConfigMapKeySelector)(unsafe.Pointer(in.ConfigMapKeyRef))
+ out.SecretKeyRef = (*SecretKeySelector)(unsafe.Pointer(in.SecretKeyRef))
+ return nil
+}
+
+// Convert_api_EnvVarSource_To_v1_EnvVarSource is an autogenerated conversion function.
+func Convert_api_EnvVarSource_To_v1_EnvVarSource(in *api.EnvVarSource, out *EnvVarSource, s conversion.Scope) error {
+ return autoConvert_api_EnvVarSource_To_v1_EnvVarSource(in, out, s)
+}
+
+func autoConvert_v1_Event_To_api_Event(in *Event, out *api.Event, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_ObjectReference_To_api_ObjectReference(&in.InvolvedObject, &out.InvolvedObject, s); err != nil {
+ return err
+ }
+ out.Reason = in.Reason
+ out.Message = in.Message
+ if err := Convert_v1_EventSource_To_api_EventSource(&in.Source, &out.Source, s); err != nil {
+ return err
+ }
+ out.FirstTimestamp = in.FirstTimestamp
+ out.LastTimestamp = in.LastTimestamp
+ out.Count = in.Count
+ out.Type = in.Type
+ return nil
+}
+
+// Convert_v1_Event_To_api_Event is an autogenerated conversion function.
+func Convert_v1_Event_To_api_Event(in *Event, out *api.Event, s conversion.Scope) error {
+ return autoConvert_v1_Event_To_api_Event(in, out, s)
+}
+
+func autoConvert_api_Event_To_v1_Event(in *api.Event, out *Event, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_api_ObjectReference_To_v1_ObjectReference(&in.InvolvedObject, &out.InvolvedObject, s); err != nil {
+ return err
+ }
+ out.Reason = in.Reason
+ out.Message = in.Message
+ if err := Convert_api_EventSource_To_v1_EventSource(&in.Source, &out.Source, s); err != nil {
+ return err
+ }
+ out.FirstTimestamp = in.FirstTimestamp
+ out.LastTimestamp = in.LastTimestamp
+ out.Count = in.Count
+ out.Type = in.Type
+ return nil
+}
+
+// Convert_api_Event_To_v1_Event is an autogenerated conversion function.
+func Convert_api_Event_To_v1_Event(in *api.Event, out *Event, s conversion.Scope) error {
+ return autoConvert_api_Event_To_v1_Event(in, out, s)
+}
+
+func autoConvert_v1_EventList_To_api_EventList(in *EventList, out *api.EventList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]api.Event)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1_EventList_To_api_EventList is an autogenerated conversion function.
+func Convert_v1_EventList_To_api_EventList(in *EventList, out *api.EventList, s conversion.Scope) error {
+ return autoConvert_v1_EventList_To_api_EventList(in, out, s)
+}
+
+func autoConvert_api_EventList_To_v1_EventList(in *api.EventList, out *EventList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]Event, 0)
+ } else {
+ out.Items = *(*[]Event)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_api_EventList_To_v1_EventList is an autogenerated conversion function.
+func Convert_api_EventList_To_v1_EventList(in *api.EventList, out *EventList, s conversion.Scope) error {
+ return autoConvert_api_EventList_To_v1_EventList(in, out, s)
+}
+
+func autoConvert_v1_EventSource_To_api_EventSource(in *EventSource, out *api.EventSource, s conversion.Scope) error {
+ out.Component = in.Component
+ out.Host = in.Host
+ return nil
+}
+
+// Convert_v1_EventSource_To_api_EventSource is an autogenerated conversion function.
+func Convert_v1_EventSource_To_api_EventSource(in *EventSource, out *api.EventSource, s conversion.Scope) error {
+ return autoConvert_v1_EventSource_To_api_EventSource(in, out, s)
+}
+
+func autoConvert_api_EventSource_To_v1_EventSource(in *api.EventSource, out *EventSource, s conversion.Scope) error {
+ out.Component = in.Component
+ out.Host = in.Host
+ return nil
+}
+
+// Convert_api_EventSource_To_v1_EventSource is an autogenerated conversion function.
+func Convert_api_EventSource_To_v1_EventSource(in *api.EventSource, out *EventSource, s conversion.Scope) error {
+ return autoConvert_api_EventSource_To_v1_EventSource(in, out, s)
+}
+
+func autoConvert_v1_ExecAction_To_api_ExecAction(in *ExecAction, out *api.ExecAction, s conversion.Scope) error {
+ out.Command = *(*[]string)(unsafe.Pointer(&in.Command))
+ return nil
+}
+
+// Convert_v1_ExecAction_To_api_ExecAction is an autogenerated conversion function.
+func Convert_v1_ExecAction_To_api_ExecAction(in *ExecAction, out *api.ExecAction, s conversion.Scope) error {
+ return autoConvert_v1_ExecAction_To_api_ExecAction(in, out, s)
+}
+
+func autoConvert_api_ExecAction_To_v1_ExecAction(in *api.ExecAction, out *ExecAction, s conversion.Scope) error {
+ out.Command = *(*[]string)(unsafe.Pointer(&in.Command))
+ return nil
+}
+
+// Convert_api_ExecAction_To_v1_ExecAction is an autogenerated conversion function.
+func Convert_api_ExecAction_To_v1_ExecAction(in *api.ExecAction, out *ExecAction, s conversion.Scope) error {
+ return autoConvert_api_ExecAction_To_v1_ExecAction(in, out, s)
+}
+
+func autoConvert_v1_FCVolumeSource_To_api_FCVolumeSource(in *FCVolumeSource, out *api.FCVolumeSource, s conversion.Scope) error {
+ out.TargetWWNs = *(*[]string)(unsafe.Pointer(&in.TargetWWNs))
+ out.Lun = (*int32)(unsafe.Pointer(in.Lun))
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_v1_FCVolumeSource_To_api_FCVolumeSource is an autogenerated conversion function.
+func Convert_v1_FCVolumeSource_To_api_FCVolumeSource(in *FCVolumeSource, out *api.FCVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_FCVolumeSource_To_api_FCVolumeSource(in, out, s)
+}
+
+func autoConvert_api_FCVolumeSource_To_v1_FCVolumeSource(in *api.FCVolumeSource, out *FCVolumeSource, s conversion.Scope) error {
+ if in.TargetWWNs == nil {
+ out.TargetWWNs = make([]string, 0)
+ } else {
+ out.TargetWWNs = *(*[]string)(unsafe.Pointer(&in.TargetWWNs))
+ }
+ out.Lun = (*int32)(unsafe.Pointer(in.Lun))
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_api_FCVolumeSource_To_v1_FCVolumeSource is an autogenerated conversion function.
+func Convert_api_FCVolumeSource_To_v1_FCVolumeSource(in *api.FCVolumeSource, out *FCVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_FCVolumeSource_To_v1_FCVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_FlexVolumeSource_To_api_FlexVolumeSource(in *FlexVolumeSource, out *api.FlexVolumeSource, s conversion.Scope) error {
+ out.Driver = in.Driver
+ out.FSType = in.FSType
+ out.SecretRef = (*api.LocalObjectReference)(unsafe.Pointer(in.SecretRef))
+ out.ReadOnly = in.ReadOnly
+ out.Options = *(*map[string]string)(unsafe.Pointer(&in.Options))
+ return nil
+}
+
+// Convert_v1_FlexVolumeSource_To_api_FlexVolumeSource is an autogenerated conversion function.
+func Convert_v1_FlexVolumeSource_To_api_FlexVolumeSource(in *FlexVolumeSource, out *api.FlexVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_FlexVolumeSource_To_api_FlexVolumeSource(in, out, s)
+}
+
+func autoConvert_api_FlexVolumeSource_To_v1_FlexVolumeSource(in *api.FlexVolumeSource, out *FlexVolumeSource, s conversion.Scope) error {
+ out.Driver = in.Driver
+ out.FSType = in.FSType
+ out.SecretRef = (*LocalObjectReference)(unsafe.Pointer(in.SecretRef))
+ out.ReadOnly = in.ReadOnly
+ out.Options = *(*map[string]string)(unsafe.Pointer(&in.Options))
+ return nil
+}
+
+// Convert_api_FlexVolumeSource_To_v1_FlexVolumeSource is an autogenerated conversion function.
+func Convert_api_FlexVolumeSource_To_v1_FlexVolumeSource(in *api.FlexVolumeSource, out *FlexVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_FlexVolumeSource_To_v1_FlexVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_FlockerVolumeSource_To_api_FlockerVolumeSource(in *FlockerVolumeSource, out *api.FlockerVolumeSource, s conversion.Scope) error {
+ out.DatasetName = in.DatasetName
+ out.DatasetUUID = in.DatasetUUID
+ return nil
+}
+
+// Convert_v1_FlockerVolumeSource_To_api_FlockerVolumeSource is an autogenerated conversion function.
+func Convert_v1_FlockerVolumeSource_To_api_FlockerVolumeSource(in *FlockerVolumeSource, out *api.FlockerVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_FlockerVolumeSource_To_api_FlockerVolumeSource(in, out, s)
+}
+
+func autoConvert_api_FlockerVolumeSource_To_v1_FlockerVolumeSource(in *api.FlockerVolumeSource, out *FlockerVolumeSource, s conversion.Scope) error {
+ out.DatasetName = in.DatasetName
+ out.DatasetUUID = in.DatasetUUID
+ return nil
+}
+
+// Convert_api_FlockerVolumeSource_To_v1_FlockerVolumeSource is an autogenerated conversion function.
+func Convert_api_FlockerVolumeSource_To_v1_FlockerVolumeSource(in *api.FlockerVolumeSource, out *FlockerVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_FlockerVolumeSource_To_v1_FlockerVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_GCEPersistentDiskVolumeSource_To_api_GCEPersistentDiskVolumeSource(in *GCEPersistentDiskVolumeSource, out *api.GCEPersistentDiskVolumeSource, s conversion.Scope) error {
+ out.PDName = in.PDName
+ out.FSType = in.FSType
+ out.Partition = in.Partition
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_v1_GCEPersistentDiskVolumeSource_To_api_GCEPersistentDiskVolumeSource is an autogenerated conversion function.
+func Convert_v1_GCEPersistentDiskVolumeSource_To_api_GCEPersistentDiskVolumeSource(in *GCEPersistentDiskVolumeSource, out *api.GCEPersistentDiskVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_GCEPersistentDiskVolumeSource_To_api_GCEPersistentDiskVolumeSource(in, out, s)
+}
+
+func autoConvert_api_GCEPersistentDiskVolumeSource_To_v1_GCEPersistentDiskVolumeSource(in *api.GCEPersistentDiskVolumeSource, out *GCEPersistentDiskVolumeSource, s conversion.Scope) error {
+ out.PDName = in.PDName
+ out.FSType = in.FSType
+ out.Partition = in.Partition
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_api_GCEPersistentDiskVolumeSource_To_v1_GCEPersistentDiskVolumeSource is an autogenerated conversion function.
+func Convert_api_GCEPersistentDiskVolumeSource_To_v1_GCEPersistentDiskVolumeSource(in *api.GCEPersistentDiskVolumeSource, out *GCEPersistentDiskVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_GCEPersistentDiskVolumeSource_To_v1_GCEPersistentDiskVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_GitRepoVolumeSource_To_api_GitRepoVolumeSource(in *GitRepoVolumeSource, out *api.GitRepoVolumeSource, s conversion.Scope) error {
+ out.Repository = in.Repository
+ out.Revision = in.Revision
+ out.Directory = in.Directory
+ return nil
+}
+
+// Convert_v1_GitRepoVolumeSource_To_api_GitRepoVolumeSource is an autogenerated conversion function.
+func Convert_v1_GitRepoVolumeSource_To_api_GitRepoVolumeSource(in *GitRepoVolumeSource, out *api.GitRepoVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_GitRepoVolumeSource_To_api_GitRepoVolumeSource(in, out, s)
+}
+
+func autoConvert_api_GitRepoVolumeSource_To_v1_GitRepoVolumeSource(in *api.GitRepoVolumeSource, out *GitRepoVolumeSource, s conversion.Scope) error {
+ out.Repository = in.Repository
+ out.Revision = in.Revision
+ out.Directory = in.Directory
+ return nil
+}
+
+// Convert_api_GitRepoVolumeSource_To_v1_GitRepoVolumeSource is an autogenerated conversion function.
+func Convert_api_GitRepoVolumeSource_To_v1_GitRepoVolumeSource(in *api.GitRepoVolumeSource, out *GitRepoVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_GitRepoVolumeSource_To_v1_GitRepoVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_GlusterfsVolumeSource_To_api_GlusterfsVolumeSource(in *GlusterfsVolumeSource, out *api.GlusterfsVolumeSource, s conversion.Scope) error {
+ out.EndpointsName = in.EndpointsName
+ out.Path = in.Path
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_v1_GlusterfsVolumeSource_To_api_GlusterfsVolumeSource is an autogenerated conversion function.
+func Convert_v1_GlusterfsVolumeSource_To_api_GlusterfsVolumeSource(in *GlusterfsVolumeSource, out *api.GlusterfsVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_GlusterfsVolumeSource_To_api_GlusterfsVolumeSource(in, out, s)
+}
+
+func autoConvert_api_GlusterfsVolumeSource_To_v1_GlusterfsVolumeSource(in *api.GlusterfsVolumeSource, out *GlusterfsVolumeSource, s conversion.Scope) error {
+ out.EndpointsName = in.EndpointsName
+ out.Path = in.Path
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_api_GlusterfsVolumeSource_To_v1_GlusterfsVolumeSource is an autogenerated conversion function.
+func Convert_api_GlusterfsVolumeSource_To_v1_GlusterfsVolumeSource(in *api.GlusterfsVolumeSource, out *GlusterfsVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_GlusterfsVolumeSource_To_v1_GlusterfsVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_HTTPGetAction_To_api_HTTPGetAction(in *HTTPGetAction, out *api.HTTPGetAction, s conversion.Scope) error {
+ out.Path = in.Path
+ out.Port = in.Port
+ out.Host = in.Host
+ out.Scheme = api.URIScheme(in.Scheme)
+ out.HTTPHeaders = *(*[]api.HTTPHeader)(unsafe.Pointer(&in.HTTPHeaders))
+ return nil
+}
+
+// Convert_v1_HTTPGetAction_To_api_HTTPGetAction is an autogenerated conversion function.
+func Convert_v1_HTTPGetAction_To_api_HTTPGetAction(in *HTTPGetAction, out *api.HTTPGetAction, s conversion.Scope) error {
+ return autoConvert_v1_HTTPGetAction_To_api_HTTPGetAction(in, out, s)
+}
+
+func autoConvert_api_HTTPGetAction_To_v1_HTTPGetAction(in *api.HTTPGetAction, out *HTTPGetAction, s conversion.Scope) error {
+ out.Path = in.Path
+ out.Port = in.Port
+ out.Host = in.Host
+ out.Scheme = URIScheme(in.Scheme)
+ out.HTTPHeaders = *(*[]HTTPHeader)(unsafe.Pointer(&in.HTTPHeaders))
+ return nil
+}
+
+// Convert_api_HTTPGetAction_To_v1_HTTPGetAction is an autogenerated conversion function.
+func Convert_api_HTTPGetAction_To_v1_HTTPGetAction(in *api.HTTPGetAction, out *HTTPGetAction, s conversion.Scope) error {
+ return autoConvert_api_HTTPGetAction_To_v1_HTTPGetAction(in, out, s)
+}
+
+func autoConvert_v1_HTTPHeader_To_api_HTTPHeader(in *HTTPHeader, out *api.HTTPHeader, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Value = in.Value
+ return nil
+}
+
+// Convert_v1_HTTPHeader_To_api_HTTPHeader is an autogenerated conversion function.
+func Convert_v1_HTTPHeader_To_api_HTTPHeader(in *HTTPHeader, out *api.HTTPHeader, s conversion.Scope) error {
+ return autoConvert_v1_HTTPHeader_To_api_HTTPHeader(in, out, s)
+}
+
+func autoConvert_api_HTTPHeader_To_v1_HTTPHeader(in *api.HTTPHeader, out *HTTPHeader, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Value = in.Value
+ return nil
+}
+
+// Convert_api_HTTPHeader_To_v1_HTTPHeader is an autogenerated conversion function.
+func Convert_api_HTTPHeader_To_v1_HTTPHeader(in *api.HTTPHeader, out *HTTPHeader, s conversion.Scope) error {
+ return autoConvert_api_HTTPHeader_To_v1_HTTPHeader(in, out, s)
+}
+
+func autoConvert_v1_Handler_To_api_Handler(in *Handler, out *api.Handler, s conversion.Scope) error {
+ out.Exec = (*api.ExecAction)(unsafe.Pointer(in.Exec))
+ out.HTTPGet = (*api.HTTPGetAction)(unsafe.Pointer(in.HTTPGet))
+ out.TCPSocket = (*api.TCPSocketAction)(unsafe.Pointer(in.TCPSocket))
+ return nil
+}
+
+// Convert_v1_Handler_To_api_Handler is an autogenerated conversion function.
+func Convert_v1_Handler_To_api_Handler(in *Handler, out *api.Handler, s conversion.Scope) error {
+ return autoConvert_v1_Handler_To_api_Handler(in, out, s)
+}
+
+func autoConvert_api_Handler_To_v1_Handler(in *api.Handler, out *Handler, s conversion.Scope) error {
+ out.Exec = (*ExecAction)(unsafe.Pointer(in.Exec))
+ out.HTTPGet = (*HTTPGetAction)(unsafe.Pointer(in.HTTPGet))
+ out.TCPSocket = (*TCPSocketAction)(unsafe.Pointer(in.TCPSocket))
+ return nil
+}
+
+// Convert_api_Handler_To_v1_Handler is an autogenerated conversion function.
+func Convert_api_Handler_To_v1_Handler(in *api.Handler, out *Handler, s conversion.Scope) error {
+ return autoConvert_api_Handler_To_v1_Handler(in, out, s)
+}
+
+func autoConvert_v1_HostAlias_To_api_HostAlias(in *HostAlias, out *api.HostAlias, s conversion.Scope) error {
+ out.IP = in.IP
+ out.Hostnames = *(*[]string)(unsafe.Pointer(&in.Hostnames))
+ return nil
+}
+
+// Convert_v1_HostAlias_To_api_HostAlias is an autogenerated conversion function.
+func Convert_v1_HostAlias_To_api_HostAlias(in *HostAlias, out *api.HostAlias, s conversion.Scope) error {
+ return autoConvert_v1_HostAlias_To_api_HostAlias(in, out, s)
+}
+
+func autoConvert_api_HostAlias_To_v1_HostAlias(in *api.HostAlias, out *HostAlias, s conversion.Scope) error {
+ out.IP = in.IP
+ out.Hostnames = *(*[]string)(unsafe.Pointer(&in.Hostnames))
+ return nil
+}
+
+// Convert_api_HostAlias_To_v1_HostAlias is an autogenerated conversion function.
+func Convert_api_HostAlias_To_v1_HostAlias(in *api.HostAlias, out *HostAlias, s conversion.Scope) error {
+ return autoConvert_api_HostAlias_To_v1_HostAlias(in, out, s)
+}
+
+func autoConvert_v1_HostPathVolumeSource_To_api_HostPathVolumeSource(in *HostPathVolumeSource, out *api.HostPathVolumeSource, s conversion.Scope) error {
+ out.Path = in.Path
+ return nil
+}
+
+// Convert_v1_HostPathVolumeSource_To_api_HostPathVolumeSource is an autogenerated conversion function.
+func Convert_v1_HostPathVolumeSource_To_api_HostPathVolumeSource(in *HostPathVolumeSource, out *api.HostPathVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_HostPathVolumeSource_To_api_HostPathVolumeSource(in, out, s)
+}
+
+func autoConvert_api_HostPathVolumeSource_To_v1_HostPathVolumeSource(in *api.HostPathVolumeSource, out *HostPathVolumeSource, s conversion.Scope) error {
+ out.Path = in.Path
+ return nil
+}
+
+// Convert_api_HostPathVolumeSource_To_v1_HostPathVolumeSource is an autogenerated conversion function.
+func Convert_api_HostPathVolumeSource_To_v1_HostPathVolumeSource(in *api.HostPathVolumeSource, out *HostPathVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_HostPathVolumeSource_To_v1_HostPathVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_ISCSIVolumeSource_To_api_ISCSIVolumeSource(in *ISCSIVolumeSource, out *api.ISCSIVolumeSource, s conversion.Scope) error {
+ out.TargetPortal = in.TargetPortal
+ out.IQN = in.IQN
+ out.Lun = in.Lun
+ out.ISCSIInterface = in.ISCSIInterface
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ out.Portals = *(*[]string)(unsafe.Pointer(&in.Portals))
+ out.DiscoveryCHAPAuth = in.DiscoveryCHAPAuth
+ out.SessionCHAPAuth = in.SessionCHAPAuth
+ out.SecretRef = (*api.LocalObjectReference)(unsafe.Pointer(in.SecretRef))
+ return nil
+}
+
+// Convert_v1_ISCSIVolumeSource_To_api_ISCSIVolumeSource is an autogenerated conversion function.
+func Convert_v1_ISCSIVolumeSource_To_api_ISCSIVolumeSource(in *ISCSIVolumeSource, out *api.ISCSIVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_ISCSIVolumeSource_To_api_ISCSIVolumeSource(in, out, s)
+}
+
+func autoConvert_api_ISCSIVolumeSource_To_v1_ISCSIVolumeSource(in *api.ISCSIVolumeSource, out *ISCSIVolumeSource, s conversion.Scope) error {
+ out.TargetPortal = in.TargetPortal
+ out.IQN = in.IQN
+ out.Lun = in.Lun
+ out.ISCSIInterface = in.ISCSIInterface
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ out.Portals = *(*[]string)(unsafe.Pointer(&in.Portals))
+ out.DiscoveryCHAPAuth = in.DiscoveryCHAPAuth
+ out.SessionCHAPAuth = in.SessionCHAPAuth
+ out.SecretRef = (*LocalObjectReference)(unsafe.Pointer(in.SecretRef))
+ return nil
+}
+
+// Convert_api_ISCSIVolumeSource_To_v1_ISCSIVolumeSource is an autogenerated conversion function.
+func Convert_api_ISCSIVolumeSource_To_v1_ISCSIVolumeSource(in *api.ISCSIVolumeSource, out *ISCSIVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_ISCSIVolumeSource_To_v1_ISCSIVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_KeyToPath_To_api_KeyToPath(in *KeyToPath, out *api.KeyToPath, s conversion.Scope) error {
+ out.Key = in.Key
+ out.Path = in.Path
+ out.Mode = (*int32)(unsafe.Pointer(in.Mode))
+ return nil
+}
+
+// Convert_v1_KeyToPath_To_api_KeyToPath is an autogenerated conversion function.
+func Convert_v1_KeyToPath_To_api_KeyToPath(in *KeyToPath, out *api.KeyToPath, s conversion.Scope) error {
+ return autoConvert_v1_KeyToPath_To_api_KeyToPath(in, out, s)
+}
+
+func autoConvert_api_KeyToPath_To_v1_KeyToPath(in *api.KeyToPath, out *KeyToPath, s conversion.Scope) error {
+ out.Key = in.Key
+ out.Path = in.Path
+ out.Mode = (*int32)(unsafe.Pointer(in.Mode))
+ return nil
+}
+
+// Convert_api_KeyToPath_To_v1_KeyToPath is an autogenerated conversion function.
+func Convert_api_KeyToPath_To_v1_KeyToPath(in *api.KeyToPath, out *KeyToPath, s conversion.Scope) error {
+ return autoConvert_api_KeyToPath_To_v1_KeyToPath(in, out, s)
+}
+
+func autoConvert_v1_Lifecycle_To_api_Lifecycle(in *Lifecycle, out *api.Lifecycle, s conversion.Scope) error {
+ out.PostStart = (*api.Handler)(unsafe.Pointer(in.PostStart))
+ out.PreStop = (*api.Handler)(unsafe.Pointer(in.PreStop))
+ return nil
+}
+
+// Convert_v1_Lifecycle_To_api_Lifecycle is an autogenerated conversion function.
+func Convert_v1_Lifecycle_To_api_Lifecycle(in *Lifecycle, out *api.Lifecycle, s conversion.Scope) error {
+ return autoConvert_v1_Lifecycle_To_api_Lifecycle(in, out, s)
+}
+
+func autoConvert_api_Lifecycle_To_v1_Lifecycle(in *api.Lifecycle, out *Lifecycle, s conversion.Scope) error {
+ out.PostStart = (*Handler)(unsafe.Pointer(in.PostStart))
+ out.PreStop = (*Handler)(unsafe.Pointer(in.PreStop))
+ return nil
+}
+
+// Convert_api_Lifecycle_To_v1_Lifecycle is an autogenerated conversion function.
+func Convert_api_Lifecycle_To_v1_Lifecycle(in *api.Lifecycle, out *Lifecycle, s conversion.Scope) error {
+ return autoConvert_api_Lifecycle_To_v1_Lifecycle(in, out, s)
+}
+
+func autoConvert_v1_LimitRange_To_api_LimitRange(in *LimitRange, out *api.LimitRange, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_LimitRangeSpec_To_api_LimitRangeSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_LimitRange_To_api_LimitRange is an autogenerated conversion function.
+func Convert_v1_LimitRange_To_api_LimitRange(in *LimitRange, out *api.LimitRange, s conversion.Scope) error {
+ return autoConvert_v1_LimitRange_To_api_LimitRange(in, out, s)
+}
+
+func autoConvert_api_LimitRange_To_v1_LimitRange(in *api.LimitRange, out *LimitRange, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_api_LimitRangeSpec_To_v1_LimitRangeSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_LimitRange_To_v1_LimitRange is an autogenerated conversion function.
+func Convert_api_LimitRange_To_v1_LimitRange(in *api.LimitRange, out *LimitRange, s conversion.Scope) error {
+ return autoConvert_api_LimitRange_To_v1_LimitRange(in, out, s)
+}
+
+func autoConvert_v1_LimitRangeItem_To_api_LimitRangeItem(in *LimitRangeItem, out *api.LimitRangeItem, s conversion.Scope) error {
+ out.Type = api.LimitType(in.Type)
+ out.Max = *(*api.ResourceList)(unsafe.Pointer(&in.Max))
+ out.Min = *(*api.ResourceList)(unsafe.Pointer(&in.Min))
+ out.Default = *(*api.ResourceList)(unsafe.Pointer(&in.Default))
+ out.DefaultRequest = *(*api.ResourceList)(unsafe.Pointer(&in.DefaultRequest))
+ out.MaxLimitRequestRatio = *(*api.ResourceList)(unsafe.Pointer(&in.MaxLimitRequestRatio))
+ return nil
+}
+
+// Convert_v1_LimitRangeItem_To_api_LimitRangeItem is an autogenerated conversion function.
+func Convert_v1_LimitRangeItem_To_api_LimitRangeItem(in *LimitRangeItem, out *api.LimitRangeItem, s conversion.Scope) error {
+ return autoConvert_v1_LimitRangeItem_To_api_LimitRangeItem(in, out, s)
+}
+
+func autoConvert_api_LimitRangeItem_To_v1_LimitRangeItem(in *api.LimitRangeItem, out *LimitRangeItem, s conversion.Scope) error {
+ out.Type = LimitType(in.Type)
+ out.Max = *(*ResourceList)(unsafe.Pointer(&in.Max))
+ out.Min = *(*ResourceList)(unsafe.Pointer(&in.Min))
+ out.Default = *(*ResourceList)(unsafe.Pointer(&in.Default))
+ out.DefaultRequest = *(*ResourceList)(unsafe.Pointer(&in.DefaultRequest))
+ out.MaxLimitRequestRatio = *(*ResourceList)(unsafe.Pointer(&in.MaxLimitRequestRatio))
+ return nil
+}
+
+// Convert_api_LimitRangeItem_To_v1_LimitRangeItem is an autogenerated conversion function.
+func Convert_api_LimitRangeItem_To_v1_LimitRangeItem(in *api.LimitRangeItem, out *LimitRangeItem, s conversion.Scope) error {
+ return autoConvert_api_LimitRangeItem_To_v1_LimitRangeItem(in, out, s)
+}
+
+func autoConvert_v1_LimitRangeList_To_api_LimitRangeList(in *LimitRangeList, out *api.LimitRangeList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]api.LimitRange)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1_LimitRangeList_To_api_LimitRangeList is an autogenerated conversion function.
+func Convert_v1_LimitRangeList_To_api_LimitRangeList(in *LimitRangeList, out *api.LimitRangeList, s conversion.Scope) error {
+ return autoConvert_v1_LimitRangeList_To_api_LimitRangeList(in, out, s)
+}
+
+func autoConvert_api_LimitRangeList_To_v1_LimitRangeList(in *api.LimitRangeList, out *LimitRangeList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]LimitRange, 0)
+ } else {
+ out.Items = *(*[]LimitRange)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_api_LimitRangeList_To_v1_LimitRangeList is an autogenerated conversion function.
+func Convert_api_LimitRangeList_To_v1_LimitRangeList(in *api.LimitRangeList, out *LimitRangeList, s conversion.Scope) error {
+ return autoConvert_api_LimitRangeList_To_v1_LimitRangeList(in, out, s)
+}
+
+func autoConvert_v1_LimitRangeSpec_To_api_LimitRangeSpec(in *LimitRangeSpec, out *api.LimitRangeSpec, s conversion.Scope) error {
+ out.Limits = *(*[]api.LimitRangeItem)(unsafe.Pointer(&in.Limits))
+ return nil
+}
+
+// Convert_v1_LimitRangeSpec_To_api_LimitRangeSpec is an autogenerated conversion function.
+func Convert_v1_LimitRangeSpec_To_api_LimitRangeSpec(in *LimitRangeSpec, out *api.LimitRangeSpec, s conversion.Scope) error {
+ return autoConvert_v1_LimitRangeSpec_To_api_LimitRangeSpec(in, out, s)
+}
+
+func autoConvert_api_LimitRangeSpec_To_v1_LimitRangeSpec(in *api.LimitRangeSpec, out *LimitRangeSpec, s conversion.Scope) error {
+ if in.Limits == nil {
+ out.Limits = make([]LimitRangeItem, 0)
+ } else {
+ out.Limits = *(*[]LimitRangeItem)(unsafe.Pointer(&in.Limits))
+ }
+ return nil
+}
+
+// Convert_api_LimitRangeSpec_To_v1_LimitRangeSpec is an autogenerated conversion function.
+func Convert_api_LimitRangeSpec_To_v1_LimitRangeSpec(in *api.LimitRangeSpec, out *LimitRangeSpec, s conversion.Scope) error {
+ return autoConvert_api_LimitRangeSpec_To_v1_LimitRangeSpec(in, out, s)
+}
+
+func autoConvert_v1_List_To_api_List(in *List, out *api.List, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]runtime.Object, len(*in))
+ for i := range *in {
+ if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1_List_To_api_List is an autogenerated conversion function.
+func Convert_v1_List_To_api_List(in *List, out *api.List, s conversion.Scope) error {
+ return autoConvert_v1_List_To_api_List(in, out, s)
+}
+
+func autoConvert_api_List_To_v1_List(in *api.List, out *List, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]runtime.RawExtension, len(*in))
+ for i := range *in {
+ if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]runtime.RawExtension, 0)
+ }
+ return nil
+}
+
+// Convert_api_List_To_v1_List is an autogenerated conversion function.
+func Convert_api_List_To_v1_List(in *api.List, out *List, s conversion.Scope) error {
+ return autoConvert_api_List_To_v1_List(in, out, s)
+}
+
+func autoConvert_v1_ListOptions_To_api_ListOptions(in *ListOptions, out *api.ListOptions, s conversion.Scope) error {
+ if err := meta_v1.Convert_string_To_labels_Selector(&in.LabelSelector, &out.LabelSelector, s); err != nil {
+ return err
+ }
+ if err := meta_v1.Convert_string_To_fields_Selector(&in.FieldSelector, &out.FieldSelector, s); err != nil {
+ return err
+ }
+ out.IncludeUninitialized = in.IncludeUninitialized
+ out.Watch = in.Watch
+ out.ResourceVersion = in.ResourceVersion
+ out.TimeoutSeconds = (*int64)(unsafe.Pointer(in.TimeoutSeconds))
+ return nil
+}
+
+// Convert_v1_ListOptions_To_api_ListOptions is an autogenerated conversion function.
+func Convert_v1_ListOptions_To_api_ListOptions(in *ListOptions, out *api.ListOptions, s conversion.Scope) error {
+ return autoConvert_v1_ListOptions_To_api_ListOptions(in, out, s)
+}
+
+func autoConvert_api_ListOptions_To_v1_ListOptions(in *api.ListOptions, out *ListOptions, s conversion.Scope) error {
+ if err := meta_v1.Convert_labels_Selector_To_string(&in.LabelSelector, &out.LabelSelector, s); err != nil {
+ return err
+ }
+ if err := meta_v1.Convert_fields_Selector_To_string(&in.FieldSelector, &out.FieldSelector, s); err != nil {
+ return err
+ }
+ out.IncludeUninitialized = in.IncludeUninitialized
+ out.Watch = in.Watch
+ out.ResourceVersion = in.ResourceVersion
+ out.TimeoutSeconds = (*int64)(unsafe.Pointer(in.TimeoutSeconds))
+ return nil
+}
+
+// Convert_api_ListOptions_To_v1_ListOptions is an autogenerated conversion function.
+func Convert_api_ListOptions_To_v1_ListOptions(in *api.ListOptions, out *ListOptions, s conversion.Scope) error {
+ return autoConvert_api_ListOptions_To_v1_ListOptions(in, out, s)
+}
+
+func autoConvert_v1_LoadBalancerIngress_To_api_LoadBalancerIngress(in *LoadBalancerIngress, out *api.LoadBalancerIngress, s conversion.Scope) error {
+ out.IP = in.IP
+ out.Hostname = in.Hostname
+ return nil
+}
+
+// Convert_v1_LoadBalancerIngress_To_api_LoadBalancerIngress is an autogenerated conversion function.
+func Convert_v1_LoadBalancerIngress_To_api_LoadBalancerIngress(in *LoadBalancerIngress, out *api.LoadBalancerIngress, s conversion.Scope) error {
+ return autoConvert_v1_LoadBalancerIngress_To_api_LoadBalancerIngress(in, out, s)
+}
+
+func autoConvert_api_LoadBalancerIngress_To_v1_LoadBalancerIngress(in *api.LoadBalancerIngress, out *LoadBalancerIngress, s conversion.Scope) error {
+ out.IP = in.IP
+ out.Hostname = in.Hostname
+ return nil
+}
+
+// Convert_api_LoadBalancerIngress_To_v1_LoadBalancerIngress is an autogenerated conversion function.
+func Convert_api_LoadBalancerIngress_To_v1_LoadBalancerIngress(in *api.LoadBalancerIngress, out *LoadBalancerIngress, s conversion.Scope) error {
+ return autoConvert_api_LoadBalancerIngress_To_v1_LoadBalancerIngress(in, out, s)
+}
+
+func autoConvert_v1_LoadBalancerStatus_To_api_LoadBalancerStatus(in *LoadBalancerStatus, out *api.LoadBalancerStatus, s conversion.Scope) error {
+ out.Ingress = *(*[]api.LoadBalancerIngress)(unsafe.Pointer(&in.Ingress))
+ return nil
+}
+
+// Convert_v1_LoadBalancerStatus_To_api_LoadBalancerStatus is an autogenerated conversion function.
+func Convert_v1_LoadBalancerStatus_To_api_LoadBalancerStatus(in *LoadBalancerStatus, out *api.LoadBalancerStatus, s conversion.Scope) error {
+ return autoConvert_v1_LoadBalancerStatus_To_api_LoadBalancerStatus(in, out, s)
+}
+
+func autoConvert_api_LoadBalancerStatus_To_v1_LoadBalancerStatus(in *api.LoadBalancerStatus, out *LoadBalancerStatus, s conversion.Scope) error {
+ out.Ingress = *(*[]LoadBalancerIngress)(unsafe.Pointer(&in.Ingress))
+ return nil
+}
+
+// Convert_api_LoadBalancerStatus_To_v1_LoadBalancerStatus is an autogenerated conversion function.
+func Convert_api_LoadBalancerStatus_To_v1_LoadBalancerStatus(in *api.LoadBalancerStatus, out *LoadBalancerStatus, s conversion.Scope) error {
+ return autoConvert_api_LoadBalancerStatus_To_v1_LoadBalancerStatus(in, out, s)
+}
+
+func autoConvert_v1_LocalObjectReference_To_api_LocalObjectReference(in *LocalObjectReference, out *api.LocalObjectReference, s conversion.Scope) error {
+ out.Name = in.Name
+ return nil
+}
+
+// Convert_v1_LocalObjectReference_To_api_LocalObjectReference is an autogenerated conversion function.
+func Convert_v1_LocalObjectReference_To_api_LocalObjectReference(in *LocalObjectReference, out *api.LocalObjectReference, s conversion.Scope) error {
+ return autoConvert_v1_LocalObjectReference_To_api_LocalObjectReference(in, out, s)
+}
+
+func autoConvert_api_LocalObjectReference_To_v1_LocalObjectReference(in *api.LocalObjectReference, out *LocalObjectReference, s conversion.Scope) error {
+ out.Name = in.Name
+ return nil
+}
+
+// Convert_api_LocalObjectReference_To_v1_LocalObjectReference is an autogenerated conversion function.
+func Convert_api_LocalObjectReference_To_v1_LocalObjectReference(in *api.LocalObjectReference, out *LocalObjectReference, s conversion.Scope) error {
+ return autoConvert_api_LocalObjectReference_To_v1_LocalObjectReference(in, out, s)
+}
+
+func autoConvert_v1_LocalVolumeSource_To_api_LocalVolumeSource(in *LocalVolumeSource, out *api.LocalVolumeSource, s conversion.Scope) error {
+ out.Path = in.Path
+ return nil
+}
+
+// Convert_v1_LocalVolumeSource_To_api_LocalVolumeSource is an autogenerated conversion function.
+func Convert_v1_LocalVolumeSource_To_api_LocalVolumeSource(in *LocalVolumeSource, out *api.LocalVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_LocalVolumeSource_To_api_LocalVolumeSource(in, out, s)
+}
+
+func autoConvert_api_LocalVolumeSource_To_v1_LocalVolumeSource(in *api.LocalVolumeSource, out *LocalVolumeSource, s conversion.Scope) error {
+ out.Path = in.Path
+ return nil
+}
+
+// Convert_api_LocalVolumeSource_To_v1_LocalVolumeSource is an autogenerated conversion function.
+func Convert_api_LocalVolumeSource_To_v1_LocalVolumeSource(in *api.LocalVolumeSource, out *LocalVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_LocalVolumeSource_To_v1_LocalVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_NFSVolumeSource_To_api_NFSVolumeSource(in *NFSVolumeSource, out *api.NFSVolumeSource, s conversion.Scope) error {
+ out.Server = in.Server
+ out.Path = in.Path
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_v1_NFSVolumeSource_To_api_NFSVolumeSource is an autogenerated conversion function.
+func Convert_v1_NFSVolumeSource_To_api_NFSVolumeSource(in *NFSVolumeSource, out *api.NFSVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_NFSVolumeSource_To_api_NFSVolumeSource(in, out, s)
+}
+
+func autoConvert_api_NFSVolumeSource_To_v1_NFSVolumeSource(in *api.NFSVolumeSource, out *NFSVolumeSource, s conversion.Scope) error {
+ out.Server = in.Server
+ out.Path = in.Path
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_api_NFSVolumeSource_To_v1_NFSVolumeSource is an autogenerated conversion function.
+func Convert_api_NFSVolumeSource_To_v1_NFSVolumeSource(in *api.NFSVolumeSource, out *NFSVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_NFSVolumeSource_To_v1_NFSVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_Namespace_To_api_Namespace(in *Namespace, out *api.Namespace, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_NamespaceSpec_To_api_NamespaceSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_NamespaceStatus_To_api_NamespaceStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_Namespace_To_api_Namespace is an autogenerated conversion function.
+func Convert_v1_Namespace_To_api_Namespace(in *Namespace, out *api.Namespace, s conversion.Scope) error {
+ return autoConvert_v1_Namespace_To_api_Namespace(in, out, s)
+}
+
+func autoConvert_api_Namespace_To_v1_Namespace(in *api.Namespace, out *Namespace, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_api_NamespaceSpec_To_v1_NamespaceSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_api_NamespaceStatus_To_v1_NamespaceStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_Namespace_To_v1_Namespace is an autogenerated conversion function.
+func Convert_api_Namespace_To_v1_Namespace(in *api.Namespace, out *Namespace, s conversion.Scope) error {
+ return autoConvert_api_Namespace_To_v1_Namespace(in, out, s)
+}
+
+func autoConvert_v1_NamespaceList_To_api_NamespaceList(in *NamespaceList, out *api.NamespaceList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]api.Namespace)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1_NamespaceList_To_api_NamespaceList is an autogenerated conversion function.
+func Convert_v1_NamespaceList_To_api_NamespaceList(in *NamespaceList, out *api.NamespaceList, s conversion.Scope) error {
+ return autoConvert_v1_NamespaceList_To_api_NamespaceList(in, out, s)
+}
+
+func autoConvert_api_NamespaceList_To_v1_NamespaceList(in *api.NamespaceList, out *NamespaceList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]Namespace, 0)
+ } else {
+ out.Items = *(*[]Namespace)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_api_NamespaceList_To_v1_NamespaceList is an autogenerated conversion function.
+func Convert_api_NamespaceList_To_v1_NamespaceList(in *api.NamespaceList, out *NamespaceList, s conversion.Scope) error {
+ return autoConvert_api_NamespaceList_To_v1_NamespaceList(in, out, s)
+}
+
+func autoConvert_v1_NamespaceSpec_To_api_NamespaceSpec(in *NamespaceSpec, out *api.NamespaceSpec, s conversion.Scope) error {
+ out.Finalizers = *(*[]api.FinalizerName)(unsafe.Pointer(&in.Finalizers))
+ return nil
+}
+
+// Convert_v1_NamespaceSpec_To_api_NamespaceSpec is an autogenerated conversion function.
+func Convert_v1_NamespaceSpec_To_api_NamespaceSpec(in *NamespaceSpec, out *api.NamespaceSpec, s conversion.Scope) error {
+ return autoConvert_v1_NamespaceSpec_To_api_NamespaceSpec(in, out, s)
+}
+
+func autoConvert_api_NamespaceSpec_To_v1_NamespaceSpec(in *api.NamespaceSpec, out *NamespaceSpec, s conversion.Scope) error {
+ out.Finalizers = *(*[]FinalizerName)(unsafe.Pointer(&in.Finalizers))
+ return nil
+}
+
+// Convert_api_NamespaceSpec_To_v1_NamespaceSpec is an autogenerated conversion function.
+func Convert_api_NamespaceSpec_To_v1_NamespaceSpec(in *api.NamespaceSpec, out *NamespaceSpec, s conversion.Scope) error {
+ return autoConvert_api_NamespaceSpec_To_v1_NamespaceSpec(in, out, s)
+}
+
+func autoConvert_v1_NamespaceStatus_To_api_NamespaceStatus(in *NamespaceStatus, out *api.NamespaceStatus, s conversion.Scope) error {
+ out.Phase = api.NamespacePhase(in.Phase)
+ return nil
+}
+
+// Convert_v1_NamespaceStatus_To_api_NamespaceStatus is an autogenerated conversion function.
+func Convert_v1_NamespaceStatus_To_api_NamespaceStatus(in *NamespaceStatus, out *api.NamespaceStatus, s conversion.Scope) error {
+ return autoConvert_v1_NamespaceStatus_To_api_NamespaceStatus(in, out, s)
+}
+
+func autoConvert_api_NamespaceStatus_To_v1_NamespaceStatus(in *api.NamespaceStatus, out *NamespaceStatus, s conversion.Scope) error {
+ out.Phase = NamespacePhase(in.Phase)
+ return nil
+}
+
+// Convert_api_NamespaceStatus_To_v1_NamespaceStatus is an autogenerated conversion function.
+func Convert_api_NamespaceStatus_To_v1_NamespaceStatus(in *api.NamespaceStatus, out *NamespaceStatus, s conversion.Scope) error {
+ return autoConvert_api_NamespaceStatus_To_v1_NamespaceStatus(in, out, s)
+}
+
+func autoConvert_v1_Node_To_api_Node(in *Node, out *api.Node, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_NodeSpec_To_api_NodeSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_NodeStatus_To_api_NodeStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_Node_To_api_Node is an autogenerated conversion function.
+func Convert_v1_Node_To_api_Node(in *Node, out *api.Node, s conversion.Scope) error {
+ return autoConvert_v1_Node_To_api_Node(in, out, s)
+}
+
+func autoConvert_api_Node_To_v1_Node(in *api.Node, out *Node, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_api_NodeSpec_To_v1_NodeSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_api_NodeStatus_To_v1_NodeStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_Node_To_v1_Node is an autogenerated conversion function.
+func Convert_api_Node_To_v1_Node(in *api.Node, out *Node, s conversion.Scope) error {
+ return autoConvert_api_Node_To_v1_Node(in, out, s)
+}
+
+func autoConvert_v1_NodeAddress_To_api_NodeAddress(in *NodeAddress, out *api.NodeAddress, s conversion.Scope) error {
+ out.Type = api.NodeAddressType(in.Type)
+ out.Address = in.Address
+ return nil
+}
+
+// Convert_v1_NodeAddress_To_api_NodeAddress is an autogenerated conversion function.
+func Convert_v1_NodeAddress_To_api_NodeAddress(in *NodeAddress, out *api.NodeAddress, s conversion.Scope) error {
+ return autoConvert_v1_NodeAddress_To_api_NodeAddress(in, out, s)
+}
+
+func autoConvert_api_NodeAddress_To_v1_NodeAddress(in *api.NodeAddress, out *NodeAddress, s conversion.Scope) error {
+ out.Type = NodeAddressType(in.Type)
+ out.Address = in.Address
+ return nil
+}
+
+// Convert_api_NodeAddress_To_v1_NodeAddress is an autogenerated conversion function.
+func Convert_api_NodeAddress_To_v1_NodeAddress(in *api.NodeAddress, out *NodeAddress, s conversion.Scope) error {
+ return autoConvert_api_NodeAddress_To_v1_NodeAddress(in, out, s)
+}
+
+func autoConvert_v1_NodeAffinity_To_api_NodeAffinity(in *NodeAffinity, out *api.NodeAffinity, s conversion.Scope) error {
+ out.RequiredDuringSchedulingIgnoredDuringExecution = (*api.NodeSelector)(unsafe.Pointer(in.RequiredDuringSchedulingIgnoredDuringExecution))
+ out.PreferredDuringSchedulingIgnoredDuringExecution = *(*[]api.PreferredSchedulingTerm)(unsafe.Pointer(&in.PreferredDuringSchedulingIgnoredDuringExecution))
+ return nil
+}
+
+// Convert_v1_NodeAffinity_To_api_NodeAffinity is an autogenerated conversion function.
+func Convert_v1_NodeAffinity_To_api_NodeAffinity(in *NodeAffinity, out *api.NodeAffinity, s conversion.Scope) error {
+ return autoConvert_v1_NodeAffinity_To_api_NodeAffinity(in, out, s)
+}
+
+func autoConvert_api_NodeAffinity_To_v1_NodeAffinity(in *api.NodeAffinity, out *NodeAffinity, s conversion.Scope) error {
+ out.RequiredDuringSchedulingIgnoredDuringExecution = (*NodeSelector)(unsafe.Pointer(in.RequiredDuringSchedulingIgnoredDuringExecution))
+ out.PreferredDuringSchedulingIgnoredDuringExecution = *(*[]PreferredSchedulingTerm)(unsafe.Pointer(&in.PreferredDuringSchedulingIgnoredDuringExecution))
+ return nil
+}
+
+// Convert_api_NodeAffinity_To_v1_NodeAffinity is an autogenerated conversion function.
+func Convert_api_NodeAffinity_To_v1_NodeAffinity(in *api.NodeAffinity, out *NodeAffinity, s conversion.Scope) error {
+ return autoConvert_api_NodeAffinity_To_v1_NodeAffinity(in, out, s)
+}
+
+func autoConvert_v1_NodeCondition_To_api_NodeCondition(in *NodeCondition, out *api.NodeCondition, s conversion.Scope) error {
+ out.Type = api.NodeConditionType(in.Type)
+ out.Status = api.ConditionStatus(in.Status)
+ out.LastHeartbeatTime = in.LastHeartbeatTime
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_v1_NodeCondition_To_api_NodeCondition is an autogenerated conversion function.
+func Convert_v1_NodeCondition_To_api_NodeCondition(in *NodeCondition, out *api.NodeCondition, s conversion.Scope) error {
+ return autoConvert_v1_NodeCondition_To_api_NodeCondition(in, out, s)
+}
+
+func autoConvert_api_NodeCondition_To_v1_NodeCondition(in *api.NodeCondition, out *NodeCondition, s conversion.Scope) error {
+ out.Type = NodeConditionType(in.Type)
+ out.Status = ConditionStatus(in.Status)
+ out.LastHeartbeatTime = in.LastHeartbeatTime
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_api_NodeCondition_To_v1_NodeCondition is an autogenerated conversion function.
+func Convert_api_NodeCondition_To_v1_NodeCondition(in *api.NodeCondition, out *NodeCondition, s conversion.Scope) error {
+ return autoConvert_api_NodeCondition_To_v1_NodeCondition(in, out, s)
+}
+
+func autoConvert_v1_NodeDaemonEndpoints_To_api_NodeDaemonEndpoints(in *NodeDaemonEndpoints, out *api.NodeDaemonEndpoints, s conversion.Scope) error {
+ if err := Convert_v1_DaemonEndpoint_To_api_DaemonEndpoint(&in.KubeletEndpoint, &out.KubeletEndpoint, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_NodeDaemonEndpoints_To_api_NodeDaemonEndpoints is an autogenerated conversion function.
+func Convert_v1_NodeDaemonEndpoints_To_api_NodeDaemonEndpoints(in *NodeDaemonEndpoints, out *api.NodeDaemonEndpoints, s conversion.Scope) error {
+ return autoConvert_v1_NodeDaemonEndpoints_To_api_NodeDaemonEndpoints(in, out, s)
+}
+
+func autoConvert_api_NodeDaemonEndpoints_To_v1_NodeDaemonEndpoints(in *api.NodeDaemonEndpoints, out *NodeDaemonEndpoints, s conversion.Scope) error {
+ if err := Convert_api_DaemonEndpoint_To_v1_DaemonEndpoint(&in.KubeletEndpoint, &out.KubeletEndpoint, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_NodeDaemonEndpoints_To_v1_NodeDaemonEndpoints is an autogenerated conversion function.
+func Convert_api_NodeDaemonEndpoints_To_v1_NodeDaemonEndpoints(in *api.NodeDaemonEndpoints, out *NodeDaemonEndpoints, s conversion.Scope) error {
+ return autoConvert_api_NodeDaemonEndpoints_To_v1_NodeDaemonEndpoints(in, out, s)
+}
+
+func autoConvert_v1_NodeList_To_api_NodeList(in *NodeList, out *api.NodeList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]api.Node)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1_NodeList_To_api_NodeList is an autogenerated conversion function.
+func Convert_v1_NodeList_To_api_NodeList(in *NodeList, out *api.NodeList, s conversion.Scope) error {
+ return autoConvert_v1_NodeList_To_api_NodeList(in, out, s)
+}
+
+func autoConvert_api_NodeList_To_v1_NodeList(in *api.NodeList, out *NodeList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]Node, 0)
+ } else {
+ out.Items = *(*[]Node)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_api_NodeList_To_v1_NodeList is an autogenerated conversion function.
+func Convert_api_NodeList_To_v1_NodeList(in *api.NodeList, out *NodeList, s conversion.Scope) error {
+ return autoConvert_api_NodeList_To_v1_NodeList(in, out, s)
+}
+
+func autoConvert_v1_NodeProxyOptions_To_api_NodeProxyOptions(in *NodeProxyOptions, out *api.NodeProxyOptions, s conversion.Scope) error {
+ out.Path = in.Path
+ return nil
+}
+
+// Convert_v1_NodeProxyOptions_To_api_NodeProxyOptions is an autogenerated conversion function.
+func Convert_v1_NodeProxyOptions_To_api_NodeProxyOptions(in *NodeProxyOptions, out *api.NodeProxyOptions, s conversion.Scope) error {
+ return autoConvert_v1_NodeProxyOptions_To_api_NodeProxyOptions(in, out, s)
+}
+
+func autoConvert_api_NodeProxyOptions_To_v1_NodeProxyOptions(in *api.NodeProxyOptions, out *NodeProxyOptions, s conversion.Scope) error {
+ out.Path = in.Path
+ return nil
+}
+
+// Convert_api_NodeProxyOptions_To_v1_NodeProxyOptions is an autogenerated conversion function.
+func Convert_api_NodeProxyOptions_To_v1_NodeProxyOptions(in *api.NodeProxyOptions, out *NodeProxyOptions, s conversion.Scope) error {
+ return autoConvert_api_NodeProxyOptions_To_v1_NodeProxyOptions(in, out, s)
+}
+
+func autoConvert_v1_NodeResources_To_api_NodeResources(in *NodeResources, out *api.NodeResources, s conversion.Scope) error {
+ out.Capacity = *(*api.ResourceList)(unsafe.Pointer(&in.Capacity))
+ return nil
+}
+
+// Convert_v1_NodeResources_To_api_NodeResources is an autogenerated conversion function.
+func Convert_v1_NodeResources_To_api_NodeResources(in *NodeResources, out *api.NodeResources, s conversion.Scope) error {
+ return autoConvert_v1_NodeResources_To_api_NodeResources(in, out, s)
+}
+
+func autoConvert_api_NodeResources_To_v1_NodeResources(in *api.NodeResources, out *NodeResources, s conversion.Scope) error {
+ out.Capacity = *(*ResourceList)(unsafe.Pointer(&in.Capacity))
+ return nil
+}
+
+// Convert_api_NodeResources_To_v1_NodeResources is an autogenerated conversion function.
+func Convert_api_NodeResources_To_v1_NodeResources(in *api.NodeResources, out *NodeResources, s conversion.Scope) error {
+ return autoConvert_api_NodeResources_To_v1_NodeResources(in, out, s)
+}
+
+func autoConvert_v1_NodeSelector_To_api_NodeSelector(in *NodeSelector, out *api.NodeSelector, s conversion.Scope) error {
+ out.NodeSelectorTerms = *(*[]api.NodeSelectorTerm)(unsafe.Pointer(&in.NodeSelectorTerms))
+ return nil
+}
+
+// Convert_v1_NodeSelector_To_api_NodeSelector is an autogenerated conversion function.
+func Convert_v1_NodeSelector_To_api_NodeSelector(in *NodeSelector, out *api.NodeSelector, s conversion.Scope) error {
+ return autoConvert_v1_NodeSelector_To_api_NodeSelector(in, out, s)
+}
+
+func autoConvert_api_NodeSelector_To_v1_NodeSelector(in *api.NodeSelector, out *NodeSelector, s conversion.Scope) error {
+ if in.NodeSelectorTerms == nil {
+ out.NodeSelectorTerms = make([]NodeSelectorTerm, 0)
+ } else {
+ out.NodeSelectorTerms = *(*[]NodeSelectorTerm)(unsafe.Pointer(&in.NodeSelectorTerms))
+ }
+ return nil
+}
+
+// Convert_api_NodeSelector_To_v1_NodeSelector is an autogenerated conversion function.
+func Convert_api_NodeSelector_To_v1_NodeSelector(in *api.NodeSelector, out *NodeSelector, s conversion.Scope) error {
+ return autoConvert_api_NodeSelector_To_v1_NodeSelector(in, out, s)
+}
+
+func autoConvert_v1_NodeSelectorRequirement_To_api_NodeSelectorRequirement(in *NodeSelectorRequirement, out *api.NodeSelectorRequirement, s conversion.Scope) error {
+ out.Key = in.Key
+ out.Operator = api.NodeSelectorOperator(in.Operator)
+ out.Values = *(*[]string)(unsafe.Pointer(&in.Values))
+ return nil
+}
+
+// Convert_v1_NodeSelectorRequirement_To_api_NodeSelectorRequirement is an autogenerated conversion function.
+func Convert_v1_NodeSelectorRequirement_To_api_NodeSelectorRequirement(in *NodeSelectorRequirement, out *api.NodeSelectorRequirement, s conversion.Scope) error {
+ return autoConvert_v1_NodeSelectorRequirement_To_api_NodeSelectorRequirement(in, out, s)
+}
+
+func autoConvert_api_NodeSelectorRequirement_To_v1_NodeSelectorRequirement(in *api.NodeSelectorRequirement, out *NodeSelectorRequirement, s conversion.Scope) error {
+ out.Key = in.Key
+ out.Operator = NodeSelectorOperator(in.Operator)
+ out.Values = *(*[]string)(unsafe.Pointer(&in.Values))
+ return nil
+}
+
+// Convert_api_NodeSelectorRequirement_To_v1_NodeSelectorRequirement is an autogenerated conversion function.
+func Convert_api_NodeSelectorRequirement_To_v1_NodeSelectorRequirement(in *api.NodeSelectorRequirement, out *NodeSelectorRequirement, s conversion.Scope) error {
+ return autoConvert_api_NodeSelectorRequirement_To_v1_NodeSelectorRequirement(in, out, s)
+}
+
+func autoConvert_v1_NodeSelectorTerm_To_api_NodeSelectorTerm(in *NodeSelectorTerm, out *api.NodeSelectorTerm, s conversion.Scope) error {
+ out.MatchExpressions = *(*[]api.NodeSelectorRequirement)(unsafe.Pointer(&in.MatchExpressions))
+ return nil
+}
+
+// Convert_v1_NodeSelectorTerm_To_api_NodeSelectorTerm is an autogenerated conversion function.
+func Convert_v1_NodeSelectorTerm_To_api_NodeSelectorTerm(in *NodeSelectorTerm, out *api.NodeSelectorTerm, s conversion.Scope) error {
+ return autoConvert_v1_NodeSelectorTerm_To_api_NodeSelectorTerm(in, out, s)
+}
+
+func autoConvert_api_NodeSelectorTerm_To_v1_NodeSelectorTerm(in *api.NodeSelectorTerm, out *NodeSelectorTerm, s conversion.Scope) error {
+ if in.MatchExpressions == nil {
+ out.MatchExpressions = make([]NodeSelectorRequirement, 0)
+ } else {
+ out.MatchExpressions = *(*[]NodeSelectorRequirement)(unsafe.Pointer(&in.MatchExpressions))
+ }
+ return nil
+}
+
+// Convert_api_NodeSelectorTerm_To_v1_NodeSelectorTerm is an autogenerated conversion function.
+func Convert_api_NodeSelectorTerm_To_v1_NodeSelectorTerm(in *api.NodeSelectorTerm, out *NodeSelectorTerm, s conversion.Scope) error {
+ return autoConvert_api_NodeSelectorTerm_To_v1_NodeSelectorTerm(in, out, s)
+}
+
+func autoConvert_v1_NodeSpec_To_api_NodeSpec(in *NodeSpec, out *api.NodeSpec, s conversion.Scope) error {
+ out.PodCIDR = in.PodCIDR
+ out.ExternalID = in.ExternalID
+ out.ProviderID = in.ProviderID
+ out.Unschedulable = in.Unschedulable
+ out.Taints = *(*[]api.Taint)(unsafe.Pointer(&in.Taints))
+ return nil
+}
+
+// Convert_v1_NodeSpec_To_api_NodeSpec is an autogenerated conversion function.
+func Convert_v1_NodeSpec_To_api_NodeSpec(in *NodeSpec, out *api.NodeSpec, s conversion.Scope) error {
+ return autoConvert_v1_NodeSpec_To_api_NodeSpec(in, out, s)
+}
+
+func autoConvert_api_NodeSpec_To_v1_NodeSpec(in *api.NodeSpec, out *NodeSpec, s conversion.Scope) error {
+ out.PodCIDR = in.PodCIDR
+ out.ExternalID = in.ExternalID
+ out.ProviderID = in.ProviderID
+ out.Unschedulable = in.Unschedulable
+ out.Taints = *(*[]Taint)(unsafe.Pointer(&in.Taints))
+ return nil
+}
+
+// Convert_api_NodeSpec_To_v1_NodeSpec is an autogenerated conversion function.
+func Convert_api_NodeSpec_To_v1_NodeSpec(in *api.NodeSpec, out *NodeSpec, s conversion.Scope) error {
+ return autoConvert_api_NodeSpec_To_v1_NodeSpec(in, out, s)
+}
+
+func autoConvert_v1_NodeStatus_To_api_NodeStatus(in *NodeStatus, out *api.NodeStatus, s conversion.Scope) error {
+ out.Capacity = *(*api.ResourceList)(unsafe.Pointer(&in.Capacity))
+ out.Allocatable = *(*api.ResourceList)(unsafe.Pointer(&in.Allocatable))
+ out.Phase = api.NodePhase(in.Phase)
+ out.Conditions = *(*[]api.NodeCondition)(unsafe.Pointer(&in.Conditions))
+ out.Addresses = *(*[]api.NodeAddress)(unsafe.Pointer(&in.Addresses))
+ if err := Convert_v1_NodeDaemonEndpoints_To_api_NodeDaemonEndpoints(&in.DaemonEndpoints, &out.DaemonEndpoints, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_NodeSystemInfo_To_api_NodeSystemInfo(&in.NodeInfo, &out.NodeInfo, s); err != nil {
+ return err
+ }
+ out.Images = *(*[]api.ContainerImage)(unsafe.Pointer(&in.Images))
+ out.VolumesInUse = *(*[]api.UniqueVolumeName)(unsafe.Pointer(&in.VolumesInUse))
+ out.VolumesAttached = *(*[]api.AttachedVolume)(unsafe.Pointer(&in.VolumesAttached))
+ return nil
+}
+
+// Convert_v1_NodeStatus_To_api_NodeStatus is an autogenerated conversion function.
+func Convert_v1_NodeStatus_To_api_NodeStatus(in *NodeStatus, out *api.NodeStatus, s conversion.Scope) error {
+ return autoConvert_v1_NodeStatus_To_api_NodeStatus(in, out, s)
+}
+
+func autoConvert_api_NodeStatus_To_v1_NodeStatus(in *api.NodeStatus, out *NodeStatus, s conversion.Scope) error {
+ out.Capacity = *(*ResourceList)(unsafe.Pointer(&in.Capacity))
+ out.Allocatable = *(*ResourceList)(unsafe.Pointer(&in.Allocatable))
+ out.Phase = NodePhase(in.Phase)
+ out.Conditions = *(*[]NodeCondition)(unsafe.Pointer(&in.Conditions))
+ out.Addresses = *(*[]NodeAddress)(unsafe.Pointer(&in.Addresses))
+ if err := Convert_api_NodeDaemonEndpoints_To_v1_NodeDaemonEndpoints(&in.DaemonEndpoints, &out.DaemonEndpoints, s); err != nil {
+ return err
+ }
+ if err := Convert_api_NodeSystemInfo_To_v1_NodeSystemInfo(&in.NodeInfo, &out.NodeInfo, s); err != nil {
+ return err
+ }
+ out.Images = *(*[]ContainerImage)(unsafe.Pointer(&in.Images))
+ out.VolumesInUse = *(*[]UniqueVolumeName)(unsafe.Pointer(&in.VolumesInUse))
+ out.VolumesAttached = *(*[]AttachedVolume)(unsafe.Pointer(&in.VolumesAttached))
+ return nil
+}
+
+// Convert_api_NodeStatus_To_v1_NodeStatus is an autogenerated conversion function.
+func Convert_api_NodeStatus_To_v1_NodeStatus(in *api.NodeStatus, out *NodeStatus, s conversion.Scope) error {
+ return autoConvert_api_NodeStatus_To_v1_NodeStatus(in, out, s)
+}
+
+func autoConvert_v1_NodeSystemInfo_To_api_NodeSystemInfo(in *NodeSystemInfo, out *api.NodeSystemInfo, s conversion.Scope) error {
+ out.MachineID = in.MachineID
+ out.SystemUUID = in.SystemUUID
+ out.BootID = in.BootID
+ out.KernelVersion = in.KernelVersion
+ out.OSImage = in.OSImage
+ out.ContainerRuntimeVersion = in.ContainerRuntimeVersion
+ out.KubeletVersion = in.KubeletVersion
+ out.KubeProxyVersion = in.KubeProxyVersion
+ out.OperatingSystem = in.OperatingSystem
+ out.Architecture = in.Architecture
+ return nil
+}
+
+// Convert_v1_NodeSystemInfo_To_api_NodeSystemInfo is an autogenerated conversion function.
+func Convert_v1_NodeSystemInfo_To_api_NodeSystemInfo(in *NodeSystemInfo, out *api.NodeSystemInfo, s conversion.Scope) error {
+ return autoConvert_v1_NodeSystemInfo_To_api_NodeSystemInfo(in, out, s)
+}
+
+func autoConvert_api_NodeSystemInfo_To_v1_NodeSystemInfo(in *api.NodeSystemInfo, out *NodeSystemInfo, s conversion.Scope) error {
+ out.MachineID = in.MachineID
+ out.SystemUUID = in.SystemUUID
+ out.BootID = in.BootID
+ out.KernelVersion = in.KernelVersion
+ out.OSImage = in.OSImage
+ out.ContainerRuntimeVersion = in.ContainerRuntimeVersion
+ out.KubeletVersion = in.KubeletVersion
+ out.KubeProxyVersion = in.KubeProxyVersion
+ out.OperatingSystem = in.OperatingSystem
+ out.Architecture = in.Architecture
+ return nil
+}
+
+// Convert_api_NodeSystemInfo_To_v1_NodeSystemInfo is an autogenerated conversion function.
+func Convert_api_NodeSystemInfo_To_v1_NodeSystemInfo(in *api.NodeSystemInfo, out *NodeSystemInfo, s conversion.Scope) error {
+ return autoConvert_api_NodeSystemInfo_To_v1_NodeSystemInfo(in, out, s)
+}
+
+func autoConvert_v1_ObjectFieldSelector_To_api_ObjectFieldSelector(in *ObjectFieldSelector, out *api.ObjectFieldSelector, s conversion.Scope) error {
+ out.APIVersion = in.APIVersion
+ out.FieldPath = in.FieldPath
+ return nil
+}
+
+// Convert_v1_ObjectFieldSelector_To_api_ObjectFieldSelector is an autogenerated conversion function.
+func Convert_v1_ObjectFieldSelector_To_api_ObjectFieldSelector(in *ObjectFieldSelector, out *api.ObjectFieldSelector, s conversion.Scope) error {
+ return autoConvert_v1_ObjectFieldSelector_To_api_ObjectFieldSelector(in, out, s)
+}
+
+func autoConvert_api_ObjectFieldSelector_To_v1_ObjectFieldSelector(in *api.ObjectFieldSelector, out *ObjectFieldSelector, s conversion.Scope) error {
+ out.APIVersion = in.APIVersion
+ out.FieldPath = in.FieldPath
+ return nil
+}
+
+// Convert_api_ObjectFieldSelector_To_v1_ObjectFieldSelector is an autogenerated conversion function.
+func Convert_api_ObjectFieldSelector_To_v1_ObjectFieldSelector(in *api.ObjectFieldSelector, out *ObjectFieldSelector, s conversion.Scope) error {
+ return autoConvert_api_ObjectFieldSelector_To_v1_ObjectFieldSelector(in, out, s)
+}
+
+func autoConvert_v1_ObjectMeta_To_api_ObjectMeta(in *ObjectMeta, out *api.ObjectMeta, s conversion.Scope) error {
+ out.Name = in.Name
+ out.GenerateName = in.GenerateName
+ out.Namespace = in.Namespace
+ out.SelfLink = in.SelfLink
+ out.UID = types.UID(in.UID)
+ out.ResourceVersion = in.ResourceVersion
+ out.Generation = in.Generation
+ out.CreationTimestamp = in.CreationTimestamp
+ out.DeletionTimestamp = (*meta_v1.Time)(unsafe.Pointer(in.DeletionTimestamp))
+ out.DeletionGracePeriodSeconds = (*int64)(unsafe.Pointer(in.DeletionGracePeriodSeconds))
+ out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels))
+ out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations))
+ out.OwnerReferences = *(*[]meta_v1.OwnerReference)(unsafe.Pointer(&in.OwnerReferences))
+ out.Initializers = (*meta_v1.Initializers)(unsafe.Pointer(in.Initializers))
+ out.Finalizers = *(*[]string)(unsafe.Pointer(&in.Finalizers))
+ out.ClusterName = in.ClusterName
+ return nil
+}
+
+// Convert_v1_ObjectMeta_To_api_ObjectMeta is an autogenerated conversion function.
+func Convert_v1_ObjectMeta_To_api_ObjectMeta(in *ObjectMeta, out *api.ObjectMeta, s conversion.Scope) error {
+ return autoConvert_v1_ObjectMeta_To_api_ObjectMeta(in, out, s)
+}
+
+func autoConvert_api_ObjectMeta_To_v1_ObjectMeta(in *api.ObjectMeta, out *ObjectMeta, s conversion.Scope) error {
+ out.Name = in.Name
+ out.GenerateName = in.GenerateName
+ out.Namespace = in.Namespace
+ out.SelfLink = in.SelfLink
+ out.UID = types.UID(in.UID)
+ out.ResourceVersion = in.ResourceVersion
+ out.Generation = in.Generation
+ out.CreationTimestamp = in.CreationTimestamp
+ out.DeletionTimestamp = (*meta_v1.Time)(unsafe.Pointer(in.DeletionTimestamp))
+ out.DeletionGracePeriodSeconds = (*int64)(unsafe.Pointer(in.DeletionGracePeriodSeconds))
+ out.Labels = *(*map[string]string)(unsafe.Pointer(&in.Labels))
+ out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations))
+ out.OwnerReferences = *(*[]meta_v1.OwnerReference)(unsafe.Pointer(&in.OwnerReferences))
+ out.Initializers = (*meta_v1.Initializers)(unsafe.Pointer(in.Initializers))
+ out.Finalizers = *(*[]string)(unsafe.Pointer(&in.Finalizers))
+ out.ClusterName = in.ClusterName
+ return nil
+}
+
+// Convert_api_ObjectMeta_To_v1_ObjectMeta is an autogenerated conversion function.
+func Convert_api_ObjectMeta_To_v1_ObjectMeta(in *api.ObjectMeta, out *ObjectMeta, s conversion.Scope) error {
+ return autoConvert_api_ObjectMeta_To_v1_ObjectMeta(in, out, s)
+}
+
+func autoConvert_v1_ObjectReference_To_api_ObjectReference(in *ObjectReference, out *api.ObjectReference, s conversion.Scope) error {
+ out.Kind = in.Kind
+ out.Namespace = in.Namespace
+ out.Name = in.Name
+ out.UID = types.UID(in.UID)
+ out.APIVersion = in.APIVersion
+ out.ResourceVersion = in.ResourceVersion
+ out.FieldPath = in.FieldPath
+ return nil
+}
+
+// Convert_v1_ObjectReference_To_api_ObjectReference is an autogenerated conversion function.
+func Convert_v1_ObjectReference_To_api_ObjectReference(in *ObjectReference, out *api.ObjectReference, s conversion.Scope) error {
+ return autoConvert_v1_ObjectReference_To_api_ObjectReference(in, out, s)
+}
+
+func autoConvert_api_ObjectReference_To_v1_ObjectReference(in *api.ObjectReference, out *ObjectReference, s conversion.Scope) error {
+ out.Kind = in.Kind
+ out.Namespace = in.Namespace
+ out.Name = in.Name
+ out.UID = types.UID(in.UID)
+ out.APIVersion = in.APIVersion
+ out.ResourceVersion = in.ResourceVersion
+ out.FieldPath = in.FieldPath
+ return nil
+}
+
+// Convert_api_ObjectReference_To_v1_ObjectReference is an autogenerated conversion function.
+func Convert_api_ObjectReference_To_v1_ObjectReference(in *api.ObjectReference, out *ObjectReference, s conversion.Scope) error {
+ return autoConvert_api_ObjectReference_To_v1_ObjectReference(in, out, s)
+}
+
+func autoConvert_v1_PersistentVolume_To_api_PersistentVolume(in *PersistentVolume, out *api.PersistentVolume, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_PersistentVolumeSpec_To_api_PersistentVolumeSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_PersistentVolumeStatus_To_api_PersistentVolumeStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_PersistentVolume_To_api_PersistentVolume is an autogenerated conversion function.
+func Convert_v1_PersistentVolume_To_api_PersistentVolume(in *PersistentVolume, out *api.PersistentVolume, s conversion.Scope) error {
+ return autoConvert_v1_PersistentVolume_To_api_PersistentVolume(in, out, s)
+}
+
+func autoConvert_api_PersistentVolume_To_v1_PersistentVolume(in *api.PersistentVolume, out *PersistentVolume, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_api_PersistentVolumeSpec_To_v1_PersistentVolumeSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_api_PersistentVolumeStatus_To_v1_PersistentVolumeStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_PersistentVolume_To_v1_PersistentVolume is an autogenerated conversion function.
+func Convert_api_PersistentVolume_To_v1_PersistentVolume(in *api.PersistentVolume, out *PersistentVolume, s conversion.Scope) error {
+ return autoConvert_api_PersistentVolume_To_v1_PersistentVolume(in, out, s)
+}
+
+func autoConvert_v1_PersistentVolumeClaim_To_api_PersistentVolumeClaim(in *PersistentVolumeClaim, out *api.PersistentVolumeClaim, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_PersistentVolumeClaimSpec_To_api_PersistentVolumeClaimSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_PersistentVolumeClaimStatus_To_api_PersistentVolumeClaimStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_PersistentVolumeClaim_To_api_PersistentVolumeClaim is an autogenerated conversion function.
+func Convert_v1_PersistentVolumeClaim_To_api_PersistentVolumeClaim(in *PersistentVolumeClaim, out *api.PersistentVolumeClaim, s conversion.Scope) error {
+ return autoConvert_v1_PersistentVolumeClaim_To_api_PersistentVolumeClaim(in, out, s)
+}
+
+func autoConvert_api_PersistentVolumeClaim_To_v1_PersistentVolumeClaim(in *api.PersistentVolumeClaim, out *PersistentVolumeClaim, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_api_PersistentVolumeClaimSpec_To_v1_PersistentVolumeClaimSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_api_PersistentVolumeClaimStatus_To_v1_PersistentVolumeClaimStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_PersistentVolumeClaim_To_v1_PersistentVolumeClaim is an autogenerated conversion function.
+func Convert_api_PersistentVolumeClaim_To_v1_PersistentVolumeClaim(in *api.PersistentVolumeClaim, out *PersistentVolumeClaim, s conversion.Scope) error {
+ return autoConvert_api_PersistentVolumeClaim_To_v1_PersistentVolumeClaim(in, out, s)
+}
+
+func autoConvert_v1_PersistentVolumeClaimList_To_api_PersistentVolumeClaimList(in *PersistentVolumeClaimList, out *api.PersistentVolumeClaimList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]api.PersistentVolumeClaim)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1_PersistentVolumeClaimList_To_api_PersistentVolumeClaimList is an autogenerated conversion function.
+func Convert_v1_PersistentVolumeClaimList_To_api_PersistentVolumeClaimList(in *PersistentVolumeClaimList, out *api.PersistentVolumeClaimList, s conversion.Scope) error {
+ return autoConvert_v1_PersistentVolumeClaimList_To_api_PersistentVolumeClaimList(in, out, s)
+}
+
+func autoConvert_api_PersistentVolumeClaimList_To_v1_PersistentVolumeClaimList(in *api.PersistentVolumeClaimList, out *PersistentVolumeClaimList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]PersistentVolumeClaim, 0)
+ } else {
+ out.Items = *(*[]PersistentVolumeClaim)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_api_PersistentVolumeClaimList_To_v1_PersistentVolumeClaimList is an autogenerated conversion function.
+func Convert_api_PersistentVolumeClaimList_To_v1_PersistentVolumeClaimList(in *api.PersistentVolumeClaimList, out *PersistentVolumeClaimList, s conversion.Scope) error {
+ return autoConvert_api_PersistentVolumeClaimList_To_v1_PersistentVolumeClaimList(in, out, s)
+}
+
+func autoConvert_v1_PersistentVolumeClaimSpec_To_api_PersistentVolumeClaimSpec(in *PersistentVolumeClaimSpec, out *api.PersistentVolumeClaimSpec, s conversion.Scope) error {
+ out.AccessModes = *(*[]api.PersistentVolumeAccessMode)(unsafe.Pointer(&in.AccessModes))
+ out.Selector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.Selector))
+ if err := Convert_v1_ResourceRequirements_To_api_ResourceRequirements(&in.Resources, &out.Resources, s); err != nil {
+ return err
+ }
+ out.VolumeName = in.VolumeName
+ out.StorageClassName = (*string)(unsafe.Pointer(in.StorageClassName))
+ return nil
+}
+
+// Convert_v1_PersistentVolumeClaimSpec_To_api_PersistentVolumeClaimSpec is an autogenerated conversion function.
+func Convert_v1_PersistentVolumeClaimSpec_To_api_PersistentVolumeClaimSpec(in *PersistentVolumeClaimSpec, out *api.PersistentVolumeClaimSpec, s conversion.Scope) error {
+ return autoConvert_v1_PersistentVolumeClaimSpec_To_api_PersistentVolumeClaimSpec(in, out, s)
+}
+
+func autoConvert_api_PersistentVolumeClaimSpec_To_v1_PersistentVolumeClaimSpec(in *api.PersistentVolumeClaimSpec, out *PersistentVolumeClaimSpec, s conversion.Scope) error {
+ out.AccessModes = *(*[]PersistentVolumeAccessMode)(unsafe.Pointer(&in.AccessModes))
+ out.Selector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.Selector))
+ if err := Convert_api_ResourceRequirements_To_v1_ResourceRequirements(&in.Resources, &out.Resources, s); err != nil {
+ return err
+ }
+ out.VolumeName = in.VolumeName
+ out.StorageClassName = (*string)(unsafe.Pointer(in.StorageClassName))
+ return nil
+}
+
+// Convert_api_PersistentVolumeClaimSpec_To_v1_PersistentVolumeClaimSpec is an autogenerated conversion function.
+func Convert_api_PersistentVolumeClaimSpec_To_v1_PersistentVolumeClaimSpec(in *api.PersistentVolumeClaimSpec, out *PersistentVolumeClaimSpec, s conversion.Scope) error {
+ return autoConvert_api_PersistentVolumeClaimSpec_To_v1_PersistentVolumeClaimSpec(in, out, s)
+}
+
+func autoConvert_v1_PersistentVolumeClaimStatus_To_api_PersistentVolumeClaimStatus(in *PersistentVolumeClaimStatus, out *api.PersistentVolumeClaimStatus, s conversion.Scope) error {
+ out.Phase = api.PersistentVolumeClaimPhase(in.Phase)
+ out.AccessModes = *(*[]api.PersistentVolumeAccessMode)(unsafe.Pointer(&in.AccessModes))
+ out.Capacity = *(*api.ResourceList)(unsafe.Pointer(&in.Capacity))
+ return nil
+}
+
+// Convert_v1_PersistentVolumeClaimStatus_To_api_PersistentVolumeClaimStatus is an autogenerated conversion function.
+func Convert_v1_PersistentVolumeClaimStatus_To_api_PersistentVolumeClaimStatus(in *PersistentVolumeClaimStatus, out *api.PersistentVolumeClaimStatus, s conversion.Scope) error {
+ return autoConvert_v1_PersistentVolumeClaimStatus_To_api_PersistentVolumeClaimStatus(in, out, s)
+}
+
+func autoConvert_api_PersistentVolumeClaimStatus_To_v1_PersistentVolumeClaimStatus(in *api.PersistentVolumeClaimStatus, out *PersistentVolumeClaimStatus, s conversion.Scope) error {
+ out.Phase = PersistentVolumeClaimPhase(in.Phase)
+ out.AccessModes = *(*[]PersistentVolumeAccessMode)(unsafe.Pointer(&in.AccessModes))
+ out.Capacity = *(*ResourceList)(unsafe.Pointer(&in.Capacity))
+ return nil
+}
+
+// Convert_api_PersistentVolumeClaimStatus_To_v1_PersistentVolumeClaimStatus is an autogenerated conversion function.
+func Convert_api_PersistentVolumeClaimStatus_To_v1_PersistentVolumeClaimStatus(in *api.PersistentVolumeClaimStatus, out *PersistentVolumeClaimStatus, s conversion.Scope) error {
+ return autoConvert_api_PersistentVolumeClaimStatus_To_v1_PersistentVolumeClaimStatus(in, out, s)
+}
+
+func autoConvert_v1_PersistentVolumeClaimVolumeSource_To_api_PersistentVolumeClaimVolumeSource(in *PersistentVolumeClaimVolumeSource, out *api.PersistentVolumeClaimVolumeSource, s conversion.Scope) error {
+ out.ClaimName = in.ClaimName
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_v1_PersistentVolumeClaimVolumeSource_To_api_PersistentVolumeClaimVolumeSource is an autogenerated conversion function.
+func Convert_v1_PersistentVolumeClaimVolumeSource_To_api_PersistentVolumeClaimVolumeSource(in *PersistentVolumeClaimVolumeSource, out *api.PersistentVolumeClaimVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_PersistentVolumeClaimVolumeSource_To_api_PersistentVolumeClaimVolumeSource(in, out, s)
+}
+
+func autoConvert_api_PersistentVolumeClaimVolumeSource_To_v1_PersistentVolumeClaimVolumeSource(in *api.PersistentVolumeClaimVolumeSource, out *PersistentVolumeClaimVolumeSource, s conversion.Scope) error {
+ out.ClaimName = in.ClaimName
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_api_PersistentVolumeClaimVolumeSource_To_v1_PersistentVolumeClaimVolumeSource is an autogenerated conversion function.
+func Convert_api_PersistentVolumeClaimVolumeSource_To_v1_PersistentVolumeClaimVolumeSource(in *api.PersistentVolumeClaimVolumeSource, out *PersistentVolumeClaimVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_PersistentVolumeClaimVolumeSource_To_v1_PersistentVolumeClaimVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_PersistentVolumeList_To_api_PersistentVolumeList(in *PersistentVolumeList, out *api.PersistentVolumeList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]api.PersistentVolume, len(*in))
+ for i := range *in {
+ if err := Convert_v1_PersistentVolume_To_api_PersistentVolume(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1_PersistentVolumeList_To_api_PersistentVolumeList is an autogenerated conversion function.
+func Convert_v1_PersistentVolumeList_To_api_PersistentVolumeList(in *PersistentVolumeList, out *api.PersistentVolumeList, s conversion.Scope) error {
+ return autoConvert_v1_PersistentVolumeList_To_api_PersistentVolumeList(in, out, s)
+}
+
+func autoConvert_api_PersistentVolumeList_To_v1_PersistentVolumeList(in *api.PersistentVolumeList, out *PersistentVolumeList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PersistentVolume, len(*in))
+ for i := range *in {
+ if err := Convert_api_PersistentVolume_To_v1_PersistentVolume(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]PersistentVolume, 0)
+ }
+ return nil
+}
+
+// Convert_api_PersistentVolumeList_To_v1_PersistentVolumeList is an autogenerated conversion function.
+func Convert_api_PersistentVolumeList_To_v1_PersistentVolumeList(in *api.PersistentVolumeList, out *PersistentVolumeList, s conversion.Scope) error {
+ return autoConvert_api_PersistentVolumeList_To_v1_PersistentVolumeList(in, out, s)
+}
+
+func autoConvert_v1_PersistentVolumeSource_To_api_PersistentVolumeSource(in *PersistentVolumeSource, out *api.PersistentVolumeSource, s conversion.Scope) error {
+ out.GCEPersistentDisk = (*api.GCEPersistentDiskVolumeSource)(unsafe.Pointer(in.GCEPersistentDisk))
+ out.AWSElasticBlockStore = (*api.AWSElasticBlockStoreVolumeSource)(unsafe.Pointer(in.AWSElasticBlockStore))
+ out.HostPath = (*api.HostPathVolumeSource)(unsafe.Pointer(in.HostPath))
+ out.Glusterfs = (*api.GlusterfsVolumeSource)(unsafe.Pointer(in.Glusterfs))
+ out.NFS = (*api.NFSVolumeSource)(unsafe.Pointer(in.NFS))
+ out.RBD = (*api.RBDVolumeSource)(unsafe.Pointer(in.RBD))
+ out.ISCSI = (*api.ISCSIVolumeSource)(unsafe.Pointer(in.ISCSI))
+ out.Cinder = (*api.CinderVolumeSource)(unsafe.Pointer(in.Cinder))
+ out.CephFS = (*api.CephFSVolumeSource)(unsafe.Pointer(in.CephFS))
+ out.FC = (*api.FCVolumeSource)(unsafe.Pointer(in.FC))
+ out.Flocker = (*api.FlockerVolumeSource)(unsafe.Pointer(in.Flocker))
+ out.FlexVolume = (*api.FlexVolumeSource)(unsafe.Pointer(in.FlexVolume))
+ out.AzureFile = (*api.AzureFileVolumeSource)(unsafe.Pointer(in.AzureFile))
+ out.VsphereVolume = (*api.VsphereVirtualDiskVolumeSource)(unsafe.Pointer(in.VsphereVolume))
+ out.Quobyte = (*api.QuobyteVolumeSource)(unsafe.Pointer(in.Quobyte))
+ out.AzureDisk = (*api.AzureDiskVolumeSource)(unsafe.Pointer(in.AzureDisk))
+ out.PhotonPersistentDisk = (*api.PhotonPersistentDiskVolumeSource)(unsafe.Pointer(in.PhotonPersistentDisk))
+ out.PortworxVolume = (*api.PortworxVolumeSource)(unsafe.Pointer(in.PortworxVolume))
+ out.ScaleIO = (*api.ScaleIOVolumeSource)(unsafe.Pointer(in.ScaleIO))
+ out.Local = (*api.LocalVolumeSource)(unsafe.Pointer(in.Local))
+ out.StorageOS = (*api.StorageOSPersistentVolumeSource)(unsafe.Pointer(in.StorageOS))
+ return nil
+}
+
+// Convert_v1_PersistentVolumeSource_To_api_PersistentVolumeSource is an autogenerated conversion function.
+func Convert_v1_PersistentVolumeSource_To_api_PersistentVolumeSource(in *PersistentVolumeSource, out *api.PersistentVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_PersistentVolumeSource_To_api_PersistentVolumeSource(in, out, s)
+}
+
+func autoConvert_api_PersistentVolumeSource_To_v1_PersistentVolumeSource(in *api.PersistentVolumeSource, out *PersistentVolumeSource, s conversion.Scope) error {
+ out.GCEPersistentDisk = (*GCEPersistentDiskVolumeSource)(unsafe.Pointer(in.GCEPersistentDisk))
+ out.AWSElasticBlockStore = (*AWSElasticBlockStoreVolumeSource)(unsafe.Pointer(in.AWSElasticBlockStore))
+ out.HostPath = (*HostPathVolumeSource)(unsafe.Pointer(in.HostPath))
+ out.Glusterfs = (*GlusterfsVolumeSource)(unsafe.Pointer(in.Glusterfs))
+ out.NFS = (*NFSVolumeSource)(unsafe.Pointer(in.NFS))
+ out.RBD = (*RBDVolumeSource)(unsafe.Pointer(in.RBD))
+ out.Quobyte = (*QuobyteVolumeSource)(unsafe.Pointer(in.Quobyte))
+ out.ISCSI = (*ISCSIVolumeSource)(unsafe.Pointer(in.ISCSI))
+ out.FlexVolume = (*FlexVolumeSource)(unsafe.Pointer(in.FlexVolume))
+ out.Cinder = (*CinderVolumeSource)(unsafe.Pointer(in.Cinder))
+ out.CephFS = (*CephFSVolumeSource)(unsafe.Pointer(in.CephFS))
+ out.FC = (*FCVolumeSource)(unsafe.Pointer(in.FC))
+ out.Flocker = (*FlockerVolumeSource)(unsafe.Pointer(in.Flocker))
+ out.AzureFile = (*AzureFileVolumeSource)(unsafe.Pointer(in.AzureFile))
+ out.VsphereVolume = (*VsphereVirtualDiskVolumeSource)(unsafe.Pointer(in.VsphereVolume))
+ out.AzureDisk = (*AzureDiskVolumeSource)(unsafe.Pointer(in.AzureDisk))
+ out.PhotonPersistentDisk = (*PhotonPersistentDiskVolumeSource)(unsafe.Pointer(in.PhotonPersistentDisk))
+ out.PortworxVolume = (*PortworxVolumeSource)(unsafe.Pointer(in.PortworxVolume))
+ out.ScaleIO = (*ScaleIOVolumeSource)(unsafe.Pointer(in.ScaleIO))
+ out.Local = (*LocalVolumeSource)(unsafe.Pointer(in.Local))
+ out.StorageOS = (*StorageOSPersistentVolumeSource)(unsafe.Pointer(in.StorageOS))
+ return nil
+}
+
+// Convert_api_PersistentVolumeSource_To_v1_PersistentVolumeSource is an autogenerated conversion function.
+func Convert_api_PersistentVolumeSource_To_v1_PersistentVolumeSource(in *api.PersistentVolumeSource, out *PersistentVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_PersistentVolumeSource_To_v1_PersistentVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_PersistentVolumeSpec_To_api_PersistentVolumeSpec(in *PersistentVolumeSpec, out *api.PersistentVolumeSpec, s conversion.Scope) error {
+ out.Capacity = *(*api.ResourceList)(unsafe.Pointer(&in.Capacity))
+ if err := Convert_v1_PersistentVolumeSource_To_api_PersistentVolumeSource(&in.PersistentVolumeSource, &out.PersistentVolumeSource, s); err != nil {
+ return err
+ }
+ out.AccessModes = *(*[]api.PersistentVolumeAccessMode)(unsafe.Pointer(&in.AccessModes))
+ out.ClaimRef = (*api.ObjectReference)(unsafe.Pointer(in.ClaimRef))
+ out.PersistentVolumeReclaimPolicy = api.PersistentVolumeReclaimPolicy(in.PersistentVolumeReclaimPolicy)
+ out.StorageClassName = in.StorageClassName
+ return nil
+}
+
+// Convert_v1_PersistentVolumeSpec_To_api_PersistentVolumeSpec is an autogenerated conversion function.
+func Convert_v1_PersistentVolumeSpec_To_api_PersistentVolumeSpec(in *PersistentVolumeSpec, out *api.PersistentVolumeSpec, s conversion.Scope) error {
+ return autoConvert_v1_PersistentVolumeSpec_To_api_PersistentVolumeSpec(in, out, s)
+}
+
+func autoConvert_api_PersistentVolumeSpec_To_v1_PersistentVolumeSpec(in *api.PersistentVolumeSpec, out *PersistentVolumeSpec, s conversion.Scope) error {
+ out.Capacity = *(*ResourceList)(unsafe.Pointer(&in.Capacity))
+ if err := Convert_api_PersistentVolumeSource_To_v1_PersistentVolumeSource(&in.PersistentVolumeSource, &out.PersistentVolumeSource, s); err != nil {
+ return err
+ }
+ out.AccessModes = *(*[]PersistentVolumeAccessMode)(unsafe.Pointer(&in.AccessModes))
+ out.ClaimRef = (*ObjectReference)(unsafe.Pointer(in.ClaimRef))
+ out.PersistentVolumeReclaimPolicy = PersistentVolumeReclaimPolicy(in.PersistentVolumeReclaimPolicy)
+ out.StorageClassName = in.StorageClassName
+ return nil
+}
+
+// Convert_api_PersistentVolumeSpec_To_v1_PersistentVolumeSpec is an autogenerated conversion function.
+func Convert_api_PersistentVolumeSpec_To_v1_PersistentVolumeSpec(in *api.PersistentVolumeSpec, out *PersistentVolumeSpec, s conversion.Scope) error {
+ return autoConvert_api_PersistentVolumeSpec_To_v1_PersistentVolumeSpec(in, out, s)
+}
+
+func autoConvert_v1_PersistentVolumeStatus_To_api_PersistentVolumeStatus(in *PersistentVolumeStatus, out *api.PersistentVolumeStatus, s conversion.Scope) error {
+ out.Phase = api.PersistentVolumePhase(in.Phase)
+ out.Message = in.Message
+ out.Reason = in.Reason
+ return nil
+}
+
+// Convert_v1_PersistentVolumeStatus_To_api_PersistentVolumeStatus is an autogenerated conversion function.
+func Convert_v1_PersistentVolumeStatus_To_api_PersistentVolumeStatus(in *PersistentVolumeStatus, out *api.PersistentVolumeStatus, s conversion.Scope) error {
+ return autoConvert_v1_PersistentVolumeStatus_To_api_PersistentVolumeStatus(in, out, s)
+}
+
+func autoConvert_api_PersistentVolumeStatus_To_v1_PersistentVolumeStatus(in *api.PersistentVolumeStatus, out *PersistentVolumeStatus, s conversion.Scope) error {
+ out.Phase = PersistentVolumePhase(in.Phase)
+ out.Message = in.Message
+ out.Reason = in.Reason
+ return nil
+}
+
+// Convert_api_PersistentVolumeStatus_To_v1_PersistentVolumeStatus is an autogenerated conversion function.
+func Convert_api_PersistentVolumeStatus_To_v1_PersistentVolumeStatus(in *api.PersistentVolumeStatus, out *PersistentVolumeStatus, s conversion.Scope) error {
+ return autoConvert_api_PersistentVolumeStatus_To_v1_PersistentVolumeStatus(in, out, s)
+}
+
+func autoConvert_v1_PhotonPersistentDiskVolumeSource_To_api_PhotonPersistentDiskVolumeSource(in *PhotonPersistentDiskVolumeSource, out *api.PhotonPersistentDiskVolumeSource, s conversion.Scope) error {
+ out.PdID = in.PdID
+ out.FSType = in.FSType
+ return nil
+}
+
+// Convert_v1_PhotonPersistentDiskVolumeSource_To_api_PhotonPersistentDiskVolumeSource is an autogenerated conversion function.
+func Convert_v1_PhotonPersistentDiskVolumeSource_To_api_PhotonPersistentDiskVolumeSource(in *PhotonPersistentDiskVolumeSource, out *api.PhotonPersistentDiskVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_PhotonPersistentDiskVolumeSource_To_api_PhotonPersistentDiskVolumeSource(in, out, s)
+}
+
+func autoConvert_api_PhotonPersistentDiskVolumeSource_To_v1_PhotonPersistentDiskVolumeSource(in *api.PhotonPersistentDiskVolumeSource, out *PhotonPersistentDiskVolumeSource, s conversion.Scope) error {
+ out.PdID = in.PdID
+ out.FSType = in.FSType
+ return nil
+}
+
+// Convert_api_PhotonPersistentDiskVolumeSource_To_v1_PhotonPersistentDiskVolumeSource is an autogenerated conversion function.
+func Convert_api_PhotonPersistentDiskVolumeSource_To_v1_PhotonPersistentDiskVolumeSource(in *api.PhotonPersistentDiskVolumeSource, out *PhotonPersistentDiskVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_PhotonPersistentDiskVolumeSource_To_v1_PhotonPersistentDiskVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_Pod_To_api_Pod(in *Pod, out *api.Pod, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_PodSpec_To_api_PodSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_PodStatus_To_api_PodStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func autoConvert_api_Pod_To_v1_Pod(in *api.Pod, out *Pod, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_api_PodSpec_To_v1_PodSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_api_PodStatus_To_v1_PodStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func autoConvert_v1_PodAffinity_To_api_PodAffinity(in *PodAffinity, out *api.PodAffinity, s conversion.Scope) error {
+ out.RequiredDuringSchedulingIgnoredDuringExecution = *(*[]api.PodAffinityTerm)(unsafe.Pointer(&in.RequiredDuringSchedulingIgnoredDuringExecution))
+ out.PreferredDuringSchedulingIgnoredDuringExecution = *(*[]api.WeightedPodAffinityTerm)(unsafe.Pointer(&in.PreferredDuringSchedulingIgnoredDuringExecution))
+ return nil
+}
+
+// Convert_v1_PodAffinity_To_api_PodAffinity is an autogenerated conversion function.
+func Convert_v1_PodAffinity_To_api_PodAffinity(in *PodAffinity, out *api.PodAffinity, s conversion.Scope) error {
+ return autoConvert_v1_PodAffinity_To_api_PodAffinity(in, out, s)
+}
+
+func autoConvert_api_PodAffinity_To_v1_PodAffinity(in *api.PodAffinity, out *PodAffinity, s conversion.Scope) error {
+ out.RequiredDuringSchedulingIgnoredDuringExecution = *(*[]PodAffinityTerm)(unsafe.Pointer(&in.RequiredDuringSchedulingIgnoredDuringExecution))
+ out.PreferredDuringSchedulingIgnoredDuringExecution = *(*[]WeightedPodAffinityTerm)(unsafe.Pointer(&in.PreferredDuringSchedulingIgnoredDuringExecution))
+ return nil
+}
+
+// Convert_api_PodAffinity_To_v1_PodAffinity is an autogenerated conversion function.
+func Convert_api_PodAffinity_To_v1_PodAffinity(in *api.PodAffinity, out *PodAffinity, s conversion.Scope) error {
+ return autoConvert_api_PodAffinity_To_v1_PodAffinity(in, out, s)
+}
+
+func autoConvert_v1_PodAffinityTerm_To_api_PodAffinityTerm(in *PodAffinityTerm, out *api.PodAffinityTerm, s conversion.Scope) error {
+ out.LabelSelector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.LabelSelector))
+ out.Namespaces = *(*[]string)(unsafe.Pointer(&in.Namespaces))
+ out.TopologyKey = in.TopologyKey
+ return nil
+}
+
+// Convert_v1_PodAffinityTerm_To_api_PodAffinityTerm is an autogenerated conversion function.
+func Convert_v1_PodAffinityTerm_To_api_PodAffinityTerm(in *PodAffinityTerm, out *api.PodAffinityTerm, s conversion.Scope) error {
+ return autoConvert_v1_PodAffinityTerm_To_api_PodAffinityTerm(in, out, s)
+}
+
+func autoConvert_api_PodAffinityTerm_To_v1_PodAffinityTerm(in *api.PodAffinityTerm, out *PodAffinityTerm, s conversion.Scope) error {
+ out.LabelSelector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.LabelSelector))
+ out.Namespaces = *(*[]string)(unsafe.Pointer(&in.Namespaces))
+ out.TopologyKey = in.TopologyKey
+ return nil
+}
+
+// Convert_api_PodAffinityTerm_To_v1_PodAffinityTerm is an autogenerated conversion function.
+func Convert_api_PodAffinityTerm_To_v1_PodAffinityTerm(in *api.PodAffinityTerm, out *PodAffinityTerm, s conversion.Scope) error {
+ return autoConvert_api_PodAffinityTerm_To_v1_PodAffinityTerm(in, out, s)
+}
+
+func autoConvert_v1_PodAntiAffinity_To_api_PodAntiAffinity(in *PodAntiAffinity, out *api.PodAntiAffinity, s conversion.Scope) error {
+ out.RequiredDuringSchedulingIgnoredDuringExecution = *(*[]api.PodAffinityTerm)(unsafe.Pointer(&in.RequiredDuringSchedulingIgnoredDuringExecution))
+ out.PreferredDuringSchedulingIgnoredDuringExecution = *(*[]api.WeightedPodAffinityTerm)(unsafe.Pointer(&in.PreferredDuringSchedulingIgnoredDuringExecution))
+ return nil
+}
+
+// Convert_v1_PodAntiAffinity_To_api_PodAntiAffinity is an autogenerated conversion function.
+func Convert_v1_PodAntiAffinity_To_api_PodAntiAffinity(in *PodAntiAffinity, out *api.PodAntiAffinity, s conversion.Scope) error {
+ return autoConvert_v1_PodAntiAffinity_To_api_PodAntiAffinity(in, out, s)
+}
+
+func autoConvert_api_PodAntiAffinity_To_v1_PodAntiAffinity(in *api.PodAntiAffinity, out *PodAntiAffinity, s conversion.Scope) error {
+ out.RequiredDuringSchedulingIgnoredDuringExecution = *(*[]PodAffinityTerm)(unsafe.Pointer(&in.RequiredDuringSchedulingIgnoredDuringExecution))
+ out.PreferredDuringSchedulingIgnoredDuringExecution = *(*[]WeightedPodAffinityTerm)(unsafe.Pointer(&in.PreferredDuringSchedulingIgnoredDuringExecution))
+ return nil
+}
+
+// Convert_api_PodAntiAffinity_To_v1_PodAntiAffinity is an autogenerated conversion function.
+func Convert_api_PodAntiAffinity_To_v1_PodAntiAffinity(in *api.PodAntiAffinity, out *PodAntiAffinity, s conversion.Scope) error {
+ return autoConvert_api_PodAntiAffinity_To_v1_PodAntiAffinity(in, out, s)
+}
+
+func autoConvert_v1_PodAttachOptions_To_api_PodAttachOptions(in *PodAttachOptions, out *api.PodAttachOptions, s conversion.Scope) error {
+ out.Stdin = in.Stdin
+ out.Stdout = in.Stdout
+ out.Stderr = in.Stderr
+ out.TTY = in.TTY
+ out.Container = in.Container
+ return nil
+}
+
+// Convert_v1_PodAttachOptions_To_api_PodAttachOptions is an autogenerated conversion function.
+func Convert_v1_PodAttachOptions_To_api_PodAttachOptions(in *PodAttachOptions, out *api.PodAttachOptions, s conversion.Scope) error {
+ return autoConvert_v1_PodAttachOptions_To_api_PodAttachOptions(in, out, s)
+}
+
+func autoConvert_api_PodAttachOptions_To_v1_PodAttachOptions(in *api.PodAttachOptions, out *PodAttachOptions, s conversion.Scope) error {
+ out.Stdin = in.Stdin
+ out.Stdout = in.Stdout
+ out.Stderr = in.Stderr
+ out.TTY = in.TTY
+ out.Container = in.Container
+ return nil
+}
+
+// Convert_api_PodAttachOptions_To_v1_PodAttachOptions is an autogenerated conversion function.
+func Convert_api_PodAttachOptions_To_v1_PodAttachOptions(in *api.PodAttachOptions, out *PodAttachOptions, s conversion.Scope) error {
+ return autoConvert_api_PodAttachOptions_To_v1_PodAttachOptions(in, out, s)
+}
+
+func autoConvert_v1_PodCondition_To_api_PodCondition(in *PodCondition, out *api.PodCondition, s conversion.Scope) error {
+ out.Type = api.PodConditionType(in.Type)
+ out.Status = api.ConditionStatus(in.Status)
+ out.LastProbeTime = in.LastProbeTime
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_v1_PodCondition_To_api_PodCondition is an autogenerated conversion function.
+func Convert_v1_PodCondition_To_api_PodCondition(in *PodCondition, out *api.PodCondition, s conversion.Scope) error {
+ return autoConvert_v1_PodCondition_To_api_PodCondition(in, out, s)
+}
+
+func autoConvert_api_PodCondition_To_v1_PodCondition(in *api.PodCondition, out *PodCondition, s conversion.Scope) error {
+ out.Type = PodConditionType(in.Type)
+ out.Status = ConditionStatus(in.Status)
+ out.LastProbeTime = in.LastProbeTime
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_api_PodCondition_To_v1_PodCondition is an autogenerated conversion function.
+func Convert_api_PodCondition_To_v1_PodCondition(in *api.PodCondition, out *PodCondition, s conversion.Scope) error {
+ return autoConvert_api_PodCondition_To_v1_PodCondition(in, out, s)
+}
+
+func autoConvert_v1_PodExecOptions_To_api_PodExecOptions(in *PodExecOptions, out *api.PodExecOptions, s conversion.Scope) error {
+ out.Stdin = in.Stdin
+ out.Stdout = in.Stdout
+ out.Stderr = in.Stderr
+ out.TTY = in.TTY
+ out.Container = in.Container
+ out.Command = *(*[]string)(unsafe.Pointer(&in.Command))
+ return nil
+}
+
+// Convert_v1_PodExecOptions_To_api_PodExecOptions is an autogenerated conversion function.
+func Convert_v1_PodExecOptions_To_api_PodExecOptions(in *PodExecOptions, out *api.PodExecOptions, s conversion.Scope) error {
+ return autoConvert_v1_PodExecOptions_To_api_PodExecOptions(in, out, s)
+}
+
+func autoConvert_api_PodExecOptions_To_v1_PodExecOptions(in *api.PodExecOptions, out *PodExecOptions, s conversion.Scope) error {
+ out.Stdin = in.Stdin
+ out.Stdout = in.Stdout
+ out.Stderr = in.Stderr
+ out.TTY = in.TTY
+ out.Container = in.Container
+ if in.Command == nil {
+ out.Command = make([]string, 0)
+ } else {
+ out.Command = *(*[]string)(unsafe.Pointer(&in.Command))
+ }
+ return nil
+}
+
+// Convert_api_PodExecOptions_To_v1_PodExecOptions is an autogenerated conversion function.
+func Convert_api_PodExecOptions_To_v1_PodExecOptions(in *api.PodExecOptions, out *PodExecOptions, s conversion.Scope) error {
+ return autoConvert_api_PodExecOptions_To_v1_PodExecOptions(in, out, s)
+}
+
+func autoConvert_v1_PodList_To_api_PodList(in *PodList, out *api.PodList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]api.Pod, len(*in))
+ for i := range *in {
+ if err := Convert_v1_Pod_To_api_Pod(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1_PodList_To_api_PodList is an autogenerated conversion function.
+func Convert_v1_PodList_To_api_PodList(in *PodList, out *api.PodList, s conversion.Scope) error {
+ return autoConvert_v1_PodList_To_api_PodList(in, out, s)
+}
+
+func autoConvert_api_PodList_To_v1_PodList(in *api.PodList, out *PodList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Pod, len(*in))
+ for i := range *in {
+ if err := Convert_api_Pod_To_v1_Pod(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]Pod, 0)
+ }
+ return nil
+}
+
+// Convert_api_PodList_To_v1_PodList is an autogenerated conversion function.
+func Convert_api_PodList_To_v1_PodList(in *api.PodList, out *PodList, s conversion.Scope) error {
+ return autoConvert_api_PodList_To_v1_PodList(in, out, s)
+}
+
+func autoConvert_v1_PodLogOptions_To_api_PodLogOptions(in *PodLogOptions, out *api.PodLogOptions, s conversion.Scope) error {
+ out.Container = in.Container
+ out.Follow = in.Follow
+ out.Previous = in.Previous
+ out.SinceSeconds = (*int64)(unsafe.Pointer(in.SinceSeconds))
+ out.SinceTime = (*meta_v1.Time)(unsafe.Pointer(in.SinceTime))
+ out.Timestamps = in.Timestamps
+ out.TailLines = (*int64)(unsafe.Pointer(in.TailLines))
+ out.LimitBytes = (*int64)(unsafe.Pointer(in.LimitBytes))
+ return nil
+}
+
+// Convert_v1_PodLogOptions_To_api_PodLogOptions is an autogenerated conversion function.
+func Convert_v1_PodLogOptions_To_api_PodLogOptions(in *PodLogOptions, out *api.PodLogOptions, s conversion.Scope) error {
+ return autoConvert_v1_PodLogOptions_To_api_PodLogOptions(in, out, s)
+}
+
+func autoConvert_api_PodLogOptions_To_v1_PodLogOptions(in *api.PodLogOptions, out *PodLogOptions, s conversion.Scope) error {
+ out.Container = in.Container
+ out.Follow = in.Follow
+ out.Previous = in.Previous
+ out.SinceSeconds = (*int64)(unsafe.Pointer(in.SinceSeconds))
+ out.SinceTime = (*meta_v1.Time)(unsafe.Pointer(in.SinceTime))
+ out.Timestamps = in.Timestamps
+ out.TailLines = (*int64)(unsafe.Pointer(in.TailLines))
+ out.LimitBytes = (*int64)(unsafe.Pointer(in.LimitBytes))
+ return nil
+}
+
+// Convert_api_PodLogOptions_To_v1_PodLogOptions is an autogenerated conversion function.
+func Convert_api_PodLogOptions_To_v1_PodLogOptions(in *api.PodLogOptions, out *PodLogOptions, s conversion.Scope) error {
+ return autoConvert_api_PodLogOptions_To_v1_PodLogOptions(in, out, s)
+}
+
+func autoConvert_v1_PodPortForwardOptions_To_api_PodPortForwardOptions(in *PodPortForwardOptions, out *api.PodPortForwardOptions, s conversion.Scope) error {
+ out.Ports = *(*[]int32)(unsafe.Pointer(&in.Ports))
+ return nil
+}
+
+// Convert_v1_PodPortForwardOptions_To_api_PodPortForwardOptions is an autogenerated conversion function.
+func Convert_v1_PodPortForwardOptions_To_api_PodPortForwardOptions(in *PodPortForwardOptions, out *api.PodPortForwardOptions, s conversion.Scope) error {
+ return autoConvert_v1_PodPortForwardOptions_To_api_PodPortForwardOptions(in, out, s)
+}
+
+func autoConvert_api_PodPortForwardOptions_To_v1_PodPortForwardOptions(in *api.PodPortForwardOptions, out *PodPortForwardOptions, s conversion.Scope) error {
+ out.Ports = *(*[]int32)(unsafe.Pointer(&in.Ports))
+ return nil
+}
+
+// Convert_api_PodPortForwardOptions_To_v1_PodPortForwardOptions is an autogenerated conversion function.
+func Convert_api_PodPortForwardOptions_To_v1_PodPortForwardOptions(in *api.PodPortForwardOptions, out *PodPortForwardOptions, s conversion.Scope) error {
+ return autoConvert_api_PodPortForwardOptions_To_v1_PodPortForwardOptions(in, out, s)
+}
+
+func autoConvert_v1_PodProxyOptions_To_api_PodProxyOptions(in *PodProxyOptions, out *api.PodProxyOptions, s conversion.Scope) error {
+ out.Path = in.Path
+ return nil
+}
+
+// Convert_v1_PodProxyOptions_To_api_PodProxyOptions is an autogenerated conversion function.
+func Convert_v1_PodProxyOptions_To_api_PodProxyOptions(in *PodProxyOptions, out *api.PodProxyOptions, s conversion.Scope) error {
+ return autoConvert_v1_PodProxyOptions_To_api_PodProxyOptions(in, out, s)
+}
+
+func autoConvert_api_PodProxyOptions_To_v1_PodProxyOptions(in *api.PodProxyOptions, out *PodProxyOptions, s conversion.Scope) error {
+ out.Path = in.Path
+ return nil
+}
+
+// Convert_api_PodProxyOptions_To_v1_PodProxyOptions is an autogenerated conversion function.
+func Convert_api_PodProxyOptions_To_v1_PodProxyOptions(in *api.PodProxyOptions, out *PodProxyOptions, s conversion.Scope) error {
+ return autoConvert_api_PodProxyOptions_To_v1_PodProxyOptions(in, out, s)
+}
+
+func autoConvert_v1_PodSecurityContext_To_api_PodSecurityContext(in *PodSecurityContext, out *api.PodSecurityContext, s conversion.Scope) error {
+ out.SELinuxOptions = (*api.SELinuxOptions)(unsafe.Pointer(in.SELinuxOptions))
+ out.RunAsUser = (*int64)(unsafe.Pointer(in.RunAsUser))
+ out.RunAsNonRoot = (*bool)(unsafe.Pointer(in.RunAsNonRoot))
+ out.SupplementalGroups = *(*[]int64)(unsafe.Pointer(&in.SupplementalGroups))
+ out.FSGroup = (*int64)(unsafe.Pointer(in.FSGroup))
+ return nil
+}
+
+func autoConvert_api_PodSecurityContext_To_v1_PodSecurityContext(in *api.PodSecurityContext, out *PodSecurityContext, s conversion.Scope) error {
+ // INFO: in.HostNetwork opted out of conversion generation
+ // INFO: in.HostPID opted out of conversion generation
+ // INFO: in.HostIPC opted out of conversion generation
+ out.SELinuxOptions = (*SELinuxOptions)(unsafe.Pointer(in.SELinuxOptions))
+ out.RunAsUser = (*int64)(unsafe.Pointer(in.RunAsUser))
+ out.RunAsNonRoot = (*bool)(unsafe.Pointer(in.RunAsNonRoot))
+ out.SupplementalGroups = *(*[]int64)(unsafe.Pointer(&in.SupplementalGroups))
+ out.FSGroup = (*int64)(unsafe.Pointer(in.FSGroup))
+ return nil
+}
+
+func autoConvert_v1_PodSignature_To_api_PodSignature(in *PodSignature, out *api.PodSignature, s conversion.Scope) error {
+ out.PodController = (*meta_v1.OwnerReference)(unsafe.Pointer(in.PodController))
+ return nil
+}
+
+// Convert_v1_PodSignature_To_api_PodSignature is an autogenerated conversion function.
+func Convert_v1_PodSignature_To_api_PodSignature(in *PodSignature, out *api.PodSignature, s conversion.Scope) error {
+ return autoConvert_v1_PodSignature_To_api_PodSignature(in, out, s)
+}
+
+func autoConvert_api_PodSignature_To_v1_PodSignature(in *api.PodSignature, out *PodSignature, s conversion.Scope) error {
+ out.PodController = (*meta_v1.OwnerReference)(unsafe.Pointer(in.PodController))
+ return nil
+}
+
+// Convert_api_PodSignature_To_v1_PodSignature is an autogenerated conversion function.
+func Convert_api_PodSignature_To_v1_PodSignature(in *api.PodSignature, out *PodSignature, s conversion.Scope) error {
+ return autoConvert_api_PodSignature_To_v1_PodSignature(in, out, s)
+}
+
+func autoConvert_v1_PodSpec_To_api_PodSpec(in *PodSpec, out *api.PodSpec, s conversion.Scope) error {
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]api.Volume, len(*in))
+ for i := range *in {
+ if err := Convert_v1_Volume_To_api_Volume(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Volumes = nil
+ }
+ out.InitContainers = *(*[]api.Container)(unsafe.Pointer(&in.InitContainers))
+ out.Containers = *(*[]api.Container)(unsafe.Pointer(&in.Containers))
+ out.RestartPolicy = api.RestartPolicy(in.RestartPolicy)
+ out.TerminationGracePeriodSeconds = (*int64)(unsafe.Pointer(in.TerminationGracePeriodSeconds))
+ out.ActiveDeadlineSeconds = (*int64)(unsafe.Pointer(in.ActiveDeadlineSeconds))
+ out.DNSPolicy = api.DNSPolicy(in.DNSPolicy)
+ out.NodeSelector = *(*map[string]string)(unsafe.Pointer(&in.NodeSelector))
+ out.ServiceAccountName = in.ServiceAccountName
+ // INFO: in.DeprecatedServiceAccount opted out of conversion generation
+ out.AutomountServiceAccountToken = (*bool)(unsafe.Pointer(in.AutomountServiceAccountToken))
+ out.NodeName = in.NodeName
+ // INFO: in.HostNetwork opted out of conversion generation
+ // INFO: in.HostPID opted out of conversion generation
+ // INFO: in.HostIPC opted out of conversion generation
+ if in.SecurityContext != nil {
+ in, out := &in.SecurityContext, &out.SecurityContext
+ *out = new(api.PodSecurityContext)
+ if err := Convert_v1_PodSecurityContext_To_api_PodSecurityContext(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.SecurityContext = nil
+ }
+ out.ImagePullSecrets = *(*[]api.LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets))
+ out.Hostname = in.Hostname
+ out.Subdomain = in.Subdomain
+ out.Affinity = (*api.Affinity)(unsafe.Pointer(in.Affinity))
+ out.SchedulerName = in.SchedulerName
+ out.Tolerations = *(*[]api.Toleration)(unsafe.Pointer(&in.Tolerations))
+ out.HostAliases = *(*[]api.HostAlias)(unsafe.Pointer(&in.HostAliases))
+ return nil
+}
+
+func autoConvert_api_PodSpec_To_v1_PodSpec(in *api.PodSpec, out *PodSpec, s conversion.Scope) error {
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]Volume, len(*in))
+ for i := range *in {
+ if err := Convert_api_Volume_To_v1_Volume(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Volumes = nil
+ }
+ out.InitContainers = *(*[]Container)(unsafe.Pointer(&in.InitContainers))
+ if in.Containers == nil {
+ out.Containers = make([]Container, 0)
+ } else {
+ out.Containers = *(*[]Container)(unsafe.Pointer(&in.Containers))
+ }
+ out.RestartPolicy = RestartPolicy(in.RestartPolicy)
+ out.TerminationGracePeriodSeconds = (*int64)(unsafe.Pointer(in.TerminationGracePeriodSeconds))
+ out.ActiveDeadlineSeconds = (*int64)(unsafe.Pointer(in.ActiveDeadlineSeconds))
+ out.DNSPolicy = DNSPolicy(in.DNSPolicy)
+ out.NodeSelector = *(*map[string]string)(unsafe.Pointer(&in.NodeSelector))
+ out.ServiceAccountName = in.ServiceAccountName
+ out.AutomountServiceAccountToken = (*bool)(unsafe.Pointer(in.AutomountServiceAccountToken))
+ out.NodeName = in.NodeName
+ if in.SecurityContext != nil {
+ in, out := &in.SecurityContext, &out.SecurityContext
+ *out = new(PodSecurityContext)
+ if err := Convert_api_PodSecurityContext_To_v1_PodSecurityContext(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.SecurityContext = nil
+ }
+ out.ImagePullSecrets = *(*[]LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets))
+ out.Hostname = in.Hostname
+ out.Subdomain = in.Subdomain
+ out.Affinity = (*Affinity)(unsafe.Pointer(in.Affinity))
+ out.SchedulerName = in.SchedulerName
+ out.Tolerations = *(*[]Toleration)(unsafe.Pointer(&in.Tolerations))
+ out.HostAliases = *(*[]HostAlias)(unsafe.Pointer(&in.HostAliases))
+ return nil
+}
+
+func autoConvert_v1_PodStatus_To_api_PodStatus(in *PodStatus, out *api.PodStatus, s conversion.Scope) error {
+ out.Phase = api.PodPhase(in.Phase)
+ out.Conditions = *(*[]api.PodCondition)(unsafe.Pointer(&in.Conditions))
+ out.Message = in.Message
+ out.Reason = in.Reason
+ out.HostIP = in.HostIP
+ out.PodIP = in.PodIP
+ out.StartTime = (*meta_v1.Time)(unsafe.Pointer(in.StartTime))
+ out.InitContainerStatuses = *(*[]api.ContainerStatus)(unsafe.Pointer(&in.InitContainerStatuses))
+ out.ContainerStatuses = *(*[]api.ContainerStatus)(unsafe.Pointer(&in.ContainerStatuses))
+ out.QOSClass = api.PodQOSClass(in.QOSClass)
+ return nil
+}
+
+// Convert_v1_PodStatus_To_api_PodStatus is an autogenerated conversion function.
+func Convert_v1_PodStatus_To_api_PodStatus(in *PodStatus, out *api.PodStatus, s conversion.Scope) error {
+ return autoConvert_v1_PodStatus_To_api_PodStatus(in, out, s)
+}
+
+func autoConvert_api_PodStatus_To_v1_PodStatus(in *api.PodStatus, out *PodStatus, s conversion.Scope) error {
+ out.Phase = PodPhase(in.Phase)
+ out.Conditions = *(*[]PodCondition)(unsafe.Pointer(&in.Conditions))
+ out.Message = in.Message
+ out.Reason = in.Reason
+ out.HostIP = in.HostIP
+ out.PodIP = in.PodIP
+ out.StartTime = (*meta_v1.Time)(unsafe.Pointer(in.StartTime))
+ out.QOSClass = PodQOSClass(in.QOSClass)
+ out.InitContainerStatuses = *(*[]ContainerStatus)(unsafe.Pointer(&in.InitContainerStatuses))
+ out.ContainerStatuses = *(*[]ContainerStatus)(unsafe.Pointer(&in.ContainerStatuses))
+ return nil
+}
+
+// Convert_api_PodStatus_To_v1_PodStatus is an autogenerated conversion function.
+func Convert_api_PodStatus_To_v1_PodStatus(in *api.PodStatus, out *PodStatus, s conversion.Scope) error {
+ return autoConvert_api_PodStatus_To_v1_PodStatus(in, out, s)
+}
+
+func autoConvert_v1_PodStatusResult_To_api_PodStatusResult(in *PodStatusResult, out *api.PodStatusResult, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_PodStatus_To_api_PodStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func autoConvert_api_PodStatusResult_To_v1_PodStatusResult(in *api.PodStatusResult, out *PodStatusResult, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_api_PodStatus_To_v1_PodStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func autoConvert_v1_PodTemplate_To_api_PodTemplate(in *PodTemplate, out *api.PodTemplate, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_PodTemplate_To_api_PodTemplate is an autogenerated conversion function.
+func Convert_v1_PodTemplate_To_api_PodTemplate(in *PodTemplate, out *api.PodTemplate, s conversion.Scope) error {
+ return autoConvert_v1_PodTemplate_To_api_PodTemplate(in, out, s)
+}
+
+func autoConvert_api_PodTemplate_To_v1_PodTemplate(in *api.PodTemplate, out *PodTemplate, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_PodTemplate_To_v1_PodTemplate is an autogenerated conversion function.
+func Convert_api_PodTemplate_To_v1_PodTemplate(in *api.PodTemplate, out *PodTemplate, s conversion.Scope) error {
+ return autoConvert_api_PodTemplate_To_v1_PodTemplate(in, out, s)
+}
+
+func autoConvert_v1_PodTemplateList_To_api_PodTemplateList(in *PodTemplateList, out *api.PodTemplateList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]api.PodTemplate, len(*in))
+ for i := range *in {
+ if err := Convert_v1_PodTemplate_To_api_PodTemplate(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1_PodTemplateList_To_api_PodTemplateList is an autogenerated conversion function.
+func Convert_v1_PodTemplateList_To_api_PodTemplateList(in *PodTemplateList, out *api.PodTemplateList, s conversion.Scope) error {
+ return autoConvert_v1_PodTemplateList_To_api_PodTemplateList(in, out, s)
+}
+
+func autoConvert_api_PodTemplateList_To_v1_PodTemplateList(in *api.PodTemplateList, out *PodTemplateList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodTemplate, len(*in))
+ for i := range *in {
+ if err := Convert_api_PodTemplate_To_v1_PodTemplate(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]PodTemplate, 0)
+ }
+ return nil
+}
+
+// Convert_api_PodTemplateList_To_v1_PodTemplateList is an autogenerated conversion function.
+func Convert_api_PodTemplateList_To_v1_PodTemplateList(in *api.PodTemplateList, out *PodTemplateList, s conversion.Scope) error {
+ return autoConvert_api_PodTemplateList_To_v1_PodTemplateList(in, out, s)
+}
+
+func autoConvert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in *PodTemplateSpec, out *api.PodTemplateSpec, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_PodSpec_To_api_PodSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func autoConvert_api_PodTemplateSpec_To_v1_PodTemplateSpec(in *api.PodTemplateSpec, out *PodTemplateSpec, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_api_PodSpec_To_v1_PodSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func autoConvert_v1_PortworxVolumeSource_To_api_PortworxVolumeSource(in *PortworxVolumeSource, out *api.PortworxVolumeSource, s conversion.Scope) error {
+ out.VolumeID = in.VolumeID
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_v1_PortworxVolumeSource_To_api_PortworxVolumeSource is an autogenerated conversion function.
+func Convert_v1_PortworxVolumeSource_To_api_PortworxVolumeSource(in *PortworxVolumeSource, out *api.PortworxVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_PortworxVolumeSource_To_api_PortworxVolumeSource(in, out, s)
+}
+
+func autoConvert_api_PortworxVolumeSource_To_v1_PortworxVolumeSource(in *api.PortworxVolumeSource, out *PortworxVolumeSource, s conversion.Scope) error {
+ out.VolumeID = in.VolumeID
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_api_PortworxVolumeSource_To_v1_PortworxVolumeSource is an autogenerated conversion function.
+func Convert_api_PortworxVolumeSource_To_v1_PortworxVolumeSource(in *api.PortworxVolumeSource, out *PortworxVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_PortworxVolumeSource_To_v1_PortworxVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_Preconditions_To_api_Preconditions(in *Preconditions, out *api.Preconditions, s conversion.Scope) error {
+ out.UID = (*types.UID)(unsafe.Pointer(in.UID))
+ return nil
+}
+
+// Convert_v1_Preconditions_To_api_Preconditions is an autogenerated conversion function.
+func Convert_v1_Preconditions_To_api_Preconditions(in *Preconditions, out *api.Preconditions, s conversion.Scope) error {
+ return autoConvert_v1_Preconditions_To_api_Preconditions(in, out, s)
+}
+
+func autoConvert_api_Preconditions_To_v1_Preconditions(in *api.Preconditions, out *Preconditions, s conversion.Scope) error {
+ out.UID = (*types.UID)(unsafe.Pointer(in.UID))
+ return nil
+}
+
+// Convert_api_Preconditions_To_v1_Preconditions is an autogenerated conversion function.
+func Convert_api_Preconditions_To_v1_Preconditions(in *api.Preconditions, out *Preconditions, s conversion.Scope) error {
+ return autoConvert_api_Preconditions_To_v1_Preconditions(in, out, s)
+}
+
+func autoConvert_v1_PreferAvoidPodsEntry_To_api_PreferAvoidPodsEntry(in *PreferAvoidPodsEntry, out *api.PreferAvoidPodsEntry, s conversion.Scope) error {
+ if err := Convert_v1_PodSignature_To_api_PodSignature(&in.PodSignature, &out.PodSignature, s); err != nil {
+ return err
+ }
+ out.EvictionTime = in.EvictionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_v1_PreferAvoidPodsEntry_To_api_PreferAvoidPodsEntry is an autogenerated conversion function.
+func Convert_v1_PreferAvoidPodsEntry_To_api_PreferAvoidPodsEntry(in *PreferAvoidPodsEntry, out *api.PreferAvoidPodsEntry, s conversion.Scope) error {
+ return autoConvert_v1_PreferAvoidPodsEntry_To_api_PreferAvoidPodsEntry(in, out, s)
+}
+
+func autoConvert_api_PreferAvoidPodsEntry_To_v1_PreferAvoidPodsEntry(in *api.PreferAvoidPodsEntry, out *PreferAvoidPodsEntry, s conversion.Scope) error {
+ if err := Convert_api_PodSignature_To_v1_PodSignature(&in.PodSignature, &out.PodSignature, s); err != nil {
+ return err
+ }
+ out.EvictionTime = in.EvictionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_api_PreferAvoidPodsEntry_To_v1_PreferAvoidPodsEntry is an autogenerated conversion function.
+func Convert_api_PreferAvoidPodsEntry_To_v1_PreferAvoidPodsEntry(in *api.PreferAvoidPodsEntry, out *PreferAvoidPodsEntry, s conversion.Scope) error {
+ return autoConvert_api_PreferAvoidPodsEntry_To_v1_PreferAvoidPodsEntry(in, out, s)
+}
+
+func autoConvert_v1_PreferredSchedulingTerm_To_api_PreferredSchedulingTerm(in *PreferredSchedulingTerm, out *api.PreferredSchedulingTerm, s conversion.Scope) error {
+ out.Weight = in.Weight
+ if err := Convert_v1_NodeSelectorTerm_To_api_NodeSelectorTerm(&in.Preference, &out.Preference, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_PreferredSchedulingTerm_To_api_PreferredSchedulingTerm is an autogenerated conversion function.
+func Convert_v1_PreferredSchedulingTerm_To_api_PreferredSchedulingTerm(in *PreferredSchedulingTerm, out *api.PreferredSchedulingTerm, s conversion.Scope) error {
+ return autoConvert_v1_PreferredSchedulingTerm_To_api_PreferredSchedulingTerm(in, out, s)
+}
+
+func autoConvert_api_PreferredSchedulingTerm_To_v1_PreferredSchedulingTerm(in *api.PreferredSchedulingTerm, out *PreferredSchedulingTerm, s conversion.Scope) error {
+ out.Weight = in.Weight
+ if err := Convert_api_NodeSelectorTerm_To_v1_NodeSelectorTerm(&in.Preference, &out.Preference, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_PreferredSchedulingTerm_To_v1_PreferredSchedulingTerm is an autogenerated conversion function.
+func Convert_api_PreferredSchedulingTerm_To_v1_PreferredSchedulingTerm(in *api.PreferredSchedulingTerm, out *PreferredSchedulingTerm, s conversion.Scope) error {
+ return autoConvert_api_PreferredSchedulingTerm_To_v1_PreferredSchedulingTerm(in, out, s)
+}
+
+func autoConvert_v1_Probe_To_api_Probe(in *Probe, out *api.Probe, s conversion.Scope) error {
+ if err := Convert_v1_Handler_To_api_Handler(&in.Handler, &out.Handler, s); err != nil {
+ return err
+ }
+ out.InitialDelaySeconds = in.InitialDelaySeconds
+ out.TimeoutSeconds = in.TimeoutSeconds
+ out.PeriodSeconds = in.PeriodSeconds
+ out.SuccessThreshold = in.SuccessThreshold
+ out.FailureThreshold = in.FailureThreshold
+ return nil
+}
+
+// Convert_v1_Probe_To_api_Probe is an autogenerated conversion function.
+func Convert_v1_Probe_To_api_Probe(in *Probe, out *api.Probe, s conversion.Scope) error {
+ return autoConvert_v1_Probe_To_api_Probe(in, out, s)
+}
+
+func autoConvert_api_Probe_To_v1_Probe(in *api.Probe, out *Probe, s conversion.Scope) error {
+ if err := Convert_api_Handler_To_v1_Handler(&in.Handler, &out.Handler, s); err != nil {
+ return err
+ }
+ out.InitialDelaySeconds = in.InitialDelaySeconds
+ out.TimeoutSeconds = in.TimeoutSeconds
+ out.PeriodSeconds = in.PeriodSeconds
+ out.SuccessThreshold = in.SuccessThreshold
+ out.FailureThreshold = in.FailureThreshold
+ return nil
+}
+
+// Convert_api_Probe_To_v1_Probe is an autogenerated conversion function.
+func Convert_api_Probe_To_v1_Probe(in *api.Probe, out *Probe, s conversion.Scope) error {
+ return autoConvert_api_Probe_To_v1_Probe(in, out, s)
+}
+
+func autoConvert_v1_ProjectedVolumeSource_To_api_ProjectedVolumeSource(in *ProjectedVolumeSource, out *api.ProjectedVolumeSource, s conversion.Scope) error {
+ out.Sources = *(*[]api.VolumeProjection)(unsafe.Pointer(&in.Sources))
+ out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode))
+ return nil
+}
+
+// Convert_v1_ProjectedVolumeSource_To_api_ProjectedVolumeSource is an autogenerated conversion function.
+func Convert_v1_ProjectedVolumeSource_To_api_ProjectedVolumeSource(in *ProjectedVolumeSource, out *api.ProjectedVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_ProjectedVolumeSource_To_api_ProjectedVolumeSource(in, out, s)
+}
+
+func autoConvert_api_ProjectedVolumeSource_To_v1_ProjectedVolumeSource(in *api.ProjectedVolumeSource, out *ProjectedVolumeSource, s conversion.Scope) error {
+ if in.Sources == nil {
+ out.Sources = make([]VolumeProjection, 0)
+ } else {
+ out.Sources = *(*[]VolumeProjection)(unsafe.Pointer(&in.Sources))
+ }
+ out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode))
+ return nil
+}
+
+// Convert_api_ProjectedVolumeSource_To_v1_ProjectedVolumeSource is an autogenerated conversion function.
+func Convert_api_ProjectedVolumeSource_To_v1_ProjectedVolumeSource(in *api.ProjectedVolumeSource, out *ProjectedVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_ProjectedVolumeSource_To_v1_ProjectedVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_QuobyteVolumeSource_To_api_QuobyteVolumeSource(in *QuobyteVolumeSource, out *api.QuobyteVolumeSource, s conversion.Scope) error {
+ out.Registry = in.Registry
+ out.Volume = in.Volume
+ out.ReadOnly = in.ReadOnly
+ out.User = in.User
+ out.Group = in.Group
+ return nil
+}
+
+// Convert_v1_QuobyteVolumeSource_To_api_QuobyteVolumeSource is an autogenerated conversion function.
+func Convert_v1_QuobyteVolumeSource_To_api_QuobyteVolumeSource(in *QuobyteVolumeSource, out *api.QuobyteVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_QuobyteVolumeSource_To_api_QuobyteVolumeSource(in, out, s)
+}
+
+func autoConvert_api_QuobyteVolumeSource_To_v1_QuobyteVolumeSource(in *api.QuobyteVolumeSource, out *QuobyteVolumeSource, s conversion.Scope) error {
+ out.Registry = in.Registry
+ out.Volume = in.Volume
+ out.ReadOnly = in.ReadOnly
+ out.User = in.User
+ out.Group = in.Group
+ return nil
+}
+
+// Convert_api_QuobyteVolumeSource_To_v1_QuobyteVolumeSource is an autogenerated conversion function.
+func Convert_api_QuobyteVolumeSource_To_v1_QuobyteVolumeSource(in *api.QuobyteVolumeSource, out *QuobyteVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_QuobyteVolumeSource_To_v1_QuobyteVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_RBDVolumeSource_To_api_RBDVolumeSource(in *RBDVolumeSource, out *api.RBDVolumeSource, s conversion.Scope) error {
+ out.CephMonitors = *(*[]string)(unsafe.Pointer(&in.CephMonitors))
+ out.RBDImage = in.RBDImage
+ out.FSType = in.FSType
+ out.RBDPool = in.RBDPool
+ out.RadosUser = in.RadosUser
+ out.Keyring = in.Keyring
+ out.SecretRef = (*api.LocalObjectReference)(unsafe.Pointer(in.SecretRef))
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_v1_RBDVolumeSource_To_api_RBDVolumeSource is an autogenerated conversion function.
+func Convert_v1_RBDVolumeSource_To_api_RBDVolumeSource(in *RBDVolumeSource, out *api.RBDVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_RBDVolumeSource_To_api_RBDVolumeSource(in, out, s)
+}
+
+func autoConvert_api_RBDVolumeSource_To_v1_RBDVolumeSource(in *api.RBDVolumeSource, out *RBDVolumeSource, s conversion.Scope) error {
+ if in.CephMonitors == nil {
+ out.CephMonitors = make([]string, 0)
+ } else {
+ out.CephMonitors = *(*[]string)(unsafe.Pointer(&in.CephMonitors))
+ }
+ out.RBDImage = in.RBDImage
+ out.FSType = in.FSType
+ out.RBDPool = in.RBDPool
+ out.RadosUser = in.RadosUser
+ out.Keyring = in.Keyring
+ out.SecretRef = (*LocalObjectReference)(unsafe.Pointer(in.SecretRef))
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_api_RBDVolumeSource_To_v1_RBDVolumeSource is an autogenerated conversion function.
+func Convert_api_RBDVolumeSource_To_v1_RBDVolumeSource(in *api.RBDVolumeSource, out *RBDVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_RBDVolumeSource_To_v1_RBDVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_RangeAllocation_To_api_RangeAllocation(in *RangeAllocation, out *api.RangeAllocation, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Range = in.Range
+ out.Data = *(*[]byte)(unsafe.Pointer(&in.Data))
+ return nil
+}
+
+// Convert_v1_RangeAllocation_To_api_RangeAllocation is an autogenerated conversion function.
+func Convert_v1_RangeAllocation_To_api_RangeAllocation(in *RangeAllocation, out *api.RangeAllocation, s conversion.Scope) error {
+ return autoConvert_v1_RangeAllocation_To_api_RangeAllocation(in, out, s)
+}
+
+func autoConvert_api_RangeAllocation_To_v1_RangeAllocation(in *api.RangeAllocation, out *RangeAllocation, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Range = in.Range
+ if in.Data == nil {
+ out.Data = make([]byte, 0)
+ } else {
+ out.Data = *(*[]byte)(unsafe.Pointer(&in.Data))
+ }
+ return nil
+}
+
+// Convert_api_RangeAllocation_To_v1_RangeAllocation is an autogenerated conversion function.
+func Convert_api_RangeAllocation_To_v1_RangeAllocation(in *api.RangeAllocation, out *RangeAllocation, s conversion.Scope) error {
+ return autoConvert_api_RangeAllocation_To_v1_RangeAllocation(in, out, s)
+}
+
+func autoConvert_v1_ReplicationController_To_api_ReplicationController(in *ReplicationController, out *api.ReplicationController, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_ReplicationControllerSpec_To_api_ReplicationControllerSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ReplicationControllerStatus_To_api_ReplicationControllerStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_ReplicationController_To_api_ReplicationController is an autogenerated conversion function.
+func Convert_v1_ReplicationController_To_api_ReplicationController(in *ReplicationController, out *api.ReplicationController, s conversion.Scope) error {
+ return autoConvert_v1_ReplicationController_To_api_ReplicationController(in, out, s)
+}
+
+func autoConvert_api_ReplicationController_To_v1_ReplicationController(in *api.ReplicationController, out *ReplicationController, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_api_ReplicationControllerSpec_To_v1_ReplicationControllerSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ReplicationControllerStatus_To_v1_ReplicationControllerStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_ReplicationController_To_v1_ReplicationController is an autogenerated conversion function.
+func Convert_api_ReplicationController_To_v1_ReplicationController(in *api.ReplicationController, out *ReplicationController, s conversion.Scope) error {
+ return autoConvert_api_ReplicationController_To_v1_ReplicationController(in, out, s)
+}
+
+func autoConvert_v1_ReplicationControllerCondition_To_api_ReplicationControllerCondition(in *ReplicationControllerCondition, out *api.ReplicationControllerCondition, s conversion.Scope) error {
+ out.Type = api.ReplicationControllerConditionType(in.Type)
+ out.Status = api.ConditionStatus(in.Status)
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_v1_ReplicationControllerCondition_To_api_ReplicationControllerCondition is an autogenerated conversion function.
+func Convert_v1_ReplicationControllerCondition_To_api_ReplicationControllerCondition(in *ReplicationControllerCondition, out *api.ReplicationControllerCondition, s conversion.Scope) error {
+ return autoConvert_v1_ReplicationControllerCondition_To_api_ReplicationControllerCondition(in, out, s)
+}
+
+func autoConvert_api_ReplicationControllerCondition_To_v1_ReplicationControllerCondition(in *api.ReplicationControllerCondition, out *ReplicationControllerCondition, s conversion.Scope) error {
+ out.Type = ReplicationControllerConditionType(in.Type)
+ out.Status = ConditionStatus(in.Status)
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_api_ReplicationControllerCondition_To_v1_ReplicationControllerCondition is an autogenerated conversion function.
+func Convert_api_ReplicationControllerCondition_To_v1_ReplicationControllerCondition(in *api.ReplicationControllerCondition, out *ReplicationControllerCondition, s conversion.Scope) error {
+ return autoConvert_api_ReplicationControllerCondition_To_v1_ReplicationControllerCondition(in, out, s)
+}
+
+func autoConvert_v1_ReplicationControllerList_To_api_ReplicationControllerList(in *ReplicationControllerList, out *api.ReplicationControllerList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]api.ReplicationController, len(*in))
+ for i := range *in {
+ if err := Convert_v1_ReplicationController_To_api_ReplicationController(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1_ReplicationControllerList_To_api_ReplicationControllerList is an autogenerated conversion function.
+func Convert_v1_ReplicationControllerList_To_api_ReplicationControllerList(in *ReplicationControllerList, out *api.ReplicationControllerList, s conversion.Scope) error {
+ return autoConvert_v1_ReplicationControllerList_To_api_ReplicationControllerList(in, out, s)
+}
+
+func autoConvert_api_ReplicationControllerList_To_v1_ReplicationControllerList(in *api.ReplicationControllerList, out *ReplicationControllerList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ReplicationController, len(*in))
+ for i := range *in {
+ if err := Convert_api_ReplicationController_To_v1_ReplicationController(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]ReplicationController, 0)
+ }
+ return nil
+}
+
+// Convert_api_ReplicationControllerList_To_v1_ReplicationControllerList is an autogenerated conversion function.
+func Convert_api_ReplicationControllerList_To_v1_ReplicationControllerList(in *api.ReplicationControllerList, out *ReplicationControllerList, s conversion.Scope) error {
+ return autoConvert_api_ReplicationControllerList_To_v1_ReplicationControllerList(in, out, s)
+}
+
+func autoConvert_v1_ReplicationControllerSpec_To_api_ReplicationControllerSpec(in *ReplicationControllerSpec, out *api.ReplicationControllerSpec, s conversion.Scope) error {
+ if err := meta_v1.Convert_Pointer_int32_To_int32(&in.Replicas, &out.Replicas, s); err != nil {
+ return err
+ }
+ out.MinReadySeconds = in.MinReadySeconds
+ out.Selector = *(*map[string]string)(unsafe.Pointer(&in.Selector))
+ if in.Template != nil {
+ in, out := &in.Template, &out.Template
+ *out = new(api.PodTemplateSpec)
+ if err := Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Template = nil
+ }
+ return nil
+}
+
+func autoConvert_api_ReplicationControllerSpec_To_v1_ReplicationControllerSpec(in *api.ReplicationControllerSpec, out *ReplicationControllerSpec, s conversion.Scope) error {
+ if err := meta_v1.Convert_int32_To_Pointer_int32(&in.Replicas, &out.Replicas, s); err != nil {
+ return err
+ }
+ out.MinReadySeconds = in.MinReadySeconds
+ out.Selector = *(*map[string]string)(unsafe.Pointer(&in.Selector))
+ if in.Template != nil {
+ in, out := &in.Template, &out.Template
+ *out = new(PodTemplateSpec)
+ if err := Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.Template = nil
+ }
+ return nil
+}
+
+func autoConvert_v1_ReplicationControllerStatus_To_api_ReplicationControllerStatus(in *ReplicationControllerStatus, out *api.ReplicationControllerStatus, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ out.FullyLabeledReplicas = in.FullyLabeledReplicas
+ out.ReadyReplicas = in.ReadyReplicas
+ out.AvailableReplicas = in.AvailableReplicas
+ out.ObservedGeneration = in.ObservedGeneration
+ out.Conditions = *(*[]api.ReplicationControllerCondition)(unsafe.Pointer(&in.Conditions))
+ return nil
+}
+
+// Convert_v1_ReplicationControllerStatus_To_api_ReplicationControllerStatus is an autogenerated conversion function.
+func Convert_v1_ReplicationControllerStatus_To_api_ReplicationControllerStatus(in *ReplicationControllerStatus, out *api.ReplicationControllerStatus, s conversion.Scope) error {
+ return autoConvert_v1_ReplicationControllerStatus_To_api_ReplicationControllerStatus(in, out, s)
+}
+
+func autoConvert_api_ReplicationControllerStatus_To_v1_ReplicationControllerStatus(in *api.ReplicationControllerStatus, out *ReplicationControllerStatus, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ out.FullyLabeledReplicas = in.FullyLabeledReplicas
+ out.ReadyReplicas = in.ReadyReplicas
+ out.AvailableReplicas = in.AvailableReplicas
+ out.ObservedGeneration = in.ObservedGeneration
+ out.Conditions = *(*[]ReplicationControllerCondition)(unsafe.Pointer(&in.Conditions))
+ return nil
+}
+
+// Convert_api_ReplicationControllerStatus_To_v1_ReplicationControllerStatus is an autogenerated conversion function.
+func Convert_api_ReplicationControllerStatus_To_v1_ReplicationControllerStatus(in *api.ReplicationControllerStatus, out *ReplicationControllerStatus, s conversion.Scope) error {
+ return autoConvert_api_ReplicationControllerStatus_To_v1_ReplicationControllerStatus(in, out, s)
+}
+
+func autoConvert_v1_ResourceFieldSelector_To_api_ResourceFieldSelector(in *ResourceFieldSelector, out *api.ResourceFieldSelector, s conversion.Scope) error {
+ out.ContainerName = in.ContainerName
+ out.Resource = in.Resource
+ out.Divisor = in.Divisor
+ return nil
+}
+
+// Convert_v1_ResourceFieldSelector_To_api_ResourceFieldSelector is an autogenerated conversion function.
+func Convert_v1_ResourceFieldSelector_To_api_ResourceFieldSelector(in *ResourceFieldSelector, out *api.ResourceFieldSelector, s conversion.Scope) error {
+ return autoConvert_v1_ResourceFieldSelector_To_api_ResourceFieldSelector(in, out, s)
+}
+
+func autoConvert_api_ResourceFieldSelector_To_v1_ResourceFieldSelector(in *api.ResourceFieldSelector, out *ResourceFieldSelector, s conversion.Scope) error {
+ out.ContainerName = in.ContainerName
+ out.Resource = in.Resource
+ out.Divisor = in.Divisor
+ return nil
+}
+
+// Convert_api_ResourceFieldSelector_To_v1_ResourceFieldSelector is an autogenerated conversion function.
+func Convert_api_ResourceFieldSelector_To_v1_ResourceFieldSelector(in *api.ResourceFieldSelector, out *ResourceFieldSelector, s conversion.Scope) error {
+ return autoConvert_api_ResourceFieldSelector_To_v1_ResourceFieldSelector(in, out, s)
+}
+
+func autoConvert_v1_ResourceQuota_To_api_ResourceQuota(in *ResourceQuota, out *api.ResourceQuota, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_ResourceQuotaSpec_To_api_ResourceQuotaSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ResourceQuotaStatus_To_api_ResourceQuotaStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_ResourceQuota_To_api_ResourceQuota is an autogenerated conversion function.
+func Convert_v1_ResourceQuota_To_api_ResourceQuota(in *ResourceQuota, out *api.ResourceQuota, s conversion.Scope) error {
+ return autoConvert_v1_ResourceQuota_To_api_ResourceQuota(in, out, s)
+}
+
+func autoConvert_api_ResourceQuota_To_v1_ResourceQuota(in *api.ResourceQuota, out *ResourceQuota, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_api_ResourceQuotaSpec_To_v1_ResourceQuotaSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ResourceQuotaStatus_To_v1_ResourceQuotaStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_ResourceQuota_To_v1_ResourceQuota is an autogenerated conversion function.
+func Convert_api_ResourceQuota_To_v1_ResourceQuota(in *api.ResourceQuota, out *ResourceQuota, s conversion.Scope) error {
+ return autoConvert_api_ResourceQuota_To_v1_ResourceQuota(in, out, s)
+}
+
+func autoConvert_v1_ResourceQuotaList_To_api_ResourceQuotaList(in *ResourceQuotaList, out *api.ResourceQuotaList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]api.ResourceQuota)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1_ResourceQuotaList_To_api_ResourceQuotaList is an autogenerated conversion function.
+func Convert_v1_ResourceQuotaList_To_api_ResourceQuotaList(in *ResourceQuotaList, out *api.ResourceQuotaList, s conversion.Scope) error {
+ return autoConvert_v1_ResourceQuotaList_To_api_ResourceQuotaList(in, out, s)
+}
+
+func autoConvert_api_ResourceQuotaList_To_v1_ResourceQuotaList(in *api.ResourceQuotaList, out *ResourceQuotaList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]ResourceQuota, 0)
+ } else {
+ out.Items = *(*[]ResourceQuota)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_api_ResourceQuotaList_To_v1_ResourceQuotaList is an autogenerated conversion function.
+func Convert_api_ResourceQuotaList_To_v1_ResourceQuotaList(in *api.ResourceQuotaList, out *ResourceQuotaList, s conversion.Scope) error {
+ return autoConvert_api_ResourceQuotaList_To_v1_ResourceQuotaList(in, out, s)
+}
+
+func autoConvert_v1_ResourceQuotaSpec_To_api_ResourceQuotaSpec(in *ResourceQuotaSpec, out *api.ResourceQuotaSpec, s conversion.Scope) error {
+ out.Hard = *(*api.ResourceList)(unsafe.Pointer(&in.Hard))
+ out.Scopes = *(*[]api.ResourceQuotaScope)(unsafe.Pointer(&in.Scopes))
+ return nil
+}
+
+// Convert_v1_ResourceQuotaSpec_To_api_ResourceQuotaSpec is an autogenerated conversion function.
+func Convert_v1_ResourceQuotaSpec_To_api_ResourceQuotaSpec(in *ResourceQuotaSpec, out *api.ResourceQuotaSpec, s conversion.Scope) error {
+ return autoConvert_v1_ResourceQuotaSpec_To_api_ResourceQuotaSpec(in, out, s)
+}
+
+func autoConvert_api_ResourceQuotaSpec_To_v1_ResourceQuotaSpec(in *api.ResourceQuotaSpec, out *ResourceQuotaSpec, s conversion.Scope) error {
+ out.Hard = *(*ResourceList)(unsafe.Pointer(&in.Hard))
+ out.Scopes = *(*[]ResourceQuotaScope)(unsafe.Pointer(&in.Scopes))
+ return nil
+}
+
+// Convert_api_ResourceQuotaSpec_To_v1_ResourceQuotaSpec is an autogenerated conversion function.
+func Convert_api_ResourceQuotaSpec_To_v1_ResourceQuotaSpec(in *api.ResourceQuotaSpec, out *ResourceQuotaSpec, s conversion.Scope) error {
+ return autoConvert_api_ResourceQuotaSpec_To_v1_ResourceQuotaSpec(in, out, s)
+}
+
+func autoConvert_v1_ResourceQuotaStatus_To_api_ResourceQuotaStatus(in *ResourceQuotaStatus, out *api.ResourceQuotaStatus, s conversion.Scope) error {
+ out.Hard = *(*api.ResourceList)(unsafe.Pointer(&in.Hard))
+ out.Used = *(*api.ResourceList)(unsafe.Pointer(&in.Used))
+ return nil
+}
+
+// Convert_v1_ResourceQuotaStatus_To_api_ResourceQuotaStatus is an autogenerated conversion function.
+func Convert_v1_ResourceQuotaStatus_To_api_ResourceQuotaStatus(in *ResourceQuotaStatus, out *api.ResourceQuotaStatus, s conversion.Scope) error {
+ return autoConvert_v1_ResourceQuotaStatus_To_api_ResourceQuotaStatus(in, out, s)
+}
+
+func autoConvert_api_ResourceQuotaStatus_To_v1_ResourceQuotaStatus(in *api.ResourceQuotaStatus, out *ResourceQuotaStatus, s conversion.Scope) error {
+ out.Hard = *(*ResourceList)(unsafe.Pointer(&in.Hard))
+ out.Used = *(*ResourceList)(unsafe.Pointer(&in.Used))
+ return nil
+}
+
+// Convert_api_ResourceQuotaStatus_To_v1_ResourceQuotaStatus is an autogenerated conversion function.
+func Convert_api_ResourceQuotaStatus_To_v1_ResourceQuotaStatus(in *api.ResourceQuotaStatus, out *ResourceQuotaStatus, s conversion.Scope) error {
+ return autoConvert_api_ResourceQuotaStatus_To_v1_ResourceQuotaStatus(in, out, s)
+}
+
+func autoConvert_v1_ResourceRequirements_To_api_ResourceRequirements(in *ResourceRequirements, out *api.ResourceRequirements, s conversion.Scope) error {
+ out.Limits = *(*api.ResourceList)(unsafe.Pointer(&in.Limits))
+ out.Requests = *(*api.ResourceList)(unsafe.Pointer(&in.Requests))
+ return nil
+}
+
+// Convert_v1_ResourceRequirements_To_api_ResourceRequirements is an autogenerated conversion function.
+func Convert_v1_ResourceRequirements_To_api_ResourceRequirements(in *ResourceRequirements, out *api.ResourceRequirements, s conversion.Scope) error {
+ return autoConvert_v1_ResourceRequirements_To_api_ResourceRequirements(in, out, s)
+}
+
+func autoConvert_api_ResourceRequirements_To_v1_ResourceRequirements(in *api.ResourceRequirements, out *ResourceRequirements, s conversion.Scope) error {
+ out.Limits = *(*ResourceList)(unsafe.Pointer(&in.Limits))
+ out.Requests = *(*ResourceList)(unsafe.Pointer(&in.Requests))
+ return nil
+}
+
+// Convert_api_ResourceRequirements_To_v1_ResourceRequirements is an autogenerated conversion function.
+func Convert_api_ResourceRequirements_To_v1_ResourceRequirements(in *api.ResourceRequirements, out *ResourceRequirements, s conversion.Scope) error {
+ return autoConvert_api_ResourceRequirements_To_v1_ResourceRequirements(in, out, s)
+}
+
+func autoConvert_v1_SELinuxOptions_To_api_SELinuxOptions(in *SELinuxOptions, out *api.SELinuxOptions, s conversion.Scope) error {
+ out.User = in.User
+ out.Role = in.Role
+ out.Type = in.Type
+ out.Level = in.Level
+ return nil
+}
+
+// Convert_v1_SELinuxOptions_To_api_SELinuxOptions is an autogenerated conversion function.
+func Convert_v1_SELinuxOptions_To_api_SELinuxOptions(in *SELinuxOptions, out *api.SELinuxOptions, s conversion.Scope) error {
+ return autoConvert_v1_SELinuxOptions_To_api_SELinuxOptions(in, out, s)
+}
+
+func autoConvert_api_SELinuxOptions_To_v1_SELinuxOptions(in *api.SELinuxOptions, out *SELinuxOptions, s conversion.Scope) error {
+ out.User = in.User
+ out.Role = in.Role
+ out.Type = in.Type
+ out.Level = in.Level
+ return nil
+}
+
+// Convert_api_SELinuxOptions_To_v1_SELinuxOptions is an autogenerated conversion function.
+func Convert_api_SELinuxOptions_To_v1_SELinuxOptions(in *api.SELinuxOptions, out *SELinuxOptions, s conversion.Scope) error {
+ return autoConvert_api_SELinuxOptions_To_v1_SELinuxOptions(in, out, s)
+}
+
+func autoConvert_v1_ScaleIOVolumeSource_To_api_ScaleIOVolumeSource(in *ScaleIOVolumeSource, out *api.ScaleIOVolumeSource, s conversion.Scope) error {
+ out.Gateway = in.Gateway
+ out.System = in.System
+ out.SecretRef = (*api.LocalObjectReference)(unsafe.Pointer(in.SecretRef))
+ out.SSLEnabled = in.SSLEnabled
+ out.ProtectionDomain = in.ProtectionDomain
+ out.StoragePool = in.StoragePool
+ out.StorageMode = in.StorageMode
+ out.VolumeName = in.VolumeName
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_v1_ScaleIOVolumeSource_To_api_ScaleIOVolumeSource is an autogenerated conversion function.
+func Convert_v1_ScaleIOVolumeSource_To_api_ScaleIOVolumeSource(in *ScaleIOVolumeSource, out *api.ScaleIOVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_ScaleIOVolumeSource_To_api_ScaleIOVolumeSource(in, out, s)
+}
+
+func autoConvert_api_ScaleIOVolumeSource_To_v1_ScaleIOVolumeSource(in *api.ScaleIOVolumeSource, out *ScaleIOVolumeSource, s conversion.Scope) error {
+ out.Gateway = in.Gateway
+ out.System = in.System
+ out.SecretRef = (*LocalObjectReference)(unsafe.Pointer(in.SecretRef))
+ out.SSLEnabled = in.SSLEnabled
+ out.ProtectionDomain = in.ProtectionDomain
+ out.StoragePool = in.StoragePool
+ out.StorageMode = in.StorageMode
+ out.VolumeName = in.VolumeName
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ return nil
+}
+
+// Convert_api_ScaleIOVolumeSource_To_v1_ScaleIOVolumeSource is an autogenerated conversion function.
+func Convert_api_ScaleIOVolumeSource_To_v1_ScaleIOVolumeSource(in *api.ScaleIOVolumeSource, out *ScaleIOVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_ScaleIOVolumeSource_To_v1_ScaleIOVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_Secret_To_api_Secret(in *Secret, out *api.Secret, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Data = *(*map[string][]byte)(unsafe.Pointer(&in.Data))
+ // INFO: in.StringData opted out of conversion generation
+ out.Type = api.SecretType(in.Type)
+ return nil
+}
+
+func autoConvert_api_Secret_To_v1_Secret(in *api.Secret, out *Secret, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Data = *(*map[string][]byte)(unsafe.Pointer(&in.Data))
+ out.Type = SecretType(in.Type)
+ return nil
+}
+
+// Convert_api_Secret_To_v1_Secret is an autogenerated conversion function.
+func Convert_api_Secret_To_v1_Secret(in *api.Secret, out *Secret, s conversion.Scope) error {
+ return autoConvert_api_Secret_To_v1_Secret(in, out, s)
+}
+
+func autoConvert_v1_SecretEnvSource_To_api_SecretEnvSource(in *SecretEnvSource, out *api.SecretEnvSource, s conversion.Scope) error {
+ if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
+ return err
+ }
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_v1_SecretEnvSource_To_api_SecretEnvSource is an autogenerated conversion function.
+func Convert_v1_SecretEnvSource_To_api_SecretEnvSource(in *SecretEnvSource, out *api.SecretEnvSource, s conversion.Scope) error {
+ return autoConvert_v1_SecretEnvSource_To_api_SecretEnvSource(in, out, s)
+}
+
+func autoConvert_api_SecretEnvSource_To_v1_SecretEnvSource(in *api.SecretEnvSource, out *SecretEnvSource, s conversion.Scope) error {
+ if err := Convert_api_LocalObjectReference_To_v1_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
+ return err
+ }
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_api_SecretEnvSource_To_v1_SecretEnvSource is an autogenerated conversion function.
+func Convert_api_SecretEnvSource_To_v1_SecretEnvSource(in *api.SecretEnvSource, out *SecretEnvSource, s conversion.Scope) error {
+ return autoConvert_api_SecretEnvSource_To_v1_SecretEnvSource(in, out, s)
+}
+
+func autoConvert_v1_SecretKeySelector_To_api_SecretKeySelector(in *SecretKeySelector, out *api.SecretKeySelector, s conversion.Scope) error {
+ if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
+ return err
+ }
+ out.Key = in.Key
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_v1_SecretKeySelector_To_api_SecretKeySelector is an autogenerated conversion function.
+func Convert_v1_SecretKeySelector_To_api_SecretKeySelector(in *SecretKeySelector, out *api.SecretKeySelector, s conversion.Scope) error {
+ return autoConvert_v1_SecretKeySelector_To_api_SecretKeySelector(in, out, s)
+}
+
+func autoConvert_api_SecretKeySelector_To_v1_SecretKeySelector(in *api.SecretKeySelector, out *SecretKeySelector, s conversion.Scope) error {
+ if err := Convert_api_LocalObjectReference_To_v1_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
+ return err
+ }
+ out.Key = in.Key
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_api_SecretKeySelector_To_v1_SecretKeySelector is an autogenerated conversion function.
+func Convert_api_SecretKeySelector_To_v1_SecretKeySelector(in *api.SecretKeySelector, out *SecretKeySelector, s conversion.Scope) error {
+ return autoConvert_api_SecretKeySelector_To_v1_SecretKeySelector(in, out, s)
+}
+
+func autoConvert_v1_SecretList_To_api_SecretList(in *SecretList, out *api.SecretList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]api.Secret, len(*in))
+ for i := range *in {
+ if err := Convert_v1_Secret_To_api_Secret(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1_SecretList_To_api_SecretList is an autogenerated conversion function.
+func Convert_v1_SecretList_To_api_SecretList(in *SecretList, out *api.SecretList, s conversion.Scope) error {
+ return autoConvert_v1_SecretList_To_api_SecretList(in, out, s)
+}
+
+func autoConvert_api_SecretList_To_v1_SecretList(in *api.SecretList, out *SecretList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Secret, len(*in))
+ for i := range *in {
+ if err := Convert_api_Secret_To_v1_Secret(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]Secret, 0)
+ }
+ return nil
+}
+
+// Convert_api_SecretList_To_v1_SecretList is an autogenerated conversion function.
+func Convert_api_SecretList_To_v1_SecretList(in *api.SecretList, out *SecretList, s conversion.Scope) error {
+ return autoConvert_api_SecretList_To_v1_SecretList(in, out, s)
+}
+
+func autoConvert_v1_SecretProjection_To_api_SecretProjection(in *SecretProjection, out *api.SecretProjection, s conversion.Scope) error {
+ if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
+ return err
+ }
+ out.Items = *(*[]api.KeyToPath)(unsafe.Pointer(&in.Items))
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_v1_SecretProjection_To_api_SecretProjection is an autogenerated conversion function.
+func Convert_v1_SecretProjection_To_api_SecretProjection(in *SecretProjection, out *api.SecretProjection, s conversion.Scope) error {
+ return autoConvert_v1_SecretProjection_To_api_SecretProjection(in, out, s)
+}
+
+func autoConvert_api_SecretProjection_To_v1_SecretProjection(in *api.SecretProjection, out *SecretProjection, s conversion.Scope) error {
+ if err := Convert_api_LocalObjectReference_To_v1_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil {
+ return err
+ }
+ out.Items = *(*[]KeyToPath)(unsafe.Pointer(&in.Items))
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_api_SecretProjection_To_v1_SecretProjection is an autogenerated conversion function.
+func Convert_api_SecretProjection_To_v1_SecretProjection(in *api.SecretProjection, out *SecretProjection, s conversion.Scope) error {
+ return autoConvert_api_SecretProjection_To_v1_SecretProjection(in, out, s)
+}
+
+func autoConvert_v1_SecretVolumeSource_To_api_SecretVolumeSource(in *SecretVolumeSource, out *api.SecretVolumeSource, s conversion.Scope) error {
+ out.SecretName = in.SecretName
+ out.Items = *(*[]api.KeyToPath)(unsafe.Pointer(&in.Items))
+ out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode))
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_v1_SecretVolumeSource_To_api_SecretVolumeSource is an autogenerated conversion function.
+func Convert_v1_SecretVolumeSource_To_api_SecretVolumeSource(in *SecretVolumeSource, out *api.SecretVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_SecretVolumeSource_To_api_SecretVolumeSource(in, out, s)
+}
+
+func autoConvert_api_SecretVolumeSource_To_v1_SecretVolumeSource(in *api.SecretVolumeSource, out *SecretVolumeSource, s conversion.Scope) error {
+ out.SecretName = in.SecretName
+ out.Items = *(*[]KeyToPath)(unsafe.Pointer(&in.Items))
+ out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode))
+ out.Optional = (*bool)(unsafe.Pointer(in.Optional))
+ return nil
+}
+
+// Convert_api_SecretVolumeSource_To_v1_SecretVolumeSource is an autogenerated conversion function.
+func Convert_api_SecretVolumeSource_To_v1_SecretVolumeSource(in *api.SecretVolumeSource, out *SecretVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_SecretVolumeSource_To_v1_SecretVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_SecurityContext_To_api_SecurityContext(in *SecurityContext, out *api.SecurityContext, s conversion.Scope) error {
+ out.Capabilities = (*api.Capabilities)(unsafe.Pointer(in.Capabilities))
+ out.Privileged = (*bool)(unsafe.Pointer(in.Privileged))
+ out.SELinuxOptions = (*api.SELinuxOptions)(unsafe.Pointer(in.SELinuxOptions))
+ out.RunAsUser = (*int64)(unsafe.Pointer(in.RunAsUser))
+ out.RunAsNonRoot = (*bool)(unsafe.Pointer(in.RunAsNonRoot))
+ out.ReadOnlyRootFilesystem = (*bool)(unsafe.Pointer(in.ReadOnlyRootFilesystem))
+ return nil
+}
+
+// Convert_v1_SecurityContext_To_api_SecurityContext is an autogenerated conversion function.
+func Convert_v1_SecurityContext_To_api_SecurityContext(in *SecurityContext, out *api.SecurityContext, s conversion.Scope) error {
+ return autoConvert_v1_SecurityContext_To_api_SecurityContext(in, out, s)
+}
+
+func autoConvert_api_SecurityContext_To_v1_SecurityContext(in *api.SecurityContext, out *SecurityContext, s conversion.Scope) error {
+ out.Capabilities = (*Capabilities)(unsafe.Pointer(in.Capabilities))
+ out.Privileged = (*bool)(unsafe.Pointer(in.Privileged))
+ out.SELinuxOptions = (*SELinuxOptions)(unsafe.Pointer(in.SELinuxOptions))
+ out.RunAsUser = (*int64)(unsafe.Pointer(in.RunAsUser))
+ out.RunAsNonRoot = (*bool)(unsafe.Pointer(in.RunAsNonRoot))
+ out.ReadOnlyRootFilesystem = (*bool)(unsafe.Pointer(in.ReadOnlyRootFilesystem))
+ return nil
+}
+
+// Convert_api_SecurityContext_To_v1_SecurityContext is an autogenerated conversion function.
+func Convert_api_SecurityContext_To_v1_SecurityContext(in *api.SecurityContext, out *SecurityContext, s conversion.Scope) error {
+ return autoConvert_api_SecurityContext_To_v1_SecurityContext(in, out, s)
+}
+
+func autoConvert_v1_SerializedReference_To_api_SerializedReference(in *SerializedReference, out *api.SerializedReference, s conversion.Scope) error {
+ if err := Convert_v1_ObjectReference_To_api_ObjectReference(&in.Reference, &out.Reference, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_SerializedReference_To_api_SerializedReference is an autogenerated conversion function.
+func Convert_v1_SerializedReference_To_api_SerializedReference(in *SerializedReference, out *api.SerializedReference, s conversion.Scope) error {
+ return autoConvert_v1_SerializedReference_To_api_SerializedReference(in, out, s)
+}
+
+func autoConvert_api_SerializedReference_To_v1_SerializedReference(in *api.SerializedReference, out *SerializedReference, s conversion.Scope) error {
+ if err := Convert_api_ObjectReference_To_v1_ObjectReference(&in.Reference, &out.Reference, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_SerializedReference_To_v1_SerializedReference is an autogenerated conversion function.
+func Convert_api_SerializedReference_To_v1_SerializedReference(in *api.SerializedReference, out *SerializedReference, s conversion.Scope) error {
+ return autoConvert_api_SerializedReference_To_v1_SerializedReference(in, out, s)
+}
+
+func autoConvert_v1_Service_To_api_Service(in *Service, out *api.Service, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_ServiceSpec_To_api_ServiceSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ServiceStatus_To_api_ServiceStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_Service_To_api_Service is an autogenerated conversion function.
+func Convert_v1_Service_To_api_Service(in *Service, out *api.Service, s conversion.Scope) error {
+ return autoConvert_v1_Service_To_api_Service(in, out, s)
+}
+
+func autoConvert_api_Service_To_v1_Service(in *api.Service, out *Service, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_api_ServiceSpec_To_v1_ServiceSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_api_ServiceStatus_To_v1_ServiceStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_Service_To_v1_Service is an autogenerated conversion function.
+func Convert_api_Service_To_v1_Service(in *api.Service, out *Service, s conversion.Scope) error {
+ return autoConvert_api_Service_To_v1_Service(in, out, s)
+}
+
+func autoConvert_v1_ServiceAccount_To_api_ServiceAccount(in *ServiceAccount, out *api.ServiceAccount, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Secrets = *(*[]api.ObjectReference)(unsafe.Pointer(&in.Secrets))
+ out.ImagePullSecrets = *(*[]api.LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets))
+ out.AutomountServiceAccountToken = (*bool)(unsafe.Pointer(in.AutomountServiceAccountToken))
+ return nil
+}
+
+// Convert_v1_ServiceAccount_To_api_ServiceAccount is an autogenerated conversion function.
+func Convert_v1_ServiceAccount_To_api_ServiceAccount(in *ServiceAccount, out *api.ServiceAccount, s conversion.Scope) error {
+ return autoConvert_v1_ServiceAccount_To_api_ServiceAccount(in, out, s)
+}
+
+func autoConvert_api_ServiceAccount_To_v1_ServiceAccount(in *api.ServiceAccount, out *ServiceAccount, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Secrets = *(*[]ObjectReference)(unsafe.Pointer(&in.Secrets))
+ out.ImagePullSecrets = *(*[]LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets))
+ out.AutomountServiceAccountToken = (*bool)(unsafe.Pointer(in.AutomountServiceAccountToken))
+ return nil
+}
+
+// Convert_api_ServiceAccount_To_v1_ServiceAccount is an autogenerated conversion function.
+func Convert_api_ServiceAccount_To_v1_ServiceAccount(in *api.ServiceAccount, out *ServiceAccount, s conversion.Scope) error {
+ return autoConvert_api_ServiceAccount_To_v1_ServiceAccount(in, out, s)
+}
+
+func autoConvert_v1_ServiceAccountList_To_api_ServiceAccountList(in *ServiceAccountList, out *api.ServiceAccountList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]api.ServiceAccount)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1_ServiceAccountList_To_api_ServiceAccountList is an autogenerated conversion function.
+func Convert_v1_ServiceAccountList_To_api_ServiceAccountList(in *ServiceAccountList, out *api.ServiceAccountList, s conversion.Scope) error {
+ return autoConvert_v1_ServiceAccountList_To_api_ServiceAccountList(in, out, s)
+}
+
+func autoConvert_api_ServiceAccountList_To_v1_ServiceAccountList(in *api.ServiceAccountList, out *ServiceAccountList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]ServiceAccount, 0)
+ } else {
+ out.Items = *(*[]ServiceAccount)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_api_ServiceAccountList_To_v1_ServiceAccountList is an autogenerated conversion function.
+func Convert_api_ServiceAccountList_To_v1_ServiceAccountList(in *api.ServiceAccountList, out *ServiceAccountList, s conversion.Scope) error {
+ return autoConvert_api_ServiceAccountList_To_v1_ServiceAccountList(in, out, s)
+}
+
+func autoConvert_v1_ServiceList_To_api_ServiceList(in *ServiceList, out *api.ServiceList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]api.Service, len(*in))
+ for i := range *in {
+ if err := Convert_v1_Service_To_api_Service(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1_ServiceList_To_api_ServiceList is an autogenerated conversion function.
+func Convert_v1_ServiceList_To_api_ServiceList(in *ServiceList, out *api.ServiceList, s conversion.Scope) error {
+ return autoConvert_v1_ServiceList_To_api_ServiceList(in, out, s)
+}
+
+func autoConvert_api_ServiceList_To_v1_ServiceList(in *api.ServiceList, out *ServiceList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Service, len(*in))
+ for i := range *in {
+ if err := Convert_api_Service_To_v1_Service(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]Service, 0)
+ }
+ return nil
+}
+
+// Convert_api_ServiceList_To_v1_ServiceList is an autogenerated conversion function.
+func Convert_api_ServiceList_To_v1_ServiceList(in *api.ServiceList, out *ServiceList, s conversion.Scope) error {
+ return autoConvert_api_ServiceList_To_v1_ServiceList(in, out, s)
+}
+
+func autoConvert_v1_ServicePort_To_api_ServicePort(in *ServicePort, out *api.ServicePort, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Protocol = api.Protocol(in.Protocol)
+ out.Port = in.Port
+ out.TargetPort = in.TargetPort
+ out.NodePort = in.NodePort
+ return nil
+}
+
+// Convert_v1_ServicePort_To_api_ServicePort is an autogenerated conversion function.
+func Convert_v1_ServicePort_To_api_ServicePort(in *ServicePort, out *api.ServicePort, s conversion.Scope) error {
+ return autoConvert_v1_ServicePort_To_api_ServicePort(in, out, s)
+}
+
+func autoConvert_api_ServicePort_To_v1_ServicePort(in *api.ServicePort, out *ServicePort, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Protocol = Protocol(in.Protocol)
+ out.Port = in.Port
+ out.TargetPort = in.TargetPort
+ out.NodePort = in.NodePort
+ return nil
+}
+
+// Convert_api_ServicePort_To_v1_ServicePort is an autogenerated conversion function.
+func Convert_api_ServicePort_To_v1_ServicePort(in *api.ServicePort, out *ServicePort, s conversion.Scope) error {
+ return autoConvert_api_ServicePort_To_v1_ServicePort(in, out, s)
+}
+
+func autoConvert_v1_ServiceProxyOptions_To_api_ServiceProxyOptions(in *ServiceProxyOptions, out *api.ServiceProxyOptions, s conversion.Scope) error {
+ out.Path = in.Path
+ return nil
+}
+
+// Convert_v1_ServiceProxyOptions_To_api_ServiceProxyOptions is an autogenerated conversion function.
+func Convert_v1_ServiceProxyOptions_To_api_ServiceProxyOptions(in *ServiceProxyOptions, out *api.ServiceProxyOptions, s conversion.Scope) error {
+ return autoConvert_v1_ServiceProxyOptions_To_api_ServiceProxyOptions(in, out, s)
+}
+
+func autoConvert_api_ServiceProxyOptions_To_v1_ServiceProxyOptions(in *api.ServiceProxyOptions, out *ServiceProxyOptions, s conversion.Scope) error {
+ out.Path = in.Path
+ return nil
+}
+
+// Convert_api_ServiceProxyOptions_To_v1_ServiceProxyOptions is an autogenerated conversion function.
+func Convert_api_ServiceProxyOptions_To_v1_ServiceProxyOptions(in *api.ServiceProxyOptions, out *ServiceProxyOptions, s conversion.Scope) error {
+ return autoConvert_api_ServiceProxyOptions_To_v1_ServiceProxyOptions(in, out, s)
+}
+
+func autoConvert_v1_ServiceSpec_To_api_ServiceSpec(in *ServiceSpec, out *api.ServiceSpec, s conversion.Scope) error {
+ out.Ports = *(*[]api.ServicePort)(unsafe.Pointer(&in.Ports))
+ out.Selector = *(*map[string]string)(unsafe.Pointer(&in.Selector))
+ out.ClusterIP = in.ClusterIP
+ out.Type = api.ServiceType(in.Type)
+ out.ExternalIPs = *(*[]string)(unsafe.Pointer(&in.ExternalIPs))
+ out.SessionAffinity = api.ServiceAffinity(in.SessionAffinity)
+ out.LoadBalancerIP = in.LoadBalancerIP
+ out.LoadBalancerSourceRanges = *(*[]string)(unsafe.Pointer(&in.LoadBalancerSourceRanges))
+ out.ExternalName = in.ExternalName
+ out.ExternalTrafficPolicy = api.ServiceExternalTrafficPolicyType(in.ExternalTrafficPolicy)
+ out.HealthCheckNodePort = in.HealthCheckNodePort
+ return nil
+}
+
+// Convert_v1_ServiceSpec_To_api_ServiceSpec is an autogenerated conversion function.
+func Convert_v1_ServiceSpec_To_api_ServiceSpec(in *ServiceSpec, out *api.ServiceSpec, s conversion.Scope) error {
+ return autoConvert_v1_ServiceSpec_To_api_ServiceSpec(in, out, s)
+}
+
+func autoConvert_api_ServiceSpec_To_v1_ServiceSpec(in *api.ServiceSpec, out *ServiceSpec, s conversion.Scope) error {
+ out.Type = ServiceType(in.Type)
+ out.Ports = *(*[]ServicePort)(unsafe.Pointer(&in.Ports))
+ out.Selector = *(*map[string]string)(unsafe.Pointer(&in.Selector))
+ out.ClusterIP = in.ClusterIP
+ out.ExternalName = in.ExternalName
+ out.ExternalIPs = *(*[]string)(unsafe.Pointer(&in.ExternalIPs))
+ out.LoadBalancerIP = in.LoadBalancerIP
+ out.SessionAffinity = ServiceAffinity(in.SessionAffinity)
+ out.LoadBalancerSourceRanges = *(*[]string)(unsafe.Pointer(&in.LoadBalancerSourceRanges))
+ out.ExternalTrafficPolicy = ServiceExternalTrafficPolicyType(in.ExternalTrafficPolicy)
+ out.HealthCheckNodePort = in.HealthCheckNodePort
+ return nil
+}
+
+// Convert_api_ServiceSpec_To_v1_ServiceSpec is an autogenerated conversion function.
+func Convert_api_ServiceSpec_To_v1_ServiceSpec(in *api.ServiceSpec, out *ServiceSpec, s conversion.Scope) error {
+ return autoConvert_api_ServiceSpec_To_v1_ServiceSpec(in, out, s)
+}
+
+func autoConvert_v1_ServiceStatus_To_api_ServiceStatus(in *ServiceStatus, out *api.ServiceStatus, s conversion.Scope) error {
+ if err := Convert_v1_LoadBalancerStatus_To_api_LoadBalancerStatus(&in.LoadBalancer, &out.LoadBalancer, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_ServiceStatus_To_api_ServiceStatus is an autogenerated conversion function.
+func Convert_v1_ServiceStatus_To_api_ServiceStatus(in *ServiceStatus, out *api.ServiceStatus, s conversion.Scope) error {
+ return autoConvert_v1_ServiceStatus_To_api_ServiceStatus(in, out, s)
+}
+
+func autoConvert_api_ServiceStatus_To_v1_ServiceStatus(in *api.ServiceStatus, out *ServiceStatus, s conversion.Scope) error {
+ if err := Convert_api_LoadBalancerStatus_To_v1_LoadBalancerStatus(&in.LoadBalancer, &out.LoadBalancer, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_ServiceStatus_To_v1_ServiceStatus is an autogenerated conversion function.
+func Convert_api_ServiceStatus_To_v1_ServiceStatus(in *api.ServiceStatus, out *ServiceStatus, s conversion.Scope) error {
+ return autoConvert_api_ServiceStatus_To_v1_ServiceStatus(in, out, s)
+}
+
+func autoConvert_v1_StorageOSPersistentVolumeSource_To_api_StorageOSPersistentVolumeSource(in *StorageOSPersistentVolumeSource, out *api.StorageOSPersistentVolumeSource, s conversion.Scope) error {
+ out.VolumeName = in.VolumeName
+ out.VolumeNamespace = in.VolumeNamespace
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ out.SecretRef = (*api.ObjectReference)(unsafe.Pointer(in.SecretRef))
+ return nil
+}
+
+// Convert_v1_StorageOSPersistentVolumeSource_To_api_StorageOSPersistentVolumeSource is an autogenerated conversion function.
+func Convert_v1_StorageOSPersistentVolumeSource_To_api_StorageOSPersistentVolumeSource(in *StorageOSPersistentVolumeSource, out *api.StorageOSPersistentVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_StorageOSPersistentVolumeSource_To_api_StorageOSPersistentVolumeSource(in, out, s)
+}
+
+func autoConvert_api_StorageOSPersistentVolumeSource_To_v1_StorageOSPersistentVolumeSource(in *api.StorageOSPersistentVolumeSource, out *StorageOSPersistentVolumeSource, s conversion.Scope) error {
+ out.VolumeName = in.VolumeName
+ out.VolumeNamespace = in.VolumeNamespace
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ out.SecretRef = (*ObjectReference)(unsafe.Pointer(in.SecretRef))
+ return nil
+}
+
+// Convert_api_StorageOSPersistentVolumeSource_To_v1_StorageOSPersistentVolumeSource is an autogenerated conversion function.
+func Convert_api_StorageOSPersistentVolumeSource_To_v1_StorageOSPersistentVolumeSource(in *api.StorageOSPersistentVolumeSource, out *StorageOSPersistentVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_StorageOSPersistentVolumeSource_To_v1_StorageOSPersistentVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_StorageOSVolumeSource_To_api_StorageOSVolumeSource(in *StorageOSVolumeSource, out *api.StorageOSVolumeSource, s conversion.Scope) error {
+ out.VolumeName = in.VolumeName
+ out.VolumeNamespace = in.VolumeNamespace
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ out.SecretRef = (*api.LocalObjectReference)(unsafe.Pointer(in.SecretRef))
+ return nil
+}
+
+// Convert_v1_StorageOSVolumeSource_To_api_StorageOSVolumeSource is an autogenerated conversion function.
+func Convert_v1_StorageOSVolumeSource_To_api_StorageOSVolumeSource(in *StorageOSVolumeSource, out *api.StorageOSVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_StorageOSVolumeSource_To_api_StorageOSVolumeSource(in, out, s)
+}
+
+func autoConvert_api_StorageOSVolumeSource_To_v1_StorageOSVolumeSource(in *api.StorageOSVolumeSource, out *StorageOSVolumeSource, s conversion.Scope) error {
+ out.VolumeName = in.VolumeName
+ out.VolumeNamespace = in.VolumeNamespace
+ out.FSType = in.FSType
+ out.ReadOnly = in.ReadOnly
+ out.SecretRef = (*LocalObjectReference)(unsafe.Pointer(in.SecretRef))
+ return nil
+}
+
+// Convert_api_StorageOSVolumeSource_To_v1_StorageOSVolumeSource is an autogenerated conversion function.
+func Convert_api_StorageOSVolumeSource_To_v1_StorageOSVolumeSource(in *api.StorageOSVolumeSource, out *StorageOSVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_StorageOSVolumeSource_To_v1_StorageOSVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_Sysctl_To_api_Sysctl(in *Sysctl, out *api.Sysctl, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Value = in.Value
+ return nil
+}
+
+// Convert_v1_Sysctl_To_api_Sysctl is an autogenerated conversion function.
+func Convert_v1_Sysctl_To_api_Sysctl(in *Sysctl, out *api.Sysctl, s conversion.Scope) error {
+ return autoConvert_v1_Sysctl_To_api_Sysctl(in, out, s)
+}
+
+func autoConvert_api_Sysctl_To_v1_Sysctl(in *api.Sysctl, out *Sysctl, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Value = in.Value
+ return nil
+}
+
+// Convert_api_Sysctl_To_v1_Sysctl is an autogenerated conversion function.
+func Convert_api_Sysctl_To_v1_Sysctl(in *api.Sysctl, out *Sysctl, s conversion.Scope) error {
+ return autoConvert_api_Sysctl_To_v1_Sysctl(in, out, s)
+}
+
+func autoConvert_v1_TCPSocketAction_To_api_TCPSocketAction(in *TCPSocketAction, out *api.TCPSocketAction, s conversion.Scope) error {
+ out.Port = in.Port
+ out.Host = in.Host
+ return nil
+}
+
+// Convert_v1_TCPSocketAction_To_api_TCPSocketAction is an autogenerated conversion function.
+func Convert_v1_TCPSocketAction_To_api_TCPSocketAction(in *TCPSocketAction, out *api.TCPSocketAction, s conversion.Scope) error {
+ return autoConvert_v1_TCPSocketAction_To_api_TCPSocketAction(in, out, s)
+}
+
+func autoConvert_api_TCPSocketAction_To_v1_TCPSocketAction(in *api.TCPSocketAction, out *TCPSocketAction, s conversion.Scope) error {
+ out.Port = in.Port
+ out.Host = in.Host
+ return nil
+}
+
+// Convert_api_TCPSocketAction_To_v1_TCPSocketAction is an autogenerated conversion function.
+func Convert_api_TCPSocketAction_To_v1_TCPSocketAction(in *api.TCPSocketAction, out *TCPSocketAction, s conversion.Scope) error {
+ return autoConvert_api_TCPSocketAction_To_v1_TCPSocketAction(in, out, s)
+}
+
+func autoConvert_v1_Taint_To_api_Taint(in *Taint, out *api.Taint, s conversion.Scope) error {
+ out.Key = in.Key
+ out.Value = in.Value
+ out.Effect = api.TaintEffect(in.Effect)
+ out.TimeAdded = in.TimeAdded
+ return nil
+}
+
+// Convert_v1_Taint_To_api_Taint is an autogenerated conversion function.
+func Convert_v1_Taint_To_api_Taint(in *Taint, out *api.Taint, s conversion.Scope) error {
+ return autoConvert_v1_Taint_To_api_Taint(in, out, s)
+}
+
+func autoConvert_api_Taint_To_v1_Taint(in *api.Taint, out *Taint, s conversion.Scope) error {
+ out.Key = in.Key
+ out.Value = in.Value
+ out.Effect = TaintEffect(in.Effect)
+ out.TimeAdded = in.TimeAdded
+ return nil
+}
+
+// Convert_api_Taint_To_v1_Taint is an autogenerated conversion function.
+func Convert_api_Taint_To_v1_Taint(in *api.Taint, out *Taint, s conversion.Scope) error {
+ return autoConvert_api_Taint_To_v1_Taint(in, out, s)
+}
+
+func autoConvert_v1_Toleration_To_api_Toleration(in *Toleration, out *api.Toleration, s conversion.Scope) error {
+ out.Key = in.Key
+ out.Operator = api.TolerationOperator(in.Operator)
+ out.Value = in.Value
+ out.Effect = api.TaintEffect(in.Effect)
+ out.TolerationSeconds = (*int64)(unsafe.Pointer(in.TolerationSeconds))
+ return nil
+}
+
+// Convert_v1_Toleration_To_api_Toleration is an autogenerated conversion function.
+func Convert_v1_Toleration_To_api_Toleration(in *Toleration, out *api.Toleration, s conversion.Scope) error {
+ return autoConvert_v1_Toleration_To_api_Toleration(in, out, s)
+}
+
+func autoConvert_api_Toleration_To_v1_Toleration(in *api.Toleration, out *Toleration, s conversion.Scope) error {
+ out.Key = in.Key
+ out.Operator = TolerationOperator(in.Operator)
+ out.Value = in.Value
+ out.Effect = TaintEffect(in.Effect)
+ out.TolerationSeconds = (*int64)(unsafe.Pointer(in.TolerationSeconds))
+ return nil
+}
+
+// Convert_api_Toleration_To_v1_Toleration is an autogenerated conversion function.
+func Convert_api_Toleration_To_v1_Toleration(in *api.Toleration, out *Toleration, s conversion.Scope) error {
+ return autoConvert_api_Toleration_To_v1_Toleration(in, out, s)
+}
+
+func autoConvert_v1_Volume_To_api_Volume(in *Volume, out *api.Volume, s conversion.Scope) error {
+ out.Name = in.Name
+ if err := Convert_v1_VolumeSource_To_api_VolumeSource(&in.VolumeSource, &out.VolumeSource, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_Volume_To_api_Volume is an autogenerated conversion function.
+func Convert_v1_Volume_To_api_Volume(in *Volume, out *api.Volume, s conversion.Scope) error {
+ return autoConvert_v1_Volume_To_api_Volume(in, out, s)
+}
+
+func autoConvert_api_Volume_To_v1_Volume(in *api.Volume, out *Volume, s conversion.Scope) error {
+ out.Name = in.Name
+ if err := Convert_api_VolumeSource_To_v1_VolumeSource(&in.VolumeSource, &out.VolumeSource, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_Volume_To_v1_Volume is an autogenerated conversion function.
+func Convert_api_Volume_To_v1_Volume(in *api.Volume, out *Volume, s conversion.Scope) error {
+ return autoConvert_api_Volume_To_v1_Volume(in, out, s)
+}
+
+func autoConvert_v1_VolumeMount_To_api_VolumeMount(in *VolumeMount, out *api.VolumeMount, s conversion.Scope) error {
+ out.Name = in.Name
+ out.ReadOnly = in.ReadOnly
+ out.MountPath = in.MountPath
+ out.SubPath = in.SubPath
+ return nil
+}
+
+// Convert_v1_VolumeMount_To_api_VolumeMount is an autogenerated conversion function.
+func Convert_v1_VolumeMount_To_api_VolumeMount(in *VolumeMount, out *api.VolumeMount, s conversion.Scope) error {
+ return autoConvert_v1_VolumeMount_To_api_VolumeMount(in, out, s)
+}
+
+func autoConvert_api_VolumeMount_To_v1_VolumeMount(in *api.VolumeMount, out *VolumeMount, s conversion.Scope) error {
+ out.Name = in.Name
+ out.ReadOnly = in.ReadOnly
+ out.MountPath = in.MountPath
+ out.SubPath = in.SubPath
+ return nil
+}
+
+// Convert_api_VolumeMount_To_v1_VolumeMount is an autogenerated conversion function.
+func Convert_api_VolumeMount_To_v1_VolumeMount(in *api.VolumeMount, out *VolumeMount, s conversion.Scope) error {
+ return autoConvert_api_VolumeMount_To_v1_VolumeMount(in, out, s)
+}
+
+func autoConvert_v1_VolumeProjection_To_api_VolumeProjection(in *VolumeProjection, out *api.VolumeProjection, s conversion.Scope) error {
+ out.Secret = (*api.SecretProjection)(unsafe.Pointer(in.Secret))
+ out.DownwardAPI = (*api.DownwardAPIProjection)(unsafe.Pointer(in.DownwardAPI))
+ out.ConfigMap = (*api.ConfigMapProjection)(unsafe.Pointer(in.ConfigMap))
+ return nil
+}
+
+// Convert_v1_VolumeProjection_To_api_VolumeProjection is an autogenerated conversion function.
+func Convert_v1_VolumeProjection_To_api_VolumeProjection(in *VolumeProjection, out *api.VolumeProjection, s conversion.Scope) error {
+ return autoConvert_v1_VolumeProjection_To_api_VolumeProjection(in, out, s)
+}
+
+func autoConvert_api_VolumeProjection_To_v1_VolumeProjection(in *api.VolumeProjection, out *VolumeProjection, s conversion.Scope) error {
+ out.Secret = (*SecretProjection)(unsafe.Pointer(in.Secret))
+ out.DownwardAPI = (*DownwardAPIProjection)(unsafe.Pointer(in.DownwardAPI))
+ out.ConfigMap = (*ConfigMapProjection)(unsafe.Pointer(in.ConfigMap))
+ return nil
+}
+
+// Convert_api_VolumeProjection_To_v1_VolumeProjection is an autogenerated conversion function.
+func Convert_api_VolumeProjection_To_v1_VolumeProjection(in *api.VolumeProjection, out *VolumeProjection, s conversion.Scope) error {
+ return autoConvert_api_VolumeProjection_To_v1_VolumeProjection(in, out, s)
+}
+
+func autoConvert_v1_VolumeSource_To_api_VolumeSource(in *VolumeSource, out *api.VolumeSource, s conversion.Scope) error {
+ out.HostPath = (*api.HostPathVolumeSource)(unsafe.Pointer(in.HostPath))
+ out.EmptyDir = (*api.EmptyDirVolumeSource)(unsafe.Pointer(in.EmptyDir))
+ out.GCEPersistentDisk = (*api.GCEPersistentDiskVolumeSource)(unsafe.Pointer(in.GCEPersistentDisk))
+ out.AWSElasticBlockStore = (*api.AWSElasticBlockStoreVolumeSource)(unsafe.Pointer(in.AWSElasticBlockStore))
+ out.GitRepo = (*api.GitRepoVolumeSource)(unsafe.Pointer(in.GitRepo))
+ out.Secret = (*api.SecretVolumeSource)(unsafe.Pointer(in.Secret))
+ out.NFS = (*api.NFSVolumeSource)(unsafe.Pointer(in.NFS))
+ out.ISCSI = (*api.ISCSIVolumeSource)(unsafe.Pointer(in.ISCSI))
+ out.Glusterfs = (*api.GlusterfsVolumeSource)(unsafe.Pointer(in.Glusterfs))
+ out.PersistentVolumeClaim = (*api.PersistentVolumeClaimVolumeSource)(unsafe.Pointer(in.PersistentVolumeClaim))
+ out.RBD = (*api.RBDVolumeSource)(unsafe.Pointer(in.RBD))
+ out.FlexVolume = (*api.FlexVolumeSource)(unsafe.Pointer(in.FlexVolume))
+ out.Cinder = (*api.CinderVolumeSource)(unsafe.Pointer(in.Cinder))
+ out.CephFS = (*api.CephFSVolumeSource)(unsafe.Pointer(in.CephFS))
+ out.Flocker = (*api.FlockerVolumeSource)(unsafe.Pointer(in.Flocker))
+ out.DownwardAPI = (*api.DownwardAPIVolumeSource)(unsafe.Pointer(in.DownwardAPI))
+ out.FC = (*api.FCVolumeSource)(unsafe.Pointer(in.FC))
+ out.AzureFile = (*api.AzureFileVolumeSource)(unsafe.Pointer(in.AzureFile))
+ out.ConfigMap = (*api.ConfigMapVolumeSource)(unsafe.Pointer(in.ConfigMap))
+ out.VsphereVolume = (*api.VsphereVirtualDiskVolumeSource)(unsafe.Pointer(in.VsphereVolume))
+ out.Quobyte = (*api.QuobyteVolumeSource)(unsafe.Pointer(in.Quobyte))
+ out.AzureDisk = (*api.AzureDiskVolumeSource)(unsafe.Pointer(in.AzureDisk))
+ out.PhotonPersistentDisk = (*api.PhotonPersistentDiskVolumeSource)(unsafe.Pointer(in.PhotonPersistentDisk))
+ out.Projected = (*api.ProjectedVolumeSource)(unsafe.Pointer(in.Projected))
+ out.PortworxVolume = (*api.PortworxVolumeSource)(unsafe.Pointer(in.PortworxVolume))
+ out.ScaleIO = (*api.ScaleIOVolumeSource)(unsafe.Pointer(in.ScaleIO))
+ out.StorageOS = (*api.StorageOSVolumeSource)(unsafe.Pointer(in.StorageOS))
+ return nil
+}
+
+// Convert_v1_VolumeSource_To_api_VolumeSource is an autogenerated conversion function.
+func Convert_v1_VolumeSource_To_api_VolumeSource(in *VolumeSource, out *api.VolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_VolumeSource_To_api_VolumeSource(in, out, s)
+}
+
+func autoConvert_api_VolumeSource_To_v1_VolumeSource(in *api.VolumeSource, out *VolumeSource, s conversion.Scope) error {
+ out.HostPath = (*HostPathVolumeSource)(unsafe.Pointer(in.HostPath))
+ out.EmptyDir = (*EmptyDirVolumeSource)(unsafe.Pointer(in.EmptyDir))
+ out.GCEPersistentDisk = (*GCEPersistentDiskVolumeSource)(unsafe.Pointer(in.GCEPersistentDisk))
+ out.AWSElasticBlockStore = (*AWSElasticBlockStoreVolumeSource)(unsafe.Pointer(in.AWSElasticBlockStore))
+ out.GitRepo = (*GitRepoVolumeSource)(unsafe.Pointer(in.GitRepo))
+ out.Secret = (*SecretVolumeSource)(unsafe.Pointer(in.Secret))
+ out.NFS = (*NFSVolumeSource)(unsafe.Pointer(in.NFS))
+ out.ISCSI = (*ISCSIVolumeSource)(unsafe.Pointer(in.ISCSI))
+ out.Glusterfs = (*GlusterfsVolumeSource)(unsafe.Pointer(in.Glusterfs))
+ out.PersistentVolumeClaim = (*PersistentVolumeClaimVolumeSource)(unsafe.Pointer(in.PersistentVolumeClaim))
+ out.RBD = (*RBDVolumeSource)(unsafe.Pointer(in.RBD))
+ out.Quobyte = (*QuobyteVolumeSource)(unsafe.Pointer(in.Quobyte))
+ out.FlexVolume = (*FlexVolumeSource)(unsafe.Pointer(in.FlexVolume))
+ out.Cinder = (*CinderVolumeSource)(unsafe.Pointer(in.Cinder))
+ out.CephFS = (*CephFSVolumeSource)(unsafe.Pointer(in.CephFS))
+ out.Flocker = (*FlockerVolumeSource)(unsafe.Pointer(in.Flocker))
+ out.DownwardAPI = (*DownwardAPIVolumeSource)(unsafe.Pointer(in.DownwardAPI))
+ out.FC = (*FCVolumeSource)(unsafe.Pointer(in.FC))
+ out.AzureFile = (*AzureFileVolumeSource)(unsafe.Pointer(in.AzureFile))
+ out.ConfigMap = (*ConfigMapVolumeSource)(unsafe.Pointer(in.ConfigMap))
+ out.VsphereVolume = (*VsphereVirtualDiskVolumeSource)(unsafe.Pointer(in.VsphereVolume))
+ out.AzureDisk = (*AzureDiskVolumeSource)(unsafe.Pointer(in.AzureDisk))
+ out.PhotonPersistentDisk = (*PhotonPersistentDiskVolumeSource)(unsafe.Pointer(in.PhotonPersistentDisk))
+ out.Projected = (*ProjectedVolumeSource)(unsafe.Pointer(in.Projected))
+ out.PortworxVolume = (*PortworxVolumeSource)(unsafe.Pointer(in.PortworxVolume))
+ out.ScaleIO = (*ScaleIOVolumeSource)(unsafe.Pointer(in.ScaleIO))
+ out.StorageOS = (*StorageOSVolumeSource)(unsafe.Pointer(in.StorageOS))
+ return nil
+}
+
+// Convert_api_VolumeSource_To_v1_VolumeSource is an autogenerated conversion function.
+func Convert_api_VolumeSource_To_v1_VolumeSource(in *api.VolumeSource, out *VolumeSource, s conversion.Scope) error {
+ return autoConvert_api_VolumeSource_To_v1_VolumeSource(in, out, s)
+}
+
+func autoConvert_v1_VsphereVirtualDiskVolumeSource_To_api_VsphereVirtualDiskVolumeSource(in *VsphereVirtualDiskVolumeSource, out *api.VsphereVirtualDiskVolumeSource, s conversion.Scope) error {
+ out.VolumePath = in.VolumePath
+ out.FSType = in.FSType
+ out.StoragePolicyName = in.StoragePolicyName
+ out.StoragePolicyID = in.StoragePolicyID
+ return nil
+}
+
+// Convert_v1_VsphereVirtualDiskVolumeSource_To_api_VsphereVirtualDiskVolumeSource is an autogenerated conversion function.
+func Convert_v1_VsphereVirtualDiskVolumeSource_To_api_VsphereVirtualDiskVolumeSource(in *VsphereVirtualDiskVolumeSource, out *api.VsphereVirtualDiskVolumeSource, s conversion.Scope) error {
+ return autoConvert_v1_VsphereVirtualDiskVolumeSource_To_api_VsphereVirtualDiskVolumeSource(in, out, s)
+}
+
+func autoConvert_api_VsphereVirtualDiskVolumeSource_To_v1_VsphereVirtualDiskVolumeSource(in *api.VsphereVirtualDiskVolumeSource, out *VsphereVirtualDiskVolumeSource, s conversion.Scope) error {
+ out.VolumePath = in.VolumePath
+ out.FSType = in.FSType
+ out.StoragePolicyName = in.StoragePolicyName
+ out.StoragePolicyID = in.StoragePolicyID
+ return nil
+}
+
+// Convert_api_VsphereVirtualDiskVolumeSource_To_v1_VsphereVirtualDiskVolumeSource is an autogenerated conversion function.
+func Convert_api_VsphereVirtualDiskVolumeSource_To_v1_VsphereVirtualDiskVolumeSource(in *api.VsphereVirtualDiskVolumeSource, out *VsphereVirtualDiskVolumeSource, s conversion.Scope) error {
+ return autoConvert_api_VsphereVirtualDiskVolumeSource_To_v1_VsphereVirtualDiskVolumeSource(in, out, s)
+}
+
+func autoConvert_v1_WeightedPodAffinityTerm_To_api_WeightedPodAffinityTerm(in *WeightedPodAffinityTerm, out *api.WeightedPodAffinityTerm, s conversion.Scope) error {
+ out.Weight = in.Weight
+ if err := Convert_v1_PodAffinityTerm_To_api_PodAffinityTerm(&in.PodAffinityTerm, &out.PodAffinityTerm, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_WeightedPodAffinityTerm_To_api_WeightedPodAffinityTerm is an autogenerated conversion function.
+func Convert_v1_WeightedPodAffinityTerm_To_api_WeightedPodAffinityTerm(in *WeightedPodAffinityTerm, out *api.WeightedPodAffinityTerm, s conversion.Scope) error {
+ return autoConvert_v1_WeightedPodAffinityTerm_To_api_WeightedPodAffinityTerm(in, out, s)
+}
+
+func autoConvert_api_WeightedPodAffinityTerm_To_v1_WeightedPodAffinityTerm(in *api.WeightedPodAffinityTerm, out *WeightedPodAffinityTerm, s conversion.Scope) error {
+ out.Weight = in.Weight
+ if err := Convert_api_PodAffinityTerm_To_v1_PodAffinityTerm(&in.PodAffinityTerm, &out.PodAffinityTerm, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_api_WeightedPodAffinityTerm_To_v1_WeightedPodAffinityTerm is an autogenerated conversion function.
+func Convert_api_WeightedPodAffinityTerm_To_v1_WeightedPodAffinityTerm(in *api.WeightedPodAffinityTerm, out *WeightedPodAffinityTerm, s conversion.Scope) error {
+ return autoConvert_api_WeightedPodAffinityTerm_To_v1_WeightedPodAffinityTerm(in, out, s)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/api/v1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..18cd4311e
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/v1/zz_generated.deepcopy.go
@@ -0,0 +1,3775 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1
+
+import (
+ resource "k8s.io/apimachinery/pkg/api/resource"
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ types "k8s.io/apimachinery/pkg/types"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_AWSElasticBlockStoreVolumeSource, InType: reflect.TypeOf(&AWSElasticBlockStoreVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Affinity, InType: reflect.TypeOf(&Affinity{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_AttachedVolume, InType: reflect.TypeOf(&AttachedVolume{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_AvoidPods, InType: reflect.TypeOf(&AvoidPods{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_AzureDiskVolumeSource, InType: reflect.TypeOf(&AzureDiskVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_AzureFileVolumeSource, InType: reflect.TypeOf(&AzureFileVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Binding, InType: reflect.TypeOf(&Binding{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Capabilities, InType: reflect.TypeOf(&Capabilities{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_CephFSVolumeSource, InType: reflect.TypeOf(&CephFSVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_CinderVolumeSource, InType: reflect.TypeOf(&CinderVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ComponentCondition, InType: reflect.TypeOf(&ComponentCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ComponentStatus, InType: reflect.TypeOf(&ComponentStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ComponentStatusList, InType: reflect.TypeOf(&ComponentStatusList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ConfigMap, InType: reflect.TypeOf(&ConfigMap{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ConfigMapEnvSource, InType: reflect.TypeOf(&ConfigMapEnvSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ConfigMapKeySelector, InType: reflect.TypeOf(&ConfigMapKeySelector{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ConfigMapList, InType: reflect.TypeOf(&ConfigMapList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ConfigMapProjection, InType: reflect.TypeOf(&ConfigMapProjection{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ConfigMapVolumeSource, InType: reflect.TypeOf(&ConfigMapVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Container, InType: reflect.TypeOf(&Container{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ContainerImage, InType: reflect.TypeOf(&ContainerImage{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ContainerPort, InType: reflect.TypeOf(&ContainerPort{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ContainerState, InType: reflect.TypeOf(&ContainerState{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ContainerStateRunning, InType: reflect.TypeOf(&ContainerStateRunning{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ContainerStateTerminated, InType: reflect.TypeOf(&ContainerStateTerminated{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ContainerStateWaiting, InType: reflect.TypeOf(&ContainerStateWaiting{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ContainerStatus, InType: reflect.TypeOf(&ContainerStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_DaemonEndpoint, InType: reflect.TypeOf(&DaemonEndpoint{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_DeleteOptions, InType: reflect.TypeOf(&DeleteOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_DownwardAPIProjection, InType: reflect.TypeOf(&DownwardAPIProjection{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_DownwardAPIVolumeFile, InType: reflect.TypeOf(&DownwardAPIVolumeFile{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_DownwardAPIVolumeSource, InType: reflect.TypeOf(&DownwardAPIVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_EmptyDirVolumeSource, InType: reflect.TypeOf(&EmptyDirVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_EndpointAddress, InType: reflect.TypeOf(&EndpointAddress{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_EndpointPort, InType: reflect.TypeOf(&EndpointPort{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_EndpointSubset, InType: reflect.TypeOf(&EndpointSubset{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Endpoints, InType: reflect.TypeOf(&Endpoints{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_EndpointsList, InType: reflect.TypeOf(&EndpointsList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_EnvFromSource, InType: reflect.TypeOf(&EnvFromSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_EnvVar, InType: reflect.TypeOf(&EnvVar{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_EnvVarSource, InType: reflect.TypeOf(&EnvVarSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Event, InType: reflect.TypeOf(&Event{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_EventList, InType: reflect.TypeOf(&EventList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_EventSource, InType: reflect.TypeOf(&EventSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ExecAction, InType: reflect.TypeOf(&ExecAction{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_FCVolumeSource, InType: reflect.TypeOf(&FCVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_FlexVolumeSource, InType: reflect.TypeOf(&FlexVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_FlockerVolumeSource, InType: reflect.TypeOf(&FlockerVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_GCEPersistentDiskVolumeSource, InType: reflect.TypeOf(&GCEPersistentDiskVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_GitRepoVolumeSource, InType: reflect.TypeOf(&GitRepoVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_GlusterfsVolumeSource, InType: reflect.TypeOf(&GlusterfsVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HTTPGetAction, InType: reflect.TypeOf(&HTTPGetAction{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HTTPHeader, InType: reflect.TypeOf(&HTTPHeader{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Handler, InType: reflect.TypeOf(&Handler{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HostAlias, InType: reflect.TypeOf(&HostAlias{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HostPathVolumeSource, InType: reflect.TypeOf(&HostPathVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ISCSIVolumeSource, InType: reflect.TypeOf(&ISCSIVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_KeyToPath, InType: reflect.TypeOf(&KeyToPath{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Lifecycle, InType: reflect.TypeOf(&Lifecycle{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_LimitRange, InType: reflect.TypeOf(&LimitRange{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_LimitRangeItem, InType: reflect.TypeOf(&LimitRangeItem{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_LimitRangeList, InType: reflect.TypeOf(&LimitRangeList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_LimitRangeSpec, InType: reflect.TypeOf(&LimitRangeSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_List, InType: reflect.TypeOf(&List{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ListOptions, InType: reflect.TypeOf(&ListOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_LoadBalancerIngress, InType: reflect.TypeOf(&LoadBalancerIngress{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_LoadBalancerStatus, InType: reflect.TypeOf(&LoadBalancerStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_LocalObjectReference, InType: reflect.TypeOf(&LocalObjectReference{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_LocalVolumeSource, InType: reflect.TypeOf(&LocalVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NFSVolumeSource, InType: reflect.TypeOf(&NFSVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Namespace, InType: reflect.TypeOf(&Namespace{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NamespaceList, InType: reflect.TypeOf(&NamespaceList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NamespaceSpec, InType: reflect.TypeOf(&NamespaceSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NamespaceStatus, InType: reflect.TypeOf(&NamespaceStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Node, InType: reflect.TypeOf(&Node{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeAddress, InType: reflect.TypeOf(&NodeAddress{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeAffinity, InType: reflect.TypeOf(&NodeAffinity{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeCondition, InType: reflect.TypeOf(&NodeCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeDaemonEndpoints, InType: reflect.TypeOf(&NodeDaemonEndpoints{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeList, InType: reflect.TypeOf(&NodeList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeProxyOptions, InType: reflect.TypeOf(&NodeProxyOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeResources, InType: reflect.TypeOf(&NodeResources{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeSelector, InType: reflect.TypeOf(&NodeSelector{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeSelectorRequirement, InType: reflect.TypeOf(&NodeSelectorRequirement{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeSelectorTerm, InType: reflect.TypeOf(&NodeSelectorTerm{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeSpec, InType: reflect.TypeOf(&NodeSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeStatus, InType: reflect.TypeOf(&NodeStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NodeSystemInfo, InType: reflect.TypeOf(&NodeSystemInfo{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ObjectFieldSelector, InType: reflect.TypeOf(&ObjectFieldSelector{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ObjectMeta, InType: reflect.TypeOf(&ObjectMeta{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ObjectReference, InType: reflect.TypeOf(&ObjectReference{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolume, InType: reflect.TypeOf(&PersistentVolume{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeClaim, InType: reflect.TypeOf(&PersistentVolumeClaim{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeClaimList, InType: reflect.TypeOf(&PersistentVolumeClaimList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeClaimSpec, InType: reflect.TypeOf(&PersistentVolumeClaimSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeClaimStatus, InType: reflect.TypeOf(&PersistentVolumeClaimStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeClaimVolumeSource, InType: reflect.TypeOf(&PersistentVolumeClaimVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeList, InType: reflect.TypeOf(&PersistentVolumeList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeSource, InType: reflect.TypeOf(&PersistentVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeSpec, InType: reflect.TypeOf(&PersistentVolumeSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeStatus, InType: reflect.TypeOf(&PersistentVolumeStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PhotonPersistentDiskVolumeSource, InType: reflect.TypeOf(&PhotonPersistentDiskVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Pod, InType: reflect.TypeOf(&Pod{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodAffinity, InType: reflect.TypeOf(&PodAffinity{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodAffinityTerm, InType: reflect.TypeOf(&PodAffinityTerm{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodAntiAffinity, InType: reflect.TypeOf(&PodAntiAffinity{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodAttachOptions, InType: reflect.TypeOf(&PodAttachOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodCondition, InType: reflect.TypeOf(&PodCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodExecOptions, InType: reflect.TypeOf(&PodExecOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodList, InType: reflect.TypeOf(&PodList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodLogOptions, InType: reflect.TypeOf(&PodLogOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodPortForwardOptions, InType: reflect.TypeOf(&PodPortForwardOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodProxyOptions, InType: reflect.TypeOf(&PodProxyOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodSecurityContext, InType: reflect.TypeOf(&PodSecurityContext{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodSignature, InType: reflect.TypeOf(&PodSignature{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodSpec, InType: reflect.TypeOf(&PodSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodStatus, InType: reflect.TypeOf(&PodStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodStatusResult, InType: reflect.TypeOf(&PodStatusResult{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodTemplate, InType: reflect.TypeOf(&PodTemplate{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodTemplateList, InType: reflect.TypeOf(&PodTemplateList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodTemplateSpec, InType: reflect.TypeOf(&PodTemplateSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PortworxVolumeSource, InType: reflect.TypeOf(&PortworxVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Preconditions, InType: reflect.TypeOf(&Preconditions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PreferAvoidPodsEntry, InType: reflect.TypeOf(&PreferAvoidPodsEntry{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PreferredSchedulingTerm, InType: reflect.TypeOf(&PreferredSchedulingTerm{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Probe, InType: reflect.TypeOf(&Probe{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ProjectedVolumeSource, InType: reflect.TypeOf(&ProjectedVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_QuobyteVolumeSource, InType: reflect.TypeOf(&QuobyteVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_RBDVolumeSource, InType: reflect.TypeOf(&RBDVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_RangeAllocation, InType: reflect.TypeOf(&RangeAllocation{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ReplicationController, InType: reflect.TypeOf(&ReplicationController{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ReplicationControllerCondition, InType: reflect.TypeOf(&ReplicationControllerCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ReplicationControllerList, InType: reflect.TypeOf(&ReplicationControllerList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ReplicationControllerSpec, InType: reflect.TypeOf(&ReplicationControllerSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ReplicationControllerStatus, InType: reflect.TypeOf(&ReplicationControllerStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ResourceFieldSelector, InType: reflect.TypeOf(&ResourceFieldSelector{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ResourceQuota, InType: reflect.TypeOf(&ResourceQuota{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ResourceQuotaList, InType: reflect.TypeOf(&ResourceQuotaList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ResourceQuotaSpec, InType: reflect.TypeOf(&ResourceQuotaSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ResourceQuotaStatus, InType: reflect.TypeOf(&ResourceQuotaStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ResourceRequirements, InType: reflect.TypeOf(&ResourceRequirements{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SELinuxOptions, InType: reflect.TypeOf(&SELinuxOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ScaleIOVolumeSource, InType: reflect.TypeOf(&ScaleIOVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Secret, InType: reflect.TypeOf(&Secret{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SecretEnvSource, InType: reflect.TypeOf(&SecretEnvSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SecretKeySelector, InType: reflect.TypeOf(&SecretKeySelector{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SecretList, InType: reflect.TypeOf(&SecretList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SecretProjection, InType: reflect.TypeOf(&SecretProjection{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SecretVolumeSource, InType: reflect.TypeOf(&SecretVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SecurityContext, InType: reflect.TypeOf(&SecurityContext{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SerializedReference, InType: reflect.TypeOf(&SerializedReference{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Service, InType: reflect.TypeOf(&Service{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ServiceAccount, InType: reflect.TypeOf(&ServiceAccount{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ServiceAccountList, InType: reflect.TypeOf(&ServiceAccountList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ServiceList, InType: reflect.TypeOf(&ServiceList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ServicePort, InType: reflect.TypeOf(&ServicePort{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ServiceProxyOptions, InType: reflect.TypeOf(&ServiceProxyOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ServiceSpec, InType: reflect.TypeOf(&ServiceSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ServiceStatus, InType: reflect.TypeOf(&ServiceStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_StorageOSPersistentVolumeSource, InType: reflect.TypeOf(&StorageOSPersistentVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_StorageOSVolumeSource, InType: reflect.TypeOf(&StorageOSVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Sysctl, InType: reflect.TypeOf(&Sysctl{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_TCPSocketAction, InType: reflect.TypeOf(&TCPSocketAction{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Taint, InType: reflect.TypeOf(&Taint{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Toleration, InType: reflect.TypeOf(&Toleration{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Volume, InType: reflect.TypeOf(&Volume{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_VolumeMount, InType: reflect.TypeOf(&VolumeMount{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_VolumeProjection, InType: reflect.TypeOf(&VolumeProjection{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_VolumeSource, InType: reflect.TypeOf(&VolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_VsphereVirtualDiskVolumeSource, InType: reflect.TypeOf(&VsphereVirtualDiskVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_WeightedPodAffinityTerm, InType: reflect.TypeOf(&WeightedPodAffinityTerm{})},
+ )
+}
+
+// DeepCopy_v1_AWSElasticBlockStoreVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_AWSElasticBlockStoreVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*AWSElasticBlockStoreVolumeSource)
+ out := out.(*AWSElasticBlockStoreVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_Affinity is an autogenerated deepcopy function.
+func DeepCopy_v1_Affinity(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Affinity)
+ out := out.(*Affinity)
+ *out = *in
+ if in.NodeAffinity != nil {
+ in, out := &in.NodeAffinity, &out.NodeAffinity
+ *out = new(NodeAffinity)
+ if err := DeepCopy_v1_NodeAffinity(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.PodAffinity != nil {
+ in, out := &in.PodAffinity, &out.PodAffinity
+ *out = new(PodAffinity)
+ if err := DeepCopy_v1_PodAffinity(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.PodAntiAffinity != nil {
+ in, out := &in.PodAntiAffinity, &out.PodAntiAffinity
+ *out = new(PodAntiAffinity)
+ if err := DeepCopy_v1_PodAntiAffinity(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_AttachedVolume is an autogenerated deepcopy function.
+func DeepCopy_v1_AttachedVolume(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*AttachedVolume)
+ out := out.(*AttachedVolume)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_AvoidPods is an autogenerated deepcopy function.
+func DeepCopy_v1_AvoidPods(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*AvoidPods)
+ out := out.(*AvoidPods)
+ *out = *in
+ if in.PreferAvoidPods != nil {
+ in, out := &in.PreferAvoidPods, &out.PreferAvoidPods
+ *out = make([]PreferAvoidPodsEntry, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_PreferAvoidPodsEntry(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_AzureDiskVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_AzureDiskVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*AzureDiskVolumeSource)
+ out := out.(*AzureDiskVolumeSource)
+ *out = *in
+ if in.CachingMode != nil {
+ in, out := &in.CachingMode, &out.CachingMode
+ *out = new(AzureDataDiskCachingMode)
+ **out = **in
+ }
+ if in.FSType != nil {
+ in, out := &in.FSType, &out.FSType
+ *out = new(string)
+ **out = **in
+ }
+ if in.ReadOnly != nil {
+ in, out := &in.ReadOnly, &out.ReadOnly
+ *out = new(bool)
+ **out = **in
+ }
+ if in.Kind != nil {
+ in, out := &in.Kind, &out.Kind
+ *out = new(AzureDataDiskKind)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_AzureFileVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_AzureFileVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*AzureFileVolumeSource)
+ out := out.(*AzureFileVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_Binding is an autogenerated deepcopy function.
+func DeepCopy_v1_Binding(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Binding)
+ out := out.(*Binding)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_Capabilities is an autogenerated deepcopy function.
+func DeepCopy_v1_Capabilities(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Capabilities)
+ out := out.(*Capabilities)
+ *out = *in
+ if in.Add != nil {
+ in, out := &in.Add, &out.Add
+ *out = make([]Capability, len(*in))
+ copy(*out, *in)
+ }
+ if in.Drop != nil {
+ in, out := &in.Drop, &out.Drop
+ *out = make([]Capability, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_CephFSVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_CephFSVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CephFSVolumeSource)
+ out := out.(*CephFSVolumeSource)
+ *out = *in
+ if in.Monitors != nil {
+ in, out := &in.Monitors, &out.Monitors
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_CinderVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_CinderVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CinderVolumeSource)
+ out := out.(*CinderVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_ComponentCondition is an autogenerated deepcopy function.
+func DeepCopy_v1_ComponentCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ComponentCondition)
+ out := out.(*ComponentCondition)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_ComponentStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_ComponentStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ComponentStatus)
+ out := out.(*ComponentStatus)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]ComponentCondition, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ComponentStatusList is an autogenerated deepcopy function.
+func DeepCopy_v1_ComponentStatusList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ComponentStatusList)
+ out := out.(*ComponentStatusList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ComponentStatus, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_ComponentStatus(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ConfigMap is an autogenerated deepcopy function.
+func DeepCopy_v1_ConfigMap(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ConfigMap)
+ out := out.(*ConfigMap)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if in.Data != nil {
+ in, out := &in.Data, &out.Data
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ConfigMapEnvSource is an autogenerated deepcopy function.
+func DeepCopy_v1_ConfigMapEnvSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ConfigMapEnvSource)
+ out := out.(*ConfigMapEnvSource)
+ *out = *in
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ConfigMapKeySelector is an autogenerated deepcopy function.
+func DeepCopy_v1_ConfigMapKeySelector(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ConfigMapKeySelector)
+ out := out.(*ConfigMapKeySelector)
+ *out = *in
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ConfigMapList is an autogenerated deepcopy function.
+func DeepCopy_v1_ConfigMapList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ConfigMapList)
+ out := out.(*ConfigMapList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ConfigMap, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_ConfigMap(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ConfigMapProjection is an autogenerated deepcopy function.
+func DeepCopy_v1_ConfigMapProjection(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ConfigMapProjection)
+ out := out.(*ConfigMapProjection)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]KeyToPath, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_KeyToPath(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ConfigMapVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_ConfigMapVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ConfigMapVolumeSource)
+ out := out.(*ConfigMapVolumeSource)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]KeyToPath, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_KeyToPath(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.DefaultMode != nil {
+ in, out := &in.DefaultMode, &out.DefaultMode
+ *out = new(int32)
+ **out = **in
+ }
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_Container is an autogenerated deepcopy function.
+func DeepCopy_v1_Container(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Container)
+ out := out.(*Container)
+ *out = *in
+ if in.Command != nil {
+ in, out := &in.Command, &out.Command
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Args != nil {
+ in, out := &in.Args, &out.Args
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]ContainerPort, len(*in))
+ copy(*out, *in)
+ }
+ if in.EnvFrom != nil {
+ in, out := &in.EnvFrom, &out.EnvFrom
+ *out = make([]EnvFromSource, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_EnvFromSource(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Env != nil {
+ in, out := &in.Env, &out.Env
+ *out = make([]EnvVar, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_EnvVar(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if err := DeepCopy_v1_ResourceRequirements(&in.Resources, &out.Resources, c); err != nil {
+ return err
+ }
+ if in.VolumeMounts != nil {
+ in, out := &in.VolumeMounts, &out.VolumeMounts
+ *out = make([]VolumeMount, len(*in))
+ copy(*out, *in)
+ }
+ if in.LivenessProbe != nil {
+ in, out := &in.LivenessProbe, &out.LivenessProbe
+ *out = new(Probe)
+ if err := DeepCopy_v1_Probe(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.ReadinessProbe != nil {
+ in, out := &in.ReadinessProbe, &out.ReadinessProbe
+ *out = new(Probe)
+ if err := DeepCopy_v1_Probe(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Lifecycle != nil {
+ in, out := &in.Lifecycle, &out.Lifecycle
+ *out = new(Lifecycle)
+ if err := DeepCopy_v1_Lifecycle(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.SecurityContext != nil {
+ in, out := &in.SecurityContext, &out.SecurityContext
+ *out = new(SecurityContext)
+ if err := DeepCopy_v1_SecurityContext(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ContainerImage is an autogenerated deepcopy function.
+func DeepCopy_v1_ContainerImage(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ContainerImage)
+ out := out.(*ContainerImage)
+ *out = *in
+ if in.Names != nil {
+ in, out := &in.Names, &out.Names
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ContainerPort is an autogenerated deepcopy function.
+func DeepCopy_v1_ContainerPort(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ContainerPort)
+ out := out.(*ContainerPort)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_ContainerState is an autogenerated deepcopy function.
+func DeepCopy_v1_ContainerState(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ContainerState)
+ out := out.(*ContainerState)
+ *out = *in
+ if in.Waiting != nil {
+ in, out := &in.Waiting, &out.Waiting
+ *out = new(ContainerStateWaiting)
+ **out = **in
+ }
+ if in.Running != nil {
+ in, out := &in.Running, &out.Running
+ *out = new(ContainerStateRunning)
+ if err := DeepCopy_v1_ContainerStateRunning(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Terminated != nil {
+ in, out := &in.Terminated, &out.Terminated
+ *out = new(ContainerStateTerminated)
+ if err := DeepCopy_v1_ContainerStateTerminated(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ContainerStateRunning is an autogenerated deepcopy function.
+func DeepCopy_v1_ContainerStateRunning(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ContainerStateRunning)
+ out := out.(*ContainerStateRunning)
+ *out = *in
+ out.StartedAt = in.StartedAt.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_ContainerStateTerminated is an autogenerated deepcopy function.
+func DeepCopy_v1_ContainerStateTerminated(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ContainerStateTerminated)
+ out := out.(*ContainerStateTerminated)
+ *out = *in
+ out.StartedAt = in.StartedAt.DeepCopy()
+ out.FinishedAt = in.FinishedAt.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_ContainerStateWaiting is an autogenerated deepcopy function.
+func DeepCopy_v1_ContainerStateWaiting(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ContainerStateWaiting)
+ out := out.(*ContainerStateWaiting)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_ContainerStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_ContainerStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ContainerStatus)
+ out := out.(*ContainerStatus)
+ *out = *in
+ if err := DeepCopy_v1_ContainerState(&in.State, &out.State, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1_ContainerState(&in.LastTerminationState, &out.LastTerminationState, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_DaemonEndpoint is an autogenerated deepcopy function.
+func DeepCopy_v1_DaemonEndpoint(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DaemonEndpoint)
+ out := out.(*DaemonEndpoint)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_DeleteOptions is an autogenerated deepcopy function.
+func DeepCopy_v1_DeleteOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeleteOptions)
+ out := out.(*DeleteOptions)
+ *out = *in
+ if in.GracePeriodSeconds != nil {
+ in, out := &in.GracePeriodSeconds, &out.GracePeriodSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.Preconditions != nil {
+ in, out := &in.Preconditions, &out.Preconditions
+ *out = new(Preconditions)
+ if err := DeepCopy_v1_Preconditions(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.OrphanDependents != nil {
+ in, out := &in.OrphanDependents, &out.OrphanDependents
+ *out = new(bool)
+ **out = **in
+ }
+ if in.PropagationPolicy != nil {
+ in, out := &in.PropagationPolicy, &out.PropagationPolicy
+ *out = new(DeletionPropagation)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_DownwardAPIProjection is an autogenerated deepcopy function.
+func DeepCopy_v1_DownwardAPIProjection(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DownwardAPIProjection)
+ out := out.(*DownwardAPIProjection)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]DownwardAPIVolumeFile, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_DownwardAPIVolumeFile(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_DownwardAPIVolumeFile is an autogenerated deepcopy function.
+func DeepCopy_v1_DownwardAPIVolumeFile(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DownwardAPIVolumeFile)
+ out := out.(*DownwardAPIVolumeFile)
+ *out = *in
+ if in.FieldRef != nil {
+ in, out := &in.FieldRef, &out.FieldRef
+ *out = new(ObjectFieldSelector)
+ **out = **in
+ }
+ if in.ResourceFieldRef != nil {
+ in, out := &in.ResourceFieldRef, &out.ResourceFieldRef
+ *out = new(ResourceFieldSelector)
+ if err := DeepCopy_v1_ResourceFieldSelector(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Mode != nil {
+ in, out := &in.Mode, &out.Mode
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_DownwardAPIVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_DownwardAPIVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DownwardAPIVolumeSource)
+ out := out.(*DownwardAPIVolumeSource)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]DownwardAPIVolumeFile, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_DownwardAPIVolumeFile(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.DefaultMode != nil {
+ in, out := &in.DefaultMode, &out.DefaultMode
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_EmptyDirVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_EmptyDirVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EmptyDirVolumeSource)
+ out := out.(*EmptyDirVolumeSource)
+ *out = *in
+ if in.SizeLimit != nil {
+ in, out := &in.SizeLimit, &out.SizeLimit
+ *out = new(resource.Quantity)
+ **out = (*in).DeepCopy()
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_EndpointAddress is an autogenerated deepcopy function.
+func DeepCopy_v1_EndpointAddress(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EndpointAddress)
+ out := out.(*EndpointAddress)
+ *out = *in
+ if in.NodeName != nil {
+ in, out := &in.NodeName, &out.NodeName
+ *out = new(string)
+ **out = **in
+ }
+ if in.TargetRef != nil {
+ in, out := &in.TargetRef, &out.TargetRef
+ *out = new(ObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_EndpointPort is an autogenerated deepcopy function.
+func DeepCopy_v1_EndpointPort(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EndpointPort)
+ out := out.(*EndpointPort)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_EndpointSubset is an autogenerated deepcopy function.
+func DeepCopy_v1_EndpointSubset(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EndpointSubset)
+ out := out.(*EndpointSubset)
+ *out = *in
+ if in.Addresses != nil {
+ in, out := &in.Addresses, &out.Addresses
+ *out = make([]EndpointAddress, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_EndpointAddress(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.NotReadyAddresses != nil {
+ in, out := &in.NotReadyAddresses, &out.NotReadyAddresses
+ *out = make([]EndpointAddress, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_EndpointAddress(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]EndpointPort, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_Endpoints is an autogenerated deepcopy function.
+func DeepCopy_v1_Endpoints(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Endpoints)
+ out := out.(*Endpoints)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if in.Subsets != nil {
+ in, out := &in.Subsets, &out.Subsets
+ *out = make([]EndpointSubset, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_EndpointSubset(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_EndpointsList is an autogenerated deepcopy function.
+func DeepCopy_v1_EndpointsList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EndpointsList)
+ out := out.(*EndpointsList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Endpoints, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_Endpoints(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_EnvFromSource is an autogenerated deepcopy function.
+func DeepCopy_v1_EnvFromSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EnvFromSource)
+ out := out.(*EnvFromSource)
+ *out = *in
+ if in.ConfigMapRef != nil {
+ in, out := &in.ConfigMapRef, &out.ConfigMapRef
+ *out = new(ConfigMapEnvSource)
+ if err := DeepCopy_v1_ConfigMapEnvSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(SecretEnvSource)
+ if err := DeepCopy_v1_SecretEnvSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_EnvVar is an autogenerated deepcopy function.
+func DeepCopy_v1_EnvVar(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EnvVar)
+ out := out.(*EnvVar)
+ *out = *in
+ if in.ValueFrom != nil {
+ in, out := &in.ValueFrom, &out.ValueFrom
+ *out = new(EnvVarSource)
+ if err := DeepCopy_v1_EnvVarSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_EnvVarSource is an autogenerated deepcopy function.
+func DeepCopy_v1_EnvVarSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EnvVarSource)
+ out := out.(*EnvVarSource)
+ *out = *in
+ if in.FieldRef != nil {
+ in, out := &in.FieldRef, &out.FieldRef
+ *out = new(ObjectFieldSelector)
+ **out = **in
+ }
+ if in.ResourceFieldRef != nil {
+ in, out := &in.ResourceFieldRef, &out.ResourceFieldRef
+ *out = new(ResourceFieldSelector)
+ if err := DeepCopy_v1_ResourceFieldSelector(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.ConfigMapKeyRef != nil {
+ in, out := &in.ConfigMapKeyRef, &out.ConfigMapKeyRef
+ *out = new(ConfigMapKeySelector)
+ if err := DeepCopy_v1_ConfigMapKeySelector(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.SecretKeyRef != nil {
+ in, out := &in.SecretKeyRef, &out.SecretKeyRef
+ *out = new(SecretKeySelector)
+ if err := DeepCopy_v1_SecretKeySelector(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_Event is an autogenerated deepcopy function.
+func DeepCopy_v1_Event(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Event)
+ out := out.(*Event)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ out.FirstTimestamp = in.FirstTimestamp.DeepCopy()
+ out.LastTimestamp = in.LastTimestamp.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_EventList is an autogenerated deepcopy function.
+func DeepCopy_v1_EventList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EventList)
+ out := out.(*EventList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Event, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_Event(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_EventSource is an autogenerated deepcopy function.
+func DeepCopy_v1_EventSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EventSource)
+ out := out.(*EventSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_ExecAction is an autogenerated deepcopy function.
+func DeepCopy_v1_ExecAction(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ExecAction)
+ out := out.(*ExecAction)
+ *out = *in
+ if in.Command != nil {
+ in, out := &in.Command, &out.Command
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_FCVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_FCVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*FCVolumeSource)
+ out := out.(*FCVolumeSource)
+ *out = *in
+ if in.TargetWWNs != nil {
+ in, out := &in.TargetWWNs, &out.TargetWWNs
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Lun != nil {
+ in, out := &in.Lun, &out.Lun
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_FlexVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_FlexVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*FlexVolumeSource)
+ out := out.(*FlexVolumeSource)
+ *out = *in
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = **in
+ }
+ if in.Options != nil {
+ in, out := &in.Options, &out.Options
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_FlockerVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_FlockerVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*FlockerVolumeSource)
+ out := out.(*FlockerVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_GCEPersistentDiskVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_GCEPersistentDiskVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*GCEPersistentDiskVolumeSource)
+ out := out.(*GCEPersistentDiskVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_GitRepoVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_GitRepoVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*GitRepoVolumeSource)
+ out := out.(*GitRepoVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_GlusterfsVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_GlusterfsVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*GlusterfsVolumeSource)
+ out := out.(*GlusterfsVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_HTTPGetAction is an autogenerated deepcopy function.
+func DeepCopy_v1_HTTPGetAction(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HTTPGetAction)
+ out := out.(*HTTPGetAction)
+ *out = *in
+ if in.HTTPHeaders != nil {
+ in, out := &in.HTTPHeaders, &out.HTTPHeaders
+ *out = make([]HTTPHeader, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_HTTPHeader is an autogenerated deepcopy function.
+func DeepCopy_v1_HTTPHeader(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HTTPHeader)
+ out := out.(*HTTPHeader)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_Handler is an autogenerated deepcopy function.
+func DeepCopy_v1_Handler(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Handler)
+ out := out.(*Handler)
+ *out = *in
+ if in.Exec != nil {
+ in, out := &in.Exec, &out.Exec
+ *out = new(ExecAction)
+ if err := DeepCopy_v1_ExecAction(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.HTTPGet != nil {
+ in, out := &in.HTTPGet, &out.HTTPGet
+ *out = new(HTTPGetAction)
+ if err := DeepCopy_v1_HTTPGetAction(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.TCPSocket != nil {
+ in, out := &in.TCPSocket, &out.TCPSocket
+ *out = new(TCPSocketAction)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_HostAlias is an autogenerated deepcopy function.
+func DeepCopy_v1_HostAlias(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HostAlias)
+ out := out.(*HostAlias)
+ *out = *in
+ if in.Hostnames != nil {
+ in, out := &in.Hostnames, &out.Hostnames
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_HostPathVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_HostPathVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HostPathVolumeSource)
+ out := out.(*HostPathVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_ISCSIVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_ISCSIVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ISCSIVolumeSource)
+ out := out.(*ISCSIVolumeSource)
+ *out = *in
+ if in.Portals != nil {
+ in, out := &in.Portals, &out.Portals
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_KeyToPath is an autogenerated deepcopy function.
+func DeepCopy_v1_KeyToPath(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*KeyToPath)
+ out := out.(*KeyToPath)
+ *out = *in
+ if in.Mode != nil {
+ in, out := &in.Mode, &out.Mode
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_Lifecycle is an autogenerated deepcopy function.
+func DeepCopy_v1_Lifecycle(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Lifecycle)
+ out := out.(*Lifecycle)
+ *out = *in
+ if in.PostStart != nil {
+ in, out := &in.PostStart, &out.PostStart
+ *out = new(Handler)
+ if err := DeepCopy_v1_Handler(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.PreStop != nil {
+ in, out := &in.PreStop, &out.PreStop
+ *out = new(Handler)
+ if err := DeepCopy_v1_Handler(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_LimitRange is an autogenerated deepcopy function.
+func DeepCopy_v1_LimitRange(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LimitRange)
+ out := out.(*LimitRange)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_LimitRangeSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_LimitRangeItem is an autogenerated deepcopy function.
+func DeepCopy_v1_LimitRangeItem(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LimitRangeItem)
+ out := out.(*LimitRangeItem)
+ *out = *in
+ if in.Max != nil {
+ in, out := &in.Max, &out.Max
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Min != nil {
+ in, out := &in.Min, &out.Min
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Default != nil {
+ in, out := &in.Default, &out.Default
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.DefaultRequest != nil {
+ in, out := &in.DefaultRequest, &out.DefaultRequest
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.MaxLimitRequestRatio != nil {
+ in, out := &in.MaxLimitRequestRatio, &out.MaxLimitRequestRatio
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_LimitRangeList is an autogenerated deepcopy function.
+func DeepCopy_v1_LimitRangeList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LimitRangeList)
+ out := out.(*LimitRangeList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]LimitRange, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_LimitRange(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_LimitRangeSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_LimitRangeSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LimitRangeSpec)
+ out := out.(*LimitRangeSpec)
+ *out = *in
+ if in.Limits != nil {
+ in, out := &in.Limits, &out.Limits
+ *out = make([]LimitRangeItem, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_LimitRangeItem(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_List is an autogenerated deepcopy function.
+func DeepCopy_v1_List(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*List)
+ out := out.(*List)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]runtime.RawExtension, len(*in))
+ for i := range *in {
+ if newVal, err := c.DeepCopy(&(*in)[i]); err != nil {
+ return err
+ } else {
+ (*out)[i] = *newVal.(*runtime.RawExtension)
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ListOptions is an autogenerated deepcopy function.
+func DeepCopy_v1_ListOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ListOptions)
+ out := out.(*ListOptions)
+ *out = *in
+ if in.TimeoutSeconds != nil {
+ in, out := &in.TimeoutSeconds, &out.TimeoutSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_LoadBalancerIngress is an autogenerated deepcopy function.
+func DeepCopy_v1_LoadBalancerIngress(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LoadBalancerIngress)
+ out := out.(*LoadBalancerIngress)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_LoadBalancerStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_LoadBalancerStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LoadBalancerStatus)
+ out := out.(*LoadBalancerStatus)
+ *out = *in
+ if in.Ingress != nil {
+ in, out := &in.Ingress, &out.Ingress
+ *out = make([]LoadBalancerIngress, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_LocalObjectReference is an autogenerated deepcopy function.
+func DeepCopy_v1_LocalObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LocalObjectReference)
+ out := out.(*LocalObjectReference)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_LocalVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_LocalVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LocalVolumeSource)
+ out := out.(*LocalVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_NFSVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_NFSVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NFSVolumeSource)
+ out := out.(*NFSVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_Namespace is an autogenerated deepcopy function.
+func DeepCopy_v1_Namespace(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Namespace)
+ out := out.(*Namespace)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_NamespaceSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NamespaceList is an autogenerated deepcopy function.
+func DeepCopy_v1_NamespaceList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NamespaceList)
+ out := out.(*NamespaceList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Namespace, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_Namespace(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NamespaceSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_NamespaceSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NamespaceSpec)
+ out := out.(*NamespaceSpec)
+ *out = *in
+ if in.Finalizers != nil {
+ in, out := &in.Finalizers, &out.Finalizers
+ *out = make([]FinalizerName, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NamespaceStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_NamespaceStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NamespaceStatus)
+ out := out.(*NamespaceStatus)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_Node is an autogenerated deepcopy function.
+func DeepCopy_v1_Node(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Node)
+ out := out.(*Node)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_NodeSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1_NodeStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NodeAddress is an autogenerated deepcopy function.
+func DeepCopy_v1_NodeAddress(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeAddress)
+ out := out.(*NodeAddress)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_NodeAffinity is an autogenerated deepcopy function.
+func DeepCopy_v1_NodeAffinity(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeAffinity)
+ out := out.(*NodeAffinity)
+ *out = *in
+ if in.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution
+ *out = new(NodeSelector)
+ if err := DeepCopy_v1_NodeSelector(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.PreferredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution
+ *out = make([]PreferredSchedulingTerm, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_PreferredSchedulingTerm(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NodeCondition is an autogenerated deepcopy function.
+func DeepCopy_v1_NodeCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeCondition)
+ out := out.(*NodeCondition)
+ *out = *in
+ out.LastHeartbeatTime = in.LastHeartbeatTime.DeepCopy()
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_NodeDaemonEndpoints is an autogenerated deepcopy function.
+func DeepCopy_v1_NodeDaemonEndpoints(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeDaemonEndpoints)
+ out := out.(*NodeDaemonEndpoints)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_NodeList is an autogenerated deepcopy function.
+func DeepCopy_v1_NodeList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeList)
+ out := out.(*NodeList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Node, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_Node(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NodeProxyOptions is an autogenerated deepcopy function.
+func DeepCopy_v1_NodeProxyOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeProxyOptions)
+ out := out.(*NodeProxyOptions)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_NodeResources is an autogenerated deepcopy function.
+func DeepCopy_v1_NodeResources(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeResources)
+ out := out.(*NodeResources)
+ *out = *in
+ if in.Capacity != nil {
+ in, out := &in.Capacity, &out.Capacity
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NodeSelector is an autogenerated deepcopy function.
+func DeepCopy_v1_NodeSelector(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeSelector)
+ out := out.(*NodeSelector)
+ *out = *in
+ if in.NodeSelectorTerms != nil {
+ in, out := &in.NodeSelectorTerms, &out.NodeSelectorTerms
+ *out = make([]NodeSelectorTerm, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_NodeSelectorTerm(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NodeSelectorRequirement is an autogenerated deepcopy function.
+func DeepCopy_v1_NodeSelectorRequirement(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeSelectorRequirement)
+ out := out.(*NodeSelectorRequirement)
+ *out = *in
+ if in.Values != nil {
+ in, out := &in.Values, &out.Values
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NodeSelectorTerm is an autogenerated deepcopy function.
+func DeepCopy_v1_NodeSelectorTerm(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeSelectorTerm)
+ out := out.(*NodeSelectorTerm)
+ *out = *in
+ if in.MatchExpressions != nil {
+ in, out := &in.MatchExpressions, &out.MatchExpressions
+ *out = make([]NodeSelectorRequirement, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_NodeSelectorRequirement(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NodeSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_NodeSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeSpec)
+ out := out.(*NodeSpec)
+ *out = *in
+ if in.Taints != nil {
+ in, out := &in.Taints, &out.Taints
+ *out = make([]Taint, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_Taint(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NodeStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_NodeStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeStatus)
+ out := out.(*NodeStatus)
+ *out = *in
+ if in.Capacity != nil {
+ in, out := &in.Capacity, &out.Capacity
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Allocatable != nil {
+ in, out := &in.Allocatable, &out.Allocatable
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]NodeCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_NodeCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Addresses != nil {
+ in, out := &in.Addresses, &out.Addresses
+ *out = make([]NodeAddress, len(*in))
+ copy(*out, *in)
+ }
+ if in.Images != nil {
+ in, out := &in.Images, &out.Images
+ *out = make([]ContainerImage, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_ContainerImage(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.VolumesInUse != nil {
+ in, out := &in.VolumesInUse, &out.VolumesInUse
+ *out = make([]UniqueVolumeName, len(*in))
+ copy(*out, *in)
+ }
+ if in.VolumesAttached != nil {
+ in, out := &in.VolumesAttached, &out.VolumesAttached
+ *out = make([]AttachedVolume, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NodeSystemInfo is an autogenerated deepcopy function.
+func DeepCopy_v1_NodeSystemInfo(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeSystemInfo)
+ out := out.(*NodeSystemInfo)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_ObjectFieldSelector is an autogenerated deepcopy function.
+func DeepCopy_v1_ObjectFieldSelector(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ObjectFieldSelector)
+ out := out.(*ObjectFieldSelector)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_ObjectMeta is an autogenerated deepcopy function.
+func DeepCopy_v1_ObjectMeta(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ObjectMeta)
+ out := out.(*ObjectMeta)
+ *out = *in
+ out.CreationTimestamp = in.CreationTimestamp.DeepCopy()
+ if in.DeletionTimestamp != nil {
+ in, out := &in.DeletionTimestamp, &out.DeletionTimestamp
+ *out = new(meta_v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ if in.DeletionGracePeriodSeconds != nil {
+ in, out := &in.DeletionGracePeriodSeconds, &out.DeletionGracePeriodSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.Labels != nil {
+ in, out := &in.Labels, &out.Labels
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ if in.Annotations != nil {
+ in, out := &in.Annotations, &out.Annotations
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ if in.OwnerReferences != nil {
+ in, out := &in.OwnerReferences, &out.OwnerReferences
+ *out = make([]meta_v1.OwnerReference, len(*in))
+ for i := range *in {
+ if newVal, err := c.DeepCopy(&(*in)[i]); err != nil {
+ return err
+ } else {
+ (*out)[i] = *newVal.(*meta_v1.OwnerReference)
+ }
+ }
+ }
+ if in.Initializers != nil {
+ in, out := &in.Initializers, &out.Initializers
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*meta_v1.Initializers)
+ }
+ }
+ if in.Finalizers != nil {
+ in, out := &in.Finalizers, &out.Finalizers
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ObjectReference is an autogenerated deepcopy function.
+func DeepCopy_v1_ObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ObjectReference)
+ out := out.(*ObjectReference)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_PersistentVolume is an autogenerated deepcopy function.
+func DeepCopy_v1_PersistentVolume(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolume)
+ out := out.(*PersistentVolume)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_PersistentVolumeSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PersistentVolumeClaim is an autogenerated deepcopy function.
+func DeepCopy_v1_PersistentVolumeClaim(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeClaim)
+ out := out.(*PersistentVolumeClaim)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_PersistentVolumeClaimSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1_PersistentVolumeClaimStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PersistentVolumeClaimList is an autogenerated deepcopy function.
+func DeepCopy_v1_PersistentVolumeClaimList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeClaimList)
+ out := out.(*PersistentVolumeClaimList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PersistentVolumeClaim, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_PersistentVolumeClaim(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PersistentVolumeClaimSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_PersistentVolumeClaimSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeClaimSpec)
+ out := out.(*PersistentVolumeClaimSpec)
+ *out = *in
+ if in.AccessModes != nil {
+ in, out := &in.AccessModes, &out.AccessModes
+ *out = make([]PersistentVolumeAccessMode, len(*in))
+ copy(*out, *in)
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*meta_v1.LabelSelector)
+ }
+ }
+ if err := DeepCopy_v1_ResourceRequirements(&in.Resources, &out.Resources, c); err != nil {
+ return err
+ }
+ if in.StorageClassName != nil {
+ in, out := &in.StorageClassName, &out.StorageClassName
+ *out = new(string)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PersistentVolumeClaimStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_PersistentVolumeClaimStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeClaimStatus)
+ out := out.(*PersistentVolumeClaimStatus)
+ *out = *in
+ if in.AccessModes != nil {
+ in, out := &in.AccessModes, &out.AccessModes
+ *out = make([]PersistentVolumeAccessMode, len(*in))
+ copy(*out, *in)
+ }
+ if in.Capacity != nil {
+ in, out := &in.Capacity, &out.Capacity
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PersistentVolumeClaimVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_PersistentVolumeClaimVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeClaimVolumeSource)
+ out := out.(*PersistentVolumeClaimVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_PersistentVolumeList is an autogenerated deepcopy function.
+func DeepCopy_v1_PersistentVolumeList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeList)
+ out := out.(*PersistentVolumeList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PersistentVolume, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_PersistentVolume(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PersistentVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_PersistentVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeSource)
+ out := out.(*PersistentVolumeSource)
+ *out = *in
+ if in.GCEPersistentDisk != nil {
+ in, out := &in.GCEPersistentDisk, &out.GCEPersistentDisk
+ *out = new(GCEPersistentDiskVolumeSource)
+ **out = **in
+ }
+ if in.AWSElasticBlockStore != nil {
+ in, out := &in.AWSElasticBlockStore, &out.AWSElasticBlockStore
+ *out = new(AWSElasticBlockStoreVolumeSource)
+ **out = **in
+ }
+ if in.HostPath != nil {
+ in, out := &in.HostPath, &out.HostPath
+ *out = new(HostPathVolumeSource)
+ **out = **in
+ }
+ if in.Glusterfs != nil {
+ in, out := &in.Glusterfs, &out.Glusterfs
+ *out = new(GlusterfsVolumeSource)
+ **out = **in
+ }
+ if in.NFS != nil {
+ in, out := &in.NFS, &out.NFS
+ *out = new(NFSVolumeSource)
+ **out = **in
+ }
+ if in.RBD != nil {
+ in, out := &in.RBD, &out.RBD
+ *out = new(RBDVolumeSource)
+ if err := DeepCopy_v1_RBDVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.ISCSI != nil {
+ in, out := &in.ISCSI, &out.ISCSI
+ *out = new(ISCSIVolumeSource)
+ if err := DeepCopy_v1_ISCSIVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Cinder != nil {
+ in, out := &in.Cinder, &out.Cinder
+ *out = new(CinderVolumeSource)
+ **out = **in
+ }
+ if in.CephFS != nil {
+ in, out := &in.CephFS, &out.CephFS
+ *out = new(CephFSVolumeSource)
+ if err := DeepCopy_v1_CephFSVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.FC != nil {
+ in, out := &in.FC, &out.FC
+ *out = new(FCVolumeSource)
+ if err := DeepCopy_v1_FCVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Flocker != nil {
+ in, out := &in.Flocker, &out.Flocker
+ *out = new(FlockerVolumeSource)
+ **out = **in
+ }
+ if in.FlexVolume != nil {
+ in, out := &in.FlexVolume, &out.FlexVolume
+ *out = new(FlexVolumeSource)
+ if err := DeepCopy_v1_FlexVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.AzureFile != nil {
+ in, out := &in.AzureFile, &out.AzureFile
+ *out = new(AzureFileVolumeSource)
+ **out = **in
+ }
+ if in.VsphereVolume != nil {
+ in, out := &in.VsphereVolume, &out.VsphereVolume
+ *out = new(VsphereVirtualDiskVolumeSource)
+ **out = **in
+ }
+ if in.Quobyte != nil {
+ in, out := &in.Quobyte, &out.Quobyte
+ *out = new(QuobyteVolumeSource)
+ **out = **in
+ }
+ if in.AzureDisk != nil {
+ in, out := &in.AzureDisk, &out.AzureDisk
+ *out = new(AzureDiskVolumeSource)
+ if err := DeepCopy_v1_AzureDiskVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.PhotonPersistentDisk != nil {
+ in, out := &in.PhotonPersistentDisk, &out.PhotonPersistentDisk
+ *out = new(PhotonPersistentDiskVolumeSource)
+ **out = **in
+ }
+ if in.PortworxVolume != nil {
+ in, out := &in.PortworxVolume, &out.PortworxVolume
+ *out = new(PortworxVolumeSource)
+ **out = **in
+ }
+ if in.ScaleIO != nil {
+ in, out := &in.ScaleIO, &out.ScaleIO
+ *out = new(ScaleIOVolumeSource)
+ if err := DeepCopy_v1_ScaleIOVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Local != nil {
+ in, out := &in.Local, &out.Local
+ *out = new(LocalVolumeSource)
+ **out = **in
+ }
+ if in.StorageOS != nil {
+ in, out := &in.StorageOS, &out.StorageOS
+ *out = new(StorageOSPersistentVolumeSource)
+ if err := DeepCopy_v1_StorageOSPersistentVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PersistentVolumeSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_PersistentVolumeSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeSpec)
+ out := out.(*PersistentVolumeSpec)
+ *out = *in
+ if in.Capacity != nil {
+ in, out := &in.Capacity, &out.Capacity
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if err := DeepCopy_v1_PersistentVolumeSource(&in.PersistentVolumeSource, &out.PersistentVolumeSource, c); err != nil {
+ return err
+ }
+ if in.AccessModes != nil {
+ in, out := &in.AccessModes, &out.AccessModes
+ *out = make([]PersistentVolumeAccessMode, len(*in))
+ copy(*out, *in)
+ }
+ if in.ClaimRef != nil {
+ in, out := &in.ClaimRef, &out.ClaimRef
+ *out = new(ObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PersistentVolumeStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_PersistentVolumeStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeStatus)
+ out := out.(*PersistentVolumeStatus)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_PhotonPersistentDiskVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_PhotonPersistentDiskVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PhotonPersistentDiskVolumeSource)
+ out := out.(*PhotonPersistentDiskVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_Pod is an autogenerated deepcopy function.
+func DeepCopy_v1_Pod(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Pod)
+ out := out.(*Pod)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_PodSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1_PodStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodAffinity is an autogenerated deepcopy function.
+func DeepCopy_v1_PodAffinity(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodAffinity)
+ out := out.(*PodAffinity)
+ *out = *in
+ if in.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution
+ *out = make([]PodAffinityTerm, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_PodAffinityTerm(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.PreferredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution
+ *out = make([]WeightedPodAffinityTerm, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_WeightedPodAffinityTerm(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodAffinityTerm is an autogenerated deepcopy function.
+func DeepCopy_v1_PodAffinityTerm(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodAffinityTerm)
+ out := out.(*PodAffinityTerm)
+ *out = *in
+ if in.LabelSelector != nil {
+ in, out := &in.LabelSelector, &out.LabelSelector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*meta_v1.LabelSelector)
+ }
+ }
+ if in.Namespaces != nil {
+ in, out := &in.Namespaces, &out.Namespaces
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodAntiAffinity is an autogenerated deepcopy function.
+func DeepCopy_v1_PodAntiAffinity(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodAntiAffinity)
+ out := out.(*PodAntiAffinity)
+ *out = *in
+ if in.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution
+ *out = make([]PodAffinityTerm, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_PodAffinityTerm(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.PreferredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution
+ *out = make([]WeightedPodAffinityTerm, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_WeightedPodAffinityTerm(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodAttachOptions is an autogenerated deepcopy function.
+func DeepCopy_v1_PodAttachOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodAttachOptions)
+ out := out.(*PodAttachOptions)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodCondition is an autogenerated deepcopy function.
+func DeepCopy_v1_PodCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodCondition)
+ out := out.(*PodCondition)
+ *out = *in
+ out.LastProbeTime = in.LastProbeTime.DeepCopy()
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodExecOptions is an autogenerated deepcopy function.
+func DeepCopy_v1_PodExecOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodExecOptions)
+ out := out.(*PodExecOptions)
+ *out = *in
+ if in.Command != nil {
+ in, out := &in.Command, &out.Command
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodList is an autogenerated deepcopy function.
+func DeepCopy_v1_PodList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodList)
+ out := out.(*PodList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Pod, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_Pod(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodLogOptions is an autogenerated deepcopy function.
+func DeepCopy_v1_PodLogOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodLogOptions)
+ out := out.(*PodLogOptions)
+ *out = *in
+ if in.SinceSeconds != nil {
+ in, out := &in.SinceSeconds, &out.SinceSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.SinceTime != nil {
+ in, out := &in.SinceTime, &out.SinceTime
+ *out = new(meta_v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ if in.TailLines != nil {
+ in, out := &in.TailLines, &out.TailLines
+ *out = new(int64)
+ **out = **in
+ }
+ if in.LimitBytes != nil {
+ in, out := &in.LimitBytes, &out.LimitBytes
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodPortForwardOptions is an autogenerated deepcopy function.
+func DeepCopy_v1_PodPortForwardOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodPortForwardOptions)
+ out := out.(*PodPortForwardOptions)
+ *out = *in
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]int32, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodProxyOptions is an autogenerated deepcopy function.
+func DeepCopy_v1_PodProxyOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodProxyOptions)
+ out := out.(*PodProxyOptions)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodSecurityContext is an autogenerated deepcopy function.
+func DeepCopy_v1_PodSecurityContext(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodSecurityContext)
+ out := out.(*PodSecurityContext)
+ *out = *in
+ if in.SELinuxOptions != nil {
+ in, out := &in.SELinuxOptions, &out.SELinuxOptions
+ *out = new(SELinuxOptions)
+ **out = **in
+ }
+ if in.RunAsUser != nil {
+ in, out := &in.RunAsUser, &out.RunAsUser
+ *out = new(int64)
+ **out = **in
+ }
+ if in.RunAsNonRoot != nil {
+ in, out := &in.RunAsNonRoot, &out.RunAsNonRoot
+ *out = new(bool)
+ **out = **in
+ }
+ if in.SupplementalGroups != nil {
+ in, out := &in.SupplementalGroups, &out.SupplementalGroups
+ *out = make([]int64, len(*in))
+ copy(*out, *in)
+ }
+ if in.FSGroup != nil {
+ in, out := &in.FSGroup, &out.FSGroup
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodSignature is an autogenerated deepcopy function.
+func DeepCopy_v1_PodSignature(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodSignature)
+ out := out.(*PodSignature)
+ *out = *in
+ if in.PodController != nil {
+ in, out := &in.PodController, &out.PodController
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*meta_v1.OwnerReference)
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_PodSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodSpec)
+ out := out.(*PodSpec)
+ *out = *in
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]Volume, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_Volume(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.InitContainers != nil {
+ in, out := &in.InitContainers, &out.InitContainers
+ *out = make([]Container, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_Container(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Containers != nil {
+ in, out := &in.Containers, &out.Containers
+ *out = make([]Container, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_Container(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.TerminationGracePeriodSeconds != nil {
+ in, out := &in.TerminationGracePeriodSeconds, &out.TerminationGracePeriodSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.ActiveDeadlineSeconds != nil {
+ in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.NodeSelector != nil {
+ in, out := &in.NodeSelector, &out.NodeSelector
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ if in.AutomountServiceAccountToken != nil {
+ in, out := &in.AutomountServiceAccountToken, &out.AutomountServiceAccountToken
+ *out = new(bool)
+ **out = **in
+ }
+ if in.SecurityContext != nil {
+ in, out := &in.SecurityContext, &out.SecurityContext
+ *out = new(PodSecurityContext)
+ if err := DeepCopy_v1_PodSecurityContext(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.ImagePullSecrets != nil {
+ in, out := &in.ImagePullSecrets, &out.ImagePullSecrets
+ *out = make([]LocalObjectReference, len(*in))
+ copy(*out, *in)
+ }
+ if in.Affinity != nil {
+ in, out := &in.Affinity, &out.Affinity
+ *out = new(Affinity)
+ if err := DeepCopy_v1_Affinity(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Tolerations != nil {
+ in, out := &in.Tolerations, &out.Tolerations
+ *out = make([]Toleration, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_Toleration(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.HostAliases != nil {
+ in, out := &in.HostAliases, &out.HostAliases
+ *out = make([]HostAlias, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_HostAlias(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_PodStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodStatus)
+ out := out.(*PodStatus)
+ *out = *in
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]PodCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_PodCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.StartTime != nil {
+ in, out := &in.StartTime, &out.StartTime
+ *out = new(meta_v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ if in.InitContainerStatuses != nil {
+ in, out := &in.InitContainerStatuses, &out.InitContainerStatuses
+ *out = make([]ContainerStatus, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_ContainerStatus(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.ContainerStatuses != nil {
+ in, out := &in.ContainerStatuses, &out.ContainerStatuses
+ *out = make([]ContainerStatus, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_ContainerStatus(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodStatusResult is an autogenerated deepcopy function.
+func DeepCopy_v1_PodStatusResult(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodStatusResult)
+ out := out.(*PodStatusResult)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_PodStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodTemplate is an autogenerated deepcopy function.
+func DeepCopy_v1_PodTemplate(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodTemplate)
+ out := out.(*PodTemplate)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodTemplateList is an autogenerated deepcopy function.
+func DeepCopy_v1_PodTemplateList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodTemplateList)
+ out := out.(*PodTemplateList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodTemplate, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_PodTemplate(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodTemplateSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_PodTemplateSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodTemplateSpec)
+ out := out.(*PodTemplateSpec)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_PodSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PortworxVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_PortworxVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PortworxVolumeSource)
+ out := out.(*PortworxVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_Preconditions is an autogenerated deepcopy function.
+func DeepCopy_v1_Preconditions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Preconditions)
+ out := out.(*Preconditions)
+ *out = *in
+ if in.UID != nil {
+ in, out := &in.UID, &out.UID
+ *out = new(types.UID)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_PreferAvoidPodsEntry is an autogenerated deepcopy function.
+func DeepCopy_v1_PreferAvoidPodsEntry(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PreferAvoidPodsEntry)
+ out := out.(*PreferAvoidPodsEntry)
+ *out = *in
+ if err := DeepCopy_v1_PodSignature(&in.PodSignature, &out.PodSignature, c); err != nil {
+ return err
+ }
+ out.EvictionTime = in.EvictionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_PreferredSchedulingTerm is an autogenerated deepcopy function.
+func DeepCopy_v1_PreferredSchedulingTerm(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PreferredSchedulingTerm)
+ out := out.(*PreferredSchedulingTerm)
+ *out = *in
+ if err := DeepCopy_v1_NodeSelectorTerm(&in.Preference, &out.Preference, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_Probe is an autogenerated deepcopy function.
+func DeepCopy_v1_Probe(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Probe)
+ out := out.(*Probe)
+ *out = *in
+ if err := DeepCopy_v1_Handler(&in.Handler, &out.Handler, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ProjectedVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_ProjectedVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ProjectedVolumeSource)
+ out := out.(*ProjectedVolumeSource)
+ *out = *in
+ if in.Sources != nil {
+ in, out := &in.Sources, &out.Sources
+ *out = make([]VolumeProjection, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_VolumeProjection(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.DefaultMode != nil {
+ in, out := &in.DefaultMode, &out.DefaultMode
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_QuobyteVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_QuobyteVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*QuobyteVolumeSource)
+ out := out.(*QuobyteVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_RBDVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_RBDVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RBDVolumeSource)
+ out := out.(*RBDVolumeSource)
+ *out = *in
+ if in.CephMonitors != nil {
+ in, out := &in.CephMonitors, &out.CephMonitors
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_RangeAllocation is an autogenerated deepcopy function.
+func DeepCopy_v1_RangeAllocation(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RangeAllocation)
+ out := out.(*RangeAllocation)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if in.Data != nil {
+ in, out := &in.Data, &out.Data
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ReplicationController is an autogenerated deepcopy function.
+func DeepCopy_v1_ReplicationController(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicationController)
+ out := out.(*ReplicationController)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_ReplicationControllerSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1_ReplicationControllerStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ReplicationControllerCondition is an autogenerated deepcopy function.
+func DeepCopy_v1_ReplicationControllerCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicationControllerCondition)
+ out := out.(*ReplicationControllerCondition)
+ *out = *in
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_ReplicationControllerList is an autogenerated deepcopy function.
+func DeepCopy_v1_ReplicationControllerList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicationControllerList)
+ out := out.(*ReplicationControllerList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ReplicationController, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_ReplicationController(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ReplicationControllerSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_ReplicationControllerSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicationControllerSpec)
+ out := out.(*ReplicationControllerSpec)
+ *out = *in
+ if in.Replicas != nil {
+ in, out := &in.Replicas, &out.Replicas
+ *out = new(int32)
+ **out = **in
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ if in.Template != nil {
+ in, out := &in.Template, &out.Template
+ *out = new(PodTemplateSpec)
+ if err := DeepCopy_v1_PodTemplateSpec(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ReplicationControllerStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_ReplicationControllerStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicationControllerStatus)
+ out := out.(*ReplicationControllerStatus)
+ *out = *in
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]ReplicationControllerCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_ReplicationControllerCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ResourceFieldSelector is an autogenerated deepcopy function.
+func DeepCopy_v1_ResourceFieldSelector(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceFieldSelector)
+ out := out.(*ResourceFieldSelector)
+ *out = *in
+ out.Divisor = in.Divisor.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_ResourceQuota is an autogenerated deepcopy function.
+func DeepCopy_v1_ResourceQuota(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceQuota)
+ out := out.(*ResourceQuota)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_ResourceQuotaSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1_ResourceQuotaStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ResourceQuotaList is an autogenerated deepcopy function.
+func DeepCopy_v1_ResourceQuotaList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceQuotaList)
+ out := out.(*ResourceQuotaList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ResourceQuota, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_ResourceQuota(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ResourceQuotaSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_ResourceQuotaSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceQuotaSpec)
+ out := out.(*ResourceQuotaSpec)
+ *out = *in
+ if in.Hard != nil {
+ in, out := &in.Hard, &out.Hard
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Scopes != nil {
+ in, out := &in.Scopes, &out.Scopes
+ *out = make([]ResourceQuotaScope, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ResourceQuotaStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_ResourceQuotaStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceQuotaStatus)
+ out := out.(*ResourceQuotaStatus)
+ *out = *in
+ if in.Hard != nil {
+ in, out := &in.Hard, &out.Hard
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Used != nil {
+ in, out := &in.Used, &out.Used
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ResourceRequirements is an autogenerated deepcopy function.
+func DeepCopy_v1_ResourceRequirements(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceRequirements)
+ out := out.(*ResourceRequirements)
+ *out = *in
+ if in.Limits != nil {
+ in, out := &in.Limits, &out.Limits
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Requests != nil {
+ in, out := &in.Requests, &out.Requests
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_SELinuxOptions is an autogenerated deepcopy function.
+func DeepCopy_v1_SELinuxOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SELinuxOptions)
+ out := out.(*SELinuxOptions)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_ScaleIOVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_ScaleIOVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ScaleIOVolumeSource)
+ out := out.(*ScaleIOVolumeSource)
+ *out = *in
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_Secret is an autogenerated deepcopy function.
+func DeepCopy_v1_Secret(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Secret)
+ out := out.(*Secret)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if in.Data != nil {
+ in, out := &in.Data, &out.Data
+ *out = make(map[string][]byte)
+ for key, val := range *in {
+ if newVal, err := c.DeepCopy(&val); err != nil {
+ return err
+ } else {
+ (*out)[key] = *newVal.(*[]byte)
+ }
+ }
+ }
+ if in.StringData != nil {
+ in, out := &in.StringData, &out.StringData
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_SecretEnvSource is an autogenerated deepcopy function.
+func DeepCopy_v1_SecretEnvSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SecretEnvSource)
+ out := out.(*SecretEnvSource)
+ *out = *in
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_SecretKeySelector is an autogenerated deepcopy function.
+func DeepCopy_v1_SecretKeySelector(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SecretKeySelector)
+ out := out.(*SecretKeySelector)
+ *out = *in
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_SecretList is an autogenerated deepcopy function.
+func DeepCopy_v1_SecretList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SecretList)
+ out := out.(*SecretList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Secret, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_Secret(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_SecretProjection is an autogenerated deepcopy function.
+func DeepCopy_v1_SecretProjection(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SecretProjection)
+ out := out.(*SecretProjection)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]KeyToPath, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_KeyToPath(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_SecretVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_SecretVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SecretVolumeSource)
+ out := out.(*SecretVolumeSource)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]KeyToPath, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_KeyToPath(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.DefaultMode != nil {
+ in, out := &in.DefaultMode, &out.DefaultMode
+ *out = new(int32)
+ **out = **in
+ }
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_SecurityContext is an autogenerated deepcopy function.
+func DeepCopy_v1_SecurityContext(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SecurityContext)
+ out := out.(*SecurityContext)
+ *out = *in
+ if in.Capabilities != nil {
+ in, out := &in.Capabilities, &out.Capabilities
+ *out = new(Capabilities)
+ if err := DeepCopy_v1_Capabilities(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Privileged != nil {
+ in, out := &in.Privileged, &out.Privileged
+ *out = new(bool)
+ **out = **in
+ }
+ if in.SELinuxOptions != nil {
+ in, out := &in.SELinuxOptions, &out.SELinuxOptions
+ *out = new(SELinuxOptions)
+ **out = **in
+ }
+ if in.RunAsUser != nil {
+ in, out := &in.RunAsUser, &out.RunAsUser
+ *out = new(int64)
+ **out = **in
+ }
+ if in.RunAsNonRoot != nil {
+ in, out := &in.RunAsNonRoot, &out.RunAsNonRoot
+ *out = new(bool)
+ **out = **in
+ }
+ if in.ReadOnlyRootFilesystem != nil {
+ in, out := &in.ReadOnlyRootFilesystem, &out.ReadOnlyRootFilesystem
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_SerializedReference is an autogenerated deepcopy function.
+func DeepCopy_v1_SerializedReference(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SerializedReference)
+ out := out.(*SerializedReference)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_Service is an autogenerated deepcopy function.
+func DeepCopy_v1_Service(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Service)
+ out := out.(*Service)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_ServiceSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1_ServiceStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ServiceAccount is an autogenerated deepcopy function.
+func DeepCopy_v1_ServiceAccount(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServiceAccount)
+ out := out.(*ServiceAccount)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if in.Secrets != nil {
+ in, out := &in.Secrets, &out.Secrets
+ *out = make([]ObjectReference, len(*in))
+ copy(*out, *in)
+ }
+ if in.ImagePullSecrets != nil {
+ in, out := &in.ImagePullSecrets, &out.ImagePullSecrets
+ *out = make([]LocalObjectReference, len(*in))
+ copy(*out, *in)
+ }
+ if in.AutomountServiceAccountToken != nil {
+ in, out := &in.AutomountServiceAccountToken, &out.AutomountServiceAccountToken
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ServiceAccountList is an autogenerated deepcopy function.
+func DeepCopy_v1_ServiceAccountList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServiceAccountList)
+ out := out.(*ServiceAccountList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ServiceAccount, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_ServiceAccount(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ServiceList is an autogenerated deepcopy function.
+func DeepCopy_v1_ServiceList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServiceList)
+ out := out.(*ServiceList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Service, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_Service(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ServicePort is an autogenerated deepcopy function.
+func DeepCopy_v1_ServicePort(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServicePort)
+ out := out.(*ServicePort)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_ServiceProxyOptions is an autogenerated deepcopy function.
+func DeepCopy_v1_ServiceProxyOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServiceProxyOptions)
+ out := out.(*ServiceProxyOptions)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_ServiceSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_ServiceSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServiceSpec)
+ out := out.(*ServiceSpec)
+ *out = *in
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]ServicePort, len(*in))
+ copy(*out, *in)
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ if in.ExternalIPs != nil {
+ in, out := &in.ExternalIPs, &out.ExternalIPs
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.LoadBalancerSourceRanges != nil {
+ in, out := &in.LoadBalancerSourceRanges, &out.LoadBalancerSourceRanges
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ServiceStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_ServiceStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServiceStatus)
+ out := out.(*ServiceStatus)
+ *out = *in
+ if err := DeepCopy_v1_LoadBalancerStatus(&in.LoadBalancer, &out.LoadBalancer, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_StorageOSPersistentVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_StorageOSPersistentVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StorageOSPersistentVolumeSource)
+ out := out.(*StorageOSPersistentVolumeSource)
+ *out = *in
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(ObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_StorageOSVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_StorageOSVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StorageOSVolumeSource)
+ out := out.(*StorageOSVolumeSource)
+ *out = *in
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_Sysctl is an autogenerated deepcopy function.
+func DeepCopy_v1_Sysctl(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Sysctl)
+ out := out.(*Sysctl)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_TCPSocketAction is an autogenerated deepcopy function.
+func DeepCopy_v1_TCPSocketAction(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*TCPSocketAction)
+ out := out.(*TCPSocketAction)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_Taint is an autogenerated deepcopy function.
+func DeepCopy_v1_Taint(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Taint)
+ out := out.(*Taint)
+ *out = *in
+ out.TimeAdded = in.TimeAdded.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_Toleration is an autogenerated deepcopy function.
+func DeepCopy_v1_Toleration(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Toleration)
+ out := out.(*Toleration)
+ *out = *in
+ if in.TolerationSeconds != nil {
+ in, out := &in.TolerationSeconds, &out.TolerationSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_Volume is an autogenerated deepcopy function.
+func DeepCopy_v1_Volume(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Volume)
+ out := out.(*Volume)
+ *out = *in
+ if err := DeepCopy_v1_VolumeSource(&in.VolumeSource, &out.VolumeSource, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_VolumeMount is an autogenerated deepcopy function.
+func DeepCopy_v1_VolumeMount(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*VolumeMount)
+ out := out.(*VolumeMount)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_VolumeProjection is an autogenerated deepcopy function.
+func DeepCopy_v1_VolumeProjection(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*VolumeProjection)
+ out := out.(*VolumeProjection)
+ *out = *in
+ if in.Secret != nil {
+ in, out := &in.Secret, &out.Secret
+ *out = new(SecretProjection)
+ if err := DeepCopy_v1_SecretProjection(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.DownwardAPI != nil {
+ in, out := &in.DownwardAPI, &out.DownwardAPI
+ *out = new(DownwardAPIProjection)
+ if err := DeepCopy_v1_DownwardAPIProjection(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.ConfigMap != nil {
+ in, out := &in.ConfigMap, &out.ConfigMap
+ *out = new(ConfigMapProjection)
+ if err := DeepCopy_v1_ConfigMapProjection(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_VolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_VolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*VolumeSource)
+ out := out.(*VolumeSource)
+ *out = *in
+ if in.HostPath != nil {
+ in, out := &in.HostPath, &out.HostPath
+ *out = new(HostPathVolumeSource)
+ **out = **in
+ }
+ if in.EmptyDir != nil {
+ in, out := &in.EmptyDir, &out.EmptyDir
+ *out = new(EmptyDirVolumeSource)
+ if err := DeepCopy_v1_EmptyDirVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.GCEPersistentDisk != nil {
+ in, out := &in.GCEPersistentDisk, &out.GCEPersistentDisk
+ *out = new(GCEPersistentDiskVolumeSource)
+ **out = **in
+ }
+ if in.AWSElasticBlockStore != nil {
+ in, out := &in.AWSElasticBlockStore, &out.AWSElasticBlockStore
+ *out = new(AWSElasticBlockStoreVolumeSource)
+ **out = **in
+ }
+ if in.GitRepo != nil {
+ in, out := &in.GitRepo, &out.GitRepo
+ *out = new(GitRepoVolumeSource)
+ **out = **in
+ }
+ if in.Secret != nil {
+ in, out := &in.Secret, &out.Secret
+ *out = new(SecretVolumeSource)
+ if err := DeepCopy_v1_SecretVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.NFS != nil {
+ in, out := &in.NFS, &out.NFS
+ *out = new(NFSVolumeSource)
+ **out = **in
+ }
+ if in.ISCSI != nil {
+ in, out := &in.ISCSI, &out.ISCSI
+ *out = new(ISCSIVolumeSource)
+ if err := DeepCopy_v1_ISCSIVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Glusterfs != nil {
+ in, out := &in.Glusterfs, &out.Glusterfs
+ *out = new(GlusterfsVolumeSource)
+ **out = **in
+ }
+ if in.PersistentVolumeClaim != nil {
+ in, out := &in.PersistentVolumeClaim, &out.PersistentVolumeClaim
+ *out = new(PersistentVolumeClaimVolumeSource)
+ **out = **in
+ }
+ if in.RBD != nil {
+ in, out := &in.RBD, &out.RBD
+ *out = new(RBDVolumeSource)
+ if err := DeepCopy_v1_RBDVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.FlexVolume != nil {
+ in, out := &in.FlexVolume, &out.FlexVolume
+ *out = new(FlexVolumeSource)
+ if err := DeepCopy_v1_FlexVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Cinder != nil {
+ in, out := &in.Cinder, &out.Cinder
+ *out = new(CinderVolumeSource)
+ **out = **in
+ }
+ if in.CephFS != nil {
+ in, out := &in.CephFS, &out.CephFS
+ *out = new(CephFSVolumeSource)
+ if err := DeepCopy_v1_CephFSVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Flocker != nil {
+ in, out := &in.Flocker, &out.Flocker
+ *out = new(FlockerVolumeSource)
+ **out = **in
+ }
+ if in.DownwardAPI != nil {
+ in, out := &in.DownwardAPI, &out.DownwardAPI
+ *out = new(DownwardAPIVolumeSource)
+ if err := DeepCopy_v1_DownwardAPIVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.FC != nil {
+ in, out := &in.FC, &out.FC
+ *out = new(FCVolumeSource)
+ if err := DeepCopy_v1_FCVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.AzureFile != nil {
+ in, out := &in.AzureFile, &out.AzureFile
+ *out = new(AzureFileVolumeSource)
+ **out = **in
+ }
+ if in.ConfigMap != nil {
+ in, out := &in.ConfigMap, &out.ConfigMap
+ *out = new(ConfigMapVolumeSource)
+ if err := DeepCopy_v1_ConfigMapVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.VsphereVolume != nil {
+ in, out := &in.VsphereVolume, &out.VsphereVolume
+ *out = new(VsphereVirtualDiskVolumeSource)
+ **out = **in
+ }
+ if in.Quobyte != nil {
+ in, out := &in.Quobyte, &out.Quobyte
+ *out = new(QuobyteVolumeSource)
+ **out = **in
+ }
+ if in.AzureDisk != nil {
+ in, out := &in.AzureDisk, &out.AzureDisk
+ *out = new(AzureDiskVolumeSource)
+ if err := DeepCopy_v1_AzureDiskVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.PhotonPersistentDisk != nil {
+ in, out := &in.PhotonPersistentDisk, &out.PhotonPersistentDisk
+ *out = new(PhotonPersistentDiskVolumeSource)
+ **out = **in
+ }
+ if in.Projected != nil {
+ in, out := &in.Projected, &out.Projected
+ *out = new(ProjectedVolumeSource)
+ if err := DeepCopy_v1_ProjectedVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.PortworxVolume != nil {
+ in, out := &in.PortworxVolume, &out.PortworxVolume
+ *out = new(PortworxVolumeSource)
+ **out = **in
+ }
+ if in.ScaleIO != nil {
+ in, out := &in.ScaleIO, &out.ScaleIO
+ *out = new(ScaleIOVolumeSource)
+ if err := DeepCopy_v1_ScaleIOVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.StorageOS != nil {
+ in, out := &in.StorageOS, &out.StorageOS
+ *out = new(StorageOSVolumeSource)
+ if err := DeepCopy_v1_StorageOSVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_VsphereVirtualDiskVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_v1_VsphereVirtualDiskVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*VsphereVirtualDiskVolumeSource)
+ out := out.(*VsphereVirtualDiskVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_WeightedPodAffinityTerm is an autogenerated deepcopy function.
+func DeepCopy_v1_WeightedPodAffinityTerm(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*WeightedPodAffinityTerm)
+ out := out.(*WeightedPodAffinityTerm)
+ *out = *in
+ if err := DeepCopy_v1_PodAffinityTerm(&in.PodAffinityTerm, &out.PodAffinityTerm, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/api/v1/zz_generated.defaults.go
new file mode 100644
index 000000000..31e795066
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/v1/zz_generated.defaults.go
@@ -0,0 +1,631 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ scheme.AddTypeDefaultingFunc(&ConfigMap{}, func(obj interface{}) { SetObjectDefaults_ConfigMap(obj.(*ConfigMap)) })
+ scheme.AddTypeDefaultingFunc(&ConfigMapList{}, func(obj interface{}) { SetObjectDefaults_ConfigMapList(obj.(*ConfigMapList)) })
+ scheme.AddTypeDefaultingFunc(&Endpoints{}, func(obj interface{}) { SetObjectDefaults_Endpoints(obj.(*Endpoints)) })
+ scheme.AddTypeDefaultingFunc(&EndpointsList{}, func(obj interface{}) { SetObjectDefaults_EndpointsList(obj.(*EndpointsList)) })
+ scheme.AddTypeDefaultingFunc(&LimitRange{}, func(obj interface{}) { SetObjectDefaults_LimitRange(obj.(*LimitRange)) })
+ scheme.AddTypeDefaultingFunc(&LimitRangeList{}, func(obj interface{}) { SetObjectDefaults_LimitRangeList(obj.(*LimitRangeList)) })
+ scheme.AddTypeDefaultingFunc(&Namespace{}, func(obj interface{}) { SetObjectDefaults_Namespace(obj.(*Namespace)) })
+ scheme.AddTypeDefaultingFunc(&NamespaceList{}, func(obj interface{}) { SetObjectDefaults_NamespaceList(obj.(*NamespaceList)) })
+ scheme.AddTypeDefaultingFunc(&Node{}, func(obj interface{}) { SetObjectDefaults_Node(obj.(*Node)) })
+ scheme.AddTypeDefaultingFunc(&NodeList{}, func(obj interface{}) { SetObjectDefaults_NodeList(obj.(*NodeList)) })
+ scheme.AddTypeDefaultingFunc(&PersistentVolume{}, func(obj interface{}) { SetObjectDefaults_PersistentVolume(obj.(*PersistentVolume)) })
+ scheme.AddTypeDefaultingFunc(&PersistentVolumeClaim{}, func(obj interface{}) { SetObjectDefaults_PersistentVolumeClaim(obj.(*PersistentVolumeClaim)) })
+ scheme.AddTypeDefaultingFunc(&PersistentVolumeClaimList{}, func(obj interface{}) { SetObjectDefaults_PersistentVolumeClaimList(obj.(*PersistentVolumeClaimList)) })
+ scheme.AddTypeDefaultingFunc(&PersistentVolumeList{}, func(obj interface{}) { SetObjectDefaults_PersistentVolumeList(obj.(*PersistentVolumeList)) })
+ scheme.AddTypeDefaultingFunc(&Pod{}, func(obj interface{}) { SetObjectDefaults_Pod(obj.(*Pod)) })
+ scheme.AddTypeDefaultingFunc(&PodAttachOptions{}, func(obj interface{}) { SetObjectDefaults_PodAttachOptions(obj.(*PodAttachOptions)) })
+ scheme.AddTypeDefaultingFunc(&PodExecOptions{}, func(obj interface{}) { SetObjectDefaults_PodExecOptions(obj.(*PodExecOptions)) })
+ scheme.AddTypeDefaultingFunc(&PodList{}, func(obj interface{}) { SetObjectDefaults_PodList(obj.(*PodList)) })
+ scheme.AddTypeDefaultingFunc(&PodTemplate{}, func(obj interface{}) { SetObjectDefaults_PodTemplate(obj.(*PodTemplate)) })
+ scheme.AddTypeDefaultingFunc(&PodTemplateList{}, func(obj interface{}) { SetObjectDefaults_PodTemplateList(obj.(*PodTemplateList)) })
+ scheme.AddTypeDefaultingFunc(&ReplicationController{}, func(obj interface{}) { SetObjectDefaults_ReplicationController(obj.(*ReplicationController)) })
+ scheme.AddTypeDefaultingFunc(&ReplicationControllerList{}, func(obj interface{}) { SetObjectDefaults_ReplicationControllerList(obj.(*ReplicationControllerList)) })
+ scheme.AddTypeDefaultingFunc(&ResourceQuota{}, func(obj interface{}) { SetObjectDefaults_ResourceQuota(obj.(*ResourceQuota)) })
+ scheme.AddTypeDefaultingFunc(&ResourceQuotaList{}, func(obj interface{}) { SetObjectDefaults_ResourceQuotaList(obj.(*ResourceQuotaList)) })
+ scheme.AddTypeDefaultingFunc(&Secret{}, func(obj interface{}) { SetObjectDefaults_Secret(obj.(*Secret)) })
+ scheme.AddTypeDefaultingFunc(&SecretList{}, func(obj interface{}) { SetObjectDefaults_SecretList(obj.(*SecretList)) })
+ scheme.AddTypeDefaultingFunc(&Service{}, func(obj interface{}) { SetObjectDefaults_Service(obj.(*Service)) })
+ scheme.AddTypeDefaultingFunc(&ServiceList{}, func(obj interface{}) { SetObjectDefaults_ServiceList(obj.(*ServiceList)) })
+ return nil
+}
+
+func SetObjectDefaults_ConfigMap(in *ConfigMap) {
+ SetDefaults_ConfigMap(in)
+}
+
+func SetObjectDefaults_ConfigMapList(in *ConfigMapList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_ConfigMap(a)
+ }
+}
+
+func SetObjectDefaults_Endpoints(in *Endpoints) {
+ SetDefaults_Endpoints(in)
+}
+
+func SetObjectDefaults_EndpointsList(in *EndpointsList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_Endpoints(a)
+ }
+}
+
+func SetObjectDefaults_LimitRange(in *LimitRange) {
+ for i := range in.Spec.Limits {
+ a := &in.Spec.Limits[i]
+ SetDefaults_LimitRangeItem(a)
+ SetDefaults_ResourceList(&a.Max)
+ SetDefaults_ResourceList(&a.Min)
+ SetDefaults_ResourceList(&a.Default)
+ SetDefaults_ResourceList(&a.DefaultRequest)
+ SetDefaults_ResourceList(&a.MaxLimitRequestRatio)
+ }
+}
+
+func SetObjectDefaults_LimitRangeList(in *LimitRangeList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_LimitRange(a)
+ }
+}
+
+func SetObjectDefaults_Namespace(in *Namespace) {
+ SetDefaults_NamespaceStatus(&in.Status)
+}
+
+func SetObjectDefaults_NamespaceList(in *NamespaceList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_Namespace(a)
+ }
+}
+
+func SetObjectDefaults_Node(in *Node) {
+ SetDefaults_Node(in)
+ SetDefaults_NodeStatus(&in.Status)
+ SetDefaults_ResourceList(&in.Status.Capacity)
+ SetDefaults_ResourceList(&in.Status.Allocatable)
+}
+
+func SetObjectDefaults_NodeList(in *NodeList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_Node(a)
+ }
+}
+
+func SetObjectDefaults_PersistentVolume(in *PersistentVolume) {
+ SetDefaults_PersistentVolume(in)
+ SetDefaults_ResourceList(&in.Spec.Capacity)
+ if in.Spec.PersistentVolumeSource.RBD != nil {
+ SetDefaults_RBDVolumeSource(in.Spec.PersistentVolumeSource.RBD)
+ }
+ if in.Spec.PersistentVolumeSource.ISCSI != nil {
+ SetDefaults_ISCSIVolumeSource(in.Spec.PersistentVolumeSource.ISCSI)
+ }
+ if in.Spec.PersistentVolumeSource.AzureDisk != nil {
+ SetDefaults_AzureDiskVolumeSource(in.Spec.PersistentVolumeSource.AzureDisk)
+ }
+ if in.Spec.PersistentVolumeSource.ScaleIO != nil {
+ SetDefaults_ScaleIOVolumeSource(in.Spec.PersistentVolumeSource.ScaleIO)
+ }
+}
+
+func SetObjectDefaults_PersistentVolumeClaim(in *PersistentVolumeClaim) {
+ SetDefaults_PersistentVolumeClaim(in)
+ SetDefaults_ResourceList(&in.Spec.Resources.Limits)
+ SetDefaults_ResourceList(&in.Spec.Resources.Requests)
+ SetDefaults_ResourceList(&in.Status.Capacity)
+}
+
+func SetObjectDefaults_PersistentVolumeClaimList(in *PersistentVolumeClaimList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_PersistentVolumeClaim(a)
+ }
+}
+
+func SetObjectDefaults_PersistentVolumeList(in *PersistentVolumeList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_PersistentVolume(a)
+ }
+}
+
+func SetObjectDefaults_Pod(in *Pod) {
+ SetDefaults_Pod(in)
+ SetDefaults_PodSpec(&in.Spec)
+ for i := range in.Spec.Volumes {
+ a := &in.Spec.Volumes[i]
+ SetDefaults_Volume(a)
+ if a.VolumeSource.Secret != nil {
+ SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
+ }
+ if a.VolumeSource.ISCSI != nil {
+ SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
+ }
+ if a.VolumeSource.RBD != nil {
+ SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
+ }
+ if a.VolumeSource.DownwardAPI != nil {
+ SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
+ for j := range a.VolumeSource.DownwardAPI.Items {
+ b := &a.VolumeSource.DownwardAPI.Items[j]
+ if b.FieldRef != nil {
+ SetDefaults_ObjectFieldSelector(b.FieldRef)
+ }
+ }
+ }
+ if a.VolumeSource.ConfigMap != nil {
+ SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
+ }
+ if a.VolumeSource.AzureDisk != nil {
+ SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
+ }
+ if a.VolumeSource.Projected != nil {
+ SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
+ for j := range a.VolumeSource.Projected.Sources {
+ b := &a.VolumeSource.Projected.Sources[j]
+ if b.DownwardAPI != nil {
+ for k := range b.DownwardAPI.Items {
+ c := &b.DownwardAPI.Items[k]
+ if c.FieldRef != nil {
+ SetDefaults_ObjectFieldSelector(c.FieldRef)
+ }
+ }
+ }
+ }
+ }
+ if a.VolumeSource.ScaleIO != nil {
+ SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO)
+ }
+ }
+ for i := range in.Spec.InitContainers {
+ a := &in.Spec.InitContainers[i]
+ SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ SetDefaults_ResourceList(&a.Resources.Limits)
+ SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+ for i := range in.Spec.Containers {
+ a := &in.Spec.Containers[i]
+ SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ SetDefaults_ResourceList(&a.Resources.Limits)
+ SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+}
+
+func SetObjectDefaults_PodAttachOptions(in *PodAttachOptions) {
+ SetDefaults_PodAttachOptions(in)
+}
+
+func SetObjectDefaults_PodExecOptions(in *PodExecOptions) {
+ SetDefaults_PodExecOptions(in)
+}
+
+func SetObjectDefaults_PodList(in *PodList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_Pod(a)
+ }
+}
+
+func SetObjectDefaults_PodTemplate(in *PodTemplate) {
+ SetDefaults_PodSpec(&in.Template.Spec)
+ for i := range in.Template.Spec.Volumes {
+ a := &in.Template.Spec.Volumes[i]
+ SetDefaults_Volume(a)
+ if a.VolumeSource.Secret != nil {
+ SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
+ }
+ if a.VolumeSource.ISCSI != nil {
+ SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
+ }
+ if a.VolumeSource.RBD != nil {
+ SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
+ }
+ if a.VolumeSource.DownwardAPI != nil {
+ SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
+ for j := range a.VolumeSource.DownwardAPI.Items {
+ b := &a.VolumeSource.DownwardAPI.Items[j]
+ if b.FieldRef != nil {
+ SetDefaults_ObjectFieldSelector(b.FieldRef)
+ }
+ }
+ }
+ if a.VolumeSource.ConfigMap != nil {
+ SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
+ }
+ if a.VolumeSource.AzureDisk != nil {
+ SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
+ }
+ if a.VolumeSource.Projected != nil {
+ SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
+ for j := range a.VolumeSource.Projected.Sources {
+ b := &a.VolumeSource.Projected.Sources[j]
+ if b.DownwardAPI != nil {
+ for k := range b.DownwardAPI.Items {
+ c := &b.DownwardAPI.Items[k]
+ if c.FieldRef != nil {
+ SetDefaults_ObjectFieldSelector(c.FieldRef)
+ }
+ }
+ }
+ }
+ }
+ if a.VolumeSource.ScaleIO != nil {
+ SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO)
+ }
+ }
+ for i := range in.Template.Spec.InitContainers {
+ a := &in.Template.Spec.InitContainers[i]
+ SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ SetDefaults_ResourceList(&a.Resources.Limits)
+ SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+ for i := range in.Template.Spec.Containers {
+ a := &in.Template.Spec.Containers[i]
+ SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ SetDefaults_ResourceList(&a.Resources.Limits)
+ SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+}
+
+func SetObjectDefaults_PodTemplateList(in *PodTemplateList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_PodTemplate(a)
+ }
+}
+
+func SetObjectDefaults_ReplicationController(in *ReplicationController) {
+ SetDefaults_ReplicationController(in)
+ if in.Spec.Template != nil {
+ SetDefaults_PodSpec(&in.Spec.Template.Spec)
+ for i := range in.Spec.Template.Spec.Volumes {
+ a := &in.Spec.Template.Spec.Volumes[i]
+ SetDefaults_Volume(a)
+ if a.VolumeSource.Secret != nil {
+ SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
+ }
+ if a.VolumeSource.ISCSI != nil {
+ SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
+ }
+ if a.VolumeSource.RBD != nil {
+ SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
+ }
+ if a.VolumeSource.DownwardAPI != nil {
+ SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
+ for j := range a.VolumeSource.DownwardAPI.Items {
+ b := &a.VolumeSource.DownwardAPI.Items[j]
+ if b.FieldRef != nil {
+ SetDefaults_ObjectFieldSelector(b.FieldRef)
+ }
+ }
+ }
+ if a.VolumeSource.ConfigMap != nil {
+ SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
+ }
+ if a.VolumeSource.AzureDisk != nil {
+ SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
+ }
+ if a.VolumeSource.Projected != nil {
+ SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
+ for j := range a.VolumeSource.Projected.Sources {
+ b := &a.VolumeSource.Projected.Sources[j]
+ if b.DownwardAPI != nil {
+ for k := range b.DownwardAPI.Items {
+ c := &b.DownwardAPI.Items[k]
+ if c.FieldRef != nil {
+ SetDefaults_ObjectFieldSelector(c.FieldRef)
+ }
+ }
+ }
+ }
+ }
+ if a.VolumeSource.ScaleIO != nil {
+ SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO)
+ }
+ }
+ for i := range in.Spec.Template.Spec.InitContainers {
+ a := &in.Spec.Template.Spec.InitContainers[i]
+ SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ SetDefaults_ResourceList(&a.Resources.Limits)
+ SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+ for i := range in.Spec.Template.Spec.Containers {
+ a := &in.Spec.Template.Spec.Containers[i]
+ SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ SetDefaults_ResourceList(&a.Resources.Limits)
+ SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+ }
+}
+
+func SetObjectDefaults_ReplicationControllerList(in *ReplicationControllerList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_ReplicationController(a)
+ }
+}
+
+func SetObjectDefaults_ResourceQuota(in *ResourceQuota) {
+ SetDefaults_ResourceList(&in.Spec.Hard)
+ SetDefaults_ResourceList(&in.Status.Hard)
+ SetDefaults_ResourceList(&in.Status.Used)
+}
+
+func SetObjectDefaults_ResourceQuotaList(in *ResourceQuotaList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_ResourceQuota(a)
+ }
+}
+
+func SetObjectDefaults_Secret(in *Secret) {
+ SetDefaults_Secret(in)
+}
+
+func SetObjectDefaults_SecretList(in *SecretList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_Secret(a)
+ }
+}
+
+func SetObjectDefaults_Service(in *Service) {
+ SetDefaults_Service(in)
+}
+
+func SetObjectDefaults_ServiceList(in *ServiceList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_Service(a)
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/api/validation/doc.go b/vendor/k8s.io/kubernetes/pkg/api/validation/doc.go
new file mode 100644
index 000000000..30f541de3
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/validation/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package validation has functions for validating the correctness of api
+// objects and explaining what is wrong with them when they aren't valid.
+package validation // import "k8s.io/kubernetes/pkg/api/validation"
diff --git a/vendor/k8s.io/kubernetes/pkg/api/validation/events.go b/vendor/k8s.io/kubernetes/pkg/api/validation/events.go
new file mode 100644
index 000000000..a255f58e2
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/validation/events.go
@@ -0,0 +1,80 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package validation
+
+import (
+ "fmt"
+
+ "k8s.io/apimachinery/pkg/api/meta"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/util/validation"
+ "k8s.io/apimachinery/pkg/util/validation/field"
+ "k8s.io/kubernetes/pkg/api"
+ apiutil "k8s.io/kubernetes/pkg/api/util"
+)
+
+// ValidateEvent makes sure that the event makes sense.
+func ValidateEvent(event *api.Event) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ // Make sure event.Namespace and the involvedObject.Namespace agree
+ if len(event.InvolvedObject.Namespace) == 0 {
+ // event.Namespace must also be empty (or "default", for compatibility with old clients)
+ if event.Namespace != metav1.NamespaceNone && event.Namespace != metav1.NamespaceDefault {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("involvedObject", "namespace"), event.InvolvedObject.Namespace, "does not match event.namespace"))
+ }
+ } else {
+ // event namespace must match
+ if event.Namespace != event.InvolvedObject.Namespace {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("involvedObject", "namespace"), event.InvolvedObject.Namespace, "does not match event.namespace"))
+ }
+ }
+
+ // For kinds we recognize, make sure involvedObject.Namespace is set for namespaced kinds
+ if namespaced, err := isNamespacedKind(event.InvolvedObject.Kind, event.InvolvedObject.APIVersion); err == nil {
+ if namespaced && len(event.InvolvedObject.Namespace) == 0 {
+ allErrs = append(allErrs, field.Required(field.NewPath("involvedObject", "namespace"), fmt.Sprintf("required for kind %s", event.InvolvedObject.Kind)))
+ }
+ if !namespaced && len(event.InvolvedObject.Namespace) > 0 {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("involvedObject", "namespace"), event.InvolvedObject.Namespace, fmt.Sprintf("not allowed for kind %s", event.InvolvedObject.Kind)))
+ }
+ }
+
+ for _, msg := range validation.IsDNS1123Subdomain(event.Namespace) {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("namespace"), event.Namespace, msg))
+ }
+ return allErrs
+}
+
+// Check whether the kind in groupVersion is scoped at the root of the api hierarchy
+func isNamespacedKind(kind, groupVersion string) (bool, error) {
+ group := apiutil.GetGroup(groupVersion)
+ g, err := api.Registry.Group(group)
+ if err != nil {
+ return false, err
+ }
+ restMapping, err := g.RESTMapper.RESTMapping(schema.GroupKind{Group: group, Kind: kind}, apiutil.GetVersion(groupVersion))
+ if err != nil {
+ return false, err
+ }
+ scopeName := restMapping.Scope.Name()
+ if scopeName == meta.RESTScopeNameNamespace {
+ return true, nil
+ }
+ return false, nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/api/validation/schema.go b/vendor/k8s.io/kubernetes/pkg/api/validation/schema.go
new file mode 100644
index 000000000..3f98345c3
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/validation/schema.go
@@ -0,0 +1,435 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package validation
+
+import (
+ "bytes"
+ "encoding/json"
+ "fmt"
+ "reflect"
+ "regexp"
+ "strings"
+
+ "github.com/emicklei/go-restful-swagger12"
+ ejson "github.com/exponent-io/jsonpath"
+ "github.com/golang/glog"
+ "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+ utilerrors "k8s.io/apimachinery/pkg/util/errors"
+ "k8s.io/apimachinery/pkg/util/yaml"
+ apiutil "k8s.io/kubernetes/pkg/api/util"
+)
+
+type InvalidTypeError struct {
+ ExpectedKind reflect.Kind
+ ObservedKind reflect.Kind
+ FieldName string
+}
+
+func (i *InvalidTypeError) Error() string {
+ return fmt.Sprintf("expected type %s, for field %s, got %s", i.ExpectedKind.String(), i.FieldName, i.ObservedKind.String())
+}
+
+func NewInvalidTypeError(expected reflect.Kind, observed reflect.Kind, fieldName string) error {
+ return &InvalidTypeError{expected, observed, fieldName}
+}
+
+// TypeNotFoundError is returned when specified type
+// can not found in schema
+type TypeNotFoundError string
+
+func (tnfe TypeNotFoundError) Error() string {
+ return fmt.Sprintf("couldn't find type: %s", string(tnfe))
+}
+
+// Schema is an interface that knows how to validate an API object serialized to a byte array.
+type Schema interface {
+ ValidateBytes(data []byte) error
+}
+
+type NullSchema struct{}
+
+func (NullSchema) ValidateBytes(data []byte) error { return nil }
+
+type NoDoubleKeySchema struct{}
+
+func (NoDoubleKeySchema) ValidateBytes(data []byte) error {
+ var list []error = nil
+ if err := validateNoDuplicateKeys(data, "metadata", "labels"); err != nil {
+ list = append(list, err)
+ }
+ if err := validateNoDuplicateKeys(data, "metadata", "annotations"); err != nil {
+ list = append(list, err)
+ }
+ return utilerrors.NewAggregate(list)
+}
+
+func validateNoDuplicateKeys(data []byte, path ...string) error {
+ r := ejson.NewDecoder(bytes.NewReader(data))
+ // This is Go being unfriendly. The 'path ...string' comes in as a
+ // []string, and SeekTo takes ...interface{}, so we can't just pass
+ // the path straight in, we have to copy it. *sigh*
+ ifacePath := []interface{}{}
+ for ix := range path {
+ ifacePath = append(ifacePath, path[ix])
+ }
+ found, err := r.SeekTo(ifacePath...)
+ if err != nil {
+ return err
+ }
+ if !found {
+ return nil
+ }
+ seen := map[string]bool{}
+ for {
+ tok, err := r.Token()
+ if err != nil {
+ return err
+ }
+ switch t := tok.(type) {
+ case json.Delim:
+ if t.String() == "}" {
+ return nil
+ }
+ case ejson.KeyString:
+ if seen[string(t)] {
+ return fmt.Errorf("duplicate key: %s", string(t))
+ } else {
+ seen[string(t)] = true
+ }
+ }
+ }
+}
+
+type ConjunctiveSchema []Schema
+
+func (c ConjunctiveSchema) ValidateBytes(data []byte) error {
+ var list []error = nil
+ schemas := []Schema(c)
+ for ix := range schemas {
+ if err := schemas[ix].ValidateBytes(data); err != nil {
+ list = append(list, err)
+ }
+ }
+ return utilerrors.NewAggregate(list)
+}
+
+type SwaggerSchema struct {
+ api swagger.ApiDeclaration
+ delegate Schema // For delegating to other api groups
+}
+
+func NewSwaggerSchemaFromBytes(data []byte, factory Schema) (Schema, error) {
+ schema := &SwaggerSchema{}
+ err := json.Unmarshal(data, &schema.api)
+ if err != nil {
+ return nil, err
+ }
+ schema.delegate = factory
+ return schema, nil
+}
+
+// validateList unpacks a list and validate every item in the list.
+// It return nil if every item is ok.
+// Otherwise it return an error list contain errors of every item.
+func (s *SwaggerSchema) validateList(obj map[string]interface{}) []error {
+ items, exists := obj["items"]
+ if !exists {
+ return []error{fmt.Errorf("no items field in %#v", obj)}
+ }
+ return s.validateItems(items)
+}
+
+func (s *SwaggerSchema) validateItems(items interface{}) []error {
+ allErrs := []error{}
+ itemList, ok := items.([]interface{})
+ if !ok {
+ return append(allErrs, fmt.Errorf("items isn't a slice"))
+ }
+ for i, item := range itemList {
+ fields, ok := item.(map[string]interface{})
+ if !ok {
+ allErrs = append(allErrs, fmt.Errorf("items[%d] isn't a map[string]interface{}", i))
+ continue
+ }
+ groupVersion := fields["apiVersion"]
+ if groupVersion == nil {
+ allErrs = append(allErrs, fmt.Errorf("items[%d].apiVersion not set", i))
+ continue
+ }
+ itemVersion, ok := groupVersion.(string)
+ if !ok {
+ allErrs = append(allErrs, fmt.Errorf("items[%d].apiVersion isn't string type", i))
+ continue
+ }
+ if len(itemVersion) == 0 {
+ allErrs = append(allErrs, fmt.Errorf("items[%d].apiVersion is empty", i))
+ }
+ kind := fields["kind"]
+ if kind == nil {
+ allErrs = append(allErrs, fmt.Errorf("items[%d].kind not set", i))
+ continue
+ }
+ itemKind, ok := kind.(string)
+ if !ok {
+ allErrs = append(allErrs, fmt.Errorf("items[%d].kind isn't string type", i))
+ continue
+ }
+ if len(itemKind) == 0 {
+ allErrs = append(allErrs, fmt.Errorf("items[%d].kind is empty", i))
+ }
+ version := apiutil.GetVersion(itemVersion)
+ errs := s.ValidateObject(item, "", version+"."+itemKind)
+ if len(errs) >= 1 {
+ allErrs = append(allErrs, errs...)
+ }
+ }
+
+ return allErrs
+}
+
+func (s *SwaggerSchema) ValidateBytes(data []byte) error {
+ var obj interface{}
+ out, err := yaml.ToJSON(data)
+ if err != nil {
+ return err
+ }
+ data = out
+ if err := json.Unmarshal(data, &obj); err != nil {
+ return err
+ }
+ fields, ok := obj.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("error in unmarshaling data %s", string(data))
+ }
+ groupVersion := fields["apiVersion"]
+ if groupVersion == nil {
+ return fmt.Errorf("apiVersion not set")
+ }
+ if _, ok := groupVersion.(string); !ok {
+ return fmt.Errorf("apiVersion isn't string type")
+ }
+ kind := fields["kind"]
+ if kind == nil {
+ return fmt.Errorf("kind not set")
+ }
+ if _, ok := kind.(string); !ok {
+ return fmt.Errorf("kind isn't string type")
+ }
+ if strings.HasSuffix(kind.(string), "List") {
+ return utilerrors.NewAggregate(s.validateList(fields))
+ }
+ version := apiutil.GetVersion(groupVersion.(string))
+ allErrs := s.ValidateObject(obj, "", version+"."+kind.(string))
+ if len(allErrs) == 1 {
+ return allErrs[0]
+ }
+ return utilerrors.NewAggregate(allErrs)
+}
+
+func (s *SwaggerSchema) ValidateObject(obj interface{}, fieldName, typeName string) []error {
+ allErrs := []error{}
+ models := s.api.Models
+ model, ok := models.At(typeName)
+
+ // Verify the api version matches. This is required for nested types with differing api versions because
+ // s.api only has schema for 1 api version (the parent object type's version).
+ // e.g. an extensions/v1beta1 Template embedding a /v1 Service requires the schema for the extensions/v1beta1
+ // api to delegate to the schema for the /v1 api.
+ // Only do this for !ok objects so that cross ApiVersion vendored types take precedence.
+ if !ok && s.delegate != nil {
+ fields, mapOk := obj.(map[string]interface{})
+ if !mapOk {
+ return append(allErrs, fmt.Errorf("field %s for %s: expected object of type map[string]interface{}, but the actual type is %T", fieldName, typeName, obj))
+ }
+ if delegated, err := s.delegateIfDifferentApiVersion(&unstructured.Unstructured{Object: fields}); delegated {
+ if err != nil {
+ allErrs = append(allErrs, err)
+ }
+ return allErrs
+ }
+ }
+
+ if !ok {
+ return append(allErrs, TypeNotFoundError(typeName))
+ }
+ properties := model.Properties
+ if len(properties.List) == 0 {
+ // The object does not have any sub-fields.
+ return nil
+ }
+ fields, ok := obj.(map[string]interface{})
+ if !ok {
+ return append(allErrs, fmt.Errorf("field %s for %s: expected object of type map[string]interface{}, but the actual type is %T", fieldName, typeName, obj))
+ }
+ if len(fieldName) > 0 {
+ fieldName = fieldName + "."
+ }
+ // handle required fields
+ for _, requiredKey := range model.Required {
+ if _, ok := fields[requiredKey]; !ok {
+ allErrs = append(allErrs, fmt.Errorf("field %s%s for %s is required", fieldName, requiredKey, typeName))
+ }
+ }
+ for key, value := range fields {
+ details, ok := properties.At(key)
+
+ // Special case for runtime.RawExtension and runtime.Objects because they always fail to validate
+ // This is because the actual values will be of some sub-type (e.g. Deployment) not the expected
+ // super-type (RawExtension)
+ if s.isGenericArray(details) {
+ errs := s.validateItems(value)
+ if len(errs) > 0 {
+ allErrs = append(allErrs, errs...)
+ }
+ continue
+ }
+ if !ok {
+ allErrs = append(allErrs, fmt.Errorf("found invalid field %s for %s", key, typeName))
+ continue
+ }
+ if details.Type == nil && details.Ref == nil {
+ allErrs = append(allErrs, fmt.Errorf("could not find the type of %s%s from object %v", fieldName, key, details))
+ }
+ var fieldType string
+ if details.Type != nil {
+ fieldType = *details.Type
+ } else {
+ fieldType = *details.Ref
+ }
+ if value == nil {
+ glog.V(2).Infof("Skipping nil field: %s%s", fieldName, key)
+ continue
+ }
+ errs := s.validateField(value, fieldName+key, fieldType, &details)
+ if len(errs) > 0 {
+ allErrs = append(allErrs, errs...)
+ }
+ }
+ return allErrs
+}
+
+// delegateIfDifferentApiVersion delegates the validation of an object if its ApiGroup does not match the
+// current SwaggerSchema.
+// First return value is true if the validation was delegated (by a different ApiGroup SwaggerSchema)
+// Second return value is the result of the delegated validation if performed.
+func (s *SwaggerSchema) delegateIfDifferentApiVersion(obj *unstructured.Unstructured) (bool, error) {
+ // Never delegate objects in the same ApiVersion or we will get infinite recursion
+ if !s.isDifferentApiVersion(obj) {
+ return false, nil
+ }
+
+ // Convert the object back into bytes so that we can pass it to the ValidateBytes function
+ m, err := json.Marshal(obj.Object)
+ if err != nil {
+ return true, err
+ }
+
+ // Delegate validation of this object to the correct SwaggerSchema for its ApiGroup
+ return true, s.delegate.ValidateBytes(m)
+}
+
+// isDifferentApiVersion Returns true if obj lives in a different ApiVersion than the SwaggerSchema does.
+// The SwaggerSchema will not be able to process objects in different ApiVersions unless they are vendored.
+func (s *SwaggerSchema) isDifferentApiVersion(obj *unstructured.Unstructured) bool {
+ groupVersion := obj.GetAPIVersion()
+ return len(groupVersion) > 0 && s.api.ApiVersion != groupVersion
+}
+
+// isGenericArray Returns true if p is an array of generic Objects - either RawExtension or Object.
+func (s *SwaggerSchema) isGenericArray(p swagger.ModelProperty) bool {
+ return p.DataTypeFields.Type != nil &&
+ *p.DataTypeFields.Type == "array" &&
+ p.Items != nil &&
+ p.Items.Ref != nil &&
+ (*p.Items.Ref == "runtime.RawExtension" || *p.Items.Ref == "runtime.Object")
+}
+
+// This matches type name in the swagger spec, such as "v1.Binding".
+var versionRegexp = regexp.MustCompile(`^(v.+|unversioned|types)\..*`)
+
+func (s *SwaggerSchema) validateField(value interface{}, fieldName, fieldType string, fieldDetails *swagger.ModelProperty) []error {
+ allErrs := []error{}
+ if reflect.TypeOf(value) == nil {
+ return append(allErrs, fmt.Errorf("unexpected nil value for field %v", fieldName))
+ }
+ // TODO: caesarxuchao: because we have multiple group/versions and objects
+ // may reference objects in other group, the commented out way of checking
+ // if a filedType is a type defined by us is outdated. We use a hacky way
+ // for now.
+ // TODO: the type name in the swagger spec is something like "v1.Binding",
+ // and the "v1" is generated from the package name, not the groupVersion of
+ // the type. We need to fix go-restful to embed the group name in the type
+ // name, otherwise we couldn't handle identically named types in different
+ // groups correctly.
+ if versionRegexp.MatchString(fieldType) {
+ // if strings.HasPrefix(fieldType, apiVersion) {
+ return s.ValidateObject(value, fieldName, fieldType)
+ }
+ switch fieldType {
+ case "string":
+ // Be loose about what we accept for 'string' since we use IntOrString in a couple of places
+ _, isString := value.(string)
+ _, isNumber := value.(float64)
+ _, isInteger := value.(int)
+ if !isString && !isNumber && !isInteger {
+ return append(allErrs, NewInvalidTypeError(reflect.String, reflect.TypeOf(value).Kind(), fieldName))
+ }
+ case "array":
+ arr, ok := value.([]interface{})
+ if !ok {
+ return append(allErrs, NewInvalidTypeError(reflect.Array, reflect.TypeOf(value).Kind(), fieldName))
+ }
+ var arrType string
+ if fieldDetails.Items.Ref == nil && fieldDetails.Items.Type == nil {
+ return append(allErrs, NewInvalidTypeError(reflect.Array, reflect.TypeOf(value).Kind(), fieldName))
+ }
+ if fieldDetails.Items.Ref != nil {
+ arrType = *fieldDetails.Items.Ref
+ } else {
+ arrType = *fieldDetails.Items.Type
+ }
+ for ix := range arr {
+ errs := s.validateField(arr[ix], fmt.Sprintf("%s[%d]", fieldName, ix), arrType, nil)
+ if len(errs) > 0 {
+ allErrs = append(allErrs, errs...)
+ }
+ }
+ case "uint64":
+ case "int64":
+ case "integer":
+ _, isNumber := value.(float64)
+ _, isInteger := value.(int)
+ if !isNumber && !isInteger {
+ return append(allErrs, NewInvalidTypeError(reflect.Int, reflect.TypeOf(value).Kind(), fieldName))
+ }
+ case "float64":
+ if _, ok := value.(float64); !ok {
+ return append(allErrs, NewInvalidTypeError(reflect.Float64, reflect.TypeOf(value).Kind(), fieldName))
+ }
+ case "boolean":
+ if _, ok := value.(bool); !ok {
+ return append(allErrs, NewInvalidTypeError(reflect.Bool, reflect.TypeOf(value).Kind(), fieldName))
+ }
+ // API servers before release 1.3 produce swagger spec with `type: "any"` as the fallback type, while newer servers produce spec with `type: "object"`.
+ // We have both here so that kubectl can work with both old and new api servers.
+ case "object":
+ case "any":
+ default:
+ return append(allErrs, fmt.Errorf("unexpected type: %v", fieldType))
+ }
+ return allErrs
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/api/validation/validation.go b/vendor/k8s.io/kubernetes/pkg/api/validation/validation.go
new file mode 100644
index 000000000..785a059cd
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/validation/validation.go
@@ -0,0 +1,4241 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package validation
+
+import (
+ "encoding/json"
+ "fmt"
+ "net"
+ "path"
+ "path/filepath"
+ "reflect"
+ "regexp"
+ "strconv"
+ "strings"
+
+ "github.com/golang/glog"
+
+ "math"
+
+ apiequality "k8s.io/apimachinery/pkg/api/equality"
+ "k8s.io/apimachinery/pkg/api/resource"
+ apimachineryvalidation "k8s.io/apimachinery/pkg/api/validation"
+ genericvalidation "k8s.io/apimachinery/pkg/api/validation"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ unversionedvalidation "k8s.io/apimachinery/pkg/apis/meta/v1/validation"
+ "k8s.io/apimachinery/pkg/labels"
+ "k8s.io/apimachinery/pkg/util/intstr"
+ "k8s.io/apimachinery/pkg/util/sets"
+ "k8s.io/apimachinery/pkg/util/validation"
+ "k8s.io/apimachinery/pkg/util/validation/field"
+ utilfeature "k8s.io/apiserver/pkg/util/feature"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/helper"
+ apiservice "k8s.io/kubernetes/pkg/api/service"
+ "k8s.io/kubernetes/pkg/api/v1"
+ v1helper "k8s.io/kubernetes/pkg/api/v1/helper"
+ "k8s.io/kubernetes/pkg/capabilities"
+ "k8s.io/kubernetes/pkg/features"
+ "k8s.io/kubernetes/pkg/security/apparmor"
+)
+
+// TODO: delete this global variable when we enable the validation of common
+// fields by default.
+var RepairMalformedUpdates bool = genericvalidation.RepairMalformedUpdates
+
+const isNegativeErrorMsg string = apimachineryvalidation.IsNegativeErrorMsg
+const isInvalidQuotaResource string = `must be a standard resource for quota`
+const fieldImmutableErrorMsg string = genericvalidation.FieldImmutableErrorMsg
+const isNotIntegerErrorMsg string = `must be an integer`
+
+var pdPartitionErrorMsg string = validation.InclusiveRangeError(1, 255)
+var volumeModeErrorMsg string = "must be a number between 0 and 0777 (octal), both inclusive"
+
+// BannedOwners is a black list of object that are not allowed to be owners.
+var BannedOwners = genericvalidation.BannedOwners
+
+// ValidateHasLabel requires that metav1.ObjectMeta has a Label with key and expectedValue
+func ValidateHasLabel(meta metav1.ObjectMeta, fldPath *field.Path, key, expectedValue string) field.ErrorList {
+ allErrs := field.ErrorList{}
+ actualValue, found := meta.Labels[key]
+ if !found {
+ allErrs = append(allErrs, field.Required(fldPath.Child("labels").Key(key),
+ fmt.Sprintf("must be '%s'", expectedValue)))
+ return allErrs
+ }
+ if actualValue != expectedValue {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("labels").Key(key), meta.Labels,
+ fmt.Sprintf("must be '%s'", expectedValue)))
+ }
+ return allErrs
+}
+
+// ValidateAnnotations validates that a set of annotations are correctly defined.
+func ValidateAnnotations(annotations map[string]string, fldPath *field.Path) field.ErrorList {
+ return genericvalidation.ValidateAnnotations(annotations, fldPath)
+}
+
+func ValidateDNS1123Label(value string, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ for _, msg := range validation.IsDNS1123Label(value) {
+ allErrs = append(allErrs, field.Invalid(fldPath, value, msg))
+ }
+ return allErrs
+}
+
+// ValidateDNS1123Subdomain validates that a name is a proper DNS subdomain.
+func ValidateDNS1123Subdomain(value string, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ for _, msg := range validation.IsDNS1123Subdomain(value) {
+ allErrs = append(allErrs, field.Invalid(fldPath, value, msg))
+ }
+ return allErrs
+}
+
+func ValidatePodSpecificAnnotations(annotations map[string]string, spec *api.PodSpec, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ if annotations[api.AffinityAnnotationKey] != "" {
+ allErrs = append(allErrs, ValidateAffinityInPodAnnotations(annotations, fldPath)...)
+ }
+
+ if value, isMirror := annotations[api.MirrorPodAnnotationKey]; isMirror {
+ if len(spec.NodeName) == 0 {
+ allErrs = append(allErrs, field.Invalid(fldPath.Key(api.MirrorPodAnnotationKey), value, "must set spec.nodeName if mirror pod annotation is set"))
+ }
+ }
+
+ if annotations[api.TolerationsAnnotationKey] != "" {
+ allErrs = append(allErrs, ValidateTolerationsInPodAnnotations(annotations, fldPath)...)
+ }
+
+ allErrs = append(allErrs, ValidateSeccompPodAnnotations(annotations, fldPath)...)
+ allErrs = append(allErrs, ValidateAppArmorPodAnnotations(annotations, spec, fldPath)...)
+
+ sysctls, err := helper.SysctlsFromPodAnnotation(annotations[api.SysctlsPodAnnotationKey])
+ if err != nil {
+ allErrs = append(allErrs, field.Invalid(fldPath.Key(api.SysctlsPodAnnotationKey), annotations[api.SysctlsPodAnnotationKey], err.Error()))
+ } else {
+ allErrs = append(allErrs, validateSysctls(sysctls, fldPath.Key(api.SysctlsPodAnnotationKey))...)
+ }
+ unsafeSysctls, err := helper.SysctlsFromPodAnnotation(annotations[api.UnsafeSysctlsPodAnnotationKey])
+ if err != nil {
+ allErrs = append(allErrs, field.Invalid(fldPath.Key(api.UnsafeSysctlsPodAnnotationKey), annotations[api.UnsafeSysctlsPodAnnotationKey], err.Error()))
+ } else {
+ allErrs = append(allErrs, validateSysctls(unsafeSysctls, fldPath.Key(api.UnsafeSysctlsPodAnnotationKey))...)
+ }
+ inBoth := sysctlIntersection(sysctls, unsafeSysctls)
+ if len(inBoth) > 0 {
+ allErrs = append(allErrs, field.Invalid(fldPath.Key(api.UnsafeSysctlsPodAnnotationKey), strings.Join(inBoth, ", "), "can not be safe and unsafe"))
+ }
+
+ return allErrs
+}
+
+// ValidateTolerationsInPodAnnotations tests that the serialized tolerations in Pod.Annotations has valid data
+func ValidateTolerationsInPodAnnotations(annotations map[string]string, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ tolerations, err := helper.GetTolerationsFromPodAnnotations(annotations)
+ if err != nil {
+ allErrs = append(allErrs, field.Invalid(fldPath, api.TolerationsAnnotationKey, err.Error()))
+ return allErrs
+ }
+
+ if len(tolerations) > 0 {
+ allErrs = append(allErrs, ValidateTolerations(tolerations, fldPath.Child(api.TolerationsAnnotationKey))...)
+ }
+
+ return allErrs
+}
+
+// ValidateAffinityInPodAnnotations tests that the serialized Affinity in Pod.Annotations has valid data
+func ValidateAffinityInPodAnnotations(annotations map[string]string, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ affinity, err := helper.GetAffinityFromPodAnnotations(annotations)
+ if err != nil {
+ allErrs = append(allErrs, field.Invalid(fldPath, api.AffinityAnnotationKey, err.Error()))
+ return allErrs
+ }
+ if affinity == nil {
+ return allErrs
+ }
+
+ allErrs = append(allErrs, validateAffinity(affinity, fldPath.Child("affinity"))...)
+ return allErrs
+}
+
+func ValidatePodSpecificAnnotationUpdates(newPod, oldPod *api.Pod, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ newAnnotations := newPod.Annotations
+ oldAnnotations := oldPod.Annotations
+ for k, oldVal := range oldAnnotations {
+ if newVal, exists := newAnnotations[k]; exists && newVal == oldVal {
+ continue // No change.
+ }
+ if strings.HasPrefix(k, apparmor.ContainerAnnotationKeyPrefix) {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Key(k), "may not remove or update AppArmor annotations"))
+ }
+ if k == api.MirrorPodAnnotationKey {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Key(k), "may not remove or update mirror pod annotation"))
+ }
+ }
+ // Check for additions
+ for k := range newAnnotations {
+ if _, ok := oldAnnotations[k]; ok {
+ continue // No change.
+ }
+ if strings.HasPrefix(k, apparmor.ContainerAnnotationKeyPrefix) {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Key(k), "may not add AppArmor annotations"))
+ }
+ if k == api.MirrorPodAnnotationKey {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Key(k), "may not add mirror pod annotation"))
+ }
+ }
+ allErrs = append(allErrs, ValidatePodSpecificAnnotations(newAnnotations, &newPod.Spec, fldPath)...)
+ return allErrs
+}
+
+func ValidateEndpointsSpecificAnnotations(annotations map[string]string, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ return allErrs
+}
+
+func ValidateOwnerReferences(ownerReferences []metav1.OwnerReference, fldPath *field.Path) field.ErrorList {
+ return genericvalidation.ValidateOwnerReferences(ownerReferences, fldPath)
+}
+
+// ValidateNameFunc validates that the provided name is valid for a given resource type.
+// Not all resources have the same validation rules for names. Prefix is true
+// if the name will have a value appended to it. If the name is not valid,
+// this returns a list of descriptions of individual characteristics of the
+// value that were not valid. Otherwise this returns an empty list or nil.
+type ValidateNameFunc apimachineryvalidation.ValidateNameFunc
+
+// maskTrailingDash replaces the final character of a string with a subdomain safe
+// value if is a dash.
+func maskTrailingDash(name string) string {
+ if strings.HasSuffix(name, "-") {
+ return name[:len(name)-2] + "a"
+ }
+ return name
+}
+
+// ValidatePodName can be used to check whether the given pod name is valid.
+// Prefix indicates this name will be used as part of generation, in which case
+// trailing dashes are allowed.
+var ValidatePodName = NameIsDNSSubdomain
+
+// ValidateReplicationControllerName can be used to check whether the given replication
+// controller name is valid.
+// Prefix indicates this name will be used as part of generation, in which case
+// trailing dashes are allowed.
+var ValidateReplicationControllerName = NameIsDNSSubdomain
+
+// ValidateServiceName can be used to check whether the given service name is valid.
+// Prefix indicates this name will be used as part of generation, in which case
+// trailing dashes are allowed.
+var ValidateServiceName = NameIsDNS1035Label
+
+// ValidateNodeName can be used to check whether the given node name is valid.
+// Prefix indicates this name will be used as part of generation, in which case
+// trailing dashes are allowed.
+var ValidateNodeName = NameIsDNSSubdomain
+
+// ValidateNamespaceName can be used to check whether the given namespace name is valid.
+// Prefix indicates this name will be used as part of generation, in which case
+// trailing dashes are allowed.
+var ValidateNamespaceName = apimachineryvalidation.ValidateNamespaceName
+
+// ValidateLimitRangeName can be used to check whether the given limit range name is valid.
+// Prefix indicates this name will be used as part of generation, in which case
+// trailing dashes are allowed.
+var ValidateLimitRangeName = NameIsDNSSubdomain
+
+// ValidateResourceQuotaName can be used to check whether the given
+// resource quota name is valid.
+// Prefix indicates this name will be used as part of generation, in which case
+// trailing dashes are allowed.
+var ValidateResourceQuotaName = NameIsDNSSubdomain
+
+// ValidateSecretName can be used to check whether the given secret name is valid.
+// Prefix indicates this name will be used as part of generation, in which case
+// trailing dashes are allowed.
+var ValidateSecretName = NameIsDNSSubdomain
+
+// ValidateServiceAccountName can be used to check whether the given service account name is valid.
+// Prefix indicates this name will be used as part of generation, in which case
+// trailing dashes are allowed.
+var ValidateServiceAccountName = apimachineryvalidation.ValidateServiceAccountName
+
+// ValidateEndpointsName can be used to check whether the given endpoints name is valid.
+// Prefix indicates this name will be used as part of generation, in which case
+// trailing dashes are allowed.
+var ValidateEndpointsName = NameIsDNSSubdomain
+
+// ValidateClusterName can be used to check whether the given cluster name is valid.
+var ValidateClusterName = genericvalidation.ValidateClusterName
+
+// ValidateClassName can be used to check whether the given class name is valid.
+// It is defined here to avoid import cycle between pkg/apis/storage/validation
+// (where it should be) and this file.
+var ValidateClassName = NameIsDNSSubdomain
+
+// TODO update all references to these functions to point to the genericvalidation ones
+// NameIsDNSSubdomain is a ValidateNameFunc for names that must be a DNS subdomain.
+func NameIsDNSSubdomain(name string, prefix bool) []string {
+ return apimachineryvalidation.NameIsDNSSubdomain(name, prefix)
+}
+
+// NameIsDNSLabel is a ValidateNameFunc for names that must be a DNS 1123 label.
+func NameIsDNSLabel(name string, prefix bool) []string {
+ return apimachineryvalidation.NameIsDNSLabel(name, prefix)
+}
+
+// NameIsDNS1035Label is a ValidateNameFunc for names that must be a DNS 952 label.
+func NameIsDNS1035Label(name string, prefix bool) []string {
+ return apimachineryvalidation.NameIsDNS1035Label(name, prefix)
+}
+
+// Validates that given value is not negative.
+func ValidateNonnegativeField(value int64, fldPath *field.Path) field.ErrorList {
+ return apimachineryvalidation.ValidateNonnegativeField(value, fldPath)
+}
+
+// Validates that a Quantity is not negative
+func ValidateNonnegativeQuantity(value resource.Quantity, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if value.Cmp(resource.Quantity{}) < 0 {
+ allErrs = append(allErrs, field.Invalid(fldPath, value.String(), isNegativeErrorMsg))
+ }
+ return allErrs
+}
+
+func ValidateImmutableField(newVal, oldVal interface{}, fldPath *field.Path) field.ErrorList {
+ return genericvalidation.ValidateImmutableField(newVal, oldVal, fldPath)
+}
+
+func ValidateImmutableAnnotation(newVal string, oldVal string, annotation string, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ if oldVal != newVal {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("annotations", annotation), newVal, fieldImmutableErrorMsg))
+ }
+ return allErrs
+}
+
+// ValidateObjectMeta validates an object's metadata on creation. It expects that name generation has already
+// been performed.
+// It doesn't return an error for rootscoped resources with namespace, because namespace should already be cleared before.
+// TODO: Remove calls to this method scattered in validations of specific resources, e.g., ValidatePodUpdate.
+func ValidateObjectMeta(meta *metav1.ObjectMeta, requiresNamespace bool, nameFn ValidateNameFunc, fldPath *field.Path) field.ErrorList {
+ allErrs := genericvalidation.ValidateObjectMeta(meta, requiresNamespace, apimachineryvalidation.ValidateNameFunc(nameFn), fldPath)
+ // run additional checks for the finalizer name
+ for i := range meta.Finalizers {
+ allErrs = append(allErrs, validateKubeFinalizerName(string(meta.Finalizers[i]), fldPath.Child("finalizers").Index(i))...)
+ }
+ return allErrs
+}
+
+// ValidateObjectMetaUpdate validates an object's metadata when updated
+func ValidateObjectMetaUpdate(newMeta, oldMeta *metav1.ObjectMeta, fldPath *field.Path) field.ErrorList {
+ allErrs := genericvalidation.ValidateObjectMetaUpdate(newMeta, oldMeta, fldPath)
+ // run additional checks for the finalizer name
+ for i := range newMeta.Finalizers {
+ allErrs = append(allErrs, validateKubeFinalizerName(string(newMeta.Finalizers[i]), fldPath.Child("finalizers").Index(i))...)
+ }
+
+ return allErrs
+}
+
+func ValidateNoNewFinalizers(newFinalizers []string, oldFinalizers []string, fldPath *field.Path) field.ErrorList {
+ return genericvalidation.ValidateNoNewFinalizers(newFinalizers, oldFinalizers, fldPath)
+}
+
+func ValidateVolumes(volumes []api.Volume, fldPath *field.Path) (sets.String, field.ErrorList) {
+ allErrs := field.ErrorList{}
+
+ allNames := sets.String{}
+ for i, vol := range volumes {
+ idxPath := fldPath.Index(i)
+ namePath := idxPath.Child("name")
+ el := validateVolumeSource(&vol.VolumeSource, idxPath)
+ if len(vol.Name) == 0 {
+ el = append(el, field.Required(namePath, ""))
+ } else {
+ el = append(el, ValidateDNS1123Label(vol.Name, namePath)...)
+ }
+ if allNames.Has(vol.Name) {
+ el = append(el, field.Duplicate(namePath, vol.Name))
+ }
+ if len(el) == 0 {
+ allNames.Insert(vol.Name)
+ } else {
+ allErrs = append(allErrs, el...)
+ }
+
+ }
+ return allNames, allErrs
+}
+
+func validateVolumeSource(source *api.VolumeSource, fldPath *field.Path) field.ErrorList {
+ numVolumes := 0
+ allErrs := field.ErrorList{}
+ if source.EmptyDir != nil {
+ numVolumes++
+ if !utilfeature.DefaultFeatureGate.Enabled(features.LocalStorageCapacityIsolation) {
+ if source.EmptyDir.SizeLimit != nil && source.EmptyDir.SizeLimit.Cmp(resource.Quantity{}) != 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("emptyDir").Child("sizeLimit"), "SizeLimit field disabled by feature-gate for EmptyDir volumes"))
+ }
+ } else {
+ if source.EmptyDir.SizeLimit != nil && source.EmptyDir.SizeLimit.Cmp(resource.Quantity{}) < 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("emptyDir").Child("sizeLimit"), "SizeLimit field must be a valid resource quantity"))
+ }
+ }
+ }
+ if source.HostPath != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("hostPath"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateHostPathVolumeSource(source.HostPath, fldPath.Child("hostPath"))...)
+ }
+ }
+ if source.GitRepo != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("gitRepo"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateGitRepoVolumeSource(source.GitRepo, fldPath.Child("gitRepo"))...)
+ }
+ }
+ if source.GCEPersistentDisk != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("gcePersistentDisk"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateGCEPersistentDiskVolumeSource(source.GCEPersistentDisk, fldPath.Child("persistentDisk"))...)
+ }
+ }
+ if source.AWSElasticBlockStore != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("awsElasticBlockStore"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateAWSElasticBlockStoreVolumeSource(source.AWSElasticBlockStore, fldPath.Child("awsElasticBlockStore"))...)
+ }
+ }
+ if source.Secret != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("secret"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateSecretVolumeSource(source.Secret, fldPath.Child("secret"))...)
+ }
+ }
+ if source.NFS != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("nfs"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateNFSVolumeSource(source.NFS, fldPath.Child("nfs"))...)
+ }
+ }
+ if source.ISCSI != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("iscsi"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateISCSIVolumeSource(source.ISCSI, fldPath.Child("iscsi"))...)
+ }
+ }
+ if source.Glusterfs != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("glusterfs"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateGlusterfs(source.Glusterfs, fldPath.Child("glusterfs"))...)
+ }
+ }
+ if source.Flocker != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("flocker"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateFlockerVolumeSource(source.Flocker, fldPath.Child("flocker"))...)
+ }
+ }
+ if source.PersistentVolumeClaim != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("persistentVolumeClaim"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validatePersistentClaimVolumeSource(source.PersistentVolumeClaim, fldPath.Child("persistentVolumeClaim"))...)
+ }
+ }
+ if source.RBD != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("rbd"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateRBDVolumeSource(source.RBD, fldPath.Child("rbd"))...)
+ }
+ }
+ if source.Cinder != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("cinder"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateCinderVolumeSource(source.Cinder, fldPath.Child("cinder"))...)
+ }
+ }
+ if source.CephFS != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("cephFS"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateCephFSVolumeSource(source.CephFS, fldPath.Child("cephfs"))...)
+ }
+ }
+ if source.Quobyte != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("quobyte"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateQuobyteVolumeSource(source.Quobyte, fldPath.Child("quobyte"))...)
+ }
+ }
+ if source.DownwardAPI != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("downwarAPI"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateDownwardAPIVolumeSource(source.DownwardAPI, fldPath.Child("downwardAPI"))...)
+ }
+ }
+ if source.FC != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("fc"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateFCVolumeSource(source.FC, fldPath.Child("fc"))...)
+ }
+ }
+ if source.FlexVolume != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("flexVolume"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateFlexVolumeSource(source.FlexVolume, fldPath.Child("flexVolume"))...)
+ }
+ }
+ if source.ConfigMap != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("configMap"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateConfigMapVolumeSource(source.ConfigMap, fldPath.Child("configMap"))...)
+ }
+ }
+
+ if source.AzureFile != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("azureFile"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateAzureFile(source.AzureFile, fldPath.Child("azureFile"))...)
+ }
+ }
+
+ if source.VsphereVolume != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("vsphereVolume"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateVsphereVolumeSource(source.VsphereVolume, fldPath.Child("vsphereVolume"))...)
+ }
+ }
+ if source.PhotonPersistentDisk != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("photonPersistentDisk"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validatePhotonPersistentDiskVolumeSource(source.PhotonPersistentDisk, fldPath.Child("photonPersistentDisk"))...)
+ }
+ }
+ if source.PortworxVolume != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("portworxVolume"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validatePortworxVolumeSource(source.PortworxVolume, fldPath.Child("portworxVolume"))...)
+ }
+ }
+ if source.AzureDisk != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("azureDisk"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateAzureDisk(source.AzureDisk, fldPath.Child("azureDisk"))...)
+ }
+ }
+ if source.StorageOS != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("storageos"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateStorageOSVolumeSource(source.StorageOS, fldPath.Child("storageos"))...)
+ }
+ }
+ if source.Projected != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("projected"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateProjectedVolumeSource(source.Projected, fldPath.Child("projected"))...)
+ }
+ }
+ if source.ScaleIO != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("scaleIO"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateScaleIOVolumeSource(source.ScaleIO, fldPath.Child("scaleIO"))...)
+ }
+ }
+
+ if numVolumes == 0 {
+ allErrs = append(allErrs, field.Required(fldPath, "must specify a volume type"))
+ }
+
+ return allErrs
+}
+
+func validateHostPathVolumeSource(hostPath *api.HostPathVolumeSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(hostPath.Path) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("path"), ""))
+ return allErrs
+ }
+
+ allErrs = append(allErrs, validatePathNoBacksteps(hostPath.Path, fldPath.Child("path"))...)
+ return allErrs
+}
+
+func validateGitRepoVolumeSource(gitRepo *api.GitRepoVolumeSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(gitRepo.Repository) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("repository"), ""))
+ }
+
+ pathErrs := validateLocalDescendingPath(gitRepo.Directory, fldPath.Child("directory"))
+ allErrs = append(allErrs, pathErrs...)
+ return allErrs
+}
+
+func validateISCSIVolumeSource(iscsi *api.ISCSIVolumeSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(iscsi.TargetPortal) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("targetPortal"), ""))
+ }
+ if len(iscsi.IQN) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("iqn"), ""))
+ }
+ if iscsi.Lun < 0 || iscsi.Lun > 255 {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("lun"), iscsi.Lun, validation.InclusiveRangeError(0, 255)))
+ }
+ if (iscsi.DiscoveryCHAPAuth || iscsi.SessionCHAPAuth) && iscsi.SecretRef == nil {
+ allErrs = append(allErrs, field.Required(fldPath.Child("secretRef"), ""))
+ }
+ return allErrs
+}
+
+func validateFCVolumeSource(fc *api.FCVolumeSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(fc.TargetWWNs) < 1 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("targetWWNs"), ""))
+ }
+
+ if fc.Lun == nil {
+ allErrs = append(allErrs, field.Required(fldPath.Child("lun"), ""))
+ } else {
+ if *fc.Lun < 0 || *fc.Lun > 255 {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("lun"), fc.Lun, validation.InclusiveRangeError(0, 255)))
+ }
+ }
+ return allErrs
+}
+
+func validateGCEPersistentDiskVolumeSource(pd *api.GCEPersistentDiskVolumeSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(pd.PDName) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("pdName"), ""))
+ }
+ if pd.Partition < 0 || pd.Partition > 255 {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("partition"), pd.Partition, pdPartitionErrorMsg))
+ }
+ return allErrs
+}
+
+func validateAWSElasticBlockStoreVolumeSource(PD *api.AWSElasticBlockStoreVolumeSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(PD.VolumeID) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("volumeID"), ""))
+ }
+ if PD.Partition < 0 || PD.Partition > 255 {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("partition"), PD.Partition, pdPartitionErrorMsg))
+ }
+ return allErrs
+}
+
+func validateSecretVolumeSource(secretSource *api.SecretVolumeSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(secretSource.SecretName) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("secretName"), ""))
+ }
+
+ secretMode := secretSource.DefaultMode
+ if secretMode != nil && (*secretMode > 0777 || *secretMode < 0) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("defaultMode"), *secretMode, volumeModeErrorMsg))
+ }
+
+ itemsPath := fldPath.Child("items")
+ for i, kp := range secretSource.Items {
+ itemPath := itemsPath.Index(i)
+ allErrs = append(allErrs, validateKeyToPath(&kp, itemPath)...)
+ }
+ return allErrs
+}
+
+func validateConfigMapVolumeSource(configMapSource *api.ConfigMapVolumeSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(configMapSource.Name) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("name"), ""))
+ }
+
+ configMapMode := configMapSource.DefaultMode
+ if configMapMode != nil && (*configMapMode > 0777 || *configMapMode < 0) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("defaultMode"), *configMapMode, volumeModeErrorMsg))
+ }
+
+ itemsPath := fldPath.Child("items")
+ for i, kp := range configMapSource.Items {
+ itemPath := itemsPath.Index(i)
+ allErrs = append(allErrs, validateKeyToPath(&kp, itemPath)...)
+ }
+ return allErrs
+}
+
+func validateKeyToPath(kp *api.KeyToPath, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(kp.Key) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("key"), ""))
+ }
+ if len(kp.Path) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("path"), ""))
+ }
+ allErrs = append(allErrs, validateLocalNonReservedPath(kp.Path, fldPath.Child("path"))...)
+ if kp.Mode != nil && (*kp.Mode > 0777 || *kp.Mode < 0) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("mode"), *kp.Mode, volumeModeErrorMsg))
+ }
+
+ return allErrs
+}
+
+func validatePersistentClaimVolumeSource(claim *api.PersistentVolumeClaimVolumeSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(claim.ClaimName) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("claimName"), ""))
+ }
+ return allErrs
+}
+
+func validateNFSVolumeSource(nfs *api.NFSVolumeSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(nfs.Server) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("server"), ""))
+ }
+ if len(nfs.Path) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("path"), ""))
+ }
+ if !path.IsAbs(nfs.Path) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("path"), nfs.Path, "must be an absolute path"))
+ }
+ return allErrs
+}
+
+func validateQuobyteVolumeSource(quobyte *api.QuobyteVolumeSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(quobyte.Registry) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("registry"), "must be a host:port pair or multiple pairs separated by commas"))
+ } else {
+ for _, hostPortPair := range strings.Split(quobyte.Registry, ",") {
+ if _, _, err := net.SplitHostPort(hostPortPair); err != nil {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("registry"), quobyte.Registry, "must be a host:port pair or multiple pairs separated by commas"))
+ }
+ }
+ }
+
+ if len(quobyte.Volume) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("volume"), ""))
+ }
+ return allErrs
+}
+
+func validateGlusterfs(glusterfs *api.GlusterfsVolumeSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(glusterfs.EndpointsName) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("endpoints"), ""))
+ }
+ if len(glusterfs.Path) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("path"), ""))
+ }
+ return allErrs
+}
+
+func validateFlockerVolumeSource(flocker *api.FlockerVolumeSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(flocker.DatasetName) == 0 && len(flocker.DatasetUUID) == 0 {
+ //TODO: consider adding a RequiredOneOf() error for this and similar cases
+ allErrs = append(allErrs, field.Required(fldPath, "one of datasetName and datasetUUID is required"))
+ }
+ if len(flocker.DatasetName) != 0 && len(flocker.DatasetUUID) != 0 {
+ allErrs = append(allErrs, field.Invalid(fldPath, "resource", "datasetName and datasetUUID can not be specified simultaneously"))
+ }
+ if strings.Contains(flocker.DatasetName, "/") {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("datasetName"), flocker.DatasetName, "must not contain '/'"))
+ }
+ return allErrs
+}
+
+var validDownwardAPIFieldPathExpressions = sets.NewString(
+ "metadata.name",
+ "metadata.namespace",
+ "metadata.labels",
+ "metadata.annotations")
+
+func validateDownwardAPIVolumeFile(file *api.DownwardAPIVolumeFile, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ if len(file.Path) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("path"), ""))
+ }
+ allErrs = append(allErrs, validateLocalNonReservedPath(file.Path, fldPath.Child("path"))...)
+ if file.FieldRef != nil {
+ allErrs = append(allErrs, validateObjectFieldSelector(file.FieldRef, &validDownwardAPIFieldPathExpressions, fldPath.Child("fieldRef"))...)
+ if file.ResourceFieldRef != nil {
+ allErrs = append(allErrs, field.Invalid(fldPath, "resource", "fieldRef and resourceFieldRef can not be specified simultaneously"))
+ }
+ } else if file.ResourceFieldRef != nil {
+ allErrs = append(allErrs, validateContainerResourceFieldSelector(file.ResourceFieldRef, &validContainerResourceFieldPathExpressions, fldPath.Child("resourceFieldRef"), true)...)
+ } else {
+ allErrs = append(allErrs, field.Required(fldPath, "one of fieldRef and resourceFieldRef is required"))
+ }
+ if file.Mode != nil && (*file.Mode > 0777 || *file.Mode < 0) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("mode"), *file.Mode, volumeModeErrorMsg))
+ }
+
+ return allErrs
+}
+
+func validateDownwardAPIVolumeSource(downwardAPIVolume *api.DownwardAPIVolumeSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ downwardAPIMode := downwardAPIVolume.DefaultMode
+ if downwardAPIMode != nil && (*downwardAPIMode > 0777 || *downwardAPIMode < 0) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("defaultMode"), *downwardAPIMode, volumeModeErrorMsg))
+ }
+
+ for _, file := range downwardAPIVolume.Items {
+ allErrs = append(allErrs, validateDownwardAPIVolumeFile(&file, fldPath)...)
+ }
+ return allErrs
+}
+
+func validateProjectionSources(projection *api.ProjectedVolumeSource, projectionMode *int32, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ allPaths := sets.String{}
+
+ for _, source := range projection.Sources {
+ numSources := 0
+ if source.Secret != nil {
+ if numSources > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("secret"), "may not specify more than 1 volume type"))
+ } else {
+ numSources++
+ if len(source.Secret.Name) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("name"), ""))
+ }
+ itemsPath := fldPath.Child("items")
+ for i, kp := range source.Secret.Items {
+ itemPath := itemsPath.Index(i)
+ allErrs = append(allErrs, validateKeyToPath(&kp, itemPath)...)
+ if len(kp.Path) > 0 {
+ curPath := kp.Path
+ if !allPaths.Has(curPath) {
+ allPaths.Insert(curPath)
+ } else {
+ allErrs = append(allErrs, field.Invalid(fldPath, source.Secret.Name, "conflicting duplicate paths"))
+ }
+ }
+ }
+ }
+ }
+ if source.ConfigMap != nil {
+ if numSources > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("configMap"), "may not specify more than 1 volume type"))
+ } else {
+ numSources++
+ if len(source.ConfigMap.Name) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("name"), ""))
+ }
+ itemsPath := fldPath.Child("items")
+ for i, kp := range source.ConfigMap.Items {
+ itemPath := itemsPath.Index(i)
+ allErrs = append(allErrs, validateKeyToPath(&kp, itemPath)...)
+ if len(kp.Path) > 0 {
+ curPath := kp.Path
+ if !allPaths.Has(curPath) {
+ allPaths.Insert(curPath)
+ } else {
+ allErrs = append(allErrs, field.Invalid(fldPath, source.ConfigMap.Name, "conflicting duplicate paths"))
+ }
+
+ }
+ }
+ }
+ }
+ if source.DownwardAPI != nil {
+ if numSources > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("downwardAPI"), "may not specify more than 1 volume type"))
+ } else {
+ numSources++
+ for _, file := range source.DownwardAPI.Items {
+ allErrs = append(allErrs, validateDownwardAPIVolumeFile(&file, fldPath.Child("downwardAPI"))...)
+ if len(file.Path) > 0 {
+ curPath := file.Path
+ if !allPaths.Has(curPath) {
+ allPaths.Insert(curPath)
+ } else {
+ allErrs = append(allErrs, field.Invalid(fldPath, curPath, "conflicting duplicate paths"))
+ }
+
+ }
+ }
+ }
+ }
+ }
+ return allErrs
+}
+
+func validateProjectedVolumeSource(projection *api.ProjectedVolumeSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ projectionMode := projection.DefaultMode
+ if projectionMode != nil && (*projectionMode > 0777 || *projectionMode < 0) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("defaultMode"), *projectionMode, volumeModeErrorMsg))
+ }
+
+ allErrs = append(allErrs, validateProjectionSources(projection, projectionMode, fldPath)...)
+ return allErrs
+}
+
+// This validate will make sure targetPath:
+// 1. is not abs path
+// 2. does not have any element which is ".."
+func validateLocalDescendingPath(targetPath string, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if path.IsAbs(targetPath) {
+ allErrs = append(allErrs, field.Invalid(fldPath, targetPath, "must be a relative path"))
+ }
+
+ allErrs = append(allErrs, validatePathNoBacksteps(targetPath, fldPath)...)
+
+ return allErrs
+}
+
+// validatePathNoBacksteps makes sure the targetPath does not have any `..` path elements when split
+//
+// This assumes the OS of the apiserver and the nodes are the same. The same check should be done
+// on the node to ensure there are no backsteps.
+func validatePathNoBacksteps(targetPath string, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ parts := strings.Split(filepath.ToSlash(targetPath), "/")
+ for _, item := range parts {
+ if item == ".." {
+ allErrs = append(allErrs, field.Invalid(fldPath, targetPath, "must not contain '..'"))
+ break // even for `../../..`, one error is sufficient to make the point
+ }
+ }
+ return allErrs
+}
+
+// This validate will make sure targetPath:
+// 1. is not abs path
+// 2. does not contain any '..' elements
+// 3. does not start with '..'
+func validateLocalNonReservedPath(targetPath string, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ allErrs = append(allErrs, validateLocalDescendingPath(targetPath, fldPath)...)
+ // Don't report this error if the check for .. elements already caught it.
+ if strings.HasPrefix(targetPath, "..") && !strings.HasPrefix(targetPath, "../") {
+ allErrs = append(allErrs, field.Invalid(fldPath, targetPath, "must not start with '..'"))
+ }
+ return allErrs
+}
+
+func validateRBDVolumeSource(rbd *api.RBDVolumeSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(rbd.CephMonitors) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("monitors"), ""))
+ }
+ if len(rbd.RBDImage) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("image"), ""))
+ }
+ return allErrs
+}
+
+func validateCinderVolumeSource(cd *api.CinderVolumeSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(cd.VolumeID) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("volumeID"), ""))
+ }
+ return allErrs
+}
+
+func validateCephFSVolumeSource(cephfs *api.CephFSVolumeSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(cephfs.Monitors) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("monitors"), ""))
+ }
+ return allErrs
+}
+
+func validateFlexVolumeSource(fv *api.FlexVolumeSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(fv.Driver) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("driver"), ""))
+ }
+
+ // Make sure user-specified options don't use kubernetes namespaces
+ for k := range fv.Options {
+ namespace := k
+ if parts := strings.SplitN(k, "/", 2); len(parts) == 2 {
+ namespace = parts[0]
+ }
+ normalized := "." + strings.ToLower(namespace)
+ if strings.HasSuffix(normalized, ".kubernetes.io") || strings.HasSuffix(normalized, ".k8s.io") {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("options").Key(k), k, "kubernetes.io and k8s.io namespaces are reserved"))
+ }
+ }
+
+ return allErrs
+}
+
+func validateAzureFile(azure *api.AzureFileVolumeSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if azure.SecretName == "" {
+ allErrs = append(allErrs, field.Required(fldPath.Child("secretName"), ""))
+ }
+ if azure.ShareName == "" {
+ allErrs = append(allErrs, field.Required(fldPath.Child("shareName"), ""))
+ }
+ return allErrs
+}
+
+func validateAzureDisk(azure *api.AzureDiskVolumeSource, fldPath *field.Path) field.ErrorList {
+ var supportedCachingModes = sets.NewString(string(api.AzureDataDiskCachingNone), string(api.AzureDataDiskCachingReadOnly), string(api.AzureDataDiskCachingReadWrite))
+ var supportedDiskKinds = sets.NewString(string(api.AzureSharedBlobDisk), string(api.AzureDedicatedBlobDisk), string(api.AzureManagedDisk))
+
+ diskUriSupportedManaged := []string{"/subscriptions/{sub-id}/resourcegroups/{group-name}/providers/microsoft.compute/disks/{disk-id}"}
+ diskUriSupportedblob := []string{"https://{account-name}.blob.core.windows.net/{container-name}/{disk-name}.vhd"}
+
+ allErrs := field.ErrorList{}
+ if azure.DiskName == "" {
+ allErrs = append(allErrs, field.Required(fldPath.Child("diskName"), ""))
+ }
+
+ if azure.DataDiskURI == "" {
+ allErrs = append(allErrs, field.Required(fldPath.Child("diskURI"), ""))
+ }
+
+ if azure.CachingMode != nil && !supportedCachingModes.Has(string(*azure.CachingMode)) {
+ allErrs = append(allErrs, field.NotSupported(fldPath.Child("cachingMode"), *azure.CachingMode, supportedCachingModes.List()))
+ }
+
+ if azure.Kind != nil && !supportedDiskKinds.Has(string(*azure.Kind)) {
+ allErrs = append(allErrs, field.NotSupported(fldPath.Child("kind"), *azure.Kind, supportedDiskKinds.List()))
+ }
+
+ // validate that DiskUri is the correct format
+ if azure.Kind != nil && *azure.Kind == api.AzureManagedDisk && strings.Index(azure.DataDiskURI, "/subscriptions/") != 0 {
+ allErrs = append(allErrs, field.NotSupported(fldPath.Child("diskURI"), azure.DataDiskURI, diskUriSupportedManaged))
+ }
+
+ if azure.Kind != nil && *azure.Kind != api.AzureManagedDisk && strings.Index(azure.DataDiskURI, "https://") != 0 {
+ allErrs = append(allErrs, field.NotSupported(fldPath.Child("diskURI"), azure.DataDiskURI, diskUriSupportedblob))
+ }
+
+ return allErrs
+}
+
+func validateVsphereVolumeSource(cd *api.VsphereVirtualDiskVolumeSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(cd.VolumePath) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("volumePath"), ""))
+ }
+ return allErrs
+}
+
+func validatePhotonPersistentDiskVolumeSource(cd *api.PhotonPersistentDiskVolumeSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(cd.PdID) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("pdID"), ""))
+ }
+ return allErrs
+}
+
+func validatePortworxVolumeSource(pwx *api.PortworxVolumeSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(pwx.VolumeID) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("volumeID"), ""))
+ }
+ return allErrs
+}
+
+func validateScaleIOVolumeSource(sio *api.ScaleIOVolumeSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if sio.Gateway == "" {
+ allErrs = append(allErrs, field.Required(fldPath.Child("gateway"), ""))
+ }
+ if sio.System == "" {
+ allErrs = append(allErrs, field.Required(fldPath.Child("system"), ""))
+ }
+ if sio.VolumeName == "" {
+ allErrs = append(allErrs, field.Required(fldPath.Child("volumeName"), ""))
+ }
+ return allErrs
+}
+
+func validateLocalVolumeSource(ls *api.LocalVolumeSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if ls.Path == "" {
+ allErrs = append(allErrs, field.Required(fldPath.Child("path"), ""))
+ return allErrs
+ }
+
+ allErrs = append(allErrs, validatePathNoBacksteps(ls.Path, fldPath.Child("path"))...)
+ return allErrs
+}
+
+func validateStorageOSVolumeSource(storageos *api.StorageOSVolumeSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(storageos.VolumeName) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("volumeName"), ""))
+ } else {
+ allErrs = append(allErrs, ValidateDNS1123Label(storageos.VolumeName, fldPath.Child("volumeName"))...)
+ }
+ if len(storageos.VolumeNamespace) > 0 {
+ allErrs = append(allErrs, ValidateDNS1123Label(storageos.VolumeNamespace, fldPath.Child("volumeNamespace"))...)
+ }
+ if storageos.SecretRef != nil {
+ if len(storageos.SecretRef.Name) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("secretRef", "name"), ""))
+ }
+ }
+ return allErrs
+}
+
+func validateStorageOSPersistentVolumeSource(storageos *api.StorageOSPersistentVolumeSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(storageos.VolumeName) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("volumeName"), ""))
+ } else {
+ allErrs = append(allErrs, ValidateDNS1123Label(storageos.VolumeName, fldPath.Child("volumeName"))...)
+ }
+ if len(storageos.VolumeNamespace) > 0 {
+ allErrs = append(allErrs, ValidateDNS1123Label(storageos.VolumeNamespace, fldPath.Child("volumeNamespace"))...)
+ }
+ if storageos.SecretRef != nil {
+ if len(storageos.SecretRef.Name) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("secretRef", "name"), ""))
+ }
+ if len(storageos.SecretRef.Namespace) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("secretRef", "namespace"), ""))
+ }
+ }
+ return allErrs
+}
+
+// ValidatePersistentVolumeName checks that a name is appropriate for a
+// PersistentVolumeName object.
+var ValidatePersistentVolumeName = NameIsDNSSubdomain
+
+var supportedAccessModes = sets.NewString(string(api.ReadWriteOnce), string(api.ReadOnlyMany), string(api.ReadWriteMany))
+
+var supportedReclaimPolicy = sets.NewString(string(api.PersistentVolumeReclaimDelete), string(api.PersistentVolumeReclaimRecycle), string(api.PersistentVolumeReclaimRetain))
+
+func ValidatePersistentVolume(pv *api.PersistentVolume) field.ErrorList {
+ metaPath := field.NewPath("metadata")
+ allErrs := ValidateObjectMeta(&pv.ObjectMeta, false, ValidatePersistentVolumeName, metaPath)
+
+ specPath := field.NewPath("spec")
+ if len(pv.Spec.AccessModes) == 0 {
+ allErrs = append(allErrs, field.Required(specPath.Child("accessModes"), ""))
+ }
+ for _, mode := range pv.Spec.AccessModes {
+ if !supportedAccessModes.Has(string(mode)) {
+ allErrs = append(allErrs, field.NotSupported(specPath.Child("accessModes"), mode, supportedAccessModes.List()))
+ }
+ }
+
+ if len(pv.Spec.Capacity) == 0 {
+ allErrs = append(allErrs, field.Required(specPath.Child("capacity"), ""))
+ }
+
+ if _, ok := pv.Spec.Capacity[api.ResourceStorage]; !ok || len(pv.Spec.Capacity) > 1 {
+ allErrs = append(allErrs, field.NotSupported(specPath.Child("capacity"), pv.Spec.Capacity, []string{string(api.ResourceStorage)}))
+ }
+ capPath := specPath.Child("capacity")
+ for r, qty := range pv.Spec.Capacity {
+ allErrs = append(allErrs, validateBasicResource(qty, capPath.Key(string(r)))...)
+ }
+ if len(string(pv.Spec.PersistentVolumeReclaimPolicy)) > 0 {
+ if !supportedReclaimPolicy.Has(string(pv.Spec.PersistentVolumeReclaimPolicy)) {
+ allErrs = append(allErrs, field.NotSupported(specPath.Child("persistentVolumeReclaimPolicy"), pv.Spec.PersistentVolumeReclaimPolicy, supportedReclaimPolicy.List()))
+ }
+ }
+
+ nodeAffinitySpecified, errs := validateStorageNodeAffinityAnnotation(pv.ObjectMeta.Annotations, metaPath.Child("annotations"))
+ allErrs = append(allErrs, errs...)
+
+ numVolumes := 0
+ if pv.Spec.HostPath != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(specPath.Child("hostPath"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateHostPathVolumeSource(pv.Spec.HostPath, specPath.Child("hostPath"))...)
+ }
+ }
+ if pv.Spec.GCEPersistentDisk != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(specPath.Child("gcePersistentDisk"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateGCEPersistentDiskVolumeSource(pv.Spec.GCEPersistentDisk, specPath.Child("persistentDisk"))...)
+ }
+ }
+ if pv.Spec.AWSElasticBlockStore != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(specPath.Child("awsElasticBlockStore"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateAWSElasticBlockStoreVolumeSource(pv.Spec.AWSElasticBlockStore, specPath.Child("awsElasticBlockStore"))...)
+ }
+ }
+ if pv.Spec.Glusterfs != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(specPath.Child("glusterfs"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateGlusterfs(pv.Spec.Glusterfs, specPath.Child("glusterfs"))...)
+ }
+ }
+ if pv.Spec.Flocker != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(specPath.Child("flocker"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateFlockerVolumeSource(pv.Spec.Flocker, specPath.Child("flocker"))...)
+ }
+ }
+ if pv.Spec.NFS != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(specPath.Child("nfs"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateNFSVolumeSource(pv.Spec.NFS, specPath.Child("nfs"))...)
+ }
+ }
+ if pv.Spec.RBD != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(specPath.Child("rbd"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateRBDVolumeSource(pv.Spec.RBD, specPath.Child("rbd"))...)
+ }
+ }
+ if pv.Spec.Quobyte != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(specPath.Child("quobyte"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateQuobyteVolumeSource(pv.Spec.Quobyte, specPath.Child("quobyte"))...)
+ }
+ }
+ if pv.Spec.CephFS != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(specPath.Child("cephFS"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateCephFSVolumeSource(pv.Spec.CephFS, specPath.Child("cephfs"))...)
+ }
+ }
+ if pv.Spec.ISCSI != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(specPath.Child("iscsi"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateISCSIVolumeSource(pv.Spec.ISCSI, specPath.Child("iscsi"))...)
+ }
+ }
+ if pv.Spec.Cinder != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(specPath.Child("cinder"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateCinderVolumeSource(pv.Spec.Cinder, specPath.Child("cinder"))...)
+ }
+ }
+ if pv.Spec.FC != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(specPath.Child("fc"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateFCVolumeSource(pv.Spec.FC, specPath.Child("fc"))...)
+ }
+ }
+ if pv.Spec.FlexVolume != nil {
+ numVolumes++
+ allErrs = append(allErrs, validateFlexVolumeSource(pv.Spec.FlexVolume, specPath.Child("flexVolume"))...)
+ }
+ if pv.Spec.AzureFile != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(specPath.Child("azureFile"), "may not specify more than 1 volume type"))
+
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateAzureFile(pv.Spec.AzureFile, specPath.Child("azureFile"))...)
+ }
+ }
+
+ if pv.Spec.VsphereVolume != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(specPath.Child("vsphereVolume"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateVsphereVolumeSource(pv.Spec.VsphereVolume, specPath.Child("vsphereVolume"))...)
+ }
+ }
+ if pv.Spec.PhotonPersistentDisk != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(specPath.Child("photonPersistentDisk"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validatePhotonPersistentDiskVolumeSource(pv.Spec.PhotonPersistentDisk, specPath.Child("photonPersistentDisk"))...)
+ }
+ }
+ if pv.Spec.PortworxVolume != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(specPath.Child("portworxVolume"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validatePortworxVolumeSource(pv.Spec.PortworxVolume, specPath.Child("portworxVolume"))...)
+ }
+ }
+ if pv.Spec.AzureDisk != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(specPath.Child("azureDisk"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateAzureDisk(pv.Spec.AzureDisk, specPath.Child("azureDisk"))...)
+ }
+ }
+ if pv.Spec.ScaleIO != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(specPath.Child("scaleIO"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateScaleIOVolumeSource(pv.Spec.ScaleIO, specPath.Child("scaleIO"))...)
+ }
+ }
+ if pv.Spec.Local != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(specPath.Child("local"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ if !utilfeature.DefaultFeatureGate.Enabled(features.PersistentLocalVolumes) {
+ allErrs = append(allErrs, field.Forbidden(specPath.Child("local"), "Local volumes are disabled by feature-gate"))
+ }
+ allErrs = append(allErrs, validateLocalVolumeSource(pv.Spec.Local, specPath.Child("local"))...)
+
+ // NodeAffinity is required
+ if !nodeAffinitySpecified {
+ allErrs = append(allErrs, field.Required(metaPath.Child("annotations"), "Local volume requires node affinity"))
+ }
+ }
+ }
+ if pv.Spec.StorageOS != nil {
+ if numVolumes > 0 {
+ allErrs = append(allErrs, field.Forbidden(specPath.Child("storageos"), "may not specify more than 1 volume type"))
+ } else {
+ numVolumes++
+ allErrs = append(allErrs, validateStorageOSPersistentVolumeSource(pv.Spec.StorageOS, specPath.Child("storageos"))...)
+ }
+ }
+
+ if numVolumes == 0 {
+ allErrs = append(allErrs, field.Required(specPath, "must specify a volume type"))
+ }
+
+ // do not allow hostPath mounts of '/' to have a 'recycle' reclaim policy
+ if pv.Spec.HostPath != nil && path.Clean(pv.Spec.HostPath.Path) == "/" && pv.Spec.PersistentVolumeReclaimPolicy == api.PersistentVolumeReclaimRecycle {
+ allErrs = append(allErrs, field.Forbidden(specPath.Child("persistentVolumeReclaimPolicy"), "may not be 'recycle' for a hostPath mount of '/'"))
+ }
+
+ if len(pv.Spec.StorageClassName) > 0 {
+ for _, msg := range ValidateClassName(pv.Spec.StorageClassName, false) {
+ allErrs = append(allErrs, field.Invalid(specPath.Child("storageClassName"), pv.Spec.StorageClassName, msg))
+ }
+ }
+
+ return allErrs
+}
+
+// ValidatePersistentVolumeUpdate tests to see if the update is legal for an end user to make.
+// newPv is updated with fields that cannot be changed.
+func ValidatePersistentVolumeUpdate(newPv, oldPv *api.PersistentVolume) field.ErrorList {
+ allErrs := field.ErrorList{}
+ allErrs = ValidatePersistentVolume(newPv)
+ newPv.Status = oldPv.Status
+ return allErrs
+}
+
+// ValidatePersistentVolumeStatusUpdate tests to see if the status update is legal for an end user to make.
+// newPv is updated with fields that cannot be changed.
+func ValidatePersistentVolumeStatusUpdate(newPv, oldPv *api.PersistentVolume) field.ErrorList {
+ allErrs := ValidateObjectMetaUpdate(&newPv.ObjectMeta, &oldPv.ObjectMeta, field.NewPath("metadata"))
+ if len(newPv.ResourceVersion) == 0 {
+ allErrs = append(allErrs, field.Required(field.NewPath("resourceVersion"), ""))
+ }
+ newPv.Spec = oldPv.Spec
+ return allErrs
+}
+
+// ValidatePersistentVolumeClaim validates a PersistentVolumeClaim
+func ValidatePersistentVolumeClaim(pvc *api.PersistentVolumeClaim) field.ErrorList {
+ allErrs := ValidateObjectMeta(&pvc.ObjectMeta, true, ValidatePersistentVolumeName, field.NewPath("metadata"))
+ allErrs = append(allErrs, ValidatePersistentVolumeClaimSpec(&pvc.Spec, field.NewPath("spec"))...)
+ return allErrs
+}
+
+// ValidatePersistentVolumeClaimSpec validates a PersistentVolumeClaimSpec
+func ValidatePersistentVolumeClaimSpec(spec *api.PersistentVolumeClaimSpec, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(spec.AccessModes) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("accessModes"), "at least 1 access mode is required"))
+ }
+ if spec.Selector != nil {
+ allErrs = append(allErrs, unversionedvalidation.ValidateLabelSelector(spec.Selector, fldPath.Child("selector"))...)
+ }
+ for _, mode := range spec.AccessModes {
+ if mode != api.ReadWriteOnce && mode != api.ReadOnlyMany && mode != api.ReadWriteMany {
+ allErrs = append(allErrs, field.NotSupported(fldPath.Child("accessModes"), mode, supportedAccessModes.List()))
+ }
+ }
+ storageValue, ok := spec.Resources.Requests[api.ResourceStorage]
+ if !ok {
+ allErrs = append(allErrs, field.Required(fldPath.Child("resources").Key(string(api.ResourceStorage)), ""))
+ } else {
+ allErrs = append(allErrs, ValidateResourceQuantityValue(string(api.ResourceStorage), storageValue, fldPath.Child("resources").Key(string(api.ResourceStorage)))...)
+ }
+
+ if spec.StorageClassName != nil && len(*spec.StorageClassName) > 0 {
+ for _, msg := range ValidateClassName(*spec.StorageClassName, false) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("storageClassName"), *spec.StorageClassName, msg))
+ }
+ }
+ return allErrs
+}
+
+// ValidatePersistentVolumeClaimUpdate validates an update to a PersistentVolumeClaim
+func ValidatePersistentVolumeClaimUpdate(newPvc, oldPvc *api.PersistentVolumeClaim) field.ErrorList {
+ allErrs := ValidateObjectMetaUpdate(&newPvc.ObjectMeta, &oldPvc.ObjectMeta, field.NewPath("metadata"))
+ allErrs = append(allErrs, ValidatePersistentVolumeClaim(newPvc)...)
+ // PVController needs to update PVC.Spec w/ VolumeName.
+ // Claims are immutable in order to enforce quota, range limits, etc. without gaming the system.
+ if len(oldPvc.Spec.VolumeName) == 0 {
+ // volumeName changes are allowed once.
+ // Reset back to empty string after equality check
+ oldPvc.Spec.VolumeName = newPvc.Spec.VolumeName
+ defer func() { oldPvc.Spec.VolumeName = "" }()
+ }
+ // changes to Spec are not allowed, but updates to label/and some annotations are OK.
+ // no-op updates pass validation.
+ if !apiequality.Semantic.DeepEqual(newPvc.Spec, oldPvc.Spec) {
+ allErrs = append(allErrs, field.Forbidden(field.NewPath("spec"), "field is immutable after creation"))
+ }
+
+ // storageclass annotation should be immutable after creation
+ // TODO: remove Beta when no longer needed
+ allErrs = append(allErrs, ValidateImmutableAnnotation(newPvc.ObjectMeta.Annotations[v1.BetaStorageClassAnnotation], oldPvc.ObjectMeta.Annotations[v1.BetaStorageClassAnnotation], v1.BetaStorageClassAnnotation, field.NewPath("metadata"))...)
+
+ newPvc.Status = oldPvc.Status
+ return allErrs
+}
+
+// ValidatePersistentVolumeClaimStatusUpdate validates an update to status of a PersistentVolumeClaim
+func ValidatePersistentVolumeClaimStatusUpdate(newPvc, oldPvc *api.PersistentVolumeClaim) field.ErrorList {
+ allErrs := ValidateObjectMetaUpdate(&newPvc.ObjectMeta, &oldPvc.ObjectMeta, field.NewPath("metadata"))
+ if len(newPvc.ResourceVersion) == 0 {
+ allErrs = append(allErrs, field.Required(field.NewPath("resourceVersion"), ""))
+ }
+ if len(newPvc.Spec.AccessModes) == 0 {
+ allErrs = append(allErrs, field.Required(field.NewPath("Spec", "accessModes"), ""))
+ }
+ capPath := field.NewPath("status", "capacity")
+ for r, qty := range newPvc.Status.Capacity {
+ allErrs = append(allErrs, validateBasicResource(qty, capPath.Key(string(r)))...)
+ }
+ newPvc.Spec = oldPvc.Spec
+ return allErrs
+}
+
+var supportedPortProtocols = sets.NewString(string(api.ProtocolTCP), string(api.ProtocolUDP))
+
+func validateContainerPorts(ports []api.ContainerPort, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ allNames := sets.String{}
+ for i, port := range ports {
+ idxPath := fldPath.Index(i)
+ if len(port.Name) > 0 {
+ if msgs := validation.IsValidPortName(port.Name); len(msgs) != 0 {
+ for i = range msgs {
+ allErrs = append(allErrs, field.Invalid(idxPath.Child("name"), port.Name, msgs[i]))
+ }
+ } else if allNames.Has(port.Name) {
+ allErrs = append(allErrs, field.Duplicate(idxPath.Child("name"), port.Name))
+ } else {
+ allNames.Insert(port.Name)
+ }
+ }
+ if port.ContainerPort == 0 {
+ allErrs = append(allErrs, field.Required(idxPath.Child("containerPort"), ""))
+ } else {
+ for _, msg := range validation.IsValidPortNum(int(port.ContainerPort)) {
+ allErrs = append(allErrs, field.Invalid(idxPath.Child("containerPort"), port.ContainerPort, msg))
+ }
+ }
+ if port.HostPort != 0 {
+ for _, msg := range validation.IsValidPortNum(int(port.HostPort)) {
+ allErrs = append(allErrs, field.Invalid(idxPath.Child("hostPort"), port.HostPort, msg))
+ }
+ }
+ if len(port.Protocol) == 0 {
+ allErrs = append(allErrs, field.Required(idxPath.Child("protocol"), ""))
+ } else if !supportedPortProtocols.Has(string(port.Protocol)) {
+ allErrs = append(allErrs, field.NotSupported(idxPath.Child("protocol"), port.Protocol, supportedPortProtocols.List()))
+ }
+ }
+ return allErrs
+}
+
+// ValidateEnv validates env vars
+func ValidateEnv(vars []api.EnvVar, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ for i, ev := range vars {
+ idxPath := fldPath.Index(i)
+ if len(ev.Name) == 0 {
+ allErrs = append(allErrs, field.Required(idxPath.Child("name"), ""))
+ } else {
+ for _, msg := range validation.IsCIdentifier(ev.Name) {
+ allErrs = append(allErrs, field.Invalid(idxPath.Child("name"), ev.Name, msg))
+ }
+ }
+ allErrs = append(allErrs, validateEnvVarValueFrom(ev, idxPath.Child("valueFrom"))...)
+ }
+ return allErrs
+}
+
+var validFieldPathExpressionsEnv = sets.NewString("metadata.name", "metadata.namespace", "spec.nodeName", "spec.serviceAccountName", "status.hostIP", "status.podIP")
+var validContainerResourceFieldPathExpressions = sets.NewString("limits.cpu", "limits.memory", "requests.cpu", "requests.memory")
+
+func validateEnvVarValueFrom(ev api.EnvVar, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ if ev.ValueFrom == nil {
+ return allErrs
+ }
+
+ numSources := 0
+
+ if ev.ValueFrom.FieldRef != nil {
+ numSources++
+ allErrs = append(allErrs, validateObjectFieldSelector(ev.ValueFrom.FieldRef, &validFieldPathExpressionsEnv, fldPath.Child("fieldRef"))...)
+ }
+ if ev.ValueFrom.ResourceFieldRef != nil {
+ numSources++
+ allErrs = append(allErrs, validateContainerResourceFieldSelector(ev.ValueFrom.ResourceFieldRef, &validContainerResourceFieldPathExpressions, fldPath.Child("resourceFieldRef"), false)...)
+ }
+ if ev.ValueFrom.ConfigMapKeyRef != nil {
+ numSources++
+ allErrs = append(allErrs, validateConfigMapKeySelector(ev.ValueFrom.ConfigMapKeyRef, fldPath.Child("configMapKeyRef"))...)
+ }
+ if ev.ValueFrom.SecretKeyRef != nil {
+ numSources++
+ allErrs = append(allErrs, validateSecretKeySelector(ev.ValueFrom.SecretKeyRef, fldPath.Child("secretKeyRef"))...)
+ }
+
+ if numSources == 0 {
+ allErrs = append(allErrs, field.Invalid(fldPath, "", "must specify one of: `fieldRef`, `resourceFieldRef`, `configMapKeyRef` or `secretKeyRef`"))
+ } else if len(ev.Value) != 0 {
+ if numSources != 0 {
+ allErrs = append(allErrs, field.Invalid(fldPath, "", "may not be specified when `value` is not empty"))
+ }
+ } else if numSources > 1 {
+ allErrs = append(allErrs, field.Invalid(fldPath, "", "may not have more than one field specified at a time"))
+ }
+
+ return allErrs
+}
+
+func validateObjectFieldSelector(fs *api.ObjectFieldSelector, expressions *sets.String, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ if len(fs.APIVersion) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("apiVersion"), ""))
+ } else if len(fs.FieldPath) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("fieldPath"), ""))
+ } else {
+ internalFieldPath, _, err := api.Scheme.ConvertFieldLabel(fs.APIVersion, "Pod", fs.FieldPath, "")
+ if err != nil {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("fieldPath"), fs.FieldPath, fmt.Sprintf("error converting fieldPath: %v", err)))
+ } else if !expressions.Has(internalFieldPath) {
+ allErrs = append(allErrs, field.NotSupported(fldPath.Child("fieldPath"), internalFieldPath, expressions.List()))
+ }
+ }
+
+ return allErrs
+}
+
+func validateContainerResourceFieldSelector(fs *api.ResourceFieldSelector, expressions *sets.String, fldPath *field.Path, volume bool) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ if volume && len(fs.ContainerName) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("containerName"), ""))
+ } else if len(fs.Resource) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("resource"), ""))
+ } else if !expressions.Has(fs.Resource) {
+ allErrs = append(allErrs, field.NotSupported(fldPath.Child("resource"), fs.Resource, expressions.List()))
+ }
+ allErrs = append(allErrs, validateContainerResourceDivisor(fs.Resource, fs.Divisor, fldPath)...)
+ return allErrs
+}
+
+func ValidateEnvFrom(vars []api.EnvFromSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ for i, ev := range vars {
+ idxPath := fldPath.Index(i)
+ if len(ev.Prefix) > 0 {
+ for _, msg := range validation.IsCIdentifier(ev.Prefix) {
+ allErrs = append(allErrs, field.Invalid(idxPath.Child("prefix"), ev.Prefix, msg))
+ }
+ }
+
+ numSources := 0
+ if ev.ConfigMapRef != nil {
+ numSources++
+ allErrs = append(allErrs, validateConfigMapEnvSource(ev.ConfigMapRef, idxPath.Child("configMapRef"))...)
+ }
+ if ev.SecretRef != nil {
+ numSources++
+ allErrs = append(allErrs, validateSecretEnvSource(ev.SecretRef, idxPath.Child("secretRef"))...)
+ }
+
+ if numSources == 0 {
+ allErrs = append(allErrs, field.Invalid(fldPath, "", "must specify one of: `configMapRef` or `secretRef`"))
+ } else if numSources > 1 {
+ allErrs = append(allErrs, field.Invalid(fldPath, "", "may not have more than one field specified at a time"))
+ }
+ }
+ return allErrs
+}
+
+func validateConfigMapEnvSource(configMapSource *api.ConfigMapEnvSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(configMapSource.Name) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("name"), ""))
+ } else {
+ for _, msg := range ValidateConfigMapName(configMapSource.Name, true) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("name"), configMapSource.Name, msg))
+ }
+ }
+ return allErrs
+}
+
+func validateSecretEnvSource(secretSource *api.SecretEnvSource, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(secretSource.Name) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("name"), ""))
+ } else {
+ for _, msg := range ValidateSecretName(secretSource.Name, true) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("name"), secretSource.Name, msg))
+ }
+ }
+ return allErrs
+}
+
+var validContainerResourceDivisorForCPU = sets.NewString("1m", "1")
+var validContainerResourceDivisorForMemory = sets.NewString("1", "1k", "1M", "1G", "1T", "1P", "1E", "1Ki", "1Mi", "1Gi", "1Ti", "1Pi", "1Ei")
+
+func validateContainerResourceDivisor(rName string, divisor resource.Quantity, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ unsetDivisor := resource.Quantity{}
+ if unsetDivisor.Cmp(divisor) == 0 {
+ return allErrs
+ }
+ switch rName {
+ case "limits.cpu", "requests.cpu":
+ if !validContainerResourceDivisorForCPU.Has(divisor.String()) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("divisor"), rName, "only divisor's values 1m and 1 are supported with the cpu resource"))
+ }
+ case "limits.memory", "requests.memory":
+ if !validContainerResourceDivisorForMemory.Has(divisor.String()) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("divisor"), rName, "only divisor's values 1, 1k, 1M, 1G, 1T, 1P, 1E, 1Ki, 1Mi, 1Gi, 1Ti, 1Pi, 1Ei are supported with the memory resource"))
+ }
+ }
+ return allErrs
+}
+
+func validateConfigMapKeySelector(s *api.ConfigMapKeySelector, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ nameFn := ValidateNameFunc(ValidateSecretName)
+ for _, msg := range nameFn(s.Name, false) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("name"), s.Name, msg))
+ }
+ if len(s.Key) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("key"), ""))
+ } else {
+ for _, msg := range validation.IsConfigMapKey(s.Key) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("key"), s.Key, msg))
+ }
+ }
+
+ return allErrs
+}
+
+func validateSecretKeySelector(s *api.SecretKeySelector, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ nameFn := ValidateNameFunc(ValidateSecretName)
+ for _, msg := range nameFn(s.Name, false) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("name"), s.Name, msg))
+ }
+ if len(s.Key) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("key"), ""))
+ } else {
+ for _, msg := range validation.IsConfigMapKey(s.Key) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("key"), s.Key, msg))
+ }
+ }
+
+ return allErrs
+}
+
+func ValidateVolumeMounts(mounts []api.VolumeMount, volumes sets.String, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ mountpoints := sets.NewString()
+
+ for i, mnt := range mounts {
+ idxPath := fldPath.Index(i)
+ if len(mnt.Name) == 0 {
+ allErrs = append(allErrs, field.Required(idxPath.Child("name"), ""))
+ } else if !volumes.Has(mnt.Name) {
+ allErrs = append(allErrs, field.NotFound(idxPath.Child("name"), mnt.Name))
+ }
+ if len(mnt.MountPath) == 0 {
+ allErrs = append(allErrs, field.Required(idxPath.Child("mountPath"), ""))
+ }
+ if mountpoints.Has(mnt.MountPath) {
+ allErrs = append(allErrs, field.Invalid(idxPath.Child("mountPath"), mnt.MountPath, "must be unique"))
+ }
+ mountpoints.Insert(mnt.MountPath)
+ if len(mnt.SubPath) > 0 {
+ allErrs = append(allErrs, validateLocalDescendingPath(mnt.SubPath, fldPath.Child("subPath"))...)
+ }
+ }
+ return allErrs
+}
+
+func validateProbe(probe *api.Probe, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ if probe == nil {
+ return allErrs
+ }
+ allErrs = append(allErrs, validateHandler(&probe.Handler, fldPath)...)
+
+ allErrs = append(allErrs, ValidateNonnegativeField(int64(probe.InitialDelaySeconds), fldPath.Child("initialDelaySeconds"))...)
+ allErrs = append(allErrs, ValidateNonnegativeField(int64(probe.TimeoutSeconds), fldPath.Child("timeoutSeconds"))...)
+ allErrs = append(allErrs, ValidateNonnegativeField(int64(probe.PeriodSeconds), fldPath.Child("periodSeconds"))...)
+ allErrs = append(allErrs, ValidateNonnegativeField(int64(probe.SuccessThreshold), fldPath.Child("successThreshold"))...)
+ allErrs = append(allErrs, ValidateNonnegativeField(int64(probe.FailureThreshold), fldPath.Child("failureThreshold"))...)
+ return allErrs
+}
+
+// AccumulateUniqueHostPorts extracts each HostPort of each Container,
+// accumulating the results and returning an error if any ports conflict.
+func AccumulateUniqueHostPorts(containers []api.Container, accumulator *sets.String, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ for ci, ctr := range containers {
+ idxPath := fldPath.Index(ci)
+ portsPath := idxPath.Child("ports")
+ for pi := range ctr.Ports {
+ idxPath := portsPath.Index(pi)
+ port := ctr.Ports[pi].HostPort
+ if port == 0 {
+ continue
+ }
+ str := fmt.Sprintf("%s/%s/%d", ctr.Ports[pi].Protocol, ctr.Ports[pi].HostIP, port)
+ if accumulator.Has(str) {
+ allErrs = append(allErrs, field.Duplicate(idxPath.Child("hostPort"), str))
+ } else {
+ accumulator.Insert(str)
+ }
+ }
+ }
+ return allErrs
+}
+
+// checkHostPortConflicts checks for colliding Port.HostPort values across
+// a slice of containers.
+func checkHostPortConflicts(containers []api.Container, fldPath *field.Path) field.ErrorList {
+ allPorts := sets.String{}
+ return AccumulateUniqueHostPorts(containers, &allPorts, fldPath)
+}
+
+func validateExecAction(exec *api.ExecAction, fldPath *field.Path) field.ErrorList {
+ allErrors := field.ErrorList{}
+ if len(exec.Command) == 0 {
+ allErrors = append(allErrors, field.Required(fldPath.Child("command"), ""))
+ }
+ return allErrors
+}
+
+var supportedHTTPSchemes = sets.NewString(string(api.URISchemeHTTP), string(api.URISchemeHTTPS))
+
+func validateHTTPGetAction(http *api.HTTPGetAction, fldPath *field.Path) field.ErrorList {
+ allErrors := field.ErrorList{}
+ if len(http.Path) == 0 {
+ allErrors = append(allErrors, field.Required(fldPath.Child("path"), ""))
+ }
+ allErrors = append(allErrors, ValidatePortNumOrName(http.Port, fldPath.Child("port"))...)
+ if !supportedHTTPSchemes.Has(string(http.Scheme)) {
+ allErrors = append(allErrors, field.NotSupported(fldPath.Child("scheme"), http.Scheme, supportedHTTPSchemes.List()))
+ }
+ for _, header := range http.HTTPHeaders {
+ for _, msg := range validation.IsHTTPHeaderName(header.Name) {
+ allErrors = append(allErrors, field.Invalid(fldPath.Child("httpHeaders"), header.Name, msg))
+ }
+ }
+ return allErrors
+}
+
+func ValidatePortNumOrName(port intstr.IntOrString, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if port.Type == intstr.Int {
+ for _, msg := range validation.IsValidPortNum(port.IntValue()) {
+ allErrs = append(allErrs, field.Invalid(fldPath, port.IntValue(), msg))
+ }
+ } else if port.Type == intstr.String {
+ for _, msg := range validation.IsValidPortName(port.StrVal) {
+ allErrs = append(allErrs, field.Invalid(fldPath, port.StrVal, msg))
+ }
+ } else {
+ allErrs = append(allErrs, field.InternalError(fldPath, fmt.Errorf("unknown type: %v", port.Type)))
+ }
+ return allErrs
+}
+
+func validateTCPSocketAction(tcp *api.TCPSocketAction, fldPath *field.Path) field.ErrorList {
+ return ValidatePortNumOrName(tcp.Port, fldPath.Child("port"))
+}
+
+func validateHandler(handler *api.Handler, fldPath *field.Path) field.ErrorList {
+ numHandlers := 0
+ allErrors := field.ErrorList{}
+ if handler.Exec != nil {
+ if numHandlers > 0 {
+ allErrors = append(allErrors, field.Forbidden(fldPath.Child("exec"), "may not specify more than 1 handler type"))
+ } else {
+ numHandlers++
+ allErrors = append(allErrors, validateExecAction(handler.Exec, fldPath.Child("exec"))...)
+ }
+ }
+ if handler.HTTPGet != nil {
+ if numHandlers > 0 {
+ allErrors = append(allErrors, field.Forbidden(fldPath.Child("httpGet"), "may not specify more than 1 handler type"))
+ } else {
+ numHandlers++
+ allErrors = append(allErrors, validateHTTPGetAction(handler.HTTPGet, fldPath.Child("httpGet"))...)
+ }
+ }
+ if handler.TCPSocket != nil {
+ if numHandlers > 0 {
+ allErrors = append(allErrors, field.Forbidden(fldPath.Child("tcpSocket"), "may not specify more than 1 handler type"))
+ } else {
+ numHandlers++
+ allErrors = append(allErrors, validateTCPSocketAction(handler.TCPSocket, fldPath.Child("tcpSocket"))...)
+ }
+ }
+ if numHandlers == 0 {
+ allErrors = append(allErrors, field.Required(fldPath, "must specify a handler type"))
+ }
+ return allErrors
+}
+
+func validateLifecycle(lifecycle *api.Lifecycle, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if lifecycle.PostStart != nil {
+ allErrs = append(allErrs, validateHandler(lifecycle.PostStart, fldPath.Child("postStart"))...)
+ }
+ if lifecycle.PreStop != nil {
+ allErrs = append(allErrs, validateHandler(lifecycle.PreStop, fldPath.Child("preStop"))...)
+ }
+ return allErrs
+}
+
+var supportedPullPolicies = sets.NewString(string(api.PullAlways), string(api.PullIfNotPresent), string(api.PullNever))
+
+func validatePullPolicy(policy api.PullPolicy, fldPath *field.Path) field.ErrorList {
+ allErrors := field.ErrorList{}
+
+ switch policy {
+ case api.PullAlways, api.PullIfNotPresent, api.PullNever:
+ break
+ case "":
+ allErrors = append(allErrors, field.Required(fldPath, ""))
+ default:
+ allErrors = append(allErrors, field.NotSupported(fldPath, policy, supportedPullPolicies.List()))
+ }
+
+ return allErrors
+}
+
+func validateInitContainers(containers, otherContainers []api.Container, volumes sets.String, fldPath *field.Path) field.ErrorList {
+ var allErrs field.ErrorList
+ if len(containers) > 0 {
+ allErrs = append(allErrs, validateContainers(containers, volumes, fldPath)...)
+ }
+
+ allNames := sets.String{}
+ for _, ctr := range otherContainers {
+ allNames.Insert(ctr.Name)
+ }
+ for i, ctr := range containers {
+ idxPath := fldPath.Index(i)
+ if allNames.Has(ctr.Name) {
+ allErrs = append(allErrs, field.Duplicate(idxPath.Child("name"), ctr.Name))
+ }
+ if len(ctr.Name) > 0 {
+ allNames.Insert(ctr.Name)
+ }
+ if ctr.Lifecycle != nil {
+ allErrs = append(allErrs, field.Invalid(idxPath.Child("lifecycle"), ctr.Lifecycle, "must not be set for init containers"))
+ }
+ if ctr.LivenessProbe != nil {
+ allErrs = append(allErrs, field.Invalid(idxPath.Child("livenessProbe"), ctr.LivenessProbe, "must not be set for init containers"))
+ }
+ if ctr.ReadinessProbe != nil {
+ allErrs = append(allErrs, field.Invalid(idxPath.Child("readinessProbe"), ctr.ReadinessProbe, "must not be set for init containers"))
+ }
+ }
+ return allErrs
+}
+
+func validateContainers(containers []api.Container, volumes sets.String, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ if len(containers) == 0 {
+ return append(allErrs, field.Required(fldPath, ""))
+ }
+
+ allNames := sets.String{}
+ for i, ctr := range containers {
+ idxPath := fldPath.Index(i)
+ namePath := idxPath.Child("name")
+ if len(ctr.Name) == 0 {
+ allErrs = append(allErrs, field.Required(namePath, ""))
+ } else {
+ allErrs = append(allErrs, ValidateDNS1123Label(ctr.Name, namePath)...)
+ }
+ if allNames.Has(ctr.Name) {
+ allErrs = append(allErrs, field.Duplicate(namePath, ctr.Name))
+ } else {
+ allNames.Insert(ctr.Name)
+ }
+ // TODO: do not validate leading and trailing whitespace to preserve backward compatibility.
+ // for example: https://github.com/openshift/origin/issues/14659 image = " " is special token in pod template
+ // others may have done similar
+ if len(ctr.Image) == 0 {
+ allErrs = append(allErrs, field.Required(idxPath.Child("image"), ""))
+ }
+ if ctr.Lifecycle != nil {
+ allErrs = append(allErrs, validateLifecycle(ctr.Lifecycle, idxPath.Child("lifecycle"))...)
+ }
+ allErrs = append(allErrs, validateProbe(ctr.LivenessProbe, idxPath.Child("livenessProbe"))...)
+ // Liveness-specific validation
+ if ctr.LivenessProbe != nil && ctr.LivenessProbe.SuccessThreshold != 1 {
+ allErrs = append(allErrs, field.Invalid(idxPath.Child("livenessProbe", "successThreshold"), ctr.LivenessProbe.SuccessThreshold, "must be 1"))
+ }
+
+ switch ctr.TerminationMessagePolicy {
+ case api.TerminationMessageReadFile, api.TerminationMessageFallbackToLogsOnError:
+ case "":
+ allErrs = append(allErrs, field.Required(idxPath.Child("terminationMessagePolicy"), "must be 'File' or 'FallbackToLogsOnError'"))
+ default:
+ allErrs = append(allErrs, field.Invalid(idxPath.Child("terminationMessagePolicy"), ctr.TerminationMessagePolicy, "must be 'File' or 'FallbackToLogsOnError'"))
+ }
+
+ allErrs = append(allErrs, validateProbe(ctr.ReadinessProbe, idxPath.Child("readinessProbe"))...)
+ allErrs = append(allErrs, validateContainerPorts(ctr.Ports, idxPath.Child("ports"))...)
+ allErrs = append(allErrs, ValidateEnv(ctr.Env, idxPath.Child("env"))...)
+ allErrs = append(allErrs, ValidateEnvFrom(ctr.EnvFrom, idxPath.Child("envFrom"))...)
+ allErrs = append(allErrs, ValidateVolumeMounts(ctr.VolumeMounts, volumes, idxPath.Child("volumeMounts"))...)
+ allErrs = append(allErrs, validatePullPolicy(ctr.ImagePullPolicy, idxPath.Child("imagePullPolicy"))...)
+ allErrs = append(allErrs, ValidateResourceRequirements(&ctr.Resources, idxPath.Child("resources"))...)
+ allErrs = append(allErrs, ValidateSecurityContext(ctr.SecurityContext, idxPath.Child("securityContext"))...)
+ }
+ // Check for colliding ports across all containers.
+ allErrs = append(allErrs, checkHostPortConflicts(containers, fldPath)...)
+
+ return allErrs
+}
+
+func validateRestartPolicy(restartPolicy *api.RestartPolicy, fldPath *field.Path) field.ErrorList {
+ allErrors := field.ErrorList{}
+ switch *restartPolicy {
+ case api.RestartPolicyAlways, api.RestartPolicyOnFailure, api.RestartPolicyNever:
+ break
+ case "":
+ allErrors = append(allErrors, field.Required(fldPath, ""))
+ default:
+ validValues := []string{string(api.RestartPolicyAlways), string(api.RestartPolicyOnFailure), string(api.RestartPolicyNever)}
+ allErrors = append(allErrors, field.NotSupported(fldPath, *restartPolicy, validValues))
+ }
+
+ return allErrors
+}
+
+func validateDNSPolicy(dnsPolicy *api.DNSPolicy, fldPath *field.Path) field.ErrorList {
+ allErrors := field.ErrorList{}
+ switch *dnsPolicy {
+ case api.DNSClusterFirstWithHostNet, api.DNSClusterFirst, api.DNSDefault:
+ break
+ case "":
+ allErrors = append(allErrors, field.Required(fldPath, ""))
+ default:
+ validValues := []string{string(api.DNSClusterFirstWithHostNet), string(api.DNSClusterFirst), string(api.DNSDefault)}
+ allErrors = append(allErrors, field.NotSupported(fldPath, dnsPolicy, validValues))
+ }
+ return allErrors
+}
+
+func validateHostNetwork(hostNetwork bool, containers []api.Container, fldPath *field.Path) field.ErrorList {
+ allErrors := field.ErrorList{}
+ if hostNetwork {
+ for i, container := range containers {
+ portsPath := fldPath.Index(i).Child("ports")
+ for i, port := range container.Ports {
+ idxPath := portsPath.Index(i)
+ if port.HostPort != port.ContainerPort {
+ allErrors = append(allErrors, field.Invalid(idxPath.Child("containerPort"), port.ContainerPort, "must match `hostPort` when `hostNetwork` is true"))
+ }
+ }
+ }
+ }
+ return allErrors
+}
+
+func validateHostNetworkNoHostAliases(hostNetwork bool, hostAliases []api.HostAlias, fldPath *field.Path) field.ErrorList {
+ allErrors := field.ErrorList{}
+ if hostNetwork {
+ if len(hostAliases) > 0 {
+ allErrors = append(allErrors, field.Forbidden(fldPath, "may not be set when `hostNetwork` is true"))
+ }
+ }
+ return allErrors
+}
+
+// validateImagePullSecrets checks to make sure the pull secrets are well
+// formed. Right now, we only expect name to be set (it's the only field). If
+// this ever changes and someone decides to set those fields, we'd like to
+// know.
+func validateImagePullSecrets(imagePullSecrets []api.LocalObjectReference, fldPath *field.Path) field.ErrorList {
+ allErrors := field.ErrorList{}
+ for i, currPullSecret := range imagePullSecrets {
+ idxPath := fldPath.Index(i)
+ strippedRef := api.LocalObjectReference{Name: currPullSecret.Name}
+ if !reflect.DeepEqual(strippedRef, currPullSecret) {
+ allErrors = append(allErrors, field.Invalid(idxPath, currPullSecret, "only name may be set"))
+ }
+ }
+ return allErrors
+}
+
+// validateAffinity checks if given affinities are valid
+func validateAffinity(affinity *api.Affinity, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ if affinity != nil {
+ if na := affinity.NodeAffinity; na != nil {
+ // TODO: Uncomment the next three lines once RequiredDuringSchedulingRequiredDuringExecution is implemented.
+ // if na.RequiredDuringSchedulingRequiredDuringExecution != nil {
+ // allErrs = append(allErrs, ValidateNodeSelector(na.RequiredDuringSchedulingRequiredDuringExecution, fldPath.Child("requiredDuringSchedulingRequiredDuringExecution"))...)
+ // }
+
+ if na.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ allErrs = append(allErrs, ValidateNodeSelector(na.RequiredDuringSchedulingIgnoredDuringExecution, fldPath.Child("requiredDuringSchedulingIgnoredDuringExecution"))...)
+ }
+
+ if len(na.PreferredDuringSchedulingIgnoredDuringExecution) > 0 {
+ allErrs = append(allErrs, ValidatePreferredSchedulingTerms(na.PreferredDuringSchedulingIgnoredDuringExecution, fldPath.Child("preferredDuringSchedulingIgnoredDuringExecution"))...)
+ }
+ }
+ if affinity.PodAffinity != nil {
+ allErrs = append(allErrs, validatePodAffinity(affinity.PodAffinity, fldPath.Child("podAffinity"))...)
+ }
+ if affinity.PodAntiAffinity != nil {
+ allErrs = append(allErrs, validatePodAntiAffinity(affinity.PodAntiAffinity, fldPath.Child("podAntiAffinity"))...)
+ }
+ }
+
+ return allErrs
+}
+
+func validateTaintEffect(effect *api.TaintEffect, allowEmpty bool, fldPath *field.Path) field.ErrorList {
+ if !allowEmpty && len(*effect) == 0 {
+ return field.ErrorList{field.Required(fldPath, "")}
+ }
+
+ allErrors := field.ErrorList{}
+ switch *effect {
+ // TODO: Replace next line with subsequent commented-out line when implement TaintEffectNoScheduleNoAdmit.
+ case api.TaintEffectNoSchedule, api.TaintEffectPreferNoSchedule, api.TaintEffectNoExecute:
+ // case api.TaintEffectNoSchedule, api.TaintEffectPreferNoSchedule, api.TaintEffectNoScheduleNoAdmit, api.TaintEffectNoExecute:
+ default:
+ validValues := []string{
+ string(api.TaintEffectNoSchedule),
+ string(api.TaintEffectPreferNoSchedule),
+ string(api.TaintEffectNoExecute),
+ // TODO: Uncomment this block when implement TaintEffectNoScheduleNoAdmit.
+ // string(api.TaintEffectNoScheduleNoAdmit),
+ }
+ allErrors = append(allErrors, field.NotSupported(fldPath, effect, validValues))
+ }
+ return allErrors
+}
+
+// validateOnlyAddedTolerations validates updated pod tolerations.
+func validateOnlyAddedTolerations(newTolerations []api.Toleration, oldTolerations []api.Toleration, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ for _, old := range oldTolerations {
+ found := false
+ old.TolerationSeconds = nil
+ for _, new := range newTolerations {
+ new.TolerationSeconds = nil
+ if reflect.DeepEqual(old, new) {
+ found = true
+ break
+ }
+ }
+ if !found {
+ allErrs = append(allErrs, field.Forbidden(fldPath, "existing toleration can not be modified except its tolerationSeconds"))
+ return allErrs
+ }
+ }
+
+ allErrs = append(allErrs, ValidateTolerations(newTolerations, fldPath)...)
+ return allErrs
+}
+
+func ValidateHostAliases(hostAliases []api.HostAlias, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ for _, hostAlias := range hostAliases {
+ if ip := net.ParseIP(hostAlias.IP); ip == nil {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("ip"), hostAlias.IP, "must be valid IP address"))
+ }
+ for _, hostname := range hostAlias.Hostnames {
+ allErrs = append(allErrs, ValidateDNS1123Subdomain(hostname, fldPath.Child("hostnames"))...)
+ }
+ }
+ return allErrs
+}
+
+// ValidateTolerations tests if given tolerations have valid data.
+func ValidateTolerations(tolerations []api.Toleration, fldPath *field.Path) field.ErrorList {
+ allErrors := field.ErrorList{}
+ for i, toleration := range tolerations {
+ idxPath := fldPath.Index(i)
+ // validate the toleration key
+ if len(toleration.Key) > 0 {
+ allErrors = append(allErrors, unversionedvalidation.ValidateLabelName(toleration.Key, idxPath.Child("key"))...)
+ }
+
+ // empty toleration key with Exists operator and empty value means match all taints
+ if len(toleration.Key) == 0 && toleration.Operator != api.TolerationOpExists {
+ allErrors = append(allErrors, field.Invalid(idxPath.Child("operator"), toleration.Operator,
+ "operator must be Exists when `key` is empty, which means \"match all values and all keys\""))
+ }
+
+ if toleration.TolerationSeconds != nil && toleration.Effect != api.TaintEffectNoExecute {
+ allErrors = append(allErrors, field.Invalid(idxPath.Child("effect"), toleration.Effect,
+ "effect must be 'NoExecute' when `tolerationSeconds` is set"))
+ }
+
+ // validate toleration operator and value
+ switch toleration.Operator {
+ // empty operator means Equal
+ case api.TolerationOpEqual, "":
+ if errs := validation.IsValidLabelValue(toleration.Value); len(errs) != 0 {
+ allErrors = append(allErrors, field.Invalid(idxPath.Child("operator"), toleration.Value, strings.Join(errs, ";")))
+ }
+ case api.TolerationOpExists:
+ if len(toleration.Value) > 0 {
+ allErrors = append(allErrors, field.Invalid(idxPath.Child("operator"), toleration, "value must be empty when `operator` is 'Exists'"))
+ }
+ default:
+ validValues := []string{string(api.TolerationOpEqual), string(api.TolerationOpExists)}
+ allErrors = append(allErrors, field.NotSupported(idxPath.Child("operator"), toleration.Operator, validValues))
+ }
+
+ // validate toleration effect, empty toleration effect means match all taint effects
+ if len(toleration.Effect) > 0 {
+ allErrors = append(allErrors, validateTaintEffect(&toleration.Effect, true, idxPath.Child("effect"))...)
+ }
+ }
+ return allErrors
+}
+
+// validateContainersOnlyForPod does additional validation for containers on a pod versus a pod template
+// it only does additive validation of fields not covered in validateContainers
+func validateContainersOnlyForPod(containers []api.Container, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ for i, ctr := range containers {
+ idxPath := fldPath.Index(i)
+ if len(ctr.Image) != len(strings.TrimSpace(ctr.Image)) {
+ allErrs = append(allErrs, field.Invalid(idxPath.Child("image"), ctr.Image, "must not have leading or trailing whitespace"))
+ }
+ }
+ return allErrs
+}
+
+// ValidatePod tests if required fields in the pod are set.
+func ValidatePod(pod *api.Pod) field.ErrorList {
+ fldPath := field.NewPath("metadata")
+ allErrs := ValidateObjectMeta(&pod.ObjectMeta, true, ValidatePodName, fldPath)
+ allErrs = append(allErrs, ValidatePodSpecificAnnotations(pod.ObjectMeta.Annotations, &pod.Spec, fldPath.Child("annotations"))...)
+ allErrs = append(allErrs, ValidatePodSpec(&pod.Spec, field.NewPath("spec"))...)
+
+ // we do additional validation only pertinent for pods and not pod templates
+ // this was done to preserve backwards compatibility
+ specPath := field.NewPath("spec")
+
+ allErrs = append(allErrs, validateContainersOnlyForPod(pod.Spec.Containers, specPath.Child("containers"))...)
+ allErrs = append(allErrs, validateContainersOnlyForPod(pod.Spec.InitContainers, specPath.Child("initContainers"))...)
+
+ return allErrs
+}
+
+// ValidatePodSpec tests that the specified PodSpec has valid data.
+// This includes checking formatting and uniqueness. It also canonicalizes the
+// structure by setting default values and implementing any backwards-compatibility
+// tricks.
+func ValidatePodSpec(spec *api.PodSpec, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ allVolumes, vErrs := ValidateVolumes(spec.Volumes, fldPath.Child("volumes"))
+ allErrs = append(allErrs, vErrs...)
+ allErrs = append(allErrs, validateContainers(spec.Containers, allVolumes, fldPath.Child("containers"))...)
+ allErrs = append(allErrs, validateInitContainers(spec.InitContainers, spec.Containers, allVolumes, fldPath.Child("initContainers"))...)
+ allErrs = append(allErrs, validateRestartPolicy(&spec.RestartPolicy, fldPath.Child("restartPolicy"))...)
+ allErrs = append(allErrs, validateDNSPolicy(&spec.DNSPolicy, fldPath.Child("dnsPolicy"))...)
+ allErrs = append(allErrs, unversionedvalidation.ValidateLabels(spec.NodeSelector, fldPath.Child("nodeSelector"))...)
+ allErrs = append(allErrs, ValidatePodSecurityContext(spec.SecurityContext, spec, fldPath, fldPath.Child("securityContext"))...)
+ allErrs = append(allErrs, validateImagePullSecrets(spec.ImagePullSecrets, fldPath.Child("imagePullSecrets"))...)
+ allErrs = append(allErrs, validateAffinity(spec.Affinity, fldPath.Child("affinity"))...)
+ if len(spec.ServiceAccountName) > 0 {
+ for _, msg := range ValidateServiceAccountName(spec.ServiceAccountName, false) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("serviceAccountName"), spec.ServiceAccountName, msg))
+ }
+ }
+
+ if len(spec.NodeName) > 0 {
+ for _, msg := range ValidateNodeName(spec.NodeName, false) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("nodeName"), spec.NodeName, msg))
+ }
+ }
+
+ if spec.ActiveDeadlineSeconds != nil {
+ value := *spec.ActiveDeadlineSeconds
+ if value < 1 || value > math.MaxInt32 {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("activeDeadlineSeconds"), value, validation.InclusiveRangeError(1, math.MaxInt32)))
+ }
+ }
+
+ if len(spec.Hostname) > 0 {
+ allErrs = append(allErrs, ValidateDNS1123Label(spec.Hostname, fldPath.Child("hostname"))...)
+ }
+
+ if len(spec.Subdomain) > 0 {
+ allErrs = append(allErrs, ValidateDNS1123Label(spec.Subdomain, fldPath.Child("subdomain"))...)
+ }
+
+ if len(spec.Tolerations) > 0 {
+ allErrs = append(allErrs, ValidateTolerations(spec.Tolerations, fldPath.Child("tolerations"))...)
+ }
+
+ if len(spec.HostAliases) > 0 {
+ allErrs = append(allErrs, ValidateHostAliases(spec.HostAliases, fldPath.Child("hostAliases"))...)
+ }
+
+ return allErrs
+}
+
+// ValidateNodeSelectorRequirement tests that the specified NodeSelectorRequirement fields has valid data
+func ValidateNodeSelectorRequirement(rq api.NodeSelectorRequirement, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ switch rq.Operator {
+ case api.NodeSelectorOpIn, api.NodeSelectorOpNotIn:
+ if len(rq.Values) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("values"), "must be specified when `operator` is 'In' or 'NotIn'"))
+ }
+ case api.NodeSelectorOpExists, api.NodeSelectorOpDoesNotExist:
+ if len(rq.Values) > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("values"), "may not be specified when `operator` is 'Exists' or 'DoesNotExist'"))
+ }
+
+ case api.NodeSelectorOpGt, api.NodeSelectorOpLt:
+ if len(rq.Values) != 1 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("values"), "must be specified single value when `operator` is 'Lt' or 'Gt'"))
+ }
+ default:
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("operator"), rq.Operator, "not a valid selector operator"))
+ }
+ allErrs = append(allErrs, unversionedvalidation.ValidateLabelName(rq.Key, fldPath.Child("key"))...)
+ return allErrs
+}
+
+// ValidateNodeSelectorTerm tests that the specified node selector term has valid data
+func ValidateNodeSelectorTerm(term api.NodeSelectorTerm, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ if len(term.MatchExpressions) == 0 {
+ return append(allErrs, field.Required(fldPath.Child("matchExpressions"), "must have at least one node selector requirement"))
+ }
+ for j, req := range term.MatchExpressions {
+ allErrs = append(allErrs, ValidateNodeSelectorRequirement(req, fldPath.Child("matchExpressions").Index(j))...)
+ }
+ return allErrs
+}
+
+// ValidateNodeSelector tests that the specified nodeSelector fields has valid data
+func ValidateNodeSelector(nodeSelector *api.NodeSelector, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ termFldPath := fldPath.Child("nodeSelectorTerms")
+ if len(nodeSelector.NodeSelectorTerms) == 0 {
+ return append(allErrs, field.Required(termFldPath, "must have at least one node selector term"))
+ }
+
+ for i, term := range nodeSelector.NodeSelectorTerms {
+ allErrs = append(allErrs, ValidateNodeSelectorTerm(term, termFldPath.Index(i))...)
+ }
+
+ return allErrs
+}
+
+// ValidateAvoidPodsInNodeAnnotations tests that the serialized AvoidPods in Node.Annotations has valid data
+func ValidateAvoidPodsInNodeAnnotations(annotations map[string]string, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ v1Avoids, err := v1helper.GetAvoidPodsFromNodeAnnotations(annotations)
+ if err != nil {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("AvoidPods"), api.PreferAvoidPodsAnnotationKey, err.Error()))
+ return allErrs
+ }
+ var avoids api.AvoidPods
+ if err := v1.Convert_v1_AvoidPods_To_api_AvoidPods(&v1Avoids, &avoids, nil); err != nil {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("AvoidPods"), api.PreferAvoidPodsAnnotationKey, err.Error()))
+ return allErrs
+ }
+
+ if len(avoids.PreferAvoidPods) != 0 {
+ for i, pa := range avoids.PreferAvoidPods {
+ idxPath := fldPath.Child(api.PreferAvoidPodsAnnotationKey).Index(i)
+ allErrs = append(allErrs, validatePreferAvoidPodsEntry(pa, idxPath)...)
+ }
+ }
+
+ return allErrs
+}
+
+// validatePreferAvoidPodsEntry tests if given PreferAvoidPodsEntry has valid data.
+func validatePreferAvoidPodsEntry(avoidPodEntry api.PreferAvoidPodsEntry, fldPath *field.Path) field.ErrorList {
+ allErrors := field.ErrorList{}
+ if avoidPodEntry.PodSignature.PodController == nil {
+ allErrors = append(allErrors, field.Required(fldPath.Child("PodSignature"), ""))
+ } else {
+ if *(avoidPodEntry.PodSignature.PodController.Controller) != true {
+ allErrors = append(allErrors,
+ field.Invalid(fldPath.Child("PodSignature").Child("PodController").Child("Controller"),
+ *(avoidPodEntry.PodSignature.PodController.Controller), "must point to a controller"))
+ }
+ }
+ return allErrors
+}
+
+// ValidatePreferredSchedulingTerms tests that the specified SoftNodeAffinity fields has valid data
+func ValidatePreferredSchedulingTerms(terms []api.PreferredSchedulingTerm, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ for i, term := range terms {
+ if term.Weight <= 0 || term.Weight > 100 {
+ allErrs = append(allErrs, field.Invalid(fldPath.Index(i).Child("weight"), term.Weight, "must be in the range 1-100"))
+ }
+
+ allErrs = append(allErrs, ValidateNodeSelectorTerm(term.Preference, fldPath.Index(i).Child("preference"))...)
+ }
+ return allErrs
+}
+
+// validatePodAffinityTerm tests that the specified podAffinityTerm fields have valid data
+func validatePodAffinityTerm(podAffinityTerm api.PodAffinityTerm, allowEmptyTopologyKey bool, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if !utilfeature.DefaultFeatureGate.Enabled(features.AffinityInAnnotations) && len(podAffinityTerm.TopologyKey) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("topologyKey"), "can not be empty"))
+ }
+ allErrs = append(allErrs, unversionedvalidation.ValidateLabelSelector(podAffinityTerm.LabelSelector, fldPath.Child("matchExpressions"))...)
+ for _, name := range podAffinityTerm.Namespaces {
+ for _, msg := range ValidateNamespaceName(name, false) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("namespace"), name, msg))
+ }
+ }
+ if !allowEmptyTopologyKey && len(podAffinityTerm.TopologyKey) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("topologyKey"), "can only be empty for PreferredDuringScheduling pod anti affinity"))
+ }
+ if len(podAffinityTerm.TopologyKey) != 0 {
+ allErrs = append(allErrs, unversionedvalidation.ValidateLabelName(podAffinityTerm.TopologyKey, fldPath.Child("topologyKey"))...)
+ }
+ return allErrs
+}
+
+// validatePodAffinityTerms tests that the specified podAffinityTerms fields have valid data
+func validatePodAffinityTerms(podAffinityTerms []api.PodAffinityTerm, allowEmptyTopologyKey bool, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ for i, podAffinityTerm := range podAffinityTerms {
+ allErrs = append(allErrs, validatePodAffinityTerm(podAffinityTerm, allowEmptyTopologyKey, fldPath.Index(i))...)
+ }
+ return allErrs
+}
+
+// validateWeightedPodAffinityTerms tests that the specified weightedPodAffinityTerms fields have valid data
+func validateWeightedPodAffinityTerms(weightedPodAffinityTerms []api.WeightedPodAffinityTerm, allowEmptyTopologyKey bool, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ for j, weightedTerm := range weightedPodAffinityTerms {
+ if weightedTerm.Weight <= 0 || weightedTerm.Weight > 100 {
+ allErrs = append(allErrs, field.Invalid(fldPath.Index(j).Child("weight"), weightedTerm.Weight, "must be in the range 1-100"))
+ }
+ allErrs = append(allErrs, validatePodAffinityTerm(weightedTerm.PodAffinityTerm, allowEmptyTopologyKey, fldPath.Index(j).Child("podAffinityTerm"))...)
+ }
+ return allErrs
+}
+
+// validatePodAntiAffinity tests that the specified podAntiAffinity fields have valid data
+func validatePodAntiAffinity(podAntiAffinity *api.PodAntiAffinity, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ // TODO:Uncomment below code once RequiredDuringSchedulingRequiredDuringExecution is implemented.
+ // if podAntiAffinity.RequiredDuringSchedulingRequiredDuringExecution != nil {
+ // allErrs = append(allErrs, validatePodAffinityTerms(podAntiAffinity.RequiredDuringSchedulingRequiredDuringExecution, false,
+ // fldPath.Child("requiredDuringSchedulingRequiredDuringExecution"))...)
+ //}
+ if podAntiAffinity.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ // empty topologyKey is not allowed for hard pod anti-affinity
+ allErrs = append(allErrs, validatePodAffinityTerms(podAntiAffinity.RequiredDuringSchedulingIgnoredDuringExecution, false,
+ fldPath.Child("requiredDuringSchedulingIgnoredDuringExecution"))...)
+ }
+ if podAntiAffinity.PreferredDuringSchedulingIgnoredDuringExecution != nil {
+ // empty topologyKey is allowed for soft pod anti-affinity
+ allErrs = append(allErrs, validateWeightedPodAffinityTerms(podAntiAffinity.PreferredDuringSchedulingIgnoredDuringExecution, true,
+ fldPath.Child("preferredDuringSchedulingIgnoredDuringExecution"))...)
+ }
+ return allErrs
+}
+
+// validatePodAffinity tests that the specified podAffinity fields have valid data
+func validatePodAffinity(podAffinity *api.PodAffinity, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ // TODO:Uncomment below code once RequiredDuringSchedulingRequiredDuringExecution is implemented.
+ // if podAffinity.RequiredDuringSchedulingRequiredDuringExecution != nil {
+ // allErrs = append(allErrs, validatePodAffinityTerms(podAffinity.RequiredDuringSchedulingRequiredDuringExecution, false,
+ // fldPath.Child("requiredDuringSchedulingRequiredDuringExecution"))...)
+ //}
+ if podAffinity.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ // empty topologyKey is not allowed for hard pod affinity
+ allErrs = append(allErrs, validatePodAffinityTerms(podAffinity.RequiredDuringSchedulingIgnoredDuringExecution, false,
+ fldPath.Child("requiredDuringSchedulingIgnoredDuringExecution"))...)
+ }
+ if podAffinity.PreferredDuringSchedulingIgnoredDuringExecution != nil {
+ // empty topologyKey is not allowed for soft pod affinity
+ allErrs = append(allErrs, validateWeightedPodAffinityTerms(podAffinity.PreferredDuringSchedulingIgnoredDuringExecution, false,
+ fldPath.Child("preferredDuringSchedulingIgnoredDuringExecution"))...)
+ }
+ return allErrs
+}
+
+func ValidateSeccompProfile(p string, fldPath *field.Path) field.ErrorList {
+ if p == "docker/default" {
+ return nil
+ }
+ if p == "unconfined" {
+ return nil
+ }
+ if strings.HasPrefix(p, "localhost/") {
+ return validateLocalDescendingPath(strings.TrimPrefix(p, "localhost/"), fldPath)
+ }
+ return field.ErrorList{field.Invalid(fldPath, p, "must be a valid seccomp profile")}
+}
+
+func ValidateSeccompPodAnnotations(annotations map[string]string, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if p, exists := annotations[api.SeccompPodAnnotationKey]; exists {
+ allErrs = append(allErrs, ValidateSeccompProfile(p, fldPath.Child(api.SeccompPodAnnotationKey))...)
+ }
+ for k, p := range annotations {
+ if strings.HasPrefix(k, api.SeccompContainerAnnotationKeyPrefix) {
+ allErrs = append(allErrs, ValidateSeccompProfile(p, fldPath.Child(k))...)
+ }
+ }
+
+ return allErrs
+}
+
+func ValidateAppArmorPodAnnotations(annotations map[string]string, spec *api.PodSpec, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ for k, p := range annotations {
+ if !strings.HasPrefix(k, apparmor.ContainerAnnotationKeyPrefix) {
+ continue
+ }
+ // TODO: this belongs to admission, not general pod validation:
+ if !utilfeature.DefaultFeatureGate.Enabled(features.AppArmor) {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Key(k), "AppArmor is disabled by feature-gate"))
+ continue
+ }
+ containerName := strings.TrimPrefix(k, apparmor.ContainerAnnotationKeyPrefix)
+ if !podSpecHasContainer(spec, containerName) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Key(k), containerName, "container not found"))
+ }
+
+ if err := apparmor.ValidateProfileFormat(p); err != nil {
+ allErrs = append(allErrs, field.Invalid(fldPath.Key(k), p, err.Error()))
+ }
+ }
+
+ return allErrs
+}
+
+func podSpecHasContainer(spec *api.PodSpec, containerName string) bool {
+ for _, c := range spec.InitContainers {
+ if c.Name == containerName {
+ return true
+ }
+ }
+ for _, c := range spec.Containers {
+ if c.Name == containerName {
+ return true
+ }
+ }
+ return false
+}
+
+const (
+ // a sysctl segment regex, concatenated with dots to form a sysctl name
+ SysctlSegmentFmt string = "[a-z0-9]([-_a-z0-9]*[a-z0-9])?"
+
+ // a sysctl name regex
+ SysctlFmt string = "(" + SysctlSegmentFmt + "\\.)*" + SysctlSegmentFmt
+
+ // the maximal length of a sysctl name
+ SysctlMaxLength int = 253
+)
+
+var sysctlRegexp = regexp.MustCompile("^" + SysctlFmt + "$")
+
+// IsValidSysctlName checks that the given string is a valid sysctl name,
+// i.e. matches SysctlFmt.
+func IsValidSysctlName(name string) bool {
+ if len(name) > SysctlMaxLength {
+ return false
+ }
+ return sysctlRegexp.MatchString(name)
+}
+
+func validateSysctls(sysctls []api.Sysctl, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ for i, s := range sysctls {
+ if len(s.Name) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Index(i).Child("name"), ""))
+ } else if !IsValidSysctlName(s.Name) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Index(i).Child("name"), s.Name, fmt.Sprintf("must have at most %d characters and match regex %s", SysctlMaxLength, SysctlFmt)))
+ }
+ }
+ return allErrs
+}
+
+// ValidatePodSecurityContext test that the specified PodSecurityContext has valid data.
+func ValidatePodSecurityContext(securityContext *api.PodSecurityContext, spec *api.PodSpec, specPath, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ if securityContext != nil {
+ allErrs = append(allErrs, validateHostNetwork(securityContext.HostNetwork, spec.Containers, specPath.Child("containers"))...)
+ allErrs = append(allErrs, validateHostNetworkNoHostAliases(securityContext.HostNetwork, spec.HostAliases, specPath)...)
+ if securityContext.FSGroup != nil {
+ for _, msg := range validation.IsValidGroupID(*securityContext.FSGroup) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("fsGroup"), *(securityContext.FSGroup), msg))
+ }
+ }
+ if securityContext.RunAsUser != nil {
+ for _, msg := range validation.IsValidUserID(*securityContext.RunAsUser) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("runAsUser"), *(securityContext.RunAsUser), msg))
+ }
+ }
+ for g, gid := range securityContext.SupplementalGroups {
+ for _, msg := range validation.IsValidGroupID(gid) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("supplementalGroups").Index(g), gid, msg))
+ }
+ }
+ }
+
+ return allErrs
+}
+
+func ValidateContainerUpdates(newContainers, oldContainers []api.Container, fldPath *field.Path) (allErrs field.ErrorList, stop bool) {
+ allErrs = field.ErrorList{}
+ if len(newContainers) != len(oldContainers) {
+ //TODO: Pinpoint the specific container that causes the invalid error after we have strategic merge diff
+ allErrs = append(allErrs, field.Forbidden(fldPath, "pod updates may not add or remove containers"))
+ return allErrs, true
+ }
+
+ // validate updated container images
+ for i, ctr := range newContainers {
+ if len(ctr.Image) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Index(i).Child("image"), ""))
+ }
+ // this is only called from ValidatePodUpdate so its safe to check leading/trailing whitespace.
+ if len(strings.TrimSpace(ctr.Image)) != len(ctr.Image) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Index(i).Child("image"), ctr.Image, "must not have leading or trailing whitespace"))
+ }
+ }
+ return allErrs, false
+}
+
+// ValidatePodUpdate tests to see if the update is legal for an end user to make. newPod is updated with fields
+// that cannot be changed.
+func ValidatePodUpdate(newPod, oldPod *api.Pod) field.ErrorList {
+ fldPath := field.NewPath("metadata")
+ allErrs := ValidateObjectMetaUpdate(&newPod.ObjectMeta, &oldPod.ObjectMeta, fldPath)
+ allErrs = append(allErrs, ValidatePodSpecificAnnotationUpdates(newPod, oldPod, fldPath.Child("annotations"))...)
+ specPath := field.NewPath("spec")
+
+ // validate updateable fields:
+ // 1. spec.containers[*].image
+ // 2. spec.initContainers[*].image
+ // 3. spec.activeDeadlineSeconds
+
+ containerErrs, stop := ValidateContainerUpdates(newPod.Spec.Containers, oldPod.Spec.Containers, specPath.Child("containers"))
+ allErrs = append(allErrs, containerErrs...)
+ if stop {
+ return allErrs
+ }
+ containerErrs, stop = ValidateContainerUpdates(newPod.Spec.InitContainers, oldPod.Spec.InitContainers, specPath.Child("initContainers"))
+ allErrs = append(allErrs, containerErrs...)
+ if stop {
+ return allErrs
+ }
+
+ // validate updated spec.activeDeadlineSeconds. two types of updates are allowed:
+ // 1. from nil to a positive value
+ // 2. from a positive value to a lesser, non-negative value
+ if newPod.Spec.ActiveDeadlineSeconds != nil {
+ newActiveDeadlineSeconds := *newPod.Spec.ActiveDeadlineSeconds
+ if newActiveDeadlineSeconds < 0 || newActiveDeadlineSeconds > math.MaxInt32 {
+ allErrs = append(allErrs, field.Invalid(specPath.Child("activeDeadlineSeconds"), newActiveDeadlineSeconds, validation.InclusiveRangeError(0, math.MaxInt32)))
+ return allErrs
+ }
+ if oldPod.Spec.ActiveDeadlineSeconds != nil {
+ oldActiveDeadlineSeconds := *oldPod.Spec.ActiveDeadlineSeconds
+ if oldActiveDeadlineSeconds < newActiveDeadlineSeconds {
+ allErrs = append(allErrs, field.Invalid(specPath.Child("activeDeadlineSeconds"), newActiveDeadlineSeconds, "must be less than or equal to previous value"))
+ return allErrs
+ }
+ }
+ } else if oldPod.Spec.ActiveDeadlineSeconds != nil {
+ allErrs = append(allErrs, field.Invalid(specPath.Child("activeDeadlineSeconds"), newPod.Spec.ActiveDeadlineSeconds, "must not update from a positive integer to nil value"))
+ }
+
+ // 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 {
+ container.Image = oldPod.Spec.Containers[ix].Image
+ newContainers = append(newContainers, container)
+ }
+ mungedPod.Spec.Containers = newContainers
+ // munge spec.initContainers[*].image
+ var newInitContainers []api.Container
+ for ix, container := range mungedPod.Spec.InitContainers {
+ container.Image = oldPod.Spec.InitContainers[ix].Image
+ newInitContainers = append(newInitContainers, container)
+ }
+ mungedPod.Spec.InitContainers = newInitContainers
+ // munge spec.activeDeadlineSeconds
+ mungedPod.Spec.ActiveDeadlineSeconds = nil
+ if oldPod.Spec.ActiveDeadlineSeconds != nil {
+ activeDeadlineSeconds := *oldPod.Spec.ActiveDeadlineSeconds
+ mungedPod.Spec.ActiveDeadlineSeconds = &activeDeadlineSeconds
+ }
+
+ // Allow only additions to tolerations updates.
+ mungedPod.Spec.Tolerations = oldPod.Spec.Tolerations
+ allErrs = append(allErrs, validateOnlyAddedTolerations(newPod.Spec.Tolerations, oldPod.Spec.Tolerations, specPath.Child("tolerations"))...)
+
+ if !apiequality.Semantic.DeepEqual(mungedPod.Spec, oldPod.Spec) {
+ //TODO: Pinpoint the specific field that causes the invalid error after we have strategic merge diff
+ allErrs = append(allErrs, field.Forbidden(specPath, "pod updates may not change fields other than `spec.containers[*].image`, `spec.initContainers[*].image`, `spec.activeDeadlineSeconds` or `spec.tolerations` (only additions to existing tolerations)"))
+ }
+
+ return allErrs
+}
+
+// ValidatePodStatusUpdate tests to see if the update is legal for an end user to make. newPod is updated with fields
+// that cannot be changed.
+func ValidatePodStatusUpdate(newPod, oldPod *api.Pod) field.ErrorList {
+ fldPath := field.NewPath("metadata")
+ allErrs := ValidateObjectMetaUpdate(&newPod.ObjectMeta, &oldPod.ObjectMeta, fldPath)
+ allErrs = append(allErrs, ValidatePodSpecificAnnotationUpdates(newPod, oldPod, fldPath.Child("annotations"))...)
+
+ if newPod.Spec.NodeName != oldPod.Spec.NodeName {
+ allErrs = append(allErrs, field.Forbidden(field.NewPath("status", "nodeName"), "may not be changed directly"))
+ }
+
+ // For status update we ignore changes to pod spec.
+ newPod.Spec = oldPod.Spec
+
+ return allErrs
+}
+
+// ValidatePodBinding tests if required fields in the pod binding are legal.
+func ValidatePodBinding(binding *api.Binding) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ if len(binding.Target.Kind) != 0 && binding.Target.Kind != "Node" {
+ // TODO: When validation becomes versioned, this gets more complicated.
+ allErrs = append(allErrs, field.NotSupported(field.NewPath("target", "kind"), binding.Target.Kind, []string{"Node", "<empty>"}))
+ }
+ if len(binding.Target.Name) == 0 {
+ // TODO: When validation becomes versioned, this gets more complicated.
+ allErrs = append(allErrs, field.Required(field.NewPath("target", "name"), ""))
+ }
+
+ return allErrs
+}
+
+// ValidatePodTemplate tests if required fields in the pod template are set.
+func ValidatePodTemplate(pod *api.PodTemplate) field.ErrorList {
+ allErrs := ValidateObjectMeta(&pod.ObjectMeta, true, ValidatePodName, field.NewPath("metadata"))
+ allErrs = append(allErrs, ValidatePodTemplateSpec(&pod.Template, field.NewPath("template"))...)
+ return allErrs
+}
+
+// ValidatePodTemplateUpdate tests to see if the update is legal for an end user to make. newPod is updated with fields
+// that cannot be changed.
+func ValidatePodTemplateUpdate(newPod, oldPod *api.PodTemplate) field.ErrorList {
+ allErrs := ValidateObjectMetaUpdate(&oldPod.ObjectMeta, &newPod.ObjectMeta, field.NewPath("metadata"))
+ allErrs = append(allErrs, ValidatePodTemplateSpec(&newPod.Template, field.NewPath("template"))...)
+ return allErrs
+}
+
+var supportedSessionAffinityType = sets.NewString(string(api.ServiceAffinityClientIP), string(api.ServiceAffinityNone))
+var supportedServiceType = sets.NewString(string(api.ServiceTypeClusterIP), string(api.ServiceTypeNodePort),
+ string(api.ServiceTypeLoadBalancer), string(api.ServiceTypeExternalName))
+
+// ValidateService tests if required fields/annotations of a Service are valid.
+func ValidateService(service *api.Service) field.ErrorList {
+ allErrs := ValidateObjectMeta(&service.ObjectMeta, true, ValidateServiceName, field.NewPath("metadata"))
+
+ specPath := field.NewPath("spec")
+ isHeadlessService := service.Spec.ClusterIP == api.ClusterIPNone
+ if len(service.Spec.Ports) == 0 && !isHeadlessService && service.Spec.Type != api.ServiceTypeExternalName {
+ allErrs = append(allErrs, field.Required(specPath.Child("ports"), ""))
+ }
+ switch service.Spec.Type {
+ case api.ServiceTypeLoadBalancer:
+ for ix := range service.Spec.Ports {
+ port := &service.Spec.Ports[ix]
+ // This is a workaround for broken cloud environments that
+ // over-open firewalls. Hopefully it can go away when more clouds
+ // understand containers better.
+ if port.Port == 10250 {
+ portPath := specPath.Child("ports").Index(ix)
+ allErrs = append(allErrs, field.Invalid(portPath, port.Port, "may not expose port 10250 externally since it is used by kubelet"))
+ }
+ }
+ if service.Spec.ClusterIP == "None" {
+ allErrs = append(allErrs, field.Invalid(specPath.Child("clusterIP"), service.Spec.ClusterIP, "may not be set to 'None' for LoadBalancer services"))
+ }
+ case api.ServiceTypeNodePort:
+ if service.Spec.ClusterIP == "None" {
+ allErrs = append(allErrs, field.Invalid(specPath.Child("clusterIP"), service.Spec.ClusterIP, "may not be set to 'None' for NodePort services"))
+ }
+ case api.ServiceTypeExternalName:
+ if service.Spec.ClusterIP != "" {
+ allErrs = append(allErrs, field.Invalid(specPath.Child("clusterIP"), service.Spec.ClusterIP, "must be empty for ExternalName services"))
+ }
+ if len(service.Spec.ExternalName) > 0 {
+ allErrs = append(allErrs, ValidateDNS1123Subdomain(service.Spec.ExternalName, specPath.Child("externalName"))...)
+ } else {
+ allErrs = append(allErrs, field.Required(specPath.Child("externalName"), ""))
+ }
+ }
+
+ allPortNames := sets.String{}
+ portsPath := specPath.Child("ports")
+ for i := range service.Spec.Ports {
+ portPath := portsPath.Index(i)
+ allErrs = append(allErrs, validateServicePort(&service.Spec.Ports[i], len(service.Spec.Ports) > 1, isHeadlessService, &allPortNames, portPath)...)
+ }
+
+ if service.Spec.Selector != nil {
+ allErrs = append(allErrs, unversionedvalidation.ValidateLabels(service.Spec.Selector, specPath.Child("selector"))...)
+ }
+
+ if len(service.Spec.SessionAffinity) == 0 {
+ allErrs = append(allErrs, field.Required(specPath.Child("sessionAffinity"), ""))
+ } else if !supportedSessionAffinityType.Has(string(service.Spec.SessionAffinity)) {
+ allErrs = append(allErrs, field.NotSupported(specPath.Child("sessionAffinity"), service.Spec.SessionAffinity, supportedSessionAffinityType.List()))
+ }
+
+ if helper.IsServiceIPSet(service) {
+ if ip := net.ParseIP(service.Spec.ClusterIP); ip == nil {
+ allErrs = append(allErrs, field.Invalid(specPath.Child("clusterIP"), service.Spec.ClusterIP, "must be empty, 'None', or a valid IP address"))
+ }
+ }
+
+ ipPath := specPath.Child("externalIPs")
+ for i, ip := range service.Spec.ExternalIPs {
+ idxPath := ipPath.Index(i)
+ if msgs := validation.IsValidIP(ip); len(msgs) != 0 {
+ for i := range msgs {
+ allErrs = append(allErrs, field.Invalid(idxPath, ip, msgs[i]))
+ }
+ } else {
+ allErrs = append(allErrs, validateNonSpecialIP(ip, idxPath)...)
+ }
+ }
+
+ if len(service.Spec.Type) == 0 {
+ allErrs = append(allErrs, field.Required(specPath.Child("type"), ""))
+ } else if !supportedServiceType.Has(string(service.Spec.Type)) {
+ allErrs = append(allErrs, field.NotSupported(specPath.Child("type"), service.Spec.Type, supportedServiceType.List()))
+ }
+
+ if service.Spec.Type == api.ServiceTypeLoadBalancer {
+ portsPath := specPath.Child("ports")
+ includeProtocols := sets.NewString()
+ for i := range service.Spec.Ports {
+ portPath := portsPath.Index(i)
+ if !supportedPortProtocols.Has(string(service.Spec.Ports[i].Protocol)) {
+ allErrs = append(allErrs, field.Invalid(portPath.Child("protocol"), service.Spec.Ports[i].Protocol, "cannot create an external load balancer with non-TCP/UDP ports"))
+ } else {
+ includeProtocols.Insert(string(service.Spec.Ports[i].Protocol))
+ }
+ }
+ if includeProtocols.Len() > 1 {
+ allErrs = append(allErrs, field.Invalid(portsPath, service.Spec.Ports, "cannot create an external load balancer with mix protocols"))
+ }
+ }
+
+ if service.Spec.Type == api.ServiceTypeClusterIP {
+ portsPath := specPath.Child("ports")
+ for i := range service.Spec.Ports {
+ portPath := portsPath.Index(i)
+ if service.Spec.Ports[i].NodePort != 0 {
+ allErrs = append(allErrs, field.Invalid(portPath.Child("nodePort"), service.Spec.Ports[i].NodePort, "may not be used when `type` is 'ClusterIP'"))
+ }
+ }
+ }
+
+ // Check for duplicate NodePorts, considering (protocol,port) pairs
+ portsPath = specPath.Child("ports")
+ nodePorts := make(map[api.ServicePort]bool)
+ for i := range service.Spec.Ports {
+ port := &service.Spec.Ports[i]
+ if port.NodePort == 0 {
+ continue
+ }
+ portPath := portsPath.Index(i)
+ var key api.ServicePort
+ key.Protocol = port.Protocol
+ key.NodePort = port.NodePort
+ _, found := nodePorts[key]
+ if found {
+ allErrs = append(allErrs, field.Duplicate(portPath.Child("nodePort"), port.NodePort))
+ }
+ nodePorts[key] = true
+ }
+
+ // Validate SourceRange field and annotation
+ _, ok := service.Annotations[api.AnnotationLoadBalancerSourceRangesKey]
+ if len(service.Spec.LoadBalancerSourceRanges) > 0 || ok {
+ var fieldPath *field.Path
+ var val string
+ if len(service.Spec.LoadBalancerSourceRanges) > 0 {
+ fieldPath = specPath.Child("LoadBalancerSourceRanges")
+ val = fmt.Sprintf("%v", service.Spec.LoadBalancerSourceRanges)
+ } else {
+ fieldPath = field.NewPath("metadata", "annotations").Key(api.AnnotationLoadBalancerSourceRangesKey)
+ val = service.Annotations[api.AnnotationLoadBalancerSourceRangesKey]
+ }
+ if service.Spec.Type != api.ServiceTypeLoadBalancer {
+ allErrs = append(allErrs, field.Invalid(fieldPath, "", "may only be used when `type` is 'LoadBalancer'"))
+ }
+ _, err := apiservice.GetLoadBalancerSourceRanges(service)
+ if err != nil {
+ allErrs = append(allErrs, field.Invalid(fieldPath, val, "must be a list of IP ranges. For example, 10.240.0.0/24,10.250.0.0/24 "))
+ }
+ }
+
+ allErrs = append(allErrs, validateServiceExternalTrafficFieldsValue(service)...)
+ allErrs = append(allErrs, validateServiceExternalTrafficAPIVersion(service)...)
+
+ return allErrs
+}
+
+func validateServicePort(sp *api.ServicePort, requireName, isHeadlessService bool, allNames *sets.String, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ if requireName && len(sp.Name) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("name"), ""))
+ } else if len(sp.Name) != 0 {
+ allErrs = append(allErrs, ValidateDNS1123Label(sp.Name, fldPath.Child("name"))...)
+ if allNames.Has(sp.Name) {
+ allErrs = append(allErrs, field.Duplicate(fldPath.Child("name"), sp.Name))
+ } else {
+ allNames.Insert(sp.Name)
+ }
+ }
+
+ for _, msg := range validation.IsValidPortNum(int(sp.Port)) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("port"), sp.Port, msg))
+ }
+
+ if len(sp.Protocol) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("protocol"), ""))
+ } else if !supportedPortProtocols.Has(string(sp.Protocol)) {
+ allErrs = append(allErrs, field.NotSupported(fldPath.Child("protocol"), sp.Protocol, supportedPortProtocols.List()))
+ }
+
+ allErrs = append(allErrs, ValidatePortNumOrName(sp.TargetPort, fldPath.Child("targetPort"))...)
+
+ // in the v1 API, targetPorts on headless services were tolerated.
+ // once we have version-specific validation, we can reject this on newer API versions, but until then, we have to tolerate it for compatibility.
+ //
+ // if isHeadlessService {
+ // if sp.TargetPort.Type == intstr.String || (sp.TargetPort.Type == intstr.Int && sp.Port != sp.TargetPort.IntValue()) {
+ // allErrs = append(allErrs, field.Invalid(fldPath.Child("targetPort"), sp.TargetPort, "must be equal to the value of 'port' when clusterIP = None"))
+ // }
+ // }
+
+ return allErrs
+}
+
+// validateServiceExternalTrafficFieldsValue validates ExternalTraffic related annotations
+// have legal value.
+func validateServiceExternalTrafficFieldsValue(service *api.Service) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ // Check beta annotations.
+ if l, ok := service.Annotations[api.BetaAnnotationExternalTraffic]; ok {
+ if l != api.AnnotationValueExternalTrafficLocal &&
+ l != api.AnnotationValueExternalTrafficGlobal {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("metadata", "annotations").Key(api.BetaAnnotationExternalTraffic), l,
+ fmt.Sprintf("ExternalTraffic must be %v or %v", api.AnnotationValueExternalTrafficLocal, api.AnnotationValueExternalTrafficGlobal)))
+ }
+ }
+ if l, ok := service.Annotations[api.BetaAnnotationHealthCheckNodePort]; ok {
+ p, err := strconv.Atoi(l)
+ if err != nil {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("metadata", "annotations").Key(api.BetaAnnotationHealthCheckNodePort), l,
+ "HealthCheckNodePort must be a valid port number"))
+ } else if p <= 0 {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("metadata", "annotations").Key(api.BetaAnnotationHealthCheckNodePort), l,
+ "HealthCheckNodePort must be greater than 0"))
+ }
+ }
+
+ // Check first class fields.
+ if service.Spec.ExternalTrafficPolicy != "" &&
+ service.Spec.ExternalTrafficPolicy != api.ServiceExternalTrafficPolicyTypeCluster &&
+ service.Spec.ExternalTrafficPolicy != api.ServiceExternalTrafficPolicyTypeLocal {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("spec").Child("externalTrafficPolicy"), service.Spec.ExternalTrafficPolicy,
+ fmt.Sprintf("ExternalTrafficPolicy must be empty, %v or %v", api.ServiceExternalTrafficPolicyTypeCluster, api.ServiceExternalTrafficPolicyTypeLocal)))
+ }
+ if service.Spec.HealthCheckNodePort < 0 {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("spec").Child("healthCheckNodePort"), service.Spec.HealthCheckNodePort,
+ "HealthCheckNodePort must be not less than 0"))
+ }
+
+ return allErrs
+}
+
+// serviceExternalTrafficStatus stores flags indicating whether ExternalTraffic
+// related beta annotations and GA fields are set on service.
+type serviceExternalTrafficStatus struct {
+ betaExternalTrafficIsSet bool
+ betaHealthCheckIsSet bool
+ gaExternalTrafficIsSet bool
+ gaHealthCheckIsSet bool
+}
+
+func (s *serviceExternalTrafficStatus) useBetaExternalTrafficWithGA() bool {
+ return s.betaExternalTrafficIsSet && (s.gaExternalTrafficIsSet || s.gaHealthCheckIsSet)
+}
+
+func (s *serviceExternalTrafficStatus) useBetaHealthCheckWithGA() bool {
+ return s.betaHealthCheckIsSet && (s.gaExternalTrafficIsSet || s.gaHealthCheckIsSet)
+}
+
+func getServiceExternalTrafficStatus(service *api.Service) *serviceExternalTrafficStatus {
+ s := serviceExternalTrafficStatus{}
+ _, s.betaExternalTrafficIsSet = service.Annotations[api.BetaAnnotationExternalTraffic]
+ _, s.betaHealthCheckIsSet = service.Annotations[api.BetaAnnotationHealthCheckNodePort]
+ s.gaExternalTrafficIsSet = service.Spec.ExternalTrafficPolicy != ""
+ s.gaHealthCheckIsSet = service.Spec.HealthCheckNodePort != 0
+ return &s
+}
+
+// validateServiceExternalTrafficAPIVersion checks if user mixes ExternalTraffic
+// API versions.
+func validateServiceExternalTrafficAPIVersion(service *api.Service) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ status := getServiceExternalTrafficStatus(service)
+
+ if status.useBetaExternalTrafficWithGA() {
+ fieldPath := field.NewPath("metadata", "annotations").Key(api.BetaAnnotationExternalTraffic)
+ msg := fmt.Sprintf("please replace the beta annotation with 'ExternalTrafficPolicy' field")
+ allErrs = append(allErrs, field.Invalid(fieldPath, api.BetaAnnotationExternalTraffic, msg))
+ }
+
+ if status.useBetaHealthCheckWithGA() {
+ fieldPath := field.NewPath("metadata", "annotations").Key(api.BetaAnnotationHealthCheckNodePort)
+ msg := fmt.Sprintf("please replace the beta annotation with 'HealthCheckNodePort' field")
+ allErrs = append(allErrs, field.Invalid(fieldPath, api.BetaAnnotationHealthCheckNodePort, msg))
+ }
+
+ return allErrs
+}
+
+// ValidateServiceExternalTrafficFieldsCombination validates if ExternalTrafficPolicy,
+// HealthCheckNodePort and Type combination are legal. For update, it should be called
+// after clearing externalTraffic related fields for the ease of transitioning between
+// different service types.
+func ValidateServiceExternalTrafficFieldsCombination(service *api.Service) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ if service.Spec.Type != api.ServiceTypeLoadBalancer &&
+ service.Spec.Type != api.ServiceTypeNodePort &&
+ service.Spec.ExternalTrafficPolicy != "" {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "externalTrafficPolicy"), service.Spec.ExternalTrafficPolicy,
+ "ExternalTrafficPolicy can only be set on NodePort and LoadBalancer service"))
+ }
+
+ if !apiservice.NeedsHealthCheck(service) &&
+ service.Spec.HealthCheckNodePort != 0 {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "healthCheckNodePort"), service.Spec.HealthCheckNodePort,
+ "HealthCheckNodePort can only be set on LoadBalancer service with ExternalTrafficPolicy=Local"))
+ }
+
+ return allErrs
+}
+
+// ValidateServiceUpdate tests if required fields in the service are set during an update
+func ValidateServiceUpdate(service, oldService *api.Service) field.ErrorList {
+ allErrs := ValidateObjectMetaUpdate(&service.ObjectMeta, &oldService.ObjectMeta, field.NewPath("metadata"))
+
+ // ClusterIP should be immutable for services using it (every type other than ExternalName)
+ // which do not have ClusterIP assigned yet (empty string value)
+ if service.Spec.Type != api.ServiceTypeExternalName {
+ if oldService.Spec.Type != api.ServiceTypeExternalName && oldService.Spec.ClusterIP != "" {
+ allErrs = append(allErrs, ValidateImmutableField(service.Spec.ClusterIP, oldService.Spec.ClusterIP, field.NewPath("spec", "clusterIP"))...)
+ }
+ }
+
+ allErrs = append(allErrs, ValidateService(service)...)
+ return allErrs
+}
+
+// ValidateServiceStatusUpdate tests if required fields in the Service are set when updating status.
+func ValidateServiceStatusUpdate(service, oldService *api.Service) field.ErrorList {
+ allErrs := ValidateObjectMetaUpdate(&service.ObjectMeta, &oldService.ObjectMeta, field.NewPath("metadata"))
+ allErrs = append(allErrs, ValidateLoadBalancerStatus(&service.Status.LoadBalancer, field.NewPath("status", "loadBalancer"))...)
+ return allErrs
+}
+
+// ValidateReplicationController tests if required fields in the replication controller are set.
+func ValidateReplicationController(controller *api.ReplicationController) field.ErrorList {
+ allErrs := ValidateObjectMeta(&controller.ObjectMeta, true, ValidateReplicationControllerName, field.NewPath("metadata"))
+ allErrs = append(allErrs, ValidateReplicationControllerSpec(&controller.Spec, field.NewPath("spec"))...)
+ return allErrs
+}
+
+// ValidateReplicationControllerUpdate tests if required fields in the replication controller are set.
+func ValidateReplicationControllerUpdate(controller, oldController *api.ReplicationController) field.ErrorList {
+ allErrs := ValidateObjectMetaUpdate(&controller.ObjectMeta, &oldController.ObjectMeta, field.NewPath("metadata"))
+ allErrs = append(allErrs, ValidateReplicationControllerSpec(&controller.Spec, field.NewPath("spec"))...)
+ return allErrs
+}
+
+// ValidateReplicationControllerStatusUpdate tests if required fields in the replication controller are set.
+func ValidateReplicationControllerStatusUpdate(controller, oldController *api.ReplicationController) field.ErrorList {
+ allErrs := ValidateObjectMetaUpdate(&controller.ObjectMeta, &oldController.ObjectMeta, field.NewPath("metadata"))
+ allErrs = append(allErrs, ValidateReplicationControllerStatus(controller.Status, field.NewPath("status"))...)
+ return allErrs
+}
+
+func ValidateReplicationControllerStatus(status api.ReplicationControllerStatus, statusPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ allErrs = append(allErrs, ValidateNonnegativeField(int64(status.Replicas), statusPath.Child("replicas"))...)
+ allErrs = append(allErrs, ValidateNonnegativeField(int64(status.FullyLabeledReplicas), statusPath.Child("fullyLabeledReplicas"))...)
+ allErrs = append(allErrs, ValidateNonnegativeField(int64(status.ReadyReplicas), statusPath.Child("readyReplicas"))...)
+ allErrs = append(allErrs, ValidateNonnegativeField(int64(status.AvailableReplicas), statusPath.Child("availableReplicas"))...)
+ allErrs = append(allErrs, ValidateNonnegativeField(int64(status.ObservedGeneration), statusPath.Child("observedGeneration"))...)
+ msg := "cannot be greater than status.replicas"
+ if status.FullyLabeledReplicas > status.Replicas {
+ allErrs = append(allErrs, field.Invalid(statusPath.Child("fullyLabeledReplicas"), status.FullyLabeledReplicas, msg))
+ }
+ if status.ReadyReplicas > status.Replicas {
+ allErrs = append(allErrs, field.Invalid(statusPath.Child("readyReplicas"), status.ReadyReplicas, msg))
+ }
+ if status.AvailableReplicas > status.Replicas {
+ allErrs = append(allErrs, field.Invalid(statusPath.Child("availableReplicas"), status.AvailableReplicas, msg))
+ }
+ if status.AvailableReplicas > status.ReadyReplicas {
+ allErrs = append(allErrs, field.Invalid(statusPath.Child("availableReplicas"), status.AvailableReplicas, "cannot be greater than readyReplicas"))
+ }
+ return allErrs
+}
+
+// Validates that the given selector is non-empty.
+func ValidateNonEmptySelector(selectorMap map[string]string, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ selector := labels.Set(selectorMap).AsSelector()
+ if selector.Empty() {
+ allErrs = append(allErrs, field.Required(fldPath, ""))
+ }
+ return allErrs
+}
+
+// Validates the given template and ensures that it is in accordance with the desired selector and replicas.
+func ValidatePodTemplateSpecForRC(template *api.PodTemplateSpec, selectorMap map[string]string, replicas int32, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if template == nil {
+ allErrs = append(allErrs, field.Required(fldPath, ""))
+ } else {
+ selector := labels.Set(selectorMap).AsSelector()
+ if !selector.Empty() {
+ // Verify that the RC selector matches the labels in template.
+ labels := labels.Set(template.Labels)
+ if !selector.Matches(labels) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("metadata", "labels"), template.Labels, "`selector` does not match template `labels`"))
+ }
+ }
+ allErrs = append(allErrs, ValidatePodTemplateSpec(template, fldPath)...)
+ if replicas > 1 {
+ allErrs = append(allErrs, ValidateReadOnlyPersistentDisks(template.Spec.Volumes, fldPath.Child("spec", "volumes"))...)
+ }
+ // RestartPolicy has already been first-order validated as per ValidatePodTemplateSpec().
+ if template.Spec.RestartPolicy != api.RestartPolicyAlways {
+ allErrs = append(allErrs, field.NotSupported(fldPath.Child("spec", "restartPolicy"), template.Spec.RestartPolicy, []string{string(api.RestartPolicyAlways)}))
+ }
+ if template.Spec.ActiveDeadlineSeconds != nil {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("spec", "activeDeadlineSeconds"), template.Spec.ActiveDeadlineSeconds, "must not be specified"))
+ }
+ }
+ return allErrs
+}
+
+// ValidateReplicationControllerSpec tests if required fields in the replication controller spec are set.
+func ValidateReplicationControllerSpec(spec *api.ReplicationControllerSpec, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ allErrs = append(allErrs, ValidateNonnegativeField(int64(spec.MinReadySeconds), fldPath.Child("minReadySeconds"))...)
+ allErrs = append(allErrs, ValidateNonEmptySelector(spec.Selector, fldPath.Child("selector"))...)
+ allErrs = append(allErrs, ValidateNonnegativeField(int64(spec.Replicas), fldPath.Child("replicas"))...)
+ allErrs = append(allErrs, ValidatePodTemplateSpecForRC(spec.Template, spec.Selector, spec.Replicas, fldPath.Child("template"))...)
+ return allErrs
+}
+
+// ValidatePodTemplateSpec validates the spec of a pod template
+func ValidatePodTemplateSpec(spec *api.PodTemplateSpec, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ allErrs = append(allErrs, unversionedvalidation.ValidateLabels(spec.Labels, fldPath.Child("labels"))...)
+ allErrs = append(allErrs, ValidateAnnotations(spec.Annotations, fldPath.Child("annotations"))...)
+ allErrs = append(allErrs, ValidatePodSpecificAnnotations(spec.Annotations, &spec.Spec, fldPath.Child("annotations"))...)
+ allErrs = append(allErrs, ValidatePodSpec(&spec.Spec, fldPath.Child("spec"))...)
+ return allErrs
+}
+
+func ValidateReadOnlyPersistentDisks(volumes []api.Volume, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ for i := range volumes {
+ vol := &volumes[i]
+ idxPath := fldPath.Index(i)
+ if vol.GCEPersistentDisk != nil {
+ if vol.GCEPersistentDisk.ReadOnly == false {
+ allErrs = append(allErrs, field.Invalid(idxPath.Child("gcePersistentDisk", "readOnly"), false, "must be true for replicated pods > 1; GCE PD can only be mounted on multiple machines if it is read-only"))
+ }
+ }
+ // TODO: What to do for AWS? It doesn't support replicas
+ }
+ return allErrs
+}
+
+// ValidateTaintsInNodeAnnotations tests that the serialized taints in Node.Annotations has valid data
+func ValidateTaintsInNodeAnnotations(annotations map[string]string, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ taints, err := helper.GetTaintsFromNodeAnnotations(annotations)
+ if err != nil {
+ allErrs = append(allErrs, field.Invalid(fldPath, api.TaintsAnnotationKey, err.Error()))
+ return allErrs
+ }
+
+ if len(taints) > 0 {
+ allErrs = append(allErrs, validateNodeTaints(taints, fldPath.Child(api.TaintsAnnotationKey))...)
+ }
+
+ return allErrs
+}
+
+// validateNodeTaints tests if given taints have valid data.
+func validateNodeTaints(taints []api.Taint, fldPath *field.Path) field.ErrorList {
+ allErrors := field.ErrorList{}
+
+ uniqueTaints := map[api.TaintEffect]sets.String{}
+
+ for i, currTaint := range taints {
+ idxPath := fldPath.Index(i)
+ // validate the taint key
+ allErrors = append(allErrors, unversionedvalidation.ValidateLabelName(currTaint.Key, idxPath.Child("key"))...)
+ // validate the taint value
+ if errs := validation.IsValidLabelValue(currTaint.Value); len(errs) != 0 {
+ allErrors = append(allErrors, field.Invalid(idxPath.Child("value"), currTaint.Value, strings.Join(errs, ";")))
+ }
+ // validate the taint effect
+ allErrors = append(allErrors, validateTaintEffect(&currTaint.Effect, false, idxPath.Child("effect"))...)
+
+ // validate if taint is unique by <key, effect>
+ if len(uniqueTaints[currTaint.Effect]) > 0 && uniqueTaints[currTaint.Effect].Has(currTaint.Key) {
+ duplicatedError := field.Duplicate(idxPath, currTaint)
+ duplicatedError.Detail = "taints must be unique by key and effect pair"
+ allErrors = append(allErrors, duplicatedError)
+ continue
+ }
+
+ // add taint to existingTaints for uniqueness check
+ if len(uniqueTaints[currTaint.Effect]) == 0 {
+ uniqueTaints[currTaint.Effect] = sets.String{}
+ }
+ uniqueTaints[currTaint.Effect].Insert(currTaint.Key)
+ }
+ return allErrors
+}
+
+func ValidateNodeSpecificAnnotations(annotations map[string]string, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ if annotations[api.TaintsAnnotationKey] != "" {
+ allErrs = append(allErrs, ValidateTaintsInNodeAnnotations(annotations, fldPath)...)
+ }
+
+ if annotations[api.PreferAvoidPodsAnnotationKey] != "" {
+ allErrs = append(allErrs, ValidateAvoidPodsInNodeAnnotations(annotations, fldPath)...)
+ }
+ return allErrs
+}
+
+// ValidateNode tests if required fields in the node are set.
+func ValidateNode(node *api.Node) field.ErrorList {
+ fldPath := field.NewPath("metadata")
+ allErrs := ValidateObjectMeta(&node.ObjectMeta, false, ValidateNodeName, fldPath)
+ allErrs = append(allErrs, ValidateNodeSpecificAnnotations(node.ObjectMeta.Annotations, fldPath.Child("annotations"))...)
+ if len(node.Spec.Taints) > 0 {
+ allErrs = append(allErrs, validateNodeTaints(node.Spec.Taints, fldPath.Child("taints"))...)
+ }
+
+ // Only validate spec. All status fields are optional and can be updated later.
+
+ // external ID is required.
+ if len(node.Spec.ExternalID) == 0 {
+ allErrs = append(allErrs, field.Required(field.NewPath("spec", "externalID"), ""))
+ }
+
+ // TODO(rjnagal): Ignore PodCIDR till its completely implemented.
+ return allErrs
+}
+
+// ValidateNodeUpdate tests to make sure a node update can be applied. Modifies oldNode.
+func ValidateNodeUpdate(node, oldNode *api.Node) field.ErrorList {
+ fldPath := field.NewPath("metadata")
+ allErrs := ValidateObjectMetaUpdate(&node.ObjectMeta, &oldNode.ObjectMeta, fldPath)
+ allErrs = append(allErrs, ValidateNodeSpecificAnnotations(node.ObjectMeta.Annotations, fldPath.Child("annotations"))...)
+
+ // TODO: Enable the code once we have better api object.status update model. Currently,
+ // anyone can update node status.
+ // if !apiequality.Semantic.DeepEqual(node.Status, api.NodeStatus{}) {
+ // allErrs = append(allErrs, field.Invalid("status", node.Status, "must be empty"))
+ // }
+
+ // Validate resource quantities in capacity.
+ for k, v := range node.Status.Capacity {
+ resPath := field.NewPath("status", "capacity", string(k))
+ allErrs = append(allErrs, ValidateResourceQuantityValue(string(k), v, resPath)...)
+ }
+ // Validate resource quantities in allocatable.
+ for k, v := range node.Status.Allocatable {
+ resPath := field.NewPath("status", "allocatable", string(k))
+ allErrs = append(allErrs, ValidateResourceQuantityValue(string(k), v, resPath)...)
+ }
+
+ // Validte no duplicate addresses in node status.
+ addresses := make(map[api.NodeAddress]bool)
+ for i, address := range node.Status.Addresses {
+ if _, ok := addresses[address]; ok {
+ allErrs = append(allErrs, field.Duplicate(field.NewPath("status", "addresses").Index(i), address))
+ }
+ addresses[address] = true
+ }
+
+ if len(oldNode.Spec.PodCIDR) == 0 {
+ // Allow the controller manager to assign a CIDR to a node if it doesn't have one.
+ oldNode.Spec.PodCIDR = node.Spec.PodCIDR
+ } else {
+ if oldNode.Spec.PodCIDR != node.Spec.PodCIDR {
+ allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "podCIDR"), "node updates may not change podCIDR except from \"\" to valid"))
+ }
+ }
+
+ // Allow controller manager updating provider ID when not set
+ if len(oldNode.Spec.ProviderID) == 0 {
+ oldNode.Spec.ProviderID = node.Spec.ProviderID
+ } else {
+ if oldNode.Spec.ProviderID != node.Spec.ProviderID {
+ allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "providerID"), "node updates may not change providerID except from \"\" to valid"))
+ }
+ }
+
+ // TODO: move reset function to its own location
+ // Ignore metadata changes now that they have been tested
+ oldNode.ObjectMeta = node.ObjectMeta
+ // Allow users to update capacity
+ oldNode.Status.Capacity = node.Status.Capacity
+ // Allow users to unschedule node
+ oldNode.Spec.Unschedulable = node.Spec.Unschedulable
+ // Clear status
+ oldNode.Status = node.Status
+
+ // update taints
+ if len(node.Spec.Taints) > 0 {
+ allErrs = append(allErrs, validateNodeTaints(node.Spec.Taints, fldPath.Child("taints"))...)
+ }
+ oldNode.Spec.Taints = node.Spec.Taints
+
+ // TODO: Add a 'real' error type for this error and provide print actual diffs.
+ if !apiequality.Semantic.DeepEqual(oldNode, node) {
+ glog.V(4).Infof("Update failed validation %#v vs %#v", oldNode, node)
+ allErrs = append(allErrs, field.Forbidden(field.NewPath(""), "node updates may only change labels, taints or capacity"))
+ }
+
+ return allErrs
+}
+
+// Validate compute resource typename.
+// Refer to docs/design/resources.md for more details.
+func validateResourceName(value string, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ for _, msg := range validation.IsQualifiedName(value) {
+ allErrs = append(allErrs, field.Invalid(fldPath, value, msg))
+ }
+ if len(allErrs) != 0 {
+ return allErrs
+ }
+
+ if len(strings.Split(value, "/")) == 1 {
+ if !helper.IsStandardResourceName(value) {
+ return append(allErrs, field.Invalid(fldPath, value, "must be a standard resource type or fully qualified"))
+ }
+ }
+
+ return field.ErrorList{}
+}
+
+// Validate container resource name
+// Refer to docs/design/resources.md for more details.
+func validateContainerResourceName(value string, fldPath *field.Path) field.ErrorList {
+ allErrs := validateResourceName(value, fldPath)
+
+ if len(strings.Split(value, "/")) == 1 {
+ if !helper.IsStandardContainerResourceName(value) {
+ return append(allErrs, field.Invalid(fldPath, value, "must be a standard resource for containers"))
+ }
+ }
+ return field.ErrorList{}
+}
+
+// Validate resource names that can go in a resource quota
+// Refer to docs/design/resources.md for more details.
+func ValidateResourceQuotaResourceName(value string, fldPath *field.Path) field.ErrorList {
+ allErrs := validateResourceName(value, fldPath)
+ if len(strings.Split(value, "/")) == 1 {
+ if !helper.IsStandardQuotaResourceName(value) {
+ return append(allErrs, field.Invalid(fldPath, value, isInvalidQuotaResource))
+ }
+ }
+ return field.ErrorList{}
+}
+
+// Validate limit range types
+func validateLimitRangeTypeName(value string, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ for _, msg := range validation.IsQualifiedName(value) {
+ allErrs = append(allErrs, field.Invalid(fldPath, value, msg))
+ }
+ if len(allErrs) != 0 {
+ return allErrs
+ }
+
+ if len(strings.Split(value, "/")) == 1 {
+ if !helper.IsStandardLimitRangeType(value) {
+ return append(allErrs, field.Invalid(fldPath, value, "must be a standard limit type or fully qualified"))
+ }
+ }
+
+ return allErrs
+}
+
+// Validate limit range resource name
+// limit types (other than Pod/Container) could contain storage not just cpu or memory
+func validateLimitRangeResourceName(limitType api.LimitType, value string, fldPath *field.Path) field.ErrorList {
+ switch limitType {
+ case api.LimitTypePod, api.LimitTypeContainer:
+ return validateContainerResourceName(value, fldPath)
+ default:
+ return validateResourceName(value, fldPath)
+ }
+}
+
+// ValidateLimitRange tests if required fields in the LimitRange are set.
+func ValidateLimitRange(limitRange *api.LimitRange) field.ErrorList {
+ allErrs := ValidateObjectMeta(&limitRange.ObjectMeta, true, ValidateLimitRangeName, field.NewPath("metadata"))
+
+ // ensure resource names are properly qualified per docs/design/resources.md
+ limitTypeSet := map[api.LimitType]bool{}
+ fldPath := field.NewPath("spec", "limits")
+ for i := range limitRange.Spec.Limits {
+ idxPath := fldPath.Index(i)
+ limit := &limitRange.Spec.Limits[i]
+ allErrs = append(allErrs, validateLimitRangeTypeName(string(limit.Type), idxPath.Child("type"))...)
+
+ _, found := limitTypeSet[limit.Type]
+ if found {
+ allErrs = append(allErrs, field.Duplicate(idxPath.Child("type"), limit.Type))
+ }
+ limitTypeSet[limit.Type] = true
+
+ keys := sets.String{}
+ min := map[string]resource.Quantity{}
+ max := map[string]resource.Quantity{}
+ defaults := map[string]resource.Quantity{}
+ defaultRequests := map[string]resource.Quantity{}
+ maxLimitRequestRatios := map[string]resource.Quantity{}
+
+ for k, q := range limit.Max {
+ allErrs = append(allErrs, validateLimitRangeResourceName(limit.Type, string(k), idxPath.Child("max").Key(string(k)))...)
+ keys.Insert(string(k))
+ max[string(k)] = q
+ }
+ for k, q := range limit.Min {
+ allErrs = append(allErrs, validateLimitRangeResourceName(limit.Type, string(k), idxPath.Child("min").Key(string(k)))...)
+ keys.Insert(string(k))
+ min[string(k)] = q
+ }
+
+ if limit.Type == api.LimitTypePod {
+ if len(limit.Default) > 0 {
+ allErrs = append(allErrs, field.Forbidden(idxPath.Child("default"), "may not be specified when `type` is 'Pod'"))
+ }
+ if len(limit.DefaultRequest) > 0 {
+ allErrs = append(allErrs, field.Forbidden(idxPath.Child("defaultRequest"), "may not be specified when `type` is 'Pod'"))
+ }
+ } else {
+ for k, q := range limit.Default {
+ allErrs = append(allErrs, validateLimitRangeResourceName(limit.Type, string(k), idxPath.Child("default").Key(string(k)))...)
+ keys.Insert(string(k))
+ defaults[string(k)] = q
+ }
+ for k, q := range limit.DefaultRequest {
+ allErrs = append(allErrs, validateLimitRangeResourceName(limit.Type, string(k), idxPath.Child("defaultRequest").Key(string(k)))...)
+ keys.Insert(string(k))
+ defaultRequests[string(k)] = q
+ }
+ }
+
+ if limit.Type == api.LimitTypePersistentVolumeClaim {
+ _, minQuantityFound := limit.Min[api.ResourceStorage]
+ _, maxQuantityFound := limit.Max[api.ResourceStorage]
+ if !minQuantityFound && !maxQuantityFound {
+ allErrs = append(allErrs, field.Required(idxPath.Child("limits"), "either minimum or maximum storage value is required, but neither was provided"))
+ }
+ }
+
+ for k, q := range limit.MaxLimitRequestRatio {
+ allErrs = append(allErrs, validateLimitRangeResourceName(limit.Type, string(k), idxPath.Child("maxLimitRequestRatio").Key(string(k)))...)
+ keys.Insert(string(k))
+ maxLimitRequestRatios[string(k)] = q
+ }
+
+ for k := range keys {
+ minQuantity, minQuantityFound := min[k]
+ maxQuantity, maxQuantityFound := max[k]
+ defaultQuantity, defaultQuantityFound := defaults[k]
+ defaultRequestQuantity, defaultRequestQuantityFound := defaultRequests[k]
+ maxRatio, maxRatioFound := maxLimitRequestRatios[k]
+
+ if minQuantityFound && maxQuantityFound && minQuantity.Cmp(maxQuantity) > 0 {
+ allErrs = append(allErrs, field.Invalid(idxPath.Child("min").Key(string(k)), minQuantity, fmt.Sprintf("min value %s is greater than max value %s", minQuantity.String(), maxQuantity.String())))
+ }
+
+ if defaultRequestQuantityFound && minQuantityFound && minQuantity.Cmp(defaultRequestQuantity) > 0 {
+ allErrs = append(allErrs, field.Invalid(idxPath.Child("defaultRequest").Key(string(k)), defaultRequestQuantity, fmt.Sprintf("min value %s is greater than default request value %s", minQuantity.String(), defaultRequestQuantity.String())))
+ }
+
+ if defaultRequestQuantityFound && maxQuantityFound && defaultRequestQuantity.Cmp(maxQuantity) > 0 {
+ allErrs = append(allErrs, field.Invalid(idxPath.Child("defaultRequest").Key(string(k)), defaultRequestQuantity, fmt.Sprintf("default request value %s is greater than max value %s", defaultRequestQuantity.String(), maxQuantity.String())))
+ }
+
+ if defaultRequestQuantityFound && defaultQuantityFound && defaultRequestQuantity.Cmp(defaultQuantity) > 0 {
+ allErrs = append(allErrs, field.Invalid(idxPath.Child("defaultRequest").Key(string(k)), defaultRequestQuantity, fmt.Sprintf("default request value %s is greater than default limit value %s", defaultRequestQuantity.String(), defaultQuantity.String())))
+ }
+
+ if defaultQuantityFound && minQuantityFound && minQuantity.Cmp(defaultQuantity) > 0 {
+ allErrs = append(allErrs, field.Invalid(idxPath.Child("default").Key(string(k)), minQuantity, fmt.Sprintf("min value %s is greater than default value %s", minQuantity.String(), defaultQuantity.String())))
+ }
+
+ if defaultQuantityFound && maxQuantityFound && defaultQuantity.Cmp(maxQuantity) > 0 {
+ allErrs = append(allErrs, field.Invalid(idxPath.Child("default").Key(string(k)), maxQuantity, fmt.Sprintf("default value %s is greater than max value %s", defaultQuantity.String(), maxQuantity.String())))
+ }
+ if maxRatioFound && maxRatio.Cmp(*resource.NewQuantity(1, resource.DecimalSI)) < 0 {
+ allErrs = append(allErrs, field.Invalid(idxPath.Child("maxLimitRequestRatio").Key(string(k)), maxRatio, fmt.Sprintf("ratio %s is less than 1", maxRatio.String())))
+ }
+ if maxRatioFound && minQuantityFound && maxQuantityFound {
+ maxRatioValue := float64(maxRatio.Value())
+ minQuantityValue := minQuantity.Value()
+ maxQuantityValue := maxQuantity.Value()
+ if maxRatio.Value() < resource.MaxMilliValue && minQuantityValue < resource.MaxMilliValue && maxQuantityValue < resource.MaxMilliValue {
+ maxRatioValue = float64(maxRatio.MilliValue()) / 1000
+ minQuantityValue = minQuantity.MilliValue()
+ maxQuantityValue = maxQuantity.MilliValue()
+ }
+ maxRatioLimit := float64(maxQuantityValue) / float64(minQuantityValue)
+ if maxRatioValue > maxRatioLimit {
+ allErrs = append(allErrs, field.Invalid(idxPath.Child("maxLimitRequestRatio").Key(string(k)), maxRatio, fmt.Sprintf("ratio %s is greater than max/min = %f", maxRatio.String(), maxRatioLimit)))
+ }
+ }
+ }
+ }
+
+ return allErrs
+}
+
+// ValidateServiceAccount tests if required fields in the ServiceAccount are set.
+func ValidateServiceAccount(serviceAccount *api.ServiceAccount) field.ErrorList {
+ allErrs := ValidateObjectMeta(&serviceAccount.ObjectMeta, true, ValidateServiceAccountName, field.NewPath("metadata"))
+ return allErrs
+}
+
+// ValidateServiceAccountUpdate tests if required fields in the ServiceAccount are set.
+func ValidateServiceAccountUpdate(newServiceAccount, oldServiceAccount *api.ServiceAccount) field.ErrorList {
+ allErrs := ValidateObjectMetaUpdate(&newServiceAccount.ObjectMeta, &oldServiceAccount.ObjectMeta, field.NewPath("metadata"))
+ allErrs = append(allErrs, ValidateServiceAccount(newServiceAccount)...)
+ return allErrs
+}
+
+// ValidateSecret tests if required fields in the Secret are set.
+func ValidateSecret(secret *api.Secret) field.ErrorList {
+ allErrs := ValidateObjectMeta(&secret.ObjectMeta, true, ValidateSecretName, field.NewPath("metadata"))
+
+ dataPath := field.NewPath("data")
+ totalSize := 0
+ for key, value := range secret.Data {
+ for _, msg := range validation.IsConfigMapKey(key) {
+ allErrs = append(allErrs, field.Invalid(dataPath.Key(key), key, msg))
+ }
+ totalSize += len(value)
+ }
+ if totalSize > api.MaxSecretSize {
+ allErrs = append(allErrs, field.TooLong(dataPath, "", api.MaxSecretSize))
+ }
+
+ switch secret.Type {
+ case api.SecretTypeServiceAccountToken:
+ // Only require Annotations[kubernetes.io/service-account.name]
+ // Additional fields (like Annotations[kubernetes.io/service-account.uid] and Data[token]) might be contributed later by a controller loop
+ if value := secret.Annotations[api.ServiceAccountNameKey]; len(value) == 0 {
+ allErrs = append(allErrs, field.Required(field.NewPath("metadata", "annotations").Key(api.ServiceAccountNameKey), ""))
+ }
+ case api.SecretTypeOpaque, "":
+ // no-op
+ case api.SecretTypeDockercfg:
+ dockercfgBytes, exists := secret.Data[api.DockerConfigKey]
+ if !exists {
+ allErrs = append(allErrs, field.Required(dataPath.Key(api.DockerConfigKey), ""))
+ break
+ }
+
+ // make sure that the content is well-formed json.
+ if err := json.Unmarshal(dockercfgBytes, &map[string]interface{}{}); err != nil {
+ allErrs = append(allErrs, field.Invalid(dataPath.Key(api.DockerConfigKey), "<secret contents redacted>", err.Error()))
+ }
+ case api.SecretTypeDockerConfigJson:
+ dockerConfigJsonBytes, exists := secret.Data[api.DockerConfigJsonKey]
+ if !exists {
+ allErrs = append(allErrs, field.Required(dataPath.Key(api.DockerConfigJsonKey), ""))
+ break
+ }
+
+ // make sure that the content is well-formed json.
+ if err := json.Unmarshal(dockerConfigJsonBytes, &map[string]interface{}{}); err != nil {
+ allErrs = append(allErrs, field.Invalid(dataPath.Key(api.DockerConfigJsonKey), "<secret contents redacted>", err.Error()))
+ }
+ case api.SecretTypeBasicAuth:
+ _, usernameFieldExists := secret.Data[api.BasicAuthUsernameKey]
+ _, passwordFieldExists := secret.Data[api.BasicAuthPasswordKey]
+
+ // username or password might be empty, but the field must be present
+ if !usernameFieldExists && !passwordFieldExists {
+ allErrs = append(allErrs, field.Required(field.NewPath("data[%s]").Key(api.BasicAuthUsernameKey), ""))
+ allErrs = append(allErrs, field.Required(field.NewPath("data[%s]").Key(api.BasicAuthPasswordKey), ""))
+ break
+ }
+ case api.SecretTypeSSHAuth:
+ if len(secret.Data[api.SSHAuthPrivateKey]) == 0 {
+ allErrs = append(allErrs, field.Required(field.NewPath("data[%s]").Key(api.SSHAuthPrivateKey), ""))
+ break
+ }
+
+ case api.SecretTypeTLS:
+ if _, exists := secret.Data[api.TLSCertKey]; !exists {
+ allErrs = append(allErrs, field.Required(dataPath.Key(api.TLSCertKey), ""))
+ }
+ if _, exists := secret.Data[api.TLSPrivateKeyKey]; !exists {
+ allErrs = append(allErrs, field.Required(dataPath.Key(api.TLSPrivateKeyKey), ""))
+ }
+ // TODO: Verify that the key matches the cert.
+ default:
+ // no-op
+ }
+
+ return allErrs
+}
+
+// ValidateSecretUpdate tests if required fields in the Secret are set.
+func ValidateSecretUpdate(newSecret, oldSecret *api.Secret) field.ErrorList {
+ allErrs := ValidateObjectMetaUpdate(&newSecret.ObjectMeta, &oldSecret.ObjectMeta, field.NewPath("metadata"))
+
+ if len(newSecret.Type) == 0 {
+ newSecret.Type = oldSecret.Type
+ }
+
+ allErrs = append(allErrs, ValidateImmutableField(newSecret.Type, oldSecret.Type, field.NewPath("type"))...)
+
+ allErrs = append(allErrs, ValidateSecret(newSecret)...)
+ return allErrs
+}
+
+// ValidateConfigMapName can be used to check whether the given ConfigMap name is valid.
+// Prefix indicates this name will be used as part of generation, in which case
+// trailing dashes are allowed.
+var ValidateConfigMapName = NameIsDNSSubdomain
+
+// ValidateConfigMap tests whether required fields in the ConfigMap are set.
+func ValidateConfigMap(cfg *api.ConfigMap) field.ErrorList {
+ allErrs := field.ErrorList{}
+ allErrs = append(allErrs, ValidateObjectMeta(&cfg.ObjectMeta, true, ValidateConfigMapName, field.NewPath("metadata"))...)
+
+ totalSize := 0
+
+ for key, value := range cfg.Data {
+ for _, msg := range validation.IsConfigMapKey(key) {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("data").Key(key), key, msg))
+ }
+ totalSize += len(value)
+ }
+ if totalSize > api.MaxSecretSize {
+ allErrs = append(allErrs, field.TooLong(field.NewPath("data"), "", api.MaxSecretSize))
+ }
+
+ return allErrs
+}
+
+// ValidateConfigMapUpdate tests if required fields in the ConfigMap are set.
+func ValidateConfigMapUpdate(newCfg, oldCfg *api.ConfigMap) field.ErrorList {
+ allErrs := field.ErrorList{}
+ allErrs = append(allErrs, ValidateObjectMetaUpdate(&newCfg.ObjectMeta, &oldCfg.ObjectMeta, field.NewPath("metadata"))...)
+ allErrs = append(allErrs, ValidateConfigMap(newCfg)...)
+
+ return allErrs
+}
+
+func validateBasicResource(quantity resource.Quantity, fldPath *field.Path) field.ErrorList {
+ if quantity.Value() < 0 {
+ return field.ErrorList{field.Invalid(fldPath, quantity.Value(), "must be a valid resource quantity")}
+ }
+ return field.ErrorList{}
+}
+
+// Validates resource requirement spec.
+func ValidateResourceRequirements(requirements *api.ResourceRequirements, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ limPath := fldPath.Child("limits")
+ reqPath := fldPath.Child("requests")
+ for resourceName, quantity := range requirements.Limits {
+ fldPath := limPath.Key(string(resourceName))
+ // Validate resource name.
+ allErrs = append(allErrs, validateContainerResourceName(string(resourceName), fldPath)...)
+
+ // Validate resource quantity.
+ allErrs = append(allErrs, ValidateResourceQuantityValue(string(resourceName), quantity, fldPath)...)
+
+ // Check that request <= limit.
+ requestQuantity, exists := requirements.Requests[resourceName]
+ if exists {
+ // For GPUs, not only requests can't exceed limits, they also can't be lower, i.e. must be equal.
+ if resourceName == api.ResourceNvidiaGPU && quantity.Cmp(requestQuantity) != 0 {
+ allErrs = append(allErrs, field.Invalid(reqPath, requestQuantity.String(), fmt.Sprintf("must be equal to %s limit", api.ResourceNvidiaGPU)))
+ } else if quantity.Cmp(requestQuantity) < 0 {
+ allErrs = append(allErrs, field.Invalid(limPath, quantity.String(), fmt.Sprintf("must be greater than or equal to %s request", resourceName)))
+ }
+ }
+ if resourceName == api.ResourceStorageOverlay && !utilfeature.DefaultFeatureGate.Enabled(features.LocalStorageCapacityIsolation) {
+ allErrs = append(allErrs, field.Forbidden(limPath, "ResourceStorageOverlay field disabled by feature-gate for ResourceRequirements"))
+ }
+ }
+ for resourceName, quantity := range requirements.Requests {
+ fldPath := reqPath.Key(string(resourceName))
+ // Validate resource name.
+ allErrs = append(allErrs, validateContainerResourceName(string(resourceName), fldPath)...)
+ // Validate resource quantity.
+ allErrs = append(allErrs, ValidateResourceQuantityValue(string(resourceName), quantity, fldPath)...)
+ }
+
+ return allErrs
+}
+
+// validateResourceQuotaScopes ensures that each enumerated hard resource constraint is valid for set of scopes
+func validateResourceQuotaScopes(resourceQuotaSpec *api.ResourceQuotaSpec, fld *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(resourceQuotaSpec.Scopes) == 0 {
+ return allErrs
+ }
+ hardLimits := sets.NewString()
+ for k := range resourceQuotaSpec.Hard {
+ hardLimits.Insert(string(k))
+ }
+ fldPath := fld.Child("scopes")
+ scopeSet := sets.NewString()
+ for _, scope := range resourceQuotaSpec.Scopes {
+ if !helper.IsStandardResourceQuotaScope(string(scope)) {
+ allErrs = append(allErrs, field.Invalid(fldPath, resourceQuotaSpec.Scopes, "unsupported scope"))
+ }
+ for _, k := range hardLimits.List() {
+ if helper.IsStandardQuotaResourceName(k) && !helper.IsResourceQuotaScopeValidForResource(scope, k) {
+ allErrs = append(allErrs, field.Invalid(fldPath, resourceQuotaSpec.Scopes, "unsupported scope applied to resource"))
+ }
+ }
+ scopeSet.Insert(string(scope))
+ }
+ invalidScopePairs := []sets.String{
+ sets.NewString(string(api.ResourceQuotaScopeBestEffort), string(api.ResourceQuotaScopeNotBestEffort)),
+ sets.NewString(string(api.ResourceQuotaScopeTerminating), string(api.ResourceQuotaScopeNotTerminating)),
+ }
+ for _, invalidScopePair := range invalidScopePairs {
+ if scopeSet.HasAll(invalidScopePair.List()...) {
+ allErrs = append(allErrs, field.Invalid(fldPath, resourceQuotaSpec.Scopes, "conflicting scopes"))
+ }
+ }
+ return allErrs
+}
+
+// ValidateResourceQuota tests if required fields in the ResourceQuota are set.
+func ValidateResourceQuota(resourceQuota *api.ResourceQuota) field.ErrorList {
+ allErrs := ValidateObjectMeta(&resourceQuota.ObjectMeta, true, ValidateResourceQuotaName, field.NewPath("metadata"))
+
+ allErrs = append(allErrs, ValidateResourceQuotaSpec(&resourceQuota.Spec, field.NewPath("spec"))...)
+ allErrs = append(allErrs, ValidateResourceQuotaStatus(&resourceQuota.Status, field.NewPath("status"))...)
+
+ return allErrs
+}
+
+func ValidateResourceQuotaStatus(status *api.ResourceQuotaStatus, fld *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ fldPath := fld.Child("hard")
+ for k, v := range status.Hard {
+ resPath := fldPath.Key(string(k))
+ allErrs = append(allErrs, ValidateResourceQuotaResourceName(string(k), resPath)...)
+ allErrs = append(allErrs, ValidateResourceQuantityValue(string(k), v, resPath)...)
+ }
+ fldPath = fld.Child("used")
+ for k, v := range status.Used {
+ resPath := fldPath.Key(string(k))
+ allErrs = append(allErrs, ValidateResourceQuotaResourceName(string(k), resPath)...)
+ allErrs = append(allErrs, ValidateResourceQuantityValue(string(k), v, resPath)...)
+ }
+
+ return allErrs
+}
+
+func ValidateResourceQuotaSpec(resourceQuotaSpec *api.ResourceQuotaSpec, fld *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+
+ fldPath := fld.Child("hard")
+ for k, v := range resourceQuotaSpec.Hard {
+ resPath := fldPath.Key(string(k))
+ allErrs = append(allErrs, ValidateResourceQuotaResourceName(string(k), resPath)...)
+ allErrs = append(allErrs, ValidateResourceQuantityValue(string(k), v, resPath)...)
+ }
+ allErrs = append(allErrs, validateResourceQuotaScopes(resourceQuotaSpec, fld)...)
+
+ return allErrs
+}
+
+// ValidateResourceQuantityValue enforces that specified quantity is valid for specified resource
+func ValidateResourceQuantityValue(resource string, value resource.Quantity, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ allErrs = append(allErrs, ValidateNonnegativeQuantity(value, fldPath)...)
+ if helper.IsIntegerResourceName(resource) {
+ if value.MilliValue()%int64(1000) != int64(0) {
+ allErrs = append(allErrs, field.Invalid(fldPath, value, isNotIntegerErrorMsg))
+ }
+ }
+ return allErrs
+}
+
+// ValidateResourceQuotaUpdate tests to see if the update is legal for an end user to make.
+// newResourceQuota is updated with fields that cannot be changed.
+func ValidateResourceQuotaUpdate(newResourceQuota, oldResourceQuota *api.ResourceQuota) field.ErrorList {
+ allErrs := ValidateObjectMetaUpdate(&newResourceQuota.ObjectMeta, &oldResourceQuota.ObjectMeta, field.NewPath("metadata"))
+ allErrs = append(allErrs, ValidateResourceQuotaSpec(&newResourceQuota.Spec, field.NewPath("spec"))...)
+
+ // ensure scopes cannot change, and that resources are still valid for scope
+ fldPath := field.NewPath("spec", "scopes")
+ oldScopes := sets.NewString()
+ newScopes := sets.NewString()
+ for _, scope := range newResourceQuota.Spec.Scopes {
+ newScopes.Insert(string(scope))
+ }
+ for _, scope := range oldResourceQuota.Spec.Scopes {
+ oldScopes.Insert(string(scope))
+ }
+ if !oldScopes.Equal(newScopes) {
+ allErrs = append(allErrs, field.Invalid(fldPath, newResourceQuota.Spec.Scopes, fieldImmutableErrorMsg))
+ }
+
+ newResourceQuota.Status = oldResourceQuota.Status
+ return allErrs
+}
+
+// ValidateResourceQuotaStatusUpdate tests to see if the status update is legal for an end user to make.
+// newResourceQuota is updated with fields that cannot be changed.
+func ValidateResourceQuotaStatusUpdate(newResourceQuota, oldResourceQuota *api.ResourceQuota) field.ErrorList {
+ allErrs := ValidateObjectMetaUpdate(&newResourceQuota.ObjectMeta, &oldResourceQuota.ObjectMeta, field.NewPath("metadata"))
+ if len(newResourceQuota.ResourceVersion) == 0 {
+ allErrs = append(allErrs, field.Required(field.NewPath("resourceVersion"), ""))
+ }
+ fldPath := field.NewPath("status", "hard")
+ for k, v := range newResourceQuota.Status.Hard {
+ resPath := fldPath.Key(string(k))
+ allErrs = append(allErrs, ValidateResourceQuotaResourceName(string(k), resPath)...)
+ allErrs = append(allErrs, ValidateResourceQuantityValue(string(k), v, resPath)...)
+ }
+ fldPath = field.NewPath("status", "used")
+ for k, v := range newResourceQuota.Status.Used {
+ resPath := fldPath.Key(string(k))
+ allErrs = append(allErrs, ValidateResourceQuotaResourceName(string(k), resPath)...)
+ allErrs = append(allErrs, ValidateResourceQuantityValue(string(k), v, resPath)...)
+ }
+ newResourceQuota.Spec = oldResourceQuota.Spec
+ return allErrs
+}
+
+// ValidateNamespace tests if required fields are set.
+func ValidateNamespace(namespace *api.Namespace) field.ErrorList {
+ allErrs := ValidateObjectMeta(&namespace.ObjectMeta, false, ValidateNamespaceName, field.NewPath("metadata"))
+ for i := range namespace.Spec.Finalizers {
+ allErrs = append(allErrs, validateFinalizerName(string(namespace.Spec.Finalizers[i]), field.NewPath("spec", "finalizers"))...)
+ }
+ return allErrs
+}
+
+// Validate finalizer names
+func validateFinalizerName(stringValue string, fldPath *field.Path) field.ErrorList {
+ allErrs := genericvalidation.ValidateFinalizerName(stringValue, fldPath)
+ for _, err := range validateKubeFinalizerName(stringValue, fldPath) {
+ allErrs = append(allErrs, err)
+ }
+
+ return allErrs
+}
+
+// validateKubeFinalizerName checks for "standard" names of legacy finalizer
+func validateKubeFinalizerName(stringValue string, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if len(strings.Split(stringValue, "/")) == 1 {
+ if !helper.IsStandardFinalizerName(stringValue) {
+ return append(allErrs, field.Invalid(fldPath, stringValue, "name is neither a standard finalizer name nor is it fully qualified"))
+ }
+ }
+
+ return allErrs
+}
+
+// ValidateNamespaceUpdate tests to make sure a namespace update can be applied.
+// newNamespace is updated with fields that cannot be changed
+func ValidateNamespaceUpdate(newNamespace *api.Namespace, oldNamespace *api.Namespace) field.ErrorList {
+ allErrs := ValidateObjectMetaUpdate(&newNamespace.ObjectMeta, &oldNamespace.ObjectMeta, field.NewPath("metadata"))
+ newNamespace.Spec.Finalizers = oldNamespace.Spec.Finalizers
+ newNamespace.Status = oldNamespace.Status
+ return allErrs
+}
+
+// ValidateNamespaceStatusUpdate tests to see if the update is legal for an end user to make. newNamespace is updated with fields
+// that cannot be changed.
+func ValidateNamespaceStatusUpdate(newNamespace, oldNamespace *api.Namespace) field.ErrorList {
+ allErrs := ValidateObjectMetaUpdate(&newNamespace.ObjectMeta, &oldNamespace.ObjectMeta, field.NewPath("metadata"))
+ newNamespace.Spec = oldNamespace.Spec
+ if newNamespace.DeletionTimestamp.IsZero() {
+ if newNamespace.Status.Phase != api.NamespaceActive {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("status", "Phase"), newNamespace.Status.Phase, "may only be 'Active' if `deletionTimestamp` is empty"))
+ }
+ } else {
+ if newNamespace.Status.Phase != api.NamespaceTerminating {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("status", "Phase"), newNamespace.Status.Phase, "may only be 'Terminating' if `deletionTimestamp` is not empty"))
+ }
+ }
+ return allErrs
+}
+
+// ValidateNamespaceFinalizeUpdate tests to see if the update is legal for an end user to make.
+// newNamespace is updated with fields that cannot be changed.
+func ValidateNamespaceFinalizeUpdate(newNamespace, oldNamespace *api.Namespace) field.ErrorList {
+ allErrs := ValidateObjectMetaUpdate(&newNamespace.ObjectMeta, &oldNamespace.ObjectMeta, field.NewPath("metadata"))
+
+ fldPath := field.NewPath("spec", "finalizers")
+ for i := range newNamespace.Spec.Finalizers {
+ idxPath := fldPath.Index(i)
+ allErrs = append(allErrs, validateFinalizerName(string(newNamespace.Spec.Finalizers[i]), idxPath)...)
+ }
+ newNamespace.Status = oldNamespace.Status
+ return allErrs
+}
+
+// Construct lookup map of old subset IPs to NodeNames.
+func updateEpAddrToNodeNameMap(ipToNodeName map[string]string, addresses []api.EndpointAddress) {
+ for n := range addresses {
+ if addresses[n].NodeName == nil {
+ continue
+ }
+ ipToNodeName[addresses[n].IP] = *addresses[n].NodeName
+ }
+}
+
+// Build a map across all subsets of IP -> NodeName
+func buildEndpointAddressNodeNameMap(subsets []api.EndpointSubset) map[string]string {
+ ipToNodeName := make(map[string]string)
+ for i := range subsets {
+ updateEpAddrToNodeNameMap(ipToNodeName, subsets[i].Addresses)
+ updateEpAddrToNodeNameMap(ipToNodeName, subsets[i].NotReadyAddresses)
+ }
+ return ipToNodeName
+}
+
+func validateEpAddrNodeNameTransition(addr *api.EndpointAddress, ipToNodeName map[string]string, fldPath *field.Path) field.ErrorList {
+ errList := field.ErrorList{}
+ existingNodeName, found := ipToNodeName[addr.IP]
+ if !found {
+ return errList
+ }
+ if addr.NodeName == nil || *addr.NodeName == existingNodeName {
+ return errList
+ }
+ // NodeName entry found for this endpoint IP, but user is attempting to change NodeName
+ return append(errList, field.Forbidden(fldPath, fmt.Sprintf("Cannot change NodeName for %s to %s", addr.IP, *addr.NodeName)))
+}
+
+// ValidateEndpoints tests if required fields are set.
+func ValidateEndpoints(endpoints *api.Endpoints) field.ErrorList {
+ allErrs := ValidateObjectMeta(&endpoints.ObjectMeta, true, ValidateEndpointsName, field.NewPath("metadata"))
+ allErrs = append(allErrs, ValidateEndpointsSpecificAnnotations(endpoints.Annotations, field.NewPath("annotations"))...)
+ allErrs = append(allErrs, validateEndpointSubsets(endpoints.Subsets, []api.EndpointSubset{}, field.NewPath("subsets"))...)
+ return allErrs
+}
+
+func validateEndpointSubsets(subsets []api.EndpointSubset, oldSubsets []api.EndpointSubset, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ ipToNodeName := buildEndpointAddressNodeNameMap(oldSubsets)
+ for i := range subsets {
+ ss := &subsets[i]
+ idxPath := fldPath.Index(i)
+
+ if len(ss.Addresses) == 0 && len(ss.NotReadyAddresses) == 0 {
+ //TODO: consider adding a RequiredOneOf() error for this and similar cases
+ allErrs = append(allErrs, field.Required(idxPath, "must specify `addresses` or `notReadyAddresses`"))
+ }
+ if len(ss.Ports) == 0 {
+ allErrs = append(allErrs, field.Required(idxPath.Child("ports"), ""))
+ }
+ for addr := range ss.Addresses {
+ allErrs = append(allErrs, validateEndpointAddress(&ss.Addresses[addr], idxPath.Child("addresses").Index(addr), ipToNodeName)...)
+ }
+ for addr := range ss.NotReadyAddresses {
+ allErrs = append(allErrs, validateEndpointAddress(&ss.NotReadyAddresses[addr], idxPath.Child("notReadyAddresses").Index(addr), ipToNodeName)...)
+ }
+ for port := range ss.Ports {
+ allErrs = append(allErrs, validateEndpointPort(&ss.Ports[port], len(ss.Ports) > 1, idxPath.Child("ports").Index(port))...)
+ }
+ }
+
+ return allErrs
+}
+
+func validateEndpointAddress(address *api.EndpointAddress, fldPath *field.Path, ipToNodeName map[string]string) field.ErrorList {
+ allErrs := field.ErrorList{}
+ for _, msg := range validation.IsValidIP(address.IP) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("ip"), address.IP, msg))
+ }
+ if len(address.Hostname) > 0 {
+ allErrs = append(allErrs, ValidateDNS1123Label(address.Hostname, fldPath.Child("hostname"))...)
+ }
+ // During endpoint update, verify that NodeName is a DNS subdomain and transition rules allow the update
+ if address.NodeName != nil {
+ for _, msg := range ValidateNodeName(*address.NodeName, false) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("nodeName"), *address.NodeName, msg))
+ }
+ }
+ allErrs = append(allErrs, validateEpAddrNodeNameTransition(address, ipToNodeName, fldPath.Child("nodeName"))...)
+ if len(allErrs) > 0 {
+ return allErrs
+ }
+ allErrs = append(allErrs, validateNonSpecialIP(address.IP, fldPath.Child("ip"))...)
+ return allErrs
+}
+
+func validateNonSpecialIP(ipAddress string, fldPath *field.Path) field.ErrorList {
+ // We disallow some IPs as endpoints or external-ips. Specifically,
+ // unspecified and loopback addresses are nonsensical and link-local
+ // addresses tend to be used for node-centric purposes (e.g. metadata
+ // service).
+ allErrs := field.ErrorList{}
+ ip := net.ParseIP(ipAddress)
+ if ip == nil {
+ allErrs = append(allErrs, field.Invalid(fldPath, ipAddress, "must be a valid IP address"))
+ return allErrs
+ }
+ if ip.IsUnspecified() {
+ allErrs = append(allErrs, field.Invalid(fldPath, ipAddress, "may not be unspecified (0.0.0.0)"))
+ }
+ if ip.IsLoopback() {
+ allErrs = append(allErrs, field.Invalid(fldPath, ipAddress, "may not be in the loopback range (127.0.0.0/8)"))
+ }
+ if ip.IsLinkLocalUnicast() {
+ allErrs = append(allErrs, field.Invalid(fldPath, ipAddress, "may not be in the link-local range (169.254.0.0/16)"))
+ }
+ if ip.IsLinkLocalMulticast() {
+ allErrs = append(allErrs, field.Invalid(fldPath, ipAddress, "may not be in the link-local multicast range (224.0.0.0/24)"))
+ }
+ return allErrs
+}
+
+func validateEndpointPort(port *api.EndpointPort, requireName bool, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if requireName && len(port.Name) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("name"), ""))
+ } else if len(port.Name) != 0 {
+ allErrs = append(allErrs, ValidateDNS1123Label(port.Name, fldPath.Child("name"))...)
+ }
+ for _, msg := range validation.IsValidPortNum(int(port.Port)) {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("port"), port.Port, msg))
+ }
+ if len(port.Protocol) == 0 {
+ allErrs = append(allErrs, field.Required(fldPath.Child("protocol"), ""))
+ } else if !supportedPortProtocols.Has(string(port.Protocol)) {
+ allErrs = append(allErrs, field.NotSupported(fldPath.Child("protocol"), port.Protocol, supportedPortProtocols.List()))
+ }
+ return allErrs
+}
+
+// ValidateEndpointsUpdate tests to make sure an endpoints update can be applied.
+func ValidateEndpointsUpdate(newEndpoints, oldEndpoints *api.Endpoints) field.ErrorList {
+ allErrs := ValidateObjectMetaUpdate(&newEndpoints.ObjectMeta, &oldEndpoints.ObjectMeta, field.NewPath("metadata"))
+ allErrs = append(allErrs, validateEndpointSubsets(newEndpoints.Subsets, oldEndpoints.Subsets, field.NewPath("subsets"))...)
+ allErrs = append(allErrs, ValidateEndpointsSpecificAnnotations(newEndpoints.Annotations, field.NewPath("annotations"))...)
+ return allErrs
+}
+
+// ValidateSecurityContext ensure the security context contains valid settings
+func ValidateSecurityContext(sc *api.SecurityContext, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ //this should only be true for testing since SecurityContext is defaulted by the api
+ if sc == nil {
+ return allErrs
+ }
+
+ if sc.Privileged != nil {
+ if *sc.Privileged && !capabilities.Get().AllowPrivileged {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("privileged"), "disallowed by cluster policy"))
+ }
+ }
+
+ if sc.RunAsUser != nil {
+ if *sc.RunAsUser < 0 {
+ allErrs = append(allErrs, field.Invalid(fldPath.Child("runAsUser"), *sc.RunAsUser, isNegativeErrorMsg))
+ }
+ }
+ return allErrs
+}
+
+func ValidatePodLogOptions(opts *api.PodLogOptions) field.ErrorList {
+ allErrs := field.ErrorList{}
+ if opts.TailLines != nil && *opts.TailLines < 0 {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("tailLines"), *opts.TailLines, isNegativeErrorMsg))
+ }
+ if opts.LimitBytes != nil && *opts.LimitBytes < 1 {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("limitBytes"), *opts.LimitBytes, "must be greater than 0"))
+ }
+ switch {
+ case opts.SinceSeconds != nil && opts.SinceTime != nil:
+ allErrs = append(allErrs, field.Forbidden(field.NewPath(""), "at most one of `sinceTime` or `sinceSeconds` may be specified"))
+ case opts.SinceSeconds != nil:
+ if *opts.SinceSeconds < 1 {
+ allErrs = append(allErrs, field.Invalid(field.NewPath("sinceSeconds"), *opts.SinceSeconds, "must be greater than 0"))
+ }
+ }
+ return allErrs
+}
+
+// ValidateLoadBalancerStatus validates required fields on a LoadBalancerStatus
+func ValidateLoadBalancerStatus(status *api.LoadBalancerStatus, fldPath *field.Path) field.ErrorList {
+ allErrs := field.ErrorList{}
+ for i, ingress := range status.Ingress {
+ idxPath := fldPath.Child("ingress").Index(i)
+ if len(ingress.IP) > 0 {
+ if isIP := (net.ParseIP(ingress.IP) != nil); !isIP {
+ allErrs = append(allErrs, field.Invalid(idxPath.Child("ip"), ingress.IP, "must be a valid IP address"))
+ }
+ }
+ if len(ingress.Hostname) > 0 {
+ for _, msg := range validation.IsDNS1123Subdomain(ingress.Hostname) {
+ allErrs = append(allErrs, field.Invalid(idxPath.Child("hostname"), ingress.Hostname, msg))
+ }
+ if isIP := (net.ParseIP(ingress.Hostname) != nil); isIP {
+ allErrs = append(allErrs, field.Invalid(idxPath.Child("hostname"), ingress.Hostname, "must be a DNS name, not an IP address"))
+ }
+ }
+ }
+ return allErrs
+}
+
+func sysctlIntersection(a []api.Sysctl, b []api.Sysctl) []string {
+ lookup := make(map[string]struct{}, len(a))
+ result := []string{}
+ for i := range a {
+ lookup[a[i].Name] = struct{}{}
+ }
+ for i := range b {
+ if _, found := lookup[b[i].Name]; found {
+ result = append(result, b[i].Name)
+ }
+ }
+ return result
+}
+
+// validateStorageNodeAffinityAnnotation tests that the serialized TopologyConstraints in PersistentVolume.Annotations has valid data
+func validateStorageNodeAffinityAnnotation(annotations map[string]string, fldPath *field.Path) (bool, field.ErrorList) {
+ allErrs := field.ErrorList{}
+
+ na, err := helper.GetStorageNodeAffinityFromAnnotation(annotations)
+ if err != nil {
+ allErrs = append(allErrs, field.Invalid(fldPath, api.AlphaStorageNodeAffinityAnnotation, err.Error()))
+ return false, allErrs
+ }
+ if na == nil {
+ return false, allErrs
+ }
+
+ if !utilfeature.DefaultFeatureGate.Enabled(features.PersistentLocalVolumes) {
+ allErrs = append(allErrs, field.Forbidden(fldPath, "Storage node affinity is disabled by feature-gate"))
+ }
+
+ policySpecified := false
+ if na.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ allErrs = append(allErrs, ValidateNodeSelector(na.RequiredDuringSchedulingIgnoredDuringExecution, fldPath.Child("requiredDuringSchedulingIgnoredDuringExecution"))...)
+ policySpecified = true
+ }
+
+ if len(na.PreferredDuringSchedulingIgnoredDuringExecution) > 0 {
+ allErrs = append(allErrs, field.Forbidden(fldPath.Child("preferredDuringSchedulingIgnoredDuringExection"), "Storage node affinity does not support preferredDuringSchedulingIgnoredDuringExecution"))
+ }
+ return policySpecified, allErrs
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/api/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/api/zz_generated.deepcopy.go
new file mode 100644
index 000000000..0aa95e107
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/api/zz_generated.deepcopy.go
@@ -0,0 +1,3781 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package api
+
+import (
+ resource "k8s.io/apimachinery/pkg/api/resource"
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ fields "k8s.io/apimachinery/pkg/fields"
+ labels "k8s.io/apimachinery/pkg/labels"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ types "k8s.io/apimachinery/pkg/types"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_AWSElasticBlockStoreVolumeSource, InType: reflect.TypeOf(&AWSElasticBlockStoreVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Affinity, InType: reflect.TypeOf(&Affinity{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_AttachedVolume, InType: reflect.TypeOf(&AttachedVolume{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_AvoidPods, InType: reflect.TypeOf(&AvoidPods{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_AzureDiskVolumeSource, InType: reflect.TypeOf(&AzureDiskVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_AzureFileVolumeSource, InType: reflect.TypeOf(&AzureFileVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Binding, InType: reflect.TypeOf(&Binding{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Capabilities, InType: reflect.TypeOf(&Capabilities{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_CephFSVolumeSource, InType: reflect.TypeOf(&CephFSVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_CinderVolumeSource, InType: reflect.TypeOf(&CinderVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ComponentCondition, InType: reflect.TypeOf(&ComponentCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ComponentStatus, InType: reflect.TypeOf(&ComponentStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ComponentStatusList, InType: reflect.TypeOf(&ComponentStatusList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ConfigMap, InType: reflect.TypeOf(&ConfigMap{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ConfigMapEnvSource, InType: reflect.TypeOf(&ConfigMapEnvSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ConfigMapKeySelector, InType: reflect.TypeOf(&ConfigMapKeySelector{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ConfigMapList, InType: reflect.TypeOf(&ConfigMapList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ConfigMapProjection, InType: reflect.TypeOf(&ConfigMapProjection{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ConfigMapVolumeSource, InType: reflect.TypeOf(&ConfigMapVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Container, InType: reflect.TypeOf(&Container{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ContainerImage, InType: reflect.TypeOf(&ContainerImage{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ContainerPort, InType: reflect.TypeOf(&ContainerPort{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ContainerState, InType: reflect.TypeOf(&ContainerState{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ContainerStateRunning, InType: reflect.TypeOf(&ContainerStateRunning{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ContainerStateTerminated, InType: reflect.TypeOf(&ContainerStateTerminated{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ContainerStateWaiting, InType: reflect.TypeOf(&ContainerStateWaiting{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ContainerStatus, InType: reflect.TypeOf(&ContainerStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_DaemonEndpoint, InType: reflect.TypeOf(&DaemonEndpoint{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_DeleteOptions, InType: reflect.TypeOf(&DeleteOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_DownwardAPIProjection, InType: reflect.TypeOf(&DownwardAPIProjection{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_DownwardAPIVolumeFile, InType: reflect.TypeOf(&DownwardAPIVolumeFile{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_DownwardAPIVolumeSource, InType: reflect.TypeOf(&DownwardAPIVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_EmptyDirVolumeSource, InType: reflect.TypeOf(&EmptyDirVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_EndpointAddress, InType: reflect.TypeOf(&EndpointAddress{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_EndpointPort, InType: reflect.TypeOf(&EndpointPort{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_EndpointSubset, InType: reflect.TypeOf(&EndpointSubset{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Endpoints, InType: reflect.TypeOf(&Endpoints{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_EndpointsList, InType: reflect.TypeOf(&EndpointsList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_EnvFromSource, InType: reflect.TypeOf(&EnvFromSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_EnvVar, InType: reflect.TypeOf(&EnvVar{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_EnvVarSource, InType: reflect.TypeOf(&EnvVarSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Event, InType: reflect.TypeOf(&Event{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_EventList, InType: reflect.TypeOf(&EventList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_EventSource, InType: reflect.TypeOf(&EventSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ExecAction, InType: reflect.TypeOf(&ExecAction{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_FCVolumeSource, InType: reflect.TypeOf(&FCVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_FlexVolumeSource, InType: reflect.TypeOf(&FlexVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_FlockerVolumeSource, InType: reflect.TypeOf(&FlockerVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_GCEPersistentDiskVolumeSource, InType: reflect.TypeOf(&GCEPersistentDiskVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_GitRepoVolumeSource, InType: reflect.TypeOf(&GitRepoVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_GlusterfsVolumeSource, InType: reflect.TypeOf(&GlusterfsVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_HTTPGetAction, InType: reflect.TypeOf(&HTTPGetAction{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_HTTPHeader, InType: reflect.TypeOf(&HTTPHeader{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Handler, InType: reflect.TypeOf(&Handler{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_HostAlias, InType: reflect.TypeOf(&HostAlias{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_HostPathVolumeSource, InType: reflect.TypeOf(&HostPathVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ISCSIVolumeSource, InType: reflect.TypeOf(&ISCSIVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_KeyToPath, InType: reflect.TypeOf(&KeyToPath{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Lifecycle, InType: reflect.TypeOf(&Lifecycle{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_LimitRange, InType: reflect.TypeOf(&LimitRange{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_LimitRangeItem, InType: reflect.TypeOf(&LimitRangeItem{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_LimitRangeList, InType: reflect.TypeOf(&LimitRangeList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_LimitRangeSpec, InType: reflect.TypeOf(&LimitRangeSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_List, InType: reflect.TypeOf(&List{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ListOptions, InType: reflect.TypeOf(&ListOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_LoadBalancerIngress, InType: reflect.TypeOf(&LoadBalancerIngress{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_LoadBalancerStatus, InType: reflect.TypeOf(&LoadBalancerStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_LocalObjectReference, InType: reflect.TypeOf(&LocalObjectReference{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_LocalVolumeSource, InType: reflect.TypeOf(&LocalVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NFSVolumeSource, InType: reflect.TypeOf(&NFSVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Namespace, InType: reflect.TypeOf(&Namespace{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NamespaceList, InType: reflect.TypeOf(&NamespaceList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NamespaceSpec, InType: reflect.TypeOf(&NamespaceSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NamespaceStatus, InType: reflect.TypeOf(&NamespaceStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Node, InType: reflect.TypeOf(&Node{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NodeAddress, InType: reflect.TypeOf(&NodeAddress{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NodeAffinity, InType: reflect.TypeOf(&NodeAffinity{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NodeCondition, InType: reflect.TypeOf(&NodeCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NodeDaemonEndpoints, InType: reflect.TypeOf(&NodeDaemonEndpoints{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NodeList, InType: reflect.TypeOf(&NodeList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NodeProxyOptions, InType: reflect.TypeOf(&NodeProxyOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NodeResources, InType: reflect.TypeOf(&NodeResources{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NodeSelector, InType: reflect.TypeOf(&NodeSelector{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NodeSelectorRequirement, InType: reflect.TypeOf(&NodeSelectorRequirement{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NodeSelectorTerm, InType: reflect.TypeOf(&NodeSelectorTerm{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NodeSpec, InType: reflect.TypeOf(&NodeSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NodeStatus, InType: reflect.TypeOf(&NodeStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_NodeSystemInfo, InType: reflect.TypeOf(&NodeSystemInfo{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ObjectFieldSelector, InType: reflect.TypeOf(&ObjectFieldSelector{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ObjectMeta, InType: reflect.TypeOf(&ObjectMeta{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ObjectReference, InType: reflect.TypeOf(&ObjectReference{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolume, InType: reflect.TypeOf(&PersistentVolume{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeClaim, InType: reflect.TypeOf(&PersistentVolumeClaim{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeClaimList, InType: reflect.TypeOf(&PersistentVolumeClaimList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeClaimSpec, InType: reflect.TypeOf(&PersistentVolumeClaimSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeClaimStatus, InType: reflect.TypeOf(&PersistentVolumeClaimStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeClaimVolumeSource, InType: reflect.TypeOf(&PersistentVolumeClaimVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeList, InType: reflect.TypeOf(&PersistentVolumeList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeSource, InType: reflect.TypeOf(&PersistentVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeSpec, InType: reflect.TypeOf(&PersistentVolumeSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeStatus, InType: reflect.TypeOf(&PersistentVolumeStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PhotonPersistentDiskVolumeSource, InType: reflect.TypeOf(&PhotonPersistentDiskVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Pod, InType: reflect.TypeOf(&Pod{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodAffinity, InType: reflect.TypeOf(&PodAffinity{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodAffinityTerm, InType: reflect.TypeOf(&PodAffinityTerm{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodAntiAffinity, InType: reflect.TypeOf(&PodAntiAffinity{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodAttachOptions, InType: reflect.TypeOf(&PodAttachOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodCondition, InType: reflect.TypeOf(&PodCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodExecOptions, InType: reflect.TypeOf(&PodExecOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodList, InType: reflect.TypeOf(&PodList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodLogOptions, InType: reflect.TypeOf(&PodLogOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodPortForwardOptions, InType: reflect.TypeOf(&PodPortForwardOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodProxyOptions, InType: reflect.TypeOf(&PodProxyOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodSecurityContext, InType: reflect.TypeOf(&PodSecurityContext{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodSignature, InType: reflect.TypeOf(&PodSignature{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodSpec, InType: reflect.TypeOf(&PodSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodStatus, InType: reflect.TypeOf(&PodStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodStatusResult, InType: reflect.TypeOf(&PodStatusResult{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodTemplate, InType: reflect.TypeOf(&PodTemplate{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodTemplateList, InType: reflect.TypeOf(&PodTemplateList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodTemplateSpec, InType: reflect.TypeOf(&PodTemplateSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PortworxVolumeSource, InType: reflect.TypeOf(&PortworxVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Preconditions, InType: reflect.TypeOf(&Preconditions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PreferAvoidPodsEntry, InType: reflect.TypeOf(&PreferAvoidPodsEntry{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PreferredSchedulingTerm, InType: reflect.TypeOf(&PreferredSchedulingTerm{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Probe, InType: reflect.TypeOf(&Probe{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ProjectedVolumeSource, InType: reflect.TypeOf(&ProjectedVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_QuobyteVolumeSource, InType: reflect.TypeOf(&QuobyteVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_RBDVolumeSource, InType: reflect.TypeOf(&RBDVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_RangeAllocation, InType: reflect.TypeOf(&RangeAllocation{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ReplicationController, InType: reflect.TypeOf(&ReplicationController{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ReplicationControllerCondition, InType: reflect.TypeOf(&ReplicationControllerCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ReplicationControllerList, InType: reflect.TypeOf(&ReplicationControllerList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ReplicationControllerSpec, InType: reflect.TypeOf(&ReplicationControllerSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ReplicationControllerStatus, InType: reflect.TypeOf(&ReplicationControllerStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ResourceFieldSelector, InType: reflect.TypeOf(&ResourceFieldSelector{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ResourceQuota, InType: reflect.TypeOf(&ResourceQuota{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ResourceQuotaList, InType: reflect.TypeOf(&ResourceQuotaList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ResourceQuotaSpec, InType: reflect.TypeOf(&ResourceQuotaSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ResourceQuotaStatus, InType: reflect.TypeOf(&ResourceQuotaStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ResourceRequirements, InType: reflect.TypeOf(&ResourceRequirements{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SELinuxOptions, InType: reflect.TypeOf(&SELinuxOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ScaleIOVolumeSource, InType: reflect.TypeOf(&ScaleIOVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Secret, InType: reflect.TypeOf(&Secret{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SecretEnvSource, InType: reflect.TypeOf(&SecretEnvSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SecretKeySelector, InType: reflect.TypeOf(&SecretKeySelector{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SecretList, InType: reflect.TypeOf(&SecretList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SecretProjection, InType: reflect.TypeOf(&SecretProjection{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SecretVolumeSource, InType: reflect.TypeOf(&SecretVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SecurityContext, InType: reflect.TypeOf(&SecurityContext{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SerializedReference, InType: reflect.TypeOf(&SerializedReference{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Service, InType: reflect.TypeOf(&Service{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ServiceAccount, InType: reflect.TypeOf(&ServiceAccount{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ServiceAccountList, InType: reflect.TypeOf(&ServiceAccountList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ServiceList, InType: reflect.TypeOf(&ServiceList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ServicePort, InType: reflect.TypeOf(&ServicePort{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ServiceProxyOptions, InType: reflect.TypeOf(&ServiceProxyOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ServiceSpec, InType: reflect.TypeOf(&ServiceSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ServiceStatus, InType: reflect.TypeOf(&ServiceStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_StorageOSPersistentVolumeSource, InType: reflect.TypeOf(&StorageOSPersistentVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_StorageOSVolumeSource, InType: reflect.TypeOf(&StorageOSVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Sysctl, InType: reflect.TypeOf(&Sysctl{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_TCPSocketAction, InType: reflect.TypeOf(&TCPSocketAction{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Taint, InType: reflect.TypeOf(&Taint{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Toleration, InType: reflect.TypeOf(&Toleration{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Volume, InType: reflect.TypeOf(&Volume{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_VolumeMount, InType: reflect.TypeOf(&VolumeMount{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_VolumeProjection, InType: reflect.TypeOf(&VolumeProjection{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_VolumeSource, InType: reflect.TypeOf(&VolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_VsphereVirtualDiskVolumeSource, InType: reflect.TypeOf(&VsphereVirtualDiskVolumeSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_WeightedPodAffinityTerm, InType: reflect.TypeOf(&WeightedPodAffinityTerm{})},
+ )
+}
+
+// DeepCopy_api_AWSElasticBlockStoreVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_AWSElasticBlockStoreVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*AWSElasticBlockStoreVolumeSource)
+ out := out.(*AWSElasticBlockStoreVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_Affinity is an autogenerated deepcopy function.
+func DeepCopy_api_Affinity(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Affinity)
+ out := out.(*Affinity)
+ *out = *in
+ if in.NodeAffinity != nil {
+ in, out := &in.NodeAffinity, &out.NodeAffinity
+ *out = new(NodeAffinity)
+ if err := DeepCopy_api_NodeAffinity(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.PodAffinity != nil {
+ in, out := &in.PodAffinity, &out.PodAffinity
+ *out = new(PodAffinity)
+ if err := DeepCopy_api_PodAffinity(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.PodAntiAffinity != nil {
+ in, out := &in.PodAntiAffinity, &out.PodAntiAffinity
+ *out = new(PodAntiAffinity)
+ if err := DeepCopy_api_PodAntiAffinity(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_AttachedVolume is an autogenerated deepcopy function.
+func DeepCopy_api_AttachedVolume(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*AttachedVolume)
+ out := out.(*AttachedVolume)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_AvoidPods is an autogenerated deepcopy function.
+func DeepCopy_api_AvoidPods(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*AvoidPods)
+ out := out.(*AvoidPods)
+ *out = *in
+ if in.PreferAvoidPods != nil {
+ in, out := &in.PreferAvoidPods, &out.PreferAvoidPods
+ *out = make([]PreferAvoidPodsEntry, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_PreferAvoidPodsEntry(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_AzureDiskVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_AzureDiskVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*AzureDiskVolumeSource)
+ out := out.(*AzureDiskVolumeSource)
+ *out = *in
+ if in.CachingMode != nil {
+ in, out := &in.CachingMode, &out.CachingMode
+ *out = new(AzureDataDiskCachingMode)
+ **out = **in
+ }
+ if in.FSType != nil {
+ in, out := &in.FSType, &out.FSType
+ *out = new(string)
+ **out = **in
+ }
+ if in.ReadOnly != nil {
+ in, out := &in.ReadOnly, &out.ReadOnly
+ *out = new(bool)
+ **out = **in
+ }
+ if in.Kind != nil {
+ in, out := &in.Kind, &out.Kind
+ *out = new(AzureDataDiskKind)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_AzureFileVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_AzureFileVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*AzureFileVolumeSource)
+ out := out.(*AzureFileVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_Binding is an autogenerated deepcopy function.
+func DeepCopy_api_Binding(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Binding)
+ out := out.(*Binding)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_Capabilities is an autogenerated deepcopy function.
+func DeepCopy_api_Capabilities(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Capabilities)
+ out := out.(*Capabilities)
+ *out = *in
+ if in.Add != nil {
+ in, out := &in.Add, &out.Add
+ *out = make([]Capability, len(*in))
+ copy(*out, *in)
+ }
+ if in.Drop != nil {
+ in, out := &in.Drop, &out.Drop
+ *out = make([]Capability, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_CephFSVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_CephFSVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CephFSVolumeSource)
+ out := out.(*CephFSVolumeSource)
+ *out = *in
+ if in.Monitors != nil {
+ in, out := &in.Monitors, &out.Monitors
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_CinderVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_CinderVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CinderVolumeSource)
+ out := out.(*CinderVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_ComponentCondition is an autogenerated deepcopy function.
+func DeepCopy_api_ComponentCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ComponentCondition)
+ out := out.(*ComponentCondition)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_ComponentStatus is an autogenerated deepcopy function.
+func DeepCopy_api_ComponentStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ComponentStatus)
+ out := out.(*ComponentStatus)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]ComponentCondition, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ComponentStatusList is an autogenerated deepcopy function.
+func DeepCopy_api_ComponentStatusList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ComponentStatusList)
+ out := out.(*ComponentStatusList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ComponentStatus, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_ComponentStatus(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ConfigMap is an autogenerated deepcopy function.
+func DeepCopy_api_ConfigMap(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ConfigMap)
+ out := out.(*ConfigMap)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Data != nil {
+ in, out := &in.Data, &out.Data
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ConfigMapEnvSource is an autogenerated deepcopy function.
+func DeepCopy_api_ConfigMapEnvSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ConfigMapEnvSource)
+ out := out.(*ConfigMapEnvSource)
+ *out = *in
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ConfigMapKeySelector is an autogenerated deepcopy function.
+func DeepCopy_api_ConfigMapKeySelector(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ConfigMapKeySelector)
+ out := out.(*ConfigMapKeySelector)
+ *out = *in
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ConfigMapList is an autogenerated deepcopy function.
+func DeepCopy_api_ConfigMapList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ConfigMapList)
+ out := out.(*ConfigMapList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ConfigMap, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_ConfigMap(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ConfigMapProjection is an autogenerated deepcopy function.
+func DeepCopy_api_ConfigMapProjection(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ConfigMapProjection)
+ out := out.(*ConfigMapProjection)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]KeyToPath, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_KeyToPath(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ConfigMapVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_ConfigMapVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ConfigMapVolumeSource)
+ out := out.(*ConfigMapVolumeSource)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]KeyToPath, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_KeyToPath(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.DefaultMode != nil {
+ in, out := &in.DefaultMode, &out.DefaultMode
+ *out = new(int32)
+ **out = **in
+ }
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_Container is an autogenerated deepcopy function.
+func DeepCopy_api_Container(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Container)
+ out := out.(*Container)
+ *out = *in
+ if in.Command != nil {
+ in, out := &in.Command, &out.Command
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Args != nil {
+ in, out := &in.Args, &out.Args
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]ContainerPort, len(*in))
+ copy(*out, *in)
+ }
+ if in.EnvFrom != nil {
+ in, out := &in.EnvFrom, &out.EnvFrom
+ *out = make([]EnvFromSource, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_EnvFromSource(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Env != nil {
+ in, out := &in.Env, &out.Env
+ *out = make([]EnvVar, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_EnvVar(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if err := DeepCopy_api_ResourceRequirements(&in.Resources, &out.Resources, c); err != nil {
+ return err
+ }
+ if in.VolumeMounts != nil {
+ in, out := &in.VolumeMounts, &out.VolumeMounts
+ *out = make([]VolumeMount, len(*in))
+ copy(*out, *in)
+ }
+ if in.LivenessProbe != nil {
+ in, out := &in.LivenessProbe, &out.LivenessProbe
+ *out = new(Probe)
+ if err := DeepCopy_api_Probe(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.ReadinessProbe != nil {
+ in, out := &in.ReadinessProbe, &out.ReadinessProbe
+ *out = new(Probe)
+ if err := DeepCopy_api_Probe(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Lifecycle != nil {
+ in, out := &in.Lifecycle, &out.Lifecycle
+ *out = new(Lifecycle)
+ if err := DeepCopy_api_Lifecycle(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.SecurityContext != nil {
+ in, out := &in.SecurityContext, &out.SecurityContext
+ *out = new(SecurityContext)
+ if err := DeepCopy_api_SecurityContext(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ContainerImage is an autogenerated deepcopy function.
+func DeepCopy_api_ContainerImage(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ContainerImage)
+ out := out.(*ContainerImage)
+ *out = *in
+ if in.Names != nil {
+ in, out := &in.Names, &out.Names
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ContainerPort is an autogenerated deepcopy function.
+func DeepCopy_api_ContainerPort(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ContainerPort)
+ out := out.(*ContainerPort)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_ContainerState is an autogenerated deepcopy function.
+func DeepCopy_api_ContainerState(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ContainerState)
+ out := out.(*ContainerState)
+ *out = *in
+ if in.Waiting != nil {
+ in, out := &in.Waiting, &out.Waiting
+ *out = new(ContainerStateWaiting)
+ **out = **in
+ }
+ if in.Running != nil {
+ in, out := &in.Running, &out.Running
+ *out = new(ContainerStateRunning)
+ if err := DeepCopy_api_ContainerStateRunning(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Terminated != nil {
+ in, out := &in.Terminated, &out.Terminated
+ *out = new(ContainerStateTerminated)
+ if err := DeepCopy_api_ContainerStateTerminated(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ContainerStateRunning is an autogenerated deepcopy function.
+func DeepCopy_api_ContainerStateRunning(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ContainerStateRunning)
+ out := out.(*ContainerStateRunning)
+ *out = *in
+ out.StartedAt = in.StartedAt.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_api_ContainerStateTerminated is an autogenerated deepcopy function.
+func DeepCopy_api_ContainerStateTerminated(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ContainerStateTerminated)
+ out := out.(*ContainerStateTerminated)
+ *out = *in
+ out.StartedAt = in.StartedAt.DeepCopy()
+ out.FinishedAt = in.FinishedAt.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_api_ContainerStateWaiting is an autogenerated deepcopy function.
+func DeepCopy_api_ContainerStateWaiting(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ContainerStateWaiting)
+ out := out.(*ContainerStateWaiting)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_ContainerStatus is an autogenerated deepcopy function.
+func DeepCopy_api_ContainerStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ContainerStatus)
+ out := out.(*ContainerStatus)
+ *out = *in
+ if err := DeepCopy_api_ContainerState(&in.State, &out.State, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_api_ContainerState(&in.LastTerminationState, &out.LastTerminationState, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_DaemonEndpoint is an autogenerated deepcopy function.
+func DeepCopy_api_DaemonEndpoint(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DaemonEndpoint)
+ out := out.(*DaemonEndpoint)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_DeleteOptions is an autogenerated deepcopy function.
+func DeepCopy_api_DeleteOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeleteOptions)
+ out := out.(*DeleteOptions)
+ *out = *in
+ if in.GracePeriodSeconds != nil {
+ in, out := &in.GracePeriodSeconds, &out.GracePeriodSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.Preconditions != nil {
+ in, out := &in.Preconditions, &out.Preconditions
+ *out = new(Preconditions)
+ if err := DeepCopy_api_Preconditions(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.OrphanDependents != nil {
+ in, out := &in.OrphanDependents, &out.OrphanDependents
+ *out = new(bool)
+ **out = **in
+ }
+ if in.PropagationPolicy != nil {
+ in, out := &in.PropagationPolicy, &out.PropagationPolicy
+ *out = new(DeletionPropagation)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_DownwardAPIProjection is an autogenerated deepcopy function.
+func DeepCopy_api_DownwardAPIProjection(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DownwardAPIProjection)
+ out := out.(*DownwardAPIProjection)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]DownwardAPIVolumeFile, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_DownwardAPIVolumeFile(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_DownwardAPIVolumeFile is an autogenerated deepcopy function.
+func DeepCopy_api_DownwardAPIVolumeFile(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DownwardAPIVolumeFile)
+ out := out.(*DownwardAPIVolumeFile)
+ *out = *in
+ if in.FieldRef != nil {
+ in, out := &in.FieldRef, &out.FieldRef
+ *out = new(ObjectFieldSelector)
+ **out = **in
+ }
+ if in.ResourceFieldRef != nil {
+ in, out := &in.ResourceFieldRef, &out.ResourceFieldRef
+ *out = new(ResourceFieldSelector)
+ if err := DeepCopy_api_ResourceFieldSelector(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Mode != nil {
+ in, out := &in.Mode, &out.Mode
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_DownwardAPIVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_DownwardAPIVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DownwardAPIVolumeSource)
+ out := out.(*DownwardAPIVolumeSource)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]DownwardAPIVolumeFile, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_DownwardAPIVolumeFile(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.DefaultMode != nil {
+ in, out := &in.DefaultMode, &out.DefaultMode
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_EmptyDirVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_EmptyDirVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EmptyDirVolumeSource)
+ out := out.(*EmptyDirVolumeSource)
+ *out = *in
+ if in.SizeLimit != nil {
+ in, out := &in.SizeLimit, &out.SizeLimit
+ *out = new(resource.Quantity)
+ **out = (*in).DeepCopy()
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_EndpointAddress is an autogenerated deepcopy function.
+func DeepCopy_api_EndpointAddress(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EndpointAddress)
+ out := out.(*EndpointAddress)
+ *out = *in
+ if in.NodeName != nil {
+ in, out := &in.NodeName, &out.NodeName
+ *out = new(string)
+ **out = **in
+ }
+ if in.TargetRef != nil {
+ in, out := &in.TargetRef, &out.TargetRef
+ *out = new(ObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_EndpointPort is an autogenerated deepcopy function.
+func DeepCopy_api_EndpointPort(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EndpointPort)
+ out := out.(*EndpointPort)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_EndpointSubset is an autogenerated deepcopy function.
+func DeepCopy_api_EndpointSubset(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EndpointSubset)
+ out := out.(*EndpointSubset)
+ *out = *in
+ if in.Addresses != nil {
+ in, out := &in.Addresses, &out.Addresses
+ *out = make([]EndpointAddress, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_EndpointAddress(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.NotReadyAddresses != nil {
+ in, out := &in.NotReadyAddresses, &out.NotReadyAddresses
+ *out = make([]EndpointAddress, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_EndpointAddress(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]EndpointPort, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_Endpoints is an autogenerated deepcopy function.
+func DeepCopy_api_Endpoints(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Endpoints)
+ out := out.(*Endpoints)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Subsets != nil {
+ in, out := &in.Subsets, &out.Subsets
+ *out = make([]EndpointSubset, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_EndpointSubset(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_EndpointsList is an autogenerated deepcopy function.
+func DeepCopy_api_EndpointsList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EndpointsList)
+ out := out.(*EndpointsList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Endpoints, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_Endpoints(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_EnvFromSource is an autogenerated deepcopy function.
+func DeepCopy_api_EnvFromSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EnvFromSource)
+ out := out.(*EnvFromSource)
+ *out = *in
+ if in.ConfigMapRef != nil {
+ in, out := &in.ConfigMapRef, &out.ConfigMapRef
+ *out = new(ConfigMapEnvSource)
+ if err := DeepCopy_api_ConfigMapEnvSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(SecretEnvSource)
+ if err := DeepCopy_api_SecretEnvSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_EnvVar is an autogenerated deepcopy function.
+func DeepCopy_api_EnvVar(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EnvVar)
+ out := out.(*EnvVar)
+ *out = *in
+ if in.ValueFrom != nil {
+ in, out := &in.ValueFrom, &out.ValueFrom
+ *out = new(EnvVarSource)
+ if err := DeepCopy_api_EnvVarSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_EnvVarSource is an autogenerated deepcopy function.
+func DeepCopy_api_EnvVarSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EnvVarSource)
+ out := out.(*EnvVarSource)
+ *out = *in
+ if in.FieldRef != nil {
+ in, out := &in.FieldRef, &out.FieldRef
+ *out = new(ObjectFieldSelector)
+ **out = **in
+ }
+ if in.ResourceFieldRef != nil {
+ in, out := &in.ResourceFieldRef, &out.ResourceFieldRef
+ *out = new(ResourceFieldSelector)
+ if err := DeepCopy_api_ResourceFieldSelector(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.ConfigMapKeyRef != nil {
+ in, out := &in.ConfigMapKeyRef, &out.ConfigMapKeyRef
+ *out = new(ConfigMapKeySelector)
+ if err := DeepCopy_api_ConfigMapKeySelector(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.SecretKeyRef != nil {
+ in, out := &in.SecretKeyRef, &out.SecretKeyRef
+ *out = new(SecretKeySelector)
+ if err := DeepCopy_api_SecretKeySelector(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_Event is an autogenerated deepcopy function.
+func DeepCopy_api_Event(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Event)
+ out := out.(*Event)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ out.FirstTimestamp = in.FirstTimestamp.DeepCopy()
+ out.LastTimestamp = in.LastTimestamp.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_api_EventList is an autogenerated deepcopy function.
+func DeepCopy_api_EventList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EventList)
+ out := out.(*EventList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Event, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_Event(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_EventSource is an autogenerated deepcopy function.
+func DeepCopy_api_EventSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*EventSource)
+ out := out.(*EventSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_ExecAction is an autogenerated deepcopy function.
+func DeepCopy_api_ExecAction(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ExecAction)
+ out := out.(*ExecAction)
+ *out = *in
+ if in.Command != nil {
+ in, out := &in.Command, &out.Command
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_FCVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_FCVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*FCVolumeSource)
+ out := out.(*FCVolumeSource)
+ *out = *in
+ if in.TargetWWNs != nil {
+ in, out := &in.TargetWWNs, &out.TargetWWNs
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Lun != nil {
+ in, out := &in.Lun, &out.Lun
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_FlexVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_FlexVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*FlexVolumeSource)
+ out := out.(*FlexVolumeSource)
+ *out = *in
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = **in
+ }
+ if in.Options != nil {
+ in, out := &in.Options, &out.Options
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_FlockerVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_FlockerVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*FlockerVolumeSource)
+ out := out.(*FlockerVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_GCEPersistentDiskVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_GCEPersistentDiskVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*GCEPersistentDiskVolumeSource)
+ out := out.(*GCEPersistentDiskVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_GitRepoVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_GitRepoVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*GitRepoVolumeSource)
+ out := out.(*GitRepoVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_GlusterfsVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_GlusterfsVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*GlusterfsVolumeSource)
+ out := out.(*GlusterfsVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_HTTPGetAction is an autogenerated deepcopy function.
+func DeepCopy_api_HTTPGetAction(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HTTPGetAction)
+ out := out.(*HTTPGetAction)
+ *out = *in
+ if in.HTTPHeaders != nil {
+ in, out := &in.HTTPHeaders, &out.HTTPHeaders
+ *out = make([]HTTPHeader, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_HTTPHeader is an autogenerated deepcopy function.
+func DeepCopy_api_HTTPHeader(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HTTPHeader)
+ out := out.(*HTTPHeader)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_Handler is an autogenerated deepcopy function.
+func DeepCopy_api_Handler(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Handler)
+ out := out.(*Handler)
+ *out = *in
+ if in.Exec != nil {
+ in, out := &in.Exec, &out.Exec
+ *out = new(ExecAction)
+ if err := DeepCopy_api_ExecAction(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.HTTPGet != nil {
+ in, out := &in.HTTPGet, &out.HTTPGet
+ *out = new(HTTPGetAction)
+ if err := DeepCopy_api_HTTPGetAction(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.TCPSocket != nil {
+ in, out := &in.TCPSocket, &out.TCPSocket
+ *out = new(TCPSocketAction)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_HostAlias is an autogenerated deepcopy function.
+func DeepCopy_api_HostAlias(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HostAlias)
+ out := out.(*HostAlias)
+ *out = *in
+ if in.Hostnames != nil {
+ in, out := &in.Hostnames, &out.Hostnames
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_HostPathVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_HostPathVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HostPathVolumeSource)
+ out := out.(*HostPathVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_ISCSIVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_ISCSIVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ISCSIVolumeSource)
+ out := out.(*ISCSIVolumeSource)
+ *out = *in
+ if in.Portals != nil {
+ in, out := &in.Portals, &out.Portals
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_KeyToPath is an autogenerated deepcopy function.
+func DeepCopy_api_KeyToPath(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*KeyToPath)
+ out := out.(*KeyToPath)
+ *out = *in
+ if in.Mode != nil {
+ in, out := &in.Mode, &out.Mode
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_Lifecycle is an autogenerated deepcopy function.
+func DeepCopy_api_Lifecycle(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Lifecycle)
+ out := out.(*Lifecycle)
+ *out = *in
+ if in.PostStart != nil {
+ in, out := &in.PostStart, &out.PostStart
+ *out = new(Handler)
+ if err := DeepCopy_api_Handler(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.PreStop != nil {
+ in, out := &in.PreStop, &out.PreStop
+ *out = new(Handler)
+ if err := DeepCopy_api_Handler(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_LimitRange is an autogenerated deepcopy function.
+func DeepCopy_api_LimitRange(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LimitRange)
+ out := out.(*LimitRange)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_api_LimitRangeSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_LimitRangeItem is an autogenerated deepcopy function.
+func DeepCopy_api_LimitRangeItem(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LimitRangeItem)
+ out := out.(*LimitRangeItem)
+ *out = *in
+ if in.Max != nil {
+ in, out := &in.Max, &out.Max
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Min != nil {
+ in, out := &in.Min, &out.Min
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Default != nil {
+ in, out := &in.Default, &out.Default
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.DefaultRequest != nil {
+ in, out := &in.DefaultRequest, &out.DefaultRequest
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.MaxLimitRequestRatio != nil {
+ in, out := &in.MaxLimitRequestRatio, &out.MaxLimitRequestRatio
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_LimitRangeList is an autogenerated deepcopy function.
+func DeepCopy_api_LimitRangeList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LimitRangeList)
+ out := out.(*LimitRangeList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]LimitRange, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_LimitRange(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_LimitRangeSpec is an autogenerated deepcopy function.
+func DeepCopy_api_LimitRangeSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LimitRangeSpec)
+ out := out.(*LimitRangeSpec)
+ *out = *in
+ if in.Limits != nil {
+ in, out := &in.Limits, &out.Limits
+ *out = make([]LimitRangeItem, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_LimitRangeItem(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_List is an autogenerated deepcopy function.
+func DeepCopy_api_List(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*List)
+ out := out.(*List)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]runtime.Object, len(*in))
+ for i := range *in {
+ if newVal, err := c.DeepCopy(&(*in)[i]); err != nil {
+ return err
+ } else {
+ (*out)[i] = *newVal.(*runtime.Object)
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ListOptions is an autogenerated deepcopy function.
+func DeepCopy_api_ListOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ListOptions)
+ out := out.(*ListOptions)
+ *out = *in
+ // in.LabelSelector is kind 'Interface'
+ if in.LabelSelector != nil {
+ if newVal, err := c.DeepCopy(&in.LabelSelector); err != nil {
+ return err
+ } else {
+ out.LabelSelector = *newVal.(*labels.Selector)
+ }
+ }
+ // in.FieldSelector is kind 'Interface'
+ if in.FieldSelector != nil {
+ if newVal, err := c.DeepCopy(&in.FieldSelector); err != nil {
+ return err
+ } else {
+ out.FieldSelector = *newVal.(*fields.Selector)
+ }
+ }
+ if in.TimeoutSeconds != nil {
+ in, out := &in.TimeoutSeconds, &out.TimeoutSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_LoadBalancerIngress is an autogenerated deepcopy function.
+func DeepCopy_api_LoadBalancerIngress(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LoadBalancerIngress)
+ out := out.(*LoadBalancerIngress)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_LoadBalancerStatus is an autogenerated deepcopy function.
+func DeepCopy_api_LoadBalancerStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LoadBalancerStatus)
+ out := out.(*LoadBalancerStatus)
+ *out = *in
+ if in.Ingress != nil {
+ in, out := &in.Ingress, &out.Ingress
+ *out = make([]LoadBalancerIngress, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_LocalObjectReference is an autogenerated deepcopy function.
+func DeepCopy_api_LocalObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LocalObjectReference)
+ out := out.(*LocalObjectReference)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_LocalVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_LocalVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LocalVolumeSource)
+ out := out.(*LocalVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_NFSVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_NFSVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NFSVolumeSource)
+ out := out.(*NFSVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_Namespace is an autogenerated deepcopy function.
+func DeepCopy_api_Namespace(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Namespace)
+ out := out.(*Namespace)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_api_NamespaceSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_NamespaceList is an autogenerated deepcopy function.
+func DeepCopy_api_NamespaceList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NamespaceList)
+ out := out.(*NamespaceList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Namespace, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_Namespace(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_NamespaceSpec is an autogenerated deepcopy function.
+func DeepCopy_api_NamespaceSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NamespaceSpec)
+ out := out.(*NamespaceSpec)
+ *out = *in
+ if in.Finalizers != nil {
+ in, out := &in.Finalizers, &out.Finalizers
+ *out = make([]FinalizerName, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_NamespaceStatus is an autogenerated deepcopy function.
+func DeepCopy_api_NamespaceStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NamespaceStatus)
+ out := out.(*NamespaceStatus)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_Node is an autogenerated deepcopy function.
+func DeepCopy_api_Node(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Node)
+ out := out.(*Node)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_api_NodeSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_api_NodeStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_NodeAddress is an autogenerated deepcopy function.
+func DeepCopy_api_NodeAddress(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeAddress)
+ out := out.(*NodeAddress)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_NodeAffinity is an autogenerated deepcopy function.
+func DeepCopy_api_NodeAffinity(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeAffinity)
+ out := out.(*NodeAffinity)
+ *out = *in
+ if in.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution
+ *out = new(NodeSelector)
+ if err := DeepCopy_api_NodeSelector(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.PreferredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution
+ *out = make([]PreferredSchedulingTerm, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_PreferredSchedulingTerm(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_NodeCondition is an autogenerated deepcopy function.
+func DeepCopy_api_NodeCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeCondition)
+ out := out.(*NodeCondition)
+ *out = *in
+ out.LastHeartbeatTime = in.LastHeartbeatTime.DeepCopy()
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_api_NodeDaemonEndpoints is an autogenerated deepcopy function.
+func DeepCopy_api_NodeDaemonEndpoints(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeDaemonEndpoints)
+ out := out.(*NodeDaemonEndpoints)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_NodeList is an autogenerated deepcopy function.
+func DeepCopy_api_NodeList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeList)
+ out := out.(*NodeList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Node, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_Node(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_NodeProxyOptions is an autogenerated deepcopy function.
+func DeepCopy_api_NodeProxyOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeProxyOptions)
+ out := out.(*NodeProxyOptions)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_NodeResources is an autogenerated deepcopy function.
+func DeepCopy_api_NodeResources(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeResources)
+ out := out.(*NodeResources)
+ *out = *in
+ if in.Capacity != nil {
+ in, out := &in.Capacity, &out.Capacity
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_NodeSelector is an autogenerated deepcopy function.
+func DeepCopy_api_NodeSelector(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeSelector)
+ out := out.(*NodeSelector)
+ *out = *in
+ if in.NodeSelectorTerms != nil {
+ in, out := &in.NodeSelectorTerms, &out.NodeSelectorTerms
+ *out = make([]NodeSelectorTerm, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_NodeSelectorTerm(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_NodeSelectorRequirement is an autogenerated deepcopy function.
+func DeepCopy_api_NodeSelectorRequirement(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeSelectorRequirement)
+ out := out.(*NodeSelectorRequirement)
+ *out = *in
+ if in.Values != nil {
+ in, out := &in.Values, &out.Values
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_NodeSelectorTerm is an autogenerated deepcopy function.
+func DeepCopy_api_NodeSelectorTerm(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeSelectorTerm)
+ out := out.(*NodeSelectorTerm)
+ *out = *in
+ if in.MatchExpressions != nil {
+ in, out := &in.MatchExpressions, &out.MatchExpressions
+ *out = make([]NodeSelectorRequirement, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_NodeSelectorRequirement(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_NodeSpec is an autogenerated deepcopy function.
+func DeepCopy_api_NodeSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeSpec)
+ out := out.(*NodeSpec)
+ *out = *in
+ if in.Taints != nil {
+ in, out := &in.Taints, &out.Taints
+ *out = make([]Taint, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_Taint(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_NodeStatus is an autogenerated deepcopy function.
+func DeepCopy_api_NodeStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeStatus)
+ out := out.(*NodeStatus)
+ *out = *in
+ if in.Capacity != nil {
+ in, out := &in.Capacity, &out.Capacity
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Allocatable != nil {
+ in, out := &in.Allocatable, &out.Allocatable
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]NodeCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_NodeCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Addresses != nil {
+ in, out := &in.Addresses, &out.Addresses
+ *out = make([]NodeAddress, len(*in))
+ copy(*out, *in)
+ }
+ if in.Images != nil {
+ in, out := &in.Images, &out.Images
+ *out = make([]ContainerImage, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_ContainerImage(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.VolumesInUse != nil {
+ in, out := &in.VolumesInUse, &out.VolumesInUse
+ *out = make([]UniqueVolumeName, len(*in))
+ copy(*out, *in)
+ }
+ if in.VolumesAttached != nil {
+ in, out := &in.VolumesAttached, &out.VolumesAttached
+ *out = make([]AttachedVolume, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_NodeSystemInfo is an autogenerated deepcopy function.
+func DeepCopy_api_NodeSystemInfo(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NodeSystemInfo)
+ out := out.(*NodeSystemInfo)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_ObjectFieldSelector is an autogenerated deepcopy function.
+func DeepCopy_api_ObjectFieldSelector(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ObjectFieldSelector)
+ out := out.(*ObjectFieldSelector)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_ObjectMeta is an autogenerated deepcopy function.
+func DeepCopy_api_ObjectMeta(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ObjectMeta)
+ out := out.(*ObjectMeta)
+ *out = *in
+ out.CreationTimestamp = in.CreationTimestamp.DeepCopy()
+ if in.DeletionTimestamp != nil {
+ in, out := &in.DeletionTimestamp, &out.DeletionTimestamp
+ *out = new(v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ if in.DeletionGracePeriodSeconds != nil {
+ in, out := &in.DeletionGracePeriodSeconds, &out.DeletionGracePeriodSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.Labels != nil {
+ in, out := &in.Labels, &out.Labels
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ if in.Annotations != nil {
+ in, out := &in.Annotations, &out.Annotations
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ if in.OwnerReferences != nil {
+ in, out := &in.OwnerReferences, &out.OwnerReferences
+ *out = make([]v1.OwnerReference, len(*in))
+ for i := range *in {
+ if newVal, err := c.DeepCopy(&(*in)[i]); err != nil {
+ return err
+ } else {
+ (*out)[i] = *newVal.(*v1.OwnerReference)
+ }
+ }
+ }
+ if in.Initializers != nil {
+ in, out := &in.Initializers, &out.Initializers
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.Initializers)
+ }
+ }
+ if in.Finalizers != nil {
+ in, out := &in.Finalizers, &out.Finalizers
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ObjectReference is an autogenerated deepcopy function.
+func DeepCopy_api_ObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ObjectReference)
+ out := out.(*ObjectReference)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_PersistentVolume is an autogenerated deepcopy function.
+func DeepCopy_api_PersistentVolume(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolume)
+ out := out.(*PersistentVolume)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_api_PersistentVolumeSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PersistentVolumeClaim is an autogenerated deepcopy function.
+func DeepCopy_api_PersistentVolumeClaim(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeClaim)
+ out := out.(*PersistentVolumeClaim)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_api_PersistentVolumeClaimSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_api_PersistentVolumeClaimStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PersistentVolumeClaimList is an autogenerated deepcopy function.
+func DeepCopy_api_PersistentVolumeClaimList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeClaimList)
+ out := out.(*PersistentVolumeClaimList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PersistentVolumeClaim, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_PersistentVolumeClaim(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PersistentVolumeClaimSpec is an autogenerated deepcopy function.
+func DeepCopy_api_PersistentVolumeClaimSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeClaimSpec)
+ out := out.(*PersistentVolumeClaimSpec)
+ *out = *in
+ if in.AccessModes != nil {
+ in, out := &in.AccessModes, &out.AccessModes
+ *out = make([]PersistentVolumeAccessMode, len(*in))
+ copy(*out, *in)
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if err := DeepCopy_api_ResourceRequirements(&in.Resources, &out.Resources, c); err != nil {
+ return err
+ }
+ if in.StorageClassName != nil {
+ in, out := &in.StorageClassName, &out.StorageClassName
+ *out = new(string)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PersistentVolumeClaimStatus is an autogenerated deepcopy function.
+func DeepCopy_api_PersistentVolumeClaimStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeClaimStatus)
+ out := out.(*PersistentVolumeClaimStatus)
+ *out = *in
+ if in.AccessModes != nil {
+ in, out := &in.AccessModes, &out.AccessModes
+ *out = make([]PersistentVolumeAccessMode, len(*in))
+ copy(*out, *in)
+ }
+ if in.Capacity != nil {
+ in, out := &in.Capacity, &out.Capacity
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PersistentVolumeClaimVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_PersistentVolumeClaimVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeClaimVolumeSource)
+ out := out.(*PersistentVolumeClaimVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_PersistentVolumeList is an autogenerated deepcopy function.
+func DeepCopy_api_PersistentVolumeList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeList)
+ out := out.(*PersistentVolumeList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PersistentVolume, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_PersistentVolume(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PersistentVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_PersistentVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeSource)
+ out := out.(*PersistentVolumeSource)
+ *out = *in
+ if in.GCEPersistentDisk != nil {
+ in, out := &in.GCEPersistentDisk, &out.GCEPersistentDisk
+ *out = new(GCEPersistentDiskVolumeSource)
+ **out = **in
+ }
+ if in.AWSElasticBlockStore != nil {
+ in, out := &in.AWSElasticBlockStore, &out.AWSElasticBlockStore
+ *out = new(AWSElasticBlockStoreVolumeSource)
+ **out = **in
+ }
+ if in.HostPath != nil {
+ in, out := &in.HostPath, &out.HostPath
+ *out = new(HostPathVolumeSource)
+ **out = **in
+ }
+ if in.Glusterfs != nil {
+ in, out := &in.Glusterfs, &out.Glusterfs
+ *out = new(GlusterfsVolumeSource)
+ **out = **in
+ }
+ if in.NFS != nil {
+ in, out := &in.NFS, &out.NFS
+ *out = new(NFSVolumeSource)
+ **out = **in
+ }
+ if in.RBD != nil {
+ in, out := &in.RBD, &out.RBD
+ *out = new(RBDVolumeSource)
+ if err := DeepCopy_api_RBDVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Quobyte != nil {
+ in, out := &in.Quobyte, &out.Quobyte
+ *out = new(QuobyteVolumeSource)
+ **out = **in
+ }
+ if in.ISCSI != nil {
+ in, out := &in.ISCSI, &out.ISCSI
+ *out = new(ISCSIVolumeSource)
+ if err := DeepCopy_api_ISCSIVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.FlexVolume != nil {
+ in, out := &in.FlexVolume, &out.FlexVolume
+ *out = new(FlexVolumeSource)
+ if err := DeepCopy_api_FlexVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Cinder != nil {
+ in, out := &in.Cinder, &out.Cinder
+ *out = new(CinderVolumeSource)
+ **out = **in
+ }
+ if in.CephFS != nil {
+ in, out := &in.CephFS, &out.CephFS
+ *out = new(CephFSVolumeSource)
+ if err := DeepCopy_api_CephFSVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.FC != nil {
+ in, out := &in.FC, &out.FC
+ *out = new(FCVolumeSource)
+ if err := DeepCopy_api_FCVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Flocker != nil {
+ in, out := &in.Flocker, &out.Flocker
+ *out = new(FlockerVolumeSource)
+ **out = **in
+ }
+ if in.AzureFile != nil {
+ in, out := &in.AzureFile, &out.AzureFile
+ *out = new(AzureFileVolumeSource)
+ **out = **in
+ }
+ if in.VsphereVolume != nil {
+ in, out := &in.VsphereVolume, &out.VsphereVolume
+ *out = new(VsphereVirtualDiskVolumeSource)
+ **out = **in
+ }
+ if in.AzureDisk != nil {
+ in, out := &in.AzureDisk, &out.AzureDisk
+ *out = new(AzureDiskVolumeSource)
+ if err := DeepCopy_api_AzureDiskVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.PhotonPersistentDisk != nil {
+ in, out := &in.PhotonPersistentDisk, &out.PhotonPersistentDisk
+ *out = new(PhotonPersistentDiskVolumeSource)
+ **out = **in
+ }
+ if in.PortworxVolume != nil {
+ in, out := &in.PortworxVolume, &out.PortworxVolume
+ *out = new(PortworxVolumeSource)
+ **out = **in
+ }
+ if in.ScaleIO != nil {
+ in, out := &in.ScaleIO, &out.ScaleIO
+ *out = new(ScaleIOVolumeSource)
+ if err := DeepCopy_api_ScaleIOVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Local != nil {
+ in, out := &in.Local, &out.Local
+ *out = new(LocalVolumeSource)
+ **out = **in
+ }
+ if in.StorageOS != nil {
+ in, out := &in.StorageOS, &out.StorageOS
+ *out = new(StorageOSPersistentVolumeSource)
+ if err := DeepCopy_api_StorageOSPersistentVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PersistentVolumeSpec is an autogenerated deepcopy function.
+func DeepCopy_api_PersistentVolumeSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeSpec)
+ out := out.(*PersistentVolumeSpec)
+ *out = *in
+ if in.Capacity != nil {
+ in, out := &in.Capacity, &out.Capacity
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if err := DeepCopy_api_PersistentVolumeSource(&in.PersistentVolumeSource, &out.PersistentVolumeSource, c); err != nil {
+ return err
+ }
+ if in.AccessModes != nil {
+ in, out := &in.AccessModes, &out.AccessModes
+ *out = make([]PersistentVolumeAccessMode, len(*in))
+ copy(*out, *in)
+ }
+ if in.ClaimRef != nil {
+ in, out := &in.ClaimRef, &out.ClaimRef
+ *out = new(ObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PersistentVolumeStatus is an autogenerated deepcopy function.
+func DeepCopy_api_PersistentVolumeStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PersistentVolumeStatus)
+ out := out.(*PersistentVolumeStatus)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_PhotonPersistentDiskVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_PhotonPersistentDiskVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PhotonPersistentDiskVolumeSource)
+ out := out.(*PhotonPersistentDiskVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_Pod is an autogenerated deepcopy function.
+func DeepCopy_api_Pod(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Pod)
+ out := out.(*Pod)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_api_PodSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_api_PodStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodAffinity is an autogenerated deepcopy function.
+func DeepCopy_api_PodAffinity(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodAffinity)
+ out := out.(*PodAffinity)
+ *out = *in
+ if in.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution
+ *out = make([]PodAffinityTerm, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_PodAffinityTerm(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.PreferredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution
+ *out = make([]WeightedPodAffinityTerm, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_WeightedPodAffinityTerm(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodAffinityTerm is an autogenerated deepcopy function.
+func DeepCopy_api_PodAffinityTerm(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodAffinityTerm)
+ out := out.(*PodAffinityTerm)
+ *out = *in
+ if in.LabelSelector != nil {
+ in, out := &in.LabelSelector, &out.LabelSelector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if in.Namespaces != nil {
+ in, out := &in.Namespaces, &out.Namespaces
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodAntiAffinity is an autogenerated deepcopy function.
+func DeepCopy_api_PodAntiAffinity(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodAntiAffinity)
+ out := out.(*PodAntiAffinity)
+ *out = *in
+ if in.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution
+ *out = make([]PodAffinityTerm, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_PodAffinityTerm(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.PreferredDuringSchedulingIgnoredDuringExecution != nil {
+ in, out := &in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution
+ *out = make([]WeightedPodAffinityTerm, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_WeightedPodAffinityTerm(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodAttachOptions is an autogenerated deepcopy function.
+func DeepCopy_api_PodAttachOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodAttachOptions)
+ out := out.(*PodAttachOptions)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_PodCondition is an autogenerated deepcopy function.
+func DeepCopy_api_PodCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodCondition)
+ out := out.(*PodCondition)
+ *out = *in
+ out.LastProbeTime = in.LastProbeTime.DeepCopy()
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_api_PodExecOptions is an autogenerated deepcopy function.
+func DeepCopy_api_PodExecOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodExecOptions)
+ out := out.(*PodExecOptions)
+ *out = *in
+ if in.Command != nil {
+ in, out := &in.Command, &out.Command
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodList is an autogenerated deepcopy function.
+func DeepCopy_api_PodList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodList)
+ out := out.(*PodList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Pod, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_Pod(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodLogOptions is an autogenerated deepcopy function.
+func DeepCopy_api_PodLogOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodLogOptions)
+ out := out.(*PodLogOptions)
+ *out = *in
+ if in.SinceSeconds != nil {
+ in, out := &in.SinceSeconds, &out.SinceSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.SinceTime != nil {
+ in, out := &in.SinceTime, &out.SinceTime
+ *out = new(v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ if in.TailLines != nil {
+ in, out := &in.TailLines, &out.TailLines
+ *out = new(int64)
+ **out = **in
+ }
+ if in.LimitBytes != nil {
+ in, out := &in.LimitBytes, &out.LimitBytes
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodPortForwardOptions is an autogenerated deepcopy function.
+func DeepCopy_api_PodPortForwardOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodPortForwardOptions)
+ out := out.(*PodPortForwardOptions)
+ *out = *in
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]int32, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodProxyOptions is an autogenerated deepcopy function.
+func DeepCopy_api_PodProxyOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodProxyOptions)
+ out := out.(*PodProxyOptions)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_PodSecurityContext is an autogenerated deepcopy function.
+func DeepCopy_api_PodSecurityContext(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodSecurityContext)
+ out := out.(*PodSecurityContext)
+ *out = *in
+ if in.SELinuxOptions != nil {
+ in, out := &in.SELinuxOptions, &out.SELinuxOptions
+ *out = new(SELinuxOptions)
+ **out = **in
+ }
+ if in.RunAsUser != nil {
+ in, out := &in.RunAsUser, &out.RunAsUser
+ *out = new(int64)
+ **out = **in
+ }
+ if in.RunAsNonRoot != nil {
+ in, out := &in.RunAsNonRoot, &out.RunAsNonRoot
+ *out = new(bool)
+ **out = **in
+ }
+ if in.SupplementalGroups != nil {
+ in, out := &in.SupplementalGroups, &out.SupplementalGroups
+ *out = make([]int64, len(*in))
+ copy(*out, *in)
+ }
+ if in.FSGroup != nil {
+ in, out := &in.FSGroup, &out.FSGroup
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodSignature is an autogenerated deepcopy function.
+func DeepCopy_api_PodSignature(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodSignature)
+ out := out.(*PodSignature)
+ *out = *in
+ if in.PodController != nil {
+ in, out := &in.PodController, &out.PodController
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.OwnerReference)
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodSpec is an autogenerated deepcopy function.
+func DeepCopy_api_PodSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodSpec)
+ out := out.(*PodSpec)
+ *out = *in
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]Volume, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_Volume(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.InitContainers != nil {
+ in, out := &in.InitContainers, &out.InitContainers
+ *out = make([]Container, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_Container(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Containers != nil {
+ in, out := &in.Containers, &out.Containers
+ *out = make([]Container, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_Container(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.TerminationGracePeriodSeconds != nil {
+ in, out := &in.TerminationGracePeriodSeconds, &out.TerminationGracePeriodSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.ActiveDeadlineSeconds != nil {
+ in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.NodeSelector != nil {
+ in, out := &in.NodeSelector, &out.NodeSelector
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ if in.AutomountServiceAccountToken != nil {
+ in, out := &in.AutomountServiceAccountToken, &out.AutomountServiceAccountToken
+ *out = new(bool)
+ **out = **in
+ }
+ if in.SecurityContext != nil {
+ in, out := &in.SecurityContext, &out.SecurityContext
+ *out = new(PodSecurityContext)
+ if err := DeepCopy_api_PodSecurityContext(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.ImagePullSecrets != nil {
+ in, out := &in.ImagePullSecrets, &out.ImagePullSecrets
+ *out = make([]LocalObjectReference, len(*in))
+ copy(*out, *in)
+ }
+ if in.Affinity != nil {
+ in, out := &in.Affinity, &out.Affinity
+ *out = new(Affinity)
+ if err := DeepCopy_api_Affinity(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Tolerations != nil {
+ in, out := &in.Tolerations, &out.Tolerations
+ *out = make([]Toleration, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_Toleration(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.HostAliases != nil {
+ in, out := &in.HostAliases, &out.HostAliases
+ *out = make([]HostAlias, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_HostAlias(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodStatus is an autogenerated deepcopy function.
+func DeepCopy_api_PodStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodStatus)
+ out := out.(*PodStatus)
+ *out = *in
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]PodCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_PodCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.StartTime != nil {
+ in, out := &in.StartTime, &out.StartTime
+ *out = new(v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ if in.InitContainerStatuses != nil {
+ in, out := &in.InitContainerStatuses, &out.InitContainerStatuses
+ *out = make([]ContainerStatus, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_ContainerStatus(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.ContainerStatuses != nil {
+ in, out := &in.ContainerStatuses, &out.ContainerStatuses
+ *out = make([]ContainerStatus, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_ContainerStatus(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodStatusResult is an autogenerated deepcopy function.
+func DeepCopy_api_PodStatusResult(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodStatusResult)
+ out := out.(*PodStatusResult)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_api_PodStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodTemplate is an autogenerated deepcopy function.
+func DeepCopy_api_PodTemplate(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodTemplate)
+ out := out.(*PodTemplate)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_api_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodTemplateList is an autogenerated deepcopy function.
+func DeepCopy_api_PodTemplateList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodTemplateList)
+ out := out.(*PodTemplateList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodTemplate, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_PodTemplate(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PodTemplateSpec is an autogenerated deepcopy function.
+func DeepCopy_api_PodTemplateSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodTemplateSpec)
+ out := out.(*PodTemplateSpec)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_api_PodSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PortworxVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_PortworxVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PortworxVolumeSource)
+ out := out.(*PortworxVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_Preconditions is an autogenerated deepcopy function.
+func DeepCopy_api_Preconditions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Preconditions)
+ out := out.(*Preconditions)
+ *out = *in
+ if in.UID != nil {
+ in, out := &in.UID, &out.UID
+ *out = new(types.UID)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_PreferAvoidPodsEntry is an autogenerated deepcopy function.
+func DeepCopy_api_PreferAvoidPodsEntry(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PreferAvoidPodsEntry)
+ out := out.(*PreferAvoidPodsEntry)
+ *out = *in
+ if err := DeepCopy_api_PodSignature(&in.PodSignature, &out.PodSignature, c); err != nil {
+ return err
+ }
+ out.EvictionTime = in.EvictionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_api_PreferredSchedulingTerm is an autogenerated deepcopy function.
+func DeepCopy_api_PreferredSchedulingTerm(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PreferredSchedulingTerm)
+ out := out.(*PreferredSchedulingTerm)
+ *out = *in
+ if err := DeepCopy_api_NodeSelectorTerm(&in.Preference, &out.Preference, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_Probe is an autogenerated deepcopy function.
+func DeepCopy_api_Probe(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Probe)
+ out := out.(*Probe)
+ *out = *in
+ if err := DeepCopy_api_Handler(&in.Handler, &out.Handler, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ProjectedVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_ProjectedVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ProjectedVolumeSource)
+ out := out.(*ProjectedVolumeSource)
+ *out = *in
+ if in.Sources != nil {
+ in, out := &in.Sources, &out.Sources
+ *out = make([]VolumeProjection, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_VolumeProjection(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.DefaultMode != nil {
+ in, out := &in.DefaultMode, &out.DefaultMode
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_QuobyteVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_QuobyteVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*QuobyteVolumeSource)
+ out := out.(*QuobyteVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_RBDVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_RBDVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RBDVolumeSource)
+ out := out.(*RBDVolumeSource)
+ *out = *in
+ if in.CephMonitors != nil {
+ in, out := &in.CephMonitors, &out.CephMonitors
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_RangeAllocation is an autogenerated deepcopy function.
+func DeepCopy_api_RangeAllocation(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RangeAllocation)
+ out := out.(*RangeAllocation)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Data != nil {
+ in, out := &in.Data, &out.Data
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ReplicationController is an autogenerated deepcopy function.
+func DeepCopy_api_ReplicationController(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicationController)
+ out := out.(*ReplicationController)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_api_ReplicationControllerSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_api_ReplicationControllerStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ReplicationControllerCondition is an autogenerated deepcopy function.
+func DeepCopy_api_ReplicationControllerCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicationControllerCondition)
+ out := out.(*ReplicationControllerCondition)
+ *out = *in
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_api_ReplicationControllerList is an autogenerated deepcopy function.
+func DeepCopy_api_ReplicationControllerList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicationControllerList)
+ out := out.(*ReplicationControllerList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ReplicationController, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_ReplicationController(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ReplicationControllerSpec is an autogenerated deepcopy function.
+func DeepCopy_api_ReplicationControllerSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicationControllerSpec)
+ out := out.(*ReplicationControllerSpec)
+ *out = *in
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ if in.Template != nil {
+ in, out := &in.Template, &out.Template
+ *out = new(PodTemplateSpec)
+ if err := DeepCopy_api_PodTemplateSpec(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ReplicationControllerStatus is an autogenerated deepcopy function.
+func DeepCopy_api_ReplicationControllerStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicationControllerStatus)
+ out := out.(*ReplicationControllerStatus)
+ *out = *in
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]ReplicationControllerCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_ReplicationControllerCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ResourceFieldSelector is an autogenerated deepcopy function.
+func DeepCopy_api_ResourceFieldSelector(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceFieldSelector)
+ out := out.(*ResourceFieldSelector)
+ *out = *in
+ out.Divisor = in.Divisor.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_api_ResourceQuota is an autogenerated deepcopy function.
+func DeepCopy_api_ResourceQuota(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceQuota)
+ out := out.(*ResourceQuota)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_api_ResourceQuotaSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_api_ResourceQuotaStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ResourceQuotaList is an autogenerated deepcopy function.
+func DeepCopy_api_ResourceQuotaList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceQuotaList)
+ out := out.(*ResourceQuotaList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ResourceQuota, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_ResourceQuota(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ResourceQuotaSpec is an autogenerated deepcopy function.
+func DeepCopy_api_ResourceQuotaSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceQuotaSpec)
+ out := out.(*ResourceQuotaSpec)
+ *out = *in
+ if in.Hard != nil {
+ in, out := &in.Hard, &out.Hard
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Scopes != nil {
+ in, out := &in.Scopes, &out.Scopes
+ *out = make([]ResourceQuotaScope, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ResourceQuotaStatus is an autogenerated deepcopy function.
+func DeepCopy_api_ResourceQuotaStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceQuotaStatus)
+ out := out.(*ResourceQuotaStatus)
+ *out = *in
+ if in.Hard != nil {
+ in, out := &in.Hard, &out.Hard
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Used != nil {
+ in, out := &in.Used, &out.Used
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ResourceRequirements is an autogenerated deepcopy function.
+func DeepCopy_api_ResourceRequirements(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceRequirements)
+ out := out.(*ResourceRequirements)
+ *out = *in
+ if in.Limits != nil {
+ in, out := &in.Limits, &out.Limits
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ if in.Requests != nil {
+ in, out := &in.Requests, &out.Requests
+ *out = make(ResourceList)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_SELinuxOptions is an autogenerated deepcopy function.
+func DeepCopy_api_SELinuxOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SELinuxOptions)
+ out := out.(*SELinuxOptions)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_ScaleIOVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_ScaleIOVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ScaleIOVolumeSource)
+ out := out.(*ScaleIOVolumeSource)
+ *out = *in
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_Secret is an autogenerated deepcopy function.
+func DeepCopy_api_Secret(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Secret)
+ out := out.(*Secret)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Data != nil {
+ in, out := &in.Data, &out.Data
+ *out = make(map[string][]byte)
+ for key, val := range *in {
+ if newVal, err := c.DeepCopy(&val); err != nil {
+ return err
+ } else {
+ (*out)[key] = *newVal.(*[]byte)
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_SecretEnvSource is an autogenerated deepcopy function.
+func DeepCopy_api_SecretEnvSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SecretEnvSource)
+ out := out.(*SecretEnvSource)
+ *out = *in
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_SecretKeySelector is an autogenerated deepcopy function.
+func DeepCopy_api_SecretKeySelector(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SecretKeySelector)
+ out := out.(*SecretKeySelector)
+ *out = *in
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_SecretList is an autogenerated deepcopy function.
+func DeepCopy_api_SecretList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SecretList)
+ out := out.(*SecretList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Secret, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_Secret(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_SecretProjection is an autogenerated deepcopy function.
+func DeepCopy_api_SecretProjection(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SecretProjection)
+ out := out.(*SecretProjection)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]KeyToPath, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_KeyToPath(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_SecretVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_SecretVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SecretVolumeSource)
+ out := out.(*SecretVolumeSource)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]KeyToPath, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_KeyToPath(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.DefaultMode != nil {
+ in, out := &in.DefaultMode, &out.DefaultMode
+ *out = new(int32)
+ **out = **in
+ }
+ if in.Optional != nil {
+ in, out := &in.Optional, &out.Optional
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_SecurityContext is an autogenerated deepcopy function.
+func DeepCopy_api_SecurityContext(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SecurityContext)
+ out := out.(*SecurityContext)
+ *out = *in
+ if in.Capabilities != nil {
+ in, out := &in.Capabilities, &out.Capabilities
+ *out = new(Capabilities)
+ if err := DeepCopy_api_Capabilities(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Privileged != nil {
+ in, out := &in.Privileged, &out.Privileged
+ *out = new(bool)
+ **out = **in
+ }
+ if in.SELinuxOptions != nil {
+ in, out := &in.SELinuxOptions, &out.SELinuxOptions
+ *out = new(SELinuxOptions)
+ **out = **in
+ }
+ if in.RunAsUser != nil {
+ in, out := &in.RunAsUser, &out.RunAsUser
+ *out = new(int64)
+ **out = **in
+ }
+ if in.RunAsNonRoot != nil {
+ in, out := &in.RunAsNonRoot, &out.RunAsNonRoot
+ *out = new(bool)
+ **out = **in
+ }
+ if in.ReadOnlyRootFilesystem != nil {
+ in, out := &in.ReadOnlyRootFilesystem, &out.ReadOnlyRootFilesystem
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_SerializedReference is an autogenerated deepcopy function.
+func DeepCopy_api_SerializedReference(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SerializedReference)
+ out := out.(*SerializedReference)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_Service is an autogenerated deepcopy function.
+func DeepCopy_api_Service(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Service)
+ out := out.(*Service)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_api_ServiceSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_api_ServiceStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ServiceAccount is an autogenerated deepcopy function.
+func DeepCopy_api_ServiceAccount(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServiceAccount)
+ out := out.(*ServiceAccount)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Secrets != nil {
+ in, out := &in.Secrets, &out.Secrets
+ *out = make([]ObjectReference, len(*in))
+ copy(*out, *in)
+ }
+ if in.ImagePullSecrets != nil {
+ in, out := &in.ImagePullSecrets, &out.ImagePullSecrets
+ *out = make([]LocalObjectReference, len(*in))
+ copy(*out, *in)
+ }
+ if in.AutomountServiceAccountToken != nil {
+ in, out := &in.AutomountServiceAccountToken, &out.AutomountServiceAccountToken
+ *out = new(bool)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ServiceAccountList is an autogenerated deepcopy function.
+func DeepCopy_api_ServiceAccountList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServiceAccountList)
+ out := out.(*ServiceAccountList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ServiceAccount, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_ServiceAccount(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ServiceList is an autogenerated deepcopy function.
+func DeepCopy_api_ServiceList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServiceList)
+ out := out.(*ServiceList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Service, len(*in))
+ for i := range *in {
+ if err := DeepCopy_api_Service(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ServicePort is an autogenerated deepcopy function.
+func DeepCopy_api_ServicePort(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServicePort)
+ out := out.(*ServicePort)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_ServiceProxyOptions is an autogenerated deepcopy function.
+func DeepCopy_api_ServiceProxyOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServiceProxyOptions)
+ out := out.(*ServiceProxyOptions)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_ServiceSpec is an autogenerated deepcopy function.
+func DeepCopy_api_ServiceSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServiceSpec)
+ out := out.(*ServiceSpec)
+ *out = *in
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]ServicePort, len(*in))
+ copy(*out, *in)
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ if in.ExternalIPs != nil {
+ in, out := &in.ExternalIPs, &out.ExternalIPs
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.LoadBalancerSourceRanges != nil {
+ in, out := &in.LoadBalancerSourceRanges, &out.LoadBalancerSourceRanges
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_ServiceStatus is an autogenerated deepcopy function.
+func DeepCopy_api_ServiceStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServiceStatus)
+ out := out.(*ServiceStatus)
+ *out = *in
+ if err := DeepCopy_api_LoadBalancerStatus(&in.LoadBalancer, &out.LoadBalancer, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_StorageOSPersistentVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_StorageOSPersistentVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StorageOSPersistentVolumeSource)
+ out := out.(*StorageOSPersistentVolumeSource)
+ *out = *in
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(ObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_StorageOSVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_StorageOSVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StorageOSVolumeSource)
+ out := out.(*StorageOSVolumeSource)
+ *out = *in
+ if in.SecretRef != nil {
+ in, out := &in.SecretRef, &out.SecretRef
+ *out = new(LocalObjectReference)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_Sysctl is an autogenerated deepcopy function.
+func DeepCopy_api_Sysctl(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Sysctl)
+ out := out.(*Sysctl)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_TCPSocketAction is an autogenerated deepcopy function.
+func DeepCopy_api_TCPSocketAction(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*TCPSocketAction)
+ out := out.(*TCPSocketAction)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_Taint is an autogenerated deepcopy function.
+func DeepCopy_api_Taint(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Taint)
+ out := out.(*Taint)
+ *out = *in
+ out.TimeAdded = in.TimeAdded.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_api_Toleration is an autogenerated deepcopy function.
+func DeepCopy_api_Toleration(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Toleration)
+ out := out.(*Toleration)
+ *out = *in
+ if in.TolerationSeconds != nil {
+ in, out := &in.TolerationSeconds, &out.TolerationSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_Volume is an autogenerated deepcopy function.
+func DeepCopy_api_Volume(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Volume)
+ out := out.(*Volume)
+ *out = *in
+ if err := DeepCopy_api_VolumeSource(&in.VolumeSource, &out.VolumeSource, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_VolumeMount is an autogenerated deepcopy function.
+func DeepCopy_api_VolumeMount(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*VolumeMount)
+ out := out.(*VolumeMount)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_VolumeProjection is an autogenerated deepcopy function.
+func DeepCopy_api_VolumeProjection(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*VolumeProjection)
+ out := out.(*VolumeProjection)
+ *out = *in
+ if in.Secret != nil {
+ in, out := &in.Secret, &out.Secret
+ *out = new(SecretProjection)
+ if err := DeepCopy_api_SecretProjection(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.DownwardAPI != nil {
+ in, out := &in.DownwardAPI, &out.DownwardAPI
+ *out = new(DownwardAPIProjection)
+ if err := DeepCopy_api_DownwardAPIProjection(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.ConfigMap != nil {
+ in, out := &in.ConfigMap, &out.ConfigMap
+ *out = new(ConfigMapProjection)
+ if err := DeepCopy_api_ConfigMapProjection(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_VolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_VolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*VolumeSource)
+ out := out.(*VolumeSource)
+ *out = *in
+ if in.HostPath != nil {
+ in, out := &in.HostPath, &out.HostPath
+ *out = new(HostPathVolumeSource)
+ **out = **in
+ }
+ if in.EmptyDir != nil {
+ in, out := &in.EmptyDir, &out.EmptyDir
+ *out = new(EmptyDirVolumeSource)
+ if err := DeepCopy_api_EmptyDirVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.GCEPersistentDisk != nil {
+ in, out := &in.GCEPersistentDisk, &out.GCEPersistentDisk
+ *out = new(GCEPersistentDiskVolumeSource)
+ **out = **in
+ }
+ if in.AWSElasticBlockStore != nil {
+ in, out := &in.AWSElasticBlockStore, &out.AWSElasticBlockStore
+ *out = new(AWSElasticBlockStoreVolumeSource)
+ **out = **in
+ }
+ if in.GitRepo != nil {
+ in, out := &in.GitRepo, &out.GitRepo
+ *out = new(GitRepoVolumeSource)
+ **out = **in
+ }
+ if in.Secret != nil {
+ in, out := &in.Secret, &out.Secret
+ *out = new(SecretVolumeSource)
+ if err := DeepCopy_api_SecretVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.NFS != nil {
+ in, out := &in.NFS, &out.NFS
+ *out = new(NFSVolumeSource)
+ **out = **in
+ }
+ if in.ISCSI != nil {
+ in, out := &in.ISCSI, &out.ISCSI
+ *out = new(ISCSIVolumeSource)
+ if err := DeepCopy_api_ISCSIVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Glusterfs != nil {
+ in, out := &in.Glusterfs, &out.Glusterfs
+ *out = new(GlusterfsVolumeSource)
+ **out = **in
+ }
+ if in.PersistentVolumeClaim != nil {
+ in, out := &in.PersistentVolumeClaim, &out.PersistentVolumeClaim
+ *out = new(PersistentVolumeClaimVolumeSource)
+ **out = **in
+ }
+ if in.RBD != nil {
+ in, out := &in.RBD, &out.RBD
+ *out = new(RBDVolumeSource)
+ if err := DeepCopy_api_RBDVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Quobyte != nil {
+ in, out := &in.Quobyte, &out.Quobyte
+ *out = new(QuobyteVolumeSource)
+ **out = **in
+ }
+ if in.FlexVolume != nil {
+ in, out := &in.FlexVolume, &out.FlexVolume
+ *out = new(FlexVolumeSource)
+ if err := DeepCopy_api_FlexVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Cinder != nil {
+ in, out := &in.Cinder, &out.Cinder
+ *out = new(CinderVolumeSource)
+ **out = **in
+ }
+ if in.CephFS != nil {
+ in, out := &in.CephFS, &out.CephFS
+ *out = new(CephFSVolumeSource)
+ if err := DeepCopy_api_CephFSVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Flocker != nil {
+ in, out := &in.Flocker, &out.Flocker
+ *out = new(FlockerVolumeSource)
+ **out = **in
+ }
+ if in.DownwardAPI != nil {
+ in, out := &in.DownwardAPI, &out.DownwardAPI
+ *out = new(DownwardAPIVolumeSource)
+ if err := DeepCopy_api_DownwardAPIVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.FC != nil {
+ in, out := &in.FC, &out.FC
+ *out = new(FCVolumeSource)
+ if err := DeepCopy_api_FCVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.AzureFile != nil {
+ in, out := &in.AzureFile, &out.AzureFile
+ *out = new(AzureFileVolumeSource)
+ **out = **in
+ }
+ if in.ConfigMap != nil {
+ in, out := &in.ConfigMap, &out.ConfigMap
+ *out = new(ConfigMapVolumeSource)
+ if err := DeepCopy_api_ConfigMapVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.VsphereVolume != nil {
+ in, out := &in.VsphereVolume, &out.VsphereVolume
+ *out = new(VsphereVirtualDiskVolumeSource)
+ **out = **in
+ }
+ if in.AzureDisk != nil {
+ in, out := &in.AzureDisk, &out.AzureDisk
+ *out = new(AzureDiskVolumeSource)
+ if err := DeepCopy_api_AzureDiskVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.PhotonPersistentDisk != nil {
+ in, out := &in.PhotonPersistentDisk, &out.PhotonPersistentDisk
+ *out = new(PhotonPersistentDiskVolumeSource)
+ **out = **in
+ }
+ if in.Projected != nil {
+ in, out := &in.Projected, &out.Projected
+ *out = new(ProjectedVolumeSource)
+ if err := DeepCopy_api_ProjectedVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.PortworxVolume != nil {
+ in, out := &in.PortworxVolume, &out.PortworxVolume
+ *out = new(PortworxVolumeSource)
+ **out = **in
+ }
+ if in.ScaleIO != nil {
+ in, out := &in.ScaleIO, &out.ScaleIO
+ *out = new(ScaleIOVolumeSource)
+ if err := DeepCopy_api_ScaleIOVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.StorageOS != nil {
+ in, out := &in.StorageOS, &out.StorageOS
+ *out = new(StorageOSVolumeSource)
+ if err := DeepCopy_api_StorageOSVolumeSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_api_VsphereVirtualDiskVolumeSource is an autogenerated deepcopy function.
+func DeepCopy_api_VsphereVirtualDiskVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*VsphereVirtualDiskVolumeSource)
+ out := out.(*VsphereVirtualDiskVolumeSource)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_api_WeightedPodAffinityTerm is an autogenerated deepcopy function.
+func DeepCopy_api_WeightedPodAffinityTerm(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*WeightedPodAffinityTerm)
+ out := out.(*WeightedPodAffinityTerm)
+ *out = *in
+ if err := DeepCopy_api_PodAffinityTerm(&in.PodAffinityTerm, &out.PodAffinityTerm, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/doc.go
new file mode 100644
index 000000000..5dfc4e74e
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/doc.go
@@ -0,0 +1,24 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+
+// Package admissionregistration is the internal version of the API.
+// AdmissionConfiguration and AdmissionPluginConfiguration are legacy static admission plugin configuration
+// InitializerConfiguration and ExternalAdmissionHookConfiguration is for the
+// new dynamic admission controller configuration.
+// +groupName=admissionregistration.k8s.io
+package admissionregistration // import "k8s.io/kubernetes/pkg/apis/admissionregistration"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/register.go b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/register.go
new file mode 100644
index 000000000..1fe291a8f
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/register.go
@@ -0,0 +1,53 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package admissionregistration
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+const GroupName = "admissionregistration.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns back a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns back a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+// Adds the list of known types to scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &InitializerConfiguration{},
+ &InitializerConfigurationList{},
+ &ExternalAdmissionHookConfiguration{},
+ &ExternalAdmissionHookConfigurationList{},
+ )
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/types.go b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/types.go
new file mode 100644
index 000000000..27b720729
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/types.go
@@ -0,0 +1,216 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package admissionregistration
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+
+// InitializerConfiguration describes the configuration of initializers.
+type InitializerConfiguration struct {
+ metav1.TypeMeta
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
+ // +optional
+ metav1.ObjectMeta
+
+ // Initializers is a list of resources and their default initializers
+ // Order-sensitive.
+ // When merging multiple InitializerConfigurations, we sort the initializers
+ // from different InitializerConfigurations by the name of the
+ // InitializerConfigurations; the order of the initializers from the same
+ // InitializerConfiguration is preserved.
+ // +optional
+ Initializers []Initializer
+}
+
+// InitializerConfigurationList is a list of InitializerConfiguration.
+type InitializerConfigurationList struct {
+ metav1.TypeMeta
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta
+
+ // List of InitializerConfiguration.
+ Items []InitializerConfiguration
+}
+
+// Initializer describes the name and the failure policy of an initializer, and
+// what resources it applies to.
+type Initializer struct {
+ // Name is the identifier of the initializer. It will be added to the
+ // object that needs to be initialized.
+ // Name should be fully qualified, e.g., alwayspullimages.kubernetes.io, where
+ // "alwayspullimages" is the name of the webhook, and kubernetes.io is the name
+ // of the organization.
+ // Required
+ Name string
+
+ // Rules describes what resources/subresources the initializer cares about.
+ // The initializer cares about an operation if it matches _any_ Rule.
+ // Rule.Resources must not include subresources.
+ Rules []Rule
+
+ // FailurePolicy defines what happens if the responsible initializer controller
+ // fails to takes action. Allowed values are Ignore, or Fail. If "Ignore" is
+ // set, initializer is removed from the initializers list of an object if
+ // the timeout is reached; If "Fail" is set, admissionregistration returns timeout error
+ // if the timeout is reached.
+ FailurePolicy *FailurePolicyType
+}
+
+// Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended
+// to make sure that all the tuple expansions are valid.
+type Rule struct {
+ // APIGroups is the API groups the resources belong to. '*' is all groups.
+ // If '*' is present, the length of the slice must be one.
+ // Required.
+ APIGroups []string
+
+ // APIVersions is the API versions the resources belong to. '*' is all versions.
+ // If '*' is present, the length of the slice must be one.
+ // Required.
+ APIVersions []string
+
+ // Resources is a list of resources this rule applies to.
+ //
+ // For example:
+ // 'pods' means pods.
+ // 'pods/log' means the log subresource of pods.
+ // '*' means all resources, but not subresources.
+ // 'pods/*' means all subresources of pods.
+ // '*/scale' means all scale subresources.
+ // '*/*' means all resources and their subresources.
+ //
+ // If wildcard is present, the validation rule will ensure resources do not
+ // overlap with each other.
+ //
+ // Depending on the enclosing object, subresources might not be allowed.
+ // Required.
+ Resources []string
+}
+
+type FailurePolicyType string
+
+const (
+ // Ignore means the initilizer is removed from the initializers list of an
+ // object if the initializer is timed out.
+ Ignore FailurePolicyType = "Ignore"
+ // For 1.7, only "Ignore" is allowed. "Fail" will be allowed when the
+ // extensible admission feature is beta.
+ Fail FailurePolicyType = "Fail"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+
+// ExternalAdmissionHookConfiguration describes the configuration of initializers.
+type ExternalAdmissionHookConfiguration struct {
+ metav1.TypeMeta
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
+ // +optional
+ metav1.ObjectMeta
+ // ExternalAdmissionHooks is a list of external admission webhooks and the
+ // affected resources and operations.
+ // +optional
+ ExternalAdmissionHooks []ExternalAdmissionHook
+}
+
+// ExternalAdmissionHookConfigurationList is a list of ExternalAdmissionHookConfiguration.
+type ExternalAdmissionHookConfigurationList struct {
+ metav1.TypeMeta
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta
+ // List of ExternalAdmissionHookConfiguration.
+ Items []ExternalAdmissionHookConfiguration
+}
+
+// ExternalAdmissionHook describes an external admission webhook and the
+// resources and operations it applies to.
+type ExternalAdmissionHook struct {
+ // The name of the external admission webhook.
+ // Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where
+ // "imagepolicy" is the name of the webhook, and kubernetes.io is the name
+ // of the organization.
+ // Required.
+ Name string
+
+ // ClientConfig defines how to communicate with the hook.
+ // Required
+ ClientConfig AdmissionHookClientConfig
+
+ // Rules describes what operations on what resources/subresources the webhook cares about.
+ // The webhook cares about an operation if it matches _any_ Rule.
+ Rules []RuleWithOperations
+
+ // FailurePolicy defines how unrecognized errors from the admission endpoint are handled -
+ // allowed values are Ignore or Fail. Defaults to Ignore.
+ // +optional
+ FailurePolicy *FailurePolicyType
+}
+
+// RuleWithOperations is a tuple of Operations and Resources. It is recommended to make
+// sure that all the tuple expansions are valid.
+type RuleWithOperations struct {
+ // Operations is the operations the admission hook cares about - CREATE, UPDATE, or *
+ // for all operations.
+ // If '*' is present, the length of the slice must be one.
+ // Required.
+ Operations []OperationType
+ // Rule is embedded, it describes other criteria of the rule, like
+ // APIGroups, APIVersions, Resources, etc.
+ Rule
+}
+
+type OperationType string
+
+// The constants should be kept in sync with those defined in k8s.io/kubernetes/pkg/admission/interface.go.
+const (
+ OperationAll OperationType = "*"
+ Create OperationType = "CREATE"
+ Update OperationType = "UPDATE"
+ Delete OperationType = "DELETE"
+ Connect OperationType = "CONNECT"
+)
+
+// AdmissionHookClientConfig contains the information to make a TLS
+// connection with the webhook
+type AdmissionHookClientConfig struct {
+ // Service is a reference to the service for this webhook. If there is only
+ // one port open for the service, that port will be used. If there are multiple
+ // ports open, port 443 will be used if it is open, otherwise it is an error.
+ // Required
+ Service ServiceReference
+ // CABundle is a PEM encoded CA bundle which will be used to validate webhook's server certificate.
+ // Required
+ CABundle []byte
+}
+
+// ServiceReference holds a reference to Service.legacy.k8s.io
+type ServiceReference struct {
+ // Namespace is the namespace of the service
+ // Required
+ Namespace string
+ // Name is the name of the service
+ // Required
+ Name string
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/defaults.go
new file mode 100644
index 000000000..5aed8f1d7
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/defaults.go
@@ -0,0 +1,39 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
+
+func SetDefaults_Initializer(obj *Initializer) {
+ if obj.FailurePolicy == nil {
+ policy := Ignore
+ obj.FailurePolicy = &policy
+ }
+}
+
+func SetDefaults_ExternalAdmissionHook(obj *ExternalAdmissionHook) {
+ if obj.FailurePolicy == nil {
+ policy := Ignore
+ obj.FailurePolicy = &policy
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/doc.go
new file mode 100644
index 000000000..9f75528f9
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/doc.go
@@ -0,0 +1,27 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/admissionregistration
+// +k8s:openapi-gen=true
+// +k8s:defaulter-gen=TypeMeta
+
+// Package v1alpha1 is the v1alpha1 version of the API.
+// AdmissionConfiguration and AdmissionPluginConfiguration are legacy static admission plugin configuration
+// InitializerConfiguration and ExternalAdmissionHookConfiguration is for the
+// new dynamic admission controller configuration.
+// +groupName=admissionregistration.k8s.io
+package v1alpha1 // import "k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/generated.pb.go
new file mode 100644
index 000000000..94450a459
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/generated.pb.go
@@ -0,0 +1,2228 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1alpha1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/generated.proto
+
+ It has these top-level messages:
+ AdmissionHookClientConfig
+ ExternalAdmissionHook
+ ExternalAdmissionHookConfiguration
+ ExternalAdmissionHookConfigurationList
+ Initializer
+ InitializerConfiguration
+ InitializerConfigurationList
+ Rule
+ RuleWithOperations
+ ServiceReference
+*/
+package v1alpha1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *AdmissionHookClientConfig) Reset() { *m = AdmissionHookClientConfig{} }
+func (*AdmissionHookClientConfig) ProtoMessage() {}
+func (*AdmissionHookClientConfig) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{0}
+}
+
+func (m *ExternalAdmissionHook) Reset() { *m = ExternalAdmissionHook{} }
+func (*ExternalAdmissionHook) ProtoMessage() {}
+func (*ExternalAdmissionHook) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *ExternalAdmissionHookConfiguration) Reset() { *m = ExternalAdmissionHookConfiguration{} }
+func (*ExternalAdmissionHookConfiguration) ProtoMessage() {}
+func (*ExternalAdmissionHookConfiguration) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{2}
+}
+
+func (m *ExternalAdmissionHookConfigurationList) Reset() {
+ *m = ExternalAdmissionHookConfigurationList{}
+}
+func (*ExternalAdmissionHookConfigurationList) ProtoMessage() {}
+func (*ExternalAdmissionHookConfigurationList) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{3}
+}
+
+func (m *Initializer) Reset() { *m = Initializer{} }
+func (*Initializer) ProtoMessage() {}
+func (*Initializer) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
+
+func (m *InitializerConfiguration) Reset() { *m = InitializerConfiguration{} }
+func (*InitializerConfiguration) ProtoMessage() {}
+func (*InitializerConfiguration) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{5}
+}
+
+func (m *InitializerConfigurationList) Reset() { *m = InitializerConfigurationList{} }
+func (*InitializerConfigurationList) ProtoMessage() {}
+func (*InitializerConfigurationList) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{6}
+}
+
+func (m *Rule) Reset() { *m = Rule{} }
+func (*Rule) ProtoMessage() {}
+func (*Rule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
+
+func (m *RuleWithOperations) Reset() { *m = RuleWithOperations{} }
+func (*RuleWithOperations) ProtoMessage() {}
+func (*RuleWithOperations) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
+
+func (m *ServiceReference) Reset() { *m = ServiceReference{} }
+func (*ServiceReference) ProtoMessage() {}
+func (*ServiceReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
+
+func init() {
+ proto.RegisterType((*AdmissionHookClientConfig)(nil), "k8s.io.kubernetes.pkg.apis.admissionregistration.v1alpha1.AdmissionHookClientConfig")
+ proto.RegisterType((*ExternalAdmissionHook)(nil), "k8s.io.kubernetes.pkg.apis.admissionregistration.v1alpha1.ExternalAdmissionHook")
+ proto.RegisterType((*ExternalAdmissionHookConfiguration)(nil), "k8s.io.kubernetes.pkg.apis.admissionregistration.v1alpha1.ExternalAdmissionHookConfiguration")
+ proto.RegisterType((*ExternalAdmissionHookConfigurationList)(nil), "k8s.io.kubernetes.pkg.apis.admissionregistration.v1alpha1.ExternalAdmissionHookConfigurationList")
+ proto.RegisterType((*Initializer)(nil), "k8s.io.kubernetes.pkg.apis.admissionregistration.v1alpha1.Initializer")
+ proto.RegisterType((*InitializerConfiguration)(nil), "k8s.io.kubernetes.pkg.apis.admissionregistration.v1alpha1.InitializerConfiguration")
+ proto.RegisterType((*InitializerConfigurationList)(nil), "k8s.io.kubernetes.pkg.apis.admissionregistration.v1alpha1.InitializerConfigurationList")
+ proto.RegisterType((*Rule)(nil), "k8s.io.kubernetes.pkg.apis.admissionregistration.v1alpha1.Rule")
+ proto.RegisterType((*RuleWithOperations)(nil), "k8s.io.kubernetes.pkg.apis.admissionregistration.v1alpha1.RuleWithOperations")
+ proto.RegisterType((*ServiceReference)(nil), "k8s.io.kubernetes.pkg.apis.admissionregistration.v1alpha1.ServiceReference")
+}
+func (m *AdmissionHookClientConfig) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *AdmissionHookClientConfig) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Service.Size()))
+ n1, err := m.Service.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ if m.CABundle != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.CABundle)))
+ i += copy(dAtA[i:], m.CABundle)
+ }
+ return i, nil
+}
+
+func (m *ExternalAdmissionHook) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExternalAdmissionHook) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ClientConfig.Size()))
+ n2, err := m.ClientConfig.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ if len(m.Rules) > 0 {
+ for _, msg := range m.Rules {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.FailurePolicy != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.FailurePolicy)))
+ i += copy(dAtA[i:], *m.FailurePolicy)
+ }
+ return i, nil
+}
+
+func (m *ExternalAdmissionHookConfiguration) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExternalAdmissionHookConfiguration) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n3, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ if len(m.ExternalAdmissionHooks) > 0 {
+ for _, msg := range m.ExternalAdmissionHooks {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ExternalAdmissionHookConfigurationList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExternalAdmissionHookConfigurationList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n4, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *Initializer) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Initializer) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ if len(m.Rules) > 0 {
+ for _, msg := range m.Rules {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.FailurePolicy != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.FailurePolicy)))
+ i += copy(dAtA[i:], *m.FailurePolicy)
+ }
+ return i, nil
+}
+
+func (m *InitializerConfiguration) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *InitializerConfiguration) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n5, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ if len(m.Initializers) > 0 {
+ for _, msg := range m.Initializers {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *InitializerConfigurationList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *InitializerConfigurationList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n6, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *Rule) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Rule) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.APIGroups) > 0 {
+ for _, s := range m.APIGroups {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.APIVersions) > 0 {
+ for _, s := range m.APIVersions {
+ dAtA[i] = 0x12
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Resources) > 0 {
+ for _, s := range m.Resources {
+ dAtA[i] = 0x1a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *RuleWithOperations) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RuleWithOperations) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Operations) > 0 {
+ for _, s := range m.Operations {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Rule.Size()))
+ n7, err := m.Rule.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ return i, nil
+}
+
+func (m *ServiceReference) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ServiceReference) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
+ i += copy(dAtA[i:], m.Namespace)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *AdmissionHookClientConfig) Size() (n int) {
+ var l int
+ _ = l
+ l = m.Service.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.CABundle != nil {
+ l = len(m.CABundle)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *ExternalAdmissionHook) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.ClientConfig.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Rules) > 0 {
+ for _, e := range m.Rules {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.FailurePolicy != nil {
+ l = len(*m.FailurePolicy)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *ExternalAdmissionHookConfiguration) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.ExternalAdmissionHooks) > 0 {
+ for _, e := range m.ExternalAdmissionHooks {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ExternalAdmissionHookConfigurationList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *Initializer) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Rules) > 0 {
+ for _, e := range m.Rules {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.FailurePolicy != nil {
+ l = len(*m.FailurePolicy)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *InitializerConfiguration) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Initializers) > 0 {
+ for _, e := range m.Initializers {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *InitializerConfigurationList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *Rule) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.APIGroups) > 0 {
+ for _, s := range m.APIGroups {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.APIVersions) > 0 {
+ for _, s := range m.APIVersions {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Resources) > 0 {
+ for _, s := range m.Resources {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *RuleWithOperations) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Operations) > 0 {
+ for _, s := range m.Operations {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = m.Rule.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ServiceReference) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Namespace)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *AdmissionHookClientConfig) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&AdmissionHookClientConfig{`,
+ `Service:` + strings.Replace(strings.Replace(this.Service.String(), "ServiceReference", "ServiceReference", 1), `&`, ``, 1) + `,`,
+ `CABundle:` + valueToStringGenerated(this.CABundle) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ExternalAdmissionHook) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ExternalAdmissionHook{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `ClientConfig:` + strings.Replace(strings.Replace(this.ClientConfig.String(), "AdmissionHookClientConfig", "AdmissionHookClientConfig", 1), `&`, ``, 1) + `,`,
+ `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "RuleWithOperations", "RuleWithOperations", 1), `&`, ``, 1) + `,`,
+ `FailurePolicy:` + valueToStringGenerated(this.FailurePolicy) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ExternalAdmissionHookConfiguration) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ExternalAdmissionHookConfiguration{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `ExternalAdmissionHooks:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ExternalAdmissionHooks), "ExternalAdmissionHook", "ExternalAdmissionHook", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ExternalAdmissionHookConfigurationList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ExternalAdmissionHookConfigurationList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ExternalAdmissionHookConfiguration", "ExternalAdmissionHookConfiguration", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Initializer) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Initializer{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "Rule", "Rule", 1), `&`, ``, 1) + `,`,
+ `FailurePolicy:` + valueToStringGenerated(this.FailurePolicy) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *InitializerConfiguration) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&InitializerConfiguration{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Initializers:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Initializers), "Initializer", "Initializer", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *InitializerConfigurationList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&InitializerConfigurationList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "InitializerConfiguration", "InitializerConfiguration", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Rule) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Rule{`,
+ `APIGroups:` + fmt.Sprintf("%v", this.APIGroups) + `,`,
+ `APIVersions:` + fmt.Sprintf("%v", this.APIVersions) + `,`,
+ `Resources:` + fmt.Sprintf("%v", this.Resources) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RuleWithOperations) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RuleWithOperations{`,
+ `Operations:` + fmt.Sprintf("%v", this.Operations) + `,`,
+ `Rule:` + strings.Replace(strings.Replace(this.Rule.String(), "Rule", "Rule", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ServiceReference) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ServiceReference{`,
+ `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *AdmissionHookClientConfig) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: AdmissionHookClientConfig: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: AdmissionHookClientConfig: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Service.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CABundle", wireType)
+ }
+ var byteLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ byteLen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if byteLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + byteLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.CABundle = append(m.CABundle[:0], dAtA[iNdEx:postIndex]...)
+ if m.CABundle == nil {
+ m.CABundle = []byte{}
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExternalAdmissionHook) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExternalAdmissionHook: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExternalAdmissionHook: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ClientConfig", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ClientConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Rules = append(m.Rules, RuleWithOperations{})
+ if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FailurePolicy", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := FailurePolicyType(dAtA[iNdEx:postIndex])
+ m.FailurePolicy = &s
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExternalAdmissionHookConfiguration) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExternalAdmissionHookConfiguration: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExternalAdmissionHookConfiguration: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ExternalAdmissionHooks", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ExternalAdmissionHooks = append(m.ExternalAdmissionHooks, ExternalAdmissionHook{})
+ if err := m.ExternalAdmissionHooks[len(m.ExternalAdmissionHooks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExternalAdmissionHookConfigurationList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExternalAdmissionHookConfigurationList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExternalAdmissionHookConfigurationList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ExternalAdmissionHookConfiguration{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Initializer) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Initializer: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Initializer: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Rules = append(m.Rules, Rule{})
+ if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FailurePolicy", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := FailurePolicyType(dAtA[iNdEx:postIndex])
+ m.FailurePolicy = &s
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *InitializerConfiguration) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: InitializerConfiguration: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: InitializerConfiguration: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Initializers", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Initializers = append(m.Initializers, Initializer{})
+ if err := m.Initializers[len(m.Initializers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *InitializerConfigurationList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: InitializerConfigurationList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: InitializerConfigurationList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, InitializerConfiguration{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Rule) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Rule: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Rule: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIGroups", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIGroups = append(m.APIGroups, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIVersions", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIVersions = append(m.APIVersions, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Resources = append(m.Resources, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RuleWithOperations) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RuleWithOperations: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RuleWithOperations: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Operations", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Operations = append(m.Operations, OperationType(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Rule.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ServiceReference) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ServiceReference: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ServiceReference: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Namespace = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 877 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcf, 0x6f, 0x1b, 0x45,
+ 0x14, 0xce, 0xd8, 0x8e, 0x6a, 0x8f, 0x6d, 0xb5, 0x1d, 0x41, 0x65, 0x22, 0xb4, 0x6b, 0xed, 0xa1,
+ 0xb2, 0x84, 0xd8, 0x25, 0x01, 0x21, 0x38, 0x55, 0xd9, 0x88, 0x82, 0x45, 0x7f, 0x44, 0xd3, 0x0a,
+ 0x24, 0x04, 0x12, 0x93, 0xf5, 0x8b, 0x3d, 0x78, 0x7f, 0x69, 0x66, 0xd6, 0x6a, 0x38, 0x55, 0x5c,
+ 0x41, 0x08, 0x89, 0x7f, 0x82, 0x2b, 0x37, 0x2e, 0xdc, 0x73, 0xec, 0xb1, 0x27, 0x8b, 0x6c, 0xff,
+ 0x07, 0x0e, 0xbd, 0x80, 0xf6, 0x97, 0x77, 0x5d, 0xdb, 0x6a, 0x54, 0x57, 0xbd, 0x65, 0xde, 0xdb,
+ 0xf7, 0xbd, 0xef, 0xfb, 0xf2, 0xde, 0x8c, 0xf1, 0x70, 0xfa, 0x89, 0x34, 0x79, 0x60, 0x4d, 0xa3,
+ 0x13, 0x10, 0x3e, 0x28, 0x90, 0x56, 0x38, 0x1d, 0x5b, 0x2c, 0xe4, 0xd2, 0x62, 0x23, 0x8f, 0x4b,
+ 0xc9, 0x03, 0x5f, 0xc0, 0x98, 0x4b, 0x25, 0x98, 0xe2, 0x81, 0x6f, 0xcd, 0xf6, 0x99, 0x1b, 0x4e,
+ 0xd8, 0xbe, 0x35, 0x06, 0x1f, 0x04, 0x53, 0x30, 0x32, 0x43, 0x11, 0xa8, 0x80, 0x7c, 0x9a, 0x41,
+ 0x99, 0x25, 0x94, 0x19, 0x4e, 0xc7, 0x66, 0x02, 0x65, 0xae, 0x85, 0x32, 0x0b, 0xa8, 0xbd, 0xf7,
+ 0xc7, 0x5c, 0x4d, 0xa2, 0x13, 0xd3, 0x09, 0x3c, 0x6b, 0x1c, 0x8c, 0x03, 0x2b, 0x45, 0x3c, 0x89,
+ 0x4e, 0xd3, 0x53, 0x7a, 0x48, 0xff, 0xca, 0x3a, 0xed, 0x7d, 0x94, 0x93, 0x66, 0x21, 0xf7, 0x98,
+ 0x33, 0xe1, 0x3e, 0x88, 0xb3, 0x92, 0xb6, 0x07, 0x8a, 0x59, 0xb3, 0x15, 0x7e, 0x7b, 0xd6, 0xa6,
+ 0x2a, 0x11, 0xf9, 0x8a, 0x7b, 0xb0, 0x52, 0xf0, 0xf1, 0xcb, 0x0a, 0xa4, 0x33, 0x01, 0x8f, 0xad,
+ 0xd4, 0x7d, 0xb8, 0xa9, 0x2e, 0x52, 0xdc, 0xb5, 0xb8, 0xaf, 0xa4, 0x12, 0x2f, 0x16, 0x19, 0x7f,
+ 0x23, 0xfc, 0xce, 0x61, 0xe1, 0xd2, 0x17, 0x41, 0x30, 0x3d, 0x72, 0x39, 0xf8, 0xea, 0x28, 0xf0,
+ 0x4f, 0xf9, 0x98, 0xcc, 0xf0, 0x15, 0x09, 0x62, 0xc6, 0x1d, 0xe8, 0xa1, 0x3e, 0x1a, 0xb4, 0x0f,
+ 0xbe, 0x34, 0x5f, 0xd9, 0x6d, 0xf3, 0x41, 0x86, 0x44, 0xe1, 0x14, 0x04, 0xf8, 0x0e, 0xd8, 0x57,
+ 0xcf, 0xe7, 0xfa, 0x4e, 0x3c, 0xd7, 0xaf, 0x14, 0x99, 0xa2, 0x19, 0x19, 0xe0, 0xa6, 0xc3, 0xec,
+ 0xc8, 0x1f, 0xb9, 0xd0, 0xab, 0xf5, 0xd1, 0xa0, 0x63, 0x77, 0xe2, 0xb9, 0xde, 0x3c, 0x3a, 0xcc,
+ 0x62, 0x74, 0x91, 0x35, 0x7e, 0xa9, 0xe3, 0xb7, 0x3f, 0x7b, 0xa4, 0x40, 0xf8, 0xcc, 0x5d, 0xd2,
+ 0x41, 0xfa, 0xb8, 0xe1, 0x33, 0x2f, 0x23, 0xde, 0xb2, 0x3b, 0x79, 0xaf, 0xc6, 0x3d, 0xe6, 0x01,
+ 0x4d, 0x33, 0xe4, 0x57, 0x84, 0x3b, 0x4e, 0x45, 0x6e, 0xda, 0xaa, 0x7d, 0xf0, 0x70, 0x0b, 0x8d,
+ 0x1b, 0xad, 0xb4, 0xdf, 0xca, 0x09, 0x74, 0xaa, 0x51, 0xba, 0xd4, 0x9f, 0x08, 0xbc, 0x2b, 0x22,
+ 0x17, 0x64, 0xaf, 0xde, 0xaf, 0x0f, 0xda, 0x07, 0x77, 0xb7, 0x20, 0x42, 0x23, 0x17, 0xbe, 0xe6,
+ 0x6a, 0x72, 0x3f, 0x84, 0x2c, 0x25, 0xed, 0x6e, 0xce, 0x60, 0x37, 0xc9, 0x49, 0x9a, 0xb5, 0x22,
+ 0x77, 0x70, 0xf7, 0x94, 0x71, 0x37, 0x12, 0x70, 0x1c, 0xb8, 0xdc, 0x39, 0xeb, 0x35, 0x52, 0xbf,
+ 0x6e, 0xc6, 0x73, 0xbd, 0x7b, 0xbb, 0x9a, 0x78, 0x3e, 0xd7, 0xaf, 0x2f, 0x05, 0x1e, 0x9e, 0x85,
+ 0x40, 0x97, 0x8b, 0x8d, 0x3f, 0x6b, 0xd8, 0x58, 0xfb, 0xef, 0xc8, 0x14, 0x46, 0x19, 0x17, 0xf2,
+ 0x3d, 0x6e, 0x26, 0xeb, 0x32, 0x62, 0x8a, 0xe5, 0x83, 0xf5, 0x41, 0xa1, 0xb5, 0x3a, 0xbd, 0xa5,
+ 0xda, 0xe4, 0x6b, 0x73, 0xb6, 0x6f, 0xde, 0x3f, 0xf9, 0x01, 0x1c, 0x75, 0x17, 0x14, 0xb3, 0x49,
+ 0x2e, 0x07, 0x97, 0x31, 0xba, 0x40, 0x25, 0x7f, 0x20, 0x7c, 0x03, 0xd6, 0x11, 0x91, 0xbd, 0x5a,
+ 0x6a, 0xee, 0xf1, 0x16, 0xe6, 0xae, 0x55, 0x68, 0x6b, 0x39, 0xa1, 0x1b, 0x6b, 0xd3, 0x92, 0x6e,
+ 0xe0, 0x63, 0xfc, 0x5c, 0xc3, 0x37, 0x5f, 0xee, 0xd9, 0x1d, 0x2e, 0x15, 0xf9, 0x76, 0xc5, 0x37,
+ 0xf3, 0x72, 0xbe, 0x25, 0xd5, 0xa9, 0x6b, 0xd7, 0x72, 0x92, 0xcd, 0x22, 0x52, 0xf1, 0xec, 0x27,
+ 0x84, 0x77, 0xb9, 0x02, 0xaf, 0xb0, 0xe8, 0xbb, 0xd7, 0x6d, 0xd1, 0x92, 0xa0, 0x72, 0x1e, 0x87,
+ 0x49, 0x4f, 0x9a, 0xb5, 0x36, 0x9e, 0x21, 0xdc, 0x1e, 0xfa, 0x5c, 0x71, 0xe6, 0xf2, 0x1f, 0x41,
+ 0x5c, 0x62, 0x8d, 0x47, 0xc5, 0xd6, 0x64, 0xac, 0x6f, 0x6d, 0xb9, 0x35, 0x97, 0xdd, 0x93, 0xfa,
+ 0x36, 0x7b, 0xf2, 0x1f, 0xc2, 0xbd, 0x8a, 0xca, 0x37, 0xbd, 0x1d, 0x8f, 0x11, 0xee, 0xf0, 0xb2,
+ 0x7d, 0x61, 0xdd, 0xed, 0x2d, 0xac, 0xab, 0xa8, 0x29, 0xef, 0xba, 0x4a, 0x50, 0xd2, 0xa5, 0x8e,
+ 0xc6, 0xbf, 0x08, 0xbf, 0xbb, 0xc9, 0x81, 0x37, 0x30, 0xeb, 0x8f, 0x96, 0x47, 0xfd, 0xc1, 0xeb,
+ 0x51, 0x7e, 0x99, 0x01, 0xff, 0x1d, 0xe1, 0x46, 0x32, 0x59, 0xe4, 0x3d, 0xdc, 0x62, 0x21, 0xff,
+ 0x5c, 0x04, 0x51, 0x28, 0x7b, 0xa8, 0x5f, 0x1f, 0xb4, 0xec, 0x6e, 0x3c, 0xd7, 0x5b, 0x87, 0xc7,
+ 0xc3, 0x2c, 0x48, 0xcb, 0x3c, 0xd9, 0xc7, 0x6d, 0x16, 0xf2, 0xaf, 0x40, 0x24, 0x3c, 0x32, 0xd6,
+ 0x2d, 0xfb, 0x6a, 0x3c, 0xd7, 0xdb, 0x87, 0xc7, 0xc3, 0x22, 0x4c, 0xab, 0xdf, 0x24, 0xf8, 0x02,
+ 0x64, 0x10, 0x09, 0x27, 0x7f, 0x51, 0x72, 0x7c, 0x5a, 0x04, 0x69, 0x99, 0x37, 0xfe, 0x42, 0x98,
+ 0xac, 0xbe, 0x19, 0xe4, 0x16, 0xc6, 0xc1, 0xe2, 0x94, 0x93, 0xd4, 0xd3, 0xb1, 0x5a, 0x44, 0x9f,
+ 0xcf, 0xf5, 0xee, 0xe2, 0x94, 0xce, 0x7a, 0xa5, 0x84, 0x30, 0xdc, 0x48, 0xf6, 0x27, 0x7f, 0x5a,
+ 0xb7, 0xde, 0xcd, 0xc5, 0xfe, 0x27, 0x27, 0x9a, 0x42, 0x1b, 0x80, 0xaf, 0xbd, 0xf8, 0xd3, 0x82,
+ 0x58, 0xb8, 0x95, 0xdc, 0x0d, 0x32, 0x64, 0x4e, 0x71, 0x75, 0x5c, 0xcf, 0x4b, 0x5b, 0xf7, 0x8a,
+ 0x04, 0x2d, 0xbf, 0x59, 0x5c, 0x33, 0xb5, 0x4d, 0xd7, 0x8c, 0x6d, 0x9e, 0x5f, 0x68, 0x3b, 0x4f,
+ 0x2e, 0xb4, 0x9d, 0xa7, 0x17, 0xda, 0xce, 0xe3, 0x58, 0x43, 0xe7, 0xb1, 0x86, 0x9e, 0xc4, 0x1a,
+ 0x7a, 0x1a, 0x6b, 0xe8, 0x9f, 0x58, 0x43, 0xbf, 0x3d, 0xd3, 0x76, 0xbe, 0x69, 0x16, 0x7c, 0xff,
+ 0x0f, 0x00, 0x00, 0xff, 0xff, 0x2c, 0x2c, 0x38, 0x31, 0xe3, 0x0a, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/generated.proto
new file mode 100644
index 000000000..42ee4fb6a
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/generated.proto
@@ -0,0 +1,203 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.pkg.apis.admissionregistration.v1alpha1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1alpha1";
+
+// AdmissionHookClientConfig contains the information to make a TLS
+// connection with the webhook
+message AdmissionHookClientConfig {
+ // Service is a reference to the service for this webhook. If there is only
+ // one port open for the service, that port will be used. If there are multiple
+ // ports open, port 443 will be used if it is open, otherwise it is an error.
+ // Required
+ optional ServiceReference service = 1;
+
+ // CABundle is a PEM encoded CA bundle which will be used to validate webhook's server certificate.
+ // Required
+ optional bytes caBundle = 2;
+}
+
+// ExternalAdmissionHook describes an external admission webhook and the
+// resources and operations it applies to.
+message ExternalAdmissionHook {
+ // The name of the external admission webhook.
+ // Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where
+ // "imagepolicy" is the name of the webhook, and kubernetes.io is the name
+ // of the organization.
+ // Required.
+ optional string name = 1;
+
+ // ClientConfig defines how to communicate with the hook.
+ // Required
+ optional AdmissionHookClientConfig clientConfig = 2;
+
+ // Rules describes what operations on what resources/subresources the webhook cares about.
+ // The webhook cares about an operation if it matches _any_ Rule.
+ repeated RuleWithOperations rules = 3;
+
+ // FailurePolicy defines how unrecognized errors from the admission endpoint are handled -
+ // allowed values are Ignore or Fail. Defaults to Ignore.
+ // +optional
+ optional string failurePolicy = 4;
+}
+
+// ExternalAdmissionHookConfiguration describes the configuration of initializers.
+message ExternalAdmissionHookConfiguration {
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // ExternalAdmissionHooks is a list of external admission webhooks and the
+ // affected resources and operations.
+ // +optional
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ repeated ExternalAdmissionHook externalAdmissionHooks = 2;
+}
+
+// ExternalAdmissionHookConfigurationList is a list of ExternalAdmissionHookConfiguration.
+message ExternalAdmissionHookConfigurationList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of ExternalAdmissionHookConfiguration.
+ repeated ExternalAdmissionHookConfiguration items = 2;
+}
+
+// Initializer describes the name and the failure policy of an initializer, and
+// what resources it applies to.
+message Initializer {
+ // Name is the identifier of the initializer. It will be added to the
+ // object that needs to be initialized.
+ // Name should be fully qualified, e.g., alwayspullimages.kubernetes.io, where
+ // "alwayspullimages" is the name of the webhook, and kubernetes.io is the name
+ // of the organization.
+ // Required
+ optional string name = 1;
+
+ // Rules describes what resources/subresources the initializer cares about.
+ // The initializer cares about an operation if it matches _any_ Rule.
+ // Rule.Resources must not include subresources.
+ repeated Rule rules = 2;
+
+ // FailurePolicy defines what happens if the responsible initializer controller
+ // fails to takes action. Allowed values are Ignore, or Fail. If "Ignore" is
+ // set, initializer is removed from the initializers list of an object if
+ // the timeout is reached; If "Fail" is set, admissionregistration returns timeout error
+ // if the timeout is reached.
+ optional string failurePolicy = 3;
+}
+
+// InitializerConfiguration describes the configuration of initializers.
+message InitializerConfiguration {
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Initializers is a list of resources and their default initializers
+ // Order-sensitive.
+ // When merging multiple InitializerConfigurations, we sort the initializers
+ // from different InitializerConfigurations by the name of the
+ // InitializerConfigurations; the order of the initializers from the same
+ // InitializerConfiguration is preserved.
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ // +optional
+ repeated Initializer initializers = 2;
+}
+
+// InitializerConfigurationList is a list of InitializerConfiguration.
+message InitializerConfigurationList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of InitializerConfiguration.
+ repeated InitializerConfiguration items = 2;
+}
+
+// Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended
+// to make sure that all the tuple expansions are valid.
+message Rule {
+ // APIGroups is the API groups the resources belong to. '*' is all groups.
+ // If '*' is present, the length of the slice must be one.
+ // Required.
+ repeated string apiGroups = 1;
+
+ // APIVersions is the API versions the resources belong to. '*' is all versions.
+ // If '*' is present, the length of the slice must be one.
+ // Required.
+ repeated string apiVersions = 2;
+
+ // Resources is a list of resources this rule applies to.
+ //
+ // For example:
+ // 'pods' means pods.
+ // 'pods/log' means the log subresource of pods.
+ // '*' means all resources, but not subresources.
+ // 'pods/*' means all subresources of pods.
+ // '*/scale' means all scale subresources.
+ // '*/*' means all resources and their subresources.
+ //
+ // If wildcard is present, the validation rule will ensure resources do not
+ // overlap with each other.
+ //
+ // Depending on the enclosing object, subresources might not be allowed.
+ // Required.
+ repeated string resources = 3;
+}
+
+// RuleWithOperations is a tuple of Operations and Resources. It is recommended to make
+// sure that all the tuple expansions are valid.
+message RuleWithOperations {
+ // Operations is the operations the admission hook cares about - CREATE, UPDATE, or *
+ // for all operations.
+ // If '*' is present, the length of the slice must be one.
+ // Required.
+ repeated string operations = 1;
+
+ // Rule is embedded, it describes other criteria of the rule, like
+ // APIGroups, APIVersions, Resources, etc.
+ optional Rule rule = 2;
+}
+
+// ServiceReference holds a reference to Service.legacy.k8s.io
+message ServiceReference {
+ // Namespace is the namespace of the service
+ // Required
+ optional string namespace = 1;
+
+ // Name is the name of the service
+ // Required
+ optional string name = 2;
+}
+
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/register.go
new file mode 100644
index 000000000..10fa4a161
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/register.go
@@ -0,0 +1,60 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+const GroupName = "admissionregistration.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs)
+}
+
+// Adds the list of known types to scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &InitializerConfiguration{},
+ &InitializerConfigurationList{},
+ &ExternalAdmissionHookConfiguration{},
+ &ExternalAdmissionHookConfigurationList{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/types.generated.go
new file mode 100644
index 000000000..8a6563730
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/types.generated.go
@@ -0,0 +1,4232 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1alpha1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ pkg2_types "k8s.io/apimachinery/pkg/types"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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 pkg1_v1.TypeMeta
+ var v1 pkg2_types.UID
+ var v2 time.Time
+ _, _, _ = v0, v1, v2
+ }
+}
+
+func (x *InitializerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Initializers) != 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Initializers == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceInitializer(([]Initializer)(x.Initializers), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("initializers"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Initializers == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceInitializer(([]Initializer)(x.Initializers), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *InitializerConfiguration) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *InitializerConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "initializers":
+ if r.TryDecodeAsNil() {
+ x.Initializers = nil
+ } else {
+ yyv10 := &x.Initializers
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSliceInitializer((*[]Initializer)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *InitializerConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Initializers = nil
+ } else {
+ yyv19 := &x.Initializers
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceInitializer((*[]Initializer)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *InitializerConfigurationList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceInitializerConfiguration(([]InitializerConfiguration)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceInitializerConfiguration(([]InitializerConfiguration)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *InitializerConfigurationList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *InitializerConfigurationList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceInitializerConfiguration((*[]InitializerConfiguration)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *InitializerConfigurationList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceInitializerConfiguration((*[]InitializerConfiguration)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Initializer) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = len(x.Rules) != 0
+ yyq2[2] = x.FailurePolicy != nil
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceRule(([]Rule)(x.Rules), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rules"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceRule(([]Rule)(x.Rules), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.FailurePolicy == nil {
+ r.EncodeNil()
+ } else {
+ yy10 := *x.FailurePolicy
+ yy10.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("failurePolicy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.FailurePolicy == nil {
+ r.EncodeNil()
+ } else {
+ yy12 := *x.FailurePolicy
+ yy12.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Initializer) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Initializer) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "rules":
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv6 := &x.Rules
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceRule((*[]Rule)(yyv6), d)
+ }
+ }
+ case "failurePolicy":
+ if r.TryDecodeAsNil() {
+ if x.FailurePolicy != nil {
+ x.FailurePolicy = nil
+ }
+ } else {
+ if x.FailurePolicy == nil {
+ x.FailurePolicy = new(FailurePolicyType)
+ }
+ x.FailurePolicy.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Initializer) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv10 := &x.Name
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv12 := &x.Rules
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ h.decSliceRule((*[]Rule)(yyv12), d)
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FailurePolicy != nil {
+ x.FailurePolicy = nil
+ }
+ } else {
+ if x.FailurePolicy == nil {
+ x.FailurePolicy = new(FailurePolicyType)
+ }
+ x.FailurePolicy.CodecDecodeSelf(d)
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Rule) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.APIGroups) != 0
+ yyq2[1] = len(x.APIVersions) != 0
+ yyq2[2] = len(x.Resources) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.APIGroups == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.APIGroups, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiGroups"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.APIGroups == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.APIGroups, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.APIVersions == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.APIVersions, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.APIVersions == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.APIVersions, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Resources == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Resources, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resources"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Resources == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Resources, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Rule) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Rule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "apiGroups":
+ if r.TryDecodeAsNil() {
+ x.APIGroups = nil
+ } else {
+ yyv4 := &x.APIGroups
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv4, false, d)
+ }
+ }
+ case "apiVersions":
+ if r.TryDecodeAsNil() {
+ x.APIVersions = nil
+ } else {
+ yyv6 := &x.APIVersions
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv6, false, d)
+ }
+ }
+ case "resources":
+ if r.TryDecodeAsNil() {
+ x.Resources = nil
+ } else {
+ yyv8 := &x.Resources
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv8, false, d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Rule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIGroups = nil
+ } else {
+ yyv11 := &x.APIGroups
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv11, false, d)
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersions = nil
+ } else {
+ yyv13 := &x.APIVersions
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv13, false, d)
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Resources = nil
+ } else {
+ yyv15 := &x.Resources
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv15, false, d)
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x FailurePolicyType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *FailurePolicyType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *ExternalAdmissionHookConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.ExternalAdmissionHooks) != 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ if x.ExternalAdmissionHooks == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceExternalAdmissionHook(([]ExternalAdmissionHook)(x.ExternalAdmissionHooks), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("externalAdmissionHooks"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ExternalAdmissionHooks == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceExternalAdmissionHook(([]ExternalAdmissionHook)(x.ExternalAdmissionHooks), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ExternalAdmissionHookConfiguration) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ExternalAdmissionHookConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "externalAdmissionHooks":
+ if r.TryDecodeAsNil() {
+ x.ExternalAdmissionHooks = nil
+ } else {
+ yyv10 := &x.ExternalAdmissionHooks
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSliceExternalAdmissionHook((*[]ExternalAdmissionHook)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ExternalAdmissionHookConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ExternalAdmissionHooks = nil
+ } else {
+ yyv19 := &x.ExternalAdmissionHooks
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceExternalAdmissionHook((*[]ExternalAdmissionHook)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ExternalAdmissionHookConfigurationList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceExternalAdmissionHookConfiguration(([]ExternalAdmissionHookConfiguration)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceExternalAdmissionHookConfiguration(([]ExternalAdmissionHookConfiguration)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ExternalAdmissionHookConfigurationList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ExternalAdmissionHookConfigurationList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceExternalAdmissionHookConfiguration((*[]ExternalAdmissionHookConfiguration)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ExternalAdmissionHookConfigurationList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceExternalAdmissionHookConfiguration((*[]ExternalAdmissionHookConfiguration)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ExternalAdmissionHook) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = len(x.Rules) != 0
+ yyq2[3] = x.FailurePolicy != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy7 := &x.ClientConfig
+ yy7.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("clientConfig"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.ClientConfig
+ yy9.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.encSliceRuleWithOperations(([]RuleWithOperations)(x.Rules), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rules"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ h.encSliceRuleWithOperations(([]RuleWithOperations)(x.Rules), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.FailurePolicy == nil {
+ r.EncodeNil()
+ } else {
+ yy15 := *x.FailurePolicy
+ yy15.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("failurePolicy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.FailurePolicy == nil {
+ r.EncodeNil()
+ } else {
+ yy17 := *x.FailurePolicy
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ExternalAdmissionHook) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ExternalAdmissionHook) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "clientConfig":
+ if r.TryDecodeAsNil() {
+ x.ClientConfig = AdmissionHookClientConfig{}
+ } else {
+ yyv6 := &x.ClientConfig
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "rules":
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv7 := &x.Rules
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSliceRuleWithOperations((*[]RuleWithOperations)(yyv7), d)
+ }
+ }
+ case "failurePolicy":
+ if r.TryDecodeAsNil() {
+ if x.FailurePolicy != nil {
+ x.FailurePolicy = nil
+ }
+ } else {
+ if x.FailurePolicy == nil {
+ x.FailurePolicy = new(FailurePolicyType)
+ }
+ x.FailurePolicy.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ExternalAdmissionHook) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv11 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ClientConfig = AdmissionHookClientConfig{}
+ } else {
+ yyv13 := &x.ClientConfig
+ yyv13.CodecDecodeSelf(d)
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv14 := &x.Rules
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.decSliceRuleWithOperations((*[]RuleWithOperations)(yyv14), d)
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FailurePolicy != nil {
+ x.FailurePolicy = nil
+ }
+ } else {
+ if x.FailurePolicy == nil {
+ x.FailurePolicy = new(FailurePolicyType)
+ }
+ x.FailurePolicy.CodecDecodeSelf(d)
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *RuleWithOperations) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Operations) != 0
+ yyq2[1] = len(x.APIGroups) != 0
+ yyq2[2] = len(x.APIVersions) != 0
+ yyq2[3] = len(x.Resources) != 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Operations == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceOperationType(([]OperationType)(x.Operations), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("operations"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Operations == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceOperationType(([]OperationType)(x.Operations), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.APIGroups == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.APIGroups, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiGroups"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.APIGroups == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.APIGroups, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.APIVersions == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.APIVersions, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.APIVersions == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.APIVersions, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Resources == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Resources, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resources"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Resources == nil {
+ r.EncodeNil()
+ } else {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Resources, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RuleWithOperations) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RuleWithOperations) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "operations":
+ if r.TryDecodeAsNil() {
+ x.Operations = nil
+ } else {
+ yyv4 := &x.Operations
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceOperationType((*[]OperationType)(yyv4), d)
+ }
+ }
+ case "apiGroups":
+ if r.TryDecodeAsNil() {
+ x.APIGroups = nil
+ } else {
+ yyv6 := &x.APIGroups
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv6, false, d)
+ }
+ }
+ case "apiVersions":
+ if r.TryDecodeAsNil() {
+ x.APIVersions = nil
+ } else {
+ yyv8 := &x.APIVersions
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv8, false, d)
+ }
+ }
+ case "resources":
+ if r.TryDecodeAsNil() {
+ x.Resources = nil
+ } else {
+ yyv10 := &x.Resources
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv10, false, d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RuleWithOperations) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Operations = nil
+ } else {
+ yyv13 := &x.Operations
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceOperationType((*[]OperationType)(yyv13), d)
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIGroups = nil
+ } else {
+ yyv15 := &x.APIGroups
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv15, false, d)
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersions = nil
+ } else {
+ yyv17 := &x.APIVersions
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv17, false, d)
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Resources = nil
+ } else {
+ yyv19 := &x.Resources
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv19, false, d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x OperationType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *OperationType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *AdmissionHookClientConfig) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy4 := &x.Service
+ yy4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("service"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.Service
+ yy6.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.CABundle == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.CABundle))
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("caBundle"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.CABundle == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.CABundle))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *AdmissionHookClientConfig) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *AdmissionHookClientConfig) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "service":
+ if r.TryDecodeAsNil() {
+ x.Service = ServiceReference{}
+ } else {
+ yyv4 := &x.Service
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "caBundle":
+ if r.TryDecodeAsNil() {
+ x.CABundle = nil
+ } else {
+ yyv5 := &x.CABundle
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *yyv5 = r.DecodeBytes(*(*[]byte)(yyv5), false, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *AdmissionHookClientConfig) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Service = ServiceReference{}
+ } else {
+ yyv8 := &x.Service
+ yyv8.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CABundle = nil
+ } else {
+ yyv9 := &x.CABundle
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ *yyv9 = r.DecodeBytes(*(*[]byte)(yyv9), false, false)
+ }
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ServiceReference) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("namespace"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ServiceReference) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ServiceReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerMapEnd1234)
+}
+
+func (x *ServiceReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encSliceInitializer(v []Initializer, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceInitializer(v *[]Initializer, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Initializer{}
+ 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, 48)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Initializer, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Initializer, 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] = Initializer{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Initializer{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Initializer{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Initializer{}) // var yyz1 Initializer
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Initializer{}
+ } 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 = []Initializer{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceInitializerConfiguration(v []InitializerConfiguration, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceInitializerConfiguration(v *[]InitializerConfiguration, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []InitializerConfiguration{}
+ 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, 288)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]InitializerConfiguration, yyrl1)
+ }
+ } else {
+ yyv1 = make([]InitializerConfiguration, 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] = InitializerConfiguration{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, InitializerConfiguration{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = InitializerConfiguration{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, InitializerConfiguration{}) // var yyz1 InitializerConfiguration
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = InitializerConfiguration{}
+ } 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 = []InitializerConfiguration{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceRule(v []Rule, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceRule(v *[]Rule, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Rule{}
+ 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([]Rule, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Rule, 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] = Rule{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Rule{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Rule{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Rule{}) // var yyz1 Rule
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Rule{}
+ } 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 = []Rule{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceExternalAdmissionHook(v []ExternalAdmissionHook, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceExternalAdmissionHook(v *[]ExternalAdmissionHook, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ExternalAdmissionHook{}
+ 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, 104)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ExternalAdmissionHook, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ExternalAdmissionHook, 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] = ExternalAdmissionHook{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ExternalAdmissionHook{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ExternalAdmissionHook{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ExternalAdmissionHook{}) // var yyz1 ExternalAdmissionHook
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ExternalAdmissionHook{}
+ } 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 = []ExternalAdmissionHook{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceExternalAdmissionHookConfiguration(v []ExternalAdmissionHookConfiguration, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceExternalAdmissionHookConfiguration(v *[]ExternalAdmissionHookConfiguration, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ExternalAdmissionHookConfiguration{}
+ 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, 288)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ExternalAdmissionHookConfiguration, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ExternalAdmissionHookConfiguration, 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] = ExternalAdmissionHookConfiguration{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ExternalAdmissionHookConfiguration{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ExternalAdmissionHookConfiguration{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ExternalAdmissionHookConfiguration{}) // var yyz1 ExternalAdmissionHookConfiguration
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ExternalAdmissionHookConfiguration{}
+ } 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 = []ExternalAdmissionHookConfiguration{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceRuleWithOperations(v []RuleWithOperations, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceRuleWithOperations(v *[]RuleWithOperations, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []RuleWithOperations{}
+ 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, 96)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]RuleWithOperations, yyrl1)
+ }
+ } else {
+ yyv1 = make([]RuleWithOperations, 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] = RuleWithOperations{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, RuleWithOperations{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = RuleWithOperations{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, RuleWithOperations{}) // var yyz1 RuleWithOperations
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = RuleWithOperations{}
+ } 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 = []RuleWithOperations{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceOperationType(v []OperationType, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yyv1.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceOperationType(v *[]OperationType, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []OperationType{}
+ 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) {
+
+ yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]OperationType, yyrl1)
+ }
+ } else {
+ yyv1 = make([]OperationType, yyrl1)
+ }
+ yyc1 = true
+ yyrr1 = len(yyv1)
+ } else if yyl1 != len(yyv1) {
+ yyv1 = yyv1[:yyl1]
+ yyc1 = true
+ }
+ yyj1 := 0
+ for ; yyj1 < yyrr1; yyj1++ {
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, "") // var yyz1 OperationType
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } 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 = []OperationType{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/types.go
new file mode 100644
index 000000000..0d878095c
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/types.go
@@ -0,0 +1,220 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+
+// InitializerConfiguration describes the configuration of initializers.
+type InitializerConfiguration struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Initializers is a list of resources and their default initializers
+ // Order-sensitive.
+ // When merging multiple InitializerConfigurations, we sort the initializers
+ // from different InitializerConfigurations by the name of the
+ // InitializerConfigurations; the order of the initializers from the same
+ // InitializerConfiguration is preserved.
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ // +optional
+ Initializers []Initializer `json:"initializers,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=initializers"`
+}
+
+// InitializerConfigurationList is a list of InitializerConfiguration.
+type InitializerConfigurationList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of InitializerConfiguration.
+ Items []InitializerConfiguration `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// Initializer describes the name and the failure policy of an initializer, and
+// what resources it applies to.
+type Initializer struct {
+ // Name is the identifier of the initializer. It will be added to the
+ // object that needs to be initialized.
+ // Name should be fully qualified, e.g., alwayspullimages.kubernetes.io, where
+ // "alwayspullimages" is the name of the webhook, and kubernetes.io is the name
+ // of the organization.
+ // Required
+ Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
+
+ // Rules describes what resources/subresources the initializer cares about.
+ // The initializer cares about an operation if it matches _any_ Rule.
+ // Rule.Resources must not include subresources.
+ Rules []Rule `json:"rules,omitempty" protobuf:"bytes,2,rep,name=rules"`
+
+ // FailurePolicy defines what happens if the responsible initializer controller
+ // fails to takes action. Allowed values are Ignore, or Fail. If "Ignore" is
+ // set, initializer is removed from the initializers list of an object if
+ // the timeout is reached; If "Fail" is set, admissionregistration returns timeout error
+ // if the timeout is reached.
+ FailurePolicy *FailurePolicyType `json:"failurePolicy,omitempty" protobuf:"bytes,3,opt,name=failurePolicy,casttype=FailurePolicyType"`
+}
+
+// Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended
+// to make sure that all the tuple expansions are valid.
+type Rule struct {
+ // APIGroups is the API groups the resources belong to. '*' is all groups.
+ // If '*' is present, the length of the slice must be one.
+ // Required.
+ APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,1,rep,name=apiGroups"`
+
+ // APIVersions is the API versions the resources belong to. '*' is all versions.
+ // If '*' is present, the length of the slice must be one.
+ // Required.
+ APIVersions []string `json:"apiVersions,omitempty" protobuf:"bytes,2,rep,name=apiVersions"`
+
+ // Resources is a list of resources this rule applies to.
+ //
+ // For example:
+ // 'pods' means pods.
+ // 'pods/log' means the log subresource of pods.
+ // '*' means all resources, but not subresources.
+ // 'pods/*' means all subresources of pods.
+ // '*/scale' means all scale subresources.
+ // '*/*' means all resources and their subresources.
+ //
+ // If wildcard is present, the validation rule will ensure resources do not
+ // overlap with each other.
+ //
+ // Depending on the enclosing object, subresources might not be allowed.
+ // Required.
+ Resources []string `json:"resources,omitempty" protobuf:"bytes,3,rep,name=resources"`
+}
+
+type FailurePolicyType string
+
+const (
+ // Ignore means the initilizer is removed from the initializers list of an
+ // object if the initializer is timed out.
+ Ignore FailurePolicyType = "Ignore"
+ // For 1.7, only "Ignore" is allowed. "Fail" will be allowed when the
+ // extensible admission feature is beta.
+ Fail FailurePolicyType = "Fail"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+
+// ExternalAdmissionHookConfiguration describes the configuration of initializers.
+type ExternalAdmissionHookConfiguration struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+ // ExternalAdmissionHooks is a list of external admission webhooks and the
+ // affected resources and operations.
+ // +optional
+ // +patchMergeKey=name
+ // +patchStrategy=merge
+ ExternalAdmissionHooks []ExternalAdmissionHook `json:"externalAdmissionHooks,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=externalAdmissionHooks"`
+}
+
+// ExternalAdmissionHookConfigurationList is a list of ExternalAdmissionHookConfiguration.
+type ExternalAdmissionHookConfigurationList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+ // List of ExternalAdmissionHookConfiguration.
+ Items []ExternalAdmissionHookConfiguration `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// ExternalAdmissionHook describes an external admission webhook and the
+// resources and operations it applies to.
+type ExternalAdmissionHook struct {
+ // The name of the external admission webhook.
+ // Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where
+ // "imagepolicy" is the name of the webhook, and kubernetes.io is the name
+ // of the organization.
+ // Required.
+ Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
+
+ // ClientConfig defines how to communicate with the hook.
+ // Required
+ ClientConfig AdmissionHookClientConfig `json:"clientConfig" protobuf:"bytes,2,opt,name=clientConfig"`
+
+ // Rules describes what operations on what resources/subresources the webhook cares about.
+ // The webhook cares about an operation if it matches _any_ Rule.
+ Rules []RuleWithOperations `json:"rules,omitempty" protobuf:"bytes,3,rep,name=rules"`
+
+ // FailurePolicy defines how unrecognized errors from the admission endpoint are handled -
+ // allowed values are Ignore or Fail. Defaults to Ignore.
+ // +optional
+ FailurePolicy *FailurePolicyType `json:"failurePolicy,omitempty" protobuf:"bytes,4,opt,name=failurePolicy,casttype=FailurePolicyType"`
+}
+
+// RuleWithOperations is a tuple of Operations and Resources. It is recommended to make
+// sure that all the tuple expansions are valid.
+type RuleWithOperations struct {
+ // Operations is the operations the admission hook cares about - CREATE, UPDATE, or *
+ // for all operations.
+ // If '*' is present, the length of the slice must be one.
+ // Required.
+ Operations []OperationType `json:"operations,omitempty" protobuf:"bytes,1,rep,name=operations,casttype=OperationType"`
+ // Rule is embedded, it describes other criteria of the rule, like
+ // APIGroups, APIVersions, Resources, etc.
+ Rule `json:",inline" protobuf:"bytes,2,opt,name=rule"`
+}
+
+type OperationType string
+
+// The constants should be kept in sync with those defined in k8s.io/kubernetes/pkg/admission/interface.go.
+const (
+ OperationAll OperationType = "*"
+ Create OperationType = "CREATE"
+ Update OperationType = "UPDATE"
+ Delete OperationType = "DELETE"
+ Connect OperationType = "CONNECT"
+)
+
+// AdmissionHookClientConfig contains the information to make a TLS
+// connection with the webhook
+type AdmissionHookClientConfig struct {
+ // Service is a reference to the service for this webhook. If there is only
+ // one port open for the service, that port will be used. If there are multiple
+ // ports open, port 443 will be used if it is open, otherwise it is an error.
+ // Required
+ Service ServiceReference `json:"service" protobuf:"bytes,1,opt,name=service"`
+ // CABundle is a PEM encoded CA bundle which will be used to validate webhook's server certificate.
+ // Required
+ CABundle []byte `json:"caBundle" protobuf:"bytes,2,opt,name=caBundle"`
+}
+
+// ServiceReference holds a reference to Service.legacy.k8s.io
+type ServiceReference struct {
+ // Namespace is the namespace of the service
+ // Required
+ Namespace string `json:"namespace" protobuf:"bytes,1,opt,name=namespace"`
+ // Name is the name of the service
+ // Required
+ Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..9597deb59
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/types_swagger_doc_generated.go
@@ -0,0 +1,133 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_AdmissionHookClientConfig = map[string]string{
+ "": "AdmissionHookClientConfig contains the information to make a TLS connection with the webhook",
+ "service": "Service is a reference to the service for this webhook. If there is only one port open for the service, that port will be used. If there are multiple ports open, port 443 will be used if it is open, otherwise it is an error. Required",
+ "caBundle": "CABundle is a PEM encoded CA bundle which will be used to validate webhook's server certificate. Required",
+}
+
+func (AdmissionHookClientConfig) SwaggerDoc() map[string]string {
+ return map_AdmissionHookClientConfig
+}
+
+var map_ExternalAdmissionHook = map[string]string{
+ "": "ExternalAdmissionHook describes an external admission webhook and the resources and operations it applies to.",
+ "name": "The name of the external admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.",
+ "clientConfig": "ClientConfig defines how to communicate with the hook. Required",
+ "rules": "Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule.",
+ "failurePolicy": "FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Ignore.",
+}
+
+func (ExternalAdmissionHook) SwaggerDoc() map[string]string {
+ return map_ExternalAdmissionHook
+}
+
+var map_ExternalAdmissionHookConfiguration = map[string]string{
+ "": "ExternalAdmissionHookConfiguration describes the configuration of initializers.",
+ "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.",
+ "externalAdmissionHooks": "ExternalAdmissionHooks is a list of external admission webhooks and the affected resources and operations.",
+}
+
+func (ExternalAdmissionHookConfiguration) SwaggerDoc() map[string]string {
+ return map_ExternalAdmissionHookConfiguration
+}
+
+var map_ExternalAdmissionHookConfigurationList = map[string]string{
+ "": "ExternalAdmissionHookConfigurationList is a list of ExternalAdmissionHookConfiguration.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "List of ExternalAdmissionHookConfiguration.",
+}
+
+func (ExternalAdmissionHookConfigurationList) SwaggerDoc() map[string]string {
+ return map_ExternalAdmissionHookConfigurationList
+}
+
+var map_Initializer = map[string]string{
+ "": "Initializer describes the name and the failure policy of an initializer, and what resources it applies to.",
+ "name": "Name is the identifier of the initializer. It will be added to the object that needs to be initialized. Name should be fully qualified, e.g., alwayspullimages.kubernetes.io, where \"alwayspullimages\" is the name of the webhook, and kubernetes.io is the name of the organization. Required",
+ "rules": "Rules describes what resources/subresources the initializer cares about. The initializer cares about an operation if it matches _any_ Rule. Rule.Resources must not include subresources.",
+ "failurePolicy": "FailurePolicy defines what happens if the responsible initializer controller fails to takes action. Allowed values are Ignore, or Fail. If \"Ignore\" is set, initializer is removed from the initializers list of an object if the timeout is reached; If \"Fail\" is set, admissionregistration returns timeout error if the timeout is reached.",
+}
+
+func (Initializer) SwaggerDoc() map[string]string {
+ return map_Initializer
+}
+
+var map_InitializerConfiguration = map[string]string{
+ "": "InitializerConfiguration describes the configuration of initializers.",
+ "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.",
+ "initializers": "Initializers is a list of resources and their default initializers Order-sensitive. When merging multiple InitializerConfigurations, we sort the initializers from different InitializerConfigurations by the name of the InitializerConfigurations; the order of the initializers from the same InitializerConfiguration is preserved.",
+}
+
+func (InitializerConfiguration) SwaggerDoc() map[string]string {
+ return map_InitializerConfiguration
+}
+
+var map_InitializerConfigurationList = map[string]string{
+ "": "InitializerConfigurationList is a list of InitializerConfiguration.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "List of InitializerConfiguration.",
+}
+
+func (InitializerConfigurationList) SwaggerDoc() map[string]string {
+ return map_InitializerConfigurationList
+}
+
+var map_Rule = map[string]string{
+ "": "Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended to make sure that all the tuple expansions are valid.",
+ "apiGroups": "APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.",
+ "apiVersions": "APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.",
+ "resources": "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required.",
+}
+
+func (Rule) SwaggerDoc() map[string]string {
+ return map_Rule
+}
+
+var map_RuleWithOperations = map[string]string{
+ "": "RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.",
+ "operations": "Operations is the operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '*' is present, the length of the slice must be one. Required.",
+}
+
+func (RuleWithOperations) SwaggerDoc() map[string]string {
+ return map_RuleWithOperations
+}
+
+var map_ServiceReference = map[string]string{
+ "": "ServiceReference holds a reference to Service.legacy.k8s.io",
+ "namespace": "Namespace is the namespace of the service Required",
+ "name": "Name is the name of the service Required",
+}
+
+func (ServiceReference) SwaggerDoc() map[string]string {
+ return map_ServiceReference
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/zz_generated.conversion.go
new file mode 100644
index 000000000..02c17b091
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/zz_generated.conversion.go
@@ -0,0 +1,311 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1alpha1
+
+import (
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ admissionregistration "k8s.io/kubernetes/pkg/apis/admissionregistration"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1alpha1_AdmissionHookClientConfig_To_admissionregistration_AdmissionHookClientConfig,
+ Convert_admissionregistration_AdmissionHookClientConfig_To_v1alpha1_AdmissionHookClientConfig,
+ Convert_v1alpha1_ExternalAdmissionHook_To_admissionregistration_ExternalAdmissionHook,
+ Convert_admissionregistration_ExternalAdmissionHook_To_v1alpha1_ExternalAdmissionHook,
+ Convert_v1alpha1_ExternalAdmissionHookConfiguration_To_admissionregistration_ExternalAdmissionHookConfiguration,
+ Convert_admissionregistration_ExternalAdmissionHookConfiguration_To_v1alpha1_ExternalAdmissionHookConfiguration,
+ Convert_v1alpha1_ExternalAdmissionHookConfigurationList_To_admissionregistration_ExternalAdmissionHookConfigurationList,
+ Convert_admissionregistration_ExternalAdmissionHookConfigurationList_To_v1alpha1_ExternalAdmissionHookConfigurationList,
+ Convert_v1alpha1_Initializer_To_admissionregistration_Initializer,
+ Convert_admissionregistration_Initializer_To_v1alpha1_Initializer,
+ Convert_v1alpha1_InitializerConfiguration_To_admissionregistration_InitializerConfiguration,
+ Convert_admissionregistration_InitializerConfiguration_To_v1alpha1_InitializerConfiguration,
+ Convert_v1alpha1_InitializerConfigurationList_To_admissionregistration_InitializerConfigurationList,
+ Convert_admissionregistration_InitializerConfigurationList_To_v1alpha1_InitializerConfigurationList,
+ Convert_v1alpha1_Rule_To_admissionregistration_Rule,
+ Convert_admissionregistration_Rule_To_v1alpha1_Rule,
+ Convert_v1alpha1_RuleWithOperations_To_admissionregistration_RuleWithOperations,
+ Convert_admissionregistration_RuleWithOperations_To_v1alpha1_RuleWithOperations,
+ Convert_v1alpha1_ServiceReference_To_admissionregistration_ServiceReference,
+ Convert_admissionregistration_ServiceReference_To_v1alpha1_ServiceReference,
+ )
+}
+
+func autoConvert_v1alpha1_AdmissionHookClientConfig_To_admissionregistration_AdmissionHookClientConfig(in *AdmissionHookClientConfig, out *admissionregistration.AdmissionHookClientConfig, s conversion.Scope) error {
+ if err := Convert_v1alpha1_ServiceReference_To_admissionregistration_ServiceReference(&in.Service, &out.Service, s); err != nil {
+ return err
+ }
+ out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle))
+ return nil
+}
+
+// Convert_v1alpha1_AdmissionHookClientConfig_To_admissionregistration_AdmissionHookClientConfig is an autogenerated conversion function.
+func Convert_v1alpha1_AdmissionHookClientConfig_To_admissionregistration_AdmissionHookClientConfig(in *AdmissionHookClientConfig, out *admissionregistration.AdmissionHookClientConfig, s conversion.Scope) error {
+ return autoConvert_v1alpha1_AdmissionHookClientConfig_To_admissionregistration_AdmissionHookClientConfig(in, out, s)
+}
+
+func autoConvert_admissionregistration_AdmissionHookClientConfig_To_v1alpha1_AdmissionHookClientConfig(in *admissionregistration.AdmissionHookClientConfig, out *AdmissionHookClientConfig, s conversion.Scope) error {
+ if err := Convert_admissionregistration_ServiceReference_To_v1alpha1_ServiceReference(&in.Service, &out.Service, s); err != nil {
+ return err
+ }
+ if in.CABundle == nil {
+ out.CABundle = make([]byte, 0)
+ } else {
+ out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle))
+ }
+ return nil
+}
+
+// Convert_admissionregistration_AdmissionHookClientConfig_To_v1alpha1_AdmissionHookClientConfig is an autogenerated conversion function.
+func Convert_admissionregistration_AdmissionHookClientConfig_To_v1alpha1_AdmissionHookClientConfig(in *admissionregistration.AdmissionHookClientConfig, out *AdmissionHookClientConfig, s conversion.Scope) error {
+ return autoConvert_admissionregistration_AdmissionHookClientConfig_To_v1alpha1_AdmissionHookClientConfig(in, out, s)
+}
+
+func autoConvert_v1alpha1_ExternalAdmissionHook_To_admissionregistration_ExternalAdmissionHook(in *ExternalAdmissionHook, out *admissionregistration.ExternalAdmissionHook, s conversion.Scope) error {
+ out.Name = in.Name
+ if err := Convert_v1alpha1_AdmissionHookClientConfig_To_admissionregistration_AdmissionHookClientConfig(&in.ClientConfig, &out.ClientConfig, s); err != nil {
+ return err
+ }
+ out.Rules = *(*[]admissionregistration.RuleWithOperations)(unsafe.Pointer(&in.Rules))
+ out.FailurePolicy = (*admissionregistration.FailurePolicyType)(unsafe.Pointer(in.FailurePolicy))
+ return nil
+}
+
+// Convert_v1alpha1_ExternalAdmissionHook_To_admissionregistration_ExternalAdmissionHook is an autogenerated conversion function.
+func Convert_v1alpha1_ExternalAdmissionHook_To_admissionregistration_ExternalAdmissionHook(in *ExternalAdmissionHook, out *admissionregistration.ExternalAdmissionHook, s conversion.Scope) error {
+ return autoConvert_v1alpha1_ExternalAdmissionHook_To_admissionregistration_ExternalAdmissionHook(in, out, s)
+}
+
+func autoConvert_admissionregistration_ExternalAdmissionHook_To_v1alpha1_ExternalAdmissionHook(in *admissionregistration.ExternalAdmissionHook, out *ExternalAdmissionHook, s conversion.Scope) error {
+ out.Name = in.Name
+ if err := Convert_admissionregistration_AdmissionHookClientConfig_To_v1alpha1_AdmissionHookClientConfig(&in.ClientConfig, &out.ClientConfig, s); err != nil {
+ return err
+ }
+ out.Rules = *(*[]RuleWithOperations)(unsafe.Pointer(&in.Rules))
+ out.FailurePolicy = (*FailurePolicyType)(unsafe.Pointer(in.FailurePolicy))
+ return nil
+}
+
+// Convert_admissionregistration_ExternalAdmissionHook_To_v1alpha1_ExternalAdmissionHook is an autogenerated conversion function.
+func Convert_admissionregistration_ExternalAdmissionHook_To_v1alpha1_ExternalAdmissionHook(in *admissionregistration.ExternalAdmissionHook, out *ExternalAdmissionHook, s conversion.Scope) error {
+ return autoConvert_admissionregistration_ExternalAdmissionHook_To_v1alpha1_ExternalAdmissionHook(in, out, s)
+}
+
+func autoConvert_v1alpha1_ExternalAdmissionHookConfiguration_To_admissionregistration_ExternalAdmissionHookConfiguration(in *ExternalAdmissionHookConfiguration, out *admissionregistration.ExternalAdmissionHookConfiguration, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.ExternalAdmissionHooks = *(*[]admissionregistration.ExternalAdmissionHook)(unsafe.Pointer(&in.ExternalAdmissionHooks))
+ return nil
+}
+
+// Convert_v1alpha1_ExternalAdmissionHookConfiguration_To_admissionregistration_ExternalAdmissionHookConfiguration is an autogenerated conversion function.
+func Convert_v1alpha1_ExternalAdmissionHookConfiguration_To_admissionregistration_ExternalAdmissionHookConfiguration(in *ExternalAdmissionHookConfiguration, out *admissionregistration.ExternalAdmissionHookConfiguration, s conversion.Scope) error {
+ return autoConvert_v1alpha1_ExternalAdmissionHookConfiguration_To_admissionregistration_ExternalAdmissionHookConfiguration(in, out, s)
+}
+
+func autoConvert_admissionregistration_ExternalAdmissionHookConfiguration_To_v1alpha1_ExternalAdmissionHookConfiguration(in *admissionregistration.ExternalAdmissionHookConfiguration, out *ExternalAdmissionHookConfiguration, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.ExternalAdmissionHooks = *(*[]ExternalAdmissionHook)(unsafe.Pointer(&in.ExternalAdmissionHooks))
+ return nil
+}
+
+// Convert_admissionregistration_ExternalAdmissionHookConfiguration_To_v1alpha1_ExternalAdmissionHookConfiguration is an autogenerated conversion function.
+func Convert_admissionregistration_ExternalAdmissionHookConfiguration_To_v1alpha1_ExternalAdmissionHookConfiguration(in *admissionregistration.ExternalAdmissionHookConfiguration, out *ExternalAdmissionHookConfiguration, s conversion.Scope) error {
+ return autoConvert_admissionregistration_ExternalAdmissionHookConfiguration_To_v1alpha1_ExternalAdmissionHookConfiguration(in, out, s)
+}
+
+func autoConvert_v1alpha1_ExternalAdmissionHookConfigurationList_To_admissionregistration_ExternalAdmissionHookConfigurationList(in *ExternalAdmissionHookConfigurationList, out *admissionregistration.ExternalAdmissionHookConfigurationList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]admissionregistration.ExternalAdmissionHookConfiguration)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1alpha1_ExternalAdmissionHookConfigurationList_To_admissionregistration_ExternalAdmissionHookConfigurationList is an autogenerated conversion function.
+func Convert_v1alpha1_ExternalAdmissionHookConfigurationList_To_admissionregistration_ExternalAdmissionHookConfigurationList(in *ExternalAdmissionHookConfigurationList, out *admissionregistration.ExternalAdmissionHookConfigurationList, s conversion.Scope) error {
+ return autoConvert_v1alpha1_ExternalAdmissionHookConfigurationList_To_admissionregistration_ExternalAdmissionHookConfigurationList(in, out, s)
+}
+
+func autoConvert_admissionregistration_ExternalAdmissionHookConfigurationList_To_v1alpha1_ExternalAdmissionHookConfigurationList(in *admissionregistration.ExternalAdmissionHookConfigurationList, out *ExternalAdmissionHookConfigurationList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]ExternalAdmissionHookConfiguration, 0)
+ } else {
+ out.Items = *(*[]ExternalAdmissionHookConfiguration)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_admissionregistration_ExternalAdmissionHookConfigurationList_To_v1alpha1_ExternalAdmissionHookConfigurationList is an autogenerated conversion function.
+func Convert_admissionregistration_ExternalAdmissionHookConfigurationList_To_v1alpha1_ExternalAdmissionHookConfigurationList(in *admissionregistration.ExternalAdmissionHookConfigurationList, out *ExternalAdmissionHookConfigurationList, s conversion.Scope) error {
+ return autoConvert_admissionregistration_ExternalAdmissionHookConfigurationList_To_v1alpha1_ExternalAdmissionHookConfigurationList(in, out, s)
+}
+
+func autoConvert_v1alpha1_Initializer_To_admissionregistration_Initializer(in *Initializer, out *admissionregistration.Initializer, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Rules = *(*[]admissionregistration.Rule)(unsafe.Pointer(&in.Rules))
+ out.FailurePolicy = (*admissionregistration.FailurePolicyType)(unsafe.Pointer(in.FailurePolicy))
+ return nil
+}
+
+// Convert_v1alpha1_Initializer_To_admissionregistration_Initializer is an autogenerated conversion function.
+func Convert_v1alpha1_Initializer_To_admissionregistration_Initializer(in *Initializer, out *admissionregistration.Initializer, s conversion.Scope) error {
+ return autoConvert_v1alpha1_Initializer_To_admissionregistration_Initializer(in, out, s)
+}
+
+func autoConvert_admissionregistration_Initializer_To_v1alpha1_Initializer(in *admissionregistration.Initializer, out *Initializer, s conversion.Scope) error {
+ out.Name = in.Name
+ out.Rules = *(*[]Rule)(unsafe.Pointer(&in.Rules))
+ out.FailurePolicy = (*FailurePolicyType)(unsafe.Pointer(in.FailurePolicy))
+ return nil
+}
+
+// Convert_admissionregistration_Initializer_To_v1alpha1_Initializer is an autogenerated conversion function.
+func Convert_admissionregistration_Initializer_To_v1alpha1_Initializer(in *admissionregistration.Initializer, out *Initializer, s conversion.Scope) error {
+ return autoConvert_admissionregistration_Initializer_To_v1alpha1_Initializer(in, out, s)
+}
+
+func autoConvert_v1alpha1_InitializerConfiguration_To_admissionregistration_InitializerConfiguration(in *InitializerConfiguration, out *admissionregistration.InitializerConfiguration, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Initializers = *(*[]admissionregistration.Initializer)(unsafe.Pointer(&in.Initializers))
+ return nil
+}
+
+// Convert_v1alpha1_InitializerConfiguration_To_admissionregistration_InitializerConfiguration is an autogenerated conversion function.
+func Convert_v1alpha1_InitializerConfiguration_To_admissionregistration_InitializerConfiguration(in *InitializerConfiguration, out *admissionregistration.InitializerConfiguration, s conversion.Scope) error {
+ return autoConvert_v1alpha1_InitializerConfiguration_To_admissionregistration_InitializerConfiguration(in, out, s)
+}
+
+func autoConvert_admissionregistration_InitializerConfiguration_To_v1alpha1_InitializerConfiguration(in *admissionregistration.InitializerConfiguration, out *InitializerConfiguration, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Initializers = *(*[]Initializer)(unsafe.Pointer(&in.Initializers))
+ return nil
+}
+
+// Convert_admissionregistration_InitializerConfiguration_To_v1alpha1_InitializerConfiguration is an autogenerated conversion function.
+func Convert_admissionregistration_InitializerConfiguration_To_v1alpha1_InitializerConfiguration(in *admissionregistration.InitializerConfiguration, out *InitializerConfiguration, s conversion.Scope) error {
+ return autoConvert_admissionregistration_InitializerConfiguration_To_v1alpha1_InitializerConfiguration(in, out, s)
+}
+
+func autoConvert_v1alpha1_InitializerConfigurationList_To_admissionregistration_InitializerConfigurationList(in *InitializerConfigurationList, out *admissionregistration.InitializerConfigurationList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]admissionregistration.InitializerConfiguration)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1alpha1_InitializerConfigurationList_To_admissionregistration_InitializerConfigurationList is an autogenerated conversion function.
+func Convert_v1alpha1_InitializerConfigurationList_To_admissionregistration_InitializerConfigurationList(in *InitializerConfigurationList, out *admissionregistration.InitializerConfigurationList, s conversion.Scope) error {
+ return autoConvert_v1alpha1_InitializerConfigurationList_To_admissionregistration_InitializerConfigurationList(in, out, s)
+}
+
+func autoConvert_admissionregistration_InitializerConfigurationList_To_v1alpha1_InitializerConfigurationList(in *admissionregistration.InitializerConfigurationList, out *InitializerConfigurationList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]InitializerConfiguration, 0)
+ } else {
+ out.Items = *(*[]InitializerConfiguration)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_admissionregistration_InitializerConfigurationList_To_v1alpha1_InitializerConfigurationList is an autogenerated conversion function.
+func Convert_admissionregistration_InitializerConfigurationList_To_v1alpha1_InitializerConfigurationList(in *admissionregistration.InitializerConfigurationList, out *InitializerConfigurationList, s conversion.Scope) error {
+ return autoConvert_admissionregistration_InitializerConfigurationList_To_v1alpha1_InitializerConfigurationList(in, out, s)
+}
+
+func autoConvert_v1alpha1_Rule_To_admissionregistration_Rule(in *Rule, out *admissionregistration.Rule, s conversion.Scope) error {
+ out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups))
+ out.APIVersions = *(*[]string)(unsafe.Pointer(&in.APIVersions))
+ out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources))
+ return nil
+}
+
+// Convert_v1alpha1_Rule_To_admissionregistration_Rule is an autogenerated conversion function.
+func Convert_v1alpha1_Rule_To_admissionregistration_Rule(in *Rule, out *admissionregistration.Rule, s conversion.Scope) error {
+ return autoConvert_v1alpha1_Rule_To_admissionregistration_Rule(in, out, s)
+}
+
+func autoConvert_admissionregistration_Rule_To_v1alpha1_Rule(in *admissionregistration.Rule, out *Rule, s conversion.Scope) error {
+ out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups))
+ out.APIVersions = *(*[]string)(unsafe.Pointer(&in.APIVersions))
+ out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources))
+ return nil
+}
+
+// Convert_admissionregistration_Rule_To_v1alpha1_Rule is an autogenerated conversion function.
+func Convert_admissionregistration_Rule_To_v1alpha1_Rule(in *admissionregistration.Rule, out *Rule, s conversion.Scope) error {
+ return autoConvert_admissionregistration_Rule_To_v1alpha1_Rule(in, out, s)
+}
+
+func autoConvert_v1alpha1_RuleWithOperations_To_admissionregistration_RuleWithOperations(in *RuleWithOperations, out *admissionregistration.RuleWithOperations, s conversion.Scope) error {
+ out.Operations = *(*[]admissionregistration.OperationType)(unsafe.Pointer(&in.Operations))
+ if err := Convert_v1alpha1_Rule_To_admissionregistration_Rule(&in.Rule, &out.Rule, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1alpha1_RuleWithOperations_To_admissionregistration_RuleWithOperations is an autogenerated conversion function.
+func Convert_v1alpha1_RuleWithOperations_To_admissionregistration_RuleWithOperations(in *RuleWithOperations, out *admissionregistration.RuleWithOperations, s conversion.Scope) error {
+ return autoConvert_v1alpha1_RuleWithOperations_To_admissionregistration_RuleWithOperations(in, out, s)
+}
+
+func autoConvert_admissionregistration_RuleWithOperations_To_v1alpha1_RuleWithOperations(in *admissionregistration.RuleWithOperations, out *RuleWithOperations, s conversion.Scope) error {
+ out.Operations = *(*[]OperationType)(unsafe.Pointer(&in.Operations))
+ if err := Convert_admissionregistration_Rule_To_v1alpha1_Rule(&in.Rule, &out.Rule, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_admissionregistration_RuleWithOperations_To_v1alpha1_RuleWithOperations is an autogenerated conversion function.
+func Convert_admissionregistration_RuleWithOperations_To_v1alpha1_RuleWithOperations(in *admissionregistration.RuleWithOperations, out *RuleWithOperations, s conversion.Scope) error {
+ return autoConvert_admissionregistration_RuleWithOperations_To_v1alpha1_RuleWithOperations(in, out, s)
+}
+
+func autoConvert_v1alpha1_ServiceReference_To_admissionregistration_ServiceReference(in *ServiceReference, out *admissionregistration.ServiceReference, s conversion.Scope) error {
+ out.Namespace = in.Namespace
+ out.Name = in.Name
+ return nil
+}
+
+// Convert_v1alpha1_ServiceReference_To_admissionregistration_ServiceReference is an autogenerated conversion function.
+func Convert_v1alpha1_ServiceReference_To_admissionregistration_ServiceReference(in *ServiceReference, out *admissionregistration.ServiceReference, s conversion.Scope) error {
+ return autoConvert_v1alpha1_ServiceReference_To_admissionregistration_ServiceReference(in, out, s)
+}
+
+func autoConvert_admissionregistration_ServiceReference_To_v1alpha1_ServiceReference(in *admissionregistration.ServiceReference, out *ServiceReference, s conversion.Scope) error {
+ out.Namespace = in.Namespace
+ out.Name = in.Name
+ return nil
+}
+
+// Convert_admissionregistration_ServiceReference_To_v1alpha1_ServiceReference is an autogenerated conversion function.
+func Convert_admissionregistration_ServiceReference_To_v1alpha1_ServiceReference(in *admissionregistration.ServiceReference, out *ServiceReference, s conversion.Scope) error {
+ return autoConvert_admissionregistration_ServiceReference_To_v1alpha1_ServiceReference(in, out, s)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..526dbe3a2
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/zz_generated.deepcopy.go
@@ -0,0 +1,254 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_AdmissionHookClientConfig, InType: reflect.TypeOf(&AdmissionHookClientConfig{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ExternalAdmissionHook, InType: reflect.TypeOf(&ExternalAdmissionHook{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ExternalAdmissionHookConfiguration, InType: reflect.TypeOf(&ExternalAdmissionHookConfiguration{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ExternalAdmissionHookConfigurationList, InType: reflect.TypeOf(&ExternalAdmissionHookConfigurationList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_Initializer, InType: reflect.TypeOf(&Initializer{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_InitializerConfiguration, InType: reflect.TypeOf(&InitializerConfiguration{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_InitializerConfigurationList, InType: reflect.TypeOf(&InitializerConfigurationList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_Rule, InType: reflect.TypeOf(&Rule{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_RuleWithOperations, InType: reflect.TypeOf(&RuleWithOperations{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ServiceReference, InType: reflect.TypeOf(&ServiceReference{})},
+ )
+}
+
+// DeepCopy_v1alpha1_AdmissionHookClientConfig is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_AdmissionHookClientConfig(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*AdmissionHookClientConfig)
+ out := out.(*AdmissionHookClientConfig)
+ *out = *in
+ if in.CABundle != nil {
+ in, out := &in.CABundle, &out.CABundle
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_ExternalAdmissionHook is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_ExternalAdmissionHook(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ExternalAdmissionHook)
+ out := out.(*ExternalAdmissionHook)
+ *out = *in
+ if err := DeepCopy_v1alpha1_AdmissionHookClientConfig(&in.ClientConfig, &out.ClientConfig, c); err != nil {
+ return err
+ }
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]RuleWithOperations, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1alpha1_RuleWithOperations(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.FailurePolicy != nil {
+ in, out := &in.FailurePolicy, &out.FailurePolicy
+ *out = new(FailurePolicyType)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_ExternalAdmissionHookConfiguration is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_ExternalAdmissionHookConfiguration(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ExternalAdmissionHookConfiguration)
+ out := out.(*ExternalAdmissionHookConfiguration)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.ExternalAdmissionHooks != nil {
+ in, out := &in.ExternalAdmissionHooks, &out.ExternalAdmissionHooks
+ *out = make([]ExternalAdmissionHook, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1alpha1_ExternalAdmissionHook(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_ExternalAdmissionHookConfigurationList is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_ExternalAdmissionHookConfigurationList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ExternalAdmissionHookConfigurationList)
+ out := out.(*ExternalAdmissionHookConfigurationList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ExternalAdmissionHookConfiguration, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1alpha1_ExternalAdmissionHookConfiguration(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_Initializer is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_Initializer(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Initializer)
+ out := out.(*Initializer)
+ *out = *in
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]Rule, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1alpha1_Rule(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.FailurePolicy != nil {
+ in, out := &in.FailurePolicy, &out.FailurePolicy
+ *out = new(FailurePolicyType)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_InitializerConfiguration is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_InitializerConfiguration(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*InitializerConfiguration)
+ out := out.(*InitializerConfiguration)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Initializers != nil {
+ in, out := &in.Initializers, &out.Initializers
+ *out = make([]Initializer, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1alpha1_Initializer(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_InitializerConfigurationList is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_InitializerConfigurationList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*InitializerConfigurationList)
+ out := out.(*InitializerConfigurationList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]InitializerConfiguration, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1alpha1_InitializerConfiguration(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_Rule is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_Rule(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Rule)
+ out := out.(*Rule)
+ *out = *in
+ if in.APIGroups != nil {
+ in, out := &in.APIGroups, &out.APIGroups
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.APIVersions != nil {
+ in, out := &in.APIVersions, &out.APIVersions
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Resources != nil {
+ in, out := &in.Resources, &out.Resources
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_RuleWithOperations is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_RuleWithOperations(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RuleWithOperations)
+ out := out.(*RuleWithOperations)
+ *out = *in
+ if in.Operations != nil {
+ in, out := &in.Operations, &out.Operations
+ *out = make([]OperationType, len(*in))
+ copy(*out, *in)
+ }
+ if err := DeepCopy_v1alpha1_Rule(&in.Rule, &out.Rule, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_ServiceReference is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_ServiceReference(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServiceReference)
+ out := out.(*ServiceReference)
+ *out = *in
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/zz_generated.defaults.go
new file mode 100644
index 000000000..74fea7f41
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1/zz_generated.defaults.go
@@ -0,0 +1,70 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1alpha1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ scheme.AddTypeDefaultingFunc(&ExternalAdmissionHookConfiguration{}, func(obj interface{}) {
+ SetObjectDefaults_ExternalAdmissionHookConfiguration(obj.(*ExternalAdmissionHookConfiguration))
+ })
+ scheme.AddTypeDefaultingFunc(&ExternalAdmissionHookConfigurationList{}, func(obj interface{}) {
+ SetObjectDefaults_ExternalAdmissionHookConfigurationList(obj.(*ExternalAdmissionHookConfigurationList))
+ })
+ scheme.AddTypeDefaultingFunc(&InitializerConfiguration{}, func(obj interface{}) { SetObjectDefaults_InitializerConfiguration(obj.(*InitializerConfiguration)) })
+ scheme.AddTypeDefaultingFunc(&InitializerConfigurationList{}, func(obj interface{}) {
+ SetObjectDefaults_InitializerConfigurationList(obj.(*InitializerConfigurationList))
+ })
+ return nil
+}
+
+func SetObjectDefaults_ExternalAdmissionHookConfiguration(in *ExternalAdmissionHookConfiguration) {
+ for i := range in.ExternalAdmissionHooks {
+ a := &in.ExternalAdmissionHooks[i]
+ SetDefaults_ExternalAdmissionHook(a)
+ }
+}
+
+func SetObjectDefaults_ExternalAdmissionHookConfigurationList(in *ExternalAdmissionHookConfigurationList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_ExternalAdmissionHookConfiguration(a)
+ }
+}
+
+func SetObjectDefaults_InitializerConfiguration(in *InitializerConfiguration) {
+ for i := range in.Initializers {
+ a := &in.Initializers[i]
+ SetDefaults_Initializer(a)
+ }
+}
+
+func SetObjectDefaults_InitializerConfigurationList(in *InitializerConfigurationList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_InitializerConfiguration(a)
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/zz_generated.deepcopy.go
new file mode 100644
index 000000000..e41f28efa
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/admissionregistration/zz_generated.deepcopy.go
@@ -0,0 +1,254 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package admissionregistration
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_admissionregistration_AdmissionHookClientConfig, InType: reflect.TypeOf(&AdmissionHookClientConfig{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_admissionregistration_ExternalAdmissionHook, InType: reflect.TypeOf(&ExternalAdmissionHook{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_admissionregistration_ExternalAdmissionHookConfiguration, InType: reflect.TypeOf(&ExternalAdmissionHookConfiguration{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_admissionregistration_ExternalAdmissionHookConfigurationList, InType: reflect.TypeOf(&ExternalAdmissionHookConfigurationList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_admissionregistration_Initializer, InType: reflect.TypeOf(&Initializer{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_admissionregistration_InitializerConfiguration, InType: reflect.TypeOf(&InitializerConfiguration{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_admissionregistration_InitializerConfigurationList, InType: reflect.TypeOf(&InitializerConfigurationList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_admissionregistration_Rule, InType: reflect.TypeOf(&Rule{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_admissionregistration_RuleWithOperations, InType: reflect.TypeOf(&RuleWithOperations{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_admissionregistration_ServiceReference, InType: reflect.TypeOf(&ServiceReference{})},
+ )
+}
+
+// DeepCopy_admissionregistration_AdmissionHookClientConfig is an autogenerated deepcopy function.
+func DeepCopy_admissionregistration_AdmissionHookClientConfig(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*AdmissionHookClientConfig)
+ out := out.(*AdmissionHookClientConfig)
+ *out = *in
+ if in.CABundle != nil {
+ in, out := &in.CABundle, &out.CABundle
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_admissionregistration_ExternalAdmissionHook is an autogenerated deepcopy function.
+func DeepCopy_admissionregistration_ExternalAdmissionHook(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ExternalAdmissionHook)
+ out := out.(*ExternalAdmissionHook)
+ *out = *in
+ if err := DeepCopy_admissionregistration_AdmissionHookClientConfig(&in.ClientConfig, &out.ClientConfig, c); err != nil {
+ return err
+ }
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]RuleWithOperations, len(*in))
+ for i := range *in {
+ if err := DeepCopy_admissionregistration_RuleWithOperations(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.FailurePolicy != nil {
+ in, out := &in.FailurePolicy, &out.FailurePolicy
+ *out = new(FailurePolicyType)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_admissionregistration_ExternalAdmissionHookConfiguration is an autogenerated deepcopy function.
+func DeepCopy_admissionregistration_ExternalAdmissionHookConfiguration(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ExternalAdmissionHookConfiguration)
+ out := out.(*ExternalAdmissionHookConfiguration)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.ExternalAdmissionHooks != nil {
+ in, out := &in.ExternalAdmissionHooks, &out.ExternalAdmissionHooks
+ *out = make([]ExternalAdmissionHook, len(*in))
+ for i := range *in {
+ if err := DeepCopy_admissionregistration_ExternalAdmissionHook(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_admissionregistration_ExternalAdmissionHookConfigurationList is an autogenerated deepcopy function.
+func DeepCopy_admissionregistration_ExternalAdmissionHookConfigurationList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ExternalAdmissionHookConfigurationList)
+ out := out.(*ExternalAdmissionHookConfigurationList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ExternalAdmissionHookConfiguration, len(*in))
+ for i := range *in {
+ if err := DeepCopy_admissionregistration_ExternalAdmissionHookConfiguration(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_admissionregistration_Initializer is an autogenerated deepcopy function.
+func DeepCopy_admissionregistration_Initializer(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Initializer)
+ out := out.(*Initializer)
+ *out = *in
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]Rule, len(*in))
+ for i := range *in {
+ if err := DeepCopy_admissionregistration_Rule(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.FailurePolicy != nil {
+ in, out := &in.FailurePolicy, &out.FailurePolicy
+ *out = new(FailurePolicyType)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_admissionregistration_InitializerConfiguration is an autogenerated deepcopy function.
+func DeepCopy_admissionregistration_InitializerConfiguration(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*InitializerConfiguration)
+ out := out.(*InitializerConfiguration)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Initializers != nil {
+ in, out := &in.Initializers, &out.Initializers
+ *out = make([]Initializer, len(*in))
+ for i := range *in {
+ if err := DeepCopy_admissionregistration_Initializer(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_admissionregistration_InitializerConfigurationList is an autogenerated deepcopy function.
+func DeepCopy_admissionregistration_InitializerConfigurationList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*InitializerConfigurationList)
+ out := out.(*InitializerConfigurationList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]InitializerConfiguration, len(*in))
+ for i := range *in {
+ if err := DeepCopy_admissionregistration_InitializerConfiguration(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_admissionregistration_Rule is an autogenerated deepcopy function.
+func DeepCopy_admissionregistration_Rule(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Rule)
+ out := out.(*Rule)
+ *out = *in
+ if in.APIGroups != nil {
+ in, out := &in.APIGroups, &out.APIGroups
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.APIVersions != nil {
+ in, out := &in.APIVersions, &out.APIVersions
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Resources != nil {
+ in, out := &in.Resources, &out.Resources
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_admissionregistration_RuleWithOperations is an autogenerated deepcopy function.
+func DeepCopy_admissionregistration_RuleWithOperations(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RuleWithOperations)
+ out := out.(*RuleWithOperations)
+ *out = *in
+ if in.Operations != nil {
+ in, out := &in.Operations, &out.Operations
+ *out = make([]OperationType, len(*in))
+ copy(*out, *in)
+ }
+ if err := DeepCopy_admissionregistration_Rule(&in.Rule, &out.Rule, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_admissionregistration_ServiceReference is an autogenerated deepcopy function.
+func DeepCopy_admissionregistration_ServiceReference(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ServiceReference)
+ out := out.(*ServiceReference)
+ *out = *in
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/doc.go
new file mode 100644
index 000000000..e216ed6fd
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+
+package apps // import "k8s.io/kubernetes/pkg/apis/apps"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/install/install.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/install/install.go
new file mode 100644
index 000000000..344ddcbf7
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/install/install.go
@@ -0,0 +1,49 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package install installs the apps API group, making it available as
+// an option to all of the API encoding/decoding machinery.
+package install
+
+import (
+ "k8s.io/apimachinery/pkg/apimachinery/announced"
+ "k8s.io/apimachinery/pkg/apimachinery/registered"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/apps"
+ "k8s.io/kubernetes/pkg/apis/apps/v1beta1"
+)
+
+func init() {
+ Install(api.GroupFactoryRegistry, api.Registry, api.Scheme)
+}
+
+// Install registers the API group and adds types to a scheme
+func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
+ if err := announced.NewGroupMetaFactory(
+ &announced.GroupMetaFactoryArgs{
+ GroupName: apps.GroupName,
+ VersionPreferenceOrder: []string{v1beta1.SchemeGroupVersion.Version},
+ ImportPrefix: "k8s.io/kubernetes/pkg/apis/apps",
+ AddInternalObjectsToScheme: apps.AddToScheme,
+ },
+ announced.VersionToSchemeFunc{
+ v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme,
+ },
+ ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil {
+ panic(err)
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/register.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/register.go
new file mode 100644
index 000000000..f3b126fa4
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/register.go
@@ -0,0 +1,60 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package apps
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/kubernetes/pkg/apis/extensions"
+)
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+// GroupName is the group name use in this package
+const GroupName = "apps"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ // TODO this will get cleaned up with the scheme types are fixed
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &extensions.Deployment{},
+ &extensions.DeploymentList{},
+ &extensions.DeploymentRollback{},
+ &extensions.Scale{},
+ &StatefulSet{},
+ &StatefulSetList{},
+ &ControllerRevision{},
+ &ControllerRevisionList{},
+ )
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/types.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/types.go
new file mode 100644
index 000000000..403a88a60
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/types.go
@@ -0,0 +1,229 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package apps
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/kubernetes/pkg/api"
+)
+
+// +genclient=true
+
+// StatefulSet represents a set of pods with consistent identities.
+// Identities are defined as:
+// - Network: A single stable DNS and hostname.
+// - Storage: As many VolumeClaims as requested.
+// The StatefulSet guarantees that a given network identity will always
+// map to the same storage identity.
+type StatefulSet struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Spec defines the desired identities of pods in this set.
+ // +optional
+ Spec StatefulSetSpec
+
+ // Status is the current status of Pods in this StatefulSet. This data
+ // may be out of date by some window of time.
+ // +optional
+ Status StatefulSetStatus
+}
+
+// PodManagementPolicyType defines the policy for creating pods under a stateful set.
+type PodManagementPolicyType string
+
+const (
+ // OrderedReadyPodManagement will create pods in strictly increasing order on
+ // scale up and strictly decreasing order on scale down, progressing only when
+ // the previous pod is ready or terminated. At most one pod will be changed
+ // at any time.
+ OrderedReadyPodManagement PodManagementPolicyType = "OrderedReady"
+ // ParallelPodManagement will create and delete pods as soon as the stateful set
+ // replica count is changed, and will not wait for pods to be ready or complete
+ // termination.
+ ParallelPodManagement = "Parallel"
+)
+
+// StatefulSetUpdateStrategy indicates the strategy that the StatefulSet
+// controller will use to perform updates. It includes any additional parameters
+// necessary to perform the update for the indicated strategy.
+type StatefulSetUpdateStrategy struct {
+ // Type indicates the type of the StatefulSetUpdateStrategy.
+ Type StatefulSetUpdateStrategyType
+ // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.
+ RollingUpdate *RollingUpdateStatefulSetStrategy
+}
+
+// StatefulSetUpdateStrategyType is a string enumeration type that enumerates
+// all possible update strategies for the StatefulSet controller.
+type StatefulSetUpdateStrategyType string
+
+const (
+ // RollingUpdateStatefulSetStrategyType indicates that update will be
+ // applied to all Pods in the StatefulSet with respect to the StatefulSet
+ // ordering constraints. When a scale operation is performed with this
+ // strategy, new Pods will be created from the specification version indicated
+ // by the StatefulSet's updateRevision.
+ RollingUpdateStatefulSetStrategyType = "RollingUpdate"
+ // OnDeleteStatefulSetStrategyType triggers the legacy behavior. Version
+ // tracking and ordered rolling restarts are disabled. Pods are recreated
+ // from the StatefulSetSpec when they are manually deleted. When a scale
+ // operation is performed with this strategy,specification version indicated
+ // by the StatefulSet's currentRevision.
+ OnDeleteStatefulSetStrategyType = "OnDelete"
+)
+
+// RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
+type RollingUpdateStatefulSetStrategy struct {
+ // Partition indicates the ordinal at which the StatefulSet should be
+ // partitioned.
+ Partition int32
+}
+
+// A StatefulSetSpec is the specification of a StatefulSet.
+type StatefulSetSpec struct {
+ // Replicas is the desired number of replicas of the given Template.
+ // These are replicas in the sense that they are instantiations of the
+ // same Template, but individual replicas also have a consistent identity.
+ // If unspecified, defaults to 1.
+ // TODO: Consider a rename of this field.
+ // +optional
+ Replicas int32
+
+ // Selector is a label query over pods that should match the replica count.
+ // If empty, defaulted to labels on the pod template.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ Selector *metav1.LabelSelector
+
+ // Template is the object that describes the pod that will be created if
+ // insufficient replicas are detected. Each pod stamped out by the StatefulSet
+ // will fulfill this Template, but have a unique identity from the rest
+ // of the StatefulSet.
+ Template api.PodTemplateSpec
+
+ // VolumeClaimTemplates is a list of claims that pods are allowed to reference.
+ // The StatefulSet controller is responsible for mapping network identities to
+ // claims in a way that maintains the identity of a pod. Every claim in
+ // this list must have at least one matching (by name) volumeMount in one
+ // container in the template. A claim in this list takes precedence over
+ // any volumes in the template, with the same name.
+ // TODO: Define the behavior if a claim already exists with the same name.
+ // +optional
+ VolumeClaimTemplates []api.PersistentVolumeClaim
+
+ // ServiceName is the name of the service that governs this StatefulSet.
+ // This service must exist before the StatefulSet, and is responsible for
+ // the network identity of the set. Pods get DNS/hostnames that follow the
+ // pattern: pod-specific-string.serviceName.default.svc.cluster.local
+ // where "pod-specific-string" is managed by the StatefulSet controller.
+ ServiceName string
+
+ // PodManagementPolicy controls how pods are created during initial scale up,
+ // when replacing pods on nodes, or when scaling down. The default policy is
+ // `OrderedReady`, where pods are created in increasing order (pod-0, then
+ // pod-1, etc) and the controller will wait until each pod is ready before
+ // continuing. When scaling down, the pods are removed in the opposite order.
+ // The alternative policy is `Parallel` which will create pods in parallel
+ // to match the desired scale without waiting, and on scale down will delete
+ // all pods at once.
+ // +optional
+ PodManagementPolicy PodManagementPolicyType
+
+ // updateStrategy indicates the StatefulSetUpdateStrategy that will be
+ // employed to update Pods in the StatefulSet when a revision is made to
+ // Template.
+ UpdateStrategy StatefulSetUpdateStrategy
+
+ // revisionHistoryLimit is the maximum number of revisions that will
+ // be maintained in the StatefulSet's revision history. The revision history
+ // consists of all revisions not represented by a currently applied
+ // StatefulSetSpec version. The default value is 10.
+ RevisionHistoryLimit *int32
+}
+
+// StatefulSetStatus represents the current state of a StatefulSet.
+type StatefulSetStatus struct {
+ // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the
+ // StatefulSet's generation, which is updated on mutation by the API Server.
+ // +optional
+ ObservedGeneration *int64
+
+ // replicas is the number of Pods created by the StatefulSet controller.
+ Replicas int32
+
+ // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.
+ ReadyReplicas int32
+
+ // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
+ // indicated by currentRevision.
+ CurrentReplicas int32
+
+ // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
+ // indicated by updateRevision.
+ UpdatedReplicas int32
+
+ // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the
+ // sequence [0,currentReplicas).
+ CurrentRevision string
+
+ // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence
+ // [replicas-updatedReplicas,replicas)
+ UpdateRevision string
+}
+
+// StatefulSetList is a collection of StatefulSets.
+type StatefulSetList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+ Items []StatefulSet
+}
+
+// +genclient=true
+
+// ControllerRevision implements an immutable snapshot of state data. Clients
+// are responsible for serializing and deserializing the objects that contain
+// their internal state.
+// Once a ControllerRevision has been successfully created, it can not be updated.
+// The API Server will fail validation of all requests that attempt to mutate
+// the Data field. ControllerRevisions may, however, be deleted.
+type ControllerRevision struct {
+ metav1.TypeMeta
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta
+
+ // Data is the Object representing the state.
+ Data runtime.Object
+
+ // Revision indicates the revision of the state represented by Data.
+ Revision int64
+}
+
+// ControllerRevisionList is a resource containing a list of ControllerRevision objects.
+type ControllerRevisionList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ // Items is the list of ControllerRevision objects.
+ Items []ControllerRevision
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/conversion.go
new file mode 100644
index 000000000..a21c37db0
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/conversion.go
@@ -0,0 +1,342 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "fmt"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/conversion"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/intstr"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/apis/apps"
+ "k8s.io/kubernetes/pkg/apis/extensions"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) error {
+ // Add non-generated conversion functions to handle the *int32 -> int32
+ // conversion. A pointer is useful in the versioned type so we can default
+ // it, but a plain int32 is more convenient in the internal type. These
+ // functions are the same as the autogenerated ones in every other way.
+ err := scheme.AddConversionFuncs(
+ Convert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec,
+ Convert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec,
+ Convert_v1beta1_StatefulSetUpdateStrategy_To_apps_StatefulSetUpdateStrategy,
+ Convert_apps_StatefulSetUpdateStrategy_To_v1beta1_StatefulSetUpdateStrategy,
+ // extensions
+ // TODO: below conversions should be dropped in favor of auto-generated
+ // ones, see https://github.com/kubernetes/kubernetextensionsssues/39865
+ Convert_v1beta1_ScaleStatus_To_extensions_ScaleStatus,
+ Convert_extensions_ScaleStatus_To_v1beta1_ScaleStatus,
+ Convert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec,
+ Convert_extensions_DeploymentSpec_To_v1beta1_DeploymentSpec,
+ Convert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy,
+ Convert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy,
+ Convert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDeployment,
+ Convert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDeployment,
+ )
+ if err != nil {
+ return err
+ }
+
+ // Add field label conversions for kinds having selectable nothing but ObjectMeta fields.
+ err = scheme.AddFieldLabelConversionFunc("apps/v1beta1", "StatefulSet",
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "metadata.name", "metadata.namespace", "status.successful":
+ return label, value, nil
+ default:
+ return "", "", fmt.Errorf("field label not supported for StatefulSet: %s", label)
+ }
+ })
+ if err != nil {
+ return err
+ }
+ err = scheme.AddFieldLabelConversionFunc("apps/v1beta1", "Deployment",
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "metadata.name", "metadata.namespace":
+ return label, value, nil
+ default:
+ return "", "", fmt.Errorf("field label %q not supported for Deployment", label)
+ }
+ })
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func Convert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec(in *StatefulSetSpec, out *apps.StatefulSetSpec, s conversion.Scope) error {
+ if in.Replicas != nil {
+ out.Replicas = *in.Replicas
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ *out = new(metav1.LabelSelector)
+ if err := s.Convert(*in, *out, 0); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ if err := s.Convert(&in.Template, &out.Template, 0); err != nil {
+ return err
+ }
+ if in.VolumeClaimTemplates != nil {
+ in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates
+ *out = make([]api.PersistentVolumeClaim, len(*in))
+ for i := range *in {
+ if err := s.Convert(&(*in)[i], &(*out)[i], 0); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.VolumeClaimTemplates = nil
+ }
+ if err := Convert_v1beta1_StatefulSetUpdateStrategy_To_apps_StatefulSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, s); err != nil {
+ return err
+ }
+ if in.RevisionHistoryLimit != nil {
+ out.RevisionHistoryLimit = new(int32)
+ *out.RevisionHistoryLimit = *in.RevisionHistoryLimit
+ } else {
+ out.RevisionHistoryLimit = nil
+ }
+ out.ServiceName = in.ServiceName
+ out.PodManagementPolicy = apps.PodManagementPolicyType(in.PodManagementPolicy)
+ return nil
+}
+
+func Convert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec(in *apps.StatefulSetSpec, out *StatefulSetSpec, s conversion.Scope) error {
+ out.Replicas = new(int32)
+ *out.Replicas = in.Replicas
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ *out = new(metav1.LabelSelector)
+ if err := s.Convert(*in, *out, 0); err != nil {
+ return err
+ }
+ } else {
+ out.Selector = nil
+ }
+ if err := s.Convert(&in.Template, &out.Template, 0); err != nil {
+ return err
+ }
+ if in.VolumeClaimTemplates != nil {
+ in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates
+ *out = make([]v1.PersistentVolumeClaim, len(*in))
+ for i := range *in {
+ if err := s.Convert(&(*in)[i], &(*out)[i], 0); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.VolumeClaimTemplates = nil
+ }
+ if in.RevisionHistoryLimit != nil {
+ out.RevisionHistoryLimit = new(int32)
+ *out.RevisionHistoryLimit = *in.RevisionHistoryLimit
+ } else {
+ out.RevisionHistoryLimit = nil
+ }
+ out.ServiceName = in.ServiceName
+ out.PodManagementPolicy = PodManagementPolicyType(in.PodManagementPolicy)
+ if err := Convert_apps_StatefulSetUpdateStrategy_To_v1beta1_StatefulSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1beta1_StatefulSetUpdateStrategy_To_apps_StatefulSetUpdateStrategy(in *StatefulSetUpdateStrategy, out *apps.StatefulSetUpdateStrategy, s conversion.Scope) error {
+ out.Type = apps.StatefulSetUpdateStrategyType(in.Type)
+ if in.RollingUpdate != nil {
+ out.RollingUpdate = new(apps.RollingUpdateStatefulSetStrategy)
+ out.RollingUpdate.Partition = *in.RollingUpdate.Partition
+ } else {
+ out.RollingUpdate = nil
+ }
+ return nil
+}
+
+func Convert_apps_StatefulSetUpdateStrategy_To_v1beta1_StatefulSetUpdateStrategy(in *apps.StatefulSetUpdateStrategy, out *StatefulSetUpdateStrategy, s conversion.Scope) error {
+ out.Type = StatefulSetUpdateStrategyType(in.Type)
+ if in.RollingUpdate != nil {
+ out.RollingUpdate = new(RollingUpdateStatefulSetStrategy)
+ out.RollingUpdate.Partition = new(int32)
+ *out.RollingUpdate.Partition = in.RollingUpdate.Partition
+ } else {
+ out.RollingUpdate = nil
+ }
+ return nil
+}
+
+func Convert_extensions_ScaleStatus_To_v1beta1_ScaleStatus(in *extensions.ScaleStatus, out *ScaleStatus, s conversion.Scope) error {
+ out.Replicas = int32(in.Replicas)
+
+ out.Selector = nil
+ out.TargetSelector = ""
+ if in.Selector != nil {
+ if in.Selector.MatchExpressions == nil || len(in.Selector.MatchExpressions) == 0 {
+ out.Selector = in.Selector.MatchLabels
+ }
+
+ selector, err := metav1.LabelSelectorAsSelector(in.Selector)
+ if err != nil {
+ return fmt.Errorf("invalid label selector: %v", err)
+ }
+ out.TargetSelector = selector.String()
+ }
+ return nil
+}
+
+func Convert_v1beta1_ScaleStatus_To_extensions_ScaleStatus(in *ScaleStatus, out *extensions.ScaleStatus, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+
+ // Normally when 2 fields map to the same internal value we favor the old field, since
+ // old clients can't be expected to know about new fields but clients that know about the
+ // new field can be expected to know about the old field (though that's not quite true, due
+ // to kubectl apply). However, these fields are readonly, so any non-nil value should work.
+ if in.TargetSelector != "" {
+ labelSelector, err := metav1.ParseToLabelSelector(in.TargetSelector)
+ if err != nil {
+ out.Selector = nil
+ return fmt.Errorf("failed to parse target selector: %v", err)
+ }
+ out.Selector = labelSelector
+ } else if in.Selector != nil {
+ out.Selector = new(metav1.LabelSelector)
+ selector := make(map[string]string)
+ for key, val := range in.Selector {
+ selector[key] = val
+ }
+ out.Selector.MatchLabels = selector
+ } else {
+ out.Selector = nil
+ }
+ return nil
+}
+
+func Convert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec(in *DeploymentSpec, out *extensions.DeploymentSpec, s conversion.Scope) error {
+ if in.Replicas != nil {
+ out.Replicas = *in.Replicas
+ }
+ out.Selector = in.Selector
+ if err := v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy(&in.Strategy, &out.Strategy, s); err != nil {
+ return err
+ }
+ out.RevisionHistoryLimit = in.RevisionHistoryLimit
+ out.MinReadySeconds = in.MinReadySeconds
+ out.Paused = in.Paused
+ if in.RollbackTo != nil {
+ out.RollbackTo = new(extensions.RollbackConfig)
+ out.RollbackTo.Revision = in.RollbackTo.Revision
+ } else {
+ out.RollbackTo = nil
+ }
+ if in.ProgressDeadlineSeconds != nil {
+ out.ProgressDeadlineSeconds = new(int32)
+ *out.ProgressDeadlineSeconds = *in.ProgressDeadlineSeconds
+ }
+ return nil
+}
+
+func Convert_extensions_DeploymentSpec_To_v1beta1_DeploymentSpec(in *extensions.DeploymentSpec, out *DeploymentSpec, s conversion.Scope) error {
+ out.Replicas = &in.Replicas
+ out.Selector = in.Selector
+ if err := v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ if err := Convert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy(&in.Strategy, &out.Strategy, s); err != nil {
+ return err
+ }
+ if in.RevisionHistoryLimit != nil {
+ out.RevisionHistoryLimit = new(int32)
+ *out.RevisionHistoryLimit = int32(*in.RevisionHistoryLimit)
+ }
+ out.MinReadySeconds = int32(in.MinReadySeconds)
+ out.Paused = in.Paused
+ if in.RollbackTo != nil {
+ out.RollbackTo = new(RollbackConfig)
+ out.RollbackTo.Revision = int64(in.RollbackTo.Revision)
+ } else {
+ out.RollbackTo = nil
+ }
+ if in.ProgressDeadlineSeconds != nil {
+ out.ProgressDeadlineSeconds = new(int32)
+ *out.ProgressDeadlineSeconds = *in.ProgressDeadlineSeconds
+ }
+ return nil
+}
+
+func Convert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy(in *extensions.DeploymentStrategy, out *DeploymentStrategy, s conversion.Scope) error {
+ out.Type = DeploymentStrategyType(in.Type)
+ if in.RollingUpdate != nil {
+ out.RollingUpdate = new(RollingUpdateDeployment)
+ if err := Convert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDeployment(in.RollingUpdate, out.RollingUpdate, s); err != nil {
+ return err
+ }
+ } else {
+ out.RollingUpdate = nil
+ }
+ return nil
+}
+
+func Convert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy(in *DeploymentStrategy, out *extensions.DeploymentStrategy, s conversion.Scope) error {
+ out.Type = extensions.DeploymentStrategyType(in.Type)
+ if in.RollingUpdate != nil {
+ out.RollingUpdate = new(extensions.RollingUpdateDeployment)
+ if err := Convert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDeployment(in.RollingUpdate, out.RollingUpdate, s); err != nil {
+ return err
+ }
+ } else {
+ out.RollingUpdate = nil
+ }
+ return nil
+}
+
+func Convert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDeployment(in *RollingUpdateDeployment, out *extensions.RollingUpdateDeployment, s conversion.Scope) error {
+ if err := s.Convert(in.MaxUnavailable, &out.MaxUnavailable, 0); err != nil {
+ return err
+ }
+ if err := s.Convert(in.MaxSurge, &out.MaxSurge, 0); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDeployment(in *extensions.RollingUpdateDeployment, out *RollingUpdateDeployment, s conversion.Scope) error {
+ if out.MaxUnavailable == nil {
+ out.MaxUnavailable = &intstr.IntOrString{}
+ }
+ if err := s.Convert(&in.MaxUnavailable, out.MaxUnavailable, 0); err != nil {
+ return err
+ }
+ if out.MaxSurge == nil {
+ out.MaxSurge = &intstr.IntOrString{}
+ }
+ if err := s.Convert(&in.MaxSurge, out.MaxSurge, 0); err != nil {
+ return err
+ }
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/defaults.go
new file mode 100644
index 000000000..af133d25f
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/defaults.go
@@ -0,0 +1,117 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/intstr"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
+
+func SetDefaults_StatefulSet(obj *StatefulSet) {
+ if len(obj.Spec.PodManagementPolicy) == 0 {
+ obj.Spec.PodManagementPolicy = OrderedReadyPodManagement
+ }
+
+ if obj.Spec.UpdateStrategy.Type == "" {
+ obj.Spec.UpdateStrategy.Type = OnDeleteStatefulSetStrategyType
+ }
+ labels := obj.Spec.Template.Labels
+ if labels != nil {
+ if obj.Spec.Selector == nil {
+ obj.Spec.Selector = &metav1.LabelSelector{
+ MatchLabels: labels,
+ }
+ }
+ if len(obj.Labels) == 0 {
+ obj.Labels = labels
+ }
+ }
+ if obj.Spec.Replicas == nil {
+ obj.Spec.Replicas = new(int32)
+ *obj.Spec.Replicas = 1
+ }
+ if obj.Spec.RevisionHistoryLimit == nil {
+ obj.Spec.RevisionHistoryLimit = new(int32)
+ *obj.Spec.RevisionHistoryLimit = 10
+ }
+ if obj.Spec.UpdateStrategy.Type == RollingUpdateStatefulSetStrategyType &&
+ obj.Spec.UpdateStrategy.RollingUpdate != nil &&
+ obj.Spec.UpdateStrategy.RollingUpdate.Partition == nil {
+ obj.Spec.UpdateStrategy.RollingUpdate.Partition = new(int32)
+ *obj.Spec.UpdateStrategy.RollingUpdate.Partition = 0
+ }
+
+}
+
+// SetDefaults_Deployment sets additional defaults compared to its counterpart
+// in extensions. These addons are:
+// - MaxUnavailable during rolling update set to 25% (1 in extensions)
+// - MaxSurge value during rolling update set to 25% (1 in extensions)
+// - RevisionHistoryLimit set to 2 (not set in extensions)
+// - ProgressDeadlineSeconds set to 600s (not set in extensions)
+func SetDefaults_Deployment(obj *Deployment) {
+ // Default labels and selector to labels from pod template spec.
+ labels := obj.Spec.Template.Labels
+
+ if labels != nil {
+ if obj.Spec.Selector == nil {
+ obj.Spec.Selector = &metav1.LabelSelector{MatchLabels: labels}
+ }
+ if len(obj.Labels) == 0 {
+ obj.Labels = labels
+ }
+ }
+ // Set DeploymentSpec.Replicas to 1 if it is not set.
+ if obj.Spec.Replicas == nil {
+ obj.Spec.Replicas = new(int32)
+ *obj.Spec.Replicas = 1
+ }
+ strategy := &obj.Spec.Strategy
+ // Set default DeploymentStrategyType as RollingUpdate.
+ if strategy.Type == "" {
+ strategy.Type = RollingUpdateDeploymentStrategyType
+ }
+ if strategy.Type == RollingUpdateDeploymentStrategyType {
+ if strategy.RollingUpdate == nil {
+ rollingUpdate := RollingUpdateDeployment{}
+ strategy.RollingUpdate = &rollingUpdate
+ }
+ if strategy.RollingUpdate.MaxUnavailable == nil {
+ // Set default MaxUnavailable as 25% by default.
+ maxUnavailable := intstr.FromString("25%")
+ strategy.RollingUpdate.MaxUnavailable = &maxUnavailable
+ }
+ if strategy.RollingUpdate.MaxSurge == nil {
+ // Set default MaxSurge as 25% by default.
+ maxSurge := intstr.FromString("25%")
+ strategy.RollingUpdate.MaxSurge = &maxSurge
+ }
+ }
+ if obj.Spec.RevisionHistoryLimit == nil {
+ obj.Spec.RevisionHistoryLimit = new(int32)
+ *obj.Spec.RevisionHistoryLimit = 2
+ }
+ if obj.Spec.ProgressDeadlineSeconds == nil {
+ obj.Spec.ProgressDeadlineSeconds = new(int32)
+ *obj.Spec.ProgressDeadlineSeconds = 600
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/doc.go
new file mode 100644
index 000000000..157cc063a
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/doc.go
@@ -0,0 +1,22 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/apps
+// +k8s:openapi-gen=true
+// +k8s:defaulter-gen=TypeMeta
+
+package v1beta1 // import "k8s.io/kubernetes/pkg/apis/apps/v1beta1"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/generated.pb.go
new file mode 100644
index 000000000..ed3c417f8
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/generated.pb.go
@@ -0,0 +1,4934 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/apps/v1beta1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1beta1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/apps/v1beta1/generated.proto
+
+ It has these top-level messages:
+ ControllerRevision
+ ControllerRevisionList
+ Deployment
+ DeploymentCondition
+ DeploymentList
+ DeploymentRollback
+ DeploymentSpec
+ DeploymentStatus
+ DeploymentStrategy
+ RollbackConfig
+ RollingUpdateDeployment
+ RollingUpdateStatefulSetStrategy
+ Scale
+ ScaleSpec
+ ScaleStatus
+ StatefulSet
+ StatefulSetList
+ StatefulSetSpec
+ StatefulSetStatus
+ StatefulSetUpdateStrategy
+*/
+package v1beta1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+import k8s_io_apimachinery_pkg_util_intstr "k8s.io/apimachinery/pkg/util/intstr"
+import k8s_io_kubernetes_pkg_api_v1 "k8s.io/kubernetes/pkg/api/v1"
+
+import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *ControllerRevision) Reset() { *m = ControllerRevision{} }
+func (*ControllerRevision) ProtoMessage() {}
+func (*ControllerRevision) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *ControllerRevisionList) Reset() { *m = ControllerRevisionList{} }
+func (*ControllerRevisionList) ProtoMessage() {}
+func (*ControllerRevisionList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *Deployment) Reset() { *m = Deployment{} }
+func (*Deployment) ProtoMessage() {}
+func (*Deployment) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
+
+func (m *DeploymentCondition) Reset() { *m = DeploymentCondition{} }
+func (*DeploymentCondition) ProtoMessage() {}
+func (*DeploymentCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
+
+func (m *DeploymentList) Reset() { *m = DeploymentList{} }
+func (*DeploymentList) ProtoMessage() {}
+func (*DeploymentList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
+
+func (m *DeploymentRollback) Reset() { *m = DeploymentRollback{} }
+func (*DeploymentRollback) ProtoMessage() {}
+func (*DeploymentRollback) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
+
+func (m *DeploymentSpec) Reset() { *m = DeploymentSpec{} }
+func (*DeploymentSpec) ProtoMessage() {}
+func (*DeploymentSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
+
+func (m *DeploymentStatus) Reset() { *m = DeploymentStatus{} }
+func (*DeploymentStatus) ProtoMessage() {}
+func (*DeploymentStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
+
+func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} }
+func (*DeploymentStrategy) ProtoMessage() {}
+func (*DeploymentStrategy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
+
+func (m *RollbackConfig) Reset() { *m = RollbackConfig{} }
+func (*RollbackConfig) ProtoMessage() {}
+func (*RollbackConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
+
+func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} }
+func (*RollingUpdateDeployment) ProtoMessage() {}
+func (*RollingUpdateDeployment) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{10}
+}
+
+func (m *RollingUpdateStatefulSetStrategy) Reset() { *m = RollingUpdateStatefulSetStrategy{} }
+func (*RollingUpdateStatefulSetStrategy) ProtoMessage() {}
+func (*RollingUpdateStatefulSetStrategy) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{11}
+}
+
+func (m *Scale) Reset() { *m = Scale{} }
+func (*Scale) ProtoMessage() {}
+func (*Scale) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} }
+
+func (m *ScaleSpec) Reset() { *m = ScaleSpec{} }
+func (*ScaleSpec) ProtoMessage() {}
+func (*ScaleSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} }
+
+func (m *ScaleStatus) Reset() { *m = ScaleStatus{} }
+func (*ScaleStatus) ProtoMessage() {}
+func (*ScaleStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} }
+
+func (m *StatefulSet) Reset() { *m = StatefulSet{} }
+func (*StatefulSet) ProtoMessage() {}
+func (*StatefulSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} }
+
+func (m *StatefulSetList) Reset() { *m = StatefulSetList{} }
+func (*StatefulSetList) ProtoMessage() {}
+func (*StatefulSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} }
+
+func (m *StatefulSetSpec) Reset() { *m = StatefulSetSpec{} }
+func (*StatefulSetSpec) ProtoMessage() {}
+func (*StatefulSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} }
+
+func (m *StatefulSetStatus) Reset() { *m = StatefulSetStatus{} }
+func (*StatefulSetStatus) ProtoMessage() {}
+func (*StatefulSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} }
+
+func (m *StatefulSetUpdateStrategy) Reset() { *m = StatefulSetUpdateStrategy{} }
+func (*StatefulSetUpdateStrategy) ProtoMessage() {}
+func (*StatefulSetUpdateStrategy) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{19}
+}
+
+func init() {
+ proto.RegisterType((*ControllerRevision)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1beta1.ControllerRevision")
+ proto.RegisterType((*ControllerRevisionList)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1beta1.ControllerRevisionList")
+ proto.RegisterType((*Deployment)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1beta1.Deployment")
+ proto.RegisterType((*DeploymentCondition)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1beta1.DeploymentCondition")
+ proto.RegisterType((*DeploymentList)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1beta1.DeploymentList")
+ proto.RegisterType((*DeploymentRollback)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1beta1.DeploymentRollback")
+ proto.RegisterType((*DeploymentSpec)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1beta1.DeploymentSpec")
+ proto.RegisterType((*DeploymentStatus)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1beta1.DeploymentStatus")
+ proto.RegisterType((*DeploymentStrategy)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1beta1.DeploymentStrategy")
+ proto.RegisterType((*RollbackConfig)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1beta1.RollbackConfig")
+ proto.RegisterType((*RollingUpdateDeployment)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1beta1.RollingUpdateDeployment")
+ proto.RegisterType((*RollingUpdateStatefulSetStrategy)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1beta1.RollingUpdateStatefulSetStrategy")
+ proto.RegisterType((*Scale)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1beta1.Scale")
+ proto.RegisterType((*ScaleSpec)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1beta1.ScaleSpec")
+ proto.RegisterType((*ScaleStatus)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1beta1.ScaleStatus")
+ proto.RegisterType((*StatefulSet)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1beta1.StatefulSet")
+ proto.RegisterType((*StatefulSetList)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1beta1.StatefulSetList")
+ proto.RegisterType((*StatefulSetSpec)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1beta1.StatefulSetSpec")
+ proto.RegisterType((*StatefulSetStatus)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1beta1.StatefulSetStatus")
+ proto.RegisterType((*StatefulSetUpdateStrategy)(nil), "k8s.io.kubernetes.pkg.apis.apps.v1beta1.StatefulSetUpdateStrategy")
+}
+func (m *ControllerRevision) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ControllerRevision) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Data.Size()))
+ n2, err := m.Data.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Revision))
+ return i, nil
+}
+
+func (m *ControllerRevisionList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ControllerRevisionList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n3, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *Deployment) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Deployment) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n4, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n5, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n6, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ return i, nil
+}
+
+func (m *DeploymentCondition) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeploymentCondition) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
+ i += copy(dAtA[i:], m.Status)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastUpdateTime.Size()))
+ n7, err := m.LastUpdateTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
+ n8, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n8
+ return i, nil
+}
+
+func (m *DeploymentList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeploymentList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n9, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n9
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *DeploymentRollback) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeploymentRollback) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ if len(m.UpdatedAnnotations) > 0 {
+ keysForUpdatedAnnotations := make([]string, 0, len(m.UpdatedAnnotations))
+ for k := range m.UpdatedAnnotations {
+ keysForUpdatedAnnotations = append(keysForUpdatedAnnotations, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForUpdatedAnnotations)
+ for _, k := range keysForUpdatedAnnotations {
+ dAtA[i] = 0x12
+ i++
+ v := m.UpdatedAnnotations[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RollbackTo.Size()))
+ n10, err := m.RollbackTo.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n10
+ return i, nil
+}
+
+func (m *DeploymentSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeploymentSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Replicas != nil {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.Replicas))
+ }
+ if m.Selector != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
+ n11, err := m.Selector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n11
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
+ n12, err := m.Template.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n12
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Strategy.Size()))
+ n13, err := m.Strategy.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n13
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.MinReadySeconds))
+ if m.RevisionHistoryLimit != nil {
+ dAtA[i] = 0x30
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.RevisionHistoryLimit))
+ }
+ dAtA[i] = 0x38
+ i++
+ if m.Paused {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ if m.RollbackTo != nil {
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RollbackTo.Size()))
+ n14, err := m.RollbackTo.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n14
+ }
+ if m.ProgressDeadlineSeconds != nil {
+ dAtA[i] = 0x48
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.ProgressDeadlineSeconds))
+ }
+ return i, nil
+}
+
+func (m *DeploymentStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeploymentStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration))
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.UpdatedReplicas))
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.AvailableReplicas))
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.UnavailableReplicas))
+ if len(m.Conditions) > 0 {
+ for _, msg := range m.Conditions {
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x38
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ReadyReplicas))
+ if m.CollisionCount != nil {
+ dAtA[i] = 0x40
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.CollisionCount))
+ }
+ return i, nil
+}
+
+func (m *DeploymentStrategy) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeploymentStrategy) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ if m.RollingUpdate != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RollingUpdate.Size()))
+ n15, err := m.RollingUpdate.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n15
+ }
+ return i, nil
+}
+
+func (m *RollbackConfig) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RollbackConfig) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Revision))
+ return i, nil
+}
+
+func (m *RollingUpdateDeployment) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RollingUpdateDeployment) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.MaxUnavailable != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.MaxUnavailable.Size()))
+ n16, err := m.MaxUnavailable.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n16
+ }
+ if m.MaxSurge != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.MaxSurge.Size()))
+ n17, err := m.MaxSurge.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n17
+ }
+ return i, nil
+}
+
+func (m *RollingUpdateStatefulSetStrategy) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RollingUpdateStatefulSetStrategy) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Partition != nil {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.Partition))
+ }
+ return i, nil
+}
+
+func (m *Scale) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Scale) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n18, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n18
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n19, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n19
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n20, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n20
+ return i, nil
+}
+
+func (m *ScaleSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ScaleSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
+ return i, nil
+}
+
+func (m *ScaleStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ScaleStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
+ if len(m.Selector) > 0 {
+ keysForSelector := make([]string, 0, len(m.Selector))
+ for k := range m.Selector {
+ keysForSelector = append(keysForSelector, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForSelector)
+ for _, k := range keysForSelector {
+ dAtA[i] = 0x12
+ i++
+ v := m.Selector[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.TargetSelector)))
+ i += copy(dAtA[i:], m.TargetSelector)
+ return i, nil
+}
+
+func (m *StatefulSet) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StatefulSet) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n21, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n21
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n22, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n22
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n23, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n23
+ return i, nil
+}
+
+func (m *StatefulSetList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StatefulSetList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n24, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n24
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *StatefulSetSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StatefulSetSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Replicas != nil {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.Replicas))
+ }
+ if m.Selector != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
+ n25, err := m.Selector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n25
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
+ n26, err := m.Template.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n26
+ if len(m.VolumeClaimTemplates) > 0 {
+ for _, msg := range m.VolumeClaimTemplates {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ServiceName)))
+ i += copy(dAtA[i:], m.ServiceName)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.PodManagementPolicy)))
+ i += copy(dAtA[i:], m.PodManagementPolicy)
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.UpdateStrategy.Size()))
+ n27, err := m.UpdateStrategy.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n27
+ if m.RevisionHistoryLimit != nil {
+ dAtA[i] = 0x40
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.RevisionHistoryLimit))
+ }
+ return i, nil
+}
+
+func (m *StatefulSetStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StatefulSetStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.ObservedGeneration != nil {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.ObservedGeneration))
+ }
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ReadyReplicas))
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentReplicas))
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.UpdatedReplicas))
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.CurrentRevision)))
+ i += copy(dAtA[i:], m.CurrentRevision)
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.UpdateRevision)))
+ i += copy(dAtA[i:], m.UpdateRevision)
+ return i, nil
+}
+
+func (m *StatefulSetUpdateStrategy) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StatefulSetUpdateStrategy) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ if m.RollingUpdate != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RollingUpdate.Size()))
+ n28, err := m.RollingUpdate.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n28
+ }
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *ControllerRevision) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Data.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.Revision))
+ return n
+}
+
+func (m *ControllerRevisionList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *Deployment) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *DeploymentCondition) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Status)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastUpdateTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastTransitionTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *DeploymentList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *DeploymentRollback) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.UpdatedAnnotations) > 0 {
+ for k, v := range m.UpdatedAnnotations {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ l = m.RollbackTo.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *DeploymentSpec) Size() (n int) {
+ var l int
+ _ = l
+ if m.Replicas != nil {
+ n += 1 + sovGenerated(uint64(*m.Replicas))
+ }
+ if m.Selector != nil {
+ l = m.Selector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ l = m.Template.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Strategy.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.MinReadySeconds))
+ if m.RevisionHistoryLimit != nil {
+ n += 1 + sovGenerated(uint64(*m.RevisionHistoryLimit))
+ }
+ n += 2
+ if m.RollbackTo != nil {
+ l = m.RollbackTo.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.ProgressDeadlineSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.ProgressDeadlineSeconds))
+ }
+ return n
+}
+
+func (m *DeploymentStatus) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.ObservedGeneration))
+ n += 1 + sovGenerated(uint64(m.Replicas))
+ n += 1 + sovGenerated(uint64(m.UpdatedReplicas))
+ n += 1 + sovGenerated(uint64(m.AvailableReplicas))
+ n += 1 + sovGenerated(uint64(m.UnavailableReplicas))
+ if len(m.Conditions) > 0 {
+ for _, e := range m.Conditions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ n += 1 + sovGenerated(uint64(m.ReadyReplicas))
+ if m.CollisionCount != nil {
+ n += 1 + sovGenerated(uint64(*m.CollisionCount))
+ }
+ return n
+}
+
+func (m *DeploymentStrategy) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.RollingUpdate != nil {
+ l = m.RollingUpdate.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *RollbackConfig) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Revision))
+ return n
+}
+
+func (m *RollingUpdateDeployment) Size() (n int) {
+ var l int
+ _ = l
+ if m.MaxUnavailable != nil {
+ l = m.MaxUnavailable.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.MaxSurge != nil {
+ l = m.MaxSurge.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *RollingUpdateStatefulSetStrategy) Size() (n int) {
+ var l int
+ _ = l
+ if m.Partition != nil {
+ n += 1 + sovGenerated(uint64(*m.Partition))
+ }
+ return n
+}
+
+func (m *Scale) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ScaleSpec) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Replicas))
+ return n
+}
+
+func (m *ScaleStatus) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Replicas))
+ if len(m.Selector) > 0 {
+ for k, v := range m.Selector {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ l = len(m.TargetSelector)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *StatefulSet) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *StatefulSetList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *StatefulSetSpec) Size() (n int) {
+ var l int
+ _ = l
+ if m.Replicas != nil {
+ n += 1 + sovGenerated(uint64(*m.Replicas))
+ }
+ if m.Selector != nil {
+ l = m.Selector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ l = m.Template.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.VolumeClaimTemplates) > 0 {
+ for _, e := range m.VolumeClaimTemplates {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.ServiceName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.PodManagementPolicy)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.UpdateStrategy.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.RevisionHistoryLimit != nil {
+ n += 1 + sovGenerated(uint64(*m.RevisionHistoryLimit))
+ }
+ return n
+}
+
+func (m *StatefulSetStatus) Size() (n int) {
+ var l int
+ _ = l
+ if m.ObservedGeneration != nil {
+ n += 1 + sovGenerated(uint64(*m.ObservedGeneration))
+ }
+ n += 1 + sovGenerated(uint64(m.Replicas))
+ n += 1 + sovGenerated(uint64(m.ReadyReplicas))
+ n += 1 + sovGenerated(uint64(m.CurrentReplicas))
+ n += 1 + sovGenerated(uint64(m.UpdatedReplicas))
+ l = len(m.CurrentRevision)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.UpdateRevision)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *StatefulSetUpdateStrategy) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.RollingUpdate != nil {
+ l = m.RollingUpdate.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *ControllerRevision) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ControllerRevision{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Data:` + strings.Replace(strings.Replace(this.Data.String(), "RawExtension", "k8s_io_apimachinery_pkg_runtime.RawExtension", 1), `&`, ``, 1) + `,`,
+ `Revision:` + fmt.Sprintf("%v", this.Revision) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ControllerRevisionList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ControllerRevisionList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ControllerRevision", "ControllerRevision", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Deployment) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Deployment{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DeploymentSpec", "DeploymentSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DeploymentStatus", "DeploymentStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeploymentCondition) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeploymentCondition{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `LastUpdateTime:` + strings.Replace(strings.Replace(this.LastUpdateTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeploymentList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeploymentList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Deployment", "Deployment", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeploymentRollback) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForUpdatedAnnotations := make([]string, 0, len(this.UpdatedAnnotations))
+ for k := range this.UpdatedAnnotations {
+ keysForUpdatedAnnotations = append(keysForUpdatedAnnotations, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForUpdatedAnnotations)
+ mapStringForUpdatedAnnotations := "map[string]string{"
+ for _, k := range keysForUpdatedAnnotations {
+ mapStringForUpdatedAnnotations += fmt.Sprintf("%v: %v,", k, this.UpdatedAnnotations[k])
+ }
+ mapStringForUpdatedAnnotations += "}"
+ s := strings.Join([]string{`&DeploymentRollback{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `UpdatedAnnotations:` + mapStringForUpdatedAnnotations + `,`,
+ `RollbackTo:` + strings.Replace(strings.Replace(this.RollbackTo.String(), "RollbackConfig", "RollbackConfig", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeploymentSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeploymentSpec{`,
+ `Replicas:` + valueToStringGenerated(this.Replicas) + `,`,
+ `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
+ `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_kubernetes_pkg_api_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
+ `Strategy:` + strings.Replace(strings.Replace(this.Strategy.String(), "DeploymentStrategy", "DeploymentStrategy", 1), `&`, ``, 1) + `,`,
+ `MinReadySeconds:` + fmt.Sprintf("%v", this.MinReadySeconds) + `,`,
+ `RevisionHistoryLimit:` + valueToStringGenerated(this.RevisionHistoryLimit) + `,`,
+ `Paused:` + fmt.Sprintf("%v", this.Paused) + `,`,
+ `RollbackTo:` + strings.Replace(fmt.Sprintf("%v", this.RollbackTo), "RollbackConfig", "RollbackConfig", 1) + `,`,
+ `ProgressDeadlineSeconds:` + valueToStringGenerated(this.ProgressDeadlineSeconds) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeploymentStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeploymentStatus{`,
+ `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
+ `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
+ `UpdatedReplicas:` + fmt.Sprintf("%v", this.UpdatedReplicas) + `,`,
+ `AvailableReplicas:` + fmt.Sprintf("%v", this.AvailableReplicas) + `,`,
+ `UnavailableReplicas:` + fmt.Sprintf("%v", this.UnavailableReplicas) + `,`,
+ `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "DeploymentCondition", "DeploymentCondition", 1), `&`, ``, 1) + `,`,
+ `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`,
+ `CollisionCount:` + valueToStringGenerated(this.CollisionCount) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeploymentStrategy) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeploymentStrategy{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `RollingUpdate:` + strings.Replace(fmt.Sprintf("%v", this.RollingUpdate), "RollingUpdateDeployment", "RollingUpdateDeployment", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RollbackConfig) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RollbackConfig{`,
+ `Revision:` + fmt.Sprintf("%v", this.Revision) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RollingUpdateDeployment) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RollingUpdateDeployment{`,
+ `MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
+ `MaxSurge:` + strings.Replace(fmt.Sprintf("%v", this.MaxSurge), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RollingUpdateStatefulSetStrategy) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RollingUpdateStatefulSetStrategy{`,
+ `Partition:` + valueToStringGenerated(this.Partition) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Scale) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Scale{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ScaleSpec", "ScaleSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ScaleStatus", "ScaleStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ScaleSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ScaleSpec{`,
+ `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ScaleStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForSelector := make([]string, 0, len(this.Selector))
+ for k := range this.Selector {
+ keysForSelector = append(keysForSelector, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForSelector)
+ mapStringForSelector := "map[string]string{"
+ for _, k := range keysForSelector {
+ mapStringForSelector += fmt.Sprintf("%v: %v,", k, this.Selector[k])
+ }
+ mapStringForSelector += "}"
+ s := strings.Join([]string{`&ScaleStatus{`,
+ `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
+ `Selector:` + mapStringForSelector + `,`,
+ `TargetSelector:` + fmt.Sprintf("%v", this.TargetSelector) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StatefulSet) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StatefulSet{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "StatefulSetSpec", "StatefulSetSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "StatefulSetStatus", "StatefulSetStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StatefulSetList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StatefulSetList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "StatefulSet", "StatefulSet", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StatefulSetSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StatefulSetSpec{`,
+ `Replicas:` + valueToStringGenerated(this.Replicas) + `,`,
+ `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
+ `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_kubernetes_pkg_api_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
+ `VolumeClaimTemplates:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VolumeClaimTemplates), "PersistentVolumeClaim", "k8s_io_kubernetes_pkg_api_v1.PersistentVolumeClaim", 1), `&`, ``, 1) + `,`,
+ `ServiceName:` + fmt.Sprintf("%v", this.ServiceName) + `,`,
+ `PodManagementPolicy:` + fmt.Sprintf("%v", this.PodManagementPolicy) + `,`,
+ `UpdateStrategy:` + strings.Replace(strings.Replace(this.UpdateStrategy.String(), "StatefulSetUpdateStrategy", "StatefulSetUpdateStrategy", 1), `&`, ``, 1) + `,`,
+ `RevisionHistoryLimit:` + valueToStringGenerated(this.RevisionHistoryLimit) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StatefulSetStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StatefulSetStatus{`,
+ `ObservedGeneration:` + valueToStringGenerated(this.ObservedGeneration) + `,`,
+ `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
+ `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`,
+ `CurrentReplicas:` + fmt.Sprintf("%v", this.CurrentReplicas) + `,`,
+ `UpdatedReplicas:` + fmt.Sprintf("%v", this.UpdatedReplicas) + `,`,
+ `CurrentRevision:` + fmt.Sprintf("%v", this.CurrentRevision) + `,`,
+ `UpdateRevision:` + fmt.Sprintf("%v", this.UpdateRevision) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StatefulSetUpdateStrategy) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StatefulSetUpdateStrategy{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `RollingUpdate:` + strings.Replace(fmt.Sprintf("%v", this.RollingUpdate), "RollingUpdateStatefulSetStrategy", "RollingUpdateStatefulSetStrategy", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *ControllerRevision) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ControllerRevision: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ControllerRevision: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType)
+ }
+ m.Revision = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Revision |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ControllerRevisionList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ControllerRevisionList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ControllerRevisionList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ControllerRevision{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Deployment) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Deployment: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Deployment: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeploymentCondition) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeploymentCondition: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeploymentCondition: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = DeploymentConditionType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Status = k8s_io_kubernetes_pkg_api_v1.ConditionStatus(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastUpdateTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastUpdateTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeploymentList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeploymentList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeploymentList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, Deployment{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeploymentRollback) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeploymentRollback: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeploymentRollback: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAnnotations", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.UpdatedAnnotations == nil {
+ m.UpdatedAnnotations = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.UpdatedAnnotations[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.UpdatedAnnotations[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RollbackTo", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.RollbackTo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeploymentSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeploymentSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeploymentSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Replicas = &v
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Selector == nil {
+ m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
+ }
+ if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Strategy", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Strategy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MinReadySeconds", wireType)
+ }
+ m.MinReadySeconds = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.MinReadySeconds |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RevisionHistoryLimit", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.RevisionHistoryLimit = &v
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Paused", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Paused = bool(v != 0)
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RollbackTo", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.RollbackTo == nil {
+ m.RollbackTo = &RollbackConfig{}
+ }
+ if err := m.RollbackTo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 9:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ProgressDeadlineSeconds", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ProgressDeadlineSeconds = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeploymentStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeploymentStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeploymentStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
+ }
+ m.ObservedGeneration = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ObservedGeneration |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ m.Replicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Replicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UpdatedReplicas", wireType)
+ }
+ m.UpdatedReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.UpdatedReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AvailableReplicas", wireType)
+ }
+ m.AvailableReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.AvailableReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UnavailableReplicas", wireType)
+ }
+ m.UnavailableReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.UnavailableReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Conditions = append(m.Conditions, DeploymentCondition{})
+ if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadyReplicas", wireType)
+ }
+ m.ReadyReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ReadyReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 8:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CollisionCount", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.CollisionCount = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeploymentStrategy) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeploymentStrategy: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeploymentStrategy: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = DeploymentStrategyType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RollingUpdate", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.RollingUpdate == nil {
+ m.RollingUpdate = &RollingUpdateDeployment{}
+ }
+ if err := m.RollingUpdate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RollbackConfig) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RollbackConfig: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RollbackConfig: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType)
+ }
+ m.Revision = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Revision |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RollingUpdateDeployment) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RollingUpdateDeployment: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RollingUpdateDeployment: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MaxUnavailable", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.MaxUnavailable == nil {
+ m.MaxUnavailable = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
+ }
+ if err := m.MaxUnavailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MaxSurge", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.MaxSurge == nil {
+ m.MaxSurge = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
+ }
+ if err := m.MaxSurge.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RollingUpdateStatefulSetStrategy) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RollingUpdateStatefulSetStrategy: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RollingUpdateStatefulSetStrategy: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Partition", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Partition = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Scale) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Scale: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Scale: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ScaleSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ScaleSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ScaleSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ m.Replicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Replicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ScaleStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ScaleStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ScaleStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ m.Replicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Replicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Selector == nil {
+ m.Selector = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Selector[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Selector[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetSelector", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.TargetSelector = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StatefulSet) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StatefulSet: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StatefulSet: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StatefulSetList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StatefulSetList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StatefulSetList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, StatefulSet{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StatefulSetSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StatefulSetSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StatefulSetSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Replicas = &v
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Selector == nil {
+ m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
+ }
+ if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeClaimTemplates", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumeClaimTemplates = append(m.VolumeClaimTemplates, k8s_io_kubernetes_pkg_api_v1.PersistentVolumeClaim{})
+ if err := m.VolumeClaimTemplates[len(m.VolumeClaimTemplates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ServiceName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ServiceName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodManagementPolicy", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PodManagementPolicy = PodManagementPolicyType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UpdateStrategy", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.UpdateStrategy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RevisionHistoryLimit", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.RevisionHistoryLimit = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StatefulSetStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StatefulSetStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StatefulSetStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ObservedGeneration = &v
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ m.Replicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Replicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadyReplicas", wireType)
+ }
+ m.ReadyReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ReadyReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentReplicas", wireType)
+ }
+ m.CurrentReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.CurrentReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UpdatedReplicas", wireType)
+ }
+ m.UpdatedReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.UpdatedReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentRevision", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.CurrentRevision = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UpdateRevision", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.UpdateRevision = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StatefulSetUpdateStrategy) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StatefulSetUpdateStrategy: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StatefulSetUpdateStrategy: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = StatefulSetUpdateStrategyType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RollingUpdate", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.RollingUpdate == nil {
+ m.RollingUpdate = &RollingUpdateStatefulSetStrategy{}
+ }
+ if err := m.RollingUpdate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/kubernetes/pkg/apis/apps/v1beta1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 1812 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0x4f, 0x6f, 0x23, 0x49,
+ 0x15, 0x4f, 0xfb, 0x4f, 0xe2, 0x54, 0x36, 0xce, 0x4c, 0x25, 0x4c, 0xbc, 0x59, 0x70, 0x22, 0x1f,
+ 0x76, 0x03, 0x6c, 0xda, 0x4c, 0x66, 0xd8, 0x9d, 0x49, 0xd0, 0x88, 0x74, 0x66, 0x58, 0x06, 0x25,
+ 0x24, 0x2a, 0x27, 0x23, 0x76, 0x58, 0xa4, 0x2d, 0xb7, 0x6b, 0x3a, 0xbd, 0xe9, 0x7f, 0xea, 0xae,
+ 0x36, 0xe3, 0x1b, 0x5a, 0x89, 0x1b, 0x07, 0xbe, 0x00, 0xe2, 0x8e, 0x90, 0xf8, 0x1a, 0x11, 0x1c,
+ 0x58, 0x71, 0x1a, 0x71, 0x88, 0x88, 0xf7, 0x23, 0x20, 0x2e, 0x73, 0x42, 0x55, 0x5d, 0xfd, 0xdf,
+ 0x9d, 0xd8, 0x46, 0xe4, 0xb2, 0x37, 0x77, 0xbd, 0xf7, 0x7e, 0xef, 0x55, 0xd5, 0x7b, 0xaf, 0x7e,
+ 0xcf, 0xe0, 0xe3, 0xf3, 0x47, 0x9e, 0xac, 0xdb, 0xed, 0x73, 0xbf, 0x4b, 0x5c, 0x8b, 0x50, 0xe2,
+ 0xb5, 0x9d, 0x73, 0xad, 0x8d, 0x1d, 0xdd, 0x6b, 0x63, 0xc7, 0xf1, 0xda, 0xfd, 0xfb, 0x5d, 0x42,
+ 0xf1, 0xfd, 0xb6, 0x46, 0x2c, 0xe2, 0x62, 0x4a, 0x7a, 0xb2, 0xe3, 0xda, 0xd4, 0x86, 0x1f, 0x04,
+ 0x86, 0x72, 0x6c, 0x28, 0x3b, 0xe7, 0x9a, 0xcc, 0x0c, 0x65, 0x66, 0x28, 0x0b, 0xc3, 0xb5, 0x2d,
+ 0x4d, 0xa7, 0x67, 0x7e, 0x57, 0x56, 0x6d, 0xb3, 0xad, 0xd9, 0x9a, 0xdd, 0xe6, 0xf6, 0x5d, 0xff,
+ 0x15, 0xff, 0xe2, 0x1f, 0xfc, 0x57, 0x80, 0xbb, 0xf6, 0x50, 0x04, 0x84, 0x1d, 0xdd, 0xc4, 0xea,
+ 0x99, 0x6e, 0x11, 0x77, 0x10, 0x87, 0x64, 0x12, 0x8a, 0xdb, 0xfd, 0x5c, 0x34, 0x6b, 0xed, 0x22,
+ 0x2b, 0xd7, 0xb7, 0xa8, 0x6e, 0x92, 0x9c, 0xc1, 0x47, 0x37, 0x19, 0x78, 0xea, 0x19, 0x31, 0x71,
+ 0xce, 0xee, 0x41, 0x91, 0x9d, 0x4f, 0x75, 0xa3, 0xad, 0x5b, 0xd4, 0xa3, 0x6e, 0xce, 0xe8, 0xc3,
+ 0xc2, 0x43, 0x1e, 0xb5, 0x97, 0xc7, 0xd7, 0x5c, 0x89, 0x63, 0x1b, 0xba, 0x3a, 0x28, 0xba, 0x94,
+ 0xd6, 0x7f, 0x24, 0x00, 0xf7, 0x6d, 0x8b, 0xba, 0xb6, 0x61, 0x10, 0x17, 0x91, 0xbe, 0xee, 0xe9,
+ 0xb6, 0x05, 0x3f, 0x07, 0x35, 0x76, 0x70, 0x3d, 0x4c, 0x71, 0x43, 0xda, 0x90, 0x36, 0x17, 0xb6,
+ 0x7f, 0x20, 0x8b, 0xeb, 0x4b, 0xee, 0x23, 0xbe, 0x40, 0xa6, 0x2d, 0xf7, 0xef, 0xcb, 0x47, 0xdd,
+ 0x2f, 0x88, 0x4a, 0x0f, 0x09, 0xc5, 0x0a, 0xbc, 0xb8, 0x5c, 0x9f, 0x19, 0x5e, 0xae, 0x83, 0x78,
+ 0x0d, 0x45, 0xa8, 0xf0, 0x08, 0x54, 0x38, 0x7a, 0x89, 0xa3, 0x6f, 0x15, 0xa2, 0x8b, 0xd3, 0x95,
+ 0x11, 0xfe, 0xf5, 0xb3, 0xd7, 0x94, 0x58, 0x2c, 0x3c, 0xe5, 0x1d, 0x01, 0x5d, 0x79, 0x8a, 0x29,
+ 0x46, 0x1c, 0x08, 0x7e, 0x08, 0x6a, 0xae, 0x08, 0xbf, 0x51, 0xde, 0x90, 0x36, 0xcb, 0xca, 0x1d,
+ 0xa1, 0x55, 0x0b, 0xb7, 0x85, 0x22, 0x8d, 0xd6, 0x1b, 0x09, 0xdc, 0xcb, 0xef, 0xfb, 0x40, 0xf7,
+ 0x28, 0xfc, 0x2c, 0xb7, 0x77, 0x79, 0xbc, 0xbd, 0x33, 0x6b, 0xbe, 0xf3, 0xc8, 0x71, 0xb8, 0x92,
+ 0xd8, 0xf7, 0xe7, 0xa0, 0xaa, 0x53, 0x62, 0x7a, 0x8d, 0xd2, 0x46, 0x79, 0x73, 0x61, 0x7b, 0x57,
+ 0x1e, 0xb3, 0x2a, 0xe4, 0x7c, 0xb4, 0xca, 0xa2, 0xf0, 0x53, 0x7d, 0xce, 0x10, 0x51, 0x00, 0xdc,
+ 0xfa, 0x73, 0x09, 0x80, 0xa7, 0xc4, 0x31, 0xec, 0x81, 0x49, 0x2c, 0x7a, 0x0b, 0x57, 0xf9, 0x29,
+ 0xa8, 0x78, 0x0e, 0x51, 0xc5, 0x55, 0x7e, 0x3c, 0xf6, 0x8e, 0xe2, 0x20, 0x3b, 0x0e, 0x51, 0xe3,
+ 0x4b, 0x65, 0x5f, 0x88, 0x43, 0x42, 0x0c, 0x66, 0x3d, 0x8a, 0xa9, 0xef, 0xf1, 0x2b, 0x5d, 0xd8,
+ 0x7e, 0x3c, 0x0d, 0x38, 0x07, 0x50, 0xea, 0x02, 0x7e, 0x36, 0xf8, 0x46, 0x02, 0xb8, 0x75, 0x55,
+ 0x06, 0xcb, 0xb1, 0xf2, 0xbe, 0x6d, 0xf5, 0x74, 0xca, 0x4a, 0x60, 0x17, 0x54, 0xe8, 0xc0, 0x21,
+ 0xfc, 0xcc, 0xe6, 0x95, 0x0f, 0xc2, 0xe0, 0x4e, 0x06, 0x0e, 0x79, 0x7b, 0xb9, 0xbe, 0x3a, 0xc2,
+ 0x84, 0x89, 0x10, 0x37, 0x82, 0x2f, 0xa2, 0xb8, 0x4b, 0xdc, 0xfc, 0x49, 0xda, 0xf9, 0xdb, 0xcb,
+ 0xf5, 0x6b, 0x2b, 0x5c, 0x8e, 0x30, 0xd3, 0xc1, 0xc2, 0xf7, 0xc1, 0xac, 0x4b, 0xb0, 0x67, 0x5b,
+ 0x8d, 0x0a, 0xc7, 0x8d, 0x36, 0x85, 0xf8, 0x2a, 0x12, 0x52, 0xf8, 0x5d, 0x30, 0x67, 0x12, 0xcf,
+ 0xc3, 0x1a, 0x69, 0x54, 0xb9, 0xe2, 0x92, 0x50, 0x9c, 0x3b, 0x0c, 0x96, 0x51, 0x28, 0x87, 0x5f,
+ 0x80, 0xba, 0x81, 0x3d, 0x7a, 0xea, 0xf4, 0x30, 0x25, 0x27, 0xba, 0x49, 0x1a, 0xb3, 0xfc, 0xa8,
+ 0xbf, 0x37, 0x5e, 0x96, 0x30, 0x0b, 0xe5, 0x9e, 0x40, 0xaf, 0x1f, 0xa4, 0x90, 0x50, 0x06, 0x19,
+ 0xf6, 0x01, 0x64, 0x2b, 0x27, 0x2e, 0xb6, 0xbc, 0xe0, 0xc8, 0x98, 0xbf, 0xb9, 0x89, 0xfd, 0xad,
+ 0x09, 0x7f, 0xf0, 0x20, 0x87, 0x86, 0x46, 0x78, 0x68, 0x5d, 0x48, 0xa0, 0x1e, 0x5f, 0xd8, 0x2d,
+ 0x54, 0xf9, 0x2f, 0xd2, 0x55, 0xfe, 0x60, 0x8a, 0xb4, 0x2d, 0xa8, 0xee, 0xdf, 0x95, 0x01, 0x8c,
+ 0x95, 0x90, 0x6d, 0x18, 0x5d, 0xac, 0x9e, 0xc3, 0x0d, 0x50, 0xb1, 0xb0, 0x19, 0x66, 0x6b, 0x54,
+ 0x4a, 0x3f, 0xc7, 0x26, 0x41, 0x5c, 0x02, 0xff, 0x28, 0x01, 0xe8, 0xf3, 0xab, 0xe8, 0xed, 0x59,
+ 0x96, 0x4d, 0x31, 0x3b, 0x9d, 0x30, 0xc0, 0xce, 0x14, 0x01, 0x86, 0xbe, 0xe5, 0xd3, 0x1c, 0xea,
+ 0x33, 0x8b, 0xba, 0x83, 0xf8, 0x96, 0xf2, 0x0a, 0x68, 0x44, 0x28, 0xf0, 0x1c, 0x00, 0x57, 0x60,
+ 0x9e, 0xd8, 0xa2, 0xe0, 0xc7, 0xef, 0x26, 0x61, 0x38, 0xfb, 0xb6, 0xf5, 0x4a, 0xd7, 0xe2, 0x96,
+ 0x85, 0x22, 0x48, 0x94, 0x80, 0x5f, 0x7b, 0x06, 0x56, 0x0b, 0xe2, 0x86, 0x77, 0x40, 0xf9, 0x9c,
+ 0x0c, 0x82, 0xa3, 0x44, 0xec, 0x27, 0x5c, 0x01, 0xd5, 0x3e, 0x36, 0x7c, 0x12, 0x54, 0x33, 0x0a,
+ 0x3e, 0x76, 0x4a, 0x8f, 0xa4, 0xd6, 0x3f, 0xab, 0xc9, 0xcc, 0x62, 0x9d, 0x0b, 0x6e, 0xb2, 0x87,
+ 0xc8, 0x31, 0x74, 0x15, 0x7b, 0x1c, 0xa3, 0xaa, 0xbc, 0x13, 0x3c, 0x42, 0xc1, 0x1a, 0x8a, 0xa4,
+ 0xf0, 0x57, 0xa0, 0xe6, 0x11, 0x83, 0xa8, 0xd4, 0x76, 0x45, 0xf3, 0x7c, 0x30, 0x66, 0x0e, 0xe2,
+ 0x2e, 0x31, 0x3a, 0xc2, 0x34, 0x80, 0x0f, 0xbf, 0x50, 0x04, 0x09, 0x7f, 0x09, 0x6a, 0x94, 0x98,
+ 0x8e, 0x81, 0x29, 0x11, 0xa7, 0xb9, 0x55, 0x7c, 0x9a, 0x0c, 0xf6, 0xd8, 0xee, 0x9d, 0x08, 0x03,
+ 0xde, 0x91, 0xa3, 0x0c, 0x0f, 0x57, 0x51, 0x04, 0x08, 0x75, 0x50, 0xf3, 0x28, 0x63, 0x12, 0xda,
+ 0x80, 0xf7, 0xa2, 0x49, 0x9e, 0xb2, 0x64, 0x6f, 0x0e, 0x20, 0x62, 0x57, 0xe1, 0x0a, 0x8a, 0xe0,
+ 0xe1, 0x1e, 0x58, 0x32, 0x75, 0x0b, 0x11, 0xdc, 0x1b, 0x74, 0x88, 0x6a, 0x5b, 0x3d, 0x8f, 0x37,
+ 0xb5, 0xaa, 0xb2, 0x2a, 0x8c, 0x96, 0x0e, 0xd3, 0x62, 0x94, 0xd5, 0x87, 0x07, 0x60, 0x25, 0x7c,
+ 0xfa, 0x7f, 0xaa, 0x7b, 0xd4, 0x76, 0x07, 0x07, 0xba, 0xa9, 0x53, 0xde, 0xea, 0xaa, 0x4a, 0x63,
+ 0x78, 0xb9, 0xbe, 0x82, 0x46, 0xc8, 0xd1, 0x48, 0x2b, 0xd6, 0x85, 0x1d, 0xec, 0x7b, 0xa4, 0xc7,
+ 0x5b, 0x57, 0x2d, 0xee, 0xc2, 0xc7, 0x7c, 0x15, 0x09, 0x29, 0xd4, 0x52, 0x09, 0x5d, 0xfb, 0xdf,
+ 0x12, 0xba, 0x5e, 0x9c, 0xcc, 0xf0, 0x14, 0xac, 0x3a, 0xae, 0xad, 0xb9, 0xc4, 0xf3, 0x9e, 0x12,
+ 0xdc, 0x33, 0x74, 0x8b, 0x84, 0x27, 0x35, 0xcf, 0x77, 0xf8, 0xde, 0xf0, 0x72, 0x7d, 0xf5, 0x78,
+ 0xb4, 0x0a, 0x2a, 0xb2, 0x6d, 0xfd, 0xa3, 0x02, 0xee, 0x64, 0xdf, 0x51, 0xf8, 0x33, 0x00, 0xed,
+ 0xae, 0x47, 0xdc, 0x3e, 0xe9, 0x7d, 0x12, 0x90, 0x49, 0xc6, 0xb8, 0x24, 0xce, 0xb8, 0xa2, 0x8a,
+ 0x3f, 0xca, 0x69, 0xa0, 0x11, 0x56, 0x01, 0x67, 0x13, 0xa5, 0x52, 0xe2, 0x81, 0x26, 0x38, 0x5b,
+ 0xae, 0x5c, 0xf6, 0xc0, 0x92, 0xe8, 0x1a, 0xa1, 0x90, 0xa7, 0x75, 0x22, 0x0f, 0x4e, 0xd3, 0x62,
+ 0x94, 0xd5, 0x87, 0x9f, 0x80, 0xbb, 0xb8, 0x8f, 0x75, 0x03, 0x77, 0x0d, 0x12, 0x81, 0x54, 0x38,
+ 0xc8, 0xbb, 0x02, 0xe4, 0xee, 0x5e, 0x56, 0x01, 0xe5, 0x6d, 0xe0, 0x21, 0x58, 0xf6, 0xad, 0x3c,
+ 0x54, 0x90, 0x97, 0xef, 0x09, 0xa8, 0xe5, 0xd3, 0xbc, 0x0a, 0x1a, 0x65, 0x07, 0x1d, 0x00, 0xd4,
+ 0xf0, 0xc9, 0xf7, 0x1a, 0xb3, 0xbc, 0x27, 0xff, 0x68, 0x8a, 0x7a, 0x8a, 0x78, 0x43, 0xdc, 0xff,
+ 0xa2, 0x25, 0x0f, 0x25, 0x7c, 0xc0, 0x5d, 0xb0, 0xe8, 0xb2, 0x0a, 0x89, 0x42, 0x9f, 0xe3, 0xa1,
+ 0x7f, 0x4b, 0x98, 0x2d, 0xa2, 0xa4, 0x10, 0xa5, 0x75, 0xe1, 0x0e, 0xa8, 0xab, 0xb6, 0x61, 0xf0,
+ 0xca, 0xd8, 0xb7, 0x7d, 0x8b, 0xf2, 0xe4, 0x2e, 0x2b, 0x90, 0x71, 0x80, 0xfd, 0x94, 0x04, 0x65,
+ 0x34, 0x5b, 0x7f, 0x93, 0x92, 0x0f, 0x58, 0x58, 0xee, 0x70, 0x27, 0x45, 0xb7, 0xde, 0xcf, 0xd0,
+ 0xad, 0x7b, 0x79, 0x8b, 0x04, 0xdb, 0x1a, 0x80, 0x45, 0x56, 0x0c, 0xba, 0xa5, 0x05, 0x09, 0x20,
+ 0x9a, 0xe9, 0x8f, 0x27, 0x2a, 0xb5, 0xc8, 0x3a, 0xf1, 0x04, 0xdf, 0xe5, 0x27, 0x91, 0x14, 0xa2,
+ 0xb4, 0xa7, 0xd6, 0x13, 0x50, 0x4f, 0xd7, 0x69, 0x6a, 0x0e, 0x91, 0x6e, 0x9c, 0x43, 0xbe, 0x96,
+ 0xc0, 0x6a, 0x81, 0x77, 0x68, 0x80, 0xba, 0x89, 0x5f, 0x27, 0x72, 0xe8, 0x46, 0xfe, 0xce, 0x46,
+ 0x4a, 0x39, 0x18, 0x29, 0xe5, 0xe7, 0x16, 0x3d, 0x72, 0x3b, 0xd4, 0xd5, 0x2d, 0x2d, 0xb8, 0x97,
+ 0xc3, 0x14, 0x16, 0xca, 0x60, 0xc3, 0x97, 0xa0, 0x66, 0xe2, 0xd7, 0x1d, 0xdf, 0xd5, 0xc2, 0xf3,
+ 0x9b, 0xdc, 0x0f, 0x7f, 0x89, 0x0e, 0x05, 0x0a, 0x8a, 0xf0, 0x5a, 0x47, 0x60, 0x23, 0xb5, 0x49,
+ 0xd6, 0x4a, 0xc8, 0x2b, 0xdf, 0xe8, 0x90, 0x38, 0x01, 0xbe, 0x0f, 0xe6, 0x1d, 0xec, 0x52, 0x3d,
+ 0x6a, 0x27, 0x55, 0x65, 0x71, 0x78, 0xb9, 0x3e, 0x7f, 0x1c, 0x2e, 0xa2, 0x58, 0xde, 0xfa, 0x43,
+ 0x09, 0x54, 0x3b, 0x2a, 0x36, 0xc8, 0x2d, 0x8c, 0x37, 0x27, 0xa9, 0xf1, 0x66, 0x7b, 0xec, 0xa4,
+ 0xe2, 0xf1, 0x15, 0x4e, 0x36, 0x9f, 0x65, 0x26, 0x9b, 0x87, 0x13, 0xe2, 0x5e, 0x3f, 0xd4, 0x3c,
+ 0x06, 0xf3, 0x91, 0xfb, 0x54, 0x97, 0x95, 0x6e, 0xea, 0xb2, 0xad, 0x3f, 0x95, 0xc0, 0x42, 0xc2,
+ 0xc5, 0x64, 0xd6, 0xd0, 0x49, 0x51, 0x1a, 0xd6, 0xc6, 0x94, 0x69, 0x36, 0x26, 0x87, 0x74, 0x26,
+ 0x60, 0x92, 0x31, 0x3b, 0xc8, 0xb3, 0x9c, 0x27, 0xa0, 0x4e, 0xb1, 0xab, 0x11, 0x1a, 0xca, 0xf8,
+ 0x81, 0xce, 0xc7, 0x33, 0xc9, 0x49, 0x4a, 0x8a, 0x32, 0xda, 0x6b, 0xbb, 0x60, 0x31, 0xe5, 0x6c,
+ 0x22, 0xfa, 0xf7, 0x17, 0x76, 0x58, 0x71, 0x32, 0xdf, 0x42, 0x36, 0xbe, 0x4c, 0x65, 0xe3, 0xa3,
+ 0xf1, 0x0f, 0x37, 0x51, 0x72, 0x45, 0x39, 0xd9, 0xcd, 0xe4, 0xe4, 0xce, 0x54, 0xe8, 0xd7, 0x67,
+ 0xe6, 0x5f, 0x25, 0xb0, 0x94, 0xd0, 0xbe, 0x85, 0x59, 0xec, 0xd3, 0xf4, 0x2c, 0xf6, 0x70, 0x9a,
+ 0x4d, 0x15, 0x0c, 0x63, 0xff, 0xae, 0xa6, 0x36, 0xf3, 0x0d, 0xa2, 0xff, 0xbf, 0x95, 0xc0, 0x4a,
+ 0xdf, 0x36, 0x7c, 0x93, 0xec, 0x1b, 0x58, 0x37, 0x43, 0x0d, 0x46, 0xa6, 0x6e, 0x18, 0x78, 0xb9,
+ 0x27, 0xe2, 0x7a, 0xba, 0x47, 0x89, 0x45, 0x5f, 0xc4, 0x18, 0xca, 0xb7, 0x85, 0xbf, 0x95, 0x17,
+ 0x23, 0x80, 0xd1, 0x48, 0x77, 0xf0, 0x87, 0x60, 0x81, 0xb1, 0x4a, 0x5d, 0x25, 0x6c, 0xd4, 0x15,
+ 0x7f, 0x76, 0x2c, 0x0b, 0xa0, 0x85, 0x4e, 0x2c, 0x42, 0x49, 0x3d, 0x78, 0x06, 0x96, 0x1d, 0xbb,
+ 0x77, 0x88, 0x2d, 0xac, 0x11, 0xf6, 0xd6, 0x1e, 0xf3, 0x7f, 0x49, 0xf9, 0x38, 0x30, 0xaf, 0x7c,
+ 0x14, 0xd2, 0xb7, 0xe3, 0xbc, 0xca, 0x5b, 0xc6, 0xa3, 0xf3, 0xcb, 0x9c, 0x8c, 0x8c, 0x82, 0x84,
+ 0x5f, 0x4a, 0xa0, 0xee, 0x8b, 0x47, 0x4f, 0x8c, 0x4b, 0xc1, 0xff, 0x1d, 0xca, 0x34, 0x79, 0x78,
+ 0x9a, 0x42, 0x8a, 0x7b, 0x5c, 0x7a, 0x1d, 0x65, 0x3c, 0x16, 0x8e, 0x3f, 0xb5, 0x69, 0xc6, 0x9f,
+ 0xd6, 0xdf, 0xcb, 0xe0, 0x6e, 0xae, 0xe0, 0xe1, 0x4f, 0xae, 0x99, 0x0b, 0xee, 0xfd, 0xdf, 0x66,
+ 0x82, 0x1c, 0x8d, 0x2d, 0x4f, 0x40, 0x63, 0xf7, 0xc0, 0x92, 0xea, 0xbb, 0x2e, 0xb1, 0x68, 0x66,
+ 0x16, 0x88, 0x06, 0x8a, 0xfd, 0xb4, 0x18, 0x65, 0xf5, 0x47, 0xcd, 0x24, 0xd5, 0x09, 0x67, 0x92,
+ 0x64, 0x14, 0x82, 0x37, 0x06, 0x79, 0x98, 0x8f, 0x42, 0xd0, 0xc7, 0xac, 0x3e, 0x7b, 0x03, 0x03,
+ 0xd4, 0x08, 0x61, 0x2e, 0xfd, 0x06, 0x9e, 0xa6, 0xa4, 0x28, 0xa3, 0xcd, 0x58, 0xe8, 0xbb, 0x85,
+ 0x59, 0x06, 0xf7, 0x52, 0xd4, 0x7c, 0x2b, 0x43, 0xcd, 0xbf, 0x53, 0x68, 0x98, 0x60, 0xe8, 0x5f,
+ 0x4a, 0xa3, 0x29, 0xfa, 0xf3, 0xe9, 0x28, 0xfa, 0x08, 0xfe, 0x78, 0x33, 0x57, 0x57, 0xb6, 0x2e,
+ 0xae, 0x9a, 0x33, 0x5f, 0x5d, 0x35, 0x67, 0xde, 0x5c, 0x35, 0x67, 0x7e, 0x33, 0x6c, 0x4a, 0x17,
+ 0xc3, 0xa6, 0xf4, 0xd5, 0xb0, 0x29, 0xbd, 0x19, 0x36, 0xa5, 0x7f, 0x0d, 0x9b, 0xd2, 0xef, 0xbf,
+ 0x6e, 0xce, 0xbc, 0x9c, 0x13, 0x1e, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x97, 0x69, 0x29, 0x49,
+ 0xe9, 0x1a, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/generated.proto
new file mode 100644
index 000000000..b67e27183
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/generated.proto
@@ -0,0 +1,441 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.pkg.apis.apps.v1beta1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+import "k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1beta1";
+
+// ControllerRevision implements an immutable snapshot of state data. Clients
+// are responsible for serializing and deserializing the objects that contain
+// their internal state.
+// Once a ControllerRevision has been successfully created, it can not be updated.
+// The API Server will fail validation of all requests that attempt to mutate
+// the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both
+// the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However,
+// it may be subject to name and representation changes in future releases, and clients should not
+// depend on its stability. It is primarily for internal use by controllers.
+message ControllerRevision {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Data is the serialized representation of the state.
+ optional k8s.io.apimachinery.pkg.runtime.RawExtension data = 2;
+
+ // Revision indicates the revision of the state represented by Data.
+ optional int64 revision = 3;
+}
+
+// ControllerRevisionList is a resource containing a list of ControllerRevision objects.
+message ControllerRevisionList {
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is the list of ControllerRevisions
+ repeated ControllerRevision items = 2;
+}
+
+// Deployment enables declarative updates for Pods and ReplicaSets.
+message Deployment {
+ // Standard object metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Specification of the desired behavior of the Deployment.
+ // +optional
+ optional DeploymentSpec spec = 2;
+
+ // Most recently observed status of the Deployment.
+ // +optional
+ optional DeploymentStatus status = 3;
+}
+
+// DeploymentCondition describes the state of a deployment at a certain point.
+message DeploymentCondition {
+ // Type of deployment condition.
+ optional string type = 1;
+
+ // Status of the condition, one of True, False, Unknown.
+ optional string status = 2;
+
+ // The last time this condition was updated.
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 6;
+
+ // Last time the condition transitioned from one status to another.
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 7;
+
+ // The reason for the condition's last transition.
+ optional string reason = 4;
+
+ // A human readable message indicating details about the transition.
+ optional string message = 5;
+}
+
+// DeploymentList is a list of Deployments.
+message DeploymentList {
+ // Standard list metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is the list of Deployments.
+ repeated Deployment items = 2;
+}
+
+// DeploymentRollback stores the information required to rollback a deployment.
+message DeploymentRollback {
+ // Required: This must match the Name of a deployment.
+ optional string name = 1;
+
+ // The annotations to be updated to a deployment
+ // +optional
+ map<string, string> updatedAnnotations = 2;
+
+ // The config of this deployment rollback.
+ optional RollbackConfig rollbackTo = 3;
+}
+
+// DeploymentSpec is the specification of the desired behavior of the Deployment.
+message DeploymentSpec {
+ // Number of desired pods. This is a pointer to distinguish between explicit
+ // zero and not specified. Defaults to 1.
+ // +optional
+ optional int32 replicas = 1;
+
+ // Label selector for pods. Existing ReplicaSets whose pods are
+ // selected by this will be the ones affected by this deployment.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
+
+ // Template describes the pods that will be created.
+ optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 3;
+
+ // The deployment strategy to use to replace existing pods with new ones.
+ // +optional
+ optional DeploymentStrategy strategy = 4;
+
+ // Minimum number of seconds for which a newly created pod should be ready
+ // without any of its container crashing, for it to be considered available.
+ // Defaults to 0 (pod will be considered available as soon as it is ready)
+ // +optional
+ optional int32 minReadySeconds = 5;
+
+ // The number of old ReplicaSets to retain to allow rollback.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ // Defaults to 2.
+ // +optional
+ optional int32 revisionHistoryLimit = 6;
+
+ // Indicates that the deployment is paused.
+ // +optional
+ optional bool paused = 7;
+
+ // The config this deployment is rolling back to. Will be cleared after rollback is done.
+ // +optional
+ optional RollbackConfig rollbackTo = 8;
+
+ // The maximum time in seconds for a deployment to make progress before it
+ // is considered to be failed. The deployment controller will continue to
+ // process failed deployments and a condition with a ProgressDeadlineExceeded
+ // reason will be surfaced in the deployment status. Once autoRollback is
+ // implemented, the deployment controller will automatically rollback failed
+ // deployments. Note that progress will not be estimated during the time a
+ // deployment is paused. Defaults to 600s.
+ optional int32 progressDeadlineSeconds = 9;
+}
+
+// DeploymentStatus is the most recently observed status of the Deployment.
+message DeploymentStatus {
+ // The generation observed by the deployment controller.
+ // +optional
+ optional int64 observedGeneration = 1;
+
+ // Total number of non-terminated pods targeted by this deployment (their labels match the selector).
+ // +optional
+ optional int32 replicas = 2;
+
+ // Total number of non-terminated pods targeted by this deployment that have the desired template spec.
+ // +optional
+ optional int32 updatedReplicas = 3;
+
+ // Total number of ready pods targeted by this deployment.
+ // +optional
+ optional int32 readyReplicas = 7;
+
+ // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
+ // +optional
+ optional int32 availableReplicas = 4;
+
+ // Total number of unavailable pods targeted by this deployment.
+ // +optional
+ optional int32 unavailableReplicas = 5;
+
+ // Represents the latest available observations of a deployment's current state.
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ repeated DeploymentCondition conditions = 6;
+
+ // Count of hash collisions for the Deployment. The Deployment controller uses this
+ // field as a collision avoidance mechanism when it needs to create the name for the
+ // newest ReplicaSet.
+ // +optional
+ optional int64 collisionCount = 8;
+}
+
+// DeploymentStrategy describes how to replace existing pods with new ones.
+message DeploymentStrategy {
+ // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
+ // +optional
+ optional string type = 1;
+
+ // Rolling update config params. Present only if DeploymentStrategyType =
+ // RollingUpdate.
+ // ---
+ // TODO: Update this to follow our convention for oneOf, whatever we decide it
+ // to be.
+ // +optional
+ optional RollingUpdateDeployment rollingUpdate = 2;
+}
+
+message RollbackConfig {
+ // The revision to rollback to. If set to 0, rollback to the last revision.
+ // +optional
+ optional int64 revision = 1;
+}
+
+// Spec to control the desired behavior of rolling update.
+message RollingUpdateDeployment {
+ // The maximum number of pods that can be unavailable during the update.
+ // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
+ // Absolute number is calculated from percentage by rounding down.
+ // This can not be 0 if MaxSurge is 0.
+ // Defaults to 25%.
+ // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods
+ // immediately when the rolling update starts. Once new pods are ready, old RC
+ // can be scaled down further, followed by scaling up the new RC, ensuring
+ // that the total number of pods available at all times during the update is at
+ // least 70% of desired pods.
+ // +optional
+ optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1;
+
+ // The maximum number of pods that can be scheduled above the desired number of
+ // pods.
+ // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
+ // This can not be 0 if MaxUnavailable is 0.
+ // Absolute number is calculated from percentage by rounding up.
+ // Defaults to 25%.
+ // Example: when this is set to 30%, the new RC can be scaled up immediately when
+ // the rolling update starts, such that the total number of old and new pods do not exceed
+ // 130% of desired pods. Once old pods have been killed,
+ // new RC can be scaled up further, ensuring that total number of pods running
+ // at any time during the update is atmost 130% of desired pods.
+ // +optional
+ optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxSurge = 2;
+}
+
+// RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
+message RollingUpdateStatefulSetStrategy {
+ // Partition indicates the ordinal at which the StatefulSet should be
+ // partitioned.
+ optional int32 partition = 1;
+}
+
+// Scale represents a scaling request for a resource.
+message Scale {
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
+ // +optional
+ optional ScaleSpec spec = 2;
+
+ // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.
+ // +optional
+ optional ScaleStatus status = 3;
+}
+
+// ScaleSpec describes the attributes of a scale subresource
+message ScaleSpec {
+ // desired number of instances for the scaled object.
+ // +optional
+ optional int32 replicas = 1;
+}
+
+// ScaleStatus represents the current status of a scale subresource.
+message ScaleStatus {
+ // actual number of observed instances of the scaled object.
+ optional int32 replicas = 1;
+
+ // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
+ // +optional
+ map<string, string> selector = 2;
+
+ // label selector for pods that should match the replicas count. This is a serializated
+ // version of both map-based and more expressive set-based selectors. This is done to
+ // avoid introspection in the clients. The string will be in the same format as the
+ // query-param syntax. If the target type only supports map-based selectors, both this
+ // field and map-based selector field are populated.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ optional string targetSelector = 3;
+}
+
+// StatefulSet represents a set of pods with consistent identities.
+// Identities are defined as:
+// - Network: A single stable DNS and hostname.
+// - Storage: As many VolumeClaims as requested.
+// The StatefulSet guarantees that a given network identity will always
+// map to the same storage identity.
+message StatefulSet {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec defines the desired identities of pods in this set.
+ // +optional
+ optional StatefulSetSpec spec = 2;
+
+ // Status is the current status of Pods in this StatefulSet. This data
+ // may be out of date by some window of time.
+ // +optional
+ optional StatefulSetStatus status = 3;
+}
+
+// StatefulSetList is a collection of StatefulSets.
+message StatefulSetList {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ repeated StatefulSet items = 2;
+}
+
+// A StatefulSetSpec is the specification of a StatefulSet.
+message StatefulSetSpec {
+ // replicas is the desired number of replicas of the given Template.
+ // These are replicas in the sense that they are instantiations of the
+ // same Template, but individual replicas also have a consistent identity.
+ // If unspecified, defaults to 1.
+ // TODO: Consider a rename of this field.
+ // +optional
+ optional int32 replicas = 1;
+
+ // selector is a label query over pods that should match the replica count.
+ // If empty, defaulted to labels on the pod template.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
+
+ // template is the object that describes the pod that will be created if
+ // insufficient replicas are detected. Each pod stamped out by the StatefulSet
+ // will fulfill this Template, but have a unique identity from the rest
+ // of the StatefulSet.
+ optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 3;
+
+ // volumeClaimTemplates is a list of claims that pods are allowed to reference.
+ // The StatefulSet controller is responsible for mapping network identities to
+ // claims in a way that maintains the identity of a pod. Every claim in
+ // this list must have at least one matching (by name) volumeMount in one
+ // container in the template. A claim in this list takes precedence over
+ // any volumes in the template, with the same name.
+ // TODO: Define the behavior if a claim already exists with the same name.
+ // +optional
+ repeated k8s.io.kubernetes.pkg.api.v1.PersistentVolumeClaim volumeClaimTemplates = 4;
+
+ // serviceName is the name of the service that governs this StatefulSet.
+ // This service must exist before the StatefulSet, and is responsible for
+ // the network identity of the set. Pods get DNS/hostnames that follow the
+ // pattern: pod-specific-string.serviceName.default.svc.cluster.local
+ // where "pod-specific-string" is managed by the StatefulSet controller.
+ optional string serviceName = 5;
+
+ // podManagementPolicy controls how pods are created during initial scale up,
+ // when replacing pods on nodes, or when scaling down. The default policy is
+ // `OrderedReady`, where pods are created in increasing order (pod-0, then
+ // pod-1, etc) and the controller will wait until each pod is ready before
+ // continuing. When scaling down, the pods are removed in the opposite order.
+ // The alternative policy is `Parallel` which will create pods in parallel
+ // to match the desired scale without waiting, and on scale down will delete
+ // all pods at once.
+ // +optional
+ optional string podManagementPolicy = 6;
+
+ // updateStrategy indicates the StatefulSetUpdateStrategy that will be
+ // employed to update Pods in the StatefulSet when a revision is made to
+ // Template.
+ optional StatefulSetUpdateStrategy updateStrategy = 7;
+
+ // revisionHistoryLimit is the maximum number of revisions that will
+ // be maintained in the StatefulSet's revision history. The revision history
+ // consists of all revisions not represented by a currently applied
+ // StatefulSetSpec version. The default value is 10.
+ optional int32 revisionHistoryLimit = 8;
+}
+
+// StatefulSetStatus represents the current state of a StatefulSet.
+message StatefulSetStatus {
+ // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the
+ // StatefulSet's generation, which is updated on mutation by the API Server.
+ // +optional
+ optional int64 observedGeneration = 1;
+
+ // replicas is the number of Pods created by the StatefulSet controller.
+ optional int32 replicas = 2;
+
+ // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.
+ optional int32 readyReplicas = 3;
+
+ // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
+ // indicated by currentRevision.
+ optional int32 currentReplicas = 4;
+
+ // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
+ // indicated by updateRevision.
+ optional int32 updatedReplicas = 5;
+
+ // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the
+ // sequence [0,currentReplicas).
+ optional string currentRevision = 6;
+
+ // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence
+ // [replicas-updatedReplicas,replicas)
+ optional string updateRevision = 7;
+}
+
+// StatefulSetUpdateStrategy indicates the strategy that the StatefulSet
+// controller will use to perform updates. It includes any additional parameters
+// necessary to perform the update for the indicated strategy.
+message StatefulSetUpdateStrategy {
+ // Type indicates the type of the StatefulSetUpdateStrategy.
+ optional string type = 1;
+
+ // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.
+ optional RollingUpdateStatefulSetStrategy rollingUpdate = 2;
+}
+
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/register.go
new file mode 100644
index 000000000..5a4fd5bc3
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/register.go
@@ -0,0 +1,65 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "apps"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Deployment{},
+ &DeploymentList{},
+ &DeploymentRollback{},
+ &Scale{},
+ &StatefulSet{},
+ &StatefulSetList{},
+ &ControllerRevision{},
+ &ControllerRevisionList{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/types.generated.go
new file mode 100644
index 000000000..df1323ebf
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/types.generated.go
@@ -0,0 +1,8414 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1beta1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg4_resource "k8s.io/apimachinery/pkg/api/resource"
+ pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ pkg6_runtime "k8s.io/apimachinery/pkg/runtime"
+ pkg2_types "k8s.io/apimachinery/pkg/types"
+ pkg5_intstr "k8s.io/apimachinery/pkg/util/intstr"
+ pkg3_v1 "k8s.io/kubernetes/pkg/api/v1"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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 pkg6_runtime.RawExtension
+ var v3 pkg2_types.UID
+ var v4 pkg5_intstr.IntOrString
+ var v5 pkg3_v1.PodTemplateSpec
+ var v6 time.Time
+ _, _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5, v6
+ }
+}
+
+func (x *ScaleSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = x.Replicas != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ScaleSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ScaleSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "replicas":
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv4 := &x.Replicas
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(yyv4)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ScaleSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv7 := &x.Replicas
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*int32)(yyv7)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ScaleStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = len(x.Selector) != 0
+ yyq2[2] = x.TargetSelector != ""
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Selector, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Selector, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.TargetSelector))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.TargetSelector))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ScaleStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ScaleStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "replicas":
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv4 := &x.Replicas
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(yyv4)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ x.Selector = nil
+ } else {
+ yyv6 := &x.Selector
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv6, false, d)
+ }
+ }
+ case "targetSelector":
+ if r.TryDecodeAsNil() {
+ x.TargetSelector = ""
+ } else {
+ yyv8 := &x.TargetSelector
+ 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_containerMapEnd1234)
+}
+
+func (x *ScaleStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv11 := &x.Replicas
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int32)(yyv11)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Selector = nil
+ } else {
+ yyv13 := &x.Selector
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TargetSelector = ""
+ } else {
+ yyv15 := &x.TargetSelector
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Scale) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Scale) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Scale) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = ScaleSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ScaleStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = ScaleSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ScaleStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *StatefulSet) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *StatefulSet) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *StatefulSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = StatefulSetSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = StatefulSetStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *StatefulSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = StatefulSetSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = StatefulSetStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x PodManagementPolicyType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *PodManagementPolicyType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *StatefulSetUpdateStrategy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Type != ""
+ yyq2[1] = x.RollingUpdate != 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_containerArrayElem1234)
+ if yyq2[0] {
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.RollingUpdate == nil {
+ r.EncodeNil()
+ } else {
+ x.RollingUpdate.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rollingUpdate"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RollingUpdate == nil {
+ r.EncodeNil()
+ } else {
+ x.RollingUpdate.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *StatefulSetUpdateStrategy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *StatefulSetUpdateStrategy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "rollingUpdate":
+ if r.TryDecodeAsNil() {
+ if x.RollingUpdate != nil {
+ x.RollingUpdate = nil
+ }
+ } else {
+ if x.RollingUpdate == nil {
+ x.RollingUpdate = new(RollingUpdateStatefulSetStrategy)
+ }
+ x.RollingUpdate.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *StatefulSetUpdateStrategy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv7 := &x.Type
+ yyv7.CodecDecodeSelf(d)
+ }
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RollingUpdate != nil {
+ x.RollingUpdate = nil
+ }
+ } else {
+ if x.RollingUpdate == nil {
+ x.RollingUpdate = new(RollingUpdateStatefulSetStrategy)
+ }
+ x.RollingUpdate.CodecDecodeSelf(d)
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x StatefulSetUpdateStrategyType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *StatefulSetUpdateStrategyType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *RollingUpdateStatefulSetStrategy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = x.Partition != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Partition == nil {
+ r.EncodeNil()
+ } else {
+ yy4 := *x.Partition
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(yy4))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("partition"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Partition == nil {
+ r.EncodeNil()
+ } else {
+ yy6 := *x.Partition
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(yy6))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RollingUpdateStatefulSetStrategy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RollingUpdateStatefulSetStrategy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "partition":
+ if r.TryDecodeAsNil() {
+ if x.Partition != nil {
+ x.Partition = nil
+ }
+ } else {
+ if x.Partition == nil {
+ x.Partition = new(int32)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(x.Partition)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RollingUpdateStatefulSetStrategy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Partition != nil {
+ x.Partition = nil
+ }
+ } else {
+ if x.Partition == nil {
+ x.Partition = new(int32)
+ }
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*int32)(x.Partition)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *StatefulSetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Replicas != nil
+ yyq2[1] = x.Selector != nil
+ yyq2[3] = len(x.VolumeClaimTemplates) != 0
+ yyq2[5] = x.PodManagementPolicy != ""
+ yyq2[6] = true
+ yyq2[7] = x.RevisionHistoryLimit != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(8)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Replicas == nil {
+ r.EncodeNil()
+ } else {
+ yy4 := *x.Replicas
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(yy4))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Replicas == nil {
+ r.EncodeNil()
+ } else {
+ yy6 := *x.Replicas
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(yy6))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy12 := &x.Template
+ yy12.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("template"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy14 := &x.Template
+ yy14.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.VolumeClaimTemplates == nil {
+ r.EncodeNil()
+ } else {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ h.encSlicev1_PersistentVolumeClaim(([]pkg3_v1.PersistentVolumeClaim)(x.VolumeClaimTemplates), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumeClaimTemplates"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.VolumeClaimTemplates == nil {
+ r.EncodeNil()
+ } else {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ h.encSlicev1_PersistentVolumeClaim(([]pkg3_v1.PersistentVolumeClaim)(x.VolumeClaimTemplates), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ServiceName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("serviceName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ServiceName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ x.PodManagementPolicy.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podManagementPolicy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.PodManagementPolicy.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yy26 := &x.UpdateStrategy
+ yy26.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("updateStrategy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy28 := &x.UpdateStrategy
+ yy28.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.RevisionHistoryLimit == nil {
+ r.EncodeNil()
+ } else {
+ yy31 := *x.RevisionHistoryLimit
+ yym32 := z.EncBinary()
+ _ = yym32
+ if false {
+ } else {
+ r.EncodeInt(int64(yy31))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("revisionHistoryLimit"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RevisionHistoryLimit == nil {
+ r.EncodeNil()
+ } else {
+ yy33 := *x.RevisionHistoryLimit
+ yym34 := z.EncBinary()
+ _ = yym34
+ if false {
+ } else {
+ r.EncodeInt(int64(yy33))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *StatefulSetSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *StatefulSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "replicas":
+ if r.TryDecodeAsNil() {
+ if x.Replicas != nil {
+ x.Replicas = nil
+ }
+ } else {
+ if x.Replicas == nil {
+ x.Replicas = new(int32)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(x.Replicas)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_v1.LabelSelector)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ case "template":
+ if r.TryDecodeAsNil() {
+ x.Template = pkg3_v1.PodTemplateSpec{}
+ } else {
+ yyv8 := &x.Template
+ yyv8.CodecDecodeSelf(d)
+ }
+ case "volumeClaimTemplates":
+ if r.TryDecodeAsNil() {
+ x.VolumeClaimTemplates = nil
+ } else {
+ yyv9 := &x.VolumeClaimTemplates
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSlicev1_PersistentVolumeClaim((*[]pkg3_v1.PersistentVolumeClaim)(yyv9), d)
+ }
+ }
+ case "serviceName":
+ if r.TryDecodeAsNil() {
+ x.ServiceName = ""
+ } else {
+ yyv11 := &x.ServiceName
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*string)(yyv11)) = r.DecodeString()
+ }
+ }
+ case "podManagementPolicy":
+ if r.TryDecodeAsNil() {
+ x.PodManagementPolicy = ""
+ } else {
+ yyv13 := &x.PodManagementPolicy
+ yyv13.CodecDecodeSelf(d)
+ }
+ case "updateStrategy":
+ if r.TryDecodeAsNil() {
+ x.UpdateStrategy = StatefulSetUpdateStrategy{}
+ } else {
+ yyv14 := &x.UpdateStrategy
+ yyv14.CodecDecodeSelf(d)
+ }
+ case "revisionHistoryLimit":
+ if r.TryDecodeAsNil() {
+ if x.RevisionHistoryLimit != nil {
+ x.RevisionHistoryLimit = nil
+ }
+ } else {
+ if x.RevisionHistoryLimit == nil {
+ x.RevisionHistoryLimit = new(int32)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*int32)(x.RevisionHistoryLimit)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj17 int
+ var yyb17 bool
+ var yyhl17 bool = l >= 0
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Replicas != nil {
+ x.Replicas = nil
+ }
+ } else {
+ if x.Replicas == nil {
+ x.Replicas = new(int32)
+ }
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*int32)(x.Replicas)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_v1.LabelSelector)
+ }
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Template = pkg3_v1.PodTemplateSpec{}
+ } else {
+ yyv22 := &x.Template
+ yyv22.CodecDecodeSelf(d)
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.VolumeClaimTemplates = nil
+ } else {
+ yyv23 := &x.VolumeClaimTemplates
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ h.decSlicev1_PersistentVolumeClaim((*[]pkg3_v1.PersistentVolumeClaim)(yyv23), d)
+ }
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ServiceName = ""
+ } else {
+ yyv25 := &x.ServiceName
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*string)(yyv25)) = r.DecodeString()
+ }
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PodManagementPolicy = ""
+ } else {
+ yyv27 := &x.PodManagementPolicy
+ yyv27.CodecDecodeSelf(d)
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UpdateStrategy = StatefulSetUpdateStrategy{}
+ } else {
+ yyv28 := &x.UpdateStrategy
+ yyv28.CodecDecodeSelf(d)
+ }
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RevisionHistoryLimit != nil {
+ x.RevisionHistoryLimit = nil
+ }
+ } else {
+ if x.RevisionHistoryLimit == nil {
+ x.RevisionHistoryLimit = new(int32)
+ }
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*int32)(x.RevisionHistoryLimit)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj17++
+ if yyhl17 {
+ yyb17 = yyj17 > l
+ } else {
+ yyb17 = r.CheckBreak()
+ }
+ if yyb17 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj17-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *StatefulSetStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [7]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.ObservedGeneration != nil
+ yyq2[2] = x.ReadyReplicas != 0
+ yyq2[3] = x.CurrentReplicas != 0
+ yyq2[4] = x.UpdatedReplicas != 0
+ yyq2[5] = x.CurrentRevision != ""
+ yyq2[6] = x.UpdateRevision != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(7)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.ObservedGeneration == nil {
+ r.EncodeNil()
+ } else {
+ yy4 := *x.ObservedGeneration
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(yy4))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("observedGeneration"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ObservedGeneration == nil {
+ r.EncodeNil()
+ } else {
+ yy6 := *x.ObservedGeneration
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(yy6))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ReadyReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readyReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ReadyReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeInt(int64(x.CurrentReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(x.CurrentReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeInt(int64(x.UpdatedReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("updatedReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeInt(int64(x.UpdatedReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.CurrentRevision))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentRevision"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.CurrentRevision))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.UpdateRevision))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("updateRevision"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.UpdateRevision))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *StatefulSetStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *StatefulSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "observedGeneration":
+ if r.TryDecodeAsNil() {
+ if x.ObservedGeneration != nil {
+ x.ObservedGeneration = nil
+ }
+ } else {
+ if x.ObservedGeneration == nil {
+ x.ObservedGeneration = new(int64)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64))
+ }
+ }
+ 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 "readyReplicas":
+ if r.TryDecodeAsNil() {
+ x.ReadyReplicas = 0
+ } else {
+ yyv8 := &x.ReadyReplicas
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "currentReplicas":
+ if r.TryDecodeAsNil() {
+ x.CurrentReplicas = 0
+ } else {
+ yyv10 := &x.CurrentReplicas
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(yyv10)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "updatedReplicas":
+ if r.TryDecodeAsNil() {
+ x.UpdatedReplicas = 0
+ } else {
+ yyv12 := &x.UpdatedReplicas
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int32)(yyv12)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "currentRevision":
+ if r.TryDecodeAsNil() {
+ x.CurrentRevision = ""
+ } else {
+ yyv14 := &x.CurrentRevision
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ case "updateRevision":
+ if r.TryDecodeAsNil() {
+ x.UpdateRevision = ""
+ } else {
+ yyv16 := &x.UpdateRevision
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *StatefulSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj18 int
+ var yyb18 bool
+ var yyhl18 bool = l >= 0
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ObservedGeneration != nil {
+ x.ObservedGeneration = nil
+ }
+ } else {
+ if x.ObservedGeneration == nil {
+ x.ObservedGeneration = new(int64)
+ }
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv21 := &x.Replicas
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int32)(yyv21)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadyReplicas = 0
+ } else {
+ yyv23 := &x.ReadyReplicas
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*int32)(yyv23)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentReplicas = 0
+ } else {
+ yyv25 := &x.CurrentReplicas
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*int32)(yyv25)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UpdatedReplicas = 0
+ } else {
+ yyv27 := &x.UpdatedReplicas
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*int32)(yyv27)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentRevision = ""
+ } else {
+ yyv29 := &x.CurrentRevision
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*string)(yyv29)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UpdateRevision = ""
+ } else {
+ yyv31 := &x.UpdateRevision
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*string)(yyv31)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj18-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *StatefulSetList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceStatefulSet(([]StatefulSet)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceStatefulSet(([]StatefulSet)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *StatefulSetList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *StatefulSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceStatefulSet((*[]StatefulSet)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *StatefulSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceStatefulSet((*[]StatefulSet)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Deployment) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Deployment) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Deployment) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = DeploymentSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = DeploymentStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Deployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = DeploymentSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = DeploymentStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DeploymentSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [9]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Replicas != nil
+ yyq2[1] = x.Selector != nil
+ yyq2[3] = true
+ yyq2[4] = x.MinReadySeconds != 0
+ yyq2[5] = x.RevisionHistoryLimit != nil
+ yyq2[6] = x.Paused != false
+ yyq2[7] = x.RollbackTo != nil
+ yyq2[8] = x.ProgressDeadlineSeconds != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(9)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Replicas == nil {
+ r.EncodeNil()
+ } else {
+ yy4 := *x.Replicas
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(yy4))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Replicas == nil {
+ r.EncodeNil()
+ } else {
+ yy6 := *x.Replicas
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(yy6))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy12 := &x.Template
+ yy12.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("template"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy14 := &x.Template
+ yy14.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yy17 := &x.Strategy
+ yy17.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("strategy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy19 := &x.Strategy
+ yy19.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MinReadySeconds))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("minReadySeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MinReadySeconds))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.RevisionHistoryLimit == nil {
+ r.EncodeNil()
+ } else {
+ yy25 := *x.RevisionHistoryLimit
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeInt(int64(yy25))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("revisionHistoryLimit"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RevisionHistoryLimit == nil {
+ r.EncodeNil()
+ } else {
+ yy27 := *x.RevisionHistoryLimit
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeInt(int64(yy27))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym30 := z.EncBinary()
+ _ = yym30
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Paused))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("paused"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym31 := z.EncBinary()
+ _ = yym31
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Paused))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.RollbackTo == nil {
+ r.EncodeNil()
+ } else {
+ x.RollbackTo.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rollbackTo"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RollbackTo == nil {
+ r.EncodeNil()
+ } else {
+ x.RollbackTo.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ if x.ProgressDeadlineSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy36 := *x.ProgressDeadlineSeconds
+ yym37 := z.EncBinary()
+ _ = yym37
+ if false {
+ } else {
+ r.EncodeInt(int64(yy36))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("progressDeadlineSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ProgressDeadlineSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy38 := *x.ProgressDeadlineSeconds
+ yym39 := z.EncBinary()
+ _ = yym39
+ if false {
+ } else {
+ r.EncodeInt(int64(yy38))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DeploymentSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DeploymentSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "replicas":
+ if r.TryDecodeAsNil() {
+ if x.Replicas != nil {
+ x.Replicas = nil
+ }
+ } else {
+ if x.Replicas == nil {
+ x.Replicas = new(int32)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(x.Replicas)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_v1.LabelSelector)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ case "template":
+ if r.TryDecodeAsNil() {
+ x.Template = pkg3_v1.PodTemplateSpec{}
+ } else {
+ yyv8 := &x.Template
+ yyv8.CodecDecodeSelf(d)
+ }
+ case "strategy":
+ if r.TryDecodeAsNil() {
+ x.Strategy = DeploymentStrategy{}
+ } else {
+ yyv9 := &x.Strategy
+ yyv9.CodecDecodeSelf(d)
+ }
+ case "minReadySeconds":
+ if r.TryDecodeAsNil() {
+ x.MinReadySeconds = 0
+ } else {
+ yyv10 := &x.MinReadySeconds
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(yyv10)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "revisionHistoryLimit":
+ if r.TryDecodeAsNil() {
+ if x.RevisionHistoryLimit != nil {
+ x.RevisionHistoryLimit = nil
+ }
+ } else {
+ if x.RevisionHistoryLimit == nil {
+ x.RevisionHistoryLimit = new(int32)
+ }
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int32)(x.RevisionHistoryLimit)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "paused":
+ if r.TryDecodeAsNil() {
+ x.Paused = false
+ } else {
+ yyv14 := &x.Paused
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*bool)(yyv14)) = r.DecodeBool()
+ }
+ }
+ case "rollbackTo":
+ if r.TryDecodeAsNil() {
+ if x.RollbackTo != nil {
+ x.RollbackTo = nil
+ }
+ } else {
+ if x.RollbackTo == nil {
+ x.RollbackTo = new(RollbackConfig)
+ }
+ x.RollbackTo.CodecDecodeSelf(d)
+ }
+ case "progressDeadlineSeconds":
+ if r.TryDecodeAsNil() {
+ if x.ProgressDeadlineSeconds != nil {
+ x.ProgressDeadlineSeconds = nil
+ }
+ } else {
+ if x.ProgressDeadlineSeconds == nil {
+ x.ProgressDeadlineSeconds = new(int32)
+ }
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int32)(x.ProgressDeadlineSeconds)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj19 int
+ var yyb19 bool
+ var yyhl19 bool = l >= 0
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Replicas != nil {
+ x.Replicas = nil
+ }
+ } else {
+ if x.Replicas == nil {
+ x.Replicas = new(int32)
+ }
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ *((*int32)(x.Replicas)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_v1.LabelSelector)
+ }
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Template = pkg3_v1.PodTemplateSpec{}
+ } else {
+ yyv24 := &x.Template
+ yyv24.CodecDecodeSelf(d)
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Strategy = DeploymentStrategy{}
+ } else {
+ yyv25 := &x.Strategy
+ yyv25.CodecDecodeSelf(d)
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MinReadySeconds = 0
+ } else {
+ yyv26 := &x.MinReadySeconds
+ yym27 := z.DecBinary()
+ _ = yym27
+ if false {
+ } else {
+ *((*int32)(yyv26)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RevisionHistoryLimit != nil {
+ x.RevisionHistoryLimit = nil
+ }
+ } else {
+ if x.RevisionHistoryLimit == nil {
+ x.RevisionHistoryLimit = new(int32)
+ }
+ yym29 := z.DecBinary()
+ _ = yym29
+ if false {
+ } else {
+ *((*int32)(x.RevisionHistoryLimit)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Paused = false
+ } else {
+ yyv30 := &x.Paused
+ yym31 := z.DecBinary()
+ _ = yym31
+ if false {
+ } else {
+ *((*bool)(yyv30)) = r.DecodeBool()
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RollbackTo != nil {
+ x.RollbackTo = nil
+ }
+ } else {
+ if x.RollbackTo == nil {
+ x.RollbackTo = new(RollbackConfig)
+ }
+ x.RollbackTo.CodecDecodeSelf(d)
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ProgressDeadlineSeconds != nil {
+ x.ProgressDeadlineSeconds = nil
+ }
+ } else {
+ if x.ProgressDeadlineSeconds == nil {
+ x.ProgressDeadlineSeconds = new(int32)
+ }
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ *((*int32)(x.ProgressDeadlineSeconds)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj19-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DeploymentRollback) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[3] = len(x.UpdatedAnnotations) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.UpdatedAnnotations == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.UpdatedAnnotations, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("updatedAnnotations"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.UpdatedAnnotations == nil {
+ r.EncodeNil()
+ } else {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.UpdatedAnnotations, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy16 := &x.RollbackTo
+ yy16.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rollbackTo"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy18 := &x.RollbackTo
+ yy18.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DeploymentRollback) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DeploymentRollback) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv8 := &x.Name
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "updatedAnnotations":
+ if r.TryDecodeAsNil() {
+ x.UpdatedAnnotations = nil
+ } else {
+ yyv10 := &x.UpdatedAnnotations
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv10, false, d)
+ }
+ }
+ case "rollbackTo":
+ if r.TryDecodeAsNil() {
+ x.RollbackTo = RollbackConfig{}
+ } else {
+ yyv12 := &x.RollbackTo
+ yyv12.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DeploymentRollback) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv14 := &x.Kind
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv16 := &x.APIVersion
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv18 := &x.Name
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*string)(yyv18)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UpdatedAnnotations = nil
+ } else {
+ yyv20 := &x.UpdatedAnnotations
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv20, false, d)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RollbackTo = RollbackConfig{}
+ } else {
+ yyv22 := &x.RollbackTo
+ yyv22.CodecDecodeSelf(d)
+ }
+ for {
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj13-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *RollbackConfig) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = x.Revision != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Revision))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("revision"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Revision))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RollbackConfig) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RollbackConfig) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "revision":
+ if r.TryDecodeAsNil() {
+ x.Revision = 0
+ } else {
+ yyv4 := &x.Revision
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int64)(yyv4)) = int64(r.DecodeInt(64))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RollbackConfig) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Revision = 0
+ } else {
+ yyv7 := &x.Revision
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*int64)(yyv7)) = int64(r.DecodeInt(64))
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DeploymentStrategy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Type != ""
+ yyq2[1] = x.RollingUpdate != 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_containerArrayElem1234)
+ if yyq2[0] {
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.RollingUpdate == nil {
+ r.EncodeNil()
+ } else {
+ x.RollingUpdate.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rollingUpdate"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RollingUpdate == nil {
+ r.EncodeNil()
+ } else {
+ x.RollingUpdate.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DeploymentStrategy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DeploymentStrategy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "rollingUpdate":
+ if r.TryDecodeAsNil() {
+ if x.RollingUpdate != nil {
+ x.RollingUpdate = nil
+ }
+ } else {
+ if x.RollingUpdate == nil {
+ x.RollingUpdate = new(RollingUpdateDeployment)
+ }
+ x.RollingUpdate.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DeploymentStrategy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv7 := &x.Type
+ yyv7.CodecDecodeSelf(d)
+ }
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RollingUpdate != nil {
+ x.RollingUpdate = nil
+ }
+ } else {
+ if x.RollingUpdate == nil {
+ x.RollingUpdate = new(RollingUpdateDeployment)
+ }
+ x.RollingUpdate.CodecDecodeSelf(d)
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x DeploymentStrategyType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *DeploymentStrategyType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *RollingUpdateDeployment) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.MaxUnavailable != nil
+ yyq2[1] = x.MaxSurge != 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.MaxUnavailable == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.MaxUnavailable) {
+ } else if !yym4 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.MaxUnavailable)
+ } else {
+ z.EncFallback(x.MaxUnavailable)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("maxUnavailable"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.MaxUnavailable == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.MaxUnavailable) {
+ } else if !yym5 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.MaxUnavailable)
+ } else {
+ z.EncFallback(x.MaxUnavailable)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.MaxSurge == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.MaxSurge) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.MaxSurge)
+ } else {
+ z.EncFallback(x.MaxSurge)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("maxSurge"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.MaxSurge == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.MaxSurge) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.MaxSurge)
+ } else {
+ z.EncFallback(x.MaxSurge)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RollingUpdateDeployment) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RollingUpdateDeployment) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "maxUnavailable":
+ if r.TryDecodeAsNil() {
+ if x.MaxUnavailable != nil {
+ x.MaxUnavailable = nil
+ }
+ } else {
+ if x.MaxUnavailable == nil {
+ x.MaxUnavailable = new(pkg5_intstr.IntOrString)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.MaxUnavailable) {
+ } else if !yym5 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.MaxUnavailable)
+ } else {
+ z.DecFallback(x.MaxUnavailable, false)
+ }
+ }
+ case "maxSurge":
+ if r.TryDecodeAsNil() {
+ if x.MaxSurge != nil {
+ x.MaxSurge = nil
+ }
+ } else {
+ if x.MaxSurge == nil {
+ x.MaxSurge = new(pkg5_intstr.IntOrString)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.MaxSurge) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.MaxSurge)
+ } else {
+ z.DecFallback(x.MaxSurge, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RollingUpdateDeployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.MaxUnavailable != nil {
+ x.MaxUnavailable = nil
+ }
+ } else {
+ if x.MaxUnavailable == nil {
+ x.MaxUnavailable = new(pkg5_intstr.IntOrString)
+ }
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.MaxUnavailable) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.MaxUnavailable)
+ } else {
+ z.DecFallback(x.MaxUnavailable, false)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.MaxSurge != nil {
+ x.MaxSurge = nil
+ }
+ } else {
+ if x.MaxSurge == nil {
+ x.MaxSurge = new(pkg5_intstr.IntOrString)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.MaxSurge) {
+ } else if !yym12 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.MaxSurge)
+ } else {
+ z.DecFallback(x.MaxSurge, false)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DeploymentStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.ObservedGeneration != 0
+ yyq2[1] = x.Replicas != 0
+ yyq2[2] = x.UpdatedReplicas != 0
+ yyq2[3] = x.ReadyReplicas != 0
+ yyq2[4] = x.AvailableReplicas != 0
+ yyq2[5] = x.UnavailableReplicas != 0
+ yyq2[6] = len(x.Conditions) != 0
+ yyq2[7] = x.CollisionCount != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ObservedGeneration))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("observedGeneration"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ObservedGeneration))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.UpdatedReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("updatedReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.UpdatedReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ReadyReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readyReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ReadyReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(x.AvailableReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("availableReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(x.AvailableReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeInt(int64(x.UnavailableReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("unavailableReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeInt(int64(x.UnavailableReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ h.encSliceDeploymentCondition(([]DeploymentCondition)(x.Conditions), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("conditions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ h.encSliceDeploymentCondition(([]DeploymentCondition)(x.Conditions), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.CollisionCount == nil {
+ r.EncodeNil()
+ } else {
+ yy25 := *x.CollisionCount
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeInt(int64(yy25))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("collisionCount"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.CollisionCount == nil {
+ r.EncodeNil()
+ } else {
+ yy27 := *x.CollisionCount
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeInt(int64(yy27))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DeploymentStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DeploymentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "observedGeneration":
+ if r.TryDecodeAsNil() {
+ x.ObservedGeneration = 0
+ } else {
+ yyv4 := &x.ObservedGeneration
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int64)(yyv4)) = int64(r.DecodeInt(64))
+ }
+ }
+ 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 "updatedReplicas":
+ if r.TryDecodeAsNil() {
+ x.UpdatedReplicas = 0
+ } else {
+ yyv8 := &x.UpdatedReplicas
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "readyReplicas":
+ if r.TryDecodeAsNil() {
+ x.ReadyReplicas = 0
+ } else {
+ yyv10 := &x.ReadyReplicas
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(yyv10)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "availableReplicas":
+ if r.TryDecodeAsNil() {
+ x.AvailableReplicas = 0
+ } else {
+ yyv12 := &x.AvailableReplicas
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int32)(yyv12)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "unavailableReplicas":
+ if r.TryDecodeAsNil() {
+ x.UnavailableReplicas = 0
+ } else {
+ yyv14 := &x.UnavailableReplicas
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*int32)(yyv14)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "conditions":
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv16 := &x.Conditions
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ h.decSliceDeploymentCondition((*[]DeploymentCondition)(yyv16), d)
+ }
+ }
+ case "collisionCount":
+ if r.TryDecodeAsNil() {
+ if x.CollisionCount != nil {
+ x.CollisionCount = nil
+ }
+ } else {
+ if x.CollisionCount == nil {
+ x.CollisionCount = new(int64)
+ }
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*int64)(x.CollisionCount)) = int64(r.DecodeInt(64))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DeploymentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj20 int
+ var yyb20 bool
+ var yyhl20 bool = l >= 0
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObservedGeneration = 0
+ } else {
+ yyv21 := &x.ObservedGeneration
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int64)(yyv21)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv23 := &x.Replicas
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*int32)(yyv23)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UpdatedReplicas = 0
+ } else {
+ yyv25 := &x.UpdatedReplicas
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*int32)(yyv25)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadyReplicas = 0
+ } else {
+ yyv27 := &x.ReadyReplicas
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*int32)(yyv27)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.AvailableReplicas = 0
+ } else {
+ yyv29 := &x.AvailableReplicas
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*int32)(yyv29)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UnavailableReplicas = 0
+ } else {
+ yyv31 := &x.UnavailableReplicas
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*int32)(yyv31)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv33 := &x.Conditions
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ h.decSliceDeploymentCondition((*[]DeploymentCondition)(yyv33), d)
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.CollisionCount != nil {
+ x.CollisionCount = nil
+ }
+ } else {
+ if x.CollisionCount == nil {
+ x.CollisionCount = new(int64)
+ }
+ yym36 := z.DecBinary()
+ _ = yym36
+ if false {
+ } else {
+ *((*int64)(x.CollisionCount)) = int64(r.DecodeInt(64))
+ }
+ }
+ for {
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj20-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x DeploymentConditionType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *DeploymentConditionType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *DeploymentCondition) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = true
+ yyq2[3] = true
+ yyq2[4] = x.Reason != ""
+ yyq2[5] = x.Message != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yysf7 := &x.Status
+ yysf7.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yysf8 := &x.Status
+ yysf8.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy10 := &x.LastUpdateTime
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy10) {
+ } else if yym11 {
+ z.EncBinaryMarshal(yy10)
+ } else if !yym11 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy10)
+ } else {
+ z.EncFallback(yy10)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastUpdateTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.LastUpdateTime
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if yym13 {
+ z.EncBinaryMarshal(yy12)
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.LastTransitionTime
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy15) {
+ } else if yym16 {
+ z.EncBinaryMarshal(yy15)
+ } else if !yym16 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy15)
+ } else {
+ z.EncFallback(yy15)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.LastTransitionTime
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy17) {
+ } else if yym18 {
+ z.EncBinaryMarshal(yy17)
+ } else if !yym18 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy17)
+ } else {
+ z.EncFallback(yy17)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DeploymentCondition) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DeploymentCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "lastUpdateTime":
+ if r.TryDecodeAsNil() {
+ x.LastUpdateTime = pkg1_v1.Time{}
+ } else {
+ yyv6 := &x.LastUpdateTime
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if yym7 {
+ z.DecBinaryUnmarshal(yyv6)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ case "lastTransitionTime":
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg1_v1.Time{}
+ } else {
+ yyv8 := &x.LastTransitionTime
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv8) {
+ } else if yym9 {
+ z.DecBinaryUnmarshal(yyv8)
+ } else if !yym9 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv8)
+ } else {
+ z.DecFallback(yyv8, false)
+ }
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv10 := &x.Reason
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv12 := &x.Message
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DeploymentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv15 := &x.Type
+ yyv15.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv16 := &x.Status
+ yyv16.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastUpdateTime = pkg1_v1.Time{}
+ } else {
+ yyv17 := &x.LastUpdateTime
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv17) {
+ } else if yym18 {
+ z.DecBinaryUnmarshal(yyv17)
+ } else if !yym18 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv17)
+ } else {
+ z.DecFallback(yyv17, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg1_v1.Time{}
+ } else {
+ yyv19 := &x.LastTransitionTime
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv19) {
+ } else if yym20 {
+ z.DecBinaryUnmarshal(yyv19)
+ } else if !yym20 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv19)
+ } else {
+ z.DecFallback(yyv19, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv21 := &x.Reason
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv23 := &x.Message
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*string)(yyv23)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DeploymentList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceDeployment(([]Deployment)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceDeployment(([]Deployment)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DeploymentList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DeploymentList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceDeployment((*[]Deployment)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DeploymentList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceDeployment((*[]Deployment)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ControllerRevision) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Data
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy15) {
+ } else if !yym16 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy15)
+ } else {
+ z.EncFallback(yy15)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("data"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Data
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy17) {
+ } else if !yym18 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy17)
+ } else {
+ z.EncFallback(yy17)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Revision))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("revision"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Revision))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ControllerRevision) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ControllerRevision) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "data":
+ if r.TryDecodeAsNil() {
+ x.Data = pkg6_runtime.RawExtension{}
+ } else {
+ yyv10 := &x.Data
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv10) {
+ } else if !yym11 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv10)
+ } else {
+ z.DecFallback(yyv10, false)
+ }
+ }
+ case "revision":
+ if r.TryDecodeAsNil() {
+ x.Revision = 0
+ } else {
+ yyv12 := &x.Revision
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int64)(yyv12)) = int64(r.DecodeInt(64))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ControllerRevision) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv15 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv17 := &x.APIVersion
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg1_v1.ObjectMeta{}
+ } else {
+ yyv19 := &x.ObjectMeta
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv19) {
+ } else {
+ z.DecFallback(yyv19, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Data = pkg6_runtime.RawExtension{}
+ } else {
+ yyv21 := &x.Data
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv21) {
+ } else if !yym22 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv21)
+ } else {
+ z.DecFallback(yyv21, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Revision = 0
+ } else {
+ yyv23 := &x.Revision
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*int64)(yyv23)) = int64(r.DecodeInt(64))
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ControllerRevisionList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceControllerRevision(([]ControllerRevision)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceControllerRevision(([]ControllerRevision)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ControllerRevisionList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ControllerRevisionList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceControllerRevision((*[]ControllerRevision)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ControllerRevisionList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceControllerRevision((*[]ControllerRevision)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encSlicev1_PersistentVolumeClaim(v []pkg3_v1.PersistentVolumeClaim, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg3_v1.PersistentVolumeClaim, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []pkg3_v1.PersistentVolumeClaim{}
+ 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, 384)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]pkg3_v1.PersistentVolumeClaim, yyrl1)
+ }
+ } else {
+ yyv1 = make([]pkg3_v1.PersistentVolumeClaim, 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] = pkg3_v1.PersistentVolumeClaim{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, pkg3_v1.PersistentVolumeClaim{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = pkg3_v1.PersistentVolumeClaim{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, pkg3_v1.PersistentVolumeClaim{}) // var yyz1 pkg3_v1.PersistentVolumeClaim
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = pkg3_v1.PersistentVolumeClaim{}
+ } 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 = []pkg3_v1.PersistentVolumeClaim{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceStatefulSet(v []StatefulSet, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceStatefulSet(v *[]StatefulSet, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []StatefulSet{}
+ 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, 984)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]StatefulSet, yyrl1)
+ }
+ } else {
+ yyv1 = make([]StatefulSet, 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] = StatefulSet{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, StatefulSet{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = StatefulSet{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, StatefulSet{}) // var yyz1 StatefulSet
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = StatefulSet{}
+ } 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 = []StatefulSet{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceDeploymentCondition(v []DeploymentCondition, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceDeploymentCondition(v *[]DeploymentCondition, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []DeploymentCondition{}
+ 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, 112)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]DeploymentCondition, yyrl1)
+ }
+ } else {
+ yyv1 = make([]DeploymentCondition, 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] = DeploymentCondition{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, DeploymentCondition{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = DeploymentCondition{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, DeploymentCondition{}) // var yyz1 DeploymentCondition
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = DeploymentCondition{}
+ } 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 = []DeploymentCondition{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceDeployment(v []Deployment, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceDeployment(v *[]Deployment, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Deployment{}
+ 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, 968)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Deployment, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Deployment, 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] = Deployment{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Deployment{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Deployment{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Deployment{}) // var yyz1 Deployment
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Deployment{}
+ } 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 = []Deployment{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceControllerRevision(v []ControllerRevision, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceControllerRevision(v *[]ControllerRevision, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ControllerRevision{}
+ 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, 312)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ControllerRevision, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ControllerRevision, 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] = ControllerRevision{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ControllerRevision{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ControllerRevision{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ControllerRevision{}) // var yyz1 ControllerRevision
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ControllerRevision{}
+ } 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 = []ControllerRevision{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/types.go
new file mode 100644
index 000000000..3cbfd994c
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/types.go
@@ -0,0 +1,516 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/intstr"
+ "k8s.io/kubernetes/pkg/api/v1"
+)
+
+const (
+ // StatefulSetInitAnnotation if present, and set to false, indicates that a Pod's readiness should be ignored.
+ StatefulSetInitAnnotation = "pod.alpha.kubernetes.io/initialized"
+ ControllerRevisionHashLabelKey = "controller-revision-hash"
+ StatefulSetRevisionLabel = ControllerRevisionHashLabelKey
+)
+
+// ScaleSpec describes the attributes of a scale subresource
+type ScaleSpec struct {
+ // desired number of instances for the scaled object.
+ // +optional
+ Replicas int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
+}
+
+// ScaleStatus represents the current status of a scale subresource.
+type ScaleStatus struct {
+ // actual number of observed instances of the scaled object.
+ Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"`
+
+ // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
+ // +optional
+ Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,2,rep,name=selector"`
+
+ // label selector for pods that should match the replicas count. This is a serializated
+ // version of both map-based and more expressive set-based selectors. This is done to
+ // avoid introspection in the clients. The string will be in the same format as the
+ // query-param syntax. If the target type only supports map-based selectors, both this
+ // field and map-based selector field are populated.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ TargetSelector string `json:"targetSelector,omitempty" protobuf:"bytes,3,opt,name=targetSelector"`
+}
+
+// +genclient=true
+// +noMethods=true
+
+// Scale represents a scaling request for a resource.
+type Scale struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
+ // +optional
+ Spec ScaleSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.
+ // +optional
+ Status ScaleStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// +genclient=true
+
+// StatefulSet represents a set of pods with consistent identities.
+// Identities are defined as:
+// - Network: A single stable DNS and hostname.
+// - Storage: As many VolumeClaims as requested.
+// The StatefulSet guarantees that a given network identity will always
+// map to the same storage identity.
+type StatefulSet struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines the desired identities of pods in this set.
+ // +optional
+ Spec StatefulSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is the current status of Pods in this StatefulSet. This data
+ // may be out of date by some window of time.
+ // +optional
+ Status StatefulSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// PodManagementPolicyType defines the policy for creating pods under a stateful set.
+type PodManagementPolicyType string
+
+const (
+ // OrderedReadyPodManagement will create pods in strictly increasing order on
+ // scale up and strictly decreasing order on scale down, progressing only when
+ // the previous pod is ready or terminated. At most one pod will be changed
+ // at any time.
+ OrderedReadyPodManagement PodManagementPolicyType = "OrderedReady"
+ // ParallelPodManagement will create and delete pods as soon as the stateful set
+ // replica count is changed, and will not wait for pods to be ready or complete
+ // termination.
+ ParallelPodManagement = "Parallel"
+)
+
+// StatefulSetUpdateStrategy indicates the strategy that the StatefulSet
+// controller will use to perform updates. It includes any additional parameters
+// necessary to perform the update for the indicated strategy.
+type StatefulSetUpdateStrategy struct {
+ // Type indicates the type of the StatefulSetUpdateStrategy.
+ Type StatefulSetUpdateStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=StatefulSetStrategyType"`
+ // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.
+ RollingUpdate *RollingUpdateStatefulSetStrategy `json:"rollingUpdate,omitempty" protobuf:"bytes,2,opt,name=rollingUpdate"`
+}
+
+// StatefulSetUpdateStrategyType is a string enumeration type that enumerates
+// all possible update strategies for the StatefulSet controller.
+type StatefulSetUpdateStrategyType string
+
+const (
+ // RollingUpdateStatefulSetStrategyType indicates that update will be
+ // applied to all Pods in the StatefulSet with respect to the StatefulSet
+ // ordering constraints. When a scale operation is performed with this
+ // strategy, new Pods will be created from the specification version indicated
+ // by the StatefulSet's updateRevision.
+ RollingUpdateStatefulSetStrategyType = "RollingUpdate"
+ // OnDeleteStatefulSetStrategyType triggers the legacy behavior. Version
+ // tracking and ordered rolling restarts are disabled. Pods are recreated
+ // from the StatefulSetSpec when they are manually deleted. When a scale
+ // operation is performed with this strategy,specification version indicated
+ // by the StatefulSet's currentRevision.
+ OnDeleteStatefulSetStrategyType = "OnDelete"
+)
+
+// RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
+type RollingUpdateStatefulSetStrategy struct {
+ // Partition indicates the ordinal at which the StatefulSet should be
+ // partitioned.
+ Partition *int32 `json:"partition,omitempty" protobuf:"varint,1,opt,name=partition"`
+}
+
+// A StatefulSetSpec is the specification of a StatefulSet.
+type StatefulSetSpec struct {
+ // replicas is the desired number of replicas of the given Template.
+ // These are replicas in the sense that they are instantiations of the
+ // same Template, but individual replicas also have a consistent identity.
+ // If unspecified, defaults to 1.
+ // TODO: Consider a rename of this field.
+ // +optional
+ Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
+
+ // selector is a label query over pods that should match the replica count.
+ // If empty, defaulted to labels on the pod template.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
+
+ // template is the object that describes the pod that will be created if
+ // insufficient replicas are detected. Each pod stamped out by the StatefulSet
+ // will fulfill this Template, but have a unique identity from the rest
+ // of the StatefulSet.
+ Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"`
+
+ // volumeClaimTemplates is a list of claims that pods are allowed to reference.
+ // The StatefulSet controller is responsible for mapping network identities to
+ // claims in a way that maintains the identity of a pod. Every claim in
+ // this list must have at least one matching (by name) volumeMount in one
+ // container in the template. A claim in this list takes precedence over
+ // any volumes in the template, with the same name.
+ // TODO: Define the behavior if a claim already exists with the same name.
+ // +optional
+ VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty" protobuf:"bytes,4,rep,name=volumeClaimTemplates"`
+
+ // serviceName is the name of the service that governs this StatefulSet.
+ // This service must exist before the StatefulSet, and is responsible for
+ // the network identity of the set. Pods get DNS/hostnames that follow the
+ // pattern: pod-specific-string.serviceName.default.svc.cluster.local
+ // where "pod-specific-string" is managed by the StatefulSet controller.
+ ServiceName string `json:"serviceName" protobuf:"bytes,5,opt,name=serviceName"`
+
+ // podManagementPolicy controls how pods are created during initial scale up,
+ // when replacing pods on nodes, or when scaling down. The default policy is
+ // `OrderedReady`, where pods are created in increasing order (pod-0, then
+ // pod-1, etc) and the controller will wait until each pod is ready before
+ // continuing. When scaling down, the pods are removed in the opposite order.
+ // The alternative policy is `Parallel` which will create pods in parallel
+ // to match the desired scale without waiting, and on scale down will delete
+ // all pods at once.
+ // +optional
+ PodManagementPolicy PodManagementPolicyType `json:"podManagementPolicy,omitempty" protobuf:"bytes,6,opt,name=podManagementPolicy,casttype=PodManagementPolicyType"`
+
+ // updateStrategy indicates the StatefulSetUpdateStrategy that will be
+ // employed to update Pods in the StatefulSet when a revision is made to
+ // Template.
+ UpdateStrategy StatefulSetUpdateStrategy `json:"updateStrategy,omitempty" protobuf:"bytes,7,opt,name=updateStrategy"`
+
+ // revisionHistoryLimit is the maximum number of revisions that will
+ // be maintained in the StatefulSet's revision history. The revision history
+ // consists of all revisions not represented by a currently applied
+ // StatefulSetSpec version. The default value is 10.
+ RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,8,opt,name=revisionHistoryLimit"`
+}
+
+// StatefulSetStatus represents the current state of a StatefulSet.
+type StatefulSetStatus struct {
+ // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the
+ // StatefulSet's generation, which is updated on mutation by the API Server.
+ // +optional
+ ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
+
+ // replicas is the number of Pods created by the StatefulSet controller.
+ Replicas int32 `json:"replicas" protobuf:"varint,2,opt,name=replicas"`
+
+ // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.
+ ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,3,opt,name=readyReplicas"`
+
+ // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
+ // indicated by currentRevision.
+ CurrentReplicas int32 `json:"currentReplicas,omitempty" protobuf:"varint,4,opt,name=currentReplicas"`
+
+ // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
+ // indicated by updateRevision.
+ UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,5,opt,name=updatedReplicas"`
+
+ // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the
+ // sequence [0,currentReplicas).
+ CurrentRevision string `json:"currentRevision,omitempty" protobuf:"bytes,6,opt,name=currentRevision"`
+
+ // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence
+ // [replicas-updatedReplicas,replicas)
+ UpdateRevision string `json:"updateRevision,omitempty" protobuf:"bytes,7,opt,name=updateRevision"`
+}
+
+// StatefulSetList is a collection of StatefulSets.
+type StatefulSetList struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+ Items []StatefulSet `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// +genclient=true
+
+// Deployment enables declarative updates for Pods and ReplicaSets.
+type Deployment struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Specification of the desired behavior of the Deployment.
+ // +optional
+ Spec DeploymentSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Most recently observed status of the Deployment.
+ // +optional
+ Status DeploymentStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// DeploymentSpec is the specification of the desired behavior of the Deployment.
+type DeploymentSpec struct {
+ // Number of desired pods. This is a pointer to distinguish between explicit
+ // zero and not specified. Defaults to 1.
+ // +optional
+ Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
+
+ // Label selector for pods. Existing ReplicaSets whose pods are
+ // selected by this will be the ones affected by this deployment.
+ // +optional
+ Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
+
+ // Template describes the pods that will be created.
+ Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"`
+
+ // The deployment strategy to use to replace existing pods with new ones.
+ // +optional
+ Strategy DeploymentStrategy `json:"strategy,omitempty" protobuf:"bytes,4,opt,name=strategy"`
+
+ // Minimum number of seconds for which a newly created pod should be ready
+ // without any of its container crashing, for it to be considered available.
+ // Defaults to 0 (pod will be considered available as soon as it is ready)
+ // +optional
+ MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,5,opt,name=minReadySeconds"`
+
+ // The number of old ReplicaSets to retain to allow rollback.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ // Defaults to 2.
+ // +optional
+ RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,6,opt,name=revisionHistoryLimit"`
+
+ // Indicates that the deployment is paused.
+ // +optional
+ Paused bool `json:"paused,omitempty" protobuf:"varint,7,opt,name=paused"`
+
+ // The config this deployment is rolling back to. Will be cleared after rollback is done.
+ // +optional
+ RollbackTo *RollbackConfig `json:"rollbackTo,omitempty" protobuf:"bytes,8,opt,name=rollbackTo"`
+
+ // The maximum time in seconds for a deployment to make progress before it
+ // is considered to be failed. The deployment controller will continue to
+ // process failed deployments and a condition with a ProgressDeadlineExceeded
+ // reason will be surfaced in the deployment status. Once autoRollback is
+ // implemented, the deployment controller will automatically rollback failed
+ // deployments. Note that progress will not be estimated during the time a
+ // deployment is paused. Defaults to 600s.
+ ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty" protobuf:"varint,9,opt,name=progressDeadlineSeconds"`
+}
+
+// DeploymentRollback stores the information required to rollback a deployment.
+type DeploymentRollback struct {
+ metav1.TypeMeta `json:",inline"`
+ // Required: This must match the Name of a deployment.
+ Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
+ // The annotations to be updated to a deployment
+ // +optional
+ UpdatedAnnotations map[string]string `json:"updatedAnnotations,omitempty" protobuf:"bytes,2,rep,name=updatedAnnotations"`
+ // The config of this deployment rollback.
+ RollbackTo RollbackConfig `json:"rollbackTo" protobuf:"bytes,3,opt,name=rollbackTo"`
+}
+
+type RollbackConfig struct {
+ // The revision to rollback to. If set to 0, rollback to the last revision.
+ // +optional
+ Revision int64 `json:"revision,omitempty" protobuf:"varint,1,opt,name=revision"`
+}
+
+const (
+ // DefaultDeploymentUniqueLabelKey is the default key of the selector that is added
+ // to existing RCs (and label key that is added to its pods) to prevent the existing RCs
+ // to select new pods (and old pods being select by new RC).
+ DefaultDeploymentUniqueLabelKey string = "pod-template-hash"
+)
+
+// DeploymentStrategy describes how to replace existing pods with new ones.
+type DeploymentStrategy struct {
+ // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
+ // +optional
+ Type DeploymentStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=DeploymentStrategyType"`
+
+ // Rolling update config params. Present only if DeploymentStrategyType =
+ // RollingUpdate.
+ //---
+ // TODO: Update this to follow our convention for oneOf, whatever we decide it
+ // to be.
+ // +optional
+ RollingUpdate *RollingUpdateDeployment `json:"rollingUpdate,omitempty" protobuf:"bytes,2,opt,name=rollingUpdate"`
+}
+
+type DeploymentStrategyType string
+
+const (
+ // Kill all existing pods before creating new ones.
+ RecreateDeploymentStrategyType DeploymentStrategyType = "Recreate"
+
+ // Replace the old RCs by new one using rolling update i.e gradually scale down the old RCs and scale up the new one.
+ RollingUpdateDeploymentStrategyType DeploymentStrategyType = "RollingUpdate"
+)
+
+// Spec to control the desired behavior of rolling update.
+type RollingUpdateDeployment struct {
+ // The maximum number of pods that can be unavailable during the update.
+ // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
+ // Absolute number is calculated from percentage by rounding down.
+ // This can not be 0 if MaxSurge is 0.
+ // Defaults to 25%.
+ // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods
+ // immediately when the rolling update starts. Once new pods are ready, old RC
+ // can be scaled down further, followed by scaling up the new RC, ensuring
+ // that the total number of pods available at all times during the update is at
+ // least 70% of desired pods.
+ // +optional
+ MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,1,opt,name=maxUnavailable"`
+
+ // The maximum number of pods that can be scheduled above the desired number of
+ // pods.
+ // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
+ // This can not be 0 if MaxUnavailable is 0.
+ // Absolute number is calculated from percentage by rounding up.
+ // Defaults to 25%.
+ // Example: when this is set to 30%, the new RC can be scaled up immediately when
+ // the rolling update starts, such that the total number of old and new pods do not exceed
+ // 130% of desired pods. Once old pods have been killed,
+ // new RC can be scaled up further, ensuring that total number of pods running
+ // at any time during the update is atmost 130% of desired pods.
+ // +optional
+ MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty" protobuf:"bytes,2,opt,name=maxSurge"`
+}
+
+// DeploymentStatus is the most recently observed status of the Deployment.
+type DeploymentStatus struct {
+ // The generation observed by the deployment controller.
+ // +optional
+ ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
+
+ // Total number of non-terminated pods targeted by this deployment (their labels match the selector).
+ // +optional
+ Replicas int32 `json:"replicas,omitempty" protobuf:"varint,2,opt,name=replicas"`
+
+ // Total number of non-terminated pods targeted by this deployment that have the desired template spec.
+ // +optional
+ UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,3,opt,name=updatedReplicas"`
+
+ // Total number of ready pods targeted by this deployment.
+ // +optional
+ ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,7,opt,name=readyReplicas"`
+
+ // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
+ // +optional
+ AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,4,opt,name=availableReplicas"`
+
+ // Total number of unavailable pods targeted by this deployment.
+ // +optional
+ UnavailableReplicas int32 `json:"unavailableReplicas,omitempty" protobuf:"varint,5,opt,name=unavailableReplicas"`
+
+ // Represents the latest available observations of a deployment's current state.
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ Conditions []DeploymentCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"`
+
+ // Count of hash collisions for the Deployment. The Deployment controller uses this
+ // field as a collision avoidance mechanism when it needs to create the name for the
+ // newest ReplicaSet.
+ // +optional
+ CollisionCount *int64 `json:"collisionCount,omitempty" protobuf:"varint,8,opt,name=collisionCount"`
+}
+
+type DeploymentConditionType string
+
+// These are valid conditions of a deployment.
+const (
+ // Available means the deployment is available, ie. at least the minimum available
+ // replicas required are up and running for at least minReadySeconds.
+ DeploymentAvailable DeploymentConditionType = "Available"
+ // Progressing means the deployment is progressing. Progress for a deployment is
+ // considered when a new replica set is created or adopted, and when new pods scale
+ // up or old pods scale down. Progress is not estimated for paused deployments or
+ // when progressDeadlineSeconds is not specified.
+ DeploymentProgressing DeploymentConditionType = "Progressing"
+ // ReplicaFailure is added in a deployment when one of its pods fails to be created
+ // or deleted.
+ DeploymentReplicaFailure DeploymentConditionType = "ReplicaFailure"
+)
+
+// DeploymentCondition describes the state of a deployment at a certain point.
+type DeploymentCondition struct {
+ // Type of deployment condition.
+ Type DeploymentConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=DeploymentConditionType"`
+ // Status of the condition, one of True, False, Unknown.
+ Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"`
+ // The last time this condition was updated.
+ LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,6,opt,name=lastUpdateTime"`
+ // Last time the condition transitioned from one status to another.
+ LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,7,opt,name=lastTransitionTime"`
+ // The reason for the condition's last transition.
+ Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
+ // A human readable message indicating details about the transition.
+ Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
+}
+
+// DeploymentList is a list of Deployments.
+type DeploymentList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of Deployments.
+ Items []Deployment `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// +genclient=true
+
+// ControllerRevision implements an immutable snapshot of state data. Clients
+// are responsible for serializing and deserializing the objects that contain
+// their internal state.
+// Once a ControllerRevision has been successfully created, it can not be updated.
+// The API Server will fail validation of all requests that attempt to mutate
+// the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both
+// the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However,
+// it may be subject to name and representation changes in future releases, and clients should not
+// depend on its stability. It is primarily for internal use by controllers.
+type ControllerRevision struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Data is the serialized representation of the state.
+ Data runtime.RawExtension `json:"data,omitempty" protobuf:"bytes,2,opt,name=data"`
+
+ // Revision indicates the revision of the state represented by Data.
+ Revision int64 `json:"revision" protobuf:"varint,3,opt,name=revision"`
+}
+
+// ControllerRevisionList is a resource containing a list of ControllerRevision objects.
+type ControllerRevisionList struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of ControllerRevisions
+ Items []ControllerRevision `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..00d1a617f
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/types_swagger_doc_generated.go
@@ -0,0 +1,257 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_ControllerRevision = map[string]string{
+ "": "ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "data": "Data is the serialized representation of the state.",
+ "revision": "Revision indicates the revision of the state represented by Data.",
+}
+
+func (ControllerRevision) SwaggerDoc() map[string]string {
+ return map_ControllerRevision
+}
+
+var map_ControllerRevisionList = map[string]string{
+ "": "ControllerRevisionList is a resource containing a list of ControllerRevision objects.",
+ "metadata": "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "items": "Items is the list of ControllerRevisions",
+}
+
+func (ControllerRevisionList) SwaggerDoc() map[string]string {
+ return map_ControllerRevisionList
+}
+
+var map_Deployment = map[string]string{
+ "": "Deployment enables declarative updates for Pods and ReplicaSets.",
+ "metadata": "Standard object metadata.",
+ "spec": "Specification of the desired behavior of the Deployment.",
+ "status": "Most recently observed status of the Deployment.",
+}
+
+func (Deployment) SwaggerDoc() map[string]string {
+ return map_Deployment
+}
+
+var map_DeploymentCondition = map[string]string{
+ "": "DeploymentCondition describes the state of a deployment at a certain point.",
+ "type": "Type of deployment condition.",
+ "status": "Status of the condition, one of True, False, Unknown.",
+ "lastUpdateTime": "The last time this condition was updated.",
+ "lastTransitionTime": "Last time the condition transitioned from one status to another.",
+ "reason": "The reason for the condition's last transition.",
+ "message": "A human readable message indicating details about the transition.",
+}
+
+func (DeploymentCondition) SwaggerDoc() map[string]string {
+ return map_DeploymentCondition
+}
+
+var map_DeploymentList = map[string]string{
+ "": "DeploymentList is a list of Deployments.",
+ "metadata": "Standard list metadata.",
+ "items": "Items is the list of Deployments.",
+}
+
+func (DeploymentList) SwaggerDoc() map[string]string {
+ return map_DeploymentList
+}
+
+var map_DeploymentRollback = map[string]string{
+ "": "DeploymentRollback stores the information required to rollback a deployment.",
+ "name": "Required: This must match the Name of a deployment.",
+ "updatedAnnotations": "The annotations to be updated to a deployment",
+ "rollbackTo": "The config of this deployment rollback.",
+}
+
+func (DeploymentRollback) SwaggerDoc() map[string]string {
+ return map_DeploymentRollback
+}
+
+var map_DeploymentSpec = map[string]string{
+ "": "DeploymentSpec is the specification of the desired behavior of the Deployment.",
+ "replicas": "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.",
+ "selector": "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.",
+ "template": "Template describes the pods that will be created.",
+ "strategy": "The deployment strategy to use to replace existing pods with new ones.",
+ "minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)",
+ "revisionHistoryLimit": "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 2.",
+ "paused": "Indicates that the deployment is paused.",
+ "rollbackTo": "The config this deployment is rolling back to. Will be cleared after rollback is done.",
+ "progressDeadlineSeconds": "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Once autoRollback is implemented, the deployment controller will automatically rollback failed deployments. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.",
+}
+
+func (DeploymentSpec) SwaggerDoc() map[string]string {
+ return map_DeploymentSpec
+}
+
+var map_DeploymentStatus = map[string]string{
+ "": "DeploymentStatus is the most recently observed status of the Deployment.",
+ "observedGeneration": "The generation observed by the deployment controller.",
+ "replicas": "Total number of non-terminated pods targeted by this deployment (their labels match the selector).",
+ "updatedReplicas": "Total number of non-terminated pods targeted by this deployment that have the desired template spec.",
+ "readyReplicas": "Total number of ready pods targeted by this deployment.",
+ "availableReplicas": "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.",
+ "unavailableReplicas": "Total number of unavailable pods targeted by this deployment.",
+ "conditions": "Represents the latest available observations of a deployment's current state.",
+ "collisionCount": "Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.",
+}
+
+func (DeploymentStatus) SwaggerDoc() map[string]string {
+ return map_DeploymentStatus
+}
+
+var map_DeploymentStrategy = map[string]string{
+ "": "DeploymentStrategy describes how to replace existing pods with new ones.",
+ "type": "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.",
+ "rollingUpdate": "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.",
+}
+
+func (DeploymentStrategy) SwaggerDoc() map[string]string {
+ return map_DeploymentStrategy
+}
+
+var map_RollbackConfig = map[string]string{
+ "revision": "The revision to rollback to. If set to 0, rollback to the last revision.",
+}
+
+func (RollbackConfig) SwaggerDoc() map[string]string {
+ return map_RollbackConfig
+}
+
+var map_RollingUpdateDeployment = map[string]string{
+ "": "Spec to control the desired behavior of rolling update.",
+ "maxUnavailable": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.",
+ "maxSurge": "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.",
+}
+
+func (RollingUpdateDeployment) SwaggerDoc() map[string]string {
+ return map_RollingUpdateDeployment
+}
+
+var map_RollingUpdateStatefulSetStrategy = map[string]string{
+ "": "RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.",
+ "partition": "Partition indicates the ordinal at which the StatefulSet should be partitioned.",
+}
+
+func (RollingUpdateStatefulSetStrategy) SwaggerDoc() map[string]string {
+ return map_RollingUpdateStatefulSetStrategy
+}
+
+var map_Scale = map[string]string{
+ "": "Scale represents a scaling request for a resource.",
+ "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.",
+ "spec": "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.",
+ "status": "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.",
+}
+
+func (Scale) SwaggerDoc() map[string]string {
+ return map_Scale
+}
+
+var map_ScaleSpec = map[string]string{
+ "": "ScaleSpec describes the attributes of a scale subresource",
+ "replicas": "desired number of instances for the scaled object.",
+}
+
+func (ScaleSpec) SwaggerDoc() map[string]string {
+ return map_ScaleSpec
+}
+
+var map_ScaleStatus = map[string]string{
+ "": "ScaleStatus represents the current status of a scale subresource.",
+ "replicas": "actual number of observed instances of the scaled object.",
+ "selector": "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors",
+ "targetSelector": "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
+}
+
+func (ScaleStatus) SwaggerDoc() map[string]string {
+ return map_ScaleStatus
+}
+
+var map_StatefulSet = map[string]string{
+ "": "StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity.",
+ "spec": "Spec defines the desired identities of pods in this set.",
+ "status": "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.",
+}
+
+func (StatefulSet) SwaggerDoc() map[string]string {
+ return map_StatefulSet
+}
+
+var map_StatefulSetList = map[string]string{
+ "": "StatefulSetList is a collection of StatefulSets.",
+}
+
+func (StatefulSetList) SwaggerDoc() map[string]string {
+ return map_StatefulSetList
+}
+
+var map_StatefulSetSpec = map[string]string{
+ "": "A StatefulSetSpec is the specification of a StatefulSet.",
+ "replicas": "replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.",
+ "selector": "selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
+ "template": "template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.",
+ "volumeClaimTemplates": "volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.",
+ "serviceName": "serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.",
+ "podManagementPolicy": "podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.",
+ "updateStrategy": "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.",
+ "revisionHistoryLimit": "revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.",
+}
+
+func (StatefulSetSpec) SwaggerDoc() map[string]string {
+ return map_StatefulSetSpec
+}
+
+var map_StatefulSetStatus = map[string]string{
+ "": "StatefulSetStatus represents the current state of a StatefulSet.",
+ "observedGeneration": "observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server.",
+ "replicas": "replicas is the number of Pods created by the StatefulSet controller.",
+ "readyReplicas": "readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.",
+ "currentReplicas": "currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.",
+ "updatedReplicas": "updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision.",
+ "currentRevision": "currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).",
+ "updateRevision": "updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)",
+}
+
+func (StatefulSetStatus) SwaggerDoc() map[string]string {
+ return map_StatefulSetStatus
+}
+
+var map_StatefulSetUpdateStrategy = map[string]string{
+ "": "StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.",
+ "type": "Type indicates the type of the StatefulSetUpdateStrategy.",
+ "rollingUpdate": "RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.",
+}
+
+func (StatefulSetUpdateStrategy) SwaggerDoc() map[string]string {
+ return map_StatefulSetUpdateStrategy
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/zz_generated.conversion.go
new file mode 100644
index 000000000..32ff48315
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/zz_generated.conversion.go
@@ -0,0 +1,322 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api "k8s.io/kubernetes/pkg/api"
+ api_v1 "k8s.io/kubernetes/pkg/api/v1"
+ apps "k8s.io/kubernetes/pkg/apis/apps"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1beta1_ControllerRevision_To_apps_ControllerRevision,
+ Convert_apps_ControllerRevision_To_v1beta1_ControllerRevision,
+ Convert_v1beta1_ControllerRevisionList_To_apps_ControllerRevisionList,
+ Convert_apps_ControllerRevisionList_To_v1beta1_ControllerRevisionList,
+ Convert_v1beta1_RollingUpdateStatefulSetStrategy_To_apps_RollingUpdateStatefulSetStrategy,
+ Convert_apps_RollingUpdateStatefulSetStrategy_To_v1beta1_RollingUpdateStatefulSetStrategy,
+ Convert_v1beta1_StatefulSet_To_apps_StatefulSet,
+ Convert_apps_StatefulSet_To_v1beta1_StatefulSet,
+ Convert_v1beta1_StatefulSetList_To_apps_StatefulSetList,
+ Convert_apps_StatefulSetList_To_v1beta1_StatefulSetList,
+ Convert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec,
+ Convert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec,
+ Convert_v1beta1_StatefulSetStatus_To_apps_StatefulSetStatus,
+ Convert_apps_StatefulSetStatus_To_v1beta1_StatefulSetStatus,
+ Convert_v1beta1_StatefulSetUpdateStrategy_To_apps_StatefulSetUpdateStrategy,
+ Convert_apps_StatefulSetUpdateStrategy_To_v1beta1_StatefulSetUpdateStrategy,
+ )
+}
+
+func autoConvert_v1beta1_ControllerRevision_To_apps_ControllerRevision(in *ControllerRevision, out *apps.ControllerRevision, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.Data, &out.Data, s); err != nil {
+ return err
+ }
+ out.Revision = in.Revision
+ return nil
+}
+
+// Convert_v1beta1_ControllerRevision_To_apps_ControllerRevision is an autogenerated conversion function.
+func Convert_v1beta1_ControllerRevision_To_apps_ControllerRevision(in *ControllerRevision, out *apps.ControllerRevision, s conversion.Scope) error {
+ return autoConvert_v1beta1_ControllerRevision_To_apps_ControllerRevision(in, out, s)
+}
+
+func autoConvert_apps_ControllerRevision_To_v1beta1_ControllerRevision(in *apps.ControllerRevision, out *ControllerRevision, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.Data, &out.Data, s); err != nil {
+ return err
+ }
+ out.Revision = in.Revision
+ return nil
+}
+
+// Convert_apps_ControllerRevision_To_v1beta1_ControllerRevision is an autogenerated conversion function.
+func Convert_apps_ControllerRevision_To_v1beta1_ControllerRevision(in *apps.ControllerRevision, out *ControllerRevision, s conversion.Scope) error {
+ return autoConvert_apps_ControllerRevision_To_v1beta1_ControllerRevision(in, out, s)
+}
+
+func autoConvert_v1beta1_ControllerRevisionList_To_apps_ControllerRevisionList(in *ControllerRevisionList, out *apps.ControllerRevisionList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]apps.ControllerRevision, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_ControllerRevision_To_apps_ControllerRevision(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1beta1_ControllerRevisionList_To_apps_ControllerRevisionList is an autogenerated conversion function.
+func Convert_v1beta1_ControllerRevisionList_To_apps_ControllerRevisionList(in *ControllerRevisionList, out *apps.ControllerRevisionList, s conversion.Scope) error {
+ return autoConvert_v1beta1_ControllerRevisionList_To_apps_ControllerRevisionList(in, out, s)
+}
+
+func autoConvert_apps_ControllerRevisionList_To_v1beta1_ControllerRevisionList(in *apps.ControllerRevisionList, out *ControllerRevisionList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ControllerRevision, len(*in))
+ for i := range *in {
+ if err := Convert_apps_ControllerRevision_To_v1beta1_ControllerRevision(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]ControllerRevision, 0)
+ }
+ return nil
+}
+
+// Convert_apps_ControllerRevisionList_To_v1beta1_ControllerRevisionList is an autogenerated conversion function.
+func Convert_apps_ControllerRevisionList_To_v1beta1_ControllerRevisionList(in *apps.ControllerRevisionList, out *ControllerRevisionList, s conversion.Scope) error {
+ return autoConvert_apps_ControllerRevisionList_To_v1beta1_ControllerRevisionList(in, out, s)
+}
+
+func autoConvert_v1beta1_RollingUpdateStatefulSetStrategy_To_apps_RollingUpdateStatefulSetStrategy(in *RollingUpdateStatefulSetStrategy, out *apps.RollingUpdateStatefulSetStrategy, s conversion.Scope) error {
+ if err := v1.Convert_Pointer_int32_To_int32(&in.Partition, &out.Partition, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_RollingUpdateStatefulSetStrategy_To_apps_RollingUpdateStatefulSetStrategy is an autogenerated conversion function.
+func Convert_v1beta1_RollingUpdateStatefulSetStrategy_To_apps_RollingUpdateStatefulSetStrategy(in *RollingUpdateStatefulSetStrategy, out *apps.RollingUpdateStatefulSetStrategy, s conversion.Scope) error {
+ return autoConvert_v1beta1_RollingUpdateStatefulSetStrategy_To_apps_RollingUpdateStatefulSetStrategy(in, out, s)
+}
+
+func autoConvert_apps_RollingUpdateStatefulSetStrategy_To_v1beta1_RollingUpdateStatefulSetStrategy(in *apps.RollingUpdateStatefulSetStrategy, out *RollingUpdateStatefulSetStrategy, s conversion.Scope) error {
+ if err := v1.Convert_int32_To_Pointer_int32(&in.Partition, &out.Partition, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_apps_RollingUpdateStatefulSetStrategy_To_v1beta1_RollingUpdateStatefulSetStrategy is an autogenerated conversion function.
+func Convert_apps_RollingUpdateStatefulSetStrategy_To_v1beta1_RollingUpdateStatefulSetStrategy(in *apps.RollingUpdateStatefulSetStrategy, out *RollingUpdateStatefulSetStrategy, s conversion.Scope) error {
+ return autoConvert_apps_RollingUpdateStatefulSetStrategy_To_v1beta1_RollingUpdateStatefulSetStrategy(in, out, s)
+}
+
+func autoConvert_v1beta1_StatefulSet_To_apps_StatefulSet(in *StatefulSet, out *apps.StatefulSet, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_StatefulSetStatus_To_apps_StatefulSetStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_StatefulSet_To_apps_StatefulSet is an autogenerated conversion function.
+func Convert_v1beta1_StatefulSet_To_apps_StatefulSet(in *StatefulSet, out *apps.StatefulSet, s conversion.Scope) error {
+ return autoConvert_v1beta1_StatefulSet_To_apps_StatefulSet(in, out, s)
+}
+
+func autoConvert_apps_StatefulSet_To_v1beta1_StatefulSet(in *apps.StatefulSet, out *StatefulSet, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_apps_StatefulSetStatus_To_v1beta1_StatefulSetStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_apps_StatefulSet_To_v1beta1_StatefulSet is an autogenerated conversion function.
+func Convert_apps_StatefulSet_To_v1beta1_StatefulSet(in *apps.StatefulSet, out *StatefulSet, s conversion.Scope) error {
+ return autoConvert_apps_StatefulSet_To_v1beta1_StatefulSet(in, out, s)
+}
+
+func autoConvert_v1beta1_StatefulSetList_To_apps_StatefulSetList(in *StatefulSetList, out *apps.StatefulSetList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]apps.StatefulSet, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_StatefulSet_To_apps_StatefulSet(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1beta1_StatefulSetList_To_apps_StatefulSetList is an autogenerated conversion function.
+func Convert_v1beta1_StatefulSetList_To_apps_StatefulSetList(in *StatefulSetList, out *apps.StatefulSetList, s conversion.Scope) error {
+ return autoConvert_v1beta1_StatefulSetList_To_apps_StatefulSetList(in, out, s)
+}
+
+func autoConvert_apps_StatefulSetList_To_v1beta1_StatefulSetList(in *apps.StatefulSetList, out *StatefulSetList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]StatefulSet, len(*in))
+ for i := range *in {
+ if err := Convert_apps_StatefulSet_To_v1beta1_StatefulSet(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]StatefulSet, 0)
+ }
+ return nil
+}
+
+// Convert_apps_StatefulSetList_To_v1beta1_StatefulSetList is an autogenerated conversion function.
+func Convert_apps_StatefulSetList_To_v1beta1_StatefulSetList(in *apps.StatefulSetList, out *StatefulSetList, s conversion.Scope) error {
+ return autoConvert_apps_StatefulSetList_To_v1beta1_StatefulSetList(in, out, s)
+}
+
+func autoConvert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec(in *StatefulSetSpec, out *apps.StatefulSetSpec, s conversion.Scope) error {
+ if err := v1.Convert_Pointer_int32_To_int32(&in.Replicas, &out.Replicas, s); err != nil {
+ return err
+ }
+ out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector))
+ if err := api_v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ out.VolumeClaimTemplates = *(*[]api.PersistentVolumeClaim)(unsafe.Pointer(&in.VolumeClaimTemplates))
+ out.ServiceName = in.ServiceName
+ out.PodManagementPolicy = apps.PodManagementPolicyType(in.PodManagementPolicy)
+ if err := Convert_v1beta1_StatefulSetUpdateStrategy_To_apps_StatefulSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, s); err != nil {
+ return err
+ }
+ out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit))
+ return nil
+}
+
+func autoConvert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec(in *apps.StatefulSetSpec, out *StatefulSetSpec, s conversion.Scope) error {
+ if err := v1.Convert_int32_To_Pointer_int32(&in.Replicas, &out.Replicas, s); err != nil {
+ return err
+ }
+ out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector))
+ if err := api_v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ out.VolumeClaimTemplates = *(*[]api_v1.PersistentVolumeClaim)(unsafe.Pointer(&in.VolumeClaimTemplates))
+ out.ServiceName = in.ServiceName
+ out.PodManagementPolicy = PodManagementPolicyType(in.PodManagementPolicy)
+ if err := Convert_apps_StatefulSetUpdateStrategy_To_v1beta1_StatefulSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, s); err != nil {
+ return err
+ }
+ out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit))
+ return nil
+}
+
+func autoConvert_v1beta1_StatefulSetStatus_To_apps_StatefulSetStatus(in *StatefulSetStatus, out *apps.StatefulSetStatus, s conversion.Scope) error {
+ out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration))
+ out.Replicas = in.Replicas
+ out.ReadyReplicas = in.ReadyReplicas
+ out.CurrentReplicas = in.CurrentReplicas
+ out.UpdatedReplicas = in.UpdatedReplicas
+ out.CurrentRevision = in.CurrentRevision
+ out.UpdateRevision = in.UpdateRevision
+ return nil
+}
+
+// Convert_v1beta1_StatefulSetStatus_To_apps_StatefulSetStatus is an autogenerated conversion function.
+func Convert_v1beta1_StatefulSetStatus_To_apps_StatefulSetStatus(in *StatefulSetStatus, out *apps.StatefulSetStatus, s conversion.Scope) error {
+ return autoConvert_v1beta1_StatefulSetStatus_To_apps_StatefulSetStatus(in, out, s)
+}
+
+func autoConvert_apps_StatefulSetStatus_To_v1beta1_StatefulSetStatus(in *apps.StatefulSetStatus, out *StatefulSetStatus, s conversion.Scope) error {
+ out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration))
+ out.Replicas = in.Replicas
+ out.ReadyReplicas = in.ReadyReplicas
+ out.CurrentReplicas = in.CurrentReplicas
+ out.UpdatedReplicas = in.UpdatedReplicas
+ out.CurrentRevision = in.CurrentRevision
+ out.UpdateRevision = in.UpdateRevision
+ return nil
+}
+
+// Convert_apps_StatefulSetStatus_To_v1beta1_StatefulSetStatus is an autogenerated conversion function.
+func Convert_apps_StatefulSetStatus_To_v1beta1_StatefulSetStatus(in *apps.StatefulSetStatus, out *StatefulSetStatus, s conversion.Scope) error {
+ return autoConvert_apps_StatefulSetStatus_To_v1beta1_StatefulSetStatus(in, out, s)
+}
+
+func autoConvert_v1beta1_StatefulSetUpdateStrategy_To_apps_StatefulSetUpdateStrategy(in *StatefulSetUpdateStrategy, out *apps.StatefulSetUpdateStrategy, s conversion.Scope) error {
+ out.Type = apps.StatefulSetUpdateStrategyType(in.Type)
+ if in.RollingUpdate != nil {
+ in, out := &in.RollingUpdate, &out.RollingUpdate
+ *out = new(apps.RollingUpdateStatefulSetStrategy)
+ if err := Convert_v1beta1_RollingUpdateStatefulSetStrategy_To_apps_RollingUpdateStatefulSetStrategy(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.RollingUpdate = nil
+ }
+ return nil
+}
+
+func autoConvert_apps_StatefulSetUpdateStrategy_To_v1beta1_StatefulSetUpdateStrategy(in *apps.StatefulSetUpdateStrategy, out *StatefulSetUpdateStrategy, s conversion.Scope) error {
+ out.Type = StatefulSetUpdateStrategyType(in.Type)
+ if in.RollingUpdate != nil {
+ in, out := &in.RollingUpdate, &out.RollingUpdate
+ *out = new(RollingUpdateStatefulSetStrategy)
+ if err := Convert_apps_RollingUpdateStatefulSetStrategy_To_v1beta1_RollingUpdateStatefulSetStrategy(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.RollingUpdate = nil
+ }
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..42736c1cd
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go
@@ -0,0 +1,459 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ intstr "k8s.io/apimachinery/pkg/util/intstr"
+ api_v1 "k8s.io/kubernetes/pkg/api/v1"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ControllerRevision, InType: reflect.TypeOf(&ControllerRevision{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ControllerRevisionList, InType: reflect.TypeOf(&ControllerRevisionList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Deployment, InType: reflect.TypeOf(&Deployment{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentCondition, InType: reflect.TypeOf(&DeploymentCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentList, InType: reflect.TypeOf(&DeploymentList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentRollback, InType: reflect.TypeOf(&DeploymentRollback{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentSpec, InType: reflect.TypeOf(&DeploymentSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentStatus, InType: reflect.TypeOf(&DeploymentStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentStrategy, InType: reflect.TypeOf(&DeploymentStrategy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RollbackConfig, InType: reflect.TypeOf(&RollbackConfig{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RollingUpdateDeployment, InType: reflect.TypeOf(&RollingUpdateDeployment{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RollingUpdateStatefulSetStrategy, InType: reflect.TypeOf(&RollingUpdateStatefulSetStrategy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Scale, InType: reflect.TypeOf(&Scale{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ScaleSpec, InType: reflect.TypeOf(&ScaleSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ScaleStatus, InType: reflect.TypeOf(&ScaleStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StatefulSet, InType: reflect.TypeOf(&StatefulSet{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StatefulSetList, InType: reflect.TypeOf(&StatefulSetList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StatefulSetSpec, InType: reflect.TypeOf(&StatefulSetSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StatefulSetStatus, InType: reflect.TypeOf(&StatefulSetStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StatefulSetUpdateStrategy, InType: reflect.TypeOf(&StatefulSetUpdateStrategy{})},
+ )
+}
+
+// DeepCopy_v1beta1_ControllerRevision is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ControllerRevision(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ControllerRevision)
+ out := out.(*ControllerRevision)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if newVal, err := c.DeepCopy(&in.Data); err != nil {
+ return err
+ } else {
+ out.Data = *newVal.(*runtime.RawExtension)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ControllerRevisionList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ControllerRevisionList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ControllerRevisionList)
+ out := out.(*ControllerRevisionList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ControllerRevision, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_ControllerRevision(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_Deployment is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_Deployment(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Deployment)
+ out := out.(*Deployment)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_DeploymentSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_DeploymentStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DeploymentCondition is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DeploymentCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentCondition)
+ out := out.(*DeploymentCondition)
+ *out = *in
+ out.LastUpdateTime = in.LastUpdateTime.DeepCopy()
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DeploymentList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DeploymentList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentList)
+ out := out.(*DeploymentList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Deployment, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_Deployment(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DeploymentRollback is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DeploymentRollback(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentRollback)
+ out := out.(*DeploymentRollback)
+ *out = *in
+ if in.UpdatedAnnotations != nil {
+ in, out := &in.UpdatedAnnotations, &out.UpdatedAnnotations
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DeploymentSpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DeploymentSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentSpec)
+ out := out.(*DeploymentSpec)
+ *out = *in
+ if in.Replicas != nil {
+ in, out := &in.Replicas, &out.Replicas
+ *out = new(int32)
+ **out = **in
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_DeploymentStrategy(&in.Strategy, &out.Strategy, c); err != nil {
+ return err
+ }
+ if in.RevisionHistoryLimit != nil {
+ in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
+ *out = new(int32)
+ **out = **in
+ }
+ if in.RollbackTo != nil {
+ in, out := &in.RollbackTo, &out.RollbackTo
+ *out = new(RollbackConfig)
+ **out = **in
+ }
+ if in.ProgressDeadlineSeconds != nil {
+ in, out := &in.ProgressDeadlineSeconds, &out.ProgressDeadlineSeconds
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DeploymentStatus is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DeploymentStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentStatus)
+ out := out.(*DeploymentStatus)
+ *out = *in
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]DeploymentCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_DeploymentCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.CollisionCount != nil {
+ in, out := &in.CollisionCount, &out.CollisionCount
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DeploymentStrategy is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DeploymentStrategy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentStrategy)
+ out := out.(*DeploymentStrategy)
+ *out = *in
+ if in.RollingUpdate != nil {
+ in, out := &in.RollingUpdate, &out.RollingUpdate
+ *out = new(RollingUpdateDeployment)
+ if err := DeepCopy_v1beta1_RollingUpdateDeployment(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_RollbackConfig is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_RollbackConfig(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RollbackConfig)
+ out := out.(*RollbackConfig)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_RollingUpdateDeployment is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_RollingUpdateDeployment(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RollingUpdateDeployment)
+ out := out.(*RollingUpdateDeployment)
+ *out = *in
+ if in.MaxUnavailable != nil {
+ in, out := &in.MaxUnavailable, &out.MaxUnavailable
+ *out = new(intstr.IntOrString)
+ **out = **in
+ }
+ if in.MaxSurge != nil {
+ in, out := &in.MaxSurge, &out.MaxSurge
+ *out = new(intstr.IntOrString)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_RollingUpdateStatefulSetStrategy is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_RollingUpdateStatefulSetStrategy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RollingUpdateStatefulSetStrategy)
+ out := out.(*RollingUpdateStatefulSetStrategy)
+ *out = *in
+ if in.Partition != nil {
+ in, out := &in.Partition, &out.Partition
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_Scale is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_Scale(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Scale)
+ out := out.(*Scale)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_ScaleStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ScaleSpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ScaleSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ScaleSpec)
+ out := out.(*ScaleSpec)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ScaleStatus is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ScaleStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ScaleStatus)
+ out := out.(*ScaleStatus)
+ *out = *in
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_StatefulSet is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_StatefulSet(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StatefulSet)
+ out := out.(*StatefulSet)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_StatefulSetSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_StatefulSetStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_StatefulSetList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_StatefulSetList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StatefulSetList)
+ out := out.(*StatefulSetList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]StatefulSet, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_StatefulSet(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_StatefulSetSpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_StatefulSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StatefulSetSpec)
+ out := out.(*StatefulSetSpec)
+ *out = *in
+ if in.Replicas != nil {
+ in, out := &in.Replicas, &out.Replicas
+ *out = new(int32)
+ **out = **in
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ if in.VolumeClaimTemplates != nil {
+ in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates
+ *out = make([]api_v1.PersistentVolumeClaim, len(*in))
+ for i := range *in {
+ if err := api_v1.DeepCopy_v1_PersistentVolumeClaim(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if err := DeepCopy_v1beta1_StatefulSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, c); err != nil {
+ return err
+ }
+ if in.RevisionHistoryLimit != nil {
+ in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_StatefulSetStatus is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_StatefulSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StatefulSetStatus)
+ out := out.(*StatefulSetStatus)
+ *out = *in
+ if in.ObservedGeneration != nil {
+ in, out := &in.ObservedGeneration, &out.ObservedGeneration
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_StatefulSetUpdateStrategy is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_StatefulSetUpdateStrategy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StatefulSetUpdateStrategy)
+ out := out.(*StatefulSetUpdateStrategy)
+ *out = *in
+ if in.RollingUpdate != nil {
+ in, out := &in.RollingUpdate, &out.RollingUpdate
+ *out = new(RollingUpdateStatefulSetStrategy)
+ if err := DeepCopy_v1beta1_RollingUpdateStatefulSetStrategy(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/zz_generated.defaults.go
new file mode 100644
index 000000000..7d83113c8
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/zz_generated.defaults.go
@@ -0,0 +1,326 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ scheme.AddTypeDefaultingFunc(&Deployment{}, func(obj interface{}) { SetObjectDefaults_Deployment(obj.(*Deployment)) })
+ scheme.AddTypeDefaultingFunc(&DeploymentList{}, func(obj interface{}) { SetObjectDefaults_DeploymentList(obj.(*DeploymentList)) })
+ scheme.AddTypeDefaultingFunc(&StatefulSet{}, func(obj interface{}) { SetObjectDefaults_StatefulSet(obj.(*StatefulSet)) })
+ scheme.AddTypeDefaultingFunc(&StatefulSetList{}, func(obj interface{}) { SetObjectDefaults_StatefulSetList(obj.(*StatefulSetList)) })
+ return nil
+}
+
+func SetObjectDefaults_Deployment(in *Deployment) {
+ SetDefaults_Deployment(in)
+ v1.SetDefaults_PodSpec(&in.Spec.Template.Spec)
+ for i := range in.Spec.Template.Spec.Volumes {
+ a := &in.Spec.Template.Spec.Volumes[i]
+ v1.SetDefaults_Volume(a)
+ if a.VolumeSource.Secret != nil {
+ v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
+ }
+ if a.VolumeSource.ISCSI != nil {
+ v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
+ }
+ if a.VolumeSource.RBD != nil {
+ v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
+ }
+ if a.VolumeSource.DownwardAPI != nil {
+ v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
+ for j := range a.VolumeSource.DownwardAPI.Items {
+ b := &a.VolumeSource.DownwardAPI.Items[j]
+ if b.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.FieldRef)
+ }
+ }
+ }
+ if a.VolumeSource.ConfigMap != nil {
+ v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
+ }
+ if a.VolumeSource.AzureDisk != nil {
+ v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
+ }
+ if a.VolumeSource.Projected != nil {
+ v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
+ for j := range a.VolumeSource.Projected.Sources {
+ b := &a.VolumeSource.Projected.Sources[j]
+ if b.DownwardAPI != nil {
+ for k := range b.DownwardAPI.Items {
+ c := &b.DownwardAPI.Items[k]
+ if c.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(c.FieldRef)
+ }
+ }
+ }
+ }
+ }
+ if a.VolumeSource.ScaleIO != nil {
+ v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO)
+ }
+ }
+ for i := range in.Spec.Template.Spec.InitContainers {
+ a := &in.Spec.Template.Spec.InitContainers[i]
+ v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+ for i := range in.Spec.Template.Spec.Containers {
+ a := &in.Spec.Template.Spec.Containers[i]
+ v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+}
+
+func SetObjectDefaults_DeploymentList(in *DeploymentList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_Deployment(a)
+ }
+}
+
+func SetObjectDefaults_StatefulSet(in *StatefulSet) {
+ SetDefaults_StatefulSet(in)
+ v1.SetDefaults_PodSpec(&in.Spec.Template.Spec)
+ for i := range in.Spec.Template.Spec.Volumes {
+ a := &in.Spec.Template.Spec.Volumes[i]
+ v1.SetDefaults_Volume(a)
+ if a.VolumeSource.Secret != nil {
+ v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
+ }
+ if a.VolumeSource.ISCSI != nil {
+ v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
+ }
+ if a.VolumeSource.RBD != nil {
+ v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
+ }
+ if a.VolumeSource.DownwardAPI != nil {
+ v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
+ for j := range a.VolumeSource.DownwardAPI.Items {
+ b := &a.VolumeSource.DownwardAPI.Items[j]
+ if b.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.FieldRef)
+ }
+ }
+ }
+ if a.VolumeSource.ConfigMap != nil {
+ v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
+ }
+ if a.VolumeSource.AzureDisk != nil {
+ v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
+ }
+ if a.VolumeSource.Projected != nil {
+ v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
+ for j := range a.VolumeSource.Projected.Sources {
+ b := &a.VolumeSource.Projected.Sources[j]
+ if b.DownwardAPI != nil {
+ for k := range b.DownwardAPI.Items {
+ c := &b.DownwardAPI.Items[k]
+ if c.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(c.FieldRef)
+ }
+ }
+ }
+ }
+ }
+ if a.VolumeSource.ScaleIO != nil {
+ v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO)
+ }
+ }
+ for i := range in.Spec.Template.Spec.InitContainers {
+ a := &in.Spec.Template.Spec.InitContainers[i]
+ v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+ for i := range in.Spec.Template.Spec.Containers {
+ a := &in.Spec.Template.Spec.Containers[i]
+ v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+ for i := range in.Spec.VolumeClaimTemplates {
+ a := &in.Spec.VolumeClaimTemplates[i]
+ v1.SetDefaults_PersistentVolumeClaim(a)
+ v1.SetDefaults_ResourceList(&a.Spec.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Spec.Resources.Requests)
+ v1.SetDefaults_ResourceList(&a.Status.Capacity)
+ }
+}
+
+func SetObjectDefaults_StatefulSetList(in *StatefulSetList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_StatefulSet(a)
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/zz_generated.deepcopy.go
new file mode 100644
index 000000000..cfad33e09
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/zz_generated.deepcopy.go
@@ -0,0 +1,208 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package apps
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api "k8s.io/kubernetes/pkg/api"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_ControllerRevision, InType: reflect.TypeOf(&ControllerRevision{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_ControllerRevisionList, InType: reflect.TypeOf(&ControllerRevisionList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_RollingUpdateStatefulSetStrategy, InType: reflect.TypeOf(&RollingUpdateStatefulSetStrategy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSet, InType: reflect.TypeOf(&StatefulSet{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSetList, InType: reflect.TypeOf(&StatefulSetList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSetSpec, InType: reflect.TypeOf(&StatefulSetSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSetStatus, InType: reflect.TypeOf(&StatefulSetStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_apps_StatefulSetUpdateStrategy, InType: reflect.TypeOf(&StatefulSetUpdateStrategy{})},
+ )
+}
+
+// DeepCopy_apps_ControllerRevision is an autogenerated deepcopy function.
+func DeepCopy_apps_ControllerRevision(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ControllerRevision)
+ out := out.(*ControllerRevision)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ // in.Data is kind 'Interface'
+ if in.Data != nil {
+ if newVal, err := c.DeepCopy(&in.Data); err != nil {
+ return err
+ } else {
+ out.Data = *newVal.(*runtime.Object)
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_apps_ControllerRevisionList is an autogenerated deepcopy function.
+func DeepCopy_apps_ControllerRevisionList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ControllerRevisionList)
+ out := out.(*ControllerRevisionList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ControllerRevision, len(*in))
+ for i := range *in {
+ if err := DeepCopy_apps_ControllerRevision(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_apps_RollingUpdateStatefulSetStrategy is an autogenerated deepcopy function.
+func DeepCopy_apps_RollingUpdateStatefulSetStrategy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RollingUpdateStatefulSetStrategy)
+ out := out.(*RollingUpdateStatefulSetStrategy)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_apps_StatefulSet is an autogenerated deepcopy function.
+func DeepCopy_apps_StatefulSet(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StatefulSet)
+ out := out.(*StatefulSet)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_apps_StatefulSetSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_apps_StatefulSetStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_apps_StatefulSetList is an autogenerated deepcopy function.
+func DeepCopy_apps_StatefulSetList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StatefulSetList)
+ out := out.(*StatefulSetList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]StatefulSet, len(*in))
+ for i := range *in {
+ if err := DeepCopy_apps_StatefulSet(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_apps_StatefulSetSpec is an autogenerated deepcopy function.
+func DeepCopy_apps_StatefulSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StatefulSetSpec)
+ out := out.(*StatefulSetSpec)
+ *out = *in
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if err := api.DeepCopy_api_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ if in.VolumeClaimTemplates != nil {
+ in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates
+ *out = make([]api.PersistentVolumeClaim, len(*in))
+ for i := range *in {
+ if err := api.DeepCopy_api_PersistentVolumeClaim(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if err := DeepCopy_apps_StatefulSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, c); err != nil {
+ return err
+ }
+ if in.RevisionHistoryLimit != nil {
+ in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_apps_StatefulSetStatus is an autogenerated deepcopy function.
+func DeepCopy_apps_StatefulSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StatefulSetStatus)
+ out := out.(*StatefulSetStatus)
+ *out = *in
+ if in.ObservedGeneration != nil {
+ in, out := &in.ObservedGeneration, &out.ObservedGeneration
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_apps_StatefulSetUpdateStrategy is an autogenerated deepcopy function.
+func DeepCopy_apps_StatefulSetUpdateStrategy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StatefulSetUpdateStrategy)
+ out := out.(*StatefulSetUpdateStrategy)
+ *out = *in
+ if in.RollingUpdate != nil {
+ in, out := &in.RollingUpdate, &out.RollingUpdate
+ *out = new(RollingUpdateStatefulSetStrategy)
+ **out = **in
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/doc.go
new file mode 100644
index 000000000..88bdf625b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +groupName=authentication.k8s.io
+package authentication // import "k8s.io/kubernetes/pkg/apis/authentication"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/install/install.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/install/install.go
new file mode 100644
index 000000000..2fa00ec6b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/install/install.go
@@ -0,0 +1,53 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package install installs the experimental API group, making it available as
+// an option to all of the API encoding/decoding machinery.
+package install
+
+import (
+ "k8s.io/apimachinery/pkg/apimachinery/announced"
+ "k8s.io/apimachinery/pkg/apimachinery/registered"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/sets"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/authentication"
+ "k8s.io/kubernetes/pkg/apis/authentication/v1"
+ "k8s.io/kubernetes/pkg/apis/authentication/v1beta1"
+)
+
+func init() {
+ Install(api.GroupFactoryRegistry, api.Registry, api.Scheme)
+}
+
+// Install registers the API group and adds types to a scheme
+func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
+ if err := announced.NewGroupMetaFactory(
+ &announced.GroupMetaFactoryArgs{
+ GroupName: authentication.GroupName,
+ VersionPreferenceOrder: []string{v1.SchemeGroupVersion.Version, v1beta1.SchemeGroupVersion.Version},
+ ImportPrefix: "k8s.io/kubernetes/pkg/apis/authentication",
+ RootScopedKinds: sets.NewString("TokenReview"),
+ AddInternalObjectsToScheme: authentication.AddToScheme,
+ },
+ announced.VersionToSchemeFunc{
+ v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme,
+ v1.SchemeGroupVersion.Version: v1.AddToScheme,
+ },
+ ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil {
+ panic(err)
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/register.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/register.go
new file mode 100644
index 000000000..b0ac3c28b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/register.go
@@ -0,0 +1,50 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package authentication
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "authentication.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &TokenReview{},
+ )
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/types.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/types.go
new file mode 100644
index 000000000..9c1e66b7b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/types.go
@@ -0,0 +1,89 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package authentication
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+const (
+ // ImpersonateUserHeader is used to impersonate a particular user during an API server request
+ ImpersonateUserHeader = "Impersonate-User"
+
+ // ImpersonateGroupHeader is used to impersonate a particular group during an API server request.
+ // It can be repeated multiplied times for multiple groups.
+ ImpersonateGroupHeader = "Impersonate-Group"
+
+ // ImpersonateUserExtraHeaderPrefix is a prefix for any header used to impersonate an entry in the
+ // extra map[string][]string for user.Info. The key will be every after the prefix.
+ // It can be repeated multiplied times for multiple map keys and the same key can be repeated multiple
+ // times to have multiple elements in the slice under a single key
+ ImpersonateUserExtraHeaderPrefix = "Impersonate-Extra-"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+// +noMethods=true
+
+// TokenReview attempts to authenticate a token to a known user.
+type TokenReview struct {
+ metav1.TypeMeta
+ // ObjectMeta fulfills the metav1.ObjectMetaAccessor interface so that the stock
+ // REST handler paths work
+ metav1.ObjectMeta
+
+ // Spec holds information about the request being evaluated
+ Spec TokenReviewSpec
+
+ // Status is filled in by the server and indicates whether the request can be authenticated.
+ Status TokenReviewStatus
+}
+
+// TokenReviewSpec is a description of the token authentication request.
+type TokenReviewSpec struct {
+ // Token is the opaque bearer token.
+ Token string
+}
+
+// TokenReviewStatus is the result of the token authentication request.
+// This type mirrors the authentication.Token interface
+type TokenReviewStatus struct {
+ // Authenticated indicates that the token was associated with a known user.
+ Authenticated bool
+ // User is the UserInfo associated with the provided token.
+ User UserInfo
+ // Error indicates that the token couldn't be checked
+ Error string
+}
+
+// UserInfo holds the information about the user needed to implement the
+// user.Info interface.
+type UserInfo struct {
+ // The name that uniquely identifies this user among all active users.
+ Username string
+ // A unique value that identifies this user across time. If this user is
+ // deleted and another user by the same name is added, they will have
+ // different UIDs.
+ UID string
+ // The names of groups this user is a part of.
+ Groups []string
+ // Any additional information provided by the authenticator.
+ Extra map[string]ExtraValue
+}
+
+// ExtraValue masks the value so protobuf can generate
+type ExtraValue []string
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/conversion.go
new file mode 100644
index 000000000..2ff5732d6
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/conversion.go
@@ -0,0 +1,26 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) error {
+ // Add non-generated conversion functions
+ return scheme.AddConversionFuncs()
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/defaults.go
new file mode 100644
index 000000000..074e15bae
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/defaults.go
@@ -0,0 +1,25 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/doc.go
new file mode 100644
index 000000000..0bb254f10
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/doc.go
@@ -0,0 +1,22 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/authentication
+// +groupName=authentication.k8s.io
+// +k8s:openapi-gen=true
+// +k8s:defaulter-gen=TypeMeta
+package v1 // import "k8s.io/kubernetes/pkg/apis/authentication/v1"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/generated.pb.go
new file mode 100644
index 000000000..bb9bdecd7
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/generated.pb.go
@@ -0,0 +1,1301 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/authentication/v1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/authentication/v1/generated.proto
+
+ It has these top-level messages:
+ ExtraValue
+ TokenReview
+ TokenReviewSpec
+ TokenReviewStatus
+ UserInfo
+*/
+package v1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *ExtraValue) Reset() { *m = ExtraValue{} }
+func (*ExtraValue) ProtoMessage() {}
+func (*ExtraValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *TokenReview) Reset() { *m = TokenReview{} }
+func (*TokenReview) ProtoMessage() {}
+func (*TokenReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *TokenReviewSpec) Reset() { *m = TokenReviewSpec{} }
+func (*TokenReviewSpec) ProtoMessage() {}
+func (*TokenReviewSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
+
+func (m *TokenReviewStatus) Reset() { *m = TokenReviewStatus{} }
+func (*TokenReviewStatus) ProtoMessage() {}
+func (*TokenReviewStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
+
+func (m *UserInfo) Reset() { *m = UserInfo{} }
+func (*UserInfo) ProtoMessage() {}
+func (*UserInfo) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
+
+func init() {
+ proto.RegisterType((*ExtraValue)(nil), "k8s.io.kubernetes.pkg.apis.authentication.v1.ExtraValue")
+ proto.RegisterType((*TokenReview)(nil), "k8s.io.kubernetes.pkg.apis.authentication.v1.TokenReview")
+ proto.RegisterType((*TokenReviewSpec)(nil), "k8s.io.kubernetes.pkg.apis.authentication.v1.TokenReviewSpec")
+ proto.RegisterType((*TokenReviewStatus)(nil), "k8s.io.kubernetes.pkg.apis.authentication.v1.TokenReviewStatus")
+ proto.RegisterType((*UserInfo)(nil), "k8s.io.kubernetes.pkg.apis.authentication.v1.UserInfo")
+}
+func (m ExtraValue) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m ExtraValue) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m) > 0 {
+ for _, s := range m {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *TokenReview) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *TokenReview) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n2, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n3, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ return i, nil
+}
+
+func (m *TokenReviewSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *TokenReviewSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Token)))
+ i += copy(dAtA[i:], m.Token)
+ return i, nil
+}
+
+func (m *TokenReviewStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *TokenReviewStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ if m.Authenticated {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.User.Size()))
+ n4, err := m.User.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Error)))
+ i += copy(dAtA[i:], m.Error)
+ return i, nil
+}
+
+func (m *UserInfo) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *UserInfo) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Username)))
+ i += copy(dAtA[i:], m.Username)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID)))
+ i += copy(dAtA[i:], m.UID)
+ if len(m.Groups) > 0 {
+ for _, s := range m.Groups {
+ dAtA[i] = 0x1a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Extra) > 0 {
+ keysForExtra := make([]string, 0, len(m.Extra))
+ for k := range m.Extra {
+ keysForExtra = append(keysForExtra, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
+ for _, k := range keysForExtra {
+ dAtA[i] = 0x22
+ i++
+ v := m.Extra[string(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n5, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ }
+ }
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m ExtraValue) Size() (n int) {
+ var l int
+ _ = l
+ if len(m) > 0 {
+ for _, s := range m {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *TokenReview) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *TokenReviewSpec) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Token)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *TokenReviewStatus) Size() (n int) {
+ var l int
+ _ = l
+ n += 2
+ l = m.User.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Error)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *UserInfo) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Username)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.UID)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Groups) > 0 {
+ for _, s := range m.Groups {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Extra) > 0 {
+ for k, v := range m.Extra {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *TokenReview) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&TokenReview{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "TokenReviewSpec", "TokenReviewSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "TokenReviewStatus", "TokenReviewStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *TokenReviewSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&TokenReviewSpec{`,
+ `Token:` + fmt.Sprintf("%v", this.Token) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *TokenReviewStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&TokenReviewStatus{`,
+ `Authenticated:` + fmt.Sprintf("%v", this.Authenticated) + `,`,
+ `User:` + strings.Replace(strings.Replace(this.User.String(), "UserInfo", "UserInfo", 1), `&`, ``, 1) + `,`,
+ `Error:` + fmt.Sprintf("%v", this.Error) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *UserInfo) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForExtra := make([]string, 0, len(this.Extra))
+ for k := range this.Extra {
+ keysForExtra = append(keysForExtra, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
+ mapStringForExtra := "map[string]ExtraValue{"
+ for _, k := range keysForExtra {
+ mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k])
+ }
+ mapStringForExtra += "}"
+ s := strings.Join([]string{`&UserInfo{`,
+ `Username:` + fmt.Sprintf("%v", this.Username) + `,`,
+ `UID:` + fmt.Sprintf("%v", this.UID) + `,`,
+ `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`,
+ `Extra:` + mapStringForExtra + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *ExtraValue) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExtraValue: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExtraValue: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ *m = append(*m, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *TokenReview) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: TokenReview: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: TokenReview: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *TokenReviewSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: TokenReviewSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: TokenReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Token = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *TokenReviewStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: TokenReviewStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: TokenReviewStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Authenticated", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Authenticated = bool(v != 0)
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.User.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Error = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *UserInfo) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: UserInfo: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: UserInfo: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Username = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.UID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Extra", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Extra == nil {
+ m.Extra = make(map[string]ExtraValue)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &ExtraValue{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Extra[mapkey] = *mapvalue
+ } else {
+ var mapvalue ExtraValue
+ m.Extra[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/kubernetes/pkg/apis/authentication/v1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 640 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0xcd, 0x6e, 0xd3, 0x40,
+ 0x10, 0xb6, 0xf3, 0x53, 0x25, 0x1b, 0x0a, 0x65, 0x25, 0xa4, 0x28, 0x12, 0x4e, 0x14, 0x2e, 0x39,
+ 0x94, 0x35, 0x29, 0xa8, 0x54, 0x05, 0x84, 0x6a, 0x51, 0xa1, 0x1e, 0x00, 0x69, 0xa1, 0x08, 0x71,
+ 0x81, 0x8d, 0x33, 0x75, 0x96, 0xd4, 0x3f, 0x5a, 0xaf, 0x03, 0xbd, 0xf5, 0x11, 0x38, 0x72, 0xe4,
+ 0x35, 0x78, 0x83, 0xde, 0xe8, 0x8d, 0x1e, 0x50, 0x45, 0xcd, 0x8b, 0xa0, 0x5d, 0x2f, 0x4d, 0xda,
+ 0x52, 0xa1, 0xf6, 0xe6, 0xfd, 0x66, 0xbe, 0x6f, 0xbe, 0x99, 0xf1, 0xa0, 0x87, 0xe3, 0x95, 0x94,
+ 0xf0, 0xd8, 0x1d, 0x67, 0x03, 0x10, 0x11, 0x48, 0x48, 0xdd, 0x64, 0x1c, 0xb8, 0x2c, 0xe1, 0xa9,
+ 0xcb, 0x32, 0x39, 0x82, 0x48, 0x72, 0x9f, 0x49, 0x1e, 0x47, 0xee, 0xa4, 0xef, 0x06, 0x10, 0x81,
+ 0x60, 0x12, 0x86, 0x24, 0x11, 0xb1, 0x8c, 0xf1, 0x62, 0xc1, 0x26, 0x53, 0x36, 0x49, 0xc6, 0x01,
+ 0x51, 0x6c, 0x72, 0x92, 0x4d, 0x26, 0xfd, 0xd6, 0xed, 0x80, 0xcb, 0x51, 0x36, 0x20, 0x7e, 0x1c,
+ 0xba, 0x41, 0x1c, 0xc4, 0xae, 0x16, 0x19, 0x64, 0x5b, 0xfa, 0xa5, 0x1f, 0xfa, 0xab, 0x10, 0x6f,
+ 0xdd, 0x33, 0xd6, 0x58, 0xc2, 0x43, 0xe6, 0x8f, 0x78, 0x04, 0x62, 0x67, 0x6a, 0x2e, 0x04, 0xc9,
+ 0xfe, 0x61, 0xa9, 0xe5, 0x9e, 0xc7, 0x12, 0x59, 0x24, 0x79, 0x08, 0x67, 0x08, 0xcb, 0xff, 0x23,
+ 0xa4, 0xfe, 0x08, 0x42, 0x76, 0x86, 0x77, 0xf7, 0x3c, 0x5e, 0x26, 0xf9, 0xb6, 0xcb, 0x23, 0x99,
+ 0x4a, 0x71, 0x9a, 0xd4, 0xbd, 0x8f, 0xd0, 0xfa, 0x27, 0x29, 0xd8, 0x6b, 0xb6, 0x9d, 0x01, 0x6e,
+ 0xa3, 0x2a, 0x97, 0x10, 0xa6, 0x4d, 0xbb, 0x53, 0xee, 0xd5, 0xbd, 0x7a, 0x7e, 0xd8, 0xae, 0x6e,
+ 0x28, 0x80, 0x16, 0xf8, 0x6a, 0xed, 0xcb, 0xd7, 0xb6, 0xb5, 0xfb, 0xb3, 0x63, 0x75, 0xbf, 0x95,
+ 0x50, 0xe3, 0x55, 0x3c, 0x86, 0x88, 0xc2, 0x84, 0xc3, 0x47, 0xfc, 0x1e, 0xd5, 0xd4, 0x04, 0x86,
+ 0x4c, 0xb2, 0xa6, 0xdd, 0xb1, 0x7b, 0x8d, 0xa5, 0x3b, 0xc4, 0x2c, 0x63, 0xd6, 0xd0, 0x74, 0x1d,
+ 0x2a, 0x9b, 0x4c, 0xfa, 0xe4, 0xc5, 0xe0, 0x03, 0xf8, 0xf2, 0x19, 0x48, 0xe6, 0xe1, 0xbd, 0xc3,
+ 0xb6, 0x95, 0x1f, 0xb6, 0xd1, 0x14, 0xa3, 0xc7, 0xaa, 0xf8, 0x1d, 0xaa, 0xa4, 0x09, 0xf8, 0xcd,
+ 0x92, 0x56, 0x7f, 0x44, 0x2e, 0xb2, 0x6a, 0x32, 0x63, 0xf5, 0x65, 0x02, 0xbe, 0x77, 0xc5, 0x94,
+ 0xaa, 0xa8, 0x17, 0xd5, 0xc2, 0x38, 0x40, 0x73, 0xa9, 0x64, 0x32, 0x4b, 0x9b, 0x65, 0x5d, 0xe2,
+ 0xf1, 0xe5, 0x4b, 0x68, 0x19, 0xef, 0xaa, 0x29, 0x32, 0x57, 0xbc, 0xa9, 0x91, 0xef, 0x2e, 0xa3,
+ 0x6b, 0xa7, 0xfc, 0xe0, 0x5b, 0xa8, 0x2a, 0x15, 0xa4, 0x67, 0x57, 0xf7, 0xe6, 0x0d, 0xb3, 0x5a,
+ 0xe4, 0x15, 0xb1, 0xee, 0x77, 0x1b, 0x5d, 0x3f, 0x53, 0x05, 0x3f, 0x40, 0xf3, 0x33, 0x66, 0x60,
+ 0xa8, 0x25, 0x6a, 0xde, 0x0d, 0x23, 0x31, 0xbf, 0x36, 0x1b, 0xa4, 0x27, 0x73, 0xf1, 0x1b, 0x54,
+ 0xc9, 0x52, 0x10, 0x66, 0xa8, 0xcb, 0x17, 0xeb, 0x78, 0x33, 0x05, 0xb1, 0x11, 0x6d, 0xc5, 0xd3,
+ 0x69, 0x2a, 0x84, 0x6a, 0x45, 0xd5, 0x11, 0x08, 0x11, 0x0b, 0x3d, 0xcc, 0x99, 0x8e, 0xd6, 0x15,
+ 0x48, 0x8b, 0x58, 0xf7, 0x47, 0x09, 0xd5, 0xfe, 0xaa, 0xe0, 0x45, 0x54, 0x53, 0xcc, 0x88, 0x85,
+ 0x60, 0xc6, 0xb0, 0x60, 0x48, 0x3a, 0x47, 0xe1, 0xf4, 0x38, 0x03, 0xdf, 0x44, 0xe5, 0x8c, 0x0f,
+ 0xb5, 0xf1, 0xba, 0xd7, 0x30, 0x89, 0xe5, 0xcd, 0x8d, 0x27, 0x54, 0xe1, 0xb8, 0x8b, 0xe6, 0x02,
+ 0x11, 0x67, 0x89, 0x5a, 0xa6, 0xfa, 0x97, 0x91, 0xda, 0xc3, 0x53, 0x8d, 0x50, 0x13, 0xc1, 0x5b,
+ 0xa8, 0x0a, 0xea, 0xe7, 0x6f, 0x56, 0x3a, 0xe5, 0x5e, 0x63, 0x69, 0xed, 0x72, 0xdd, 0x13, 0x7d,
+ 0x40, 0xeb, 0x91, 0x14, 0x3b, 0x33, 0x5d, 0x2a, 0x8c, 0x16, 0xf2, 0x2d, 0x61, 0x8e, 0x4c, 0xe7,
+ 0xe0, 0x05, 0x54, 0x1e, 0xc3, 0x4e, 0xd1, 0x21, 0x55, 0x9f, 0xf8, 0x39, 0xaa, 0x4e, 0xd4, 0xfd,
+ 0x99, 0x2d, 0xac, 0x5c, 0xcc, 0xc7, 0xf4, 0x7e, 0x69, 0x21, 0xb3, 0x5a, 0x5a, 0xb1, 0xbd, 0xde,
+ 0xde, 0x91, 0x63, 0xed, 0x1f, 0x39, 0xd6, 0xc1, 0x91, 0x63, 0xed, 0xe6, 0x8e, 0xbd, 0x97, 0x3b,
+ 0xf6, 0x7e, 0xee, 0xd8, 0x07, 0xb9, 0x63, 0xff, 0xca, 0x1d, 0xfb, 0xf3, 0x6f, 0xc7, 0x7a, 0x5b,
+ 0x9a, 0xf4, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x01, 0xcb, 0xf3, 0xc9, 0x72, 0x05, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/generated.proto
new file mode 100644
index 000000000..6507b8764
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/generated.proto
@@ -0,0 +1,99 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.pkg.apis.authentication.v1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1";
+
+// ExtraValue masks the value so protobuf can generate
+// +protobuf.nullable=true
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+message ExtraValue {
+ // items, if empty, will result in an empty slice
+
+ repeated string items = 1;
+}
+
+// TokenReview attempts to authenticate a token to a known user.
+// Note: TokenReview requests may be cached by the webhook token authenticator
+// plugin in the kube-apiserver.
+message TokenReview {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec holds information about the request being evaluated
+ optional TokenReviewSpec spec = 2;
+
+ // Status is filled in by the server and indicates whether the request can be authenticated.
+ // +optional
+ optional TokenReviewStatus status = 3;
+}
+
+// TokenReviewSpec is a description of the token authentication request.
+message TokenReviewSpec {
+ // Token is the opaque bearer token.
+ // +optional
+ optional string token = 1;
+}
+
+// TokenReviewStatus is the result of the token authentication request.
+message TokenReviewStatus {
+ // Authenticated indicates that the token was associated with a known user.
+ // +optional
+ optional bool authenticated = 1;
+
+ // User is the UserInfo associated with the provided token.
+ // +optional
+ optional UserInfo user = 2;
+
+ // Error indicates that the token couldn't be checked
+ // +optional
+ optional string error = 3;
+}
+
+// UserInfo holds the information about the user needed to implement the
+// user.Info interface.
+message UserInfo {
+ // The name that uniquely identifies this user among all active users.
+ // +optional
+ optional string username = 1;
+
+ // A unique value that identifies this user across time. If this user is
+ // deleted and another user by the same name is added, they will have
+ // different UIDs.
+ // +optional
+ optional string uid = 2;
+
+ // The names of groups this user is a part of.
+ // +optional
+ repeated string groups = 3;
+
+ // Any additional information provided by the authenticator.
+ // +optional
+ map<string, ExtraValue> extra = 4;
+}
+
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/register.go
new file mode 100644
index 000000000..b4ab6519c
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/register.go
@@ -0,0 +1,58 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "authentication.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &TokenReview{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/types.go
new file mode 100644
index 000000000..21051f137
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/types.go
@@ -0,0 +1,106 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "fmt"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+const (
+ // ImpersonateUserHeader is used to impersonate a particular user during an API server request
+ ImpersonateUserHeader = "Impersonate-User"
+
+ // ImpersonateGroupHeader is used to impersonate a particular group during an API server request.
+ // It can be repeated multiplied times for multiple groups.
+ ImpersonateGroupHeader = "Impersonate-Group"
+
+ // ImpersonateUserExtraHeaderPrefix is a prefix for any header used to impersonate an entry in the
+ // extra map[string][]string for user.Info. The key will be every after the prefix.
+ // It can be repeated multiplied times for multiple map keys and the same key can be repeated multiple
+ // times to have multiple elements in the slice under a single key
+ ImpersonateUserExtraHeaderPrefix = "Impersonate-Extra-"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+// +noMethods=true
+
+// TokenReview attempts to authenticate a token to a known user.
+// Note: TokenReview requests may be cached by the webhook token authenticator
+// plugin in the kube-apiserver.
+type TokenReview struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec holds information about the request being evaluated
+ Spec TokenReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is filled in by the server and indicates whether the request can be authenticated.
+ // +optional
+ Status TokenReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// TokenReviewSpec is a description of the token authentication request.
+type TokenReviewSpec struct {
+ // Token is the opaque bearer token.
+ // +optional
+ Token string `json:"token,omitempty" protobuf:"bytes,1,opt,name=token"`
+}
+
+// TokenReviewStatus is the result of the token authentication request.
+type TokenReviewStatus struct {
+ // Authenticated indicates that the token was associated with a known user.
+ // +optional
+ Authenticated bool `json:"authenticated,omitempty" protobuf:"varint,1,opt,name=authenticated"`
+ // User is the UserInfo associated with the provided token.
+ // +optional
+ User UserInfo `json:"user,omitempty" protobuf:"bytes,2,opt,name=user"`
+ // Error indicates that the token couldn't be checked
+ // +optional
+ Error string `json:"error,omitempty" protobuf:"bytes,3,opt,name=error"`
+}
+
+// UserInfo holds the information about the user needed to implement the
+// user.Info interface.
+type UserInfo struct {
+ // The name that uniquely identifies this user among all active users.
+ // +optional
+ Username string `json:"username,omitempty" protobuf:"bytes,1,opt,name=username"`
+ // A unique value that identifies this user across time. If this user is
+ // deleted and another user by the same name is added, they will have
+ // different UIDs.
+ // +optional
+ UID string `json:"uid,omitempty" protobuf:"bytes,2,opt,name=uid"`
+ // The names of groups this user is a part of.
+ // +optional
+ Groups []string `json:"groups,omitempty" protobuf:"bytes,3,rep,name=groups"`
+ // Any additional information provided by the authenticator.
+ // +optional
+ Extra map[string]ExtraValue `json:"extra,omitempty" protobuf:"bytes,4,rep,name=extra"`
+}
+
+// ExtraValue masks the value so protobuf can generate
+// +protobuf.nullable=true
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+type ExtraValue []string
+
+func (t ExtraValue) String() string {
+ return fmt.Sprintf("%v", []string(t))
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..bb235e4ea
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/types_swagger_doc_generated.go
@@ -0,0 +1,72 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_TokenReview = map[string]string{
+ "": "TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.",
+ "spec": "Spec holds information about the request being evaluated",
+ "status": "Status is filled in by the server and indicates whether the request can be authenticated.",
+}
+
+func (TokenReview) SwaggerDoc() map[string]string {
+ return map_TokenReview
+}
+
+var map_TokenReviewSpec = map[string]string{
+ "": "TokenReviewSpec is a description of the token authentication request.",
+ "token": "Token is the opaque bearer token.",
+}
+
+func (TokenReviewSpec) SwaggerDoc() map[string]string {
+ return map_TokenReviewSpec
+}
+
+var map_TokenReviewStatus = map[string]string{
+ "": "TokenReviewStatus is the result of the token authentication request.",
+ "authenticated": "Authenticated indicates that the token was associated with a known user.",
+ "user": "User is the UserInfo associated with the provided token.",
+ "error": "Error indicates that the token couldn't be checked",
+}
+
+func (TokenReviewStatus) SwaggerDoc() map[string]string {
+ return map_TokenReviewStatus
+}
+
+var map_UserInfo = map[string]string{
+ "": "UserInfo holds the information about the user needed to implement the user.Info interface.",
+ "username": "The name that uniquely identifies this user among all active users.",
+ "uid": "A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.",
+ "groups": "The names of groups this user is a part of.",
+ "extra": "Any additional information provided by the authenticator.",
+}
+
+func (UserInfo) SwaggerDoc() map[string]string {
+ return map_UserInfo
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/zz_generated.conversion.go
new file mode 100644
index 000000000..9bcd3d831
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/zz_generated.conversion.go
@@ -0,0 +1,153 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1
+
+import (
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ authentication "k8s.io/kubernetes/pkg/apis/authentication"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1_TokenReview_To_authentication_TokenReview,
+ Convert_authentication_TokenReview_To_v1_TokenReview,
+ Convert_v1_TokenReviewSpec_To_authentication_TokenReviewSpec,
+ Convert_authentication_TokenReviewSpec_To_v1_TokenReviewSpec,
+ Convert_v1_TokenReviewStatus_To_authentication_TokenReviewStatus,
+ Convert_authentication_TokenReviewStatus_To_v1_TokenReviewStatus,
+ Convert_v1_UserInfo_To_authentication_UserInfo,
+ Convert_authentication_UserInfo_To_v1_UserInfo,
+ )
+}
+
+func autoConvert_v1_TokenReview_To_authentication_TokenReview(in *TokenReview, out *authentication.TokenReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_TokenReviewSpec_To_authentication_TokenReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_TokenReviewStatus_To_authentication_TokenReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_TokenReview_To_authentication_TokenReview is an autogenerated conversion function.
+func Convert_v1_TokenReview_To_authentication_TokenReview(in *TokenReview, out *authentication.TokenReview, s conversion.Scope) error {
+ return autoConvert_v1_TokenReview_To_authentication_TokenReview(in, out, s)
+}
+
+func autoConvert_authentication_TokenReview_To_v1_TokenReview(in *authentication.TokenReview, out *TokenReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_authentication_TokenReviewSpec_To_v1_TokenReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_authentication_TokenReviewStatus_To_v1_TokenReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_authentication_TokenReview_To_v1_TokenReview is an autogenerated conversion function.
+func Convert_authentication_TokenReview_To_v1_TokenReview(in *authentication.TokenReview, out *TokenReview, s conversion.Scope) error {
+ return autoConvert_authentication_TokenReview_To_v1_TokenReview(in, out, s)
+}
+
+func autoConvert_v1_TokenReviewSpec_To_authentication_TokenReviewSpec(in *TokenReviewSpec, out *authentication.TokenReviewSpec, s conversion.Scope) error {
+ out.Token = in.Token
+ return nil
+}
+
+// Convert_v1_TokenReviewSpec_To_authentication_TokenReviewSpec is an autogenerated conversion function.
+func Convert_v1_TokenReviewSpec_To_authentication_TokenReviewSpec(in *TokenReviewSpec, out *authentication.TokenReviewSpec, s conversion.Scope) error {
+ return autoConvert_v1_TokenReviewSpec_To_authentication_TokenReviewSpec(in, out, s)
+}
+
+func autoConvert_authentication_TokenReviewSpec_To_v1_TokenReviewSpec(in *authentication.TokenReviewSpec, out *TokenReviewSpec, s conversion.Scope) error {
+ out.Token = in.Token
+ return nil
+}
+
+// Convert_authentication_TokenReviewSpec_To_v1_TokenReviewSpec is an autogenerated conversion function.
+func Convert_authentication_TokenReviewSpec_To_v1_TokenReviewSpec(in *authentication.TokenReviewSpec, out *TokenReviewSpec, s conversion.Scope) error {
+ return autoConvert_authentication_TokenReviewSpec_To_v1_TokenReviewSpec(in, out, s)
+}
+
+func autoConvert_v1_TokenReviewStatus_To_authentication_TokenReviewStatus(in *TokenReviewStatus, out *authentication.TokenReviewStatus, s conversion.Scope) error {
+ out.Authenticated = in.Authenticated
+ if err := Convert_v1_UserInfo_To_authentication_UserInfo(&in.User, &out.User, s); err != nil {
+ return err
+ }
+ out.Error = in.Error
+ return nil
+}
+
+// Convert_v1_TokenReviewStatus_To_authentication_TokenReviewStatus is an autogenerated conversion function.
+func Convert_v1_TokenReviewStatus_To_authentication_TokenReviewStatus(in *TokenReviewStatus, out *authentication.TokenReviewStatus, s conversion.Scope) error {
+ return autoConvert_v1_TokenReviewStatus_To_authentication_TokenReviewStatus(in, out, s)
+}
+
+func autoConvert_authentication_TokenReviewStatus_To_v1_TokenReviewStatus(in *authentication.TokenReviewStatus, out *TokenReviewStatus, s conversion.Scope) error {
+ out.Authenticated = in.Authenticated
+ if err := Convert_authentication_UserInfo_To_v1_UserInfo(&in.User, &out.User, s); err != nil {
+ return err
+ }
+ out.Error = in.Error
+ return nil
+}
+
+// Convert_authentication_TokenReviewStatus_To_v1_TokenReviewStatus is an autogenerated conversion function.
+func Convert_authentication_TokenReviewStatus_To_v1_TokenReviewStatus(in *authentication.TokenReviewStatus, out *TokenReviewStatus, s conversion.Scope) error {
+ return autoConvert_authentication_TokenReviewStatus_To_v1_TokenReviewStatus(in, out, s)
+}
+
+func autoConvert_v1_UserInfo_To_authentication_UserInfo(in *UserInfo, out *authentication.UserInfo, s conversion.Scope) error {
+ out.Username = in.Username
+ out.UID = in.UID
+ out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups))
+ out.Extra = *(*map[string]authentication.ExtraValue)(unsafe.Pointer(&in.Extra))
+ return nil
+}
+
+// Convert_v1_UserInfo_To_authentication_UserInfo is an autogenerated conversion function.
+func Convert_v1_UserInfo_To_authentication_UserInfo(in *UserInfo, out *authentication.UserInfo, s conversion.Scope) error {
+ return autoConvert_v1_UserInfo_To_authentication_UserInfo(in, out, s)
+}
+
+func autoConvert_authentication_UserInfo_To_v1_UserInfo(in *authentication.UserInfo, out *UserInfo, s conversion.Scope) error {
+ out.Username = in.Username
+ out.UID = in.UID
+ out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups))
+ out.Extra = *(*map[string]ExtraValue)(unsafe.Pointer(&in.Extra))
+ return nil
+}
+
+// Convert_authentication_UserInfo_To_v1_UserInfo is an autogenerated conversion function.
+func Convert_authentication_UserInfo_To_v1_UserInfo(in *authentication.UserInfo, out *UserInfo, s conversion.Scope) error {
+ return autoConvert_authentication_UserInfo_To_v1_UserInfo(in, out, s)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..929c85fca
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/zz_generated.deepcopy.go
@@ -0,0 +1,110 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_TokenReview, InType: reflect.TypeOf(&TokenReview{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_TokenReviewSpec, InType: reflect.TypeOf(&TokenReviewSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_TokenReviewStatus, InType: reflect.TypeOf(&TokenReviewStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_UserInfo, InType: reflect.TypeOf(&UserInfo{})},
+ )
+}
+
+// DeepCopy_v1_TokenReview is an autogenerated deepcopy function.
+func DeepCopy_v1_TokenReview(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*TokenReview)
+ out := out.(*TokenReview)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_TokenReviewStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_TokenReviewSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_TokenReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*TokenReviewSpec)
+ out := out.(*TokenReviewSpec)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_TokenReviewStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_TokenReviewStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*TokenReviewStatus)
+ out := out.(*TokenReviewStatus)
+ *out = *in
+ if err := DeepCopy_v1_UserInfo(&in.User, &out.User, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_UserInfo is an autogenerated deepcopy function.
+func DeepCopy_v1_UserInfo(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*UserInfo)
+ out := out.(*UserInfo)
+ *out = *in
+ if in.Groups != nil {
+ in, out := &in.Groups, &out.Groups
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Extra != nil {
+ in, out := &in.Extra, &out.Extra
+ *out = make(map[string]ExtraValue)
+ for key, val := range *in {
+ if newVal, err := c.DeepCopy(&val); err != nil {
+ return err
+ } else {
+ (*out)[key] = *newVal.(*ExtraValue)
+ }
+ }
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/zz_generated.defaults.go
new file mode 100644
index 000000000..6df448eb9
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1/zz_generated.defaults.go
@@ -0,0 +1,32 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/conversion.go
new file mode 100644
index 000000000..51f3adfc7
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/conversion.go
@@ -0,0 +1,26 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) error {
+ // Add non-generated conversion functions
+ return scheme.AddConversionFuncs()
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/defaults.go
new file mode 100644
index 000000000..37abb53bd
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/defaults.go
@@ -0,0 +1,25 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/doc.go
new file mode 100644
index 000000000..3815862e6
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/doc.go
@@ -0,0 +1,22 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/authentication
+// +groupName=authentication.k8s.io
+// +k8s:openapi-gen=true
+// +k8s:defaulter-gen=TypeMeta
+package v1beta1 // import "k8s.io/kubernetes/pkg/apis/authentication/v1beta1"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/generated.pb.go
new file mode 100644
index 000000000..8e940b2c0
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/generated.pb.go
@@ -0,0 +1,1302 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/authentication/v1beta1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1beta1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/authentication/v1beta1/generated.proto
+
+ It has these top-level messages:
+ ExtraValue
+ TokenReview
+ TokenReviewSpec
+ TokenReviewStatus
+ UserInfo
+*/
+package v1beta1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *ExtraValue) Reset() { *m = ExtraValue{} }
+func (*ExtraValue) ProtoMessage() {}
+func (*ExtraValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *TokenReview) Reset() { *m = TokenReview{} }
+func (*TokenReview) ProtoMessage() {}
+func (*TokenReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *TokenReviewSpec) Reset() { *m = TokenReviewSpec{} }
+func (*TokenReviewSpec) ProtoMessage() {}
+func (*TokenReviewSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
+
+func (m *TokenReviewStatus) Reset() { *m = TokenReviewStatus{} }
+func (*TokenReviewStatus) ProtoMessage() {}
+func (*TokenReviewStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
+
+func (m *UserInfo) Reset() { *m = UserInfo{} }
+func (*UserInfo) ProtoMessage() {}
+func (*UserInfo) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
+
+func init() {
+ proto.RegisterType((*ExtraValue)(nil), "k8s.io.kubernetes.pkg.apis.authentication.v1beta1.ExtraValue")
+ proto.RegisterType((*TokenReview)(nil), "k8s.io.kubernetes.pkg.apis.authentication.v1beta1.TokenReview")
+ proto.RegisterType((*TokenReviewSpec)(nil), "k8s.io.kubernetes.pkg.apis.authentication.v1beta1.TokenReviewSpec")
+ proto.RegisterType((*TokenReviewStatus)(nil), "k8s.io.kubernetes.pkg.apis.authentication.v1beta1.TokenReviewStatus")
+ proto.RegisterType((*UserInfo)(nil), "k8s.io.kubernetes.pkg.apis.authentication.v1beta1.UserInfo")
+}
+func (m ExtraValue) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m ExtraValue) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m) > 0 {
+ for _, s := range m {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *TokenReview) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *TokenReview) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n2, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n3, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ return i, nil
+}
+
+func (m *TokenReviewSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *TokenReviewSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Token)))
+ i += copy(dAtA[i:], m.Token)
+ return i, nil
+}
+
+func (m *TokenReviewStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *TokenReviewStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ if m.Authenticated {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.User.Size()))
+ n4, err := m.User.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Error)))
+ i += copy(dAtA[i:], m.Error)
+ return i, nil
+}
+
+func (m *UserInfo) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *UserInfo) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Username)))
+ i += copy(dAtA[i:], m.Username)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID)))
+ i += copy(dAtA[i:], m.UID)
+ if len(m.Groups) > 0 {
+ for _, s := range m.Groups {
+ dAtA[i] = 0x1a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Extra) > 0 {
+ keysForExtra := make([]string, 0, len(m.Extra))
+ for k := range m.Extra {
+ keysForExtra = append(keysForExtra, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
+ for _, k := range keysForExtra {
+ dAtA[i] = 0x22
+ i++
+ v := m.Extra[string(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n5, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ }
+ }
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m ExtraValue) Size() (n int) {
+ var l int
+ _ = l
+ if len(m) > 0 {
+ for _, s := range m {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *TokenReview) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *TokenReviewSpec) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Token)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *TokenReviewStatus) Size() (n int) {
+ var l int
+ _ = l
+ n += 2
+ l = m.User.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Error)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *UserInfo) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Username)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.UID)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Groups) > 0 {
+ for _, s := range m.Groups {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Extra) > 0 {
+ for k, v := range m.Extra {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *TokenReview) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&TokenReview{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "TokenReviewSpec", "TokenReviewSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "TokenReviewStatus", "TokenReviewStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *TokenReviewSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&TokenReviewSpec{`,
+ `Token:` + fmt.Sprintf("%v", this.Token) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *TokenReviewStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&TokenReviewStatus{`,
+ `Authenticated:` + fmt.Sprintf("%v", this.Authenticated) + `,`,
+ `User:` + strings.Replace(strings.Replace(this.User.String(), "UserInfo", "UserInfo", 1), `&`, ``, 1) + `,`,
+ `Error:` + fmt.Sprintf("%v", this.Error) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *UserInfo) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForExtra := make([]string, 0, len(this.Extra))
+ for k := range this.Extra {
+ keysForExtra = append(keysForExtra, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
+ mapStringForExtra := "map[string]ExtraValue{"
+ for _, k := range keysForExtra {
+ mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k])
+ }
+ mapStringForExtra += "}"
+ s := strings.Join([]string{`&UserInfo{`,
+ `Username:` + fmt.Sprintf("%v", this.Username) + `,`,
+ `UID:` + fmt.Sprintf("%v", this.UID) + `,`,
+ `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`,
+ `Extra:` + mapStringForExtra + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *ExtraValue) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExtraValue: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExtraValue: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ *m = append(*m, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *TokenReview) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: TokenReview: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: TokenReview: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *TokenReviewSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: TokenReviewSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: TokenReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Token = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *TokenReviewStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: TokenReviewStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: TokenReviewStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Authenticated", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Authenticated = bool(v != 0)
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.User.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Error = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *UserInfo) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: UserInfo: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: UserInfo: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Username = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.UID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Extra", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Extra == nil {
+ m.Extra = make(map[string]ExtraValue)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &ExtraValue{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Extra[mapkey] = *mapvalue
+ } else {
+ var mapvalue ExtraValue
+ m.Extra[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/kubernetes/pkg/apis/authentication/v1beta1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 647 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0x4f, 0x6f, 0xd3, 0x4e,
+ 0x10, 0xb5, 0xf3, 0xa7, 0xbf, 0x64, 0xf3, 0x2b, 0x94, 0x95, 0x90, 0xa2, 0x48, 0x38, 0x51, 0xb8,
+ 0xf4, 0x40, 0xd7, 0xa4, 0xa0, 0x52, 0xb5, 0xe2, 0x50, 0xab, 0x05, 0xf5, 0x80, 0x90, 0xb6, 0x94,
+ 0x03, 0x12, 0x12, 0x1b, 0x67, 0xea, 0x18, 0xd7, 0x7f, 0xb4, 0x5e, 0xa7, 0xf4, 0xd6, 0x8f, 0xc0,
+ 0x91, 0x23, 0xdf, 0x85, 0x4b, 0x8f, 0x3d, 0x70, 0xe8, 0x01, 0x45, 0xc4, 0x7c, 0x11, 0xb4, 0xeb,
+ 0xa5, 0x49, 0x1b, 0x55, 0x88, 0xf6, 0xe6, 0x7d, 0x33, 0xef, 0xcd, 0x9b, 0x19, 0x0f, 0xda, 0x0a,
+ 0xd6, 0x53, 0xe2, 0xc7, 0x76, 0x90, 0xf5, 0x81, 0x47, 0x20, 0x20, 0xb5, 0x93, 0xc0, 0xb3, 0x59,
+ 0xe2, 0xa7, 0x36, 0xcb, 0xc4, 0x10, 0x22, 0xe1, 0xbb, 0x4c, 0xf8, 0x71, 0x64, 0x8f, 0x7a, 0x7d,
+ 0x10, 0xac, 0x67, 0x7b, 0x10, 0x01, 0x67, 0x02, 0x06, 0x24, 0xe1, 0xb1, 0x88, 0x71, 0xaf, 0x90,
+ 0x20, 0x53, 0x09, 0x92, 0x04, 0x1e, 0x91, 0x12, 0xe4, 0xb2, 0x04, 0xd1, 0x12, 0xad, 0x15, 0xcf,
+ 0x17, 0xc3, 0xac, 0x4f, 0xdc, 0x38, 0xb4, 0xbd, 0xd8, 0x8b, 0x6d, 0xa5, 0xd4, 0xcf, 0x0e, 0xd4,
+ 0x4b, 0x3d, 0xd4, 0x57, 0x51, 0xa1, 0xf5, 0x54, 0x9b, 0x64, 0x89, 0x1f, 0x32, 0x77, 0xe8, 0x47,
+ 0xc0, 0x8f, 0xa7, 0x36, 0x43, 0x10, 0xcc, 0x1e, 0xcd, 0xf9, 0x6a, 0xd9, 0xd7, 0xb1, 0x78, 0x16,
+ 0x09, 0x3f, 0x84, 0x39, 0xc2, 0xda, 0xdf, 0x08, 0xa9, 0x3b, 0x84, 0x90, 0xcd, 0xf1, 0x9e, 0x5c,
+ 0xc7, 0xcb, 0x84, 0x7f, 0x68, 0xfb, 0x91, 0x48, 0x05, 0xbf, 0x4a, 0xea, 0x3e, 0x43, 0x68, 0xe7,
+ 0x93, 0xe0, 0xec, 0x2d, 0x3b, 0xcc, 0x00, 0xb7, 0x51, 0xd5, 0x17, 0x10, 0xa6, 0x4d, 0xb3, 0x53,
+ 0x5e, 0xae, 0x3b, 0xf5, 0x7c, 0xdc, 0xae, 0xee, 0x4a, 0x80, 0x16, 0xf8, 0x46, 0xed, 0xcb, 0xd7,
+ 0xb6, 0x71, 0xf2, 0xa3, 0x63, 0x74, 0xbf, 0x95, 0x50, 0xe3, 0x4d, 0x1c, 0x40, 0x44, 0x61, 0xe4,
+ 0xc3, 0x11, 0xfe, 0x80, 0x6a, 0x72, 0x02, 0x03, 0x26, 0x58, 0xd3, 0xec, 0x98, 0xcb, 0x8d, 0xd5,
+ 0xc7, 0x44, 0x6f, 0x64, 0xd6, 0xd0, 0x74, 0x27, 0x32, 0x9b, 0x8c, 0x7a, 0xe4, 0x75, 0xff, 0x23,
+ 0xb8, 0xe2, 0x15, 0x08, 0xe6, 0xe0, 0xd3, 0x71, 0xdb, 0xc8, 0xc7, 0x6d, 0x34, 0xc5, 0xe8, 0x85,
+ 0x2a, 0x1e, 0xa0, 0x4a, 0x9a, 0x80, 0xdb, 0x2c, 0x29, 0x75, 0x87, 0xfc, 0xf3, 0xbe, 0xc9, 0x8c,
+ 0xdf, 0xbd, 0x04, 0x5c, 0xe7, 0x7f, 0x5d, 0xaf, 0x22, 0x5f, 0x54, 0xa9, 0xe3, 0x43, 0xb4, 0x90,
+ 0x0a, 0x26, 0xb2, 0xb4, 0x59, 0x56, 0x75, 0xb6, 0x6f, 0x59, 0x47, 0x69, 0x39, 0x77, 0x74, 0xa5,
+ 0x85, 0xe2, 0x4d, 0x75, 0x8d, 0xee, 0x1a, 0xba, 0x7b, 0xc5, 0x14, 0x7e, 0x88, 0xaa, 0x42, 0x42,
+ 0x6a, 0x8a, 0x75, 0x67, 0x51, 0x33, 0xab, 0x45, 0x5e, 0x11, 0xeb, 0x7e, 0x37, 0xd1, 0xbd, 0xb9,
+ 0x2a, 0x78, 0x13, 0x2d, 0xce, 0x38, 0x82, 0x81, 0x92, 0xa8, 0x39, 0xf7, 0xb5, 0xc4, 0xe2, 0xd6,
+ 0x6c, 0x90, 0x5e, 0xce, 0xc5, 0xef, 0x51, 0x25, 0x4b, 0x81, 0xeb, 0xf1, 0x6e, 0xde, 0xa0, 0xed,
+ 0xfd, 0x14, 0xf8, 0x6e, 0x74, 0x10, 0x4f, 0xe7, 0x2a, 0x11, 0xaa, 0x64, 0x65, 0x5b, 0xc0, 0x79,
+ 0xcc, 0xd5, 0x58, 0x67, 0xda, 0xda, 0x91, 0x20, 0x2d, 0x62, 0xdd, 0x49, 0x09, 0xd5, 0xfe, 0xa8,
+ 0xe0, 0x47, 0xa8, 0x26, 0x99, 0x11, 0x0b, 0x41, 0xcf, 0x62, 0x49, 0x93, 0x54, 0x8e, 0xc4, 0xe9,
+ 0x45, 0x06, 0x7e, 0x80, 0xca, 0x99, 0x3f, 0x50, 0xee, 0xeb, 0x4e, 0x43, 0x27, 0x96, 0xf7, 0x77,
+ 0xb7, 0xa9, 0xc4, 0x71, 0x17, 0x2d, 0x78, 0x3c, 0xce, 0x12, 0xb9, 0x56, 0xf9, 0x6b, 0x23, 0xb9,
+ 0x8c, 0x97, 0x0a, 0xa1, 0x3a, 0x82, 0x03, 0x54, 0x05, 0x79, 0x0b, 0xcd, 0x4a, 0xa7, 0xbc, 0xdc,
+ 0x58, 0x7d, 0x71, 0x8b, 0x11, 0x10, 0x75, 0x54, 0x3b, 0x91, 0xe0, 0xc7, 0x33, 0xad, 0x4a, 0x8c,
+ 0x16, 0x35, 0x5a, 0x47, 0xfa, 0xf0, 0x54, 0x0e, 0x5e, 0x42, 0xe5, 0x00, 0x8e, 0x8b, 0x36, 0xa9,
+ 0xfc, 0xc4, 0x7b, 0xa8, 0x3a, 0x92, 0x37, 0xa9, 0xf7, 0xf1, 0xfc, 0x06, 0x66, 0xa6, 0x87, 0x4d,
+ 0x0b, 0xad, 0x8d, 0xd2, 0xba, 0xe9, 0xac, 0x9c, 0x4e, 0x2c, 0xe3, 0x6c, 0x62, 0x19, 0xe7, 0x13,
+ 0xcb, 0x38, 0xc9, 0x2d, 0xf3, 0x34, 0xb7, 0xcc, 0xb3, 0xdc, 0x32, 0xcf, 0x73, 0xcb, 0xfc, 0x99,
+ 0x5b, 0xe6, 0xe7, 0x5f, 0x96, 0xf1, 0xee, 0x3f, 0x2d, 0xf2, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x35,
+ 0x3c, 0x74, 0xb0, 0x9a, 0x05, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/generated.proto
new file mode 100644
index 000000000..6ae022f7d
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/generated.proto
@@ -0,0 +1,99 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.pkg.apis.authentication.v1beta1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1beta1";
+
+// ExtraValue masks the value so protobuf can generate
+// +protobuf.nullable=true
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+message ExtraValue {
+ // items, if empty, will result in an empty slice
+
+ repeated string items = 1;
+}
+
+// TokenReview attempts to authenticate a token to a known user.
+// Note: TokenReview requests may be cached by the webhook token authenticator
+// plugin in the kube-apiserver.
+message TokenReview {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec holds information about the request being evaluated
+ optional TokenReviewSpec spec = 2;
+
+ // Status is filled in by the server and indicates whether the request can be authenticated.
+ // +optional
+ optional TokenReviewStatus status = 3;
+}
+
+// TokenReviewSpec is a description of the token authentication request.
+message TokenReviewSpec {
+ // Token is the opaque bearer token.
+ // +optional
+ optional string token = 1;
+}
+
+// TokenReviewStatus is the result of the token authentication request.
+message TokenReviewStatus {
+ // Authenticated indicates that the token was associated with a known user.
+ // +optional
+ optional bool authenticated = 1;
+
+ // User is the UserInfo associated with the provided token.
+ // +optional
+ optional UserInfo user = 2;
+
+ // Error indicates that the token couldn't be checked
+ // +optional
+ optional string error = 3;
+}
+
+// UserInfo holds the information about the user needed to implement the
+// user.Info interface.
+message UserInfo {
+ // The name that uniquely identifies this user among all active users.
+ // +optional
+ optional string username = 1;
+
+ // A unique value that identifies this user across time. If this user is
+ // deleted and another user by the same name is added, they will have
+ // different UIDs.
+ // +optional
+ optional string uid = 2;
+
+ // The names of groups this user is a part of.
+ // +optional
+ repeated string groups = 3;
+
+ // Any additional information provided by the authenticator.
+ // +optional
+ map<string, ExtraValue> extra = 4;
+}
+
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/register.go
new file mode 100644
index 000000000..d3ae1e4bc
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/register.go
@@ -0,0 +1,58 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "authentication.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &TokenReview{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/types.generated.go
new file mode 100644
index 000000000..b8990af18
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/types.generated.go
@@ -0,0 +1,1568 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1beta1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ pkg2_types "k8s.io/apimachinery/pkg/types"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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 pkg1_v1.TypeMeta
+ var v1 pkg2_types.UID
+ var v2 time.Time
+ _, _, _ = v0, v1, v2
+ }
+}
+
+func (x *TokenReview) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[4] = true
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *TokenReview) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *TokenReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = TokenReviewSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = TokenReviewStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *TokenReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = TokenReviewSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = TokenReviewStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *TokenReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = x.Token != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Token))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("token"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Token))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *TokenReviewSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *TokenReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "token":
+ if r.TryDecodeAsNil() {
+ x.Token = ""
+ } else {
+ yyv4 := &x.Token
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *TokenReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Token = ""
+ } else {
+ yyv7 := &x.Token
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*string)(yyv7)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *TokenReviewStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Authenticated != false
+ yyq2[1] = true
+ yyq2[2] = x.Error != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Authenticated))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("authenticated"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Authenticated))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yy7 := &x.User
+ yy7.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("user"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.User
+ yy9.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Error))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("error"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Error))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *TokenReviewStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *TokenReviewStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "authenticated":
+ if r.TryDecodeAsNil() {
+ x.Authenticated = false
+ } else {
+ yyv4 := &x.Authenticated
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*bool)(yyv4)) = r.DecodeBool()
+ }
+ }
+ case "user":
+ if r.TryDecodeAsNil() {
+ x.User = UserInfo{}
+ } else {
+ yyv6 := &x.User
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "error":
+ if r.TryDecodeAsNil() {
+ x.Error = ""
+ } else {
+ yyv7 := &x.Error
+ 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_containerMapEnd1234)
+}
+
+func (x *TokenReviewStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Authenticated = false
+ } else {
+ yyv10 := &x.Authenticated
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.User = UserInfo{}
+ } else {
+ yyv12 := &x.User
+ yyv12.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Error = ""
+ } else {
+ yyv13 := &x.Error
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *UserInfo) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Username != ""
+ yyq2[1] = x.UID != ""
+ yyq2[2] = len(x.Groups) != 0
+ yyq2[3] = len(x.Extra) != 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Username))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("username"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Username))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.UID))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("uid"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.UID))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Groups == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Groups, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("groups"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Groups == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Groups, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Extra == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("extra"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Extra == nil {
+ r.EncodeNil()
+ } else {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *UserInfo) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *UserInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "username":
+ if r.TryDecodeAsNil() {
+ x.Username = ""
+ } else {
+ yyv4 := &x.Username
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "uid":
+ if r.TryDecodeAsNil() {
+ x.UID = ""
+ } else {
+ yyv6 := &x.UID
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "groups":
+ if r.TryDecodeAsNil() {
+ x.Groups = nil
+ } else {
+ yyv8 := &x.Groups
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv8, false, d)
+ }
+ }
+ case "extra":
+ if r.TryDecodeAsNil() {
+ x.Extra = nil
+ } else {
+ yyv10 := &x.Extra
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decMapstringExtraValue((*map[string]ExtraValue)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *UserInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Username = ""
+ } else {
+ yyv13 := &x.Username
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UID = ""
+ } else {
+ yyv15 := &x.UID
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Groups = nil
+ } else {
+ yyv17 := &x.Groups
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv17, false, d)
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Extra = nil
+ } else {
+ yyv19 := &x.Extra
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decMapstringExtraValue((*map[string]ExtraValue)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x ExtraValue) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 {
+ h.encExtraValue((ExtraValue)(x), e)
+ }
+ }
+}
+
+func (x *ExtraValue) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ h.decExtraValue((*ExtraValue)(x), d)
+ }
+}
+
+func (x codecSelfer1234) encMapstringExtraValue(v map[string]ExtraValue, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeMapStart(len(v))
+ for yyk1, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ yym2 := z.EncBinary()
+ _ = yym2
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yyk1))
+ }
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyv1 == nil {
+ r.EncodeNil()
+ } else {
+ yyv1.CodecEncodeSelf(e)
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) decMapstringExtraValue(v *map[string]ExtraValue, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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, 40)
+ yyv1 = make(map[string]ExtraValue, yyrl1)
+ *v = yyv1
+ }
+ var yymk1 string
+ var yymv1 ExtraValue
+ var yymg1 bool
+ if yybh1.MapValueReset {
+ yymg1 = true
+ }
+ if yyl1 > 0 {
+ for yyj1 := 0; yyj1 < yyl1; yyj1++ {
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ if r.TryDecodeAsNil() {
+ yymk1 = ""
+ } else {
+ yyv2 := &yymk1
+ yym3 := z.DecBinary()
+ _ = yym3
+ if false {
+ } else {
+ *((*string)(yyv2)) = r.DecodeString()
+ }
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv4 := &yymv1
+ yyv4.CodecDecodeSelf(d)
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } else if yyl1 < 0 {
+ for yyj1 := 0; !r.CheckBreak(); yyj1++ {
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ if r.TryDecodeAsNil() {
+ yymk1 = ""
+ } else {
+ yyv5 := &yymk1
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*string)(yyv5)) = r.DecodeString()
+ }
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv7 := &yymv1
+ yyv7.CodecDecodeSelf(d)
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } // else len==0: TODO: Should we clear map entries?
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) encExtraValue(v ExtraValue, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym2 := z.EncBinary()
+ _ = yym2
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yyv1))
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decExtraValue(v *ExtraValue, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []string{}
+ 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) {
+
+ yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]string, yyrl1)
+ }
+ } else {
+ yyv1 = make([]string, yyrl1)
+ }
+ yyc1 = true
+ yyrr1 = len(yyv1)
+ } else if yyl1 != len(yyv1) {
+ yyv1 = yyv1[:yyl1]
+ yyc1 = true
+ }
+ yyj1 := 0
+ for ; yyj1 < yyrr1; yyj1++ {
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yym3 := z.DecBinary()
+ _ = yym3
+ if false {
+ } else {
+ *((*string)(yyv2)) = r.DecodeString()
+ }
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv4 := &yyv1[yyj1]
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, "") // var yyz1 string
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv6 := &yyv1[yyj1]
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+
+ } else {
+ z.DecSwallow()
+ }
+
+ }
+ if yyj1 < len(yyv1) {
+ yyv1 = yyv1[:yyj1]
+ yyc1 = true
+ } else if yyj1 == 0 && yyv1 == nil {
+ yyv1 = []string{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/types.go
new file mode 100644
index 000000000..57c96e3bc
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/types.go
@@ -0,0 +1,91 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "fmt"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+// +noMethods=true
+
+// TokenReview attempts to authenticate a token to a known user.
+// Note: TokenReview requests may be cached by the webhook token authenticator
+// plugin in the kube-apiserver.
+type TokenReview struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec holds information about the request being evaluated
+ Spec TokenReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is filled in by the server and indicates whether the request can be authenticated.
+ // +optional
+ Status TokenReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// TokenReviewSpec is a description of the token authentication request.
+type TokenReviewSpec struct {
+ // Token is the opaque bearer token.
+ // +optional
+ Token string `json:"token,omitempty" protobuf:"bytes,1,opt,name=token"`
+}
+
+// TokenReviewStatus is the result of the token authentication request.
+type TokenReviewStatus struct {
+ // Authenticated indicates that the token was associated with a known user.
+ // +optional
+ Authenticated bool `json:"authenticated,omitempty" protobuf:"varint,1,opt,name=authenticated"`
+ // User is the UserInfo associated with the provided token.
+ // +optional
+ User UserInfo `json:"user,omitempty" protobuf:"bytes,2,opt,name=user"`
+ // Error indicates that the token couldn't be checked
+ // +optional
+ Error string `json:"error,omitempty" protobuf:"bytes,3,opt,name=error"`
+}
+
+// UserInfo holds the information about the user needed to implement the
+// user.Info interface.
+type UserInfo struct {
+ // The name that uniquely identifies this user among all active users.
+ // +optional
+ Username string `json:"username,omitempty" protobuf:"bytes,1,opt,name=username"`
+ // A unique value that identifies this user across time. If this user is
+ // deleted and another user by the same name is added, they will have
+ // different UIDs.
+ // +optional
+ UID string `json:"uid,omitempty" protobuf:"bytes,2,opt,name=uid"`
+ // The names of groups this user is a part of.
+ // +optional
+ Groups []string `json:"groups,omitempty" protobuf:"bytes,3,rep,name=groups"`
+ // Any additional information provided by the authenticator.
+ // +optional
+ Extra map[string]ExtraValue `json:"extra,omitempty" protobuf:"bytes,4,rep,name=extra"`
+}
+
+// ExtraValue masks the value so protobuf can generate
+// +protobuf.nullable=true
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+type ExtraValue []string
+
+func (t ExtraValue) String() string {
+ return fmt.Sprintf("%v", []string(t))
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..f910bea6f
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/types_swagger_doc_generated.go
@@ -0,0 +1,72 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_TokenReview = map[string]string{
+ "": "TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.",
+ "spec": "Spec holds information about the request being evaluated",
+ "status": "Status is filled in by the server and indicates whether the request can be authenticated.",
+}
+
+func (TokenReview) SwaggerDoc() map[string]string {
+ return map_TokenReview
+}
+
+var map_TokenReviewSpec = map[string]string{
+ "": "TokenReviewSpec is a description of the token authentication request.",
+ "token": "Token is the opaque bearer token.",
+}
+
+func (TokenReviewSpec) SwaggerDoc() map[string]string {
+ return map_TokenReviewSpec
+}
+
+var map_TokenReviewStatus = map[string]string{
+ "": "TokenReviewStatus is the result of the token authentication request.",
+ "authenticated": "Authenticated indicates that the token was associated with a known user.",
+ "user": "User is the UserInfo associated with the provided token.",
+ "error": "Error indicates that the token couldn't be checked",
+}
+
+func (TokenReviewStatus) SwaggerDoc() map[string]string {
+ return map_TokenReviewStatus
+}
+
+var map_UserInfo = map[string]string{
+ "": "UserInfo holds the information about the user needed to implement the user.Info interface.",
+ "username": "The name that uniquely identifies this user among all active users.",
+ "uid": "A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.",
+ "groups": "The names of groups this user is a part of.",
+ "extra": "Any additional information provided by the authenticator.",
+}
+
+func (UserInfo) SwaggerDoc() map[string]string {
+ return map_UserInfo
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/zz_generated.conversion.go
new file mode 100644
index 000000000..775227082
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/zz_generated.conversion.go
@@ -0,0 +1,153 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ authentication "k8s.io/kubernetes/pkg/apis/authentication"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1beta1_TokenReview_To_authentication_TokenReview,
+ Convert_authentication_TokenReview_To_v1beta1_TokenReview,
+ Convert_v1beta1_TokenReviewSpec_To_authentication_TokenReviewSpec,
+ Convert_authentication_TokenReviewSpec_To_v1beta1_TokenReviewSpec,
+ Convert_v1beta1_TokenReviewStatus_To_authentication_TokenReviewStatus,
+ Convert_authentication_TokenReviewStatus_To_v1beta1_TokenReviewStatus,
+ Convert_v1beta1_UserInfo_To_authentication_UserInfo,
+ Convert_authentication_UserInfo_To_v1beta1_UserInfo,
+ )
+}
+
+func autoConvert_v1beta1_TokenReview_To_authentication_TokenReview(in *TokenReview, out *authentication.TokenReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1beta1_TokenReviewSpec_To_authentication_TokenReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_TokenReviewStatus_To_authentication_TokenReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_TokenReview_To_authentication_TokenReview is an autogenerated conversion function.
+func Convert_v1beta1_TokenReview_To_authentication_TokenReview(in *TokenReview, out *authentication.TokenReview, s conversion.Scope) error {
+ return autoConvert_v1beta1_TokenReview_To_authentication_TokenReview(in, out, s)
+}
+
+func autoConvert_authentication_TokenReview_To_v1beta1_TokenReview(in *authentication.TokenReview, out *TokenReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_authentication_TokenReviewSpec_To_v1beta1_TokenReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_authentication_TokenReviewStatus_To_v1beta1_TokenReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_authentication_TokenReview_To_v1beta1_TokenReview is an autogenerated conversion function.
+func Convert_authentication_TokenReview_To_v1beta1_TokenReview(in *authentication.TokenReview, out *TokenReview, s conversion.Scope) error {
+ return autoConvert_authentication_TokenReview_To_v1beta1_TokenReview(in, out, s)
+}
+
+func autoConvert_v1beta1_TokenReviewSpec_To_authentication_TokenReviewSpec(in *TokenReviewSpec, out *authentication.TokenReviewSpec, s conversion.Scope) error {
+ out.Token = in.Token
+ return nil
+}
+
+// Convert_v1beta1_TokenReviewSpec_To_authentication_TokenReviewSpec is an autogenerated conversion function.
+func Convert_v1beta1_TokenReviewSpec_To_authentication_TokenReviewSpec(in *TokenReviewSpec, out *authentication.TokenReviewSpec, s conversion.Scope) error {
+ return autoConvert_v1beta1_TokenReviewSpec_To_authentication_TokenReviewSpec(in, out, s)
+}
+
+func autoConvert_authentication_TokenReviewSpec_To_v1beta1_TokenReviewSpec(in *authentication.TokenReviewSpec, out *TokenReviewSpec, s conversion.Scope) error {
+ out.Token = in.Token
+ return nil
+}
+
+// Convert_authentication_TokenReviewSpec_To_v1beta1_TokenReviewSpec is an autogenerated conversion function.
+func Convert_authentication_TokenReviewSpec_To_v1beta1_TokenReviewSpec(in *authentication.TokenReviewSpec, out *TokenReviewSpec, s conversion.Scope) error {
+ return autoConvert_authentication_TokenReviewSpec_To_v1beta1_TokenReviewSpec(in, out, s)
+}
+
+func autoConvert_v1beta1_TokenReviewStatus_To_authentication_TokenReviewStatus(in *TokenReviewStatus, out *authentication.TokenReviewStatus, s conversion.Scope) error {
+ out.Authenticated = in.Authenticated
+ if err := Convert_v1beta1_UserInfo_To_authentication_UserInfo(&in.User, &out.User, s); err != nil {
+ return err
+ }
+ out.Error = in.Error
+ return nil
+}
+
+// Convert_v1beta1_TokenReviewStatus_To_authentication_TokenReviewStatus is an autogenerated conversion function.
+func Convert_v1beta1_TokenReviewStatus_To_authentication_TokenReviewStatus(in *TokenReviewStatus, out *authentication.TokenReviewStatus, s conversion.Scope) error {
+ return autoConvert_v1beta1_TokenReviewStatus_To_authentication_TokenReviewStatus(in, out, s)
+}
+
+func autoConvert_authentication_TokenReviewStatus_To_v1beta1_TokenReviewStatus(in *authentication.TokenReviewStatus, out *TokenReviewStatus, s conversion.Scope) error {
+ out.Authenticated = in.Authenticated
+ if err := Convert_authentication_UserInfo_To_v1beta1_UserInfo(&in.User, &out.User, s); err != nil {
+ return err
+ }
+ out.Error = in.Error
+ return nil
+}
+
+// Convert_authentication_TokenReviewStatus_To_v1beta1_TokenReviewStatus is an autogenerated conversion function.
+func Convert_authentication_TokenReviewStatus_To_v1beta1_TokenReviewStatus(in *authentication.TokenReviewStatus, out *TokenReviewStatus, s conversion.Scope) error {
+ return autoConvert_authentication_TokenReviewStatus_To_v1beta1_TokenReviewStatus(in, out, s)
+}
+
+func autoConvert_v1beta1_UserInfo_To_authentication_UserInfo(in *UserInfo, out *authentication.UserInfo, s conversion.Scope) error {
+ out.Username = in.Username
+ out.UID = in.UID
+ out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups))
+ out.Extra = *(*map[string]authentication.ExtraValue)(unsafe.Pointer(&in.Extra))
+ return nil
+}
+
+// Convert_v1beta1_UserInfo_To_authentication_UserInfo is an autogenerated conversion function.
+func Convert_v1beta1_UserInfo_To_authentication_UserInfo(in *UserInfo, out *authentication.UserInfo, s conversion.Scope) error {
+ return autoConvert_v1beta1_UserInfo_To_authentication_UserInfo(in, out, s)
+}
+
+func autoConvert_authentication_UserInfo_To_v1beta1_UserInfo(in *authentication.UserInfo, out *UserInfo, s conversion.Scope) error {
+ out.Username = in.Username
+ out.UID = in.UID
+ out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups))
+ out.Extra = *(*map[string]ExtraValue)(unsafe.Pointer(&in.Extra))
+ return nil
+}
+
+// Convert_authentication_UserInfo_To_v1beta1_UserInfo is an autogenerated conversion function.
+func Convert_authentication_UserInfo_To_v1beta1_UserInfo(in *authentication.UserInfo, out *UserInfo, s conversion.Scope) error {
+ return autoConvert_authentication_UserInfo_To_v1beta1_UserInfo(in, out, s)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..0615678b4
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/zz_generated.deepcopy.go
@@ -0,0 +1,110 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_TokenReview, InType: reflect.TypeOf(&TokenReview{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_TokenReviewSpec, InType: reflect.TypeOf(&TokenReviewSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_TokenReviewStatus, InType: reflect.TypeOf(&TokenReviewStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_UserInfo, InType: reflect.TypeOf(&UserInfo{})},
+ )
+}
+
+// DeepCopy_v1beta1_TokenReview is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_TokenReview(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*TokenReview)
+ out := out.(*TokenReview)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_TokenReviewStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_TokenReviewSpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_TokenReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*TokenReviewSpec)
+ out := out.(*TokenReviewSpec)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_TokenReviewStatus is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_TokenReviewStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*TokenReviewStatus)
+ out := out.(*TokenReviewStatus)
+ *out = *in
+ if err := DeepCopy_v1beta1_UserInfo(&in.User, &out.User, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_UserInfo is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_UserInfo(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*UserInfo)
+ out := out.(*UserInfo)
+ *out = *in
+ if in.Groups != nil {
+ in, out := &in.Groups, &out.Groups
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Extra != nil {
+ in, out := &in.Extra, &out.Extra
+ *out = make(map[string]ExtraValue)
+ for key, val := range *in {
+ if newVal, err := c.DeepCopy(&val); err != nil {
+ return err
+ } else {
+ (*out)[key] = *newVal.(*ExtraValue)
+ }
+ }
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/zz_generated.defaults.go
new file mode 100644
index 000000000..e24e70be3
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/zz_generated.defaults.go
@@ -0,0 +1,32 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/zz_generated.deepcopy.go
new file mode 100644
index 000000000..f3b47e840
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/zz_generated.deepcopy.go
@@ -0,0 +1,110 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package authentication
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_TokenReview, InType: reflect.TypeOf(&TokenReview{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_TokenReviewSpec, InType: reflect.TypeOf(&TokenReviewSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_TokenReviewStatus, InType: reflect.TypeOf(&TokenReviewStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authentication_UserInfo, InType: reflect.TypeOf(&UserInfo{})},
+ )
+}
+
+// DeepCopy_authentication_TokenReview is an autogenerated deepcopy function.
+func DeepCopy_authentication_TokenReview(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*TokenReview)
+ out := out.(*TokenReview)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_authentication_TokenReviewStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_authentication_TokenReviewSpec is an autogenerated deepcopy function.
+func DeepCopy_authentication_TokenReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*TokenReviewSpec)
+ out := out.(*TokenReviewSpec)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_authentication_TokenReviewStatus is an autogenerated deepcopy function.
+func DeepCopy_authentication_TokenReviewStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*TokenReviewStatus)
+ out := out.(*TokenReviewStatus)
+ *out = *in
+ if err := DeepCopy_authentication_UserInfo(&in.User, &out.User, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_authentication_UserInfo is an autogenerated deepcopy function.
+func DeepCopy_authentication_UserInfo(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*UserInfo)
+ out := out.(*UserInfo)
+ *out = *in
+ if in.Groups != nil {
+ in, out := &in.Groups, &out.Groups
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Extra != nil {
+ in, out := &in.Extra, &out.Extra
+ *out = make(map[string]ExtraValue)
+ for key, val := range *in {
+ if newVal, err := c.DeepCopy(&val); err != nil {
+ return err
+ } else {
+ (*out)[key] = *newVal.(*ExtraValue)
+ }
+ }
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/doc.go
new file mode 100644
index 000000000..29f9b6242
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +groupName=authorization.k8s.io
+package authorization // import "k8s.io/kubernetes/pkg/apis/authorization"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/install/install.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/install/install.go
new file mode 100644
index 000000000..1b82992f6
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/install/install.go
@@ -0,0 +1,53 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package install installs the experimental API group, making it available as
+// an option to all of the API encoding/decoding machinery.
+package install
+
+import (
+ "k8s.io/apimachinery/pkg/apimachinery/announced"
+ "k8s.io/apimachinery/pkg/apimachinery/registered"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/sets"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/authorization"
+ "k8s.io/kubernetes/pkg/apis/authorization/v1"
+ "k8s.io/kubernetes/pkg/apis/authorization/v1beta1"
+)
+
+func init() {
+ Install(api.GroupFactoryRegistry, api.Registry, api.Scheme)
+}
+
+// Install registers the API group and adds types to a scheme
+func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
+ if err := announced.NewGroupMetaFactory(
+ &announced.GroupMetaFactoryArgs{
+ GroupName: authorization.GroupName,
+ VersionPreferenceOrder: []string{v1.SchemeGroupVersion.Version, v1beta1.SchemeGroupVersion.Version},
+ ImportPrefix: "k8s.io/kubernetes/pkg/apis/authorization",
+ RootScopedKinds: sets.NewString("SubjectAccessReview", "SelfSubjectAccessReview"),
+ AddInternalObjectsToScheme: authorization.AddToScheme,
+ },
+ announced.VersionToSchemeFunc{
+ v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme,
+ v1.SchemeGroupVersion.Version: v1.AddToScheme,
+ },
+ ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil {
+ panic(err)
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/register.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/register.go
new file mode 100644
index 000000000..5693885e4
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/register.go
@@ -0,0 +1,52 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package authorization
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "authorization.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &SelfSubjectAccessReview{},
+ &SubjectAccessReview{},
+ &LocalSubjectAccessReview{},
+ )
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/types.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/types.go
new file mode 100644
index 000000000..d8ccfaf35
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/types.go
@@ -0,0 +1,146 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package authorization
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+// +noMethods=true
+
+// SubjectAccessReview checks whether or not a user or group can perform an action. Not filling in a
+// spec.namespace means "in all namespaces".
+type SubjectAccessReview struct {
+ metav1.TypeMeta
+ metav1.ObjectMeta
+
+ // Spec holds information about the request being evaluated
+ Spec SubjectAccessReviewSpec
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ Status SubjectAccessReviewStatus
+}
+
+// +genclient=true
+// +nonNamespaced=true
+// +noMethods=true
+
+// SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a
+// spec.namespace means "in all namespaces". Self is a special case, because users should always be able
+// to check whether they can perform an action
+type SelfSubjectAccessReview struct {
+ metav1.TypeMeta
+ metav1.ObjectMeta
+
+ // Spec holds information about the request being evaluated.
+ Spec SelfSubjectAccessReviewSpec
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ Status SubjectAccessReviewStatus
+}
+
+// +genclient=true
+// +noMethods=true
+
+// LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace.
+// Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions
+// checking.
+type LocalSubjectAccessReview struct {
+ metav1.TypeMeta
+ metav1.ObjectMeta
+
+ // Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace
+ // you made the request against. If empty, it is defaulted.
+ Spec SubjectAccessReviewSpec
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ Status SubjectAccessReviewStatus
+}
+
+// ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface
+type ResourceAttributes struct {
+ // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces
+ // "" (empty) is defaulted for LocalSubjectAccessReviews
+ // "" (empty) is empty for cluster-scoped resources
+ // "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
+ Namespace string
+ // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all.
+ Verb string
+ // Group is the API Group of the Resource. "*" means all.
+ Group string
+ // Version is the API Version of the Resource. "*" means all.
+ Version string
+ // Resource is one of the existing resource types. "*" means all.
+ Resource string
+ // Subresource is one of the existing resource types. "" means none.
+ Subresource string
+ // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all.
+ Name string
+}
+
+// NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface
+type NonResourceAttributes struct {
+ // Path is the URL path of the request
+ Path string
+ // Verb is the standard HTTP verb
+ Verb string
+}
+
+// SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAttributes
+// and NonResourceAttributes must be set
+type SubjectAccessReviewSpec struct {
+ // ResourceAttributes describes information for a resource access request
+ ResourceAttributes *ResourceAttributes
+ // NonResourceAttributes describes information for a non-resource access request
+ NonResourceAttributes *NonResourceAttributes
+
+ // User is the user you're testing for.
+ // If you specify "User" but not "Group", then is it interpreted as "What if User were not a member of any groups
+ User string
+ // Groups is the groups you're testing for.
+ Groups []string
+ // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer
+ // it needs a reflection here.
+ Extra map[string]ExtraValue
+}
+
+// ExtraValue masks the value so protobuf can generate
+// +protobuf.nullable=true
+type ExtraValue []string
+
+// SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAttributes
+// and NonResourceAttributes must be set
+type SelfSubjectAccessReviewSpec struct {
+ // ResourceAttributes describes information for a resource access request
+ ResourceAttributes *ResourceAttributes
+ // NonResourceAttributes describes information for a non-resource access request
+ NonResourceAttributes *NonResourceAttributes
+}
+
+// SubjectAccessReviewStatus
+type SubjectAccessReviewStatus struct {
+ // Allowed is required. True if the action would be allowed, false otherwise.
+ Allowed bool
+ // Reason is optional. It indicates why a request was allowed or denied.
+ Reason string
+ // EvaluationError is an indication that some error occurred during the authorization check.
+ // It is entirely possible to get an error and be able to continue determine authorization status in spite of it.
+ // For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.
+ EvaluationError string
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/conversion.go
new file mode 100644
index 000000000..2ff5732d6
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/conversion.go
@@ -0,0 +1,26 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) error {
+ // Add non-generated conversion functions
+ return scheme.AddConversionFuncs()
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/defaults.go
new file mode 100644
index 000000000..074e15bae
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/defaults.go
@@ -0,0 +1,25 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/doc.go
new file mode 100644
index 000000000..f7c0a3580
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/doc.go
@@ -0,0 +1,23 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/authorization
+// +k8s:openapi-gen=true
+// +k8s:defaulter-gen=TypeMeta
+
+// +groupName=authorization.k8s.io
+package v1 // import "k8s.io/kubernetes/pkg/apis/authorization/v1"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/generated.pb.go
new file mode 100644
index 000000000..3626a5169
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/generated.pb.go
@@ -0,0 +1,2364 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/authorization/v1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/authorization/v1/generated.proto
+
+ It has these top-level messages:
+ ExtraValue
+ LocalSubjectAccessReview
+ NonResourceAttributes
+ ResourceAttributes
+ SelfSubjectAccessReview
+ SelfSubjectAccessReviewSpec
+ SubjectAccessReview
+ SubjectAccessReviewSpec
+ SubjectAccessReviewStatus
+*/
+package v1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *ExtraValue) Reset() { *m = ExtraValue{} }
+func (*ExtraValue) ProtoMessage() {}
+func (*ExtraValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *LocalSubjectAccessReview) Reset() { *m = LocalSubjectAccessReview{} }
+func (*LocalSubjectAccessReview) ProtoMessage() {}
+func (*LocalSubjectAccessReview) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{1}
+}
+
+func (m *NonResourceAttributes) Reset() { *m = NonResourceAttributes{} }
+func (*NonResourceAttributes) ProtoMessage() {}
+func (*NonResourceAttributes) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
+
+func (m *ResourceAttributes) Reset() { *m = ResourceAttributes{} }
+func (*ResourceAttributes) ProtoMessage() {}
+func (*ResourceAttributes) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
+
+func (m *SelfSubjectAccessReview) Reset() { *m = SelfSubjectAccessReview{} }
+func (*SelfSubjectAccessReview) ProtoMessage() {}
+func (*SelfSubjectAccessReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
+
+func (m *SelfSubjectAccessReviewSpec) Reset() { *m = SelfSubjectAccessReviewSpec{} }
+func (*SelfSubjectAccessReviewSpec) ProtoMessage() {}
+func (*SelfSubjectAccessReviewSpec) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{5}
+}
+
+func (m *SubjectAccessReview) Reset() { *m = SubjectAccessReview{} }
+func (*SubjectAccessReview) ProtoMessage() {}
+func (*SubjectAccessReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
+
+func (m *SubjectAccessReviewSpec) Reset() { *m = SubjectAccessReviewSpec{} }
+func (*SubjectAccessReviewSpec) ProtoMessage() {}
+func (*SubjectAccessReviewSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
+
+func (m *SubjectAccessReviewStatus) Reset() { *m = SubjectAccessReviewStatus{} }
+func (*SubjectAccessReviewStatus) ProtoMessage() {}
+func (*SubjectAccessReviewStatus) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{8}
+}
+
+func init() {
+ proto.RegisterType((*ExtraValue)(nil), "k8s.io.kubernetes.pkg.apis.authorization.v1.ExtraValue")
+ proto.RegisterType((*LocalSubjectAccessReview)(nil), "k8s.io.kubernetes.pkg.apis.authorization.v1.LocalSubjectAccessReview")
+ proto.RegisterType((*NonResourceAttributes)(nil), "k8s.io.kubernetes.pkg.apis.authorization.v1.NonResourceAttributes")
+ proto.RegisterType((*ResourceAttributes)(nil), "k8s.io.kubernetes.pkg.apis.authorization.v1.ResourceAttributes")
+ proto.RegisterType((*SelfSubjectAccessReview)(nil), "k8s.io.kubernetes.pkg.apis.authorization.v1.SelfSubjectAccessReview")
+ proto.RegisterType((*SelfSubjectAccessReviewSpec)(nil), "k8s.io.kubernetes.pkg.apis.authorization.v1.SelfSubjectAccessReviewSpec")
+ proto.RegisterType((*SubjectAccessReview)(nil), "k8s.io.kubernetes.pkg.apis.authorization.v1.SubjectAccessReview")
+ proto.RegisterType((*SubjectAccessReviewSpec)(nil), "k8s.io.kubernetes.pkg.apis.authorization.v1.SubjectAccessReviewSpec")
+ proto.RegisterType((*SubjectAccessReviewStatus)(nil), "k8s.io.kubernetes.pkg.apis.authorization.v1.SubjectAccessReviewStatus")
+}
+func (m ExtraValue) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m ExtraValue) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m) > 0 {
+ for _, s := range m {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *LocalSubjectAccessReview) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LocalSubjectAccessReview) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n2, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n3, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ return i, nil
+}
+
+func (m *NonResourceAttributes) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NonResourceAttributes) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i += copy(dAtA[i:], m.Path)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Verb)))
+ i += copy(dAtA[i:], m.Verb)
+ return i, nil
+}
+
+func (m *ResourceAttributes) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceAttributes) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
+ i += copy(dAtA[i:], m.Namespace)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Verb)))
+ i += copy(dAtA[i:], m.Verb)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group)))
+ i += copy(dAtA[i:], m.Group)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version)))
+ i += copy(dAtA[i:], m.Version)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource)))
+ i += copy(dAtA[i:], m.Resource)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Subresource)))
+ i += copy(dAtA[i:], m.Subresource)
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ return i, nil
+}
+
+func (m *SelfSubjectAccessReview) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SelfSubjectAccessReview) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n4, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n5, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n6, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ return i, nil
+}
+
+func (m *SelfSubjectAccessReviewSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SelfSubjectAccessReviewSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.ResourceAttributes != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ResourceAttributes.Size()))
+ n7, err := m.ResourceAttributes.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ }
+ if m.NonResourceAttributes != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NonResourceAttributes.Size()))
+ n8, err := m.NonResourceAttributes.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n8
+ }
+ return i, nil
+}
+
+func (m *SubjectAccessReview) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SubjectAccessReview) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n9, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n9
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n10, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n10
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n11, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n11
+ return i, nil
+}
+
+func (m *SubjectAccessReviewSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SubjectAccessReviewSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.ResourceAttributes != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ResourceAttributes.Size()))
+ n12, err := m.ResourceAttributes.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n12
+ }
+ if m.NonResourceAttributes != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NonResourceAttributes.Size()))
+ n13, err := m.NonResourceAttributes.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n13
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.User)))
+ i += copy(dAtA[i:], m.User)
+ if len(m.Groups) > 0 {
+ for _, s := range m.Groups {
+ dAtA[i] = 0x22
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Extra) > 0 {
+ keysForExtra := make([]string, 0, len(m.Extra))
+ for k := range m.Extra {
+ keysForExtra = append(keysForExtra, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
+ for _, k := range keysForExtra {
+ dAtA[i] = 0x2a
+ i++
+ v := m.Extra[string(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n14, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n14
+ }
+ }
+ return i, nil
+}
+
+func (m *SubjectAccessReviewStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SubjectAccessReviewStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ if m.Allowed {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.EvaluationError)))
+ i += copy(dAtA[i:], m.EvaluationError)
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m ExtraValue) Size() (n int) {
+ var l int
+ _ = l
+ if len(m) > 0 {
+ for _, s := range m {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *LocalSubjectAccessReview) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *NonResourceAttributes) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Verb)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ResourceAttributes) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Namespace)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Verb)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Group)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Version)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Resource)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Subresource)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *SelfSubjectAccessReview) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *SelfSubjectAccessReviewSpec) Size() (n int) {
+ var l int
+ _ = l
+ if m.ResourceAttributes != nil {
+ l = m.ResourceAttributes.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.NonResourceAttributes != nil {
+ l = m.NonResourceAttributes.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *SubjectAccessReview) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *SubjectAccessReviewSpec) Size() (n int) {
+ var l int
+ _ = l
+ if m.ResourceAttributes != nil {
+ l = m.ResourceAttributes.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.NonResourceAttributes != nil {
+ l = m.NonResourceAttributes.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ l = len(m.User)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Groups) > 0 {
+ for _, s := range m.Groups {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Extra) > 0 {
+ for k, v := range m.Extra {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *SubjectAccessReviewStatus) Size() (n int) {
+ var l int
+ _ = l
+ n += 2
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.EvaluationError)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *LocalSubjectAccessReview) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&LocalSubjectAccessReview{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SubjectAccessReviewSpec", "SubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NonResourceAttributes) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NonResourceAttributes{`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `Verb:` + fmt.Sprintf("%v", this.Verb) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceAttributes) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ResourceAttributes{`,
+ `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
+ `Verb:` + fmt.Sprintf("%v", this.Verb) + `,`,
+ `Group:` + fmt.Sprintf("%v", this.Group) + `,`,
+ `Version:` + fmt.Sprintf("%v", this.Version) + `,`,
+ `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`,
+ `Subresource:` + fmt.Sprintf("%v", this.Subresource) + `,`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SelfSubjectAccessReview) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SelfSubjectAccessReview{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SelfSubjectAccessReviewSpec", "SelfSubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SelfSubjectAccessReviewSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SelfSubjectAccessReviewSpec{`,
+ `ResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.ResourceAttributes), "ResourceAttributes", "ResourceAttributes", 1) + `,`,
+ `NonResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.NonResourceAttributes), "NonResourceAttributes", "NonResourceAttributes", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SubjectAccessReview) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SubjectAccessReview{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SubjectAccessReviewSpec", "SubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SubjectAccessReviewSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForExtra := make([]string, 0, len(this.Extra))
+ for k := range this.Extra {
+ keysForExtra = append(keysForExtra, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
+ mapStringForExtra := "map[string]ExtraValue{"
+ for _, k := range keysForExtra {
+ mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k])
+ }
+ mapStringForExtra += "}"
+ s := strings.Join([]string{`&SubjectAccessReviewSpec{`,
+ `ResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.ResourceAttributes), "ResourceAttributes", "ResourceAttributes", 1) + `,`,
+ `NonResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.NonResourceAttributes), "NonResourceAttributes", "NonResourceAttributes", 1) + `,`,
+ `User:` + fmt.Sprintf("%v", this.User) + `,`,
+ `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`,
+ `Extra:` + mapStringForExtra + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SubjectAccessReviewStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SubjectAccessReviewStatus{`,
+ `Allowed:` + fmt.Sprintf("%v", this.Allowed) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `EvaluationError:` + fmt.Sprintf("%v", this.EvaluationError) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *ExtraValue) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExtraValue: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExtraValue: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ *m = append(*m, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LocalSubjectAccessReview) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LocalSubjectAccessReview: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LocalSubjectAccessReview: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NonResourceAttributes) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NonResourceAttributes: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NonResourceAttributes: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Verb", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Verb = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceAttributes) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceAttributes: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceAttributes: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Namespace = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Verb", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Verb = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Group = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Version = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Resource = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Subresource", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Subresource = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SelfSubjectAccessReview) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SelfSubjectAccessReview: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SelfSubjectAccessReview: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SelfSubjectAccessReviewSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SelfSubjectAccessReviewSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SelfSubjectAccessReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceAttributes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ResourceAttributes == nil {
+ m.ResourceAttributes = &ResourceAttributes{}
+ }
+ if err := m.ResourceAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NonResourceAttributes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.NonResourceAttributes == nil {
+ m.NonResourceAttributes = &NonResourceAttributes{}
+ }
+ if err := m.NonResourceAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SubjectAccessReview) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SubjectAccessReview: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SubjectAccessReview: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SubjectAccessReviewSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SubjectAccessReviewSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SubjectAccessReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceAttributes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ResourceAttributes == nil {
+ m.ResourceAttributes = &ResourceAttributes{}
+ }
+ if err := m.ResourceAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NonResourceAttributes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.NonResourceAttributes == nil {
+ m.NonResourceAttributes = &NonResourceAttributes{}
+ }
+ if err := m.NonResourceAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.User = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Extra", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Extra == nil {
+ m.Extra = make(map[string]ExtraValue)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &ExtraValue{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Extra[mapkey] = *mapvalue
+ } else {
+ var mapvalue ExtraValue
+ m.Extra[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SubjectAccessReviewStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SubjectAccessReviewStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SubjectAccessReviewStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Allowed", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Allowed = bool(v != 0)
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field EvaluationError", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.EvaluationError = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/kubernetes/pkg/apis/authorization/v1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 885 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4f, 0x6f, 0xdc, 0x44,
+ 0x14, 0x5f, 0xef, 0xbf, 0xec, 0x4e, 0x80, 0x94, 0xa9, 0x4a, 0xdc, 0x20, 0x79, 0x57, 0x8b, 0x84,
+ 0x82, 0x00, 0x9b, 0x94, 0x3f, 0xad, 0xca, 0x01, 0xc5, 0x22, 0xfc, 0x91, 0x68, 0x8b, 0x26, 0x22,
+ 0x07, 0xb8, 0x30, 0x76, 0x5e, 0x76, 0xdd, 0xdd, 0xf5, 0x98, 0x99, 0xb1, 0x4b, 0x38, 0xf5, 0xc6,
+ 0x15, 0x89, 0x0b, 0x47, 0xbe, 0x02, 0x1f, 0x00, 0xce, 0xb9, 0xd1, 0x03, 0x12, 0x3d, 0xa0, 0x15,
+ 0x31, 0x17, 0x3e, 0x06, 0x9a, 0xf1, 0x64, 0x9d, 0x6d, 0x1c, 0xaa, 0x85, 0x4a, 0x70, 0xc8, 0xcd,
+ 0xf3, 0xde, 0xef, 0xf7, 0xde, 0x6f, 0xde, 0xbc, 0xf1, 0x1b, 0xf4, 0xf6, 0xf8, 0x86, 0x70, 0x23,
+ 0xe6, 0x8d, 0xd3, 0x00, 0x78, 0x0c, 0x12, 0x84, 0x97, 0x8c, 0x87, 0x1e, 0x4d, 0x22, 0xe1, 0xd1,
+ 0x54, 0x8e, 0x18, 0x8f, 0xbe, 0xa2, 0x32, 0x62, 0xb1, 0x97, 0x6d, 0x79, 0x43, 0x88, 0x81, 0x53,
+ 0x09, 0xfb, 0x6e, 0xc2, 0x99, 0x64, 0xf8, 0xe5, 0x82, 0xec, 0x96, 0x64, 0x37, 0x19, 0x0f, 0x5d,
+ 0x45, 0x76, 0x17, 0xc8, 0x6e, 0xb6, 0xb5, 0xf1, 0xea, 0x30, 0x92, 0xa3, 0x34, 0x70, 0x43, 0x36,
+ 0xf5, 0x86, 0x6c, 0xc8, 0x3c, 0x1d, 0x23, 0x48, 0x0f, 0xf4, 0x4a, 0x2f, 0xf4, 0x57, 0x11, 0x7b,
+ 0xe3, 0x0d, 0x23, 0x8c, 0x26, 0xd1, 0x94, 0x86, 0xa3, 0x28, 0x06, 0x7e, 0x58, 0x4a, 0x9b, 0x82,
+ 0xa4, 0x15, 0x8a, 0x36, 0xbc, 0xf3, 0x58, 0x3c, 0x8d, 0x65, 0x34, 0x85, 0x33, 0x84, 0xb7, 0x1e,
+ 0x47, 0x10, 0xe1, 0x08, 0xa6, 0xf4, 0x0c, 0xef, 0xf5, 0xf3, 0x78, 0xa9, 0x8c, 0x26, 0x5e, 0x14,
+ 0x4b, 0x21, 0xf9, 0xa3, 0xa4, 0xc1, 0x75, 0x84, 0x76, 0xbe, 0x94, 0x9c, 0xee, 0xd1, 0x49, 0x0a,
+ 0xb8, 0x87, 0x5a, 0x91, 0x84, 0xa9, 0xb0, 0xad, 0x7e, 0x63, 0xb3, 0xeb, 0x77, 0xf3, 0x59, 0xaf,
+ 0xf5, 0xa1, 0x32, 0x90, 0xc2, 0x7e, 0xb3, 0xf3, 0xdd, 0xf7, 0xbd, 0xda, 0xfd, 0xdf, 0xfa, 0xb5,
+ 0xc1, 0x2f, 0x75, 0x64, 0x7f, 0xc4, 0x42, 0x3a, 0xd9, 0x4d, 0x83, 0xbb, 0x10, 0xca, 0xed, 0x30,
+ 0x04, 0x21, 0x08, 0x64, 0x11, 0xdc, 0xc3, 0x9f, 0xa3, 0x8e, 0x2a, 0xc7, 0x3e, 0x95, 0xd4, 0xb6,
+ 0xfa, 0xd6, 0xe6, 0xea, 0xb5, 0xd7, 0x5c, 0x73, 0x30, 0xa7, 0xd5, 0x95, 0x47, 0xa3, 0xd0, 0x6e,
+ 0xb6, 0xe5, 0xde, 0xd1, 0xb1, 0x6e, 0x81, 0xa4, 0x3e, 0x3e, 0x9a, 0xf5, 0x6a, 0xf9, 0xac, 0x87,
+ 0x4a, 0x1b, 0x99, 0x47, 0xc5, 0x07, 0xa8, 0x29, 0x12, 0x08, 0xed, 0xba, 0x8e, 0xfe, 0xae, 0xbb,
+ 0xc4, 0xb1, 0xbb, 0x15, 0x8a, 0x77, 0x13, 0x08, 0xfd, 0xa7, 0x4c, 0xc6, 0xa6, 0x5a, 0x11, 0x1d,
+ 0x1f, 0xc7, 0xa8, 0x2d, 0x24, 0x95, 0xa9, 0xb0, 0x1b, 0x3a, 0xd3, 0x7b, 0xff, 0x3a, 0x93, 0x8e,
+ 0xe6, 0x3f, 0x63, 0x72, 0xb5, 0x8b, 0x35, 0x31, 0x59, 0x06, 0x9f, 0xa1, 0x2b, 0xb7, 0x59, 0x4c,
+ 0x40, 0xb0, 0x94, 0x87, 0xb0, 0x2d, 0x25, 0x8f, 0x82, 0x54, 0x82, 0xc0, 0x7d, 0xd4, 0x4c, 0xa8,
+ 0x1c, 0xe9, 0x72, 0x76, 0x4b, 0xa9, 0x1f, 0x53, 0x39, 0x22, 0xda, 0xa3, 0x10, 0x19, 0xf0, 0x40,
+ 0x97, 0xe4, 0x14, 0x62, 0x0f, 0x78, 0x40, 0xb4, 0x67, 0xf0, 0x53, 0x1d, 0xe1, 0x8a, 0xd0, 0x1e,
+ 0xea, 0xc6, 0x74, 0x0a, 0x22, 0xa1, 0x21, 0x98, 0xf8, 0xcf, 0x1a, 0x76, 0xf7, 0xf6, 0x89, 0x83,
+ 0x94, 0x98, 0xc7, 0x67, 0xc2, 0x2f, 0xa0, 0xd6, 0x90, 0xb3, 0x34, 0xd1, 0x55, 0xeb, 0xfa, 0x4f,
+ 0x1b, 0x48, 0xeb, 0x7d, 0x65, 0x24, 0x85, 0x0f, 0xbf, 0x84, 0x56, 0x32, 0xe0, 0x22, 0x62, 0xb1,
+ 0xdd, 0xd4, 0xb0, 0x35, 0x03, 0x5b, 0xd9, 0x2b, 0xcc, 0xe4, 0xc4, 0x8f, 0x5f, 0x41, 0x1d, 0x6e,
+ 0x84, 0xdb, 0x2d, 0x8d, 0xbd, 0x64, 0xb0, 0x9d, 0x93, 0x0d, 0x91, 0x39, 0x02, 0xbf, 0x89, 0x56,
+ 0x45, 0x1a, 0xcc, 0x09, 0x6d, 0x4d, 0xb8, 0x6c, 0x08, 0xab, 0xbb, 0xa5, 0x8b, 0x9c, 0xc6, 0xa9,
+ 0x6d, 0xa9, 0x3d, 0xda, 0x2b, 0x8b, 0xdb, 0x52, 0x25, 0x20, 0xda, 0x33, 0xf8, 0xb5, 0x8e, 0xd6,
+ 0x77, 0x61, 0x72, 0xf0, 0xdf, 0xf4, 0xfc, 0xdd, 0x85, 0x9e, 0xff, 0x60, 0xb9, 0x4e, 0xac, 0x56,
+ 0xfd, 0xbf, 0xe9, 0xfb, 0x1f, 0xeb, 0xe8, 0xf9, 0xbf, 0xd1, 0x88, 0xbf, 0xb6, 0x10, 0xe6, 0x67,
+ 0x5a, 0xd7, 0x14, 0xfa, 0x9d, 0xa5, 0xc4, 0x9d, 0xbd, 0x01, 0xfe, 0x73, 0xf9, 0xac, 0x57, 0x71,
+ 0x33, 0x48, 0x45, 0x4a, 0xfc, 0xad, 0x85, 0xae, 0xc4, 0x55, 0x57, 0xd4, 0x9c, 0x8b, 0xbf, 0x94,
+ 0x98, 0xca, 0xcb, 0xee, 0x5f, 0xcd, 0x67, 0xbd, 0xea, 0xff, 0x00, 0xa9, 0xce, 0x3d, 0xf8, 0xb9,
+ 0x8e, 0x2e, 0x5f, 0xfc, 0x89, 0x9f, 0x64, 0x47, 0xfe, 0xd9, 0x44, 0xeb, 0x17, 0xdd, 0xf8, 0x8f,
+ 0xba, 0x71, 0x3e, 0x20, 0x1a, 0x8b, 0x7f, 0xd2, 0x4f, 0x04, 0x70, 0x33, 0x20, 0x06, 0xa8, 0xad,
+ 0x87, 0x80, 0xb0, 0x9b, 0xfa, 0xa9, 0x81, 0xd4, 0x09, 0xe8, 0xe9, 0x20, 0x88, 0xf1, 0x60, 0x89,
+ 0x5a, 0xa0, 0xde, 0x26, 0x76, 0xab, 0xdf, 0xd8, 0x5c, 0xbd, 0x76, 0xe7, 0x49, 0xb4, 0x96, 0xab,
+ 0x5f, 0x3b, 0x3b, 0xb1, 0xe4, 0x87, 0xe5, 0x54, 0xd2, 0x36, 0x52, 0x24, 0xdb, 0xf8, 0xc2, 0xbc,
+ 0x88, 0x34, 0x06, 0x5f, 0x42, 0x8d, 0x31, 0x1c, 0x16, 0x53, 0x91, 0xa8, 0x4f, 0x7c, 0x0b, 0xb5,
+ 0x32, 0xf5, 0x58, 0x32, 0x05, 0xbe, 0xbe, 0x94, 0xaa, 0xf2, 0xad, 0x45, 0x8a, 0x28, 0x37, 0xeb,
+ 0x37, 0xac, 0xc1, 0x0f, 0x16, 0xba, 0x7a, 0x6e, 0x83, 0xaa, 0x31, 0x49, 0x27, 0x13, 0x76, 0x0f,
+ 0xf6, 0xb5, 0x8c, 0x4e, 0x39, 0x26, 0xb7, 0x0b, 0x33, 0x39, 0xf1, 0xe3, 0x17, 0x51, 0x9b, 0x03,
+ 0x15, 0x2c, 0x36, 0xa3, 0x79, 0xde, 0xdb, 0x44, 0x5b, 0x89, 0xf1, 0xe2, 0x6d, 0xb4, 0x06, 0x2a,
+ 0xbd, 0xd6, 0xb5, 0xc3, 0x39, 0xe3, 0xe6, 0xa8, 0xd6, 0x0d, 0x61, 0x6d, 0x67, 0xd1, 0x4d, 0x1e,
+ 0xc5, 0xfb, 0x9b, 0x47, 0xc7, 0x4e, 0xed, 0xc1, 0xb1, 0x53, 0x7b, 0x78, 0xec, 0xd4, 0xee, 0xe7,
+ 0x8e, 0x75, 0x94, 0x3b, 0xd6, 0x83, 0xdc, 0xb1, 0x1e, 0xe6, 0x8e, 0xf5, 0x7b, 0xee, 0x58, 0xdf,
+ 0xfc, 0xe1, 0xd4, 0x3e, 0xad, 0x67, 0x5b, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x38, 0xb6, 0x9a,
+ 0xe3, 0xd0, 0x0b, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/generated.proto
new file mode 100644
index 000000000..7a8fdb6ad
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/generated.proto
@@ -0,0 +1,183 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.pkg.apis.authorization.v1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1";
+
+// ExtraValue masks the value so protobuf can generate
+// +protobuf.nullable=true
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+message ExtraValue {
+ // items, if empty, will result in an empty slice
+
+ repeated string items = 1;
+}
+
+// LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace.
+// Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions
+// checking.
+message LocalSubjectAccessReview {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace
+ // you made the request against. If empty, it is defaulted.
+ optional SubjectAccessReviewSpec spec = 2;
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ // +optional
+ optional SubjectAccessReviewStatus status = 3;
+}
+
+// NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface
+message NonResourceAttributes {
+ // Path is the URL path of the request
+ // +optional
+ optional string path = 1;
+
+ // Verb is the standard HTTP verb
+ // +optional
+ optional string verb = 2;
+}
+
+// ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface
+message ResourceAttributes {
+ // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces
+ // "" (empty) is defaulted for LocalSubjectAccessReviews
+ // "" (empty) is empty for cluster-scoped resources
+ // "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
+ // +optional
+ optional string namespace = 1;
+
+ // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all.
+ // +optional
+ optional string verb = 2;
+
+ // Group is the API Group of the Resource. "*" means all.
+ // +optional
+ optional string group = 3;
+
+ // Version is the API Version of the Resource. "*" means all.
+ // +optional
+ optional string version = 4;
+
+ // Resource is one of the existing resource types. "*" means all.
+ // +optional
+ optional string resource = 5;
+
+ // Subresource is one of the existing resource types. "" means none.
+ // +optional
+ optional string subresource = 6;
+
+ // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all.
+ // +optional
+ optional string name = 7;
+}
+
+// SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a
+// spec.namespace means "in all namespaces". Self is a special case, because users should always be able
+// to check whether they can perform an action
+message SelfSubjectAccessReview {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec holds information about the request being evaluated. user and groups must be empty
+ optional SelfSubjectAccessReviewSpec spec = 2;
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ // +optional
+ optional SubjectAccessReviewStatus status = 3;
+}
+
+// SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
+// and NonResourceAuthorizationAttributes must be set
+message SelfSubjectAccessReviewSpec {
+ // ResourceAuthorizationAttributes describes information for a resource access request
+ // +optional
+ optional ResourceAttributes resourceAttributes = 1;
+
+ // NonResourceAttributes describes information for a non-resource access request
+ // +optional
+ optional NonResourceAttributes nonResourceAttributes = 2;
+}
+
+// SubjectAccessReview checks whether or not a user or group can perform an action.
+message SubjectAccessReview {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec holds information about the request being evaluated
+ optional SubjectAccessReviewSpec spec = 2;
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ // +optional
+ optional SubjectAccessReviewStatus status = 3;
+}
+
+// SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
+// and NonResourceAuthorizationAttributes must be set
+message SubjectAccessReviewSpec {
+ // ResourceAuthorizationAttributes describes information for a resource access request
+ // +optional
+ optional ResourceAttributes resourceAttributes = 1;
+
+ // NonResourceAttributes describes information for a non-resource access request
+ // +optional
+ optional NonResourceAttributes nonResourceAttributes = 2;
+
+ // User is the user you're testing for.
+ // If you specify "User" but not "Groups", then is it interpreted as "What if User were not a member of any groups
+ // +optional
+ optional string verb = 3;
+
+ // Groups is the groups you're testing for.
+ // +optional
+ repeated string groups = 4;
+
+ // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer
+ // it needs a reflection here.
+ // +optional
+ map<string, ExtraValue> extra = 5;
+}
+
+// SubjectAccessReviewStatus
+message SubjectAccessReviewStatus {
+ // Allowed is required. True if the action would be allowed, false otherwise.
+ optional bool allowed = 1;
+
+ // Reason is optional. It indicates why a request was allowed or denied.
+ // +optional
+ optional string reason = 2;
+
+ // EvaluationError is an indication that some error occurred during the authorization check.
+ // It is entirely possible to get an error and be able to continue determine authorization status in spite of it.
+ // For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.
+ // +optional
+ optional string evaluationError = 3;
+}
+
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/register.go
new file mode 100644
index 000000000..5defdff67
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/register.go
@@ -0,0 +1,61 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "authorization.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &SelfSubjectAccessReview{},
+ &SubjectAccessReview{},
+ &LocalSubjectAccessReview{},
+ )
+
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/types.generated.go
new file mode 100644
index 000000000..2528afa8e
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/types.generated.go
@@ -0,0 +1,3233 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ pkg2_types "k8s.io/apimachinery/pkg/types"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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 pkg1_v1.TypeMeta
+ var v1 pkg2_types.UID
+ var v2 time.Time
+ _, _, _ = v0, v1, v2
+ }
+}
+
+func (x *SubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[4] = true
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SubjectAccessReview) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = SubjectAccessReviewSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = SubjectAccessReviewSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *SelfSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[4] = true
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SelfSubjectAccessReview) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SelfSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = SelfSubjectAccessReviewSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = SelfSubjectAccessReviewSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *LocalSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[4] = true
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *LocalSubjectAccessReview) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *LocalSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = SubjectAccessReviewSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = SubjectAccessReviewSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ResourceAttributes) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [7]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Namespace != ""
+ yyq2[1] = x.Verb != ""
+ yyq2[2] = x.Group != ""
+ yyq2[3] = x.Version != ""
+ yyq2[4] = x.Resource != ""
+ yyq2[5] = x.Subresource != ""
+ yyq2[6] = x.Name != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(7)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("namespace"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Verb))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("verb"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Verb))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Group))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("group"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Group))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Version))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("version"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Version))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Resource))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resource"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Resource))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Subresource))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("subresource"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Subresource))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ResourceAttributes) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ResourceAttributes) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "verb":
+ if r.TryDecodeAsNil() {
+ x.Verb = ""
+ } else {
+ yyv6 := &x.Verb
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "group":
+ if r.TryDecodeAsNil() {
+ x.Group = ""
+ } else {
+ yyv8 := &x.Group
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "version":
+ if r.TryDecodeAsNil() {
+ x.Version = ""
+ } else {
+ yyv10 := &x.Version
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "resource":
+ if r.TryDecodeAsNil() {
+ x.Resource = ""
+ } else {
+ yyv12 := &x.Resource
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ case "subresource":
+ if r.TryDecodeAsNil() {
+ x.Subresource = ""
+ } else {
+ yyv14 := &x.Subresource
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv16 := &x.Name
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ResourceAttributes) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj18 int
+ var yyb18 bool
+ var yyhl18 bool = l >= 0
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Namespace = ""
+ } else {
+ yyv19 := &x.Namespace
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Verb = ""
+ } else {
+ yyv21 := &x.Verb
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Group = ""
+ } else {
+ yyv23 := &x.Group
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*string)(yyv23)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Version = ""
+ } else {
+ yyv25 := &x.Version
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*string)(yyv25)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Resource = ""
+ } else {
+ yyv27 := &x.Resource
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*string)(yyv27)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Subresource = ""
+ } else {
+ yyv29 := &x.Subresource
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*string)(yyv29)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv31 := &x.Name
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*string)(yyv31)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj18-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NonResourceAttributes) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Path != ""
+ yyq2[1] = x.Verb != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("path"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Verb))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("verb"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Verb))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NonResourceAttributes) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NonResourceAttributes) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv4 := &x.Path
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "verb":
+ if r.TryDecodeAsNil() {
+ x.Verb = ""
+ } else {
+ yyv6 := &x.Verb
+ 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_containerMapEnd1234)
+}
+
+func (x *NonResourceAttributes) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv9 := &x.Path
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Verb = ""
+ } else {
+ yyv11 := &x.Verb
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *SubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.ResourceAttributes != nil
+ yyq2[1] = x.NonResourceAttributes != nil
+ yyq2[2] = x.User != ""
+ yyq2[3] = len(x.Groups) != 0
+ yyq2[4] = len(x.Extra) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.ResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.ResourceAttributes.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resourceAttributes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.ResourceAttributes.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.NonResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.NonResourceAttributes.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nonResourceAttributes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NonResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.NonResourceAttributes.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.User))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("user"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.User))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Groups == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Groups, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("groups"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Groups == nil {
+ r.EncodeNil()
+ } else {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Groups, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.Extra == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("extra"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Extra == nil {
+ r.EncodeNil()
+ } else {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SubjectAccessReviewSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SubjectAccessReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "resourceAttributes":
+ if r.TryDecodeAsNil() {
+ if x.ResourceAttributes != nil {
+ x.ResourceAttributes = nil
+ }
+ } else {
+ if x.ResourceAttributes == nil {
+ x.ResourceAttributes = new(ResourceAttributes)
+ }
+ x.ResourceAttributes.CodecDecodeSelf(d)
+ }
+ case "nonResourceAttributes":
+ if r.TryDecodeAsNil() {
+ if x.NonResourceAttributes != nil {
+ x.NonResourceAttributes = nil
+ }
+ } else {
+ if x.NonResourceAttributes == nil {
+ x.NonResourceAttributes = new(NonResourceAttributes)
+ }
+ x.NonResourceAttributes.CodecDecodeSelf(d)
+ }
+ case "user":
+ if r.TryDecodeAsNil() {
+ x.User = ""
+ } else {
+ yyv6 := &x.User
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "groups":
+ if r.TryDecodeAsNil() {
+ x.Groups = nil
+ } else {
+ yyv8 := &x.Groups
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv8, false, d)
+ }
+ }
+ case "extra":
+ if r.TryDecodeAsNil() {
+ x.Extra = nil
+ } else {
+ yyv10 := &x.Extra
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decMapstringExtraValue((*map[string]ExtraValue)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SubjectAccessReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ResourceAttributes != nil {
+ x.ResourceAttributes = nil
+ }
+ } else {
+ if x.ResourceAttributes == nil {
+ x.ResourceAttributes = new(ResourceAttributes)
+ }
+ x.ResourceAttributes.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.NonResourceAttributes != nil {
+ x.NonResourceAttributes = nil
+ }
+ } else {
+ if x.NonResourceAttributes == nil {
+ x.NonResourceAttributes = new(NonResourceAttributes)
+ }
+ x.NonResourceAttributes.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.User = ""
+ } else {
+ yyv15 := &x.User
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Groups = nil
+ } else {
+ yyv17 := &x.Groups
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv17, false, d)
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Extra = nil
+ } else {
+ yyv19 := &x.Extra
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decMapstringExtraValue((*map[string]ExtraValue)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x ExtraValue) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 {
+ h.encExtraValue((ExtraValue)(x), e)
+ }
+ }
+}
+
+func (x *ExtraValue) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ h.decExtraValue((*ExtraValue)(x), d)
+ }
+}
+
+func (x *SelfSubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.ResourceAttributes != nil
+ yyq2[1] = x.NonResourceAttributes != 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.ResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.ResourceAttributes.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resourceAttributes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.ResourceAttributes.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.NonResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.NonResourceAttributes.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nonResourceAttributes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NonResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.NonResourceAttributes.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SelfSubjectAccessReviewSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SelfSubjectAccessReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "resourceAttributes":
+ if r.TryDecodeAsNil() {
+ if x.ResourceAttributes != nil {
+ x.ResourceAttributes = nil
+ }
+ } else {
+ if x.ResourceAttributes == nil {
+ x.ResourceAttributes = new(ResourceAttributes)
+ }
+ x.ResourceAttributes.CodecDecodeSelf(d)
+ }
+ case "nonResourceAttributes":
+ if r.TryDecodeAsNil() {
+ if x.NonResourceAttributes != nil {
+ x.NonResourceAttributes = nil
+ }
+ } else {
+ if x.NonResourceAttributes == nil {
+ x.NonResourceAttributes = new(NonResourceAttributes)
+ }
+ x.NonResourceAttributes.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SelfSubjectAccessReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ResourceAttributes != nil {
+ x.ResourceAttributes = nil
+ }
+ } else {
+ if x.ResourceAttributes == nil {
+ x.ResourceAttributes = new(ResourceAttributes)
+ }
+ x.ResourceAttributes.CodecDecodeSelf(d)
+ }
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.NonResourceAttributes != nil {
+ x.NonResourceAttributes = nil
+ }
+ } else {
+ if x.NonResourceAttributes == nil {
+ x.NonResourceAttributes = new(NonResourceAttributes)
+ }
+ x.NonResourceAttributes.CodecDecodeSelf(d)
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *SubjectAccessReviewStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.Reason != ""
+ yyq2[2] = x.EvaluationError != ""
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Allowed))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("allowed"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Allowed))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.EvaluationError))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("evaluationError"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.EvaluationError))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SubjectAccessReviewStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SubjectAccessReviewStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "allowed":
+ if r.TryDecodeAsNil() {
+ x.Allowed = false
+ } else {
+ yyv4 := &x.Allowed
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*bool)(yyv4)) = r.DecodeBool()
+ }
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv6 := &x.Reason
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "evaluationError":
+ if r.TryDecodeAsNil() {
+ x.EvaluationError = ""
+ } else {
+ yyv8 := &x.EvaluationError
+ 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_containerMapEnd1234)
+}
+
+func (x *SubjectAccessReviewStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Allowed = false
+ } else {
+ yyv11 := &x.Allowed
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*bool)(yyv11)) = r.DecodeBool()
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv13 := &x.Reason
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.EvaluationError = ""
+ } else {
+ yyv15 := &x.EvaluationError
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encMapstringExtraValue(v map[string]ExtraValue, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeMapStart(len(v))
+ for yyk1, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ yym2 := z.EncBinary()
+ _ = yym2
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yyk1))
+ }
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyv1 == nil {
+ r.EncodeNil()
+ } else {
+ yyv1.CodecEncodeSelf(e)
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) decMapstringExtraValue(v *map[string]ExtraValue, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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, 40)
+ yyv1 = make(map[string]ExtraValue, yyrl1)
+ *v = yyv1
+ }
+ var yymk1 string
+ var yymv1 ExtraValue
+ var yymg1 bool
+ if yybh1.MapValueReset {
+ yymg1 = true
+ }
+ if yyl1 > 0 {
+ for yyj1 := 0; yyj1 < yyl1; yyj1++ {
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ if r.TryDecodeAsNil() {
+ yymk1 = ""
+ } else {
+ yyv2 := &yymk1
+ yym3 := z.DecBinary()
+ _ = yym3
+ if false {
+ } else {
+ *((*string)(yyv2)) = r.DecodeString()
+ }
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv4 := &yymv1
+ yyv4.CodecDecodeSelf(d)
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } else if yyl1 < 0 {
+ for yyj1 := 0; !r.CheckBreak(); yyj1++ {
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ if r.TryDecodeAsNil() {
+ yymk1 = ""
+ } else {
+ yyv5 := &yymk1
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*string)(yyv5)) = r.DecodeString()
+ }
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv7 := &yymv1
+ yyv7.CodecDecodeSelf(d)
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } // else len==0: TODO: Should we clear map entries?
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) encExtraValue(v ExtraValue, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym2 := z.EncBinary()
+ _ = yym2
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yyv1))
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decExtraValue(v *ExtraValue, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []string{}
+ 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) {
+
+ yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]string, yyrl1)
+ }
+ } else {
+ yyv1 = make([]string, yyrl1)
+ }
+ yyc1 = true
+ yyrr1 = len(yyv1)
+ } else if yyl1 != len(yyv1) {
+ yyv1 = yyv1[:yyl1]
+ yyc1 = true
+ }
+ yyj1 := 0
+ for ; yyj1 < yyrr1; yyj1++ {
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yym3 := z.DecBinary()
+ _ = yym3
+ if false {
+ } else {
+ *((*string)(yyv2)) = r.DecodeString()
+ }
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv4 := &yyv1[yyj1]
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, "") // var yyz1 string
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv6 := &yyv1[yyj1]
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+
+ } else {
+ z.DecSwallow()
+ }
+
+ }
+ if yyj1 < len(yyv1) {
+ yyv1 = yyv1[:yyj1]
+ yyc1 = true
+ } else if yyj1 == 0 && yyv1 == nil {
+ yyv1 = []string{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/types.go
new file mode 100644
index 000000000..38c314ffc
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/types.go
@@ -0,0 +1,176 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "fmt"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+// +noMethods=true
+
+// SubjectAccessReview checks whether or not a user or group can perform an action.
+type SubjectAccessReview struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec holds information about the request being evaluated
+ Spec SubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ // +optional
+ Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// +genclient=true
+// +nonNamespaced=true
+// +noMethods=true
+
+// SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a
+// spec.namespace means "in all namespaces". Self is a special case, because users should always be able
+// to check whether they can perform an action
+type SelfSubjectAccessReview struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec holds information about the request being evaluated. user and groups must be empty
+ Spec SelfSubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ // +optional
+ Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// +genclient=true
+// +noMethods=true
+
+// LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace.
+// Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions
+// checking.
+type LocalSubjectAccessReview struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace
+ // you made the request against. If empty, it is defaulted.
+ Spec SubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ // +optional
+ Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface
+type ResourceAttributes struct {
+ // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces
+ // "" (empty) is defaulted for LocalSubjectAccessReviews
+ // "" (empty) is empty for cluster-scoped resources
+ // "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
+ // +optional
+ Namespace string `json:"namespace,omitempty" protobuf:"bytes,1,opt,name=namespace"`
+ // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all.
+ // +optional
+ Verb string `json:"verb,omitempty" protobuf:"bytes,2,opt,name=verb"`
+ // Group is the API Group of the Resource. "*" means all.
+ // +optional
+ Group string `json:"group,omitempty" protobuf:"bytes,3,opt,name=group"`
+ // Version is the API Version of the Resource. "*" means all.
+ // +optional
+ Version string `json:"version,omitempty" protobuf:"bytes,4,opt,name=version"`
+ // Resource is one of the existing resource types. "*" means all.
+ // +optional
+ Resource string `json:"resource,omitempty" protobuf:"bytes,5,opt,name=resource"`
+ // Subresource is one of the existing resource types. "" means none.
+ // +optional
+ Subresource string `json:"subresource,omitempty" protobuf:"bytes,6,opt,name=subresource"`
+ // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all.
+ // +optional
+ Name string `json:"name,omitempty" protobuf:"bytes,7,opt,name=name"`
+}
+
+// NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface
+type NonResourceAttributes struct {
+ // Path is the URL path of the request
+ // +optional
+ Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"`
+ // Verb is the standard HTTP verb
+ // +optional
+ Verb string `json:"verb,omitempty" protobuf:"bytes,2,opt,name=verb"`
+}
+
+// SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
+// and NonResourceAuthorizationAttributes must be set
+type SubjectAccessReviewSpec struct {
+ // ResourceAuthorizationAttributes describes information for a resource access request
+ // +optional
+ ResourceAttributes *ResourceAttributes `json:"resourceAttributes,omitempty" protobuf:"bytes,1,opt,name=resourceAttributes"`
+ // NonResourceAttributes describes information for a non-resource access request
+ // +optional
+ NonResourceAttributes *NonResourceAttributes `json:"nonResourceAttributes,omitempty" protobuf:"bytes,2,opt,name=nonResourceAttributes"`
+
+ // User is the user you're testing for.
+ // If you specify "User" but not "Groups", then is it interpreted as "What if User were not a member of any groups
+ // +optional
+ User string `json:"user,omitempty" protobuf:"bytes,3,opt,name=verb"`
+ // Groups is the groups you're testing for.
+ // +optional
+ Groups []string `json:"groups,omitempty" protobuf:"bytes,4,rep,name=groups"`
+ // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer
+ // it needs a reflection here.
+ // +optional
+ Extra map[string]ExtraValue `json:"extra,omitempty" protobuf:"bytes,5,rep,name=extra"`
+}
+
+// ExtraValue masks the value so protobuf can generate
+// +protobuf.nullable=true
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+type ExtraValue []string
+
+func (t ExtraValue) String() string {
+ return fmt.Sprintf("%v", []string(t))
+}
+
+// SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
+// and NonResourceAuthorizationAttributes must be set
+type SelfSubjectAccessReviewSpec struct {
+ // ResourceAuthorizationAttributes describes information for a resource access request
+ // +optional
+ ResourceAttributes *ResourceAttributes `json:"resourceAttributes,omitempty" protobuf:"bytes,1,opt,name=resourceAttributes"`
+ // NonResourceAttributes describes information for a non-resource access request
+ // +optional
+ NonResourceAttributes *NonResourceAttributes `json:"nonResourceAttributes,omitempty" protobuf:"bytes,2,opt,name=nonResourceAttributes"`
+}
+
+// SubjectAccessReviewStatus
+type SubjectAccessReviewStatus struct {
+ // Allowed is required. True if the action would be allowed, false otherwise.
+ Allowed bool `json:"allowed" protobuf:"varint,1,opt,name=allowed"`
+ // Reason is optional. It indicates why a request was allowed or denied.
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"`
+ // EvaluationError is an indication that some error occurred during the authorization check.
+ // It is entirely possible to get an error and be able to continue determine authorization status in spite of it.
+ // For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.
+ // +optional
+ EvaluationError string `json:"evaluationError,omitempty" protobuf:"bytes,3,opt,name=evaluationError"`
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..33c0035b4
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/types_swagger_doc_generated.go
@@ -0,0 +1,119 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_LocalSubjectAccessReview = map[string]string{
+ "": "LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.",
+ "spec": "Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.",
+ "status": "Status is filled in by the server and indicates whether the request is allowed or not",
+}
+
+func (LocalSubjectAccessReview) SwaggerDoc() map[string]string {
+ return map_LocalSubjectAccessReview
+}
+
+var map_NonResourceAttributes = map[string]string{
+ "": "NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface",
+ "path": "Path is the URL path of the request",
+ "verb": "Verb is the standard HTTP verb",
+}
+
+func (NonResourceAttributes) SwaggerDoc() map[string]string {
+ return map_NonResourceAttributes
+}
+
+var map_ResourceAttributes = map[string]string{
+ "": "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface",
+ "namespace": "Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces \"\" (empty) is defaulted for LocalSubjectAccessReviews \"\" (empty) is empty for cluster-scoped resources \"\" (empty) means \"all\" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview",
+ "verb": "Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all.",
+ "group": "Group is the API Group of the Resource. \"*\" means all.",
+ "version": "Version is the API Version of the Resource. \"*\" means all.",
+ "resource": "Resource is one of the existing resource types. \"*\" means all.",
+ "subresource": "Subresource is one of the existing resource types. \"\" means none.",
+ "name": "Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all.",
+}
+
+func (ResourceAttributes) SwaggerDoc() map[string]string {
+ return map_ResourceAttributes
+}
+
+var map_SelfSubjectAccessReview = map[string]string{
+ "": "SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means \"in all namespaces\". Self is a special case, because users should always be able to check whether they can perform an action",
+ "spec": "Spec holds information about the request being evaluated. user and groups must be empty",
+ "status": "Status is filled in by the server and indicates whether the request is allowed or not",
+}
+
+func (SelfSubjectAccessReview) SwaggerDoc() map[string]string {
+ return map_SelfSubjectAccessReview
+}
+
+var map_SelfSubjectAccessReviewSpec = map[string]string{
+ "": "SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set",
+ "resourceAttributes": "ResourceAuthorizationAttributes describes information for a resource access request",
+ "nonResourceAttributes": "NonResourceAttributes describes information for a non-resource access request",
+}
+
+func (SelfSubjectAccessReviewSpec) SwaggerDoc() map[string]string {
+ return map_SelfSubjectAccessReviewSpec
+}
+
+var map_SubjectAccessReview = map[string]string{
+ "": "SubjectAccessReview checks whether or not a user or group can perform an action.",
+ "spec": "Spec holds information about the request being evaluated",
+ "status": "Status is filled in by the server and indicates whether the request is allowed or not",
+}
+
+func (SubjectAccessReview) SwaggerDoc() map[string]string {
+ return map_SubjectAccessReview
+}
+
+var map_SubjectAccessReviewSpec = map[string]string{
+ "": "SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set",
+ "resourceAttributes": "ResourceAuthorizationAttributes describes information for a resource access request",
+ "nonResourceAttributes": "NonResourceAttributes describes information for a non-resource access request",
+ "user": "User is the user you're testing for. If you specify \"User\" but not \"Groups\", then is it interpreted as \"What if User were not a member of any groups",
+ "groups": "Groups is the groups you're testing for.",
+ "extra": "Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here.",
+}
+
+func (SubjectAccessReviewSpec) SwaggerDoc() map[string]string {
+ return map_SubjectAccessReviewSpec
+}
+
+var map_SubjectAccessReviewStatus = map[string]string{
+ "": "SubjectAccessReviewStatus",
+ "allowed": "Allowed is required. True if the action would be allowed, false otherwise.",
+ "reason": "Reason is optional. It indicates why a request was allowed or denied.",
+ "evaluationError": "EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.",
+}
+
+func (SubjectAccessReviewStatus) SwaggerDoc() map[string]string {
+ return map_SubjectAccessReviewStatus
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/zz_generated.conversion.go
new file mode 100644
index 000000000..1777bdc0f
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/zz_generated.conversion.go
@@ -0,0 +1,279 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1
+
+import (
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ authorization "k8s.io/kubernetes/pkg/apis/authorization"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview,
+ Convert_authorization_LocalSubjectAccessReview_To_v1_LocalSubjectAccessReview,
+ Convert_v1_NonResourceAttributes_To_authorization_NonResourceAttributes,
+ Convert_authorization_NonResourceAttributes_To_v1_NonResourceAttributes,
+ Convert_v1_ResourceAttributes_To_authorization_ResourceAttributes,
+ Convert_authorization_ResourceAttributes_To_v1_ResourceAttributes,
+ Convert_v1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview,
+ Convert_authorization_SelfSubjectAccessReview_To_v1_SelfSubjectAccessReview,
+ Convert_v1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec,
+ Convert_authorization_SelfSubjectAccessReviewSpec_To_v1_SelfSubjectAccessReviewSpec,
+ Convert_v1_SubjectAccessReview_To_authorization_SubjectAccessReview,
+ Convert_authorization_SubjectAccessReview_To_v1_SubjectAccessReview,
+ Convert_v1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec,
+ Convert_authorization_SubjectAccessReviewSpec_To_v1_SubjectAccessReviewSpec,
+ Convert_v1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus,
+ Convert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus,
+ )
+}
+
+func autoConvert_v1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview(in *LocalSubjectAccessReview, out *authorization.LocalSubjectAccessReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview is an autogenerated conversion function.
+func Convert_v1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview(in *LocalSubjectAccessReview, out *authorization.LocalSubjectAccessReview, s conversion.Scope) error {
+ return autoConvert_v1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview(in, out, s)
+}
+
+func autoConvert_authorization_LocalSubjectAccessReview_To_v1_LocalSubjectAccessReview(in *authorization.LocalSubjectAccessReview, out *LocalSubjectAccessReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_authorization_SubjectAccessReviewSpec_To_v1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_authorization_LocalSubjectAccessReview_To_v1_LocalSubjectAccessReview is an autogenerated conversion function.
+func Convert_authorization_LocalSubjectAccessReview_To_v1_LocalSubjectAccessReview(in *authorization.LocalSubjectAccessReview, out *LocalSubjectAccessReview, s conversion.Scope) error {
+ return autoConvert_authorization_LocalSubjectAccessReview_To_v1_LocalSubjectAccessReview(in, out, s)
+}
+
+func autoConvert_v1_NonResourceAttributes_To_authorization_NonResourceAttributes(in *NonResourceAttributes, out *authorization.NonResourceAttributes, s conversion.Scope) error {
+ out.Path = in.Path
+ out.Verb = in.Verb
+ return nil
+}
+
+// Convert_v1_NonResourceAttributes_To_authorization_NonResourceAttributes is an autogenerated conversion function.
+func Convert_v1_NonResourceAttributes_To_authorization_NonResourceAttributes(in *NonResourceAttributes, out *authorization.NonResourceAttributes, s conversion.Scope) error {
+ return autoConvert_v1_NonResourceAttributes_To_authorization_NonResourceAttributes(in, out, s)
+}
+
+func autoConvert_authorization_NonResourceAttributes_To_v1_NonResourceAttributes(in *authorization.NonResourceAttributes, out *NonResourceAttributes, s conversion.Scope) error {
+ out.Path = in.Path
+ out.Verb = in.Verb
+ return nil
+}
+
+// Convert_authorization_NonResourceAttributes_To_v1_NonResourceAttributes is an autogenerated conversion function.
+func Convert_authorization_NonResourceAttributes_To_v1_NonResourceAttributes(in *authorization.NonResourceAttributes, out *NonResourceAttributes, s conversion.Scope) error {
+ return autoConvert_authorization_NonResourceAttributes_To_v1_NonResourceAttributes(in, out, s)
+}
+
+func autoConvert_v1_ResourceAttributes_To_authorization_ResourceAttributes(in *ResourceAttributes, out *authorization.ResourceAttributes, s conversion.Scope) error {
+ out.Namespace = in.Namespace
+ out.Verb = in.Verb
+ out.Group = in.Group
+ out.Version = in.Version
+ out.Resource = in.Resource
+ out.Subresource = in.Subresource
+ out.Name = in.Name
+ return nil
+}
+
+// Convert_v1_ResourceAttributes_To_authorization_ResourceAttributes is an autogenerated conversion function.
+func Convert_v1_ResourceAttributes_To_authorization_ResourceAttributes(in *ResourceAttributes, out *authorization.ResourceAttributes, s conversion.Scope) error {
+ return autoConvert_v1_ResourceAttributes_To_authorization_ResourceAttributes(in, out, s)
+}
+
+func autoConvert_authorization_ResourceAttributes_To_v1_ResourceAttributes(in *authorization.ResourceAttributes, out *ResourceAttributes, s conversion.Scope) error {
+ out.Namespace = in.Namespace
+ out.Verb = in.Verb
+ out.Group = in.Group
+ out.Version = in.Version
+ out.Resource = in.Resource
+ out.Subresource = in.Subresource
+ out.Name = in.Name
+ return nil
+}
+
+// Convert_authorization_ResourceAttributes_To_v1_ResourceAttributes is an autogenerated conversion function.
+func Convert_authorization_ResourceAttributes_To_v1_ResourceAttributes(in *authorization.ResourceAttributes, out *ResourceAttributes, s conversion.Scope) error {
+ return autoConvert_authorization_ResourceAttributes_To_v1_ResourceAttributes(in, out, s)
+}
+
+func autoConvert_v1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview(in *SelfSubjectAccessReview, out *authorization.SelfSubjectAccessReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview is an autogenerated conversion function.
+func Convert_v1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview(in *SelfSubjectAccessReview, out *authorization.SelfSubjectAccessReview, s conversion.Scope) error {
+ return autoConvert_v1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview(in, out, s)
+}
+
+func autoConvert_authorization_SelfSubjectAccessReview_To_v1_SelfSubjectAccessReview(in *authorization.SelfSubjectAccessReview, out *SelfSubjectAccessReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_authorization_SelfSubjectAccessReviewSpec_To_v1_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_authorization_SelfSubjectAccessReview_To_v1_SelfSubjectAccessReview is an autogenerated conversion function.
+func Convert_authorization_SelfSubjectAccessReview_To_v1_SelfSubjectAccessReview(in *authorization.SelfSubjectAccessReview, out *SelfSubjectAccessReview, s conversion.Scope) error {
+ return autoConvert_authorization_SelfSubjectAccessReview_To_v1_SelfSubjectAccessReview(in, out, s)
+}
+
+func autoConvert_v1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(in *SelfSubjectAccessReviewSpec, out *authorization.SelfSubjectAccessReviewSpec, s conversion.Scope) error {
+ out.ResourceAttributes = (*authorization.ResourceAttributes)(unsafe.Pointer(in.ResourceAttributes))
+ out.NonResourceAttributes = (*authorization.NonResourceAttributes)(unsafe.Pointer(in.NonResourceAttributes))
+ return nil
+}
+
+// Convert_v1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec is an autogenerated conversion function.
+func Convert_v1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(in *SelfSubjectAccessReviewSpec, out *authorization.SelfSubjectAccessReviewSpec, s conversion.Scope) error {
+ return autoConvert_v1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(in, out, s)
+}
+
+func autoConvert_authorization_SelfSubjectAccessReviewSpec_To_v1_SelfSubjectAccessReviewSpec(in *authorization.SelfSubjectAccessReviewSpec, out *SelfSubjectAccessReviewSpec, s conversion.Scope) error {
+ out.ResourceAttributes = (*ResourceAttributes)(unsafe.Pointer(in.ResourceAttributes))
+ out.NonResourceAttributes = (*NonResourceAttributes)(unsafe.Pointer(in.NonResourceAttributes))
+ return nil
+}
+
+// Convert_authorization_SelfSubjectAccessReviewSpec_To_v1_SelfSubjectAccessReviewSpec is an autogenerated conversion function.
+func Convert_authorization_SelfSubjectAccessReviewSpec_To_v1_SelfSubjectAccessReviewSpec(in *authorization.SelfSubjectAccessReviewSpec, out *SelfSubjectAccessReviewSpec, s conversion.Scope) error {
+ return autoConvert_authorization_SelfSubjectAccessReviewSpec_To_v1_SelfSubjectAccessReviewSpec(in, out, s)
+}
+
+func autoConvert_v1_SubjectAccessReview_To_authorization_SubjectAccessReview(in *SubjectAccessReview, out *authorization.SubjectAccessReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_SubjectAccessReview_To_authorization_SubjectAccessReview is an autogenerated conversion function.
+func Convert_v1_SubjectAccessReview_To_authorization_SubjectAccessReview(in *SubjectAccessReview, out *authorization.SubjectAccessReview, s conversion.Scope) error {
+ return autoConvert_v1_SubjectAccessReview_To_authorization_SubjectAccessReview(in, out, s)
+}
+
+func autoConvert_authorization_SubjectAccessReview_To_v1_SubjectAccessReview(in *authorization.SubjectAccessReview, out *SubjectAccessReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_authorization_SubjectAccessReviewSpec_To_v1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_authorization_SubjectAccessReview_To_v1_SubjectAccessReview is an autogenerated conversion function.
+func Convert_authorization_SubjectAccessReview_To_v1_SubjectAccessReview(in *authorization.SubjectAccessReview, out *SubjectAccessReview, s conversion.Scope) error {
+ return autoConvert_authorization_SubjectAccessReview_To_v1_SubjectAccessReview(in, out, s)
+}
+
+func autoConvert_v1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(in *SubjectAccessReviewSpec, out *authorization.SubjectAccessReviewSpec, s conversion.Scope) error {
+ out.ResourceAttributes = (*authorization.ResourceAttributes)(unsafe.Pointer(in.ResourceAttributes))
+ out.NonResourceAttributes = (*authorization.NonResourceAttributes)(unsafe.Pointer(in.NonResourceAttributes))
+ out.User = in.User
+ out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups))
+ out.Extra = *(*map[string]authorization.ExtraValue)(unsafe.Pointer(&in.Extra))
+ return nil
+}
+
+// Convert_v1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec is an autogenerated conversion function.
+func Convert_v1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(in *SubjectAccessReviewSpec, out *authorization.SubjectAccessReviewSpec, s conversion.Scope) error {
+ return autoConvert_v1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(in, out, s)
+}
+
+func autoConvert_authorization_SubjectAccessReviewSpec_To_v1_SubjectAccessReviewSpec(in *authorization.SubjectAccessReviewSpec, out *SubjectAccessReviewSpec, s conversion.Scope) error {
+ out.ResourceAttributes = (*ResourceAttributes)(unsafe.Pointer(in.ResourceAttributes))
+ out.NonResourceAttributes = (*NonResourceAttributes)(unsafe.Pointer(in.NonResourceAttributes))
+ out.User = in.User
+ out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups))
+ out.Extra = *(*map[string]ExtraValue)(unsafe.Pointer(&in.Extra))
+ return nil
+}
+
+// Convert_authorization_SubjectAccessReviewSpec_To_v1_SubjectAccessReviewSpec is an autogenerated conversion function.
+func Convert_authorization_SubjectAccessReviewSpec_To_v1_SubjectAccessReviewSpec(in *authorization.SubjectAccessReviewSpec, out *SubjectAccessReviewSpec, s conversion.Scope) error {
+ return autoConvert_authorization_SubjectAccessReviewSpec_To_v1_SubjectAccessReviewSpec(in, out, s)
+}
+
+func autoConvert_v1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(in *SubjectAccessReviewStatus, out *authorization.SubjectAccessReviewStatus, s conversion.Scope) error {
+ out.Allowed = in.Allowed
+ out.Reason = in.Reason
+ out.EvaluationError = in.EvaluationError
+ return nil
+}
+
+// Convert_v1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus is an autogenerated conversion function.
+func Convert_v1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(in *SubjectAccessReviewStatus, out *authorization.SubjectAccessReviewStatus, s conversion.Scope) error {
+ return autoConvert_v1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(in, out, s)
+}
+
+func autoConvert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus(in *authorization.SubjectAccessReviewStatus, out *SubjectAccessReviewStatus, s conversion.Scope) error {
+ out.Allowed = in.Allowed
+ out.Reason = in.Reason
+ out.EvaluationError = in.EvaluationError
+ return nil
+}
+
+// Convert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus is an autogenerated conversion function.
+func Convert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus(in *authorization.SubjectAccessReviewStatus, out *SubjectAccessReviewStatus, s conversion.Scope) error {
+ return autoConvert_authorization_SubjectAccessReviewStatus_To_v1_SubjectAccessReviewStatus(in, out, s)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..bc04bed4d
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/zz_generated.deepcopy.go
@@ -0,0 +1,187 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_LocalSubjectAccessReview, InType: reflect.TypeOf(&LocalSubjectAccessReview{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NonResourceAttributes, InType: reflect.TypeOf(&NonResourceAttributes{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ResourceAttributes, InType: reflect.TypeOf(&ResourceAttributes{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SelfSubjectAccessReview, InType: reflect.TypeOf(&SelfSubjectAccessReview{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SelfSubjectAccessReviewSpec, InType: reflect.TypeOf(&SelfSubjectAccessReviewSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SubjectAccessReview, InType: reflect.TypeOf(&SubjectAccessReview{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SubjectAccessReviewSpec, InType: reflect.TypeOf(&SubjectAccessReviewSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SubjectAccessReviewStatus, InType: reflect.TypeOf(&SubjectAccessReviewStatus{})},
+ )
+}
+
+// DeepCopy_v1_LocalSubjectAccessReview is an autogenerated deepcopy function.
+func DeepCopy_v1_LocalSubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LocalSubjectAccessReview)
+ out := out.(*LocalSubjectAccessReview)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NonResourceAttributes is an autogenerated deepcopy function.
+func DeepCopy_v1_NonResourceAttributes(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NonResourceAttributes)
+ out := out.(*NonResourceAttributes)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_ResourceAttributes is an autogenerated deepcopy function.
+func DeepCopy_v1_ResourceAttributes(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceAttributes)
+ out := out.(*ResourceAttributes)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_SelfSubjectAccessReview is an autogenerated deepcopy function.
+func DeepCopy_v1_SelfSubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SelfSubjectAccessReview)
+ out := out.(*SelfSubjectAccessReview)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_SelfSubjectAccessReviewSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_SelfSubjectAccessReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SelfSubjectAccessReviewSpec)
+ out := out.(*SelfSubjectAccessReviewSpec)
+ *out = *in
+ if in.ResourceAttributes != nil {
+ in, out := &in.ResourceAttributes, &out.ResourceAttributes
+ *out = new(ResourceAttributes)
+ **out = **in
+ }
+ if in.NonResourceAttributes != nil {
+ in, out := &in.NonResourceAttributes, &out.NonResourceAttributes
+ *out = new(NonResourceAttributes)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_SubjectAccessReview is an autogenerated deepcopy function.
+func DeepCopy_v1_SubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SubjectAccessReview)
+ out := out.(*SubjectAccessReview)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_SubjectAccessReviewSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_SubjectAccessReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SubjectAccessReviewSpec)
+ out := out.(*SubjectAccessReviewSpec)
+ *out = *in
+ if in.ResourceAttributes != nil {
+ in, out := &in.ResourceAttributes, &out.ResourceAttributes
+ *out = new(ResourceAttributes)
+ **out = **in
+ }
+ if in.NonResourceAttributes != nil {
+ in, out := &in.NonResourceAttributes, &out.NonResourceAttributes
+ *out = new(NonResourceAttributes)
+ **out = **in
+ }
+ if in.Groups != nil {
+ in, out := &in.Groups, &out.Groups
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Extra != nil {
+ in, out := &in.Extra, &out.Extra
+ *out = make(map[string]ExtraValue)
+ for key, val := range *in {
+ if newVal, err := c.DeepCopy(&val); err != nil {
+ return err
+ } else {
+ (*out)[key] = *newVal.(*ExtraValue)
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_SubjectAccessReviewStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_SubjectAccessReviewStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SubjectAccessReviewStatus)
+ out := out.(*SubjectAccessReviewStatus)
+ *out = *in
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/zz_generated.defaults.go
new file mode 100644
index 000000000..6df448eb9
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1/zz_generated.defaults.go
@@ -0,0 +1,32 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/conversion.go
new file mode 100644
index 000000000..c40138365
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/conversion.go
@@ -0,0 +1,26 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) error {
+ // Add non-generated conversion functions
+ return scheme.AddConversionFuncs()
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/defaults.go
new file mode 100644
index 000000000..7d689a4cc
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/defaults.go
@@ -0,0 +1,25 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/doc.go
new file mode 100644
index 000000000..1007e6b18
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/doc.go
@@ -0,0 +1,23 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/authorization
+// +k8s:openapi-gen=true
+// +k8s:defaulter-gen=TypeMeta
+
+// +groupName=authorization.k8s.io
+package v1beta1 // import "k8s.io/kubernetes/pkg/apis/authorization/v1beta1"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/generated.pb.go
new file mode 100644
index 000000000..dc4bb117f
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/generated.pb.go
@@ -0,0 +1,2364 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/authorization/v1beta1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1beta1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/authorization/v1beta1/generated.proto
+
+ It has these top-level messages:
+ ExtraValue
+ LocalSubjectAccessReview
+ NonResourceAttributes
+ ResourceAttributes
+ SelfSubjectAccessReview
+ SelfSubjectAccessReviewSpec
+ SubjectAccessReview
+ SubjectAccessReviewSpec
+ SubjectAccessReviewStatus
+*/
+package v1beta1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *ExtraValue) Reset() { *m = ExtraValue{} }
+func (*ExtraValue) ProtoMessage() {}
+func (*ExtraValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *LocalSubjectAccessReview) Reset() { *m = LocalSubjectAccessReview{} }
+func (*LocalSubjectAccessReview) ProtoMessage() {}
+func (*LocalSubjectAccessReview) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{1}
+}
+
+func (m *NonResourceAttributes) Reset() { *m = NonResourceAttributes{} }
+func (*NonResourceAttributes) ProtoMessage() {}
+func (*NonResourceAttributes) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
+
+func (m *ResourceAttributes) Reset() { *m = ResourceAttributes{} }
+func (*ResourceAttributes) ProtoMessage() {}
+func (*ResourceAttributes) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
+
+func (m *SelfSubjectAccessReview) Reset() { *m = SelfSubjectAccessReview{} }
+func (*SelfSubjectAccessReview) ProtoMessage() {}
+func (*SelfSubjectAccessReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
+
+func (m *SelfSubjectAccessReviewSpec) Reset() { *m = SelfSubjectAccessReviewSpec{} }
+func (*SelfSubjectAccessReviewSpec) ProtoMessage() {}
+func (*SelfSubjectAccessReviewSpec) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{5}
+}
+
+func (m *SubjectAccessReview) Reset() { *m = SubjectAccessReview{} }
+func (*SubjectAccessReview) ProtoMessage() {}
+func (*SubjectAccessReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
+
+func (m *SubjectAccessReviewSpec) Reset() { *m = SubjectAccessReviewSpec{} }
+func (*SubjectAccessReviewSpec) ProtoMessage() {}
+func (*SubjectAccessReviewSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
+
+func (m *SubjectAccessReviewStatus) Reset() { *m = SubjectAccessReviewStatus{} }
+func (*SubjectAccessReviewStatus) ProtoMessage() {}
+func (*SubjectAccessReviewStatus) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{8}
+}
+
+func init() {
+ proto.RegisterType((*ExtraValue)(nil), "k8s.io.kubernetes.pkg.apis.authorization.v1beta1.ExtraValue")
+ proto.RegisterType((*LocalSubjectAccessReview)(nil), "k8s.io.kubernetes.pkg.apis.authorization.v1beta1.LocalSubjectAccessReview")
+ proto.RegisterType((*NonResourceAttributes)(nil), "k8s.io.kubernetes.pkg.apis.authorization.v1beta1.NonResourceAttributes")
+ proto.RegisterType((*ResourceAttributes)(nil), "k8s.io.kubernetes.pkg.apis.authorization.v1beta1.ResourceAttributes")
+ proto.RegisterType((*SelfSubjectAccessReview)(nil), "k8s.io.kubernetes.pkg.apis.authorization.v1beta1.SelfSubjectAccessReview")
+ proto.RegisterType((*SelfSubjectAccessReviewSpec)(nil), "k8s.io.kubernetes.pkg.apis.authorization.v1beta1.SelfSubjectAccessReviewSpec")
+ proto.RegisterType((*SubjectAccessReview)(nil), "k8s.io.kubernetes.pkg.apis.authorization.v1beta1.SubjectAccessReview")
+ proto.RegisterType((*SubjectAccessReviewSpec)(nil), "k8s.io.kubernetes.pkg.apis.authorization.v1beta1.SubjectAccessReviewSpec")
+ proto.RegisterType((*SubjectAccessReviewStatus)(nil), "k8s.io.kubernetes.pkg.apis.authorization.v1beta1.SubjectAccessReviewStatus")
+}
+func (m ExtraValue) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m ExtraValue) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m) > 0 {
+ for _, s := range m {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *LocalSubjectAccessReview) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LocalSubjectAccessReview) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n2, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n3, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ return i, nil
+}
+
+func (m *NonResourceAttributes) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NonResourceAttributes) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i += copy(dAtA[i:], m.Path)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Verb)))
+ i += copy(dAtA[i:], m.Verb)
+ return i, nil
+}
+
+func (m *ResourceAttributes) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceAttributes) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
+ i += copy(dAtA[i:], m.Namespace)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Verb)))
+ i += copy(dAtA[i:], m.Verb)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group)))
+ i += copy(dAtA[i:], m.Group)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version)))
+ i += copy(dAtA[i:], m.Version)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource)))
+ i += copy(dAtA[i:], m.Resource)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Subresource)))
+ i += copy(dAtA[i:], m.Subresource)
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ return i, nil
+}
+
+func (m *SelfSubjectAccessReview) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SelfSubjectAccessReview) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n4, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n5, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n6, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ return i, nil
+}
+
+func (m *SelfSubjectAccessReviewSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SelfSubjectAccessReviewSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.ResourceAttributes != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ResourceAttributes.Size()))
+ n7, err := m.ResourceAttributes.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ }
+ if m.NonResourceAttributes != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NonResourceAttributes.Size()))
+ n8, err := m.NonResourceAttributes.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n8
+ }
+ return i, nil
+}
+
+func (m *SubjectAccessReview) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SubjectAccessReview) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n9, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n9
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n10, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n10
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n11, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n11
+ return i, nil
+}
+
+func (m *SubjectAccessReviewSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SubjectAccessReviewSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.ResourceAttributes != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ResourceAttributes.Size()))
+ n12, err := m.ResourceAttributes.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n12
+ }
+ if m.NonResourceAttributes != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NonResourceAttributes.Size()))
+ n13, err := m.NonResourceAttributes.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n13
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.User)))
+ i += copy(dAtA[i:], m.User)
+ if len(m.Groups) > 0 {
+ for _, s := range m.Groups {
+ dAtA[i] = 0x22
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Extra) > 0 {
+ keysForExtra := make([]string, 0, len(m.Extra))
+ for k := range m.Extra {
+ keysForExtra = append(keysForExtra, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
+ for _, k := range keysForExtra {
+ dAtA[i] = 0x2a
+ i++
+ v := m.Extra[string(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n14, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n14
+ }
+ }
+ return i, nil
+}
+
+func (m *SubjectAccessReviewStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SubjectAccessReviewStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ if m.Allowed {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.EvaluationError)))
+ i += copy(dAtA[i:], m.EvaluationError)
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m ExtraValue) Size() (n int) {
+ var l int
+ _ = l
+ if len(m) > 0 {
+ for _, s := range m {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *LocalSubjectAccessReview) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *NonResourceAttributes) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Verb)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ResourceAttributes) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Namespace)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Verb)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Group)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Version)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Resource)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Subresource)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *SelfSubjectAccessReview) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *SelfSubjectAccessReviewSpec) Size() (n int) {
+ var l int
+ _ = l
+ if m.ResourceAttributes != nil {
+ l = m.ResourceAttributes.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.NonResourceAttributes != nil {
+ l = m.NonResourceAttributes.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *SubjectAccessReview) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *SubjectAccessReviewSpec) Size() (n int) {
+ var l int
+ _ = l
+ if m.ResourceAttributes != nil {
+ l = m.ResourceAttributes.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.NonResourceAttributes != nil {
+ l = m.NonResourceAttributes.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ l = len(m.User)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Groups) > 0 {
+ for _, s := range m.Groups {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Extra) > 0 {
+ for k, v := range m.Extra {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *SubjectAccessReviewStatus) Size() (n int) {
+ var l int
+ _ = l
+ n += 2
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.EvaluationError)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *LocalSubjectAccessReview) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&LocalSubjectAccessReview{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SubjectAccessReviewSpec", "SubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NonResourceAttributes) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NonResourceAttributes{`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `Verb:` + fmt.Sprintf("%v", this.Verb) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceAttributes) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ResourceAttributes{`,
+ `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
+ `Verb:` + fmt.Sprintf("%v", this.Verb) + `,`,
+ `Group:` + fmt.Sprintf("%v", this.Group) + `,`,
+ `Version:` + fmt.Sprintf("%v", this.Version) + `,`,
+ `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`,
+ `Subresource:` + fmt.Sprintf("%v", this.Subresource) + `,`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SelfSubjectAccessReview) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SelfSubjectAccessReview{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SelfSubjectAccessReviewSpec", "SelfSubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SelfSubjectAccessReviewSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SelfSubjectAccessReviewSpec{`,
+ `ResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.ResourceAttributes), "ResourceAttributes", "ResourceAttributes", 1) + `,`,
+ `NonResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.NonResourceAttributes), "NonResourceAttributes", "NonResourceAttributes", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SubjectAccessReview) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SubjectAccessReview{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SubjectAccessReviewSpec", "SubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SubjectAccessReviewSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForExtra := make([]string, 0, len(this.Extra))
+ for k := range this.Extra {
+ keysForExtra = append(keysForExtra, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
+ mapStringForExtra := "map[string]ExtraValue{"
+ for _, k := range keysForExtra {
+ mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k])
+ }
+ mapStringForExtra += "}"
+ s := strings.Join([]string{`&SubjectAccessReviewSpec{`,
+ `ResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.ResourceAttributes), "ResourceAttributes", "ResourceAttributes", 1) + `,`,
+ `NonResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.NonResourceAttributes), "NonResourceAttributes", "NonResourceAttributes", 1) + `,`,
+ `User:` + fmt.Sprintf("%v", this.User) + `,`,
+ `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`,
+ `Extra:` + mapStringForExtra + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SubjectAccessReviewStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SubjectAccessReviewStatus{`,
+ `Allowed:` + fmt.Sprintf("%v", this.Allowed) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `EvaluationError:` + fmt.Sprintf("%v", this.EvaluationError) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *ExtraValue) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExtraValue: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExtraValue: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ *m = append(*m, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LocalSubjectAccessReview) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LocalSubjectAccessReview: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LocalSubjectAccessReview: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NonResourceAttributes) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NonResourceAttributes: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NonResourceAttributes: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Verb", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Verb = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceAttributes) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceAttributes: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceAttributes: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Namespace = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Verb", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Verb = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Group = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Version = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Resource = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Subresource", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Subresource = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SelfSubjectAccessReview) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SelfSubjectAccessReview: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SelfSubjectAccessReview: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SelfSubjectAccessReviewSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SelfSubjectAccessReviewSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SelfSubjectAccessReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceAttributes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ResourceAttributes == nil {
+ m.ResourceAttributes = &ResourceAttributes{}
+ }
+ if err := m.ResourceAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NonResourceAttributes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.NonResourceAttributes == nil {
+ m.NonResourceAttributes = &NonResourceAttributes{}
+ }
+ if err := m.NonResourceAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SubjectAccessReview) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SubjectAccessReview: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SubjectAccessReview: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SubjectAccessReviewSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SubjectAccessReviewSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SubjectAccessReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceAttributes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ResourceAttributes == nil {
+ m.ResourceAttributes = &ResourceAttributes{}
+ }
+ if err := m.ResourceAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NonResourceAttributes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.NonResourceAttributes == nil {
+ m.NonResourceAttributes = &NonResourceAttributes{}
+ }
+ if err := m.NonResourceAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.User = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Extra", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Extra == nil {
+ m.Extra = make(map[string]ExtraValue)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &ExtraValue{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Extra[mapkey] = *mapvalue
+ } else {
+ var mapvalue ExtraValue
+ m.Extra[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SubjectAccessReviewStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SubjectAccessReviewStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SubjectAccessReviewStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Allowed", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Allowed = bool(v != 0)
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field EvaluationError", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.EvaluationError = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/kubernetes/pkg/apis/authorization/v1beta1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 886 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4f, 0x6f, 0xdc, 0x44,
+ 0x14, 0x5f, 0xef, 0x9f, 0x64, 0x77, 0x02, 0xa4, 0x4c, 0x55, 0xe2, 0x06, 0xc9, 0xbb, 0x5a, 0x24,
+ 0x14, 0x24, 0x6a, 0x37, 0xe5, 0x5f, 0x55, 0x71, 0x20, 0x16, 0x51, 0x55, 0x41, 0x0b, 0x9a, 0x40,
+ 0x0e, 0x70, 0x61, 0xec, 0xbc, 0xee, 0x9a, 0xdd, 0xf5, 0x58, 0x33, 0x63, 0x97, 0x70, 0xea, 0x07,
+ 0xe0, 0xc0, 0xb1, 0x47, 0xbe, 0x02, 0x5f, 0x80, 0x2b, 0x39, 0xf6, 0x58, 0x24, 0xb4, 0x22, 0xe6,
+ 0x5b, 0x70, 0x42, 0x33, 0x9e, 0x5d, 0x67, 0xbb, 0x0e, 0xd5, 0x42, 0x11, 0x1c, 0x72, 0xb3, 0xdf,
+ 0xfb, 0xbd, 0xdf, 0xfb, 0xcd, 0x9b, 0x37, 0xf3, 0x06, 0x7d, 0x30, 0xba, 0x29, 0xdc, 0x88, 0x79,
+ 0xa3, 0x34, 0x00, 0x1e, 0x83, 0x04, 0xe1, 0x25, 0xa3, 0x81, 0x47, 0x93, 0x48, 0x78, 0x34, 0x95,
+ 0x43, 0xc6, 0xa3, 0x6f, 0xa9, 0x8c, 0x58, 0xec, 0x65, 0xbb, 0x01, 0x48, 0xba, 0xeb, 0x0d, 0x20,
+ 0x06, 0x4e, 0x25, 0x1c, 0xb9, 0x09, 0x67, 0x92, 0xe1, 0xeb, 0x05, 0x83, 0x5b, 0x32, 0xb8, 0xc9,
+ 0x68, 0xe0, 0x2a, 0x06, 0x77, 0x81, 0xc1, 0x35, 0x0c, 0xdb, 0xd7, 0x06, 0x91, 0x1c, 0xa6, 0x81,
+ 0x1b, 0xb2, 0x89, 0x37, 0x60, 0x03, 0xe6, 0x69, 0xa2, 0x20, 0xbd, 0xaf, 0xff, 0xf4, 0x8f, 0xfe,
+ 0x2a, 0x12, 0x6c, 0xbf, 0x6d, 0x24, 0xd2, 0x24, 0x9a, 0xd0, 0x70, 0x18, 0xc5, 0xc0, 0x8f, 0x4b,
+ 0x91, 0x13, 0x90, 0xd4, 0xcb, 0x96, 0x64, 0x6d, 0x7b, 0xe7, 0x45, 0xf1, 0x34, 0x96, 0xd1, 0x04,
+ 0x96, 0x02, 0xde, 0x7d, 0x56, 0x80, 0x08, 0x87, 0x30, 0xa1, 0x4b, 0x71, 0x6f, 0x9d, 0x17, 0x97,
+ 0xca, 0x68, 0xec, 0x45, 0xb1, 0x14, 0x92, 0x3f, 0x1d, 0xd4, 0x7f, 0x0f, 0xa1, 0xfd, 0x6f, 0x24,
+ 0xa7, 0x87, 0x74, 0x9c, 0x02, 0xee, 0xa2, 0x56, 0x24, 0x61, 0x22, 0x6c, 0xab, 0xd7, 0xd8, 0xe9,
+ 0xf8, 0x9d, 0x7c, 0xda, 0x6d, 0xdd, 0x51, 0x06, 0x52, 0xd8, 0x6f, 0xb5, 0x1f, 0xfd, 0xd0, 0xad,
+ 0x3d, 0xfc, 0xb5, 0x57, 0xeb, 0x4f, 0xeb, 0xc8, 0xfe, 0x98, 0x85, 0x74, 0x7c, 0x90, 0x06, 0x5f,
+ 0x43, 0x28, 0xf7, 0xc2, 0x10, 0x84, 0x20, 0x90, 0x45, 0xf0, 0x00, 0x7f, 0x85, 0xda, 0xaa, 0x1c,
+ 0x47, 0x54, 0x52, 0xdb, 0xea, 0x59, 0x3b, 0x1b, 0x37, 0xae, 0xbb, 0x66, 0x77, 0xce, 0xaa, 0x2b,
+ 0xf7, 0x47, 0xa1, 0xdd, 0x6c, 0xd7, 0xfd, 0x44, 0x73, 0xdd, 0x05, 0x49, 0x7d, 0x7c, 0x32, 0xed,
+ 0xd6, 0xf2, 0x69, 0x17, 0x95, 0x36, 0x32, 0x67, 0xc5, 0x23, 0xd4, 0x14, 0x09, 0x84, 0x76, 0x5d,
+ 0xb3, 0xdf, 0x71, 0x57, 0xdd, 0x7b, 0xb7, 0x42, 0xf6, 0x41, 0x02, 0xa1, 0xff, 0x82, 0x49, 0xdb,
+ 0x54, 0x7f, 0x44, 0x27, 0xc1, 0x02, 0xad, 0x09, 0x49, 0x65, 0x2a, 0xec, 0x86, 0x4e, 0xf7, 0xd1,
+ 0xf3, 0x49, 0xa7, 0x29, 0xfd, 0x97, 0x4c, 0xc2, 0xb5, 0xe2, 0x9f, 0x98, 0x54, 0xfd, 0x2f, 0xd1,
+ 0x95, 0x7b, 0x2c, 0x26, 0x20, 0x58, 0xca, 0x43, 0xd8, 0x93, 0x92, 0x47, 0x41, 0x2a, 0x41, 0xe0,
+ 0x1e, 0x6a, 0x26, 0x54, 0x0e, 0x75, 0x61, 0x3b, 0xa5, 0xde, 0x4f, 0xa9, 0x1c, 0x12, 0xed, 0x51,
+ 0x88, 0x0c, 0x78, 0xa0, 0x8b, 0x73, 0x06, 0x71, 0x08, 0x3c, 0x20, 0xda, 0xd3, 0xff, 0xa9, 0x8e,
+ 0x70, 0x05, 0xb5, 0x87, 0x3a, 0x31, 0x9d, 0x80, 0x48, 0x68, 0x08, 0x86, 0xff, 0x65, 0x13, 0xdd,
+ 0xb9, 0x37, 0x73, 0x90, 0x12, 0xf3, 0xec, 0x4c, 0xf8, 0x35, 0xd4, 0x1a, 0x70, 0x96, 0x26, 0xba,
+ 0x74, 0x1d, 0xff, 0x45, 0x03, 0x69, 0xdd, 0x56, 0x46, 0x52, 0xf8, 0xf0, 0x1b, 0x68, 0x3d, 0x03,
+ 0x2e, 0x22, 0x16, 0xdb, 0x4d, 0x0d, 0xdb, 0x34, 0xb0, 0xf5, 0xc3, 0xc2, 0x4c, 0x66, 0x7e, 0xfc,
+ 0x26, 0x6a, 0x73, 0x23, 0xdc, 0x6e, 0x69, 0xec, 0x25, 0x83, 0x6d, 0xcf, 0x16, 0x44, 0xe6, 0x08,
+ 0xfc, 0x0e, 0xda, 0x10, 0x69, 0x30, 0x0f, 0x58, 0xd3, 0x01, 0x97, 0x4d, 0xc0, 0xc6, 0x41, 0xe9,
+ 0x22, 0x67, 0x71, 0x6a, 0x59, 0x6a, 0x8d, 0xf6, 0xfa, 0xe2, 0xb2, 0x54, 0x09, 0x88, 0xf6, 0xf4,
+ 0x4f, 0xeb, 0x68, 0xeb, 0x00, 0xc6, 0xf7, 0xff, 0x9b, 0xee, 0x67, 0x0b, 0xdd, 0x7f, 0xf7, 0x6f,
+ 0xb4, 0x63, 0xb5, 0xf4, 0xff, 0xd7, 0x09, 0xf8, 0xb9, 0x8e, 0x5e, 0xfd, 0x0b, 0xa1, 0xf8, 0x3b,
+ 0x0b, 0x61, 0xbe, 0xd4, 0xc4, 0xa6, 0xe4, 0x1f, 0xae, 0xae, 0x70, 0xf9, 0x40, 0xf8, 0xaf, 0xe4,
+ 0xd3, 0x6e, 0xc5, 0x41, 0x21, 0x15, 0x79, 0xf1, 0x23, 0x0b, 0x5d, 0x89, 0xab, 0x4e, 0xac, 0xd9,
+ 0xa6, 0xdb, 0xab, 0x2b, 0xaa, 0xbc, 0x00, 0xfc, 0xab, 0xf9, 0xb4, 0x5b, 0x7d, 0x37, 0x90, 0x6a,
+ 0x01, 0xfd, 0x5f, 0xea, 0xe8, 0xf2, 0xc5, 0x3d, 0xfd, 0xef, 0x74, 0xe9, 0x1f, 0x4d, 0xb4, 0x75,
+ 0xd1, 0xa1, 0xff, 0xb0, 0x43, 0xe7, 0x83, 0xa4, 0xb1, 0x78, 0xe3, 0x7e, 0x2e, 0x80, 0x9b, 0x41,
+ 0xd2, 0x9b, 0x0d, 0x92, 0xa6, 0x7e, 0x9b, 0x20, 0xb5, 0x15, 0x7a, 0x88, 0x88, 0xd9, 0x14, 0x39,
+ 0x46, 0x2d, 0x50, 0x6f, 0x19, 0xbb, 0xd5, 0x6b, 0xec, 0x6c, 0xdc, 0xf8, 0xec, 0xb9, 0x35, 0x9b,
+ 0xab, 0x9f, 0x48, 0xfb, 0xb1, 0xe4, 0xc7, 0xe5, 0x00, 0xd3, 0x36, 0x52, 0x64, 0xdc, 0xce, 0xcc,
+ 0x33, 0x4a, 0x63, 0xf0, 0x25, 0xd4, 0x18, 0xc1, 0x71, 0x31, 0x40, 0x89, 0xfa, 0xc4, 0x04, 0xb5,
+ 0x32, 0xf5, 0xc2, 0x32, 0x85, 0x7e, 0x7f, 0x75, 0x69, 0xe5, 0x2b, 0x8d, 0x14, 0x54, 0xb7, 0xea,
+ 0x37, 0xad, 0xfe, 0x8f, 0x16, 0xba, 0x7a, 0x6e, 0xcb, 0xaa, 0xb1, 0x4a, 0xc7, 0x63, 0xf6, 0x00,
+ 0x8e, 0xb4, 0x96, 0x76, 0x39, 0x56, 0xf7, 0x0a, 0x33, 0x99, 0xf9, 0xf1, 0xeb, 0x68, 0x8d, 0x03,
+ 0x15, 0x2c, 0x36, 0xa3, 0x7c, 0xde, 0xed, 0x44, 0x5b, 0x89, 0xf1, 0xe2, 0x3d, 0xb4, 0x09, 0x2a,
+ 0xbd, 0x16, 0xb7, 0xcf, 0x39, 0xe3, 0x66, 0xcb, 0xb6, 0x4c, 0xc0, 0xe6, 0xfe, 0xa2, 0x9b, 0x3c,
+ 0x8d, 0xf7, 0xaf, 0x9d, 0x9c, 0x3a, 0xb5, 0xc7, 0xa7, 0x4e, 0xed, 0xc9, 0xa9, 0x53, 0x7b, 0x98,
+ 0x3b, 0xd6, 0x49, 0xee, 0x58, 0x8f, 0x73, 0xc7, 0x7a, 0x92, 0x3b, 0xd6, 0x6f, 0xb9, 0x63, 0x7d,
+ 0xff, 0xbb, 0x53, 0xfb, 0x62, 0xdd, 0x2c, 0xfc, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x24, 0x8e,
+ 0x13, 0x84, 0x19, 0x0c, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/generated.proto
new file mode 100644
index 000000000..5653c29aa
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/generated.proto
@@ -0,0 +1,183 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.pkg.apis.authorization.v1beta1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1beta1";
+
+// ExtraValue masks the value so protobuf can generate
+// +protobuf.nullable=true
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+message ExtraValue {
+ // items, if empty, will result in an empty slice
+
+ repeated string items = 1;
+}
+
+// LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace.
+// Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions
+// checking.
+message LocalSubjectAccessReview {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace
+ // you made the request against. If empty, it is defaulted.
+ optional SubjectAccessReviewSpec spec = 2;
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ // +optional
+ optional SubjectAccessReviewStatus status = 3;
+}
+
+// NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface
+message NonResourceAttributes {
+ // Path is the URL path of the request
+ // +optional
+ optional string path = 1;
+
+ // Verb is the standard HTTP verb
+ // +optional
+ optional string verb = 2;
+}
+
+// ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface
+message ResourceAttributes {
+ // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces
+ // "" (empty) is defaulted for LocalSubjectAccessReviews
+ // "" (empty) is empty for cluster-scoped resources
+ // "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
+ // +optional
+ optional string namespace = 1;
+
+ // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all.
+ // +optional
+ optional string verb = 2;
+
+ // Group is the API Group of the Resource. "*" means all.
+ // +optional
+ optional string group = 3;
+
+ // Version is the API Version of the Resource. "*" means all.
+ // +optional
+ optional string version = 4;
+
+ // Resource is one of the existing resource types. "*" means all.
+ // +optional
+ optional string resource = 5;
+
+ // Subresource is one of the existing resource types. "" means none.
+ // +optional
+ optional string subresource = 6;
+
+ // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all.
+ // +optional
+ optional string name = 7;
+}
+
+// SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a
+// spec.namespace means "in all namespaces". Self is a special case, because users should always be able
+// to check whether they can perform an action
+message SelfSubjectAccessReview {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec holds information about the request being evaluated. user and groups must be empty
+ optional SelfSubjectAccessReviewSpec spec = 2;
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ // +optional
+ optional SubjectAccessReviewStatus status = 3;
+}
+
+// SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
+// and NonResourceAuthorizationAttributes must be set
+message SelfSubjectAccessReviewSpec {
+ // ResourceAuthorizationAttributes describes information for a resource access request
+ // +optional
+ optional ResourceAttributes resourceAttributes = 1;
+
+ // NonResourceAttributes describes information for a non-resource access request
+ // +optional
+ optional NonResourceAttributes nonResourceAttributes = 2;
+}
+
+// SubjectAccessReview checks whether or not a user or group can perform an action.
+message SubjectAccessReview {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec holds information about the request being evaluated
+ optional SubjectAccessReviewSpec spec = 2;
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ // +optional
+ optional SubjectAccessReviewStatus status = 3;
+}
+
+// SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
+// and NonResourceAuthorizationAttributes must be set
+message SubjectAccessReviewSpec {
+ // ResourceAuthorizationAttributes describes information for a resource access request
+ // +optional
+ optional ResourceAttributes resourceAttributes = 1;
+
+ // NonResourceAttributes describes information for a non-resource access request
+ // +optional
+ optional NonResourceAttributes nonResourceAttributes = 2;
+
+ // User is the user you're testing for.
+ // If you specify "User" but not "Group", then is it interpreted as "What if User were not a member of any groups
+ // +optional
+ optional string verb = 3;
+
+ // Groups is the groups you're testing for.
+ // +optional
+ repeated string group = 4;
+
+ // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer
+ // it needs a reflection here.
+ // +optional
+ map<string, ExtraValue> extra = 5;
+}
+
+// SubjectAccessReviewStatus
+message SubjectAccessReviewStatus {
+ // Allowed is required. True if the action would be allowed, false otherwise.
+ optional bool allowed = 1;
+
+ // Reason is optional. It indicates why a request was allowed or denied.
+ // +optional
+ optional string reason = 2;
+
+ // EvaluationError is an indication that some error occurred during the authorization check.
+ // It is entirely possible to get an error and be able to continue determine authorization status in spite of it.
+ // For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.
+ // +optional
+ optional string evaluationError = 3;
+}
+
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/register.go
new file mode 100644
index 000000000..599501cd0
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/register.go
@@ -0,0 +1,61 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "authorization.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &SelfSubjectAccessReview{},
+ &SubjectAccessReview{},
+ &LocalSubjectAccessReview{},
+ )
+
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types.generated.go
new file mode 100644
index 000000000..939603c58
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types.generated.go
@@ -0,0 +1,3233 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1beta1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ pkg2_types "k8s.io/apimachinery/pkg/types"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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 pkg1_v1.TypeMeta
+ var v1 pkg2_types.UID
+ var v2 time.Time
+ _, _, _ = v0, v1, v2
+ }
+}
+
+func (x *SubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[4] = true
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SubjectAccessReview) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = SubjectAccessReviewSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = SubjectAccessReviewSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *SelfSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[4] = true
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SelfSubjectAccessReview) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SelfSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = SelfSubjectAccessReviewSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = SelfSubjectAccessReviewSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *LocalSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[4] = true
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *LocalSubjectAccessReview) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *LocalSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = SubjectAccessReviewSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = SubjectAccessReviewSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = SubjectAccessReviewStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ResourceAttributes) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [7]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Namespace != ""
+ yyq2[1] = x.Verb != ""
+ yyq2[2] = x.Group != ""
+ yyq2[3] = x.Version != ""
+ yyq2[4] = x.Resource != ""
+ yyq2[5] = x.Subresource != ""
+ yyq2[6] = x.Name != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(7)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("namespace"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Verb))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("verb"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Verb))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Group))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("group"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Group))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Version))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("version"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Version))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Resource))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resource"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Resource))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Subresource))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("subresource"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Subresource))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ResourceAttributes) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ResourceAttributes) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "verb":
+ if r.TryDecodeAsNil() {
+ x.Verb = ""
+ } else {
+ yyv6 := &x.Verb
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "group":
+ if r.TryDecodeAsNil() {
+ x.Group = ""
+ } else {
+ yyv8 := &x.Group
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "version":
+ if r.TryDecodeAsNil() {
+ x.Version = ""
+ } else {
+ yyv10 := &x.Version
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "resource":
+ if r.TryDecodeAsNil() {
+ x.Resource = ""
+ } else {
+ yyv12 := &x.Resource
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ case "subresource":
+ if r.TryDecodeAsNil() {
+ x.Subresource = ""
+ } else {
+ yyv14 := &x.Subresource
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv16 := &x.Name
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ResourceAttributes) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj18 int
+ var yyb18 bool
+ var yyhl18 bool = l >= 0
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Namespace = ""
+ } else {
+ yyv19 := &x.Namespace
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Verb = ""
+ } else {
+ yyv21 := &x.Verb
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Group = ""
+ } else {
+ yyv23 := &x.Group
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*string)(yyv23)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Version = ""
+ } else {
+ yyv25 := &x.Version
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*string)(yyv25)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Resource = ""
+ } else {
+ yyv27 := &x.Resource
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*string)(yyv27)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Subresource = ""
+ } else {
+ yyv29 := &x.Subresource
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*string)(yyv29)) = r.DecodeString()
+ }
+ }
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv31 := &x.Name
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*string)(yyv31)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj18++
+ if yyhl18 {
+ yyb18 = yyj18 > l
+ } else {
+ yyb18 = r.CheckBreak()
+ }
+ if yyb18 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj18-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NonResourceAttributes) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Path != ""
+ yyq2[1] = x.Verb != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("path"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Verb))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("verb"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Verb))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NonResourceAttributes) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NonResourceAttributes) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv4 := &x.Path
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "verb":
+ if r.TryDecodeAsNil() {
+ x.Verb = ""
+ } else {
+ yyv6 := &x.Verb
+ 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_containerMapEnd1234)
+}
+
+func (x *NonResourceAttributes) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv9 := &x.Path
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Verb = ""
+ } else {
+ yyv11 := &x.Verb
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *SubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.ResourceAttributes != nil
+ yyq2[1] = x.NonResourceAttributes != nil
+ yyq2[2] = x.User != ""
+ yyq2[3] = len(x.Groups) != 0
+ yyq2[4] = len(x.Extra) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.ResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.ResourceAttributes.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resourceAttributes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.ResourceAttributes.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.NonResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.NonResourceAttributes.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nonResourceAttributes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NonResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.NonResourceAttributes.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.User))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("user"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.User))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Groups == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Groups, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("group"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Groups == nil {
+ r.EncodeNil()
+ } else {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Groups, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.Extra == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("extra"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Extra == nil {
+ r.EncodeNil()
+ } else {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SubjectAccessReviewSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SubjectAccessReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "resourceAttributes":
+ if r.TryDecodeAsNil() {
+ if x.ResourceAttributes != nil {
+ x.ResourceAttributes = nil
+ }
+ } else {
+ if x.ResourceAttributes == nil {
+ x.ResourceAttributes = new(ResourceAttributes)
+ }
+ x.ResourceAttributes.CodecDecodeSelf(d)
+ }
+ case "nonResourceAttributes":
+ if r.TryDecodeAsNil() {
+ if x.NonResourceAttributes != nil {
+ x.NonResourceAttributes = nil
+ }
+ } else {
+ if x.NonResourceAttributes == nil {
+ x.NonResourceAttributes = new(NonResourceAttributes)
+ }
+ x.NonResourceAttributes.CodecDecodeSelf(d)
+ }
+ case "user":
+ if r.TryDecodeAsNil() {
+ x.User = ""
+ } else {
+ yyv6 := &x.User
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "group":
+ if r.TryDecodeAsNil() {
+ x.Groups = nil
+ } else {
+ yyv8 := &x.Groups
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv8, false, d)
+ }
+ }
+ case "extra":
+ if r.TryDecodeAsNil() {
+ x.Extra = nil
+ } else {
+ yyv10 := &x.Extra
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decMapstringExtraValue((*map[string]ExtraValue)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SubjectAccessReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ResourceAttributes != nil {
+ x.ResourceAttributes = nil
+ }
+ } else {
+ if x.ResourceAttributes == nil {
+ x.ResourceAttributes = new(ResourceAttributes)
+ }
+ x.ResourceAttributes.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.NonResourceAttributes != nil {
+ x.NonResourceAttributes = nil
+ }
+ } else {
+ if x.NonResourceAttributes == nil {
+ x.NonResourceAttributes = new(NonResourceAttributes)
+ }
+ x.NonResourceAttributes.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.User = ""
+ } else {
+ yyv15 := &x.User
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Groups = nil
+ } else {
+ yyv17 := &x.Groups
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv17, false, d)
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Extra = nil
+ } else {
+ yyv19 := &x.Extra
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decMapstringExtraValue((*map[string]ExtraValue)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x ExtraValue) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 {
+ h.encExtraValue((ExtraValue)(x), e)
+ }
+ }
+}
+
+func (x *ExtraValue) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ h.decExtraValue((*ExtraValue)(x), d)
+ }
+}
+
+func (x *SelfSubjectAccessReviewSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.ResourceAttributes != nil
+ yyq2[1] = x.NonResourceAttributes != 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.ResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.ResourceAttributes.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resourceAttributes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.ResourceAttributes.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.NonResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.NonResourceAttributes.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nonResourceAttributes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NonResourceAttributes == nil {
+ r.EncodeNil()
+ } else {
+ x.NonResourceAttributes.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SelfSubjectAccessReviewSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SelfSubjectAccessReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "resourceAttributes":
+ if r.TryDecodeAsNil() {
+ if x.ResourceAttributes != nil {
+ x.ResourceAttributes = nil
+ }
+ } else {
+ if x.ResourceAttributes == nil {
+ x.ResourceAttributes = new(ResourceAttributes)
+ }
+ x.ResourceAttributes.CodecDecodeSelf(d)
+ }
+ case "nonResourceAttributes":
+ if r.TryDecodeAsNil() {
+ if x.NonResourceAttributes != nil {
+ x.NonResourceAttributes = nil
+ }
+ } else {
+ if x.NonResourceAttributes == nil {
+ x.NonResourceAttributes = new(NonResourceAttributes)
+ }
+ x.NonResourceAttributes.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SelfSubjectAccessReviewSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ResourceAttributes != nil {
+ x.ResourceAttributes = nil
+ }
+ } else {
+ if x.ResourceAttributes == nil {
+ x.ResourceAttributes = new(ResourceAttributes)
+ }
+ x.ResourceAttributes.CodecDecodeSelf(d)
+ }
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.NonResourceAttributes != nil {
+ x.NonResourceAttributes = nil
+ }
+ } else {
+ if x.NonResourceAttributes == nil {
+ x.NonResourceAttributes = new(NonResourceAttributes)
+ }
+ x.NonResourceAttributes.CodecDecodeSelf(d)
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *SubjectAccessReviewStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.Reason != ""
+ yyq2[2] = x.EvaluationError != ""
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Allowed))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("allowed"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Allowed))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.EvaluationError))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("evaluationError"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.EvaluationError))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SubjectAccessReviewStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SubjectAccessReviewStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "allowed":
+ if r.TryDecodeAsNil() {
+ x.Allowed = false
+ } else {
+ yyv4 := &x.Allowed
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*bool)(yyv4)) = r.DecodeBool()
+ }
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv6 := &x.Reason
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "evaluationError":
+ if r.TryDecodeAsNil() {
+ x.EvaluationError = ""
+ } else {
+ yyv8 := &x.EvaluationError
+ 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_containerMapEnd1234)
+}
+
+func (x *SubjectAccessReviewStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Allowed = false
+ } else {
+ yyv11 := &x.Allowed
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*bool)(yyv11)) = r.DecodeBool()
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv13 := &x.Reason
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.EvaluationError = ""
+ } else {
+ yyv15 := &x.EvaluationError
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encMapstringExtraValue(v map[string]ExtraValue, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeMapStart(len(v))
+ for yyk1, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ yym2 := z.EncBinary()
+ _ = yym2
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yyk1))
+ }
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyv1 == nil {
+ r.EncodeNil()
+ } else {
+ yyv1.CodecEncodeSelf(e)
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) decMapstringExtraValue(v *map[string]ExtraValue, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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, 40)
+ yyv1 = make(map[string]ExtraValue, yyrl1)
+ *v = yyv1
+ }
+ var yymk1 string
+ var yymv1 ExtraValue
+ var yymg1 bool
+ if yybh1.MapValueReset {
+ yymg1 = true
+ }
+ if yyl1 > 0 {
+ for yyj1 := 0; yyj1 < yyl1; yyj1++ {
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ if r.TryDecodeAsNil() {
+ yymk1 = ""
+ } else {
+ yyv2 := &yymk1
+ yym3 := z.DecBinary()
+ _ = yym3
+ if false {
+ } else {
+ *((*string)(yyv2)) = r.DecodeString()
+ }
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv4 := &yymv1
+ yyv4.CodecDecodeSelf(d)
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } else if yyl1 < 0 {
+ for yyj1 := 0; !r.CheckBreak(); yyj1++ {
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ if r.TryDecodeAsNil() {
+ yymk1 = ""
+ } else {
+ yyv5 := &yymk1
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*string)(yyv5)) = r.DecodeString()
+ }
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv7 := &yymv1
+ yyv7.CodecDecodeSelf(d)
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } // else len==0: TODO: Should we clear map entries?
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) encExtraValue(v ExtraValue, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym2 := z.EncBinary()
+ _ = yym2
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yyv1))
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decExtraValue(v *ExtraValue, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []string{}
+ 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) {
+
+ yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]string, yyrl1)
+ }
+ } else {
+ yyv1 = make([]string, yyrl1)
+ }
+ yyc1 = true
+ yyrr1 = len(yyv1)
+ } else if yyl1 != len(yyv1) {
+ yyv1 = yyv1[:yyl1]
+ yyc1 = true
+ }
+ yyj1 := 0
+ for ; yyj1 < yyrr1; yyj1++ {
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yym3 := z.DecBinary()
+ _ = yym3
+ if false {
+ } else {
+ *((*string)(yyv2)) = r.DecodeString()
+ }
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv4 := &yyv1[yyj1]
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, "") // var yyz1 string
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv6 := &yyv1[yyj1]
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+
+ } else {
+ z.DecSwallow()
+ }
+
+ }
+ if yyj1 < len(yyv1) {
+ yyv1 = yyv1[:yyj1]
+ yyc1 = true
+ } else if yyj1 == 0 && yyv1 == nil {
+ yyv1 = []string{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types.go
new file mode 100644
index 000000000..8a1727423
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types.go
@@ -0,0 +1,176 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "fmt"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+// +noMethods=true
+
+// SubjectAccessReview checks whether or not a user or group can perform an action.
+type SubjectAccessReview struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec holds information about the request being evaluated
+ Spec SubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ // +optional
+ Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// +genclient=true
+// +nonNamespaced=true
+// +noMethods=true
+
+// SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a
+// spec.namespace means "in all namespaces". Self is a special case, because users should always be able
+// to check whether they can perform an action
+type SelfSubjectAccessReview struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec holds information about the request being evaluated. user and groups must be empty
+ Spec SelfSubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ // +optional
+ Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// +genclient=true
+// +noMethods=true
+
+// LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace.
+// Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions
+// checking.
+type LocalSubjectAccessReview struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace
+ // you made the request against. If empty, it is defaulted.
+ Spec SubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is filled in by the server and indicates whether the request is allowed or not
+ // +optional
+ Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface
+type ResourceAttributes struct {
+ // Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces
+ // "" (empty) is defaulted for LocalSubjectAccessReviews
+ // "" (empty) is empty for cluster-scoped resources
+ // "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
+ // +optional
+ Namespace string `json:"namespace,omitempty" protobuf:"bytes,1,opt,name=namespace"`
+ // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all.
+ // +optional
+ Verb string `json:"verb,omitempty" protobuf:"bytes,2,opt,name=verb"`
+ // Group is the API Group of the Resource. "*" means all.
+ // +optional
+ Group string `json:"group,omitempty" protobuf:"bytes,3,opt,name=group"`
+ // Version is the API Version of the Resource. "*" means all.
+ // +optional
+ Version string `json:"version,omitempty" protobuf:"bytes,4,opt,name=version"`
+ // Resource is one of the existing resource types. "*" means all.
+ // +optional
+ Resource string `json:"resource,omitempty" protobuf:"bytes,5,opt,name=resource"`
+ // Subresource is one of the existing resource types. "" means none.
+ // +optional
+ Subresource string `json:"subresource,omitempty" protobuf:"bytes,6,opt,name=subresource"`
+ // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all.
+ // +optional
+ Name string `json:"name,omitempty" protobuf:"bytes,7,opt,name=name"`
+}
+
+// NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface
+type NonResourceAttributes struct {
+ // Path is the URL path of the request
+ // +optional
+ Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"`
+ // Verb is the standard HTTP verb
+ // +optional
+ Verb string `json:"verb,omitempty" protobuf:"bytes,2,opt,name=verb"`
+}
+
+// SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
+// and NonResourceAuthorizationAttributes must be set
+type SubjectAccessReviewSpec struct {
+ // ResourceAuthorizationAttributes describes information for a resource access request
+ // +optional
+ ResourceAttributes *ResourceAttributes `json:"resourceAttributes,omitempty" protobuf:"bytes,1,opt,name=resourceAttributes"`
+ // NonResourceAttributes describes information for a non-resource access request
+ // +optional
+ NonResourceAttributes *NonResourceAttributes `json:"nonResourceAttributes,omitempty" protobuf:"bytes,2,opt,name=nonResourceAttributes"`
+
+ // User is the user you're testing for.
+ // If you specify "User" but not "Group", then is it interpreted as "What if User were not a member of any groups
+ // +optional
+ User string `json:"user,omitempty" protobuf:"bytes,3,opt,name=verb"`
+ // Groups is the groups you're testing for.
+ // +optional
+ Groups []string `json:"group,omitempty" protobuf:"bytes,4,rep,name=group"`
+ // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer
+ // it needs a reflection here.
+ // +optional
+ Extra map[string]ExtraValue `json:"extra,omitempty" protobuf:"bytes,5,rep,name=extra"`
+}
+
+// ExtraValue masks the value so protobuf can generate
+// +protobuf.nullable=true
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+type ExtraValue []string
+
+func (t ExtraValue) String() string {
+ return fmt.Sprintf("%v", []string(t))
+}
+
+// SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
+// and NonResourceAuthorizationAttributes must be set
+type SelfSubjectAccessReviewSpec struct {
+ // ResourceAuthorizationAttributes describes information for a resource access request
+ // +optional
+ ResourceAttributes *ResourceAttributes `json:"resourceAttributes,omitempty" protobuf:"bytes,1,opt,name=resourceAttributes"`
+ // NonResourceAttributes describes information for a non-resource access request
+ // +optional
+ NonResourceAttributes *NonResourceAttributes `json:"nonResourceAttributes,omitempty" protobuf:"bytes,2,opt,name=nonResourceAttributes"`
+}
+
+// SubjectAccessReviewStatus
+type SubjectAccessReviewStatus struct {
+ // Allowed is required. True if the action would be allowed, false otherwise.
+ Allowed bool `json:"allowed" protobuf:"varint,1,opt,name=allowed"`
+ // Reason is optional. It indicates why a request was allowed or denied.
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"`
+ // EvaluationError is an indication that some error occurred during the authorization check.
+ // It is entirely possible to get an error and be able to continue determine authorization status in spite of it.
+ // For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.
+ // +optional
+ EvaluationError string `json:"evaluationError,omitempty" protobuf:"bytes,3,opt,name=evaluationError"`
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..8e521ba16
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types_swagger_doc_generated.go
@@ -0,0 +1,119 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_LocalSubjectAccessReview = map[string]string{
+ "": "LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.",
+ "spec": "Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.",
+ "status": "Status is filled in by the server and indicates whether the request is allowed or not",
+}
+
+func (LocalSubjectAccessReview) SwaggerDoc() map[string]string {
+ return map_LocalSubjectAccessReview
+}
+
+var map_NonResourceAttributes = map[string]string{
+ "": "NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface",
+ "path": "Path is the URL path of the request",
+ "verb": "Verb is the standard HTTP verb",
+}
+
+func (NonResourceAttributes) SwaggerDoc() map[string]string {
+ return map_NonResourceAttributes
+}
+
+var map_ResourceAttributes = map[string]string{
+ "": "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface",
+ "namespace": "Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces \"\" (empty) is defaulted for LocalSubjectAccessReviews \"\" (empty) is empty for cluster-scoped resources \"\" (empty) means \"all\" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview",
+ "verb": "Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all.",
+ "group": "Group is the API Group of the Resource. \"*\" means all.",
+ "version": "Version is the API Version of the Resource. \"*\" means all.",
+ "resource": "Resource is one of the existing resource types. \"*\" means all.",
+ "subresource": "Subresource is one of the existing resource types. \"\" means none.",
+ "name": "Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all.",
+}
+
+func (ResourceAttributes) SwaggerDoc() map[string]string {
+ return map_ResourceAttributes
+}
+
+var map_SelfSubjectAccessReview = map[string]string{
+ "": "SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means \"in all namespaces\". Self is a special case, because users should always be able to check whether they can perform an action",
+ "spec": "Spec holds information about the request being evaluated. user and groups must be empty",
+ "status": "Status is filled in by the server and indicates whether the request is allowed or not",
+}
+
+func (SelfSubjectAccessReview) SwaggerDoc() map[string]string {
+ return map_SelfSubjectAccessReview
+}
+
+var map_SelfSubjectAccessReviewSpec = map[string]string{
+ "": "SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set",
+ "resourceAttributes": "ResourceAuthorizationAttributes describes information for a resource access request",
+ "nonResourceAttributes": "NonResourceAttributes describes information for a non-resource access request",
+}
+
+func (SelfSubjectAccessReviewSpec) SwaggerDoc() map[string]string {
+ return map_SelfSubjectAccessReviewSpec
+}
+
+var map_SubjectAccessReview = map[string]string{
+ "": "SubjectAccessReview checks whether or not a user or group can perform an action.",
+ "spec": "Spec holds information about the request being evaluated",
+ "status": "Status is filled in by the server and indicates whether the request is allowed or not",
+}
+
+func (SubjectAccessReview) SwaggerDoc() map[string]string {
+ return map_SubjectAccessReview
+}
+
+var map_SubjectAccessReviewSpec = map[string]string{
+ "": "SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set",
+ "resourceAttributes": "ResourceAuthorizationAttributes describes information for a resource access request",
+ "nonResourceAttributes": "NonResourceAttributes describes information for a non-resource access request",
+ "user": "User is the user you're testing for. If you specify \"User\" but not \"Group\", then is it interpreted as \"What if User were not a member of any groups",
+ "group": "Groups is the groups you're testing for.",
+ "extra": "Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here.",
+}
+
+func (SubjectAccessReviewSpec) SwaggerDoc() map[string]string {
+ return map_SubjectAccessReviewSpec
+}
+
+var map_SubjectAccessReviewStatus = map[string]string{
+ "": "SubjectAccessReviewStatus",
+ "allowed": "Allowed is required. True if the action would be allowed, false otherwise.",
+ "reason": "Reason is optional. It indicates why a request was allowed or denied.",
+ "evaluationError": "EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.",
+}
+
+func (SubjectAccessReviewStatus) SwaggerDoc() map[string]string {
+ return map_SubjectAccessReviewStatus
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/zz_generated.conversion.go
new file mode 100644
index 000000000..850cdee39
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/zz_generated.conversion.go
@@ -0,0 +1,279 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ authorization "k8s.io/kubernetes/pkg/apis/authorization"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1beta1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview,
+ Convert_authorization_LocalSubjectAccessReview_To_v1beta1_LocalSubjectAccessReview,
+ Convert_v1beta1_NonResourceAttributes_To_authorization_NonResourceAttributes,
+ Convert_authorization_NonResourceAttributes_To_v1beta1_NonResourceAttributes,
+ Convert_v1beta1_ResourceAttributes_To_authorization_ResourceAttributes,
+ Convert_authorization_ResourceAttributes_To_v1beta1_ResourceAttributes,
+ Convert_v1beta1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview,
+ Convert_authorization_SelfSubjectAccessReview_To_v1beta1_SelfSubjectAccessReview,
+ Convert_v1beta1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec,
+ Convert_authorization_SelfSubjectAccessReviewSpec_To_v1beta1_SelfSubjectAccessReviewSpec,
+ Convert_v1beta1_SubjectAccessReview_To_authorization_SubjectAccessReview,
+ Convert_authorization_SubjectAccessReview_To_v1beta1_SubjectAccessReview,
+ Convert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec,
+ Convert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec,
+ Convert_v1beta1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus,
+ Convert_authorization_SubjectAccessReviewStatus_To_v1beta1_SubjectAccessReviewStatus,
+ )
+}
+
+func autoConvert_v1beta1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview(in *LocalSubjectAccessReview, out *authorization.LocalSubjectAccessReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview is an autogenerated conversion function.
+func Convert_v1beta1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview(in *LocalSubjectAccessReview, out *authorization.LocalSubjectAccessReview, s conversion.Scope) error {
+ return autoConvert_v1beta1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview(in, out, s)
+}
+
+func autoConvert_authorization_LocalSubjectAccessReview_To_v1beta1_LocalSubjectAccessReview(in *authorization.LocalSubjectAccessReview, out *LocalSubjectAccessReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_authorization_SubjectAccessReviewStatus_To_v1beta1_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_authorization_LocalSubjectAccessReview_To_v1beta1_LocalSubjectAccessReview is an autogenerated conversion function.
+func Convert_authorization_LocalSubjectAccessReview_To_v1beta1_LocalSubjectAccessReview(in *authorization.LocalSubjectAccessReview, out *LocalSubjectAccessReview, s conversion.Scope) error {
+ return autoConvert_authorization_LocalSubjectAccessReview_To_v1beta1_LocalSubjectAccessReview(in, out, s)
+}
+
+func autoConvert_v1beta1_NonResourceAttributes_To_authorization_NonResourceAttributes(in *NonResourceAttributes, out *authorization.NonResourceAttributes, s conversion.Scope) error {
+ out.Path = in.Path
+ out.Verb = in.Verb
+ return nil
+}
+
+// Convert_v1beta1_NonResourceAttributes_To_authorization_NonResourceAttributes is an autogenerated conversion function.
+func Convert_v1beta1_NonResourceAttributes_To_authorization_NonResourceAttributes(in *NonResourceAttributes, out *authorization.NonResourceAttributes, s conversion.Scope) error {
+ return autoConvert_v1beta1_NonResourceAttributes_To_authorization_NonResourceAttributes(in, out, s)
+}
+
+func autoConvert_authorization_NonResourceAttributes_To_v1beta1_NonResourceAttributes(in *authorization.NonResourceAttributes, out *NonResourceAttributes, s conversion.Scope) error {
+ out.Path = in.Path
+ out.Verb = in.Verb
+ return nil
+}
+
+// Convert_authorization_NonResourceAttributes_To_v1beta1_NonResourceAttributes is an autogenerated conversion function.
+func Convert_authorization_NonResourceAttributes_To_v1beta1_NonResourceAttributes(in *authorization.NonResourceAttributes, out *NonResourceAttributes, s conversion.Scope) error {
+ return autoConvert_authorization_NonResourceAttributes_To_v1beta1_NonResourceAttributes(in, out, s)
+}
+
+func autoConvert_v1beta1_ResourceAttributes_To_authorization_ResourceAttributes(in *ResourceAttributes, out *authorization.ResourceAttributes, s conversion.Scope) error {
+ out.Namespace = in.Namespace
+ out.Verb = in.Verb
+ out.Group = in.Group
+ out.Version = in.Version
+ out.Resource = in.Resource
+ out.Subresource = in.Subresource
+ out.Name = in.Name
+ return nil
+}
+
+// Convert_v1beta1_ResourceAttributes_To_authorization_ResourceAttributes is an autogenerated conversion function.
+func Convert_v1beta1_ResourceAttributes_To_authorization_ResourceAttributes(in *ResourceAttributes, out *authorization.ResourceAttributes, s conversion.Scope) error {
+ return autoConvert_v1beta1_ResourceAttributes_To_authorization_ResourceAttributes(in, out, s)
+}
+
+func autoConvert_authorization_ResourceAttributes_To_v1beta1_ResourceAttributes(in *authorization.ResourceAttributes, out *ResourceAttributes, s conversion.Scope) error {
+ out.Namespace = in.Namespace
+ out.Verb = in.Verb
+ out.Group = in.Group
+ out.Version = in.Version
+ out.Resource = in.Resource
+ out.Subresource = in.Subresource
+ out.Name = in.Name
+ return nil
+}
+
+// Convert_authorization_ResourceAttributes_To_v1beta1_ResourceAttributes is an autogenerated conversion function.
+func Convert_authorization_ResourceAttributes_To_v1beta1_ResourceAttributes(in *authorization.ResourceAttributes, out *ResourceAttributes, s conversion.Scope) error {
+ return autoConvert_authorization_ResourceAttributes_To_v1beta1_ResourceAttributes(in, out, s)
+}
+
+func autoConvert_v1beta1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview(in *SelfSubjectAccessReview, out *authorization.SelfSubjectAccessReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1beta1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview is an autogenerated conversion function.
+func Convert_v1beta1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview(in *SelfSubjectAccessReview, out *authorization.SelfSubjectAccessReview, s conversion.Scope) error {
+ return autoConvert_v1beta1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview(in, out, s)
+}
+
+func autoConvert_authorization_SelfSubjectAccessReview_To_v1beta1_SelfSubjectAccessReview(in *authorization.SelfSubjectAccessReview, out *SelfSubjectAccessReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_authorization_SelfSubjectAccessReviewSpec_To_v1beta1_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_authorization_SubjectAccessReviewStatus_To_v1beta1_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_authorization_SelfSubjectAccessReview_To_v1beta1_SelfSubjectAccessReview is an autogenerated conversion function.
+func Convert_authorization_SelfSubjectAccessReview_To_v1beta1_SelfSubjectAccessReview(in *authorization.SelfSubjectAccessReview, out *SelfSubjectAccessReview, s conversion.Scope) error {
+ return autoConvert_authorization_SelfSubjectAccessReview_To_v1beta1_SelfSubjectAccessReview(in, out, s)
+}
+
+func autoConvert_v1beta1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(in *SelfSubjectAccessReviewSpec, out *authorization.SelfSubjectAccessReviewSpec, s conversion.Scope) error {
+ out.ResourceAttributes = (*authorization.ResourceAttributes)(unsafe.Pointer(in.ResourceAttributes))
+ out.NonResourceAttributes = (*authorization.NonResourceAttributes)(unsafe.Pointer(in.NonResourceAttributes))
+ return nil
+}
+
+// Convert_v1beta1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec is an autogenerated conversion function.
+func Convert_v1beta1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(in *SelfSubjectAccessReviewSpec, out *authorization.SelfSubjectAccessReviewSpec, s conversion.Scope) error {
+ return autoConvert_v1beta1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(in, out, s)
+}
+
+func autoConvert_authorization_SelfSubjectAccessReviewSpec_To_v1beta1_SelfSubjectAccessReviewSpec(in *authorization.SelfSubjectAccessReviewSpec, out *SelfSubjectAccessReviewSpec, s conversion.Scope) error {
+ out.ResourceAttributes = (*ResourceAttributes)(unsafe.Pointer(in.ResourceAttributes))
+ out.NonResourceAttributes = (*NonResourceAttributes)(unsafe.Pointer(in.NonResourceAttributes))
+ return nil
+}
+
+// Convert_authorization_SelfSubjectAccessReviewSpec_To_v1beta1_SelfSubjectAccessReviewSpec is an autogenerated conversion function.
+func Convert_authorization_SelfSubjectAccessReviewSpec_To_v1beta1_SelfSubjectAccessReviewSpec(in *authorization.SelfSubjectAccessReviewSpec, out *SelfSubjectAccessReviewSpec, s conversion.Scope) error {
+ return autoConvert_authorization_SelfSubjectAccessReviewSpec_To_v1beta1_SelfSubjectAccessReviewSpec(in, out, s)
+}
+
+func autoConvert_v1beta1_SubjectAccessReview_To_authorization_SubjectAccessReview(in *SubjectAccessReview, out *authorization.SubjectAccessReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_SubjectAccessReview_To_authorization_SubjectAccessReview is an autogenerated conversion function.
+func Convert_v1beta1_SubjectAccessReview_To_authorization_SubjectAccessReview(in *SubjectAccessReview, out *authorization.SubjectAccessReview, s conversion.Scope) error {
+ return autoConvert_v1beta1_SubjectAccessReview_To_authorization_SubjectAccessReview(in, out, s)
+}
+
+func autoConvert_authorization_SubjectAccessReview_To_v1beta1_SubjectAccessReview(in *authorization.SubjectAccessReview, out *SubjectAccessReview, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_authorization_SubjectAccessReviewStatus_To_v1beta1_SubjectAccessReviewStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_authorization_SubjectAccessReview_To_v1beta1_SubjectAccessReview is an autogenerated conversion function.
+func Convert_authorization_SubjectAccessReview_To_v1beta1_SubjectAccessReview(in *authorization.SubjectAccessReview, out *SubjectAccessReview, s conversion.Scope) error {
+ return autoConvert_authorization_SubjectAccessReview_To_v1beta1_SubjectAccessReview(in, out, s)
+}
+
+func autoConvert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(in *SubjectAccessReviewSpec, out *authorization.SubjectAccessReviewSpec, s conversion.Scope) error {
+ out.ResourceAttributes = (*authorization.ResourceAttributes)(unsafe.Pointer(in.ResourceAttributes))
+ out.NonResourceAttributes = (*authorization.NonResourceAttributes)(unsafe.Pointer(in.NonResourceAttributes))
+ out.User = in.User
+ out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups))
+ out.Extra = *(*map[string]authorization.ExtraValue)(unsafe.Pointer(&in.Extra))
+ return nil
+}
+
+// Convert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec is an autogenerated conversion function.
+func Convert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(in *SubjectAccessReviewSpec, out *authorization.SubjectAccessReviewSpec, s conversion.Scope) error {
+ return autoConvert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(in, out, s)
+}
+
+func autoConvert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec(in *authorization.SubjectAccessReviewSpec, out *SubjectAccessReviewSpec, s conversion.Scope) error {
+ out.ResourceAttributes = (*ResourceAttributes)(unsafe.Pointer(in.ResourceAttributes))
+ out.NonResourceAttributes = (*NonResourceAttributes)(unsafe.Pointer(in.NonResourceAttributes))
+ out.User = in.User
+ out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups))
+ out.Extra = *(*map[string]ExtraValue)(unsafe.Pointer(&in.Extra))
+ return nil
+}
+
+// Convert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec is an autogenerated conversion function.
+func Convert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec(in *authorization.SubjectAccessReviewSpec, out *SubjectAccessReviewSpec, s conversion.Scope) error {
+ return autoConvert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec(in, out, s)
+}
+
+func autoConvert_v1beta1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(in *SubjectAccessReviewStatus, out *authorization.SubjectAccessReviewStatus, s conversion.Scope) error {
+ out.Allowed = in.Allowed
+ out.Reason = in.Reason
+ out.EvaluationError = in.EvaluationError
+ return nil
+}
+
+// Convert_v1beta1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus is an autogenerated conversion function.
+func Convert_v1beta1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(in *SubjectAccessReviewStatus, out *authorization.SubjectAccessReviewStatus, s conversion.Scope) error {
+ return autoConvert_v1beta1_SubjectAccessReviewStatus_To_authorization_SubjectAccessReviewStatus(in, out, s)
+}
+
+func autoConvert_authorization_SubjectAccessReviewStatus_To_v1beta1_SubjectAccessReviewStatus(in *authorization.SubjectAccessReviewStatus, out *SubjectAccessReviewStatus, s conversion.Scope) error {
+ out.Allowed = in.Allowed
+ out.Reason = in.Reason
+ out.EvaluationError = in.EvaluationError
+ return nil
+}
+
+// Convert_authorization_SubjectAccessReviewStatus_To_v1beta1_SubjectAccessReviewStatus is an autogenerated conversion function.
+func Convert_authorization_SubjectAccessReviewStatus_To_v1beta1_SubjectAccessReviewStatus(in *authorization.SubjectAccessReviewStatus, out *SubjectAccessReviewStatus, s conversion.Scope) error {
+ return autoConvert_authorization_SubjectAccessReviewStatus_To_v1beta1_SubjectAccessReviewStatus(in, out, s)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..fe99f2844
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/zz_generated.deepcopy.go
@@ -0,0 +1,187 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_LocalSubjectAccessReview, InType: reflect.TypeOf(&LocalSubjectAccessReview{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_NonResourceAttributes, InType: reflect.TypeOf(&NonResourceAttributes{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ResourceAttributes, InType: reflect.TypeOf(&ResourceAttributes{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SelfSubjectAccessReview, InType: reflect.TypeOf(&SelfSubjectAccessReview{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SelfSubjectAccessReviewSpec, InType: reflect.TypeOf(&SelfSubjectAccessReviewSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SubjectAccessReview, InType: reflect.TypeOf(&SubjectAccessReview{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SubjectAccessReviewSpec, InType: reflect.TypeOf(&SubjectAccessReviewSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SubjectAccessReviewStatus, InType: reflect.TypeOf(&SubjectAccessReviewStatus{})},
+ )
+}
+
+// DeepCopy_v1beta1_LocalSubjectAccessReview is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_LocalSubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LocalSubjectAccessReview)
+ out := out.(*LocalSubjectAccessReview)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_NonResourceAttributes is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_NonResourceAttributes(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NonResourceAttributes)
+ out := out.(*NonResourceAttributes)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ResourceAttributes is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ResourceAttributes(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceAttributes)
+ out := out.(*ResourceAttributes)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_SelfSubjectAccessReview is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_SelfSubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SelfSubjectAccessReview)
+ out := out.(*SelfSubjectAccessReview)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_SelfSubjectAccessReviewSpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_SelfSubjectAccessReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SelfSubjectAccessReviewSpec)
+ out := out.(*SelfSubjectAccessReviewSpec)
+ *out = *in
+ if in.ResourceAttributes != nil {
+ in, out := &in.ResourceAttributes, &out.ResourceAttributes
+ *out = new(ResourceAttributes)
+ **out = **in
+ }
+ if in.NonResourceAttributes != nil {
+ in, out := &in.NonResourceAttributes, &out.NonResourceAttributes
+ *out = new(NonResourceAttributes)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_SubjectAccessReview is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_SubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SubjectAccessReview)
+ out := out.(*SubjectAccessReview)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_SubjectAccessReviewSpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_SubjectAccessReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SubjectAccessReviewSpec)
+ out := out.(*SubjectAccessReviewSpec)
+ *out = *in
+ if in.ResourceAttributes != nil {
+ in, out := &in.ResourceAttributes, &out.ResourceAttributes
+ *out = new(ResourceAttributes)
+ **out = **in
+ }
+ if in.NonResourceAttributes != nil {
+ in, out := &in.NonResourceAttributes, &out.NonResourceAttributes
+ *out = new(NonResourceAttributes)
+ **out = **in
+ }
+ if in.Groups != nil {
+ in, out := &in.Groups, &out.Groups
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Extra != nil {
+ in, out := &in.Extra, &out.Extra
+ *out = make(map[string]ExtraValue)
+ for key, val := range *in {
+ if newVal, err := c.DeepCopy(&val); err != nil {
+ return err
+ } else {
+ (*out)[key] = *newVal.(*ExtraValue)
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_SubjectAccessReviewStatus is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_SubjectAccessReviewStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SubjectAccessReviewStatus)
+ out := out.(*SubjectAccessReviewStatus)
+ *out = *in
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/zz_generated.defaults.go
new file mode 100644
index 000000000..e24e70be3
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/zz_generated.defaults.go
@@ -0,0 +1,32 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/zz_generated.deepcopy.go
new file mode 100644
index 000000000..74c83c56a
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/zz_generated.deepcopy.go
@@ -0,0 +1,187 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package authorization
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_LocalSubjectAccessReview, InType: reflect.TypeOf(&LocalSubjectAccessReview{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_NonResourceAttributes, InType: reflect.TypeOf(&NonResourceAttributes{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_ResourceAttributes, InType: reflect.TypeOf(&ResourceAttributes{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SelfSubjectAccessReview, InType: reflect.TypeOf(&SelfSubjectAccessReview{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SelfSubjectAccessReviewSpec, InType: reflect.TypeOf(&SelfSubjectAccessReviewSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SubjectAccessReview, InType: reflect.TypeOf(&SubjectAccessReview{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SubjectAccessReviewSpec, InType: reflect.TypeOf(&SubjectAccessReviewSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_authorization_SubjectAccessReviewStatus, InType: reflect.TypeOf(&SubjectAccessReviewStatus{})},
+ )
+}
+
+// DeepCopy_authorization_LocalSubjectAccessReview is an autogenerated deepcopy function.
+func DeepCopy_authorization_LocalSubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*LocalSubjectAccessReview)
+ out := out.(*LocalSubjectAccessReview)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_authorization_NonResourceAttributes is an autogenerated deepcopy function.
+func DeepCopy_authorization_NonResourceAttributes(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NonResourceAttributes)
+ out := out.(*NonResourceAttributes)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_authorization_ResourceAttributes is an autogenerated deepcopy function.
+func DeepCopy_authorization_ResourceAttributes(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceAttributes)
+ out := out.(*ResourceAttributes)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_authorization_SelfSubjectAccessReview is an autogenerated deepcopy function.
+func DeepCopy_authorization_SelfSubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SelfSubjectAccessReview)
+ out := out.(*SelfSubjectAccessReview)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_authorization_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_authorization_SelfSubjectAccessReviewSpec is an autogenerated deepcopy function.
+func DeepCopy_authorization_SelfSubjectAccessReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SelfSubjectAccessReviewSpec)
+ out := out.(*SelfSubjectAccessReviewSpec)
+ *out = *in
+ if in.ResourceAttributes != nil {
+ in, out := &in.ResourceAttributes, &out.ResourceAttributes
+ *out = new(ResourceAttributes)
+ **out = **in
+ }
+ if in.NonResourceAttributes != nil {
+ in, out := &in.NonResourceAttributes, &out.NonResourceAttributes
+ *out = new(NonResourceAttributes)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_authorization_SubjectAccessReview is an autogenerated deepcopy function.
+func DeepCopy_authorization_SubjectAccessReview(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SubjectAccessReview)
+ out := out.(*SubjectAccessReview)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_authorization_SubjectAccessReviewSpec is an autogenerated deepcopy function.
+func DeepCopy_authorization_SubjectAccessReviewSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SubjectAccessReviewSpec)
+ out := out.(*SubjectAccessReviewSpec)
+ *out = *in
+ if in.ResourceAttributes != nil {
+ in, out := &in.ResourceAttributes, &out.ResourceAttributes
+ *out = new(ResourceAttributes)
+ **out = **in
+ }
+ if in.NonResourceAttributes != nil {
+ in, out := &in.NonResourceAttributes, &out.NonResourceAttributes
+ *out = new(NonResourceAttributes)
+ **out = **in
+ }
+ if in.Groups != nil {
+ in, out := &in.Groups, &out.Groups
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Extra != nil {
+ in, out := &in.Extra, &out.Extra
+ *out = make(map[string]ExtraValue)
+ for key, val := range *in {
+ if newVal, err := c.DeepCopy(&val); err != nil {
+ return err
+ } else {
+ (*out)[key] = *newVal.(*ExtraValue)
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_authorization_SubjectAccessReviewStatus is an autogenerated deepcopy function.
+func DeepCopy_authorization_SubjectAccessReviewStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SubjectAccessReviewStatus)
+ out := out.(*SubjectAccessReviewStatus)
+ *out = *in
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/annotations.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/annotations.go
new file mode 100644
index 000000000..c6586ea70
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/annotations.go
@@ -0,0 +1,34 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package autoscaling
+
+// MetricSpecsAnnotation is the annotation which holds non-CPU-utilization HPA metric
+// specs when converting the `Metrics` field from autoscaling/v2alpha1
+const MetricSpecsAnnotation = "autoscaling.alpha.kubernetes.io/metrics"
+
+// MetricStatusesAnnotation is the annotation which holds non-CPU-utilization HPA metric
+// statuses when converting the `CurrentMetrics` field from autoscaling/v2alpha1
+const MetricStatusesAnnotation = "autoscaling.alpha.kubernetes.io/current-metrics"
+
+// HorizontalPodAutoscalerConditionsAnnotation is the annotation which holds the conditions
+// of an HPA when converting the `Conditions` field from autoscaling/v2alpha1
+const HorizontalPodAutoscalerConditionsAnnotation = "autoscaling.alpha.kubernetes.io/conditions"
+
+// DefaultCPUUtilization is the default value for CPU utilization, provided no other
+// metrics are present. This is here because it's used by both the v2alpha1 defaulting
+// logic, and the pseudo-defaulting done in v1 conversion.
+const DefaultCPUUtilization = 80
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/doc.go
new file mode 100644
index 000000000..d9e11576f
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+
+package autoscaling // import "k8s.io/kubernetes/pkg/apis/autoscaling"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/install/install.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/install/install.go
new file mode 100644
index 000000000..3625e246c
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/install/install.go
@@ -0,0 +1,51 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package install installs the experimental API group, making it available as
+// an option to all of the API encoding/decoding machinery.
+package install
+
+import (
+ "k8s.io/apimachinery/pkg/apimachinery/announced"
+ "k8s.io/apimachinery/pkg/apimachinery/registered"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/autoscaling"
+ "k8s.io/kubernetes/pkg/apis/autoscaling/v1"
+ "k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1"
+)
+
+func init() {
+ Install(api.GroupFactoryRegistry, api.Registry, api.Scheme)
+}
+
+// Install registers the API group and adds types to a scheme
+func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
+ if err := announced.NewGroupMetaFactory(
+ &announced.GroupMetaFactoryArgs{
+ GroupName: autoscaling.GroupName,
+ VersionPreferenceOrder: []string{v1.SchemeGroupVersion.Version, v2alpha1.SchemeGroupVersion.Version},
+ ImportPrefix: "k8s.io/kubernetes/pkg/apis/autoscaling",
+ AddInternalObjectsToScheme: autoscaling.AddToScheme,
+ },
+ announced.VersionToSchemeFunc{
+ v1.SchemeGroupVersion.Version: v1.AddToScheme,
+ v2alpha1.SchemeGroupVersion.Version: v2alpha1.AddToScheme,
+ },
+ ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil {
+ panic(err)
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/register.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/register.go
new file mode 100644
index 000000000..2bcea84b9
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/register.go
@@ -0,0 +1,53 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package autoscaling
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "autoscaling"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Scale{},
+ &HorizontalPodAutoscaler{},
+ &HorizontalPodAutoscalerList{},
+ )
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/types.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/types.go
new file mode 100644
index 000000000..04d88e211
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/types.go
@@ -0,0 +1,358 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package autoscaling
+
+import (
+ "k8s.io/apimachinery/pkg/api/resource"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/kubernetes/pkg/api"
+)
+
+// Scale represents a scaling request for a resource.
+type Scale struct {
+ metav1.TypeMeta
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
+ // +optional
+ metav1.ObjectMeta
+
+ // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
+ // +optional
+ Spec ScaleSpec
+
+ // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.
+ // +optional
+ Status ScaleStatus
+}
+
+// ScaleSpec describes the attributes of a scale subresource.
+type ScaleSpec struct {
+ // desired number of instances for the scaled object.
+ // +optional
+ Replicas int32
+}
+
+// ScaleStatus represents the current status of a scale subresource.
+type ScaleStatus struct {
+ // actual number of observed instances of the scaled object.
+ Replicas int32
+
+ // label query over pods that should match the replicas count. This is same
+ // as the label selector but in the string format to avoid introspection
+ // by clients. The string will be in the same format as the query-param syntax.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ Selector string
+}
+
+// CrossVersionObjectReference contains enough information to let you identify the referred resource.
+type CrossVersionObjectReference struct {
+ // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"
+ Kind string
+ // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
+ Name string
+ // API version of the referent
+ // +optional
+ APIVersion string
+}
+
+// HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.
+type HorizontalPodAutoscalerSpec struct {
+ // ScaleTargetRef points to the target resource to scale, and is used to the pods for which metrics
+ // should be collected, as well as to actually change the replica count.
+ ScaleTargetRef CrossVersionObjectReference
+ // MinReplicas is the lower limit for the number of replicas to which the autoscaler can scale down.
+ // It defaults to 1 pod.
+ // +optional
+ MinReplicas *int32
+ // MaxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.
+ // It cannot be less that minReplicas.
+ MaxReplicas int32
+ // Metrics contains the specifications for which to use to calculate the
+ // desired replica count (the maximum replica count across all metrics will
+ // be used). The desired replica count is calculated multiplying the
+ // ratio between the target value and the current value by the current
+ // number of pods. Ergo, metrics used must decrease as the pod count is
+ // increased, and vice-versa. See the individual metric source types for
+ // more information about how each type of metric must respond.
+ // +optional
+ Metrics []MetricSpec
+}
+
+// MetricSourceType indicates the type of metric.
+type MetricSourceType string
+
+var (
+ // ObjectMetricSourceType is a metric describing a kubernetes object
+ // (for example, hits-per-second on an Ingress object).
+ ObjectMetricSourceType MetricSourceType = "Object"
+ // PodsMetricSourceType is a metric describing each pod in the current scale
+ // target (for example, transactions-processed-per-second). The values
+ // will be averaged together before being compared to the target value.
+ PodsMetricSourceType MetricSourceType = "Pods"
+ // ResourceMetricSourceType is a resource metric known to Kubernetes, as
+ // specified in requests and limits, describing each pod in the current
+ // scale target (e.g. CPU or memory). Such metrics are built in to
+ // Kubernetes, and have special scaling options on top of those available
+ // to normal per-pod metrics (the "pods" source).
+ ResourceMetricSourceType MetricSourceType = "Resource"
+)
+
+// MetricSpec specifies how to scale based on a single metric
+// (only `type` and one other matching field should be set at once).
+type MetricSpec struct {
+ // Type is the type of metric source. It should match one of the fields below.
+ Type MetricSourceType
+
+ // Object refers to a metric describing a single kubernetes object
+ // (for example, hits-per-second on an Ingress object).
+ // +optional
+ Object *ObjectMetricSource
+ // Pods refers to a metric describing each pod in the current scale target
+ // (for example, transactions-processed-per-second). The values will be
+ // averaged together before being compared to the target value.
+ // +optional
+ Pods *PodsMetricSource
+ // Resource refers to a resource metric (such as those specified in
+ // requests and limits) known to Kubernetes describing each pod in the
+ // current scale target (e.g. CPU or memory). Such metrics are built in to
+ // Kubernetes, and have special scaling options on top of those available
+ // to normal per-pod metrics using the "pods" source.
+ // +optional
+ Resource *ResourceMetricSource
+}
+
+// ObjectMetricSource indicates how to scale on a metric describing a
+// kubernetes object (for example, hits-per-second on an Ingress object).
+type ObjectMetricSource struct {
+ // Target is the described Kubernetes object.
+ Target CrossVersionObjectReference
+
+ // MetricName is the name of the metric in question.
+ MetricName string
+ // TargetValue is the target value of the metric (as a quantity).
+ TargetValue resource.Quantity
+}
+
+// PodsMetricSource indicates how to scale on a metric describing each pod in
+// the current scale target (for example, transactions-processed-per-second).
+// The values will be averaged together before being compared to the target
+// value.
+type PodsMetricSource struct {
+ // MetricName is the name of the metric in question
+ MetricName string
+ // TargetAverageValue is the target value of the average of the
+ // metric across all relevant pods (as a quantity)
+ TargetAverageValue resource.Quantity
+}
+
+// ResourceMetricSource indicates how to scale on a resource metric known to
+// Kubernetes, as specified in requests and limits, describing each pod in the
+// current scale target (e.g. CPU or memory). The values will be averaged
+// together before being compared to the target. Such metrics are built in to
+// Kubernetes, and have special scaling options on top of those available to
+// normal per-pod metrics using the "pods" source. Only one "target" type
+// should be set.
+type ResourceMetricSource struct {
+ // Name is the name of the resource in question.
+ Name api.ResourceName
+ // TargetAverageUtilization is the target value of the average of the
+ // resource metric across all relevant pods, represented as a percentage of
+ // the requested value of the resource for the pods.
+ // +optional
+ TargetAverageUtilization *int32
+ // TargetAverageValue is the target value of the average of the
+ // resource metric across all relevant pods, as a raw value (instead of as
+ // a percentage of the request), similar to the "pods" metric source type.
+ // +optional
+ TargetAverageValue *resource.Quantity
+}
+
+// HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.
+type HorizontalPodAutoscalerStatus struct {
+ // ObservedGeneration is the most recent generation observed by this autoscaler.
+ // +optional
+ ObservedGeneration *int64
+
+ // LastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods,
+ // used by the autoscaler to control how often the number of pods is changed.
+ // +optional
+ LastScaleTime *metav1.Time
+
+ // CurrentReplicas is current number of replicas of pods managed by this autoscaler,
+ // as last seen by the autoscaler.
+ CurrentReplicas int32
+
+ // DesiredReplicas is the desired number of replicas of pods managed by this autoscaler,
+ // as last calculated by the autoscaler.
+ DesiredReplicas int32
+
+ // CurrentMetrics is the last read state of the metrics used by this autoscaler.
+ CurrentMetrics []MetricStatus
+
+ // Conditions is the set of conditions required for this autoscaler to scale its target,
+ // and indicates whether or not those conditions are met.
+ Conditions []HorizontalPodAutoscalerCondition
+}
+
+// ConditionStatus indicates the status of a condition (true, false, or unknown).
+type ConditionStatus string
+
+// These are valid condition statuses. "ConditionTrue" means a resource is in the condition;
+// "ConditionFalse" means a resource is not in the condition; "ConditionUnknown" means kubernetes
+// can't decide if a resource is in the condition or not. In the future, we could add other
+// intermediate conditions, e.g. ConditionDegraded.
+const (
+ ConditionTrue ConditionStatus = "True"
+ ConditionFalse ConditionStatus = "False"
+ ConditionUnknown ConditionStatus = "Unknown"
+)
+
+// HorizontalPodAutoscalerConditionType are the valid conditions of
+// a HorizontalPodAutoscaler.
+type HorizontalPodAutoscalerConditionType string
+
+var (
+ // ScalingActive indicates that the HPA controller is able to scale if necessary:
+ // it's correctly configured, can fetch the desired metrics, and isn't disabled.
+ ScalingActive HorizontalPodAutoscalerConditionType = "ScalingActive"
+ // AbleToScale indicates a lack of transient issues which prevent scaling from occuring,
+ // such as being in a backoff window, or being unable to access/update the target scale.
+ AbleToScale HorizontalPodAutoscalerConditionType = "AbleToScale"
+ // ScalingLimited indicates that the calculated scale based on metrics would be above or
+ // below the range for the HPA, and has thus been capped.
+ ScalingLimited HorizontalPodAutoscalerConditionType = "ScalingLimited"
+)
+
+// HorizontalPodAutoscalerCondition describes the state of
+// a HorizontalPodAutoscaler at a certain point.
+type HorizontalPodAutoscalerCondition struct {
+ // Type describes the current condition
+ Type HorizontalPodAutoscalerConditionType
+ // Status is the status of the condition (True, False, Unknown)
+ Status ConditionStatus
+ // LastTransitionTime is the last time the condition transitioned from
+ // one status to another
+ // +optional
+ LastTransitionTime metav1.Time
+ // Reason is the reason for the condition's last transition.
+ // +optional
+ Reason string
+ // Message is a human-readable explanation containing details about
+ // the transition
+ // +optional
+ Message string
+}
+
+// MetricStatus describes the last-read state of a single metric.
+type MetricStatus struct {
+ // Type is the type of metric source. It will match one of the fields below.
+ Type MetricSourceType
+
+ // Object refers to a metric describing a single kubernetes object
+ // (for example, hits-per-second on an Ingress object).
+ // +optional
+ Object *ObjectMetricStatus
+ // Pods refers to a metric describing each pod in the current scale target
+ // (for example, transactions-processed-per-second). The values will be
+ // averaged together before being compared to the target value.
+ // +optional
+ Pods *PodsMetricStatus
+ // Resource refers to a resource metric (such as those specified in
+ // requests and limits) known to Kubernetes describing each pod in the
+ // current scale target (e.g. CPU or memory). Such metrics are built in to
+ // Kubernetes, and have special scaling options on top of those available
+ // to normal per-pod metrics using the "pods" source.
+ // +optional
+ Resource *ResourceMetricStatus
+}
+
+// ObjectMetricStatus indicates the current value of a metric describing a
+// kubernetes object (for example, hits-per-second on an Ingress object).
+type ObjectMetricStatus struct {
+ // Target is the described Kubernetes object.
+ Target CrossVersionObjectReference
+
+ // MetricName is the name of the metric in question.
+ MetricName string
+ // CurrentValue is the current value of the metric (as a quantity).
+ CurrentValue resource.Quantity
+}
+
+// PodsMetricStatus indicates the current value of a metric describing each pod in
+// the current scale target (for example, transactions-processed-per-second).
+type PodsMetricStatus struct {
+ // MetricName is the name of the metric in question
+ MetricName string
+ // CurrentAverageValue is the current value of the average of the
+ // metric across all relevant pods (as a quantity)
+ CurrentAverageValue resource.Quantity
+}
+
+// ResourceMetricStatus indicates the current value of a resource metric known to
+// Kubernetes, as specified in requests and limits, describing each pod in the
+// current scale target (e.g. CPU or memory). Such metrics are built in to
+// Kubernetes, and have special scaling options on top of those available to
+// normal per-pod metrics using the "pods" source.
+type ResourceMetricStatus struct {
+ // Name is the name of the resource in question.
+ Name api.ResourceName
+ // CurrentAverageUtilization is the current value of the average of the
+ // resource metric across all relevant pods, represented as a percentage of
+ // the requested value of the resource for the pods. It will only be
+ // present if `targetAverageValue` was set in the corresponding metric
+ // specification.
+ // +optional
+ CurrentAverageUtilization *int32
+ // CurrentAverageValue is the current value of the average of the
+ // resource metric across all relevant pods, as a raw value (instead of as
+ // a percentage of the request), similar to the "pods" metric source type.
+ // It will always be set, regardless of the corresponding metric specification.
+ CurrentAverageValue resource.Quantity
+}
+
+// +genclient=true
+
+// HorizontalPodAutoscaler is the configuration for a horizontal pod
+// autoscaler, which automatically manages the replica count of any resource
+// implementing the scale subresource based on the metrics specified.
+type HorizontalPodAutoscaler struct {
+ metav1.TypeMeta
+ // Metadata is the standard object metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta
+
+ // Spec is the specification for the behaviour of the autoscaler.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
+ // +optional
+ Spec HorizontalPodAutoscalerSpec
+
+ // Status is the current information about the autoscaler.
+ // +optional
+ Status HorizontalPodAutoscalerStatus
+}
+
+// HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.
+type HorizontalPodAutoscalerList struct {
+ metav1.TypeMeta
+ // Metadata is the standard list metadata.
+ // +optional
+ metav1.ListMeta
+
+ // Items is the list of horizontal pod autoscaler objects.
+ Items []HorizontalPodAutoscaler
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/conversion.go
new file mode 100644
index 000000000..0bce7a123
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/conversion.go
@@ -0,0 +1,275 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "encoding/json"
+
+ "k8s.io/apimachinery/pkg/conversion"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/autoscaling"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) error {
+ // Add non-generated conversion functions
+ err := scheme.AddConversionFuncs(
+ Convert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler,
+ Convert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler,
+ Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscalerSpec,
+ Convert_v1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec,
+ Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus,
+ Convert_v1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus,
+ )
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func Convert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, s conversion.Scope) error {
+ if err := autoConvert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler(in, out, s); err != nil {
+ return err
+ }
+
+ otherMetrics := make([]MetricSpec, 0, len(in.Spec.Metrics))
+ for _, metric := range in.Spec.Metrics {
+ if metric.Type == autoscaling.ResourceMetricSourceType && metric.Resource != nil && metric.Resource.Name == api.ResourceCPU && metric.Resource.TargetAverageUtilization != nil {
+ continue
+ }
+
+ convMetric := MetricSpec{}
+ if err := Convert_autoscaling_MetricSpec_To_v1_MetricSpec(&metric, &convMetric, s); err != nil {
+ return err
+ }
+ otherMetrics = append(otherMetrics, convMetric)
+ }
+
+ // NB: we need to save the status even if it maps to a CPU utilization status in order to save the raw value as well
+ currentMetrics := make([]MetricStatus, len(in.Status.CurrentMetrics))
+ for i, currentMetric := range in.Status.CurrentMetrics {
+ if err := Convert_autoscaling_MetricStatus_To_v1_MetricStatus(&currentMetric, &currentMetrics[i], s); err != nil {
+ return err
+ }
+ }
+
+ // store HPA conditions in an annotation
+ currentConditions := make([]HorizontalPodAutoscalerCondition, len(in.Status.Conditions))
+ for i, currentCondition := range in.Status.Conditions {
+ if err := Convert_autoscaling_HorizontalPodAutoscalerCondition_To_v1_HorizontalPodAutoscalerCondition(&currentCondition, &currentConditions[i], s); err != nil {
+ return err
+ }
+ }
+
+ if len(otherMetrics) > 0 || len(in.Status.CurrentMetrics) > 0 || len(currentConditions) > 0 {
+ old := out.Annotations
+ out.Annotations = make(map[string]string, len(old)+3)
+ if old != nil {
+ for k, v := range old {
+ out.Annotations[k] = v
+ }
+ }
+ }
+
+ if len(otherMetrics) > 0 {
+ otherMetricsEnc, err := json.Marshal(otherMetrics)
+ if err != nil {
+ return err
+ }
+ out.Annotations[autoscaling.MetricSpecsAnnotation] = string(otherMetricsEnc)
+ }
+
+ if len(in.Status.CurrentMetrics) > 0 {
+ currentMetricsEnc, err := json.Marshal(currentMetrics)
+ if err != nil {
+ return err
+ }
+ out.Annotations[autoscaling.MetricStatusesAnnotation] = string(currentMetricsEnc)
+ }
+
+ if len(in.Status.Conditions) > 0 {
+ currentConditionsEnc, err := json.Marshal(currentConditions)
+ if err != nil {
+ return err
+ }
+ out.Annotations[autoscaling.HorizontalPodAutoscalerConditionsAnnotation] = string(currentConditionsEnc)
+ }
+
+ return nil
+}
+
+func Convert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error {
+ if err := autoConvert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in, out, s); err != nil {
+ return err
+ }
+
+ if otherMetricsEnc, hasOtherMetrics := out.Annotations[autoscaling.MetricSpecsAnnotation]; hasOtherMetrics {
+ var otherMetrics []MetricSpec
+ if err := json.Unmarshal([]byte(otherMetricsEnc), &otherMetrics); err != nil {
+ return err
+ }
+
+ // the normal Spec conversion could have populated out.Spec.Metrics with a single element, so deal with that
+ outMetrics := make([]autoscaling.MetricSpec, len(otherMetrics)+len(out.Spec.Metrics))
+ for i, metric := range otherMetrics {
+ if err := Convert_v1_MetricSpec_To_autoscaling_MetricSpec(&metric, &outMetrics[i], s); err != nil {
+ return err
+ }
+ }
+ if out.Spec.Metrics != nil {
+ outMetrics[len(otherMetrics)] = out.Spec.Metrics[0]
+ }
+ out.Spec.Metrics = outMetrics
+ delete(out.Annotations, autoscaling.MetricSpecsAnnotation)
+ }
+
+ if currentMetricsEnc, hasCurrentMetrics := out.Annotations[autoscaling.MetricStatusesAnnotation]; hasCurrentMetrics {
+ // ignore any existing status values -- the ones here have more information
+ var currentMetrics []MetricStatus
+ if err := json.Unmarshal([]byte(currentMetricsEnc), &currentMetrics); err != nil {
+ return err
+ }
+
+ out.Status.CurrentMetrics = make([]autoscaling.MetricStatus, len(currentMetrics))
+ for i, currentMetric := range currentMetrics {
+ if err := Convert_v1_MetricStatus_To_autoscaling_MetricStatus(&currentMetric, &out.Status.CurrentMetrics[i], s); err != nil {
+ return err
+ }
+ }
+ delete(out.Annotations, autoscaling.MetricStatusesAnnotation)
+ }
+
+ // autoscaling/v1 formerly had an implicit default applied in the controller. In v2alpha1, we apply it explicitly.
+ // We apply it here, explicitly, since we have access to the full set of metrics from the annotation.
+ if len(out.Spec.Metrics) == 0 {
+ // no other metrics, no explicit CPU value set
+ out.Spec.Metrics = []autoscaling.MetricSpec{
+ {
+ Type: autoscaling.ResourceMetricSourceType,
+ Resource: &autoscaling.ResourceMetricSource{
+ Name: api.ResourceCPU,
+ },
+ },
+ }
+ out.Spec.Metrics[0].Resource.TargetAverageUtilization = new(int32)
+ *out.Spec.Metrics[0].Resource.TargetAverageUtilization = autoscaling.DefaultCPUUtilization
+ }
+
+ if currentConditionsEnc, hasCurrentConditions := out.Annotations[autoscaling.HorizontalPodAutoscalerConditionsAnnotation]; hasCurrentConditions {
+ var currentConditions []HorizontalPodAutoscalerCondition
+ if err := json.Unmarshal([]byte(currentConditionsEnc), &currentConditions); err != nil {
+ return err
+ }
+
+ out.Status.Conditions = make([]autoscaling.HorizontalPodAutoscalerCondition, len(currentConditions))
+ for i, currentCondition := range currentConditions {
+ if err := Convert_v1_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition(&currentCondition, &out.Status.Conditions[i], s); err != nil {
+ return err
+ }
+ }
+ delete(out.Annotations, autoscaling.HorizontalPodAutoscalerConditionsAnnotation)
+ }
+
+ return nil
+}
+
+func Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscalerSpec(in *autoscaling.HorizontalPodAutoscalerSpec, out *HorizontalPodAutoscalerSpec, s conversion.Scope) error {
+ if err := Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference(&in.ScaleTargetRef, &out.ScaleTargetRef, s); err != nil {
+ return err
+ }
+
+ out.MinReplicas = in.MinReplicas
+ out.MaxReplicas = in.MaxReplicas
+
+ for _, metric := range in.Metrics {
+ if metric.Type == autoscaling.ResourceMetricSourceType && metric.Resource != nil && metric.Resource.Name == api.ResourceCPU {
+ if metric.Resource.TargetAverageUtilization != nil {
+ out.TargetCPUUtilizationPercentage = new(int32)
+ *out.TargetCPUUtilizationPercentage = *metric.Resource.TargetAverageUtilization
+ }
+ break
+ }
+ }
+
+ return nil
+}
+
+func Convert_v1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in *HorizontalPodAutoscalerSpec, out *autoscaling.HorizontalPodAutoscalerSpec, s conversion.Scope) error {
+ if err := Convert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(&in.ScaleTargetRef, &out.ScaleTargetRef, s); err != nil {
+ return err
+ }
+
+ out.MinReplicas = in.MinReplicas
+ out.MaxReplicas = in.MaxReplicas
+
+ if in.TargetCPUUtilizationPercentage != nil {
+ out.Metrics = []autoscaling.MetricSpec{
+ {
+ Type: autoscaling.ResourceMetricSourceType,
+ Resource: &autoscaling.ResourceMetricSource{
+ Name: api.ResourceCPU,
+ },
+ },
+ }
+ out.Metrics[0].Resource.TargetAverageUtilization = new(int32)
+ *out.Metrics[0].Resource.TargetAverageUtilization = *in.TargetCPUUtilizationPercentage
+ }
+
+ return nil
+}
+
+func Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus(in *autoscaling.HorizontalPodAutoscalerStatus, out *HorizontalPodAutoscalerStatus, s conversion.Scope) error {
+ out.ObservedGeneration = in.ObservedGeneration
+ out.LastScaleTime = in.LastScaleTime
+
+ out.CurrentReplicas = in.CurrentReplicas
+ out.DesiredReplicas = in.DesiredReplicas
+
+ for _, metric := range in.CurrentMetrics {
+ if metric.Type == autoscaling.ResourceMetricSourceType && metric.Resource != nil && metric.Resource.Name == api.ResourceCPU {
+ if metric.Resource.CurrentAverageUtilization != nil {
+
+ out.CurrentCPUUtilizationPercentage = new(int32)
+ *out.CurrentCPUUtilizationPercentage = *metric.Resource.CurrentAverageUtilization
+ }
+ }
+ }
+ return nil
+}
+
+func Convert_v1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in *HorizontalPodAutoscalerStatus, out *autoscaling.HorizontalPodAutoscalerStatus, s conversion.Scope) error {
+ out.ObservedGeneration = in.ObservedGeneration
+ out.LastScaleTime = in.LastScaleTime
+
+ out.CurrentReplicas = in.CurrentReplicas
+ out.DesiredReplicas = in.DesiredReplicas
+
+ if in.CurrentCPUUtilizationPercentage != nil {
+ out.CurrentMetrics = []autoscaling.MetricStatus{
+ {
+ Type: autoscaling.ResourceMetricSourceType,
+ Resource: &autoscaling.ResourceMetricStatus{
+ Name: api.ResourceCPU,
+ },
+ },
+ }
+ out.CurrentMetrics[0].Resource.CurrentAverageUtilization = new(int32)
+ *out.CurrentMetrics[0].Resource.CurrentAverageUtilization = *in.CurrentCPUUtilizationPercentage
+ }
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/defaults.go
new file mode 100644
index 000000000..aeece5b81
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/defaults.go
@@ -0,0 +1,35 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
+
+func SetDefaults_HorizontalPodAutoscaler(obj *HorizontalPodAutoscaler) {
+ if obj.Spec.MinReplicas == nil {
+ minReplicas := int32(1)
+ obj.Spec.MinReplicas = &minReplicas
+ }
+
+ // NB: we apply a default for CPU utilization in conversion because
+ // we need access to the annotations to properly apply the default.
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/doc.go
new file mode 100644
index 000000000..678ebf1ba
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/doc.go
@@ -0,0 +1,22 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/autoscaling
+// +k8s:openapi-gen=true
+// +k8s:defaulter-gen=TypeMeta
+
+package v1 // import "k8s.io/kubernetes/pkg/apis/autoscaling/v1"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.pb.go
new file mode 100644
index 000000000..5660bfd8b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.pb.go
@@ -0,0 +1,3787 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.proto
+
+ It has these top-level messages:
+ CrossVersionObjectReference
+ HorizontalPodAutoscaler
+ HorizontalPodAutoscalerCondition
+ HorizontalPodAutoscalerList
+ HorizontalPodAutoscalerSpec
+ HorizontalPodAutoscalerStatus
+ MetricSpec
+ MetricStatus
+ ObjectMetricSource
+ ObjectMetricStatus
+ PodsMetricSource
+ PodsMetricStatus
+ ResourceMetricSource
+ ResourceMetricStatus
+ Scale
+ ScaleSpec
+ ScaleStatus
+*/
+package v1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_apimachinery_pkg_api_resource "k8s.io/apimachinery/pkg/api/resource"
+import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+import k8s_io_kubernetes_pkg_api_v1 "k8s.io/kubernetes/pkg/api/v1"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} }
+func (*CrossVersionObjectReference) ProtoMessage() {}
+func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{0}
+}
+
+func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} }
+func (*HorizontalPodAutoscaler) ProtoMessage() {}
+func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} }
+func (*HorizontalPodAutoscalerCondition) ProtoMessage() {}
+func (*HorizontalPodAutoscalerCondition) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{2}
+}
+
+func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} }
+func (*HorizontalPodAutoscalerList) ProtoMessage() {}
+func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{3}
+}
+
+func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} }
+func (*HorizontalPodAutoscalerSpec) ProtoMessage() {}
+func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{4}
+}
+
+func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} }
+func (*HorizontalPodAutoscalerStatus) ProtoMessage() {}
+func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{5}
+}
+
+func (m *MetricSpec) Reset() { *m = MetricSpec{} }
+func (*MetricSpec) ProtoMessage() {}
+func (*MetricSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
+
+func (m *MetricStatus) Reset() { *m = MetricStatus{} }
+func (*MetricStatus) ProtoMessage() {}
+func (*MetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
+
+func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} }
+func (*ObjectMetricSource) ProtoMessage() {}
+func (*ObjectMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
+
+func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} }
+func (*ObjectMetricStatus) ProtoMessage() {}
+func (*ObjectMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
+
+func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} }
+func (*PodsMetricSource) ProtoMessage() {}
+func (*PodsMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
+
+func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} }
+func (*PodsMetricStatus) ProtoMessage() {}
+func (*PodsMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} }
+
+func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} }
+func (*ResourceMetricSource) ProtoMessage() {}
+func (*ResourceMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} }
+
+func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} }
+func (*ResourceMetricStatus) ProtoMessage() {}
+func (*ResourceMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} }
+
+func (m *Scale) Reset() { *m = Scale{} }
+func (*Scale) ProtoMessage() {}
+func (*Scale) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} }
+
+func (m *ScaleSpec) Reset() { *m = ScaleSpec{} }
+func (*ScaleSpec) ProtoMessage() {}
+func (*ScaleSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} }
+
+func (m *ScaleStatus) Reset() { *m = ScaleStatus{} }
+func (*ScaleStatus) ProtoMessage() {}
+func (*ScaleStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} }
+
+func init() {
+ proto.RegisterType((*CrossVersionObjectReference)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v1.CrossVersionObjectReference")
+ proto.RegisterType((*HorizontalPodAutoscaler)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v1.HorizontalPodAutoscaler")
+ proto.RegisterType((*HorizontalPodAutoscalerCondition)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v1.HorizontalPodAutoscalerCondition")
+ proto.RegisterType((*HorizontalPodAutoscalerList)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v1.HorizontalPodAutoscalerList")
+ proto.RegisterType((*HorizontalPodAutoscalerSpec)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v1.HorizontalPodAutoscalerSpec")
+ proto.RegisterType((*HorizontalPodAutoscalerStatus)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v1.HorizontalPodAutoscalerStatus")
+ proto.RegisterType((*MetricSpec)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v1.MetricSpec")
+ proto.RegisterType((*MetricStatus)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v1.MetricStatus")
+ proto.RegisterType((*ObjectMetricSource)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v1.ObjectMetricSource")
+ proto.RegisterType((*ObjectMetricStatus)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v1.ObjectMetricStatus")
+ proto.RegisterType((*PodsMetricSource)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v1.PodsMetricSource")
+ proto.RegisterType((*PodsMetricStatus)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v1.PodsMetricStatus")
+ proto.RegisterType((*ResourceMetricSource)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v1.ResourceMetricSource")
+ proto.RegisterType((*ResourceMetricStatus)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v1.ResourceMetricStatus")
+ proto.RegisterType((*Scale)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v1.Scale")
+ proto.RegisterType((*ScaleSpec)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v1.ScaleSpec")
+ proto.RegisterType((*ScaleStatus)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v1.ScaleStatus")
+}
+func (m *CrossVersionObjectReference) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CrossVersionObjectReference) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
+ i += copy(dAtA[i:], m.Kind)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion)))
+ i += copy(dAtA[i:], m.APIVersion)
+ return i, nil
+}
+
+func (m *HorizontalPodAutoscaler) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HorizontalPodAutoscaler) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n2, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n3, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ return i, nil
+}
+
+func (m *HorizontalPodAutoscalerCondition) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HorizontalPodAutoscalerCondition) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
+ i += copy(dAtA[i:], m.Status)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
+ n4, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ return i, nil
+}
+
+func (m *HorizontalPodAutoscalerList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HorizontalPodAutoscalerList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n5, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *HorizontalPodAutoscalerSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HorizontalPodAutoscalerSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ScaleTargetRef.Size()))
+ n6, err := m.ScaleTargetRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ if m.MinReplicas != nil {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.MinReplicas))
+ }
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.MaxReplicas))
+ if m.TargetCPUUtilizationPercentage != nil {
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.TargetCPUUtilizationPercentage))
+ }
+ return i, nil
+}
+
+func (m *HorizontalPodAutoscalerStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HorizontalPodAutoscalerStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.ObservedGeneration != nil {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.ObservedGeneration))
+ }
+ if m.LastScaleTime != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastScaleTime.Size()))
+ n7, err := m.LastScaleTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ }
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentReplicas))
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.DesiredReplicas))
+ if m.CurrentCPUUtilizationPercentage != nil {
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.CurrentCPUUtilizationPercentage))
+ }
+ return i, nil
+}
+
+func (m *MetricSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *MetricSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ if m.Object != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Object.Size()))
+ n8, err := m.Object.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n8
+ }
+ if m.Pods != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Pods.Size()))
+ n9, err := m.Pods.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n9
+ }
+ if m.Resource != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Resource.Size()))
+ n10, err := m.Resource.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n10
+ }
+ return i, nil
+}
+
+func (m *MetricStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *MetricStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ if m.Object != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Object.Size()))
+ n11, err := m.Object.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n11
+ }
+ if m.Pods != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Pods.Size()))
+ n12, err := m.Pods.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n12
+ }
+ if m.Resource != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Resource.Size()))
+ n13, err := m.Resource.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n13
+ }
+ return i, nil
+}
+
+func (m *ObjectMetricSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ObjectMetricSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Target.Size()))
+ n14, err := m.Target.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n14
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
+ i += copy(dAtA[i:], m.MetricName)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.TargetValue.Size()))
+ n15, err := m.TargetValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n15
+ return i, nil
+}
+
+func (m *ObjectMetricStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ObjectMetricStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Target.Size()))
+ n16, err := m.Target.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n16
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
+ i += copy(dAtA[i:], m.MetricName)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentValue.Size()))
+ n17, err := m.CurrentValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n17
+ return i, nil
+}
+
+func (m *PodsMetricSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodsMetricSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
+ i += copy(dAtA[i:], m.MetricName)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.TargetAverageValue.Size()))
+ n18, err := m.TargetAverageValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n18
+ return i, nil
+}
+
+func (m *PodsMetricStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodsMetricStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
+ i += copy(dAtA[i:], m.MetricName)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentAverageValue.Size()))
+ n19, err := m.CurrentAverageValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n19
+ return i, nil
+}
+
+func (m *ResourceMetricSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceMetricSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ if m.TargetAverageUtilization != nil {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.TargetAverageUtilization))
+ }
+ if m.TargetAverageValue != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.TargetAverageValue.Size()))
+ n20, err := m.TargetAverageValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n20
+ }
+ return i, nil
+}
+
+func (m *ResourceMetricStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceMetricStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ if m.CurrentAverageUtilization != nil {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.CurrentAverageUtilization))
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentAverageValue.Size()))
+ n21, err := m.CurrentAverageValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n21
+ return i, nil
+}
+
+func (m *Scale) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Scale) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n22, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n22
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n23, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n23
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n24, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n24
+ return i, nil
+}
+
+func (m *ScaleSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ScaleSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
+ return i, nil
+}
+
+func (m *ScaleStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ScaleStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Selector)))
+ i += copy(dAtA[i:], m.Selector)
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *CrossVersionObjectReference) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Kind)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.APIVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *HorizontalPodAutoscaler) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *HorizontalPodAutoscalerCondition) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Status)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastTransitionTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *HorizontalPodAutoscalerList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *HorizontalPodAutoscalerSpec) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ScaleTargetRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.MinReplicas != nil {
+ n += 1 + sovGenerated(uint64(*m.MinReplicas))
+ }
+ n += 1 + sovGenerated(uint64(m.MaxReplicas))
+ if m.TargetCPUUtilizationPercentage != nil {
+ n += 1 + sovGenerated(uint64(*m.TargetCPUUtilizationPercentage))
+ }
+ return n
+}
+
+func (m *HorizontalPodAutoscalerStatus) Size() (n int) {
+ var l int
+ _ = l
+ if m.ObservedGeneration != nil {
+ n += 1 + sovGenerated(uint64(*m.ObservedGeneration))
+ }
+ if m.LastScaleTime != nil {
+ l = m.LastScaleTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ n += 1 + sovGenerated(uint64(m.CurrentReplicas))
+ n += 1 + sovGenerated(uint64(m.DesiredReplicas))
+ if m.CurrentCPUUtilizationPercentage != nil {
+ n += 1 + sovGenerated(uint64(*m.CurrentCPUUtilizationPercentage))
+ }
+ return n
+}
+
+func (m *MetricSpec) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Object != nil {
+ l = m.Object.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Pods != nil {
+ l = m.Pods.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Resource != nil {
+ l = m.Resource.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *MetricStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Object != nil {
+ l = m.Object.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Pods != nil {
+ l = m.Pods.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Resource != nil {
+ l = m.Resource.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *ObjectMetricSource) Size() (n int) {
+ var l int
+ _ = l
+ l = m.Target.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.MetricName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.TargetValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ObjectMetricStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = m.Target.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.MetricName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.CurrentValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodsMetricSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.MetricName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.TargetAverageValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodsMetricStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.MetricName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.CurrentAverageValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ResourceMetricSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.TargetAverageUtilization != nil {
+ n += 1 + sovGenerated(uint64(*m.TargetAverageUtilization))
+ }
+ if m.TargetAverageValue != nil {
+ l = m.TargetAverageValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *ResourceMetricStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.CurrentAverageUtilization != nil {
+ n += 1 + sovGenerated(uint64(*m.CurrentAverageUtilization))
+ }
+ l = m.CurrentAverageValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Scale) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ScaleSpec) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Replicas))
+ return n
+}
+
+func (m *ScaleStatus) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Replicas))
+ l = len(m.Selector)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *CrossVersionObjectReference) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CrossVersionObjectReference{`,
+ `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HorizontalPodAutoscaler) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HorizontalPodAutoscaler{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "HorizontalPodAutoscalerSpec", "HorizontalPodAutoscalerSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "HorizontalPodAutoscalerStatus", "HorizontalPodAutoscalerStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HorizontalPodAutoscalerCondition) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HorizontalPodAutoscalerCondition{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
+ `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HorizontalPodAutoscalerList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HorizontalPodAutoscalerList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "HorizontalPodAutoscaler", "HorizontalPodAutoscaler", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HorizontalPodAutoscalerSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HorizontalPodAutoscalerSpec{`,
+ `ScaleTargetRef:` + strings.Replace(strings.Replace(this.ScaleTargetRef.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`,
+ `MinReplicas:` + valueToStringGenerated(this.MinReplicas) + `,`,
+ `MaxReplicas:` + fmt.Sprintf("%v", this.MaxReplicas) + `,`,
+ `TargetCPUUtilizationPercentage:` + valueToStringGenerated(this.TargetCPUUtilizationPercentage) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HorizontalPodAutoscalerStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HorizontalPodAutoscalerStatus{`,
+ `ObservedGeneration:` + valueToStringGenerated(this.ObservedGeneration) + `,`,
+ `LastScaleTime:` + strings.Replace(fmt.Sprintf("%v", this.LastScaleTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`,
+ `CurrentReplicas:` + fmt.Sprintf("%v", this.CurrentReplicas) + `,`,
+ `DesiredReplicas:` + fmt.Sprintf("%v", this.DesiredReplicas) + `,`,
+ `CurrentCPUUtilizationPercentage:` + valueToStringGenerated(this.CurrentCPUUtilizationPercentage) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *MetricSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&MetricSpec{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Object:` + strings.Replace(fmt.Sprintf("%v", this.Object), "ObjectMetricSource", "ObjectMetricSource", 1) + `,`,
+ `Pods:` + strings.Replace(fmt.Sprintf("%v", this.Pods), "PodsMetricSource", "PodsMetricSource", 1) + `,`,
+ `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "ResourceMetricSource", "ResourceMetricSource", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *MetricStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&MetricStatus{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Object:` + strings.Replace(fmt.Sprintf("%v", this.Object), "ObjectMetricStatus", "ObjectMetricStatus", 1) + `,`,
+ `Pods:` + strings.Replace(fmt.Sprintf("%v", this.Pods), "PodsMetricStatus", "PodsMetricStatus", 1) + `,`,
+ `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "ResourceMetricStatus", "ResourceMetricStatus", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ObjectMetricSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ObjectMetricSource{`,
+ `Target:` + strings.Replace(strings.Replace(this.Target.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`,
+ `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
+ `TargetValue:` + strings.Replace(strings.Replace(this.TargetValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ObjectMetricStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ObjectMetricStatus{`,
+ `Target:` + strings.Replace(strings.Replace(this.Target.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`,
+ `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
+ `CurrentValue:` + strings.Replace(strings.Replace(this.CurrentValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodsMetricSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodsMetricSource{`,
+ `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
+ `TargetAverageValue:` + strings.Replace(strings.Replace(this.TargetAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodsMetricStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodsMetricStatus{`,
+ `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
+ `CurrentAverageValue:` + strings.Replace(strings.Replace(this.CurrentAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceMetricSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ResourceMetricSource{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `TargetAverageUtilization:` + valueToStringGenerated(this.TargetAverageUtilization) + `,`,
+ `TargetAverageValue:` + strings.Replace(fmt.Sprintf("%v", this.TargetAverageValue), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceMetricStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ResourceMetricStatus{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `CurrentAverageUtilization:` + valueToStringGenerated(this.CurrentAverageUtilization) + `,`,
+ `CurrentAverageValue:` + strings.Replace(strings.Replace(this.CurrentAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Scale) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Scale{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ScaleSpec", "ScaleSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ScaleStatus", "ScaleStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ScaleSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ScaleSpec{`,
+ `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ScaleStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ScaleStatus{`,
+ `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
+ `Selector:` + fmt.Sprintf("%v", this.Selector) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *CrossVersionObjectReference) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CrossVersionObjectReference: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CrossVersionObjectReference: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Kind = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HorizontalPodAutoscaler) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HorizontalPodAutoscaler: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HorizontalPodAutoscaler: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HorizontalPodAutoscalerCondition) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerCondition: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerCondition: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = HorizontalPodAutoscalerConditionType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Status = k8s_io_kubernetes_pkg_api_v1.ConditionStatus(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HorizontalPodAutoscalerList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, HorizontalPodAutoscaler{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HorizontalPodAutoscalerSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ScaleTargetRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ScaleTargetRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MinReplicas", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.MinReplicas = &v
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MaxReplicas", wireType)
+ }
+ m.MaxReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.MaxReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetCPUUtilizationPercentage", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.TargetCPUUtilizationPercentage = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HorizontalPodAutoscalerStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ObservedGeneration = &v
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastScaleTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.LastScaleTime == nil {
+ m.LastScaleTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{}
+ }
+ if err := m.LastScaleTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentReplicas", wireType)
+ }
+ m.CurrentReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.CurrentReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DesiredReplicas", wireType)
+ }
+ m.DesiredReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.DesiredReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentCPUUtilizationPercentage", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.CurrentCPUUtilizationPercentage = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *MetricSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: MetricSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MetricSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = MetricSourceType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Object == nil {
+ m.Object = &ObjectMetricSource{}
+ }
+ if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Pods", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Pods == nil {
+ m.Pods = &PodsMetricSource{}
+ }
+ if err := m.Pods.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Resource == nil {
+ m.Resource = &ResourceMetricSource{}
+ }
+ if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *MetricStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: MetricStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = MetricSourceType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Object == nil {
+ m.Object = &ObjectMetricStatus{}
+ }
+ if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Pods", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Pods == nil {
+ m.Pods = &PodsMetricStatus{}
+ }
+ if err := m.Pods.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Resource == nil {
+ m.Resource = &ResourceMetricStatus{}
+ }
+ if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ObjectMetricSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ObjectMetricSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ObjectMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MetricName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.TargetValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ObjectMetricStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ObjectMetricStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ObjectMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MetricName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.CurrentValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodsMetricSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodsMetricSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodsMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MetricName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.TargetAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodsMetricStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodsMetricStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodsMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MetricName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.CurrentAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceMetricSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceMetricSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = k8s_io_kubernetes_pkg_api_v1.ResourceName(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageUtilization", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.TargetAverageUtilization = &v
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.TargetAverageValue == nil {
+ m.TargetAverageValue = &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ }
+ if err := m.TargetAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceMetricStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceMetricStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = k8s_io_kubernetes_pkg_api_v1.ResourceName(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageUtilization", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.CurrentAverageUtilization = &v
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.CurrentAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Scale) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Scale: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Scale: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ScaleSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ScaleSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ScaleSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ m.Replicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Replicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ScaleStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ScaleStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ScaleStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ m.Replicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Replicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Selector = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 1381 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xcf, 0x6f, 0x1b, 0xc5,
+ 0x17, 0xcf, 0xda, 0x4e, 0x9a, 0x8e, 0xd3, 0xa6, 0xdf, 0x69, 0xd5, 0xba, 0xe9, 0xb7, 0xde, 0x68,
+ 0x41, 0xa8, 0x45, 0x65, 0x4d, 0x42, 0xa8, 0xa8, 0x10, 0xa0, 0xd8, 0xa8, 0xb4, 0xa2, 0x6e, 0xc3,
+ 0xd4, 0x8d, 0xf8, 0x25, 0xc4, 0x64, 0x3d, 0x75, 0xa6, 0xf1, 0xfe, 0xd0, 0xcc, 0xd8, 0x22, 0x95,
+ 0x90, 0x38, 0x71, 0x85, 0x0b, 0x67, 0x04, 0xff, 0x04, 0xe7, 0x22, 0x21, 0xf5, 0xd8, 0x1b, 0x3d,
+ 0x59, 0x74, 0xe1, 0x86, 0xf8, 0x07, 0x2a, 0x0e, 0x68, 0x66, 0xc7, 0xeb, 0x5d, 0xdb, 0xeb, 0xc4,
+ 0x6d, 0x5a, 0xc4, 0xcd, 0x9e, 0xf9, 0xbc, 0xcf, 0xe7, 0xbd, 0x37, 0x6f, 0xde, 0xcc, 0x2c, 0xb8,
+ 0xb4, 0xf3, 0x06, 0xb7, 0xa9, 0x5f, 0xd9, 0xe9, 0x6c, 0x11, 0xe6, 0x11, 0x41, 0x78, 0x25, 0xd8,
+ 0x69, 0x55, 0x70, 0x40, 0x79, 0x05, 0x77, 0x84, 0xcf, 0x1d, 0xdc, 0xa6, 0x5e, 0xab, 0xd2, 0x5d,
+ 0xa9, 0xb4, 0x88, 0x47, 0x18, 0x16, 0xa4, 0x69, 0x07, 0xcc, 0x17, 0x3e, 0x3c, 0x1f, 0x99, 0xda,
+ 0x03, 0x53, 0x3b, 0xd8, 0x69, 0xd9, 0xd2, 0xd4, 0x4e, 0x98, 0xda, 0xdd, 0x95, 0xa5, 0x57, 0x5a,
+ 0x54, 0x6c, 0x77, 0xb6, 0x6c, 0xc7, 0x77, 0x2b, 0x2d, 0xbf, 0xe5, 0x57, 0x14, 0xc3, 0x56, 0xe7,
+ 0xb6, 0xfa, 0xa7, 0xfe, 0xa8, 0x5f, 0x11, 0xf3, 0xd2, 0x9a, 0x76, 0x0a, 0x07, 0xd4, 0xc5, 0xce,
+ 0x36, 0xf5, 0x08, 0xdb, 0xed, 0xbb, 0x55, 0x61, 0x84, 0xfb, 0x1d, 0xe6, 0x90, 0x61, 0x7f, 0x26,
+ 0x5a, 0xf1, 0x8a, 0x4b, 0x04, 0x1e, 0x13, 0xc5, 0x52, 0x25, 0xcb, 0x8a, 0x75, 0x3c, 0x41, 0xdd,
+ 0x51, 0x99, 0x8b, 0x7b, 0x19, 0x70, 0x67, 0x9b, 0xb8, 0x78, 0xc4, 0xee, 0xb5, 0x2c, 0xbb, 0x8e,
+ 0xa0, 0xed, 0x0a, 0xf5, 0x04, 0x17, 0x6c, 0xc4, 0xe8, 0x42, 0xe6, 0xf2, 0x8c, 0x89, 0xc5, 0xfa,
+ 0xce, 0x00, 0x67, 0x6a, 0xcc, 0xe7, 0x7c, 0x93, 0x30, 0x4e, 0x7d, 0xef, 0xc6, 0xd6, 0x1d, 0xe2,
+ 0x08, 0x44, 0x6e, 0x13, 0x46, 0x3c, 0x87, 0xc0, 0x65, 0x50, 0xd8, 0xa1, 0x5e, 0xb3, 0x64, 0x2c,
+ 0x1b, 0xe7, 0x0e, 0x57, 0x17, 0xee, 0xf7, 0xcc, 0x99, 0xb0, 0x67, 0x16, 0xde, 0xa7, 0x5e, 0x13,
+ 0xa9, 0x19, 0x89, 0xf0, 0xb0, 0x4b, 0x4a, 0xb9, 0x34, 0xe2, 0x3a, 0x76, 0x09, 0x52, 0x33, 0x70,
+ 0x15, 0x00, 0x1c, 0x50, 0x2d, 0x50, 0xca, 0x2b, 0x1c, 0xd4, 0x38, 0xb0, 0xbe, 0x71, 0x55, 0xcf,
+ 0xa0, 0x04, 0xca, 0xfa, 0x35, 0x07, 0x4e, 0x5d, 0xf1, 0x19, 0xbd, 0xeb, 0x7b, 0x02, 0xb7, 0x37,
+ 0xfc, 0xe6, 0xba, 0x2e, 0x0f, 0xc2, 0xe0, 0xe7, 0x60, 0x5e, 0x2e, 0x4d, 0x13, 0x0b, 0xac, 0xfc,
+ 0x2a, 0xae, 0xbe, 0x6a, 0xeb, 0xc2, 0x4a, 0x66, 0x6a, 0x50, 0x5a, 0x12, 0x6d, 0x77, 0x57, 0xec,
+ 0x28, 0xb8, 0x3a, 0x11, 0x78, 0xa0, 0x3f, 0x18, 0x43, 0x31, 0x2b, 0xdc, 0x06, 0x05, 0x1e, 0x10,
+ 0x47, 0xc5, 0x54, 0x5c, 0xbd, 0x6c, 0xef, 0xbb, 0x6c, 0xed, 0x0c, 0x9f, 0x6f, 0x06, 0xc4, 0x19,
+ 0xe4, 0x46, 0xfe, 0x43, 0x4a, 0x01, 0x06, 0x60, 0x8e, 0x0b, 0x2c, 0x3a, 0x5c, 0xe5, 0xa5, 0xb8,
+ 0x7a, 0xe5, 0x00, 0xb4, 0x14, 0x5f, 0xf5, 0xa8, 0x56, 0x9b, 0x8b, 0xfe, 0x23, 0xad, 0x63, 0x7d,
+ 0x93, 0x07, 0xcb, 0x19, 0x96, 0x35, 0xdf, 0x6b, 0x52, 0x41, 0x7d, 0x0f, 0x5e, 0x01, 0x05, 0xb1,
+ 0x1b, 0x10, 0xbd, 0xec, 0x6b, 0x7d, 0xc7, 0x1b, 0xbb, 0x01, 0x79, 0xdc, 0x33, 0x5f, 0xdc, 0xcb,
+ 0x5e, 0xe2, 0x90, 0x62, 0x80, 0x9b, 0x71, 0x80, 0x51, 0x81, 0xbc, 0x9d, 0x76, 0xeb, 0x71, 0xcf,
+ 0x9c, 0x58, 0xb0, 0x76, 0xcc, 0x99, 0x0e, 0x03, 0x76, 0x01, 0x6c, 0x63, 0x2e, 0x1a, 0x0c, 0x7b,
+ 0x3c, 0xd2, 0xa4, 0x2e, 0xd1, 0x49, 0x7c, 0x79, 0x7f, 0xe5, 0x20, 0x2d, 0xaa, 0x4b, 0xda, 0x1f,
+ 0x78, 0x6d, 0x84, 0x0d, 0x8d, 0x51, 0x80, 0x2f, 0x81, 0x39, 0x46, 0x30, 0xf7, 0xbd, 0x52, 0x41,
+ 0xc5, 0x13, 0xa7, 0x19, 0xa9, 0x51, 0xa4, 0x67, 0xe1, 0x79, 0x70, 0xc8, 0x25, 0x9c, 0xe3, 0x16,
+ 0x29, 0xcd, 0x2a, 0xe0, 0xa2, 0x06, 0x1e, 0xaa, 0x47, 0xc3, 0xa8, 0x3f, 0x6f, 0xfd, 0x61, 0x80,
+ 0x33, 0x19, 0x19, 0xbd, 0x46, 0xb9, 0x80, 0x9f, 0x8e, 0xd4, 0xbb, 0xbd, 0xbf, 0x00, 0xa5, 0xb5,
+ 0xaa, 0xf6, 0x63, 0x5a, 0x7b, 0xbe, 0x3f, 0x92, 0xa8, 0xf5, 0x16, 0x98, 0xa5, 0x82, 0xb8, 0x72,
+ 0x7d, 0xf2, 0xe7, 0x8a, 0xab, 0xd5, 0xa7, 0x2f, 0xc0, 0xea, 0x11, 0x2d, 0x37, 0x7b, 0x55, 0x12,
+ 0xa3, 0x88, 0xdf, 0xfa, 0x3b, 0x97, 0x19, 0xa6, 0xdc, 0x10, 0xf0, 0x6b, 0x03, 0x1c, 0x55, 0x7f,
+ 0x1b, 0x98, 0xb5, 0x88, 0xec, 0x41, 0x3a, 0xda, 0x69, 0xf6, 0xdf, 0x84, 0x5e, 0x56, 0x3d, 0xa9,
+ 0xdd, 0x3a, 0x7a, 0x33, 0xa5, 0x82, 0x86, 0x54, 0xe1, 0x0a, 0x28, 0xba, 0xd4, 0x43, 0x24, 0x68,
+ 0x53, 0x07, 0x47, 0x75, 0x3b, 0x5b, 0x5d, 0x0c, 0x7b, 0x66, 0xb1, 0x3e, 0x18, 0x46, 0x49, 0x0c,
+ 0x7c, 0x1d, 0x14, 0x5d, 0xfc, 0x45, 0x6c, 0x92, 0x57, 0x26, 0xc7, 0xb5, 0x5e, 0xb1, 0x3e, 0x98,
+ 0x42, 0x49, 0x1c, 0xbc, 0x03, 0xca, 0x42, 0xc9, 0xd6, 0x36, 0x6e, 0xdd, 0x12, 0xb4, 0x4d, 0xef,
+ 0x62, 0x59, 0x68, 0x1b, 0x84, 0x39, 0xc4, 0x13, 0xb2, 0x76, 0x0a, 0x8a, 0xc9, 0x0a, 0x7b, 0x66,
+ 0xb9, 0x31, 0x11, 0x89, 0xf6, 0x60, 0xb2, 0xee, 0xe5, 0xc1, 0xd9, 0x89, 0x1d, 0x03, 0x5e, 0x06,
+ 0xd0, 0xdf, 0xe2, 0x84, 0x75, 0x49, 0xf3, 0xbd, 0xe8, 0x98, 0x90, 0xfd, 0x5a, 0xae, 0x41, 0xbe,
+ 0x7a, 0x52, 0x6e, 0x91, 0x1b, 0x23, 0xb3, 0x68, 0x8c, 0x05, 0x74, 0xc0, 0x11, 0xb9, 0x71, 0xa2,
+ 0x2c, 0x53, 0x7d, 0x34, 0x4c, 0xb7, 0x2b, 0xff, 0x17, 0xf6, 0xcc, 0x23, 0xd7, 0x92, 0x24, 0x28,
+ 0xcd, 0x09, 0xd7, 0xc1, 0xa2, 0xd3, 0x61, 0x8c, 0x78, 0x62, 0x28, 0xeb, 0xa7, 0x74, 0xd6, 0x17,
+ 0x6b, 0xe9, 0x69, 0x34, 0x8c, 0x97, 0x14, 0x4d, 0xc2, 0x29, 0x23, 0xcd, 0x98, 0xa2, 0x90, 0xa6,
+ 0x78, 0x37, 0x3d, 0x8d, 0x86, 0xf1, 0xd0, 0x05, 0xa6, 0x66, 0xcd, 0x5c, 0xc1, 0x59, 0x45, 0xf9,
+ 0x42, 0xd8, 0x33, 0xcd, 0xda, 0x64, 0x28, 0xda, 0x8b, 0xcb, 0xfa, 0x33, 0x07, 0x40, 0x9d, 0x08,
+ 0x46, 0x1d, 0xb5, 0x63, 0xd6, 0x52, 0x5d, 0x7a, 0x79, 0xa8, 0x4b, 0x1f, 0xd3, 0x48, 0x75, 0xf5,
+ 0x49, 0x74, 0x64, 0x0c, 0xe6, 0x7c, 0xb5, 0x33, 0xf4, 0xba, 0xbc, 0x35, 0xc5, 0xf6, 0x8a, 0x4f,
+ 0xcb, 0x98, 0xb8, 0x0a, 0x64, 0xf3, 0xd3, 0x5b, 0x4d, 0x13, 0xc3, 0x8f, 0x40, 0x21, 0xf0, 0x9b,
+ 0xfd, 0x33, 0xed, 0xcd, 0x29, 0x04, 0x36, 0xfc, 0x26, 0x4f, 0xd1, 0xcf, 0xcb, 0x88, 0xe4, 0x28,
+ 0x52, 0x94, 0x90, 0x82, 0xf9, 0xfe, 0x75, 0x4e, 0xad, 0x56, 0x71, 0xf5, 0x9d, 0x29, 0xe8, 0x91,
+ 0x36, 0x4d, 0x49, 0x2c, 0xc8, 0xce, 0xd8, 0x9f, 0x41, 0x31, 0xbd, 0xf5, 0x57, 0x0e, 0x2c, 0x68,
+ 0x60, 0xb4, 0x41, 0xfe, 0xe5, 0x7c, 0x47, 0xe7, 0xfa, 0x33, 0xcb, 0x77, 0x44, 0xff, 0x4c, 0xf3,
+ 0x1d, 0x49, 0x64, 0xe5, 0xfb, 0xfb, 0x1c, 0x80, 0xa3, 0x05, 0x06, 0x3d, 0x30, 0x17, 0xb5, 0xb6,
+ 0x03, 0x3e, 0x0e, 0xe2, 0x93, 0x5b, 0x77, 0x7e, 0xad, 0x22, 0xaf, 0xab, 0xae, 0xd2, 0xbf, 0x3e,
+ 0xb8, 0xd6, 0xc6, 0xd7, 0xc5, 0x7a, 0x3c, 0x83, 0x12, 0x28, 0x48, 0x40, 0x31, 0xb2, 0xde, 0xc4,
+ 0xed, 0x4e, 0xff, 0x1a, 0x32, 0xf1, 0x94, 0xb6, 0xfb, 0x61, 0xdb, 0x1f, 0x74, 0xb0, 0x27, 0xa8,
+ 0xd8, 0x1d, 0x9c, 0x17, 0x8d, 0x01, 0x15, 0x4a, 0xf2, 0x5a, 0x3f, 0x0e, 0x67, 0x28, 0xaa, 0xcb,
+ 0xff, 0x42, 0x86, 0xb6, 0xc1, 0x82, 0xee, 0x6e, 0x4f, 0x93, 0xa2, 0x13, 0x5a, 0x65, 0xa1, 0x96,
+ 0xe0, 0x42, 0x29, 0x66, 0xeb, 0x67, 0x03, 0x1c, 0x1b, 0x6e, 0x23, 0x43, 0x2e, 0x1b, 0xfb, 0x72,
+ 0xf9, 0x2e, 0x80, 0x51, 0xc0, 0xeb, 0x5d, 0xc2, 0x70, 0x8b, 0x44, 0x8e, 0xe7, 0x9e, 0xc8, 0xf1,
+ 0xf8, 0x9a, 0xd9, 0x18, 0x61, 0x44, 0x63, 0x54, 0xac, 0x5f, 0xd2, 0x41, 0x44, 0xeb, 0xfc, 0x24,
+ 0x41, 0x7c, 0x09, 0x8e, 0xeb, 0xec, 0x1c, 0x40, 0x14, 0x67, 0xb4, 0xd8, 0xf1, 0xda, 0x28, 0x25,
+ 0x1a, 0xa7, 0x63, 0xfd, 0x94, 0x03, 0x27, 0xc6, 0x35, 0x5d, 0x58, 0xd7, 0xcf, 0xc6, 0x28, 0x8a,
+ 0x4b, 0xc9, 0x67, 0xe3, 0xe3, 0x9e, 0x79, 0x7e, 0xe2, 0x9b, 0xa0, 0x4f, 0x98, 0x78, 0x63, 0x7e,
+ 0x08, 0x4a, 0xa9, 0x2c, 0x26, 0xce, 0x4f, 0x7d, 0x81, 0xfb, 0x7f, 0xd8, 0x33, 0x4b, 0x8d, 0x0c,
+ 0x0c, 0xca, 0xb4, 0x96, 0x0f, 0x8d, 0x31, 0x55, 0xf0, 0x64, 0xe5, 0x7b, 0x72, 0x8a, 0x0a, 0xb8,
+ 0x37, 0x9a, 0xb9, 0xa8, 0x0a, 0x0e, 0x38, 0x73, 0x9f, 0x80, 0xd3, 0xe9, 0x85, 0x1b, 0x4d, 0xdd,
+ 0xd9, 0xb0, 0x67, 0x9e, 0xae, 0x65, 0x81, 0x50, 0xb6, 0x7d, 0x56, 0xf5, 0xe5, 0x9f, 0x53, 0xf5,
+ 0xfd, 0x90, 0x03, 0xb3, 0xea, 0xca, 0xf8, 0x1c, 0xbe, 0x19, 0x6c, 0xa6, 0xbe, 0x19, 0xac, 0x4d,
+ 0xd1, 0x82, 0x95, 0x87, 0x99, 0x5f, 0x08, 0x3e, 0x1b, 0xfa, 0x42, 0x70, 0x71, 0x6a, 0xe6, 0xc9,
+ 0xdf, 0x03, 0x2e, 0x81, 0xc3, 0xb1, 0x03, 0xf0, 0x82, 0x3c, 0xed, 0xf5, 0x5d, 0xd8, 0x50, 0x6b,
+ 0x1f, 0x3f, 0x1d, 0xe3, 0x4b, 0x70, 0x8c, 0xb0, 0x28, 0x28, 0x26, 0x14, 0xa6, 0x33, 0x96, 0x68,
+ 0x4e, 0xda, 0xc4, 0x11, 0x3e, 0xd3, 0x47, 0x48, 0x8c, 0xbe, 0xa9, 0xc7, 0x51, 0x8c, 0xa8, 0x9e,
+ 0xbb, 0xff, 0xa8, 0x3c, 0xf3, 0xe0, 0x51, 0x79, 0xe6, 0xe1, 0xa3, 0xf2, 0xcc, 0x57, 0x61, 0xd9,
+ 0xb8, 0x1f, 0x96, 0x8d, 0x07, 0x61, 0xd9, 0x78, 0x18, 0x96, 0x8d, 0xdf, 0xc2, 0xb2, 0xf1, 0xed,
+ 0xef, 0xe5, 0x99, 0x8f, 0x73, 0xdd, 0x95, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x5d, 0x20, 0x64,
+ 0x54, 0x9f, 0x14, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.proto
new file mode 100644
index 000000000..ba4965887
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.proto
@@ -0,0 +1,321 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.pkg.apis.autoscaling.v1;
+
+import "k8s.io/apimachinery/pkg/api/resource/generated.proto";
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1";
+
+// CrossVersionObjectReference contains enough information to let you identify the referred resource.
+message CrossVersionObjectReference {
+ // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"
+ optional string kind = 1;
+
+ // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
+ optional string name = 2;
+
+ // API version of the referent
+ // +optional
+ optional string apiVersion = 3;
+}
+
+// configuration of a horizontal pod autoscaler.
+message HorizontalPodAutoscaler {
+ // Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
+ // +optional
+ optional HorizontalPodAutoscalerSpec spec = 2;
+
+ // current information about the autoscaler.
+ // +optional
+ optional HorizontalPodAutoscalerStatus status = 3;
+}
+
+// HorizontalPodAutoscalerCondition describes the state of
+// a HorizontalPodAutoscaler at a certain point.
+message HorizontalPodAutoscalerCondition {
+ // type describes the current condition
+ optional string type = 1;
+
+ // status is the status of the condition (True, False, Unknown)
+ optional string status = 2;
+
+ // lastTransitionTime is the last time the condition transitioned from
+ // one status to another
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
+
+ // reason is the reason for the condition's last transition.
+ // +optional
+ optional string reason = 4;
+
+ // message is a human-readable explanation containing details about
+ // the transition
+ // +optional
+ optional string message = 5;
+}
+
+// list of horizontal pod autoscaler objects.
+message HorizontalPodAutoscalerList {
+ // Standard list metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // list of horizontal pod autoscaler objects.
+ repeated HorizontalPodAutoscaler items = 2;
+}
+
+// specification of a horizontal pod autoscaler.
+message HorizontalPodAutoscalerSpec {
+ // reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption
+ // and will set the desired number of pods by using its Scale subresource.
+ optional CrossVersionObjectReference scaleTargetRef = 1;
+
+ // lower limit for the number of pods that can be set by the autoscaler, default 1.
+ // +optional
+ optional int32 minReplicas = 2;
+
+ // upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
+ optional int32 maxReplicas = 3;
+
+ // target average CPU utilization (represented as a percentage of requested CPU) over all the pods;
+ // if not specified the default autoscaling policy will be used.
+ // +optional
+ optional int32 targetCPUUtilizationPercentage = 4;
+}
+
+// current status of a horizontal pod autoscaler
+message HorizontalPodAutoscalerStatus {
+ // most recent generation observed by this autoscaler.
+ // +optional
+ optional int64 observedGeneration = 1;
+
+ // last time the HorizontalPodAutoscaler scaled the number of pods;
+ // used by the autoscaler to control how often the number of pods is changed.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScaleTime = 2;
+
+ // current number of replicas of pods managed by this autoscaler.
+ optional int32 currentReplicas = 3;
+
+ // desired number of replicas of pods managed by this autoscaler.
+ optional int32 desiredReplicas = 4;
+
+ // current average CPU utilization over all pods, represented as a percentage of requested CPU,
+ // e.g. 70 means that an average pod is using now 70% of its requested CPU.
+ // +optional
+ optional int32 currentCPUUtilizationPercentage = 5;
+}
+
+// MetricSpec specifies how to scale based on a single metric
+// (only `type` and one other matching field should be set at once).
+message MetricSpec {
+ // type is the type of metric source. It should match one of the fields below.
+ optional string type = 1;
+
+ // object refers to a metric describing a single kubernetes object
+ // (for example, hits-per-second on an Ingress object).
+ // +optional
+ optional ObjectMetricSource object = 2;
+
+ // pods refers to a metric describing each pod in the current scale target
+ // (for example, transactions-processed-per-second). The values will be
+ // averaged together before being compared to the target value.
+ // +optional
+ optional PodsMetricSource pods = 3;
+
+ // resource refers to a resource metric (such as those specified in
+ // requests and limits) known to Kubernetes describing each pod in the
+ // current scale target (e.g. CPU or memory). Such metrics are built in to
+ // Kubernetes, and have special scaling options on top of those available
+ // to normal per-pod metrics using the "pods" source.
+ // +optional
+ optional ResourceMetricSource resource = 4;
+}
+
+// MetricStatus describes the last-read state of a single metric.
+message MetricStatus {
+ // type is the type of metric source. It will match one of the fields below.
+ optional string type = 1;
+
+ // object refers to a metric describing a single kubernetes object
+ // (for example, hits-per-second on an Ingress object).
+ // +optional
+ optional ObjectMetricStatus object = 2;
+
+ // pods refers to a metric describing each pod in the current scale target
+ // (for example, transactions-processed-per-second). The values will be
+ // averaged together before being compared to the target value.
+ // +optional
+ optional PodsMetricStatus pods = 3;
+
+ // resource refers to a resource metric (such as those specified in
+ // requests and limits) known to Kubernetes describing each pod in the
+ // current scale target (e.g. CPU or memory). Such metrics are built in to
+ // Kubernetes, and have special scaling options on top of those available
+ // to normal per-pod metrics using the "pods" source.
+ // +optional
+ optional ResourceMetricStatus resource = 4;
+}
+
+// ObjectMetricSource indicates how to scale on a metric describing a
+// kubernetes object (for example, hits-per-second on an Ingress object).
+message ObjectMetricSource {
+ // target is the described Kubernetes object.
+ optional CrossVersionObjectReference target = 1;
+
+ // metricName is the name of the metric in question.
+ optional string metricName = 2;
+
+ // targetValue is the target value of the metric (as a quantity).
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
+}
+
+// ObjectMetricStatus indicates the current value of a metric describing a
+// kubernetes object (for example, hits-per-second on an Ingress object).
+message ObjectMetricStatus {
+ // target is the described Kubernetes object.
+ optional CrossVersionObjectReference target = 1;
+
+ // metricName is the name of the metric in question.
+ optional string metricName = 2;
+
+ // currentValue is the current value of the metric (as a quantity).
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
+}
+
+// PodsMetricSource indicates how to scale on a metric describing each pod in
+// the current scale target (for example, transactions-processed-per-second).
+// The values will be averaged together before being compared to the target
+// value.
+message PodsMetricSource {
+ // metricName is the name of the metric in question
+ optional string metricName = 1;
+
+ // targetAverageValue is the target value of the average of the
+ // metric across all relevant pods (as a quantity)
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2;
+}
+
+// PodsMetricStatus indicates the current value of a metric describing each pod in
+// the current scale target (for example, transactions-processed-per-second).
+message PodsMetricStatus {
+ // metricName is the name of the metric in question
+ optional string metricName = 1;
+
+ // currentAverageValue is the current value of the average of the
+ // metric across all relevant pods (as a quantity)
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2;
+}
+
+// ResourceMetricSource indicates how to scale on a resource metric known to
+// Kubernetes, as specified in requests and limits, describing each pod in the
+// current scale target (e.g. CPU or memory). The values will be averaged
+// together before being compared to the target. Such metrics are built in to
+// Kubernetes, and have special scaling options on top of those available to
+// normal per-pod metrics using the "pods" source. Only one "target" type
+// should be set.
+message ResourceMetricSource {
+ // name is the name of the resource in question.
+ optional string name = 1;
+
+ // targetAverageUtilization is the target value of the average of the
+ // resource metric across all relevant pods, represented as a percentage of
+ // the requested value of the resource for the pods.
+ // +optional
+ optional int32 targetAverageUtilization = 2;
+
+ // targetAverageValue is the target value of the average of the
+ // resource metric across all relevant pods, as a raw value (instead of as
+ // a percentage of the request), similar to the "pods" metric source type.
+ // +optional
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
+}
+
+// ResourceMetricStatus indicates the current value of a resource metric known to
+// Kubernetes, as specified in requests and limits, describing each pod in the
+// current scale target (e.g. CPU or memory). Such metrics are built in to
+// Kubernetes, and have special scaling options on top of those available to
+// normal per-pod metrics using the "pods" source.
+message ResourceMetricStatus {
+ // name is the name of the resource in question.
+ optional string name = 1;
+
+ // currentAverageUtilization is the current value of the average of the
+ // resource metric across all relevant pods, represented as a percentage of
+ // the requested value of the resource for the pods. It will only be
+ // present if `targetAverageValue` was set in the corresponding metric
+ // specification.
+ // +optional
+ optional int32 currentAverageUtilization = 2;
+
+ // currentAverageValue is the current value of the average of the
+ // resource metric across all relevant pods, as a raw value (instead of as
+ // a percentage of the request), similar to the "pods" metric source type.
+ // It will always be set, regardless of the corresponding metric specification.
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
+}
+
+// Scale represents a scaling request for a resource.
+message Scale {
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
+ // +optional
+ optional ScaleSpec spec = 2;
+
+ // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.
+ // +optional
+ optional ScaleStatus status = 3;
+}
+
+// ScaleSpec describes the attributes of a scale subresource.
+message ScaleSpec {
+ // desired number of instances for the scaled object.
+ // +optional
+ optional int32 replicas = 1;
+}
+
+// ScaleStatus represents the current status of a scale subresource.
+message ScaleStatus {
+ // actual number of observed instances of the scaled object.
+ optional int32 replicas = 1;
+
+ // label query over pods that should match the replicas count. This is same
+ // as the label selector but in the string format to avoid introspection
+ // by clients. The string will be in the same format as the query-param syntax.
+ // More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors
+ // +optional
+ optional string selector = 2;
+}
+
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/register.go
new file mode 100644
index 000000000..20c9db5f7
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/register.go
@@ -0,0 +1,60 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "autoscaling"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &HorizontalPodAutoscaler{},
+ &HorizontalPodAutoscalerList{},
+ &Scale{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types.generated.go
new file mode 100644
index 000000000..c5de82b29
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types.generated.go
@@ -0,0 +1,5633 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg3_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/kubernetes/pkg/api/v1"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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_resource.Quantity
+ var v1 pkg1_v1.Time
+ var v2 pkg2_types.UID
+ var v3 pkg4_v1.ResourceName
+ var v4 time.Time
+ _, _, _, _, _ = v0, v1, v2, v3, v4
+ }
+}
+
+func (x *CrossVersionObjectReference) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = x.APIVersion != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(3)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CrossVersionObjectReference) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CrossVersionObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv6 := &x.Name
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv8 := &x.APIVersion
+ 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_containerMapEnd1234)
+}
+
+func (x *CrossVersionObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv11 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv13 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv15 := &x.APIVersion
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *HorizontalPodAutoscalerSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.MinReplicas != nil
+ yyq2[3] = x.TargetCPUUtilizationPercentage != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy4 := &x.ScaleTargetRef
+ yy4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("scaleTargetRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ScaleTargetRef
+ yy6.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.MinReplicas == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.MinReplicas
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(yy9))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("minReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.MinReplicas == nil {
+ r.EncodeNil()
+ } else {
+ yy11 := *x.MinReplicas
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeInt(int64(yy11))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MaxReplicas))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("maxReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MaxReplicas))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.TargetCPUUtilizationPercentage == nil {
+ r.EncodeNil()
+ } else {
+ yy17 := *x.TargetCPUUtilizationPercentage
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeInt(int64(yy17))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetCPUUtilizationPercentage"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TargetCPUUtilizationPercentage == nil {
+ r.EncodeNil()
+ } else {
+ yy19 := *x.TargetCPUUtilizationPercentage
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeInt(int64(yy19))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "scaleTargetRef":
+ if r.TryDecodeAsNil() {
+ x.ScaleTargetRef = CrossVersionObjectReference{}
+ } else {
+ yyv4 := &x.ScaleTargetRef
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "minReplicas":
+ if r.TryDecodeAsNil() {
+ if x.MinReplicas != nil {
+ x.MinReplicas = nil
+ }
+ } else {
+ if x.MinReplicas == nil {
+ x.MinReplicas = new(int32)
+ }
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*int32)(x.MinReplicas)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "maxReplicas":
+ if r.TryDecodeAsNil() {
+ x.MaxReplicas = 0
+ } else {
+ yyv7 := &x.MaxReplicas
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*int32)(yyv7)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "targetCPUUtilizationPercentage":
+ if r.TryDecodeAsNil() {
+ if x.TargetCPUUtilizationPercentage != nil {
+ x.TargetCPUUtilizationPercentage = nil
+ }
+ } else {
+ if x.TargetCPUUtilizationPercentage == nil {
+ x.TargetCPUUtilizationPercentage = new(int32)
+ }
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ *((*int32)(x.TargetCPUUtilizationPercentage)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HorizontalPodAutoscalerSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ScaleTargetRef = CrossVersionObjectReference{}
+ } else {
+ yyv12 := &x.ScaleTargetRef
+ yyv12.CodecDecodeSelf(d)
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.MinReplicas != nil {
+ x.MinReplicas = nil
+ }
+ } else {
+ if x.MinReplicas == nil {
+ x.MinReplicas = new(int32)
+ }
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ *((*int32)(x.MinReplicas)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MaxReplicas = 0
+ } else {
+ yyv15 := &x.MaxReplicas
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*int32)(yyv15)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.TargetCPUUtilizationPercentage != nil {
+ x.TargetCPUUtilizationPercentage = nil
+ }
+ } else {
+ if x.TargetCPUUtilizationPercentage == nil {
+ x.TargetCPUUtilizationPercentage = new(int32)
+ }
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int32)(x.TargetCPUUtilizationPercentage)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *HorizontalPodAutoscalerStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.ObservedGeneration != nil
+ yyq2[1] = x.LastScaleTime != nil
+ yyq2[4] = x.CurrentCPUUtilizationPercentage != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.ObservedGeneration == nil {
+ r.EncodeNil()
+ } else {
+ yy4 := *x.ObservedGeneration
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(yy4))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("observedGeneration"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ObservedGeneration == nil {
+ r.EncodeNil()
+ } else {
+ yy6 := *x.ObservedGeneration
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(yy6))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.LastScaleTime == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.LastScaleTime) {
+ } else if yym9 {
+ z.EncBinaryMarshal(x.LastScaleTime)
+ } else if !yym9 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.LastScaleTime)
+ } else {
+ z.EncFallback(x.LastScaleTime)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastScaleTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.LastScaleTime == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.LastScaleTime) {
+ } else if yym10 {
+ z.EncBinaryMarshal(x.LastScaleTime)
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.LastScaleTime)
+ } else {
+ z.EncFallback(x.LastScaleTime)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeInt(int64(x.CurrentReplicas))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.CurrentReplicas))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeInt(int64(x.DesiredReplicas))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("desiredReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(x.DesiredReplicas))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.CurrentCPUUtilizationPercentage == nil {
+ r.EncodeNil()
+ } else {
+ yy18 := *x.CurrentCPUUtilizationPercentage
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeInt(int64(yy18))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentCPUUtilizationPercentage"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.CurrentCPUUtilizationPercentage == nil {
+ r.EncodeNil()
+ } else {
+ yy20 := *x.CurrentCPUUtilizationPercentage
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeInt(int64(yy20))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "observedGeneration":
+ if r.TryDecodeAsNil() {
+ if x.ObservedGeneration != nil {
+ x.ObservedGeneration = nil
+ }
+ } else {
+ if x.ObservedGeneration == nil {
+ x.ObservedGeneration = new(int64)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "lastScaleTime":
+ if r.TryDecodeAsNil() {
+ if x.LastScaleTime != nil {
+ x.LastScaleTime = nil
+ }
+ } else {
+ if x.LastScaleTime == nil {
+ x.LastScaleTime = new(pkg1_v1.Time)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.LastScaleTime) {
+ } else if yym7 {
+ z.DecBinaryUnmarshal(x.LastScaleTime)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.LastScaleTime)
+ } else {
+ z.DecFallback(x.LastScaleTime, false)
+ }
+ }
+ case "currentReplicas":
+ if r.TryDecodeAsNil() {
+ x.CurrentReplicas = 0
+ } else {
+ yyv8 := &x.CurrentReplicas
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "desiredReplicas":
+ if r.TryDecodeAsNil() {
+ x.DesiredReplicas = 0
+ } else {
+ yyv10 := &x.DesiredReplicas
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(yyv10)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "currentCPUUtilizationPercentage":
+ if r.TryDecodeAsNil() {
+ if x.CurrentCPUUtilizationPercentage != nil {
+ x.CurrentCPUUtilizationPercentage = nil
+ }
+ } else {
+ if x.CurrentCPUUtilizationPercentage == nil {
+ x.CurrentCPUUtilizationPercentage = new(int32)
+ }
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int32)(x.CurrentCPUUtilizationPercentage)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HorizontalPodAutoscalerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ObservedGeneration != nil {
+ x.ObservedGeneration = nil
+ }
+ } else {
+ if x.ObservedGeneration == nil {
+ x.ObservedGeneration = new(int64)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.LastScaleTime != nil {
+ x.LastScaleTime = nil
+ }
+ } else {
+ if x.LastScaleTime == nil {
+ x.LastScaleTime = new(pkg1_v1.Time)
+ }
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.LastScaleTime) {
+ } else if yym18 {
+ z.DecBinaryUnmarshal(x.LastScaleTime)
+ } else if !yym18 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.LastScaleTime)
+ } else {
+ z.DecFallback(x.LastScaleTime, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentReplicas = 0
+ } else {
+ yyv19 := &x.CurrentReplicas
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*int32)(yyv19)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DesiredReplicas = 0
+ } else {
+ yyv21 := &x.DesiredReplicas
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int32)(yyv21)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.CurrentCPUUtilizationPercentage != nil {
+ x.CurrentCPUUtilizationPercentage = nil
+ }
+ } else {
+ if x.CurrentCPUUtilizationPercentage == nil {
+ x.CurrentCPUUtilizationPercentage = new(int32)
+ }
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*int32)(x.CurrentCPUUtilizationPercentage)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *HorizontalPodAutoscaler) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscaler) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscaler) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = HorizontalPodAutoscalerSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = HorizontalPodAutoscalerStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = HorizontalPodAutoscalerSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = HorizontalPodAutoscalerStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *HorizontalPodAutoscalerList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceHorizontalPodAutoscaler(([]HorizontalPodAutoscaler)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceHorizontalPodAutoscaler(([]HorizontalPodAutoscaler)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceHorizontalPodAutoscaler((*[]HorizontalPodAutoscaler)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HorizontalPodAutoscalerList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceHorizontalPodAutoscaler((*[]HorizontalPodAutoscaler)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Scale) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Scale) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Scale) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = ScaleSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ScaleStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = ScaleSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ScaleStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ScaleSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = x.Replicas != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ScaleSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ScaleSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "replicas":
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv4 := &x.Replicas
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(yyv4)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ScaleSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv7 := &x.Replicas
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*int32)(yyv7)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ScaleStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Selector != ""
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Selector))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Selector))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ScaleStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ScaleStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "replicas":
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv4 := &x.Replicas
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(yyv4)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ x.Selector = ""
+ } else {
+ yyv6 := &x.Selector
+ 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_containerMapEnd1234)
+}
+
+func (x *ScaleStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv9 := &x.Replicas
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ *((*int32)(yyv9)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Selector = ""
+ } else {
+ yyv11 := &x.Selector
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x MetricSourceType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *MetricSourceType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *MetricSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.Object != nil
+ yyq2[2] = x.Pods != nil
+ yyq2[3] = x.Resource != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Object == nil {
+ r.EncodeNil()
+ } else {
+ x.Object.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("object"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Object == nil {
+ r.EncodeNil()
+ } else {
+ x.Object.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Pods == nil {
+ r.EncodeNil()
+ } else {
+ x.Pods.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("pods"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Pods == nil {
+ r.EncodeNil()
+ } else {
+ x.Pods.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Resource == nil {
+ r.EncodeNil()
+ } else {
+ x.Resource.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resource"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Resource == nil {
+ r.EncodeNil()
+ } else {
+ x.Resource.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *MetricSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *MetricSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "object":
+ if r.TryDecodeAsNil() {
+ if x.Object != nil {
+ x.Object = nil
+ }
+ } else {
+ if x.Object == nil {
+ x.Object = new(ObjectMetricSource)
+ }
+ x.Object.CodecDecodeSelf(d)
+ }
+ case "pods":
+ if r.TryDecodeAsNil() {
+ if x.Pods != nil {
+ x.Pods = nil
+ }
+ } else {
+ if x.Pods == nil {
+ x.Pods = new(PodsMetricSource)
+ }
+ x.Pods.CodecDecodeSelf(d)
+ }
+ case "resource":
+ if r.TryDecodeAsNil() {
+ if x.Resource != nil {
+ x.Resource = nil
+ }
+ } else {
+ if x.Resource == nil {
+ x.Resource = new(ResourceMetricSource)
+ }
+ x.Resource.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *MetricSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv9 := &x.Type
+ yyv9.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Object != nil {
+ x.Object = nil
+ }
+ } else {
+ if x.Object == nil {
+ x.Object = new(ObjectMetricSource)
+ }
+ x.Object.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Pods != nil {
+ x.Pods = nil
+ }
+ } else {
+ if x.Pods == nil {
+ x.Pods = new(PodsMetricSource)
+ }
+ x.Pods.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Resource != nil {
+ x.Resource = nil
+ }
+ } else {
+ if x.Resource == nil {
+ x.Resource = new(ResourceMetricSource)
+ }
+ x.Resource.CodecDecodeSelf(d)
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ObjectMetricSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ yy4 := &x.Target
+ yy4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("target"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.Target
+ yy6.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metricName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy12 := &x.TargetValue
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetValue"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy14 := &x.TargetValue
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy14) {
+ } else if !yym15 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy14)
+ } else {
+ z.EncFallback(yy14)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ObjectMetricSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ObjectMetricSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "target":
+ if r.TryDecodeAsNil() {
+ x.Target = CrossVersionObjectReference{}
+ } else {
+ yyv4 := &x.Target
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "metricName":
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv5 := &x.MetricName
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*string)(yyv5)) = r.DecodeString()
+ }
+ }
+ case "targetValue":
+ if r.TryDecodeAsNil() {
+ x.TargetValue = pkg3_resource.Quantity{}
+ } else {
+ yyv7 := &x.TargetValue
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv7)
+ } else {
+ z.DecFallback(yyv7, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ObjectMetricSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Target = CrossVersionObjectReference{}
+ } else {
+ yyv10 := &x.Target
+ yyv10.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv11 := &x.MetricName
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*string)(yyv11)) = r.DecodeString()
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TargetValue = pkg3_resource.Quantity{}
+ } else {
+ yyv13 := &x.TargetValue
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv13) {
+ } else if !yym14 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv13)
+ } else {
+ z.DecFallback(yyv13, false)
+ }
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodsMetricSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metricName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy7 := &x.TargetAverageValue
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy7)
+ } else {
+ z.EncFallback(yy7)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetAverageValue"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.TargetAverageValue
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy9) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy9)
+ } else {
+ z.EncFallback(yy9)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodsMetricSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodsMetricSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "metricName":
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv4 := &x.MetricName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "targetAverageValue":
+ if r.TryDecodeAsNil() {
+ x.TargetAverageValue = pkg3_resource.Quantity{}
+ } else {
+ yyv6 := &x.TargetAverageValue
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodsMetricSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv9 := &x.MetricName
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TargetAverageValue = pkg3_resource.Quantity{}
+ } else {
+ yyv11 := &x.TargetAverageValue
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else if !yym12 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv11)
+ } else {
+ z.DecFallback(yyv11, false)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ResourceMetricSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.TargetAverageUtilization != nil
+ yyq2[2] = x.TargetAverageValue != nil
+ 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_containerArrayElem1234)
+ yysf4 := &x.Name
+ yysf4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yysf5 := &x.Name
+ yysf5.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.TargetAverageUtilization == nil {
+ r.EncodeNil()
+ } else {
+ yy7 := *x.TargetAverageUtilization
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(yy7))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetAverageUtilization"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TargetAverageUtilization == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.TargetAverageUtilization
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(yy9))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.TargetAverageValue == nil {
+ r.EncodeNil()
+ } else {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.TargetAverageValue) {
+ } else if !yym12 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.TargetAverageValue)
+ } else {
+ z.EncFallback(x.TargetAverageValue)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetAverageValue"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TargetAverageValue == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.TargetAverageValue) {
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.TargetAverageValue)
+ } else {
+ z.EncFallback(x.TargetAverageValue)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ResourceMetricSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ResourceMetricSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "targetAverageUtilization":
+ if r.TryDecodeAsNil() {
+ if x.TargetAverageUtilization != nil {
+ x.TargetAverageUtilization = nil
+ }
+ } else {
+ if x.TargetAverageUtilization == nil {
+ x.TargetAverageUtilization = new(int32)
+ }
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*int32)(x.TargetAverageUtilization)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "targetAverageValue":
+ if r.TryDecodeAsNil() {
+ if x.TargetAverageValue != nil {
+ x.TargetAverageValue = nil
+ }
+ } else {
+ if x.TargetAverageValue == nil {
+ x.TargetAverageValue = new(pkg3_resource.Quantity)
+ }
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.TargetAverageValue) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.TargetAverageValue)
+ } else {
+ z.DecFallback(x.TargetAverageValue, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ResourceMetricSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv10 := &x.Name
+ yyv10.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.TargetAverageUtilization != nil {
+ x.TargetAverageUtilization = nil
+ }
+ } else {
+ if x.TargetAverageUtilization == nil {
+ x.TargetAverageUtilization = new(int32)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int32)(x.TargetAverageUtilization)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.TargetAverageValue != nil {
+ x.TargetAverageValue = nil
+ }
+ } else {
+ if x.TargetAverageValue == nil {
+ x.TargetAverageValue = new(pkg3_resource.Quantity)
+ }
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.TargetAverageValue) {
+ } else if !yym14 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.TargetAverageValue)
+ } else {
+ z.DecFallback(x.TargetAverageValue, false)
+ }
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *MetricStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.Object != nil
+ yyq2[2] = x.Pods != nil
+ yyq2[3] = x.Resource != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Object == nil {
+ r.EncodeNil()
+ } else {
+ x.Object.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("object"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Object == nil {
+ r.EncodeNil()
+ } else {
+ x.Object.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Pods == nil {
+ r.EncodeNil()
+ } else {
+ x.Pods.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("pods"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Pods == nil {
+ r.EncodeNil()
+ } else {
+ x.Pods.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Resource == nil {
+ r.EncodeNil()
+ } else {
+ x.Resource.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resource"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Resource == nil {
+ r.EncodeNil()
+ } else {
+ x.Resource.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *MetricStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *MetricStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "object":
+ if r.TryDecodeAsNil() {
+ if x.Object != nil {
+ x.Object = nil
+ }
+ } else {
+ if x.Object == nil {
+ x.Object = new(ObjectMetricStatus)
+ }
+ x.Object.CodecDecodeSelf(d)
+ }
+ case "pods":
+ if r.TryDecodeAsNil() {
+ if x.Pods != nil {
+ x.Pods = nil
+ }
+ } else {
+ if x.Pods == nil {
+ x.Pods = new(PodsMetricStatus)
+ }
+ x.Pods.CodecDecodeSelf(d)
+ }
+ case "resource":
+ if r.TryDecodeAsNil() {
+ if x.Resource != nil {
+ x.Resource = nil
+ }
+ } else {
+ if x.Resource == nil {
+ x.Resource = new(ResourceMetricStatus)
+ }
+ x.Resource.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *MetricStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv9 := &x.Type
+ yyv9.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Object != nil {
+ x.Object = nil
+ }
+ } else {
+ if x.Object == nil {
+ x.Object = new(ObjectMetricStatus)
+ }
+ x.Object.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Pods != nil {
+ x.Pods = nil
+ }
+ } else {
+ if x.Pods == nil {
+ x.Pods = new(PodsMetricStatus)
+ }
+ x.Pods.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Resource != nil {
+ x.Resource = nil
+ }
+ } else {
+ if x.Resource == nil {
+ x.Resource = new(ResourceMetricStatus)
+ }
+ x.Resource.CodecDecodeSelf(d)
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x HorizontalPodAutoscalerConditionType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *HorizontalPodAutoscalerConditionType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *HorizontalPodAutoscalerCondition) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = true
+ yyq2[3] = x.Reason != ""
+ yyq2[4] = x.Message != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yysf7 := &x.Status
+ yysf7.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yysf8 := &x.Status
+ yysf8.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy10 := &x.LastTransitionTime
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy10) {
+ } else if yym11 {
+ z.EncBinaryMarshal(yy10)
+ } else if !yym11 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy10)
+ } else {
+ z.EncFallback(yy10)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.LastTransitionTime
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if yym13 {
+ z.EncBinaryMarshal(yy12)
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerCondition) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "lastTransitionTime":
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg1_v1.Time{}
+ } else {
+ yyv6 := &x.LastTransitionTime
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if yym7 {
+ z.DecBinaryUnmarshal(yyv6)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv8 := &x.Reason
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv10 := &x.Message
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HorizontalPodAutoscalerCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv13 := &x.Type
+ yyv13.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv14 := &x.Status
+ yyv14.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg1_v1.Time{}
+ } else {
+ yyv15 := &x.LastTransitionTime
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv15) {
+ } else if yym16 {
+ z.DecBinaryUnmarshal(yyv15)
+ } else if !yym16 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv15)
+ } else {
+ z.DecFallback(yyv15, false)
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv17 := &x.Reason
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv19 := &x.Message
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ObjectMetricStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ yy4 := &x.Target
+ yy4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("target"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.Target
+ yy6.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metricName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy12 := &x.CurrentValue
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentValue"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy14 := &x.CurrentValue
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy14) {
+ } else if !yym15 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy14)
+ } else {
+ z.EncFallback(yy14)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ObjectMetricStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ObjectMetricStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "target":
+ if r.TryDecodeAsNil() {
+ x.Target = CrossVersionObjectReference{}
+ } else {
+ yyv4 := &x.Target
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "metricName":
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv5 := &x.MetricName
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*string)(yyv5)) = r.DecodeString()
+ }
+ }
+ case "currentValue":
+ if r.TryDecodeAsNil() {
+ x.CurrentValue = pkg3_resource.Quantity{}
+ } else {
+ yyv7 := &x.CurrentValue
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv7)
+ } else {
+ z.DecFallback(yyv7, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ObjectMetricStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Target = CrossVersionObjectReference{}
+ } else {
+ yyv10 := &x.Target
+ yyv10.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv11 := &x.MetricName
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*string)(yyv11)) = r.DecodeString()
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentValue = pkg3_resource.Quantity{}
+ } else {
+ yyv13 := &x.CurrentValue
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv13) {
+ } else if !yym14 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv13)
+ } else {
+ z.DecFallback(yyv13, false)
+ }
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodsMetricStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metricName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy7 := &x.CurrentAverageValue
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy7)
+ } else {
+ z.EncFallback(yy7)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentAverageValue"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.CurrentAverageValue
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy9) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy9)
+ } else {
+ z.EncFallback(yy9)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodsMetricStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodsMetricStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "metricName":
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv4 := &x.MetricName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "currentAverageValue":
+ if r.TryDecodeAsNil() {
+ x.CurrentAverageValue = pkg3_resource.Quantity{}
+ } else {
+ yyv6 := &x.CurrentAverageValue
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodsMetricStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv9 := &x.MetricName
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentAverageValue = pkg3_resource.Quantity{}
+ } else {
+ yyv11 := &x.CurrentAverageValue
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else if !yym12 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv11)
+ } else {
+ z.DecFallback(yyv11, false)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ResourceMetricStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.CurrentAverageUtilization != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(3)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yysf4 := &x.Name
+ yysf4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yysf5 := &x.Name
+ yysf5.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.CurrentAverageUtilization == nil {
+ r.EncodeNil()
+ } else {
+ yy7 := *x.CurrentAverageUtilization
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(yy7))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentAverageUtilization"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.CurrentAverageUtilization == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.CurrentAverageUtilization
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(yy9))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy12 := &x.CurrentAverageValue
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentAverageValue"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy14 := &x.CurrentAverageValue
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy14) {
+ } else if !yym15 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy14)
+ } else {
+ z.EncFallback(yy14)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ResourceMetricStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ResourceMetricStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "currentAverageUtilization":
+ if r.TryDecodeAsNil() {
+ if x.CurrentAverageUtilization != nil {
+ x.CurrentAverageUtilization = nil
+ }
+ } else {
+ if x.CurrentAverageUtilization == nil {
+ x.CurrentAverageUtilization = new(int32)
+ }
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*int32)(x.CurrentAverageUtilization)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "currentAverageValue":
+ if r.TryDecodeAsNil() {
+ x.CurrentAverageValue = pkg3_resource.Quantity{}
+ } else {
+ yyv7 := &x.CurrentAverageValue
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv7)
+ } else {
+ z.DecFallback(yyv7, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ResourceMetricStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv10 := &x.Name
+ yyv10.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.CurrentAverageUtilization != nil {
+ x.CurrentAverageUtilization = nil
+ }
+ } else {
+ if x.CurrentAverageUtilization == nil {
+ x.CurrentAverageUtilization = new(int32)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int32)(x.CurrentAverageUtilization)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentAverageValue = pkg3_resource.Quantity{}
+ } else {
+ yyv13 := &x.CurrentAverageValue
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv13) {
+ } else if !yym14 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv13)
+ } else {
+ z.DecFallback(yyv13, false)
+ }
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encSliceHorizontalPodAutoscaler(v []HorizontalPodAutoscaler, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceHorizontalPodAutoscaler(v *[]HorizontalPodAutoscaler, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []HorizontalPodAutoscaler{}
+ 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, 368)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]HorizontalPodAutoscaler, yyrl1)
+ }
+ } else {
+ yyv1 = make([]HorizontalPodAutoscaler, 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] = HorizontalPodAutoscaler{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, HorizontalPodAutoscaler{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = HorizontalPodAutoscaler{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, HorizontalPodAutoscaler{}) // var yyz1 HorizontalPodAutoscaler
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = HorizontalPodAutoscaler{}
+ } 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 = []HorizontalPodAutoscaler{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types.go
new file mode 100644
index 000000000..18530c10c
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types.go
@@ -0,0 +1,332 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/api/resource"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/kubernetes/pkg/api/v1"
+)
+
+// CrossVersionObjectReference contains enough information to let you identify the referred resource.
+type CrossVersionObjectReference struct {
+ // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"
+ Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
+ // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
+ Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
+ // API version of the referent
+ // +optional
+ APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"`
+}
+
+// specification of a horizontal pod autoscaler.
+type HorizontalPodAutoscalerSpec struct {
+ // reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption
+ // and will set the desired number of pods by using its Scale subresource.
+ ScaleTargetRef CrossVersionObjectReference `json:"scaleTargetRef" protobuf:"bytes,1,opt,name=scaleTargetRef"`
+ // lower limit for the number of pods that can be set by the autoscaler, default 1.
+ // +optional
+ MinReplicas *int32 `json:"minReplicas,omitempty" protobuf:"varint,2,opt,name=minReplicas"`
+ // upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
+ MaxReplicas int32 `json:"maxReplicas" protobuf:"varint,3,opt,name=maxReplicas"`
+ // target average CPU utilization (represented as a percentage of requested CPU) over all the pods;
+ // if not specified the default autoscaling policy will be used.
+ // +optional
+ TargetCPUUtilizationPercentage *int32 `json:"targetCPUUtilizationPercentage,omitempty" protobuf:"varint,4,opt,name=targetCPUUtilizationPercentage"`
+}
+
+// current status of a horizontal pod autoscaler
+type HorizontalPodAutoscalerStatus struct {
+ // most recent generation observed by this autoscaler.
+ // +optional
+ ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
+
+ // last time the HorizontalPodAutoscaler scaled the number of pods;
+ // used by the autoscaler to control how often the number of pods is changed.
+ // +optional
+ LastScaleTime *metav1.Time `json:"lastScaleTime,omitempty" protobuf:"bytes,2,opt,name=lastScaleTime"`
+
+ // current number of replicas of pods managed by this autoscaler.
+ CurrentReplicas int32 `json:"currentReplicas" protobuf:"varint,3,opt,name=currentReplicas"`
+
+ // desired number of replicas of pods managed by this autoscaler.
+ DesiredReplicas int32 `json:"desiredReplicas" protobuf:"varint,4,opt,name=desiredReplicas"`
+
+ // current average CPU utilization over all pods, represented as a percentage of requested CPU,
+ // e.g. 70 means that an average pod is using now 70% of its requested CPU.
+ // +optional
+ CurrentCPUUtilizationPercentage *int32 `json:"currentCPUUtilizationPercentage,omitempty" protobuf:"varint,5,opt,name=currentCPUUtilizationPercentage"`
+}
+
+// +genclient=true
+
+// configuration of a horizontal pod autoscaler.
+type HorizontalPodAutoscaler struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
+ // +optional
+ Spec HorizontalPodAutoscalerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // current information about the autoscaler.
+ // +optional
+ Status HorizontalPodAutoscalerStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// list of horizontal pod autoscaler objects.
+type HorizontalPodAutoscalerList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // list of horizontal pod autoscaler objects.
+ Items []HorizontalPodAutoscaler `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// Scale represents a scaling request for a resource.
+type Scale struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
+ // +optional
+ Spec ScaleSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.
+ // +optional
+ Status ScaleStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// ScaleSpec describes the attributes of a scale subresource.
+type ScaleSpec struct {
+ // desired number of instances for the scaled object.
+ // +optional
+ Replicas int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
+}
+
+// ScaleStatus represents the current status of a scale subresource.
+type ScaleStatus struct {
+ // actual number of observed instances of the scaled object.
+ Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"`
+
+ // label query over pods that should match the replicas count. This is same
+ // as the label selector but in the string format to avoid introspection
+ // by clients. The string will be in the same format as the query-param syntax.
+ // More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors
+ // +optional
+ Selector string `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
+}
+
+// the types below are used in the alpha metrics annotation
+
+// MetricSourceType indicates the type of metric.
+type MetricSourceType string
+
+var (
+ // ObjectMetricSourceType is a metric describing a kubernetes object
+ // (for example, hits-per-second on an Ingress object).
+ ObjectMetricSourceType MetricSourceType = "Object"
+ // PodsMetricSourceType is a metric describing each pod in the current scale
+ // target (for example, transactions-processed-per-second). The values
+ // will be averaged together before being compared to the target value.
+ PodsMetricSourceType MetricSourceType = "Pods"
+ // ResourceMetricSourceType is a resource metric known to Kubernetes, as
+ // specified in requests and limits, describing each pod in the current
+ // scale target (e.g. CPU or memory). Such metrics are built in to
+ // Kubernetes, and have special scaling options on top of those available
+ // to normal per-pod metrics (the "pods" source).
+ ResourceMetricSourceType MetricSourceType = "Resource"
+)
+
+// MetricSpec specifies how to scale based on a single metric
+// (only `type` and one other matching field should be set at once).
+type MetricSpec struct {
+ // type is the type of metric source. It should match one of the fields below.
+ Type MetricSourceType `json:"type" protobuf:"bytes,1,name=type"`
+
+ // object refers to a metric describing a single kubernetes object
+ // (for example, hits-per-second on an Ingress object).
+ // +optional
+ Object *ObjectMetricSource `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"`
+ // pods refers to a metric describing each pod in the current scale target
+ // (for example, transactions-processed-per-second). The values will be
+ // averaged together before being compared to the target value.
+ // +optional
+ Pods *PodsMetricSource `json:"pods,omitempty" protobuf:"bytes,3,opt,name=pods"`
+ // resource refers to a resource metric (such as those specified in
+ // requests and limits) known to Kubernetes describing each pod in the
+ // current scale target (e.g. CPU or memory). Such metrics are built in to
+ // Kubernetes, and have special scaling options on top of those available
+ // to normal per-pod metrics using the "pods" source.
+ // +optional
+ Resource *ResourceMetricSource `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"`
+}
+
+// ObjectMetricSource indicates how to scale on a metric describing a
+// kubernetes object (for example, hits-per-second on an Ingress object).
+type ObjectMetricSource struct {
+ // target is the described Kubernetes object.
+ Target CrossVersionObjectReference `json:"target" protobuf:"bytes,1,name=target"`
+
+ // metricName is the name of the metric in question.
+ MetricName string `json:"metricName" protobuf:"bytes,2,name=metricName"`
+ // targetValue is the target value of the metric (as a quantity).
+ TargetValue resource.Quantity `json:"targetValue" protobuf:"bytes,3,name=targetValue"`
+}
+
+// PodsMetricSource indicates how to scale on a metric describing each pod in
+// the current scale target (for example, transactions-processed-per-second).
+// The values will be averaged together before being compared to the target
+// value.
+type PodsMetricSource struct {
+ // metricName is the name of the metric in question
+ MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"`
+ // targetAverageValue is the target value of the average of the
+ // metric across all relevant pods (as a quantity)
+ TargetAverageValue resource.Quantity `json:"targetAverageValue" protobuf:"bytes,2,name=targetAverageValue"`
+}
+
+// ResourceMetricSource indicates how to scale on a resource metric known to
+// Kubernetes, as specified in requests and limits, describing each pod in the
+// current scale target (e.g. CPU or memory). The values will be averaged
+// together before being compared to the target. Such metrics are built in to
+// Kubernetes, and have special scaling options on top of those available to
+// normal per-pod metrics using the "pods" source. Only one "target" type
+// should be set.
+type ResourceMetricSource struct {
+ // name is the name of the resource in question.
+ Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
+ // targetAverageUtilization is the target value of the average of the
+ // resource metric across all relevant pods, represented as a percentage of
+ // the requested value of the resource for the pods.
+ // +optional
+ TargetAverageUtilization *int32 `json:"targetAverageUtilization,omitempty" protobuf:"varint,2,opt,name=targetAverageUtilization"`
+ // targetAverageValue is the target value of the average of the
+ // resource metric across all relevant pods, as a raw value (instead of as
+ // a percentage of the request), similar to the "pods" metric source type.
+ // +optional
+ TargetAverageValue *resource.Quantity `json:"targetAverageValue,omitempty" protobuf:"bytes,3,opt,name=targetAverageValue"`
+}
+
+// MetricStatus describes the last-read state of a single metric.
+type MetricStatus struct {
+ // type is the type of metric source. It will match one of the fields below.
+ Type MetricSourceType `json:"type" protobuf:"bytes,1,name=type"`
+
+ // object refers to a metric describing a single kubernetes object
+ // (for example, hits-per-second on an Ingress object).
+ // +optional
+ Object *ObjectMetricStatus `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"`
+ // pods refers to a metric describing each pod in the current scale target
+ // (for example, transactions-processed-per-second). The values will be
+ // averaged together before being compared to the target value.
+ // +optional
+ Pods *PodsMetricStatus `json:"pods,omitempty" protobuf:"bytes,3,opt,name=pods"`
+ // resource refers to a resource metric (such as those specified in
+ // requests and limits) known to Kubernetes describing each pod in the
+ // current scale target (e.g. CPU or memory). Such metrics are built in to
+ // Kubernetes, and have special scaling options on top of those available
+ // to normal per-pod metrics using the "pods" source.
+ // +optional
+ Resource *ResourceMetricStatus `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"`
+}
+
+// HorizontalPodAutoscalerConditionType are the valid conditions of
+// a HorizontalPodAutoscaler.
+type HorizontalPodAutoscalerConditionType string
+
+var (
+ // ScalingActive indicates that the HPA controller is able to scale if necessary:
+ // it's correctly configured, can fetch the desired metrics, and isn't disabled.
+ ScalingActive HorizontalPodAutoscalerConditionType = "ScalingActive"
+ // AbleToScale indicates a lack of transient issues which prevent scaling from occuring,
+ // such as being in a backoff window, or being unable to access/update the target scale.
+ AbleToScale HorizontalPodAutoscalerConditionType = "AbleToScale"
+ // ScalingLimited indicates that the calculated scale based on metrics would be above or
+ // below the range for the HPA, and has thus been capped.
+ ScalingLimited HorizontalPodAutoscalerConditionType = "ScalingLimited"
+)
+
+// HorizontalPodAutoscalerCondition describes the state of
+// a HorizontalPodAutoscaler at a certain point.
+type HorizontalPodAutoscalerCondition struct {
+ // type describes the current condition
+ Type HorizontalPodAutoscalerConditionType `json:"type" protobuf:"bytes,1,name=type"`
+ // status is the status of the condition (True, False, Unknown)
+ Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,name=status"`
+ // lastTransitionTime is the last time the condition transitioned from
+ // one status to another
+ // +optional
+ LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
+ // reason is the reason for the condition's last transition.
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
+ // message is a human-readable explanation containing details about
+ // the transition
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
+}
+
+// ObjectMetricStatus indicates the current value of a metric describing a
+// kubernetes object (for example, hits-per-second on an Ingress object).
+type ObjectMetricStatus struct {
+ // target is the described Kubernetes object.
+ Target CrossVersionObjectReference `json:"target" protobuf:"bytes,1,name=target"`
+
+ // metricName is the name of the metric in question.
+ MetricName string `json:"metricName" protobuf:"bytes,2,name=metricName"`
+ // currentValue is the current value of the metric (as a quantity).
+ CurrentValue resource.Quantity `json:"currentValue" protobuf:"bytes,3,name=currentValue"`
+}
+
+// PodsMetricStatus indicates the current value of a metric describing each pod in
+// the current scale target (for example, transactions-processed-per-second).
+type PodsMetricStatus struct {
+ // metricName is the name of the metric in question
+ MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"`
+ // currentAverageValue is the current value of the average of the
+ // metric across all relevant pods (as a quantity)
+ CurrentAverageValue resource.Quantity `json:"currentAverageValue" protobuf:"bytes,2,name=currentAverageValue"`
+}
+
+// ResourceMetricStatus indicates the current value of a resource metric known to
+// Kubernetes, as specified in requests and limits, describing each pod in the
+// current scale target (e.g. CPU or memory). Such metrics are built in to
+// Kubernetes, and have special scaling options on top of those available to
+// normal per-pod metrics using the "pods" source.
+type ResourceMetricStatus struct {
+ // name is the name of the resource in question.
+ Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
+ // currentAverageUtilization is the current value of the average of the
+ // resource metric across all relevant pods, represented as a percentage of
+ // the requested value of the resource for the pods. It will only be
+ // present if `targetAverageValue` was set in the corresponding metric
+ // specification.
+ // +optional
+ CurrentAverageUtilization *int32 `json:"currentAverageUtilization,omitempty" protobuf:"bytes,2,opt,name=currentAverageUtilization"`
+ // currentAverageValue is the current value of the average of the
+ // resource metric across all relevant pods, as a raw value (instead of as
+ // a percentage of the request), similar to the "pods" metric source type.
+ // It will always be set, regardless of the corresponding metric specification.
+ CurrentAverageValue resource.Quantity `json:"currentAverageValue" protobuf:"bytes,3,name=currentAverageValue"`
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..7f84c2d93
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types_swagger_doc_generated.go
@@ -0,0 +1,218 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_CrossVersionObjectReference = map[string]string{
+ "": "CrossVersionObjectReference contains enough information to let you identify the referred resource.",
+ "kind": "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds\"",
+ "name": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
+ "apiVersion": "API version of the referent",
+}
+
+func (CrossVersionObjectReference) SwaggerDoc() map[string]string {
+ return map_CrossVersionObjectReference
+}
+
+var map_HorizontalPodAutoscaler = map[string]string{
+ "": "configuration of a horizontal pod autoscaler.",
+ "metadata": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.",
+ "status": "current information about the autoscaler.",
+}
+
+func (HorizontalPodAutoscaler) SwaggerDoc() map[string]string {
+ return map_HorizontalPodAutoscaler
+}
+
+var map_HorizontalPodAutoscalerCondition = map[string]string{
+ "": "HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.",
+ "type": "type describes the current condition",
+ "status": "status is the status of the condition (True, False, Unknown)",
+ "lastTransitionTime": "lastTransitionTime is the last time the condition transitioned from one status to another",
+ "reason": "reason is the reason for the condition's last transition.",
+ "message": "message is a human-readable explanation containing details about the transition",
+}
+
+func (HorizontalPodAutoscalerCondition) SwaggerDoc() map[string]string {
+ return map_HorizontalPodAutoscalerCondition
+}
+
+var map_HorizontalPodAutoscalerList = map[string]string{
+ "": "list of horizontal pod autoscaler objects.",
+ "metadata": "Standard list metadata.",
+ "items": "list of horizontal pod autoscaler objects.",
+}
+
+func (HorizontalPodAutoscalerList) SwaggerDoc() map[string]string {
+ return map_HorizontalPodAutoscalerList
+}
+
+var map_HorizontalPodAutoscalerSpec = map[string]string{
+ "": "specification of a horizontal pod autoscaler.",
+ "scaleTargetRef": "reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource.",
+ "minReplicas": "lower limit for the number of pods that can be set by the autoscaler, default 1.",
+ "maxReplicas": "upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.",
+ "targetCPUUtilizationPercentage": "target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.",
+}
+
+func (HorizontalPodAutoscalerSpec) SwaggerDoc() map[string]string {
+ return map_HorizontalPodAutoscalerSpec
+}
+
+var map_HorizontalPodAutoscalerStatus = map[string]string{
+ "": "current status of a horizontal pod autoscaler",
+ "observedGeneration": "most recent generation observed by this autoscaler.",
+ "lastScaleTime": "last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed.",
+ "currentReplicas": "current number of replicas of pods managed by this autoscaler.",
+ "desiredReplicas": "desired number of replicas of pods managed by this autoscaler.",
+ "currentCPUUtilizationPercentage": "current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.",
+}
+
+func (HorizontalPodAutoscalerStatus) SwaggerDoc() map[string]string {
+ return map_HorizontalPodAutoscalerStatus
+}
+
+var map_MetricSpec = map[string]string{
+ "": "MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).",
+ "type": "type is the type of metric source. It should match one of the fields below.",
+ "object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).",
+ "pods": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.",
+ "resource": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.",
+}
+
+func (MetricSpec) SwaggerDoc() map[string]string {
+ return map_MetricSpec
+}
+
+var map_MetricStatus = map[string]string{
+ "": "MetricStatus describes the last-read state of a single metric.",
+ "type": "type is the type of metric source. It will match one of the fields below.",
+ "object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).",
+ "pods": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.",
+ "resource": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.",
+}
+
+func (MetricStatus) SwaggerDoc() map[string]string {
+ return map_MetricStatus
+}
+
+var map_ObjectMetricSource = map[string]string{
+ "": "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).",
+ "target": "target is the described Kubernetes object.",
+ "metricName": "metricName is the name of the metric in question.",
+ "targetValue": "targetValue is the target value of the metric (as a quantity).",
+}
+
+func (ObjectMetricSource) SwaggerDoc() map[string]string {
+ return map_ObjectMetricSource
+}
+
+var map_ObjectMetricStatus = map[string]string{
+ "": "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).",
+ "target": "target is the described Kubernetes object.",
+ "metricName": "metricName is the name of the metric in question.",
+ "currentValue": "currentValue is the current value of the metric (as a quantity).",
+}
+
+func (ObjectMetricStatus) SwaggerDoc() map[string]string {
+ return map_ObjectMetricStatus
+}
+
+var map_PodsMetricSource = map[string]string{
+ "": "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.",
+ "metricName": "metricName is the name of the metric in question",
+ "targetAverageValue": "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)",
+}
+
+func (PodsMetricSource) SwaggerDoc() map[string]string {
+ return map_PodsMetricSource
+}
+
+var map_PodsMetricStatus = map[string]string{
+ "": "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).",
+ "metricName": "metricName is the name of the metric in question",
+ "currentAverageValue": "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)",
+}
+
+func (PodsMetricStatus) SwaggerDoc() map[string]string {
+ return map_PodsMetricStatus
+}
+
+var map_ResourceMetricSource = map[string]string{
+ "": "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.",
+ "name": "name is the name of the resource in question.",
+ "targetAverageUtilization": "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.",
+ "targetAverageValue": "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.",
+}
+
+func (ResourceMetricSource) SwaggerDoc() map[string]string {
+ return map_ResourceMetricSource
+}
+
+var map_ResourceMetricStatus = map[string]string{
+ "": "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.",
+ "name": "name is the name of the resource in question.",
+ "currentAverageUtilization": "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.",
+ "currentAverageValue": "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.",
+}
+
+func (ResourceMetricStatus) SwaggerDoc() map[string]string {
+ return map_ResourceMetricStatus
+}
+
+var map_Scale = map[string]string{
+ "": "Scale represents a scaling request for a resource.",
+ "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.",
+ "spec": "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.",
+ "status": "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.",
+}
+
+func (Scale) SwaggerDoc() map[string]string {
+ return map_Scale
+}
+
+var map_ScaleSpec = map[string]string{
+ "": "ScaleSpec describes the attributes of a scale subresource.",
+ "replicas": "desired number of instances for the scaled object.",
+}
+
+func (ScaleSpec) SwaggerDoc() map[string]string {
+ return map_ScaleSpec
+}
+
+var map_ScaleStatus = map[string]string{
+ "": "ScaleStatus represents the current status of a scale subresource.",
+ "replicas": "actual number of observed instances of the scaled object.",
+ "selector": "label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors",
+}
+
+func (ScaleStatus) SwaggerDoc() map[string]string {
+ return map_ScaleStatus
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/zz_generated.conversion.go
new file mode 100644
index 000000000..25e78690d
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/zz_generated.conversion.go
@@ -0,0 +1,506 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1
+
+import (
+ resource "k8s.io/apimachinery/pkg/api/resource"
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api "k8s.io/kubernetes/pkg/api"
+ api_v1 "k8s.io/kubernetes/pkg/api/v1"
+ autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference,
+ Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference,
+ Convert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler,
+ Convert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler,
+ Convert_v1_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition,
+ Convert_autoscaling_HorizontalPodAutoscalerCondition_To_v1_HorizontalPodAutoscalerCondition,
+ Convert_v1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList,
+ Convert_autoscaling_HorizontalPodAutoscalerList_To_v1_HorizontalPodAutoscalerList,
+ Convert_v1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec,
+ Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscalerSpec,
+ Convert_v1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus,
+ Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus,
+ Convert_v1_MetricSpec_To_autoscaling_MetricSpec,
+ Convert_autoscaling_MetricSpec_To_v1_MetricSpec,
+ Convert_v1_MetricStatus_To_autoscaling_MetricStatus,
+ Convert_autoscaling_MetricStatus_To_v1_MetricStatus,
+ Convert_v1_ObjectMetricSource_To_autoscaling_ObjectMetricSource,
+ Convert_autoscaling_ObjectMetricSource_To_v1_ObjectMetricSource,
+ Convert_v1_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus,
+ Convert_autoscaling_ObjectMetricStatus_To_v1_ObjectMetricStatus,
+ Convert_v1_PodsMetricSource_To_autoscaling_PodsMetricSource,
+ Convert_autoscaling_PodsMetricSource_To_v1_PodsMetricSource,
+ Convert_v1_PodsMetricStatus_To_autoscaling_PodsMetricStatus,
+ Convert_autoscaling_PodsMetricStatus_To_v1_PodsMetricStatus,
+ Convert_v1_ResourceMetricSource_To_autoscaling_ResourceMetricSource,
+ Convert_autoscaling_ResourceMetricSource_To_v1_ResourceMetricSource,
+ Convert_v1_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus,
+ Convert_autoscaling_ResourceMetricStatus_To_v1_ResourceMetricStatus,
+ Convert_v1_Scale_To_autoscaling_Scale,
+ Convert_autoscaling_Scale_To_v1_Scale,
+ Convert_v1_ScaleSpec_To_autoscaling_ScaleSpec,
+ Convert_autoscaling_ScaleSpec_To_v1_ScaleSpec,
+ Convert_v1_ScaleStatus_To_autoscaling_ScaleStatus,
+ Convert_autoscaling_ScaleStatus_To_v1_ScaleStatus,
+ )
+}
+
+func autoConvert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in *CrossVersionObjectReference, out *autoscaling.CrossVersionObjectReference, s conversion.Scope) error {
+ out.Kind = in.Kind
+ out.Name = in.Name
+ out.APIVersion = in.APIVersion
+ return nil
+}
+
+// Convert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference is an autogenerated conversion function.
+func Convert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in *CrossVersionObjectReference, out *autoscaling.CrossVersionObjectReference, s conversion.Scope) error {
+ return autoConvert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in, out, s)
+}
+
+func autoConvert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference(in *autoscaling.CrossVersionObjectReference, out *CrossVersionObjectReference, s conversion.Scope) error {
+ out.Kind = in.Kind
+ out.Name = in.Name
+ out.APIVersion = in.APIVersion
+ return nil
+}
+
+// Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference is an autogenerated conversion function.
+func Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference(in *autoscaling.CrossVersionObjectReference, out *CrossVersionObjectReference, s conversion.Scope) error {
+ return autoConvert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference(in, out, s)
+}
+
+func autoConvert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func autoConvert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func autoConvert_v1_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition(in *HorizontalPodAutoscalerCondition, out *autoscaling.HorizontalPodAutoscalerCondition, s conversion.Scope) error {
+ out.Type = autoscaling.HorizontalPodAutoscalerConditionType(in.Type)
+ out.Status = autoscaling.ConditionStatus(in.Status)
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_v1_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition is an autogenerated conversion function.
+func Convert_v1_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition(in *HorizontalPodAutoscalerCondition, out *autoscaling.HorizontalPodAutoscalerCondition, s conversion.Scope) error {
+ return autoConvert_v1_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition(in, out, s)
+}
+
+func autoConvert_autoscaling_HorizontalPodAutoscalerCondition_To_v1_HorizontalPodAutoscalerCondition(in *autoscaling.HorizontalPodAutoscalerCondition, out *HorizontalPodAutoscalerCondition, s conversion.Scope) error {
+ out.Type = HorizontalPodAutoscalerConditionType(in.Type)
+ out.Status = api_v1.ConditionStatus(in.Status)
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_autoscaling_HorizontalPodAutoscalerCondition_To_v1_HorizontalPodAutoscalerCondition is an autogenerated conversion function.
+func Convert_autoscaling_HorizontalPodAutoscalerCondition_To_v1_HorizontalPodAutoscalerCondition(in *autoscaling.HorizontalPodAutoscalerCondition, out *HorizontalPodAutoscalerCondition, s conversion.Scope) error {
+ return autoConvert_autoscaling_HorizontalPodAutoscalerCondition_To_v1_HorizontalPodAutoscalerCondition(in, out, s)
+}
+
+func autoConvert_v1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in *HorizontalPodAutoscalerList, out *autoscaling.HorizontalPodAutoscalerList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]autoscaling.HorizontalPodAutoscaler, len(*in))
+ for i := range *in {
+ if err := Convert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList is an autogenerated conversion function.
+func Convert_v1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in *HorizontalPodAutoscalerList, out *autoscaling.HorizontalPodAutoscalerList, s conversion.Scope) error {
+ return autoConvert_v1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in, out, s)
+}
+
+func autoConvert_autoscaling_HorizontalPodAutoscalerList_To_v1_HorizontalPodAutoscalerList(in *autoscaling.HorizontalPodAutoscalerList, out *HorizontalPodAutoscalerList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]HorizontalPodAutoscaler, len(*in))
+ for i := range *in {
+ if err := Convert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]HorizontalPodAutoscaler, 0)
+ }
+ return nil
+}
+
+// Convert_autoscaling_HorizontalPodAutoscalerList_To_v1_HorizontalPodAutoscalerList is an autogenerated conversion function.
+func Convert_autoscaling_HorizontalPodAutoscalerList_To_v1_HorizontalPodAutoscalerList(in *autoscaling.HorizontalPodAutoscalerList, out *HorizontalPodAutoscalerList, s conversion.Scope) error {
+ return autoConvert_autoscaling_HorizontalPodAutoscalerList_To_v1_HorizontalPodAutoscalerList(in, out, s)
+}
+
+func autoConvert_v1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in *HorizontalPodAutoscalerSpec, out *autoscaling.HorizontalPodAutoscalerSpec, s conversion.Scope) error {
+ if err := Convert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(&in.ScaleTargetRef, &out.ScaleTargetRef, s); err != nil {
+ return err
+ }
+ out.MinReplicas = (*int32)(unsafe.Pointer(in.MinReplicas))
+ out.MaxReplicas = in.MaxReplicas
+ // WARNING: in.TargetCPUUtilizationPercentage requires manual conversion: does not exist in peer-type
+ return nil
+}
+
+func autoConvert_autoscaling_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscalerSpec(in *autoscaling.HorizontalPodAutoscalerSpec, out *HorizontalPodAutoscalerSpec, s conversion.Scope) error {
+ if err := Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference(&in.ScaleTargetRef, &out.ScaleTargetRef, s); err != nil {
+ return err
+ }
+ out.MinReplicas = (*int32)(unsafe.Pointer(in.MinReplicas))
+ out.MaxReplicas = in.MaxReplicas
+ // WARNING: in.Metrics requires manual conversion: does not exist in peer-type
+ return nil
+}
+
+func autoConvert_v1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in *HorizontalPodAutoscalerStatus, out *autoscaling.HorizontalPodAutoscalerStatus, s conversion.Scope) error {
+ out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration))
+ out.LastScaleTime = (*meta_v1.Time)(unsafe.Pointer(in.LastScaleTime))
+ out.CurrentReplicas = in.CurrentReplicas
+ out.DesiredReplicas = in.DesiredReplicas
+ // WARNING: in.CurrentCPUUtilizationPercentage requires manual conversion: does not exist in peer-type
+ return nil
+}
+
+func autoConvert_autoscaling_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutoscalerStatus(in *autoscaling.HorizontalPodAutoscalerStatus, out *HorizontalPodAutoscalerStatus, s conversion.Scope) error {
+ out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration))
+ out.LastScaleTime = (*meta_v1.Time)(unsafe.Pointer(in.LastScaleTime))
+ out.CurrentReplicas = in.CurrentReplicas
+ out.DesiredReplicas = in.DesiredReplicas
+ // WARNING: in.CurrentMetrics requires manual conversion: does not exist in peer-type
+ // WARNING: in.Conditions requires manual conversion: does not exist in peer-type
+ return nil
+}
+
+func autoConvert_v1_MetricSpec_To_autoscaling_MetricSpec(in *MetricSpec, out *autoscaling.MetricSpec, s conversion.Scope) error {
+ out.Type = autoscaling.MetricSourceType(in.Type)
+ out.Object = (*autoscaling.ObjectMetricSource)(unsafe.Pointer(in.Object))
+ out.Pods = (*autoscaling.PodsMetricSource)(unsafe.Pointer(in.Pods))
+ out.Resource = (*autoscaling.ResourceMetricSource)(unsafe.Pointer(in.Resource))
+ return nil
+}
+
+// Convert_v1_MetricSpec_To_autoscaling_MetricSpec is an autogenerated conversion function.
+func Convert_v1_MetricSpec_To_autoscaling_MetricSpec(in *MetricSpec, out *autoscaling.MetricSpec, s conversion.Scope) error {
+ return autoConvert_v1_MetricSpec_To_autoscaling_MetricSpec(in, out, s)
+}
+
+func autoConvert_autoscaling_MetricSpec_To_v1_MetricSpec(in *autoscaling.MetricSpec, out *MetricSpec, s conversion.Scope) error {
+ out.Type = MetricSourceType(in.Type)
+ out.Object = (*ObjectMetricSource)(unsafe.Pointer(in.Object))
+ out.Pods = (*PodsMetricSource)(unsafe.Pointer(in.Pods))
+ out.Resource = (*ResourceMetricSource)(unsafe.Pointer(in.Resource))
+ return nil
+}
+
+// Convert_autoscaling_MetricSpec_To_v1_MetricSpec is an autogenerated conversion function.
+func Convert_autoscaling_MetricSpec_To_v1_MetricSpec(in *autoscaling.MetricSpec, out *MetricSpec, s conversion.Scope) error {
+ return autoConvert_autoscaling_MetricSpec_To_v1_MetricSpec(in, out, s)
+}
+
+func autoConvert_v1_MetricStatus_To_autoscaling_MetricStatus(in *MetricStatus, out *autoscaling.MetricStatus, s conversion.Scope) error {
+ out.Type = autoscaling.MetricSourceType(in.Type)
+ out.Object = (*autoscaling.ObjectMetricStatus)(unsafe.Pointer(in.Object))
+ out.Pods = (*autoscaling.PodsMetricStatus)(unsafe.Pointer(in.Pods))
+ out.Resource = (*autoscaling.ResourceMetricStatus)(unsafe.Pointer(in.Resource))
+ return nil
+}
+
+// Convert_v1_MetricStatus_To_autoscaling_MetricStatus is an autogenerated conversion function.
+func Convert_v1_MetricStatus_To_autoscaling_MetricStatus(in *MetricStatus, out *autoscaling.MetricStatus, s conversion.Scope) error {
+ return autoConvert_v1_MetricStatus_To_autoscaling_MetricStatus(in, out, s)
+}
+
+func autoConvert_autoscaling_MetricStatus_To_v1_MetricStatus(in *autoscaling.MetricStatus, out *MetricStatus, s conversion.Scope) error {
+ out.Type = MetricSourceType(in.Type)
+ out.Object = (*ObjectMetricStatus)(unsafe.Pointer(in.Object))
+ out.Pods = (*PodsMetricStatus)(unsafe.Pointer(in.Pods))
+ out.Resource = (*ResourceMetricStatus)(unsafe.Pointer(in.Resource))
+ return nil
+}
+
+// Convert_autoscaling_MetricStatus_To_v1_MetricStatus is an autogenerated conversion function.
+func Convert_autoscaling_MetricStatus_To_v1_MetricStatus(in *autoscaling.MetricStatus, out *MetricStatus, s conversion.Scope) error {
+ return autoConvert_autoscaling_MetricStatus_To_v1_MetricStatus(in, out, s)
+}
+
+func autoConvert_v1_ObjectMetricSource_To_autoscaling_ObjectMetricSource(in *ObjectMetricSource, out *autoscaling.ObjectMetricSource, s conversion.Scope) error {
+ if err := Convert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(&in.Target, &out.Target, s); err != nil {
+ return err
+ }
+ out.MetricName = in.MetricName
+ out.TargetValue = in.TargetValue
+ return nil
+}
+
+// Convert_v1_ObjectMetricSource_To_autoscaling_ObjectMetricSource is an autogenerated conversion function.
+func Convert_v1_ObjectMetricSource_To_autoscaling_ObjectMetricSource(in *ObjectMetricSource, out *autoscaling.ObjectMetricSource, s conversion.Scope) error {
+ return autoConvert_v1_ObjectMetricSource_To_autoscaling_ObjectMetricSource(in, out, s)
+}
+
+func autoConvert_autoscaling_ObjectMetricSource_To_v1_ObjectMetricSource(in *autoscaling.ObjectMetricSource, out *ObjectMetricSource, s conversion.Scope) error {
+ if err := Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference(&in.Target, &out.Target, s); err != nil {
+ return err
+ }
+ out.MetricName = in.MetricName
+ out.TargetValue = in.TargetValue
+ return nil
+}
+
+// Convert_autoscaling_ObjectMetricSource_To_v1_ObjectMetricSource is an autogenerated conversion function.
+func Convert_autoscaling_ObjectMetricSource_To_v1_ObjectMetricSource(in *autoscaling.ObjectMetricSource, out *ObjectMetricSource, s conversion.Scope) error {
+ return autoConvert_autoscaling_ObjectMetricSource_To_v1_ObjectMetricSource(in, out, s)
+}
+
+func autoConvert_v1_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus(in *ObjectMetricStatus, out *autoscaling.ObjectMetricStatus, s conversion.Scope) error {
+ if err := Convert_v1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(&in.Target, &out.Target, s); err != nil {
+ return err
+ }
+ out.MetricName = in.MetricName
+ out.CurrentValue = in.CurrentValue
+ return nil
+}
+
+// Convert_v1_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus is an autogenerated conversion function.
+func Convert_v1_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus(in *ObjectMetricStatus, out *autoscaling.ObjectMetricStatus, s conversion.Scope) error {
+ return autoConvert_v1_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus(in, out, s)
+}
+
+func autoConvert_autoscaling_ObjectMetricStatus_To_v1_ObjectMetricStatus(in *autoscaling.ObjectMetricStatus, out *ObjectMetricStatus, s conversion.Scope) error {
+ if err := Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectReference(&in.Target, &out.Target, s); err != nil {
+ return err
+ }
+ out.MetricName = in.MetricName
+ out.CurrentValue = in.CurrentValue
+ return nil
+}
+
+// Convert_autoscaling_ObjectMetricStatus_To_v1_ObjectMetricStatus is an autogenerated conversion function.
+func Convert_autoscaling_ObjectMetricStatus_To_v1_ObjectMetricStatus(in *autoscaling.ObjectMetricStatus, out *ObjectMetricStatus, s conversion.Scope) error {
+ return autoConvert_autoscaling_ObjectMetricStatus_To_v1_ObjectMetricStatus(in, out, s)
+}
+
+func autoConvert_v1_PodsMetricSource_To_autoscaling_PodsMetricSource(in *PodsMetricSource, out *autoscaling.PodsMetricSource, s conversion.Scope) error {
+ out.MetricName = in.MetricName
+ out.TargetAverageValue = in.TargetAverageValue
+ return nil
+}
+
+// Convert_v1_PodsMetricSource_To_autoscaling_PodsMetricSource is an autogenerated conversion function.
+func Convert_v1_PodsMetricSource_To_autoscaling_PodsMetricSource(in *PodsMetricSource, out *autoscaling.PodsMetricSource, s conversion.Scope) error {
+ return autoConvert_v1_PodsMetricSource_To_autoscaling_PodsMetricSource(in, out, s)
+}
+
+func autoConvert_autoscaling_PodsMetricSource_To_v1_PodsMetricSource(in *autoscaling.PodsMetricSource, out *PodsMetricSource, s conversion.Scope) error {
+ out.MetricName = in.MetricName
+ out.TargetAverageValue = in.TargetAverageValue
+ return nil
+}
+
+// Convert_autoscaling_PodsMetricSource_To_v1_PodsMetricSource is an autogenerated conversion function.
+func Convert_autoscaling_PodsMetricSource_To_v1_PodsMetricSource(in *autoscaling.PodsMetricSource, out *PodsMetricSource, s conversion.Scope) error {
+ return autoConvert_autoscaling_PodsMetricSource_To_v1_PodsMetricSource(in, out, s)
+}
+
+func autoConvert_v1_PodsMetricStatus_To_autoscaling_PodsMetricStatus(in *PodsMetricStatus, out *autoscaling.PodsMetricStatus, s conversion.Scope) error {
+ out.MetricName = in.MetricName
+ out.CurrentAverageValue = in.CurrentAverageValue
+ return nil
+}
+
+// Convert_v1_PodsMetricStatus_To_autoscaling_PodsMetricStatus is an autogenerated conversion function.
+func Convert_v1_PodsMetricStatus_To_autoscaling_PodsMetricStatus(in *PodsMetricStatus, out *autoscaling.PodsMetricStatus, s conversion.Scope) error {
+ return autoConvert_v1_PodsMetricStatus_To_autoscaling_PodsMetricStatus(in, out, s)
+}
+
+func autoConvert_autoscaling_PodsMetricStatus_To_v1_PodsMetricStatus(in *autoscaling.PodsMetricStatus, out *PodsMetricStatus, s conversion.Scope) error {
+ out.MetricName = in.MetricName
+ out.CurrentAverageValue = in.CurrentAverageValue
+ return nil
+}
+
+// Convert_autoscaling_PodsMetricStatus_To_v1_PodsMetricStatus is an autogenerated conversion function.
+func Convert_autoscaling_PodsMetricStatus_To_v1_PodsMetricStatus(in *autoscaling.PodsMetricStatus, out *PodsMetricStatus, s conversion.Scope) error {
+ return autoConvert_autoscaling_PodsMetricStatus_To_v1_PodsMetricStatus(in, out, s)
+}
+
+func autoConvert_v1_ResourceMetricSource_To_autoscaling_ResourceMetricSource(in *ResourceMetricSource, out *autoscaling.ResourceMetricSource, s conversion.Scope) error {
+ out.Name = api.ResourceName(in.Name)
+ out.TargetAverageUtilization = (*int32)(unsafe.Pointer(in.TargetAverageUtilization))
+ out.TargetAverageValue = (*resource.Quantity)(unsafe.Pointer(in.TargetAverageValue))
+ return nil
+}
+
+// Convert_v1_ResourceMetricSource_To_autoscaling_ResourceMetricSource is an autogenerated conversion function.
+func Convert_v1_ResourceMetricSource_To_autoscaling_ResourceMetricSource(in *ResourceMetricSource, out *autoscaling.ResourceMetricSource, s conversion.Scope) error {
+ return autoConvert_v1_ResourceMetricSource_To_autoscaling_ResourceMetricSource(in, out, s)
+}
+
+func autoConvert_autoscaling_ResourceMetricSource_To_v1_ResourceMetricSource(in *autoscaling.ResourceMetricSource, out *ResourceMetricSource, s conversion.Scope) error {
+ out.Name = api_v1.ResourceName(in.Name)
+ out.TargetAverageUtilization = (*int32)(unsafe.Pointer(in.TargetAverageUtilization))
+ out.TargetAverageValue = (*resource.Quantity)(unsafe.Pointer(in.TargetAverageValue))
+ return nil
+}
+
+// Convert_autoscaling_ResourceMetricSource_To_v1_ResourceMetricSource is an autogenerated conversion function.
+func Convert_autoscaling_ResourceMetricSource_To_v1_ResourceMetricSource(in *autoscaling.ResourceMetricSource, out *ResourceMetricSource, s conversion.Scope) error {
+ return autoConvert_autoscaling_ResourceMetricSource_To_v1_ResourceMetricSource(in, out, s)
+}
+
+func autoConvert_v1_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus(in *ResourceMetricStatus, out *autoscaling.ResourceMetricStatus, s conversion.Scope) error {
+ out.Name = api.ResourceName(in.Name)
+ out.CurrentAverageUtilization = (*int32)(unsafe.Pointer(in.CurrentAverageUtilization))
+ out.CurrentAverageValue = in.CurrentAverageValue
+ return nil
+}
+
+// Convert_v1_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus is an autogenerated conversion function.
+func Convert_v1_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus(in *ResourceMetricStatus, out *autoscaling.ResourceMetricStatus, s conversion.Scope) error {
+ return autoConvert_v1_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus(in, out, s)
+}
+
+func autoConvert_autoscaling_ResourceMetricStatus_To_v1_ResourceMetricStatus(in *autoscaling.ResourceMetricStatus, out *ResourceMetricStatus, s conversion.Scope) error {
+ out.Name = api_v1.ResourceName(in.Name)
+ out.CurrentAverageUtilization = (*int32)(unsafe.Pointer(in.CurrentAverageUtilization))
+ out.CurrentAverageValue = in.CurrentAverageValue
+ return nil
+}
+
+// Convert_autoscaling_ResourceMetricStatus_To_v1_ResourceMetricStatus is an autogenerated conversion function.
+func Convert_autoscaling_ResourceMetricStatus_To_v1_ResourceMetricStatus(in *autoscaling.ResourceMetricStatus, out *ResourceMetricStatus, s conversion.Scope) error {
+ return autoConvert_autoscaling_ResourceMetricStatus_To_v1_ResourceMetricStatus(in, out, s)
+}
+
+func autoConvert_v1_Scale_To_autoscaling_Scale(in *Scale, out *autoscaling.Scale, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_ScaleSpec_To_autoscaling_ScaleSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_ScaleStatus_To_autoscaling_ScaleStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_Scale_To_autoscaling_Scale is an autogenerated conversion function.
+func Convert_v1_Scale_To_autoscaling_Scale(in *Scale, out *autoscaling.Scale, s conversion.Scope) error {
+ return autoConvert_v1_Scale_To_autoscaling_Scale(in, out, s)
+}
+
+func autoConvert_autoscaling_Scale_To_v1_Scale(in *autoscaling.Scale, out *Scale, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_autoscaling_ScaleSpec_To_v1_ScaleSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_autoscaling_ScaleStatus_To_v1_ScaleStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_autoscaling_Scale_To_v1_Scale is an autogenerated conversion function.
+func Convert_autoscaling_Scale_To_v1_Scale(in *autoscaling.Scale, out *Scale, s conversion.Scope) error {
+ return autoConvert_autoscaling_Scale_To_v1_Scale(in, out, s)
+}
+
+func autoConvert_v1_ScaleSpec_To_autoscaling_ScaleSpec(in *ScaleSpec, out *autoscaling.ScaleSpec, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ return nil
+}
+
+// Convert_v1_ScaleSpec_To_autoscaling_ScaleSpec is an autogenerated conversion function.
+func Convert_v1_ScaleSpec_To_autoscaling_ScaleSpec(in *ScaleSpec, out *autoscaling.ScaleSpec, s conversion.Scope) error {
+ return autoConvert_v1_ScaleSpec_To_autoscaling_ScaleSpec(in, out, s)
+}
+
+func autoConvert_autoscaling_ScaleSpec_To_v1_ScaleSpec(in *autoscaling.ScaleSpec, out *ScaleSpec, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ return nil
+}
+
+// Convert_autoscaling_ScaleSpec_To_v1_ScaleSpec is an autogenerated conversion function.
+func Convert_autoscaling_ScaleSpec_To_v1_ScaleSpec(in *autoscaling.ScaleSpec, out *ScaleSpec, s conversion.Scope) error {
+ return autoConvert_autoscaling_ScaleSpec_To_v1_ScaleSpec(in, out, s)
+}
+
+func autoConvert_v1_ScaleStatus_To_autoscaling_ScaleStatus(in *ScaleStatus, out *autoscaling.ScaleStatus, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ out.Selector = in.Selector
+ return nil
+}
+
+// Convert_v1_ScaleStatus_To_autoscaling_ScaleStatus is an autogenerated conversion function.
+func Convert_v1_ScaleStatus_To_autoscaling_ScaleStatus(in *ScaleStatus, out *autoscaling.ScaleStatus, s conversion.Scope) error {
+ return autoConvert_v1_ScaleStatus_To_autoscaling_ScaleStatus(in, out, s)
+}
+
+func autoConvert_autoscaling_ScaleStatus_To_v1_ScaleStatus(in *autoscaling.ScaleStatus, out *ScaleStatus, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ out.Selector = in.Selector
+ return nil
+}
+
+// Convert_autoscaling_ScaleStatus_To_v1_ScaleStatus is an autogenerated conversion function.
+func Convert_autoscaling_ScaleStatus_To_v1_ScaleStatus(in *autoscaling.ScaleStatus, out *ScaleStatus, s conversion.Scope) error {
+ return autoConvert_autoscaling_ScaleStatus_To_v1_ScaleStatus(in, out, s)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..94fdc46d0
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/zz_generated.deepcopy.go
@@ -0,0 +1,340 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1
+
+import (
+ resource "k8s.io/apimachinery/pkg/api/resource"
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_CrossVersionObjectReference, InType: reflect.TypeOf(&CrossVersionObjectReference{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscaler, InType: reflect.TypeOf(&HorizontalPodAutoscaler{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscalerCondition, InType: reflect.TypeOf(&HorizontalPodAutoscalerCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscalerList, InType: reflect.TypeOf(&HorizontalPodAutoscalerList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscalerSpec, InType: reflect.TypeOf(&HorizontalPodAutoscalerSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_HorizontalPodAutoscalerStatus, InType: reflect.TypeOf(&HorizontalPodAutoscalerStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_MetricSpec, InType: reflect.TypeOf(&MetricSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_MetricStatus, InType: reflect.TypeOf(&MetricStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ObjectMetricSource, InType: reflect.TypeOf(&ObjectMetricSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ObjectMetricStatus, InType: reflect.TypeOf(&ObjectMetricStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodsMetricSource, InType: reflect.TypeOf(&PodsMetricSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodsMetricStatus, InType: reflect.TypeOf(&PodsMetricStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ResourceMetricSource, InType: reflect.TypeOf(&ResourceMetricSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ResourceMetricStatus, InType: reflect.TypeOf(&ResourceMetricStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Scale, InType: reflect.TypeOf(&Scale{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ScaleSpec, InType: reflect.TypeOf(&ScaleSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ScaleStatus, InType: reflect.TypeOf(&ScaleStatus{})},
+ )
+}
+
+// DeepCopy_v1_CrossVersionObjectReference is an autogenerated deepcopy function.
+func DeepCopy_v1_CrossVersionObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CrossVersionObjectReference)
+ out := out.(*CrossVersionObjectReference)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_HorizontalPodAutoscaler is an autogenerated deepcopy function.
+func DeepCopy_v1_HorizontalPodAutoscaler(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscaler)
+ out := out.(*HorizontalPodAutoscaler)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_HorizontalPodAutoscalerCondition is an autogenerated deepcopy function.
+func DeepCopy_v1_HorizontalPodAutoscalerCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscalerCondition)
+ out := out.(*HorizontalPodAutoscalerCondition)
+ *out = *in
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_HorizontalPodAutoscalerList is an autogenerated deepcopy function.
+func DeepCopy_v1_HorizontalPodAutoscalerList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscalerList)
+ out := out.(*HorizontalPodAutoscalerList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]HorizontalPodAutoscaler, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_HorizontalPodAutoscalerSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_HorizontalPodAutoscalerSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscalerSpec)
+ out := out.(*HorizontalPodAutoscalerSpec)
+ *out = *in
+ if in.MinReplicas != nil {
+ in, out := &in.MinReplicas, &out.MinReplicas
+ *out = new(int32)
+ **out = **in
+ }
+ if in.TargetCPUUtilizationPercentage != nil {
+ in, out := &in.TargetCPUUtilizationPercentage, &out.TargetCPUUtilizationPercentage
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_HorizontalPodAutoscalerStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_HorizontalPodAutoscalerStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscalerStatus)
+ out := out.(*HorizontalPodAutoscalerStatus)
+ *out = *in
+ if in.ObservedGeneration != nil {
+ in, out := &in.ObservedGeneration, &out.ObservedGeneration
+ *out = new(int64)
+ **out = **in
+ }
+ if in.LastScaleTime != nil {
+ in, out := &in.LastScaleTime, &out.LastScaleTime
+ *out = new(meta_v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ if in.CurrentCPUUtilizationPercentage != nil {
+ in, out := &in.CurrentCPUUtilizationPercentage, &out.CurrentCPUUtilizationPercentage
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_MetricSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_MetricSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*MetricSpec)
+ out := out.(*MetricSpec)
+ *out = *in
+ if in.Object != nil {
+ in, out := &in.Object, &out.Object
+ *out = new(ObjectMetricSource)
+ if err := DeepCopy_v1_ObjectMetricSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Pods != nil {
+ in, out := &in.Pods, &out.Pods
+ *out = new(PodsMetricSource)
+ if err := DeepCopy_v1_PodsMetricSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Resource != nil {
+ in, out := &in.Resource, &out.Resource
+ *out = new(ResourceMetricSource)
+ if err := DeepCopy_v1_ResourceMetricSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_MetricStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_MetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*MetricStatus)
+ out := out.(*MetricStatus)
+ *out = *in
+ if in.Object != nil {
+ in, out := &in.Object, &out.Object
+ *out = new(ObjectMetricStatus)
+ if err := DeepCopy_v1_ObjectMetricStatus(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Pods != nil {
+ in, out := &in.Pods, &out.Pods
+ *out = new(PodsMetricStatus)
+ if err := DeepCopy_v1_PodsMetricStatus(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Resource != nil {
+ in, out := &in.Resource, &out.Resource
+ *out = new(ResourceMetricStatus)
+ if err := DeepCopy_v1_ResourceMetricStatus(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ObjectMetricSource is an autogenerated deepcopy function.
+func DeepCopy_v1_ObjectMetricSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ObjectMetricSource)
+ out := out.(*ObjectMetricSource)
+ *out = *in
+ out.TargetValue = in.TargetValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_ObjectMetricStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_ObjectMetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ObjectMetricStatus)
+ out := out.(*ObjectMetricStatus)
+ *out = *in
+ out.CurrentValue = in.CurrentValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodsMetricSource is an autogenerated deepcopy function.
+func DeepCopy_v1_PodsMetricSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodsMetricSource)
+ out := out.(*PodsMetricSource)
+ *out = *in
+ out.TargetAverageValue = in.TargetAverageValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_PodsMetricStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_PodsMetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodsMetricStatus)
+ out := out.(*PodsMetricStatus)
+ *out = *in
+ out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_ResourceMetricSource is an autogenerated deepcopy function.
+func DeepCopy_v1_ResourceMetricSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceMetricSource)
+ out := out.(*ResourceMetricSource)
+ *out = *in
+ if in.TargetAverageUtilization != nil {
+ in, out := &in.TargetAverageUtilization, &out.TargetAverageUtilization
+ *out = new(int32)
+ **out = **in
+ }
+ if in.TargetAverageValue != nil {
+ in, out := &in.TargetAverageValue, &out.TargetAverageValue
+ *out = new(resource.Quantity)
+ **out = (*in).DeepCopy()
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ResourceMetricStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_ResourceMetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceMetricStatus)
+ out := out.(*ResourceMetricStatus)
+ *out = *in
+ if in.CurrentAverageUtilization != nil {
+ in, out := &in.CurrentAverageUtilization, &out.CurrentAverageUtilization
+ *out = new(int32)
+ **out = **in
+ }
+ out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_Scale is an autogenerated deepcopy function.
+func DeepCopy_v1_Scale(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Scale)
+ out := out.(*Scale)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_ScaleSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_ScaleSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ScaleSpec)
+ out := out.(*ScaleSpec)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1_ScaleStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_ScaleStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ScaleStatus)
+ out := out.(*ScaleStatus)
+ *out = *in
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/zz_generated.defaults.go
new file mode 100644
index 000000000..af20e9884
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/zz_generated.defaults.go
@@ -0,0 +1,47 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ scheme.AddTypeDefaultingFunc(&HorizontalPodAutoscaler{}, func(obj interface{}) { SetObjectDefaults_HorizontalPodAutoscaler(obj.(*HorizontalPodAutoscaler)) })
+ scheme.AddTypeDefaultingFunc(&HorizontalPodAutoscalerList{}, func(obj interface{}) {
+ SetObjectDefaults_HorizontalPodAutoscalerList(obj.(*HorizontalPodAutoscalerList))
+ })
+ return nil
+}
+
+func SetObjectDefaults_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler) {
+ SetDefaults_HorizontalPodAutoscaler(in)
+}
+
+func SetObjectDefaults_HorizontalPodAutoscalerList(in *HorizontalPodAutoscalerList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_HorizontalPodAutoscaler(a)
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/defaults.go
new file mode 100644
index 000000000..3d75ca299
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/defaults.go
@@ -0,0 +1,47 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/apis/autoscaling"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
+
+func SetDefaults_HorizontalPodAutoscaler(obj *HorizontalPodAutoscaler) {
+ if obj.Spec.MinReplicas == nil {
+ minReplicas := int32(1)
+ obj.Spec.MinReplicas = &minReplicas
+ }
+
+ if len(obj.Spec.Metrics) == 0 {
+ utilizationDefaultVal := int32(autoscaling.DefaultCPUUtilization)
+ obj.Spec.Metrics = []MetricSpec{
+ {
+ Type: ResourceMetricSourceType,
+ Resource: &ResourceMetricSource{
+ Name: v1.ResourceCPU,
+ TargetAverageUtilization: &utilizationDefaultVal,
+ },
+ },
+ }
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/doc.go
new file mode 100644
index 000000000..21ffc415e
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/doc.go
@@ -0,0 +1,22 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/autoscaling
+// +k8s:openapi-gen=true
+// +k8s:defaulter-gen=TypeMeta
+
+package v2alpha1 // import "k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/generated.pb.go
new file mode 100644
index 000000000..65e4b9193
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/generated.pb.go
@@ -0,0 +1,3401 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v2alpha1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/generated.proto
+
+ It has these top-level messages:
+ CrossVersionObjectReference
+ HorizontalPodAutoscaler
+ HorizontalPodAutoscalerCondition
+ HorizontalPodAutoscalerList
+ HorizontalPodAutoscalerSpec
+ HorizontalPodAutoscalerStatus
+ MetricSpec
+ MetricStatus
+ ObjectMetricSource
+ ObjectMetricStatus
+ PodsMetricSource
+ PodsMetricStatus
+ ResourceMetricSource
+ ResourceMetricStatus
+*/
+package v2alpha1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_apimachinery_pkg_api_resource "k8s.io/apimachinery/pkg/api/resource"
+import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+import k8s_io_kubernetes_pkg_api_v1 "k8s.io/kubernetes/pkg/api/v1"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} }
+func (*CrossVersionObjectReference) ProtoMessage() {}
+func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{0}
+}
+
+func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} }
+func (*HorizontalPodAutoscaler) ProtoMessage() {}
+func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} }
+func (*HorizontalPodAutoscalerCondition) ProtoMessage() {}
+func (*HorizontalPodAutoscalerCondition) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{2}
+}
+
+func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} }
+func (*HorizontalPodAutoscalerList) ProtoMessage() {}
+func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{3}
+}
+
+func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} }
+func (*HorizontalPodAutoscalerSpec) ProtoMessage() {}
+func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{4}
+}
+
+func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} }
+func (*HorizontalPodAutoscalerStatus) ProtoMessage() {}
+func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{5}
+}
+
+func (m *MetricSpec) Reset() { *m = MetricSpec{} }
+func (*MetricSpec) ProtoMessage() {}
+func (*MetricSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
+
+func (m *MetricStatus) Reset() { *m = MetricStatus{} }
+func (*MetricStatus) ProtoMessage() {}
+func (*MetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
+
+func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} }
+func (*ObjectMetricSource) ProtoMessage() {}
+func (*ObjectMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
+
+func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} }
+func (*ObjectMetricStatus) ProtoMessage() {}
+func (*ObjectMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
+
+func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} }
+func (*PodsMetricSource) ProtoMessage() {}
+func (*PodsMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
+
+func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} }
+func (*PodsMetricStatus) ProtoMessage() {}
+func (*PodsMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} }
+
+func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} }
+func (*ResourceMetricSource) ProtoMessage() {}
+func (*ResourceMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} }
+
+func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} }
+func (*ResourceMetricStatus) ProtoMessage() {}
+func (*ResourceMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} }
+
+func init() {
+ proto.RegisterType((*CrossVersionObjectReference)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v2alpha1.CrossVersionObjectReference")
+ proto.RegisterType((*HorizontalPodAutoscaler)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v2alpha1.HorizontalPodAutoscaler")
+ proto.RegisterType((*HorizontalPodAutoscalerCondition)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v2alpha1.HorizontalPodAutoscalerCondition")
+ proto.RegisterType((*HorizontalPodAutoscalerList)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v2alpha1.HorizontalPodAutoscalerList")
+ proto.RegisterType((*HorizontalPodAutoscalerSpec)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v2alpha1.HorizontalPodAutoscalerSpec")
+ proto.RegisterType((*HorizontalPodAutoscalerStatus)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v2alpha1.HorizontalPodAutoscalerStatus")
+ proto.RegisterType((*MetricSpec)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v2alpha1.MetricSpec")
+ proto.RegisterType((*MetricStatus)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v2alpha1.MetricStatus")
+ proto.RegisterType((*ObjectMetricSource)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v2alpha1.ObjectMetricSource")
+ proto.RegisterType((*ObjectMetricStatus)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v2alpha1.ObjectMetricStatus")
+ proto.RegisterType((*PodsMetricSource)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v2alpha1.PodsMetricSource")
+ proto.RegisterType((*PodsMetricStatus)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v2alpha1.PodsMetricStatus")
+ proto.RegisterType((*ResourceMetricSource)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v2alpha1.ResourceMetricSource")
+ proto.RegisterType((*ResourceMetricStatus)(nil), "k8s.io.kubernetes.pkg.apis.autoscaling.v2alpha1.ResourceMetricStatus")
+}
+func (m *CrossVersionObjectReference) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CrossVersionObjectReference) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
+ i += copy(dAtA[i:], m.Kind)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion)))
+ i += copy(dAtA[i:], m.APIVersion)
+ return i, nil
+}
+
+func (m *HorizontalPodAutoscaler) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HorizontalPodAutoscaler) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n2, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n3, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ return i, nil
+}
+
+func (m *HorizontalPodAutoscalerCondition) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HorizontalPodAutoscalerCondition) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
+ i += copy(dAtA[i:], m.Status)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
+ n4, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ return i, nil
+}
+
+func (m *HorizontalPodAutoscalerList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HorizontalPodAutoscalerList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n5, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *HorizontalPodAutoscalerSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HorizontalPodAutoscalerSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ScaleTargetRef.Size()))
+ n6, err := m.ScaleTargetRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ if m.MinReplicas != nil {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.MinReplicas))
+ }
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.MaxReplicas))
+ if len(m.Metrics) > 0 {
+ for _, msg := range m.Metrics {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *HorizontalPodAutoscalerStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HorizontalPodAutoscalerStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.ObservedGeneration != nil {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.ObservedGeneration))
+ }
+ if m.LastScaleTime != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastScaleTime.Size()))
+ n7, err := m.LastScaleTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ }
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentReplicas))
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.DesiredReplicas))
+ if len(m.CurrentMetrics) > 0 {
+ for _, msg := range m.CurrentMetrics {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Conditions) > 0 {
+ for _, msg := range m.Conditions {
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *MetricSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *MetricSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ if m.Object != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Object.Size()))
+ n8, err := m.Object.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n8
+ }
+ if m.Pods != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Pods.Size()))
+ n9, err := m.Pods.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n9
+ }
+ if m.Resource != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Resource.Size()))
+ n10, err := m.Resource.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n10
+ }
+ return i, nil
+}
+
+func (m *MetricStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *MetricStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ if m.Object != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Object.Size()))
+ n11, err := m.Object.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n11
+ }
+ if m.Pods != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Pods.Size()))
+ n12, err := m.Pods.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n12
+ }
+ if m.Resource != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Resource.Size()))
+ n13, err := m.Resource.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n13
+ }
+ return i, nil
+}
+
+func (m *ObjectMetricSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ObjectMetricSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Target.Size()))
+ n14, err := m.Target.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n14
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
+ i += copy(dAtA[i:], m.MetricName)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.TargetValue.Size()))
+ n15, err := m.TargetValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n15
+ return i, nil
+}
+
+func (m *ObjectMetricStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ObjectMetricStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Target.Size()))
+ n16, err := m.Target.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n16
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
+ i += copy(dAtA[i:], m.MetricName)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentValue.Size()))
+ n17, err := m.CurrentValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n17
+ return i, nil
+}
+
+func (m *PodsMetricSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodsMetricSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
+ i += copy(dAtA[i:], m.MetricName)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.TargetAverageValue.Size()))
+ n18, err := m.TargetAverageValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n18
+ return i, nil
+}
+
+func (m *PodsMetricStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodsMetricStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName)))
+ i += copy(dAtA[i:], m.MetricName)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentAverageValue.Size()))
+ n19, err := m.CurrentAverageValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n19
+ return i, nil
+}
+
+func (m *ResourceMetricSource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceMetricSource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ if m.TargetAverageUtilization != nil {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.TargetAverageUtilization))
+ }
+ if m.TargetAverageValue != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.TargetAverageValue.Size()))
+ n20, err := m.TargetAverageValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n20
+ }
+ return i, nil
+}
+
+func (m *ResourceMetricStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceMetricStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ if m.CurrentAverageUtilization != nil {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.CurrentAverageUtilization))
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentAverageValue.Size()))
+ n21, err := m.CurrentAverageValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n21
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *CrossVersionObjectReference) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Kind)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.APIVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *HorizontalPodAutoscaler) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *HorizontalPodAutoscalerCondition) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Status)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastTransitionTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *HorizontalPodAutoscalerList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *HorizontalPodAutoscalerSpec) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ScaleTargetRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.MinReplicas != nil {
+ n += 1 + sovGenerated(uint64(*m.MinReplicas))
+ }
+ n += 1 + sovGenerated(uint64(m.MaxReplicas))
+ if len(m.Metrics) > 0 {
+ for _, e := range m.Metrics {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *HorizontalPodAutoscalerStatus) Size() (n int) {
+ var l int
+ _ = l
+ if m.ObservedGeneration != nil {
+ n += 1 + sovGenerated(uint64(*m.ObservedGeneration))
+ }
+ if m.LastScaleTime != nil {
+ l = m.LastScaleTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ n += 1 + sovGenerated(uint64(m.CurrentReplicas))
+ n += 1 + sovGenerated(uint64(m.DesiredReplicas))
+ if len(m.CurrentMetrics) > 0 {
+ for _, e := range m.CurrentMetrics {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Conditions) > 0 {
+ for _, e := range m.Conditions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *MetricSpec) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Object != nil {
+ l = m.Object.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Pods != nil {
+ l = m.Pods.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Resource != nil {
+ l = m.Resource.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *MetricStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Object != nil {
+ l = m.Object.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Pods != nil {
+ l = m.Pods.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Resource != nil {
+ l = m.Resource.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *ObjectMetricSource) Size() (n int) {
+ var l int
+ _ = l
+ l = m.Target.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.MetricName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.TargetValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ObjectMetricStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = m.Target.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.MetricName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.CurrentValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodsMetricSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.MetricName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.TargetAverageValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodsMetricStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.MetricName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.CurrentAverageValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ResourceMetricSource) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.TargetAverageUtilization != nil {
+ n += 1 + sovGenerated(uint64(*m.TargetAverageUtilization))
+ }
+ if m.TargetAverageValue != nil {
+ l = m.TargetAverageValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *ResourceMetricStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.CurrentAverageUtilization != nil {
+ n += 1 + sovGenerated(uint64(*m.CurrentAverageUtilization))
+ }
+ l = m.CurrentAverageValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *CrossVersionObjectReference) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CrossVersionObjectReference{`,
+ `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HorizontalPodAutoscaler) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HorizontalPodAutoscaler{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "HorizontalPodAutoscalerSpec", "HorizontalPodAutoscalerSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "HorizontalPodAutoscalerStatus", "HorizontalPodAutoscalerStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HorizontalPodAutoscalerCondition) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HorizontalPodAutoscalerCondition{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
+ `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HorizontalPodAutoscalerList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HorizontalPodAutoscalerList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "HorizontalPodAutoscaler", "HorizontalPodAutoscaler", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HorizontalPodAutoscalerSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HorizontalPodAutoscalerSpec{`,
+ `ScaleTargetRef:` + strings.Replace(strings.Replace(this.ScaleTargetRef.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`,
+ `MinReplicas:` + valueToStringGenerated(this.MinReplicas) + `,`,
+ `MaxReplicas:` + fmt.Sprintf("%v", this.MaxReplicas) + `,`,
+ `Metrics:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Metrics), "MetricSpec", "MetricSpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HorizontalPodAutoscalerStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HorizontalPodAutoscalerStatus{`,
+ `ObservedGeneration:` + valueToStringGenerated(this.ObservedGeneration) + `,`,
+ `LastScaleTime:` + strings.Replace(fmt.Sprintf("%v", this.LastScaleTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`,
+ `CurrentReplicas:` + fmt.Sprintf("%v", this.CurrentReplicas) + `,`,
+ `DesiredReplicas:` + fmt.Sprintf("%v", this.DesiredReplicas) + `,`,
+ `CurrentMetrics:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.CurrentMetrics), "MetricStatus", "MetricStatus", 1), `&`, ``, 1) + `,`,
+ `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "HorizontalPodAutoscalerCondition", "HorizontalPodAutoscalerCondition", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *MetricSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&MetricSpec{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Object:` + strings.Replace(fmt.Sprintf("%v", this.Object), "ObjectMetricSource", "ObjectMetricSource", 1) + `,`,
+ `Pods:` + strings.Replace(fmt.Sprintf("%v", this.Pods), "PodsMetricSource", "PodsMetricSource", 1) + `,`,
+ `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "ResourceMetricSource", "ResourceMetricSource", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *MetricStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&MetricStatus{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Object:` + strings.Replace(fmt.Sprintf("%v", this.Object), "ObjectMetricStatus", "ObjectMetricStatus", 1) + `,`,
+ `Pods:` + strings.Replace(fmt.Sprintf("%v", this.Pods), "PodsMetricStatus", "PodsMetricStatus", 1) + `,`,
+ `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "ResourceMetricStatus", "ResourceMetricStatus", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ObjectMetricSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ObjectMetricSource{`,
+ `Target:` + strings.Replace(strings.Replace(this.Target.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`,
+ `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
+ `TargetValue:` + strings.Replace(strings.Replace(this.TargetValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ObjectMetricStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ObjectMetricStatus{`,
+ `Target:` + strings.Replace(strings.Replace(this.Target.String(), "CrossVersionObjectReference", "CrossVersionObjectReference", 1), `&`, ``, 1) + `,`,
+ `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
+ `CurrentValue:` + strings.Replace(strings.Replace(this.CurrentValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodsMetricSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodsMetricSource{`,
+ `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
+ `TargetAverageValue:` + strings.Replace(strings.Replace(this.TargetAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodsMetricStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodsMetricStatus{`,
+ `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`,
+ `CurrentAverageValue:` + strings.Replace(strings.Replace(this.CurrentAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceMetricSource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ResourceMetricSource{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `TargetAverageUtilization:` + valueToStringGenerated(this.TargetAverageUtilization) + `,`,
+ `TargetAverageValue:` + strings.Replace(fmt.Sprintf("%v", this.TargetAverageValue), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ResourceMetricStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ResourceMetricStatus{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `CurrentAverageUtilization:` + valueToStringGenerated(this.CurrentAverageUtilization) + `,`,
+ `CurrentAverageValue:` + strings.Replace(strings.Replace(this.CurrentAverageValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *CrossVersionObjectReference) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CrossVersionObjectReference: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CrossVersionObjectReference: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Kind = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HorizontalPodAutoscaler) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HorizontalPodAutoscaler: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HorizontalPodAutoscaler: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HorizontalPodAutoscalerCondition) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerCondition: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerCondition: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = HorizontalPodAutoscalerConditionType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Status = k8s_io_kubernetes_pkg_api_v1.ConditionStatus(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HorizontalPodAutoscalerList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, HorizontalPodAutoscaler{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HorizontalPodAutoscalerSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ScaleTargetRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ScaleTargetRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MinReplicas", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.MinReplicas = &v
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MaxReplicas", wireType)
+ }
+ m.MaxReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.MaxReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Metrics = append(m.Metrics, MetricSpec{})
+ if err := m.Metrics[len(m.Metrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HorizontalPodAutoscalerStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HorizontalPodAutoscalerStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ObservedGeneration = &v
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastScaleTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.LastScaleTime == nil {
+ m.LastScaleTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{}
+ }
+ if err := m.LastScaleTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentReplicas", wireType)
+ }
+ m.CurrentReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.CurrentReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DesiredReplicas", wireType)
+ }
+ m.DesiredReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.DesiredReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentMetrics", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.CurrentMetrics = append(m.CurrentMetrics, MetricStatus{})
+ if err := m.CurrentMetrics[len(m.CurrentMetrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Conditions = append(m.Conditions, HorizontalPodAutoscalerCondition{})
+ if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *MetricSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: MetricSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MetricSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = MetricSourceType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Object == nil {
+ m.Object = &ObjectMetricSource{}
+ }
+ if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Pods", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Pods == nil {
+ m.Pods = &PodsMetricSource{}
+ }
+ if err := m.Pods.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Resource == nil {
+ m.Resource = &ResourceMetricSource{}
+ }
+ if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *MetricStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: MetricStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = MetricSourceType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Object == nil {
+ m.Object = &ObjectMetricStatus{}
+ }
+ if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Pods", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Pods == nil {
+ m.Pods = &PodsMetricStatus{}
+ }
+ if err := m.Pods.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Resource == nil {
+ m.Resource = &ResourceMetricStatus{}
+ }
+ if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ObjectMetricSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ObjectMetricSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ObjectMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MetricName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.TargetValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ObjectMetricStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ObjectMetricStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ObjectMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MetricName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.CurrentValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodsMetricSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodsMetricSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodsMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MetricName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.TargetAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodsMetricStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodsMetricStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodsMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MetricName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.CurrentAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceMetricSource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceMetricSource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceMetricSource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = k8s_io_kubernetes_pkg_api_v1.ResourceName(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageUtilization", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.TargetAverageUtilization = &v
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.TargetAverageValue == nil {
+ m.TargetAverageValue = &k8s_io_apimachinery_pkg_api_resource.Quantity{}
+ }
+ if err := m.TargetAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResourceMetricStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResourceMetricStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResourceMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = k8s_io_kubernetes_pkg_api_v1.ResourceName(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageUtilization", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.CurrentAverageUtilization = &v
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.CurrentAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 1323 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0x5b, 0x6f, 0x1b, 0x45,
+ 0x14, 0xce, 0x3a, 0x4e, 0x1a, 0xc6, 0x69, 0x52, 0xa6, 0x55, 0xeb, 0xa6, 0xd4, 0x8e, 0x56, 0x08,
+ 0xb5, 0x08, 0x76, 0xa9, 0x29, 0x08, 0x84, 0x00, 0xc5, 0xe6, 0xd2, 0x8a, 0xb8, 0x97, 0x69, 0xa8,
+ 0x10, 0x20, 0xc1, 0x64, 0x3d, 0x75, 0x86, 0x78, 0x2f, 0xda, 0x19, 0x5b, 0xa4, 0x52, 0x25, 0x5e,
+ 0x78, 0x43, 0x82, 0x17, 0x7e, 0x02, 0x12, 0xff, 0x80, 0x67, 0x90, 0x90, 0xfa, 0xd8, 0xc7, 0xf2,
+ 0x62, 0x51, 0xf7, 0x8d, 0x9f, 0x50, 0x89, 0x8b, 0xe6, 0xb2, 0x37, 0xaf, 0xd7, 0xad, 0x43, 0x5a,
+ 0xc1, 0x9b, 0x3d, 0x73, 0xce, 0xf7, 0x9d, 0xcb, 0x37, 0x67, 0x66, 0xc1, 0xdb, 0xbb, 0xaf, 0x31,
+ 0x8b, 0xfa, 0xf6, 0x6e, 0x7f, 0x9b, 0x84, 0x1e, 0xe1, 0x84, 0xd9, 0xc1, 0x6e, 0xd7, 0xc6, 0x01,
+ 0x65, 0x36, 0xee, 0x73, 0x9f, 0x39, 0xb8, 0x47, 0xbd, 0xae, 0x3d, 0x68, 0xe0, 0x5e, 0xb0, 0x83,
+ 0xcf, 0xd9, 0x5d, 0xe2, 0x91, 0x10, 0x73, 0xd2, 0xb1, 0x82, 0xd0, 0xe7, 0x3e, 0xb4, 0x15, 0x80,
+ 0x95, 0x00, 0x58, 0xc1, 0x6e, 0xd7, 0x12, 0x00, 0x56, 0x0a, 0xc0, 0x8a, 0x00, 0xd6, 0x5e, 0xec,
+ 0x52, 0xbe, 0xd3, 0xdf, 0xb6, 0x1c, 0xdf, 0xb5, 0xbb, 0x7e, 0xd7, 0xb7, 0x25, 0xce, 0x76, 0xff,
+ 0x86, 0xfc, 0x27, 0xff, 0xc8, 0x5f, 0x0a, 0x7f, 0xed, 0xbc, 0x0e, 0x10, 0x07, 0xd4, 0xc5, 0xce,
+ 0x0e, 0xf5, 0x48, 0xb8, 0x17, 0x85, 0x68, 0x87, 0x84, 0xf9, 0xfd, 0xd0, 0x21, 0xe3, 0x51, 0x4d,
+ 0xf5, 0x62, 0xb6, 0x4b, 0x38, 0xb6, 0x07, 0xb9, 0x5c, 0xd6, 0xec, 0x22, 0xaf, 0xb0, 0xef, 0x71,
+ 0xea, 0xe6, 0x69, 0x5e, 0x7d, 0x98, 0x03, 0x73, 0x76, 0x88, 0x8b, 0x73, 0x7e, 0x2f, 0x17, 0xf9,
+ 0xf5, 0x39, 0xed, 0xd9, 0xd4, 0xe3, 0x8c, 0x87, 0x39, 0xa7, 0x17, 0x0a, 0x5b, 0x35, 0x21, 0x17,
+ 0xf3, 0x7b, 0x03, 0x9c, 0x6a, 0x85, 0x3e, 0x63, 0xd7, 0x49, 0xc8, 0xa8, 0xef, 0x5d, 0xde, 0xfe,
+ 0x82, 0x38, 0x1c, 0x91, 0x1b, 0x24, 0x24, 0x9e, 0x43, 0xe0, 0x3a, 0x28, 0xef, 0x52, 0xaf, 0x53,
+ 0x35, 0xd6, 0x8d, 0x33, 0x4f, 0x35, 0x97, 0x6f, 0x0f, 0xeb, 0x73, 0xa3, 0x61, 0xbd, 0xfc, 0x01,
+ 0xf5, 0x3a, 0x48, 0xee, 0x08, 0x0b, 0x0f, 0xbb, 0xa4, 0x5a, 0xca, 0x5a, 0x5c, 0xc2, 0x2e, 0x41,
+ 0x72, 0x07, 0x36, 0x00, 0xc0, 0x01, 0xd5, 0x04, 0xd5, 0x79, 0x69, 0x07, 0xb5, 0x1d, 0xd8, 0xb8,
+ 0x72, 0x51, 0xef, 0xa0, 0x94, 0x95, 0x79, 0xbf, 0x04, 0x4e, 0x5c, 0xf0, 0x43, 0x7a, 0xd3, 0xf7,
+ 0x38, 0xee, 0x5d, 0xf1, 0x3b, 0x1b, 0x5a, 0x24, 0x24, 0x84, 0x9f, 0x83, 0x25, 0xd1, 0x9a, 0x0e,
+ 0xe6, 0x58, 0xc6, 0x55, 0x69, 0xbc, 0x64, 0x69, 0x79, 0xa5, 0x2b, 0x95, 0x08, 0x4c, 0x58, 0x5b,
+ 0x83, 0x73, 0x96, 0x4a, 0xae, 0x4d, 0x38, 0x4e, 0xf8, 0x93, 0x35, 0x14, 0xa3, 0x42, 0x0f, 0x94,
+ 0x59, 0x40, 0x1c, 0x99, 0x53, 0xa5, 0xb1, 0x69, 0xcd, 0x28, 0x5e, 0xab, 0x20, 0xf2, 0x6b, 0x01,
+ 0x71, 0x92, 0x0a, 0x89, 0x7f, 0x48, 0xf2, 0xc0, 0x01, 0x58, 0x64, 0x1c, 0xf3, 0x3e, 0x93, 0xd5,
+ 0xa9, 0x34, 0x2e, 0x1d, 0x18, 0xa3, 0x44, 0x6d, 0xae, 0x68, 0xce, 0x45, 0xf5, 0x1f, 0x69, 0x36,
+ 0xf3, 0xdb, 0x79, 0xb0, 0x5e, 0xe0, 0xd9, 0xf2, 0xbd, 0x0e, 0xe5, 0xd4, 0xf7, 0xe0, 0x05, 0x50,
+ 0xe6, 0x7b, 0x01, 0xd1, 0x12, 0x38, 0x1f, 0x85, 0xbf, 0xb5, 0x17, 0x90, 0x07, 0xc3, 0xfa, 0xb3,
+ 0x0f, 0xf3, 0x17, 0x76, 0x48, 0x22, 0xc0, 0xeb, 0x71, 0x9a, 0x4a, 0x2c, 0x6f, 0x65, 0xc3, 0x7a,
+ 0x30, 0xac, 0x4f, 0x15, 0xaf, 0x15, 0x63, 0x66, 0xd3, 0x80, 0x03, 0x00, 0x7b, 0x98, 0xf1, 0xad,
+ 0x10, 0x7b, 0x4c, 0x71, 0x52, 0x97, 0xe8, 0x52, 0x3e, 0xff, 0x68, 0xd2, 0x10, 0x1e, 0xcd, 0x35,
+ 0x1d, 0x0f, 0xdc, 0xcc, 0xa1, 0xa1, 0x09, 0x0c, 0xf0, 0x39, 0xb0, 0x18, 0x12, 0xcc, 0x7c, 0xaf,
+ 0x5a, 0x96, 0xf9, 0xc4, 0x65, 0x46, 0x72, 0x15, 0xe9, 0x5d, 0x78, 0x16, 0x1c, 0x72, 0x09, 0x63,
+ 0xb8, 0x4b, 0xaa, 0x0b, 0xd2, 0x70, 0x55, 0x1b, 0x1e, 0x6a, 0xab, 0x65, 0x14, 0xed, 0x9b, 0x7f,
+ 0x18, 0xe0, 0x54, 0x41, 0x45, 0x37, 0x29, 0xe3, 0xf0, 0xd3, 0x9c, 0xf6, 0xad, 0x47, 0x4b, 0x50,
+ 0x78, 0x4b, 0xe5, 0x1f, 0xd1, 0xdc, 0x4b, 0xd1, 0x4a, 0x4a, 0xf7, 0x2e, 0x58, 0xa0, 0x9c, 0xb8,
+ 0xa2, 0x3f, 0xf3, 0x67, 0x2a, 0x8d, 0x0b, 0x07, 0x25, 0xc3, 0xe6, 0x61, 0x4d, 0xba, 0x70, 0x51,
+ 0xc0, 0x23, 0xc5, 0x62, 0xfe, 0x55, 0x2a, 0x4c, 0x56, 0x1c, 0x0e, 0xf8, 0x8d, 0x01, 0x56, 0xe4,
+ 0xdf, 0x2d, 0x1c, 0x76, 0x89, 0x98, 0x4a, 0x3a, 0xe7, 0xd9, 0x4f, 0xe4, 0x94, 0x19, 0xd7, 0x3c,
+ 0xae, 0x83, 0x5b, 0xb9, 0x96, 0xe1, 0x42, 0x63, 0xdc, 0xf0, 0x1c, 0xa8, 0xb8, 0xd4, 0x43, 0x24,
+ 0xe8, 0x51, 0x07, 0x2b, 0x0d, 0x2f, 0x34, 0x57, 0x47, 0xc3, 0x7a, 0xa5, 0x9d, 0x2c, 0xa3, 0xb4,
+ 0x0d, 0x7c, 0x05, 0x54, 0x5c, 0xfc, 0x65, 0xec, 0x32, 0x2f, 0x5d, 0x8e, 0x6a, 0xbe, 0x4a, 0x3b,
+ 0xd9, 0x42, 0x69, 0x3b, 0x78, 0x43, 0x08, 0x86, 0x87, 0xd4, 0x61, 0xd5, 0xb2, 0xec, 0xc4, 0x1b,
+ 0x33, 0x27, 0xdc, 0x96, 0xfe, 0x72, 0xe2, 0xa4, 0xd4, 0x26, 0x31, 0x51, 0x04, 0x6e, 0xfe, 0x56,
+ 0x06, 0xa7, 0xa7, 0x4e, 0x0e, 0xf8, 0x1e, 0x80, 0xfe, 0x36, 0x23, 0xe1, 0x80, 0x74, 0xde, 0x57,
+ 0x57, 0x87, 0x98, 0xe1, 0xa2, 0x0b, 0xf3, 0xcd, 0xe3, 0xe2, 0xa8, 0x5c, 0xce, 0xed, 0xa2, 0x09,
+ 0x1e, 0xd0, 0x01, 0x87, 0xc5, 0x01, 0x52, 0x15, 0xa6, 0xfa, 0xba, 0x98, 0xed, 0x74, 0x3e, 0x3d,
+ 0x1a, 0xd6, 0x0f, 0x6f, 0xa6, 0x41, 0x50, 0x16, 0x13, 0x6e, 0x80, 0x55, 0xa7, 0x1f, 0x86, 0xc4,
+ 0xe3, 0x63, 0x15, 0x3f, 0xa1, 0x2b, 0xb0, 0xda, 0xca, 0x6e, 0xa3, 0x71, 0x7b, 0x01, 0xd1, 0x21,
+ 0x8c, 0x86, 0xa4, 0x13, 0x43, 0x94, 0xb3, 0x10, 0xef, 0x64, 0xb7, 0xd1, 0xb8, 0x3d, 0xbc, 0x05,
+ 0x56, 0x34, 0xaa, 0xae, 0x77, 0x75, 0x41, 0xf6, 0xf0, 0xcd, 0xfd, 0xf6, 0x50, 0xcd, 0xf0, 0x58,
+ 0xa5, 0xad, 0x0c, 0x38, 0x1a, 0x23, 0x83, 0x5f, 0x1b, 0x00, 0x38, 0xd1, 0xa0, 0x64, 0xd5, 0x45,
+ 0xc9, 0x7d, 0xf5, 0xa0, 0x4e, 0x72, 0x3c, 0x82, 0x93, 0x1b, 0x34, 0x5e, 0x62, 0x28, 0x45, 0x6c,
+ 0xfe, 0x59, 0x02, 0x20, 0x11, 0x21, 0x3c, 0x9f, 0xb9, 0x45, 0xd6, 0xc7, 0x6e, 0x91, 0x23, 0xda,
+ 0x52, 0x3e, 0xd3, 0x52, 0x37, 0x46, 0x17, 0x2c, 0xfa, 0xf2, 0xb4, 0x6a, 0xbd, 0xb4, 0x66, 0xce,
+ 0x23, 0xbe, 0xdf, 0x63, 0xf8, 0x26, 0x10, 0x23, 0x5a, 0x0f, 0x01, 0x0d, 0x0f, 0x3f, 0x03, 0xe5,
+ 0xc0, 0xef, 0x44, 0xf7, 0xef, 0xc6, 0xcc, 0x34, 0x57, 0xfc, 0x0e, 0xcb, 0x90, 0x2c, 0x89, 0xec,
+ 0xc4, 0x2a, 0x92, 0xc0, 0xd0, 0x07, 0x4b, 0xd1, 0x33, 0x54, 0x2a, 0xaa, 0xd2, 0x78, 0x77, 0x66,
+ 0x12, 0xa4, 0x01, 0x32, 0x44, 0xcb, 0x62, 0x96, 0x47, 0x3b, 0x28, 0x26, 0x31, 0xff, 0x2e, 0x81,
+ 0xe5, 0xb4, 0x80, 0xfe, 0x1b, 0x1d, 0x50, 0x5a, 0x7e, 0xcc, 0x1d, 0x50, 0x24, 0x4f, 0xa0, 0x03,
+ 0x8a, 0xa8, 0xa8, 0x03, 0x3f, 0x94, 0x00, 0xcc, 0xcb, 0x0f, 0x72, 0xb0, 0xc8, 0xe5, 0x9d, 0xf2,
+ 0x58, 0x2e, 0xb3, 0xf8, 0x0d, 0xa2, 0xef, 0x2d, 0xcd, 0x25, 0x1e, 0xe1, 0x6a, 0xea, 0x5f, 0x4a,
+ 0x1e, 0xeb, 0xf1, 0x11, 0x6e, 0xc7, 0x3b, 0x28, 0x65, 0x05, 0x09, 0xa8, 0x28, 0xef, 0xeb, 0xb8,
+ 0xd7, 0x8f, 0x1e, 0x54, 0x53, 0xdf, 0x1b, 0x56, 0x94, 0xbc, 0x75, 0xb5, 0x8f, 0x3d, 0x4e, 0xf9,
+ 0x5e, 0x72, 0xdb, 0x6d, 0x25, 0x50, 0x28, 0x8d, 0x6b, 0xfe, 0x38, 0x5e, 0x27, 0xa5, 0xd7, 0xff,
+ 0x4f, 0x9d, 0x76, 0xc0, 0xb2, 0x1e, 0xc2, 0xff, 0xa6, 0x50, 0xc7, 0x34, 0xcb, 0x72, 0x2b, 0x85,
+ 0x85, 0x32, 0xc8, 0xe6, 0x2f, 0x06, 0x38, 0x32, 0x3e, 0x6a, 0xc6, 0x42, 0x36, 0x1e, 0x29, 0xe4,
+ 0x9b, 0x00, 0xaa, 0x84, 0x37, 0x06, 0x24, 0xc4, 0x5d, 0xa2, 0x02, 0x2f, 0xed, 0x2b, 0xf0, 0xf8,
+ 0xd9, 0xbc, 0x95, 0x43, 0x44, 0x13, 0x58, 0xcc, 0x5f, 0xb3, 0x49, 0xa8, 0x6e, 0xef, 0x27, 0x89,
+ 0x5b, 0xe0, 0xa8, 0xae, 0xce, 0x01, 0x64, 0x71, 0x4a, 0x93, 0x1d, 0x6d, 0xe5, 0x21, 0xd1, 0x24,
+ 0x1e, 0xf3, 0xa7, 0x12, 0x38, 0x36, 0x69, 0x24, 0xc3, 0xb6, 0xfe, 0x24, 0x56, 0x59, 0xbc, 0x9e,
+ 0xfe, 0x24, 0x7e, 0x30, 0xac, 0x9f, 0x9d, 0xfa, 0x8d, 0x13, 0x01, 0xa6, 0xbe, 0x9f, 0x3f, 0x02,
+ 0xd5, 0x4c, 0x15, 0x3f, 0xe4, 0xb4, 0x47, 0x6f, 0xaa, 0x97, 0x98, 0x7a, 0x84, 0x3e, 0x33, 0x1a,
+ 0xd6, 0xab, 0x5b, 0x05, 0x36, 0xa8, 0xd0, 0x5b, 0x7c, 0x38, 0x4d, 0x50, 0xc1, 0xfe, 0xe4, 0x7b,
+ 0x7c, 0x06, 0x05, 0xfc, 0x9c, 0xaf, 0x9c, 0x52, 0xc1, 0x01, 0x57, 0xee, 0x13, 0x70, 0x32, 0xdb,
+ 0xb8, 0x7c, 0xe9, 0x4e, 0x8f, 0x86, 0xf5, 0x93, 0xad, 0x22, 0x23, 0x54, 0xec, 0x5f, 0xa4, 0xbe,
+ 0xf9, 0x27, 0xa3, 0xbe, 0xa6, 0x75, 0xfb, 0x5e, 0x6d, 0xee, 0xce, 0xbd, 0xda, 0xdc, 0xdd, 0x7b,
+ 0xb5, 0xb9, 0xaf, 0x46, 0x35, 0xe3, 0xf6, 0xa8, 0x66, 0xdc, 0x19, 0xd5, 0x8c, 0xbb, 0xa3, 0x9a,
+ 0xf1, 0xfb, 0xa8, 0x66, 0x7c, 0x77, 0xbf, 0x36, 0xf7, 0xf1, 0x52, 0x34, 0x0c, 0xff, 0x09, 0x00,
+ 0x00, 0xff, 0xff, 0x88, 0x5a, 0x1f, 0xc3, 0xc3, 0x13, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/generated.proto
new file mode 100644
index 000000000..c2223a118
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/generated.proto
@@ -0,0 +1,301 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.pkg.apis.autoscaling.v2alpha1;
+
+import "k8s.io/apimachinery/pkg/api/resource/generated.proto";
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v2alpha1";
+
+// CrossVersionObjectReference contains enough information to let you identify the referred resource.
+message CrossVersionObjectReference {
+ // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"
+ optional string kind = 1;
+
+ // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
+ optional string name = 2;
+
+ // API version of the referent
+ // +optional
+ optional string apiVersion = 3;
+}
+
+// HorizontalPodAutoscaler is the configuration for a horizontal pod
+// autoscaler, which automatically manages the replica count of any resource
+// implementing the scale subresource based on the metrics specified.
+message HorizontalPodAutoscaler {
+ // metadata is the standard object metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // spec is the specification for the behaviour of the autoscaler.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
+ // +optional
+ optional HorizontalPodAutoscalerSpec spec = 2;
+
+ // status is the current information about the autoscaler.
+ // +optional
+ optional HorizontalPodAutoscalerStatus status = 3;
+}
+
+// HorizontalPodAutoscalerCondition describes the state of
+// a HorizontalPodAutoscaler at a certain point.
+message HorizontalPodAutoscalerCondition {
+ // type describes the current condition
+ optional string type = 1;
+
+ // status is the status of the condition (True, False, Unknown)
+ optional string status = 2;
+
+ // lastTransitionTime is the last time the condition transitioned from
+ // one status to another
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
+
+ // reason is the reason for the condition's last transition.
+ // +optional
+ optional string reason = 4;
+
+ // message is a human-readable explanation containing details about
+ // the transition
+ // +optional
+ optional string message = 5;
+}
+
+// HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.
+message HorizontalPodAutoscalerList {
+ // metadata is the standard list metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // items is the list of horizontal pod autoscaler objects.
+ repeated HorizontalPodAutoscaler items = 2;
+}
+
+// HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.
+message HorizontalPodAutoscalerSpec {
+ // scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics
+ // should be collected, as well as to actually change the replica count.
+ optional CrossVersionObjectReference scaleTargetRef = 1;
+
+ // minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down.
+ // It defaults to 1 pod.
+ // +optional
+ optional int32 minReplicas = 2;
+
+ // maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.
+ // It cannot be less that minReplicas.
+ optional int32 maxReplicas = 3;
+
+ // metrics contains the specifications for which to use to calculate the
+ // desired replica count (the maximum replica count across all metrics will
+ // be used). The desired replica count is calculated multiplying the
+ // ratio between the target value and the current value by the current
+ // number of pods. Ergo, metrics used must decrease as the pod count is
+ // increased, and vice-versa. See the individual metric source types for
+ // more information about how each type of metric must respond.
+ // +optional
+ repeated MetricSpec metrics = 4;
+}
+
+// HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.
+message HorizontalPodAutoscalerStatus {
+ // observedGeneration is the most recent generation observed by this autoscaler.
+ // +optional
+ optional int64 observedGeneration = 1;
+
+ // lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods,
+ // used by the autoscaler to control how often the number of pods is changed.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScaleTime = 2;
+
+ // currentReplicas is current number of replicas of pods managed by this autoscaler,
+ // as last seen by the autoscaler.
+ optional int32 currentReplicas = 3;
+
+ // desiredReplicas is the desired number of replicas of pods managed by this autoscaler,
+ // as last calculated by the autoscaler.
+ optional int32 desiredReplicas = 4;
+
+ // currentMetrics is the last read state of the metrics used by this autoscaler.
+ repeated MetricStatus currentMetrics = 5;
+
+ // conditions is the set of conditions required for this autoscaler to scale its target,
+ // and indicates whether or not those conditions are met.
+ repeated HorizontalPodAutoscalerCondition conditions = 6;
+}
+
+// MetricSpec specifies how to scale based on a single metric
+// (only `type` and one other matching field should be set at once).
+message MetricSpec {
+ // type is the type of metric source. It should match one of the fields below.
+ optional string type = 1;
+
+ // object refers to a metric describing a single kubernetes object
+ // (for example, hits-per-second on an Ingress object).
+ // +optional
+ optional ObjectMetricSource object = 2;
+
+ // pods refers to a metric describing each pod in the current scale target
+ // (for example, transactions-processed-per-second). The values will be
+ // averaged together before being compared to the target value.
+ // +optional
+ optional PodsMetricSource pods = 3;
+
+ // resource refers to a resource metric (such as those specified in
+ // requests and limits) known to Kubernetes describing each pod in the
+ // current scale target (e.g. CPU or memory). Such metrics are built in to
+ // Kubernetes, and have special scaling options on top of those available
+ // to normal per-pod metrics using the "pods" source.
+ // +optional
+ optional ResourceMetricSource resource = 4;
+}
+
+// MetricStatus describes the last-read state of a single metric.
+message MetricStatus {
+ // type is the type of metric source. It will match one of the fields below.
+ optional string type = 1;
+
+ // object refers to a metric describing a single kubernetes object
+ // (for example, hits-per-second on an Ingress object).
+ // +optional
+ optional ObjectMetricStatus object = 2;
+
+ // pods refers to a metric describing each pod in the current scale target
+ // (for example, transactions-processed-per-second). The values will be
+ // averaged together before being compared to the target value.
+ // +optional
+ optional PodsMetricStatus pods = 3;
+
+ // resource refers to a resource metric (such as those specified in
+ // requests and limits) known to Kubernetes describing each pod in the
+ // current scale target (e.g. CPU or memory). Such metrics are built in to
+ // Kubernetes, and have special scaling options on top of those available
+ // to normal per-pod metrics using the "pods" source.
+ // +optional
+ optional ResourceMetricStatus resource = 4;
+}
+
+// ObjectMetricSource indicates how to scale on a metric describing a
+// kubernetes object (for example, hits-per-second on an Ingress object).
+message ObjectMetricSource {
+ // target is the described Kubernetes object.
+ optional CrossVersionObjectReference target = 1;
+
+ // metricName is the name of the metric in question.
+ optional string metricName = 2;
+
+ // targetValue is the target value of the metric (as a quantity).
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;
+}
+
+// ObjectMetricStatus indicates the current value of a metric describing a
+// kubernetes object (for example, hits-per-second on an Ingress object).
+message ObjectMetricStatus {
+ // target is the described Kubernetes object.
+ optional CrossVersionObjectReference target = 1;
+
+ // metricName is the name of the metric in question.
+ optional string metricName = 2;
+
+ // currentValue is the current value of the metric (as a quantity).
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;
+}
+
+// PodsMetricSource indicates how to scale on a metric describing each pod in
+// the current scale target (for example, transactions-processed-per-second).
+// The values will be averaged together before being compared to the target
+// value.
+message PodsMetricSource {
+ // metricName is the name of the metric in question
+ optional string metricName = 1;
+
+ // targetAverageValue is the target value of the average of the
+ // metric across all relevant pods (as a quantity)
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2;
+}
+
+// PodsMetricStatus indicates the current value of a metric describing each pod in
+// the current scale target (for example, transactions-processed-per-second).
+message PodsMetricStatus {
+ // metricName is the name of the metric in question
+ optional string metricName = 1;
+
+ // currentAverageValue is the current value of the average of the
+ // metric across all relevant pods (as a quantity)
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2;
+}
+
+// ResourceMetricSource indicates how to scale on a resource metric known to
+// Kubernetes, as specified in requests and limits, describing each pod in the
+// current scale target (e.g. CPU or memory). The values will be averaged
+// together before being compared to the target. Such metrics are built in to
+// Kubernetes, and have special scaling options on top of those available to
+// normal per-pod metrics using the "pods" source. Only one "target" type
+// should be set.
+message ResourceMetricSource {
+ // name is the name of the resource in question.
+ optional string name = 1;
+
+ // targetAverageUtilization is the target value of the average of the
+ // resource metric across all relevant pods, represented as a percentage of
+ // the requested value of the resource for the pods.
+ // +optional
+ optional int32 targetAverageUtilization = 2;
+
+ // targetAverageValue is the target value of the average of the
+ // resource metric across all relevant pods, as a raw value (instead of as
+ // a percentage of the request), similar to the "pods" metric source type.
+ // +optional
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;
+}
+
+// ResourceMetricStatus indicates the current value of a resource metric known to
+// Kubernetes, as specified in requests and limits, describing each pod in the
+// current scale target (e.g. CPU or memory). Such metrics are built in to
+// Kubernetes, and have special scaling options on top of those available to
+// normal per-pod metrics using the "pods" source.
+message ResourceMetricStatus {
+ // name is the name of the resource in question.
+ optional string name = 1;
+
+ // currentAverageUtilization is the current value of the average of the
+ // resource metric across all relevant pods, represented as a percentage of
+ // the requested value of the resource for the pods. It will only be
+ // present if `targetAverageValue` was set in the corresponding metric
+ // specification.
+ // +optional
+ optional int32 currentAverageUtilization = 2;
+
+ // currentAverageValue is the current value of the average of the
+ // resource metric across all relevant pods, as a raw value (instead of as
+ // a percentage of the request), similar to the "pods" metric source type.
+ // It will always be set, regardless of the corresponding metric specification.
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
+}
+
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/register.go
new file mode 100644
index 000000000..e623be7e3
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/register.go
@@ -0,0 +1,59 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "autoscaling"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v2alpha1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &HorizontalPodAutoscaler{},
+ &HorizontalPodAutoscalerList{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/types.generated.go
new file mode 100644
index 000000000..9beb47482
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/types.generated.go
@@ -0,0 +1,5218 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v2alpha1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg1_resource "k8s.io/apimachinery/pkg/api/resource"
+ pkg3_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ pkg4_types "k8s.io/apimachinery/pkg/types"
+ pkg2_v1 "k8s.io/kubernetes/pkg/api/v1"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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 pkg1_resource.Quantity
+ var v1 pkg3_v1.Time
+ var v2 pkg4_types.UID
+ var v3 pkg2_v1.ResourceName
+ var v4 time.Time
+ _, _, _, _, _ = v0, v1, v2, v3, v4
+ }
+}
+
+func (x *CrossVersionObjectReference) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = x.APIVersion != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(3)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CrossVersionObjectReference) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CrossVersionObjectReference) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv6 := &x.Name
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "apiVersion":
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv8 := &x.APIVersion
+ 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_containerMapEnd1234)
+}
+
+func (x *CrossVersionObjectReference) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv11 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv13 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv15 := &x.APIVersion
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *HorizontalPodAutoscalerSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.MinReplicas != nil
+ yyq2[3] = len(x.Metrics) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy4 := &x.ScaleTargetRef
+ yy4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("scaleTargetRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.ScaleTargetRef
+ yy6.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.MinReplicas == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.MinReplicas
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(yy9))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("minReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.MinReplicas == nil {
+ r.EncodeNil()
+ } else {
+ yy11 := *x.MinReplicas
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeInt(int64(yy11))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MaxReplicas))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("maxReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MaxReplicas))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Metrics == nil {
+ r.EncodeNil()
+ } else {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ h.encSliceMetricSpec(([]MetricSpec)(x.Metrics), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metrics"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Metrics == nil {
+ r.EncodeNil()
+ } else {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ h.encSliceMetricSpec(([]MetricSpec)(x.Metrics), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "scaleTargetRef":
+ if r.TryDecodeAsNil() {
+ x.ScaleTargetRef = CrossVersionObjectReference{}
+ } else {
+ yyv4 := &x.ScaleTargetRef
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "minReplicas":
+ if r.TryDecodeAsNil() {
+ if x.MinReplicas != nil {
+ x.MinReplicas = nil
+ }
+ } else {
+ if x.MinReplicas == nil {
+ x.MinReplicas = new(int32)
+ }
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*int32)(x.MinReplicas)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "maxReplicas":
+ if r.TryDecodeAsNil() {
+ x.MaxReplicas = 0
+ } else {
+ yyv7 := &x.MaxReplicas
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*int32)(yyv7)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "metrics":
+ if r.TryDecodeAsNil() {
+ x.Metrics = nil
+ } else {
+ yyv9 := &x.Metrics
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceMetricSpec((*[]MetricSpec)(yyv9), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HorizontalPodAutoscalerSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ScaleTargetRef = CrossVersionObjectReference{}
+ } else {
+ yyv12 := &x.ScaleTargetRef
+ yyv12.CodecDecodeSelf(d)
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.MinReplicas != nil {
+ x.MinReplicas = nil
+ }
+ } else {
+ if x.MinReplicas == nil {
+ x.MinReplicas = new(int32)
+ }
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ *((*int32)(x.MinReplicas)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MaxReplicas = 0
+ } else {
+ yyv15 := &x.MaxReplicas
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*int32)(yyv15)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Metrics = nil
+ } else {
+ yyv17 := &x.Metrics
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ h.decSliceMetricSpec((*[]MetricSpec)(yyv17), d)
+ }
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x MetricSourceType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *MetricSourceType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *MetricSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.Object != nil
+ yyq2[2] = x.Pods != nil
+ yyq2[3] = x.Resource != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Object == nil {
+ r.EncodeNil()
+ } else {
+ x.Object.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("object"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Object == nil {
+ r.EncodeNil()
+ } else {
+ x.Object.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Pods == nil {
+ r.EncodeNil()
+ } else {
+ x.Pods.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("pods"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Pods == nil {
+ r.EncodeNil()
+ } else {
+ x.Pods.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Resource == nil {
+ r.EncodeNil()
+ } else {
+ x.Resource.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resource"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Resource == nil {
+ r.EncodeNil()
+ } else {
+ x.Resource.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *MetricSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *MetricSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "object":
+ if r.TryDecodeAsNil() {
+ if x.Object != nil {
+ x.Object = nil
+ }
+ } else {
+ if x.Object == nil {
+ x.Object = new(ObjectMetricSource)
+ }
+ x.Object.CodecDecodeSelf(d)
+ }
+ case "pods":
+ if r.TryDecodeAsNil() {
+ if x.Pods != nil {
+ x.Pods = nil
+ }
+ } else {
+ if x.Pods == nil {
+ x.Pods = new(PodsMetricSource)
+ }
+ x.Pods.CodecDecodeSelf(d)
+ }
+ case "resource":
+ if r.TryDecodeAsNil() {
+ if x.Resource != nil {
+ x.Resource = nil
+ }
+ } else {
+ if x.Resource == nil {
+ x.Resource = new(ResourceMetricSource)
+ }
+ x.Resource.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *MetricSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv9 := &x.Type
+ yyv9.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Object != nil {
+ x.Object = nil
+ }
+ } else {
+ if x.Object == nil {
+ x.Object = new(ObjectMetricSource)
+ }
+ x.Object.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Pods != nil {
+ x.Pods = nil
+ }
+ } else {
+ if x.Pods == nil {
+ x.Pods = new(PodsMetricSource)
+ }
+ x.Pods.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Resource != nil {
+ x.Resource = nil
+ }
+ } else {
+ if x.Resource == nil {
+ x.Resource = new(ResourceMetricSource)
+ }
+ x.Resource.CodecDecodeSelf(d)
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ObjectMetricSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ yy4 := &x.Target
+ yy4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("target"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.Target
+ yy6.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metricName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy12 := &x.TargetValue
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetValue"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy14 := &x.TargetValue
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy14) {
+ } else if !yym15 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy14)
+ } else {
+ z.EncFallback(yy14)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ObjectMetricSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ObjectMetricSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "target":
+ if r.TryDecodeAsNil() {
+ x.Target = CrossVersionObjectReference{}
+ } else {
+ yyv4 := &x.Target
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "metricName":
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv5 := &x.MetricName
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*string)(yyv5)) = r.DecodeString()
+ }
+ }
+ case "targetValue":
+ if r.TryDecodeAsNil() {
+ x.TargetValue = pkg1_resource.Quantity{}
+ } else {
+ yyv7 := &x.TargetValue
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv7)
+ } else {
+ z.DecFallback(yyv7, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ObjectMetricSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Target = CrossVersionObjectReference{}
+ } else {
+ yyv10 := &x.Target
+ yyv10.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv11 := &x.MetricName
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*string)(yyv11)) = r.DecodeString()
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TargetValue = pkg1_resource.Quantity{}
+ } else {
+ yyv13 := &x.TargetValue
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv13) {
+ } else if !yym14 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv13)
+ } else {
+ z.DecFallback(yyv13, false)
+ }
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodsMetricSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metricName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy7 := &x.TargetAverageValue
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy7)
+ } else {
+ z.EncFallback(yy7)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetAverageValue"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.TargetAverageValue
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy9) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy9)
+ } else {
+ z.EncFallback(yy9)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodsMetricSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodsMetricSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "metricName":
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv4 := &x.MetricName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "targetAverageValue":
+ if r.TryDecodeAsNil() {
+ x.TargetAverageValue = pkg1_resource.Quantity{}
+ } else {
+ yyv6 := &x.TargetAverageValue
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodsMetricSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv9 := &x.MetricName
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TargetAverageValue = pkg1_resource.Quantity{}
+ } else {
+ yyv11 := &x.TargetAverageValue
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else if !yym12 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv11)
+ } else {
+ z.DecFallback(yyv11, false)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ResourceMetricSource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.TargetAverageUtilization != nil
+ yyq2[2] = x.TargetAverageValue != nil
+ 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_containerArrayElem1234)
+ yysf4 := &x.Name
+ yysf4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yysf5 := &x.Name
+ yysf5.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.TargetAverageUtilization == nil {
+ r.EncodeNil()
+ } else {
+ yy7 := *x.TargetAverageUtilization
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(yy7))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetAverageUtilization"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TargetAverageUtilization == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.TargetAverageUtilization
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(yy9))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.TargetAverageValue == nil {
+ r.EncodeNil()
+ } else {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.TargetAverageValue) {
+ } else if !yym12 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.TargetAverageValue)
+ } else {
+ z.EncFallback(x.TargetAverageValue)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetAverageValue"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TargetAverageValue == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.TargetAverageValue) {
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.TargetAverageValue)
+ } else {
+ z.EncFallback(x.TargetAverageValue)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ResourceMetricSource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ResourceMetricSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "targetAverageUtilization":
+ if r.TryDecodeAsNil() {
+ if x.TargetAverageUtilization != nil {
+ x.TargetAverageUtilization = nil
+ }
+ } else {
+ if x.TargetAverageUtilization == nil {
+ x.TargetAverageUtilization = new(int32)
+ }
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*int32)(x.TargetAverageUtilization)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "targetAverageValue":
+ if r.TryDecodeAsNil() {
+ if x.TargetAverageValue != nil {
+ x.TargetAverageValue = nil
+ }
+ } else {
+ if x.TargetAverageValue == nil {
+ x.TargetAverageValue = new(pkg1_resource.Quantity)
+ }
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.TargetAverageValue) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.TargetAverageValue)
+ } else {
+ z.DecFallback(x.TargetAverageValue, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ResourceMetricSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv10 := &x.Name
+ yyv10.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.TargetAverageUtilization != nil {
+ x.TargetAverageUtilization = nil
+ }
+ } else {
+ if x.TargetAverageUtilization == nil {
+ x.TargetAverageUtilization = new(int32)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int32)(x.TargetAverageUtilization)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.TargetAverageValue != nil {
+ x.TargetAverageValue = nil
+ }
+ } else {
+ if x.TargetAverageValue == nil {
+ x.TargetAverageValue = new(pkg1_resource.Quantity)
+ }
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.TargetAverageValue) {
+ } else if !yym14 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.TargetAverageValue)
+ } else {
+ z.DecFallback(x.TargetAverageValue, false)
+ }
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *HorizontalPodAutoscalerStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.ObservedGeneration != nil
+ yyq2[1] = x.LastScaleTime != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 4
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.ObservedGeneration == nil {
+ r.EncodeNil()
+ } else {
+ yy4 := *x.ObservedGeneration
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(yy4))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("observedGeneration"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ObservedGeneration == nil {
+ r.EncodeNil()
+ } else {
+ yy6 := *x.ObservedGeneration
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(yy6))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.LastScaleTime == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.LastScaleTime) {
+ } else if yym9 {
+ z.EncBinaryMarshal(x.LastScaleTime)
+ } else if !yym9 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.LastScaleTime)
+ } else {
+ z.EncFallback(x.LastScaleTime)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastScaleTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.LastScaleTime == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.LastScaleTime) {
+ } else if yym10 {
+ z.EncBinaryMarshal(x.LastScaleTime)
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.LastScaleTime)
+ } else {
+ z.EncFallback(x.LastScaleTime)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeInt(int64(x.CurrentReplicas))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.CurrentReplicas))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeInt(int64(x.DesiredReplicas))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("desiredReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(x.DesiredReplicas))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.CurrentMetrics == nil {
+ r.EncodeNil()
+ } else {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ h.encSliceMetricStatus(([]MetricStatus)(x.CurrentMetrics), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentMetrics"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.CurrentMetrics == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ h.encSliceMetricStatus(([]MetricStatus)(x.CurrentMetrics), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ h.encSliceHorizontalPodAutoscalerCondition(([]HorizontalPodAutoscalerCondition)(x.Conditions), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("conditions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ h.encSliceHorizontalPodAutoscalerCondition(([]HorizontalPodAutoscalerCondition)(x.Conditions), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "observedGeneration":
+ if r.TryDecodeAsNil() {
+ if x.ObservedGeneration != nil {
+ x.ObservedGeneration = nil
+ }
+ } else {
+ if x.ObservedGeneration == nil {
+ x.ObservedGeneration = new(int64)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "lastScaleTime":
+ if r.TryDecodeAsNil() {
+ if x.LastScaleTime != nil {
+ x.LastScaleTime = nil
+ }
+ } else {
+ if x.LastScaleTime == nil {
+ x.LastScaleTime = new(pkg3_v1.Time)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.LastScaleTime) {
+ } else if yym7 {
+ z.DecBinaryUnmarshal(x.LastScaleTime)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.LastScaleTime)
+ } else {
+ z.DecFallback(x.LastScaleTime, false)
+ }
+ }
+ case "currentReplicas":
+ if r.TryDecodeAsNil() {
+ x.CurrentReplicas = 0
+ } else {
+ yyv8 := &x.CurrentReplicas
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "desiredReplicas":
+ if r.TryDecodeAsNil() {
+ x.DesiredReplicas = 0
+ } else {
+ yyv10 := &x.DesiredReplicas
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(yyv10)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "currentMetrics":
+ if r.TryDecodeAsNil() {
+ x.CurrentMetrics = nil
+ } else {
+ yyv12 := &x.CurrentMetrics
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ h.decSliceMetricStatus((*[]MetricStatus)(yyv12), d)
+ }
+ }
+ case "conditions":
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv14 := &x.Conditions
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.decSliceHorizontalPodAutoscalerCondition((*[]HorizontalPodAutoscalerCondition)(yyv14), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HorizontalPodAutoscalerStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj16 int
+ var yyb16 bool
+ var yyhl16 bool = l >= 0
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ObservedGeneration != nil {
+ x.ObservedGeneration = nil
+ }
+ } else {
+ if x.ObservedGeneration == nil {
+ x.ObservedGeneration = new(int64)
+ }
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int64)(x.ObservedGeneration)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.LastScaleTime != nil {
+ x.LastScaleTime = nil
+ }
+ } else {
+ if x.LastScaleTime == nil {
+ x.LastScaleTime = new(pkg3_v1.Time)
+ }
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.LastScaleTime) {
+ } else if yym20 {
+ z.DecBinaryUnmarshal(x.LastScaleTime)
+ } else if !yym20 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.LastScaleTime)
+ } else {
+ z.DecFallback(x.LastScaleTime, false)
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentReplicas = 0
+ } else {
+ yyv21 := &x.CurrentReplicas
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int32)(yyv21)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DesiredReplicas = 0
+ } else {
+ yyv23 := &x.DesiredReplicas
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*int32)(yyv23)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentMetrics = nil
+ } else {
+ yyv25 := &x.CurrentMetrics
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ h.decSliceMetricStatus((*[]MetricStatus)(yyv25), d)
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv27 := &x.Conditions
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ h.decSliceHorizontalPodAutoscalerCondition((*[]HorizontalPodAutoscalerCondition)(yyv27), d)
+ }
+ }
+ for {
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj16-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x HorizontalPodAutoscalerConditionType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *HorizontalPodAutoscalerConditionType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *HorizontalPodAutoscalerCondition) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = true
+ yyq2[3] = x.Reason != ""
+ yyq2[4] = x.Message != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yysf7 := &x.Status
+ yysf7.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yysf8 := &x.Status
+ yysf8.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy10 := &x.LastTransitionTime
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy10) {
+ } else if yym11 {
+ z.EncBinaryMarshal(yy10)
+ } else if !yym11 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy10)
+ } else {
+ z.EncFallback(yy10)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.LastTransitionTime
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if yym13 {
+ z.EncBinaryMarshal(yy12)
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerCondition) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "lastTransitionTime":
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg3_v1.Time{}
+ } else {
+ yyv6 := &x.LastTransitionTime
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if yym7 {
+ z.DecBinaryUnmarshal(yyv6)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv8 := &x.Reason
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv10 := &x.Message
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HorizontalPodAutoscalerCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv13 := &x.Type
+ yyv13.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv14 := &x.Status
+ yyv14.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg3_v1.Time{}
+ } else {
+ yyv15 := &x.LastTransitionTime
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv15) {
+ } else if yym16 {
+ z.DecBinaryUnmarshal(yyv15)
+ } else if !yym16 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv15)
+ } else {
+ z.DecFallback(yyv15, false)
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv17 := &x.Reason
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv19 := &x.Message
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *MetricStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.Object != nil
+ yyq2[2] = x.Pods != nil
+ yyq2[3] = x.Resource != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Object == nil {
+ r.EncodeNil()
+ } else {
+ x.Object.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("object"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Object == nil {
+ r.EncodeNil()
+ } else {
+ x.Object.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Pods == nil {
+ r.EncodeNil()
+ } else {
+ x.Pods.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("pods"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Pods == nil {
+ r.EncodeNil()
+ } else {
+ x.Pods.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Resource == nil {
+ r.EncodeNil()
+ } else {
+ x.Resource.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resource"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Resource == nil {
+ r.EncodeNil()
+ } else {
+ x.Resource.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *MetricStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *MetricStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "object":
+ if r.TryDecodeAsNil() {
+ if x.Object != nil {
+ x.Object = nil
+ }
+ } else {
+ if x.Object == nil {
+ x.Object = new(ObjectMetricStatus)
+ }
+ x.Object.CodecDecodeSelf(d)
+ }
+ case "pods":
+ if r.TryDecodeAsNil() {
+ if x.Pods != nil {
+ x.Pods = nil
+ }
+ } else {
+ if x.Pods == nil {
+ x.Pods = new(PodsMetricStatus)
+ }
+ x.Pods.CodecDecodeSelf(d)
+ }
+ case "resource":
+ if r.TryDecodeAsNil() {
+ if x.Resource != nil {
+ x.Resource = nil
+ }
+ } else {
+ if x.Resource == nil {
+ x.Resource = new(ResourceMetricStatus)
+ }
+ x.Resource.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *MetricStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv9 := &x.Type
+ yyv9.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Object != nil {
+ x.Object = nil
+ }
+ } else {
+ if x.Object == nil {
+ x.Object = new(ObjectMetricStatus)
+ }
+ x.Object.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Pods != nil {
+ x.Pods = nil
+ }
+ } else {
+ if x.Pods == nil {
+ x.Pods = new(PodsMetricStatus)
+ }
+ x.Pods.CodecDecodeSelf(d)
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Resource != nil {
+ x.Resource = nil
+ }
+ } else {
+ if x.Resource == nil {
+ x.Resource = new(ResourceMetricStatus)
+ }
+ x.Resource.CodecDecodeSelf(d)
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ObjectMetricStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ yy4 := &x.Target
+ yy4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("target"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.Target
+ yy6.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metricName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy12 := &x.CurrentValue
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentValue"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy14 := &x.CurrentValue
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy14) {
+ } else if !yym15 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy14)
+ } else {
+ z.EncFallback(yy14)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ObjectMetricStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ObjectMetricStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "target":
+ if r.TryDecodeAsNil() {
+ x.Target = CrossVersionObjectReference{}
+ } else {
+ yyv4 := &x.Target
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "metricName":
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv5 := &x.MetricName
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*string)(yyv5)) = r.DecodeString()
+ }
+ }
+ case "currentValue":
+ if r.TryDecodeAsNil() {
+ x.CurrentValue = pkg1_resource.Quantity{}
+ } else {
+ yyv7 := &x.CurrentValue
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv7)
+ } else {
+ z.DecFallback(yyv7, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ObjectMetricStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Target = CrossVersionObjectReference{}
+ } else {
+ yyv10 := &x.Target
+ yyv10.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv11 := &x.MetricName
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*string)(yyv11)) = r.DecodeString()
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentValue = pkg1_resource.Quantity{}
+ } else {
+ yyv13 := &x.CurrentValue
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv13) {
+ } else if !yym14 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv13)
+ } else {
+ z.DecFallback(yyv13, false)
+ }
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodsMetricStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metricName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.MetricName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy7 := &x.CurrentAverageValue
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy7)
+ } else {
+ z.EncFallback(yy7)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentAverageValue"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.CurrentAverageValue
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy9) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy9)
+ } else {
+ z.EncFallback(yy9)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodsMetricStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodsMetricStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "metricName":
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv4 := &x.MetricName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "currentAverageValue":
+ if r.TryDecodeAsNil() {
+ x.CurrentAverageValue = pkg1_resource.Quantity{}
+ } else {
+ yyv6 := &x.CurrentAverageValue
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodsMetricStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MetricName = ""
+ } else {
+ yyv9 := &x.MetricName
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentAverageValue = pkg1_resource.Quantity{}
+ } else {
+ yyv11 := &x.CurrentAverageValue
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else if !yym12 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv11)
+ } else {
+ z.DecFallback(yyv11, false)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ResourceMetricStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.CurrentAverageUtilization != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(3)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yysf4 := &x.Name
+ yysf4.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yysf5 := &x.Name
+ yysf5.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.CurrentAverageUtilization == nil {
+ r.EncodeNil()
+ } else {
+ yy7 := *x.CurrentAverageUtilization
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(yy7))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentAverageUtilization"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.CurrentAverageUtilization == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.CurrentAverageUtilization
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(yy9))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy12 := &x.CurrentAverageValue
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentAverageValue"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy14 := &x.CurrentAverageValue
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy14) {
+ } else if !yym15 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy14)
+ } else {
+ z.EncFallback(yy14)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ResourceMetricStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ResourceMetricStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "currentAverageUtilization":
+ if r.TryDecodeAsNil() {
+ if x.CurrentAverageUtilization != nil {
+ x.CurrentAverageUtilization = nil
+ }
+ } else {
+ if x.CurrentAverageUtilization == nil {
+ x.CurrentAverageUtilization = new(int32)
+ }
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*int32)(x.CurrentAverageUtilization)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "currentAverageValue":
+ if r.TryDecodeAsNil() {
+ x.CurrentAverageValue = pkg1_resource.Quantity{}
+ } else {
+ yyv7 := &x.CurrentAverageValue
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv7)
+ } else {
+ z.DecFallback(yyv7, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ResourceMetricStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv10 := &x.Name
+ yyv10.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.CurrentAverageUtilization != nil {
+ x.CurrentAverageUtilization = nil
+ }
+ } else {
+ if x.CurrentAverageUtilization == nil {
+ x.CurrentAverageUtilization = new(int32)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int32)(x.CurrentAverageUtilization)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentAverageValue = pkg1_resource.Quantity{}
+ } else {
+ yyv13 := &x.CurrentAverageValue
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv13) {
+ } else if !yym14 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv13)
+ } else {
+ z.DecFallback(yyv13, false)
+ }
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *HorizontalPodAutoscaler) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscaler) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscaler) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg3_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 = HorizontalPodAutoscalerSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = HorizontalPodAutoscalerStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg3_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = HorizontalPodAutoscalerSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = HorizontalPodAutoscalerStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *HorizontalPodAutoscalerList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceHorizontalPodAutoscaler(([]HorizontalPodAutoscaler)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceHorizontalPodAutoscaler(([]HorizontalPodAutoscaler)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HorizontalPodAutoscalerList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg3_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.decSliceHorizontalPodAutoscaler((*[]HorizontalPodAutoscaler)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HorizontalPodAutoscalerList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg3_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceHorizontalPodAutoscaler((*[]HorizontalPodAutoscaler)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encSliceMetricSpec(v []MetricSpec, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceMetricSpec(v *[]MetricSpec, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []MetricSpec{}
+ 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, 40)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]MetricSpec, yyrl1)
+ }
+ } else {
+ yyv1 = make([]MetricSpec, 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] = MetricSpec{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, MetricSpec{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = MetricSpec{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, MetricSpec{}) // var yyz1 MetricSpec
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = MetricSpec{}
+ } 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 = []MetricSpec{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceMetricStatus(v []MetricStatus, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceMetricStatus(v *[]MetricStatus, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []MetricStatus{}
+ 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, 40)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]MetricStatus, yyrl1)
+ }
+ } else {
+ yyv1 = make([]MetricStatus, 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] = MetricStatus{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, MetricStatus{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = MetricStatus{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, MetricStatus{}) // var yyz1 MetricStatus
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = MetricStatus{}
+ } 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 = []MetricStatus{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceHorizontalPodAutoscalerCondition(v []HorizontalPodAutoscalerCondition, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceHorizontalPodAutoscalerCondition(v *[]HorizontalPodAutoscalerCondition, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []HorizontalPodAutoscalerCondition{}
+ 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, 88)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]HorizontalPodAutoscalerCondition, yyrl1)
+ }
+ } else {
+ yyv1 = make([]HorizontalPodAutoscalerCondition, 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] = HorizontalPodAutoscalerCondition{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, HorizontalPodAutoscalerCondition{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = HorizontalPodAutoscalerCondition{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, HorizontalPodAutoscalerCondition{}) // var yyz1 HorizontalPodAutoscalerCondition
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = HorizontalPodAutoscalerCondition{}
+ } 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 = []HorizontalPodAutoscalerCondition{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceHorizontalPodAutoscaler(v []HorizontalPodAutoscaler, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceHorizontalPodAutoscaler(v *[]HorizontalPodAutoscaler, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []HorizontalPodAutoscaler{}
+ 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, 424)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]HorizontalPodAutoscaler, yyrl1)
+ }
+ } else {
+ yyv1 = make([]HorizontalPodAutoscaler, 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] = HorizontalPodAutoscaler{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, HorizontalPodAutoscaler{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = HorizontalPodAutoscaler{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, HorizontalPodAutoscaler{}) // var yyz1 HorizontalPodAutoscaler
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = HorizontalPodAutoscaler{}
+ } 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 = []HorizontalPodAutoscaler{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/types.go
new file mode 100644
index 000000000..7834e7f11
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/types.go
@@ -0,0 +1,309 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+import (
+ "k8s.io/apimachinery/pkg/api/resource"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/kubernetes/pkg/api/v1"
+)
+
+// CrossVersionObjectReference contains enough information to let you identify the referred resource.
+type CrossVersionObjectReference struct {
+ // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"
+ Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
+ // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
+ Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
+ // API version of the referent
+ // +optional
+ APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"`
+}
+
+// HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.
+type HorizontalPodAutoscalerSpec struct {
+ // scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics
+ // should be collected, as well as to actually change the replica count.
+ ScaleTargetRef CrossVersionObjectReference `json:"scaleTargetRef" protobuf:"bytes,1,opt,name=scaleTargetRef"`
+ // minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down.
+ // It defaults to 1 pod.
+ // +optional
+ MinReplicas *int32 `json:"minReplicas,omitempty" protobuf:"varint,2,opt,name=minReplicas"`
+ // maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.
+ // It cannot be less that minReplicas.
+ MaxReplicas int32 `json:"maxReplicas" protobuf:"varint,3,opt,name=maxReplicas"`
+ // metrics contains the specifications for which to use to calculate the
+ // desired replica count (the maximum replica count across all metrics will
+ // be used). The desired replica count is calculated multiplying the
+ // ratio between the target value and the current value by the current
+ // number of pods. Ergo, metrics used must decrease as the pod count is
+ // increased, and vice-versa. See the individual metric source types for
+ // more information about how each type of metric must respond.
+ // +optional
+ Metrics []MetricSpec `json:"metrics,omitempty" protobuf:"bytes,4,rep,name=metrics"`
+}
+
+// MetricSourceType indicates the type of metric.
+type MetricSourceType string
+
+var (
+ // ObjectMetricSourceType is a metric describing a kubernetes object
+ // (for example, hits-per-second on an Ingress object).
+ ObjectMetricSourceType MetricSourceType = "Object"
+ // PodsMetricSourceType is a metric describing each pod in the current scale
+ // target (for example, transactions-processed-per-second). The values
+ // will be averaged together before being compared to the target value.
+ PodsMetricSourceType MetricSourceType = "Pods"
+ // ResourceMetricSourceType is a resource metric known to Kubernetes, as
+ // specified in requests and limits, describing each pod in the current
+ // scale target (e.g. CPU or memory). Such metrics are built in to
+ // Kubernetes, and have special scaling options on top of those available
+ // to normal per-pod metrics (the "pods" source).
+ ResourceMetricSourceType MetricSourceType = "Resource"
+)
+
+// MetricSpec specifies how to scale based on a single metric
+// (only `type` and one other matching field should be set at once).
+type MetricSpec struct {
+ // type is the type of metric source. It should match one of the fields below.
+ Type MetricSourceType `json:"type" protobuf:"bytes,1,name=type"`
+
+ // object refers to a metric describing a single kubernetes object
+ // (for example, hits-per-second on an Ingress object).
+ // +optional
+ Object *ObjectMetricSource `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"`
+ // pods refers to a metric describing each pod in the current scale target
+ // (for example, transactions-processed-per-second). The values will be
+ // averaged together before being compared to the target value.
+ // +optional
+ Pods *PodsMetricSource `json:"pods,omitempty" protobuf:"bytes,3,opt,name=pods"`
+ // resource refers to a resource metric (such as those specified in
+ // requests and limits) known to Kubernetes describing each pod in the
+ // current scale target (e.g. CPU or memory). Such metrics are built in to
+ // Kubernetes, and have special scaling options on top of those available
+ // to normal per-pod metrics using the "pods" source.
+ // +optional
+ Resource *ResourceMetricSource `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"`
+}
+
+// ObjectMetricSource indicates how to scale on a metric describing a
+// kubernetes object (for example, hits-per-second on an Ingress object).
+type ObjectMetricSource struct {
+ // target is the described Kubernetes object.
+ Target CrossVersionObjectReference `json:"target" protobuf:"bytes,1,name=target"`
+
+ // metricName is the name of the metric in question.
+ MetricName string `json:"metricName" protobuf:"bytes,2,name=metricName"`
+ // targetValue is the target value of the metric (as a quantity).
+ TargetValue resource.Quantity `json:"targetValue" protobuf:"bytes,3,name=targetValue"`
+}
+
+// PodsMetricSource indicates how to scale on a metric describing each pod in
+// the current scale target (for example, transactions-processed-per-second).
+// The values will be averaged together before being compared to the target
+// value.
+type PodsMetricSource struct {
+ // metricName is the name of the metric in question
+ MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"`
+ // targetAverageValue is the target value of the average of the
+ // metric across all relevant pods (as a quantity)
+ TargetAverageValue resource.Quantity `json:"targetAverageValue" protobuf:"bytes,2,name=targetAverageValue"`
+}
+
+// ResourceMetricSource indicates how to scale on a resource metric known to
+// Kubernetes, as specified in requests and limits, describing each pod in the
+// current scale target (e.g. CPU or memory). The values will be averaged
+// together before being compared to the target. Such metrics are built in to
+// Kubernetes, and have special scaling options on top of those available to
+// normal per-pod metrics using the "pods" source. Only one "target" type
+// should be set.
+type ResourceMetricSource struct {
+ // name is the name of the resource in question.
+ Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
+ // targetAverageUtilization is the target value of the average of the
+ // resource metric across all relevant pods, represented as a percentage of
+ // the requested value of the resource for the pods.
+ // +optional
+ TargetAverageUtilization *int32 `json:"targetAverageUtilization,omitempty" protobuf:"varint,2,opt,name=targetAverageUtilization"`
+ // targetAverageValue is the target value of the average of the
+ // resource metric across all relevant pods, as a raw value (instead of as
+ // a percentage of the request), similar to the "pods" metric source type.
+ // +optional
+ TargetAverageValue *resource.Quantity `json:"targetAverageValue,omitempty" protobuf:"bytes,3,opt,name=targetAverageValue"`
+}
+
+// HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.
+type HorizontalPodAutoscalerStatus struct {
+ // observedGeneration is the most recent generation observed by this autoscaler.
+ // +optional
+ ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
+
+ // lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods,
+ // used by the autoscaler to control how often the number of pods is changed.
+ // +optional
+ LastScaleTime *metav1.Time `json:"lastScaleTime,omitempty" protobuf:"bytes,2,opt,name=lastScaleTime"`
+
+ // currentReplicas is current number of replicas of pods managed by this autoscaler,
+ // as last seen by the autoscaler.
+ CurrentReplicas int32 `json:"currentReplicas" protobuf:"varint,3,opt,name=currentReplicas"`
+
+ // desiredReplicas is the desired number of replicas of pods managed by this autoscaler,
+ // as last calculated by the autoscaler.
+ DesiredReplicas int32 `json:"desiredReplicas" protobuf:"varint,4,opt,name=desiredReplicas"`
+
+ // currentMetrics is the last read state of the metrics used by this autoscaler.
+ CurrentMetrics []MetricStatus `json:"currentMetrics" protobuf:"bytes,5,rep,name=currentMetrics"`
+
+ // conditions is the set of conditions required for this autoscaler to scale its target,
+ // and indicates whether or not those conditions are met.
+ Conditions []HorizontalPodAutoscalerCondition `json:"conditions" protobuf:"bytes,6,rep,name=conditions"`
+}
+
+// HorizontalPodAutoscalerConditionType are the valid conditions of
+// a HorizontalPodAutoscaler.
+type HorizontalPodAutoscalerConditionType string
+
+var (
+ // ScalingActive indicates that the HPA controller is able to scale if necessary:
+ // it's correctly configured, can fetch the desired metrics, and isn't disabled.
+ ScalingActive HorizontalPodAutoscalerConditionType = "ScalingActive"
+ // AbleToScale indicates a lack of transient issues which prevent scaling from occuring,
+ // such as being in a backoff window, or being unable to access/update the target scale.
+ AbleToScale HorizontalPodAutoscalerConditionType = "AbleToScale"
+ // ScalingLimited indicates that the calculated scale based on metrics would be above or
+ // below the range for the HPA, and has thus been capped.
+ ScalingLimited HorizontalPodAutoscalerConditionType = "ScalingLimited"
+)
+
+// HorizontalPodAutoscalerCondition describes the state of
+// a HorizontalPodAutoscaler at a certain point.
+type HorizontalPodAutoscalerCondition struct {
+ // type describes the current condition
+ Type HorizontalPodAutoscalerConditionType `json:"type" protobuf:"bytes,1,name=type"`
+ // status is the status of the condition (True, False, Unknown)
+ Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,name=status"`
+ // lastTransitionTime is the last time the condition transitioned from
+ // one status to another
+ // +optional
+ LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
+ // reason is the reason for the condition's last transition.
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
+ // message is a human-readable explanation containing details about
+ // the transition
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
+}
+
+// MetricStatus describes the last-read state of a single metric.
+type MetricStatus struct {
+ // type is the type of metric source. It will match one of the fields below.
+ Type MetricSourceType `json:"type" protobuf:"bytes,1,name=type"`
+
+ // object refers to a metric describing a single kubernetes object
+ // (for example, hits-per-second on an Ingress object).
+ // +optional
+ Object *ObjectMetricStatus `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"`
+ // pods refers to a metric describing each pod in the current scale target
+ // (for example, transactions-processed-per-second). The values will be
+ // averaged together before being compared to the target value.
+ // +optional
+ Pods *PodsMetricStatus `json:"pods,omitempty" protobuf:"bytes,3,opt,name=pods"`
+ // resource refers to a resource metric (such as those specified in
+ // requests and limits) known to Kubernetes describing each pod in the
+ // current scale target (e.g. CPU or memory). Such metrics are built in to
+ // Kubernetes, and have special scaling options on top of those available
+ // to normal per-pod metrics using the "pods" source.
+ // +optional
+ Resource *ResourceMetricStatus `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"`
+}
+
+// ObjectMetricStatus indicates the current value of a metric describing a
+// kubernetes object (for example, hits-per-second on an Ingress object).
+type ObjectMetricStatus struct {
+ // target is the described Kubernetes object.
+ Target CrossVersionObjectReference `json:"target" protobuf:"bytes,1,name=target"`
+
+ // metricName is the name of the metric in question.
+ MetricName string `json:"metricName" protobuf:"bytes,2,name=metricName"`
+ // currentValue is the current value of the metric (as a quantity).
+ CurrentValue resource.Quantity `json:"currentValue" protobuf:"bytes,3,name=currentValue"`
+}
+
+// PodsMetricStatus indicates the current value of a metric describing each pod in
+// the current scale target (for example, transactions-processed-per-second).
+type PodsMetricStatus struct {
+ // metricName is the name of the metric in question
+ MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"`
+ // currentAverageValue is the current value of the average of the
+ // metric across all relevant pods (as a quantity)
+ CurrentAverageValue resource.Quantity `json:"currentAverageValue" protobuf:"bytes,2,name=currentAverageValue"`
+}
+
+// ResourceMetricStatus indicates the current value of a resource metric known to
+// Kubernetes, as specified in requests and limits, describing each pod in the
+// current scale target (e.g. CPU or memory). Such metrics are built in to
+// Kubernetes, and have special scaling options on top of those available to
+// normal per-pod metrics using the "pods" source.
+type ResourceMetricStatus struct {
+ // name is the name of the resource in question.
+ Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
+ // currentAverageUtilization is the current value of the average of the
+ // resource metric across all relevant pods, represented as a percentage of
+ // the requested value of the resource for the pods. It will only be
+ // present if `targetAverageValue` was set in the corresponding metric
+ // specification.
+ // +optional
+ CurrentAverageUtilization *int32 `json:"currentAverageUtilization,omitempty" protobuf:"bytes,2,opt,name=currentAverageUtilization"`
+ // currentAverageValue is the current value of the average of the
+ // resource metric across all relevant pods, as a raw value (instead of as
+ // a percentage of the request), similar to the "pods" metric source type.
+ // It will always be set, regardless of the corresponding metric specification.
+ CurrentAverageValue resource.Quantity `json:"currentAverageValue" protobuf:"bytes,3,name=currentAverageValue"`
+}
+
+// +genclient=true
+
+// HorizontalPodAutoscaler is the configuration for a horizontal pod
+// autoscaler, which automatically manages the replica count of any resource
+// implementing the scale subresource based on the metrics specified.
+type HorizontalPodAutoscaler struct {
+ metav1.TypeMeta `json:",inline"`
+ // metadata is the standard object metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // spec is the specification for the behaviour of the autoscaler.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
+ // +optional
+ Spec HorizontalPodAutoscalerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // status is the current information about the autoscaler.
+ // +optional
+ Status HorizontalPodAutoscalerStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.
+type HorizontalPodAutoscalerList struct {
+ metav1.TypeMeta `json:",inline"`
+ // metadata is the standard list metadata.
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // items is the list of horizontal pod autoscaler objects.
+ Items []HorizontalPodAutoscaler `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..b1c140738
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/types_swagger_doc_generated.go
@@ -0,0 +1,189 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_CrossVersionObjectReference = map[string]string{
+ "": "CrossVersionObjectReference contains enough information to let you identify the referred resource.",
+ "kind": "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds\"",
+ "name": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
+ "apiVersion": "API version of the referent",
+}
+
+func (CrossVersionObjectReference) SwaggerDoc() map[string]string {
+ return map_CrossVersionObjectReference
+}
+
+var map_HorizontalPodAutoscaler = map[string]string{
+ "": "HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.",
+ "metadata": "metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.",
+ "status": "status is the current information about the autoscaler.",
+}
+
+func (HorizontalPodAutoscaler) SwaggerDoc() map[string]string {
+ return map_HorizontalPodAutoscaler
+}
+
+var map_HorizontalPodAutoscalerCondition = map[string]string{
+ "": "HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.",
+ "type": "type describes the current condition",
+ "status": "status is the status of the condition (True, False, Unknown)",
+ "lastTransitionTime": "lastTransitionTime is the last time the condition transitioned from one status to another",
+ "reason": "reason is the reason for the condition's last transition.",
+ "message": "message is a human-readable explanation containing details about the transition",
+}
+
+func (HorizontalPodAutoscalerCondition) SwaggerDoc() map[string]string {
+ return map_HorizontalPodAutoscalerCondition
+}
+
+var map_HorizontalPodAutoscalerList = map[string]string{
+ "": "HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.",
+ "metadata": "metadata is the standard list metadata.",
+ "items": "items is the list of horizontal pod autoscaler objects.",
+}
+
+func (HorizontalPodAutoscalerList) SwaggerDoc() map[string]string {
+ return map_HorizontalPodAutoscalerList
+}
+
+var map_HorizontalPodAutoscalerSpec = map[string]string{
+ "": "HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.",
+ "scaleTargetRef": "scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count.",
+ "minReplicas": "minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod.",
+ "maxReplicas": "maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.",
+ "metrics": "metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond.",
+}
+
+func (HorizontalPodAutoscalerSpec) SwaggerDoc() map[string]string {
+ return map_HorizontalPodAutoscalerSpec
+}
+
+var map_HorizontalPodAutoscalerStatus = map[string]string{
+ "": "HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.",
+ "observedGeneration": "observedGeneration is the most recent generation observed by this autoscaler.",
+ "lastScaleTime": "lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, used by the autoscaler to control how often the number of pods is changed.",
+ "currentReplicas": "currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.",
+ "desiredReplicas": "desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.",
+ "currentMetrics": "currentMetrics is the last read state of the metrics used by this autoscaler.",
+ "conditions": "conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.",
+}
+
+func (HorizontalPodAutoscalerStatus) SwaggerDoc() map[string]string {
+ return map_HorizontalPodAutoscalerStatus
+}
+
+var map_MetricSpec = map[string]string{
+ "": "MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).",
+ "type": "type is the type of metric source. It should match one of the fields below.",
+ "object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).",
+ "pods": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.",
+ "resource": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.",
+}
+
+func (MetricSpec) SwaggerDoc() map[string]string {
+ return map_MetricSpec
+}
+
+var map_MetricStatus = map[string]string{
+ "": "MetricStatus describes the last-read state of a single metric.",
+ "type": "type is the type of metric source. It will match one of the fields below.",
+ "object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).",
+ "pods": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.",
+ "resource": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.",
+}
+
+func (MetricStatus) SwaggerDoc() map[string]string {
+ return map_MetricStatus
+}
+
+var map_ObjectMetricSource = map[string]string{
+ "": "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).",
+ "target": "target is the described Kubernetes object.",
+ "metricName": "metricName is the name of the metric in question.",
+ "targetValue": "targetValue is the target value of the metric (as a quantity).",
+}
+
+func (ObjectMetricSource) SwaggerDoc() map[string]string {
+ return map_ObjectMetricSource
+}
+
+var map_ObjectMetricStatus = map[string]string{
+ "": "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).",
+ "target": "target is the described Kubernetes object.",
+ "metricName": "metricName is the name of the metric in question.",
+ "currentValue": "currentValue is the current value of the metric (as a quantity).",
+}
+
+func (ObjectMetricStatus) SwaggerDoc() map[string]string {
+ return map_ObjectMetricStatus
+}
+
+var map_PodsMetricSource = map[string]string{
+ "": "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.",
+ "metricName": "metricName is the name of the metric in question",
+ "targetAverageValue": "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)",
+}
+
+func (PodsMetricSource) SwaggerDoc() map[string]string {
+ return map_PodsMetricSource
+}
+
+var map_PodsMetricStatus = map[string]string{
+ "": "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).",
+ "metricName": "metricName is the name of the metric in question",
+ "currentAverageValue": "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)",
+}
+
+func (PodsMetricStatus) SwaggerDoc() map[string]string {
+ return map_PodsMetricStatus
+}
+
+var map_ResourceMetricSource = map[string]string{
+ "": "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.",
+ "name": "name is the name of the resource in question.",
+ "targetAverageUtilization": "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.",
+ "targetAverageValue": "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.",
+}
+
+func (ResourceMetricSource) SwaggerDoc() map[string]string {
+ return map_ResourceMetricSource
+}
+
+var map_ResourceMetricStatus = map[string]string{
+ "": "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.",
+ "name": "name is the name of the resource in question.",
+ "currentAverageUtilization": "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.",
+ "currentAverageValue": "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.",
+}
+
+func (ResourceMetricStatus) SwaggerDoc() map[string]string {
+ return map_ResourceMetricStatus
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/zz_generated.conversion.go
new file mode 100644
index 000000000..be47a385e
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/zz_generated.conversion.go
@@ -0,0 +1,449 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v2alpha1
+
+import (
+ resource "k8s.io/apimachinery/pkg/api/resource"
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api "k8s.io/kubernetes/pkg/api"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v2alpha1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference,
+ Convert_autoscaling_CrossVersionObjectReference_To_v2alpha1_CrossVersionObjectReference,
+ Convert_v2alpha1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler,
+ Convert_autoscaling_HorizontalPodAutoscaler_To_v2alpha1_HorizontalPodAutoscaler,
+ Convert_v2alpha1_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition,
+ Convert_autoscaling_HorizontalPodAutoscalerCondition_To_v2alpha1_HorizontalPodAutoscalerCondition,
+ Convert_v2alpha1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList,
+ Convert_autoscaling_HorizontalPodAutoscalerList_To_v2alpha1_HorizontalPodAutoscalerList,
+ Convert_v2alpha1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec,
+ Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v2alpha1_HorizontalPodAutoscalerSpec,
+ Convert_v2alpha1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus,
+ Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v2alpha1_HorizontalPodAutoscalerStatus,
+ Convert_v2alpha1_MetricSpec_To_autoscaling_MetricSpec,
+ Convert_autoscaling_MetricSpec_To_v2alpha1_MetricSpec,
+ Convert_v2alpha1_MetricStatus_To_autoscaling_MetricStatus,
+ Convert_autoscaling_MetricStatus_To_v2alpha1_MetricStatus,
+ Convert_v2alpha1_ObjectMetricSource_To_autoscaling_ObjectMetricSource,
+ Convert_autoscaling_ObjectMetricSource_To_v2alpha1_ObjectMetricSource,
+ Convert_v2alpha1_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus,
+ Convert_autoscaling_ObjectMetricStatus_To_v2alpha1_ObjectMetricStatus,
+ Convert_v2alpha1_PodsMetricSource_To_autoscaling_PodsMetricSource,
+ Convert_autoscaling_PodsMetricSource_To_v2alpha1_PodsMetricSource,
+ Convert_v2alpha1_PodsMetricStatus_To_autoscaling_PodsMetricStatus,
+ Convert_autoscaling_PodsMetricStatus_To_v2alpha1_PodsMetricStatus,
+ Convert_v2alpha1_ResourceMetricSource_To_autoscaling_ResourceMetricSource,
+ Convert_autoscaling_ResourceMetricSource_To_v2alpha1_ResourceMetricSource,
+ Convert_v2alpha1_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus,
+ Convert_autoscaling_ResourceMetricStatus_To_v2alpha1_ResourceMetricStatus,
+ )
+}
+
+func autoConvert_v2alpha1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in *CrossVersionObjectReference, out *autoscaling.CrossVersionObjectReference, s conversion.Scope) error {
+ out.Kind = in.Kind
+ out.Name = in.Name
+ out.APIVersion = in.APIVersion
+ return nil
+}
+
+// Convert_v2alpha1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference is an autogenerated conversion function.
+func Convert_v2alpha1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in *CrossVersionObjectReference, out *autoscaling.CrossVersionObjectReference, s conversion.Scope) error {
+ return autoConvert_v2alpha1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in, out, s)
+}
+
+func autoConvert_autoscaling_CrossVersionObjectReference_To_v2alpha1_CrossVersionObjectReference(in *autoscaling.CrossVersionObjectReference, out *CrossVersionObjectReference, s conversion.Scope) error {
+ out.Kind = in.Kind
+ out.Name = in.Name
+ out.APIVersion = in.APIVersion
+ return nil
+}
+
+// Convert_autoscaling_CrossVersionObjectReference_To_v2alpha1_CrossVersionObjectReference is an autogenerated conversion function.
+func Convert_autoscaling_CrossVersionObjectReference_To_v2alpha1_CrossVersionObjectReference(in *autoscaling.CrossVersionObjectReference, out *CrossVersionObjectReference, s conversion.Scope) error {
+ return autoConvert_autoscaling_CrossVersionObjectReference_To_v2alpha1_CrossVersionObjectReference(in, out, s)
+}
+
+func autoConvert_v2alpha1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v2alpha1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v2alpha1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v2alpha1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler is an autogenerated conversion function.
+func Convert_v2alpha1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error {
+ return autoConvert_v2alpha1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in, out, s)
+}
+
+func autoConvert_autoscaling_HorizontalPodAutoscaler_To_v2alpha1_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v2alpha1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v2alpha1_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_autoscaling_HorizontalPodAutoscaler_To_v2alpha1_HorizontalPodAutoscaler is an autogenerated conversion function.
+func Convert_autoscaling_HorizontalPodAutoscaler_To_v2alpha1_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, s conversion.Scope) error {
+ return autoConvert_autoscaling_HorizontalPodAutoscaler_To_v2alpha1_HorizontalPodAutoscaler(in, out, s)
+}
+
+func autoConvert_v2alpha1_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition(in *HorizontalPodAutoscalerCondition, out *autoscaling.HorizontalPodAutoscalerCondition, s conversion.Scope) error {
+ out.Type = autoscaling.HorizontalPodAutoscalerConditionType(in.Type)
+ out.Status = autoscaling.ConditionStatus(in.Status)
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_v2alpha1_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition is an autogenerated conversion function.
+func Convert_v2alpha1_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition(in *HorizontalPodAutoscalerCondition, out *autoscaling.HorizontalPodAutoscalerCondition, s conversion.Scope) error {
+ return autoConvert_v2alpha1_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition(in, out, s)
+}
+
+func autoConvert_autoscaling_HorizontalPodAutoscalerCondition_To_v2alpha1_HorizontalPodAutoscalerCondition(in *autoscaling.HorizontalPodAutoscalerCondition, out *HorizontalPodAutoscalerCondition, s conversion.Scope) error {
+ out.Type = HorizontalPodAutoscalerConditionType(in.Type)
+ out.Status = v1.ConditionStatus(in.Status)
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_autoscaling_HorizontalPodAutoscalerCondition_To_v2alpha1_HorizontalPodAutoscalerCondition is an autogenerated conversion function.
+func Convert_autoscaling_HorizontalPodAutoscalerCondition_To_v2alpha1_HorizontalPodAutoscalerCondition(in *autoscaling.HorizontalPodAutoscalerCondition, out *HorizontalPodAutoscalerCondition, s conversion.Scope) error {
+ return autoConvert_autoscaling_HorizontalPodAutoscalerCondition_To_v2alpha1_HorizontalPodAutoscalerCondition(in, out, s)
+}
+
+func autoConvert_v2alpha1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in *HorizontalPodAutoscalerList, out *autoscaling.HorizontalPodAutoscalerList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]autoscaling.HorizontalPodAutoscaler)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v2alpha1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList is an autogenerated conversion function.
+func Convert_v2alpha1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in *HorizontalPodAutoscalerList, out *autoscaling.HorizontalPodAutoscalerList, s conversion.Scope) error {
+ return autoConvert_v2alpha1_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in, out, s)
+}
+
+func autoConvert_autoscaling_HorizontalPodAutoscalerList_To_v2alpha1_HorizontalPodAutoscalerList(in *autoscaling.HorizontalPodAutoscalerList, out *HorizontalPodAutoscalerList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]HorizontalPodAutoscaler, 0)
+ } else {
+ out.Items = *(*[]HorizontalPodAutoscaler)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_autoscaling_HorizontalPodAutoscalerList_To_v2alpha1_HorizontalPodAutoscalerList is an autogenerated conversion function.
+func Convert_autoscaling_HorizontalPodAutoscalerList_To_v2alpha1_HorizontalPodAutoscalerList(in *autoscaling.HorizontalPodAutoscalerList, out *HorizontalPodAutoscalerList, s conversion.Scope) error {
+ return autoConvert_autoscaling_HorizontalPodAutoscalerList_To_v2alpha1_HorizontalPodAutoscalerList(in, out, s)
+}
+
+func autoConvert_v2alpha1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in *HorizontalPodAutoscalerSpec, out *autoscaling.HorizontalPodAutoscalerSpec, s conversion.Scope) error {
+ if err := Convert_v2alpha1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(&in.ScaleTargetRef, &out.ScaleTargetRef, s); err != nil {
+ return err
+ }
+ out.MinReplicas = (*int32)(unsafe.Pointer(in.MinReplicas))
+ out.MaxReplicas = in.MaxReplicas
+ out.Metrics = *(*[]autoscaling.MetricSpec)(unsafe.Pointer(&in.Metrics))
+ return nil
+}
+
+// Convert_v2alpha1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec is an autogenerated conversion function.
+func Convert_v2alpha1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in *HorizontalPodAutoscalerSpec, out *autoscaling.HorizontalPodAutoscalerSpec, s conversion.Scope) error {
+ return autoConvert_v2alpha1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in, out, s)
+}
+
+func autoConvert_autoscaling_HorizontalPodAutoscalerSpec_To_v2alpha1_HorizontalPodAutoscalerSpec(in *autoscaling.HorizontalPodAutoscalerSpec, out *HorizontalPodAutoscalerSpec, s conversion.Scope) error {
+ if err := Convert_autoscaling_CrossVersionObjectReference_To_v2alpha1_CrossVersionObjectReference(&in.ScaleTargetRef, &out.ScaleTargetRef, s); err != nil {
+ return err
+ }
+ out.MinReplicas = (*int32)(unsafe.Pointer(in.MinReplicas))
+ out.MaxReplicas = in.MaxReplicas
+ out.Metrics = *(*[]MetricSpec)(unsafe.Pointer(&in.Metrics))
+ return nil
+}
+
+// Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v2alpha1_HorizontalPodAutoscalerSpec is an autogenerated conversion function.
+func Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v2alpha1_HorizontalPodAutoscalerSpec(in *autoscaling.HorizontalPodAutoscalerSpec, out *HorizontalPodAutoscalerSpec, s conversion.Scope) error {
+ return autoConvert_autoscaling_HorizontalPodAutoscalerSpec_To_v2alpha1_HorizontalPodAutoscalerSpec(in, out, s)
+}
+
+func autoConvert_v2alpha1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in *HorizontalPodAutoscalerStatus, out *autoscaling.HorizontalPodAutoscalerStatus, s conversion.Scope) error {
+ out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration))
+ out.LastScaleTime = (*meta_v1.Time)(unsafe.Pointer(in.LastScaleTime))
+ out.CurrentReplicas = in.CurrentReplicas
+ out.DesiredReplicas = in.DesiredReplicas
+ out.CurrentMetrics = *(*[]autoscaling.MetricStatus)(unsafe.Pointer(&in.CurrentMetrics))
+ out.Conditions = *(*[]autoscaling.HorizontalPodAutoscalerCondition)(unsafe.Pointer(&in.Conditions))
+ return nil
+}
+
+// Convert_v2alpha1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus is an autogenerated conversion function.
+func Convert_v2alpha1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in *HorizontalPodAutoscalerStatus, out *autoscaling.HorizontalPodAutoscalerStatus, s conversion.Scope) error {
+ return autoConvert_v2alpha1_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in, out, s)
+}
+
+func autoConvert_autoscaling_HorizontalPodAutoscalerStatus_To_v2alpha1_HorizontalPodAutoscalerStatus(in *autoscaling.HorizontalPodAutoscalerStatus, out *HorizontalPodAutoscalerStatus, s conversion.Scope) error {
+ out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration))
+ out.LastScaleTime = (*meta_v1.Time)(unsafe.Pointer(in.LastScaleTime))
+ out.CurrentReplicas = in.CurrentReplicas
+ out.DesiredReplicas = in.DesiredReplicas
+ if in.CurrentMetrics == nil {
+ out.CurrentMetrics = make([]MetricStatus, 0)
+ } else {
+ out.CurrentMetrics = *(*[]MetricStatus)(unsafe.Pointer(&in.CurrentMetrics))
+ }
+ if in.Conditions == nil {
+ out.Conditions = make([]HorizontalPodAutoscalerCondition, 0)
+ } else {
+ out.Conditions = *(*[]HorizontalPodAutoscalerCondition)(unsafe.Pointer(&in.Conditions))
+ }
+ return nil
+}
+
+// Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v2alpha1_HorizontalPodAutoscalerStatus is an autogenerated conversion function.
+func Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v2alpha1_HorizontalPodAutoscalerStatus(in *autoscaling.HorizontalPodAutoscalerStatus, out *HorizontalPodAutoscalerStatus, s conversion.Scope) error {
+ return autoConvert_autoscaling_HorizontalPodAutoscalerStatus_To_v2alpha1_HorizontalPodAutoscalerStatus(in, out, s)
+}
+
+func autoConvert_v2alpha1_MetricSpec_To_autoscaling_MetricSpec(in *MetricSpec, out *autoscaling.MetricSpec, s conversion.Scope) error {
+ out.Type = autoscaling.MetricSourceType(in.Type)
+ out.Object = (*autoscaling.ObjectMetricSource)(unsafe.Pointer(in.Object))
+ out.Pods = (*autoscaling.PodsMetricSource)(unsafe.Pointer(in.Pods))
+ out.Resource = (*autoscaling.ResourceMetricSource)(unsafe.Pointer(in.Resource))
+ return nil
+}
+
+// Convert_v2alpha1_MetricSpec_To_autoscaling_MetricSpec is an autogenerated conversion function.
+func Convert_v2alpha1_MetricSpec_To_autoscaling_MetricSpec(in *MetricSpec, out *autoscaling.MetricSpec, s conversion.Scope) error {
+ return autoConvert_v2alpha1_MetricSpec_To_autoscaling_MetricSpec(in, out, s)
+}
+
+func autoConvert_autoscaling_MetricSpec_To_v2alpha1_MetricSpec(in *autoscaling.MetricSpec, out *MetricSpec, s conversion.Scope) error {
+ out.Type = MetricSourceType(in.Type)
+ out.Object = (*ObjectMetricSource)(unsafe.Pointer(in.Object))
+ out.Pods = (*PodsMetricSource)(unsafe.Pointer(in.Pods))
+ out.Resource = (*ResourceMetricSource)(unsafe.Pointer(in.Resource))
+ return nil
+}
+
+// Convert_autoscaling_MetricSpec_To_v2alpha1_MetricSpec is an autogenerated conversion function.
+func Convert_autoscaling_MetricSpec_To_v2alpha1_MetricSpec(in *autoscaling.MetricSpec, out *MetricSpec, s conversion.Scope) error {
+ return autoConvert_autoscaling_MetricSpec_To_v2alpha1_MetricSpec(in, out, s)
+}
+
+func autoConvert_v2alpha1_MetricStatus_To_autoscaling_MetricStatus(in *MetricStatus, out *autoscaling.MetricStatus, s conversion.Scope) error {
+ out.Type = autoscaling.MetricSourceType(in.Type)
+ out.Object = (*autoscaling.ObjectMetricStatus)(unsafe.Pointer(in.Object))
+ out.Pods = (*autoscaling.PodsMetricStatus)(unsafe.Pointer(in.Pods))
+ out.Resource = (*autoscaling.ResourceMetricStatus)(unsafe.Pointer(in.Resource))
+ return nil
+}
+
+// Convert_v2alpha1_MetricStatus_To_autoscaling_MetricStatus is an autogenerated conversion function.
+func Convert_v2alpha1_MetricStatus_To_autoscaling_MetricStatus(in *MetricStatus, out *autoscaling.MetricStatus, s conversion.Scope) error {
+ return autoConvert_v2alpha1_MetricStatus_To_autoscaling_MetricStatus(in, out, s)
+}
+
+func autoConvert_autoscaling_MetricStatus_To_v2alpha1_MetricStatus(in *autoscaling.MetricStatus, out *MetricStatus, s conversion.Scope) error {
+ out.Type = MetricSourceType(in.Type)
+ out.Object = (*ObjectMetricStatus)(unsafe.Pointer(in.Object))
+ out.Pods = (*PodsMetricStatus)(unsafe.Pointer(in.Pods))
+ out.Resource = (*ResourceMetricStatus)(unsafe.Pointer(in.Resource))
+ return nil
+}
+
+// Convert_autoscaling_MetricStatus_To_v2alpha1_MetricStatus is an autogenerated conversion function.
+func Convert_autoscaling_MetricStatus_To_v2alpha1_MetricStatus(in *autoscaling.MetricStatus, out *MetricStatus, s conversion.Scope) error {
+ return autoConvert_autoscaling_MetricStatus_To_v2alpha1_MetricStatus(in, out, s)
+}
+
+func autoConvert_v2alpha1_ObjectMetricSource_To_autoscaling_ObjectMetricSource(in *ObjectMetricSource, out *autoscaling.ObjectMetricSource, s conversion.Scope) error {
+ if err := Convert_v2alpha1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(&in.Target, &out.Target, s); err != nil {
+ return err
+ }
+ out.MetricName = in.MetricName
+ out.TargetValue = in.TargetValue
+ return nil
+}
+
+// Convert_v2alpha1_ObjectMetricSource_To_autoscaling_ObjectMetricSource is an autogenerated conversion function.
+func Convert_v2alpha1_ObjectMetricSource_To_autoscaling_ObjectMetricSource(in *ObjectMetricSource, out *autoscaling.ObjectMetricSource, s conversion.Scope) error {
+ return autoConvert_v2alpha1_ObjectMetricSource_To_autoscaling_ObjectMetricSource(in, out, s)
+}
+
+func autoConvert_autoscaling_ObjectMetricSource_To_v2alpha1_ObjectMetricSource(in *autoscaling.ObjectMetricSource, out *ObjectMetricSource, s conversion.Scope) error {
+ if err := Convert_autoscaling_CrossVersionObjectReference_To_v2alpha1_CrossVersionObjectReference(&in.Target, &out.Target, s); err != nil {
+ return err
+ }
+ out.MetricName = in.MetricName
+ out.TargetValue = in.TargetValue
+ return nil
+}
+
+// Convert_autoscaling_ObjectMetricSource_To_v2alpha1_ObjectMetricSource is an autogenerated conversion function.
+func Convert_autoscaling_ObjectMetricSource_To_v2alpha1_ObjectMetricSource(in *autoscaling.ObjectMetricSource, out *ObjectMetricSource, s conversion.Scope) error {
+ return autoConvert_autoscaling_ObjectMetricSource_To_v2alpha1_ObjectMetricSource(in, out, s)
+}
+
+func autoConvert_v2alpha1_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus(in *ObjectMetricStatus, out *autoscaling.ObjectMetricStatus, s conversion.Scope) error {
+ if err := Convert_v2alpha1_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(&in.Target, &out.Target, s); err != nil {
+ return err
+ }
+ out.MetricName = in.MetricName
+ out.CurrentValue = in.CurrentValue
+ return nil
+}
+
+// Convert_v2alpha1_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus is an autogenerated conversion function.
+func Convert_v2alpha1_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus(in *ObjectMetricStatus, out *autoscaling.ObjectMetricStatus, s conversion.Scope) error {
+ return autoConvert_v2alpha1_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus(in, out, s)
+}
+
+func autoConvert_autoscaling_ObjectMetricStatus_To_v2alpha1_ObjectMetricStatus(in *autoscaling.ObjectMetricStatus, out *ObjectMetricStatus, s conversion.Scope) error {
+ if err := Convert_autoscaling_CrossVersionObjectReference_To_v2alpha1_CrossVersionObjectReference(&in.Target, &out.Target, s); err != nil {
+ return err
+ }
+ out.MetricName = in.MetricName
+ out.CurrentValue = in.CurrentValue
+ return nil
+}
+
+// Convert_autoscaling_ObjectMetricStatus_To_v2alpha1_ObjectMetricStatus is an autogenerated conversion function.
+func Convert_autoscaling_ObjectMetricStatus_To_v2alpha1_ObjectMetricStatus(in *autoscaling.ObjectMetricStatus, out *ObjectMetricStatus, s conversion.Scope) error {
+ return autoConvert_autoscaling_ObjectMetricStatus_To_v2alpha1_ObjectMetricStatus(in, out, s)
+}
+
+func autoConvert_v2alpha1_PodsMetricSource_To_autoscaling_PodsMetricSource(in *PodsMetricSource, out *autoscaling.PodsMetricSource, s conversion.Scope) error {
+ out.MetricName = in.MetricName
+ out.TargetAverageValue = in.TargetAverageValue
+ return nil
+}
+
+// Convert_v2alpha1_PodsMetricSource_To_autoscaling_PodsMetricSource is an autogenerated conversion function.
+func Convert_v2alpha1_PodsMetricSource_To_autoscaling_PodsMetricSource(in *PodsMetricSource, out *autoscaling.PodsMetricSource, s conversion.Scope) error {
+ return autoConvert_v2alpha1_PodsMetricSource_To_autoscaling_PodsMetricSource(in, out, s)
+}
+
+func autoConvert_autoscaling_PodsMetricSource_To_v2alpha1_PodsMetricSource(in *autoscaling.PodsMetricSource, out *PodsMetricSource, s conversion.Scope) error {
+ out.MetricName = in.MetricName
+ out.TargetAverageValue = in.TargetAverageValue
+ return nil
+}
+
+// Convert_autoscaling_PodsMetricSource_To_v2alpha1_PodsMetricSource is an autogenerated conversion function.
+func Convert_autoscaling_PodsMetricSource_To_v2alpha1_PodsMetricSource(in *autoscaling.PodsMetricSource, out *PodsMetricSource, s conversion.Scope) error {
+ return autoConvert_autoscaling_PodsMetricSource_To_v2alpha1_PodsMetricSource(in, out, s)
+}
+
+func autoConvert_v2alpha1_PodsMetricStatus_To_autoscaling_PodsMetricStatus(in *PodsMetricStatus, out *autoscaling.PodsMetricStatus, s conversion.Scope) error {
+ out.MetricName = in.MetricName
+ out.CurrentAverageValue = in.CurrentAverageValue
+ return nil
+}
+
+// Convert_v2alpha1_PodsMetricStatus_To_autoscaling_PodsMetricStatus is an autogenerated conversion function.
+func Convert_v2alpha1_PodsMetricStatus_To_autoscaling_PodsMetricStatus(in *PodsMetricStatus, out *autoscaling.PodsMetricStatus, s conversion.Scope) error {
+ return autoConvert_v2alpha1_PodsMetricStatus_To_autoscaling_PodsMetricStatus(in, out, s)
+}
+
+func autoConvert_autoscaling_PodsMetricStatus_To_v2alpha1_PodsMetricStatus(in *autoscaling.PodsMetricStatus, out *PodsMetricStatus, s conversion.Scope) error {
+ out.MetricName = in.MetricName
+ out.CurrentAverageValue = in.CurrentAverageValue
+ return nil
+}
+
+// Convert_autoscaling_PodsMetricStatus_To_v2alpha1_PodsMetricStatus is an autogenerated conversion function.
+func Convert_autoscaling_PodsMetricStatus_To_v2alpha1_PodsMetricStatus(in *autoscaling.PodsMetricStatus, out *PodsMetricStatus, s conversion.Scope) error {
+ return autoConvert_autoscaling_PodsMetricStatus_To_v2alpha1_PodsMetricStatus(in, out, s)
+}
+
+func autoConvert_v2alpha1_ResourceMetricSource_To_autoscaling_ResourceMetricSource(in *ResourceMetricSource, out *autoscaling.ResourceMetricSource, s conversion.Scope) error {
+ out.Name = api.ResourceName(in.Name)
+ out.TargetAverageUtilization = (*int32)(unsafe.Pointer(in.TargetAverageUtilization))
+ out.TargetAverageValue = (*resource.Quantity)(unsafe.Pointer(in.TargetAverageValue))
+ return nil
+}
+
+// Convert_v2alpha1_ResourceMetricSource_To_autoscaling_ResourceMetricSource is an autogenerated conversion function.
+func Convert_v2alpha1_ResourceMetricSource_To_autoscaling_ResourceMetricSource(in *ResourceMetricSource, out *autoscaling.ResourceMetricSource, s conversion.Scope) error {
+ return autoConvert_v2alpha1_ResourceMetricSource_To_autoscaling_ResourceMetricSource(in, out, s)
+}
+
+func autoConvert_autoscaling_ResourceMetricSource_To_v2alpha1_ResourceMetricSource(in *autoscaling.ResourceMetricSource, out *ResourceMetricSource, s conversion.Scope) error {
+ out.Name = v1.ResourceName(in.Name)
+ out.TargetAverageUtilization = (*int32)(unsafe.Pointer(in.TargetAverageUtilization))
+ out.TargetAverageValue = (*resource.Quantity)(unsafe.Pointer(in.TargetAverageValue))
+ return nil
+}
+
+// Convert_autoscaling_ResourceMetricSource_To_v2alpha1_ResourceMetricSource is an autogenerated conversion function.
+func Convert_autoscaling_ResourceMetricSource_To_v2alpha1_ResourceMetricSource(in *autoscaling.ResourceMetricSource, out *ResourceMetricSource, s conversion.Scope) error {
+ return autoConvert_autoscaling_ResourceMetricSource_To_v2alpha1_ResourceMetricSource(in, out, s)
+}
+
+func autoConvert_v2alpha1_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus(in *ResourceMetricStatus, out *autoscaling.ResourceMetricStatus, s conversion.Scope) error {
+ out.Name = api.ResourceName(in.Name)
+ out.CurrentAverageUtilization = (*int32)(unsafe.Pointer(in.CurrentAverageUtilization))
+ out.CurrentAverageValue = in.CurrentAverageValue
+ return nil
+}
+
+// Convert_v2alpha1_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus is an autogenerated conversion function.
+func Convert_v2alpha1_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus(in *ResourceMetricStatus, out *autoscaling.ResourceMetricStatus, s conversion.Scope) error {
+ return autoConvert_v2alpha1_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus(in, out, s)
+}
+
+func autoConvert_autoscaling_ResourceMetricStatus_To_v2alpha1_ResourceMetricStatus(in *autoscaling.ResourceMetricStatus, out *ResourceMetricStatus, s conversion.Scope) error {
+ out.Name = v1.ResourceName(in.Name)
+ out.CurrentAverageUtilization = (*int32)(unsafe.Pointer(in.CurrentAverageUtilization))
+ out.CurrentAverageValue = in.CurrentAverageValue
+ return nil
+}
+
+// Convert_autoscaling_ResourceMetricStatus_To_v2alpha1_ResourceMetricStatus is an autogenerated conversion function.
+func Convert_autoscaling_ResourceMetricStatus_To_v2alpha1_ResourceMetricStatus(in *autoscaling.ResourceMetricStatus, out *ResourceMetricStatus, s conversion.Scope) error {
+ return autoConvert_autoscaling_ResourceMetricStatus_To_v2alpha1_ResourceMetricStatus(in, out, s)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..9a9dd690e
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/zz_generated.deepcopy.go
@@ -0,0 +1,319 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v2alpha1
+
+import (
+ resource "k8s.io/apimachinery/pkg/api/resource"
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_CrossVersionObjectReference, InType: reflect.TypeOf(&CrossVersionObjectReference{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_HorizontalPodAutoscaler, InType: reflect.TypeOf(&HorizontalPodAutoscaler{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_HorizontalPodAutoscalerCondition, InType: reflect.TypeOf(&HorizontalPodAutoscalerCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_HorizontalPodAutoscalerList, InType: reflect.TypeOf(&HorizontalPodAutoscalerList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_HorizontalPodAutoscalerSpec, InType: reflect.TypeOf(&HorizontalPodAutoscalerSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_HorizontalPodAutoscalerStatus, InType: reflect.TypeOf(&HorizontalPodAutoscalerStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_MetricSpec, InType: reflect.TypeOf(&MetricSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_MetricStatus, InType: reflect.TypeOf(&MetricStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_ObjectMetricSource, InType: reflect.TypeOf(&ObjectMetricSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_ObjectMetricStatus, InType: reflect.TypeOf(&ObjectMetricStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_PodsMetricSource, InType: reflect.TypeOf(&PodsMetricSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_PodsMetricStatus, InType: reflect.TypeOf(&PodsMetricStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_ResourceMetricSource, InType: reflect.TypeOf(&ResourceMetricSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_ResourceMetricStatus, InType: reflect.TypeOf(&ResourceMetricStatus{})},
+ )
+}
+
+// DeepCopy_v2alpha1_CrossVersionObjectReference is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_CrossVersionObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CrossVersionObjectReference)
+ out := out.(*CrossVersionObjectReference)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_HorizontalPodAutoscaler is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_HorizontalPodAutoscaler(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscaler)
+ out := out.(*HorizontalPodAutoscaler)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v2alpha1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v2alpha1_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_HorizontalPodAutoscalerCondition is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_HorizontalPodAutoscalerCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscalerCondition)
+ out := out.(*HorizontalPodAutoscalerCondition)
+ *out = *in
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_HorizontalPodAutoscalerList is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_HorizontalPodAutoscalerList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscalerList)
+ out := out.(*HorizontalPodAutoscalerList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]HorizontalPodAutoscaler, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v2alpha1_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_HorizontalPodAutoscalerSpec is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_HorizontalPodAutoscalerSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscalerSpec)
+ out := out.(*HorizontalPodAutoscalerSpec)
+ *out = *in
+ if in.MinReplicas != nil {
+ in, out := &in.MinReplicas, &out.MinReplicas
+ *out = new(int32)
+ **out = **in
+ }
+ if in.Metrics != nil {
+ in, out := &in.Metrics, &out.Metrics
+ *out = make([]MetricSpec, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v2alpha1_MetricSpec(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_HorizontalPodAutoscalerStatus is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_HorizontalPodAutoscalerStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscalerStatus)
+ out := out.(*HorizontalPodAutoscalerStatus)
+ *out = *in
+ if in.ObservedGeneration != nil {
+ in, out := &in.ObservedGeneration, &out.ObservedGeneration
+ *out = new(int64)
+ **out = **in
+ }
+ if in.LastScaleTime != nil {
+ in, out := &in.LastScaleTime, &out.LastScaleTime
+ *out = new(v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ if in.CurrentMetrics != nil {
+ in, out := &in.CurrentMetrics, &out.CurrentMetrics
+ *out = make([]MetricStatus, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v2alpha1_MetricStatus(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]HorizontalPodAutoscalerCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v2alpha1_HorizontalPodAutoscalerCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_MetricSpec is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_MetricSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*MetricSpec)
+ out := out.(*MetricSpec)
+ *out = *in
+ if in.Object != nil {
+ in, out := &in.Object, &out.Object
+ *out = new(ObjectMetricSource)
+ if err := DeepCopy_v2alpha1_ObjectMetricSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Pods != nil {
+ in, out := &in.Pods, &out.Pods
+ *out = new(PodsMetricSource)
+ if err := DeepCopy_v2alpha1_PodsMetricSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Resource != nil {
+ in, out := &in.Resource, &out.Resource
+ *out = new(ResourceMetricSource)
+ if err := DeepCopy_v2alpha1_ResourceMetricSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_MetricStatus is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_MetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*MetricStatus)
+ out := out.(*MetricStatus)
+ *out = *in
+ if in.Object != nil {
+ in, out := &in.Object, &out.Object
+ *out = new(ObjectMetricStatus)
+ if err := DeepCopy_v2alpha1_ObjectMetricStatus(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Pods != nil {
+ in, out := &in.Pods, &out.Pods
+ *out = new(PodsMetricStatus)
+ if err := DeepCopy_v2alpha1_PodsMetricStatus(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Resource != nil {
+ in, out := &in.Resource, &out.Resource
+ *out = new(ResourceMetricStatus)
+ if err := DeepCopy_v2alpha1_ResourceMetricStatus(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_ObjectMetricSource is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_ObjectMetricSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ObjectMetricSource)
+ out := out.(*ObjectMetricSource)
+ *out = *in
+ out.TargetValue = in.TargetValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_ObjectMetricStatus is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_ObjectMetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ObjectMetricStatus)
+ out := out.(*ObjectMetricStatus)
+ *out = *in
+ out.CurrentValue = in.CurrentValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_PodsMetricSource is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_PodsMetricSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodsMetricSource)
+ out := out.(*PodsMetricSource)
+ *out = *in
+ out.TargetAverageValue = in.TargetAverageValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_PodsMetricStatus is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_PodsMetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodsMetricStatus)
+ out := out.(*PodsMetricStatus)
+ *out = *in
+ out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_ResourceMetricSource is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_ResourceMetricSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceMetricSource)
+ out := out.(*ResourceMetricSource)
+ *out = *in
+ if in.TargetAverageUtilization != nil {
+ in, out := &in.TargetAverageUtilization, &out.TargetAverageUtilization
+ *out = new(int32)
+ **out = **in
+ }
+ if in.TargetAverageValue != nil {
+ in, out := &in.TargetAverageValue, &out.TargetAverageValue
+ *out = new(resource.Quantity)
+ **out = (*in).DeepCopy()
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_ResourceMetricStatus is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_ResourceMetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceMetricStatus)
+ out := out.(*ResourceMetricStatus)
+ *out = *in
+ if in.CurrentAverageUtilization != nil {
+ in, out := &in.CurrentAverageUtilization, &out.CurrentAverageUtilization
+ *out = new(int32)
+ **out = **in
+ }
+ out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy()
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/zz_generated.defaults.go
new file mode 100644
index 000000000..eb20be97c
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1/zz_generated.defaults.go
@@ -0,0 +1,47 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v2alpha1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ scheme.AddTypeDefaultingFunc(&HorizontalPodAutoscaler{}, func(obj interface{}) { SetObjectDefaults_HorizontalPodAutoscaler(obj.(*HorizontalPodAutoscaler)) })
+ scheme.AddTypeDefaultingFunc(&HorizontalPodAutoscalerList{}, func(obj interface{}) {
+ SetObjectDefaults_HorizontalPodAutoscalerList(obj.(*HorizontalPodAutoscalerList))
+ })
+ return nil
+}
+
+func SetObjectDefaults_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler) {
+ SetDefaults_HorizontalPodAutoscaler(in)
+}
+
+func SetObjectDefaults_HorizontalPodAutoscalerList(in *HorizontalPodAutoscalerList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_HorizontalPodAutoscaler(a)
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/zz_generated.deepcopy.go
new file mode 100644
index 000000000..a15d9b32b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/zz_generated.deepcopy.go
@@ -0,0 +1,357 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package autoscaling
+
+import (
+ resource "k8s.io/apimachinery/pkg/api/resource"
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_CrossVersionObjectReference, InType: reflect.TypeOf(&CrossVersionObjectReference{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscaler, InType: reflect.TypeOf(&HorizontalPodAutoscaler{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscalerCondition, InType: reflect.TypeOf(&HorizontalPodAutoscalerCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscalerList, InType: reflect.TypeOf(&HorizontalPodAutoscalerList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscalerSpec, InType: reflect.TypeOf(&HorizontalPodAutoscalerSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_HorizontalPodAutoscalerStatus, InType: reflect.TypeOf(&HorizontalPodAutoscalerStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_MetricSpec, InType: reflect.TypeOf(&MetricSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_MetricStatus, InType: reflect.TypeOf(&MetricStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ObjectMetricSource, InType: reflect.TypeOf(&ObjectMetricSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ObjectMetricStatus, InType: reflect.TypeOf(&ObjectMetricStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_PodsMetricSource, InType: reflect.TypeOf(&PodsMetricSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_PodsMetricStatus, InType: reflect.TypeOf(&PodsMetricStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ResourceMetricSource, InType: reflect.TypeOf(&ResourceMetricSource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ResourceMetricStatus, InType: reflect.TypeOf(&ResourceMetricStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_Scale, InType: reflect.TypeOf(&Scale{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ScaleSpec, InType: reflect.TypeOf(&ScaleSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_autoscaling_ScaleStatus, InType: reflect.TypeOf(&ScaleStatus{})},
+ )
+}
+
+// DeepCopy_autoscaling_CrossVersionObjectReference is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_CrossVersionObjectReference(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CrossVersionObjectReference)
+ out := out.(*CrossVersionObjectReference)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_HorizontalPodAutoscaler is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_HorizontalPodAutoscaler(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscaler)
+ out := out.(*HorizontalPodAutoscaler)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_autoscaling_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_autoscaling_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_HorizontalPodAutoscalerCondition is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_HorizontalPodAutoscalerCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscalerCondition)
+ out := out.(*HorizontalPodAutoscalerCondition)
+ *out = *in
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_HorizontalPodAutoscalerList is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_HorizontalPodAutoscalerList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscalerList)
+ out := out.(*HorizontalPodAutoscalerList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]HorizontalPodAutoscaler, len(*in))
+ for i := range *in {
+ if err := DeepCopy_autoscaling_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_HorizontalPodAutoscalerSpec is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_HorizontalPodAutoscalerSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscalerSpec)
+ out := out.(*HorizontalPodAutoscalerSpec)
+ *out = *in
+ if in.MinReplicas != nil {
+ in, out := &in.MinReplicas, &out.MinReplicas
+ *out = new(int32)
+ **out = **in
+ }
+ if in.Metrics != nil {
+ in, out := &in.Metrics, &out.Metrics
+ *out = make([]MetricSpec, len(*in))
+ for i := range *in {
+ if err := DeepCopy_autoscaling_MetricSpec(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_HorizontalPodAutoscalerStatus is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_HorizontalPodAutoscalerStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HorizontalPodAutoscalerStatus)
+ out := out.(*HorizontalPodAutoscalerStatus)
+ *out = *in
+ if in.ObservedGeneration != nil {
+ in, out := &in.ObservedGeneration, &out.ObservedGeneration
+ *out = new(int64)
+ **out = **in
+ }
+ if in.LastScaleTime != nil {
+ in, out := &in.LastScaleTime, &out.LastScaleTime
+ *out = new(v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ if in.CurrentMetrics != nil {
+ in, out := &in.CurrentMetrics, &out.CurrentMetrics
+ *out = make([]MetricStatus, len(*in))
+ for i := range *in {
+ if err := DeepCopy_autoscaling_MetricStatus(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]HorizontalPodAutoscalerCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_autoscaling_HorizontalPodAutoscalerCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_MetricSpec is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_MetricSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*MetricSpec)
+ out := out.(*MetricSpec)
+ *out = *in
+ if in.Object != nil {
+ in, out := &in.Object, &out.Object
+ *out = new(ObjectMetricSource)
+ if err := DeepCopy_autoscaling_ObjectMetricSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Pods != nil {
+ in, out := &in.Pods, &out.Pods
+ *out = new(PodsMetricSource)
+ if err := DeepCopy_autoscaling_PodsMetricSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Resource != nil {
+ in, out := &in.Resource, &out.Resource
+ *out = new(ResourceMetricSource)
+ if err := DeepCopy_autoscaling_ResourceMetricSource(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_MetricStatus is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_MetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*MetricStatus)
+ out := out.(*MetricStatus)
+ *out = *in
+ if in.Object != nil {
+ in, out := &in.Object, &out.Object
+ *out = new(ObjectMetricStatus)
+ if err := DeepCopy_autoscaling_ObjectMetricStatus(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Pods != nil {
+ in, out := &in.Pods, &out.Pods
+ *out = new(PodsMetricStatus)
+ if err := DeepCopy_autoscaling_PodsMetricStatus(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ if in.Resource != nil {
+ in, out := &in.Resource, &out.Resource
+ *out = new(ResourceMetricStatus)
+ if err := DeepCopy_autoscaling_ResourceMetricStatus(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_ObjectMetricSource is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_ObjectMetricSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ObjectMetricSource)
+ out := out.(*ObjectMetricSource)
+ *out = *in
+ out.TargetValue = in.TargetValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_ObjectMetricStatus is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_ObjectMetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ObjectMetricStatus)
+ out := out.(*ObjectMetricStatus)
+ *out = *in
+ out.CurrentValue = in.CurrentValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_PodsMetricSource is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_PodsMetricSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodsMetricSource)
+ out := out.(*PodsMetricSource)
+ *out = *in
+ out.TargetAverageValue = in.TargetAverageValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_PodsMetricStatus is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_PodsMetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodsMetricStatus)
+ out := out.(*PodsMetricStatus)
+ *out = *in
+ out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_ResourceMetricSource is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_ResourceMetricSource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceMetricSource)
+ out := out.(*ResourceMetricSource)
+ *out = *in
+ if in.TargetAverageUtilization != nil {
+ in, out := &in.TargetAverageUtilization, &out.TargetAverageUtilization
+ *out = new(int32)
+ **out = **in
+ }
+ if in.TargetAverageValue != nil {
+ in, out := &in.TargetAverageValue, &out.TargetAverageValue
+ *out = new(resource.Quantity)
+ **out = (*in).DeepCopy()
+ }
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_ResourceMetricStatus is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_ResourceMetricStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ResourceMetricStatus)
+ out := out.(*ResourceMetricStatus)
+ *out = *in
+ if in.CurrentAverageUtilization != nil {
+ in, out := &in.CurrentAverageUtilization, &out.CurrentAverageUtilization
+ *out = new(int32)
+ **out = **in
+ }
+ out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_Scale is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_Scale(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Scale)
+ out := out.(*Scale)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_ScaleSpec is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_ScaleSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ScaleSpec)
+ out := out.(*ScaleSpec)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_autoscaling_ScaleStatus is an autogenerated deepcopy function.
+func DeepCopy_autoscaling_ScaleStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ScaleStatus)
+ out := out.(*ScaleStatus)
+ *out = *in
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/doc.go
new file mode 100644
index 000000000..9b2b792bd
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+
+package batch // import "k8s.io/kubernetes/pkg/apis/batch"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/install/install.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/install/install.go
new file mode 100644
index 000000000..90befc2e2
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/install/install.go
@@ -0,0 +1,51 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package install installs the batch API group, making it available as
+// an option to all of the API encoding/decoding machinery.
+package install
+
+import (
+ "k8s.io/apimachinery/pkg/apimachinery/announced"
+ "k8s.io/apimachinery/pkg/apimachinery/registered"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/batch"
+ "k8s.io/kubernetes/pkg/apis/batch/v1"
+ "k8s.io/kubernetes/pkg/apis/batch/v2alpha1"
+)
+
+func init() {
+ Install(api.GroupFactoryRegistry, api.Registry, api.Scheme)
+}
+
+// Install registers the API group and adds types to a scheme
+func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
+ if err := announced.NewGroupMetaFactory(
+ &announced.GroupMetaFactoryArgs{
+ GroupName: batch.GroupName,
+ VersionPreferenceOrder: []string{v1.SchemeGroupVersion.Version, v2alpha1.SchemeGroupVersion.Version},
+ ImportPrefix: "k8s.io/kubernetes/pkg/apis/batch",
+ AddInternalObjectsToScheme: batch.AddToScheme,
+ },
+ announced.VersionToSchemeFunc{
+ v1.SchemeGroupVersion.Version: v1.AddToScheme,
+ v2alpha1.SchemeGroupVersion.Version: v2alpha1.AddToScheme,
+ },
+ ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil {
+ panic(err)
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/register.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/register.go
new file mode 100644
index 000000000..4601ca4ec
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/register.go
@@ -0,0 +1,57 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package batch
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "batch"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Job{},
+ &JobList{},
+ &JobTemplate{},
+ &CronJob{},
+ &CronJobList{},
+ )
+ scheme.AddKnownTypeWithName(SchemeGroupVersion.WithKind("ScheduledJob"), &CronJob{})
+ scheme.AddKnownTypeWithName(SchemeGroupVersion.WithKind("ScheduledJobList"), &CronJobList{})
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/types.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/types.go
new file mode 100644
index 000000000..4437023aa
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/types.go
@@ -0,0 +1,285 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package batch
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/kubernetes/pkg/api"
+)
+
+// +genclient=true
+
+// Job represents the configuration of a single job.
+type Job struct {
+ metav1.TypeMeta
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta
+
+ // Specification of the desired behavior of a job.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec JobSpec
+
+ // Current status of a job.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status JobStatus
+}
+
+// JobList is a collection of jobs.
+type JobList struct {
+ metav1.TypeMeta
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta
+
+ // items is the list of Jobs.
+ Items []Job
+}
+
+// JobTemplate describes a template for creating copies of a predefined pod.
+type JobTemplate struct {
+ metav1.TypeMeta
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta
+
+ // Defines jobs that will be created from this template.
+ // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Template JobTemplateSpec
+}
+
+// JobTemplateSpec describes the data a Job should have when created from a template
+type JobTemplateSpec struct {
+ // Standard object's metadata of the jobs created from this template.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta
+
+ // Specification of the desired behavior of the job.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec JobSpec
+}
+
+// JobSpec describes how the job execution will look like.
+type JobSpec struct {
+
+ // Specifies the maximum desired number of pods the job should
+ // run at any given time. The actual number of pods running in steady state will
+ // be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism),
+ // i.e. when the work left to do is less than max parallelism.
+ // +optional
+ Parallelism *int32
+
+ // Specifies the desired number of successfully finished pods the
+ // job should be run with. Setting to nil means that the success of any
+ // pod signals the success of all pods, and allows parallelism to have any positive
+ // value. Setting to 1 means that parallelism is limited to 1 and the success of that
+ // pod signals the success of the job.
+ // +optional
+ Completions *int32
+
+ // Optional duration in seconds relative to the startTime that the job may be active
+ // before the system tries to terminate it; value must be positive integer
+ // +optional
+ ActiveDeadlineSeconds *int64
+
+ // A label query over pods that should match the pod count.
+ // Normally, the system sets this field for you.
+ // +optional
+ Selector *metav1.LabelSelector
+
+ // manualSelector controls generation of pod labels and pod selectors.
+ // Leave `manualSelector` unset unless you are certain what you are doing.
+ // When false or unset, the system pick labels unique to this job
+ // and appends those labels to the pod template. When true,
+ // the user is responsible for picking unique labels and specifying
+ // the selector. Failure to pick a unique label may cause this
+ // and other jobs to not function correctly. However, You may see
+ // `manualSelector=true` in jobs that were created with the old `extensions/v1beta1`
+ // API.
+ // +optional
+ ManualSelector *bool
+
+ // Describes the pod that will be created when executing a job.
+ Template api.PodTemplateSpec
+}
+
+// JobStatus represents the current state of a Job.
+type JobStatus struct {
+
+ // The latest available observations of an object's current state.
+ // +optional
+ Conditions []JobCondition
+
+ // Represents time when the job was acknowledged by the job controller.
+ // It is not guaranteed to be set in happens-before order across separate operations.
+ // It is represented in RFC3339 form and is in UTC.
+ // +optional
+ StartTime *metav1.Time
+
+ // Represents time when the job was completed. It is not guaranteed to
+ // be set in happens-before order across separate operations.
+ // It is represented in RFC3339 form and is in UTC.
+ // +optional
+ CompletionTime *metav1.Time
+
+ // The number of actively running pods.
+ // +optional
+ Active int32
+
+ // The number of pods which reached phase Succeeded.
+ // +optional
+ Succeeded int32
+
+ // The number of pods which reached phase Failed.
+ // +optional
+ Failed int32
+}
+
+type JobConditionType string
+
+// These are valid conditions of a job.
+const (
+ // JobComplete means the job has completed its execution.
+ JobComplete JobConditionType = "Complete"
+ // JobFailed means the job has failed its execution.
+ JobFailed JobConditionType = "Failed"
+)
+
+// JobCondition describes current state of a job.
+type JobCondition struct {
+ // Type of job condition, Complete or Failed.
+ Type JobConditionType
+ // Status of the condition, one of True, False, Unknown.
+ Status api.ConditionStatus
+ // Last time the condition was checked.
+ // +optional
+ LastProbeTime metav1.Time
+ // Last time the condition transit from one status to another.
+ // +optional
+ LastTransitionTime metav1.Time
+ // (brief) reason for the condition's last transition.
+ // +optional
+ Reason string
+ // Human readable message indicating details about last transition.
+ // +optional
+ Message string
+}
+
+// +genclient=true
+
+// CronJob represents the configuration of a single cron job.
+type CronJob struct {
+ metav1.TypeMeta
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta
+
+ // Specification of the desired behavior of a cron job, including the schedule.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec CronJobSpec
+
+ // Current status of a cron job.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status CronJobStatus
+}
+
+// CronJobList is a collection of cron jobs.
+type CronJobList struct {
+ metav1.TypeMeta
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta
+
+ // items is the list of CronJobs.
+ Items []CronJob
+}
+
+// CronJobSpec describes how the job execution will look like and when it will actually run.
+type CronJobSpec struct {
+
+ // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
+ Schedule string
+
+ // Optional deadline in seconds for starting the job if it misses scheduled
+ // time for any reason. Missed jobs executions will be counted as failed ones.
+ // +optional
+ StartingDeadlineSeconds *int64
+
+ // Specifies how to treat concurrent executions of a Job.
+ // Defaults to Allow.
+ // +optional
+ ConcurrencyPolicy ConcurrencyPolicy
+
+ // This flag tells the controller to suspend subsequent executions, it does
+ // not apply to already started executions. Defaults to false.
+ // +optional
+ Suspend *bool
+
+ // Specifies the job that will be created when executing a CronJob.
+ JobTemplate JobTemplateSpec
+
+ // The number of successful finished jobs to retain.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ // +optional
+ SuccessfulJobsHistoryLimit *int32
+
+ // The number of failed finished jobs to retain.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ // +optional
+ FailedJobsHistoryLimit *int32
+}
+
+// ConcurrencyPolicy describes how the job will be handled.
+// Only one of the following concurrent policies may be specified.
+// If none of the following policies is specified, the default one
+// is AllowConcurrent.
+type ConcurrencyPolicy string
+
+const (
+ // AllowConcurrent allows CronJobs to run concurrently.
+ AllowConcurrent ConcurrencyPolicy = "Allow"
+
+ // ForbidConcurrent forbids concurrent runs, skipping next run if previous
+ // hasn't finished yet.
+ ForbidConcurrent ConcurrencyPolicy = "Forbid"
+
+ // ReplaceConcurrent cancels currently running job and replaces it with a new one.
+ ReplaceConcurrent ConcurrencyPolicy = "Replace"
+)
+
+// CronJobStatus represents the current state of a cron job.
+type CronJobStatus struct {
+ // A list of pointers to currently running jobs.
+ // +optional
+ Active []api.ObjectReference
+
+ // Information when was the last time the job was successfully scheduled.
+ // +optional
+ LastScheduleTime *metav1.Time
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/conversion.go
new file mode 100644
index 000000000..bd952b0e8
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/conversion.go
@@ -0,0 +1,84 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "fmt"
+
+ "k8s.io/apimachinery/pkg/conversion"
+ "k8s.io/apimachinery/pkg/runtime"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/apis/batch"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) error {
+ // Add non-generated conversion functions
+ err := scheme.AddConversionFuncs(
+ Convert_batch_JobSpec_To_v1_JobSpec,
+ Convert_v1_JobSpec_To_batch_JobSpec,
+ )
+ if err != nil {
+ return err
+ }
+
+ return scheme.AddFieldLabelConversionFunc("batch/v1", "Job",
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "metadata.name", "metadata.namespace", "status.successful":
+ return label, value, nil
+ default:
+ return "", "", fmt.Errorf("field label %q not supported for Job", label)
+ }
+ },
+ )
+}
+
+func Convert_batch_JobSpec_To_v1_JobSpec(in *batch.JobSpec, out *JobSpec, s conversion.Scope) error {
+ out.Parallelism = in.Parallelism
+ out.Completions = in.Completions
+ out.ActiveDeadlineSeconds = in.ActiveDeadlineSeconds
+ out.Selector = in.Selector
+ if in.ManualSelector != nil {
+ out.ManualSelector = new(bool)
+ *out.ManualSelector = *in.ManualSelector
+ } else {
+ out.ManualSelector = nil
+ }
+
+ if err := v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1_JobSpec_To_batch_JobSpec(in *JobSpec, out *batch.JobSpec, s conversion.Scope) error {
+ out.Parallelism = in.Parallelism
+ out.Completions = in.Completions
+ out.ActiveDeadlineSeconds = in.ActiveDeadlineSeconds
+ out.Selector = in.Selector
+ if in.ManualSelector != nil {
+ out.ManualSelector = new(bool)
+ *out.ManualSelector = *in.ManualSelector
+ } else {
+ out.ManualSelector = nil
+ }
+
+ if err := v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/defaults.go
new file mode 100644
index 000000000..9c246a594
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/defaults.go
@@ -0,0 +1,44 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
+
+func SetDefaults_Job(obj *Job) {
+ // For a non-parallel job, you can leave both `.spec.completions` and
+ // `.spec.parallelism` unset. When both are unset, both are defaulted to 1.
+ if obj.Spec.Completions == nil && obj.Spec.Parallelism == nil {
+ obj.Spec.Completions = new(int32)
+ *obj.Spec.Completions = 1
+ obj.Spec.Parallelism = new(int32)
+ *obj.Spec.Parallelism = 1
+ }
+ if obj.Spec.Parallelism == nil {
+ obj.Spec.Parallelism = new(int32)
+ *obj.Spec.Parallelism = 1
+ }
+ labels := obj.Spec.Template.Labels
+ if labels != nil && len(obj.Labels) == 0 {
+ obj.Labels = labels
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/doc.go
new file mode 100644
index 000000000..787717b21
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/doc.go
@@ -0,0 +1,22 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/batch
+// +k8s:openapi-gen=true
+// +k8s:defaulter-gen=TypeMeta
+
+package v1 // import "k8s.io/kubernetes/pkg/apis/batch/v1"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/generated.pb.go
new file mode 100644
index 000000000..3b3fd70ae
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/generated.pb.go
@@ -0,0 +1,1585 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/batch/v1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/batch/v1/generated.proto
+
+ It has these top-level messages:
+ Job
+ JobCondition
+ JobList
+ JobSpec
+ JobStatus
+*/
+package v1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+import k8s_io_kubernetes_pkg_api_v1 "k8s.io/kubernetes/pkg/api/v1"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *Job) Reset() { *m = Job{} }
+func (*Job) ProtoMessage() {}
+func (*Job) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *JobCondition) Reset() { *m = JobCondition{} }
+func (*JobCondition) ProtoMessage() {}
+func (*JobCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *JobList) Reset() { *m = JobList{} }
+func (*JobList) ProtoMessage() {}
+func (*JobList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
+
+func (m *JobSpec) Reset() { *m = JobSpec{} }
+func (*JobSpec) ProtoMessage() {}
+func (*JobSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
+
+func (m *JobStatus) Reset() { *m = JobStatus{} }
+func (*JobStatus) ProtoMessage() {}
+func (*JobStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
+
+func init() {
+ proto.RegisterType((*Job)(nil), "k8s.io.kubernetes.pkg.apis.batch.v1.Job")
+ proto.RegisterType((*JobCondition)(nil), "k8s.io.kubernetes.pkg.apis.batch.v1.JobCondition")
+ proto.RegisterType((*JobList)(nil), "k8s.io.kubernetes.pkg.apis.batch.v1.JobList")
+ proto.RegisterType((*JobSpec)(nil), "k8s.io.kubernetes.pkg.apis.batch.v1.JobSpec")
+ proto.RegisterType((*JobStatus)(nil), "k8s.io.kubernetes.pkg.apis.batch.v1.JobStatus")
+}
+func (m *Job) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Job) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n2, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n3, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ return i, nil
+}
+
+func (m *JobCondition) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *JobCondition) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
+ i += copy(dAtA[i:], m.Status)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastProbeTime.Size()))
+ n4, err := m.LastProbeTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
+ n5, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ return i, nil
+}
+
+func (m *JobList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *JobList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n6, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *JobSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *JobSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Parallelism != nil {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.Parallelism))
+ }
+ if m.Completions != nil {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.Completions))
+ }
+ if m.ActiveDeadlineSeconds != nil {
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.ActiveDeadlineSeconds))
+ }
+ if m.Selector != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
+ n7, err := m.Selector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ }
+ if m.ManualSelector != nil {
+ dAtA[i] = 0x28
+ i++
+ if *m.ManualSelector {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
+ n8, err := m.Template.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n8
+ return i, nil
+}
+
+func (m *JobStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *JobStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Conditions) > 0 {
+ for _, msg := range m.Conditions {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.StartTime != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.StartTime.Size()))
+ n9, err := m.StartTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n9
+ }
+ if m.CompletionTime != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CompletionTime.Size()))
+ n10, err := m.CompletionTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n10
+ }
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Active))
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Succeeded))
+ dAtA[i] = 0x30
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Failed))
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *Job) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *JobCondition) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Status)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastProbeTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastTransitionTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *JobList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *JobSpec) Size() (n int) {
+ var l int
+ _ = l
+ if m.Parallelism != nil {
+ n += 1 + sovGenerated(uint64(*m.Parallelism))
+ }
+ if m.Completions != nil {
+ n += 1 + sovGenerated(uint64(*m.Completions))
+ }
+ if m.ActiveDeadlineSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.ActiveDeadlineSeconds))
+ }
+ if m.Selector != nil {
+ l = m.Selector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.ManualSelector != nil {
+ n += 2
+ }
+ l = m.Template.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *JobStatus) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Conditions) > 0 {
+ for _, e := range m.Conditions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.StartTime != nil {
+ l = m.StartTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.CompletionTime != nil {
+ l = m.CompletionTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ n += 1 + sovGenerated(uint64(m.Active))
+ n += 1 + sovGenerated(uint64(m.Succeeded))
+ n += 1 + sovGenerated(uint64(m.Failed))
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *Job) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Job{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "JobSpec", "JobSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "JobStatus", "JobStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *JobCondition) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&JobCondition{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
+ `LastProbeTime:` + strings.Replace(strings.Replace(this.LastProbeTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *JobList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&JobList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Job", "Job", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *JobSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&JobSpec{`,
+ `Parallelism:` + valueToStringGenerated(this.Parallelism) + `,`,
+ `Completions:` + valueToStringGenerated(this.Completions) + `,`,
+ `ActiveDeadlineSeconds:` + valueToStringGenerated(this.ActiveDeadlineSeconds) + `,`,
+ `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
+ `ManualSelector:` + valueToStringGenerated(this.ManualSelector) + `,`,
+ `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_kubernetes_pkg_api_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *JobStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&JobStatus{`,
+ `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "JobCondition", "JobCondition", 1), `&`, ``, 1) + `,`,
+ `StartTime:` + strings.Replace(fmt.Sprintf("%v", this.StartTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`,
+ `CompletionTime:` + strings.Replace(fmt.Sprintf("%v", this.CompletionTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`,
+ `Active:` + fmt.Sprintf("%v", this.Active) + `,`,
+ `Succeeded:` + fmt.Sprintf("%v", this.Succeeded) + `,`,
+ `Failed:` + fmt.Sprintf("%v", this.Failed) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *Job) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Job: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Job: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *JobCondition) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: JobCondition: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: JobCondition: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = JobConditionType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Status = k8s_io_kubernetes_pkg_api_v1.ConditionStatus(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastProbeTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastProbeTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *JobList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: JobList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: JobList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, Job{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *JobSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: JobSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: JobSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Parallelism", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Parallelism = &v
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Completions", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Completions = &v
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ActiveDeadlineSeconds", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ActiveDeadlineSeconds = &v
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Selector == nil {
+ m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
+ }
+ if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ManualSelector", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.ManualSelector = &b
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *JobStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: JobStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: JobStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Conditions = append(m.Conditions, JobCondition{})
+ if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.StartTime == nil {
+ m.StartTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{}
+ }
+ if err := m.StartTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CompletionTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.CompletionTime == nil {
+ m.CompletionTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{}
+ }
+ if err := m.CompletionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Active", wireType)
+ }
+ m.Active = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Active |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Succeeded", wireType)
+ }
+ m.Succeeded = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Succeeded |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Failed", wireType)
+ }
+ m.Failed = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Failed |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/kubernetes/pkg/apis/batch/v1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 873 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xdd, 0x6e, 0xe3, 0x44,
+ 0x14, 0xce, 0x4f, 0xd3, 0x26, 0x93, 0xb6, 0xbb, 0x8c, 0x54, 0x29, 0xf4, 0xc2, 0x59, 0x05, 0x09,
+ 0x15, 0xb4, 0x6b, 0x93, 0x76, 0x85, 0x10, 0x17, 0x48, 0xb8, 0x08, 0x89, 0xaa, 0x65, 0xab, 0x49,
+ 0x05, 0x12, 0x3f, 0x12, 0x63, 0xfb, 0x34, 0x1d, 0x6a, 0x7b, 0x2c, 0xcf, 0x24, 0x52, 0xef, 0x78,
+ 0x03, 0x78, 0x18, 0x84, 0x78, 0x84, 0x5e, 0xf6, 0x72, 0xaf, 0x22, 0x6a, 0xde, 0x62, 0xaf, 0xd0,
+ 0x8c, 0x27, 0xb6, 0xb3, 0x49, 0x21, 0xe5, 0xce, 0x3e, 0xf3, 0x7d, 0xdf, 0x39, 0x73, 0xce, 0x77,
+ 0x06, 0x1d, 0x5d, 0x7f, 0x22, 0x6c, 0xc6, 0x9d, 0xeb, 0x89, 0x07, 0x69, 0x0c, 0x12, 0x84, 0x93,
+ 0x5c, 0x8f, 0x1d, 0x9a, 0x30, 0xe1, 0x78, 0x54, 0xfa, 0x57, 0xce, 0x74, 0xe8, 0x8c, 0x21, 0x86,
+ 0x94, 0x4a, 0x08, 0xec, 0x24, 0xe5, 0x92, 0xe3, 0xf7, 0x72, 0x92, 0x5d, 0x92, 0xec, 0xe4, 0x7a,
+ 0x6c, 0x2b, 0x92, 0xad, 0x49, 0xf6, 0x74, 0xb8, 0xff, 0x62, 0xcc, 0xe4, 0xd5, 0xc4, 0xb3, 0x7d,
+ 0x1e, 0x39, 0x63, 0x3e, 0xe6, 0x8e, 0xe6, 0x7a, 0x93, 0x4b, 0xfd, 0xa7, 0x7f, 0xf4, 0x57, 0xae,
+ 0xb9, 0xff, 0xd2, 0x14, 0x42, 0x13, 0x16, 0x51, 0xff, 0x8a, 0xc5, 0x90, 0xde, 0x94, 0xa5, 0x44,
+ 0x20, 0xe9, 0x8a, 0x4a, 0xf6, 0x9d, 0x87, 0x58, 0xe9, 0x24, 0x96, 0x2c, 0x82, 0x25, 0xc2, 0xc7,
+ 0xff, 0x45, 0x10, 0xfe, 0x15, 0x44, 0x74, 0x89, 0x77, 0xf4, 0x10, 0x6f, 0x22, 0x59, 0xe8, 0xb0,
+ 0x58, 0x0a, 0x99, 0x2e, 0x91, 0x9e, 0x3f, 0xd8, 0xdc, 0x15, 0x77, 0x19, 0xfc, 0xda, 0x40, 0xcd,
+ 0x13, 0xee, 0xe1, 0x9f, 0x50, 0x5b, 0x5d, 0x37, 0xa0, 0x92, 0xf6, 0xea, 0xcf, 0xea, 0x07, 0xdd,
+ 0xc3, 0x8f, 0x6c, 0xd3, 0xf0, 0x6a, 0xf6, 0xb2, 0xe5, 0x0a, 0x6d, 0x4f, 0x87, 0xf6, 0x2b, 0xef,
+ 0x67, 0xf0, 0xe5, 0x19, 0x48, 0xea, 0xe2, 0xdb, 0x59, 0xbf, 0x96, 0xcd, 0xfa, 0xa8, 0x8c, 0x91,
+ 0x42, 0x15, 0x7f, 0x8d, 0x36, 0x44, 0x02, 0x7e, 0xaf, 0xa1, 0xd5, 0x9f, 0xdb, 0x6b, 0x8c, 0xd3,
+ 0x3e, 0xe1, 0xde, 0x28, 0x01, 0xdf, 0xdd, 0x36, 0xca, 0x1b, 0xea, 0x8f, 0x68, 0x1d, 0xfc, 0x0d,
+ 0xda, 0x14, 0x92, 0xca, 0x89, 0xe8, 0x35, 0xb5, 0xa2, 0xbd, 0xb6, 0xa2, 0x66, 0xb9, 0xbb, 0x46,
+ 0x73, 0x33, 0xff, 0x27, 0x46, 0x6d, 0x70, 0xd7, 0x44, 0xdb, 0x27, 0xdc, 0x3b, 0xe6, 0x71, 0xc0,
+ 0x24, 0xe3, 0x31, 0x7e, 0x89, 0x36, 0xe4, 0x4d, 0x02, 0xba, 0x2d, 0x1d, 0xf7, 0xd9, 0xbc, 0x94,
+ 0x8b, 0x9b, 0x04, 0xde, 0xcc, 0xfa, 0x4f, 0xab, 0x58, 0x15, 0x23, 0x1a, 0x5d, 0x29, 0xaf, 0xa1,
+ 0x79, 0x9f, 0x2d, 0xa6, 0x7b, 0x33, 0xeb, 0xff, 0xeb, 0xa0, 0xec, 0x42, 0x73, 0xb1, 0x3c, 0x3c,
+ 0x46, 0x3b, 0x21, 0x15, 0xf2, 0x3c, 0xe5, 0x1e, 0x5c, 0xb0, 0x08, 0xcc, 0xed, 0x3f, 0x5c, 0x6f,
+ 0x5a, 0x8a, 0xe1, 0xee, 0x99, 0x52, 0x76, 0x4e, 0xab, 0x42, 0x64, 0x51, 0x17, 0x4f, 0x11, 0x56,
+ 0x81, 0x8b, 0x94, 0xc6, 0x22, 0xbf, 0x9c, 0xca, 0xb6, 0xf1, 0xe8, 0x6c, 0xfb, 0x26, 0x1b, 0x3e,
+ 0x5d, 0x52, 0x23, 0x2b, 0x32, 0xe0, 0xf7, 0xd1, 0x66, 0x0a, 0x54, 0xf0, 0xb8, 0xd7, 0xd2, 0x8d,
+ 0x2b, 0xe6, 0x44, 0x74, 0x94, 0x98, 0x53, 0xfc, 0x01, 0xda, 0x8a, 0x40, 0x08, 0x3a, 0x86, 0xde,
+ 0xa6, 0x06, 0x3e, 0x31, 0xc0, 0xad, 0xb3, 0x3c, 0x4c, 0xe6, 0xe7, 0x83, 0x3f, 0xea, 0x68, 0xeb,
+ 0x84, 0x7b, 0xa7, 0x4c, 0x48, 0xfc, 0xc3, 0x92, 0xd1, 0xed, 0xf5, 0x2e, 0xa3, 0xd8, 0xda, 0xe6,
+ 0x4f, 0x4d, 0x9e, 0xf6, 0x3c, 0x52, 0x31, 0xf9, 0x19, 0x6a, 0x31, 0x09, 0x91, 0x1a, 0x7a, 0xf3,
+ 0xa0, 0x7b, 0x78, 0xb0, 0xae, 0x27, 0xdd, 0x1d, 0x23, 0xda, 0xfa, 0x4a, 0xd1, 0x49, 0xae, 0x32,
+ 0xf8, 0xb3, 0xa9, 0x0b, 0x57, 0xae, 0xc7, 0x43, 0xd4, 0x4d, 0x68, 0x4a, 0xc3, 0x10, 0x42, 0x26,
+ 0x22, 0x5d, 0x7b, 0xcb, 0x7d, 0x92, 0xcd, 0xfa, 0xdd, 0xf3, 0x32, 0x4c, 0xaa, 0x18, 0x45, 0xf1,
+ 0x79, 0x94, 0x84, 0xa0, 0x9a, 0x9b, 0x1b, 0xd1, 0x50, 0x8e, 0xcb, 0x30, 0xa9, 0x62, 0xf0, 0x2b,
+ 0xb4, 0x47, 0x7d, 0xc9, 0xa6, 0xf0, 0x05, 0xd0, 0x20, 0x64, 0x31, 0x8c, 0xc0, 0xe7, 0x71, 0x90,
+ 0x2f, 0x59, 0xd3, 0x7d, 0x37, 0x9b, 0xf5, 0xf7, 0x3e, 0x5f, 0x05, 0x20, 0xab, 0x79, 0xf8, 0x47,
+ 0xd4, 0x16, 0x10, 0x82, 0x2f, 0x79, 0x6a, 0xcc, 0x73, 0xb4, 0x66, 0xbf, 0xa9, 0x07, 0xe1, 0xc8,
+ 0x50, 0xdd, 0x6d, 0xd5, 0xf0, 0xf9, 0x1f, 0x29, 0x24, 0xf1, 0xa7, 0x68, 0x37, 0xa2, 0xf1, 0x84,
+ 0x16, 0x48, 0xed, 0x9a, 0xb6, 0x8b, 0xb3, 0x59, 0x7f, 0xf7, 0x6c, 0xe1, 0x84, 0xbc, 0x85, 0xc4,
+ 0xdf, 0xa3, 0xb6, 0x84, 0x28, 0x09, 0xa9, 0xcc, 0x2d, 0xd4, 0x3d, 0x7c, 0xf1, 0xf0, 0xbc, 0x54,
+ 0x49, 0xe7, 0x3c, 0xb8, 0x30, 0x04, 0xfd, 0x2c, 0x15, 0x4e, 0x98, 0x47, 0x49, 0x21, 0x38, 0xf8,
+ 0xbd, 0x89, 0x3a, 0xc5, 0x63, 0x83, 0x01, 0x21, 0x7f, 0xbe, 0xd0, 0xa2, 0x57, 0xd7, 0xe6, 0x18,
+ 0xae, 0x6b, 0x8e, 0xe2, 0x29, 0x28, 0x5f, 0xd8, 0x22, 0x24, 0x48, 0x45, 0x18, 0x7f, 0x8b, 0x3a,
+ 0x42, 0xd2, 0x54, 0xea, 0x55, 0x6d, 0x3c, 0x7a, 0x55, 0x77, 0xb2, 0x59, 0xbf, 0x33, 0x9a, 0x0b,
+ 0x90, 0x52, 0x0b, 0x5f, 0xa2, 0xdd, 0xd2, 0x25, 0xff, 0xf3, 0xd9, 0xd1, 0x23, 0x39, 0x5e, 0x50,
+ 0x21, 0x6f, 0xa9, 0xaa, 0xe5, 0xcf, 0x6d, 0xa4, 0xbd, 0xd2, 0x2a, 0x97, 0x3f, 0xf7, 0x1c, 0x31,
+ 0xa7, 0xd8, 0x41, 0x1d, 0x31, 0xf1, 0x7d, 0x80, 0x00, 0x02, 0x3d, 0xf1, 0x96, 0xfb, 0x8e, 0x81,
+ 0x76, 0x46, 0xf3, 0x03, 0x52, 0x62, 0x94, 0xf0, 0x25, 0x65, 0x21, 0x04, 0x7a, 0xd2, 0x15, 0xe1,
+ 0x2f, 0x75, 0x94, 0x98, 0x53, 0xf7, 0xe0, 0xf6, 0xde, 0xaa, 0xdd, 0xdd, 0x5b, 0xb5, 0xd7, 0xf7,
+ 0x56, 0xed, 0x97, 0xcc, 0xaa, 0xdf, 0x66, 0x56, 0xfd, 0x2e, 0xb3, 0xea, 0xaf, 0x33, 0xab, 0xfe,
+ 0x57, 0x66, 0xd5, 0x7f, 0xfb, 0xdb, 0xaa, 0x7d, 0xd7, 0x98, 0x0e, 0xff, 0x09, 0x00, 0x00, 0xff,
+ 0xff, 0xe1, 0x7e, 0xeb, 0x67, 0xc5, 0x08, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/generated.proto
new file mode 100644
index 000000000..8d49a24f9
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/generated.proto
@@ -0,0 +1,168 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.pkg.apis.batch.v1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1";
+
+// Job represents the configuration of a single job.
+message Job {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Specification of the desired behavior of a job.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional JobSpec spec = 2;
+
+ // Current status of a job.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional JobStatus status = 3;
+}
+
+// JobCondition describes current state of a job.
+message JobCondition {
+ // Type of job condition, Complete or Failed.
+ optional string type = 1;
+
+ // Status of the condition, one of True, False, Unknown.
+ optional string status = 2;
+
+ // Last time the condition was checked.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastProbeTime = 3;
+
+ // Last time the condition transit from one status to another.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4;
+
+ // (brief) reason for the condition's last transition.
+ // +optional
+ optional string reason = 5;
+
+ // Human readable message indicating details about last transition.
+ // +optional
+ optional string message = 6;
+}
+
+// JobList is a collection of jobs.
+message JobList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // items is the list of Jobs.
+ repeated Job items = 2;
+}
+
+// JobSpec describes how the job execution will look like.
+message JobSpec {
+ // Specifies the maximum desired number of pods the job should
+ // run at any given time. The actual number of pods running in steady state will
+ // be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism),
+ // i.e. when the work left to do is less than max parallelism.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
+ // +optional
+ optional int32 parallelism = 1;
+
+ // Specifies the desired number of successfully finished pods the
+ // job should be run with. Setting to nil means that the success of any
+ // pod signals the success of all pods, and allows parallelism to have any positive
+ // value. Setting to 1 means that parallelism is limited to 1 and the success of that
+ // pod signals the success of the job.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
+ // +optional
+ optional int32 completions = 2;
+
+ // Optional duration in seconds relative to the startTime that the job may be active
+ // before the system tries to terminate it; value must be positive integer
+ // +optional
+ optional int64 activeDeadlineSeconds = 3;
+
+ // A label query over pods that should match the pod count.
+ // Normally, the system sets this field for you.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4;
+
+ // manualSelector controls generation of pod labels and pod selectors.
+ // Leave `manualSelector` unset unless you are certain what you are doing.
+ // When false or unset, the system pick labels unique to this job
+ // and appends those labels to the pod template. When true,
+ // the user is responsible for picking unique labels and specifying
+ // the selector. Failure to pick a unique label may cause this
+ // and other jobs to not function correctly. However, You may see
+ // `manualSelector=true` in jobs that were created with the old `extensions/v1beta1`
+ // API.
+ // More info: https://git.k8s.io/community/contributors/design-proposals/selector-generation.md
+ // +optional
+ optional bool manualSelector = 5;
+
+ // Describes the pod that will be created when executing a job.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
+ optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 6;
+}
+
+// JobStatus represents the current state of a Job.
+message JobStatus {
+ // The latest available observations of an object's current state.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ repeated JobCondition conditions = 1;
+
+ // Represents time when the job was acknowledged by the job controller.
+ // It is not guaranteed to be set in happens-before order across separate operations.
+ // It is represented in RFC3339 form and is in UTC.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startTime = 2;
+
+ // Represents time when the job was completed. It is not guaranteed to
+ // be set in happens-before order across separate operations.
+ // It is represented in RFC3339 form and is in UTC.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time completionTime = 3;
+
+ // The number of actively running pods.
+ // +optional
+ optional int32 active = 4;
+
+ // The number of pods which reached phase Succeeded.
+ // +optional
+ optional int32 succeeded = 5;
+
+ // The number of pods which reached phase Failed.
+ // +optional
+ optional int32 failed = 6;
+}
+
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/register.go
new file mode 100644
index 000000000..9256e829a
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/register.go
@@ -0,0 +1,59 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "batch"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Job{},
+ &JobList{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types.generated.go
new file mode 100644
index 000000000..97b898970
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types.generated.go
@@ -0,0 +1,2681 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1
+
+import (
+ "errors"
+ "fmt"
+ 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"
+ pkg5_intstr "k8s.io/apimachinery/pkg/util/intstr"
+ pkg3_v1 "k8s.io/kubernetes/pkg/api/v1"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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 pkg5_intstr.IntOrString
+ var v4 pkg3_v1.PodTemplateSpec
+ var v5 time.Time
+ _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5
+ }
+}
+
+func (x *Job) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Job) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Job) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = JobSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = JobStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = JobSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = JobStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *JobList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceJob(([]Job)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceJob(([]Job)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *JobList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *JobList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceJob((*[]Job)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *JobList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceJob((*[]Job)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *JobSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Parallelism != nil
+ yyq2[1] = x.Completions != nil
+ yyq2[2] = x.ActiveDeadlineSeconds != nil
+ yyq2[3] = x.Selector != nil
+ yyq2[4] = x.ManualSelector != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Parallelism == nil {
+ r.EncodeNil()
+ } else {
+ yy4 := *x.Parallelism
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(yy4))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("parallelism"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Parallelism == nil {
+ r.EncodeNil()
+ } else {
+ yy6 := *x.Parallelism
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(yy6))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Completions == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.Completions
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(yy9))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("completions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Completions == nil {
+ r.EncodeNil()
+ } else {
+ yy11 := *x.Completions
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else {
+ r.EncodeInt(int64(yy11))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.ActiveDeadlineSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy14 := *x.ActiveDeadlineSeconds
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeInt(int64(yy14))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("activeDeadlineSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ActiveDeadlineSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy16 := *x.ActiveDeadlineSeconds
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(yy16))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.ManualSelector == nil {
+ r.EncodeNil()
+ } else {
+ yy22 := *x.ManualSelector
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeBool(bool(yy22))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("manualSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ManualSelector == nil {
+ r.EncodeNil()
+ } else {
+ yy24 := *x.ManualSelector
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeBool(bool(yy24))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy27 := &x.Template
+ yy27.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("template"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy29 := &x.Template
+ yy29.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *JobSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *JobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "parallelism":
+ if r.TryDecodeAsNil() {
+ if x.Parallelism != nil {
+ x.Parallelism = nil
+ }
+ } else {
+ if x.Parallelism == nil {
+ x.Parallelism = new(int32)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(x.Parallelism)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "completions":
+ if r.TryDecodeAsNil() {
+ if x.Completions != nil {
+ x.Completions = nil
+ }
+ } else {
+ if x.Completions == nil {
+ x.Completions = new(int32)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int32)(x.Completions)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "activeDeadlineSeconds":
+ if r.TryDecodeAsNil() {
+ if x.ActiveDeadlineSeconds != nil {
+ x.ActiveDeadlineSeconds = nil
+ }
+ } else {
+ if x.ActiveDeadlineSeconds == nil {
+ x.ActiveDeadlineSeconds = new(int64)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_v1.LabelSelector)
+ }
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ case "manualSelector":
+ if r.TryDecodeAsNil() {
+ if x.ManualSelector != nil {
+ x.ManualSelector = nil
+ }
+ } else {
+ if x.ManualSelector == nil {
+ x.ManualSelector = new(bool)
+ }
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*bool)(x.ManualSelector)) = r.DecodeBool()
+ }
+ }
+ case "template":
+ if r.TryDecodeAsNil() {
+ x.Template = pkg3_v1.PodTemplateSpec{}
+ } else {
+ yyv14 := &x.Template
+ yyv14.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *JobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj15 int
+ var yyb15 bool
+ var yyhl15 bool = l >= 0
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Parallelism != nil {
+ x.Parallelism = nil
+ }
+ } else {
+ if x.Parallelism == nil {
+ x.Parallelism = new(int32)
+ }
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*int32)(x.Parallelism)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Completions != nil {
+ x.Completions = nil
+ }
+ } else {
+ if x.Completions == nil {
+ x.Completions = new(int32)
+ }
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*int32)(x.Completions)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ActiveDeadlineSeconds != nil {
+ x.ActiveDeadlineSeconds = nil
+ }
+ } else {
+ if x.ActiveDeadlineSeconds == nil {
+ x.ActiveDeadlineSeconds = new(int64)
+ }
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_v1.LabelSelector)
+ }
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ManualSelector != nil {
+ x.ManualSelector = nil
+ }
+ } else {
+ if x.ManualSelector == nil {
+ x.ManualSelector = new(bool)
+ }
+ yym25 := z.DecBinary()
+ _ = yym25
+ if false {
+ } else {
+ *((*bool)(x.ManualSelector)) = r.DecodeBool()
+ }
+ }
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Template = pkg3_v1.PodTemplateSpec{}
+ } else {
+ yyv26 := &x.Template
+ yyv26.CodecDecodeSelf(d)
+ }
+ for {
+ yyj15++
+ if yyhl15 {
+ yyb15 = yyj15 > l
+ } else {
+ yyb15 = r.CheckBreak()
+ }
+ if yyb15 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj15-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *JobStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Conditions) != 0
+ yyq2[1] = x.StartTime != nil
+ yyq2[2] = x.CompletionTime != nil
+ yyq2[3] = x.Active != 0
+ yyq2[4] = x.Succeeded != 0
+ yyq2[5] = x.Failed != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceJobCondition(([]JobCondition)(x.Conditions), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("conditions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceJobCondition(([]JobCondition)(x.Conditions), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.StartTime == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.StartTime) {
+ } else if yym7 {
+ z.EncBinaryMarshal(x.StartTime)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.StartTime)
+ } else {
+ z.EncFallback(x.StartTime)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("startTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.StartTime == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.StartTime) {
+ } else if yym8 {
+ z.EncBinaryMarshal(x.StartTime)
+ } else if !yym8 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.StartTime)
+ } else {
+ z.EncFallback(x.StartTime)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.CompletionTime == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.CompletionTime) {
+ } else if yym10 {
+ z.EncBinaryMarshal(x.CompletionTime)
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.CompletionTime)
+ } else {
+ z.EncFallback(x.CompletionTime)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("completionTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.CompletionTime == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.CompletionTime) {
+ } else if yym11 {
+ z.EncBinaryMarshal(x.CompletionTime)
+ } else if !yym11 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.CompletionTime)
+ } else {
+ z.EncFallback(x.CompletionTime)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Active))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("active"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Active))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Succeeded))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("succeeded"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Succeeded))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Failed))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("failed"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Failed))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *JobStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *JobStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "conditions":
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv4 := &x.Conditions
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceJobCondition((*[]JobCondition)(yyv4), d)
+ }
+ }
+ case "startTime":
+ if r.TryDecodeAsNil() {
+ if x.StartTime != nil {
+ x.StartTime = nil
+ }
+ } else {
+ if x.StartTime == nil {
+ x.StartTime = new(pkg1_v1.Time)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.StartTime) {
+ } else if yym7 {
+ z.DecBinaryUnmarshal(x.StartTime)
+ } else if !yym7 && 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)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.CompletionTime) {
+ } else if yym9 {
+ z.DecBinaryUnmarshal(x.CompletionTime)
+ } else if !yym9 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.CompletionTime)
+ } else {
+ z.DecFallback(x.CompletionTime, false)
+ }
+ }
+ case "active":
+ if r.TryDecodeAsNil() {
+ x.Active = 0
+ } else {
+ yyv10 := &x.Active
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(yyv10)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "succeeded":
+ if r.TryDecodeAsNil() {
+ x.Succeeded = 0
+ } else {
+ yyv12 := &x.Succeeded
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int32)(yyv12)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "failed":
+ if r.TryDecodeAsNil() {
+ x.Failed = 0
+ } else {
+ yyv14 := &x.Failed
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*int32)(yyv14)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *JobStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj16 int
+ var yyb16 bool
+ var yyhl16 bool = l >= 0
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv17 := &x.Conditions
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ h.decSliceJobCondition((*[]JobCondition)(yyv17), d)
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.StartTime != nil {
+ x.StartTime = nil
+ }
+ } else {
+ if x.StartTime == nil {
+ x.StartTime = new(pkg1_v1.Time)
+ }
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.StartTime) {
+ } else if yym20 {
+ z.DecBinaryUnmarshal(x.StartTime)
+ } else if !yym20 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.StartTime)
+ } else {
+ z.DecFallback(x.StartTime, false)
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.CompletionTime != nil {
+ x.CompletionTime = nil
+ }
+ } else {
+ if x.CompletionTime == nil {
+ x.CompletionTime = new(pkg1_v1.Time)
+ }
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.CompletionTime) {
+ } else if yym22 {
+ z.DecBinaryUnmarshal(x.CompletionTime)
+ } else if !yym22 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.CompletionTime)
+ } else {
+ z.DecFallback(x.CompletionTime, false)
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Active = 0
+ } else {
+ yyv23 := &x.Active
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*int32)(yyv23)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Succeeded = 0
+ } else {
+ yyv25 := &x.Succeeded
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*int32)(yyv25)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Failed = 0
+ } else {
+ yyv27 := &x.Failed
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*int32)(yyv27)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj16-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x JobConditionType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *JobConditionType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *JobCondition) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = true
+ yyq2[3] = true
+ yyq2[4] = x.Reason != ""
+ yyq2[5] = x.Message != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yysf7 := &x.Status
+ yysf7.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yysf8 := &x.Status
+ yysf8.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy10 := &x.LastProbeTime
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy10) {
+ } else if yym11 {
+ z.EncBinaryMarshal(yy10)
+ } else if !yym11 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy10)
+ } else {
+ z.EncFallback(yy10)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastProbeTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.LastProbeTime
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if yym13 {
+ z.EncBinaryMarshal(yy12)
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.LastTransitionTime
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy15) {
+ } else if yym16 {
+ z.EncBinaryMarshal(yy15)
+ } else if !yym16 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy15)
+ } else {
+ z.EncFallback(yy15)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.LastTransitionTime
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy17) {
+ } else if yym18 {
+ z.EncBinaryMarshal(yy17)
+ } else if !yym18 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy17)
+ } else {
+ z.EncFallback(yy17)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *JobCondition) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *JobCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "lastProbeTime":
+ if r.TryDecodeAsNil() {
+ x.LastProbeTime = pkg1_v1.Time{}
+ } else {
+ yyv6 := &x.LastProbeTime
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if yym7 {
+ z.DecBinaryUnmarshal(yyv6)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ case "lastTransitionTime":
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg1_v1.Time{}
+ } else {
+ yyv8 := &x.LastTransitionTime
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv8) {
+ } else if yym9 {
+ z.DecBinaryUnmarshal(yyv8)
+ } else if !yym9 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv8)
+ } else {
+ z.DecFallback(yyv8, false)
+ }
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv10 := &x.Reason
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv12 := &x.Message
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *JobCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv15 := &x.Type
+ yyv15.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv16 := &x.Status
+ yyv16.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastProbeTime = pkg1_v1.Time{}
+ } else {
+ yyv17 := &x.LastProbeTime
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv17) {
+ } else if yym18 {
+ z.DecBinaryUnmarshal(yyv17)
+ } else if !yym18 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv17)
+ } else {
+ z.DecFallback(yyv17, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg1_v1.Time{}
+ } else {
+ yyv19 := &x.LastTransitionTime
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv19) {
+ } else if yym20 {
+ z.DecBinaryUnmarshal(yyv19)
+ } else if !yym20 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv19)
+ } else {
+ z.DecFallback(yyv19, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv21 := &x.Reason
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv23 := &x.Message
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*string)(yyv23)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encSliceJob(v []Job, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceJob(v *[]Job, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Job{}
+ 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, 920)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Job, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Job, 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] = Job{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Job{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Job{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Job{}) // var yyz1 Job
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Job{}
+ } 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 = []Job{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceJobCondition(v []JobCondition, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceJobCondition(v *[]JobCondition, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []JobCondition{}
+ 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, 112)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]JobCondition, yyrl1)
+ }
+ } else {
+ yyv1 = make([]JobCondition, 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] = JobCondition{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, JobCondition{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = JobCondition{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, JobCondition{}) // var yyz1 JobCondition
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = JobCondition{}
+ } 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 = []JobCondition{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types.go
new file mode 100644
index 000000000..8c3b763c4
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types.go
@@ -0,0 +1,168 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/kubernetes/pkg/api/v1"
+)
+
+// +genclient=true
+
+// Job represents the configuration of a single job.
+type Job struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Specification of the desired behavior of a job.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Current status of a job.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status JobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// JobList is a collection of jobs.
+type JobList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // items is the list of Jobs.
+ Items []Job `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// JobSpec describes how the job execution will look like.
+type JobSpec struct {
+
+ // Specifies the maximum desired number of pods the job should
+ // run at any given time. The actual number of pods running in steady state will
+ // be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism),
+ // i.e. when the work left to do is less than max parallelism.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
+ // +optional
+ Parallelism *int32 `json:"parallelism,omitempty" protobuf:"varint,1,opt,name=parallelism"`
+
+ // Specifies the desired number of successfully finished pods the
+ // job should be run with. Setting to nil means that the success of any
+ // pod signals the success of all pods, and allows parallelism to have any positive
+ // value. Setting to 1 means that parallelism is limited to 1 and the success of that
+ // pod signals the success of the job.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
+ // +optional
+ Completions *int32 `json:"completions,omitempty" protobuf:"varint,2,opt,name=completions"`
+
+ // Optional duration in seconds relative to the startTime that the job may be active
+ // before the system tries to terminate it; value must be positive integer
+ // +optional
+ ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" protobuf:"varint,3,opt,name=activeDeadlineSeconds"`
+
+ // A label query over pods that should match the pod count.
+ // Normally, the system sets this field for you.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,opt,name=selector"`
+
+ // manualSelector controls generation of pod labels and pod selectors.
+ // Leave `manualSelector` unset unless you are certain what you are doing.
+ // When false or unset, the system pick labels unique to this job
+ // and appends those labels to the pod template. When true,
+ // the user is responsible for picking unique labels and specifying
+ // the selector. Failure to pick a unique label may cause this
+ // and other jobs to not function correctly. However, You may see
+ // `manualSelector=true` in jobs that were created with the old `extensions/v1beta1`
+ // API.
+ // More info: https://git.k8s.io/community/contributors/design-proposals/selector-generation.md
+ // +optional
+ ManualSelector *bool `json:"manualSelector,omitempty" protobuf:"varint,5,opt,name=manualSelector"`
+
+ // Describes the pod that will be created when executing a job.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
+ Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,6,opt,name=template"`
+}
+
+// JobStatus represents the current state of a Job.
+type JobStatus struct {
+ // The latest available observations of an object's current state.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ Conditions []JobCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
+
+ // Represents time when the job was acknowledged by the job controller.
+ // It is not guaranteed to be set in happens-before order across separate operations.
+ // It is represented in RFC3339 form and is in UTC.
+ // +optional
+ StartTime *metav1.Time `json:"startTime,omitempty" protobuf:"bytes,2,opt,name=startTime"`
+
+ // Represents time when the job was completed. It is not guaranteed to
+ // be set in happens-before order across separate operations.
+ // It is represented in RFC3339 form and is in UTC.
+ // +optional
+ CompletionTime *metav1.Time `json:"completionTime,omitempty" protobuf:"bytes,3,opt,name=completionTime"`
+
+ // The number of actively running pods.
+ // +optional
+ Active int32 `json:"active,omitempty" protobuf:"varint,4,opt,name=active"`
+
+ // The number of pods which reached phase Succeeded.
+ // +optional
+ Succeeded int32 `json:"succeeded,omitempty" protobuf:"varint,5,opt,name=succeeded"`
+
+ // The number of pods which reached phase Failed.
+ // +optional
+ Failed int32 `json:"failed,omitempty" protobuf:"varint,6,opt,name=failed"`
+}
+
+type JobConditionType string
+
+// These are valid conditions of a job.
+const (
+ // JobComplete means the job has completed its execution.
+ JobComplete JobConditionType = "Complete"
+ // JobFailed means the job has failed its execution.
+ JobFailed JobConditionType = "Failed"
+)
+
+// JobCondition describes current state of a job.
+type JobCondition struct {
+ // Type of job condition, Complete or Failed.
+ Type JobConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=JobConditionType"`
+ // Status of the condition, one of True, False, Unknown.
+ Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"`
+ // Last time the condition was checked.
+ // +optional
+ LastProbeTime metav1.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"`
+ // Last time the condition transit from one status to another.
+ // +optional
+ LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
+ // (brief) reason for the condition's last transition.
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
+ // Human readable message indicating details about last transition.
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..da4985192
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types_swagger_doc_generated.go
@@ -0,0 +1,93 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_Job = map[string]string{
+ "": "Job represents the configuration of a single job.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Specification of the desired behavior of a job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+ "status": "Current status of a job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (Job) SwaggerDoc() map[string]string {
+ return map_Job
+}
+
+var map_JobCondition = map[string]string{
+ "": "JobCondition describes current state of a job.",
+ "type": "Type of job condition, Complete or Failed.",
+ "status": "Status of the condition, one of True, False, Unknown.",
+ "lastProbeTime": "Last time the condition was checked.",
+ "lastTransitionTime": "Last time the condition transit from one status to another.",
+ "reason": "(brief) reason for the condition's last transition.",
+ "message": "Human readable message indicating details about last transition.",
+}
+
+func (JobCondition) SwaggerDoc() map[string]string {
+ return map_JobCondition
+}
+
+var map_JobList = map[string]string{
+ "": "JobList is a collection of jobs.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "items": "items is the list of Jobs.",
+}
+
+func (JobList) SwaggerDoc() map[string]string {
+ return map_JobList
+}
+
+var map_JobSpec = map[string]string{
+ "": "JobSpec describes how the job execution will look like.",
+ "parallelism": "Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/",
+ "completions": "Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/",
+ "activeDeadlineSeconds": "Optional duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer",
+ "selector": "A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
+ "manualSelector": "manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://git.k8s.io/community/contributors/design-proposals/selector-generation.md",
+ "template": "Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/",
+}
+
+func (JobSpec) SwaggerDoc() map[string]string {
+ return map_JobSpec
+}
+
+var map_JobStatus = map[string]string{
+ "": "JobStatus represents the current state of a Job.",
+ "conditions": "The latest available observations of an object's current state. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/",
+ "startTime": "Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.",
+ "completionTime": "Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.",
+ "active": "The number of actively running pods.",
+ "succeeded": "The number of pods which reached phase Succeeded.",
+ "failed": "The number of pods which reached phase Failed.",
+}
+
+func (JobStatus) SwaggerDoc() map[string]string {
+ return map_JobStatus
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/zz_generated.conversion.go
new file mode 100644
index 000000000..4ec4f29e4
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/zz_generated.conversion.go
@@ -0,0 +1,210 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api "k8s.io/kubernetes/pkg/api"
+ api_v1 "k8s.io/kubernetes/pkg/api/v1"
+ batch "k8s.io/kubernetes/pkg/apis/batch"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1_Job_To_batch_Job,
+ Convert_batch_Job_To_v1_Job,
+ Convert_v1_JobCondition_To_batch_JobCondition,
+ Convert_batch_JobCondition_To_v1_JobCondition,
+ Convert_v1_JobList_To_batch_JobList,
+ Convert_batch_JobList_To_v1_JobList,
+ Convert_v1_JobSpec_To_batch_JobSpec,
+ Convert_batch_JobSpec_To_v1_JobSpec,
+ Convert_v1_JobStatus_To_batch_JobStatus,
+ Convert_batch_JobStatus_To_v1_JobStatus,
+ )
+}
+
+func autoConvert_v1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_JobSpec_To_batch_JobSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1_JobStatus_To_batch_JobStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_Job_To_batch_Job is an autogenerated conversion function.
+func Convert_v1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error {
+ return autoConvert_v1_Job_To_batch_Job(in, out, s)
+}
+
+func autoConvert_batch_Job_To_v1_Job(in *batch.Job, out *Job, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_batch_JobSpec_To_v1_JobSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_batch_JobStatus_To_v1_JobStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_batch_Job_To_v1_Job is an autogenerated conversion function.
+func Convert_batch_Job_To_v1_Job(in *batch.Job, out *Job, s conversion.Scope) error {
+ return autoConvert_batch_Job_To_v1_Job(in, out, s)
+}
+
+func autoConvert_v1_JobCondition_To_batch_JobCondition(in *JobCondition, out *batch.JobCondition, s conversion.Scope) error {
+ out.Type = batch.JobConditionType(in.Type)
+ out.Status = api.ConditionStatus(in.Status)
+ out.LastProbeTime = in.LastProbeTime
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_v1_JobCondition_To_batch_JobCondition is an autogenerated conversion function.
+func Convert_v1_JobCondition_To_batch_JobCondition(in *JobCondition, out *batch.JobCondition, s conversion.Scope) error {
+ return autoConvert_v1_JobCondition_To_batch_JobCondition(in, out, s)
+}
+
+func autoConvert_batch_JobCondition_To_v1_JobCondition(in *batch.JobCondition, out *JobCondition, s conversion.Scope) error {
+ out.Type = JobConditionType(in.Type)
+ out.Status = api_v1.ConditionStatus(in.Status)
+ out.LastProbeTime = in.LastProbeTime
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_batch_JobCondition_To_v1_JobCondition is an autogenerated conversion function.
+func Convert_batch_JobCondition_To_v1_JobCondition(in *batch.JobCondition, out *JobCondition, s conversion.Scope) error {
+ return autoConvert_batch_JobCondition_To_v1_JobCondition(in, out, s)
+}
+
+func autoConvert_v1_JobList_To_batch_JobList(in *JobList, out *batch.JobList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]batch.Job, len(*in))
+ for i := range *in {
+ if err := Convert_v1_Job_To_batch_Job(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1_JobList_To_batch_JobList is an autogenerated conversion function.
+func Convert_v1_JobList_To_batch_JobList(in *JobList, out *batch.JobList, s conversion.Scope) error {
+ return autoConvert_v1_JobList_To_batch_JobList(in, out, s)
+}
+
+func autoConvert_batch_JobList_To_v1_JobList(in *batch.JobList, out *JobList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Job, len(*in))
+ for i := range *in {
+ if err := Convert_batch_Job_To_v1_Job(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]Job, 0)
+ }
+ return nil
+}
+
+// Convert_batch_JobList_To_v1_JobList is an autogenerated conversion function.
+func Convert_batch_JobList_To_v1_JobList(in *batch.JobList, out *JobList, s conversion.Scope) error {
+ return autoConvert_batch_JobList_To_v1_JobList(in, out, s)
+}
+
+func autoConvert_v1_JobSpec_To_batch_JobSpec(in *JobSpec, out *batch.JobSpec, s conversion.Scope) error {
+ out.Parallelism = (*int32)(unsafe.Pointer(in.Parallelism))
+ out.Completions = (*int32)(unsafe.Pointer(in.Completions))
+ out.ActiveDeadlineSeconds = (*int64)(unsafe.Pointer(in.ActiveDeadlineSeconds))
+ out.Selector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.Selector))
+ out.ManualSelector = (*bool)(unsafe.Pointer(in.ManualSelector))
+ if err := api_v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func autoConvert_batch_JobSpec_To_v1_JobSpec(in *batch.JobSpec, out *JobSpec, s conversion.Scope) error {
+ out.Parallelism = (*int32)(unsafe.Pointer(in.Parallelism))
+ out.Completions = (*int32)(unsafe.Pointer(in.Completions))
+ out.ActiveDeadlineSeconds = (*int64)(unsafe.Pointer(in.ActiveDeadlineSeconds))
+ out.Selector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.Selector))
+ out.ManualSelector = (*bool)(unsafe.Pointer(in.ManualSelector))
+ if err := api_v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func autoConvert_v1_JobStatus_To_batch_JobStatus(in *JobStatus, out *batch.JobStatus, s conversion.Scope) error {
+ out.Conditions = *(*[]batch.JobCondition)(unsafe.Pointer(&in.Conditions))
+ out.StartTime = (*meta_v1.Time)(unsafe.Pointer(in.StartTime))
+ out.CompletionTime = (*meta_v1.Time)(unsafe.Pointer(in.CompletionTime))
+ out.Active = in.Active
+ out.Succeeded = in.Succeeded
+ out.Failed = in.Failed
+ return nil
+}
+
+// Convert_v1_JobStatus_To_batch_JobStatus is an autogenerated conversion function.
+func Convert_v1_JobStatus_To_batch_JobStatus(in *JobStatus, out *batch.JobStatus, s conversion.Scope) error {
+ return autoConvert_v1_JobStatus_To_batch_JobStatus(in, out, s)
+}
+
+func autoConvert_batch_JobStatus_To_v1_JobStatus(in *batch.JobStatus, out *JobStatus, s conversion.Scope) error {
+ out.Conditions = *(*[]JobCondition)(unsafe.Pointer(&in.Conditions))
+ out.StartTime = (*meta_v1.Time)(unsafe.Pointer(in.StartTime))
+ out.CompletionTime = (*meta_v1.Time)(unsafe.Pointer(in.CompletionTime))
+ out.Active = in.Active
+ out.Succeeded = in.Succeeded
+ out.Failed = in.Failed
+ return nil
+}
+
+// Convert_batch_JobStatus_To_v1_JobStatus is an autogenerated conversion function.
+func Convert_batch_JobStatus_To_v1_JobStatus(in *batch.JobStatus, out *JobStatus, s conversion.Scope) error {
+ return autoConvert_batch_JobStatus_To_v1_JobStatus(in, out, s)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..a372c1eea
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/zz_generated.deepcopy.go
@@ -0,0 +1,167 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api_v1 "k8s.io/kubernetes/pkg/api/v1"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Job, InType: reflect.TypeOf(&Job{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_JobCondition, InType: reflect.TypeOf(&JobCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_JobList, InType: reflect.TypeOf(&JobList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_JobSpec, InType: reflect.TypeOf(&JobSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_JobStatus, InType: reflect.TypeOf(&JobStatus{})},
+ )
+}
+
+// DeepCopy_v1_Job is an autogenerated deepcopy function.
+func DeepCopy_v1_Job(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Job)
+ out := out.(*Job)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_JobSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1_JobStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_JobCondition is an autogenerated deepcopy function.
+func DeepCopy_v1_JobCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*JobCondition)
+ out := out.(*JobCondition)
+ *out = *in
+ out.LastProbeTime = in.LastProbeTime.DeepCopy()
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1_JobList is an autogenerated deepcopy function.
+func DeepCopy_v1_JobList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*JobList)
+ out := out.(*JobList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Job, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_Job(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_JobSpec is an autogenerated deepcopy function.
+func DeepCopy_v1_JobSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*JobSpec)
+ out := out.(*JobSpec)
+ *out = *in
+ if in.Parallelism != nil {
+ in, out := &in.Parallelism, &out.Parallelism
+ *out = new(int32)
+ **out = **in
+ }
+ if in.Completions != nil {
+ in, out := &in.Completions, &out.Completions
+ *out = new(int32)
+ **out = **in
+ }
+ if in.ActiveDeadlineSeconds != nil {
+ in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*meta_v1.LabelSelector)
+ }
+ }
+ if in.ManualSelector != nil {
+ in, out := &in.ManualSelector, &out.ManualSelector
+ *out = new(bool)
+ **out = **in
+ }
+ if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_JobStatus is an autogenerated deepcopy function.
+func DeepCopy_v1_JobStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*JobStatus)
+ out := out.(*JobStatus)
+ *out = *in
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]JobCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_JobCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.StartTime != nil {
+ in, out := &in.StartTime, &out.StartTime
+ *out = new(meta_v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ if in.CompletionTime != nil {
+ in, out := &in.CompletionTime, &out.CompletionTime
+ *out = new(meta_v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/zz_generated.defaults.go
new file mode 100644
index 000000000..b291d5f89
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/zz_generated.defaults.go
@@ -0,0 +1,176 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api_v1 "k8s.io/kubernetes/pkg/api/v1"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ scheme.AddTypeDefaultingFunc(&Job{}, func(obj interface{}) { SetObjectDefaults_Job(obj.(*Job)) })
+ scheme.AddTypeDefaultingFunc(&JobList{}, func(obj interface{}) { SetObjectDefaults_JobList(obj.(*JobList)) })
+ return nil
+}
+
+func SetObjectDefaults_Job(in *Job) {
+ SetDefaults_Job(in)
+ api_v1.SetDefaults_PodSpec(&in.Spec.Template.Spec)
+ for i := range in.Spec.Template.Spec.Volumes {
+ a := &in.Spec.Template.Spec.Volumes[i]
+ api_v1.SetDefaults_Volume(a)
+ if a.VolumeSource.Secret != nil {
+ api_v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
+ }
+ if a.VolumeSource.ISCSI != nil {
+ api_v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
+ }
+ if a.VolumeSource.RBD != nil {
+ api_v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
+ }
+ if a.VolumeSource.DownwardAPI != nil {
+ api_v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
+ for j := range a.VolumeSource.DownwardAPI.Items {
+ b := &a.VolumeSource.DownwardAPI.Items[j]
+ if b.FieldRef != nil {
+ api_v1.SetDefaults_ObjectFieldSelector(b.FieldRef)
+ }
+ }
+ }
+ if a.VolumeSource.ConfigMap != nil {
+ api_v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
+ }
+ if a.VolumeSource.AzureDisk != nil {
+ api_v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
+ }
+ if a.VolumeSource.Projected != nil {
+ api_v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
+ for j := range a.VolumeSource.Projected.Sources {
+ b := &a.VolumeSource.Projected.Sources[j]
+ if b.DownwardAPI != nil {
+ for k := range b.DownwardAPI.Items {
+ c := &b.DownwardAPI.Items[k]
+ if c.FieldRef != nil {
+ api_v1.SetDefaults_ObjectFieldSelector(c.FieldRef)
+ }
+ }
+ }
+ }
+ }
+ if a.VolumeSource.ScaleIO != nil {
+ api_v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO)
+ }
+ }
+ for i := range in.Spec.Template.Spec.InitContainers {
+ a := &in.Spec.Template.Spec.InitContainers[i]
+ api_v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ api_v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ api_v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ api_v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ api_v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ api_v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ api_v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ api_v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ api_v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ api_v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ api_v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+ for i := range in.Spec.Template.Spec.Containers {
+ a := &in.Spec.Template.Spec.Containers[i]
+ api_v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ api_v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ api_v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ api_v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ api_v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ api_v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ api_v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ api_v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ api_v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ api_v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ api_v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+}
+
+func SetObjectDefaults_JobList(in *JobList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_Job(a)
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/conversion.go
new file mode 100644
index 000000000..2393fdca9
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/conversion.go
@@ -0,0 +1,44 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+import (
+ "fmt"
+
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) error {
+ var err error
+ // Add field label conversions for kinds having selectable nothing but ObjectMeta fields.
+ for _, k := range []string{"Job", "JobTemplate", "CronJob"} {
+ kind := k // don't close over range variables
+ err = scheme.AddFieldLabelConversionFunc("batch/v2alpha1", kind,
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "metadata.name", "metadata.namespace", "status.successful":
+ return label, value, nil
+ default:
+ return "", "", fmt.Errorf("field label %q not supported for %q", label, kind)
+ }
+ })
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/defaults.go
new file mode 100644
index 000000000..292f8886e
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/defaults.go
@@ -0,0 +1,34 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
+
+func SetDefaults_CronJob(obj *CronJob) {
+ if obj.Spec.ConcurrencyPolicy == "" {
+ obj.Spec.ConcurrencyPolicy = AllowConcurrent
+ }
+ if obj.Spec.Suspend == nil {
+ obj.Spec.Suspend = new(bool)
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/doc.go
new file mode 100644
index 000000000..fb00a5be9
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/doc.go
@@ -0,0 +1,22 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/batch
+// +k8s:openapi-gen=true
+// +k8s:defaulter-gen=TypeMeta
+
+package v2alpha1 // import "k8s.io/kubernetes/pkg/apis/batch/v2alpha1"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.pb.go
new file mode 100644
index 000000000..72070f91c
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.pb.go
@@ -0,0 +1,1511 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v2alpha1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.proto
+
+ It has these top-level messages:
+ CronJob
+ CronJobList
+ CronJobSpec
+ CronJobStatus
+ JobTemplate
+ JobTemplateSpec
+*/
+package v2alpha1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+import k8s_io_kubernetes_pkg_api_v1 "k8s.io/kubernetes/pkg/api/v1"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *CronJob) Reset() { *m = CronJob{} }
+func (*CronJob) ProtoMessage() {}
+func (*CronJob) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *CronJobList) Reset() { *m = CronJobList{} }
+func (*CronJobList) ProtoMessage() {}
+func (*CronJobList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *CronJobSpec) Reset() { *m = CronJobSpec{} }
+func (*CronJobSpec) ProtoMessage() {}
+func (*CronJobSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
+
+func (m *CronJobStatus) Reset() { *m = CronJobStatus{} }
+func (*CronJobStatus) ProtoMessage() {}
+func (*CronJobStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
+
+func (m *JobTemplate) Reset() { *m = JobTemplate{} }
+func (*JobTemplate) ProtoMessage() {}
+func (*JobTemplate) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
+
+func (m *JobTemplateSpec) Reset() { *m = JobTemplateSpec{} }
+func (*JobTemplateSpec) ProtoMessage() {}
+func (*JobTemplateSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
+
+func init() {
+ proto.RegisterType((*CronJob)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.CronJob")
+ proto.RegisterType((*CronJobList)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.CronJobList")
+ proto.RegisterType((*CronJobSpec)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.CronJobSpec")
+ proto.RegisterType((*CronJobStatus)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.CronJobStatus")
+ proto.RegisterType((*JobTemplate)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.JobTemplate")
+ proto.RegisterType((*JobTemplateSpec)(nil), "k8s.io.kubernetes.pkg.apis.batch.v2alpha1.JobTemplateSpec")
+}
+func (m *CronJob) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CronJob) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n2, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n3, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ return i, nil
+}
+
+func (m *CronJobList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CronJobList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n4, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *CronJobSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CronJobSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Schedule)))
+ i += copy(dAtA[i:], m.Schedule)
+ if m.StartingDeadlineSeconds != nil {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.StartingDeadlineSeconds))
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ConcurrencyPolicy)))
+ i += copy(dAtA[i:], m.ConcurrencyPolicy)
+ if m.Suspend != nil {
+ dAtA[i] = 0x20
+ i++
+ if *m.Suspend {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.JobTemplate.Size()))
+ n5, err := m.JobTemplate.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ if m.SuccessfulJobsHistoryLimit != nil {
+ dAtA[i] = 0x30
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.SuccessfulJobsHistoryLimit))
+ }
+ if m.FailedJobsHistoryLimit != nil {
+ dAtA[i] = 0x38
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.FailedJobsHistoryLimit))
+ }
+ return i, nil
+}
+
+func (m *CronJobStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CronJobStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Active) > 0 {
+ for _, msg := range m.Active {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.LastScheduleTime != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastScheduleTime.Size()))
+ n6, err := m.LastScheduleTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ }
+ return i, nil
+}
+
+func (m *JobTemplate) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *JobTemplate) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n7, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
+ n8, err := m.Template.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n8
+ return i, nil
+}
+
+func (m *JobTemplateSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *JobTemplateSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n9, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n9
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n10, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n10
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *CronJob) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *CronJobList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *CronJobSpec) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Schedule)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.StartingDeadlineSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.StartingDeadlineSeconds))
+ }
+ l = len(m.ConcurrencyPolicy)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Suspend != nil {
+ n += 2
+ }
+ l = m.JobTemplate.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.SuccessfulJobsHistoryLimit != nil {
+ n += 1 + sovGenerated(uint64(*m.SuccessfulJobsHistoryLimit))
+ }
+ if m.FailedJobsHistoryLimit != nil {
+ n += 1 + sovGenerated(uint64(*m.FailedJobsHistoryLimit))
+ }
+ return n
+}
+
+func (m *CronJobStatus) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Active) > 0 {
+ for _, e := range m.Active {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.LastScheduleTime != nil {
+ l = m.LastScheduleTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *JobTemplate) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Template.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *JobTemplateSpec) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *CronJob) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CronJob{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "CronJobSpec", "CronJobSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "CronJobStatus", "CronJobStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CronJobList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CronJobList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "CronJob", "CronJob", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CronJobSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CronJobSpec{`,
+ `Schedule:` + fmt.Sprintf("%v", this.Schedule) + `,`,
+ `StartingDeadlineSeconds:` + valueToStringGenerated(this.StartingDeadlineSeconds) + `,`,
+ `ConcurrencyPolicy:` + fmt.Sprintf("%v", this.ConcurrencyPolicy) + `,`,
+ `Suspend:` + valueToStringGenerated(this.Suspend) + `,`,
+ `JobTemplate:` + strings.Replace(strings.Replace(this.JobTemplate.String(), "JobTemplateSpec", "JobTemplateSpec", 1), `&`, ``, 1) + `,`,
+ `SuccessfulJobsHistoryLimit:` + valueToStringGenerated(this.SuccessfulJobsHistoryLimit) + `,`,
+ `FailedJobsHistoryLimit:` + valueToStringGenerated(this.FailedJobsHistoryLimit) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CronJobStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CronJobStatus{`,
+ `Active:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Active), "ObjectReference", "k8s_io_kubernetes_pkg_api_v1.ObjectReference", 1), `&`, ``, 1) + `,`,
+ `LastScheduleTime:` + strings.Replace(fmt.Sprintf("%v", this.LastScheduleTime), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *JobTemplate) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&JobTemplate{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Template:` + strings.Replace(strings.Replace(this.Template.String(), "JobTemplateSpec", "JobTemplateSpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *JobTemplateSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&JobTemplateSpec{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "JobSpec", "k8s_io_kubernetes_pkg_apis_batch_v1.JobSpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *CronJob) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CronJob: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CronJob: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CronJobList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CronJobList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CronJobList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, CronJob{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CronJobSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CronJobSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CronJobSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Schedule", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Schedule = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StartingDeadlineSeconds", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.StartingDeadlineSeconds = &v
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ConcurrencyPolicy", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ConcurrencyPolicy = ConcurrencyPolicy(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Suspend", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Suspend = &b
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field JobTemplate", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.JobTemplate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SuccessfulJobsHistoryLimit", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.SuccessfulJobsHistoryLimit = &v
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FailedJobsHistoryLimit", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.FailedJobsHistoryLimit = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CronJobStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CronJobStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CronJobStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Active", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Active = append(m.Active, k8s_io_kubernetes_pkg_api_v1.ObjectReference{})
+ if err := m.Active[len(m.Active)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastScheduleTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.LastScheduleTime == nil {
+ m.LastScheduleTime = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{}
+ }
+ if err := m.LastScheduleTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *JobTemplate) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: JobTemplate: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: JobTemplate: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *JobTemplateSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: JobTemplateSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: JobTemplateSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 786 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0x4d, 0x4f, 0xdb, 0x48,
+ 0x18, 0xc7, 0xe3, 0x90, 0x37, 0x26, 0xcb, 0x2e, 0x78, 0x57, 0x10, 0x65, 0x25, 0x27, 0x8a, 0xb4,
+ 0x52, 0x76, 0x05, 0xe3, 0x25, 0xac, 0x10, 0xdb, 0x5b, 0x4d, 0x55, 0xb5, 0x88, 0xbe, 0xc8, 0x01,
+ 0xb5, 0xaa, 0x50, 0xc5, 0xd8, 0x99, 0x24, 0x43, 0xfc, 0x56, 0xcf, 0x38, 0x52, 0x6e, 0xfd, 0x08,
+ 0xfd, 0x16, 0xfd, 0x16, 0xbd, 0xb4, 0x07, 0x8e, 0x1c, 0x7a, 0xa0, 0x97, 0xa8, 0xb8, 0xdf, 0xa2,
+ 0xa7, 0xca, 0x13, 0x27, 0x0e, 0x38, 0x2e, 0xa1, 0x95, 0xb8, 0x79, 0xc6, 0xcf, 0xff, 0x37, 0xcf,
+ 0xf3, 0x7f, 0x9e, 0x19, 0xf0, 0x7f, 0x6f, 0x87, 0x42, 0x62, 0xcb, 0x3d, 0x4f, 0xc3, 0xae, 0x85,
+ 0x19, 0xa6, 0xb2, 0xd3, 0xeb, 0xc8, 0xc8, 0x21, 0x54, 0xd6, 0x10, 0xd3, 0xbb, 0x72, 0xbf, 0x81,
+ 0x0c, 0xa7, 0x8b, 0x36, 0xe5, 0x0e, 0xb6, 0xb0, 0x8b, 0x18, 0x6e, 0x41, 0xc7, 0xb5, 0x99, 0x2d,
+ 0xfe, 0x3d, 0x92, 0xc2, 0x48, 0x0a, 0x9d, 0x5e, 0x07, 0x06, 0x52, 0xc8, 0xa5, 0x70, 0x2c, 0x2d,
+ 0x6f, 0x74, 0x08, 0xeb, 0x7a, 0x1a, 0xd4, 0x6d, 0x53, 0xee, 0xd8, 0x1d, 0x5b, 0xe6, 0x04, 0xcd,
+ 0x6b, 0xf3, 0x15, 0x5f, 0xf0, 0xaf, 0x11, 0xb9, 0xfc, 0x5f, 0x98, 0x14, 0x72, 0x88, 0x89, 0xf4,
+ 0x2e, 0xb1, 0xb0, 0x3b, 0x88, 0xd2, 0x32, 0x31, 0x43, 0x72, 0x3f, 0x96, 0x4f, 0x59, 0x4e, 0x52,
+ 0xb9, 0x9e, 0xc5, 0x88, 0x89, 0x63, 0x82, 0xed, 0xeb, 0x04, 0x54, 0xef, 0x62, 0x13, 0xc5, 0x74,
+ 0x5b, 0x49, 0x3a, 0x8f, 0x11, 0x43, 0x26, 0x16, 0xa3, 0xcc, 0x8d, 0x89, 0xd6, 0x13, 0x8d, 0x9e,
+ 0x55, 0xcb, 0xd6, 0xf5, 0x6d, 0x89, 0x89, 0x6a, 0x6f, 0xd3, 0x20, 0xbf, 0xeb, 0xda, 0xd6, 0x9e,
+ 0xad, 0x89, 0xc7, 0xa0, 0x10, 0xf8, 0xd4, 0x42, 0x0c, 0x95, 0x84, 0xaa, 0x50, 0x2f, 0x36, 0xfe,
+ 0x85, 0x61, 0xbf, 0xa6, 0xd3, 0x8e, 0x3a, 0x16, 0x44, 0xc3, 0xfe, 0x26, 0x7c, 0xa2, 0x9d, 0x60,
+ 0x9d, 0x3d, 0xc2, 0x0c, 0x29, 0xe2, 0xe9, 0xb0, 0x92, 0xf2, 0x87, 0x15, 0x10, 0xed, 0xa9, 0x13,
+ 0xaa, 0xf8, 0x1c, 0x64, 0xa8, 0x83, 0xf5, 0x52, 0x9a, 0xd3, 0xb7, 0xe1, 0xdc, 0xd3, 0x00, 0xc3,
+ 0x1c, 0x9b, 0x0e, 0xd6, 0x95, 0x5f, 0xc2, 0x33, 0x32, 0xc1, 0x4a, 0xe5, 0x44, 0xf1, 0x18, 0xe4,
+ 0x28, 0x43, 0xcc, 0xa3, 0xa5, 0x05, 0xce, 0xde, 0xf9, 0x01, 0x36, 0xd7, 0x2b, 0xbf, 0x86, 0xf4,
+ 0xdc, 0x68, 0xad, 0x86, 0xdc, 0xda, 0x07, 0x01, 0x14, 0xc3, 0xc8, 0x7d, 0x42, 0x99, 0x78, 0x14,
+ 0x73, 0x0b, 0xce, 0xe7, 0x56, 0xa0, 0xe6, 0x5e, 0x2d, 0x87, 0x27, 0x15, 0xc6, 0x3b, 0x53, 0x4e,
+ 0x3d, 0x03, 0x59, 0xc2, 0xb0, 0x49, 0x4b, 0xe9, 0xea, 0x42, 0xbd, 0xd8, 0x68, 0xdc, 0xbc, 0x1c,
+ 0x65, 0x29, 0xc4, 0x67, 0x1f, 0x06, 0x20, 0x75, 0xc4, 0xab, 0xbd, 0xcb, 0x4c, 0xca, 0x08, 0xec,
+ 0x13, 0xd7, 0x41, 0x21, 0x18, 0xd9, 0x96, 0x67, 0x60, 0x5e, 0xc6, 0x62, 0x94, 0x56, 0x33, 0xdc,
+ 0x57, 0x27, 0x11, 0xe2, 0x21, 0x58, 0xa3, 0x0c, 0xb9, 0x8c, 0x58, 0x9d, 0x7b, 0x18, 0xb5, 0x0c,
+ 0x62, 0xe1, 0x26, 0xd6, 0x6d, 0xab, 0x45, 0x79, 0x4f, 0x17, 0x94, 0x3f, 0xfd, 0x61, 0x65, 0xad,
+ 0x39, 0x3b, 0x44, 0x4d, 0xd2, 0x8a, 0x47, 0x60, 0x45, 0xb7, 0x2d, 0xdd, 0x73, 0x5d, 0x6c, 0xe9,
+ 0x83, 0xa7, 0xb6, 0x41, 0xf4, 0x01, 0x6f, 0xe4, 0xa2, 0x02, 0xc3, 0x6c, 0x56, 0x76, 0xaf, 0x06,
+ 0x7c, 0x9d, 0xb5, 0xa9, 0xc6, 0x41, 0xe2, 0x5f, 0x20, 0x4f, 0x3d, 0xea, 0x60, 0xab, 0x55, 0xca,
+ 0x54, 0x85, 0x7a, 0x41, 0x29, 0xfa, 0xc3, 0x4a, 0xbe, 0x39, 0xda, 0x52, 0xc7, 0xff, 0xc4, 0x57,
+ 0xa0, 0x78, 0x62, 0x6b, 0x07, 0xd8, 0x74, 0x0c, 0xc4, 0x70, 0x29, 0xcb, 0x7b, 0x7a, 0xe7, 0x06,
+ 0xc6, 0xef, 0x45, 0x6a, 0x3e, 0xa7, 0xbf, 0x87, 0xa9, 0x17, 0xa7, 0x7e, 0xa8, 0xd3, 0x67, 0x88,
+ 0x2f, 0x41, 0x99, 0x7a, 0xba, 0x8e, 0x29, 0x6d, 0x7b, 0xc6, 0x9e, 0xad, 0xd1, 0x07, 0x84, 0x32,
+ 0xdb, 0x1d, 0xec, 0x13, 0x93, 0xb0, 0x52, 0xae, 0x2a, 0xd4, 0xb3, 0x8a, 0xe4, 0x0f, 0x2b, 0xe5,
+ 0x66, 0x62, 0x94, 0xfa, 0x1d, 0x82, 0xa8, 0x82, 0xd5, 0x36, 0x22, 0x06, 0x6e, 0xc5, 0xd8, 0x79,
+ 0xce, 0x2e, 0xfb, 0xc3, 0xca, 0xea, 0xfd, 0x99, 0x11, 0x6a, 0x82, 0xb2, 0xf6, 0x51, 0x00, 0x4b,
+ 0x97, 0x6e, 0x8c, 0x78, 0x08, 0x72, 0x48, 0x67, 0xa4, 0x1f, 0x0c, 0x50, 0x30, 0xac, 0x1b, 0xc9,
+ 0x9e, 0x45, 0xaf, 0x85, 0x8a, 0xdb, 0x38, 0x68, 0x12, 0x8e, 0x2e, 0xdc, 0x5d, 0x0e, 0x51, 0x43,
+ 0x98, 0x68, 0x80, 0x65, 0x03, 0x51, 0x36, 0x9e, 0xc2, 0x03, 0x62, 0x62, 0xde, 0xbf, 0x62, 0xe3,
+ 0x9f, 0xf9, 0x2e, 0x5a, 0xa0, 0x50, 0xfe, 0xf0, 0x87, 0x95, 0xe5, 0xfd, 0x2b, 0x1c, 0x35, 0x46,
+ 0xae, 0x7d, 0x12, 0xc0, 0x74, 0x9f, 0x6e, 0xe1, 0x31, 0xec, 0x82, 0x02, 0x1b, 0x0f, 0x5b, 0xfa,
+ 0xa7, 0x87, 0x6d, 0x72, 0x6b, 0x27, 0x93, 0x36, 0xa1, 0xd7, 0xde, 0x0b, 0xe0, 0xb7, 0x2b, 0xf1,
+ 0xb7, 0x50, 0xdf, 0xe3, 0x4b, 0x8f, 0xfd, 0xfa, 0x1c, 0xb5, 0xf1, 0xaa, 0x92, 0x9e, 0x78, 0x05,
+ 0x9e, 0x5e, 0x48, 0xa9, 0xb3, 0x0b, 0x29, 0x75, 0x7e, 0x21, 0xa5, 0x5e, 0xfb, 0x92, 0x70, 0xea,
+ 0x4b, 0xc2, 0x99, 0x2f, 0x09, 0xe7, 0xbe, 0x24, 0x7c, 0xf6, 0x25, 0xe1, 0xcd, 0x17, 0x29, 0xf5,
+ 0xa2, 0x30, 0x76, 0xe8, 0x5b, 0x00, 0x00, 0x00, 0xff, 0xff, 0x88, 0x78, 0x12, 0x5b, 0xa7, 0x08,
+ 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.proto
new file mode 100644
index 000000000..95ade2016
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.proto
@@ -0,0 +1,133 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.pkg.apis.batch.v2alpha1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+import "k8s.io/kubernetes/pkg/apis/batch/v1/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v2alpha1";
+
+// CronJob represents the configuration of a single cron job.
+message CronJob {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Specification of the desired behavior of a cron job, including the schedule.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional CronJobSpec spec = 2;
+
+ // Current status of a cron job.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional CronJobStatus status = 3;
+}
+
+// CronJobList is a collection of cron jobs.
+message CronJobList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // items is the list of CronJobs.
+ repeated CronJob items = 2;
+}
+
+// CronJobSpec describes how the job execution will look like and when it will actually run.
+message CronJobSpec {
+ // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
+ optional string schedule = 1;
+
+ // Optional deadline in seconds for starting the job if it misses scheduled
+ // time for any reason. Missed jobs executions will be counted as failed ones.
+ // +optional
+ optional int64 startingDeadlineSeconds = 2;
+
+ // Specifies how to treat concurrent executions of a Job.
+ // Defaults to Allow.
+ // +optional
+ optional string concurrencyPolicy = 3;
+
+ // This flag tells the controller to suspend subsequent executions, it does
+ // not apply to already started executions. Defaults to false.
+ // +optional
+ optional bool suspend = 4;
+
+ // Specifies the job that will be created when executing a CronJob.
+ optional JobTemplateSpec jobTemplate = 5;
+
+ // The number of successful finished jobs to retain.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ // +optional
+ optional int32 successfulJobsHistoryLimit = 6;
+
+ // The number of failed finished jobs to retain.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ // +optional
+ optional int32 failedJobsHistoryLimit = 7;
+}
+
+// CronJobStatus represents the current state of a cron job.
+message CronJobStatus {
+ // A list of pointers to currently running jobs.
+ // +optional
+ repeated k8s.io.kubernetes.pkg.api.v1.ObjectReference active = 1;
+
+ // Information when was the last time the job was successfully scheduled.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScheduleTime = 4;
+}
+
+// JobTemplate describes a template for creating copies of a predefined pod.
+message JobTemplate {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Defines jobs that will be created from this template.
+ // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional JobTemplateSpec template = 2;
+}
+
+// JobTemplateSpec describes the data a Job should have when created from a template
+message JobTemplateSpec {
+ // Standard object's metadata of the jobs created from this template.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Specification of the desired behavior of the job.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional k8s.io.kubernetes.pkg.apis.batch.v1.JobSpec spec = 2;
+}
+
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/register.go
new file mode 100644
index 000000000..11a397820
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/register.go
@@ -0,0 +1,62 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "batch"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v2alpha1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &JobTemplate{},
+ &CronJob{},
+ &CronJobList{},
+ )
+ scheme.AddKnownTypeWithName(SchemeGroupVersion.WithKind("ScheduledJob"), &CronJob{})
+ scheme.AddKnownTypeWithName(SchemeGroupVersion.WithKind("ScheduledJobList"), &CronJobList{})
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types.generated.go
new file mode 100644
index 000000000..b453fce9d
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types.generated.go
@@ -0,0 +1,2525 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v2alpha1
+
+import (
+ "errors"
+ "fmt"
+ 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"
+ pkg6_intstr "k8s.io/apimachinery/pkg/util/intstr"
+ pkg4_v1 "k8s.io/kubernetes/pkg/api/v1"
+ pkg3_v1 "k8s.io/kubernetes/pkg/apis/batch/v1"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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 pkg5_resource.Quantity
+ var v1 pkg1_v1.TypeMeta
+ var v2 pkg2_types.UID
+ var v3 pkg6_intstr.IntOrString
+ var v4 pkg4_v1.PodTemplateSpec
+ var v5 pkg3_v1.JobSpec
+ var v6 time.Time
+ _, _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5, v6
+ }
+}
+
+func (x *JobTemplate) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = true
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Template
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("template"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Template
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *JobTemplate) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *JobTemplate) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "template":
+ if r.TryDecodeAsNil() {
+ x.Template = JobTemplateSpec{}
+ } else {
+ yyv10 := &x.Template
+ yyv10.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *JobTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv12 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv14 := &x.APIVersion
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg1_v1.ObjectMeta{}
+ } else {
+ yyv16 := &x.ObjectMeta
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv16) {
+ } else {
+ z.DecFallback(yyv16, false)
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Template = JobTemplateSpec{}
+ } else {
+ yyv18 := &x.Template
+ yyv18.CodecDecodeSelf(d)
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *JobTemplateSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[1] {
+ yy9 := &x.Spec
+ yy9.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy11 := &x.Spec
+ yy11.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *JobTemplateSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *JobTemplateSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg3_v1.JobSpec{}
+ } else {
+ yyv6 := &x.Spec
+ yyv6.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *JobTemplateSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = pkg3_v1.JobSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *CronJob) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CronJob) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CronJob) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = CronJobSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = CronJobStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CronJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = CronJobSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = CronJobStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *CronJobList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceCronJob(([]CronJob)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceCronJob(([]CronJob)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CronJobList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CronJobList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceCronJob((*[]CronJob)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CronJobList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceCronJob((*[]CronJob)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *CronJobSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [7]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[1] = x.StartingDeadlineSeconds != nil
+ yyq2[2] = x.ConcurrencyPolicy != ""
+ yyq2[3] = x.Suspend != nil
+ yyq2[5] = x.SuccessfulJobsHistoryLimit != nil
+ yyq2[6] = x.FailedJobsHistoryLimit != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(7)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Schedule))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("schedule"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Schedule))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.StartingDeadlineSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy7 := *x.StartingDeadlineSeconds
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(yy7))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("startingDeadlineSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.StartingDeadlineSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy9 := *x.StartingDeadlineSeconds
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(yy9))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ x.ConcurrencyPolicy.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("concurrencyPolicy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.ConcurrencyPolicy.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Suspend == nil {
+ r.EncodeNil()
+ } else {
+ yy15 := *x.Suspend
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeBool(bool(yy15))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("suspend"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Suspend == nil {
+ r.EncodeNil()
+ } else {
+ yy17 := *x.Suspend
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeBool(bool(yy17))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy20 := &x.JobTemplate
+ yy20.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("jobTemplate"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.JobTemplate
+ yy22.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.SuccessfulJobsHistoryLimit == nil {
+ r.EncodeNil()
+ } else {
+ yy25 := *x.SuccessfulJobsHistoryLimit
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeInt(int64(yy25))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("successfulJobsHistoryLimit"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SuccessfulJobsHistoryLimit == nil {
+ r.EncodeNil()
+ } else {
+ yy27 := *x.SuccessfulJobsHistoryLimit
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeInt(int64(yy27))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.FailedJobsHistoryLimit == nil {
+ r.EncodeNil()
+ } else {
+ yy30 := *x.FailedJobsHistoryLimit
+ yym31 := z.EncBinary()
+ _ = yym31
+ if false {
+ } else {
+ r.EncodeInt(int64(yy30))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("failedJobsHistoryLimit"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.FailedJobsHistoryLimit == nil {
+ r.EncodeNil()
+ } else {
+ yy32 := *x.FailedJobsHistoryLimit
+ yym33 := z.EncBinary()
+ _ = yym33
+ if false {
+ } else {
+ r.EncodeInt(int64(yy32))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CronJobSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CronJobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "schedule":
+ if r.TryDecodeAsNil() {
+ x.Schedule = ""
+ } else {
+ yyv4 := &x.Schedule
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "startingDeadlineSeconds":
+ if r.TryDecodeAsNil() {
+ if x.StartingDeadlineSeconds != nil {
+ x.StartingDeadlineSeconds = nil
+ }
+ } else {
+ if x.StartingDeadlineSeconds == nil {
+ x.StartingDeadlineSeconds = new(int64)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int64)(x.StartingDeadlineSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "concurrencyPolicy":
+ if r.TryDecodeAsNil() {
+ x.ConcurrencyPolicy = ""
+ } else {
+ yyv8 := &x.ConcurrencyPolicy
+ yyv8.CodecDecodeSelf(d)
+ }
+ case "suspend":
+ if r.TryDecodeAsNil() {
+ if x.Suspend != nil {
+ x.Suspend = nil
+ }
+ } else {
+ if x.Suspend == nil {
+ x.Suspend = new(bool)
+ }
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ *((*bool)(x.Suspend)) = r.DecodeBool()
+ }
+ }
+ case "jobTemplate":
+ if r.TryDecodeAsNil() {
+ x.JobTemplate = JobTemplateSpec{}
+ } else {
+ yyv11 := &x.JobTemplate
+ yyv11.CodecDecodeSelf(d)
+ }
+ case "successfulJobsHistoryLimit":
+ if r.TryDecodeAsNil() {
+ if x.SuccessfulJobsHistoryLimit != nil {
+ x.SuccessfulJobsHistoryLimit = nil
+ }
+ } else {
+ if x.SuccessfulJobsHistoryLimit == nil {
+ x.SuccessfulJobsHistoryLimit = new(int32)
+ }
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int32)(x.SuccessfulJobsHistoryLimit)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "failedJobsHistoryLimit":
+ if r.TryDecodeAsNil() {
+ if x.FailedJobsHistoryLimit != nil {
+ x.FailedJobsHistoryLimit = nil
+ }
+ } else {
+ if x.FailedJobsHistoryLimit == nil {
+ x.FailedJobsHistoryLimit = new(int32)
+ }
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*int32)(x.FailedJobsHistoryLimit)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CronJobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj16 int
+ var yyb16 bool
+ var yyhl16 bool = l >= 0
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Schedule = ""
+ } else {
+ yyv17 := &x.Schedule
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.StartingDeadlineSeconds != nil {
+ x.StartingDeadlineSeconds = nil
+ }
+ } else {
+ if x.StartingDeadlineSeconds == nil {
+ x.StartingDeadlineSeconds = new(int64)
+ }
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*int64)(x.StartingDeadlineSeconds)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ConcurrencyPolicy = ""
+ } else {
+ yyv21 := &x.ConcurrencyPolicy
+ yyv21.CodecDecodeSelf(d)
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Suspend != nil {
+ x.Suspend = nil
+ }
+ } else {
+ if x.Suspend == nil {
+ x.Suspend = new(bool)
+ }
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else {
+ *((*bool)(x.Suspend)) = r.DecodeBool()
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.JobTemplate = JobTemplateSpec{}
+ } else {
+ yyv24 := &x.JobTemplate
+ yyv24.CodecDecodeSelf(d)
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SuccessfulJobsHistoryLimit != nil {
+ x.SuccessfulJobsHistoryLimit = nil
+ }
+ } else {
+ if x.SuccessfulJobsHistoryLimit == nil {
+ x.SuccessfulJobsHistoryLimit = new(int32)
+ }
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*int32)(x.SuccessfulJobsHistoryLimit)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.FailedJobsHistoryLimit != nil {
+ x.FailedJobsHistoryLimit = nil
+ }
+ } else {
+ if x.FailedJobsHistoryLimit == nil {
+ x.FailedJobsHistoryLimit = new(int32)
+ }
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*int32)(x.FailedJobsHistoryLimit)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj16-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x ConcurrencyPolicy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *ConcurrencyPolicy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *CronJobStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Active) != 0
+ yyq2[1] = x.LastScheduleTime != 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Active == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSlicev1_ObjectReference(([]pkg4_v1.ObjectReference)(x.Active), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("active"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Active == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSlicev1_ObjectReference(([]pkg4_v1.ObjectReference)(x.Active), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.LastScheduleTime == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.LastScheduleTime) {
+ } else if yym7 {
+ z.EncBinaryMarshal(x.LastScheduleTime)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.LastScheduleTime)
+ } else {
+ z.EncFallback(x.LastScheduleTime)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastScheduleTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.LastScheduleTime == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.LastScheduleTime) {
+ } else if yym8 {
+ z.EncBinaryMarshal(x.LastScheduleTime)
+ } else if !yym8 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.LastScheduleTime)
+ } else {
+ z.EncFallback(x.LastScheduleTime)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CronJobStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CronJobStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "active":
+ if r.TryDecodeAsNil() {
+ x.Active = nil
+ } else {
+ yyv4 := &x.Active
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSlicev1_ObjectReference((*[]pkg4_v1.ObjectReference)(yyv4), d)
+ }
+ }
+ case "lastScheduleTime":
+ if r.TryDecodeAsNil() {
+ if x.LastScheduleTime != nil {
+ x.LastScheduleTime = nil
+ }
+ } else {
+ if x.LastScheduleTime == nil {
+ x.LastScheduleTime = new(pkg1_v1.Time)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.LastScheduleTime) {
+ } else if yym7 {
+ z.DecBinaryUnmarshal(x.LastScheduleTime)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.LastScheduleTime)
+ } else {
+ z.DecFallback(x.LastScheduleTime, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CronJobStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Active = nil
+ } else {
+ yyv9 := &x.Active
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSlicev1_ObjectReference((*[]pkg4_v1.ObjectReference)(yyv9), d)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.LastScheduleTime != nil {
+ x.LastScheduleTime = nil
+ }
+ } else {
+ if x.LastScheduleTime == nil {
+ x.LastScheduleTime = new(pkg1_v1.Time)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.LastScheduleTime) {
+ } else if yym12 {
+ z.DecBinaryUnmarshal(x.LastScheduleTime)
+ } else if !yym12 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.LastScheduleTime)
+ } else {
+ z.DecFallback(x.LastScheduleTime, false)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encSliceCronJob(v []CronJob, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceCronJob(v *[]CronJob, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []CronJob{}
+ 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, 1192)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]CronJob, yyrl1)
+ }
+ } else {
+ yyv1 = make([]CronJob, 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] = CronJob{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, CronJob{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = CronJob{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, CronJob{}) // var yyz1 CronJob
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = CronJob{}
+ } 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 = []CronJob{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSlicev1_ObjectReference(v []pkg4_v1.ObjectReference, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicev1_ObjectReference(v *[]pkg4_v1.ObjectReference, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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.ObjectReference{}
+ 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, 112)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]pkg4_v1.ObjectReference, yyrl1)
+ }
+ } else {
+ yyv1 = make([]pkg4_v1.ObjectReference, 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.ObjectReference{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, pkg4_v1.ObjectReference{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = pkg4_v1.ObjectReference{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, pkg4_v1.ObjectReference{}) // var yyz1 pkg4_v1.ObjectReference
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = pkg4_v1.ObjectReference{}
+ } 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.ObjectReference{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types.go
new file mode 100644
index 000000000..e9bb7266b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types.go
@@ -0,0 +1,148 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/kubernetes/pkg/api/v1"
+ batchv1 "k8s.io/kubernetes/pkg/apis/batch/v1"
+)
+
+// JobTemplate describes a template for creating copies of a predefined pod.
+type JobTemplate struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Defines jobs that will be created from this template.
+ // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Template JobTemplateSpec `json:"template,omitempty" protobuf:"bytes,2,opt,name=template"`
+}
+
+// JobTemplateSpec describes the data a Job should have when created from a template
+type JobTemplateSpec struct {
+ // Standard object's metadata of the jobs created from this template.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Specification of the desired behavior of the job.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec batchv1.JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+}
+
+// +genclient=true
+
+// CronJob represents the configuration of a single cron job.
+type CronJob struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Specification of the desired behavior of a cron job, including the schedule.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec CronJobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Current status of a cron job.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status CronJobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// CronJobList is a collection of cron jobs.
+type CronJobList struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // items is the list of CronJobs.
+ Items []CronJob `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// CronJobSpec describes how the job execution will look like and when it will actually run.
+type CronJobSpec struct {
+
+ // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
+ Schedule string `json:"schedule" protobuf:"bytes,1,opt,name=schedule"`
+
+ // Optional deadline in seconds for starting the job if it misses scheduled
+ // time for any reason. Missed jobs executions will be counted as failed ones.
+ // +optional
+ StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty" protobuf:"varint,2,opt,name=startingDeadlineSeconds"`
+
+ // Specifies how to treat concurrent executions of a Job.
+ // Defaults to Allow.
+ // +optional
+ ConcurrencyPolicy ConcurrencyPolicy `json:"concurrencyPolicy,omitempty" protobuf:"bytes,3,opt,name=concurrencyPolicy,casttype=ConcurrencyPolicy"`
+
+ // This flag tells the controller to suspend subsequent executions, it does
+ // not apply to already started executions. Defaults to false.
+ // +optional
+ Suspend *bool `json:"suspend,omitempty" protobuf:"varint,4,opt,name=suspend"`
+
+ // Specifies the job that will be created when executing a CronJob.
+ JobTemplate JobTemplateSpec `json:"jobTemplate" protobuf:"bytes,5,opt,name=jobTemplate"`
+
+ // The number of successful finished jobs to retain.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ // +optional
+ SuccessfulJobsHistoryLimit *int32 `json:"successfulJobsHistoryLimit,omitempty" protobuf:"varint,6,opt,name=successfulJobsHistoryLimit"`
+
+ // The number of failed finished jobs to retain.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ // +optional
+ FailedJobsHistoryLimit *int32 `json:"failedJobsHistoryLimit,omitempty" protobuf:"varint,7,opt,name=failedJobsHistoryLimit"`
+}
+
+// ConcurrencyPolicy describes how the job will be handled.
+// Only one of the following concurrent policies may be specified.
+// If none of the following policies is specified, the default one
+// is AllowConcurrent.
+type ConcurrencyPolicy string
+
+const (
+ // AllowConcurrent allows CronJobs to run concurrently.
+ AllowConcurrent ConcurrencyPolicy = "Allow"
+
+ // ForbidConcurrent forbids concurrent runs, skipping next run if previous
+ // hasn't finished yet.
+ ForbidConcurrent ConcurrencyPolicy = "Forbid"
+
+ // ReplaceConcurrent cancels currently running job and replaces it with a new one.
+ ReplaceConcurrent ConcurrencyPolicy = "Replace"
+)
+
+// CronJobStatus represents the current state of a cron job.
+type CronJobStatus struct {
+ // A list of pointers to currently running jobs.
+ // +optional
+ Active []v1.ObjectReference `json:"active,omitempty" protobuf:"bytes,1,rep,name=active"`
+
+ // Information when was the last time the job was successfully scheduled.
+ // +optional
+ LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty" protobuf:"bytes,4,opt,name=lastScheduleTime"`
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..2b3ed4c56
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types_swagger_doc_generated.go
@@ -0,0 +1,96 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_CronJob = map[string]string{
+ "": "CronJob represents the configuration of a single cron job.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+ "status": "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (CronJob) SwaggerDoc() map[string]string {
+ return map_CronJob
+}
+
+var map_CronJobList = map[string]string{
+ "": "CronJobList is a collection of cron jobs.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "items": "items is the list of CronJobs.",
+}
+
+func (CronJobList) SwaggerDoc() map[string]string {
+ return map_CronJobList
+}
+
+var map_CronJobSpec = map[string]string{
+ "": "CronJobSpec describes how the job execution will look like and when it will actually run.",
+ "schedule": "The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.",
+ "startingDeadlineSeconds": "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.",
+ "concurrencyPolicy": "Specifies how to treat concurrent executions of a Job. Defaults to Allow.",
+ "suspend": "This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.",
+ "jobTemplate": "Specifies the job that will be created when executing a CronJob.",
+ "successfulJobsHistoryLimit": "The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.",
+ "failedJobsHistoryLimit": "The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.",
+}
+
+func (CronJobSpec) SwaggerDoc() map[string]string {
+ return map_CronJobSpec
+}
+
+var map_CronJobStatus = map[string]string{
+ "": "CronJobStatus represents the current state of a cron job.",
+ "active": "A list of pointers to currently running jobs.",
+ "lastScheduleTime": "Information when was the last time the job was successfully scheduled.",
+}
+
+func (CronJobStatus) SwaggerDoc() map[string]string {
+ return map_CronJobStatus
+}
+
+var map_JobTemplate = map[string]string{
+ "": "JobTemplate describes a template for creating copies of a predefined pod.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "template": "Defines jobs that will be created from this template. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (JobTemplate) SwaggerDoc() map[string]string {
+ return map_JobTemplate
+}
+
+var map_JobTemplateSpec = map[string]string{
+ "": "JobTemplateSpec describes the data a Job should have when created from a template",
+ "metadata": "Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (JobTemplateSpec) SwaggerDoc() map[string]string {
+ return map_JobTemplateSpec
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/zz_generated.conversion.go
new file mode 100644
index 000000000..86a6046d7
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/zz_generated.conversion.go
@@ -0,0 +1,239 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v2alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api "k8s.io/kubernetes/pkg/api"
+ api_v1 "k8s.io/kubernetes/pkg/api/v1"
+ batch "k8s.io/kubernetes/pkg/apis/batch"
+ batch_v1 "k8s.io/kubernetes/pkg/apis/batch/v1"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v2alpha1_CronJob_To_batch_CronJob,
+ Convert_batch_CronJob_To_v2alpha1_CronJob,
+ Convert_v2alpha1_CronJobList_To_batch_CronJobList,
+ Convert_batch_CronJobList_To_v2alpha1_CronJobList,
+ Convert_v2alpha1_CronJobSpec_To_batch_CronJobSpec,
+ Convert_batch_CronJobSpec_To_v2alpha1_CronJobSpec,
+ Convert_v2alpha1_CronJobStatus_To_batch_CronJobStatus,
+ Convert_batch_CronJobStatus_To_v2alpha1_CronJobStatus,
+ Convert_v2alpha1_JobTemplate_To_batch_JobTemplate,
+ Convert_batch_JobTemplate_To_v2alpha1_JobTemplate,
+ Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec,
+ Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec,
+ )
+}
+
+func autoConvert_v2alpha1_CronJob_To_batch_CronJob(in *CronJob, out *batch.CronJob, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v2alpha1_CronJobSpec_To_batch_CronJobSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v2alpha1_CronJobStatus_To_batch_CronJobStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v2alpha1_CronJob_To_batch_CronJob is an autogenerated conversion function.
+func Convert_v2alpha1_CronJob_To_batch_CronJob(in *CronJob, out *batch.CronJob, s conversion.Scope) error {
+ return autoConvert_v2alpha1_CronJob_To_batch_CronJob(in, out, s)
+}
+
+func autoConvert_batch_CronJob_To_v2alpha1_CronJob(in *batch.CronJob, out *CronJob, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_batch_CronJobSpec_To_v2alpha1_CronJobSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_batch_CronJobStatus_To_v2alpha1_CronJobStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_batch_CronJob_To_v2alpha1_CronJob is an autogenerated conversion function.
+func Convert_batch_CronJob_To_v2alpha1_CronJob(in *batch.CronJob, out *CronJob, s conversion.Scope) error {
+ return autoConvert_batch_CronJob_To_v2alpha1_CronJob(in, out, s)
+}
+
+func autoConvert_v2alpha1_CronJobList_To_batch_CronJobList(in *CronJobList, out *batch.CronJobList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]batch.CronJob, len(*in))
+ for i := range *in {
+ if err := Convert_v2alpha1_CronJob_To_batch_CronJob(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v2alpha1_CronJobList_To_batch_CronJobList is an autogenerated conversion function.
+func Convert_v2alpha1_CronJobList_To_batch_CronJobList(in *CronJobList, out *batch.CronJobList, s conversion.Scope) error {
+ return autoConvert_v2alpha1_CronJobList_To_batch_CronJobList(in, out, s)
+}
+
+func autoConvert_batch_CronJobList_To_v2alpha1_CronJobList(in *batch.CronJobList, out *CronJobList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]CronJob, len(*in))
+ for i := range *in {
+ if err := Convert_batch_CronJob_To_v2alpha1_CronJob(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]CronJob, 0)
+ }
+ return nil
+}
+
+// Convert_batch_CronJobList_To_v2alpha1_CronJobList is an autogenerated conversion function.
+func Convert_batch_CronJobList_To_v2alpha1_CronJobList(in *batch.CronJobList, out *CronJobList, s conversion.Scope) error {
+ return autoConvert_batch_CronJobList_To_v2alpha1_CronJobList(in, out, s)
+}
+
+func autoConvert_v2alpha1_CronJobSpec_To_batch_CronJobSpec(in *CronJobSpec, out *batch.CronJobSpec, s conversion.Scope) error {
+ out.Schedule = in.Schedule
+ out.StartingDeadlineSeconds = (*int64)(unsafe.Pointer(in.StartingDeadlineSeconds))
+ out.ConcurrencyPolicy = batch.ConcurrencyPolicy(in.ConcurrencyPolicy)
+ out.Suspend = (*bool)(unsafe.Pointer(in.Suspend))
+ if err := Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, s); err != nil {
+ return err
+ }
+ out.SuccessfulJobsHistoryLimit = (*int32)(unsafe.Pointer(in.SuccessfulJobsHistoryLimit))
+ out.FailedJobsHistoryLimit = (*int32)(unsafe.Pointer(in.FailedJobsHistoryLimit))
+ return nil
+}
+
+// Convert_v2alpha1_CronJobSpec_To_batch_CronJobSpec is an autogenerated conversion function.
+func Convert_v2alpha1_CronJobSpec_To_batch_CronJobSpec(in *CronJobSpec, out *batch.CronJobSpec, s conversion.Scope) error {
+ return autoConvert_v2alpha1_CronJobSpec_To_batch_CronJobSpec(in, out, s)
+}
+
+func autoConvert_batch_CronJobSpec_To_v2alpha1_CronJobSpec(in *batch.CronJobSpec, out *CronJobSpec, s conversion.Scope) error {
+ out.Schedule = in.Schedule
+ out.StartingDeadlineSeconds = (*int64)(unsafe.Pointer(in.StartingDeadlineSeconds))
+ out.ConcurrencyPolicy = ConcurrencyPolicy(in.ConcurrencyPolicy)
+ out.Suspend = (*bool)(unsafe.Pointer(in.Suspend))
+ if err := Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, s); err != nil {
+ return err
+ }
+ out.SuccessfulJobsHistoryLimit = (*int32)(unsafe.Pointer(in.SuccessfulJobsHistoryLimit))
+ out.FailedJobsHistoryLimit = (*int32)(unsafe.Pointer(in.FailedJobsHistoryLimit))
+ return nil
+}
+
+// Convert_batch_CronJobSpec_To_v2alpha1_CronJobSpec is an autogenerated conversion function.
+func Convert_batch_CronJobSpec_To_v2alpha1_CronJobSpec(in *batch.CronJobSpec, out *CronJobSpec, s conversion.Scope) error {
+ return autoConvert_batch_CronJobSpec_To_v2alpha1_CronJobSpec(in, out, s)
+}
+
+func autoConvert_v2alpha1_CronJobStatus_To_batch_CronJobStatus(in *CronJobStatus, out *batch.CronJobStatus, s conversion.Scope) error {
+ out.Active = *(*[]api.ObjectReference)(unsafe.Pointer(&in.Active))
+ out.LastScheduleTime = (*v1.Time)(unsafe.Pointer(in.LastScheduleTime))
+ return nil
+}
+
+// Convert_v2alpha1_CronJobStatus_To_batch_CronJobStatus is an autogenerated conversion function.
+func Convert_v2alpha1_CronJobStatus_To_batch_CronJobStatus(in *CronJobStatus, out *batch.CronJobStatus, s conversion.Scope) error {
+ return autoConvert_v2alpha1_CronJobStatus_To_batch_CronJobStatus(in, out, s)
+}
+
+func autoConvert_batch_CronJobStatus_To_v2alpha1_CronJobStatus(in *batch.CronJobStatus, out *CronJobStatus, s conversion.Scope) error {
+ out.Active = *(*[]api_v1.ObjectReference)(unsafe.Pointer(&in.Active))
+ out.LastScheduleTime = (*v1.Time)(unsafe.Pointer(in.LastScheduleTime))
+ return nil
+}
+
+// Convert_batch_CronJobStatus_To_v2alpha1_CronJobStatus is an autogenerated conversion function.
+func Convert_batch_CronJobStatus_To_v2alpha1_CronJobStatus(in *batch.CronJobStatus, out *CronJobStatus, s conversion.Scope) error {
+ return autoConvert_batch_CronJobStatus_To_v2alpha1_CronJobStatus(in, out, s)
+}
+
+func autoConvert_v2alpha1_JobTemplate_To_batch_JobTemplate(in *JobTemplate, out *batch.JobTemplate, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v2alpha1_JobTemplate_To_batch_JobTemplate is an autogenerated conversion function.
+func Convert_v2alpha1_JobTemplate_To_batch_JobTemplate(in *JobTemplate, out *batch.JobTemplate, s conversion.Scope) error {
+ return autoConvert_v2alpha1_JobTemplate_To_batch_JobTemplate(in, out, s)
+}
+
+func autoConvert_batch_JobTemplate_To_v2alpha1_JobTemplate(in *batch.JobTemplate, out *JobTemplate, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_batch_JobTemplate_To_v2alpha1_JobTemplate is an autogenerated conversion function.
+func Convert_batch_JobTemplate_To_v2alpha1_JobTemplate(in *batch.JobTemplate, out *JobTemplate, s conversion.Scope) error {
+ return autoConvert_batch_JobTemplate_To_v2alpha1_JobTemplate(in, out, s)
+}
+
+func autoConvert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(in *JobTemplateSpec, out *batch.JobTemplateSpec, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := batch_v1.Convert_v1_JobSpec_To_batch_JobSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec is an autogenerated conversion function.
+func Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(in *JobTemplateSpec, out *batch.JobTemplateSpec, s conversion.Scope) error {
+ return autoConvert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(in, out, s)
+}
+
+func autoConvert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(in *batch.JobTemplateSpec, out *JobTemplateSpec, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := batch_v1.Convert_batch_JobSpec_To_v1_JobSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec is an autogenerated conversion function.
+func Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(in *batch.JobTemplateSpec, out *JobTemplateSpec, s conversion.Scope) error {
+ return autoConvert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(in, out, s)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..66050e07a
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go
@@ -0,0 +1,176 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v2alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api_v1 "k8s.io/kubernetes/pkg/api/v1"
+ batch_v1 "k8s.io/kubernetes/pkg/apis/batch/v1"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_CronJob, InType: reflect.TypeOf(&CronJob{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_CronJobList, InType: reflect.TypeOf(&CronJobList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_CronJobSpec, InType: reflect.TypeOf(&CronJobSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_CronJobStatus, InType: reflect.TypeOf(&CronJobStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_JobTemplate, InType: reflect.TypeOf(&JobTemplate{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v2alpha1_JobTemplateSpec, InType: reflect.TypeOf(&JobTemplateSpec{})},
+ )
+}
+
+// DeepCopy_v2alpha1_CronJob is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_CronJob(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CronJob)
+ out := out.(*CronJob)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v2alpha1_CronJobSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v2alpha1_CronJobStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_CronJobList is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_CronJobList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CronJobList)
+ out := out.(*CronJobList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]CronJob, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v2alpha1_CronJob(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_CronJobSpec is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_CronJobSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CronJobSpec)
+ out := out.(*CronJobSpec)
+ *out = *in
+ if in.StartingDeadlineSeconds != nil {
+ in, out := &in.StartingDeadlineSeconds, &out.StartingDeadlineSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.Suspend != nil {
+ in, out := &in.Suspend, &out.Suspend
+ *out = new(bool)
+ **out = **in
+ }
+ if err := DeepCopy_v2alpha1_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, c); err != nil {
+ return err
+ }
+ if in.SuccessfulJobsHistoryLimit != nil {
+ in, out := &in.SuccessfulJobsHistoryLimit, &out.SuccessfulJobsHistoryLimit
+ *out = new(int32)
+ **out = **in
+ }
+ if in.FailedJobsHistoryLimit != nil {
+ in, out := &in.FailedJobsHistoryLimit, &out.FailedJobsHistoryLimit
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_CronJobStatus is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_CronJobStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CronJobStatus)
+ out := out.(*CronJobStatus)
+ *out = *in
+ if in.Active != nil {
+ in, out := &in.Active, &out.Active
+ *out = make([]api_v1.ObjectReference, len(*in))
+ copy(*out, *in)
+ }
+ if in.LastScheduleTime != nil {
+ in, out := &in.LastScheduleTime, &out.LastScheduleTime
+ *out = new(v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_JobTemplate is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_JobTemplate(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*JobTemplate)
+ out := out.(*JobTemplate)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v2alpha1_JobTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v2alpha1_JobTemplateSpec is an autogenerated deepcopy function.
+func DeepCopy_v2alpha1_JobTemplateSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*JobTemplateSpec)
+ out := out.(*JobTemplateSpec)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := batch_v1.DeepCopy_v1_JobSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/zz_generated.defaults.go
new file mode 100644
index 000000000..fab636ed8
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/zz_generated.defaults.go
@@ -0,0 +1,310 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v2alpha1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ scheme.AddTypeDefaultingFunc(&CronJob{}, func(obj interface{}) { SetObjectDefaults_CronJob(obj.(*CronJob)) })
+ scheme.AddTypeDefaultingFunc(&CronJobList{}, func(obj interface{}) { SetObjectDefaults_CronJobList(obj.(*CronJobList)) })
+ scheme.AddTypeDefaultingFunc(&JobTemplate{}, func(obj interface{}) { SetObjectDefaults_JobTemplate(obj.(*JobTemplate)) })
+ return nil
+}
+
+func SetObjectDefaults_CronJob(in *CronJob) {
+ SetDefaults_CronJob(in)
+ v1.SetDefaults_PodSpec(&in.Spec.JobTemplate.Spec.Template.Spec)
+ for i := range in.Spec.JobTemplate.Spec.Template.Spec.Volumes {
+ a := &in.Spec.JobTemplate.Spec.Template.Spec.Volumes[i]
+ v1.SetDefaults_Volume(a)
+ if a.VolumeSource.Secret != nil {
+ v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
+ }
+ if a.VolumeSource.ISCSI != nil {
+ v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
+ }
+ if a.VolumeSource.RBD != nil {
+ v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
+ }
+ if a.VolumeSource.DownwardAPI != nil {
+ v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
+ for j := range a.VolumeSource.DownwardAPI.Items {
+ b := &a.VolumeSource.DownwardAPI.Items[j]
+ if b.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.FieldRef)
+ }
+ }
+ }
+ if a.VolumeSource.ConfigMap != nil {
+ v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
+ }
+ if a.VolumeSource.AzureDisk != nil {
+ v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
+ }
+ if a.VolumeSource.Projected != nil {
+ v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
+ for j := range a.VolumeSource.Projected.Sources {
+ b := &a.VolumeSource.Projected.Sources[j]
+ if b.DownwardAPI != nil {
+ for k := range b.DownwardAPI.Items {
+ c := &b.DownwardAPI.Items[k]
+ if c.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(c.FieldRef)
+ }
+ }
+ }
+ }
+ }
+ if a.VolumeSource.ScaleIO != nil {
+ v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO)
+ }
+ }
+ for i := range in.Spec.JobTemplate.Spec.Template.Spec.InitContainers {
+ a := &in.Spec.JobTemplate.Spec.Template.Spec.InitContainers[i]
+ v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+ for i := range in.Spec.JobTemplate.Spec.Template.Spec.Containers {
+ a := &in.Spec.JobTemplate.Spec.Template.Spec.Containers[i]
+ v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+}
+
+func SetObjectDefaults_CronJobList(in *CronJobList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_CronJob(a)
+ }
+}
+
+func SetObjectDefaults_JobTemplate(in *JobTemplate) {
+ v1.SetDefaults_PodSpec(&in.Template.Spec.Template.Spec)
+ for i := range in.Template.Spec.Template.Spec.Volumes {
+ a := &in.Template.Spec.Template.Spec.Volumes[i]
+ v1.SetDefaults_Volume(a)
+ if a.VolumeSource.Secret != nil {
+ v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
+ }
+ if a.VolumeSource.ISCSI != nil {
+ v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
+ }
+ if a.VolumeSource.RBD != nil {
+ v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
+ }
+ if a.VolumeSource.DownwardAPI != nil {
+ v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
+ for j := range a.VolumeSource.DownwardAPI.Items {
+ b := &a.VolumeSource.DownwardAPI.Items[j]
+ if b.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.FieldRef)
+ }
+ }
+ }
+ if a.VolumeSource.ConfigMap != nil {
+ v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
+ }
+ if a.VolumeSource.AzureDisk != nil {
+ v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
+ }
+ if a.VolumeSource.Projected != nil {
+ v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
+ for j := range a.VolumeSource.Projected.Sources {
+ b := &a.VolumeSource.Projected.Sources[j]
+ if b.DownwardAPI != nil {
+ for k := range b.DownwardAPI.Items {
+ c := &b.DownwardAPI.Items[k]
+ if c.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(c.FieldRef)
+ }
+ }
+ }
+ }
+ }
+ if a.VolumeSource.ScaleIO != nil {
+ v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO)
+ }
+ }
+ for i := range in.Template.Spec.Template.Spec.InitContainers {
+ a := &in.Template.Spec.Template.Spec.InitContainers[i]
+ v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+ for i := range in.Template.Spec.Template.Spec.Containers {
+ a := &in.Template.Spec.Template.Spec.Containers[i]
+ v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/zz_generated.deepcopy.go
new file mode 100644
index 000000000..88f1a825b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/zz_generated.deepcopy.go
@@ -0,0 +1,302 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package batch
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api "k8s.io/kubernetes/pkg/api"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_CronJob, InType: reflect.TypeOf(&CronJob{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_CronJobList, InType: reflect.TypeOf(&CronJobList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_CronJobSpec, InType: reflect.TypeOf(&CronJobSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_CronJobStatus, InType: reflect.TypeOf(&CronJobStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_Job, InType: reflect.TypeOf(&Job{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_JobCondition, InType: reflect.TypeOf(&JobCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_JobList, InType: reflect.TypeOf(&JobList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_JobSpec, InType: reflect.TypeOf(&JobSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_JobStatus, InType: reflect.TypeOf(&JobStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_JobTemplate, InType: reflect.TypeOf(&JobTemplate{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_batch_JobTemplateSpec, InType: reflect.TypeOf(&JobTemplateSpec{})},
+ )
+}
+
+// DeepCopy_batch_CronJob is an autogenerated deepcopy function.
+func DeepCopy_batch_CronJob(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CronJob)
+ out := out.(*CronJob)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_batch_CronJobSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_batch_CronJobStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_batch_CronJobList is an autogenerated deepcopy function.
+func DeepCopy_batch_CronJobList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CronJobList)
+ out := out.(*CronJobList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]CronJob, len(*in))
+ for i := range *in {
+ if err := DeepCopy_batch_CronJob(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_batch_CronJobSpec is an autogenerated deepcopy function.
+func DeepCopy_batch_CronJobSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CronJobSpec)
+ out := out.(*CronJobSpec)
+ *out = *in
+ if in.StartingDeadlineSeconds != nil {
+ in, out := &in.StartingDeadlineSeconds, &out.StartingDeadlineSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.Suspend != nil {
+ in, out := &in.Suspend, &out.Suspend
+ *out = new(bool)
+ **out = **in
+ }
+ if err := DeepCopy_batch_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, c); err != nil {
+ return err
+ }
+ if in.SuccessfulJobsHistoryLimit != nil {
+ in, out := &in.SuccessfulJobsHistoryLimit, &out.SuccessfulJobsHistoryLimit
+ *out = new(int32)
+ **out = **in
+ }
+ if in.FailedJobsHistoryLimit != nil {
+ in, out := &in.FailedJobsHistoryLimit, &out.FailedJobsHistoryLimit
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_batch_CronJobStatus is an autogenerated deepcopy function.
+func DeepCopy_batch_CronJobStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CronJobStatus)
+ out := out.(*CronJobStatus)
+ *out = *in
+ if in.Active != nil {
+ in, out := &in.Active, &out.Active
+ *out = make([]api.ObjectReference, len(*in))
+ copy(*out, *in)
+ }
+ if in.LastScheduleTime != nil {
+ in, out := &in.LastScheduleTime, &out.LastScheduleTime
+ *out = new(v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ return nil
+ }
+}
+
+// DeepCopy_batch_Job is an autogenerated deepcopy function.
+func DeepCopy_batch_Job(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Job)
+ out := out.(*Job)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_batch_JobSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_batch_JobStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_batch_JobCondition is an autogenerated deepcopy function.
+func DeepCopy_batch_JobCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*JobCondition)
+ out := out.(*JobCondition)
+ *out = *in
+ out.LastProbeTime = in.LastProbeTime.DeepCopy()
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_batch_JobList is an autogenerated deepcopy function.
+func DeepCopy_batch_JobList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*JobList)
+ out := out.(*JobList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Job, len(*in))
+ for i := range *in {
+ if err := DeepCopy_batch_Job(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_batch_JobSpec is an autogenerated deepcopy function.
+func DeepCopy_batch_JobSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*JobSpec)
+ out := out.(*JobSpec)
+ *out = *in
+ if in.Parallelism != nil {
+ in, out := &in.Parallelism, &out.Parallelism
+ *out = new(int32)
+ **out = **in
+ }
+ if in.Completions != nil {
+ in, out := &in.Completions, &out.Completions
+ *out = new(int32)
+ **out = **in
+ }
+ if in.ActiveDeadlineSeconds != nil {
+ in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if in.ManualSelector != nil {
+ in, out := &in.ManualSelector, &out.ManualSelector
+ *out = new(bool)
+ **out = **in
+ }
+ if err := api.DeepCopy_api_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_batch_JobStatus is an autogenerated deepcopy function.
+func DeepCopy_batch_JobStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*JobStatus)
+ out := out.(*JobStatus)
+ *out = *in
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]JobCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_batch_JobCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.StartTime != nil {
+ in, out := &in.StartTime, &out.StartTime
+ *out = new(v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ if in.CompletionTime != nil {
+ in, out := &in.CompletionTime, &out.CompletionTime
+ *out = new(v1.Time)
+ **out = (*in).DeepCopy()
+ }
+ return nil
+ }
+}
+
+// DeepCopy_batch_JobTemplate is an autogenerated deepcopy function.
+func DeepCopy_batch_JobTemplate(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*JobTemplate)
+ out := out.(*JobTemplate)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_batch_JobTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_batch_JobTemplateSpec is an autogenerated deepcopy function.
+func DeepCopy_batch_JobTemplateSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*JobTemplateSpec)
+ out := out.(*JobTemplateSpec)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_batch_JobSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/doc.go
new file mode 100644
index 000000000..cdc89bdcc
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +groupName=certificates.k8s.io
+package certificates // import "k8s.io/kubernetes/pkg/apis/certificates"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/helpers.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/helpers.go
new file mode 100644
index 000000000..2608e4076
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/helpers.go
@@ -0,0 +1,38 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package certificates
+
+import (
+ "crypto/x509"
+ "encoding/pem"
+ "errors"
+)
+
+// ParseCSR extracts the CSR from the API object and decodes it.
+func ParseCSR(obj *CertificateSigningRequest) (*x509.CertificateRequest, error) {
+ // extract PEM from request object
+ pemBytes := obj.Spec.Request
+ block, _ := pem.Decode(pemBytes)
+ if block == nil || block.Type != "CERTIFICATE REQUEST" {
+ return nil, errors.New("PEM block type must be CERTIFICATE REQUEST")
+ }
+ csr, err := x509.ParseCertificateRequest(block.Bytes)
+ if err != nil {
+ return nil, err
+ }
+ return csr, nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/install/install.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/install/install.go
new file mode 100644
index 000000000..73844eeb6
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/install/install.go
@@ -0,0 +1,51 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package install installs the certificates API group, making it available as
+// an option to all of the API encoding/decoding machinery.
+package install
+
+import (
+ "k8s.io/apimachinery/pkg/apimachinery/announced"
+ "k8s.io/apimachinery/pkg/apimachinery/registered"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/sets"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/certificates"
+ "k8s.io/kubernetes/pkg/apis/certificates/v1beta1"
+)
+
+func init() {
+ Install(api.GroupFactoryRegistry, api.Registry, api.Scheme)
+}
+
+// Install registers the API group and adds types to a scheme
+func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
+ if err := announced.NewGroupMetaFactory(
+ &announced.GroupMetaFactoryArgs{
+ GroupName: certificates.GroupName,
+ VersionPreferenceOrder: []string{v1beta1.SchemeGroupVersion.Version},
+ ImportPrefix: "k8s.io/kubernetes/pkg/apis/certificates",
+ RootScopedKinds: sets.NewString("CertificateSigningRequest"),
+ AddInternalObjectsToScheme: certificates.AddToScheme,
+ },
+ announced.VersionToSchemeFunc{
+ v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme,
+ },
+ ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil {
+ panic(err)
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/register.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/register.go
new file mode 100644
index 000000000..085737583
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/register.go
@@ -0,0 +1,52 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package certificates
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+// GroupName is the group name use in this package
+const GroupName = "certificates.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &CertificateSigningRequest{},
+ &CertificateSigningRequestList{},
+ )
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/types.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/types.go
new file mode 100644
index 000000000..4a7884a1e
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/types.go
@@ -0,0 +1,143 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package certificates
+
+import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+// +genclient=true
+// +nonNamespaced=true
+
+// Describes a certificate signing request
+type CertificateSigningRequest struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // The certificate request itself and any additional information.
+ // +optional
+ Spec CertificateSigningRequestSpec
+
+ // Derived information about the request.
+ // +optional
+ Status CertificateSigningRequestStatus
+}
+
+// This information is immutable after the request is created. Only the Request
+// and Usages fields can be set on creation, other fields are derived by
+// Kubernetes and cannot be modified by users.
+type CertificateSigningRequestSpec struct {
+ // Base64-encoded PKCS#10 CSR data
+ Request []byte
+
+ // usages specifies a set of usage contexts the key will be
+ // valid for.
+ // See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3
+ // https://tools.ietf.org/html/rfc5280#section-4.2.1.12
+ Usages []KeyUsage
+
+ // Information about the requesting user.
+ // See user.Info interface for details.
+ // +optional
+ Username string
+ // UID information about the requesting user.
+ // See user.Info interface for details.
+ // +optional
+ UID string
+ // Group information about the requesting user.
+ // See user.Info interface for details.
+ // +optional
+ Groups []string
+ // Extra information about the requesting user.
+ // See user.Info interface for details.
+ // +optional
+ Extra map[string]ExtraValue
+}
+
+// ExtraValue masks the value so protobuf can generate
+type ExtraValue []string
+
+type CertificateSigningRequestStatus struct {
+ // Conditions applied to the request, such as approval or denial.
+ // +optional
+ Conditions []CertificateSigningRequestCondition
+
+ // If request was approved, the controller will place the issued certificate here.
+ // +optional
+ Certificate []byte
+}
+
+type RequestConditionType string
+
+// These are the possible conditions for a certificate request.
+const (
+ CertificateApproved RequestConditionType = "Approved"
+ CertificateDenied RequestConditionType = "Denied"
+)
+
+type CertificateSigningRequestCondition struct {
+ // request approval state, currently Approved or Denied.
+ Type RequestConditionType
+ // brief reason for the request state
+ // +optional
+ Reason string
+ // human readable message with details about the request state
+ // +optional
+ Message string
+ // timestamp for the last update to this condition
+ // +optional
+ LastUpdateTime metav1.Time
+}
+
+type CertificateSigningRequestList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ // +optional
+ Items []CertificateSigningRequest
+}
+
+// KeyUsages specifies valid usage contexts for keys.
+// See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3
+// https://tools.ietf.org/html/rfc5280#section-4.2.1.12
+type KeyUsage string
+
+const (
+ UsageSigning KeyUsage = "signing"
+ UsageDigitalSignature KeyUsage = "digital signature"
+ UsageContentCommittment KeyUsage = "content committment"
+ UsageKeyEncipherment KeyUsage = "key encipherment"
+ UsageKeyAgreement KeyUsage = "key agreement"
+ UsageDataEncipherment KeyUsage = "data encipherment"
+ UsageCertSign KeyUsage = "cert sign"
+ UsageCRLSign KeyUsage = "crl sign"
+ UsageEncipherOnly KeyUsage = "encipher only"
+ UsageDecipherOnly KeyUsage = "decipher only"
+ UsageAny KeyUsage = "any"
+ UsageServerAuth KeyUsage = "server auth"
+ UsageClientAuth KeyUsage = "client auth"
+ UsageCodeSigning KeyUsage = "code signing"
+ UsageEmailProtection KeyUsage = "email protection"
+ UsageSMIME KeyUsage = "s/mime"
+ UsageIPsecEndSystem KeyUsage = "ipsec end system"
+ UsageIPsecTunnel KeyUsage = "ipsec tunnel"
+ UsageIPsecUser KeyUsage = "ipsec user"
+ UsageTimestamping KeyUsage = "timestamping"
+ UsageOCSPSigning KeyUsage = "ocsp signing"
+ UsageMicrosoftSGC KeyUsage = "microsoft sgc"
+ UsageNetscapSGC KeyUsage = "netscape sgc"
+)
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/conversion.go
new file mode 100644
index 000000000..b9cf0b016
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/conversion.go
@@ -0,0 +1,38 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "fmt"
+
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) error {
+ // Add non-generated conversion functions here. Currently there are none.
+
+ return scheme.AddFieldLabelConversionFunc(SchemeGroupVersion.String(), "CertificateSigningRequest",
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "metadata.name":
+ return label, value, nil
+ default:
+ return "", "", fmt.Errorf("field label not supported: %s", label)
+ }
+ },
+ )
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/defaults.go
new file mode 100644
index 000000000..e18af02f6
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/defaults.go
@@ -0,0 +1,28 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import "k8s.io/apimachinery/pkg/runtime"
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
+func SetDefaults_CertificateSigningRequestSpec(obj *CertificateSigningRequestSpec) {
+ if obj.Usages == nil {
+ obj.Usages = []KeyUsage{UsageDigitalSignature, UsageKeyEncipherment}
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/doc.go
new file mode 100644
index 000000000..4dde7d5f6
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/doc.go
@@ -0,0 +1,23 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/certificates
+// +k8s:openapi-gen=true
+// +k8s:defaulter-gen=TypeMeta
+
+// +groupName=certificates.k8s.io
+package v1beta1 // import "k8s.io/kubernetes/pkg/apis/certificates/v1beta1"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/generated.pb.go
new file mode 100644
index 000000000..39eda379d
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/generated.pb.go
@@ -0,0 +1,1694 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/certificates/v1beta1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1beta1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/certificates/v1beta1/generated.proto
+
+ It has these top-level messages:
+ CertificateSigningRequest
+ CertificateSigningRequestCondition
+ CertificateSigningRequestList
+ CertificateSigningRequestSpec
+ CertificateSigningRequestStatus
+ ExtraValue
+*/
+package v1beta1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *CertificateSigningRequest) Reset() { *m = CertificateSigningRequest{} }
+func (*CertificateSigningRequest) ProtoMessage() {}
+func (*CertificateSigningRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{0}
+}
+
+func (m *CertificateSigningRequestCondition) Reset() { *m = CertificateSigningRequestCondition{} }
+func (*CertificateSigningRequestCondition) ProtoMessage() {}
+func (*CertificateSigningRequestCondition) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{1}
+}
+
+func (m *CertificateSigningRequestList) Reset() { *m = CertificateSigningRequestList{} }
+func (*CertificateSigningRequestList) ProtoMessage() {}
+func (*CertificateSigningRequestList) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{2}
+}
+
+func (m *CertificateSigningRequestSpec) Reset() { *m = CertificateSigningRequestSpec{} }
+func (*CertificateSigningRequestSpec) ProtoMessage() {}
+func (*CertificateSigningRequestSpec) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{3}
+}
+
+func (m *CertificateSigningRequestStatus) Reset() { *m = CertificateSigningRequestStatus{} }
+func (*CertificateSigningRequestStatus) ProtoMessage() {}
+func (*CertificateSigningRequestStatus) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{4}
+}
+
+func (m *ExtraValue) Reset() { *m = ExtraValue{} }
+func (*ExtraValue) ProtoMessage() {}
+func (*ExtraValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
+
+func init() {
+ proto.RegisterType((*CertificateSigningRequest)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1beta1.CertificateSigningRequest")
+ proto.RegisterType((*CertificateSigningRequestCondition)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1beta1.CertificateSigningRequestCondition")
+ proto.RegisterType((*CertificateSigningRequestList)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1beta1.CertificateSigningRequestList")
+ proto.RegisterType((*CertificateSigningRequestSpec)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1beta1.CertificateSigningRequestSpec")
+ proto.RegisterType((*CertificateSigningRequestStatus)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1beta1.CertificateSigningRequestStatus")
+ proto.RegisterType((*ExtraValue)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1beta1.ExtraValue")
+}
+func (m *CertificateSigningRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CertificateSigningRequest) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n2, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n3, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ return i, nil
+}
+
+func (m *CertificateSigningRequestCondition) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CertificateSigningRequestCondition) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastUpdateTime.Size()))
+ n4, err := m.LastUpdateTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ return i, nil
+}
+
+func (m *CertificateSigningRequestList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CertificateSigningRequestList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n5, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *CertificateSigningRequestSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CertificateSigningRequestSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Request != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Request)))
+ i += copy(dAtA[i:], m.Request)
+ }
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Username)))
+ i += copy(dAtA[i:], m.Username)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID)))
+ i += copy(dAtA[i:], m.UID)
+ if len(m.Groups) > 0 {
+ for _, s := range m.Groups {
+ dAtA[i] = 0x22
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Usages) > 0 {
+ for _, s := range m.Usages {
+ dAtA[i] = 0x2a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Extra) > 0 {
+ keysForExtra := make([]string, 0, len(m.Extra))
+ for k := range m.Extra {
+ keysForExtra = append(keysForExtra, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
+ for _, k := range keysForExtra {
+ dAtA[i] = 0x32
+ i++
+ v := m.Extra[string(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n6, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ }
+ }
+ return i, nil
+}
+
+func (m *CertificateSigningRequestStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CertificateSigningRequestStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Conditions) > 0 {
+ for _, msg := range m.Conditions {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.Certificate != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Certificate)))
+ i += copy(dAtA[i:], m.Certificate)
+ }
+ return i, nil
+}
+
+func (m ExtraValue) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m ExtraValue) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m) > 0 {
+ for _, s := range m {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *CertificateSigningRequest) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *CertificateSigningRequestCondition) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastUpdateTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *CertificateSigningRequestList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *CertificateSigningRequestSpec) Size() (n int) {
+ var l int
+ _ = l
+ if m.Request != nil {
+ l = len(m.Request)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ l = len(m.Username)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.UID)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Groups) > 0 {
+ for _, s := range m.Groups {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Usages) > 0 {
+ for _, s := range m.Usages {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Extra) > 0 {
+ for k, v := range m.Extra {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *CertificateSigningRequestStatus) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Conditions) > 0 {
+ for _, e := range m.Conditions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if m.Certificate != nil {
+ l = len(m.Certificate)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m ExtraValue) Size() (n int) {
+ var l int
+ _ = l
+ if len(m) > 0 {
+ for _, s := range m {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *CertificateSigningRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CertificateSigningRequest{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "CertificateSigningRequestSpec", "CertificateSigningRequestSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "CertificateSigningRequestStatus", "CertificateSigningRequestStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CertificateSigningRequestCondition) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CertificateSigningRequestCondition{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `LastUpdateTime:` + strings.Replace(strings.Replace(this.LastUpdateTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CertificateSigningRequestList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CertificateSigningRequestList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "CertificateSigningRequest", "CertificateSigningRequest", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CertificateSigningRequestSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForExtra := make([]string, 0, len(this.Extra))
+ for k := range this.Extra {
+ keysForExtra = append(keysForExtra, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForExtra)
+ mapStringForExtra := "map[string]ExtraValue{"
+ for _, k := range keysForExtra {
+ mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k])
+ }
+ mapStringForExtra += "}"
+ s := strings.Join([]string{`&CertificateSigningRequestSpec{`,
+ `Request:` + valueToStringGenerated(this.Request) + `,`,
+ `Username:` + fmt.Sprintf("%v", this.Username) + `,`,
+ `UID:` + fmt.Sprintf("%v", this.UID) + `,`,
+ `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`,
+ `Usages:` + fmt.Sprintf("%v", this.Usages) + `,`,
+ `Extra:` + mapStringForExtra + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CertificateSigningRequestStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CertificateSigningRequestStatus{`,
+ `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "CertificateSigningRequestCondition", "CertificateSigningRequestCondition", 1), `&`, ``, 1) + `,`,
+ `Certificate:` + valueToStringGenerated(this.Certificate) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *CertificateSigningRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CertificateSigningRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CertificateSigningRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CertificateSigningRequestCondition) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CertificateSigningRequestCondition: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CertificateSigningRequestCondition: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = RequestConditionType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastUpdateTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastUpdateTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CertificateSigningRequestList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CertificateSigningRequestList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CertificateSigningRequestList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, CertificateSigningRequest{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CertificateSigningRequestSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CertificateSigningRequestSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CertificateSigningRequestSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType)
+ }
+ var byteLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ byteLen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if byteLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + byteLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Request = append(m.Request[:0], dAtA[iNdEx:postIndex]...)
+ if m.Request == nil {
+ m.Request = []byte{}
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Username = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.UID = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Usages", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Usages = append(m.Usages, KeyUsage(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Extra", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Extra == nil {
+ m.Extra = make(map[string]ExtraValue)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &ExtraValue{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.Extra[mapkey] = *mapvalue
+ } else {
+ var mapvalue ExtraValue
+ m.Extra[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CertificateSigningRequestStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CertificateSigningRequestStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CertificateSigningRequestStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Conditions = append(m.Conditions, CertificateSigningRequestCondition{})
+ if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Certificate", wireType)
+ }
+ var byteLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ byteLen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if byteLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + byteLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Certificate = append(m.Certificate[:0], dAtA[iNdEx:postIndex]...)
+ if m.Certificate == nil {
+ m.Certificate = []byte{}
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExtraValue) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExtraValue: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExtraValue: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ *m = append(*m, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/kubernetes/pkg/apis/certificates/v1beta1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 820 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcf, 0x8f, 0xdb, 0x44,
+ 0x14, 0x8e, 0xf3, 0x6b, 0x93, 0xc9, 0xb2, 0xad, 0x46, 0xa8, 0x32, 0x2b, 0xd5, 0x8e, 0x2c, 0x40,
+ 0x0b, 0xa2, 0x36, 0x59, 0x10, 0xac, 0xca, 0x01, 0xc9, 0xa5, 0x42, 0x85, 0x96, 0x1f, 0xb3, 0x0d,
+ 0x12, 0x88, 0x03, 0x13, 0xe7, 0xd5, 0x3b, 0xcd, 0xfa, 0x07, 0x9e, 0x71, 0xd4, 0x5c, 0x50, 0x6f,
+ 0x5c, 0x39, 0x72, 0x41, 0xe2, 0xcf, 0xd9, 0x63, 0x8f, 0x3d, 0xa0, 0x88, 0x35, 0x27, 0x2e, 0xfc,
+ 0x01, 0x3d, 0xa1, 0x19, 0x4f, 0xe2, 0x90, 0x28, 0xb4, 0x95, 0x72, 0x9b, 0xf9, 0xe6, 0xbd, 0xef,
+ 0x7b, 0xef, 0x9b, 0x37, 0x83, 0x3e, 0x9e, 0x9c, 0x70, 0x97, 0x25, 0xde, 0x24, 0x1f, 0x41, 0x16,
+ 0x83, 0x00, 0xee, 0xa5, 0x93, 0xd0, 0xa3, 0x29, 0xe3, 0x5e, 0x00, 0x99, 0x60, 0x0f, 0x58, 0x40,
+ 0x25, 0x3a, 0x1d, 0x8c, 0x40, 0xd0, 0x81, 0x17, 0x42, 0x0c, 0x19, 0x15, 0x30, 0x76, 0xd3, 0x2c,
+ 0x11, 0x09, 0xf6, 0x4a, 0x02, 0xb7, 0x22, 0x70, 0xd3, 0x49, 0xe8, 0x4a, 0x02, 0x77, 0x95, 0xc0,
+ 0xd5, 0x04, 0x87, 0x37, 0x42, 0x26, 0xce, 0xf2, 0x91, 0x1b, 0x24, 0x91, 0x17, 0x26, 0x61, 0xe2,
+ 0x29, 0x9e, 0x51, 0xfe, 0x40, 0xed, 0xd4, 0x46, 0xad, 0x4a, 0xfe, 0xc3, 0xf7, 0x75, 0x81, 0x34,
+ 0x65, 0x11, 0x0d, 0xce, 0x58, 0x0c, 0xd9, 0xac, 0x2a, 0x31, 0x02, 0x41, 0xbd, 0xe9, 0x46, 0x55,
+ 0x87, 0xde, 0xb6, 0xac, 0x2c, 0x8f, 0x05, 0x8b, 0x60, 0x23, 0xe1, 0x83, 0xe7, 0x25, 0xf0, 0xe0,
+ 0x0c, 0x22, 0xba, 0x91, 0xf7, 0xde, 0xb6, 0xbc, 0x5c, 0xb0, 0x73, 0x8f, 0xc5, 0x82, 0x8b, 0x6c,
+ 0x3d, 0xc9, 0xf9, 0xbb, 0x8e, 0x5e, 0xbb, 0x55, 0x79, 0x73, 0xca, 0xc2, 0x98, 0xc5, 0x21, 0x81,
+ 0x1f, 0x73, 0xe0, 0x02, 0xff, 0x80, 0x3a, 0xb2, 0xad, 0x31, 0x15, 0xd4, 0x34, 0xfa, 0xc6, 0x51,
+ 0xef, 0xf8, 0x5d, 0x57, 0x9b, 0xbc, 0xaa, 0x52, 0xd9, 0x2c, 0xa3, 0xdd, 0xe9, 0xc0, 0xfd, 0x72,
+ 0xf4, 0x10, 0x02, 0x71, 0x0f, 0x04, 0xf5, 0xf1, 0xc5, 0xdc, 0xae, 0x15, 0x73, 0x1b, 0x55, 0x18,
+ 0x59, 0xb2, 0xe2, 0x14, 0x35, 0x79, 0x0a, 0x81, 0x59, 0x57, 0xec, 0x5f, 0xb8, 0x2f, 0x79, 0x85,
+ 0xee, 0xd6, 0xda, 0x4f, 0x53, 0x08, 0xfc, 0x7d, 0xad, 0xdd, 0x94, 0x3b, 0xa2, 0x94, 0xf0, 0x23,
+ 0xd4, 0xe6, 0x82, 0x8a, 0x9c, 0x9b, 0x0d, 0xa5, 0xf9, 0xd5, 0x0e, 0x35, 0x15, 0xaf, 0x7f, 0xa0,
+ 0x55, 0xdb, 0xe5, 0x9e, 0x68, 0x3d, 0xe7, 0xb7, 0x3a, 0x72, 0xb6, 0xe6, 0xde, 0x4a, 0xe2, 0x31,
+ 0x13, 0x2c, 0x89, 0xf1, 0x09, 0x6a, 0x8a, 0x59, 0x0a, 0xca, 0xf0, 0xae, 0xff, 0xfa, 0xa2, 0x85,
+ 0xfb, 0xb3, 0x14, 0x9e, 0xcd, 0xed, 0x57, 0xd7, 0xe3, 0x25, 0x4e, 0x54, 0x06, 0x7e, 0x13, 0xb5,
+ 0x33, 0xa0, 0x3c, 0x89, 0x95, 0x9d, 0xdd, 0xaa, 0x10, 0xa2, 0x50, 0xa2, 0x4f, 0xf1, 0x5b, 0x68,
+ 0x2f, 0x02, 0xce, 0x69, 0x08, 0xca, 0x83, 0xae, 0x7f, 0x45, 0x07, 0xee, 0xdd, 0x2b, 0x61, 0xb2,
+ 0x38, 0xc7, 0x0f, 0xd1, 0xc1, 0x39, 0xe5, 0x62, 0x98, 0x8e, 0xa9, 0x80, 0xfb, 0x2c, 0x02, 0xb3,
+ 0xa9, 0x5c, 0x7b, 0xfb, 0xc5, 0xe6, 0x40, 0x66, 0xf8, 0xd7, 0x34, 0xfb, 0xc1, 0xdd, 0xff, 0x30,
+ 0x91, 0x35, 0x66, 0xe7, 0x1f, 0x03, 0x5d, 0xdf, 0xea, 0xcf, 0x5d, 0xc6, 0x05, 0xfe, 0x7e, 0x63,
+ 0x1e, 0xdd, 0x17, 0xab, 0x43, 0x66, 0xab, 0x69, 0xbc, 0xaa, 0x6b, 0xe9, 0x2c, 0x90, 0x95, 0x59,
+ 0x4c, 0x50, 0x8b, 0x09, 0x88, 0xb8, 0x59, 0xef, 0x37, 0x8e, 0x7a, 0xc7, 0x9f, 0xed, 0x6e, 0x30,
+ 0xfc, 0x57, 0xb4, 0x6c, 0xeb, 0x8e, 0x14, 0x20, 0xa5, 0x8e, 0x53, 0x34, 0xfe, 0xa7, 0x61, 0x39,
+ 0xb2, 0xf8, 0x0d, 0xb4, 0x97, 0x95, 0x5b, 0xd5, 0xef, 0xbe, 0xdf, 0x93, 0xb7, 0xa4, 0x23, 0xc8,
+ 0xe2, 0x0c, 0xbf, 0x83, 0x3a, 0x39, 0x87, 0x2c, 0xa6, 0x11, 0xe8, 0xab, 0x5f, 0xf6, 0x39, 0xd4,
+ 0x38, 0x59, 0x46, 0xe0, 0xeb, 0xa8, 0x91, 0xb3, 0xb1, 0xbe, 0xfa, 0x9e, 0x0e, 0x6c, 0x0c, 0xef,
+ 0x7c, 0x42, 0x24, 0x8e, 0x1d, 0xd4, 0x0e, 0xb3, 0x24, 0x4f, 0xb9, 0xd9, 0xec, 0x37, 0x8e, 0xba,
+ 0x3e, 0x92, 0x13, 0xf4, 0xa9, 0x42, 0x88, 0x3e, 0xc1, 0xc7, 0xa8, 0x33, 0x81, 0xd9, 0x50, 0x8d,
+ 0x50, 0x4b, 0x45, 0x5d, 0x93, 0x51, 0x0a, 0xe0, 0xcf, 0xe6, 0x76, 0xe7, 0x73, 0x7d, 0x4a, 0x96,
+ 0x71, 0xf8, 0x27, 0xd4, 0x82, 0x47, 0x22, 0xa3, 0x66, 0x5b, 0xd9, 0xfb, 0xed, 0x6e, 0xdf, 0xba,
+ 0x7b, 0x5b, 0x72, 0xdf, 0x8e, 0x45, 0x36, 0xab, 0xdc, 0x56, 0x18, 0x29, 0x65, 0x0f, 0x73, 0x84,
+ 0xaa, 0x18, 0x7c, 0x15, 0x35, 0x26, 0x30, 0x2b, 0x1f, 0x19, 0x91, 0x4b, 0xfc, 0x35, 0x6a, 0x4d,
+ 0xe9, 0x79, 0x0e, 0xfa, 0x2f, 0xfa, 0xe8, 0xa5, 0xeb, 0x53, 0xec, 0xdf, 0x48, 0x0a, 0x52, 0x32,
+ 0xdd, 0xac, 0x9f, 0x18, 0xce, 0xdc, 0x40, 0xf6, 0x73, 0x7e, 0x0c, 0xfc, 0xb3, 0x81, 0x50, 0xb0,
+ 0x78, 0xd0, 0xdc, 0x34, 0x94, 0x41, 0xa7, 0xbb, 0x33, 0x68, 0xf9, 0x59, 0x54, 0xbf, 0xf1, 0x12,
+ 0xe2, 0x64, 0x45, 0x1a, 0x0f, 0x50, 0x6f, 0x85, 0x5a, 0x59, 0xb1, 0xef, 0x5f, 0x29, 0xe6, 0x76,
+ 0x6f, 0x85, 0x9c, 0xac, 0xc6, 0x38, 0x1f, 0x6a, 0x5f, 0x55, 0xe7, 0xd8, 0x5e, 0x3c, 0x22, 0x43,
+ 0x8d, 0x45, 0x77, 0x7d, 0xe8, 0x6f, 0x76, 0x7e, 0xfd, 0xdd, 0xae, 0x3d, 0xfe, 0xa3, 0x5f, 0xf3,
+ 0x6f, 0x5c, 0x5c, 0x5a, 0xb5, 0x27, 0x97, 0x56, 0xed, 0xe9, 0xa5, 0x55, 0x7b, 0x5c, 0x58, 0xc6,
+ 0x45, 0x61, 0x19, 0x4f, 0x0a, 0xcb, 0x78, 0x5a, 0x58, 0xc6, 0x9f, 0x85, 0x65, 0xfc, 0xf2, 0x97,
+ 0x55, 0xfb, 0x6e, 0x4f, 0x77, 0xf7, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe1, 0xa1, 0xbb, 0xcc,
+ 0x20, 0x08, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/generated.proto
new file mode 100644
index 000000000..1b6b263c9
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/generated.proto
@@ -0,0 +1,122 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.pkg.apis.certificates.v1beta1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1beta1";
+
+// Describes a certificate signing request
+message CertificateSigningRequest {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // The certificate request itself and any additional information.
+ // +optional
+ optional CertificateSigningRequestSpec spec = 2;
+
+ // Derived information about the request.
+ // +optional
+ optional CertificateSigningRequestStatus status = 3;
+}
+
+message CertificateSigningRequestCondition {
+ // request approval state, currently Approved or Denied.
+ optional string type = 1;
+
+ // brief reason for the request state
+ // +optional
+ optional string reason = 2;
+
+ // human readable message with details about the request state
+ // +optional
+ optional string message = 3;
+
+ // timestamp for the last update to this condition
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 4;
+}
+
+message CertificateSigningRequestList {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ repeated CertificateSigningRequest items = 2;
+}
+
+// This information is immutable after the request is created. Only the Request
+// and Usages fields can be set on creation, other fields are derived by
+// Kubernetes and cannot be modified by users.
+message CertificateSigningRequestSpec {
+ // Base64-encoded PKCS#10 CSR data
+ optional bytes request = 1;
+
+ // allowedUsages specifies a set of usage contexts the key will be
+ // valid for.
+ // See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3
+ // https://tools.ietf.org/html/rfc5280#section-4.2.1.12
+ repeated string keyUsage = 5;
+
+ // Information about the requesting user.
+ // See user.Info interface for details.
+ // +optional
+ optional string username = 2;
+
+ // UID information about the requesting user.
+ // See user.Info interface for details.
+ // +optional
+ optional string uid = 3;
+
+ // Group information about the requesting user.
+ // See user.Info interface for details.
+ // +optional
+ repeated string groups = 4;
+
+ // Extra information about the requesting user.
+ // See user.Info interface for details.
+ // +optional
+ map<string, ExtraValue> extra = 6;
+}
+
+message CertificateSigningRequestStatus {
+ // Conditions applied to the request, such as approval or denial.
+ // +optional
+ repeated CertificateSigningRequestCondition conditions = 1;
+
+ // If request was approved, the controller will place the issued certificate here.
+ // +optional
+ optional bytes certificate = 2;
+}
+
+// ExtraValue masks the value so protobuf can generate
+// +protobuf.nullable=true
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+message ExtraValue {
+ // items, if empty, will result in an empty slice
+
+ repeated string items = 1;
+}
+
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/helpers.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/helpers.go
new file mode 100644
index 000000000..1375063c1
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/helpers.go
@@ -0,0 +1,38 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "crypto/x509"
+ "encoding/pem"
+ "errors"
+)
+
+// ParseCSR extracts the CSR from the API object and decodes it.
+func ParseCSR(obj *CertificateSigningRequest) (*x509.CertificateRequest, error) {
+ // extract PEM from request object
+ pemBytes := obj.Spec.Request
+ block, _ := pem.Decode(pemBytes)
+ if block == nil || block.Type != "CERTIFICATE REQUEST" {
+ return nil, errors.New("PEM block type must be CERTIFICATE REQUEST")
+ }
+ csr, err := x509.ParseCertificateRequest(block.Bytes)
+ if err != nil {
+ return nil, err
+ }
+ return csr, nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/register.go
new file mode 100644
index 000000000..582916c8b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/register.go
@@ -0,0 +1,66 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "certificates.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addConversionFuncs, addDefaultingFuncs)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &CertificateSigningRequest{},
+ &CertificateSigningRequestList{},
+ )
+
+ // Add the watch version that applies
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/types.generated.go
new file mode 100644
index 000000000..3c4771bbd
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/types.generated.go
@@ -0,0 +1,2624 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1beta1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ pkg2_types "k8s.io/apimachinery/pkg/types"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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 pkg1_v1.TypeMeta
+ var v1 pkg2_types.UID
+ var v2 time.Time
+ _, _, _ = v0, v1, v2
+ }
+}
+
+func (x *CertificateSigningRequest) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CertificateSigningRequest) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CertificateSigningRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = CertificateSigningRequestSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = CertificateSigningRequestStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CertificateSigningRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = CertificateSigningRequestSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = CertificateSigningRequestStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *CertificateSigningRequestSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = len(x.Usages) != 0
+ yyq2[2] = x.Username != ""
+ yyq2[3] = x.UID != ""
+ yyq2[4] = len(x.Groups) != 0
+ yyq2[5] = len(x.Extra) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Request == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Request))
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("request"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Request == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Request))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Usages == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceKeyUsage(([]KeyUsage)(x.Usages), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("usages"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Usages == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceKeyUsage(([]KeyUsage)(x.Usages), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Username))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("username"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Username))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.UID))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("uid"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.UID))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.Groups == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Groups, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("groups"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Groups == nil {
+ r.EncodeNil()
+ } else {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Groups, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.Extra == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("extra"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Extra == nil {
+ r.EncodeNil()
+ } else {
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.encMapstringExtraValue((map[string]ExtraValue)(x.Extra), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CertificateSigningRequestSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CertificateSigningRequestSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "request":
+ if r.TryDecodeAsNil() {
+ x.Request = nil
+ } else {
+ yyv4 := &x.Request
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *yyv4 = r.DecodeBytes(*(*[]byte)(yyv4), false, false)
+ }
+ }
+ case "usages":
+ if r.TryDecodeAsNil() {
+ x.Usages = nil
+ } else {
+ yyv6 := &x.Usages
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceKeyUsage((*[]KeyUsage)(yyv6), d)
+ }
+ }
+ case "username":
+ if r.TryDecodeAsNil() {
+ x.Username = ""
+ } else {
+ yyv8 := &x.Username
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "uid":
+ if r.TryDecodeAsNil() {
+ x.UID = ""
+ } else {
+ yyv10 := &x.UID
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "groups":
+ if r.TryDecodeAsNil() {
+ x.Groups = nil
+ } else {
+ yyv12 := &x.Groups
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv12, false, d)
+ }
+ }
+ case "extra":
+ if r.TryDecodeAsNil() {
+ x.Extra = nil
+ } else {
+ yyv14 := &x.Extra
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.decMapstringExtraValue((*map[string]ExtraValue)(yyv14), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CertificateSigningRequestSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj16 int
+ var yyb16 bool
+ var yyhl16 bool = l >= 0
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Request = nil
+ } else {
+ yyv17 := &x.Request
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *yyv17 = r.DecodeBytes(*(*[]byte)(yyv17), false, false)
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Usages = nil
+ } else {
+ yyv19 := &x.Usages
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceKeyUsage((*[]KeyUsage)(yyv19), d)
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Username = ""
+ } else {
+ yyv21 := &x.Username
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UID = ""
+ } else {
+ yyv23 := &x.UID
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*string)(yyv23)) = r.DecodeString()
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Groups = nil
+ } else {
+ yyv25 := &x.Groups
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv25, false, d)
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Extra = nil
+ } else {
+ yyv27 := &x.Extra
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ h.decMapstringExtraValue((*map[string]ExtraValue)(yyv27), d)
+ }
+ }
+ for {
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj16-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x ExtraValue) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 {
+ h.encExtraValue((ExtraValue)(x), e)
+ }
+ }
+}
+
+func (x *ExtraValue) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ yym1 := z.DecBinary()
+ _ = yym1
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x) {
+ } else {
+ h.decExtraValue((*ExtraValue)(x), d)
+ }
+}
+
+func (x *CertificateSigningRequestStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Conditions) != 0
+ yyq2[1] = len(x.Certificate) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceCertificateSigningRequestCondition(([]CertificateSigningRequestCondition)(x.Conditions), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("conditions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceCertificateSigningRequestCondition(([]CertificateSigningRequestCondition)(x.Conditions), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Certificate == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Certificate))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("certificate"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Certificate == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Certificate))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CertificateSigningRequestStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CertificateSigningRequestStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "conditions":
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv4 := &x.Conditions
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceCertificateSigningRequestCondition((*[]CertificateSigningRequestCondition)(yyv4), d)
+ }
+ }
+ case "certificate":
+ if r.TryDecodeAsNil() {
+ x.Certificate = nil
+ } else {
+ yyv6 := &x.Certificate
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *yyv6 = r.DecodeBytes(*(*[]byte)(yyv6), false, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CertificateSigningRequestStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv9 := &x.Conditions
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceCertificateSigningRequestCondition((*[]CertificateSigningRequestCondition)(yyv9), d)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Certificate = nil
+ } else {
+ yyv11 := &x.Certificate
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *yyv11 = r.DecodeBytes(*(*[]byte)(yyv11), false, false)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x RequestConditionType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *RequestConditionType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *CertificateSigningRequestCondition) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.Reason != ""
+ yyq2[2] = x.Message != ""
+ yyq2[3] = true
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yy13 := &x.LastUpdateTime
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy13) {
+ } else if yym14 {
+ z.EncBinaryMarshal(yy13)
+ } else if !yym14 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy13)
+ } else {
+ z.EncFallback(yy13)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastUpdateTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy15 := &x.LastUpdateTime
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy15) {
+ } else if yym16 {
+ z.EncBinaryMarshal(yy15)
+ } else if !yym16 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy15)
+ } else {
+ z.EncFallback(yy15)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CertificateSigningRequestCondition) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CertificateSigningRequestCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv5 := &x.Reason
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*string)(yyv5)) = r.DecodeString()
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv7 := &x.Message
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*string)(yyv7)) = r.DecodeString()
+ }
+ }
+ case "lastUpdateTime":
+ if r.TryDecodeAsNil() {
+ x.LastUpdateTime = pkg1_v1.Time{}
+ } else {
+ yyv9 := &x.LastUpdateTime
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv9) {
+ } else if yym10 {
+ z.DecBinaryUnmarshal(yyv9)
+ } else if !yym10 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv9)
+ } else {
+ z.DecFallback(yyv9, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CertificateSigningRequestCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv12 := &x.Type
+ yyv12.CodecDecodeSelf(d)
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv13 := &x.Reason
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ *((*string)(yyv13)) = r.DecodeString()
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv15 := &x.Message
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ *((*string)(yyv15)) = r.DecodeString()
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastUpdateTime = pkg1_v1.Time{}
+ } else {
+ yyv17 := &x.LastUpdateTime
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv17) {
+ } else if yym18 {
+ z.DecBinaryUnmarshal(yyv17)
+ } else if !yym18 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv17)
+ } else {
+ z.DecFallback(yyv17, false)
+ }
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *CertificateSigningRequestList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceCertificateSigningRequest(([]CertificateSigningRequest)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceCertificateSigningRequest(([]CertificateSigningRequest)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CertificateSigningRequestList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CertificateSigningRequestList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceCertificateSigningRequest((*[]CertificateSigningRequest)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CertificateSigningRequestList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceCertificateSigningRequest((*[]CertificateSigningRequest)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x KeyUsage) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *KeyUsage) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 codecSelfer1234) encSliceKeyUsage(v []KeyUsage, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yyv1.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceKeyUsage(v *[]KeyUsage, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []KeyUsage{}
+ 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) {
+
+ yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]KeyUsage, yyrl1)
+ }
+ } else {
+ yyv1 = make([]KeyUsage, yyrl1)
+ }
+ yyc1 = true
+ yyrr1 = len(yyv1)
+ } else if yyl1 != len(yyv1) {
+ yyv1 = yyv1[:yyl1]
+ yyc1 = true
+ }
+ yyj1 := 0
+ for ; yyj1 < yyrr1; yyj1++ {
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, "") // var yyz1 KeyUsage
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } 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 = []KeyUsage{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encMapstringExtraValue(v map[string]ExtraValue, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeMapStart(len(v))
+ for yyk1, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ yym2 := z.EncBinary()
+ _ = yym2
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yyk1))
+ }
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyv1 == nil {
+ r.EncodeNil()
+ } else {
+ yyv1.CodecEncodeSelf(e)
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) decMapstringExtraValue(v *map[string]ExtraValue, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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, 40)
+ yyv1 = make(map[string]ExtraValue, yyrl1)
+ *v = yyv1
+ }
+ var yymk1 string
+ var yymv1 ExtraValue
+ var yymg1 bool
+ if yybh1.MapValueReset {
+ yymg1 = true
+ }
+ if yyl1 > 0 {
+ for yyj1 := 0; yyj1 < yyl1; yyj1++ {
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ if r.TryDecodeAsNil() {
+ yymk1 = ""
+ } else {
+ yyv2 := &yymk1
+ yym3 := z.DecBinary()
+ _ = yym3
+ if false {
+ } else {
+ *((*string)(yyv2)) = r.DecodeString()
+ }
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv4 := &yymv1
+ yyv4.CodecDecodeSelf(d)
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } else if yyl1 < 0 {
+ for yyj1 := 0; !r.CheckBreak(); yyj1++ {
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ if r.TryDecodeAsNil() {
+ yymk1 = ""
+ } else {
+ yyv5 := &yymk1
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ *((*string)(yyv5)) = r.DecodeString()
+ }
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = nil
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = nil
+ } else {
+ yyv7 := &yymv1
+ yyv7.CodecDecodeSelf(d)
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } // else len==0: TODO: Should we clear map entries?
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) encExtraValue(v ExtraValue, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym2 := z.EncBinary()
+ _ = yym2
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yyv1))
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decExtraValue(v *ExtraValue, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []string{}
+ 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) {
+
+ yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]string, yyrl1)
+ }
+ } else {
+ yyv1 = make([]string, yyrl1)
+ }
+ yyc1 = true
+ yyrr1 = len(yyv1)
+ } else if yyl1 != len(yyv1) {
+ yyv1 = yyv1[:yyl1]
+ yyc1 = true
+ }
+ yyj1 := 0
+ for ; yyj1 < yyrr1; yyj1++ {
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yym3 := z.DecBinary()
+ _ = yym3
+ if false {
+ } else {
+ *((*string)(yyv2)) = r.DecodeString()
+ }
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv4 := &yyv1[yyj1]
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, "") // var yyz1 string
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv6 := &yyv1[yyj1]
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+
+ } else {
+ z.DecSwallow()
+ }
+
+ }
+ if yyj1 < len(yyv1) {
+ yyv1 = yyv1[:yyj1]
+ yyc1 = true
+ } else if yyj1 == 0 && yyv1 == nil {
+ yyv1 = []string{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceCertificateSigningRequestCondition(v []CertificateSigningRequestCondition, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceCertificateSigningRequestCondition(v *[]CertificateSigningRequestCondition, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []CertificateSigningRequestCondition{}
+ 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([]CertificateSigningRequestCondition, yyrl1)
+ }
+ } else {
+ yyv1 = make([]CertificateSigningRequestCondition, 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] = CertificateSigningRequestCondition{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, CertificateSigningRequestCondition{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = CertificateSigningRequestCondition{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, CertificateSigningRequestCondition{}) // var yyz1 CertificateSigningRequestCondition
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = CertificateSigningRequestCondition{}
+ } 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 = []CertificateSigningRequestCondition{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceCertificateSigningRequest(v []CertificateSigningRequest, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceCertificateSigningRequest(v *[]CertificateSigningRequest, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []CertificateSigningRequest{}
+ 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, 424)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]CertificateSigningRequest, yyrl1)
+ }
+ } else {
+ yyv1 = make([]CertificateSigningRequest, 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] = CertificateSigningRequest{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, CertificateSigningRequest{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = CertificateSigningRequest{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, CertificateSigningRequest{}) // var yyz1 CertificateSigningRequest
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = CertificateSigningRequest{}
+ } 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 = []CertificateSigningRequest{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/types.go
new file mode 100644
index 000000000..a9149ba8d
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/types.go
@@ -0,0 +1,152 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "fmt"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+
+// Describes a certificate signing request
+type CertificateSigningRequest struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // The certificate request itself and any additional information.
+ // +optional
+ Spec CertificateSigningRequestSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Derived information about the request.
+ // +optional
+ Status CertificateSigningRequestStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// This information is immutable after the request is created. Only the Request
+// and Usages fields can be set on creation, other fields are derived by
+// Kubernetes and cannot be modified by users.
+type CertificateSigningRequestSpec struct {
+ // Base64-encoded PKCS#10 CSR data
+ Request []byte `json:"request" protobuf:"bytes,1,opt,name=request"`
+
+ // allowedUsages specifies a set of usage contexts the key will be
+ // valid for.
+ // See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3
+ // https://tools.ietf.org/html/rfc5280#section-4.2.1.12
+ Usages []KeyUsage `json:"usages,omitempty" protobuf:"bytes,5,opt,name=keyUsage"`
+
+ // Information about the requesting user.
+ // See user.Info interface for details.
+ // +optional
+ Username string `json:"username,omitempty" protobuf:"bytes,2,opt,name=username"`
+ // UID information about the requesting user.
+ // See user.Info interface for details.
+ // +optional
+ UID string `json:"uid,omitempty" protobuf:"bytes,3,opt,name=uid"`
+ // Group information about the requesting user.
+ // See user.Info interface for details.
+ // +optional
+ Groups []string `json:"groups,omitempty" protobuf:"bytes,4,rep,name=groups"`
+ // Extra information about the requesting user.
+ // See user.Info interface for details.
+ // +optional
+ Extra map[string]ExtraValue `json:"extra,omitempty" protobuf:"bytes,6,rep,name=extra"`
+}
+
+// ExtraValue masks the value so protobuf can generate
+// +protobuf.nullable=true
+// +protobuf.options.(gogoproto.goproto_stringer)=false
+type ExtraValue []string
+
+func (t ExtraValue) String() string {
+ return fmt.Sprintf("%v", []string(t))
+}
+
+type CertificateSigningRequestStatus struct {
+ // Conditions applied to the request, such as approval or denial.
+ // +optional
+ Conditions []CertificateSigningRequestCondition `json:"conditions,omitempty" protobuf:"bytes,1,rep,name=conditions"`
+
+ // If request was approved, the controller will place the issued certificate here.
+ // +optional
+ Certificate []byte `json:"certificate,omitempty" protobuf:"bytes,2,opt,name=certificate"`
+}
+
+type RequestConditionType string
+
+// These are the possible conditions for a certificate request.
+const (
+ CertificateApproved RequestConditionType = "Approved"
+ CertificateDenied RequestConditionType = "Denied"
+)
+
+type CertificateSigningRequestCondition struct {
+ // request approval state, currently Approved or Denied.
+ Type RequestConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=RequestConditionType"`
+ // brief reason for the request state
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"`
+ // human readable message with details about the request state
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"`
+ // timestamp for the last update to this condition
+ // +optional
+ LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,4,opt,name=lastUpdateTime"`
+}
+
+type CertificateSigningRequestList struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ Items []CertificateSigningRequest `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// KeyUsages specifies valid usage contexts for keys.
+// See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3
+// https://tools.ietf.org/html/rfc5280#section-4.2.1.12
+type KeyUsage string
+
+const (
+ UsageSigning KeyUsage = "signing"
+ UsageDigitalSignature KeyUsage = "digital signature"
+ UsageContentCommittment KeyUsage = "content committment"
+ UsageKeyEncipherment KeyUsage = "key encipherment"
+ UsageKeyAgreement KeyUsage = "key agreement"
+ UsageDataEncipherment KeyUsage = "data encipherment"
+ UsageCertSign KeyUsage = "cert sign"
+ UsageCRLSign KeyUsage = "crl sign"
+ UsageEncipherOnly KeyUsage = "encipher only"
+ UsageDecipherOnly KeyUsage = "decipher only"
+ UsageAny KeyUsage = "any"
+ UsageServerAuth KeyUsage = "server auth"
+ UsageClientAuth KeyUsage = "client auth"
+ UsageCodeSigning KeyUsage = "code signing"
+ UsageEmailProtection KeyUsage = "email protection"
+ UsageSMIME KeyUsage = "s/mime"
+ UsageIPsecEndSystem KeyUsage = "ipsec end system"
+ UsageIPsecTunnel KeyUsage = "ipsec tunnel"
+ UsageIPsecUser KeyUsage = "ipsec user"
+ UsageTimestamping KeyUsage = "timestamping"
+ UsageOCSPSigning KeyUsage = "ocsp signing"
+ UsageMicrosoftSGC KeyUsage = "microsoft sgc"
+ UsageNetscapSGC KeyUsage = "netscape sgc"
+)
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..4fd91df06
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/types_swagger_doc_generated.go
@@ -0,0 +1,74 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_CertificateSigningRequest = map[string]string{
+ "": "Describes a certificate signing request",
+ "spec": "The certificate request itself and any additional information.",
+ "status": "Derived information about the request.",
+}
+
+func (CertificateSigningRequest) SwaggerDoc() map[string]string {
+ return map_CertificateSigningRequest
+}
+
+var map_CertificateSigningRequestCondition = map[string]string{
+ "type": "request approval state, currently Approved or Denied.",
+ "reason": "brief reason for the request state",
+ "message": "human readable message with details about the request state",
+ "lastUpdateTime": "timestamp for the last update to this condition",
+}
+
+func (CertificateSigningRequestCondition) SwaggerDoc() map[string]string {
+ return map_CertificateSigningRequestCondition
+}
+
+var map_CertificateSigningRequestSpec = map[string]string{
+ "": "This information is immutable after the request is created. Only the Request and Usages fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users.",
+ "request": "Base64-encoded PKCS#10 CSR data",
+ "usages": "allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3\n https://tools.ietf.org/html/rfc5280#section-4.2.1.12",
+ "username": "Information about the requesting user. See user.Info interface for details.",
+ "uid": "UID information about the requesting user. See user.Info interface for details.",
+ "groups": "Group information about the requesting user. See user.Info interface for details.",
+ "extra": "Extra information about the requesting user. See user.Info interface for details.",
+}
+
+func (CertificateSigningRequestSpec) SwaggerDoc() map[string]string {
+ return map_CertificateSigningRequestSpec
+}
+
+var map_CertificateSigningRequestStatus = map[string]string{
+ "conditions": "Conditions applied to the request, such as approval or denial.",
+ "certificate": "If request was approved, the controller will place the issued certificate here.",
+}
+
+func (CertificateSigningRequestStatus) SwaggerDoc() map[string]string {
+ return map_CertificateSigningRequestStatus
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.conversion.go
new file mode 100644
index 000000000..e2968297f
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.conversion.go
@@ -0,0 +1,189 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ certificates "k8s.io/kubernetes/pkg/apis/certificates"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1beta1_CertificateSigningRequest_To_certificates_CertificateSigningRequest,
+ Convert_certificates_CertificateSigningRequest_To_v1beta1_CertificateSigningRequest,
+ Convert_v1beta1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition,
+ Convert_certificates_CertificateSigningRequestCondition_To_v1beta1_CertificateSigningRequestCondition,
+ Convert_v1beta1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList,
+ Convert_certificates_CertificateSigningRequestList_To_v1beta1_CertificateSigningRequestList,
+ Convert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec,
+ Convert_certificates_CertificateSigningRequestSpec_To_v1beta1_CertificateSigningRequestSpec,
+ Convert_v1beta1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus,
+ Convert_certificates_CertificateSigningRequestStatus_To_v1beta1_CertificateSigningRequestStatus,
+ )
+}
+
+func autoConvert_v1beta1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in *CertificateSigningRequest, out *certificates.CertificateSigningRequest, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_CertificateSigningRequest_To_certificates_CertificateSigningRequest is an autogenerated conversion function.
+func Convert_v1beta1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in *CertificateSigningRequest, out *certificates.CertificateSigningRequest, s conversion.Scope) error {
+ return autoConvert_v1beta1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in, out, s)
+}
+
+func autoConvert_certificates_CertificateSigningRequest_To_v1beta1_CertificateSigningRequest(in *certificates.CertificateSigningRequest, out *CertificateSigningRequest, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_certificates_CertificateSigningRequestSpec_To_v1beta1_CertificateSigningRequestSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_certificates_CertificateSigningRequestStatus_To_v1beta1_CertificateSigningRequestStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_certificates_CertificateSigningRequest_To_v1beta1_CertificateSigningRequest is an autogenerated conversion function.
+func Convert_certificates_CertificateSigningRequest_To_v1beta1_CertificateSigningRequest(in *certificates.CertificateSigningRequest, out *CertificateSigningRequest, s conversion.Scope) error {
+ return autoConvert_certificates_CertificateSigningRequest_To_v1beta1_CertificateSigningRequest(in, out, s)
+}
+
+func autoConvert_v1beta1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in *CertificateSigningRequestCondition, out *certificates.CertificateSigningRequestCondition, s conversion.Scope) error {
+ out.Type = certificates.RequestConditionType(in.Type)
+ out.Reason = in.Reason
+ out.Message = in.Message
+ out.LastUpdateTime = in.LastUpdateTime
+ return nil
+}
+
+// Convert_v1beta1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition is an autogenerated conversion function.
+func Convert_v1beta1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in *CertificateSigningRequestCondition, out *certificates.CertificateSigningRequestCondition, s conversion.Scope) error {
+ return autoConvert_v1beta1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in, out, s)
+}
+
+func autoConvert_certificates_CertificateSigningRequestCondition_To_v1beta1_CertificateSigningRequestCondition(in *certificates.CertificateSigningRequestCondition, out *CertificateSigningRequestCondition, s conversion.Scope) error {
+ out.Type = RequestConditionType(in.Type)
+ out.Reason = in.Reason
+ out.Message = in.Message
+ out.LastUpdateTime = in.LastUpdateTime
+ return nil
+}
+
+// Convert_certificates_CertificateSigningRequestCondition_To_v1beta1_CertificateSigningRequestCondition is an autogenerated conversion function.
+func Convert_certificates_CertificateSigningRequestCondition_To_v1beta1_CertificateSigningRequestCondition(in *certificates.CertificateSigningRequestCondition, out *CertificateSigningRequestCondition, s conversion.Scope) error {
+ return autoConvert_certificates_CertificateSigningRequestCondition_To_v1beta1_CertificateSigningRequestCondition(in, out, s)
+}
+
+func autoConvert_v1beta1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in *CertificateSigningRequestList, out *certificates.CertificateSigningRequestList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]certificates.CertificateSigningRequest)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1beta1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList is an autogenerated conversion function.
+func Convert_v1beta1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in *CertificateSigningRequestList, out *certificates.CertificateSigningRequestList, s conversion.Scope) error {
+ return autoConvert_v1beta1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in, out, s)
+}
+
+func autoConvert_certificates_CertificateSigningRequestList_To_v1beta1_CertificateSigningRequestList(in *certificates.CertificateSigningRequestList, out *CertificateSigningRequestList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]CertificateSigningRequest, 0)
+ } else {
+ out.Items = *(*[]CertificateSigningRequest)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_certificates_CertificateSigningRequestList_To_v1beta1_CertificateSigningRequestList is an autogenerated conversion function.
+func Convert_certificates_CertificateSigningRequestList_To_v1beta1_CertificateSigningRequestList(in *certificates.CertificateSigningRequestList, out *CertificateSigningRequestList, s conversion.Scope) error {
+ return autoConvert_certificates_CertificateSigningRequestList_To_v1beta1_CertificateSigningRequestList(in, out, s)
+}
+
+func autoConvert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in *CertificateSigningRequestSpec, out *certificates.CertificateSigningRequestSpec, s conversion.Scope) error {
+ out.Request = *(*[]byte)(unsafe.Pointer(&in.Request))
+ out.Usages = *(*[]certificates.KeyUsage)(unsafe.Pointer(&in.Usages))
+ out.Username = in.Username
+ out.UID = in.UID
+ out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups))
+ out.Extra = *(*map[string]certificates.ExtraValue)(unsafe.Pointer(&in.Extra))
+ return nil
+}
+
+// Convert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec is an autogenerated conversion function.
+func Convert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in *CertificateSigningRequestSpec, out *certificates.CertificateSigningRequestSpec, s conversion.Scope) error {
+ return autoConvert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in, out, s)
+}
+
+func autoConvert_certificates_CertificateSigningRequestSpec_To_v1beta1_CertificateSigningRequestSpec(in *certificates.CertificateSigningRequestSpec, out *CertificateSigningRequestSpec, s conversion.Scope) error {
+ if in.Request == nil {
+ out.Request = make([]byte, 0)
+ } else {
+ out.Request = *(*[]byte)(unsafe.Pointer(&in.Request))
+ }
+ out.Usages = *(*[]KeyUsage)(unsafe.Pointer(&in.Usages))
+ out.Username = in.Username
+ out.UID = in.UID
+ out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups))
+ out.Extra = *(*map[string]ExtraValue)(unsafe.Pointer(&in.Extra))
+ return nil
+}
+
+// Convert_certificates_CertificateSigningRequestSpec_To_v1beta1_CertificateSigningRequestSpec is an autogenerated conversion function.
+func Convert_certificates_CertificateSigningRequestSpec_To_v1beta1_CertificateSigningRequestSpec(in *certificates.CertificateSigningRequestSpec, out *CertificateSigningRequestSpec, s conversion.Scope) error {
+ return autoConvert_certificates_CertificateSigningRequestSpec_To_v1beta1_CertificateSigningRequestSpec(in, out, s)
+}
+
+func autoConvert_v1beta1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in *CertificateSigningRequestStatus, out *certificates.CertificateSigningRequestStatus, s conversion.Scope) error {
+ out.Conditions = *(*[]certificates.CertificateSigningRequestCondition)(unsafe.Pointer(&in.Conditions))
+ out.Certificate = *(*[]byte)(unsafe.Pointer(&in.Certificate))
+ return nil
+}
+
+// Convert_v1beta1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus is an autogenerated conversion function.
+func Convert_v1beta1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in *CertificateSigningRequestStatus, out *certificates.CertificateSigningRequestStatus, s conversion.Scope) error {
+ return autoConvert_v1beta1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in, out, s)
+}
+
+func autoConvert_certificates_CertificateSigningRequestStatus_To_v1beta1_CertificateSigningRequestStatus(in *certificates.CertificateSigningRequestStatus, out *CertificateSigningRequestStatus, s conversion.Scope) error {
+ out.Conditions = *(*[]CertificateSigningRequestCondition)(unsafe.Pointer(&in.Conditions))
+ out.Certificate = *(*[]byte)(unsafe.Pointer(&in.Certificate))
+ return nil
+}
+
+// Convert_certificates_CertificateSigningRequestStatus_To_v1beta1_CertificateSigningRequestStatus is an autogenerated conversion function.
+func Convert_certificates_CertificateSigningRequestStatus_To_v1beta1_CertificateSigningRequestStatus(in *certificates.CertificateSigningRequestStatus, out *CertificateSigningRequestStatus, s conversion.Scope) error {
+ return autoConvert_certificates_CertificateSigningRequestStatus_To_v1beta1_CertificateSigningRequestStatus(in, out, s)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..f3f172c70
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.deepcopy.go
@@ -0,0 +1,155 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CertificateSigningRequest, InType: reflect.TypeOf(&CertificateSigningRequest{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CertificateSigningRequestCondition, InType: reflect.TypeOf(&CertificateSigningRequestCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CertificateSigningRequestList, InType: reflect.TypeOf(&CertificateSigningRequestList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CertificateSigningRequestSpec, InType: reflect.TypeOf(&CertificateSigningRequestSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CertificateSigningRequestStatus, InType: reflect.TypeOf(&CertificateSigningRequestStatus{})},
+ )
+}
+
+// DeepCopy_v1beta1_CertificateSigningRequest is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_CertificateSigningRequest(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CertificateSigningRequest)
+ out := out.(*CertificateSigningRequest)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_CertificateSigningRequestSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_CertificateSigningRequestStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_CertificateSigningRequestCondition is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_CertificateSigningRequestCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CertificateSigningRequestCondition)
+ out := out.(*CertificateSigningRequestCondition)
+ *out = *in
+ out.LastUpdateTime = in.LastUpdateTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_CertificateSigningRequestList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_CertificateSigningRequestList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CertificateSigningRequestList)
+ out := out.(*CertificateSigningRequestList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]CertificateSigningRequest, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_CertificateSigningRequest(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_CertificateSigningRequestSpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_CertificateSigningRequestSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CertificateSigningRequestSpec)
+ out := out.(*CertificateSigningRequestSpec)
+ *out = *in
+ if in.Request != nil {
+ in, out := &in.Request, &out.Request
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ }
+ if in.Usages != nil {
+ in, out := &in.Usages, &out.Usages
+ *out = make([]KeyUsage, len(*in))
+ copy(*out, *in)
+ }
+ if in.Groups != nil {
+ in, out := &in.Groups, &out.Groups
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Extra != nil {
+ in, out := &in.Extra, &out.Extra
+ *out = make(map[string]ExtraValue)
+ for key, val := range *in {
+ if newVal, err := c.DeepCopy(&val); err != nil {
+ return err
+ } else {
+ (*out)[key] = *newVal.(*ExtraValue)
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_CertificateSigningRequestStatus is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_CertificateSigningRequestStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CertificateSigningRequestStatus)
+ out := out.(*CertificateSigningRequestStatus)
+ *out = *in
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]CertificateSigningRequestCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_CertificateSigningRequestCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Certificate != nil {
+ in, out := &in.Certificate, &out.Certificate
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.defaults.go
new file mode 100644
index 000000000..3c5ae0362
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.defaults.go
@@ -0,0 +1,47 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ scheme.AddTypeDefaultingFunc(&CertificateSigningRequest{}, func(obj interface{}) { SetObjectDefaults_CertificateSigningRequest(obj.(*CertificateSigningRequest)) })
+ scheme.AddTypeDefaultingFunc(&CertificateSigningRequestList{}, func(obj interface{}) {
+ SetObjectDefaults_CertificateSigningRequestList(obj.(*CertificateSigningRequestList))
+ })
+ return nil
+}
+
+func SetObjectDefaults_CertificateSigningRequest(in *CertificateSigningRequest) {
+ SetDefaults_CertificateSigningRequestSpec(&in.Spec)
+}
+
+func SetObjectDefaults_CertificateSigningRequestList(in *CertificateSigningRequestList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_CertificateSigningRequest(a)
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/zz_generated.deepcopy.go
new file mode 100644
index 000000000..589e94c0e
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/zz_generated.deepcopy.go
@@ -0,0 +1,155 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package certificates
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_certificates_CertificateSigningRequest, InType: reflect.TypeOf(&CertificateSigningRequest{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_certificates_CertificateSigningRequestCondition, InType: reflect.TypeOf(&CertificateSigningRequestCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_certificates_CertificateSigningRequestList, InType: reflect.TypeOf(&CertificateSigningRequestList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_certificates_CertificateSigningRequestSpec, InType: reflect.TypeOf(&CertificateSigningRequestSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_certificates_CertificateSigningRequestStatus, InType: reflect.TypeOf(&CertificateSigningRequestStatus{})},
+ )
+}
+
+// DeepCopy_certificates_CertificateSigningRequest is an autogenerated deepcopy function.
+func DeepCopy_certificates_CertificateSigningRequest(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CertificateSigningRequest)
+ out := out.(*CertificateSigningRequest)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_certificates_CertificateSigningRequestSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_certificates_CertificateSigningRequestStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_certificates_CertificateSigningRequestCondition is an autogenerated deepcopy function.
+func DeepCopy_certificates_CertificateSigningRequestCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CertificateSigningRequestCondition)
+ out := out.(*CertificateSigningRequestCondition)
+ *out = *in
+ out.LastUpdateTime = in.LastUpdateTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_certificates_CertificateSigningRequestList is an autogenerated deepcopy function.
+func DeepCopy_certificates_CertificateSigningRequestList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CertificateSigningRequestList)
+ out := out.(*CertificateSigningRequestList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]CertificateSigningRequest, len(*in))
+ for i := range *in {
+ if err := DeepCopy_certificates_CertificateSigningRequest(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_certificates_CertificateSigningRequestSpec is an autogenerated deepcopy function.
+func DeepCopy_certificates_CertificateSigningRequestSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CertificateSigningRequestSpec)
+ out := out.(*CertificateSigningRequestSpec)
+ *out = *in
+ if in.Request != nil {
+ in, out := &in.Request, &out.Request
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ }
+ if in.Usages != nil {
+ in, out := &in.Usages, &out.Usages
+ *out = make([]KeyUsage, len(*in))
+ copy(*out, *in)
+ }
+ if in.Groups != nil {
+ in, out := &in.Groups, &out.Groups
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Extra != nil {
+ in, out := &in.Extra, &out.Extra
+ *out = make(map[string]ExtraValue)
+ for key, val := range *in {
+ if newVal, err := c.DeepCopy(&val); err != nil {
+ return err
+ } else {
+ (*out)[key] = *newVal.(*ExtraValue)
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_certificates_CertificateSigningRequestStatus is an autogenerated deepcopy function.
+func DeepCopy_certificates_CertificateSigningRequestStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CertificateSigningRequestStatus)
+ out := out.(*CertificateSigningRequestStatus)
+ *out = *in
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]CertificateSigningRequestCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_certificates_CertificateSigningRequestCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Certificate != nil {
+ in, out := &in.Certificate, &out.Certificate
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/doc.go
new file mode 100644
index 000000000..fbce8ee70
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+
+package extensions // import "k8s.io/kubernetes/pkg/apis/extensions"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/helpers.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/helpers.go
new file mode 100644
index 000000000..27d3e23ad
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/helpers.go
@@ -0,0 +1,37 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package extensions
+
+import (
+ "strings"
+)
+
+// SysctlsFromPodSecurityPolicyAnnotation parses an annotation value of the key
+// SysctlsSecurityPolocyAnnotationKey into a slice of sysctls. An empty slice
+// is returned if annotation is the empty string.
+func SysctlsFromPodSecurityPolicyAnnotation(annotation string) ([]string, error) {
+ if len(annotation) == 0 {
+ return []string{}, nil
+ }
+
+ return strings.Split(annotation, ","), nil
+}
+
+// PodAnnotationsFromSysctls creates an annotation value for a slice of Sysctls.
+func PodAnnotationsFromSysctls(sysctls []string) string {
+ return strings.Join(sysctls, ",")
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/install/install.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/install/install.go
new file mode 100644
index 000000000..53f870dda
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/install/install.go
@@ -0,0 +1,51 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package install installs the experimental API group, making it available as
+// an option to all of the API encoding/decoding machinery.
+package install
+
+import (
+ "k8s.io/apimachinery/pkg/apimachinery/announced"
+ "k8s.io/apimachinery/pkg/apimachinery/registered"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/sets"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/extensions"
+ "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
+)
+
+func init() {
+ Install(api.GroupFactoryRegistry, api.Registry, api.Scheme)
+}
+
+// Install registers the API group and adds types to a scheme
+func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
+ if err := announced.NewGroupMetaFactory(
+ &announced.GroupMetaFactoryArgs{
+ GroupName: extensions.GroupName,
+ VersionPreferenceOrder: []string{v1beta1.SchemeGroupVersion.Version},
+ ImportPrefix: "k8s.io/kubernetes/pkg/apis/extensions",
+ RootScopedKinds: sets.NewString("PodSecurityPolicy", "ThirdPartyResource"),
+ AddInternalObjectsToScheme: extensions.AddToScheme,
+ },
+ announced.VersionToSchemeFunc{
+ v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme,
+ },
+ ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil {
+ panic(err)
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/register.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/register.go
new file mode 100644
index 000000000..5983636c2
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/register.go
@@ -0,0 +1,70 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package extensions
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "extensions"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ // TODO this gets cleaned up when the types are fixed
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Deployment{},
+ &DeploymentList{},
+ &DeploymentRollback{},
+ &ReplicationControllerDummy{},
+ &Scale{},
+ &ThirdPartyResource{},
+ &ThirdPartyResourceList{},
+ &DaemonSetList{},
+ &DaemonSet{},
+ &ThirdPartyResourceData{},
+ &ThirdPartyResourceDataList{},
+ &Ingress{},
+ &IngressList{},
+ &ReplicaSet{},
+ &ReplicaSetList{},
+ &PodSecurityPolicy{},
+ &PodSecurityPolicyList{},
+ &NetworkPolicy{},
+ &NetworkPolicyList{},
+ )
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/types.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/types.go
new file mode 100644
index 000000000..dffe1a89f
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/types.go
@@ -0,0 +1,1147 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+/*
+This file (together with pkg/apis/extensions/v1beta1/types.go) contain the experimental
+types in kubernetes. These API objects are experimental, meaning that the
+APIs may be broken at any time by the kubernetes team.
+
+DISCLAIMER: The implementation of the experimental API group itself is
+a temporary one meant as a stopgap solution until kubernetes has proper
+support for multiple API groups. The transition may require changes
+beyond registration differences. In other words, experimental API group
+support is experimental.
+*/
+
+package extensions
+
+import (
+ "k8s.io/apimachinery/pkg/api/resource"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/util/intstr"
+ "k8s.io/kubernetes/pkg/api"
+)
+
+const (
+ // SysctlsPodSecurityPolicyAnnotationKey represents the key of a whitelist of
+ // allowed safe and unsafe sysctls in a pod spec. It's a comma-separated list of plain sysctl
+ // names or sysctl patterns (which end in *). The string "*" matches all sysctls.
+ SysctlsPodSecurityPolicyAnnotationKey string = "security.alpha.kubernetes.io/sysctls"
+)
+
+// describes the attributes of a scale subresource
+type ScaleSpec struct {
+ // desired number of instances for the scaled object.
+ // +optional
+ Replicas int32
+}
+
+// represents the current status of a scale subresource.
+type ScaleStatus struct {
+ // actual number of observed instances of the scaled object.
+ Replicas int32
+
+ // label query over pods that should match the replicas count.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ Selector *metav1.LabelSelector
+}
+
+// +genclient=true
+// +noMethods=true
+
+// represents a scaling request for a resource.
+type Scale struct {
+ metav1.TypeMeta
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
+ // +optional
+ metav1.ObjectMeta
+
+ // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
+ // +optional
+ Spec ScaleSpec
+
+ // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.
+ // +optional
+ Status ScaleStatus
+}
+
+// Dummy definition
+type ReplicationControllerDummy struct {
+ metav1.TypeMeta
+}
+
+// Alpha-level support for Custom Metrics in HPA (as annotations).
+type CustomMetricTarget struct {
+ // Custom Metric name.
+ Name string
+ // Custom Metric value (average).
+ TargetValue resource.Quantity
+}
+
+type CustomMetricTargetList struct {
+ Items []CustomMetricTarget
+}
+
+type CustomMetricCurrentStatus struct {
+ // Custom Metric name.
+ Name string
+ // Custom Metric value (average).
+ CurrentValue resource.Quantity
+}
+
+type CustomMetricCurrentStatusList struct {
+ Items []CustomMetricCurrentStatus
+}
+
+// +genclient=true
+// +nonNamespaced=true
+
+// A ThirdPartyResource is a generic representation of a resource, it is used by add-ons and plugins to add new resource
+// types to the API. It consists of one or more Versions of the api.
+type ThirdPartyResource struct {
+ metav1.TypeMeta
+
+ // Standard object metadata
+ // +optional
+ metav1.ObjectMeta
+
+ // Description is the description of this object.
+ // +optional
+ Description string
+
+ // Versions are versions for this third party object
+ Versions []APIVersion
+}
+
+type ThirdPartyResourceList struct {
+ metav1.TypeMeta
+
+ // Standard list metadata.
+ // +optional
+ metav1.ListMeta
+
+ // Items is the list of horizontal pod autoscalers.
+ Items []ThirdPartyResource
+}
+
+// An APIVersion represents a single concrete version of an object model.
+// TODO: we should consider merge this struct with GroupVersion in metav1.go
+type APIVersion struct {
+ // Name of this version (e.g. 'v1').
+ Name string
+}
+
+// An internal object, used for versioned storage in etcd. Not exposed to the end user.
+type ThirdPartyResourceData struct {
+ metav1.TypeMeta
+ // Standard object metadata.
+ // +optional
+ metav1.ObjectMeta
+
+ // Data is the raw JSON data for this data.
+ // +optional
+ Data []byte
+}
+
+// +genclient=true
+
+type Deployment struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Specification of the desired behavior of the Deployment.
+ // +optional
+ Spec DeploymentSpec
+
+ // Most recently observed status of the Deployment.
+ // +optional
+ Status DeploymentStatus
+}
+
+type DeploymentSpec struct {
+ // Number of desired pods. This is a pointer to distinguish between explicit
+ // zero and not specified. Defaults to 1.
+ // +optional
+ Replicas int32
+
+ // Label selector for pods. Existing ReplicaSets whose pods are
+ // selected by this will be the ones affected by this deployment.
+ // +optional
+ Selector *metav1.LabelSelector
+
+ // Template describes the pods that will be created.
+ Template api.PodTemplateSpec
+
+ // The deployment strategy to use to replace existing pods with new ones.
+ // +optional
+ Strategy DeploymentStrategy
+
+ // Minimum number of seconds for which a newly created pod should be ready
+ // without any of its container crashing, for it to be considered available.
+ // Defaults to 0 (pod will be considered available as soon as it is ready)
+ // +optional
+ MinReadySeconds int32
+
+ // The number of old ReplicaSets to retain to allow rollback.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ // +optional
+ RevisionHistoryLimit *int32
+
+ // Indicates that the deployment is paused and will not be processed by the
+ // deployment controller.
+ // +optional
+ Paused bool
+
+ // The config this deployment is rolling back to. Will be cleared after rollback is done.
+ // +optional
+ RollbackTo *RollbackConfig
+
+ // The maximum time in seconds for a deployment to make progress before it
+ // is considered to be failed. The deployment controller will continue to
+ // process failed deployments and a condition with a ProgressDeadlineExceeded
+ // reason will be surfaced in the deployment status. Once autoRollback is
+ // implemented, the deployment controller will automatically rollback failed
+ // deployments. Note that progress will not be estimated during the time a
+ // deployment is paused. This is not set by default.
+ ProgressDeadlineSeconds *int32
+}
+
+// DeploymentRollback stores the information required to rollback a deployment.
+type DeploymentRollback struct {
+ metav1.TypeMeta
+ // Required: This must match the Name of a deployment.
+ Name string
+ // The annotations to be updated to a deployment
+ // +optional
+ UpdatedAnnotations map[string]string
+ // The config of this deployment rollback.
+ RollbackTo RollbackConfig
+}
+
+type RollbackConfig struct {
+ // The revision to rollback to. If set to 0, rollback to the last revision.
+ // +optional
+ Revision int64
+}
+
+const (
+ // DefaultDeploymentUniqueLabelKey is the default key of the selector that is added
+ // to existing RCs (and label key that is added to its pods) to prevent the existing RCs
+ // to select new pods (and old pods being select by new RC).
+ DefaultDeploymentUniqueLabelKey string = "pod-template-hash"
+)
+
+type DeploymentStrategy struct {
+ // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
+ // +optional
+ Type DeploymentStrategyType
+
+ // Rolling update config params. Present only if DeploymentStrategyType =
+ // RollingUpdate.
+ //---
+ // TODO: Update this to follow our convention for oneOf, whatever we decide it
+ // to be.
+ // +optional
+ RollingUpdate *RollingUpdateDeployment
+}
+
+type DeploymentStrategyType string
+
+const (
+ // Kill all existing pods before creating new ones.
+ RecreateDeploymentStrategyType DeploymentStrategyType = "Recreate"
+
+ // Replace the old RCs by new one using rolling update i.e gradually scale down the old RCs and scale up the new one.
+ RollingUpdateDeploymentStrategyType DeploymentStrategyType = "RollingUpdate"
+)
+
+// Spec to control the desired behavior of rolling update.
+type RollingUpdateDeployment struct {
+ // The maximum number of pods that can be unavailable during the update.
+ // Value can be an absolute number (ex: 5) or a percentage of total pods at the start of update (ex: 10%).
+ // Absolute number is calculated from percentage by rounding down.
+ // This can not be 0 if MaxSurge is 0.
+ // By default, a fixed value of 1 is used.
+ // Example: when this is set to 30%, the old RC can be scaled down by 30%
+ // immediately when the rolling update starts. Once new pods are ready, old RC
+ // can be scaled down further, followed by scaling up the new RC, ensuring
+ // that at least 70% of original number of pods are available at all times
+ // during the update.
+ // +optional
+ MaxUnavailable intstr.IntOrString
+
+ // The maximum number of pods that can be scheduled above the original number of
+ // pods.
+ // Value can be an absolute number (ex: 5) or a percentage of total pods at
+ // the start of the update (ex: 10%). This can not be 0 if MaxUnavailable is 0.
+ // Absolute number is calculated from percentage by rounding up.
+ // By default, a value of 1 is used.
+ // Example: when this is set to 30%, the new RC can be scaled up by 30%
+ // immediately when the rolling update starts. Once old pods have been killed,
+ // new RC can be scaled up further, ensuring that total number of pods running
+ // at any time during the update is atmost 130% of original pods.
+ // +optional
+ MaxSurge intstr.IntOrString
+}
+
+type DeploymentStatus struct {
+ // The generation observed by the deployment controller.
+ // +optional
+ ObservedGeneration int64
+
+ // Total number of non-terminated pods targeted by this deployment (their labels match the selector).
+ // +optional
+ Replicas int32
+
+ // Total number of non-terminated pods targeted by this deployment that have the desired template spec.
+ // +optional
+ UpdatedReplicas int32
+
+ // Total number of ready pods targeted by this deployment.
+ // +optional
+ ReadyReplicas int32
+
+ // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
+ // +optional
+ AvailableReplicas int32
+
+ // Total number of unavailable pods targeted by this deployment.
+ // +optional
+ UnavailableReplicas int32
+
+ // Represents the latest available observations of a deployment's current state.
+ Conditions []DeploymentCondition
+
+ // Count of hash collisions for the Deployment. The Deployment controller uses this
+ // field as a collision avoidance mechanism when it needs to create the name for the
+ // newest ReplicaSet.
+ // +optional
+ CollisionCount *int64
+}
+
+type DeploymentConditionType string
+
+// These are valid conditions of a deployment.
+const (
+ // Available means the deployment is available, ie. at least the minimum available
+ // replicas required are up and running for at least minReadySeconds.
+ DeploymentAvailable DeploymentConditionType = "Available"
+ // Progressing means the deployment is progressing. Progress for a deployment is
+ // considered when a new replica set is created or adopted, and when new pods scale
+ // up or old pods scale down. Progress is not estimated for paused deployments or
+ // when progressDeadlineSeconds is not specified.
+ DeploymentProgressing DeploymentConditionType = "Progressing"
+ // ReplicaFailure is added in a deployment when one of its pods fails to be created
+ // or deleted.
+ DeploymentReplicaFailure DeploymentConditionType = "ReplicaFailure"
+)
+
+// DeploymentCondition describes the state of a deployment at a certain point.
+type DeploymentCondition struct {
+ // Type of deployment condition.
+ Type DeploymentConditionType
+ // Status of the condition, one of True, False, Unknown.
+ Status api.ConditionStatus
+ // The last time this condition was updated.
+ LastUpdateTime metav1.Time
+ // Last time the condition transitioned from one status to another.
+ LastTransitionTime metav1.Time
+ // The reason for the condition's last transition.
+ Reason string
+ // A human readable message indicating details about the transition.
+ Message string
+}
+
+type DeploymentList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ // Items is the list of deployments.
+ Items []Deployment
+}
+
+type DaemonSetUpdateStrategy struct {
+ // Type of daemon set update. Can be "RollingUpdate" or "OnDelete".
+ // Default is OnDelete.
+ // +optional
+ Type DaemonSetUpdateStrategyType
+
+ // Rolling update config params. Present only if type = "RollingUpdate".
+ //---
+ // TODO: Update this to follow our convention for oneOf, whatever we decide it
+ // to be. Same as Deployment `strategy.rollingUpdate`.
+ // See https://github.com/kubernetes/kubernetes/issues/35345
+ // +optional
+ RollingUpdate *RollingUpdateDaemonSet
+}
+
+type DaemonSetUpdateStrategyType string
+
+const (
+ // Replace the old daemons by new ones using rolling update i.e replace them on each node one after the other.
+ RollingUpdateDaemonSetStrategyType DaemonSetUpdateStrategyType = "RollingUpdate"
+
+ // Replace the old daemons only when it's killed
+ OnDeleteDaemonSetStrategyType DaemonSetUpdateStrategyType = "OnDelete"
+)
+
+// Spec to control the desired behavior of daemon set rolling update.
+type RollingUpdateDaemonSet struct {
+ // The maximum number of DaemonSet pods that can be unavailable during the
+ // update. Value can be an absolute number (ex: 5) or a percentage of total
+ // number of DaemonSet pods at the start of the update (ex: 10%). Absolute
+ // number is calculated from percentage by rounding up.
+ // This cannot be 0.
+ // Default value is 1.
+ // Example: when this is set to 30%, at most 30% of the total number of nodes
+ // that should be running the daemon pod (i.e. status.desiredNumberScheduled)
+ // can have their pods stopped for an update at any given
+ // time. The update starts by stopping at most 30% of those DaemonSet pods
+ // and then brings up new DaemonSet pods in their place. Once the new pods
+ // are available, it then proceeds onto other DaemonSet pods, thus ensuring
+ // that at least 70% of original number of DaemonSet pods are available at
+ // all times during the update.
+ // +optional
+ MaxUnavailable intstr.IntOrString
+}
+
+// DaemonSetSpec is the specification of a daemon set.
+type DaemonSetSpec struct {
+ // A label query over pods that are managed by the daemon set.
+ // Must match in order to be controlled.
+ // If empty, defaulted to labels on Pod template.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ Selector *metav1.LabelSelector
+
+ // An object that describes the pod that will be created.
+ // The DaemonSet will create exactly one copy of this pod on every node
+ // that matches the template's node selector (or on every node if no node
+ // selector is specified).
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
+ Template api.PodTemplateSpec
+
+ // An update strategy to replace existing DaemonSet pods with new pods.
+ // +optional
+ UpdateStrategy DaemonSetUpdateStrategy
+
+ // The minimum number of seconds for which a newly created DaemonSet pod should
+ // be ready without any of its container crashing, for it to be considered
+ // available. Defaults to 0 (pod will be considered available as soon as it
+ // is ready).
+ // +optional
+ MinReadySeconds int32
+
+ // DEPRECATED.
+ // A sequence number representing a specific generation of the template.
+ // Populated by the system. It can be set only during the creation.
+ // +optional
+ TemplateGeneration int64
+
+ // The number of old history to retain to allow rollback.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ // Defaults to 10.
+ // +optional
+ RevisionHistoryLimit *int32
+}
+
+// DaemonSetStatus represents the current status of a daemon set.
+type DaemonSetStatus struct {
+ // The number of nodes that are running at least 1
+ // daemon pod and are supposed to run the daemon pod.
+ CurrentNumberScheduled int32
+
+ // The number of nodes that are running the daemon pod, but are
+ // not supposed to run the daemon pod.
+ NumberMisscheduled int32
+
+ // The total number of nodes that should be running the daemon
+ // pod (including nodes correctly running the daemon pod).
+ DesiredNumberScheduled int32
+
+ // The number of nodes that should be running the daemon pod and have one
+ // or more of the daemon pod running and ready.
+ NumberReady int32
+
+ // The most recent generation observed by the daemon set controller.
+ // +optional
+ ObservedGeneration int64
+
+ // The total number of nodes that are running updated daemon pod
+ // +optional
+ UpdatedNumberScheduled int32
+
+ // The number of nodes that should be running the
+ // daemon pod and have one or more of the daemon pod running and
+ // available (ready for at least spec.minReadySeconds)
+ // +optional
+ NumberAvailable int32
+
+ // The number of nodes that should be running the
+ // daemon pod and have none of the daemon pod running and available
+ // (ready for at least spec.minReadySeconds)
+ // +optional
+ NumberUnavailable int32
+
+ // Count of hash collisions for the DaemonSet. The DaemonSet controller
+ // uses this field as a collision avoidance mechanism when it needs to
+ // create the name for the newest ControllerRevision.
+ // +optional
+ CollisionCount *int64
+}
+
+// +genclient=true
+
+// DaemonSet represents the configuration of a daemon set.
+type DaemonSet struct {
+ metav1.TypeMeta
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta
+
+ // The desired behavior of this daemon set.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec DaemonSetSpec
+
+ // The current status of this daemon set. This data may be
+ // out of date by some window of time.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status DaemonSetStatus
+}
+
+const (
+ // DEPRECATED: DefaultDaemonSetUniqueLabelKey is used instead.
+ // DaemonSetTemplateGenerationKey is the key of the labels that is added
+ // to daemon set pods to distinguish between old and new pod templates
+ // during DaemonSet template update.
+ DaemonSetTemplateGenerationKey string = "pod-template-generation"
+)
+
+// DaemonSetList is a collection of daemon sets.
+type DaemonSetList struct {
+ metav1.TypeMeta
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta
+
+ // A list of daemon sets.
+ Items []DaemonSet
+}
+
+type ThirdPartyResourceDataList struct {
+ metav1.TypeMeta
+ // Standard list metadata
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta
+ // Items is a list of third party objects
+ Items []ThirdPartyResourceData
+}
+
+// +genclient=true
+
+// Ingress is a collection of rules that allow inbound connections to reach the
+// endpoints defined by a backend. An Ingress can be configured to give services
+// externally-reachable urls, load balance traffic, terminate SSL, offer name
+// based virtual hosting etc.
+type Ingress struct {
+ metav1.TypeMeta
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta
+
+ // Spec is the desired state of the Ingress.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec IngressSpec
+
+ // Status is the current state of the Ingress.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status IngressStatus
+}
+
+// IngressList is a collection of Ingress.
+type IngressList struct {
+ metav1.TypeMeta
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta
+
+ // Items is the list of Ingress.
+ Items []Ingress
+}
+
+// IngressSpec describes the Ingress the user wishes to exist.
+type IngressSpec struct {
+ // A default backend capable of servicing requests that don't match any
+ // rule. At least one of 'backend' or 'rules' must be specified. This field
+ // is optional to allow the loadbalancer controller or defaulting logic to
+ // specify a global default.
+ // +optional
+ Backend *IngressBackend
+
+ // TLS configuration. Currently the Ingress only supports a single TLS
+ // port, 443. If multiple members of this list specify different hosts, they
+ // will be multiplexed on the same port according to the hostname specified
+ // through the SNI TLS extension, if the ingress controller fulfilling the
+ // ingress supports SNI.
+ // +optional
+ TLS []IngressTLS
+
+ // A list of host rules used to configure the Ingress. If unspecified, or
+ // no rule matches, all traffic is sent to the default backend.
+ // +optional
+ Rules []IngressRule
+ // TODO: Add the ability to specify load-balancer IP through claims
+}
+
+// IngressTLS describes the transport layer security associated with an Ingress.
+type IngressTLS struct {
+ // Hosts are a list of hosts included in the TLS certificate. The values in
+ // this list must match the name/s used in the tlsSecret. Defaults to the
+ // wildcard host setting for the loadbalancer controller fulfilling this
+ // Ingress, if left unspecified.
+ // +optional
+ Hosts []string
+ // SecretName is the name of the secret used to terminate SSL traffic on 443.
+ // Field is left optional to allow SSL routing based on SNI hostname alone.
+ // If the SNI host in a listener conflicts with the "Host" header field used
+ // by an IngressRule, the SNI host is used for termination and value of the
+ // Host header is used for routing.
+ // +optional
+ SecretName string
+ // TODO: Consider specifying different modes of termination, protocols etc.
+}
+
+// IngressStatus describe the current state of the Ingress.
+type IngressStatus struct {
+ // LoadBalancer contains the current status of the load-balancer.
+ // +optional
+ LoadBalancer api.LoadBalancerStatus
+}
+
+// IngressRule represents the rules mapping the paths under a specified host to
+// the related backend services. Incoming requests are first evaluated for a host
+// match, then routed to the backend associated with the matching IngressRuleValue.
+type IngressRule struct {
+ // Host is the fully qualified domain name of a network host, as defined
+ // by RFC 3986. Note the following deviations from the "host" part of the
+ // URI as defined in the RFC:
+ // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the
+ // IP in the Spec of the parent Ingress.
+ // 2. The `:` delimiter is not respected because ports are not allowed.
+ // Currently the port of an Ingress is implicitly :80 for http and
+ // :443 for https.
+ // Both these may change in the future.
+ // Incoming requests are matched against the host before the IngressRuleValue.
+ // If the host is unspecified, the Ingress routes all traffic based on the
+ // specified IngressRuleValue.
+ // +optional
+ Host string
+ // IngressRuleValue represents a rule to route requests for this IngressRule.
+ // If unspecified, the rule defaults to a http catch-all. Whether that sends
+ // just traffic matching the host to the default backend or all traffic to the
+ // default backend, is left to the controller fulfilling the Ingress. Http is
+ // currently the only supported IngressRuleValue.
+ // +optional
+ IngressRuleValue
+}
+
+// IngressRuleValue represents a rule to apply against incoming requests. If the
+// rule is satisfied, the request is routed to the specified backend. Currently
+// mixing different types of rules in a single Ingress is disallowed, so exactly
+// one of the following must be set.
+type IngressRuleValue struct {
+ //TODO:
+ // 1. Consider renaming this resource and the associated rules so they
+ // aren't tied to Ingress. They can be used to route intra-cluster traffic.
+ // 2. Consider adding fields for ingress-type specific global options
+ // usable by a loadbalancer, like http keep-alive.
+
+ // +optional
+ HTTP *HTTPIngressRuleValue
+}
+
+// HTTPIngressRuleValue is a list of http selectors pointing to backends.
+// In the example: http://<host>/<path>?<searchpart> -> backend where
+// where parts of the url correspond to RFC 3986, this resource will be used
+// to match against everything after the last '/' and before the first '?'
+// or '#'.
+type HTTPIngressRuleValue struct {
+ // A collection of paths that map requests to backends.
+ Paths []HTTPIngressPath
+ // TODO: Consider adding fields for ingress-type specific global
+ // options usable by a loadbalancer, like http keep-alive.
+}
+
+// HTTPIngressPath associates a path regex with a backend. Incoming urls matching
+// the path are forwarded to the backend.
+type HTTPIngressPath struct {
+ // Path is an extended POSIX regex as defined by IEEE Std 1003.1,
+ // (i.e this follows the egrep/unix syntax, not the perl syntax)
+ // matched against the path of an incoming request. Currently it can
+ // contain characters disallowed from the conventional "path"
+ // part of a URL as defined by RFC 3986. Paths must begin with
+ // a '/'. If unspecified, the path defaults to a catch all sending
+ // traffic to the backend.
+ // +optional
+ Path string
+
+ // Backend defines the referenced service endpoint to which the traffic
+ // will be forwarded to.
+ Backend IngressBackend
+}
+
+// IngressBackend describes all endpoints for a given service and port.
+type IngressBackend struct {
+ // Specifies the name of the referenced service.
+ ServiceName string
+
+ // Specifies the port of the referenced service.
+ ServicePort intstr.IntOrString
+}
+
+// +genclient=true
+
+// ReplicaSet represents the configuration of a replica set.
+type ReplicaSet struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Spec defines the desired behavior of this ReplicaSet.
+ // +optional
+ Spec ReplicaSetSpec
+
+ // Status is the current status of this ReplicaSet. This data may be
+ // out of date by some window of time.
+ // +optional
+ Status ReplicaSetStatus
+}
+
+// ReplicaSetList is a collection of ReplicaSets.
+type ReplicaSetList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []ReplicaSet
+}
+
+// ReplicaSetSpec is the specification of a ReplicaSet.
+// As the internal representation of a ReplicaSet, it must have
+// a Template set.
+type ReplicaSetSpec struct {
+ // Replicas is the number of desired replicas.
+ Replicas int32
+
+ // Minimum number of seconds for which a newly created pod should be ready
+ // without any of its container crashing, for it to be considered available.
+ // Defaults to 0 (pod will be considered available as soon as it is ready)
+ // +optional
+ MinReadySeconds int32
+
+ // Selector is a label query over pods that should match the replica count.
+ // Must match in order to be controlled.
+ // If empty, defaulted to labels on pod template.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ Selector *metav1.LabelSelector
+
+ // Template is the object that describes the pod that will be created if
+ // insufficient replicas are detected.
+ // +optional
+ Template api.PodTemplateSpec
+}
+
+// ReplicaSetStatus represents the current status of a ReplicaSet.
+type ReplicaSetStatus struct {
+ // Replicas is the number of actual replicas.
+ Replicas int32
+
+ // The number of pods that have labels matching the labels of the pod template of the replicaset.
+ // +optional
+ FullyLabeledReplicas int32
+
+ // The number of ready replicas for this replica set.
+ // +optional
+ ReadyReplicas int32
+
+ // The number of available replicas (ready for at least minReadySeconds) for this replica set.
+ // +optional
+ AvailableReplicas int32
+
+ // ObservedGeneration is the most recent generation observed by the controller.
+ // +optional
+ ObservedGeneration int64
+
+ // Represents the latest available observations of a replica set's current state.
+ // +optional
+ Conditions []ReplicaSetCondition
+}
+
+type ReplicaSetConditionType string
+
+// These are valid conditions of a replica set.
+const (
+ // ReplicaSetReplicaFailure is added in a replica set when one of its pods fails to be created
+ // due to insufficient quota, limit ranges, pod security policy, node selectors, etc. or deleted
+ // due to kubelet being down or finalizers are failing.
+ ReplicaSetReplicaFailure ReplicaSetConditionType = "ReplicaFailure"
+)
+
+// ReplicaSetCondition describes the state of a replica set at a certain point.
+type ReplicaSetCondition struct {
+ // Type of replica set condition.
+ Type ReplicaSetConditionType
+ // Status of the condition, one of True, False, Unknown.
+ Status api.ConditionStatus
+ // The last time the condition transitioned from one status to another.
+ // +optional
+ LastTransitionTime metav1.Time
+ // The reason for the condition's last transition.
+ // +optional
+ Reason string
+ // A human readable message indicating details about the transition.
+ // +optional
+ Message string
+}
+
+// +genclient=true
+// +nonNamespaced=true
+
+// PodSecurityPolicy governs the ability to make requests that affect the SecurityContext
+// that will be applied to a pod and container.
+type PodSecurityPolicy struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Spec defines the policy enforced.
+ // +optional
+ Spec PodSecurityPolicySpec
+}
+
+// PodSecurityPolicySpec defines the policy enforced.
+type PodSecurityPolicySpec struct {
+ // Privileged determines if a pod can request to be run as privileged.
+ // +optional
+ Privileged bool
+ // DefaultAddCapabilities is the default set of capabilities that will be added to the container
+ // unless the pod spec specifically drops the capability. You may not list a capability in both
+ // DefaultAddCapabilities and RequiredDropCapabilities.
+ // +optional
+ DefaultAddCapabilities []api.Capability
+ // RequiredDropCapabilities are the capabilities that will be dropped from the container. These
+ // are required to be dropped and cannot be added.
+ // +optional
+ RequiredDropCapabilities []api.Capability
+ // AllowedCapabilities is a list of capabilities that can be requested to add to the container.
+ // Capabilities in this field may be added at the pod author's discretion.
+ // You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities.
+ // +optional
+ AllowedCapabilities []api.Capability
+ // Volumes is a white list of allowed volume plugins. Empty indicates that all plugins
+ // may be used.
+ // +optional
+ Volumes []FSType
+ // HostNetwork determines if the policy allows the use of HostNetwork in the pod spec.
+ // +optional
+ HostNetwork bool
+ // HostPorts determines which host port ranges are allowed to be exposed.
+ // +optional
+ HostPorts []HostPortRange
+ // HostPID determines if the policy allows the use of HostPID in the pod spec.
+ // +optional
+ HostPID bool
+ // HostIPC determines if the policy allows the use of HostIPC in the pod spec.
+ // +optional
+ HostIPC bool
+ // SELinux is the strategy that will dictate the allowable labels that may be set.
+ SELinux SELinuxStrategyOptions
+ // RunAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.
+ RunAsUser RunAsUserStrategyOptions
+ // SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.
+ SupplementalGroups SupplementalGroupsStrategyOptions
+ // FSGroup is the strategy that will dictate what fs group is used by the SecurityContext.
+ FSGroup FSGroupStrategyOptions
+ // ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file
+ // system. If the container specifically requests to run with a non-read only root file system
+ // the PSP should deny the pod.
+ // If set to false the container may run with a read only root file system if it wishes but it
+ // will not be forced to.
+ // +optional
+ ReadOnlyRootFilesystem bool
+}
+
+// HostPortRange defines a range of host ports that will be enabled by a policy
+// for pods to use. It requires both the start and end to be defined.
+type HostPortRange struct {
+ // Min is the start of the range, inclusive.
+ Min int
+ // Max is the end of the range, inclusive.
+ Max int
+}
+
+// FSType gives strong typing to different file systems that are used by volumes.
+type FSType string
+
+var (
+ AzureFile FSType = "azureFile"
+ Flocker FSType = "flocker"
+ FlexVolume FSType = "flexVolume"
+ HostPath FSType = "hostPath"
+ EmptyDir FSType = "emptyDir"
+ GCEPersistentDisk FSType = "gcePersistentDisk"
+ AWSElasticBlockStore FSType = "awsElasticBlockStore"
+ GitRepo FSType = "gitRepo"
+ Secret FSType = "secret"
+ NFS FSType = "nfs"
+ ISCSI FSType = "iscsi"
+ Glusterfs FSType = "glusterfs"
+ PersistentVolumeClaim FSType = "persistentVolumeClaim"
+ RBD FSType = "rbd"
+ Cinder FSType = "cinder"
+ CephFS FSType = "cephFS"
+ DownwardAPI FSType = "downwardAPI"
+ FC FSType = "fc"
+ ConfigMap FSType = "configMap"
+ VsphereVolume FSType = "vsphereVolume"
+ Quobyte FSType = "quobyte"
+ AzureDisk FSType = "azureDisk"
+ PhotonPersistentDisk FSType = "photonPersistentDisk"
+ StorageOS FSType = "storageos"
+ Projected FSType = "projected"
+ PortworxVolume FSType = "portworxVolume"
+ ScaleIO FSType = "scaleIO"
+ All FSType = "*"
+)
+
+// SELinuxStrategyOptions defines the strategy type and any options used to create the strategy.
+type SELinuxStrategyOptions struct {
+ // Rule is the strategy that will dictate the allowable labels that may be set.
+ Rule SELinuxStrategy
+ // seLinuxOptions required to run as; required for MustRunAs
+ // More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md
+ // +optional
+ SELinuxOptions *api.SELinuxOptions
+}
+
+// SELinuxStrategy denotes strategy types for generating SELinux options for a
+// Security.
+type SELinuxStrategy string
+
+const (
+ // container must have SELinux labels of X applied.
+ SELinuxStrategyMustRunAs SELinuxStrategy = "MustRunAs"
+ // container may make requests for any SELinux context labels.
+ SELinuxStrategyRunAsAny SELinuxStrategy = "RunAsAny"
+)
+
+// RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy.
+type RunAsUserStrategyOptions struct {
+ // Rule is the strategy that will dictate the allowable RunAsUser values that may be set.
+ Rule RunAsUserStrategy
+ // Ranges are the allowed ranges of uids that may be used.
+ // +optional
+ Ranges []UserIDRange
+}
+
+// UserIDRange provides a min/max of an allowed range of UserIDs.
+type UserIDRange struct {
+ // Min is the start of the range, inclusive.
+ Min int64
+ // Max is the end of the range, inclusive.
+ Max int64
+}
+
+// GroupIDRange provides a min/max of an allowed range of GroupIDs.
+type GroupIDRange struct {
+ // Min is the start of the range, inclusive.
+ Min int64
+ // Max is the end of the range, inclusive.
+ Max int64
+}
+
+// RunAsUserStrategy denotes strategy types for generating RunAsUser values for a
+// SecurityContext.
+type RunAsUserStrategy string
+
+const (
+ // container must run as a particular uid.
+ RunAsUserStrategyMustRunAs RunAsUserStrategy = "MustRunAs"
+ // container must run as a non-root uid
+ RunAsUserStrategyMustRunAsNonRoot RunAsUserStrategy = "MustRunAsNonRoot"
+ // container may make requests for any uid.
+ RunAsUserStrategyRunAsAny RunAsUserStrategy = "RunAsAny"
+)
+
+// FSGroupStrategyOptions defines the strategy type and options used to create the strategy.
+type FSGroupStrategyOptions struct {
+ // Rule is the strategy that will dictate what FSGroup is used in the SecurityContext.
+ // +optional
+ Rule FSGroupStrategyType
+ // Ranges are the allowed ranges of fs groups. If you would like to force a single
+ // fs group then supply a single range with the same start and end.
+ // +optional
+ Ranges []GroupIDRange
+}
+
+// FSGroupStrategyType denotes strategy types for generating FSGroup values for a
+// SecurityContext
+type FSGroupStrategyType string
+
+const (
+ // container must have FSGroup of X applied.
+ FSGroupStrategyMustRunAs FSGroupStrategyType = "MustRunAs"
+ // container may make requests for any FSGroup labels.
+ FSGroupStrategyRunAsAny FSGroupStrategyType = "RunAsAny"
+)
+
+// SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.
+type SupplementalGroupsStrategyOptions struct {
+ // Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.
+ // +optional
+ Rule SupplementalGroupsStrategyType
+ // Ranges are the allowed ranges of supplemental groups. If you would like to force a single
+ // supplemental group then supply a single range with the same start and end.
+ // +optional
+ Ranges []GroupIDRange
+}
+
+// SupplementalGroupsStrategyType denotes strategy types for determining valid supplemental
+// groups for a SecurityContext.
+type SupplementalGroupsStrategyType string
+
+const (
+ // container must run as a particular gid.
+ SupplementalGroupsStrategyMustRunAs SupplementalGroupsStrategyType = "MustRunAs"
+ // container may make requests for any gid.
+ SupplementalGroupsStrategyRunAsAny SupplementalGroupsStrategyType = "RunAsAny"
+)
+
+// PodSecurityPolicyList is a list of PodSecurityPolicy objects.
+type PodSecurityPolicyList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []PodSecurityPolicy
+}
+
+// +genclient=true
+
+// NetworkPolicy describes what network traffic is allowed for a set of Pods
+type NetworkPolicy struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Specification of the desired behavior for this NetworkPolicy.
+ // +optional
+ Spec NetworkPolicySpec
+}
+
+type NetworkPolicySpec struct {
+ // Selects the pods to which this NetworkPolicy object applies. The array of ingress rules
+ // is applied to any pods selected by this field. Multiple network policies can select the
+ // same set of pods. In this case, the ingress rules for each are combined additively.
+ // This field is NOT optional and follows standard label selector semantics.
+ // An empty podSelector matches all pods in this namespace.
+ PodSelector metav1.LabelSelector
+
+ // List of ingress rules to be applied to the selected pods.
+ // Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod
+ // OR if the traffic source is the pod's local node,
+ // OR if the traffic matches at least one ingress rule across all of the NetworkPolicy
+ // objects whose podSelector matches the pod.
+ // If this field is empty then this NetworkPolicy does not allow any traffic
+ // (and serves solely to ensure that the pods it selects are isolated by default).
+ // +optional
+ Ingress []NetworkPolicyIngressRule
+}
+
+// This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.
+type NetworkPolicyIngressRule struct {
+ // List of ports which should be made accessible on the pods selected for this rule.
+ // Each item in this list is combined using a logical OR.
+ // If this field is empty or missing, this rule matches all ports (traffic not restricted by port).
+ // If this field is present and contains at least one item, then this rule allows traffic
+ // only if the traffic matches at least one port in the list.
+ // +optional
+ Ports []NetworkPolicyPort
+
+ // List of sources which should be able to access the pods selected for this rule.
+ // Items in this list are combined using a logical OR operation.
+ // If this field is empty or missing, this rule matches all sources (traffic not restricted by source).
+ // If this field is present and contains at least on item, this rule allows traffic only if the
+ // traffic matches at least one item in the from list.
+ // +optional
+ From []NetworkPolicyPeer
+}
+
+type NetworkPolicyPort struct {
+ // Optional. The protocol (TCP or UDP) which traffic must match.
+ // If not specified, this field defaults to TCP.
+ // +optional
+ Protocol *api.Protocol
+
+ // If specified, the port on the given protocol. This can
+ // either be a numerical or named port on a pod. If this field is not provided,
+ // this matches all port names and numbers.
+ // If present, only traffic on the specified protocol AND port
+ // will be matched.
+ // +optional
+ Port *intstr.IntOrString
+}
+
+type NetworkPolicyPeer struct {
+ // Exactly one of the following must be specified.
+
+ // This is a label selector which selects Pods in this namespace.
+ // This field follows standard label selector semantics.
+ // If present but empty, this selector selects all pods in this namespace.
+ // +optional
+ PodSelector *metav1.LabelSelector
+
+ // Selects Namespaces using cluster scoped-labels. This
+ // matches all pods in all namespaces selected by this label selector.
+ // This field follows standard label selector semantics.
+ // If present but empty, this selector selects all namespaces.
+ // +optional
+ NamespaceSelector *metav1.LabelSelector
+}
+
+// NetworkPolicyList is a list of NetworkPolicy objects.
+type NetworkPolicyList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []NetworkPolicy
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion.go
new file mode 100644
index 000000000..afbe42f67
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/conversion.go
@@ -0,0 +1,428 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "fmt"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/conversion"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/intstr"
+ "k8s.io/kubernetes/pkg/api"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/apis/extensions"
+ "k8s.io/kubernetes/pkg/apis/networking"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) error {
+ // Add non-generated conversion functions
+ err := scheme.AddConversionFuncs(
+ Convert_extensions_ScaleStatus_To_v1beta1_ScaleStatus,
+ Convert_v1beta1_ScaleStatus_To_extensions_ScaleStatus,
+ Convert_extensions_DeploymentSpec_To_v1beta1_DeploymentSpec,
+ Convert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec,
+ Convert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy,
+ Convert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy,
+ Convert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDeployment,
+ Convert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDeployment,
+ Convert_extensions_RollingUpdateDaemonSet_To_v1beta1_RollingUpdateDaemonSet,
+ Convert_v1beta1_RollingUpdateDaemonSet_To_extensions_RollingUpdateDaemonSet,
+ Convert_extensions_ReplicaSetSpec_To_v1beta1_ReplicaSetSpec,
+ Convert_v1beta1_ReplicaSetSpec_To_extensions_ReplicaSetSpec,
+ Convert_v1beta1_NetworkPolicy_To_networking_NetworkPolicy,
+ Convert_networking_NetworkPolicy_To_v1beta1_NetworkPolicy,
+ Convert_v1beta1_NetworkPolicyIngressRule_To_networking_NetworkPolicyIngressRule,
+ Convert_networking_NetworkPolicyIngressRule_To_v1beta1_NetworkPolicyIngressRule,
+ Convert_v1beta1_NetworkPolicyList_To_networking_NetworkPolicyList,
+ Convert_networking_NetworkPolicyList_To_v1beta1_NetworkPolicyList,
+ Convert_v1beta1_NetworkPolicyPeer_To_networking_NetworkPolicyPeer,
+ Convert_networking_NetworkPolicyPeer_To_v1beta1_NetworkPolicyPeer,
+ Convert_v1beta1_NetworkPolicyPort_To_networking_NetworkPolicyPort,
+ Convert_networking_NetworkPolicyPort_To_v1beta1_NetworkPolicyPort,
+ Convert_v1beta1_NetworkPolicySpec_To_networking_NetworkPolicySpec,
+ Convert_networking_NetworkPolicySpec_To_v1beta1_NetworkPolicySpec,
+ )
+ if err != nil {
+ return err
+ }
+
+ // Add field label conversions for kinds having selectable nothing but ObjectMeta fields.
+ for _, k := range []string{"DaemonSet", "Deployment", "Ingress"} {
+ kind := k // don't close over range variables
+ err = scheme.AddFieldLabelConversionFunc("extensions/v1beta1", kind,
+ func(label, value string) (string, string, error) {
+ switch label {
+ case "metadata.name", "metadata.namespace":
+ return label, value, nil
+ default:
+ return "", "", fmt.Errorf("field label %q not supported for %q", label, kind)
+ }
+ },
+ )
+ if err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func Convert_extensions_ScaleStatus_To_v1beta1_ScaleStatus(in *extensions.ScaleStatus, out *ScaleStatus, s conversion.Scope) error {
+ out.Replicas = int32(in.Replicas)
+
+ out.Selector = nil
+ out.TargetSelector = ""
+ if in.Selector != nil {
+ if in.Selector.MatchExpressions == nil || len(in.Selector.MatchExpressions) == 0 {
+ out.Selector = in.Selector.MatchLabels
+ }
+
+ selector, err := metav1.LabelSelectorAsSelector(in.Selector)
+ if err != nil {
+ return fmt.Errorf("invalid label selector: %v", err)
+ }
+ out.TargetSelector = selector.String()
+ }
+ return nil
+}
+
+func Convert_v1beta1_ScaleStatus_To_extensions_ScaleStatus(in *ScaleStatus, out *extensions.ScaleStatus, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+
+ // Normally when 2 fields map to the same internal value we favor the old field, since
+ // old clients can't be expected to know about new fields but clients that know about the
+ // new field can be expected to know about the old field (though that's not quite true, due
+ // to kubectl apply). However, these fields are readonly, so any non-nil value should work.
+ if in.TargetSelector != "" {
+ labelSelector, err := metav1.ParseToLabelSelector(in.TargetSelector)
+ if err != nil {
+ out.Selector = nil
+ return fmt.Errorf("failed to parse target selector: %v", err)
+ }
+ out.Selector = labelSelector
+ } else if in.Selector != nil {
+ out.Selector = new(metav1.LabelSelector)
+ selector := make(map[string]string)
+ for key, val := range in.Selector {
+ selector[key] = val
+ }
+ out.Selector.MatchLabels = selector
+ } else {
+ out.Selector = nil
+ }
+ return nil
+}
+
+func Convert_extensions_DeploymentSpec_To_v1beta1_DeploymentSpec(in *extensions.DeploymentSpec, out *DeploymentSpec, s conversion.Scope) error {
+ out.Replicas = &in.Replicas
+ out.Selector = in.Selector
+ if err := v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ if err := Convert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy(&in.Strategy, &out.Strategy, s); err != nil {
+ return err
+ }
+ if in.RevisionHistoryLimit != nil {
+ out.RevisionHistoryLimit = new(int32)
+ *out.RevisionHistoryLimit = int32(*in.RevisionHistoryLimit)
+ }
+ out.MinReadySeconds = int32(in.MinReadySeconds)
+ out.Paused = in.Paused
+ if in.RollbackTo != nil {
+ out.RollbackTo = new(RollbackConfig)
+ out.RollbackTo.Revision = int64(in.RollbackTo.Revision)
+ } else {
+ out.RollbackTo = nil
+ }
+ if in.ProgressDeadlineSeconds != nil {
+ out.ProgressDeadlineSeconds = new(int32)
+ *out.ProgressDeadlineSeconds = *in.ProgressDeadlineSeconds
+ }
+ return nil
+}
+
+func Convert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec(in *DeploymentSpec, out *extensions.DeploymentSpec, s conversion.Scope) error {
+ if in.Replicas != nil {
+ out.Replicas = *in.Replicas
+ }
+ out.Selector = in.Selector
+ if err := v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy(&in.Strategy, &out.Strategy, s); err != nil {
+ return err
+ }
+ out.RevisionHistoryLimit = in.RevisionHistoryLimit
+ out.MinReadySeconds = in.MinReadySeconds
+ out.Paused = in.Paused
+ if in.RollbackTo != nil {
+ out.RollbackTo = new(extensions.RollbackConfig)
+ out.RollbackTo.Revision = in.RollbackTo.Revision
+ } else {
+ out.RollbackTo = nil
+ }
+ if in.ProgressDeadlineSeconds != nil {
+ out.ProgressDeadlineSeconds = new(int32)
+ *out.ProgressDeadlineSeconds = *in.ProgressDeadlineSeconds
+ }
+ return nil
+}
+
+func Convert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy(in *extensions.DeploymentStrategy, out *DeploymentStrategy, s conversion.Scope) error {
+ out.Type = DeploymentStrategyType(in.Type)
+ if in.RollingUpdate != nil {
+ out.RollingUpdate = new(RollingUpdateDeployment)
+ if err := Convert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDeployment(in.RollingUpdate, out.RollingUpdate, s); err != nil {
+ return err
+ }
+ } else {
+ out.RollingUpdate = nil
+ }
+ return nil
+}
+
+func Convert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy(in *DeploymentStrategy, out *extensions.DeploymentStrategy, s conversion.Scope) error {
+ out.Type = extensions.DeploymentStrategyType(in.Type)
+ if in.RollingUpdate != nil {
+ out.RollingUpdate = new(extensions.RollingUpdateDeployment)
+ if err := Convert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDeployment(in.RollingUpdate, out.RollingUpdate, s); err != nil {
+ return err
+ }
+ } else {
+ out.RollingUpdate = nil
+ }
+ return nil
+}
+
+func Convert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDeployment(in *extensions.RollingUpdateDeployment, out *RollingUpdateDeployment, s conversion.Scope) error {
+ if out.MaxUnavailable == nil {
+ out.MaxUnavailable = &intstr.IntOrString{}
+ }
+ if err := s.Convert(&in.MaxUnavailable, out.MaxUnavailable, 0); err != nil {
+ return err
+ }
+ if out.MaxSurge == nil {
+ out.MaxSurge = &intstr.IntOrString{}
+ }
+ if err := s.Convert(&in.MaxSurge, out.MaxSurge, 0); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDeployment(in *RollingUpdateDeployment, out *extensions.RollingUpdateDeployment, s conversion.Scope) error {
+ if err := s.Convert(in.MaxUnavailable, &out.MaxUnavailable, 0); err != nil {
+ return err
+ }
+ if err := s.Convert(in.MaxSurge, &out.MaxSurge, 0); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_extensions_RollingUpdateDaemonSet_To_v1beta1_RollingUpdateDaemonSet(in *extensions.RollingUpdateDaemonSet, out *RollingUpdateDaemonSet, s conversion.Scope) error {
+ if out.MaxUnavailable == nil {
+ out.MaxUnavailable = &intstr.IntOrString{}
+ }
+ if err := s.Convert(&in.MaxUnavailable, out.MaxUnavailable, 0); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1beta1_RollingUpdateDaemonSet_To_extensions_RollingUpdateDaemonSet(in *RollingUpdateDaemonSet, out *extensions.RollingUpdateDaemonSet, s conversion.Scope) error {
+ if err := s.Convert(in.MaxUnavailable, &out.MaxUnavailable, 0); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_extensions_ReplicaSetSpec_To_v1beta1_ReplicaSetSpec(in *extensions.ReplicaSetSpec, out *ReplicaSetSpec, s conversion.Scope) error {
+ out.Replicas = new(int32)
+ *out.Replicas = int32(in.Replicas)
+ out.MinReadySeconds = in.MinReadySeconds
+ out.Selector = in.Selector
+ if err := v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1beta1_ReplicaSetSpec_To_extensions_ReplicaSetSpec(in *ReplicaSetSpec, out *extensions.ReplicaSetSpec, s conversion.Scope) error {
+ if in.Replicas != nil {
+ out.Replicas = *in.Replicas
+ }
+ out.MinReadySeconds = in.MinReadySeconds
+ out.Selector = in.Selector
+ if err := v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func Convert_v1beta1_NetworkPolicy_To_networking_NetworkPolicy(in *NetworkPolicy, out *networking.NetworkPolicy, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ return Convert_v1beta1_NetworkPolicySpec_To_networking_NetworkPolicySpec(&in.Spec, &out.Spec, s)
+}
+
+func Convert_networking_NetworkPolicy_To_v1beta1_NetworkPolicy(in *networking.NetworkPolicy, out *NetworkPolicy, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ return Convert_networking_NetworkPolicySpec_To_v1beta1_NetworkPolicySpec(&in.Spec, &out.Spec, s)
+}
+
+func Convert_v1beta1_NetworkPolicySpec_To_networking_NetworkPolicySpec(in *NetworkPolicySpec, out *networking.NetworkPolicySpec, s conversion.Scope) error {
+ if err := s.Convert(&in.PodSelector, &out.PodSelector, 0); err != nil {
+ return err
+ }
+ out.Ingress = make([]networking.NetworkPolicyIngressRule, len(in.Ingress))
+ for i := range in.Ingress {
+ if err := Convert_v1beta1_NetworkPolicyIngressRule_To_networking_NetworkPolicyIngressRule(&in.Ingress[i], &out.Ingress[i], s); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func Convert_networking_NetworkPolicySpec_To_v1beta1_NetworkPolicySpec(in *networking.NetworkPolicySpec, out *NetworkPolicySpec, s conversion.Scope) error {
+ if err := s.Convert(&in.PodSelector, &out.PodSelector, 0); err != nil {
+ return err
+ }
+ out.Ingress = make([]NetworkPolicyIngressRule, len(in.Ingress))
+ for i := range in.Ingress {
+ if err := Convert_networking_NetworkPolicyIngressRule_To_v1beta1_NetworkPolicyIngressRule(&in.Ingress[i], &out.Ingress[i], s); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func Convert_v1beta1_NetworkPolicyIngressRule_To_networking_NetworkPolicyIngressRule(in *NetworkPolicyIngressRule, out *networking.NetworkPolicyIngressRule, s conversion.Scope) error {
+ out.Ports = make([]networking.NetworkPolicyPort, len(in.Ports))
+ for i := range in.Ports {
+ if err := Convert_v1beta1_NetworkPolicyPort_To_networking_NetworkPolicyPort(&in.Ports[i], &out.Ports[i], s); err != nil {
+ return err
+ }
+ }
+ out.From = make([]networking.NetworkPolicyPeer, len(in.From))
+ for i := range in.From {
+ if err := Convert_v1beta1_NetworkPolicyPeer_To_networking_NetworkPolicyPeer(&in.From[i], &out.From[i], s); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func Convert_networking_NetworkPolicyIngressRule_To_v1beta1_NetworkPolicyIngressRule(in *networking.NetworkPolicyIngressRule, out *NetworkPolicyIngressRule, s conversion.Scope) error {
+ out.Ports = make([]NetworkPolicyPort, len(in.Ports))
+ for i := range in.Ports {
+ if err := Convert_networking_NetworkPolicyPort_To_v1beta1_NetworkPolicyPort(&in.Ports[i], &out.Ports[i], s); err != nil {
+ return err
+ }
+ }
+ out.From = make([]NetworkPolicyPeer, len(in.From))
+ for i := range in.From {
+ if err := Convert_networking_NetworkPolicyPeer_To_v1beta1_NetworkPolicyPeer(&in.From[i], &out.From[i], s); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func Convert_v1beta1_NetworkPolicyPeer_To_networking_NetworkPolicyPeer(in *NetworkPolicyPeer, out *networking.NetworkPolicyPeer, s conversion.Scope) error {
+ if in.PodSelector != nil {
+ out.PodSelector = new(metav1.LabelSelector)
+ if err := s.Convert(in.PodSelector, out.PodSelector, 0); err != nil {
+ return err
+ }
+ } else {
+ out.PodSelector = nil
+ }
+ if in.NamespaceSelector != nil {
+ out.NamespaceSelector = new(metav1.LabelSelector)
+ if err := s.Convert(in.NamespaceSelector, out.NamespaceSelector, 0); err != nil {
+ return err
+ }
+ } else {
+ out.NamespaceSelector = nil
+ }
+ return nil
+}
+
+func Convert_networking_NetworkPolicyPeer_To_v1beta1_NetworkPolicyPeer(in *networking.NetworkPolicyPeer, out *NetworkPolicyPeer, s conversion.Scope) error {
+ if in.PodSelector != nil {
+ out.PodSelector = new(metav1.LabelSelector)
+ if err := s.Convert(in.PodSelector, out.PodSelector, 0); err != nil {
+ return err
+ }
+ } else {
+ out.PodSelector = nil
+ }
+ if in.NamespaceSelector != nil {
+ out.NamespaceSelector = new(metav1.LabelSelector)
+ if err := s.Convert(in.NamespaceSelector, out.NamespaceSelector, 0); err != nil {
+ return err
+ }
+ } else {
+ out.NamespaceSelector = nil
+ }
+ return nil
+}
+
+func Convert_v1beta1_NetworkPolicyPort_To_networking_NetworkPolicyPort(in *NetworkPolicyPort, out *networking.NetworkPolicyPort, s conversion.Scope) error {
+ if in.Protocol != nil {
+ out.Protocol = new(api.Protocol)
+ *out.Protocol = api.Protocol(*in.Protocol)
+ } else {
+ out.Protocol = nil
+ }
+ out.Port = in.Port
+ return nil
+}
+
+func Convert_networking_NetworkPolicyPort_To_v1beta1_NetworkPolicyPort(in *networking.NetworkPolicyPort, out *NetworkPolicyPort, s conversion.Scope) error {
+ if in.Protocol != nil {
+ out.Protocol = new(v1.Protocol)
+ *out.Protocol = v1.Protocol(*in.Protocol)
+ } else {
+ out.Protocol = nil
+ }
+ out.Port = in.Port
+ return nil
+}
+
+func Convert_v1beta1_NetworkPolicyList_To_networking_NetworkPolicyList(in *NetworkPolicyList, out *networking.NetworkPolicyList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = make([]networking.NetworkPolicy, len(in.Items))
+ for i := range in.Items {
+ if err := Convert_v1beta1_NetworkPolicy_To_networking_NetworkPolicy(&in.Items[i], &out.Items[i], s); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func Convert_networking_NetworkPolicyList_To_v1beta1_NetworkPolicyList(in *networking.NetworkPolicyList, out *NetworkPolicyList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = make([]NetworkPolicy, len(in.Items))
+ for i := range in.Items {
+ if err := Convert_networking_NetworkPolicy_To_v1beta1_NetworkPolicy(&in.Items[i], &out.Items[i], s); err != nil {
+ return err
+ }
+ }
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/defaults.go
new file mode 100644
index 000000000..083db1238
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/defaults.go
@@ -0,0 +1,135 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/intstr"
+ "k8s.io/kubernetes/pkg/api/v1"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
+
+func SetDefaults_DaemonSet(obj *DaemonSet) {
+ labels := obj.Spec.Template.Labels
+
+ // TODO: support templates defined elsewhere when we support them in the API
+ if labels != nil {
+ if obj.Spec.Selector == nil {
+ obj.Spec.Selector = &metav1.LabelSelector{
+ MatchLabels: labels,
+ }
+ }
+ if len(obj.Labels) == 0 {
+ obj.Labels = labels
+ }
+ }
+ updateStrategy := &obj.Spec.UpdateStrategy
+ if updateStrategy.Type == "" {
+ updateStrategy.Type = OnDeleteDaemonSetStrategyType
+ }
+ if updateStrategy.Type == RollingUpdateDaemonSetStrategyType {
+ if updateStrategy.RollingUpdate == nil {
+ rollingUpdate := RollingUpdateDaemonSet{}
+ updateStrategy.RollingUpdate = &rollingUpdate
+ }
+ if updateStrategy.RollingUpdate.MaxUnavailable == nil {
+ // Set default MaxUnavailable as 1 by default.
+ maxUnavailable := intstr.FromInt(1)
+ updateStrategy.RollingUpdate.MaxUnavailable = &maxUnavailable
+ }
+ }
+ if obj.Spec.RevisionHistoryLimit == nil {
+ obj.Spec.RevisionHistoryLimit = new(int32)
+ *obj.Spec.RevisionHistoryLimit = 10
+ }
+}
+
+func SetDefaults_Deployment(obj *Deployment) {
+ // Default labels and selector to labels from pod template spec.
+ labels := obj.Spec.Template.Labels
+
+ if labels != nil {
+ if obj.Spec.Selector == nil {
+ obj.Spec.Selector = &metav1.LabelSelector{MatchLabels: labels}
+ }
+ if len(obj.Labels) == 0 {
+ obj.Labels = labels
+ }
+ }
+ // Set DeploymentSpec.Replicas to 1 if it is not set.
+ if obj.Spec.Replicas == nil {
+ obj.Spec.Replicas = new(int32)
+ *obj.Spec.Replicas = 1
+ }
+ strategy := &obj.Spec.Strategy
+ // Set default DeploymentStrategyType as RollingUpdate.
+ if strategy.Type == "" {
+ strategy.Type = RollingUpdateDeploymentStrategyType
+ }
+ if strategy.Type == RollingUpdateDeploymentStrategyType || strategy.RollingUpdate != nil {
+ if strategy.RollingUpdate == nil {
+ rollingUpdate := RollingUpdateDeployment{}
+ strategy.RollingUpdate = &rollingUpdate
+ }
+ if strategy.RollingUpdate.MaxUnavailable == nil {
+ // Set default MaxUnavailable as 1 by default.
+ maxUnavailable := intstr.FromInt(1)
+ strategy.RollingUpdate.MaxUnavailable = &maxUnavailable
+ }
+ if strategy.RollingUpdate.MaxSurge == nil {
+ // Set default MaxSurge as 1 by default.
+ maxSurge := intstr.FromInt(1)
+ strategy.RollingUpdate.MaxSurge = &maxSurge
+ }
+ }
+}
+
+func SetDefaults_ReplicaSet(obj *ReplicaSet) {
+ labels := obj.Spec.Template.Labels
+
+ // TODO: support templates defined elsewhere when we support them in the API
+ if labels != nil {
+ if obj.Spec.Selector == nil {
+ obj.Spec.Selector = &metav1.LabelSelector{
+ MatchLabels: labels,
+ }
+ }
+ if len(obj.Labels) == 0 {
+ obj.Labels = labels
+ }
+ }
+ if obj.Spec.Replicas == nil {
+ obj.Spec.Replicas = new(int32)
+ *obj.Spec.Replicas = 1
+ }
+}
+
+func SetDefaults_NetworkPolicy(obj *NetworkPolicy) {
+ // Default any undefined Protocol fields to TCP.
+ for _, i := range obj.Spec.Ingress {
+ for _, p := range i.Ports {
+ if p.Protocol == nil {
+ proto := v1.ProtocolTCP
+ p.Protocol = &proto
+ }
+ }
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/doc.go
new file mode 100644
index 000000000..0b074d046
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/doc.go
@@ -0,0 +1,25 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/extensions
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/autoscaling
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/batch
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/networking
+// +k8s:openapi-gen=true
+// +k8s:defaulter-gen=TypeMeta
+
+package v1beta1 // import "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.pb.go
new file mode 100644
index 000000000..32d404931
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.pb.go
@@ -0,0 +1,12108 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1beta1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.proto
+
+ It has these top-level messages:
+ APIVersion
+ CustomMetricCurrentStatus
+ CustomMetricCurrentStatusList
+ CustomMetricTarget
+ CustomMetricTargetList
+ DaemonSet
+ DaemonSetList
+ DaemonSetSpec
+ DaemonSetStatus
+ DaemonSetUpdateStrategy
+ Deployment
+ DeploymentCondition
+ DeploymentList
+ DeploymentRollback
+ DeploymentSpec
+ DeploymentStatus
+ DeploymentStrategy
+ FSGroupStrategyOptions
+ HTTPIngressPath
+ HTTPIngressRuleValue
+ HostPortRange
+ IDRange
+ Ingress
+ IngressBackend
+ IngressList
+ IngressRule
+ IngressRuleValue
+ IngressSpec
+ IngressStatus
+ IngressTLS
+ NetworkPolicy
+ NetworkPolicyIngressRule
+ NetworkPolicyList
+ NetworkPolicyPeer
+ NetworkPolicyPort
+ NetworkPolicySpec
+ PodSecurityPolicy
+ PodSecurityPolicyList
+ PodSecurityPolicySpec
+ ReplicaSet
+ ReplicaSetCondition
+ ReplicaSetList
+ ReplicaSetSpec
+ ReplicaSetStatus
+ ReplicationControllerDummy
+ RollbackConfig
+ RollingUpdateDaemonSet
+ RollingUpdateDeployment
+ RunAsUserStrategyOptions
+ SELinuxStrategyOptions
+ Scale
+ ScaleSpec
+ ScaleStatus
+ SupplementalGroupsStrategyOptions
+ ThirdPartyResource
+ ThirdPartyResourceData
+ ThirdPartyResourceDataList
+ ThirdPartyResourceList
+*/
+package v1beta1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+import k8s_io_apimachinery_pkg_util_intstr "k8s.io/apimachinery/pkg/util/intstr"
+import k8s_io_kubernetes_pkg_api_v1 "k8s.io/kubernetes/pkg/api/v1"
+
+import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *APIVersion) Reset() { *m = APIVersion{} }
+func (*APIVersion) ProtoMessage() {}
+func (*APIVersion) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *CustomMetricCurrentStatus) Reset() { *m = CustomMetricCurrentStatus{} }
+func (*CustomMetricCurrentStatus) ProtoMessage() {}
+func (*CustomMetricCurrentStatus) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{1}
+}
+
+func (m *CustomMetricCurrentStatusList) Reset() { *m = CustomMetricCurrentStatusList{} }
+func (*CustomMetricCurrentStatusList) ProtoMessage() {}
+func (*CustomMetricCurrentStatusList) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{2}
+}
+
+func (m *CustomMetricTarget) Reset() { *m = CustomMetricTarget{} }
+func (*CustomMetricTarget) ProtoMessage() {}
+func (*CustomMetricTarget) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
+
+func (m *CustomMetricTargetList) Reset() { *m = CustomMetricTargetList{} }
+func (*CustomMetricTargetList) ProtoMessage() {}
+func (*CustomMetricTargetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
+
+func (m *DaemonSet) Reset() { *m = DaemonSet{} }
+func (*DaemonSet) ProtoMessage() {}
+func (*DaemonSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
+
+func (m *DaemonSetList) Reset() { *m = DaemonSetList{} }
+func (*DaemonSetList) ProtoMessage() {}
+func (*DaemonSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
+
+func (m *DaemonSetSpec) Reset() { *m = DaemonSetSpec{} }
+func (*DaemonSetSpec) ProtoMessage() {}
+func (*DaemonSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
+
+func (m *DaemonSetStatus) Reset() { *m = DaemonSetStatus{} }
+func (*DaemonSetStatus) ProtoMessage() {}
+func (*DaemonSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
+
+func (m *DaemonSetUpdateStrategy) Reset() { *m = DaemonSetUpdateStrategy{} }
+func (*DaemonSetUpdateStrategy) ProtoMessage() {}
+func (*DaemonSetUpdateStrategy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
+
+func (m *Deployment) Reset() { *m = Deployment{} }
+func (*Deployment) ProtoMessage() {}
+func (*Deployment) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
+
+func (m *DeploymentCondition) Reset() { *m = DeploymentCondition{} }
+func (*DeploymentCondition) ProtoMessage() {}
+func (*DeploymentCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} }
+
+func (m *DeploymentList) Reset() { *m = DeploymentList{} }
+func (*DeploymentList) ProtoMessage() {}
+func (*DeploymentList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} }
+
+func (m *DeploymentRollback) Reset() { *m = DeploymentRollback{} }
+func (*DeploymentRollback) ProtoMessage() {}
+func (*DeploymentRollback) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} }
+
+func (m *DeploymentSpec) Reset() { *m = DeploymentSpec{} }
+func (*DeploymentSpec) ProtoMessage() {}
+func (*DeploymentSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} }
+
+func (m *DeploymentStatus) Reset() { *m = DeploymentStatus{} }
+func (*DeploymentStatus) ProtoMessage() {}
+func (*DeploymentStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} }
+
+func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} }
+func (*DeploymentStrategy) ProtoMessage() {}
+func (*DeploymentStrategy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} }
+
+func (m *FSGroupStrategyOptions) Reset() { *m = FSGroupStrategyOptions{} }
+func (*FSGroupStrategyOptions) ProtoMessage() {}
+func (*FSGroupStrategyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} }
+
+func (m *HTTPIngressPath) Reset() { *m = HTTPIngressPath{} }
+func (*HTTPIngressPath) ProtoMessage() {}
+func (*HTTPIngressPath) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} }
+
+func (m *HTTPIngressRuleValue) Reset() { *m = HTTPIngressRuleValue{} }
+func (*HTTPIngressRuleValue) ProtoMessage() {}
+func (*HTTPIngressRuleValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} }
+
+func (m *HostPortRange) Reset() { *m = HostPortRange{} }
+func (*HostPortRange) ProtoMessage() {}
+func (*HostPortRange) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{20} }
+
+func (m *IDRange) Reset() { *m = IDRange{} }
+func (*IDRange) ProtoMessage() {}
+func (*IDRange) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{21} }
+
+func (m *Ingress) Reset() { *m = Ingress{} }
+func (*Ingress) ProtoMessage() {}
+func (*Ingress) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{22} }
+
+func (m *IngressBackend) Reset() { *m = IngressBackend{} }
+func (*IngressBackend) ProtoMessage() {}
+func (*IngressBackend) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{23} }
+
+func (m *IngressList) Reset() { *m = IngressList{} }
+func (*IngressList) ProtoMessage() {}
+func (*IngressList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{24} }
+
+func (m *IngressRule) Reset() { *m = IngressRule{} }
+func (*IngressRule) ProtoMessage() {}
+func (*IngressRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} }
+
+func (m *IngressRuleValue) Reset() { *m = IngressRuleValue{} }
+func (*IngressRuleValue) ProtoMessage() {}
+func (*IngressRuleValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{26} }
+
+func (m *IngressSpec) Reset() { *m = IngressSpec{} }
+func (*IngressSpec) ProtoMessage() {}
+func (*IngressSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{27} }
+
+func (m *IngressStatus) Reset() { *m = IngressStatus{} }
+func (*IngressStatus) ProtoMessage() {}
+func (*IngressStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{28} }
+
+func (m *IngressTLS) Reset() { *m = IngressTLS{} }
+func (*IngressTLS) ProtoMessage() {}
+func (*IngressTLS) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{29} }
+
+func (m *NetworkPolicy) Reset() { *m = NetworkPolicy{} }
+func (*NetworkPolicy) ProtoMessage() {}
+func (*NetworkPolicy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{30} }
+
+func (m *NetworkPolicyIngressRule) Reset() { *m = NetworkPolicyIngressRule{} }
+func (*NetworkPolicyIngressRule) ProtoMessage() {}
+func (*NetworkPolicyIngressRule) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{31}
+}
+
+func (m *NetworkPolicyList) Reset() { *m = NetworkPolicyList{} }
+func (*NetworkPolicyList) ProtoMessage() {}
+func (*NetworkPolicyList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{32} }
+
+func (m *NetworkPolicyPeer) Reset() { *m = NetworkPolicyPeer{} }
+func (*NetworkPolicyPeer) ProtoMessage() {}
+func (*NetworkPolicyPeer) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{33} }
+
+func (m *NetworkPolicyPort) Reset() { *m = NetworkPolicyPort{} }
+func (*NetworkPolicyPort) ProtoMessage() {}
+func (*NetworkPolicyPort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{34} }
+
+func (m *NetworkPolicySpec) Reset() { *m = NetworkPolicySpec{} }
+func (*NetworkPolicySpec) ProtoMessage() {}
+func (*NetworkPolicySpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{35} }
+
+func (m *PodSecurityPolicy) Reset() { *m = PodSecurityPolicy{} }
+func (*PodSecurityPolicy) ProtoMessage() {}
+func (*PodSecurityPolicy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{36} }
+
+func (m *PodSecurityPolicyList) Reset() { *m = PodSecurityPolicyList{} }
+func (*PodSecurityPolicyList) ProtoMessage() {}
+func (*PodSecurityPolicyList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{37} }
+
+func (m *PodSecurityPolicySpec) Reset() { *m = PodSecurityPolicySpec{} }
+func (*PodSecurityPolicySpec) ProtoMessage() {}
+func (*PodSecurityPolicySpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{38} }
+
+func (m *ReplicaSet) Reset() { *m = ReplicaSet{} }
+func (*ReplicaSet) ProtoMessage() {}
+func (*ReplicaSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{39} }
+
+func (m *ReplicaSetCondition) Reset() { *m = ReplicaSetCondition{} }
+func (*ReplicaSetCondition) ProtoMessage() {}
+func (*ReplicaSetCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{40} }
+
+func (m *ReplicaSetList) Reset() { *m = ReplicaSetList{} }
+func (*ReplicaSetList) ProtoMessage() {}
+func (*ReplicaSetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{41} }
+
+func (m *ReplicaSetSpec) Reset() { *m = ReplicaSetSpec{} }
+func (*ReplicaSetSpec) ProtoMessage() {}
+func (*ReplicaSetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{42} }
+
+func (m *ReplicaSetStatus) Reset() { *m = ReplicaSetStatus{} }
+func (*ReplicaSetStatus) ProtoMessage() {}
+func (*ReplicaSetStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{43} }
+
+func (m *ReplicationControllerDummy) Reset() { *m = ReplicationControllerDummy{} }
+func (*ReplicationControllerDummy) ProtoMessage() {}
+func (*ReplicationControllerDummy) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{44}
+}
+
+func (m *RollbackConfig) Reset() { *m = RollbackConfig{} }
+func (*RollbackConfig) ProtoMessage() {}
+func (*RollbackConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{45} }
+
+func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} }
+func (*RollingUpdateDaemonSet) ProtoMessage() {}
+func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{46} }
+
+func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} }
+func (*RollingUpdateDeployment) ProtoMessage() {}
+func (*RollingUpdateDeployment) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{47}
+}
+
+func (m *RunAsUserStrategyOptions) Reset() { *m = RunAsUserStrategyOptions{} }
+func (*RunAsUserStrategyOptions) ProtoMessage() {}
+func (*RunAsUserStrategyOptions) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{48}
+}
+
+func (m *SELinuxStrategyOptions) Reset() { *m = SELinuxStrategyOptions{} }
+func (*SELinuxStrategyOptions) ProtoMessage() {}
+func (*SELinuxStrategyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{49} }
+
+func (m *Scale) Reset() { *m = Scale{} }
+func (*Scale) ProtoMessage() {}
+func (*Scale) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{50} }
+
+func (m *ScaleSpec) Reset() { *m = ScaleSpec{} }
+func (*ScaleSpec) ProtoMessage() {}
+func (*ScaleSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{51} }
+
+func (m *ScaleStatus) Reset() { *m = ScaleStatus{} }
+func (*ScaleStatus) ProtoMessage() {}
+func (*ScaleStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{52} }
+
+func (m *SupplementalGroupsStrategyOptions) Reset() { *m = SupplementalGroupsStrategyOptions{} }
+func (*SupplementalGroupsStrategyOptions) ProtoMessage() {}
+func (*SupplementalGroupsStrategyOptions) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{53}
+}
+
+func (m *ThirdPartyResource) Reset() { *m = ThirdPartyResource{} }
+func (*ThirdPartyResource) ProtoMessage() {}
+func (*ThirdPartyResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{54} }
+
+func (m *ThirdPartyResourceData) Reset() { *m = ThirdPartyResourceData{} }
+func (*ThirdPartyResourceData) ProtoMessage() {}
+func (*ThirdPartyResourceData) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{55} }
+
+func (m *ThirdPartyResourceDataList) Reset() { *m = ThirdPartyResourceDataList{} }
+func (*ThirdPartyResourceDataList) ProtoMessage() {}
+func (*ThirdPartyResourceDataList) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{56}
+}
+
+func (m *ThirdPartyResourceList) Reset() { *m = ThirdPartyResourceList{} }
+func (*ThirdPartyResourceList) ProtoMessage() {}
+func (*ThirdPartyResourceList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{57} }
+
+func init() {
+ proto.RegisterType((*APIVersion)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.APIVersion")
+ proto.RegisterType((*CustomMetricCurrentStatus)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.CustomMetricCurrentStatus")
+ proto.RegisterType((*CustomMetricCurrentStatusList)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.CustomMetricCurrentStatusList")
+ proto.RegisterType((*CustomMetricTarget)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.CustomMetricTarget")
+ proto.RegisterType((*CustomMetricTargetList)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.CustomMetricTargetList")
+ proto.RegisterType((*DaemonSet)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.DaemonSet")
+ proto.RegisterType((*DaemonSetList)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.DaemonSetList")
+ proto.RegisterType((*DaemonSetSpec)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.DaemonSetSpec")
+ proto.RegisterType((*DaemonSetStatus)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.DaemonSetStatus")
+ proto.RegisterType((*DaemonSetUpdateStrategy)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.DaemonSetUpdateStrategy")
+ proto.RegisterType((*Deployment)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.Deployment")
+ proto.RegisterType((*DeploymentCondition)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.DeploymentCondition")
+ proto.RegisterType((*DeploymentList)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.DeploymentList")
+ proto.RegisterType((*DeploymentRollback)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.DeploymentRollback")
+ proto.RegisterType((*DeploymentSpec)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.DeploymentSpec")
+ proto.RegisterType((*DeploymentStatus)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.DeploymentStatus")
+ proto.RegisterType((*DeploymentStrategy)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.DeploymentStrategy")
+ proto.RegisterType((*FSGroupStrategyOptions)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.FSGroupStrategyOptions")
+ proto.RegisterType((*HTTPIngressPath)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.HTTPIngressPath")
+ proto.RegisterType((*HTTPIngressRuleValue)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.HTTPIngressRuleValue")
+ proto.RegisterType((*HostPortRange)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.HostPortRange")
+ proto.RegisterType((*IDRange)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.IDRange")
+ proto.RegisterType((*Ingress)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.Ingress")
+ proto.RegisterType((*IngressBackend)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.IngressBackend")
+ proto.RegisterType((*IngressList)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.IngressList")
+ proto.RegisterType((*IngressRule)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.IngressRule")
+ proto.RegisterType((*IngressRuleValue)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.IngressRuleValue")
+ proto.RegisterType((*IngressSpec)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.IngressSpec")
+ proto.RegisterType((*IngressStatus)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.IngressStatus")
+ proto.RegisterType((*IngressTLS)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.IngressTLS")
+ proto.RegisterType((*NetworkPolicy)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.NetworkPolicy")
+ proto.RegisterType((*NetworkPolicyIngressRule)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.NetworkPolicyIngressRule")
+ proto.RegisterType((*NetworkPolicyList)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.NetworkPolicyList")
+ proto.RegisterType((*NetworkPolicyPeer)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.NetworkPolicyPeer")
+ proto.RegisterType((*NetworkPolicyPort)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.NetworkPolicyPort")
+ proto.RegisterType((*NetworkPolicySpec)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.NetworkPolicySpec")
+ proto.RegisterType((*PodSecurityPolicy)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.PodSecurityPolicy")
+ proto.RegisterType((*PodSecurityPolicyList)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.PodSecurityPolicyList")
+ proto.RegisterType((*PodSecurityPolicySpec)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.PodSecurityPolicySpec")
+ proto.RegisterType((*ReplicaSet)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.ReplicaSet")
+ proto.RegisterType((*ReplicaSetCondition)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.ReplicaSetCondition")
+ proto.RegisterType((*ReplicaSetList)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.ReplicaSetList")
+ proto.RegisterType((*ReplicaSetSpec)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.ReplicaSetSpec")
+ proto.RegisterType((*ReplicaSetStatus)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.ReplicaSetStatus")
+ proto.RegisterType((*ReplicationControllerDummy)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.ReplicationControllerDummy")
+ proto.RegisterType((*RollbackConfig)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.RollbackConfig")
+ proto.RegisterType((*RollingUpdateDaemonSet)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.RollingUpdateDaemonSet")
+ proto.RegisterType((*RollingUpdateDeployment)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.RollingUpdateDeployment")
+ proto.RegisterType((*RunAsUserStrategyOptions)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.RunAsUserStrategyOptions")
+ proto.RegisterType((*SELinuxStrategyOptions)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.SELinuxStrategyOptions")
+ proto.RegisterType((*Scale)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.Scale")
+ proto.RegisterType((*ScaleSpec)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.ScaleSpec")
+ proto.RegisterType((*ScaleStatus)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.ScaleStatus")
+ proto.RegisterType((*SupplementalGroupsStrategyOptions)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.SupplementalGroupsStrategyOptions")
+ proto.RegisterType((*ThirdPartyResource)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.ThirdPartyResource")
+ proto.RegisterType((*ThirdPartyResourceData)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.ThirdPartyResourceData")
+ proto.RegisterType((*ThirdPartyResourceDataList)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.ThirdPartyResourceDataList")
+ proto.RegisterType((*ThirdPartyResourceList)(nil), "k8s.io.kubernetes.pkg.apis.extensions.v1beta1.ThirdPartyResourceList")
+}
+func (m *APIVersion) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *APIVersion) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ return i, nil
+}
+
+func (m *CustomMetricCurrentStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CustomMetricCurrentStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentValue.Size()))
+ n1, err := m.CurrentValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ return i, nil
+}
+
+func (m *CustomMetricCurrentStatusList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CustomMetricCurrentStatusList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *CustomMetricTarget) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CustomMetricTarget) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.TargetValue.Size()))
+ n2, err := m.TargetValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ return i, nil
+}
+
+func (m *CustomMetricTargetList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CustomMetricTargetList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *DaemonSet) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DaemonSet) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n3, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n4, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n5, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ return i, nil
+}
+
+func (m *DaemonSetList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DaemonSetList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n6, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *DaemonSetSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DaemonSetSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Selector != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
+ n7, err := m.Selector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ }
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
+ n8, err := m.Template.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n8
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.UpdateStrategy.Size()))
+ n9, err := m.UpdateStrategy.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n9
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.MinReadySeconds))
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.TemplateGeneration))
+ if m.RevisionHistoryLimit != nil {
+ dAtA[i] = 0x30
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.RevisionHistoryLimit))
+ }
+ return i, nil
+}
+
+func (m *DaemonSetStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DaemonSetStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentNumberScheduled))
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NumberMisscheduled))
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.DesiredNumberScheduled))
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NumberReady))
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration))
+ dAtA[i] = 0x30
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.UpdatedNumberScheduled))
+ dAtA[i] = 0x38
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NumberAvailable))
+ dAtA[i] = 0x40
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NumberUnavailable))
+ if m.CollisionCount != nil {
+ dAtA[i] = 0x48
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.CollisionCount))
+ }
+ return i, nil
+}
+
+func (m *DaemonSetUpdateStrategy) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DaemonSetUpdateStrategy) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ if m.RollingUpdate != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RollingUpdate.Size()))
+ n10, err := m.RollingUpdate.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n10
+ }
+ return i, nil
+}
+
+func (m *Deployment) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Deployment) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n11, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n11
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n12, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n12
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n13, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n13
+ return i, nil
+}
+
+func (m *DeploymentCondition) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeploymentCondition) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
+ i += copy(dAtA[i:], m.Status)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastUpdateTime.Size()))
+ n14, err := m.LastUpdateTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n14
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
+ n15, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n15
+ return i, nil
+}
+
+func (m *DeploymentList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeploymentList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n16, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n16
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *DeploymentRollback) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeploymentRollback) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ if len(m.UpdatedAnnotations) > 0 {
+ keysForUpdatedAnnotations := make([]string, 0, len(m.UpdatedAnnotations))
+ for k := range m.UpdatedAnnotations {
+ keysForUpdatedAnnotations = append(keysForUpdatedAnnotations, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForUpdatedAnnotations)
+ for _, k := range keysForUpdatedAnnotations {
+ dAtA[i] = 0x12
+ i++
+ v := m.UpdatedAnnotations[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RollbackTo.Size()))
+ n17, err := m.RollbackTo.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n17
+ return i, nil
+}
+
+func (m *DeploymentSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeploymentSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Replicas != nil {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.Replicas))
+ }
+ if m.Selector != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
+ n18, err := m.Selector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n18
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
+ n19, err := m.Template.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n19
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Strategy.Size()))
+ n20, err := m.Strategy.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n20
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.MinReadySeconds))
+ if m.RevisionHistoryLimit != nil {
+ dAtA[i] = 0x30
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.RevisionHistoryLimit))
+ }
+ dAtA[i] = 0x38
+ i++
+ if m.Paused {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ if m.RollbackTo != nil {
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RollbackTo.Size()))
+ n21, err := m.RollbackTo.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n21
+ }
+ if m.ProgressDeadlineSeconds != nil {
+ dAtA[i] = 0x48
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.ProgressDeadlineSeconds))
+ }
+ return i, nil
+}
+
+func (m *DeploymentStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeploymentStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration))
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.UpdatedReplicas))
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.AvailableReplicas))
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.UnavailableReplicas))
+ if len(m.Conditions) > 0 {
+ for _, msg := range m.Conditions {
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x38
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ReadyReplicas))
+ if m.CollisionCount != nil {
+ dAtA[i] = 0x40
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.CollisionCount))
+ }
+ return i, nil
+}
+
+func (m *DeploymentStrategy) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeploymentStrategy) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ if m.RollingUpdate != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RollingUpdate.Size()))
+ n22, err := m.RollingUpdate.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n22
+ }
+ return i, nil
+}
+
+func (m *FSGroupStrategyOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *FSGroupStrategyOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Rule)))
+ i += copy(dAtA[i:], m.Rule)
+ if len(m.Ranges) > 0 {
+ for _, msg := range m.Ranges {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *HTTPIngressPath) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HTTPIngressPath) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path)))
+ i += copy(dAtA[i:], m.Path)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Backend.Size()))
+ n23, err := m.Backend.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n23
+ return i, nil
+}
+
+func (m *HTTPIngressRuleValue) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HTTPIngressRuleValue) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Paths) > 0 {
+ for _, msg := range m.Paths {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *HostPortRange) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HostPortRange) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Min))
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Max))
+ return i, nil
+}
+
+func (m *IDRange) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *IDRange) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Min))
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Max))
+ return i, nil
+}
+
+func (m *Ingress) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Ingress) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n24, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n24
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n25, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n25
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n26, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n26
+ return i, nil
+}
+
+func (m *IngressBackend) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *IngressBackend) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ServiceName)))
+ i += copy(dAtA[i:], m.ServiceName)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ServicePort.Size()))
+ n27, err := m.ServicePort.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n27
+ return i, nil
+}
+
+func (m *IngressList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *IngressList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n28, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n28
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *IngressRule) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *IngressRule) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Host)))
+ i += copy(dAtA[i:], m.Host)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.IngressRuleValue.Size()))
+ n29, err := m.IngressRuleValue.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n29
+ return i, nil
+}
+
+func (m *IngressRuleValue) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *IngressRuleValue) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.HTTP != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.HTTP.Size()))
+ n30, err := m.HTTP.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n30
+ }
+ return i, nil
+}
+
+func (m *IngressSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *IngressSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Backend != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Backend.Size()))
+ n31, err := m.Backend.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n31
+ }
+ if len(m.TLS) > 0 {
+ for _, msg := range m.TLS {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Rules) > 0 {
+ for _, msg := range m.Rules {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *IngressStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *IngressStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LoadBalancer.Size()))
+ n32, err := m.LoadBalancer.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n32
+ return i, nil
+}
+
+func (m *IngressTLS) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *IngressTLS) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Hosts) > 0 {
+ for _, s := range m.Hosts {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.SecretName)))
+ i += copy(dAtA[i:], m.SecretName)
+ return i, nil
+}
+
+func (m *NetworkPolicy) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NetworkPolicy) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n33, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n33
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n34, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n34
+ return i, nil
+}
+
+func (m *NetworkPolicyIngressRule) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NetworkPolicyIngressRule) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Ports) > 0 {
+ for _, msg := range m.Ports {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.From) > 0 {
+ for _, msg := range m.From {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *NetworkPolicyList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NetworkPolicyList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n35, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n35
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *NetworkPolicyPeer) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NetworkPolicyPeer) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.PodSelector != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PodSelector.Size()))
+ n36, err := m.PodSelector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n36
+ }
+ if m.NamespaceSelector != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NamespaceSelector.Size()))
+ n37, err := m.NamespaceSelector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n37
+ }
+ return i, nil
+}
+
+func (m *NetworkPolicyPort) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NetworkPolicyPort) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Protocol != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Protocol)))
+ i += copy(dAtA[i:], *m.Protocol)
+ }
+ if m.Port != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Port.Size()))
+ n38, err := m.Port.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n38
+ }
+ return i, nil
+}
+
+func (m *NetworkPolicySpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NetworkPolicySpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PodSelector.Size()))
+ n39, err := m.PodSelector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n39
+ if len(m.Ingress) > 0 {
+ for _, msg := range m.Ingress {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PodSecurityPolicy) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodSecurityPolicy) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n40, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n40
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n41, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n41
+ return i, nil
+}
+
+func (m *PodSecurityPolicyList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodSecurityPolicyList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n42, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n42
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PodSecurityPolicySpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodSecurityPolicySpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ if m.Privileged {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ if len(m.DefaultAddCapabilities) > 0 {
+ for _, s := range m.DefaultAddCapabilities {
+ dAtA[i] = 0x12
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.RequiredDropCapabilities) > 0 {
+ for _, s := range m.RequiredDropCapabilities {
+ dAtA[i] = 0x1a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.AllowedCapabilities) > 0 {
+ for _, s := range m.AllowedCapabilities {
+ dAtA[i] = 0x22
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Volumes) > 0 {
+ for _, s := range m.Volumes {
+ dAtA[i] = 0x2a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ dAtA[i] = 0x30
+ i++
+ if m.HostNetwork {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ if len(m.HostPorts) > 0 {
+ for _, msg := range m.HostPorts {
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x40
+ i++
+ if m.HostPID {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x48
+ i++
+ if m.HostIPC {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ dAtA[i] = 0x52
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SELinux.Size()))
+ n43, err := m.SELinux.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n43
+ dAtA[i] = 0x5a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RunAsUser.Size()))
+ n44, err := m.RunAsUser.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n44
+ dAtA[i] = 0x62
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SupplementalGroups.Size()))
+ n45, err := m.SupplementalGroups.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n45
+ dAtA[i] = 0x6a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.FSGroup.Size()))
+ n46, err := m.FSGroup.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n46
+ dAtA[i] = 0x70
+ i++
+ if m.ReadOnlyRootFilesystem {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ return i, nil
+}
+
+func (m *ReplicaSet) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReplicaSet) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n47, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n47
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n48, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n48
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n49, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n49
+ return i, nil
+}
+
+func (m *ReplicaSetCondition) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReplicaSetCondition) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status)))
+ i += copy(dAtA[i:], m.Status)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size()))
+ n50, err := m.LastTransitionTime.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n50
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ return i, nil
+}
+
+func (m *ReplicaSetList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReplicaSetList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n51, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n51
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ReplicaSetSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReplicaSetSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Replicas != nil {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(*m.Replicas))
+ }
+ if m.Selector != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
+ n52, err := m.Selector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n52
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size()))
+ n53, err := m.Template.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n53
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.MinReadySeconds))
+ return i, nil
+}
+
+func (m *ReplicaSetStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReplicaSetStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.FullyLabeledReplicas))
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration))
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ReadyReplicas))
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.AvailableReplicas))
+ if len(m.Conditions) > 0 {
+ for _, msg := range m.Conditions {
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ReplicationControllerDummy) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReplicationControllerDummy) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ return i, nil
+}
+
+func (m *RollbackConfig) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RollbackConfig) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Revision))
+ return i, nil
+}
+
+func (m *RollingUpdateDaemonSet) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RollingUpdateDaemonSet) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.MaxUnavailable != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.MaxUnavailable.Size()))
+ n54, err := m.MaxUnavailable.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n54
+ }
+ return i, nil
+}
+
+func (m *RollingUpdateDeployment) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RollingUpdateDeployment) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.MaxUnavailable != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.MaxUnavailable.Size()))
+ n55, err := m.MaxUnavailable.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n55
+ }
+ if m.MaxSurge != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.MaxSurge.Size()))
+ n56, err := m.MaxSurge.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n56
+ }
+ return i, nil
+}
+
+func (m *RunAsUserStrategyOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RunAsUserStrategyOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Rule)))
+ i += copy(dAtA[i:], m.Rule)
+ if len(m.Ranges) > 0 {
+ for _, msg := range m.Ranges {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *SELinuxStrategyOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SELinuxStrategyOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Rule)))
+ i += copy(dAtA[i:], m.Rule)
+ if m.SELinuxOptions != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.SELinuxOptions.Size()))
+ n57, err := m.SELinuxOptions.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n57
+ }
+ return i, nil
+}
+
+func (m *Scale) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Scale) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n58, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n58
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n59, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n59
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n60, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n60
+ return i, nil
+}
+
+func (m *ScaleSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ScaleSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
+ return i, nil
+}
+
+func (m *ScaleStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ScaleStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas))
+ if len(m.Selector) > 0 {
+ keysForSelector := make([]string, 0, len(m.Selector))
+ for k := range m.Selector {
+ keysForSelector = append(keysForSelector, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForSelector)
+ for _, k := range keysForSelector {
+ dAtA[i] = 0x12
+ i++
+ v := m.Selector[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.TargetSelector)))
+ i += copy(dAtA[i:], m.TargetSelector)
+ return i, nil
+}
+
+func (m *SupplementalGroupsStrategyOptions) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SupplementalGroupsStrategyOptions) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Rule)))
+ i += copy(dAtA[i:], m.Rule)
+ if len(m.Ranges) > 0 {
+ for _, msg := range m.Ranges {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ThirdPartyResource) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ThirdPartyResource) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n61, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n61
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Description)))
+ i += copy(dAtA[i:], m.Description)
+ if len(m.Versions) > 0 {
+ for _, msg := range m.Versions {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ThirdPartyResourceData) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ThirdPartyResourceData) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n62, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n62
+ if m.Data != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Data)))
+ i += copy(dAtA[i:], m.Data)
+ }
+ return i, nil
+}
+
+func (m *ThirdPartyResourceDataList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ThirdPartyResourceDataList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n63, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n63
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ThirdPartyResourceList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ThirdPartyResourceList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n64, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n64
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *APIVersion) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *CustomMetricCurrentStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.CurrentValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *CustomMetricCurrentStatusList) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *CustomMetricTarget) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.TargetValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *CustomMetricTargetList) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *DaemonSet) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *DaemonSetList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *DaemonSetSpec) Size() (n int) {
+ var l int
+ _ = l
+ if m.Selector != nil {
+ l = m.Selector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ l = m.Template.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.UpdateStrategy.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.MinReadySeconds))
+ n += 1 + sovGenerated(uint64(m.TemplateGeneration))
+ if m.RevisionHistoryLimit != nil {
+ n += 1 + sovGenerated(uint64(*m.RevisionHistoryLimit))
+ }
+ return n
+}
+
+func (m *DaemonSetStatus) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.CurrentNumberScheduled))
+ n += 1 + sovGenerated(uint64(m.NumberMisscheduled))
+ n += 1 + sovGenerated(uint64(m.DesiredNumberScheduled))
+ n += 1 + sovGenerated(uint64(m.NumberReady))
+ n += 1 + sovGenerated(uint64(m.ObservedGeneration))
+ n += 1 + sovGenerated(uint64(m.UpdatedNumberScheduled))
+ n += 1 + sovGenerated(uint64(m.NumberAvailable))
+ n += 1 + sovGenerated(uint64(m.NumberUnavailable))
+ if m.CollisionCount != nil {
+ n += 1 + sovGenerated(uint64(*m.CollisionCount))
+ }
+ return n
+}
+
+func (m *DaemonSetUpdateStrategy) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.RollingUpdate != nil {
+ l = m.RollingUpdate.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *Deployment) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *DeploymentCondition) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Status)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastUpdateTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastTransitionTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *DeploymentList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *DeploymentRollback) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.UpdatedAnnotations) > 0 {
+ for k, v := range m.UpdatedAnnotations {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ l = m.RollbackTo.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *DeploymentSpec) Size() (n int) {
+ var l int
+ _ = l
+ if m.Replicas != nil {
+ n += 1 + sovGenerated(uint64(*m.Replicas))
+ }
+ if m.Selector != nil {
+ l = m.Selector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ l = m.Template.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Strategy.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.MinReadySeconds))
+ if m.RevisionHistoryLimit != nil {
+ n += 1 + sovGenerated(uint64(*m.RevisionHistoryLimit))
+ }
+ n += 2
+ if m.RollbackTo != nil {
+ l = m.RollbackTo.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.ProgressDeadlineSeconds != nil {
+ n += 1 + sovGenerated(uint64(*m.ProgressDeadlineSeconds))
+ }
+ return n
+}
+
+func (m *DeploymentStatus) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.ObservedGeneration))
+ n += 1 + sovGenerated(uint64(m.Replicas))
+ n += 1 + sovGenerated(uint64(m.UpdatedReplicas))
+ n += 1 + sovGenerated(uint64(m.AvailableReplicas))
+ n += 1 + sovGenerated(uint64(m.UnavailableReplicas))
+ if len(m.Conditions) > 0 {
+ for _, e := range m.Conditions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ n += 1 + sovGenerated(uint64(m.ReadyReplicas))
+ if m.CollisionCount != nil {
+ n += 1 + sovGenerated(uint64(*m.CollisionCount))
+ }
+ return n
+}
+
+func (m *DeploymentStrategy) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.RollingUpdate != nil {
+ l = m.RollingUpdate.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *FSGroupStrategyOptions) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Rule)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Ranges) > 0 {
+ for _, e := range m.Ranges {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *HTTPIngressPath) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Path)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Backend.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *HTTPIngressRuleValue) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Paths) > 0 {
+ for _, e := range m.Paths {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *HostPortRange) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Min))
+ n += 1 + sovGenerated(uint64(m.Max))
+ return n
+}
+
+func (m *IDRange) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Min))
+ n += 1 + sovGenerated(uint64(m.Max))
+ return n
+}
+
+func (m *Ingress) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *IngressBackend) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.ServiceName)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.ServicePort.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *IngressList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *IngressRule) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Host)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.IngressRuleValue.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *IngressRuleValue) Size() (n int) {
+ var l int
+ _ = l
+ if m.HTTP != nil {
+ l = m.HTTP.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *IngressSpec) Size() (n int) {
+ var l int
+ _ = l
+ if m.Backend != nil {
+ l = m.Backend.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if len(m.TLS) > 0 {
+ for _, e := range m.TLS {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Rules) > 0 {
+ for _, e := range m.Rules {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *IngressStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = m.LoadBalancer.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *IngressTLS) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Hosts) > 0 {
+ for _, s := range m.Hosts {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = len(m.SecretName)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *NetworkPolicy) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *NetworkPolicyIngressRule) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Ports) > 0 {
+ for _, e := range m.Ports {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.From) > 0 {
+ for _, e := range m.From {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *NetworkPolicyList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *NetworkPolicyPeer) Size() (n int) {
+ var l int
+ _ = l
+ if m.PodSelector != nil {
+ l = m.PodSelector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.NamespaceSelector != nil {
+ l = m.NamespaceSelector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *NetworkPolicyPort) Size() (n int) {
+ var l int
+ _ = l
+ if m.Protocol != nil {
+ l = len(*m.Protocol)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Port != nil {
+ l = m.Port.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *NetworkPolicySpec) Size() (n int) {
+ var l int
+ _ = l
+ l = m.PodSelector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Ingress) > 0 {
+ for _, e := range m.Ingress {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PodSecurityPolicy) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodSecurityPolicyList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PodSecurityPolicySpec) Size() (n int) {
+ var l int
+ _ = l
+ n += 2
+ if len(m.DefaultAddCapabilities) > 0 {
+ for _, s := range m.DefaultAddCapabilities {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.RequiredDropCapabilities) > 0 {
+ for _, s := range m.RequiredDropCapabilities {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.AllowedCapabilities) > 0 {
+ for _, s := range m.AllowedCapabilities {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Volumes) > 0 {
+ for _, s := range m.Volumes {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ n += 2
+ if len(m.HostPorts) > 0 {
+ for _, e := range m.HostPorts {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ n += 2
+ n += 2
+ l = m.SELinux.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.RunAsUser.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.SupplementalGroups.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.FSGroup.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 2
+ return n
+}
+
+func (m *ReplicaSet) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ReplicaSetCondition) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Status)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.LastTransitionTime.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Reason)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Message)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ReplicaSetList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ReplicaSetSpec) Size() (n int) {
+ var l int
+ _ = l
+ if m.Replicas != nil {
+ n += 1 + sovGenerated(uint64(*m.Replicas))
+ }
+ if m.Selector != nil {
+ l = m.Selector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ l = m.Template.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ n += 1 + sovGenerated(uint64(m.MinReadySeconds))
+ return n
+}
+
+func (m *ReplicaSetStatus) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Replicas))
+ n += 1 + sovGenerated(uint64(m.FullyLabeledReplicas))
+ n += 1 + sovGenerated(uint64(m.ObservedGeneration))
+ n += 1 + sovGenerated(uint64(m.ReadyReplicas))
+ n += 1 + sovGenerated(uint64(m.AvailableReplicas))
+ if len(m.Conditions) > 0 {
+ for _, e := range m.Conditions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ReplicationControllerDummy) Size() (n int) {
+ var l int
+ _ = l
+ return n
+}
+
+func (m *RollbackConfig) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Revision))
+ return n
+}
+
+func (m *RollingUpdateDaemonSet) Size() (n int) {
+ var l int
+ _ = l
+ if m.MaxUnavailable != nil {
+ l = m.MaxUnavailable.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *RollingUpdateDeployment) Size() (n int) {
+ var l int
+ _ = l
+ if m.MaxUnavailable != nil {
+ l = m.MaxUnavailable.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.MaxSurge != nil {
+ l = m.MaxSurge.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *RunAsUserStrategyOptions) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Rule)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Ranges) > 0 {
+ for _, e := range m.Ranges {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *SELinuxStrategyOptions) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Rule)
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.SELinuxOptions != nil {
+ l = m.SELinuxOptions.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *Scale) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ScaleSpec) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Replicas))
+ return n
+}
+
+func (m *ScaleStatus) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.Replicas))
+ if len(m.Selector) > 0 {
+ for k, v := range m.Selector {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ l = len(m.TargetSelector)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *SupplementalGroupsStrategyOptions) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Rule)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Ranges) > 0 {
+ for _, e := range m.Ranges {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ThirdPartyResource) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Description)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Versions) > 0 {
+ for _, e := range m.Versions {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ThirdPartyResourceData) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.Data != nil {
+ l = len(m.Data)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *ThirdPartyResourceDataList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ThirdPartyResourceList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *APIVersion) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&APIVersion{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CustomMetricCurrentStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CustomMetricCurrentStatus{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `CurrentValue:` + strings.Replace(strings.Replace(this.CurrentValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CustomMetricCurrentStatusList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CustomMetricCurrentStatusList{`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "CustomMetricCurrentStatus", "CustomMetricCurrentStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CustomMetricTarget) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CustomMetricTarget{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `TargetValue:` + strings.Replace(strings.Replace(this.TargetValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CustomMetricTargetList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CustomMetricTargetList{`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "CustomMetricTarget", "CustomMetricTarget", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DaemonSet) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DaemonSet{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DaemonSetSpec", "DaemonSetSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DaemonSetStatus", "DaemonSetStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DaemonSetList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DaemonSetList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "DaemonSet", "DaemonSet", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DaemonSetSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DaemonSetSpec{`,
+ `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
+ `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_kubernetes_pkg_api_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
+ `UpdateStrategy:` + strings.Replace(strings.Replace(this.UpdateStrategy.String(), "DaemonSetUpdateStrategy", "DaemonSetUpdateStrategy", 1), `&`, ``, 1) + `,`,
+ `MinReadySeconds:` + fmt.Sprintf("%v", this.MinReadySeconds) + `,`,
+ `TemplateGeneration:` + fmt.Sprintf("%v", this.TemplateGeneration) + `,`,
+ `RevisionHistoryLimit:` + valueToStringGenerated(this.RevisionHistoryLimit) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DaemonSetStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DaemonSetStatus{`,
+ `CurrentNumberScheduled:` + fmt.Sprintf("%v", this.CurrentNumberScheduled) + `,`,
+ `NumberMisscheduled:` + fmt.Sprintf("%v", this.NumberMisscheduled) + `,`,
+ `DesiredNumberScheduled:` + fmt.Sprintf("%v", this.DesiredNumberScheduled) + `,`,
+ `NumberReady:` + fmt.Sprintf("%v", this.NumberReady) + `,`,
+ `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
+ `UpdatedNumberScheduled:` + fmt.Sprintf("%v", this.UpdatedNumberScheduled) + `,`,
+ `NumberAvailable:` + fmt.Sprintf("%v", this.NumberAvailable) + `,`,
+ `NumberUnavailable:` + fmt.Sprintf("%v", this.NumberUnavailable) + `,`,
+ `CollisionCount:` + valueToStringGenerated(this.CollisionCount) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DaemonSetUpdateStrategy) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DaemonSetUpdateStrategy{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `RollingUpdate:` + strings.Replace(fmt.Sprintf("%v", this.RollingUpdate), "RollingUpdateDaemonSet", "RollingUpdateDaemonSet", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Deployment) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Deployment{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DeploymentSpec", "DeploymentSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DeploymentStatus", "DeploymentStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeploymentCondition) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeploymentCondition{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `LastUpdateTime:` + strings.Replace(strings.Replace(this.LastUpdateTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeploymentList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeploymentList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Deployment", "Deployment", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeploymentRollback) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForUpdatedAnnotations := make([]string, 0, len(this.UpdatedAnnotations))
+ for k := range this.UpdatedAnnotations {
+ keysForUpdatedAnnotations = append(keysForUpdatedAnnotations, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForUpdatedAnnotations)
+ mapStringForUpdatedAnnotations := "map[string]string{"
+ for _, k := range keysForUpdatedAnnotations {
+ mapStringForUpdatedAnnotations += fmt.Sprintf("%v: %v,", k, this.UpdatedAnnotations[k])
+ }
+ mapStringForUpdatedAnnotations += "}"
+ s := strings.Join([]string{`&DeploymentRollback{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `UpdatedAnnotations:` + mapStringForUpdatedAnnotations + `,`,
+ `RollbackTo:` + strings.Replace(strings.Replace(this.RollbackTo.String(), "RollbackConfig", "RollbackConfig", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeploymentSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeploymentSpec{`,
+ `Replicas:` + valueToStringGenerated(this.Replicas) + `,`,
+ `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
+ `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_kubernetes_pkg_api_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
+ `Strategy:` + strings.Replace(strings.Replace(this.Strategy.String(), "DeploymentStrategy", "DeploymentStrategy", 1), `&`, ``, 1) + `,`,
+ `MinReadySeconds:` + fmt.Sprintf("%v", this.MinReadySeconds) + `,`,
+ `RevisionHistoryLimit:` + valueToStringGenerated(this.RevisionHistoryLimit) + `,`,
+ `Paused:` + fmt.Sprintf("%v", this.Paused) + `,`,
+ `RollbackTo:` + strings.Replace(fmt.Sprintf("%v", this.RollbackTo), "RollbackConfig", "RollbackConfig", 1) + `,`,
+ `ProgressDeadlineSeconds:` + valueToStringGenerated(this.ProgressDeadlineSeconds) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeploymentStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeploymentStatus{`,
+ `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
+ `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
+ `UpdatedReplicas:` + fmt.Sprintf("%v", this.UpdatedReplicas) + `,`,
+ `AvailableReplicas:` + fmt.Sprintf("%v", this.AvailableReplicas) + `,`,
+ `UnavailableReplicas:` + fmt.Sprintf("%v", this.UnavailableReplicas) + `,`,
+ `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "DeploymentCondition", "DeploymentCondition", 1), `&`, ``, 1) + `,`,
+ `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`,
+ `CollisionCount:` + valueToStringGenerated(this.CollisionCount) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DeploymentStrategy) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DeploymentStrategy{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `RollingUpdate:` + strings.Replace(fmt.Sprintf("%v", this.RollingUpdate), "RollingUpdateDeployment", "RollingUpdateDeployment", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *FSGroupStrategyOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&FSGroupStrategyOptions{`,
+ `Rule:` + fmt.Sprintf("%v", this.Rule) + `,`,
+ `Ranges:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ranges), "IDRange", "IDRange", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HTTPIngressPath) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HTTPIngressPath{`,
+ `Path:` + fmt.Sprintf("%v", this.Path) + `,`,
+ `Backend:` + strings.Replace(strings.Replace(this.Backend.String(), "IngressBackend", "IngressBackend", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HTTPIngressRuleValue) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HTTPIngressRuleValue{`,
+ `Paths:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Paths), "HTTPIngressPath", "HTTPIngressPath", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *HostPortRange) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&HostPortRange{`,
+ `Min:` + fmt.Sprintf("%v", this.Min) + `,`,
+ `Max:` + fmt.Sprintf("%v", this.Max) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *IDRange) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&IDRange{`,
+ `Min:` + fmt.Sprintf("%v", this.Min) + `,`,
+ `Max:` + fmt.Sprintf("%v", this.Max) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Ingress) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Ingress{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "IngressSpec", "IngressSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "IngressStatus", "IngressStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *IngressBackend) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&IngressBackend{`,
+ `ServiceName:` + fmt.Sprintf("%v", this.ServiceName) + `,`,
+ `ServicePort:` + strings.Replace(strings.Replace(this.ServicePort.String(), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *IngressList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&IngressList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Ingress", "Ingress", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *IngressRule) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&IngressRule{`,
+ `Host:` + fmt.Sprintf("%v", this.Host) + `,`,
+ `IngressRuleValue:` + strings.Replace(strings.Replace(this.IngressRuleValue.String(), "IngressRuleValue", "IngressRuleValue", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *IngressRuleValue) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&IngressRuleValue{`,
+ `HTTP:` + strings.Replace(fmt.Sprintf("%v", this.HTTP), "HTTPIngressRuleValue", "HTTPIngressRuleValue", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *IngressSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&IngressSpec{`,
+ `Backend:` + strings.Replace(fmt.Sprintf("%v", this.Backend), "IngressBackend", "IngressBackend", 1) + `,`,
+ `TLS:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.TLS), "IngressTLS", "IngressTLS", 1), `&`, ``, 1) + `,`,
+ `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "IngressRule", "IngressRule", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *IngressStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&IngressStatus{`,
+ `LoadBalancer:` + strings.Replace(strings.Replace(this.LoadBalancer.String(), "LoadBalancerStatus", "k8s_io_kubernetes_pkg_api_v1.LoadBalancerStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *IngressTLS) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&IngressTLS{`,
+ `Hosts:` + fmt.Sprintf("%v", this.Hosts) + `,`,
+ `SecretName:` + fmt.Sprintf("%v", this.SecretName) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NetworkPolicy) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NetworkPolicy{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NetworkPolicySpec", "NetworkPolicySpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NetworkPolicyIngressRule) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NetworkPolicyIngressRule{`,
+ `Ports:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ports), "NetworkPolicyPort", "NetworkPolicyPort", 1), `&`, ``, 1) + `,`,
+ `From:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.From), "NetworkPolicyPeer", "NetworkPolicyPeer", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NetworkPolicyList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NetworkPolicyList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "NetworkPolicy", "NetworkPolicy", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NetworkPolicyPeer) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NetworkPolicyPeer{`,
+ `PodSelector:` + strings.Replace(fmt.Sprintf("%v", this.PodSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
+ `NamespaceSelector:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NetworkPolicyPort) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NetworkPolicyPort{`,
+ `Protocol:` + valueToStringGenerated(this.Protocol) + `,`,
+ `Port:` + strings.Replace(fmt.Sprintf("%v", this.Port), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NetworkPolicySpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NetworkPolicySpec{`,
+ `PodSelector:` + strings.Replace(strings.Replace(this.PodSelector.String(), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1), `&`, ``, 1) + `,`,
+ `Ingress:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ingress), "NetworkPolicyIngressRule", "NetworkPolicyIngressRule", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodSecurityPolicy) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodSecurityPolicy{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSecurityPolicySpec", "PodSecurityPolicySpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodSecurityPolicyList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodSecurityPolicyList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PodSecurityPolicy", "PodSecurityPolicy", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodSecurityPolicySpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodSecurityPolicySpec{`,
+ `Privileged:` + fmt.Sprintf("%v", this.Privileged) + `,`,
+ `DefaultAddCapabilities:` + fmt.Sprintf("%v", this.DefaultAddCapabilities) + `,`,
+ `RequiredDropCapabilities:` + fmt.Sprintf("%v", this.RequiredDropCapabilities) + `,`,
+ `AllowedCapabilities:` + fmt.Sprintf("%v", this.AllowedCapabilities) + `,`,
+ `Volumes:` + fmt.Sprintf("%v", this.Volumes) + `,`,
+ `HostNetwork:` + fmt.Sprintf("%v", this.HostNetwork) + `,`,
+ `HostPorts:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.HostPorts), "HostPortRange", "HostPortRange", 1), `&`, ``, 1) + `,`,
+ `HostPID:` + fmt.Sprintf("%v", this.HostPID) + `,`,
+ `HostIPC:` + fmt.Sprintf("%v", this.HostIPC) + `,`,
+ `SELinux:` + strings.Replace(strings.Replace(this.SELinux.String(), "SELinuxStrategyOptions", "SELinuxStrategyOptions", 1), `&`, ``, 1) + `,`,
+ `RunAsUser:` + strings.Replace(strings.Replace(this.RunAsUser.String(), "RunAsUserStrategyOptions", "RunAsUserStrategyOptions", 1), `&`, ``, 1) + `,`,
+ `SupplementalGroups:` + strings.Replace(strings.Replace(this.SupplementalGroups.String(), "SupplementalGroupsStrategyOptions", "SupplementalGroupsStrategyOptions", 1), `&`, ``, 1) + `,`,
+ `FSGroup:` + strings.Replace(strings.Replace(this.FSGroup.String(), "FSGroupStrategyOptions", "FSGroupStrategyOptions", 1), `&`, ``, 1) + `,`,
+ `ReadOnlyRootFilesystem:` + fmt.Sprintf("%v", this.ReadOnlyRootFilesystem) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ReplicaSet) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ReplicaSet{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ReplicaSetSpec", "ReplicaSetSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ReplicaSetStatus", "ReplicaSetStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ReplicaSetCondition) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ReplicaSetCondition{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
+ `LastTransitionTime:` + strings.Replace(strings.Replace(this.LastTransitionTime.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ReplicaSetList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ReplicaSetList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ReplicaSet", "ReplicaSet", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ReplicaSetSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ReplicaSetSpec{`,
+ `Replicas:` + valueToStringGenerated(this.Replicas) + `,`,
+ `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
+ `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "k8s_io_kubernetes_pkg_api_v1.PodTemplateSpec", 1), `&`, ``, 1) + `,`,
+ `MinReadySeconds:` + fmt.Sprintf("%v", this.MinReadySeconds) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ReplicaSetStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ReplicaSetStatus{`,
+ `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
+ `FullyLabeledReplicas:` + fmt.Sprintf("%v", this.FullyLabeledReplicas) + `,`,
+ `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
+ `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`,
+ `AvailableReplicas:` + fmt.Sprintf("%v", this.AvailableReplicas) + `,`,
+ `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "ReplicaSetCondition", "ReplicaSetCondition", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ReplicationControllerDummy) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ReplicationControllerDummy{`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RollbackConfig) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RollbackConfig{`,
+ `Revision:` + fmt.Sprintf("%v", this.Revision) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RollingUpdateDaemonSet) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RollingUpdateDaemonSet{`,
+ `MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RollingUpdateDeployment) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RollingUpdateDeployment{`,
+ `MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
+ `MaxSurge:` + strings.Replace(fmt.Sprintf("%v", this.MaxSurge), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RunAsUserStrategyOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RunAsUserStrategyOptions{`,
+ `Rule:` + fmt.Sprintf("%v", this.Rule) + `,`,
+ `Ranges:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ranges), "IDRange", "IDRange", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SELinuxStrategyOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SELinuxStrategyOptions{`,
+ `Rule:` + fmt.Sprintf("%v", this.Rule) + `,`,
+ `SELinuxOptions:` + strings.Replace(fmt.Sprintf("%v", this.SELinuxOptions), "SELinuxOptions", "k8s_io_kubernetes_pkg_api_v1.SELinuxOptions", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Scale) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Scale{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ScaleSpec", "ScaleSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ScaleStatus", "ScaleStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ScaleSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ScaleSpec{`,
+ `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ScaleStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForSelector := make([]string, 0, len(this.Selector))
+ for k := range this.Selector {
+ keysForSelector = append(keysForSelector, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForSelector)
+ mapStringForSelector := "map[string]string{"
+ for _, k := range keysForSelector {
+ mapStringForSelector += fmt.Sprintf("%v: %v,", k, this.Selector[k])
+ }
+ mapStringForSelector += "}"
+ s := strings.Join([]string{`&ScaleStatus{`,
+ `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
+ `Selector:` + mapStringForSelector + `,`,
+ `TargetSelector:` + fmt.Sprintf("%v", this.TargetSelector) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SupplementalGroupsStrategyOptions) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SupplementalGroupsStrategyOptions{`,
+ `Rule:` + fmt.Sprintf("%v", this.Rule) + `,`,
+ `Ranges:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ranges), "IDRange", "IDRange", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ThirdPartyResource) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ThirdPartyResource{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Description:` + fmt.Sprintf("%v", this.Description) + `,`,
+ `Versions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Versions), "APIVersion", "APIVersion", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ThirdPartyResourceData) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ThirdPartyResourceData{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Data:` + valueToStringGenerated(this.Data) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ThirdPartyResourceDataList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ThirdPartyResourceDataList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ThirdPartyResourceData", "ThirdPartyResourceData", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ThirdPartyResourceList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ThirdPartyResourceList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ThirdPartyResource", "ThirdPartyResource", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *APIVersion) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: APIVersion: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: APIVersion: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CustomMetricCurrentStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CustomMetricCurrentStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CustomMetricCurrentStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.CurrentValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CustomMetricCurrentStatusList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CustomMetricCurrentStatusList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CustomMetricCurrentStatusList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, CustomMetricCurrentStatus{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CustomMetricTarget) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CustomMetricTarget: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CustomMetricTarget: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.TargetValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CustomMetricTargetList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CustomMetricTargetList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CustomMetricTargetList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, CustomMetricTarget{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DaemonSet) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DaemonSet: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DaemonSet: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DaemonSetList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DaemonSetList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DaemonSetList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, DaemonSet{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DaemonSetSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DaemonSetSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DaemonSetSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Selector == nil {
+ m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
+ }
+ if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UpdateStrategy", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.UpdateStrategy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MinReadySeconds", wireType)
+ }
+ m.MinReadySeconds = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.MinReadySeconds |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TemplateGeneration", wireType)
+ }
+ m.TemplateGeneration = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.TemplateGeneration |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RevisionHistoryLimit", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.RevisionHistoryLimit = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DaemonSetStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DaemonSetStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DaemonSetStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentNumberScheduled", wireType)
+ }
+ m.CurrentNumberScheduled = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.CurrentNumberScheduled |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NumberMisscheduled", wireType)
+ }
+ m.NumberMisscheduled = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.NumberMisscheduled |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DesiredNumberScheduled", wireType)
+ }
+ m.DesiredNumberScheduled = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.DesiredNumberScheduled |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NumberReady", wireType)
+ }
+ m.NumberReady = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.NumberReady |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
+ }
+ m.ObservedGeneration = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ObservedGeneration |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UpdatedNumberScheduled", wireType)
+ }
+ m.UpdatedNumberScheduled = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.UpdatedNumberScheduled |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NumberAvailable", wireType)
+ }
+ m.NumberAvailable = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.NumberAvailable |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 8:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NumberUnavailable", wireType)
+ }
+ m.NumberUnavailable = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.NumberUnavailable |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 9:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CollisionCount", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.CollisionCount = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DaemonSetUpdateStrategy) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DaemonSetUpdateStrategy: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DaemonSetUpdateStrategy: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = DaemonSetUpdateStrategyType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RollingUpdate", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.RollingUpdate == nil {
+ m.RollingUpdate = &RollingUpdateDaemonSet{}
+ }
+ if err := m.RollingUpdate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Deployment) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Deployment: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Deployment: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeploymentCondition) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeploymentCondition: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeploymentCondition: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = DeploymentConditionType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Status = k8s_io_kubernetes_pkg_api_v1.ConditionStatus(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastUpdateTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastUpdateTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeploymentList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeploymentList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeploymentList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, Deployment{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeploymentRollback) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeploymentRollback: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeploymentRollback: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAnnotations", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.UpdatedAnnotations == nil {
+ m.UpdatedAnnotations = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.UpdatedAnnotations[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.UpdatedAnnotations[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RollbackTo", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.RollbackTo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeploymentSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeploymentSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeploymentSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Replicas = &v
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Selector == nil {
+ m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
+ }
+ if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Strategy", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Strategy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MinReadySeconds", wireType)
+ }
+ m.MinReadySeconds = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.MinReadySeconds |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RevisionHistoryLimit", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.RevisionHistoryLimit = &v
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Paused", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Paused = bool(v != 0)
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RollbackTo", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.RollbackTo == nil {
+ m.RollbackTo = &RollbackConfig{}
+ }
+ if err := m.RollbackTo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 9:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ProgressDeadlineSeconds", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ProgressDeadlineSeconds = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeploymentStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeploymentStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeploymentStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
+ }
+ m.ObservedGeneration = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ObservedGeneration |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ m.Replicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Replicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UpdatedReplicas", wireType)
+ }
+ m.UpdatedReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.UpdatedReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AvailableReplicas", wireType)
+ }
+ m.AvailableReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.AvailableReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UnavailableReplicas", wireType)
+ }
+ m.UnavailableReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.UnavailableReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Conditions = append(m.Conditions, DeploymentCondition{})
+ if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadyReplicas", wireType)
+ }
+ m.ReadyReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ReadyReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 8:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CollisionCount", wireType)
+ }
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.CollisionCount = &v
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeploymentStrategy) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeploymentStrategy: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeploymentStrategy: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = DeploymentStrategyType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RollingUpdate", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.RollingUpdate == nil {
+ m.RollingUpdate = &RollingUpdateDeployment{}
+ }
+ if err := m.RollingUpdate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *FSGroupStrategyOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: FSGroupStrategyOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: FSGroupStrategyOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Rule = FSGroupStrategyType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Ranges = append(m.Ranges, IDRange{})
+ if err := m.Ranges[len(m.Ranges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HTTPIngressPath) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HTTPIngressPath: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HTTPIngressPath: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Path = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Backend", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Backend.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HTTPIngressRuleValue) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HTTPIngressRuleValue: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HTTPIngressRuleValue: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Paths = append(m.Paths, HTTPIngressPath{})
+ if err := m.Paths[len(m.Paths)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *HostPortRange) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: HostPortRange: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: HostPortRange: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType)
+ }
+ m.Min = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Min |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType)
+ }
+ m.Max = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Max |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *IDRange) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: IDRange: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: IDRange: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType)
+ }
+ m.Min = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Min |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType)
+ }
+ m.Max = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Max |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Ingress) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Ingress: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Ingress: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *IngressBackend) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: IngressBackend: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: IngressBackend: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ServiceName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ServiceName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ServicePort", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ServicePort.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *IngressList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: IngressList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: IngressList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, Ingress{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *IngressRule) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: IngressRule: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: IngressRule: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Host = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IngressRuleValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.IngressRuleValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *IngressRuleValue) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: IngressRuleValue: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: IngressRuleValue: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HTTP", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.HTTP == nil {
+ m.HTTP = &HTTPIngressRuleValue{}
+ }
+ if err := m.HTTP.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *IngressSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: IngressSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: IngressSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Backend", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Backend == nil {
+ m.Backend = &IngressBackend{}
+ }
+ if err := m.Backend.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TLS", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.TLS = append(m.TLS, IngressTLS{})
+ if err := m.TLS[len(m.TLS)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Rules = append(m.Rules, IngressRule{})
+ if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *IngressStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: IngressStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: IngressStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LoadBalancer", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LoadBalancer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *IngressTLS) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: IngressTLS: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: IngressTLS: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Hosts = append(m.Hosts, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecretName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SecretName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NetworkPolicy) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NetworkPolicy: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NetworkPolicy: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NetworkPolicyIngressRule) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NetworkPolicyIngressRule: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NetworkPolicyIngressRule: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Ports = append(m.Ports, NetworkPolicyPort{})
+ if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field From", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.From = append(m.From, NetworkPolicyPeer{})
+ if err := m.From[len(m.From)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NetworkPolicyList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NetworkPolicyList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NetworkPolicyList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, NetworkPolicy{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NetworkPolicyPeer) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NetworkPolicyPeer: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NetworkPolicyPeer: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodSelector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PodSelector == nil {
+ m.PodSelector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
+ }
+ if err := m.PodSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NamespaceSelector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.NamespaceSelector == nil {
+ m.NamespaceSelector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
+ }
+ if err := m.NamespaceSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NetworkPolicyPort) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NetworkPolicyPort: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NetworkPolicyPort: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := k8s_io_kubernetes_pkg_api_v1.Protocol(dAtA[iNdEx:postIndex])
+ m.Protocol = &s
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Port == nil {
+ m.Port = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
+ }
+ if err := m.Port.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NetworkPolicySpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NetworkPolicySpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NetworkPolicySpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodSelector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.PodSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Ingress", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Ingress = append(m.Ingress, NetworkPolicyIngressRule{})
+ if err := m.Ingress[len(m.Ingress)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodSecurityPolicy) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodSecurityPolicy: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodSecurityPolicy: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodSecurityPolicyList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodSecurityPolicyList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodSecurityPolicyList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, PodSecurityPolicy{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodSecurityPolicySpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodSecurityPolicySpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodSecurityPolicySpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Privileged", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Privileged = bool(v != 0)
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DefaultAddCapabilities", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.DefaultAddCapabilities = append(m.DefaultAddCapabilities, k8s_io_kubernetes_pkg_api_v1.Capability(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RequiredDropCapabilities", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.RequiredDropCapabilities = append(m.RequiredDropCapabilities, k8s_io_kubernetes_pkg_api_v1.Capability(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AllowedCapabilities", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.AllowedCapabilities = append(m.AllowedCapabilities, k8s_io_kubernetes_pkg_api_v1.Capability(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Volumes = append(m.Volumes, FSType(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostNetwork", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.HostNetwork = bool(v != 0)
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostPorts", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.HostPorts = append(m.HostPorts, HostPortRange{})
+ if err := m.HostPorts[len(m.HostPorts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostPID", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.HostPID = bool(v != 0)
+ case 9:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostIPC", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.HostIPC = bool(v != 0)
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SELinux", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.SELinux.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 11:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RunAsUser", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.RunAsUser.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 12:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SupplementalGroups", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.SupplementalGroups.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 13:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FSGroup", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.FSGroup.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 14:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadOnlyRootFilesystem", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadOnlyRootFilesystem = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReplicaSet) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReplicaSet: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReplicaSet: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReplicaSetCondition) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReplicaSetCondition: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReplicaSetCondition: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = ReplicaSetConditionType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Status = k8s_io_kubernetes_pkg_api_v1.ConditionStatus(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReplicaSetList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReplicaSetList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReplicaSetList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ReplicaSet{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReplicaSetSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReplicaSetSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReplicaSetSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Replicas = &v
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Selector == nil {
+ m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
+ }
+ if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MinReadySeconds", wireType)
+ }
+ m.MinReadySeconds = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.MinReadySeconds |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReplicaSetStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReplicaSetStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReplicaSetStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ m.Replicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Replicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FullyLabeledReplicas", wireType)
+ }
+ m.FullyLabeledReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.FullyLabeledReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
+ }
+ m.ObservedGeneration = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ObservedGeneration |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadyReplicas", wireType)
+ }
+ m.ReadyReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ReadyReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AvailableReplicas", wireType)
+ }
+ m.AvailableReplicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.AvailableReplicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Conditions = append(m.Conditions, ReplicaSetCondition{})
+ if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReplicationControllerDummy) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReplicationControllerDummy: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReplicationControllerDummy: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RollbackConfig) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RollbackConfig: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RollbackConfig: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType)
+ }
+ m.Revision = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Revision |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RollingUpdateDaemonSet) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RollingUpdateDaemonSet: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RollingUpdateDaemonSet: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MaxUnavailable", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.MaxUnavailable == nil {
+ m.MaxUnavailable = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
+ }
+ if err := m.MaxUnavailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RollingUpdateDeployment) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RollingUpdateDeployment: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RollingUpdateDeployment: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MaxUnavailable", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.MaxUnavailable == nil {
+ m.MaxUnavailable = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
+ }
+ if err := m.MaxUnavailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MaxSurge", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.MaxSurge == nil {
+ m.MaxSurge = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
+ }
+ if err := m.MaxSurge.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RunAsUserStrategyOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RunAsUserStrategyOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RunAsUserStrategyOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Rule = RunAsUserStrategy(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Ranges = append(m.Ranges, IDRange{})
+ if err := m.Ranges[len(m.Ranges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SELinuxStrategyOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SELinuxStrategyOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SELinuxStrategyOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Rule = SELinuxStrategy(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SELinuxOptions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SELinuxOptions == nil {
+ m.SELinuxOptions = &k8s_io_kubernetes_pkg_api_v1.SELinuxOptions{}
+ }
+ if err := m.SELinuxOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Scale) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Scale: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Scale: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ScaleSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ScaleSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ScaleSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ m.Replicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Replicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ScaleStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ScaleStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ScaleStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
+ }
+ m.Replicas = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Replicas |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Selector == nil {
+ m.Selector = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Selector[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Selector[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TargetSelector", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.TargetSelector = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SupplementalGroupsStrategyOptions) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SupplementalGroupsStrategyOptions: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SupplementalGroupsStrategyOptions: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Rule = SupplementalGroupsStrategyType(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Ranges = append(m.Ranges, IDRange{})
+ if err := m.Ranges[len(m.Ranges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ThirdPartyResource) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ThirdPartyResource: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ThirdPartyResource: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Description = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Versions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Versions = append(m.Versions, APIVersion{})
+ if err := m.Versions[len(m.Versions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ThirdPartyResourceData) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ThirdPartyResourceData: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ThirdPartyResourceData: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
+ }
+ var byteLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ byteLen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if byteLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + byteLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
+ if m.Data == nil {
+ m.Data = []byte{}
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ThirdPartyResourceDataList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ThirdPartyResourceDataList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ThirdPartyResourceDataList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ThirdPartyResourceData{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ThirdPartyResourceList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ThirdPartyResourceList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ThirdPartyResourceList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ThirdPartyResource{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 3406 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5b, 0xdd, 0x6f, 0x1b, 0xc7,
+ 0xb5, 0xf7, 0x8a, 0xa4, 0x44, 0x1d, 0x59, 0x92, 0x35, 0x72, 0x64, 0x46, 0x49, 0x24, 0x67, 0x2f,
+ 0x6e, 0xe2, 0xdc, 0x1b, 0x53, 0x37, 0xce, 0x75, 0x6e, 0xe2, 0x24, 0x4e, 0x44, 0xc9, 0x1f, 0xba,
+ 0x90, 0x64, 0x66, 0x48, 0x19, 0x8d, 0xf3, 0xd5, 0x15, 0x39, 0xa2, 0xd6, 0xde, 0xaf, 0xec, 0xce,
+ 0x2a, 0x22, 0x82, 0xb6, 0x01, 0x8a, 0xe6, 0xb1, 0x68, 0x5f, 0x8a, 0x14, 0x68, 0x1f, 0xfb, 0xd0,
+ 0x97, 0x36, 0x79, 0x68, 0xd3, 0xfe, 0x05, 0xf5, 0x43, 0x51, 0xa4, 0x40, 0x0b, 0x04, 0x45, 0x2a,
+ 0xd4, 0x0a, 0x9a, 0x7f, 0xa0, 0xc8, 0x8b, 0x9f, 0x8a, 0x99, 0x9d, 0xfd, 0xde, 0x95, 0x4d, 0x4a,
+ 0x26, 0x0a, 0xf4, 0x4d, 0x9c, 0x39, 0xe7, 0x77, 0x3e, 0xe6, 0xcc, 0x99, 0x33, 0x73, 0x56, 0xf0,
+ 0xf2, 0xad, 0xe7, 0x9d, 0xaa, 0x6a, 0x2e, 0xdc, 0x72, 0x37, 0x89, 0x6d, 0x10, 0x4a, 0x9c, 0x05,
+ 0xeb, 0x56, 0x67, 0x41, 0xb1, 0x54, 0x67, 0x81, 0xec, 0x52, 0x62, 0x38, 0xaa, 0x69, 0x38, 0x0b,
+ 0x3b, 0xcf, 0x6c, 0x12, 0xaa, 0x3c, 0xb3, 0xd0, 0x21, 0x06, 0xb1, 0x15, 0x4a, 0xda, 0x55, 0xcb,
+ 0x36, 0xa9, 0x89, 0xce, 0x7a, 0xec, 0xd5, 0x90, 0xbd, 0x6a, 0xdd, 0xea, 0x54, 0x19, 0x7b, 0x35,
+ 0x64, 0xaf, 0x0a, 0xf6, 0xd9, 0xb3, 0x1d, 0x95, 0x6e, 0xbb, 0x9b, 0xd5, 0x96, 0xa9, 0x2f, 0x74,
+ 0xcc, 0x8e, 0xb9, 0xc0, 0x51, 0x36, 0xdd, 0x2d, 0xfe, 0x8b, 0xff, 0xe0, 0x7f, 0x79, 0xe8, 0xb3,
+ 0xff, 0x2b, 0x94, 0x53, 0x2c, 0x55, 0x57, 0x5a, 0xdb, 0xaa, 0x41, 0xec, 0xae, 0xaf, 0xde, 0x82,
+ 0x4d, 0x1c, 0xd3, 0xb5, 0x5b, 0x24, 0xa9, 0xd3, 0x81, 0x5c, 0xce, 0x82, 0x4e, 0xa8, 0xb2, 0xb0,
+ 0x93, 0xb2, 0x64, 0x76, 0x21, 0x8f, 0xcb, 0x76, 0x0d, 0xaa, 0xea, 0x69, 0x31, 0xcf, 0xdd, 0x8b,
+ 0xc1, 0x69, 0x6d, 0x13, 0x5d, 0x49, 0xf1, 0x3d, 0x9b, 0xc7, 0xe7, 0x52, 0x55, 0x5b, 0x50, 0x0d,
+ 0xea, 0x50, 0x3b, 0xc5, 0xf4, 0x74, 0xee, 0x32, 0x65, 0xd9, 0xf2, 0xc2, 0x01, 0x8b, 0x6a, 0x99,
+ 0x9a, 0xda, 0xea, 0xe6, 0x2d, 0xa8, 0x5c, 0x05, 0x58, 0xac, 0xaf, 0x5c, 0x27, 0x36, 0x5b, 0x38,
+ 0x74, 0x1a, 0x8a, 0x86, 0xa2, 0x93, 0x8a, 0x74, 0x5a, 0x3a, 0x33, 0x5a, 0x3b, 0x7e, 0x7b, 0x6f,
+ 0xfe, 0xd8, 0xfe, 0xde, 0x7c, 0x71, 0x5d, 0xd1, 0x09, 0xe6, 0x33, 0xf2, 0x8f, 0x25, 0x78, 0x78,
+ 0xc9, 0x75, 0xa8, 0xa9, 0xaf, 0x11, 0x6a, 0xab, 0xad, 0x25, 0xd7, 0xb6, 0x89, 0x41, 0x1b, 0x54,
+ 0xa1, 0xae, 0x73, 0x6f, 0x7e, 0x74, 0x03, 0x4a, 0x3b, 0x8a, 0xe6, 0x92, 0xca, 0xd0, 0x69, 0xe9,
+ 0xcc, 0xd8, 0xb9, 0x6a, 0x55, 0x04, 0x54, 0xd4, 0x3b, 0x7e, 0x48, 0x55, 0xfd, 0x25, 0xaf, 0xbe,
+ 0xe6, 0x2a, 0x06, 0x55, 0x69, 0xb7, 0x76, 0x52, 0x40, 0x1e, 0x17, 0x72, 0xaf, 0x33, 0x2c, 0xec,
+ 0x41, 0xca, 0xdf, 0x97, 0xe0, 0xb1, 0x5c, 0xdd, 0x56, 0x55, 0x87, 0x22, 0x1d, 0x4a, 0x2a, 0x25,
+ 0xba, 0x53, 0x91, 0x4e, 0x17, 0xce, 0x8c, 0x9d, 0xbb, 0x5a, 0xed, 0x29, 0x9c, 0xab, 0xb9, 0xe0,
+ 0xb5, 0x71, 0xa1, 0x57, 0x69, 0x85, 0xc1, 0x63, 0x4f, 0x8a, 0xfc, 0x43, 0x09, 0x50, 0x94, 0xa7,
+ 0xa9, 0xd8, 0x1d, 0x42, 0xef, 0xc3, 0x4b, 0xaf, 0x1f, 0xce, 0x4b, 0xd3, 0x02, 0x72, 0xcc, 0x13,
+ 0x18, 0x73, 0xd2, 0x07, 0x12, 0xcc, 0xa4, 0x75, 0xe2, 0xde, 0xd9, 0x8a, 0x7b, 0x67, 0xf1, 0x10,
+ 0xde, 0xf1, 0x50, 0x73, 0xdc, 0xf2, 0xab, 0x21, 0x18, 0x5d, 0x56, 0x88, 0x6e, 0x1a, 0x0d, 0x42,
+ 0xd1, 0x37, 0xa1, 0xcc, 0xf6, 0x68, 0x5b, 0xa1, 0x0a, 0xf7, 0xc8, 0xd8, 0xb9, 0xff, 0x39, 0xc8,
+ 0x5c, 0xa7, 0xca, 0xa8, 0xab, 0x3b, 0xcf, 0x54, 0xaf, 0x6d, 0xde, 0x24, 0x2d, 0xba, 0x46, 0xa8,
+ 0x52, 0x43, 0x42, 0x0e, 0x84, 0x63, 0x38, 0x40, 0x45, 0x6f, 0x43, 0xd1, 0xb1, 0x48, 0x4b, 0x38,
+ 0xf3, 0xa5, 0x1e, 0xcd, 0x0a, 0x34, 0x6d, 0x58, 0xa4, 0x15, 0xae, 0x16, 0xfb, 0x85, 0x39, 0x2e,
+ 0xda, 0x82, 0x61, 0x87, 0x87, 0x41, 0xa5, 0xc0, 0x25, 0x5c, 0xec, 0x5b, 0x82, 0x17, 0x4c, 0x13,
+ 0x42, 0xc6, 0xb0, 0xf7, 0x1b, 0x0b, 0x74, 0xf9, 0xf7, 0x12, 0x8c, 0x07, 0xb4, 0x7c, 0xc5, 0xde,
+ 0x4c, 0xf9, 0xae, 0x7a, 0x7f, 0xbe, 0x63, 0xdc, 0xdc, 0x73, 0x27, 0x84, 0xac, 0xb2, 0x3f, 0x12,
+ 0xf1, 0xdb, 0x5b, 0x7e, 0x3c, 0x0c, 0xf1, 0x78, 0x78, 0xbe, 0x5f, 0xb3, 0x72, 0xc2, 0xe0, 0x93,
+ 0x62, 0xc4, 0x1c, 0xe6, 0x4e, 0xf4, 0x16, 0x94, 0x1d, 0xa2, 0x91, 0x16, 0x35, 0x6d, 0x61, 0xce,
+ 0xb3, 0xf7, 0x69, 0x8e, 0xb2, 0x49, 0xb4, 0x86, 0x60, 0xad, 0x1d, 0x67, 0xf6, 0xf8, 0xbf, 0x70,
+ 0x00, 0x89, 0xde, 0x80, 0x32, 0x25, 0xba, 0xa5, 0x29, 0xd4, 0xdf, 0x58, 0x67, 0xf3, 0x4d, 0x62,
+ 0xb0, 0x75, 0xb3, 0xdd, 0x14, 0x0c, 0x7c, 0xf1, 0x03, 0x67, 0xf9, 0xa3, 0x38, 0x00, 0x44, 0x1f,
+ 0x4a, 0x30, 0xe1, 0x5a, 0x6d, 0x46, 0x4a, 0x59, 0x82, 0xed, 0x74, 0x45, 0x34, 0x5c, 0xee, 0xd7,
+ 0x6d, 0x1b, 0x31, 0xb4, 0xda, 0x8c, 0x10, 0x3e, 0x11, 0x1f, 0xc7, 0x09, 0xa9, 0x68, 0x11, 0x26,
+ 0x75, 0xd5, 0xc0, 0x44, 0x69, 0x77, 0x1b, 0xa4, 0x65, 0x1a, 0x6d, 0xa7, 0x52, 0x3c, 0x2d, 0x9d,
+ 0x29, 0xd5, 0x4e, 0x09, 0x80, 0xc9, 0xb5, 0xf8, 0x34, 0x4e, 0xd2, 0xa3, 0xff, 0x07, 0xe4, 0xdb,
+ 0x75, 0xc5, 0x3b, 0x2f, 0x54, 0xd3, 0xa8, 0x94, 0x4e, 0x4b, 0x67, 0x0a, 0xb5, 0x59, 0x81, 0x82,
+ 0x9a, 0x29, 0x0a, 0x9c, 0xc1, 0x85, 0x56, 0xe1, 0xa4, 0x4d, 0x76, 0x54, 0x66, 0xe3, 0x55, 0xd5,
+ 0xa1, 0xa6, 0xdd, 0x5d, 0x55, 0x75, 0x95, 0x56, 0x86, 0xb9, 0x4e, 0x95, 0xfd, 0xbd, 0xf9, 0x93,
+ 0x38, 0x63, 0x1e, 0x67, 0x72, 0xc9, 0x1f, 0x97, 0x60, 0x32, 0xb1, 0x5d, 0xd0, 0x75, 0x98, 0x69,
+ 0x79, 0xc9, 0x78, 0xdd, 0xd5, 0x37, 0x89, 0xdd, 0x68, 0x6d, 0x93, 0xb6, 0xab, 0x91, 0x36, 0x8f,
+ 0xa1, 0x52, 0x6d, 0x4e, 0x68, 0x3c, 0xb3, 0x94, 0x49, 0x85, 0x73, 0xb8, 0x99, 0x17, 0x0c, 0x3e,
+ 0xb4, 0xa6, 0x3a, 0x4e, 0x80, 0x39, 0xc4, 0x31, 0x03, 0x2f, 0xac, 0xa7, 0x28, 0x70, 0x06, 0x17,
+ 0xd3, 0xb1, 0x4d, 0x1c, 0xd5, 0x26, 0xed, 0xa4, 0x8e, 0x85, 0xb8, 0x8e, 0xcb, 0x99, 0x54, 0x38,
+ 0x87, 0x1b, 0x9d, 0x87, 0x31, 0x4f, 0x1a, 0x5f, 0x3f, 0xb1, 0xd0, 0x41, 0xfa, 0x5f, 0x0f, 0xa7,
+ 0x70, 0x94, 0x8e, 0x99, 0x66, 0x6e, 0x3a, 0xc4, 0xde, 0x21, 0xed, 0xfc, 0x05, 0xbe, 0x96, 0xa2,
+ 0xc0, 0x19, 0x5c, 0xcc, 0x34, 0x2f, 0x02, 0x53, 0xa6, 0x0d, 0xc7, 0x4d, 0xdb, 0xc8, 0xa4, 0xc2,
+ 0x39, 0xdc, 0x2c, 0x8e, 0x3d, 0x95, 0x17, 0x77, 0x14, 0x55, 0x53, 0x36, 0x35, 0x52, 0x19, 0x89,
+ 0xc7, 0xf1, 0x7a, 0x7c, 0x1a, 0x27, 0xe9, 0xd1, 0x15, 0x98, 0xf2, 0x86, 0x36, 0x0c, 0x25, 0x00,
+ 0x29, 0x73, 0x90, 0x87, 0x05, 0xc8, 0xd4, 0x7a, 0x92, 0x00, 0xa7, 0x79, 0xd0, 0x05, 0x98, 0x68,
+ 0x99, 0x9a, 0xc6, 0xe3, 0x71, 0xc9, 0x74, 0x0d, 0x5a, 0x19, 0xe5, 0xbe, 0x42, 0x6c, 0x3f, 0x2e,
+ 0xc5, 0x66, 0x70, 0x82, 0x52, 0xfe, 0x8b, 0x04, 0xa7, 0x72, 0xf6, 0x34, 0x7a, 0x05, 0x8a, 0xb4,
+ 0x6b, 0xf9, 0x95, 0xc0, 0x7f, 0xfb, 0x67, 0x4b, 0xb3, 0x6b, 0x91, 0xbb, 0x7b, 0xf3, 0x8f, 0xe4,
+ 0xb0, 0xb1, 0x69, 0xcc, 0x19, 0xd1, 0xb7, 0x61, 0xdc, 0x66, 0xe2, 0x8c, 0x8e, 0x47, 0x22, 0xf2,
+ 0xda, 0xa5, 0x1e, 0x73, 0x0e, 0x8e, 0x62, 0x84, 0x79, 0x7b, 0x6a, 0x7f, 0x6f, 0x7e, 0x3c, 0x36,
+ 0x87, 0xe3, 0xe2, 0xe4, 0xdf, 0x0c, 0x01, 0x2c, 0x13, 0x4b, 0x33, 0xbb, 0x3a, 0x31, 0x06, 0x71,
+ 0x96, 0xbf, 0x13, 0x3b, 0xcb, 0x5f, 0xee, 0x35, 0xb7, 0x06, 0xaa, 0xe6, 0x1e, 0xe6, 0x9d, 0xc4,
+ 0x61, 0xfe, 0x4a, 0xff, 0x22, 0x0e, 0x3e, 0xcd, 0xef, 0x14, 0x60, 0x3a, 0x24, 0x5e, 0x32, 0x8d,
+ 0xb6, 0xca, 0xf7, 0xd3, 0x8b, 0xb1, 0x98, 0x78, 0x32, 0x11, 0x13, 0xa7, 0x32, 0x58, 0x22, 0xf1,
+ 0x70, 0x3d, 0xd0, 0x7e, 0x88, 0xb3, 0x5f, 0x8c, 0x0b, 0xbf, 0xbb, 0x37, 0x7f, 0xe0, 0xcd, 0xa2,
+ 0x1a, 0x60, 0xc6, 0x95, 0x45, 0x4f, 0xc0, 0xb0, 0x4d, 0x14, 0xc7, 0x34, 0x78, 0x8a, 0x19, 0x0d,
+ 0x8d, 0xc2, 0x7c, 0x14, 0x8b, 0x59, 0xf4, 0x14, 0x8c, 0xe8, 0xc4, 0x71, 0x94, 0x0e, 0xe1, 0xd9,
+ 0x64, 0xb4, 0x36, 0x29, 0x08, 0x47, 0xd6, 0xbc, 0x61, 0xec, 0xcf, 0xa3, 0x9b, 0x30, 0xa1, 0x29,
+ 0x8e, 0x08, 0xed, 0xa6, 0xaa, 0x13, 0x9e, 0x2f, 0xc6, 0xce, 0xfd, 0xd7, 0xfd, 0x45, 0x0c, 0xe3,
+ 0x08, 0xcf, 0xc4, 0xd5, 0x18, 0x12, 0x4e, 0x20, 0xa3, 0x1d, 0x40, 0x6c, 0xa4, 0x69, 0x2b, 0x86,
+ 0xe3, 0xb9, 0x8c, 0xc9, 0x1b, 0xe9, 0x59, 0x5e, 0x90, 0x1b, 0x57, 0x53, 0x68, 0x38, 0x43, 0x82,
+ 0xfc, 0x07, 0x09, 0x26, 0xc2, 0x05, 0x1b, 0x40, 0xc9, 0xf6, 0x76, 0xbc, 0x64, 0x7b, 0xa1, 0xef,
+ 0xe0, 0xcd, 0xa9, 0xd9, 0x3e, 0x2a, 0x00, 0x0a, 0x89, 0x58, 0x6a, 0xd8, 0x54, 0x5a, 0xb7, 0xee,
+ 0xe3, 0x46, 0xf3, 0x33, 0x09, 0x90, 0x48, 0xf4, 0x8b, 0x86, 0x61, 0x52, 0x7e, 0x76, 0xf8, 0x6a,
+ 0xbe, 0xde, 0xb7, 0x9a, 0xbe, 0x06, 0xd5, 0x8d, 0x14, 0xf6, 0x25, 0x83, 0xda, 0xdd, 0x70, 0xc5,
+ 0xd2, 0x04, 0x38, 0x43, 0x21, 0xf4, 0x2e, 0x80, 0x2d, 0x30, 0x9b, 0xa6, 0x48, 0x01, 0x2f, 0xf7,
+ 0x91, 0x4d, 0x19, 0xc0, 0x92, 0x69, 0x6c, 0xa9, 0x9d, 0x30, 0xa1, 0xe1, 0x00, 0x18, 0x47, 0x84,
+ 0xcc, 0x5e, 0x82, 0x53, 0x39, 0xda, 0xa3, 0x13, 0x50, 0xb8, 0x45, 0xba, 0x9e, 0x5b, 0x31, 0xfb,
+ 0x13, 0x9d, 0x8c, 0xde, 0x0c, 0x47, 0xc5, 0xa5, 0xee, 0xc2, 0xd0, 0xf3, 0x92, 0xfc, 0x55, 0x29,
+ 0x1a, 0x6b, 0xbc, 0x9e, 0x3e, 0x03, 0x65, 0x9b, 0x58, 0x9a, 0xda, 0x52, 0x1c, 0x51, 0x0b, 0xf1,
+ 0xd2, 0x18, 0x8b, 0x31, 0x1c, 0xcc, 0xc6, 0x2a, 0xef, 0xa1, 0x07, 0x5b, 0x79, 0x17, 0x8e, 0xba,
+ 0xf2, 0x36, 0xa1, 0xec, 0xf8, 0x25, 0x77, 0x91, 0x83, 0x2f, 0x1e, 0x22, 0x67, 0x8b, 0x6a, 0x3b,
+ 0x10, 0x18, 0xd4, 0xd9, 0x81, 0x90, 0xac, 0x0a, 0xbb, 0xd4, 0x63, 0x85, 0x7d, 0xa4, 0x55, 0x31,
+ 0xcb, 0xce, 0x96, 0xe2, 0x3a, 0xa4, 0xcd, 0x53, 0x5a, 0x39, 0xcc, 0xce, 0x75, 0x3e, 0x8a, 0xc5,
+ 0x2c, 0xd2, 0x63, 0xc1, 0x5d, 0x3e, 0x8a, 0xe0, 0x9e, 0xc8, 0x0f, 0x6c, 0xb4, 0x01, 0xa7, 0x2c,
+ 0xdb, 0xec, 0xd8, 0xc4, 0x71, 0x96, 0x89, 0xd2, 0xd6, 0x54, 0x83, 0xf8, 0xfe, 0x1a, 0xe5, 0x76,
+ 0x3e, 0xb2, 0xbf, 0x37, 0x7f, 0xaa, 0x9e, 0x4d, 0x82, 0xf3, 0x78, 0xe5, 0xcf, 0x8b, 0x70, 0x22,
+ 0x79, 0xca, 0xe6, 0x54, 0xb4, 0x52, 0x5f, 0x15, 0xed, 0xd3, 0x91, 0x6d, 0xe3, 0x95, 0xfb, 0x41,
+ 0x34, 0x64, 0x6c, 0x9d, 0x45, 0x98, 0x14, 0x79, 0xc4, 0x9f, 0x14, 0x35, 0x7d, 0x10, 0x0d, 0x1b,
+ 0xf1, 0x69, 0x9c, 0xa4, 0x67, 0x75, 0x6a, 0x58, 0x7e, 0xfa, 0x20, 0xc5, 0x78, 0x9d, 0xba, 0x98,
+ 0x24, 0xc0, 0x69, 0x1e, 0xb4, 0x06, 0xd3, 0xae, 0x91, 0x86, 0xf2, 0xa2, 0xf3, 0x11, 0x01, 0x35,
+ 0xbd, 0x91, 0x26, 0xc1, 0x59, 0x7c, 0x68, 0x07, 0xa0, 0xe5, 0x17, 0x04, 0x4e, 0x65, 0x98, 0xe7,
+ 0xea, 0x5a, 0xdf, 0x7b, 0x2b, 0xa8, 0x2d, 0xc2, 0x8c, 0x18, 0x0c, 0x39, 0x38, 0x22, 0x09, 0xbd,
+ 0x08, 0xe3, 0x36, 0xbf, 0xb4, 0xf8, 0x06, 0x78, 0x85, 0xff, 0x43, 0x82, 0x6d, 0x1c, 0x47, 0x27,
+ 0x71, 0x9c, 0x36, 0xa3, 0x56, 0x2f, 0xdf, 0x77, 0xad, 0xfe, 0x47, 0x29, 0x7a, 0xbc, 0x05, 0x65,
+ 0xfa, 0x85, 0x58, 0x49, 0xf6, 0x44, 0xa2, 0x24, 0x9b, 0x49, 0x73, 0x44, 0x2a, 0xb2, 0xef, 0x64,
+ 0x57, 0xe8, 0x97, 0x0f, 0x55, 0xa1, 0x87, 0xc7, 0xf4, 0xbd, 0x4b, 0xf4, 0x4f, 0x24, 0x98, 0xb9,
+ 0xdc, 0xb8, 0x62, 0x9b, 0xae, 0xe5, 0xab, 0x77, 0xcd, 0xf2, 0xfc, 0xfc, 0x7f, 0x50, 0xb4, 0x5d,
+ 0xcd, 0xb7, 0xeb, 0x3f, 0x7c, 0xbb, 0xb0, 0xab, 0x31, 0xbb, 0xa6, 0x13, 0x5c, 0x9e, 0x51, 0x8c,
+ 0x01, 0xbd, 0x0d, 0xc3, 0xb6, 0x62, 0x74, 0x88, 0x7f, 0x80, 0x3f, 0xd7, 0xa3, 0x35, 0x2b, 0xcb,
+ 0x98, 0xb1, 0x47, 0xca, 0x48, 0x8e, 0x86, 0x05, 0xaa, 0xfc, 0x53, 0x09, 0x26, 0xaf, 0x36, 0x9b,
+ 0xf5, 0x15, 0x83, 0x67, 0x80, 0xba, 0x42, 0xb7, 0x59, 0x8d, 0x61, 0x29, 0x74, 0x3b, 0x59, 0x63,
+ 0xb0, 0x39, 0xcc, 0x67, 0xd0, 0x36, 0x8c, 0xb0, 0xcc, 0x43, 0x8c, 0x76, 0x9f, 0xd7, 0x03, 0x21,
+ 0xae, 0xe6, 0x81, 0x84, 0xb5, 0xab, 0x18, 0xc0, 0x3e, 0xbc, 0xfc, 0x3e, 0x9c, 0x8c, 0xa8, 0xc7,
+ 0xfc, 0xc5, 0xdf, 0x58, 0x51, 0x0b, 0x4a, 0x4c, 0x13, 0xff, 0x05, 0xb5, 0xd7, 0x87, 0xc0, 0x84,
+ 0xc9, 0x61, 0x0d, 0xc6, 0x7e, 0x39, 0xd8, 0xc3, 0x96, 0xd7, 0x60, 0xfc, 0xaa, 0xe9, 0xd0, 0xba,
+ 0x69, 0x53, 0xee, 0x36, 0xf4, 0x18, 0x14, 0x74, 0xd5, 0x10, 0x27, 0xfc, 0x98, 0xe0, 0x29, 0xb0,
+ 0x33, 0x88, 0x8d, 0xf3, 0x69, 0x65, 0x57, 0x64, 0xb2, 0x70, 0x5a, 0xd9, 0xc5, 0x6c, 0x5c, 0xbe,
+ 0x02, 0x23, 0x62, 0x39, 0xa2, 0x40, 0x85, 0x83, 0x81, 0x0a, 0x19, 0x40, 0xbf, 0x1c, 0x82, 0x11,
+ 0xa1, 0xfd, 0x00, 0x2e, 0x82, 0x6f, 0xc6, 0x2e, 0x82, 0x17, 0xfa, 0x5b, 0xe9, 0xdc, 0x5b, 0x60,
+ 0x3b, 0x71, 0x0b, 0x7c, 0xa9, 0x4f, 0xfc, 0x83, 0xaf, 0x80, 0x1f, 0x4b, 0x30, 0x11, 0x8f, 0x39,
+ 0x74, 0x1e, 0xc6, 0xd8, 0x79, 0xa4, 0xb6, 0xc8, 0x7a, 0x58, 0x50, 0x07, 0x0f, 0x3a, 0x8d, 0x70,
+ 0x0a, 0x47, 0xe9, 0x50, 0x27, 0x60, 0x63, 0x61, 0x21, 0x9c, 0x92, 0xef, 0x72, 0x97, 0xaa, 0x5a,
+ 0xd5, 0x6b, 0x3d, 0x55, 0x57, 0x0c, 0x7a, 0xcd, 0x6e, 0x50, 0x5b, 0x35, 0x3a, 0x29, 0x41, 0x3c,
+ 0xc6, 0xa2, 0xc8, 0xf2, 0x6d, 0x09, 0xc6, 0x84, 0xca, 0x03, 0xb8, 0xce, 0xbc, 0x11, 0xbf, 0xce,
+ 0x3c, 0xd7, 0xe7, 0x7e, 0xce, 0xbe, 0xcb, 0x7c, 0x1a, 0x9a, 0xc2, 0x76, 0x30, 0x4b, 0x30, 0xdb,
+ 0xa6, 0x43, 0x93, 0x09, 0x86, 0xed, 0x35, 0xcc, 0x67, 0xd0, 0xf7, 0x24, 0x38, 0xa1, 0x26, 0xf6,
+ 0xbc, 0xf0, 0xf5, 0x2b, 0xfd, 0xa9, 0x16, 0xc0, 0xd4, 0x2a, 0x42, 0xde, 0x89, 0xe4, 0x0c, 0x4e,
+ 0x89, 0x94, 0x5d, 0x48, 0x51, 0x21, 0x05, 0x8a, 0xdb, 0x94, 0x5a, 0x62, 0x11, 0x96, 0xfa, 0xcf,
+ 0x3c, 0xa1, 0x4a, 0x65, 0x6e, 0x7e, 0xb3, 0x59, 0xc7, 0x1c, 0x5a, 0xfe, 0xc5, 0x50, 0xe0, 0xb0,
+ 0x86, 0xb7, 0x49, 0x82, 0x7c, 0x2b, 0x1d, 0x45, 0xbe, 0x1d, 0xcb, 0xca, 0xb5, 0xe8, 0x1b, 0x50,
+ 0xa0, 0x5a, 0xbf, 0x17, 0x5a, 0x21, 0xa1, 0xb9, 0xda, 0x08, 0x13, 0x56, 0x73, 0xb5, 0x81, 0x19,
+ 0x24, 0x7a, 0x07, 0x4a, 0xec, 0x34, 0x63, 0x7b, 0xbc, 0xd0, 0x7f, 0x0e, 0x61, 0xfe, 0x0a, 0x23,
+ 0x8c, 0xfd, 0x72, 0xb0, 0x87, 0x2b, 0xbf, 0x0f, 0xe3, 0xb1, 0x44, 0x80, 0x6e, 0xc2, 0x71, 0xcd,
+ 0x54, 0xda, 0x35, 0x45, 0x53, 0x8c, 0x16, 0xb1, 0x93, 0xa9, 0x31, 0xfb, 0x2e, 0xb4, 0x1a, 0xe1,
+ 0x10, 0x09, 0x25, 0x68, 0x83, 0x46, 0xe7, 0x70, 0x0c, 0x5b, 0x56, 0x00, 0x42, 0xeb, 0xd1, 0x3c,
+ 0x94, 0x58, 0x08, 0x7b, 0x27, 0xd3, 0x68, 0x6d, 0x94, 0xe9, 0xca, 0x22, 0xdb, 0xc1, 0xde, 0x38,
+ 0x3a, 0x07, 0xe0, 0x90, 0x96, 0x4d, 0x28, 0xcf, 0x3b, 0xde, 0xeb, 0x51, 0x90, 0x81, 0x1b, 0xc1,
+ 0x0c, 0x8e, 0x50, 0xc9, 0x7f, 0x96, 0x60, 0x7c, 0x9d, 0xd0, 0xf7, 0x4c, 0xfb, 0x56, 0x9d, 0xb7,
+ 0x99, 0x07, 0x90, 0xf7, 0x37, 0x63, 0x79, 0xff, 0xd5, 0x1e, 0xd7, 0x2c, 0xa6, 0x6d, 0x5e, 0xf6,
+ 0x97, 0xff, 0x2e, 0x41, 0x25, 0x46, 0x19, 0x4d, 0x13, 0x04, 0x4a, 0x96, 0x69, 0x53, 0xff, 0x8c,
+ 0x3f, 0x94, 0x06, 0x2c, 0xa5, 0x46, 0x4e, 0x79, 0x06, 0x8b, 0x3d, 0x74, 0x66, 0xe7, 0x96, 0x6d,
+ 0xea, 0x22, 0xee, 0x0f, 0x27, 0x85, 0x10, 0x3b, 0xb4, 0xf3, 0xb2, 0x6d, 0xea, 0x98, 0x63, 0xcb,
+ 0x7f, 0x92, 0x60, 0x2a, 0x46, 0x39, 0x80, 0x94, 0xae, 0xc4, 0x53, 0xfa, 0x4b, 0x87, 0x31, 0x2c,
+ 0x27, 0xb1, 0x7f, 0x9d, 0x34, 0x8b, 0x39, 0x00, 0x6d, 0xc1, 0x98, 0x65, 0xb6, 0x1b, 0x47, 0xd0,
+ 0x5f, 0x9c, 0x64, 0x27, 0x64, 0x3d, 0xc4, 0xc2, 0x51, 0x60, 0xb4, 0x0b, 0x53, 0x86, 0xa2, 0x13,
+ 0xc7, 0x52, 0x5a, 0xa4, 0x71, 0x04, 0x6f, 0x2a, 0x0f, 0xf1, 0x2e, 0x45, 0x12, 0x11, 0xa7, 0x85,
+ 0xc8, 0xbf, 0x4e, 0xd9, 0x6d, 0xda, 0x14, 0xbd, 0x06, 0x65, 0xfe, 0xa9, 0x47, 0xcb, 0xd4, 0xc4,
+ 0xd1, 0x76, 0x9e, 0x2d, 0x4d, 0x5d, 0x8c, 0xdd, 0xdd, 0x9b, 0xff, 0xcf, 0x03, 0x9f, 0x84, 0x7d,
+ 0x42, 0x1c, 0xc0, 0xa0, 0x75, 0x28, 0x5a, 0x87, 0x29, 0x33, 0xf8, 0xc1, 0xc2, 0x6b, 0x0b, 0x8e,
+ 0x23, 0xff, 0x23, 0xa9, 0x38, 0x3f, 0x5e, 0x6e, 0x1e, 0xd9, 0x82, 0x05, 0x65, 0x4d, 0xee, 0xa2,
+ 0xd9, 0x30, 0x22, 0x4e, 0x59, 0x11, 0x97, 0x57, 0x0e, 0x13, 0x97, 0xd1, 0x93, 0x21, 0xb8, 0x44,
+ 0xf8, 0x83, 0xbe, 0x20, 0xf9, 0xaf, 0x12, 0x4c, 0x71, 0x85, 0x5a, 0xae, 0xad, 0xd2, 0xee, 0xc0,
+ 0x32, 0xe8, 0x56, 0x2c, 0x83, 0x2e, 0xf7, 0x68, 0x68, 0x4a, 0xe3, 0xdc, 0x2c, 0xfa, 0x85, 0x04,
+ 0x0f, 0xa5, 0xa8, 0x07, 0x90, 0x61, 0x48, 0x3c, 0xc3, 0xbc, 0x7a, 0x58, 0x03, 0x73, 0xb2, 0xcc,
+ 0x6d, 0xc8, 0x30, 0x8f, 0x07, 0xee, 0x39, 0x00, 0xcb, 0x56, 0x77, 0x54, 0x8d, 0x74, 0x44, 0x13,
+ 0xba, 0x1c, 0x2e, 0x49, 0x3d, 0x98, 0xc1, 0x11, 0x2a, 0xf4, 0x2d, 0x98, 0x69, 0x93, 0x2d, 0xc5,
+ 0xd5, 0xe8, 0x62, 0xbb, 0xbd, 0xa4, 0x58, 0xca, 0xa6, 0xaa, 0xa9, 0x54, 0x15, 0x37, 0xec, 0xd1,
+ 0xda, 0x25, 0xaf, 0x39, 0x9c, 0x45, 0x71, 0x77, 0x6f, 0xfe, 0xc9, 0x83, 0x9b, 0x3a, 0x3e, 0x71,
+ 0x17, 0xe7, 0x08, 0x41, 0xdf, 0x95, 0xa0, 0x62, 0x93, 0x77, 0x5d, 0xd5, 0x26, 0xed, 0x65, 0xdb,
+ 0xb4, 0x62, 0x1a, 0x14, 0xb8, 0x06, 0x57, 0xf6, 0xf7, 0xe6, 0x2b, 0x38, 0x87, 0xa6, 0x17, 0x1d,
+ 0x72, 0x05, 0x21, 0x0a, 0xd3, 0x8a, 0xa6, 0x99, 0xef, 0x91, 0xb8, 0x07, 0x8a, 0x5c, 0x7e, 0x6d,
+ 0x7f, 0x6f, 0x7e, 0x7a, 0x31, 0x3d, 0xdd, 0x8b, 0xe8, 0x2c, 0x78, 0xb4, 0x00, 0x23, 0x3b, 0xa6,
+ 0xe6, 0xea, 0xc4, 0xa9, 0x94, 0xb8, 0x24, 0x96, 0x71, 0x47, 0xae, 0x7b, 0x43, 0x77, 0xf7, 0xe6,
+ 0x87, 0x2f, 0x37, 0xf8, 0xd3, 0x87, 0x4f, 0xc5, 0xee, 0x68, 0xac, 0x66, 0x12, 0x5b, 0x9e, 0xbf,
+ 0xd9, 0x96, 0xc3, 0x1c, 0x73, 0x35, 0x9c, 0xc2, 0x51, 0x3a, 0xa4, 0xc3, 0xe8, 0xb6, 0xb8, 0xb7,
+ 0x3b, 0x95, 0x91, 0xbe, 0x4e, 0xbf, 0xd8, 0xbd, 0xbf, 0x36, 0x25, 0x44, 0x8e, 0xfa, 0xc3, 0x0e,
+ 0x0e, 0x25, 0xa0, 0xa7, 0x60, 0x84, 0xff, 0x58, 0x59, 0xe6, 0x0f, 0x60, 0xe5, 0x30, 0x13, 0x5d,
+ 0xf5, 0x86, 0xb1, 0x3f, 0xef, 0x93, 0xae, 0xd4, 0x97, 0xf8, 0xc3, 0x6c, 0x82, 0x74, 0xa5, 0xbe,
+ 0x84, 0xfd, 0x79, 0x64, 0xc1, 0x88, 0x43, 0x56, 0x55, 0xc3, 0xdd, 0xad, 0x40, 0x5f, 0xad, 0xe6,
+ 0xc6, 0x25, 0xce, 0x9d, 0x78, 0x8a, 0x0a, 0x25, 0x8a, 0x79, 0xec, 0x8b, 0x41, 0xbb, 0x30, 0x6a,
+ 0xbb, 0xc6, 0xa2, 0xb3, 0xe1, 0x10, 0xbb, 0x32, 0xc6, 0x65, 0xf6, 0x9a, 0x9c, 0xb1, 0xcf, 0x9f,
+ 0x94, 0x1a, 0x78, 0x30, 0xa0, 0xc0, 0xa1, 0x30, 0xf4, 0x13, 0x09, 0x90, 0xe3, 0x5a, 0x96, 0x46,
+ 0x74, 0x62, 0x50, 0x45, 0xe3, 0xaf, 0x61, 0x4e, 0xe5, 0x38, 0xd7, 0xa1, 0xde, 0xab, 0xdd, 0x29,
+ 0xa0, 0xa4, 0x32, 0xc1, 0x33, 0x75, 0x9a, 0x14, 0x67, 0xe8, 0xc1, 0x96, 0x62, 0xcb, 0xe1, 0x7f,
+ 0x57, 0xc6, 0xfb, 0x5a, 0x8a, 0xec, 0x57, 0xc1, 0x70, 0x29, 0xc4, 0x3c, 0xf6, 0xc5, 0xa0, 0xeb,
+ 0x30, 0x63, 0x13, 0xa5, 0x7d, 0xcd, 0xd0, 0xba, 0xd8, 0x34, 0xe9, 0x65, 0x55, 0x23, 0x4e, 0xd7,
+ 0xa1, 0x44, 0xaf, 0x4c, 0xf0, 0xb0, 0x09, 0x3e, 0xf5, 0xc0, 0x99, 0x54, 0x38, 0x87, 0x9b, 0x7f,
+ 0x45, 0x20, 0xde, 0x6f, 0x07, 0xf3, 0x45, 0xe0, 0xe1, 0xbe, 0x22, 0x08, 0x55, 0x7d, 0x60, 0x5f,
+ 0x11, 0x44, 0x44, 0x1c, 0xfc, 0x84, 0xf4, 0xf5, 0x10, 0x4c, 0x87, 0xc4, 0xf7, 0xfd, 0x15, 0x41,
+ 0x06, 0xcb, 0x00, 0xbe, 0x22, 0xc8, 0x6e, 0xc3, 0x17, 0x1e, 0x74, 0x1b, 0xfe, 0x01, 0x7c, 0xbd,
+ 0xc0, 0x3b, 0xfb, 0xa1, 0x13, 0xff, 0xf5, 0x3b, 0xfb, 0xa1, 0xae, 0x39, 0xe5, 0xcc, 0x6f, 0x87,
+ 0xa2, 0x06, 0xfd, 0x1b, 0xb5, 0x8f, 0x0f, 0xff, 0xbd, 0xa4, 0xfc, 0x45, 0x01, 0x4e, 0x24, 0x77,
+ 0x6c, 0xac, 0x8b, 0x28, 0xdd, 0xb3, 0x8b, 0x58, 0x87, 0x93, 0x5b, 0xae, 0xa6, 0x75, 0xb9, 0x43,
+ 0x22, 0xad, 0x44, 0xef, 0xd5, 0xfe, 0x51, 0xc1, 0x79, 0xf2, 0x72, 0x06, 0x0d, 0xce, 0xe4, 0xcc,
+ 0xe9, 0x88, 0x16, 0xfa, 0xea, 0x88, 0xa6, 0x1a, 0x72, 0xc5, 0x1e, 0x1a, 0x72, 0x99, 0xdd, 0xcd,
+ 0x52, 0x1f, 0xdd, 0xcd, 0xa3, 0x68, 0x47, 0x66, 0x24, 0xbe, 0x7b, 0xb5, 0x23, 0xe5, 0x47, 0x61,
+ 0x56, 0xb0, 0x51, 0xde, 0x29, 0x34, 0xa8, 0x6d, 0x6a, 0x1a, 0xb1, 0x97, 0x5d, 0x5d, 0xef, 0xca,
+ 0x17, 0x61, 0x22, 0xde, 0x13, 0xf7, 0x56, 0xde, 0x6b, 0xd3, 0x8b, 0x5e, 0x4a, 0x64, 0xe5, 0xbd,
+ 0x71, 0x1c, 0x50, 0xc8, 0x1f, 0x4a, 0x30, 0x93, 0xfd, 0xfd, 0x1d, 0xd2, 0x60, 0x42, 0x57, 0x76,
+ 0xa3, 0x1f, 0x2f, 0x4a, 0x7d, 0xde, 0xb8, 0x79, 0xf3, 0x73, 0x2d, 0x86, 0x85, 0x13, 0xd8, 0xf2,
+ 0x97, 0x12, 0x9c, 0xca, 0x69, 0x33, 0x0e, 0x56, 0x13, 0x74, 0x03, 0xca, 0xba, 0xb2, 0xdb, 0x70,
+ 0xed, 0x0e, 0xe9, 0xfb, 0x8d, 0x81, 0xe7, 0x92, 0x35, 0x81, 0x82, 0x03, 0x3c, 0xf9, 0x13, 0x09,
+ 0x2a, 0x79, 0xf5, 0x20, 0x3a, 0x1f, 0x6b, 0x88, 0x3e, 0x9e, 0x68, 0x88, 0x4e, 0xa5, 0xf8, 0x06,
+ 0xd4, 0x0e, 0xfd, 0x54, 0x82, 0x99, 0xec, 0xba, 0x19, 0x3d, 0x1b, 0xd3, 0x78, 0x3e, 0xa1, 0xf1,
+ 0x64, 0x82, 0x4b, 0xe8, 0xbb, 0x0d, 0x13, 0xa2, 0xba, 0x16, 0x30, 0xc2, 0xcb, 0x4f, 0x1f, 0x9c,
+ 0x55, 0x05, 0x98, 0x5f, 0x27, 0xf2, 0x95, 0x8c, 0x8f, 0xe1, 0x04, 0xae, 0xfc, 0xf3, 0x21, 0x28,
+ 0x35, 0x5a, 0x8a, 0x46, 0x06, 0x50, 0xd4, 0xdd, 0x88, 0x15, 0x75, 0xbd, 0xfe, 0xb7, 0x02, 0xd7,
+ 0x32, 0xb7, 0x9e, 0xdb, 0x4c, 0xd4, 0x73, 0x17, 0xfa, 0x42, 0x3f, 0xb8, 0x94, 0x7b, 0x01, 0x46,
+ 0x03, 0x25, 0x7a, 0x3b, 0x3d, 0xe4, 0x8f, 0x87, 0x60, 0x2c, 0x22, 0xa2, 0xc7, 0xb3, 0x67, 0x27,
+ 0x76, 0x7a, 0xf7, 0xf3, 0x8f, 0x51, 0x11, 0xd9, 0x55, 0xff, 0xfc, 0xf6, 0xbe, 0xbf, 0x0b, 0xbf,
+ 0xa3, 0x4a, 0x1f, 0xeb, 0x17, 0x61, 0x82, 0xf2, 0xff, 0x13, 0x0a, 0xde, 0xf8, 0x0a, 0x3c, 0x8a,
+ 0x83, 0xaf, 0x3a, 0x9b, 0xb1, 0x59, 0x9c, 0xa0, 0x9e, 0x7d, 0x11, 0xc6, 0x63, 0xc2, 0x7a, 0xfa,
+ 0x5c, 0xee, 0x77, 0x12, 0x3c, 0x7e, 0xcf, 0x3b, 0x19, 0xaa, 0xc5, 0xb6, 0x57, 0x35, 0xb1, 0xbd,
+ 0xe6, 0xf2, 0x01, 0x06, 0xf8, 0xb1, 0xc4, 0x8f, 0x86, 0x00, 0x35, 0xb7, 0x55, 0xbb, 0x5d, 0x57,
+ 0x6c, 0xda, 0xc5, 0xe2, 0xbf, 0xc1, 0x06, 0xb0, 0xe1, 0xce, 0xc3, 0x58, 0x9b, 0x38, 0x2d, 0x5b,
+ 0xe5, 0xce, 0x12, 0x77, 0x85, 0xe0, 0x1d, 0x64, 0x39, 0x9c, 0xc2, 0x51, 0x3a, 0xd4, 0x81, 0xf2,
+ 0x8e, 0xf7, 0xff, 0x86, 0x7e, 0xe7, 0xad, 0xd7, 0x62, 0x36, 0xfc, 0x8f, 0xc5, 0x30, 0xbe, 0xc4,
+ 0x80, 0x83, 0x03, 0x70, 0xf9, 0x23, 0x09, 0x66, 0xd2, 0x8e, 0x59, 0x66, 0xaa, 0x3f, 0x78, 0xe7,
+ 0x3c, 0x0a, 0x45, 0x8e, 0xce, 0xbc, 0x72, 0xdc, 0x7b, 0xf1, 0x66, 0x92, 0x31, 0x1f, 0x95, 0xbf,
+ 0x92, 0x60, 0x36, 0x5b, 0xb5, 0x01, 0x5c, 0x25, 0x6e, 0xc6, 0xaf, 0x12, 0xbd, 0x3e, 0x1b, 0x64,
+ 0xeb, 0x9d, 0x73, 0xad, 0xd8, 0xcb, 0x5c, 0x83, 0x01, 0x18, 0xb9, 0x15, 0x37, 0x72, 0xf1, 0xd0,
+ 0x46, 0x66, 0x1b, 0x58, 0x3b, 0x7b, 0xfb, 0xce, 0xdc, 0xb1, 0xcf, 0xee, 0xcc, 0x1d, 0xfb, 0xfc,
+ 0xce, 0xdc, 0xb1, 0x0f, 0xf6, 0xe7, 0xa4, 0xdb, 0xfb, 0x73, 0xd2, 0x67, 0xfb, 0x73, 0xd2, 0xe7,
+ 0xfb, 0x73, 0xd2, 0xdf, 0xf6, 0xe7, 0xa4, 0x1f, 0x7c, 0x39, 0x77, 0xec, 0xc6, 0x88, 0xc0, 0xfd,
+ 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x10, 0x0e, 0x63, 0x80, 0x3d, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.proto
new file mode 100644
index 000000000..cb7d51778
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.proto
@@ -0,0 +1,1022 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.pkg.apis.extensions.v1beta1;
+
+import "k8s.io/apimachinery/pkg/api/resource/generated.proto";
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+import "k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1beta1";
+
+// An APIVersion represents a single concrete version of an object model.
+message APIVersion {
+ // Name of this version (e.g. 'v1').
+ // +optional
+ optional string name = 1;
+}
+
+message CustomMetricCurrentStatus {
+ // Custom Metric name.
+ optional string name = 1;
+
+ // Custom Metric value (average).
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity value = 2;
+}
+
+message CustomMetricCurrentStatusList {
+ repeated CustomMetricCurrentStatus items = 1;
+}
+
+// Alpha-level support for Custom Metrics in HPA (as annotations).
+message CustomMetricTarget {
+ // Custom Metric name.
+ optional string name = 1;
+
+ // Custom Metric value (average).
+ optional k8s.io.apimachinery.pkg.api.resource.Quantity value = 2;
+}
+
+message CustomMetricTargetList {
+ repeated CustomMetricTarget items = 1;
+}
+
+// DaemonSet represents the configuration of a daemon set.
+message DaemonSet {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // The desired behavior of this daemon set.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional DaemonSetSpec spec = 2;
+
+ // The current status of this daemon set. This data may be
+ // out of date by some window of time.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional DaemonSetStatus status = 3;
+}
+
+// DaemonSetList is a collection of daemon sets.
+message DaemonSetList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // A list of daemon sets.
+ repeated DaemonSet items = 2;
+}
+
+// DaemonSetSpec is the specification of a daemon set.
+message DaemonSetSpec {
+ // A label query over pods that are managed by the daemon set.
+ // Must match in order to be controlled.
+ // If empty, defaulted to labels on Pod template.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 1;
+
+ // An object that describes the pod that will be created.
+ // The DaemonSet will create exactly one copy of this pod on every node
+ // that matches the template's node selector (or on every node if no node
+ // selector is specified).
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
+ optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 2;
+
+ // An update strategy to replace existing DaemonSet pods with new pods.
+ // +optional
+ optional DaemonSetUpdateStrategy updateStrategy = 3;
+
+ // The minimum number of seconds for which a newly created DaemonSet pod should
+ // be ready without any of its container crashing, for it to be considered
+ // available. Defaults to 0 (pod will be considered available as soon as it
+ // is ready).
+ // +optional
+ optional int32 minReadySeconds = 4;
+
+ // DEPRECATED.
+ // A sequence number representing a specific generation of the template.
+ // Populated by the system. It can be set only during the creation.
+ // +optional
+ optional int64 templateGeneration = 5;
+
+ // The number of old history to retain to allow rollback.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ // Defaults to 10.
+ // +optional
+ optional int32 revisionHistoryLimit = 6;
+}
+
+// DaemonSetStatus represents the current status of a daemon set.
+message DaemonSetStatus {
+ // The number of nodes that are running at least 1
+ // daemon pod and are supposed to run the daemon pod.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
+ optional int32 currentNumberScheduled = 1;
+
+ // The number of nodes that are running the daemon pod, but are
+ // not supposed to run the daemon pod.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
+ optional int32 numberMisscheduled = 2;
+
+ // The total number of nodes that should be running the daemon
+ // pod (including nodes correctly running the daemon pod).
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
+ optional int32 desiredNumberScheduled = 3;
+
+ // The number of nodes that should be running the daemon pod and have one
+ // or more of the daemon pod running and ready.
+ optional int32 numberReady = 4;
+
+ // The most recent generation observed by the daemon set controller.
+ // +optional
+ optional int64 observedGeneration = 5;
+
+ // The total number of nodes that are running updated daemon pod
+ // +optional
+ optional int32 updatedNumberScheduled = 6;
+
+ // The number of nodes that should be running the
+ // daemon pod and have one or more of the daemon pod running and
+ // available (ready for at least spec.minReadySeconds)
+ // +optional
+ optional int32 numberAvailable = 7;
+
+ // The number of nodes that should be running the
+ // daemon pod and have none of the daemon pod running and available
+ // (ready for at least spec.minReadySeconds)
+ // +optional
+ optional int32 numberUnavailable = 8;
+
+ // Count of hash collisions for the DaemonSet. The DaemonSet controller
+ // uses this field as a collision avoidance mechanism when it needs to
+ // create the name for the newest ControllerRevision.
+ // +optional
+ optional int64 collisionCount = 9;
+}
+
+message DaemonSetUpdateStrategy {
+ // Type of daemon set update. Can be "RollingUpdate" or "OnDelete".
+ // Default is OnDelete.
+ // +optional
+ optional string type = 1;
+
+ // Rolling update config params. Present only if type = "RollingUpdate".
+ // ---
+ // TODO: Update this to follow our convention for oneOf, whatever we decide it
+ // to be. Same as Deployment `strategy.rollingUpdate`.
+ // See https://github.com/kubernetes/kubernetes/issues/35345
+ // +optional
+ optional RollingUpdateDaemonSet rollingUpdate = 2;
+}
+
+// Deployment enables declarative updates for Pods and ReplicaSets.
+message Deployment {
+ // Standard object metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Specification of the desired behavior of the Deployment.
+ // +optional
+ optional DeploymentSpec spec = 2;
+
+ // Most recently observed status of the Deployment.
+ // +optional
+ optional DeploymentStatus status = 3;
+}
+
+// DeploymentCondition describes the state of a deployment at a certain point.
+message DeploymentCondition {
+ // Type of deployment condition.
+ optional string type = 1;
+
+ // Status of the condition, one of True, False, Unknown.
+ optional string status = 2;
+
+ // The last time this condition was updated.
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 6;
+
+ // Last time the condition transitioned from one status to another.
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 7;
+
+ // The reason for the condition's last transition.
+ optional string reason = 4;
+
+ // A human readable message indicating details about the transition.
+ optional string message = 5;
+}
+
+// DeploymentList is a list of Deployments.
+message DeploymentList {
+ // Standard list metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is the list of Deployments.
+ repeated Deployment items = 2;
+}
+
+// DeploymentRollback stores the information required to rollback a deployment.
+message DeploymentRollback {
+ // Required: This must match the Name of a deployment.
+ optional string name = 1;
+
+ // The annotations to be updated to a deployment
+ // +optional
+ map<string, string> updatedAnnotations = 2;
+
+ // The config of this deployment rollback.
+ optional RollbackConfig rollbackTo = 3;
+}
+
+// DeploymentSpec is the specification of the desired behavior of the Deployment.
+message DeploymentSpec {
+ // Number of desired pods. This is a pointer to distinguish between explicit
+ // zero and not specified. Defaults to 1.
+ // +optional
+ optional int32 replicas = 1;
+
+ // Label selector for pods. Existing ReplicaSets whose pods are
+ // selected by this will be the ones affected by this deployment.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
+
+ // Template describes the pods that will be created.
+ optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 3;
+
+ // The deployment strategy to use to replace existing pods with new ones.
+ // +optional
+ optional DeploymentStrategy strategy = 4;
+
+ // Minimum number of seconds for which a newly created pod should be ready
+ // without any of its container crashing, for it to be considered available.
+ // Defaults to 0 (pod will be considered available as soon as it is ready)
+ // +optional
+ optional int32 minReadySeconds = 5;
+
+ // The number of old ReplicaSets to retain to allow rollback.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ // +optional
+ optional int32 revisionHistoryLimit = 6;
+
+ // Indicates that the deployment is paused and will not be processed by the
+ // deployment controller.
+ // +optional
+ optional bool paused = 7;
+
+ // The config this deployment is rolling back to. Will be cleared after rollback is done.
+ // +optional
+ optional RollbackConfig rollbackTo = 8;
+
+ // The maximum time in seconds for a deployment to make progress before it
+ // is considered to be failed. The deployment controller will continue to
+ // process failed deployments and a condition with a ProgressDeadlineExceeded
+ // reason will be surfaced in the deployment status. Once autoRollback is
+ // implemented, the deployment controller will automatically rollback failed
+ // deployments. Note that progress will not be estimated during the time a
+ // deployment is paused. This is not set by default.
+ optional int32 progressDeadlineSeconds = 9;
+}
+
+// DeploymentStatus is the most recently observed status of the Deployment.
+message DeploymentStatus {
+ // The generation observed by the deployment controller.
+ // +optional
+ optional int64 observedGeneration = 1;
+
+ // Total number of non-terminated pods targeted by this deployment (their labels match the selector).
+ // +optional
+ optional int32 replicas = 2;
+
+ // Total number of non-terminated pods targeted by this deployment that have the desired template spec.
+ // +optional
+ optional int32 updatedReplicas = 3;
+
+ // Total number of ready pods targeted by this deployment.
+ // +optional
+ optional int32 readyReplicas = 7;
+
+ // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
+ // +optional
+ optional int32 availableReplicas = 4;
+
+ // Total number of unavailable pods targeted by this deployment.
+ // +optional
+ optional int32 unavailableReplicas = 5;
+
+ // Represents the latest available observations of a deployment's current state.
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ repeated DeploymentCondition conditions = 6;
+
+ // Count of hash collisions for the Deployment. The Deployment controller uses this
+ // field as a collision avoidance mechanism when it needs to create the name for the
+ // newest ReplicaSet.
+ // +optional
+ optional int64 collisionCount = 8;
+}
+
+// DeploymentStrategy describes how to replace existing pods with new ones.
+message DeploymentStrategy {
+ // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
+ // +optional
+ optional string type = 1;
+
+ // Rolling update config params. Present only if DeploymentStrategyType =
+ // RollingUpdate.
+ // ---
+ // TODO: Update this to follow our convention for oneOf, whatever we decide it
+ // to be.
+ // +optional
+ optional RollingUpdateDeployment rollingUpdate = 2;
+}
+
+// FSGroupStrategyOptions defines the strategy type and options used to create the strategy.
+message FSGroupStrategyOptions {
+ // Rule is the strategy that will dictate what FSGroup is used in the SecurityContext.
+ // +optional
+ optional string rule = 1;
+
+ // Ranges are the allowed ranges of fs groups. If you would like to force a single
+ // fs group then supply a single range with the same start and end.
+ // +optional
+ repeated IDRange ranges = 2;
+}
+
+// HTTPIngressPath associates a path regex with a backend. Incoming urls matching
+// the path are forwarded to the backend.
+message HTTPIngressPath {
+ // Path is an extended POSIX regex as defined by IEEE Std 1003.1,
+ // (i.e this follows the egrep/unix syntax, not the perl syntax)
+ // matched against the path of an incoming request. Currently it can
+ // contain characters disallowed from the conventional "path"
+ // part of a URL as defined by RFC 3986. Paths must begin with
+ // a '/'. If unspecified, the path defaults to a catch all sending
+ // traffic to the backend.
+ // +optional
+ optional string path = 1;
+
+ // Backend defines the referenced service endpoint to which the traffic
+ // will be forwarded to.
+ optional IngressBackend backend = 2;
+}
+
+// HTTPIngressRuleValue is a list of http selectors pointing to backends.
+// In the example: http://<host>/<path>?<searchpart> -> backend where
+// where parts of the url correspond to RFC 3986, this resource will be used
+// to match against everything after the last '/' and before the first '?'
+// or '#'.
+message HTTPIngressRuleValue {
+ // A collection of paths that map requests to backends.
+ repeated HTTPIngressPath paths = 1;
+}
+
+// Host Port Range defines a range of host ports that will be enabled by a policy
+// for pods to use. It requires both the start and end to be defined.
+message HostPortRange {
+ // min is the start of the range, inclusive.
+ optional int32 min = 1;
+
+ // max is the end of the range, inclusive.
+ optional int32 max = 2;
+}
+
+// ID Range provides a min/max of an allowed range of IDs.
+message IDRange {
+ // Min is the start of the range, inclusive.
+ optional int64 min = 1;
+
+ // Max is the end of the range, inclusive.
+ optional int64 max = 2;
+}
+
+// Ingress is a collection of rules that allow inbound connections to reach the
+// endpoints defined by a backend. An Ingress can be configured to give services
+// externally-reachable urls, load balance traffic, terminate SSL, offer name
+// based virtual hosting etc.
+message Ingress {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec is the desired state of the Ingress.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional IngressSpec spec = 2;
+
+ // Status is the current state of the Ingress.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional IngressStatus status = 3;
+}
+
+// IngressBackend describes all endpoints for a given service and port.
+message IngressBackend {
+ // Specifies the name of the referenced service.
+ optional string serviceName = 1;
+
+ // Specifies the port of the referenced service.
+ optional k8s.io.apimachinery.pkg.util.intstr.IntOrString servicePort = 2;
+}
+
+// IngressList is a collection of Ingress.
+message IngressList {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is the list of Ingress.
+ repeated Ingress items = 2;
+}
+
+// IngressRule represents the rules mapping the paths under a specified host to
+// the related backend services. Incoming requests are first evaluated for a host
+// match, then routed to the backend associated with the matching IngressRuleValue.
+message IngressRule {
+ // Host is the fully qualified domain name of a network host, as defined
+ // by RFC 3986. Note the following deviations from the "host" part of the
+ // URI as defined in the RFC:
+ // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the
+ // IP in the Spec of the parent Ingress.
+ // 2. The `:` delimiter is not respected because ports are not allowed.
+ // Currently the port of an Ingress is implicitly :80 for http and
+ // :443 for https.
+ // Both these may change in the future.
+ // Incoming requests are matched against the host before the IngressRuleValue.
+ // If the host is unspecified, the Ingress routes all traffic based on the
+ // specified IngressRuleValue.
+ // +optional
+ optional string host = 1;
+
+ // IngressRuleValue represents a rule to route requests for this IngressRule.
+ // If unspecified, the rule defaults to a http catch-all. Whether that sends
+ // just traffic matching the host to the default backend or all traffic to the
+ // default backend, is left to the controller fulfilling the Ingress. Http is
+ // currently the only supported IngressRuleValue.
+ // +optional
+ optional IngressRuleValue ingressRuleValue = 2;
+}
+
+// IngressRuleValue represents a rule to apply against incoming requests. If the
+// rule is satisfied, the request is routed to the specified backend. Currently
+// mixing different types of rules in a single Ingress is disallowed, so exactly
+// one of the following must be set.
+message IngressRuleValue {
+ // +optional
+ optional HTTPIngressRuleValue http = 1;
+}
+
+// IngressSpec describes the Ingress the user wishes to exist.
+message IngressSpec {
+ // A default backend capable of servicing requests that don't match any
+ // rule. At least one of 'backend' or 'rules' must be specified. This field
+ // is optional to allow the loadbalancer controller or defaulting logic to
+ // specify a global default.
+ // +optional
+ optional IngressBackend backend = 1;
+
+ // TLS configuration. Currently the Ingress only supports a single TLS
+ // port, 443. If multiple members of this list specify different hosts, they
+ // will be multiplexed on the same port according to the hostname specified
+ // through the SNI TLS extension, if the ingress controller fulfilling the
+ // ingress supports SNI.
+ // +optional
+ repeated IngressTLS tls = 2;
+
+ // A list of host rules used to configure the Ingress. If unspecified, or
+ // no rule matches, all traffic is sent to the default backend.
+ // +optional
+ repeated IngressRule rules = 3;
+}
+
+// IngressStatus describe the current state of the Ingress.
+message IngressStatus {
+ // LoadBalancer contains the current status of the load-balancer.
+ // +optional
+ optional k8s.io.kubernetes.pkg.api.v1.LoadBalancerStatus loadBalancer = 1;
+}
+
+// IngressTLS describes the transport layer security associated with an Ingress.
+message IngressTLS {
+ // Hosts are a list of hosts included in the TLS certificate. The values in
+ // this list must match the name/s used in the tlsSecret. Defaults to the
+ // wildcard host setting for the loadbalancer controller fulfilling this
+ // Ingress, if left unspecified.
+ // +optional
+ repeated string hosts = 1;
+
+ // SecretName is the name of the secret used to terminate SSL traffic on 443.
+ // Field is left optional to allow SSL routing based on SNI hostname alone.
+ // If the SNI host in a listener conflicts with the "Host" header field used
+ // by an IngressRule, the SNI host is used for termination and value of the
+ // Host header is used for routing.
+ // +optional
+ optional string secretName = 2;
+}
+
+// NetworkPolicy describes what network traffic is allowed for a set of Pods
+message NetworkPolicy {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Specification of the desired behavior for this NetworkPolicy.
+ // +optional
+ optional NetworkPolicySpec spec = 2;
+}
+
+// This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.
+message NetworkPolicyIngressRule {
+ // List of ports which should be made accessible on the pods selected for this rule.
+ // Each item in this list is combined using a logical OR.
+ // If this field is empty or missing, this rule matches all ports (traffic not restricted by port).
+ // If this field is present and contains at least one item, then this rule allows traffic
+ // only if the traffic matches at least one port in the list.
+ // +optional
+ repeated NetworkPolicyPort ports = 1;
+
+ // List of sources which should be able to access the pods selected for this rule.
+ // Items in this list are combined using a logical OR operation.
+ // If this field is empty or missing, this rule matches all sources (traffic not restricted by source).
+ // If this field is present and contains at least on item, this rule allows traffic only if the
+ // traffic matches at least one item in the from list.
+ // +optional
+ repeated NetworkPolicyPeer from = 2;
+}
+
+// Network Policy List is a list of NetworkPolicy objects.
+message NetworkPolicyList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of schema objects.
+ repeated NetworkPolicy items = 2;
+}
+
+message NetworkPolicyPeer {
+ // This is a label selector which selects Pods in this namespace.
+ // This field follows standard label selector semantics.
+ // If present but empty, this selector selects all pods in this namespace.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
+
+ // Selects Namespaces using cluster scoped-labels. This
+ // matches all pods in all namespaces selected by this label selector.
+ // This field follows standard label selector semantics.
+ // If present but empty, this selector selects all namespaces.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 2;
+}
+
+message NetworkPolicyPort {
+ // Optional. The protocol (TCP or UDP) which traffic must match.
+ // If not specified, this field defaults to TCP.
+ // +optional
+ optional string protocol = 1;
+
+ // If specified, the port on the given protocol. This can
+ // either be a numerical or named port on a pod. If this field is not provided,
+ // this matches all port names and numbers.
+ // If present, only traffic on the specified protocol AND port
+ // will be matched.
+ // +optional
+ optional k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 2;
+}
+
+message NetworkPolicySpec {
+ // Selects the pods to which this NetworkPolicy object applies. The array of ingress rules
+ // is applied to any pods selected by this field. Multiple network policies can select the
+ // same set of pods. In this case, the ingress rules for each are combined additively.
+ // This field is NOT optional and follows standard label selector semantics.
+ // An empty podSelector matches all pods in this namespace.
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
+
+ // List of ingress rules to be applied to the selected pods.
+ // Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod
+ // OR if the traffic source is the pod's local node,
+ // OR if the traffic matches at least one ingress rule across all of the NetworkPolicy
+ // objects whose podSelector matches the pod.
+ // If this field is empty then this NetworkPolicy does not allow any traffic
+ // (and serves solely to ensure that the pods it selects are isolated by default).
+ // +optional
+ repeated NetworkPolicyIngressRule ingress = 2;
+}
+
+// Pod Security Policy governs the ability to make requests that affect the Security Context
+// that will be applied to a pod and container.
+message PodSecurityPolicy {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // spec defines the policy enforced.
+ // +optional
+ optional PodSecurityPolicySpec spec = 2;
+}
+
+// Pod Security Policy List is a list of PodSecurityPolicy objects.
+message PodSecurityPolicyList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of schema objects.
+ repeated PodSecurityPolicy items = 2;
+}
+
+// Pod Security Policy Spec defines the policy enforced.
+message PodSecurityPolicySpec {
+ // privileged determines if a pod can request to be run as privileged.
+ // +optional
+ optional bool privileged = 1;
+
+ // DefaultAddCapabilities is the default set of capabilities that will be added to the container
+ // unless the pod spec specifically drops the capability. You may not list a capabiility in both
+ // DefaultAddCapabilities and RequiredDropCapabilities.
+ // +optional
+ repeated string defaultAddCapabilities = 2;
+
+ // RequiredDropCapabilities are the capabilities that will be dropped from the container. These
+ // are required to be dropped and cannot be added.
+ // +optional
+ repeated string requiredDropCapabilities = 3;
+
+ // AllowedCapabilities is a list of capabilities that can be requested to add to the container.
+ // Capabilities in this field may be added at the pod author's discretion.
+ // You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities.
+ // +optional
+ repeated string allowedCapabilities = 4;
+
+ // volumes is a white list of allowed volume plugins. Empty indicates that all plugins
+ // may be used.
+ // +optional
+ repeated string volumes = 5;
+
+ // hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.
+ // +optional
+ optional bool hostNetwork = 6;
+
+ // hostPorts determines which host port ranges are allowed to be exposed.
+ // +optional
+ repeated HostPortRange hostPorts = 7;
+
+ // hostPID determines if the policy allows the use of HostPID in the pod spec.
+ // +optional
+ optional bool hostPID = 8;
+
+ // hostIPC determines if the policy allows the use of HostIPC in the pod spec.
+ // +optional
+ optional bool hostIPC = 9;
+
+ // seLinux is the strategy that will dictate the allowable labels that may be set.
+ optional SELinuxStrategyOptions seLinux = 10;
+
+ // runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.
+ optional RunAsUserStrategyOptions runAsUser = 11;
+
+ // SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.
+ optional SupplementalGroupsStrategyOptions supplementalGroups = 12;
+
+ // FSGroup is the strategy that will dictate what fs group is used by the SecurityContext.
+ optional FSGroupStrategyOptions fsGroup = 13;
+
+ // ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file
+ // system. If the container specifically requests to run with a non-read only root file system
+ // the PSP should deny the pod.
+ // If set to false the container may run with a read only root file system if it wishes but it
+ // will not be forced to.
+ // +optional
+ optional bool readOnlyRootFilesystem = 14;
+}
+
+// ReplicaSet represents the configuration of a ReplicaSet.
+message ReplicaSet {
+ // If the Labels of a ReplicaSet are empty, they are defaulted to
+ // be the same as the Pod(s) that the ReplicaSet manages.
+ // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Spec defines the specification of the desired behavior of the ReplicaSet.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional ReplicaSetSpec spec = 2;
+
+ // Status is the most recently observed status of the ReplicaSet.
+ // This data may be out of date by some window of time.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ optional ReplicaSetStatus status = 3;
+}
+
+// ReplicaSetCondition describes the state of a replica set at a certain point.
+message ReplicaSetCondition {
+ // Type of replica set condition.
+ optional string type = 1;
+
+ // Status of the condition, one of True, False, Unknown.
+ optional string status = 2;
+
+ // The last time the condition transitioned from one status to another.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
+
+ // The reason for the condition's last transition.
+ // +optional
+ optional string reason = 4;
+
+ // A human readable message indicating details about the transition.
+ // +optional
+ optional string message = 5;
+}
+
+// ReplicaSetList is a collection of ReplicaSets.
+message ReplicaSetList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // List of ReplicaSets.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
+ repeated ReplicaSet items = 2;
+}
+
+// ReplicaSetSpec is the specification of a ReplicaSet.
+message ReplicaSetSpec {
+ // Replicas is the number of desired replicas.
+ // This is a pointer to distinguish between explicit zero and unspecified.
+ // Defaults to 1.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
+ // +optional
+ optional int32 replicas = 1;
+
+ // Minimum number of seconds for which a newly created pod should be ready
+ // without any of its container crashing, for it to be considered available.
+ // Defaults to 0 (pod will be considered available as soon as it is ready)
+ // +optional
+ optional int32 minReadySeconds = 4;
+
+ // Selector is a label query over pods that should match the replica count.
+ // If the selector is empty, it is defaulted to the labels present on the pod template.
+ // Label keys and values that must match in order to be controlled by this replica set.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
+
+ // Template is the object that describes the pod that will be created if
+ // insufficient replicas are detected.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
+ // +optional
+ optional k8s.io.kubernetes.pkg.api.v1.PodTemplateSpec template = 3;
+}
+
+// ReplicaSetStatus represents the current status of a ReplicaSet.
+message ReplicaSetStatus {
+ // Replicas is the most recently oberved number of replicas.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
+ optional int32 replicas = 1;
+
+ // The number of pods that have labels matching the labels of the pod template of the replicaset.
+ // +optional
+ optional int32 fullyLabeledReplicas = 2;
+
+ // The number of ready replicas for this replica set.
+ // +optional
+ optional int32 readyReplicas = 4;
+
+ // The number of available replicas (ready for at least minReadySeconds) for this replica set.
+ // +optional
+ optional int32 availableReplicas = 5;
+
+ // ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
+ // +optional
+ optional int64 observedGeneration = 3;
+
+ // Represents the latest available observations of a replica set's current state.
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ repeated ReplicaSetCondition conditions = 6;
+}
+
+// Dummy definition
+message ReplicationControllerDummy {
+}
+
+message RollbackConfig {
+ // The revision to rollback to. If set to 0, rollback to the last revision.
+ // +optional
+ optional int64 revision = 1;
+}
+
+// Spec to control the desired behavior of daemon set rolling update.
+message RollingUpdateDaemonSet {
+ // The maximum number of DaemonSet pods that can be unavailable during the
+ // update. Value can be an absolute number (ex: 5) or a percentage of total
+ // number of DaemonSet pods at the start of the update (ex: 10%). Absolute
+ // number is calculated from percentage by rounding up.
+ // This cannot be 0.
+ // Default value is 1.
+ // Example: when this is set to 30%, at most 30% of the total number of nodes
+ // that should be running the daemon pod (i.e. status.desiredNumberScheduled)
+ // can have their pods stopped for an update at any given
+ // time. The update starts by stopping at most 30% of those DaemonSet pods
+ // and then brings up new DaemonSet pods in their place. Once the new pods
+ // are available, it then proceeds onto other DaemonSet pods, thus ensuring
+ // that at least 70% of original number of DaemonSet pods are available at
+ // all times during the update.
+ // +optional
+ optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1;
+}
+
+// Spec to control the desired behavior of rolling update.
+message RollingUpdateDeployment {
+ // The maximum number of pods that can be unavailable during the update.
+ // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
+ // Absolute number is calculated from percentage by rounding down.
+ // This can not be 0 if MaxSurge is 0.
+ // By default, a fixed value of 1 is used.
+ // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods
+ // immediately when the rolling update starts. Once new pods are ready, old RC
+ // can be scaled down further, followed by scaling up the new RC, ensuring
+ // that the total number of pods available at all times during the update is at
+ // least 70% of desired pods.
+ // +optional
+ optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 1;
+
+ // The maximum number of pods that can be scheduled above the desired number of
+ // pods.
+ // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
+ // This can not be 0 if MaxUnavailable is 0.
+ // Absolute number is calculated from percentage by rounding up.
+ // By default, a value of 1 is used.
+ // Example: when this is set to 30%, the new RC can be scaled up immediately when
+ // the rolling update starts, such that the total number of old and new pods do not exceed
+ // 130% of desired pods. Once old pods have been killed,
+ // new RC can be scaled up further, ensuring that total number of pods running
+ // at any time during the update is atmost 130% of desired pods.
+ // +optional
+ optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxSurge = 2;
+}
+
+// Run A sUser Strategy Options defines the strategy type and any options used to create the strategy.
+message RunAsUserStrategyOptions {
+ // Rule is the strategy that will dictate the allowable RunAsUser values that may be set.
+ optional string rule = 1;
+
+ // Ranges are the allowed ranges of uids that may be used.
+ // +optional
+ repeated IDRange ranges = 2;
+}
+
+// SELinux Strategy Options defines the strategy type and any options used to create the strategy.
+message SELinuxStrategyOptions {
+ // type is the strategy that will dictate the allowable labels that may be set.
+ optional string rule = 1;
+
+ // seLinuxOptions required to run as; required for MustRunAs
+ // More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md
+ // +optional
+ optional k8s.io.kubernetes.pkg.api.v1.SELinuxOptions seLinuxOptions = 2;
+}
+
+// represents a scaling request for a resource.
+message Scale {
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
+ // +optional
+ optional ScaleSpec spec = 2;
+
+ // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.
+ // +optional
+ optional ScaleStatus status = 3;
+}
+
+// describes the attributes of a scale subresource
+message ScaleSpec {
+ // desired number of instances for the scaled object.
+ // +optional
+ optional int32 replicas = 1;
+}
+
+// represents the current status of a scale subresource.
+message ScaleStatus {
+ // actual number of observed instances of the scaled object.
+ optional int32 replicas = 1;
+
+ // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
+ // +optional
+ map<string, string> selector = 2;
+
+ // label selector for pods that should match the replicas count. This is a serializated
+ // version of both map-based and more expressive set-based selectors. This is done to
+ // avoid introspection in the clients. The string will be in the same format as the
+ // query-param syntax. If the target type only supports map-based selectors, both this
+ // field and map-based selector field are populated.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ optional string targetSelector = 3;
+}
+
+// SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.
+message SupplementalGroupsStrategyOptions {
+ // Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.
+ // +optional
+ optional string rule = 1;
+
+ // Ranges are the allowed ranges of supplemental groups. If you would like to force a single
+ // supplemental group then supply a single range with the same start and end.
+ // +optional
+ repeated IDRange ranges = 2;
+}
+
+// A ThirdPartyResource is a generic representation of a resource, it is used by add-ons and plugins to add new resource
+// types to the API. It consists of one or more Versions of the api.
+message ThirdPartyResource {
+ // Standard object metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Description is the description of this object.
+ // +optional
+ optional string description = 2;
+
+ // Versions are versions for this third party object
+ // +optional
+ repeated APIVersion versions = 3;
+}
+
+// An internal object, used for versioned storage in etcd. Not exposed to the end user.
+message ThirdPartyResourceData {
+ // Standard object metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Data is the raw JSON data for this data.
+ // +optional
+ optional bytes data = 2;
+}
+
+// ThirdPartyResrouceDataList is a list of ThirdPartyResourceData.
+message ThirdPartyResourceDataList {
+ // Standard list metadata
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is the list of ThirdpartyResourceData.
+ repeated ThirdPartyResourceData items = 2;
+}
+
+// ThirdPartyResourceList is a list of ThirdPartyResources.
+message ThirdPartyResourceList {
+ // Standard list metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is the list of ThirdPartyResources.
+ repeated ThirdPartyResource items = 2;
+}
+
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/register.go
new file mode 100644
index 000000000..bf8616b88
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/register.go
@@ -0,0 +1,77 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "extensions"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Deployment{},
+ &DeploymentList{},
+ &DeploymentRollback{},
+ &ReplicationControllerDummy{},
+ &Scale{},
+ &ThirdPartyResource{},
+ &ThirdPartyResourceList{},
+ &DaemonSetList{},
+ &DaemonSet{},
+ &ThirdPartyResourceData{},
+ &ThirdPartyResourceDataList{},
+ &Ingress{},
+ &IngressList{},
+ &ReplicaSet{},
+ &ReplicaSetList{},
+ &PodSecurityPolicy{},
+ &PodSecurityPolicyList{},
+ &NetworkPolicy{},
+ &NetworkPolicyList{},
+ )
+ // Add the watch version that applies
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types.generated.go
new file mode 100644
index 000000000..bd0b4dba0
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types.generated.go
@@ -0,0 +1,21979 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1beta1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg3_resource "k8s.io/apimachinery/pkg/api/resource"
+ pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ pkg2_types "k8s.io/apimachinery/pkg/types"
+ pkg5_intstr "k8s.io/apimachinery/pkg/util/intstr"
+ pkg4_v1 "k8s.io/kubernetes/pkg/api/v1"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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_resource.Quantity
+ var v1 pkg1_v1.TypeMeta
+ var v2 pkg2_types.UID
+ var v3 pkg5_intstr.IntOrString
+ var v4 pkg4_v1.PodTemplateSpec
+ var v5 time.Time
+ _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5
+ }
+}
+
+func (x *ScaleSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = x.Replicas != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ScaleSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ScaleSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "replicas":
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv4 := &x.Replicas
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(yyv4)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ScaleSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv7 := &x.Replicas
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*int32)(yyv7)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ScaleStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = len(x.Selector) != 0
+ yyq2[2] = x.TargetSelector != ""
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Selector, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Selector, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.TargetSelector))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("targetSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.TargetSelector))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ScaleStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ScaleStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "replicas":
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv4 := &x.Replicas
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(yyv4)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ x.Selector = nil
+ } else {
+ yyv6 := &x.Selector
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv6, false, d)
+ }
+ }
+ case "targetSelector":
+ if r.TryDecodeAsNil() {
+ x.TargetSelector = ""
+ } else {
+ yyv8 := &x.TargetSelector
+ 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_containerMapEnd1234)
+}
+
+func (x *ScaleStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv11 := &x.Replicas
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int32)(yyv11)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Selector = nil
+ } else {
+ yyv13 := &x.Selector
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TargetSelector = ""
+ } else {
+ yyv15 := &x.TargetSelector
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Scale) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Scale) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Scale) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = ScaleSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ScaleStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = ScaleSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ScaleStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ReplicationControllerDummy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Kind != ""
+ yyq2[1] = x.APIVersion != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ReplicationControllerDummy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ReplicationControllerDummy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ReplicationControllerDummy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv9 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv11 := &x.APIVersion
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *CustomMetricTarget) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy7 := &x.TargetValue
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy7)
+ } else {
+ z.EncFallback(yy7)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("value"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.TargetValue
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy9) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy9)
+ } else {
+ z.EncFallback(yy9)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CustomMetricTarget) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CustomMetricTarget) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "value":
+ if r.TryDecodeAsNil() {
+ x.TargetValue = pkg3_resource.Quantity{}
+ } else {
+ yyv6 := &x.TargetValue
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CustomMetricTarget) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv9 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TargetValue = pkg3_resource.Quantity{}
+ } else {
+ yyv11 := &x.TargetValue
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else if !yym12 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv11)
+ } else {
+ z.DecFallback(yyv11, false)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *CustomMetricTargetList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceCustomMetricTarget(([]CustomMetricTarget)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceCustomMetricTarget(([]CustomMetricTarget)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CustomMetricTargetList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CustomMetricTargetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv4 := &x.Items
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceCustomMetricTarget((*[]CustomMetricTarget)(yyv4), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CustomMetricTargetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv7 := &x.Items
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSliceCustomMetricTarget((*[]CustomMetricTarget)(yyv7), d)
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *CustomMetricCurrentStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy7 := &x.CurrentValue
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy7)
+ } else {
+ z.EncFallback(yy7)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("value"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.CurrentValue
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy9) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy9)
+ } else {
+ z.EncFallback(yy9)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CustomMetricCurrentStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CustomMetricCurrentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "value":
+ if r.TryDecodeAsNil() {
+ x.CurrentValue = pkg3_resource.Quantity{}
+ } else {
+ yyv6 := &x.CurrentValue
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CustomMetricCurrentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv9 := &x.Name
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentValue = pkg3_resource.Quantity{}
+ } else {
+ yyv11 := &x.CurrentValue
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else if !yym12 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv11)
+ } else {
+ z.DecFallback(yyv11, false)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *CustomMetricCurrentStatusList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceCustomMetricCurrentStatus(([]CustomMetricCurrentStatus)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceCustomMetricCurrentStatus(([]CustomMetricCurrentStatus)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *CustomMetricCurrentStatusList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *CustomMetricCurrentStatusList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "items":
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv4 := &x.Items
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceCustomMetricCurrentStatus((*[]CustomMetricCurrentStatus)(yyv4), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *CustomMetricCurrentStatusList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv7 := &x.Items
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSliceCustomMetricCurrentStatus((*[]CustomMetricCurrentStatus)(yyv7), d)
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ThirdPartyResource) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = x.Description != ""
+ yyq2[4] = len(x.Versions) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Description))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("description"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Description))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.Versions == nil {
+ r.EncodeNil()
+ } else {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ h.encSliceAPIVersion(([]APIVersion)(x.Versions), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("versions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Versions == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ h.encSliceAPIVersion(([]APIVersion)(x.Versions), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ThirdPartyResource) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ThirdPartyResource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "description":
+ if r.TryDecodeAsNil() {
+ x.Description = ""
+ } else {
+ yyv10 := &x.Description
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "versions":
+ if r.TryDecodeAsNil() {
+ x.Versions = nil
+ } else {
+ yyv12 := &x.Versions
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ h.decSliceAPIVersion((*[]APIVersion)(yyv12), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ThirdPartyResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv15 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv17 := &x.APIVersion
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg1_v1.ObjectMeta{}
+ } else {
+ yyv19 := &x.ObjectMeta
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv19) {
+ } else {
+ z.DecFallback(yyv19, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Description = ""
+ } else {
+ yyv21 := &x.Description
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Versions = nil
+ } else {
+ yyv23 := &x.Versions
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ h.decSliceAPIVersion((*[]APIVersion)(yyv23), d)
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ThirdPartyResourceList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceThirdPartyResource(([]ThirdPartyResource)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceThirdPartyResource(([]ThirdPartyResource)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ThirdPartyResourceList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ThirdPartyResourceList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceThirdPartyResource((*[]ThirdPartyResource)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ThirdPartyResourceList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceThirdPartyResource((*[]ThirdPartyResource)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *APIVersion) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = x.Name != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *APIVersion) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *APIVersion) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv4 := &x.Name
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *APIVersion) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv7 := &x.Name
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*string)(yyv7)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ThirdPartyResourceData) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Data) != 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Data))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("data"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Data == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Data))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ThirdPartyResourceData) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ThirdPartyResourceData) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "data":
+ if r.TryDecodeAsNil() {
+ x.Data = nil
+ } else {
+ yyv10 := &x.Data
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *yyv10 = r.DecodeBytes(*(*[]byte)(yyv10), false, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ThirdPartyResourceData) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Data = nil
+ } else {
+ yyv19 := &x.Data
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *yyv19 = r.DecodeBytes(*(*[]byte)(yyv19), false, false)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Deployment) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Deployment) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Deployment) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = DeploymentSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = DeploymentStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Deployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = DeploymentSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = DeploymentStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DeploymentSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [9]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Replicas != nil
+ yyq2[1] = x.Selector != nil
+ yyq2[3] = true
+ yyq2[4] = x.MinReadySeconds != 0
+ yyq2[5] = x.RevisionHistoryLimit != nil
+ yyq2[6] = x.Paused != false
+ yyq2[7] = x.RollbackTo != nil
+ yyq2[8] = x.ProgressDeadlineSeconds != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(9)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Replicas == nil {
+ r.EncodeNil()
+ } else {
+ yy4 := *x.Replicas
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(yy4))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Replicas == nil {
+ r.EncodeNil()
+ } else {
+ yy6 := *x.Replicas
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(yy6))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy12 := &x.Template
+ yy12.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("template"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy14 := &x.Template
+ yy14.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yy17 := &x.Strategy
+ yy17.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("strategy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy19 := &x.Strategy
+ yy19.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MinReadySeconds))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("minReadySeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MinReadySeconds))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.RevisionHistoryLimit == nil {
+ r.EncodeNil()
+ } else {
+ yy25 := *x.RevisionHistoryLimit
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeInt(int64(yy25))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("revisionHistoryLimit"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RevisionHistoryLimit == nil {
+ r.EncodeNil()
+ } else {
+ yy27 := *x.RevisionHistoryLimit
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeInt(int64(yy27))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym30 := z.EncBinary()
+ _ = yym30
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Paused))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("paused"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym31 := z.EncBinary()
+ _ = yym31
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Paused))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.RollbackTo == nil {
+ r.EncodeNil()
+ } else {
+ x.RollbackTo.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rollbackTo"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RollbackTo == nil {
+ r.EncodeNil()
+ } else {
+ x.RollbackTo.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ if x.ProgressDeadlineSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy36 := *x.ProgressDeadlineSeconds
+ yym37 := z.EncBinary()
+ _ = yym37
+ if false {
+ } else {
+ r.EncodeInt(int64(yy36))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("progressDeadlineSeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ProgressDeadlineSeconds == nil {
+ r.EncodeNil()
+ } else {
+ yy38 := *x.ProgressDeadlineSeconds
+ yym39 := z.EncBinary()
+ _ = yym39
+ if false {
+ } else {
+ r.EncodeInt(int64(yy38))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DeploymentSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DeploymentSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "replicas":
+ if r.TryDecodeAsNil() {
+ if x.Replicas != nil {
+ x.Replicas = nil
+ }
+ } else {
+ if x.Replicas == nil {
+ x.Replicas = new(int32)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(x.Replicas)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_v1.LabelSelector)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ case "template":
+ if r.TryDecodeAsNil() {
+ x.Template = pkg4_v1.PodTemplateSpec{}
+ } else {
+ yyv8 := &x.Template
+ yyv8.CodecDecodeSelf(d)
+ }
+ case "strategy":
+ if r.TryDecodeAsNil() {
+ x.Strategy = DeploymentStrategy{}
+ } else {
+ yyv9 := &x.Strategy
+ yyv9.CodecDecodeSelf(d)
+ }
+ case "minReadySeconds":
+ if r.TryDecodeAsNil() {
+ x.MinReadySeconds = 0
+ } else {
+ yyv10 := &x.MinReadySeconds
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(yyv10)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "revisionHistoryLimit":
+ if r.TryDecodeAsNil() {
+ if x.RevisionHistoryLimit != nil {
+ x.RevisionHistoryLimit = nil
+ }
+ } else {
+ if x.RevisionHistoryLimit == nil {
+ x.RevisionHistoryLimit = new(int32)
+ }
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int32)(x.RevisionHistoryLimit)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "paused":
+ if r.TryDecodeAsNil() {
+ x.Paused = false
+ } else {
+ yyv14 := &x.Paused
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*bool)(yyv14)) = r.DecodeBool()
+ }
+ }
+ case "rollbackTo":
+ if r.TryDecodeAsNil() {
+ if x.RollbackTo != nil {
+ x.RollbackTo = nil
+ }
+ } else {
+ if x.RollbackTo == nil {
+ x.RollbackTo = new(RollbackConfig)
+ }
+ x.RollbackTo.CodecDecodeSelf(d)
+ }
+ case "progressDeadlineSeconds":
+ if r.TryDecodeAsNil() {
+ if x.ProgressDeadlineSeconds != nil {
+ x.ProgressDeadlineSeconds = nil
+ }
+ } else {
+ if x.ProgressDeadlineSeconds == nil {
+ x.ProgressDeadlineSeconds = new(int32)
+ }
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int32)(x.ProgressDeadlineSeconds)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj19 int
+ var yyb19 bool
+ var yyhl19 bool = l >= 0
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Replicas != nil {
+ x.Replicas = nil
+ }
+ } else {
+ if x.Replicas == nil {
+ x.Replicas = new(int32)
+ }
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ *((*int32)(x.Replicas)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_v1.LabelSelector)
+ }
+ yym23 := z.DecBinary()
+ _ = yym23
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Template = pkg4_v1.PodTemplateSpec{}
+ } else {
+ yyv24 := &x.Template
+ yyv24.CodecDecodeSelf(d)
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Strategy = DeploymentStrategy{}
+ } else {
+ yyv25 := &x.Strategy
+ yyv25.CodecDecodeSelf(d)
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MinReadySeconds = 0
+ } else {
+ yyv26 := &x.MinReadySeconds
+ yym27 := z.DecBinary()
+ _ = yym27
+ if false {
+ } else {
+ *((*int32)(yyv26)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RevisionHistoryLimit != nil {
+ x.RevisionHistoryLimit = nil
+ }
+ } else {
+ if x.RevisionHistoryLimit == nil {
+ x.RevisionHistoryLimit = new(int32)
+ }
+ yym29 := z.DecBinary()
+ _ = yym29
+ if false {
+ } else {
+ *((*int32)(x.RevisionHistoryLimit)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Paused = false
+ } else {
+ yyv30 := &x.Paused
+ yym31 := z.DecBinary()
+ _ = yym31
+ if false {
+ } else {
+ *((*bool)(yyv30)) = r.DecodeBool()
+ }
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RollbackTo != nil {
+ x.RollbackTo = nil
+ }
+ } else {
+ if x.RollbackTo == nil {
+ x.RollbackTo = new(RollbackConfig)
+ }
+ x.RollbackTo.CodecDecodeSelf(d)
+ }
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.ProgressDeadlineSeconds != nil {
+ x.ProgressDeadlineSeconds = nil
+ }
+ } else {
+ if x.ProgressDeadlineSeconds == nil {
+ x.ProgressDeadlineSeconds = new(int32)
+ }
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ *((*int32)(x.ProgressDeadlineSeconds)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj19++
+ if yyhl19 {
+ yyb19 = yyj19 > l
+ } else {
+ yyb19 = r.CheckBreak()
+ }
+ if yyb19 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj19-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DeploymentRollback) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[3] = len(x.UpdatedAnnotations) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.UpdatedAnnotations == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.UpdatedAnnotations, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("updatedAnnotations"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.UpdatedAnnotations == nil {
+ r.EncodeNil()
+ } else {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.UpdatedAnnotations, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy16 := &x.RollbackTo
+ yy16.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rollbackTo"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy18 := &x.RollbackTo
+ yy18.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DeploymentRollback) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DeploymentRollback) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv8 := &x.Name
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "updatedAnnotations":
+ if r.TryDecodeAsNil() {
+ x.UpdatedAnnotations = nil
+ } else {
+ yyv10 := &x.UpdatedAnnotations
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv10, false, d)
+ }
+ }
+ case "rollbackTo":
+ if r.TryDecodeAsNil() {
+ x.RollbackTo = RollbackConfig{}
+ } else {
+ yyv12 := &x.RollbackTo
+ yyv12.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DeploymentRollback) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv14 := &x.Kind
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv16 := &x.APIVersion
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv18 := &x.Name
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*string)(yyv18)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UpdatedAnnotations = nil
+ } else {
+ yyv20 := &x.UpdatedAnnotations
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv20, false, d)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RollbackTo = RollbackConfig{}
+ } else {
+ yyv22 := &x.RollbackTo
+ yyv22.CodecDecodeSelf(d)
+ }
+ for {
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj13-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *RollbackConfig) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = x.Revision != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Revision))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("revision"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Revision))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RollbackConfig) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RollbackConfig) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "revision":
+ if r.TryDecodeAsNil() {
+ x.Revision = 0
+ } else {
+ yyv4 := &x.Revision
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int64)(yyv4)) = int64(r.DecodeInt(64))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RollbackConfig) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Revision = 0
+ } else {
+ yyv7 := &x.Revision
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ *((*int64)(yyv7)) = int64(r.DecodeInt(64))
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DeploymentStrategy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Type != ""
+ yyq2[1] = x.RollingUpdate != 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_containerArrayElem1234)
+ if yyq2[0] {
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.RollingUpdate == nil {
+ r.EncodeNil()
+ } else {
+ x.RollingUpdate.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rollingUpdate"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RollingUpdate == nil {
+ r.EncodeNil()
+ } else {
+ x.RollingUpdate.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DeploymentStrategy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DeploymentStrategy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "rollingUpdate":
+ if r.TryDecodeAsNil() {
+ if x.RollingUpdate != nil {
+ x.RollingUpdate = nil
+ }
+ } else {
+ if x.RollingUpdate == nil {
+ x.RollingUpdate = new(RollingUpdateDeployment)
+ }
+ x.RollingUpdate.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DeploymentStrategy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv7 := &x.Type
+ yyv7.CodecDecodeSelf(d)
+ }
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RollingUpdate != nil {
+ x.RollingUpdate = nil
+ }
+ } else {
+ if x.RollingUpdate == nil {
+ x.RollingUpdate = new(RollingUpdateDeployment)
+ }
+ x.RollingUpdate.CodecDecodeSelf(d)
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x DeploymentStrategyType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *DeploymentStrategyType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *RollingUpdateDeployment) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.MaxUnavailable != nil
+ yyq2[1] = x.MaxSurge != 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.MaxUnavailable == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.MaxUnavailable) {
+ } else if !yym4 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.MaxUnavailable)
+ } else {
+ z.EncFallback(x.MaxUnavailable)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("maxUnavailable"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.MaxUnavailable == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.MaxUnavailable) {
+ } else if !yym5 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.MaxUnavailable)
+ } else {
+ z.EncFallback(x.MaxUnavailable)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.MaxSurge == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.MaxSurge) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.MaxSurge)
+ } else {
+ z.EncFallback(x.MaxSurge)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("maxSurge"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.MaxSurge == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.MaxSurge) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.MaxSurge)
+ } else {
+ z.EncFallback(x.MaxSurge)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RollingUpdateDeployment) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RollingUpdateDeployment) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "maxUnavailable":
+ if r.TryDecodeAsNil() {
+ if x.MaxUnavailable != nil {
+ x.MaxUnavailable = nil
+ }
+ } else {
+ if x.MaxUnavailable == nil {
+ x.MaxUnavailable = new(pkg5_intstr.IntOrString)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.MaxUnavailable) {
+ } else if !yym5 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.MaxUnavailable)
+ } else {
+ z.DecFallback(x.MaxUnavailable, false)
+ }
+ }
+ case "maxSurge":
+ if r.TryDecodeAsNil() {
+ if x.MaxSurge != nil {
+ x.MaxSurge = nil
+ }
+ } else {
+ if x.MaxSurge == nil {
+ x.MaxSurge = new(pkg5_intstr.IntOrString)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.MaxSurge) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.MaxSurge)
+ } else {
+ z.DecFallback(x.MaxSurge, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RollingUpdateDeployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.MaxUnavailable != nil {
+ x.MaxUnavailable = nil
+ }
+ } else {
+ if x.MaxUnavailable == nil {
+ x.MaxUnavailable = new(pkg5_intstr.IntOrString)
+ }
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.MaxUnavailable) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.MaxUnavailable)
+ } else {
+ z.DecFallback(x.MaxUnavailable, false)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.MaxSurge != nil {
+ x.MaxSurge = nil
+ }
+ } else {
+ if x.MaxSurge == nil {
+ x.MaxSurge = new(pkg5_intstr.IntOrString)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.MaxSurge) {
+ } else if !yym12 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.MaxSurge)
+ } else {
+ z.DecFallback(x.MaxSurge, false)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DeploymentStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.ObservedGeneration != 0
+ yyq2[1] = x.Replicas != 0
+ yyq2[2] = x.UpdatedReplicas != 0
+ yyq2[3] = x.ReadyReplicas != 0
+ yyq2[4] = x.AvailableReplicas != 0
+ yyq2[5] = x.UnavailableReplicas != 0
+ yyq2[6] = len(x.Conditions) != 0
+ yyq2[7] = x.CollisionCount != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ObservedGeneration))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("observedGeneration"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ObservedGeneration))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.UpdatedReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("updatedReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.UpdatedReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ReadyReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readyReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ReadyReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(x.AvailableReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("availableReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(x.AvailableReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeInt(int64(x.UnavailableReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("unavailableReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeInt(int64(x.UnavailableReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ h.encSliceDeploymentCondition(([]DeploymentCondition)(x.Conditions), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("conditions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ h.encSliceDeploymentCondition(([]DeploymentCondition)(x.Conditions), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ if x.CollisionCount == nil {
+ r.EncodeNil()
+ } else {
+ yy25 := *x.CollisionCount
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeInt(int64(yy25))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("collisionCount"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.CollisionCount == nil {
+ r.EncodeNil()
+ } else {
+ yy27 := *x.CollisionCount
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeInt(int64(yy27))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DeploymentStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DeploymentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "observedGeneration":
+ if r.TryDecodeAsNil() {
+ x.ObservedGeneration = 0
+ } else {
+ yyv4 := &x.ObservedGeneration
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int64)(yyv4)) = int64(r.DecodeInt(64))
+ }
+ }
+ 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 "updatedReplicas":
+ if r.TryDecodeAsNil() {
+ x.UpdatedReplicas = 0
+ } else {
+ yyv8 := &x.UpdatedReplicas
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "readyReplicas":
+ if r.TryDecodeAsNil() {
+ x.ReadyReplicas = 0
+ } else {
+ yyv10 := &x.ReadyReplicas
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(yyv10)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "availableReplicas":
+ if r.TryDecodeAsNil() {
+ x.AvailableReplicas = 0
+ } else {
+ yyv12 := &x.AvailableReplicas
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int32)(yyv12)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "unavailableReplicas":
+ if r.TryDecodeAsNil() {
+ x.UnavailableReplicas = 0
+ } else {
+ yyv14 := &x.UnavailableReplicas
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*int32)(yyv14)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "conditions":
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv16 := &x.Conditions
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ h.decSliceDeploymentCondition((*[]DeploymentCondition)(yyv16), d)
+ }
+ }
+ case "collisionCount":
+ if r.TryDecodeAsNil() {
+ if x.CollisionCount != nil {
+ x.CollisionCount = nil
+ }
+ } else {
+ if x.CollisionCount == nil {
+ x.CollisionCount = new(int64)
+ }
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*int64)(x.CollisionCount)) = int64(r.DecodeInt(64))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DeploymentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj20 int
+ var yyb20 bool
+ var yyhl20 bool = l >= 0
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObservedGeneration = 0
+ } else {
+ yyv21 := &x.ObservedGeneration
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int64)(yyv21)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv23 := &x.Replicas
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*int32)(yyv23)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UpdatedReplicas = 0
+ } else {
+ yyv25 := &x.UpdatedReplicas
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*int32)(yyv25)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadyReplicas = 0
+ } else {
+ yyv27 := &x.ReadyReplicas
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*int32)(yyv27)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.AvailableReplicas = 0
+ } else {
+ yyv29 := &x.AvailableReplicas
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*int32)(yyv29)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UnavailableReplicas = 0
+ } else {
+ yyv31 := &x.UnavailableReplicas
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*int32)(yyv31)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv33 := &x.Conditions
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ h.decSliceDeploymentCondition((*[]DeploymentCondition)(yyv33), d)
+ }
+ }
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.CollisionCount != nil {
+ x.CollisionCount = nil
+ }
+ } else {
+ if x.CollisionCount == nil {
+ x.CollisionCount = new(int64)
+ }
+ yym36 := z.DecBinary()
+ _ = yym36
+ if false {
+ } else {
+ *((*int64)(x.CollisionCount)) = int64(r.DecodeInt(64))
+ }
+ }
+ for {
+ yyj20++
+ if yyhl20 {
+ yyb20 = yyj20 > l
+ } else {
+ yyb20 = r.CheckBreak()
+ }
+ if yyb20 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj20-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x DeploymentConditionType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *DeploymentConditionType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *DeploymentCondition) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = true
+ yyq2[3] = true
+ yyq2[4] = x.Reason != ""
+ yyq2[5] = x.Message != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yysf7 := &x.Status
+ yysf7.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yysf8 := &x.Status
+ yysf8.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy10 := &x.LastUpdateTime
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy10) {
+ } else if yym11 {
+ z.EncBinaryMarshal(yy10)
+ } else if !yym11 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy10)
+ } else {
+ z.EncFallback(yy10)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastUpdateTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.LastUpdateTime
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if yym13 {
+ z.EncBinaryMarshal(yy12)
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.LastTransitionTime
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy15) {
+ } else if yym16 {
+ z.EncBinaryMarshal(yy15)
+ } else if !yym16 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy15)
+ } else {
+ z.EncFallback(yy15)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.LastTransitionTime
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy17) {
+ } else if yym18 {
+ z.EncBinaryMarshal(yy17)
+ } else if !yym18 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy17)
+ } else {
+ z.EncFallback(yy17)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DeploymentCondition) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DeploymentCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "lastUpdateTime":
+ if r.TryDecodeAsNil() {
+ x.LastUpdateTime = pkg1_v1.Time{}
+ } else {
+ yyv6 := &x.LastUpdateTime
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if yym7 {
+ z.DecBinaryUnmarshal(yyv6)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ case "lastTransitionTime":
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg1_v1.Time{}
+ } else {
+ yyv8 := &x.LastTransitionTime
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv8) {
+ } else if yym9 {
+ z.DecBinaryUnmarshal(yyv8)
+ } else if !yym9 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv8)
+ } else {
+ z.DecFallback(yyv8, false)
+ }
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv10 := &x.Reason
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv12 := &x.Message
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*string)(yyv12)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DeploymentCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv15 := &x.Type
+ yyv15.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv16 := &x.Status
+ yyv16.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastUpdateTime = pkg1_v1.Time{}
+ } else {
+ yyv17 := &x.LastUpdateTime
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv17) {
+ } else if yym18 {
+ z.DecBinaryUnmarshal(yyv17)
+ } else if !yym18 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv17)
+ } else {
+ z.DecFallback(yyv17, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg1_v1.Time{}
+ } else {
+ yyv19 := &x.LastTransitionTime
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv19) {
+ } else if yym20 {
+ z.DecBinaryUnmarshal(yyv19)
+ } else if !yym20 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv19)
+ } else {
+ z.DecFallback(yyv19, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv21 := &x.Reason
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv23 := &x.Message
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*string)(yyv23)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DeploymentList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceDeployment(([]Deployment)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceDeployment(([]Deployment)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DeploymentList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DeploymentList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceDeployment((*[]Deployment)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DeploymentList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceDeployment((*[]Deployment)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DaemonSetUpdateStrategy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Type != ""
+ yyq2[1] = x.RollingUpdate != 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_containerArrayElem1234)
+ if yyq2[0] {
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.RollingUpdate == nil {
+ r.EncodeNil()
+ } else {
+ x.RollingUpdate.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rollingUpdate"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RollingUpdate == nil {
+ r.EncodeNil()
+ } else {
+ x.RollingUpdate.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DaemonSetUpdateStrategy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DaemonSetUpdateStrategy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "rollingUpdate":
+ if r.TryDecodeAsNil() {
+ if x.RollingUpdate != nil {
+ x.RollingUpdate = nil
+ }
+ } else {
+ if x.RollingUpdate == nil {
+ x.RollingUpdate = new(RollingUpdateDaemonSet)
+ }
+ x.RollingUpdate.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DaemonSetUpdateStrategy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv7 := &x.Type
+ yyv7.CodecDecodeSelf(d)
+ }
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RollingUpdate != nil {
+ x.RollingUpdate = nil
+ }
+ } else {
+ if x.RollingUpdate == nil {
+ x.RollingUpdate = new(RollingUpdateDaemonSet)
+ }
+ x.RollingUpdate.CodecDecodeSelf(d)
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x DaemonSetUpdateStrategyType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *DaemonSetUpdateStrategyType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *RollingUpdateDaemonSet) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = x.MaxUnavailable != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.MaxUnavailable == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.MaxUnavailable) {
+ } else if !yym4 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.MaxUnavailable)
+ } else {
+ z.EncFallback(x.MaxUnavailable)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("maxUnavailable"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.MaxUnavailable == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.MaxUnavailable) {
+ } else if !yym5 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.MaxUnavailable)
+ } else {
+ z.EncFallback(x.MaxUnavailable)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RollingUpdateDaemonSet) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RollingUpdateDaemonSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "maxUnavailable":
+ if r.TryDecodeAsNil() {
+ if x.MaxUnavailable != nil {
+ x.MaxUnavailable = nil
+ }
+ } else {
+ if x.MaxUnavailable == nil {
+ x.MaxUnavailable = new(pkg5_intstr.IntOrString)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.MaxUnavailable) {
+ } else if !yym5 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.MaxUnavailable)
+ } else {
+ z.DecFallback(x.MaxUnavailable, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RollingUpdateDaemonSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.MaxUnavailable != nil {
+ x.MaxUnavailable = nil
+ }
+ } else {
+ if x.MaxUnavailable == nil {
+ x.MaxUnavailable = new(pkg5_intstr.IntOrString)
+ }
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.MaxUnavailable) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.MaxUnavailable)
+ } else {
+ z.DecFallback(x.MaxUnavailable, false)
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DaemonSetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Selector != nil
+ yyq2[2] = true
+ yyq2[3] = x.MinReadySeconds != 0
+ yyq2[4] = x.TemplateGeneration != 0
+ yyq2[5] = x.RevisionHistoryLimit != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy7 := &x.Template
+ yy7.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("template"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.Template
+ yy9.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy12 := &x.UpdateStrategy
+ yy12.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("updateStrategy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy14 := &x.UpdateStrategy
+ yy14.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MinReadySeconds))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("minReadySeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MinReadySeconds))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeInt(int64(x.TemplateGeneration))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("templateGeneration"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym21 := z.EncBinary()
+ _ = yym21
+ if false {
+ } else {
+ r.EncodeInt(int64(x.TemplateGeneration))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.RevisionHistoryLimit == nil {
+ r.EncodeNil()
+ } else {
+ yy23 := *x.RevisionHistoryLimit
+ yym24 := z.EncBinary()
+ _ = yym24
+ if false {
+ } else {
+ r.EncodeInt(int64(yy23))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("revisionHistoryLimit"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RevisionHistoryLimit == nil {
+ r.EncodeNil()
+ } else {
+ yy25 := *x.RevisionHistoryLimit
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeInt(int64(yy25))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DaemonSetSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DaemonSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "selector":
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_v1.LabelSelector)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ case "template":
+ if r.TryDecodeAsNil() {
+ x.Template = pkg4_v1.PodTemplateSpec{}
+ } else {
+ yyv6 := &x.Template
+ yyv6.CodecDecodeSelf(d)
+ }
+ case "updateStrategy":
+ if r.TryDecodeAsNil() {
+ x.UpdateStrategy = DaemonSetUpdateStrategy{}
+ } else {
+ yyv7 := &x.UpdateStrategy
+ yyv7.CodecDecodeSelf(d)
+ }
+ case "minReadySeconds":
+ if r.TryDecodeAsNil() {
+ x.MinReadySeconds = 0
+ } else {
+ yyv8 := &x.MinReadySeconds
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "templateGeneration":
+ if r.TryDecodeAsNil() {
+ x.TemplateGeneration = 0
+ } else {
+ yyv10 := &x.TemplateGeneration
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int64)(yyv10)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "revisionHistoryLimit":
+ if r.TryDecodeAsNil() {
+ if x.RevisionHistoryLimit != nil {
+ x.RevisionHistoryLimit = nil
+ }
+ } else {
+ if x.RevisionHistoryLimit == nil {
+ x.RevisionHistoryLimit = new(int32)
+ }
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int32)(x.RevisionHistoryLimit)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DaemonSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_v1.LabelSelector)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Template = pkg4_v1.PodTemplateSpec{}
+ } else {
+ yyv17 := &x.Template
+ yyv17.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UpdateStrategy = DaemonSetUpdateStrategy{}
+ } else {
+ yyv18 := &x.UpdateStrategy
+ yyv18.CodecDecodeSelf(d)
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MinReadySeconds = 0
+ } else {
+ yyv19 := &x.MinReadySeconds
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*int32)(yyv19)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TemplateGeneration = 0
+ } else {
+ yyv21 := &x.TemplateGeneration
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int64)(yyv21)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.RevisionHistoryLimit != nil {
+ x.RevisionHistoryLimit = nil
+ }
+ } else {
+ if x.RevisionHistoryLimit == nil {
+ x.RevisionHistoryLimit = new(int32)
+ }
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*int32)(x.RevisionHistoryLimit)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DaemonSetStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [9]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[4] = x.ObservedGeneration != 0
+ yyq2[5] = x.UpdatedNumberScheduled != 0
+ yyq2[6] = x.NumberAvailable != 0
+ yyq2[7] = x.NumberUnavailable != 0
+ yyq2[8] = x.CollisionCount != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(9)
+ } else {
+ yynn2 = 4
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.CurrentNumberScheduled))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentNumberScheduled"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.CurrentNumberScheduled))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(x.NumberMisscheduled))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("numberMisscheduled"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.NumberMisscheduled))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.DesiredNumberScheduled))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("desiredNumberScheduled"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.DesiredNumberScheduled))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.NumberReady))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("numberReady"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(x.NumberReady))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ObservedGeneration))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("observedGeneration"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ObservedGeneration))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeInt(int64(x.UpdatedNumberScheduled))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("updatedNumberScheduled"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeInt(int64(x.UpdatedNumberScheduled))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ r.EncodeInt(int64(x.NumberAvailable))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("numberAvailable"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ r.EncodeInt(int64(x.NumberAvailable))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeInt(int64(x.NumberUnavailable))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("numberUnavailable"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeInt(int64(x.NumberUnavailable))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ if x.CollisionCount == nil {
+ r.EncodeNil()
+ } else {
+ yy28 := *x.CollisionCount
+ yym29 := z.EncBinary()
+ _ = yym29
+ if false {
+ } else {
+ r.EncodeInt(int64(yy28))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("collisionCount"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.CollisionCount == nil {
+ r.EncodeNil()
+ } else {
+ yy30 := *x.CollisionCount
+ yym31 := z.EncBinary()
+ _ = yym31
+ if false {
+ } else {
+ r.EncodeInt(int64(yy30))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DaemonSetStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DaemonSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "currentNumberScheduled":
+ if r.TryDecodeAsNil() {
+ x.CurrentNumberScheduled = 0
+ } else {
+ yyv4 := &x.CurrentNumberScheduled
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(yyv4)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "numberMisscheduled":
+ if r.TryDecodeAsNil() {
+ x.NumberMisscheduled = 0
+ } else {
+ yyv6 := &x.NumberMisscheduled
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int32)(yyv6)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "desiredNumberScheduled":
+ if r.TryDecodeAsNil() {
+ x.DesiredNumberScheduled = 0
+ } else {
+ yyv8 := &x.DesiredNumberScheduled
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "numberReady":
+ if r.TryDecodeAsNil() {
+ x.NumberReady = 0
+ } else {
+ yyv10 := &x.NumberReady
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(yyv10)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "observedGeneration":
+ if r.TryDecodeAsNil() {
+ x.ObservedGeneration = 0
+ } else {
+ yyv12 := &x.ObservedGeneration
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int64)(yyv12)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "updatedNumberScheduled":
+ if r.TryDecodeAsNil() {
+ x.UpdatedNumberScheduled = 0
+ } else {
+ yyv14 := &x.UpdatedNumberScheduled
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*int32)(yyv14)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "numberAvailable":
+ if r.TryDecodeAsNil() {
+ x.NumberAvailable = 0
+ } else {
+ yyv16 := &x.NumberAvailable
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*int32)(yyv16)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "numberUnavailable":
+ if r.TryDecodeAsNil() {
+ x.NumberUnavailable = 0
+ } else {
+ yyv18 := &x.NumberUnavailable
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*int32)(yyv18)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "collisionCount":
+ if r.TryDecodeAsNil() {
+ if x.CollisionCount != nil {
+ x.CollisionCount = nil
+ }
+ } else {
+ if x.CollisionCount == nil {
+ x.CollisionCount = new(int64)
+ }
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ *((*int64)(x.CollisionCount)) = int64(r.DecodeInt(64))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DaemonSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentNumberScheduled = 0
+ } else {
+ yyv23 := &x.CurrentNumberScheduled
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*int32)(yyv23)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NumberMisscheduled = 0
+ } else {
+ yyv25 := &x.NumberMisscheduled
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DesiredNumberScheduled = 0
+ } else {
+ yyv27 := &x.DesiredNumberScheduled
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*int32)(yyv27)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NumberReady = 0
+ } else {
+ yyv29 := &x.NumberReady
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*int32)(yyv29)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObservedGeneration = 0
+ } else {
+ yyv31 := &x.ObservedGeneration
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ *((*int64)(yyv31)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.UpdatedNumberScheduled = 0
+ } else {
+ yyv33 := &x.UpdatedNumberScheduled
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ *((*int32)(yyv33)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NumberAvailable = 0
+ } else {
+ yyv35 := &x.NumberAvailable
+ yym36 := z.DecBinary()
+ _ = yym36
+ if false {
+ } else {
+ *((*int32)(yyv35)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NumberUnavailable = 0
+ } else {
+ yyv37 := &x.NumberUnavailable
+ yym38 := z.DecBinary()
+ _ = yym38
+ if false {
+ } else {
+ *((*int32)(yyv37)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.CollisionCount != nil {
+ x.CollisionCount = nil
+ }
+ } else {
+ if x.CollisionCount == nil {
+ x.CollisionCount = new(int64)
+ }
+ yym40 := z.DecBinary()
+ _ = yym40
+ if false {
+ } else {
+ *((*int64)(x.CollisionCount)) = int64(r.DecodeInt(64))
+ }
+ }
+ for {
+ yyj22++
+ if yyhl22 {
+ yyb22 = yyj22 > l
+ } else {
+ yyb22 = r.CheckBreak()
+ }
+ if yyb22 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj22-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DaemonSet) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DaemonSet) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DaemonSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = DaemonSetSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = DaemonSetStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DaemonSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = DaemonSetSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = DaemonSetStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *DaemonSetList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceDaemonSet(([]DaemonSet)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceDaemonSet(([]DaemonSet)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *DaemonSetList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *DaemonSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceDaemonSet((*[]DaemonSet)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *DaemonSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceDaemonSet((*[]DaemonSet)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ThirdPartyResourceDataList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceThirdPartyResourceData(([]ThirdPartyResourceData)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceThirdPartyResourceData(([]ThirdPartyResourceData)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ThirdPartyResourceDataList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ThirdPartyResourceDataList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceThirdPartyResourceData((*[]ThirdPartyResourceData)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ThirdPartyResourceDataList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceThirdPartyResourceData((*[]ThirdPartyResourceData)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Ingress) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Ingress) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Ingress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = IngressSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = IngressStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Ingress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = IngressSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = IngressStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *IngressList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceIngress(([]Ingress)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceIngress(([]Ingress)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *IngressList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *IngressList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceIngress((*[]Ingress)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *IngressList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceIngress((*[]Ingress)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *IngressSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Backend != nil
+ yyq2[1] = len(x.TLS) != 0
+ yyq2[2] = len(x.Rules) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Backend == nil {
+ r.EncodeNil()
+ } else {
+ x.Backend.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("backend"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Backend == nil {
+ r.EncodeNil()
+ } else {
+ x.Backend.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.TLS == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceIngressTLS(([]IngressTLS)(x.TLS), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("tls"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.TLS == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceIngressTLS(([]IngressTLS)(x.TLS), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceIngressRule(([]IngressRule)(x.Rules), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rules"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.encSliceIngressRule(([]IngressRule)(x.Rules), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *IngressSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *IngressSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "backend":
+ if r.TryDecodeAsNil() {
+ if x.Backend != nil {
+ x.Backend = nil
+ }
+ } else {
+ if x.Backend == nil {
+ x.Backend = new(IngressBackend)
+ }
+ x.Backend.CodecDecodeSelf(d)
+ }
+ case "tls":
+ if r.TryDecodeAsNil() {
+ x.TLS = nil
+ } else {
+ yyv5 := &x.TLS
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSliceIngressTLS((*[]IngressTLS)(yyv5), d)
+ }
+ }
+ case "rules":
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv7 := &x.Rules
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSliceIngressRule((*[]IngressRule)(yyv7), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *IngressSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Backend != nil {
+ x.Backend = nil
+ }
+ } else {
+ if x.Backend == nil {
+ x.Backend = new(IngressBackend)
+ }
+ x.Backend.CodecDecodeSelf(d)
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.TLS = nil
+ } else {
+ yyv11 := &x.TLS
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceIngressTLS((*[]IngressTLS)(yyv11), d)
+ }
+ }
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv13 := &x.Rules
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.decSliceIngressRule((*[]IngressRule)(yyv13), d)
+ }
+ }
+ for {
+ yyj9++
+ if yyhl9 {
+ yyb9 = yyj9 > l
+ } else {
+ yyb9 = r.CheckBreak()
+ }
+ if yyb9 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj9-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *IngressTLS) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Hosts) != 0
+ yyq2[1] = x.SecretName != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Hosts == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Hosts, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hosts"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Hosts == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Hosts, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SecretName))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("secretName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.SecretName))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *IngressTLS) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *IngressTLS) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "hosts":
+ if r.TryDecodeAsNil() {
+ x.Hosts = nil
+ } else {
+ yyv4 := &x.Hosts
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv4, false, d)
+ }
+ }
+ case "secretName":
+ if r.TryDecodeAsNil() {
+ x.SecretName = ""
+ } else {
+ yyv6 := &x.SecretName
+ 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_containerMapEnd1234)
+}
+
+func (x *IngressTLS) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Hosts = nil
+ } else {
+ yyv9 := &x.Hosts
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv9, false, d)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SecretName = ""
+ } else {
+ yyv11 := &x.SecretName
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *IngressStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = true
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yy4 := &x.LoadBalancer
+ yy4.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("loadBalancer"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.LoadBalancer
+ yy6.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *IngressStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *IngressStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "loadBalancer":
+ if r.TryDecodeAsNil() {
+ x.LoadBalancer = pkg4_v1.LoadBalancerStatus{}
+ } else {
+ yyv4 := &x.LoadBalancer
+ yyv4.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *IngressStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj5 int
+ var yyb5 bool
+ var yyhl5 bool = l >= 0
+ yyj5++
+ if yyhl5 {
+ yyb5 = yyj5 > l
+ } else {
+ yyb5 = r.CheckBreak()
+ }
+ if yyb5 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LoadBalancer = pkg4_v1.LoadBalancerStatus{}
+ } else {
+ yyv6 := &x.LoadBalancer
+ yyv6.CodecDecodeSelf(d)
+ }
+ for {
+ yyj5++
+ if yyhl5 {
+ yyb5 = yyj5 > l
+ } else {
+ yyb5 = r.CheckBreak()
+ }
+ if yyb5 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj5-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *IngressRule) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Host != ""
+ yyq2[1] = x.IngressRuleValue.HTTP != nil && x.HTTP != 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Host))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("host"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Host))
+ }
+ }
+ }
+ var yyn6 bool
+ if x.IngressRuleValue.HTTP == nil {
+ yyn6 = true
+ goto LABEL6
+ }
+ LABEL6:
+ if yyr2 || yy2arr2 {
+ if yyn6 {
+ r.EncodeNil()
+ } else {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.HTTP == nil {
+ r.EncodeNil()
+ } else {
+ x.HTTP.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("http"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if yyn6 {
+ r.EncodeNil()
+ } else {
+ if x.HTTP == nil {
+ r.EncodeNil()
+ } else {
+ x.HTTP.CodecEncodeSelf(e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *IngressRule) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *IngressRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "host":
+ if r.TryDecodeAsNil() {
+ x.Host = ""
+ } else {
+ yyv4 := &x.Host
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "http":
+ if x.IngressRuleValue.HTTP == nil {
+ x.IngressRuleValue.HTTP = new(HTTPIngressRuleValue)
+ }
+ if r.TryDecodeAsNil() {
+ if x.HTTP != nil {
+ x.HTTP = nil
+ }
+ } else {
+ if x.HTTP == nil {
+ x.HTTP = new(HTTPIngressRuleValue)
+ }
+ x.HTTP.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *IngressRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Host = ""
+ } else {
+ yyv8 := &x.Host
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ if x.IngressRuleValue.HTTP == nil {
+ x.IngressRuleValue.HTTP = new(HTTPIngressRuleValue)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.HTTP != nil {
+ x.HTTP = nil
+ }
+ } else {
+ if x.HTTP == nil {
+ x.HTTP = new(HTTPIngressRuleValue)
+ }
+ x.HTTP.CodecDecodeSelf(d)
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *IngressRuleValue) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ yyq2[0] = x.HTTP != nil
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(1)
+ } else {
+ yynn2 = 0
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ if x.HTTP == nil {
+ r.EncodeNil()
+ } else {
+ x.HTTP.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("http"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.HTTP == nil {
+ r.EncodeNil()
+ } else {
+ x.HTTP.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *IngressRuleValue) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *IngressRuleValue) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "http":
+ if r.TryDecodeAsNil() {
+ if x.HTTP != nil {
+ x.HTTP = nil
+ }
+ } else {
+ if x.HTTP == nil {
+ x.HTTP = new(HTTPIngressRuleValue)
+ }
+ x.HTTP.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *IngressRuleValue) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj5 int
+ var yyb5 bool
+ var yyhl5 bool = l >= 0
+ yyj5++
+ if yyhl5 {
+ yyb5 = yyj5 > l
+ } else {
+ yyb5 = r.CheckBreak()
+ }
+ if yyb5 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.HTTP != nil {
+ x.HTTP = nil
+ }
+ } else {
+ if x.HTTP == nil {
+ x.HTTP = new(HTTPIngressRuleValue)
+ }
+ x.HTTP.CodecDecodeSelf(d)
+ }
+ for {
+ yyj5++
+ if yyhl5 {
+ yyb5 = yyj5 > l
+ } else {
+ yyb5 = r.CheckBreak()
+ }
+ if yyb5 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj5-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *HTTPIngressRuleValue) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if x.Paths == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceHTTPIngressPath(([]HTTPIngressPath)(x.Paths), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("paths"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Paths == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceHTTPIngressPath(([]HTTPIngressPath)(x.Paths), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HTTPIngressRuleValue) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HTTPIngressRuleValue) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "paths":
+ if r.TryDecodeAsNil() {
+ x.Paths = nil
+ } else {
+ yyv4 := &x.Paths
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceHTTPIngressPath((*[]HTTPIngressPath)(yyv4), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HTTPIngressRuleValue) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Paths = nil
+ } else {
+ yyv7 := &x.Paths
+ yym8 := z.DecBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.decSliceHTTPIngressPath((*[]HTTPIngressPath)(yyv7), d)
+ }
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *HTTPIngressPath) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Path != ""
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("path"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Path))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy7 := &x.Backend
+ yy7.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("backend"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.Backend
+ yy9.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HTTPIngressPath) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HTTPIngressPath) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "path":
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv4 := &x.Path
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "backend":
+ if r.TryDecodeAsNil() {
+ x.Backend = IngressBackend{}
+ } else {
+ yyv6 := &x.Backend
+ yyv6.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HTTPIngressPath) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Path = ""
+ } else {
+ yyv8 := &x.Path
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Backend = IngressBackend{}
+ } else {
+ yyv10 := &x.Backend
+ yyv10.CodecDecodeSelf(d)
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *IngressBackend) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ServiceName))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("serviceName"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.ServiceName))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy7 := &x.ServicePort
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy7) {
+ } else if !yym8 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy7)
+ } else {
+ z.EncFallback(yy7)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("servicePort"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy9 := &x.ServicePort
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy9) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy9)
+ } else {
+ z.EncFallback(yy9)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *IngressBackend) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *IngressBackend) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "serviceName":
+ if r.TryDecodeAsNil() {
+ x.ServiceName = ""
+ } else {
+ yyv4 := &x.ServiceName
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "servicePort":
+ if r.TryDecodeAsNil() {
+ x.ServicePort = pkg5_intstr.IntOrString{}
+ } else {
+ yyv6 := &x.ServicePort
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *IngressBackend) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ServiceName = ""
+ } else {
+ yyv9 := &x.ServiceName
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ServicePort = pkg5_intstr.IntOrString{}
+ } else {
+ yyv11 := &x.ServicePort
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv11) {
+ } else if !yym12 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv11)
+ } else {
+ z.DecFallback(yyv11, false)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ReplicaSet) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ReplicaSet) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ReplicaSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = ReplicaSetSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ReplicaSetStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ReplicaSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = ReplicaSetSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ReplicaSetStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ReplicaSetList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceReplicaSet(([]ReplicaSet)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceReplicaSet(([]ReplicaSet)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ReplicaSetList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ReplicaSetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceReplicaSet((*[]ReplicaSet)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ReplicaSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceReplicaSet((*[]ReplicaSet)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ReplicaSetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Replicas != nil
+ yyq2[1] = x.MinReadySeconds != 0
+ yyq2[2] = x.Selector != nil
+ yyq2[3] = true
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Replicas == nil {
+ r.EncodeNil()
+ } else {
+ yy4 := *x.Replicas
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(yy4))
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Replicas == nil {
+ r.EncodeNil()
+ } else {
+ yy6 := *x.Replicas
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(yy6))
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MinReadySeconds))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("minReadySeconds"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.MinReadySeconds))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym12 := z.EncBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Template
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("template"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Template
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ReplicaSetSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ReplicaSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "replicas":
+ if r.TryDecodeAsNil() {
+ if x.Replicas != nil {
+ x.Replicas = nil
+ }
+ } else {
+ if x.Replicas == nil {
+ x.Replicas = new(int32)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(x.Replicas)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "minReadySeconds":
+ if r.TryDecodeAsNil() {
+ x.MinReadySeconds = 0
+ } else {
+ yyv6 := &x.MinReadySeconds
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int32)(yyv6)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_v1.LabelSelector)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ case "template":
+ if r.TryDecodeAsNil() {
+ x.Template = pkg4_v1.PodTemplateSpec{}
+ } else {
+ yyv10 := &x.Template
+ yyv10.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ReplicaSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Replicas != nil {
+ x.Replicas = nil
+ }
+ } else {
+ if x.Replicas == nil {
+ x.Replicas = new(int32)
+ }
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int32)(x.Replicas)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.MinReadySeconds = 0
+ } else {
+ yyv14 := &x.MinReadySeconds
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*int32)(yyv14)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg1_v1.LabelSelector)
+ }
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Template = pkg4_v1.PodTemplateSpec{}
+ } else {
+ yyv18 := &x.Template
+ yyv18.CodecDecodeSelf(d)
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ReplicaSetStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.FullyLabeledReplicas != 0
+ yyq2[2] = x.ReadyReplicas != 0
+ yyq2[3] = x.AvailableReplicas != 0
+ yyq2[4] = x.ObservedGeneration != 0
+ yyq2[5] = len(x.Conditions) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("replicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Replicas))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(x.FullyLabeledReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fullyLabeledReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.FullyLabeledReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ReadyReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readyReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ReadyReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.AvailableReplicas))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("availableReplicas"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(x.AvailableReplicas))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ObservedGeneration))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("observedGeneration"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ObservedGeneration))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ h.encSliceReplicaSetCondition(([]ReplicaSetCondition)(x.Conditions), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("conditions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Conditions == nil {
+ r.EncodeNil()
+ } else {
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.encSliceReplicaSetCondition(([]ReplicaSetCondition)(x.Conditions), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ReplicaSetStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ReplicaSetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "replicas":
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv4 := &x.Replicas
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(yyv4)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "fullyLabeledReplicas":
+ if r.TryDecodeAsNil() {
+ x.FullyLabeledReplicas = 0
+ } else {
+ yyv6 := &x.FullyLabeledReplicas
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int32)(yyv6)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "readyReplicas":
+ if r.TryDecodeAsNil() {
+ x.ReadyReplicas = 0
+ } else {
+ yyv8 := &x.ReadyReplicas
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "availableReplicas":
+ if r.TryDecodeAsNil() {
+ x.AvailableReplicas = 0
+ } else {
+ yyv10 := &x.AvailableReplicas
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(yyv10)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "observedGeneration":
+ if r.TryDecodeAsNil() {
+ x.ObservedGeneration = 0
+ } else {
+ yyv12 := &x.ObservedGeneration
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int64)(yyv12)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "conditions":
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv14 := &x.Conditions
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.decSliceReplicaSetCondition((*[]ReplicaSetCondition)(yyv14), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ReplicaSetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj16 int
+ var yyb16 bool
+ var yyhl16 bool = l >= 0
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Replicas = 0
+ } else {
+ yyv17 := &x.Replicas
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int32)(yyv17)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FullyLabeledReplicas = 0
+ } else {
+ yyv19 := &x.FullyLabeledReplicas
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*int32)(yyv19)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadyReplicas = 0
+ } else {
+ yyv21 := &x.ReadyReplicas
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int32)(yyv21)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.AvailableReplicas = 0
+ } else {
+ yyv23 := &x.AvailableReplicas
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*int32)(yyv23)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObservedGeneration = 0
+ } else {
+ yyv25 := &x.ObservedGeneration
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*int64)(yyv25)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Conditions = nil
+ } else {
+ yyv27 := &x.Conditions
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ h.decSliceReplicaSetCondition((*[]ReplicaSetCondition)(yyv27), d)
+ }
+ }
+ for {
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj16-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x ReplicaSetConditionType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *ReplicaSetConditionType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *ReplicaSetCondition) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[2] = true
+ yyq2[3] = x.Reason != ""
+ yyq2[4] = x.Message != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ x.Type.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("type"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Type.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yysf7 := &x.Status
+ yysf7.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yysf8 := &x.Status
+ yysf8.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ yy10 := &x.LastTransitionTime
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy10) {
+ } else if yym11 {
+ z.EncBinaryMarshal(yy10)
+ } else if !yym11 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy10)
+ } else {
+ z.EncFallback(yy10)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("lastTransitionTime"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy12 := &x.LastTransitionTime
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy12) {
+ } else if yym13 {
+ z.EncBinaryMarshal(yy12)
+ } else if !yym13 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy12)
+ } else {
+ z.EncFallback(yy12)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("reason"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Reason))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("message"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Message))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ReplicaSetCondition) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ReplicaSetCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "type":
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv4 := &x.Type
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv5 := &x.Status
+ yyv5.CodecDecodeSelf(d)
+ }
+ case "lastTransitionTime":
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg1_v1.Time{}
+ } else {
+ yyv6 := &x.LastTransitionTime
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv6) {
+ } else if yym7 {
+ z.DecBinaryUnmarshal(yyv6)
+ } else if !yym7 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv6)
+ } else {
+ z.DecFallback(yyv6, false)
+ }
+ }
+ case "reason":
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv8 := &x.Reason
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "message":
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv10 := &x.Message
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ReplicaSetCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Type = ""
+ } else {
+ yyv13 := &x.Type
+ yyv13.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = ""
+ } else {
+ yyv14 := &x.Status
+ yyv14.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.LastTransitionTime = pkg1_v1.Time{}
+ } else {
+ yyv15 := &x.LastTransitionTime
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv15) {
+ } else if yym16 {
+ z.DecBinaryUnmarshal(yyv15)
+ } else if !yym16 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv15)
+ } else {
+ z.DecFallback(yyv15, false)
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Reason = ""
+ } else {
+ yyv17 := &x.Reason
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Message = ""
+ } else {
+ yyv19 := &x.Message
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodSecurityPolicy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = true
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodSecurityPolicy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodSecurityPolicy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = PodSecurityPolicySpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodSecurityPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv12 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv14 := &x.APIVersion
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg1_v1.ObjectMeta{}
+ } else {
+ yyv16 := &x.ObjectMeta
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv16) {
+ } else {
+ z.DecFallback(yyv16, false)
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = PodSecurityPolicySpec{}
+ } else {
+ yyv18 := &x.Spec
+ yyv18.CodecDecodeSelf(d)
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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 [14]bool
+ _, _, _ = yysep2, yyq2, yy2arr2
+ const yyr2 bool = false
+ yyq2[0] = x.Privileged != false
+ yyq2[1] = len(x.DefaultAddCapabilities) != 0
+ yyq2[2] = len(x.RequiredDropCapabilities) != 0
+ yyq2[3] = len(x.AllowedCapabilities) != 0
+ yyq2[4] = len(x.Volumes) != 0
+ yyq2[5] = x.HostNetwork != false
+ yyq2[6] = len(x.HostPorts) != 0
+ yyq2[7] = x.HostPID != false
+ yyq2[8] = x.HostIPC != false
+ yyq2[13] = x.ReadOnlyRootFilesystem != false
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(14)
+ } else {
+ yynn2 = 4
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Privileged))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("privileged"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeBool(bool(x.Privileged))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.DefaultAddCapabilities == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.DefaultAddCapabilities), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("defaultAddCapabilities"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.DefaultAddCapabilities == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.DefaultAddCapabilities), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.RequiredDropCapabilities == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.RequiredDropCapabilities), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("requiredDropCapabilities"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.RequiredDropCapabilities == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.RequiredDropCapabilities), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.AllowedCapabilities == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.AllowedCapabilities), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("allowedCapabilities"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.AllowedCapabilities == nil {
+ r.EncodeNil()
+ } else {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.AllowedCapabilities), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.Volumes == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceFSType(([]FSType)(x.Volumes), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("volumes"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Volumes == nil {
+ r.EncodeNil()
+ } else {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ h.encSliceFSType(([]FSType)(x.Volumes), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[5] {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostNetwork))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[5] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostNetwork"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostNetwork))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[6] {
+ if x.HostPorts == nil {
+ r.EncodeNil()
+ } else {
+ yym22 := z.EncBinary()
+ _ = yym22
+ if false {
+ } else {
+ h.encSliceHostPortRange(([]HostPortRange)(x.HostPorts), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[6] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostPorts"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.HostPorts == nil {
+ r.EncodeNil()
+ } else {
+ yym23 := z.EncBinary()
+ _ = yym23
+ if false {
+ } else {
+ h.encSliceHostPortRange(([]HostPortRange)(x.HostPorts), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[7] {
+ yym25 := z.EncBinary()
+ _ = yym25
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostPID))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[7] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostPID"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym26 := z.EncBinary()
+ _ = yym26
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostPID))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[8] {
+ yym28 := z.EncBinary()
+ _ = yym28
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostIPC))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[8] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("hostIPC"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym29 := z.EncBinary()
+ _ = yym29
+ if false {
+ } else {
+ r.EncodeBool(bool(x.HostIPC))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy31 := &x.SELinux
+ yy31.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("seLinux"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy33 := &x.SELinux
+ yy33.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy36 := &x.RunAsUser
+ yy36.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("runAsUser"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy38 := &x.RunAsUser
+ yy38.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy41 := &x.SupplementalGroups
+ yy41.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("supplementalGroups"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy43 := &x.SupplementalGroups
+ yy43.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy46 := &x.FSGroup
+ yy46.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("fsGroup"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy48 := &x.FSGroup
+ yy48.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[13] {
+ yym51 := z.EncBinary()
+ _ = yym51
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnlyRootFilesystem))
+ }
+ } else {
+ r.EncodeBool(false)
+ }
+ } else {
+ if yyq2[13] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("readOnlyRootFilesystem"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym52 := z.EncBinary()
+ _ = yym52
+ if false {
+ } else {
+ r.EncodeBool(bool(x.ReadOnlyRootFilesystem))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodSecurityPolicySpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodSecurityPolicySpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "privileged":
+ if r.TryDecodeAsNil() {
+ x.Privileged = false
+ } else {
+ yyv4 := &x.Privileged
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*bool)(yyv4)) = r.DecodeBool()
+ }
+ }
+ case "defaultAddCapabilities":
+ if r.TryDecodeAsNil() {
+ x.DefaultAddCapabilities = nil
+ } else {
+ yyv6 := &x.DefaultAddCapabilities
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv6), d)
+ }
+ }
+ case "requiredDropCapabilities":
+ if r.TryDecodeAsNil() {
+ x.RequiredDropCapabilities = nil
+ } else {
+ yyv8 := &x.RequiredDropCapabilities
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv8), d)
+ }
+ }
+ case "allowedCapabilities":
+ if r.TryDecodeAsNil() {
+ x.AllowedCapabilities = nil
+ } else {
+ yyv10 := &x.AllowedCapabilities
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv10), d)
+ }
+ }
+ case "volumes":
+ if r.TryDecodeAsNil() {
+ x.Volumes = nil
+ } else {
+ yyv12 := &x.Volumes
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ h.decSliceFSType((*[]FSType)(yyv12), d)
+ }
+ }
+ case "hostNetwork":
+ if r.TryDecodeAsNil() {
+ x.HostNetwork = false
+ } else {
+ yyv14 := &x.HostNetwork
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*bool)(yyv14)) = r.DecodeBool()
+ }
+ }
+ case "hostPorts":
+ if r.TryDecodeAsNil() {
+ x.HostPorts = nil
+ } else {
+ yyv16 := &x.HostPorts
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ h.decSliceHostPortRange((*[]HostPortRange)(yyv16), d)
+ }
+ }
+ case "hostPID":
+ if r.TryDecodeAsNil() {
+ x.HostPID = false
+ } else {
+ yyv18 := &x.HostPID
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else {
+ *((*bool)(yyv18)) = r.DecodeBool()
+ }
+ }
+ case "hostIPC":
+ if r.TryDecodeAsNil() {
+ x.HostIPC = false
+ } else {
+ yyv20 := &x.HostIPC
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ *((*bool)(yyv20)) = r.DecodeBool()
+ }
+ }
+ case "seLinux":
+ if r.TryDecodeAsNil() {
+ x.SELinux = SELinuxStrategyOptions{}
+ } else {
+ yyv22 := &x.SELinux
+ yyv22.CodecDecodeSelf(d)
+ }
+ case "runAsUser":
+ if r.TryDecodeAsNil() {
+ x.RunAsUser = RunAsUserStrategyOptions{}
+ } else {
+ yyv23 := &x.RunAsUser
+ yyv23.CodecDecodeSelf(d)
+ }
+ case "supplementalGroups":
+ if r.TryDecodeAsNil() {
+ x.SupplementalGroups = SupplementalGroupsStrategyOptions{}
+ } else {
+ yyv24 := &x.SupplementalGroups
+ yyv24.CodecDecodeSelf(d)
+ }
+ case "fsGroup":
+ if r.TryDecodeAsNil() {
+ x.FSGroup = FSGroupStrategyOptions{}
+ } else {
+ yyv25 := &x.FSGroup
+ yyv25.CodecDecodeSelf(d)
+ }
+ case "readOnlyRootFilesystem":
+ if r.TryDecodeAsNil() {
+ x.ReadOnlyRootFilesystem = false
+ } else {
+ yyv26 := &x.ReadOnlyRootFilesystem
+ yym27 := z.DecBinary()
+ _ = yym27
+ if false {
+ } else {
+ *((*bool)(yyv26)) = r.DecodeBool()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj28 int
+ var yyb28 bool
+ var yyhl28 bool = l >= 0
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Privileged = false
+ } else {
+ yyv29 := &x.Privileged
+ yym30 := z.DecBinary()
+ _ = yym30
+ if false {
+ } else {
+ *((*bool)(yyv29)) = r.DecodeBool()
+ }
+ }
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DefaultAddCapabilities = nil
+ } else {
+ yyv31 := &x.DefaultAddCapabilities
+ yym32 := z.DecBinary()
+ _ = yym32
+ if false {
+ } else {
+ h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv31), d)
+ }
+ }
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RequiredDropCapabilities = nil
+ } else {
+ yyv33 := &x.RequiredDropCapabilities
+ yym34 := z.DecBinary()
+ _ = yym34
+ if false {
+ } else {
+ h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv33), d)
+ }
+ }
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.AllowedCapabilities = nil
+ } else {
+ yyv35 := &x.AllowedCapabilities
+ yym36 := z.DecBinary()
+ _ = yym36
+ if false {
+ } else {
+ h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv35), d)
+ }
+ }
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Volumes = nil
+ } else {
+ yyv37 := &x.Volumes
+ yym38 := z.DecBinary()
+ _ = yym38
+ if false {
+ } else {
+ h.decSliceFSType((*[]FSType)(yyv37), d)
+ }
+ }
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostNetwork = false
+ } else {
+ yyv39 := &x.HostNetwork
+ yym40 := z.DecBinary()
+ _ = yym40
+ if false {
+ } else {
+ *((*bool)(yyv39)) = r.DecodeBool()
+ }
+ }
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostPorts = nil
+ } else {
+ yyv41 := &x.HostPorts
+ yym42 := z.DecBinary()
+ _ = yym42
+ if false {
+ } else {
+ h.decSliceHostPortRange((*[]HostPortRange)(yyv41), d)
+ }
+ }
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostPID = false
+ } else {
+ yyv43 := &x.HostPID
+ yym44 := z.DecBinary()
+ _ = yym44
+ if false {
+ } else {
+ *((*bool)(yyv43)) = r.DecodeBool()
+ }
+ }
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.HostIPC = false
+ } else {
+ yyv45 := &x.HostIPC
+ yym46 := z.DecBinary()
+ _ = yym46
+ if false {
+ } else {
+ *((*bool)(yyv45)) = r.DecodeBool()
+ }
+ }
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SELinux = SELinuxStrategyOptions{}
+ } else {
+ yyv47 := &x.SELinux
+ yyv47.CodecDecodeSelf(d)
+ }
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RunAsUser = RunAsUserStrategyOptions{}
+ } else {
+ yyv48 := &x.RunAsUser
+ yyv48.CodecDecodeSelf(d)
+ }
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.SupplementalGroups = SupplementalGroupsStrategyOptions{}
+ } else {
+ yyv49 := &x.SupplementalGroups
+ yyv49.CodecDecodeSelf(d)
+ }
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.FSGroup = FSGroupStrategyOptions{}
+ } else {
+ yyv50 := &x.FSGroup
+ yyv50.CodecDecodeSelf(d)
+ }
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ReadOnlyRootFilesystem = false
+ } else {
+ yyv51 := &x.ReadOnlyRootFilesystem
+ yym52 := z.DecBinary()
+ _ = yym52
+ if false {
+ } else {
+ *((*bool)(yyv51)) = r.DecodeBool()
+ }
+ }
+ for {
+ yyj28++
+ if yyhl28 {
+ yyb28 = yyj28 > l
+ } else {
+ yyb28 = r.CheckBreak()
+ }
+ if yyb28 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj28-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x FSType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *FSType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *HostPortRange) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Min))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("min"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Min))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Max))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("max"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Max))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *HostPortRange) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *HostPortRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "min":
+ if r.TryDecodeAsNil() {
+ x.Min = 0
+ } else {
+ yyv4 := &x.Min
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int32)(yyv4)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "max":
+ if r.TryDecodeAsNil() {
+ x.Max = 0
+ } else {
+ yyv6 := &x.Max
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int32)(yyv6)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *HostPortRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Min = 0
+ } else {
+ yyv9 := &x.Min
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ *((*int32)(yyv9)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Max = 0
+ } else {
+ yyv11 := &x.Max
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int32)(yyv11)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *SELinuxStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.SELinuxOptions != nil
+ 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_containerArrayElem1234)
+ x.Rule.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rule"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Rule.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.SELinuxOptions == nil {
+ r.EncodeNil()
+ } else {
+ x.SELinuxOptions.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("seLinuxOptions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.SELinuxOptions == nil {
+ r.EncodeNil()
+ } else {
+ x.SELinuxOptions.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SELinuxStrategyOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SELinuxStrategyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "rule":
+ if r.TryDecodeAsNil() {
+ x.Rule = ""
+ } else {
+ yyv4 := &x.Rule
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "seLinuxOptions":
+ if r.TryDecodeAsNil() {
+ if x.SELinuxOptions != nil {
+ x.SELinuxOptions = nil
+ }
+ } else {
+ if x.SELinuxOptions == nil {
+ x.SELinuxOptions = new(pkg4_v1.SELinuxOptions)
+ }
+ x.SELinuxOptions.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SELinuxStrategyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Rule = ""
+ } else {
+ yyv7 := &x.Rule
+ yyv7.CodecDecodeSelf(d)
+ }
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.SELinuxOptions != nil {
+ x.SELinuxOptions = nil
+ }
+ } else {
+ if x.SELinuxOptions == nil {
+ x.SELinuxOptions = new(pkg4_v1.SELinuxOptions)
+ }
+ x.SELinuxOptions.CodecDecodeSelf(d)
+ }
+ for {
+ yyj6++
+ if yyhl6 {
+ yyb6 = yyj6 > l
+ } else {
+ yyb6 = r.CheckBreak()
+ }
+ if yyb6 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj6-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x SELinuxStrategy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *SELinuxStrategy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *RunAsUserStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Ranges) != 0
+ 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_containerArrayElem1234)
+ x.Rule.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rule"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Rule.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Ranges == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceIDRange(([]IDRange)(x.Ranges), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ranges"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Ranges == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceIDRange(([]IDRange)(x.Ranges), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RunAsUserStrategyOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RunAsUserStrategyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "rule":
+ if r.TryDecodeAsNil() {
+ x.Rule = ""
+ } else {
+ yyv4 := &x.Rule
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "ranges":
+ if r.TryDecodeAsNil() {
+ x.Ranges = nil
+ } else {
+ yyv5 := &x.Ranges
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSliceIDRange((*[]IDRange)(yyv5), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RunAsUserStrategyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Rule = ""
+ } else {
+ yyv8 := &x.Rule
+ yyv8.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Ranges = nil
+ } else {
+ yyv9 := &x.Ranges
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceIDRange((*[]IDRange)(yyv9), d)
+ }
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *IDRange) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(2)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Min))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("min"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Min))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Max))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("max"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeInt(int64(x.Max))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *IDRange) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *IDRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "min":
+ if r.TryDecodeAsNil() {
+ x.Min = 0
+ } else {
+ yyv4 := &x.Min
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int64)(yyv4)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "max":
+ if r.TryDecodeAsNil() {
+ x.Max = 0
+ } else {
+ yyv6 := &x.Max
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*int64)(yyv6)) = int64(r.DecodeInt(64))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *IDRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Min = 0
+ } else {
+ yyv9 := &x.Min
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ *((*int64)(yyv9)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Max = 0
+ } else {
+ yyv11 := &x.Max
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ *((*int64)(yyv11)) = int64(r.DecodeInt(64))
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x RunAsUserStrategy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *RunAsUserStrategy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *FSGroupStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Rule != ""
+ yyq2[1] = len(x.Ranges) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ x.Rule.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rule"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Rule.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Ranges == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceIDRange(([]IDRange)(x.Ranges), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ranges"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Ranges == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceIDRange(([]IDRange)(x.Ranges), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *FSGroupStrategyOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *FSGroupStrategyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "rule":
+ if r.TryDecodeAsNil() {
+ x.Rule = ""
+ } else {
+ yyv4 := &x.Rule
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "ranges":
+ if r.TryDecodeAsNil() {
+ x.Ranges = nil
+ } else {
+ yyv5 := &x.Ranges
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSliceIDRange((*[]IDRange)(yyv5), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *FSGroupStrategyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Rule = ""
+ } else {
+ yyv8 := &x.Rule
+ yyv8.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Ranges = nil
+ } else {
+ yyv9 := &x.Ranges
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceIDRange((*[]IDRange)(yyv9), d)
+ }
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x FSGroupStrategyType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *FSGroupStrategyType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *SupplementalGroupsStrategyOptions) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Rule != ""
+ yyq2[1] = len(x.Ranges) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ x.Rule.CodecEncodeSelf(e)
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rule"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ x.Rule.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Ranges == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceIDRange(([]IDRange)(x.Ranges), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ranges"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Ranges == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceIDRange(([]IDRange)(x.Ranges), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *SupplementalGroupsStrategyOptions) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *SupplementalGroupsStrategyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "rule":
+ if r.TryDecodeAsNil() {
+ x.Rule = ""
+ } else {
+ yyv4 := &x.Rule
+ yyv4.CodecDecodeSelf(d)
+ }
+ case "ranges":
+ if r.TryDecodeAsNil() {
+ x.Ranges = nil
+ } else {
+ yyv5 := &x.Ranges
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else {
+ h.decSliceIDRange((*[]IDRange)(yyv5), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *SupplementalGroupsStrategyOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Rule = ""
+ } else {
+ yyv8 := &x.Rule
+ yyv8.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Ranges = nil
+ } else {
+ yyv9 := &x.Ranges
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceIDRange((*[]IDRange)(yyv9), d)
+ }
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x SupplementalGroupsStrategyType) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_UTF81234, string(x))
+ }
+}
+
+func (x *SupplementalGroupsStrategyType) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 *PodSecurityPolicyList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSlicePodSecurityPolicy(([]PodSecurityPolicy)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSlicePodSecurityPolicy(([]PodSecurityPolicy)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodSecurityPolicyList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodSecurityPolicyList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSlicePodSecurityPolicy((*[]PodSecurityPolicy)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodSecurityPolicyList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSlicePodSecurityPolicy((*[]PodSecurityPolicy)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NetworkPolicy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = true
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NetworkPolicy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NetworkPolicy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = NetworkPolicySpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NetworkPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv12 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv14 := &x.APIVersion
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg1_v1.ObjectMeta{}
+ } else {
+ yyv16 := &x.ObjectMeta
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv16) {
+ } else {
+ z.DecFallback(yyv16, false)
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = NetworkPolicySpec{}
+ } else {
+ yyv18 := &x.Spec
+ yyv18.CodecDecodeSelf(d)
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NetworkPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Ingress) != 0
+ 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_containerArrayElem1234)
+ yy4 := &x.PodSelector
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy4) {
+ } else {
+ z.EncFallback(yy4)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.PodSelector
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy6) {
+ } else {
+ z.EncFallback(yy6)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Ingress == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.encSliceNetworkPolicyIngressRule(([]NetworkPolicyIngressRule)(x.Ingress), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ingress"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Ingress == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceNetworkPolicyIngressRule(([]NetworkPolicyIngressRule)(x.Ingress), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NetworkPolicySpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NetworkPolicySpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "podSelector":
+ if r.TryDecodeAsNil() {
+ x.PodSelector = pkg1_v1.LabelSelector{}
+ } else {
+ yyv4 := &x.PodSelector
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "ingress":
+ if r.TryDecodeAsNil() {
+ x.Ingress = nil
+ } else {
+ yyv6 := &x.Ingress
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceNetworkPolicyIngressRule((*[]NetworkPolicyIngressRule)(yyv6), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NetworkPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PodSelector = pkg1_v1.LabelSelector{}
+ } else {
+ yyv9 := &x.PodSelector
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv9) {
+ } else {
+ z.DecFallback(yyv9, false)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Ingress = nil
+ } else {
+ yyv11 := &x.Ingress
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceNetworkPolicyIngressRule((*[]NetworkPolicyIngressRule)(yyv11), d)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NetworkPolicyIngressRule) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Ports) != 0
+ yyq2[1] = len(x.From) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Ports == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceNetworkPolicyPort(([]NetworkPolicyPort)(x.Ports), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ports"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Ports == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceNetworkPolicyPort(([]NetworkPolicyPort)(x.Ports), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.From == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceNetworkPolicyPeer(([]NetworkPolicyPeer)(x.From), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("from"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.From == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceNetworkPolicyPeer(([]NetworkPolicyPeer)(x.From), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NetworkPolicyIngressRule) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NetworkPolicyIngressRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "ports":
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv4 := &x.Ports
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceNetworkPolicyPort((*[]NetworkPolicyPort)(yyv4), d)
+ }
+ }
+ case "from":
+ if r.TryDecodeAsNil() {
+ x.From = nil
+ } else {
+ yyv6 := &x.From
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceNetworkPolicyPeer((*[]NetworkPolicyPeer)(yyv6), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NetworkPolicyIngressRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv9 := &x.Ports
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceNetworkPolicyPort((*[]NetworkPolicyPort)(yyv9), d)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.From = nil
+ } else {
+ yyv11 := &x.From
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceNetworkPolicyPeer((*[]NetworkPolicyPeer)(yyv11), d)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NetworkPolicyPort) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Protocol != nil
+ yyq2[1] = x.Port != 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Protocol == nil {
+ r.EncodeNil()
+ } else {
+ yy4 := *x.Protocol
+ yysf5 := &yy4
+ yysf5.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("protocol"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Protocol == nil {
+ r.EncodeNil()
+ } else {
+ yy6 := *x.Protocol
+ yysf7 := &yy6
+ yysf7.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Port == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Port) {
+ } else if !yym9 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.Port)
+ } else {
+ z.EncFallback(x.Port)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("port"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Port == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Port) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.Port)
+ } else {
+ z.EncFallback(x.Port)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NetworkPolicyPort) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NetworkPolicyPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "protocol":
+ if r.TryDecodeAsNil() {
+ if x.Protocol != nil {
+ x.Protocol = nil
+ }
+ } else {
+ if x.Protocol == nil {
+ x.Protocol = new(pkg4_v1.Protocol)
+ }
+ x.Protocol.CodecDecodeSelf(d)
+ }
+ case "port":
+ if r.TryDecodeAsNil() {
+ if x.Port != nil {
+ x.Port = nil
+ }
+ } else {
+ if x.Port == nil {
+ x.Port = new(pkg5_intstr.IntOrString)
+ }
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Port) {
+ } else if !yym6 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.Port)
+ } else {
+ z.DecFallback(x.Port, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NetworkPolicyPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Protocol != nil {
+ x.Protocol = nil
+ }
+ } else {
+ if x.Protocol == nil {
+ x.Protocol = new(pkg4_v1.Protocol)
+ }
+ x.Protocol.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Port != nil {
+ x.Port = nil
+ }
+ } else {
+ if x.Port == nil {
+ x.Port = new(pkg5_intstr.IntOrString)
+ }
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Port) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.Port)
+ } else {
+ z.DecFallback(x.Port, false)
+ }
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NetworkPolicyPeer) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.PodSelector != nil
+ yyq2[1] = x.NamespaceSelector != 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.PodSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.PodSelector) {
+ } else {
+ z.EncFallback(x.PodSelector)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PodSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.PodSelector) {
+ } else {
+ z.EncFallback(x.PodSelector)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.NamespaceSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.NamespaceSelector) {
+ } else {
+ z.EncFallback(x.NamespaceSelector)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("namespaceSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NamespaceSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.NamespaceSelector) {
+ } else {
+ z.EncFallback(x.NamespaceSelector)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NetworkPolicyPeer) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NetworkPolicyPeer) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "podSelector":
+ if r.TryDecodeAsNil() {
+ if x.PodSelector != nil {
+ x.PodSelector = nil
+ }
+ } else {
+ if x.PodSelector == nil {
+ x.PodSelector = new(pkg1_v1.LabelSelector)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.PodSelector) {
+ } else {
+ z.DecFallback(x.PodSelector, false)
+ }
+ }
+ case "namespaceSelector":
+ if r.TryDecodeAsNil() {
+ if x.NamespaceSelector != nil {
+ x.NamespaceSelector = nil
+ }
+ } else {
+ if x.NamespaceSelector == nil {
+ x.NamespaceSelector = new(pkg1_v1.LabelSelector)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.NamespaceSelector) {
+ } else {
+ z.DecFallback(x.NamespaceSelector, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NetworkPolicyPeer) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PodSelector != nil {
+ x.PodSelector = nil
+ }
+ } else {
+ if x.PodSelector == nil {
+ x.PodSelector = new(pkg1_v1.LabelSelector)
+ }
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.PodSelector) {
+ } else {
+ z.DecFallback(x.PodSelector, false)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.NamespaceSelector != nil {
+ x.NamespaceSelector = nil
+ }
+ } else {
+ if x.NamespaceSelector == nil {
+ x.NamespaceSelector = new(pkg1_v1.LabelSelector)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.NamespaceSelector) {
+ } else {
+ z.DecFallback(x.NamespaceSelector, false)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NetworkPolicyList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceNetworkPolicy(([]NetworkPolicy)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceNetworkPolicy(([]NetworkPolicy)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NetworkPolicyList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NetworkPolicyList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceNetworkPolicy((*[]NetworkPolicy)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NetworkPolicyList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceNetworkPolicy((*[]NetworkPolicy)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encSliceCustomMetricTarget(v []CustomMetricTarget, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceCustomMetricTarget(v *[]CustomMetricTarget, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []CustomMetricTarget{}
+ 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([]CustomMetricTarget, yyrl1)
+ }
+ } else {
+ yyv1 = make([]CustomMetricTarget, 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] = CustomMetricTarget{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, CustomMetricTarget{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = CustomMetricTarget{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, CustomMetricTarget{}) // var yyz1 CustomMetricTarget
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = CustomMetricTarget{}
+ } 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 = []CustomMetricTarget{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceCustomMetricCurrentStatus(v []CustomMetricCurrentStatus, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceCustomMetricCurrentStatus(v *[]CustomMetricCurrentStatus, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []CustomMetricCurrentStatus{}
+ 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([]CustomMetricCurrentStatus, yyrl1)
+ }
+ } else {
+ yyv1 = make([]CustomMetricCurrentStatus, 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] = CustomMetricCurrentStatus{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, CustomMetricCurrentStatus{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = CustomMetricCurrentStatus{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, CustomMetricCurrentStatus{}) // var yyz1 CustomMetricCurrentStatus
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = CustomMetricCurrentStatus{}
+ } 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 = []CustomMetricCurrentStatus{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceAPIVersion(v []APIVersion, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceAPIVersion(v *[]APIVersion, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []APIVersion{}
+ 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, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]APIVersion, yyrl1)
+ }
+ } else {
+ yyv1 = make([]APIVersion, 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] = APIVersion{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, APIVersion{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = APIVersion{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, APIVersion{}) // var yyz1 APIVersion
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = APIVersion{}
+ } 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 = []APIVersion{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceThirdPartyResource(v []ThirdPartyResource, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceThirdPartyResource(v *[]ThirdPartyResource, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ThirdPartyResource{}
+ 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, 304)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ThirdPartyResource, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ThirdPartyResource, 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] = ThirdPartyResource{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ThirdPartyResource{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ThirdPartyResource{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ThirdPartyResource{}) // var yyz1 ThirdPartyResource
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ThirdPartyResource{}
+ } 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 = []ThirdPartyResource{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceDeploymentCondition(v []DeploymentCondition, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceDeploymentCondition(v *[]DeploymentCondition, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []DeploymentCondition{}
+ 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, 112)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]DeploymentCondition, yyrl1)
+ }
+ } else {
+ yyv1 = make([]DeploymentCondition, 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] = DeploymentCondition{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, DeploymentCondition{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = DeploymentCondition{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, DeploymentCondition{}) // var yyz1 DeploymentCondition
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = DeploymentCondition{}
+ } 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 = []DeploymentCondition{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceDeployment(v []Deployment, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceDeployment(v *[]Deployment, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Deployment{}
+ 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, 968)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Deployment, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Deployment, 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] = Deployment{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Deployment{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Deployment{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Deployment{}) // var yyz1 Deployment
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Deployment{}
+ } 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 = []Deployment{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceDaemonSet(v []DaemonSet, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceDaemonSet(v *[]DaemonSet, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []DaemonSet{}
+ 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, 928)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]DaemonSet, yyrl1)
+ }
+ } else {
+ yyv1 = make([]DaemonSet, 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] = DaemonSet{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, DaemonSet{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = DaemonSet{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, DaemonSet{}) // var yyz1 DaemonSet
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = DaemonSet{}
+ } 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 = []DaemonSet{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceThirdPartyResourceData(v []ThirdPartyResourceData, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceThirdPartyResourceData(v *[]ThirdPartyResourceData, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ThirdPartyResourceData{}
+ 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, 288)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ThirdPartyResourceData, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ThirdPartyResourceData, 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] = ThirdPartyResourceData{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ThirdPartyResourceData{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ThirdPartyResourceData{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ThirdPartyResourceData{}) // var yyz1 ThirdPartyResourceData
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ThirdPartyResourceData{}
+ } 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 = []ThirdPartyResourceData{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceIngress(v []Ingress, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceIngress(v *[]Ingress, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Ingress{}
+ 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, 344)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Ingress, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Ingress, 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] = Ingress{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Ingress{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Ingress{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Ingress{}) // var yyz1 Ingress
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Ingress{}
+ } 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 = []Ingress{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceIngressTLS(v []IngressTLS, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceIngressTLS(v *[]IngressTLS, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []IngressTLS{}
+ 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, 40)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]IngressTLS, yyrl1)
+ }
+ } else {
+ yyv1 = make([]IngressTLS, 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] = IngressTLS{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, IngressTLS{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = IngressTLS{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, IngressTLS{}) // var yyz1 IngressTLS
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = IngressTLS{}
+ } 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 = []IngressTLS{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceIngressRule(v []IngressRule, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceIngressRule(v *[]IngressRule, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []IngressRule{}
+ 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, 24)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]IngressRule, yyrl1)
+ }
+ } else {
+ yyv1 = make([]IngressRule, 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] = IngressRule{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, IngressRule{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = IngressRule{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, IngressRule{}) // var yyz1 IngressRule
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = IngressRule{}
+ } 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 = []IngressRule{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceHTTPIngressPath(v []HTTPIngressPath, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceHTTPIngressPath(v *[]HTTPIngressPath, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []HTTPIngressPath{}
+ 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, 64)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]HTTPIngressPath, yyrl1)
+ }
+ } else {
+ yyv1 = make([]HTTPIngressPath, 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] = HTTPIngressPath{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, HTTPIngressPath{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = HTTPIngressPath{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, HTTPIngressPath{}) // var yyz1 HTTPIngressPath
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = HTTPIngressPath{}
+ } 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 = []HTTPIngressPath{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceReplicaSet(v []ReplicaSet, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceReplicaSet(v *[]ReplicaSet, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ReplicaSet{}
+ 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, 896)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ReplicaSet, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ReplicaSet, 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] = ReplicaSet{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ReplicaSet{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ReplicaSet{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ReplicaSet{}) // var yyz1 ReplicaSet
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ReplicaSet{}
+ } 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 = []ReplicaSet{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceReplicaSetCondition(v []ReplicaSetCondition, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceReplicaSetCondition(v *[]ReplicaSetCondition, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ReplicaSetCondition{}
+ 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, 88)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ReplicaSetCondition, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ReplicaSetCondition, 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] = ReplicaSetCondition{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ReplicaSetCondition{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ReplicaSetCondition{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ReplicaSetCondition{}) // var yyz1 ReplicaSetCondition
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ReplicaSetCondition{}
+ } 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 = []ReplicaSetCondition{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSlicev1_Capability(v []pkg4_v1.Capability, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yysf2 := &yyv1
+ yysf2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicev1_Capability(v *[]pkg4_v1.Capability, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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.Capability{}
+ 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) {
+
+ yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]pkg4_v1.Capability, yyrl1)
+ }
+ } else {
+ yyv1 = make([]pkg4_v1.Capability, yyrl1)
+ }
+ yyc1 = true
+ yyrr1 = len(yyv1)
+ } else if yyl1 != len(yyv1) {
+ yyv1 = yyv1[:yyl1]
+ yyc1 = true
+ }
+ yyj1 := 0
+ for ; yyj1 < yyrr1; yyj1++ {
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, "") // var yyz1 pkg4_v1.Capability
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } 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.Capability{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceFSType(v []FSType, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yyv1.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceFSType(v *[]FSType, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []FSType{}
+ 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) {
+
+ yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]FSType, yyrl1)
+ }
+ } else {
+ yyv1 = make([]FSType, yyrl1)
+ }
+ yyc1 = true
+ yyrr1 = len(yyv1)
+ } else if yyl1 != len(yyv1) {
+ yyv1 = yyv1[:yyl1]
+ yyc1 = true
+ }
+ yyj1 := 0
+ for ; yyj1 < yyrr1; yyj1++ {
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, "")
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, "") // var yyz1 FSType
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ""
+ } 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 = []FSType{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceHostPortRange(v []HostPortRange, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceHostPortRange(v *[]HostPortRange, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []HostPortRange{}
+ 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, 8)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]HostPortRange, yyrl1)
+ }
+ } else {
+ yyv1 = make([]HostPortRange, 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] = HostPortRange{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, HostPortRange{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = HostPortRange{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, HostPortRange{}) // var yyz1 HostPortRange
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = HostPortRange{}
+ } 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 = []HostPortRange{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceIDRange(v []IDRange, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceIDRange(v *[]IDRange, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []IDRange{}
+ 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, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]IDRange, yyrl1)
+ }
+ } else {
+ yyv1 = make([]IDRange, 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] = IDRange{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, IDRange{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = IDRange{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, IDRange{}) // var yyz1 IDRange
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = IDRange{}
+ } 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 = []IDRange{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSlicePodSecurityPolicy(v []PodSecurityPolicy, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicePodSecurityPolicy(v *[]PodSecurityPolicy, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []PodSecurityPolicy{}
+ 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, 560)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]PodSecurityPolicy, yyrl1)
+ }
+ } else {
+ yyv1 = make([]PodSecurityPolicy, 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] = PodSecurityPolicy{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, PodSecurityPolicy{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PodSecurityPolicy{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, PodSecurityPolicy{}) // var yyz1 PodSecurityPolicy
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PodSecurityPolicy{}
+ } 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 = []PodSecurityPolicy{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceNetworkPolicyIngressRule(v []NetworkPolicyIngressRule, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceNetworkPolicyIngressRule(v *[]NetworkPolicyIngressRule, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []NetworkPolicyIngressRule{}
+ 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, 48)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]NetworkPolicyIngressRule, yyrl1)
+ }
+ } else {
+ yyv1 = make([]NetworkPolicyIngressRule, 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] = NetworkPolicyIngressRule{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, NetworkPolicyIngressRule{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicyIngressRule{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, NetworkPolicyIngressRule{}) // var yyz1 NetworkPolicyIngressRule
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicyIngressRule{}
+ } 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 = []NetworkPolicyIngressRule{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceNetworkPolicyPort(v []NetworkPolicyPort, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceNetworkPolicyPort(v *[]NetworkPolicyPort, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []NetworkPolicyPort{}
+ 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, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]NetworkPolicyPort, yyrl1)
+ }
+ } else {
+ yyv1 = make([]NetworkPolicyPort, 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] = NetworkPolicyPort{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, NetworkPolicyPort{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicyPort{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, NetworkPolicyPort{}) // var yyz1 NetworkPolicyPort
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicyPort{}
+ } 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 = []NetworkPolicyPort{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceNetworkPolicyPeer(v []NetworkPolicyPeer, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceNetworkPolicyPeer(v *[]NetworkPolicyPeer, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []NetworkPolicyPeer{}
+ 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, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]NetworkPolicyPeer, yyrl1)
+ }
+ } else {
+ yyv1 = make([]NetworkPolicyPeer, 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] = NetworkPolicyPeer{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, NetworkPolicyPeer{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicyPeer{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, NetworkPolicyPeer{}) // var yyz1 NetworkPolicyPeer
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicyPeer{}
+ } 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 = []NetworkPolicyPeer{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceNetworkPolicy(v []NetworkPolicy, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceNetworkPolicy(v *[]NetworkPolicy, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []NetworkPolicy{}
+ 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, 320)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]NetworkPolicy, yyrl1)
+ }
+ } else {
+ yyv1 = make([]NetworkPolicy, 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] = NetworkPolicy{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, NetworkPolicy{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicy{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, NetworkPolicy{}) // var yyz1 NetworkPolicy
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicy{}
+ } 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 = []NetworkPolicy{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types.go
new file mode 100644
index 000000000..c214d6739
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types.go
@@ -0,0 +1,1171 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "k8s.io/apimachinery/pkg/api/resource"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/util/intstr"
+ "k8s.io/kubernetes/pkg/api/v1"
+ appsv1beta1 "k8s.io/kubernetes/pkg/apis/apps/v1beta1"
+)
+
+// describes the attributes of a scale subresource
+type ScaleSpec struct {
+ // desired number of instances for the scaled object.
+ // +optional
+ Replicas int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
+}
+
+// represents the current status of a scale subresource.
+type ScaleStatus struct {
+ // actual number of observed instances of the scaled object.
+ Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"`
+
+ // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
+ // +optional
+ Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,2,rep,name=selector"`
+
+ // label selector for pods that should match the replicas count. This is a serializated
+ // version of both map-based and more expressive set-based selectors. This is done to
+ // avoid introspection in the clients. The string will be in the same format as the
+ // query-param syntax. If the target type only supports map-based selectors, both this
+ // field and map-based selector field are populated.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ TargetSelector string `json:"targetSelector,omitempty" protobuf:"bytes,3,opt,name=targetSelector"`
+}
+
+// +genclient=true
+// +noMethods=true
+
+// represents a scaling request for a resource.
+type Scale struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.
+ // +optional
+ Spec ScaleSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.
+ // +optional
+ Status ScaleStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// Dummy definition
+type ReplicationControllerDummy struct {
+ metav1.TypeMeta `json:",inline"`
+}
+
+// Alpha-level support for Custom Metrics in HPA (as annotations).
+type CustomMetricTarget struct {
+ // Custom Metric name.
+ Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
+ // Custom Metric value (average).
+ TargetValue resource.Quantity `json:"value" protobuf:"bytes,2,opt,name=value"`
+}
+
+type CustomMetricTargetList struct {
+ Items []CustomMetricTarget `json:"items" protobuf:"bytes,1,rep,name=items"`
+}
+
+type CustomMetricCurrentStatus struct {
+ // Custom Metric name.
+ Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
+ // Custom Metric value (average).
+ CurrentValue resource.Quantity `json:"value" protobuf:"bytes,2,opt,name=value"`
+}
+
+type CustomMetricCurrentStatusList struct {
+ Items []CustomMetricCurrentStatus `json:"items" protobuf:"bytes,1,rep,name=items"`
+}
+
+// +genclient=true
+// +nonNamespaced=true
+
+// A ThirdPartyResource is a generic representation of a resource, it is used by add-ons and plugins to add new resource
+// types to the API. It consists of one or more Versions of the api.
+type ThirdPartyResource struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // Standard object metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Description is the description of this object.
+ // +optional
+ Description string `json:"description,omitempty" protobuf:"bytes,2,opt,name=description"`
+
+ // Versions are versions for this third party object
+ // +optional
+ Versions []APIVersion `json:"versions,omitempty" protobuf:"bytes,3,rep,name=versions"`
+}
+
+// ThirdPartyResourceList is a list of ThirdPartyResources.
+type ThirdPartyResourceList struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // Standard list metadata.
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of ThirdPartyResources.
+ Items []ThirdPartyResource `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// An APIVersion represents a single concrete version of an object model.
+type APIVersion struct {
+ // Name of this version (e.g. 'v1').
+ // +optional
+ Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
+}
+
+// An internal object, used for versioned storage in etcd. Not exposed to the end user.
+type ThirdPartyResourceData struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Data is the raw JSON data for this data.
+ // +optional
+ Data []byte `json:"data,omitempty" protobuf:"bytes,2,opt,name=data"`
+}
+
+// +genclient=true
+
+// Deployment enables declarative updates for Pods and ReplicaSets.
+type Deployment struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Specification of the desired behavior of the Deployment.
+ // +optional
+ Spec DeploymentSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Most recently observed status of the Deployment.
+ // +optional
+ Status DeploymentStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// DeploymentSpec is the specification of the desired behavior of the Deployment.
+type DeploymentSpec struct {
+ // Number of desired pods. This is a pointer to distinguish between explicit
+ // zero and not specified. Defaults to 1.
+ // +optional
+ Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
+
+ // Label selector for pods. Existing ReplicaSets whose pods are
+ // selected by this will be the ones affected by this deployment.
+ // +optional
+ Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
+
+ // Template describes the pods that will be created.
+ Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"`
+
+ // The deployment strategy to use to replace existing pods with new ones.
+ // +optional
+ Strategy DeploymentStrategy `json:"strategy,omitempty" protobuf:"bytes,4,opt,name=strategy"`
+
+ // Minimum number of seconds for which a newly created pod should be ready
+ // without any of its container crashing, for it to be considered available.
+ // Defaults to 0 (pod will be considered available as soon as it is ready)
+ // +optional
+ MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,5,opt,name=minReadySeconds"`
+
+ // The number of old ReplicaSets to retain to allow rollback.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ // +optional
+ RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,6,opt,name=revisionHistoryLimit"`
+
+ // Indicates that the deployment is paused and will not be processed by the
+ // deployment controller.
+ // +optional
+ Paused bool `json:"paused,omitempty" protobuf:"varint,7,opt,name=paused"`
+
+ // The config this deployment is rolling back to. Will be cleared after rollback is done.
+ // +optional
+ RollbackTo *RollbackConfig `json:"rollbackTo,omitempty" protobuf:"bytes,8,opt,name=rollbackTo"`
+
+ // The maximum time in seconds for a deployment to make progress before it
+ // is considered to be failed. The deployment controller will continue to
+ // process failed deployments and a condition with a ProgressDeadlineExceeded
+ // reason will be surfaced in the deployment status. Once autoRollback is
+ // implemented, the deployment controller will automatically rollback failed
+ // deployments. Note that progress will not be estimated during the time a
+ // deployment is paused. This is not set by default.
+ ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty" protobuf:"varint,9,opt,name=progressDeadlineSeconds"`
+}
+
+// DeploymentRollback stores the information required to rollback a deployment.
+type DeploymentRollback struct {
+ metav1.TypeMeta `json:",inline"`
+ // Required: This must match the Name of a deployment.
+ Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
+ // The annotations to be updated to a deployment
+ // +optional
+ UpdatedAnnotations map[string]string `json:"updatedAnnotations,omitempty" protobuf:"bytes,2,rep,name=updatedAnnotations"`
+ // The config of this deployment rollback.
+ RollbackTo RollbackConfig `json:"rollbackTo" protobuf:"bytes,3,opt,name=rollbackTo"`
+}
+
+type RollbackConfig struct {
+ // The revision to rollback to. If set to 0, rollback to the last revision.
+ // +optional
+ Revision int64 `json:"revision,omitempty" protobuf:"varint,1,opt,name=revision"`
+}
+
+const (
+ // DefaultDeploymentUniqueLabelKey is the default key of the selector that is added
+ // to existing RCs (and label key that is added to its pods) to prevent the existing RCs
+ // to select new pods (and old pods being select by new RC).
+ DefaultDeploymentUniqueLabelKey string = "pod-template-hash"
+)
+
+// DeploymentStrategy describes how to replace existing pods with new ones.
+type DeploymentStrategy struct {
+ // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
+ // +optional
+ Type DeploymentStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=DeploymentStrategyType"`
+
+ // Rolling update config params. Present only if DeploymentStrategyType =
+ // RollingUpdate.
+ //---
+ // TODO: Update this to follow our convention for oneOf, whatever we decide it
+ // to be.
+ // +optional
+ RollingUpdate *RollingUpdateDeployment `json:"rollingUpdate,omitempty" protobuf:"bytes,2,opt,name=rollingUpdate"`
+}
+
+type DeploymentStrategyType string
+
+const (
+ // Kill all existing pods before creating new ones.
+ RecreateDeploymentStrategyType DeploymentStrategyType = "Recreate"
+
+ // Replace the old RCs by new one using rolling update i.e gradually scale down the old RCs and scale up the new one.
+ RollingUpdateDeploymentStrategyType DeploymentStrategyType = "RollingUpdate"
+)
+
+// Spec to control the desired behavior of rolling update.
+type RollingUpdateDeployment struct {
+ // The maximum number of pods that can be unavailable during the update.
+ // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
+ // Absolute number is calculated from percentage by rounding down.
+ // This can not be 0 if MaxSurge is 0.
+ // By default, a fixed value of 1 is used.
+ // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods
+ // immediately when the rolling update starts. Once new pods are ready, old RC
+ // can be scaled down further, followed by scaling up the new RC, ensuring
+ // that the total number of pods available at all times during the update is at
+ // least 70% of desired pods.
+ // +optional
+ MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,1,opt,name=maxUnavailable"`
+
+ // The maximum number of pods that can be scheduled above the desired number of
+ // pods.
+ // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
+ // This can not be 0 if MaxUnavailable is 0.
+ // Absolute number is calculated from percentage by rounding up.
+ // By default, a value of 1 is used.
+ // Example: when this is set to 30%, the new RC can be scaled up immediately when
+ // the rolling update starts, such that the total number of old and new pods do not exceed
+ // 130% of desired pods. Once old pods have been killed,
+ // new RC can be scaled up further, ensuring that total number of pods running
+ // at any time during the update is atmost 130% of desired pods.
+ // +optional
+ MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty" protobuf:"bytes,2,opt,name=maxSurge"`
+}
+
+// DeploymentStatus is the most recently observed status of the Deployment.
+type DeploymentStatus struct {
+ // The generation observed by the deployment controller.
+ // +optional
+ ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
+
+ // Total number of non-terminated pods targeted by this deployment (their labels match the selector).
+ // +optional
+ Replicas int32 `json:"replicas,omitempty" protobuf:"varint,2,opt,name=replicas"`
+
+ // Total number of non-terminated pods targeted by this deployment that have the desired template spec.
+ // +optional
+ UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,3,opt,name=updatedReplicas"`
+
+ // Total number of ready pods targeted by this deployment.
+ // +optional
+ ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,7,opt,name=readyReplicas"`
+
+ // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
+ // +optional
+ AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,4,opt,name=availableReplicas"`
+
+ // Total number of unavailable pods targeted by this deployment.
+ // +optional
+ UnavailableReplicas int32 `json:"unavailableReplicas,omitempty" protobuf:"varint,5,opt,name=unavailableReplicas"`
+
+ // Represents the latest available observations of a deployment's current state.
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ Conditions []DeploymentCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"`
+
+ // Count of hash collisions for the Deployment. The Deployment controller uses this
+ // field as a collision avoidance mechanism when it needs to create the name for the
+ // newest ReplicaSet.
+ // +optional
+ CollisionCount *int64 `json:"collisionCount,omitempty" protobuf:"varint,8,opt,name=collisionCount"`
+}
+
+type DeploymentConditionType string
+
+// These are valid conditions of a deployment.
+const (
+ // Available means the deployment is available, ie. at least the minimum available
+ // replicas required are up and running for at least minReadySeconds.
+ DeploymentAvailable DeploymentConditionType = "Available"
+ // Progressing means the deployment is progressing. Progress for a deployment is
+ // considered when a new replica set is created or adopted, and when new pods scale
+ // up or old pods scale down. Progress is not estimated for paused deployments or
+ // when progressDeadlineSeconds is not specified.
+ DeploymentProgressing DeploymentConditionType = "Progressing"
+ // ReplicaFailure is added in a deployment when one of its pods fails to be created
+ // or deleted.
+ DeploymentReplicaFailure DeploymentConditionType = "ReplicaFailure"
+)
+
+// DeploymentCondition describes the state of a deployment at a certain point.
+type DeploymentCondition struct {
+ // Type of deployment condition.
+ Type DeploymentConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=DeploymentConditionType"`
+ // Status of the condition, one of True, False, Unknown.
+ Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"`
+ // The last time this condition was updated.
+ LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,6,opt,name=lastUpdateTime"`
+ // Last time the condition transitioned from one status to another.
+ LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,7,opt,name=lastTransitionTime"`
+ // The reason for the condition's last transition.
+ Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
+ // A human readable message indicating details about the transition.
+ Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
+}
+
+// DeploymentList is a list of Deployments.
+type DeploymentList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of Deployments.
+ Items []Deployment `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+type DaemonSetUpdateStrategy struct {
+ // Type of daemon set update. Can be "RollingUpdate" or "OnDelete".
+ // Default is OnDelete.
+ // +optional
+ Type DaemonSetUpdateStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type"`
+
+ // Rolling update config params. Present only if type = "RollingUpdate".
+ //---
+ // TODO: Update this to follow our convention for oneOf, whatever we decide it
+ // to be. Same as Deployment `strategy.rollingUpdate`.
+ // See https://github.com/kubernetes/kubernetes/issues/35345
+ // +optional
+ RollingUpdate *RollingUpdateDaemonSet `json:"rollingUpdate,omitempty" protobuf:"bytes,2,opt,name=rollingUpdate"`
+}
+
+type DaemonSetUpdateStrategyType string
+
+const (
+ // Replace the old daemons by new ones using rolling update i.e replace them on each node one after the other.
+ RollingUpdateDaemonSetStrategyType DaemonSetUpdateStrategyType = "RollingUpdate"
+
+ // Replace the old daemons only when it's killed
+ OnDeleteDaemonSetStrategyType DaemonSetUpdateStrategyType = "OnDelete"
+)
+
+// Spec to control the desired behavior of daemon set rolling update.
+type RollingUpdateDaemonSet struct {
+ // The maximum number of DaemonSet pods that can be unavailable during the
+ // update. Value can be an absolute number (ex: 5) or a percentage of total
+ // number of DaemonSet pods at the start of the update (ex: 10%). Absolute
+ // number is calculated from percentage by rounding up.
+ // This cannot be 0.
+ // Default value is 1.
+ // Example: when this is set to 30%, at most 30% of the total number of nodes
+ // that should be running the daemon pod (i.e. status.desiredNumberScheduled)
+ // can have their pods stopped for an update at any given
+ // time. The update starts by stopping at most 30% of those DaemonSet pods
+ // and then brings up new DaemonSet pods in their place. Once the new pods
+ // are available, it then proceeds onto other DaemonSet pods, thus ensuring
+ // that at least 70% of original number of DaemonSet pods are available at
+ // all times during the update.
+ // +optional
+ MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,1,opt,name=maxUnavailable"`
+}
+
+// DaemonSetSpec is the specification of a daemon set.
+type DaemonSetSpec struct {
+ // A label query over pods that are managed by the daemon set.
+ // Must match in order to be controlled.
+ // If empty, defaulted to labels on Pod template.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,1,opt,name=selector"`
+
+ // An object that describes the pod that will be created.
+ // The DaemonSet will create exactly one copy of this pod on every node
+ // that matches the template's node selector (or on every node if no node
+ // selector is specified).
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
+ Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,2,opt,name=template"`
+
+ // An update strategy to replace existing DaemonSet pods with new pods.
+ // +optional
+ UpdateStrategy DaemonSetUpdateStrategy `json:"updateStrategy,omitempty" protobuf:"bytes,3,opt,name=updateStrategy"`
+
+ // The minimum number of seconds for which a newly created DaemonSet pod should
+ // be ready without any of its container crashing, for it to be considered
+ // available. Defaults to 0 (pod will be considered available as soon as it
+ // is ready).
+ // +optional
+ MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,4,opt,name=minReadySeconds"`
+
+ // DEPRECATED.
+ // A sequence number representing a specific generation of the template.
+ // Populated by the system. It can be set only during the creation.
+ // +optional
+ TemplateGeneration int64 `json:"templateGeneration,omitempty" protobuf:"varint,5,opt,name=templateGeneration"`
+
+ // The number of old history to retain to allow rollback.
+ // This is a pointer to distinguish between explicit zero and not specified.
+ // Defaults to 10.
+ // +optional
+ RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,6,opt,name=revisionHistoryLimit"`
+}
+
+// DaemonSetStatus represents the current status of a daemon set.
+type DaemonSetStatus struct {
+ // The number of nodes that are running at least 1
+ // daemon pod and are supposed to run the daemon pod.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
+ CurrentNumberScheduled int32 `json:"currentNumberScheduled" protobuf:"varint,1,opt,name=currentNumberScheduled"`
+
+ // The number of nodes that are running the daemon pod, but are
+ // not supposed to run the daemon pod.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
+ NumberMisscheduled int32 `json:"numberMisscheduled" protobuf:"varint,2,opt,name=numberMisscheduled"`
+
+ // The total number of nodes that should be running the daemon
+ // pod (including nodes correctly running the daemon pod).
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
+ DesiredNumberScheduled int32 `json:"desiredNumberScheduled" protobuf:"varint,3,opt,name=desiredNumberScheduled"`
+
+ // The number of nodes that should be running the daemon pod and have one
+ // or more of the daemon pod running and ready.
+ NumberReady int32 `json:"numberReady" protobuf:"varint,4,opt,name=numberReady"`
+
+ // The most recent generation observed by the daemon set controller.
+ // +optional
+ ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,5,opt,name=observedGeneration"`
+
+ // The total number of nodes that are running updated daemon pod
+ // +optional
+ UpdatedNumberScheduled int32 `json:"updatedNumberScheduled,omitempty" protobuf:"varint,6,opt,name=updatedNumberScheduled"`
+
+ // The number of nodes that should be running the
+ // daemon pod and have one or more of the daemon pod running and
+ // available (ready for at least spec.minReadySeconds)
+ // +optional
+ NumberAvailable int32 `json:"numberAvailable,omitempty" protobuf:"varint,7,opt,name=numberAvailable"`
+
+ // The number of nodes that should be running the
+ // daemon pod and have none of the daemon pod running and available
+ // (ready for at least spec.minReadySeconds)
+ // +optional
+ NumberUnavailable int32 `json:"numberUnavailable,omitempty" protobuf:"varint,8,opt,name=numberUnavailable"`
+
+ // Count of hash collisions for the DaemonSet. The DaemonSet controller
+ // uses this field as a collision avoidance mechanism when it needs to
+ // create the name for the newest ControllerRevision.
+ // +optional
+ CollisionCount *int64 `json:"collisionCount,omitempty" protobuf:"varint,9,opt,name=collisionCount"`
+}
+
+// +genclient=true
+
+// DaemonSet represents the configuration of a daemon set.
+type DaemonSet struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // The desired behavior of this daemon set.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec DaemonSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // The current status of this daemon set. This data may be
+ // out of date by some window of time.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status DaemonSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+const (
+ // DEPRECATED: DefaultDaemonSetUniqueLabelKey is used instead.
+ // DaemonSetTemplateGenerationKey is the key of the labels that is added
+ // to daemon set pods to distinguish between old and new pod templates
+ // during DaemonSet template update.
+ DaemonSetTemplateGenerationKey string = "pod-template-generation"
+
+ // DefaultDaemonSetUniqueLabelKey is the default label key that is added
+ // to existing DaemonSet pods to distinguish between old and new
+ // DaemonSet pods during DaemonSet template updates.
+ DefaultDaemonSetUniqueLabelKey = appsv1beta1.ControllerRevisionHashLabelKey
+)
+
+// DaemonSetList is a collection of daemon sets.
+type DaemonSetList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // A list of daemon sets.
+ Items []DaemonSet `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// ThirdPartyResrouceDataList is a list of ThirdPartyResourceData.
+type ThirdPartyResourceDataList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of ThirdpartyResourceData.
+ Items []ThirdPartyResourceData `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// +genclient=true
+
+// Ingress is a collection of rules that allow inbound connections to reach the
+// endpoints defined by a backend. An Ingress can be configured to give services
+// externally-reachable urls, load balance traffic, terminate SSL, offer name
+// based virtual hosting etc.
+type Ingress struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec is the desired state of the Ingress.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec IngressSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is the current state of the Ingress.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status IngressStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// IngressList is a collection of Ingress.
+type IngressList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of Ingress.
+ Items []Ingress `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// IngressSpec describes the Ingress the user wishes to exist.
+type IngressSpec struct {
+ // A default backend capable of servicing requests that don't match any
+ // rule. At least one of 'backend' or 'rules' must be specified. This field
+ // is optional to allow the loadbalancer controller or defaulting logic to
+ // specify a global default.
+ // +optional
+ Backend *IngressBackend `json:"backend,omitempty" protobuf:"bytes,1,opt,name=backend"`
+
+ // TLS configuration. Currently the Ingress only supports a single TLS
+ // port, 443. If multiple members of this list specify different hosts, they
+ // will be multiplexed on the same port according to the hostname specified
+ // through the SNI TLS extension, if the ingress controller fulfilling the
+ // ingress supports SNI.
+ // +optional
+ TLS []IngressTLS `json:"tls,omitempty" protobuf:"bytes,2,rep,name=tls"`
+
+ // A list of host rules used to configure the Ingress. If unspecified, or
+ // no rule matches, all traffic is sent to the default backend.
+ // +optional
+ Rules []IngressRule `json:"rules,omitempty" protobuf:"bytes,3,rep,name=rules"`
+ // TODO: Add the ability to specify load-balancer IP through claims
+}
+
+// IngressTLS describes the transport layer security associated with an Ingress.
+type IngressTLS struct {
+ // Hosts are a list of hosts included in the TLS certificate. The values in
+ // this list must match the name/s used in the tlsSecret. Defaults to the
+ // wildcard host setting for the loadbalancer controller fulfilling this
+ // Ingress, if left unspecified.
+ // +optional
+ Hosts []string `json:"hosts,omitempty" protobuf:"bytes,1,rep,name=hosts"`
+ // SecretName is the name of the secret used to terminate SSL traffic on 443.
+ // Field is left optional to allow SSL routing based on SNI hostname alone.
+ // If the SNI host in a listener conflicts with the "Host" header field used
+ // by an IngressRule, the SNI host is used for termination and value of the
+ // Host header is used for routing.
+ // +optional
+ SecretName string `json:"secretName,omitempty" protobuf:"bytes,2,opt,name=secretName"`
+ // TODO: Consider specifying different modes of termination, protocols etc.
+}
+
+// IngressStatus describe the current state of the Ingress.
+type IngressStatus struct {
+ // LoadBalancer contains the current status of the load-balancer.
+ // +optional
+ LoadBalancer v1.LoadBalancerStatus `json:"loadBalancer,omitempty" protobuf:"bytes,1,opt,name=loadBalancer"`
+}
+
+// IngressRule represents the rules mapping the paths under a specified host to
+// the related backend services. Incoming requests are first evaluated for a host
+// match, then routed to the backend associated with the matching IngressRuleValue.
+type IngressRule struct {
+ // Host is the fully qualified domain name of a network host, as defined
+ // by RFC 3986. Note the following deviations from the "host" part of the
+ // URI as defined in the RFC:
+ // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the
+ // IP in the Spec of the parent Ingress.
+ // 2. The `:` delimiter is not respected because ports are not allowed.
+ // Currently the port of an Ingress is implicitly :80 for http and
+ // :443 for https.
+ // Both these may change in the future.
+ // Incoming requests are matched against the host before the IngressRuleValue.
+ // If the host is unspecified, the Ingress routes all traffic based on the
+ // specified IngressRuleValue.
+ // +optional
+ Host string `json:"host,omitempty" protobuf:"bytes,1,opt,name=host"`
+ // IngressRuleValue represents a rule to route requests for this IngressRule.
+ // If unspecified, the rule defaults to a http catch-all. Whether that sends
+ // just traffic matching the host to the default backend or all traffic to the
+ // default backend, is left to the controller fulfilling the Ingress. Http is
+ // currently the only supported IngressRuleValue.
+ // +optional
+ IngressRuleValue `json:",inline,omitempty" protobuf:"bytes,2,opt,name=ingressRuleValue"`
+}
+
+// IngressRuleValue represents a rule to apply against incoming requests. If the
+// rule is satisfied, the request is routed to the specified backend. Currently
+// mixing different types of rules in a single Ingress is disallowed, so exactly
+// one of the following must be set.
+type IngressRuleValue struct {
+ //TODO:
+ // 1. Consider renaming this resource and the associated rules so they
+ // aren't tied to Ingress. They can be used to route intra-cluster traffic.
+ // 2. Consider adding fields for ingress-type specific global options
+ // usable by a loadbalancer, like http keep-alive.
+
+ // +optional
+ HTTP *HTTPIngressRuleValue `json:"http,omitempty" protobuf:"bytes,1,opt,name=http"`
+}
+
+// HTTPIngressRuleValue is a list of http selectors pointing to backends.
+// In the example: http://<host>/<path>?<searchpart> -> backend where
+// where parts of the url correspond to RFC 3986, this resource will be used
+// to match against everything after the last '/' and before the first '?'
+// or '#'.
+type HTTPIngressRuleValue struct {
+ // A collection of paths that map requests to backends.
+ Paths []HTTPIngressPath `json:"paths" protobuf:"bytes,1,rep,name=paths"`
+ // TODO: Consider adding fields for ingress-type specific global
+ // options usable by a loadbalancer, like http keep-alive.
+}
+
+// HTTPIngressPath associates a path regex with a backend. Incoming urls matching
+// the path are forwarded to the backend.
+type HTTPIngressPath struct {
+ // Path is an extended POSIX regex as defined by IEEE Std 1003.1,
+ // (i.e this follows the egrep/unix syntax, not the perl syntax)
+ // matched against the path of an incoming request. Currently it can
+ // contain characters disallowed from the conventional "path"
+ // part of a URL as defined by RFC 3986. Paths must begin with
+ // a '/'. If unspecified, the path defaults to a catch all sending
+ // traffic to the backend.
+ // +optional
+ Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"`
+
+ // Backend defines the referenced service endpoint to which the traffic
+ // will be forwarded to.
+ Backend IngressBackend `json:"backend" protobuf:"bytes,2,opt,name=backend"`
+}
+
+// IngressBackend describes all endpoints for a given service and port.
+type IngressBackend struct {
+ // Specifies the name of the referenced service.
+ ServiceName string `json:"serviceName" protobuf:"bytes,1,opt,name=serviceName"`
+
+ // Specifies the port of the referenced service.
+ ServicePort intstr.IntOrString `json:"servicePort" protobuf:"bytes,2,opt,name=servicePort"`
+}
+
+// +genclient=true
+
+// ReplicaSet represents the configuration of a ReplicaSet.
+type ReplicaSet struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // If the Labels of a ReplicaSet are empty, they are defaulted to
+ // be the same as the Pod(s) that the ReplicaSet manages.
+ // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Spec defines the specification of the desired behavior of the ReplicaSet.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Spec ReplicaSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+
+ // Status is the most recently observed status of the ReplicaSet.
+ // This data may be out of date by some window of time.
+ // Populated by the system.
+ // Read-only.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
+ // +optional
+ Status ReplicaSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// ReplicaSetList is a collection of ReplicaSets.
+type ReplicaSetList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // List of ReplicaSets.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
+ Items []ReplicaSet `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// ReplicaSetSpec is the specification of a ReplicaSet.
+type ReplicaSetSpec struct {
+ // Replicas is the number of desired replicas.
+ // This is a pointer to distinguish between explicit zero and unspecified.
+ // Defaults to 1.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
+ // +optional
+ Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
+
+ // Minimum number of seconds for which a newly created pod should be ready
+ // without any of its container crashing, for it to be considered available.
+ // Defaults to 0 (pod will be considered available as soon as it is ready)
+ // +optional
+ MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,4,opt,name=minReadySeconds"`
+
+ // Selector is a label query over pods that should match the replica count.
+ // If the selector is empty, it is defaulted to the labels present on the pod template.
+ // Label keys and values that must match in order to be controlled by this replica set.
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
+ // +optional
+ Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
+
+ // Template is the object that describes the pod that will be created if
+ // insufficient replicas are detected.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
+ // +optional
+ Template v1.PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,3,opt,name=template"`
+}
+
+// ReplicaSetStatus represents the current status of a ReplicaSet.
+type ReplicaSetStatus struct {
+ // Replicas is the most recently oberved number of replicas.
+ // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
+ Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"`
+
+ // The number of pods that have labels matching the labels of the pod template of the replicaset.
+ // +optional
+ FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty" protobuf:"varint,2,opt,name=fullyLabeledReplicas"`
+
+ // The number of ready replicas for this replica set.
+ // +optional
+ ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,4,opt,name=readyReplicas"`
+
+ // The number of available replicas (ready for at least minReadySeconds) for this replica set.
+ // +optional
+ AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,5,opt,name=availableReplicas"`
+
+ // ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
+ // +optional
+ ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"`
+
+ // Represents the latest available observations of a replica set's current state.
+ // +optional
+ // +patchMergeKey=type
+ // +patchStrategy=merge
+ Conditions []ReplicaSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"`
+}
+
+type ReplicaSetConditionType string
+
+// These are valid conditions of a replica set.
+const (
+ // ReplicaSetReplicaFailure is added in a replica set when one of its pods fails to be created
+ // due to insufficient quota, limit ranges, pod security policy, node selectors, etc. or deleted
+ // due to kubelet being down or finalizers are failing.
+ ReplicaSetReplicaFailure ReplicaSetConditionType = "ReplicaFailure"
+)
+
+// ReplicaSetCondition describes the state of a replica set at a certain point.
+type ReplicaSetCondition struct {
+ // Type of replica set condition.
+ Type ReplicaSetConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=ReplicaSetConditionType"`
+ // Status of the condition, one of True, False, Unknown.
+ Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"`
+ // The last time the condition transitioned from one status to another.
+ // +optional
+ LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
+ // The reason for the condition's last transition.
+ // +optional
+ Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
+ // A human readable message indicating details about the transition.
+ // +optional
+ Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
+}
+
+// +genclient=true
+// +nonNamespaced=true
+
+// Pod Security Policy governs the ability to make requests that affect the Security Context
+// that will be applied to a pod and container.
+type PodSecurityPolicy struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // spec defines the policy enforced.
+ // +optional
+ Spec PodSecurityPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+}
+
+// Pod Security Policy Spec defines the policy enforced.
+type PodSecurityPolicySpec struct {
+ // privileged determines if a pod can request to be run as privileged.
+ // +optional
+ Privileged bool `json:"privileged,omitempty" protobuf:"varint,1,opt,name=privileged"`
+ // DefaultAddCapabilities is the default set of capabilities that will be added to the container
+ // unless the pod spec specifically drops the capability. You may not list a capabiility in both
+ // DefaultAddCapabilities and RequiredDropCapabilities.
+ // +optional
+ DefaultAddCapabilities []v1.Capability `json:"defaultAddCapabilities,omitempty" protobuf:"bytes,2,rep,name=defaultAddCapabilities,casttype=k8s.io/kubernetes/pkg/api/v1.Capability"`
+ // RequiredDropCapabilities are the capabilities that will be dropped from the container. These
+ // are required to be dropped and cannot be added.
+ // +optional
+ RequiredDropCapabilities []v1.Capability `json:"requiredDropCapabilities,omitempty" protobuf:"bytes,3,rep,name=requiredDropCapabilities,casttype=k8s.io/kubernetes/pkg/api/v1.Capability"`
+ // AllowedCapabilities is a list of capabilities that can be requested to add to the container.
+ // Capabilities in this field may be added at the pod author's discretion.
+ // You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities.
+ // +optional
+ AllowedCapabilities []v1.Capability `json:"allowedCapabilities,omitempty" protobuf:"bytes,4,rep,name=allowedCapabilities,casttype=k8s.io/kubernetes/pkg/api/v1.Capability"`
+ // volumes is a white list of allowed volume plugins. Empty indicates that all plugins
+ // may be used.
+ // +optional
+ Volumes []FSType `json:"volumes,omitempty" protobuf:"bytes,5,rep,name=volumes,casttype=FSType"`
+ // hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.
+ // +optional
+ HostNetwork bool `json:"hostNetwork,omitempty" protobuf:"varint,6,opt,name=hostNetwork"`
+ // hostPorts determines which host port ranges are allowed to be exposed.
+ // +optional
+ HostPorts []HostPortRange `json:"hostPorts,omitempty" protobuf:"bytes,7,rep,name=hostPorts"`
+ // hostPID determines if the policy allows the use of HostPID in the pod spec.
+ // +optional
+ HostPID bool `json:"hostPID,omitempty" protobuf:"varint,8,opt,name=hostPID"`
+ // hostIPC determines if the policy allows the use of HostIPC in the pod spec.
+ // +optional
+ HostIPC bool `json:"hostIPC,omitempty" protobuf:"varint,9,opt,name=hostIPC"`
+ // seLinux is the strategy that will dictate the allowable labels that may be set.
+ SELinux SELinuxStrategyOptions `json:"seLinux" protobuf:"bytes,10,opt,name=seLinux"`
+ // runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.
+ RunAsUser RunAsUserStrategyOptions `json:"runAsUser" protobuf:"bytes,11,opt,name=runAsUser"`
+ // SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.
+ SupplementalGroups SupplementalGroupsStrategyOptions `json:"supplementalGroups" protobuf:"bytes,12,opt,name=supplementalGroups"`
+ // FSGroup is the strategy that will dictate what fs group is used by the SecurityContext.
+ FSGroup FSGroupStrategyOptions `json:"fsGroup" protobuf:"bytes,13,opt,name=fsGroup"`
+ // ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file
+ // system. If the container specifically requests to run with a non-read only root file system
+ // the PSP should deny the pod.
+ // If set to false the container may run with a read only root file system if it wishes but it
+ // will not be forced to.
+ // +optional
+ ReadOnlyRootFilesystem bool `json:"readOnlyRootFilesystem,omitempty" protobuf:"varint,14,opt,name=readOnlyRootFilesystem"`
+}
+
+// FS Type gives strong typing to different file systems that are used by volumes.
+type FSType string
+
+var (
+ AzureFile FSType = "azureFile"
+ Flocker FSType = "flocker"
+ FlexVolume FSType = "flexVolume"
+ HostPath FSType = "hostPath"
+ EmptyDir FSType = "emptyDir"
+ GCEPersistentDisk FSType = "gcePersistentDisk"
+ AWSElasticBlockStore FSType = "awsElasticBlockStore"
+ GitRepo FSType = "gitRepo"
+ Secret FSType = "secret"
+ NFS FSType = "nfs"
+ ISCSI FSType = "iscsi"
+ Glusterfs FSType = "glusterfs"
+ PersistentVolumeClaim FSType = "persistentVolumeClaim"
+ RBD FSType = "rbd"
+ Cinder FSType = "cinder"
+ CephFS FSType = "cephFS"
+ DownwardAPI FSType = "downwardAPI"
+ FC FSType = "fc"
+ ConfigMap FSType = "configMap"
+ Quobyte FSType = "quobyte"
+ AzureDisk FSType = "azureDisk"
+ All FSType = "*"
+)
+
+// Host Port Range defines a range of host ports that will be enabled by a policy
+// for pods to use. It requires both the start and end to be defined.
+type HostPortRange struct {
+ // min is the start of the range, inclusive.
+ Min int32 `json:"min" protobuf:"varint,1,opt,name=min"`
+ // max is the end of the range, inclusive.
+ Max int32 `json:"max" protobuf:"varint,2,opt,name=max"`
+}
+
+// SELinux Strategy Options defines the strategy type and any options used to create the strategy.
+type SELinuxStrategyOptions struct {
+ // type is the strategy that will dictate the allowable labels that may be set.
+ Rule SELinuxStrategy `json:"rule" protobuf:"bytes,1,opt,name=rule,casttype=SELinuxStrategy"`
+ // seLinuxOptions required to run as; required for MustRunAs
+ // More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md
+ // +optional
+ SELinuxOptions *v1.SELinuxOptions `json:"seLinuxOptions,omitempty" protobuf:"bytes,2,opt,name=seLinuxOptions"`
+}
+
+// SELinuxStrategy denotes strategy types for generating SELinux options for a
+// Security Context.
+type SELinuxStrategy string
+
+const (
+ // container must have SELinux labels of X applied.
+ SELinuxStrategyMustRunAs SELinuxStrategy = "MustRunAs"
+ // container may make requests for any SELinux context labels.
+ SELinuxStrategyRunAsAny SELinuxStrategy = "RunAsAny"
+)
+
+// Run A sUser Strategy Options defines the strategy type and any options used to create the strategy.
+type RunAsUserStrategyOptions struct {
+ // Rule is the strategy that will dictate the allowable RunAsUser values that may be set.
+ Rule RunAsUserStrategy `json:"rule" protobuf:"bytes,1,opt,name=rule,casttype=RunAsUserStrategy"`
+ // Ranges are the allowed ranges of uids that may be used.
+ // +optional
+ Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"`
+}
+
+// ID Range provides a min/max of an allowed range of IDs.
+type IDRange struct {
+ // Min is the start of the range, inclusive.
+ Min int64 `json:"min" protobuf:"varint,1,opt,name=min"`
+ // Max is the end of the range, inclusive.
+ Max int64 `json:"max" protobuf:"varint,2,opt,name=max"`
+}
+
+// RunAsUserStrategy denotes strategy types for generating RunAsUser values for a
+// Security Context.
+type RunAsUserStrategy string
+
+const (
+ // container must run as a particular uid.
+ RunAsUserStrategyMustRunAs RunAsUserStrategy = "MustRunAs"
+ // container must run as a non-root uid
+ RunAsUserStrategyMustRunAsNonRoot RunAsUserStrategy = "MustRunAsNonRoot"
+ // container may make requests for any uid.
+ RunAsUserStrategyRunAsAny RunAsUserStrategy = "RunAsAny"
+)
+
+// FSGroupStrategyOptions defines the strategy type and options used to create the strategy.
+type FSGroupStrategyOptions struct {
+ // Rule is the strategy that will dictate what FSGroup is used in the SecurityContext.
+ // +optional
+ Rule FSGroupStrategyType `json:"rule,omitempty" protobuf:"bytes,1,opt,name=rule,casttype=FSGroupStrategyType"`
+ // Ranges are the allowed ranges of fs groups. If you would like to force a single
+ // fs group then supply a single range with the same start and end.
+ // +optional
+ Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"`
+}
+
+// FSGroupStrategyType denotes strategy types for generating FSGroup values for a
+// SecurityContext
+type FSGroupStrategyType string
+
+const (
+ // container must have FSGroup of X applied.
+ FSGroupStrategyMustRunAs FSGroupStrategyType = "MustRunAs"
+ // container may make requests for any FSGroup labels.
+ FSGroupStrategyRunAsAny FSGroupStrategyType = "RunAsAny"
+)
+
+// SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.
+type SupplementalGroupsStrategyOptions struct {
+ // Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.
+ // +optional
+ Rule SupplementalGroupsStrategyType `json:"rule,omitempty" protobuf:"bytes,1,opt,name=rule,casttype=SupplementalGroupsStrategyType"`
+ // Ranges are the allowed ranges of supplemental groups. If you would like to force a single
+ // supplemental group then supply a single range with the same start and end.
+ // +optional
+ Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"`
+}
+
+// SupplementalGroupsStrategyType denotes strategy types for determining valid supplemental
+// groups for a SecurityContext.
+type SupplementalGroupsStrategyType string
+
+const (
+ // container must run as a particular gid.
+ SupplementalGroupsStrategyMustRunAs SupplementalGroupsStrategyType = "MustRunAs"
+ // container may make requests for any gid.
+ SupplementalGroupsStrategyRunAsAny SupplementalGroupsStrategyType = "RunAsAny"
+)
+
+// Pod Security Policy List is a list of PodSecurityPolicy objects.
+type PodSecurityPolicyList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of schema objects.
+ Items []PodSecurityPolicy `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// NetworkPolicy describes what network traffic is allowed for a set of Pods
+type NetworkPolicy struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Specification of the desired behavior for this NetworkPolicy.
+ // +optional
+ Spec NetworkPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+}
+
+type NetworkPolicySpec struct {
+ // Selects the pods to which this NetworkPolicy object applies. The array of ingress rules
+ // is applied to any pods selected by this field. Multiple network policies can select the
+ // same set of pods. In this case, the ingress rules for each are combined additively.
+ // This field is NOT optional and follows standard label selector semantics.
+ // An empty podSelector matches all pods in this namespace.
+ PodSelector metav1.LabelSelector `json:"podSelector" protobuf:"bytes,1,opt,name=podSelector"`
+
+ // List of ingress rules to be applied to the selected pods.
+ // Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod
+ // OR if the traffic source is the pod's local node,
+ // OR if the traffic matches at least one ingress rule across all of the NetworkPolicy
+ // objects whose podSelector matches the pod.
+ // If this field is empty then this NetworkPolicy does not allow any traffic
+ // (and serves solely to ensure that the pods it selects are isolated by default).
+ // +optional
+ Ingress []NetworkPolicyIngressRule `json:"ingress,omitempty" protobuf:"bytes,2,rep,name=ingress"`
+}
+
+// This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.
+type NetworkPolicyIngressRule struct {
+ // List of ports which should be made accessible on the pods selected for this rule.
+ // Each item in this list is combined using a logical OR.
+ // If this field is empty or missing, this rule matches all ports (traffic not restricted by port).
+ // If this field is present and contains at least one item, then this rule allows traffic
+ // only if the traffic matches at least one port in the list.
+ // +optional
+ Ports []NetworkPolicyPort `json:"ports,omitempty" protobuf:"bytes,1,rep,name=ports"`
+
+ // List of sources which should be able to access the pods selected for this rule.
+ // Items in this list are combined using a logical OR operation.
+ // If this field is empty or missing, this rule matches all sources (traffic not restricted by source).
+ // If this field is present and contains at least on item, this rule allows traffic only if the
+ // traffic matches at least one item in the from list.
+ // +optional
+ From []NetworkPolicyPeer `json:"from,omitempty" protobuf:"bytes,2,rep,name=from"`
+}
+
+type NetworkPolicyPort struct {
+ // Optional. The protocol (TCP or UDP) which traffic must match.
+ // If not specified, this field defaults to TCP.
+ // +optional
+ Protocol *v1.Protocol `json:"protocol,omitempty" protobuf:"bytes,1,opt,name=protocol,casttype=k8s.io/kubernetes/pkg/api/v1.Protocol"`
+
+ // If specified, the port on the given protocol. This can
+ // either be a numerical or named port on a pod. If this field is not provided,
+ // this matches all port names and numbers.
+ // If present, only traffic on the specified protocol AND port
+ // will be matched.
+ // +optional
+ Port *intstr.IntOrString `json:"port,omitempty" protobuf:"bytes,2,opt,name=port"`
+}
+
+type NetworkPolicyPeer struct {
+ // Exactly one of the following must be specified.
+
+ // This is a label selector which selects Pods in this namespace.
+ // This field follows standard label selector semantics.
+ // If present but empty, this selector selects all pods in this namespace.
+ // +optional
+ PodSelector *metav1.LabelSelector `json:"podSelector,omitempty" protobuf:"bytes,1,opt,name=podSelector"`
+
+ // Selects Namespaces using cluster scoped-labels. This
+ // matches all pods in all namespaces selected by this label selector.
+ // This field follows standard label selector semantics.
+ // If present but empty, this selector selects all namespaces.
+ // +optional
+ NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,2,opt,name=namespaceSelector"`
+}
+
+// Network Policy List is a list of NetworkPolicy objects.
+type NetworkPolicyList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of schema objects.
+ Items []NetworkPolicy `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..d9cc1d13e
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go
@@ -0,0 +1,631 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_APIVersion = map[string]string{
+ "": "An APIVersion represents a single concrete version of an object model.",
+ "name": "Name of this version (e.g. 'v1').",
+}
+
+func (APIVersion) SwaggerDoc() map[string]string {
+ return map_APIVersion
+}
+
+var map_CustomMetricCurrentStatus = map[string]string{
+ "name": "Custom Metric name.",
+ "value": "Custom Metric value (average).",
+}
+
+func (CustomMetricCurrentStatus) SwaggerDoc() map[string]string {
+ return map_CustomMetricCurrentStatus
+}
+
+var map_CustomMetricTarget = map[string]string{
+ "": "Alpha-level support for Custom Metrics in HPA (as annotations).",
+ "name": "Custom Metric name.",
+ "value": "Custom Metric value (average).",
+}
+
+func (CustomMetricTarget) SwaggerDoc() map[string]string {
+ return map_CustomMetricTarget
+}
+
+var map_DaemonSet = map[string]string{
+ "": "DaemonSet represents the configuration of a daemon set.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+ "status": "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (DaemonSet) SwaggerDoc() map[string]string {
+ return map_DaemonSet
+}
+
+var map_DaemonSetList = map[string]string{
+ "": "DaemonSetList is a collection of daemon sets.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "items": "A list of daemon sets.",
+}
+
+func (DaemonSetList) SwaggerDoc() map[string]string {
+ return map_DaemonSetList
+}
+
+var map_DaemonSetSpec = map[string]string{
+ "": "DaemonSetSpec is the specification of a daemon set.",
+ "selector": "A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
+ "template": "An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template",
+ "updateStrategy": "An update strategy to replace existing DaemonSet pods with new pods.",
+ "minReadySeconds": "The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready).",
+ "templateGeneration": "DEPRECATED. A sequence number representing a specific generation of the template. Populated by the system. It can be set only during the creation.",
+ "revisionHistoryLimit": "The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.",
+}
+
+func (DaemonSetSpec) SwaggerDoc() map[string]string {
+ return map_DaemonSetSpec
+}
+
+var map_DaemonSetStatus = map[string]string{
+ "": "DaemonSetStatus represents the current status of a daemon set.",
+ "currentNumberScheduled": "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/",
+ "numberMisscheduled": "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/",
+ "desiredNumberScheduled": "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/",
+ "numberReady": "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.",
+ "observedGeneration": "The most recent generation observed by the daemon set controller.",
+ "updatedNumberScheduled": "The total number of nodes that are running updated daemon pod",
+ "numberAvailable": "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds)",
+ "numberUnavailable": "The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds)",
+ "collisionCount": "Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.",
+}
+
+func (DaemonSetStatus) SwaggerDoc() map[string]string {
+ return map_DaemonSetStatus
+}
+
+var map_DaemonSetUpdateStrategy = map[string]string{
+ "type": "Type of daemon set update. Can be \"RollingUpdate\" or \"OnDelete\". Default is OnDelete.",
+ "rollingUpdate": "Rolling update config params. Present only if type = \"RollingUpdate\".",
+}
+
+func (DaemonSetUpdateStrategy) SwaggerDoc() map[string]string {
+ return map_DaemonSetUpdateStrategy
+}
+
+var map_Deployment = map[string]string{
+ "": "Deployment enables declarative updates for Pods and ReplicaSets.",
+ "metadata": "Standard object metadata.",
+ "spec": "Specification of the desired behavior of the Deployment.",
+ "status": "Most recently observed status of the Deployment.",
+}
+
+func (Deployment) SwaggerDoc() map[string]string {
+ return map_Deployment
+}
+
+var map_DeploymentCondition = map[string]string{
+ "": "DeploymentCondition describes the state of a deployment at a certain point.",
+ "type": "Type of deployment condition.",
+ "status": "Status of the condition, one of True, False, Unknown.",
+ "lastUpdateTime": "The last time this condition was updated.",
+ "lastTransitionTime": "Last time the condition transitioned from one status to another.",
+ "reason": "The reason for the condition's last transition.",
+ "message": "A human readable message indicating details about the transition.",
+}
+
+func (DeploymentCondition) SwaggerDoc() map[string]string {
+ return map_DeploymentCondition
+}
+
+var map_DeploymentList = map[string]string{
+ "": "DeploymentList is a list of Deployments.",
+ "metadata": "Standard list metadata.",
+ "items": "Items is the list of Deployments.",
+}
+
+func (DeploymentList) SwaggerDoc() map[string]string {
+ return map_DeploymentList
+}
+
+var map_DeploymentRollback = map[string]string{
+ "": "DeploymentRollback stores the information required to rollback a deployment.",
+ "name": "Required: This must match the Name of a deployment.",
+ "updatedAnnotations": "The annotations to be updated to a deployment",
+ "rollbackTo": "The config of this deployment rollback.",
+}
+
+func (DeploymentRollback) SwaggerDoc() map[string]string {
+ return map_DeploymentRollback
+}
+
+var map_DeploymentSpec = map[string]string{
+ "": "DeploymentSpec is the specification of the desired behavior of the Deployment.",
+ "replicas": "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.",
+ "selector": "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.",
+ "template": "Template describes the pods that will be created.",
+ "strategy": "The deployment strategy to use to replace existing pods with new ones.",
+ "minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)",
+ "revisionHistoryLimit": "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified.",
+ "paused": "Indicates that the deployment is paused and will not be processed by the deployment controller.",
+ "rollbackTo": "The config this deployment is rolling back to. Will be cleared after rollback is done.",
+ "progressDeadlineSeconds": "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Once autoRollback is implemented, the deployment controller will automatically rollback failed deployments. Note that progress will not be estimated during the time a deployment is paused. This is not set by default.",
+}
+
+func (DeploymentSpec) SwaggerDoc() map[string]string {
+ return map_DeploymentSpec
+}
+
+var map_DeploymentStatus = map[string]string{
+ "": "DeploymentStatus is the most recently observed status of the Deployment.",
+ "observedGeneration": "The generation observed by the deployment controller.",
+ "replicas": "Total number of non-terminated pods targeted by this deployment (their labels match the selector).",
+ "updatedReplicas": "Total number of non-terminated pods targeted by this deployment that have the desired template spec.",
+ "readyReplicas": "Total number of ready pods targeted by this deployment.",
+ "availableReplicas": "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.",
+ "unavailableReplicas": "Total number of unavailable pods targeted by this deployment.",
+ "conditions": "Represents the latest available observations of a deployment's current state.",
+ "collisionCount": "Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.",
+}
+
+func (DeploymentStatus) SwaggerDoc() map[string]string {
+ return map_DeploymentStatus
+}
+
+var map_DeploymentStrategy = map[string]string{
+ "": "DeploymentStrategy describes how to replace existing pods with new ones.",
+ "type": "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.",
+ "rollingUpdate": "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.",
+}
+
+func (DeploymentStrategy) SwaggerDoc() map[string]string {
+ return map_DeploymentStrategy
+}
+
+var map_FSGroupStrategyOptions = map[string]string{
+ "": "FSGroupStrategyOptions defines the strategy type and options used to create the strategy.",
+ "rule": "Rule is the strategy that will dictate what FSGroup is used in the SecurityContext.",
+ "ranges": "Ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end.",
+}
+
+func (FSGroupStrategyOptions) SwaggerDoc() map[string]string {
+ return map_FSGroupStrategyOptions
+}
+
+var map_HTTPIngressPath = map[string]string{
+ "": "HTTPIngressPath associates a path regex with a backend. Incoming urls matching the path are forwarded to the backend.",
+ "path": "Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. If unspecified, the path defaults to a catch all sending traffic to the backend.",
+ "backend": "Backend defines the referenced service endpoint to which the traffic will be forwarded to.",
+}
+
+func (HTTPIngressPath) SwaggerDoc() map[string]string {
+ return map_HTTPIngressPath
+}
+
+var map_HTTPIngressRuleValue = map[string]string{
+ "": "HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http://<host>/<path>?<searchpart> -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.",
+ "paths": "A collection of paths that map requests to backends.",
+}
+
+func (HTTPIngressRuleValue) SwaggerDoc() map[string]string {
+ return map_HTTPIngressRuleValue
+}
+
+var map_HostPortRange = map[string]string{
+ "": "Host Port Range defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined.",
+ "min": "min is the start of the range, inclusive.",
+ "max": "max is the end of the range, inclusive.",
+}
+
+func (HostPortRange) SwaggerDoc() map[string]string {
+ return map_HostPortRange
+}
+
+var map_IDRange = map[string]string{
+ "": "ID Range provides a min/max of an allowed range of IDs.",
+ "min": "Min is the start of the range, inclusive.",
+ "max": "Max is the end of the range, inclusive.",
+}
+
+func (IDRange) SwaggerDoc() map[string]string {
+ return map_IDRange
+}
+
+var map_Ingress = map[string]string{
+ "": "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+ "status": "Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (Ingress) SwaggerDoc() map[string]string {
+ return map_Ingress
+}
+
+var map_IngressBackend = map[string]string{
+ "": "IngressBackend describes all endpoints for a given service and port.",
+ "serviceName": "Specifies the name of the referenced service.",
+ "servicePort": "Specifies the port of the referenced service.",
+}
+
+func (IngressBackend) SwaggerDoc() map[string]string {
+ return map_IngressBackend
+}
+
+var map_IngressList = map[string]string{
+ "": "IngressList is a collection of Ingress.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "items": "Items is the list of Ingress.",
+}
+
+func (IngressList) SwaggerDoc() map[string]string {
+ return map_IngressList
+}
+
+var map_IngressRule = map[string]string{
+ "": "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.",
+ "host": "Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in the RFC: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the\n\t IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.",
+}
+
+func (IngressRule) SwaggerDoc() map[string]string {
+ return map_IngressRule
+}
+
+var map_IngressRuleValue = map[string]string{
+ "": "IngressRuleValue represents a rule to apply against incoming requests. If the rule is satisfied, the request is routed to the specified backend. Currently mixing different types of rules in a single Ingress is disallowed, so exactly one of the following must be set.",
+}
+
+func (IngressRuleValue) SwaggerDoc() map[string]string {
+ return map_IngressRuleValue
+}
+
+var map_IngressSpec = map[string]string{
+ "": "IngressSpec describes the Ingress the user wishes to exist.",
+ "backend": "A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.",
+ "tls": "TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.",
+ "rules": "A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.",
+}
+
+func (IngressSpec) SwaggerDoc() map[string]string {
+ return map_IngressSpec
+}
+
+var map_IngressStatus = map[string]string{
+ "": "IngressStatus describe the current state of the Ingress.",
+ "loadBalancer": "LoadBalancer contains the current status of the load-balancer.",
+}
+
+func (IngressStatus) SwaggerDoc() map[string]string {
+ return map_IngressStatus
+}
+
+var map_IngressTLS = map[string]string{
+ "": "IngressTLS describes the transport layer security associated with an Ingress.",
+ "hosts": "Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.",
+ "secretName": "SecretName is the name of the secret used to terminate SSL traffic on 443. Field is left optional to allow SSL routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.",
+}
+
+func (IngressTLS) SwaggerDoc() map[string]string {
+ return map_IngressTLS
+}
+
+var map_NetworkPolicy = map[string]string{
+ "": "NetworkPolicy describes what network traffic is allowed for a set of Pods",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Specification of the desired behavior for this NetworkPolicy.",
+}
+
+func (NetworkPolicy) SwaggerDoc() map[string]string {
+ return map_NetworkPolicy
+}
+
+var map_NetworkPolicyIngressRule = map[string]string{
+ "": "This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.",
+ "ports": "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.",
+ "from": "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list.",
+}
+
+func (NetworkPolicyIngressRule) SwaggerDoc() map[string]string {
+ return map_NetworkPolicyIngressRule
+}
+
+var map_NetworkPolicyList = map[string]string{
+ "": "Network Policy List is a list of NetworkPolicy objects.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "items": "Items is a list of schema objects.",
+}
+
+func (NetworkPolicyList) SwaggerDoc() map[string]string {
+ return map_NetworkPolicyList
+}
+
+var map_NetworkPolicyPeer = map[string]string{
+ "podSelector": "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace.",
+ "namespaceSelector": "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces.",
+}
+
+func (NetworkPolicyPeer) SwaggerDoc() map[string]string {
+ return map_NetworkPolicyPeer
+}
+
+var map_NetworkPolicyPort = map[string]string{
+ "protocol": "Optional. The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP.",
+ "port": "If specified, the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.",
+}
+
+func (NetworkPolicyPort) SwaggerDoc() map[string]string {
+ return map_NetworkPolicyPort
+}
+
+var map_NetworkPolicySpec = map[string]string{
+ "podSelector": "Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.",
+ "ingress": "List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default).",
+}
+
+func (NetworkPolicySpec) SwaggerDoc() map[string]string {
+ return map_NetworkPolicySpec
+}
+
+var map_PodSecurityPolicy = map[string]string{
+ "": "Pod Security Policy governs the ability to make requests that affect the Security Context that will be applied to a pod and container.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "spec defines the policy enforced.",
+}
+
+func (PodSecurityPolicy) SwaggerDoc() map[string]string {
+ return map_PodSecurityPolicy
+}
+
+var map_PodSecurityPolicyList = map[string]string{
+ "": "Pod Security Policy List is a list of PodSecurityPolicy objects.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "items": "Items is a list of schema objects.",
+}
+
+func (PodSecurityPolicyList) SwaggerDoc() map[string]string {
+ return map_PodSecurityPolicyList
+}
+
+var map_PodSecurityPolicySpec = map[string]string{
+ "": "Pod Security Policy Spec defines the policy enforced.",
+ "privileged": "privileged determines if a pod can request to be run as privileged.",
+ "defaultAddCapabilities": "DefaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capabiility in both DefaultAddCapabilities and RequiredDropCapabilities.",
+ "requiredDropCapabilities": "RequiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.",
+ "allowedCapabilities": "AllowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities.",
+ "volumes": "volumes is a white list of allowed volume plugins. Empty indicates that all plugins may be used.",
+ "hostNetwork": "hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.",
+ "hostPorts": "hostPorts determines which host port ranges are allowed to be exposed.",
+ "hostPID": "hostPID determines if the policy allows the use of HostPID in the pod spec.",
+ "hostIPC": "hostIPC determines if the policy allows the use of HostIPC in the pod spec.",
+ "seLinux": "seLinux is the strategy that will dictate the allowable labels that may be set.",
+ "runAsUser": "runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.",
+ "supplementalGroups": "SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.",
+ "fsGroup": "FSGroup is the strategy that will dictate what fs group is used by the SecurityContext.",
+ "readOnlyRootFilesystem": "ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.",
+}
+
+func (PodSecurityPolicySpec) SwaggerDoc() map[string]string {
+ return map_PodSecurityPolicySpec
+}
+
+var map_ReplicaSet = map[string]string{
+ "": "ReplicaSet represents the configuration of a ReplicaSet.",
+ "metadata": "If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+ "status": "Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
+}
+
+func (ReplicaSet) SwaggerDoc() map[string]string {
+ return map_ReplicaSet
+}
+
+var map_ReplicaSetCondition = map[string]string{
+ "": "ReplicaSetCondition describes the state of a replica set at a certain point.",
+ "type": "Type of replica set condition.",
+ "status": "Status of the condition, one of True, False, Unknown.",
+ "lastTransitionTime": "The last time the condition transitioned from one status to another.",
+ "reason": "The reason for the condition's last transition.",
+ "message": "A human readable message indicating details about the transition.",
+}
+
+func (ReplicaSetCondition) SwaggerDoc() map[string]string {
+ return map_ReplicaSetCondition
+}
+
+var map_ReplicaSetList = map[string]string{
+ "": "ReplicaSetList is a collection of ReplicaSets.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
+ "items": "List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller",
+}
+
+func (ReplicaSetList) SwaggerDoc() map[string]string {
+ return map_ReplicaSetList
+}
+
+var map_ReplicaSetSpec = map[string]string{
+ "": "ReplicaSetSpec is the specification of a ReplicaSet.",
+ "replicas": "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller",
+ "minReadySeconds": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)",
+ "selector": "Selector is a label query over pods that should match the replica count. If the selector is empty, it is defaulted to the labels present on the pod template. Label keys and values that must match in order to be controlled by this replica set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
+ "template": "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template",
+}
+
+func (ReplicaSetSpec) SwaggerDoc() map[string]string {
+ return map_ReplicaSetSpec
+}
+
+var map_ReplicaSetStatus = map[string]string{
+ "": "ReplicaSetStatus represents the current status of a ReplicaSet.",
+ "replicas": "Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller",
+ "fullyLabeledReplicas": "The number of pods that have labels matching the labels of the pod template of the replicaset.",
+ "readyReplicas": "The number of ready replicas for this replica set.",
+ "availableReplicas": "The number of available replicas (ready for at least minReadySeconds) for this replica set.",
+ "observedGeneration": "ObservedGeneration reflects the generation of the most recently observed ReplicaSet.",
+ "conditions": "Represents the latest available observations of a replica set's current state.",
+}
+
+func (ReplicaSetStatus) SwaggerDoc() map[string]string {
+ return map_ReplicaSetStatus
+}
+
+var map_ReplicationControllerDummy = map[string]string{
+ "": "Dummy definition",
+}
+
+func (ReplicationControllerDummy) SwaggerDoc() map[string]string {
+ return map_ReplicationControllerDummy
+}
+
+var map_RollbackConfig = map[string]string{
+ "revision": "The revision to rollback to. If set to 0, rollback to the last revision.",
+}
+
+func (RollbackConfig) SwaggerDoc() map[string]string {
+ return map_RollbackConfig
+}
+
+var map_RollingUpdateDaemonSet = map[string]string{
+ "": "Spec to control the desired behavior of daemon set rolling update.",
+ "maxUnavailable": "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.",
+}
+
+func (RollingUpdateDaemonSet) SwaggerDoc() map[string]string {
+ return map_RollingUpdateDaemonSet
+}
+
+var map_RollingUpdateDeployment = map[string]string{
+ "": "Spec to control the desired behavior of rolling update.",
+ "maxUnavailable": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.",
+ "maxSurge": "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. By default, a value of 1 is used. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.",
+}
+
+func (RollingUpdateDeployment) SwaggerDoc() map[string]string {
+ return map_RollingUpdateDeployment
+}
+
+var map_RunAsUserStrategyOptions = map[string]string{
+ "": "Run A sUser Strategy Options defines the strategy type and any options used to create the strategy.",
+ "rule": "Rule is the strategy that will dictate the allowable RunAsUser values that may be set.",
+ "ranges": "Ranges are the allowed ranges of uids that may be used.",
+}
+
+func (RunAsUserStrategyOptions) SwaggerDoc() map[string]string {
+ return map_RunAsUserStrategyOptions
+}
+
+var map_SELinuxStrategyOptions = map[string]string{
+ "": "SELinux Strategy Options defines the strategy type and any options used to create the strategy.",
+ "rule": "type is the strategy that will dictate the allowable labels that may be set.",
+ "seLinuxOptions": "seLinuxOptions required to run as; required for MustRunAs More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md",
+}
+
+func (SELinuxStrategyOptions) SwaggerDoc() map[string]string {
+ return map_SELinuxStrategyOptions
+}
+
+var map_Scale = map[string]string{
+ "": "represents a scaling request for a resource.",
+ "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.",
+ "spec": "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.",
+ "status": "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.",
+}
+
+func (Scale) SwaggerDoc() map[string]string {
+ return map_Scale
+}
+
+var map_ScaleSpec = map[string]string{
+ "": "describes the attributes of a scale subresource",
+ "replicas": "desired number of instances for the scaled object.",
+}
+
+func (ScaleSpec) SwaggerDoc() map[string]string {
+ return map_ScaleSpec
+}
+
+var map_ScaleStatus = map[string]string{
+ "": "represents the current status of a scale subresource.",
+ "replicas": "actual number of observed instances of the scaled object.",
+ "selector": "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors",
+ "targetSelector": "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors",
+}
+
+func (ScaleStatus) SwaggerDoc() map[string]string {
+ return map_ScaleStatus
+}
+
+var map_SupplementalGroupsStrategyOptions = map[string]string{
+ "": "SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.",
+ "rule": "Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.",
+ "ranges": "Ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end.",
+}
+
+func (SupplementalGroupsStrategyOptions) SwaggerDoc() map[string]string {
+ return map_SupplementalGroupsStrategyOptions
+}
+
+var map_ThirdPartyResource = map[string]string{
+ "": "A ThirdPartyResource is a generic representation of a resource, it is used by add-ons and plugins to add new resource types to the API. It consists of one or more Versions of the api.",
+ "metadata": "Standard object metadata",
+ "description": "Description is the description of this object.",
+ "versions": "Versions are versions for this third party object",
+}
+
+func (ThirdPartyResource) SwaggerDoc() map[string]string {
+ return map_ThirdPartyResource
+}
+
+var map_ThirdPartyResourceData = map[string]string{
+ "": "An internal object, used for versioned storage in etcd. Not exposed to the end user.",
+ "metadata": "Standard object metadata.",
+ "data": "Data is the raw JSON data for this data.",
+}
+
+func (ThirdPartyResourceData) SwaggerDoc() map[string]string {
+ return map_ThirdPartyResourceData
+}
+
+var map_ThirdPartyResourceDataList = map[string]string{
+ "": "ThirdPartyResrouceDataList is a list of ThirdPartyResourceData.",
+ "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "items": "Items is the list of ThirdpartyResourceData.",
+}
+
+func (ThirdPartyResourceDataList) SwaggerDoc() map[string]string {
+ return map_ThirdPartyResourceDataList
+}
+
+var map_ThirdPartyResourceList = map[string]string{
+ "": "ThirdPartyResourceList is a list of ThirdPartyResources.",
+ "metadata": "Standard list metadata.",
+ "items": "Items is the list of ThirdPartyResources.",
+}
+
+func (ThirdPartyResourceList) SwaggerDoc() map[string]string {
+ return map_ThirdPartyResourceList
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/zz_generated.conversion.go
new file mode 100644
index 000000000..bdee5e86d
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/zz_generated.conversion.go
@@ -0,0 +1,1714 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ intstr "k8s.io/apimachinery/pkg/util/intstr"
+ api "k8s.io/kubernetes/pkg/api"
+ api_v1 "k8s.io/kubernetes/pkg/api/v1"
+ extensions "k8s.io/kubernetes/pkg/apis/extensions"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1beta1_APIVersion_To_extensions_APIVersion,
+ Convert_extensions_APIVersion_To_v1beta1_APIVersion,
+ Convert_v1beta1_CustomMetricCurrentStatus_To_extensions_CustomMetricCurrentStatus,
+ Convert_extensions_CustomMetricCurrentStatus_To_v1beta1_CustomMetricCurrentStatus,
+ Convert_v1beta1_CustomMetricCurrentStatusList_To_extensions_CustomMetricCurrentStatusList,
+ Convert_extensions_CustomMetricCurrentStatusList_To_v1beta1_CustomMetricCurrentStatusList,
+ Convert_v1beta1_CustomMetricTarget_To_extensions_CustomMetricTarget,
+ Convert_extensions_CustomMetricTarget_To_v1beta1_CustomMetricTarget,
+ Convert_v1beta1_CustomMetricTargetList_To_extensions_CustomMetricTargetList,
+ Convert_extensions_CustomMetricTargetList_To_v1beta1_CustomMetricTargetList,
+ Convert_v1beta1_DaemonSet_To_extensions_DaemonSet,
+ Convert_extensions_DaemonSet_To_v1beta1_DaemonSet,
+ Convert_v1beta1_DaemonSetList_To_extensions_DaemonSetList,
+ Convert_extensions_DaemonSetList_To_v1beta1_DaemonSetList,
+ Convert_v1beta1_DaemonSetSpec_To_extensions_DaemonSetSpec,
+ Convert_extensions_DaemonSetSpec_To_v1beta1_DaemonSetSpec,
+ Convert_v1beta1_DaemonSetStatus_To_extensions_DaemonSetStatus,
+ Convert_extensions_DaemonSetStatus_To_v1beta1_DaemonSetStatus,
+ Convert_v1beta1_DaemonSetUpdateStrategy_To_extensions_DaemonSetUpdateStrategy,
+ Convert_extensions_DaemonSetUpdateStrategy_To_v1beta1_DaemonSetUpdateStrategy,
+ Convert_v1beta1_Deployment_To_extensions_Deployment,
+ Convert_extensions_Deployment_To_v1beta1_Deployment,
+ Convert_v1beta1_DeploymentCondition_To_extensions_DeploymentCondition,
+ Convert_extensions_DeploymentCondition_To_v1beta1_DeploymentCondition,
+ Convert_v1beta1_DeploymentList_To_extensions_DeploymentList,
+ Convert_extensions_DeploymentList_To_v1beta1_DeploymentList,
+ Convert_v1beta1_DeploymentRollback_To_extensions_DeploymentRollback,
+ Convert_extensions_DeploymentRollback_To_v1beta1_DeploymentRollback,
+ Convert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec,
+ Convert_extensions_DeploymentSpec_To_v1beta1_DeploymentSpec,
+ Convert_v1beta1_DeploymentStatus_To_extensions_DeploymentStatus,
+ Convert_extensions_DeploymentStatus_To_v1beta1_DeploymentStatus,
+ Convert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy,
+ Convert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy,
+ Convert_v1beta1_FSGroupStrategyOptions_To_extensions_FSGroupStrategyOptions,
+ Convert_extensions_FSGroupStrategyOptions_To_v1beta1_FSGroupStrategyOptions,
+ Convert_v1beta1_HTTPIngressPath_To_extensions_HTTPIngressPath,
+ Convert_extensions_HTTPIngressPath_To_v1beta1_HTTPIngressPath,
+ Convert_v1beta1_HTTPIngressRuleValue_To_extensions_HTTPIngressRuleValue,
+ Convert_extensions_HTTPIngressRuleValue_To_v1beta1_HTTPIngressRuleValue,
+ Convert_v1beta1_HostPortRange_To_extensions_HostPortRange,
+ Convert_extensions_HostPortRange_To_v1beta1_HostPortRange,
+ Convert_v1beta1_Ingress_To_extensions_Ingress,
+ Convert_extensions_Ingress_To_v1beta1_Ingress,
+ Convert_v1beta1_IngressBackend_To_extensions_IngressBackend,
+ Convert_extensions_IngressBackend_To_v1beta1_IngressBackend,
+ Convert_v1beta1_IngressList_To_extensions_IngressList,
+ Convert_extensions_IngressList_To_v1beta1_IngressList,
+ Convert_v1beta1_IngressRule_To_extensions_IngressRule,
+ Convert_extensions_IngressRule_To_v1beta1_IngressRule,
+ Convert_v1beta1_IngressRuleValue_To_extensions_IngressRuleValue,
+ Convert_extensions_IngressRuleValue_To_v1beta1_IngressRuleValue,
+ Convert_v1beta1_IngressSpec_To_extensions_IngressSpec,
+ Convert_extensions_IngressSpec_To_v1beta1_IngressSpec,
+ Convert_v1beta1_IngressStatus_To_extensions_IngressStatus,
+ Convert_extensions_IngressStatus_To_v1beta1_IngressStatus,
+ Convert_v1beta1_IngressTLS_To_extensions_IngressTLS,
+ Convert_extensions_IngressTLS_To_v1beta1_IngressTLS,
+ Convert_v1beta1_NetworkPolicy_To_extensions_NetworkPolicy,
+ Convert_extensions_NetworkPolicy_To_v1beta1_NetworkPolicy,
+ Convert_v1beta1_NetworkPolicyIngressRule_To_extensions_NetworkPolicyIngressRule,
+ Convert_extensions_NetworkPolicyIngressRule_To_v1beta1_NetworkPolicyIngressRule,
+ Convert_v1beta1_NetworkPolicyList_To_extensions_NetworkPolicyList,
+ Convert_extensions_NetworkPolicyList_To_v1beta1_NetworkPolicyList,
+ Convert_v1beta1_NetworkPolicyPeer_To_extensions_NetworkPolicyPeer,
+ Convert_extensions_NetworkPolicyPeer_To_v1beta1_NetworkPolicyPeer,
+ Convert_v1beta1_NetworkPolicyPort_To_extensions_NetworkPolicyPort,
+ Convert_extensions_NetworkPolicyPort_To_v1beta1_NetworkPolicyPort,
+ Convert_v1beta1_NetworkPolicySpec_To_extensions_NetworkPolicySpec,
+ Convert_extensions_NetworkPolicySpec_To_v1beta1_NetworkPolicySpec,
+ Convert_v1beta1_PodSecurityPolicy_To_extensions_PodSecurityPolicy,
+ Convert_extensions_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy,
+ Convert_v1beta1_PodSecurityPolicyList_To_extensions_PodSecurityPolicyList,
+ Convert_extensions_PodSecurityPolicyList_To_v1beta1_PodSecurityPolicyList,
+ Convert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySpec,
+ Convert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec,
+ Convert_v1beta1_ReplicaSet_To_extensions_ReplicaSet,
+ Convert_extensions_ReplicaSet_To_v1beta1_ReplicaSet,
+ Convert_v1beta1_ReplicaSetCondition_To_extensions_ReplicaSetCondition,
+ Convert_extensions_ReplicaSetCondition_To_v1beta1_ReplicaSetCondition,
+ Convert_v1beta1_ReplicaSetList_To_extensions_ReplicaSetList,
+ Convert_extensions_ReplicaSetList_To_v1beta1_ReplicaSetList,
+ Convert_v1beta1_ReplicaSetSpec_To_extensions_ReplicaSetSpec,
+ Convert_extensions_ReplicaSetSpec_To_v1beta1_ReplicaSetSpec,
+ Convert_v1beta1_ReplicaSetStatus_To_extensions_ReplicaSetStatus,
+ Convert_extensions_ReplicaSetStatus_To_v1beta1_ReplicaSetStatus,
+ Convert_v1beta1_ReplicationControllerDummy_To_extensions_ReplicationControllerDummy,
+ Convert_extensions_ReplicationControllerDummy_To_v1beta1_ReplicationControllerDummy,
+ Convert_v1beta1_RollbackConfig_To_extensions_RollbackConfig,
+ Convert_extensions_RollbackConfig_To_v1beta1_RollbackConfig,
+ Convert_v1beta1_RollingUpdateDaemonSet_To_extensions_RollingUpdateDaemonSet,
+ Convert_extensions_RollingUpdateDaemonSet_To_v1beta1_RollingUpdateDaemonSet,
+ Convert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDeployment,
+ Convert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDeployment,
+ Convert_v1beta1_RunAsUserStrategyOptions_To_extensions_RunAsUserStrategyOptions,
+ Convert_extensions_RunAsUserStrategyOptions_To_v1beta1_RunAsUserStrategyOptions,
+ Convert_v1beta1_SELinuxStrategyOptions_To_extensions_SELinuxStrategyOptions,
+ Convert_extensions_SELinuxStrategyOptions_To_v1beta1_SELinuxStrategyOptions,
+ Convert_v1beta1_Scale_To_extensions_Scale,
+ Convert_extensions_Scale_To_v1beta1_Scale,
+ Convert_v1beta1_ScaleSpec_To_extensions_ScaleSpec,
+ Convert_extensions_ScaleSpec_To_v1beta1_ScaleSpec,
+ Convert_v1beta1_ScaleStatus_To_extensions_ScaleStatus,
+ Convert_extensions_ScaleStatus_To_v1beta1_ScaleStatus,
+ Convert_v1beta1_SupplementalGroupsStrategyOptions_To_extensions_SupplementalGroupsStrategyOptions,
+ Convert_extensions_SupplementalGroupsStrategyOptions_To_v1beta1_SupplementalGroupsStrategyOptions,
+ Convert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource,
+ Convert_extensions_ThirdPartyResource_To_v1beta1_ThirdPartyResource,
+ Convert_v1beta1_ThirdPartyResourceData_To_extensions_ThirdPartyResourceData,
+ Convert_extensions_ThirdPartyResourceData_To_v1beta1_ThirdPartyResourceData,
+ Convert_v1beta1_ThirdPartyResourceDataList_To_extensions_ThirdPartyResourceDataList,
+ Convert_extensions_ThirdPartyResourceDataList_To_v1beta1_ThirdPartyResourceDataList,
+ Convert_v1beta1_ThirdPartyResourceList_To_extensions_ThirdPartyResourceList,
+ Convert_extensions_ThirdPartyResourceList_To_v1beta1_ThirdPartyResourceList,
+ )
+}
+
+func autoConvert_v1beta1_APIVersion_To_extensions_APIVersion(in *APIVersion, out *extensions.APIVersion, s conversion.Scope) error {
+ out.Name = in.Name
+ return nil
+}
+
+// Convert_v1beta1_APIVersion_To_extensions_APIVersion is an autogenerated conversion function.
+func Convert_v1beta1_APIVersion_To_extensions_APIVersion(in *APIVersion, out *extensions.APIVersion, s conversion.Scope) error {
+ return autoConvert_v1beta1_APIVersion_To_extensions_APIVersion(in, out, s)
+}
+
+func autoConvert_extensions_APIVersion_To_v1beta1_APIVersion(in *extensions.APIVersion, out *APIVersion, s conversion.Scope) error {
+ out.Name = in.Name
+ return nil
+}
+
+// Convert_extensions_APIVersion_To_v1beta1_APIVersion is an autogenerated conversion function.
+func Convert_extensions_APIVersion_To_v1beta1_APIVersion(in *extensions.APIVersion, out *APIVersion, s conversion.Scope) error {
+ return autoConvert_extensions_APIVersion_To_v1beta1_APIVersion(in, out, s)
+}
+
+func autoConvert_v1beta1_CustomMetricCurrentStatus_To_extensions_CustomMetricCurrentStatus(in *CustomMetricCurrentStatus, out *extensions.CustomMetricCurrentStatus, s conversion.Scope) error {
+ out.Name = in.Name
+ out.CurrentValue = in.CurrentValue
+ return nil
+}
+
+// Convert_v1beta1_CustomMetricCurrentStatus_To_extensions_CustomMetricCurrentStatus is an autogenerated conversion function.
+func Convert_v1beta1_CustomMetricCurrentStatus_To_extensions_CustomMetricCurrentStatus(in *CustomMetricCurrentStatus, out *extensions.CustomMetricCurrentStatus, s conversion.Scope) error {
+ return autoConvert_v1beta1_CustomMetricCurrentStatus_To_extensions_CustomMetricCurrentStatus(in, out, s)
+}
+
+func autoConvert_extensions_CustomMetricCurrentStatus_To_v1beta1_CustomMetricCurrentStatus(in *extensions.CustomMetricCurrentStatus, out *CustomMetricCurrentStatus, s conversion.Scope) error {
+ out.Name = in.Name
+ out.CurrentValue = in.CurrentValue
+ return nil
+}
+
+// Convert_extensions_CustomMetricCurrentStatus_To_v1beta1_CustomMetricCurrentStatus is an autogenerated conversion function.
+func Convert_extensions_CustomMetricCurrentStatus_To_v1beta1_CustomMetricCurrentStatus(in *extensions.CustomMetricCurrentStatus, out *CustomMetricCurrentStatus, s conversion.Scope) error {
+ return autoConvert_extensions_CustomMetricCurrentStatus_To_v1beta1_CustomMetricCurrentStatus(in, out, s)
+}
+
+func autoConvert_v1beta1_CustomMetricCurrentStatusList_To_extensions_CustomMetricCurrentStatusList(in *CustomMetricCurrentStatusList, out *extensions.CustomMetricCurrentStatusList, s conversion.Scope) error {
+ out.Items = *(*[]extensions.CustomMetricCurrentStatus)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1beta1_CustomMetricCurrentStatusList_To_extensions_CustomMetricCurrentStatusList is an autogenerated conversion function.
+func Convert_v1beta1_CustomMetricCurrentStatusList_To_extensions_CustomMetricCurrentStatusList(in *CustomMetricCurrentStatusList, out *extensions.CustomMetricCurrentStatusList, s conversion.Scope) error {
+ return autoConvert_v1beta1_CustomMetricCurrentStatusList_To_extensions_CustomMetricCurrentStatusList(in, out, s)
+}
+
+func autoConvert_extensions_CustomMetricCurrentStatusList_To_v1beta1_CustomMetricCurrentStatusList(in *extensions.CustomMetricCurrentStatusList, out *CustomMetricCurrentStatusList, s conversion.Scope) error {
+ if in.Items == nil {
+ out.Items = make([]CustomMetricCurrentStatus, 0)
+ } else {
+ out.Items = *(*[]CustomMetricCurrentStatus)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_extensions_CustomMetricCurrentStatusList_To_v1beta1_CustomMetricCurrentStatusList is an autogenerated conversion function.
+func Convert_extensions_CustomMetricCurrentStatusList_To_v1beta1_CustomMetricCurrentStatusList(in *extensions.CustomMetricCurrentStatusList, out *CustomMetricCurrentStatusList, s conversion.Scope) error {
+ return autoConvert_extensions_CustomMetricCurrentStatusList_To_v1beta1_CustomMetricCurrentStatusList(in, out, s)
+}
+
+func autoConvert_v1beta1_CustomMetricTarget_To_extensions_CustomMetricTarget(in *CustomMetricTarget, out *extensions.CustomMetricTarget, s conversion.Scope) error {
+ out.Name = in.Name
+ out.TargetValue = in.TargetValue
+ return nil
+}
+
+// Convert_v1beta1_CustomMetricTarget_To_extensions_CustomMetricTarget is an autogenerated conversion function.
+func Convert_v1beta1_CustomMetricTarget_To_extensions_CustomMetricTarget(in *CustomMetricTarget, out *extensions.CustomMetricTarget, s conversion.Scope) error {
+ return autoConvert_v1beta1_CustomMetricTarget_To_extensions_CustomMetricTarget(in, out, s)
+}
+
+func autoConvert_extensions_CustomMetricTarget_To_v1beta1_CustomMetricTarget(in *extensions.CustomMetricTarget, out *CustomMetricTarget, s conversion.Scope) error {
+ out.Name = in.Name
+ out.TargetValue = in.TargetValue
+ return nil
+}
+
+// Convert_extensions_CustomMetricTarget_To_v1beta1_CustomMetricTarget is an autogenerated conversion function.
+func Convert_extensions_CustomMetricTarget_To_v1beta1_CustomMetricTarget(in *extensions.CustomMetricTarget, out *CustomMetricTarget, s conversion.Scope) error {
+ return autoConvert_extensions_CustomMetricTarget_To_v1beta1_CustomMetricTarget(in, out, s)
+}
+
+func autoConvert_v1beta1_CustomMetricTargetList_To_extensions_CustomMetricTargetList(in *CustomMetricTargetList, out *extensions.CustomMetricTargetList, s conversion.Scope) error {
+ out.Items = *(*[]extensions.CustomMetricTarget)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1beta1_CustomMetricTargetList_To_extensions_CustomMetricTargetList is an autogenerated conversion function.
+func Convert_v1beta1_CustomMetricTargetList_To_extensions_CustomMetricTargetList(in *CustomMetricTargetList, out *extensions.CustomMetricTargetList, s conversion.Scope) error {
+ return autoConvert_v1beta1_CustomMetricTargetList_To_extensions_CustomMetricTargetList(in, out, s)
+}
+
+func autoConvert_extensions_CustomMetricTargetList_To_v1beta1_CustomMetricTargetList(in *extensions.CustomMetricTargetList, out *CustomMetricTargetList, s conversion.Scope) error {
+ if in.Items == nil {
+ out.Items = make([]CustomMetricTarget, 0)
+ } else {
+ out.Items = *(*[]CustomMetricTarget)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_extensions_CustomMetricTargetList_To_v1beta1_CustomMetricTargetList is an autogenerated conversion function.
+func Convert_extensions_CustomMetricTargetList_To_v1beta1_CustomMetricTargetList(in *extensions.CustomMetricTargetList, out *CustomMetricTargetList, s conversion.Scope) error {
+ return autoConvert_extensions_CustomMetricTargetList_To_v1beta1_CustomMetricTargetList(in, out, s)
+}
+
+func autoConvert_v1beta1_DaemonSet_To_extensions_DaemonSet(in *DaemonSet, out *extensions.DaemonSet, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1beta1_DaemonSetSpec_To_extensions_DaemonSetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_DaemonSetStatus_To_extensions_DaemonSetStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_DaemonSet_To_extensions_DaemonSet is an autogenerated conversion function.
+func Convert_v1beta1_DaemonSet_To_extensions_DaemonSet(in *DaemonSet, out *extensions.DaemonSet, s conversion.Scope) error {
+ return autoConvert_v1beta1_DaemonSet_To_extensions_DaemonSet(in, out, s)
+}
+
+func autoConvert_extensions_DaemonSet_To_v1beta1_DaemonSet(in *extensions.DaemonSet, out *DaemonSet, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_extensions_DaemonSetSpec_To_v1beta1_DaemonSetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_extensions_DaemonSetStatus_To_v1beta1_DaemonSetStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_extensions_DaemonSet_To_v1beta1_DaemonSet is an autogenerated conversion function.
+func Convert_extensions_DaemonSet_To_v1beta1_DaemonSet(in *extensions.DaemonSet, out *DaemonSet, s conversion.Scope) error {
+ return autoConvert_extensions_DaemonSet_To_v1beta1_DaemonSet(in, out, s)
+}
+
+func autoConvert_v1beta1_DaemonSetList_To_extensions_DaemonSetList(in *DaemonSetList, out *extensions.DaemonSetList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]extensions.DaemonSet, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_DaemonSet_To_extensions_DaemonSet(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1beta1_DaemonSetList_To_extensions_DaemonSetList is an autogenerated conversion function.
+func Convert_v1beta1_DaemonSetList_To_extensions_DaemonSetList(in *DaemonSetList, out *extensions.DaemonSetList, s conversion.Scope) error {
+ return autoConvert_v1beta1_DaemonSetList_To_extensions_DaemonSetList(in, out, s)
+}
+
+func autoConvert_extensions_DaemonSetList_To_v1beta1_DaemonSetList(in *extensions.DaemonSetList, out *DaemonSetList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]DaemonSet, len(*in))
+ for i := range *in {
+ if err := Convert_extensions_DaemonSet_To_v1beta1_DaemonSet(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]DaemonSet, 0)
+ }
+ return nil
+}
+
+// Convert_extensions_DaemonSetList_To_v1beta1_DaemonSetList is an autogenerated conversion function.
+func Convert_extensions_DaemonSetList_To_v1beta1_DaemonSetList(in *extensions.DaemonSetList, out *DaemonSetList, s conversion.Scope) error {
+ return autoConvert_extensions_DaemonSetList_To_v1beta1_DaemonSetList(in, out, s)
+}
+
+func autoConvert_v1beta1_DaemonSetSpec_To_extensions_DaemonSetSpec(in *DaemonSetSpec, out *extensions.DaemonSetSpec, s conversion.Scope) error {
+ out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector))
+ if err := api_v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_DaemonSetUpdateStrategy_To_extensions_DaemonSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, s); err != nil {
+ return err
+ }
+ out.MinReadySeconds = in.MinReadySeconds
+ out.TemplateGeneration = in.TemplateGeneration
+ out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit))
+ return nil
+}
+
+// Convert_v1beta1_DaemonSetSpec_To_extensions_DaemonSetSpec is an autogenerated conversion function.
+func Convert_v1beta1_DaemonSetSpec_To_extensions_DaemonSetSpec(in *DaemonSetSpec, out *extensions.DaemonSetSpec, s conversion.Scope) error {
+ return autoConvert_v1beta1_DaemonSetSpec_To_extensions_DaemonSetSpec(in, out, s)
+}
+
+func autoConvert_extensions_DaemonSetSpec_To_v1beta1_DaemonSetSpec(in *extensions.DaemonSetSpec, out *DaemonSetSpec, s conversion.Scope) error {
+ out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector))
+ if err := api_v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ if err := Convert_extensions_DaemonSetUpdateStrategy_To_v1beta1_DaemonSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, s); err != nil {
+ return err
+ }
+ out.MinReadySeconds = in.MinReadySeconds
+ out.TemplateGeneration = in.TemplateGeneration
+ out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit))
+ return nil
+}
+
+// Convert_extensions_DaemonSetSpec_To_v1beta1_DaemonSetSpec is an autogenerated conversion function.
+func Convert_extensions_DaemonSetSpec_To_v1beta1_DaemonSetSpec(in *extensions.DaemonSetSpec, out *DaemonSetSpec, s conversion.Scope) error {
+ return autoConvert_extensions_DaemonSetSpec_To_v1beta1_DaemonSetSpec(in, out, s)
+}
+
+func autoConvert_v1beta1_DaemonSetStatus_To_extensions_DaemonSetStatus(in *DaemonSetStatus, out *extensions.DaemonSetStatus, s conversion.Scope) error {
+ out.CurrentNumberScheduled = in.CurrentNumberScheduled
+ out.NumberMisscheduled = in.NumberMisscheduled
+ out.DesiredNumberScheduled = in.DesiredNumberScheduled
+ out.NumberReady = in.NumberReady
+ out.ObservedGeneration = in.ObservedGeneration
+ out.UpdatedNumberScheduled = in.UpdatedNumberScheduled
+ out.NumberAvailable = in.NumberAvailable
+ out.NumberUnavailable = in.NumberUnavailable
+ out.CollisionCount = (*int64)(unsafe.Pointer(in.CollisionCount))
+ return nil
+}
+
+// Convert_v1beta1_DaemonSetStatus_To_extensions_DaemonSetStatus is an autogenerated conversion function.
+func Convert_v1beta1_DaemonSetStatus_To_extensions_DaemonSetStatus(in *DaemonSetStatus, out *extensions.DaemonSetStatus, s conversion.Scope) error {
+ return autoConvert_v1beta1_DaemonSetStatus_To_extensions_DaemonSetStatus(in, out, s)
+}
+
+func autoConvert_extensions_DaemonSetStatus_To_v1beta1_DaemonSetStatus(in *extensions.DaemonSetStatus, out *DaemonSetStatus, s conversion.Scope) error {
+ out.CurrentNumberScheduled = in.CurrentNumberScheduled
+ out.NumberMisscheduled = in.NumberMisscheduled
+ out.DesiredNumberScheduled = in.DesiredNumberScheduled
+ out.NumberReady = in.NumberReady
+ out.ObservedGeneration = in.ObservedGeneration
+ out.UpdatedNumberScheduled = in.UpdatedNumberScheduled
+ out.NumberAvailable = in.NumberAvailable
+ out.NumberUnavailable = in.NumberUnavailable
+ out.CollisionCount = (*int64)(unsafe.Pointer(in.CollisionCount))
+ return nil
+}
+
+// Convert_extensions_DaemonSetStatus_To_v1beta1_DaemonSetStatus is an autogenerated conversion function.
+func Convert_extensions_DaemonSetStatus_To_v1beta1_DaemonSetStatus(in *extensions.DaemonSetStatus, out *DaemonSetStatus, s conversion.Scope) error {
+ return autoConvert_extensions_DaemonSetStatus_To_v1beta1_DaemonSetStatus(in, out, s)
+}
+
+func autoConvert_v1beta1_DaemonSetUpdateStrategy_To_extensions_DaemonSetUpdateStrategy(in *DaemonSetUpdateStrategy, out *extensions.DaemonSetUpdateStrategy, s conversion.Scope) error {
+ out.Type = extensions.DaemonSetUpdateStrategyType(in.Type)
+ if in.RollingUpdate != nil {
+ in, out := &in.RollingUpdate, &out.RollingUpdate
+ *out = new(extensions.RollingUpdateDaemonSet)
+ if err := Convert_v1beta1_RollingUpdateDaemonSet_To_extensions_RollingUpdateDaemonSet(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.RollingUpdate = nil
+ }
+ return nil
+}
+
+// Convert_v1beta1_DaemonSetUpdateStrategy_To_extensions_DaemonSetUpdateStrategy is an autogenerated conversion function.
+func Convert_v1beta1_DaemonSetUpdateStrategy_To_extensions_DaemonSetUpdateStrategy(in *DaemonSetUpdateStrategy, out *extensions.DaemonSetUpdateStrategy, s conversion.Scope) error {
+ return autoConvert_v1beta1_DaemonSetUpdateStrategy_To_extensions_DaemonSetUpdateStrategy(in, out, s)
+}
+
+func autoConvert_extensions_DaemonSetUpdateStrategy_To_v1beta1_DaemonSetUpdateStrategy(in *extensions.DaemonSetUpdateStrategy, out *DaemonSetUpdateStrategy, s conversion.Scope) error {
+ out.Type = DaemonSetUpdateStrategyType(in.Type)
+ if in.RollingUpdate != nil {
+ in, out := &in.RollingUpdate, &out.RollingUpdate
+ *out = new(RollingUpdateDaemonSet)
+ if err := Convert_extensions_RollingUpdateDaemonSet_To_v1beta1_RollingUpdateDaemonSet(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.RollingUpdate = nil
+ }
+ return nil
+}
+
+// Convert_extensions_DaemonSetUpdateStrategy_To_v1beta1_DaemonSetUpdateStrategy is an autogenerated conversion function.
+func Convert_extensions_DaemonSetUpdateStrategy_To_v1beta1_DaemonSetUpdateStrategy(in *extensions.DaemonSetUpdateStrategy, out *DaemonSetUpdateStrategy, s conversion.Scope) error {
+ return autoConvert_extensions_DaemonSetUpdateStrategy_To_v1beta1_DaemonSetUpdateStrategy(in, out, s)
+}
+
+func autoConvert_v1beta1_Deployment_To_extensions_Deployment(in *Deployment, out *extensions.Deployment, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_DeploymentStatus_To_extensions_DeploymentStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_Deployment_To_extensions_Deployment is an autogenerated conversion function.
+func Convert_v1beta1_Deployment_To_extensions_Deployment(in *Deployment, out *extensions.Deployment, s conversion.Scope) error {
+ return autoConvert_v1beta1_Deployment_To_extensions_Deployment(in, out, s)
+}
+
+func autoConvert_extensions_Deployment_To_v1beta1_Deployment(in *extensions.Deployment, out *Deployment, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_extensions_DeploymentSpec_To_v1beta1_DeploymentSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_extensions_DeploymentStatus_To_v1beta1_DeploymentStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_extensions_Deployment_To_v1beta1_Deployment is an autogenerated conversion function.
+func Convert_extensions_Deployment_To_v1beta1_Deployment(in *extensions.Deployment, out *Deployment, s conversion.Scope) error {
+ return autoConvert_extensions_Deployment_To_v1beta1_Deployment(in, out, s)
+}
+
+func autoConvert_v1beta1_DeploymentCondition_To_extensions_DeploymentCondition(in *DeploymentCondition, out *extensions.DeploymentCondition, s conversion.Scope) error {
+ out.Type = extensions.DeploymentConditionType(in.Type)
+ out.Status = api.ConditionStatus(in.Status)
+ out.LastUpdateTime = in.LastUpdateTime
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_v1beta1_DeploymentCondition_To_extensions_DeploymentCondition is an autogenerated conversion function.
+func Convert_v1beta1_DeploymentCondition_To_extensions_DeploymentCondition(in *DeploymentCondition, out *extensions.DeploymentCondition, s conversion.Scope) error {
+ return autoConvert_v1beta1_DeploymentCondition_To_extensions_DeploymentCondition(in, out, s)
+}
+
+func autoConvert_extensions_DeploymentCondition_To_v1beta1_DeploymentCondition(in *extensions.DeploymentCondition, out *DeploymentCondition, s conversion.Scope) error {
+ out.Type = DeploymentConditionType(in.Type)
+ out.Status = api_v1.ConditionStatus(in.Status)
+ out.LastUpdateTime = in.LastUpdateTime
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_extensions_DeploymentCondition_To_v1beta1_DeploymentCondition is an autogenerated conversion function.
+func Convert_extensions_DeploymentCondition_To_v1beta1_DeploymentCondition(in *extensions.DeploymentCondition, out *DeploymentCondition, s conversion.Scope) error {
+ return autoConvert_extensions_DeploymentCondition_To_v1beta1_DeploymentCondition(in, out, s)
+}
+
+func autoConvert_v1beta1_DeploymentList_To_extensions_DeploymentList(in *DeploymentList, out *extensions.DeploymentList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]extensions.Deployment, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_Deployment_To_extensions_Deployment(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1beta1_DeploymentList_To_extensions_DeploymentList is an autogenerated conversion function.
+func Convert_v1beta1_DeploymentList_To_extensions_DeploymentList(in *DeploymentList, out *extensions.DeploymentList, s conversion.Scope) error {
+ return autoConvert_v1beta1_DeploymentList_To_extensions_DeploymentList(in, out, s)
+}
+
+func autoConvert_extensions_DeploymentList_To_v1beta1_DeploymentList(in *extensions.DeploymentList, out *DeploymentList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Deployment, len(*in))
+ for i := range *in {
+ if err := Convert_extensions_Deployment_To_v1beta1_Deployment(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]Deployment, 0)
+ }
+ return nil
+}
+
+// Convert_extensions_DeploymentList_To_v1beta1_DeploymentList is an autogenerated conversion function.
+func Convert_extensions_DeploymentList_To_v1beta1_DeploymentList(in *extensions.DeploymentList, out *DeploymentList, s conversion.Scope) error {
+ return autoConvert_extensions_DeploymentList_To_v1beta1_DeploymentList(in, out, s)
+}
+
+func autoConvert_v1beta1_DeploymentRollback_To_extensions_DeploymentRollback(in *DeploymentRollback, out *extensions.DeploymentRollback, s conversion.Scope) error {
+ out.Name = in.Name
+ out.UpdatedAnnotations = *(*map[string]string)(unsafe.Pointer(&in.UpdatedAnnotations))
+ if err := Convert_v1beta1_RollbackConfig_To_extensions_RollbackConfig(&in.RollbackTo, &out.RollbackTo, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_DeploymentRollback_To_extensions_DeploymentRollback is an autogenerated conversion function.
+func Convert_v1beta1_DeploymentRollback_To_extensions_DeploymentRollback(in *DeploymentRollback, out *extensions.DeploymentRollback, s conversion.Scope) error {
+ return autoConvert_v1beta1_DeploymentRollback_To_extensions_DeploymentRollback(in, out, s)
+}
+
+func autoConvert_extensions_DeploymentRollback_To_v1beta1_DeploymentRollback(in *extensions.DeploymentRollback, out *DeploymentRollback, s conversion.Scope) error {
+ out.Name = in.Name
+ out.UpdatedAnnotations = *(*map[string]string)(unsafe.Pointer(&in.UpdatedAnnotations))
+ if err := Convert_extensions_RollbackConfig_To_v1beta1_RollbackConfig(&in.RollbackTo, &out.RollbackTo, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_extensions_DeploymentRollback_To_v1beta1_DeploymentRollback is an autogenerated conversion function.
+func Convert_extensions_DeploymentRollback_To_v1beta1_DeploymentRollback(in *extensions.DeploymentRollback, out *DeploymentRollback, s conversion.Scope) error {
+ return autoConvert_extensions_DeploymentRollback_To_v1beta1_DeploymentRollback(in, out, s)
+}
+
+func autoConvert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec(in *DeploymentSpec, out *extensions.DeploymentSpec, s conversion.Scope) error {
+ if err := v1.Convert_Pointer_int32_To_int32(&in.Replicas, &out.Replicas, s); err != nil {
+ return err
+ }
+ out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector))
+ if err := api_v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy(&in.Strategy, &out.Strategy, s); err != nil {
+ return err
+ }
+ out.MinReadySeconds = in.MinReadySeconds
+ out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit))
+ out.Paused = in.Paused
+ out.RollbackTo = (*extensions.RollbackConfig)(unsafe.Pointer(in.RollbackTo))
+ out.ProgressDeadlineSeconds = (*int32)(unsafe.Pointer(in.ProgressDeadlineSeconds))
+ return nil
+}
+
+func autoConvert_extensions_DeploymentSpec_To_v1beta1_DeploymentSpec(in *extensions.DeploymentSpec, out *DeploymentSpec, s conversion.Scope) error {
+ if err := v1.Convert_int32_To_Pointer_int32(&in.Replicas, &out.Replicas, s); err != nil {
+ return err
+ }
+ out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector))
+ if err := api_v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ if err := Convert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy(&in.Strategy, &out.Strategy, s); err != nil {
+ return err
+ }
+ out.MinReadySeconds = in.MinReadySeconds
+ out.RevisionHistoryLimit = (*int32)(unsafe.Pointer(in.RevisionHistoryLimit))
+ out.Paused = in.Paused
+ out.RollbackTo = (*RollbackConfig)(unsafe.Pointer(in.RollbackTo))
+ out.ProgressDeadlineSeconds = (*int32)(unsafe.Pointer(in.ProgressDeadlineSeconds))
+ return nil
+}
+
+func autoConvert_v1beta1_DeploymentStatus_To_extensions_DeploymentStatus(in *DeploymentStatus, out *extensions.DeploymentStatus, s conversion.Scope) error {
+ out.ObservedGeneration = in.ObservedGeneration
+ out.Replicas = in.Replicas
+ out.UpdatedReplicas = in.UpdatedReplicas
+ out.ReadyReplicas = in.ReadyReplicas
+ out.AvailableReplicas = in.AvailableReplicas
+ out.UnavailableReplicas = in.UnavailableReplicas
+ out.Conditions = *(*[]extensions.DeploymentCondition)(unsafe.Pointer(&in.Conditions))
+ out.CollisionCount = (*int64)(unsafe.Pointer(in.CollisionCount))
+ return nil
+}
+
+// Convert_v1beta1_DeploymentStatus_To_extensions_DeploymentStatus is an autogenerated conversion function.
+func Convert_v1beta1_DeploymentStatus_To_extensions_DeploymentStatus(in *DeploymentStatus, out *extensions.DeploymentStatus, s conversion.Scope) error {
+ return autoConvert_v1beta1_DeploymentStatus_To_extensions_DeploymentStatus(in, out, s)
+}
+
+func autoConvert_extensions_DeploymentStatus_To_v1beta1_DeploymentStatus(in *extensions.DeploymentStatus, out *DeploymentStatus, s conversion.Scope) error {
+ out.ObservedGeneration = in.ObservedGeneration
+ out.Replicas = in.Replicas
+ out.UpdatedReplicas = in.UpdatedReplicas
+ out.ReadyReplicas = in.ReadyReplicas
+ out.AvailableReplicas = in.AvailableReplicas
+ out.UnavailableReplicas = in.UnavailableReplicas
+ out.Conditions = *(*[]DeploymentCondition)(unsafe.Pointer(&in.Conditions))
+ out.CollisionCount = (*int64)(unsafe.Pointer(in.CollisionCount))
+ return nil
+}
+
+// Convert_extensions_DeploymentStatus_To_v1beta1_DeploymentStatus is an autogenerated conversion function.
+func Convert_extensions_DeploymentStatus_To_v1beta1_DeploymentStatus(in *extensions.DeploymentStatus, out *DeploymentStatus, s conversion.Scope) error {
+ return autoConvert_extensions_DeploymentStatus_To_v1beta1_DeploymentStatus(in, out, s)
+}
+
+func autoConvert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy(in *DeploymentStrategy, out *extensions.DeploymentStrategy, s conversion.Scope) error {
+ out.Type = extensions.DeploymentStrategyType(in.Type)
+ if in.RollingUpdate != nil {
+ in, out := &in.RollingUpdate, &out.RollingUpdate
+ *out = new(extensions.RollingUpdateDeployment)
+ if err := Convert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDeployment(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.RollingUpdate = nil
+ }
+ return nil
+}
+
+func autoConvert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy(in *extensions.DeploymentStrategy, out *DeploymentStrategy, s conversion.Scope) error {
+ out.Type = DeploymentStrategyType(in.Type)
+ if in.RollingUpdate != nil {
+ in, out := &in.RollingUpdate, &out.RollingUpdate
+ *out = new(RollingUpdateDeployment)
+ if err := Convert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDeployment(*in, *out, s); err != nil {
+ return err
+ }
+ } else {
+ out.RollingUpdate = nil
+ }
+ return nil
+}
+
+func autoConvert_v1beta1_FSGroupStrategyOptions_To_extensions_FSGroupStrategyOptions(in *FSGroupStrategyOptions, out *extensions.FSGroupStrategyOptions, s conversion.Scope) error {
+ out.Rule = extensions.FSGroupStrategyType(in.Rule)
+ out.Ranges = *(*[]extensions.GroupIDRange)(unsafe.Pointer(&in.Ranges))
+ return nil
+}
+
+// Convert_v1beta1_FSGroupStrategyOptions_To_extensions_FSGroupStrategyOptions is an autogenerated conversion function.
+func Convert_v1beta1_FSGroupStrategyOptions_To_extensions_FSGroupStrategyOptions(in *FSGroupStrategyOptions, out *extensions.FSGroupStrategyOptions, s conversion.Scope) error {
+ return autoConvert_v1beta1_FSGroupStrategyOptions_To_extensions_FSGroupStrategyOptions(in, out, s)
+}
+
+func autoConvert_extensions_FSGroupStrategyOptions_To_v1beta1_FSGroupStrategyOptions(in *extensions.FSGroupStrategyOptions, out *FSGroupStrategyOptions, s conversion.Scope) error {
+ out.Rule = FSGroupStrategyType(in.Rule)
+ out.Ranges = *(*[]IDRange)(unsafe.Pointer(&in.Ranges))
+ return nil
+}
+
+// Convert_extensions_FSGroupStrategyOptions_To_v1beta1_FSGroupStrategyOptions is an autogenerated conversion function.
+func Convert_extensions_FSGroupStrategyOptions_To_v1beta1_FSGroupStrategyOptions(in *extensions.FSGroupStrategyOptions, out *FSGroupStrategyOptions, s conversion.Scope) error {
+ return autoConvert_extensions_FSGroupStrategyOptions_To_v1beta1_FSGroupStrategyOptions(in, out, s)
+}
+
+func autoConvert_v1beta1_HTTPIngressPath_To_extensions_HTTPIngressPath(in *HTTPIngressPath, out *extensions.HTTPIngressPath, s conversion.Scope) error {
+ out.Path = in.Path
+ if err := Convert_v1beta1_IngressBackend_To_extensions_IngressBackend(&in.Backend, &out.Backend, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_HTTPIngressPath_To_extensions_HTTPIngressPath is an autogenerated conversion function.
+func Convert_v1beta1_HTTPIngressPath_To_extensions_HTTPIngressPath(in *HTTPIngressPath, out *extensions.HTTPIngressPath, s conversion.Scope) error {
+ return autoConvert_v1beta1_HTTPIngressPath_To_extensions_HTTPIngressPath(in, out, s)
+}
+
+func autoConvert_extensions_HTTPIngressPath_To_v1beta1_HTTPIngressPath(in *extensions.HTTPIngressPath, out *HTTPIngressPath, s conversion.Scope) error {
+ out.Path = in.Path
+ if err := Convert_extensions_IngressBackend_To_v1beta1_IngressBackend(&in.Backend, &out.Backend, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_extensions_HTTPIngressPath_To_v1beta1_HTTPIngressPath is an autogenerated conversion function.
+func Convert_extensions_HTTPIngressPath_To_v1beta1_HTTPIngressPath(in *extensions.HTTPIngressPath, out *HTTPIngressPath, s conversion.Scope) error {
+ return autoConvert_extensions_HTTPIngressPath_To_v1beta1_HTTPIngressPath(in, out, s)
+}
+
+func autoConvert_v1beta1_HTTPIngressRuleValue_To_extensions_HTTPIngressRuleValue(in *HTTPIngressRuleValue, out *extensions.HTTPIngressRuleValue, s conversion.Scope) error {
+ out.Paths = *(*[]extensions.HTTPIngressPath)(unsafe.Pointer(&in.Paths))
+ return nil
+}
+
+// Convert_v1beta1_HTTPIngressRuleValue_To_extensions_HTTPIngressRuleValue is an autogenerated conversion function.
+func Convert_v1beta1_HTTPIngressRuleValue_To_extensions_HTTPIngressRuleValue(in *HTTPIngressRuleValue, out *extensions.HTTPIngressRuleValue, s conversion.Scope) error {
+ return autoConvert_v1beta1_HTTPIngressRuleValue_To_extensions_HTTPIngressRuleValue(in, out, s)
+}
+
+func autoConvert_extensions_HTTPIngressRuleValue_To_v1beta1_HTTPIngressRuleValue(in *extensions.HTTPIngressRuleValue, out *HTTPIngressRuleValue, s conversion.Scope) error {
+ if in.Paths == nil {
+ out.Paths = make([]HTTPIngressPath, 0)
+ } else {
+ out.Paths = *(*[]HTTPIngressPath)(unsafe.Pointer(&in.Paths))
+ }
+ return nil
+}
+
+// Convert_extensions_HTTPIngressRuleValue_To_v1beta1_HTTPIngressRuleValue is an autogenerated conversion function.
+func Convert_extensions_HTTPIngressRuleValue_To_v1beta1_HTTPIngressRuleValue(in *extensions.HTTPIngressRuleValue, out *HTTPIngressRuleValue, s conversion.Scope) error {
+ return autoConvert_extensions_HTTPIngressRuleValue_To_v1beta1_HTTPIngressRuleValue(in, out, s)
+}
+
+func autoConvert_v1beta1_HostPortRange_To_extensions_HostPortRange(in *HostPortRange, out *extensions.HostPortRange, s conversion.Scope) error {
+ out.Min = int(in.Min)
+ out.Max = int(in.Max)
+ return nil
+}
+
+// Convert_v1beta1_HostPortRange_To_extensions_HostPortRange is an autogenerated conversion function.
+func Convert_v1beta1_HostPortRange_To_extensions_HostPortRange(in *HostPortRange, out *extensions.HostPortRange, s conversion.Scope) error {
+ return autoConvert_v1beta1_HostPortRange_To_extensions_HostPortRange(in, out, s)
+}
+
+func autoConvert_extensions_HostPortRange_To_v1beta1_HostPortRange(in *extensions.HostPortRange, out *HostPortRange, s conversion.Scope) error {
+ out.Min = int32(in.Min)
+ out.Max = int32(in.Max)
+ return nil
+}
+
+// Convert_extensions_HostPortRange_To_v1beta1_HostPortRange is an autogenerated conversion function.
+func Convert_extensions_HostPortRange_To_v1beta1_HostPortRange(in *extensions.HostPortRange, out *HostPortRange, s conversion.Scope) error {
+ return autoConvert_extensions_HostPortRange_To_v1beta1_HostPortRange(in, out, s)
+}
+
+func autoConvert_v1beta1_Ingress_To_extensions_Ingress(in *Ingress, out *extensions.Ingress, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1beta1_IngressSpec_To_extensions_IngressSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_IngressStatus_To_extensions_IngressStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_Ingress_To_extensions_Ingress is an autogenerated conversion function.
+func Convert_v1beta1_Ingress_To_extensions_Ingress(in *Ingress, out *extensions.Ingress, s conversion.Scope) error {
+ return autoConvert_v1beta1_Ingress_To_extensions_Ingress(in, out, s)
+}
+
+func autoConvert_extensions_Ingress_To_v1beta1_Ingress(in *extensions.Ingress, out *Ingress, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_extensions_IngressSpec_To_v1beta1_IngressSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_extensions_IngressStatus_To_v1beta1_IngressStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_extensions_Ingress_To_v1beta1_Ingress is an autogenerated conversion function.
+func Convert_extensions_Ingress_To_v1beta1_Ingress(in *extensions.Ingress, out *Ingress, s conversion.Scope) error {
+ return autoConvert_extensions_Ingress_To_v1beta1_Ingress(in, out, s)
+}
+
+func autoConvert_v1beta1_IngressBackend_To_extensions_IngressBackend(in *IngressBackend, out *extensions.IngressBackend, s conversion.Scope) error {
+ out.ServiceName = in.ServiceName
+ out.ServicePort = in.ServicePort
+ return nil
+}
+
+// Convert_v1beta1_IngressBackend_To_extensions_IngressBackend is an autogenerated conversion function.
+func Convert_v1beta1_IngressBackend_To_extensions_IngressBackend(in *IngressBackend, out *extensions.IngressBackend, s conversion.Scope) error {
+ return autoConvert_v1beta1_IngressBackend_To_extensions_IngressBackend(in, out, s)
+}
+
+func autoConvert_extensions_IngressBackend_To_v1beta1_IngressBackend(in *extensions.IngressBackend, out *IngressBackend, s conversion.Scope) error {
+ out.ServiceName = in.ServiceName
+ out.ServicePort = in.ServicePort
+ return nil
+}
+
+// Convert_extensions_IngressBackend_To_v1beta1_IngressBackend is an autogenerated conversion function.
+func Convert_extensions_IngressBackend_To_v1beta1_IngressBackend(in *extensions.IngressBackend, out *IngressBackend, s conversion.Scope) error {
+ return autoConvert_extensions_IngressBackend_To_v1beta1_IngressBackend(in, out, s)
+}
+
+func autoConvert_v1beta1_IngressList_To_extensions_IngressList(in *IngressList, out *extensions.IngressList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]extensions.Ingress)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1beta1_IngressList_To_extensions_IngressList is an autogenerated conversion function.
+func Convert_v1beta1_IngressList_To_extensions_IngressList(in *IngressList, out *extensions.IngressList, s conversion.Scope) error {
+ return autoConvert_v1beta1_IngressList_To_extensions_IngressList(in, out, s)
+}
+
+func autoConvert_extensions_IngressList_To_v1beta1_IngressList(in *extensions.IngressList, out *IngressList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]Ingress, 0)
+ } else {
+ out.Items = *(*[]Ingress)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_extensions_IngressList_To_v1beta1_IngressList is an autogenerated conversion function.
+func Convert_extensions_IngressList_To_v1beta1_IngressList(in *extensions.IngressList, out *IngressList, s conversion.Scope) error {
+ return autoConvert_extensions_IngressList_To_v1beta1_IngressList(in, out, s)
+}
+
+func autoConvert_v1beta1_IngressRule_To_extensions_IngressRule(in *IngressRule, out *extensions.IngressRule, s conversion.Scope) error {
+ out.Host = in.Host
+ if err := Convert_v1beta1_IngressRuleValue_To_extensions_IngressRuleValue(&in.IngressRuleValue, &out.IngressRuleValue, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_IngressRule_To_extensions_IngressRule is an autogenerated conversion function.
+func Convert_v1beta1_IngressRule_To_extensions_IngressRule(in *IngressRule, out *extensions.IngressRule, s conversion.Scope) error {
+ return autoConvert_v1beta1_IngressRule_To_extensions_IngressRule(in, out, s)
+}
+
+func autoConvert_extensions_IngressRule_To_v1beta1_IngressRule(in *extensions.IngressRule, out *IngressRule, s conversion.Scope) error {
+ out.Host = in.Host
+ if err := Convert_extensions_IngressRuleValue_To_v1beta1_IngressRuleValue(&in.IngressRuleValue, &out.IngressRuleValue, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_extensions_IngressRule_To_v1beta1_IngressRule is an autogenerated conversion function.
+func Convert_extensions_IngressRule_To_v1beta1_IngressRule(in *extensions.IngressRule, out *IngressRule, s conversion.Scope) error {
+ return autoConvert_extensions_IngressRule_To_v1beta1_IngressRule(in, out, s)
+}
+
+func autoConvert_v1beta1_IngressRuleValue_To_extensions_IngressRuleValue(in *IngressRuleValue, out *extensions.IngressRuleValue, s conversion.Scope) error {
+ out.HTTP = (*extensions.HTTPIngressRuleValue)(unsafe.Pointer(in.HTTP))
+ return nil
+}
+
+// Convert_v1beta1_IngressRuleValue_To_extensions_IngressRuleValue is an autogenerated conversion function.
+func Convert_v1beta1_IngressRuleValue_To_extensions_IngressRuleValue(in *IngressRuleValue, out *extensions.IngressRuleValue, s conversion.Scope) error {
+ return autoConvert_v1beta1_IngressRuleValue_To_extensions_IngressRuleValue(in, out, s)
+}
+
+func autoConvert_extensions_IngressRuleValue_To_v1beta1_IngressRuleValue(in *extensions.IngressRuleValue, out *IngressRuleValue, s conversion.Scope) error {
+ out.HTTP = (*HTTPIngressRuleValue)(unsafe.Pointer(in.HTTP))
+ return nil
+}
+
+// Convert_extensions_IngressRuleValue_To_v1beta1_IngressRuleValue is an autogenerated conversion function.
+func Convert_extensions_IngressRuleValue_To_v1beta1_IngressRuleValue(in *extensions.IngressRuleValue, out *IngressRuleValue, s conversion.Scope) error {
+ return autoConvert_extensions_IngressRuleValue_To_v1beta1_IngressRuleValue(in, out, s)
+}
+
+func autoConvert_v1beta1_IngressSpec_To_extensions_IngressSpec(in *IngressSpec, out *extensions.IngressSpec, s conversion.Scope) error {
+ out.Backend = (*extensions.IngressBackend)(unsafe.Pointer(in.Backend))
+ out.TLS = *(*[]extensions.IngressTLS)(unsafe.Pointer(&in.TLS))
+ out.Rules = *(*[]extensions.IngressRule)(unsafe.Pointer(&in.Rules))
+ return nil
+}
+
+// Convert_v1beta1_IngressSpec_To_extensions_IngressSpec is an autogenerated conversion function.
+func Convert_v1beta1_IngressSpec_To_extensions_IngressSpec(in *IngressSpec, out *extensions.IngressSpec, s conversion.Scope) error {
+ return autoConvert_v1beta1_IngressSpec_To_extensions_IngressSpec(in, out, s)
+}
+
+func autoConvert_extensions_IngressSpec_To_v1beta1_IngressSpec(in *extensions.IngressSpec, out *IngressSpec, s conversion.Scope) error {
+ out.Backend = (*IngressBackend)(unsafe.Pointer(in.Backend))
+ out.TLS = *(*[]IngressTLS)(unsafe.Pointer(&in.TLS))
+ out.Rules = *(*[]IngressRule)(unsafe.Pointer(&in.Rules))
+ return nil
+}
+
+// Convert_extensions_IngressSpec_To_v1beta1_IngressSpec is an autogenerated conversion function.
+func Convert_extensions_IngressSpec_To_v1beta1_IngressSpec(in *extensions.IngressSpec, out *IngressSpec, s conversion.Scope) error {
+ return autoConvert_extensions_IngressSpec_To_v1beta1_IngressSpec(in, out, s)
+}
+
+func autoConvert_v1beta1_IngressStatus_To_extensions_IngressStatus(in *IngressStatus, out *extensions.IngressStatus, s conversion.Scope) error {
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.LoadBalancer, &out.LoadBalancer, 0); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_IngressStatus_To_extensions_IngressStatus is an autogenerated conversion function.
+func Convert_v1beta1_IngressStatus_To_extensions_IngressStatus(in *IngressStatus, out *extensions.IngressStatus, s conversion.Scope) error {
+ return autoConvert_v1beta1_IngressStatus_To_extensions_IngressStatus(in, out, s)
+}
+
+func autoConvert_extensions_IngressStatus_To_v1beta1_IngressStatus(in *extensions.IngressStatus, out *IngressStatus, s conversion.Scope) error {
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&in.LoadBalancer, &out.LoadBalancer, 0); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_extensions_IngressStatus_To_v1beta1_IngressStatus is an autogenerated conversion function.
+func Convert_extensions_IngressStatus_To_v1beta1_IngressStatus(in *extensions.IngressStatus, out *IngressStatus, s conversion.Scope) error {
+ return autoConvert_extensions_IngressStatus_To_v1beta1_IngressStatus(in, out, s)
+}
+
+func autoConvert_v1beta1_IngressTLS_To_extensions_IngressTLS(in *IngressTLS, out *extensions.IngressTLS, s conversion.Scope) error {
+ out.Hosts = *(*[]string)(unsafe.Pointer(&in.Hosts))
+ out.SecretName = in.SecretName
+ return nil
+}
+
+// Convert_v1beta1_IngressTLS_To_extensions_IngressTLS is an autogenerated conversion function.
+func Convert_v1beta1_IngressTLS_To_extensions_IngressTLS(in *IngressTLS, out *extensions.IngressTLS, s conversion.Scope) error {
+ return autoConvert_v1beta1_IngressTLS_To_extensions_IngressTLS(in, out, s)
+}
+
+func autoConvert_extensions_IngressTLS_To_v1beta1_IngressTLS(in *extensions.IngressTLS, out *IngressTLS, s conversion.Scope) error {
+ out.Hosts = *(*[]string)(unsafe.Pointer(&in.Hosts))
+ out.SecretName = in.SecretName
+ return nil
+}
+
+// Convert_extensions_IngressTLS_To_v1beta1_IngressTLS is an autogenerated conversion function.
+func Convert_extensions_IngressTLS_To_v1beta1_IngressTLS(in *extensions.IngressTLS, out *IngressTLS, s conversion.Scope) error {
+ return autoConvert_extensions_IngressTLS_To_v1beta1_IngressTLS(in, out, s)
+}
+
+func autoConvert_v1beta1_NetworkPolicy_To_extensions_NetworkPolicy(in *NetworkPolicy, out *extensions.NetworkPolicy, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1beta1_NetworkPolicySpec_To_extensions_NetworkPolicySpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_NetworkPolicy_To_extensions_NetworkPolicy is an autogenerated conversion function.
+func Convert_v1beta1_NetworkPolicy_To_extensions_NetworkPolicy(in *NetworkPolicy, out *extensions.NetworkPolicy, s conversion.Scope) error {
+ return autoConvert_v1beta1_NetworkPolicy_To_extensions_NetworkPolicy(in, out, s)
+}
+
+func autoConvert_extensions_NetworkPolicy_To_v1beta1_NetworkPolicy(in *extensions.NetworkPolicy, out *NetworkPolicy, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_extensions_NetworkPolicySpec_To_v1beta1_NetworkPolicySpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_extensions_NetworkPolicy_To_v1beta1_NetworkPolicy is an autogenerated conversion function.
+func Convert_extensions_NetworkPolicy_To_v1beta1_NetworkPolicy(in *extensions.NetworkPolicy, out *NetworkPolicy, s conversion.Scope) error {
+ return autoConvert_extensions_NetworkPolicy_To_v1beta1_NetworkPolicy(in, out, s)
+}
+
+func autoConvert_v1beta1_NetworkPolicyIngressRule_To_extensions_NetworkPolicyIngressRule(in *NetworkPolicyIngressRule, out *extensions.NetworkPolicyIngressRule, s conversion.Scope) error {
+ out.Ports = *(*[]extensions.NetworkPolicyPort)(unsafe.Pointer(&in.Ports))
+ out.From = *(*[]extensions.NetworkPolicyPeer)(unsafe.Pointer(&in.From))
+ return nil
+}
+
+// Convert_v1beta1_NetworkPolicyIngressRule_To_extensions_NetworkPolicyIngressRule is an autogenerated conversion function.
+func Convert_v1beta1_NetworkPolicyIngressRule_To_extensions_NetworkPolicyIngressRule(in *NetworkPolicyIngressRule, out *extensions.NetworkPolicyIngressRule, s conversion.Scope) error {
+ return autoConvert_v1beta1_NetworkPolicyIngressRule_To_extensions_NetworkPolicyIngressRule(in, out, s)
+}
+
+func autoConvert_extensions_NetworkPolicyIngressRule_To_v1beta1_NetworkPolicyIngressRule(in *extensions.NetworkPolicyIngressRule, out *NetworkPolicyIngressRule, s conversion.Scope) error {
+ out.Ports = *(*[]NetworkPolicyPort)(unsafe.Pointer(&in.Ports))
+ out.From = *(*[]NetworkPolicyPeer)(unsafe.Pointer(&in.From))
+ return nil
+}
+
+// Convert_extensions_NetworkPolicyIngressRule_To_v1beta1_NetworkPolicyIngressRule is an autogenerated conversion function.
+func Convert_extensions_NetworkPolicyIngressRule_To_v1beta1_NetworkPolicyIngressRule(in *extensions.NetworkPolicyIngressRule, out *NetworkPolicyIngressRule, s conversion.Scope) error {
+ return autoConvert_extensions_NetworkPolicyIngressRule_To_v1beta1_NetworkPolicyIngressRule(in, out, s)
+}
+
+func autoConvert_v1beta1_NetworkPolicyList_To_extensions_NetworkPolicyList(in *NetworkPolicyList, out *extensions.NetworkPolicyList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]extensions.NetworkPolicy)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1beta1_NetworkPolicyList_To_extensions_NetworkPolicyList is an autogenerated conversion function.
+func Convert_v1beta1_NetworkPolicyList_To_extensions_NetworkPolicyList(in *NetworkPolicyList, out *extensions.NetworkPolicyList, s conversion.Scope) error {
+ return autoConvert_v1beta1_NetworkPolicyList_To_extensions_NetworkPolicyList(in, out, s)
+}
+
+func autoConvert_extensions_NetworkPolicyList_To_v1beta1_NetworkPolicyList(in *extensions.NetworkPolicyList, out *NetworkPolicyList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]NetworkPolicy, 0)
+ } else {
+ out.Items = *(*[]NetworkPolicy)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_extensions_NetworkPolicyList_To_v1beta1_NetworkPolicyList is an autogenerated conversion function.
+func Convert_extensions_NetworkPolicyList_To_v1beta1_NetworkPolicyList(in *extensions.NetworkPolicyList, out *NetworkPolicyList, s conversion.Scope) error {
+ return autoConvert_extensions_NetworkPolicyList_To_v1beta1_NetworkPolicyList(in, out, s)
+}
+
+func autoConvert_v1beta1_NetworkPolicyPeer_To_extensions_NetworkPolicyPeer(in *NetworkPolicyPeer, out *extensions.NetworkPolicyPeer, s conversion.Scope) error {
+ out.PodSelector = (*v1.LabelSelector)(unsafe.Pointer(in.PodSelector))
+ out.NamespaceSelector = (*v1.LabelSelector)(unsafe.Pointer(in.NamespaceSelector))
+ return nil
+}
+
+// Convert_v1beta1_NetworkPolicyPeer_To_extensions_NetworkPolicyPeer is an autogenerated conversion function.
+func Convert_v1beta1_NetworkPolicyPeer_To_extensions_NetworkPolicyPeer(in *NetworkPolicyPeer, out *extensions.NetworkPolicyPeer, s conversion.Scope) error {
+ return autoConvert_v1beta1_NetworkPolicyPeer_To_extensions_NetworkPolicyPeer(in, out, s)
+}
+
+func autoConvert_extensions_NetworkPolicyPeer_To_v1beta1_NetworkPolicyPeer(in *extensions.NetworkPolicyPeer, out *NetworkPolicyPeer, s conversion.Scope) error {
+ out.PodSelector = (*v1.LabelSelector)(unsafe.Pointer(in.PodSelector))
+ out.NamespaceSelector = (*v1.LabelSelector)(unsafe.Pointer(in.NamespaceSelector))
+ return nil
+}
+
+// Convert_extensions_NetworkPolicyPeer_To_v1beta1_NetworkPolicyPeer is an autogenerated conversion function.
+func Convert_extensions_NetworkPolicyPeer_To_v1beta1_NetworkPolicyPeer(in *extensions.NetworkPolicyPeer, out *NetworkPolicyPeer, s conversion.Scope) error {
+ return autoConvert_extensions_NetworkPolicyPeer_To_v1beta1_NetworkPolicyPeer(in, out, s)
+}
+
+func autoConvert_v1beta1_NetworkPolicyPort_To_extensions_NetworkPolicyPort(in *NetworkPolicyPort, out *extensions.NetworkPolicyPort, s conversion.Scope) error {
+ out.Protocol = (*api.Protocol)(unsafe.Pointer(in.Protocol))
+ out.Port = (*intstr.IntOrString)(unsafe.Pointer(in.Port))
+ return nil
+}
+
+// Convert_v1beta1_NetworkPolicyPort_To_extensions_NetworkPolicyPort is an autogenerated conversion function.
+func Convert_v1beta1_NetworkPolicyPort_To_extensions_NetworkPolicyPort(in *NetworkPolicyPort, out *extensions.NetworkPolicyPort, s conversion.Scope) error {
+ return autoConvert_v1beta1_NetworkPolicyPort_To_extensions_NetworkPolicyPort(in, out, s)
+}
+
+func autoConvert_extensions_NetworkPolicyPort_To_v1beta1_NetworkPolicyPort(in *extensions.NetworkPolicyPort, out *NetworkPolicyPort, s conversion.Scope) error {
+ out.Protocol = (*api_v1.Protocol)(unsafe.Pointer(in.Protocol))
+ out.Port = (*intstr.IntOrString)(unsafe.Pointer(in.Port))
+ return nil
+}
+
+// Convert_extensions_NetworkPolicyPort_To_v1beta1_NetworkPolicyPort is an autogenerated conversion function.
+func Convert_extensions_NetworkPolicyPort_To_v1beta1_NetworkPolicyPort(in *extensions.NetworkPolicyPort, out *NetworkPolicyPort, s conversion.Scope) error {
+ return autoConvert_extensions_NetworkPolicyPort_To_v1beta1_NetworkPolicyPort(in, out, s)
+}
+
+func autoConvert_v1beta1_NetworkPolicySpec_To_extensions_NetworkPolicySpec(in *NetworkPolicySpec, out *extensions.NetworkPolicySpec, s conversion.Scope) error {
+ out.PodSelector = in.PodSelector
+ out.Ingress = *(*[]extensions.NetworkPolicyIngressRule)(unsafe.Pointer(&in.Ingress))
+ return nil
+}
+
+// Convert_v1beta1_NetworkPolicySpec_To_extensions_NetworkPolicySpec is an autogenerated conversion function.
+func Convert_v1beta1_NetworkPolicySpec_To_extensions_NetworkPolicySpec(in *NetworkPolicySpec, out *extensions.NetworkPolicySpec, s conversion.Scope) error {
+ return autoConvert_v1beta1_NetworkPolicySpec_To_extensions_NetworkPolicySpec(in, out, s)
+}
+
+func autoConvert_extensions_NetworkPolicySpec_To_v1beta1_NetworkPolicySpec(in *extensions.NetworkPolicySpec, out *NetworkPolicySpec, s conversion.Scope) error {
+ out.PodSelector = in.PodSelector
+ out.Ingress = *(*[]NetworkPolicyIngressRule)(unsafe.Pointer(&in.Ingress))
+ return nil
+}
+
+// Convert_extensions_NetworkPolicySpec_To_v1beta1_NetworkPolicySpec is an autogenerated conversion function.
+func Convert_extensions_NetworkPolicySpec_To_v1beta1_NetworkPolicySpec(in *extensions.NetworkPolicySpec, out *NetworkPolicySpec, s conversion.Scope) error {
+ return autoConvert_extensions_NetworkPolicySpec_To_v1beta1_NetworkPolicySpec(in, out, s)
+}
+
+func autoConvert_v1beta1_PodSecurityPolicy_To_extensions_PodSecurityPolicy(in *PodSecurityPolicy, out *extensions.PodSecurityPolicy, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_PodSecurityPolicy_To_extensions_PodSecurityPolicy is an autogenerated conversion function.
+func Convert_v1beta1_PodSecurityPolicy_To_extensions_PodSecurityPolicy(in *PodSecurityPolicy, out *extensions.PodSecurityPolicy, s conversion.Scope) error {
+ return autoConvert_v1beta1_PodSecurityPolicy_To_extensions_PodSecurityPolicy(in, out, s)
+}
+
+func autoConvert_extensions_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy(in *extensions.PodSecurityPolicy, out *PodSecurityPolicy, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_extensions_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy is an autogenerated conversion function.
+func Convert_extensions_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy(in *extensions.PodSecurityPolicy, out *PodSecurityPolicy, s conversion.Scope) error {
+ return autoConvert_extensions_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy(in, out, s)
+}
+
+func autoConvert_v1beta1_PodSecurityPolicyList_To_extensions_PodSecurityPolicyList(in *PodSecurityPolicyList, out *extensions.PodSecurityPolicyList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]extensions.PodSecurityPolicy, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_PodSecurityPolicy_To_extensions_PodSecurityPolicy(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1beta1_PodSecurityPolicyList_To_extensions_PodSecurityPolicyList is an autogenerated conversion function.
+func Convert_v1beta1_PodSecurityPolicyList_To_extensions_PodSecurityPolicyList(in *PodSecurityPolicyList, out *extensions.PodSecurityPolicyList, s conversion.Scope) error {
+ return autoConvert_v1beta1_PodSecurityPolicyList_To_extensions_PodSecurityPolicyList(in, out, s)
+}
+
+func autoConvert_extensions_PodSecurityPolicyList_To_v1beta1_PodSecurityPolicyList(in *extensions.PodSecurityPolicyList, out *PodSecurityPolicyList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodSecurityPolicy, len(*in))
+ for i := range *in {
+ if err := Convert_extensions_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]PodSecurityPolicy, 0)
+ }
+ return nil
+}
+
+// Convert_extensions_PodSecurityPolicyList_To_v1beta1_PodSecurityPolicyList is an autogenerated conversion function.
+func Convert_extensions_PodSecurityPolicyList_To_v1beta1_PodSecurityPolicyList(in *extensions.PodSecurityPolicyList, out *PodSecurityPolicyList, s conversion.Scope) error {
+ return autoConvert_extensions_PodSecurityPolicyList_To_v1beta1_PodSecurityPolicyList(in, out, s)
+}
+
+func autoConvert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySpec(in *PodSecurityPolicySpec, out *extensions.PodSecurityPolicySpec, s conversion.Scope) error {
+ out.Privileged = in.Privileged
+ out.DefaultAddCapabilities = *(*[]api.Capability)(unsafe.Pointer(&in.DefaultAddCapabilities))
+ out.RequiredDropCapabilities = *(*[]api.Capability)(unsafe.Pointer(&in.RequiredDropCapabilities))
+ out.AllowedCapabilities = *(*[]api.Capability)(unsafe.Pointer(&in.AllowedCapabilities))
+ out.Volumes = *(*[]extensions.FSType)(unsafe.Pointer(&in.Volumes))
+ out.HostNetwork = in.HostNetwork
+ if in.HostPorts != nil {
+ in, out := &in.HostPorts, &out.HostPorts
+ *out = make([]extensions.HostPortRange, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_HostPortRange_To_extensions_HostPortRange(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.HostPorts = nil
+ }
+ out.HostPID = in.HostPID
+ out.HostIPC = in.HostIPC
+ if err := Convert_v1beta1_SELinuxStrategyOptions_To_extensions_SELinuxStrategyOptions(&in.SELinux, &out.SELinux, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_RunAsUserStrategyOptions_To_extensions_RunAsUserStrategyOptions(&in.RunAsUser, &out.RunAsUser, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_SupplementalGroupsStrategyOptions_To_extensions_SupplementalGroupsStrategyOptions(&in.SupplementalGroups, &out.SupplementalGroups, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_FSGroupStrategyOptions_To_extensions_FSGroupStrategyOptions(&in.FSGroup, &out.FSGroup, s); err != nil {
+ return err
+ }
+ out.ReadOnlyRootFilesystem = in.ReadOnlyRootFilesystem
+ return nil
+}
+
+// Convert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySpec is an autogenerated conversion function.
+func Convert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySpec(in *PodSecurityPolicySpec, out *extensions.PodSecurityPolicySpec, s conversion.Scope) error {
+ return autoConvert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySpec(in, out, s)
+}
+
+func autoConvert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec(in *extensions.PodSecurityPolicySpec, out *PodSecurityPolicySpec, s conversion.Scope) error {
+ out.Privileged = in.Privileged
+ out.DefaultAddCapabilities = *(*[]api_v1.Capability)(unsafe.Pointer(&in.DefaultAddCapabilities))
+ out.RequiredDropCapabilities = *(*[]api_v1.Capability)(unsafe.Pointer(&in.RequiredDropCapabilities))
+ out.AllowedCapabilities = *(*[]api_v1.Capability)(unsafe.Pointer(&in.AllowedCapabilities))
+ out.Volumes = *(*[]FSType)(unsafe.Pointer(&in.Volumes))
+ out.HostNetwork = in.HostNetwork
+ if in.HostPorts != nil {
+ in, out := &in.HostPorts, &out.HostPorts
+ *out = make([]HostPortRange, len(*in))
+ for i := range *in {
+ if err := Convert_extensions_HostPortRange_To_v1beta1_HostPortRange(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.HostPorts = nil
+ }
+ out.HostPID = in.HostPID
+ out.HostIPC = in.HostIPC
+ if err := Convert_extensions_SELinuxStrategyOptions_To_v1beta1_SELinuxStrategyOptions(&in.SELinux, &out.SELinux, s); err != nil {
+ return err
+ }
+ if err := Convert_extensions_RunAsUserStrategyOptions_To_v1beta1_RunAsUserStrategyOptions(&in.RunAsUser, &out.RunAsUser, s); err != nil {
+ return err
+ }
+ if err := Convert_extensions_SupplementalGroupsStrategyOptions_To_v1beta1_SupplementalGroupsStrategyOptions(&in.SupplementalGroups, &out.SupplementalGroups, s); err != nil {
+ return err
+ }
+ if err := Convert_extensions_FSGroupStrategyOptions_To_v1beta1_FSGroupStrategyOptions(&in.FSGroup, &out.FSGroup, s); err != nil {
+ return err
+ }
+ out.ReadOnlyRootFilesystem = in.ReadOnlyRootFilesystem
+ return nil
+}
+
+// Convert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec is an autogenerated conversion function.
+func Convert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec(in *extensions.PodSecurityPolicySpec, out *PodSecurityPolicySpec, s conversion.Scope) error {
+ return autoConvert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec(in, out, s)
+}
+
+func autoConvert_v1beta1_ReplicaSet_To_extensions_ReplicaSet(in *ReplicaSet, out *extensions.ReplicaSet, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1beta1_ReplicaSetSpec_To_extensions_ReplicaSetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_ReplicaSetStatus_To_extensions_ReplicaSetStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_ReplicaSet_To_extensions_ReplicaSet is an autogenerated conversion function.
+func Convert_v1beta1_ReplicaSet_To_extensions_ReplicaSet(in *ReplicaSet, out *extensions.ReplicaSet, s conversion.Scope) error {
+ return autoConvert_v1beta1_ReplicaSet_To_extensions_ReplicaSet(in, out, s)
+}
+
+func autoConvert_extensions_ReplicaSet_To_v1beta1_ReplicaSet(in *extensions.ReplicaSet, out *ReplicaSet, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_extensions_ReplicaSetSpec_To_v1beta1_ReplicaSetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_extensions_ReplicaSetStatus_To_v1beta1_ReplicaSetStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_extensions_ReplicaSet_To_v1beta1_ReplicaSet is an autogenerated conversion function.
+func Convert_extensions_ReplicaSet_To_v1beta1_ReplicaSet(in *extensions.ReplicaSet, out *ReplicaSet, s conversion.Scope) error {
+ return autoConvert_extensions_ReplicaSet_To_v1beta1_ReplicaSet(in, out, s)
+}
+
+func autoConvert_v1beta1_ReplicaSetCondition_To_extensions_ReplicaSetCondition(in *ReplicaSetCondition, out *extensions.ReplicaSetCondition, s conversion.Scope) error {
+ out.Type = extensions.ReplicaSetConditionType(in.Type)
+ out.Status = api.ConditionStatus(in.Status)
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_v1beta1_ReplicaSetCondition_To_extensions_ReplicaSetCondition is an autogenerated conversion function.
+func Convert_v1beta1_ReplicaSetCondition_To_extensions_ReplicaSetCondition(in *ReplicaSetCondition, out *extensions.ReplicaSetCondition, s conversion.Scope) error {
+ return autoConvert_v1beta1_ReplicaSetCondition_To_extensions_ReplicaSetCondition(in, out, s)
+}
+
+func autoConvert_extensions_ReplicaSetCondition_To_v1beta1_ReplicaSetCondition(in *extensions.ReplicaSetCondition, out *ReplicaSetCondition, s conversion.Scope) error {
+ out.Type = ReplicaSetConditionType(in.Type)
+ out.Status = api_v1.ConditionStatus(in.Status)
+ out.LastTransitionTime = in.LastTransitionTime
+ out.Reason = in.Reason
+ out.Message = in.Message
+ return nil
+}
+
+// Convert_extensions_ReplicaSetCondition_To_v1beta1_ReplicaSetCondition is an autogenerated conversion function.
+func Convert_extensions_ReplicaSetCondition_To_v1beta1_ReplicaSetCondition(in *extensions.ReplicaSetCondition, out *ReplicaSetCondition, s conversion.Scope) error {
+ return autoConvert_extensions_ReplicaSetCondition_To_v1beta1_ReplicaSetCondition(in, out, s)
+}
+
+func autoConvert_v1beta1_ReplicaSetList_To_extensions_ReplicaSetList(in *ReplicaSetList, out *extensions.ReplicaSetList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]extensions.ReplicaSet, len(*in))
+ for i := range *in {
+ if err := Convert_v1beta1_ReplicaSet_To_extensions_ReplicaSet(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1beta1_ReplicaSetList_To_extensions_ReplicaSetList is an autogenerated conversion function.
+func Convert_v1beta1_ReplicaSetList_To_extensions_ReplicaSetList(in *ReplicaSetList, out *extensions.ReplicaSetList, s conversion.Scope) error {
+ return autoConvert_v1beta1_ReplicaSetList_To_extensions_ReplicaSetList(in, out, s)
+}
+
+func autoConvert_extensions_ReplicaSetList_To_v1beta1_ReplicaSetList(in *extensions.ReplicaSetList, out *ReplicaSetList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ReplicaSet, len(*in))
+ for i := range *in {
+ if err := Convert_extensions_ReplicaSet_To_v1beta1_ReplicaSet(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]ReplicaSet, 0)
+ }
+ return nil
+}
+
+// Convert_extensions_ReplicaSetList_To_v1beta1_ReplicaSetList is an autogenerated conversion function.
+func Convert_extensions_ReplicaSetList_To_v1beta1_ReplicaSetList(in *extensions.ReplicaSetList, out *ReplicaSetList, s conversion.Scope) error {
+ return autoConvert_extensions_ReplicaSetList_To_v1beta1_ReplicaSetList(in, out, s)
+}
+
+func autoConvert_v1beta1_ReplicaSetSpec_To_extensions_ReplicaSetSpec(in *ReplicaSetSpec, out *extensions.ReplicaSetSpec, s conversion.Scope) error {
+ if err := v1.Convert_Pointer_int32_To_int32(&in.Replicas, &out.Replicas, s); err != nil {
+ return err
+ }
+ out.MinReadySeconds = in.MinReadySeconds
+ out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector))
+ if err := api_v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func autoConvert_extensions_ReplicaSetSpec_To_v1beta1_ReplicaSetSpec(in *extensions.ReplicaSetSpec, out *ReplicaSetSpec, s conversion.Scope) error {
+ if err := v1.Convert_int32_To_Pointer_int32(&in.Replicas, &out.Replicas, s); err != nil {
+ return err
+ }
+ out.MinReadySeconds = in.MinReadySeconds
+ out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector))
+ if err := api_v1.Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+func autoConvert_v1beta1_ReplicaSetStatus_To_extensions_ReplicaSetStatus(in *ReplicaSetStatus, out *extensions.ReplicaSetStatus, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ out.FullyLabeledReplicas = in.FullyLabeledReplicas
+ out.ReadyReplicas = in.ReadyReplicas
+ out.AvailableReplicas = in.AvailableReplicas
+ out.ObservedGeneration = in.ObservedGeneration
+ out.Conditions = *(*[]extensions.ReplicaSetCondition)(unsafe.Pointer(&in.Conditions))
+ return nil
+}
+
+// Convert_v1beta1_ReplicaSetStatus_To_extensions_ReplicaSetStatus is an autogenerated conversion function.
+func Convert_v1beta1_ReplicaSetStatus_To_extensions_ReplicaSetStatus(in *ReplicaSetStatus, out *extensions.ReplicaSetStatus, s conversion.Scope) error {
+ return autoConvert_v1beta1_ReplicaSetStatus_To_extensions_ReplicaSetStatus(in, out, s)
+}
+
+func autoConvert_extensions_ReplicaSetStatus_To_v1beta1_ReplicaSetStatus(in *extensions.ReplicaSetStatus, out *ReplicaSetStatus, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ out.FullyLabeledReplicas = in.FullyLabeledReplicas
+ out.ReadyReplicas = in.ReadyReplicas
+ out.AvailableReplicas = in.AvailableReplicas
+ out.ObservedGeneration = in.ObservedGeneration
+ out.Conditions = *(*[]ReplicaSetCondition)(unsafe.Pointer(&in.Conditions))
+ return nil
+}
+
+// Convert_extensions_ReplicaSetStatus_To_v1beta1_ReplicaSetStatus is an autogenerated conversion function.
+func Convert_extensions_ReplicaSetStatus_To_v1beta1_ReplicaSetStatus(in *extensions.ReplicaSetStatus, out *ReplicaSetStatus, s conversion.Scope) error {
+ return autoConvert_extensions_ReplicaSetStatus_To_v1beta1_ReplicaSetStatus(in, out, s)
+}
+
+func autoConvert_v1beta1_ReplicationControllerDummy_To_extensions_ReplicationControllerDummy(in *ReplicationControllerDummy, out *extensions.ReplicationControllerDummy, s conversion.Scope) error {
+ return nil
+}
+
+// Convert_v1beta1_ReplicationControllerDummy_To_extensions_ReplicationControllerDummy is an autogenerated conversion function.
+func Convert_v1beta1_ReplicationControllerDummy_To_extensions_ReplicationControllerDummy(in *ReplicationControllerDummy, out *extensions.ReplicationControllerDummy, s conversion.Scope) error {
+ return autoConvert_v1beta1_ReplicationControllerDummy_To_extensions_ReplicationControllerDummy(in, out, s)
+}
+
+func autoConvert_extensions_ReplicationControllerDummy_To_v1beta1_ReplicationControllerDummy(in *extensions.ReplicationControllerDummy, out *ReplicationControllerDummy, s conversion.Scope) error {
+ return nil
+}
+
+// Convert_extensions_ReplicationControllerDummy_To_v1beta1_ReplicationControllerDummy is an autogenerated conversion function.
+func Convert_extensions_ReplicationControllerDummy_To_v1beta1_ReplicationControllerDummy(in *extensions.ReplicationControllerDummy, out *ReplicationControllerDummy, s conversion.Scope) error {
+ return autoConvert_extensions_ReplicationControllerDummy_To_v1beta1_ReplicationControllerDummy(in, out, s)
+}
+
+func autoConvert_v1beta1_RollbackConfig_To_extensions_RollbackConfig(in *RollbackConfig, out *extensions.RollbackConfig, s conversion.Scope) error {
+ out.Revision = in.Revision
+ return nil
+}
+
+// Convert_v1beta1_RollbackConfig_To_extensions_RollbackConfig is an autogenerated conversion function.
+func Convert_v1beta1_RollbackConfig_To_extensions_RollbackConfig(in *RollbackConfig, out *extensions.RollbackConfig, s conversion.Scope) error {
+ return autoConvert_v1beta1_RollbackConfig_To_extensions_RollbackConfig(in, out, s)
+}
+
+func autoConvert_extensions_RollbackConfig_To_v1beta1_RollbackConfig(in *extensions.RollbackConfig, out *RollbackConfig, s conversion.Scope) error {
+ out.Revision = in.Revision
+ return nil
+}
+
+// Convert_extensions_RollbackConfig_To_v1beta1_RollbackConfig is an autogenerated conversion function.
+func Convert_extensions_RollbackConfig_To_v1beta1_RollbackConfig(in *extensions.RollbackConfig, out *RollbackConfig, s conversion.Scope) error {
+ return autoConvert_extensions_RollbackConfig_To_v1beta1_RollbackConfig(in, out, s)
+}
+
+func autoConvert_v1beta1_RollingUpdateDaemonSet_To_extensions_RollingUpdateDaemonSet(in *RollingUpdateDaemonSet, out *extensions.RollingUpdateDaemonSet, s conversion.Scope) error {
+ // WARNING: in.MaxUnavailable requires manual conversion: inconvertible types (*k8s.io/apimachinery/pkg/util/intstr.IntOrString vs k8s.io/apimachinery/pkg/util/intstr.IntOrString)
+ return nil
+}
+
+func autoConvert_extensions_RollingUpdateDaemonSet_To_v1beta1_RollingUpdateDaemonSet(in *extensions.RollingUpdateDaemonSet, out *RollingUpdateDaemonSet, s conversion.Scope) error {
+ // WARNING: in.MaxUnavailable requires manual conversion: inconvertible types (k8s.io/apimachinery/pkg/util/intstr.IntOrString vs *k8s.io/apimachinery/pkg/util/intstr.IntOrString)
+ return nil
+}
+
+func autoConvert_v1beta1_RollingUpdateDeployment_To_extensions_RollingUpdateDeployment(in *RollingUpdateDeployment, out *extensions.RollingUpdateDeployment, s conversion.Scope) error {
+ // WARNING: in.MaxUnavailable requires manual conversion: inconvertible types (*k8s.io/apimachinery/pkg/util/intstr.IntOrString vs k8s.io/apimachinery/pkg/util/intstr.IntOrString)
+ // WARNING: in.MaxSurge requires manual conversion: inconvertible types (*k8s.io/apimachinery/pkg/util/intstr.IntOrString vs k8s.io/apimachinery/pkg/util/intstr.IntOrString)
+ return nil
+}
+
+func autoConvert_extensions_RollingUpdateDeployment_To_v1beta1_RollingUpdateDeployment(in *extensions.RollingUpdateDeployment, out *RollingUpdateDeployment, s conversion.Scope) error {
+ // WARNING: in.MaxUnavailable requires manual conversion: inconvertible types (k8s.io/apimachinery/pkg/util/intstr.IntOrString vs *k8s.io/apimachinery/pkg/util/intstr.IntOrString)
+ // WARNING: in.MaxSurge requires manual conversion: inconvertible types (k8s.io/apimachinery/pkg/util/intstr.IntOrString vs *k8s.io/apimachinery/pkg/util/intstr.IntOrString)
+ return nil
+}
+
+func autoConvert_v1beta1_RunAsUserStrategyOptions_To_extensions_RunAsUserStrategyOptions(in *RunAsUserStrategyOptions, out *extensions.RunAsUserStrategyOptions, s conversion.Scope) error {
+ out.Rule = extensions.RunAsUserStrategy(in.Rule)
+ out.Ranges = *(*[]extensions.UserIDRange)(unsafe.Pointer(&in.Ranges))
+ return nil
+}
+
+// Convert_v1beta1_RunAsUserStrategyOptions_To_extensions_RunAsUserStrategyOptions is an autogenerated conversion function.
+func Convert_v1beta1_RunAsUserStrategyOptions_To_extensions_RunAsUserStrategyOptions(in *RunAsUserStrategyOptions, out *extensions.RunAsUserStrategyOptions, s conversion.Scope) error {
+ return autoConvert_v1beta1_RunAsUserStrategyOptions_To_extensions_RunAsUserStrategyOptions(in, out, s)
+}
+
+func autoConvert_extensions_RunAsUserStrategyOptions_To_v1beta1_RunAsUserStrategyOptions(in *extensions.RunAsUserStrategyOptions, out *RunAsUserStrategyOptions, s conversion.Scope) error {
+ out.Rule = RunAsUserStrategy(in.Rule)
+ out.Ranges = *(*[]IDRange)(unsafe.Pointer(&in.Ranges))
+ return nil
+}
+
+// Convert_extensions_RunAsUserStrategyOptions_To_v1beta1_RunAsUserStrategyOptions is an autogenerated conversion function.
+func Convert_extensions_RunAsUserStrategyOptions_To_v1beta1_RunAsUserStrategyOptions(in *extensions.RunAsUserStrategyOptions, out *RunAsUserStrategyOptions, s conversion.Scope) error {
+ return autoConvert_extensions_RunAsUserStrategyOptions_To_v1beta1_RunAsUserStrategyOptions(in, out, s)
+}
+
+func autoConvert_v1beta1_SELinuxStrategyOptions_To_extensions_SELinuxStrategyOptions(in *SELinuxStrategyOptions, out *extensions.SELinuxStrategyOptions, s conversion.Scope) error {
+ out.Rule = extensions.SELinuxStrategy(in.Rule)
+ out.SELinuxOptions = (*api.SELinuxOptions)(unsafe.Pointer(in.SELinuxOptions))
+ return nil
+}
+
+// Convert_v1beta1_SELinuxStrategyOptions_To_extensions_SELinuxStrategyOptions is an autogenerated conversion function.
+func Convert_v1beta1_SELinuxStrategyOptions_To_extensions_SELinuxStrategyOptions(in *SELinuxStrategyOptions, out *extensions.SELinuxStrategyOptions, s conversion.Scope) error {
+ return autoConvert_v1beta1_SELinuxStrategyOptions_To_extensions_SELinuxStrategyOptions(in, out, s)
+}
+
+func autoConvert_extensions_SELinuxStrategyOptions_To_v1beta1_SELinuxStrategyOptions(in *extensions.SELinuxStrategyOptions, out *SELinuxStrategyOptions, s conversion.Scope) error {
+ out.Rule = SELinuxStrategy(in.Rule)
+ out.SELinuxOptions = (*api_v1.SELinuxOptions)(unsafe.Pointer(in.SELinuxOptions))
+ return nil
+}
+
+// Convert_extensions_SELinuxStrategyOptions_To_v1beta1_SELinuxStrategyOptions is an autogenerated conversion function.
+func Convert_extensions_SELinuxStrategyOptions_To_v1beta1_SELinuxStrategyOptions(in *extensions.SELinuxStrategyOptions, out *SELinuxStrategyOptions, s conversion.Scope) error {
+ return autoConvert_extensions_SELinuxStrategyOptions_To_v1beta1_SELinuxStrategyOptions(in, out, s)
+}
+
+func autoConvert_v1beta1_Scale_To_extensions_Scale(in *Scale, out *extensions.Scale, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1beta1_ScaleSpec_To_extensions_ScaleSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_ScaleStatus_To_extensions_ScaleStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_Scale_To_extensions_Scale is an autogenerated conversion function.
+func Convert_v1beta1_Scale_To_extensions_Scale(in *Scale, out *extensions.Scale, s conversion.Scope) error {
+ return autoConvert_v1beta1_Scale_To_extensions_Scale(in, out, s)
+}
+
+func autoConvert_extensions_Scale_To_v1beta1_Scale(in *extensions.Scale, out *Scale, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_extensions_ScaleSpec_To_v1beta1_ScaleSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_extensions_ScaleStatus_To_v1beta1_ScaleStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_extensions_Scale_To_v1beta1_Scale is an autogenerated conversion function.
+func Convert_extensions_Scale_To_v1beta1_Scale(in *extensions.Scale, out *Scale, s conversion.Scope) error {
+ return autoConvert_extensions_Scale_To_v1beta1_Scale(in, out, s)
+}
+
+func autoConvert_v1beta1_ScaleSpec_To_extensions_ScaleSpec(in *ScaleSpec, out *extensions.ScaleSpec, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ return nil
+}
+
+// Convert_v1beta1_ScaleSpec_To_extensions_ScaleSpec is an autogenerated conversion function.
+func Convert_v1beta1_ScaleSpec_To_extensions_ScaleSpec(in *ScaleSpec, out *extensions.ScaleSpec, s conversion.Scope) error {
+ return autoConvert_v1beta1_ScaleSpec_To_extensions_ScaleSpec(in, out, s)
+}
+
+func autoConvert_extensions_ScaleSpec_To_v1beta1_ScaleSpec(in *extensions.ScaleSpec, out *ScaleSpec, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ return nil
+}
+
+// Convert_extensions_ScaleSpec_To_v1beta1_ScaleSpec is an autogenerated conversion function.
+func Convert_extensions_ScaleSpec_To_v1beta1_ScaleSpec(in *extensions.ScaleSpec, out *ScaleSpec, s conversion.Scope) error {
+ return autoConvert_extensions_ScaleSpec_To_v1beta1_ScaleSpec(in, out, s)
+}
+
+func autoConvert_v1beta1_ScaleStatus_To_extensions_ScaleStatus(in *ScaleStatus, out *extensions.ScaleStatus, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ // WARNING: in.Selector requires manual conversion: inconvertible types (map[string]string vs *k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector)
+ // WARNING: in.TargetSelector requires manual conversion: does not exist in peer-type
+ return nil
+}
+
+func autoConvert_extensions_ScaleStatus_To_v1beta1_ScaleStatus(in *extensions.ScaleStatus, out *ScaleStatus, s conversion.Scope) error {
+ out.Replicas = in.Replicas
+ // WARNING: in.Selector requires manual conversion: inconvertible types (*k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector vs map[string]string)
+ return nil
+}
+
+func autoConvert_v1beta1_SupplementalGroupsStrategyOptions_To_extensions_SupplementalGroupsStrategyOptions(in *SupplementalGroupsStrategyOptions, out *extensions.SupplementalGroupsStrategyOptions, s conversion.Scope) error {
+ out.Rule = extensions.SupplementalGroupsStrategyType(in.Rule)
+ out.Ranges = *(*[]extensions.GroupIDRange)(unsafe.Pointer(&in.Ranges))
+ return nil
+}
+
+// Convert_v1beta1_SupplementalGroupsStrategyOptions_To_extensions_SupplementalGroupsStrategyOptions is an autogenerated conversion function.
+func Convert_v1beta1_SupplementalGroupsStrategyOptions_To_extensions_SupplementalGroupsStrategyOptions(in *SupplementalGroupsStrategyOptions, out *extensions.SupplementalGroupsStrategyOptions, s conversion.Scope) error {
+ return autoConvert_v1beta1_SupplementalGroupsStrategyOptions_To_extensions_SupplementalGroupsStrategyOptions(in, out, s)
+}
+
+func autoConvert_extensions_SupplementalGroupsStrategyOptions_To_v1beta1_SupplementalGroupsStrategyOptions(in *extensions.SupplementalGroupsStrategyOptions, out *SupplementalGroupsStrategyOptions, s conversion.Scope) error {
+ out.Rule = SupplementalGroupsStrategyType(in.Rule)
+ out.Ranges = *(*[]IDRange)(unsafe.Pointer(&in.Ranges))
+ return nil
+}
+
+// Convert_extensions_SupplementalGroupsStrategyOptions_To_v1beta1_SupplementalGroupsStrategyOptions is an autogenerated conversion function.
+func Convert_extensions_SupplementalGroupsStrategyOptions_To_v1beta1_SupplementalGroupsStrategyOptions(in *extensions.SupplementalGroupsStrategyOptions, out *SupplementalGroupsStrategyOptions, s conversion.Scope) error {
+ return autoConvert_extensions_SupplementalGroupsStrategyOptions_To_v1beta1_SupplementalGroupsStrategyOptions(in, out, s)
+}
+
+func autoConvert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource(in *ThirdPartyResource, out *extensions.ThirdPartyResource, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Description = in.Description
+ out.Versions = *(*[]extensions.APIVersion)(unsafe.Pointer(&in.Versions))
+ return nil
+}
+
+// Convert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource is an autogenerated conversion function.
+func Convert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource(in *ThirdPartyResource, out *extensions.ThirdPartyResource, s conversion.Scope) error {
+ return autoConvert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource(in, out, s)
+}
+
+func autoConvert_extensions_ThirdPartyResource_To_v1beta1_ThirdPartyResource(in *extensions.ThirdPartyResource, out *ThirdPartyResource, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Description = in.Description
+ out.Versions = *(*[]APIVersion)(unsafe.Pointer(&in.Versions))
+ return nil
+}
+
+// Convert_extensions_ThirdPartyResource_To_v1beta1_ThirdPartyResource is an autogenerated conversion function.
+func Convert_extensions_ThirdPartyResource_To_v1beta1_ThirdPartyResource(in *extensions.ThirdPartyResource, out *ThirdPartyResource, s conversion.Scope) error {
+ return autoConvert_extensions_ThirdPartyResource_To_v1beta1_ThirdPartyResource(in, out, s)
+}
+
+func autoConvert_v1beta1_ThirdPartyResourceData_To_extensions_ThirdPartyResourceData(in *ThirdPartyResourceData, out *extensions.ThirdPartyResourceData, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Data = *(*[]byte)(unsafe.Pointer(&in.Data))
+ return nil
+}
+
+// Convert_v1beta1_ThirdPartyResourceData_To_extensions_ThirdPartyResourceData is an autogenerated conversion function.
+func Convert_v1beta1_ThirdPartyResourceData_To_extensions_ThirdPartyResourceData(in *ThirdPartyResourceData, out *extensions.ThirdPartyResourceData, s conversion.Scope) error {
+ return autoConvert_v1beta1_ThirdPartyResourceData_To_extensions_ThirdPartyResourceData(in, out, s)
+}
+
+func autoConvert_extensions_ThirdPartyResourceData_To_v1beta1_ThirdPartyResourceData(in *extensions.ThirdPartyResourceData, out *ThirdPartyResourceData, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Data = *(*[]byte)(unsafe.Pointer(&in.Data))
+ return nil
+}
+
+// Convert_extensions_ThirdPartyResourceData_To_v1beta1_ThirdPartyResourceData is an autogenerated conversion function.
+func Convert_extensions_ThirdPartyResourceData_To_v1beta1_ThirdPartyResourceData(in *extensions.ThirdPartyResourceData, out *ThirdPartyResourceData, s conversion.Scope) error {
+ return autoConvert_extensions_ThirdPartyResourceData_To_v1beta1_ThirdPartyResourceData(in, out, s)
+}
+
+func autoConvert_v1beta1_ThirdPartyResourceDataList_To_extensions_ThirdPartyResourceDataList(in *ThirdPartyResourceDataList, out *extensions.ThirdPartyResourceDataList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]extensions.ThirdPartyResourceData)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1beta1_ThirdPartyResourceDataList_To_extensions_ThirdPartyResourceDataList is an autogenerated conversion function.
+func Convert_v1beta1_ThirdPartyResourceDataList_To_extensions_ThirdPartyResourceDataList(in *ThirdPartyResourceDataList, out *extensions.ThirdPartyResourceDataList, s conversion.Scope) error {
+ return autoConvert_v1beta1_ThirdPartyResourceDataList_To_extensions_ThirdPartyResourceDataList(in, out, s)
+}
+
+func autoConvert_extensions_ThirdPartyResourceDataList_To_v1beta1_ThirdPartyResourceDataList(in *extensions.ThirdPartyResourceDataList, out *ThirdPartyResourceDataList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]ThirdPartyResourceData, 0)
+ } else {
+ out.Items = *(*[]ThirdPartyResourceData)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_extensions_ThirdPartyResourceDataList_To_v1beta1_ThirdPartyResourceDataList is an autogenerated conversion function.
+func Convert_extensions_ThirdPartyResourceDataList_To_v1beta1_ThirdPartyResourceDataList(in *extensions.ThirdPartyResourceDataList, out *ThirdPartyResourceDataList, s conversion.Scope) error {
+ return autoConvert_extensions_ThirdPartyResourceDataList_To_v1beta1_ThirdPartyResourceDataList(in, out, s)
+}
+
+func autoConvert_v1beta1_ThirdPartyResourceList_To_extensions_ThirdPartyResourceList(in *ThirdPartyResourceList, out *extensions.ThirdPartyResourceList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]extensions.ThirdPartyResource)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1beta1_ThirdPartyResourceList_To_extensions_ThirdPartyResourceList is an autogenerated conversion function.
+func Convert_v1beta1_ThirdPartyResourceList_To_extensions_ThirdPartyResourceList(in *ThirdPartyResourceList, out *extensions.ThirdPartyResourceList, s conversion.Scope) error {
+ return autoConvert_v1beta1_ThirdPartyResourceList_To_extensions_ThirdPartyResourceList(in, out, s)
+}
+
+func autoConvert_extensions_ThirdPartyResourceList_To_v1beta1_ThirdPartyResourceList(in *extensions.ThirdPartyResourceList, out *ThirdPartyResourceList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]ThirdPartyResource, 0)
+ } else {
+ out.Items = *(*[]ThirdPartyResource)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_extensions_ThirdPartyResourceList_To_v1beta1_ThirdPartyResourceList is an autogenerated conversion function.
+func Convert_extensions_ThirdPartyResourceList_To_v1beta1_ThirdPartyResourceList(in *extensions.ThirdPartyResourceList, out *ThirdPartyResourceList, s conversion.Scope) error {
+ return autoConvert_extensions_ThirdPartyResourceList_To_v1beta1_ThirdPartyResourceList(in, out, s)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..00cf27c7b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/zz_generated.deepcopy.go
@@ -0,0 +1,1163 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ intstr "k8s.io/apimachinery/pkg/util/intstr"
+ api_v1 "k8s.io/kubernetes/pkg/api/v1"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_APIVersion, InType: reflect.TypeOf(&APIVersion{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CustomMetricCurrentStatus, InType: reflect.TypeOf(&CustomMetricCurrentStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CustomMetricCurrentStatusList, InType: reflect.TypeOf(&CustomMetricCurrentStatusList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CustomMetricTarget, InType: reflect.TypeOf(&CustomMetricTarget{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CustomMetricTargetList, InType: reflect.TypeOf(&CustomMetricTargetList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DaemonSet, InType: reflect.TypeOf(&DaemonSet{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DaemonSetList, InType: reflect.TypeOf(&DaemonSetList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DaemonSetSpec, InType: reflect.TypeOf(&DaemonSetSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DaemonSetStatus, InType: reflect.TypeOf(&DaemonSetStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DaemonSetUpdateStrategy, InType: reflect.TypeOf(&DaemonSetUpdateStrategy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Deployment, InType: reflect.TypeOf(&Deployment{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentCondition, InType: reflect.TypeOf(&DeploymentCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentList, InType: reflect.TypeOf(&DeploymentList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentRollback, InType: reflect.TypeOf(&DeploymentRollback{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentSpec, InType: reflect.TypeOf(&DeploymentSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentStatus, InType: reflect.TypeOf(&DeploymentStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_DeploymentStrategy, InType: reflect.TypeOf(&DeploymentStrategy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_FSGroupStrategyOptions, InType: reflect.TypeOf(&FSGroupStrategyOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_HTTPIngressPath, InType: reflect.TypeOf(&HTTPIngressPath{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_HTTPIngressRuleValue, InType: reflect.TypeOf(&HTTPIngressRuleValue{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_HostPortRange, InType: reflect.TypeOf(&HostPortRange{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_IDRange, InType: reflect.TypeOf(&IDRange{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Ingress, InType: reflect.TypeOf(&Ingress{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_IngressBackend, InType: reflect.TypeOf(&IngressBackend{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_IngressList, InType: reflect.TypeOf(&IngressList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_IngressRule, InType: reflect.TypeOf(&IngressRule{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_IngressRuleValue, InType: reflect.TypeOf(&IngressRuleValue{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_IngressSpec, InType: reflect.TypeOf(&IngressSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_IngressStatus, InType: reflect.TypeOf(&IngressStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_IngressTLS, InType: reflect.TypeOf(&IngressTLS{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_NetworkPolicy, InType: reflect.TypeOf(&NetworkPolicy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_NetworkPolicyIngressRule, InType: reflect.TypeOf(&NetworkPolicyIngressRule{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_NetworkPolicyList, InType: reflect.TypeOf(&NetworkPolicyList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_NetworkPolicyPeer, InType: reflect.TypeOf(&NetworkPolicyPeer{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_NetworkPolicyPort, InType: reflect.TypeOf(&NetworkPolicyPort{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_NetworkPolicySpec, InType: reflect.TypeOf(&NetworkPolicySpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_PodSecurityPolicy, InType: reflect.TypeOf(&PodSecurityPolicy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_PodSecurityPolicyList, InType: reflect.TypeOf(&PodSecurityPolicyList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_PodSecurityPolicySpec, InType: reflect.TypeOf(&PodSecurityPolicySpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ReplicaSet, InType: reflect.TypeOf(&ReplicaSet{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ReplicaSetCondition, InType: reflect.TypeOf(&ReplicaSetCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ReplicaSetList, InType: reflect.TypeOf(&ReplicaSetList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ReplicaSetSpec, InType: reflect.TypeOf(&ReplicaSetSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ReplicaSetStatus, InType: reflect.TypeOf(&ReplicaSetStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ReplicationControllerDummy, InType: reflect.TypeOf(&ReplicationControllerDummy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RollbackConfig, InType: reflect.TypeOf(&RollbackConfig{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RollingUpdateDaemonSet, InType: reflect.TypeOf(&RollingUpdateDaemonSet{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RollingUpdateDeployment, InType: reflect.TypeOf(&RollingUpdateDeployment{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RunAsUserStrategyOptions, InType: reflect.TypeOf(&RunAsUserStrategyOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SELinuxStrategyOptions, InType: reflect.TypeOf(&SELinuxStrategyOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Scale, InType: reflect.TypeOf(&Scale{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ScaleSpec, InType: reflect.TypeOf(&ScaleSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ScaleStatus, InType: reflect.TypeOf(&ScaleStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_SupplementalGroupsStrategyOptions, InType: reflect.TypeOf(&SupplementalGroupsStrategyOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ThirdPartyResource, InType: reflect.TypeOf(&ThirdPartyResource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ThirdPartyResourceData, InType: reflect.TypeOf(&ThirdPartyResourceData{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ThirdPartyResourceDataList, InType: reflect.TypeOf(&ThirdPartyResourceDataList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ThirdPartyResourceList, InType: reflect.TypeOf(&ThirdPartyResourceList{})},
+ )
+}
+
+// DeepCopy_v1beta1_APIVersion is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_APIVersion(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*APIVersion)
+ out := out.(*APIVersion)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_CustomMetricCurrentStatus is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_CustomMetricCurrentStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CustomMetricCurrentStatus)
+ out := out.(*CustomMetricCurrentStatus)
+ *out = *in
+ out.CurrentValue = in.CurrentValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_CustomMetricCurrentStatusList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_CustomMetricCurrentStatusList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CustomMetricCurrentStatusList)
+ out := out.(*CustomMetricCurrentStatusList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]CustomMetricCurrentStatus, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_CustomMetricCurrentStatus(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_CustomMetricTarget is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_CustomMetricTarget(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CustomMetricTarget)
+ out := out.(*CustomMetricTarget)
+ *out = *in
+ out.TargetValue = in.TargetValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_CustomMetricTargetList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_CustomMetricTargetList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CustomMetricTargetList)
+ out := out.(*CustomMetricTargetList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]CustomMetricTarget, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_CustomMetricTarget(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DaemonSet is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DaemonSet(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DaemonSet)
+ out := out.(*DaemonSet)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_DaemonSetSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_DaemonSetStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DaemonSetList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DaemonSetList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DaemonSetList)
+ out := out.(*DaemonSetList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]DaemonSet, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_DaemonSet(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DaemonSetSpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DaemonSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DaemonSetSpec)
+ out := out.(*DaemonSetSpec)
+ *out = *in
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_DaemonSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, c); err != nil {
+ return err
+ }
+ if in.RevisionHistoryLimit != nil {
+ in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DaemonSetStatus is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DaemonSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DaemonSetStatus)
+ out := out.(*DaemonSetStatus)
+ *out = *in
+ if in.CollisionCount != nil {
+ in, out := &in.CollisionCount, &out.CollisionCount
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DaemonSetUpdateStrategy is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DaemonSetUpdateStrategy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DaemonSetUpdateStrategy)
+ out := out.(*DaemonSetUpdateStrategy)
+ *out = *in
+ if in.RollingUpdate != nil {
+ in, out := &in.RollingUpdate, &out.RollingUpdate
+ *out = new(RollingUpdateDaemonSet)
+ if err := DeepCopy_v1beta1_RollingUpdateDaemonSet(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_Deployment is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_Deployment(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Deployment)
+ out := out.(*Deployment)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_DeploymentSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_DeploymentStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DeploymentCondition is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DeploymentCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentCondition)
+ out := out.(*DeploymentCondition)
+ *out = *in
+ out.LastUpdateTime = in.LastUpdateTime.DeepCopy()
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DeploymentList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DeploymentList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentList)
+ out := out.(*DeploymentList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Deployment, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_Deployment(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DeploymentRollback is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DeploymentRollback(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentRollback)
+ out := out.(*DeploymentRollback)
+ *out = *in
+ if in.UpdatedAnnotations != nil {
+ in, out := &in.UpdatedAnnotations, &out.UpdatedAnnotations
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DeploymentSpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DeploymentSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentSpec)
+ out := out.(*DeploymentSpec)
+ *out = *in
+ if in.Replicas != nil {
+ in, out := &in.Replicas, &out.Replicas
+ *out = new(int32)
+ **out = **in
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_DeploymentStrategy(&in.Strategy, &out.Strategy, c); err != nil {
+ return err
+ }
+ if in.RevisionHistoryLimit != nil {
+ in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
+ *out = new(int32)
+ **out = **in
+ }
+ if in.RollbackTo != nil {
+ in, out := &in.RollbackTo, &out.RollbackTo
+ *out = new(RollbackConfig)
+ **out = **in
+ }
+ if in.ProgressDeadlineSeconds != nil {
+ in, out := &in.ProgressDeadlineSeconds, &out.ProgressDeadlineSeconds
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DeploymentStatus is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DeploymentStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentStatus)
+ out := out.(*DeploymentStatus)
+ *out = *in
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]DeploymentCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_DeploymentCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.CollisionCount != nil {
+ in, out := &in.CollisionCount, &out.CollisionCount
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_DeploymentStrategy is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_DeploymentStrategy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentStrategy)
+ out := out.(*DeploymentStrategy)
+ *out = *in
+ if in.RollingUpdate != nil {
+ in, out := &in.RollingUpdate, &out.RollingUpdate
+ *out = new(RollingUpdateDeployment)
+ if err := DeepCopy_v1beta1_RollingUpdateDeployment(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_FSGroupStrategyOptions is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_FSGroupStrategyOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*FSGroupStrategyOptions)
+ out := out.(*FSGroupStrategyOptions)
+ *out = *in
+ if in.Ranges != nil {
+ in, out := &in.Ranges, &out.Ranges
+ *out = make([]IDRange, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_HTTPIngressPath is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_HTTPIngressPath(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HTTPIngressPath)
+ out := out.(*HTTPIngressPath)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_HTTPIngressRuleValue is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_HTTPIngressRuleValue(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HTTPIngressRuleValue)
+ out := out.(*HTTPIngressRuleValue)
+ *out = *in
+ if in.Paths != nil {
+ in, out := &in.Paths, &out.Paths
+ *out = make([]HTTPIngressPath, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_HostPortRange is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_HostPortRange(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HostPortRange)
+ out := out.(*HostPortRange)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_IDRange is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_IDRange(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IDRange)
+ out := out.(*IDRange)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_Ingress is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_Ingress(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Ingress)
+ out := out.(*Ingress)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_IngressSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_IngressStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_IngressBackend is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_IngressBackend(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IngressBackend)
+ out := out.(*IngressBackend)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_IngressList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_IngressList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IngressList)
+ out := out.(*IngressList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Ingress, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_Ingress(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_IngressRule is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_IngressRule(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IngressRule)
+ out := out.(*IngressRule)
+ *out = *in
+ if err := DeepCopy_v1beta1_IngressRuleValue(&in.IngressRuleValue, &out.IngressRuleValue, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_IngressRuleValue is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_IngressRuleValue(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IngressRuleValue)
+ out := out.(*IngressRuleValue)
+ *out = *in
+ if in.HTTP != nil {
+ in, out := &in.HTTP, &out.HTTP
+ *out = new(HTTPIngressRuleValue)
+ if err := DeepCopy_v1beta1_HTTPIngressRuleValue(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_IngressSpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_IngressSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IngressSpec)
+ out := out.(*IngressSpec)
+ *out = *in
+ if in.Backend != nil {
+ in, out := &in.Backend, &out.Backend
+ *out = new(IngressBackend)
+ **out = **in
+ }
+ if in.TLS != nil {
+ in, out := &in.TLS, &out.TLS
+ *out = make([]IngressTLS, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_IngressTLS(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]IngressRule, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_IngressRule(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_IngressStatus is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_IngressStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IngressStatus)
+ out := out.(*IngressStatus)
+ *out = *in
+ if err := api_v1.DeepCopy_v1_LoadBalancerStatus(&in.LoadBalancer, &out.LoadBalancer, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_IngressTLS is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_IngressTLS(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IngressTLS)
+ out := out.(*IngressTLS)
+ *out = *in
+ if in.Hosts != nil {
+ in, out := &in.Hosts, &out.Hosts
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_NetworkPolicy is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_NetworkPolicy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicy)
+ out := out.(*NetworkPolicy)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_NetworkPolicySpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_NetworkPolicyIngressRule is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_NetworkPolicyIngressRule(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyIngressRule)
+ out := out.(*NetworkPolicyIngressRule)
+ *out = *in
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]NetworkPolicyPort, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_NetworkPolicyPort(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.From != nil {
+ in, out := &in.From, &out.From
+ *out = make([]NetworkPolicyPeer, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_NetworkPolicyPeer(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_NetworkPolicyList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_NetworkPolicyList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyList)
+ out := out.(*NetworkPolicyList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]NetworkPolicy, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_NetworkPolicy(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_NetworkPolicyPeer is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_NetworkPolicyPeer(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyPeer)
+ out := out.(*NetworkPolicyPeer)
+ *out = *in
+ if in.PodSelector != nil {
+ in, out := &in.PodSelector, &out.PodSelector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if in.NamespaceSelector != nil {
+ in, out := &in.NamespaceSelector, &out.NamespaceSelector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_NetworkPolicyPort is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_NetworkPolicyPort(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyPort)
+ out := out.(*NetworkPolicyPort)
+ *out = *in
+ if in.Protocol != nil {
+ in, out := &in.Protocol, &out.Protocol
+ *out = new(api_v1.Protocol)
+ **out = **in
+ }
+ if in.Port != nil {
+ in, out := &in.Port, &out.Port
+ *out = new(intstr.IntOrString)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_NetworkPolicySpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_NetworkPolicySpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicySpec)
+ out := out.(*NetworkPolicySpec)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.PodSelector); err != nil {
+ return err
+ } else {
+ out.PodSelector = *newVal.(*v1.LabelSelector)
+ }
+ if in.Ingress != nil {
+ in, out := &in.Ingress, &out.Ingress
+ *out = make([]NetworkPolicyIngressRule, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_NetworkPolicyIngressRule(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_PodSecurityPolicy is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_PodSecurityPolicy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodSecurityPolicy)
+ out := out.(*PodSecurityPolicy)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_PodSecurityPolicySpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_PodSecurityPolicyList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_PodSecurityPolicyList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodSecurityPolicyList)
+ out := out.(*PodSecurityPolicyList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodSecurityPolicy, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_PodSecurityPolicy(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_PodSecurityPolicySpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_PodSecurityPolicySpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodSecurityPolicySpec)
+ out := out.(*PodSecurityPolicySpec)
+ *out = *in
+ if in.DefaultAddCapabilities != nil {
+ in, out := &in.DefaultAddCapabilities, &out.DefaultAddCapabilities
+ *out = make([]api_v1.Capability, len(*in))
+ copy(*out, *in)
+ }
+ if in.RequiredDropCapabilities != nil {
+ in, out := &in.RequiredDropCapabilities, &out.RequiredDropCapabilities
+ *out = make([]api_v1.Capability, len(*in))
+ copy(*out, *in)
+ }
+ if in.AllowedCapabilities != nil {
+ in, out := &in.AllowedCapabilities, &out.AllowedCapabilities
+ *out = make([]api_v1.Capability, len(*in))
+ copy(*out, *in)
+ }
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]FSType, len(*in))
+ copy(*out, *in)
+ }
+ if in.HostPorts != nil {
+ in, out := &in.HostPorts, &out.HostPorts
+ *out = make([]HostPortRange, len(*in))
+ copy(*out, *in)
+ }
+ if err := DeepCopy_v1beta1_SELinuxStrategyOptions(&in.SELinux, &out.SELinux, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_RunAsUserStrategyOptions(&in.RunAsUser, &out.RunAsUser, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_SupplementalGroupsStrategyOptions(&in.SupplementalGroups, &out.SupplementalGroups, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_FSGroupStrategyOptions(&in.FSGroup, &out.FSGroup, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ReplicaSet is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ReplicaSet(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicaSet)
+ out := out.(*ReplicaSet)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_ReplicaSetSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_ReplicaSetStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ReplicaSetCondition is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ReplicaSetCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicaSetCondition)
+ out := out.(*ReplicaSetCondition)
+ *out = *in
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ReplicaSetList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ReplicaSetList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicaSetList)
+ out := out.(*ReplicaSetList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ReplicaSet, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_ReplicaSet(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ReplicaSetSpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ReplicaSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicaSetSpec)
+ out := out.(*ReplicaSetSpec)
+ *out = *in
+ if in.Replicas != nil {
+ in, out := &in.Replicas, &out.Replicas
+ *out = new(int32)
+ **out = **in
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ReplicaSetStatus is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ReplicaSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicaSetStatus)
+ out := out.(*ReplicaSetStatus)
+ *out = *in
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]ReplicaSetCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_ReplicaSetCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ReplicationControllerDummy is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ReplicationControllerDummy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicationControllerDummy)
+ out := out.(*ReplicationControllerDummy)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_RollbackConfig is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_RollbackConfig(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RollbackConfig)
+ out := out.(*RollbackConfig)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_RollingUpdateDaemonSet is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_RollingUpdateDaemonSet(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RollingUpdateDaemonSet)
+ out := out.(*RollingUpdateDaemonSet)
+ *out = *in
+ if in.MaxUnavailable != nil {
+ in, out := &in.MaxUnavailable, &out.MaxUnavailable
+ *out = new(intstr.IntOrString)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_RollingUpdateDeployment is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_RollingUpdateDeployment(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RollingUpdateDeployment)
+ out := out.(*RollingUpdateDeployment)
+ *out = *in
+ if in.MaxUnavailable != nil {
+ in, out := &in.MaxUnavailable, &out.MaxUnavailable
+ *out = new(intstr.IntOrString)
+ **out = **in
+ }
+ if in.MaxSurge != nil {
+ in, out := &in.MaxSurge, &out.MaxSurge
+ *out = new(intstr.IntOrString)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_RunAsUserStrategyOptions is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_RunAsUserStrategyOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RunAsUserStrategyOptions)
+ out := out.(*RunAsUserStrategyOptions)
+ *out = *in
+ if in.Ranges != nil {
+ in, out := &in.Ranges, &out.Ranges
+ *out = make([]IDRange, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_SELinuxStrategyOptions is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_SELinuxStrategyOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SELinuxStrategyOptions)
+ out := out.(*SELinuxStrategyOptions)
+ *out = *in
+ if in.SELinuxOptions != nil {
+ in, out := &in.SELinuxOptions, &out.SELinuxOptions
+ *out = new(api_v1.SELinuxOptions)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_Scale is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_Scale(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Scale)
+ out := out.(*Scale)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_ScaleStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ScaleSpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ScaleSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ScaleSpec)
+ out := out.(*ScaleSpec)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ScaleStatus is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ScaleStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ScaleStatus)
+ out := out.(*ScaleStatus)
+ *out = *in
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_SupplementalGroupsStrategyOptions is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_SupplementalGroupsStrategyOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SupplementalGroupsStrategyOptions)
+ out := out.(*SupplementalGroupsStrategyOptions)
+ *out = *in
+ if in.Ranges != nil {
+ in, out := &in.Ranges, &out.Ranges
+ *out = make([]IDRange, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ThirdPartyResource is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ThirdPartyResource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ThirdPartyResource)
+ out := out.(*ThirdPartyResource)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Versions != nil {
+ in, out := &in.Versions, &out.Versions
+ *out = make([]APIVersion, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ThirdPartyResourceData is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ThirdPartyResourceData(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ThirdPartyResourceData)
+ out := out.(*ThirdPartyResourceData)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Data != nil {
+ in, out := &in.Data, &out.Data
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ThirdPartyResourceDataList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ThirdPartyResourceDataList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ThirdPartyResourceDataList)
+ out := out.(*ThirdPartyResourceDataList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ThirdPartyResourceData, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_ThirdPartyResourceData(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ThirdPartyResourceList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ThirdPartyResourceList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ThirdPartyResourceList)
+ out := out.(*ThirdPartyResourceList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ThirdPartyResource, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_ThirdPartyResource(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/zz_generated.defaults.go
new file mode 100644
index 000000000..9869016d7
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/zz_generated.defaults.go
@@ -0,0 +1,475 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ scheme.AddTypeDefaultingFunc(&DaemonSet{}, func(obj interface{}) { SetObjectDefaults_DaemonSet(obj.(*DaemonSet)) })
+ scheme.AddTypeDefaultingFunc(&DaemonSetList{}, func(obj interface{}) { SetObjectDefaults_DaemonSetList(obj.(*DaemonSetList)) })
+ scheme.AddTypeDefaultingFunc(&Deployment{}, func(obj interface{}) { SetObjectDefaults_Deployment(obj.(*Deployment)) })
+ scheme.AddTypeDefaultingFunc(&DeploymentList{}, func(obj interface{}) { SetObjectDefaults_DeploymentList(obj.(*DeploymentList)) })
+ scheme.AddTypeDefaultingFunc(&NetworkPolicy{}, func(obj interface{}) { SetObjectDefaults_NetworkPolicy(obj.(*NetworkPolicy)) })
+ scheme.AddTypeDefaultingFunc(&NetworkPolicyList{}, func(obj interface{}) { SetObjectDefaults_NetworkPolicyList(obj.(*NetworkPolicyList)) })
+ scheme.AddTypeDefaultingFunc(&ReplicaSet{}, func(obj interface{}) { SetObjectDefaults_ReplicaSet(obj.(*ReplicaSet)) })
+ scheme.AddTypeDefaultingFunc(&ReplicaSetList{}, func(obj interface{}) { SetObjectDefaults_ReplicaSetList(obj.(*ReplicaSetList)) })
+ return nil
+}
+
+func SetObjectDefaults_DaemonSet(in *DaemonSet) {
+ SetDefaults_DaemonSet(in)
+ v1.SetDefaults_PodSpec(&in.Spec.Template.Spec)
+ for i := range in.Spec.Template.Spec.Volumes {
+ a := &in.Spec.Template.Spec.Volumes[i]
+ v1.SetDefaults_Volume(a)
+ if a.VolumeSource.Secret != nil {
+ v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
+ }
+ if a.VolumeSource.ISCSI != nil {
+ v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
+ }
+ if a.VolumeSource.RBD != nil {
+ v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
+ }
+ if a.VolumeSource.DownwardAPI != nil {
+ v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
+ for j := range a.VolumeSource.DownwardAPI.Items {
+ b := &a.VolumeSource.DownwardAPI.Items[j]
+ if b.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.FieldRef)
+ }
+ }
+ }
+ if a.VolumeSource.ConfigMap != nil {
+ v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
+ }
+ if a.VolumeSource.AzureDisk != nil {
+ v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
+ }
+ if a.VolumeSource.Projected != nil {
+ v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
+ for j := range a.VolumeSource.Projected.Sources {
+ b := &a.VolumeSource.Projected.Sources[j]
+ if b.DownwardAPI != nil {
+ for k := range b.DownwardAPI.Items {
+ c := &b.DownwardAPI.Items[k]
+ if c.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(c.FieldRef)
+ }
+ }
+ }
+ }
+ }
+ if a.VolumeSource.ScaleIO != nil {
+ v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO)
+ }
+ }
+ for i := range in.Spec.Template.Spec.InitContainers {
+ a := &in.Spec.Template.Spec.InitContainers[i]
+ v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+ for i := range in.Spec.Template.Spec.Containers {
+ a := &in.Spec.Template.Spec.Containers[i]
+ v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+}
+
+func SetObjectDefaults_DaemonSetList(in *DaemonSetList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_DaemonSet(a)
+ }
+}
+
+func SetObjectDefaults_Deployment(in *Deployment) {
+ SetDefaults_Deployment(in)
+ v1.SetDefaults_PodSpec(&in.Spec.Template.Spec)
+ for i := range in.Spec.Template.Spec.Volumes {
+ a := &in.Spec.Template.Spec.Volumes[i]
+ v1.SetDefaults_Volume(a)
+ if a.VolumeSource.Secret != nil {
+ v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
+ }
+ if a.VolumeSource.ISCSI != nil {
+ v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
+ }
+ if a.VolumeSource.RBD != nil {
+ v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
+ }
+ if a.VolumeSource.DownwardAPI != nil {
+ v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
+ for j := range a.VolumeSource.DownwardAPI.Items {
+ b := &a.VolumeSource.DownwardAPI.Items[j]
+ if b.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.FieldRef)
+ }
+ }
+ }
+ if a.VolumeSource.ConfigMap != nil {
+ v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
+ }
+ if a.VolumeSource.AzureDisk != nil {
+ v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
+ }
+ if a.VolumeSource.Projected != nil {
+ v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
+ for j := range a.VolumeSource.Projected.Sources {
+ b := &a.VolumeSource.Projected.Sources[j]
+ if b.DownwardAPI != nil {
+ for k := range b.DownwardAPI.Items {
+ c := &b.DownwardAPI.Items[k]
+ if c.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(c.FieldRef)
+ }
+ }
+ }
+ }
+ }
+ if a.VolumeSource.ScaleIO != nil {
+ v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO)
+ }
+ }
+ for i := range in.Spec.Template.Spec.InitContainers {
+ a := &in.Spec.Template.Spec.InitContainers[i]
+ v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+ for i := range in.Spec.Template.Spec.Containers {
+ a := &in.Spec.Template.Spec.Containers[i]
+ v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+}
+
+func SetObjectDefaults_DeploymentList(in *DeploymentList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_Deployment(a)
+ }
+}
+
+func SetObjectDefaults_NetworkPolicy(in *NetworkPolicy) {
+ SetDefaults_NetworkPolicy(in)
+}
+
+func SetObjectDefaults_NetworkPolicyList(in *NetworkPolicyList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_NetworkPolicy(a)
+ }
+}
+
+func SetObjectDefaults_ReplicaSet(in *ReplicaSet) {
+ SetDefaults_ReplicaSet(in)
+ v1.SetDefaults_PodSpec(&in.Spec.Template.Spec)
+ for i := range in.Spec.Template.Spec.Volumes {
+ a := &in.Spec.Template.Spec.Volumes[i]
+ v1.SetDefaults_Volume(a)
+ if a.VolumeSource.Secret != nil {
+ v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
+ }
+ if a.VolumeSource.ISCSI != nil {
+ v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
+ }
+ if a.VolumeSource.RBD != nil {
+ v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
+ }
+ if a.VolumeSource.DownwardAPI != nil {
+ v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
+ for j := range a.VolumeSource.DownwardAPI.Items {
+ b := &a.VolumeSource.DownwardAPI.Items[j]
+ if b.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.FieldRef)
+ }
+ }
+ }
+ if a.VolumeSource.ConfigMap != nil {
+ v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
+ }
+ if a.VolumeSource.AzureDisk != nil {
+ v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
+ }
+ if a.VolumeSource.Projected != nil {
+ v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
+ for j := range a.VolumeSource.Projected.Sources {
+ b := &a.VolumeSource.Projected.Sources[j]
+ if b.DownwardAPI != nil {
+ for k := range b.DownwardAPI.Items {
+ c := &b.DownwardAPI.Items[k]
+ if c.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(c.FieldRef)
+ }
+ }
+ }
+ }
+ }
+ if a.VolumeSource.ScaleIO != nil {
+ v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO)
+ }
+ }
+ for i := range in.Spec.Template.Spec.InitContainers {
+ a := &in.Spec.Template.Spec.InitContainers[i]
+ v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+ for i := range in.Spec.Template.Spec.Containers {
+ a := &in.Spec.Template.Spec.Containers[i]
+ v1.SetDefaults_Container(a)
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ v1.SetDefaults_ContainerPort(b)
+ }
+ for j := range a.Env {
+ b := &a.Env[j]
+ if b.ValueFrom != nil {
+ if b.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
+ }
+ }
+ }
+ v1.SetDefaults_ResourceList(&a.Resources.Limits)
+ v1.SetDefaults_ResourceList(&a.Resources.Requests)
+ if a.LivenessProbe != nil {
+ v1.SetDefaults_Probe(a.LivenessProbe)
+ if a.LivenessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.ReadinessProbe != nil {
+ v1.SetDefaults_Probe(a.ReadinessProbe)
+ if a.ReadinessProbe.Handler.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
+ }
+ }
+ if a.Lifecycle != nil {
+ if a.Lifecycle.PostStart != nil {
+ if a.Lifecycle.PostStart.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
+ }
+ }
+ if a.Lifecycle.PreStop != nil {
+ if a.Lifecycle.PreStop.HTTPGet != nil {
+ v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
+ }
+ }
+ }
+ }
+}
+
+func SetObjectDefaults_ReplicaSetList(in *ReplicaSetList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_ReplicaSet(a)
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/zz_generated.deepcopy.go
new file mode 100644
index 000000000..0efd6727a
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/zz_generated.deepcopy.go
@@ -0,0 +1,1146 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package extensions
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ intstr "k8s.io/apimachinery/pkg/util/intstr"
+ api "k8s.io/kubernetes/pkg/api"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_APIVersion, InType: reflect.TypeOf(&APIVersion{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_CustomMetricCurrentStatus, InType: reflect.TypeOf(&CustomMetricCurrentStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_CustomMetricCurrentStatusList, InType: reflect.TypeOf(&CustomMetricCurrentStatusList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_CustomMetricTarget, InType: reflect.TypeOf(&CustomMetricTarget{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_CustomMetricTargetList, InType: reflect.TypeOf(&CustomMetricTargetList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DaemonSet, InType: reflect.TypeOf(&DaemonSet{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DaemonSetList, InType: reflect.TypeOf(&DaemonSetList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DaemonSetSpec, InType: reflect.TypeOf(&DaemonSetSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DaemonSetStatus, InType: reflect.TypeOf(&DaemonSetStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DaemonSetUpdateStrategy, InType: reflect.TypeOf(&DaemonSetUpdateStrategy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_Deployment, InType: reflect.TypeOf(&Deployment{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DeploymentCondition, InType: reflect.TypeOf(&DeploymentCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DeploymentList, InType: reflect.TypeOf(&DeploymentList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DeploymentRollback, InType: reflect.TypeOf(&DeploymentRollback{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DeploymentSpec, InType: reflect.TypeOf(&DeploymentSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DeploymentStatus, InType: reflect.TypeOf(&DeploymentStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_DeploymentStrategy, InType: reflect.TypeOf(&DeploymentStrategy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_FSGroupStrategyOptions, InType: reflect.TypeOf(&FSGroupStrategyOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_GroupIDRange, InType: reflect.TypeOf(&GroupIDRange{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_HTTPIngressPath, InType: reflect.TypeOf(&HTTPIngressPath{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_HTTPIngressRuleValue, InType: reflect.TypeOf(&HTTPIngressRuleValue{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_HostPortRange, InType: reflect.TypeOf(&HostPortRange{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_Ingress, InType: reflect.TypeOf(&Ingress{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_IngressBackend, InType: reflect.TypeOf(&IngressBackend{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_IngressList, InType: reflect.TypeOf(&IngressList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_IngressRule, InType: reflect.TypeOf(&IngressRule{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_IngressRuleValue, InType: reflect.TypeOf(&IngressRuleValue{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_IngressSpec, InType: reflect.TypeOf(&IngressSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_IngressStatus, InType: reflect.TypeOf(&IngressStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_IngressTLS, InType: reflect.TypeOf(&IngressTLS{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_NetworkPolicy, InType: reflect.TypeOf(&NetworkPolicy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_NetworkPolicyIngressRule, InType: reflect.TypeOf(&NetworkPolicyIngressRule{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_NetworkPolicyList, InType: reflect.TypeOf(&NetworkPolicyList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_NetworkPolicyPeer, InType: reflect.TypeOf(&NetworkPolicyPeer{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_NetworkPolicyPort, InType: reflect.TypeOf(&NetworkPolicyPort{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_NetworkPolicySpec, InType: reflect.TypeOf(&NetworkPolicySpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_PodSecurityPolicy, InType: reflect.TypeOf(&PodSecurityPolicy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_PodSecurityPolicyList, InType: reflect.TypeOf(&PodSecurityPolicyList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_PodSecurityPolicySpec, InType: reflect.TypeOf(&PodSecurityPolicySpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ReplicaSet, InType: reflect.TypeOf(&ReplicaSet{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ReplicaSetCondition, InType: reflect.TypeOf(&ReplicaSetCondition{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ReplicaSetList, InType: reflect.TypeOf(&ReplicaSetList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ReplicaSetSpec, InType: reflect.TypeOf(&ReplicaSetSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ReplicaSetStatus, InType: reflect.TypeOf(&ReplicaSetStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ReplicationControllerDummy, InType: reflect.TypeOf(&ReplicationControllerDummy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_RollbackConfig, InType: reflect.TypeOf(&RollbackConfig{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_RollingUpdateDaemonSet, InType: reflect.TypeOf(&RollingUpdateDaemonSet{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_RollingUpdateDeployment, InType: reflect.TypeOf(&RollingUpdateDeployment{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_RunAsUserStrategyOptions, InType: reflect.TypeOf(&RunAsUserStrategyOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_SELinuxStrategyOptions, InType: reflect.TypeOf(&SELinuxStrategyOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_Scale, InType: reflect.TypeOf(&Scale{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ScaleSpec, InType: reflect.TypeOf(&ScaleSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ScaleStatus, InType: reflect.TypeOf(&ScaleStatus{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_SupplementalGroupsStrategyOptions, InType: reflect.TypeOf(&SupplementalGroupsStrategyOptions{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ThirdPartyResource, InType: reflect.TypeOf(&ThirdPartyResource{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ThirdPartyResourceData, InType: reflect.TypeOf(&ThirdPartyResourceData{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ThirdPartyResourceDataList, InType: reflect.TypeOf(&ThirdPartyResourceDataList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_ThirdPartyResourceList, InType: reflect.TypeOf(&ThirdPartyResourceList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_extensions_UserIDRange, InType: reflect.TypeOf(&UserIDRange{})},
+ )
+}
+
+// DeepCopy_extensions_APIVersion is an autogenerated deepcopy function.
+func DeepCopy_extensions_APIVersion(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*APIVersion)
+ out := out.(*APIVersion)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_extensions_CustomMetricCurrentStatus is an autogenerated deepcopy function.
+func DeepCopy_extensions_CustomMetricCurrentStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CustomMetricCurrentStatus)
+ out := out.(*CustomMetricCurrentStatus)
+ *out = *in
+ out.CurrentValue = in.CurrentValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_extensions_CustomMetricCurrentStatusList is an autogenerated deepcopy function.
+func DeepCopy_extensions_CustomMetricCurrentStatusList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CustomMetricCurrentStatusList)
+ out := out.(*CustomMetricCurrentStatusList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]CustomMetricCurrentStatus, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_CustomMetricCurrentStatus(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_CustomMetricTarget is an autogenerated deepcopy function.
+func DeepCopy_extensions_CustomMetricTarget(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CustomMetricTarget)
+ out := out.(*CustomMetricTarget)
+ *out = *in
+ out.TargetValue = in.TargetValue.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_extensions_CustomMetricTargetList is an autogenerated deepcopy function.
+func DeepCopy_extensions_CustomMetricTargetList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*CustomMetricTargetList)
+ out := out.(*CustomMetricTargetList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]CustomMetricTarget, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_CustomMetricTarget(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_DaemonSet is an autogenerated deepcopy function.
+func DeepCopy_extensions_DaemonSet(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DaemonSet)
+ out := out.(*DaemonSet)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_extensions_DaemonSetSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_extensions_DaemonSetStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_DaemonSetList is an autogenerated deepcopy function.
+func DeepCopy_extensions_DaemonSetList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DaemonSetList)
+ out := out.(*DaemonSetList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]DaemonSet, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_DaemonSet(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_DaemonSetSpec is an autogenerated deepcopy function.
+func DeepCopy_extensions_DaemonSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DaemonSetSpec)
+ out := out.(*DaemonSetSpec)
+ *out = *in
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if err := api.DeepCopy_api_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_extensions_DaemonSetUpdateStrategy(&in.UpdateStrategy, &out.UpdateStrategy, c); err != nil {
+ return err
+ }
+ if in.RevisionHistoryLimit != nil {
+ in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_DaemonSetStatus is an autogenerated deepcopy function.
+func DeepCopy_extensions_DaemonSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DaemonSetStatus)
+ out := out.(*DaemonSetStatus)
+ *out = *in
+ if in.CollisionCount != nil {
+ in, out := &in.CollisionCount, &out.CollisionCount
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_DaemonSetUpdateStrategy is an autogenerated deepcopy function.
+func DeepCopy_extensions_DaemonSetUpdateStrategy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DaemonSetUpdateStrategy)
+ out := out.(*DaemonSetUpdateStrategy)
+ *out = *in
+ if in.RollingUpdate != nil {
+ in, out := &in.RollingUpdate, &out.RollingUpdate
+ *out = new(RollingUpdateDaemonSet)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_Deployment is an autogenerated deepcopy function.
+func DeepCopy_extensions_Deployment(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Deployment)
+ out := out.(*Deployment)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_extensions_DeploymentSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_extensions_DeploymentStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_DeploymentCondition is an autogenerated deepcopy function.
+func DeepCopy_extensions_DeploymentCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentCondition)
+ out := out.(*DeploymentCondition)
+ *out = *in
+ out.LastUpdateTime = in.LastUpdateTime.DeepCopy()
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_extensions_DeploymentList is an autogenerated deepcopy function.
+func DeepCopy_extensions_DeploymentList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentList)
+ out := out.(*DeploymentList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Deployment, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_Deployment(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_DeploymentRollback is an autogenerated deepcopy function.
+func DeepCopy_extensions_DeploymentRollback(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentRollback)
+ out := out.(*DeploymentRollback)
+ *out = *in
+ if in.UpdatedAnnotations != nil {
+ in, out := &in.UpdatedAnnotations, &out.UpdatedAnnotations
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_DeploymentSpec is an autogenerated deepcopy function.
+func DeepCopy_extensions_DeploymentSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentSpec)
+ out := out.(*DeploymentSpec)
+ *out = *in
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if err := api.DeepCopy_api_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_extensions_DeploymentStrategy(&in.Strategy, &out.Strategy, c); err != nil {
+ return err
+ }
+ if in.RevisionHistoryLimit != nil {
+ in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
+ *out = new(int32)
+ **out = **in
+ }
+ if in.RollbackTo != nil {
+ in, out := &in.RollbackTo, &out.RollbackTo
+ *out = new(RollbackConfig)
+ **out = **in
+ }
+ if in.ProgressDeadlineSeconds != nil {
+ in, out := &in.ProgressDeadlineSeconds, &out.ProgressDeadlineSeconds
+ *out = new(int32)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_DeploymentStatus is an autogenerated deepcopy function.
+func DeepCopy_extensions_DeploymentStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentStatus)
+ out := out.(*DeploymentStatus)
+ *out = *in
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]DeploymentCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_DeploymentCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.CollisionCount != nil {
+ in, out := &in.CollisionCount, &out.CollisionCount
+ *out = new(int64)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_DeploymentStrategy is an autogenerated deepcopy function.
+func DeepCopy_extensions_DeploymentStrategy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*DeploymentStrategy)
+ out := out.(*DeploymentStrategy)
+ *out = *in
+ if in.RollingUpdate != nil {
+ in, out := &in.RollingUpdate, &out.RollingUpdate
+ *out = new(RollingUpdateDeployment)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_FSGroupStrategyOptions is an autogenerated deepcopy function.
+func DeepCopy_extensions_FSGroupStrategyOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*FSGroupStrategyOptions)
+ out := out.(*FSGroupStrategyOptions)
+ *out = *in
+ if in.Ranges != nil {
+ in, out := &in.Ranges, &out.Ranges
+ *out = make([]GroupIDRange, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_GroupIDRange is an autogenerated deepcopy function.
+func DeepCopy_extensions_GroupIDRange(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*GroupIDRange)
+ out := out.(*GroupIDRange)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_extensions_HTTPIngressPath is an autogenerated deepcopy function.
+func DeepCopy_extensions_HTTPIngressPath(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HTTPIngressPath)
+ out := out.(*HTTPIngressPath)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_extensions_HTTPIngressRuleValue is an autogenerated deepcopy function.
+func DeepCopy_extensions_HTTPIngressRuleValue(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HTTPIngressRuleValue)
+ out := out.(*HTTPIngressRuleValue)
+ *out = *in
+ if in.Paths != nil {
+ in, out := &in.Paths, &out.Paths
+ *out = make([]HTTPIngressPath, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_HostPortRange is an autogenerated deepcopy function.
+func DeepCopy_extensions_HostPortRange(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*HostPortRange)
+ out := out.(*HostPortRange)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_extensions_Ingress is an autogenerated deepcopy function.
+func DeepCopy_extensions_Ingress(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Ingress)
+ out := out.(*Ingress)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_extensions_IngressSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_extensions_IngressStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_IngressBackend is an autogenerated deepcopy function.
+func DeepCopy_extensions_IngressBackend(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IngressBackend)
+ out := out.(*IngressBackend)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_extensions_IngressList is an autogenerated deepcopy function.
+func DeepCopy_extensions_IngressList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IngressList)
+ out := out.(*IngressList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Ingress, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_Ingress(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_IngressRule is an autogenerated deepcopy function.
+func DeepCopy_extensions_IngressRule(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IngressRule)
+ out := out.(*IngressRule)
+ *out = *in
+ if err := DeepCopy_extensions_IngressRuleValue(&in.IngressRuleValue, &out.IngressRuleValue, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_IngressRuleValue is an autogenerated deepcopy function.
+func DeepCopy_extensions_IngressRuleValue(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IngressRuleValue)
+ out := out.(*IngressRuleValue)
+ *out = *in
+ if in.HTTP != nil {
+ in, out := &in.HTTP, &out.HTTP
+ *out = new(HTTPIngressRuleValue)
+ if err := DeepCopy_extensions_HTTPIngressRuleValue(*in, *out, c); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_IngressSpec is an autogenerated deepcopy function.
+func DeepCopy_extensions_IngressSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IngressSpec)
+ out := out.(*IngressSpec)
+ *out = *in
+ if in.Backend != nil {
+ in, out := &in.Backend, &out.Backend
+ *out = new(IngressBackend)
+ **out = **in
+ }
+ if in.TLS != nil {
+ in, out := &in.TLS, &out.TLS
+ *out = make([]IngressTLS, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_IngressTLS(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]IngressRule, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_IngressRule(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_IngressStatus is an autogenerated deepcopy function.
+func DeepCopy_extensions_IngressStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IngressStatus)
+ out := out.(*IngressStatus)
+ *out = *in
+ if err := api.DeepCopy_api_LoadBalancerStatus(&in.LoadBalancer, &out.LoadBalancer, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_IngressTLS is an autogenerated deepcopy function.
+func DeepCopy_extensions_IngressTLS(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*IngressTLS)
+ out := out.(*IngressTLS)
+ *out = *in
+ if in.Hosts != nil {
+ in, out := &in.Hosts, &out.Hosts
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_NetworkPolicy is an autogenerated deepcopy function.
+func DeepCopy_extensions_NetworkPolicy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicy)
+ out := out.(*NetworkPolicy)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_extensions_NetworkPolicySpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_NetworkPolicyIngressRule is an autogenerated deepcopy function.
+func DeepCopy_extensions_NetworkPolicyIngressRule(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyIngressRule)
+ out := out.(*NetworkPolicyIngressRule)
+ *out = *in
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]NetworkPolicyPort, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_NetworkPolicyPort(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.From != nil {
+ in, out := &in.From, &out.From
+ *out = make([]NetworkPolicyPeer, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_NetworkPolicyPeer(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_NetworkPolicyList is an autogenerated deepcopy function.
+func DeepCopy_extensions_NetworkPolicyList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyList)
+ out := out.(*NetworkPolicyList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]NetworkPolicy, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_NetworkPolicy(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_NetworkPolicyPeer is an autogenerated deepcopy function.
+func DeepCopy_extensions_NetworkPolicyPeer(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyPeer)
+ out := out.(*NetworkPolicyPeer)
+ *out = *in
+ if in.PodSelector != nil {
+ in, out := &in.PodSelector, &out.PodSelector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if in.NamespaceSelector != nil {
+ in, out := &in.NamespaceSelector, &out.NamespaceSelector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_NetworkPolicyPort is an autogenerated deepcopy function.
+func DeepCopy_extensions_NetworkPolicyPort(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyPort)
+ out := out.(*NetworkPolicyPort)
+ *out = *in
+ if in.Protocol != nil {
+ in, out := &in.Protocol, &out.Protocol
+ *out = new(api.Protocol)
+ **out = **in
+ }
+ if in.Port != nil {
+ in, out := &in.Port, &out.Port
+ *out = new(intstr.IntOrString)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_NetworkPolicySpec is an autogenerated deepcopy function.
+func DeepCopy_extensions_NetworkPolicySpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicySpec)
+ out := out.(*NetworkPolicySpec)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.PodSelector); err != nil {
+ return err
+ } else {
+ out.PodSelector = *newVal.(*v1.LabelSelector)
+ }
+ if in.Ingress != nil {
+ in, out := &in.Ingress, &out.Ingress
+ *out = make([]NetworkPolicyIngressRule, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_NetworkPolicyIngressRule(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_PodSecurityPolicy is an autogenerated deepcopy function.
+func DeepCopy_extensions_PodSecurityPolicy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodSecurityPolicy)
+ out := out.(*PodSecurityPolicy)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_extensions_PodSecurityPolicySpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_PodSecurityPolicyList is an autogenerated deepcopy function.
+func DeepCopy_extensions_PodSecurityPolicyList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodSecurityPolicyList)
+ out := out.(*PodSecurityPolicyList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodSecurityPolicy, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_PodSecurityPolicy(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_PodSecurityPolicySpec is an autogenerated deepcopy function.
+func DeepCopy_extensions_PodSecurityPolicySpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodSecurityPolicySpec)
+ out := out.(*PodSecurityPolicySpec)
+ *out = *in
+ if in.DefaultAddCapabilities != nil {
+ in, out := &in.DefaultAddCapabilities, &out.DefaultAddCapabilities
+ *out = make([]api.Capability, len(*in))
+ copy(*out, *in)
+ }
+ if in.RequiredDropCapabilities != nil {
+ in, out := &in.RequiredDropCapabilities, &out.RequiredDropCapabilities
+ *out = make([]api.Capability, len(*in))
+ copy(*out, *in)
+ }
+ if in.AllowedCapabilities != nil {
+ in, out := &in.AllowedCapabilities, &out.AllowedCapabilities
+ *out = make([]api.Capability, len(*in))
+ copy(*out, *in)
+ }
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]FSType, len(*in))
+ copy(*out, *in)
+ }
+ if in.HostPorts != nil {
+ in, out := &in.HostPorts, &out.HostPorts
+ *out = make([]HostPortRange, len(*in))
+ copy(*out, *in)
+ }
+ if err := DeepCopy_extensions_SELinuxStrategyOptions(&in.SELinux, &out.SELinux, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_extensions_RunAsUserStrategyOptions(&in.RunAsUser, &out.RunAsUser, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_extensions_SupplementalGroupsStrategyOptions(&in.SupplementalGroups, &out.SupplementalGroups, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_extensions_FSGroupStrategyOptions(&in.FSGroup, &out.FSGroup, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_ReplicaSet is an autogenerated deepcopy function.
+func DeepCopy_extensions_ReplicaSet(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicaSet)
+ out := out.(*ReplicaSet)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_extensions_ReplicaSetSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_extensions_ReplicaSetStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_ReplicaSetCondition is an autogenerated deepcopy function.
+func DeepCopy_extensions_ReplicaSetCondition(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicaSetCondition)
+ out := out.(*ReplicaSetCondition)
+ *out = *in
+ out.LastTransitionTime = in.LastTransitionTime.DeepCopy()
+ return nil
+ }
+}
+
+// DeepCopy_extensions_ReplicaSetList is an autogenerated deepcopy function.
+func DeepCopy_extensions_ReplicaSetList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicaSetList)
+ out := out.(*ReplicaSetList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ReplicaSet, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_ReplicaSet(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_ReplicaSetSpec is an autogenerated deepcopy function.
+func DeepCopy_extensions_ReplicaSetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicaSetSpec)
+ out := out.(*ReplicaSetSpec)
+ *out = *in
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if err := api.DeepCopy_api_PodTemplateSpec(&in.Template, &out.Template, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_ReplicaSetStatus is an autogenerated deepcopy function.
+func DeepCopy_extensions_ReplicaSetStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicaSetStatus)
+ out := out.(*ReplicaSetStatus)
+ *out = *in
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]ReplicaSetCondition, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_ReplicaSetCondition(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_ReplicationControllerDummy is an autogenerated deepcopy function.
+func DeepCopy_extensions_ReplicationControllerDummy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ReplicationControllerDummy)
+ out := out.(*ReplicationControllerDummy)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_extensions_RollbackConfig is an autogenerated deepcopy function.
+func DeepCopy_extensions_RollbackConfig(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RollbackConfig)
+ out := out.(*RollbackConfig)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_extensions_RollingUpdateDaemonSet is an autogenerated deepcopy function.
+func DeepCopy_extensions_RollingUpdateDaemonSet(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RollingUpdateDaemonSet)
+ out := out.(*RollingUpdateDaemonSet)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_extensions_RollingUpdateDeployment is an autogenerated deepcopy function.
+func DeepCopy_extensions_RollingUpdateDeployment(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RollingUpdateDeployment)
+ out := out.(*RollingUpdateDeployment)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_extensions_RunAsUserStrategyOptions is an autogenerated deepcopy function.
+func DeepCopy_extensions_RunAsUserStrategyOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RunAsUserStrategyOptions)
+ out := out.(*RunAsUserStrategyOptions)
+ *out = *in
+ if in.Ranges != nil {
+ in, out := &in.Ranges, &out.Ranges
+ *out = make([]UserIDRange, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_SELinuxStrategyOptions is an autogenerated deepcopy function.
+func DeepCopy_extensions_SELinuxStrategyOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SELinuxStrategyOptions)
+ out := out.(*SELinuxStrategyOptions)
+ *out = *in
+ if in.SELinuxOptions != nil {
+ in, out := &in.SELinuxOptions, &out.SELinuxOptions
+ *out = new(api.SELinuxOptions)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_Scale is an autogenerated deepcopy function.
+func DeepCopy_extensions_Scale(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Scale)
+ out := out.(*Scale)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_extensions_ScaleStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_ScaleSpec is an autogenerated deepcopy function.
+func DeepCopy_extensions_ScaleSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ScaleSpec)
+ out := out.(*ScaleSpec)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_extensions_ScaleStatus is an autogenerated deepcopy function.
+func DeepCopy_extensions_ScaleStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ScaleStatus)
+ out := out.(*ScaleStatus)
+ *out = *in
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_SupplementalGroupsStrategyOptions is an autogenerated deepcopy function.
+func DeepCopy_extensions_SupplementalGroupsStrategyOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*SupplementalGroupsStrategyOptions)
+ out := out.(*SupplementalGroupsStrategyOptions)
+ *out = *in
+ if in.Ranges != nil {
+ in, out := &in.Ranges, &out.Ranges
+ *out = make([]GroupIDRange, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_ThirdPartyResource is an autogenerated deepcopy function.
+func DeepCopy_extensions_ThirdPartyResource(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ThirdPartyResource)
+ out := out.(*ThirdPartyResource)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Versions != nil {
+ in, out := &in.Versions, &out.Versions
+ *out = make([]APIVersion, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_ThirdPartyResourceData is an autogenerated deepcopy function.
+func DeepCopy_extensions_ThirdPartyResourceData(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ThirdPartyResourceData)
+ out := out.(*ThirdPartyResourceData)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Data != nil {
+ in, out := &in.Data, &out.Data
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_ThirdPartyResourceDataList is an autogenerated deepcopy function.
+func DeepCopy_extensions_ThirdPartyResourceDataList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ThirdPartyResourceDataList)
+ out := out.(*ThirdPartyResourceDataList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ThirdPartyResourceData, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_ThirdPartyResourceData(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_ThirdPartyResourceList is an autogenerated deepcopy function.
+func DeepCopy_extensions_ThirdPartyResourceList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ThirdPartyResourceList)
+ out := out.(*ThirdPartyResourceList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ThirdPartyResource, len(*in))
+ for i := range *in {
+ if err := DeepCopy_extensions_ThirdPartyResource(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_extensions_UserIDRange is an autogenerated deepcopy function.
+func DeepCopy_extensions_UserIDRange(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*UserIDRange)
+ out := out.(*UserIDRange)
+ *out = *in
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/networking/doc.go
new file mode 100644
index 000000000..b583051ca
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/networking/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +groupName=networking.k8s.io
+package networking // import "k8s.io/kubernetes/pkg/apis/networking"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/register.go b/vendor/k8s.io/kubernetes/pkg/apis/networking/register.go
new file mode 100644
index 000000000..4d58a210d
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/networking/register.go
@@ -0,0 +1,51 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package networking
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "networking.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &NetworkPolicy{},
+ &NetworkPolicyList{},
+ )
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/types.go b/vendor/k8s.io/kubernetes/pkg/apis/networking/types.go
new file mode 100644
index 000000000..f889543ed
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/networking/types.go
@@ -0,0 +1,115 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package networking
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/util/intstr"
+ "k8s.io/kubernetes/pkg/api"
+)
+
+// +genclient=true
+
+// NetworkPolicy describes what network traffic is allowed for a set of Pods
+type NetworkPolicy struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Specification of the desired behavior for this NetworkPolicy.
+ // +optional
+ Spec NetworkPolicySpec
+}
+
+// NetworkPolicySpec provides the specification of a NetworkPolicy
+type NetworkPolicySpec struct {
+ // Selects the pods to which this NetworkPolicy object applies. The array of
+ // ingress rules is applied to any pods selected by this field. Multiple network
+ // policies can select the same set of pods. In this case, the ingress rules for
+ // each are combined additively. This field is NOT optional and follows standard
+ // label selector semantics. An empty podSelector matches all pods in this
+ // namespace.
+ PodSelector metav1.LabelSelector
+
+ // List of ingress rules to be applied to the selected pods. Traffic is allowed to
+ // a pod if there are no NetworkPolicies selecting the pod
+ // (and cluster policy otherwise allows the traffic), OR if the traffic source is
+ // the pod's local node, OR if the traffic matches at least one ingress rule
+ // across all of the NetworkPolicy objects whose podSelector matches the pod. If
+ // this field is empty then this NetworkPolicy does not allow any traffic (and serves
+ // solely to ensure that the pods it selects are isolated by default)
+ // +optional
+ Ingress []NetworkPolicyIngressRule
+}
+
+// NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
+// matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
+type NetworkPolicyIngressRule struct {
+ // List of ports which should be made accessible on the pods selected for this
+ // rule. Each item in this list is combined using a logical OR. If this field is
+ // empty or missing, this rule matches all ports (traffic not restricted by port).
+ // If this field is present and contains at least one item, then this rule allows
+ // traffic only if the traffic matches at least one port in the list.
+ // +optional
+ Ports []NetworkPolicyPort
+
+ // List of sources which should be able to access the pods selected for this rule.
+ // Items in this list are combined using a logical OR operation. If this field is
+ // empty or missing, this rule matches all sources (traffic not restricted by
+ // source). If this field is present and contains at least on item, this rule
+ // allows traffic only if the traffic matches at least one item in the from list.
+ // +optional
+ From []NetworkPolicyPeer
+}
+
+// NetworkPolicyPort describes a port to allow traffic on
+type NetworkPolicyPort struct {
+ // The protocol (TCP or UDP) which traffic must match. If not specified, this
+ // field defaults to TCP.
+ // +optional
+ Protocol *api.Protocol
+
+ // The port on the given protocol. This can either be a numerical or named port on
+ // a pod. If this field is not provided, this matches all port names and numbers.
+ // +optional
+ Port *intstr.IntOrString
+}
+
+// NetworkPolicyPeer describes a peer to allow traffic from. Exactly one of its fields
+// must be specified.
+type NetworkPolicyPeer struct {
+ // This is a label selector which selects Pods in this namespace. This field
+ // follows standard label selector semantics. If present but empty, this selector
+ // selects all pods in this namespace.
+ // +optional
+ PodSelector *metav1.LabelSelector
+
+ // Selects Namespaces using cluster scoped-labels. This matches all pods in all
+ // namespaces selected by this label selector. This field follows standard label
+ // selector semantics. If present but empty, this selector selects all namespaces.
+ // +optional
+ NamespaceSelector *metav1.LabelSelector
+}
+
+// NetworkPolicyList is a list of NetworkPolicy objects.
+type NetworkPolicyList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []NetworkPolicy
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/conversion.go
new file mode 100644
index 000000000..b6d1a36df
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/conversion.go
@@ -0,0 +1,195 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/conversion"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/apis/extensions"
+)
+
+func addConversionFuncs(scheme *runtime.Scheme) error {
+ return scheme.AddConversionFuncs(
+ Convert_v1_NetworkPolicy_To_extensions_NetworkPolicy,
+ Convert_extensions_NetworkPolicy_To_v1_NetworkPolicy,
+ Convert_v1_NetworkPolicyIngressRule_To_extensions_NetworkPolicyIngressRule,
+ Convert_extensions_NetworkPolicyIngressRule_To_v1_NetworkPolicyIngressRule,
+ Convert_v1_NetworkPolicyList_To_extensions_NetworkPolicyList,
+ Convert_extensions_NetworkPolicyList_To_v1_NetworkPolicyList,
+ Convert_v1_NetworkPolicyPeer_To_extensions_NetworkPolicyPeer,
+ Convert_extensions_NetworkPolicyPeer_To_v1_NetworkPolicyPeer,
+ Convert_v1_NetworkPolicyPort_To_extensions_NetworkPolicyPort,
+ Convert_extensions_NetworkPolicyPort_To_v1_NetworkPolicyPort,
+ Convert_v1_NetworkPolicySpec_To_extensions_NetworkPolicySpec,
+ Convert_extensions_NetworkPolicySpec_To_v1_NetworkPolicySpec,
+ )
+}
+
+func Convert_v1_NetworkPolicy_To_extensions_NetworkPolicy(in *NetworkPolicy, out *extensions.NetworkPolicy, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ return Convert_v1_NetworkPolicySpec_To_extensions_NetworkPolicySpec(&in.Spec, &out.Spec, s)
+}
+
+func Convert_extensions_NetworkPolicy_To_v1_NetworkPolicy(in *extensions.NetworkPolicy, out *NetworkPolicy, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ return Convert_extensions_NetworkPolicySpec_To_v1_NetworkPolicySpec(&in.Spec, &out.Spec, s)
+}
+
+func Convert_v1_NetworkPolicySpec_To_extensions_NetworkPolicySpec(in *NetworkPolicySpec, out *extensions.NetworkPolicySpec, s conversion.Scope) error {
+ if err := s.Convert(&in.PodSelector, &out.PodSelector, 0); err != nil {
+ return err
+ }
+ out.Ingress = make([]extensions.NetworkPolicyIngressRule, len(in.Ingress))
+ for i := range in.Ingress {
+ if err := Convert_v1_NetworkPolicyIngressRule_To_extensions_NetworkPolicyIngressRule(&in.Ingress[i], &out.Ingress[i], s); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func Convert_extensions_NetworkPolicySpec_To_v1_NetworkPolicySpec(in *extensions.NetworkPolicySpec, out *NetworkPolicySpec, s conversion.Scope) error {
+ if err := s.Convert(&in.PodSelector, &out.PodSelector, 0); err != nil {
+ return err
+ }
+ out.Ingress = make([]NetworkPolicyIngressRule, len(in.Ingress))
+ for i := range in.Ingress {
+ if err := Convert_extensions_NetworkPolicyIngressRule_To_v1_NetworkPolicyIngressRule(&in.Ingress[i], &out.Ingress[i], s); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func Convert_v1_NetworkPolicyIngressRule_To_extensions_NetworkPolicyIngressRule(in *NetworkPolicyIngressRule, out *extensions.NetworkPolicyIngressRule, s conversion.Scope) error {
+ out.Ports = make([]extensions.NetworkPolicyPort, len(in.Ports))
+ for i := range in.Ports {
+ if err := Convert_v1_NetworkPolicyPort_To_extensions_NetworkPolicyPort(&in.Ports[i], &out.Ports[i], s); err != nil {
+ return err
+ }
+ }
+ out.From = make([]extensions.NetworkPolicyPeer, len(in.From))
+ for i := range in.From {
+ if err := Convert_v1_NetworkPolicyPeer_To_extensions_NetworkPolicyPeer(&in.From[i], &out.From[i], s); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func Convert_extensions_NetworkPolicyIngressRule_To_v1_NetworkPolicyIngressRule(in *extensions.NetworkPolicyIngressRule, out *NetworkPolicyIngressRule, s conversion.Scope) error {
+ out.Ports = make([]NetworkPolicyPort, len(in.Ports))
+ for i := range in.Ports {
+ if err := Convert_extensions_NetworkPolicyPort_To_v1_NetworkPolicyPort(&in.Ports[i], &out.Ports[i], s); err != nil {
+ return err
+ }
+ }
+ out.From = make([]NetworkPolicyPeer, len(in.From))
+ for i := range in.From {
+ if err := Convert_extensions_NetworkPolicyPeer_To_v1_NetworkPolicyPeer(&in.From[i], &out.From[i], s); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func Convert_v1_NetworkPolicyPeer_To_extensions_NetworkPolicyPeer(in *NetworkPolicyPeer, out *extensions.NetworkPolicyPeer, s conversion.Scope) error {
+ if in.PodSelector != nil {
+ out.PodSelector = new(metav1.LabelSelector)
+ if err := s.Convert(in.PodSelector, out.PodSelector, 0); err != nil {
+ return err
+ }
+ } else {
+ out.PodSelector = nil
+ }
+ if in.NamespaceSelector != nil {
+ out.NamespaceSelector = new(metav1.LabelSelector)
+ if err := s.Convert(in.NamespaceSelector, out.NamespaceSelector, 0); err != nil {
+ return err
+ }
+ } else {
+ out.NamespaceSelector = nil
+ }
+ return nil
+}
+
+func Convert_extensions_NetworkPolicyPeer_To_v1_NetworkPolicyPeer(in *extensions.NetworkPolicyPeer, out *NetworkPolicyPeer, s conversion.Scope) error {
+ if in.PodSelector != nil {
+ out.PodSelector = new(metav1.LabelSelector)
+ if err := s.Convert(in.PodSelector, out.PodSelector, 0); err != nil {
+ return err
+ }
+ } else {
+ out.PodSelector = nil
+ }
+ if in.NamespaceSelector != nil {
+ out.NamespaceSelector = new(metav1.LabelSelector)
+ if err := s.Convert(in.NamespaceSelector, out.NamespaceSelector, 0); err != nil {
+ return err
+ }
+ } else {
+ out.NamespaceSelector = nil
+ }
+ return nil
+}
+
+func Convert_v1_NetworkPolicyPort_To_extensions_NetworkPolicyPort(in *NetworkPolicyPort, out *extensions.NetworkPolicyPort, s conversion.Scope) error {
+ if in.Protocol != nil {
+ out.Protocol = new(api.Protocol)
+ *out.Protocol = api.Protocol(*in.Protocol)
+ } else {
+ out.Protocol = nil
+ }
+ out.Port = in.Port
+ return nil
+}
+
+func Convert_extensions_NetworkPolicyPort_To_v1_NetworkPolicyPort(in *extensions.NetworkPolicyPort, out *NetworkPolicyPort, s conversion.Scope) error {
+ if in.Protocol != nil {
+ out.Protocol = new(v1.Protocol)
+ *out.Protocol = v1.Protocol(*in.Protocol)
+ } else {
+ out.Protocol = nil
+ }
+ out.Port = in.Port
+ return nil
+}
+
+func Convert_v1_NetworkPolicyList_To_extensions_NetworkPolicyList(in *NetworkPolicyList, out *extensions.NetworkPolicyList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = make([]extensions.NetworkPolicy, len(in.Items))
+ for i := range in.Items {
+ if err := Convert_v1_NetworkPolicy_To_extensions_NetworkPolicy(&in.Items[i], &out.Items[i], s); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func Convert_extensions_NetworkPolicyList_To_v1_NetworkPolicyList(in *extensions.NetworkPolicyList, out *NetworkPolicyList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = make([]NetworkPolicy, len(in.Items))
+ for i := range in.Items {
+ if err := Convert_extensions_NetworkPolicy_To_v1_NetworkPolicy(&in.Items[i], &out.Items[i], s); err != nil {
+ return err
+ }
+ }
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/defaults.go
new file mode 100644
index 000000000..e4aeaaa68
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/defaults.go
@@ -0,0 +1,34 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/kubernetes/pkg/api/v1"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
+
+func SetDefaults_NetworkPolicyPort(obj *NetworkPolicyPort) {
+ // Default any undefined Protocol fields to TCP.
+ if obj.Protocol == nil {
+ proto := v1.ProtocolTCP
+ obj.Protocol = &proto
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/doc.go
new file mode 100644
index 000000000..e4000f86c
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/doc.go
@@ -0,0 +1,22 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/networking
+// +k8s:openapi-gen=true
+// +k8s:defaulter-gen=TypeMeta
+// +groupName=networking.k8s.io
+package v1 // import "k8s.io/kubernetes/pkg/apis/networking/v1"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/generated.pb.go
new file mode 100644
index 000000000..45e7dfef1
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/generated.pb.go
@@ -0,0 +1,1345 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/networking/v1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/networking/v1/generated.proto
+
+ It has these top-level messages:
+ NetworkPolicy
+ NetworkPolicyIngressRule
+ NetworkPolicyList
+ NetworkPolicyPeer
+ NetworkPolicyPort
+ NetworkPolicySpec
+*/
+package v1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+import k8s_io_apimachinery_pkg_util_intstr "k8s.io/apimachinery/pkg/util/intstr"
+
+import k8s_io_kubernetes_pkg_api_v1 "k8s.io/kubernetes/pkg/api/v1"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *NetworkPolicy) Reset() { *m = NetworkPolicy{} }
+func (*NetworkPolicy) ProtoMessage() {}
+func (*NetworkPolicy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *NetworkPolicyIngressRule) Reset() { *m = NetworkPolicyIngressRule{} }
+func (*NetworkPolicyIngressRule) ProtoMessage() {}
+func (*NetworkPolicyIngressRule) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{1}
+}
+
+func (m *NetworkPolicyList) Reset() { *m = NetworkPolicyList{} }
+func (*NetworkPolicyList) ProtoMessage() {}
+func (*NetworkPolicyList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
+
+func (m *NetworkPolicyPeer) Reset() { *m = NetworkPolicyPeer{} }
+func (*NetworkPolicyPeer) ProtoMessage() {}
+func (*NetworkPolicyPeer) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
+
+func (m *NetworkPolicyPort) Reset() { *m = NetworkPolicyPort{} }
+func (*NetworkPolicyPort) ProtoMessage() {}
+func (*NetworkPolicyPort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
+
+func (m *NetworkPolicySpec) Reset() { *m = NetworkPolicySpec{} }
+func (*NetworkPolicySpec) ProtoMessage() {}
+func (*NetworkPolicySpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
+
+func init() {
+ proto.RegisterType((*NetworkPolicy)(nil), "k8s.io.kubernetes.pkg.apis.networking.v1.NetworkPolicy")
+ proto.RegisterType((*NetworkPolicyIngressRule)(nil), "k8s.io.kubernetes.pkg.apis.networking.v1.NetworkPolicyIngressRule")
+ proto.RegisterType((*NetworkPolicyList)(nil), "k8s.io.kubernetes.pkg.apis.networking.v1.NetworkPolicyList")
+ proto.RegisterType((*NetworkPolicyPeer)(nil), "k8s.io.kubernetes.pkg.apis.networking.v1.NetworkPolicyPeer")
+ proto.RegisterType((*NetworkPolicyPort)(nil), "k8s.io.kubernetes.pkg.apis.networking.v1.NetworkPolicyPort")
+ proto.RegisterType((*NetworkPolicySpec)(nil), "k8s.io.kubernetes.pkg.apis.networking.v1.NetworkPolicySpec")
+}
+func (m *NetworkPolicy) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NetworkPolicy) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n2, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ return i, nil
+}
+
+func (m *NetworkPolicyIngressRule) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NetworkPolicyIngressRule) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Ports) > 0 {
+ for _, msg := range m.Ports {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.From) > 0 {
+ for _, msg := range m.From {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *NetworkPolicyList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NetworkPolicyList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n3, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *NetworkPolicyPeer) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NetworkPolicyPeer) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.PodSelector != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PodSelector.Size()))
+ n4, err := m.PodSelector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ }
+ if m.NamespaceSelector != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.NamespaceSelector.Size()))
+ n5, err := m.NamespaceSelector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ }
+ return i, nil
+}
+
+func (m *NetworkPolicyPort) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NetworkPolicyPort) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Protocol != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Protocol)))
+ i += copy(dAtA[i:], *m.Protocol)
+ }
+ if m.Port != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Port.Size()))
+ n6, err := m.Port.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ }
+ return i, nil
+}
+
+func (m *NetworkPolicySpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NetworkPolicySpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PodSelector.Size()))
+ n7, err := m.PodSelector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ if len(m.Ingress) > 0 {
+ for _, msg := range m.Ingress {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *NetworkPolicy) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *NetworkPolicyIngressRule) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Ports) > 0 {
+ for _, e := range m.Ports {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.From) > 0 {
+ for _, e := range m.From {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *NetworkPolicyList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *NetworkPolicyPeer) Size() (n int) {
+ var l int
+ _ = l
+ if m.PodSelector != nil {
+ l = m.PodSelector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.NamespaceSelector != nil {
+ l = m.NamespaceSelector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *NetworkPolicyPort) Size() (n int) {
+ var l int
+ _ = l
+ if m.Protocol != nil {
+ l = len(*m.Protocol)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Port != nil {
+ l = m.Port.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *NetworkPolicySpec) Size() (n int) {
+ var l int
+ _ = l
+ l = m.PodSelector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Ingress) > 0 {
+ for _, e := range m.Ingress {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *NetworkPolicy) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NetworkPolicy{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NetworkPolicySpec", "NetworkPolicySpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NetworkPolicyIngressRule) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NetworkPolicyIngressRule{`,
+ `Ports:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ports), "NetworkPolicyPort", "NetworkPolicyPort", 1), `&`, ``, 1) + `,`,
+ `From:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.From), "NetworkPolicyPeer", "NetworkPolicyPeer", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NetworkPolicyList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NetworkPolicyList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "NetworkPolicy", "NetworkPolicy", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NetworkPolicyPeer) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NetworkPolicyPeer{`,
+ `PodSelector:` + strings.Replace(fmt.Sprintf("%v", this.PodSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
+ `NamespaceSelector:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NetworkPolicyPort) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NetworkPolicyPort{`,
+ `Protocol:` + valueToStringGenerated(this.Protocol) + `,`,
+ `Port:` + strings.Replace(fmt.Sprintf("%v", this.Port), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NetworkPolicySpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NetworkPolicySpec{`,
+ `PodSelector:` + strings.Replace(strings.Replace(this.PodSelector.String(), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1), `&`, ``, 1) + `,`,
+ `Ingress:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ingress), "NetworkPolicyIngressRule", "NetworkPolicyIngressRule", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *NetworkPolicy) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NetworkPolicy: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NetworkPolicy: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NetworkPolicyIngressRule) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NetworkPolicyIngressRule: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NetworkPolicyIngressRule: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Ports = append(m.Ports, NetworkPolicyPort{})
+ if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field From", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.From = append(m.From, NetworkPolicyPeer{})
+ if err := m.From[len(m.From)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NetworkPolicyList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NetworkPolicyList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NetworkPolicyList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, NetworkPolicy{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NetworkPolicyPeer) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NetworkPolicyPeer: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NetworkPolicyPeer: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodSelector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PodSelector == nil {
+ m.PodSelector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
+ }
+ if err := m.PodSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NamespaceSelector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.NamespaceSelector == nil {
+ m.NamespaceSelector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
+ }
+ if err := m.NamespaceSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NetworkPolicyPort) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NetworkPolicyPort: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NetworkPolicyPort: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ s := k8s_io_kubernetes_pkg_api_v1.Protocol(dAtA[iNdEx:postIndex])
+ m.Protocol = &s
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Port == nil {
+ m.Port = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
+ }
+ if err := m.Port.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NetworkPolicySpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NetworkPolicySpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NetworkPolicySpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodSelector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.PodSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Ingress", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Ingress = append(m.Ingress, NetworkPolicyIngressRule{})
+ if err := m.Ingress[len(m.Ingress)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/kubernetes/pkg/apis/networking/v1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 666 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcf, 0x4f, 0x13, 0x41,
+ 0x18, 0xed, 0x56, 0x08, 0x75, 0x90, 0x20, 0x6b, 0x4c, 0x1a, 0x0e, 0x5b, 0xd2, 0xc4, 0x84, 0x83,
+ 0xce, 0x5a, 0xf1, 0x07, 0xc6, 0x78, 0xd9, 0x83, 0x09, 0x89, 0x42, 0x5d, 0x6e, 0x06, 0x13, 0xa6,
+ 0xcb, 0xc7, 0x32, 0xb4, 0x3b, 0xb3, 0x99, 0x99, 0x56, 0xb8, 0xf9, 0x27, 0xf8, 0xd7, 0xf8, 0x37,
+ 0x70, 0x93, 0x23, 0x89, 0x49, 0x23, 0xeb, 0xdd, 0x9b, 0x17, 0x4f, 0x66, 0x76, 0xa7, 0x6c, 0x61,
+ 0x59, 0x24, 0xc5, 0xdb, 0xcc, 0xe4, 0x7b, 0xef, 0x7d, 0x6f, 0xde, 0x37, 0x83, 0x56, 0xbb, 0xab,
+ 0x12, 0x53, 0xee, 0x76, 0xfb, 0x1d, 0x10, 0x0c, 0x14, 0x48, 0x37, 0xee, 0x86, 0x2e, 0x89, 0xa9,
+ 0x74, 0x19, 0xa8, 0x4f, 0x5c, 0x74, 0x29, 0x0b, 0xdd, 0x41, 0xcb, 0x0d, 0x81, 0x81, 0x20, 0x0a,
+ 0x76, 0x70, 0x2c, 0xb8, 0xe2, 0xf6, 0x72, 0x86, 0xc4, 0x39, 0x12, 0xc7, 0xdd, 0x10, 0x6b, 0x24,
+ 0xce, 0x91, 0x78, 0xd0, 0x5a, 0x7c, 0x14, 0x52, 0xb5, 0xd7, 0xef, 0xe0, 0x80, 0x47, 0x6e, 0xc8,
+ 0x43, 0xee, 0xa6, 0x04, 0x9d, 0xfe, 0x6e, 0xba, 0x4b, 0x37, 0xe9, 0x2a, 0x23, 0x5e, 0x7c, 0x6a,
+ 0x5a, 0x22, 0x31, 0x8d, 0x48, 0xb0, 0x47, 0x19, 0x88, 0xc3, 0xbc, 0xa9, 0x08, 0x14, 0xb9, 0xa4,
+ 0x9d, 0x45, 0xb7, 0x0c, 0x25, 0xfa, 0x4c, 0xd1, 0x08, 0x0a, 0x80, 0xe7, 0xff, 0x02, 0xc8, 0x60,
+ 0x0f, 0x22, 0x52, 0xc0, 0xad, 0x94, 0xe1, 0xfa, 0x8a, 0xf6, 0x5c, 0xca, 0x94, 0x54, 0xa2, 0x00,
+ 0x7a, 0x58, 0x7a, 0xcd, 0x97, 0x79, 0x79, 0x7d, 0x45, 0x28, 0x70, 0xa0, 0x80, 0x49, 0xca, 0x99,
+ 0x74, 0x07, 0xad, 0x0e, 0x28, 0x52, 0x84, 0xbf, 0xbc, 0x02, 0x1e, 0xf3, 0x1e, 0x0d, 0x0e, 0xcb,
+ 0xa0, 0xcd, 0x63, 0x0b, 0xcd, 0xad, 0x67, 0xe1, 0xb5, 0xd3, 0x4a, 0x7b, 0x1b, 0xd5, 0xf4, 0x95,
+ 0xef, 0x10, 0x45, 0xea, 0xd6, 0x92, 0xb5, 0x3c, 0xfb, 0xe4, 0x31, 0x36, 0xc9, 0x8f, 0xdf, 0x40,
+ 0x9e, 0xbd, 0xae, 0xc6, 0x83, 0x16, 0xde, 0xe8, 0xec, 0x43, 0xa0, 0xde, 0x81, 0x22, 0x9e, 0x7d,
+ 0x34, 0x6c, 0x54, 0x92, 0x61, 0x03, 0xe5, 0x67, 0xfe, 0x19, 0xab, 0xfd, 0x11, 0x4d, 0xc9, 0x18,
+ 0x82, 0x7a, 0x35, 0x65, 0x7f, 0x85, 0xaf, 0x3b, 0x57, 0xf8, 0x5c, 0xa3, 0x9b, 0x31, 0x04, 0xde,
+ 0x1d, 0x23, 0x34, 0xa5, 0x77, 0x7e, 0x4a, 0xdb, 0xfc, 0x6e, 0xa1, 0xfa, 0xb9, 0xca, 0x35, 0x16,
+ 0x0a, 0x90, 0xd2, 0xef, 0xf7, 0xc0, 0xde, 0x46, 0xd3, 0x31, 0x17, 0x4a, 0xd6, 0xad, 0xa5, 0x5b,
+ 0x37, 0x10, 0x6f, 0x73, 0xa1, 0xbc, 0x39, 0x23, 0x3e, 0xad, 0x77, 0xd2, 0xcf, 0x88, 0xb5, 0xbb,
+ 0x5d, 0xc1, 0xa3, 0x7a, 0xf5, 0x66, 0x02, 0x00, 0x22, 0x77, 0xf7, 0x46, 0xf0, 0xc8, 0x4f, 0x69,
+ 0x9b, 0xdf, 0x2c, 0xb4, 0x70, 0xae, 0xf2, 0x2d, 0x95, 0xca, 0xde, 0x2a, 0x84, 0x86, 0xaf, 0x17,
+ 0x9a, 0x46, 0xa7, 0x91, 0xdd, 0x35, 0x5a, 0xb5, 0xd1, 0xc9, 0x58, 0x60, 0x5b, 0x68, 0x9a, 0x2a,
+ 0x88, 0xa4, 0xf1, 0xf4, 0x62, 0x42, 0x4f, 0xf9, 0x85, 0xad, 0x69, 0x36, 0x3f, 0x23, 0x6d, 0xfe,
+ 0xbe, 0xe8, 0x48, 0x7b, 0xb7, 0x77, 0xd1, 0x6c, 0xcc, 0x77, 0x36, 0xa1, 0x07, 0x81, 0xe2, 0xc2,
+ 0x98, 0x5a, 0xb9, 0xa6, 0x29, 0xd2, 0x81, 0xde, 0x08, 0xea, 0xcd, 0x27, 0xc3, 0xc6, 0x6c, 0x3b,
+ 0xe7, 0xf2, 0xc7, 0x89, 0xed, 0x03, 0xb4, 0xc0, 0x48, 0x04, 0x32, 0x26, 0x01, 0x9c, 0xa9, 0x55,
+ 0x27, 0x57, 0xbb, 0x9f, 0x0c, 0x1b, 0x0b, 0xeb, 0x17, 0x19, 0xfd, 0xa2, 0x48, 0xf3, 0x6b, 0xc1,
+ 0x37, 0x17, 0xca, 0x7e, 0x8f, 0x6a, 0xe9, 0xcb, 0x0c, 0x78, 0x2f, 0x35, 0x7d, 0xdb, 0x7b, 0xa6,
+ 0x53, 0x69, 0x9b, 0xb3, 0x3f, 0xc3, 0xc6, 0x83, 0xab, 0xbe, 0x16, 0x3c, 0x2a, 0xf4, 0xcf, 0x68,
+ 0xec, 0x75, 0x34, 0xa5, 0x47, 0xd3, 0xb8, 0x2a, 0x7f, 0xcd, 0xfa, 0x3f, 0xc3, 0xd9, 0x7f, 0x86,
+ 0xd7, 0x98, 0xda, 0x10, 0x9b, 0x4a, 0x50, 0x16, 0x7a, 0x35, 0x3d, 0x82, 0xba, 0x39, 0x3f, 0xe5,
+ 0x69, 0xfe, 0xba, 0xd8, 0xb8, 0x7e, 0x7c, 0xf6, 0xfe, 0x7f, 0x0b, 0xec, 0x9e, 0x19, 0x93, 0xf2,
+ 0xd0, 0x22, 0x34, 0x43, 0xb3, 0x47, 0x6d, 0x46, 0xd2, 0x9b, 0x70, 0x24, 0xc7, 0xbe, 0x06, 0x6f,
+ 0xde, 0xc8, 0xce, 0x8c, 0x0e, 0x47, 0x1a, 0xde, 0xf2, 0xd1, 0xa9, 0x53, 0x39, 0x3e, 0x75, 0x2a,
+ 0x27, 0xa7, 0x4e, 0xe5, 0x73, 0xe2, 0x58, 0x47, 0x89, 0x63, 0x1d, 0x27, 0x8e, 0x75, 0x92, 0x38,
+ 0xd6, 0x8f, 0xc4, 0xb1, 0xbe, 0xfc, 0x74, 0x2a, 0x1f, 0xaa, 0x83, 0xd6, 0xdf, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xfa, 0x8d, 0x62, 0x1f, 0x5e, 0x07, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/generated.proto
new file mode 100644
index 000000000..7c448f87f
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/generated.proto
@@ -0,0 +1,127 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.pkg.apis.networking.v1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+import "k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.proto";
+import "k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1";
+
+// NetworkPolicy describes what network traffic is allowed for a set of Pods
+message NetworkPolicy {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Specification of the desired behavior for this NetworkPolicy.
+ // +optional
+ optional NetworkPolicySpec spec = 2;
+}
+
+// NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
+// matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
+message NetworkPolicyIngressRule {
+ // List of ports which should be made accessible on the pods selected for this
+ // rule. Each item in this list is combined using a logical OR. If this field is
+ // empty or missing, this rule matches all ports (traffic not restricted by port).
+ // If this field is present and contains at least one item, then this rule allows
+ // traffic only if the traffic matches at least one port in the list.
+ // +optional
+ repeated NetworkPolicyPort ports = 1;
+
+ // List of sources which should be able to access the pods selected for this rule.
+ // Items in this list are combined using a logical OR operation. If this field is
+ // empty or missing, this rule matches all sources (traffic not restricted by
+ // source). If this field is present and contains at least on item, this rule
+ // allows traffic only if the traffic matches at least one item in the from list.
+ // +optional
+ repeated NetworkPolicyPeer from = 2;
+}
+
+// NetworkPolicyList is a list of NetworkPolicy objects.
+message NetworkPolicyList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of schema objects.
+ repeated NetworkPolicy items = 2;
+}
+
+// NetworkPolicyPeer describes a peer to allow traffic from. Exactly one of its fields
+// must be specified.
+message NetworkPolicyPeer {
+ // This is a label selector which selects Pods in this namespace. This field
+ // follows standard label selector semantics. If present but empty, this selector
+ // selects all pods in this namespace.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
+
+ // Selects Namespaces using cluster scoped-labels. This matches all pods in all
+ // namespaces selected by this label selector. This field follows standard label
+ // selector semantics. If present but empty, this selector selects all namespaces.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 2;
+}
+
+// NetworkPolicyPort describes a port to allow traffic on
+message NetworkPolicyPort {
+ // The protocol (TCP or UDP) which traffic must match. If not specified, this
+ // field defaults to TCP.
+ // +optional
+ optional string protocol = 1;
+
+ // The port on the given protocol. This can either be a numerical or named port on
+ // a pod. If this field is not provided, this matches all port names and numbers.
+ // +optional
+ optional k8s.io.apimachinery.pkg.util.intstr.IntOrString port = 2;
+}
+
+// NetworkPolicySpec provides the specification of a NetworkPolicy
+message NetworkPolicySpec {
+ // Selects the pods to which this NetworkPolicy object applies. The array of
+ // ingress rules is applied to any pods selected by this field. Multiple network
+ // policies can select the same set of pods. In this case, the ingress rules for
+ // each are combined additively. This field is NOT optional and follows standard
+ // label selector semantics. An empty podSelector matches all pods in this
+ // namespace.
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1;
+
+ // List of ingress rules to be applied to the selected pods. Traffic is allowed to
+ // a pod if there are no NetworkPolicies selecting the pod
+ // (and cluster policy otherwise allows the traffic), OR if the traffic source is
+ // the pod's local node, OR if the traffic matches at least one ingress rule
+ // across all of the NetworkPolicy objects whose podSelector matches the pod. If
+ // this field is empty then this NetworkPolicy does not allow any traffic (and serves
+ // solely to ensure that the pods it selects are isolated by default)
+ // +optional
+ repeated NetworkPolicyIngressRule ingress = 2;
+}
+
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/register.go
new file mode 100644
index 000000000..c8d3c83bc
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/register.go
@@ -0,0 +1,50 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "networking.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &NetworkPolicy{},
+ &NetworkPolicyList{},
+ )
+
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/types.generated.go
new file mode 100644
index 000000000..38d6af90a
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/types.generated.go
@@ -0,0 +1,2322 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ pkg2_types "k8s.io/apimachinery/pkg/types"
+ pkg4_intstr "k8s.io/apimachinery/pkg/util/intstr"
+ pkg3_v1 "k8s.io/kubernetes/pkg/api/v1"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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 pkg1_v1.TypeMeta
+ var v1 pkg2_types.UID
+ var v2 pkg4_intstr.IntOrString
+ var v3 pkg3_v1.Protocol
+ var v4 time.Time
+ _, _, _, _, _ = v0, v1, v2, v3, v4
+ }
+}
+
+func (x *NetworkPolicy) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = true
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NetworkPolicy) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NetworkPolicy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = NetworkPolicySpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NetworkPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv12 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv14 := &x.APIVersion
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg1_v1.ObjectMeta{}
+ } else {
+ yyv16 := &x.ObjectMeta
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv16) {
+ } else {
+ z.DecFallback(yyv16, false)
+ }
+ }
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = NetworkPolicySpec{}
+ } else {
+ yyv18 := &x.Spec
+ yyv18.CodecDecodeSelf(d)
+ }
+ for {
+ yyj11++
+ if yyhl11 {
+ yyb11 = yyj11 > l
+ } else {
+ yyb11 = r.CheckBreak()
+ }
+ if yyb11 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj11-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NetworkPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Ingress) != 0
+ 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_containerArrayElem1234)
+ yy4 := &x.PodSelector
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy4) {
+ } else {
+ z.EncFallback(yy4)
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy6 := &x.PodSelector
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy6) {
+ } else {
+ z.EncFallback(yy6)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Ingress == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else {
+ h.encSliceNetworkPolicyIngressRule(([]NetworkPolicyIngressRule)(x.Ingress), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ingress"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Ingress == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.encSliceNetworkPolicyIngressRule(([]NetworkPolicyIngressRule)(x.Ingress), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NetworkPolicySpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NetworkPolicySpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "podSelector":
+ if r.TryDecodeAsNil() {
+ x.PodSelector = pkg1_v1.LabelSelector{}
+ } else {
+ yyv4 := &x.PodSelector
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+ case "ingress":
+ if r.TryDecodeAsNil() {
+ x.Ingress = nil
+ } else {
+ yyv6 := &x.Ingress
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceNetworkPolicyIngressRule((*[]NetworkPolicyIngressRule)(yyv6), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NetworkPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PodSelector = pkg1_v1.LabelSelector{}
+ } else {
+ yyv9 := &x.PodSelector
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv9) {
+ } else {
+ z.DecFallback(yyv9, false)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Ingress = nil
+ } else {
+ yyv11 := &x.Ingress
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceNetworkPolicyIngressRule((*[]NetworkPolicyIngressRule)(yyv11), d)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NetworkPolicyIngressRule) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = len(x.Ports) != 0
+ yyq2[1] = len(x.From) != 0
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Ports == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ h.encSliceNetworkPolicyPort(([]NetworkPolicyPort)(x.Ports), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("ports"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Ports == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.encSliceNetworkPolicyPort(([]NetworkPolicyPort)(x.Ports), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.From == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encSliceNetworkPolicyPeer(([]NetworkPolicyPeer)(x.From), e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("from"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.From == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encSliceNetworkPolicyPeer(([]NetworkPolicyPeer)(x.From), e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NetworkPolicyIngressRule) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NetworkPolicyIngressRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "ports":
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv4 := &x.Ports
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ h.decSliceNetworkPolicyPort((*[]NetworkPolicyPort)(yyv4), d)
+ }
+ }
+ case "from":
+ if r.TryDecodeAsNil() {
+ x.From = nil
+ } else {
+ yyv6 := &x.From
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decSliceNetworkPolicyPeer((*[]NetworkPolicyPeer)(yyv6), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NetworkPolicyIngressRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Ports = nil
+ } else {
+ yyv9 := &x.Ports
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else {
+ h.decSliceNetworkPolicyPort((*[]NetworkPolicyPort)(yyv9), d)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.From = nil
+ } else {
+ yyv11 := &x.From
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else {
+ h.decSliceNetworkPolicyPeer((*[]NetworkPolicyPeer)(yyv11), d)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NetworkPolicyPort) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.Protocol != nil
+ yyq2[1] = x.Port != 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.Protocol == nil {
+ r.EncodeNil()
+ } else {
+ yy4 := *x.Protocol
+ yysf5 := &yy4
+ yysf5.CodecEncodeSelf(e)
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("protocol"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Protocol == nil {
+ r.EncodeNil()
+ } else {
+ yy6 := *x.Protocol
+ yysf7 := &yy6
+ yysf7.CodecEncodeSelf(e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Port == nil {
+ r.EncodeNil()
+ } else {
+ yym9 := z.EncBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Port) {
+ } else if !yym9 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.Port)
+ } else {
+ z.EncFallback(x.Port)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("port"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Port == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Port) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.Port)
+ } else {
+ z.EncFallback(x.Port)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NetworkPolicyPort) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NetworkPolicyPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "protocol":
+ if r.TryDecodeAsNil() {
+ if x.Protocol != nil {
+ x.Protocol = nil
+ }
+ } else {
+ if x.Protocol == nil {
+ x.Protocol = new(pkg3_v1.Protocol)
+ }
+ x.Protocol.CodecDecodeSelf(d)
+ }
+ case "port":
+ if r.TryDecodeAsNil() {
+ if x.Port != nil {
+ x.Port = nil
+ }
+ } else {
+ if x.Port == nil {
+ x.Port = new(pkg4_intstr.IntOrString)
+ }
+ yym6 := z.DecBinary()
+ _ = yym6
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Port) {
+ } else if !yym6 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.Port)
+ } else {
+ z.DecFallback(x.Port, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NetworkPolicyPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Protocol != nil {
+ x.Protocol = nil
+ }
+ } else {
+ if x.Protocol == nil {
+ x.Protocol = new(pkg3_v1.Protocol)
+ }
+ x.Protocol.CodecDecodeSelf(d)
+ }
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Port != nil {
+ x.Port = nil
+ }
+ } else {
+ if x.Port == nil {
+ x.Port = new(pkg4_intstr.IntOrString)
+ }
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Port) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.Port)
+ } else {
+ z.DecFallback(x.Port, false)
+ }
+ }
+ for {
+ yyj7++
+ if yyhl7 {
+ yyb7 = yyj7 > l
+ } else {
+ yyb7 = r.CheckBreak()
+ }
+ if yyb7 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj7-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NetworkPolicyPeer) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.PodSelector != nil
+ yyq2[1] = x.NamespaceSelector != 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.PodSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.PodSelector) {
+ } else {
+ z.EncFallback(x.PodSelector)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("podSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.PodSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.PodSelector) {
+ } else {
+ z.EncFallback(x.PodSelector)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.NamespaceSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.NamespaceSelector) {
+ } else {
+ z.EncFallback(x.NamespaceSelector)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("namespaceSelector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NamespaceSelector == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.NamespaceSelector) {
+ } else {
+ z.EncFallback(x.NamespaceSelector)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NetworkPolicyPeer) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NetworkPolicyPeer) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "podSelector":
+ if r.TryDecodeAsNil() {
+ if x.PodSelector != nil {
+ x.PodSelector = nil
+ }
+ } else {
+ if x.PodSelector == nil {
+ x.PodSelector = new(pkg1_v1.LabelSelector)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.PodSelector) {
+ } else {
+ z.DecFallback(x.PodSelector, false)
+ }
+ }
+ case "namespaceSelector":
+ if r.TryDecodeAsNil() {
+ if x.NamespaceSelector != nil {
+ x.NamespaceSelector = nil
+ }
+ } else {
+ if x.NamespaceSelector == nil {
+ x.NamespaceSelector = new(pkg1_v1.LabelSelector)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.NamespaceSelector) {
+ } else {
+ z.DecFallback(x.NamespaceSelector, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NetworkPolicyPeer) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.PodSelector != nil {
+ x.PodSelector = nil
+ }
+ } else {
+ if x.PodSelector == nil {
+ x.PodSelector = new(pkg1_v1.LabelSelector)
+ }
+ yym10 := z.DecBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.PodSelector) {
+ } else {
+ z.DecFallback(x.PodSelector, false)
+ }
+ }
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.NamespaceSelector != nil {
+ x.NamespaceSelector = nil
+ }
+ } else {
+ if x.NamespaceSelector == nil {
+ x.NamespaceSelector = new(pkg1_v1.LabelSelector)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.NamespaceSelector) {
+ } else {
+ z.DecFallback(x.NamespaceSelector, false)
+ }
+ }
+ for {
+ yyj8++
+ if yyhl8 {
+ yyb8 = yyj8 > l
+ } else {
+ yyb8 = r.CheckBreak()
+ }
+ if yyb8 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj8-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *NetworkPolicyList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceNetworkPolicy(([]NetworkPolicy)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceNetworkPolicy(([]NetworkPolicy)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *NetworkPolicyList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *NetworkPolicyList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceNetworkPolicy((*[]NetworkPolicy)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *NetworkPolicyList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceNetworkPolicy((*[]NetworkPolicy)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encSliceNetworkPolicyIngressRule(v []NetworkPolicyIngressRule, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceNetworkPolicyIngressRule(v *[]NetworkPolicyIngressRule, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []NetworkPolicyIngressRule{}
+ 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, 48)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]NetworkPolicyIngressRule, yyrl1)
+ }
+ } else {
+ yyv1 = make([]NetworkPolicyIngressRule, 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] = NetworkPolicyIngressRule{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, NetworkPolicyIngressRule{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicyIngressRule{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, NetworkPolicyIngressRule{}) // var yyz1 NetworkPolicyIngressRule
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicyIngressRule{}
+ } 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 = []NetworkPolicyIngressRule{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceNetworkPolicyPort(v []NetworkPolicyPort, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceNetworkPolicyPort(v *[]NetworkPolicyPort, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []NetworkPolicyPort{}
+ 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, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]NetworkPolicyPort, yyrl1)
+ }
+ } else {
+ yyv1 = make([]NetworkPolicyPort, 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] = NetworkPolicyPort{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, NetworkPolicyPort{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicyPort{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, NetworkPolicyPort{}) // var yyz1 NetworkPolicyPort
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicyPort{}
+ } 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 = []NetworkPolicyPort{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceNetworkPolicyPeer(v []NetworkPolicyPeer, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceNetworkPolicyPeer(v *[]NetworkPolicyPeer, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []NetworkPolicyPeer{}
+ 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, 16)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]NetworkPolicyPeer, yyrl1)
+ }
+ } else {
+ yyv1 = make([]NetworkPolicyPeer, 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] = NetworkPolicyPeer{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, NetworkPolicyPeer{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicyPeer{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, NetworkPolicyPeer{}) // var yyz1 NetworkPolicyPeer
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicyPeer{}
+ } 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 = []NetworkPolicyPeer{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceNetworkPolicy(v []NetworkPolicy, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceNetworkPolicy(v *[]NetworkPolicy, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []NetworkPolicy{}
+ 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, 320)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]NetworkPolicy, yyrl1)
+ }
+ } else {
+ yyv1 = make([]NetworkPolicy, 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] = NetworkPolicy{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, NetworkPolicy{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicy{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, NetworkPolicy{}) // var yyz1 NetworkPolicy
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = NetworkPolicy{}
+ } 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 = []NetworkPolicy{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/types.go
new file mode 100644
index 000000000..b02593f94
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/types.go
@@ -0,0 +1,120 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/util/intstr"
+ "k8s.io/kubernetes/pkg/api/v1"
+)
+
+// +genclient=true
+
+// NetworkPolicy describes what network traffic is allowed for a set of Pods
+type NetworkPolicy struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Specification of the desired behavior for this NetworkPolicy.
+ // +optional
+ Spec NetworkPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+}
+
+// NetworkPolicySpec provides the specification of a NetworkPolicy
+type NetworkPolicySpec struct {
+ // Selects the pods to which this NetworkPolicy object applies. The array of
+ // ingress rules is applied to any pods selected by this field. Multiple network
+ // policies can select the same set of pods. In this case, the ingress rules for
+ // each are combined additively. This field is NOT optional and follows standard
+ // label selector semantics. An empty podSelector matches all pods in this
+ // namespace.
+ PodSelector metav1.LabelSelector `json:"podSelector" protobuf:"bytes,1,opt,name=podSelector"`
+
+ // List of ingress rules to be applied to the selected pods. Traffic is allowed to
+ // a pod if there are no NetworkPolicies selecting the pod
+ // (and cluster policy otherwise allows the traffic), OR if the traffic source is
+ // the pod's local node, OR if the traffic matches at least one ingress rule
+ // across all of the NetworkPolicy objects whose podSelector matches the pod. If
+ // this field is empty then this NetworkPolicy does not allow any traffic (and serves
+ // solely to ensure that the pods it selects are isolated by default)
+ // +optional
+ Ingress []NetworkPolicyIngressRule `json:"ingress,omitempty" protobuf:"bytes,2,rep,name=ingress"`
+}
+
+// NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods
+// matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.
+type NetworkPolicyIngressRule struct {
+ // List of ports which should be made accessible on the pods selected for this
+ // rule. Each item in this list is combined using a logical OR. If this field is
+ // empty or missing, this rule matches all ports (traffic not restricted by port).
+ // If this field is present and contains at least one item, then this rule allows
+ // traffic only if the traffic matches at least one port in the list.
+ // +optional
+ Ports []NetworkPolicyPort `json:"ports,omitempty" protobuf:"bytes,1,rep,name=ports"`
+
+ // List of sources which should be able to access the pods selected for this rule.
+ // Items in this list are combined using a logical OR operation. If this field is
+ // empty or missing, this rule matches all sources (traffic not restricted by
+ // source). If this field is present and contains at least on item, this rule
+ // allows traffic only if the traffic matches at least one item in the from list.
+ // +optional
+ From []NetworkPolicyPeer `json:"from,omitempty" protobuf:"bytes,2,rep,name=from"`
+}
+
+// NetworkPolicyPort describes a port to allow traffic on
+type NetworkPolicyPort struct {
+ // The protocol (TCP or UDP) which traffic must match. If not specified, this
+ // field defaults to TCP.
+ // +optional
+ Protocol *v1.Protocol `json:"protocol,omitempty" protobuf:"bytes,1,opt,name=protocol,casttype=k8s.io/kubernetes/pkg/api/v1.Protocol"`
+
+ // The port on the given protocol. This can either be a numerical or named port on
+ // a pod. If this field is not provided, this matches all port names and numbers.
+ // +optional
+ Port *intstr.IntOrString `json:"port,omitempty" protobuf:"bytes,2,opt,name=port"`
+}
+
+// NetworkPolicyPeer describes a peer to allow traffic from. Exactly one of its fields
+// must be specified.
+type NetworkPolicyPeer struct {
+ // This is a label selector which selects Pods in this namespace. This field
+ // follows standard label selector semantics. If present but empty, this selector
+ // selects all pods in this namespace.
+ // +optional
+ PodSelector *metav1.LabelSelector `json:"podSelector,omitempty" protobuf:"bytes,1,opt,name=podSelector"`
+
+ // Selects Namespaces using cluster scoped-labels. This matches all pods in all
+ // namespaces selected by this label selector. This field follows standard label
+ // selector semantics. If present but empty, this selector selects all namespaces.
+ // +optional
+ NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,2,opt,name=namespaceSelector"`
+}
+
+// NetworkPolicyList is a list of NetworkPolicy objects.
+type NetworkPolicyList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of schema objects.
+ Items []NetworkPolicy `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..c3c911631
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/types_swagger_doc_generated.go
@@ -0,0 +1,90 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_NetworkPolicy = map[string]string{
+ "": "NetworkPolicy describes what network traffic is allowed for a set of Pods",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "spec": "Specification of the desired behavior for this NetworkPolicy.",
+}
+
+func (NetworkPolicy) SwaggerDoc() map[string]string {
+ return map_NetworkPolicy
+}
+
+var map_NetworkPolicyIngressRule = map[string]string{
+ "": "NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.",
+ "ports": "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.",
+ "from": "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list.",
+}
+
+func (NetworkPolicyIngressRule) SwaggerDoc() map[string]string {
+ return map_NetworkPolicyIngressRule
+}
+
+var map_NetworkPolicyList = map[string]string{
+ "": "NetworkPolicyList is a list of NetworkPolicy objects.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "items": "Items is a list of schema objects.",
+}
+
+func (NetworkPolicyList) SwaggerDoc() map[string]string {
+ return map_NetworkPolicyList
+}
+
+var map_NetworkPolicyPeer = map[string]string{
+ "": "NetworkPolicyPeer describes a peer to allow traffic from. Exactly one of its fields must be specified.",
+ "podSelector": "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace.",
+ "namespaceSelector": "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces.",
+}
+
+func (NetworkPolicyPeer) SwaggerDoc() map[string]string {
+ return map_NetworkPolicyPeer
+}
+
+var map_NetworkPolicyPort = map[string]string{
+ "": "NetworkPolicyPort describes a port to allow traffic on",
+ "protocol": "The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP.",
+ "port": "The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers.",
+}
+
+func (NetworkPolicyPort) SwaggerDoc() map[string]string {
+ return map_NetworkPolicyPort
+}
+
+var map_NetworkPolicySpec = map[string]string{
+ "": "NetworkPolicySpec provides the specification of a NetworkPolicy",
+ "podSelector": "Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.",
+ "ingress": "List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default)",
+}
+
+func (NetworkPolicySpec) SwaggerDoc() map[string]string {
+ return map_NetworkPolicySpec
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/zz_generated.conversion.go
new file mode 100644
index 000000000..b011eb90a
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/zz_generated.conversion.go
@@ -0,0 +1,195 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ intstr "k8s.io/apimachinery/pkg/util/intstr"
+ api "k8s.io/kubernetes/pkg/api"
+ api_v1 "k8s.io/kubernetes/pkg/api/v1"
+ networking "k8s.io/kubernetes/pkg/apis/networking"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1_NetworkPolicy_To_networking_NetworkPolicy,
+ Convert_networking_NetworkPolicy_To_v1_NetworkPolicy,
+ Convert_v1_NetworkPolicyIngressRule_To_networking_NetworkPolicyIngressRule,
+ Convert_networking_NetworkPolicyIngressRule_To_v1_NetworkPolicyIngressRule,
+ Convert_v1_NetworkPolicyList_To_networking_NetworkPolicyList,
+ Convert_networking_NetworkPolicyList_To_v1_NetworkPolicyList,
+ Convert_v1_NetworkPolicyPeer_To_networking_NetworkPolicyPeer,
+ Convert_networking_NetworkPolicyPeer_To_v1_NetworkPolicyPeer,
+ Convert_v1_NetworkPolicyPort_To_networking_NetworkPolicyPort,
+ Convert_networking_NetworkPolicyPort_To_v1_NetworkPolicyPort,
+ Convert_v1_NetworkPolicySpec_To_networking_NetworkPolicySpec,
+ Convert_networking_NetworkPolicySpec_To_v1_NetworkPolicySpec,
+ )
+}
+
+func autoConvert_v1_NetworkPolicy_To_networking_NetworkPolicy(in *NetworkPolicy, out *networking.NetworkPolicy, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1_NetworkPolicySpec_To_networking_NetworkPolicySpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1_NetworkPolicy_To_networking_NetworkPolicy is an autogenerated conversion function.
+func Convert_v1_NetworkPolicy_To_networking_NetworkPolicy(in *NetworkPolicy, out *networking.NetworkPolicy, s conversion.Scope) error {
+ return autoConvert_v1_NetworkPolicy_To_networking_NetworkPolicy(in, out, s)
+}
+
+func autoConvert_networking_NetworkPolicy_To_v1_NetworkPolicy(in *networking.NetworkPolicy, out *NetworkPolicy, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_networking_NetworkPolicySpec_To_v1_NetworkPolicySpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_networking_NetworkPolicy_To_v1_NetworkPolicy is an autogenerated conversion function.
+func Convert_networking_NetworkPolicy_To_v1_NetworkPolicy(in *networking.NetworkPolicy, out *NetworkPolicy, s conversion.Scope) error {
+ return autoConvert_networking_NetworkPolicy_To_v1_NetworkPolicy(in, out, s)
+}
+
+func autoConvert_v1_NetworkPolicyIngressRule_To_networking_NetworkPolicyIngressRule(in *NetworkPolicyIngressRule, out *networking.NetworkPolicyIngressRule, s conversion.Scope) error {
+ out.Ports = *(*[]networking.NetworkPolicyPort)(unsafe.Pointer(&in.Ports))
+ out.From = *(*[]networking.NetworkPolicyPeer)(unsafe.Pointer(&in.From))
+ return nil
+}
+
+// Convert_v1_NetworkPolicyIngressRule_To_networking_NetworkPolicyIngressRule is an autogenerated conversion function.
+func Convert_v1_NetworkPolicyIngressRule_To_networking_NetworkPolicyIngressRule(in *NetworkPolicyIngressRule, out *networking.NetworkPolicyIngressRule, s conversion.Scope) error {
+ return autoConvert_v1_NetworkPolicyIngressRule_To_networking_NetworkPolicyIngressRule(in, out, s)
+}
+
+func autoConvert_networking_NetworkPolicyIngressRule_To_v1_NetworkPolicyIngressRule(in *networking.NetworkPolicyIngressRule, out *NetworkPolicyIngressRule, s conversion.Scope) error {
+ out.Ports = *(*[]NetworkPolicyPort)(unsafe.Pointer(&in.Ports))
+ out.From = *(*[]NetworkPolicyPeer)(unsafe.Pointer(&in.From))
+ return nil
+}
+
+// Convert_networking_NetworkPolicyIngressRule_To_v1_NetworkPolicyIngressRule is an autogenerated conversion function.
+func Convert_networking_NetworkPolicyIngressRule_To_v1_NetworkPolicyIngressRule(in *networking.NetworkPolicyIngressRule, out *NetworkPolicyIngressRule, s conversion.Scope) error {
+ return autoConvert_networking_NetworkPolicyIngressRule_To_v1_NetworkPolicyIngressRule(in, out, s)
+}
+
+func autoConvert_v1_NetworkPolicyList_To_networking_NetworkPolicyList(in *NetworkPolicyList, out *networking.NetworkPolicyList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]networking.NetworkPolicy)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1_NetworkPolicyList_To_networking_NetworkPolicyList is an autogenerated conversion function.
+func Convert_v1_NetworkPolicyList_To_networking_NetworkPolicyList(in *NetworkPolicyList, out *networking.NetworkPolicyList, s conversion.Scope) error {
+ return autoConvert_v1_NetworkPolicyList_To_networking_NetworkPolicyList(in, out, s)
+}
+
+func autoConvert_networking_NetworkPolicyList_To_v1_NetworkPolicyList(in *networking.NetworkPolicyList, out *NetworkPolicyList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]NetworkPolicy, 0)
+ } else {
+ out.Items = *(*[]NetworkPolicy)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_networking_NetworkPolicyList_To_v1_NetworkPolicyList is an autogenerated conversion function.
+func Convert_networking_NetworkPolicyList_To_v1_NetworkPolicyList(in *networking.NetworkPolicyList, out *NetworkPolicyList, s conversion.Scope) error {
+ return autoConvert_networking_NetworkPolicyList_To_v1_NetworkPolicyList(in, out, s)
+}
+
+func autoConvert_v1_NetworkPolicyPeer_To_networking_NetworkPolicyPeer(in *NetworkPolicyPeer, out *networking.NetworkPolicyPeer, s conversion.Scope) error {
+ out.PodSelector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.PodSelector))
+ out.NamespaceSelector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.NamespaceSelector))
+ return nil
+}
+
+// Convert_v1_NetworkPolicyPeer_To_networking_NetworkPolicyPeer is an autogenerated conversion function.
+func Convert_v1_NetworkPolicyPeer_To_networking_NetworkPolicyPeer(in *NetworkPolicyPeer, out *networking.NetworkPolicyPeer, s conversion.Scope) error {
+ return autoConvert_v1_NetworkPolicyPeer_To_networking_NetworkPolicyPeer(in, out, s)
+}
+
+func autoConvert_networking_NetworkPolicyPeer_To_v1_NetworkPolicyPeer(in *networking.NetworkPolicyPeer, out *NetworkPolicyPeer, s conversion.Scope) error {
+ out.PodSelector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.PodSelector))
+ out.NamespaceSelector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.NamespaceSelector))
+ return nil
+}
+
+// Convert_networking_NetworkPolicyPeer_To_v1_NetworkPolicyPeer is an autogenerated conversion function.
+func Convert_networking_NetworkPolicyPeer_To_v1_NetworkPolicyPeer(in *networking.NetworkPolicyPeer, out *NetworkPolicyPeer, s conversion.Scope) error {
+ return autoConvert_networking_NetworkPolicyPeer_To_v1_NetworkPolicyPeer(in, out, s)
+}
+
+func autoConvert_v1_NetworkPolicyPort_To_networking_NetworkPolicyPort(in *NetworkPolicyPort, out *networking.NetworkPolicyPort, s conversion.Scope) error {
+ out.Protocol = (*api.Protocol)(unsafe.Pointer(in.Protocol))
+ out.Port = (*intstr.IntOrString)(unsafe.Pointer(in.Port))
+ return nil
+}
+
+// Convert_v1_NetworkPolicyPort_To_networking_NetworkPolicyPort is an autogenerated conversion function.
+func Convert_v1_NetworkPolicyPort_To_networking_NetworkPolicyPort(in *NetworkPolicyPort, out *networking.NetworkPolicyPort, s conversion.Scope) error {
+ return autoConvert_v1_NetworkPolicyPort_To_networking_NetworkPolicyPort(in, out, s)
+}
+
+func autoConvert_networking_NetworkPolicyPort_To_v1_NetworkPolicyPort(in *networking.NetworkPolicyPort, out *NetworkPolicyPort, s conversion.Scope) error {
+ out.Protocol = (*api_v1.Protocol)(unsafe.Pointer(in.Protocol))
+ out.Port = (*intstr.IntOrString)(unsafe.Pointer(in.Port))
+ return nil
+}
+
+// Convert_networking_NetworkPolicyPort_To_v1_NetworkPolicyPort is an autogenerated conversion function.
+func Convert_networking_NetworkPolicyPort_To_v1_NetworkPolicyPort(in *networking.NetworkPolicyPort, out *NetworkPolicyPort, s conversion.Scope) error {
+ return autoConvert_networking_NetworkPolicyPort_To_v1_NetworkPolicyPort(in, out, s)
+}
+
+func autoConvert_v1_NetworkPolicySpec_To_networking_NetworkPolicySpec(in *NetworkPolicySpec, out *networking.NetworkPolicySpec, s conversion.Scope) error {
+ out.PodSelector = in.PodSelector
+ out.Ingress = *(*[]networking.NetworkPolicyIngressRule)(unsafe.Pointer(&in.Ingress))
+ return nil
+}
+
+// Convert_v1_NetworkPolicySpec_To_networking_NetworkPolicySpec is an autogenerated conversion function.
+func Convert_v1_NetworkPolicySpec_To_networking_NetworkPolicySpec(in *NetworkPolicySpec, out *networking.NetworkPolicySpec, s conversion.Scope) error {
+ return autoConvert_v1_NetworkPolicySpec_To_networking_NetworkPolicySpec(in, out, s)
+}
+
+func autoConvert_networking_NetworkPolicySpec_To_v1_NetworkPolicySpec(in *networking.NetworkPolicySpec, out *NetworkPolicySpec, s conversion.Scope) error {
+ out.PodSelector = in.PodSelector
+ out.Ingress = *(*[]NetworkPolicyIngressRule)(unsafe.Pointer(&in.Ingress))
+ return nil
+}
+
+// Convert_networking_NetworkPolicySpec_To_v1_NetworkPolicySpec is an autogenerated conversion function.
+func Convert_networking_NetworkPolicySpec_To_v1_NetworkPolicySpec(in *networking.NetworkPolicySpec, out *NetworkPolicySpec, s conversion.Scope) error {
+ return autoConvert_networking_NetworkPolicySpec_To_v1_NetworkPolicySpec(in, out, s)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..38ef88346
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/zz_generated.deepcopy.go
@@ -0,0 +1,182 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ intstr "k8s.io/apimachinery/pkg/util/intstr"
+ api_v1 "k8s.io/kubernetes/pkg/api/v1"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NetworkPolicy, InType: reflect.TypeOf(&NetworkPolicy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NetworkPolicyIngressRule, InType: reflect.TypeOf(&NetworkPolicyIngressRule{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NetworkPolicyList, InType: reflect.TypeOf(&NetworkPolicyList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NetworkPolicyPeer, InType: reflect.TypeOf(&NetworkPolicyPeer{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NetworkPolicyPort, InType: reflect.TypeOf(&NetworkPolicyPort{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_NetworkPolicySpec, InType: reflect.TypeOf(&NetworkPolicySpec{})},
+ )
+}
+
+// DeepCopy_v1_NetworkPolicy is an autogenerated deepcopy function.
+func DeepCopy_v1_NetworkPolicy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicy)
+ out := out.(*NetworkPolicy)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1_NetworkPolicySpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NetworkPolicyIngressRule is an autogenerated deepcopy function.
+func DeepCopy_v1_NetworkPolicyIngressRule(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyIngressRule)
+ out := out.(*NetworkPolicyIngressRule)
+ *out = *in
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]NetworkPolicyPort, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_NetworkPolicyPort(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.From != nil {
+ in, out := &in.From, &out.From
+ *out = make([]NetworkPolicyPeer, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_NetworkPolicyPeer(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NetworkPolicyList is an autogenerated deepcopy function.
+func DeepCopy_v1_NetworkPolicyList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyList)
+ out := out.(*NetworkPolicyList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]NetworkPolicy, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_NetworkPolicy(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NetworkPolicyPeer is an autogenerated deepcopy function.
+func DeepCopy_v1_NetworkPolicyPeer(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyPeer)
+ out := out.(*NetworkPolicyPeer)
+ *out = *in
+ if in.PodSelector != nil {
+ in, out := &in.PodSelector, &out.PodSelector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*meta_v1.LabelSelector)
+ }
+ }
+ if in.NamespaceSelector != nil {
+ in, out := &in.NamespaceSelector, &out.NamespaceSelector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*meta_v1.LabelSelector)
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NetworkPolicyPort is an autogenerated deepcopy function.
+func DeepCopy_v1_NetworkPolicyPort(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyPort)
+ out := out.(*NetworkPolicyPort)
+ *out = *in
+ if in.Protocol != nil {
+ in, out := &in.Protocol, &out.Protocol
+ *out = new(api_v1.Protocol)
+ **out = **in
+ }
+ if in.Port != nil {
+ in, out := &in.Port, &out.Port
+ *out = new(intstr.IntOrString)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_NetworkPolicySpec is an autogenerated deepcopy function.
+func DeepCopy_v1_NetworkPolicySpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicySpec)
+ out := out.(*NetworkPolicySpec)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.PodSelector); err != nil {
+ return err
+ } else {
+ out.PodSelector = *newVal.(*meta_v1.LabelSelector)
+ }
+ if in.Ingress != nil {
+ in, out := &in.Ingress, &out.Ingress
+ *out = make([]NetworkPolicyIngressRule, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_NetworkPolicyIngressRule(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/zz_generated.defaults.go
new file mode 100644
index 000000000..0319c88a7
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/networking/v1/zz_generated.defaults.go
@@ -0,0 +1,51 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ scheme.AddTypeDefaultingFunc(&NetworkPolicy{}, func(obj interface{}) { SetObjectDefaults_NetworkPolicy(obj.(*NetworkPolicy)) })
+ scheme.AddTypeDefaultingFunc(&NetworkPolicyList{}, func(obj interface{}) { SetObjectDefaults_NetworkPolicyList(obj.(*NetworkPolicyList)) })
+ return nil
+}
+
+func SetObjectDefaults_NetworkPolicy(in *NetworkPolicy) {
+ for i := range in.Spec.Ingress {
+ a := &in.Spec.Ingress[i]
+ for j := range a.Ports {
+ b := &a.Ports[j]
+ SetDefaults_NetworkPolicyPort(b)
+ }
+ }
+}
+
+func SetObjectDefaults_NetworkPolicyList(in *NetworkPolicyList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_NetworkPolicy(a)
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/networking/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/networking/zz_generated.deepcopy.go
new file mode 100644
index 000000000..0cec26223
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/networking/zz_generated.deepcopy.go
@@ -0,0 +1,182 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package networking
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ intstr "k8s.io/apimachinery/pkg/util/intstr"
+ api "k8s.io/kubernetes/pkg/api"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_networking_NetworkPolicy, InType: reflect.TypeOf(&NetworkPolicy{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_networking_NetworkPolicyIngressRule, InType: reflect.TypeOf(&NetworkPolicyIngressRule{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_networking_NetworkPolicyList, InType: reflect.TypeOf(&NetworkPolicyList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_networking_NetworkPolicyPeer, InType: reflect.TypeOf(&NetworkPolicyPeer{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_networking_NetworkPolicyPort, InType: reflect.TypeOf(&NetworkPolicyPort{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_networking_NetworkPolicySpec, InType: reflect.TypeOf(&NetworkPolicySpec{})},
+ )
+}
+
+// DeepCopy_networking_NetworkPolicy is an autogenerated deepcopy function.
+func DeepCopy_networking_NetworkPolicy(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicy)
+ out := out.(*NetworkPolicy)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_networking_NetworkPolicySpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_networking_NetworkPolicyIngressRule is an autogenerated deepcopy function.
+func DeepCopy_networking_NetworkPolicyIngressRule(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyIngressRule)
+ out := out.(*NetworkPolicyIngressRule)
+ *out = *in
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]NetworkPolicyPort, len(*in))
+ for i := range *in {
+ if err := DeepCopy_networking_NetworkPolicyPort(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.From != nil {
+ in, out := &in.From, &out.From
+ *out = make([]NetworkPolicyPeer, len(*in))
+ for i := range *in {
+ if err := DeepCopy_networking_NetworkPolicyPeer(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_networking_NetworkPolicyList is an autogenerated deepcopy function.
+func DeepCopy_networking_NetworkPolicyList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyList)
+ out := out.(*NetworkPolicyList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]NetworkPolicy, len(*in))
+ for i := range *in {
+ if err := DeepCopy_networking_NetworkPolicy(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_networking_NetworkPolicyPeer is an autogenerated deepcopy function.
+func DeepCopy_networking_NetworkPolicyPeer(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyPeer)
+ out := out.(*NetworkPolicyPeer)
+ *out = *in
+ if in.PodSelector != nil {
+ in, out := &in.PodSelector, &out.PodSelector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if in.NamespaceSelector != nil {
+ in, out := &in.NamespaceSelector, &out.NamespaceSelector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_networking_NetworkPolicyPort is an autogenerated deepcopy function.
+func DeepCopy_networking_NetworkPolicyPort(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicyPort)
+ out := out.(*NetworkPolicyPort)
+ *out = *in
+ if in.Protocol != nil {
+ in, out := &in.Protocol, &out.Protocol
+ *out = new(api.Protocol)
+ **out = **in
+ }
+ if in.Port != nil {
+ in, out := &in.Port, &out.Port
+ *out = new(intstr.IntOrString)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_networking_NetworkPolicySpec is an autogenerated deepcopy function.
+func DeepCopy_networking_NetworkPolicySpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*NetworkPolicySpec)
+ out := out.(*NetworkPolicySpec)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.PodSelector); err != nil {
+ return err
+ } else {
+ out.PodSelector = *newVal.(*v1.LabelSelector)
+ }
+ if in.Ingress != nil {
+ in, out := &in.Ingress, &out.Ingress
+ *out = make([]NetworkPolicyIngressRule, len(*in))
+ for i := range *in {
+ if err := DeepCopy_networking_NetworkPolicyIngressRule(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/policy/doc.go
new file mode 100644
index 000000000..86f4cd560
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+
+package policy // import "k8s.io/kubernetes/pkg/apis/policy"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/install/install.go b/vendor/k8s.io/kubernetes/pkg/apis/policy/install/install.go
new file mode 100644
index 000000000..76129575c
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/install/install.go
@@ -0,0 +1,49 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package install installs the experimental API group, making it available as
+// an option to all of the API encoding/decoding machinery.
+package install
+
+import (
+ "k8s.io/apimachinery/pkg/apimachinery/announced"
+ "k8s.io/apimachinery/pkg/apimachinery/registered"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/policy"
+ "k8s.io/kubernetes/pkg/apis/policy/v1beta1"
+)
+
+func init() {
+ Install(api.GroupFactoryRegistry, api.Registry, api.Scheme)
+}
+
+// Install registers the API group and adds types to a scheme
+func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
+ if err := announced.NewGroupMetaFactory(
+ &announced.GroupMetaFactoryArgs{
+ GroupName: policy.GroupName,
+ VersionPreferenceOrder: []string{v1beta1.SchemeGroupVersion.Version},
+ ImportPrefix: "k8s.io/kubernetes/pkg/apis/policy",
+ AddInternalObjectsToScheme: policy.AddToScheme,
+ },
+ announced.VersionToSchemeFunc{
+ v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme,
+ },
+ ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil {
+ panic(err)
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/register.go b/vendor/k8s.io/kubernetes/pkg/apis/policy/register.go
new file mode 100644
index 000000000..5aadc3f1b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/register.go
@@ -0,0 +1,54 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package policy
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "policy"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ // TODO this gets cleaned up when the types are fixed
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &PodDisruptionBudget{},
+ &PodDisruptionBudgetList{},
+ &Eviction{},
+ )
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/types.go b/vendor/k8s.io/kubernetes/pkg/apis/policy/types.go
new file mode 100644
index 000000000..4d49da174
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/types.go
@@ -0,0 +1,120 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package policy
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/util/intstr"
+)
+
+// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
+type PodDisruptionBudgetSpec struct {
+ // An eviction is allowed if at least "minAvailable" pods selected by
+ // "selector" will still be available after the eviction, i.e. even in the
+ // absence of the evicted pod. So for example you can prevent all voluntary
+ // evictions by specifying "100%".
+ // +optional
+ MinAvailable *intstr.IntOrString
+
+ // Label query over pods whose evictions are managed by the disruption
+ // budget.
+ // +optional
+ Selector *metav1.LabelSelector
+
+ // An eviction is allowed if at most "maxUnavailable" pods selected by
+ // "selector" are unavailable after the eviction, i.e. even in absence of
+ // the evicted pod. For example, one can prevent all voluntary evictions
+ // by specifying 0. This is a mutually exclusive setting with "minAvailable".
+ // +optional
+ MaxUnavailable *intstr.IntOrString
+}
+
+// PodDisruptionBudgetStatus represents information about the status of a
+// PodDisruptionBudget. Status may trail the actual state of a system.
+type PodDisruptionBudgetStatus struct {
+ // Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other
+ // status informatio is valid only if observedGeneration equals to PDB's object generation.
+ // +optional
+ ObservedGeneration int64
+
+ // DisruptedPods contains information about pods whose eviction was
+ // processed by the API server eviction subresource handler but has not
+ // yet been observed by the PodDisruptionBudget controller.
+ // A pod will be in this map from the time when the API server processed the
+ // eviction request to the time when the pod is seen by PDB controller
+ // as having been marked for deletion (or after a timeout). The key in the map is the name of the pod
+ // and the value is the time when the API server processed the eviction request. If
+ // the deletion didn't occur and a pod is still there it will be removed from
+ // the list automatically by PodDisruptionBudget controller after some time.
+ // If everything goes smooth this map should be empty for the most of the time.
+ // Large number of entries in the map may indicate problems with pod deletions.
+ DisruptedPods map[string]metav1.Time
+
+ // Number of pod disruptions that are currently allowed.
+ PodDisruptionsAllowed int32
+
+ // current number of healthy pods
+ CurrentHealthy int32
+
+ // minimum desired number of healthy pods
+ DesiredHealthy int32
+
+ // total number of pods counted by this disruption budget
+ ExpectedPods int32
+}
+
+// +genclient=true
+
+// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
+type PodDisruptionBudget struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // Specification of the desired behavior of the PodDisruptionBudget.
+ // +optional
+ Spec PodDisruptionBudgetSpec
+ // Most recently observed status of the PodDisruptionBudget.
+ // +optional
+ Status PodDisruptionBudgetStatus
+}
+
+// PodDisruptionBudgetList is a collection of PodDisruptionBudgets.
+type PodDisruptionBudgetList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+ Items []PodDisruptionBudget
+}
+
+// +genclient=true
+// +noMethods=true
+
+// Eviction evicts a pod from its node subject to certain policies and safety constraints.
+// This is a subresource of Pod. A request to cause such an eviction is
+// created by POSTing to .../pods/<pod name>/eviction.
+type Eviction struct {
+ metav1.TypeMeta
+
+ // ObjectMeta describes the pod that is being evicted.
+ // +optional
+ metav1.ObjectMeta
+
+ // DeleteOptions may be provided
+ // +optional
+ DeleteOptions *metav1.DeleteOptions
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/doc.go
new file mode 100644
index 000000000..d867ebf23
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/doc.go
@@ -0,0 +1,25 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/policy
+// +k8s:defaulter-gen=TypeMeta
+
+// Package policy is for any kind of policy object. Suitable examples, even if
+// they aren't all here, are PodDisruptionBudget, PodSecurityPolicy,
+// NetworkPolicy, etc.
+// +k8s:openapi-gen=true
+package v1beta1 // import "k8s.io/kubernetes/pkg/apis/policy/v1beta1"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.pb.go
new file mode 100644
index 000000000..eef0c8ed2
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.pb.go
@@ -0,0 +1,1454 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1beta1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.proto
+
+ It has these top-level messages:
+ Eviction
+ PodDisruptionBudget
+ PodDisruptionBudgetList
+ PodDisruptionBudgetSpec
+ PodDisruptionBudgetStatus
+*/
+package v1beta1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+import k8s_io_apimachinery_pkg_util_intstr "k8s.io/apimachinery/pkg/util/intstr"
+
+import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *Eviction) Reset() { *m = Eviction{} }
+func (*Eviction) ProtoMessage() {}
+func (*Eviction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *PodDisruptionBudget) Reset() { *m = PodDisruptionBudget{} }
+func (*PodDisruptionBudget) ProtoMessage() {}
+func (*PodDisruptionBudget) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *PodDisruptionBudgetList) Reset() { *m = PodDisruptionBudgetList{} }
+func (*PodDisruptionBudgetList) ProtoMessage() {}
+func (*PodDisruptionBudgetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
+
+func (m *PodDisruptionBudgetSpec) Reset() { *m = PodDisruptionBudgetSpec{} }
+func (*PodDisruptionBudgetSpec) ProtoMessage() {}
+func (*PodDisruptionBudgetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
+
+func (m *PodDisruptionBudgetStatus) Reset() { *m = PodDisruptionBudgetStatus{} }
+func (*PodDisruptionBudgetStatus) ProtoMessage() {}
+func (*PodDisruptionBudgetStatus) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{4}
+}
+
+func init() {
+ proto.RegisterType((*Eviction)(nil), "k8s.io.kubernetes.pkg.apis.policy.v1beta1.Eviction")
+ proto.RegisterType((*PodDisruptionBudget)(nil), "k8s.io.kubernetes.pkg.apis.policy.v1beta1.PodDisruptionBudget")
+ proto.RegisterType((*PodDisruptionBudgetList)(nil), "k8s.io.kubernetes.pkg.apis.policy.v1beta1.PodDisruptionBudgetList")
+ proto.RegisterType((*PodDisruptionBudgetSpec)(nil), "k8s.io.kubernetes.pkg.apis.policy.v1beta1.PodDisruptionBudgetSpec")
+ proto.RegisterType((*PodDisruptionBudgetStatus)(nil), "k8s.io.kubernetes.pkg.apis.policy.v1beta1.PodDisruptionBudgetStatus")
+}
+func (m *Eviction) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Eviction) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ if m.DeleteOptions != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.DeleteOptions.Size()))
+ n2, err := m.DeleteOptions.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ }
+ return i, nil
+}
+
+func (m *PodDisruptionBudget) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodDisruptionBudget) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n3, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n4, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size()))
+ n5, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ return i, nil
+}
+
+func (m *PodDisruptionBudgetList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodDisruptionBudgetList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n6, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PodDisruptionBudgetSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodDisruptionBudgetSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.MinAvailable != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.MinAvailable.Size()))
+ n7, err := m.MinAvailable.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ }
+ if m.Selector != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
+ n8, err := m.Selector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n8
+ }
+ if m.MaxUnavailable != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.MaxUnavailable.Size()))
+ n9, err := m.MaxUnavailable.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n9
+ }
+ return i, nil
+}
+
+func (m *PodDisruptionBudgetStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodDisruptionBudgetStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration))
+ if len(m.DisruptedPods) > 0 {
+ keysForDisruptedPods := make([]string, 0, len(m.DisruptedPods))
+ for k := range m.DisruptedPods {
+ keysForDisruptedPods = append(keysForDisruptedPods, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForDisruptedPods)
+ for _, k := range keysForDisruptedPods {
+ dAtA[i] = 0x12
+ i++
+ v := m.DisruptedPods[string(k)]
+ msgSize := 0
+ if (&v) != nil {
+ msgSize = (&v).Size()
+ msgSize += 1 + sovGenerated(uint64(msgSize))
+ }
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size()))
+ n10, err := (&v).MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n10
+ }
+ }
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PodDisruptionsAllowed))
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentHealthy))
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.DesiredHealthy))
+ dAtA[i] = 0x30
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ExpectedPods))
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *Eviction) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if m.DeleteOptions != nil {
+ l = m.DeleteOptions.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *PodDisruptionBudget) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Status.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodDisruptionBudgetList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PodDisruptionBudgetSpec) Size() (n int) {
+ var l int
+ _ = l
+ if m.MinAvailable != nil {
+ l = m.MinAvailable.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.Selector != nil {
+ l = m.Selector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ if m.MaxUnavailable != nil {
+ l = m.MaxUnavailable.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ return n
+}
+
+func (m *PodDisruptionBudgetStatus) Size() (n int) {
+ var l int
+ _ = l
+ n += 1 + sovGenerated(uint64(m.ObservedGeneration))
+ if len(m.DisruptedPods) > 0 {
+ for k, v := range m.DisruptedPods {
+ _ = k
+ _ = v
+ l = v.Size()
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ n += 1 + sovGenerated(uint64(m.PodDisruptionsAllowed))
+ n += 1 + sovGenerated(uint64(m.CurrentHealthy))
+ n += 1 + sovGenerated(uint64(m.DesiredHealthy))
+ n += 1 + sovGenerated(uint64(m.ExpectedPods))
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *Eviction) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Eviction{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `DeleteOptions:` + strings.Replace(fmt.Sprintf("%v", this.DeleteOptions), "DeleteOptions", "k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodDisruptionBudget) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodDisruptionBudget{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodDisruptionBudgetSpec", "PodDisruptionBudgetSpec", 1), `&`, ``, 1) + `,`,
+ `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodDisruptionBudgetStatus", "PodDisruptionBudgetStatus", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodDisruptionBudgetList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodDisruptionBudgetList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PodDisruptionBudget", "PodDisruptionBudget", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodDisruptionBudgetSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodDisruptionBudgetSpec{`,
+ `MinAvailable:` + strings.Replace(fmt.Sprintf("%v", this.MinAvailable), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
+ `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`,
+ `MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodDisruptionBudgetStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForDisruptedPods := make([]string, 0, len(this.DisruptedPods))
+ for k := range this.DisruptedPods {
+ keysForDisruptedPods = append(keysForDisruptedPods, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForDisruptedPods)
+ mapStringForDisruptedPods := "map[string]k8s_io_apimachinery_pkg_apis_meta_v1.Time{"
+ for _, k := range keysForDisruptedPods {
+ mapStringForDisruptedPods += fmt.Sprintf("%v: %v,", k, this.DisruptedPods[k])
+ }
+ mapStringForDisruptedPods += "}"
+ s := strings.Join([]string{`&PodDisruptionBudgetStatus{`,
+ `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
+ `DisruptedPods:` + mapStringForDisruptedPods + `,`,
+ `PodDisruptionsAllowed:` + fmt.Sprintf("%v", this.PodDisruptionsAllowed) + `,`,
+ `CurrentHealthy:` + fmt.Sprintf("%v", this.CurrentHealthy) + `,`,
+ `DesiredHealthy:` + fmt.Sprintf("%v", this.DesiredHealthy) + `,`,
+ `ExpectedPods:` + fmt.Sprintf("%v", this.ExpectedPods) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *Eviction) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Eviction: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Eviction: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DeleteOptions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.DeleteOptions == nil {
+ m.DeleteOptions = &k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions{}
+ }
+ if err := m.DeleteOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodDisruptionBudget) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodDisruptionBudget: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodDisruptionBudget: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodDisruptionBudgetList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodDisruptionBudgetList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodDisruptionBudgetList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, PodDisruptionBudget{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodDisruptionBudgetSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodDisruptionBudgetSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodDisruptionBudgetSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MinAvailable", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.MinAvailable == nil {
+ m.MinAvailable = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
+ }
+ if err := m.MinAvailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Selector == nil {
+ m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{}
+ }
+ if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MaxUnavailable", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.MaxUnavailable == nil {
+ m.MaxUnavailable = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{}
+ }
+ if err := m.MaxUnavailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodDisruptionBudgetStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodDisruptionBudgetStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodDisruptionBudgetStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
+ }
+ m.ObservedGeneration = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ObservedGeneration |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DisruptedPods", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.DisruptedPods == nil {
+ m.DisruptedPods = make(map[string]k8s_io_apimachinery_pkg_apis_meta_v1.Time)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var mapmsglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ mapmsglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postmsgIndex := iNdEx + mapmsglen
+ if mapmsglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postmsgIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := &k8s_io_apimachinery_pkg_apis_meta_v1.Time{}
+ if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+ return err
+ }
+ iNdEx = postmsgIndex
+ m.DisruptedPods[mapkey] = *mapvalue
+ } else {
+ var mapvalue k8s_io_apimachinery_pkg_apis_meta_v1.Time
+ m.DisruptedPods[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodDisruptionsAllowed", wireType)
+ }
+ m.PodDisruptionsAllowed = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.PodDisruptionsAllowed |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CurrentHealthy", wireType)
+ }
+ m.CurrentHealthy = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.CurrentHealthy |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DesiredHealthy", wireType)
+ }
+ m.DesiredHealthy = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.DesiredHealthy |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ExpectedPods", wireType)
+ }
+ m.ExpectedPods = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ExpectedPods |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 791 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0x5b, 0x6f, 0xe3, 0x44,
+ 0x14, 0xc7, 0xe3, 0x5c, 0x4a, 0x98, 0x4d, 0xa2, 0x32, 0xb0, 0x10, 0x22, 0xe1, 0xa0, 0x3c, 0x2d,
+ 0x88, 0x1d, 0xd3, 0x5d, 0x84, 0x0a, 0x0f, 0x2b, 0xd6, 0xa4, 0x82, 0xa2, 0x46, 0xa9, 0xa6, 0x20,
+ 0x24, 0x04, 0x12, 0x63, 0xfb, 0xd4, 0x19, 0xe2, 0x9b, 0xec, 0x71, 0x68, 0xde, 0xf8, 0x08, 0x3c,
+ 0xf0, 0xa1, 0x2a, 0x21, 0xa1, 0x3e, 0x56, 0x08, 0x45, 0xd4, 0x7c, 0x06, 0xde, 0x91, 0xed, 0xc9,
+ 0xc5, 0x4d, 0xa2, 0x06, 0x8a, 0xf6, 0x2d, 0x73, 0xf9, 0xfd, 0xff, 0xe7, 0xfc, 0x7d, 0x26, 0xe8,
+ 0xa3, 0xf1, 0x61, 0x44, 0xb8, 0xaf, 0x8d, 0x63, 0x03, 0x42, 0x0f, 0x04, 0x44, 0x5a, 0x30, 0xb6,
+ 0x35, 0x16, 0xf0, 0x48, 0x0b, 0x7c, 0x87, 0x9b, 0x53, 0x6d, 0x72, 0x60, 0x80, 0x60, 0x07, 0x9a,
+ 0x0d, 0x1e, 0x84, 0x4c, 0x80, 0x45, 0x82, 0xd0, 0x17, 0x3e, 0x7e, 0x27, 0x47, 0xc9, 0x12, 0x25,
+ 0xc1, 0xd8, 0x26, 0x29, 0x4a, 0x72, 0x94, 0x48, 0xb4, 0xf3, 0xd8, 0xe6, 0x62, 0x14, 0x1b, 0xc4,
+ 0xf4, 0x5d, 0xcd, 0xf6, 0x6d, 0x5f, 0xcb, 0x14, 0x8c, 0xf8, 0x3c, 0x5b, 0x65, 0x8b, 0xec, 0x57,
+ 0xae, 0xdc, 0xf9, 0x40, 0x16, 0xc5, 0x02, 0xee, 0x32, 0x73, 0xc4, 0x3d, 0x08, 0xa7, 0xcb, 0xb2,
+ 0x5c, 0x10, 0x4c, 0x9b, 0xac, 0xd5, 0xd3, 0xd1, 0xb6, 0x51, 0x61, 0xec, 0x09, 0xee, 0xc2, 0x1a,
+ 0xf0, 0xe1, 0x5d, 0x40, 0x64, 0x8e, 0xc0, 0x65, 0x6b, 0xdc, 0xd3, 0x6d, 0x5c, 0x2c, 0xb8, 0xa3,
+ 0x71, 0x4f, 0x44, 0x22, 0x5c, 0x83, 0xde, 0xdb, 0x1a, 0xf4, 0x86, 0x5e, 0x7a, 0xbf, 0x2b, 0xa8,
+ 0x7e, 0x34, 0xe1, 0xa6, 0xe0, 0xbe, 0x87, 0xbf, 0x47, 0xf5, 0xb4, 0x67, 0x8b, 0x09, 0xd6, 0x56,
+ 0xde, 0x56, 0x1e, 0x3d, 0x78, 0xf2, 0x3e, 0x91, 0xd9, 0xaf, 0x96, 0xb0, 0x4c, 0x3f, 0xbd, 0x4d,
+ 0x26, 0x07, 0x64, 0x68, 0xfc, 0x00, 0xa6, 0x18, 0x80, 0x60, 0x3a, 0xbe, 0x9c, 0x75, 0x4b, 0xc9,
+ 0xac, 0x8b, 0x96, 0x7b, 0x74, 0xa1, 0x8a, 0x1d, 0xd4, 0xb4, 0xc0, 0x01, 0x01, 0xc3, 0x20, 0x75,
+ 0x8c, 0xda, 0xe5, 0xcc, 0xe6, 0xe9, 0x6e, 0x36, 0xfd, 0x55, 0x54, 0x7f, 0x25, 0x99, 0x75, 0x9b,
+ 0x85, 0x2d, 0x5a, 0x14, 0xef, 0xfd, 0x5a, 0x46, 0xaf, 0x9e, 0xfa, 0x56, 0x9f, 0x47, 0x61, 0x9c,
+ 0x6d, 0xe9, 0xb1, 0x65, 0x83, 0x78, 0x01, 0x7d, 0x5a, 0xa8, 0x1a, 0x05, 0x60, 0xca, 0xf6, 0x74,
+ 0xb2, 0xf3, 0x04, 0x93, 0x0d, 0xf5, 0x9e, 0x05, 0x60, 0xea, 0x0d, 0xe9, 0x57, 0x4d, 0x57, 0x34,
+ 0x53, 0xc7, 0x0e, 0xda, 0x8b, 0x04, 0x13, 0x71, 0xd4, 0xae, 0x64, 0x3e, 0xfd, 0x7b, 0xfa, 0x64,
+ 0x5a, 0x7a, 0x4b, 0x3a, 0xed, 0xe5, 0x6b, 0x2a, 0x3d, 0x7a, 0x7f, 0x28, 0xe8, 0x8d, 0x0d, 0xd4,
+ 0x09, 0x8f, 0x04, 0xfe, 0x76, 0x2d, 0x51, 0xb2, 0x5b, 0xa2, 0x29, 0x9d, 0xe5, 0xb9, 0x2f, 0x5d,
+ 0xeb, 0xf3, 0x9d, 0x95, 0x34, 0x4d, 0x54, 0xe3, 0x02, 0xdc, 0x74, 0x5a, 0x2a, 0x8f, 0x1e, 0x3c,
+ 0x79, 0x76, 0xbf, 0x36, 0xf5, 0xa6, 0xb4, 0xaa, 0x1d, 0xa7, 0xa2, 0x34, 0xd7, 0xee, 0xfd, 0x56,
+ 0xde, 0xd8, 0x5e, 0x1a, 0x37, 0x3e, 0x47, 0x0d, 0x97, 0x7b, 0xcf, 0x27, 0x8c, 0x3b, 0xcc, 0x70,
+ 0xe0, 0xce, 0xa1, 0x49, 0xdf, 0x27, 0xc9, 0xdf, 0x27, 0x39, 0xf6, 0xc4, 0x30, 0x3c, 0x13, 0x21,
+ 0xf7, 0x6c, 0x7d, 0x3f, 0x99, 0x75, 0x1b, 0x83, 0x15, 0x25, 0x5a, 0xd0, 0xc5, 0xdf, 0xa1, 0x7a,
+ 0x04, 0x0e, 0x98, 0xc2, 0x0f, 0xff, 0xdd, 0xcb, 0x38, 0x61, 0x06, 0x38, 0x67, 0x12, 0xd5, 0x1b,
+ 0x69, 0x8e, 0xf3, 0x15, 0x5d, 0x48, 0x62, 0x07, 0xb5, 0x5c, 0x76, 0xf1, 0x95, 0xc7, 0x16, 0x8d,
+ 0x54, 0xfe, 0x63, 0x23, 0x38, 0x99, 0x75, 0x5b, 0x83, 0x82, 0x16, 0xbd, 0xa5, 0xdd, 0xfb, 0xbb,
+ 0x8a, 0xde, 0xdc, 0x3a, 0x65, 0xf8, 0x0b, 0x84, 0x7d, 0x23, 0x82, 0x70, 0x02, 0xd6, 0x67, 0xf9,
+ 0x7f, 0x12, 0xf7, 0xbd, 0x2c, 0xd8, 0x8a, 0xde, 0x91, 0x1f, 0x08, 0x0f, 0xd7, 0x6e, 0xd0, 0x0d,
+ 0x14, 0xfe, 0x45, 0x41, 0x4d, 0x2b, 0xb7, 0x01, 0xeb, 0xd4, 0xb7, 0xe6, 0x83, 0xf2, 0xf5, 0xff,
+ 0xf1, 0x1e, 0x48, 0x7f, 0x55, 0xf9, 0xc8, 0x13, 0xe1, 0x54, 0x7f, 0x28, 0x0b, 0x6c, 0x16, 0xce,
+ 0x68, 0xb1, 0x08, 0x3c, 0x40, 0xd8, 0x5a, 0x48, 0x46, 0xcf, 0x1d, 0xc7, 0xff, 0x11, 0xac, 0x2c,
+ 0xf2, 0x9a, 0xfe, 0x96, 0x54, 0x78, 0x58, 0xf0, 0x9d, 0x5f, 0xa2, 0x1b, 0x40, 0xfc, 0x0c, 0xb5,
+ 0xcc, 0x38, 0x0c, 0xc1, 0x13, 0x9f, 0x03, 0x73, 0xc4, 0x68, 0xda, 0xae, 0x66, 0x52, 0xaf, 0x4b,
+ 0xa9, 0xd6, 0xa7, 0x85, 0x53, 0x7a, 0xeb, 0x76, 0xca, 0x5b, 0x10, 0xf1, 0x10, 0xac, 0x39, 0x5f,
+ 0x2b, 0xf2, 0xfd, 0xc2, 0x29, 0xbd, 0x75, 0x1b, 0x1f, 0xa2, 0x06, 0x5c, 0x04, 0x60, 0xce, 0x33,
+ 0xde, 0xcb, 0xe8, 0xd7, 0x24, 0xdd, 0x38, 0x5a, 0x39, 0xa3, 0x85, 0x9b, 0x1d, 0x07, 0xe1, 0xf5,
+ 0x10, 0xf1, 0x3e, 0xaa, 0x8c, 0x61, 0x9a, 0x7d, 0xf2, 0x97, 0x69, 0xfa, 0x13, 0x7f, 0x82, 0x6a,
+ 0x13, 0xe6, 0xc4, 0x20, 0x67, 0xff, 0xdd, 0xdd, 0x66, 0xff, 0x4b, 0xee, 0x02, 0xcd, 0xc1, 0x8f,
+ 0xcb, 0x87, 0x8a, 0xfe, 0xf8, 0xf2, 0x46, 0x2d, 0x5d, 0xdd, 0xa8, 0xa5, 0xeb, 0x1b, 0xb5, 0xf4,
+ 0x53, 0xa2, 0x2a, 0x97, 0x89, 0xaa, 0x5c, 0x25, 0xaa, 0x72, 0x9d, 0xa8, 0xca, 0x9f, 0x89, 0xaa,
+ 0xfc, 0xfc, 0x97, 0x5a, 0xfa, 0xe6, 0x25, 0xf9, 0xe1, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x58,
+ 0xfb, 0xa1, 0x14, 0x99, 0x08, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.proto
new file mode 100644
index 000000000..be840713f
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.proto
@@ -0,0 +1,114 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.pkg.apis.policy.v1beta1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1beta1";
+
+// Eviction evicts a pod from its node subject to certain policies and safety constraints.
+// This is a subresource of Pod. A request to cause such an eviction is
+// created by POSTing to .../pods/<pod name>/evictions.
+message Eviction {
+ // ObjectMeta describes the pod that is being evicted.
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // DeleteOptions may be provided
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.DeleteOptions deleteOptions = 2;
+}
+
+// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
+message PodDisruptionBudget {
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Specification of the desired behavior of the PodDisruptionBudget.
+ optional PodDisruptionBudgetSpec spec = 2;
+
+ // Most recently observed status of the PodDisruptionBudget.
+ optional PodDisruptionBudgetStatus status = 3;
+}
+
+// PodDisruptionBudgetList is a collection of PodDisruptionBudgets.
+message PodDisruptionBudgetList {
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ repeated PodDisruptionBudget items = 2;
+}
+
+// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
+message PodDisruptionBudgetSpec {
+ // An eviction is allowed if at least "minAvailable" pods selected by
+ // "selector" will still be available after the eviction, i.e. even in the
+ // absence of the evicted pod. So for example you can prevent all voluntary
+ // evictions by specifying "100%".
+ optional k8s.io.apimachinery.pkg.util.intstr.IntOrString minAvailable = 1;
+
+ // Label query over pods whose evictions are managed by the disruption
+ // budget.
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2;
+
+ // An eviction is allowed if at most "maxUnavailable" pods selected by
+ // "selector" are unavailable after the eviction, i.e. even in absence of
+ // the evicted pod. For example, one can prevent all voluntary evictions
+ // by specifying 0. This is a mutually exclusive setting with "minAvailable".
+ optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 3;
+}
+
+// PodDisruptionBudgetStatus represents information about the status of a
+// PodDisruptionBudget. Status may trail the actual state of a system.
+message PodDisruptionBudgetStatus {
+ // Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other
+ // status informatio is valid only if observedGeneration equals to PDB's object generation.
+ // +optional
+ optional int64 observedGeneration = 1;
+
+ // DisruptedPods contains information about pods whose eviction was
+ // processed by the API server eviction subresource handler but has not
+ // yet been observed by the PodDisruptionBudget controller.
+ // A pod will be in this map from the time when the API server processed the
+ // eviction request to the time when the pod is seen by PDB controller
+ // as having been marked for deletion (or after a timeout). The key in the map is the name of the pod
+ // and the value is the time when the API server processed the eviction request. If
+ // the deletion didn't occur and a pod is still there it will be removed from
+ // the list automatically by PodDisruptionBudget controller after some time.
+ // If everything goes smooth this map should be empty for the most of the time.
+ // Large number of entries in the map may indicate problems with pod deletions.
+ map<string, k8s.io.apimachinery.pkg.apis.meta.v1.Time> disruptedPods = 2;
+
+ // Number of pod disruptions that are currently allowed.
+ optional int32 disruptionsAllowed = 3;
+
+ // current number of healthy pods
+ optional int32 currentHealthy = 4;
+
+ // minimum desired number of healthy pods
+ optional int32 desiredHealthy = 5;
+
+ // total number of pods counted by this disruption budget
+ optional int32 expectedPods = 6;
+}
+
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/register.go
new file mode 100644
index 000000000..a3ccc94e6
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/register.go
@@ -0,0 +1,61 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "policy"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, RegisterDefaults)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &PodDisruptionBudget{},
+ &PodDisruptionBudgetList{},
+ &Eviction{},
+ )
+ // Add the watch version that applies
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/types.generated.go
new file mode 100644
index 000000000..a4636a80a
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/types.generated.go
@@ -0,0 +1,2305 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1beta1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg2_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ pkg3_types "k8s.io/apimachinery/pkg/types"
+ pkg1_intstr "k8s.io/apimachinery/pkg/util/intstr"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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_v1.LabelSelector
+ var v1 pkg3_types.UID
+ var v2 pkg1_intstr.IntOrString
+ var v3 time.Time
+ _, _, _, _ = v0, v1, v2, v3
+ }
+}
+
+func (x *PodDisruptionBudgetSpec) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.MinAvailable != nil
+ yyq2[1] = x.Selector != nil
+ yyq2[2] = x.MaxUnavailable != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ if x.MinAvailable == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.MinAvailable) {
+ } else if !yym4 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.MinAvailable)
+ } else {
+ z.EncFallback(x.MinAvailable)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("minAvailable"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.MinAvailable == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.MinAvailable) {
+ } else if !yym5 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.MinAvailable)
+ } else {
+ z.EncFallback(x.MinAvailable)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("selector"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Selector == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.Selector) {
+ } else {
+ z.EncFallback(x.Selector)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.MaxUnavailable == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.MaxUnavailable) {
+ } else if !yym10 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.MaxUnavailable)
+ } else {
+ z.EncFallback(x.MaxUnavailable)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("maxUnavailable"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.MaxUnavailable == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.MaxUnavailable) {
+ } else if !yym11 && z.IsJSONHandle() {
+ z.EncJSONMarshal(x.MaxUnavailable)
+ } else {
+ z.EncFallback(x.MaxUnavailable)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodDisruptionBudgetSpec) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodDisruptionBudgetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "minAvailable":
+ if r.TryDecodeAsNil() {
+ if x.MinAvailable != nil {
+ x.MinAvailable = nil
+ }
+ } else {
+ if x.MinAvailable == nil {
+ x.MinAvailable = new(pkg1_intstr.IntOrString)
+ }
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.MinAvailable) {
+ } else if !yym5 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.MinAvailable)
+ } else {
+ z.DecFallback(x.MinAvailable, false)
+ }
+ }
+ case "selector":
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg2_v1.LabelSelector)
+ }
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ case "maxUnavailable":
+ if r.TryDecodeAsNil() {
+ if x.MaxUnavailable != nil {
+ x.MaxUnavailable = nil
+ }
+ } else {
+ if x.MaxUnavailable == nil {
+ x.MaxUnavailable = new(pkg1_intstr.IntOrString)
+ }
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.MaxUnavailable) {
+ } else if !yym9 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.MaxUnavailable)
+ } else {
+ z.DecFallback(x.MaxUnavailable, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodDisruptionBudgetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.MinAvailable != nil {
+ x.MinAvailable = nil
+ }
+ } else {
+ if x.MinAvailable == nil {
+ x.MinAvailable = new(pkg1_intstr.IntOrString)
+ }
+ yym12 := z.DecBinary()
+ _ = yym12
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.MinAvailable) {
+ } else if !yym12 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.MinAvailable)
+ } else {
+ z.DecFallback(x.MinAvailable, false)
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.Selector != nil {
+ x.Selector = nil
+ }
+ } else {
+ if x.Selector == nil {
+ x.Selector = new(pkg2_v1.LabelSelector)
+ }
+ yym14 := z.DecBinary()
+ _ = yym14
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.Selector) {
+ } else {
+ z.DecFallback(x.Selector, false)
+ }
+ }
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.MaxUnavailable != nil {
+ x.MaxUnavailable = nil
+ }
+ } else {
+ if x.MaxUnavailable == nil {
+ x.MaxUnavailable = new(pkg1_intstr.IntOrString)
+ }
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.MaxUnavailable) {
+ } else if !yym16 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(x.MaxUnavailable)
+ } else {
+ z.DecFallback(x.MaxUnavailable, false)
+ }
+ }
+ for {
+ yyj10++
+ if yyhl10 {
+ yyb10 = yyj10 > l
+ } else {
+ yyb10 = r.CheckBreak()
+ }
+ if yyb10 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodDisruptionBudgetStatus) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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.ObservedGeneration != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(6)
+ } else {
+ yynn2 = 5
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ObservedGeneration))
+ }
+ } else {
+ r.EncodeInt(0)
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("observedGeneration"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ObservedGeneration))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.DisruptedPods == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.encMapstringv1_Time((map[string]pkg2_v1.Time)(x.DisruptedPods), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("disruptedPods"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.DisruptedPods == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ h.encMapstringv1_Time((map[string]pkg2_v1.Time)(x.DisruptedPods), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeInt(int64(x.PodDisruptionsAllowed))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("disruptionsAllowed"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeInt(int64(x.PodDisruptionsAllowed))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeInt(int64(x.CurrentHealthy))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("currentHealthy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeInt(int64(x.CurrentHealthy))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeInt(int64(x.DesiredHealthy))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("desiredHealthy"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ r.EncodeInt(int64(x.DesiredHealthy))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ExpectedPods))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("expectedPods"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym20 := z.EncBinary()
+ _ = yym20
+ if false {
+ } else {
+ r.EncodeInt(int64(x.ExpectedPods))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodDisruptionBudgetStatus) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodDisruptionBudgetStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "observedGeneration":
+ if r.TryDecodeAsNil() {
+ x.ObservedGeneration = 0
+ } else {
+ yyv4 := &x.ObservedGeneration
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*int64)(yyv4)) = int64(r.DecodeInt(64))
+ }
+ }
+ case "disruptedPods":
+ if r.TryDecodeAsNil() {
+ x.DisruptedPods = nil
+ } else {
+ yyv6 := &x.DisruptedPods
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ h.decMapstringv1_Time((*map[string]pkg2_v1.Time)(yyv6), d)
+ }
+ }
+ case "disruptionsAllowed":
+ if r.TryDecodeAsNil() {
+ x.PodDisruptionsAllowed = 0
+ } else {
+ yyv8 := &x.PodDisruptionsAllowed
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*int32)(yyv8)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "currentHealthy":
+ if r.TryDecodeAsNil() {
+ x.CurrentHealthy = 0
+ } else {
+ yyv10 := &x.CurrentHealthy
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*int32)(yyv10)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "desiredHealthy":
+ if r.TryDecodeAsNil() {
+ x.DesiredHealthy = 0
+ } else {
+ yyv12 := &x.DesiredHealthy
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ *((*int32)(yyv12)) = int32(r.DecodeInt(32))
+ }
+ }
+ case "expectedPods":
+ if r.TryDecodeAsNil() {
+ x.ExpectedPods = 0
+ } else {
+ yyv14 := &x.ExpectedPods
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*int32)(yyv14)) = int32(r.DecodeInt(32))
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodDisruptionBudgetStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperDecoder(d)
+ _, _, _ = h, z, r
+ var yyj16 int
+ var yyb16 bool
+ var yyhl16 bool = l >= 0
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObservedGeneration = 0
+ } else {
+ yyv17 := &x.ObservedGeneration
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*int64)(yyv17)) = int64(r.DecodeInt(64))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DisruptedPods = nil
+ } else {
+ yyv19 := &x.DisruptedPods
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decMapstringv1_Time((*map[string]pkg2_v1.Time)(yyv19), d)
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.PodDisruptionsAllowed = 0
+ } else {
+ yyv21 := &x.PodDisruptionsAllowed
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*int32)(yyv21)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.CurrentHealthy = 0
+ } else {
+ yyv23 := &x.CurrentHealthy
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ *((*int32)(yyv23)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.DesiredHealthy = 0
+ } else {
+ yyv25 := &x.DesiredHealthy
+ yym26 := z.DecBinary()
+ _ = yym26
+ if false {
+ } else {
+ *((*int32)(yyv25)) = int32(r.DecodeInt(32))
+ }
+ }
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ExpectedPods = 0
+ } else {
+ yyv27 := &x.ExpectedPods
+ yym28 := z.DecBinary()
+ _ = yym28
+ if false {
+ } else {
+ *((*int32)(yyv27)) = int32(r.DecodeInt(32))
+ }
+ }
+ for {
+ yyj16++
+ if yyhl16 {
+ yyb16 = yyj16 > l
+ } else {
+ yyb16 = r.CheckBreak()
+ }
+ if yyb16 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj16-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodDisruptionBudget) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ yy15 := &x.Spec
+ yy15.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("spec"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy17 := &x.Spec
+ yy17.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ yy20 := &x.Status
+ yy20.CodecEncodeSelf(e)
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("status"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy22 := &x.Status
+ yy22.CodecEncodeSelf(e)
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodDisruptionBudget) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodDisruptionBudget) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 = PodDisruptionBudgetSpec{}
+ } else {
+ yyv10 := &x.Spec
+ yyv10.CodecDecodeSelf(d)
+ }
+ case "status":
+ if r.TryDecodeAsNil() {
+ x.Status = PodDisruptionBudgetStatus{}
+ } else {
+ yyv11 := &x.Status
+ yyv11.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodDisruptionBudget) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Spec = PodDisruptionBudgetSpec{}
+ } else {
+ yyv19 := &x.Spec
+ yyv19.CodecDecodeSelf(d)
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Status = PodDisruptionBudgetStatus{}
+ } else {
+ yyv20 := &x.Status
+ yyv20.CodecDecodeSelf(d)
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *PodDisruptionBudgetList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSlicePodDisruptionBudget(([]PodDisruptionBudget)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSlicePodDisruptionBudget(([]PodDisruptionBudget)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PodDisruptionBudgetList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PodDisruptionBudgetList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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.decSlicePodDisruptionBudget((*[]PodDisruptionBudget)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PodDisruptionBudgetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ListMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSlicePodDisruptionBudget((*[]PodDisruptionBudget)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Eviction) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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] = x.DeleteOptions != nil
+ 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_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if yyq2[3] {
+ if x.DeleteOptions == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.DeleteOptions) {
+ } else {
+ z.EncFallback(x.DeleteOptions)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("deleteOptions"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.DeleteOptions == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else if z.HasExtensions() && z.EncExt(x.DeleteOptions) {
+ } else {
+ z.EncFallback(x.DeleteOptions)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Eviction) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Eviction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 = pkg2_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 "deleteOptions":
+ if r.TryDecodeAsNil() {
+ if x.DeleteOptions != nil {
+ x.DeleteOptions = nil
+ }
+ } else {
+ if x.DeleteOptions == nil {
+ x.DeleteOptions = new(pkg2_v1.DeleteOptions)
+ }
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.DeleteOptions) {
+ } else {
+ z.DecFallback(x.DeleteOptions, false)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Eviction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg2_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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ if x.DeleteOptions != nil {
+ x.DeleteOptions = nil
+ }
+ } else {
+ if x.DeleteOptions == nil {
+ x.DeleteOptions = new(pkg2_v1.DeleteOptions)
+ }
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.DecExt(x.DeleteOptions) {
+ } else {
+ z.DecFallback(x.DeleteOptions, false)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encMapstringv1_Time(v map[string]pkg2_v1.Time, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeMapStart(len(v))
+ for yyk1, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ yym2 := z.EncBinary()
+ _ = yym2
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(yyk1))
+ }
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy3 := &yyv1
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else if z.HasExtensions() && z.EncExt(yy3) {
+ } else if yym4 {
+ z.EncBinaryMarshal(yy3)
+ } else if !yym4 && z.IsJSONHandle() {
+ z.EncJSONMarshal(yy3)
+ } else {
+ z.EncFallback(yy3)
+ }
+ }
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) decMapstringv1_Time(v *map[string]pkg2_v1.Time, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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, 40)
+ yyv1 = make(map[string]pkg2_v1.Time, yyrl1)
+ *v = yyv1
+ }
+ var yymk1 string
+ var yymv1 pkg2_v1.Time
+ var yymg1 bool
+ if yybh1.MapValueReset {
+ yymg1 = true
+ }
+ if yyl1 > 0 {
+ for yyj1 := 0; yyj1 < yyl1; yyj1++ {
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ if r.TryDecodeAsNil() {
+ yymk1 = ""
+ } else {
+ yyv2 := &yymk1
+ yym3 := z.DecBinary()
+ _ = yym3
+ if false {
+ } else {
+ *((*string)(yyv2)) = r.DecodeString()
+ }
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = pkg2_v1.Time{}
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = pkg2_v1.Time{}
+ } else {
+ yyv4 := &yymv1
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv4) {
+ } else if yym5 {
+ z.DecBinaryUnmarshal(yyv4)
+ } else if !yym5 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv4)
+ } else {
+ z.DecFallback(yyv4, false)
+ }
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } else if yyl1 < 0 {
+ for yyj1 := 0; !r.CheckBreak(); yyj1++ {
+ z.DecSendContainerState(codecSelfer_containerMapKey1234)
+ if r.TryDecodeAsNil() {
+ yymk1 = ""
+ } else {
+ yyv6 := &yymk1
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+
+ if yymg1 {
+ yymv1 = yyv1[yymk1]
+ } else {
+ yymv1 = pkg2_v1.Time{}
+ }
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ if r.TryDecodeAsNil() {
+ yymv1 = pkg2_v1.Time{}
+ } else {
+ yyv8 := &yymv1
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv8) {
+ } else if yym9 {
+ z.DecBinaryUnmarshal(yyv8)
+ } else if !yym9 && z.IsJSONHandle() {
+ z.DecJSONUnmarshal(yyv8)
+ } else {
+ z.DecFallback(yyv8, false)
+ }
+ }
+
+ if yyv1 != nil {
+ yyv1[yymk1] = yymv1
+ }
+ }
+ } // else len==0: TODO: Should we clear map entries?
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x codecSelfer1234) encSlicePodDisruptionBudget(v []PodDisruptionBudget, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicePodDisruptionBudget(v *[]PodDisruptionBudget, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []PodDisruptionBudget{}
+ 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, 320)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]PodDisruptionBudget, yyrl1)
+ }
+ } else {
+ yyv1 = make([]PodDisruptionBudget, 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] = PodDisruptionBudget{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, PodDisruptionBudget{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PodDisruptionBudget{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, PodDisruptionBudget{}) // var yyz1 PodDisruptionBudget
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PodDisruptionBudget{}
+ } 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 = []PodDisruptionBudget{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/types.go
new file mode 100644
index 000000000..6cc56256a
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/types.go
@@ -0,0 +1,111 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/util/intstr"
+)
+
+// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
+type PodDisruptionBudgetSpec struct {
+ // An eviction is allowed if at least "minAvailable" pods selected by
+ // "selector" will still be available after the eviction, i.e. even in the
+ // absence of the evicted pod. So for example you can prevent all voluntary
+ // evictions by specifying "100%".
+ MinAvailable *intstr.IntOrString `json:"minAvailable,omitempty" protobuf:"bytes,1,opt,name=minAvailable"`
+
+ // Label query over pods whose evictions are managed by the disruption
+ // budget.
+ Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
+
+ // An eviction is allowed if at most "maxUnavailable" pods selected by
+ // "selector" are unavailable after the eviction, i.e. even in absence of
+ // the evicted pod. For example, one can prevent all voluntary evictions
+ // by specifying 0. This is a mutually exclusive setting with "minAvailable".
+ MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,3,opt,name=maxUnavailable"`
+}
+
+// PodDisruptionBudgetStatus represents information about the status of a
+// PodDisruptionBudget. Status may trail the actual state of a system.
+type PodDisruptionBudgetStatus struct {
+ // Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other
+ // status informatio is valid only if observedGeneration equals to PDB's object generation.
+ // +optional
+ ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
+
+ // DisruptedPods contains information about pods whose eviction was
+ // processed by the API server eviction subresource handler but has not
+ // yet been observed by the PodDisruptionBudget controller.
+ // A pod will be in this map from the time when the API server processed the
+ // eviction request to the time when the pod is seen by PDB controller
+ // as having been marked for deletion (or after a timeout). The key in the map is the name of the pod
+ // and the value is the time when the API server processed the eviction request. If
+ // the deletion didn't occur and a pod is still there it will be removed from
+ // the list automatically by PodDisruptionBudget controller after some time.
+ // If everything goes smooth this map should be empty for the most of the time.
+ // Large number of entries in the map may indicate problems with pod deletions.
+ DisruptedPods map[string]metav1.Time `json:"disruptedPods" protobuf:"bytes,2,rep,name=disruptedPods"`
+
+ // Number of pod disruptions that are currently allowed.
+ PodDisruptionsAllowed int32 `json:"disruptionsAllowed" protobuf:"varint,3,opt,name=disruptionsAllowed"`
+
+ // current number of healthy pods
+ CurrentHealthy int32 `json:"currentHealthy" protobuf:"varint,4,opt,name=currentHealthy"`
+
+ // minimum desired number of healthy pods
+ DesiredHealthy int32 `json:"desiredHealthy" protobuf:"varint,5,opt,name=desiredHealthy"`
+
+ // total number of pods counted by this disruption budget
+ ExpectedPods int32 `json:"expectedPods" protobuf:"varint,6,opt,name=expectedPods"`
+}
+
+// +genclient=true
+
+// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
+type PodDisruptionBudget struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Specification of the desired behavior of the PodDisruptionBudget.
+ Spec PodDisruptionBudgetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+ // Most recently observed status of the PodDisruptionBudget.
+ Status PodDisruptionBudgetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
+}
+
+// PodDisruptionBudgetList is a collection of PodDisruptionBudgets.
+type PodDisruptionBudgetList struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+ Items []PodDisruptionBudget `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// +genclient=true
+// +noMethods=true
+
+// Eviction evicts a pod from its node subject to certain policies and safety constraints.
+// This is a subresource of Pod. A request to cause such an eviction is
+// created by POSTing to .../pods/<pod name>/evictions.
+type Eviction struct {
+ metav1.TypeMeta `json:",inline"`
+
+ // ObjectMeta describes the pod that is being evicted.
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // DeleteOptions may be provided
+ DeleteOptions *metav1.DeleteOptions `json:"deleteOptions,omitempty" protobuf:"bytes,2,opt,name=deleteOptions"`
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..29432506d
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/types_swagger_doc_generated.go
@@ -0,0 +1,83 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_Eviction = map[string]string{
+ "": "Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods/<pod name>/evictions.",
+ "metadata": "ObjectMeta describes the pod that is being evicted.",
+ "deleteOptions": "DeleteOptions may be provided",
+}
+
+func (Eviction) SwaggerDoc() map[string]string {
+ return map_Eviction
+}
+
+var map_PodDisruptionBudget = map[string]string{
+ "": "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods",
+ "spec": "Specification of the desired behavior of the PodDisruptionBudget.",
+ "status": "Most recently observed status of the PodDisruptionBudget.",
+}
+
+func (PodDisruptionBudget) SwaggerDoc() map[string]string {
+ return map_PodDisruptionBudget
+}
+
+var map_PodDisruptionBudgetList = map[string]string{
+ "": "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.",
+}
+
+func (PodDisruptionBudgetList) SwaggerDoc() map[string]string {
+ return map_PodDisruptionBudgetList
+}
+
+var map_PodDisruptionBudgetSpec = map[string]string{
+ "": "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.",
+ "minAvailable": "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\".",
+ "selector": "Label query over pods whose evictions are managed by the disruption budget.",
+ "maxUnavailable": "An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\".",
+}
+
+func (PodDisruptionBudgetSpec) SwaggerDoc() map[string]string {
+ return map_PodDisruptionBudgetSpec
+}
+
+var map_PodDisruptionBudgetStatus = map[string]string{
+ "": "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.",
+ "observedGeneration": "Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other status informatio is valid only if observedGeneration equals to PDB's object generation.",
+ "disruptedPods": "DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.",
+ "disruptionsAllowed": "Number of pod disruptions that are currently allowed.",
+ "currentHealthy": "current number of healthy pods",
+ "desiredHealthy": "minimum desired number of healthy pods",
+ "expectedPods": "total number of pods counted by this disruption budget",
+}
+
+func (PodDisruptionBudgetStatus) SwaggerDoc() map[string]string {
+ return map_PodDisruptionBudgetStatus
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/zz_generated.conversion.go
new file mode 100644
index 000000000..8f3210d0d
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/zz_generated.conversion.go
@@ -0,0 +1,185 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ intstr "k8s.io/apimachinery/pkg/util/intstr"
+ policy "k8s.io/kubernetes/pkg/apis/policy"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1beta1_Eviction_To_policy_Eviction,
+ Convert_policy_Eviction_To_v1beta1_Eviction,
+ Convert_v1beta1_PodDisruptionBudget_To_policy_PodDisruptionBudget,
+ Convert_policy_PodDisruptionBudget_To_v1beta1_PodDisruptionBudget,
+ Convert_v1beta1_PodDisruptionBudgetList_To_policy_PodDisruptionBudgetList,
+ Convert_policy_PodDisruptionBudgetList_To_v1beta1_PodDisruptionBudgetList,
+ Convert_v1beta1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec,
+ Convert_policy_PodDisruptionBudgetSpec_To_v1beta1_PodDisruptionBudgetSpec,
+ Convert_v1beta1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus,
+ Convert_policy_PodDisruptionBudgetStatus_To_v1beta1_PodDisruptionBudgetStatus,
+ )
+}
+
+func autoConvert_v1beta1_Eviction_To_policy_Eviction(in *Eviction, out *policy.Eviction, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.DeleteOptions = (*v1.DeleteOptions)(unsafe.Pointer(in.DeleteOptions))
+ return nil
+}
+
+// Convert_v1beta1_Eviction_To_policy_Eviction is an autogenerated conversion function.
+func Convert_v1beta1_Eviction_To_policy_Eviction(in *Eviction, out *policy.Eviction, s conversion.Scope) error {
+ return autoConvert_v1beta1_Eviction_To_policy_Eviction(in, out, s)
+}
+
+func autoConvert_policy_Eviction_To_v1beta1_Eviction(in *policy.Eviction, out *Eviction, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.DeleteOptions = (*v1.DeleteOptions)(unsafe.Pointer(in.DeleteOptions))
+ return nil
+}
+
+// Convert_policy_Eviction_To_v1beta1_Eviction is an autogenerated conversion function.
+func Convert_policy_Eviction_To_v1beta1_Eviction(in *policy.Eviction, out *Eviction, s conversion.Scope) error {
+ return autoConvert_policy_Eviction_To_v1beta1_Eviction(in, out, s)
+}
+
+func autoConvert_v1beta1_PodDisruptionBudget_To_policy_PodDisruptionBudget(in *PodDisruptionBudget, out *policy.PodDisruptionBudget, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1beta1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_v1beta1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_PodDisruptionBudget_To_policy_PodDisruptionBudget is an autogenerated conversion function.
+func Convert_v1beta1_PodDisruptionBudget_To_policy_PodDisruptionBudget(in *PodDisruptionBudget, out *policy.PodDisruptionBudget, s conversion.Scope) error {
+ return autoConvert_v1beta1_PodDisruptionBudget_To_policy_PodDisruptionBudget(in, out, s)
+}
+
+func autoConvert_policy_PodDisruptionBudget_To_v1beta1_PodDisruptionBudget(in *policy.PodDisruptionBudget, out *PodDisruptionBudget, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_policy_PodDisruptionBudgetSpec_To_v1beta1_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ if err := Convert_policy_PodDisruptionBudgetStatus_To_v1beta1_PodDisruptionBudgetStatus(&in.Status, &out.Status, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_policy_PodDisruptionBudget_To_v1beta1_PodDisruptionBudget is an autogenerated conversion function.
+func Convert_policy_PodDisruptionBudget_To_v1beta1_PodDisruptionBudget(in *policy.PodDisruptionBudget, out *PodDisruptionBudget, s conversion.Scope) error {
+ return autoConvert_policy_PodDisruptionBudget_To_v1beta1_PodDisruptionBudget(in, out, s)
+}
+
+func autoConvert_v1beta1_PodDisruptionBudgetList_To_policy_PodDisruptionBudgetList(in *PodDisruptionBudgetList, out *policy.PodDisruptionBudgetList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]policy.PodDisruptionBudget)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1beta1_PodDisruptionBudgetList_To_policy_PodDisruptionBudgetList is an autogenerated conversion function.
+func Convert_v1beta1_PodDisruptionBudgetList_To_policy_PodDisruptionBudgetList(in *PodDisruptionBudgetList, out *policy.PodDisruptionBudgetList, s conversion.Scope) error {
+ return autoConvert_v1beta1_PodDisruptionBudgetList_To_policy_PodDisruptionBudgetList(in, out, s)
+}
+
+func autoConvert_policy_PodDisruptionBudgetList_To_v1beta1_PodDisruptionBudgetList(in *policy.PodDisruptionBudgetList, out *PodDisruptionBudgetList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]PodDisruptionBudget, 0)
+ } else {
+ out.Items = *(*[]PodDisruptionBudget)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_policy_PodDisruptionBudgetList_To_v1beta1_PodDisruptionBudgetList is an autogenerated conversion function.
+func Convert_policy_PodDisruptionBudgetList_To_v1beta1_PodDisruptionBudgetList(in *policy.PodDisruptionBudgetList, out *PodDisruptionBudgetList, s conversion.Scope) error {
+ return autoConvert_policy_PodDisruptionBudgetList_To_v1beta1_PodDisruptionBudgetList(in, out, s)
+}
+
+func autoConvert_v1beta1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(in *PodDisruptionBudgetSpec, out *policy.PodDisruptionBudgetSpec, s conversion.Scope) error {
+ out.MinAvailable = (*intstr.IntOrString)(unsafe.Pointer(in.MinAvailable))
+ out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector))
+ out.MaxUnavailable = (*intstr.IntOrString)(unsafe.Pointer(in.MaxUnavailable))
+ return nil
+}
+
+// Convert_v1beta1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec is an autogenerated conversion function.
+func Convert_v1beta1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(in *PodDisruptionBudgetSpec, out *policy.PodDisruptionBudgetSpec, s conversion.Scope) error {
+ return autoConvert_v1beta1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(in, out, s)
+}
+
+func autoConvert_policy_PodDisruptionBudgetSpec_To_v1beta1_PodDisruptionBudgetSpec(in *policy.PodDisruptionBudgetSpec, out *PodDisruptionBudgetSpec, s conversion.Scope) error {
+ out.MinAvailable = (*intstr.IntOrString)(unsafe.Pointer(in.MinAvailable))
+ out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector))
+ out.MaxUnavailable = (*intstr.IntOrString)(unsafe.Pointer(in.MaxUnavailable))
+ return nil
+}
+
+// Convert_policy_PodDisruptionBudgetSpec_To_v1beta1_PodDisruptionBudgetSpec is an autogenerated conversion function.
+func Convert_policy_PodDisruptionBudgetSpec_To_v1beta1_PodDisruptionBudgetSpec(in *policy.PodDisruptionBudgetSpec, out *PodDisruptionBudgetSpec, s conversion.Scope) error {
+ return autoConvert_policy_PodDisruptionBudgetSpec_To_v1beta1_PodDisruptionBudgetSpec(in, out, s)
+}
+
+func autoConvert_v1beta1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus(in *PodDisruptionBudgetStatus, out *policy.PodDisruptionBudgetStatus, s conversion.Scope) error {
+ out.ObservedGeneration = in.ObservedGeneration
+ out.DisruptedPods = *(*map[string]v1.Time)(unsafe.Pointer(&in.DisruptedPods))
+ out.PodDisruptionsAllowed = in.PodDisruptionsAllowed
+ out.CurrentHealthy = in.CurrentHealthy
+ out.DesiredHealthy = in.DesiredHealthy
+ out.ExpectedPods = in.ExpectedPods
+ return nil
+}
+
+// Convert_v1beta1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus is an autogenerated conversion function.
+func Convert_v1beta1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus(in *PodDisruptionBudgetStatus, out *policy.PodDisruptionBudgetStatus, s conversion.Scope) error {
+ return autoConvert_v1beta1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus(in, out, s)
+}
+
+func autoConvert_policy_PodDisruptionBudgetStatus_To_v1beta1_PodDisruptionBudgetStatus(in *policy.PodDisruptionBudgetStatus, out *PodDisruptionBudgetStatus, s conversion.Scope) error {
+ out.ObservedGeneration = in.ObservedGeneration
+ out.DisruptedPods = *(*map[string]v1.Time)(unsafe.Pointer(&in.DisruptedPods))
+ out.PodDisruptionsAllowed = in.PodDisruptionsAllowed
+ out.CurrentHealthy = in.CurrentHealthy
+ out.DesiredHealthy = in.DesiredHealthy
+ out.ExpectedPods = in.ExpectedPods
+ return nil
+}
+
+// Convert_policy_PodDisruptionBudgetStatus_To_v1beta1_PodDisruptionBudgetStatus is an autogenerated conversion function.
+func Convert_policy_PodDisruptionBudgetStatus_To_v1beta1_PodDisruptionBudgetStatus(in *policy.PodDisruptionBudgetStatus, out *PodDisruptionBudgetStatus, s conversion.Scope) error {
+ return autoConvert_policy_PodDisruptionBudgetStatus_To_v1beta1_PodDisruptionBudgetStatus(in, out, s)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..cf8ddbd62
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/zz_generated.deepcopy.go
@@ -0,0 +1,153 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ intstr "k8s.io/apimachinery/pkg/util/intstr"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Eviction, InType: reflect.TypeOf(&Eviction{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_PodDisruptionBudget, InType: reflect.TypeOf(&PodDisruptionBudget{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_PodDisruptionBudgetList, InType: reflect.TypeOf(&PodDisruptionBudgetList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_PodDisruptionBudgetSpec, InType: reflect.TypeOf(&PodDisruptionBudgetSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_PodDisruptionBudgetStatus, InType: reflect.TypeOf(&PodDisruptionBudgetStatus{})},
+ )
+}
+
+// DeepCopy_v1beta1_Eviction is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_Eviction(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Eviction)
+ out := out.(*Eviction)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.DeleteOptions != nil {
+ in, out := &in.DeleteOptions, &out.DeleteOptions
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.DeleteOptions)
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_PodDisruptionBudget is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_PodDisruptionBudget(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodDisruptionBudget)
+ out := out.(*PodDisruptionBudget)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1beta1_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_v1beta1_PodDisruptionBudgetStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_PodDisruptionBudgetList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_PodDisruptionBudgetList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodDisruptionBudgetList)
+ out := out.(*PodDisruptionBudgetList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodDisruptionBudget, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_PodDisruptionBudget(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_PodDisruptionBudgetSpec is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_PodDisruptionBudgetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodDisruptionBudgetSpec)
+ out := out.(*PodDisruptionBudgetSpec)
+ *out = *in
+ if in.MinAvailable != nil {
+ in, out := &in.MinAvailable, &out.MinAvailable
+ *out = new(intstr.IntOrString)
+ **out = **in
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if in.MaxUnavailable != nil {
+ in, out := &in.MaxUnavailable, &out.MaxUnavailable
+ *out = new(intstr.IntOrString)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_PodDisruptionBudgetStatus is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_PodDisruptionBudgetStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodDisruptionBudgetStatus)
+ out := out.(*PodDisruptionBudgetStatus)
+ *out = *in
+ if in.DisruptedPods != nil {
+ in, out := &in.DisruptedPods, &out.DisruptedPods
+ *out = make(map[string]v1.Time)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/zz_generated.defaults.go
new file mode 100644
index 000000000..e24e70be3
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/zz_generated.defaults.go
@@ -0,0 +1,32 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/policy/zz_generated.deepcopy.go
new file mode 100644
index 000000000..ba27f9072
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/zz_generated.deepcopy.go
@@ -0,0 +1,153 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package policy
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ intstr "k8s.io/apimachinery/pkg/util/intstr"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_policy_Eviction, InType: reflect.TypeOf(&Eviction{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_policy_PodDisruptionBudget, InType: reflect.TypeOf(&PodDisruptionBudget{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_policy_PodDisruptionBudgetList, InType: reflect.TypeOf(&PodDisruptionBudgetList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_policy_PodDisruptionBudgetSpec, InType: reflect.TypeOf(&PodDisruptionBudgetSpec{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_policy_PodDisruptionBudgetStatus, InType: reflect.TypeOf(&PodDisruptionBudgetStatus{})},
+ )
+}
+
+// DeepCopy_policy_Eviction is an autogenerated deepcopy function.
+func DeepCopy_policy_Eviction(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Eviction)
+ out := out.(*Eviction)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.DeleteOptions != nil {
+ in, out := &in.DeleteOptions, &out.DeleteOptions
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.DeleteOptions)
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_policy_PodDisruptionBudget is an autogenerated deepcopy function.
+func DeepCopy_policy_PodDisruptionBudget(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodDisruptionBudget)
+ out := out.(*PodDisruptionBudget)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_policy_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ if err := DeepCopy_policy_PodDisruptionBudgetStatus(&in.Status, &out.Status, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_policy_PodDisruptionBudgetList is an autogenerated deepcopy function.
+func DeepCopy_policy_PodDisruptionBudgetList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodDisruptionBudgetList)
+ out := out.(*PodDisruptionBudgetList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodDisruptionBudget, len(*in))
+ for i := range *in {
+ if err := DeepCopy_policy_PodDisruptionBudget(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_policy_PodDisruptionBudgetSpec is an autogenerated deepcopy function.
+func DeepCopy_policy_PodDisruptionBudgetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodDisruptionBudgetSpec)
+ out := out.(*PodDisruptionBudgetSpec)
+ *out = *in
+ if in.MinAvailable != nil {
+ in, out := &in.MinAvailable, &out.MinAvailable
+ *out = new(intstr.IntOrString)
+ **out = **in
+ }
+ if in.Selector != nil {
+ in, out := &in.Selector, &out.Selector
+ if newVal, err := c.DeepCopy(*in); err != nil {
+ return err
+ } else {
+ *out = newVal.(*v1.LabelSelector)
+ }
+ }
+ if in.MaxUnavailable != nil {
+ in, out := &in.MaxUnavailable, &out.MaxUnavailable
+ *out = new(intstr.IntOrString)
+ **out = **in
+ }
+ return nil
+ }
+}
+
+// DeepCopy_policy_PodDisruptionBudgetStatus is an autogenerated deepcopy function.
+func DeepCopy_policy_PodDisruptionBudgetStatus(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodDisruptionBudgetStatus)
+ out := out.(*PodDisruptionBudgetStatus)
+ *out = *in
+ if in.DisruptedPods != nil {
+ in, out := &in.DisruptedPods, &out.DisruptedPods
+ *out = make(map[string]v1.Time)
+ for key, val := range *in {
+ (*out)[key] = val.DeepCopy()
+ }
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/doc.go
new file mode 100644
index 000000000..b264fb9a0
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +groupName=rbac.authorization.k8s.io
+package rbac // import "k8s.io/kubernetes/pkg/apis/rbac"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/helpers.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/helpers.go
new file mode 100644
index 000000000..5e8ec5124
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/helpers.go
@@ -0,0 +1,399 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package rbac
+
+import (
+ "fmt"
+ "strings"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/util/sets"
+)
+
+func RoleRefGroupKind(roleRef RoleRef) schema.GroupKind {
+ return schema.GroupKind{Group: roleRef.APIGroup, Kind: roleRef.Kind}
+}
+
+func VerbMatches(rule *PolicyRule, requestedVerb string) bool {
+ for _, ruleVerb := range rule.Verbs {
+ if ruleVerb == VerbAll {
+ return true
+ }
+ if ruleVerb == requestedVerb {
+ return true
+ }
+ }
+
+ return false
+}
+
+func APIGroupMatches(rule *PolicyRule, requestedGroup string) bool {
+ for _, ruleGroup := range rule.APIGroups {
+ if ruleGroup == APIGroupAll {
+ return true
+ }
+ if ruleGroup == requestedGroup {
+ return true
+ }
+ }
+
+ return false
+}
+
+func ResourceMatches(rule *PolicyRule, requestedResource string) bool {
+ for _, ruleResource := range rule.Resources {
+ if ruleResource == ResourceAll {
+ return true
+ }
+ if ruleResource == requestedResource {
+ return true
+ }
+ }
+
+ return false
+}
+
+func ResourceNameMatches(rule *PolicyRule, requestedName string) bool {
+ if len(rule.ResourceNames) == 0 {
+ return true
+ }
+
+ for _, ruleName := range rule.ResourceNames {
+ if ruleName == requestedName {
+ return true
+ }
+ }
+
+ return false
+}
+
+func NonResourceURLMatches(rule *PolicyRule, requestedURL string) bool {
+ for _, ruleURL := range rule.NonResourceURLs {
+ if ruleURL == NonResourceAll {
+ return true
+ }
+ if ruleURL == requestedURL {
+ return true
+ }
+ if strings.HasSuffix(ruleURL, "*") && strings.HasPrefix(requestedURL, strings.TrimRight(ruleURL, "*")) {
+ return true
+ }
+ }
+
+ return false
+}
+
+// subjectsStrings returns users, groups, serviceaccounts, unknown for display purposes.
+func SubjectsStrings(subjects []Subject) ([]string, []string, []string, []string) {
+ users := []string{}
+ groups := []string{}
+ sas := []string{}
+ others := []string{}
+
+ for _, subject := range subjects {
+ switch subject.Kind {
+ case ServiceAccountKind:
+ sas = append(sas, fmt.Sprintf("%s/%s", subject.Namespace, subject.Name))
+
+ case UserKind:
+ users = append(users, subject.Name)
+
+ case GroupKind:
+ groups = append(groups, subject.Name)
+
+ default:
+ others = append(others, fmt.Sprintf("%s/%s/%s", subject.Kind, subject.Namespace, subject.Name))
+ }
+ }
+
+ return users, groups, sas, others
+}
+
+func (r PolicyRule) String() string {
+ return "PolicyRule" + r.CompactString()
+}
+
+// CompactString exposes a compact string representation for use in escalation error messages
+func (r PolicyRule) CompactString() string {
+ formatStringParts := []string{}
+ formatArgs := []interface{}{}
+ if len(r.Resources) > 0 {
+ formatStringParts = append(formatStringParts, "Resources:%q")
+ formatArgs = append(formatArgs, r.Resources)
+ }
+ if len(r.NonResourceURLs) > 0 {
+ formatStringParts = append(formatStringParts, "NonResourceURLs:%q")
+ formatArgs = append(formatArgs, r.NonResourceURLs)
+ }
+ if len(r.ResourceNames) > 0 {
+ formatStringParts = append(formatStringParts, "ResourceNames:%q")
+ formatArgs = append(formatArgs, r.ResourceNames)
+ }
+ if len(r.APIGroups) > 0 {
+ formatStringParts = append(formatStringParts, "APIGroups:%q")
+ formatArgs = append(formatArgs, r.APIGroups)
+ }
+ if len(r.Verbs) > 0 {
+ formatStringParts = append(formatStringParts, "Verbs:%q")
+ formatArgs = append(formatArgs, r.Verbs)
+ }
+ formatString := "{" + strings.Join(formatStringParts, ", ") + "}"
+ return fmt.Sprintf(formatString, formatArgs...)
+}
+
+// +k8s:deepcopy-gen=false
+// PolicyRuleBuilder let's us attach methods. A no-no for API types.
+// We use it to construct rules in code. It's more compact than trying to write them
+// out in a literal and allows us to perform some basic checking during construction
+type PolicyRuleBuilder struct {
+ PolicyRule PolicyRule
+}
+
+func NewRule(verbs ...string) *PolicyRuleBuilder {
+ return &PolicyRuleBuilder{
+ PolicyRule: PolicyRule{Verbs: sets.NewString(verbs...).List()},
+ }
+}
+
+func (r *PolicyRuleBuilder) Groups(groups ...string) *PolicyRuleBuilder {
+ r.PolicyRule.APIGroups = combine(r.PolicyRule.APIGroups, groups)
+ return r
+}
+
+func (r *PolicyRuleBuilder) Resources(resources ...string) *PolicyRuleBuilder {
+ r.PolicyRule.Resources = combine(r.PolicyRule.Resources, resources)
+ return r
+}
+
+func (r *PolicyRuleBuilder) Names(names ...string) *PolicyRuleBuilder {
+ r.PolicyRule.ResourceNames = combine(r.PolicyRule.ResourceNames, names)
+ return r
+}
+
+func (r *PolicyRuleBuilder) URLs(urls ...string) *PolicyRuleBuilder {
+ r.PolicyRule.NonResourceURLs = combine(r.PolicyRule.NonResourceURLs, urls)
+ return r
+}
+
+func (r *PolicyRuleBuilder) RuleOrDie() PolicyRule {
+ ret, err := r.Rule()
+ if err != nil {
+ panic(err)
+ }
+ return ret
+}
+
+func combine(s1, s2 []string) []string {
+ s := sets.NewString(s1...)
+ s.Insert(s2...)
+ return s.List()
+}
+
+func (r *PolicyRuleBuilder) Rule() (PolicyRule, error) {
+ if len(r.PolicyRule.Verbs) == 0 {
+ return PolicyRule{}, fmt.Errorf("verbs are required: %#v", r.PolicyRule)
+ }
+
+ switch {
+ case len(r.PolicyRule.NonResourceURLs) > 0:
+ if len(r.PolicyRule.APIGroups) != 0 || len(r.PolicyRule.Resources) != 0 || len(r.PolicyRule.ResourceNames) != 0 {
+ return PolicyRule{}, fmt.Errorf("non-resource rule may not have apiGroups, resources, or resourceNames: %#v", r.PolicyRule)
+ }
+ case len(r.PolicyRule.Resources) > 0:
+ if len(r.PolicyRule.NonResourceURLs) != 0 {
+ return PolicyRule{}, fmt.Errorf("resource rule may not have nonResourceURLs: %#v", r.PolicyRule)
+ }
+ if len(r.PolicyRule.APIGroups) == 0 {
+ // this a common bug
+ return PolicyRule{}, fmt.Errorf("resource rule must have apiGroups: %#v", r.PolicyRule)
+ }
+ // if resource names are set, then the verb must not be list, watch, create, or deletecollection
+ // since verbs are largely opaque, we don't want to accidentally prevent things like "impersonate", so
+ // we will backlist common mistakes, not whitelist acceptable options.
+ if len(r.PolicyRule.ResourceNames) != 0 {
+ illegalVerbs := []string{}
+ for _, verb := range r.PolicyRule.Verbs {
+ switch verb {
+ case "list", "watch", "create", "deletecollection":
+ illegalVerbs = append(illegalVerbs, verb)
+ }
+ }
+ if len(illegalVerbs) > 0 {
+ return PolicyRule{}, fmt.Errorf("verbs %v do not have names available: %#v", illegalVerbs, r.PolicyRule)
+ }
+ }
+
+ default:
+ return PolicyRule{}, fmt.Errorf("a rule must have either nonResourceURLs or resources: %#v", r.PolicyRule)
+ }
+
+ return r.PolicyRule, nil
+}
+
+// +k8s:deepcopy-gen=false
+// ClusterRoleBindingBuilder let's us attach methods. A no-no for API types.
+// We use it to construct bindings in code. It's more compact than trying to write them
+// out in a literal.
+type ClusterRoleBindingBuilder struct {
+ ClusterRoleBinding ClusterRoleBinding
+}
+
+func NewClusterBinding(clusterRoleName string) *ClusterRoleBindingBuilder {
+ return &ClusterRoleBindingBuilder{
+ ClusterRoleBinding: ClusterRoleBinding{
+ ObjectMeta: metav1.ObjectMeta{Name: clusterRoleName},
+ RoleRef: RoleRef{
+ APIGroup: GroupName,
+ Kind: "ClusterRole",
+ Name: clusterRoleName,
+ },
+ },
+ }
+}
+
+func (r *ClusterRoleBindingBuilder) Groups(groups ...string) *ClusterRoleBindingBuilder {
+ for _, group := range groups {
+ r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: GroupKind, APIGroup: GroupName, Name: group})
+ }
+ return r
+}
+
+func (r *ClusterRoleBindingBuilder) Users(users ...string) *ClusterRoleBindingBuilder {
+ for _, user := range users {
+ r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: UserKind, APIGroup: GroupName, Name: user})
+ }
+ return r
+}
+
+func (r *ClusterRoleBindingBuilder) SAs(namespace string, serviceAccountNames ...string) *ClusterRoleBindingBuilder {
+ for _, saName := range serviceAccountNames {
+ r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: ServiceAccountKind, Namespace: namespace, Name: saName})
+ }
+ return r
+}
+
+func (r *ClusterRoleBindingBuilder) BindingOrDie() ClusterRoleBinding {
+ ret, err := r.Binding()
+ if err != nil {
+ panic(err)
+ }
+ return ret
+}
+
+func (r *ClusterRoleBindingBuilder) Binding() (ClusterRoleBinding, error) {
+ if len(r.ClusterRoleBinding.Subjects) == 0 {
+ return ClusterRoleBinding{}, fmt.Errorf("subjects are required: %#v", r.ClusterRoleBinding)
+ }
+
+ return r.ClusterRoleBinding, nil
+}
+
+// +k8s:deepcopy-gen=false
+// RoleBindingBuilder let's us attach methods. It is similar to
+// ClusterRoleBindingBuilder above.
+type RoleBindingBuilder struct {
+ RoleBinding RoleBinding
+}
+
+// NewRoleBinding creates a RoleBinding builder that can be used
+// to define the subjects of a role binding. At least one of
+// the `Groups`, `Users` or `SAs` method must be called before
+// calling the `Binding*` methods.
+func NewRoleBinding(roleName, namespace string) *RoleBindingBuilder {
+ return &RoleBindingBuilder{
+ RoleBinding: RoleBinding{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: roleName,
+ Namespace: namespace,
+ },
+ RoleRef: RoleRef{
+ APIGroup: GroupName,
+ Kind: "Role",
+ Name: roleName,
+ },
+ },
+ }
+}
+
+func NewRoleBindingForClusterRole(roleName, namespace string) *RoleBindingBuilder {
+ return &RoleBindingBuilder{
+ RoleBinding: RoleBinding{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: roleName,
+ Namespace: namespace,
+ },
+ RoleRef: RoleRef{
+ APIGroup: GroupName,
+ Kind: "ClusterRole",
+ Name: roleName,
+ },
+ },
+ }
+}
+
+// Groups adds the specified groups as the subjects of the RoleBinding.
+func (r *RoleBindingBuilder) Groups(groups ...string) *RoleBindingBuilder {
+ for _, group := range groups {
+ r.RoleBinding.Subjects = append(r.RoleBinding.Subjects, Subject{Kind: GroupKind, APIGroup: GroupName, Name: group})
+ }
+ return r
+}
+
+// Users adds the specified users as the subjects of the RoleBinding.
+func (r *RoleBindingBuilder) Users(users ...string) *RoleBindingBuilder {
+ for _, user := range users {
+ r.RoleBinding.Subjects = append(r.RoleBinding.Subjects, Subject{Kind: UserKind, APIGroup: GroupName, Name: user})
+ }
+ return r
+}
+
+// SAs adds the specified service accounts as the subjects of the
+// RoleBinding.
+func (r *RoleBindingBuilder) SAs(namespace string, serviceAccountNames ...string) *RoleBindingBuilder {
+ for _, saName := range serviceAccountNames {
+ r.RoleBinding.Subjects = append(r.RoleBinding.Subjects, Subject{Kind: ServiceAccountKind, Namespace: namespace, Name: saName})
+ }
+ return r
+}
+
+// BindingOrDie calls the binding method and panics if there is an error.
+func (r *RoleBindingBuilder) BindingOrDie() RoleBinding {
+ ret, err := r.Binding()
+ if err != nil {
+ panic(err)
+ }
+ return ret
+}
+
+// Binding builds and returns the RoleBinding API object from the builder
+// object.
+func (r *RoleBindingBuilder) Binding() (RoleBinding, error) {
+ if len(r.RoleBinding.Subjects) == 0 {
+ return RoleBinding{}, fmt.Errorf("subjects are required: %#v", r.RoleBinding)
+ }
+
+ return r.RoleBinding, nil
+}
+
+type SortableRuleSlice []PolicyRule
+
+func (s SortableRuleSlice) Len() int { return len(s) }
+func (s SortableRuleSlice) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
+func (s SortableRuleSlice) Less(i, j int) bool {
+ return strings.Compare(s[i].String(), s[j].String()) < 0
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/install/install.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/install/install.go
new file mode 100644
index 000000000..36067ed14
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/install/install.go
@@ -0,0 +1,53 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package install installs the batch API group, making it available as
+// an option to all of the API encoding/decoding machinery.
+package install
+
+import (
+ "k8s.io/apimachinery/pkg/apimachinery/announced"
+ "k8s.io/apimachinery/pkg/apimachinery/registered"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/sets"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/rbac"
+ "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1"
+ "k8s.io/kubernetes/pkg/apis/rbac/v1beta1"
+)
+
+func init() {
+ Install(api.GroupFactoryRegistry, api.Registry, api.Scheme)
+}
+
+// Install registers the API group and adds types to a scheme
+func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
+ if err := announced.NewGroupMetaFactory(
+ &announced.GroupMetaFactoryArgs{
+ GroupName: rbac.GroupName,
+ VersionPreferenceOrder: []string{v1beta1.SchemeGroupVersion.Version, v1alpha1.SchemeGroupVersion.Version},
+ ImportPrefix: "k8s.io/kubernetes/pkg/apis/rbac",
+ RootScopedKinds: sets.NewString("ClusterRole", "ClusterRoleBinding"),
+ AddInternalObjectsToScheme: rbac.AddToScheme,
+ },
+ announced.VersionToSchemeFunc{
+ v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme,
+ v1alpha1.SchemeGroupVersion.Version: v1alpha1.AddToScheme,
+ },
+ ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil {
+ panic(err)
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/register.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/register.go
new file mode 100644
index 000000000..f4a838bd8
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/register.go
@@ -0,0 +1,58 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package rbac
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+const GroupName = "rbac.authorization.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Role{},
+ &RoleBinding{},
+ &RoleBindingList{},
+ &RoleList{},
+
+ &ClusterRole{},
+ &ClusterRoleBinding{},
+ &ClusterRoleBindingList{},
+ &ClusterRoleList{},
+ )
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/types.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/types.go
new file mode 100644
index 000000000..ddc2456a0
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/types.go
@@ -0,0 +1,188 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package rbac
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// Authorization is calculated against
+// 1. evaluation of ClusterRoleBindings - short circuit on match
+// 2. evaluation of RoleBindings in the namespace requested - short circuit on match
+// 3. deny by default
+
+const (
+ APIGroupAll = "*"
+ ResourceAll = "*"
+ VerbAll = "*"
+ NonResourceAll = "*"
+
+ GroupKind = "Group"
+ ServiceAccountKind = "ServiceAccount"
+ UserKind = "User"
+
+ // AutoUpdateAnnotationKey is the name of an annotation which prevents reconciliation if set to "false"
+ AutoUpdateAnnotationKey = "rbac.authorization.kubernetes.io/autoupdate"
+)
+
+// PolicyRule holds information that describes a policy rule, but does not contain information
+// about who the rule applies to or which namespace the rule applies to.
+type PolicyRule struct {
+ // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.
+ Verbs []string
+
+ // APIGroups is the name of the APIGroup that contains the resources.
+ // If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.
+ APIGroups []string
+ // Resources is a list of resources this rule applies to. ResourceAll represents all resources.
+ Resources []string
+ // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
+ ResourceNames []string
+
+ // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path
+ // If an action is not a resource API request, then the URL is split on '/' and is checked against the NonResourceURLs to look for a match.
+ // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.
+ // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.
+ NonResourceURLs []string
+}
+
+// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference,
+// or a value for non-objects such as user and group names.
+type Subject struct {
+ // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
+ // If the Authorizer does not recognized the kind value, the Authorizer should report an error.
+ Kind string
+ // APIGroup holds the API group of the referenced subject.
+ // Defaults to "" for ServiceAccount subjects.
+ // Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
+ APIGroup string
+ // Name of the object being referenced.
+ Name string
+ // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty
+ // the Authorizer should report an error.
+ Namespace string
+}
+
+// RoleRef contains information that points to the role being used
+type RoleRef struct {
+ // APIGroup is the group for the resource being referenced
+ APIGroup string
+ // Kind is the type of resource being referenced
+ Kind string
+ // Name is the name of resource being referenced
+ Name string
+}
+
+// +genclient=true
+
+// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
+type Role struct {
+ metav1.TypeMeta
+ // Standard object's metadata.
+ metav1.ObjectMeta
+
+ // Rules holds all the PolicyRules for this Role
+ Rules []PolicyRule
+}
+
+// +genclient=true
+
+// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace.
+// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given
+// namespace only have effect in that namespace.
+type RoleBinding struct {
+ metav1.TypeMeta
+ metav1.ObjectMeta
+
+ // Subjects holds references to the objects the role applies to.
+ Subjects []Subject
+
+ // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
+ // If the RoleRef cannot be resolved, the Authorizer must return an error.
+ RoleRef RoleRef
+}
+
+// RoleBindingList is a collection of RoleBindings
+type RoleBindingList struct {
+ metav1.TypeMeta
+ // Standard object's metadata.
+ metav1.ListMeta
+
+ // Items is a list of roleBindings
+ Items []RoleBinding
+}
+
+// RoleList is a collection of Roles
+type RoleList struct {
+ metav1.TypeMeta
+ // Standard object's metadata.
+ metav1.ListMeta
+
+ // Items is a list of roles
+ Items []Role
+}
+
+// +genclient=true
+// +nonNamespaced=true
+
+// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
+type ClusterRole struct {
+ metav1.TypeMeta
+ // Standard object's metadata.
+ metav1.ObjectMeta
+
+ // Rules holds all the PolicyRules for this ClusterRole
+ Rules []PolicyRule
+}
+
+// +genclient=true
+// +nonNamespaced=true
+
+// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace,
+// and adds who information via Subject.
+type ClusterRoleBinding struct {
+ metav1.TypeMeta
+ // Standard object's metadata.
+ metav1.ObjectMeta
+
+ // Subjects holds references to the objects the role applies to.
+ Subjects []Subject
+
+ // RoleRef can only reference a ClusterRole in the global namespace.
+ // If the RoleRef cannot be resolved, the Authorizer must return an error.
+ RoleRef RoleRef
+}
+
+// ClusterRoleBindingList is a collection of ClusterRoleBindings
+type ClusterRoleBindingList struct {
+ metav1.TypeMeta
+ // Standard object's metadata.
+ metav1.ListMeta
+
+ // Items is a list of ClusterRoleBindings
+ Items []ClusterRoleBinding
+}
+
+// ClusterRoleList is a collection of ClusterRoles
+type ClusterRoleList struct {
+ metav1.TypeMeta
+ // Standard object's metadata.
+ metav1.ListMeta
+
+ // Items is a list of ClusterRoles
+ Items []ClusterRole
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/conversion.go
new file mode 100644
index 000000000..4c1f4d698
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/conversion.go
@@ -0,0 +1,81 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ "k8s.io/apimachinery/pkg/conversion"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ api "k8s.io/kubernetes/pkg/apis/rbac"
+)
+
+// allAuthenticated matches k8s.io/apiserver/pkg/authentication/user.AllAuthenticated,
+// but we don't want an client library (which must include types), depending on a server library
+const allAuthenticated = "system:authenticated"
+
+func Convert_v1alpha1_Subject_To_rbac_Subject(in *Subject, out *api.Subject, s conversion.Scope) error {
+ if err := autoConvert_v1alpha1_Subject_To_rbac_Subject(in, out, s); err != nil {
+ return err
+ }
+
+ // specifically set the APIGroup for the three subjects recognized in v1alpha1
+ switch {
+ case in.Kind == ServiceAccountKind:
+ out.APIGroup = ""
+ case in.Kind == UserKind:
+ out.APIGroup = GroupName
+ case in.Kind == GroupKind:
+ out.APIGroup = GroupName
+ default:
+ // For unrecognized kinds, use the group portion of the APIVersion if we can get it
+ if gv, err := schema.ParseGroupVersion(in.APIVersion); err == nil {
+ out.APIGroup = gv.Group
+ }
+ }
+
+ // User * in v1alpha1 will only match all authenticated users
+ // This is only for compatibility with old RBAC bindings
+ // Special treatment for * should not be included in v1beta1
+ if out.Kind == UserKind && out.APIGroup == GroupName && out.Name == "*" {
+ out.Kind = GroupKind
+ out.Name = allAuthenticated
+ }
+
+ return nil
+}
+
+func Convert_rbac_Subject_To_v1alpha1_Subject(in *api.Subject, out *Subject, s conversion.Scope) error {
+ if err := autoConvert_rbac_Subject_To_v1alpha1_Subject(in, out, s); err != nil {
+ return err
+ }
+
+ switch {
+ case in.Kind == ServiceAccountKind && in.APIGroup == "":
+ // Make service accounts v1
+ out.APIVersion = "v1"
+ case in.Kind == UserKind && in.APIGroup == GroupName:
+ // users in the rbac API group get v1alpha
+ out.APIVersion = SchemeGroupVersion.String()
+ case in.Kind == GroupKind && in.APIGroup == GroupName:
+ // groups in the rbac API group get v1alpha
+ out.APIVersion = SchemeGroupVersion.String()
+ default:
+ // otherwise, they get an unspecified version of a group
+ out.APIVersion = schema.GroupVersion{Group: in.APIGroup}.String()
+ }
+
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/defaults.go
new file mode 100644
index 000000000..daa86a0e1
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/defaults.go
@@ -0,0 +1,48 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
+
+func SetDefaults_ClusterRoleBinding(obj *ClusterRoleBinding) {
+ if len(obj.RoleRef.APIGroup) == 0 {
+ obj.RoleRef.APIGroup = GroupName
+ }
+}
+func SetDefaults_RoleBinding(obj *RoleBinding) {
+ if len(obj.RoleRef.APIGroup) == 0 {
+ obj.RoleRef.APIGroup = GroupName
+ }
+}
+func SetDefaults_Subject(obj *Subject) {
+ if len(obj.APIVersion) == 0 {
+ switch obj.Kind {
+ case ServiceAccountKind:
+ obj.APIVersion = "v1"
+ case UserKind:
+ obj.APIVersion = SchemeGroupVersion.String()
+ case GroupKind:
+ obj.APIVersion = SchemeGroupVersion.String()
+ }
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/doc.go
new file mode 100644
index 000000000..3e22c9a06
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/doc.go
@@ -0,0 +1,23 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/rbac
+// +k8s:openapi-gen=true
+// +k8s:defaulter-gen=TypeMeta
+
+// +groupName=rbac.authorization.k8s.io
+package v1alpha1 // import "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.pb.go
new file mode 100644
index 000000000..488e54403
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.pb.go
@@ -0,0 +1,2822 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1alpha1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.proto
+
+ It has these top-level messages:
+ ClusterRole
+ ClusterRoleBinding
+ ClusterRoleBindingBuilder
+ ClusterRoleBindingList
+ ClusterRoleList
+ PolicyRule
+ PolicyRuleBuilder
+ Role
+ RoleBinding
+ RoleBindingList
+ RoleList
+ RoleRef
+ Subject
+*/
+package v1alpha1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *ClusterRole) Reset() { *m = ClusterRole{} }
+func (*ClusterRole) ProtoMessage() {}
+func (*ClusterRole) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} }
+func (*ClusterRoleBinding) ProtoMessage() {}
+func (*ClusterRoleBinding) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *ClusterRoleBindingBuilder) Reset() { *m = ClusterRoleBindingBuilder{} }
+func (*ClusterRoleBindingBuilder) ProtoMessage() {}
+func (*ClusterRoleBindingBuilder) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{2}
+}
+
+func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} }
+func (*ClusterRoleBindingList) ProtoMessage() {}
+func (*ClusterRoleBindingList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
+
+func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} }
+func (*ClusterRoleList) ProtoMessage() {}
+func (*ClusterRoleList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
+
+func (m *PolicyRule) Reset() { *m = PolicyRule{} }
+func (*PolicyRule) ProtoMessage() {}
+func (*PolicyRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
+
+func (m *PolicyRuleBuilder) Reset() { *m = PolicyRuleBuilder{} }
+func (*PolicyRuleBuilder) ProtoMessage() {}
+func (*PolicyRuleBuilder) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
+
+func (m *Role) Reset() { *m = Role{} }
+func (*Role) ProtoMessage() {}
+func (*Role) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
+
+func (m *RoleBinding) Reset() { *m = RoleBinding{} }
+func (*RoleBinding) ProtoMessage() {}
+func (*RoleBinding) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
+
+func (m *RoleBindingList) Reset() { *m = RoleBindingList{} }
+func (*RoleBindingList) ProtoMessage() {}
+func (*RoleBindingList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
+
+func (m *RoleList) Reset() { *m = RoleList{} }
+func (*RoleList) ProtoMessage() {}
+func (*RoleList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
+
+func (m *RoleRef) Reset() { *m = RoleRef{} }
+func (*RoleRef) ProtoMessage() {}
+func (*RoleRef) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} }
+
+func (m *Subject) Reset() { *m = Subject{} }
+func (*Subject) ProtoMessage() {}
+func (*Subject) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} }
+
+func init() {
+ proto.RegisterType((*ClusterRole)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1alpha1.ClusterRole")
+ proto.RegisterType((*ClusterRoleBinding)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1alpha1.ClusterRoleBinding")
+ proto.RegisterType((*ClusterRoleBindingBuilder)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1alpha1.ClusterRoleBindingBuilder")
+ proto.RegisterType((*ClusterRoleBindingList)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1alpha1.ClusterRoleBindingList")
+ proto.RegisterType((*ClusterRoleList)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1alpha1.ClusterRoleList")
+ proto.RegisterType((*PolicyRule)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1alpha1.PolicyRule")
+ proto.RegisterType((*PolicyRuleBuilder)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1alpha1.PolicyRuleBuilder")
+ proto.RegisterType((*Role)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1alpha1.Role")
+ proto.RegisterType((*RoleBinding)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1alpha1.RoleBinding")
+ proto.RegisterType((*RoleBindingList)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1alpha1.RoleBindingList")
+ proto.RegisterType((*RoleList)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1alpha1.RoleList")
+ proto.RegisterType((*RoleRef)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1alpha1.RoleRef")
+ proto.RegisterType((*Subject)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1alpha1.Subject")
+}
+func (m *ClusterRole) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ClusterRole) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ if len(m.Rules) > 0 {
+ for _, msg := range m.Rules {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ClusterRoleBinding) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ClusterRoleBinding) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n2, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ if len(m.Subjects) > 0 {
+ for _, msg := range m.Subjects {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RoleRef.Size()))
+ n3, err := m.RoleRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ return i, nil
+}
+
+func (m *ClusterRoleBindingBuilder) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ClusterRoleBindingBuilder) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ClusterRoleBinding.Size()))
+ n4, err := m.ClusterRoleBinding.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ return i, nil
+}
+
+func (m *ClusterRoleBindingList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ClusterRoleBindingList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n5, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ClusterRoleList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ClusterRoleList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n6, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PolicyRule) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PolicyRule) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Verbs) > 0 {
+ for _, s := range m.Verbs {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.APIGroups) > 0 {
+ for _, s := range m.APIGroups {
+ dAtA[i] = 0x1a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Resources) > 0 {
+ for _, s := range m.Resources {
+ dAtA[i] = 0x22
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.ResourceNames) > 0 {
+ for _, s := range m.ResourceNames {
+ dAtA[i] = 0x2a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.NonResourceURLs) > 0 {
+ for _, s := range m.NonResourceURLs {
+ dAtA[i] = 0x32
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *PolicyRuleBuilder) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PolicyRuleBuilder) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PolicyRule.Size()))
+ n7, err := m.PolicyRule.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ return i, nil
+}
+
+func (m *Role) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Role) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n8, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n8
+ if len(m.Rules) > 0 {
+ for _, msg := range m.Rules {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *RoleBinding) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RoleBinding) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n9, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n9
+ if len(m.Subjects) > 0 {
+ for _, msg := range m.Subjects {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RoleRef.Size()))
+ n10, err := m.RoleRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n10
+ return i, nil
+}
+
+func (m *RoleBindingList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RoleBindingList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n11, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n11
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *RoleList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RoleList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n12, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n12
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *RoleRef) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RoleRef) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup)))
+ i += copy(dAtA[i:], m.APIGroup)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
+ i += copy(dAtA[i:], m.Kind)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ return i, nil
+}
+
+func (m *Subject) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Subject) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
+ i += copy(dAtA[i:], m.Kind)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion)))
+ i += copy(dAtA[i:], m.APIVersion)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
+ i += copy(dAtA[i:], m.Namespace)
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *ClusterRole) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Rules) > 0 {
+ for _, e := range m.Rules {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ClusterRoleBinding) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Subjects) > 0 {
+ for _, e := range m.Subjects {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = m.RoleRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ClusterRoleBindingBuilder) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ClusterRoleBinding.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ClusterRoleBindingList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ClusterRoleList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PolicyRule) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Verbs) > 0 {
+ for _, s := range m.Verbs {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.APIGroups) > 0 {
+ for _, s := range m.APIGroups {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Resources) > 0 {
+ for _, s := range m.Resources {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.ResourceNames) > 0 {
+ for _, s := range m.ResourceNames {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.NonResourceURLs) > 0 {
+ for _, s := range m.NonResourceURLs {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PolicyRuleBuilder) Size() (n int) {
+ var l int
+ _ = l
+ l = m.PolicyRule.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Role) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Rules) > 0 {
+ for _, e := range m.Rules {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *RoleBinding) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Subjects) > 0 {
+ for _, e := range m.Subjects {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = m.RoleRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *RoleBindingList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *RoleList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *RoleRef) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.APIGroup)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Kind)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Subject) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Kind)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.APIVersion)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Namespace)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *ClusterRole) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ClusterRole{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ClusterRoleBinding) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ClusterRoleBinding{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Subjects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subjects), "Subject", "Subject", 1), `&`, ``, 1) + `,`,
+ `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ClusterRoleBindingBuilder) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ClusterRoleBindingBuilder{`,
+ `ClusterRoleBinding:` + strings.Replace(strings.Replace(this.ClusterRoleBinding.String(), "ClusterRoleBinding", "ClusterRoleBinding", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ClusterRoleBindingList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ClusterRoleBindingList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ClusterRoleBinding", "ClusterRoleBinding", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ClusterRoleList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ClusterRoleList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ClusterRole", "ClusterRole", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PolicyRule) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PolicyRule{`,
+ `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`,
+ `APIGroups:` + fmt.Sprintf("%v", this.APIGroups) + `,`,
+ `Resources:` + fmt.Sprintf("%v", this.Resources) + `,`,
+ `ResourceNames:` + fmt.Sprintf("%v", this.ResourceNames) + `,`,
+ `NonResourceURLs:` + fmt.Sprintf("%v", this.NonResourceURLs) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PolicyRuleBuilder) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PolicyRuleBuilder{`,
+ `PolicyRule:` + strings.Replace(strings.Replace(this.PolicyRule.String(), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Role) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Role{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RoleBinding) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RoleBinding{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Subjects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subjects), "Subject", "Subject", 1), `&`, ``, 1) + `,`,
+ `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RoleBindingList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RoleBindingList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "RoleBinding", "RoleBinding", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RoleList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RoleList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Role", "Role", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RoleRef) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RoleRef{`,
+ `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`,
+ `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Subject) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Subject{`,
+ `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
+ `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *ClusterRole) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ClusterRole: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ClusterRole: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Rules = append(m.Rules, PolicyRule{})
+ if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ClusterRoleBinding) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ClusterRoleBinding: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ClusterRoleBinding: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Subjects = append(m.Subjects, Subject{})
+ if err := m.Subjects[len(m.Subjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.RoleRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ClusterRoleBindingBuilder) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ClusterRoleBindingBuilder: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ClusterRoleBindingBuilder: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ClusterRoleBinding", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ClusterRoleBinding.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ClusterRoleBindingList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ClusterRoleBindingList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ClusterRoleBindingList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ClusterRoleBinding{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ClusterRoleList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ClusterRoleList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ClusterRoleList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ClusterRole{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PolicyRule) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PolicyRule: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PolicyRule: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Verbs = append(m.Verbs, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIGroups", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIGroups = append(m.APIGroups, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Resources = append(m.Resources, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceNames", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ResourceNames = append(m.ResourceNames, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NonResourceURLs", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.NonResourceURLs = append(m.NonResourceURLs, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PolicyRuleBuilder) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PolicyRuleBuilder: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PolicyRuleBuilder: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PolicyRule", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.PolicyRule.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Role) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Role: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Role: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Rules = append(m.Rules, PolicyRule{})
+ if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RoleBinding) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RoleBinding: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RoleBinding: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Subjects = append(m.Subjects, Subject{})
+ if err := m.Subjects[len(m.Subjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.RoleRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RoleBindingList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RoleBindingList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RoleBindingList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, RoleBinding{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RoleList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RoleList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RoleList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, Role{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RoleRef) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RoleRef: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RoleRef: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIGroup", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIGroup = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Kind = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Subject) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Subject: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Subject: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Kind = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Namespace = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 829 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x54, 0xcf, 0x6b, 0x24, 0x45,
+ 0x14, 0x9e, 0x4a, 0x66, 0xcc, 0xcc, 0x8b, 0x21, 0xa6, 0x04, 0x69, 0x73, 0xe8, 0x09, 0x7d, 0x0a,
+ 0xa8, 0xd5, 0x26, 0xae, 0xba, 0x07, 0x3d, 0x6c, 0x7b, 0x90, 0xe0, 0x1a, 0x43, 0x2d, 0x2e, 0xb8,
+ 0x2c, 0x68, 0x4d, 0x4f, 0xed, 0x4c, 0x39, 0xfd, 0x8b, 0xaa, 0xee, 0xc0, 0x22, 0x82, 0x47, 0x8f,
+ 0xfe, 0x15, 0x1e, 0x3d, 0x08, 0x1e, 0x3d, 0x79, 0x09, 0x7a, 0xd9, 0xe3, 0x7a, 0x19, 0x4c, 0xfb,
+ 0x87, 0x28, 0x5d, 0x5d, 0xfd, 0x23, 0x99, 0x09, 0xf9, 0x21, 0x04, 0x84, 0x3d, 0xcd, 0xf4, 0x7b,
+ 0xdf, 0xf7, 0xd5, 0xfb, 0xea, 0x75, 0x7f, 0x70, 0x77, 0x76, 0x57, 0x11, 0x11, 0xbb, 0xb3, 0x6c,
+ 0xc4, 0x65, 0xc4, 0x53, 0xae, 0xdc, 0x64, 0x36, 0x71, 0x59, 0x22, 0x94, 0x2b, 0x47, 0xcc, 0x77,
+ 0x8f, 0xf7, 0x58, 0x90, 0x4c, 0xd9, 0x9e, 0x3b, 0xe1, 0x11, 0x97, 0x2c, 0xe5, 0x63, 0x92, 0xc8,
+ 0x38, 0x8d, 0xf1, 0x6e, 0xc9, 0x24, 0x0d, 0x93, 0x24, 0xb3, 0x09, 0x29, 0x98, 0xa4, 0x60, 0x92,
+ 0x8a, 0xb9, 0xfd, 0xd6, 0x44, 0xa4, 0xd3, 0x6c, 0x44, 0xfc, 0x38, 0x74, 0x27, 0xf1, 0x24, 0x76,
+ 0xb5, 0xc0, 0x28, 0x7b, 0xa2, 0x9f, 0xf4, 0x83, 0xfe, 0x57, 0x0a, 0x6f, 0xdf, 0x31, 0x23, 0xb1,
+ 0x44, 0x84, 0xcc, 0x9f, 0x8a, 0x88, 0xcb, 0xa7, 0xcd, 0x50, 0x21, 0x4f, 0x99, 0x7b, 0xbc, 0x30,
+ 0xce, 0xb6, 0x7b, 0x11, 0x4b, 0x66, 0x51, 0x2a, 0x42, 0xbe, 0x40, 0x78, 0xef, 0x32, 0x82, 0xf2,
+ 0xa7, 0x3c, 0x64, 0x0b, 0xbc, 0x77, 0x2e, 0xe2, 0x65, 0xa9, 0x08, 0x5c, 0x11, 0xa5, 0x2a, 0x95,
+ 0xe7, 0x49, 0xce, 0xef, 0x08, 0xd6, 0x3f, 0x0a, 0x32, 0x95, 0x72, 0x49, 0xe3, 0x80, 0xe3, 0xaf,
+ 0xa0, 0x5f, 0x18, 0x19, 0xb3, 0x94, 0x59, 0x68, 0x07, 0xed, 0xae, 0xef, 0xbf, 0x4d, 0xcc, 0x7d,
+ 0xb6, 0x75, 0x9b, 0x1b, 0x2d, 0xd0, 0xe4, 0x78, 0x8f, 0x7c, 0x36, 0xfa, 0x9a, 0xfb, 0xe9, 0xa7,
+ 0x3c, 0x65, 0x1e, 0x3e, 0x99, 0x0f, 0x3b, 0xf9, 0x7c, 0x08, 0x4d, 0x8d, 0xd6, 0xaa, 0xf8, 0x0b,
+ 0xe8, 0xc9, 0x2c, 0xe0, 0xca, 0x5a, 0xd9, 0x59, 0xdd, 0x5d, 0xdf, 0xbf, 0x43, 0xae, 0xba, 0x2e,
+ 0x72, 0x14, 0x07, 0xc2, 0x7f, 0x4a, 0xb3, 0x80, 0x7b, 0x1b, 0xe6, 0x88, 0x5e, 0xf1, 0xa4, 0x68,
+ 0xa9, 0xe8, 0xfc, 0xb2, 0x02, 0xb8, 0x65, 0xc6, 0x13, 0xd1, 0x58, 0x44, 0x93, 0x5b, 0xf0, 0xf4,
+ 0x25, 0xf4, 0x55, 0xa6, 0x1b, 0x95, 0xad, 0xbd, 0xab, 0xdb, 0x7a, 0x50, 0x32, 0xbd, 0x57, 0xcc,
+ 0x11, 0x7d, 0x53, 0x50, 0xb4, 0x16, 0xc5, 0x8f, 0x61, 0x4d, 0xc6, 0x01, 0xa7, 0xfc, 0x89, 0xb5,
+ 0xaa, 0x1d, 0x5c, 0x43, 0x9f, 0x96, 0x44, 0x6f, 0xd3, 0xe8, 0xaf, 0x99, 0x02, 0xad, 0x24, 0x9d,
+ 0x1f, 0x11, 0xbc, 0xbe, 0x78, 0x6f, 0x5e, 0x26, 0x82, 0x31, 0x97, 0xf8, 0x7b, 0x04, 0xd8, 0x5f,
+ 0xe8, 0x9a, 0x9b, 0xfc, 0xe0, 0xea, 0x73, 0x2c, 0x39, 0x61, 0xdb, 0x8c, 0xb4, 0x64, 0x6b, 0x74,
+ 0xc9, 0x99, 0xce, 0x9f, 0x08, 0x5e, 0x5b, 0x84, 0xde, 0x17, 0x2a, 0xc5, 0x8f, 0x17, 0x96, 0x4c,
+ 0xae, 0xb6, 0xe4, 0x82, 0xad, 0x57, 0x5c, 0xdf, 0x7f, 0x55, 0x69, 0x2d, 0x98, 0x41, 0x4f, 0xa4,
+ 0x3c, 0xac, 0xb6, 0xfb, 0xdf, 0x5c, 0xd7, 0x2f, 0xef, 0x41, 0x21, 0x49, 0x4b, 0x65, 0xe7, 0x0f,
+ 0x04, 0x9b, 0x2d, 0xf0, 0x2d, 0x98, 0x7a, 0x74, 0xd6, 0xd4, 0xbb, 0x37, 0x33, 0xb5, 0xdc, 0xcd,
+ 0x3f, 0x08, 0xa0, 0xf9, 0x5e, 0xf1, 0x10, 0x7a, 0xc7, 0x5c, 0x8e, 0x94, 0x85, 0x76, 0x56, 0x77,
+ 0x07, 0xde, 0xa0, 0xc0, 0x3f, 0x2c, 0x0a, 0xb4, 0xac, 0xe3, 0x37, 0x60, 0xc0, 0x12, 0xf1, 0xb1,
+ 0x8c, 0xb3, 0x44, 0x59, 0xab, 0x1a, 0xb4, 0x91, 0xcf, 0x87, 0x83, 0x7b, 0x47, 0x07, 0x65, 0x91,
+ 0x36, 0xfd, 0x02, 0x2c, 0xb9, 0x8a, 0x33, 0xe9, 0x73, 0x65, 0x75, 0x1b, 0x30, 0xad, 0x8a, 0xb4,
+ 0xe9, 0xe3, 0xf7, 0x61, 0xa3, 0x7a, 0x38, 0x64, 0x21, 0x57, 0x56, 0x4f, 0x13, 0xb6, 0xf2, 0xf9,
+ 0x70, 0x83, 0xb6, 0x1b, 0xf4, 0x2c, 0x0e, 0x7f, 0x08, 0x9b, 0x51, 0x1c, 0x55, 0x90, 0xcf, 0xe9,
+ 0x7d, 0x65, 0xbd, 0xa4, 0xa9, 0xaf, 0xe6, 0xf3, 0xe1, 0xe6, 0xe1, 0xd9, 0x16, 0x3d, 0x8f, 0x75,
+ 0xbe, 0x85, 0xad, 0x56, 0x60, 0x99, 0x6f, 0x69, 0x0a, 0x90, 0xd4, 0x45, 0xb3, 0xd2, 0x9b, 0x25,
+ 0x60, 0x1d, 0x48, 0x4d, 0x8d, 0xb6, 0xb4, 0x9d, 0xdf, 0x10, 0x74, 0xff, 0xff, 0x89, 0xfe, 0xd3,
+ 0x0a, 0xac, 0xbf, 0x88, 0xf2, 0x6b, 0x44, 0x79, 0x91, 0x22, 0xb7, 0x1b, 0x8d, 0x37, 0x4f, 0x91,
+ 0xcb, 0x33, 0xf1, 0x57, 0x04, 0xfd, 0x5b, 0x0a, 0xc3, 0x07, 0x67, 0x6d, 0x90, 0x6b, 0xda, 0x58,
+ 0x3e, 0xff, 0x37, 0x50, 0x6d, 0x08, 0xbf, 0x09, 0xfd, 0x2a, 0xc0, 0xf4, 0xf4, 0x83, 0x66, 0x9a,
+ 0x2a, 0xe3, 0x68, 0x8d, 0xc0, 0x3b, 0xd0, 0x9d, 0x89, 0x68, 0x6c, 0xad, 0x68, 0xe4, 0xcb, 0x06,
+ 0xd9, 0xfd, 0x44, 0x44, 0x63, 0xaa, 0x3b, 0x05, 0x22, 0x62, 0x21, 0xd7, 0xef, 0x50, 0x0b, 0x51,
+ 0x44, 0x17, 0xd5, 0x1d, 0xe7, 0x67, 0x04, 0x6b, 0xe6, 0xfd, 0xab, 0xf5, 0xd0, 0x85, 0x7a, 0xfb,
+ 0x00, 0x2c, 0x11, 0x0f, 0xb9, 0x54, 0x22, 0x8e, 0xcc, 0xb9, 0xf5, 0x97, 0x72, 0xef, 0xe8, 0xc0,
+ 0x74, 0x68, 0x0b, 0x75, 0xf9, 0x0c, 0xd8, 0x85, 0x41, 0xf1, 0xab, 0x12, 0xe6, 0x73, 0xab, 0xab,
+ 0x61, 0x5b, 0x06, 0x36, 0x38, 0xac, 0x1a, 0xb4, 0xc1, 0x78, 0xe4, 0xe4, 0xd4, 0xee, 0x3c, 0x3b,
+ 0xb5, 0x3b, 0xcf, 0x4f, 0xed, 0xce, 0x77, 0xb9, 0x8d, 0x4e, 0x72, 0x1b, 0x3d, 0xcb, 0x6d, 0xf4,
+ 0x3c, 0xb7, 0xd1, 0x5f, 0xb9, 0x8d, 0x7e, 0xf8, 0xdb, 0xee, 0x3c, 0xea, 0x57, 0x97, 0xff, 0x6f,
+ 0x00, 0x00, 0x00, 0xff, 0xff, 0x20, 0x76, 0x05, 0x2e, 0x27, 0x0c, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.proto
new file mode 100644
index 000000000..3832ef3dd
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.proto
@@ -0,0 +1,200 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.pkg.apis.rbac.v1alpha1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1alpha1";
+
+// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
+message ClusterRole {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Rules holds all the PolicyRules for this ClusterRole
+ repeated PolicyRule rules = 2;
+}
+
+// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace,
+// and adds who information via Subject.
+message ClusterRoleBinding {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Subjects holds references to the objects the role applies to.
+ repeated Subject subjects = 2;
+
+ // RoleRef can only reference a ClusterRole in the global namespace.
+ // If the RoleRef cannot be resolved, the Authorizer must return an error.
+ optional RoleRef roleRef = 3;
+}
+
+// +k8s:deepcopy-gen=false
+// ClusterRoleBindingBuilder let's us attach methods. A no-no for API types.
+// We use it to construct bindings in code. It's more compact than trying to write them
+// out in a literal.
+message ClusterRoleBindingBuilder {
+ optional ClusterRoleBinding clusterRoleBinding = 1;
+}
+
+// ClusterRoleBindingList is a collection of ClusterRoleBindings
+message ClusterRoleBindingList {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of ClusterRoleBindings
+ repeated ClusterRoleBinding items = 2;
+}
+
+// ClusterRoleList is a collection of ClusterRoles
+message ClusterRoleList {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of ClusterRoles
+ repeated ClusterRole items = 2;
+}
+
+// PolicyRule holds information that describes a policy rule, but does not contain information
+// about who the rule applies to or which namespace the rule applies to.
+message PolicyRule {
+ // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.
+ repeated string verbs = 1;
+
+ // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of
+ // the enumerated resources in any API group will be allowed.
+ // +optional
+ repeated string apiGroups = 3;
+
+ // Resources is a list of resources this rule applies to. ResourceAll represents all resources.
+ // +optional
+ repeated string resources = 4;
+
+ // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
+ // +optional
+ repeated string resourceNames = 5;
+
+ // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path
+ // This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different.
+ // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.
+ // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.
+ // +optional
+ repeated string nonResourceURLs = 6;
+}
+
+// +k8s:deepcopy-gen=false
+// PolicyRuleBuilder let's us attach methods. A no-no for API types.
+// We use it to construct rules in code. It's more compact than trying to write them
+// out in a literal and allows us to perform some basic checking during construction
+message PolicyRuleBuilder {
+ optional PolicyRule policyRule = 1;
+}
+
+// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
+message Role {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Rules holds all the PolicyRules for this Role
+ repeated PolicyRule rules = 2;
+}
+
+// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace.
+// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given
+// namespace only have effect in that namespace.
+message RoleBinding {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Subjects holds references to the objects the role applies to.
+ repeated Subject subjects = 2;
+
+ // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
+ // If the RoleRef cannot be resolved, the Authorizer must return an error.
+ optional RoleRef roleRef = 3;
+}
+
+// RoleBindingList is a collection of RoleBindings
+message RoleBindingList {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of RoleBindings
+ repeated RoleBinding items = 2;
+}
+
+// RoleList is a collection of Roles
+message RoleList {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of Roles
+ repeated Role items = 2;
+}
+
+// RoleRef contains information that points to the role being used
+message RoleRef {
+ // APIGroup is the group for the resource being referenced
+ optional string apiGroup = 1;
+
+ // Kind is the type of resource being referenced
+ optional string kind = 2;
+
+ // Name is the name of resource being referenced
+ optional string name = 3;
+}
+
+// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference,
+// or a value for non-objects such as user and group names.
+message Subject {
+ // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
+ // If the Authorizer does not recognized the kind value, the Authorizer should report an error.
+ optional string kind = 1;
+
+ // APIVersion holds the API group and version of the referenced subject.
+ // Defaults to "v1" for ServiceAccount subjects.
+ // Defaults to "rbac.authorization.k8s.io/v1alpha1" for User and Group subjects.
+ // +k8s:conversion-gen=false
+ // +optional
+ optional string apiVersion = 2;
+
+ // Name of the object being referenced.
+ optional string name = 3;
+
+ // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty
+ // the Authorizer should report an error.
+ // +optional
+ optional string namespace = 4;
+}
+
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/helpers.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/helpers.go
new file mode 100644
index 000000000..81ecaef20
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/helpers.go
@@ -0,0 +1,148 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ "fmt"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// +k8s:deepcopy-gen=false
+// PolicyRuleBuilder let's us attach methods. A no-no for API types.
+// We use it to construct rules in code. It's more compact than trying to write them
+// out in a literal and allows us to perform some basic checking during construction
+type PolicyRuleBuilder struct {
+ PolicyRule PolicyRule `protobuf:"bytes,1,opt,name=policyRule"`
+}
+
+func NewRule(verbs ...string) *PolicyRuleBuilder {
+ return &PolicyRuleBuilder{
+ PolicyRule: PolicyRule{Verbs: verbs},
+ }
+}
+
+func (r *PolicyRuleBuilder) Groups(groups ...string) *PolicyRuleBuilder {
+ r.PolicyRule.APIGroups = append(r.PolicyRule.APIGroups, groups...)
+ return r
+}
+
+func (r *PolicyRuleBuilder) Resources(resources ...string) *PolicyRuleBuilder {
+ r.PolicyRule.Resources = append(r.PolicyRule.Resources, resources...)
+ return r
+}
+
+func (r *PolicyRuleBuilder) Names(names ...string) *PolicyRuleBuilder {
+ r.PolicyRule.ResourceNames = append(r.PolicyRule.ResourceNames, names...)
+ return r
+}
+
+func (r *PolicyRuleBuilder) URLs(urls ...string) *PolicyRuleBuilder {
+ r.PolicyRule.NonResourceURLs = append(r.PolicyRule.NonResourceURLs, urls...)
+ return r
+}
+
+func (r *PolicyRuleBuilder) RuleOrDie() PolicyRule {
+ ret, err := r.Rule()
+ if err != nil {
+ panic(err)
+ }
+ return ret
+}
+
+func (r *PolicyRuleBuilder) Rule() (PolicyRule, error) {
+ if len(r.PolicyRule.Verbs) == 0 {
+ return PolicyRule{}, fmt.Errorf("verbs are required: %#v", r.PolicyRule)
+ }
+
+ switch {
+ case len(r.PolicyRule.NonResourceURLs) > 0:
+ if len(r.PolicyRule.APIGroups) != 0 || len(r.PolicyRule.Resources) != 0 || len(r.PolicyRule.ResourceNames) != 0 {
+ return PolicyRule{}, fmt.Errorf("non-resource rule may not have apiGroups, resources, or resourceNames: %#v", r.PolicyRule)
+ }
+ case len(r.PolicyRule.Resources) > 0:
+ if len(r.PolicyRule.NonResourceURLs) != 0 {
+ return PolicyRule{}, fmt.Errorf("resource rule may not have nonResourceURLs: %#v", r.PolicyRule)
+ }
+ if len(r.PolicyRule.APIGroups) == 0 {
+ // this a common bug
+ return PolicyRule{}, fmt.Errorf("resource rule must have apiGroups: %#v", r.PolicyRule)
+ }
+ default:
+ return PolicyRule{}, fmt.Errorf("a rule must have either nonResourceURLs or resources: %#v", r.PolicyRule)
+ }
+
+ return r.PolicyRule, nil
+}
+
+// +k8s:deepcopy-gen=false
+// ClusterRoleBindingBuilder let's us attach methods. A no-no for API types.
+// We use it to construct bindings in code. It's more compact than trying to write them
+// out in a literal.
+type ClusterRoleBindingBuilder struct {
+ ClusterRoleBinding ClusterRoleBinding `protobuf:"bytes,1,opt,name=clusterRoleBinding"`
+}
+
+func NewClusterBinding(clusterRoleName string) *ClusterRoleBindingBuilder {
+ return &ClusterRoleBindingBuilder{
+ ClusterRoleBinding: ClusterRoleBinding{
+ ObjectMeta: metav1.ObjectMeta{Name: clusterRoleName},
+ RoleRef: RoleRef{
+ APIGroup: GroupName,
+ Kind: "ClusterRole",
+ Name: clusterRoleName,
+ },
+ },
+ }
+}
+
+func (r *ClusterRoleBindingBuilder) Groups(groups ...string) *ClusterRoleBindingBuilder {
+ for _, group := range groups {
+ r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: GroupKind, Name: group})
+ }
+ return r
+}
+
+func (r *ClusterRoleBindingBuilder) Users(users ...string) *ClusterRoleBindingBuilder {
+ for _, user := range users {
+ r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: UserKind, Name: user})
+ }
+ return r
+}
+
+func (r *ClusterRoleBindingBuilder) SAs(namespace string, serviceAccountNames ...string) *ClusterRoleBindingBuilder {
+ for _, saName := range serviceAccountNames {
+ r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: ServiceAccountKind, Namespace: namespace, Name: saName})
+ }
+ return r
+}
+
+func (r *ClusterRoleBindingBuilder) BindingOrDie() ClusterRoleBinding {
+ ret, err := r.Binding()
+ if err != nil {
+ panic(err)
+ }
+ return ret
+}
+
+func (r *ClusterRoleBindingBuilder) Binding() (ClusterRoleBinding, error) {
+ if len(r.ClusterRoleBinding.Subjects) == 0 {
+ return ClusterRoleBinding{}, fmt.Errorf("subjects are required: %#v", r.ClusterRoleBinding)
+ }
+
+ return r.ClusterRoleBinding, nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/register.go
new file mode 100644
index 000000000..956c800da
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/register.go
@@ -0,0 +1,65 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+const GroupName = "rbac.authorization.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Role{},
+ &RoleBinding{},
+ &RoleBindingList{},
+ &RoleList{},
+
+ &ClusterRole{},
+ &ClusterRoleBinding{},
+ &ClusterRoleBindingList{},
+ &ClusterRoleList{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.generated.go
new file mode 100644
index 000000000..03ae6182a
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.generated.go
@@ -0,0 +1,4879 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1alpha1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ pkg2_types "k8s.io/apimachinery/pkg/types"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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 pkg1_v1.TypeMeta
+ var v1 pkg2_types.UID
+ var v2 time.Time
+ _, _, _ = v0, v1, v2
+ }
+}
+
+func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = len(x.APIGroups) != 0
+ yyq2[2] = len(x.Resources) != 0
+ yyq2[3] = len(x.ResourceNames) != 0
+ yyq2[4] = len(x.NonResourceURLs) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Verbs == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Verbs, false, e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("verbs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Verbs == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Verbs, false, e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.APIGroups == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.APIGroups, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiGroups"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.APIGroups == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.APIGroups, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Resources == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Resources, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resources"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Resources == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Resources, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.ResourceNames == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.ResourceNames, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resourceNames"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ResourceNames == nil {
+ r.EncodeNil()
+ } else {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.ResourceNames, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.NonResourceURLs == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.NonResourceURLs, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nonResourceURLs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NonResourceURLs == nil {
+ r.EncodeNil()
+ } else {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.NonResourceURLs, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PolicyRule) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PolicyRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "verbs":
+ if r.TryDecodeAsNil() {
+ x.Verbs = nil
+ } else {
+ yyv4 := &x.Verbs
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv4, false, d)
+ }
+ }
+ case "apiGroups":
+ if r.TryDecodeAsNil() {
+ x.APIGroups = nil
+ } else {
+ yyv6 := &x.APIGroups
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv6, false, d)
+ }
+ }
+ case "resources":
+ if r.TryDecodeAsNil() {
+ x.Resources = nil
+ } else {
+ yyv8 := &x.Resources
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv8, false, d)
+ }
+ }
+ case "resourceNames":
+ if r.TryDecodeAsNil() {
+ x.ResourceNames = nil
+ } else {
+ yyv10 := &x.ResourceNames
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv10, false, d)
+ }
+ }
+ case "nonResourceURLs":
+ if r.TryDecodeAsNil() {
+ x.NonResourceURLs = nil
+ } else {
+ yyv12 := &x.NonResourceURLs
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv12, false, d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PolicyRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Verbs = nil
+ } else {
+ yyv15 := &x.Verbs
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv15, false, d)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIGroups = nil
+ } else {
+ yyv17 := &x.APIGroups
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv17, false, d)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Resources = nil
+ } else {
+ yyv19 := &x.Resources
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv19, false, d)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ResourceNames = nil
+ } else {
+ yyv21 := &x.ResourceNames
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv21, false, d)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NonResourceURLs = nil
+ } else {
+ yyv23 := &x.NonResourceURLs
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv23, false, d)
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Subject) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.APIVersion != ""
+ yyq2[3] = x.Namespace != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("namespace"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Subject) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Subject) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv8 := &x.Name
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "namespace":
+ if r.TryDecodeAsNil() {
+ x.Namespace = ""
+ } else {
+ yyv10 := &x.Namespace
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Subject) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv17 := &x.Name
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Namespace = ""
+ } else {
+ yyv19 := &x.Namespace
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *RoleRef) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIGroup))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiGroup"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIGroup))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RoleRef) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RoleRef) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "apiGroup":
+ if r.TryDecodeAsNil() {
+ x.APIGroup = ""
+ } else {
+ yyv4 := &x.APIGroup
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv6 := &x.Kind
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv8 := &x.Name
+ 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_containerMapEnd1234)
+}
+
+func (x *RoleRef) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIGroup = ""
+ } else {
+ yyv11 := &x.APIGroup
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv13 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv15 := &x.Name
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Role) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rules"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Role) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Role) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "rules":
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv10 := &x.Rules
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSlicePolicyRule((*[]PolicyRule)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Role) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv19 := &x.Rules
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSlicePolicyRule((*[]PolicyRule)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *RoleBinding) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Subjects == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceSubject(([]Subject)(x.Subjects), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("subjects"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Subjects == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceSubject(([]Subject)(x.Subjects), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy18 := &x.RoleRef
+ yy18.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("roleRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy20 := &x.RoleRef
+ yy20.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RoleBinding) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RoleBinding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "subjects":
+ if r.TryDecodeAsNil() {
+ x.Subjects = nil
+ } else {
+ yyv10 := &x.Subjects
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSliceSubject((*[]Subject)(yyv10), d)
+ }
+ }
+ case "roleRef":
+ if r.TryDecodeAsNil() {
+ x.RoleRef = RoleRef{}
+ } else {
+ yyv12 := &x.RoleRef
+ yyv12.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv14 := &x.Kind
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv16 := &x.APIVersion
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg1_v1.ObjectMeta{}
+ } else {
+ yyv18 := &x.ObjectMeta
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv18) {
+ } else {
+ z.DecFallback(yyv18, false)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Subjects = nil
+ } else {
+ yyv20 := &x.Subjects
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ h.decSliceSubject((*[]Subject)(yyv20), d)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RoleRef = RoleRef{}
+ } else {
+ yyv22 := &x.RoleRef
+ yyv22.CodecDecodeSelf(d)
+ }
+ for {
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj13-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *RoleBindingList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceRoleBinding(([]RoleBinding)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceRoleBinding(([]RoleBinding)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RoleBindingList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RoleBindingList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceRoleBinding((*[]RoleBinding)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RoleBindingList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceRoleBinding((*[]RoleBinding)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *RoleList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceRole(([]Role)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceRole(([]Role)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RoleList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RoleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceRole((*[]Role)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RoleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceRole((*[]Role)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ClusterRole) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rules"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ClusterRole) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ClusterRole) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "rules":
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv10 := &x.Rules
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSlicePolicyRule((*[]PolicyRule)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ClusterRole) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv19 := &x.Rules
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSlicePolicyRule((*[]PolicyRule)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ClusterRoleBinding) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Subjects == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceSubject(([]Subject)(x.Subjects), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("subjects"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Subjects == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceSubject(([]Subject)(x.Subjects), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy18 := &x.RoleRef
+ yy18.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("roleRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy20 := &x.RoleRef
+ yy20.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ClusterRoleBinding) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ClusterRoleBinding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "subjects":
+ if r.TryDecodeAsNil() {
+ x.Subjects = nil
+ } else {
+ yyv10 := &x.Subjects
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSliceSubject((*[]Subject)(yyv10), d)
+ }
+ }
+ case "roleRef":
+ if r.TryDecodeAsNil() {
+ x.RoleRef = RoleRef{}
+ } else {
+ yyv12 := &x.RoleRef
+ yyv12.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ClusterRoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv14 := &x.Kind
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv16 := &x.APIVersion
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg1_v1.ObjectMeta{}
+ } else {
+ yyv18 := &x.ObjectMeta
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv18) {
+ } else {
+ z.DecFallback(yyv18, false)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Subjects = nil
+ } else {
+ yyv20 := &x.Subjects
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ h.decSliceSubject((*[]Subject)(yyv20), d)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RoleRef = RoleRef{}
+ } else {
+ yyv22 := &x.RoleRef
+ yyv22.CodecDecodeSelf(d)
+ }
+ for {
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj13-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ClusterRoleBindingList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceClusterRoleBinding(([]ClusterRoleBinding)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceClusterRoleBinding(([]ClusterRoleBinding)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ClusterRoleBindingList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ClusterRoleBindingList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceClusterRoleBinding((*[]ClusterRoleBinding)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ClusterRoleBindingList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceClusterRoleBinding((*[]ClusterRoleBinding)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ClusterRoleList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceClusterRole(([]ClusterRole)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceClusterRole(([]ClusterRole)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ClusterRoleList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ClusterRoleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceClusterRole((*[]ClusterRole)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ClusterRoleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceClusterRole((*[]ClusterRole)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encSlicePolicyRule(v []PolicyRule, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicePolicyRule(v *[]PolicyRule, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []PolicyRule{}
+ 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, 120)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]PolicyRule, yyrl1)
+ }
+ } else {
+ yyv1 = make([]PolicyRule, 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] = PolicyRule{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, PolicyRule{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PolicyRule{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, PolicyRule{}) // var yyz1 PolicyRule
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PolicyRule{}
+ } 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 = []PolicyRule{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceSubject(v []Subject, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceSubject(v *[]Subject, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Subject{}
+ 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, 64)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Subject, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Subject, 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] = Subject{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Subject{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Subject{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Subject{}) // var yyz1 Subject
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Subject{}
+ } 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 = []Subject{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceRoleBinding(v []RoleBinding, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceRoleBinding(v *[]RoleBinding, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []RoleBinding{}
+ 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, 336)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]RoleBinding, yyrl1)
+ }
+ } else {
+ yyv1 = make([]RoleBinding, 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] = RoleBinding{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, RoleBinding{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = RoleBinding{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, RoleBinding{}) // var yyz1 RoleBinding
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = RoleBinding{}
+ } 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 = []RoleBinding{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceRole(v []Role, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceRole(v *[]Role, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Role{}
+ 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, 288)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Role, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Role, 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] = Role{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Role{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Role{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Role{}) // var yyz1 Role
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Role{}
+ } 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 = []Role{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceClusterRoleBinding(v []ClusterRoleBinding, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceClusterRoleBinding(v *[]ClusterRoleBinding, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ClusterRoleBinding{}
+ 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, 336)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ClusterRoleBinding, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ClusterRoleBinding, 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] = ClusterRoleBinding{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ClusterRoleBinding{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ClusterRoleBinding{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ClusterRoleBinding{}) // var yyz1 ClusterRoleBinding
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ClusterRoleBinding{}
+ } 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 = []ClusterRoleBinding{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceClusterRole(v []ClusterRole, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceClusterRole(v *[]ClusterRole, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ClusterRole{}
+ 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, 288)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ClusterRole, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ClusterRole, 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] = ClusterRole{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ClusterRole{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ClusterRole{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ClusterRole{}) // var yyz1 ClusterRole
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ClusterRole{}
+ } 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 = []ClusterRole{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.go
new file mode 100644
index 000000000..e9f8efb3b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.go
@@ -0,0 +1,209 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// Authorization is calculated against
+// 1. evaluation of ClusterRoleBindings - short circuit on match
+// 2. evaluation of RoleBindings in the namespace requested - short circuit on match
+// 3. deny by default
+
+const (
+ APIGroupAll = "*"
+ ResourceAll = "*"
+ VerbAll = "*"
+ NonResourceAll = "*"
+
+ GroupKind = "Group"
+ ServiceAccountKind = "ServiceAccount"
+ UserKind = "User"
+
+ // AutoUpdateAnnotationKey is the name of an annotation which prevents reconciliation if set to "false"
+ AutoUpdateAnnotationKey = "rbac.authorization.kubernetes.io/autoupdate"
+)
+
+// Authorization is calculated against
+// 1. evaluation of ClusterRoleBindings - short circuit on match
+// 2. evaluation of RoleBindings in the namespace requested - short circuit on match
+// 3. deny by default
+
+// PolicyRule holds information that describes a policy rule, but does not contain information
+// about who the rule applies to or which namespace the rule applies to.
+type PolicyRule struct {
+ // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.
+ Verbs []string `json:"verbs" protobuf:"bytes,1,rep,name=verbs"`
+
+ // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of
+ // the enumerated resources in any API group will be allowed.
+ // +optional
+ APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,3,rep,name=apiGroups"`
+ // Resources is a list of resources this rule applies to. ResourceAll represents all resources.
+ // +optional
+ Resources []string `json:"resources,omitempty" protobuf:"bytes,4,rep,name=resources"`
+ // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
+ // +optional
+ ResourceNames []string `json:"resourceNames,omitempty" protobuf:"bytes,5,rep,name=resourceNames"`
+
+ // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path
+ // This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different.
+ // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.
+ // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.
+ // +optional
+ NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,6,rep,name=nonResourceURLs"`
+}
+
+// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference,
+// or a value for non-objects such as user and group names.
+type Subject struct {
+ // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
+ // If the Authorizer does not recognized the kind value, the Authorizer should report an error.
+ Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
+ // APIVersion holds the API group and version of the referenced subject.
+ // Defaults to "v1" for ServiceAccount subjects.
+ // Defaults to "rbac.authorization.k8s.io/v1alpha1" for User and Group subjects.
+ // +k8s:conversion-gen=false
+ // +optional
+ APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,2,opt.name=apiVersion"`
+ // Name of the object being referenced.
+ Name string `json:"name" protobuf:"bytes,3,opt,name=name"`
+ // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty
+ // the Authorizer should report an error.
+ // +optional
+ Namespace string `json:"namespace,omitempty" protobuf:"bytes,4,opt,name=namespace"`
+}
+
+// RoleRef contains information that points to the role being used
+type RoleRef struct {
+ // APIGroup is the group for the resource being referenced
+ APIGroup string `json:"apiGroup" protobuf:"bytes,1,opt,name=apiGroup"`
+ // Kind is the type of resource being referenced
+ Kind string `json:"kind" protobuf:"bytes,2,opt,name=kind"`
+ // Name is the name of resource being referenced
+ Name string `json:"name" protobuf:"bytes,3,opt,name=name"`
+}
+
+// +genclient=true
+
+// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
+type Role struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Rules holds all the PolicyRules for this Role
+ Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"`
+}
+
+// +genclient=true
+
+// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace.
+// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given
+// namespace only have effect in that namespace.
+type RoleBinding struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Subjects holds references to the objects the role applies to.
+ Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"`
+
+ // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
+ // If the RoleRef cannot be resolved, the Authorizer must return an error.
+ RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
+}
+
+// RoleBindingList is a collection of RoleBindings
+type RoleBindingList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of RoleBindings
+ Items []RoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// RoleList is a collection of Roles
+type RoleList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of Roles
+ Items []Role `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// +genclient=true
+// +nonNamespaced=true
+
+// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
+type ClusterRole struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Rules holds all the PolicyRules for this ClusterRole
+ Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"`
+}
+
+// +genclient=true
+// +nonNamespaced=true
+
+// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace,
+// and adds who information via Subject.
+type ClusterRoleBinding struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Subjects holds references to the objects the role applies to.
+ Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"`
+
+ // RoleRef can only reference a ClusterRole in the global namespace.
+ // If the RoleRef cannot be resolved, the Authorizer must return an error.
+ RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
+}
+
+// ClusterRoleBindingList is a collection of ClusterRoleBindings
+type ClusterRoleBindingList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of ClusterRoleBindings
+ Items []ClusterRoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// ClusterRoleList is a collection of ClusterRoles
+type ClusterRoleList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of ClusterRoles
+ Items []ClusterRole `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..d58a722af
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go
@@ -0,0 +1,148 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_ClusterRole = map[string]string{
+ "": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.",
+ "metadata": "Standard object's metadata.",
+ "rules": "Rules holds all the PolicyRules for this ClusterRole",
+}
+
+func (ClusterRole) SwaggerDoc() map[string]string {
+ return map_ClusterRole
+}
+
+var map_ClusterRoleBinding = map[string]string{
+ "": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.",
+ "metadata": "Standard object's metadata.",
+ "subjects": "Subjects holds references to the objects the role applies to.",
+ "roleRef": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.",
+}
+
+func (ClusterRoleBinding) SwaggerDoc() map[string]string {
+ return map_ClusterRoleBinding
+}
+
+var map_ClusterRoleBindingList = map[string]string{
+ "": "ClusterRoleBindingList is a collection of ClusterRoleBindings",
+ "metadata": "Standard object's metadata.",
+ "items": "Items is a list of ClusterRoleBindings",
+}
+
+func (ClusterRoleBindingList) SwaggerDoc() map[string]string {
+ return map_ClusterRoleBindingList
+}
+
+var map_ClusterRoleList = map[string]string{
+ "": "ClusterRoleList is a collection of ClusterRoles",
+ "metadata": "Standard object's metadata.",
+ "items": "Items is a list of ClusterRoles",
+}
+
+func (ClusterRoleList) SwaggerDoc() map[string]string {
+ return map_ClusterRoleList
+}
+
+var map_PolicyRule = map[string]string{
+ "": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.",
+ "verbs": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.",
+ "apiGroups": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.",
+ "resources": "Resources is a list of resources this rule applies to. ResourceAll represents all resources.",
+ "resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.",
+ "nonResourceURLs": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.",
+}
+
+func (PolicyRule) SwaggerDoc() map[string]string {
+ return map_PolicyRule
+}
+
+var map_Role = map[string]string{
+ "": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.",
+ "metadata": "Standard object's metadata.",
+ "rules": "Rules holds all the PolicyRules for this Role",
+}
+
+func (Role) SwaggerDoc() map[string]string {
+ return map_Role
+}
+
+var map_RoleBinding = map[string]string{
+ "": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.",
+ "metadata": "Standard object's metadata.",
+ "subjects": "Subjects holds references to the objects the role applies to.",
+ "roleRef": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.",
+}
+
+func (RoleBinding) SwaggerDoc() map[string]string {
+ return map_RoleBinding
+}
+
+var map_RoleBindingList = map[string]string{
+ "": "RoleBindingList is a collection of RoleBindings",
+ "metadata": "Standard object's metadata.",
+ "items": "Items is a list of RoleBindings",
+}
+
+func (RoleBindingList) SwaggerDoc() map[string]string {
+ return map_RoleBindingList
+}
+
+var map_RoleList = map[string]string{
+ "": "RoleList is a collection of Roles",
+ "metadata": "Standard object's metadata.",
+ "items": "Items is a list of Roles",
+}
+
+func (RoleList) SwaggerDoc() map[string]string {
+ return map_RoleList
+}
+
+var map_RoleRef = map[string]string{
+ "": "RoleRef contains information that points to the role being used",
+ "apiGroup": "APIGroup is the group for the resource being referenced",
+ "kind": "Kind is the type of resource being referenced",
+ "name": "Name is the name of resource being referenced",
+}
+
+func (RoleRef) SwaggerDoc() map[string]string {
+ return map_RoleRef
+}
+
+var map_Subject = map[string]string{
+ "": "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.",
+ "kind": "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.",
+ "apiVersion": "APIVersion holds the API group and version of the referenced subject. Defaults to \"v1\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io/v1alpha1\" for User and Group subjects.",
+ "name": "Name of the object being referenced.",
+ "namespace": "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.",
+}
+
+func (Subject) SwaggerDoc() map[string]string {
+ return map_Subject
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go
new file mode 100644
index 000000000..ebc3a21fd
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go
@@ -0,0 +1,469 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1alpha1
+
+import (
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ rbac "k8s.io/kubernetes/pkg/apis/rbac"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1alpha1_ClusterRole_To_rbac_ClusterRole,
+ Convert_rbac_ClusterRole_To_v1alpha1_ClusterRole,
+ Convert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding,
+ Convert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding,
+ Convert_v1alpha1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder,
+ Convert_rbac_ClusterRoleBindingBuilder_To_v1alpha1_ClusterRoleBindingBuilder,
+ Convert_v1alpha1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList,
+ Convert_rbac_ClusterRoleBindingList_To_v1alpha1_ClusterRoleBindingList,
+ Convert_v1alpha1_ClusterRoleList_To_rbac_ClusterRoleList,
+ Convert_rbac_ClusterRoleList_To_v1alpha1_ClusterRoleList,
+ Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule,
+ Convert_rbac_PolicyRule_To_v1alpha1_PolicyRule,
+ Convert_v1alpha1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder,
+ Convert_rbac_PolicyRuleBuilder_To_v1alpha1_PolicyRuleBuilder,
+ Convert_v1alpha1_Role_To_rbac_Role,
+ Convert_rbac_Role_To_v1alpha1_Role,
+ Convert_v1alpha1_RoleBinding_To_rbac_RoleBinding,
+ Convert_rbac_RoleBinding_To_v1alpha1_RoleBinding,
+ Convert_v1alpha1_RoleBindingList_To_rbac_RoleBindingList,
+ Convert_rbac_RoleBindingList_To_v1alpha1_RoleBindingList,
+ Convert_v1alpha1_RoleList_To_rbac_RoleList,
+ Convert_rbac_RoleList_To_v1alpha1_RoleList,
+ Convert_v1alpha1_RoleRef_To_rbac_RoleRef,
+ Convert_rbac_RoleRef_To_v1alpha1_RoleRef,
+ Convert_v1alpha1_Subject_To_rbac_Subject,
+ Convert_rbac_Subject_To_v1alpha1_Subject,
+ )
+}
+
+func autoConvert_v1alpha1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac.ClusterRole, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Rules = *(*[]rbac.PolicyRule)(unsafe.Pointer(&in.Rules))
+ return nil
+}
+
+// Convert_v1alpha1_ClusterRole_To_rbac_ClusterRole is an autogenerated conversion function.
+func Convert_v1alpha1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac.ClusterRole, s conversion.Scope) error {
+ return autoConvert_v1alpha1_ClusterRole_To_rbac_ClusterRole(in, out, s)
+}
+
+func autoConvert_rbac_ClusterRole_To_v1alpha1_ClusterRole(in *rbac.ClusterRole, out *ClusterRole, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if in.Rules == nil {
+ out.Rules = make([]PolicyRule, 0)
+ } else {
+ out.Rules = *(*[]PolicyRule)(unsafe.Pointer(&in.Rules))
+ }
+ return nil
+}
+
+// Convert_rbac_ClusterRole_To_v1alpha1_ClusterRole is an autogenerated conversion function.
+func Convert_rbac_ClusterRole_To_v1alpha1_ClusterRole(in *rbac.ClusterRole, out *ClusterRole, s conversion.Scope) error {
+ return autoConvert_rbac_ClusterRole_To_v1alpha1_ClusterRole(in, out, s)
+}
+
+func autoConvert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in *ClusterRoleBinding, out *rbac.ClusterRoleBinding, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if in.Subjects != nil {
+ in, out := &in.Subjects, &out.Subjects
+ *out = make([]rbac.Subject, len(*in))
+ for i := range *in {
+ if err := Convert_v1alpha1_Subject_To_rbac_Subject(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Subjects = nil
+ }
+ if err := Convert_v1alpha1_RoleRef_To_rbac_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding is an autogenerated conversion function.
+func Convert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in *ClusterRoleBinding, out *rbac.ClusterRoleBinding, s conversion.Scope) error {
+ return autoConvert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in, out, s)
+}
+
+func autoConvert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding(in *rbac.ClusterRoleBinding, out *ClusterRoleBinding, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if in.Subjects != nil {
+ in, out := &in.Subjects, &out.Subjects
+ *out = make([]Subject, len(*in))
+ for i := range *in {
+ if err := Convert_rbac_Subject_To_v1alpha1_Subject(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Subjects = make([]Subject, 0)
+ }
+ if err := Convert_rbac_RoleRef_To_v1alpha1_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding is an autogenerated conversion function.
+func Convert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding(in *rbac.ClusterRoleBinding, out *ClusterRoleBinding, s conversion.Scope) error {
+ return autoConvert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding(in, out, s)
+}
+
+func autoConvert_v1alpha1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder(in *ClusterRoleBindingBuilder, out *rbac.ClusterRoleBindingBuilder, s conversion.Scope) error {
+ if err := Convert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(&in.ClusterRoleBinding, &out.ClusterRoleBinding, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1alpha1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder is an autogenerated conversion function.
+func Convert_v1alpha1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder(in *ClusterRoleBindingBuilder, out *rbac.ClusterRoleBindingBuilder, s conversion.Scope) error {
+ return autoConvert_v1alpha1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder(in, out, s)
+}
+
+func autoConvert_rbac_ClusterRoleBindingBuilder_To_v1alpha1_ClusterRoleBindingBuilder(in *rbac.ClusterRoleBindingBuilder, out *ClusterRoleBindingBuilder, s conversion.Scope) error {
+ if err := Convert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding(&in.ClusterRoleBinding, &out.ClusterRoleBinding, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_rbac_ClusterRoleBindingBuilder_To_v1alpha1_ClusterRoleBindingBuilder is an autogenerated conversion function.
+func Convert_rbac_ClusterRoleBindingBuilder_To_v1alpha1_ClusterRoleBindingBuilder(in *rbac.ClusterRoleBindingBuilder, out *ClusterRoleBindingBuilder, s conversion.Scope) error {
+ return autoConvert_rbac_ClusterRoleBindingBuilder_To_v1alpha1_ClusterRoleBindingBuilder(in, out, s)
+}
+
+func autoConvert_v1alpha1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in *ClusterRoleBindingList, out *rbac.ClusterRoleBindingList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]rbac.ClusterRoleBinding, len(*in))
+ for i := range *in {
+ if err := Convert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1alpha1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList is an autogenerated conversion function.
+func Convert_v1alpha1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in *ClusterRoleBindingList, out *rbac.ClusterRoleBindingList, s conversion.Scope) error {
+ return autoConvert_v1alpha1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in, out, s)
+}
+
+func autoConvert_rbac_ClusterRoleBindingList_To_v1alpha1_ClusterRoleBindingList(in *rbac.ClusterRoleBindingList, out *ClusterRoleBindingList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ClusterRoleBinding, len(*in))
+ for i := range *in {
+ if err := Convert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]ClusterRoleBinding, 0)
+ }
+ return nil
+}
+
+// Convert_rbac_ClusterRoleBindingList_To_v1alpha1_ClusterRoleBindingList is an autogenerated conversion function.
+func Convert_rbac_ClusterRoleBindingList_To_v1alpha1_ClusterRoleBindingList(in *rbac.ClusterRoleBindingList, out *ClusterRoleBindingList, s conversion.Scope) error {
+ return autoConvert_rbac_ClusterRoleBindingList_To_v1alpha1_ClusterRoleBindingList(in, out, s)
+}
+
+func autoConvert_v1alpha1_ClusterRoleList_To_rbac_ClusterRoleList(in *ClusterRoleList, out *rbac.ClusterRoleList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]rbac.ClusterRole)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1alpha1_ClusterRoleList_To_rbac_ClusterRoleList is an autogenerated conversion function.
+func Convert_v1alpha1_ClusterRoleList_To_rbac_ClusterRoleList(in *ClusterRoleList, out *rbac.ClusterRoleList, s conversion.Scope) error {
+ return autoConvert_v1alpha1_ClusterRoleList_To_rbac_ClusterRoleList(in, out, s)
+}
+
+func autoConvert_rbac_ClusterRoleList_To_v1alpha1_ClusterRoleList(in *rbac.ClusterRoleList, out *ClusterRoleList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]ClusterRole, 0)
+ } else {
+ out.Items = *(*[]ClusterRole)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_rbac_ClusterRoleList_To_v1alpha1_ClusterRoleList is an autogenerated conversion function.
+func Convert_rbac_ClusterRoleList_To_v1alpha1_ClusterRoleList(in *rbac.ClusterRoleList, out *ClusterRoleList, s conversion.Scope) error {
+ return autoConvert_rbac_ClusterRoleList_To_v1alpha1_ClusterRoleList(in, out, s)
+}
+
+func autoConvert_v1alpha1_PolicyRule_To_rbac_PolicyRule(in *PolicyRule, out *rbac.PolicyRule, s conversion.Scope) error {
+ out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs))
+ out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups))
+ out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources))
+ out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames))
+ out.NonResourceURLs = *(*[]string)(unsafe.Pointer(&in.NonResourceURLs))
+ return nil
+}
+
+// Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule is an autogenerated conversion function.
+func Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule(in *PolicyRule, out *rbac.PolicyRule, s conversion.Scope) error {
+ return autoConvert_v1alpha1_PolicyRule_To_rbac_PolicyRule(in, out, s)
+}
+
+func autoConvert_rbac_PolicyRule_To_v1alpha1_PolicyRule(in *rbac.PolicyRule, out *PolicyRule, s conversion.Scope) error {
+ if in.Verbs == nil {
+ out.Verbs = make([]string, 0)
+ } else {
+ out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs))
+ }
+ out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups))
+ out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources))
+ out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames))
+ out.NonResourceURLs = *(*[]string)(unsafe.Pointer(&in.NonResourceURLs))
+ return nil
+}
+
+// Convert_rbac_PolicyRule_To_v1alpha1_PolicyRule is an autogenerated conversion function.
+func Convert_rbac_PolicyRule_To_v1alpha1_PolicyRule(in *rbac.PolicyRule, out *PolicyRule, s conversion.Scope) error {
+ return autoConvert_rbac_PolicyRule_To_v1alpha1_PolicyRule(in, out, s)
+}
+
+func autoConvert_v1alpha1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder(in *PolicyRuleBuilder, out *rbac.PolicyRuleBuilder, s conversion.Scope) error {
+ if err := Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule(&in.PolicyRule, &out.PolicyRule, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1alpha1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder is an autogenerated conversion function.
+func Convert_v1alpha1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder(in *PolicyRuleBuilder, out *rbac.PolicyRuleBuilder, s conversion.Scope) error {
+ return autoConvert_v1alpha1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder(in, out, s)
+}
+
+func autoConvert_rbac_PolicyRuleBuilder_To_v1alpha1_PolicyRuleBuilder(in *rbac.PolicyRuleBuilder, out *PolicyRuleBuilder, s conversion.Scope) error {
+ if err := Convert_rbac_PolicyRule_To_v1alpha1_PolicyRule(&in.PolicyRule, &out.PolicyRule, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_rbac_PolicyRuleBuilder_To_v1alpha1_PolicyRuleBuilder is an autogenerated conversion function.
+func Convert_rbac_PolicyRuleBuilder_To_v1alpha1_PolicyRuleBuilder(in *rbac.PolicyRuleBuilder, out *PolicyRuleBuilder, s conversion.Scope) error {
+ return autoConvert_rbac_PolicyRuleBuilder_To_v1alpha1_PolicyRuleBuilder(in, out, s)
+}
+
+func autoConvert_v1alpha1_Role_To_rbac_Role(in *Role, out *rbac.Role, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Rules = *(*[]rbac.PolicyRule)(unsafe.Pointer(&in.Rules))
+ return nil
+}
+
+// Convert_v1alpha1_Role_To_rbac_Role is an autogenerated conversion function.
+func Convert_v1alpha1_Role_To_rbac_Role(in *Role, out *rbac.Role, s conversion.Scope) error {
+ return autoConvert_v1alpha1_Role_To_rbac_Role(in, out, s)
+}
+
+func autoConvert_rbac_Role_To_v1alpha1_Role(in *rbac.Role, out *Role, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if in.Rules == nil {
+ out.Rules = make([]PolicyRule, 0)
+ } else {
+ out.Rules = *(*[]PolicyRule)(unsafe.Pointer(&in.Rules))
+ }
+ return nil
+}
+
+// Convert_rbac_Role_To_v1alpha1_Role is an autogenerated conversion function.
+func Convert_rbac_Role_To_v1alpha1_Role(in *rbac.Role, out *Role, s conversion.Scope) error {
+ return autoConvert_rbac_Role_To_v1alpha1_Role(in, out, s)
+}
+
+func autoConvert_v1alpha1_RoleBinding_To_rbac_RoleBinding(in *RoleBinding, out *rbac.RoleBinding, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if in.Subjects != nil {
+ in, out := &in.Subjects, &out.Subjects
+ *out = make([]rbac.Subject, len(*in))
+ for i := range *in {
+ if err := Convert_v1alpha1_Subject_To_rbac_Subject(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Subjects = nil
+ }
+ if err := Convert_v1alpha1_RoleRef_To_rbac_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1alpha1_RoleBinding_To_rbac_RoleBinding is an autogenerated conversion function.
+func Convert_v1alpha1_RoleBinding_To_rbac_RoleBinding(in *RoleBinding, out *rbac.RoleBinding, s conversion.Scope) error {
+ return autoConvert_v1alpha1_RoleBinding_To_rbac_RoleBinding(in, out, s)
+}
+
+func autoConvert_rbac_RoleBinding_To_v1alpha1_RoleBinding(in *rbac.RoleBinding, out *RoleBinding, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if in.Subjects != nil {
+ in, out := &in.Subjects, &out.Subjects
+ *out = make([]Subject, len(*in))
+ for i := range *in {
+ if err := Convert_rbac_Subject_To_v1alpha1_Subject(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Subjects = make([]Subject, 0)
+ }
+ if err := Convert_rbac_RoleRef_To_v1alpha1_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_rbac_RoleBinding_To_v1alpha1_RoleBinding is an autogenerated conversion function.
+func Convert_rbac_RoleBinding_To_v1alpha1_RoleBinding(in *rbac.RoleBinding, out *RoleBinding, s conversion.Scope) error {
+ return autoConvert_rbac_RoleBinding_To_v1alpha1_RoleBinding(in, out, s)
+}
+
+func autoConvert_v1alpha1_RoleBindingList_To_rbac_RoleBindingList(in *RoleBindingList, out *rbac.RoleBindingList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]rbac.RoleBinding, len(*in))
+ for i := range *in {
+ if err := Convert_v1alpha1_RoleBinding_To_rbac_RoleBinding(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1alpha1_RoleBindingList_To_rbac_RoleBindingList is an autogenerated conversion function.
+func Convert_v1alpha1_RoleBindingList_To_rbac_RoleBindingList(in *RoleBindingList, out *rbac.RoleBindingList, s conversion.Scope) error {
+ return autoConvert_v1alpha1_RoleBindingList_To_rbac_RoleBindingList(in, out, s)
+}
+
+func autoConvert_rbac_RoleBindingList_To_v1alpha1_RoleBindingList(in *rbac.RoleBindingList, out *RoleBindingList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]RoleBinding, len(*in))
+ for i := range *in {
+ if err := Convert_rbac_RoleBinding_To_v1alpha1_RoleBinding(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]RoleBinding, 0)
+ }
+ return nil
+}
+
+// Convert_rbac_RoleBindingList_To_v1alpha1_RoleBindingList is an autogenerated conversion function.
+func Convert_rbac_RoleBindingList_To_v1alpha1_RoleBindingList(in *rbac.RoleBindingList, out *RoleBindingList, s conversion.Scope) error {
+ return autoConvert_rbac_RoleBindingList_To_v1alpha1_RoleBindingList(in, out, s)
+}
+
+func autoConvert_v1alpha1_RoleList_To_rbac_RoleList(in *RoleList, out *rbac.RoleList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]rbac.Role)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1alpha1_RoleList_To_rbac_RoleList is an autogenerated conversion function.
+func Convert_v1alpha1_RoleList_To_rbac_RoleList(in *RoleList, out *rbac.RoleList, s conversion.Scope) error {
+ return autoConvert_v1alpha1_RoleList_To_rbac_RoleList(in, out, s)
+}
+
+func autoConvert_rbac_RoleList_To_v1alpha1_RoleList(in *rbac.RoleList, out *RoleList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]Role, 0)
+ } else {
+ out.Items = *(*[]Role)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_rbac_RoleList_To_v1alpha1_RoleList is an autogenerated conversion function.
+func Convert_rbac_RoleList_To_v1alpha1_RoleList(in *rbac.RoleList, out *RoleList, s conversion.Scope) error {
+ return autoConvert_rbac_RoleList_To_v1alpha1_RoleList(in, out, s)
+}
+
+func autoConvert_v1alpha1_RoleRef_To_rbac_RoleRef(in *RoleRef, out *rbac.RoleRef, s conversion.Scope) error {
+ out.APIGroup = in.APIGroup
+ out.Kind = in.Kind
+ out.Name = in.Name
+ return nil
+}
+
+// Convert_v1alpha1_RoleRef_To_rbac_RoleRef is an autogenerated conversion function.
+func Convert_v1alpha1_RoleRef_To_rbac_RoleRef(in *RoleRef, out *rbac.RoleRef, s conversion.Scope) error {
+ return autoConvert_v1alpha1_RoleRef_To_rbac_RoleRef(in, out, s)
+}
+
+func autoConvert_rbac_RoleRef_To_v1alpha1_RoleRef(in *rbac.RoleRef, out *RoleRef, s conversion.Scope) error {
+ out.APIGroup = in.APIGroup
+ out.Kind = in.Kind
+ out.Name = in.Name
+ return nil
+}
+
+// Convert_rbac_RoleRef_To_v1alpha1_RoleRef is an autogenerated conversion function.
+func Convert_rbac_RoleRef_To_v1alpha1_RoleRef(in *rbac.RoleRef, out *RoleRef, s conversion.Scope) error {
+ return autoConvert_rbac_RoleRef_To_v1alpha1_RoleRef(in, out, s)
+}
+
+func autoConvert_v1alpha1_Subject_To_rbac_Subject(in *Subject, out *rbac.Subject, s conversion.Scope) error {
+ out.Kind = in.Kind
+ // INFO: in.APIVersion opted out of conversion generation
+ out.Name = in.Name
+ out.Namespace = in.Namespace
+ return nil
+}
+
+func autoConvert_rbac_Subject_To_v1alpha1_Subject(in *rbac.Subject, out *Subject, s conversion.Scope) error {
+ out.Kind = in.Kind
+ // WARNING: in.APIGroup requires manual conversion: does not exist in peer-type
+ out.Name = in.Name
+ out.Namespace = in.Namespace
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..21b4b8dc4
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/zz_generated.deepcopy.go
@@ -0,0 +1,269 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ClusterRole, InType: reflect.TypeOf(&ClusterRole{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ClusterRoleBinding, InType: reflect.TypeOf(&ClusterRoleBinding{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ClusterRoleBindingList, InType: reflect.TypeOf(&ClusterRoleBindingList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_ClusterRoleList, InType: reflect.TypeOf(&ClusterRoleList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PolicyRule, InType: reflect.TypeOf(&PolicyRule{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_Role, InType: reflect.TypeOf(&Role{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_RoleBinding, InType: reflect.TypeOf(&RoleBinding{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_RoleBindingList, InType: reflect.TypeOf(&RoleBindingList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_RoleList, InType: reflect.TypeOf(&RoleList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_RoleRef, InType: reflect.TypeOf(&RoleRef{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_Subject, InType: reflect.TypeOf(&Subject{})},
+ )
+}
+
+// DeepCopy_v1alpha1_ClusterRole is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_ClusterRole(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ClusterRole)
+ out := out.(*ClusterRole)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]PolicyRule, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1alpha1_PolicyRule(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_ClusterRoleBinding is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_ClusterRoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ClusterRoleBinding)
+ out := out.(*ClusterRoleBinding)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Subjects != nil {
+ in, out := &in.Subjects, &out.Subjects
+ *out = make([]Subject, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_ClusterRoleBindingList is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_ClusterRoleBindingList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ClusterRoleBindingList)
+ out := out.(*ClusterRoleBindingList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ClusterRoleBinding, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1alpha1_ClusterRoleBinding(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_ClusterRoleList is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_ClusterRoleList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ClusterRoleList)
+ out := out.(*ClusterRoleList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ClusterRole, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1alpha1_ClusterRole(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_PolicyRule is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_PolicyRule(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PolicyRule)
+ out := out.(*PolicyRule)
+ *out = *in
+ if in.Verbs != nil {
+ in, out := &in.Verbs, &out.Verbs
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.APIGroups != nil {
+ in, out := &in.APIGroups, &out.APIGroups
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Resources != nil {
+ in, out := &in.Resources, &out.Resources
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.ResourceNames != nil {
+ in, out := &in.ResourceNames, &out.ResourceNames
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.NonResourceURLs != nil {
+ in, out := &in.NonResourceURLs, &out.NonResourceURLs
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_Role is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_Role(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Role)
+ out := out.(*Role)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]PolicyRule, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1alpha1_PolicyRule(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_RoleBinding is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_RoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RoleBinding)
+ out := out.(*RoleBinding)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Subjects != nil {
+ in, out := &in.Subjects, &out.Subjects
+ *out = make([]Subject, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_RoleBindingList is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_RoleBindingList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RoleBindingList)
+ out := out.(*RoleBindingList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]RoleBinding, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1alpha1_RoleBinding(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_RoleList is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_RoleList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RoleList)
+ out := out.(*RoleList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Role, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1alpha1_Role(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_RoleRef is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_RoleRef(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RoleRef)
+ out := out.(*RoleRef)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_Subject is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_Subject(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Subject)
+ out := out.(*Subject)
+ *out = *in
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/zz_generated.defaults.go
new file mode 100644
index 000000000..1a5749be3
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/zz_generated.defaults.go
@@ -0,0 +1,66 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1alpha1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ scheme.AddTypeDefaultingFunc(&ClusterRoleBinding{}, func(obj interface{}) { SetObjectDefaults_ClusterRoleBinding(obj.(*ClusterRoleBinding)) })
+ scheme.AddTypeDefaultingFunc(&ClusterRoleBindingList{}, func(obj interface{}) { SetObjectDefaults_ClusterRoleBindingList(obj.(*ClusterRoleBindingList)) })
+ scheme.AddTypeDefaultingFunc(&RoleBinding{}, func(obj interface{}) { SetObjectDefaults_RoleBinding(obj.(*RoleBinding)) })
+ scheme.AddTypeDefaultingFunc(&RoleBindingList{}, func(obj interface{}) { SetObjectDefaults_RoleBindingList(obj.(*RoleBindingList)) })
+ return nil
+}
+
+func SetObjectDefaults_ClusterRoleBinding(in *ClusterRoleBinding) {
+ SetDefaults_ClusterRoleBinding(in)
+ for i := range in.Subjects {
+ a := &in.Subjects[i]
+ SetDefaults_Subject(a)
+ }
+}
+
+func SetObjectDefaults_ClusterRoleBindingList(in *ClusterRoleBindingList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_ClusterRoleBinding(a)
+ }
+}
+
+func SetObjectDefaults_RoleBinding(in *RoleBinding) {
+ SetDefaults_RoleBinding(in)
+ for i := range in.Subjects {
+ a := &in.Subjects[i]
+ SetDefaults_Subject(a)
+ }
+}
+
+func SetObjectDefaults_RoleBindingList(in *RoleBindingList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_RoleBinding(a)
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/defaults.go
new file mode 100644
index 000000000..c1cf8c23c
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/defaults.go
@@ -0,0 +1,48 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+func addDefaultingFuncs(scheme *runtime.Scheme) error {
+ return RegisterDefaults(scheme)
+}
+
+func SetDefaults_ClusterRoleBinding(obj *ClusterRoleBinding) {
+ if len(obj.RoleRef.APIGroup) == 0 {
+ obj.RoleRef.APIGroup = GroupName
+ }
+}
+func SetDefaults_RoleBinding(obj *RoleBinding) {
+ if len(obj.RoleRef.APIGroup) == 0 {
+ obj.RoleRef.APIGroup = GroupName
+ }
+}
+func SetDefaults_Subject(obj *Subject) {
+ if len(obj.APIGroup) == 0 {
+ switch obj.Kind {
+ case ServiceAccountKind:
+ obj.APIGroup = ""
+ case UserKind:
+ obj.APIGroup = GroupName
+ case GroupKind:
+ obj.APIGroup = GroupName
+ }
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/doc.go
new file mode 100644
index 000000000..3339c2569
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/doc.go
@@ -0,0 +1,23 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/rbac
+// +k8s:openapi-gen=true
+// +k8s:defaulter-gen=TypeMeta
+
+// +groupName=rbac.authorization.k8s.io
+package v1beta1 // import "k8s.io/kubernetes/pkg/apis/rbac/v1beta1"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/generated.pb.go
new file mode 100644
index 000000000..9ae32e77b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/generated.pb.go
@@ -0,0 +1,2821 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/rbac/v1beta1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1beta1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/rbac/v1beta1/generated.proto
+
+ It has these top-level messages:
+ ClusterRole
+ ClusterRoleBinding
+ ClusterRoleBindingBuilder
+ ClusterRoleBindingList
+ ClusterRoleList
+ PolicyRule
+ PolicyRuleBuilder
+ Role
+ RoleBinding
+ RoleBindingList
+ RoleList
+ RoleRef
+ Subject
+*/
+package v1beta1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *ClusterRole) Reset() { *m = ClusterRole{} }
+func (*ClusterRole) ProtoMessage() {}
+func (*ClusterRole) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} }
+func (*ClusterRoleBinding) ProtoMessage() {}
+func (*ClusterRoleBinding) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *ClusterRoleBindingBuilder) Reset() { *m = ClusterRoleBindingBuilder{} }
+func (*ClusterRoleBindingBuilder) ProtoMessage() {}
+func (*ClusterRoleBindingBuilder) Descriptor() ([]byte, []int) {
+ return fileDescriptorGenerated, []int{2}
+}
+
+func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} }
+func (*ClusterRoleBindingList) ProtoMessage() {}
+func (*ClusterRoleBindingList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} }
+
+func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} }
+func (*ClusterRoleList) ProtoMessage() {}
+func (*ClusterRoleList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} }
+
+func (m *PolicyRule) Reset() { *m = PolicyRule{} }
+func (*PolicyRule) ProtoMessage() {}
+func (*PolicyRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} }
+
+func (m *PolicyRuleBuilder) Reset() { *m = PolicyRuleBuilder{} }
+func (*PolicyRuleBuilder) ProtoMessage() {}
+func (*PolicyRuleBuilder) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} }
+
+func (m *Role) Reset() { *m = Role{} }
+func (*Role) ProtoMessage() {}
+func (*Role) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
+
+func (m *RoleBinding) Reset() { *m = RoleBinding{} }
+func (*RoleBinding) ProtoMessage() {}
+func (*RoleBinding) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
+
+func (m *RoleBindingList) Reset() { *m = RoleBindingList{} }
+func (*RoleBindingList) ProtoMessage() {}
+func (*RoleBindingList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
+
+func (m *RoleList) Reset() { *m = RoleList{} }
+func (*RoleList) ProtoMessage() {}
+func (*RoleList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} }
+
+func (m *RoleRef) Reset() { *m = RoleRef{} }
+func (*RoleRef) ProtoMessage() {}
+func (*RoleRef) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} }
+
+func (m *Subject) Reset() { *m = Subject{} }
+func (*Subject) ProtoMessage() {}
+func (*Subject) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} }
+
+func init() {
+ proto.RegisterType((*ClusterRole)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1beta1.ClusterRole")
+ proto.RegisterType((*ClusterRoleBinding)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1beta1.ClusterRoleBinding")
+ proto.RegisterType((*ClusterRoleBindingBuilder)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1beta1.ClusterRoleBindingBuilder")
+ proto.RegisterType((*ClusterRoleBindingList)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1beta1.ClusterRoleBindingList")
+ proto.RegisterType((*ClusterRoleList)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1beta1.ClusterRoleList")
+ proto.RegisterType((*PolicyRule)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1beta1.PolicyRule")
+ proto.RegisterType((*PolicyRuleBuilder)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1beta1.PolicyRuleBuilder")
+ proto.RegisterType((*Role)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1beta1.Role")
+ proto.RegisterType((*RoleBinding)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1beta1.RoleBinding")
+ proto.RegisterType((*RoleBindingList)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1beta1.RoleBindingList")
+ proto.RegisterType((*RoleList)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1beta1.RoleList")
+ proto.RegisterType((*RoleRef)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1beta1.RoleRef")
+ proto.RegisterType((*Subject)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1beta1.Subject")
+}
+func (m *ClusterRole) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ClusterRole) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ if len(m.Rules) > 0 {
+ for _, msg := range m.Rules {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ClusterRoleBinding) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ClusterRoleBinding) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n2, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ if len(m.Subjects) > 0 {
+ for _, msg := range m.Subjects {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RoleRef.Size()))
+ n3, err := m.RoleRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ return i, nil
+}
+
+func (m *ClusterRoleBindingBuilder) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ClusterRoleBindingBuilder) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ClusterRoleBinding.Size()))
+ n4, err := m.ClusterRoleBinding.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ return i, nil
+}
+
+func (m *ClusterRoleBindingList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ClusterRoleBindingList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n5, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n5
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ClusterRoleList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ClusterRoleList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n6, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PolicyRule) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PolicyRule) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Verbs) > 0 {
+ for _, s := range m.Verbs {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.APIGroups) > 0 {
+ for _, s := range m.APIGroups {
+ dAtA[i] = 0x12
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Resources) > 0 {
+ for _, s := range m.Resources {
+ dAtA[i] = 0x1a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.ResourceNames) > 0 {
+ for _, s := range m.ResourceNames {
+ dAtA[i] = 0x22
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.NonResourceURLs) > 0 {
+ for _, s := range m.NonResourceURLs {
+ dAtA[i] = 0x2a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *PolicyRuleBuilder) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PolicyRuleBuilder) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.PolicyRule.Size()))
+ n7, err := m.PolicyRule.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ return i, nil
+}
+
+func (m *Role) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Role) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n8, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n8
+ if len(m.Rules) > 0 {
+ for _, msg := range m.Rules {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *RoleBinding) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RoleBinding) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n9, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n9
+ if len(m.Subjects) > 0 {
+ for _, msg := range m.Subjects {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.RoleRef.Size()))
+ n10, err := m.RoleRef.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n10
+ return i, nil
+}
+
+func (m *RoleBindingList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RoleBindingList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n11, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n11
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *RoleList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RoleList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n12, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n12
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *RoleRef) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RoleRef) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup)))
+ i += copy(dAtA[i:], m.APIGroup)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
+ i += copy(dAtA[i:], m.Kind)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ return i, nil
+}
+
+func (m *Subject) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Subject) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind)))
+ i += copy(dAtA[i:], m.Kind)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup)))
+ i += copy(dAtA[i:], m.APIGroup)
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace)))
+ i += copy(dAtA[i:], m.Namespace)
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *ClusterRole) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Rules) > 0 {
+ for _, e := range m.Rules {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ClusterRoleBinding) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Subjects) > 0 {
+ for _, e := range m.Subjects {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = m.RoleRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ClusterRoleBindingBuilder) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ClusterRoleBinding.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *ClusterRoleBindingList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ClusterRoleList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PolicyRule) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Verbs) > 0 {
+ for _, s := range m.Verbs {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.APIGroups) > 0 {
+ for _, s := range m.APIGroups {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Resources) > 0 {
+ for _, s := range m.Resources {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.ResourceNames) > 0 {
+ for _, s := range m.ResourceNames {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.NonResourceURLs) > 0 {
+ for _, s := range m.NonResourceURLs {
+ l = len(s)
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PolicyRuleBuilder) Size() (n int) {
+ var l int
+ _ = l
+ l = m.PolicyRule.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Role) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Rules) > 0 {
+ for _, e := range m.Rules {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *RoleBinding) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Subjects) > 0 {
+ for _, e := range m.Subjects {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ l = m.RoleRef.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *RoleBindingList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *RoleList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *RoleRef) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.APIGroup)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Kind)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *Subject) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Kind)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.APIGroup)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Name)
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Namespace)
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *ClusterRole) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ClusterRole{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ClusterRoleBinding) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ClusterRoleBinding{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Subjects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subjects), "Subject", "Subject", 1), `&`, ``, 1) + `,`,
+ `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ClusterRoleBindingBuilder) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ClusterRoleBindingBuilder{`,
+ `ClusterRoleBinding:` + strings.Replace(strings.Replace(this.ClusterRoleBinding.String(), "ClusterRoleBinding", "ClusterRoleBinding", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ClusterRoleBindingList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ClusterRoleBindingList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ClusterRoleBinding", "ClusterRoleBinding", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ClusterRoleList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ClusterRoleList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ClusterRole", "ClusterRole", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PolicyRule) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PolicyRule{`,
+ `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`,
+ `APIGroups:` + fmt.Sprintf("%v", this.APIGroups) + `,`,
+ `Resources:` + fmt.Sprintf("%v", this.Resources) + `,`,
+ `ResourceNames:` + fmt.Sprintf("%v", this.ResourceNames) + `,`,
+ `NonResourceURLs:` + fmt.Sprintf("%v", this.NonResourceURLs) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PolicyRuleBuilder) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PolicyRuleBuilder{`,
+ `PolicyRule:` + strings.Replace(strings.Replace(this.PolicyRule.String(), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Role) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Role{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RoleBinding) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RoleBinding{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Subjects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subjects), "Subject", "Subject", 1), `&`, ``, 1) + `,`,
+ `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RoleBindingList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RoleBindingList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "RoleBinding", "RoleBinding", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RoleList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RoleList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Role", "Role", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RoleRef) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RoleRef{`,
+ `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`,
+ `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Subject) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Subject{`,
+ `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
+ `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *ClusterRole) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ClusterRole: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ClusterRole: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Rules = append(m.Rules, PolicyRule{})
+ if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ClusterRoleBinding) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ClusterRoleBinding: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ClusterRoleBinding: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Subjects = append(m.Subjects, Subject{})
+ if err := m.Subjects[len(m.Subjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.RoleRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ClusterRoleBindingBuilder) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ClusterRoleBindingBuilder: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ClusterRoleBindingBuilder: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ClusterRoleBinding", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ClusterRoleBinding.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ClusterRoleBindingList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ClusterRoleBindingList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ClusterRoleBindingList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ClusterRoleBinding{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ClusterRoleList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ClusterRoleList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ClusterRoleList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, ClusterRole{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PolicyRule) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PolicyRule: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PolicyRule: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Verbs = append(m.Verbs, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIGroups", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIGroups = append(m.APIGroups, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Resources = append(m.Resources, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceNames", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ResourceNames = append(m.ResourceNames, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NonResourceURLs", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.NonResourceURLs = append(m.NonResourceURLs, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PolicyRuleBuilder) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PolicyRuleBuilder: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PolicyRuleBuilder: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PolicyRule", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.PolicyRule.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Role) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Role: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Role: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Rules = append(m.Rules, PolicyRule{})
+ if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RoleBinding) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RoleBinding: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RoleBinding: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Subjects = append(m.Subjects, Subject{})
+ if err := m.Subjects[len(m.Subjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.RoleRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RoleBindingList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RoleBindingList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RoleBindingList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, RoleBinding{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RoleList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RoleList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RoleList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, Role{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RoleRef) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RoleRef: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RoleRef: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIGroup", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIGroup = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Kind = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Subject) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Subject: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Subject: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Kind = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field APIGroup", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.APIGroup = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Namespace = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/kubernetes/pkg/apis/rbac/v1beta1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 806 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x54, 0x3d, 0x6f, 0xc3, 0x44,
+ 0x18, 0xce, 0xe5, 0x43, 0x89, 0x2f, 0x44, 0xa1, 0x87, 0x84, 0x4c, 0x06, 0x27, 0xf2, 0x42, 0x25,
+ 0xa8, 0xdd, 0x2f, 0x51, 0x24, 0xc4, 0x80, 0x19, 0x50, 0x45, 0x29, 0xd5, 0x21, 0x10, 0x5f, 0x42,
+ 0x75, 0x9c, 0xab, 0x7b, 0xc4, 0x5f, 0xf2, 0x9d, 0x23, 0x55, 0x30, 0xb0, 0xb1, 0xf2, 0x27, 0xd8,
+ 0xba, 0xb1, 0x32, 0x31, 0x15, 0xa6, 0x8e, 0x9d, 0x22, 0x6a, 0x7e, 0x08, 0xc8, 0xf6, 0xf9, 0x23,
+ 0x4d, 0x4a, 0x43, 0x91, 0x22, 0x21, 0x31, 0xb5, 0xf7, 0xbe, 0xcf, 0xf3, 0xdc, 0xfb, 0xdc, 0xeb,
+ 0x3c, 0xf0, 0x68, 0xfa, 0x26, 0xd3, 0xa8, 0xaf, 0x4f, 0xa3, 0x31, 0x09, 0x3d, 0xc2, 0x09, 0xd3,
+ 0x83, 0xa9, 0xad, 0x9b, 0x01, 0x65, 0x7a, 0x38, 0x36, 0x2d, 0x7d, 0xb6, 0x37, 0x26, 0xdc, 0xdc,
+ 0xd3, 0x6d, 0xe2, 0x91, 0xd0, 0xe4, 0x64, 0xa2, 0x05, 0xa1, 0xcf, 0x7d, 0xf4, 0x6a, 0x46, 0xd4,
+ 0x4a, 0xa2, 0x16, 0x4c, 0x6d, 0x2d, 0x21, 0x6a, 0x09, 0x51, 0x13, 0xc4, 0xc1, 0x8e, 0x4d, 0xf9,
+ 0x65, 0x34, 0xd6, 0x2c, 0xdf, 0xd5, 0x6d, 0xdf, 0xf6, 0xf5, 0x94, 0x3f, 0x8e, 0x2e, 0xd2, 0x53,
+ 0x7a, 0x48, 0xff, 0xcb, 0x74, 0x07, 0x87, 0x62, 0x20, 0x33, 0xa0, 0xae, 0x69, 0x5d, 0x52, 0x8f,
+ 0x84, 0x57, 0xe5, 0x48, 0x2e, 0xe1, 0xa6, 0x3e, 0x5b, 0x9a, 0x66, 0xa0, 0x3f, 0xc6, 0x0a, 0x23,
+ 0x8f, 0x53, 0x97, 0x2c, 0x11, 0xde, 0x78, 0x8a, 0xc0, 0xac, 0x4b, 0xe2, 0x9a, 0x4b, 0xbc, 0x83,
+ 0xc7, 0x78, 0x11, 0xa7, 0x8e, 0x4e, 0x3d, 0xce, 0x78, 0xf8, 0x90, 0xa4, 0xfe, 0x0a, 0x60, 0xf7,
+ 0x5d, 0x27, 0x62, 0x9c, 0x84, 0xd8, 0x77, 0x08, 0x3a, 0x87, 0x9d, 0xc4, 0xc8, 0xc4, 0xe4, 0xa6,
+ 0x0c, 0x46, 0x60, 0xbb, 0xbb, 0xbf, 0xab, 0x89, 0xe7, 0xac, 0xea, 0x96, 0x0f, 0x9a, 0xa0, 0xb5,
+ 0xd9, 0x9e, 0xf6, 0xe1, 0xf8, 0x6b, 0x62, 0xf1, 0x0f, 0x08, 0x37, 0x0d, 0x74, 0x33, 0x1f, 0xd6,
+ 0xe2, 0xf9, 0x10, 0x96, 0x35, 0x5c, 0xa8, 0xa2, 0x4f, 0x61, 0x2b, 0x8c, 0x1c, 0xc2, 0xe4, 0xfa,
+ 0xa8, 0xb1, 0xdd, 0xdd, 0x3f, 0xd0, 0xd6, 0xdc, 0x96, 0x76, 0xe6, 0x3b, 0xd4, 0xba, 0xc2, 0x91,
+ 0x43, 0x8c, 0x9e, 0xb8, 0xa1, 0x95, 0x9c, 0x18, 0xce, 0x04, 0xd5, 0x9f, 0xea, 0x10, 0x55, 0xbc,
+ 0x18, 0xd4, 0x9b, 0x50, 0xcf, 0xde, 0x80, 0xa5, 0xaf, 0x60, 0x87, 0x45, 0x69, 0x23, 0x77, 0xb5,
+ 0xbb, 0xb6, 0xab, 0x8f, 0x32, 0xa2, 0xf1, 0xa2, 0xb8, 0xa1, 0x23, 0x0a, 0x0c, 0x17, 0x9a, 0xe8,
+ 0x0b, 0xd8, 0x0e, 0x7d, 0x87, 0x60, 0x72, 0x21, 0x37, 0x16, 0x0d, 0x3c, 0x29, 0x8f, 0x33, 0x9e,
+ 0xd1, 0x17, 0xf2, 0x6d, 0x51, 0xc0, 0xb9, 0xa2, 0xfa, 0x23, 0x80, 0xaf, 0x2c, 0xbf, 0x9a, 0x11,
+ 0x51, 0x67, 0x42, 0x42, 0xf4, 0x3d, 0x80, 0xc8, 0x5a, 0xea, 0x8a, 0x77, 0x7c, 0x6b, 0xed, 0x31,
+ 0x56, 0x5c, 0x30, 0x10, 0x13, 0xad, 0x58, 0x19, 0x5e, 0x71, 0xa5, 0x7a, 0x07, 0xe0, 0xcb, 0xcb,
+ 0xd0, 0x13, 0xca, 0x38, 0xfa, 0x72, 0x69, 0xc3, 0xda, 0x7a, 0x1b, 0x4e, 0xd8, 0xe9, 0x7e, 0x8b,
+ 0xd7, 0xcf, 0x2b, 0x95, 0xed, 0x9e, 0xc3, 0x16, 0xe5, 0xc4, 0xcd, 0x57, 0xfb, 0xaf, 0x4c, 0x17,
+ 0x1f, 0xee, 0x71, 0xa2, 0x88, 0x33, 0x61, 0xf5, 0x37, 0x00, 0xfb, 0x15, 0xf0, 0x06, 0x3c, 0x7d,
+ 0xb6, 0xe8, 0xe9, 0xf0, 0x59, 0x9e, 0x56, 0x9b, 0xf9, 0x13, 0x40, 0x58, 0xfe, 0x54, 0xd1, 0x10,
+ 0xb6, 0x66, 0x24, 0x1c, 0x33, 0x19, 0x8c, 0x1a, 0xdb, 0x92, 0x21, 0x25, 0xf8, 0x4f, 0x92, 0x02,
+ 0xce, 0xea, 0xe8, 0x35, 0x28, 0x99, 0x01, 0x7d, 0x2f, 0xf4, 0xa3, 0x20, 0x1b, 0x47, 0x32, 0x7a,
+ 0xf1, 0x7c, 0x28, 0xbd, 0x73, 0x76, 0x9c, 0x15, 0x71, 0xd9, 0x4f, 0xc0, 0x21, 0x61, 0x7e, 0x14,
+ 0x5a, 0x84, 0xc9, 0x8d, 0x12, 0x8c, 0xf3, 0x22, 0x2e, 0xfb, 0xe8, 0x08, 0xf6, 0xf2, 0xc3, 0xa9,
+ 0xe9, 0x12, 0x26, 0x37, 0x53, 0xc2, 0x56, 0x3c, 0x1f, 0xf6, 0x70, 0xb5, 0x81, 0x17, 0x71, 0xe8,
+ 0x6d, 0xd8, 0xf7, 0x7c, 0x2f, 0x87, 0x7c, 0x8c, 0x4f, 0x98, 0xdc, 0x4a, 0xa9, 0x2f, 0xc5, 0xf3,
+ 0x61, 0xff, 0x74, 0xb1, 0x85, 0x1f, 0x62, 0xd5, 0x6f, 0xe1, 0x56, 0x25, 0xab, 0xc4, 0x0f, 0xc9,
+ 0x86, 0x30, 0x28, 0x8a, 0x62, 0xa3, 0xcf, 0xca, 0xbe, 0x22, 0x8a, 0xca, 0x1a, 0xae, 0x48, 0xab,
+ 0xbf, 0x00, 0xd8, 0xfc, 0xcf, 0x47, 0xf9, 0x75, 0x1d, 0x76, 0xff, 0xcf, 0xf0, 0xb5, 0x33, 0x3c,
+ 0x09, 0x90, 0xcd, 0x86, 0xe2, 0xb3, 0x03, 0xe4, 0xe9, 0x34, 0xfc, 0x19, 0xc0, 0xce, 0x86, 0x62,
+ 0x10, 0x2f, 0xba, 0xd8, 0xf9, 0x67, 0x2e, 0x56, 0x8f, 0xff, 0x0d, 0xcc, 0xf7, 0x83, 0x5e, 0x87,
+ 0x9d, 0x3c, 0xba, 0xd2, 0xe1, 0xa5, 0x72, 0x98, 0x3c, 0xdd, 0x70, 0x81, 0x40, 0x23, 0xd8, 0x9c,
+ 0x52, 0x6f, 0x22, 0xd7, 0x53, 0xe4, 0x0b, 0x02, 0xd9, 0x7c, 0x9f, 0x7a, 0x13, 0x9c, 0x76, 0x12,
+ 0x84, 0x67, 0xba, 0x24, 0xfd, 0x80, 0x2a, 0x88, 0x24, 0xb4, 0x70, 0xda, 0x51, 0xaf, 0x01, 0x6c,
+ 0x8b, 0x8f, 0xaf, 0xd0, 0x03, 0x8f, 0xea, 0x55, 0xe7, 0xab, 0xaf, 0x33, 0xdf, 0xdf, 0xdf, 0x8e,
+ 0x74, 0x28, 0x25, 0x7f, 0x59, 0x60, 0x5a, 0x44, 0x6e, 0xa6, 0xb0, 0x2d, 0x01, 0x93, 0x4e, 0xf3,
+ 0x06, 0x2e, 0x31, 0xc6, 0xce, 0xcd, 0xbd, 0x52, 0xbb, 0xbd, 0x57, 0x6a, 0x77, 0xf7, 0x4a, 0xed,
+ 0xbb, 0x58, 0x01, 0x37, 0xb1, 0x02, 0x6e, 0x63, 0x05, 0xdc, 0xc5, 0x0a, 0xf8, 0x3d, 0x56, 0xc0,
+ 0x0f, 0x7f, 0x28, 0xb5, 0xcf, 0xdb, 0xe2, 0xd5, 0xff, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x6d, 0x2c,
+ 0xb9, 0x90, 0x12, 0x0c, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/generated.proto
new file mode 100644
index 000000000..39f99487a
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/generated.proto
@@ -0,0 +1,198 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.pkg.apis.rbac.v1beta1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1beta1";
+
+// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
+message ClusterRole {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Rules holds all the PolicyRules for this ClusterRole
+ repeated PolicyRule rules = 2;
+}
+
+// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace,
+// and adds who information via Subject.
+message ClusterRoleBinding {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Subjects holds references to the objects the role applies to.
+ repeated Subject subjects = 2;
+
+ // RoleRef can only reference a ClusterRole in the global namespace.
+ // If the RoleRef cannot be resolved, the Authorizer must return an error.
+ optional RoleRef roleRef = 3;
+}
+
+// +k8s:deepcopy-gen=false
+// ClusterRoleBindingBuilder let's us attach methods. A no-no for API types.
+// We use it to construct bindings in code. It's more compact than trying to write them
+// out in a literal.
+message ClusterRoleBindingBuilder {
+ optional ClusterRoleBinding clusterRoleBinding = 1;
+}
+
+// ClusterRoleBindingList is a collection of ClusterRoleBindings
+message ClusterRoleBindingList {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of ClusterRoleBindings
+ repeated ClusterRoleBinding items = 2;
+}
+
+// ClusterRoleList is a collection of ClusterRoles
+message ClusterRoleList {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of ClusterRoles
+ repeated ClusterRole items = 2;
+}
+
+// PolicyRule holds information that describes a policy rule, but does not contain information
+// about who the rule applies to or which namespace the rule applies to.
+message PolicyRule {
+ // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.
+ repeated string verbs = 1;
+
+ // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of
+ // the enumerated resources in any API group will be allowed.
+ // +optional
+ repeated string apiGroups = 2;
+
+ // Resources is a list of resources this rule applies to. ResourceAll represents all resources.
+ // +optional
+ repeated string resources = 3;
+
+ // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
+ // +optional
+ repeated string resourceNames = 4;
+
+ // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path
+ // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.
+ // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.
+ // +optional
+ repeated string nonResourceURLs = 5;
+}
+
+// +k8s:deepcopy-gen=false
+// PolicyRuleBuilder let's us attach methods. A no-no for API types.
+// We use it to construct rules in code. It's more compact than trying to write them
+// out in a literal and allows us to perform some basic checking during construction
+message PolicyRuleBuilder {
+ optional PolicyRule policyRule = 1;
+}
+
+// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
+message Role {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Rules holds all the PolicyRules for this Role
+ repeated PolicyRule rules = 2;
+}
+
+// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace.
+// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given
+// namespace only have effect in that namespace.
+message RoleBinding {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Subjects holds references to the objects the role applies to.
+ repeated Subject subjects = 2;
+
+ // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
+ // If the RoleRef cannot be resolved, the Authorizer must return an error.
+ optional RoleRef roleRef = 3;
+}
+
+// RoleBindingList is a collection of RoleBindings
+message RoleBindingList {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of RoleBindings
+ repeated RoleBinding items = 2;
+}
+
+// RoleList is a collection of Roles
+message RoleList {
+ // Standard object's metadata.
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of Roles
+ repeated Role items = 2;
+}
+
+// RoleRef contains information that points to the role being used
+message RoleRef {
+ // APIGroup is the group for the resource being referenced
+ optional string apiGroup = 1;
+
+ // Kind is the type of resource being referenced
+ optional string kind = 2;
+
+ // Name is the name of resource being referenced
+ optional string name = 3;
+}
+
+// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference,
+// or a value for non-objects such as user and group names.
+message Subject {
+ // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
+ // If the Authorizer does not recognized the kind value, the Authorizer should report an error.
+ optional string kind = 1;
+
+ // APIGroup holds the API group of the referenced subject.
+ // Defaults to "" for ServiceAccount subjects.
+ // Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
+ // +optional
+ optional string apiGroup = 2;
+
+ // Name of the object being referenced.
+ optional string name = 3;
+
+ // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty
+ // the Authorizer should report an error.
+ // +optional
+ optional string namespace = 4;
+}
+
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/helpers.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/helpers.go
new file mode 100644
index 000000000..f38776f26
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/helpers.go
@@ -0,0 +1,148 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "fmt"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// +k8s:deepcopy-gen=false
+// PolicyRuleBuilder let's us attach methods. A no-no for API types.
+// We use it to construct rules in code. It's more compact than trying to write them
+// out in a literal and allows us to perform some basic checking during construction
+type PolicyRuleBuilder struct {
+ PolicyRule PolicyRule `protobuf:"bytes,1,opt,name=policyRule"`
+}
+
+func NewRule(verbs ...string) *PolicyRuleBuilder {
+ return &PolicyRuleBuilder{
+ PolicyRule: PolicyRule{Verbs: verbs},
+ }
+}
+
+func (r *PolicyRuleBuilder) Groups(groups ...string) *PolicyRuleBuilder {
+ r.PolicyRule.APIGroups = append(r.PolicyRule.APIGroups, groups...)
+ return r
+}
+
+func (r *PolicyRuleBuilder) Resources(resources ...string) *PolicyRuleBuilder {
+ r.PolicyRule.Resources = append(r.PolicyRule.Resources, resources...)
+ return r
+}
+
+func (r *PolicyRuleBuilder) Names(names ...string) *PolicyRuleBuilder {
+ r.PolicyRule.ResourceNames = append(r.PolicyRule.ResourceNames, names...)
+ return r
+}
+
+func (r *PolicyRuleBuilder) URLs(urls ...string) *PolicyRuleBuilder {
+ r.PolicyRule.NonResourceURLs = append(r.PolicyRule.NonResourceURLs, urls...)
+ return r
+}
+
+func (r *PolicyRuleBuilder) RuleOrDie() PolicyRule {
+ ret, err := r.Rule()
+ if err != nil {
+ panic(err)
+ }
+ return ret
+}
+
+func (r *PolicyRuleBuilder) Rule() (PolicyRule, error) {
+ if len(r.PolicyRule.Verbs) == 0 {
+ return PolicyRule{}, fmt.Errorf("verbs are required: %#v", r.PolicyRule)
+ }
+
+ switch {
+ case len(r.PolicyRule.NonResourceURLs) > 0:
+ if len(r.PolicyRule.APIGroups) != 0 || len(r.PolicyRule.Resources) != 0 || len(r.PolicyRule.ResourceNames) != 0 {
+ return PolicyRule{}, fmt.Errorf("non-resource rule may not have apiGroups, resources, or resourceNames: %#v", r.PolicyRule)
+ }
+ case len(r.PolicyRule.Resources) > 0:
+ if len(r.PolicyRule.NonResourceURLs) != 0 {
+ return PolicyRule{}, fmt.Errorf("resource rule may not have nonResourceURLs: %#v", r.PolicyRule)
+ }
+ if len(r.PolicyRule.APIGroups) == 0 {
+ // this a common bug
+ return PolicyRule{}, fmt.Errorf("resource rule must have apiGroups: %#v", r.PolicyRule)
+ }
+ default:
+ return PolicyRule{}, fmt.Errorf("a rule must have either nonResourceURLs or resources: %#v", r.PolicyRule)
+ }
+
+ return r.PolicyRule, nil
+}
+
+// +k8s:deepcopy-gen=false
+// ClusterRoleBindingBuilder let's us attach methods. A no-no for API types.
+// We use it to construct bindings in code. It's more compact than trying to write them
+// out in a literal.
+type ClusterRoleBindingBuilder struct {
+ ClusterRoleBinding ClusterRoleBinding `protobuf:"bytes,1,opt,name=clusterRoleBinding"`
+}
+
+func NewClusterBinding(clusterRoleName string) *ClusterRoleBindingBuilder {
+ return &ClusterRoleBindingBuilder{
+ ClusterRoleBinding: ClusterRoleBinding{
+ ObjectMeta: metav1.ObjectMeta{Name: clusterRoleName},
+ RoleRef: RoleRef{
+ APIGroup: GroupName,
+ Kind: "ClusterRole",
+ Name: clusterRoleName,
+ },
+ },
+ }
+}
+
+func (r *ClusterRoleBindingBuilder) Groups(groups ...string) *ClusterRoleBindingBuilder {
+ for _, group := range groups {
+ r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: GroupKind, Name: group})
+ }
+ return r
+}
+
+func (r *ClusterRoleBindingBuilder) Users(users ...string) *ClusterRoleBindingBuilder {
+ for _, user := range users {
+ r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: UserKind, Name: user})
+ }
+ return r
+}
+
+func (r *ClusterRoleBindingBuilder) SAs(namespace string, serviceAccountNames ...string) *ClusterRoleBindingBuilder {
+ for _, saName := range serviceAccountNames {
+ r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: ServiceAccountKind, Namespace: namespace, Name: saName})
+ }
+ return r
+}
+
+func (r *ClusterRoleBindingBuilder) BindingOrDie() ClusterRoleBinding {
+ ret, err := r.Binding()
+ if err != nil {
+ panic(err)
+ }
+ return ret
+}
+
+func (r *ClusterRoleBindingBuilder) Binding() (ClusterRoleBinding, error) {
+ if len(r.ClusterRoleBinding.Subjects) == 0 {
+ return ClusterRoleBinding{}, fmt.Errorf("subjects are required: %#v", r.ClusterRoleBinding)
+ }
+
+ return r.ClusterRoleBinding, nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/register.go
new file mode 100644
index 000000000..aa64c0c6f
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/register.go
@@ -0,0 +1,65 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+const GroupName = "rbac.authorization.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &Role{},
+ &RoleBinding{},
+ &RoleBindingList{},
+ &RoleList{},
+
+ &ClusterRole{},
+ &ClusterRoleBinding{},
+ &ClusterRoleBindingList{},
+ &ClusterRoleList{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/types.generated.go
new file mode 100644
index 000000000..bcb865cf8
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/types.generated.go
@@ -0,0 +1,4879 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1beta1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ pkg2_types "k8s.io/apimachinery/pkg/types"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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 pkg1_v1.TypeMeta
+ var v1 pkg2_types.UID
+ var v2 time.Time
+ _, _, _ = v0, v1, v2
+ }
+}
+
+func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = len(x.APIGroups) != 0
+ yyq2[2] = len(x.Resources) != 0
+ yyq2[3] = len(x.ResourceNames) != 0
+ yyq2[4] = len(x.NonResourceURLs) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if x.Verbs == nil {
+ r.EncodeNil()
+ } else {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Verbs, false, e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("verbs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Verbs == nil {
+ r.EncodeNil()
+ } else {
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Verbs, false, e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ if x.APIGroups == nil {
+ r.EncodeNil()
+ } else {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.APIGroups, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiGroups"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.APIGroups == nil {
+ r.EncodeNil()
+ } else {
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.APIGroups, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[2] {
+ if x.Resources == nil {
+ r.EncodeNil()
+ } else {
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Resources, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[2] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resources"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Resources == nil {
+ r.EncodeNil()
+ } else {
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.Resources, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ if x.ResourceNames == nil {
+ r.EncodeNil()
+ } else {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.ResourceNames, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("resourceNames"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.ResourceNames == nil {
+ r.EncodeNil()
+ } else {
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.ResourceNames, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.NonResourceURLs == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.NonResourceURLs, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("nonResourceURLs"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.NonResourceURLs == nil {
+ r.EncodeNil()
+ } else {
+ yym17 := z.EncBinary()
+ _ = yym17
+ if false {
+ } else {
+ z.F.EncSliceStringV(x.NonResourceURLs, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *PolicyRule) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *PolicyRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "verbs":
+ if r.TryDecodeAsNil() {
+ x.Verbs = nil
+ } else {
+ yyv4 := &x.Verbs
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv4, false, d)
+ }
+ }
+ case "apiGroups":
+ if r.TryDecodeAsNil() {
+ x.APIGroups = nil
+ } else {
+ yyv6 := &x.APIGroups
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv6, false, d)
+ }
+ }
+ case "resources":
+ if r.TryDecodeAsNil() {
+ x.Resources = nil
+ } else {
+ yyv8 := &x.Resources
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv8, false, d)
+ }
+ }
+ case "resourceNames":
+ if r.TryDecodeAsNil() {
+ x.ResourceNames = nil
+ } else {
+ yyv10 := &x.ResourceNames
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv10, false, d)
+ }
+ }
+ case "nonResourceURLs":
+ if r.TryDecodeAsNil() {
+ x.NonResourceURLs = nil
+ } else {
+ yyv12 := &x.NonResourceURLs
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv12, false, d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *PolicyRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Verbs = nil
+ } else {
+ yyv15 := &x.Verbs
+ yym16 := z.DecBinary()
+ _ = yym16
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv15, false, d)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIGroups = nil
+ } else {
+ yyv17 := &x.APIGroups
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv17, false, d)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Resources = nil
+ } else {
+ yyv19 := &x.Resources
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv19, false, d)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ResourceNames = nil
+ } else {
+ yyv21 := &x.ResourceNames
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv21, false, d)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.NonResourceURLs = nil
+ } else {
+ yyv23 := &x.NonResourceURLs
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ z.F.DecSliceStringX(yyv23, false, d)
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Subject) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[1] = x.APIGroup != ""
+ yyq2[3] = x.Namespace != ""
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIGroup))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiGroup"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIGroup))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[3] {
+ yym13 := z.EncBinary()
+ _ = yym13
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[3] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("namespace"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym14 := z.EncBinary()
+ _ = yym14
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Namespace))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Subject) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Subject) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "apiGroup":
+ if r.TryDecodeAsNil() {
+ x.APIGroup = ""
+ } else {
+ yyv6 := &x.APIGroup
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv8 := &x.Name
+ yym9 := z.DecBinary()
+ _ = yym9
+ if false {
+ } else {
+ *((*string)(yyv8)) = r.DecodeString()
+ }
+ }
+ case "namespace":
+ if r.TryDecodeAsNil() {
+ x.Namespace = ""
+ } else {
+ yyv10 := &x.Namespace
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Subject) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIGroup = ""
+ } else {
+ yyv15 := &x.APIGroup
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv17 := &x.Name
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Namespace = ""
+ } else {
+ yyv19 := &x.Namespace
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ *((*string)(yyv19)) = r.DecodeString()
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *RoleRef) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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_containerArrayElem1234)
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIGroup))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiGroup"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIGroup))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yym10 := z.EncBinary()
+ _ = yym10
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("name"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym11 := z.EncBinary()
+ _ = yym11
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Name))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RoleRef) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RoleRef) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ switch yys3 {
+ case "apiGroup":
+ if r.TryDecodeAsNil() {
+ x.APIGroup = ""
+ } else {
+ yyv4 := &x.APIGroup
+ yym5 := z.DecBinary()
+ _ = yym5
+ if false {
+ } else {
+ *((*string)(yyv4)) = r.DecodeString()
+ }
+ }
+ case "kind":
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv6 := &x.Kind
+ yym7 := z.DecBinary()
+ _ = yym7
+ if false {
+ } else {
+ *((*string)(yyv6)) = r.DecodeString()
+ }
+ }
+ case "name":
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv8 := &x.Name
+ 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_containerMapEnd1234)
+}
+
+func (x *RoleRef) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIGroup = ""
+ } else {
+ yyv11 := &x.APIGroup
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv13 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Name = ""
+ } else {
+ yyv15 := &x.Name
+ 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_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj10-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *Role) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rules"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *Role) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *Role) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "rules":
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv10 := &x.Rules
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSlicePolicyRule((*[]PolicyRule)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *Role) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv19 := &x.Rules
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSlicePolicyRule((*[]PolicyRule)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *RoleBinding) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Subjects == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceSubject(([]Subject)(x.Subjects), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("subjects"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Subjects == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceSubject(([]Subject)(x.Subjects), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy18 := &x.RoleRef
+ yy18.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("roleRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy20 := &x.RoleRef
+ yy20.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RoleBinding) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RoleBinding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "subjects":
+ if r.TryDecodeAsNil() {
+ x.Subjects = nil
+ } else {
+ yyv10 := &x.Subjects
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSliceSubject((*[]Subject)(yyv10), d)
+ }
+ }
+ case "roleRef":
+ if r.TryDecodeAsNil() {
+ x.RoleRef = RoleRef{}
+ } else {
+ yyv12 := &x.RoleRef
+ yyv12.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv14 := &x.Kind
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv16 := &x.APIVersion
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg1_v1.ObjectMeta{}
+ } else {
+ yyv18 := &x.ObjectMeta
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv18) {
+ } else {
+ z.DecFallback(yyv18, false)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Subjects = nil
+ } else {
+ yyv20 := &x.Subjects
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ h.decSliceSubject((*[]Subject)(yyv20), d)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RoleRef = RoleRef{}
+ } else {
+ yyv22 := &x.RoleRef
+ yyv22.CodecDecodeSelf(d)
+ }
+ for {
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj13-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *RoleBindingList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceRoleBinding(([]RoleBinding)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceRoleBinding(([]RoleBinding)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RoleBindingList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RoleBindingList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceRoleBinding((*[]RoleBinding)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RoleBindingList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceRoleBinding((*[]RoleBinding)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *RoleList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceRole(([]Role)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceRole(([]Role)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *RoleList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *RoleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceRole((*[]Role)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *RoleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceRole((*[]Role)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ClusterRole) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("rules"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Rules == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ClusterRole) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ClusterRole) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "rules":
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv10 := &x.Rules
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSlicePolicyRule((*[]PolicyRule)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ClusterRole) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Rules = nil
+ } else {
+ yyv19 := &x.Rules
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSlicePolicyRule((*[]PolicyRule)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ClusterRoleBinding) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 2
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Subjects == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceSubject(([]Subject)(x.Subjects), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("subjects"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Subjects == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceSubject(([]Subject)(x.Subjects), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy18 := &x.RoleRef
+ yy18.CodecEncodeSelf(e)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("roleRef"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yy20 := &x.RoleRef
+ yy20.CodecEncodeSelf(e)
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ClusterRoleBinding) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ClusterRoleBinding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "subjects":
+ if r.TryDecodeAsNil() {
+ x.Subjects = nil
+ } else {
+ yyv10 := &x.Subjects
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ h.decSliceSubject((*[]Subject)(yyv10), d)
+ }
+ }
+ case "roleRef":
+ if r.TryDecodeAsNil() {
+ x.RoleRef = RoleRef{}
+ } else {
+ yyv12 := &x.RoleRef
+ yyv12.CodecDecodeSelf(d)
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ClusterRoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv14 := &x.Kind
+ yym15 := z.DecBinary()
+ _ = yym15
+ if false {
+ } else {
+ *((*string)(yyv14)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv16 := &x.APIVersion
+ yym17 := z.DecBinary()
+ _ = yym17
+ if false {
+ } else {
+ *((*string)(yyv16)) = r.DecodeString()
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg1_v1.ObjectMeta{}
+ } else {
+ yyv18 := &x.ObjectMeta
+ yym19 := z.DecBinary()
+ _ = yym19
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv18) {
+ } else {
+ z.DecFallback(yyv18, false)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Subjects = nil
+ } else {
+ yyv20 := &x.Subjects
+ yym21 := z.DecBinary()
+ _ = yym21
+ if false {
+ } else {
+ h.decSliceSubject((*[]Subject)(yyv20), d)
+ }
+ }
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.RoleRef = RoleRef{}
+ } else {
+ yyv22 := &x.RoleRef
+ yyv22.CodecDecodeSelf(d)
+ }
+ for {
+ yyj13++
+ if yyhl13 {
+ yyb13 = yyj13 > l
+ } else {
+ yyb13 = r.CheckBreak()
+ }
+ if yyb13 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj13-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ClusterRoleBindingList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceClusterRoleBinding(([]ClusterRoleBinding)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceClusterRoleBinding(([]ClusterRoleBinding)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ClusterRoleBindingList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ClusterRoleBindingList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceClusterRoleBinding((*[]ClusterRoleBinding)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ClusterRoleBindingList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceClusterRoleBinding((*[]ClusterRoleBinding)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *ClusterRoleList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceClusterRole(([]ClusterRole)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceClusterRole(([]ClusterRole)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *ClusterRoleList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *ClusterRoleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceClusterRole((*[]ClusterRole)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *ClusterRoleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceClusterRole((*[]ClusterRole)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encSlicePolicyRule(v []PolicyRule, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSlicePolicyRule(v *[]PolicyRule, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []PolicyRule{}
+ 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, 120)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]PolicyRule, yyrl1)
+ }
+ } else {
+ yyv1 = make([]PolicyRule, 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] = PolicyRule{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, PolicyRule{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PolicyRule{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, PolicyRule{}) // var yyz1 PolicyRule
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = PolicyRule{}
+ } 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 = []PolicyRule{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceSubject(v []Subject, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceSubject(v *[]Subject, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Subject{}
+ 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, 64)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Subject, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Subject, 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] = Subject{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Subject{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Subject{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Subject{}) // var yyz1 Subject
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Subject{}
+ } 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 = []Subject{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceRoleBinding(v []RoleBinding, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceRoleBinding(v *[]RoleBinding, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []RoleBinding{}
+ 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, 336)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]RoleBinding, yyrl1)
+ }
+ } else {
+ yyv1 = make([]RoleBinding, 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] = RoleBinding{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, RoleBinding{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = RoleBinding{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, RoleBinding{}) // var yyz1 RoleBinding
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = RoleBinding{}
+ } 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 = []RoleBinding{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceRole(v []Role, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceRole(v *[]Role, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []Role{}
+ 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, 288)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]Role, yyrl1)
+ }
+ } else {
+ yyv1 = make([]Role, 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] = Role{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, Role{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Role{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, Role{}) // var yyz1 Role
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = Role{}
+ } 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 = []Role{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceClusterRoleBinding(v []ClusterRoleBinding, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceClusterRoleBinding(v *[]ClusterRoleBinding, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ClusterRoleBinding{}
+ 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, 336)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ClusterRoleBinding, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ClusterRoleBinding, 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] = ClusterRoleBinding{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ClusterRoleBinding{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ClusterRoleBinding{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ClusterRoleBinding{}) // var yyz1 ClusterRoleBinding
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ClusterRoleBinding{}
+ } 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 = []ClusterRoleBinding{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
+
+func (x codecSelfer1234) encSliceClusterRole(v []ClusterRole, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceClusterRole(v *[]ClusterRole, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []ClusterRole{}
+ 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, 288)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]ClusterRole, yyrl1)
+ }
+ } else {
+ yyv1 = make([]ClusterRole, 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] = ClusterRole{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, ClusterRole{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ClusterRole{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, ClusterRole{}) // var yyz1 ClusterRole
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = ClusterRole{}
+ } 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 = []ClusterRole{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/types.go
new file mode 100644
index 000000000..89a47db9e
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/types.go
@@ -0,0 +1,207 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// Authorization is calculated against
+// 1. evaluation of ClusterRoleBindings - short circuit on match
+// 2. evaluation of RoleBindings in the namespace requested - short circuit on match
+// 3. deny by default
+
+const (
+ APIGroupAll = "*"
+ ResourceAll = "*"
+ VerbAll = "*"
+ NonResourceAll = "*"
+
+ GroupKind = "Group"
+ ServiceAccountKind = "ServiceAccount"
+ UserKind = "User"
+
+ // AutoUpdateAnnotationKey is the name of an annotation which prevents reconciliation if set to "false"
+ AutoUpdateAnnotationKey = "rbac.authorization.kubernetes.io/autoupdate"
+)
+
+// Authorization is calculated against
+// 1. evaluation of ClusterRoleBindings - short circuit on match
+// 2. evaluation of RoleBindings in the namespace requested - short circuit on match
+// 3. deny by default
+
+// PolicyRule holds information that describes a policy rule, but does not contain information
+// about who the rule applies to or which namespace the rule applies to.
+type PolicyRule struct {
+ // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.
+ Verbs []string `json:"verbs" protobuf:"bytes,1,rep,name=verbs"`
+
+ // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of
+ // the enumerated resources in any API group will be allowed.
+ // +optional
+ APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,2,rep,name=apiGroups"`
+ // Resources is a list of resources this rule applies to. ResourceAll represents all resources.
+ // +optional
+ Resources []string `json:"resources,omitempty" protobuf:"bytes,3,rep,name=resources"`
+ // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
+ // +optional
+ ResourceNames []string `json:"resourceNames,omitempty" protobuf:"bytes,4,rep,name=resourceNames"`
+
+ // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path
+ // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.
+ // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.
+ // +optional
+ NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,5,rep,name=nonResourceURLs"`
+}
+
+// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference,
+// or a value for non-objects such as user and group names.
+type Subject struct {
+ // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
+ // If the Authorizer does not recognized the kind value, the Authorizer should report an error.
+ Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
+ // APIGroup holds the API group of the referenced subject.
+ // Defaults to "" for ServiceAccount subjects.
+ // Defaults to "rbac.authorization.k8s.io" for User and Group subjects.
+ // +optional
+ APIGroup string `json:"apiGroup,omitempty" protobuf:"bytes,2,opt.name=apiGroup"`
+ // Name of the object being referenced.
+ Name string `json:"name" protobuf:"bytes,3,opt,name=name"`
+ // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty
+ // the Authorizer should report an error.
+ // +optional
+ Namespace string `json:"namespace,omitempty" protobuf:"bytes,4,opt,name=namespace"`
+}
+
+// RoleRef contains information that points to the role being used
+type RoleRef struct {
+ // APIGroup is the group for the resource being referenced
+ APIGroup string `json:"apiGroup" protobuf:"bytes,1,opt,name=apiGroup"`
+ // Kind is the type of resource being referenced
+ Kind string `json:"kind" protobuf:"bytes,2,opt,name=kind"`
+ // Name is the name of resource being referenced
+ Name string `json:"name" protobuf:"bytes,3,opt,name=name"`
+}
+
+// +genclient=true
+
+// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
+type Role struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Rules holds all the PolicyRules for this Role
+ Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"`
+}
+
+// +genclient=true
+
+// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace.
+// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given
+// namespace only have effect in that namespace.
+type RoleBinding struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Subjects holds references to the objects the role applies to.
+ Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"`
+
+ // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
+ // If the RoleRef cannot be resolved, the Authorizer must return an error.
+ RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
+}
+
+// RoleBindingList is a collection of RoleBindings
+type RoleBindingList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of RoleBindings
+ Items []RoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// RoleList is a collection of Roles
+type RoleList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of Roles
+ Items []Role `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// +genclient=true
+// +nonNamespaced=true
+
+// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
+type ClusterRole struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Rules holds all the PolicyRules for this ClusterRole
+ Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"`
+}
+
+// +genclient=true
+// +nonNamespaced=true
+
+// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace,
+// and adds who information via Subject.
+type ClusterRoleBinding struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Subjects holds references to the objects the role applies to.
+ Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"`
+
+ // RoleRef can only reference a ClusterRole in the global namespace.
+ // If the RoleRef cannot be resolved, the Authorizer must return an error.
+ RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
+}
+
+// ClusterRoleBindingList is a collection of ClusterRoleBindings
+type ClusterRoleBindingList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of ClusterRoleBindings
+ Items []ClusterRoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
+
+// ClusterRoleList is a collection of ClusterRoles
+type ClusterRoleList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of ClusterRoles
+ Items []ClusterRole `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..1463d8fea
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/types_swagger_doc_generated.go
@@ -0,0 +1,148 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_ClusterRole = map[string]string{
+ "": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.",
+ "metadata": "Standard object's metadata.",
+ "rules": "Rules holds all the PolicyRules for this ClusterRole",
+}
+
+func (ClusterRole) SwaggerDoc() map[string]string {
+ return map_ClusterRole
+}
+
+var map_ClusterRoleBinding = map[string]string{
+ "": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.",
+ "metadata": "Standard object's metadata.",
+ "subjects": "Subjects holds references to the objects the role applies to.",
+ "roleRef": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.",
+}
+
+func (ClusterRoleBinding) SwaggerDoc() map[string]string {
+ return map_ClusterRoleBinding
+}
+
+var map_ClusterRoleBindingList = map[string]string{
+ "": "ClusterRoleBindingList is a collection of ClusterRoleBindings",
+ "metadata": "Standard object's metadata.",
+ "items": "Items is a list of ClusterRoleBindings",
+}
+
+func (ClusterRoleBindingList) SwaggerDoc() map[string]string {
+ return map_ClusterRoleBindingList
+}
+
+var map_ClusterRoleList = map[string]string{
+ "": "ClusterRoleList is a collection of ClusterRoles",
+ "metadata": "Standard object's metadata.",
+ "items": "Items is a list of ClusterRoles",
+}
+
+func (ClusterRoleList) SwaggerDoc() map[string]string {
+ return map_ClusterRoleList
+}
+
+var map_PolicyRule = map[string]string{
+ "": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.",
+ "verbs": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.",
+ "apiGroups": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.",
+ "resources": "Resources is a list of resources this rule applies to. ResourceAll represents all resources.",
+ "resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.",
+ "nonResourceURLs": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.",
+}
+
+func (PolicyRule) SwaggerDoc() map[string]string {
+ return map_PolicyRule
+}
+
+var map_Role = map[string]string{
+ "": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.",
+ "metadata": "Standard object's metadata.",
+ "rules": "Rules holds all the PolicyRules for this Role",
+}
+
+func (Role) SwaggerDoc() map[string]string {
+ return map_Role
+}
+
+var map_RoleBinding = map[string]string{
+ "": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.",
+ "metadata": "Standard object's metadata.",
+ "subjects": "Subjects holds references to the objects the role applies to.",
+ "roleRef": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.",
+}
+
+func (RoleBinding) SwaggerDoc() map[string]string {
+ return map_RoleBinding
+}
+
+var map_RoleBindingList = map[string]string{
+ "": "RoleBindingList is a collection of RoleBindings",
+ "metadata": "Standard object's metadata.",
+ "items": "Items is a list of RoleBindings",
+}
+
+func (RoleBindingList) SwaggerDoc() map[string]string {
+ return map_RoleBindingList
+}
+
+var map_RoleList = map[string]string{
+ "": "RoleList is a collection of Roles",
+ "metadata": "Standard object's metadata.",
+ "items": "Items is a list of Roles",
+}
+
+func (RoleList) SwaggerDoc() map[string]string {
+ return map_RoleList
+}
+
+var map_RoleRef = map[string]string{
+ "": "RoleRef contains information that points to the role being used",
+ "apiGroup": "APIGroup is the group for the resource being referenced",
+ "kind": "Kind is the type of resource being referenced",
+ "name": "Name is the name of resource being referenced",
+}
+
+func (RoleRef) SwaggerDoc() map[string]string {
+ return map_RoleRef
+}
+
+var map_Subject = map[string]string{
+ "": "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.",
+ "kind": "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.",
+ "apiGroup": "APIGroup holds the API group of the referenced subject. Defaults to \"\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io\" for User and Group subjects.",
+ "name": "Name of the object being referenced.",
+ "namespace": "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.",
+}
+
+func (Subject) SwaggerDoc() map[string]string {
+ return map_Subject
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/zz_generated.conversion.go
new file mode 100644
index 000000000..638309670
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/zz_generated.conversion.go
@@ -0,0 +1,415 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ rbac "k8s.io/kubernetes/pkg/apis/rbac"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1beta1_ClusterRole_To_rbac_ClusterRole,
+ Convert_rbac_ClusterRole_To_v1beta1_ClusterRole,
+ Convert_v1beta1_ClusterRoleBinding_To_rbac_ClusterRoleBinding,
+ Convert_rbac_ClusterRoleBinding_To_v1beta1_ClusterRoleBinding,
+ Convert_v1beta1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder,
+ Convert_rbac_ClusterRoleBindingBuilder_To_v1beta1_ClusterRoleBindingBuilder,
+ Convert_v1beta1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList,
+ Convert_rbac_ClusterRoleBindingList_To_v1beta1_ClusterRoleBindingList,
+ Convert_v1beta1_ClusterRoleList_To_rbac_ClusterRoleList,
+ Convert_rbac_ClusterRoleList_To_v1beta1_ClusterRoleList,
+ Convert_v1beta1_PolicyRule_To_rbac_PolicyRule,
+ Convert_rbac_PolicyRule_To_v1beta1_PolicyRule,
+ Convert_v1beta1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder,
+ Convert_rbac_PolicyRuleBuilder_To_v1beta1_PolicyRuleBuilder,
+ Convert_v1beta1_Role_To_rbac_Role,
+ Convert_rbac_Role_To_v1beta1_Role,
+ Convert_v1beta1_RoleBinding_To_rbac_RoleBinding,
+ Convert_rbac_RoleBinding_To_v1beta1_RoleBinding,
+ Convert_v1beta1_RoleBindingList_To_rbac_RoleBindingList,
+ Convert_rbac_RoleBindingList_To_v1beta1_RoleBindingList,
+ Convert_v1beta1_RoleList_To_rbac_RoleList,
+ Convert_rbac_RoleList_To_v1beta1_RoleList,
+ Convert_v1beta1_RoleRef_To_rbac_RoleRef,
+ Convert_rbac_RoleRef_To_v1beta1_RoleRef,
+ Convert_v1beta1_Subject_To_rbac_Subject,
+ Convert_rbac_Subject_To_v1beta1_Subject,
+ )
+}
+
+func autoConvert_v1beta1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac.ClusterRole, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Rules = *(*[]rbac.PolicyRule)(unsafe.Pointer(&in.Rules))
+ return nil
+}
+
+// Convert_v1beta1_ClusterRole_To_rbac_ClusterRole is an autogenerated conversion function.
+func Convert_v1beta1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac.ClusterRole, s conversion.Scope) error {
+ return autoConvert_v1beta1_ClusterRole_To_rbac_ClusterRole(in, out, s)
+}
+
+func autoConvert_rbac_ClusterRole_To_v1beta1_ClusterRole(in *rbac.ClusterRole, out *ClusterRole, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if in.Rules == nil {
+ out.Rules = make([]PolicyRule, 0)
+ } else {
+ out.Rules = *(*[]PolicyRule)(unsafe.Pointer(&in.Rules))
+ }
+ return nil
+}
+
+// Convert_rbac_ClusterRole_To_v1beta1_ClusterRole is an autogenerated conversion function.
+func Convert_rbac_ClusterRole_To_v1beta1_ClusterRole(in *rbac.ClusterRole, out *ClusterRole, s conversion.Scope) error {
+ return autoConvert_rbac_ClusterRole_To_v1beta1_ClusterRole(in, out, s)
+}
+
+func autoConvert_v1beta1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in *ClusterRoleBinding, out *rbac.ClusterRoleBinding, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Subjects = *(*[]rbac.Subject)(unsafe.Pointer(&in.Subjects))
+ if err := Convert_v1beta1_RoleRef_To_rbac_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_ClusterRoleBinding_To_rbac_ClusterRoleBinding is an autogenerated conversion function.
+func Convert_v1beta1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in *ClusterRoleBinding, out *rbac.ClusterRoleBinding, s conversion.Scope) error {
+ return autoConvert_v1beta1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in, out, s)
+}
+
+func autoConvert_rbac_ClusterRoleBinding_To_v1beta1_ClusterRoleBinding(in *rbac.ClusterRoleBinding, out *ClusterRoleBinding, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if in.Subjects == nil {
+ out.Subjects = make([]Subject, 0)
+ } else {
+ out.Subjects = *(*[]Subject)(unsafe.Pointer(&in.Subjects))
+ }
+ if err := Convert_rbac_RoleRef_To_v1beta1_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_rbac_ClusterRoleBinding_To_v1beta1_ClusterRoleBinding is an autogenerated conversion function.
+func Convert_rbac_ClusterRoleBinding_To_v1beta1_ClusterRoleBinding(in *rbac.ClusterRoleBinding, out *ClusterRoleBinding, s conversion.Scope) error {
+ return autoConvert_rbac_ClusterRoleBinding_To_v1beta1_ClusterRoleBinding(in, out, s)
+}
+
+func autoConvert_v1beta1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder(in *ClusterRoleBindingBuilder, out *rbac.ClusterRoleBindingBuilder, s conversion.Scope) error {
+ if err := Convert_v1beta1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(&in.ClusterRoleBinding, &out.ClusterRoleBinding, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder is an autogenerated conversion function.
+func Convert_v1beta1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder(in *ClusterRoleBindingBuilder, out *rbac.ClusterRoleBindingBuilder, s conversion.Scope) error {
+ return autoConvert_v1beta1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder(in, out, s)
+}
+
+func autoConvert_rbac_ClusterRoleBindingBuilder_To_v1beta1_ClusterRoleBindingBuilder(in *rbac.ClusterRoleBindingBuilder, out *ClusterRoleBindingBuilder, s conversion.Scope) error {
+ if err := Convert_rbac_ClusterRoleBinding_To_v1beta1_ClusterRoleBinding(&in.ClusterRoleBinding, &out.ClusterRoleBinding, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_rbac_ClusterRoleBindingBuilder_To_v1beta1_ClusterRoleBindingBuilder is an autogenerated conversion function.
+func Convert_rbac_ClusterRoleBindingBuilder_To_v1beta1_ClusterRoleBindingBuilder(in *rbac.ClusterRoleBindingBuilder, out *ClusterRoleBindingBuilder, s conversion.Scope) error {
+ return autoConvert_rbac_ClusterRoleBindingBuilder_To_v1beta1_ClusterRoleBindingBuilder(in, out, s)
+}
+
+func autoConvert_v1beta1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in *ClusterRoleBindingList, out *rbac.ClusterRoleBindingList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]rbac.ClusterRoleBinding)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1beta1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList is an autogenerated conversion function.
+func Convert_v1beta1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in *ClusterRoleBindingList, out *rbac.ClusterRoleBindingList, s conversion.Scope) error {
+ return autoConvert_v1beta1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in, out, s)
+}
+
+func autoConvert_rbac_ClusterRoleBindingList_To_v1beta1_ClusterRoleBindingList(in *rbac.ClusterRoleBindingList, out *ClusterRoleBindingList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]ClusterRoleBinding, 0)
+ } else {
+ out.Items = *(*[]ClusterRoleBinding)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_rbac_ClusterRoleBindingList_To_v1beta1_ClusterRoleBindingList is an autogenerated conversion function.
+func Convert_rbac_ClusterRoleBindingList_To_v1beta1_ClusterRoleBindingList(in *rbac.ClusterRoleBindingList, out *ClusterRoleBindingList, s conversion.Scope) error {
+ return autoConvert_rbac_ClusterRoleBindingList_To_v1beta1_ClusterRoleBindingList(in, out, s)
+}
+
+func autoConvert_v1beta1_ClusterRoleList_To_rbac_ClusterRoleList(in *ClusterRoleList, out *rbac.ClusterRoleList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]rbac.ClusterRole)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1beta1_ClusterRoleList_To_rbac_ClusterRoleList is an autogenerated conversion function.
+func Convert_v1beta1_ClusterRoleList_To_rbac_ClusterRoleList(in *ClusterRoleList, out *rbac.ClusterRoleList, s conversion.Scope) error {
+ return autoConvert_v1beta1_ClusterRoleList_To_rbac_ClusterRoleList(in, out, s)
+}
+
+func autoConvert_rbac_ClusterRoleList_To_v1beta1_ClusterRoleList(in *rbac.ClusterRoleList, out *ClusterRoleList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]ClusterRole, 0)
+ } else {
+ out.Items = *(*[]ClusterRole)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_rbac_ClusterRoleList_To_v1beta1_ClusterRoleList is an autogenerated conversion function.
+func Convert_rbac_ClusterRoleList_To_v1beta1_ClusterRoleList(in *rbac.ClusterRoleList, out *ClusterRoleList, s conversion.Scope) error {
+ return autoConvert_rbac_ClusterRoleList_To_v1beta1_ClusterRoleList(in, out, s)
+}
+
+func autoConvert_v1beta1_PolicyRule_To_rbac_PolicyRule(in *PolicyRule, out *rbac.PolicyRule, s conversion.Scope) error {
+ out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs))
+ out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups))
+ out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources))
+ out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames))
+ out.NonResourceURLs = *(*[]string)(unsafe.Pointer(&in.NonResourceURLs))
+ return nil
+}
+
+// Convert_v1beta1_PolicyRule_To_rbac_PolicyRule is an autogenerated conversion function.
+func Convert_v1beta1_PolicyRule_To_rbac_PolicyRule(in *PolicyRule, out *rbac.PolicyRule, s conversion.Scope) error {
+ return autoConvert_v1beta1_PolicyRule_To_rbac_PolicyRule(in, out, s)
+}
+
+func autoConvert_rbac_PolicyRule_To_v1beta1_PolicyRule(in *rbac.PolicyRule, out *PolicyRule, s conversion.Scope) error {
+ if in.Verbs == nil {
+ out.Verbs = make([]string, 0)
+ } else {
+ out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs))
+ }
+ out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups))
+ out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources))
+ out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames))
+ out.NonResourceURLs = *(*[]string)(unsafe.Pointer(&in.NonResourceURLs))
+ return nil
+}
+
+// Convert_rbac_PolicyRule_To_v1beta1_PolicyRule is an autogenerated conversion function.
+func Convert_rbac_PolicyRule_To_v1beta1_PolicyRule(in *rbac.PolicyRule, out *PolicyRule, s conversion.Scope) error {
+ return autoConvert_rbac_PolicyRule_To_v1beta1_PolicyRule(in, out, s)
+}
+
+func autoConvert_v1beta1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder(in *PolicyRuleBuilder, out *rbac.PolicyRuleBuilder, s conversion.Scope) error {
+ if err := Convert_v1beta1_PolicyRule_To_rbac_PolicyRule(&in.PolicyRule, &out.PolicyRule, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder is an autogenerated conversion function.
+func Convert_v1beta1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder(in *PolicyRuleBuilder, out *rbac.PolicyRuleBuilder, s conversion.Scope) error {
+ return autoConvert_v1beta1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder(in, out, s)
+}
+
+func autoConvert_rbac_PolicyRuleBuilder_To_v1beta1_PolicyRuleBuilder(in *rbac.PolicyRuleBuilder, out *PolicyRuleBuilder, s conversion.Scope) error {
+ if err := Convert_rbac_PolicyRule_To_v1beta1_PolicyRule(&in.PolicyRule, &out.PolicyRule, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_rbac_PolicyRuleBuilder_To_v1beta1_PolicyRuleBuilder is an autogenerated conversion function.
+func Convert_rbac_PolicyRuleBuilder_To_v1beta1_PolicyRuleBuilder(in *rbac.PolicyRuleBuilder, out *PolicyRuleBuilder, s conversion.Scope) error {
+ return autoConvert_rbac_PolicyRuleBuilder_To_v1beta1_PolicyRuleBuilder(in, out, s)
+}
+
+func autoConvert_v1beta1_Role_To_rbac_Role(in *Role, out *rbac.Role, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Rules = *(*[]rbac.PolicyRule)(unsafe.Pointer(&in.Rules))
+ return nil
+}
+
+// Convert_v1beta1_Role_To_rbac_Role is an autogenerated conversion function.
+func Convert_v1beta1_Role_To_rbac_Role(in *Role, out *rbac.Role, s conversion.Scope) error {
+ return autoConvert_v1beta1_Role_To_rbac_Role(in, out, s)
+}
+
+func autoConvert_rbac_Role_To_v1beta1_Role(in *rbac.Role, out *Role, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if in.Rules == nil {
+ out.Rules = make([]PolicyRule, 0)
+ } else {
+ out.Rules = *(*[]PolicyRule)(unsafe.Pointer(&in.Rules))
+ }
+ return nil
+}
+
+// Convert_rbac_Role_To_v1beta1_Role is an autogenerated conversion function.
+func Convert_rbac_Role_To_v1beta1_Role(in *rbac.Role, out *Role, s conversion.Scope) error {
+ return autoConvert_rbac_Role_To_v1beta1_Role(in, out, s)
+}
+
+func autoConvert_v1beta1_RoleBinding_To_rbac_RoleBinding(in *RoleBinding, out *rbac.RoleBinding, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Subjects = *(*[]rbac.Subject)(unsafe.Pointer(&in.Subjects))
+ if err := Convert_v1beta1_RoleRef_To_rbac_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1beta1_RoleBinding_To_rbac_RoleBinding is an autogenerated conversion function.
+func Convert_v1beta1_RoleBinding_To_rbac_RoleBinding(in *RoleBinding, out *rbac.RoleBinding, s conversion.Scope) error {
+ return autoConvert_v1beta1_RoleBinding_To_rbac_RoleBinding(in, out, s)
+}
+
+func autoConvert_rbac_RoleBinding_To_v1beta1_RoleBinding(in *rbac.RoleBinding, out *RoleBinding, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if in.Subjects == nil {
+ out.Subjects = make([]Subject, 0)
+ } else {
+ out.Subjects = *(*[]Subject)(unsafe.Pointer(&in.Subjects))
+ }
+ if err := Convert_rbac_RoleRef_To_v1beta1_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_rbac_RoleBinding_To_v1beta1_RoleBinding is an autogenerated conversion function.
+func Convert_rbac_RoleBinding_To_v1beta1_RoleBinding(in *rbac.RoleBinding, out *RoleBinding, s conversion.Scope) error {
+ return autoConvert_rbac_RoleBinding_To_v1beta1_RoleBinding(in, out, s)
+}
+
+func autoConvert_v1beta1_RoleBindingList_To_rbac_RoleBindingList(in *RoleBindingList, out *rbac.RoleBindingList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]rbac.RoleBinding)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1beta1_RoleBindingList_To_rbac_RoleBindingList is an autogenerated conversion function.
+func Convert_v1beta1_RoleBindingList_To_rbac_RoleBindingList(in *RoleBindingList, out *rbac.RoleBindingList, s conversion.Scope) error {
+ return autoConvert_v1beta1_RoleBindingList_To_rbac_RoleBindingList(in, out, s)
+}
+
+func autoConvert_rbac_RoleBindingList_To_v1beta1_RoleBindingList(in *rbac.RoleBindingList, out *RoleBindingList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]RoleBinding, 0)
+ } else {
+ out.Items = *(*[]RoleBinding)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_rbac_RoleBindingList_To_v1beta1_RoleBindingList is an autogenerated conversion function.
+func Convert_rbac_RoleBindingList_To_v1beta1_RoleBindingList(in *rbac.RoleBindingList, out *RoleBindingList, s conversion.Scope) error {
+ return autoConvert_rbac_RoleBindingList_To_v1beta1_RoleBindingList(in, out, s)
+}
+
+func autoConvert_v1beta1_RoleList_To_rbac_RoleList(in *RoleList, out *rbac.RoleList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]rbac.Role)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1beta1_RoleList_To_rbac_RoleList is an autogenerated conversion function.
+func Convert_v1beta1_RoleList_To_rbac_RoleList(in *RoleList, out *rbac.RoleList, s conversion.Scope) error {
+ return autoConvert_v1beta1_RoleList_To_rbac_RoleList(in, out, s)
+}
+
+func autoConvert_rbac_RoleList_To_v1beta1_RoleList(in *rbac.RoleList, out *RoleList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]Role, 0)
+ } else {
+ out.Items = *(*[]Role)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_rbac_RoleList_To_v1beta1_RoleList is an autogenerated conversion function.
+func Convert_rbac_RoleList_To_v1beta1_RoleList(in *rbac.RoleList, out *RoleList, s conversion.Scope) error {
+ return autoConvert_rbac_RoleList_To_v1beta1_RoleList(in, out, s)
+}
+
+func autoConvert_v1beta1_RoleRef_To_rbac_RoleRef(in *RoleRef, out *rbac.RoleRef, s conversion.Scope) error {
+ out.APIGroup = in.APIGroup
+ out.Kind = in.Kind
+ out.Name = in.Name
+ return nil
+}
+
+// Convert_v1beta1_RoleRef_To_rbac_RoleRef is an autogenerated conversion function.
+func Convert_v1beta1_RoleRef_To_rbac_RoleRef(in *RoleRef, out *rbac.RoleRef, s conversion.Scope) error {
+ return autoConvert_v1beta1_RoleRef_To_rbac_RoleRef(in, out, s)
+}
+
+func autoConvert_rbac_RoleRef_To_v1beta1_RoleRef(in *rbac.RoleRef, out *RoleRef, s conversion.Scope) error {
+ out.APIGroup = in.APIGroup
+ out.Kind = in.Kind
+ out.Name = in.Name
+ return nil
+}
+
+// Convert_rbac_RoleRef_To_v1beta1_RoleRef is an autogenerated conversion function.
+func Convert_rbac_RoleRef_To_v1beta1_RoleRef(in *rbac.RoleRef, out *RoleRef, s conversion.Scope) error {
+ return autoConvert_rbac_RoleRef_To_v1beta1_RoleRef(in, out, s)
+}
+
+func autoConvert_v1beta1_Subject_To_rbac_Subject(in *Subject, out *rbac.Subject, s conversion.Scope) error {
+ out.Kind = in.Kind
+ out.APIGroup = in.APIGroup
+ out.Name = in.Name
+ out.Namespace = in.Namespace
+ return nil
+}
+
+// Convert_v1beta1_Subject_To_rbac_Subject is an autogenerated conversion function.
+func Convert_v1beta1_Subject_To_rbac_Subject(in *Subject, out *rbac.Subject, s conversion.Scope) error {
+ return autoConvert_v1beta1_Subject_To_rbac_Subject(in, out, s)
+}
+
+func autoConvert_rbac_Subject_To_v1beta1_Subject(in *rbac.Subject, out *Subject, s conversion.Scope) error {
+ out.Kind = in.Kind
+ out.APIGroup = in.APIGroup
+ out.Name = in.Name
+ out.Namespace = in.Namespace
+ return nil
+}
+
+// Convert_rbac_Subject_To_v1beta1_Subject is an autogenerated conversion function.
+func Convert_rbac_Subject_To_v1beta1_Subject(in *rbac.Subject, out *Subject, s conversion.Scope) error {
+ return autoConvert_rbac_Subject_To_v1beta1_Subject(in, out, s)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..57c331ea9
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/zz_generated.deepcopy.go
@@ -0,0 +1,269 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterRole, InType: reflect.TypeOf(&ClusterRole{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterRoleBinding, InType: reflect.TypeOf(&ClusterRoleBinding{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterRoleBindingList, InType: reflect.TypeOf(&ClusterRoleBindingList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterRoleList, InType: reflect.TypeOf(&ClusterRoleList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_PolicyRule, InType: reflect.TypeOf(&PolicyRule{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Role, InType: reflect.TypeOf(&Role{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RoleBinding, InType: reflect.TypeOf(&RoleBinding{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RoleBindingList, InType: reflect.TypeOf(&RoleBindingList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RoleList, InType: reflect.TypeOf(&RoleList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RoleRef, InType: reflect.TypeOf(&RoleRef{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Subject, InType: reflect.TypeOf(&Subject{})},
+ )
+}
+
+// DeepCopy_v1beta1_ClusterRole is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ClusterRole(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ClusterRole)
+ out := out.(*ClusterRole)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]PolicyRule, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_PolicyRule(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ClusterRoleBinding is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ClusterRoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ClusterRoleBinding)
+ out := out.(*ClusterRoleBinding)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Subjects != nil {
+ in, out := &in.Subjects, &out.Subjects
+ *out = make([]Subject, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ClusterRoleBindingList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ClusterRoleBindingList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ClusterRoleBindingList)
+ out := out.(*ClusterRoleBindingList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ClusterRoleBinding, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_ClusterRoleBinding(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_ClusterRoleList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_ClusterRoleList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ClusterRoleList)
+ out := out.(*ClusterRoleList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ClusterRole, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_ClusterRole(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_PolicyRule is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_PolicyRule(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PolicyRule)
+ out := out.(*PolicyRule)
+ *out = *in
+ if in.Verbs != nil {
+ in, out := &in.Verbs, &out.Verbs
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.APIGroups != nil {
+ in, out := &in.APIGroups, &out.APIGroups
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Resources != nil {
+ in, out := &in.Resources, &out.Resources
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.ResourceNames != nil {
+ in, out := &in.ResourceNames, &out.ResourceNames
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.NonResourceURLs != nil {
+ in, out := &in.NonResourceURLs, &out.NonResourceURLs
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_Role is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_Role(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Role)
+ out := out.(*Role)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]PolicyRule, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_PolicyRule(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_RoleBinding is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_RoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RoleBinding)
+ out := out.(*RoleBinding)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Subjects != nil {
+ in, out := &in.Subjects, &out.Subjects
+ *out = make([]Subject, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_RoleBindingList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_RoleBindingList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RoleBindingList)
+ out := out.(*RoleBindingList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]RoleBinding, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_RoleBinding(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_RoleList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_RoleList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RoleList)
+ out := out.(*RoleList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Role, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_Role(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_RoleRef is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_RoleRef(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RoleRef)
+ out := out.(*RoleRef)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_Subject is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_Subject(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Subject)
+ out := out.(*Subject)
+ *out = *in
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/zz_generated.defaults.go
new file mode 100644
index 000000000..fa5bfb6ab
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/zz_generated.defaults.go
@@ -0,0 +1,66 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ scheme.AddTypeDefaultingFunc(&ClusterRoleBinding{}, func(obj interface{}) { SetObjectDefaults_ClusterRoleBinding(obj.(*ClusterRoleBinding)) })
+ scheme.AddTypeDefaultingFunc(&ClusterRoleBindingList{}, func(obj interface{}) { SetObjectDefaults_ClusterRoleBindingList(obj.(*ClusterRoleBindingList)) })
+ scheme.AddTypeDefaultingFunc(&RoleBinding{}, func(obj interface{}) { SetObjectDefaults_RoleBinding(obj.(*RoleBinding)) })
+ scheme.AddTypeDefaultingFunc(&RoleBindingList{}, func(obj interface{}) { SetObjectDefaults_RoleBindingList(obj.(*RoleBindingList)) })
+ return nil
+}
+
+func SetObjectDefaults_ClusterRoleBinding(in *ClusterRoleBinding) {
+ SetDefaults_ClusterRoleBinding(in)
+ for i := range in.Subjects {
+ a := &in.Subjects[i]
+ SetDefaults_Subject(a)
+ }
+}
+
+func SetObjectDefaults_ClusterRoleBindingList(in *ClusterRoleBindingList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_ClusterRoleBinding(a)
+ }
+}
+
+func SetObjectDefaults_RoleBinding(in *RoleBinding) {
+ SetDefaults_RoleBinding(in)
+ for i := range in.Subjects {
+ a := &in.Subjects[i]
+ SetDefaults_Subject(a)
+ }
+}
+
+func SetObjectDefaults_RoleBindingList(in *RoleBindingList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_RoleBinding(a)
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/zz_generated.deepcopy.go
new file mode 100644
index 000000000..ed8507e7f
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/zz_generated.deepcopy.go
@@ -0,0 +1,269 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package rbac
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_ClusterRole, InType: reflect.TypeOf(&ClusterRole{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_ClusterRoleBinding, InType: reflect.TypeOf(&ClusterRoleBinding{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_ClusterRoleBindingList, InType: reflect.TypeOf(&ClusterRoleBindingList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_ClusterRoleList, InType: reflect.TypeOf(&ClusterRoleList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_PolicyRule, InType: reflect.TypeOf(&PolicyRule{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_Role, InType: reflect.TypeOf(&Role{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_RoleBinding, InType: reflect.TypeOf(&RoleBinding{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_RoleBindingList, InType: reflect.TypeOf(&RoleBindingList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_RoleList, InType: reflect.TypeOf(&RoleList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_RoleRef, InType: reflect.TypeOf(&RoleRef{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_rbac_Subject, InType: reflect.TypeOf(&Subject{})},
+ )
+}
+
+// DeepCopy_rbac_ClusterRole is an autogenerated deepcopy function.
+func DeepCopy_rbac_ClusterRole(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ClusterRole)
+ out := out.(*ClusterRole)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]PolicyRule, len(*in))
+ for i := range *in {
+ if err := DeepCopy_rbac_PolicyRule(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_rbac_ClusterRoleBinding is an autogenerated deepcopy function.
+func DeepCopy_rbac_ClusterRoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ClusterRoleBinding)
+ out := out.(*ClusterRoleBinding)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Subjects != nil {
+ in, out := &in.Subjects, &out.Subjects
+ *out = make([]Subject, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_rbac_ClusterRoleBindingList is an autogenerated deepcopy function.
+func DeepCopy_rbac_ClusterRoleBindingList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ClusterRoleBindingList)
+ out := out.(*ClusterRoleBindingList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ClusterRoleBinding, len(*in))
+ for i := range *in {
+ if err := DeepCopy_rbac_ClusterRoleBinding(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_rbac_ClusterRoleList is an autogenerated deepcopy function.
+func DeepCopy_rbac_ClusterRoleList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*ClusterRoleList)
+ out := out.(*ClusterRoleList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]ClusterRole, len(*in))
+ for i := range *in {
+ if err := DeepCopy_rbac_ClusterRole(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_rbac_PolicyRule is an autogenerated deepcopy function.
+func DeepCopy_rbac_PolicyRule(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PolicyRule)
+ out := out.(*PolicyRule)
+ *out = *in
+ if in.Verbs != nil {
+ in, out := &in.Verbs, &out.Verbs
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.APIGroups != nil {
+ in, out := &in.APIGroups, &out.APIGroups
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.Resources != nil {
+ in, out := &in.Resources, &out.Resources
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.ResourceNames != nil {
+ in, out := &in.ResourceNames, &out.ResourceNames
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ if in.NonResourceURLs != nil {
+ in, out := &in.NonResourceURLs, &out.NonResourceURLs
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_rbac_Role is an autogenerated deepcopy function.
+func DeepCopy_rbac_Role(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Role)
+ out := out.(*Role)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Rules != nil {
+ in, out := &in.Rules, &out.Rules
+ *out = make([]PolicyRule, len(*in))
+ for i := range *in {
+ if err := DeepCopy_rbac_PolicyRule(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_rbac_RoleBinding is an autogenerated deepcopy function.
+func DeepCopy_rbac_RoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RoleBinding)
+ out := out.(*RoleBinding)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Subjects != nil {
+ in, out := &in.Subjects, &out.Subjects
+ *out = make([]Subject, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
+
+// DeepCopy_rbac_RoleBindingList is an autogenerated deepcopy function.
+func DeepCopy_rbac_RoleBindingList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RoleBindingList)
+ out := out.(*RoleBindingList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]RoleBinding, len(*in))
+ for i := range *in {
+ if err := DeepCopy_rbac_RoleBinding(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_rbac_RoleList is an autogenerated deepcopy function.
+func DeepCopy_rbac_RoleList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RoleList)
+ out := out.(*RoleList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Role, len(*in))
+ for i := range *in {
+ if err := DeepCopy_rbac_Role(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_rbac_RoleRef is an autogenerated deepcopy function.
+func DeepCopy_rbac_RoleRef(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*RoleRef)
+ out := out.(*RoleRef)
+ *out = *in
+ return nil
+ }
+}
+
+// DeepCopy_rbac_Subject is an autogenerated deepcopy function.
+func DeepCopy_rbac_Subject(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*Subject)
+ out := out.(*Subject)
+ *out = *in
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/settings/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/settings/doc.go
new file mode 100644
index 000000000..292cb6b24
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/settings/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +groupName=settings.k8s.io
+package settings // import "k8s.io/kubernetes/pkg/apis/settings"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/settings/install/install.go b/vendor/k8s.io/kubernetes/pkg/apis/settings/install/install.go
new file mode 100644
index 000000000..105a78d86
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/settings/install/install.go
@@ -0,0 +1,49 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package install installs the settings API group, making it available as
+// an option to all of the API encoding/decoding machinery.
+package install
+
+import (
+ "k8s.io/apimachinery/pkg/apimachinery/announced"
+ "k8s.io/apimachinery/pkg/apimachinery/registered"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/settings"
+ "k8s.io/kubernetes/pkg/apis/settings/v1alpha1"
+)
+
+func init() {
+ Install(api.GroupFactoryRegistry, api.Registry, api.Scheme)
+}
+
+// Install registers the API group and adds types to a scheme
+func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
+ if err := announced.NewGroupMetaFactory(
+ &announced.GroupMetaFactoryArgs{
+ GroupName: settings.GroupName,
+ VersionPreferenceOrder: []string{v1alpha1.SchemeGroupVersion.Version},
+ ImportPrefix: "k8s.io/kubernetes/pkg/apis/settings",
+ AddInternalObjectsToScheme: settings.AddToScheme,
+ },
+ announced.VersionToSchemeFunc{
+ v1alpha1.SchemeGroupVersion.Version: v1alpha1.AddToScheme,
+ },
+ ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil {
+ panic(err)
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/settings/register.go b/vendor/k8s.io/kubernetes/pkg/apis/settings/register.go
new file mode 100644
index 000000000..858470127
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/settings/register.go
@@ -0,0 +1,52 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package settings
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+// GroupName is the group name use in this package
+const GroupName = "settings.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &PodPreset{},
+ &PodPresetList{},
+ )
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/settings/types.go b/vendor/k8s.io/kubernetes/pkg/apis/settings/types.go
new file mode 100644
index 000000000..b6d692e78
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/settings/types.go
@@ -0,0 +1,63 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package settings
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/kubernetes/pkg/api"
+)
+
+// +genclient=true
+
+// PodPreset is a policy resource that defines additional runtime
+// requirements for a Pod.
+type PodPreset struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // +optional
+ Spec PodPresetSpec
+}
+
+// PodPresetSpec is a description of a pod preset.
+type PodPresetSpec struct {
+ // Selector is a label query over a set of resources, in this case pods.
+ // Required.
+ Selector metav1.LabelSelector
+ // Env defines the collection of EnvVar to inject into containers.
+ // +optional
+ Env []api.EnvVar
+ // EnvFrom defines the collection of EnvFromSource to inject into containers.
+ // +optional
+ EnvFrom []api.EnvFromSource
+ // Volumes defines the collection of Volume to inject into the pod.
+ // +optional
+ Volumes []api.Volume
+ // VolumeMounts defines the collection of VolumeMount to inject into containers.
+ // +optional
+ VolumeMounts []api.VolumeMount
+}
+
+// PodPresetList is a list of PodPreset objects.
+type PodPresetList struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ListMeta
+
+ Items []PodPreset
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/doc.go
new file mode 100644
index 000000000..df04c846b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/doc.go
@@ -0,0 +1,23 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/settings
+// +k8s:openapi-gen=true
+// +k8s:defaulter-gen=TypeMeta
+
+// +groupName=settings.k8s.io
+package v1alpha1 // import "k8s.io/kubernetes/pkg/apis/settings/v1alpha1"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/generated.pb.go
new file mode 100644
index 000000000..1bcec6573
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/generated.pb.go
@@ -0,0 +1,929 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/settings/v1alpha1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1alpha1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/settings/v1alpha1/generated.proto
+
+ It has these top-level messages:
+ PodPreset
+ PodPresetList
+ PodPresetSpec
+*/
+package v1alpha1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import k8s_io_kubernetes_pkg_api_v1 "k8s.io/kubernetes/pkg/api/v1"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *PodPreset) Reset() { *m = PodPreset{} }
+func (*PodPreset) ProtoMessage() {}
+func (*PodPreset) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *PodPresetList) Reset() { *m = PodPresetList{} }
+func (*PodPresetList) ProtoMessage() {}
+func (*PodPresetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func (m *PodPresetSpec) Reset() { *m = PodPresetSpec{} }
+func (*PodPresetSpec) ProtoMessage() {}
+func (*PodPresetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
+
+func init() {
+ proto.RegisterType((*PodPreset)(nil), "k8s.io.kubernetes.pkg.apis.settings.v1alpha1.PodPreset")
+ proto.RegisterType((*PodPresetList)(nil), "k8s.io.kubernetes.pkg.apis.settings.v1alpha1.PodPresetList")
+ proto.RegisterType((*PodPresetSpec)(nil), "k8s.io.kubernetes.pkg.apis.settings.v1alpha1.PodPresetSpec")
+}
+func (m *PodPreset) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodPreset) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
+ n2, err := m.Spec.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ return i, nil
+}
+
+func (m *PodPresetList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodPresetList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n3, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *PodPresetSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodPresetSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size()))
+ n4, err := m.Selector.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n4
+ if len(m.Env) > 0 {
+ for _, msg := range m.Env {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.EnvFrom) > 0 {
+ for _, msg := range m.EnvFrom {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Volumes) > 0 {
+ for _, msg := range m.Volumes {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.VolumeMounts) > 0 {
+ for _, msg := range m.VolumeMounts {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *PodPreset) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = m.Spec.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ return n
+}
+
+func (m *PodPresetList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PodPresetSpec) Size() (n int) {
+ var l int
+ _ = l
+ l = m.Selector.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Env) > 0 {
+ for _, e := range m.Env {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.EnvFrom) > 0 {
+ for _, e := range m.EnvFrom {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.Volumes) > 0 {
+ for _, e := range m.Volumes {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ if len(m.VolumeMounts) > 0 {
+ for _, e := range m.VolumeMounts {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *PodPreset) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodPreset{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodPresetSpec", "PodPresetSpec", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodPresetList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodPresetList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PodPreset", "PodPreset", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodPresetSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodPresetSpec{`,
+ `Selector:` + strings.Replace(strings.Replace(this.Selector.String(), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1), `&`, ``, 1) + `,`,
+ `Env:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Env), "EnvVar", "k8s_io_kubernetes_pkg_api_v1.EnvVar", 1), `&`, ``, 1) + `,`,
+ `EnvFrom:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.EnvFrom), "EnvFromSource", "k8s_io_kubernetes_pkg_api_v1.EnvFromSource", 1), `&`, ``, 1) + `,`,
+ `Volumes:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Volumes), "Volume", "k8s_io_kubernetes_pkg_api_v1.Volume", 1), `&`, ``, 1) + `,`,
+ `VolumeMounts:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VolumeMounts), "VolumeMount", "k8s_io_kubernetes_pkg_api_v1.VolumeMount", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *PodPreset) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodPreset: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodPreset: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodPresetList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodPresetList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodPresetList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, PodPreset{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodPresetSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodPresetSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodPresetSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Env = append(m.Env, k8s_io_kubernetes_pkg_api_v1.EnvVar{})
+ if err := m.Env[len(m.Env)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field EnvFrom", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.EnvFrom = append(m.EnvFrom, k8s_io_kubernetes_pkg_api_v1.EnvFromSource{})
+ if err := m.EnvFrom[len(m.EnvFrom)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Volumes = append(m.Volumes, k8s_io_kubernetes_pkg_api_v1.Volume{})
+ if err := m.Volumes[len(m.Volumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VolumeMounts", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VolumeMounts = append(m.VolumeMounts, k8s_io_kubernetes_pkg_api_v1.VolumeMount{})
+ if err := m.VolumeMounts[len(m.VolumeMounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/kubernetes/pkg/apis/settings/v1alpha1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 538 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0x41, 0x8b, 0xd3, 0x40,
+ 0x14, 0xc7, 0x9b, 0xed, 0x96, 0xd6, 0x69, 0x17, 0x25, 0x78, 0x08, 0x3d, 0x64, 0x97, 0xe2, 0x61,
+ 0xc5, 0x75, 0x62, 0x57, 0x51, 0x41, 0x4f, 0x91, 0x15, 0x04, 0x97, 0x5d, 0x52, 0xe8, 0x41, 0x56,
+ 0x70, 0x9a, 0x3e, 0xd3, 0xd8, 0x26, 0x13, 0x66, 0x26, 0x01, 0x6f, 0x7e, 0x04, 0xbf, 0x94, 0x50,
+ 0xd0, 0xc3, 0x1e, 0xf7, 0xb4, 0xd8, 0xf8, 0x45, 0x64, 0x26, 0x93, 0xa6, 0x52, 0xcb, 0x56, 0x6f,
+ 0xf3, 0x1e, 0xef, 0xff, 0x7b, 0xff, 0xff, 0x4b, 0xd0, 0xcb, 0xe9, 0x73, 0x8e, 0x43, 0xea, 0x4c,
+ 0xd3, 0x11, 0xb0, 0x18, 0x04, 0x70, 0x27, 0x99, 0x06, 0x0e, 0x49, 0x42, 0xee, 0x70, 0x10, 0x22,
+ 0x8c, 0x03, 0xee, 0x64, 0x7d, 0x32, 0x4b, 0x26, 0xa4, 0xef, 0x04, 0x10, 0x03, 0x23, 0x02, 0xc6,
+ 0x38, 0x61, 0x54, 0x50, 0xf3, 0xa8, 0x50, 0xe3, 0x4a, 0x8d, 0x93, 0x69, 0x80, 0xa5, 0x1a, 0x97,
+ 0x6a, 0x5c, 0xaa, 0xbb, 0x0f, 0x83, 0x50, 0x4c, 0xd2, 0x11, 0xf6, 0x69, 0xe4, 0x04, 0x34, 0xa0,
+ 0x8e, 0x82, 0x8c, 0xd2, 0x8f, 0xaa, 0x52, 0x85, 0x7a, 0x15, 0xf0, 0xee, 0x13, 0x6d, 0x8d, 0x24,
+ 0x61, 0x44, 0xfc, 0x49, 0x18, 0x03, 0xfb, 0x5c, 0x99, 0x8b, 0x40, 0x10, 0x27, 0x5b, 0xb3, 0xd4,
+ 0x75, 0x36, 0xa9, 0x58, 0x1a, 0x8b, 0x30, 0x82, 0x35, 0xc1, 0xd3, 0x9b, 0x04, 0xdc, 0x9f, 0x40,
+ 0x44, 0xd6, 0x74, 0x47, 0x1b, 0x2f, 0xf7, 0x17, 0x5b, 0xbd, 0x1f, 0x06, 0xba, 0x75, 0x4e, 0xc7,
+ 0xe7, 0x0c, 0x38, 0x08, 0xf3, 0x03, 0x6a, 0x49, 0xff, 0x63, 0x22, 0x88, 0x65, 0x1c, 0x18, 0x87,
+ 0xed, 0xe3, 0x47, 0x58, 0x9f, 0x72, 0xd5, 0x46, 0x75, 0x4c, 0x39, 0x8d, 0xb3, 0x3e, 0x3e, 0x1b,
+ 0x7d, 0x02, 0x5f, 0x9c, 0x82, 0x20, 0xae, 0x39, 0xbf, 0xde, 0xaf, 0xe5, 0xd7, 0xfb, 0xa8, 0xea,
+ 0x79, 0x4b, 0xaa, 0xf9, 0x1e, 0xed, 0xf2, 0x04, 0x7c, 0x6b, 0x47, 0xd1, 0x5f, 0xe0, 0x7f, 0xf9,
+ 0x50, 0x78, 0x69, 0x74, 0x90, 0x80, 0xef, 0x76, 0xf4, 0xa2, 0x5d, 0x59, 0x79, 0x0a, 0xdb, 0xfb,
+ 0x6e, 0xa0, 0xbd, 0xe5, 0xd4, 0xdb, 0x90, 0x0b, 0xf3, 0x62, 0x2d, 0x12, 0xde, 0x2e, 0x92, 0x54,
+ 0xab, 0x40, 0x77, 0xf4, 0x9e, 0x56, 0xd9, 0x59, 0x89, 0x73, 0x81, 0x1a, 0xa1, 0x80, 0x88, 0x5b,
+ 0x3b, 0x07, 0xf5, 0xc3, 0xf6, 0xf1, 0xb3, 0xff, 0xcc, 0xe3, 0xee, 0xe9, 0x1d, 0x8d, 0x37, 0x92,
+ 0xe6, 0x15, 0xd0, 0xde, 0xb7, 0xfa, 0x4a, 0x1a, 0x99, 0xd2, 0x24, 0xa8, 0xc5, 0x61, 0x06, 0xbe,
+ 0xa0, 0x4c, 0xa7, 0x79, 0xbc, 0x65, 0x1a, 0x32, 0x82, 0xd9, 0x40, 0x4b, 0xab, 0x48, 0x65, 0xc7,
+ 0x5b, 0x62, 0xcd, 0x57, 0xa8, 0x0e, 0x71, 0xa6, 0x03, 0xdd, 0xdb, 0x1c, 0x48, 0x52, 0x4f, 0xe2,
+ 0x6c, 0x48, 0x98, 0xdb, 0xd6, 0xb8, 0xfa, 0x49, 0x9c, 0x79, 0x52, 0x6d, 0x0e, 0x51, 0x13, 0xe2,
+ 0xec, 0x35, 0xa3, 0x91, 0x55, 0x57, 0xa0, 0x07, 0x37, 0x82, 0xe4, 0xf0, 0x80, 0xa6, 0xcc, 0x07,
+ 0xf7, 0xb6, 0xe6, 0x35, 0x75, 0xdb, 0x2b, 0x61, 0xe6, 0x19, 0x6a, 0x66, 0x74, 0x96, 0x46, 0xc0,
+ 0xad, 0xdd, 0x6d, 0x0c, 0x0e, 0xd5, 0x70, 0x05, 0x2c, 0x6a, 0xee, 0x95, 0x14, 0xd3, 0x47, 0x9d,
+ 0xe2, 0x79, 0x4a, 0xd3, 0x58, 0x70, 0xab, 0xa1, 0xa8, 0xf7, 0xb7, 0xa1, 0x2a, 0x85, 0x7b, 0x57,
+ 0xa3, 0x3b, 0x2b, 0x4d, 0xee, 0xfd, 0x01, 0x75, 0xf1, 0x7c, 0x61, 0xd7, 0x2e, 0x17, 0x76, 0xed,
+ 0x6a, 0x61, 0xd7, 0xbe, 0xe4, 0xb6, 0x31, 0xcf, 0x6d, 0xe3, 0x32, 0xb7, 0x8d, 0xab, 0xdc, 0x36,
+ 0x7e, 0xe6, 0xb6, 0xf1, 0xf5, 0x97, 0x5d, 0x7b, 0xd7, 0x2a, 0xff, 0x8b, 0xdf, 0x01, 0x00, 0x00,
+ 0xff, 0xff, 0x80, 0x75, 0x96, 0xb8, 0xfd, 0x04, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/generated.proto
new file mode 100644
index 000000000..0eea07c9e
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/generated.proto
@@ -0,0 +1,75 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.pkg.apis.settings.v1alpha1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1alpha1";
+
+// PodPreset is a policy resource that defines additional runtime
+// requirements for a Pod.
+message PodPreset {
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // +optional
+ optional PodPresetSpec spec = 2;
+}
+
+// PodPresetList is a list of PodPreset objects.
+message PodPresetList {
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is a list of schema objects.
+ repeated PodPreset items = 2;
+}
+
+// PodPresetSpec is a description of a pod preset.
+message PodPresetSpec {
+ // Selector is a label query over a set of resources, in this case pods.
+ // Required.
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 1;
+
+ // Env defines the collection of EnvVar to inject into containers.
+ // +optional
+ repeated k8s.io.kubernetes.pkg.api.v1.EnvVar env = 2;
+
+ // EnvFrom defines the collection of EnvFromSource to inject into containers.
+ // +optional
+ repeated k8s.io.kubernetes.pkg.api.v1.EnvFromSource envFrom = 3;
+
+ // Volumes defines the collection of Volume to inject into the pod.
+ // +optional
+ repeated k8s.io.kubernetes.pkg.api.v1.Volume volumes = 4;
+
+ // VolumeMounts defines the collection of VolumeMount to inject into containers.
+ // +optional
+ repeated k8s.io.kubernetes.pkg.api.v1.VolumeMount volumeMounts = 5;
+}
+
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/register.go
new file mode 100644
index 000000000..ddcd2259c
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/register.go
@@ -0,0 +1,59 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "settings.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, RegisterDefaults)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &PodPreset{},
+ &PodPresetList{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/types.go
new file mode 100644
index 000000000..6e3cf4604
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/types.go
@@ -0,0 +1,67 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/kubernetes/pkg/api/v1"
+)
+
+// +genclient=true
+
+// PodPreset is a policy resource that defines additional runtime
+// requirements for a Pod.
+type PodPreset struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // +optional
+ Spec PodPresetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
+}
+
+// PodPresetSpec is a description of a pod preset.
+type PodPresetSpec struct {
+ // Selector is a label query over a set of resources, in this case pods.
+ // Required.
+ Selector metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,1,opt,name=selector"`
+
+ // Env defines the collection of EnvVar to inject into containers.
+ // +optional
+ Env []v1.EnvVar `json:"env,omitempty" protobuf:"bytes,2,rep,name=env"`
+ // EnvFrom defines the collection of EnvFromSource to inject into containers.
+ // +optional
+ EnvFrom []v1.EnvFromSource `json:"envFrom,omitempty" protobuf:"bytes,3,rep,name=envFrom"`
+ // Volumes defines the collection of Volume to inject into the pod.
+ // +optional
+ Volumes []v1.Volume `json:"volumes,omitempty" protobuf:"bytes,4,rep,name=volumes"`
+ // VolumeMounts defines the collection of VolumeMount to inject into containers.
+ // +optional
+ VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty" protobuf:"bytes,5,rep,name=volumeMounts"`
+}
+
+// PodPresetList is a list of PodPreset objects.
+type PodPresetList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is a list of schema objects.
+ Items []PodPreset `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..2a89e5566
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/types_swagger_doc_generated.go
@@ -0,0 +1,61 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_PodPreset = map[string]string{
+ "": "PodPreset is a policy resource that defines additional runtime requirements for a Pod.",
+}
+
+func (PodPreset) SwaggerDoc() map[string]string {
+ return map_PodPreset
+}
+
+var map_PodPresetList = map[string]string{
+ "": "PodPresetList is a list of PodPreset objects.",
+ "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "items": "Items is a list of schema objects.",
+}
+
+func (PodPresetList) SwaggerDoc() map[string]string {
+ return map_PodPresetList
+}
+
+var map_PodPresetSpec = map[string]string{
+ "": "PodPresetSpec is a description of a pod preset.",
+ "selector": "Selector is a label query over a set of resources, in this case pods. Required.",
+ "env": "Env defines the collection of EnvVar to inject into containers.",
+ "envFrom": "EnvFrom defines the collection of EnvFromSource to inject into containers.",
+ "volumes": "Volumes defines the collection of Volume to inject into the pod.",
+ "volumeMounts": "VolumeMounts defines the collection of VolumeMount to inject into containers.",
+}
+
+func (PodPresetSpec) SwaggerDoc() map[string]string {
+ return map_PodPresetSpec
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/zz_generated.conversion.go
new file mode 100644
index 000000000..bb25b2513
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/zz_generated.conversion.go
@@ -0,0 +1,165 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1alpha1
+
+import (
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api "k8s.io/kubernetes/pkg/api"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ settings "k8s.io/kubernetes/pkg/apis/settings"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1alpha1_PodPreset_To_settings_PodPreset,
+ Convert_settings_PodPreset_To_v1alpha1_PodPreset,
+ Convert_v1alpha1_PodPresetList_To_settings_PodPresetList,
+ Convert_settings_PodPresetList_To_v1alpha1_PodPresetList,
+ Convert_v1alpha1_PodPresetSpec_To_settings_PodPresetSpec,
+ Convert_settings_PodPresetSpec_To_v1alpha1_PodPresetSpec,
+ )
+}
+
+func autoConvert_v1alpha1_PodPreset_To_settings_PodPreset(in *PodPreset, out *settings.PodPreset, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_v1alpha1_PodPresetSpec_To_settings_PodPresetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_v1alpha1_PodPreset_To_settings_PodPreset is an autogenerated conversion function.
+func Convert_v1alpha1_PodPreset_To_settings_PodPreset(in *PodPreset, out *settings.PodPreset, s conversion.Scope) error {
+ return autoConvert_v1alpha1_PodPreset_To_settings_PodPreset(in, out, s)
+}
+
+func autoConvert_settings_PodPreset_To_v1alpha1_PodPreset(in *settings.PodPreset, out *PodPreset, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ if err := Convert_settings_PodPresetSpec_To_v1alpha1_PodPresetSpec(&in.Spec, &out.Spec, s); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Convert_settings_PodPreset_To_v1alpha1_PodPreset is an autogenerated conversion function.
+func Convert_settings_PodPreset_To_v1alpha1_PodPreset(in *settings.PodPreset, out *PodPreset, s conversion.Scope) error {
+ return autoConvert_settings_PodPreset_To_v1alpha1_PodPreset(in, out, s)
+}
+
+func autoConvert_v1alpha1_PodPresetList_To_settings_PodPresetList(in *PodPresetList, out *settings.PodPresetList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]settings.PodPreset, len(*in))
+ for i := range *in {
+ if err := Convert_v1alpha1_PodPreset_To_settings_PodPreset(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = nil
+ }
+ return nil
+}
+
+// Convert_v1alpha1_PodPresetList_To_settings_PodPresetList is an autogenerated conversion function.
+func Convert_v1alpha1_PodPresetList_To_settings_PodPresetList(in *PodPresetList, out *settings.PodPresetList, s conversion.Scope) error {
+ return autoConvert_v1alpha1_PodPresetList_To_settings_PodPresetList(in, out, s)
+}
+
+func autoConvert_settings_PodPresetList_To_v1alpha1_PodPresetList(in *settings.PodPresetList, out *PodPresetList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodPreset, len(*in))
+ for i := range *in {
+ if err := Convert_settings_PodPreset_To_v1alpha1_PodPreset(&(*in)[i], &(*out)[i], s); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Items = make([]PodPreset, 0)
+ }
+ return nil
+}
+
+// Convert_settings_PodPresetList_To_v1alpha1_PodPresetList is an autogenerated conversion function.
+func Convert_settings_PodPresetList_To_v1alpha1_PodPresetList(in *settings.PodPresetList, out *PodPresetList, s conversion.Scope) error {
+ return autoConvert_settings_PodPresetList_To_v1alpha1_PodPresetList(in, out, s)
+}
+
+func autoConvert_v1alpha1_PodPresetSpec_To_settings_PodPresetSpec(in *PodPresetSpec, out *settings.PodPresetSpec, s conversion.Scope) error {
+ out.Selector = in.Selector
+ out.Env = *(*[]api.EnvVar)(unsafe.Pointer(&in.Env))
+ out.EnvFrom = *(*[]api.EnvFromSource)(unsafe.Pointer(&in.EnvFrom))
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]api.Volume, len(*in))
+ for i := range *in {
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&(*in)[i], &(*out)[i], 0); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Volumes = nil
+ }
+ out.VolumeMounts = *(*[]api.VolumeMount)(unsafe.Pointer(&in.VolumeMounts))
+ return nil
+}
+
+// Convert_v1alpha1_PodPresetSpec_To_settings_PodPresetSpec is an autogenerated conversion function.
+func Convert_v1alpha1_PodPresetSpec_To_settings_PodPresetSpec(in *PodPresetSpec, out *settings.PodPresetSpec, s conversion.Scope) error {
+ return autoConvert_v1alpha1_PodPresetSpec_To_settings_PodPresetSpec(in, out, s)
+}
+
+func autoConvert_settings_PodPresetSpec_To_v1alpha1_PodPresetSpec(in *settings.PodPresetSpec, out *PodPresetSpec, s conversion.Scope) error {
+ out.Selector = in.Selector
+ out.Env = *(*[]v1.EnvVar)(unsafe.Pointer(&in.Env))
+ out.EnvFrom = *(*[]v1.EnvFromSource)(unsafe.Pointer(&in.EnvFrom))
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]v1.Volume, len(*in))
+ for i := range *in {
+ // TODO: Inefficient conversion - can we improve it?
+ if err := s.Convert(&(*in)[i], &(*out)[i], 0); err != nil {
+ return err
+ }
+ }
+ } else {
+ out.Volumes = nil
+ }
+ out.VolumeMounts = *(*[]v1.VolumeMount)(unsafe.Pointer(&in.VolumeMounts))
+ return nil
+}
+
+// Convert_settings_PodPresetSpec_To_v1alpha1_PodPresetSpec is an autogenerated conversion function.
+func Convert_settings_PodPresetSpec_To_v1alpha1_PodPresetSpec(in *settings.PodPresetSpec, out *PodPresetSpec, s conversion.Scope) error {
+ return autoConvert_settings_PodPresetSpec_To_v1alpha1_PodPresetSpec(in, out, s)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..ee404e015
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/zz_generated.deepcopy.go
@@ -0,0 +1,127 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api_v1 "k8s.io/kubernetes/pkg/api/v1"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PodPreset, InType: reflect.TypeOf(&PodPreset{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PodPresetList, InType: reflect.TypeOf(&PodPresetList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_PodPresetSpec, InType: reflect.TypeOf(&PodPresetSpec{})},
+ )
+}
+
+// DeepCopy_v1alpha1_PodPreset is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_PodPreset(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodPreset)
+ out := out.(*PodPreset)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_v1alpha1_PodPresetSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_PodPresetList is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_PodPresetList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodPresetList)
+ out := out.(*PodPresetList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodPreset, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1alpha1_PodPreset(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1alpha1_PodPresetSpec is an autogenerated deepcopy function.
+func DeepCopy_v1alpha1_PodPresetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodPresetSpec)
+ out := out.(*PodPresetSpec)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.Selector); err != nil {
+ return err
+ } else {
+ out.Selector = *newVal.(*v1.LabelSelector)
+ }
+ if in.Env != nil {
+ in, out := &in.Env, &out.Env
+ *out = make([]api_v1.EnvVar, len(*in))
+ for i := range *in {
+ if err := api_v1.DeepCopy_v1_EnvVar(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.EnvFrom != nil {
+ in, out := &in.EnvFrom, &out.EnvFrom
+ *out = make([]api_v1.EnvFromSource, len(*in))
+ for i := range *in {
+ if err := api_v1.DeepCopy_v1_EnvFromSource(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]api_v1.Volume, len(*in))
+ for i := range *in {
+ if err := api_v1.DeepCopy_v1_Volume(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.VolumeMounts != nil {
+ in, out := &in.VolumeMounts, &out.VolumeMounts
+ *out = make([]api_v1.VolumeMount, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/zz_generated.defaults.go
new file mode 100644
index 000000000..6e117b33a
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/settings/v1alpha1/zz_generated.defaults.go
@@ -0,0 +1,98 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1alpha1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ scheme.AddTypeDefaultingFunc(&PodPreset{}, func(obj interface{}) { SetObjectDefaults_PodPreset(obj.(*PodPreset)) })
+ scheme.AddTypeDefaultingFunc(&PodPresetList{}, func(obj interface{}) { SetObjectDefaults_PodPresetList(obj.(*PodPresetList)) })
+ return nil
+}
+
+func SetObjectDefaults_PodPreset(in *PodPreset) {
+ for i := range in.Spec.Env {
+ a := &in.Spec.Env[i]
+ if a.ValueFrom != nil {
+ if a.ValueFrom.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(a.ValueFrom.FieldRef)
+ }
+ }
+ }
+ for i := range in.Spec.Volumes {
+ a := &in.Spec.Volumes[i]
+ v1.SetDefaults_Volume(a)
+ if a.VolumeSource.Secret != nil {
+ v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
+ }
+ if a.VolumeSource.ISCSI != nil {
+ v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
+ }
+ if a.VolumeSource.RBD != nil {
+ v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
+ }
+ if a.VolumeSource.DownwardAPI != nil {
+ v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
+ for j := range a.VolumeSource.DownwardAPI.Items {
+ b := &a.VolumeSource.DownwardAPI.Items[j]
+ if b.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(b.FieldRef)
+ }
+ }
+ }
+ if a.VolumeSource.ConfigMap != nil {
+ v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
+ }
+ if a.VolumeSource.AzureDisk != nil {
+ v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
+ }
+ if a.VolumeSource.Projected != nil {
+ v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
+ for j := range a.VolumeSource.Projected.Sources {
+ b := &a.VolumeSource.Projected.Sources[j]
+ if b.DownwardAPI != nil {
+ for k := range b.DownwardAPI.Items {
+ c := &b.DownwardAPI.Items[k]
+ if c.FieldRef != nil {
+ v1.SetDefaults_ObjectFieldSelector(c.FieldRef)
+ }
+ }
+ }
+ }
+ }
+ if a.VolumeSource.ScaleIO != nil {
+ v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO)
+ }
+ }
+}
+
+func SetObjectDefaults_PodPresetList(in *PodPresetList) {
+ for i := range in.Items {
+ a := &in.Items[i]
+ SetObjectDefaults_PodPreset(a)
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/settings/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/settings/zz_generated.deepcopy.go
new file mode 100644
index 000000000..aaab4ef07
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/settings/zz_generated.deepcopy.go
@@ -0,0 +1,127 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package settings
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ api "k8s.io/kubernetes/pkg/api"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_settings_PodPreset, InType: reflect.TypeOf(&PodPreset{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_settings_PodPresetList, InType: reflect.TypeOf(&PodPresetList{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_settings_PodPresetSpec, InType: reflect.TypeOf(&PodPresetSpec{})},
+ )
+}
+
+// DeepCopy_settings_PodPreset is an autogenerated deepcopy function.
+func DeepCopy_settings_PodPreset(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodPreset)
+ out := out.(*PodPreset)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if err := DeepCopy_settings_PodPresetSpec(&in.Spec, &out.Spec, c); err != nil {
+ return err
+ }
+ return nil
+ }
+}
+
+// DeepCopy_settings_PodPresetList is an autogenerated deepcopy function.
+func DeepCopy_settings_PodPresetList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodPresetList)
+ out := out.(*PodPresetList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PodPreset, len(*in))
+ for i := range *in {
+ if err := DeepCopy_settings_PodPreset(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_settings_PodPresetSpec is an autogenerated deepcopy function.
+func DeepCopy_settings_PodPresetSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*PodPresetSpec)
+ out := out.(*PodPresetSpec)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.Selector); err != nil {
+ return err
+ } else {
+ out.Selector = *newVal.(*v1.LabelSelector)
+ }
+ if in.Env != nil {
+ in, out := &in.Env, &out.Env
+ *out = make([]api.EnvVar, len(*in))
+ for i := range *in {
+ if err := api.DeepCopy_api_EnvVar(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.EnvFrom != nil {
+ in, out := &in.EnvFrom, &out.EnvFrom
+ *out = make([]api.EnvFromSource, len(*in))
+ for i := range *in {
+ if err := api.DeepCopy_api_EnvFromSource(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]api.Volume, len(*in))
+ for i := range *in {
+ if err := api.DeepCopy_api_Volume(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ if in.VolumeMounts != nil {
+ in, out := &in.VolumeMounts, &out.VolumeMounts
+ *out = make([]api.VolumeMount, len(*in))
+ copy(*out, *in)
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/doc.go
new file mode 100644
index 000000000..51dbb344c
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +groupName=storage.k8s.io
+package storage // import "k8s.io/kubernetes/pkg/apis/storage"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/install/install.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/install/install.go
new file mode 100644
index 000000000..7b09a34d2
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/install/install.go
@@ -0,0 +1,53 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package install installs the experimental API group, making it available as
+// an option to all of the API encoding/decoding machinery.
+package install
+
+import (
+ "k8s.io/apimachinery/pkg/apimachinery/announced"
+ "k8s.io/apimachinery/pkg/apimachinery/registered"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/util/sets"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/apis/storage"
+ "k8s.io/kubernetes/pkg/apis/storage/v1"
+ "k8s.io/kubernetes/pkg/apis/storage/v1beta1"
+)
+
+func init() {
+ Install(api.GroupFactoryRegistry, api.Registry, api.Scheme)
+}
+
+// Install registers the API group and adds types to a scheme
+func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
+ if err := announced.NewGroupMetaFactory(
+ &announced.GroupMetaFactoryArgs{
+ GroupName: storage.GroupName,
+ VersionPreferenceOrder: []string{v1.SchemeGroupVersion.Version, v1beta1.SchemeGroupVersion.Version},
+ ImportPrefix: "k8s.io/kubernetes/pkg/apis/storage",
+ RootScopedKinds: sets.NewString("StorageClass"),
+ AddInternalObjectsToScheme: storage.AddToScheme,
+ },
+ announced.VersionToSchemeFunc{
+ v1.SchemeGroupVersion.Version: v1.AddToScheme,
+ v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme,
+ },
+ ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil {
+ panic(err)
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/register.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/register.go
new file mode 100644
index 000000000..aaa619b4d
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/register.go
@@ -0,0 +1,51 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package storage
+
+import (
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "storage.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
+
+// Kind takes an unqualified kind and returns a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
+ AddToScheme = SchemeBuilder.AddToScheme
+)
+
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &StorageClass{},
+ &StorageClassList{},
+ )
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/types.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/types.go
new file mode 100644
index 000000000..827e7c666
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/types.go
@@ -0,0 +1,60 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package storage
+
+import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+// +genclient=true
+// +nonNamespaced=true
+
+// StorageClass describes a named "class" of storage offered in a cluster.
+// Different classes might map to quality-of-service levels, or to backup policies,
+// or to arbitrary policies determined by the cluster administrators. Kubernetes
+// itself is unopinionated about what classes represent. This concept is sometimes
+// called "profiles" in other storage systems.
+// The name of a StorageClass object is significant, and is how users can request a particular class.
+type StorageClass struct {
+ metav1.TypeMeta
+ // +optional
+ metav1.ObjectMeta
+
+ // provisioner is the driver expected to handle this StorageClass.
+ // This is an optionally-prefixed name, like a label key.
+ // For example: "kubernetes.io/gce-pd" or "kubernetes.io/aws-ebs".
+ // This value may not be empty.
+ Provisioner string
+
+ // parameters holds parameters for the provisioner.
+ // These values are opaque to the system and are passed directly
+ // to the provisioner. The only validation done on keys is that they are
+ // not empty. The maximum number of parameters is
+ // 512, with a cumulative max size of 256K
+ // +optional
+ Parameters map[string]string
+}
+
+// StorageClassList is a collection of storage classes.
+type StorageClassList struct {
+ metav1.TypeMeta
+ // Standard list metadata
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta
+
+ // Items is the list of StorageClasses
+ Items []StorageClass
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/doc.go
new file mode 100644
index 000000000..32f99daea
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/doc.go
@@ -0,0 +1,22 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/storage
+// +groupName=storage.k8s.io
+// +k8s:openapi-gen=true
+// +k8s:defaulter-gen=TypeMeta
+package v1
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/generated.pb.go
new file mode 100644
index 000000000..1daa21f8a
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/generated.pb.go
@@ -0,0 +1,746 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/storage/v1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/storage/v1/generated.proto
+
+ It has these top-level messages:
+ StorageClass
+ StorageClassList
+*/
+package v1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *StorageClass) Reset() { *m = StorageClass{} }
+func (*StorageClass) ProtoMessage() {}
+func (*StorageClass) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *StorageClassList) Reset() { *m = StorageClassList{} }
+func (*StorageClassList) ProtoMessage() {}
+func (*StorageClassList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func init() {
+ proto.RegisterType((*StorageClass)(nil), "k8s.io.kubernetes.pkg.apis.storage.v1.StorageClass")
+ proto.RegisterType((*StorageClassList)(nil), "k8s.io.kubernetes.pkg.apis.storage.v1.StorageClassList")
+}
+func (m *StorageClass) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StorageClass) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Provisioner)))
+ i += copy(dAtA[i:], m.Provisioner)
+ if len(m.Parameters) > 0 {
+ keysForParameters := make([]string, 0, len(m.Parameters))
+ for k := range m.Parameters {
+ keysForParameters = append(keysForParameters, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForParameters)
+ for _, k := range keysForParameters {
+ dAtA[i] = 0x1a
+ i++
+ v := m.Parameters[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ return i, nil
+}
+
+func (m *StorageClassList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StorageClassList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n2, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *StorageClass) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Provisioner)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Parameters) > 0 {
+ for k, v := range m.Parameters {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *StorageClassList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *StorageClass) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForParameters := make([]string, 0, len(this.Parameters))
+ for k := range this.Parameters {
+ keysForParameters = append(keysForParameters, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForParameters)
+ mapStringForParameters := "map[string]string{"
+ for _, k := range keysForParameters {
+ mapStringForParameters += fmt.Sprintf("%v: %v,", k, this.Parameters[k])
+ }
+ mapStringForParameters += "}"
+ s := strings.Join([]string{`&StorageClass{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Provisioner:` + fmt.Sprintf("%v", this.Provisioner) + `,`,
+ `Parameters:` + mapStringForParameters + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StorageClassList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StorageClassList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "StorageClass", "StorageClass", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *StorageClass) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StorageClass: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StorageClass: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Provisioner", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Provisioner = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Parameters == nil {
+ m.Parameters = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Parameters[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Parameters[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StorageClassList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StorageClassList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StorageClassList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, StorageClass{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/kubernetes/pkg/apis/storage/v1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 460 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x91, 0xcf, 0x6f, 0xd3, 0x30,
+ 0x14, 0xc7, 0xe3, 0x54, 0x95, 0x36, 0x17, 0x44, 0x15, 0x38, 0x54, 0x3d, 0x78, 0xd5, 0x24, 0xa4,
+ 0x5e, 0xb0, 0xe9, 0xc6, 0xd0, 0x84, 0xc4, 0xa5, 0x13, 0x07, 0x24, 0x10, 0x53, 0xb8, 0x20, 0xc4,
+ 0x01, 0xb7, 0x7b, 0xa4, 0x26, 0x4d, 0x1c, 0xd9, 0x2f, 0x41, 0xbd, 0xf1, 0x27, 0xf0, 0x67, 0x55,
+ 0x9c, 0x76, 0xdc, 0x69, 0xd0, 0xf0, 0x8f, 0xa0, 0xfc, 0x60, 0x89, 0x56, 0x26, 0x26, 0x6e, 0x7e,
+ 0xb6, 0x3f, 0x5f, 0xbf, 0xf7, 0x31, 0x3d, 0x0a, 0x8f, 0x2d, 0x57, 0x5a, 0x84, 0xe9, 0x0c, 0x4c,
+ 0x0c, 0x08, 0x56, 0x24, 0x61, 0x20, 0x64, 0xa2, 0xac, 0xb0, 0xa8, 0x8d, 0x0c, 0x40, 0x64, 0x13,
+ 0x11, 0x40, 0x0c, 0x46, 0x22, 0x9c, 0xf1, 0xc4, 0x68, 0xd4, 0xde, 0xc3, 0x0a, 0xe3, 0x0d, 0xc6,
+ 0x93, 0x30, 0xe0, 0x05, 0xc6, 0x6b, 0x8c, 0x67, 0x93, 0xe1, 0xa3, 0x40, 0xe1, 0x22, 0x9d, 0xf1,
+ 0xb9, 0x8e, 0x44, 0xa0, 0x03, 0x2d, 0x4a, 0x7a, 0x96, 0x7e, 0x2a, 0xab, 0xb2, 0x28, 0x57, 0x55,
+ 0xea, 0xf0, 0x49, 0xdd, 0x8c, 0x4c, 0x54, 0x24, 0xe7, 0x0b, 0x15, 0x83, 0x59, 0x35, 0xed, 0x44,
+ 0x80, 0xf2, 0x2f, 0xbd, 0x0c, 0xc5, 0x4d, 0x94, 0x49, 0x63, 0x54, 0x11, 0x6c, 0x01, 0x4f, 0xff,
+ 0x05, 0xd8, 0xf9, 0x02, 0x22, 0xb9, 0xc5, 0x1d, 0xde, 0xc4, 0xa5, 0xa8, 0x96, 0x42, 0xc5, 0x68,
+ 0xd1, 0x5c, 0x87, 0xf6, 0x7f, 0xb8, 0xf4, 0xce, 0xdb, 0xca, 0xc8, 0xc9, 0x52, 0x5a, 0xeb, 0x7d,
+ 0xa4, 0x3b, 0xc5, 0x24, 0x67, 0x12, 0xe5, 0x80, 0x8c, 0xc8, 0xb8, 0x77, 0xf0, 0x98, 0xd7, 0x36,
+ 0xdb, 0xc1, 0x8d, 0xcf, 0xe2, 0x36, 0xcf, 0x26, 0xfc, 0xcd, 0xec, 0x33, 0xcc, 0xf1, 0x35, 0xa0,
+ 0x9c, 0x7a, 0xeb, 0xcb, 0x3d, 0x27, 0xbf, 0xdc, 0xa3, 0xcd, 0x9e, 0x7f, 0x95, 0xea, 0x1d, 0xd1,
+ 0x5e, 0x62, 0x74, 0xa6, 0xac, 0xd2, 0x31, 0x98, 0x81, 0x3b, 0x22, 0xe3, 0xdd, 0xe9, 0xfd, 0x1a,
+ 0xe9, 0x9d, 0x36, 0x47, 0x7e, 0xfb, 0x9e, 0xf7, 0x85, 0xd2, 0x44, 0x1a, 0x19, 0x01, 0x82, 0xb1,
+ 0x83, 0xce, 0xa8, 0x33, 0xee, 0x1d, 0x9c, 0xf0, 0x5b, 0x7d, 0x34, 0x6f, 0x4f, 0xc8, 0x4f, 0xaf,
+ 0x52, 0x5e, 0xc4, 0x68, 0x56, 0x4d, 0xb7, 0xcd, 0x81, 0xdf, 0x7a, 0x6a, 0xf8, 0x9c, 0xde, 0xbb,
+ 0x86, 0x78, 0x7d, 0xda, 0x09, 0x61, 0x55, 0xfa, 0xd9, 0xf5, 0x8b, 0xa5, 0xf7, 0x80, 0x76, 0x33,
+ 0xb9, 0x4c, 0xa1, 0x1a, 0xc7, 0xaf, 0x8a, 0x67, 0xee, 0x31, 0xd9, 0xff, 0x4e, 0x68, 0xbf, 0xfd,
+ 0xfe, 0x2b, 0x65, 0xd1, 0xfb, 0xb0, 0x65, 0x99, 0xdf, 0xce, 0x72, 0x41, 0x97, 0x8e, 0xfb, 0x75,
+ 0xd7, 0x3b, 0x7f, 0x76, 0x5a, 0x86, 0xdf, 0xd1, 0xae, 0x42, 0x88, 0xec, 0xc0, 0x2d, 0x2d, 0x1d,
+ 0xfe, 0x87, 0xa5, 0xe9, 0xdd, 0x3a, 0xbf, 0xfb, 0xb2, 0x48, 0xf2, 0xab, 0xc0, 0xe9, 0x78, 0xbd,
+ 0x61, 0xce, 0xf9, 0x86, 0x39, 0x17, 0x1b, 0xe6, 0x7c, 0xcd, 0x19, 0x59, 0xe7, 0x8c, 0x9c, 0xe7,
+ 0x8c, 0x5c, 0xe4, 0x8c, 0xfc, 0xcc, 0x19, 0xf9, 0xf6, 0x8b, 0x39, 0xef, 0xdd, 0x6c, 0xf2, 0x3b,
+ 0x00, 0x00, 0xff, 0xff, 0x0b, 0xb7, 0x00, 0xe1, 0xba, 0x03, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/generated.proto
new file mode 100644
index 000000000..8eea744eb
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/generated.proto
@@ -0,0 +1,62 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.pkg.apis.storage.v1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1";
+
+// StorageClass describes the parameters for a class of storage for
+// which PersistentVolumes can be dynamically provisioned.
+//
+// StorageClasses are non-namespaced; the name of the storage class
+// according to etcd is in ObjectMeta.Name.
+message StorageClass {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Provisioner indicates the type of the provisioner.
+ optional string provisioner = 2;
+
+ // Parameters holds the parameters for the provisioner that should
+ // create volumes of this storage class.
+ // +optional
+ map<string, string> parameters = 3;
+}
+
+// StorageClassList is a collection of storage classes.
+message StorageClassList {
+ // Standard list metadata
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is the list of StorageClasses
+ repeated StorageClass items = 2;
+}
+
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/register.go
new file mode 100644
index 000000000..a727a9b20
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/register.go
@@ -0,0 +1,60 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "storage.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, RegisterDefaults)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &StorageClass{},
+ &StorageClassList{},
+ )
+
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/types.go
new file mode 100644
index 000000000..971db769e
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/types.go
@@ -0,0 +1,57 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+
+// StorageClass describes the parameters for a class of storage for
+// which PersistentVolumes can be dynamically provisioned.
+//
+// StorageClasses are non-namespaced; the name of the storage class
+// according to etcd is in ObjectMeta.Name.
+type StorageClass struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Provisioner indicates the type of the provisioner.
+ Provisioner string `json:"provisioner" protobuf:"bytes,2,opt,name=provisioner"`
+
+ // Parameters holds the parameters for the provisioner that should
+ // create volumes of this storage class.
+ // +optional
+ Parameters map[string]string `json:"parameters,omitempty" protobuf:"bytes,3,rep,name=parameters"`
+}
+
+// StorageClassList is a collection of storage classes.
+type StorageClassList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of StorageClasses
+ Items []StorageClass `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..a13106fa3
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/types_swagger_doc_generated.go
@@ -0,0 +1,51 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_StorageClass = map[string]string{
+ "": "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "provisioner": "Provisioner indicates the type of the provisioner.",
+ "parameters": "Parameters holds the parameters for the provisioner that should create volumes of this storage class.",
+}
+
+func (StorageClass) SwaggerDoc() map[string]string {
+ return map_StorageClass
+}
+
+var map_StorageClassList = map[string]string{
+ "": "StorageClassList is a collection of storage classes.",
+ "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "items": "Items is the list of StorageClasses",
+}
+
+func (StorageClassList) SwaggerDoc() map[string]string {
+ return map_StorageClassList
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/zz_generated.conversion.go
new file mode 100644
index 000000000..619915930
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/zz_generated.conversion.go
@@ -0,0 +1,93 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1
+
+import (
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ storage "k8s.io/kubernetes/pkg/apis/storage"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1_StorageClass_To_storage_StorageClass,
+ Convert_storage_StorageClass_To_v1_StorageClass,
+ Convert_v1_StorageClassList_To_storage_StorageClassList,
+ Convert_storage_StorageClassList_To_v1_StorageClassList,
+ )
+}
+
+func autoConvert_v1_StorageClass_To_storage_StorageClass(in *StorageClass, out *storage.StorageClass, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Provisioner = in.Provisioner
+ out.Parameters = *(*map[string]string)(unsafe.Pointer(&in.Parameters))
+ return nil
+}
+
+// Convert_v1_StorageClass_To_storage_StorageClass is an autogenerated conversion function.
+func Convert_v1_StorageClass_To_storage_StorageClass(in *StorageClass, out *storage.StorageClass, s conversion.Scope) error {
+ return autoConvert_v1_StorageClass_To_storage_StorageClass(in, out, s)
+}
+
+func autoConvert_storage_StorageClass_To_v1_StorageClass(in *storage.StorageClass, out *StorageClass, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Provisioner = in.Provisioner
+ out.Parameters = *(*map[string]string)(unsafe.Pointer(&in.Parameters))
+ return nil
+}
+
+// Convert_storage_StorageClass_To_v1_StorageClass is an autogenerated conversion function.
+func Convert_storage_StorageClass_To_v1_StorageClass(in *storage.StorageClass, out *StorageClass, s conversion.Scope) error {
+ return autoConvert_storage_StorageClass_To_v1_StorageClass(in, out, s)
+}
+
+func autoConvert_v1_StorageClassList_To_storage_StorageClassList(in *StorageClassList, out *storage.StorageClassList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]storage.StorageClass)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1_StorageClassList_To_storage_StorageClassList is an autogenerated conversion function.
+func Convert_v1_StorageClassList_To_storage_StorageClassList(in *StorageClassList, out *storage.StorageClassList, s conversion.Scope) error {
+ return autoConvert_v1_StorageClassList_To_storage_StorageClassList(in, out, s)
+}
+
+func autoConvert_storage_StorageClassList_To_v1_StorageClassList(in *storage.StorageClassList, out *StorageClassList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]StorageClass, 0)
+ } else {
+ out.Items = *(*[]StorageClass)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_storage_StorageClassList_To_v1_StorageClassList is an autogenerated conversion function.
+func Convert_storage_StorageClassList_To_v1_StorageClassList(in *storage.StorageClassList, out *StorageClassList, s conversion.Scope) error {
+ return autoConvert_storage_StorageClassList_To_v1_StorageClassList(in, out, s)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..649b354f2
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/zz_generated.deepcopy.go
@@ -0,0 +1,82 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_StorageClass, InType: reflect.TypeOf(&StorageClass{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_StorageClassList, InType: reflect.TypeOf(&StorageClassList{})},
+ )
+}
+
+// DeepCopy_v1_StorageClass is an autogenerated deepcopy function.
+func DeepCopy_v1_StorageClass(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StorageClass)
+ out := out.(*StorageClass)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta)
+ }
+ if in.Parameters != nil {
+ in, out := &in.Parameters, &out.Parameters
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1_StorageClassList is an autogenerated deepcopy function.
+func DeepCopy_v1_StorageClassList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StorageClassList)
+ out := out.(*StorageClassList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]StorageClass, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1_StorageClass(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/zz_generated.defaults.go
new file mode 100644
index 000000000..6df448eb9
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1/zz_generated.defaults.go
@@ -0,0 +1,32 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/doc.go
new file mode 100644
index 000000000..b0be7644e
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/doc.go
@@ -0,0 +1,22 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/storage
+// +groupName=storage.k8s.io
+// +k8s:openapi-gen=true
+// +k8s:defaulter-gen=TypeMeta
+package v1beta1 // import "k8s.io/kubernetes/pkg/apis/storage/v1beta1"
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/generated.pb.go
new file mode 100644
index 000000000..05350b5ca
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/generated.pb.go
@@ -0,0 +1,747 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: k8s.io/kubernetes/pkg/apis/storage/v1beta1/generated.proto
+// DO NOT EDIT!
+
+/*
+ Package v1beta1 is a generated protocol buffer package.
+
+ It is generated from these files:
+ k8s.io/kubernetes/pkg/apis/storage/v1beta1/generated.proto
+
+ It has these top-level messages:
+ StorageClass
+ StorageClassList
+*/
+package v1beta1
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+
+import strings "strings"
+import reflect "reflect"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+func (m *StorageClass) Reset() { *m = StorageClass{} }
+func (*StorageClass) ProtoMessage() {}
+func (*StorageClass) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
+
+func (m *StorageClassList) Reset() { *m = StorageClassList{} }
+func (*StorageClassList) ProtoMessage() {}
+func (*StorageClassList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
+
+func init() {
+ proto.RegisterType((*StorageClass)(nil), "k8s.io.kubernetes.pkg.apis.storage.v1beta1.StorageClass")
+ proto.RegisterType((*StorageClassList)(nil), "k8s.io.kubernetes.pkg.apis.storage.v1beta1.StorageClassList")
+}
+func (m *StorageClass) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StorageClass) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
+ n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Provisioner)))
+ i += copy(dAtA[i:], m.Provisioner)
+ if len(m.Parameters) > 0 {
+ keysForParameters := make([]string, 0, len(m.Parameters))
+ for k := range m.Parameters {
+ keysForParameters = append(keysForParameters, string(k))
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForParameters)
+ for _, k := range keysForParameters {
+ dAtA[i] = 0x1a
+ i++
+ v := m.Parameters[string(k)]
+ mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ i = encodeVarintGenerated(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ return i, nil
+}
+
+func (m *StorageClassList) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StorageClassList) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
+ n2, err := m.ListMeta.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func encodeFixed64Generated(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Generated(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *StorageClass) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ObjectMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.Provisioner)
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Parameters) > 0 {
+ for k, v := range m.Parameters {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v)))
+ n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *StorageClassList) Size() (n int) {
+ var l int
+ _ = l
+ l = m.ListMeta.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovGenerated(uint64(l))
+ }
+ }
+ return n
+}
+
+func sovGenerated(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozGenerated(x uint64) (n int) {
+ return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *StorageClass) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForParameters := make([]string, 0, len(this.Parameters))
+ for k := range this.Parameters {
+ keysForParameters = append(keysForParameters, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForParameters)
+ mapStringForParameters := "map[string]string{"
+ for _, k := range keysForParameters {
+ mapStringForParameters += fmt.Sprintf("%v: %v,", k, this.Parameters[k])
+ }
+ mapStringForParameters += "}"
+ s := strings.Join([]string{`&StorageClass{`,
+ `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
+ `Provisioner:` + fmt.Sprintf("%v", this.Provisioner) + `,`,
+ `Parameters:` + mapStringForParameters + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StorageClassList) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StorageClassList{`,
+ `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
+ `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "StorageClass", "StorageClass", 1), `&`, ``, 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringGenerated(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *StorageClass) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StorageClass: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StorageClass: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Provisioner", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Provisioner = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Parameters == nil {
+ m.Parameters = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Parameters[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Parameters[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StorageClassList) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StorageClassList: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StorageClassList: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, StorageClass{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipGenerated(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipGenerated(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthGenerated
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipGenerated(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
+)
+
+func init() {
+ proto.RegisterFile("k8s.io/kubernetes/pkg/apis/storage/v1beta1/generated.proto", fileDescriptorGenerated)
+}
+
+var fileDescriptorGenerated = []byte{
+ // 466 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x91, 0xcf, 0x6b, 0x13, 0x41,
+ 0x14, 0xc7, 0x77, 0x52, 0x82, 0xed, 0x44, 0x31, 0xac, 0x1e, 0x42, 0x0e, 0xd3, 0xd0, 0x53, 0x10,
+ 0x3a, 0x63, 0xea, 0x0f, 0x42, 0xc1, 0x4b, 0x44, 0x50, 0x50, 0x2c, 0xeb, 0x4d, 0x14, 0x9c, 0x4d,
+ 0x9f, 0x9b, 0x71, 0xb3, 0x3b, 0xcb, 0xcc, 0xdb, 0x85, 0x80, 0x07, 0xff, 0x04, 0xff, 0xac, 0xdc,
+ 0xec, 0xb1, 0xa7, 0x62, 0x56, 0xff, 0x10, 0xd9, 0x1f, 0x76, 0x97, 0x86, 0x62, 0xf1, 0xb6, 0x6f,
+ 0x66, 0x3e, 0xdf, 0xf7, 0xde, 0x67, 0xe9, 0x71, 0x38, 0xb5, 0x5c, 0x69, 0x11, 0xa6, 0x3e, 0x98,
+ 0x18, 0x10, 0xac, 0x48, 0xc2, 0x40, 0xc8, 0x44, 0x59, 0x61, 0x51, 0x1b, 0x19, 0x80, 0xc8, 0x26,
+ 0x3e, 0xa0, 0x9c, 0x88, 0x00, 0x62, 0x30, 0x12, 0xe1, 0x94, 0x27, 0x46, 0xa3, 0x76, 0x1f, 0x54,
+ 0x2c, 0x6f, 0x58, 0x9e, 0x84, 0x01, 0x2f, 0x58, 0x5e, 0xb3, 0xbc, 0x66, 0x87, 0x87, 0x81, 0xc2,
+ 0x45, 0xea, 0xf3, 0xb9, 0x8e, 0x44, 0xa0, 0x03, 0x2d, 0xca, 0x08, 0x3f, 0xfd, 0x5c, 0x56, 0x65,
+ 0x51, 0x7e, 0x55, 0xd1, 0xc3, 0xc7, 0xf5, 0x58, 0x32, 0x51, 0x91, 0x9c, 0x2f, 0x54, 0x0c, 0x66,
+ 0xd5, 0x0c, 0x16, 0x01, 0x4a, 0x91, 0x6d, 0x0d, 0x34, 0x14, 0xd7, 0x51, 0x26, 0x8d, 0x51, 0x45,
+ 0xb0, 0x05, 0x3c, 0xfd, 0x17, 0x60, 0xe7, 0x0b, 0x88, 0xe4, 0x16, 0xf7, 0xe8, 0x3a, 0x2e, 0x45,
+ 0xb5, 0x14, 0x2a, 0x46, 0x8b, 0xe6, 0x2a, 0x74, 0xf0, 0xbb, 0x43, 0x6f, 0xbf, 0xab, 0xb4, 0x3c,
+ 0x5f, 0x4a, 0x6b, 0xdd, 0x4f, 0x74, 0xb7, 0xd8, 0xe4, 0x54, 0xa2, 0x1c, 0x90, 0x11, 0x19, 0xf7,
+ 0x8e, 0x1e, 0xf2, 0x5a, 0x69, 0x3b, 0xb8, 0x91, 0x5a, 0xbc, 0xe6, 0xd9, 0x84, 0xbf, 0xf5, 0xbf,
+ 0xc0, 0x1c, 0xdf, 0x00, 0xca, 0x99, 0xbb, 0xbe, 0xd8, 0x77, 0xf2, 0x8b, 0x7d, 0xda, 0x9c, 0x79,
+ 0x97, 0xa9, 0xee, 0x13, 0xda, 0x4b, 0x8c, 0xce, 0x94, 0x55, 0x3a, 0x06, 0x33, 0xe8, 0x8c, 0xc8,
+ 0x78, 0x6f, 0x76, 0xaf, 0x46, 0x7a, 0x27, 0xcd, 0x95, 0xd7, 0x7e, 0xe7, 0x7e, 0xa5, 0x34, 0x91,
+ 0x46, 0x46, 0x80, 0x60, 0xec, 0x60, 0x67, 0xb4, 0x33, 0xee, 0x1d, 0xbd, 0xe4, 0x37, 0xff, 0xdb,
+ 0xbc, 0xbd, 0x26, 0x3f, 0xb9, 0x8c, 0x7a, 0x11, 0xa3, 0x59, 0x35, 0x23, 0x37, 0x17, 0x5e, 0xab,
+ 0xdf, 0xf0, 0x19, 0xbd, 0x7b, 0x05, 0x71, 0xfb, 0x74, 0x27, 0x84, 0x55, 0x29, 0x69, 0xcf, 0x2b,
+ 0x3e, 0xdd, 0xfb, 0xb4, 0x9b, 0xc9, 0x65, 0x0a, 0xd5, 0x4e, 0x5e, 0x55, 0x1c, 0x77, 0xa6, 0xe4,
+ 0xe0, 0x07, 0xa1, 0xfd, 0x76, 0xff, 0xd7, 0xca, 0xa2, 0xfb, 0x61, 0x4b, 0x35, 0xbf, 0x99, 0xea,
+ 0x82, 0x2e, 0x45, 0xf7, 0xeb, 0xa9, 0x77, 0xff, 0x9e, 0xb4, 0x34, 0x7f, 0xa4, 0x5d, 0x85, 0x10,
+ 0xd9, 0x41, 0xa7, 0x54, 0x35, 0xfd, 0x5f, 0x55, 0xb3, 0x3b, 0x75, 0x93, 0xee, 0xab, 0x22, 0xce,
+ 0xab, 0x52, 0x67, 0x87, 0xeb, 0x0d, 0x73, 0xce, 0x36, 0xcc, 0x39, 0xdf, 0x30, 0xe7, 0x5b, 0xce,
+ 0xc8, 0x3a, 0x67, 0xe4, 0x2c, 0x67, 0xe4, 0x3c, 0x67, 0xe4, 0x67, 0xce, 0xc8, 0xf7, 0x5f, 0xcc,
+ 0x79, 0x7f, 0xab, 0x4e, 0xfc, 0x13, 0x00, 0x00, 0xff, 0xff, 0xaf, 0x85, 0xaa, 0xb3, 0xd3, 0x03,
+ 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/generated.proto
new file mode 100644
index 000000000..c50f4593a
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/generated.proto
@@ -0,0 +1,62 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+
+// This file was autogenerated by go-to-protobuf. Do not edit it manually!
+
+syntax = 'proto2';
+
+package k8s.io.kubernetes.pkg.apis.storage.v1beta1;
+
+import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/generated.proto";
+import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
+import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
+
+// Package-wide variables from generator "generated".
+option go_package = "v1beta1";
+
+// StorageClass describes the parameters for a class of storage for
+// which PersistentVolumes can be dynamically provisioned.
+//
+// StorageClasses are non-namespaced; the name of the storage class
+// according to etcd is in ObjectMeta.Name.
+message StorageClass {
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
+
+ // Provisioner indicates the type of the provisioner.
+ optional string provisioner = 2;
+
+ // Parameters holds the parameters for the provisioner that should
+ // create volumes of this storage class.
+ // +optional
+ map<string, string> parameters = 3;
+}
+
+// StorageClassList is a collection of storage classes.
+message StorageClassList {
+ // Standard list metadata
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
+
+ // Items is the list of StorageClasses
+ repeated StorageClass items = 2;
+}
+
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/register.go
new file mode 100644
index 000000000..f10a1a572
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/register.go
@@ -0,0 +1,60 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+// GroupName is the group name use in this package
+const GroupName = "storage.k8s.io"
+
+// SchemeGroupVersion is group version used to register these objects
+var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
+
+var (
+ // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
+ // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
+ SchemeBuilder runtime.SchemeBuilder
+ localSchemeBuilder = &SchemeBuilder
+ AddToScheme = localSchemeBuilder.AddToScheme
+)
+
+func init() {
+ // We only register manually written functions here. The registration of the
+ // generated functions takes place in the generated files. The separation
+ // makes the code compile even when the generated files are missing.
+ localSchemeBuilder.Register(addKnownTypes, RegisterDefaults)
+}
+
+// Adds the list of known types to api.Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &StorageClass{},
+ &StorageClassList{},
+ )
+
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/types.generated.go
new file mode 100644
index 000000000..d9f5d5f77
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/types.generated.go
@@ -0,0 +1,985 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// ************************************************************
+// DO NOT EDIT.
+// THIS FILE IS AUTO-GENERATED BY codecgen.
+// ************************************************************
+
+package v1beta1
+
+import (
+ "errors"
+ "fmt"
+ codec1978 "github.com/ugorji/go/codec"
+ pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ pkg2_types "k8s.io/apimachinery/pkg/types"
+ "reflect"
+ "runtime"
+ time "time"
+)
+
+const (
+ // ----- content types ----
+ codecSelferC_UTF81234 = 1
+ codecSelferC_RAW1234 = 0
+ // ----- value types used ----
+ codecSelferValueTypeArray1234 = 10
+ codecSelferValueTypeMap1234 = 9
+ // ----- containerStateValues ----
+ codecSelfer_containerMapKey1234 = 2
+ codecSelfer_containerMapValue1234 = 3
+ codecSelfer_containerMapEnd1234 = 4
+ codecSelfer_containerArrayElem1234 = 6
+ codecSelfer_containerArrayEnd1234 = 7
+)
+
+var (
+ codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits())
+ codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`)
+)
+
+type codecSelfer1234 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 pkg1_v1.TypeMeta
+ var v1 pkg2_types.UID
+ var v2 time.Time
+ _, _, _ = v0, v1, v2
+ }
+}
+
+func (x *StorageClass) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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[4] = len(x.Parameters) != 0
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(5)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Provisioner))
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("provisioner"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Provisioner))
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[4] {
+ if x.Parameters == nil {
+ r.EncodeNil()
+ } else {
+ yym18 := z.EncBinary()
+ _ = yym18
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Parameters, false, e)
+ }
+ }
+ } else {
+ r.EncodeNil()
+ }
+ } else {
+ if yyq2[4] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("parameters"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Parameters == nil {
+ r.EncodeNil()
+ } else {
+ yym19 := z.EncBinary()
+ _ = yym19
+ if false {
+ } else {
+ z.F.EncMapStringStringV(x.Parameters, false, e)
+ }
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *StorageClass) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *StorageClass) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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 "provisioner":
+ if r.TryDecodeAsNil() {
+ x.Provisioner = ""
+ } else {
+ yyv10 := &x.Provisioner
+ yym11 := z.DecBinary()
+ _ = yym11
+ if false {
+ } else {
+ *((*string)(yyv10)) = r.DecodeString()
+ }
+ }
+ case "parameters":
+ if r.TryDecodeAsNil() {
+ x.Parameters = nil
+ } else {
+ yyv12 := &x.Parameters
+ yym13 := z.DecBinary()
+ _ = yym13
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv12, false, d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Kind = ""
+ } else {
+ yyv15 := &x.Kind
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.APIVersion = ""
+ } else {
+ yyv17 := &x.APIVersion
+ yym18 := z.DecBinary()
+ _ = yym18
+ if false {
+ } else {
+ *((*string)(yyv17)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.ObjectMeta = pkg1_v1.ObjectMeta{}
+ } else {
+ yyv19 := &x.ObjectMeta
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else if z.HasExtensions() && z.DecExt(yyv19) {
+ } else {
+ z.DecFallback(yyv19, false)
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Provisioner = ""
+ } else {
+ yyv21 := &x.Provisioner
+ yym22 := z.DecBinary()
+ _ = yym22
+ if false {
+ } else {
+ *((*string)(yyv21)) = r.DecodeString()
+ }
+ }
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Parameters = nil
+ } else {
+ yyv23 := &x.Parameters
+ yym24 := z.DecBinary()
+ _ = yym24
+ if false {
+ } else {
+ z.F.DecMapStringStringX(yyv23, false, d)
+ }
+ }
+ for {
+ yyj14++
+ if yyhl14 {
+ yyb14 = yyj14 > l
+ } else {
+ yyb14 = r.CheckBreak()
+ }
+ if yyb14 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj14-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x *StorageClassList) CodecEncodeSelf(e *codec1978.Encoder) {
+ var h codecSelfer1234
+ 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
+ var yynn2 int
+ if yyr2 || yy2arr2 {
+ r.EncodeArrayStart(4)
+ } else {
+ yynn2 = 1
+ for _, b := range yyq2 {
+ if b {
+ yynn2++
+ }
+ }
+ r.EncodeMapStart(yynn2)
+ yynn2 = 0
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[0] {
+ yym4 := z.EncBinary()
+ _ = yym4
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[0] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("kind"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym5 := z.EncBinary()
+ _ = yym5
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.Kind))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ if yyq2[1] {
+ yym7 := z.EncBinary()
+ _ = yym7
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, "")
+ }
+ } else {
+ if yyq2[1] {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("apiVersion"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ yym8 := z.EncBinary()
+ _ = yym8
+ if false {
+ } else {
+ r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion))
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("metadata"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ 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_containerArrayElem1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym15 := z.EncBinary()
+ _ = yym15
+ if false {
+ } else {
+ h.encSliceStorageClass(([]StorageClass)(x.Items), e)
+ }
+ }
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapKey1234)
+ r.EncodeString(codecSelferC_UTF81234, string("items"))
+ z.EncSendContainerState(codecSelfer_containerMapValue1234)
+ if x.Items == nil {
+ r.EncodeNil()
+ } else {
+ yym16 := z.EncBinary()
+ _ = yym16
+ if false {
+ } else {
+ h.encSliceStorageClass(([]StorageClass)(x.Items), e)
+ }
+ }
+ }
+ if yyr2 || yy2arr2 {
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ z.EncSendContainerState(codecSelfer_containerMapEnd1234)
+ }
+ }
+ }
+}
+
+func (x *StorageClassList) CodecDecodeSelf(d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 == codecSelferValueTypeMap1234 {
+ yyl2 := r.ReadMapStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+ } else {
+ x.codecDecodeSelfFromMap(yyl2, d)
+ }
+ } else if yyct2 == codecSelferValueTypeArray1234 {
+ yyl2 := r.ReadArrayStart()
+ if yyl2 == 0 {
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+ } else {
+ x.codecDecodeSelfFromArray(yyl2, d)
+ }
+ } else {
+ panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
+ }
+ }
+}
+
+func (x *StorageClassList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerMapKey1234)
+ yys3Slc = r.DecodeBytes(yys3Slc, true, true)
+ yys3 := string(yys3Slc)
+ z.DecSendContainerState(codecSelfer_containerMapValue1234)
+ 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.decSliceStorageClass((*[]StorageClass)(yyv10), d)
+ }
+ }
+ default:
+ z.DecStructFieldNotFound(-1, yys3)
+ } // end switch yys3
+ } // end for yyj3
+ z.DecSendContainerState(codecSelfer_containerMapEnd1234)
+}
+
+func (x *StorageClassList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ 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_containerArrayEnd1234)
+ return
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ if r.TryDecodeAsNil() {
+ x.Items = nil
+ } else {
+ yyv19 := &x.Items
+ yym20 := z.DecBinary()
+ _ = yym20
+ if false {
+ } else {
+ h.decSliceStorageClass((*[]StorageClass)(yyv19), d)
+ }
+ }
+ for {
+ yyj12++
+ if yyhl12 {
+ yyb12 = yyj12 > l
+ } else {
+ yyb12 = r.CheckBreak()
+ }
+ if yyb12 {
+ break
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayElem1234)
+ z.DecStructFieldNotFound(yyj12-1, "")
+ }
+ z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) encSliceStorageClass(v []StorageClass, e *codec1978.Encoder) {
+ var h codecSelfer1234
+ z, r := codec1978.GenHelperEncoder(e)
+ _, _, _ = h, z, r
+ r.EncodeArrayStart(len(v))
+ for _, yyv1 := range v {
+ z.EncSendContainerState(codecSelfer_containerArrayElem1234)
+ yy2 := &yyv1
+ yy2.CodecEncodeSelf(e)
+ }
+ z.EncSendContainerState(codecSelfer_containerArrayEnd1234)
+}
+
+func (x codecSelfer1234) decSliceStorageClass(v *[]StorageClass, d *codec1978.Decoder) {
+ var h codecSelfer1234
+ 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 = []StorageClass{}
+ 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, 288)
+ if yyrt1 {
+ if yyrl1 <= cap(yyv1) {
+ yyv1 = yyv1[:yyrl1]
+ } else {
+ yyv1 = make([]StorageClass, yyrl1)
+ }
+ } else {
+ yyv1 = make([]StorageClass, 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] = StorageClass{}
+ } else {
+ yyv2 := &yyv1[yyj1]
+ yyv2.CodecDecodeSelf(d)
+ }
+
+ }
+ if yyrt1 {
+ for ; yyj1 < yyl1; yyj1++ {
+ yyv1 = append(yyv1, StorageClass{})
+ yyh1.ElemContainerState(yyj1)
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = StorageClass{}
+ } else {
+ yyv3 := &yyv1[yyj1]
+ yyv3.CodecDecodeSelf(d)
+ }
+
+ }
+ }
+
+ } else {
+ yyj1 := 0
+ for ; !r.CheckBreak(); yyj1++ {
+
+ if yyj1 >= len(yyv1) {
+ yyv1 = append(yyv1, StorageClass{}) // var yyz1 StorageClass
+ yyc1 = true
+ }
+ yyh1.ElemContainerState(yyj1)
+ if yyj1 < len(yyv1) {
+ if r.TryDecodeAsNil() {
+ yyv1[yyj1] = StorageClass{}
+ } 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 = []StorageClass{}
+ yyc1 = true
+ }
+ }
+ yyh1.End()
+ if yyc1 {
+ *v = yyv1
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/types.go
new file mode 100644
index 000000000..8b4756784
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/types.go
@@ -0,0 +1,57 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// +genclient=true
+// +nonNamespaced=true
+
+// StorageClass describes the parameters for a class of storage for
+// which PersistentVolumes can be dynamically provisioned.
+//
+// StorageClasses are non-namespaced; the name of the storage class
+// according to etcd is in ObjectMeta.Name.
+type StorageClass struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard object's metadata.
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Provisioner indicates the type of the provisioner.
+ Provisioner string `json:"provisioner" protobuf:"bytes,2,opt,name=provisioner"`
+
+ // Parameters holds the parameters for the provisioner that should
+ // create volumes of this storage class.
+ // +optional
+ Parameters map[string]string `json:"parameters,omitempty" protobuf:"bytes,3,rep,name=parameters"`
+}
+
+// StorageClassList is a collection of storage classes.
+type StorageClassList struct {
+ metav1.TypeMeta `json:",inline"`
+ // Standard list metadata
+ // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
+
+ // Items is the list of StorageClasses
+ Items []StorageClass `json:"items" protobuf:"bytes,2,rep,name=items"`
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/types_swagger_doc_generated.go
new file mode 100644
index 000000000..0d43bb03c
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/types_swagger_doc_generated.go
@@ -0,0 +1,51 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+// This file contains a collection of methods that can be used from go-restful to
+// generate Swagger API documentation for its models. Please read this PR for more
+// information on the implementation: https://github.com/emicklei/go-restful/pull/215
+//
+// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
+// they are on one line! For multiple line or blocks that you want to ignore use ---.
+// Any context after a --- is ignored.
+//
+// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+
+// AUTO-GENERATED FUNCTIONS START HERE
+var map_StorageClass = map[string]string{
+ "": "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.",
+ "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "provisioner": "Provisioner indicates the type of the provisioner.",
+ "parameters": "Parameters holds the parameters for the provisioner that should create volumes of this storage class.",
+}
+
+func (StorageClass) SwaggerDoc() map[string]string {
+ return map_StorageClass
+}
+
+var map_StorageClassList = map[string]string{
+ "": "StorageClassList is a collection of storage classes.",
+ "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
+ "items": "Items is the list of StorageClasses",
+}
+
+func (StorageClassList) SwaggerDoc() map[string]string {
+ return map_StorageClassList
+}
+
+// AUTO-GENERATED FUNCTIONS END HERE
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/zz_generated.conversion.go
new file mode 100644
index 000000000..0279635ba
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/zz_generated.conversion.go
@@ -0,0 +1,93 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by conversion-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ storage "k8s.io/kubernetes/pkg/apis/storage"
+ unsafe "unsafe"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterConversions)
+}
+
+// RegisterConversions adds conversion functions to the given scheme.
+// Public to allow building arbitrary schemes.
+func RegisterConversions(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedConversionFuncs(
+ Convert_v1beta1_StorageClass_To_storage_StorageClass,
+ Convert_storage_StorageClass_To_v1beta1_StorageClass,
+ Convert_v1beta1_StorageClassList_To_storage_StorageClassList,
+ Convert_storage_StorageClassList_To_v1beta1_StorageClassList,
+ )
+}
+
+func autoConvert_v1beta1_StorageClass_To_storage_StorageClass(in *StorageClass, out *storage.StorageClass, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Provisioner = in.Provisioner
+ out.Parameters = *(*map[string]string)(unsafe.Pointer(&in.Parameters))
+ return nil
+}
+
+// Convert_v1beta1_StorageClass_To_storage_StorageClass is an autogenerated conversion function.
+func Convert_v1beta1_StorageClass_To_storage_StorageClass(in *StorageClass, out *storage.StorageClass, s conversion.Scope) error {
+ return autoConvert_v1beta1_StorageClass_To_storage_StorageClass(in, out, s)
+}
+
+func autoConvert_storage_StorageClass_To_v1beta1_StorageClass(in *storage.StorageClass, out *StorageClass, s conversion.Scope) error {
+ out.ObjectMeta = in.ObjectMeta
+ out.Provisioner = in.Provisioner
+ out.Parameters = *(*map[string]string)(unsafe.Pointer(&in.Parameters))
+ return nil
+}
+
+// Convert_storage_StorageClass_To_v1beta1_StorageClass is an autogenerated conversion function.
+func Convert_storage_StorageClass_To_v1beta1_StorageClass(in *storage.StorageClass, out *StorageClass, s conversion.Scope) error {
+ return autoConvert_storage_StorageClass_To_v1beta1_StorageClass(in, out, s)
+}
+
+func autoConvert_v1beta1_StorageClassList_To_storage_StorageClassList(in *StorageClassList, out *storage.StorageClassList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ out.Items = *(*[]storage.StorageClass)(unsafe.Pointer(&in.Items))
+ return nil
+}
+
+// Convert_v1beta1_StorageClassList_To_storage_StorageClassList is an autogenerated conversion function.
+func Convert_v1beta1_StorageClassList_To_storage_StorageClassList(in *StorageClassList, out *storage.StorageClassList, s conversion.Scope) error {
+ return autoConvert_v1beta1_StorageClassList_To_storage_StorageClassList(in, out, s)
+}
+
+func autoConvert_storage_StorageClassList_To_v1beta1_StorageClassList(in *storage.StorageClassList, out *StorageClassList, s conversion.Scope) error {
+ out.ListMeta = in.ListMeta
+ if in.Items == nil {
+ out.Items = make([]StorageClass, 0)
+ } else {
+ out.Items = *(*[]StorageClass)(unsafe.Pointer(&in.Items))
+ }
+ return nil
+}
+
+// Convert_storage_StorageClassList_To_v1beta1_StorageClassList is an autogenerated conversion function.
+func Convert_storage_StorageClassList_To_v1beta1_StorageClassList(in *storage.StorageClassList, out *StorageClassList, s conversion.Scope) error {
+ return autoConvert_storage_StorageClassList_To_v1beta1_StorageClassList(in, out, s)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..1f2176994
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/zz_generated.deepcopy.go
@@ -0,0 +1,82 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StorageClass, InType: reflect.TypeOf(&StorageClass{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_StorageClassList, InType: reflect.TypeOf(&StorageClassList{})},
+ )
+}
+
+// DeepCopy_v1beta1_StorageClass is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_StorageClass(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StorageClass)
+ out := out.(*StorageClass)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Parameters != nil {
+ in, out := &in.Parameters, &out.Parameters
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_v1beta1_StorageClassList is an autogenerated deepcopy function.
+func DeepCopy_v1beta1_StorageClassList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StorageClassList)
+ out := out.(*StorageClassList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]StorageClass, len(*in))
+ for i := range *in {
+ if err := DeepCopy_v1beta1_StorageClass(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/zz_generated.defaults.go
new file mode 100644
index 000000000..e24e70be3
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/zz_generated.defaults.go
@@ -0,0 +1,32 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by defaulter-gen. Do not edit it manually!
+
+package v1beta1
+
+import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// RegisterDefaults adds defaulters functions to the given scheme.
+// Public to allow building arbitrary schemes.
+// All generated defaulters are covering - they call all nested defaulters.
+func RegisterDefaults(scheme *runtime.Scheme) error {
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/zz_generated.deepcopy.go
new file mode 100644
index 000000000..bf8ba1b80
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/zz_generated.deepcopy.go
@@ -0,0 +1,82 @@
+// +build !ignore_autogenerated
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This file was autogenerated by deepcopy-gen. Do not edit it manually!
+
+package storage
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ conversion "k8s.io/apimachinery/pkg/conversion"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ reflect "reflect"
+)
+
+func init() {
+ SchemeBuilder.Register(RegisterDeepCopies)
+}
+
+// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
+// to allow building arbitrary schemes.
+func RegisterDeepCopies(scheme *runtime.Scheme) error {
+ return scheme.AddGeneratedDeepCopyFuncs(
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_storage_StorageClass, InType: reflect.TypeOf(&StorageClass{})},
+ conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_storage_StorageClassList, InType: reflect.TypeOf(&StorageClassList{})},
+ )
+}
+
+// DeepCopy_storage_StorageClass is an autogenerated deepcopy function.
+func DeepCopy_storage_StorageClass(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StorageClass)
+ out := out.(*StorageClass)
+ *out = *in
+ if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil {
+ return err
+ } else {
+ out.ObjectMeta = *newVal.(*v1.ObjectMeta)
+ }
+ if in.Parameters != nil {
+ in, out := &in.Parameters, &out.Parameters
+ *out = make(map[string]string)
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return nil
+ }
+}
+
+// DeepCopy_storage_StorageClassList is an autogenerated deepcopy function.
+func DeepCopy_storage_StorageClassList(in interface{}, out interface{}, c *conversion.Cloner) error {
+ {
+ in := in.(*StorageClassList)
+ out := out.(*StorageClassList)
+ *out = *in
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]StorageClass, len(*in))
+ for i := range *in {
+ if err := DeepCopy_storage_StorageClass(&(*in)[i], &(*out)[i], c); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/capabilities/capabilities.go b/vendor/k8s.io/kubernetes/pkg/capabilities/capabilities.go
new file mode 100644
index 000000000..be721a785
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/capabilities/capabilities.go
@@ -0,0 +1,94 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package capabilities
+
+import (
+ "sync"
+)
+
+// Capabilities defines the set of capabilities available within the system.
+// For now these are global. Eventually they may be per-user
+type Capabilities struct {
+ AllowPrivileged bool
+
+ // Pod sources from which to allow privileged capabilities like host networking, sharing the host
+ // IPC namespace, and sharing the host PID namespace.
+ PrivilegedSources PrivilegedSources
+
+ // PerConnectionBandwidthLimitBytesPerSec limits the throughput of each connection (currently only used for proxy, exec, attach)
+ PerConnectionBandwidthLimitBytesPerSec int64
+}
+
+// PrivilegedSources defines the pod sources allowed to make privileged requests for certain types
+// of capabilities like host networking, sharing the host IPC namespace, and sharing the host PID namespace.
+type PrivilegedSources struct {
+ // List of pod sources for which using host network is allowed.
+ HostNetworkSources []string
+
+ // List of pod sources for which using host pid namespace is allowed.
+ HostPIDSources []string
+
+ // List of pod sources for which using host ipc is allowed.
+ HostIPCSources []string
+}
+
+// TODO: Clean these up into a singleton
+var once sync.Once
+var lock sync.Mutex
+var capabilities *Capabilities
+
+// Initialize the capability set. This can only be done once per binary, subsequent calls are ignored.
+func Initialize(c Capabilities) {
+ // Only do this once
+ once.Do(func() {
+ capabilities = &c
+ })
+}
+
+// Setup the capability set. It wraps Initialize for improving usability.
+func Setup(allowPrivileged bool, privilegedSources PrivilegedSources, perConnectionBytesPerSec int64) {
+ Initialize(Capabilities{
+ AllowPrivileged: allowPrivileged,
+ PrivilegedSources: privilegedSources,
+ PerConnectionBandwidthLimitBytesPerSec: perConnectionBytesPerSec,
+ })
+}
+
+// SetForTests sets capabilities for tests. Convenience method for testing. This should only be called from tests.
+func SetForTests(c Capabilities) {
+ lock.Lock()
+ defer lock.Unlock()
+ capabilities = &c
+}
+
+// Returns a read-only copy of the system capabilities.
+func Get() Capabilities {
+ lock.Lock()
+ defer lock.Unlock()
+ // This check prevents clobbering of capabilities that might've been set via SetForTests
+ if capabilities == nil {
+ Initialize(Capabilities{
+ AllowPrivileged: false,
+ PrivilegedSources: PrivilegedSources{
+ HostNetworkSources: []string{},
+ HostPIDSources: []string{},
+ HostIPCSources: []string{},
+ },
+ })
+ }
+ return *capabilities
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/capabilities/doc.go b/vendor/k8s.io/kubernetes/pkg/capabilities/doc.go
new file mode 100644
index 000000000..bbdc89d50
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/capabilities/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// package capabilities manages system level capabilities
+package capabilities // import "k8s.io/kubernetes/pkg/capabilities"
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/clientset.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/clientset.go
new file mode 100644
index 000000000..f477de366
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/clientset.go
@@ -0,0 +1,570 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package clientset
+
+import (
+ glog "github.com/golang/glog"
+ discovery "k8s.io/client-go/discovery"
+ rest "k8s.io/client-go/rest"
+ flowcontrol "k8s.io/client-go/util/flowcontrol"
+ admissionregistrationv1alpha1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/admissionregistration/v1alpha1"
+ appsv1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1"
+ authenticationv1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1"
+ authenticationv1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1"
+ authorizationv1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1"
+ authorizationv1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1"
+ autoscalingv1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1"
+ autoscalingv2alpha1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v2alpha1"
+ batchv1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1"
+ batchv2alpha1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1"
+ certificatesv1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1"
+ corev1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1"
+ extensionsv1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1"
+ networkingv1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/networking/v1"
+ policyv1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1"
+ rbacv1alpha1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1"
+ rbacv1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1"
+ settingsv1alpha1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1"
+ storagev1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1"
+ storagev1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1"
+)
+
+type Interface interface {
+ Discovery() discovery.DiscoveryInterface
+ AdmissionregistrationV1alpha1() admissionregistrationv1alpha1.AdmissionregistrationV1alpha1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Admissionregistration() admissionregistrationv1alpha1.AdmissionregistrationV1alpha1Interface
+ CoreV1() corev1.CoreV1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Core() corev1.CoreV1Interface
+ AppsV1beta1() appsv1beta1.AppsV1beta1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Apps() appsv1beta1.AppsV1beta1Interface
+ AuthenticationV1() authenticationv1.AuthenticationV1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Authentication() authenticationv1.AuthenticationV1Interface
+ AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface
+ AuthorizationV1() authorizationv1.AuthorizationV1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Authorization() authorizationv1.AuthorizationV1Interface
+ AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface
+ AutoscalingV1() autoscalingv1.AutoscalingV1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Autoscaling() autoscalingv1.AutoscalingV1Interface
+ AutoscalingV2alpha1() autoscalingv2alpha1.AutoscalingV2alpha1Interface
+ BatchV1() batchv1.BatchV1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Batch() batchv1.BatchV1Interface
+ BatchV2alpha1() batchv2alpha1.BatchV2alpha1Interface
+ CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Certificates() certificatesv1beta1.CertificatesV1beta1Interface
+ ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Extensions() extensionsv1beta1.ExtensionsV1beta1Interface
+ NetworkingV1() networkingv1.NetworkingV1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Networking() networkingv1.NetworkingV1Interface
+ PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Policy() policyv1beta1.PolicyV1beta1Interface
+ RbacV1beta1() rbacv1beta1.RbacV1beta1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Rbac() rbacv1beta1.RbacV1beta1Interface
+ RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface
+ SettingsV1alpha1() settingsv1alpha1.SettingsV1alpha1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Settings() settingsv1alpha1.SettingsV1alpha1Interface
+ StorageV1beta1() storagev1beta1.StorageV1beta1Interface
+ StorageV1() storagev1.StorageV1Interface
+ // Deprecated: please explicitly pick a version if possible.
+ Storage() storagev1.StorageV1Interface
+}
+
+// Clientset contains the clients for groups. Each group has exactly one
+// version included in a Clientset.
+type Clientset struct {
+ *discovery.DiscoveryClient
+ *admissionregistrationv1alpha1.AdmissionregistrationV1alpha1Client
+ *corev1.CoreV1Client
+ *appsv1beta1.AppsV1beta1Client
+ *authenticationv1.AuthenticationV1Client
+ *authenticationv1beta1.AuthenticationV1beta1Client
+ *authorizationv1.AuthorizationV1Client
+ *authorizationv1beta1.AuthorizationV1beta1Client
+ *autoscalingv1.AutoscalingV1Client
+ *autoscalingv2alpha1.AutoscalingV2alpha1Client
+ *batchv1.BatchV1Client
+ *batchv2alpha1.BatchV2alpha1Client
+ *certificatesv1beta1.CertificatesV1beta1Client
+ *extensionsv1beta1.ExtensionsV1beta1Client
+ *networkingv1.NetworkingV1Client
+ *policyv1beta1.PolicyV1beta1Client
+ *rbacv1beta1.RbacV1beta1Client
+ *rbacv1alpha1.RbacV1alpha1Client
+ *settingsv1alpha1.SettingsV1alpha1Client
+ *storagev1beta1.StorageV1beta1Client
+ *storagev1.StorageV1Client
+}
+
+// AdmissionregistrationV1alpha1 retrieves the AdmissionregistrationV1alpha1Client
+func (c *Clientset) AdmissionregistrationV1alpha1() admissionregistrationv1alpha1.AdmissionregistrationV1alpha1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.AdmissionregistrationV1alpha1Client
+}
+
+// Deprecated: Admissionregistration retrieves the default version of AdmissionregistrationClient.
+// Please explicitly pick a version.
+func (c *Clientset) Admissionregistration() admissionregistrationv1alpha1.AdmissionregistrationV1alpha1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.AdmissionregistrationV1alpha1Client
+}
+
+// CoreV1 retrieves the CoreV1Client
+func (c *Clientset) CoreV1() corev1.CoreV1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.CoreV1Client
+}
+
+// Deprecated: Core retrieves the default version of CoreClient.
+// Please explicitly pick a version.
+func (c *Clientset) Core() corev1.CoreV1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.CoreV1Client
+}
+
+// AppsV1beta1 retrieves the AppsV1beta1Client
+func (c *Clientset) AppsV1beta1() appsv1beta1.AppsV1beta1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.AppsV1beta1Client
+}
+
+// Deprecated: Apps retrieves the default version of AppsClient.
+// Please explicitly pick a version.
+func (c *Clientset) Apps() appsv1beta1.AppsV1beta1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.AppsV1beta1Client
+}
+
+// AuthenticationV1 retrieves the AuthenticationV1Client
+func (c *Clientset) AuthenticationV1() authenticationv1.AuthenticationV1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.AuthenticationV1Client
+}
+
+// Deprecated: Authentication retrieves the default version of AuthenticationClient.
+// Please explicitly pick a version.
+func (c *Clientset) Authentication() authenticationv1.AuthenticationV1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.AuthenticationV1Client
+}
+
+// AuthenticationV1beta1 retrieves the AuthenticationV1beta1Client
+func (c *Clientset) AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.AuthenticationV1beta1Client
+}
+
+// AuthorizationV1 retrieves the AuthorizationV1Client
+func (c *Clientset) AuthorizationV1() authorizationv1.AuthorizationV1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.AuthorizationV1Client
+}
+
+// Deprecated: Authorization retrieves the default version of AuthorizationClient.
+// Please explicitly pick a version.
+func (c *Clientset) Authorization() authorizationv1.AuthorizationV1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.AuthorizationV1Client
+}
+
+// AuthorizationV1beta1 retrieves the AuthorizationV1beta1Client
+func (c *Clientset) AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.AuthorizationV1beta1Client
+}
+
+// AutoscalingV1 retrieves the AutoscalingV1Client
+func (c *Clientset) AutoscalingV1() autoscalingv1.AutoscalingV1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.AutoscalingV1Client
+}
+
+// Deprecated: Autoscaling retrieves the default version of AutoscalingClient.
+// Please explicitly pick a version.
+func (c *Clientset) Autoscaling() autoscalingv1.AutoscalingV1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.AutoscalingV1Client
+}
+
+// AutoscalingV2alpha1 retrieves the AutoscalingV2alpha1Client
+func (c *Clientset) AutoscalingV2alpha1() autoscalingv2alpha1.AutoscalingV2alpha1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.AutoscalingV2alpha1Client
+}
+
+// BatchV1 retrieves the BatchV1Client
+func (c *Clientset) BatchV1() batchv1.BatchV1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.BatchV1Client
+}
+
+// Deprecated: Batch retrieves the default version of BatchClient.
+// Please explicitly pick a version.
+func (c *Clientset) Batch() batchv1.BatchV1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.BatchV1Client
+}
+
+// BatchV2alpha1 retrieves the BatchV2alpha1Client
+func (c *Clientset) BatchV2alpha1() batchv2alpha1.BatchV2alpha1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.BatchV2alpha1Client
+}
+
+// CertificatesV1beta1 retrieves the CertificatesV1beta1Client
+func (c *Clientset) CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.CertificatesV1beta1Client
+}
+
+// Deprecated: Certificates retrieves the default version of CertificatesClient.
+// Please explicitly pick a version.
+func (c *Clientset) Certificates() certificatesv1beta1.CertificatesV1beta1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.CertificatesV1beta1Client
+}
+
+// ExtensionsV1beta1 retrieves the ExtensionsV1beta1Client
+func (c *Clientset) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.ExtensionsV1beta1Client
+}
+
+// Deprecated: Extensions retrieves the default version of ExtensionsClient.
+// Please explicitly pick a version.
+func (c *Clientset) Extensions() extensionsv1beta1.ExtensionsV1beta1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.ExtensionsV1beta1Client
+}
+
+// NetworkingV1 retrieves the NetworkingV1Client
+func (c *Clientset) NetworkingV1() networkingv1.NetworkingV1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.NetworkingV1Client
+}
+
+// Deprecated: Networking retrieves the default version of NetworkingClient.
+// Please explicitly pick a version.
+func (c *Clientset) Networking() networkingv1.NetworkingV1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.NetworkingV1Client
+}
+
+// PolicyV1beta1 retrieves the PolicyV1beta1Client
+func (c *Clientset) PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.PolicyV1beta1Client
+}
+
+// Deprecated: Policy retrieves the default version of PolicyClient.
+// Please explicitly pick a version.
+func (c *Clientset) Policy() policyv1beta1.PolicyV1beta1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.PolicyV1beta1Client
+}
+
+// RbacV1beta1 retrieves the RbacV1beta1Client
+func (c *Clientset) RbacV1beta1() rbacv1beta1.RbacV1beta1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.RbacV1beta1Client
+}
+
+// Deprecated: Rbac retrieves the default version of RbacClient.
+// Please explicitly pick a version.
+func (c *Clientset) Rbac() rbacv1beta1.RbacV1beta1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.RbacV1beta1Client
+}
+
+// RbacV1alpha1 retrieves the RbacV1alpha1Client
+func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.RbacV1alpha1Client
+}
+
+// SettingsV1alpha1 retrieves the SettingsV1alpha1Client
+func (c *Clientset) SettingsV1alpha1() settingsv1alpha1.SettingsV1alpha1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.SettingsV1alpha1Client
+}
+
+// Deprecated: Settings retrieves the default version of SettingsClient.
+// Please explicitly pick a version.
+func (c *Clientset) Settings() settingsv1alpha1.SettingsV1alpha1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.SettingsV1alpha1Client
+}
+
+// StorageV1beta1 retrieves the StorageV1beta1Client
+func (c *Clientset) StorageV1beta1() storagev1beta1.StorageV1beta1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.StorageV1beta1Client
+}
+
+// StorageV1 retrieves the StorageV1Client
+func (c *Clientset) StorageV1() storagev1.StorageV1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.StorageV1Client
+}
+
+// Deprecated: Storage retrieves the default version of StorageClient.
+// Please explicitly pick a version.
+func (c *Clientset) Storage() storagev1.StorageV1Interface {
+ if c == nil {
+ return nil
+ }
+ return c.StorageV1Client
+}
+
+// Discovery retrieves the DiscoveryClient
+func (c *Clientset) Discovery() discovery.DiscoveryInterface {
+ if c == nil {
+ return nil
+ }
+ return c.DiscoveryClient
+}
+
+// NewForConfig creates a new Clientset for the given config.
+func NewForConfig(c *rest.Config) (*Clientset, error) {
+ configShallowCopy := *c
+ if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 {
+ configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst)
+ }
+ var cs Clientset
+ var err error
+ cs.AdmissionregistrationV1alpha1Client, err = admissionregistrationv1alpha1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.CoreV1Client, err = corev1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.AppsV1beta1Client, err = appsv1beta1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.AuthenticationV1Client, err = authenticationv1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.AuthenticationV1beta1Client, err = authenticationv1beta1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.AuthorizationV1Client, err = authorizationv1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.AuthorizationV1beta1Client, err = authorizationv1beta1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.AutoscalingV1Client, err = autoscalingv1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.AutoscalingV2alpha1Client, err = autoscalingv2alpha1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.BatchV1Client, err = batchv1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.BatchV2alpha1Client, err = batchv2alpha1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.CertificatesV1beta1Client, err = certificatesv1beta1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.ExtensionsV1beta1Client, err = extensionsv1beta1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.NetworkingV1Client, err = networkingv1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.PolicyV1beta1Client, err = policyv1beta1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.RbacV1beta1Client, err = rbacv1beta1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.RbacV1alpha1Client, err = rbacv1alpha1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.SettingsV1alpha1Client, err = settingsv1alpha1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.StorageV1beta1Client, err = storagev1beta1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+ cs.StorageV1Client, err = storagev1.NewForConfig(&configShallowCopy)
+ if err != nil {
+ return nil, err
+ }
+
+ cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy)
+ if err != nil {
+ glog.Errorf("failed to create the DiscoveryClient: %v", err)
+ return nil, err
+ }
+ return &cs, nil
+}
+
+// NewForConfigOrDie creates a new Clientset for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *Clientset {
+ var cs Clientset
+ cs.AdmissionregistrationV1alpha1Client = admissionregistrationv1alpha1.NewForConfigOrDie(c)
+ cs.CoreV1Client = corev1.NewForConfigOrDie(c)
+ cs.AppsV1beta1Client = appsv1beta1.NewForConfigOrDie(c)
+ cs.AuthenticationV1Client = authenticationv1.NewForConfigOrDie(c)
+ cs.AuthenticationV1beta1Client = authenticationv1beta1.NewForConfigOrDie(c)
+ cs.AuthorizationV1Client = authorizationv1.NewForConfigOrDie(c)
+ cs.AuthorizationV1beta1Client = authorizationv1beta1.NewForConfigOrDie(c)
+ cs.AutoscalingV1Client = autoscalingv1.NewForConfigOrDie(c)
+ cs.AutoscalingV2alpha1Client = autoscalingv2alpha1.NewForConfigOrDie(c)
+ cs.BatchV1Client = batchv1.NewForConfigOrDie(c)
+ cs.BatchV2alpha1Client = batchv2alpha1.NewForConfigOrDie(c)
+ cs.CertificatesV1beta1Client = certificatesv1beta1.NewForConfigOrDie(c)
+ cs.ExtensionsV1beta1Client = extensionsv1beta1.NewForConfigOrDie(c)
+ cs.NetworkingV1Client = networkingv1.NewForConfigOrDie(c)
+ cs.PolicyV1beta1Client = policyv1beta1.NewForConfigOrDie(c)
+ cs.RbacV1beta1Client = rbacv1beta1.NewForConfigOrDie(c)
+ cs.RbacV1alpha1Client = rbacv1alpha1.NewForConfigOrDie(c)
+ cs.SettingsV1alpha1Client = settingsv1alpha1.NewForConfigOrDie(c)
+ cs.StorageV1beta1Client = storagev1beta1.NewForConfigOrDie(c)
+ cs.StorageV1Client = storagev1.NewForConfigOrDie(c)
+
+ cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
+ return &cs
+}
+
+// New creates a new Clientset for the given RESTClient.
+func New(c rest.Interface) *Clientset {
+ var cs Clientset
+ cs.AdmissionregistrationV1alpha1Client = admissionregistrationv1alpha1.New(c)
+ cs.CoreV1Client = corev1.New(c)
+ cs.AppsV1beta1Client = appsv1beta1.New(c)
+ cs.AuthenticationV1Client = authenticationv1.New(c)
+ cs.AuthenticationV1beta1Client = authenticationv1beta1.New(c)
+ cs.AuthorizationV1Client = authorizationv1.New(c)
+ cs.AuthorizationV1beta1Client = authorizationv1beta1.New(c)
+ cs.AutoscalingV1Client = autoscalingv1.New(c)
+ cs.AutoscalingV2alpha1Client = autoscalingv2alpha1.New(c)
+ cs.BatchV1Client = batchv1.New(c)
+ cs.BatchV2alpha1Client = batchv2alpha1.New(c)
+ cs.CertificatesV1beta1Client = certificatesv1beta1.New(c)
+ cs.ExtensionsV1beta1Client = extensionsv1beta1.New(c)
+ cs.NetworkingV1Client = networkingv1.New(c)
+ cs.PolicyV1beta1Client = policyv1beta1.New(c)
+ cs.RbacV1beta1Client = rbacv1beta1.New(c)
+ cs.RbacV1alpha1Client = rbacv1alpha1.New(c)
+ cs.SettingsV1alpha1Client = settingsv1alpha1.New(c)
+ cs.StorageV1beta1Client = storagev1beta1.New(c)
+ cs.StorageV1Client = storagev1.New(c)
+
+ cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
+ return &cs
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/doc.go
new file mode 100644
index 000000000..7d72e7fb2
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated clientset.
+package clientset
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/import_known_versions.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/import_known_versions.go
new file mode 100644
index 000000000..061c2af6d
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/import_known_versions.go
@@ -0,0 +1,42 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package clientset
+
+// These imports are the API groups the client will support.
+import (
+ "fmt"
+
+ "k8s.io/kubernetes/pkg/api"
+ _ "k8s.io/kubernetes/pkg/api/install"
+ _ "k8s.io/kubernetes/pkg/apis/apps/install"
+ _ "k8s.io/kubernetes/pkg/apis/authentication/install"
+ _ "k8s.io/kubernetes/pkg/apis/authorization/install"
+ _ "k8s.io/kubernetes/pkg/apis/autoscaling/install"
+ _ "k8s.io/kubernetes/pkg/apis/batch/install"
+ _ "k8s.io/kubernetes/pkg/apis/certificates/install"
+ _ "k8s.io/kubernetes/pkg/apis/extensions/install"
+ _ "k8s.io/kubernetes/pkg/apis/policy/install"
+ _ "k8s.io/kubernetes/pkg/apis/rbac/install"
+ _ "k8s.io/kubernetes/pkg/apis/settings/install"
+ _ "k8s.io/kubernetes/pkg/apis/storage/install"
+)
+
+func init() {
+ if missingVersions := api.Registry.ValidateEnvRequestedVersions(); len(missingVersions) != 0 {
+ panic(fmt.Sprintf("KUBE_API_VERSIONS contains versions that are not installed: %q.", missingVersions))
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme/doc.go
new file mode 100644
index 000000000..5d8ec824f
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package contains the scheme of the automatically generated clientset.
+package scheme
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme/register.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme/register.go
new file mode 100644
index 000000000..1047b67a6
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme/register.go
@@ -0,0 +1,91 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package scheme
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+ schema "k8s.io/apimachinery/pkg/runtime/schema"
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ corev1 "k8s.io/kubernetes/pkg/api/v1"
+ admissionregistrationv1alpha1 "k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1"
+ appsv1beta1 "k8s.io/kubernetes/pkg/apis/apps/v1beta1"
+ authenticationv1 "k8s.io/kubernetes/pkg/apis/authentication/v1"
+ authenticationv1beta1 "k8s.io/kubernetes/pkg/apis/authentication/v1beta1"
+ authorizationv1 "k8s.io/kubernetes/pkg/apis/authorization/v1"
+ authorizationv1beta1 "k8s.io/kubernetes/pkg/apis/authorization/v1beta1"
+ autoscalingv1 "k8s.io/kubernetes/pkg/apis/autoscaling/v1"
+ autoscalingv2alpha1 "k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1"
+ batchv1 "k8s.io/kubernetes/pkg/apis/batch/v1"
+ batchv2alpha1 "k8s.io/kubernetes/pkg/apis/batch/v2alpha1"
+ certificatesv1beta1 "k8s.io/kubernetes/pkg/apis/certificates/v1beta1"
+ extensionsv1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
+ networkingv1 "k8s.io/kubernetes/pkg/apis/networking/v1"
+ policyv1beta1 "k8s.io/kubernetes/pkg/apis/policy/v1beta1"
+ rbacv1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1"
+ rbacv1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1"
+ settingsv1alpha1 "k8s.io/kubernetes/pkg/apis/settings/v1alpha1"
+ storagev1 "k8s.io/kubernetes/pkg/apis/storage/v1"
+ storagev1beta1 "k8s.io/kubernetes/pkg/apis/storage/v1beta1"
+)
+
+var Scheme = runtime.NewScheme()
+var Codecs = serializer.NewCodecFactory(Scheme)
+var ParameterCodec = runtime.NewParameterCodec(Scheme)
+
+func init() {
+ v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"})
+ AddToScheme(Scheme)
+}
+
+// AddToScheme adds all types of this clientset into the given scheme. This allows composition
+// of clientsets, like in:
+//
+// import (
+// "k8s.io/client-go/kubernetes"
+// clientsetscheme "k8s.io/client-go/kuberentes/scheme"
+// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
+// )
+//
+// kclientset, _ := kubernetes.NewForConfig(c)
+// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
+//
+// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
+// correctly.
+func AddToScheme(scheme *runtime.Scheme) {
+ admissionregistrationv1alpha1.AddToScheme(scheme)
+ corev1.AddToScheme(scheme)
+ appsv1beta1.AddToScheme(scheme)
+ authenticationv1.AddToScheme(scheme)
+ authenticationv1beta1.AddToScheme(scheme)
+ authorizationv1.AddToScheme(scheme)
+ authorizationv1beta1.AddToScheme(scheme)
+ autoscalingv1.AddToScheme(scheme)
+ autoscalingv2alpha1.AddToScheme(scheme)
+ batchv1.AddToScheme(scheme)
+ batchv2alpha1.AddToScheme(scheme)
+ certificatesv1beta1.AddToScheme(scheme)
+ extensionsv1beta1.AddToScheme(scheme)
+ networkingv1.AddToScheme(scheme)
+ policyv1beta1.AddToScheme(scheme)
+ rbacv1beta1.AddToScheme(scheme)
+ rbacv1alpha1.AddToScheme(scheme)
+ settingsv1alpha1.AddToScheme(scheme)
+ storagev1beta1.AddToScheme(scheme)
+ storagev1.AddToScheme(scheme)
+
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/admissionregistration/v1alpha1/admissionregistration_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/admissionregistration/v1alpha1/admissionregistration_client.go
new file mode 100644
index 000000000..87994cbeb
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/admissionregistration/v1alpha1/admissionregistration_client.go
@@ -0,0 +1,93 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ rest "k8s.io/client-go/rest"
+ v1alpha1 "k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+type AdmissionregistrationV1alpha1Interface interface {
+ RESTClient() rest.Interface
+ ExternalAdmissionHookConfigurationsGetter
+ InitializerConfigurationsGetter
+}
+
+// AdmissionregistrationV1alpha1Client is used to interact with features provided by the admissionregistration.k8s.io group.
+type AdmissionregistrationV1alpha1Client struct {
+ restClient rest.Interface
+}
+
+func (c *AdmissionregistrationV1alpha1Client) ExternalAdmissionHookConfigurations() ExternalAdmissionHookConfigurationInterface {
+ return newExternalAdmissionHookConfigurations(c)
+}
+
+func (c *AdmissionregistrationV1alpha1Client) InitializerConfigurations() InitializerConfigurationInterface {
+ return newInitializerConfigurations(c)
+}
+
+// NewForConfig creates a new AdmissionregistrationV1alpha1Client for the given config.
+func NewForConfig(c *rest.Config) (*AdmissionregistrationV1alpha1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &AdmissionregistrationV1alpha1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new AdmissionregistrationV1alpha1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *AdmissionregistrationV1alpha1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new AdmissionregistrationV1alpha1Client for the given RESTClient.
+func New(c rest.Interface) *AdmissionregistrationV1alpha1Client {
+ return &AdmissionregistrationV1alpha1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1alpha1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *AdmissionregistrationV1alpha1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/admissionregistration/v1alpha1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/admissionregistration/v1alpha1/doc.go
new file mode 100644
index 000000000..ba8d10d3b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/admissionregistration/v1alpha1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1alpha1
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/admissionregistration/v1alpha1/externaladmissionhookconfiguration.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/admissionregistration/v1alpha1/externaladmissionhookconfiguration.go
new file mode 100644
index 000000000..4af07b1a9
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/admissionregistration/v1alpha1/externaladmissionhookconfiguration.go
@@ -0,0 +1,145 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1alpha1 "k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// ExternalAdmissionHookConfigurationsGetter has a method to return a ExternalAdmissionHookConfigurationInterface.
+// A group's client should implement this interface.
+type ExternalAdmissionHookConfigurationsGetter interface {
+ ExternalAdmissionHookConfigurations() ExternalAdmissionHookConfigurationInterface
+}
+
+// ExternalAdmissionHookConfigurationInterface has methods to work with ExternalAdmissionHookConfiguration resources.
+type ExternalAdmissionHookConfigurationInterface interface {
+ Create(*v1alpha1.ExternalAdmissionHookConfiguration) (*v1alpha1.ExternalAdmissionHookConfiguration, error)
+ Update(*v1alpha1.ExternalAdmissionHookConfiguration) (*v1alpha1.ExternalAdmissionHookConfiguration, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1alpha1.ExternalAdmissionHookConfiguration, error)
+ List(opts v1.ListOptions) (*v1alpha1.ExternalAdmissionHookConfigurationList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ExternalAdmissionHookConfiguration, err error)
+ ExternalAdmissionHookConfigurationExpansion
+}
+
+// externalAdmissionHookConfigurations implements ExternalAdmissionHookConfigurationInterface
+type externalAdmissionHookConfigurations struct {
+ client rest.Interface
+}
+
+// newExternalAdmissionHookConfigurations returns a ExternalAdmissionHookConfigurations
+func newExternalAdmissionHookConfigurations(c *AdmissionregistrationV1alpha1Client) *externalAdmissionHookConfigurations {
+ return &externalAdmissionHookConfigurations{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a externalAdmissionHookConfiguration and creates it. Returns the server's representation of the externalAdmissionHookConfiguration, and an error, if there is any.
+func (c *externalAdmissionHookConfigurations) Create(externalAdmissionHookConfiguration *v1alpha1.ExternalAdmissionHookConfiguration) (result *v1alpha1.ExternalAdmissionHookConfiguration, err error) {
+ result = &v1alpha1.ExternalAdmissionHookConfiguration{}
+ err = c.client.Post().
+ Resource("externaladmissionhookconfigurations").
+ Body(externalAdmissionHookConfiguration).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a externalAdmissionHookConfiguration and updates it. Returns the server's representation of the externalAdmissionHookConfiguration, and an error, if there is any.
+func (c *externalAdmissionHookConfigurations) Update(externalAdmissionHookConfiguration *v1alpha1.ExternalAdmissionHookConfiguration) (result *v1alpha1.ExternalAdmissionHookConfiguration, err error) {
+ result = &v1alpha1.ExternalAdmissionHookConfiguration{}
+ err = c.client.Put().
+ Resource("externaladmissionhookconfigurations").
+ Name(externalAdmissionHookConfiguration.Name).
+ Body(externalAdmissionHookConfiguration).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the externalAdmissionHookConfiguration and deletes it. Returns an error if one occurs.
+func (c *externalAdmissionHookConfigurations) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("externaladmissionhookconfigurations").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *externalAdmissionHookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("externaladmissionhookconfigurations").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the externalAdmissionHookConfiguration, and returns the corresponding externalAdmissionHookConfiguration object, and an error if there is any.
+func (c *externalAdmissionHookConfigurations) Get(name string, options v1.GetOptions) (result *v1alpha1.ExternalAdmissionHookConfiguration, err error) {
+ result = &v1alpha1.ExternalAdmissionHookConfiguration{}
+ err = c.client.Get().
+ Resource("externaladmissionhookconfigurations").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of ExternalAdmissionHookConfigurations that match those selectors.
+func (c *externalAdmissionHookConfigurations) List(opts v1.ListOptions) (result *v1alpha1.ExternalAdmissionHookConfigurationList, err error) {
+ result = &v1alpha1.ExternalAdmissionHookConfigurationList{}
+ err = c.client.Get().
+ Resource("externaladmissionhookconfigurations").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested externalAdmissionHookConfigurations.
+func (c *externalAdmissionHookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("externaladmissionhookconfigurations").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched externalAdmissionHookConfiguration.
+func (c *externalAdmissionHookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ExternalAdmissionHookConfiguration, err error) {
+ result = &v1alpha1.ExternalAdmissionHookConfiguration{}
+ err = c.client.Patch(pt).
+ Resource("externaladmissionhookconfigurations").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/admissionregistration/v1alpha1/generated_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/admissionregistration/v1alpha1/generated_expansion.go
new file mode 100644
index 000000000..eef439ab4
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/admissionregistration/v1alpha1/generated_expansion.go
@@ -0,0 +1,21 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+type ExternalAdmissionHookConfigurationExpansion interface{}
+
+type InitializerConfigurationExpansion interface{}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/admissionregistration/v1alpha1/initializerconfiguration.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/admissionregistration/v1alpha1/initializerconfiguration.go
new file mode 100644
index 000000000..9a7ba3aad
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/admissionregistration/v1alpha1/initializerconfiguration.go
@@ -0,0 +1,145 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1alpha1 "k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// InitializerConfigurationsGetter has a method to return a InitializerConfigurationInterface.
+// A group's client should implement this interface.
+type InitializerConfigurationsGetter interface {
+ InitializerConfigurations() InitializerConfigurationInterface
+}
+
+// InitializerConfigurationInterface has methods to work with InitializerConfiguration resources.
+type InitializerConfigurationInterface interface {
+ Create(*v1alpha1.InitializerConfiguration) (*v1alpha1.InitializerConfiguration, error)
+ Update(*v1alpha1.InitializerConfiguration) (*v1alpha1.InitializerConfiguration, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1alpha1.InitializerConfiguration, error)
+ List(opts v1.ListOptions) (*v1alpha1.InitializerConfigurationList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.InitializerConfiguration, err error)
+ InitializerConfigurationExpansion
+}
+
+// initializerConfigurations implements InitializerConfigurationInterface
+type initializerConfigurations struct {
+ client rest.Interface
+}
+
+// newInitializerConfigurations returns a InitializerConfigurations
+func newInitializerConfigurations(c *AdmissionregistrationV1alpha1Client) *initializerConfigurations {
+ return &initializerConfigurations{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a initializerConfiguration and creates it. Returns the server's representation of the initializerConfiguration, and an error, if there is any.
+func (c *initializerConfigurations) Create(initializerConfiguration *v1alpha1.InitializerConfiguration) (result *v1alpha1.InitializerConfiguration, err error) {
+ result = &v1alpha1.InitializerConfiguration{}
+ err = c.client.Post().
+ Resource("initializerconfigurations").
+ Body(initializerConfiguration).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a initializerConfiguration and updates it. Returns the server's representation of the initializerConfiguration, and an error, if there is any.
+func (c *initializerConfigurations) Update(initializerConfiguration *v1alpha1.InitializerConfiguration) (result *v1alpha1.InitializerConfiguration, err error) {
+ result = &v1alpha1.InitializerConfiguration{}
+ err = c.client.Put().
+ Resource("initializerconfigurations").
+ Name(initializerConfiguration.Name).
+ Body(initializerConfiguration).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the initializerConfiguration and deletes it. Returns an error if one occurs.
+func (c *initializerConfigurations) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("initializerconfigurations").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *initializerConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("initializerconfigurations").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the initializerConfiguration, and returns the corresponding initializerConfiguration object, and an error if there is any.
+func (c *initializerConfigurations) Get(name string, options v1.GetOptions) (result *v1alpha1.InitializerConfiguration, err error) {
+ result = &v1alpha1.InitializerConfiguration{}
+ err = c.client.Get().
+ Resource("initializerconfigurations").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of InitializerConfigurations that match those selectors.
+func (c *initializerConfigurations) List(opts v1.ListOptions) (result *v1alpha1.InitializerConfigurationList, err error) {
+ result = &v1alpha1.InitializerConfigurationList{}
+ err = c.client.Get().
+ Resource("initializerconfigurations").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested initializerConfigurations.
+func (c *initializerConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("initializerconfigurations").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched initializerConfiguration.
+func (c *initializerConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.InitializerConfiguration, err error) {
+ result = &v1alpha1.InitializerConfiguration{}
+ err = c.client.Patch(pt).
+ Resource("initializerconfigurations").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/apps_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/apps_client.go
new file mode 100644
index 000000000..18ab6a6f1
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/apps_client.go
@@ -0,0 +1,103 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ rest "k8s.io/client-go/rest"
+ v1beta1 "k8s.io/kubernetes/pkg/apis/apps/v1beta1"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+type AppsV1beta1Interface interface {
+ RESTClient() rest.Interface
+ ControllerRevisionsGetter
+ DeploymentsGetter
+ ScalesGetter
+ StatefulSetsGetter
+}
+
+// AppsV1beta1Client is used to interact with features provided by the apps group.
+type AppsV1beta1Client struct {
+ restClient rest.Interface
+}
+
+func (c *AppsV1beta1Client) ControllerRevisions(namespace string) ControllerRevisionInterface {
+ return newControllerRevisions(c, namespace)
+}
+
+func (c *AppsV1beta1Client) Deployments(namespace string) DeploymentInterface {
+ return newDeployments(c, namespace)
+}
+
+func (c *AppsV1beta1Client) Scales(namespace string) ScaleInterface {
+ return newScales(c, namespace)
+}
+
+func (c *AppsV1beta1Client) StatefulSets(namespace string) StatefulSetInterface {
+ return newStatefulSets(c, namespace)
+}
+
+// NewForConfig creates a new AppsV1beta1Client for the given config.
+func NewForConfig(c *rest.Config) (*AppsV1beta1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &AppsV1beta1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new AppsV1beta1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *AppsV1beta1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new AppsV1beta1Client for the given RESTClient.
+func New(c rest.Interface) *AppsV1beta1Client {
+ return &AppsV1beta1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1beta1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *AppsV1beta1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/controllerrevision.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/controllerrevision.go
new file mode 100644
index 000000000..ce536b0dd
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/controllerrevision.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1beta1 "k8s.io/kubernetes/pkg/apis/apps/v1beta1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// ControllerRevisionsGetter has a method to return a ControllerRevisionInterface.
+// A group's client should implement this interface.
+type ControllerRevisionsGetter interface {
+ ControllerRevisions(namespace string) ControllerRevisionInterface
+}
+
+// ControllerRevisionInterface has methods to work with ControllerRevision resources.
+type ControllerRevisionInterface interface {
+ Create(*v1beta1.ControllerRevision) (*v1beta1.ControllerRevision, error)
+ Update(*v1beta1.ControllerRevision) (*v1beta1.ControllerRevision, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.ControllerRevision, error)
+ List(opts v1.ListOptions) (*v1beta1.ControllerRevisionList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ControllerRevision, err error)
+ ControllerRevisionExpansion
+}
+
+// controllerRevisions implements ControllerRevisionInterface
+type controllerRevisions struct {
+ client rest.Interface
+ ns string
+}
+
+// newControllerRevisions returns a ControllerRevisions
+func newControllerRevisions(c *AppsV1beta1Client, namespace string) *controllerRevisions {
+ return &controllerRevisions{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any.
+func (c *controllerRevisions) Create(controllerRevision *v1beta1.ControllerRevision) (result *v1beta1.ControllerRevision, err error) {
+ result = &v1beta1.ControllerRevision{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("controllerrevisions").
+ Body(controllerRevision).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any.
+func (c *controllerRevisions) Update(controllerRevision *v1beta1.ControllerRevision) (result *v1beta1.ControllerRevision, err error) {
+ result = &v1beta1.ControllerRevision{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("controllerrevisions").
+ Name(controllerRevision.Name).
+ Body(controllerRevision).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs.
+func (c *controllerRevisions) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("controllerrevisions").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *controllerRevisions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("controllerrevisions").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any.
+func (c *controllerRevisions) Get(name string, options v1.GetOptions) (result *v1beta1.ControllerRevision, err error) {
+ result = &v1beta1.ControllerRevision{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("controllerrevisions").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors.
+func (c *controllerRevisions) List(opts v1.ListOptions) (result *v1beta1.ControllerRevisionList, err error) {
+ result = &v1beta1.ControllerRevisionList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("controllerrevisions").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested controllerRevisions.
+func (c *controllerRevisions) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("controllerrevisions").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched controllerRevision.
+func (c *controllerRevisions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ControllerRevision, err error) {
+ result = &v1beta1.ControllerRevision{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("controllerrevisions").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/deployment.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/deployment.go
new file mode 100644
index 000000000..9e375f685
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/deployment.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1beta1 "k8s.io/kubernetes/pkg/apis/apps/v1beta1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// DeploymentsGetter has a method to return a DeploymentInterface.
+// A group's client should implement this interface.
+type DeploymentsGetter interface {
+ Deployments(namespace string) DeploymentInterface
+}
+
+// DeploymentInterface has methods to work with Deployment resources.
+type DeploymentInterface interface {
+ Create(*v1beta1.Deployment) (*v1beta1.Deployment, error)
+ Update(*v1beta1.Deployment) (*v1beta1.Deployment, error)
+ UpdateStatus(*v1beta1.Deployment) (*v1beta1.Deployment, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.Deployment, error)
+ List(opts v1.ListOptions) (*v1beta1.DeploymentList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error)
+ DeploymentExpansion
+}
+
+// deployments implements DeploymentInterface
+type deployments struct {
+ client rest.Interface
+ ns string
+}
+
+// newDeployments returns a Deployments
+func newDeployments(c *AppsV1beta1Client, namespace string) *deployments {
+ return &deployments{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any.
+func (c *deployments) Create(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
+ result = &v1beta1.Deployment{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("deployments").
+ Body(deployment).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any.
+func (c *deployments) Update(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
+ result = &v1beta1.Deployment{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("deployments").
+ Name(deployment.Name).
+ Body(deployment).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *deployments) UpdateStatus(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
+ result = &v1beta1.Deployment{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("deployments").
+ Name(deployment.Name).
+ SubResource("status").
+ Body(deployment).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the deployment and deletes it. Returns an error if one occurs.
+func (c *deployments) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("deployments").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("deployments").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any.
+func (c *deployments) Get(name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) {
+ result = &v1beta1.Deployment{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("deployments").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Deployments that match those selectors.
+func (c *deployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) {
+ result = &v1beta1.DeploymentList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("deployments").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested deployments.
+func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("deployments").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched deployment.
+func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) {
+ result = &v1beta1.Deployment{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("deployments").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/doc.go
new file mode 100644
index 000000000..11b523897
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1beta1
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/generated_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/generated_expansion.go
new file mode 100644
index 000000000..a091b902a
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/generated_expansion.go
@@ -0,0 +1,25 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+type ControllerRevisionExpansion interface{}
+
+type DeploymentExpansion interface{}
+
+type ScaleExpansion interface{}
+
+type StatefulSetExpansion interface{}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/scale.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/scale.go
new file mode 100644
index 000000000..d3bf9e103
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/scale.go
@@ -0,0 +1,46 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ rest "k8s.io/client-go/rest"
+)
+
+// ScalesGetter has a method to return a ScaleInterface.
+// A group's client should implement this interface.
+type ScalesGetter interface {
+ Scales(namespace string) ScaleInterface
+}
+
+// ScaleInterface has methods to work with Scale resources.
+type ScaleInterface interface {
+ ScaleExpansion
+}
+
+// scales implements ScaleInterface
+type scales struct {
+ client rest.Interface
+ ns string
+}
+
+// newScales returns a Scales
+func newScales(c *AppsV1beta1Client, namespace string) *scales {
+ return &scales{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/statefulset.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/statefulset.go
new file mode 100644
index 000000000..7acff8de0
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/statefulset.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1beta1 "k8s.io/kubernetes/pkg/apis/apps/v1beta1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// StatefulSetsGetter has a method to return a StatefulSetInterface.
+// A group's client should implement this interface.
+type StatefulSetsGetter interface {
+ StatefulSets(namespace string) StatefulSetInterface
+}
+
+// StatefulSetInterface has methods to work with StatefulSet resources.
+type StatefulSetInterface interface {
+ Create(*v1beta1.StatefulSet) (*v1beta1.StatefulSet, error)
+ Update(*v1beta1.StatefulSet) (*v1beta1.StatefulSet, error)
+ UpdateStatus(*v1beta1.StatefulSet) (*v1beta1.StatefulSet, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.StatefulSet, error)
+ List(opts v1.ListOptions) (*v1beta1.StatefulSetList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error)
+ StatefulSetExpansion
+}
+
+// statefulSets implements StatefulSetInterface
+type statefulSets struct {
+ client rest.Interface
+ ns string
+}
+
+// newStatefulSets returns a StatefulSets
+func newStatefulSets(c *AppsV1beta1Client, namespace string) *statefulSets {
+ return &statefulSets{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any.
+func (c *statefulSets) Create(statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) {
+ result = &v1beta1.StatefulSet{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("statefulsets").
+ Body(statefulSet).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any.
+func (c *statefulSets) Update(statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) {
+ result = &v1beta1.StatefulSet{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("statefulsets").
+ Name(statefulSet.Name).
+ Body(statefulSet).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *statefulSets) UpdateStatus(statefulSet *v1beta1.StatefulSet) (result *v1beta1.StatefulSet, err error) {
+ result = &v1beta1.StatefulSet{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("statefulsets").
+ Name(statefulSet.Name).
+ SubResource("status").
+ Body(statefulSet).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs.
+func (c *statefulSets) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("statefulsets").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *statefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("statefulsets").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any.
+func (c *statefulSets) Get(name string, options v1.GetOptions) (result *v1beta1.StatefulSet, err error) {
+ result = &v1beta1.StatefulSet{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("statefulsets").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of StatefulSets that match those selectors.
+func (c *statefulSets) List(opts v1.ListOptions) (result *v1beta1.StatefulSetList, err error) {
+ result = &v1beta1.StatefulSetList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("statefulsets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested statefulSets.
+func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("statefulsets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched statefulSet.
+func (c *statefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) {
+ result = &v1beta1.StatefulSet{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("statefulsets").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1/authentication_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1/authentication_client.go
new file mode 100644
index 000000000..beed71ea3
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1/authentication_client.go
@@ -0,0 +1,88 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ rest "k8s.io/client-go/rest"
+ v1 "k8s.io/kubernetes/pkg/apis/authentication/v1"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+type AuthenticationV1Interface interface {
+ RESTClient() rest.Interface
+ TokenReviewsGetter
+}
+
+// AuthenticationV1Client is used to interact with features provided by the authentication.k8s.io group.
+type AuthenticationV1Client struct {
+ restClient rest.Interface
+}
+
+func (c *AuthenticationV1Client) TokenReviews() TokenReviewInterface {
+ return newTokenReviews(c)
+}
+
+// NewForConfig creates a new AuthenticationV1Client for the given config.
+func NewForConfig(c *rest.Config) (*AuthenticationV1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &AuthenticationV1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new AuthenticationV1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *AuthenticationV1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new AuthenticationV1Client for the given RESTClient.
+func New(c rest.Interface) *AuthenticationV1Client {
+ return &AuthenticationV1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *AuthenticationV1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1/doc.go
new file mode 100644
index 000000000..54673bfa7
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1/generated_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1/generated_expansion.go
new file mode 100644
index 000000000..42e76d5e4
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1/generated_expansion.go
@@ -0,0 +1,17 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1/tokenreview.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1/tokenreview.go
new file mode 100644
index 000000000..9cfef4e6a
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1/tokenreview.go
@@ -0,0 +1,44 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ rest "k8s.io/client-go/rest"
+)
+
+// TokenReviewsGetter has a method to return a TokenReviewInterface.
+// A group's client should implement this interface.
+type TokenReviewsGetter interface {
+ TokenReviews() TokenReviewInterface
+}
+
+// TokenReviewInterface has methods to work with TokenReview resources.
+type TokenReviewInterface interface {
+ TokenReviewExpansion
+}
+
+// tokenReviews implements TokenReviewInterface
+type tokenReviews struct {
+ client rest.Interface
+}
+
+// newTokenReviews returns a TokenReviews
+func newTokenReviews(c *AuthenticationV1Client) *tokenReviews {
+ return &tokenReviews{
+ client: c.RESTClient(),
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1/tokenreview_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1/tokenreview_expansion.go
new file mode 100644
index 000000000..012749ec3
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1/tokenreview_expansion.go
@@ -0,0 +1,35 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ authenticationapi "k8s.io/kubernetes/pkg/apis/authentication/v1"
+)
+
+type TokenReviewExpansion interface {
+ Create(tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error)
+}
+
+func (c *tokenReviews) Create(tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) {
+ result = &authenticationapi.TokenReview{}
+ err = c.client.Post().
+ Resource("tokenreviews").
+ Body(tokenReview).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/authentication_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/authentication_client.go
new file mode 100644
index 000000000..b3aa17eb0
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/authentication_client.go
@@ -0,0 +1,88 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ rest "k8s.io/client-go/rest"
+ v1beta1 "k8s.io/kubernetes/pkg/apis/authentication/v1beta1"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+type AuthenticationV1beta1Interface interface {
+ RESTClient() rest.Interface
+ TokenReviewsGetter
+}
+
+// AuthenticationV1beta1Client is used to interact with features provided by the authentication.k8s.io group.
+type AuthenticationV1beta1Client struct {
+ restClient rest.Interface
+}
+
+func (c *AuthenticationV1beta1Client) TokenReviews() TokenReviewInterface {
+ return newTokenReviews(c)
+}
+
+// NewForConfig creates a new AuthenticationV1beta1Client for the given config.
+func NewForConfig(c *rest.Config) (*AuthenticationV1beta1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &AuthenticationV1beta1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new AuthenticationV1beta1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *AuthenticationV1beta1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new AuthenticationV1beta1Client for the given RESTClient.
+func New(c rest.Interface) *AuthenticationV1beta1Client {
+ return &AuthenticationV1beta1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1beta1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *AuthenticationV1beta1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/doc.go
new file mode 100644
index 000000000..11b523897
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1beta1
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/generated_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/generated_expansion.go
new file mode 100644
index 000000000..2b7e8ca0b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/generated_expansion.go
@@ -0,0 +1,17 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/tokenreview.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/tokenreview.go
new file mode 100644
index 000000000..7f9f1e9fa
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/tokenreview.go
@@ -0,0 +1,44 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ rest "k8s.io/client-go/rest"
+)
+
+// TokenReviewsGetter has a method to return a TokenReviewInterface.
+// A group's client should implement this interface.
+type TokenReviewsGetter interface {
+ TokenReviews() TokenReviewInterface
+}
+
+// TokenReviewInterface has methods to work with TokenReview resources.
+type TokenReviewInterface interface {
+ TokenReviewExpansion
+}
+
+// tokenReviews implements TokenReviewInterface
+type tokenReviews struct {
+ client rest.Interface
+}
+
+// newTokenReviews returns a TokenReviews
+func newTokenReviews(c *AuthenticationV1beta1Client) *tokenReviews {
+ return &tokenReviews{
+ client: c.RESTClient(),
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/tokenreview_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/tokenreview_expansion.go
new file mode 100644
index 000000000..35d81d80f
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/tokenreview_expansion.go
@@ -0,0 +1,35 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ authenticationapi "k8s.io/kubernetes/pkg/apis/authentication/v1beta1"
+)
+
+type TokenReviewExpansion interface {
+ Create(tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error)
+}
+
+func (c *tokenReviews) Create(tokenReview *authenticationapi.TokenReview) (result *authenticationapi.TokenReview, err error) {
+ result = &authenticationapi.TokenReview{}
+ err = c.client.Post().
+ Resource("tokenreviews").
+ Body(tokenReview).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/authorization_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/authorization_client.go
new file mode 100644
index 000000000..232fdc959
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/authorization_client.go
@@ -0,0 +1,98 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ rest "k8s.io/client-go/rest"
+ v1 "k8s.io/kubernetes/pkg/apis/authorization/v1"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+type AuthorizationV1Interface interface {
+ RESTClient() rest.Interface
+ LocalSubjectAccessReviewsGetter
+ SelfSubjectAccessReviewsGetter
+ SubjectAccessReviewsGetter
+}
+
+// AuthorizationV1Client is used to interact with features provided by the authorization.k8s.io group.
+type AuthorizationV1Client struct {
+ restClient rest.Interface
+}
+
+func (c *AuthorizationV1Client) LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewInterface {
+ return newLocalSubjectAccessReviews(c, namespace)
+}
+
+func (c *AuthorizationV1Client) SelfSubjectAccessReviews() SelfSubjectAccessReviewInterface {
+ return newSelfSubjectAccessReviews(c)
+}
+
+func (c *AuthorizationV1Client) SubjectAccessReviews() SubjectAccessReviewInterface {
+ return newSubjectAccessReviews(c)
+}
+
+// NewForConfig creates a new AuthorizationV1Client for the given config.
+func NewForConfig(c *rest.Config) (*AuthorizationV1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &AuthorizationV1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new AuthorizationV1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *AuthorizationV1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new AuthorizationV1Client for the given RESTClient.
+func New(c rest.Interface) *AuthorizationV1Client {
+ return &AuthorizationV1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *AuthorizationV1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/doc.go
new file mode 100644
index 000000000..54673bfa7
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/generated_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/generated_expansion.go
new file mode 100644
index 000000000..42e76d5e4
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/generated_expansion.go
@@ -0,0 +1,17 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/localsubjectaccessreview.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/localsubjectaccessreview.go
new file mode 100644
index 000000000..b2085bceb
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/localsubjectaccessreview.go
@@ -0,0 +1,46 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ rest "k8s.io/client-go/rest"
+)
+
+// LocalSubjectAccessReviewsGetter has a method to return a LocalSubjectAccessReviewInterface.
+// A group's client should implement this interface.
+type LocalSubjectAccessReviewsGetter interface {
+ LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewInterface
+}
+
+// LocalSubjectAccessReviewInterface has methods to work with LocalSubjectAccessReview resources.
+type LocalSubjectAccessReviewInterface interface {
+ LocalSubjectAccessReviewExpansion
+}
+
+// localSubjectAccessReviews implements LocalSubjectAccessReviewInterface
+type localSubjectAccessReviews struct {
+ client rest.Interface
+ ns string
+}
+
+// newLocalSubjectAccessReviews returns a LocalSubjectAccessReviews
+func newLocalSubjectAccessReviews(c *AuthorizationV1Client, namespace string) *localSubjectAccessReviews {
+ return &localSubjectAccessReviews{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/localsubjectaccessreview_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/localsubjectaccessreview_expansion.go
new file mode 100644
index 000000000..13dd9ff3f
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/localsubjectaccessreview_expansion.go
@@ -0,0 +1,36 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ authorizationapi "k8s.io/kubernetes/pkg/apis/authorization/v1"
+)
+
+type LocalSubjectAccessReviewExpansion interface {
+ Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error)
+}
+
+func (c *localSubjectAccessReviews) Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) {
+ result = &authorizationapi.LocalSubjectAccessReview{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("localsubjectaccessreviews").
+ Body(sar).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/selfsubjectaccessreview.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/selfsubjectaccessreview.go
new file mode 100644
index 000000000..cfb019eaa
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/selfsubjectaccessreview.go
@@ -0,0 +1,44 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ rest "k8s.io/client-go/rest"
+)
+
+// SelfSubjectAccessReviewsGetter has a method to return a SelfSubjectAccessReviewInterface.
+// A group's client should implement this interface.
+type SelfSubjectAccessReviewsGetter interface {
+ SelfSubjectAccessReviews() SelfSubjectAccessReviewInterface
+}
+
+// SelfSubjectAccessReviewInterface has methods to work with SelfSubjectAccessReview resources.
+type SelfSubjectAccessReviewInterface interface {
+ SelfSubjectAccessReviewExpansion
+}
+
+// selfSubjectAccessReviews implements SelfSubjectAccessReviewInterface
+type selfSubjectAccessReviews struct {
+ client rest.Interface
+}
+
+// newSelfSubjectAccessReviews returns a SelfSubjectAccessReviews
+func newSelfSubjectAccessReviews(c *AuthorizationV1Client) *selfSubjectAccessReviews {
+ return &selfSubjectAccessReviews{
+ client: c.RESTClient(),
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/selfsubjectaccessreview_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/selfsubjectaccessreview_expansion.go
new file mode 100644
index 000000000..698d8eef4
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/selfsubjectaccessreview_expansion.go
@@ -0,0 +1,35 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ authorizationapi "k8s.io/kubernetes/pkg/apis/authorization/v1"
+)
+
+type SelfSubjectAccessReviewExpansion interface {
+ Create(sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error)
+}
+
+func (c *selfSubjectAccessReviews) Create(sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) {
+ result = &authorizationapi.SelfSubjectAccessReview{}
+ err = c.client.Post().
+ Resource("selfsubjectaccessreviews").
+ Body(sar).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/subjectaccessreview.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/subjectaccessreview.go
new file mode 100644
index 000000000..08f6d6095
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/subjectaccessreview.go
@@ -0,0 +1,44 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ rest "k8s.io/client-go/rest"
+)
+
+// SubjectAccessReviewsGetter has a method to return a SubjectAccessReviewInterface.
+// A group's client should implement this interface.
+type SubjectAccessReviewsGetter interface {
+ SubjectAccessReviews() SubjectAccessReviewInterface
+}
+
+// SubjectAccessReviewInterface has methods to work with SubjectAccessReview resources.
+type SubjectAccessReviewInterface interface {
+ SubjectAccessReviewExpansion
+}
+
+// subjectAccessReviews implements SubjectAccessReviewInterface
+type subjectAccessReviews struct {
+ client rest.Interface
+}
+
+// newSubjectAccessReviews returns a SubjectAccessReviews
+func newSubjectAccessReviews(c *AuthorizationV1Client) *subjectAccessReviews {
+ return &subjectAccessReviews{
+ client: c.RESTClient(),
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/subjectaccessreview_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/subjectaccessreview_expansion.go
new file mode 100644
index 000000000..eb1db8981
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1/subjectaccessreview_expansion.go
@@ -0,0 +1,36 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ authorizationapi "k8s.io/kubernetes/pkg/apis/authorization/v1"
+)
+
+// The SubjectAccessReviewExpansion interface allows manually adding extra methods to the AuthorizationInterface.
+type SubjectAccessReviewExpansion interface {
+ Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error)
+}
+
+func (c *subjectAccessReviews) Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) {
+ result = &authorizationapi.SubjectAccessReview{}
+ err = c.client.Post().
+ Resource("subjectaccessreviews").
+ Body(sar).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/authorization_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/authorization_client.go
new file mode 100644
index 000000000..3801cdc75
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/authorization_client.go
@@ -0,0 +1,98 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ rest "k8s.io/client-go/rest"
+ v1beta1 "k8s.io/kubernetes/pkg/apis/authorization/v1beta1"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+type AuthorizationV1beta1Interface interface {
+ RESTClient() rest.Interface
+ LocalSubjectAccessReviewsGetter
+ SelfSubjectAccessReviewsGetter
+ SubjectAccessReviewsGetter
+}
+
+// AuthorizationV1beta1Client is used to interact with features provided by the authorization.k8s.io group.
+type AuthorizationV1beta1Client struct {
+ restClient rest.Interface
+}
+
+func (c *AuthorizationV1beta1Client) LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewInterface {
+ return newLocalSubjectAccessReviews(c, namespace)
+}
+
+func (c *AuthorizationV1beta1Client) SelfSubjectAccessReviews() SelfSubjectAccessReviewInterface {
+ return newSelfSubjectAccessReviews(c)
+}
+
+func (c *AuthorizationV1beta1Client) SubjectAccessReviews() SubjectAccessReviewInterface {
+ return newSubjectAccessReviews(c)
+}
+
+// NewForConfig creates a new AuthorizationV1beta1Client for the given config.
+func NewForConfig(c *rest.Config) (*AuthorizationV1beta1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &AuthorizationV1beta1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new AuthorizationV1beta1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *AuthorizationV1beta1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new AuthorizationV1beta1Client for the given RESTClient.
+func New(c rest.Interface) *AuthorizationV1beta1Client {
+ return &AuthorizationV1beta1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1beta1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *AuthorizationV1beta1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/doc.go
new file mode 100644
index 000000000..11b523897
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1beta1
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/generated_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/generated_expansion.go
new file mode 100644
index 000000000..2b7e8ca0b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/generated_expansion.go
@@ -0,0 +1,17 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/localsubjectaccessreview.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/localsubjectaccessreview.go
new file mode 100644
index 000000000..9b8e10341
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/localsubjectaccessreview.go
@@ -0,0 +1,46 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ rest "k8s.io/client-go/rest"
+)
+
+// LocalSubjectAccessReviewsGetter has a method to return a LocalSubjectAccessReviewInterface.
+// A group's client should implement this interface.
+type LocalSubjectAccessReviewsGetter interface {
+ LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewInterface
+}
+
+// LocalSubjectAccessReviewInterface has methods to work with LocalSubjectAccessReview resources.
+type LocalSubjectAccessReviewInterface interface {
+ LocalSubjectAccessReviewExpansion
+}
+
+// localSubjectAccessReviews implements LocalSubjectAccessReviewInterface
+type localSubjectAccessReviews struct {
+ client rest.Interface
+ ns string
+}
+
+// newLocalSubjectAccessReviews returns a LocalSubjectAccessReviews
+func newLocalSubjectAccessReviews(c *AuthorizationV1beta1Client, namespace string) *localSubjectAccessReviews {
+ return &localSubjectAccessReviews{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/localsubjectaccessreview_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/localsubjectaccessreview_expansion.go
new file mode 100644
index 000000000..3a3c64c1b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/localsubjectaccessreview_expansion.go
@@ -0,0 +1,36 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ authorizationapi "k8s.io/kubernetes/pkg/apis/authorization/v1beta1"
+)
+
+type LocalSubjectAccessReviewExpansion interface {
+ Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error)
+}
+
+func (c *localSubjectAccessReviews) Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) {
+ result = &authorizationapi.LocalSubjectAccessReview{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("localsubjectaccessreviews").
+ Body(sar).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/selfsubjectaccessreview.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/selfsubjectaccessreview.go
new file mode 100644
index 000000000..1ef3e49af
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/selfsubjectaccessreview.go
@@ -0,0 +1,44 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ rest "k8s.io/client-go/rest"
+)
+
+// SelfSubjectAccessReviewsGetter has a method to return a SelfSubjectAccessReviewInterface.
+// A group's client should implement this interface.
+type SelfSubjectAccessReviewsGetter interface {
+ SelfSubjectAccessReviews() SelfSubjectAccessReviewInterface
+}
+
+// SelfSubjectAccessReviewInterface has methods to work with SelfSubjectAccessReview resources.
+type SelfSubjectAccessReviewInterface interface {
+ SelfSubjectAccessReviewExpansion
+}
+
+// selfSubjectAccessReviews implements SelfSubjectAccessReviewInterface
+type selfSubjectAccessReviews struct {
+ client rest.Interface
+}
+
+// newSelfSubjectAccessReviews returns a SelfSubjectAccessReviews
+func newSelfSubjectAccessReviews(c *AuthorizationV1beta1Client) *selfSubjectAccessReviews {
+ return &selfSubjectAccessReviews{
+ client: c.RESTClient(),
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/selfsubjectaccessreview_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/selfsubjectaccessreview_expansion.go
new file mode 100644
index 000000000..a64678243
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/selfsubjectaccessreview_expansion.go
@@ -0,0 +1,35 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ authorizationapi "k8s.io/kubernetes/pkg/apis/authorization/v1beta1"
+)
+
+type SelfSubjectAccessReviewExpansion interface {
+ Create(sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error)
+}
+
+func (c *selfSubjectAccessReviews) Create(sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error) {
+ result = &authorizationapi.SelfSubjectAccessReview{}
+ err = c.client.Post().
+ Resource("selfsubjectaccessreviews").
+ Body(sar).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/subjectaccessreview.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/subjectaccessreview.go
new file mode 100644
index 000000000..cd60e9df6
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/subjectaccessreview.go
@@ -0,0 +1,44 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ rest "k8s.io/client-go/rest"
+)
+
+// SubjectAccessReviewsGetter has a method to return a SubjectAccessReviewInterface.
+// A group's client should implement this interface.
+type SubjectAccessReviewsGetter interface {
+ SubjectAccessReviews() SubjectAccessReviewInterface
+}
+
+// SubjectAccessReviewInterface has methods to work with SubjectAccessReview resources.
+type SubjectAccessReviewInterface interface {
+ SubjectAccessReviewExpansion
+}
+
+// subjectAccessReviews implements SubjectAccessReviewInterface
+type subjectAccessReviews struct {
+ client rest.Interface
+}
+
+// newSubjectAccessReviews returns a SubjectAccessReviews
+func newSubjectAccessReviews(c *AuthorizationV1beta1Client) *subjectAccessReviews {
+ return &subjectAccessReviews{
+ client: c.RESTClient(),
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/subjectaccessreview_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/subjectaccessreview_expansion.go
new file mode 100644
index 000000000..bf57a7b07
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/subjectaccessreview_expansion.go
@@ -0,0 +1,36 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ authorizationapi "k8s.io/kubernetes/pkg/apis/authorization/v1beta1"
+)
+
+// The SubjectAccessReviewExpansion interface allows manually adding extra methods to the AuthorizationInterface.
+type SubjectAccessReviewExpansion interface {
+ Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error)
+}
+
+func (c *subjectAccessReviews) Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) {
+ result = &authorizationapi.SubjectAccessReview{}
+ err = c.client.Post().
+ Resource("subjectaccessreviews").
+ Body(sar).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/autoscaling_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/autoscaling_client.go
new file mode 100644
index 000000000..7ea617b8a
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/autoscaling_client.go
@@ -0,0 +1,88 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ rest "k8s.io/client-go/rest"
+ v1 "k8s.io/kubernetes/pkg/apis/autoscaling/v1"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+type AutoscalingV1Interface interface {
+ RESTClient() rest.Interface
+ HorizontalPodAutoscalersGetter
+}
+
+// AutoscalingV1Client is used to interact with features provided by the autoscaling group.
+type AutoscalingV1Client struct {
+ restClient rest.Interface
+}
+
+func (c *AutoscalingV1Client) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface {
+ return newHorizontalPodAutoscalers(c, namespace)
+}
+
+// NewForConfig creates a new AutoscalingV1Client for the given config.
+func NewForConfig(c *rest.Config) (*AutoscalingV1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &AutoscalingV1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new AutoscalingV1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *AutoscalingV1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new AutoscalingV1Client for the given RESTClient.
+func New(c rest.Interface) *AutoscalingV1Client {
+ return &AutoscalingV1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *AutoscalingV1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/doc.go
new file mode 100644
index 000000000..54673bfa7
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/generated_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/generated_expansion.go
new file mode 100644
index 000000000..effefbd50
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/generated_expansion.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+type HorizontalPodAutoscalerExpansion interface{}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/horizontalpodautoscaler.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/horizontalpodautoscaler.go
new file mode 100644
index 000000000..1651dbf19
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/horizontalpodautoscaler.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1 "k8s.io/kubernetes/pkg/apis/autoscaling/v1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface.
+// A group's client should implement this interface.
+type HorizontalPodAutoscalersGetter interface {
+ HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface
+}
+
+// HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources.
+type HorizontalPodAutoscalerInterface interface {
+ Create(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
+ Update(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
+ UpdateStatus(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.HorizontalPodAutoscaler, error)
+ List(opts meta_v1.ListOptions) (*v1.HorizontalPodAutoscalerList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error)
+ HorizontalPodAutoscalerExpansion
+}
+
+// horizontalPodAutoscalers implements HorizontalPodAutoscalerInterface
+type horizontalPodAutoscalers struct {
+ client rest.Interface
+ ns string
+}
+
+// newHorizontalPodAutoscalers returns a HorizontalPodAutoscalers
+func newHorizontalPodAutoscalers(c *AutoscalingV1Client, namespace string) *horizontalPodAutoscalers {
+ return &horizontalPodAutoscalers{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
+func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) {
+ result = &v1.HorizontalPodAutoscaler{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ Body(horizontalPodAutoscaler).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
+func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) {
+ result = &v1.HorizontalPodAutoscaler{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ Name(horizontalPodAutoscaler.Name).
+ Body(horizontalPodAutoscaler).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) {
+ result = &v1.HorizontalPodAutoscaler{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ Name(horizontalPodAutoscaler.Name).
+ SubResource("status").
+ Body(horizontalPodAutoscaler).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
+func (c *horizontalPodAutoscalers) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *horizontalPodAutoscalers) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any.
+func (c *horizontalPodAutoscalers) Get(name string, options meta_v1.GetOptions) (result *v1.HorizontalPodAutoscaler, err error) {
+ result = &v1.HorizontalPodAutoscaler{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
+func (c *horizontalPodAutoscalers) List(opts meta_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) {
+ result = &v1.HorizontalPodAutoscalerList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
+func (c *horizontalPodAutoscalers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched horizontalPodAutoscaler.
+func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) {
+ result = &v1.HorizontalPodAutoscaler{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v2alpha1/autoscaling_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v2alpha1/autoscaling_client.go
new file mode 100644
index 000000000..90ce24f30
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v2alpha1/autoscaling_client.go
@@ -0,0 +1,88 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ rest "k8s.io/client-go/rest"
+ v2alpha1 "k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+type AutoscalingV2alpha1Interface interface {
+ RESTClient() rest.Interface
+ HorizontalPodAutoscalersGetter
+}
+
+// AutoscalingV2alpha1Client is used to interact with features provided by the autoscaling group.
+type AutoscalingV2alpha1Client struct {
+ restClient rest.Interface
+}
+
+func (c *AutoscalingV2alpha1Client) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface {
+ return newHorizontalPodAutoscalers(c, namespace)
+}
+
+// NewForConfig creates a new AutoscalingV2alpha1Client for the given config.
+func NewForConfig(c *rest.Config) (*AutoscalingV2alpha1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &AutoscalingV2alpha1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new AutoscalingV2alpha1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *AutoscalingV2alpha1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new AutoscalingV2alpha1Client for the given RESTClient.
+func New(c rest.Interface) *AutoscalingV2alpha1Client {
+ return &AutoscalingV2alpha1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v2alpha1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *AutoscalingV2alpha1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v2alpha1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v2alpha1/doc.go
new file mode 100644
index 000000000..d29bd3f4e
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v2alpha1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v2alpha1
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v2alpha1/generated_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v2alpha1/generated_expansion.go
new file mode 100644
index 000000000..e40f2c5a1
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v2alpha1/generated_expansion.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+type HorizontalPodAutoscalerExpansion interface{}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v2alpha1/horizontalpodautoscaler.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v2alpha1/horizontalpodautoscaler.go
new file mode 100644
index 000000000..d359517e9
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v2alpha1/horizontalpodautoscaler.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v2alpha1 "k8s.io/kubernetes/pkg/apis/autoscaling/v2alpha1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface.
+// A group's client should implement this interface.
+type HorizontalPodAutoscalersGetter interface {
+ HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface
+}
+
+// HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources.
+type HorizontalPodAutoscalerInterface interface {
+ Create(*v2alpha1.HorizontalPodAutoscaler) (*v2alpha1.HorizontalPodAutoscaler, error)
+ Update(*v2alpha1.HorizontalPodAutoscaler) (*v2alpha1.HorizontalPodAutoscaler, error)
+ UpdateStatus(*v2alpha1.HorizontalPodAutoscaler) (*v2alpha1.HorizontalPodAutoscaler, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v2alpha1.HorizontalPodAutoscaler, error)
+ List(opts v1.ListOptions) (*v2alpha1.HorizontalPodAutoscalerList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.HorizontalPodAutoscaler, err error)
+ HorizontalPodAutoscalerExpansion
+}
+
+// horizontalPodAutoscalers implements HorizontalPodAutoscalerInterface
+type horizontalPodAutoscalers struct {
+ client rest.Interface
+ ns string
+}
+
+// newHorizontalPodAutoscalers returns a HorizontalPodAutoscalers
+func newHorizontalPodAutoscalers(c *AutoscalingV2alpha1Client, namespace string) *horizontalPodAutoscalers {
+ return &horizontalPodAutoscalers{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
+func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *v2alpha1.HorizontalPodAutoscaler) (result *v2alpha1.HorizontalPodAutoscaler, err error) {
+ result = &v2alpha1.HorizontalPodAutoscaler{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ Body(horizontalPodAutoscaler).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
+func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2alpha1.HorizontalPodAutoscaler) (result *v2alpha1.HorizontalPodAutoscaler, err error) {
+ result = &v2alpha1.HorizontalPodAutoscaler{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ Name(horizontalPodAutoscaler.Name).
+ Body(horizontalPodAutoscaler).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v2alpha1.HorizontalPodAutoscaler) (result *v2alpha1.HorizontalPodAutoscaler, err error) {
+ result = &v2alpha1.HorizontalPodAutoscaler{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ Name(horizontalPodAutoscaler.Name).
+ SubResource("status").
+ Body(horizontalPodAutoscaler).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
+func (c *horizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *horizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any.
+func (c *horizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *v2alpha1.HorizontalPodAutoscaler, err error) {
+ result = &v2alpha1.HorizontalPodAutoscaler{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
+func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2alpha1.HorizontalPodAutoscalerList, err error) {
+ result = &v2alpha1.HorizontalPodAutoscalerList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
+func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched horizontalPodAutoscaler.
+func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.HorizontalPodAutoscaler, err error) {
+ result = &v2alpha1.HorizontalPodAutoscaler{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("horizontalpodautoscalers").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/batch_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/batch_client.go
new file mode 100644
index 000000000..a269f0063
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/batch_client.go
@@ -0,0 +1,88 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ rest "k8s.io/client-go/rest"
+ v1 "k8s.io/kubernetes/pkg/apis/batch/v1"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+type BatchV1Interface interface {
+ RESTClient() rest.Interface
+ JobsGetter
+}
+
+// BatchV1Client is used to interact with features provided by the batch group.
+type BatchV1Client struct {
+ restClient rest.Interface
+}
+
+func (c *BatchV1Client) Jobs(namespace string) JobInterface {
+ return newJobs(c, namespace)
+}
+
+// NewForConfig creates a new BatchV1Client for the given config.
+func NewForConfig(c *rest.Config) (*BatchV1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &BatchV1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new BatchV1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *BatchV1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new BatchV1Client for the given RESTClient.
+func New(c rest.Interface) *BatchV1Client {
+ return &BatchV1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *BatchV1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/doc.go
new file mode 100644
index 000000000..54673bfa7
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/generated_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/generated_expansion.go
new file mode 100644
index 000000000..68d7741fa
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/generated_expansion.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+type JobExpansion interface{}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/job.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/job.go
new file mode 100644
index 000000000..63b223ce4
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/job.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1 "k8s.io/kubernetes/pkg/apis/batch/v1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// JobsGetter has a method to return a JobInterface.
+// A group's client should implement this interface.
+type JobsGetter interface {
+ Jobs(namespace string) JobInterface
+}
+
+// JobInterface has methods to work with Job resources.
+type JobInterface interface {
+ Create(*v1.Job) (*v1.Job, error)
+ Update(*v1.Job) (*v1.Job, error)
+ UpdateStatus(*v1.Job) (*v1.Job, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.Job, error)
+ List(opts meta_v1.ListOptions) (*v1.JobList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error)
+ JobExpansion
+}
+
+// jobs implements JobInterface
+type jobs struct {
+ client rest.Interface
+ ns string
+}
+
+// newJobs returns a Jobs
+func newJobs(c *BatchV1Client, namespace string) *jobs {
+ return &jobs{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a job and creates it. Returns the server's representation of the job, and an error, if there is any.
+func (c *jobs) Create(job *v1.Job) (result *v1.Job, err error) {
+ result = &v1.Job{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("jobs").
+ Body(job).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a job and updates it. Returns the server's representation of the job, and an error, if there is any.
+func (c *jobs) Update(job *v1.Job) (result *v1.Job, err error) {
+ result = &v1.Job{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("jobs").
+ Name(job.Name).
+ Body(job).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *jobs) UpdateStatus(job *v1.Job) (result *v1.Job, err error) {
+ result = &v1.Job{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("jobs").
+ Name(job.Name).
+ SubResource("status").
+ Body(job).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the job and deletes it. Returns an error if one occurs.
+func (c *jobs) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("jobs").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *jobs) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("jobs").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the job, and returns the corresponding job object, and an error if there is any.
+func (c *jobs) Get(name string, options meta_v1.GetOptions) (result *v1.Job, err error) {
+ result = &v1.Job{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("jobs").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Jobs that match those selectors.
+func (c *jobs) List(opts meta_v1.ListOptions) (result *v1.JobList, err error) {
+ result = &v1.JobList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("jobs").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested jobs.
+func (c *jobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("jobs").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched job.
+func (c *jobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) {
+ result = &v1.Job{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("jobs").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/batch_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/batch_client.go
new file mode 100644
index 000000000..bd0e365e4
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/batch_client.go
@@ -0,0 +1,88 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ rest "k8s.io/client-go/rest"
+ v2alpha1 "k8s.io/kubernetes/pkg/apis/batch/v2alpha1"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+type BatchV2alpha1Interface interface {
+ RESTClient() rest.Interface
+ CronJobsGetter
+}
+
+// BatchV2alpha1Client is used to interact with features provided by the batch group.
+type BatchV2alpha1Client struct {
+ restClient rest.Interface
+}
+
+func (c *BatchV2alpha1Client) CronJobs(namespace string) CronJobInterface {
+ return newCronJobs(c, namespace)
+}
+
+// NewForConfig creates a new BatchV2alpha1Client for the given config.
+func NewForConfig(c *rest.Config) (*BatchV2alpha1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &BatchV2alpha1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new BatchV2alpha1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *BatchV2alpha1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new BatchV2alpha1Client for the given RESTClient.
+func New(c rest.Interface) *BatchV2alpha1Client {
+ return &BatchV2alpha1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v2alpha1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *BatchV2alpha1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/cronjob.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/cronjob.go
new file mode 100644
index 000000000..bcf2b75f7
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/cronjob.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v2alpha1 "k8s.io/kubernetes/pkg/apis/batch/v2alpha1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// CronJobsGetter has a method to return a CronJobInterface.
+// A group's client should implement this interface.
+type CronJobsGetter interface {
+ CronJobs(namespace string) CronJobInterface
+}
+
+// CronJobInterface has methods to work with CronJob resources.
+type CronJobInterface interface {
+ Create(*v2alpha1.CronJob) (*v2alpha1.CronJob, error)
+ Update(*v2alpha1.CronJob) (*v2alpha1.CronJob, error)
+ UpdateStatus(*v2alpha1.CronJob) (*v2alpha1.CronJob, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v2alpha1.CronJob, error)
+ List(opts v1.ListOptions) (*v2alpha1.CronJobList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error)
+ CronJobExpansion
+}
+
+// cronJobs implements CronJobInterface
+type cronJobs struct {
+ client rest.Interface
+ ns string
+}
+
+// newCronJobs returns a CronJobs
+func newCronJobs(c *BatchV2alpha1Client, namespace string) *cronJobs {
+ return &cronJobs{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a cronJob and creates it. Returns the server's representation of the cronJob, and an error, if there is any.
+func (c *cronJobs) Create(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) {
+ result = &v2alpha1.CronJob{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("cronjobs").
+ Body(cronJob).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a cronJob and updates it. Returns the server's representation of the cronJob, and an error, if there is any.
+func (c *cronJobs) Update(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) {
+ result = &v2alpha1.CronJob{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("cronjobs").
+ Name(cronJob.Name).
+ Body(cronJob).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *cronJobs) UpdateStatus(cronJob *v2alpha1.CronJob) (result *v2alpha1.CronJob, err error) {
+ result = &v2alpha1.CronJob{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("cronjobs").
+ Name(cronJob.Name).
+ SubResource("status").
+ Body(cronJob).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the cronJob and deletes it. Returns an error if one occurs.
+func (c *cronJobs) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("cronjobs").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *cronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("cronjobs").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the cronJob, and returns the corresponding cronJob object, and an error if there is any.
+func (c *cronJobs) Get(name string, options v1.GetOptions) (result *v2alpha1.CronJob, err error) {
+ result = &v2alpha1.CronJob{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("cronjobs").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of CronJobs that match those selectors.
+func (c *cronJobs) List(opts v1.ListOptions) (result *v2alpha1.CronJobList, err error) {
+ result = &v2alpha1.CronJobList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("cronjobs").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested cronJobs.
+func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("cronjobs").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched cronJob.
+func (c *cronJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) {
+ result = &v2alpha1.CronJob{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("cronjobs").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/doc.go
new file mode 100644
index 000000000..d29bd3f4e
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v2alpha1
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/generated_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/generated_expansion.go
new file mode 100644
index 000000000..078027ef4
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/generated_expansion.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v2alpha1
+
+type CronJobExpansion interface{}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificates_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificates_client.go
new file mode 100644
index 000000000..15151f517
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificates_client.go
@@ -0,0 +1,88 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ rest "k8s.io/client-go/rest"
+ v1beta1 "k8s.io/kubernetes/pkg/apis/certificates/v1beta1"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+type CertificatesV1beta1Interface interface {
+ RESTClient() rest.Interface
+ CertificateSigningRequestsGetter
+}
+
+// CertificatesV1beta1Client is used to interact with features provided by the certificates.k8s.io group.
+type CertificatesV1beta1Client struct {
+ restClient rest.Interface
+}
+
+func (c *CertificatesV1beta1Client) CertificateSigningRequests() CertificateSigningRequestInterface {
+ return newCertificateSigningRequests(c)
+}
+
+// NewForConfig creates a new CertificatesV1beta1Client for the given config.
+func NewForConfig(c *rest.Config) (*CertificatesV1beta1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &CertificatesV1beta1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new CertificatesV1beta1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *CertificatesV1beta1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new CertificatesV1beta1Client for the given RESTClient.
+func New(c rest.Interface) *CertificatesV1beta1Client {
+ return &CertificatesV1beta1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1beta1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *CertificatesV1beta1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificatesigningrequest.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificatesigningrequest.go
new file mode 100644
index 000000000..e30b929ea
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificatesigningrequest.go
@@ -0,0 +1,161 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1beta1 "k8s.io/kubernetes/pkg/apis/certificates/v1beta1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// CertificateSigningRequestsGetter has a method to return a CertificateSigningRequestInterface.
+// A group's client should implement this interface.
+type CertificateSigningRequestsGetter interface {
+ CertificateSigningRequests() CertificateSigningRequestInterface
+}
+
+// CertificateSigningRequestInterface has methods to work with CertificateSigningRequest resources.
+type CertificateSigningRequestInterface interface {
+ Create(*v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error)
+ Update(*v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error)
+ UpdateStatus(*v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.CertificateSigningRequest, error)
+ List(opts v1.ListOptions) (*v1beta1.CertificateSigningRequestList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error)
+ CertificateSigningRequestExpansion
+}
+
+// certificateSigningRequests implements CertificateSigningRequestInterface
+type certificateSigningRequests struct {
+ client rest.Interface
+}
+
+// newCertificateSigningRequests returns a CertificateSigningRequests
+func newCertificateSigningRequests(c *CertificatesV1beta1Client) *certificateSigningRequests {
+ return &certificateSigningRequests{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a certificateSigningRequest and creates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any.
+func (c *certificateSigningRequests) Create(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) {
+ result = &v1beta1.CertificateSigningRequest{}
+ err = c.client.Post().
+ Resource("certificatesigningrequests").
+ Body(certificateSigningRequest).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any.
+func (c *certificateSigningRequests) Update(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) {
+ result = &v1beta1.CertificateSigningRequest{}
+ err = c.client.Put().
+ Resource("certificatesigningrequests").
+ Name(certificateSigningRequest.Name).
+ Body(certificateSigningRequest).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *certificateSigningRequests) UpdateStatus(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) {
+ result = &v1beta1.CertificateSigningRequest{}
+ err = c.client.Put().
+ Resource("certificatesigningrequests").
+ Name(certificateSigningRequest.Name).
+ SubResource("status").
+ Body(certificateSigningRequest).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the certificateSigningRequest and deletes it. Returns an error if one occurs.
+func (c *certificateSigningRequests) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("certificatesigningrequests").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *certificateSigningRequests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("certificatesigningrequests").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the certificateSigningRequest, and returns the corresponding certificateSigningRequest object, and an error if there is any.
+func (c *certificateSigningRequests) Get(name string, options v1.GetOptions) (result *v1beta1.CertificateSigningRequest, err error) {
+ result = &v1beta1.CertificateSigningRequest{}
+ err = c.client.Get().
+ Resource("certificatesigningrequests").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of CertificateSigningRequests that match those selectors.
+func (c *certificateSigningRequests) List(opts v1.ListOptions) (result *v1beta1.CertificateSigningRequestList, err error) {
+ result = &v1beta1.CertificateSigningRequestList{}
+ err = c.client.Get().
+ Resource("certificatesigningrequests").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested certificateSigningRequests.
+func (c *certificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("certificatesigningrequests").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched certificateSigningRequest.
+func (c *certificateSigningRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) {
+ result = &v1beta1.CertificateSigningRequest{}
+ err = c.client.Patch(pt).
+ Resource("certificatesigningrequests").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificatesigningrequest_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificatesigningrequest_expansion.go
new file mode 100644
index 000000000..e7db45986
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificatesigningrequest_expansion.go
@@ -0,0 +1,37 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ certificates "k8s.io/kubernetes/pkg/apis/certificates/v1beta1"
+)
+
+type CertificateSigningRequestExpansion interface {
+ UpdateApproval(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error)
+}
+
+func (c *certificateSigningRequests) UpdateApproval(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) {
+ result = &certificates.CertificateSigningRequest{}
+ err = c.client.Put().
+ Resource("certificatesigningrequests").
+ Name(certificateSigningRequest.Name).
+ Body(certificateSigningRequest).
+ SubResource("approval").
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/doc.go
new file mode 100644
index 000000000..11b523897
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1beta1
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/generated_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/generated_expansion.go
new file mode 100644
index 000000000..2b7e8ca0b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/generated_expansion.go
@@ -0,0 +1,17 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/componentstatus.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/componentstatus.go
new file mode 100644
index 000000000..1e4d6e0fe
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/componentstatus.go
@@ -0,0 +1,145 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// ComponentStatusesGetter has a method to return a ComponentStatusInterface.
+// A group's client should implement this interface.
+type ComponentStatusesGetter interface {
+ ComponentStatuses() ComponentStatusInterface
+}
+
+// ComponentStatusInterface has methods to work with ComponentStatus resources.
+type ComponentStatusInterface interface {
+ Create(*v1.ComponentStatus) (*v1.ComponentStatus, error)
+ Update(*v1.ComponentStatus) (*v1.ComponentStatus, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.ComponentStatus, error)
+ List(opts meta_v1.ListOptions) (*v1.ComponentStatusList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error)
+ ComponentStatusExpansion
+}
+
+// componentStatuses implements ComponentStatusInterface
+type componentStatuses struct {
+ client rest.Interface
+}
+
+// newComponentStatuses returns a ComponentStatuses
+func newComponentStatuses(c *CoreV1Client) *componentStatuses {
+ return &componentStatuses{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a componentStatus and creates it. Returns the server's representation of the componentStatus, and an error, if there is any.
+func (c *componentStatuses) Create(componentStatus *v1.ComponentStatus) (result *v1.ComponentStatus, err error) {
+ result = &v1.ComponentStatus{}
+ err = c.client.Post().
+ Resource("componentstatuses").
+ Body(componentStatus).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a componentStatus and updates it. Returns the server's representation of the componentStatus, and an error, if there is any.
+func (c *componentStatuses) Update(componentStatus *v1.ComponentStatus) (result *v1.ComponentStatus, err error) {
+ result = &v1.ComponentStatus{}
+ err = c.client.Put().
+ Resource("componentstatuses").
+ Name(componentStatus.Name).
+ Body(componentStatus).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the componentStatus and deletes it. Returns an error if one occurs.
+func (c *componentStatuses) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("componentstatuses").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *componentStatuses) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("componentstatuses").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the componentStatus, and returns the corresponding componentStatus object, and an error if there is any.
+func (c *componentStatuses) Get(name string, options meta_v1.GetOptions) (result *v1.ComponentStatus, err error) {
+ result = &v1.ComponentStatus{}
+ err = c.client.Get().
+ Resource("componentstatuses").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of ComponentStatuses that match those selectors.
+func (c *componentStatuses) List(opts meta_v1.ListOptions) (result *v1.ComponentStatusList, err error) {
+ result = &v1.ComponentStatusList{}
+ err = c.client.Get().
+ Resource("componentstatuses").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested componentStatuses.
+func (c *componentStatuses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("componentstatuses").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched componentStatus.
+func (c *componentStatuses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) {
+ result = &v1.ComponentStatus{}
+ err = c.client.Patch(pt).
+ Resource("componentstatuses").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/configmap.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/configmap.go
new file mode 100644
index 000000000..717549128
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/configmap.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// ConfigMapsGetter has a method to return a ConfigMapInterface.
+// A group's client should implement this interface.
+type ConfigMapsGetter interface {
+ ConfigMaps(namespace string) ConfigMapInterface
+}
+
+// ConfigMapInterface has methods to work with ConfigMap resources.
+type ConfigMapInterface interface {
+ Create(*v1.ConfigMap) (*v1.ConfigMap, error)
+ Update(*v1.ConfigMap) (*v1.ConfigMap, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.ConfigMap, error)
+ List(opts meta_v1.ListOptions) (*v1.ConfigMapList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error)
+ ConfigMapExpansion
+}
+
+// configMaps implements ConfigMapInterface
+type configMaps struct {
+ client rest.Interface
+ ns string
+}
+
+// newConfigMaps returns a ConfigMaps
+func newConfigMaps(c *CoreV1Client, namespace string) *configMaps {
+ return &configMaps{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a configMap and creates it. Returns the server's representation of the configMap, and an error, if there is any.
+func (c *configMaps) Create(configMap *v1.ConfigMap) (result *v1.ConfigMap, err error) {
+ result = &v1.ConfigMap{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("configmaps").
+ Body(configMap).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a configMap and updates it. Returns the server's representation of the configMap, and an error, if there is any.
+func (c *configMaps) Update(configMap *v1.ConfigMap) (result *v1.ConfigMap, err error) {
+ result = &v1.ConfigMap{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("configmaps").
+ Name(configMap.Name).
+ Body(configMap).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the configMap and deletes it. Returns an error if one occurs.
+func (c *configMaps) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("configmaps").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *configMaps) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("configmaps").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the configMap, and returns the corresponding configMap object, and an error if there is any.
+func (c *configMaps) Get(name string, options meta_v1.GetOptions) (result *v1.ConfigMap, err error) {
+ result = &v1.ConfigMap{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("configmaps").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of ConfigMaps that match those selectors.
+func (c *configMaps) List(opts meta_v1.ListOptions) (result *v1.ConfigMapList, err error) {
+ result = &v1.ConfigMapList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("configmaps").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested configMaps.
+func (c *configMaps) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("configmaps").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched configMap.
+func (c *configMaps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) {
+ result = &v1.ConfigMap{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("configmaps").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/core_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/core_client.go
new file mode 100644
index 000000000..6fdcaf128
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/core_client.go
@@ -0,0 +1,163 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ rest "k8s.io/client-go/rest"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+type CoreV1Interface interface {
+ RESTClient() rest.Interface
+ ComponentStatusesGetter
+ ConfigMapsGetter
+ EndpointsGetter
+ EventsGetter
+ LimitRangesGetter
+ NamespacesGetter
+ NodesGetter
+ PersistentVolumesGetter
+ PersistentVolumeClaimsGetter
+ PodsGetter
+ PodTemplatesGetter
+ ReplicationControllersGetter
+ ResourceQuotasGetter
+ SecretsGetter
+ ServicesGetter
+ ServiceAccountsGetter
+}
+
+// CoreV1Client is used to interact with features provided by the group.
+type CoreV1Client struct {
+ restClient rest.Interface
+}
+
+func (c *CoreV1Client) ComponentStatuses() ComponentStatusInterface {
+ return newComponentStatuses(c)
+}
+
+func (c *CoreV1Client) ConfigMaps(namespace string) ConfigMapInterface {
+ return newConfigMaps(c, namespace)
+}
+
+func (c *CoreV1Client) Endpoints(namespace string) EndpointsInterface {
+ return newEndpoints(c, namespace)
+}
+
+func (c *CoreV1Client) Events(namespace string) EventInterface {
+ return newEvents(c, namespace)
+}
+
+func (c *CoreV1Client) LimitRanges(namespace string) LimitRangeInterface {
+ return newLimitRanges(c, namespace)
+}
+
+func (c *CoreV1Client) Namespaces() NamespaceInterface {
+ return newNamespaces(c)
+}
+
+func (c *CoreV1Client) Nodes() NodeInterface {
+ return newNodes(c)
+}
+
+func (c *CoreV1Client) PersistentVolumes() PersistentVolumeInterface {
+ return newPersistentVolumes(c)
+}
+
+func (c *CoreV1Client) PersistentVolumeClaims(namespace string) PersistentVolumeClaimInterface {
+ return newPersistentVolumeClaims(c, namespace)
+}
+
+func (c *CoreV1Client) Pods(namespace string) PodInterface {
+ return newPods(c, namespace)
+}
+
+func (c *CoreV1Client) PodTemplates(namespace string) PodTemplateInterface {
+ return newPodTemplates(c, namespace)
+}
+
+func (c *CoreV1Client) ReplicationControllers(namespace string) ReplicationControllerInterface {
+ return newReplicationControllers(c, namespace)
+}
+
+func (c *CoreV1Client) ResourceQuotas(namespace string) ResourceQuotaInterface {
+ return newResourceQuotas(c, namespace)
+}
+
+func (c *CoreV1Client) Secrets(namespace string) SecretInterface {
+ return newSecrets(c, namespace)
+}
+
+func (c *CoreV1Client) Services(namespace string) ServiceInterface {
+ return newServices(c, namespace)
+}
+
+func (c *CoreV1Client) ServiceAccounts(namespace string) ServiceAccountInterface {
+ return newServiceAccounts(c, namespace)
+}
+
+// NewForConfig creates a new CoreV1Client for the given config.
+func NewForConfig(c *rest.Config) (*CoreV1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &CoreV1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new CoreV1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *CoreV1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new CoreV1Client for the given RESTClient.
+func New(c rest.Interface) *CoreV1Client {
+ return &CoreV1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/api"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *CoreV1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/doc.go
new file mode 100644
index 000000000..54673bfa7
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/endpoints.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/endpoints.go
new file mode 100644
index 000000000..8b06ed802
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/endpoints.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// EndpointsGetter has a method to return a EndpointsInterface.
+// A group's client should implement this interface.
+type EndpointsGetter interface {
+ Endpoints(namespace string) EndpointsInterface
+}
+
+// EndpointsInterface has methods to work with Endpoints resources.
+type EndpointsInterface interface {
+ Create(*v1.Endpoints) (*v1.Endpoints, error)
+ Update(*v1.Endpoints) (*v1.Endpoints, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.Endpoints, error)
+ List(opts meta_v1.ListOptions) (*v1.EndpointsList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error)
+ EndpointsExpansion
+}
+
+// endpoints implements EndpointsInterface
+type endpoints struct {
+ client rest.Interface
+ ns string
+}
+
+// newEndpoints returns a Endpoints
+func newEndpoints(c *CoreV1Client, namespace string) *endpoints {
+ return &endpoints{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a endpoints and creates it. Returns the server's representation of the endpoints, and an error, if there is any.
+func (c *endpoints) Create(endpoints *v1.Endpoints) (result *v1.Endpoints, err error) {
+ result = &v1.Endpoints{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("endpoints").
+ Body(endpoints).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a endpoints and updates it. Returns the server's representation of the endpoints, and an error, if there is any.
+func (c *endpoints) Update(endpoints *v1.Endpoints) (result *v1.Endpoints, err error) {
+ result = &v1.Endpoints{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("endpoints").
+ Name(endpoints.Name).
+ Body(endpoints).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the endpoints and deletes it. Returns an error if one occurs.
+func (c *endpoints) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("endpoints").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *endpoints) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("endpoints").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the endpoints, and returns the corresponding endpoints object, and an error if there is any.
+func (c *endpoints) Get(name string, options meta_v1.GetOptions) (result *v1.Endpoints, err error) {
+ result = &v1.Endpoints{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("endpoints").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Endpoints that match those selectors.
+func (c *endpoints) List(opts meta_v1.ListOptions) (result *v1.EndpointsList, err error) {
+ result = &v1.EndpointsList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("endpoints").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested endpoints.
+func (c *endpoints) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("endpoints").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched endpoints.
+func (c *endpoints) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) {
+ result = &v1.Endpoints{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("endpoints").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/event.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/event.go
new file mode 100644
index 000000000..72544caea
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/event.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// EventsGetter has a method to return a EventInterface.
+// A group's client should implement this interface.
+type EventsGetter interface {
+ Events(namespace string) EventInterface
+}
+
+// EventInterface has methods to work with Event resources.
+type EventInterface interface {
+ Create(*v1.Event) (*v1.Event, error)
+ Update(*v1.Event) (*v1.Event, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.Event, error)
+ List(opts meta_v1.ListOptions) (*v1.EventList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error)
+ EventExpansion
+}
+
+// events implements EventInterface
+type events struct {
+ client rest.Interface
+ ns string
+}
+
+// newEvents returns a Events
+func newEvents(c *CoreV1Client, namespace string) *events {
+ return &events{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any.
+func (c *events) Create(event *v1.Event) (result *v1.Event, err error) {
+ result = &v1.Event{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("events").
+ Body(event).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any.
+func (c *events) Update(event *v1.Event) (result *v1.Event, err error) {
+ result = &v1.Event{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("events").
+ Name(event.Name).
+ Body(event).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the event and deletes it. Returns an error if one occurs.
+func (c *events) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("events").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *events) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("events").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the event, and returns the corresponding event object, and an error if there is any.
+func (c *events) Get(name string, options meta_v1.GetOptions) (result *v1.Event, err error) {
+ result = &v1.Event{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("events").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Events that match those selectors.
+func (c *events) List(opts meta_v1.ListOptions) (result *v1.EventList, err error) {
+ result = &v1.EventList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("events").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested events.
+func (c *events) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("events").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched event.
+func (c *events) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) {
+ result = &v1.Event{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("events").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/event_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/event_expansion.go
new file mode 100644
index 000000000..2ae4daa11
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/event_expansion.go
@@ -0,0 +1,164 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "fmt"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/fields"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/types"
+ "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/api/v1/ref"
+)
+
+// The EventExpansion interface allows manually adding extra methods to the EventInterface.
+type EventExpansion interface {
+ // CreateWithEventNamespace is the same as a Create, except that it sends the request to the event.Namespace.
+ CreateWithEventNamespace(event *v1.Event) (*v1.Event, error)
+ // UpdateWithEventNamespace is the same as a Update, except that it sends the request to the event.Namespace.
+ UpdateWithEventNamespace(event *v1.Event) (*v1.Event, error)
+ PatchWithEventNamespace(event *v1.Event, data []byte) (*v1.Event, error)
+ // Search finds events about the specified object
+ Search(scheme *runtime.Scheme, objOrRef runtime.Object) (*v1.EventList, error)
+ // Returns the appropriate field selector based on the API version being used to communicate with the server.
+ // The returned field selector can be used with List and Watch to filter desired events.
+ GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector
+}
+
+// CreateWithEventNamespace makes a new event. Returns the copy of the event the server returns,
+// or an error. The namespace to create the event within is deduced from the
+// event; it must either match this event client's namespace, or this event
+// client must have been created with the "" namespace.
+func (e *events) CreateWithEventNamespace(event *v1.Event) (*v1.Event, error) {
+ if e.ns != "" && event.Namespace != e.ns {
+ return nil, fmt.Errorf("can't create an event with namespace '%v' in namespace '%v'", event.Namespace, e.ns)
+ }
+ result := &v1.Event{}
+ err := e.client.Post().
+ NamespaceIfScoped(event.Namespace, len(event.Namespace) > 0).
+ Resource("events").
+ Body(event).
+ Do().
+ Into(result)
+ return result, err
+}
+
+// UpdateWithEventNamespace modifies an existing event. It returns the copy of the event that the server returns,
+// or an error. The namespace and key to update the event within is deduced from the event. The
+// namespace must either match this event client's namespace, or this event client must have been
+// created with the "" namespace. Update also requires the ResourceVersion to be set in the event
+// object.
+func (e *events) UpdateWithEventNamespace(event *v1.Event) (*v1.Event, error) {
+ result := &v1.Event{}
+ err := e.client.Put().
+ NamespaceIfScoped(event.Namespace, len(event.Namespace) > 0).
+ Resource("events").
+ Name(event.Name).
+ Body(event).
+ Do().
+ Into(result)
+ return result, err
+}
+
+// PatchWithEventNamespace modifies an existing event. It returns the copy of
+// the event that the server returns, or an error. The namespace and name of the
+// target event is deduced from the incompleteEvent. The namespace must either
+// match this event client's namespace, or this event client must have been
+// created with the "" namespace.
+func (e *events) PatchWithEventNamespace(incompleteEvent *v1.Event, data []byte) (*v1.Event, error) {
+ if e.ns != "" && incompleteEvent.Namespace != e.ns {
+ return nil, fmt.Errorf("can't patch an event with namespace '%v' in namespace '%v'", incompleteEvent.Namespace, e.ns)
+ }
+ result := &v1.Event{}
+ err := e.client.Patch(types.StrategicMergePatchType).
+ NamespaceIfScoped(incompleteEvent.Namespace, len(incompleteEvent.Namespace) > 0).
+ Resource("events").
+ Name(incompleteEvent.Name).
+ Body(data).
+ Do().
+ Into(result)
+ return result, err
+}
+
+// Search finds events about the specified object. The namespace of the
+// object must match this event's client namespace unless the event client
+// was made with the "" namespace.
+func (e *events) Search(scheme *runtime.Scheme, objOrRef runtime.Object) (*v1.EventList, error) {
+ ref, err := ref.GetReference(scheme, objOrRef)
+ if err != nil {
+ return nil, err
+ }
+ if e.ns != "" && ref.Namespace != e.ns {
+ return nil, fmt.Errorf("won't be able to find any events of namespace '%v' in namespace '%v'", ref.Namespace, e.ns)
+ }
+ stringRefKind := string(ref.Kind)
+ var refKind *string
+ if stringRefKind != "" {
+ refKind = &stringRefKind
+ }
+ stringRefUID := string(ref.UID)
+ var refUID *string
+ if stringRefUID != "" {
+ refUID = &stringRefUID
+ }
+ fieldSelector := e.GetFieldSelector(&ref.Name, &ref.Namespace, refKind, refUID)
+ return e.List(metav1.ListOptions{FieldSelector: fieldSelector.String()})
+}
+
+// Returns the appropriate field selector based on the API version being used to communicate with the server.
+// The returned field selector can be used with List and Watch to filter desired events.
+func (e *events) GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector {
+ apiVersion := e.client.APIVersion().String()
+ field := fields.Set{}
+ if involvedObjectName != nil {
+ field[GetInvolvedObjectNameFieldLabel(apiVersion)] = *involvedObjectName
+ }
+ if involvedObjectNamespace != nil {
+ field["involvedObject.namespace"] = *involvedObjectNamespace
+ }
+ if involvedObjectKind != nil {
+ field["involvedObject.kind"] = *involvedObjectKind
+ }
+ if involvedObjectUID != nil {
+ field["involvedObject.uid"] = *involvedObjectUID
+ }
+ return field.AsSelector()
+}
+
+// Returns the appropriate field label to use for name of the involved object as per the given API version.
+func GetInvolvedObjectNameFieldLabel(version string) string {
+ return "involvedObject.name"
+}
+
+// TODO: This is a temporary arrangement and will be removed once all clients are moved to use the clientset.
+type EventSinkImpl struct {
+ Interface EventInterface
+}
+
+func (e *EventSinkImpl) Create(event *v1.Event) (*v1.Event, error) {
+ return e.Interface.CreateWithEventNamespace(event)
+}
+
+func (e *EventSinkImpl) Update(event *v1.Event) (*v1.Event, error) {
+ return e.Interface.UpdateWithEventNamespace(event)
+}
+
+func (e *EventSinkImpl) Patch(event *v1.Event, data []byte) (*v1.Event, error) {
+ return e.Interface.PatchWithEventNamespace(event, data)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/generated_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/generated_expansion.go
new file mode 100644
index 000000000..5fe0585b4
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/generated_expansion.go
@@ -0,0 +1,39 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+type ComponentStatusExpansion interface{}
+
+type ConfigMapExpansion interface{}
+
+type EndpointsExpansion interface{}
+
+type LimitRangeExpansion interface{}
+
+type PersistentVolumeExpansion interface{}
+
+type PersistentVolumeClaimExpansion interface{}
+
+type PodTemplateExpansion interface{}
+
+type ReplicationControllerExpansion interface{}
+
+type ResourceQuotaExpansion interface{}
+
+type SecretExpansion interface{}
+
+type ServiceAccountExpansion interface{}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/limitrange.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/limitrange.go
new file mode 100644
index 000000000..d9d734913
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/limitrange.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// LimitRangesGetter has a method to return a LimitRangeInterface.
+// A group's client should implement this interface.
+type LimitRangesGetter interface {
+ LimitRanges(namespace string) LimitRangeInterface
+}
+
+// LimitRangeInterface has methods to work with LimitRange resources.
+type LimitRangeInterface interface {
+ Create(*v1.LimitRange) (*v1.LimitRange, error)
+ Update(*v1.LimitRange) (*v1.LimitRange, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.LimitRange, error)
+ List(opts meta_v1.ListOptions) (*v1.LimitRangeList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error)
+ LimitRangeExpansion
+}
+
+// limitRanges implements LimitRangeInterface
+type limitRanges struct {
+ client rest.Interface
+ ns string
+}
+
+// newLimitRanges returns a LimitRanges
+func newLimitRanges(c *CoreV1Client, namespace string) *limitRanges {
+ return &limitRanges{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a limitRange and creates it. Returns the server's representation of the limitRange, and an error, if there is any.
+func (c *limitRanges) Create(limitRange *v1.LimitRange) (result *v1.LimitRange, err error) {
+ result = &v1.LimitRange{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("limitranges").
+ Body(limitRange).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a limitRange and updates it. Returns the server's representation of the limitRange, and an error, if there is any.
+func (c *limitRanges) Update(limitRange *v1.LimitRange) (result *v1.LimitRange, err error) {
+ result = &v1.LimitRange{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("limitranges").
+ Name(limitRange.Name).
+ Body(limitRange).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the limitRange and deletes it. Returns an error if one occurs.
+func (c *limitRanges) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("limitranges").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *limitRanges) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("limitranges").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the limitRange, and returns the corresponding limitRange object, and an error if there is any.
+func (c *limitRanges) Get(name string, options meta_v1.GetOptions) (result *v1.LimitRange, err error) {
+ result = &v1.LimitRange{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("limitranges").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of LimitRanges that match those selectors.
+func (c *limitRanges) List(opts meta_v1.ListOptions) (result *v1.LimitRangeList, err error) {
+ result = &v1.LimitRangeList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("limitranges").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested limitRanges.
+func (c *limitRanges) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("limitranges").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched limitRange.
+func (c *limitRanges) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error) {
+ result = &v1.LimitRange{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("limitranges").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/namespace.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/namespace.go
new file mode 100644
index 000000000..2b6e1daed
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/namespace.go
@@ -0,0 +1,161 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// NamespacesGetter has a method to return a NamespaceInterface.
+// A group's client should implement this interface.
+type NamespacesGetter interface {
+ Namespaces() NamespaceInterface
+}
+
+// NamespaceInterface has methods to work with Namespace resources.
+type NamespaceInterface interface {
+ Create(*v1.Namespace) (*v1.Namespace, error)
+ Update(*v1.Namespace) (*v1.Namespace, error)
+ UpdateStatus(*v1.Namespace) (*v1.Namespace, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.Namespace, error)
+ List(opts meta_v1.ListOptions) (*v1.NamespaceList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error)
+ NamespaceExpansion
+}
+
+// namespaces implements NamespaceInterface
+type namespaces struct {
+ client rest.Interface
+}
+
+// newNamespaces returns a Namespaces
+func newNamespaces(c *CoreV1Client) *namespaces {
+ return &namespaces{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a namespace and creates it. Returns the server's representation of the namespace, and an error, if there is any.
+func (c *namespaces) Create(namespace *v1.Namespace) (result *v1.Namespace, err error) {
+ result = &v1.Namespace{}
+ err = c.client.Post().
+ Resource("namespaces").
+ Body(namespace).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a namespace and updates it. Returns the server's representation of the namespace, and an error, if there is any.
+func (c *namespaces) Update(namespace *v1.Namespace) (result *v1.Namespace, err error) {
+ result = &v1.Namespace{}
+ err = c.client.Put().
+ Resource("namespaces").
+ Name(namespace.Name).
+ Body(namespace).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *namespaces) UpdateStatus(namespace *v1.Namespace) (result *v1.Namespace, err error) {
+ result = &v1.Namespace{}
+ err = c.client.Put().
+ Resource("namespaces").
+ Name(namespace.Name).
+ SubResource("status").
+ Body(namespace).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the namespace and deletes it. Returns an error if one occurs.
+func (c *namespaces) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("namespaces").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *namespaces) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("namespaces").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the namespace, and returns the corresponding namespace object, and an error if there is any.
+func (c *namespaces) Get(name string, options meta_v1.GetOptions) (result *v1.Namespace, err error) {
+ result = &v1.Namespace{}
+ err = c.client.Get().
+ Resource("namespaces").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Namespaces that match those selectors.
+func (c *namespaces) List(opts meta_v1.ListOptions) (result *v1.NamespaceList, err error) {
+ result = &v1.NamespaceList{}
+ err = c.client.Get().
+ Resource("namespaces").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested namespaces.
+func (c *namespaces) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("namespaces").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched namespace.
+func (c *namespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) {
+ result = &v1.Namespace{}
+ err = c.client.Patch(pt).
+ Resource("namespaces").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/namespace_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/namespace_expansion.go
new file mode 100644
index 000000000..36de2beea
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/namespace_expansion.go
@@ -0,0 +1,31 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import "k8s.io/kubernetes/pkg/api/v1"
+
+// The NamespaceExpansion interface allows manually adding extra methods to the NamespaceInterface.
+type NamespaceExpansion interface {
+ Finalize(item *v1.Namespace) (*v1.Namespace, error)
+}
+
+// Finalize takes the representation of a namespace to update. Returns the server's representation of the namespace, and an error, if it occurs.
+func (c *namespaces) Finalize(namespace *v1.Namespace) (result *v1.Namespace, err error) {
+ result = &v1.Namespace{}
+ err = c.client.Put().Resource("namespaces").Name(namespace.Name).SubResource("finalize").Body(namespace).Do().Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/node.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/node.go
new file mode 100644
index 000000000..c3aa1a1ae
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/node.go
@@ -0,0 +1,161 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// NodesGetter has a method to return a NodeInterface.
+// A group's client should implement this interface.
+type NodesGetter interface {
+ Nodes() NodeInterface
+}
+
+// NodeInterface has methods to work with Node resources.
+type NodeInterface interface {
+ Create(*v1.Node) (*v1.Node, error)
+ Update(*v1.Node) (*v1.Node, error)
+ UpdateStatus(*v1.Node) (*v1.Node, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.Node, error)
+ List(opts meta_v1.ListOptions) (*v1.NodeList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Node, err error)
+ NodeExpansion
+}
+
+// nodes implements NodeInterface
+type nodes struct {
+ client rest.Interface
+}
+
+// newNodes returns a Nodes
+func newNodes(c *CoreV1Client) *nodes {
+ return &nodes{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a node and creates it. Returns the server's representation of the node, and an error, if there is any.
+func (c *nodes) Create(node *v1.Node) (result *v1.Node, err error) {
+ result = &v1.Node{}
+ err = c.client.Post().
+ Resource("nodes").
+ Body(node).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a node and updates it. Returns the server's representation of the node, and an error, if there is any.
+func (c *nodes) Update(node *v1.Node) (result *v1.Node, err error) {
+ result = &v1.Node{}
+ err = c.client.Put().
+ Resource("nodes").
+ Name(node.Name).
+ Body(node).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *nodes) UpdateStatus(node *v1.Node) (result *v1.Node, err error) {
+ result = &v1.Node{}
+ err = c.client.Put().
+ Resource("nodes").
+ Name(node.Name).
+ SubResource("status").
+ Body(node).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the node and deletes it. Returns an error if one occurs.
+func (c *nodes) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("nodes").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *nodes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("nodes").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the node, and returns the corresponding node object, and an error if there is any.
+func (c *nodes) Get(name string, options meta_v1.GetOptions) (result *v1.Node, err error) {
+ result = &v1.Node{}
+ err = c.client.Get().
+ Resource("nodes").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Nodes that match those selectors.
+func (c *nodes) List(opts meta_v1.ListOptions) (result *v1.NodeList, err error) {
+ result = &v1.NodeList{}
+ err = c.client.Get().
+ Resource("nodes").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested nodes.
+func (c *nodes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("nodes").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched node.
+func (c *nodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Node, err error) {
+ result = &v1.Node{}
+ err = c.client.Patch(pt).
+ Resource("nodes").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/node_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/node_expansion.go
new file mode 100644
index 000000000..cd61419c9
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/node_expansion.go
@@ -0,0 +1,43 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/types"
+ "k8s.io/kubernetes/pkg/api/v1"
+)
+
+// The NodeExpansion interface allows manually adding extra methods to the NodeInterface.
+type NodeExpansion interface {
+ // PatchStatus modifies the status of an existing node. It returns the copy
+ // of the node that the server returns, or an error.
+ PatchStatus(nodeName string, data []byte) (*v1.Node, error)
+}
+
+// PatchStatus modifies the status of an existing node. It returns the copy of
+// the node that the server returns, or an error.
+func (c *nodes) PatchStatus(nodeName string, data []byte) (*v1.Node, error) {
+ result := &v1.Node{}
+ err := c.client.Patch(types.StrategicMergePatchType).
+ Resource("nodes").
+ Name(nodeName).
+ SubResource("status").
+ Body(data).
+ Do().
+ Into(result)
+ return result, err
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/persistentvolume.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/persistentvolume.go
new file mode 100644
index 000000000..82af0e99f
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/persistentvolume.go
@@ -0,0 +1,161 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// PersistentVolumesGetter has a method to return a PersistentVolumeInterface.
+// A group's client should implement this interface.
+type PersistentVolumesGetter interface {
+ PersistentVolumes() PersistentVolumeInterface
+}
+
+// PersistentVolumeInterface has methods to work with PersistentVolume resources.
+type PersistentVolumeInterface interface {
+ Create(*v1.PersistentVolume) (*v1.PersistentVolume, error)
+ Update(*v1.PersistentVolume) (*v1.PersistentVolume, error)
+ UpdateStatus(*v1.PersistentVolume) (*v1.PersistentVolume, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.PersistentVolume, error)
+ List(opts meta_v1.ListOptions) (*v1.PersistentVolumeList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error)
+ PersistentVolumeExpansion
+}
+
+// persistentVolumes implements PersistentVolumeInterface
+type persistentVolumes struct {
+ client rest.Interface
+}
+
+// newPersistentVolumes returns a PersistentVolumes
+func newPersistentVolumes(c *CoreV1Client) *persistentVolumes {
+ return &persistentVolumes{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a persistentVolume and creates it. Returns the server's representation of the persistentVolume, and an error, if there is any.
+func (c *persistentVolumes) Create(persistentVolume *v1.PersistentVolume) (result *v1.PersistentVolume, err error) {
+ result = &v1.PersistentVolume{}
+ err = c.client.Post().
+ Resource("persistentvolumes").
+ Body(persistentVolume).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a persistentVolume and updates it. Returns the server's representation of the persistentVolume, and an error, if there is any.
+func (c *persistentVolumes) Update(persistentVolume *v1.PersistentVolume) (result *v1.PersistentVolume, err error) {
+ result = &v1.PersistentVolume{}
+ err = c.client.Put().
+ Resource("persistentvolumes").
+ Name(persistentVolume.Name).
+ Body(persistentVolume).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *persistentVolumes) UpdateStatus(persistentVolume *v1.PersistentVolume) (result *v1.PersistentVolume, err error) {
+ result = &v1.PersistentVolume{}
+ err = c.client.Put().
+ Resource("persistentvolumes").
+ Name(persistentVolume.Name).
+ SubResource("status").
+ Body(persistentVolume).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the persistentVolume and deletes it. Returns an error if one occurs.
+func (c *persistentVolumes) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("persistentvolumes").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *persistentVolumes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("persistentvolumes").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the persistentVolume, and returns the corresponding persistentVolume object, and an error if there is any.
+func (c *persistentVolumes) Get(name string, options meta_v1.GetOptions) (result *v1.PersistentVolume, err error) {
+ result = &v1.PersistentVolume{}
+ err = c.client.Get().
+ Resource("persistentvolumes").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of PersistentVolumes that match those selectors.
+func (c *persistentVolumes) List(opts meta_v1.ListOptions) (result *v1.PersistentVolumeList, err error) {
+ result = &v1.PersistentVolumeList{}
+ err = c.client.Get().
+ Resource("persistentvolumes").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested persistentVolumes.
+func (c *persistentVolumes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("persistentvolumes").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched persistentVolume.
+func (c *persistentVolumes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error) {
+ result = &v1.PersistentVolume{}
+ err = c.client.Patch(pt).
+ Resource("persistentvolumes").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/persistentvolumeclaim.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/persistentvolumeclaim.go
new file mode 100644
index 000000000..45f9c160b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/persistentvolumeclaim.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// PersistentVolumeClaimsGetter has a method to return a PersistentVolumeClaimInterface.
+// A group's client should implement this interface.
+type PersistentVolumeClaimsGetter interface {
+ PersistentVolumeClaims(namespace string) PersistentVolumeClaimInterface
+}
+
+// PersistentVolumeClaimInterface has methods to work with PersistentVolumeClaim resources.
+type PersistentVolumeClaimInterface interface {
+ Create(*v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error)
+ Update(*v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error)
+ UpdateStatus(*v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.PersistentVolumeClaim, error)
+ List(opts meta_v1.ListOptions) (*v1.PersistentVolumeClaimList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error)
+ PersistentVolumeClaimExpansion
+}
+
+// persistentVolumeClaims implements PersistentVolumeClaimInterface
+type persistentVolumeClaims struct {
+ client rest.Interface
+ ns string
+}
+
+// newPersistentVolumeClaims returns a PersistentVolumeClaims
+func newPersistentVolumeClaims(c *CoreV1Client, namespace string) *persistentVolumeClaims {
+ return &persistentVolumeClaims{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a persistentVolumeClaim and creates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any.
+func (c *persistentVolumeClaims) Create(persistentVolumeClaim *v1.PersistentVolumeClaim) (result *v1.PersistentVolumeClaim, err error) {
+ result = &v1.PersistentVolumeClaim{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("persistentvolumeclaims").
+ Body(persistentVolumeClaim).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a persistentVolumeClaim and updates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any.
+func (c *persistentVolumeClaims) Update(persistentVolumeClaim *v1.PersistentVolumeClaim) (result *v1.PersistentVolumeClaim, err error) {
+ result = &v1.PersistentVolumeClaim{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("persistentvolumeclaims").
+ Name(persistentVolumeClaim.Name).
+ Body(persistentVolumeClaim).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *persistentVolumeClaims) UpdateStatus(persistentVolumeClaim *v1.PersistentVolumeClaim) (result *v1.PersistentVolumeClaim, err error) {
+ result = &v1.PersistentVolumeClaim{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("persistentvolumeclaims").
+ Name(persistentVolumeClaim.Name).
+ SubResource("status").
+ Body(persistentVolumeClaim).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the persistentVolumeClaim and deletes it. Returns an error if one occurs.
+func (c *persistentVolumeClaims) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("persistentvolumeclaims").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *persistentVolumeClaims) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("persistentvolumeclaims").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the persistentVolumeClaim, and returns the corresponding persistentVolumeClaim object, and an error if there is any.
+func (c *persistentVolumeClaims) Get(name string, options meta_v1.GetOptions) (result *v1.PersistentVolumeClaim, err error) {
+ result = &v1.PersistentVolumeClaim{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("persistentvolumeclaims").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of PersistentVolumeClaims that match those selectors.
+func (c *persistentVolumeClaims) List(opts meta_v1.ListOptions) (result *v1.PersistentVolumeClaimList, err error) {
+ result = &v1.PersistentVolumeClaimList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("persistentvolumeclaims").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested persistentVolumeClaims.
+func (c *persistentVolumeClaims) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("persistentvolumeclaims").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched persistentVolumeClaim.
+func (c *persistentVolumeClaims) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error) {
+ result = &v1.PersistentVolumeClaim{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("persistentvolumeclaims").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/pod.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/pod.go
new file mode 100644
index 000000000..68e574e9f
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/pod.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// PodsGetter has a method to return a PodInterface.
+// A group's client should implement this interface.
+type PodsGetter interface {
+ Pods(namespace string) PodInterface
+}
+
+// PodInterface has methods to work with Pod resources.
+type PodInterface interface {
+ Create(*v1.Pod) (*v1.Pod, error)
+ Update(*v1.Pod) (*v1.Pod, error)
+ UpdateStatus(*v1.Pod) (*v1.Pod, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.Pod, error)
+ List(opts meta_v1.ListOptions) (*v1.PodList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error)
+ PodExpansion
+}
+
+// pods implements PodInterface
+type pods struct {
+ client rest.Interface
+ ns string
+}
+
+// newPods returns a Pods
+func newPods(c *CoreV1Client, namespace string) *pods {
+ return &pods{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a pod and creates it. Returns the server's representation of the pod, and an error, if there is any.
+func (c *pods) Create(pod *v1.Pod) (result *v1.Pod, err error) {
+ result = &v1.Pod{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("pods").
+ Body(pod).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a pod and updates it. Returns the server's representation of the pod, and an error, if there is any.
+func (c *pods) Update(pod *v1.Pod) (result *v1.Pod, err error) {
+ result = &v1.Pod{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("pods").
+ Name(pod.Name).
+ Body(pod).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *pods) UpdateStatus(pod *v1.Pod) (result *v1.Pod, err error) {
+ result = &v1.Pod{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("pods").
+ Name(pod.Name).
+ SubResource("status").
+ Body(pod).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the pod and deletes it. Returns an error if one occurs.
+func (c *pods) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("pods").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *pods) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("pods").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the pod, and returns the corresponding pod object, and an error if there is any.
+func (c *pods) Get(name string, options meta_v1.GetOptions) (result *v1.Pod, err error) {
+ result = &v1.Pod{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("pods").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Pods that match those selectors.
+func (c *pods) List(opts meta_v1.ListOptions) (result *v1.PodList, err error) {
+ result = &v1.PodList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("pods").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested pods.
+func (c *pods) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("pods").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched pod.
+func (c *pods) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error) {
+ result = &v1.Pod{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("pods").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/pod_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/pod_expansion.go
new file mode 100644
index 000000000..661f5280c
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/pod_expansion.go
@@ -0,0 +1,45 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ restclient "k8s.io/client-go/rest"
+ "k8s.io/kubernetes/pkg/api/v1"
+ policy "k8s.io/kubernetes/pkg/apis/policy/v1beta1"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// The PodExpansion interface allows manually adding extra methods to the PodInterface.
+type PodExpansion interface {
+ Bind(binding *v1.Binding) error
+ Evict(eviction *policy.Eviction) error
+ GetLogs(name string, opts *v1.PodLogOptions) *restclient.Request
+}
+
+// Bind applies the provided binding to the named pod in the current namespace (binding.Namespace is ignored).
+func (c *pods) Bind(binding *v1.Binding) error {
+ return c.client.Post().Namespace(c.ns).Resource("pods").Name(binding.Name).SubResource("binding").Body(binding).Do().Error()
+}
+
+func (c *pods) Evict(eviction *policy.Eviction) error {
+ return c.client.Post().Namespace(c.ns).Resource("pods").Name(eviction.Name).SubResource("eviction").Body(eviction).Do().Error()
+}
+
+// Get constructs a request for getting the logs for a pod
+func (c *pods) GetLogs(name string, opts *v1.PodLogOptions) *restclient.Request {
+ return c.client.Get().Namespace(c.ns).Name(name).Resource("pods").SubResource("log").VersionedParams(opts, scheme.ParameterCodec)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/podtemplate.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/podtemplate.go
new file mode 100644
index 000000000..133b6706b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/podtemplate.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// PodTemplatesGetter has a method to return a PodTemplateInterface.
+// A group's client should implement this interface.
+type PodTemplatesGetter interface {
+ PodTemplates(namespace string) PodTemplateInterface
+}
+
+// PodTemplateInterface has methods to work with PodTemplate resources.
+type PodTemplateInterface interface {
+ Create(*v1.PodTemplate) (*v1.PodTemplate, error)
+ Update(*v1.PodTemplate) (*v1.PodTemplate, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.PodTemplate, error)
+ List(opts meta_v1.ListOptions) (*v1.PodTemplateList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error)
+ PodTemplateExpansion
+}
+
+// podTemplates implements PodTemplateInterface
+type podTemplates struct {
+ client rest.Interface
+ ns string
+}
+
+// newPodTemplates returns a PodTemplates
+func newPodTemplates(c *CoreV1Client, namespace string) *podTemplates {
+ return &podTemplates{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a podTemplate and creates it. Returns the server's representation of the podTemplate, and an error, if there is any.
+func (c *podTemplates) Create(podTemplate *v1.PodTemplate) (result *v1.PodTemplate, err error) {
+ result = &v1.PodTemplate{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("podtemplates").
+ Body(podTemplate).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a podTemplate and updates it. Returns the server's representation of the podTemplate, and an error, if there is any.
+func (c *podTemplates) Update(podTemplate *v1.PodTemplate) (result *v1.PodTemplate, err error) {
+ result = &v1.PodTemplate{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("podtemplates").
+ Name(podTemplate.Name).
+ Body(podTemplate).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the podTemplate and deletes it. Returns an error if one occurs.
+func (c *podTemplates) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("podtemplates").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *podTemplates) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("podtemplates").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the podTemplate, and returns the corresponding podTemplate object, and an error if there is any.
+func (c *podTemplates) Get(name string, options meta_v1.GetOptions) (result *v1.PodTemplate, err error) {
+ result = &v1.PodTemplate{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("podtemplates").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of PodTemplates that match those selectors.
+func (c *podTemplates) List(opts meta_v1.ListOptions) (result *v1.PodTemplateList, err error) {
+ result = &v1.PodTemplateList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("podtemplates").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested podTemplates.
+func (c *podTemplates) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("podtemplates").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched podTemplate.
+func (c *podTemplates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error) {
+ result = &v1.PodTemplate{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("podtemplates").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/replicationcontroller.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/replicationcontroller.go
new file mode 100644
index 000000000..7914e4a0d
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/replicationcontroller.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// ReplicationControllersGetter has a method to return a ReplicationControllerInterface.
+// A group's client should implement this interface.
+type ReplicationControllersGetter interface {
+ ReplicationControllers(namespace string) ReplicationControllerInterface
+}
+
+// ReplicationControllerInterface has methods to work with ReplicationController resources.
+type ReplicationControllerInterface interface {
+ Create(*v1.ReplicationController) (*v1.ReplicationController, error)
+ Update(*v1.ReplicationController) (*v1.ReplicationController, error)
+ UpdateStatus(*v1.ReplicationController) (*v1.ReplicationController, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.ReplicationController, error)
+ List(opts meta_v1.ListOptions) (*v1.ReplicationControllerList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error)
+ ReplicationControllerExpansion
+}
+
+// replicationControllers implements ReplicationControllerInterface
+type replicationControllers struct {
+ client rest.Interface
+ ns string
+}
+
+// newReplicationControllers returns a ReplicationControllers
+func newReplicationControllers(c *CoreV1Client, namespace string) *replicationControllers {
+ return &replicationControllers{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a replicationController and creates it. Returns the server's representation of the replicationController, and an error, if there is any.
+func (c *replicationControllers) Create(replicationController *v1.ReplicationController) (result *v1.ReplicationController, err error) {
+ result = &v1.ReplicationController{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("replicationcontrollers").
+ Body(replicationController).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a replicationController and updates it. Returns the server's representation of the replicationController, and an error, if there is any.
+func (c *replicationControllers) Update(replicationController *v1.ReplicationController) (result *v1.ReplicationController, err error) {
+ result = &v1.ReplicationController{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("replicationcontrollers").
+ Name(replicationController.Name).
+ Body(replicationController).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *replicationControllers) UpdateStatus(replicationController *v1.ReplicationController) (result *v1.ReplicationController, err error) {
+ result = &v1.ReplicationController{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("replicationcontrollers").
+ Name(replicationController.Name).
+ SubResource("status").
+ Body(replicationController).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the replicationController and deletes it. Returns an error if one occurs.
+func (c *replicationControllers) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("replicationcontrollers").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *replicationControllers) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("replicationcontrollers").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the replicationController, and returns the corresponding replicationController object, and an error if there is any.
+func (c *replicationControllers) Get(name string, options meta_v1.GetOptions) (result *v1.ReplicationController, err error) {
+ result = &v1.ReplicationController{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("replicationcontrollers").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of ReplicationControllers that match those selectors.
+func (c *replicationControllers) List(opts meta_v1.ListOptions) (result *v1.ReplicationControllerList, err error) {
+ result = &v1.ReplicationControllerList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("replicationcontrollers").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested replicationControllers.
+func (c *replicationControllers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("replicationcontrollers").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched replicationController.
+func (c *replicationControllers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error) {
+ result = &v1.ReplicationController{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("replicationcontrollers").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/resourcequota.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/resourcequota.go
new file mode 100644
index 000000000..0e9380fdd
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/resourcequota.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// ResourceQuotasGetter has a method to return a ResourceQuotaInterface.
+// A group's client should implement this interface.
+type ResourceQuotasGetter interface {
+ ResourceQuotas(namespace string) ResourceQuotaInterface
+}
+
+// ResourceQuotaInterface has methods to work with ResourceQuota resources.
+type ResourceQuotaInterface interface {
+ Create(*v1.ResourceQuota) (*v1.ResourceQuota, error)
+ Update(*v1.ResourceQuota) (*v1.ResourceQuota, error)
+ UpdateStatus(*v1.ResourceQuota) (*v1.ResourceQuota, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.ResourceQuota, error)
+ List(opts meta_v1.ListOptions) (*v1.ResourceQuotaList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error)
+ ResourceQuotaExpansion
+}
+
+// resourceQuotas implements ResourceQuotaInterface
+type resourceQuotas struct {
+ client rest.Interface
+ ns string
+}
+
+// newResourceQuotas returns a ResourceQuotas
+func newResourceQuotas(c *CoreV1Client, namespace string) *resourceQuotas {
+ return &resourceQuotas{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a resourceQuota and creates it. Returns the server's representation of the resourceQuota, and an error, if there is any.
+func (c *resourceQuotas) Create(resourceQuota *v1.ResourceQuota) (result *v1.ResourceQuota, err error) {
+ result = &v1.ResourceQuota{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("resourcequotas").
+ Body(resourceQuota).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a resourceQuota and updates it. Returns the server's representation of the resourceQuota, and an error, if there is any.
+func (c *resourceQuotas) Update(resourceQuota *v1.ResourceQuota) (result *v1.ResourceQuota, err error) {
+ result = &v1.ResourceQuota{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("resourcequotas").
+ Name(resourceQuota.Name).
+ Body(resourceQuota).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *resourceQuotas) UpdateStatus(resourceQuota *v1.ResourceQuota) (result *v1.ResourceQuota, err error) {
+ result = &v1.ResourceQuota{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("resourcequotas").
+ Name(resourceQuota.Name).
+ SubResource("status").
+ Body(resourceQuota).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the resourceQuota and deletes it. Returns an error if one occurs.
+func (c *resourceQuotas) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("resourcequotas").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *resourceQuotas) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("resourcequotas").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the resourceQuota, and returns the corresponding resourceQuota object, and an error if there is any.
+func (c *resourceQuotas) Get(name string, options meta_v1.GetOptions) (result *v1.ResourceQuota, err error) {
+ result = &v1.ResourceQuota{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("resourcequotas").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of ResourceQuotas that match those selectors.
+func (c *resourceQuotas) List(opts meta_v1.ListOptions) (result *v1.ResourceQuotaList, err error) {
+ result = &v1.ResourceQuotaList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("resourcequotas").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested resourceQuotas.
+func (c *resourceQuotas) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("resourcequotas").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched resourceQuota.
+func (c *resourceQuotas) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error) {
+ result = &v1.ResourceQuota{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("resourcequotas").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/secret.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/secret.go
new file mode 100644
index 000000000..29435d8a5
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/secret.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// SecretsGetter has a method to return a SecretInterface.
+// A group's client should implement this interface.
+type SecretsGetter interface {
+ Secrets(namespace string) SecretInterface
+}
+
+// SecretInterface has methods to work with Secret resources.
+type SecretInterface interface {
+ Create(*v1.Secret) (*v1.Secret, error)
+ Update(*v1.Secret) (*v1.Secret, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.Secret, error)
+ List(opts meta_v1.ListOptions) (*v1.SecretList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error)
+ SecretExpansion
+}
+
+// secrets implements SecretInterface
+type secrets struct {
+ client rest.Interface
+ ns string
+}
+
+// newSecrets returns a Secrets
+func newSecrets(c *CoreV1Client, namespace string) *secrets {
+ return &secrets{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a secret and creates it. Returns the server's representation of the secret, and an error, if there is any.
+func (c *secrets) Create(secret *v1.Secret) (result *v1.Secret, err error) {
+ result = &v1.Secret{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("secrets").
+ Body(secret).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a secret and updates it. Returns the server's representation of the secret, and an error, if there is any.
+func (c *secrets) Update(secret *v1.Secret) (result *v1.Secret, err error) {
+ result = &v1.Secret{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("secrets").
+ Name(secret.Name).
+ Body(secret).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the secret and deletes it. Returns an error if one occurs.
+func (c *secrets) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("secrets").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *secrets) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("secrets").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the secret, and returns the corresponding secret object, and an error if there is any.
+func (c *secrets) Get(name string, options meta_v1.GetOptions) (result *v1.Secret, err error) {
+ result = &v1.Secret{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("secrets").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Secrets that match those selectors.
+func (c *secrets) List(opts meta_v1.ListOptions) (result *v1.SecretList, err error) {
+ result = &v1.SecretList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("secrets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested secrets.
+func (c *secrets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("secrets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched secret.
+func (c *secrets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) {
+ result = &v1.Secret{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("secrets").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/service.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/service.go
new file mode 100644
index 000000000..41b5573c9
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/service.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// ServicesGetter has a method to return a ServiceInterface.
+// A group's client should implement this interface.
+type ServicesGetter interface {
+ Services(namespace string) ServiceInterface
+}
+
+// ServiceInterface has methods to work with Service resources.
+type ServiceInterface interface {
+ Create(*v1.Service) (*v1.Service, error)
+ Update(*v1.Service) (*v1.Service, error)
+ UpdateStatus(*v1.Service) (*v1.Service, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.Service, error)
+ List(opts meta_v1.ListOptions) (*v1.ServiceList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error)
+ ServiceExpansion
+}
+
+// services implements ServiceInterface
+type services struct {
+ client rest.Interface
+ ns string
+}
+
+// newServices returns a Services
+func newServices(c *CoreV1Client, namespace string) *services {
+ return &services{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a service and creates it. Returns the server's representation of the service, and an error, if there is any.
+func (c *services) Create(service *v1.Service) (result *v1.Service, err error) {
+ result = &v1.Service{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("services").
+ Body(service).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a service and updates it. Returns the server's representation of the service, and an error, if there is any.
+func (c *services) Update(service *v1.Service) (result *v1.Service, err error) {
+ result = &v1.Service{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("services").
+ Name(service.Name).
+ Body(service).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *services) UpdateStatus(service *v1.Service) (result *v1.Service, err error) {
+ result = &v1.Service{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("services").
+ Name(service.Name).
+ SubResource("status").
+ Body(service).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the service and deletes it. Returns an error if one occurs.
+func (c *services) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("services").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *services) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("services").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the service, and returns the corresponding service object, and an error if there is any.
+func (c *services) Get(name string, options meta_v1.GetOptions) (result *v1.Service, err error) {
+ result = &v1.Service{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("services").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Services that match those selectors.
+func (c *services) List(opts meta_v1.ListOptions) (result *v1.ServiceList, err error) {
+ result = &v1.ServiceList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("services").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested services.
+func (c *services) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("services").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched service.
+func (c *services) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) {
+ result = &v1.Service{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("services").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/service_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/service_expansion.go
new file mode 100644
index 000000000..4937fd1a3
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/service_expansion.go
@@ -0,0 +1,41 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ "k8s.io/apimachinery/pkg/util/net"
+ restclient "k8s.io/client-go/rest"
+)
+
+// The ServiceExpansion interface allows manually adding extra methods to the ServiceInterface.
+type ServiceExpansion interface {
+ ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper
+}
+
+// ProxyGet returns a response of the service by calling it through the proxy.
+func (c *services) ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper {
+ request := c.client.Get().
+ Namespace(c.ns).
+ Resource("services").
+ SubResource("proxy").
+ Name(net.JoinSchemeNamePort(scheme, name, port)).
+ Suffix(path)
+ for k, v := range params {
+ request = request.Param(k, v)
+ }
+ return request
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/serviceaccount.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/serviceaccount.go
new file mode 100644
index 000000000..b8e70ed5c
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/serviceaccount.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1 "k8s.io/kubernetes/pkg/api/v1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// ServiceAccountsGetter has a method to return a ServiceAccountInterface.
+// A group's client should implement this interface.
+type ServiceAccountsGetter interface {
+ ServiceAccounts(namespace string) ServiceAccountInterface
+}
+
+// ServiceAccountInterface has methods to work with ServiceAccount resources.
+type ServiceAccountInterface interface {
+ Create(*v1.ServiceAccount) (*v1.ServiceAccount, error)
+ Update(*v1.ServiceAccount) (*v1.ServiceAccount, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.ServiceAccount, error)
+ List(opts meta_v1.ListOptions) (*v1.ServiceAccountList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error)
+ ServiceAccountExpansion
+}
+
+// serviceAccounts implements ServiceAccountInterface
+type serviceAccounts struct {
+ client rest.Interface
+ ns string
+}
+
+// newServiceAccounts returns a ServiceAccounts
+func newServiceAccounts(c *CoreV1Client, namespace string) *serviceAccounts {
+ return &serviceAccounts{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a serviceAccount and creates it. Returns the server's representation of the serviceAccount, and an error, if there is any.
+func (c *serviceAccounts) Create(serviceAccount *v1.ServiceAccount) (result *v1.ServiceAccount, err error) {
+ result = &v1.ServiceAccount{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("serviceaccounts").
+ Body(serviceAccount).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a serviceAccount and updates it. Returns the server's representation of the serviceAccount, and an error, if there is any.
+func (c *serviceAccounts) Update(serviceAccount *v1.ServiceAccount) (result *v1.ServiceAccount, err error) {
+ result = &v1.ServiceAccount{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("serviceaccounts").
+ Name(serviceAccount.Name).
+ Body(serviceAccount).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the serviceAccount and deletes it. Returns an error if one occurs.
+func (c *serviceAccounts) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("serviceaccounts").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *serviceAccounts) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("serviceaccounts").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the serviceAccount, and returns the corresponding serviceAccount object, and an error if there is any.
+func (c *serviceAccounts) Get(name string, options meta_v1.GetOptions) (result *v1.ServiceAccount, err error) {
+ result = &v1.ServiceAccount{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("serviceaccounts").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of ServiceAccounts that match those selectors.
+func (c *serviceAccounts) List(opts meta_v1.ListOptions) (result *v1.ServiceAccountList, err error) {
+ result = &v1.ServiceAccountList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("serviceaccounts").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested serviceAccounts.
+func (c *serviceAccounts) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("serviceaccounts").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched serviceAccount.
+func (c *serviceAccounts) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error) {
+ result = &v1.ServiceAccount{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("serviceaccounts").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/daemonset.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/daemonset.go
new file mode 100644
index 000000000..f55eb1e69
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/daemonset.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// DaemonSetsGetter has a method to return a DaemonSetInterface.
+// A group's client should implement this interface.
+type DaemonSetsGetter interface {
+ DaemonSets(namespace string) DaemonSetInterface
+}
+
+// DaemonSetInterface has methods to work with DaemonSet resources.
+type DaemonSetInterface interface {
+ Create(*v1beta1.DaemonSet) (*v1beta1.DaemonSet, error)
+ Update(*v1beta1.DaemonSet) (*v1beta1.DaemonSet, error)
+ UpdateStatus(*v1beta1.DaemonSet) (*v1beta1.DaemonSet, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.DaemonSet, error)
+ List(opts v1.ListOptions) (*v1beta1.DaemonSetList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error)
+ DaemonSetExpansion
+}
+
+// daemonSets implements DaemonSetInterface
+type daemonSets struct {
+ client rest.Interface
+ ns string
+}
+
+// newDaemonSets returns a DaemonSets
+func newDaemonSets(c *ExtensionsV1beta1Client, namespace string) *daemonSets {
+ return &daemonSets{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any.
+func (c *daemonSets) Create(daemonSet *v1beta1.DaemonSet) (result *v1beta1.DaemonSet, err error) {
+ result = &v1beta1.DaemonSet{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("daemonsets").
+ Body(daemonSet).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any.
+func (c *daemonSets) Update(daemonSet *v1beta1.DaemonSet) (result *v1beta1.DaemonSet, err error) {
+ result = &v1beta1.DaemonSet{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("daemonsets").
+ Name(daemonSet.Name).
+ Body(daemonSet).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *daemonSets) UpdateStatus(daemonSet *v1beta1.DaemonSet) (result *v1beta1.DaemonSet, err error) {
+ result = &v1beta1.DaemonSet{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("daemonsets").
+ Name(daemonSet.Name).
+ SubResource("status").
+ Body(daemonSet).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the daemonSet and deletes it. Returns an error if one occurs.
+func (c *daemonSets) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("daemonsets").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *daemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("daemonsets").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any.
+func (c *daemonSets) Get(name string, options v1.GetOptions) (result *v1beta1.DaemonSet, err error) {
+ result = &v1beta1.DaemonSet{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("daemonsets").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of DaemonSets that match those selectors.
+func (c *daemonSets) List(opts v1.ListOptions) (result *v1beta1.DaemonSetList, err error) {
+ result = &v1beta1.DaemonSetList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("daemonsets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested daemonSets.
+func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("daemonsets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched daemonSet.
+func (c *daemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) {
+ result = &v1beta1.DaemonSet{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("daemonsets").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/deployment.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/deployment.go
new file mode 100644
index 000000000..a632d8ba5
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/deployment.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// DeploymentsGetter has a method to return a DeploymentInterface.
+// A group's client should implement this interface.
+type DeploymentsGetter interface {
+ Deployments(namespace string) DeploymentInterface
+}
+
+// DeploymentInterface has methods to work with Deployment resources.
+type DeploymentInterface interface {
+ Create(*v1beta1.Deployment) (*v1beta1.Deployment, error)
+ Update(*v1beta1.Deployment) (*v1beta1.Deployment, error)
+ UpdateStatus(*v1beta1.Deployment) (*v1beta1.Deployment, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.Deployment, error)
+ List(opts v1.ListOptions) (*v1beta1.DeploymentList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error)
+ DeploymentExpansion
+}
+
+// deployments implements DeploymentInterface
+type deployments struct {
+ client rest.Interface
+ ns string
+}
+
+// newDeployments returns a Deployments
+func newDeployments(c *ExtensionsV1beta1Client, namespace string) *deployments {
+ return &deployments{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any.
+func (c *deployments) Create(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
+ result = &v1beta1.Deployment{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("deployments").
+ Body(deployment).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any.
+func (c *deployments) Update(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
+ result = &v1beta1.Deployment{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("deployments").
+ Name(deployment.Name).
+ Body(deployment).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *deployments) UpdateStatus(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
+ result = &v1beta1.Deployment{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("deployments").
+ Name(deployment.Name).
+ SubResource("status").
+ Body(deployment).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the deployment and deletes it. Returns an error if one occurs.
+func (c *deployments) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("deployments").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("deployments").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any.
+func (c *deployments) Get(name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) {
+ result = &v1beta1.Deployment{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("deployments").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Deployments that match those selectors.
+func (c *deployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) {
+ result = &v1beta1.DeploymentList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("deployments").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested deployments.
+func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("deployments").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched deployment.
+func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) {
+ result = &v1beta1.Deployment{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("deployments").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/deployment_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/deployment_expansion.go
new file mode 100644
index 000000000..cd3cd1027
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/deployment_expansion.go
@@ -0,0 +1,29 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
+
+// The DeploymentExpansion interface allows manually adding extra methods to the DeploymentInterface.
+type DeploymentExpansion interface {
+ Rollback(*v1beta1.DeploymentRollback) error
+}
+
+// Rollback applied the provided DeploymentRollback to the named deployment in the current namespace.
+func (c *deployments) Rollback(deploymentRollback *v1beta1.DeploymentRollback) error {
+ return c.client.Post().Namespace(c.ns).Resource("deployments").Name(deploymentRollback.Name).SubResource("rollback").Body(deploymentRollback).Do().Error()
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/doc.go
new file mode 100644
index 000000000..11b523897
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1beta1
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/extensions_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/extensions_client.go
new file mode 100644
index 000000000..3f86c853f
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/extensions_client.go
@@ -0,0 +1,118 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ rest "k8s.io/client-go/rest"
+ v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+type ExtensionsV1beta1Interface interface {
+ RESTClient() rest.Interface
+ DaemonSetsGetter
+ DeploymentsGetter
+ IngressesGetter
+ PodSecurityPoliciesGetter
+ ReplicaSetsGetter
+ ScalesGetter
+ ThirdPartyResourcesGetter
+}
+
+// ExtensionsV1beta1Client is used to interact with features provided by the extensions group.
+type ExtensionsV1beta1Client struct {
+ restClient rest.Interface
+}
+
+func (c *ExtensionsV1beta1Client) DaemonSets(namespace string) DaemonSetInterface {
+ return newDaemonSets(c, namespace)
+}
+
+func (c *ExtensionsV1beta1Client) Deployments(namespace string) DeploymentInterface {
+ return newDeployments(c, namespace)
+}
+
+func (c *ExtensionsV1beta1Client) Ingresses(namespace string) IngressInterface {
+ return newIngresses(c, namespace)
+}
+
+func (c *ExtensionsV1beta1Client) PodSecurityPolicies() PodSecurityPolicyInterface {
+ return newPodSecurityPolicies(c)
+}
+
+func (c *ExtensionsV1beta1Client) ReplicaSets(namespace string) ReplicaSetInterface {
+ return newReplicaSets(c, namespace)
+}
+
+func (c *ExtensionsV1beta1Client) Scales(namespace string) ScaleInterface {
+ return newScales(c, namespace)
+}
+
+func (c *ExtensionsV1beta1Client) ThirdPartyResources() ThirdPartyResourceInterface {
+ return newThirdPartyResources(c)
+}
+
+// NewForConfig creates a new ExtensionsV1beta1Client for the given config.
+func NewForConfig(c *rest.Config) (*ExtensionsV1beta1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &ExtensionsV1beta1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new ExtensionsV1beta1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *ExtensionsV1beta1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new ExtensionsV1beta1Client for the given RESTClient.
+func New(c rest.Interface) *ExtensionsV1beta1Client {
+ return &ExtensionsV1beta1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1beta1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *ExtensionsV1beta1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/generated_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/generated_expansion.go
new file mode 100644
index 000000000..d0a3d64bc
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/generated_expansion.go
@@ -0,0 +1,27 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+type DaemonSetExpansion interface{}
+
+type IngressExpansion interface{}
+
+type PodSecurityPolicyExpansion interface{}
+
+type ReplicaSetExpansion interface{}
+
+type ThirdPartyResourceExpansion interface{}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/ingress.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/ingress.go
new file mode 100644
index 000000000..8df8772f1
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/ingress.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// IngressesGetter has a method to return a IngressInterface.
+// A group's client should implement this interface.
+type IngressesGetter interface {
+ Ingresses(namespace string) IngressInterface
+}
+
+// IngressInterface has methods to work with Ingress resources.
+type IngressInterface interface {
+ Create(*v1beta1.Ingress) (*v1beta1.Ingress, error)
+ Update(*v1beta1.Ingress) (*v1beta1.Ingress, error)
+ UpdateStatus(*v1beta1.Ingress) (*v1beta1.Ingress, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.Ingress, error)
+ List(opts v1.ListOptions) (*v1beta1.IngressList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error)
+ IngressExpansion
+}
+
+// ingresses implements IngressInterface
+type ingresses struct {
+ client rest.Interface
+ ns string
+}
+
+// newIngresses returns a Ingresses
+func newIngresses(c *ExtensionsV1beta1Client, namespace string) *ingresses {
+ return &ingresses{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a ingress and creates it. Returns the server's representation of the ingress, and an error, if there is any.
+func (c *ingresses) Create(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) {
+ result = &v1beta1.Ingress{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("ingresses").
+ Body(ingress).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a ingress and updates it. Returns the server's representation of the ingress, and an error, if there is any.
+func (c *ingresses) Update(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) {
+ result = &v1beta1.Ingress{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("ingresses").
+ Name(ingress.Name).
+ Body(ingress).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *ingresses) UpdateStatus(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) {
+ result = &v1beta1.Ingress{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("ingresses").
+ Name(ingress.Name).
+ SubResource("status").
+ Body(ingress).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the ingress and deletes it. Returns an error if one occurs.
+func (c *ingresses) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("ingresses").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *ingresses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("ingresses").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the ingress, and returns the corresponding ingress object, and an error if there is any.
+func (c *ingresses) Get(name string, options v1.GetOptions) (result *v1beta1.Ingress, err error) {
+ result = &v1beta1.Ingress{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("ingresses").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Ingresses that match those selectors.
+func (c *ingresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, err error) {
+ result = &v1beta1.IngressList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("ingresses").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested ingresses.
+func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("ingresses").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched ingress.
+func (c *ingresses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) {
+ result = &v1beta1.Ingress{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("ingresses").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/podsecuritypolicy.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/podsecuritypolicy.go
new file mode 100644
index 000000000..d8ef5b89a
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/podsecuritypolicy.go
@@ -0,0 +1,145 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// PodSecurityPoliciesGetter has a method to return a PodSecurityPolicyInterface.
+// A group's client should implement this interface.
+type PodSecurityPoliciesGetter interface {
+ PodSecurityPolicies() PodSecurityPolicyInterface
+}
+
+// PodSecurityPolicyInterface has methods to work with PodSecurityPolicy resources.
+type PodSecurityPolicyInterface interface {
+ Create(*v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error)
+ Update(*v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.PodSecurityPolicy, error)
+ List(opts v1.ListOptions) (*v1beta1.PodSecurityPolicyList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error)
+ PodSecurityPolicyExpansion
+}
+
+// podSecurityPolicies implements PodSecurityPolicyInterface
+type podSecurityPolicies struct {
+ client rest.Interface
+}
+
+// newPodSecurityPolicies returns a PodSecurityPolicies
+func newPodSecurityPolicies(c *ExtensionsV1beta1Client) *podSecurityPolicies {
+ return &podSecurityPolicies{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a podSecurityPolicy and creates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any.
+func (c *podSecurityPolicies) Create(podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) {
+ result = &v1beta1.PodSecurityPolicy{}
+ err = c.client.Post().
+ Resource("podsecuritypolicies").
+ Body(podSecurityPolicy).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a podSecurityPolicy and updates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any.
+func (c *podSecurityPolicies) Update(podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) {
+ result = &v1beta1.PodSecurityPolicy{}
+ err = c.client.Put().
+ Resource("podsecuritypolicies").
+ Name(podSecurityPolicy.Name).
+ Body(podSecurityPolicy).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the podSecurityPolicy and deletes it. Returns an error if one occurs.
+func (c *podSecurityPolicies) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("podsecuritypolicies").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *podSecurityPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("podsecuritypolicies").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the podSecurityPolicy, and returns the corresponding podSecurityPolicy object, and an error if there is any.
+func (c *podSecurityPolicies) Get(name string, options v1.GetOptions) (result *v1beta1.PodSecurityPolicy, err error) {
+ result = &v1beta1.PodSecurityPolicy{}
+ err = c.client.Get().
+ Resource("podsecuritypolicies").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of PodSecurityPolicies that match those selectors.
+func (c *podSecurityPolicies) List(opts v1.ListOptions) (result *v1beta1.PodSecurityPolicyList, err error) {
+ result = &v1beta1.PodSecurityPolicyList{}
+ err = c.client.Get().
+ Resource("podsecuritypolicies").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested podSecurityPolicies.
+func (c *podSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("podsecuritypolicies").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched podSecurityPolicy.
+func (c *podSecurityPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) {
+ result = &v1beta1.PodSecurityPolicy{}
+ err = c.client.Patch(pt).
+ Resource("podsecuritypolicies").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/replicaset.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/replicaset.go
new file mode 100644
index 000000000..f9c61d698
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/replicaset.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// ReplicaSetsGetter has a method to return a ReplicaSetInterface.
+// A group's client should implement this interface.
+type ReplicaSetsGetter interface {
+ ReplicaSets(namespace string) ReplicaSetInterface
+}
+
+// ReplicaSetInterface has methods to work with ReplicaSet resources.
+type ReplicaSetInterface interface {
+ Create(*v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error)
+ Update(*v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error)
+ UpdateStatus(*v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.ReplicaSet, error)
+ List(opts v1.ListOptions) (*v1beta1.ReplicaSetList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error)
+ ReplicaSetExpansion
+}
+
+// replicaSets implements ReplicaSetInterface
+type replicaSets struct {
+ client rest.Interface
+ ns string
+}
+
+// newReplicaSets returns a ReplicaSets
+func newReplicaSets(c *ExtensionsV1beta1Client, namespace string) *replicaSets {
+ return &replicaSets{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any.
+func (c *replicaSets) Create(replicaSet *v1beta1.ReplicaSet) (result *v1beta1.ReplicaSet, err error) {
+ result = &v1beta1.ReplicaSet{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("replicasets").
+ Body(replicaSet).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any.
+func (c *replicaSets) Update(replicaSet *v1beta1.ReplicaSet) (result *v1beta1.ReplicaSet, err error) {
+ result = &v1beta1.ReplicaSet{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("replicasets").
+ Name(replicaSet.Name).
+ Body(replicaSet).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *replicaSets) UpdateStatus(replicaSet *v1beta1.ReplicaSet) (result *v1beta1.ReplicaSet, err error) {
+ result = &v1beta1.ReplicaSet{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("replicasets").
+ Name(replicaSet.Name).
+ SubResource("status").
+ Body(replicaSet).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the replicaSet and deletes it. Returns an error if one occurs.
+func (c *replicaSets) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("replicasets").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *replicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("replicasets").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any.
+func (c *replicaSets) Get(name string, options v1.GetOptions) (result *v1beta1.ReplicaSet, err error) {
+ result = &v1beta1.ReplicaSet{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("replicasets").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of ReplicaSets that match those selectors.
+func (c *replicaSets) List(opts v1.ListOptions) (result *v1beta1.ReplicaSetList, err error) {
+ result = &v1beta1.ReplicaSetList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("replicasets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested replicaSets.
+func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("replicasets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched replicaSet.
+func (c *replicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) {
+ result = &v1beta1.ReplicaSet{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("replicasets").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/scale.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/scale.go
new file mode 100644
index 000000000..733012ade
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/scale.go
@@ -0,0 +1,46 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ rest "k8s.io/client-go/rest"
+)
+
+// ScalesGetter has a method to return a ScaleInterface.
+// A group's client should implement this interface.
+type ScalesGetter interface {
+ Scales(namespace string) ScaleInterface
+}
+
+// ScaleInterface has methods to work with Scale resources.
+type ScaleInterface interface {
+ ScaleExpansion
+}
+
+// scales implements ScaleInterface
+type scales struct {
+ client rest.Interface
+ ns string
+}
+
+// newScales returns a Scales
+func newScales(c *ExtensionsV1beta1Client, namespace string) *scales {
+ return &scales{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/scale_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/scale_expansion.go
new file mode 100644
index 000000000..12224e58b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/scale_expansion.go
@@ -0,0 +1,65 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ "k8s.io/apimachinery/pkg/api/meta"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
+)
+
+// The ScaleExpansion interface allows manually adding extra methods to the ScaleInterface.
+type ScaleExpansion interface {
+ Get(kind string, name string) (*v1beta1.Scale, error)
+ Update(kind string, scale *v1beta1.Scale) (*v1beta1.Scale, error)
+}
+
+// Get takes the reference to scale subresource and returns the subresource or error, if one occurs.
+func (c *scales) Get(kind string, name string) (result *v1beta1.Scale, err error) {
+ result = &v1beta1.Scale{}
+
+ // TODO this method needs to take a proper unambiguous kind
+ fullyQualifiedKind := schema.GroupVersionKind{Kind: kind}
+ resource, _ := meta.UnsafeGuessKindToResource(fullyQualifiedKind)
+
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource(resource.Resource).
+ Name(name).
+ SubResource("scale").
+ Do().
+ Into(result)
+ return
+}
+
+func (c *scales) Update(kind string, scale *v1beta1.Scale) (result *v1beta1.Scale, err error) {
+ result = &v1beta1.Scale{}
+
+ // TODO this method needs to take a proper unambiguous kind
+ fullyQualifiedKind := schema.GroupVersionKind{Kind: kind}
+ resource, _ := meta.UnsafeGuessKindToResource(fullyQualifiedKind)
+
+ err = c.client.Put().
+ Namespace(scale.Namespace).
+ Resource(resource.Resource).
+ Name(scale.Name).
+ SubResource("scale").
+ Body(scale).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/thirdpartyresource.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/thirdpartyresource.go
new file mode 100644
index 000000000..cf1b52864
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/thirdpartyresource.go
@@ -0,0 +1,145 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// ThirdPartyResourcesGetter has a method to return a ThirdPartyResourceInterface.
+// A group's client should implement this interface.
+type ThirdPartyResourcesGetter interface {
+ ThirdPartyResources() ThirdPartyResourceInterface
+}
+
+// ThirdPartyResourceInterface has methods to work with ThirdPartyResource resources.
+type ThirdPartyResourceInterface interface {
+ Create(*v1beta1.ThirdPartyResource) (*v1beta1.ThirdPartyResource, error)
+ Update(*v1beta1.ThirdPartyResource) (*v1beta1.ThirdPartyResource, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.ThirdPartyResource, error)
+ List(opts v1.ListOptions) (*v1beta1.ThirdPartyResourceList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ThirdPartyResource, err error)
+ ThirdPartyResourceExpansion
+}
+
+// thirdPartyResources implements ThirdPartyResourceInterface
+type thirdPartyResources struct {
+ client rest.Interface
+}
+
+// newThirdPartyResources returns a ThirdPartyResources
+func newThirdPartyResources(c *ExtensionsV1beta1Client) *thirdPartyResources {
+ return &thirdPartyResources{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a thirdPartyResource and creates it. Returns the server's representation of the thirdPartyResource, and an error, if there is any.
+func (c *thirdPartyResources) Create(thirdPartyResource *v1beta1.ThirdPartyResource) (result *v1beta1.ThirdPartyResource, err error) {
+ result = &v1beta1.ThirdPartyResource{}
+ err = c.client.Post().
+ Resource("thirdpartyresources").
+ Body(thirdPartyResource).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a thirdPartyResource and updates it. Returns the server's representation of the thirdPartyResource, and an error, if there is any.
+func (c *thirdPartyResources) Update(thirdPartyResource *v1beta1.ThirdPartyResource) (result *v1beta1.ThirdPartyResource, err error) {
+ result = &v1beta1.ThirdPartyResource{}
+ err = c.client.Put().
+ Resource("thirdpartyresources").
+ Name(thirdPartyResource.Name).
+ Body(thirdPartyResource).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the thirdPartyResource and deletes it. Returns an error if one occurs.
+func (c *thirdPartyResources) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("thirdpartyresources").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *thirdPartyResources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("thirdpartyresources").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the thirdPartyResource, and returns the corresponding thirdPartyResource object, and an error if there is any.
+func (c *thirdPartyResources) Get(name string, options v1.GetOptions) (result *v1beta1.ThirdPartyResource, err error) {
+ result = &v1beta1.ThirdPartyResource{}
+ err = c.client.Get().
+ Resource("thirdpartyresources").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of ThirdPartyResources that match those selectors.
+func (c *thirdPartyResources) List(opts v1.ListOptions) (result *v1beta1.ThirdPartyResourceList, err error) {
+ result = &v1beta1.ThirdPartyResourceList{}
+ err = c.client.Get().
+ Resource("thirdpartyresources").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested thirdPartyResources.
+func (c *thirdPartyResources) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("thirdpartyresources").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched thirdPartyResource.
+func (c *thirdPartyResources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ThirdPartyResource, err error) {
+ result = &v1beta1.ThirdPartyResource{}
+ err = c.client.Patch(pt).
+ Resource("thirdpartyresources").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/networking/v1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/networking/v1/doc.go
new file mode 100644
index 000000000..54673bfa7
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/networking/v1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/networking/v1/generated_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/networking/v1/generated_expansion.go
new file mode 100644
index 000000000..cdd70ae35
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/networking/v1/generated_expansion.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+type NetworkPolicyExpansion interface{}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/networking/v1/networking_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/networking/v1/networking_client.go
new file mode 100644
index 000000000..fcfd62ca3
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/networking/v1/networking_client.go
@@ -0,0 +1,88 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ rest "k8s.io/client-go/rest"
+ v1 "k8s.io/kubernetes/pkg/apis/networking/v1"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+type NetworkingV1Interface interface {
+ RESTClient() rest.Interface
+ NetworkPoliciesGetter
+}
+
+// NetworkingV1Client is used to interact with features provided by the networking.k8s.io group.
+type NetworkingV1Client struct {
+ restClient rest.Interface
+}
+
+func (c *NetworkingV1Client) NetworkPolicies(namespace string) NetworkPolicyInterface {
+ return newNetworkPolicies(c, namespace)
+}
+
+// NewForConfig creates a new NetworkingV1Client for the given config.
+func NewForConfig(c *rest.Config) (*NetworkingV1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &NetworkingV1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new NetworkingV1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *NetworkingV1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new NetworkingV1Client for the given RESTClient.
+func New(c rest.Interface) *NetworkingV1Client {
+ return &NetworkingV1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *NetworkingV1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/networking/v1/networkpolicy.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/networking/v1/networkpolicy.go
new file mode 100644
index 000000000..a4bbaa6c1
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/networking/v1/networkpolicy.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1 "k8s.io/kubernetes/pkg/apis/networking/v1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// NetworkPoliciesGetter has a method to return a NetworkPolicyInterface.
+// A group's client should implement this interface.
+type NetworkPoliciesGetter interface {
+ NetworkPolicies(namespace string) NetworkPolicyInterface
+}
+
+// NetworkPolicyInterface has methods to work with NetworkPolicy resources.
+type NetworkPolicyInterface interface {
+ Create(*v1.NetworkPolicy) (*v1.NetworkPolicy, error)
+ Update(*v1.NetworkPolicy) (*v1.NetworkPolicy, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.NetworkPolicy, error)
+ List(opts meta_v1.ListOptions) (*v1.NetworkPolicyList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.NetworkPolicy, err error)
+ NetworkPolicyExpansion
+}
+
+// networkPolicies implements NetworkPolicyInterface
+type networkPolicies struct {
+ client rest.Interface
+ ns string
+}
+
+// newNetworkPolicies returns a NetworkPolicies
+func newNetworkPolicies(c *NetworkingV1Client, namespace string) *networkPolicies {
+ return &networkPolicies{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a networkPolicy and creates it. Returns the server's representation of the networkPolicy, and an error, if there is any.
+func (c *networkPolicies) Create(networkPolicy *v1.NetworkPolicy) (result *v1.NetworkPolicy, err error) {
+ result = &v1.NetworkPolicy{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("networkpolicies").
+ Body(networkPolicy).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a networkPolicy and updates it. Returns the server's representation of the networkPolicy, and an error, if there is any.
+func (c *networkPolicies) Update(networkPolicy *v1.NetworkPolicy) (result *v1.NetworkPolicy, err error) {
+ result = &v1.NetworkPolicy{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("networkpolicies").
+ Name(networkPolicy.Name).
+ Body(networkPolicy).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs.
+func (c *networkPolicies) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("networkpolicies").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *networkPolicies) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("networkpolicies").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the networkPolicy, and returns the corresponding networkPolicy object, and an error if there is any.
+func (c *networkPolicies) Get(name string, options meta_v1.GetOptions) (result *v1.NetworkPolicy, err error) {
+ result = &v1.NetworkPolicy{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("networkpolicies").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of NetworkPolicies that match those selectors.
+func (c *networkPolicies) List(opts meta_v1.ListOptions) (result *v1.NetworkPolicyList, err error) {
+ result = &v1.NetworkPolicyList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("networkpolicies").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested networkPolicies.
+func (c *networkPolicies) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("networkpolicies").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched networkPolicy.
+func (c *networkPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.NetworkPolicy, err error) {
+ result = &v1.NetworkPolicy{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("networkpolicies").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/doc.go
new file mode 100644
index 000000000..11b523897
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1beta1
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/eviction.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/eviction.go
new file mode 100644
index 000000000..9c4133e36
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/eviction.go
@@ -0,0 +1,46 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ rest "k8s.io/client-go/rest"
+)
+
+// EvictionsGetter has a method to return a EvictionInterface.
+// A group's client should implement this interface.
+type EvictionsGetter interface {
+ Evictions(namespace string) EvictionInterface
+}
+
+// EvictionInterface has methods to work with Eviction resources.
+type EvictionInterface interface {
+ EvictionExpansion
+}
+
+// evictions implements EvictionInterface
+type evictions struct {
+ client rest.Interface
+ ns string
+}
+
+// newEvictions returns a Evictions
+func newEvictions(c *PolicyV1beta1Client, namespace string) *evictions {
+ return &evictions{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/eviction_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/eviction_expansion.go
new file mode 100644
index 000000000..c24252cb0
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/eviction_expansion.go
@@ -0,0 +1,38 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ policy "k8s.io/kubernetes/pkg/apis/policy/v1beta1"
+)
+
+// The EvictionExpansion interface allows manually adding extra methods to the ScaleInterface.
+type EvictionExpansion interface {
+ Evict(eviction *policy.Eviction) error
+}
+
+func (c *evictions) Evict(eviction *policy.Eviction) error {
+ return c.client.Post().
+ AbsPath("/api/v1").
+ Namespace(eviction.Namespace).
+ Resource("pods").
+ Name(eviction.Name).
+ SubResource("eviction").
+ Body(eviction).
+ Do().
+ Error()
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/generated_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/generated_expansion.go
new file mode 100644
index 000000000..511adc6ef
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/generated_expansion.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+type PodDisruptionBudgetExpansion interface{}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/poddisruptionbudget.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/poddisruptionbudget.go
new file mode 100644
index 000000000..c32f95d42
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/poddisruptionbudget.go
@@ -0,0 +1,172 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1beta1 "k8s.io/kubernetes/pkg/apis/policy/v1beta1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// PodDisruptionBudgetsGetter has a method to return a PodDisruptionBudgetInterface.
+// A group's client should implement this interface.
+type PodDisruptionBudgetsGetter interface {
+ PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface
+}
+
+// PodDisruptionBudgetInterface has methods to work with PodDisruptionBudget resources.
+type PodDisruptionBudgetInterface interface {
+ Create(*v1beta1.PodDisruptionBudget) (*v1beta1.PodDisruptionBudget, error)
+ Update(*v1beta1.PodDisruptionBudget) (*v1beta1.PodDisruptionBudget, error)
+ UpdateStatus(*v1beta1.PodDisruptionBudget) (*v1beta1.PodDisruptionBudget, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.PodDisruptionBudget, error)
+ List(opts v1.ListOptions) (*v1beta1.PodDisruptionBudgetList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error)
+ PodDisruptionBudgetExpansion
+}
+
+// podDisruptionBudgets implements PodDisruptionBudgetInterface
+type podDisruptionBudgets struct {
+ client rest.Interface
+ ns string
+}
+
+// newPodDisruptionBudgets returns a PodDisruptionBudgets
+func newPodDisruptionBudgets(c *PolicyV1beta1Client, namespace string) *podDisruptionBudgets {
+ return &podDisruptionBudgets{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a podDisruptionBudget and creates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any.
+func (c *podDisruptionBudgets) Create(podDisruptionBudget *v1beta1.PodDisruptionBudget) (result *v1beta1.PodDisruptionBudget, err error) {
+ result = &v1beta1.PodDisruptionBudget{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("poddisruptionbudgets").
+ Body(podDisruptionBudget).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a podDisruptionBudget and updates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any.
+func (c *podDisruptionBudgets) Update(podDisruptionBudget *v1beta1.PodDisruptionBudget) (result *v1beta1.PodDisruptionBudget, err error) {
+ result = &v1beta1.PodDisruptionBudget{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("poddisruptionbudgets").
+ Name(podDisruptionBudget.Name).
+ Body(podDisruptionBudget).
+ Do().
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+
+func (c *podDisruptionBudgets) UpdateStatus(podDisruptionBudget *v1beta1.PodDisruptionBudget) (result *v1beta1.PodDisruptionBudget, err error) {
+ result = &v1beta1.PodDisruptionBudget{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("poddisruptionbudgets").
+ Name(podDisruptionBudget.Name).
+ SubResource("status").
+ Body(podDisruptionBudget).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the podDisruptionBudget and deletes it. Returns an error if one occurs.
+func (c *podDisruptionBudgets) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("poddisruptionbudgets").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *podDisruptionBudgets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("poddisruptionbudgets").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the podDisruptionBudget, and returns the corresponding podDisruptionBudget object, and an error if there is any.
+func (c *podDisruptionBudgets) Get(name string, options v1.GetOptions) (result *v1beta1.PodDisruptionBudget, err error) {
+ result = &v1beta1.PodDisruptionBudget{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("poddisruptionbudgets").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of PodDisruptionBudgets that match those selectors.
+func (c *podDisruptionBudgets) List(opts v1.ListOptions) (result *v1beta1.PodDisruptionBudgetList, err error) {
+ result = &v1beta1.PodDisruptionBudgetList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("poddisruptionbudgets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested podDisruptionBudgets.
+func (c *podDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("poddisruptionbudgets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched podDisruptionBudget.
+func (c *podDisruptionBudgets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) {
+ result = &v1beta1.PodDisruptionBudget{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("poddisruptionbudgets").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/policy_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/policy_client.go
new file mode 100644
index 000000000..2424ed90f
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/policy_client.go
@@ -0,0 +1,93 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ rest "k8s.io/client-go/rest"
+ v1beta1 "k8s.io/kubernetes/pkg/apis/policy/v1beta1"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+type PolicyV1beta1Interface interface {
+ RESTClient() rest.Interface
+ EvictionsGetter
+ PodDisruptionBudgetsGetter
+}
+
+// PolicyV1beta1Client is used to interact with features provided by the policy group.
+type PolicyV1beta1Client struct {
+ restClient rest.Interface
+}
+
+func (c *PolicyV1beta1Client) Evictions(namespace string) EvictionInterface {
+ return newEvictions(c, namespace)
+}
+
+func (c *PolicyV1beta1Client) PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface {
+ return newPodDisruptionBudgets(c, namespace)
+}
+
+// NewForConfig creates a new PolicyV1beta1Client for the given config.
+func NewForConfig(c *rest.Config) (*PolicyV1beta1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &PolicyV1beta1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new PolicyV1beta1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *PolicyV1beta1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new PolicyV1beta1Client for the given RESTClient.
+func New(c rest.Interface) *PolicyV1beta1Client {
+ return &PolicyV1beta1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1beta1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *PolicyV1beta1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/clusterrole.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/clusterrole.go
new file mode 100644
index 000000000..4e41cad06
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/clusterrole.go
@@ -0,0 +1,145 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// ClusterRolesGetter has a method to return a ClusterRoleInterface.
+// A group's client should implement this interface.
+type ClusterRolesGetter interface {
+ ClusterRoles() ClusterRoleInterface
+}
+
+// ClusterRoleInterface has methods to work with ClusterRole resources.
+type ClusterRoleInterface interface {
+ Create(*v1alpha1.ClusterRole) (*v1alpha1.ClusterRole, error)
+ Update(*v1alpha1.ClusterRole) (*v1alpha1.ClusterRole, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1alpha1.ClusterRole, error)
+ List(opts v1.ListOptions) (*v1alpha1.ClusterRoleList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error)
+ ClusterRoleExpansion
+}
+
+// clusterRoles implements ClusterRoleInterface
+type clusterRoles struct {
+ client rest.Interface
+}
+
+// newClusterRoles returns a ClusterRoles
+func newClusterRoles(c *RbacV1alpha1Client) *clusterRoles {
+ return &clusterRoles{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any.
+func (c *clusterRoles) Create(clusterRole *v1alpha1.ClusterRole) (result *v1alpha1.ClusterRole, err error) {
+ result = &v1alpha1.ClusterRole{}
+ err = c.client.Post().
+ Resource("clusterroles").
+ Body(clusterRole).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a clusterRole and updates it. Returns the server's representation of the clusterRole, and an error, if there is any.
+func (c *clusterRoles) Update(clusterRole *v1alpha1.ClusterRole) (result *v1alpha1.ClusterRole, err error) {
+ result = &v1alpha1.ClusterRole{}
+ err = c.client.Put().
+ Resource("clusterroles").
+ Name(clusterRole.Name).
+ Body(clusterRole).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the clusterRole and deletes it. Returns an error if one occurs.
+func (c *clusterRoles) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("clusterroles").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *clusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("clusterroles").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the clusterRole, and returns the corresponding clusterRole object, and an error if there is any.
+func (c *clusterRoles) Get(name string, options v1.GetOptions) (result *v1alpha1.ClusterRole, err error) {
+ result = &v1alpha1.ClusterRole{}
+ err = c.client.Get().
+ Resource("clusterroles").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of ClusterRoles that match those selectors.
+func (c *clusterRoles) List(opts v1.ListOptions) (result *v1alpha1.ClusterRoleList, err error) {
+ result = &v1alpha1.ClusterRoleList{}
+ err = c.client.Get().
+ Resource("clusterroles").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested clusterRoles.
+func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("clusterroles").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched clusterRole.
+func (c *clusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error) {
+ result = &v1alpha1.ClusterRole{}
+ err = c.client.Patch(pt).
+ Resource("clusterroles").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/clusterrolebinding.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/clusterrolebinding.go
new file mode 100644
index 000000000..759d57adf
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/clusterrolebinding.go
@@ -0,0 +1,145 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// ClusterRoleBindingsGetter has a method to return a ClusterRoleBindingInterface.
+// A group's client should implement this interface.
+type ClusterRoleBindingsGetter interface {
+ ClusterRoleBindings() ClusterRoleBindingInterface
+}
+
+// ClusterRoleBindingInterface has methods to work with ClusterRoleBinding resources.
+type ClusterRoleBindingInterface interface {
+ Create(*v1alpha1.ClusterRoleBinding) (*v1alpha1.ClusterRoleBinding, error)
+ Update(*v1alpha1.ClusterRoleBinding) (*v1alpha1.ClusterRoleBinding, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1alpha1.ClusterRoleBinding, error)
+ List(opts v1.ListOptions) (*v1alpha1.ClusterRoleBindingList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error)
+ ClusterRoleBindingExpansion
+}
+
+// clusterRoleBindings implements ClusterRoleBindingInterface
+type clusterRoleBindings struct {
+ client rest.Interface
+}
+
+// newClusterRoleBindings returns a ClusterRoleBindings
+func newClusterRoleBindings(c *RbacV1alpha1Client) *clusterRoleBindings {
+ return &clusterRoleBindings{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any.
+func (c *clusterRoleBindings) Create(clusterRoleBinding *v1alpha1.ClusterRoleBinding) (result *v1alpha1.ClusterRoleBinding, err error) {
+ result = &v1alpha1.ClusterRoleBinding{}
+ err = c.client.Post().
+ Resource("clusterrolebindings").
+ Body(clusterRoleBinding).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a clusterRoleBinding and updates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any.
+func (c *clusterRoleBindings) Update(clusterRoleBinding *v1alpha1.ClusterRoleBinding) (result *v1alpha1.ClusterRoleBinding, err error) {
+ result = &v1alpha1.ClusterRoleBinding{}
+ err = c.client.Put().
+ Resource("clusterrolebindings").
+ Name(clusterRoleBinding.Name).
+ Body(clusterRoleBinding).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs.
+func (c *clusterRoleBindings) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("clusterrolebindings").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *clusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("clusterrolebindings").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the clusterRoleBinding, and returns the corresponding clusterRoleBinding object, and an error if there is any.
+func (c *clusterRoleBindings) Get(name string, options v1.GetOptions) (result *v1alpha1.ClusterRoleBinding, err error) {
+ result = &v1alpha1.ClusterRoleBinding{}
+ err = c.client.Get().
+ Resource("clusterrolebindings").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors.
+func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *v1alpha1.ClusterRoleBindingList, err error) {
+ result = &v1alpha1.ClusterRoleBindingList{}
+ err = c.client.Get().
+ Resource("clusterrolebindings").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested clusterRoleBindings.
+func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("clusterrolebindings").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched clusterRoleBinding.
+func (c *clusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) {
+ result = &v1alpha1.ClusterRoleBinding{}
+ err = c.client.Patch(pt).
+ Resource("clusterrolebindings").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/doc.go
new file mode 100644
index 000000000..ba8d10d3b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1alpha1
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/generated_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/generated_expansion.go
new file mode 100644
index 000000000..f506fc346
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/generated_expansion.go
@@ -0,0 +1,25 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+type ClusterRoleExpansion interface{}
+
+type ClusterRoleBindingExpansion interface{}
+
+type RoleExpansion interface{}
+
+type RoleBindingExpansion interface{}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/rbac_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/rbac_client.go
new file mode 100644
index 000000000..b9d09e5bc
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/rbac_client.go
@@ -0,0 +1,103 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ rest "k8s.io/client-go/rest"
+ v1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+type RbacV1alpha1Interface interface {
+ RESTClient() rest.Interface
+ ClusterRolesGetter
+ ClusterRoleBindingsGetter
+ RolesGetter
+ RoleBindingsGetter
+}
+
+// RbacV1alpha1Client is used to interact with features provided by the rbac.authorization.k8s.io group.
+type RbacV1alpha1Client struct {
+ restClient rest.Interface
+}
+
+func (c *RbacV1alpha1Client) ClusterRoles() ClusterRoleInterface {
+ return newClusterRoles(c)
+}
+
+func (c *RbacV1alpha1Client) ClusterRoleBindings() ClusterRoleBindingInterface {
+ return newClusterRoleBindings(c)
+}
+
+func (c *RbacV1alpha1Client) Roles(namespace string) RoleInterface {
+ return newRoles(c, namespace)
+}
+
+func (c *RbacV1alpha1Client) RoleBindings(namespace string) RoleBindingInterface {
+ return newRoleBindings(c, namespace)
+}
+
+// NewForConfig creates a new RbacV1alpha1Client for the given config.
+func NewForConfig(c *rest.Config) (*RbacV1alpha1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &RbacV1alpha1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new RbacV1alpha1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *RbacV1alpha1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new RbacV1alpha1Client for the given RESTClient.
+func New(c rest.Interface) *RbacV1alpha1Client {
+ return &RbacV1alpha1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1alpha1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *RbacV1alpha1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/role.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/role.go
new file mode 100644
index 000000000..900e1cc1e
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/role.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// RolesGetter has a method to return a RoleInterface.
+// A group's client should implement this interface.
+type RolesGetter interface {
+ Roles(namespace string) RoleInterface
+}
+
+// RoleInterface has methods to work with Role resources.
+type RoleInterface interface {
+ Create(*v1alpha1.Role) (*v1alpha1.Role, error)
+ Update(*v1alpha1.Role) (*v1alpha1.Role, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1alpha1.Role, error)
+ List(opts v1.ListOptions) (*v1alpha1.RoleList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error)
+ RoleExpansion
+}
+
+// roles implements RoleInterface
+type roles struct {
+ client rest.Interface
+ ns string
+}
+
+// newRoles returns a Roles
+func newRoles(c *RbacV1alpha1Client, namespace string) *roles {
+ return &roles{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any.
+func (c *roles) Create(role *v1alpha1.Role) (result *v1alpha1.Role, err error) {
+ result = &v1alpha1.Role{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("roles").
+ Body(role).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a role and updates it. Returns the server's representation of the role, and an error, if there is any.
+func (c *roles) Update(role *v1alpha1.Role) (result *v1alpha1.Role, err error) {
+ result = &v1alpha1.Role{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("roles").
+ Name(role.Name).
+ Body(role).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the role and deletes it. Returns an error if one occurs.
+func (c *roles) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("roles").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *roles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("roles").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the role, and returns the corresponding role object, and an error if there is any.
+func (c *roles) Get(name string, options v1.GetOptions) (result *v1alpha1.Role, err error) {
+ result = &v1alpha1.Role{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("roles").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Roles that match those selectors.
+func (c *roles) List(opts v1.ListOptions) (result *v1alpha1.RoleList, err error) {
+ result = &v1alpha1.RoleList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("roles").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested roles.
+func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("roles").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched role.
+func (c *roles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error) {
+ result = &v1alpha1.Role{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("roles").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/rolebinding.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/rolebinding.go
new file mode 100644
index 000000000..63481f0ad
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/rolebinding.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// RoleBindingsGetter has a method to return a RoleBindingInterface.
+// A group's client should implement this interface.
+type RoleBindingsGetter interface {
+ RoleBindings(namespace string) RoleBindingInterface
+}
+
+// RoleBindingInterface has methods to work with RoleBinding resources.
+type RoleBindingInterface interface {
+ Create(*v1alpha1.RoleBinding) (*v1alpha1.RoleBinding, error)
+ Update(*v1alpha1.RoleBinding) (*v1alpha1.RoleBinding, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1alpha1.RoleBinding, error)
+ List(opts v1.ListOptions) (*v1alpha1.RoleBindingList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error)
+ RoleBindingExpansion
+}
+
+// roleBindings implements RoleBindingInterface
+type roleBindings struct {
+ client rest.Interface
+ ns string
+}
+
+// newRoleBindings returns a RoleBindings
+func newRoleBindings(c *RbacV1alpha1Client, namespace string) *roleBindings {
+ return &roleBindings{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any.
+func (c *roleBindings) Create(roleBinding *v1alpha1.RoleBinding) (result *v1alpha1.RoleBinding, err error) {
+ result = &v1alpha1.RoleBinding{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("rolebindings").
+ Body(roleBinding).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a roleBinding and updates it. Returns the server's representation of the roleBinding, and an error, if there is any.
+func (c *roleBindings) Update(roleBinding *v1alpha1.RoleBinding) (result *v1alpha1.RoleBinding, err error) {
+ result = &v1alpha1.RoleBinding{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("rolebindings").
+ Name(roleBinding.Name).
+ Body(roleBinding).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the roleBinding and deletes it. Returns an error if one occurs.
+func (c *roleBindings) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("rolebindings").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *roleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("rolebindings").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the roleBinding, and returns the corresponding roleBinding object, and an error if there is any.
+func (c *roleBindings) Get(name string, options v1.GetOptions) (result *v1alpha1.RoleBinding, err error) {
+ result = &v1alpha1.RoleBinding{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("rolebindings").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of RoleBindings that match those selectors.
+func (c *roleBindings) List(opts v1.ListOptions) (result *v1alpha1.RoleBindingList, err error) {
+ result = &v1alpha1.RoleBindingList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("rolebindings").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested roleBindings.
+func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("rolebindings").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched roleBinding.
+func (c *roleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error) {
+ result = &v1alpha1.RoleBinding{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("rolebindings").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/clusterrole.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/clusterrole.go
new file mode 100644
index 000000000..767f784f7
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/clusterrole.go
@@ -0,0 +1,145 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// ClusterRolesGetter has a method to return a ClusterRoleInterface.
+// A group's client should implement this interface.
+type ClusterRolesGetter interface {
+ ClusterRoles() ClusterRoleInterface
+}
+
+// ClusterRoleInterface has methods to work with ClusterRole resources.
+type ClusterRoleInterface interface {
+ Create(*v1beta1.ClusterRole) (*v1beta1.ClusterRole, error)
+ Update(*v1beta1.ClusterRole) (*v1beta1.ClusterRole, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.ClusterRole, error)
+ List(opts v1.ListOptions) (*v1beta1.ClusterRoleList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRole, err error)
+ ClusterRoleExpansion
+}
+
+// clusterRoles implements ClusterRoleInterface
+type clusterRoles struct {
+ client rest.Interface
+}
+
+// newClusterRoles returns a ClusterRoles
+func newClusterRoles(c *RbacV1beta1Client) *clusterRoles {
+ return &clusterRoles{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any.
+func (c *clusterRoles) Create(clusterRole *v1beta1.ClusterRole) (result *v1beta1.ClusterRole, err error) {
+ result = &v1beta1.ClusterRole{}
+ err = c.client.Post().
+ Resource("clusterroles").
+ Body(clusterRole).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a clusterRole and updates it. Returns the server's representation of the clusterRole, and an error, if there is any.
+func (c *clusterRoles) Update(clusterRole *v1beta1.ClusterRole) (result *v1beta1.ClusterRole, err error) {
+ result = &v1beta1.ClusterRole{}
+ err = c.client.Put().
+ Resource("clusterroles").
+ Name(clusterRole.Name).
+ Body(clusterRole).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the clusterRole and deletes it. Returns an error if one occurs.
+func (c *clusterRoles) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("clusterroles").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *clusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("clusterroles").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the clusterRole, and returns the corresponding clusterRole object, and an error if there is any.
+func (c *clusterRoles) Get(name string, options v1.GetOptions) (result *v1beta1.ClusterRole, err error) {
+ result = &v1beta1.ClusterRole{}
+ err = c.client.Get().
+ Resource("clusterroles").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of ClusterRoles that match those selectors.
+func (c *clusterRoles) List(opts v1.ListOptions) (result *v1beta1.ClusterRoleList, err error) {
+ result = &v1beta1.ClusterRoleList{}
+ err = c.client.Get().
+ Resource("clusterroles").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested clusterRoles.
+func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("clusterroles").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched clusterRole.
+func (c *clusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRole, err error) {
+ result = &v1beta1.ClusterRole{}
+ err = c.client.Patch(pt).
+ Resource("clusterroles").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/clusterrolebinding.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/clusterrolebinding.go
new file mode 100644
index 000000000..d629b13af
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/clusterrolebinding.go
@@ -0,0 +1,145 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// ClusterRoleBindingsGetter has a method to return a ClusterRoleBindingInterface.
+// A group's client should implement this interface.
+type ClusterRoleBindingsGetter interface {
+ ClusterRoleBindings() ClusterRoleBindingInterface
+}
+
+// ClusterRoleBindingInterface has methods to work with ClusterRoleBinding resources.
+type ClusterRoleBindingInterface interface {
+ Create(*v1beta1.ClusterRoleBinding) (*v1beta1.ClusterRoleBinding, error)
+ Update(*v1beta1.ClusterRoleBinding) (*v1beta1.ClusterRoleBinding, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.ClusterRoleBinding, error)
+ List(opts v1.ListOptions) (*v1beta1.ClusterRoleBindingList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRoleBinding, err error)
+ ClusterRoleBindingExpansion
+}
+
+// clusterRoleBindings implements ClusterRoleBindingInterface
+type clusterRoleBindings struct {
+ client rest.Interface
+}
+
+// newClusterRoleBindings returns a ClusterRoleBindings
+func newClusterRoleBindings(c *RbacV1beta1Client) *clusterRoleBindings {
+ return &clusterRoleBindings{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any.
+func (c *clusterRoleBindings) Create(clusterRoleBinding *v1beta1.ClusterRoleBinding) (result *v1beta1.ClusterRoleBinding, err error) {
+ result = &v1beta1.ClusterRoleBinding{}
+ err = c.client.Post().
+ Resource("clusterrolebindings").
+ Body(clusterRoleBinding).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a clusterRoleBinding and updates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any.
+func (c *clusterRoleBindings) Update(clusterRoleBinding *v1beta1.ClusterRoleBinding) (result *v1beta1.ClusterRoleBinding, err error) {
+ result = &v1beta1.ClusterRoleBinding{}
+ err = c.client.Put().
+ Resource("clusterrolebindings").
+ Name(clusterRoleBinding.Name).
+ Body(clusterRoleBinding).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs.
+func (c *clusterRoleBindings) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("clusterrolebindings").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *clusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("clusterrolebindings").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the clusterRoleBinding, and returns the corresponding clusterRoleBinding object, and an error if there is any.
+func (c *clusterRoleBindings) Get(name string, options v1.GetOptions) (result *v1beta1.ClusterRoleBinding, err error) {
+ result = &v1beta1.ClusterRoleBinding{}
+ err = c.client.Get().
+ Resource("clusterrolebindings").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors.
+func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *v1beta1.ClusterRoleBindingList, err error) {
+ result = &v1beta1.ClusterRoleBindingList{}
+ err = c.client.Get().
+ Resource("clusterrolebindings").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested clusterRoleBindings.
+func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("clusterrolebindings").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched clusterRoleBinding.
+func (c *clusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRoleBinding, err error) {
+ result = &v1beta1.ClusterRoleBinding{}
+ err = c.client.Patch(pt).
+ Resource("clusterrolebindings").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/doc.go
new file mode 100644
index 000000000..11b523897
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1beta1
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/generated_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/generated_expansion.go
new file mode 100644
index 000000000..d7f80c004
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/generated_expansion.go
@@ -0,0 +1,25 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+type ClusterRoleExpansion interface{}
+
+type ClusterRoleBindingExpansion interface{}
+
+type RoleExpansion interface{}
+
+type RoleBindingExpansion interface{}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/rbac_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/rbac_client.go
new file mode 100644
index 000000000..20c8da68c
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/rbac_client.go
@@ -0,0 +1,103 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ rest "k8s.io/client-go/rest"
+ v1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+type RbacV1beta1Interface interface {
+ RESTClient() rest.Interface
+ ClusterRolesGetter
+ ClusterRoleBindingsGetter
+ RolesGetter
+ RoleBindingsGetter
+}
+
+// RbacV1beta1Client is used to interact with features provided by the rbac.authorization.k8s.io group.
+type RbacV1beta1Client struct {
+ restClient rest.Interface
+}
+
+func (c *RbacV1beta1Client) ClusterRoles() ClusterRoleInterface {
+ return newClusterRoles(c)
+}
+
+func (c *RbacV1beta1Client) ClusterRoleBindings() ClusterRoleBindingInterface {
+ return newClusterRoleBindings(c)
+}
+
+func (c *RbacV1beta1Client) Roles(namespace string) RoleInterface {
+ return newRoles(c, namespace)
+}
+
+func (c *RbacV1beta1Client) RoleBindings(namespace string) RoleBindingInterface {
+ return newRoleBindings(c, namespace)
+}
+
+// NewForConfig creates a new RbacV1beta1Client for the given config.
+func NewForConfig(c *rest.Config) (*RbacV1beta1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &RbacV1beta1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new RbacV1beta1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *RbacV1beta1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new RbacV1beta1Client for the given RESTClient.
+func New(c rest.Interface) *RbacV1beta1Client {
+ return &RbacV1beta1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1beta1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *RbacV1beta1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/role.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/role.go
new file mode 100644
index 000000000..cc6a217e2
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/role.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// RolesGetter has a method to return a RoleInterface.
+// A group's client should implement this interface.
+type RolesGetter interface {
+ Roles(namespace string) RoleInterface
+}
+
+// RoleInterface has methods to work with Role resources.
+type RoleInterface interface {
+ Create(*v1beta1.Role) (*v1beta1.Role, error)
+ Update(*v1beta1.Role) (*v1beta1.Role, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.Role, error)
+ List(opts v1.ListOptions) (*v1beta1.RoleList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Role, err error)
+ RoleExpansion
+}
+
+// roles implements RoleInterface
+type roles struct {
+ client rest.Interface
+ ns string
+}
+
+// newRoles returns a Roles
+func newRoles(c *RbacV1beta1Client, namespace string) *roles {
+ return &roles{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any.
+func (c *roles) Create(role *v1beta1.Role) (result *v1beta1.Role, err error) {
+ result = &v1beta1.Role{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("roles").
+ Body(role).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a role and updates it. Returns the server's representation of the role, and an error, if there is any.
+func (c *roles) Update(role *v1beta1.Role) (result *v1beta1.Role, err error) {
+ result = &v1beta1.Role{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("roles").
+ Name(role.Name).
+ Body(role).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the role and deletes it. Returns an error if one occurs.
+func (c *roles) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("roles").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *roles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("roles").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the role, and returns the corresponding role object, and an error if there is any.
+func (c *roles) Get(name string, options v1.GetOptions) (result *v1beta1.Role, err error) {
+ result = &v1beta1.Role{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("roles").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Roles that match those selectors.
+func (c *roles) List(opts v1.ListOptions) (result *v1beta1.RoleList, err error) {
+ result = &v1beta1.RoleList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("roles").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested roles.
+func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("roles").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched role.
+func (c *roles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Role, err error) {
+ result = &v1beta1.Role{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("roles").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/rolebinding.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/rolebinding.go
new file mode 100644
index 000000000..5c87ad1e6
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/rolebinding.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// RoleBindingsGetter has a method to return a RoleBindingInterface.
+// A group's client should implement this interface.
+type RoleBindingsGetter interface {
+ RoleBindings(namespace string) RoleBindingInterface
+}
+
+// RoleBindingInterface has methods to work with RoleBinding resources.
+type RoleBindingInterface interface {
+ Create(*v1beta1.RoleBinding) (*v1beta1.RoleBinding, error)
+ Update(*v1beta1.RoleBinding) (*v1beta1.RoleBinding, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.RoleBinding, error)
+ List(opts v1.ListOptions) (*v1beta1.RoleBindingList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RoleBinding, err error)
+ RoleBindingExpansion
+}
+
+// roleBindings implements RoleBindingInterface
+type roleBindings struct {
+ client rest.Interface
+ ns string
+}
+
+// newRoleBindings returns a RoleBindings
+func newRoleBindings(c *RbacV1beta1Client, namespace string) *roleBindings {
+ return &roleBindings{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any.
+func (c *roleBindings) Create(roleBinding *v1beta1.RoleBinding) (result *v1beta1.RoleBinding, err error) {
+ result = &v1beta1.RoleBinding{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("rolebindings").
+ Body(roleBinding).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a roleBinding and updates it. Returns the server's representation of the roleBinding, and an error, if there is any.
+func (c *roleBindings) Update(roleBinding *v1beta1.RoleBinding) (result *v1beta1.RoleBinding, err error) {
+ result = &v1beta1.RoleBinding{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("rolebindings").
+ Name(roleBinding.Name).
+ Body(roleBinding).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the roleBinding and deletes it. Returns an error if one occurs.
+func (c *roleBindings) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("rolebindings").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *roleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("rolebindings").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the roleBinding, and returns the corresponding roleBinding object, and an error if there is any.
+func (c *roleBindings) Get(name string, options v1.GetOptions) (result *v1beta1.RoleBinding, err error) {
+ result = &v1beta1.RoleBinding{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("rolebindings").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of RoleBindings that match those selectors.
+func (c *roleBindings) List(opts v1.ListOptions) (result *v1beta1.RoleBindingList, err error) {
+ result = &v1beta1.RoleBindingList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("rolebindings").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested roleBindings.
+func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("rolebindings").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched roleBinding.
+func (c *roleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RoleBinding, err error) {
+ result = &v1beta1.RoleBinding{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("rolebindings").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/doc.go
new file mode 100644
index 000000000..ba8d10d3b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1alpha1
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/generated_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/generated_expansion.go
new file mode 100644
index 000000000..d599b2935
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/generated_expansion.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+type PodPresetExpansion interface{}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/podpreset.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/podpreset.go
new file mode 100644
index 000000000..f94f98a76
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/podpreset.go
@@ -0,0 +1,155 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1alpha1 "k8s.io/kubernetes/pkg/apis/settings/v1alpha1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// PodPresetsGetter has a method to return a PodPresetInterface.
+// A group's client should implement this interface.
+type PodPresetsGetter interface {
+ PodPresets(namespace string) PodPresetInterface
+}
+
+// PodPresetInterface has methods to work with PodPreset resources.
+type PodPresetInterface interface {
+ Create(*v1alpha1.PodPreset) (*v1alpha1.PodPreset, error)
+ Update(*v1alpha1.PodPreset) (*v1alpha1.PodPreset, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1alpha1.PodPreset, error)
+ List(opts v1.ListOptions) (*v1alpha1.PodPresetList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodPreset, err error)
+ PodPresetExpansion
+}
+
+// podPresets implements PodPresetInterface
+type podPresets struct {
+ client rest.Interface
+ ns string
+}
+
+// newPodPresets returns a PodPresets
+func newPodPresets(c *SettingsV1alpha1Client, namespace string) *podPresets {
+ return &podPresets{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Create takes the representation of a podPreset and creates it. Returns the server's representation of the podPreset, and an error, if there is any.
+func (c *podPresets) Create(podPreset *v1alpha1.PodPreset) (result *v1alpha1.PodPreset, err error) {
+ result = &v1alpha1.PodPreset{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("podpresets").
+ Body(podPreset).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a podPreset and updates it. Returns the server's representation of the podPreset, and an error, if there is any.
+func (c *podPresets) Update(podPreset *v1alpha1.PodPreset) (result *v1alpha1.PodPreset, err error) {
+ result = &v1alpha1.PodPreset{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("podpresets").
+ Name(podPreset.Name).
+ Body(podPreset).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the podPreset and deletes it. Returns an error if one occurs.
+func (c *podPresets) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("podpresets").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *podPresets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("podpresets").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the podPreset, and returns the corresponding podPreset object, and an error if there is any.
+func (c *podPresets) Get(name string, options v1.GetOptions) (result *v1alpha1.PodPreset, err error) {
+ result = &v1alpha1.PodPreset{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("podpresets").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of PodPresets that match those selectors.
+func (c *podPresets) List(opts v1.ListOptions) (result *v1alpha1.PodPresetList, err error) {
+ result = &v1alpha1.PodPresetList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("podpresets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested podPresets.
+func (c *podPresets) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("podpresets").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched podPreset.
+func (c *podPresets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodPreset, err error) {
+ result = &v1alpha1.PodPreset{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("podpresets").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/settings_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/settings_client.go
new file mode 100644
index 000000000..1d6dc46c1
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/settings/v1alpha1/settings_client.go
@@ -0,0 +1,88 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1alpha1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ rest "k8s.io/client-go/rest"
+ v1alpha1 "k8s.io/kubernetes/pkg/apis/settings/v1alpha1"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+type SettingsV1alpha1Interface interface {
+ RESTClient() rest.Interface
+ PodPresetsGetter
+}
+
+// SettingsV1alpha1Client is used to interact with features provided by the settings.k8s.io group.
+type SettingsV1alpha1Client struct {
+ restClient rest.Interface
+}
+
+func (c *SettingsV1alpha1Client) PodPresets(namespace string) PodPresetInterface {
+ return newPodPresets(c, namespace)
+}
+
+// NewForConfig creates a new SettingsV1alpha1Client for the given config.
+func NewForConfig(c *rest.Config) (*SettingsV1alpha1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &SettingsV1alpha1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new SettingsV1alpha1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *SettingsV1alpha1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new SettingsV1alpha1Client for the given RESTClient.
+func New(c rest.Interface) *SettingsV1alpha1Client {
+ return &SettingsV1alpha1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1alpha1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *SettingsV1alpha1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1/doc.go
new file mode 100644
index 000000000..54673bfa7
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1/generated_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1/generated_expansion.go
new file mode 100644
index 000000000..39df9fb87
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1/generated_expansion.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+type StorageClassExpansion interface{}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1/storage_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1/storage_client.go
new file mode 100644
index 000000000..5d37d8417
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1/storage_client.go
@@ -0,0 +1,88 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ rest "k8s.io/client-go/rest"
+ v1 "k8s.io/kubernetes/pkg/apis/storage/v1"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+type StorageV1Interface interface {
+ RESTClient() rest.Interface
+ StorageClassesGetter
+}
+
+// StorageV1Client is used to interact with features provided by the storage.k8s.io group.
+type StorageV1Client struct {
+ restClient rest.Interface
+}
+
+func (c *StorageV1Client) StorageClasses() StorageClassInterface {
+ return newStorageClasses(c)
+}
+
+// NewForConfig creates a new StorageV1Client for the given config.
+func NewForConfig(c *rest.Config) (*StorageV1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &StorageV1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new StorageV1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *StorageV1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new StorageV1Client for the given RESTClient.
+func New(c rest.Interface) *StorageV1Client {
+ return &StorageV1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *StorageV1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1/storageclass.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1/storageclass.go
new file mode 100644
index 000000000..3a1efa016
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1/storageclass.go
@@ -0,0 +1,145 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1
+
+import (
+ meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1 "k8s.io/kubernetes/pkg/apis/storage/v1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// StorageClassesGetter has a method to return a StorageClassInterface.
+// A group's client should implement this interface.
+type StorageClassesGetter interface {
+ StorageClasses() StorageClassInterface
+}
+
+// StorageClassInterface has methods to work with StorageClass resources.
+type StorageClassInterface interface {
+ Create(*v1.StorageClass) (*v1.StorageClass, error)
+ Update(*v1.StorageClass) (*v1.StorageClass, error)
+ Delete(name string, options *meta_v1.DeleteOptions) error
+ DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
+ Get(name string, options meta_v1.GetOptions) (*v1.StorageClass, error)
+ List(opts meta_v1.ListOptions) (*v1.StorageClassList, error)
+ Watch(opts meta_v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StorageClass, err error)
+ StorageClassExpansion
+}
+
+// storageClasses implements StorageClassInterface
+type storageClasses struct {
+ client rest.Interface
+}
+
+// newStorageClasses returns a StorageClasses
+func newStorageClasses(c *StorageV1Client) *storageClasses {
+ return &storageClasses{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a storageClass and creates it. Returns the server's representation of the storageClass, and an error, if there is any.
+func (c *storageClasses) Create(storageClass *v1.StorageClass) (result *v1.StorageClass, err error) {
+ result = &v1.StorageClass{}
+ err = c.client.Post().
+ Resource("storageclasses").
+ Body(storageClass).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a storageClass and updates it. Returns the server's representation of the storageClass, and an error, if there is any.
+func (c *storageClasses) Update(storageClass *v1.StorageClass) (result *v1.StorageClass, err error) {
+ result = &v1.StorageClass{}
+ err = c.client.Put().
+ Resource("storageclasses").
+ Name(storageClass.Name).
+ Body(storageClass).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the storageClass and deletes it. Returns an error if one occurs.
+func (c *storageClasses) Delete(name string, options *meta_v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("storageclasses").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *storageClasses) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("storageclasses").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the storageClass, and returns the corresponding storageClass object, and an error if there is any.
+func (c *storageClasses) Get(name string, options meta_v1.GetOptions) (result *v1.StorageClass, err error) {
+ result = &v1.StorageClass{}
+ err = c.client.Get().
+ Resource("storageclasses").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of StorageClasses that match those selectors.
+func (c *storageClasses) List(opts meta_v1.ListOptions) (result *v1.StorageClassList, err error) {
+ result = &v1.StorageClassList{}
+ err = c.client.Get().
+ Resource("storageclasses").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested storageClasses.
+func (c *storageClasses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("storageclasses").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched storageClass.
+func (c *storageClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StorageClass, err error) {
+ result = &v1.StorageClass{}
+ err = c.client.Patch(pt).
+ Resource("storageclasses").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/doc.go
new file mode 100644
index 000000000..11b523897
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package is generated by client-gen with custom arguments.
+
+// This package has the automatically generated typed clients.
+package v1beta1
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/generated_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/generated_expansion.go
new file mode 100644
index 000000000..6f3f0c55e
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/generated_expansion.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+type StorageClassExpansion interface{}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/storage_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/storage_client.go
new file mode 100644
index 000000000..6925575e0
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/storage_client.go
@@ -0,0 +1,88 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ serializer "k8s.io/apimachinery/pkg/runtime/serializer"
+ rest "k8s.io/client-go/rest"
+ v1beta1 "k8s.io/kubernetes/pkg/apis/storage/v1beta1"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+type StorageV1beta1Interface interface {
+ RESTClient() rest.Interface
+ StorageClassesGetter
+}
+
+// StorageV1beta1Client is used to interact with features provided by the storage.k8s.io group.
+type StorageV1beta1Client struct {
+ restClient rest.Interface
+}
+
+func (c *StorageV1beta1Client) StorageClasses() StorageClassInterface {
+ return newStorageClasses(c)
+}
+
+// NewForConfig creates a new StorageV1beta1Client for the given config.
+func NewForConfig(c *rest.Config) (*StorageV1beta1Client, error) {
+ config := *c
+ if err := setConfigDefaults(&config); err != nil {
+ return nil, err
+ }
+ client, err := rest.RESTClientFor(&config)
+ if err != nil {
+ return nil, err
+ }
+ return &StorageV1beta1Client{client}, nil
+}
+
+// NewForConfigOrDie creates a new StorageV1beta1Client for the given config and
+// panics if there is an error in the config.
+func NewForConfigOrDie(c *rest.Config) *StorageV1beta1Client {
+ client, err := NewForConfig(c)
+ if err != nil {
+ panic(err)
+ }
+ return client
+}
+
+// New creates a new StorageV1beta1Client for the given RESTClient.
+func New(c rest.Interface) *StorageV1beta1Client {
+ return &StorageV1beta1Client{c}
+}
+
+func setConfigDefaults(config *rest.Config) error {
+ gv := v1beta1.SchemeGroupVersion
+ config.GroupVersion = &gv
+ config.APIPath = "/apis"
+ config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
+
+ if config.UserAgent == "" {
+ config.UserAgent = rest.DefaultKubernetesUserAgent()
+ }
+
+ return nil
+}
+
+// RESTClient returns a RESTClient that is used to communicate
+// with API server by this client implementation.
+func (c *StorageV1beta1Client) RESTClient() rest.Interface {
+ if c == nil {
+ return nil
+ }
+ return c.restClient
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/storageclass.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/storageclass.go
new file mode 100644
index 000000000..69fb440ee
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/storageclass.go
@@ -0,0 +1,145 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package v1beta1
+
+import (
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+ v1beta1 "k8s.io/kubernetes/pkg/apis/storage/v1beta1"
+ scheme "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/scheme"
+)
+
+// StorageClassesGetter has a method to return a StorageClassInterface.
+// A group's client should implement this interface.
+type StorageClassesGetter interface {
+ StorageClasses() StorageClassInterface
+}
+
+// StorageClassInterface has methods to work with StorageClass resources.
+type StorageClassInterface interface {
+ Create(*v1beta1.StorageClass) (*v1beta1.StorageClass, error)
+ Update(*v1beta1.StorageClass) (*v1beta1.StorageClass, error)
+ Delete(name string, options *v1.DeleteOptions) error
+ DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
+ Get(name string, options v1.GetOptions) (*v1beta1.StorageClass, error)
+ List(opts v1.ListOptions) (*v1beta1.StorageClassList, error)
+ Watch(opts v1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error)
+ StorageClassExpansion
+}
+
+// storageClasses implements StorageClassInterface
+type storageClasses struct {
+ client rest.Interface
+}
+
+// newStorageClasses returns a StorageClasses
+func newStorageClasses(c *StorageV1beta1Client) *storageClasses {
+ return &storageClasses{
+ client: c.RESTClient(),
+ }
+}
+
+// Create takes the representation of a storageClass and creates it. Returns the server's representation of the storageClass, and an error, if there is any.
+func (c *storageClasses) Create(storageClass *v1beta1.StorageClass) (result *v1beta1.StorageClass, err error) {
+ result = &v1beta1.StorageClass{}
+ err = c.client.Post().
+ Resource("storageclasses").
+ Body(storageClass).
+ Do().
+ Into(result)
+ return
+}
+
+// Update takes the representation of a storageClass and updates it. Returns the server's representation of the storageClass, and an error, if there is any.
+func (c *storageClasses) Update(storageClass *v1beta1.StorageClass) (result *v1beta1.StorageClass, err error) {
+ result = &v1beta1.StorageClass{}
+ err = c.client.Put().
+ Resource("storageclasses").
+ Name(storageClass.Name).
+ Body(storageClass).
+ Do().
+ Into(result)
+ return
+}
+
+// Delete takes name of the storageClass and deletes it. Returns an error if one occurs.
+func (c *storageClasses) Delete(name string, options *v1.DeleteOptions) error {
+ return c.client.Delete().
+ Resource("storageclasses").
+ Name(name).
+ Body(options).
+ Do().
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *storageClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+ return c.client.Delete().
+ Resource("storageclasses").
+ VersionedParams(&listOptions, scheme.ParameterCodec).
+ Body(options).
+ Do().
+ Error()
+}
+
+// Get takes name of the storageClass, and returns the corresponding storageClass object, and an error if there is any.
+func (c *storageClasses) Get(name string, options v1.GetOptions) (result *v1beta1.StorageClass, err error) {
+ result = &v1beta1.StorageClass{}
+ err = c.client.Get().
+ Resource("storageclasses").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of StorageClasses that match those selectors.
+func (c *storageClasses) List(opts v1.ListOptions) (result *v1beta1.StorageClassList, err error) {
+ result = &v1beta1.StorageClassList{}
+ err = c.client.Get().
+ Resource("storageclasses").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested storageClasses.
+func (c *storageClasses) Watch(opts v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Resource("storageclasses").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
+// Patch applies the patch and returns the patched storageClass.
+func (c *storageClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) {
+ result = &v1beta1.StorageClass{}
+ err = c.client.Patch(pt).
+ Resource("storageclasses").
+ SubResource(subresources...).
+ Name(name).
+ Body(data).
+ Do().
+ Into(result)
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/client/retry/util.go b/vendor/k8s.io/kubernetes/pkg/client/retry/util.go
new file mode 100644
index 000000000..3ac0840ad
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/client/retry/util.go
@@ -0,0 +1,79 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package retry
+
+import (
+ "time"
+
+ "k8s.io/apimachinery/pkg/api/errors"
+ "k8s.io/apimachinery/pkg/util/wait"
+)
+
+// DefaultRetry is the recommended retry for a conflict where multiple clients
+// are making changes to the same resource.
+var DefaultRetry = wait.Backoff{
+ Steps: 5,
+ Duration: 10 * time.Millisecond,
+ Factor: 1.0,
+ Jitter: 0.1,
+}
+
+// DefaultBackoff is the recommended backoff for a conflict where a client
+// may be attempting to make an unrelated modification to a resource under
+// active management by one or more controllers.
+var DefaultBackoff = wait.Backoff{
+ Steps: 4,
+ Duration: 10 * time.Millisecond,
+ Factor: 5.0,
+ Jitter: 0.1,
+}
+
+// RetryConflict executes the provided function repeatedly, retrying if the server returns a conflicting
+// write. Callers should preserve previous executions if they wish to retry changes. It performs an
+// exponential backoff.
+//
+// var pod *api.Pod
+// err := RetryOnConflict(DefaultBackoff, func() (err error) {
+// pod, err = c.Pods("mynamespace").UpdateStatus(podStatus)
+// return
+// })
+// if err != nil {
+// // may be conflict if max retries were hit
+// return err
+// }
+// ...
+//
+// TODO: Make Backoff an interface?
+func RetryOnConflict(backoff wait.Backoff, fn func() error) error {
+ var lastConflictErr error
+ err := wait.ExponentialBackoff(backoff, func() (bool, error) {
+ err := fn()
+ switch {
+ case err == nil:
+ return true, nil
+ case errors.IsConflict(err):
+ lastConflictErr = err
+ return false, nil
+ default:
+ return false, err
+ }
+ })
+ if err == wait.ErrWaitTimeout {
+ err = lastConflictErr
+ }
+ return err
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/README.md b/vendor/k8s.io/kubernetes/pkg/cloudprovider/README.md
new file mode 100644
index 000000000..ada366620
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/cloudprovider/README.md
@@ -0,0 +1,16 @@
+##### Deprecation Notice: This directory has entered maintenance mode and will not be accepting new providers. Cloud Providers in this directory will continue to be actively developed or maintained and supported at their current level of support as a longer-term solution evolves.
+
+## Overview:
+The mechanism for supporting cloud providers is currently in transition: the original method of implementing cloud provider-specific functionality within the main kubernetes tree (here) is no longer advised; however, the proposed solution is still in development.
+
+#### Guidance for potential cloud providers:
+* Support for cloud providers is currently in a state of flux. Background information on motivation and the proposal for improving is in the github [proposal](https://git.k8s.io/community/contributors/design-proposals/cloud-provider-refactoring.md).
+* In support of this plan, a new cloud-controller-manager binary was added in 1.6. This was the first of several steps (see the proposal for more information).
+* Attempts to contribute new cloud providers or (to a lesser extent) persistent volumes to the core repo will likely meet with some pushback from reviewers/approvers.
+* It is understood that this is an unfortunate situation in which 'the old way is no longer supported but the new way is not ready yet', but the initial path is unsustainable, and contributors are encouraged to participate in the implementation of the proposed long-term solution, as there is risk that PRs for new cloud providers here will not be approved.
+* Though the fully productized support envisioned in the proposal is still 2 - 3 releases out, the foundational work is underway, and a motivated cloud provider could accomplish the work in a forward-looking way. Contributors are encouraged to assist with the implementation of the design outlined in the proposal.
+
+#### Some additional context on status / direction:
+* 1.6 added a new cloud-controller-manager binary that may be used for testing the new out-of-core cloudprovider flow.
+* Setting cloud-provider=external allows for creation of a separate controller-manager binary
+* 1.7 adds [extensible admission control](https://git.k8s.io/community/contributors/design-proposals/admission_control_extension.md), further enabling topology customization.
diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/cloud.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/cloud.go
new file mode 100644
index 000000000..2fb837b71
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/cloudprovider/cloud.go
@@ -0,0 +1,186 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package cloudprovider
+
+import (
+ "errors"
+ "fmt"
+ "strings"
+
+ "k8s.io/apimachinery/pkg/types"
+ "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/controller"
+)
+
+// Interface is an abstract, pluggable interface for cloud providers.
+type Interface interface {
+ // Initialize provides the cloud with a kubernetes client builder and may spawn goroutines
+ // to perform housekeeping activities within the cloud provider.
+ Initialize(clientBuilder controller.ControllerClientBuilder)
+ // LoadBalancer returns a balancer interface. Also returns true if the interface is supported, false otherwise.
+ LoadBalancer() (LoadBalancer, bool)
+ // Instances returns an instances interface. Also returns true if the interface is supported, false otherwise.
+ Instances() (Instances, bool)
+ // Zones returns a zones interface. Also returns true if the interface is supported, false otherwise.
+ Zones() (Zones, bool)
+ // Clusters returns a clusters interface. Also returns true if the interface is supported, false otherwise.
+ Clusters() (Clusters, bool)
+ // Routes returns a routes interface along with whether the interface is supported.
+ Routes() (Routes, bool)
+ // ProviderName returns the cloud provider ID.
+ ProviderName() string
+ // ScrubDNS provides an opportunity for cloud-provider-specific code to process DNS settings for pods.
+ ScrubDNS(nameservers, searches []string) (nsOut, srchOut []string)
+}
+
+// Clusters is an abstract, pluggable interface for clusters of containers.
+type Clusters interface {
+ // ListClusters lists the names of the available clusters.
+ ListClusters() ([]string, error)
+ // Master gets back the address (either DNS name or IP address) of the master node for the cluster.
+ Master(clusterName string) (string, error)
+}
+
+// TODO(#6812): Use a shorter name that's less likely to be longer than cloud
+// providers' name length limits.
+func GetLoadBalancerName(service *v1.Service) string {
+ //GCE requires that the name of a load balancer starts with a lower case letter.
+ ret := "a" + string(service.UID)
+ ret = strings.Replace(ret, "-", "", -1)
+ //AWS requires that the name of a load balancer is shorter than 32 bytes.
+ if len(ret) > 32 {
+ ret = ret[:32]
+ }
+ return ret
+}
+
+// GetInstanceProviderID builds a ProviderID for a node in a cloud.
+func GetInstanceProviderID(cloud Interface, nodeName types.NodeName) (string, error) {
+ instances, ok := cloud.Instances()
+ if !ok {
+ return "", fmt.Errorf("failed to get instances from cloud provider")
+ }
+ instanceID, err := instances.InstanceID(nodeName)
+ if err != nil {
+ return "", fmt.Errorf("failed to get instance ID from cloud provider: %v", err)
+ }
+ return cloud.ProviderName() + "://" + instanceID, nil
+}
+
+// LoadBalancer is an abstract, pluggable interface for load balancers.
+type LoadBalancer interface {
+ // TODO: Break this up into different interfaces (LB, etc) when we have more than one type of service
+ // GetLoadBalancer returns whether the specified load balancer exists, and
+ // if so, what its status is.
+ // Implementations must treat the *v1.Service parameter as read-only and not modify it.
+ // Parameter 'clusterName' is the name of the cluster as presented to kube-controller-manager
+ GetLoadBalancer(clusterName string, service *v1.Service) (status *v1.LoadBalancerStatus, exists bool, err error)
+ // EnsureLoadBalancer creates a new load balancer 'name', or updates the existing one. Returns the status of the balancer
+ // Implementations must treat the *v1.Service and *v1.Node
+ // parameters as read-only and not modify them.
+ // Parameter 'clusterName' is the name of the cluster as presented to kube-controller-manager
+ EnsureLoadBalancer(clusterName string, service *v1.Service, nodes []*v1.Node) (*v1.LoadBalancerStatus, error)
+ // UpdateLoadBalancer updates hosts under the specified load balancer.
+ // Implementations must treat the *v1.Service and *v1.Node
+ // parameters as read-only and not modify them.
+ // Parameter 'clusterName' is the name of the cluster as presented to kube-controller-manager
+ UpdateLoadBalancer(clusterName string, service *v1.Service, nodes []*v1.Node) error
+ // EnsureLoadBalancerDeleted deletes the specified load balancer if it
+ // exists, returning nil if the load balancer specified either didn't exist or
+ // was successfully deleted.
+ // This construction is useful because many cloud providers' load balancers
+ // have multiple underlying components, meaning a Get could say that the LB
+ // doesn't exist even if some part of it is still laying around.
+ // Implementations must treat the *v1.Service parameter as read-only and not modify it.
+ // Parameter 'clusterName' is the name of the cluster as presented to kube-controller-manager
+ EnsureLoadBalancerDeleted(clusterName string, service *v1.Service) error
+}
+
+// Instances is an abstract, pluggable interface for sets of instances.
+type Instances interface {
+ // NodeAddresses returns the addresses of the specified instance.
+ // TODO(roberthbailey): This currently is only used in such a way that it
+ // returns the address of the calling instance. We should do a rename to
+ // make this clearer.
+ NodeAddresses(name types.NodeName) ([]v1.NodeAddress, error)
+ // NodeAddressesByProviderID returns the addresses of the specified instance.
+ // The instance is specified using the providerID of the node. The
+ // ProviderID is a unique identifier of the node. This will not be called
+ // from the node whose nodeaddresses are being queried. i.e. local metadata
+ // services cannot be used in this method to obtain nodeaddresses
+ NodeAddressesByProviderID(providerId string) ([]v1.NodeAddress, error)
+ // ExternalID returns the cloud provider ID of the node with the specified NodeName.
+ // Note that if the instance does not exist or is no longer running, we must return ("", cloudprovider.InstanceNotFound)
+ ExternalID(nodeName types.NodeName) (string, error)
+ // InstanceID returns the cloud provider ID of the node with the specified NodeName.
+ InstanceID(nodeName types.NodeName) (string, error)
+ // InstanceType returns the type of the specified instance.
+ InstanceType(name types.NodeName) (string, error)
+ // InstanceTypeByProviderID returns the type of the specified instance.
+ InstanceTypeByProviderID(providerID string) (string, error)
+ // AddSSHKeyToAllInstances adds an SSH public key as a legal identity for all instances
+ // expected format for the key is standard ssh-keygen format: <protocol> <blob>
+ AddSSHKeyToAllInstances(user string, keyData []byte) error
+ // CurrentNodeName returns the name of the node we are currently running on
+ // On most clouds (e.g. GCE) this is the hostname, so we provide the hostname
+ CurrentNodeName(hostname string) (types.NodeName, error)
+}
+
+// Route is a representation of an advanced routing rule.
+type Route struct {
+ // Name is the name of the routing rule in the cloud-provider.
+ // It will be ignored in a Create (although nameHint may influence it)
+ Name string
+ // TargetNode is the NodeName of the target instance.
+ TargetNode types.NodeName
+ // DestinationCIDR is the CIDR format IP range that this routing rule
+ // applies to.
+ DestinationCIDR string
+ // Blackhole is set to true if this is a blackhole route
+ // The node controller will delete the route if it is in the managed range.
+ Blackhole bool
+}
+
+// Routes is an abstract, pluggable interface for advanced routing rules.
+type Routes interface {
+ // ListRoutes lists all managed routes that belong to the specified clusterName
+ ListRoutes(clusterName string) ([]*Route, error)
+ // CreateRoute creates the described managed route
+ // route.Name will be ignored, although the cloud-provider may use nameHint
+ // to create a more user-meaningful name.
+ CreateRoute(clusterName string, nameHint string, route *Route) error
+ // DeleteRoute deletes the specified managed route
+ // Route should be as returned by ListRoutes
+ DeleteRoute(clusterName string, route *Route) error
+}
+
+var (
+ InstanceNotFound = errors.New("instance not found")
+ DiskNotFound = errors.New("disk is not found")
+)
+
+// Zone represents the location of a particular machine.
+type Zone struct {
+ FailureDomain string
+ Region string
+}
+
+// Zones is an abstract, pluggable interface for zone enumeration.
+type Zones interface {
+ // GetZone returns the Zone containing the current failure zone and locality region that the program is running in
+ GetZone() (Zone, error)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/doc.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/doc.go
new file mode 100644
index 000000000..41f8ae860
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/cloudprovider/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package cloudprovider supplies interfaces and implementations for cloud service providers.
+package cloudprovider // import "k8s.io/kubernetes/pkg/cloudprovider"
diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/plugins.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/plugins.go
new file mode 100644
index 000000000..0fc41f5ea
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/cloudprovider/plugins.go
@@ -0,0 +1,134 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package cloudprovider
+
+import (
+ "fmt"
+ "io"
+ "os"
+ "sync"
+
+ "github.com/golang/glog"
+)
+
+// Factory is a function that returns a cloudprovider.Interface.
+// The config parameter provides an io.Reader handler to the factory in
+// order to load specific configurations. If no configuration is provided
+// the parameter is nil.
+type Factory func(config io.Reader) (Interface, error)
+
+// All registered cloud providers.
+var (
+ providersMutex sync.Mutex
+ providers = make(map[string]Factory)
+)
+
+const externalCloudProvider = "external"
+
+// RegisterCloudProvider registers a cloudprovider.Factory by name. This
+// is expected to happen during app startup.
+func RegisterCloudProvider(name string, cloud Factory) {
+ providersMutex.Lock()
+ defer providersMutex.Unlock()
+ if _, found := providers[name]; found {
+ glog.Fatalf("Cloud provider %q was registered twice", name)
+ }
+ glog.V(1).Infof("Registered cloud provider %q", name)
+ providers[name] = cloud
+}
+
+// IsCloudProvider returns true if name corresponds to an already registered
+// cloud provider.
+func IsCloudProvider(name string) bool {
+ providersMutex.Lock()
+ defer providersMutex.Unlock()
+ _, found := providers[name]
+ return found
+}
+
+// CloudProviders returns the name of all registered cloud providers in a
+// string slice
+func CloudProviders() []string {
+ names := []string{}
+ providersMutex.Lock()
+ defer providersMutex.Unlock()
+ for name := range providers {
+ names = append(names, name)
+ }
+ return names
+}
+
+// GetCloudProvider creates an instance of the named cloud provider, or nil if
+// the name is unknown. The error return is only used if the named provider
+// was known but failed to initialize. The config parameter specifies the
+// io.Reader handler of the configuration file for the cloud provider, or nil
+// for no configuation.
+func GetCloudProvider(name string, config io.Reader) (Interface, error) {
+ providersMutex.Lock()
+ defer providersMutex.Unlock()
+ f, found := providers[name]
+ if !found {
+ return nil, nil
+ }
+ return f(config)
+}
+
+// Detects if the string is an external cloud provider
+func IsExternal(name string) bool {
+ return name == externalCloudProvider
+}
+
+// InitCloudProvider creates an instance of the named cloud provider.
+func InitCloudProvider(name string, configFilePath string) (Interface, error) {
+ var cloud Interface
+ var err error
+
+ if name == "" {
+ glog.Info("No cloud provider specified.")
+ return nil, nil
+ }
+
+ if IsExternal(name) {
+ glog.Info("External cloud provider specified")
+ return nil, nil
+ }
+
+ if configFilePath != "" {
+ var config *os.File
+ config, err = os.Open(configFilePath)
+ if err != nil {
+ glog.Fatalf("Couldn't open cloud provider configuration %s: %#v",
+ configFilePath, err)
+ }
+
+ defer config.Close()
+ cloud, err = GetCloudProvider(name, config)
+ } else {
+ // Pass explicit nil so plugins can actually check for nil. See
+ // "Why is my nil error value not equal to nil?" in golang.org/doc/faq.
+ cloud, err = GetCloudProvider(name, nil)
+ }
+
+ if err != nil {
+ return nil, fmt.Errorf("could not init cloud provider %q: %v", name, err)
+ }
+ if cloud == nil {
+ return nil, fmt.Errorf("unknown cloud provider %q", name)
+ }
+
+ return cloud, nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/controller/client_builder.go b/vendor/k8s.io/kubernetes/pkg/controller/client_builder.go
new file mode 100644
index 000000000..491366288
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/controller/client_builder.go
@@ -0,0 +1,292 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package controller
+
+import (
+ "fmt"
+ "time"
+
+ apierrors "k8s.io/apimachinery/pkg/api/errors"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/fields"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/watch"
+ apiserverserviceaccount "k8s.io/apiserver/pkg/authentication/serviceaccount"
+ clientgoclientset "k8s.io/client-go/kubernetes"
+ restclient "k8s.io/client-go/rest"
+ "k8s.io/client-go/tools/cache"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/v1"
+ v1authenticationapi "k8s.io/kubernetes/pkg/apis/authentication/v1"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/clientset"
+ v1authentication "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1"
+ v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1"
+ "k8s.io/kubernetes/pkg/serviceaccount"
+
+ "github.com/golang/glog"
+)
+
+// ControllerClientBuilder allows you to get clients and configs for controllers
+type ControllerClientBuilder interface {
+ Config(name string) (*restclient.Config, error)
+ ConfigOrDie(name string) *restclient.Config
+ Client(name string) (clientset.Interface, error)
+ ClientOrDie(name string) clientset.Interface
+ ClientGoClient(name string) (clientgoclientset.Interface, error)
+ ClientGoClientOrDie(name string) clientgoclientset.Interface
+}
+
+// SimpleControllerClientBuilder returns a fixed client with different user agents
+type SimpleControllerClientBuilder struct {
+ // ClientConfig is a skeleton config to clone and use as the basis for each controller client
+ ClientConfig *restclient.Config
+}
+
+func (b SimpleControllerClientBuilder) Config(name string) (*restclient.Config, error) {
+ clientConfig := *b.ClientConfig
+ return restclient.AddUserAgent(&clientConfig, name), nil
+}
+
+func (b SimpleControllerClientBuilder) ConfigOrDie(name string) *restclient.Config {
+ clientConfig, err := b.Config(name)
+ if err != nil {
+ glog.Fatal(err)
+ }
+ return clientConfig
+}
+
+func (b SimpleControllerClientBuilder) Client(name string) (clientset.Interface, error) {
+ clientConfig, err := b.Config(name)
+ if err != nil {
+ return nil, err
+ }
+ return clientset.NewForConfig(clientConfig)
+}
+
+func (b SimpleControllerClientBuilder) ClientOrDie(name string) clientset.Interface {
+ client, err := b.Client(name)
+ if err != nil {
+ glog.Fatal(err)
+ }
+ return client
+}
+
+func (b SimpleControllerClientBuilder) ClientGoClient(name string) (clientgoclientset.Interface, error) {
+ clientConfig, err := b.Config(name)
+ if err != nil {
+ return nil, err
+ }
+ return clientgoclientset.NewForConfig(clientConfig)
+}
+
+func (b SimpleControllerClientBuilder) ClientGoClientOrDie(name string) clientgoclientset.Interface {
+ client, err := b.ClientGoClient(name)
+ if err != nil {
+ glog.Fatal(err)
+ }
+ return client
+}
+
+// SAControllerClientBuilder is a ControllerClientBuilder that returns clients identifying as
+// service accounts
+type SAControllerClientBuilder struct {
+ // ClientConfig is a skeleton config to clone and use as the basis for each controller client
+ ClientConfig *restclient.Config
+
+ // CoreClient is used to provision service accounts if needed and watch for their associated tokens
+ // to construct a controller client
+ CoreClient v1core.CoreV1Interface
+
+ // AuthenticationClient is used to check API tokens to make sure they are valid before
+ // building a controller client from them
+ AuthenticationClient v1authentication.AuthenticationV1Interface
+
+ // Namespace is the namespace used to host the service accounts that will back the
+ // controllers. It must be highly privileged namespace which normal users cannot inspect.
+ Namespace string
+}
+
+// config returns a complete clientConfig for constructing clients. This is separate in anticipation of composition
+// which means that not all clientsets are known here
+func (b SAControllerClientBuilder) Config(name string) (*restclient.Config, error) {
+ sa, err := b.getOrCreateServiceAccount(name)
+ if err != nil {
+ return nil, err
+ }
+
+ var clientConfig *restclient.Config
+
+ lw := &cache.ListWatch{
+ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
+ options.FieldSelector = fields.SelectorFromSet(map[string]string{api.SecretTypeField: string(v1.SecretTypeServiceAccountToken)}).String()
+ return b.CoreClient.Secrets(b.Namespace).List(options)
+ },
+ WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
+ options.FieldSelector = fields.SelectorFromSet(map[string]string{api.SecretTypeField: string(v1.SecretTypeServiceAccountToken)}).String()
+ return b.CoreClient.Secrets(b.Namespace).Watch(options)
+ },
+ }
+ _, err = cache.ListWatchUntil(30*time.Second, lw,
+ func(event watch.Event) (bool, error) {
+ switch event.Type {
+ case watch.Deleted:
+ return false, nil
+ case watch.Error:
+ return false, fmt.Errorf("error watching")
+
+ case watch.Added, watch.Modified:
+ secret, ok := event.Object.(*v1.Secret)
+ if !ok {
+ return false, fmt.Errorf("unexpected object type: %T", event.Object)
+ }
+ if !serviceaccount.IsServiceAccountToken(secret, sa) {
+ return false, nil
+ }
+ if len(secret.Data[v1.ServiceAccountTokenKey]) == 0 {
+ return false, nil
+ }
+ validConfig, valid, err := b.getAuthenticatedConfig(sa, string(secret.Data[v1.ServiceAccountTokenKey]))
+ if err != nil {
+ glog.Warningf("error validating API token for %s/%s in secret %s: %v", sa.Name, sa.Namespace, secret.Name, err)
+ // continue watching for good tokens
+ return false, nil
+ }
+ if !valid {
+ glog.Warningf("secret %s contained an invalid API token for %s/%s", secret.Name, sa.Name, sa.Namespace)
+ // try to delete the secret containing the invalid token
+ if err := b.CoreClient.Secrets(secret.Namespace).Delete(secret.Name, &metav1.DeleteOptions{}); err != nil && !apierrors.IsNotFound(err) {
+ glog.Warningf("error deleting secret %s containing invalid API token for %s/%s: %v", secret.Name, sa.Name, sa.Namespace, err)
+ }
+ // continue watching for good tokens
+ return false, nil
+ }
+ clientConfig = validConfig
+ return true, nil
+
+ default:
+ return false, fmt.Errorf("unexpected event type: %v", event.Type)
+ }
+ })
+ if err != nil {
+ return nil, fmt.Errorf("unable to get token for service account: %v", err)
+ }
+
+ return clientConfig, nil
+}
+
+func (b SAControllerClientBuilder) getOrCreateServiceAccount(name string) (*v1.ServiceAccount, error) {
+ sa, err := b.CoreClient.ServiceAccounts(b.Namespace).Get(name, metav1.GetOptions{})
+ if err == nil {
+ return sa, nil
+ }
+ if !apierrors.IsNotFound(err) {
+ return nil, err
+ }
+
+ // Create the namespace if we can't verify it exists.
+ // Tolerate errors, since we don't know whether this component has namespace creation permissions.
+ if _, err := b.CoreClient.Namespaces().Get(b.Namespace, metav1.GetOptions{}); err != nil {
+ b.CoreClient.Namespaces().Create(&v1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: b.Namespace}})
+ }
+
+ // Create the service account
+ sa, err = b.CoreClient.ServiceAccounts(b.Namespace).Create(&v1.ServiceAccount{ObjectMeta: metav1.ObjectMeta{Namespace: b.Namespace, Name: name}})
+ if apierrors.IsAlreadyExists(err) {
+ // If we're racing to init and someone else already created it, re-fetch
+ return b.CoreClient.ServiceAccounts(b.Namespace).Get(name, metav1.GetOptions{})
+ }
+ return sa, err
+}
+
+func (b SAControllerClientBuilder) getAuthenticatedConfig(sa *v1.ServiceAccount, token string) (*restclient.Config, bool, error) {
+ username := apiserverserviceaccount.MakeUsername(sa.Namespace, sa.Name)
+
+ clientConfig := restclient.AnonymousClientConfig(b.ClientConfig)
+ clientConfig.BearerToken = token
+ restclient.AddUserAgent(clientConfig, username)
+
+ // Try token review first
+ tokenReview := &v1authenticationapi.TokenReview{Spec: v1authenticationapi.TokenReviewSpec{Token: token}}
+ if tokenResult, err := b.AuthenticationClient.TokenReviews().Create(tokenReview); err == nil {
+ if !tokenResult.Status.Authenticated {
+ glog.Warningf("Token for %s/%s did not authenticate correctly", sa.Name, sa.Namespace)
+ return nil, false, nil
+ }
+ if tokenResult.Status.User.Username != username {
+ glog.Warningf("Token for %s/%s authenticated as unexpected username: %s", sa.Name, sa.Namespace, tokenResult.Status.User.Username)
+ return nil, false, nil
+ }
+ glog.V(4).Infof("Verified credential for %s/%s", sa.Name, sa.Namespace)
+ return clientConfig, true, nil
+ }
+
+ // If we couldn't run the token review, the API might be disabled or we might not have permission.
+ // Try to make a request to /apis with the token. If we get a 401 we should consider the token invalid.
+ clientConfigCopy := *clientConfig
+ clientConfigCopy.NegotiatedSerializer = api.Codecs
+ client, err := restclient.UnversionedRESTClientFor(&clientConfigCopy)
+ if err != nil {
+ return nil, false, err
+ }
+ err = client.Get().AbsPath("/apis").Do().Error()
+ if apierrors.IsUnauthorized(err) {
+ glog.Warningf("Token for %s/%s did not authenticate correctly: %v", sa.Name, sa.Namespace, err)
+ return nil, false, nil
+ }
+
+ return clientConfig, true, nil
+}
+
+func (b SAControllerClientBuilder) ConfigOrDie(name string) *restclient.Config {
+ clientConfig, err := b.Config(name)
+ if err != nil {
+ glog.Fatal(err)
+ }
+ return clientConfig
+}
+
+func (b SAControllerClientBuilder) Client(name string) (clientset.Interface, error) {
+ clientConfig, err := b.Config(name)
+ if err != nil {
+ return nil, err
+ }
+ return clientset.NewForConfig(clientConfig)
+}
+
+func (b SAControllerClientBuilder) ClientOrDie(name string) clientset.Interface {
+ client, err := b.Client(name)
+ if err != nil {
+ glog.Fatal(err)
+ }
+ return client
+}
+
+func (b SAControllerClientBuilder) ClientGoClient(name string) (clientgoclientset.Interface, error) {
+ clientConfig, err := b.Config(name)
+ if err != nil {
+ return nil, err
+ }
+ return clientgoclientset.NewForConfig(clientConfig)
+}
+
+func (b SAControllerClientBuilder) ClientGoClientOrDie(name string) clientgoclientset.Interface {
+ client, err := b.ClientGoClient(name)
+ if err != nil {
+ glog.Fatal(err)
+ }
+ return client
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/controller/controller_ref_manager.go b/vendor/k8s.io/kubernetes/pkg/controller/controller_ref_manager.go
new file mode 100644
index 000000000..5477a073f
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/controller/controller_ref_manager.go
@@ -0,0 +1,515 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package controller
+
+import (
+ "fmt"
+ "sync"
+
+ "github.com/golang/glog"
+ "k8s.io/apimachinery/pkg/api/errors"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/labels"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ utilerrors "k8s.io/apimachinery/pkg/util/errors"
+ "k8s.io/kubernetes/pkg/api/v1"
+ appsv1beta1 "k8s.io/kubernetes/pkg/apis/apps/v1beta1"
+ extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
+)
+
+// GetControllerOf returns the controllerRef if controllee has a controller,
+// otherwise returns nil.
+func GetControllerOf(controllee metav1.Object) *metav1.OwnerReference {
+ ownerRefs := controllee.GetOwnerReferences()
+ for i := range ownerRefs {
+ owner := &ownerRefs[i]
+ if owner.Controller != nil && *owner.Controller == true {
+ return owner
+ }
+ }
+ return nil
+}
+
+type baseControllerRefManager struct {
+ controller metav1.Object
+ selector labels.Selector
+
+ canAdoptErr error
+ canAdoptOnce sync.Once
+ canAdoptFunc func() error
+}
+
+func (m *baseControllerRefManager) canAdopt() error {
+ m.canAdoptOnce.Do(func() {
+ if m.canAdoptFunc != nil {
+ m.canAdoptErr = m.canAdoptFunc()
+ }
+ })
+ return m.canAdoptErr
+}
+
+// claimObject tries to take ownership of an object for this controller.
+//
+// It will reconcile the following:
+// * Adopt orphans if the match function returns true.
+// * Release owned objects if the match function returns false.
+//
+// A non-nil error is returned if some form of reconciliation was attemped and
+// failed. Usually, controllers should try again later in case reconciliation
+// is still needed.
+//
+// If the error is nil, either the reconciliation succeeded, or no
+// reconciliation was necessary. The returned boolean indicates whether you now
+// own the object.
+//
+// No reconciliation will be attempted if the controller is being deleted.
+func (m *baseControllerRefManager) claimObject(obj metav1.Object, match func(metav1.Object) bool, adopt, release func(metav1.Object) error) (bool, error) {
+ controllerRef := GetControllerOf(obj)
+ if controllerRef != nil {
+ if controllerRef.UID != m.controller.GetUID() {
+ // Owned by someone else. Ignore.
+ return false, nil
+ }
+ if match(obj) {
+ // We already own it and the selector matches.
+ // Return true (successfully claimed) before checking deletion timestamp.
+ // We're still allowed to claim things we already own while being deleted
+ // because doing so requires taking no actions.
+ return true, nil
+ }
+ // Owned by us but selector doesn't match.
+ // Try to release, unless we're being deleted.
+ if m.controller.GetDeletionTimestamp() != nil {
+ return false, nil
+ }
+ if err := release(obj); err != nil {
+ // If the pod no longer exists, ignore the error.
+ if errors.IsNotFound(err) {
+ return false, nil
+ }
+ // Either someone else released it, or there was a transient error.
+ // The controller should requeue and try again if it's still stale.
+ return false, err
+ }
+ // Successfully released.
+ return false, nil
+ }
+
+ // It's an orphan.
+ if m.controller.GetDeletionTimestamp() != nil || !match(obj) {
+ // Ignore if we're being deleted or selector doesn't match.
+ return false, nil
+ }
+ if obj.GetDeletionTimestamp() != nil {
+ // Ignore if the object is being deleted
+ return false, nil
+ }
+ // Selector matches. Try to adopt.
+ if err := adopt(obj); err != nil {
+ // If the pod no longer exists, ignore the error.
+ if errors.IsNotFound(err) {
+ return false, nil
+ }
+ // Either someone else claimed it first, or there was a transient error.
+ // The controller should requeue and try again if it's still orphaned.
+ return false, err
+ }
+ // Successfully adopted.
+ return true, nil
+}
+
+type PodControllerRefManager struct {
+ baseControllerRefManager
+ controllerKind schema.GroupVersionKind
+ podControl PodControlInterface
+}
+
+// NewPodControllerRefManager returns a PodControllerRefManager that exposes
+// methods to manage the controllerRef of pods.
+//
+// The canAdopt() function can be used to perform a potentially expensive check
+// (such as a live GET from the API server) prior to the first adoption.
+// It will only be called (at most once) if an adoption is actually attempted.
+// If canAdopt() returns a non-nil error, all adoptions will fail.
+//
+// NOTE: Once canAdopt() is called, it will not be called again by the same
+// PodControllerRefManager instance. Create a new instance if it makes
+// sense to check canAdopt() again (e.g. in a different sync pass).
+func NewPodControllerRefManager(
+ podControl PodControlInterface,
+ controller metav1.Object,
+ selector labels.Selector,
+ controllerKind schema.GroupVersionKind,
+ canAdopt func() error,
+) *PodControllerRefManager {
+ return &PodControllerRefManager{
+ baseControllerRefManager: baseControllerRefManager{
+ controller: controller,
+ selector: selector,
+ canAdoptFunc: canAdopt,
+ },
+ controllerKind: controllerKind,
+ podControl: podControl,
+ }
+}
+
+// ClaimPods tries to take ownership of a list of Pods.
+//
+// It will reconcile the following:
+// * Adopt orphans if the selector matches.
+// * Release owned objects if the selector no longer matches.
+//
+// Optional: If one or more filters are specified, a Pod will only be claimed if
+// all filters return true.
+//
+// A non-nil error is returned if some form of reconciliation was attemped and
+// failed. Usually, controllers should try again later in case reconciliation
+// is still needed.
+//
+// If the error is nil, either the reconciliation succeeded, or no
+// reconciliation was necessary. The list of Pods that you now own is returned.
+func (m *PodControllerRefManager) ClaimPods(pods []*v1.Pod, filters ...func(*v1.Pod) bool) ([]*v1.Pod, error) {
+ var claimed []*v1.Pod
+ var errlist []error
+
+ match := func(obj metav1.Object) bool {
+ pod := obj.(*v1.Pod)
+ // Check selector first so filters only run on potentially matching Pods.
+ if !m.selector.Matches(labels.Set(pod.Labels)) {
+ return false
+ }
+ for _, filter := range filters {
+ if !filter(pod) {
+ return false
+ }
+ }
+ return true
+ }
+ adopt := func(obj metav1.Object) error {
+ return m.AdoptPod(obj.(*v1.Pod))
+ }
+ release := func(obj metav1.Object) error {
+ return m.ReleasePod(obj.(*v1.Pod))
+ }
+
+ for _, pod := range pods {
+ ok, err := m.claimObject(pod, match, adopt, release)
+ if err != nil {
+ errlist = append(errlist, err)
+ continue
+ }
+ if ok {
+ claimed = append(claimed, pod)
+ }
+ }
+ return claimed, utilerrors.NewAggregate(errlist)
+}
+
+// AdoptPod sends a patch to take control of the pod. It returns the error if
+// the patching fails.
+func (m *PodControllerRefManager) AdoptPod(pod *v1.Pod) error {
+ if err := m.canAdopt(); err != nil {
+ return fmt.Errorf("can't adopt Pod %v/%v (%v): %v", pod.Namespace, pod.Name, pod.UID, err)
+ }
+ // Note that ValidateOwnerReferences() will reject this patch if another
+ // OwnerReference exists with controller=true.
+ addControllerPatch := fmt.Sprintf(
+ `{"metadata":{"ownerReferences":[{"apiVersion":"%s","kind":"%s","name":"%s","uid":"%s","controller":true,"blockOwnerDeletion":true}],"uid":"%s"}}`,
+ m.controllerKind.GroupVersion(), m.controllerKind.Kind,
+ m.controller.GetName(), m.controller.GetUID(), pod.UID)
+ return m.podControl.PatchPod(pod.Namespace, pod.Name, []byte(addControllerPatch))
+}
+
+// ReleasePod sends a patch to free the pod from the control of the controller.
+// It returns the error if the patching fails. 404 and 422 errors are ignored.
+func (m *PodControllerRefManager) ReleasePod(pod *v1.Pod) error {
+ glog.V(2).Infof("patching pod %s_%s to remove its controllerRef to %s/%s:%s",
+ pod.Namespace, pod.Name, m.controllerKind.GroupVersion(), m.controllerKind.Kind, m.controller.GetName())
+ deleteOwnerRefPatch := fmt.Sprintf(`{"metadata":{"ownerReferences":[{"$patch":"delete","uid":"%s"}],"uid":"%s"}}`, m.controller.GetUID(), pod.UID)
+ err := m.podControl.PatchPod(pod.Namespace, pod.Name, []byte(deleteOwnerRefPatch))
+ if err != nil {
+ if errors.IsNotFound(err) {
+ // If the pod no longer exists, ignore it.
+ return nil
+ }
+ if errors.IsInvalid(err) {
+ // Invalid error will be returned in two cases: 1. the pod
+ // has no owner reference, 2. the uid of the pod doesn't
+ // match, which means the pod is deleted and then recreated.
+ // In both cases, the error can be ignored.
+
+ // TODO: If the pod has owner references, but none of them
+ // has the owner.UID, server will silently ignore the patch.
+ // Investigate why.
+ return nil
+ }
+ }
+ return err
+}
+
+// ReplicaSetControllerRefManager is used to manage controllerRef of ReplicaSets.
+// Three methods are defined on this object 1: Classify 2: AdoptReplicaSet and
+// 3: ReleaseReplicaSet which are used to classify the ReplicaSets into appropriate
+// categories and accordingly adopt or release them. See comments on these functions
+// for more details.
+type ReplicaSetControllerRefManager struct {
+ baseControllerRefManager
+ controllerKind schema.GroupVersionKind
+ rsControl RSControlInterface
+}
+
+// NewReplicaSetControllerRefManager returns a ReplicaSetControllerRefManager that exposes
+// methods to manage the controllerRef of ReplicaSets.
+//
+// The canAdopt() function can be used to perform a potentially expensive check
+// (such as a live GET from the API server) prior to the first adoption.
+// It will only be called (at most once) if an adoption is actually attempted.
+// If canAdopt() returns a non-nil error, all adoptions will fail.
+//
+// NOTE: Once canAdopt() is called, it will not be called again by the same
+// ReplicaSetControllerRefManager instance. Create a new instance if it
+// makes sense to check canAdopt() again (e.g. in a different sync pass).
+func NewReplicaSetControllerRefManager(
+ rsControl RSControlInterface,
+ controller metav1.Object,
+ selector labels.Selector,
+ controllerKind schema.GroupVersionKind,
+ canAdopt func() error,
+) *ReplicaSetControllerRefManager {
+ return &ReplicaSetControllerRefManager{
+ baseControllerRefManager: baseControllerRefManager{
+ controller: controller,
+ selector: selector,
+ canAdoptFunc: canAdopt,
+ },
+ controllerKind: controllerKind,
+ rsControl: rsControl,
+ }
+}
+
+// ClaimReplicaSets tries to take ownership of a list of ReplicaSets.
+//
+// It will reconcile the following:
+// * Adopt orphans if the selector matches.
+// * Release owned objects if the selector no longer matches.
+//
+// A non-nil error is returned if some form of reconciliation was attemped and
+// failed. Usually, controllers should try again later in case reconciliation
+// is still needed.
+//
+// If the error is nil, either the reconciliation succeeded, or no
+// reconciliation was necessary. The list of ReplicaSets that you now own is
+// returned.
+func (m *ReplicaSetControllerRefManager) ClaimReplicaSets(sets []*extensions.ReplicaSet) ([]*extensions.ReplicaSet, error) {
+ var claimed []*extensions.ReplicaSet
+ var errlist []error
+
+ match := func(obj metav1.Object) bool {
+ return m.selector.Matches(labels.Set(obj.GetLabels()))
+ }
+ adopt := func(obj metav1.Object) error {
+ return m.AdoptReplicaSet(obj.(*extensions.ReplicaSet))
+ }
+ release := func(obj metav1.Object) error {
+ return m.ReleaseReplicaSet(obj.(*extensions.ReplicaSet))
+ }
+
+ for _, rs := range sets {
+ ok, err := m.claimObject(rs, match, adopt, release)
+ if err != nil {
+ errlist = append(errlist, err)
+ continue
+ }
+ if ok {
+ claimed = append(claimed, rs)
+ }
+ }
+ return claimed, utilerrors.NewAggregate(errlist)
+}
+
+// AdoptReplicaSet sends a patch to take control of the ReplicaSet. It returns
+// the error if the patching fails.
+func (m *ReplicaSetControllerRefManager) AdoptReplicaSet(rs *extensions.ReplicaSet) error {
+ if err := m.canAdopt(); err != nil {
+ return fmt.Errorf("can't adopt ReplicaSet %v/%v (%v): %v", rs.Namespace, rs.Name, rs.UID, err)
+ }
+ // Note that ValidateOwnerReferences() will reject this patch if another
+ // OwnerReference exists with controller=true.
+ addControllerPatch := fmt.Sprintf(
+ `{"metadata":{"ownerReferences":[{"apiVersion":"%s","kind":"%s","name":"%s","uid":"%s","controller":true,"blockOwnerDeletion":true}],"uid":"%s"}}`,
+ m.controllerKind.GroupVersion(), m.controllerKind.Kind,
+ m.controller.GetName(), m.controller.GetUID(), rs.UID)
+ return m.rsControl.PatchReplicaSet(rs.Namespace, rs.Name, []byte(addControllerPatch))
+}
+
+// ReleaseReplicaSet sends a patch to free the ReplicaSet from the control of the Deployment controller.
+// It returns the error if the patching fails. 404 and 422 errors are ignored.
+func (m *ReplicaSetControllerRefManager) ReleaseReplicaSet(replicaSet *extensions.ReplicaSet) error {
+ glog.V(2).Infof("patching ReplicaSet %s_%s to remove its controllerRef to %s/%s:%s",
+ replicaSet.Namespace, replicaSet.Name, m.controllerKind.GroupVersion(), m.controllerKind.Kind, m.controller.GetName())
+ deleteOwnerRefPatch := fmt.Sprintf(`{"metadata":{"ownerReferences":[{"$patch":"delete","uid":"%s"}],"uid":"%s"}}`, m.controller.GetUID(), replicaSet.UID)
+ err := m.rsControl.PatchReplicaSet(replicaSet.Namespace, replicaSet.Name, []byte(deleteOwnerRefPatch))
+ if err != nil {
+ if errors.IsNotFound(err) {
+ // If the ReplicaSet no longer exists, ignore it.
+ return nil
+ }
+ if errors.IsInvalid(err) {
+ // Invalid error will be returned in two cases: 1. the ReplicaSet
+ // has no owner reference, 2. the uid of the ReplicaSet doesn't
+ // match, which means the ReplicaSet is deleted and then recreated.
+ // In both cases, the error can be ignored.
+ return nil
+ }
+ }
+ return err
+}
+
+// RecheckDeletionTimestamp returns a canAdopt() function to recheck deletion.
+//
+// The canAdopt() function calls getObject() to fetch the latest value,
+// and denies adoption attempts if that object has a non-nil DeletionTimestamp.
+func RecheckDeletionTimestamp(getObject func() (metav1.Object, error)) func() error {
+ return func() error {
+ obj, err := getObject()
+ if err != nil {
+ return fmt.Errorf("can't recheck DeletionTimestamp: %v", err)
+ }
+ if obj.GetDeletionTimestamp() != nil {
+ return fmt.Errorf("%v/%v has just been deleted at %v", obj.GetNamespace(), obj.GetName(), obj.GetDeletionTimestamp())
+ }
+ return nil
+ }
+}
+
+// ControllerRevisionControllerRefManager is used to manage controllerRef of ControllerRevisions.
+// Three methods are defined on this object 1: Classify 2: AdoptControllerRevision and
+// 3: ReleaseControllerRevision which are used to classify the ControllerRevisions into appropriate
+// categories and accordingly adopt or release them. See comments on these functions
+// for more details.
+type ControllerRevisionControllerRefManager struct {
+ baseControllerRefManager
+ controllerKind schema.GroupVersionKind
+ crControl ControllerRevisionControlInterface
+}
+
+// NewControllerRevisionControllerRefManager returns a ControllerRevisionControllerRefManager that exposes
+// methods to manage the controllerRef of ControllerRevisions.
+//
+// The canAdopt() function can be used to perform a potentially expensive check
+// (such as a live GET from the API server) prior to the first adoption.
+// It will only be called (at most once) if an adoption is actually attempted.
+// If canAdopt() returns a non-nil error, all adoptions will fail.
+//
+// NOTE: Once canAdopt() is called, it will not be called again by the same
+// ControllerRevisionControllerRefManager instance. Create a new instance if it
+// makes sense to check canAdopt() again (e.g. in a different sync pass).
+func NewControllerRevisionControllerRefManager(
+ crControl ControllerRevisionControlInterface,
+ controller metav1.Object,
+ selector labels.Selector,
+ controllerKind schema.GroupVersionKind,
+ canAdopt func() error,
+) *ControllerRevisionControllerRefManager {
+ return &ControllerRevisionControllerRefManager{
+ baseControllerRefManager: baseControllerRefManager{
+ controller: controller,
+ selector: selector,
+ canAdoptFunc: canAdopt,
+ },
+ controllerKind: controllerKind,
+ crControl: crControl,
+ }
+}
+
+// ClaimControllerRevisions tries to take ownership of a list of ControllerRevisions.
+//
+// It will reconcile the following:
+// * Adopt orphans if the selector matches.
+// * Release owned objects if the selector no longer matches.
+//
+// A non-nil error is returned if some form of reconciliation was attemped and
+// failed. Usually, controllers should try again later in case reconciliation
+// is still needed.
+//
+// If the error is nil, either the reconciliation succeeded, or no
+// reconciliation was necessary. The list of ControllerRevisions that you now own is
+// returned.
+func (m *ControllerRevisionControllerRefManager) ClaimControllerRevisions(histories []*appsv1beta1.ControllerRevision) ([]*appsv1beta1.ControllerRevision, error) {
+ var claimed []*appsv1beta1.ControllerRevision
+ var errlist []error
+
+ match := func(obj metav1.Object) bool {
+ return m.selector.Matches(labels.Set(obj.GetLabels()))
+ }
+ adopt := func(obj metav1.Object) error {
+ return m.AdoptControllerRevision(obj.(*appsv1beta1.ControllerRevision))
+ }
+ release := func(obj metav1.Object) error {
+ return m.ReleaseControllerRevision(obj.(*appsv1beta1.ControllerRevision))
+ }
+
+ for _, h := range histories {
+ ok, err := m.claimObject(h, match, adopt, release)
+ if err != nil {
+ errlist = append(errlist, err)
+ continue
+ }
+ if ok {
+ claimed = append(claimed, h)
+ }
+ }
+ return claimed, utilerrors.NewAggregate(errlist)
+}
+
+// AdoptControllerRevision sends a patch to take control of the ControllerRevision. It returns the error if
+// the patching fails.
+func (m *ControllerRevisionControllerRefManager) AdoptControllerRevision(history *appsv1beta1.ControllerRevision) error {
+ if err := m.canAdopt(); err != nil {
+ return fmt.Errorf("can't adopt ControllerRevision %v/%v (%v): %v", history.Namespace, history.Name, history.UID, err)
+ }
+ // Note that ValidateOwnerReferences() will reject this patch if another
+ // OwnerReference exists with controller=true.
+ addControllerPatch := fmt.Sprintf(
+ `{"metadata":{"ownerReferences":[{"apiVersion":"%s","kind":"%s","name":"%s","uid":"%s","controller":true,"blockOwnerDeletion":true}],"uid":"%s"}}`,
+ m.controllerKind.GroupVersion(), m.controllerKind.Kind,
+ m.controller.GetName(), m.controller.GetUID(), history.UID)
+ return m.crControl.PatchControllerRevision(history.Namespace, history.Name, []byte(addControllerPatch))
+}
+
+// ReleaseControllerRevision sends a patch to free the ControllerRevision from the control of its controller.
+// It returns the error if the patching fails. 404 and 422 errors are ignored.
+func (m *ControllerRevisionControllerRefManager) ReleaseControllerRevision(history *appsv1beta1.ControllerRevision) error {
+ glog.V(2).Infof("patching ControllerRevision %s_%s to remove its controllerRef to %s/%s:%s",
+ history.Namespace, history.Name, m.controllerKind.GroupVersion(), m.controllerKind.Kind, m.controller.GetName())
+ deleteOwnerRefPatch := fmt.Sprintf(`{"metadata":{"ownerReferences":[{"$patch":"delete","uid":"%s"}],"uid":"%s"}}`, m.controller.GetUID(), history.UID)
+ err := m.crControl.PatchControllerRevision(history.Namespace, history.Name, []byte(deleteOwnerRefPatch))
+ if err != nil {
+ if errors.IsNotFound(err) {
+ // If the ControllerRevision no longer exists, ignore it.
+ return nil
+ }
+ if errors.IsInvalid(err) {
+ // Invalid error will be returned in two cases: 1. the ControllerRevision
+ // has no owner reference, 2. the uid of the ControllerRevision doesn't
+ // match, which means the ControllerRevision is deleted and then recreated.
+ // In both cases, the error can be ignored.
+ return nil
+ }
+ }
+ return err
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/controller/controller_utils.go b/vendor/k8s.io/kubernetes/pkg/controller/controller_utils.go
new file mode 100644
index 000000000..9f1a17767
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/controller/controller_utils.go
@@ -0,0 +1,1018 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package controller
+
+import (
+ "encoding/binary"
+ "encoding/json"
+ "fmt"
+ "hash/fnv"
+ "sync"
+ "sync/atomic"
+ "time"
+
+ "k8s.io/apimachinery/pkg/api/meta"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/labels"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/types"
+ "k8s.io/apimachinery/pkg/util/clock"
+ utilruntime "k8s.io/apimachinery/pkg/util/runtime"
+ "k8s.io/apimachinery/pkg/util/sets"
+ "k8s.io/apimachinery/pkg/util/strategicpatch"
+ "k8s.io/apimachinery/pkg/util/wait"
+ "k8s.io/client-go/tools/cache"
+ "k8s.io/client-go/tools/record"
+ "k8s.io/client-go/util/integer"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/v1"
+ v1helper "k8s.io/kubernetes/pkg/api/v1/helper"
+ podutil "k8s.io/kubernetes/pkg/api/v1/pod"
+ "k8s.io/kubernetes/pkg/api/v1/ref"
+ "k8s.io/kubernetes/pkg/api/validation"
+ extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/clientset"
+ clientretry "k8s.io/kubernetes/pkg/client/retry"
+ hashutil "k8s.io/kubernetes/pkg/util/hash"
+
+ "github.com/golang/glog"
+)
+
+const (
+ // If a watch drops a delete event for a pod, it'll take this long
+ // before a dormant controller waiting for those packets is woken up anyway. It is
+ // specifically targeted at the case where some problem prevents an update
+ // of expectations, without it the controller could stay asleep forever. This should
+ // be set based on the expected latency of watch events.
+ //
+ // Currently a controller can service (create *and* observe the watch events for said
+ // creation) about 10 pods a second, so it takes about 1 min to service
+ // 500 pods. Just creation is limited to 20qps, and watching happens with ~10-30s
+ // latency/pod at the scale of 3000 pods over 100 nodes.
+ ExpectationsTimeout = 5 * time.Minute
+)
+
+var UpdateTaintBackoff = wait.Backoff{
+ Steps: 5,
+ Duration: 100 * time.Millisecond,
+ Jitter: 1.0,
+}
+
+var (
+ KeyFunc = cache.DeletionHandlingMetaNamespaceKeyFunc
+)
+
+type ResyncPeriodFunc func() time.Duration
+
+// Returns 0 for resyncPeriod in case resyncing is not needed.
+func NoResyncPeriodFunc() time.Duration {
+ return 0
+}
+
+// StaticResyncPeriodFunc returns the resync period specified
+func StaticResyncPeriodFunc(resyncPeriod time.Duration) ResyncPeriodFunc {
+ return func() time.Duration {
+ return resyncPeriod
+ }
+}
+
+// Expectations are a way for controllers to tell the controller manager what they expect. eg:
+// ControllerExpectations: {
+// controller1: expects 2 adds in 2 minutes
+// controller2: expects 2 dels in 2 minutes
+// controller3: expects -1 adds in 2 minutes => controller3's expectations have already been met
+// }
+//
+// Implementation:
+// ControlleeExpectation = pair of atomic counters to track controllee's creation/deletion
+// ControllerExpectationsStore = TTLStore + a ControlleeExpectation per controller
+//
+// * Once set expectations can only be lowered
+// * A controller isn't synced till its expectations are either fulfilled, or expire
+// * Controllers that don't set expectations will get woken up for every matching controllee
+
+// ExpKeyFunc to parse out the key from a ControlleeExpectation
+var ExpKeyFunc = func(obj interface{}) (string, error) {
+ if e, ok := obj.(*ControlleeExpectations); ok {
+ return e.key, nil
+ }
+ return "", fmt.Errorf("Could not find key for obj %#v", obj)
+}
+
+// ControllerExpectationsInterface is an interface that allows users to set and wait on expectations.
+// Only abstracted out for testing.
+// Warning: if using KeyFunc it is not safe to use a single ControllerExpectationsInterface with different
+// types of controllers, because the keys might conflict across types.
+type ControllerExpectationsInterface interface {
+ GetExpectations(controllerKey string) (*ControlleeExpectations, bool, error)
+ SatisfiedExpectations(controllerKey string) bool
+ DeleteExpectations(controllerKey string)
+ SetExpectations(controllerKey string, add, del int) error
+ ExpectCreations(controllerKey string, adds int) error
+ ExpectDeletions(controllerKey string, dels int) error
+ CreationObserved(controllerKey string)
+ DeletionObserved(controllerKey string)
+ RaiseExpectations(controllerKey string, add, del int)
+ LowerExpectations(controllerKey string, add, del int)
+}
+
+// ControllerExpectations is a cache mapping controllers to what they expect to see before being woken up for a sync.
+type ControllerExpectations struct {
+ cache.Store
+}
+
+// GetExpectations returns the ControlleeExpectations of the given controller.
+func (r *ControllerExpectations) GetExpectations(controllerKey string) (*ControlleeExpectations, bool, error) {
+ if exp, exists, err := r.GetByKey(controllerKey); err == nil && exists {
+ return exp.(*ControlleeExpectations), true, nil
+ } else {
+ return nil, false, err
+ }
+}
+
+// DeleteExpectations deletes the expectations of the given controller from the TTLStore.
+func (r *ControllerExpectations) DeleteExpectations(controllerKey string) {
+ if exp, exists, err := r.GetByKey(controllerKey); err == nil && exists {
+ if err := r.Delete(exp); err != nil {
+ glog.V(2).Infof("Error deleting expectations for controller %v: %v", controllerKey, err)
+ }
+ }
+}
+
+// SatisfiedExpectations returns true if the required adds/dels for the given controller have been observed.
+// Add/del counts are established by the controller at sync time, and updated as controllees are observed by the controller
+// manager.
+func (r *ControllerExpectations) SatisfiedExpectations(controllerKey string) bool {
+ if exp, exists, err := r.GetExpectations(controllerKey); exists {
+ if exp.Fulfilled() {
+ glog.V(4).Infof("Controller expectations fulfilled %#v", exp)
+ return true
+ } else if exp.isExpired() {
+ glog.V(4).Infof("Controller expectations expired %#v", exp)
+ return true
+ } else {
+ glog.V(4).Infof("Controller still waiting on expectations %#v", exp)
+ return false
+ }
+ } else if err != nil {
+ glog.V(2).Infof("Error encountered while checking expectations %#v, forcing sync", err)
+ } else {
+ // When a new controller is created, it doesn't have expectations.
+ // When it doesn't see expected watch events for > TTL, the expectations expire.
+ // - In this case it wakes up, creates/deletes controllees, and sets expectations again.
+ // When it has satisfied expectations and no controllees need to be created/destroyed > TTL, the expectations expire.
+ // - In this case it continues without setting expectations till it needs to create/delete controllees.
+ glog.V(4).Infof("Controller %v either never recorded expectations, or the ttl expired.", controllerKey)
+ }
+ // Trigger a sync if we either encountered and error (which shouldn't happen since we're
+ // getting from local store) or this controller hasn't established expectations.
+ return true
+}
+
+// TODO: Extend ExpirationCache to support explicit expiration.
+// TODO: Make this possible to disable in tests.
+// TODO: Support injection of clock.
+func (exp *ControlleeExpectations) isExpired() bool {
+ return clock.RealClock{}.Since(exp.timestamp) > ExpectationsTimeout
+}
+
+// SetExpectations registers new expectations for the given controller. Forgets existing expectations.
+func (r *ControllerExpectations) SetExpectations(controllerKey string, add, del int) error {
+ exp := &ControlleeExpectations{add: int64(add), del: int64(del), key: controllerKey, timestamp: clock.RealClock{}.Now()}
+ glog.V(4).Infof("Setting expectations %#v", exp)
+ return r.Add(exp)
+}
+
+func (r *ControllerExpectations) ExpectCreations(controllerKey string, adds int) error {
+ return r.SetExpectations(controllerKey, adds, 0)
+}
+
+func (r *ControllerExpectations) ExpectDeletions(controllerKey string, dels int) error {
+ return r.SetExpectations(controllerKey, 0, dels)
+}
+
+// Decrements the expectation counts of the given controller.
+func (r *ControllerExpectations) LowerExpectations(controllerKey string, add, del int) {
+ if exp, exists, err := r.GetExpectations(controllerKey); err == nil && exists {
+ exp.Add(int64(-add), int64(-del))
+ // The expectations might've been modified since the update on the previous line.
+ glog.V(4).Infof("Lowered expectations %#v", exp)
+ }
+}
+
+// Increments the expectation counts of the given controller.
+func (r *ControllerExpectations) RaiseExpectations(controllerKey string, add, del int) {
+ if exp, exists, err := r.GetExpectations(controllerKey); err == nil && exists {
+ exp.Add(int64(add), int64(del))
+ // The expectations might've been modified since the update on the previous line.
+ glog.V(4).Infof("Raised expectations %#v", exp)
+ }
+}
+
+// CreationObserved atomically decrements the `add` expectation count of the given controller.
+func (r *ControllerExpectations) CreationObserved(controllerKey string) {
+ r.LowerExpectations(controllerKey, 1, 0)
+}
+
+// DeletionObserved atomically decrements the `del` expectation count of the given controller.
+func (r *ControllerExpectations) DeletionObserved(controllerKey string) {
+ r.LowerExpectations(controllerKey, 0, 1)
+}
+
+// Expectations are either fulfilled, or expire naturally.
+type Expectations interface {
+ Fulfilled() bool
+}
+
+// ControlleeExpectations track controllee creates/deletes.
+type ControlleeExpectations struct {
+ // Important: Since these two int64 fields are using sync/atomic, they have to be at the top of the struct due to a bug on 32-bit platforms
+ // See: https://golang.org/pkg/sync/atomic/ for more information
+ add int64
+ del int64
+ key string
+ timestamp time.Time
+}
+
+// Add increments the add and del counters.
+func (e *ControlleeExpectations) Add(add, del int64) {
+ atomic.AddInt64(&e.add, add)
+ atomic.AddInt64(&e.del, del)
+}
+
+// Fulfilled returns true if this expectation has been fulfilled.
+func (e *ControlleeExpectations) Fulfilled() bool {
+ // TODO: think about why this line being atomic doesn't matter
+ return atomic.LoadInt64(&e.add) <= 0 && atomic.LoadInt64(&e.del) <= 0
+}
+
+// GetExpectations returns the add and del expectations of the controllee.
+func (e *ControlleeExpectations) GetExpectations() (int64, int64) {
+ return atomic.LoadInt64(&e.add), atomic.LoadInt64(&e.del)
+}
+
+// NewControllerExpectations returns a store for ControllerExpectations.
+func NewControllerExpectations() *ControllerExpectations {
+ return &ControllerExpectations{cache.NewStore(ExpKeyFunc)}
+}
+
+// UIDSetKeyFunc to parse out the key from a UIDSet.
+var UIDSetKeyFunc = func(obj interface{}) (string, error) {
+ if u, ok := obj.(*UIDSet); ok {
+ return u.key, nil
+ }
+ return "", fmt.Errorf("Could not find key for obj %#v", obj)
+}
+
+// UIDSet holds a key and a set of UIDs. Used by the
+// UIDTrackingControllerExpectations to remember which UID it has seen/still
+// waiting for.
+type UIDSet struct {
+ sets.String
+ key string
+}
+
+// UIDTrackingControllerExpectations tracks the UID of the pods it deletes.
+// This cache is needed over plain old expectations to safely handle graceful
+// deletion. The desired behavior is to treat an update that sets the
+// DeletionTimestamp on an object as a delete. To do so consistently, one needs
+// to remember the expected deletes so they aren't double counted.
+// TODO: Track creates as well (#22599)
+type UIDTrackingControllerExpectations struct {
+ ControllerExpectationsInterface
+ // TODO: There is a much nicer way to do this that involves a single store,
+ // a lock per entry, and a ControlleeExpectationsInterface type.
+ uidStoreLock sync.Mutex
+ // Store used for the UIDs associated with any expectation tracked via the
+ // ControllerExpectationsInterface.
+ uidStore cache.Store
+}
+
+// GetUIDs is a convenience method to avoid exposing the set of expected uids.
+// The returned set is not thread safe, all modifications must be made holding
+// the uidStoreLock.
+func (u *UIDTrackingControllerExpectations) GetUIDs(controllerKey string) sets.String {
+ if uid, exists, err := u.uidStore.GetByKey(controllerKey); err == nil && exists {
+ return uid.(*UIDSet).String
+ }
+ return nil
+}
+
+// ExpectDeletions records expectations for the given deleteKeys, against the given controller.
+func (u *UIDTrackingControllerExpectations) ExpectDeletions(rcKey string, deletedKeys []string) error {
+ u.uidStoreLock.Lock()
+ defer u.uidStoreLock.Unlock()
+
+ if existing := u.GetUIDs(rcKey); existing != nil && existing.Len() != 0 {
+ glog.Errorf("Clobbering existing delete keys: %+v", existing)
+ }
+ expectedUIDs := sets.NewString()
+ for _, k := range deletedKeys {
+ expectedUIDs.Insert(k)
+ }
+ glog.V(4).Infof("Controller %v waiting on deletions for: %+v", rcKey, deletedKeys)
+ if err := u.uidStore.Add(&UIDSet{expectedUIDs, rcKey}); err != nil {
+ return err
+ }
+ return u.ControllerExpectationsInterface.ExpectDeletions(rcKey, expectedUIDs.Len())
+}
+
+// DeletionObserved records the given deleteKey as a deletion, for the given rc.
+func (u *UIDTrackingControllerExpectations) DeletionObserved(rcKey, deleteKey string) {
+ u.uidStoreLock.Lock()
+ defer u.uidStoreLock.Unlock()
+
+ uids := u.GetUIDs(rcKey)
+ if uids != nil && uids.Has(deleteKey) {
+ glog.V(4).Infof("Controller %v received delete for pod %v", rcKey, deleteKey)
+ u.ControllerExpectationsInterface.DeletionObserved(rcKey)
+ uids.Delete(deleteKey)
+ }
+}
+
+// DeleteExpectations deletes the UID set and invokes DeleteExpectations on the
+// underlying ControllerExpectationsInterface.
+func (u *UIDTrackingControllerExpectations) DeleteExpectations(rcKey string) {
+ u.uidStoreLock.Lock()
+ defer u.uidStoreLock.Unlock()
+
+ u.ControllerExpectationsInterface.DeleteExpectations(rcKey)
+ if uidExp, exists, err := u.uidStore.GetByKey(rcKey); err == nil && exists {
+ if err := u.uidStore.Delete(uidExp); err != nil {
+ glog.V(2).Infof("Error deleting uid expectations for controller %v: %v", rcKey, err)
+ }
+ }
+}
+
+// NewUIDTrackingControllerExpectations returns a wrapper around
+// ControllerExpectations that is aware of deleteKeys.
+func NewUIDTrackingControllerExpectations(ce ControllerExpectationsInterface) *UIDTrackingControllerExpectations {
+ return &UIDTrackingControllerExpectations{ControllerExpectationsInterface: ce, uidStore: cache.NewStore(UIDSetKeyFunc)}
+}
+
+// Reasons for pod events
+const (
+ // FailedCreatePodReason is added in an event and in a replica set condition
+ // when a pod for a replica set is failed to be created.
+ FailedCreatePodReason = "FailedCreate"
+ // SuccessfulCreatePodReason is added in an event when a pod for a replica set
+ // is successfully created.
+ SuccessfulCreatePodReason = "SuccessfulCreate"
+ // FailedDeletePodReason is added in an event and in a replica set condition
+ // when a pod for a replica set is failed to be deleted.
+ FailedDeletePodReason = "FailedDelete"
+ // SuccessfulDeletePodReason is added in an event when a pod for a replica set
+ // is successfully deleted.
+ SuccessfulDeletePodReason = "SuccessfulDelete"
+)
+
+// RSControlInterface is an interface that knows how to add or delete
+// ReplicaSets, as well as increment or decrement them. It is used
+// by the deployment controller to ease testing of actions that it takes.
+type RSControlInterface interface {
+ PatchReplicaSet(namespace, name string, data []byte) error
+}
+
+// RealRSControl is the default implementation of RSControllerInterface.
+type RealRSControl struct {
+ KubeClient clientset.Interface
+ Recorder record.EventRecorder
+}
+
+var _ RSControlInterface = &RealRSControl{}
+
+func (r RealRSControl) PatchReplicaSet(namespace, name string, data []byte) error {
+ _, err := r.KubeClient.Extensions().ReplicaSets(namespace).Patch(name, types.StrategicMergePatchType, data)
+ return err
+}
+
+// TODO: merge the controller revision interface in controller_history.go with this one
+// ControllerRevisionControlInterface is an interface that knows how to patch
+// ControllerRevisions, as well as increment or decrement them. It is used
+// by the daemonset controller to ease testing of actions that it takes.
+type ControllerRevisionControlInterface interface {
+ PatchControllerRevision(namespace, name string, data []byte) error
+}
+
+// RealControllerRevisionControl is the default implementation of ControllerRevisionControlInterface.
+type RealControllerRevisionControl struct {
+ KubeClient clientset.Interface
+}
+
+var _ ControllerRevisionControlInterface = &RealControllerRevisionControl{}
+
+func (r RealControllerRevisionControl) PatchControllerRevision(namespace, name string, data []byte) error {
+ _, err := r.KubeClient.AppsV1beta1().ControllerRevisions(namespace).Patch(name, types.StrategicMergePatchType, data)
+ return err
+}
+
+// PodControlInterface is an interface that knows how to add or delete pods
+// created as an interface to allow testing.
+type PodControlInterface interface {
+ // CreatePods creates new pods according to the spec.
+ CreatePods(namespace string, template *v1.PodTemplateSpec, object runtime.Object) error
+ // CreatePodsOnNode creates a new pod according to the spec on the specified node,
+ // and sets the ControllerRef.
+ CreatePodsOnNode(nodeName, namespace string, template *v1.PodTemplateSpec, object runtime.Object, controllerRef *metav1.OwnerReference) error
+ // CreatePodsWithControllerRef creates new pods according to the spec, and sets object as the pod's controller.
+ CreatePodsWithControllerRef(namespace string, template *v1.PodTemplateSpec, object runtime.Object, controllerRef *metav1.OwnerReference) error
+ // DeletePod deletes the pod identified by podID.
+ DeletePod(namespace string, podID string, object runtime.Object) error
+ // PatchPod patches the pod.
+ PatchPod(namespace, name string, data []byte) error
+}
+
+// RealPodControl is the default implementation of PodControlInterface.
+type RealPodControl struct {
+ KubeClient clientset.Interface
+ Recorder record.EventRecorder
+}
+
+var _ PodControlInterface = &RealPodControl{}
+
+func getPodsLabelSet(template *v1.PodTemplateSpec) labels.Set {
+ desiredLabels := make(labels.Set)
+ for k, v := range template.Labels {
+ desiredLabels[k] = v
+ }
+ return desiredLabels
+}
+
+func getPodsFinalizers(template *v1.PodTemplateSpec) []string {
+ desiredFinalizers := make([]string, len(template.Finalizers))
+ copy(desiredFinalizers, template.Finalizers)
+ return desiredFinalizers
+}
+
+func getPodsAnnotationSet(template *v1.PodTemplateSpec, object runtime.Object) (labels.Set, error) {
+ desiredAnnotations := make(labels.Set)
+ for k, v := range template.Annotations {
+ desiredAnnotations[k] = v
+ }
+ createdByRef, err := ref.GetReference(api.Scheme, object)
+ if err != nil {
+ return desiredAnnotations, fmt.Errorf("unable to get controller reference: %v", err)
+ }
+
+ // TODO: this code was not safe previously - as soon as new code came along that switched to v2, old clients
+ // would be broken upon reading it. This is explicitly hardcoded to v1 to guarantee predictable deployment.
+ // We need to consistently handle this case of annotation versioning.
+ codec := api.Codecs.LegacyCodec(schema.GroupVersion{Group: v1.GroupName, Version: "v1"})
+
+ createdByRefJson, err := runtime.Encode(codec, &v1.SerializedReference{
+ Reference: *createdByRef,
+ })
+ if err != nil {
+ return desiredAnnotations, fmt.Errorf("unable to serialize controller reference: %v", err)
+ }
+ desiredAnnotations[v1.CreatedByAnnotation] = string(createdByRefJson)
+ return desiredAnnotations, nil
+}
+
+func getPodsPrefix(controllerName string) string {
+ // use the dash (if the name isn't too long) to make the pod name a bit prettier
+ prefix := fmt.Sprintf("%s-", controllerName)
+ if len(validation.ValidatePodName(prefix, true)) != 0 {
+ prefix = controllerName
+ }
+ return prefix
+}
+
+func validateControllerRef(controllerRef *metav1.OwnerReference) error {
+ if controllerRef == nil {
+ return fmt.Errorf("controllerRef is nil")
+ }
+ if len(controllerRef.APIVersion) == 0 {
+ return fmt.Errorf("controllerRef has empty APIVersion")
+ }
+ if len(controllerRef.Kind) == 0 {
+ return fmt.Errorf("controllerRef has empty Kind")
+ }
+ if controllerRef.Controller == nil || *controllerRef.Controller != true {
+ return fmt.Errorf("controllerRef.Controller is not set to true")
+ }
+ if controllerRef.BlockOwnerDeletion == nil || *controllerRef.BlockOwnerDeletion != true {
+ return fmt.Errorf("controllerRef.BlockOwnerDeletion is not set")
+ }
+ return nil
+}
+
+func (r RealPodControl) CreatePods(namespace string, template *v1.PodTemplateSpec, object runtime.Object) error {
+ return r.createPods("", namespace, template, object, nil)
+}
+
+func (r RealPodControl) CreatePodsWithControllerRef(namespace string, template *v1.PodTemplateSpec, controllerObject runtime.Object, controllerRef *metav1.OwnerReference) error {
+ if err := validateControllerRef(controllerRef); err != nil {
+ return err
+ }
+ return r.createPods("", namespace, template, controllerObject, controllerRef)
+}
+
+func (r RealPodControl) CreatePodsOnNode(nodeName, namespace string, template *v1.PodTemplateSpec, object runtime.Object, controllerRef *metav1.OwnerReference) error {
+ if err := validateControllerRef(controllerRef); err != nil {
+ return err
+ }
+ return r.createPods(nodeName, namespace, template, object, controllerRef)
+}
+
+func (r RealPodControl) PatchPod(namespace, name string, data []byte) error {
+ _, err := r.KubeClient.Core().Pods(namespace).Patch(name, types.StrategicMergePatchType, data)
+ return err
+}
+
+func GetPodFromTemplate(template *v1.PodTemplateSpec, parentObject runtime.Object, controllerRef *metav1.OwnerReference) (*v1.Pod, error) {
+ desiredLabels := getPodsLabelSet(template)
+ desiredFinalizers := getPodsFinalizers(template)
+ desiredAnnotations, err := getPodsAnnotationSet(template, parentObject)
+ if err != nil {
+ return nil, err
+ }
+ accessor, err := meta.Accessor(parentObject)
+ if err != nil {
+ return nil, fmt.Errorf("parentObject does not have ObjectMeta, %v", err)
+ }
+ prefix := getPodsPrefix(accessor.GetName())
+
+ pod := &v1.Pod{
+ ObjectMeta: metav1.ObjectMeta{
+ Labels: desiredLabels,
+ Annotations: desiredAnnotations,
+ GenerateName: prefix,
+ Finalizers: desiredFinalizers,
+ },
+ }
+ if controllerRef != nil {
+ pod.OwnerReferences = append(pod.OwnerReferences, *controllerRef)
+ }
+ clone, err := api.Scheme.DeepCopy(&template.Spec)
+ if err != nil {
+ return nil, err
+ }
+ pod.Spec = *clone.(*v1.PodSpec)
+ return pod, nil
+}
+
+func (r RealPodControl) createPods(nodeName, namespace string, template *v1.PodTemplateSpec, object runtime.Object, controllerRef *metav1.OwnerReference) error {
+ pod, err := GetPodFromTemplate(template, object, controllerRef)
+ if err != nil {
+ return err
+ }
+ if len(nodeName) != 0 {
+ pod.Spec.NodeName = nodeName
+ }
+ if labels.Set(pod.Labels).AsSelectorPreValidated().Empty() {
+ return fmt.Errorf("unable to create pods, no labels")
+ }
+ if newPod, err := r.KubeClient.Core().Pods(namespace).Create(pod); err != nil {
+ r.Recorder.Eventf(object, v1.EventTypeWarning, FailedCreatePodReason, "Error creating: %v", err)
+ return fmt.Errorf("unable to create pods: %v", err)
+ } else {
+ accessor, err := meta.Accessor(object)
+ if err != nil {
+ glog.Errorf("parentObject does not have ObjectMeta, %v", err)
+ return nil
+ }
+ glog.V(4).Infof("Controller %v created pod %v", accessor.GetName(), newPod.Name)
+ r.Recorder.Eventf(object, v1.EventTypeNormal, SuccessfulCreatePodReason, "Created pod: %v", newPod.Name)
+ }
+ return nil
+}
+
+func (r RealPodControl) DeletePod(namespace string, podID string, object runtime.Object) error {
+ accessor, err := meta.Accessor(object)
+ if err != nil {
+ return fmt.Errorf("object does not have ObjectMeta, %v", err)
+ }
+ glog.V(2).Infof("Controller %v deleting pod %v/%v", accessor.GetName(), namespace, podID)
+ if err := r.KubeClient.Core().Pods(namespace).Delete(podID, nil); err != nil {
+ r.Recorder.Eventf(object, v1.EventTypeWarning, FailedDeletePodReason, "Error deleting: %v", err)
+ return fmt.Errorf("unable to delete pods: %v", err)
+ } else {
+ r.Recorder.Eventf(object, v1.EventTypeNormal, SuccessfulDeletePodReason, "Deleted pod: %v", podID)
+ }
+ return nil
+}
+
+type FakePodControl struct {
+ sync.Mutex
+ Templates []v1.PodTemplateSpec
+ ControllerRefs []metav1.OwnerReference
+ DeletePodName []string
+ Patches [][]byte
+ Err error
+}
+
+var _ PodControlInterface = &FakePodControl{}
+
+func (f *FakePodControl) PatchPod(namespace, name string, data []byte) error {
+ f.Lock()
+ defer f.Unlock()
+ f.Patches = append(f.Patches, data)
+ if f.Err != nil {
+ return f.Err
+ }
+ return nil
+}
+
+func (f *FakePodControl) CreatePods(namespace string, spec *v1.PodTemplateSpec, object runtime.Object) error {
+ f.Lock()
+ defer f.Unlock()
+ f.Templates = append(f.Templates, *spec)
+ if f.Err != nil {
+ return f.Err
+ }
+ return nil
+}
+
+func (f *FakePodControl) CreatePodsWithControllerRef(namespace string, spec *v1.PodTemplateSpec, object runtime.Object, controllerRef *metav1.OwnerReference) error {
+ f.Lock()
+ defer f.Unlock()
+ f.Templates = append(f.Templates, *spec)
+ f.ControllerRefs = append(f.ControllerRefs, *controllerRef)
+ if f.Err != nil {
+ return f.Err
+ }
+ return nil
+}
+
+func (f *FakePodControl) CreatePodsOnNode(nodeName, namespace string, template *v1.PodTemplateSpec, object runtime.Object, controllerRef *metav1.OwnerReference) error {
+ f.Lock()
+ defer f.Unlock()
+ f.Templates = append(f.Templates, *template)
+ f.ControllerRefs = append(f.ControllerRefs, *controllerRef)
+ if f.Err != nil {
+ return f.Err
+ }
+ return nil
+}
+
+func (f *FakePodControl) DeletePod(namespace string, podID string, object runtime.Object) error {
+ f.Lock()
+ defer f.Unlock()
+ f.DeletePodName = append(f.DeletePodName, podID)
+ if f.Err != nil {
+ return f.Err
+ }
+ return nil
+}
+
+func (f *FakePodControl) Clear() {
+ f.Lock()
+ defer f.Unlock()
+ f.DeletePodName = []string{}
+ f.Templates = []v1.PodTemplateSpec{}
+ f.ControllerRefs = []metav1.OwnerReference{}
+ f.Patches = [][]byte{}
+}
+
+// ByLogging allows custom sorting of pods so the best one can be picked for getting its logs.
+type ByLogging []*v1.Pod
+
+func (s ByLogging) Len() int { return len(s) }
+func (s ByLogging) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
+
+func (s ByLogging) Less(i, j int) bool {
+ // 1. assigned < unassigned
+ if s[i].Spec.NodeName != s[j].Spec.NodeName && (len(s[i].Spec.NodeName) == 0 || len(s[j].Spec.NodeName) == 0) {
+ return len(s[i].Spec.NodeName) > 0
+ }
+ // 2. PodRunning < PodUnknown < PodPending
+ m := map[v1.PodPhase]int{v1.PodRunning: 0, v1.PodUnknown: 1, v1.PodPending: 2}
+ if m[s[i].Status.Phase] != m[s[j].Status.Phase] {
+ return m[s[i].Status.Phase] < m[s[j].Status.Phase]
+ }
+ // 3. ready < not ready
+ if podutil.IsPodReady(s[i]) != podutil.IsPodReady(s[j]) {
+ return podutil.IsPodReady(s[i])
+ }
+ // TODO: take availability into account when we push minReadySeconds information from deployment into pods,
+ // see https://github.com/kubernetes/kubernetes/issues/22065
+ // 4. Been ready for more time < less time < empty time
+ if podutil.IsPodReady(s[i]) && podutil.IsPodReady(s[j]) && !podReadyTime(s[i]).Equal(podReadyTime(s[j])) {
+ return afterOrZero(podReadyTime(s[j]), podReadyTime(s[i]))
+ }
+ // 5. Pods with containers with higher restart counts < lower restart counts
+ if maxContainerRestarts(s[i]) != maxContainerRestarts(s[j]) {
+ return maxContainerRestarts(s[i]) > maxContainerRestarts(s[j])
+ }
+ // 6. older pods < newer pods < empty timestamp pods
+ if !s[i].CreationTimestamp.Equal(s[j].CreationTimestamp) {
+ return afterOrZero(s[j].CreationTimestamp, s[i].CreationTimestamp)
+ }
+ return false
+}
+
+// ActivePods type allows custom sorting of pods so a controller can pick the best ones to delete.
+type ActivePods []*v1.Pod
+
+func (s ActivePods) Len() int { return len(s) }
+func (s ActivePods) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
+
+func (s ActivePods) Less(i, j int) bool {
+ // 1. Unassigned < assigned
+ // If only one of the pods is unassigned, the unassigned one is smaller
+ if s[i].Spec.NodeName != s[j].Spec.NodeName && (len(s[i].Spec.NodeName) == 0 || len(s[j].Spec.NodeName) == 0) {
+ return len(s[i].Spec.NodeName) == 0
+ }
+ // 2. PodPending < PodUnknown < PodRunning
+ m := map[v1.PodPhase]int{v1.PodPending: 0, v1.PodUnknown: 1, v1.PodRunning: 2}
+ if m[s[i].Status.Phase] != m[s[j].Status.Phase] {
+ return m[s[i].Status.Phase] < m[s[j].Status.Phase]
+ }
+ // 3. Not ready < ready
+ // If only one of the pods is not ready, the not ready one is smaller
+ if podutil.IsPodReady(s[i]) != podutil.IsPodReady(s[j]) {
+ return !podutil.IsPodReady(s[i])
+ }
+ // TODO: take availability into account when we push minReadySeconds information from deployment into pods,
+ // see https://github.com/kubernetes/kubernetes/issues/22065
+ // 4. Been ready for empty time < less time < more time
+ // If both pods are ready, the latest ready one is smaller
+ if podutil.IsPodReady(s[i]) && podutil.IsPodReady(s[j]) && !podReadyTime(s[i]).Equal(podReadyTime(s[j])) {
+ return afterOrZero(podReadyTime(s[i]), podReadyTime(s[j]))
+ }
+ // 5. Pods with containers with higher restart counts < lower restart counts
+ if maxContainerRestarts(s[i]) != maxContainerRestarts(s[j]) {
+ return maxContainerRestarts(s[i]) > maxContainerRestarts(s[j])
+ }
+ // 6. Empty creation time pods < newer pods < older pods
+ if !s[i].CreationTimestamp.Equal(s[j].CreationTimestamp) {
+ return afterOrZero(s[i].CreationTimestamp, s[j].CreationTimestamp)
+ }
+ return false
+}
+
+// afterOrZero checks if time t1 is after time t2; if one of them
+// is zero, the zero time is seen as after non-zero time.
+func afterOrZero(t1, t2 metav1.Time) bool {
+ if t1.Time.IsZero() || t2.Time.IsZero() {
+ return t1.Time.IsZero()
+ }
+ return t1.After(t2.Time)
+}
+
+func podReadyTime(pod *v1.Pod) metav1.Time {
+ if podutil.IsPodReady(pod) {
+ for _, c := range pod.Status.Conditions {
+ // we only care about pod ready conditions
+ if c.Type == v1.PodReady && c.Status == v1.ConditionTrue {
+ return c.LastTransitionTime
+ }
+ }
+ }
+ return metav1.Time{}
+}
+
+func maxContainerRestarts(pod *v1.Pod) int {
+ maxRestarts := 0
+ for _, c := range pod.Status.ContainerStatuses {
+ maxRestarts = integer.IntMax(maxRestarts, int(c.RestartCount))
+ }
+ return maxRestarts
+}
+
+// FilterActivePods returns pods that have not terminated.
+func FilterActivePods(pods []*v1.Pod) []*v1.Pod {
+ var result []*v1.Pod
+ for _, p := range pods {
+ if IsPodActive(p) {
+ result = append(result, p)
+ } else {
+ glog.V(4).Infof("Ignoring inactive pod %v/%v in state %v, deletion time %v",
+ p.Namespace, p.Name, p.Status.Phase, p.DeletionTimestamp)
+ }
+ }
+ return result
+}
+
+func IsPodActive(p *v1.Pod) bool {
+ return v1.PodSucceeded != p.Status.Phase &&
+ v1.PodFailed != p.Status.Phase &&
+ p.DeletionTimestamp == nil
+}
+
+// FilterActiveReplicaSets returns replica sets that have (or at least ought to have) pods.
+func FilterActiveReplicaSets(replicaSets []*extensions.ReplicaSet) []*extensions.ReplicaSet {
+ activeFilter := func(rs *extensions.ReplicaSet) bool {
+ return rs != nil && *(rs.Spec.Replicas) > 0
+ }
+ return FilterReplicaSets(replicaSets, activeFilter)
+}
+
+type filterRS func(rs *extensions.ReplicaSet) bool
+
+// FilterReplicaSets returns replica sets that are filtered by filterFn (all returned ones should match filterFn).
+func FilterReplicaSets(RSes []*extensions.ReplicaSet, filterFn filterRS) []*extensions.ReplicaSet {
+ var filtered []*extensions.ReplicaSet
+ for i := range RSes {
+ if filterFn(RSes[i]) {
+ filtered = append(filtered, RSes[i])
+ }
+ }
+ return filtered
+}
+
+// PodKey returns a key unique to the given pod within a cluster.
+// It's used so we consistently use the same key scheme in this module.
+// It does exactly what cache.MetaNamespaceKeyFunc would have done
+// except there's not possibility for error since we know the exact type.
+func PodKey(pod *v1.Pod) string {
+ return fmt.Sprintf("%v/%v", pod.Namespace, pod.Name)
+}
+
+// ControllersByCreationTimestamp sorts a list of ReplicationControllers by creation timestamp, using their names as a tie breaker.
+type ControllersByCreationTimestamp []*v1.ReplicationController
+
+func (o ControllersByCreationTimestamp) Len() int { return len(o) }
+func (o ControllersByCreationTimestamp) Swap(i, j int) { o[i], o[j] = o[j], o[i] }
+func (o ControllersByCreationTimestamp) Less(i, j int) bool {
+ if o[i].CreationTimestamp.Equal(o[j].CreationTimestamp) {
+ return o[i].Name < o[j].Name
+ }
+ return o[i].CreationTimestamp.Before(o[j].CreationTimestamp)
+}
+
+// ReplicaSetsByCreationTimestamp sorts a list of ReplicaSet by creation timestamp, using their names as a tie breaker.
+type ReplicaSetsByCreationTimestamp []*extensions.ReplicaSet
+
+func (o ReplicaSetsByCreationTimestamp) Len() int { return len(o) }
+func (o ReplicaSetsByCreationTimestamp) Swap(i, j int) { o[i], o[j] = o[j], o[i] }
+func (o ReplicaSetsByCreationTimestamp) Less(i, j int) bool {
+ if o[i].CreationTimestamp.Equal(o[j].CreationTimestamp) {
+ return o[i].Name < o[j].Name
+ }
+ return o[i].CreationTimestamp.Before(o[j].CreationTimestamp)
+}
+
+// ReplicaSetsBySizeOlder sorts a list of ReplicaSet by size in descending order, using their creation timestamp or name as a tie breaker.
+// By using the creation timestamp, this sorts from old to new replica sets.
+type ReplicaSetsBySizeOlder []*extensions.ReplicaSet
+
+func (o ReplicaSetsBySizeOlder) Len() int { return len(o) }
+func (o ReplicaSetsBySizeOlder) Swap(i, j int) { o[i], o[j] = o[j], o[i] }
+func (o ReplicaSetsBySizeOlder) Less(i, j int) bool {
+ if *(o[i].Spec.Replicas) == *(o[j].Spec.Replicas) {
+ return ReplicaSetsByCreationTimestamp(o).Less(i, j)
+ }
+ return *(o[i].Spec.Replicas) > *(o[j].Spec.Replicas)
+}
+
+// ReplicaSetsBySizeNewer sorts a list of ReplicaSet by size in descending order, using their creation timestamp or name as a tie breaker.
+// By using the creation timestamp, this sorts from new to old replica sets.
+type ReplicaSetsBySizeNewer []*extensions.ReplicaSet
+
+func (o ReplicaSetsBySizeNewer) Len() int { return len(o) }
+func (o ReplicaSetsBySizeNewer) Swap(i, j int) { o[i], o[j] = o[j], o[i] }
+func (o ReplicaSetsBySizeNewer) Less(i, j int) bool {
+ if *(o[i].Spec.Replicas) == *(o[j].Spec.Replicas) {
+ return ReplicaSetsByCreationTimestamp(o).Less(j, i)
+ }
+ return *(o[i].Spec.Replicas) > *(o[j].Spec.Replicas)
+}
+
+func AddOrUpdateTaintOnNode(c clientset.Interface, nodeName string, taint *v1.Taint) error {
+ firstTry := true
+ return clientretry.RetryOnConflict(UpdateTaintBackoff, func() error {
+ var err error
+ var oldNode *v1.Node
+ // First we try getting node from the API server cache, as it's cheaper. If it fails
+ // we get it from etcd to be sure to have fresh data.
+ if firstTry {
+ oldNode, err = c.Core().Nodes().Get(nodeName, metav1.GetOptions{ResourceVersion: "0"})
+ firstTry = false
+ } else {
+ oldNode, err = c.Core().Nodes().Get(nodeName, metav1.GetOptions{})
+ }
+ if err != nil {
+ return err
+ }
+ newNode, ok, err := v1helper.AddOrUpdateTaint(oldNode, taint)
+ if err != nil {
+ return fmt.Errorf("Failed to update taint annotation!")
+ }
+ if !ok {
+ return nil
+ }
+ return PatchNodeTaints(c, nodeName, oldNode, newNode)
+ })
+}
+
+// RemoveTaintOffNode is for cleaning up taints temporarily added to node,
+// won't fail if target taint doesn't exist or has been removed.
+// If passed a node it'll check if there's anything to be done, if taint is not present it won't issue
+// any API calls.
+func RemoveTaintOffNode(c clientset.Interface, nodeName string, taint *v1.Taint, node *v1.Node) error {
+ // Short circuit for limiting amount of API calls.
+ if node != nil {
+ match := false
+ for i := range node.Spec.Taints {
+ if node.Spec.Taints[i].MatchTaint(taint) {
+ match = true
+ break
+ }
+ }
+ if !match {
+ return nil
+ }
+ }
+ firstTry := true
+ return clientretry.RetryOnConflict(UpdateTaintBackoff, func() error {
+ var err error
+ var oldNode *v1.Node
+ // First we try getting node from the API server cache, as it's cheaper. If it fails
+ // we get it from etcd to be sure to have fresh data.
+ if firstTry {
+ oldNode, err = c.Core().Nodes().Get(nodeName, metav1.GetOptions{ResourceVersion: "0"})
+ firstTry = false
+ } else {
+ oldNode, err = c.Core().Nodes().Get(nodeName, metav1.GetOptions{})
+ }
+ if err != nil {
+ return err
+ }
+ newNode, ok, err := v1helper.RemoveTaint(oldNode, taint)
+ if err != nil {
+ return fmt.Errorf("Failed to update taint annotation!")
+ }
+ if !ok {
+ return nil
+ }
+ return PatchNodeTaints(c, nodeName, oldNode, newNode)
+ })
+}
+
+// PatchNodeTaints patches node's taints.
+func PatchNodeTaints(c clientset.Interface, nodeName string, oldNode *v1.Node, newNode *v1.Node) error {
+ oldData, err := json.Marshal(oldNode)
+ if err != nil {
+ return fmt.Errorf("failed to marshal old node %#v for node %q: %v", oldNode, nodeName, err)
+ }
+
+ newTaints := newNode.Spec.Taints
+ objCopy, err := api.Scheme.DeepCopy(oldNode)
+ if err != nil {
+ return fmt.Errorf("failed to copy node object %#v: %v", oldNode, err)
+ }
+ newNode, ok := (objCopy).(*v1.Node)
+ if !ok {
+ return fmt.Errorf("failed to cast copy onto node object %#v: %v", newNode, err)
+ }
+ newNode.Spec.Taints = newTaints
+ newData, err := json.Marshal(newNode)
+ if err != nil {
+ return fmt.Errorf("failed to marshal new node %#v for node %q: %v", newNode, nodeName, err)
+ }
+
+ patchBytes, err := strategicpatch.CreateTwoWayMergePatch(oldData, newData, v1.Node{})
+ if err != nil {
+ return fmt.Errorf("failed to create patch for node %q: %v", nodeName, err)
+ }
+
+ _, err = c.Core().Nodes().Patch(string(nodeName), types.StrategicMergePatchType, patchBytes)
+ return err
+}
+
+// WaitForCacheSync is a wrapper around cache.WaitForCacheSync that generates log messages
+// indicating that the controller identified by controllerName is waiting for syncs, followed by
+// either a successful or failed sync.
+func WaitForCacheSync(controllerName string, stopCh <-chan struct{}, cacheSyncs ...cache.InformerSynced) bool {
+ glog.Infof("Waiting for caches to sync for %s controller", controllerName)
+
+ if !cache.WaitForCacheSync(stopCh, cacheSyncs...) {
+ utilruntime.HandleError(fmt.Errorf("Unable to sync caches for %s controller", controllerName))
+ return false
+ }
+
+ glog.Infof("Caches are synced for %s controller", controllerName)
+ return true
+}
+
+// ComputeHash returns a hash value calculated from pod template and a collisionCount to avoid hash collision
+func ComputeHash(template *v1.PodTemplateSpec, collisionCount *int64) uint32 {
+ podTemplateSpecHasher := fnv.New32a()
+ hashutil.DeepHashObject(podTemplateSpecHasher, *template)
+
+ // Add collisionCount in the hash if it exists.
+ if collisionCount != nil {
+ collisionCountBytes := make([]byte, 8)
+ binary.LittleEndian.PutUint64(collisionCountBytes, uint64(*collisionCount))
+ podTemplateSpecHasher.Write(collisionCountBytes)
+ }
+
+ return podTemplateSpecHasher.Sum32()
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/controller/doc.go b/vendor/k8s.io/kubernetes/pkg/controller/doc.go
new file mode 100644
index 000000000..3c5c943da
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/controller/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package controller contains code for controllers (like the replication
+// controller).
+package controller // import "k8s.io/kubernetes/pkg/controller"
diff --git a/vendor/k8s.io/kubernetes/pkg/controller/lookup_cache.go b/vendor/k8s.io/kubernetes/pkg/controller/lookup_cache.go
new file mode 100644
index 000000000..160aa6e08
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/controller/lookup_cache.go
@@ -0,0 +1,92 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package controller
+
+import (
+ "hash/fnv"
+ "sync"
+
+ "github.com/golang/groupcache/lru"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ hashutil "k8s.io/kubernetes/pkg/util/hash"
+)
+
+type objectWithMeta interface {
+ metav1.Object
+}
+
+// keyFunc returns the key of an object, which is used to look up in the cache for it's matching object.
+// Since we match objects by namespace and Labels/Selector, so if two objects have the same namespace and labels,
+// they will have the same key.
+func keyFunc(obj objectWithMeta) uint64 {
+ hash := fnv.New32a()
+ hashutil.DeepHashObject(hash, &equivalenceLabelObj{
+ namespace: obj.GetNamespace(),
+ labels: obj.GetLabels(),
+ })
+ return uint64(hash.Sum32())
+}
+
+type equivalenceLabelObj struct {
+ namespace string
+ labels map[string]string
+}
+
+// MatchingCache save label and selector matching relationship
+type MatchingCache struct {
+ mutex sync.RWMutex
+ cache *lru.Cache
+}
+
+// NewMatchingCache return a NewMatchingCache, which save label and selector matching relationship.
+func NewMatchingCache(maxCacheEntries int) *MatchingCache {
+ return &MatchingCache{
+ cache: lru.New(maxCacheEntries),
+ }
+}
+
+// Add will add matching information to the cache.
+func (c *MatchingCache) Add(labelObj objectWithMeta, selectorObj objectWithMeta) {
+ key := keyFunc(labelObj)
+ c.mutex.Lock()
+ defer c.mutex.Unlock()
+ c.cache.Add(key, selectorObj)
+}
+
+// GetMatchingObject lookup the matching object for a given object.
+// Note: the cache information may be invalid since the controller may be deleted or updated,
+// we need check in the external request to ensure the cache data is not dirty.
+func (c *MatchingCache) GetMatchingObject(labelObj objectWithMeta) (controller interface{}, exists bool) {
+ key := keyFunc(labelObj)
+ // NOTE: we use Lock() instead of RLock() here because lru's Get() method also modifies state(
+ // it need update the least recently usage information). So we can not call it concurrently.
+ c.mutex.Lock()
+ defer c.mutex.Unlock()
+ return c.cache.Get(key)
+}
+
+// Update update the cached matching information.
+func (c *MatchingCache) Update(labelObj objectWithMeta, selectorObj objectWithMeta) {
+ c.Add(labelObj, selectorObj)
+}
+
+// InvalidateAll invalidate the whole cache.
+func (c *MatchingCache) InvalidateAll() {
+ c.mutex.Lock()
+ defer c.mutex.Unlock()
+ c.cache = lru.New(c.cache.MaxEntries)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/features/kube_features.go b/vendor/k8s.io/kubernetes/pkg/features/kube_features.go
new file mode 100644
index 000000000..7920d4bc5
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/features/kube_features.go
@@ -0,0 +1,146 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package features
+
+import (
+ genericfeatures "k8s.io/apiserver/pkg/features"
+ utilfeature "k8s.io/apiserver/pkg/util/feature"
+)
+
+const (
+ // Every feature gate should add method here following this template:
+ //
+ // // owner: @username
+ // // alpha: v1.X
+ // MyFeature utilfeature.Feature = "MyFeature"
+
+ // owner: @timstclair
+ // beta: v1.4
+ AppArmor utilfeature.Feature = "AppArmor"
+
+ // owner: @girishkalele
+ // alpha: v1.4
+ ExternalTrafficLocalOnly utilfeature.Feature = "AllowExtTrafficLocalEndpoints"
+
+ // owner: @saad-ali
+ // alpha: v1.3
+ DynamicVolumeProvisioning utilfeature.Feature = "DynamicVolumeProvisioning"
+
+ // owner: @mtaufen
+ // alpha: v1.4
+ DynamicKubeletConfig utilfeature.Feature = "DynamicKubeletConfig"
+
+ // owner: timstclair
+ // alpha: v1.5
+ //
+ // StreamingProxyRedirects controls whether the apiserver should intercept (and follow)
+ // redirects from the backend (Kubelet) for streaming requests (exec/attach/port-forward).
+ StreamingProxyRedirects utilfeature.Feature = genericfeatures.StreamingProxyRedirects
+
+ // owner: @pweil-
+ // alpha: v1.5
+ //
+ // Default userns=host for containers that are using other host namespaces, host mounts, the pod
+ // contains a privileged container, or specific non-namespaced capabilities (MKNOD, SYS_MODULE,
+ // SYS_TIME). This should only be enabled if user namespace remapping is enabled in the docker daemon.
+ ExperimentalHostUserNamespaceDefaultingGate utilfeature.Feature = "ExperimentalHostUserNamespaceDefaulting"
+
+ // owner: @vishh
+ // alpha: v1.5
+ //
+ // Ensures guaranteed scheduling of pods marked with a special pod annotation `scheduler.alpha.kubernetes.io/critical-pod`
+ // and also prevents them from being evicted from a node.
+ // Note: This feature is not supported for `BestEffort` pods.
+ ExperimentalCriticalPodAnnotation utilfeature.Feature = "ExperimentalCriticalPodAnnotation"
+
+ // owner: @davidopp
+ // alpha: v1.6
+ //
+ // Determines if affinity defined in annotations should be processed
+ // TODO: remove when alpha support for affinity is removed
+ AffinityInAnnotations utilfeature.Feature = "AffinityInAnnotations"
+
+ // owner: @vishh
+ // alpha: v1.6
+ //
+ // Enables support for GPUs as a schedulable resource.
+ // Only Nvidia GPUs are supported as of v1.6.
+ // Works only with Docker Container Runtime.
+ Accelerators utilfeature.Feature = "Accelerators"
+
+ // owner: @gmarek
+ // alpha: v1.6
+ //
+ // Changes the logic behind evicting Pods from not ready Nodes
+ // to take advantage of NoExecute Taints and Tolerations.
+ TaintBasedEvictions utilfeature.Feature = "TaintBasedEvictions"
+
+ // owner: @jcbsmpsn
+ // alpha: v1.7
+ //
+ // Gets a server certificate for the kubelet from the Certificate Signing
+ // Request API instead of generating one self signed and auto rotates the
+ // certificate as expiration approaches.
+ RotateKubeletServerCertificate utilfeature.Feature = "RotateKubeletServerCertificate"
+
+ // owner: @jcbsmpsn
+ // alpha: v1.7
+ //
+ // Automatically renews the client certificate used for communicating with
+ // the API server as the certificate approaches expiration.
+ RotateKubeletClientCertificate utilfeature.Feature = "RotateKubeletClientCertificate"
+
+ // owner: @msau
+ // alpha: v1.7
+ //
+ // A new volume type that supports local disks on a node.
+ PersistentLocalVolumes utilfeature.Feature = "PersistentLocalVolumes"
+
+ // owner: @jinxu
+ // alpha: v1.7
+ //
+ // New local storage types to support local storage capacity isolation
+ LocalStorageCapacityIsolation utilfeature.Feature = "LocalStorageCapacityIsolation"
+)
+
+func init() {
+ utilfeature.DefaultFeatureGate.Add(defaultKubernetesFeatureGates)
+}
+
+// defaultKubernetesFeatureGates consists of all known Kubernetes-specific feature keys.
+// To add a new feature, define a key for it above and add it here. The features will be
+// available throughout Kubernetes binaries.
+var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureSpec{
+ ExternalTrafficLocalOnly: {Default: true, PreRelease: utilfeature.GA},
+ AppArmor: {Default: true, PreRelease: utilfeature.Beta},
+ DynamicKubeletConfig: {Default: false, PreRelease: utilfeature.Alpha},
+ DynamicVolumeProvisioning: {Default: true, PreRelease: utilfeature.Alpha},
+ ExperimentalHostUserNamespaceDefaultingGate: {Default: false, PreRelease: utilfeature.Beta},
+ ExperimentalCriticalPodAnnotation: {Default: false, PreRelease: utilfeature.Alpha},
+ AffinityInAnnotations: {Default: false, PreRelease: utilfeature.Alpha},
+ Accelerators: {Default: false, PreRelease: utilfeature.Alpha},
+ TaintBasedEvictions: {Default: false, PreRelease: utilfeature.Alpha},
+ RotateKubeletServerCertificate: {Default: false, PreRelease: utilfeature.Alpha},
+ RotateKubeletClientCertificate: {Default: false, PreRelease: utilfeature.Alpha},
+ PersistentLocalVolumes: {Default: false, PreRelease: utilfeature.Alpha},
+ LocalStorageCapacityIsolation: {Default: false, PreRelease: utilfeature.Alpha},
+
+ // inherited features from generic apiserver, relisted here to get a conflict if it is changed
+ // unintentionally on either side:
+ StreamingProxyRedirects: {Default: true, PreRelease: utilfeature.Beta},
+ genericfeatures.AdvancedAuditing: {Default: false, PreRelease: utilfeature.Alpha},
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime/api.pb.go b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime/api.pb.go
new file mode 100644
index 000000000..8377cd33b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime/api.pb.go
@@ -0,0 +1,24201 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by protoc-gen-gogo.
+// source: api.proto
+// DO NOT EDIT!
+
+/*
+ Package runtime is a generated protocol buffer package.
+
+ It is generated from these files:
+ api.proto
+
+ It has these top-level messages:
+ VersionRequest
+ VersionResponse
+ DNSConfig
+ PortMapping
+ Mount
+ NamespaceOption
+ Int64Value
+ LinuxSandboxSecurityContext
+ LinuxPodSandboxConfig
+ PodSandboxMetadata
+ PodSandboxConfig
+ RunPodSandboxRequest
+ RunPodSandboxResponse
+ StopPodSandboxRequest
+ StopPodSandboxResponse
+ RemovePodSandboxRequest
+ RemovePodSandboxResponse
+ PodSandboxStatusRequest
+ PodSandboxNetworkStatus
+ Namespace
+ LinuxPodSandboxStatus
+ PodSandboxStatus
+ PodSandboxStatusResponse
+ PodSandboxStateValue
+ PodSandboxFilter
+ ListPodSandboxRequest
+ PodSandbox
+ ListPodSandboxResponse
+ ImageSpec
+ KeyValue
+ LinuxContainerResources
+ SELinuxOption
+ Capability
+ LinuxContainerSecurityContext
+ LinuxContainerConfig
+ ContainerMetadata
+ Device
+ ContainerConfig
+ CreateContainerRequest
+ CreateContainerResponse
+ StartContainerRequest
+ StartContainerResponse
+ StopContainerRequest
+ StopContainerResponse
+ RemoveContainerRequest
+ RemoveContainerResponse
+ ContainerStateValue
+ ContainerFilter
+ ListContainersRequest
+ Container
+ ListContainersResponse
+ ContainerStatusRequest
+ ContainerStatus
+ ContainerStatusResponse
+ ExecSyncRequest
+ ExecSyncResponse
+ ExecRequest
+ ExecResponse
+ AttachRequest
+ AttachResponse
+ PortForwardRequest
+ PortForwardResponse
+ ImageFilter
+ ListImagesRequest
+ Image
+ ListImagesResponse
+ ImageStatusRequest
+ ImageStatusResponse
+ AuthConfig
+ PullImageRequest
+ PullImageResponse
+ RemoveImageRequest
+ RemoveImageResponse
+ NetworkConfig
+ RuntimeConfig
+ UpdateRuntimeConfigRequest
+ UpdateRuntimeConfigResponse
+ RuntimeCondition
+ RuntimeStatus
+ StatusRequest
+ StatusResponse
+ ImageFsInfoRequest
+ UInt64Value
+ StorageIdentifier
+ FilesystemUsage
+ ImageFsInfoResponse
+ ContainerStatsRequest
+ ContainerStatsResponse
+ ListContainerStatsRequest
+ ContainerStatsFilter
+ ListContainerStatsResponse
+ ContainerAttributes
+ ContainerStats
+ CpuUsage
+ MemoryUsage
+*/
+package runtime
+
+import proto "github.com/gogo/protobuf/proto"
+import fmt "fmt"
+import math "math"
+import _ "github.com/gogo/protobuf/gogoproto"
+
+import (
+ context "golang.org/x/net/context"
+ grpc "google.golang.org/grpc"
+)
+
+import strings "strings"
+import reflect "reflect"
+import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+
+import io "io"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+type Protocol int32
+
+const (
+ Protocol_TCP Protocol = 0
+ Protocol_UDP Protocol = 1
+)
+
+var Protocol_name = map[int32]string{
+ 0: "TCP",
+ 1: "UDP",
+}
+var Protocol_value = map[string]int32{
+ "TCP": 0,
+ "UDP": 1,
+}
+
+func (x Protocol) String() string {
+ return proto.EnumName(Protocol_name, int32(x))
+}
+func (Protocol) EnumDescriptor() ([]byte, []int) { return fileDescriptorApi, []int{0} }
+
+type PodSandboxState int32
+
+const (
+ PodSandboxState_SANDBOX_READY PodSandboxState = 0
+ PodSandboxState_SANDBOX_NOTREADY PodSandboxState = 1
+)
+
+var PodSandboxState_name = map[int32]string{
+ 0: "SANDBOX_READY",
+ 1: "SANDBOX_NOTREADY",
+}
+var PodSandboxState_value = map[string]int32{
+ "SANDBOX_READY": 0,
+ "SANDBOX_NOTREADY": 1,
+}
+
+func (x PodSandboxState) String() string {
+ return proto.EnumName(PodSandboxState_name, int32(x))
+}
+func (PodSandboxState) EnumDescriptor() ([]byte, []int) { return fileDescriptorApi, []int{1} }
+
+type ContainerState int32
+
+const (
+ ContainerState_CONTAINER_CREATED ContainerState = 0
+ ContainerState_CONTAINER_RUNNING ContainerState = 1
+ ContainerState_CONTAINER_EXITED ContainerState = 2
+ ContainerState_CONTAINER_UNKNOWN ContainerState = 3
+)
+
+var ContainerState_name = map[int32]string{
+ 0: "CONTAINER_CREATED",
+ 1: "CONTAINER_RUNNING",
+ 2: "CONTAINER_EXITED",
+ 3: "CONTAINER_UNKNOWN",
+}
+var ContainerState_value = map[string]int32{
+ "CONTAINER_CREATED": 0,
+ "CONTAINER_RUNNING": 1,
+ "CONTAINER_EXITED": 2,
+ "CONTAINER_UNKNOWN": 3,
+}
+
+func (x ContainerState) String() string {
+ return proto.EnumName(ContainerState_name, int32(x))
+}
+func (ContainerState) EnumDescriptor() ([]byte, []int) { return fileDescriptorApi, []int{2} }
+
+type VersionRequest struct {
+ // Version of the kubelet runtime API.
+ Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
+}
+
+func (m *VersionRequest) Reset() { *m = VersionRequest{} }
+func (*VersionRequest) ProtoMessage() {}
+func (*VersionRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{0} }
+
+func (m *VersionRequest) GetVersion() string {
+ if m != nil {
+ return m.Version
+ }
+ return ""
+}
+
+type VersionResponse struct {
+ // Version of the kubelet runtime API.
+ Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
+ // Name of the container runtime.
+ RuntimeName string `protobuf:"bytes,2,opt,name=runtime_name,json=runtimeName,proto3" json:"runtime_name,omitempty"`
+ // Version of the container runtime. The string must be
+ // semver-compatible.
+ RuntimeVersion string `protobuf:"bytes,3,opt,name=runtime_version,json=runtimeVersion,proto3" json:"runtime_version,omitempty"`
+ // API version of the container runtime. The string must be
+ // semver-compatible.
+ RuntimeApiVersion string `protobuf:"bytes,4,opt,name=runtime_api_version,json=runtimeApiVersion,proto3" json:"runtime_api_version,omitempty"`
+}
+
+func (m *VersionResponse) Reset() { *m = VersionResponse{} }
+func (*VersionResponse) ProtoMessage() {}
+func (*VersionResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{1} }
+
+func (m *VersionResponse) GetVersion() string {
+ if m != nil {
+ return m.Version
+ }
+ return ""
+}
+
+func (m *VersionResponse) GetRuntimeName() string {
+ if m != nil {
+ return m.RuntimeName
+ }
+ return ""
+}
+
+func (m *VersionResponse) GetRuntimeVersion() string {
+ if m != nil {
+ return m.RuntimeVersion
+ }
+ return ""
+}
+
+func (m *VersionResponse) GetRuntimeApiVersion() string {
+ if m != nil {
+ return m.RuntimeApiVersion
+ }
+ return ""
+}
+
+// DNSConfig specifies the DNS servers and search domains of a sandbox.
+type DNSConfig struct {
+ // List of DNS servers of the cluster.
+ Servers []string `protobuf:"bytes,1,rep,name=servers" json:"servers,omitempty"`
+ // List of DNS search domains of the cluster.
+ Searches []string `protobuf:"bytes,2,rep,name=searches" json:"searches,omitempty"`
+ // List of DNS options. See https://linux.die.net/man/5/resolv.conf
+ // for all available options.
+ Options []string `protobuf:"bytes,3,rep,name=options" json:"options,omitempty"`
+}
+
+func (m *DNSConfig) Reset() { *m = DNSConfig{} }
+func (*DNSConfig) ProtoMessage() {}
+func (*DNSConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{2} }
+
+func (m *DNSConfig) GetServers() []string {
+ if m != nil {
+ return m.Servers
+ }
+ return nil
+}
+
+func (m *DNSConfig) GetSearches() []string {
+ if m != nil {
+ return m.Searches
+ }
+ return nil
+}
+
+func (m *DNSConfig) GetOptions() []string {
+ if m != nil {
+ return m.Options
+ }
+ return nil
+}
+
+// PortMapping specifies the port mapping configurations of a sandbox.
+type PortMapping struct {
+ // Protocol of the port mapping.
+ Protocol Protocol `protobuf:"varint,1,opt,name=protocol,proto3,enum=runtime.Protocol" json:"protocol,omitempty"`
+ // Port number within the container. Default: 0 (not specified).
+ ContainerPort int32 `protobuf:"varint,2,opt,name=container_port,json=containerPort,proto3" json:"container_port,omitempty"`
+ // Port number on the host. Default: 0 (not specified).
+ HostPort int32 `protobuf:"varint,3,opt,name=host_port,json=hostPort,proto3" json:"host_port,omitempty"`
+ // Host IP.
+ HostIp string `protobuf:"bytes,4,opt,name=host_ip,json=hostIp,proto3" json:"host_ip,omitempty"`
+}
+
+func (m *PortMapping) Reset() { *m = PortMapping{} }
+func (*PortMapping) ProtoMessage() {}
+func (*PortMapping) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{3} }
+
+func (m *PortMapping) GetProtocol() Protocol {
+ if m != nil {
+ return m.Protocol
+ }
+ return Protocol_TCP
+}
+
+func (m *PortMapping) GetContainerPort() int32 {
+ if m != nil {
+ return m.ContainerPort
+ }
+ return 0
+}
+
+func (m *PortMapping) GetHostPort() int32 {
+ if m != nil {
+ return m.HostPort
+ }
+ return 0
+}
+
+func (m *PortMapping) GetHostIp() string {
+ if m != nil {
+ return m.HostIp
+ }
+ return ""
+}
+
+// Mount specifies a host volume to mount into a container.
+type Mount struct {
+ // Path of the mount within the container.
+ ContainerPath string `protobuf:"bytes,1,opt,name=container_path,json=containerPath,proto3" json:"container_path,omitempty"`
+ // Path of the mount on the host.
+ HostPath string `protobuf:"bytes,2,opt,name=host_path,json=hostPath,proto3" json:"host_path,omitempty"`
+ // If set, the mount is read-only.
+ Readonly bool `protobuf:"varint,3,opt,name=readonly,proto3" json:"readonly,omitempty"`
+ // If set, the mount needs SELinux relabeling.
+ SelinuxRelabel bool `protobuf:"varint,4,opt,name=selinux_relabel,json=selinuxRelabel,proto3" json:"selinux_relabel,omitempty"`
+}
+
+func (m *Mount) Reset() { *m = Mount{} }
+func (*Mount) ProtoMessage() {}
+func (*Mount) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{4} }
+
+func (m *Mount) GetContainerPath() string {
+ if m != nil {
+ return m.ContainerPath
+ }
+ return ""
+}
+
+func (m *Mount) GetHostPath() string {
+ if m != nil {
+ return m.HostPath
+ }
+ return ""
+}
+
+func (m *Mount) GetReadonly() bool {
+ if m != nil {
+ return m.Readonly
+ }
+ return false
+}
+
+func (m *Mount) GetSelinuxRelabel() bool {
+ if m != nil {
+ return m.SelinuxRelabel
+ }
+ return false
+}
+
+// NamespaceOption provides options for Linux namespaces.
+type NamespaceOption struct {
+ // If set, use the host's network namespace.
+ HostNetwork bool `protobuf:"varint,1,opt,name=host_network,json=hostNetwork,proto3" json:"host_network,omitempty"`
+ // If set, use the host's PID namespace.
+ HostPid bool `protobuf:"varint,2,opt,name=host_pid,json=hostPid,proto3" json:"host_pid,omitempty"`
+ // If set, use the host's IPC namespace.
+ HostIpc bool `protobuf:"varint,3,opt,name=host_ipc,json=hostIpc,proto3" json:"host_ipc,omitempty"`
+}
+
+func (m *NamespaceOption) Reset() { *m = NamespaceOption{} }
+func (*NamespaceOption) ProtoMessage() {}
+func (*NamespaceOption) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{5} }
+
+func (m *NamespaceOption) GetHostNetwork() bool {
+ if m != nil {
+ return m.HostNetwork
+ }
+ return false
+}
+
+func (m *NamespaceOption) GetHostPid() bool {
+ if m != nil {
+ return m.HostPid
+ }
+ return false
+}
+
+func (m *NamespaceOption) GetHostIpc() bool {
+ if m != nil {
+ return m.HostIpc
+ }
+ return false
+}
+
+// Int64Value is the wrapper of int64.
+type Int64Value struct {
+ // The value.
+ Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
+}
+
+func (m *Int64Value) Reset() { *m = Int64Value{} }
+func (*Int64Value) ProtoMessage() {}
+func (*Int64Value) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{6} }
+
+func (m *Int64Value) GetValue() int64 {
+ if m != nil {
+ return m.Value
+ }
+ return 0
+}
+
+// LinuxSandboxSecurityContext holds linux security configuration that will be
+// applied to a sandbox. Note that:
+// 1) It does not apply to containers in the pods.
+// 2) It may not be applicable to a PodSandbox which does not contain any running
+// process.
+type LinuxSandboxSecurityContext struct {
+ // Configurations for the sandbox's namespaces.
+ // This will be used only if the PodSandbox uses namespace for isolation.
+ NamespaceOptions *NamespaceOption `protobuf:"bytes,1,opt,name=namespace_options,json=namespaceOptions" json:"namespace_options,omitempty"`
+ // Optional SELinux context to be applied.
+ SelinuxOptions *SELinuxOption `protobuf:"bytes,2,opt,name=selinux_options,json=selinuxOptions" json:"selinux_options,omitempty"`
+ // UID to run sandbox processes as, when applicable.
+ RunAsUser *Int64Value `protobuf:"bytes,3,opt,name=run_as_user,json=runAsUser" json:"run_as_user,omitempty"`
+ // If set, the root filesystem of the sandbox is read-only.
+ ReadonlyRootfs bool `protobuf:"varint,4,opt,name=readonly_rootfs,json=readonlyRootfs,proto3" json:"readonly_rootfs,omitempty"`
+ // List of groups applied to the first process run in the sandbox, in
+ // addition to the sandbox's primary GID.
+ SupplementalGroups []int64 `protobuf:"varint,5,rep,packed,name=supplemental_groups,json=supplementalGroups" json:"supplemental_groups,omitempty"`
+ // Indicates whether the sandbox will be asked to run a privileged
+ // container. If a privileged container is to be executed within it, this
+ // MUST be true.
+ // This allows a sandbox to take additional security precautions if no
+ // privileged containers are expected to be run.
+ Privileged bool `protobuf:"varint,6,opt,name=privileged,proto3" json:"privileged,omitempty"`
+}
+
+func (m *LinuxSandboxSecurityContext) Reset() { *m = LinuxSandboxSecurityContext{} }
+func (*LinuxSandboxSecurityContext) ProtoMessage() {}
+func (*LinuxSandboxSecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{7} }
+
+func (m *LinuxSandboxSecurityContext) GetNamespaceOptions() *NamespaceOption {
+ if m != nil {
+ return m.NamespaceOptions
+ }
+ return nil
+}
+
+func (m *LinuxSandboxSecurityContext) GetSelinuxOptions() *SELinuxOption {
+ if m != nil {
+ return m.SelinuxOptions
+ }
+ return nil
+}
+
+func (m *LinuxSandboxSecurityContext) GetRunAsUser() *Int64Value {
+ if m != nil {
+ return m.RunAsUser
+ }
+ return nil
+}
+
+func (m *LinuxSandboxSecurityContext) GetReadonlyRootfs() bool {
+ if m != nil {
+ return m.ReadonlyRootfs
+ }
+ return false
+}
+
+func (m *LinuxSandboxSecurityContext) GetSupplementalGroups() []int64 {
+ if m != nil {
+ return m.SupplementalGroups
+ }
+ return nil
+}
+
+func (m *LinuxSandboxSecurityContext) GetPrivileged() bool {
+ if m != nil {
+ return m.Privileged
+ }
+ return false
+}
+
+// LinuxPodSandboxConfig holds platform-specific configurations for Linux
+// host platforms and Linux-based containers.
+type LinuxPodSandboxConfig struct {
+ // Parent cgroup of the PodSandbox.
+ // The cgroupfs style syntax will be used, but the container runtime can
+ // convert it to systemd semantics if needed.
+ CgroupParent string `protobuf:"bytes,1,opt,name=cgroup_parent,json=cgroupParent,proto3" json:"cgroup_parent,omitempty"`
+ // LinuxSandboxSecurityContext holds sandbox security attributes.
+ SecurityContext *LinuxSandboxSecurityContext `protobuf:"bytes,2,opt,name=security_context,json=securityContext" json:"security_context,omitempty"`
+ // Sysctls holds linux sysctls config for the sandbox.
+ Sysctls map[string]string `protobuf:"bytes,3,rep,name=sysctls" json:"sysctls,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+}
+
+func (m *LinuxPodSandboxConfig) Reset() { *m = LinuxPodSandboxConfig{} }
+func (*LinuxPodSandboxConfig) ProtoMessage() {}
+func (*LinuxPodSandboxConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{8} }
+
+func (m *LinuxPodSandboxConfig) GetCgroupParent() string {
+ if m != nil {
+ return m.CgroupParent
+ }
+ return ""
+}
+
+func (m *LinuxPodSandboxConfig) GetSecurityContext() *LinuxSandboxSecurityContext {
+ if m != nil {
+ return m.SecurityContext
+ }
+ return nil
+}
+
+func (m *LinuxPodSandboxConfig) GetSysctls() map[string]string {
+ if m != nil {
+ return m.Sysctls
+ }
+ return nil
+}
+
+// PodSandboxMetadata holds all necessary information for building the sandbox name.
+// The container runtime is encouraged to expose the metadata associated with the
+// PodSandbox in its user interface for better user experience. For example,
+// the runtime can construct a unique PodSandboxName based on the metadata.
+type PodSandboxMetadata struct {
+ // Pod name of the sandbox. Same as the pod name in the PodSpec.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // Pod UID of the sandbox. Same as the pod UID in the PodSpec.
+ Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
+ // Pod namespace of the sandbox. Same as the pod namespace in the PodSpec.
+ Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"`
+ // Attempt number of creating the sandbox. Default: 0.
+ Attempt uint32 `protobuf:"varint,4,opt,name=attempt,proto3" json:"attempt,omitempty"`
+}
+
+func (m *PodSandboxMetadata) Reset() { *m = PodSandboxMetadata{} }
+func (*PodSandboxMetadata) ProtoMessage() {}
+func (*PodSandboxMetadata) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{9} }
+
+func (m *PodSandboxMetadata) GetName() string {
+ if m != nil {
+ return m.Name
+ }
+ return ""
+}
+
+func (m *PodSandboxMetadata) GetUid() string {
+ if m != nil {
+ return m.Uid
+ }
+ return ""
+}
+
+func (m *PodSandboxMetadata) GetNamespace() string {
+ if m != nil {
+ return m.Namespace
+ }
+ return ""
+}
+
+func (m *PodSandboxMetadata) GetAttempt() uint32 {
+ if m != nil {
+ return m.Attempt
+ }
+ return 0
+}
+
+// PodSandboxConfig holds all the required and optional fields for creating a
+// sandbox.
+type PodSandboxConfig struct {
+ // Metadata of the sandbox. This information will uniquely identify the
+ // sandbox, and the runtime should leverage this to ensure correct
+ // operation. The runtime may also use this information to improve UX, such
+ // as by constructing a readable name.
+ Metadata *PodSandboxMetadata `protobuf:"bytes,1,opt,name=metadata" json:"metadata,omitempty"`
+ // Hostname of the sandbox.
+ Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"`
+ // Path to the directory on the host in which container log files are
+ // stored.
+ // By default the log of a container going into the LogDirectory will be
+ // hooked up to STDOUT and STDERR. However, the LogDirectory may contain
+ // binary log files with structured logging data from the individual
+ // containers. For example, the files might be newline separated JSON
+ // structured logs, systemd-journald journal files, gRPC trace files, etc.
+ // E.g.,
+ // PodSandboxConfig.LogDirectory = `/var/log/pods/<podUID>/`
+ // ContainerConfig.LogPath = `containerName_Instance#.log`
+ //
+ // WARNING: Log management and how kubelet should interface with the
+ // container logs are under active discussion in
+ // https://issues.k8s.io/24677. There *may* be future change of direction
+ // for logging as the discussion carries on.
+ LogDirectory string `protobuf:"bytes,3,opt,name=log_directory,json=logDirectory,proto3" json:"log_directory,omitempty"`
+ // DNS config for the sandbox.
+ DnsConfig *DNSConfig `protobuf:"bytes,4,opt,name=dns_config,json=dnsConfig" json:"dns_config,omitempty"`
+ // Port mappings for the sandbox.
+ PortMappings []*PortMapping `protobuf:"bytes,5,rep,name=port_mappings,json=portMappings" json:"port_mappings,omitempty"`
+ // Key-value pairs that may be used to scope and select individual resources.
+ Labels map[string]string `protobuf:"bytes,6,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // Unstructured key-value map that may be set by the kubelet to store and
+ // retrieve arbitrary metadata. This will include any annotations set on a
+ // pod through the Kubernetes API.
+ //
+ // Annotations MUST NOT be altered by the runtime; the annotations stored
+ // here MUST be returned in the PodSandboxStatus associated with the pod
+ // this PodSandboxConfig creates.
+ //
+ // In general, in order to preserve a well-defined interface between the
+ // kubelet and the container runtime, annotations SHOULD NOT influence
+ // runtime behaviour. For legacy reasons, there are some annotations which
+ // currently explicitly break this rule, listed below; in future versions
+ // of the interface these will be promoted to typed features.
+ //
+ // Annotations can also be useful for runtime authors to experiment with
+ // new features that are opaque to the Kubernetes APIs (both user-facing
+ // and the CRI). Whenever possible, however, runtime authors SHOULD
+ // consider proposing new typed fields for any new features instead.
+ //
+ // 1. Seccomp
+ //
+ // key: security.alpha.kubernetes.io/seccomp/pod
+ // description: the seccomp profile for the containers of an entire pod.
+ // value: see below.
+ //
+ // key: security.alpha.kubernetes.io/seccomp/container/<container name>
+ // description: the seccomp profile for the container (overrides pod).
+ // value: see below
+ //
+ // The value of seccomp is runtime agnostic:
+ // * runtime/default: the default profile for the container runtime
+ // * unconfined: unconfined profile, ie, no seccomp sandboxing
+ // * localhost/<profile-name>: the profile installed to the node's
+ // local seccomp profile root. Note that profile root is set in
+ // kubelet, and it is not passed in CRI yet, see https://issues.k8s.io/36997.
+ //
+ Annotations map[string]string `protobuf:"bytes,7,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // Optional configurations specific to Linux hosts.
+ Linux *LinuxPodSandboxConfig `protobuf:"bytes,8,opt,name=linux" json:"linux,omitempty"`
+}
+
+func (m *PodSandboxConfig) Reset() { *m = PodSandboxConfig{} }
+func (*PodSandboxConfig) ProtoMessage() {}
+func (*PodSandboxConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{10} }
+
+func (m *PodSandboxConfig) GetMetadata() *PodSandboxMetadata {
+ if m != nil {
+ return m.Metadata
+ }
+ return nil
+}
+
+func (m *PodSandboxConfig) GetHostname() string {
+ if m != nil {
+ return m.Hostname
+ }
+ return ""
+}
+
+func (m *PodSandboxConfig) GetLogDirectory() string {
+ if m != nil {
+ return m.LogDirectory
+ }
+ return ""
+}
+
+func (m *PodSandboxConfig) GetDnsConfig() *DNSConfig {
+ if m != nil {
+ return m.DnsConfig
+ }
+ return nil
+}
+
+func (m *PodSandboxConfig) GetPortMappings() []*PortMapping {
+ if m != nil {
+ return m.PortMappings
+ }
+ return nil
+}
+
+func (m *PodSandboxConfig) GetLabels() map[string]string {
+ if m != nil {
+ return m.Labels
+ }
+ return nil
+}
+
+func (m *PodSandboxConfig) GetAnnotations() map[string]string {
+ if m != nil {
+ return m.Annotations
+ }
+ return nil
+}
+
+func (m *PodSandboxConfig) GetLinux() *LinuxPodSandboxConfig {
+ if m != nil {
+ return m.Linux
+ }
+ return nil
+}
+
+type RunPodSandboxRequest struct {
+ // Configuration for creating a PodSandbox.
+ Config *PodSandboxConfig `protobuf:"bytes,1,opt,name=config" json:"config,omitempty"`
+}
+
+func (m *RunPodSandboxRequest) Reset() { *m = RunPodSandboxRequest{} }
+func (*RunPodSandboxRequest) ProtoMessage() {}
+func (*RunPodSandboxRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{11} }
+
+func (m *RunPodSandboxRequest) GetConfig() *PodSandboxConfig {
+ if m != nil {
+ return m.Config
+ }
+ return nil
+}
+
+type RunPodSandboxResponse struct {
+ // ID of the PodSandbox to run.
+ PodSandboxId string `protobuf:"bytes,1,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"`
+}
+
+func (m *RunPodSandboxResponse) Reset() { *m = RunPodSandboxResponse{} }
+func (*RunPodSandboxResponse) ProtoMessage() {}
+func (*RunPodSandboxResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{12} }
+
+func (m *RunPodSandboxResponse) GetPodSandboxId() string {
+ if m != nil {
+ return m.PodSandboxId
+ }
+ return ""
+}
+
+type StopPodSandboxRequest struct {
+ // ID of the PodSandbox to stop.
+ PodSandboxId string `protobuf:"bytes,1,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"`
+}
+
+func (m *StopPodSandboxRequest) Reset() { *m = StopPodSandboxRequest{} }
+func (*StopPodSandboxRequest) ProtoMessage() {}
+func (*StopPodSandboxRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{13} }
+
+func (m *StopPodSandboxRequest) GetPodSandboxId() string {
+ if m != nil {
+ return m.PodSandboxId
+ }
+ return ""
+}
+
+type StopPodSandboxResponse struct {
+}
+
+func (m *StopPodSandboxResponse) Reset() { *m = StopPodSandboxResponse{} }
+func (*StopPodSandboxResponse) ProtoMessage() {}
+func (*StopPodSandboxResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{14} }
+
+type RemovePodSandboxRequest struct {
+ // ID of the PodSandbox to remove.
+ PodSandboxId string `protobuf:"bytes,1,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"`
+}
+
+func (m *RemovePodSandboxRequest) Reset() { *m = RemovePodSandboxRequest{} }
+func (*RemovePodSandboxRequest) ProtoMessage() {}
+func (*RemovePodSandboxRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{15} }
+
+func (m *RemovePodSandboxRequest) GetPodSandboxId() string {
+ if m != nil {
+ return m.PodSandboxId
+ }
+ return ""
+}
+
+type RemovePodSandboxResponse struct {
+}
+
+func (m *RemovePodSandboxResponse) Reset() { *m = RemovePodSandboxResponse{} }
+func (*RemovePodSandboxResponse) ProtoMessage() {}
+func (*RemovePodSandboxResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{16} }
+
+type PodSandboxStatusRequest struct {
+ // ID of the PodSandbox for which to retrieve status.
+ PodSandboxId string `protobuf:"bytes,1,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"`
+}
+
+func (m *PodSandboxStatusRequest) Reset() { *m = PodSandboxStatusRequest{} }
+func (*PodSandboxStatusRequest) ProtoMessage() {}
+func (*PodSandboxStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{17} }
+
+func (m *PodSandboxStatusRequest) GetPodSandboxId() string {
+ if m != nil {
+ return m.PodSandboxId
+ }
+ return ""
+}
+
+// PodSandboxNetworkStatus is the status of the network for a PodSandbox.
+type PodSandboxNetworkStatus struct {
+ // IP address of the PodSandbox.
+ Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
+}
+
+func (m *PodSandboxNetworkStatus) Reset() { *m = PodSandboxNetworkStatus{} }
+func (*PodSandboxNetworkStatus) ProtoMessage() {}
+func (*PodSandboxNetworkStatus) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{18} }
+
+func (m *PodSandboxNetworkStatus) GetIp() string {
+ if m != nil {
+ return m.Ip
+ }
+ return ""
+}
+
+// Namespace contains paths to the namespaces.
+type Namespace struct {
+ // Namespace options for Linux namespaces.
+ Options *NamespaceOption `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"`
+}
+
+func (m *Namespace) Reset() { *m = Namespace{} }
+func (*Namespace) ProtoMessage() {}
+func (*Namespace) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{19} }
+
+func (m *Namespace) GetOptions() *NamespaceOption {
+ if m != nil {
+ return m.Options
+ }
+ return nil
+}
+
+// LinuxSandboxStatus contains status specific to Linux sandboxes.
+type LinuxPodSandboxStatus struct {
+ // Paths to the sandbox's namespaces.
+ Namespaces *Namespace `protobuf:"bytes,1,opt,name=namespaces" json:"namespaces,omitempty"`
+}
+
+func (m *LinuxPodSandboxStatus) Reset() { *m = LinuxPodSandboxStatus{} }
+func (*LinuxPodSandboxStatus) ProtoMessage() {}
+func (*LinuxPodSandboxStatus) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{20} }
+
+func (m *LinuxPodSandboxStatus) GetNamespaces() *Namespace {
+ if m != nil {
+ return m.Namespaces
+ }
+ return nil
+}
+
+// PodSandboxStatus contains the status of the PodSandbox.
+type PodSandboxStatus struct {
+ // ID of the sandbox.
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ // Metadata of the sandbox.
+ Metadata *PodSandboxMetadata `protobuf:"bytes,2,opt,name=metadata" json:"metadata,omitempty"`
+ // State of the sandbox.
+ State PodSandboxState `protobuf:"varint,3,opt,name=state,proto3,enum=runtime.PodSandboxState" json:"state,omitempty"`
+ // Creation timestamp of the sandbox in nanoseconds. Must be > 0.
+ CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
+ // Network contains network status if network is handled by the runtime.
+ Network *PodSandboxNetworkStatus `protobuf:"bytes,5,opt,name=network" json:"network,omitempty"`
+ // Linux-specific status to a pod sandbox.
+ Linux *LinuxPodSandboxStatus `protobuf:"bytes,6,opt,name=linux" json:"linux,omitempty"`
+ // Labels are key-value pairs that may be used to scope and select individual resources.
+ Labels map[string]string `protobuf:"bytes,7,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // Unstructured key-value map holding arbitrary metadata.
+ // Annotations MUST NOT be altered by the runtime; the value of this field
+ // MUST be identical to that of the corresponding PodSandboxConfig used to
+ // instantiate the pod sandbox this status represents.
+ Annotations map[string]string `protobuf:"bytes,8,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+}
+
+func (m *PodSandboxStatus) Reset() { *m = PodSandboxStatus{} }
+func (*PodSandboxStatus) ProtoMessage() {}
+func (*PodSandboxStatus) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{21} }
+
+func (m *PodSandboxStatus) GetId() string {
+ if m != nil {
+ return m.Id
+ }
+ return ""
+}
+
+func (m *PodSandboxStatus) GetMetadata() *PodSandboxMetadata {
+ if m != nil {
+ return m.Metadata
+ }
+ return nil
+}
+
+func (m *PodSandboxStatus) GetState() PodSandboxState {
+ if m != nil {
+ return m.State
+ }
+ return PodSandboxState_SANDBOX_READY
+}
+
+func (m *PodSandboxStatus) GetCreatedAt() int64 {
+ if m != nil {
+ return m.CreatedAt
+ }
+ return 0
+}
+
+func (m *PodSandboxStatus) GetNetwork() *PodSandboxNetworkStatus {
+ if m != nil {
+ return m.Network
+ }
+ return nil
+}
+
+func (m *PodSandboxStatus) GetLinux() *LinuxPodSandboxStatus {
+ if m != nil {
+ return m.Linux
+ }
+ return nil
+}
+
+func (m *PodSandboxStatus) GetLabels() map[string]string {
+ if m != nil {
+ return m.Labels
+ }
+ return nil
+}
+
+func (m *PodSandboxStatus) GetAnnotations() map[string]string {
+ if m != nil {
+ return m.Annotations
+ }
+ return nil
+}
+
+type PodSandboxStatusResponse struct {
+ // Status of the PodSandbox.
+ Status *PodSandboxStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
+}
+
+func (m *PodSandboxStatusResponse) Reset() { *m = PodSandboxStatusResponse{} }
+func (*PodSandboxStatusResponse) ProtoMessage() {}
+func (*PodSandboxStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{22} }
+
+func (m *PodSandboxStatusResponse) GetStatus() *PodSandboxStatus {
+ if m != nil {
+ return m.Status
+ }
+ return nil
+}
+
+// PodSandboxStateValue is the wrapper of PodSandboxState.
+type PodSandboxStateValue struct {
+ // State of the sandbox.
+ State PodSandboxState `protobuf:"varint,1,opt,name=state,proto3,enum=runtime.PodSandboxState" json:"state,omitempty"`
+}
+
+func (m *PodSandboxStateValue) Reset() { *m = PodSandboxStateValue{} }
+func (*PodSandboxStateValue) ProtoMessage() {}
+func (*PodSandboxStateValue) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{23} }
+
+func (m *PodSandboxStateValue) GetState() PodSandboxState {
+ if m != nil {
+ return m.State
+ }
+ return PodSandboxState_SANDBOX_READY
+}
+
+// PodSandboxFilter is used to filter a list of PodSandboxes.
+// All those fields are combined with 'AND'
+type PodSandboxFilter struct {
+ // ID of the sandbox.
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ // State of the sandbox.
+ State *PodSandboxStateValue `protobuf:"bytes,2,opt,name=state" json:"state,omitempty"`
+ // LabelSelector to select matches.
+ // Only api.MatchLabels is supported for now and the requirements
+ // are ANDed. MatchExpressions is not supported yet.
+ LabelSelector map[string]string `protobuf:"bytes,3,rep,name=label_selector,json=labelSelector" json:"label_selector,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+}
+
+func (m *PodSandboxFilter) Reset() { *m = PodSandboxFilter{} }
+func (*PodSandboxFilter) ProtoMessage() {}
+func (*PodSandboxFilter) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{24} }
+
+func (m *PodSandboxFilter) GetId() string {
+ if m != nil {
+ return m.Id
+ }
+ return ""
+}
+
+func (m *PodSandboxFilter) GetState() *PodSandboxStateValue {
+ if m != nil {
+ return m.State
+ }
+ return nil
+}
+
+func (m *PodSandboxFilter) GetLabelSelector() map[string]string {
+ if m != nil {
+ return m.LabelSelector
+ }
+ return nil
+}
+
+type ListPodSandboxRequest struct {
+ // PodSandboxFilter to filter a list of PodSandboxes.
+ Filter *PodSandboxFilter `protobuf:"bytes,1,opt,name=filter" json:"filter,omitempty"`
+}
+
+func (m *ListPodSandboxRequest) Reset() { *m = ListPodSandboxRequest{} }
+func (*ListPodSandboxRequest) ProtoMessage() {}
+func (*ListPodSandboxRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{25} }
+
+func (m *ListPodSandboxRequest) GetFilter() *PodSandboxFilter {
+ if m != nil {
+ return m.Filter
+ }
+ return nil
+}
+
+// PodSandbox contains minimal information about a sandbox.
+type PodSandbox struct {
+ // ID of the PodSandbox.
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ // Metadata of the PodSandbox.
+ Metadata *PodSandboxMetadata `protobuf:"bytes,2,opt,name=metadata" json:"metadata,omitempty"`
+ // State of the PodSandbox.
+ State PodSandboxState `protobuf:"varint,3,opt,name=state,proto3,enum=runtime.PodSandboxState" json:"state,omitempty"`
+ // Creation timestamps of the PodSandbox in nanoseconds. Must be > 0.
+ CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
+ // Labels of the PodSandbox.
+ Labels map[string]string `protobuf:"bytes,5,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // Unstructured key-value map holding arbitrary metadata.
+ // Annotations MUST NOT be altered by the runtime; the value of this field
+ // MUST be identical to that of the corresponding PodSandboxConfig used to
+ // instantiate this PodSandbox.
+ Annotations map[string]string `protobuf:"bytes,6,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+}
+
+func (m *PodSandbox) Reset() { *m = PodSandbox{} }
+func (*PodSandbox) ProtoMessage() {}
+func (*PodSandbox) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{26} }
+
+func (m *PodSandbox) GetId() string {
+ if m != nil {
+ return m.Id
+ }
+ return ""
+}
+
+func (m *PodSandbox) GetMetadata() *PodSandboxMetadata {
+ if m != nil {
+ return m.Metadata
+ }
+ return nil
+}
+
+func (m *PodSandbox) GetState() PodSandboxState {
+ if m != nil {
+ return m.State
+ }
+ return PodSandboxState_SANDBOX_READY
+}
+
+func (m *PodSandbox) GetCreatedAt() int64 {
+ if m != nil {
+ return m.CreatedAt
+ }
+ return 0
+}
+
+func (m *PodSandbox) GetLabels() map[string]string {
+ if m != nil {
+ return m.Labels
+ }
+ return nil
+}
+
+func (m *PodSandbox) GetAnnotations() map[string]string {
+ if m != nil {
+ return m.Annotations
+ }
+ return nil
+}
+
+type ListPodSandboxResponse struct {
+ // List of PodSandboxes.
+ Items []*PodSandbox `protobuf:"bytes,1,rep,name=items" json:"items,omitempty"`
+}
+
+func (m *ListPodSandboxResponse) Reset() { *m = ListPodSandboxResponse{} }
+func (*ListPodSandboxResponse) ProtoMessage() {}
+func (*ListPodSandboxResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{27} }
+
+func (m *ListPodSandboxResponse) GetItems() []*PodSandbox {
+ if m != nil {
+ return m.Items
+ }
+ return nil
+}
+
+// ImageSpec is an internal representation of an image. Currently, it wraps the
+// value of a Container's Image field (e.g. imageID or imageDigest), but in the
+// future it will include more detailed information about the different image types.
+type ImageSpec struct {
+ Image string `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
+}
+
+func (m *ImageSpec) Reset() { *m = ImageSpec{} }
+func (*ImageSpec) ProtoMessage() {}
+func (*ImageSpec) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{28} }
+
+func (m *ImageSpec) GetImage() string {
+ if m != nil {
+ return m.Image
+ }
+ return ""
+}
+
+type KeyValue struct {
+ Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
+ Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
+}
+
+func (m *KeyValue) Reset() { *m = KeyValue{} }
+func (*KeyValue) ProtoMessage() {}
+func (*KeyValue) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{29} }
+
+func (m *KeyValue) GetKey() string {
+ if m != nil {
+ return m.Key
+ }
+ return ""
+}
+
+func (m *KeyValue) GetValue() string {
+ if m != nil {
+ return m.Value
+ }
+ return ""
+}
+
+// LinuxContainerResources specifies Linux specific configuration for
+// resources.
+// TODO: Consider using Resources from opencontainers/runtime-spec/specs-go
+// directly.
+type LinuxContainerResources struct {
+ // CPU CFS (Completely Fair Scheduler) period. Default: 0 (not specified).
+ CpuPeriod int64 `protobuf:"varint,1,opt,name=cpu_period,json=cpuPeriod,proto3" json:"cpu_period,omitempty"`
+ // CPU CFS (Completely Fair Scheduler) quota. Default: 0 (not specified).
+ CpuQuota int64 `protobuf:"varint,2,opt,name=cpu_quota,json=cpuQuota,proto3" json:"cpu_quota,omitempty"`
+ // CPU shares (relative weight vs. other containers). Default: 0 (not specified).
+ CpuShares int64 `protobuf:"varint,3,opt,name=cpu_shares,json=cpuShares,proto3" json:"cpu_shares,omitempty"`
+ // Memory limit in bytes. Default: 0 (not specified).
+ MemoryLimitInBytes int64 `protobuf:"varint,4,opt,name=memory_limit_in_bytes,json=memoryLimitInBytes,proto3" json:"memory_limit_in_bytes,omitempty"`
+ // OOMScoreAdj adjusts the oom-killer score. Default: 0 (not specified).
+ OomScoreAdj int64 `protobuf:"varint,5,opt,name=oom_score_adj,json=oomScoreAdj,proto3" json:"oom_score_adj,omitempty"`
+}
+
+func (m *LinuxContainerResources) Reset() { *m = LinuxContainerResources{} }
+func (*LinuxContainerResources) ProtoMessage() {}
+func (*LinuxContainerResources) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{30} }
+
+func (m *LinuxContainerResources) GetCpuPeriod() int64 {
+ if m != nil {
+ return m.CpuPeriod
+ }
+ return 0
+}
+
+func (m *LinuxContainerResources) GetCpuQuota() int64 {
+ if m != nil {
+ return m.CpuQuota
+ }
+ return 0
+}
+
+func (m *LinuxContainerResources) GetCpuShares() int64 {
+ if m != nil {
+ return m.CpuShares
+ }
+ return 0
+}
+
+func (m *LinuxContainerResources) GetMemoryLimitInBytes() int64 {
+ if m != nil {
+ return m.MemoryLimitInBytes
+ }
+ return 0
+}
+
+func (m *LinuxContainerResources) GetOomScoreAdj() int64 {
+ if m != nil {
+ return m.OomScoreAdj
+ }
+ return 0
+}
+
+// SELinuxOption are the labels to be applied to the container.
+type SELinuxOption struct {
+ User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
+ Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"`
+ Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
+ Level string `protobuf:"bytes,4,opt,name=level,proto3" json:"level,omitempty"`
+}
+
+func (m *SELinuxOption) Reset() { *m = SELinuxOption{} }
+func (*SELinuxOption) ProtoMessage() {}
+func (*SELinuxOption) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{31} }
+
+func (m *SELinuxOption) GetUser() string {
+ if m != nil {
+ return m.User
+ }
+ return ""
+}
+
+func (m *SELinuxOption) GetRole() string {
+ if m != nil {
+ return m.Role
+ }
+ return ""
+}
+
+func (m *SELinuxOption) GetType() string {
+ if m != nil {
+ return m.Type
+ }
+ return ""
+}
+
+func (m *SELinuxOption) GetLevel() string {
+ if m != nil {
+ return m.Level
+ }
+ return ""
+}
+
+// Capability contains the container capabilities to add or drop
+type Capability struct {
+ // List of capabilities to add.
+ AddCapabilities []string `protobuf:"bytes,1,rep,name=add_capabilities,json=addCapabilities" json:"add_capabilities,omitempty"`
+ // List of capabilities to drop.
+ DropCapabilities []string `protobuf:"bytes,2,rep,name=drop_capabilities,json=dropCapabilities" json:"drop_capabilities,omitempty"`
+}
+
+func (m *Capability) Reset() { *m = Capability{} }
+func (*Capability) ProtoMessage() {}
+func (*Capability) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{32} }
+
+func (m *Capability) GetAddCapabilities() []string {
+ if m != nil {
+ return m.AddCapabilities
+ }
+ return nil
+}
+
+func (m *Capability) GetDropCapabilities() []string {
+ if m != nil {
+ return m.DropCapabilities
+ }
+ return nil
+}
+
+// LinuxContainerSecurityContext holds linux security configuration that will be applied to a container.
+type LinuxContainerSecurityContext struct {
+ // Capabilities to add or drop.
+ Capabilities *Capability `protobuf:"bytes,1,opt,name=capabilities" json:"capabilities,omitempty"`
+ // If set, run container in privileged mode.
+ // Privileged mode is incompatible with the following options. If
+ // privileged is set, the following features MAY have no effect:
+ // 1. capabilities
+ // 2. selinux_options
+ // 4. seccomp
+ // 5. apparmor
+ //
+ // Privileged mode implies the following specific options are applied:
+ // 1. All capabilities are added.
+ // 2. Sensitive paths, such as kernel module paths within sysfs, are not masked.
+ // 3. Any sysfs and procfs mounts are mounted RW.
+ // 4. Apparmor confinement is not applied.
+ // 5. Seccomp restrictions are not applied.
+ // 6. The device cgroup does not restrict access to any devices.
+ // 7. All devices from the host's /dev are available within the container.
+ // 8. SELinux restrictions are not applied (e.g. label=disabled).
+ Privileged bool `protobuf:"varint,2,opt,name=privileged,proto3" json:"privileged,omitempty"`
+ // Configurations for the container's namespaces.
+ // Only used if the container uses namespace for isolation.
+ NamespaceOptions *NamespaceOption `protobuf:"bytes,3,opt,name=namespace_options,json=namespaceOptions" json:"namespace_options,omitempty"`
+ // SELinux context to be optionally applied.
+ SelinuxOptions *SELinuxOption `protobuf:"bytes,4,opt,name=selinux_options,json=selinuxOptions" json:"selinux_options,omitempty"`
+ // UID to run the container process as. Only one of run_as_user and
+ // run_as_username can be specified at a time.
+ RunAsUser *Int64Value `protobuf:"bytes,5,opt,name=run_as_user,json=runAsUser" json:"run_as_user,omitempty"`
+ // User name to run the container process as. If specified, the user MUST
+ // exist in the container image (i.e. in the /etc/passwd inside the image),
+ // and be resolved there by the runtime; otherwise, the runtime MUST error.
+ RunAsUsername string `protobuf:"bytes,6,opt,name=run_as_username,json=runAsUsername,proto3" json:"run_as_username,omitempty"`
+ // If set, the root filesystem of the container is read-only.
+ ReadonlyRootfs bool `protobuf:"varint,7,opt,name=readonly_rootfs,json=readonlyRootfs,proto3" json:"readonly_rootfs,omitempty"`
+ // List of groups applied to the first process run in the container, in
+ // addition to the container's primary GID.
+ SupplementalGroups []int64 `protobuf:"varint,8,rep,packed,name=supplemental_groups,json=supplementalGroups" json:"supplemental_groups,omitempty"`
+ // AppArmor profile for the container, candidate values are:
+ // * runtime/default: equivalent to not specifying a profile.
+ // * localhost/<profile_name>: profile loaded on the node
+ // (localhost) by name. The possible profile names are detailed at
+ // http://wiki.apparmor.net/index.php/AppArmor_Core_Policy_Reference
+ ApparmorProfile string `protobuf:"bytes,9,opt,name=apparmor_profile,json=apparmorProfile,proto3" json:"apparmor_profile,omitempty"`
+}
+
+func (m *LinuxContainerSecurityContext) Reset() { *m = LinuxContainerSecurityContext{} }
+func (*LinuxContainerSecurityContext) ProtoMessage() {}
+func (*LinuxContainerSecurityContext) Descriptor() ([]byte, []int) {
+ return fileDescriptorApi, []int{33}
+}
+
+func (m *LinuxContainerSecurityContext) GetCapabilities() *Capability {
+ if m != nil {
+ return m.Capabilities
+ }
+ return nil
+}
+
+func (m *LinuxContainerSecurityContext) GetPrivileged() bool {
+ if m != nil {
+ return m.Privileged
+ }
+ return false
+}
+
+func (m *LinuxContainerSecurityContext) GetNamespaceOptions() *NamespaceOption {
+ if m != nil {
+ return m.NamespaceOptions
+ }
+ return nil
+}
+
+func (m *LinuxContainerSecurityContext) GetSelinuxOptions() *SELinuxOption {
+ if m != nil {
+ return m.SelinuxOptions
+ }
+ return nil
+}
+
+func (m *LinuxContainerSecurityContext) GetRunAsUser() *Int64Value {
+ if m != nil {
+ return m.RunAsUser
+ }
+ return nil
+}
+
+func (m *LinuxContainerSecurityContext) GetRunAsUsername() string {
+ if m != nil {
+ return m.RunAsUsername
+ }
+ return ""
+}
+
+func (m *LinuxContainerSecurityContext) GetReadonlyRootfs() bool {
+ if m != nil {
+ return m.ReadonlyRootfs
+ }
+ return false
+}
+
+func (m *LinuxContainerSecurityContext) GetSupplementalGroups() []int64 {
+ if m != nil {
+ return m.SupplementalGroups
+ }
+ return nil
+}
+
+func (m *LinuxContainerSecurityContext) GetApparmorProfile() string {
+ if m != nil {
+ return m.ApparmorProfile
+ }
+ return ""
+}
+
+// LinuxContainerConfig contains platform-specific configuration for
+// Linux-based containers.
+type LinuxContainerConfig struct {
+ // Resources specification for the container.
+ Resources *LinuxContainerResources `protobuf:"bytes,1,opt,name=resources" json:"resources,omitempty"`
+ // LinuxContainerSecurityContext configuration for the container.
+ SecurityContext *LinuxContainerSecurityContext `protobuf:"bytes,2,opt,name=security_context,json=securityContext" json:"security_context,omitempty"`
+}
+
+func (m *LinuxContainerConfig) Reset() { *m = LinuxContainerConfig{} }
+func (*LinuxContainerConfig) ProtoMessage() {}
+func (*LinuxContainerConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{34} }
+
+func (m *LinuxContainerConfig) GetResources() *LinuxContainerResources {
+ if m != nil {
+ return m.Resources
+ }
+ return nil
+}
+
+func (m *LinuxContainerConfig) GetSecurityContext() *LinuxContainerSecurityContext {
+ if m != nil {
+ return m.SecurityContext
+ }
+ return nil
+}
+
+// ContainerMetadata holds all necessary information for building the container
+// name. The container runtime is encouraged to expose the metadata in its user
+// interface for better user experience. E.g., runtime can construct a unique
+// container name based on the metadata. Note that (name, attempt) is unique
+// within a sandbox for the entire lifetime of the sandbox.
+type ContainerMetadata struct {
+ // Name of the container. Same as the container name in the PodSpec.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // Attempt number of creating the container. Default: 0.
+ Attempt uint32 `protobuf:"varint,2,opt,name=attempt,proto3" json:"attempt,omitempty"`
+}
+
+func (m *ContainerMetadata) Reset() { *m = ContainerMetadata{} }
+func (*ContainerMetadata) ProtoMessage() {}
+func (*ContainerMetadata) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{35} }
+
+func (m *ContainerMetadata) GetName() string {
+ if m != nil {
+ return m.Name
+ }
+ return ""
+}
+
+func (m *ContainerMetadata) GetAttempt() uint32 {
+ if m != nil {
+ return m.Attempt
+ }
+ return 0
+}
+
+// Device specifies a host device to mount into a container.
+type Device struct {
+ // Path of the device within the container.
+ ContainerPath string `protobuf:"bytes,1,opt,name=container_path,json=containerPath,proto3" json:"container_path,omitempty"`
+ // Path of the device on the host.
+ HostPath string `protobuf:"bytes,2,opt,name=host_path,json=hostPath,proto3" json:"host_path,omitempty"`
+ // Cgroups permissions of the device, candidates are one or more of
+ // * r - allows container to read from the specified device.
+ // * w - allows container to write to the specified device.
+ // * m - allows container to create device files that do not yet exist.
+ Permissions string `protobuf:"bytes,3,opt,name=permissions,proto3" json:"permissions,omitempty"`
+}
+
+func (m *Device) Reset() { *m = Device{} }
+func (*Device) ProtoMessage() {}
+func (*Device) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{36} }
+
+func (m *Device) GetContainerPath() string {
+ if m != nil {
+ return m.ContainerPath
+ }
+ return ""
+}
+
+func (m *Device) GetHostPath() string {
+ if m != nil {
+ return m.HostPath
+ }
+ return ""
+}
+
+func (m *Device) GetPermissions() string {
+ if m != nil {
+ return m.Permissions
+ }
+ return ""
+}
+
+// ContainerConfig holds all the required and optional fields for creating a
+// container.
+type ContainerConfig struct {
+ // Metadata of the container. This information will uniquely identify the
+ // container, and the runtime should leverage this to ensure correct
+ // operation. The runtime may also use this information to improve UX, such
+ // as by constructing a readable name.
+ Metadata *ContainerMetadata `protobuf:"bytes,1,opt,name=metadata" json:"metadata,omitempty"`
+ // Image to use.
+ Image *ImageSpec `protobuf:"bytes,2,opt,name=image" json:"image,omitempty"`
+ // Command to execute (i.e., entrypoint for docker)
+ Command []string `protobuf:"bytes,3,rep,name=command" json:"command,omitempty"`
+ // Args for the Command (i.e., command for docker)
+ Args []string `protobuf:"bytes,4,rep,name=args" json:"args,omitempty"`
+ // Current working directory of the command.
+ WorkingDir string `protobuf:"bytes,5,opt,name=working_dir,json=workingDir,proto3" json:"working_dir,omitempty"`
+ // List of environment variable to set in the container.
+ Envs []*KeyValue `protobuf:"bytes,6,rep,name=envs" json:"envs,omitempty"`
+ // Mounts for the container.
+ Mounts []*Mount `protobuf:"bytes,7,rep,name=mounts" json:"mounts,omitempty"`
+ // Devices for the container.
+ Devices []*Device `protobuf:"bytes,8,rep,name=devices" json:"devices,omitempty"`
+ // Key-value pairs that may be used to scope and select individual resources.
+ // Label keys are of the form:
+ // label-key ::= prefixed-name | name
+ // prefixed-name ::= prefix '/' name
+ // prefix ::= DNS_SUBDOMAIN
+ // name ::= DNS_LABEL
+ Labels map[string]string `protobuf:"bytes,9,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // Unstructured key-value map that may be used by the kubelet to store and
+ // retrieve arbitrary metadata.
+ //
+ // Annotations MUST NOT be altered by the runtime; the annotations stored
+ // here MUST be returned in the ContainerStatus associated with the container
+ // this ContainerConfig creates.
+ //
+ // In general, in order to preserve a well-defined interface between the
+ // kubelet and the container runtime, annotations SHOULD NOT influence
+ // runtime behaviour.
+ Annotations map[string]string `protobuf:"bytes,10,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // Path relative to PodSandboxConfig.LogDirectory for container to store
+ // the log (STDOUT and STDERR) on the host.
+ // E.g.,
+ // PodSandboxConfig.LogDirectory = `/var/log/pods/<podUID>/`
+ // ContainerConfig.LogPath = `containerName_Instance#.log`
+ //
+ // WARNING: Log management and how kubelet should interface with the
+ // container logs are under active discussion in
+ // https://issues.k8s.io/24677. There *may* be future change of direction
+ // for logging as the discussion carries on.
+ LogPath string `protobuf:"bytes,11,opt,name=log_path,json=logPath,proto3" json:"log_path,omitempty"`
+ // Variables for interactive containers, these have very specialized
+ // use-cases (e.g. debugging).
+ // TODO: Determine if we need to continue supporting these fields that are
+ // part of Kubernetes's Container Spec.
+ Stdin bool `protobuf:"varint,12,opt,name=stdin,proto3" json:"stdin,omitempty"`
+ StdinOnce bool `protobuf:"varint,13,opt,name=stdin_once,json=stdinOnce,proto3" json:"stdin_once,omitempty"`
+ Tty bool `protobuf:"varint,14,opt,name=tty,proto3" json:"tty,omitempty"`
+ // Configuration specific to Linux containers.
+ Linux *LinuxContainerConfig `protobuf:"bytes,15,opt,name=linux" json:"linux,omitempty"`
+}
+
+func (m *ContainerConfig) Reset() { *m = ContainerConfig{} }
+func (*ContainerConfig) ProtoMessage() {}
+func (*ContainerConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{37} }
+
+func (m *ContainerConfig) GetMetadata() *ContainerMetadata {
+ if m != nil {
+ return m.Metadata
+ }
+ return nil
+}
+
+func (m *ContainerConfig) GetImage() *ImageSpec {
+ if m != nil {
+ return m.Image
+ }
+ return nil
+}
+
+func (m *ContainerConfig) GetCommand() []string {
+ if m != nil {
+ return m.Command
+ }
+ return nil
+}
+
+func (m *ContainerConfig) GetArgs() []string {
+ if m != nil {
+ return m.Args
+ }
+ return nil
+}
+
+func (m *ContainerConfig) GetWorkingDir() string {
+ if m != nil {
+ return m.WorkingDir
+ }
+ return ""
+}
+
+func (m *ContainerConfig) GetEnvs() []*KeyValue {
+ if m != nil {
+ return m.Envs
+ }
+ return nil
+}
+
+func (m *ContainerConfig) GetMounts() []*Mount {
+ if m != nil {
+ return m.Mounts
+ }
+ return nil
+}
+
+func (m *ContainerConfig) GetDevices() []*Device {
+ if m != nil {
+ return m.Devices
+ }
+ return nil
+}
+
+func (m *ContainerConfig) GetLabels() map[string]string {
+ if m != nil {
+ return m.Labels
+ }
+ return nil
+}
+
+func (m *ContainerConfig) GetAnnotations() map[string]string {
+ if m != nil {
+ return m.Annotations
+ }
+ return nil
+}
+
+func (m *ContainerConfig) GetLogPath() string {
+ if m != nil {
+ return m.LogPath
+ }
+ return ""
+}
+
+func (m *ContainerConfig) GetStdin() bool {
+ if m != nil {
+ return m.Stdin
+ }
+ return false
+}
+
+func (m *ContainerConfig) GetStdinOnce() bool {
+ if m != nil {
+ return m.StdinOnce
+ }
+ return false
+}
+
+func (m *ContainerConfig) GetTty() bool {
+ if m != nil {
+ return m.Tty
+ }
+ return false
+}
+
+func (m *ContainerConfig) GetLinux() *LinuxContainerConfig {
+ if m != nil {
+ return m.Linux
+ }
+ return nil
+}
+
+type CreateContainerRequest struct {
+ // ID of the PodSandbox in which the container should be created.
+ PodSandboxId string `protobuf:"bytes,1,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"`
+ // Config of the container.
+ Config *ContainerConfig `protobuf:"bytes,2,opt,name=config" json:"config,omitempty"`
+ // Config of the PodSandbox. This is the same config that was passed
+ // to RunPodSandboxRequest to create the PodSandbox. It is passed again
+ // here just for easy reference. The PodSandboxConfig is immutable and
+ // remains the same throughout the lifetime of the pod.
+ SandboxConfig *PodSandboxConfig `protobuf:"bytes,3,opt,name=sandbox_config,json=sandboxConfig" json:"sandbox_config,omitempty"`
+}
+
+func (m *CreateContainerRequest) Reset() { *m = CreateContainerRequest{} }
+func (*CreateContainerRequest) ProtoMessage() {}
+func (*CreateContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{38} }
+
+func (m *CreateContainerRequest) GetPodSandboxId() string {
+ if m != nil {
+ return m.PodSandboxId
+ }
+ return ""
+}
+
+func (m *CreateContainerRequest) GetConfig() *ContainerConfig {
+ if m != nil {
+ return m.Config
+ }
+ return nil
+}
+
+func (m *CreateContainerRequest) GetSandboxConfig() *PodSandboxConfig {
+ if m != nil {
+ return m.SandboxConfig
+ }
+ return nil
+}
+
+type CreateContainerResponse struct {
+ // ID of the created container.
+ ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+}
+
+func (m *CreateContainerResponse) Reset() { *m = CreateContainerResponse{} }
+func (*CreateContainerResponse) ProtoMessage() {}
+func (*CreateContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{39} }
+
+func (m *CreateContainerResponse) GetContainerId() string {
+ if m != nil {
+ return m.ContainerId
+ }
+ return ""
+}
+
+type StartContainerRequest struct {
+ // ID of the container to start.
+ ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+}
+
+func (m *StartContainerRequest) Reset() { *m = StartContainerRequest{} }
+func (*StartContainerRequest) ProtoMessage() {}
+func (*StartContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{40} }
+
+func (m *StartContainerRequest) GetContainerId() string {
+ if m != nil {
+ return m.ContainerId
+ }
+ return ""
+}
+
+type StartContainerResponse struct {
+}
+
+func (m *StartContainerResponse) Reset() { *m = StartContainerResponse{} }
+func (*StartContainerResponse) ProtoMessage() {}
+func (*StartContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{41} }
+
+type StopContainerRequest struct {
+ // ID of the container to stop.
+ ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ // Timeout in seconds to wait for the container to stop before forcibly
+ // terminating it. Default: 0 (forcibly terminate the container immediately)
+ Timeout int64 `protobuf:"varint,2,opt,name=timeout,proto3" json:"timeout,omitempty"`
+}
+
+func (m *StopContainerRequest) Reset() { *m = StopContainerRequest{} }
+func (*StopContainerRequest) ProtoMessage() {}
+func (*StopContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{42} }
+
+func (m *StopContainerRequest) GetContainerId() string {
+ if m != nil {
+ return m.ContainerId
+ }
+ return ""
+}
+
+func (m *StopContainerRequest) GetTimeout() int64 {
+ if m != nil {
+ return m.Timeout
+ }
+ return 0
+}
+
+type StopContainerResponse struct {
+}
+
+func (m *StopContainerResponse) Reset() { *m = StopContainerResponse{} }
+func (*StopContainerResponse) ProtoMessage() {}
+func (*StopContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{43} }
+
+type RemoveContainerRequest struct {
+ // ID of the container to remove.
+ ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+}
+
+func (m *RemoveContainerRequest) Reset() { *m = RemoveContainerRequest{} }
+func (*RemoveContainerRequest) ProtoMessage() {}
+func (*RemoveContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{44} }
+
+func (m *RemoveContainerRequest) GetContainerId() string {
+ if m != nil {
+ return m.ContainerId
+ }
+ return ""
+}
+
+type RemoveContainerResponse struct {
+}
+
+func (m *RemoveContainerResponse) Reset() { *m = RemoveContainerResponse{} }
+func (*RemoveContainerResponse) ProtoMessage() {}
+func (*RemoveContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{45} }
+
+// ContainerStateValue is the wrapper of ContainerState.
+type ContainerStateValue struct {
+ // State of the container.
+ State ContainerState `protobuf:"varint,1,opt,name=state,proto3,enum=runtime.ContainerState" json:"state,omitempty"`
+}
+
+func (m *ContainerStateValue) Reset() { *m = ContainerStateValue{} }
+func (*ContainerStateValue) ProtoMessage() {}
+func (*ContainerStateValue) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{46} }
+
+func (m *ContainerStateValue) GetState() ContainerState {
+ if m != nil {
+ return m.State
+ }
+ return ContainerState_CONTAINER_CREATED
+}
+
+// ContainerFilter is used to filter containers.
+// All those fields are combined with 'AND'
+type ContainerFilter struct {
+ // ID of the container.
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ // State of the container.
+ State *ContainerStateValue `protobuf:"bytes,2,opt,name=state" json:"state,omitempty"`
+ // ID of the PodSandbox.
+ PodSandboxId string `protobuf:"bytes,3,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"`
+ // LabelSelector to select matches.
+ // Only api.MatchLabels is supported for now and the requirements
+ // are ANDed. MatchExpressions is not supported yet.
+ LabelSelector map[string]string `protobuf:"bytes,4,rep,name=label_selector,json=labelSelector" json:"label_selector,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+}
+
+func (m *ContainerFilter) Reset() { *m = ContainerFilter{} }
+func (*ContainerFilter) ProtoMessage() {}
+func (*ContainerFilter) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{47} }
+
+func (m *ContainerFilter) GetId() string {
+ if m != nil {
+ return m.Id
+ }
+ return ""
+}
+
+func (m *ContainerFilter) GetState() *ContainerStateValue {
+ if m != nil {
+ return m.State
+ }
+ return nil
+}
+
+func (m *ContainerFilter) GetPodSandboxId() string {
+ if m != nil {
+ return m.PodSandboxId
+ }
+ return ""
+}
+
+func (m *ContainerFilter) GetLabelSelector() map[string]string {
+ if m != nil {
+ return m.LabelSelector
+ }
+ return nil
+}
+
+type ListContainersRequest struct {
+ Filter *ContainerFilter `protobuf:"bytes,1,opt,name=filter" json:"filter,omitempty"`
+}
+
+func (m *ListContainersRequest) Reset() { *m = ListContainersRequest{} }
+func (*ListContainersRequest) ProtoMessage() {}
+func (*ListContainersRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{48} }
+
+func (m *ListContainersRequest) GetFilter() *ContainerFilter {
+ if m != nil {
+ return m.Filter
+ }
+ return nil
+}
+
+// Container provides the runtime information for a container, such as ID, hash,
+// state of the container.
+type Container struct {
+ // ID of the container, used by the container runtime to identify
+ // a container.
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ // ID of the sandbox to which this container belongs.
+ PodSandboxId string `protobuf:"bytes,2,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"`
+ // Metadata of the container.
+ Metadata *ContainerMetadata `protobuf:"bytes,3,opt,name=metadata" json:"metadata,omitempty"`
+ // Spec of the image.
+ Image *ImageSpec `protobuf:"bytes,4,opt,name=image" json:"image,omitempty"`
+ // Reference to the image in use. For most runtimes, this should be an
+ // image ID.
+ ImageRef string `protobuf:"bytes,5,opt,name=image_ref,json=imageRef,proto3" json:"image_ref,omitempty"`
+ // State of the container.
+ State ContainerState `protobuf:"varint,6,opt,name=state,proto3,enum=runtime.ContainerState" json:"state,omitempty"`
+ // Creation time of the container in nanoseconds.
+ CreatedAt int64 `protobuf:"varint,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
+ // Key-value pairs that may be used to scope and select individual resources.
+ Labels map[string]string `protobuf:"bytes,8,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // Unstructured key-value map holding arbitrary metadata.
+ // Annotations MUST NOT be altered by the runtime; the value of this field
+ // MUST be identical to that of the corresponding ContainerConfig used to
+ // instantiate this Container.
+ Annotations map[string]string `protobuf:"bytes,9,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+}
+
+func (m *Container) Reset() { *m = Container{} }
+func (*Container) ProtoMessage() {}
+func (*Container) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{49} }
+
+func (m *Container) GetId() string {
+ if m != nil {
+ return m.Id
+ }
+ return ""
+}
+
+func (m *Container) GetPodSandboxId() string {
+ if m != nil {
+ return m.PodSandboxId
+ }
+ return ""
+}
+
+func (m *Container) GetMetadata() *ContainerMetadata {
+ if m != nil {
+ return m.Metadata
+ }
+ return nil
+}
+
+func (m *Container) GetImage() *ImageSpec {
+ if m != nil {
+ return m.Image
+ }
+ return nil
+}
+
+func (m *Container) GetImageRef() string {
+ if m != nil {
+ return m.ImageRef
+ }
+ return ""
+}
+
+func (m *Container) GetState() ContainerState {
+ if m != nil {
+ return m.State
+ }
+ return ContainerState_CONTAINER_CREATED
+}
+
+func (m *Container) GetCreatedAt() int64 {
+ if m != nil {
+ return m.CreatedAt
+ }
+ return 0
+}
+
+func (m *Container) GetLabels() map[string]string {
+ if m != nil {
+ return m.Labels
+ }
+ return nil
+}
+
+func (m *Container) GetAnnotations() map[string]string {
+ if m != nil {
+ return m.Annotations
+ }
+ return nil
+}
+
+type ListContainersResponse struct {
+ // List of containers.
+ Containers []*Container `protobuf:"bytes,1,rep,name=containers" json:"containers,omitempty"`
+}
+
+func (m *ListContainersResponse) Reset() { *m = ListContainersResponse{} }
+func (*ListContainersResponse) ProtoMessage() {}
+func (*ListContainersResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{50} }
+
+func (m *ListContainersResponse) GetContainers() []*Container {
+ if m != nil {
+ return m.Containers
+ }
+ return nil
+}
+
+type ContainerStatusRequest struct {
+ // ID of the container for which to retrieve status.
+ ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+}
+
+func (m *ContainerStatusRequest) Reset() { *m = ContainerStatusRequest{} }
+func (*ContainerStatusRequest) ProtoMessage() {}
+func (*ContainerStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{51} }
+
+func (m *ContainerStatusRequest) GetContainerId() string {
+ if m != nil {
+ return m.ContainerId
+ }
+ return ""
+}
+
+// ContainerStatus represents the status of a container.
+type ContainerStatus struct {
+ // ID of the container.
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ // Metadata of the container.
+ Metadata *ContainerMetadata `protobuf:"bytes,2,opt,name=metadata" json:"metadata,omitempty"`
+ // Status of the container.
+ State ContainerState `protobuf:"varint,3,opt,name=state,proto3,enum=runtime.ContainerState" json:"state,omitempty"`
+ // Creation time of the container in nanoseconds.
+ CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
+ // Start time of the container in nanoseconds. Default: 0 (not specified).
+ StartedAt int64 `protobuf:"varint,5,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"`
+ // Finish time of the container in nanoseconds. Default: 0 (not specified).
+ FinishedAt int64 `protobuf:"varint,6,opt,name=finished_at,json=finishedAt,proto3" json:"finished_at,omitempty"`
+ // Exit code of the container. Only required when finished_at != 0. Default: 0.
+ ExitCode int32 `protobuf:"varint,7,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"`
+ // Spec of the image.
+ Image *ImageSpec `protobuf:"bytes,8,opt,name=image" json:"image,omitempty"`
+ // Reference to the image in use. For most runtimes, this should be an
+ // image ID
+ ImageRef string `protobuf:"bytes,9,opt,name=image_ref,json=imageRef,proto3" json:"image_ref,omitempty"`
+ // Brief CamelCase string explaining why container is in its current state.
+ Reason string `protobuf:"bytes,10,opt,name=reason,proto3" json:"reason,omitempty"`
+ // Human-readable message indicating details about why container is in its
+ // current state.
+ Message string `protobuf:"bytes,11,opt,name=message,proto3" json:"message,omitempty"`
+ // Key-value pairs that may be used to scope and select individual resources.
+ Labels map[string]string `protobuf:"bytes,12,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // Unstructured key-value map holding arbitrary metadata.
+ // Annotations MUST NOT be altered by the runtime; the value of this field
+ // MUST be identical to that of the corresponding ContainerConfig used to
+ // instantiate the Container this status represents.
+ Annotations map[string]string `protobuf:"bytes,13,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // Mounts for the container.
+ Mounts []*Mount `protobuf:"bytes,14,rep,name=mounts" json:"mounts,omitempty"`
+ // Log path of container.
+ LogPath string `protobuf:"bytes,15,opt,name=log_path,json=logPath,proto3" json:"log_path,omitempty"`
+}
+
+func (m *ContainerStatus) Reset() { *m = ContainerStatus{} }
+func (*ContainerStatus) ProtoMessage() {}
+func (*ContainerStatus) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{52} }
+
+func (m *ContainerStatus) GetId() string {
+ if m != nil {
+ return m.Id
+ }
+ return ""
+}
+
+func (m *ContainerStatus) GetMetadata() *ContainerMetadata {
+ if m != nil {
+ return m.Metadata
+ }
+ return nil
+}
+
+func (m *ContainerStatus) GetState() ContainerState {
+ if m != nil {
+ return m.State
+ }
+ return ContainerState_CONTAINER_CREATED
+}
+
+func (m *ContainerStatus) GetCreatedAt() int64 {
+ if m != nil {
+ return m.CreatedAt
+ }
+ return 0
+}
+
+func (m *ContainerStatus) GetStartedAt() int64 {
+ if m != nil {
+ return m.StartedAt
+ }
+ return 0
+}
+
+func (m *ContainerStatus) GetFinishedAt() int64 {
+ if m != nil {
+ return m.FinishedAt
+ }
+ return 0
+}
+
+func (m *ContainerStatus) GetExitCode() int32 {
+ if m != nil {
+ return m.ExitCode
+ }
+ return 0
+}
+
+func (m *ContainerStatus) GetImage() *ImageSpec {
+ if m != nil {
+ return m.Image
+ }
+ return nil
+}
+
+func (m *ContainerStatus) GetImageRef() string {
+ if m != nil {
+ return m.ImageRef
+ }
+ return ""
+}
+
+func (m *ContainerStatus) GetReason() string {
+ if m != nil {
+ return m.Reason
+ }
+ return ""
+}
+
+func (m *ContainerStatus) GetMessage() string {
+ if m != nil {
+ return m.Message
+ }
+ return ""
+}
+
+func (m *ContainerStatus) GetLabels() map[string]string {
+ if m != nil {
+ return m.Labels
+ }
+ return nil
+}
+
+func (m *ContainerStatus) GetAnnotations() map[string]string {
+ if m != nil {
+ return m.Annotations
+ }
+ return nil
+}
+
+func (m *ContainerStatus) GetMounts() []*Mount {
+ if m != nil {
+ return m.Mounts
+ }
+ return nil
+}
+
+func (m *ContainerStatus) GetLogPath() string {
+ if m != nil {
+ return m.LogPath
+ }
+ return ""
+}
+
+type ContainerStatusResponse struct {
+ // Status of the container.
+ Status *ContainerStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
+}
+
+func (m *ContainerStatusResponse) Reset() { *m = ContainerStatusResponse{} }
+func (*ContainerStatusResponse) ProtoMessage() {}
+func (*ContainerStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{53} }
+
+func (m *ContainerStatusResponse) GetStatus() *ContainerStatus {
+ if m != nil {
+ return m.Status
+ }
+ return nil
+}
+
+type ExecSyncRequest struct {
+ // ID of the container.
+ ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ // Command to execute.
+ Cmd []string `protobuf:"bytes,2,rep,name=cmd" json:"cmd,omitempty"`
+ // Timeout in seconds to stop the command. Default: 0 (run forever).
+ Timeout int64 `protobuf:"varint,3,opt,name=timeout,proto3" json:"timeout,omitempty"`
+}
+
+func (m *ExecSyncRequest) Reset() { *m = ExecSyncRequest{} }
+func (*ExecSyncRequest) ProtoMessage() {}
+func (*ExecSyncRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{54} }
+
+func (m *ExecSyncRequest) GetContainerId() string {
+ if m != nil {
+ return m.ContainerId
+ }
+ return ""
+}
+
+func (m *ExecSyncRequest) GetCmd() []string {
+ if m != nil {
+ return m.Cmd
+ }
+ return nil
+}
+
+func (m *ExecSyncRequest) GetTimeout() int64 {
+ if m != nil {
+ return m.Timeout
+ }
+ return 0
+}
+
+type ExecSyncResponse struct {
+ // Captured command stdout output.
+ Stdout []byte `protobuf:"bytes,1,opt,name=stdout,proto3" json:"stdout,omitempty"`
+ // Captured command stderr output.
+ Stderr []byte `protobuf:"bytes,2,opt,name=stderr,proto3" json:"stderr,omitempty"`
+ // Exit code the command finished with. Default: 0 (success).
+ ExitCode int32 `protobuf:"varint,3,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"`
+}
+
+func (m *ExecSyncResponse) Reset() { *m = ExecSyncResponse{} }
+func (*ExecSyncResponse) ProtoMessage() {}
+func (*ExecSyncResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{55} }
+
+func (m *ExecSyncResponse) GetStdout() []byte {
+ if m != nil {
+ return m.Stdout
+ }
+ return nil
+}
+
+func (m *ExecSyncResponse) GetStderr() []byte {
+ if m != nil {
+ return m.Stderr
+ }
+ return nil
+}
+
+func (m *ExecSyncResponse) GetExitCode() int32 {
+ if m != nil {
+ return m.ExitCode
+ }
+ return 0
+}
+
+type ExecRequest struct {
+ // ID of the container in which to execute the command.
+ ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ // Command to execute.
+ Cmd []string `protobuf:"bytes,2,rep,name=cmd" json:"cmd,omitempty"`
+ // Whether to exec the command in a TTY.
+ Tty bool `protobuf:"varint,3,opt,name=tty,proto3" json:"tty,omitempty"`
+ // Whether to stream stdin.
+ Stdin bool `protobuf:"varint,4,opt,name=stdin,proto3" json:"stdin,omitempty"`
+}
+
+func (m *ExecRequest) Reset() { *m = ExecRequest{} }
+func (*ExecRequest) ProtoMessage() {}
+func (*ExecRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{56} }
+
+func (m *ExecRequest) GetContainerId() string {
+ if m != nil {
+ return m.ContainerId
+ }
+ return ""
+}
+
+func (m *ExecRequest) GetCmd() []string {
+ if m != nil {
+ return m.Cmd
+ }
+ return nil
+}
+
+func (m *ExecRequest) GetTty() bool {
+ if m != nil {
+ return m.Tty
+ }
+ return false
+}
+
+func (m *ExecRequest) GetStdin() bool {
+ if m != nil {
+ return m.Stdin
+ }
+ return false
+}
+
+type ExecResponse struct {
+ // Fully qualified URL of the exec streaming server.
+ Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
+}
+
+func (m *ExecResponse) Reset() { *m = ExecResponse{} }
+func (*ExecResponse) ProtoMessage() {}
+func (*ExecResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{57} }
+
+func (m *ExecResponse) GetUrl() string {
+ if m != nil {
+ return m.Url
+ }
+ return ""
+}
+
+type AttachRequest struct {
+ // ID of the container to which to attach.
+ ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ // Whether to stream stdin.
+ Stdin bool `protobuf:"varint,2,opt,name=stdin,proto3" json:"stdin,omitempty"`
+ // Whether the process being attached is running in a TTY.
+ // This must match the TTY setting in the ContainerConfig.
+ Tty bool `protobuf:"varint,3,opt,name=tty,proto3" json:"tty,omitempty"`
+}
+
+func (m *AttachRequest) Reset() { *m = AttachRequest{} }
+func (*AttachRequest) ProtoMessage() {}
+func (*AttachRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{58} }
+
+func (m *AttachRequest) GetContainerId() string {
+ if m != nil {
+ return m.ContainerId
+ }
+ return ""
+}
+
+func (m *AttachRequest) GetStdin() bool {
+ if m != nil {
+ return m.Stdin
+ }
+ return false
+}
+
+func (m *AttachRequest) GetTty() bool {
+ if m != nil {
+ return m.Tty
+ }
+ return false
+}
+
+type AttachResponse struct {
+ // Fully qualified URL of the attach streaming server.
+ Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
+}
+
+func (m *AttachResponse) Reset() { *m = AttachResponse{} }
+func (*AttachResponse) ProtoMessage() {}
+func (*AttachResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{59} }
+
+func (m *AttachResponse) GetUrl() string {
+ if m != nil {
+ return m.Url
+ }
+ return ""
+}
+
+type PortForwardRequest struct {
+ // ID of the container to which to forward the port.
+ PodSandboxId string `protobuf:"bytes,1,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"`
+ // Port to forward.
+ Port []int32 `protobuf:"varint,2,rep,packed,name=port" json:"port,omitempty"`
+}
+
+func (m *PortForwardRequest) Reset() { *m = PortForwardRequest{} }
+func (*PortForwardRequest) ProtoMessage() {}
+func (*PortForwardRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{60} }
+
+func (m *PortForwardRequest) GetPodSandboxId() string {
+ if m != nil {
+ return m.PodSandboxId
+ }
+ return ""
+}
+
+func (m *PortForwardRequest) GetPort() []int32 {
+ if m != nil {
+ return m.Port
+ }
+ return nil
+}
+
+type PortForwardResponse struct {
+ // Fully qualified URL of the port-forward streaming server.
+ Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
+}
+
+func (m *PortForwardResponse) Reset() { *m = PortForwardResponse{} }
+func (*PortForwardResponse) ProtoMessage() {}
+func (*PortForwardResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{61} }
+
+func (m *PortForwardResponse) GetUrl() string {
+ if m != nil {
+ return m.Url
+ }
+ return ""
+}
+
+type ImageFilter struct {
+ // Spec of the image.
+ Image *ImageSpec `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"`
+}
+
+func (m *ImageFilter) Reset() { *m = ImageFilter{} }
+func (*ImageFilter) ProtoMessage() {}
+func (*ImageFilter) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{62} }
+
+func (m *ImageFilter) GetImage() *ImageSpec {
+ if m != nil {
+ return m.Image
+ }
+ return nil
+}
+
+type ListImagesRequest struct {
+ // Filter to list images.
+ Filter *ImageFilter `protobuf:"bytes,1,opt,name=filter" json:"filter,omitempty"`
+}
+
+func (m *ListImagesRequest) Reset() { *m = ListImagesRequest{} }
+func (*ListImagesRequest) ProtoMessage() {}
+func (*ListImagesRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{63} }
+
+func (m *ListImagesRequest) GetFilter() *ImageFilter {
+ if m != nil {
+ return m.Filter
+ }
+ return nil
+}
+
+// Basic information about a container image.
+type Image struct {
+ // ID of the image.
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ // Other names by which this image is known.
+ RepoTags []string `protobuf:"bytes,2,rep,name=repo_tags,json=repoTags" json:"repo_tags,omitempty"`
+ // Digests by which this image is known.
+ RepoDigests []string `protobuf:"bytes,3,rep,name=repo_digests,json=repoDigests" json:"repo_digests,omitempty"`
+ // Size of the image in bytes. Must be > 0.
+ Size_ uint64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"`
+ // UID that will run the command(s). This is used as a default if no user is
+ // specified when creating the container. UID and the following user name
+ // are mutually exclusive.
+ Uid *Int64Value `protobuf:"bytes,5,opt,name=uid" json:"uid,omitempty"`
+ // User name that will run the command(s). This is used if UID is not set
+ // and no user is specified when creating container.
+ Username string `protobuf:"bytes,6,opt,name=username,proto3" json:"username,omitempty"`
+}
+
+func (m *Image) Reset() { *m = Image{} }
+func (*Image) ProtoMessage() {}
+func (*Image) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{64} }
+
+func (m *Image) GetId() string {
+ if m != nil {
+ return m.Id
+ }
+ return ""
+}
+
+func (m *Image) GetRepoTags() []string {
+ if m != nil {
+ return m.RepoTags
+ }
+ return nil
+}
+
+func (m *Image) GetRepoDigests() []string {
+ if m != nil {
+ return m.RepoDigests
+ }
+ return nil
+}
+
+func (m *Image) GetSize_() uint64 {
+ if m != nil {
+ return m.Size_
+ }
+ return 0
+}
+
+func (m *Image) GetUid() *Int64Value {
+ if m != nil {
+ return m.Uid
+ }
+ return nil
+}
+
+func (m *Image) GetUsername() string {
+ if m != nil {
+ return m.Username
+ }
+ return ""
+}
+
+type ListImagesResponse struct {
+ // List of images.
+ Images []*Image `protobuf:"bytes,1,rep,name=images" json:"images,omitempty"`
+}
+
+func (m *ListImagesResponse) Reset() { *m = ListImagesResponse{} }
+func (*ListImagesResponse) ProtoMessage() {}
+func (*ListImagesResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{65} }
+
+func (m *ListImagesResponse) GetImages() []*Image {
+ if m != nil {
+ return m.Images
+ }
+ return nil
+}
+
+type ImageStatusRequest struct {
+ // Spec of the image.
+ Image *ImageSpec `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"`
+}
+
+func (m *ImageStatusRequest) Reset() { *m = ImageStatusRequest{} }
+func (*ImageStatusRequest) ProtoMessage() {}
+func (*ImageStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{66} }
+
+func (m *ImageStatusRequest) GetImage() *ImageSpec {
+ if m != nil {
+ return m.Image
+ }
+ return nil
+}
+
+type ImageStatusResponse struct {
+ // Status of the image.
+ Image *Image `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"`
+}
+
+func (m *ImageStatusResponse) Reset() { *m = ImageStatusResponse{} }
+func (*ImageStatusResponse) ProtoMessage() {}
+func (*ImageStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{67} }
+
+func (m *ImageStatusResponse) GetImage() *Image {
+ if m != nil {
+ return m.Image
+ }
+ return nil
+}
+
+// AuthConfig contains authorization information for connecting to a registry.
+type AuthConfig struct {
+ Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
+ Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
+ Auth string `protobuf:"bytes,3,opt,name=auth,proto3" json:"auth,omitempty"`
+ ServerAddress string `protobuf:"bytes,4,opt,name=server_address,json=serverAddress,proto3" json:"server_address,omitempty"`
+ // IdentityToken is used to authenticate the user and get
+ // an access token for the registry.
+ IdentityToken string `protobuf:"bytes,5,opt,name=identity_token,json=identityToken,proto3" json:"identity_token,omitempty"`
+ // RegistryToken is a bearer token to be sent to a registry
+ RegistryToken string `protobuf:"bytes,6,opt,name=registry_token,json=registryToken,proto3" json:"registry_token,omitempty"`
+}
+
+func (m *AuthConfig) Reset() { *m = AuthConfig{} }
+func (*AuthConfig) ProtoMessage() {}
+func (*AuthConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{68} }
+
+func (m *AuthConfig) GetUsername() string {
+ if m != nil {
+ return m.Username
+ }
+ return ""
+}
+
+func (m *AuthConfig) GetPassword() string {
+ if m != nil {
+ return m.Password
+ }
+ return ""
+}
+
+func (m *AuthConfig) GetAuth() string {
+ if m != nil {
+ return m.Auth
+ }
+ return ""
+}
+
+func (m *AuthConfig) GetServerAddress() string {
+ if m != nil {
+ return m.ServerAddress
+ }
+ return ""
+}
+
+func (m *AuthConfig) GetIdentityToken() string {
+ if m != nil {
+ return m.IdentityToken
+ }
+ return ""
+}
+
+func (m *AuthConfig) GetRegistryToken() string {
+ if m != nil {
+ return m.RegistryToken
+ }
+ return ""
+}
+
+type PullImageRequest struct {
+ // Spec of the image.
+ Image *ImageSpec `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"`
+ // Authentication configuration for pulling the image.
+ Auth *AuthConfig `protobuf:"bytes,2,opt,name=auth" json:"auth,omitempty"`
+ // Config of the PodSandbox, which is used to pull image in PodSandbox context.
+ SandboxConfig *PodSandboxConfig `protobuf:"bytes,3,opt,name=sandbox_config,json=sandboxConfig" json:"sandbox_config,omitempty"`
+}
+
+func (m *PullImageRequest) Reset() { *m = PullImageRequest{} }
+func (*PullImageRequest) ProtoMessage() {}
+func (*PullImageRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{69} }
+
+func (m *PullImageRequest) GetImage() *ImageSpec {
+ if m != nil {
+ return m.Image
+ }
+ return nil
+}
+
+func (m *PullImageRequest) GetAuth() *AuthConfig {
+ if m != nil {
+ return m.Auth
+ }
+ return nil
+}
+
+func (m *PullImageRequest) GetSandboxConfig() *PodSandboxConfig {
+ if m != nil {
+ return m.SandboxConfig
+ }
+ return nil
+}
+
+type PullImageResponse struct {
+ // Reference to the image in use. For most runtimes, this should be an
+ // image ID or digest.
+ ImageRef string `protobuf:"bytes,1,opt,name=image_ref,json=imageRef,proto3" json:"image_ref,omitempty"`
+}
+
+func (m *PullImageResponse) Reset() { *m = PullImageResponse{} }
+func (*PullImageResponse) ProtoMessage() {}
+func (*PullImageResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{70} }
+
+func (m *PullImageResponse) GetImageRef() string {
+ if m != nil {
+ return m.ImageRef
+ }
+ return ""
+}
+
+type RemoveImageRequest struct {
+ // Spec of the image to remove.
+ Image *ImageSpec `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"`
+}
+
+func (m *RemoveImageRequest) Reset() { *m = RemoveImageRequest{} }
+func (*RemoveImageRequest) ProtoMessage() {}
+func (*RemoveImageRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{71} }
+
+func (m *RemoveImageRequest) GetImage() *ImageSpec {
+ if m != nil {
+ return m.Image
+ }
+ return nil
+}
+
+type RemoveImageResponse struct {
+}
+
+func (m *RemoveImageResponse) Reset() { *m = RemoveImageResponse{} }
+func (*RemoveImageResponse) ProtoMessage() {}
+func (*RemoveImageResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{72} }
+
+type NetworkConfig struct {
+ // CIDR to use for pod IP addresses.
+ PodCidr string `protobuf:"bytes,1,opt,name=pod_cidr,json=podCidr,proto3" json:"pod_cidr,omitempty"`
+}
+
+func (m *NetworkConfig) Reset() { *m = NetworkConfig{} }
+func (*NetworkConfig) ProtoMessage() {}
+func (*NetworkConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{73} }
+
+func (m *NetworkConfig) GetPodCidr() string {
+ if m != nil {
+ return m.PodCidr
+ }
+ return ""
+}
+
+type RuntimeConfig struct {
+ NetworkConfig *NetworkConfig `protobuf:"bytes,1,opt,name=network_config,json=networkConfig" json:"network_config,omitempty"`
+}
+
+func (m *RuntimeConfig) Reset() { *m = RuntimeConfig{} }
+func (*RuntimeConfig) ProtoMessage() {}
+func (*RuntimeConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{74} }
+
+func (m *RuntimeConfig) GetNetworkConfig() *NetworkConfig {
+ if m != nil {
+ return m.NetworkConfig
+ }
+ return nil
+}
+
+type UpdateRuntimeConfigRequest struct {
+ RuntimeConfig *RuntimeConfig `protobuf:"bytes,1,opt,name=runtime_config,json=runtimeConfig" json:"runtime_config,omitempty"`
+}
+
+func (m *UpdateRuntimeConfigRequest) Reset() { *m = UpdateRuntimeConfigRequest{} }
+func (*UpdateRuntimeConfigRequest) ProtoMessage() {}
+func (*UpdateRuntimeConfigRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{75} }
+
+func (m *UpdateRuntimeConfigRequest) GetRuntimeConfig() *RuntimeConfig {
+ if m != nil {
+ return m.RuntimeConfig
+ }
+ return nil
+}
+
+type UpdateRuntimeConfigResponse struct {
+}
+
+func (m *UpdateRuntimeConfigResponse) Reset() { *m = UpdateRuntimeConfigResponse{} }
+func (*UpdateRuntimeConfigResponse) ProtoMessage() {}
+func (*UpdateRuntimeConfigResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{76} }
+
+// RuntimeCondition contains condition information for the runtime.
+// There are 2 kinds of runtime conditions:
+// 1. Required conditions: Conditions are required for kubelet to work
+// properly. If any required condition is unmet, the node will be not ready.
+// The required conditions include:
+// * RuntimeReady: RuntimeReady means the runtime is up and ready to accept
+// basic containers e.g. container only needs host network.
+// * NetworkReady: NetworkReady means the runtime network is up and ready to
+// accept containers which require container network.
+// 2. Optional conditions: Conditions are informative to the user, but kubelet
+// will not rely on. Since condition type is an arbitrary string, all conditions
+// not required are optional. These conditions will be exposed to users to help
+// them understand the status of the system.
+type RuntimeCondition struct {
+ // Type of runtime condition.
+ Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
+ // Status of the condition, one of true/false. Default: false.
+ Status bool `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
+ // Brief CamelCase string containing reason for the condition's last transition.
+ Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"`
+ // Human-readable message indicating details about last transition.
+ Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"`
+}
+
+func (m *RuntimeCondition) Reset() { *m = RuntimeCondition{} }
+func (*RuntimeCondition) ProtoMessage() {}
+func (*RuntimeCondition) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{77} }
+
+func (m *RuntimeCondition) GetType() string {
+ if m != nil {
+ return m.Type
+ }
+ return ""
+}
+
+func (m *RuntimeCondition) GetStatus() bool {
+ if m != nil {
+ return m.Status
+ }
+ return false
+}
+
+func (m *RuntimeCondition) GetReason() string {
+ if m != nil {
+ return m.Reason
+ }
+ return ""
+}
+
+func (m *RuntimeCondition) GetMessage() string {
+ if m != nil {
+ return m.Message
+ }
+ return ""
+}
+
+// RuntimeStatus is information about the current status of the runtime.
+type RuntimeStatus struct {
+ // List of current observed runtime conditions.
+ Conditions []*RuntimeCondition `protobuf:"bytes,1,rep,name=conditions" json:"conditions,omitempty"`
+}
+
+func (m *RuntimeStatus) Reset() { *m = RuntimeStatus{} }
+func (*RuntimeStatus) ProtoMessage() {}
+func (*RuntimeStatus) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{78} }
+
+func (m *RuntimeStatus) GetConditions() []*RuntimeCondition {
+ if m != nil {
+ return m.Conditions
+ }
+ return nil
+}
+
+type StatusRequest struct {
+}
+
+func (m *StatusRequest) Reset() { *m = StatusRequest{} }
+func (*StatusRequest) ProtoMessage() {}
+func (*StatusRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{79} }
+
+type StatusResponse struct {
+ // Status of the Runtime.
+ Status *RuntimeStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
+}
+
+func (m *StatusResponse) Reset() { *m = StatusResponse{} }
+func (*StatusResponse) ProtoMessage() {}
+func (*StatusResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{80} }
+
+func (m *StatusResponse) GetStatus() *RuntimeStatus {
+ if m != nil {
+ return m.Status
+ }
+ return nil
+}
+
+type ImageFsInfoRequest struct {
+}
+
+func (m *ImageFsInfoRequest) Reset() { *m = ImageFsInfoRequest{} }
+func (*ImageFsInfoRequest) ProtoMessage() {}
+func (*ImageFsInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{81} }
+
+// UInt64Value is the wrapper of uint64.
+type UInt64Value struct {
+ // The value.
+ Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
+}
+
+func (m *UInt64Value) Reset() { *m = UInt64Value{} }
+func (*UInt64Value) ProtoMessage() {}
+func (*UInt64Value) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{82} }
+
+func (m *UInt64Value) GetValue() uint64 {
+ if m != nil {
+ return m.Value
+ }
+ return 0
+}
+
+// StorageIdentifier uniquely identify the storage..
+type StorageIdentifier struct {
+ // UUID of the device.
+ Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
+}
+
+func (m *StorageIdentifier) Reset() { *m = StorageIdentifier{} }
+func (*StorageIdentifier) ProtoMessage() {}
+func (*StorageIdentifier) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{83} }
+
+func (m *StorageIdentifier) GetUuid() string {
+ if m != nil {
+ return m.Uuid
+ }
+ return ""
+}
+
+// FilesystemUsage provides the filesystem usage information.
+type FilesystemUsage struct {
+ // Timestamp in nanoseconds at which the information were collected. Must be > 0.
+ Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
+ // The underlying storage of the filesystem.
+ StorageId *StorageIdentifier `protobuf:"bytes,2,opt,name=storage_id,json=storageId" json:"storage_id,omitempty"`
+ // UsedBytes represents the bytes used for images on the filesystem.
+ // This may differ from the total bytes used on the filesystem and may not
+ // equal CapacityBytes - AvailableBytes.
+ UsedBytes *UInt64Value `protobuf:"bytes,3,opt,name=used_bytes,json=usedBytes" json:"used_bytes,omitempty"`
+ // InodesUsed represents the inodes used by the images.
+ // This may not equal InodesCapacity - InodesAvailable because the underlying
+ // filesystem may also be used for purposes other than storing images.
+ InodesUsed *UInt64Value `protobuf:"bytes,4,opt,name=inodes_used,json=inodesUsed" json:"inodes_used,omitempty"`
+}
+
+func (m *FilesystemUsage) Reset() { *m = FilesystemUsage{} }
+func (*FilesystemUsage) ProtoMessage() {}
+func (*FilesystemUsage) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{84} }
+
+func (m *FilesystemUsage) GetTimestamp() int64 {
+ if m != nil {
+ return m.Timestamp
+ }
+ return 0
+}
+
+func (m *FilesystemUsage) GetStorageId() *StorageIdentifier {
+ if m != nil {
+ return m.StorageId
+ }
+ return nil
+}
+
+func (m *FilesystemUsage) GetUsedBytes() *UInt64Value {
+ if m != nil {
+ return m.UsedBytes
+ }
+ return nil
+}
+
+func (m *FilesystemUsage) GetInodesUsed() *UInt64Value {
+ if m != nil {
+ return m.InodesUsed
+ }
+ return nil
+}
+
+type ImageFsInfoResponse struct {
+ // Information of image filesystem(s).
+ ImageFilesystems []*FilesystemUsage `protobuf:"bytes,1,rep,name=image_filesystems,json=imageFilesystems" json:"image_filesystems,omitempty"`
+}
+
+func (m *ImageFsInfoResponse) Reset() { *m = ImageFsInfoResponse{} }
+func (*ImageFsInfoResponse) ProtoMessage() {}
+func (*ImageFsInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{85} }
+
+func (m *ImageFsInfoResponse) GetImageFilesystems() []*FilesystemUsage {
+ if m != nil {
+ return m.ImageFilesystems
+ }
+ return nil
+}
+
+type ContainerStatsRequest struct {
+ // ID of the container for which to retrieve stats.
+ ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+}
+
+func (m *ContainerStatsRequest) Reset() { *m = ContainerStatsRequest{} }
+func (*ContainerStatsRequest) ProtoMessage() {}
+func (*ContainerStatsRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{86} }
+
+func (m *ContainerStatsRequest) GetContainerId() string {
+ if m != nil {
+ return m.ContainerId
+ }
+ return ""
+}
+
+type ContainerStatsResponse struct {
+ // Stats of the container.
+ Stats *ContainerStats `protobuf:"bytes,1,opt,name=stats" json:"stats,omitempty"`
+}
+
+func (m *ContainerStatsResponse) Reset() { *m = ContainerStatsResponse{} }
+func (*ContainerStatsResponse) ProtoMessage() {}
+func (*ContainerStatsResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{87} }
+
+func (m *ContainerStatsResponse) GetStats() *ContainerStats {
+ if m != nil {
+ return m.Stats
+ }
+ return nil
+}
+
+type ListContainerStatsRequest struct {
+ // Filter for the list request.
+ Filter *ContainerStatsFilter `protobuf:"bytes,1,opt,name=filter" json:"filter,omitempty"`
+}
+
+func (m *ListContainerStatsRequest) Reset() { *m = ListContainerStatsRequest{} }
+func (*ListContainerStatsRequest) ProtoMessage() {}
+func (*ListContainerStatsRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{88} }
+
+func (m *ListContainerStatsRequest) GetFilter() *ContainerStatsFilter {
+ if m != nil {
+ return m.Filter
+ }
+ return nil
+}
+
+// ContainerStatsFilter is used to filter containers.
+// All those fields are combined with 'AND'
+type ContainerStatsFilter struct {
+ // ID of the container.
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ // ID of the PodSandbox.
+ PodSandboxId string `protobuf:"bytes,2,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"`
+ // LabelSelector to select matches.
+ // Only api.MatchLabels is supported for now and the requirements
+ // are ANDed. MatchExpressions is not supported yet.
+ LabelSelector map[string]string `protobuf:"bytes,3,rep,name=label_selector,json=labelSelector" json:"label_selector,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+}
+
+func (m *ContainerStatsFilter) Reset() { *m = ContainerStatsFilter{} }
+func (*ContainerStatsFilter) ProtoMessage() {}
+func (*ContainerStatsFilter) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{89} }
+
+func (m *ContainerStatsFilter) GetId() string {
+ if m != nil {
+ return m.Id
+ }
+ return ""
+}
+
+func (m *ContainerStatsFilter) GetPodSandboxId() string {
+ if m != nil {
+ return m.PodSandboxId
+ }
+ return ""
+}
+
+func (m *ContainerStatsFilter) GetLabelSelector() map[string]string {
+ if m != nil {
+ return m.LabelSelector
+ }
+ return nil
+}
+
+type ListContainerStatsResponse struct {
+ // Stats of the container.
+ Stats []*ContainerStats `protobuf:"bytes,1,rep,name=stats" json:"stats,omitempty"`
+}
+
+func (m *ListContainerStatsResponse) Reset() { *m = ListContainerStatsResponse{} }
+func (*ListContainerStatsResponse) ProtoMessage() {}
+func (*ListContainerStatsResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{90} }
+
+func (m *ListContainerStatsResponse) GetStats() []*ContainerStats {
+ if m != nil {
+ return m.Stats
+ }
+ return nil
+}
+
+// ContainerAttributes provides basic information of the container.
+type ContainerAttributes struct {
+ // ID of the container.
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ // Metadata of the container.
+ Metadata *ContainerMetadata `protobuf:"bytes,2,opt,name=metadata" json:"metadata,omitempty"`
+ // Key-value pairs that may be used to scope and select individual resources.
+ Labels map[string]string `protobuf:"bytes,3,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // Unstructured key-value map holding arbitrary metadata.
+ // Annotations MUST NOT be altered by the runtime; the value of this field
+ // MUST be identical to that of the corresponding ContainerConfig used to
+ // instantiate the Container this status represents.
+ Annotations map[string]string `protobuf:"bytes,4,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+}
+
+func (m *ContainerAttributes) Reset() { *m = ContainerAttributes{} }
+func (*ContainerAttributes) ProtoMessage() {}
+func (*ContainerAttributes) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{91} }
+
+func (m *ContainerAttributes) GetId() string {
+ if m != nil {
+ return m.Id
+ }
+ return ""
+}
+
+func (m *ContainerAttributes) GetMetadata() *ContainerMetadata {
+ if m != nil {
+ return m.Metadata
+ }
+ return nil
+}
+
+func (m *ContainerAttributes) GetLabels() map[string]string {
+ if m != nil {
+ return m.Labels
+ }
+ return nil
+}
+
+func (m *ContainerAttributes) GetAnnotations() map[string]string {
+ if m != nil {
+ return m.Annotations
+ }
+ return nil
+}
+
+// ContainerStats provides the resource usage statistics for a container.
+type ContainerStats struct {
+ // Information of the container.
+ Attributes *ContainerAttributes `protobuf:"bytes,1,opt,name=attributes" json:"attributes,omitempty"`
+ // CPU usage gathered from the container.
+ Cpu *CpuUsage `protobuf:"bytes,2,opt,name=cpu" json:"cpu,omitempty"`
+ // Memory usage gathered from the container.
+ Memory *MemoryUsage `protobuf:"bytes,3,opt,name=memory" json:"memory,omitempty"`
+ // Usage of the writeable layer.
+ WritableLayer *FilesystemUsage `protobuf:"bytes,4,opt,name=writable_layer,json=writableLayer" json:"writable_layer,omitempty"`
+}
+
+func (m *ContainerStats) Reset() { *m = ContainerStats{} }
+func (*ContainerStats) ProtoMessage() {}
+func (*ContainerStats) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{92} }
+
+func (m *ContainerStats) GetAttributes() *ContainerAttributes {
+ if m != nil {
+ return m.Attributes
+ }
+ return nil
+}
+
+func (m *ContainerStats) GetCpu() *CpuUsage {
+ if m != nil {
+ return m.Cpu
+ }
+ return nil
+}
+
+func (m *ContainerStats) GetMemory() *MemoryUsage {
+ if m != nil {
+ return m.Memory
+ }
+ return nil
+}
+
+func (m *ContainerStats) GetWritableLayer() *FilesystemUsage {
+ if m != nil {
+ return m.WritableLayer
+ }
+ return nil
+}
+
+// CpuUsage provides the CPU usage information.
+type CpuUsage struct {
+ // Timestamp in nanoseconds at which the information were collected. Must be > 0.
+ Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
+ // Cumulative CPU usage (sum across all cores) since object creation.
+ UsageCoreNanoSeconds *UInt64Value `protobuf:"bytes,2,opt,name=usage_core_nano_seconds,json=usageCoreNanoSeconds" json:"usage_core_nano_seconds,omitempty"`
+}
+
+func (m *CpuUsage) Reset() { *m = CpuUsage{} }
+func (*CpuUsage) ProtoMessage() {}
+func (*CpuUsage) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{93} }
+
+func (m *CpuUsage) GetTimestamp() int64 {
+ if m != nil {
+ return m.Timestamp
+ }
+ return 0
+}
+
+func (m *CpuUsage) GetUsageCoreNanoSeconds() *UInt64Value {
+ if m != nil {
+ return m.UsageCoreNanoSeconds
+ }
+ return nil
+}
+
+// MemoryUsage provides the memory usage information.
+type MemoryUsage struct {
+ // Timestamp in nanoseconds at which the information were collected. Must be > 0.
+ Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
+ // The amount of working set memory in bytes.
+ WorkingSetBytes *UInt64Value `protobuf:"bytes,2,opt,name=working_set_bytes,json=workingSetBytes" json:"working_set_bytes,omitempty"`
+}
+
+func (m *MemoryUsage) Reset() { *m = MemoryUsage{} }
+func (*MemoryUsage) ProtoMessage() {}
+func (*MemoryUsage) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{94} }
+
+func (m *MemoryUsage) GetTimestamp() int64 {
+ if m != nil {
+ return m.Timestamp
+ }
+ return 0
+}
+
+func (m *MemoryUsage) GetWorkingSetBytes() *UInt64Value {
+ if m != nil {
+ return m.WorkingSetBytes
+ }
+ return nil
+}
+
+func init() {
+ proto.RegisterType((*VersionRequest)(nil), "runtime.VersionRequest")
+ proto.RegisterType((*VersionResponse)(nil), "runtime.VersionResponse")
+ proto.RegisterType((*DNSConfig)(nil), "runtime.DNSConfig")
+ proto.RegisterType((*PortMapping)(nil), "runtime.PortMapping")
+ proto.RegisterType((*Mount)(nil), "runtime.Mount")
+ proto.RegisterType((*NamespaceOption)(nil), "runtime.NamespaceOption")
+ proto.RegisterType((*Int64Value)(nil), "runtime.Int64Value")
+ proto.RegisterType((*LinuxSandboxSecurityContext)(nil), "runtime.LinuxSandboxSecurityContext")
+ proto.RegisterType((*LinuxPodSandboxConfig)(nil), "runtime.LinuxPodSandboxConfig")
+ proto.RegisterType((*PodSandboxMetadata)(nil), "runtime.PodSandboxMetadata")
+ proto.RegisterType((*PodSandboxConfig)(nil), "runtime.PodSandboxConfig")
+ proto.RegisterType((*RunPodSandboxRequest)(nil), "runtime.RunPodSandboxRequest")
+ proto.RegisterType((*RunPodSandboxResponse)(nil), "runtime.RunPodSandboxResponse")
+ proto.RegisterType((*StopPodSandboxRequest)(nil), "runtime.StopPodSandboxRequest")
+ proto.RegisterType((*StopPodSandboxResponse)(nil), "runtime.StopPodSandboxResponse")
+ proto.RegisterType((*RemovePodSandboxRequest)(nil), "runtime.RemovePodSandboxRequest")
+ proto.RegisterType((*RemovePodSandboxResponse)(nil), "runtime.RemovePodSandboxResponse")
+ proto.RegisterType((*PodSandboxStatusRequest)(nil), "runtime.PodSandboxStatusRequest")
+ proto.RegisterType((*PodSandboxNetworkStatus)(nil), "runtime.PodSandboxNetworkStatus")
+ proto.RegisterType((*Namespace)(nil), "runtime.Namespace")
+ proto.RegisterType((*LinuxPodSandboxStatus)(nil), "runtime.LinuxPodSandboxStatus")
+ proto.RegisterType((*PodSandboxStatus)(nil), "runtime.PodSandboxStatus")
+ proto.RegisterType((*PodSandboxStatusResponse)(nil), "runtime.PodSandboxStatusResponse")
+ proto.RegisterType((*PodSandboxStateValue)(nil), "runtime.PodSandboxStateValue")
+ proto.RegisterType((*PodSandboxFilter)(nil), "runtime.PodSandboxFilter")
+ proto.RegisterType((*ListPodSandboxRequest)(nil), "runtime.ListPodSandboxRequest")
+ proto.RegisterType((*PodSandbox)(nil), "runtime.PodSandbox")
+ proto.RegisterType((*ListPodSandboxResponse)(nil), "runtime.ListPodSandboxResponse")
+ proto.RegisterType((*ImageSpec)(nil), "runtime.ImageSpec")
+ proto.RegisterType((*KeyValue)(nil), "runtime.KeyValue")
+ proto.RegisterType((*LinuxContainerResources)(nil), "runtime.LinuxContainerResources")
+ proto.RegisterType((*SELinuxOption)(nil), "runtime.SELinuxOption")
+ proto.RegisterType((*Capability)(nil), "runtime.Capability")
+ proto.RegisterType((*LinuxContainerSecurityContext)(nil), "runtime.LinuxContainerSecurityContext")
+ proto.RegisterType((*LinuxContainerConfig)(nil), "runtime.LinuxContainerConfig")
+ proto.RegisterType((*ContainerMetadata)(nil), "runtime.ContainerMetadata")
+ proto.RegisterType((*Device)(nil), "runtime.Device")
+ proto.RegisterType((*ContainerConfig)(nil), "runtime.ContainerConfig")
+ proto.RegisterType((*CreateContainerRequest)(nil), "runtime.CreateContainerRequest")
+ proto.RegisterType((*CreateContainerResponse)(nil), "runtime.CreateContainerResponse")
+ proto.RegisterType((*StartContainerRequest)(nil), "runtime.StartContainerRequest")
+ proto.RegisterType((*StartContainerResponse)(nil), "runtime.StartContainerResponse")
+ proto.RegisterType((*StopContainerRequest)(nil), "runtime.StopContainerRequest")
+ proto.RegisterType((*StopContainerResponse)(nil), "runtime.StopContainerResponse")
+ proto.RegisterType((*RemoveContainerRequest)(nil), "runtime.RemoveContainerRequest")
+ proto.RegisterType((*RemoveContainerResponse)(nil), "runtime.RemoveContainerResponse")
+ proto.RegisterType((*ContainerStateValue)(nil), "runtime.ContainerStateValue")
+ proto.RegisterType((*ContainerFilter)(nil), "runtime.ContainerFilter")
+ proto.RegisterType((*ListContainersRequest)(nil), "runtime.ListContainersRequest")
+ proto.RegisterType((*Container)(nil), "runtime.Container")
+ proto.RegisterType((*ListContainersResponse)(nil), "runtime.ListContainersResponse")
+ proto.RegisterType((*ContainerStatusRequest)(nil), "runtime.ContainerStatusRequest")
+ proto.RegisterType((*ContainerStatus)(nil), "runtime.ContainerStatus")
+ proto.RegisterType((*ContainerStatusResponse)(nil), "runtime.ContainerStatusResponse")
+ proto.RegisterType((*ExecSyncRequest)(nil), "runtime.ExecSyncRequest")
+ proto.RegisterType((*ExecSyncResponse)(nil), "runtime.ExecSyncResponse")
+ proto.RegisterType((*ExecRequest)(nil), "runtime.ExecRequest")
+ proto.RegisterType((*ExecResponse)(nil), "runtime.ExecResponse")
+ proto.RegisterType((*AttachRequest)(nil), "runtime.AttachRequest")
+ proto.RegisterType((*AttachResponse)(nil), "runtime.AttachResponse")
+ proto.RegisterType((*PortForwardRequest)(nil), "runtime.PortForwardRequest")
+ proto.RegisterType((*PortForwardResponse)(nil), "runtime.PortForwardResponse")
+ proto.RegisterType((*ImageFilter)(nil), "runtime.ImageFilter")
+ proto.RegisterType((*ListImagesRequest)(nil), "runtime.ListImagesRequest")
+ proto.RegisterType((*Image)(nil), "runtime.Image")
+ proto.RegisterType((*ListImagesResponse)(nil), "runtime.ListImagesResponse")
+ proto.RegisterType((*ImageStatusRequest)(nil), "runtime.ImageStatusRequest")
+ proto.RegisterType((*ImageStatusResponse)(nil), "runtime.ImageStatusResponse")
+ proto.RegisterType((*AuthConfig)(nil), "runtime.AuthConfig")
+ proto.RegisterType((*PullImageRequest)(nil), "runtime.PullImageRequest")
+ proto.RegisterType((*PullImageResponse)(nil), "runtime.PullImageResponse")
+ proto.RegisterType((*RemoveImageRequest)(nil), "runtime.RemoveImageRequest")
+ proto.RegisterType((*RemoveImageResponse)(nil), "runtime.RemoveImageResponse")
+ proto.RegisterType((*NetworkConfig)(nil), "runtime.NetworkConfig")
+ proto.RegisterType((*RuntimeConfig)(nil), "runtime.RuntimeConfig")
+ proto.RegisterType((*UpdateRuntimeConfigRequest)(nil), "runtime.UpdateRuntimeConfigRequest")
+ proto.RegisterType((*UpdateRuntimeConfigResponse)(nil), "runtime.UpdateRuntimeConfigResponse")
+ proto.RegisterType((*RuntimeCondition)(nil), "runtime.RuntimeCondition")
+ proto.RegisterType((*RuntimeStatus)(nil), "runtime.RuntimeStatus")
+ proto.RegisterType((*StatusRequest)(nil), "runtime.StatusRequest")
+ proto.RegisterType((*StatusResponse)(nil), "runtime.StatusResponse")
+ proto.RegisterType((*ImageFsInfoRequest)(nil), "runtime.ImageFsInfoRequest")
+ proto.RegisterType((*UInt64Value)(nil), "runtime.UInt64Value")
+ proto.RegisterType((*StorageIdentifier)(nil), "runtime.StorageIdentifier")
+ proto.RegisterType((*FilesystemUsage)(nil), "runtime.FilesystemUsage")
+ proto.RegisterType((*ImageFsInfoResponse)(nil), "runtime.ImageFsInfoResponse")
+ proto.RegisterType((*ContainerStatsRequest)(nil), "runtime.ContainerStatsRequest")
+ proto.RegisterType((*ContainerStatsResponse)(nil), "runtime.ContainerStatsResponse")
+ proto.RegisterType((*ListContainerStatsRequest)(nil), "runtime.ListContainerStatsRequest")
+ proto.RegisterType((*ContainerStatsFilter)(nil), "runtime.ContainerStatsFilter")
+ proto.RegisterType((*ListContainerStatsResponse)(nil), "runtime.ListContainerStatsResponse")
+ proto.RegisterType((*ContainerAttributes)(nil), "runtime.ContainerAttributes")
+ proto.RegisterType((*ContainerStats)(nil), "runtime.ContainerStats")
+ proto.RegisterType((*CpuUsage)(nil), "runtime.CpuUsage")
+ proto.RegisterType((*MemoryUsage)(nil), "runtime.MemoryUsage")
+ proto.RegisterEnum("runtime.Protocol", Protocol_name, Protocol_value)
+ proto.RegisterEnum("runtime.PodSandboxState", PodSandboxState_name, PodSandboxState_value)
+ proto.RegisterEnum("runtime.ContainerState", ContainerState_name, ContainerState_value)
+}
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ context.Context
+var _ grpc.ClientConn
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+const _ = grpc.SupportPackageIsVersion4
+
+// Client API for RuntimeService service
+
+type RuntimeServiceClient interface {
+ // Version returns the runtime name, runtime version, and runtime API version.
+ Version(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*VersionResponse, error)
+ // RunPodSandbox creates and starts a pod-level sandbox. Runtimes must ensure
+ // the sandbox is in the ready state on success.
+ RunPodSandbox(ctx context.Context, in *RunPodSandboxRequest, opts ...grpc.CallOption) (*RunPodSandboxResponse, error)
+ // StopPodSandbox stops any running process that is part of the sandbox and
+ // reclaims network resources (e.g., IP addresses) allocated to the sandbox.
+ // If there are any running containers in the sandbox, they must be forcibly
+ // terminated.
+ // This call is idempotent, and must not return an error if all relevant
+ // resources have already been reclaimed. kubelet will call StopPodSandbox
+ // at least once before calling RemovePodSandbox. It will also attempt to
+ // reclaim resources eagerly, as soon as a sandbox is not needed. Hence,
+ // multiple StopPodSandbox calls are expected.
+ StopPodSandbox(ctx context.Context, in *StopPodSandboxRequest, opts ...grpc.CallOption) (*StopPodSandboxResponse, error)
+ // RemovePodSandbox removes the sandbox. If there are any running containers
+ // in the sandbox, they must be forcibly terminated and removed.
+ // This call is idempotent, and must not return an error if the sandbox has
+ // already been removed.
+ RemovePodSandbox(ctx context.Context, in *RemovePodSandboxRequest, opts ...grpc.CallOption) (*RemovePodSandboxResponse, error)
+ // PodSandboxStatus returns the status of the PodSandbox. If the PodSandbox is not
+ // present, returns an error.
+ PodSandboxStatus(ctx context.Context, in *PodSandboxStatusRequest, opts ...grpc.CallOption) (*PodSandboxStatusResponse, error)
+ // ListPodSandbox returns a list of PodSandboxes.
+ ListPodSandbox(ctx context.Context, in *ListPodSandboxRequest, opts ...grpc.CallOption) (*ListPodSandboxResponse, error)
+ // CreateContainer creates a new container in specified PodSandbox
+ CreateContainer(ctx context.Context, in *CreateContainerRequest, opts ...grpc.CallOption) (*CreateContainerResponse, error)
+ // StartContainer starts the container.
+ StartContainer(ctx context.Context, in *StartContainerRequest, opts ...grpc.CallOption) (*StartContainerResponse, error)
+ // StopContainer stops a running container with a grace period (i.e., timeout).
+ // This call is idempotent, and must not return an error if the container has
+ // already been stopped.
+ // TODO: what must the runtime do after the grace period is reached?
+ StopContainer(ctx context.Context, in *StopContainerRequest, opts ...grpc.CallOption) (*StopContainerResponse, error)
+ // RemoveContainer removes the container. If the container is running, the
+ // container must be forcibly removed.
+ // This call is idempotent, and must not return an error if the container has
+ // already been removed.
+ RemoveContainer(ctx context.Context, in *RemoveContainerRequest, opts ...grpc.CallOption) (*RemoveContainerResponse, error)
+ // ListContainers lists all containers by filters.
+ ListContainers(ctx context.Context, in *ListContainersRequest, opts ...grpc.CallOption) (*ListContainersResponse, error)
+ // ContainerStatus returns status of the container. If the container is not
+ // present, returns an error.
+ ContainerStatus(ctx context.Context, in *ContainerStatusRequest, opts ...grpc.CallOption) (*ContainerStatusResponse, error)
+ // ExecSync runs a command in a container synchronously.
+ ExecSync(ctx context.Context, in *ExecSyncRequest, opts ...grpc.CallOption) (*ExecSyncResponse, error)
+ // Exec prepares a streaming endpoint to execute a command in the container.
+ Exec(ctx context.Context, in *ExecRequest, opts ...grpc.CallOption) (*ExecResponse, error)
+ // Attach prepares a streaming endpoint to attach to a running container.
+ Attach(ctx context.Context, in *AttachRequest, opts ...grpc.CallOption) (*AttachResponse, error)
+ // PortForward prepares a streaming endpoint to forward ports from a PodSandbox.
+ PortForward(ctx context.Context, in *PortForwardRequest, opts ...grpc.CallOption) (*PortForwardResponse, error)
+ // ContainerStats returns stats of the container. If the container does not
+ // exist, the call returns an error.
+ ContainerStats(ctx context.Context, in *ContainerStatsRequest, opts ...grpc.CallOption) (*ContainerStatsResponse, error)
+ // ListContainerStats returns stats of all running containers.
+ ListContainerStats(ctx context.Context, in *ListContainerStatsRequest, opts ...grpc.CallOption) (*ListContainerStatsResponse, error)
+ // UpdateRuntimeConfig updates the runtime configuration based on the given request.
+ UpdateRuntimeConfig(ctx context.Context, in *UpdateRuntimeConfigRequest, opts ...grpc.CallOption) (*UpdateRuntimeConfigResponse, error)
+ // Status returns the status of the runtime.
+ Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
+}
+
+type runtimeServiceClient struct {
+ cc *grpc.ClientConn
+}
+
+func NewRuntimeServiceClient(cc *grpc.ClientConn) RuntimeServiceClient {
+ return &runtimeServiceClient{cc}
+}
+
+func (c *runtimeServiceClient) Version(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*VersionResponse, error) {
+ out := new(VersionResponse)
+ err := grpc.Invoke(ctx, "/runtime.RuntimeService/Version", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *runtimeServiceClient) RunPodSandbox(ctx context.Context, in *RunPodSandboxRequest, opts ...grpc.CallOption) (*RunPodSandboxResponse, error) {
+ out := new(RunPodSandboxResponse)
+ err := grpc.Invoke(ctx, "/runtime.RuntimeService/RunPodSandbox", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *runtimeServiceClient) StopPodSandbox(ctx context.Context, in *StopPodSandboxRequest, opts ...grpc.CallOption) (*StopPodSandboxResponse, error) {
+ out := new(StopPodSandboxResponse)
+ err := grpc.Invoke(ctx, "/runtime.RuntimeService/StopPodSandbox", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *runtimeServiceClient) RemovePodSandbox(ctx context.Context, in *RemovePodSandboxRequest, opts ...grpc.CallOption) (*RemovePodSandboxResponse, error) {
+ out := new(RemovePodSandboxResponse)
+ err := grpc.Invoke(ctx, "/runtime.RuntimeService/RemovePodSandbox", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *runtimeServiceClient) PodSandboxStatus(ctx context.Context, in *PodSandboxStatusRequest, opts ...grpc.CallOption) (*PodSandboxStatusResponse, error) {
+ out := new(PodSandboxStatusResponse)
+ err := grpc.Invoke(ctx, "/runtime.RuntimeService/PodSandboxStatus", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *runtimeServiceClient) ListPodSandbox(ctx context.Context, in *ListPodSandboxRequest, opts ...grpc.CallOption) (*ListPodSandboxResponse, error) {
+ out := new(ListPodSandboxResponse)
+ err := grpc.Invoke(ctx, "/runtime.RuntimeService/ListPodSandbox", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *runtimeServiceClient) CreateContainer(ctx context.Context, in *CreateContainerRequest, opts ...grpc.CallOption) (*CreateContainerResponse, error) {
+ out := new(CreateContainerResponse)
+ err := grpc.Invoke(ctx, "/runtime.RuntimeService/CreateContainer", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *runtimeServiceClient) StartContainer(ctx context.Context, in *StartContainerRequest, opts ...grpc.CallOption) (*StartContainerResponse, error) {
+ out := new(StartContainerResponse)
+ err := grpc.Invoke(ctx, "/runtime.RuntimeService/StartContainer", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *runtimeServiceClient) StopContainer(ctx context.Context, in *StopContainerRequest, opts ...grpc.CallOption) (*StopContainerResponse, error) {
+ out := new(StopContainerResponse)
+ err := grpc.Invoke(ctx, "/runtime.RuntimeService/StopContainer", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *runtimeServiceClient) RemoveContainer(ctx context.Context, in *RemoveContainerRequest, opts ...grpc.CallOption) (*RemoveContainerResponse, error) {
+ out := new(RemoveContainerResponse)
+ err := grpc.Invoke(ctx, "/runtime.RuntimeService/RemoveContainer", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *runtimeServiceClient) ListContainers(ctx context.Context, in *ListContainersRequest, opts ...grpc.CallOption) (*ListContainersResponse, error) {
+ out := new(ListContainersResponse)
+ err := grpc.Invoke(ctx, "/runtime.RuntimeService/ListContainers", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *runtimeServiceClient) ContainerStatus(ctx context.Context, in *ContainerStatusRequest, opts ...grpc.CallOption) (*ContainerStatusResponse, error) {
+ out := new(ContainerStatusResponse)
+ err := grpc.Invoke(ctx, "/runtime.RuntimeService/ContainerStatus", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *runtimeServiceClient) ExecSync(ctx context.Context, in *ExecSyncRequest, opts ...grpc.CallOption) (*ExecSyncResponse, error) {
+ out := new(ExecSyncResponse)
+ err := grpc.Invoke(ctx, "/runtime.RuntimeService/ExecSync", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *runtimeServiceClient) Exec(ctx context.Context, in *ExecRequest, opts ...grpc.CallOption) (*ExecResponse, error) {
+ out := new(ExecResponse)
+ err := grpc.Invoke(ctx, "/runtime.RuntimeService/Exec", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *runtimeServiceClient) Attach(ctx context.Context, in *AttachRequest, opts ...grpc.CallOption) (*AttachResponse, error) {
+ out := new(AttachResponse)
+ err := grpc.Invoke(ctx, "/runtime.RuntimeService/Attach", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *runtimeServiceClient) PortForward(ctx context.Context, in *PortForwardRequest, opts ...grpc.CallOption) (*PortForwardResponse, error) {
+ out := new(PortForwardResponse)
+ err := grpc.Invoke(ctx, "/runtime.RuntimeService/PortForward", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *runtimeServiceClient) ContainerStats(ctx context.Context, in *ContainerStatsRequest, opts ...grpc.CallOption) (*ContainerStatsResponse, error) {
+ out := new(ContainerStatsResponse)
+ err := grpc.Invoke(ctx, "/runtime.RuntimeService/ContainerStats", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *runtimeServiceClient) ListContainerStats(ctx context.Context, in *ListContainerStatsRequest, opts ...grpc.CallOption) (*ListContainerStatsResponse, error) {
+ out := new(ListContainerStatsResponse)
+ err := grpc.Invoke(ctx, "/runtime.RuntimeService/ListContainerStats", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *runtimeServiceClient) UpdateRuntimeConfig(ctx context.Context, in *UpdateRuntimeConfigRequest, opts ...grpc.CallOption) (*UpdateRuntimeConfigResponse, error) {
+ out := new(UpdateRuntimeConfigResponse)
+ err := grpc.Invoke(ctx, "/runtime.RuntimeService/UpdateRuntimeConfig", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *runtimeServiceClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) {
+ out := new(StatusResponse)
+ err := grpc.Invoke(ctx, "/runtime.RuntimeService/Status", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// Server API for RuntimeService service
+
+type RuntimeServiceServer interface {
+ // Version returns the runtime name, runtime version, and runtime API version.
+ Version(context.Context, *VersionRequest) (*VersionResponse, error)
+ // RunPodSandbox creates and starts a pod-level sandbox. Runtimes must ensure
+ // the sandbox is in the ready state on success.
+ RunPodSandbox(context.Context, *RunPodSandboxRequest) (*RunPodSandboxResponse, error)
+ // StopPodSandbox stops any running process that is part of the sandbox and
+ // reclaims network resources (e.g., IP addresses) allocated to the sandbox.
+ // If there are any running containers in the sandbox, they must be forcibly
+ // terminated.
+ // This call is idempotent, and must not return an error if all relevant
+ // resources have already been reclaimed. kubelet will call StopPodSandbox
+ // at least once before calling RemovePodSandbox. It will also attempt to
+ // reclaim resources eagerly, as soon as a sandbox is not needed. Hence,
+ // multiple StopPodSandbox calls are expected.
+ StopPodSandbox(context.Context, *StopPodSandboxRequest) (*StopPodSandboxResponse, error)
+ // RemovePodSandbox removes the sandbox. If there are any running containers
+ // in the sandbox, they must be forcibly terminated and removed.
+ // This call is idempotent, and must not return an error if the sandbox has
+ // already been removed.
+ RemovePodSandbox(context.Context, *RemovePodSandboxRequest) (*RemovePodSandboxResponse, error)
+ // PodSandboxStatus returns the status of the PodSandbox. If the PodSandbox is not
+ // present, returns an error.
+ PodSandboxStatus(context.Context, *PodSandboxStatusRequest) (*PodSandboxStatusResponse, error)
+ // ListPodSandbox returns a list of PodSandboxes.
+ ListPodSandbox(context.Context, *ListPodSandboxRequest) (*ListPodSandboxResponse, error)
+ // CreateContainer creates a new container in specified PodSandbox
+ CreateContainer(context.Context, *CreateContainerRequest) (*CreateContainerResponse, error)
+ // StartContainer starts the container.
+ StartContainer(context.Context, *StartContainerRequest) (*StartContainerResponse, error)
+ // StopContainer stops a running container with a grace period (i.e., timeout).
+ // This call is idempotent, and must not return an error if the container has
+ // already been stopped.
+ // TODO: what must the runtime do after the grace period is reached?
+ StopContainer(context.Context, *StopContainerRequest) (*StopContainerResponse, error)
+ // RemoveContainer removes the container. If the container is running, the
+ // container must be forcibly removed.
+ // This call is idempotent, and must not return an error if the container has
+ // already been removed.
+ RemoveContainer(context.Context, *RemoveContainerRequest) (*RemoveContainerResponse, error)
+ // ListContainers lists all containers by filters.
+ ListContainers(context.Context, *ListContainersRequest) (*ListContainersResponse, error)
+ // ContainerStatus returns status of the container. If the container is not
+ // present, returns an error.
+ ContainerStatus(context.Context, *ContainerStatusRequest) (*ContainerStatusResponse, error)
+ // ExecSync runs a command in a container synchronously.
+ ExecSync(context.Context, *ExecSyncRequest) (*ExecSyncResponse, error)
+ // Exec prepares a streaming endpoint to execute a command in the container.
+ Exec(context.Context, *ExecRequest) (*ExecResponse, error)
+ // Attach prepares a streaming endpoint to attach to a running container.
+ Attach(context.Context, *AttachRequest) (*AttachResponse, error)
+ // PortForward prepares a streaming endpoint to forward ports from a PodSandbox.
+ PortForward(context.Context, *PortForwardRequest) (*PortForwardResponse, error)
+ // ContainerStats returns stats of the container. If the container does not
+ // exist, the call returns an error.
+ ContainerStats(context.Context, *ContainerStatsRequest) (*ContainerStatsResponse, error)
+ // ListContainerStats returns stats of all running containers.
+ ListContainerStats(context.Context, *ListContainerStatsRequest) (*ListContainerStatsResponse, error)
+ // UpdateRuntimeConfig updates the runtime configuration based on the given request.
+ UpdateRuntimeConfig(context.Context, *UpdateRuntimeConfigRequest) (*UpdateRuntimeConfigResponse, error)
+ // Status returns the status of the runtime.
+ Status(context.Context, *StatusRequest) (*StatusResponse, error)
+}
+
+func RegisterRuntimeServiceServer(s *grpc.Server, srv RuntimeServiceServer) {
+ s.RegisterService(&_RuntimeService_serviceDesc, srv)
+}
+
+func _RuntimeService_Version_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(VersionRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RuntimeServiceServer).Version(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/runtime.RuntimeService/Version",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RuntimeServiceServer).Version(ctx, req.(*VersionRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _RuntimeService_RunPodSandbox_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(RunPodSandboxRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RuntimeServiceServer).RunPodSandbox(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/runtime.RuntimeService/RunPodSandbox",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RuntimeServiceServer).RunPodSandbox(ctx, req.(*RunPodSandboxRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _RuntimeService_StopPodSandbox_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(StopPodSandboxRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RuntimeServiceServer).StopPodSandbox(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/runtime.RuntimeService/StopPodSandbox",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RuntimeServiceServer).StopPodSandbox(ctx, req.(*StopPodSandboxRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _RuntimeService_RemovePodSandbox_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(RemovePodSandboxRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RuntimeServiceServer).RemovePodSandbox(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/runtime.RuntimeService/RemovePodSandbox",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RuntimeServiceServer).RemovePodSandbox(ctx, req.(*RemovePodSandboxRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _RuntimeService_PodSandboxStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(PodSandboxStatusRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RuntimeServiceServer).PodSandboxStatus(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/runtime.RuntimeService/PodSandboxStatus",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RuntimeServiceServer).PodSandboxStatus(ctx, req.(*PodSandboxStatusRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _RuntimeService_ListPodSandbox_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListPodSandboxRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RuntimeServiceServer).ListPodSandbox(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/runtime.RuntimeService/ListPodSandbox",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RuntimeServiceServer).ListPodSandbox(ctx, req.(*ListPodSandboxRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _RuntimeService_CreateContainer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(CreateContainerRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RuntimeServiceServer).CreateContainer(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/runtime.RuntimeService/CreateContainer",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RuntimeServiceServer).CreateContainer(ctx, req.(*CreateContainerRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _RuntimeService_StartContainer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(StartContainerRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RuntimeServiceServer).StartContainer(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/runtime.RuntimeService/StartContainer",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RuntimeServiceServer).StartContainer(ctx, req.(*StartContainerRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _RuntimeService_StopContainer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(StopContainerRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RuntimeServiceServer).StopContainer(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/runtime.RuntimeService/StopContainer",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RuntimeServiceServer).StopContainer(ctx, req.(*StopContainerRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _RuntimeService_RemoveContainer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(RemoveContainerRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RuntimeServiceServer).RemoveContainer(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/runtime.RuntimeService/RemoveContainer",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RuntimeServiceServer).RemoveContainer(ctx, req.(*RemoveContainerRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _RuntimeService_ListContainers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListContainersRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RuntimeServiceServer).ListContainers(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/runtime.RuntimeService/ListContainers",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RuntimeServiceServer).ListContainers(ctx, req.(*ListContainersRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _RuntimeService_ContainerStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ContainerStatusRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RuntimeServiceServer).ContainerStatus(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/runtime.RuntimeService/ContainerStatus",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RuntimeServiceServer).ContainerStatus(ctx, req.(*ContainerStatusRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _RuntimeService_ExecSync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ExecSyncRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RuntimeServiceServer).ExecSync(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/runtime.RuntimeService/ExecSync",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RuntimeServiceServer).ExecSync(ctx, req.(*ExecSyncRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _RuntimeService_Exec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ExecRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RuntimeServiceServer).Exec(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/runtime.RuntimeService/Exec",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RuntimeServiceServer).Exec(ctx, req.(*ExecRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _RuntimeService_Attach_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(AttachRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RuntimeServiceServer).Attach(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/runtime.RuntimeService/Attach",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RuntimeServiceServer).Attach(ctx, req.(*AttachRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _RuntimeService_PortForward_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(PortForwardRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RuntimeServiceServer).PortForward(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/runtime.RuntimeService/PortForward",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RuntimeServiceServer).PortForward(ctx, req.(*PortForwardRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _RuntimeService_ContainerStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ContainerStatsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RuntimeServiceServer).ContainerStats(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/runtime.RuntimeService/ContainerStats",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RuntimeServiceServer).ContainerStats(ctx, req.(*ContainerStatsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _RuntimeService_ListContainerStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListContainerStatsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RuntimeServiceServer).ListContainerStats(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/runtime.RuntimeService/ListContainerStats",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RuntimeServiceServer).ListContainerStats(ctx, req.(*ListContainerStatsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _RuntimeService_UpdateRuntimeConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(UpdateRuntimeConfigRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RuntimeServiceServer).UpdateRuntimeConfig(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/runtime.RuntimeService/UpdateRuntimeConfig",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RuntimeServiceServer).UpdateRuntimeConfig(ctx, req.(*UpdateRuntimeConfigRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _RuntimeService_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(StatusRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RuntimeServiceServer).Status(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/runtime.RuntimeService/Status",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RuntimeServiceServer).Status(ctx, req.(*StatusRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+var _RuntimeService_serviceDesc = grpc.ServiceDesc{
+ ServiceName: "runtime.RuntimeService",
+ HandlerType: (*RuntimeServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "Version",
+ Handler: _RuntimeService_Version_Handler,
+ },
+ {
+ MethodName: "RunPodSandbox",
+ Handler: _RuntimeService_RunPodSandbox_Handler,
+ },
+ {
+ MethodName: "StopPodSandbox",
+ Handler: _RuntimeService_StopPodSandbox_Handler,
+ },
+ {
+ MethodName: "RemovePodSandbox",
+ Handler: _RuntimeService_RemovePodSandbox_Handler,
+ },
+ {
+ MethodName: "PodSandboxStatus",
+ Handler: _RuntimeService_PodSandboxStatus_Handler,
+ },
+ {
+ MethodName: "ListPodSandbox",
+ Handler: _RuntimeService_ListPodSandbox_Handler,
+ },
+ {
+ MethodName: "CreateContainer",
+ Handler: _RuntimeService_CreateContainer_Handler,
+ },
+ {
+ MethodName: "StartContainer",
+ Handler: _RuntimeService_StartContainer_Handler,
+ },
+ {
+ MethodName: "StopContainer",
+ Handler: _RuntimeService_StopContainer_Handler,
+ },
+ {
+ MethodName: "RemoveContainer",
+ Handler: _RuntimeService_RemoveContainer_Handler,
+ },
+ {
+ MethodName: "ListContainers",
+ Handler: _RuntimeService_ListContainers_Handler,
+ },
+ {
+ MethodName: "ContainerStatus",
+ Handler: _RuntimeService_ContainerStatus_Handler,
+ },
+ {
+ MethodName: "ExecSync",
+ Handler: _RuntimeService_ExecSync_Handler,
+ },
+ {
+ MethodName: "Exec",
+ Handler: _RuntimeService_Exec_Handler,
+ },
+ {
+ MethodName: "Attach",
+ Handler: _RuntimeService_Attach_Handler,
+ },
+ {
+ MethodName: "PortForward",
+ Handler: _RuntimeService_PortForward_Handler,
+ },
+ {
+ MethodName: "ContainerStats",
+ Handler: _RuntimeService_ContainerStats_Handler,
+ },
+ {
+ MethodName: "ListContainerStats",
+ Handler: _RuntimeService_ListContainerStats_Handler,
+ },
+ {
+ MethodName: "UpdateRuntimeConfig",
+ Handler: _RuntimeService_UpdateRuntimeConfig_Handler,
+ },
+ {
+ MethodName: "Status",
+ Handler: _RuntimeService_Status_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+ Metadata: "api.proto",
+}
+
+// Client API for ImageService service
+
+type ImageServiceClient interface {
+ // ListImages lists existing images.
+ ListImages(ctx context.Context, in *ListImagesRequest, opts ...grpc.CallOption) (*ListImagesResponse, error)
+ // ImageStatus returns the status of the image. If the image is not
+ // present, returns a response with ImageStatusResponse.Image set to
+ // nil.
+ ImageStatus(ctx context.Context, in *ImageStatusRequest, opts ...grpc.CallOption) (*ImageStatusResponse, error)
+ // PullImage pulls an image with authentication config.
+ PullImage(ctx context.Context, in *PullImageRequest, opts ...grpc.CallOption) (*PullImageResponse, error)
+ // RemoveImage removes the image.
+ // This call is idempotent, and must not return an error if the image has
+ // already been removed.
+ RemoveImage(ctx context.Context, in *RemoveImageRequest, opts ...grpc.CallOption) (*RemoveImageResponse, error)
+ // ImageFSInfo returns information of the filesystem that is used to store images.
+ ImageFsInfo(ctx context.Context, in *ImageFsInfoRequest, opts ...grpc.CallOption) (*ImageFsInfoResponse, error)
+}
+
+type imageServiceClient struct {
+ cc *grpc.ClientConn
+}
+
+func NewImageServiceClient(cc *grpc.ClientConn) ImageServiceClient {
+ return &imageServiceClient{cc}
+}
+
+func (c *imageServiceClient) ListImages(ctx context.Context, in *ListImagesRequest, opts ...grpc.CallOption) (*ListImagesResponse, error) {
+ out := new(ListImagesResponse)
+ err := grpc.Invoke(ctx, "/runtime.ImageService/ListImages", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *imageServiceClient) ImageStatus(ctx context.Context, in *ImageStatusRequest, opts ...grpc.CallOption) (*ImageStatusResponse, error) {
+ out := new(ImageStatusResponse)
+ err := grpc.Invoke(ctx, "/runtime.ImageService/ImageStatus", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *imageServiceClient) PullImage(ctx context.Context, in *PullImageRequest, opts ...grpc.CallOption) (*PullImageResponse, error) {
+ out := new(PullImageResponse)
+ err := grpc.Invoke(ctx, "/runtime.ImageService/PullImage", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *imageServiceClient) RemoveImage(ctx context.Context, in *RemoveImageRequest, opts ...grpc.CallOption) (*RemoveImageResponse, error) {
+ out := new(RemoveImageResponse)
+ err := grpc.Invoke(ctx, "/runtime.ImageService/RemoveImage", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *imageServiceClient) ImageFsInfo(ctx context.Context, in *ImageFsInfoRequest, opts ...grpc.CallOption) (*ImageFsInfoResponse, error) {
+ out := new(ImageFsInfoResponse)
+ err := grpc.Invoke(ctx, "/runtime.ImageService/ImageFsInfo", in, out, c.cc, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// Server API for ImageService service
+
+type ImageServiceServer interface {
+ // ListImages lists existing images.
+ ListImages(context.Context, *ListImagesRequest) (*ListImagesResponse, error)
+ // ImageStatus returns the status of the image. If the image is not
+ // present, returns a response with ImageStatusResponse.Image set to
+ // nil.
+ ImageStatus(context.Context, *ImageStatusRequest) (*ImageStatusResponse, error)
+ // PullImage pulls an image with authentication config.
+ PullImage(context.Context, *PullImageRequest) (*PullImageResponse, error)
+ // RemoveImage removes the image.
+ // This call is idempotent, and must not return an error if the image has
+ // already been removed.
+ RemoveImage(context.Context, *RemoveImageRequest) (*RemoveImageResponse, error)
+ // ImageFSInfo returns information of the filesystem that is used to store images.
+ ImageFsInfo(context.Context, *ImageFsInfoRequest) (*ImageFsInfoResponse, error)
+}
+
+func RegisterImageServiceServer(s *grpc.Server, srv ImageServiceServer) {
+ s.RegisterService(&_ImageService_serviceDesc, srv)
+}
+
+func _ImageService_ListImages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListImagesRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ImageServiceServer).ListImages(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/runtime.ImageService/ListImages",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ImageServiceServer).ListImages(ctx, req.(*ListImagesRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _ImageService_ImageStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ImageStatusRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ImageServiceServer).ImageStatus(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/runtime.ImageService/ImageStatus",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ImageServiceServer).ImageStatus(ctx, req.(*ImageStatusRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _ImageService_PullImage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(PullImageRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ImageServiceServer).PullImage(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/runtime.ImageService/PullImage",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ImageServiceServer).PullImage(ctx, req.(*PullImageRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _ImageService_RemoveImage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(RemoveImageRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ImageServiceServer).RemoveImage(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/runtime.ImageService/RemoveImage",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ImageServiceServer).RemoveImage(ctx, req.(*RemoveImageRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _ImageService_ImageFsInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ImageFsInfoRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ImageServiceServer).ImageFsInfo(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/runtime.ImageService/ImageFsInfo",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ImageServiceServer).ImageFsInfo(ctx, req.(*ImageFsInfoRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+var _ImageService_serviceDesc = grpc.ServiceDesc{
+ ServiceName: "runtime.ImageService",
+ HandlerType: (*ImageServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "ListImages",
+ Handler: _ImageService_ListImages_Handler,
+ },
+ {
+ MethodName: "ImageStatus",
+ Handler: _ImageService_ImageStatus_Handler,
+ },
+ {
+ MethodName: "PullImage",
+ Handler: _ImageService_PullImage_Handler,
+ },
+ {
+ MethodName: "RemoveImage",
+ Handler: _ImageService_RemoveImage_Handler,
+ },
+ {
+ MethodName: "ImageFsInfo",
+ Handler: _ImageService_ImageFsInfo_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+ Metadata: "api.proto",
+}
+
+func (m *VersionRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *VersionRequest) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Version) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Version)))
+ i += copy(dAtA[i:], m.Version)
+ }
+ return i, nil
+}
+
+func (m *VersionResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *VersionResponse) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Version) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Version)))
+ i += copy(dAtA[i:], m.Version)
+ }
+ if len(m.RuntimeName) > 0 {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.RuntimeName)))
+ i += copy(dAtA[i:], m.RuntimeName)
+ }
+ if len(m.RuntimeVersion) > 0 {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.RuntimeVersion)))
+ i += copy(dAtA[i:], m.RuntimeVersion)
+ }
+ if len(m.RuntimeApiVersion) > 0 {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.RuntimeApiVersion)))
+ i += copy(dAtA[i:], m.RuntimeApiVersion)
+ }
+ return i, nil
+}
+
+func (m *DNSConfig) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DNSConfig) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Servers) > 0 {
+ for _, s := range m.Servers {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Searches) > 0 {
+ for _, s := range m.Searches {
+ dAtA[i] = 0x12
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Options) > 0 {
+ for _, s := range m.Options {
+ dAtA[i] = 0x1a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *PortMapping) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PortMapping) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Protocol != 0 {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Protocol))
+ }
+ if m.ContainerPort != 0 {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.ContainerPort))
+ }
+ if m.HostPort != 0 {
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.HostPort))
+ }
+ if len(m.HostIp) > 0 {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.HostIp)))
+ i += copy(dAtA[i:], m.HostIp)
+ }
+ return i, nil
+}
+
+func (m *Mount) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Mount) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.ContainerPath) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerPath)))
+ i += copy(dAtA[i:], m.ContainerPath)
+ }
+ if len(m.HostPath) > 0 {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.HostPath)))
+ i += copy(dAtA[i:], m.HostPath)
+ }
+ if m.Readonly {
+ dAtA[i] = 0x18
+ i++
+ if m.Readonly {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if m.SelinuxRelabel {
+ dAtA[i] = 0x20
+ i++
+ if m.SelinuxRelabel {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ return i, nil
+}
+
+func (m *NamespaceOption) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NamespaceOption) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.HostNetwork {
+ dAtA[i] = 0x8
+ i++
+ if m.HostNetwork {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if m.HostPid {
+ dAtA[i] = 0x10
+ i++
+ if m.HostPid {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if m.HostIpc {
+ dAtA[i] = 0x18
+ i++
+ if m.HostIpc {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ return i, nil
+}
+
+func (m *Int64Value) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Int64Value) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Value != 0 {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Value))
+ }
+ return i, nil
+}
+
+func (m *LinuxSandboxSecurityContext) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LinuxSandboxSecurityContext) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.NamespaceOptions != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.NamespaceOptions.Size()))
+ n1, err := m.NamespaceOptions.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ }
+ if m.SelinuxOptions != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.SelinuxOptions.Size()))
+ n2, err := m.SelinuxOptions.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ }
+ if m.RunAsUser != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.RunAsUser.Size()))
+ n3, err := m.RunAsUser.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ }
+ if m.ReadonlyRootfs {
+ dAtA[i] = 0x20
+ i++
+ if m.ReadonlyRootfs {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if len(m.SupplementalGroups) > 0 {
+ dAtA5 := make([]byte, len(m.SupplementalGroups)*10)
+ var j4 int
+ for _, num1 := range m.SupplementalGroups {
+ num := uint64(num1)
+ for num >= 1<<7 {
+ dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80)
+ num >>= 7
+ j4++
+ }
+ dAtA5[j4] = uint8(num)
+ j4++
+ }
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(j4))
+ i += copy(dAtA[i:], dAtA5[:j4])
+ }
+ if m.Privileged {
+ dAtA[i] = 0x30
+ i++
+ if m.Privileged {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ return i, nil
+}
+
+func (m *LinuxPodSandboxConfig) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LinuxPodSandboxConfig) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.CgroupParent) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.CgroupParent)))
+ i += copy(dAtA[i:], m.CgroupParent)
+ }
+ if m.SecurityContext != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.SecurityContext.Size()))
+ n6, err := m.SecurityContext.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n6
+ }
+ if len(m.Sysctls) > 0 {
+ for k := range m.Sysctls {
+ dAtA[i] = 0x1a
+ i++
+ v := m.Sysctls[k]
+ mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ i = encodeVarintApi(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ return i, nil
+}
+
+func (m *PodSandboxMetadata) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodSandboxMetadata) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Name) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ }
+ if len(m.Uid) > 0 {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Uid)))
+ i += copy(dAtA[i:], m.Uid)
+ }
+ if len(m.Namespace) > 0 {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Namespace)))
+ i += copy(dAtA[i:], m.Namespace)
+ }
+ if m.Attempt != 0 {
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Attempt))
+ }
+ return i, nil
+}
+
+func (m *PodSandboxConfig) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodSandboxConfig) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Metadata != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Metadata.Size()))
+ n7, err := m.Metadata.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n7
+ }
+ if len(m.Hostname) > 0 {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Hostname)))
+ i += copy(dAtA[i:], m.Hostname)
+ }
+ if len(m.LogDirectory) > 0 {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.LogDirectory)))
+ i += copy(dAtA[i:], m.LogDirectory)
+ }
+ if m.DnsConfig != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.DnsConfig.Size()))
+ n8, err := m.DnsConfig.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n8
+ }
+ if len(m.PortMappings) > 0 {
+ for _, msg := range m.PortMappings {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Labels) > 0 {
+ for k := range m.Labels {
+ dAtA[i] = 0x32
+ i++
+ v := m.Labels[k]
+ mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ i = encodeVarintApi(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ if len(m.Annotations) > 0 {
+ for k := range m.Annotations {
+ dAtA[i] = 0x3a
+ i++
+ v := m.Annotations[k]
+ mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ i = encodeVarintApi(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ if m.Linux != nil {
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Linux.Size()))
+ n9, err := m.Linux.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n9
+ }
+ return i, nil
+}
+
+func (m *RunPodSandboxRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RunPodSandboxRequest) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Config != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Config.Size()))
+ n10, err := m.Config.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n10
+ }
+ return i, nil
+}
+
+func (m *RunPodSandboxResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RunPodSandboxResponse) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.PodSandboxId) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.PodSandboxId)))
+ i += copy(dAtA[i:], m.PodSandboxId)
+ }
+ return i, nil
+}
+
+func (m *StopPodSandboxRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StopPodSandboxRequest) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.PodSandboxId) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.PodSandboxId)))
+ i += copy(dAtA[i:], m.PodSandboxId)
+ }
+ return i, nil
+}
+
+func (m *StopPodSandboxResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StopPodSandboxResponse) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ return i, nil
+}
+
+func (m *RemovePodSandboxRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RemovePodSandboxRequest) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.PodSandboxId) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.PodSandboxId)))
+ i += copy(dAtA[i:], m.PodSandboxId)
+ }
+ return i, nil
+}
+
+func (m *RemovePodSandboxResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RemovePodSandboxResponse) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ return i, nil
+}
+
+func (m *PodSandboxStatusRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodSandboxStatusRequest) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.PodSandboxId) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.PodSandboxId)))
+ i += copy(dAtA[i:], m.PodSandboxId)
+ }
+ return i, nil
+}
+
+func (m *PodSandboxNetworkStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodSandboxNetworkStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Ip) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Ip)))
+ i += copy(dAtA[i:], m.Ip)
+ }
+ return i, nil
+}
+
+func (m *Namespace) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Namespace) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Options != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Options.Size()))
+ n11, err := m.Options.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n11
+ }
+ return i, nil
+}
+
+func (m *LinuxPodSandboxStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LinuxPodSandboxStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Namespaces != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Namespaces.Size()))
+ n12, err := m.Namespaces.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n12
+ }
+ return i, nil
+}
+
+func (m *PodSandboxStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodSandboxStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Id) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Id)))
+ i += copy(dAtA[i:], m.Id)
+ }
+ if m.Metadata != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Metadata.Size()))
+ n13, err := m.Metadata.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n13
+ }
+ if m.State != 0 {
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.State))
+ }
+ if m.CreatedAt != 0 {
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.CreatedAt))
+ }
+ if m.Network != nil {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Network.Size()))
+ n14, err := m.Network.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n14
+ }
+ if m.Linux != nil {
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Linux.Size()))
+ n15, err := m.Linux.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n15
+ }
+ if len(m.Labels) > 0 {
+ for k := range m.Labels {
+ dAtA[i] = 0x3a
+ i++
+ v := m.Labels[k]
+ mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ i = encodeVarintApi(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ if len(m.Annotations) > 0 {
+ for k := range m.Annotations {
+ dAtA[i] = 0x42
+ i++
+ v := m.Annotations[k]
+ mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ i = encodeVarintApi(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ return i, nil
+}
+
+func (m *PodSandboxStatusResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodSandboxStatusResponse) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Status != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Status.Size()))
+ n16, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n16
+ }
+ return i, nil
+}
+
+func (m *PodSandboxStateValue) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodSandboxStateValue) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.State != 0 {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.State))
+ }
+ return i, nil
+}
+
+func (m *PodSandboxFilter) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodSandboxFilter) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Id) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Id)))
+ i += copy(dAtA[i:], m.Id)
+ }
+ if m.State != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.State.Size()))
+ n17, err := m.State.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n17
+ }
+ if len(m.LabelSelector) > 0 {
+ for k := range m.LabelSelector {
+ dAtA[i] = 0x1a
+ i++
+ v := m.LabelSelector[k]
+ mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ i = encodeVarintApi(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ return i, nil
+}
+
+func (m *ListPodSandboxRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ListPodSandboxRequest) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Filter != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Filter.Size()))
+ n18, err := m.Filter.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n18
+ }
+ return i, nil
+}
+
+func (m *PodSandbox) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PodSandbox) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Id) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Id)))
+ i += copy(dAtA[i:], m.Id)
+ }
+ if m.Metadata != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Metadata.Size()))
+ n19, err := m.Metadata.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n19
+ }
+ if m.State != 0 {
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.State))
+ }
+ if m.CreatedAt != 0 {
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.CreatedAt))
+ }
+ if len(m.Labels) > 0 {
+ for k := range m.Labels {
+ dAtA[i] = 0x2a
+ i++
+ v := m.Labels[k]
+ mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ i = encodeVarintApi(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ if len(m.Annotations) > 0 {
+ for k := range m.Annotations {
+ dAtA[i] = 0x32
+ i++
+ v := m.Annotations[k]
+ mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ i = encodeVarintApi(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ return i, nil
+}
+
+func (m *ListPodSandboxResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ListPodSandboxResponse) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Items) > 0 {
+ for _, msg := range m.Items {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ImageSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ImageSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Image) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Image)))
+ i += copy(dAtA[i:], m.Image)
+ }
+ return i, nil
+}
+
+func (m *KeyValue) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *KeyValue) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Key) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Key)))
+ i += copy(dAtA[i:], m.Key)
+ }
+ if len(m.Value) > 0 {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Value)))
+ i += copy(dAtA[i:], m.Value)
+ }
+ return i, nil
+}
+
+func (m *LinuxContainerResources) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LinuxContainerResources) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.CpuPeriod != 0 {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.CpuPeriod))
+ }
+ if m.CpuQuota != 0 {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.CpuQuota))
+ }
+ if m.CpuShares != 0 {
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.CpuShares))
+ }
+ if m.MemoryLimitInBytes != 0 {
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.MemoryLimitInBytes))
+ }
+ if m.OomScoreAdj != 0 {
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.OomScoreAdj))
+ }
+ return i, nil
+}
+
+func (m *SELinuxOption) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SELinuxOption) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.User) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.User)))
+ i += copy(dAtA[i:], m.User)
+ }
+ if len(m.Role) > 0 {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Role)))
+ i += copy(dAtA[i:], m.Role)
+ }
+ if len(m.Type) > 0 {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ }
+ if len(m.Level) > 0 {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Level)))
+ i += copy(dAtA[i:], m.Level)
+ }
+ return i, nil
+}
+
+func (m *Capability) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Capability) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.AddCapabilities) > 0 {
+ for _, s := range m.AddCapabilities {
+ dAtA[i] = 0xa
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.DropCapabilities) > 0 {
+ for _, s := range m.DropCapabilities {
+ dAtA[i] = 0x12
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ return i, nil
+}
+
+func (m *LinuxContainerSecurityContext) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LinuxContainerSecurityContext) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Capabilities != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Capabilities.Size()))
+ n20, err := m.Capabilities.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n20
+ }
+ if m.Privileged {
+ dAtA[i] = 0x10
+ i++
+ if m.Privileged {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if m.NamespaceOptions != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.NamespaceOptions.Size()))
+ n21, err := m.NamespaceOptions.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n21
+ }
+ if m.SelinuxOptions != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.SelinuxOptions.Size()))
+ n22, err := m.SelinuxOptions.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n22
+ }
+ if m.RunAsUser != nil {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.RunAsUser.Size()))
+ n23, err := m.RunAsUser.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n23
+ }
+ if len(m.RunAsUsername) > 0 {
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.RunAsUsername)))
+ i += copy(dAtA[i:], m.RunAsUsername)
+ }
+ if m.ReadonlyRootfs {
+ dAtA[i] = 0x38
+ i++
+ if m.ReadonlyRootfs {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if len(m.SupplementalGroups) > 0 {
+ dAtA25 := make([]byte, len(m.SupplementalGroups)*10)
+ var j24 int
+ for _, num1 := range m.SupplementalGroups {
+ num := uint64(num1)
+ for num >= 1<<7 {
+ dAtA25[j24] = uint8(uint64(num)&0x7f | 0x80)
+ num >>= 7
+ j24++
+ }
+ dAtA25[j24] = uint8(num)
+ j24++
+ }
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(j24))
+ i += copy(dAtA[i:], dAtA25[:j24])
+ }
+ if len(m.ApparmorProfile) > 0 {
+ dAtA[i] = 0x4a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.ApparmorProfile)))
+ i += copy(dAtA[i:], m.ApparmorProfile)
+ }
+ return i, nil
+}
+
+func (m *LinuxContainerConfig) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LinuxContainerConfig) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Resources != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Resources.Size()))
+ n26, err := m.Resources.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n26
+ }
+ if m.SecurityContext != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.SecurityContext.Size()))
+ n27, err := m.SecurityContext.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n27
+ }
+ return i, nil
+}
+
+func (m *ContainerMetadata) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerMetadata) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Name) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ }
+ if m.Attempt != 0 {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Attempt))
+ }
+ return i, nil
+}
+
+func (m *Device) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Device) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.ContainerPath) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerPath)))
+ i += copy(dAtA[i:], m.ContainerPath)
+ }
+ if len(m.HostPath) > 0 {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.HostPath)))
+ i += copy(dAtA[i:], m.HostPath)
+ }
+ if len(m.Permissions) > 0 {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Permissions)))
+ i += copy(dAtA[i:], m.Permissions)
+ }
+ return i, nil
+}
+
+func (m *ContainerConfig) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerConfig) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Metadata != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Metadata.Size()))
+ n28, err := m.Metadata.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n28
+ }
+ if m.Image != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Image.Size()))
+ n29, err := m.Image.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n29
+ }
+ if len(m.Command) > 0 {
+ for _, s := range m.Command {
+ dAtA[i] = 0x1a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Args) > 0 {
+ for _, s := range m.Args {
+ dAtA[i] = 0x22
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.WorkingDir) > 0 {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.WorkingDir)))
+ i += copy(dAtA[i:], m.WorkingDir)
+ }
+ if len(m.Envs) > 0 {
+ for _, msg := range m.Envs {
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Mounts) > 0 {
+ for _, msg := range m.Mounts {
+ dAtA[i] = 0x3a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Devices) > 0 {
+ for _, msg := range m.Devices {
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Labels) > 0 {
+ for k := range m.Labels {
+ dAtA[i] = 0x4a
+ i++
+ v := m.Labels[k]
+ mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ i = encodeVarintApi(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ if len(m.Annotations) > 0 {
+ for k := range m.Annotations {
+ dAtA[i] = 0x52
+ i++
+ v := m.Annotations[k]
+ mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ i = encodeVarintApi(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ if len(m.LogPath) > 0 {
+ dAtA[i] = 0x5a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.LogPath)))
+ i += copy(dAtA[i:], m.LogPath)
+ }
+ if m.Stdin {
+ dAtA[i] = 0x60
+ i++
+ if m.Stdin {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if m.StdinOnce {
+ dAtA[i] = 0x68
+ i++
+ if m.StdinOnce {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if m.Tty {
+ dAtA[i] = 0x70
+ i++
+ if m.Tty {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if m.Linux != nil {
+ dAtA[i] = 0x7a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Linux.Size()))
+ n30, err := m.Linux.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n30
+ }
+ return i, nil
+}
+
+func (m *CreateContainerRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CreateContainerRequest) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.PodSandboxId) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.PodSandboxId)))
+ i += copy(dAtA[i:], m.PodSandboxId)
+ }
+ if m.Config != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Config.Size()))
+ n31, err := m.Config.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n31
+ }
+ if m.SandboxConfig != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.SandboxConfig.Size()))
+ n32, err := m.SandboxConfig.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n32
+ }
+ return i, nil
+}
+
+func (m *CreateContainerResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CreateContainerResponse) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.ContainerId) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerId)))
+ i += copy(dAtA[i:], m.ContainerId)
+ }
+ return i, nil
+}
+
+func (m *StartContainerRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StartContainerRequest) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.ContainerId) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerId)))
+ i += copy(dAtA[i:], m.ContainerId)
+ }
+ return i, nil
+}
+
+func (m *StartContainerResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StartContainerResponse) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ return i, nil
+}
+
+func (m *StopContainerRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StopContainerRequest) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.ContainerId) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerId)))
+ i += copy(dAtA[i:], m.ContainerId)
+ }
+ if m.Timeout != 0 {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Timeout))
+ }
+ return i, nil
+}
+
+func (m *StopContainerResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StopContainerResponse) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ return i, nil
+}
+
+func (m *RemoveContainerRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RemoveContainerRequest) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.ContainerId) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerId)))
+ i += copy(dAtA[i:], m.ContainerId)
+ }
+ return i, nil
+}
+
+func (m *RemoveContainerResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RemoveContainerResponse) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ return i, nil
+}
+
+func (m *ContainerStateValue) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerStateValue) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.State != 0 {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.State))
+ }
+ return i, nil
+}
+
+func (m *ContainerFilter) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerFilter) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Id) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Id)))
+ i += copy(dAtA[i:], m.Id)
+ }
+ if m.State != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.State.Size()))
+ n33, err := m.State.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n33
+ }
+ if len(m.PodSandboxId) > 0 {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.PodSandboxId)))
+ i += copy(dAtA[i:], m.PodSandboxId)
+ }
+ if len(m.LabelSelector) > 0 {
+ for k := range m.LabelSelector {
+ dAtA[i] = 0x22
+ i++
+ v := m.LabelSelector[k]
+ mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ i = encodeVarintApi(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ return i, nil
+}
+
+func (m *ListContainersRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ListContainersRequest) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Filter != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Filter.Size()))
+ n34, err := m.Filter.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n34
+ }
+ return i, nil
+}
+
+func (m *Container) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Container) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Id) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Id)))
+ i += copy(dAtA[i:], m.Id)
+ }
+ if len(m.PodSandboxId) > 0 {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.PodSandboxId)))
+ i += copy(dAtA[i:], m.PodSandboxId)
+ }
+ if m.Metadata != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Metadata.Size()))
+ n35, err := m.Metadata.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n35
+ }
+ if m.Image != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Image.Size()))
+ n36, err := m.Image.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n36
+ }
+ if len(m.ImageRef) > 0 {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.ImageRef)))
+ i += copy(dAtA[i:], m.ImageRef)
+ }
+ if m.State != 0 {
+ dAtA[i] = 0x30
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.State))
+ }
+ if m.CreatedAt != 0 {
+ dAtA[i] = 0x38
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.CreatedAt))
+ }
+ if len(m.Labels) > 0 {
+ for k := range m.Labels {
+ dAtA[i] = 0x42
+ i++
+ v := m.Labels[k]
+ mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ i = encodeVarintApi(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ if len(m.Annotations) > 0 {
+ for k := range m.Annotations {
+ dAtA[i] = 0x4a
+ i++
+ v := m.Annotations[k]
+ mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ i = encodeVarintApi(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ return i, nil
+}
+
+func (m *ListContainersResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ListContainersResponse) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Containers) > 0 {
+ for _, msg := range m.Containers {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ContainerStatusRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerStatusRequest) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.ContainerId) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerId)))
+ i += copy(dAtA[i:], m.ContainerId)
+ }
+ return i, nil
+}
+
+func (m *ContainerStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Id) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Id)))
+ i += copy(dAtA[i:], m.Id)
+ }
+ if m.Metadata != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Metadata.Size()))
+ n37, err := m.Metadata.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n37
+ }
+ if m.State != 0 {
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.State))
+ }
+ if m.CreatedAt != 0 {
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.CreatedAt))
+ }
+ if m.StartedAt != 0 {
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.StartedAt))
+ }
+ if m.FinishedAt != 0 {
+ dAtA[i] = 0x30
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.FinishedAt))
+ }
+ if m.ExitCode != 0 {
+ dAtA[i] = 0x38
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.ExitCode))
+ }
+ if m.Image != nil {
+ dAtA[i] = 0x42
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Image.Size()))
+ n38, err := m.Image.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n38
+ }
+ if len(m.ImageRef) > 0 {
+ dAtA[i] = 0x4a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.ImageRef)))
+ i += copy(dAtA[i:], m.ImageRef)
+ }
+ if len(m.Reason) > 0 {
+ dAtA[i] = 0x52
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ }
+ if len(m.Message) > 0 {
+ dAtA[i] = 0x5a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ }
+ if len(m.Labels) > 0 {
+ for k := range m.Labels {
+ dAtA[i] = 0x62
+ i++
+ v := m.Labels[k]
+ mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ i = encodeVarintApi(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ if len(m.Annotations) > 0 {
+ for k := range m.Annotations {
+ dAtA[i] = 0x6a
+ i++
+ v := m.Annotations[k]
+ mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ i = encodeVarintApi(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ if len(m.Mounts) > 0 {
+ for _, msg := range m.Mounts {
+ dAtA[i] = 0x72
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.LogPath) > 0 {
+ dAtA[i] = 0x7a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.LogPath)))
+ i += copy(dAtA[i:], m.LogPath)
+ }
+ return i, nil
+}
+
+func (m *ContainerStatusResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerStatusResponse) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Status != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Status.Size()))
+ n39, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n39
+ }
+ return i, nil
+}
+
+func (m *ExecSyncRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExecSyncRequest) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.ContainerId) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerId)))
+ i += copy(dAtA[i:], m.ContainerId)
+ }
+ if len(m.Cmd) > 0 {
+ for _, s := range m.Cmd {
+ dAtA[i] = 0x12
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if m.Timeout != 0 {
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Timeout))
+ }
+ return i, nil
+}
+
+func (m *ExecSyncResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExecSyncResponse) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Stdout) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Stdout)))
+ i += copy(dAtA[i:], m.Stdout)
+ }
+ if len(m.Stderr) > 0 {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Stderr)))
+ i += copy(dAtA[i:], m.Stderr)
+ }
+ if m.ExitCode != 0 {
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.ExitCode))
+ }
+ return i, nil
+}
+
+func (m *ExecRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExecRequest) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.ContainerId) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerId)))
+ i += copy(dAtA[i:], m.ContainerId)
+ }
+ if len(m.Cmd) > 0 {
+ for _, s := range m.Cmd {
+ dAtA[i] = 0x12
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if m.Tty {
+ dAtA[i] = 0x18
+ i++
+ if m.Tty {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if m.Stdin {
+ dAtA[i] = 0x20
+ i++
+ if m.Stdin {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ return i, nil
+}
+
+func (m *ExecResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExecResponse) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Url) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Url)))
+ i += copy(dAtA[i:], m.Url)
+ }
+ return i, nil
+}
+
+func (m *AttachRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *AttachRequest) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.ContainerId) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerId)))
+ i += copy(dAtA[i:], m.ContainerId)
+ }
+ if m.Stdin {
+ dAtA[i] = 0x10
+ i++
+ if m.Stdin {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if m.Tty {
+ dAtA[i] = 0x18
+ i++
+ if m.Tty {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ return i, nil
+}
+
+func (m *AttachResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *AttachResponse) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Url) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Url)))
+ i += copy(dAtA[i:], m.Url)
+ }
+ return i, nil
+}
+
+func (m *PortForwardRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PortForwardRequest) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.PodSandboxId) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.PodSandboxId)))
+ i += copy(dAtA[i:], m.PodSandboxId)
+ }
+ if len(m.Port) > 0 {
+ dAtA41 := make([]byte, len(m.Port)*10)
+ var j40 int
+ for _, num1 := range m.Port {
+ num := uint64(num1)
+ for num >= 1<<7 {
+ dAtA41[j40] = uint8(uint64(num)&0x7f | 0x80)
+ num >>= 7
+ j40++
+ }
+ dAtA41[j40] = uint8(num)
+ j40++
+ }
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(j40))
+ i += copy(dAtA[i:], dAtA41[:j40])
+ }
+ return i, nil
+}
+
+func (m *PortForwardResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PortForwardResponse) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Url) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Url)))
+ i += copy(dAtA[i:], m.Url)
+ }
+ return i, nil
+}
+
+func (m *ImageFilter) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ImageFilter) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Image != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Image.Size()))
+ n42, err := m.Image.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n42
+ }
+ return i, nil
+}
+
+func (m *ListImagesRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ListImagesRequest) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Filter != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Filter.Size()))
+ n43, err := m.Filter.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n43
+ }
+ return i, nil
+}
+
+func (m *Image) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Image) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Id) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Id)))
+ i += copy(dAtA[i:], m.Id)
+ }
+ if len(m.RepoTags) > 0 {
+ for _, s := range m.RepoTags {
+ dAtA[i] = 0x12
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.RepoDigests) > 0 {
+ for _, s := range m.RepoDigests {
+ dAtA[i] = 0x1a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if m.Size_ != 0 {
+ dAtA[i] = 0x20
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Size_))
+ }
+ if m.Uid != nil {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Uid.Size()))
+ n44, err := m.Uid.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n44
+ }
+ if len(m.Username) > 0 {
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Username)))
+ i += copy(dAtA[i:], m.Username)
+ }
+ return i, nil
+}
+
+func (m *ListImagesResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ListImagesResponse) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Images) > 0 {
+ for _, msg := range m.Images {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ImageStatusRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ImageStatusRequest) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Image != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Image.Size()))
+ n45, err := m.Image.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n45
+ }
+ return i, nil
+}
+
+func (m *ImageStatusResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ImageStatusResponse) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Image != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Image.Size()))
+ n46, err := m.Image.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n46
+ }
+ return i, nil
+}
+
+func (m *AuthConfig) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *AuthConfig) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Username) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Username)))
+ i += copy(dAtA[i:], m.Username)
+ }
+ if len(m.Password) > 0 {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Password)))
+ i += copy(dAtA[i:], m.Password)
+ }
+ if len(m.Auth) > 0 {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Auth)))
+ i += copy(dAtA[i:], m.Auth)
+ }
+ if len(m.ServerAddress) > 0 {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.ServerAddress)))
+ i += copy(dAtA[i:], m.ServerAddress)
+ }
+ if len(m.IdentityToken) > 0 {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.IdentityToken)))
+ i += copy(dAtA[i:], m.IdentityToken)
+ }
+ if len(m.RegistryToken) > 0 {
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.RegistryToken)))
+ i += copy(dAtA[i:], m.RegistryToken)
+ }
+ return i, nil
+}
+
+func (m *PullImageRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PullImageRequest) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Image != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Image.Size()))
+ n47, err := m.Image.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n47
+ }
+ if m.Auth != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Auth.Size()))
+ n48, err := m.Auth.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n48
+ }
+ if m.SandboxConfig != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.SandboxConfig.Size()))
+ n49, err := m.SandboxConfig.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n49
+ }
+ return i, nil
+}
+
+func (m *PullImageResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PullImageResponse) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.ImageRef) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.ImageRef)))
+ i += copy(dAtA[i:], m.ImageRef)
+ }
+ return i, nil
+}
+
+func (m *RemoveImageRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RemoveImageRequest) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Image != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Image.Size()))
+ n50, err := m.Image.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n50
+ }
+ return i, nil
+}
+
+func (m *RemoveImageResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RemoveImageResponse) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ return i, nil
+}
+
+func (m *NetworkConfig) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NetworkConfig) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.PodCidr) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.PodCidr)))
+ i += copy(dAtA[i:], m.PodCidr)
+ }
+ return i, nil
+}
+
+func (m *RuntimeConfig) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RuntimeConfig) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.NetworkConfig != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.NetworkConfig.Size()))
+ n51, err := m.NetworkConfig.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n51
+ }
+ return i, nil
+}
+
+func (m *UpdateRuntimeConfigRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *UpdateRuntimeConfigRequest) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.RuntimeConfig != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.RuntimeConfig.Size()))
+ n52, err := m.RuntimeConfig.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n52
+ }
+ return i, nil
+}
+
+func (m *UpdateRuntimeConfigResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *UpdateRuntimeConfigResponse) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ return i, nil
+}
+
+func (m *RuntimeCondition) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RuntimeCondition) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Type) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Type)))
+ i += copy(dAtA[i:], m.Type)
+ }
+ if m.Status {
+ dAtA[i] = 0x10
+ i++
+ if m.Status {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if len(m.Reason) > 0 {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Reason)))
+ i += copy(dAtA[i:], m.Reason)
+ }
+ if len(m.Message) > 0 {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Message)))
+ i += copy(dAtA[i:], m.Message)
+ }
+ return i, nil
+}
+
+func (m *RuntimeStatus) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RuntimeStatus) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Conditions) > 0 {
+ for _, msg := range m.Conditions {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *StatusRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StatusRequest) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ return i, nil
+}
+
+func (m *StatusResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StatusResponse) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Status != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Status.Size()))
+ n53, err := m.Status.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n53
+ }
+ return i, nil
+}
+
+func (m *ImageFsInfoRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ImageFsInfoRequest) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ return i, nil
+}
+
+func (m *UInt64Value) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *UInt64Value) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Value != 0 {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Value))
+ }
+ return i, nil
+}
+
+func (m *StorageIdentifier) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StorageIdentifier) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Uuid) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Uuid)))
+ i += copy(dAtA[i:], m.Uuid)
+ }
+ return i, nil
+}
+
+func (m *FilesystemUsage) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *FilesystemUsage) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Timestamp != 0 {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Timestamp))
+ }
+ if m.StorageId != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.StorageId.Size()))
+ n54, err := m.StorageId.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n54
+ }
+ if m.UsedBytes != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.UsedBytes.Size()))
+ n55, err := m.UsedBytes.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n55
+ }
+ if m.InodesUsed != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.InodesUsed.Size()))
+ n56, err := m.InodesUsed.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n56
+ }
+ return i, nil
+}
+
+func (m *ImageFsInfoResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ImageFsInfoResponse) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.ImageFilesystems) > 0 {
+ for _, msg := range m.ImageFilesystems {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ContainerStatsRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerStatsRequest) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.ContainerId) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.ContainerId)))
+ i += copy(dAtA[i:], m.ContainerId)
+ }
+ return i, nil
+}
+
+func (m *ContainerStatsResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerStatsResponse) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Stats != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Stats.Size()))
+ n57, err := m.Stats.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n57
+ }
+ return i, nil
+}
+
+func (m *ListContainerStatsRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ListContainerStatsRequest) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Filter != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Filter.Size()))
+ n58, err := m.Filter.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n58
+ }
+ return i, nil
+}
+
+func (m *ContainerStatsFilter) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerStatsFilter) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Id) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Id)))
+ i += copy(dAtA[i:], m.Id)
+ }
+ if len(m.PodSandboxId) > 0 {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.PodSandboxId)))
+ i += copy(dAtA[i:], m.PodSandboxId)
+ }
+ if len(m.LabelSelector) > 0 {
+ for k := range m.LabelSelector {
+ dAtA[i] = 0x1a
+ i++
+ v := m.LabelSelector[k]
+ mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ i = encodeVarintApi(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ return i, nil
+}
+
+func (m *ListContainerStatsResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ListContainerStatsResponse) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Stats) > 0 {
+ for _, msg := range m.Stats {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ return i, nil
+}
+
+func (m *ContainerAttributes) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerAttributes) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Id) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Id)))
+ i += copy(dAtA[i:], m.Id)
+ }
+ if m.Metadata != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Metadata.Size()))
+ n59, err := m.Metadata.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n59
+ }
+ if len(m.Labels) > 0 {
+ for k := range m.Labels {
+ dAtA[i] = 0x1a
+ i++
+ v := m.Labels[k]
+ mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ i = encodeVarintApi(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ if len(m.Annotations) > 0 {
+ for k := range m.Annotations {
+ dAtA[i] = 0x22
+ i++
+ v := m.Annotations[k]
+ mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ i = encodeVarintApi(dAtA, i, uint64(mapSize))
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(k)))
+ i += copy(dAtA[i:], k)
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(v)))
+ i += copy(dAtA[i:], v)
+ }
+ }
+ return i, nil
+}
+
+func (m *ContainerStats) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContainerStats) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Attributes != nil {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Attributes.Size()))
+ n60, err := m.Attributes.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n60
+ }
+ if m.Cpu != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Cpu.Size()))
+ n61, err := m.Cpu.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n61
+ }
+ if m.Memory != nil {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Memory.Size()))
+ n62, err := m.Memory.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n62
+ }
+ if m.WritableLayer != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.WritableLayer.Size()))
+ n63, err := m.WritableLayer.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n63
+ }
+ return i, nil
+}
+
+func (m *CpuUsage) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CpuUsage) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Timestamp != 0 {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Timestamp))
+ }
+ if m.UsageCoreNanoSeconds != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.UsageCoreNanoSeconds.Size()))
+ n64, err := m.UsageCoreNanoSeconds.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n64
+ }
+ return i, nil
+}
+
+func (m *MemoryUsage) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *MemoryUsage) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Timestamp != 0 {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Timestamp))
+ }
+ if m.WorkingSetBytes != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.WorkingSetBytes.Size()))
+ n65, err := m.WorkingSetBytes.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n65
+ }
+ return i, nil
+}
+
+func encodeFixed64Api(dAtA []byte, offset int, v uint64) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ dAtA[offset+4] = uint8(v >> 32)
+ dAtA[offset+5] = uint8(v >> 40)
+ dAtA[offset+6] = uint8(v >> 48)
+ dAtA[offset+7] = uint8(v >> 56)
+ return offset + 8
+}
+func encodeFixed32Api(dAtA []byte, offset int, v uint32) int {
+ dAtA[offset] = uint8(v)
+ dAtA[offset+1] = uint8(v >> 8)
+ dAtA[offset+2] = uint8(v >> 16)
+ dAtA[offset+3] = uint8(v >> 24)
+ return offset + 4
+}
+func encodeVarintApi(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func (m *VersionRequest) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Version)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *VersionResponse) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Version)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.RuntimeName)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.RuntimeVersion)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.RuntimeApiVersion)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *DNSConfig) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Servers) > 0 {
+ for _, s := range m.Servers {
+ l = len(s)
+ n += 1 + l + sovApi(uint64(l))
+ }
+ }
+ if len(m.Searches) > 0 {
+ for _, s := range m.Searches {
+ l = len(s)
+ n += 1 + l + sovApi(uint64(l))
+ }
+ }
+ if len(m.Options) > 0 {
+ for _, s := range m.Options {
+ l = len(s)
+ n += 1 + l + sovApi(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *PortMapping) Size() (n int) {
+ var l int
+ _ = l
+ if m.Protocol != 0 {
+ n += 1 + sovApi(uint64(m.Protocol))
+ }
+ if m.ContainerPort != 0 {
+ n += 1 + sovApi(uint64(m.ContainerPort))
+ }
+ if m.HostPort != 0 {
+ n += 1 + sovApi(uint64(m.HostPort))
+ }
+ l = len(m.HostIp)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *Mount) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.ContainerPath)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.HostPath)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.Readonly {
+ n += 2
+ }
+ if m.SelinuxRelabel {
+ n += 2
+ }
+ return n
+}
+
+func (m *NamespaceOption) Size() (n int) {
+ var l int
+ _ = l
+ if m.HostNetwork {
+ n += 2
+ }
+ if m.HostPid {
+ n += 2
+ }
+ if m.HostIpc {
+ n += 2
+ }
+ return n
+}
+
+func (m *Int64Value) Size() (n int) {
+ var l int
+ _ = l
+ if m.Value != 0 {
+ n += 1 + sovApi(uint64(m.Value))
+ }
+ return n
+}
+
+func (m *LinuxSandboxSecurityContext) Size() (n int) {
+ var l int
+ _ = l
+ if m.NamespaceOptions != nil {
+ l = m.NamespaceOptions.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.SelinuxOptions != nil {
+ l = m.SelinuxOptions.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.RunAsUser != nil {
+ l = m.RunAsUser.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.ReadonlyRootfs {
+ n += 2
+ }
+ if len(m.SupplementalGroups) > 0 {
+ l = 0
+ for _, e := range m.SupplementalGroups {
+ l += sovApi(uint64(e))
+ }
+ n += 1 + sovApi(uint64(l)) + l
+ }
+ if m.Privileged {
+ n += 2
+ }
+ return n
+}
+
+func (m *LinuxPodSandboxConfig) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.CgroupParent)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.SecurityContext != nil {
+ l = m.SecurityContext.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if len(m.Sysctls) > 0 {
+ for k, v := range m.Sysctls {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *PodSandboxMetadata) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.Uid)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.Namespace)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.Attempt != 0 {
+ n += 1 + sovApi(uint64(m.Attempt))
+ }
+ return n
+}
+
+func (m *PodSandboxConfig) Size() (n int) {
+ var l int
+ _ = l
+ if m.Metadata != nil {
+ l = m.Metadata.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.Hostname)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.LogDirectory)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.DnsConfig != nil {
+ l = m.DnsConfig.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if len(m.PortMappings) > 0 {
+ for _, e := range m.PortMappings {
+ l = e.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ }
+ if len(m.Labels) > 0 {
+ for k, v := range m.Labels {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize))
+ }
+ }
+ if len(m.Annotations) > 0 {
+ for k, v := range m.Annotations {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize))
+ }
+ }
+ if m.Linux != nil {
+ l = m.Linux.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *RunPodSandboxRequest) Size() (n int) {
+ var l int
+ _ = l
+ if m.Config != nil {
+ l = m.Config.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *RunPodSandboxResponse) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.PodSandboxId)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *StopPodSandboxRequest) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.PodSandboxId)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *StopPodSandboxResponse) Size() (n int) {
+ var l int
+ _ = l
+ return n
+}
+
+func (m *RemovePodSandboxRequest) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.PodSandboxId)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *RemovePodSandboxResponse) Size() (n int) {
+ var l int
+ _ = l
+ return n
+}
+
+func (m *PodSandboxStatusRequest) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.PodSandboxId)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *PodSandboxNetworkStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Ip)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *Namespace) Size() (n int) {
+ var l int
+ _ = l
+ if m.Options != nil {
+ l = m.Options.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *LinuxPodSandboxStatus) Size() (n int) {
+ var l int
+ _ = l
+ if m.Namespaces != nil {
+ l = m.Namespaces.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *PodSandboxStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Id)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.Metadata != nil {
+ l = m.Metadata.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.State != 0 {
+ n += 1 + sovApi(uint64(m.State))
+ }
+ if m.CreatedAt != 0 {
+ n += 1 + sovApi(uint64(m.CreatedAt))
+ }
+ if m.Network != nil {
+ l = m.Network.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.Linux != nil {
+ l = m.Linux.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if len(m.Labels) > 0 {
+ for k, v := range m.Labels {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize))
+ }
+ }
+ if len(m.Annotations) > 0 {
+ for k, v := range m.Annotations {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *PodSandboxStatusResponse) Size() (n int) {
+ var l int
+ _ = l
+ if m.Status != nil {
+ l = m.Status.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *PodSandboxStateValue) Size() (n int) {
+ var l int
+ _ = l
+ if m.State != 0 {
+ n += 1 + sovApi(uint64(m.State))
+ }
+ return n
+}
+
+func (m *PodSandboxFilter) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Id)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.State != nil {
+ l = m.State.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if len(m.LabelSelector) > 0 {
+ for k, v := range m.LabelSelector {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *ListPodSandboxRequest) Size() (n int) {
+ var l int
+ _ = l
+ if m.Filter != nil {
+ l = m.Filter.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *PodSandbox) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Id)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.Metadata != nil {
+ l = m.Metadata.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.State != 0 {
+ n += 1 + sovApi(uint64(m.State))
+ }
+ if m.CreatedAt != 0 {
+ n += 1 + sovApi(uint64(m.CreatedAt))
+ }
+ if len(m.Labels) > 0 {
+ for k, v := range m.Labels {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize))
+ }
+ }
+ if len(m.Annotations) > 0 {
+ for k, v := range m.Annotations {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *ListPodSandboxResponse) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ImageSpec) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Image)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *KeyValue) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Key)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.Value)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *LinuxContainerResources) Size() (n int) {
+ var l int
+ _ = l
+ if m.CpuPeriod != 0 {
+ n += 1 + sovApi(uint64(m.CpuPeriod))
+ }
+ if m.CpuQuota != 0 {
+ n += 1 + sovApi(uint64(m.CpuQuota))
+ }
+ if m.CpuShares != 0 {
+ n += 1 + sovApi(uint64(m.CpuShares))
+ }
+ if m.MemoryLimitInBytes != 0 {
+ n += 1 + sovApi(uint64(m.MemoryLimitInBytes))
+ }
+ if m.OomScoreAdj != 0 {
+ n += 1 + sovApi(uint64(m.OomScoreAdj))
+ }
+ return n
+}
+
+func (m *SELinuxOption) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.User)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.Role)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.Type)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.Level)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *Capability) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.AddCapabilities) > 0 {
+ for _, s := range m.AddCapabilities {
+ l = len(s)
+ n += 1 + l + sovApi(uint64(l))
+ }
+ }
+ if len(m.DropCapabilities) > 0 {
+ for _, s := range m.DropCapabilities {
+ l = len(s)
+ n += 1 + l + sovApi(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *LinuxContainerSecurityContext) Size() (n int) {
+ var l int
+ _ = l
+ if m.Capabilities != nil {
+ l = m.Capabilities.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.Privileged {
+ n += 2
+ }
+ if m.NamespaceOptions != nil {
+ l = m.NamespaceOptions.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.SelinuxOptions != nil {
+ l = m.SelinuxOptions.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.RunAsUser != nil {
+ l = m.RunAsUser.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.RunAsUsername)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.ReadonlyRootfs {
+ n += 2
+ }
+ if len(m.SupplementalGroups) > 0 {
+ l = 0
+ for _, e := range m.SupplementalGroups {
+ l += sovApi(uint64(e))
+ }
+ n += 1 + sovApi(uint64(l)) + l
+ }
+ l = len(m.ApparmorProfile)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *LinuxContainerConfig) Size() (n int) {
+ var l int
+ _ = l
+ if m.Resources != nil {
+ l = m.Resources.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.SecurityContext != nil {
+ l = m.SecurityContext.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *ContainerMetadata) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.Attempt != 0 {
+ n += 1 + sovApi(uint64(m.Attempt))
+ }
+ return n
+}
+
+func (m *Device) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.ContainerPath)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.HostPath)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.Permissions)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *ContainerConfig) Size() (n int) {
+ var l int
+ _ = l
+ if m.Metadata != nil {
+ l = m.Metadata.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.Image != nil {
+ l = m.Image.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if len(m.Command) > 0 {
+ for _, s := range m.Command {
+ l = len(s)
+ n += 1 + l + sovApi(uint64(l))
+ }
+ }
+ if len(m.Args) > 0 {
+ for _, s := range m.Args {
+ l = len(s)
+ n += 1 + l + sovApi(uint64(l))
+ }
+ }
+ l = len(m.WorkingDir)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if len(m.Envs) > 0 {
+ for _, e := range m.Envs {
+ l = e.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ }
+ if len(m.Mounts) > 0 {
+ for _, e := range m.Mounts {
+ l = e.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ }
+ if len(m.Devices) > 0 {
+ for _, e := range m.Devices {
+ l = e.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ }
+ if len(m.Labels) > 0 {
+ for k, v := range m.Labels {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize))
+ }
+ }
+ if len(m.Annotations) > 0 {
+ for k, v := range m.Annotations {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize))
+ }
+ }
+ l = len(m.LogPath)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.Stdin {
+ n += 2
+ }
+ if m.StdinOnce {
+ n += 2
+ }
+ if m.Tty {
+ n += 2
+ }
+ if m.Linux != nil {
+ l = m.Linux.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *CreateContainerRequest) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.PodSandboxId)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.Config != nil {
+ l = m.Config.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.SandboxConfig != nil {
+ l = m.SandboxConfig.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *CreateContainerResponse) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.ContainerId)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *StartContainerRequest) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.ContainerId)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *StartContainerResponse) Size() (n int) {
+ var l int
+ _ = l
+ return n
+}
+
+func (m *StopContainerRequest) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.ContainerId)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.Timeout != 0 {
+ n += 1 + sovApi(uint64(m.Timeout))
+ }
+ return n
+}
+
+func (m *StopContainerResponse) Size() (n int) {
+ var l int
+ _ = l
+ return n
+}
+
+func (m *RemoveContainerRequest) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.ContainerId)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *RemoveContainerResponse) Size() (n int) {
+ var l int
+ _ = l
+ return n
+}
+
+func (m *ContainerStateValue) Size() (n int) {
+ var l int
+ _ = l
+ if m.State != 0 {
+ n += 1 + sovApi(uint64(m.State))
+ }
+ return n
+}
+
+func (m *ContainerFilter) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Id)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.State != nil {
+ l = m.State.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.PodSandboxId)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if len(m.LabelSelector) > 0 {
+ for k, v := range m.LabelSelector {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *ListContainersRequest) Size() (n int) {
+ var l int
+ _ = l
+ if m.Filter != nil {
+ l = m.Filter.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *Container) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Id)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.PodSandboxId)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.Metadata != nil {
+ l = m.Metadata.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.Image != nil {
+ l = m.Image.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.ImageRef)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.State != 0 {
+ n += 1 + sovApi(uint64(m.State))
+ }
+ if m.CreatedAt != 0 {
+ n += 1 + sovApi(uint64(m.CreatedAt))
+ }
+ if len(m.Labels) > 0 {
+ for k, v := range m.Labels {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize))
+ }
+ }
+ if len(m.Annotations) > 0 {
+ for k, v := range m.Annotations {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *ListContainersResponse) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Containers) > 0 {
+ for _, e := range m.Containers {
+ l = e.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ContainerStatusRequest) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.ContainerId)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *ContainerStatus) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Id)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.Metadata != nil {
+ l = m.Metadata.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.State != 0 {
+ n += 1 + sovApi(uint64(m.State))
+ }
+ if m.CreatedAt != 0 {
+ n += 1 + sovApi(uint64(m.CreatedAt))
+ }
+ if m.StartedAt != 0 {
+ n += 1 + sovApi(uint64(m.StartedAt))
+ }
+ if m.FinishedAt != 0 {
+ n += 1 + sovApi(uint64(m.FinishedAt))
+ }
+ if m.ExitCode != 0 {
+ n += 1 + sovApi(uint64(m.ExitCode))
+ }
+ if m.Image != nil {
+ l = m.Image.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.ImageRef)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.Reason)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.Message)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if len(m.Labels) > 0 {
+ for k, v := range m.Labels {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize))
+ }
+ }
+ if len(m.Annotations) > 0 {
+ for k, v := range m.Annotations {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize))
+ }
+ }
+ if len(m.Mounts) > 0 {
+ for _, e := range m.Mounts {
+ l = e.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ }
+ l = len(m.LogPath)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *ContainerStatusResponse) Size() (n int) {
+ var l int
+ _ = l
+ if m.Status != nil {
+ l = m.Status.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *ExecSyncRequest) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.ContainerId)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if len(m.Cmd) > 0 {
+ for _, s := range m.Cmd {
+ l = len(s)
+ n += 1 + l + sovApi(uint64(l))
+ }
+ }
+ if m.Timeout != 0 {
+ n += 1 + sovApi(uint64(m.Timeout))
+ }
+ return n
+}
+
+func (m *ExecSyncResponse) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Stdout)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.Stderr)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.ExitCode != 0 {
+ n += 1 + sovApi(uint64(m.ExitCode))
+ }
+ return n
+}
+
+func (m *ExecRequest) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.ContainerId)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if len(m.Cmd) > 0 {
+ for _, s := range m.Cmd {
+ l = len(s)
+ n += 1 + l + sovApi(uint64(l))
+ }
+ }
+ if m.Tty {
+ n += 2
+ }
+ if m.Stdin {
+ n += 2
+ }
+ return n
+}
+
+func (m *ExecResponse) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Url)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *AttachRequest) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.ContainerId)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.Stdin {
+ n += 2
+ }
+ if m.Tty {
+ n += 2
+ }
+ return n
+}
+
+func (m *AttachResponse) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Url)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *PortForwardRequest) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.PodSandboxId)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if len(m.Port) > 0 {
+ l = 0
+ for _, e := range m.Port {
+ l += sovApi(uint64(e))
+ }
+ n += 1 + sovApi(uint64(l)) + l
+ }
+ return n
+}
+
+func (m *PortForwardResponse) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Url)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *ImageFilter) Size() (n int) {
+ var l int
+ _ = l
+ if m.Image != nil {
+ l = m.Image.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *ListImagesRequest) Size() (n int) {
+ var l int
+ _ = l
+ if m.Filter != nil {
+ l = m.Filter.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *Image) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Id)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if len(m.RepoTags) > 0 {
+ for _, s := range m.RepoTags {
+ l = len(s)
+ n += 1 + l + sovApi(uint64(l))
+ }
+ }
+ if len(m.RepoDigests) > 0 {
+ for _, s := range m.RepoDigests {
+ l = len(s)
+ n += 1 + l + sovApi(uint64(l))
+ }
+ }
+ if m.Size_ != 0 {
+ n += 1 + sovApi(uint64(m.Size_))
+ }
+ if m.Uid != nil {
+ l = m.Uid.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.Username)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *ListImagesResponse) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Images) > 0 {
+ for _, e := range m.Images {
+ l = e.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ImageStatusRequest) Size() (n int) {
+ var l int
+ _ = l
+ if m.Image != nil {
+ l = m.Image.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *ImageStatusResponse) Size() (n int) {
+ var l int
+ _ = l
+ if m.Image != nil {
+ l = m.Image.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *AuthConfig) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Username)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.Password)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.Auth)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.ServerAddress)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.IdentityToken)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.RegistryToken)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *PullImageRequest) Size() (n int) {
+ var l int
+ _ = l
+ if m.Image != nil {
+ l = m.Image.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.Auth != nil {
+ l = m.Auth.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.SandboxConfig != nil {
+ l = m.SandboxConfig.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *PullImageResponse) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.ImageRef)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *RemoveImageRequest) Size() (n int) {
+ var l int
+ _ = l
+ if m.Image != nil {
+ l = m.Image.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *RemoveImageResponse) Size() (n int) {
+ var l int
+ _ = l
+ return n
+}
+
+func (m *NetworkConfig) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.PodCidr)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *RuntimeConfig) Size() (n int) {
+ var l int
+ _ = l
+ if m.NetworkConfig != nil {
+ l = m.NetworkConfig.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *UpdateRuntimeConfigRequest) Size() (n int) {
+ var l int
+ _ = l
+ if m.RuntimeConfig != nil {
+ l = m.RuntimeConfig.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *UpdateRuntimeConfigResponse) Size() (n int) {
+ var l int
+ _ = l
+ return n
+}
+
+func (m *RuntimeCondition) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Type)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.Status {
+ n += 2
+ }
+ l = len(m.Reason)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.Message)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *RuntimeStatus) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Conditions) > 0 {
+ for _, e := range m.Conditions {
+ l = e.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *StatusRequest) Size() (n int) {
+ var l int
+ _ = l
+ return n
+}
+
+func (m *StatusResponse) Size() (n int) {
+ var l int
+ _ = l
+ if m.Status != nil {
+ l = m.Status.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *ImageFsInfoRequest) Size() (n int) {
+ var l int
+ _ = l
+ return n
+}
+
+func (m *UInt64Value) Size() (n int) {
+ var l int
+ _ = l
+ if m.Value != 0 {
+ n += 1 + sovApi(uint64(m.Value))
+ }
+ return n
+}
+
+func (m *StorageIdentifier) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Uuid)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *FilesystemUsage) Size() (n int) {
+ var l int
+ _ = l
+ if m.Timestamp != 0 {
+ n += 1 + sovApi(uint64(m.Timestamp))
+ }
+ if m.StorageId != nil {
+ l = m.StorageId.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.UsedBytes != nil {
+ l = m.UsedBytes.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.InodesUsed != nil {
+ l = m.InodesUsed.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *ImageFsInfoResponse) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.ImageFilesystems) > 0 {
+ for _, e := range m.ImageFilesystems {
+ l = e.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ContainerStatsRequest) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.ContainerId)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *ContainerStatsResponse) Size() (n int) {
+ var l int
+ _ = l
+ if m.Stats != nil {
+ l = m.Stats.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *ListContainerStatsRequest) Size() (n int) {
+ var l int
+ _ = l
+ if m.Filter != nil {
+ l = m.Filter.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *ContainerStatsFilter) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Id)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.PodSandboxId)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if len(m.LabelSelector) > 0 {
+ for k, v := range m.LabelSelector {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *ListContainerStatsResponse) Size() (n int) {
+ var l int
+ _ = l
+ if len(m.Stats) > 0 {
+ for _, e := range m.Stats {
+ l = e.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *ContainerAttributes) Size() (n int) {
+ var l int
+ _ = l
+ l = len(m.Id)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.Metadata != nil {
+ l = m.Metadata.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if len(m.Labels) > 0 {
+ for k, v := range m.Labels {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize))
+ }
+ }
+ if len(m.Annotations) > 0 {
+ for k, v := range m.Annotations {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
+ n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize))
+ }
+ }
+ return n
+}
+
+func (m *ContainerStats) Size() (n int) {
+ var l int
+ _ = l
+ if m.Attributes != nil {
+ l = m.Attributes.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.Cpu != nil {
+ l = m.Cpu.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.Memory != nil {
+ l = m.Memory.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.WritableLayer != nil {
+ l = m.WritableLayer.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *CpuUsage) Size() (n int) {
+ var l int
+ _ = l
+ if m.Timestamp != 0 {
+ n += 1 + sovApi(uint64(m.Timestamp))
+ }
+ if m.UsageCoreNanoSeconds != nil {
+ l = m.UsageCoreNanoSeconds.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func (m *MemoryUsage) Size() (n int) {
+ var l int
+ _ = l
+ if m.Timestamp != 0 {
+ n += 1 + sovApi(uint64(m.Timestamp))
+ }
+ if m.WorkingSetBytes != nil {
+ l = m.WorkingSetBytes.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ return n
+}
+
+func sovApi(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozApi(x uint64) (n int) {
+ return sovApi(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *VersionRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&VersionRequest{`,
+ `Version:` + fmt.Sprintf("%v", this.Version) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *VersionResponse) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&VersionResponse{`,
+ `Version:` + fmt.Sprintf("%v", this.Version) + `,`,
+ `RuntimeName:` + fmt.Sprintf("%v", this.RuntimeName) + `,`,
+ `RuntimeVersion:` + fmt.Sprintf("%v", this.RuntimeVersion) + `,`,
+ `RuntimeApiVersion:` + fmt.Sprintf("%v", this.RuntimeApiVersion) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *DNSConfig) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&DNSConfig{`,
+ `Servers:` + fmt.Sprintf("%v", this.Servers) + `,`,
+ `Searches:` + fmt.Sprintf("%v", this.Searches) + `,`,
+ `Options:` + fmt.Sprintf("%v", this.Options) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PortMapping) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PortMapping{`,
+ `Protocol:` + fmt.Sprintf("%v", this.Protocol) + `,`,
+ `ContainerPort:` + fmt.Sprintf("%v", this.ContainerPort) + `,`,
+ `HostPort:` + fmt.Sprintf("%v", this.HostPort) + `,`,
+ `HostIp:` + fmt.Sprintf("%v", this.HostIp) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Mount) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Mount{`,
+ `ContainerPath:` + fmt.Sprintf("%v", this.ContainerPath) + `,`,
+ `HostPath:` + fmt.Sprintf("%v", this.HostPath) + `,`,
+ `Readonly:` + fmt.Sprintf("%v", this.Readonly) + `,`,
+ `SelinuxRelabel:` + fmt.Sprintf("%v", this.SelinuxRelabel) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NamespaceOption) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NamespaceOption{`,
+ `HostNetwork:` + fmt.Sprintf("%v", this.HostNetwork) + `,`,
+ `HostPid:` + fmt.Sprintf("%v", this.HostPid) + `,`,
+ `HostIpc:` + fmt.Sprintf("%v", this.HostIpc) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Int64Value) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Int64Value{`,
+ `Value:` + fmt.Sprintf("%v", this.Value) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *LinuxSandboxSecurityContext) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&LinuxSandboxSecurityContext{`,
+ `NamespaceOptions:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceOptions), "NamespaceOption", "NamespaceOption", 1) + `,`,
+ `SelinuxOptions:` + strings.Replace(fmt.Sprintf("%v", this.SelinuxOptions), "SELinuxOption", "SELinuxOption", 1) + `,`,
+ `RunAsUser:` + strings.Replace(fmt.Sprintf("%v", this.RunAsUser), "Int64Value", "Int64Value", 1) + `,`,
+ `ReadonlyRootfs:` + fmt.Sprintf("%v", this.ReadonlyRootfs) + `,`,
+ `SupplementalGroups:` + fmt.Sprintf("%v", this.SupplementalGroups) + `,`,
+ `Privileged:` + fmt.Sprintf("%v", this.Privileged) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *LinuxPodSandboxConfig) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForSysctls := make([]string, 0, len(this.Sysctls))
+ for k := range this.Sysctls {
+ keysForSysctls = append(keysForSysctls, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForSysctls)
+ mapStringForSysctls := "map[string]string{"
+ for _, k := range keysForSysctls {
+ mapStringForSysctls += fmt.Sprintf("%v: %v,", k, this.Sysctls[k])
+ }
+ mapStringForSysctls += "}"
+ s := strings.Join([]string{`&LinuxPodSandboxConfig{`,
+ `CgroupParent:` + fmt.Sprintf("%v", this.CgroupParent) + `,`,
+ `SecurityContext:` + strings.Replace(fmt.Sprintf("%v", this.SecurityContext), "LinuxSandboxSecurityContext", "LinuxSandboxSecurityContext", 1) + `,`,
+ `Sysctls:` + mapStringForSysctls + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodSandboxMetadata) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodSandboxMetadata{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Uid:` + fmt.Sprintf("%v", this.Uid) + `,`,
+ `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
+ `Attempt:` + fmt.Sprintf("%v", this.Attempt) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodSandboxConfig) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForLabels := make([]string, 0, len(this.Labels))
+ for k := range this.Labels {
+ keysForLabels = append(keysForLabels, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
+ mapStringForLabels := "map[string]string{"
+ for _, k := range keysForLabels {
+ mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
+ }
+ mapStringForLabels += "}"
+ keysForAnnotations := make([]string, 0, len(this.Annotations))
+ for k := range this.Annotations {
+ keysForAnnotations = append(keysForAnnotations, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations)
+ mapStringForAnnotations := "map[string]string{"
+ for _, k := range keysForAnnotations {
+ mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k])
+ }
+ mapStringForAnnotations += "}"
+ s := strings.Join([]string{`&PodSandboxConfig{`,
+ `Metadata:` + strings.Replace(fmt.Sprintf("%v", this.Metadata), "PodSandboxMetadata", "PodSandboxMetadata", 1) + `,`,
+ `Hostname:` + fmt.Sprintf("%v", this.Hostname) + `,`,
+ `LogDirectory:` + fmt.Sprintf("%v", this.LogDirectory) + `,`,
+ `DnsConfig:` + strings.Replace(fmt.Sprintf("%v", this.DnsConfig), "DNSConfig", "DNSConfig", 1) + `,`,
+ `PortMappings:` + strings.Replace(fmt.Sprintf("%v", this.PortMappings), "PortMapping", "PortMapping", 1) + `,`,
+ `Labels:` + mapStringForLabels + `,`,
+ `Annotations:` + mapStringForAnnotations + `,`,
+ `Linux:` + strings.Replace(fmt.Sprintf("%v", this.Linux), "LinuxPodSandboxConfig", "LinuxPodSandboxConfig", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RunPodSandboxRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RunPodSandboxRequest{`,
+ `Config:` + strings.Replace(fmt.Sprintf("%v", this.Config), "PodSandboxConfig", "PodSandboxConfig", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RunPodSandboxResponse) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RunPodSandboxResponse{`,
+ `PodSandboxId:` + fmt.Sprintf("%v", this.PodSandboxId) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StopPodSandboxRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StopPodSandboxRequest{`,
+ `PodSandboxId:` + fmt.Sprintf("%v", this.PodSandboxId) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StopPodSandboxResponse) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StopPodSandboxResponse{`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RemovePodSandboxRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RemovePodSandboxRequest{`,
+ `PodSandboxId:` + fmt.Sprintf("%v", this.PodSandboxId) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RemovePodSandboxResponse) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RemovePodSandboxResponse{`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodSandboxStatusRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodSandboxStatusRequest{`,
+ `PodSandboxId:` + fmt.Sprintf("%v", this.PodSandboxId) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodSandboxNetworkStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodSandboxNetworkStatus{`,
+ `Ip:` + fmt.Sprintf("%v", this.Ip) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Namespace) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Namespace{`,
+ `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "NamespaceOption", "NamespaceOption", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *LinuxPodSandboxStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&LinuxPodSandboxStatus{`,
+ `Namespaces:` + strings.Replace(fmt.Sprintf("%v", this.Namespaces), "Namespace", "Namespace", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodSandboxStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForLabels := make([]string, 0, len(this.Labels))
+ for k := range this.Labels {
+ keysForLabels = append(keysForLabels, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
+ mapStringForLabels := "map[string]string{"
+ for _, k := range keysForLabels {
+ mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
+ }
+ mapStringForLabels += "}"
+ keysForAnnotations := make([]string, 0, len(this.Annotations))
+ for k := range this.Annotations {
+ keysForAnnotations = append(keysForAnnotations, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations)
+ mapStringForAnnotations := "map[string]string{"
+ for _, k := range keysForAnnotations {
+ mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k])
+ }
+ mapStringForAnnotations += "}"
+ s := strings.Join([]string{`&PodSandboxStatus{`,
+ `Id:` + fmt.Sprintf("%v", this.Id) + `,`,
+ `Metadata:` + strings.Replace(fmt.Sprintf("%v", this.Metadata), "PodSandboxMetadata", "PodSandboxMetadata", 1) + `,`,
+ `State:` + fmt.Sprintf("%v", this.State) + `,`,
+ `CreatedAt:` + fmt.Sprintf("%v", this.CreatedAt) + `,`,
+ `Network:` + strings.Replace(fmt.Sprintf("%v", this.Network), "PodSandboxNetworkStatus", "PodSandboxNetworkStatus", 1) + `,`,
+ `Linux:` + strings.Replace(fmt.Sprintf("%v", this.Linux), "LinuxPodSandboxStatus", "LinuxPodSandboxStatus", 1) + `,`,
+ `Labels:` + mapStringForLabels + `,`,
+ `Annotations:` + mapStringForAnnotations + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodSandboxStatusResponse) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodSandboxStatusResponse{`,
+ `Status:` + strings.Replace(fmt.Sprintf("%v", this.Status), "PodSandboxStatus", "PodSandboxStatus", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodSandboxStateValue) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PodSandboxStateValue{`,
+ `State:` + fmt.Sprintf("%v", this.State) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodSandboxFilter) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForLabelSelector := make([]string, 0, len(this.LabelSelector))
+ for k := range this.LabelSelector {
+ keysForLabelSelector = append(keysForLabelSelector, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabelSelector)
+ mapStringForLabelSelector := "map[string]string{"
+ for _, k := range keysForLabelSelector {
+ mapStringForLabelSelector += fmt.Sprintf("%v: %v,", k, this.LabelSelector[k])
+ }
+ mapStringForLabelSelector += "}"
+ s := strings.Join([]string{`&PodSandboxFilter{`,
+ `Id:` + fmt.Sprintf("%v", this.Id) + `,`,
+ `State:` + strings.Replace(fmt.Sprintf("%v", this.State), "PodSandboxStateValue", "PodSandboxStateValue", 1) + `,`,
+ `LabelSelector:` + mapStringForLabelSelector + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ListPodSandboxRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ListPodSandboxRequest{`,
+ `Filter:` + strings.Replace(fmt.Sprintf("%v", this.Filter), "PodSandboxFilter", "PodSandboxFilter", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PodSandbox) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForLabels := make([]string, 0, len(this.Labels))
+ for k := range this.Labels {
+ keysForLabels = append(keysForLabels, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
+ mapStringForLabels := "map[string]string{"
+ for _, k := range keysForLabels {
+ mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
+ }
+ mapStringForLabels += "}"
+ keysForAnnotations := make([]string, 0, len(this.Annotations))
+ for k := range this.Annotations {
+ keysForAnnotations = append(keysForAnnotations, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations)
+ mapStringForAnnotations := "map[string]string{"
+ for _, k := range keysForAnnotations {
+ mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k])
+ }
+ mapStringForAnnotations += "}"
+ s := strings.Join([]string{`&PodSandbox{`,
+ `Id:` + fmt.Sprintf("%v", this.Id) + `,`,
+ `Metadata:` + strings.Replace(fmt.Sprintf("%v", this.Metadata), "PodSandboxMetadata", "PodSandboxMetadata", 1) + `,`,
+ `State:` + fmt.Sprintf("%v", this.State) + `,`,
+ `CreatedAt:` + fmt.Sprintf("%v", this.CreatedAt) + `,`,
+ `Labels:` + mapStringForLabels + `,`,
+ `Annotations:` + mapStringForAnnotations + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ListPodSandboxResponse) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ListPodSandboxResponse{`,
+ `Items:` + strings.Replace(fmt.Sprintf("%v", this.Items), "PodSandbox", "PodSandbox", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ImageSpec) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ImageSpec{`,
+ `Image:` + fmt.Sprintf("%v", this.Image) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *KeyValue) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&KeyValue{`,
+ `Key:` + fmt.Sprintf("%v", this.Key) + `,`,
+ `Value:` + fmt.Sprintf("%v", this.Value) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *LinuxContainerResources) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&LinuxContainerResources{`,
+ `CpuPeriod:` + fmt.Sprintf("%v", this.CpuPeriod) + `,`,
+ `CpuQuota:` + fmt.Sprintf("%v", this.CpuQuota) + `,`,
+ `CpuShares:` + fmt.Sprintf("%v", this.CpuShares) + `,`,
+ `MemoryLimitInBytes:` + fmt.Sprintf("%v", this.MemoryLimitInBytes) + `,`,
+ `OomScoreAdj:` + fmt.Sprintf("%v", this.OomScoreAdj) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *SELinuxOption) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SELinuxOption{`,
+ `User:` + fmt.Sprintf("%v", this.User) + `,`,
+ `Role:` + fmt.Sprintf("%v", this.Role) + `,`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Level:` + fmt.Sprintf("%v", this.Level) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Capability) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Capability{`,
+ `AddCapabilities:` + fmt.Sprintf("%v", this.AddCapabilities) + `,`,
+ `DropCapabilities:` + fmt.Sprintf("%v", this.DropCapabilities) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *LinuxContainerSecurityContext) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&LinuxContainerSecurityContext{`,
+ `Capabilities:` + strings.Replace(fmt.Sprintf("%v", this.Capabilities), "Capability", "Capability", 1) + `,`,
+ `Privileged:` + fmt.Sprintf("%v", this.Privileged) + `,`,
+ `NamespaceOptions:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceOptions), "NamespaceOption", "NamespaceOption", 1) + `,`,
+ `SelinuxOptions:` + strings.Replace(fmt.Sprintf("%v", this.SelinuxOptions), "SELinuxOption", "SELinuxOption", 1) + `,`,
+ `RunAsUser:` + strings.Replace(fmt.Sprintf("%v", this.RunAsUser), "Int64Value", "Int64Value", 1) + `,`,
+ `RunAsUsername:` + fmt.Sprintf("%v", this.RunAsUsername) + `,`,
+ `ReadonlyRootfs:` + fmt.Sprintf("%v", this.ReadonlyRootfs) + `,`,
+ `SupplementalGroups:` + fmt.Sprintf("%v", this.SupplementalGroups) + `,`,
+ `ApparmorProfile:` + fmt.Sprintf("%v", this.ApparmorProfile) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *LinuxContainerConfig) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&LinuxContainerConfig{`,
+ `Resources:` + strings.Replace(fmt.Sprintf("%v", this.Resources), "LinuxContainerResources", "LinuxContainerResources", 1) + `,`,
+ `SecurityContext:` + strings.Replace(fmt.Sprintf("%v", this.SecurityContext), "LinuxContainerSecurityContext", "LinuxContainerSecurityContext", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ContainerMetadata) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ContainerMetadata{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Attempt:` + fmt.Sprintf("%v", this.Attempt) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Device) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Device{`,
+ `ContainerPath:` + fmt.Sprintf("%v", this.ContainerPath) + `,`,
+ `HostPath:` + fmt.Sprintf("%v", this.HostPath) + `,`,
+ `Permissions:` + fmt.Sprintf("%v", this.Permissions) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ContainerConfig) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForLabels := make([]string, 0, len(this.Labels))
+ for k := range this.Labels {
+ keysForLabels = append(keysForLabels, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
+ mapStringForLabels := "map[string]string{"
+ for _, k := range keysForLabels {
+ mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
+ }
+ mapStringForLabels += "}"
+ keysForAnnotations := make([]string, 0, len(this.Annotations))
+ for k := range this.Annotations {
+ keysForAnnotations = append(keysForAnnotations, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations)
+ mapStringForAnnotations := "map[string]string{"
+ for _, k := range keysForAnnotations {
+ mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k])
+ }
+ mapStringForAnnotations += "}"
+ s := strings.Join([]string{`&ContainerConfig{`,
+ `Metadata:` + strings.Replace(fmt.Sprintf("%v", this.Metadata), "ContainerMetadata", "ContainerMetadata", 1) + `,`,
+ `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "ImageSpec", "ImageSpec", 1) + `,`,
+ `Command:` + fmt.Sprintf("%v", this.Command) + `,`,
+ `Args:` + fmt.Sprintf("%v", this.Args) + `,`,
+ `WorkingDir:` + fmt.Sprintf("%v", this.WorkingDir) + `,`,
+ `Envs:` + strings.Replace(fmt.Sprintf("%v", this.Envs), "KeyValue", "KeyValue", 1) + `,`,
+ `Mounts:` + strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "Mount", 1) + `,`,
+ `Devices:` + strings.Replace(fmt.Sprintf("%v", this.Devices), "Device", "Device", 1) + `,`,
+ `Labels:` + mapStringForLabels + `,`,
+ `Annotations:` + mapStringForAnnotations + `,`,
+ `LogPath:` + fmt.Sprintf("%v", this.LogPath) + `,`,
+ `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`,
+ `StdinOnce:` + fmt.Sprintf("%v", this.StdinOnce) + `,`,
+ `Tty:` + fmt.Sprintf("%v", this.Tty) + `,`,
+ `Linux:` + strings.Replace(fmt.Sprintf("%v", this.Linux), "LinuxContainerConfig", "LinuxContainerConfig", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CreateContainerRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CreateContainerRequest{`,
+ `PodSandboxId:` + fmt.Sprintf("%v", this.PodSandboxId) + `,`,
+ `Config:` + strings.Replace(fmt.Sprintf("%v", this.Config), "ContainerConfig", "ContainerConfig", 1) + `,`,
+ `SandboxConfig:` + strings.Replace(fmt.Sprintf("%v", this.SandboxConfig), "PodSandboxConfig", "PodSandboxConfig", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CreateContainerResponse) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CreateContainerResponse{`,
+ `ContainerId:` + fmt.Sprintf("%v", this.ContainerId) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StartContainerRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StartContainerRequest{`,
+ `ContainerId:` + fmt.Sprintf("%v", this.ContainerId) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StartContainerResponse) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StartContainerResponse{`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StopContainerRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StopContainerRequest{`,
+ `ContainerId:` + fmt.Sprintf("%v", this.ContainerId) + `,`,
+ `Timeout:` + fmt.Sprintf("%v", this.Timeout) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StopContainerResponse) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StopContainerResponse{`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RemoveContainerRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RemoveContainerRequest{`,
+ `ContainerId:` + fmt.Sprintf("%v", this.ContainerId) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RemoveContainerResponse) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RemoveContainerResponse{`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ContainerStateValue) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ContainerStateValue{`,
+ `State:` + fmt.Sprintf("%v", this.State) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ContainerFilter) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForLabelSelector := make([]string, 0, len(this.LabelSelector))
+ for k := range this.LabelSelector {
+ keysForLabelSelector = append(keysForLabelSelector, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabelSelector)
+ mapStringForLabelSelector := "map[string]string{"
+ for _, k := range keysForLabelSelector {
+ mapStringForLabelSelector += fmt.Sprintf("%v: %v,", k, this.LabelSelector[k])
+ }
+ mapStringForLabelSelector += "}"
+ s := strings.Join([]string{`&ContainerFilter{`,
+ `Id:` + fmt.Sprintf("%v", this.Id) + `,`,
+ `State:` + strings.Replace(fmt.Sprintf("%v", this.State), "ContainerStateValue", "ContainerStateValue", 1) + `,`,
+ `PodSandboxId:` + fmt.Sprintf("%v", this.PodSandboxId) + `,`,
+ `LabelSelector:` + mapStringForLabelSelector + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ListContainersRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ListContainersRequest{`,
+ `Filter:` + strings.Replace(fmt.Sprintf("%v", this.Filter), "ContainerFilter", "ContainerFilter", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Container) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForLabels := make([]string, 0, len(this.Labels))
+ for k := range this.Labels {
+ keysForLabels = append(keysForLabels, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
+ mapStringForLabels := "map[string]string{"
+ for _, k := range keysForLabels {
+ mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
+ }
+ mapStringForLabels += "}"
+ keysForAnnotations := make([]string, 0, len(this.Annotations))
+ for k := range this.Annotations {
+ keysForAnnotations = append(keysForAnnotations, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations)
+ mapStringForAnnotations := "map[string]string{"
+ for _, k := range keysForAnnotations {
+ mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k])
+ }
+ mapStringForAnnotations += "}"
+ s := strings.Join([]string{`&Container{`,
+ `Id:` + fmt.Sprintf("%v", this.Id) + `,`,
+ `PodSandboxId:` + fmt.Sprintf("%v", this.PodSandboxId) + `,`,
+ `Metadata:` + strings.Replace(fmt.Sprintf("%v", this.Metadata), "ContainerMetadata", "ContainerMetadata", 1) + `,`,
+ `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "ImageSpec", "ImageSpec", 1) + `,`,
+ `ImageRef:` + fmt.Sprintf("%v", this.ImageRef) + `,`,
+ `State:` + fmt.Sprintf("%v", this.State) + `,`,
+ `CreatedAt:` + fmt.Sprintf("%v", this.CreatedAt) + `,`,
+ `Labels:` + mapStringForLabels + `,`,
+ `Annotations:` + mapStringForAnnotations + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ListContainersResponse) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ListContainersResponse{`,
+ `Containers:` + strings.Replace(fmt.Sprintf("%v", this.Containers), "Container", "Container", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ContainerStatusRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ContainerStatusRequest{`,
+ `ContainerId:` + fmt.Sprintf("%v", this.ContainerId) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ContainerStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForLabels := make([]string, 0, len(this.Labels))
+ for k := range this.Labels {
+ keysForLabels = append(keysForLabels, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
+ mapStringForLabels := "map[string]string{"
+ for _, k := range keysForLabels {
+ mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
+ }
+ mapStringForLabels += "}"
+ keysForAnnotations := make([]string, 0, len(this.Annotations))
+ for k := range this.Annotations {
+ keysForAnnotations = append(keysForAnnotations, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations)
+ mapStringForAnnotations := "map[string]string{"
+ for _, k := range keysForAnnotations {
+ mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k])
+ }
+ mapStringForAnnotations += "}"
+ s := strings.Join([]string{`&ContainerStatus{`,
+ `Id:` + fmt.Sprintf("%v", this.Id) + `,`,
+ `Metadata:` + strings.Replace(fmt.Sprintf("%v", this.Metadata), "ContainerMetadata", "ContainerMetadata", 1) + `,`,
+ `State:` + fmt.Sprintf("%v", this.State) + `,`,
+ `CreatedAt:` + fmt.Sprintf("%v", this.CreatedAt) + `,`,
+ `StartedAt:` + fmt.Sprintf("%v", this.StartedAt) + `,`,
+ `FinishedAt:` + fmt.Sprintf("%v", this.FinishedAt) + `,`,
+ `ExitCode:` + fmt.Sprintf("%v", this.ExitCode) + `,`,
+ `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "ImageSpec", "ImageSpec", 1) + `,`,
+ `ImageRef:` + fmt.Sprintf("%v", this.ImageRef) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `Labels:` + mapStringForLabels + `,`,
+ `Annotations:` + mapStringForAnnotations + `,`,
+ `Mounts:` + strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "Mount", 1) + `,`,
+ `LogPath:` + fmt.Sprintf("%v", this.LogPath) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ContainerStatusResponse) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ContainerStatusResponse{`,
+ `Status:` + strings.Replace(fmt.Sprintf("%v", this.Status), "ContainerStatus", "ContainerStatus", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ExecSyncRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ExecSyncRequest{`,
+ `ContainerId:` + fmt.Sprintf("%v", this.ContainerId) + `,`,
+ `Cmd:` + fmt.Sprintf("%v", this.Cmd) + `,`,
+ `Timeout:` + fmt.Sprintf("%v", this.Timeout) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ExecSyncResponse) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ExecSyncResponse{`,
+ `Stdout:` + fmt.Sprintf("%v", this.Stdout) + `,`,
+ `Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`,
+ `ExitCode:` + fmt.Sprintf("%v", this.ExitCode) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ExecRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ExecRequest{`,
+ `ContainerId:` + fmt.Sprintf("%v", this.ContainerId) + `,`,
+ `Cmd:` + fmt.Sprintf("%v", this.Cmd) + `,`,
+ `Tty:` + fmt.Sprintf("%v", this.Tty) + `,`,
+ `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ExecResponse) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ExecResponse{`,
+ `Url:` + fmt.Sprintf("%v", this.Url) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *AttachRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&AttachRequest{`,
+ `ContainerId:` + fmt.Sprintf("%v", this.ContainerId) + `,`,
+ `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`,
+ `Tty:` + fmt.Sprintf("%v", this.Tty) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *AttachResponse) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&AttachResponse{`,
+ `Url:` + fmt.Sprintf("%v", this.Url) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PortForwardRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PortForwardRequest{`,
+ `PodSandboxId:` + fmt.Sprintf("%v", this.PodSandboxId) + `,`,
+ `Port:` + fmt.Sprintf("%v", this.Port) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PortForwardResponse) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PortForwardResponse{`,
+ `Url:` + fmt.Sprintf("%v", this.Url) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ImageFilter) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ImageFilter{`,
+ `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "ImageSpec", "ImageSpec", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ListImagesRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ListImagesRequest{`,
+ `Filter:` + strings.Replace(fmt.Sprintf("%v", this.Filter), "ImageFilter", "ImageFilter", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Image) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Image{`,
+ `Id:` + fmt.Sprintf("%v", this.Id) + `,`,
+ `RepoTags:` + fmt.Sprintf("%v", this.RepoTags) + `,`,
+ `RepoDigests:` + fmt.Sprintf("%v", this.RepoDigests) + `,`,
+ `Size_:` + fmt.Sprintf("%v", this.Size_) + `,`,
+ `Uid:` + strings.Replace(fmt.Sprintf("%v", this.Uid), "Int64Value", "Int64Value", 1) + `,`,
+ `Username:` + fmt.Sprintf("%v", this.Username) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ListImagesResponse) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ListImagesResponse{`,
+ `Images:` + strings.Replace(fmt.Sprintf("%v", this.Images), "Image", "Image", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ImageStatusRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ImageStatusRequest{`,
+ `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "ImageSpec", "ImageSpec", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ImageStatusResponse) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ImageStatusResponse{`,
+ `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "Image", "Image", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *AuthConfig) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&AuthConfig{`,
+ `Username:` + fmt.Sprintf("%v", this.Username) + `,`,
+ `Password:` + fmt.Sprintf("%v", this.Password) + `,`,
+ `Auth:` + fmt.Sprintf("%v", this.Auth) + `,`,
+ `ServerAddress:` + fmt.Sprintf("%v", this.ServerAddress) + `,`,
+ `IdentityToken:` + fmt.Sprintf("%v", this.IdentityToken) + `,`,
+ `RegistryToken:` + fmt.Sprintf("%v", this.RegistryToken) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PullImageRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PullImageRequest{`,
+ `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "ImageSpec", "ImageSpec", 1) + `,`,
+ `Auth:` + strings.Replace(fmt.Sprintf("%v", this.Auth), "AuthConfig", "AuthConfig", 1) + `,`,
+ `SandboxConfig:` + strings.Replace(fmt.Sprintf("%v", this.SandboxConfig), "PodSandboxConfig", "PodSandboxConfig", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *PullImageResponse) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&PullImageResponse{`,
+ `ImageRef:` + fmt.Sprintf("%v", this.ImageRef) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RemoveImageRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RemoveImageRequest{`,
+ `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "ImageSpec", "ImageSpec", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RemoveImageResponse) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RemoveImageResponse{`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *NetworkConfig) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&NetworkConfig{`,
+ `PodCidr:` + fmt.Sprintf("%v", this.PodCidr) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RuntimeConfig) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RuntimeConfig{`,
+ `NetworkConfig:` + strings.Replace(fmt.Sprintf("%v", this.NetworkConfig), "NetworkConfig", "NetworkConfig", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *UpdateRuntimeConfigRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&UpdateRuntimeConfigRequest{`,
+ `RuntimeConfig:` + strings.Replace(fmt.Sprintf("%v", this.RuntimeConfig), "RuntimeConfig", "RuntimeConfig", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *UpdateRuntimeConfigResponse) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&UpdateRuntimeConfigResponse{`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RuntimeCondition) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RuntimeCondition{`,
+ `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
+ `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
+ `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`,
+ `Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *RuntimeStatus) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&RuntimeStatus{`,
+ `Conditions:` + strings.Replace(fmt.Sprintf("%v", this.Conditions), "RuntimeCondition", "RuntimeCondition", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StatusRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StatusRequest{`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StatusResponse) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StatusResponse{`,
+ `Status:` + strings.Replace(fmt.Sprintf("%v", this.Status), "RuntimeStatus", "RuntimeStatus", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ImageFsInfoRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ImageFsInfoRequest{`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *UInt64Value) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&UInt64Value{`,
+ `Value:` + fmt.Sprintf("%v", this.Value) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *StorageIdentifier) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&StorageIdentifier{`,
+ `Uuid:` + fmt.Sprintf("%v", this.Uuid) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *FilesystemUsage) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&FilesystemUsage{`,
+ `Timestamp:` + fmt.Sprintf("%v", this.Timestamp) + `,`,
+ `StorageId:` + strings.Replace(fmt.Sprintf("%v", this.StorageId), "StorageIdentifier", "StorageIdentifier", 1) + `,`,
+ `UsedBytes:` + strings.Replace(fmt.Sprintf("%v", this.UsedBytes), "UInt64Value", "UInt64Value", 1) + `,`,
+ `InodesUsed:` + strings.Replace(fmt.Sprintf("%v", this.InodesUsed), "UInt64Value", "UInt64Value", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ImageFsInfoResponse) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ImageFsInfoResponse{`,
+ `ImageFilesystems:` + strings.Replace(fmt.Sprintf("%v", this.ImageFilesystems), "FilesystemUsage", "FilesystemUsage", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ContainerStatsRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ContainerStatsRequest{`,
+ `ContainerId:` + fmt.Sprintf("%v", this.ContainerId) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ContainerStatsResponse) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ContainerStatsResponse{`,
+ `Stats:` + strings.Replace(fmt.Sprintf("%v", this.Stats), "ContainerStats", "ContainerStats", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ListContainerStatsRequest) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ListContainerStatsRequest{`,
+ `Filter:` + strings.Replace(fmt.Sprintf("%v", this.Filter), "ContainerStatsFilter", "ContainerStatsFilter", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ContainerStatsFilter) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForLabelSelector := make([]string, 0, len(this.LabelSelector))
+ for k := range this.LabelSelector {
+ keysForLabelSelector = append(keysForLabelSelector, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabelSelector)
+ mapStringForLabelSelector := "map[string]string{"
+ for _, k := range keysForLabelSelector {
+ mapStringForLabelSelector += fmt.Sprintf("%v: %v,", k, this.LabelSelector[k])
+ }
+ mapStringForLabelSelector += "}"
+ s := strings.Join([]string{`&ContainerStatsFilter{`,
+ `Id:` + fmt.Sprintf("%v", this.Id) + `,`,
+ `PodSandboxId:` + fmt.Sprintf("%v", this.PodSandboxId) + `,`,
+ `LabelSelector:` + mapStringForLabelSelector + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ListContainerStatsResponse) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ListContainerStatsResponse{`,
+ `Stats:` + strings.Replace(fmt.Sprintf("%v", this.Stats), "ContainerStats", "ContainerStats", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ContainerAttributes) String() string {
+ if this == nil {
+ return "nil"
+ }
+ keysForLabels := make([]string, 0, len(this.Labels))
+ for k := range this.Labels {
+ keysForLabels = append(keysForLabels, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
+ mapStringForLabels := "map[string]string{"
+ for _, k := range keysForLabels {
+ mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
+ }
+ mapStringForLabels += "}"
+ keysForAnnotations := make([]string, 0, len(this.Annotations))
+ for k := range this.Annotations {
+ keysForAnnotations = append(keysForAnnotations, k)
+ }
+ github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations)
+ mapStringForAnnotations := "map[string]string{"
+ for _, k := range keysForAnnotations {
+ mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k])
+ }
+ mapStringForAnnotations += "}"
+ s := strings.Join([]string{`&ContainerAttributes{`,
+ `Id:` + fmt.Sprintf("%v", this.Id) + `,`,
+ `Metadata:` + strings.Replace(fmt.Sprintf("%v", this.Metadata), "ContainerMetadata", "ContainerMetadata", 1) + `,`,
+ `Labels:` + mapStringForLabels + `,`,
+ `Annotations:` + mapStringForAnnotations + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *ContainerStats) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&ContainerStats{`,
+ `Attributes:` + strings.Replace(fmt.Sprintf("%v", this.Attributes), "ContainerAttributes", "ContainerAttributes", 1) + `,`,
+ `Cpu:` + strings.Replace(fmt.Sprintf("%v", this.Cpu), "CpuUsage", "CpuUsage", 1) + `,`,
+ `Memory:` + strings.Replace(fmt.Sprintf("%v", this.Memory), "MemoryUsage", "MemoryUsage", 1) + `,`,
+ `WritableLayer:` + strings.Replace(fmt.Sprintf("%v", this.WritableLayer), "FilesystemUsage", "FilesystemUsage", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *CpuUsage) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&CpuUsage{`,
+ `Timestamp:` + fmt.Sprintf("%v", this.Timestamp) + `,`,
+ `UsageCoreNanoSeconds:` + strings.Replace(fmt.Sprintf("%v", this.UsageCoreNanoSeconds), "UInt64Value", "UInt64Value", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *MemoryUsage) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&MemoryUsage{`,
+ `Timestamp:` + fmt.Sprintf("%v", this.Timestamp) + `,`,
+ `WorkingSetBytes:` + strings.Replace(fmt.Sprintf("%v", this.WorkingSetBytes), "UInt64Value", "UInt64Value", 1) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringApi(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *VersionRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: VersionRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: VersionRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Version = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *VersionResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: VersionResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: VersionResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Version = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RuntimeName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.RuntimeName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RuntimeVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.RuntimeVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RuntimeApiVersion", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.RuntimeApiVersion = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DNSConfig) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DNSConfig: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DNSConfig: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Servers", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Servers = append(m.Servers, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Searches", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Searches = append(m.Searches, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Options = append(m.Options, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PortMapping) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PortMapping: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PortMapping: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType)
+ }
+ m.Protocol = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Protocol |= (Protocol(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ContainerPort", wireType)
+ }
+ m.ContainerPort = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ContainerPort |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostPort", wireType)
+ }
+ m.HostPort = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.HostPort |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostIp", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.HostIp = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Mount) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Mount: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Mount: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ContainerPath", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ContainerPath = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostPath", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.HostPath = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Readonly", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Readonly = bool(v != 0)
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SelinuxRelabel", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.SelinuxRelabel = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NamespaceOption) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NamespaceOption: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NamespaceOption: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostNetwork", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.HostNetwork = bool(v != 0)
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostPid", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.HostPid = bool(v != 0)
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostIpc", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.HostIpc = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Int64Value) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Int64Value: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Int64Value: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
+ }
+ m.Value = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Value |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LinuxSandboxSecurityContext) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LinuxSandboxSecurityContext: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LinuxSandboxSecurityContext: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NamespaceOptions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.NamespaceOptions == nil {
+ m.NamespaceOptions = &NamespaceOption{}
+ }
+ if err := m.NamespaceOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SelinuxOptions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SelinuxOptions == nil {
+ m.SelinuxOptions = &SELinuxOption{}
+ }
+ if err := m.SelinuxOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RunAsUser", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.RunAsUser == nil {
+ m.RunAsUser = &Int64Value{}
+ }
+ if err := m.RunAsUser.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadonlyRootfs", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadonlyRootfs = bool(v != 0)
+ case 5:
+ if wireType == 0 {
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.SupplementalGroups = append(m.SupplementalGroups, v)
+ } else if wireType == 2 {
+ var packedLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ packedLen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if packedLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + packedLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ for iNdEx < postIndex {
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.SupplementalGroups = append(m.SupplementalGroups, v)
+ }
+ } else {
+ return fmt.Errorf("proto: wrong wireType = %d for field SupplementalGroups", wireType)
+ }
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Privileged", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Privileged = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LinuxPodSandboxConfig) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LinuxPodSandboxConfig: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LinuxPodSandboxConfig: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CgroupParent", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.CgroupParent = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecurityContext", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SecurityContext == nil {
+ m.SecurityContext = &LinuxSandboxSecurityContext{}
+ }
+ if err := m.SecurityContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Sysctls", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Sysctls == nil {
+ m.Sysctls = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Sysctls[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Sysctls[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodSandboxMetadata) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodSandboxMetadata: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodSandboxMetadata: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Uid", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Uid = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Namespace = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Attempt", wireType)
+ }
+ m.Attempt = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Attempt |= (uint32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodSandboxConfig) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodSandboxConfig: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodSandboxConfig: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Metadata == nil {
+ m.Metadata = &PodSandboxMetadata{}
+ }
+ if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Hostname = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LogDirectory", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.LogDirectory = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DnsConfig", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.DnsConfig == nil {
+ m.DnsConfig = &DNSConfig{}
+ }
+ if err := m.DnsConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PortMappings", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PortMappings = append(m.PortMappings, &PortMapping{})
+ if err := m.PortMappings[len(m.PortMappings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Labels == nil {
+ m.Labels = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Labels[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Labels[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Annotations == nil {
+ m.Annotations = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Annotations[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Annotations[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Linux", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Linux == nil {
+ m.Linux = &LinuxPodSandboxConfig{}
+ }
+ if err := m.Linux.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RunPodSandboxRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RunPodSandboxRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RunPodSandboxRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Config == nil {
+ m.Config = &PodSandboxConfig{}
+ }
+ if err := m.Config.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RunPodSandboxResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RunPodSandboxResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RunPodSandboxResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodSandboxId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PodSandboxId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StopPodSandboxRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StopPodSandboxRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StopPodSandboxRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodSandboxId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PodSandboxId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StopPodSandboxResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StopPodSandboxResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StopPodSandboxResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RemovePodSandboxRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RemovePodSandboxRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RemovePodSandboxRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodSandboxId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PodSandboxId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RemovePodSandboxResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RemovePodSandboxResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RemovePodSandboxResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodSandboxStatusRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodSandboxStatusRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodSandboxStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodSandboxId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PodSandboxId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodSandboxNetworkStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodSandboxNetworkStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodSandboxNetworkStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Ip", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Ip = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Namespace) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Namespace: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Namespace: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Options == nil {
+ m.Options = &NamespaceOption{}
+ }
+ if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LinuxPodSandboxStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LinuxPodSandboxStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LinuxPodSandboxStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Namespaces", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Namespaces == nil {
+ m.Namespaces = &Namespace{}
+ }
+ if err := m.Namespaces.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodSandboxStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodSandboxStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodSandboxStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Id = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Metadata == nil {
+ m.Metadata = &PodSandboxMetadata{}
+ }
+ if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
+ }
+ m.State = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.State |= (PodSandboxState(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType)
+ }
+ m.CreatedAt = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.CreatedAt |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Network == nil {
+ m.Network = &PodSandboxNetworkStatus{}
+ }
+ if err := m.Network.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Linux", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Linux == nil {
+ m.Linux = &LinuxPodSandboxStatus{}
+ }
+ if err := m.Linux.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Labels == nil {
+ m.Labels = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Labels[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Labels[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Annotations == nil {
+ m.Annotations = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Annotations[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Annotations[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodSandboxStatusResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodSandboxStatusResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodSandboxStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Status == nil {
+ m.Status = &PodSandboxStatus{}
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodSandboxStateValue) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodSandboxStateValue: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodSandboxStateValue: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
+ }
+ m.State = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.State |= (PodSandboxState(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodSandboxFilter) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodSandboxFilter: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodSandboxFilter: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Id = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.State == nil {
+ m.State = &PodSandboxStateValue{}
+ }
+ if err := m.State.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.LabelSelector == nil {
+ m.LabelSelector = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.LabelSelector[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.LabelSelector[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ListPodSandboxRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ListPodSandboxRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ListPodSandboxRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Filter == nil {
+ m.Filter = &PodSandboxFilter{}
+ }
+ if err := m.Filter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PodSandbox) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PodSandbox: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PodSandbox: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Id = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Metadata == nil {
+ m.Metadata = &PodSandboxMetadata{}
+ }
+ if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
+ }
+ m.State = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.State |= (PodSandboxState(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType)
+ }
+ m.CreatedAt = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.CreatedAt |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Labels == nil {
+ m.Labels = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Labels[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Labels[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Annotations == nil {
+ m.Annotations = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Annotations[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Annotations[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ListPodSandboxResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ListPodSandboxResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ListPodSandboxResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, &PodSandbox{})
+ if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ImageSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ImageSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ImageSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Image = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *KeyValue) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: KeyValue: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: KeyValue: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Key = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Value = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LinuxContainerResources) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LinuxContainerResources: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LinuxContainerResources: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CpuPeriod", wireType)
+ }
+ m.CpuPeriod = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.CpuPeriod |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CpuQuota", wireType)
+ }
+ m.CpuQuota = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.CpuQuota |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CpuShares", wireType)
+ }
+ m.CpuShares = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.CpuShares |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MemoryLimitInBytes", wireType)
+ }
+ m.MemoryLimitInBytes = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.MemoryLimitInBytes |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OomScoreAdj", wireType)
+ }
+ m.OomScoreAdj = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.OomScoreAdj |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SELinuxOption) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SELinuxOption: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SELinuxOption: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.User = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Role = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Level = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Capability) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Capability: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Capability: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AddCapabilities", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.AddCapabilities = append(m.AddCapabilities, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DropCapabilities", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.DropCapabilities = append(m.DropCapabilities, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LinuxContainerSecurityContext) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LinuxContainerSecurityContext: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LinuxContainerSecurityContext: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Capabilities", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Capabilities == nil {
+ m.Capabilities = &Capability{}
+ }
+ if err := m.Capabilities.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Privileged", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Privileged = bool(v != 0)
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NamespaceOptions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.NamespaceOptions == nil {
+ m.NamespaceOptions = &NamespaceOption{}
+ }
+ if err := m.NamespaceOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SelinuxOptions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SelinuxOptions == nil {
+ m.SelinuxOptions = &SELinuxOption{}
+ }
+ if err := m.SelinuxOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RunAsUser", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.RunAsUser == nil {
+ m.RunAsUser = &Int64Value{}
+ }
+ if err := m.RunAsUser.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RunAsUsername", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.RunAsUsername = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadonlyRootfs", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ReadonlyRootfs = bool(v != 0)
+ case 8:
+ if wireType == 0 {
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.SupplementalGroups = append(m.SupplementalGroups, v)
+ } else if wireType == 2 {
+ var packedLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ packedLen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if packedLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + packedLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ for iNdEx < postIndex {
+ var v int64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.SupplementalGroups = append(m.SupplementalGroups, v)
+ }
+ } else {
+ return fmt.Errorf("proto: wrong wireType = %d for field SupplementalGroups", wireType)
+ }
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ApparmorProfile", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ApparmorProfile = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LinuxContainerConfig) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LinuxContainerConfig: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LinuxContainerConfig: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Resources == nil {
+ m.Resources = &LinuxContainerResources{}
+ }
+ if err := m.Resources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SecurityContext", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SecurityContext == nil {
+ m.SecurityContext = &LinuxContainerSecurityContext{}
+ }
+ if err := m.SecurityContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerMetadata) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerMetadata: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerMetadata: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Attempt", wireType)
+ }
+ m.Attempt = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Attempt |= (uint32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Device) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Device: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Device: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ContainerPath", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ContainerPath = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field HostPath", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.HostPath = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Permissions = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerConfig) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerConfig: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerConfig: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Metadata == nil {
+ m.Metadata = &ContainerMetadata{}
+ }
+ if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Image == nil {
+ m.Image = &ImageSpec{}
+ }
+ if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Command = append(m.Command, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Args = append(m.Args, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field WorkingDir", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.WorkingDir = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Envs", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Envs = append(m.Envs, &KeyValue{})
+ if err := m.Envs[len(m.Envs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Mounts", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Mounts = append(m.Mounts, &Mount{})
+ if err := m.Mounts[len(m.Mounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Devices = append(m.Devices, &Device{})
+ if err := m.Devices[len(m.Devices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Labels == nil {
+ m.Labels = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Labels[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Labels[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Annotations == nil {
+ m.Annotations = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Annotations[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Annotations[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 11:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LogPath", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.LogPath = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 12:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Stdin = bool(v != 0)
+ case 13:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StdinOnce", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.StdinOnce = bool(v != 0)
+ case 14:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Tty", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Tty = bool(v != 0)
+ case 15:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Linux", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Linux == nil {
+ m.Linux = &LinuxContainerConfig{}
+ }
+ if err := m.Linux.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CreateContainerRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CreateContainerRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CreateContainerRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodSandboxId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PodSandboxId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Config == nil {
+ m.Config = &ContainerConfig{}
+ }
+ if err := m.Config.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SandboxConfig", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SandboxConfig == nil {
+ m.SandboxConfig = &PodSandboxConfig{}
+ }
+ if err := m.SandboxConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CreateContainerResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CreateContainerResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CreateContainerResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ContainerId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StartContainerRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StartContainerRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StartContainerRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ContainerId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StartContainerResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StartContainerResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StartContainerResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StopContainerRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StopContainerRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StopContainerRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ContainerId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType)
+ }
+ m.Timeout = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Timeout |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StopContainerResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StopContainerResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StopContainerResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RemoveContainerRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RemoveContainerRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RemoveContainerRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ContainerId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RemoveContainerResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RemoveContainerResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RemoveContainerResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerStateValue) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerStateValue: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerStateValue: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
+ }
+ m.State = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.State |= (ContainerState(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerFilter) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerFilter: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerFilter: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Id = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.State == nil {
+ m.State = &ContainerStateValue{}
+ }
+ if err := m.State.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodSandboxId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PodSandboxId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.LabelSelector == nil {
+ m.LabelSelector = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.LabelSelector[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.LabelSelector[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ListContainersRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ListContainersRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ListContainersRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Filter == nil {
+ m.Filter = &ContainerFilter{}
+ }
+ if err := m.Filter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Container) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Container: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Container: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Id = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodSandboxId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PodSandboxId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Metadata == nil {
+ m.Metadata = &ContainerMetadata{}
+ }
+ if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Image == nil {
+ m.Image = &ImageSpec{}
+ }
+ if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ImageRef", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ImageRef = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
+ }
+ m.State = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.State |= (ContainerState(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType)
+ }
+ m.CreatedAt = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.CreatedAt |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Labels == nil {
+ m.Labels = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Labels[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Labels[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Annotations == nil {
+ m.Annotations = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Annotations[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Annotations[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ListContainersResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ListContainersResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ListContainersResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Containers", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Containers = append(m.Containers, &Container{})
+ if err := m.Containers[len(m.Containers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerStatusRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerStatusRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ContainerId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Id = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Metadata == nil {
+ m.Metadata = &ContainerMetadata{}
+ }
+ if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
+ }
+ m.State = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.State |= (ContainerState(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType)
+ }
+ m.CreatedAt = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.CreatedAt |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType)
+ }
+ m.StartedAt = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.StartedAt |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FinishedAt", wireType)
+ }
+ m.FinishedAt = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.FinishedAt |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ExitCode", wireType)
+ }
+ m.ExitCode = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ExitCode |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Image == nil {
+ m.Image = &ImageSpec{}
+ }
+ if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ImageRef", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ImageRef = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 11:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 12:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Labels == nil {
+ m.Labels = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Labels[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Labels[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 13:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Annotations == nil {
+ m.Annotations = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Annotations[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Annotations[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 14:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Mounts", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Mounts = append(m.Mounts, &Mount{})
+ if err := m.Mounts[len(m.Mounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 15:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LogPath", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.LogPath = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerStatusResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerStatusResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Status == nil {
+ m.Status = &ContainerStatus{}
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExecSyncRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExecSyncRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExecSyncRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ContainerId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Cmd", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Cmd = append(m.Cmd, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType)
+ }
+ m.Timeout = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Timeout |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExecSyncResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExecSyncResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExecSyncResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Stdout", wireType)
+ }
+ var byteLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ byteLen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if byteLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + byteLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Stdout = append(m.Stdout[:0], dAtA[iNdEx:postIndex]...)
+ if m.Stdout == nil {
+ m.Stdout = []byte{}
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Stderr", wireType)
+ }
+ var byteLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ byteLen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if byteLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + byteLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Stderr = append(m.Stderr[:0], dAtA[iNdEx:postIndex]...)
+ if m.Stderr == nil {
+ m.Stderr = []byte{}
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ExitCode", wireType)
+ }
+ m.ExitCode = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.ExitCode |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExecRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExecRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExecRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ContainerId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Cmd", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Cmd = append(m.Cmd, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Tty", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Tty = bool(v != 0)
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Stdin = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExecResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExecResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExecResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Url = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *AttachRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: AttachRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: AttachRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ContainerId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Stdin = bool(v != 0)
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Tty", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Tty = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *AttachResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: AttachResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: AttachResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Url = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PortForwardRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PortForwardRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PortForwardRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodSandboxId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PodSandboxId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType == 0 {
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Port = append(m.Port, v)
+ } else if wireType == 2 {
+ var packedLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ packedLen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if packedLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + packedLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ for iNdEx < postIndex {
+ var v int32
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int32(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Port = append(m.Port, v)
+ }
+ } else {
+ return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PortForwardResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PortForwardResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PortForwardResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Url = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ImageFilter) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ImageFilter: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ImageFilter: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Image == nil {
+ m.Image = &ImageSpec{}
+ }
+ if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ListImagesRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ListImagesRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ListImagesRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Filter == nil {
+ m.Filter = &ImageFilter{}
+ }
+ if err := m.Filter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Image) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Image: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Image: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Id = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RepoTags", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.RepoTags = append(m.RepoTags, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RepoDigests", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.RepoDigests = append(m.RepoDigests, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType)
+ }
+ m.Size_ = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Size_ |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Uid", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Uid == nil {
+ m.Uid = &Int64Value{}
+ }
+ if err := m.Uid.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Username = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ListImagesResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ListImagesResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ListImagesResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Images", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Images = append(m.Images, &Image{})
+ if err := m.Images[len(m.Images)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ImageStatusRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ImageStatusRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ImageStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Image == nil {
+ m.Image = &ImageSpec{}
+ }
+ if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ImageStatusResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ImageStatusResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ImageStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Image == nil {
+ m.Image = &Image{}
+ }
+ if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *AuthConfig) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: AuthConfig: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: AuthConfig: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Username = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Password = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Auth", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Auth = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ServerAddress", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ServerAddress = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IdentityToken", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.IdentityToken = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RegistryToken", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.RegistryToken = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PullImageRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PullImageRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PullImageRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Image == nil {
+ m.Image = &ImageSpec{}
+ }
+ if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Auth", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Auth == nil {
+ m.Auth = &AuthConfig{}
+ }
+ if err := m.Auth.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SandboxConfig", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SandboxConfig == nil {
+ m.SandboxConfig = &PodSandboxConfig{}
+ }
+ if err := m.SandboxConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PullImageResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PullImageResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PullImageResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ImageRef", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ImageRef = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RemoveImageRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RemoveImageRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RemoveImageRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Image == nil {
+ m.Image = &ImageSpec{}
+ }
+ if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RemoveImageResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RemoveImageResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RemoveImageResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *NetworkConfig) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: NetworkConfig: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: NetworkConfig: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodCidr", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PodCidr = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RuntimeConfig) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RuntimeConfig: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RuntimeConfig: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NetworkConfig", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.NetworkConfig == nil {
+ m.NetworkConfig = &NetworkConfig{}
+ }
+ if err := m.NetworkConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *UpdateRuntimeConfigRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: UpdateRuntimeConfigRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: UpdateRuntimeConfigRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RuntimeConfig", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.RuntimeConfig == nil {
+ m.RuntimeConfig = &RuntimeConfig{}
+ }
+ if err := m.RuntimeConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *UpdateRuntimeConfigResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: UpdateRuntimeConfigResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: UpdateRuntimeConfigResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RuntimeCondition) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RuntimeCondition: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RuntimeCondition: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Status = bool(v != 0)
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Reason = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Message = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RuntimeStatus) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RuntimeStatus: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RuntimeStatus: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Conditions = append(m.Conditions, &RuntimeCondition{})
+ if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StatusRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StatusRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StatusRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StatusResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StatusResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StatusResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Status == nil {
+ m.Status = &RuntimeStatus{}
+ }
+ if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ImageFsInfoRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ImageFsInfoRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ImageFsInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *UInt64Value) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: UInt64Value: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: UInt64Value: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
+ }
+ m.Value = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Value |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *StorageIdentifier) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: StorageIdentifier: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: StorageIdentifier: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Uuid", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Uuid = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *FilesystemUsage) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: FilesystemUsage: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: FilesystemUsage: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
+ }
+ m.Timestamp = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Timestamp |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StorageId", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.StorageId == nil {
+ m.StorageId = &StorageIdentifier{}
+ }
+ if err := m.StorageId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UsedBytes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.UsedBytes == nil {
+ m.UsedBytes = &UInt64Value{}
+ }
+ if err := m.UsedBytes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field InodesUsed", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.InodesUsed == nil {
+ m.InodesUsed = &UInt64Value{}
+ }
+ if err := m.InodesUsed.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ImageFsInfoResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ImageFsInfoResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ImageFsInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ImageFilesystems", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ImageFilesystems = append(m.ImageFilesystems, &FilesystemUsage{})
+ if err := m.ImageFilesystems[len(m.ImageFilesystems)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerStatsRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerStatsRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerStatsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ContainerId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerStatsResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerStatsResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerStatsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Stats", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Stats == nil {
+ m.Stats = &ContainerStats{}
+ }
+ if err := m.Stats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ListContainerStatsRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ListContainerStatsRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ListContainerStatsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Filter == nil {
+ m.Filter = &ContainerStatsFilter{}
+ }
+ if err := m.Filter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerStatsFilter) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerStatsFilter: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerStatsFilter: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Id = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PodSandboxId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PodSandboxId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.LabelSelector == nil {
+ m.LabelSelector = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.LabelSelector[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.LabelSelector[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ListContainerStatsResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ListContainerStatsResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ListContainerStatsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Stats", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Stats = append(m.Stats, &ContainerStats{})
+ if err := m.Stats[len(m.Stats)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerAttributes) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerAttributes: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerAttributes: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Id = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Metadata == nil {
+ m.Metadata = &ContainerMetadata{}
+ }
+ if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Labels == nil {
+ m.Labels = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Labels[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Labels[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var keykey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ keykey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapkey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapkey := int(stringLenmapkey)
+ if intStringLenmapkey < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
+ iNdEx = postStringIndexmapkey
+ if m.Annotations == nil {
+ m.Annotations = make(map[string]string)
+ }
+ if iNdEx < postIndex {
+ var valuekey uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ valuekey |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ var stringLenmapvalue uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLenmapvalue := int(stringLenmapvalue)
+ if intStringLenmapvalue < 0 {
+ return ErrInvalidLengthApi
+ }
+ postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue > l {
+ return io.ErrUnexpectedEOF
+ }
+ mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
+ iNdEx = postStringIndexmapvalue
+ m.Annotations[mapkey] = mapvalue
+ } else {
+ var mapvalue string
+ m.Annotations[mapkey] = mapvalue
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContainerStats) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContainerStats: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContainerStats: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Attributes == nil {
+ m.Attributes = &ContainerAttributes{}
+ }
+ if err := m.Attributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Cpu", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Cpu == nil {
+ m.Cpu = &CpuUsage{}
+ }
+ if err := m.Cpu.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Memory", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Memory == nil {
+ m.Memory = &MemoryUsage{}
+ }
+ if err := m.Memory.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field WritableLayer", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.WritableLayer == nil {
+ m.WritableLayer = &FilesystemUsage{}
+ }
+ if err := m.WritableLayer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CpuUsage) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CpuUsage: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CpuUsage: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
+ }
+ m.Timestamp = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Timestamp |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UsageCoreNanoSeconds", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.UsageCoreNanoSeconds == nil {
+ m.UsageCoreNanoSeconds = &UInt64Value{}
+ }
+ if err := m.UsageCoreNanoSeconds.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *MemoryUsage) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: MemoryUsage: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MemoryUsage: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
+ }
+ m.Timestamp = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Timestamp |= (int64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field WorkingSetBytes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.WorkingSetBytes == nil {
+ m.WorkingSetBytes = &UInt64Value{}
+ }
+ if err := m.WorkingSetBytes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipApi(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ iNdEx += length
+ if length < 0 {
+ return 0, ErrInvalidLengthApi
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipApi(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowApi = fmt.Errorf("proto: integer overflow")
+)
+
+func init() { proto.RegisterFile("api.proto", fileDescriptorApi) }
+
+var fileDescriptorApi = []byte{
+ // 4051 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x3b, 0x4d, 0x73, 0x1b, 0x47,
+ 0x76, 0x04, 0xc0, 0x0f, 0xe0, 0x81, 0x00, 0xc1, 0x16, 0x45, 0x42, 0x90, 0x44, 0xd3, 0x23, 0xcb,
+ 0x96, 0xb4, 0x2b, 0x59, 0xa6, 0xd7, 0x76, 0x2c, 0x7f, 0x09, 0x26, 0x29, 0x17, 0x2d, 0x89, 0xe4,
+ 0x0e, 0x44, 0xef, 0x6e, 0x36, 0x55, 0x93, 0x21, 0xa6, 0x09, 0x8e, 0x0d, 0x4c, 0xcf, 0xce, 0xf4,
+ 0xc8, 0x62, 0x4e, 0xc9, 0x2d, 0x47, 0xe7, 0x98, 0x5b, 0x0e, 0xa9, 0xda, 0xca, 0x25, 0x87, 0x9c,
+ 0xf2, 0x0b, 0x52, 0x5b, 0x95, 0x4a, 0x55, 0x0e, 0xa9, 0x54, 0x72, 0xdb, 0x55, 0x0e, 0x39, 0xa4,
+ 0x2a, 0xbf, 0x61, 0xab, 0xbf, 0x66, 0x7a, 0xbe, 0x20, 0x52, 0x76, 0xed, 0xea, 0x36, 0xfd, 0xfa,
+ 0xbd, 0xd7, 0xaf, 0xfb, 0xbd, 0x7e, 0xfd, 0xde, 0xeb, 0x1e, 0x68, 0xd8, 0xbe, 0x7b, 0xc7, 0x0f,
+ 0x08, 0x25, 0x68, 0x21, 0x88, 0x3c, 0xea, 0x4e, 0x70, 0xef, 0xf6, 0xc8, 0xa5, 0x27, 0xd1, 0xd1,
+ 0x9d, 0x21, 0x99, 0xbc, 0x3d, 0x22, 0x23, 0xf2, 0x36, 0xef, 0x3f, 0x8a, 0x8e, 0x79, 0x8b, 0x37,
+ 0xf8, 0x97, 0xa0, 0x33, 0x6e, 0x41, 0xfb, 0x2b, 0x1c, 0x84, 0x2e, 0xf1, 0x4c, 0xfc, 0xab, 0x08,
+ 0x87, 0x14, 0x75, 0x61, 0xe1, 0xa9, 0x80, 0x74, 0x2b, 0x1b, 0x95, 0x1b, 0x0d, 0x53, 0x35, 0x8d,
+ 0x5f, 0x57, 0x60, 0x29, 0x46, 0x0e, 0x7d, 0xe2, 0x85, 0xb8, 0x1c, 0x1b, 0xbd, 0x0e, 0x8b, 0x52,
+ 0x26, 0xcb, 0xb3, 0x27, 0xb8, 0x5b, 0xe5, 0xdd, 0x4d, 0x09, 0xdb, 0xb3, 0x27, 0x18, 0xbd, 0x05,
+ 0x4b, 0x0a, 0x45, 0x31, 0xa9, 0x71, 0xac, 0xb6, 0x04, 0xcb, 0xd1, 0xd0, 0x1d, 0xb8, 0xa0, 0x10,
+ 0x6d, 0xdf, 0x8d, 0x91, 0x67, 0x39, 0xf2, 0xb2, 0xec, 0xea, 0xfb, 0xae, 0xc4, 0x37, 0x7e, 0x09,
+ 0x8d, 0xed, 0xbd, 0xc1, 0x16, 0xf1, 0x8e, 0xdd, 0x11, 0x13, 0x31, 0xc4, 0x01, 0xa3, 0xe9, 0x56,
+ 0x36, 0x6a, 0x4c, 0x44, 0xd9, 0x44, 0x3d, 0xa8, 0x87, 0xd8, 0x0e, 0x86, 0x27, 0x38, 0xec, 0x56,
+ 0x79, 0x57, 0xdc, 0x66, 0x54, 0xc4, 0xa7, 0x2e, 0xf1, 0xc2, 0x6e, 0x4d, 0x50, 0xc9, 0xa6, 0xf1,
+ 0xb7, 0x15, 0x68, 0x1e, 0x90, 0x80, 0x3e, 0xb6, 0x7d, 0xdf, 0xf5, 0x46, 0xe8, 0x36, 0xd4, 0xf9,
+ 0x5a, 0x0e, 0xc9, 0x98, 0xaf, 0x41, 0x7b, 0x73, 0xf9, 0x8e, 0x14, 0xe9, 0xce, 0x81, 0xec, 0x30,
+ 0x63, 0x14, 0x74, 0x1d, 0xda, 0x43, 0xe2, 0x51, 0xdb, 0xf5, 0x70, 0x60, 0xf9, 0x24, 0xa0, 0x7c,
+ 0x65, 0xe6, 0xcc, 0x56, 0x0c, 0x65, 0xcc, 0xd1, 0x65, 0x68, 0x9c, 0x90, 0x90, 0x0a, 0x8c, 0x1a,
+ 0xc7, 0xa8, 0x33, 0x00, 0xef, 0x5c, 0x83, 0x05, 0xde, 0xe9, 0xfa, 0x72, 0x0d, 0xe6, 0x59, 0x73,
+ 0xd7, 0x37, 0xbe, 0xab, 0xc0, 0xdc, 0x63, 0x12, 0x79, 0x34, 0x33, 0x8c, 0x4d, 0x4f, 0xa4, 0x7e,
+ 0xb4, 0x61, 0x6c, 0x7a, 0x92, 0x0c, 0xc3, 0x30, 0x84, 0x8a, 0xc4, 0x30, 0xac, 0xb3, 0x07, 0xf5,
+ 0x00, 0xdb, 0x0e, 0xf1, 0xc6, 0xa7, 0x5c, 0x84, 0xba, 0x19, 0xb7, 0x99, 0xee, 0x42, 0x3c, 0x76,
+ 0xbd, 0xe8, 0x99, 0x15, 0xe0, 0xb1, 0x7d, 0x84, 0xc7, 0x5c, 0x94, 0xba, 0xd9, 0x96, 0x60, 0x53,
+ 0x40, 0x8d, 0xaf, 0x61, 0x89, 0x29, 0x3b, 0xf4, 0xed, 0x21, 0xde, 0xe7, 0x4b, 0xc8, 0x4c, 0x83,
+ 0x0f, 0xea, 0x61, 0xfa, 0x2d, 0x09, 0xbe, 0xe1, 0x92, 0xd5, 0xcd, 0x26, 0x83, 0xed, 0x09, 0x10,
+ 0xba, 0x04, 0x75, 0x21, 0x97, 0xeb, 0x70, 0xb1, 0xea, 0x26, 0x9f, 0xf1, 0x81, 0xeb, 0xc4, 0x5d,
+ 0xae, 0x3f, 0x94, 0x52, 0x2d, 0x88, 0xd9, 0x0f, 0x0d, 0x03, 0x60, 0xd7, 0xa3, 0xef, 0xff, 0xe4,
+ 0x2b, 0x7b, 0x1c, 0x61, 0xb4, 0x02, 0x73, 0x4f, 0xd9, 0x07, 0xe7, 0x5f, 0x33, 0x45, 0xc3, 0xf8,
+ 0x8f, 0x2a, 0x5c, 0x7e, 0xc4, 0x04, 0x1c, 0xd8, 0x9e, 0x73, 0x44, 0x9e, 0x0d, 0xf0, 0x30, 0x0a,
+ 0x5c, 0x7a, 0xba, 0x45, 0x3c, 0x8a, 0x9f, 0x51, 0xb4, 0x03, 0xcb, 0x9e, 0x92, 0xd7, 0x52, 0x26,
+ 0xc0, 0x38, 0x34, 0x37, 0xbb, 0xb1, 0x5e, 0x33, 0x33, 0x32, 0x3b, 0x5e, 0x1a, 0x10, 0xa2, 0xcf,
+ 0x92, 0xf5, 0x51, 0x4c, 0xaa, 0x9c, 0xc9, 0x6a, 0xcc, 0x64, 0xb0, 0xc3, 0xe5, 0x90, 0x2c, 0xd4,
+ 0xba, 0x29, 0x06, 0xef, 0x02, 0xdb, 0x2b, 0x96, 0x1d, 0x5a, 0x51, 0x88, 0x03, 0x3e, 0xd3, 0xe6,
+ 0xe6, 0x85, 0x98, 0x38, 0x99, 0xa7, 0xd9, 0x08, 0x22, 0xaf, 0x1f, 0x1e, 0x86, 0x38, 0xe0, 0x3b,
+ 0x4a, 0x6a, 0xc8, 0x0a, 0x08, 0xa1, 0xc7, 0xa1, 0xd2, 0x8a, 0x02, 0x9b, 0x1c, 0x8a, 0xde, 0x86,
+ 0x0b, 0x61, 0xe4, 0xfb, 0x63, 0x3c, 0xc1, 0x1e, 0xb5, 0xc7, 0xd6, 0x28, 0x20, 0x91, 0x1f, 0x76,
+ 0xe7, 0x36, 0x6a, 0x37, 0x6a, 0x26, 0xd2, 0xbb, 0xbe, 0xe0, 0x3d, 0x68, 0x1d, 0xc0, 0x0f, 0xdc,
+ 0xa7, 0xee, 0x18, 0x8f, 0xb0, 0xd3, 0x9d, 0xe7, 0x4c, 0x35, 0x88, 0xf1, 0x5d, 0x15, 0x2e, 0xf2,
+ 0xe9, 0x1c, 0x10, 0x47, 0xae, 0xac, 0xdc, 0x7f, 0xd7, 0xa0, 0x35, 0xe4, 0xec, 0x2d, 0xdf, 0x0e,
+ 0xb0, 0x47, 0xa5, 0x21, 0x2e, 0x0a, 0xe0, 0x01, 0x87, 0xa1, 0x7d, 0xe8, 0x84, 0x52, 0x11, 0xd6,
+ 0x50, 0x68, 0x42, 0xae, 0xd7, 0x1b, 0xf1, 0x94, 0xa7, 0x68, 0xcd, 0x5c, 0x0a, 0x73, 0x6a, 0x5c,
+ 0x08, 0x4f, 0xc3, 0x21, 0x1d, 0x8b, 0xfd, 0xdb, 0xdc, 0xfc, 0x51, 0x9a, 0x4f, 0x56, 0xcc, 0x3b,
+ 0x03, 0x81, 0xbd, 0xe3, 0xd1, 0xe0, 0xd4, 0x54, 0xb4, 0xbd, 0x7b, 0xb0, 0xa8, 0x77, 0xa0, 0x0e,
+ 0xd4, 0xbe, 0xc1, 0xa7, 0x72, 0x0a, 0xec, 0x33, 0xb1, 0x32, 0xb1, 0x7b, 0x44, 0xe3, 0x5e, 0xf5,
+ 0x4f, 0x2a, 0x46, 0x00, 0x28, 0x19, 0xe5, 0x31, 0xa6, 0xb6, 0x63, 0x53, 0x1b, 0x21, 0x98, 0xe5,
+ 0xfe, 0x50, 0xb0, 0xe0, 0xdf, 0x8c, 0x6b, 0x24, 0x0d, 0xbd, 0x61, 0xb2, 0x4f, 0x74, 0x05, 0x1a,
+ 0xb1, 0x49, 0x49, 0xa7, 0x98, 0x00, 0x98, 0x73, 0xb2, 0x29, 0xc5, 0x13, 0x9f, 0x72, 0xf5, 0xb6,
+ 0x4c, 0xd5, 0x34, 0xfe, 0x79, 0x16, 0x3a, 0x39, 0x0d, 0x7c, 0x00, 0xf5, 0x89, 0x1c, 0x5e, 0x5a,
+ 0xf2, 0xe5, 0xc4, 0x43, 0xe5, 0x24, 0x34, 0x63, 0x64, 0xe6, 0x00, 0xd8, 0xd6, 0xd2, 0xfc, 0x77,
+ 0xdc, 0x66, 0x6a, 0x1d, 0x93, 0x91, 0xe5, 0xb8, 0x01, 0x1e, 0x52, 0x12, 0x9c, 0x4a, 0x29, 0x17,
+ 0xc7, 0x64, 0xb4, 0xad, 0x60, 0xe8, 0x1d, 0x00, 0xc7, 0x0b, 0x99, 0x46, 0x8f, 0xdd, 0x11, 0x97,
+ 0xb5, 0xb9, 0x89, 0xe2, 0xb1, 0x63, 0x1f, 0x6d, 0x36, 0x1c, 0x2f, 0x94, 0xc2, 0x7e, 0x08, 0x2d,
+ 0xe6, 0xf3, 0xac, 0x89, 0x70, 0xaf, 0xc2, 0x26, 0x9b, 0x9b, 0x2b, 0x9a, 0xc4, 0xb1, 0xef, 0x35,
+ 0x17, 0xfd, 0xa4, 0x11, 0xa2, 0x4f, 0x60, 0x9e, 0xfb, 0x9c, 0xb0, 0x3b, 0xcf, 0x69, 0xae, 0x17,
+ 0xcc, 0x52, 0x6a, 0xfb, 0x11, 0xc7, 0x13, 0xca, 0x96, 0x44, 0xe8, 0x11, 0x34, 0x6d, 0xcf, 0x23,
+ 0xd4, 0x16, 0xdb, 0x75, 0x81, 0xf3, 0xb8, 0x55, 0xce, 0xa3, 0x9f, 0x20, 0x0b, 0x46, 0x3a, 0x39,
+ 0xfa, 0x09, 0xcc, 0xf1, 0xfd, 0xdc, 0xad, 0xf3, 0x59, 0xaf, 0x4f, 0x37, 0x3f, 0x53, 0x20, 0xf7,
+ 0x3e, 0x84, 0xa6, 0x26, 0xda, 0x79, 0xcc, 0xad, 0xf7, 0x29, 0x74, 0xb2, 0x12, 0x9d, 0xcb, 0x5c,
+ 0x77, 0x61, 0xc5, 0x8c, 0xbc, 0x44, 0x30, 0x15, 0x10, 0xbc, 0x03, 0xf3, 0x52, 0x7f, 0xc2, 0x76,
+ 0x2e, 0x95, 0xae, 0x88, 0x29, 0x11, 0x8d, 0x4f, 0xe0, 0x62, 0x86, 0x95, 0x0c, 0x17, 0xde, 0x80,
+ 0xb6, 0x4f, 0x1c, 0x2b, 0x14, 0x60, 0xcb, 0x75, 0x94, 0x33, 0xf0, 0x63, 0xdc, 0x5d, 0x87, 0x91,
+ 0x0f, 0x28, 0xf1, 0xf3, 0xa2, 0x9c, 0x8d, 0xbc, 0x0b, 0xab, 0x59, 0x72, 0x31, 0xbc, 0xf1, 0x19,
+ 0xac, 0x99, 0x78, 0x42, 0x9e, 0xe2, 0x97, 0x65, 0xdd, 0x83, 0x6e, 0x9e, 0x41, 0xc2, 0x3c, 0x81,
+ 0x0e, 0xa8, 0x4d, 0xa3, 0xf0, 0x7c, 0xcc, 0x6f, 0xea, 0x0c, 0xe4, 0x41, 0x28, 0xf8, 0xa0, 0x36,
+ 0x54, 0x5d, 0x5f, 0x12, 0x55, 0x5d, 0xdf, 0xf8, 0x0c, 0x1a, 0xf1, 0x11, 0x84, 0x36, 0x93, 0x50,
+ 0xa5, 0xfa, 0x82, 0x73, 0x2a, 0x0e, 0x62, 0x1e, 0xe6, 0xbc, 0xb5, 0x1c, 0x69, 0x13, 0x20, 0xf6,
+ 0x33, 0xea, 0xdc, 0x43, 0x79, 0x7e, 0xa6, 0x86, 0x65, 0xfc, 0x7d, 0xca, 0xe9, 0x68, 0x22, 0x3b,
+ 0xb1, 0xc8, 0x4e, 0xca, 0x09, 0x55, 0xcf, 0xe3, 0x84, 0xee, 0xc0, 0x5c, 0x48, 0x6d, 0x2a, 0xdc,
+ 0x60, 0x5b, 0x9b, 0x5c, 0x7a, 0x48, 0x6c, 0x0a, 0x34, 0x74, 0x15, 0x60, 0x18, 0x60, 0x9b, 0x62,
+ 0xc7, 0xb2, 0x85, 0x7f, 0xac, 0x99, 0x0d, 0x09, 0xe9, 0x53, 0x74, 0x0f, 0x16, 0x54, 0xdc, 0x31,
+ 0xc7, 0xc5, 0xd8, 0x28, 0x60, 0x98, 0x5a, 0x7d, 0x53, 0x11, 0x24, 0x7b, 0x7a, 0x7e, 0xfa, 0x9e,
+ 0x96, 0x74, 0x02, 0x59, 0x73, 0x4b, 0x0b, 0xa5, 0x6e, 0x49, 0x50, 0x9c, 0xc5, 0x2d, 0xd5, 0x4b,
+ 0xdd, 0x92, 0xe4, 0x31, 0xd5, 0x2d, 0xfd, 0x31, 0x1d, 0xcc, 0x63, 0xe8, 0xe6, 0x37, 0x88, 0x74,
+ 0x0c, 0xef, 0xc0, 0x7c, 0xc8, 0x21, 0x53, 0x9c, 0x8c, 0x24, 0x91, 0x88, 0xc6, 0x03, 0x58, 0xc9,
+ 0x58, 0x80, 0x08, 0xfb, 0x62, 0x7b, 0xa9, 0x9c, 0xc9, 0x5e, 0x8c, 0xff, 0xaf, 0xe8, 0xd6, 0xfb,
+ 0xc0, 0x1d, 0x53, 0x1c, 0xe4, 0xac, 0xf7, 0x5d, 0xc5, 0x54, 0x98, 0xee, 0xd5, 0x32, 0xa6, 0x22,
+ 0x22, 0x93, 0x96, 0x38, 0x80, 0x36, 0xd7, 0xa1, 0x15, 0xe2, 0x31, 0x3f, 0x10, 0x65, 0x28, 0xf2,
+ 0xe3, 0x02, 0x6a, 0x31, 0xae, 0x30, 0x80, 0x81, 0x44, 0x17, 0xea, 0x6b, 0x8d, 0x75, 0x58, 0xef,
+ 0x3e, 0xa0, 0x3c, 0xd2, 0xb9, 0xf4, 0xf0, 0x25, 0xdb, 0xfb, 0x2c, 0x93, 0x28, 0xf0, 0xf4, 0xc7,
+ 0x5c, 0x8c, 0x29, 0x4a, 0x10, 0x72, 0x9a, 0x12, 0xd1, 0xf8, 0xbb, 0x1a, 0x40, 0xd2, 0xf9, 0xca,
+ 0x6e, 0xfa, 0x0f, 0xe2, 0x2d, 0x28, 0xa2, 0x89, 0xd7, 0x0a, 0xf8, 0x15, 0x6e, 0xbe, 0x07, 0xe9,
+ 0xcd, 0x27, 0xe2, 0x8a, 0x37, 0x8a, 0xa8, 0x5f, 0xd9, 0x6d, 0xb7, 0x05, 0xab, 0x59, 0x75, 0xcb,
+ 0x4d, 0x77, 0x13, 0xe6, 0x5c, 0x8a, 0x27, 0x22, 0x2f, 0xd6, 0x93, 0x0b, 0x0d, 0x57, 0x60, 0x18,
+ 0xaf, 0x43, 0x63, 0x77, 0x62, 0x8f, 0xf0, 0xc0, 0xc7, 0x43, 0x36, 0x96, 0xcb, 0x1a, 0x72, 0x7c,
+ 0xd1, 0x30, 0x36, 0xa1, 0xfe, 0x10, 0x9f, 0x8a, 0x3d, 0x78, 0x46, 0xf9, 0x8c, 0x7f, 0xad, 0xc0,
+ 0x1a, 0xf7, 0x9d, 0x5b, 0x2a, 0x2b, 0x35, 0x71, 0x48, 0xa2, 0x60, 0x88, 0x43, 0xae, 0x52, 0x3f,
+ 0xb2, 0x7c, 0x1c, 0xb8, 0xc4, 0x91, 0x39, 0x5c, 0x63, 0xe8, 0x47, 0x07, 0x1c, 0xc0, 0x32, 0x57,
+ 0xd6, 0xfd, 0xab, 0x88, 0x48, 0xdb, 0xaa, 0x99, 0xf5, 0xa1, 0x1f, 0xfd, 0x94, 0xb5, 0x15, 0x6d,
+ 0x78, 0x62, 0x07, 0x38, 0xe4, 0x36, 0x24, 0x68, 0x07, 0x1c, 0x80, 0xde, 0x81, 0x8b, 0x13, 0x3c,
+ 0x21, 0xc1, 0xa9, 0x35, 0x76, 0x27, 0x2e, 0xb5, 0x5c, 0xcf, 0x3a, 0x3a, 0xa5, 0x38, 0x94, 0x86,
+ 0x83, 0x44, 0xe7, 0x23, 0xd6, 0xb7, 0xeb, 0x7d, 0xce, 0x7a, 0x90, 0x01, 0x2d, 0x42, 0x26, 0x56,
+ 0x38, 0x24, 0x01, 0xb6, 0x6c, 0xe7, 0x6b, 0x7e, 0x78, 0xd4, 0xcc, 0x26, 0x21, 0x93, 0x01, 0x83,
+ 0xf5, 0x9d, 0xaf, 0x0d, 0x1b, 0x5a, 0xa9, 0x9c, 0x8e, 0xc5, 0xfa, 0x3c, 0x79, 0x93, 0xb1, 0x3e,
+ 0xfb, 0x66, 0xb0, 0x80, 0x8c, 0xd5, 0x3a, 0xf0, 0x6f, 0x06, 0xa3, 0xa7, 0xbe, 0x0a, 0xf4, 0xf9,
+ 0x37, 0x5b, 0xb0, 0x31, 0x7e, 0x2a, 0xd3, 0xea, 0x86, 0x29, 0x1a, 0x86, 0x03, 0xb0, 0x65, 0xfb,
+ 0xf6, 0x91, 0x3b, 0x76, 0xe9, 0x29, 0xba, 0x09, 0x1d, 0xdb, 0x71, 0xac, 0xa1, 0x82, 0xb8, 0x58,
+ 0xd5, 0x38, 0x96, 0x6c, 0xc7, 0xd9, 0xd2, 0xc0, 0xe8, 0x47, 0xb0, 0xec, 0x04, 0xc4, 0x4f, 0xe3,
+ 0x8a, 0xa2, 0x47, 0x87, 0x75, 0xe8, 0xc8, 0xc6, 0xf3, 0x1a, 0x5c, 0x4d, 0xab, 0x25, 0x9b, 0x25,
+ 0x7f, 0x00, 0x8b, 0x99, 0x51, 0xd3, 0xe9, 0x69, 0x22, 0xa4, 0x99, 0x42, 0xcc, 0xe4, 0x91, 0xd5,
+ 0x6c, 0x1e, 0x59, 0x9c, 0x7e, 0xd7, 0x7e, 0x88, 0xf4, 0x7b, 0xf6, 0xfb, 0xa4, 0xdf, 0x73, 0x67,
+ 0x4a, 0xbf, 0xdf, 0xe4, 0x05, 0x2d, 0x45, 0xc4, 0xd3, 0xa6, 0x79, 0x51, 0x75, 0x89, 0x71, 0x3c,
+ 0x55, 0xf8, 0xca, 0xa4, 0xe9, 0x0b, 0xe7, 0x49, 0xd3, 0xeb, 0xa5, 0x69, 0x3a, 0xb3, 0x08, 0xdf,
+ 0xb7, 0x83, 0x09, 0x09, 0x2c, 0x3f, 0x20, 0xc7, 0xee, 0x18, 0x77, 0x1b, 0x5c, 0x84, 0x25, 0x05,
+ 0x3f, 0x10, 0x60, 0xe3, 0x1f, 0x2a, 0xb0, 0x92, 0x56, 0xb2, 0xcc, 0xc0, 0x3e, 0x85, 0x46, 0xa0,
+ 0x76, 0xa1, 0x54, 0xec, 0x46, 0x3a, 0xd2, 0xc9, 0xef, 0x56, 0x33, 0x21, 0x41, 0x3f, 0x2d, 0xcd,
+ 0xe5, 0xdf, 0x2c, 0x61, 0xf3, 0xa2, 0x6c, 0xde, 0xe8, 0xc3, 0x72, 0x8c, 0x3c, 0x35, 0x93, 0xd6,
+ 0x32, 0xe3, 0x6a, 0x3a, 0x33, 0xf6, 0x60, 0x7e, 0x1b, 0x3f, 0x75, 0x87, 0xf8, 0x07, 0x29, 0x8d,
+ 0x6d, 0x40, 0xd3, 0xc7, 0xc1, 0xc4, 0x0d, 0xc3, 0xd8, 0x40, 0x1b, 0xa6, 0x0e, 0x32, 0xfe, 0x7b,
+ 0x0e, 0x96, 0xb2, 0x2b, 0xfb, 0x7e, 0x2e, 0x11, 0xef, 0x25, 0x3b, 0x26, 0x3b, 0x3f, 0xed, 0x34,
+ 0xbc, 0xa1, 0x1c, 0x6e, 0x35, 0x13, 0x8f, 0xc7, 0x3e, 0x59, 0x3a, 0x61, 0x36, 0xff, 0x21, 0x99,
+ 0x4c, 0x6c, 0xcf, 0x51, 0x65, 0x4b, 0xd9, 0x64, 0xab, 0x65, 0x07, 0x23, 0xb6, 0x0d, 0x18, 0x98,
+ 0x7f, 0xa3, 0xd7, 0xa0, 0xc9, 0xe2, 0x5a, 0xd7, 0xe3, 0x79, 0x3c, 0x37, 0xf2, 0x86, 0x09, 0x12,
+ 0xb4, 0xed, 0x06, 0xe8, 0x3a, 0xcc, 0x62, 0xef, 0xa9, 0x3a, 0xf7, 0x92, 0xba, 0xa6, 0x72, 0xf4,
+ 0x26, 0xef, 0x46, 0x6f, 0xc2, 0xfc, 0x84, 0x44, 0x1e, 0x55, 0x11, 0x6e, 0x3b, 0x46, 0xe4, 0xc5,
+ 0x48, 0x53, 0xf6, 0xa2, 0x9b, 0xb0, 0xe0, 0x70, 0x1d, 0xa8, 0x30, 0x76, 0x29, 0xa9, 0x05, 0x70,
+ 0xb8, 0xa9, 0xfa, 0xd1, 0xc7, 0xf1, 0x89, 0xdd, 0xc8, 0x9c, 0xb9, 0x99, 0x45, 0x2d, 0x3c, 0xb6,
+ 0x1f, 0xa6, 0x8f, 0x6d, 0xe0, 0x2c, 0x6e, 0x96, 0xb2, 0x98, 0x9e, 0xc9, 0x5f, 0x82, 0xfa, 0x98,
+ 0x8c, 0x84, 0x1d, 0x34, 0x45, 0x91, 0x7b, 0x4c, 0x46, 0xdc, 0x0c, 0x56, 0x58, 0x98, 0xe2, 0xb8,
+ 0x5e, 0x77, 0x91, 0x6f, 0x5f, 0xd1, 0x60, 0xa7, 0x0f, 0xff, 0xb0, 0x88, 0x37, 0xc4, 0xdd, 0x16,
+ 0xef, 0x6a, 0x70, 0xc8, 0xbe, 0x37, 0xe4, 0x87, 0x23, 0xa5, 0xa7, 0xdd, 0x36, 0x87, 0xb3, 0x4f,
+ 0x16, 0x5d, 0x8a, 0xbc, 0x62, 0x29, 0x13, 0x5d, 0x16, 0xed, 0xcf, 0x57, 0xa0, 0x54, 0xf0, 0x4f,
+ 0x15, 0x58, 0xdd, 0xe2, 0xc1, 0x95, 0xe6, 0x09, 0xce, 0x91, 0xea, 0xa2, 0xbb, 0x71, 0x4d, 0x21,
+ 0x9b, 0xb1, 0x66, 0x27, 0x2b, 0xf1, 0xd0, 0x7d, 0x68, 0x2b, 0x9e, 0x92, 0xb2, 0xf6, 0xa2, 0x6a,
+ 0x44, 0x2b, 0xd4, 0x9b, 0xc6, 0xc7, 0xb0, 0x96, 0x93, 0x59, 0x06, 0x42, 0xaf, 0xc3, 0x62, 0xe2,
+ 0x11, 0x62, 0x91, 0x9b, 0x31, 0x6c, 0xd7, 0x31, 0xee, 0xc1, 0xc5, 0x01, 0xb5, 0x03, 0x9a, 0x9b,
+ 0xf0, 0x19, 0x68, 0x79, 0x41, 0x22, 0x4d, 0x2b, 0x6b, 0x06, 0x03, 0x58, 0x19, 0x50, 0xe2, 0xbf,
+ 0x04, 0x53, 0xb6, 0xd3, 0xd9, 0xb4, 0x49, 0x44, 0x65, 0xf4, 0xa3, 0x9a, 0xc6, 0x9a, 0x28, 0x9f,
+ 0xe4, 0x47, 0xfb, 0x08, 0x56, 0x45, 0xf5, 0xe2, 0x65, 0x26, 0x71, 0x49, 0xd5, 0x4e, 0xf2, 0x7c,
+ 0xb7, 0xe1, 0x42, 0xe2, 0xca, 0x93, 0x44, 0xec, 0x76, 0x3a, 0x11, 0x5b, 0xcb, 0xeb, 0x38, 0x95,
+ 0x87, 0xfd, 0x4d, 0x55, 0x73, 0x98, 0x25, 0x69, 0xd8, 0x66, 0x3a, 0x0d, 0xbb, 0x52, 0xc2, 0x32,
+ 0x95, 0x85, 0xe5, 0x2d, 0xb2, 0x56, 0x60, 0x91, 0x66, 0x2e, 0x57, 0x9b, 0xcd, 0x94, 0x8d, 0x33,
+ 0xb2, 0xfd, 0x41, 0x52, 0xb5, 0x5d, 0x91, 0xaa, 0xc5, 0x43, 0xc7, 0x15, 0xa5, 0xbb, 0x99, 0x54,
+ 0xad, 0x5b, 0x26, 0x66, 0x9c, 0xa9, 0xfd, 0xf5, 0x2c, 0x34, 0xe2, 0xbe, 0xdc, 0xc2, 0xe6, 0x17,
+ 0xa9, 0x5a, 0xb0, 0x48, 0xfa, 0xf9, 0x55, 0x7b, 0x99, 0xf3, 0x6b, 0xf6, 0x45, 0xe7, 0xd7, 0x65,
+ 0x68, 0xf0, 0x0f, 0x2b, 0xc0, 0xc7, 0xf2, 0x3c, 0xaa, 0x73, 0x80, 0x89, 0x8f, 0x13, 0x83, 0x9a,
+ 0x3f, 0x8b, 0x41, 0x65, 0x72, 0xc2, 0x85, 0x6c, 0x4e, 0xf8, 0x7e, 0x7c, 0xc2, 0x88, 0xb3, 0x68,
+ 0x3d, 0xcf, 0xae, 0xf0, 0x6c, 0xd9, 0x49, 0x9f, 0x2d, 0xe2, 0x78, 0xba, 0x56, 0x40, 0xfc, 0xca,
+ 0x66, 0x84, 0x8f, 0x44, 0x46, 0xa8, 0x5b, 0x95, 0x74, 0x84, 0x9b, 0x00, 0xf1, 0x9e, 0x57, 0x69,
+ 0x21, 0xca, 0x4f, 0xcd, 0xd4, 0xb0, 0x98, 0x57, 0x49, 0xad, 0x7f, 0x52, 0xf6, 0x3c, 0x83, 0x57,
+ 0xf9, 0x17, 0x3d, 0x4a, 0x2a, 0xa9, 0x1c, 0xbe, 0x9f, 0x2b, 0x22, 0x9c, 0xcd, 0xea, 0x6e, 0xa7,
+ 0x6b, 0x08, 0xe7, 0x33, 0x97, 0x5c, 0x09, 0x81, 0x1f, 0xea, 0x76, 0x20, 0xbb, 0x45, 0xf6, 0xd7,
+ 0x90, 0x90, 0x3e, 0x65, 0xa1, 0xd4, 0xb1, 0xeb, 0xb9, 0xe1, 0x89, 0xe8, 0x9f, 0xe7, 0xfd, 0xa0,
+ 0x40, 0x7d, 0x7e, 0xa1, 0x8b, 0x9f, 0xb9, 0xd4, 0x1a, 0x12, 0x07, 0x73, 0x63, 0x9c, 0x33, 0xeb,
+ 0x0c, 0xb0, 0x45, 0x1c, 0x9c, 0x6c, 0x90, 0xfa, 0xb9, 0x36, 0x48, 0x23, 0xb3, 0x41, 0x56, 0x61,
+ 0x3e, 0xc0, 0x76, 0x48, 0xbc, 0x2e, 0x88, 0x6b, 0x61, 0xd1, 0x62, 0x67, 0xc5, 0x04, 0x87, 0x21,
+ 0x1b, 0x40, 0x06, 0x30, 0xb2, 0xa9, 0x85, 0x59, 0x8b, 0x65, 0x61, 0xd6, 0x94, 0xd2, 0x64, 0x26,
+ 0xcc, 0x6a, 0x95, 0x85, 0x59, 0x67, 0xa9, 0x4c, 0x6a, 0x41, 0x64, 0x7b, 0x6a, 0x10, 0xa9, 0x87,
+ 0x63, 0x4b, 0xa9, 0x70, 0xec, 0x8f, 0xb9, 0xa7, 0x1e, 0xc2, 0x5a, 0x6e, 0x17, 0xc8, 0x4d, 0x75,
+ 0x37, 0x53, 0xdb, 0xec, 0x96, 0x2d, 0x50, 0x5c, 0xda, 0xfc, 0x73, 0x58, 0xda, 0x79, 0x86, 0x87,
+ 0x83, 0x53, 0x6f, 0x78, 0x8e, 0x88, 0xa0, 0x03, 0xb5, 0xe1, 0xc4, 0x91, 0x49, 0x3d, 0xfb, 0xd4,
+ 0x63, 0x84, 0x5a, 0x3a, 0x46, 0xb0, 0xa0, 0x93, 0x8c, 0x20, 0xe5, 0x5c, 0x65, 0x72, 0x3a, 0x0c,
+ 0x99, 0x31, 0x5f, 0x34, 0x65, 0x4b, 0xc2, 0x71, 0x10, 0xf0, 0x59, 0x0b, 0x38, 0x0e, 0x82, 0xb4,
+ 0x45, 0xd7, 0xd2, 0x16, 0x6d, 0x7c, 0x0d, 0x4d, 0x36, 0xc0, 0xf7, 0x12, 0x5f, 0x06, 0xca, 0xb5,
+ 0x24, 0x50, 0x8e, 0xe3, 0xed, 0x59, 0x2d, 0xde, 0x36, 0x36, 0x60, 0x51, 0x8c, 0x25, 0x27, 0xd2,
+ 0x81, 0x5a, 0x14, 0x8c, 0x95, 0xde, 0xa2, 0x60, 0x6c, 0xfc, 0x29, 0xb4, 0xfa, 0x94, 0xda, 0xc3,
+ 0x93, 0x73, 0xc8, 0x13, 0x8f, 0x55, 0xd5, 0x63, 0xfb, 0x9c, 0x4c, 0x86, 0x01, 0x6d, 0xc5, 0xbb,
+ 0x74, 0xfc, 0x3d, 0x40, 0x07, 0x24, 0xa0, 0x0f, 0x48, 0xf0, 0xad, 0x1d, 0x38, 0xe7, 0x8b, 0x95,
+ 0x11, 0xcc, 0xca, 0x67, 0x22, 0xb5, 0x1b, 0x73, 0x26, 0xff, 0x36, 0xde, 0x82, 0x0b, 0x29, 0x7e,
+ 0xa5, 0x03, 0x7f, 0x00, 0x4d, 0xee, 0x42, 0x64, 0x3c, 0x75, 0x43, 0xaf, 0xdc, 0x4d, 0xf3, 0x33,
+ 0x2c, 0xe3, 0x66, 0x67, 0x04, 0x87, 0xc7, 0x0e, 0xfd, 0xc7, 0x99, 0xa8, 0x63, 0x25, 0x4d, 0x9f,
+ 0x89, 0x38, 0xfe, 0xb1, 0x02, 0x73, 0x1c, 0x9e, 0xf3, 0xe8, 0x97, 0xa1, 0x11, 0x60, 0x9f, 0x58,
+ 0xd4, 0x1e, 0xc5, 0x2f, 0x6f, 0x18, 0xe0, 0x89, 0x3d, 0x0a, 0xf9, 0xc3, 0x21, 0xd6, 0xe9, 0xb8,
+ 0x23, 0x1c, 0x52, 0xf5, 0xfc, 0xa6, 0xc9, 0x60, 0xdb, 0x02, 0xc4, 0x96, 0x24, 0x74, 0xff, 0x42,
+ 0x84, 0x13, 0xb3, 0x26, 0xff, 0x46, 0xd7, 0xc5, 0x1d, 0xfa, 0x94, 0x42, 0x0d, 0xbf, 0x58, 0xef,
+ 0x41, 0x3d, 0x53, 0x9b, 0x89, 0xdb, 0xc6, 0xc7, 0x80, 0xf4, 0x39, 0xcb, 0x45, 0x7d, 0x13, 0xe6,
+ 0xf9, 0x92, 0xa8, 0xf3, 0xb0, 0x9d, 0x9e, 0xb4, 0x29, 0x7b, 0x8d, 0x4f, 0x01, 0x89, 0x55, 0x4c,
+ 0x9d, 0x81, 0x67, 0x5f, 0xf1, 0x8f, 0xe0, 0x42, 0x8a, 0x3e, 0xbe, 0x32, 0x4d, 0x31, 0xc8, 0x8e,
+ 0x2e, 0x89, 0xff, 0xad, 0x02, 0xd0, 0x8f, 0xe8, 0x89, 0x2c, 0x34, 0xe8, 0xb3, 0xac, 0xa4, 0x67,
+ 0xc9, 0xfa, 0x7c, 0x3b, 0x0c, 0xbf, 0x25, 0x81, 0x0a, 0xf2, 0xe2, 0x36, 0x2f, 0x12, 0x44, 0xf4,
+ 0x44, 0x15, 0x22, 0xd9, 0x37, 0xba, 0x0e, 0x6d, 0xf1, 0x60, 0xca, 0xb2, 0x1d, 0x27, 0xc0, 0x61,
+ 0x28, 0x2b, 0x92, 0x2d, 0x01, 0xed, 0x0b, 0x20, 0x43, 0x73, 0x1d, 0xec, 0x51, 0x97, 0x9e, 0x5a,
+ 0x94, 0x7c, 0x83, 0x3d, 0x19, 0xbe, 0xb5, 0x14, 0xf4, 0x09, 0x03, 0x32, 0xb4, 0x00, 0x8f, 0xdc,
+ 0x90, 0x06, 0x0a, 0x4d, 0x55, 0xc8, 0x24, 0x94, 0xa3, 0x19, 0xbf, 0xae, 0x40, 0xe7, 0x20, 0x1a,
+ 0x8f, 0xc5, 0x24, 0xcf, 0xbb, 0x96, 0xe8, 0x2d, 0x39, 0x8f, 0x6a, 0xc6, 0x1a, 0x92, 0x25, 0x92,
+ 0x93, 0xfb, 0xfe, 0x69, 0xe5, 0x5d, 0x58, 0xd6, 0x04, 0x95, 0x4a, 0x4b, 0x9d, 0xd2, 0x95, 0xf4,
+ 0x29, 0xcd, 0x0c, 0x45, 0x64, 0x52, 0x2f, 0x37, 0x39, 0xe3, 0x22, 0x5c, 0x48, 0xd1, 0xcb, 0x2c,
+ 0xec, 0x16, 0xb4, 0xe4, 0xb5, 0xa5, 0x34, 0x82, 0x4b, 0x50, 0x67, 0xee, 0x65, 0xe8, 0x3a, 0xaa,
+ 0x02, 0xbd, 0xe0, 0x13, 0x67, 0xcb, 0x75, 0x02, 0x63, 0x0f, 0x5a, 0xa6, 0x60, 0x2f, 0x71, 0x3f,
+ 0x81, 0xb6, 0xbc, 0xe4, 0xb4, 0x52, 0x97, 0xfd, 0x49, 0xb9, 0x34, 0xc5, 0xdb, 0x6c, 0x79, 0x7a,
+ 0xd3, 0xf8, 0x25, 0xf4, 0x0e, 0x7d, 0x87, 0x05, 0x53, 0x3a, 0x57, 0x35, 0xb5, 0x4f, 0x40, 0x3d,
+ 0xe8, 0x2b, 0x63, 0x9e, 0x26, 0x6b, 0x05, 0x7a, 0xd3, 0xb8, 0x0a, 0x97, 0x0b, 0x99, 0xcb, 0x79,
+ 0xfb, 0xd0, 0x49, 0x3a, 0x1c, 0x57, 0x15, 0xde, 0x79, 0x41, 0xbd, 0xa2, 0x15, 0xd4, 0x57, 0xe3,
+ 0x63, 0x58, 0x38, 0x74, 0xd9, 0xd2, 0x82, 0xa6, 0x5a, 0x59, 0xd0, 0x34, 0x9b, 0x0a, 0x9a, 0x8c,
+ 0x2f, 0xe3, 0xd5, 0x93, 0x11, 0xeb, 0x87, 0x3c, 0x6c, 0x16, 0x63, 0x2b, 0x37, 0x71, 0xa9, 0x60,
+ 0x72, 0x02, 0xc3, 0xd4, 0x90, 0x8d, 0x25, 0x68, 0xa5, 0x1c, 0x86, 0x71, 0x1f, 0xda, 0x19, 0x0f,
+ 0x70, 0x27, 0x13, 0x3f, 0xe4, 0x96, 0x2d, 0x13, 0x3d, 0xac, 0x48, 0x47, 0xf4, 0x20, 0xdc, 0xf5,
+ 0x8e, 0x89, 0xe2, 0x7b, 0x0d, 0x9a, 0x87, 0x65, 0x8f, 0xe3, 0x66, 0xd5, 0x7d, 0xcc, 0x5b, 0xb0,
+ 0x3c, 0xa0, 0x24, 0xb0, 0x47, 0x78, 0x97, 0xef, 0xda, 0x63, 0x57, 0xdc, 0x58, 0x44, 0x51, 0xec,
+ 0xbf, 0xf9, 0xb7, 0xf1, 0x9f, 0x15, 0x58, 0x7a, 0xe0, 0x8e, 0x71, 0x78, 0x1a, 0x52, 0x3c, 0x39,
+ 0xe4, 0xb1, 0xe4, 0x15, 0x68, 0x30, 0x69, 0x42, 0x6a, 0x4f, 0x7c, 0x75, 0x5f, 0x13, 0x03, 0xd8,
+ 0x1a, 0x85, 0x82, 0xb5, 0xca, 0x2e, 0xf5, 0x38, 0x3e, 0x37, 0x2a, 0x8b, 0xad, 0x25, 0x08, 0xbd,
+ 0x0b, 0x10, 0x85, 0xd8, 0x91, 0x77, 0x34, 0xb5, 0xcc, 0xd1, 0x73, 0xa8, 0xd7, 0xe2, 0x19, 0x9e,
+ 0xb8, 0xb0, 0x79, 0x0f, 0x9a, 0xae, 0x47, 0x1c, 0xcc, 0x6b, 0xf1, 0x8e, 0xcc, 0x3c, 0x8b, 0xa9,
+ 0x40, 0x20, 0x1e, 0x86, 0xd8, 0x31, 0xfe, 0x4c, 0x7a, 0x61, 0xb5, 0x78, 0x52, 0x07, 0x3b, 0xb0,
+ 0x2c, 0x36, 0xf4, 0x71, 0x3c, 0x69, 0xa5, 0xe8, 0x24, 0x9c, 0xcb, 0x2c, 0x88, 0xd9, 0x71, 0xe5,
+ 0xa9, 0xa8, 0x28, 0x8c, 0x7b, 0x70, 0x31, 0x15, 0xf3, 0x9d, 0x27, 0x55, 0xfa, 0x22, 0x93, 0x67,
+ 0x25, 0x06, 0x22, 0x13, 0x1d, 0x65, 0x1f, 0x25, 0x89, 0x4e, 0x28, 0x12, 0x9d, 0xd0, 0x30, 0xe1,
+ 0x52, 0x2a, 0xfd, 0x4b, 0x09, 0xf2, 0x5e, 0xe6, 0x88, 0xbf, 0x5a, 0xc2, 0x2c, 0x73, 0xd6, 0xff,
+ 0x6f, 0x05, 0x56, 0x8a, 0x10, 0x5e, 0xb2, 0xd0, 0xf0, 0xb3, 0x92, 0x9b, 0xf3, 0xbb, 0x53, 0xa5,
+ 0xf9, 0x83, 0x94, 0x64, 0x1e, 0x42, 0xaf, 0x68, 0xf5, 0xf2, 0xaa, 0xa8, 0x9d, 0x41, 0x15, 0xff,
+ 0x57, 0xd5, 0x4a, 0x67, 0x7d, 0x4a, 0x03, 0xf7, 0x28, 0x62, 0xc6, 0xfb, 0x43, 0xa5, 0xc0, 0xf7,
+ 0xe3, 0xf4, 0x4e, 0xac, 0xdf, 0x8d, 0x3c, 0x55, 0x32, 0x6a, 0x61, 0x8a, 0xb7, 0x9f, 0x4e, 0xf1,
+ 0x44, 0x51, 0xec, 0xf6, 0x54, 0x36, 0xaf, 0x6c, 0xdd, 0xe3, 0x79, 0x05, 0xda, 0x69, 0x3d, 0xa0,
+ 0x8f, 0x01, 0xec, 0x58, 0x72, 0x69, 0xf2, 0x57, 0xa6, 0xcd, 0xce, 0xd4, 0xf0, 0xd1, 0x35, 0xa8,
+ 0x0d, 0xfd, 0x48, 0x6a, 0x24, 0xb9, 0x1d, 0xd9, 0xf2, 0x23, 0xe1, 0x00, 0x58, 0x2f, 0x0b, 0x9a,
+ 0xc5, 0x7d, 0x72, 0xce, 0x73, 0x3d, 0xe6, 0x60, 0x81, 0x2a, 0x71, 0xd0, 0x67, 0xd0, 0xfe, 0x36,
+ 0x70, 0xa9, 0x7d, 0x34, 0xc6, 0xd6, 0xd8, 0x3e, 0xc5, 0x81, 0xf4, 0x5c, 0xe5, 0x5e, 0xa6, 0xa5,
+ 0xf0, 0x1f, 0x31, 0x74, 0x23, 0x82, 0xba, 0x1a, 0xff, 0x05, 0x1e, 0xf9, 0x21, 0xac, 0x45, 0x0c,
+ 0xcd, 0xe2, 0x77, 0xda, 0x9e, 0xed, 0x11, 0x2b, 0xc4, 0xec, 0x68, 0x52, 0xef, 0xc8, 0x8a, 0xbd,
+ 0xe5, 0x0a, 0x27, 0xda, 0x22, 0x01, 0xde, 0xb3, 0x3d, 0x32, 0x10, 0x14, 0xc6, 0x04, 0x9a, 0xda,
+ 0x74, 0x5e, 0x30, 0xf2, 0x7d, 0x58, 0x56, 0xf7, 0x4e, 0x21, 0xa6, 0xd2, 0xaf, 0x4f, 0x1b, 0x73,
+ 0x49, 0xa2, 0x0f, 0x30, 0xe5, 0xde, 0xfd, 0xd6, 0x15, 0xa8, 0xab, 0xb7, 0xf5, 0x68, 0x01, 0x6a,
+ 0x4f, 0xb6, 0x0e, 0x3a, 0x33, 0xec, 0xe3, 0x70, 0xfb, 0xa0, 0x53, 0xb9, 0x75, 0x0f, 0x96, 0x32,
+ 0xef, 0x44, 0xd0, 0x32, 0xb4, 0x06, 0xfd, 0xbd, 0xed, 0xcf, 0xf7, 0x7f, 0x6e, 0x99, 0x3b, 0xfd,
+ 0xed, 0x5f, 0x74, 0x66, 0xd0, 0x0a, 0x74, 0x14, 0x68, 0x6f, 0xff, 0x89, 0x80, 0x56, 0x6e, 0x7d,
+ 0x93, 0xb1, 0x11, 0x8c, 0x2e, 0xc2, 0xf2, 0xd6, 0xfe, 0xde, 0x93, 0xfe, 0xee, 0xde, 0x8e, 0x69,
+ 0x6d, 0x99, 0x3b, 0xfd, 0x27, 0x3b, 0xdb, 0x9d, 0x99, 0x34, 0xd8, 0x3c, 0xdc, 0xdb, 0xdb, 0xdd,
+ 0xfb, 0xa2, 0x53, 0x61, 0x5c, 0x13, 0xf0, 0xce, 0xcf, 0x77, 0x19, 0x72, 0x35, 0x8d, 0x7c, 0xb8,
+ 0xf7, 0x70, 0x6f, 0xff, 0x67, 0x7b, 0x9d, 0xda, 0xe6, 0x6f, 0x17, 0xa1, 0xad, 0x0e, 0x71, 0x1c,
+ 0xf0, 0xdb, 0xc9, 0x4f, 0x61, 0x41, 0xfd, 0xf6, 0x90, 0x78, 0x8f, 0xf4, 0x3f, 0x1a, 0xbd, 0x6e,
+ 0xbe, 0x43, 0x06, 0x43, 0x33, 0xe8, 0x80, 0x07, 0x27, 0xda, 0x9b, 0x9c, 0xab, 0x7a, 0xb8, 0x90,
+ 0x7b, 0xf4, 0xd3, 0x5b, 0x2f, 0xeb, 0x8e, 0x39, 0x0e, 0x58, 0x44, 0xa2, 0xbf, 0xa7, 0x44, 0xeb,
+ 0xfa, 0xb9, 0x9d, 0x7f, 0xa7, 0xd9, 0x7b, 0xad, 0xb4, 0x3f, 0x66, 0xfa, 0x0b, 0xe8, 0x64, 0x5f,
+ 0x52, 0xa2, 0xe4, 0x96, 0xb9, 0xe4, 0x95, 0x66, 0xef, 0xf5, 0x29, 0x18, 0x3a, 0xeb, 0xdc, 0x6b,
+ 0xc4, 0x8d, 0xf2, 0xf7, 0x64, 0x39, 0xd6, 0x65, 0x8f, 0xd4, 0xc4, 0x52, 0xa4, 0xdf, 0xd2, 0x20,
+ 0xfd, 0x0d, 0x60, 0xc1, 0x9b, 0x2a, 0x6d, 0x29, 0x8a, 0x1f, 0xe1, 0x18, 0x33, 0xe8, 0x2b, 0x58,
+ 0xca, 0x5c, 0x4c, 0xa1, 0x84, 0xaa, 0xf8, 0x9a, 0xad, 0xb7, 0x51, 0x8e, 0x90, 0xd6, 0x9b, 0x7e,
+ 0xed, 0x94, 0xd2, 0x5b, 0xc1, 0x5d, 0x56, 0x4a, 0x6f, 0x85, 0xf7, 0x55, 0xdc, 0xbc, 0x52, 0x97,
+ 0x4b, 0x9a, 0x79, 0x15, 0xdd, 0x64, 0xf5, 0xd6, 0xcb, 0xba, 0xf5, 0xe9, 0x67, 0x2e, 0x96, 0xb4,
+ 0xe9, 0x17, 0xdf, 0x57, 0xf5, 0x36, 0xca, 0x11, 0xb2, 0xba, 0x4a, 0xaa, 0xdc, 0x19, 0x5d, 0xe5,
+ 0x2e, 0x55, 0x32, 0xba, 0xca, 0x97, 0xc7, 0xa5, 0xae, 0x32, 0xe5, 0xea, 0xd7, 0x4a, 0xcb, 0x79,
+ 0x79, 0x5d, 0x15, 0x57, 0x08, 0x8d, 0x19, 0xd4, 0x87, 0xba, 0xaa, 0xc7, 0xa1, 0x64, 0x77, 0x67,
+ 0x8a, 0x80, 0xbd, 0x4b, 0x05, 0x3d, 0x31, 0x8b, 0xf7, 0x60, 0x96, 0x41, 0xd1, 0x4a, 0x0a, 0x49,
+ 0x91, 0x5e, 0xcc, 0x40, 0x63, 0xb2, 0x8f, 0x60, 0x5e, 0x94, 0xaf, 0x50, 0x92, 0x57, 0xa4, 0x6a,
+ 0x65, 0xbd, 0xb5, 0x1c, 0x3c, 0x26, 0xfe, 0x52, 0xfc, 0x0a, 0x25, 0xeb, 0x50, 0xe8, 0x72, 0xea,
+ 0x91, 0x7e, 0xba, 0xda, 0xd5, 0xbb, 0x52, 0xdc, 0xa9, 0xeb, 0x2b, 0x73, 0x38, 0xaf, 0x97, 0x45,
+ 0x4f, 0x39, 0x7d, 0x15, 0x47, 0x63, 0xc6, 0x0c, 0xb2, 0x44, 0x49, 0x27, 0xc3, 0xd8, 0x28, 0x56,
+ 0x74, 0x8a, 0xf9, 0xb5, 0xa9, 0x38, 0xf1, 0x00, 0x47, 0x70, 0xa1, 0x20, 0x39, 0x45, 0x09, 0x75,
+ 0x79, 0x5e, 0xdc, 0x7b, 0x63, 0x3a, 0x92, 0xae, 0x22, 0x69, 0x6b, 0xab, 0xfa, 0x06, 0xd5, 0x4c,
+ 0x6c, 0x2d, 0x07, 0x57, 0xc4, 0x9b, 0x7f, 0x55, 0x83, 0x45, 0x51, 0x42, 0x90, 0x07, 0xcc, 0x17,
+ 0x00, 0x49, 0x95, 0x0b, 0xf5, 0x52, 0xd3, 0x4c, 0x95, 0xfb, 0x7a, 0x97, 0x0b, 0xfb, 0x74, 0xe5,
+ 0x6b, 0x05, 0x2b, 0x4d, 0xf9, 0xf9, 0x32, 0x98, 0xa6, 0xfc, 0x82, 0x1a, 0x97, 0x31, 0x83, 0xb6,
+ 0xa1, 0x11, 0x57, 0x51, 0x90, 0x56, 0x7c, 0xc9, 0x94, 0x80, 0x7a, 0xbd, 0xa2, 0x2e, 0x5d, 0x22,
+ 0xad, 0x32, 0xa2, 0x49, 0x94, 0xaf, 0xb7, 0x68, 0x12, 0x15, 0x15, 0x53, 0x92, 0xd9, 0x89, 0x44,
+ 0x30, 0x3b, 0xbb, 0x54, 0x6e, 0x9d, 0x9d, 0x5d, 0x3a, 0x77, 0x34, 0x66, 0x3e, 0xbf, 0xf2, 0x9b,
+ 0xdf, 0xad, 0x57, 0xfe, 0xeb, 0x77, 0xeb, 0x33, 0x7f, 0xf9, 0x7c, 0xbd, 0xf2, 0x9b, 0xe7, 0xeb,
+ 0x95, 0x7f, 0x7f, 0xbe, 0x5e, 0xf9, 0xed, 0xf3, 0xf5, 0xca, 0x77, 0xff, 0xb3, 0x3e, 0x73, 0x34,
+ 0xcf, 0xff, 0x0d, 0x7c, 0xf7, 0xf7, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf8, 0xdd, 0x86, 0xaa, 0xcf,
+ 0x39, 0x00, 0x00,
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime/api.proto b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime/api.proto
new file mode 100644
index 000000000..b34451e2e
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime/api.proto
@@ -0,0 +1,1081 @@
+// To regenerate api.pb.go run hack/update-generated-runtime.sh
+syntax = 'proto3';
+
+package runtime;
+
+import "github.com/gogo/protobuf/gogoproto/gogo.proto";
+
+option (gogoproto.goproto_stringer_all) = false;
+option (gogoproto.stringer_all) = true;
+option (gogoproto.goproto_getters_all) = true;
+option (gogoproto.marshaler_all) = true;
+option (gogoproto.sizer_all) = true;
+option (gogoproto.unmarshaler_all) = true;
+option (gogoproto.goproto_unrecognized_all) = false;
+
+// Runtime service defines the public APIs for remote container runtimes
+service RuntimeService {
+ // Version returns the runtime name, runtime version, and runtime API version.
+ rpc Version(VersionRequest) returns (VersionResponse) {}
+
+ // RunPodSandbox creates and starts a pod-level sandbox. Runtimes must ensure
+ // the sandbox is in the ready state on success.
+ rpc RunPodSandbox(RunPodSandboxRequest) returns (RunPodSandboxResponse) {}
+ // StopPodSandbox stops any running process that is part of the sandbox and
+ // reclaims network resources (e.g., IP addresses) allocated to the sandbox.
+ // If there are any running containers in the sandbox, they must be forcibly
+ // terminated.
+ // This call is idempotent, and must not return an error if all relevant
+ // resources have already been reclaimed. kubelet will call StopPodSandbox
+ // at least once before calling RemovePodSandbox. It will also attempt to
+ // reclaim resources eagerly, as soon as a sandbox is not needed. Hence,
+ // multiple StopPodSandbox calls are expected.
+ rpc StopPodSandbox(StopPodSandboxRequest) returns (StopPodSandboxResponse) {}
+ // RemovePodSandbox removes the sandbox. If there are any running containers
+ // in the sandbox, they must be forcibly terminated and removed.
+ // This call is idempotent, and must not return an error if the sandbox has
+ // already been removed.
+ rpc RemovePodSandbox(RemovePodSandboxRequest) returns (RemovePodSandboxResponse) {}
+ // PodSandboxStatus returns the status of the PodSandbox. If the PodSandbox is not
+ // present, returns an error.
+ rpc PodSandboxStatus(PodSandboxStatusRequest) returns (PodSandboxStatusResponse) {}
+ // ListPodSandbox returns a list of PodSandboxes.
+ rpc ListPodSandbox(ListPodSandboxRequest) returns (ListPodSandboxResponse) {}
+
+ // CreateContainer creates a new container in specified PodSandbox
+ rpc CreateContainer(CreateContainerRequest) returns (CreateContainerResponse) {}
+ // StartContainer starts the container.
+ rpc StartContainer(StartContainerRequest) returns (StartContainerResponse) {}
+ // StopContainer stops a running container with a grace period (i.e., timeout).
+ // This call is idempotent, and must not return an error if the container has
+ // already been stopped.
+ // TODO: what must the runtime do after the grace period is reached?
+ rpc StopContainer(StopContainerRequest) returns (StopContainerResponse) {}
+ // RemoveContainer removes the container. If the container is running, the
+ // container must be forcibly removed.
+ // This call is idempotent, and must not return an error if the container has
+ // already been removed.
+ rpc RemoveContainer(RemoveContainerRequest) returns (RemoveContainerResponse) {}
+ // ListContainers lists all containers by filters.
+ rpc ListContainers(ListContainersRequest) returns (ListContainersResponse) {}
+ // ContainerStatus returns status of the container. If the container is not
+ // present, returns an error.
+ rpc ContainerStatus(ContainerStatusRequest) returns (ContainerStatusResponse) {}
+
+ // ExecSync runs a command in a container synchronously.
+ rpc ExecSync(ExecSyncRequest) returns (ExecSyncResponse) {}
+ // Exec prepares a streaming endpoint to execute a command in the container.
+ rpc Exec(ExecRequest) returns (ExecResponse) {}
+ // Attach prepares a streaming endpoint to attach to a running container.
+ rpc Attach(AttachRequest) returns (AttachResponse) {}
+ // PortForward prepares a streaming endpoint to forward ports from a PodSandbox.
+ rpc PortForward(PortForwardRequest) returns (PortForwardResponse) {}
+
+ // ContainerStats returns stats of the container. If the container does not
+ // exist, the call returns an error.
+ rpc ContainerStats(ContainerStatsRequest) returns (ContainerStatsResponse) {}
+ // ListContainerStats returns stats of all running containers.
+ rpc ListContainerStats(ListContainerStatsRequest) returns (ListContainerStatsResponse) {}
+
+ // UpdateRuntimeConfig updates the runtime configuration based on the given request.
+ rpc UpdateRuntimeConfig(UpdateRuntimeConfigRequest) returns (UpdateRuntimeConfigResponse) {}
+
+ // Status returns the status of the runtime.
+ rpc Status(StatusRequest) returns (StatusResponse) {}
+}
+
+// ImageService defines the public APIs for managing images.
+service ImageService {
+ // ListImages lists existing images.
+ rpc ListImages(ListImagesRequest) returns (ListImagesResponse) {}
+ // ImageStatus returns the status of the image. If the image is not
+ // present, returns a response with ImageStatusResponse.Image set to
+ // nil.
+ rpc ImageStatus(ImageStatusRequest) returns (ImageStatusResponse) {}
+ // PullImage pulls an image with authentication config.
+ rpc PullImage(PullImageRequest) returns (PullImageResponse) {}
+ // RemoveImage removes the image.
+ // This call is idempotent, and must not return an error if the image has
+ // already been removed.
+ rpc RemoveImage(RemoveImageRequest) returns (RemoveImageResponse) {}
+ // ImageFSInfo returns information of the filesystem that is used to store images.
+ rpc ImageFsInfo(ImageFsInfoRequest) returns (ImageFsInfoResponse) {}
+}
+
+message VersionRequest {
+ // Version of the kubelet runtime API.
+ string version = 1;
+}
+
+message VersionResponse {
+ // Version of the kubelet runtime API.
+ string version = 1;
+ // Name of the container runtime.
+ string runtime_name = 2;
+ // Version of the container runtime. The string must be
+ // semver-compatible.
+ string runtime_version = 3;
+ // API version of the container runtime. The string must be
+ // semver-compatible.
+ string runtime_api_version = 4;
+}
+
+// DNSConfig specifies the DNS servers and search domains of a sandbox.
+message DNSConfig {
+ // List of DNS servers of the cluster.
+ repeated string servers = 1;
+ // List of DNS search domains of the cluster.
+ repeated string searches = 2;
+ // List of DNS options. See https://linux.die.net/man/5/resolv.conf
+ // for all available options.
+ repeated string options = 3;
+}
+
+enum Protocol {
+ TCP = 0;
+ UDP = 1;
+}
+
+// PortMapping specifies the port mapping configurations of a sandbox.
+message PortMapping {
+ // Protocol of the port mapping.
+ Protocol protocol = 1;
+ // Port number within the container. Default: 0 (not specified).
+ int32 container_port = 2;
+ // Port number on the host. Default: 0 (not specified).
+ int32 host_port = 3;
+ // Host IP.
+ string host_ip = 4;
+}
+
+// Mount specifies a host volume to mount into a container.
+message Mount {
+ // Path of the mount within the container.
+ string container_path = 1;
+ // Path of the mount on the host.
+ string host_path = 2;
+ // If set, the mount is read-only.
+ bool readonly = 3;
+ // If set, the mount needs SELinux relabeling.
+ bool selinux_relabel = 4;
+}
+
+// NamespaceOption provides options for Linux namespaces.
+message NamespaceOption {
+ // If set, use the host's network namespace.
+ bool host_network = 1;
+ // If set, use the host's PID namespace.
+ bool host_pid = 2;
+ // If set, use the host's IPC namespace.
+ bool host_ipc = 3;
+}
+
+// Int64Value is the wrapper of int64.
+message Int64Value {
+ // The value.
+ int64 value = 1;
+}
+
+// LinuxSandboxSecurityContext holds linux security configuration that will be
+// applied to a sandbox. Note that:
+// 1) It does not apply to containers in the pods.
+// 2) It may not be applicable to a PodSandbox which does not contain any running
+// process.
+message LinuxSandboxSecurityContext {
+ // Configurations for the sandbox's namespaces.
+ // This will be used only if the PodSandbox uses namespace for isolation.
+ NamespaceOption namespace_options = 1;
+ // Optional SELinux context to be applied.
+ SELinuxOption selinux_options = 2;
+ // UID to run sandbox processes as, when applicable.
+ Int64Value run_as_user = 3;
+ // If set, the root filesystem of the sandbox is read-only.
+ bool readonly_rootfs = 4;
+ // List of groups applied to the first process run in the sandbox, in
+ // addition to the sandbox's primary GID.
+ repeated int64 supplemental_groups = 5;
+ // Indicates whether the sandbox will be asked to run a privileged
+ // container. If a privileged container is to be executed within it, this
+ // MUST be true.
+ // This allows a sandbox to take additional security precautions if no
+ // privileged containers are expected to be run.
+ bool privileged = 6;
+}
+
+// LinuxPodSandboxConfig holds platform-specific configurations for Linux
+// host platforms and Linux-based containers.
+message LinuxPodSandboxConfig {
+ // Parent cgroup of the PodSandbox.
+ // The cgroupfs style syntax will be used, but the container runtime can
+ // convert it to systemd semantics if needed.
+ string cgroup_parent = 1;
+ // LinuxSandboxSecurityContext holds sandbox security attributes.
+ LinuxSandboxSecurityContext security_context = 2;
+ // Sysctls holds linux sysctls config for the sandbox.
+ map<string, string> sysctls = 3;
+}
+
+// PodSandboxMetadata holds all necessary information for building the sandbox name.
+// The container runtime is encouraged to expose the metadata associated with the
+// PodSandbox in its user interface for better user experience. For example,
+// the runtime can construct a unique PodSandboxName based on the metadata.
+message PodSandboxMetadata {
+ // Pod name of the sandbox. Same as the pod name in the PodSpec.
+ string name = 1;
+ // Pod UID of the sandbox. Same as the pod UID in the PodSpec.
+ string uid = 2;
+ // Pod namespace of the sandbox. Same as the pod namespace in the PodSpec.
+ string namespace = 3;
+ // Attempt number of creating the sandbox. Default: 0.
+ uint32 attempt = 4;
+}
+
+// PodSandboxConfig holds all the required and optional fields for creating a
+// sandbox.
+message PodSandboxConfig {
+ // Metadata of the sandbox. This information will uniquely identify the
+ // sandbox, and the runtime should leverage this to ensure correct
+ // operation. The runtime may also use this information to improve UX, such
+ // as by constructing a readable name.
+ PodSandboxMetadata metadata = 1;
+ // Hostname of the sandbox.
+ string hostname = 2;
+ // Path to the directory on the host in which container log files are
+ // stored.
+ // By default the log of a container going into the LogDirectory will be
+ // hooked up to STDOUT and STDERR. However, the LogDirectory may contain
+ // binary log files with structured logging data from the individual
+ // containers. For example, the files might be newline separated JSON
+ // structured logs, systemd-journald journal files, gRPC trace files, etc.
+ // E.g.,
+ // PodSandboxConfig.LogDirectory = `/var/log/pods/<podUID>/`
+ // ContainerConfig.LogPath = `containerName_Instance#.log`
+ //
+ // WARNING: Log management and how kubelet should interface with the
+ // container logs are under active discussion in
+ // https://issues.k8s.io/24677. There *may* be future change of direction
+ // for logging as the discussion carries on.
+ string log_directory = 3;
+ // DNS config for the sandbox.
+ DNSConfig dns_config = 4;
+ // Port mappings for the sandbox.
+ repeated PortMapping port_mappings = 5;
+ // Key-value pairs that may be used to scope and select individual resources.
+ map<string, string> labels = 6;
+ // Unstructured key-value map that may be set by the kubelet to store and
+ // retrieve arbitrary metadata. This will include any annotations set on a
+ // pod through the Kubernetes API.
+ //
+ // Annotations MUST NOT be altered by the runtime; the annotations stored
+ // here MUST be returned in the PodSandboxStatus associated with the pod
+ // this PodSandboxConfig creates.
+ //
+ // In general, in order to preserve a well-defined interface between the
+ // kubelet and the container runtime, annotations SHOULD NOT influence
+ // runtime behaviour. For legacy reasons, there are some annotations which
+ // currently explicitly break this rule, listed below; in future versions
+ // of the interface these will be promoted to typed features.
+ //
+ // Annotations can also be useful for runtime authors to experiment with
+ // new features that are opaque to the Kubernetes APIs (both user-facing
+ // and the CRI). Whenever possible, however, runtime authors SHOULD
+ // consider proposing new typed fields for any new features instead.
+ //
+ // 1. Seccomp
+ //
+ // key: security.alpha.kubernetes.io/seccomp/pod
+ // description: the seccomp profile for the containers of an entire pod.
+ // value: see below.
+ //
+ // key: security.alpha.kubernetes.io/seccomp/container/<container name>
+ // description: the seccomp profile for the container (overrides pod).
+ // value: see below
+ //
+ // The value of seccomp is runtime agnostic:
+ // * runtime/default: the default profile for the container runtime
+ // * unconfined: unconfined profile, ie, no seccomp sandboxing
+ // * localhost/<profile-name>: the profile installed to the node's
+ // local seccomp profile root. Note that profile root is set in
+ // kubelet, and it is not passed in CRI yet, see https://issues.k8s.io/36997.
+ //
+ map<string, string> annotations = 7;
+ // Optional configurations specific to Linux hosts.
+ LinuxPodSandboxConfig linux = 8;
+}
+
+message RunPodSandboxRequest {
+ // Configuration for creating a PodSandbox.
+ PodSandboxConfig config = 1;
+}
+
+message RunPodSandboxResponse {
+ // ID of the PodSandbox to run.
+ string pod_sandbox_id = 1;
+}
+
+message StopPodSandboxRequest {
+ // ID of the PodSandbox to stop.
+ string pod_sandbox_id = 1;
+}
+
+message StopPodSandboxResponse {}
+
+message RemovePodSandboxRequest {
+ // ID of the PodSandbox to remove.
+ string pod_sandbox_id = 1;
+}
+
+message RemovePodSandboxResponse {}
+
+message PodSandboxStatusRequest {
+ // ID of the PodSandbox for which to retrieve status.
+ string pod_sandbox_id = 1;
+}
+
+// PodSandboxNetworkStatus is the status of the network for a PodSandbox.
+message PodSandboxNetworkStatus {
+ // IP address of the PodSandbox.
+ string ip = 1;
+}
+
+// Namespace contains paths to the namespaces.
+message Namespace {
+ // Namespace options for Linux namespaces.
+ NamespaceOption options = 2;
+}
+
+// LinuxSandboxStatus contains status specific to Linux sandboxes.
+message LinuxPodSandboxStatus {
+ // Paths to the sandbox's namespaces.
+ Namespace namespaces = 1;
+}
+
+enum PodSandboxState {
+ SANDBOX_READY = 0;
+ SANDBOX_NOTREADY = 1;
+}
+
+// PodSandboxStatus contains the status of the PodSandbox.
+message PodSandboxStatus {
+ // ID of the sandbox.
+ string id = 1;
+ // Metadata of the sandbox.
+ PodSandboxMetadata metadata = 2;
+ // State of the sandbox.
+ PodSandboxState state = 3;
+ // Creation timestamp of the sandbox in nanoseconds. Must be > 0.
+ int64 created_at = 4;
+ // Network contains network status if network is handled by the runtime.
+ PodSandboxNetworkStatus network = 5;
+ // Linux-specific status to a pod sandbox.
+ LinuxPodSandboxStatus linux = 6;
+ // Labels are key-value pairs that may be used to scope and select individual resources.
+ map<string, string> labels = 7;
+ // Unstructured key-value map holding arbitrary metadata.
+ // Annotations MUST NOT be altered by the runtime; the value of this field
+ // MUST be identical to that of the corresponding PodSandboxConfig used to
+ // instantiate the pod sandbox this status represents.
+ map<string, string> annotations = 8;
+}
+
+message PodSandboxStatusResponse {
+ // Status of the PodSandbox.
+ PodSandboxStatus status = 1;
+}
+
+// PodSandboxStateValue is the wrapper of PodSandboxState.
+message PodSandboxStateValue {
+ // State of the sandbox.
+ PodSandboxState state = 1;
+}
+
+// PodSandboxFilter is used to filter a list of PodSandboxes.
+// All those fields are combined with 'AND'
+message PodSandboxFilter {
+ // ID of the sandbox.
+ string id = 1;
+ // State of the sandbox.
+ PodSandboxStateValue state = 2;
+ // LabelSelector to select matches.
+ // Only api.MatchLabels is supported for now and the requirements
+ // are ANDed. MatchExpressions is not supported yet.
+ map<string, string> label_selector = 3;
+}
+
+message ListPodSandboxRequest {
+ // PodSandboxFilter to filter a list of PodSandboxes.
+ PodSandboxFilter filter = 1;
+}
+
+
+// PodSandbox contains minimal information about a sandbox.
+message PodSandbox {
+ // ID of the PodSandbox.
+ string id = 1;
+ // Metadata of the PodSandbox.
+ PodSandboxMetadata metadata = 2;
+ // State of the PodSandbox.
+ PodSandboxState state = 3;
+ // Creation timestamps of the PodSandbox in nanoseconds. Must be > 0.
+ int64 created_at = 4;
+ // Labels of the PodSandbox.
+ map<string, string> labels = 5;
+ // Unstructured key-value map holding arbitrary metadata.
+ // Annotations MUST NOT be altered by the runtime; the value of this field
+ // MUST be identical to that of the corresponding PodSandboxConfig used to
+ // instantiate this PodSandbox.
+ map<string, string> annotations = 6;
+}
+
+message ListPodSandboxResponse {
+ // List of PodSandboxes.
+ repeated PodSandbox items = 1;
+}
+
+// ImageSpec is an internal representation of an image. Currently, it wraps the
+// value of a Container's Image field (e.g. imageID or imageDigest), but in the
+// future it will include more detailed information about the different image types.
+message ImageSpec {
+ string image = 1;
+}
+
+message KeyValue {
+ string key = 1;
+ string value = 2;
+}
+
+// LinuxContainerResources specifies Linux specific configuration for
+// resources.
+// TODO: Consider using Resources from opencontainers/runtime-spec/specs-go
+// directly.
+message LinuxContainerResources {
+ // CPU CFS (Completely Fair Scheduler) period. Default: 0 (not specified).
+ int64 cpu_period = 1;
+ // CPU CFS (Completely Fair Scheduler) quota. Default: 0 (not specified).
+ int64 cpu_quota = 2;
+ // CPU shares (relative weight vs. other containers). Default: 0 (not specified).
+ int64 cpu_shares = 3;
+ // Memory limit in bytes. Default: 0 (not specified).
+ int64 memory_limit_in_bytes = 4;
+ // OOMScoreAdj adjusts the oom-killer score. Default: 0 (not specified).
+ int64 oom_score_adj = 5;
+}
+
+// SELinuxOption are the labels to be applied to the container.
+message SELinuxOption {
+ string user = 1;
+ string role = 2;
+ string type = 3;
+ string level = 4;
+}
+
+// Capability contains the container capabilities to add or drop
+message Capability {
+ // List of capabilities to add.
+ repeated string add_capabilities = 1;
+ // List of capabilities to drop.
+ repeated string drop_capabilities = 2;
+}
+
+// LinuxContainerSecurityContext holds linux security configuration that will be applied to a container.
+message LinuxContainerSecurityContext {
+ // Capabilities to add or drop.
+ Capability capabilities = 1;
+ // If set, run container in privileged mode.
+ // Privileged mode is incompatible with the following options. If
+ // privileged is set, the following features MAY have no effect:
+ // 1. capabilities
+ // 2. selinux_options
+ // 4. seccomp
+ // 5. apparmor
+ //
+ // Privileged mode implies the following specific options are applied:
+ // 1. All capabilities are added.
+ // 2. Sensitive paths, such as kernel module paths within sysfs, are not masked.
+ // 3. Any sysfs and procfs mounts are mounted RW.
+ // 4. Apparmor confinement is not applied.
+ // 5. Seccomp restrictions are not applied.
+ // 6. The device cgroup does not restrict access to any devices.
+ // 7. All devices from the host's /dev are available within the container.
+ // 8. SELinux restrictions are not applied (e.g. label=disabled).
+ bool privileged = 2;
+ // Configurations for the container's namespaces.
+ // Only used if the container uses namespace for isolation.
+ NamespaceOption namespace_options = 3;
+ // SELinux context to be optionally applied.
+ SELinuxOption selinux_options = 4;
+ // UID to run the container process as. Only one of run_as_user and
+ // run_as_username can be specified at a time.
+ Int64Value run_as_user = 5;
+ // User name to run the container process as. If specified, the user MUST
+ // exist in the container image (i.e. in the /etc/passwd inside the image),
+ // and be resolved there by the runtime; otherwise, the runtime MUST error.
+ string run_as_username = 6;
+ // If set, the root filesystem of the container is read-only.
+ bool readonly_rootfs = 7;
+ // List of groups applied to the first process run in the container, in
+ // addition to the container's primary GID.
+ repeated int64 supplemental_groups = 8;
+ // AppArmor profile for the container, candidate values are:
+ // * runtime/default: equivalent to not specifying a profile.
+ // * localhost/<profile_name>: profile loaded on the node
+ // (localhost) by name. The possible profile names are detailed at
+ // http://wiki.apparmor.net/index.php/AppArmor_Core_Policy_Reference
+ string apparmor_profile = 9;
+}
+
+// LinuxContainerConfig contains platform-specific configuration for
+// Linux-based containers.
+message LinuxContainerConfig {
+ // Resources specification for the container.
+ LinuxContainerResources resources = 1;
+ // LinuxContainerSecurityContext configuration for the container.
+ LinuxContainerSecurityContext security_context = 2;
+}
+
+// ContainerMetadata holds all necessary information for building the container
+// name. The container runtime is encouraged to expose the metadata in its user
+// interface for better user experience. E.g., runtime can construct a unique
+// container name based on the metadata. Note that (name, attempt) is unique
+// within a sandbox for the entire lifetime of the sandbox.
+message ContainerMetadata {
+ // Name of the container. Same as the container name in the PodSpec.
+ string name = 1;
+ // Attempt number of creating the container. Default: 0.
+ uint32 attempt = 2;
+}
+
+// Device specifies a host device to mount into a container.
+message Device {
+ // Path of the device within the container.
+ string container_path = 1;
+ // Path of the device on the host.
+ string host_path = 2;
+ // Cgroups permissions of the device, candidates are one or more of
+ // * r - allows container to read from the specified device.
+ // * w - allows container to write to the specified device.
+ // * m - allows container to create device files that do not yet exist.
+ string permissions = 3;
+}
+
+// ContainerConfig holds all the required and optional fields for creating a
+// container.
+message ContainerConfig {
+ // Metadata of the container. This information will uniquely identify the
+ // container, and the runtime should leverage this to ensure correct
+ // operation. The runtime may also use this information to improve UX, such
+ // as by constructing a readable name.
+ ContainerMetadata metadata = 1 ;
+ // Image to use.
+ ImageSpec image = 2;
+ // Command to execute (i.e., entrypoint for docker)
+ repeated string command = 3;
+ // Args for the Command (i.e., command for docker)
+ repeated string args = 4;
+ // Current working directory of the command.
+ string working_dir = 5;
+ // List of environment variable to set in the container.
+ repeated KeyValue envs = 6;
+ // Mounts for the container.
+ repeated Mount mounts = 7;
+ // Devices for the container.
+ repeated Device devices = 8;
+ // Key-value pairs that may be used to scope and select individual resources.
+ // Label keys are of the form:
+ // label-key ::= prefixed-name | name
+ // prefixed-name ::= prefix '/' name
+ // prefix ::= DNS_SUBDOMAIN
+ // name ::= DNS_LABEL
+ map<string, string> labels = 9;
+ // Unstructured key-value map that may be used by the kubelet to store and
+ // retrieve arbitrary metadata.
+ //
+ // Annotations MUST NOT be altered by the runtime; the annotations stored
+ // here MUST be returned in the ContainerStatus associated with the container
+ // this ContainerConfig creates.
+ //
+ // In general, in order to preserve a well-defined interface between the
+ // kubelet and the container runtime, annotations SHOULD NOT influence
+ // runtime behaviour.
+ map<string, string> annotations = 10;
+ // Path relative to PodSandboxConfig.LogDirectory for container to store
+ // the log (STDOUT and STDERR) on the host.
+ // E.g.,
+ // PodSandboxConfig.LogDirectory = `/var/log/pods/<podUID>/`
+ // ContainerConfig.LogPath = `containerName_Instance#.log`
+ //
+ // WARNING: Log management and how kubelet should interface with the
+ // container logs are under active discussion in
+ // https://issues.k8s.io/24677. There *may* be future change of direction
+ // for logging as the discussion carries on.
+ string log_path = 11;
+
+ // Variables for interactive containers, these have very specialized
+ // use-cases (e.g. debugging).
+ // TODO: Determine if we need to continue supporting these fields that are
+ // part of Kubernetes's Container Spec.
+ bool stdin = 12;
+ bool stdin_once = 13;
+ bool tty = 14;
+
+ // Configuration specific to Linux containers.
+ LinuxContainerConfig linux = 15;
+}
+
+message CreateContainerRequest {
+ // ID of the PodSandbox in which the container should be created.
+ string pod_sandbox_id = 1;
+ // Config of the container.
+ ContainerConfig config = 2;
+ // Config of the PodSandbox. This is the same config that was passed
+ // to RunPodSandboxRequest to create the PodSandbox. It is passed again
+ // here just for easy reference. The PodSandboxConfig is immutable and
+ // remains the same throughout the lifetime of the pod.
+ PodSandboxConfig sandbox_config = 3;
+}
+
+message CreateContainerResponse {
+ // ID of the created container.
+ string container_id = 1;
+}
+
+message StartContainerRequest {
+ // ID of the container to start.
+ string container_id = 1;
+}
+
+message StartContainerResponse {}
+
+message StopContainerRequest {
+ // ID of the container to stop.
+ string container_id = 1;
+ // Timeout in seconds to wait for the container to stop before forcibly
+ // terminating it. Default: 0 (forcibly terminate the container immediately)
+ int64 timeout = 2;
+}
+
+message StopContainerResponse {}
+
+message RemoveContainerRequest {
+ // ID of the container to remove.
+ string container_id = 1;
+}
+
+message RemoveContainerResponse {}
+
+enum ContainerState {
+ CONTAINER_CREATED = 0;
+ CONTAINER_RUNNING = 1;
+ CONTAINER_EXITED = 2;
+ CONTAINER_UNKNOWN = 3;
+}
+
+// ContainerStateValue is the wrapper of ContainerState.
+message ContainerStateValue {
+ // State of the container.
+ ContainerState state = 1;
+}
+
+// ContainerFilter is used to filter containers.
+// All those fields are combined with 'AND'
+message ContainerFilter {
+ // ID of the container.
+ string id = 1;
+ // State of the container.
+ ContainerStateValue state = 2;
+ // ID of the PodSandbox.
+ string pod_sandbox_id = 3;
+ // LabelSelector to select matches.
+ // Only api.MatchLabels is supported for now and the requirements
+ // are ANDed. MatchExpressions is not supported yet.
+ map<string, string> label_selector = 4;
+}
+
+message ListContainersRequest {
+ ContainerFilter filter = 1;
+}
+
+// Container provides the runtime information for a container, such as ID, hash,
+// state of the container.
+message Container {
+ // ID of the container, used by the container runtime to identify
+ // a container.
+ string id = 1;
+ // ID of the sandbox to which this container belongs.
+ string pod_sandbox_id = 2;
+ // Metadata of the container.
+ ContainerMetadata metadata = 3;
+ // Spec of the image.
+ ImageSpec image = 4;
+ // Reference to the image in use. For most runtimes, this should be an
+ // image ID.
+ string image_ref = 5;
+ // State of the container.
+ ContainerState state = 6;
+ // Creation time of the container in nanoseconds.
+ int64 created_at = 7;
+ // Key-value pairs that may be used to scope and select individual resources.
+ map<string, string> labels = 8;
+ // Unstructured key-value map holding arbitrary metadata.
+ // Annotations MUST NOT be altered by the runtime; the value of this field
+ // MUST be identical to that of the corresponding ContainerConfig used to
+ // instantiate this Container.
+ map<string, string> annotations = 9;
+}
+
+message ListContainersResponse {
+ // List of containers.
+ repeated Container containers = 1;
+}
+
+message ContainerStatusRequest {
+ // ID of the container for which to retrieve status.
+ string container_id = 1;
+}
+
+// ContainerStatus represents the status of a container.
+message ContainerStatus {
+ // ID of the container.
+ string id = 1;
+ // Metadata of the container.
+ ContainerMetadata metadata = 2;
+ // Status of the container.
+ ContainerState state = 3;
+ // Creation time of the container in nanoseconds.
+ int64 created_at = 4;
+ // Start time of the container in nanoseconds. Default: 0 (not specified).
+ int64 started_at = 5;
+ // Finish time of the container in nanoseconds. Default: 0 (not specified).
+ int64 finished_at = 6;
+ // Exit code of the container. Only required when finished_at != 0. Default: 0.
+ int32 exit_code = 7;
+ // Spec of the image.
+ ImageSpec image = 8;
+ // Reference to the image in use. For most runtimes, this should be an
+ // image ID
+ string image_ref = 9;
+ // Brief CamelCase string explaining why container is in its current state.
+ string reason = 10;
+ // Human-readable message indicating details about why container is in its
+ // current state.
+ string message = 11;
+ // Key-value pairs that may be used to scope and select individual resources.
+ map<string,string> labels = 12;
+ // Unstructured key-value map holding arbitrary metadata.
+ // Annotations MUST NOT be altered by the runtime; the value of this field
+ // MUST be identical to that of the corresponding ContainerConfig used to
+ // instantiate the Container this status represents.
+ map<string,string> annotations = 13;
+ // Mounts for the container.
+ repeated Mount mounts = 14;
+ // Log path of container.
+ string log_path = 15;
+}
+
+message ContainerStatusResponse {
+ // Status of the container.
+ ContainerStatus status = 1;
+}
+
+message ExecSyncRequest {
+ // ID of the container.
+ string container_id = 1;
+ // Command to execute.
+ repeated string cmd = 2;
+ // Timeout in seconds to stop the command. Default: 0 (run forever).
+ int64 timeout = 3;
+}
+
+message ExecSyncResponse {
+ // Captured command stdout output.
+ bytes stdout = 1;
+ // Captured command stderr output.
+ bytes stderr = 2;
+ // Exit code the command finished with. Default: 0 (success).
+ int32 exit_code = 3;
+}
+
+message ExecRequest {
+ // ID of the container in which to execute the command.
+ string container_id = 1;
+ // Command to execute.
+ repeated string cmd = 2;
+ // Whether to exec the command in a TTY.
+ bool tty = 3;
+ // Whether to stream stdin.
+ bool stdin = 4;
+}
+
+message ExecResponse {
+ // Fully qualified URL of the exec streaming server.
+ string url = 1;
+}
+
+message AttachRequest {
+ // ID of the container to which to attach.
+ string container_id = 1;
+ // Whether to stream stdin.
+ bool stdin = 2;
+ // Whether the process being attached is running in a TTY.
+ // This must match the TTY setting in the ContainerConfig.
+ bool tty = 3;
+}
+
+message AttachResponse {
+ // Fully qualified URL of the attach streaming server.
+ string url = 1;
+}
+
+message PortForwardRequest {
+ // ID of the container to which to forward the port.
+ string pod_sandbox_id = 1;
+ // Port to forward.
+ repeated int32 port = 2;
+}
+
+message PortForwardResponse {
+ // Fully qualified URL of the port-forward streaming server.
+ string url = 1;
+}
+
+message ImageFilter {
+ // Spec of the image.
+ ImageSpec image = 1;
+}
+
+message ListImagesRequest {
+ // Filter to list images.
+ ImageFilter filter = 1;
+}
+
+// Basic information about a container image.
+message Image {
+ // ID of the image.
+ string id = 1;
+ // Other names by which this image is known.
+ repeated string repo_tags = 2;
+ // Digests by which this image is known.
+ repeated string repo_digests = 3;
+ // Size of the image in bytes. Must be > 0.
+ uint64 size = 4;
+ // UID that will run the command(s). This is used as a default if no user is
+ // specified when creating the container. UID and the following user name
+ // are mutually exclusive.
+ Int64Value uid = 5;
+ // User name that will run the command(s). This is used if UID is not set
+ // and no user is specified when creating container.
+ string username = 6;
+}
+
+message ListImagesResponse {
+ // List of images.
+ repeated Image images = 1;
+}
+
+message ImageStatusRequest {
+ // Spec of the image.
+ ImageSpec image = 1;
+}
+
+message ImageStatusResponse {
+ // Status of the image.
+ Image image = 1;
+}
+
+// AuthConfig contains authorization information for connecting to a registry.
+message AuthConfig {
+ string username = 1;
+ string password = 2;
+ string auth = 3;
+ string server_address = 4;
+ // IdentityToken is used to authenticate the user and get
+ // an access token for the registry.
+ string identity_token = 5;
+ // RegistryToken is a bearer token to be sent to a registry
+ string registry_token = 6;
+}
+
+message PullImageRequest {
+ // Spec of the image.
+ ImageSpec image = 1;
+ // Authentication configuration for pulling the image.
+ AuthConfig auth = 2;
+ // Config of the PodSandbox, which is used to pull image in PodSandbox context.
+ PodSandboxConfig sandbox_config = 3;
+}
+
+message PullImageResponse {
+ // Reference to the image in use. For most runtimes, this should be an
+ // image ID or digest.
+ string image_ref = 1;
+}
+
+message RemoveImageRequest {
+ // Spec of the image to remove.
+ ImageSpec image = 1;
+}
+
+message RemoveImageResponse {}
+
+message NetworkConfig {
+ // CIDR to use for pod IP addresses.
+ string pod_cidr = 1;
+}
+
+message RuntimeConfig {
+ NetworkConfig network_config = 1;
+}
+
+message UpdateRuntimeConfigRequest {
+ RuntimeConfig runtime_config = 1;
+}
+
+message UpdateRuntimeConfigResponse {}
+
+// RuntimeCondition contains condition information for the runtime.
+// There are 2 kinds of runtime conditions:
+// 1. Required conditions: Conditions are required for kubelet to work
+// properly. If any required condition is unmet, the node will be not ready.
+// The required conditions include:
+// * RuntimeReady: RuntimeReady means the runtime is up and ready to accept
+// basic containers e.g. container only needs host network.
+// * NetworkReady: NetworkReady means the runtime network is up and ready to
+// accept containers which require container network.
+// 2. Optional conditions: Conditions are informative to the user, but kubelet
+// will not rely on. Since condition type is an arbitrary string, all conditions
+// not required are optional. These conditions will be exposed to users to help
+// them understand the status of the system.
+message RuntimeCondition {
+ // Type of runtime condition.
+ string type = 1;
+ // Status of the condition, one of true/false. Default: false.
+ bool status = 2;
+ // Brief CamelCase string containing reason for the condition's last transition.
+ string reason = 3;
+ // Human-readable message indicating details about last transition.
+ string message = 4;
+}
+
+// RuntimeStatus is information about the current status of the runtime.
+message RuntimeStatus {
+ // List of current observed runtime conditions.
+ repeated RuntimeCondition conditions = 1;
+}
+
+message StatusRequest {}
+
+message StatusResponse {
+ // Status of the Runtime.
+ RuntimeStatus status = 1;
+}
+
+message ImageFsInfoRequest {}
+
+// UInt64Value is the wrapper of uint64.
+message UInt64Value {
+ // The value.
+ uint64 value = 1;
+}
+
+// StorageIdentifier uniquely identify the storage..
+message StorageIdentifier{
+ // UUID of the device.
+ string uuid = 1;
+}
+
+// FilesystemUsage provides the filesystem usage information.
+message FilesystemUsage {
+ // Timestamp in nanoseconds at which the information were collected. Must be > 0.
+ int64 timestamp = 1;
+ // The underlying storage of the filesystem.
+ StorageIdentifier storage_id = 2;
+ // UsedBytes represents the bytes used for images on the filesystem.
+ // This may differ from the total bytes used on the filesystem and may not
+ // equal CapacityBytes - AvailableBytes.
+ UInt64Value used_bytes = 3;
+ // InodesUsed represents the inodes used by the images.
+ // This may not equal InodesCapacity - InodesAvailable because the underlying
+ // filesystem may also be used for purposes other than storing images.
+ UInt64Value inodes_used = 4;
+}
+
+message ImageFsInfoResponse {
+ // Information of image filesystem(s).
+ repeated FilesystemUsage image_filesystems = 1;
+}
+
+message ContainerStatsRequest{
+ // ID of the container for which to retrieve stats.
+ string container_id = 1;
+}
+
+message ContainerStatsResponse {
+ // Stats of the container.
+ ContainerStats stats = 1;
+}
+
+message ListContainerStatsRequest{
+ // Filter for the list request.
+ ContainerStatsFilter filter = 1;
+}
+
+// ContainerStatsFilter is used to filter containers.
+// All those fields are combined with 'AND'
+message ContainerStatsFilter {
+ // ID of the container.
+ string id = 1;
+ // ID of the PodSandbox.
+ string pod_sandbox_id = 2;
+ // LabelSelector to select matches.
+ // Only api.MatchLabels is supported for now and the requirements
+ // are ANDed. MatchExpressions is not supported yet.
+ map<string, string> label_selector = 3;
+}
+
+message ListContainerStatsResponse {
+ // Stats of the container.
+ repeated ContainerStats stats = 1;
+}
+
+// ContainerAttributes provides basic information of the container.
+message ContainerAttributes {
+ // ID of the container.
+ string id = 1;
+ // Metadata of the container.
+ ContainerMetadata metadata = 2;
+ // Key-value pairs that may be used to scope and select individual resources.
+ map<string,string> labels = 3;
+ // Unstructured key-value map holding arbitrary metadata.
+ // Annotations MUST NOT be altered by the runtime; the value of this field
+ // MUST be identical to that of the corresponding ContainerConfig used to
+ // instantiate the Container this status represents.
+ map<string,string> annotations = 4;
+}
+
+// ContainerStats provides the resource usage statistics for a container.
+message ContainerStats {
+ // Information of the container.
+ ContainerAttributes attributes = 1;
+ // CPU usage gathered from the container.
+ CpuUsage cpu = 2;
+ // Memory usage gathered from the container.
+ MemoryUsage memory = 3;
+ // Usage of the writeable layer.
+ FilesystemUsage writable_layer = 4;
+}
+
+// CpuUsage provides the CPU usage information.
+message CpuUsage {
+ // Timestamp in nanoseconds at which the information were collected. Must be > 0.
+ int64 timestamp = 1;
+ // Cumulative CPU usage (sum across all cores) since object creation.
+ UInt64Value usage_core_nano_seconds = 2;
+}
+
+// MemoryUsage provides the memory usage information.
+message MemoryUsage {
+ // Timestamp in nanoseconds at which the information were collected. Must be > 0.
+ int64 timestamp = 1;
+ // The amount of working set memory in bytes.
+ UInt64Value working_set_bytes = 2;
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime/constants.go b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime/constants.go
new file mode 100644
index 000000000..27c42c5c5
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime/constants.go
@@ -0,0 +1,27 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package runtime
+
+// This file contains all constants defined in CRI.
+
+// Required runtime condition type.
+const (
+ // RuntimeReady means the runtime is up and ready to accept basic containers.
+ RuntimeReady = "RuntimeReady"
+ // NetworkReady means the runtime network is up and ready to accept containers which require network.
+ NetworkReady = "NetworkReady"
+)
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/cache.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/cache.go
new file mode 100644
index 000000000..82852a9d9
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/cache.go
@@ -0,0 +1,199 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package container
+
+import (
+ "sync"
+ "time"
+
+ "k8s.io/apimachinery/pkg/types"
+)
+
+// Cache stores the PodStatus for the pods. It represents *all* the visible
+// pods/containers in the container runtime. All cache entries are at least as
+// new or newer than the global timestamp (set by UpdateTime()), while
+// individual entries may be slightly newer than the global timestamp. If a pod
+// has no states known by the runtime, Cache returns an empty PodStatus object
+// with ID populated.
+//
+// Cache provides two methods to retrive the PodStatus: the non-blocking Get()
+// and the blocking GetNewerThan() method. The component responsible for
+// populating the cache is expected to call Delete() to explicitly free the
+// cache entries.
+type Cache interface {
+ Get(types.UID) (*PodStatus, error)
+ Set(types.UID, *PodStatus, error, time.Time)
+ // GetNewerThan is a blocking call that only returns the status
+ // when it is newer than the given time.
+ GetNewerThan(types.UID, time.Time) (*PodStatus, error)
+ Delete(types.UID)
+ UpdateTime(time.Time)
+}
+
+type data struct {
+ // Status of the pod.
+ status *PodStatus
+ // Error got when trying to inspect the pod.
+ err error
+ // Time when the data was last modified.
+ modified time.Time
+}
+
+type subRecord struct {
+ time time.Time
+ ch chan *data
+}
+
+// cache implements Cache.
+type cache struct {
+ // Lock which guards all internal data structures.
+ lock sync.RWMutex
+ // Map that stores the pod statuses.
+ pods map[types.UID]*data
+ // A global timestamp represents how fresh the cached data is. All
+ // cache content is at the least newer than this timestamp. Note that the
+ // timestamp is nil after initialization, and will only become non-nil when
+ // it is ready to serve the cached statuses.
+ timestamp *time.Time
+ // Map that stores the subscriber records.
+ subscribers map[types.UID][]*subRecord
+}
+
+// NewCache creates a pod cache.
+func NewCache() Cache {
+ return &cache{pods: map[types.UID]*data{}, subscribers: map[types.UID][]*subRecord{}}
+}
+
+// Get returns the PodStatus for the pod; callers are expected not to
+// modify the objects returned.
+func (c *cache) Get(id types.UID) (*PodStatus, error) {
+ c.lock.RLock()
+ defer c.lock.RUnlock()
+ d := c.get(id)
+ return d.status, d.err
+}
+
+func (c *cache) GetNewerThan(id types.UID, minTime time.Time) (*PodStatus, error) {
+ ch := c.subscribe(id, minTime)
+ d := <-ch
+ return d.status, d.err
+}
+
+// Set sets the PodStatus for the pod.
+func (c *cache) Set(id types.UID, status *PodStatus, err error, timestamp time.Time) {
+ c.lock.Lock()
+ defer c.lock.Unlock()
+ defer c.notify(id, timestamp)
+ c.pods[id] = &data{status: status, err: err, modified: timestamp}
+}
+
+// Delete removes the entry of the pod.
+func (c *cache) Delete(id types.UID) {
+ c.lock.Lock()
+ defer c.lock.Unlock()
+ delete(c.pods, id)
+}
+
+// UpdateTime modifies the global timestamp of the cache and notify
+// subscribers if needed.
+func (c *cache) UpdateTime(timestamp time.Time) {
+ c.lock.Lock()
+ defer c.lock.Unlock()
+ c.timestamp = &timestamp
+ // Notify all the subscribers if the condition is met.
+ for id := range c.subscribers {
+ c.notify(id, *c.timestamp)
+ }
+}
+
+func makeDefaultData(id types.UID) *data {
+ return &data{status: &PodStatus{ID: id}, err: nil}
+}
+
+func (c *cache) get(id types.UID) *data {
+ d, ok := c.pods[id]
+ if !ok {
+ // Cache should store *all* pod/container information known by the
+ // container runtime. A cache miss indicates that there are no states
+ // regarding the pod last time we queried the container runtime.
+ // What this *really* means is that there are no visible pod/containers
+ // associated with this pod. Simply return an default (mostly empty)
+ // PodStatus to reflect this.
+ return makeDefaultData(id)
+ }
+ return d
+}
+
+// getIfNewerThan returns the data it is newer than the given time.
+// Otherwise, it returns nil. The caller should acquire the lock.
+func (c *cache) getIfNewerThan(id types.UID, minTime time.Time) *data {
+ d, ok := c.pods[id]
+ globalTimestampIsNewer := (c.timestamp != nil && c.timestamp.After(minTime))
+ if !ok && globalTimestampIsNewer {
+ // Status is not cached, but the global timestamp is newer than
+ // minTime, return the default status.
+ return makeDefaultData(id)
+ }
+ if ok && (d.modified.After(minTime) || globalTimestampIsNewer) {
+ // Status is cached, return status if either of the following is true.
+ // * status was modified after minTime
+ // * the global timestamp of the cache is newer than minTime.
+ return d
+ }
+ // The pod status is not ready.
+ return nil
+}
+
+// notify sends notifications for pod with the given id, if the requirements
+// are met. Note that the caller should acquire the lock.
+func (c *cache) notify(id types.UID, timestamp time.Time) {
+ list, ok := c.subscribers[id]
+ if !ok {
+ // No one to notify.
+ return
+ }
+ newList := []*subRecord{}
+ for i, r := range list {
+ if timestamp.Before(r.time) {
+ // Doesn't meet the time requirement; keep the record.
+ newList = append(newList, list[i])
+ continue
+ }
+ r.ch <- c.get(id)
+ close(r.ch)
+ }
+ if len(newList) == 0 {
+ delete(c.subscribers, id)
+ } else {
+ c.subscribers[id] = newList
+ }
+}
+
+func (c *cache) subscribe(id types.UID, timestamp time.Time) chan *data {
+ ch := make(chan *data, 1)
+ c.lock.Lock()
+ defer c.lock.Unlock()
+ d := c.getIfNewerThan(id, timestamp)
+ if d != nil {
+ // If the cache entry is ready, send the data and return immediately.
+ ch <- d
+ return ch
+ }
+ // Add the subscription record.
+ c.subscribers[id] = append(c.subscribers[id], &subRecord{time: timestamp, ch: ch})
+ return ch
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/container_gc.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/container_gc.go
new file mode 100644
index 000000000..be2fac4b9
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/container_gc.go
@@ -0,0 +1,84 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package container
+
+import (
+ "fmt"
+ "time"
+)
+
+// Specified a policy for garbage collecting containers.
+type ContainerGCPolicy struct {
+ // Minimum age at which a container can be garbage collected, zero for no limit.
+ MinAge time.Duration
+
+ // Max number of dead containers any single pod (UID, container name) pair is
+ // allowed to have, less than zero for no limit.
+ MaxPerPodContainer int
+
+ // Max number of total dead containers, less than zero for no limit.
+ MaxContainers int
+}
+
+// Manages garbage collection of dead containers.
+//
+// Implementation is thread-compatible.
+type ContainerGC interface {
+ // Garbage collect containers.
+ GarbageCollect() error
+ // Deletes all unused containers, including containers belonging to pods that are terminated but not deleted
+ DeleteAllUnusedContainers() error
+}
+
+// SourcesReadyProvider knows how to determine if configuration sources are ready
+type SourcesReadyProvider interface {
+ // AllReady returns true if the currently configured sources have all been seen.
+ AllReady() bool
+}
+
+// TODO(vmarmol): Preferentially remove pod infra containers.
+type realContainerGC struct {
+ // Container runtime
+ runtime Runtime
+
+ // Policy for garbage collection.
+ policy ContainerGCPolicy
+
+ // sourcesReadyProvider provides the readyness of kubelet configuration sources.
+ sourcesReadyProvider SourcesReadyProvider
+}
+
+// New ContainerGC instance with the specified policy.
+func NewContainerGC(runtime Runtime, policy ContainerGCPolicy, sourcesReadyProvider SourcesReadyProvider) (ContainerGC, error) {
+ if policy.MinAge < 0 {
+ return nil, fmt.Errorf("invalid minimum garbage collection age: %v", policy.MinAge)
+ }
+
+ return &realContainerGC{
+ runtime: runtime,
+ policy: policy,
+ sourcesReadyProvider: sourcesReadyProvider,
+ }, nil
+}
+
+func (cgc *realContainerGC) GarbageCollect() error {
+ return cgc.runtime.GarbageCollect(cgc.policy, cgc.sourcesReadyProvider.AllReady(), false)
+}
+
+func (cgc *realContainerGC) DeleteAllUnusedContainers() error {
+ return cgc.runtime.GarbageCollect(cgc.policy, cgc.sourcesReadyProvider.AllReady(), true)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/container_reference_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/container_reference_manager.go
new file mode 100644
index 000000000..8383e77d9
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/container_reference_manager.go
@@ -0,0 +1,62 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package container
+
+import (
+ "sync"
+
+ "k8s.io/kubernetes/pkg/api/v1"
+)
+
+// RefManager manages the references for the containers.
+// The references are used for reporting events such as creation,
+// failure, etc. This manager is thread-safe, no locks are necessary
+// for the caller.
+type RefManager struct {
+ sync.RWMutex
+ containerIDToRef map[ContainerID]*v1.ObjectReference
+}
+
+// NewRefManager creates and returns a container reference manager
+// with empty contents.
+func NewRefManager() *RefManager {
+ return &RefManager{containerIDToRef: make(map[ContainerID]*v1.ObjectReference)}
+}
+
+// SetRef stores a reference to a pod's container, associating it with the given container ID.
+// TODO: move this to client-go v1.ObjectReference
+func (c *RefManager) SetRef(id ContainerID, ref *v1.ObjectReference) {
+ c.Lock()
+ defer c.Unlock()
+ c.containerIDToRef[id] = ref
+}
+
+// ClearRef forgets the given container id and its associated container reference.
+func (c *RefManager) ClearRef(id ContainerID) {
+ c.Lock()
+ defer c.Unlock()
+ delete(c.containerIDToRef, id)
+}
+
+// GetRef returns the container reference of the given ID, or (nil, false) if none is stored.
+// TODO: move this to client-go v1.ObjectReference
+func (c *RefManager) GetRef(id ContainerID) (ref *v1.ObjectReference, ok bool) {
+ c.RLock()
+ defer c.RUnlock()
+ ref, ok = c.containerIDToRef[id]
+ return ref, ok
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/helpers.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/helpers.go
new file mode 100644
index 000000000..7930fed55
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/helpers.go
@@ -0,0 +1,367 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package container
+
+import (
+ "bytes"
+ "fmt"
+ "hash/adler32"
+ "hash/fnv"
+ "strings"
+ "time"
+
+ "github.com/golang/glog"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/types"
+ clientv1 "k8s.io/client-go/pkg/api/v1"
+ "k8s.io/client-go/tools/record"
+ "k8s.io/kubernetes/pkg/api/v1"
+ runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
+ "k8s.io/kubernetes/pkg/kubelet/events"
+ "k8s.io/kubernetes/pkg/kubelet/util/format"
+ "k8s.io/kubernetes/pkg/kubelet/util/ioutils"
+ hashutil "k8s.io/kubernetes/pkg/util/hash"
+ "k8s.io/kubernetes/third_party/forked/golang/expansion"
+)
+
+// HandlerRunner runs a lifecycle handler for a container.
+type HandlerRunner interface {
+ Run(containerID ContainerID, pod *v1.Pod, container *v1.Container, handler *v1.Handler) (string, error)
+}
+
+// RuntimeHelper wraps kubelet to make container runtime
+// able to get necessary informations like the RunContainerOptions, DNS settings, Host IP.
+type RuntimeHelper interface {
+ GenerateRunContainerOptions(pod *v1.Pod, container *v1.Container, podIP string) (contOpts *RunContainerOptions, useClusterFirstPolicy bool, err error)
+ GetClusterDNS(pod *v1.Pod) (dnsServers []string, dnsSearches []string, useClusterFirstPolicy bool, err error)
+ // GetPodCgroupParent returns the the CgroupName identifer, and its literal cgroupfs form on the host
+ // of a pod.
+ GetPodCgroupParent(pod *v1.Pod) string
+ GetPodDir(podUID types.UID) string
+ GeneratePodHostNameAndDomain(pod *v1.Pod) (hostname string, hostDomain string, err error)
+ // GetExtraSupplementalGroupsForPod returns a list of the extra
+ // supplemental groups for the Pod. These extra supplemental groups come
+ // from annotations on persistent volumes that the pod depends on.
+ GetExtraSupplementalGroupsForPod(pod *v1.Pod) []int64
+}
+
+// ShouldContainerBeRestarted checks whether a container needs to be restarted.
+// TODO(yifan): Think about how to refactor this.
+func ShouldContainerBeRestarted(container *v1.Container, pod *v1.Pod, podStatus *PodStatus) bool {
+ // Get latest container status.
+ status := podStatus.FindContainerStatusByName(container.Name)
+ // If the container was never started before, we should start it.
+ // NOTE(random-liu): If all historical containers were GC'd, we'll also return true here.
+ if status == nil {
+ return true
+ }
+ // Check whether container is running
+ if status.State == ContainerStateRunning {
+ return false
+ }
+ // Always restart container in the unknown, or in the created state.
+ if status.State == ContainerStateUnknown || status.State == ContainerStateCreated {
+ return true
+ }
+ // Check RestartPolicy for dead container
+ if pod.Spec.RestartPolicy == v1.RestartPolicyNever {
+ glog.V(4).Infof("Already ran container %q of pod %q, do nothing", container.Name, format.Pod(pod))
+ return false
+ }
+ if pod.Spec.RestartPolicy == v1.RestartPolicyOnFailure {
+ // Check the exit code.
+ if status.ExitCode == 0 {
+ glog.V(4).Infof("Already successfully ran container %q of pod %q, do nothing", container.Name, format.Pod(pod))
+ return false
+ }
+ }
+ return true
+}
+
+// HashContainer returns the hash of the container. It is used to compare
+// the running container with its desired spec.
+func HashContainer(container *v1.Container) uint64 {
+ hash := fnv.New32a()
+ hashutil.DeepHashObject(hash, *container)
+ return uint64(hash.Sum32())
+}
+
+// HashContainerLegacy returns the hash of the container. It is used to compare
+// the running container with its desired spec.
+// This is used by rktnetes and dockershim (for handling <=1.5 containers).
+// TODO: Remove this function when kubernetes version is >=1.8 AND rktnetes
+// update its hash function.
+func HashContainerLegacy(container *v1.Container) uint64 {
+ hash := adler32.New()
+ hashutil.DeepHashObject(hash, *container)
+ return uint64(hash.Sum32())
+}
+
+// EnvVarsToMap constructs a map of environment name to value from a slice
+// of env vars.
+func EnvVarsToMap(envs []EnvVar) map[string]string {
+ result := map[string]string{}
+ for _, env := range envs {
+ result[env.Name] = env.Value
+ }
+ return result
+}
+
+// V1EnvVarsToMap constructs a map of environment name to value from a slice
+// of env vars.
+func V1EnvVarsToMap(envs []v1.EnvVar) map[string]string {
+ result := map[string]string{}
+ for _, env := range envs {
+ result[env.Name] = env.Value
+ }
+
+ return result
+}
+
+// ExpandContainerCommandOnlyStatic substitutes only static environment variable values from the
+// container environment definitions. This does *not* include valueFrom substitutions.
+// TODO: callers should use ExpandContainerCommandAndArgs with a fully resolved list of environment.
+func ExpandContainerCommandOnlyStatic(containerCommand []string, envs []v1.EnvVar) (command []string) {
+ mapping := expansion.MappingFuncFor(V1EnvVarsToMap(envs))
+ if len(containerCommand) != 0 {
+ for _, cmd := range containerCommand {
+ command = append(command, expansion.Expand(cmd, mapping))
+ }
+ }
+ return command
+}
+
+func ExpandContainerCommandAndArgs(container *v1.Container, envs []EnvVar) (command []string, args []string) {
+ mapping := expansion.MappingFuncFor(EnvVarsToMap(envs))
+
+ if len(container.Command) != 0 {
+ for _, cmd := range container.Command {
+ command = append(command, expansion.Expand(cmd, mapping))
+ }
+ }
+
+ if len(container.Args) != 0 {
+ for _, arg := range container.Args {
+ args = append(args, expansion.Expand(arg, mapping))
+ }
+ }
+
+ return command, args
+}
+
+// Create an event recorder to record object's event except implicitly required container's, like infra container.
+func FilterEventRecorder(recorder record.EventRecorder) record.EventRecorder {
+ return &innerEventRecorder{
+ recorder: recorder,
+ }
+}
+
+type innerEventRecorder struct {
+ recorder record.EventRecorder
+}
+
+func (irecorder *innerEventRecorder) shouldRecordEvent(object runtime.Object) (*clientv1.ObjectReference, bool) {
+ if object == nil {
+ return nil, false
+ }
+ if ref, ok := object.(*clientv1.ObjectReference); ok {
+ if !strings.HasPrefix(ref.FieldPath, ImplicitContainerPrefix) {
+ return ref, true
+ }
+ }
+ // just in case we miss a spot, be sure that we still log something
+ if ref, ok := object.(*v1.ObjectReference); ok {
+ if !strings.HasPrefix(ref.FieldPath, ImplicitContainerPrefix) {
+ return events.ToObjectReference(ref), true
+ }
+ }
+ return nil, false
+}
+
+func (irecorder *innerEventRecorder) Event(object runtime.Object, eventtype, reason, message string) {
+ if ref, ok := irecorder.shouldRecordEvent(object); ok {
+ irecorder.recorder.Event(ref, eventtype, reason, message)
+ }
+}
+
+func (irecorder *innerEventRecorder) Eventf(object runtime.Object, eventtype, reason, messageFmt string, args ...interface{}) {
+ if ref, ok := irecorder.shouldRecordEvent(object); ok {
+ irecorder.recorder.Eventf(ref, eventtype, reason, messageFmt, args...)
+ }
+
+}
+
+func (irecorder *innerEventRecorder) PastEventf(object runtime.Object, timestamp metav1.Time, eventtype, reason, messageFmt string, args ...interface{}) {
+ if ref, ok := irecorder.shouldRecordEvent(object); ok {
+ irecorder.recorder.PastEventf(ref, timestamp, eventtype, reason, messageFmt, args...)
+ }
+}
+
+// Pod must not be nil.
+func IsHostNetworkPod(pod *v1.Pod) bool {
+ return pod.Spec.HostNetwork
+}
+
+// TODO(random-liu): Convert PodStatus to running Pod, should be deprecated soon
+func ConvertPodStatusToRunningPod(runtimeName string, podStatus *PodStatus) Pod {
+ runningPod := Pod{
+ ID: podStatus.ID,
+ Name: podStatus.Name,
+ Namespace: podStatus.Namespace,
+ }
+ for _, containerStatus := range podStatus.ContainerStatuses {
+ if containerStatus.State != ContainerStateRunning {
+ continue
+ }
+ container := &Container{
+ ID: containerStatus.ID,
+ Name: containerStatus.Name,
+ Image: containerStatus.Image,
+ ImageID: containerStatus.ImageID,
+ Hash: containerStatus.Hash,
+ State: containerStatus.State,
+ }
+ runningPod.Containers = append(runningPod.Containers, container)
+ }
+
+ // Populate sandboxes in kubecontainer.Pod
+ for _, sandbox := range podStatus.SandboxStatuses {
+ runningPod.Sandboxes = append(runningPod.Sandboxes, &Container{
+ ID: ContainerID{Type: runtimeName, ID: sandbox.Id},
+ State: SandboxToContainerState(sandbox.State),
+ })
+ }
+ return runningPod
+}
+
+// SandboxToContainerState converts runtimeapi.PodSandboxState to
+// kubecontainer.ContainerState.
+// This is only needed because we need to return sandboxes as if they were
+// kubecontainer.Containers to avoid substantial changes to PLEG.
+// TODO: Remove this once it becomes obsolete.
+func SandboxToContainerState(state runtimeapi.PodSandboxState) ContainerState {
+ switch state {
+ case runtimeapi.PodSandboxState_SANDBOX_READY:
+ return ContainerStateRunning
+ case runtimeapi.PodSandboxState_SANDBOX_NOTREADY:
+ return ContainerStateExited
+ }
+ return ContainerStateUnknown
+}
+
+// FormatPod returns a string representing a pod in a human readable format,
+// with pod UID as part of the string.
+func FormatPod(pod *Pod) string {
+ // Use underscore as the delimiter because it is not allowed in pod name
+ // (DNS subdomain format), while allowed in the container name format.
+ return fmt.Sprintf("%s_%s(%s)", pod.Name, pod.Namespace, pod.ID)
+}
+
+type containerCommandRunnerWrapper struct {
+ DirectStreamingRuntime
+}
+
+var _ ContainerCommandRunner = &containerCommandRunnerWrapper{}
+
+func DirectStreamingRunner(runtime DirectStreamingRuntime) ContainerCommandRunner {
+ return &containerCommandRunnerWrapper{runtime}
+}
+
+func (r *containerCommandRunnerWrapper) RunInContainer(id ContainerID, cmd []string, timeout time.Duration) ([]byte, error) {
+ var buffer bytes.Buffer
+ output := ioutils.WriteCloserWrapper(&buffer)
+ err := r.ExecInContainer(id, cmd, nil, output, output, false, nil, timeout)
+ // Even if err is non-nil, there still may be output (e.g. the exec wrote to stdout or stderr but
+ // the command returned a nonzero exit code). Therefore, always return the output along with the
+ // error.
+ return buffer.Bytes(), err
+}
+
+// GetContainerSpec gets the container spec by containerName.
+func GetContainerSpec(pod *v1.Pod, containerName string) *v1.Container {
+ for i, c := range pod.Spec.Containers {
+ if containerName == c.Name {
+ return &pod.Spec.Containers[i]
+ }
+ }
+ for i, c := range pod.Spec.InitContainers {
+ if containerName == c.Name {
+ return &pod.Spec.InitContainers[i]
+ }
+ }
+ return nil
+}
+
+// HasPrivilegedContainer returns true if any of the containers in the pod are privileged.
+func HasPrivilegedContainer(pod *v1.Pod) bool {
+ for _, c := range pod.Spec.Containers {
+ if c.SecurityContext != nil &&
+ c.SecurityContext.Privileged != nil &&
+ *c.SecurityContext.Privileged {
+ return true
+ }
+ }
+ return false
+}
+
+// MakeCapabilities creates string slices from Capability slices
+func MakeCapabilities(capAdd []v1.Capability, capDrop []v1.Capability) ([]string, []string) {
+ var (
+ addCaps []string
+ dropCaps []string
+ )
+ for _, cap := range capAdd {
+ addCaps = append(addCaps, string(cap))
+ }
+ for _, cap := range capDrop {
+ dropCaps = append(dropCaps, string(cap))
+ }
+ return addCaps, dropCaps
+}
+
+// MakePortMappings creates internal port mapping from api port mapping.
+func MakePortMappings(container *v1.Container) (ports []PortMapping) {
+ names := make(map[string]struct{})
+ for _, p := range container.Ports {
+ pm := PortMapping{
+ HostPort: int(p.HostPort),
+ ContainerPort: int(p.ContainerPort),
+ Protocol: p.Protocol,
+ HostIP: p.HostIP,
+ }
+
+ // We need to create some default port name if it's not specified, since
+ // this is necessary for rkt.
+ // http://issue.k8s.io/7710
+ if p.Name == "" {
+ pm.Name = fmt.Sprintf("%s-%s:%d", container.Name, p.Protocol, p.ContainerPort)
+ } else {
+ pm.Name = fmt.Sprintf("%s-%s", container.Name, p.Name)
+ }
+
+ // Protect against exposing the same protocol-port more than once in a container.
+ if _, ok := names[pm.Name]; ok {
+ glog.Warningf("Port name conflicted, %q is defined more than once", pm.Name)
+ continue
+ }
+ ports = append(ports, pm)
+ names[pm.Name] = struct{}{}
+ }
+ return
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/os.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/os.go
new file mode 100644
index 000000000..6126063b3
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/os.go
@@ -0,0 +1,107 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package container
+
+import (
+ "io/ioutil"
+ "os"
+ "path/filepath"
+ "time"
+)
+
+// OSInterface collects system level operations that need to be mocked out
+// during tests.
+type OSInterface interface {
+ MkdirAll(path string, perm os.FileMode) error
+ Symlink(oldname string, newname string) error
+ Stat(path string) (os.FileInfo, error)
+ Remove(path string) error
+ RemoveAll(path string) error
+ Create(path string) (*os.File, error)
+ Chmod(path string, perm os.FileMode) error
+ Hostname() (name string, err error)
+ Chtimes(path string, atime time.Time, mtime time.Time) error
+ Pipe() (r *os.File, w *os.File, err error)
+ ReadDir(dirname string) ([]os.FileInfo, error)
+ Glob(pattern string) ([]string, error)
+}
+
+// RealOS is used to dispatch the real system level operations.
+type RealOS struct{}
+
+// MkDir will will call os.Mkdir to create a directory.
+func (RealOS) MkdirAll(path string, perm os.FileMode) error {
+ return os.MkdirAll(path, perm)
+}
+
+// Symlink will call os.Symlink to create a symbolic link.
+func (RealOS) Symlink(oldname string, newname string) error {
+ return os.Symlink(oldname, newname)
+}
+
+// Stat will call os.Stat to get the FileInfo for a given path
+func (RealOS) Stat(path string) (os.FileInfo, error) {
+ return os.Stat(path)
+}
+
+// Remove will call os.Remove to remove the path.
+func (RealOS) Remove(path string) error {
+ return os.Remove(path)
+}
+
+// RemoveAll will call os.RemoveAll to remove the path and its children.
+func (RealOS) RemoveAll(path string) error {
+ return os.RemoveAll(path)
+}
+
+// Create will call os.Create to create and return a file
+// at path.
+func (RealOS) Create(path string) (*os.File, error) {
+ return os.Create(path)
+}
+
+// Chmod will change the permissions on the specified path or return
+// an error.
+func (RealOS) Chmod(path string, perm os.FileMode) error {
+ return os.Chmod(path, perm)
+}
+
+// Hostname will call os.Hostname to return the hostname.
+func (RealOS) Hostname() (name string, err error) {
+ return os.Hostname()
+}
+
+// Chtimes will call os.Chtimes to change the atime and mtime of the path
+func (RealOS) Chtimes(path string, atime time.Time, mtime time.Time) error {
+ return os.Chtimes(path, atime, mtime)
+}
+
+// Pipe will call os.Pipe to return a connected pair of pipe.
+func (RealOS) Pipe() (r *os.File, w *os.File, err error) {
+ return os.Pipe()
+}
+
+// ReadDir will call ioutil.ReadDir to return the files under the directory.
+func (RealOS) ReadDir(dirname string) ([]os.FileInfo, error) {
+ return ioutil.ReadDir(dirname)
+}
+
+// Glob will call filepath.Glob to return the names of all files matching
+// pattern.
+func (RealOS) Glob(pattern string) ([]string, error) {
+ return filepath.Glob(pattern)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/pty_linux.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/pty_linux.go
new file mode 100644
index 000000000..40906ce99
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/pty_linux.go
@@ -0,0 +1,30 @@
+// +build linux
+
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package container
+
+import (
+ "os"
+ "os/exec"
+
+ "github.com/kr/pty"
+)
+
+func StartPty(c *exec.Cmd) (*os.File, error) {
+ return pty.Start(c)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/pty_unsupported.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/pty_unsupported.go
new file mode 100644
index 000000000..24ea2f787
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/pty_unsupported.go
@@ -0,0 +1,28 @@
+// +build !linux
+
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package container
+
+import (
+ "os"
+ "os/exec"
+)
+
+func StartPty(c *exec.Cmd) (pty *os.File, err error) {
+ return nil, nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/ref.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/ref.go
new file mode 100644
index 000000000..0251b8134
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/ref.go
@@ -0,0 +1,73 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package container
+
+import (
+ "fmt"
+
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/api/v1/ref"
+)
+
+var ImplicitContainerPrefix string = "implicitly required container "
+
+// GenerateContainerRef returns an *v1.ObjectReference which references the given container
+// within the given pod. Returns an error if the reference can't be constructed or the
+// container doesn't actually belong to the pod.
+//
+// This function will return an error if the provided Pod does not have a selfLink,
+// but we expect selfLink to be populated at all call sites for the function.
+func GenerateContainerRef(pod *v1.Pod, container *v1.Container) (*v1.ObjectReference, error) {
+ fieldPath, err := fieldPath(pod, container)
+ if err != nil {
+ // TODO: figure out intelligent way to refer to containers that we implicitly
+ // start (like the pod infra container). This is not a good way, ugh.
+ fieldPath = ImplicitContainerPrefix + container.Name
+ }
+ ref, err := ref.GetPartialReference(api.Scheme, pod, fieldPath)
+ if err != nil {
+ return nil, err
+ }
+ return ref, nil
+}
+
+// fieldPath returns a fieldPath locating container within pod.
+// Returns an error if the container isn't part of the pod.
+func fieldPath(pod *v1.Pod, container *v1.Container) (string, error) {
+ for i := range pod.Spec.Containers {
+ here := &pod.Spec.Containers[i]
+ if here.Name == container.Name {
+ if here.Name == "" {
+ return fmt.Sprintf("spec.containers[%d]", i), nil
+ } else {
+ return fmt.Sprintf("spec.containers{%s}", here.Name), nil
+ }
+ }
+ }
+ for i := range pod.Spec.InitContainers {
+ here := &pod.Spec.InitContainers[i]
+ if here.Name == container.Name {
+ if here.Name == "" {
+ return fmt.Sprintf("spec.initContainers[%d]", i), nil
+ } else {
+ return fmt.Sprintf("spec.initContainers{%s}", here.Name), nil
+ }
+ }
+ }
+ return "", fmt.Errorf("container %#v not found in pod %#v", container, pod)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/resize.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/resize.go
new file mode 100644
index 000000000..d7b75eede
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/resize.go
@@ -0,0 +1,46 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package container
+
+import (
+ "k8s.io/apimachinery/pkg/util/runtime"
+ "k8s.io/client-go/tools/remotecommand"
+)
+
+// handleResizing spawns a goroutine that processes the resize channel, calling resizeFunc for each
+// remotecommand.TerminalSize received from the channel. The resize channel must be closed elsewhere to stop the
+// goroutine.
+func HandleResizing(resize <-chan remotecommand.TerminalSize, resizeFunc func(size remotecommand.TerminalSize)) {
+ if resize == nil {
+ return
+ }
+
+ go func() {
+ defer runtime.HandleCrash()
+
+ for {
+ size, ok := <-resize
+ if !ok {
+ return
+ }
+ if size.Height < 1 || size.Width < 1 {
+ continue
+ }
+ resizeFunc(size)
+ }
+ }()
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime.go
new file mode 100644
index 000000000..c3403ad57
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime.go
@@ -0,0 +1,646 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package container
+
+import (
+ "fmt"
+ "io"
+ "net/url"
+ "reflect"
+ "strings"
+ "time"
+
+ "github.com/golang/glog"
+ "k8s.io/apimachinery/pkg/types"
+ "k8s.io/client-go/tools/remotecommand"
+ "k8s.io/client-go/util/flowcontrol"
+ "k8s.io/kubernetes/pkg/api/v1"
+ runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
+ "k8s.io/kubernetes/pkg/volume"
+)
+
+type Version interface {
+ // Compare compares two versions of the runtime. On success it returns -1
+ // if the version is less than the other, 1 if it is greater than the other,
+ // or 0 if they are equal.
+ Compare(other string) (int, error)
+ // String returns a string that represents the version.
+ String() string
+}
+
+// ImageSpec is an internal representation of an image. Currently, it wraps the
+// value of a Container's Image field, but in the future it will include more detailed
+// information about the different image types.
+type ImageSpec struct {
+ Image string
+}
+
+// ImageStats contains statistics about all the images currently available.
+type ImageStats struct {
+ // Total amount of storage consumed by existing images.
+ TotalStorageBytes uint64
+}
+
+// Runtime interface defines the interfaces that should be implemented
+// by a container runtime.
+// Thread safety is required from implementations of this interface.
+type Runtime interface {
+ // Type returns the type of the container runtime.
+ Type() string
+
+ // Version returns the version information of the container runtime.
+ Version() (Version, error)
+
+ // APIVersion returns the cached API version information of the container
+ // runtime. Implementation is expected to update this cache periodically.
+ // This may be different from the runtime engine's version.
+ // TODO(random-liu): We should fold this into Version()
+ APIVersion() (Version, error)
+ // Status returns the status of the runtime. An error is returned if the Status
+ // function itself fails, nil otherwise.
+ Status() (*RuntimeStatus, error)
+ // GetPods returns a list of containers grouped by pods. The boolean parameter
+ // specifies whether the runtime returns all containers including those already
+ // exited and dead containers (used for garbage collection).
+ GetPods(all bool) ([]*Pod, error)
+ // GarbageCollect removes dead containers using the specified container gc policy
+ // If allSourcesReady is not true, it means that kubelet doesn't have the
+ // complete list of pods from all avialble sources (e.g., apiserver, http,
+ // file). In this case, garbage collector should refrain itself from aggressive
+ // behavior such as removing all containers of unrecognized pods (yet).
+ // If evictNonDeletedPods is set to true, containers and sandboxes belonging to pods
+ // that are terminated, but not deleted will be evicted. Otherwise, only deleted pods will be GC'd.
+ // TODO: Revisit this method and make it cleaner.
+ GarbageCollect(gcPolicy ContainerGCPolicy, allSourcesReady bool, evictNonDeletedPods bool) error
+ // Syncs the running pod into the desired pod.
+ SyncPod(pod *v1.Pod, apiPodStatus v1.PodStatus, podStatus *PodStatus, pullSecrets []v1.Secret, backOff *flowcontrol.Backoff) PodSyncResult
+ // KillPod kills all the containers of a pod. Pod may be nil, running pod must not be.
+ // TODO(random-liu): Return PodSyncResult in KillPod.
+ // gracePeriodOverride if specified allows the caller to override the pod default grace period.
+ // only hard kill paths are allowed to specify a gracePeriodOverride in the kubelet in order to not corrupt user data.
+ // it is useful when doing SIGKILL for hard eviction scenarios, or max grace period during soft eviction scenarios.
+ KillPod(pod *v1.Pod, runningPod Pod, gracePeriodOverride *int64) error
+ // GetPodStatus retrieves the status of the pod, including the
+ // information of all containers in the pod that are visble in Runtime.
+ GetPodStatus(uid types.UID, name, namespace string) (*PodStatus, error)
+ // Returns the filesystem path of the pod's network namespace; if the
+ // runtime does not handle namespace creation itself, or cannot return
+ // the network namespace path, it should return an error.
+ // TODO: Change ContainerID to a Pod ID since the namespace is shared
+ // by all containers in the pod.
+ GetNetNS(containerID ContainerID) (string, error)
+ // Returns the container ID that represents the Pod, as passed to network
+ // plugins. For example, if the runtime uses an infra container, returns
+ // the infra container's ContainerID.
+ // TODO: Change ContainerID to a Pod ID, see GetNetNS()
+ GetPodContainerID(*Pod) (ContainerID, error)
+ // TODO(vmarmol): Unify pod and containerID args.
+ // GetContainerLogs returns logs of a specific container. By
+ // default, it returns a snapshot of the container log. Set 'follow' to true to
+ // stream the log. Set 'follow' to false and specify the number of lines (e.g.
+ // "100" or "all") to tail the log.
+ GetContainerLogs(pod *v1.Pod, containerID ContainerID, logOptions *v1.PodLogOptions, stdout, stderr io.Writer) (err error)
+ // Delete a container. If the container is still running, an error is returned.
+ DeleteContainer(containerID ContainerID) error
+ // ImageService provides methods to image-related methods.
+ ImageService
+ // UpdatePodCIDR sends a new podCIDR to the runtime.
+ // This method just proxies a new runtimeConfig with the updated
+ // CIDR value down to the runtime shim.
+ UpdatePodCIDR(podCIDR string) error
+}
+
+// DirectStreamingRuntime is the interface implemented by runtimes for which the streaming calls
+// (exec/attach/port-forward) should be served directly by the Kubelet.
+type DirectStreamingRuntime interface {
+ // Runs the command in the container of the specified pod using nsenter.
+ // Attaches the processes stdin, stdout, and stderr. Optionally uses a
+ // tty.
+ ExecInContainer(containerID ContainerID, cmd []string, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize, timeout time.Duration) error
+ // Forward the specified port from the specified pod to the stream.
+ PortForward(pod *Pod, port int32, stream io.ReadWriteCloser) error
+ // ContainerAttach encapsulates the attaching to containers for testability
+ ContainerAttacher
+}
+
+// IndirectStreamingRuntime is the interface implemented by runtimes that handle the serving of the
+// streaming calls (exec/attach/port-forward) themselves. In this case, Kubelet should redirect to
+// the runtime server.
+type IndirectStreamingRuntime interface {
+ GetExec(id ContainerID, cmd []string, stdin, stdout, stderr, tty bool) (*url.URL, error)
+ GetAttach(id ContainerID, stdin, stdout, stderr, tty bool) (*url.URL, error)
+ GetPortForward(podName, podNamespace string, podUID types.UID, ports []int32) (*url.URL, error)
+}
+
+type ImageService interface {
+ // PullImage pulls an image from the network to local storage using the supplied
+ // secrets if necessary. It returns a reference (digest or ID) to the pulled image.
+ PullImage(image ImageSpec, pullSecrets []v1.Secret) (string, error)
+ // GetImageRef gets the reference (digest or ID) of the image which has already been in
+ // the local storage. It returns ("", nil) if the image isn't in the local storage.
+ GetImageRef(image ImageSpec) (string, error)
+ // Gets all images currently on the machine.
+ ListImages() ([]Image, error)
+ // Removes the specified image.
+ RemoveImage(image ImageSpec) error
+ // Returns Image statistics.
+ ImageStats() (*ImageStats, error)
+}
+
+type ContainerAttacher interface {
+ AttachContainer(id ContainerID, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) (err error)
+}
+
+type ContainerCommandRunner interface {
+ // RunInContainer synchronously executes the command in the container, and returns the output.
+ // If the command completes with a non-0 exit code, a pkg/util/exec.ExitError will be returned.
+ RunInContainer(id ContainerID, cmd []string, timeout time.Duration) ([]byte, error)
+}
+
+// Pod is a group of containers.
+type Pod struct {
+ // The ID of the pod, which can be used to retrieve a particular pod
+ // from the pod list returned by GetPods().
+ ID types.UID
+ // The name and namespace of the pod, which is readable by human.
+ Name string
+ Namespace string
+ // List of containers that belongs to this pod. It may contain only
+ // running containers, or mixed with dead ones (when GetPods(true)).
+ Containers []*Container
+ // List of sandboxes associated with this pod. The sandboxes are converted
+ // to Container temporariliy to avoid substantial changes to other
+ // components. This is only populated by kuberuntime.
+ // TODO: use the runtimeApi.PodSandbox type directly.
+ Sandboxes []*Container
+}
+
+// PodPair contains both runtime#Pod and api#Pod
+type PodPair struct {
+ // APIPod is the v1.Pod
+ APIPod *v1.Pod
+ // RunningPod is the pod defined in pkg/kubelet/container/runtime#Pod
+ RunningPod *Pod
+}
+
+// ContainerID is a type that identifies a container.
+type ContainerID struct {
+ // The type of the container runtime. e.g. 'docker', 'rkt'.
+ Type string
+ // The identification of the container, this is comsumable by
+ // the underlying container runtime. (Note that the container
+ // runtime interface still takes the whole struct as input).
+ ID string
+}
+
+func BuildContainerID(typ, ID string) ContainerID {
+ return ContainerID{Type: typ, ID: ID}
+}
+
+// Convenience method for creating a ContainerID from an ID string.
+func ParseContainerID(containerID string) ContainerID {
+ var id ContainerID
+ if err := id.ParseString(containerID); err != nil {
+ glog.Error(err)
+ }
+ return id
+}
+
+func (c *ContainerID) ParseString(data string) error {
+ // Trim the quotes and split the type and ID.
+ parts := strings.Split(strings.Trim(data, "\""), "://")
+ if len(parts) != 2 {
+ return fmt.Errorf("invalid container ID: %q", data)
+ }
+ c.Type, c.ID = parts[0], parts[1]
+ return nil
+}
+
+func (c *ContainerID) String() string {
+ return fmt.Sprintf("%s://%s", c.Type, c.ID)
+}
+
+func (c *ContainerID) IsEmpty() bool {
+ return *c == ContainerID{}
+}
+
+func (c *ContainerID) MarshalJSON() ([]byte, error) {
+ return []byte(fmt.Sprintf("%q", c.String())), nil
+}
+
+func (c *ContainerID) UnmarshalJSON(data []byte) error {
+ return c.ParseString(string(data))
+}
+
+// DockerID is an ID of docker container. It is a type to make it clear when we're working with docker container Ids
+type DockerID string
+
+func (id DockerID) ContainerID() ContainerID {
+ return ContainerID{
+ Type: "docker",
+ ID: string(id),
+ }
+}
+
+type ContainerState string
+
+const (
+ ContainerStateCreated ContainerState = "created"
+ ContainerStateRunning ContainerState = "running"
+ ContainerStateExited ContainerState = "exited"
+ // This unknown encompasses all the states that we currently don't care.
+ ContainerStateUnknown ContainerState = "unknown"
+)
+
+// Container provides the runtime information for a container, such as ID, hash,
+// state of the container.
+type Container struct {
+ // The ID of the container, used by the container runtime to identify
+ // a container.
+ ID ContainerID
+ // The name of the container, which should be the same as specified by
+ // v1.Container.
+ Name string
+ // The image name of the container, this also includes the tag of the image,
+ // the expected form is "NAME:TAG".
+ Image string
+ // The id of the image used by the container.
+ ImageID string
+ // Hash of the container, used for comparison. Optional for containers
+ // not managed by kubelet.
+ Hash uint64
+ // State is the state of the container.
+ State ContainerState
+}
+
+// PodStatus represents the status of the pod and its containers.
+// v1.PodStatus can be derived from examining PodStatus and v1.Pod.
+type PodStatus struct {
+ // ID of the pod.
+ ID types.UID
+ // Name of the pod.
+ Name string
+ // Namspace of the pod.
+ Namespace string
+ // IP of the pod.
+ IP string
+ // Status of containers in the pod.
+ ContainerStatuses []*ContainerStatus
+ // Status of the pod sandbox.
+ // Only for kuberuntime now, other runtime may keep it nil.
+ SandboxStatuses []*runtimeapi.PodSandboxStatus
+}
+
+// ContainerStatus represents the status of a container.
+type ContainerStatus struct {
+ // ID of the container.
+ ID ContainerID
+ // Name of the container.
+ Name string
+ // Status of the container.
+ State ContainerState
+ // Creation time of the container.
+ CreatedAt time.Time
+ // Start time of the container.
+ StartedAt time.Time
+ // Finish time of the container.
+ FinishedAt time.Time
+ // Exit code of the container.
+ ExitCode int
+ // Name of the image, this also includes the tag of the image,
+ // the expected form is "NAME:TAG".
+ Image string
+ // ID of the image.
+ ImageID string
+ // Hash of the container, used for comparison.
+ Hash uint64
+ // Number of times that the container has been restarted.
+ RestartCount int
+ // A string explains why container is in such a status.
+ Reason string
+ // Message written by the container before exiting (stored in
+ // TerminationMessagePath).
+ Message string
+}
+
+// FindContainerStatusByName returns container status in the pod status with the given name.
+// When there are multiple containers' statuses with the same name, the first match will be returned.
+func (podStatus *PodStatus) FindContainerStatusByName(containerName string) *ContainerStatus {
+ for _, containerStatus := range podStatus.ContainerStatuses {
+ if containerStatus.Name == containerName {
+ return containerStatus
+ }
+ }
+ return nil
+}
+
+// Get container status of all the running containers in a pod
+func (podStatus *PodStatus) GetRunningContainerStatuses() []*ContainerStatus {
+ runningContainerStatuses := []*ContainerStatus{}
+ for _, containerStatus := range podStatus.ContainerStatuses {
+ if containerStatus.State == ContainerStateRunning {
+ runningContainerStatuses = append(runningContainerStatuses, containerStatus)
+ }
+ }
+ return runningContainerStatuses
+}
+
+// Basic information about a container image.
+type Image struct {
+ // ID of the image.
+ ID string
+ // Other names by which this image is known.
+ RepoTags []string
+ // Digests by which this image is known.
+ RepoDigests []string
+ // The size of the image in bytes.
+ Size int64
+}
+
+type EnvVar struct {
+ Name string
+ Value string
+}
+
+type Mount struct {
+ // Name of the volume mount.
+ // TODO(yifan): Remove this field, as this is not representing the unique name of the mount,
+ // but the volume name only.
+ Name string
+ // Path of the mount within the container.
+ ContainerPath string
+ // Path of the mount on the host.
+ HostPath string
+ // Whether the mount is read-only.
+ ReadOnly bool
+ // Whether the mount needs SELinux relabeling
+ SELinuxRelabel bool
+}
+
+type PortMapping struct {
+ // Name of the port mapping
+ Name string
+ // Protocol of the port mapping.
+ Protocol v1.Protocol
+ // The port number within the container.
+ ContainerPort int
+ // The port number on the host.
+ HostPort int
+ // The host IP.
+ HostIP string
+}
+
+type DeviceInfo struct {
+ // Path on host for mapping
+ PathOnHost string
+ // Path in Container to map
+ PathInContainer string
+ // Cgroup permissions
+ Permissions string
+}
+
+// RunContainerOptions specify the options which are necessary for running containers
+type RunContainerOptions struct {
+ // The environment variables list.
+ Envs []EnvVar
+ // The mounts for the containers.
+ Mounts []Mount
+ // The host devices mapped into the containers.
+ Devices []DeviceInfo
+ // The port mappings for the containers.
+ PortMappings []PortMapping
+ // If the container has specified the TerminationMessagePath, then
+ // this directory will be used to create and mount the log file to
+ // container.TerminationMessagePath
+ PodContainerDir string
+ // The list of DNS servers for the container to use.
+ DNS []string
+ // The list of DNS search domains.
+ DNSSearch []string
+ // The parent cgroup to pass to Docker
+ CgroupParent string
+ // The type of container rootfs
+ ReadOnly bool
+ // hostname for pod containers
+ Hostname string
+ // EnableHostUserNamespace sets userns=host when users request host namespaces (pid, ipc, net),
+ // are using non-namespaced capabilities (mknod, sys_time, sys_module), the pod contains a privileged container,
+ // or using host path volumes.
+ // This should only be enabled when the container runtime is performing user remapping AND if the
+ // experimental behavior is desired.
+ EnableHostUserNamespace bool
+}
+
+// VolumeInfo contains information about the volume.
+type VolumeInfo struct {
+ // Mounter is the volume's mounter
+ Mounter volume.Mounter
+ // SELinuxLabeled indicates whether this volume has had the
+ // pod's SELinux label applied to it or not
+ SELinuxLabeled bool
+}
+
+type VolumeMap map[string]VolumeInfo
+
+// RuntimeConditionType is the types of required runtime conditions.
+type RuntimeConditionType string
+
+const (
+ // RuntimeReady means the runtime is up and ready to accept basic containers.
+ RuntimeReady RuntimeConditionType = "RuntimeReady"
+ // NetworkReady means the runtime network is up and ready to accept containers which require network.
+ NetworkReady RuntimeConditionType = "NetworkReady"
+)
+
+// RuntimeStatus contains the status of the runtime.
+type RuntimeStatus struct {
+ // Conditions is an array of current observed runtime conditions.
+ Conditions []RuntimeCondition
+}
+
+// GetRuntimeCondition gets a specified runtime condition from the runtime status.
+func (r *RuntimeStatus) GetRuntimeCondition(t RuntimeConditionType) *RuntimeCondition {
+ for i := range r.Conditions {
+ c := &r.Conditions[i]
+ if c.Type == t {
+ return c
+ }
+ }
+ return nil
+}
+
+// String formats the runtime status into human readable string.
+func (s *RuntimeStatus) String() string {
+ var ss []string
+ for _, c := range s.Conditions {
+ ss = append(ss, c.String())
+ }
+ return fmt.Sprintf("Runtime Conditions: %s", strings.Join(ss, ", "))
+}
+
+// RuntimeCondition contains condition information for the runtime.
+type RuntimeCondition struct {
+ // Type of runtime condition.
+ Type RuntimeConditionType
+ // Status of the condition, one of true/false.
+ Status bool
+ // Reason is brief reason for the condition's last transition.
+ Reason string
+ // Message is human readable message indicating details about last transition.
+ Message string
+}
+
+// String formats the runtime condition into human readable string.
+func (c *RuntimeCondition) String() string {
+ return fmt.Sprintf("%s=%t reason:%s message:%s", c.Type, c.Status, c.Reason, c.Message)
+}
+
+type Pods []*Pod
+
+// FindPodByID finds and returns a pod in the pod list by UID. It will return an empty pod
+// if not found.
+func (p Pods) FindPodByID(podUID types.UID) Pod {
+ for i := range p {
+ if p[i].ID == podUID {
+ return *p[i]
+ }
+ }
+ return Pod{}
+}
+
+// FindPodByFullName finds and returns a pod in the pod list by the full name.
+// It will return an empty pod if not found.
+func (p Pods) FindPodByFullName(podFullName string) Pod {
+ for i := range p {
+ if BuildPodFullName(p[i].Name, p[i].Namespace) == podFullName {
+ return *p[i]
+ }
+ }
+ return Pod{}
+}
+
+// FindPod combines FindPodByID and FindPodByFullName, it finds and returns a pod in the
+// pod list either by the full name or the pod ID. It will return an empty pod
+// if not found.
+func (p Pods) FindPod(podFullName string, podUID types.UID) Pod {
+ if len(podFullName) > 0 {
+ return p.FindPodByFullName(podFullName)
+ }
+ return p.FindPodByID(podUID)
+}
+
+// FindContainerByName returns a container in the pod with the given name.
+// When there are multiple containers with the same name, the first match will
+// be returned.
+func (p *Pod) FindContainerByName(containerName string) *Container {
+ for _, c := range p.Containers {
+ if c.Name == containerName {
+ return c
+ }
+ }
+ return nil
+}
+
+func (p *Pod) FindContainerByID(id ContainerID) *Container {
+ for _, c := range p.Containers {
+ if c.ID == id {
+ return c
+ }
+ }
+ return nil
+}
+
+func (p *Pod) FindSandboxByID(id ContainerID) *Container {
+ for _, c := range p.Sandboxes {
+ if c.ID == id {
+ return c
+ }
+ }
+ return nil
+}
+
+// ToAPIPod converts Pod to v1.Pod. Note that if a field in v1.Pod has no
+// corresponding field in Pod, the field would not be populated.
+func (p *Pod) ToAPIPod() *v1.Pod {
+ var pod v1.Pod
+ pod.UID = p.ID
+ pod.Name = p.Name
+ pod.Namespace = p.Namespace
+
+ for _, c := range p.Containers {
+ var container v1.Container
+ container.Name = c.Name
+ container.Image = c.Image
+ pod.Spec.Containers = append(pod.Spec.Containers, container)
+ }
+ return &pod
+}
+
+// IsEmpty returns true if the pod is empty.
+func (p *Pod) IsEmpty() bool {
+ return reflect.DeepEqual(p, &Pod{})
+}
+
+// GetPodFullName returns a name that uniquely identifies a pod.
+func GetPodFullName(pod *v1.Pod) string {
+ // Use underscore as the delimiter because it is not allowed in pod name
+ // (DNS subdomain format), while allowed in the container name format.
+ return pod.Name + "_" + pod.Namespace
+}
+
+// Build the pod full name from pod name and namespace.
+func BuildPodFullName(name, namespace string) string {
+ return name + "_" + namespace
+}
+
+// Parse the pod full name.
+func ParsePodFullName(podFullName string) (string, string, error) {
+ parts := strings.Split(podFullName, "_")
+ if len(parts) != 2 || parts[0] == "" || parts[1] == "" {
+ return "", "", fmt.Errorf("failed to parse the pod full name %q", podFullName)
+ }
+ return parts[0], parts[1], nil
+}
+
+// Option is a functional option type for Runtime, useful for
+// completely optional settings.
+type Option func(Runtime)
+
+// Sort the container statuses by creation time.
+type SortContainerStatusesByCreationTime []*ContainerStatus
+
+func (s SortContainerStatusesByCreationTime) Len() int { return len(s) }
+func (s SortContainerStatusesByCreationTime) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
+func (s SortContainerStatusesByCreationTime) Less(i, j int) bool {
+ return s[i].CreatedAt.Before(s[j].CreatedAt)
+}
+
+const (
+ // MaxPodTerminationMessageLogLength is the maximum bytes any one pod may have written
+ // as termination message output across all containers. Containers will be evenly truncated
+ // until output is below this limit.
+ MaxPodTerminationMessageLogLength = 1024 * 12
+ // MaxContainerTerminationMessageLength is the upper bound any one container may write to
+ // its termination message path. Contents above this length will be truncated.
+ MaxContainerTerminationMessageLength = 1024 * 4
+ // MaxContainerTerminationMessageLogLength is the maximum bytes any one container will
+ // have written to its termination message when the message is read from the logs.
+ MaxContainerTerminationMessageLogLength = 1024 * 2
+ // MaxContainerTerminationMessageLogLines is the maximum number of previous lines of
+ // log output that the termination message can contain.
+ MaxContainerTerminationMessageLogLines = 80
+)
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime_cache.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime_cache.go
new file mode 100644
index 000000000..d15852f88
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime_cache.go
@@ -0,0 +1,96 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package container
+
+import (
+ "sync"
+ "time"
+)
+
+var (
+ // TODO(yifan): Maybe set the them as parameters for NewCache().
+ defaultCachePeriod = time.Second * 2
+)
+
+type RuntimeCache interface {
+ GetPods() ([]*Pod, error)
+ ForceUpdateIfOlder(time.Time) error
+}
+
+type podsGetter interface {
+ GetPods(bool) ([]*Pod, error)
+}
+
+// NewRuntimeCache creates a container runtime cache.
+func NewRuntimeCache(getter podsGetter) (RuntimeCache, error) {
+ return &runtimeCache{
+ getter: getter,
+ }, nil
+}
+
+// runtimeCache caches a list of pods. It records a timestamp (cacheTime) right
+// before updating the pods, so the timestamp is at most as new as the pods
+// (and can be slightly older). The timestamp always moves forward. Callers are
+// expected not to modify the pods returned from GetPods.
+type runtimeCache struct {
+ sync.Mutex
+ // The underlying container runtime used to update the cache.
+ getter podsGetter
+ // Last time when cache was updated.
+ cacheTime time.Time
+ // The content of the cache.
+ pods []*Pod
+}
+
+// GetPods returns the cached pods if they are not outdated; otherwise, it
+// retrieves the latest pods and return them.
+func (r *runtimeCache) GetPods() ([]*Pod, error) {
+ r.Lock()
+ defer r.Unlock()
+ if time.Since(r.cacheTime) > defaultCachePeriod {
+ if err := r.updateCache(); err != nil {
+ return nil, err
+ }
+ }
+ return r.pods, nil
+}
+
+func (r *runtimeCache) ForceUpdateIfOlder(minExpectedCacheTime time.Time) error {
+ r.Lock()
+ defer r.Unlock()
+ if r.cacheTime.Before(minExpectedCacheTime) {
+ return r.updateCache()
+ }
+ return nil
+}
+
+func (r *runtimeCache) updateCache() error {
+ pods, timestamp, err := r.getPodsWithTimestamp()
+ if err != nil {
+ return err
+ }
+ r.pods, r.cacheTime = pods, timestamp
+ return nil
+}
+
+// getPodsWithTimestamp records a timestamp and retrieves pods from the getter.
+func (r *runtimeCache) getPodsWithTimestamp() ([]*Pod, time.Time, error) {
+ // Always record the timestamp before getting the pods to avoid stale pods.
+ timestamp := time.Now()
+ pods, err := r.getter.GetPods(false)
+ return pods, timestamp, err
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime_cache_fake.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime_cache_fake.go
new file mode 100644
index 000000000..59a6288d5
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime_cache_fake.go
@@ -0,0 +1,45 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package container
+
+// TestRunTimeCache embeds runtimeCache with some additional methods for testing.
+// It must be declared in the container package to have visibility to runtimeCache.
+// It cannot be in a "..._test.go" file in order for runtime_cache_test.go to have cross-package visibility to it.
+// (cross-package declarations in test files cannot be used from dot imports if this package is vendored)
+type TestRuntimeCache struct {
+ runtimeCache
+}
+
+func (r *TestRuntimeCache) UpdateCacheWithLock() error {
+ r.Lock()
+ defer r.Unlock()
+ return r.updateCache()
+}
+
+func (r *TestRuntimeCache) GetCachedPods() []*Pod {
+ r.Lock()
+ defer r.Unlock()
+ return r.pods
+}
+
+func NewTestRuntimeCache(getter podsGetter) *TestRuntimeCache {
+ return &TestRuntimeCache{
+ runtimeCache: runtimeCache{
+ getter: getter,
+ },
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/sync_result.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/sync_result.go
new file mode 100644
index 000000000..0d4563303
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/sync_result.go
@@ -0,0 +1,128 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package container
+
+import (
+ "errors"
+ "fmt"
+
+ utilerrors "k8s.io/apimachinery/pkg/util/errors"
+)
+
+// TODO(random-liu): We need to better organize runtime errors for introspection.
+
+// Container Terminated and Kubelet is backing off the restart
+var ErrCrashLoopBackOff = errors.New("CrashLoopBackOff")
+
+var (
+ // ErrContainerNotFound returned when a container in the given pod with the
+ // given container name was not found, amongst those managed by the kubelet.
+ ErrContainerNotFound = errors.New("no matching container")
+)
+
+var (
+ ErrRunContainer = errors.New("RunContainerError")
+ ErrKillContainer = errors.New("KillContainerError")
+ ErrVerifyNonRoot = errors.New("VerifyNonRootError")
+ ErrRunInitContainer = errors.New("RunInitContainerError")
+ ErrCreatePodSandbox = errors.New("CreatePodSandboxError")
+ ErrConfigPodSandbox = errors.New("ConfigPodSandboxError")
+ ErrKillPodSandbox = errors.New("KillPodSandboxError")
+)
+
+var (
+ ErrSetupNetwork = errors.New("SetupNetworkError")
+ ErrTeardownNetwork = errors.New("TeardownNetworkError")
+)
+
+// SyncAction indicates different kind of actions in SyncPod() and KillPod(). Now there are only actions
+// about start/kill container and setup/teardown network.
+type SyncAction string
+
+const (
+ StartContainer SyncAction = "StartContainer"
+ KillContainer SyncAction = "KillContainer"
+ SetupNetwork SyncAction = "SetupNetwork"
+ TeardownNetwork SyncAction = "TeardownNetwork"
+ InitContainer SyncAction = "InitContainer"
+ CreatePodSandbox SyncAction = "CreatePodSandbox"
+ ConfigPodSandbox SyncAction = "ConfigPodSandbox"
+ KillPodSandbox SyncAction = "KillPodSandbox"
+)
+
+// SyncResult is the result of sync action.
+type SyncResult struct {
+ // The associated action of the result
+ Action SyncAction
+ // The target of the action, now the target can only be:
+ // * Container: Target should be container name
+ // * Network: Target is useless now, we just set it as pod full name now
+ Target interface{}
+ // Brief error reason
+ Error error
+ // Human readable error reason
+ Message string
+}
+
+// NewSyncResult generates new SyncResult with specific Action and Target
+func NewSyncResult(action SyncAction, target interface{}) *SyncResult {
+ return &SyncResult{Action: action, Target: target}
+}
+
+// Fail fails the SyncResult with specific error and message
+func (r *SyncResult) Fail(err error, msg string) {
+ r.Error, r.Message = err, msg
+}
+
+// PodSyncResult is the summary result of SyncPod() and KillPod()
+type PodSyncResult struct {
+ // Result of different sync actions
+ SyncResults []*SyncResult
+ // Error encountered in SyncPod() and KillPod() that is not already included in SyncResults
+ SyncError error
+}
+
+// AddSyncResult adds multiple SyncResult to current PodSyncResult
+func (p *PodSyncResult) AddSyncResult(result ...*SyncResult) {
+ p.SyncResults = append(p.SyncResults, result...)
+}
+
+// AddPodSyncResult merges a PodSyncResult to current one
+func (p *PodSyncResult) AddPodSyncResult(result PodSyncResult) {
+ p.AddSyncResult(result.SyncResults...)
+ p.SyncError = result.SyncError
+}
+
+// Fail fails the PodSyncResult with an error occurred in SyncPod() and KillPod() itself
+func (p *PodSyncResult) Fail(err error) {
+ p.SyncError = err
+}
+
+// Error returns an error summarizing all the errors in PodSyncResult
+func (p *PodSyncResult) Error() error {
+ errlist := []error{}
+ if p.SyncError != nil {
+ errlist = append(errlist, fmt.Errorf("failed to SyncPod: %v\n", p.SyncError))
+ }
+ for _, result := range p.SyncResults {
+ if result.Error != nil {
+ errlist = append(errlist, fmt.Errorf("failed to %q for %q with %v: %q\n", result.Action, result.Target,
+ result.Error, result.Message))
+ }
+ }
+ return utilerrors.NewAggregate(errlist)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/events/event.go b/vendor/k8s.io/kubernetes/pkg/kubelet/events/event.go
new file mode 100644
index 000000000..0a0efc20c
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/events/event.go
@@ -0,0 +1,104 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package events
+
+import (
+ clientv1 "k8s.io/client-go/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/api/v1"
+)
+
+const (
+ // Container event reason list
+ CreatedContainer = "Created"
+ StartedContainer = "Started"
+ FailedToCreateContainer = "Failed"
+ FailedToStartContainer = "Failed"
+ KillingContainer = "Killing"
+ PreemptContainer = "Preempting"
+ BackOffStartContainer = "BackOff"
+ ExceededGracePeriod = "ExceededGracePeriod"
+
+ // Image event reason list
+ PullingImage = "Pulling"
+ PulledImage = "Pulled"
+ FailedToPullImage = "Failed"
+ FailedToInspectImage = "InspectFailed"
+ ErrImageNeverPullPolicy = "ErrImageNeverPull"
+ BackOffPullImage = "BackOff"
+
+ // kubelet event reason list
+ NodeReady = "NodeReady"
+ NodeNotReady = "NodeNotReady"
+ NodeSchedulable = "NodeSchedulable"
+ NodeNotSchedulable = "NodeNotSchedulable"
+ StartingKubelet = "Starting"
+ KubeletSetupFailed = "KubeletSetupFailed"
+ FailedAttachVolume = "FailedAttachVolume"
+ FailedDetachVolume = "FailedDetachVolume"
+ FailedMountVolume = "FailedMount"
+ FailedUnMountVolume = "FailedUnMount"
+ SuccessfulDetachVolume = "SuccessfulDetachVolume"
+ SuccessfulMountVolume = "SuccessfulMountVolume"
+ SuccessfulUnMountVolume = "SuccessfulUnMountVolume"
+ HostPortConflict = "HostPortConflict"
+ NodeSelectorMismatching = "NodeSelectorMismatching"
+ InsufficientFreeCPU = "InsufficientFreeCPU"
+ InsufficientFreeMemory = "InsufficientFreeMemory"
+ OutOfDisk = "OutOfDisk"
+ HostNetworkNotSupported = "HostNetworkNotSupported"
+ UndefinedShaper = "NilShaper"
+ NodeRebooted = "Rebooted"
+ ContainerGCFailed = "ContainerGCFailed"
+ ImageGCFailed = "ImageGCFailed"
+ FailedNodeAllocatableEnforcement = "FailedNodeAllocatableEnforcement"
+ SuccessfulNodeAllocatableEnforcement = "NodeAllocatableEnforced"
+ UnsupportedMountOption = "UnsupportedMountOption"
+
+ // Image manager event reason list
+ InvalidDiskCapacity = "InvalidDiskCapacity"
+ FreeDiskSpaceFailed = "FreeDiskSpaceFailed"
+
+ // Probe event reason list
+ ContainerUnhealthy = "Unhealthy"
+
+ // Pod worker event reason list
+ FailedSync = "FailedSync"
+
+ // Config event reason list
+ FailedValidation = "FailedValidation"
+
+ // Lifecycle hooks
+ FailedPostStartHook = "FailedPostStartHook"
+ FailedPreStopHook = "FailedPreStopHook"
+ UnfinishedPreStopHook = "UnfinishedPreStopHook"
+)
+
+// ToObjectReference takes an old style object reference and converts it to a client-go one
+func ToObjectReference(ref *v1.ObjectReference) *clientv1.ObjectReference {
+ if ref == nil {
+ return nil
+ }
+ return &clientv1.ObjectReference{
+ Kind: ref.Kind,
+ Namespace: ref.Namespace,
+ Name: ref.Name,
+ UID: ref.UID,
+ APIVersion: ref.APIVersion,
+ ResourceVersion: ref.ResourceVersion,
+ FieldPath: ref.FieldPath,
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/leaky/leaky.go b/vendor/k8s.io/kubernetes/pkg/kubelet/leaky/leaky.go
new file mode 100644
index 000000000..4e3e1e1f2
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/leaky/leaky.go
@@ -0,0 +1,25 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package leaky holds bits of kubelet that should be internal but have leaked
+// out through bad abstractions. TODO: delete all of this.
+package leaky
+
+const (
+ // This is used in a few places outside of Kubelet, such as indexing
+ // into the container info.
+ PodInfraContainerName = "POD"
+)
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/network/hostport/fake_iptables.go b/vendor/k8s.io/kubernetes/pkg/kubelet/network/hostport/fake_iptables.go
new file mode 100644
index 000000000..42f7c6811
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/network/hostport/fake_iptables.go
@@ -0,0 +1,331 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package hostport
+
+import (
+ "bytes"
+ "fmt"
+ "net"
+ "strings"
+
+ utiliptables "k8s.io/kubernetes/pkg/util/iptables"
+)
+
+type fakeChain struct {
+ name utiliptables.Chain
+ rules []string
+}
+
+type fakeTable struct {
+ name utiliptables.Table
+ chains map[string]*fakeChain
+}
+
+type fakeIPTables struct {
+ tables map[string]*fakeTable
+}
+
+func NewFakeIPTables() *fakeIPTables {
+ return &fakeIPTables{
+ tables: make(map[string]*fakeTable, 0),
+ }
+}
+
+func (f *fakeIPTables) GetVersion() (string, error) {
+ return "1.4.21", nil
+}
+
+func (f *fakeIPTables) getTable(tableName utiliptables.Table) (*fakeTable, error) {
+ table, ok := f.tables[string(tableName)]
+ if !ok {
+ return nil, fmt.Errorf("Table %s does not exist", tableName)
+ }
+ return table, nil
+}
+
+func (f *fakeIPTables) getChain(tableName utiliptables.Table, chainName utiliptables.Chain) (*fakeTable, *fakeChain, error) {
+ table, err := f.getTable(tableName)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ chain, ok := table.chains[string(chainName)]
+ if !ok {
+ return table, nil, fmt.Errorf("Chain %s/%s does not exist", tableName, chainName)
+ }
+
+ return table, chain, nil
+}
+
+func (f *fakeIPTables) ensureChain(tableName utiliptables.Table, chainName utiliptables.Chain) (bool, *fakeChain) {
+ table, chain, err := f.getChain(tableName, chainName)
+ if err != nil {
+ // either table or table+chain don't exist yet
+ if table == nil {
+ table = &fakeTable{
+ name: tableName,
+ chains: make(map[string]*fakeChain),
+ }
+ f.tables[string(tableName)] = table
+ }
+ chain := &fakeChain{
+ name: chainName,
+ rules: make([]string, 0),
+ }
+ table.chains[string(chainName)] = chain
+ return false, chain
+ }
+ return true, chain
+}
+
+func (f *fakeIPTables) EnsureChain(tableName utiliptables.Table, chainName utiliptables.Chain) (bool, error) {
+ existed, _ := f.ensureChain(tableName, chainName)
+ return existed, nil
+}
+
+func (f *fakeIPTables) FlushChain(tableName utiliptables.Table, chainName utiliptables.Chain) error {
+ _, chain, err := f.getChain(tableName, chainName)
+ if err != nil {
+ return err
+ }
+ chain.rules = make([]string, 0)
+ return nil
+}
+
+func (f *fakeIPTables) DeleteChain(tableName utiliptables.Table, chainName utiliptables.Chain) error {
+ table, _, err := f.getChain(tableName, chainName)
+ if err != nil {
+ return err
+ }
+ delete(table.chains, string(chainName))
+ return nil
+}
+
+// Returns index of rule in array; < 0 if rule is not found
+func findRule(chain *fakeChain, rule string) int {
+ for i, candidate := range chain.rules {
+ if rule == candidate {
+ return i
+ }
+ }
+ return -1
+}
+
+func (f *fakeIPTables) ensureRule(position utiliptables.RulePosition, tableName utiliptables.Table, chainName utiliptables.Chain, rule string) (bool, error) {
+ _, chain, err := f.getChain(tableName, chainName)
+ if err != nil {
+ _, chain = f.ensureChain(tableName, chainName)
+ }
+
+ rule, err = normalizeRule(rule)
+ if err != nil {
+ return false, err
+ }
+ ruleIdx := findRule(chain, rule)
+ if ruleIdx >= 0 {
+ return true, nil
+ }
+
+ if position == utiliptables.Prepend {
+ chain.rules = append([]string{rule}, chain.rules...)
+ } else if position == utiliptables.Append {
+ chain.rules = append(chain.rules, rule)
+ } else {
+ return false, fmt.Errorf("Unknown position argument %q", position)
+ }
+
+ return false, nil
+}
+
+func normalizeRule(rule string) (string, error) {
+ normalized := ""
+ remaining := strings.TrimSpace(rule)
+ for {
+ var end int
+
+ if strings.HasPrefix(remaining, "--to-destination=") {
+ remaining = strings.Replace(remaining, "=", " ", 1)
+ }
+
+ if remaining[0] == '"' {
+ end = strings.Index(remaining[1:], "\"")
+ if end < 0 {
+ return "", fmt.Errorf("Invalid rule syntax: mismatched quotes")
+ }
+ end += 2
+ } else {
+ end = strings.Index(remaining, " ")
+ if end < 0 {
+ end = len(remaining)
+ }
+ }
+ arg := remaining[:end]
+
+ // Normalize un-prefixed IP addresses like iptables does
+ if net.ParseIP(arg) != nil {
+ arg = arg + "/32"
+ }
+
+ if len(normalized) > 0 {
+ normalized += " "
+ }
+ normalized += strings.TrimSpace(arg)
+ if len(remaining) == end {
+ break
+ }
+ remaining = remaining[end+1:]
+ }
+ return normalized, nil
+}
+
+func (f *fakeIPTables) EnsureRule(position utiliptables.RulePosition, tableName utiliptables.Table, chainName utiliptables.Chain, args ...string) (bool, error) {
+ ruleArgs := make([]string, 0)
+ for _, arg := range args {
+ // quote args with internal spaces (like comments)
+ if strings.Index(arg, " ") >= 0 {
+ arg = fmt.Sprintf("\"%s\"", arg)
+ }
+ ruleArgs = append(ruleArgs, arg)
+ }
+ return f.ensureRule(position, tableName, chainName, strings.Join(ruleArgs, " "))
+}
+
+func (f *fakeIPTables) DeleteRule(tableName utiliptables.Table, chainName utiliptables.Chain, args ...string) error {
+ _, chain, err := f.getChain(tableName, chainName)
+ if err == nil {
+ rule := strings.Join(args, " ")
+ ruleIdx := findRule(chain, rule)
+ if ruleIdx < 0 {
+ return nil
+ }
+ chain.rules = append(chain.rules[:ruleIdx], chain.rules[ruleIdx+1:]...)
+ }
+ return nil
+}
+
+func (f *fakeIPTables) IsIpv6() bool {
+ return false
+}
+
+func saveChain(chain *fakeChain, data *bytes.Buffer) {
+ for _, rule := range chain.rules {
+ data.WriteString(fmt.Sprintf("-A %s %s\n", chain.name, rule))
+ }
+}
+
+func (f *fakeIPTables) SaveInto(tableName utiliptables.Table, buffer *bytes.Buffer) error {
+ table, err := f.getTable(tableName)
+ if err != nil {
+ return err
+ }
+
+ buffer.WriteString(fmt.Sprintf("*%s\n", table.name))
+
+ rules := bytes.NewBuffer(nil)
+ for _, chain := range table.chains {
+ buffer.WriteString(fmt.Sprintf(":%s - [0:0]\n", string(chain.name)))
+ saveChain(chain, rules)
+ }
+ buffer.Write(rules.Bytes())
+ buffer.WriteString("COMMIT\n")
+ return nil
+}
+
+func (f *fakeIPTables) restore(restoreTableName utiliptables.Table, data []byte, flush utiliptables.FlushFlag) error {
+ buf := bytes.NewBuffer(data)
+ var tableName utiliptables.Table
+ for {
+ line, err := buf.ReadString('\n')
+ if err != nil {
+ break
+ }
+ if line[0] == '#' {
+ continue
+ }
+
+ line = strings.TrimSuffix(line, "\n")
+ if strings.HasPrefix(line, "*") {
+ tableName = utiliptables.Table(line[1:])
+ }
+ if tableName != "" {
+ if restoreTableName != "" && restoreTableName != tableName {
+ continue
+ }
+ if strings.HasPrefix(line, ":") {
+ chainName := utiliptables.Chain(strings.Split(line[1:], " ")[0])
+ if flush == utiliptables.FlushTables {
+ table, chain, _ := f.getChain(tableName, chainName)
+ if chain != nil {
+ delete(table.chains, string(chainName))
+ }
+ }
+ _, _ = f.ensureChain(tableName, chainName)
+ } else if strings.HasPrefix(line, "-A") {
+ parts := strings.Split(line, " ")
+ if len(parts) < 3 {
+ return fmt.Errorf("Invalid iptables rule '%s'", line)
+ }
+ chainName := utiliptables.Chain(parts[1])
+ rule := strings.TrimPrefix(line, fmt.Sprintf("-A %s ", chainName))
+ _, err := f.ensureRule(utiliptables.Append, tableName, chainName, rule)
+ if err != nil {
+ return err
+ }
+ } else if strings.HasPrefix(line, "-I") {
+ parts := strings.Split(line, " ")
+ if len(parts) < 3 {
+ return fmt.Errorf("Invalid iptables rule '%s'", line)
+ }
+ chainName := utiliptables.Chain(parts[1])
+ rule := strings.TrimPrefix(line, fmt.Sprintf("-I %s ", chainName))
+ _, err := f.ensureRule(utiliptables.Prepend, tableName, chainName, rule)
+ if err != nil {
+ return err
+ }
+ } else if strings.HasPrefix(line, "-X") {
+ parts := strings.Split(line, " ")
+ if len(parts) < 2 {
+ return fmt.Errorf("Invalid iptables rule '%s'", line)
+ }
+ if err := f.DeleteChain(tableName, utiliptables.Chain(parts[1])); err != nil {
+ return err
+ }
+ } else if line == "COMMIT" {
+ if restoreTableName == tableName {
+ return nil
+ }
+ tableName = ""
+ }
+ }
+ }
+
+ return nil
+}
+
+func (f *fakeIPTables) Restore(tableName utiliptables.Table, data []byte, flush utiliptables.FlushFlag, counters utiliptables.RestoreCountersFlag) error {
+ return f.restore(tableName, data, flush)
+}
+
+func (f *fakeIPTables) RestoreAll(data []byte, flush utiliptables.FlushFlag, counters utiliptables.RestoreCountersFlag) error {
+ return f.restore("", data, flush)
+}
+
+func (f *fakeIPTables) AddReloadFunc(reloadFunc func()) {
+}
+
+func (f *fakeIPTables) Destroy() {
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/network/hostport/hostport.go b/vendor/k8s.io/kubernetes/pkg/kubelet/network/hostport/hostport.go
new file mode 100644
index 000000000..c14c750ba
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/network/hostport/hostport.go
@@ -0,0 +1,200 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package hostport
+
+import (
+ "fmt"
+ "net"
+ "strings"
+
+ "github.com/golang/glog"
+
+ "k8s.io/kubernetes/pkg/api/v1"
+ utiliptables "k8s.io/kubernetes/pkg/util/iptables"
+)
+
+const (
+ // the hostport chain
+ kubeHostportsChain utiliptables.Chain = "KUBE-HOSTPORTS"
+ // prefix for hostport chains
+ kubeHostportChainPrefix string = "KUBE-HP-"
+)
+
+// PortMapping represents a network port in a container
+type PortMapping struct {
+ Name string
+ HostPort int32
+ ContainerPort int32
+ Protocol v1.Protocol
+ HostIP string
+}
+
+// PodPortMapping represents a pod's network state and associated container port mappings
+type PodPortMapping struct {
+ Namespace string
+ Name string
+ PortMappings []*PortMapping
+ HostNetwork bool
+ IP net.IP
+}
+
+// ConstructPodPortMapping creates a PodPortMapping from the ports specified in the pod's
+// containers.
+func ConstructPodPortMapping(pod *v1.Pod, podIP net.IP) *PodPortMapping {
+ portMappings := make([]*PortMapping, 0)
+ for _, c := range pod.Spec.Containers {
+ for _, port := range c.Ports {
+ portMappings = append(portMappings, &PortMapping{
+ Name: port.Name,
+ HostPort: port.HostPort,
+ ContainerPort: port.ContainerPort,
+ Protocol: port.Protocol,
+ HostIP: port.HostIP,
+ })
+ }
+ }
+
+ return &PodPortMapping{
+ Namespace: pod.Namespace,
+ Name: pod.Name,
+ PortMappings: portMappings,
+ HostNetwork: pod.Spec.HostNetwork,
+ IP: podIP,
+ }
+}
+
+type hostport struct {
+ port int32
+ protocol string
+}
+
+type hostportOpener func(*hostport) (closeable, error)
+
+type closeable interface {
+ Close() error
+}
+
+func openLocalPort(hp *hostport) (closeable, error) {
+ // For ports on node IPs, open the actual port and hold it, even though we
+ // use iptables to redirect traffic.
+ // This ensures a) that it's safe to use that port and b) that (a) stays
+ // true. The risk is that some process on the node (e.g. sshd or kubelet)
+ // is using a port and we give that same port out to a Service. That would
+ // be bad because iptables would silently claim the traffic but the process
+ // would never know.
+ // NOTE: We should not need to have a real listen()ing socket - bind()
+ // should be enough, but I can't figure out a way to e2e test without
+ // it. Tools like 'ss' and 'netstat' do not show sockets that are
+ // bind()ed but not listen()ed, and at least the default debian netcat
+ // has no way to avoid about 10 seconds of retries.
+ var socket closeable
+ switch hp.protocol {
+ case "tcp":
+ listener, err := net.Listen("tcp", fmt.Sprintf(":%d", hp.port))
+ if err != nil {
+ return nil, err
+ }
+ socket = listener
+ case "udp":
+ addr, err := net.ResolveUDPAddr("udp", fmt.Sprintf(":%d", hp.port))
+ if err != nil {
+ return nil, err
+ }
+ conn, err := net.ListenUDP("udp", addr)
+ if err != nil {
+ return nil, err
+ }
+ socket = conn
+ default:
+ return nil, fmt.Errorf("unknown protocol %q", hp.protocol)
+ }
+ glog.V(3).Infof("Opened local port %s", hp.String())
+ return socket, nil
+}
+
+// openHostports opens all given hostports using the given hostportOpener
+// If encounter any error, clean up and return the error
+// If all ports are opened successfully, return the hostport and socket mapping
+// TODO: move openHostports and closeHostports into a common struct
+func openHostports(portOpener hostportOpener, podPortMapping *PodPortMapping) (map[hostport]closeable, error) {
+ var retErr error
+ ports := make(map[hostport]closeable)
+ for _, pm := range podPortMapping.PortMappings {
+ if pm.HostPort <= 0 {
+ continue
+ }
+ hp := portMappingToHostport(pm)
+ socket, err := portOpener(&hp)
+ if err != nil {
+ retErr = fmt.Errorf("cannot open hostport %d for pod %s: %v", pm.HostPort, getPodFullName(podPortMapping), err)
+ break
+ }
+ ports[hp] = socket
+ }
+
+ // If encounter any error, close all hostports that just got opened.
+ if retErr != nil {
+ for hp, socket := range ports {
+ if err := socket.Close(); err != nil {
+ glog.Errorf("Cannot clean up hostport %d for pod %s: %v", hp.port, getPodFullName(podPortMapping), err)
+ }
+ }
+ return nil, retErr
+ }
+ return ports, nil
+}
+
+// portMappingToHostport creates hostport structure based on input portmapping
+func portMappingToHostport(portMapping *PortMapping) hostport {
+ return hostport{
+ port: portMapping.HostPort,
+ protocol: strings.ToLower(string(portMapping.Protocol)),
+ }
+}
+
+// ensureKubeHostportChains ensures the KUBE-HOSTPORTS chain is setup correctly
+func ensureKubeHostportChains(iptables utiliptables.Interface, natInterfaceName string) error {
+ glog.V(4).Info("Ensuring kubelet hostport chains")
+ // Ensure kubeHostportChain
+ if _, err := iptables.EnsureChain(utiliptables.TableNAT, kubeHostportsChain); err != nil {
+ return fmt.Errorf("Failed to ensure that %s chain %s exists: %v", utiliptables.TableNAT, kubeHostportsChain, err)
+ }
+ tableChainsNeedJumpServices := []struct {
+ table utiliptables.Table
+ chain utiliptables.Chain
+ }{
+ {utiliptables.TableNAT, utiliptables.ChainOutput},
+ {utiliptables.TableNAT, utiliptables.ChainPrerouting},
+ }
+ args := []string{"-m", "comment", "--comment", "kube hostport portals",
+ "-m", "addrtype", "--dst-type", "LOCAL",
+ "-j", string(kubeHostportsChain)}
+ for _, tc := range tableChainsNeedJumpServices {
+ // KUBE-HOSTPORTS chain needs to be appended to the system chains.
+ // This ensures KUBE-SERVICES chain gets processed first.
+ // Since rules in KUBE-HOSTPORTS chain matches broader cases, allow the more specific rules to be processed first.
+ if _, err := iptables.EnsureRule(utiliptables.Append, tc.table, tc.chain, args...); err != nil {
+ return fmt.Errorf("Failed to ensure that %s chain %s jumps to %s: %v", tc.table, tc.chain, kubeHostportsChain, err)
+ }
+ }
+ // Need to SNAT traffic from localhost
+ args = []string{"-m", "comment", "--comment", "SNAT for localhost access to hostports", "-o", natInterfaceName, "-s", "127.0.0.0/8", "-j", "MASQUERADE"}
+ if _, err := iptables.EnsureRule(utiliptables.Append, utiliptables.TableNAT, utiliptables.ChainPostrouting, args...); err != nil {
+ return fmt.Errorf("Failed to ensure that %s chain %s jumps to MASQUERADE: %v", utiliptables.TableNAT, utiliptables.ChainPostrouting, err)
+ }
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/network/hostport/hostport_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/network/hostport/hostport_manager.go
new file mode 100644
index 000000000..1499ff9c6
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/network/hostport/hostport_manager.go
@@ -0,0 +1,329 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package hostport
+
+import (
+ "bytes"
+ "crypto/sha256"
+ "encoding/base32"
+ "fmt"
+ "strings"
+ "sync"
+
+ "github.com/golang/glog"
+ utilerrors "k8s.io/apimachinery/pkg/util/errors"
+ iptablesproxy "k8s.io/kubernetes/pkg/proxy/iptables"
+ utildbus "k8s.io/kubernetes/pkg/util/dbus"
+ utilexec "k8s.io/kubernetes/pkg/util/exec"
+ utiliptables "k8s.io/kubernetes/pkg/util/iptables"
+)
+
+// HostPortManager is an interface for adding and removing hostport for a given pod sandbox.
+type HostPortManager interface {
+ // Add implements port mappings.
+ // id should be a unique identifier for a pod, e.g. podSandboxID.
+ // podPortMapping is the associated port mapping information for the pod.
+ // natInterfaceName is the interface that localhost used to talk to the given pod.
+ Add(id string, podPortMapping *PodPortMapping, natInterfaceName string) error
+ // Remove cleans up matching port mappings
+ // Remove must be able to clean up port mappings without pod IP
+ Remove(id string, podPortMapping *PodPortMapping) error
+}
+
+type hostportManager struct {
+ hostPortMap map[hostport]closeable
+ iptables utiliptables.Interface
+ portOpener hostportOpener
+ mu sync.Mutex
+}
+
+func NewHostportManager() HostPortManager {
+ iptInterface := utiliptables.New(utilexec.New(), utildbus.New(), utiliptables.ProtocolIpv4)
+ return &hostportManager{
+ hostPortMap: make(map[hostport]closeable),
+ iptables: iptInterface,
+ portOpener: openLocalPort,
+ }
+}
+
+func (hm *hostportManager) Add(id string, podPortMapping *PodPortMapping, natInterfaceName string) (err error) {
+ if podPortMapping == nil || podPortMapping.HostNetwork {
+ return nil
+ }
+ podFullName := getPodFullName(podPortMapping)
+
+ // skip if there is no hostport needed
+ hostportMappings := gatherHostportMappings(podPortMapping)
+ if len(hostportMappings) == 0 {
+ return nil
+ }
+
+ if podPortMapping.IP.To4() == nil {
+ return fmt.Errorf("invalid or missing IP of pod %s", podFullName)
+ }
+ podIP := podPortMapping.IP.String()
+
+ if err = ensureKubeHostportChains(hm.iptables, natInterfaceName); err != nil {
+ return err
+ }
+
+ // Ensure atomicity for port opening and iptables operations
+ hm.mu.Lock()
+ defer hm.mu.Unlock()
+
+ // try to open hostports
+ ports, err := openHostports(hm.portOpener, podPortMapping)
+ if err != nil {
+ return err
+ }
+ for hostport, socket := range ports {
+ hm.hostPortMap[hostport] = socket
+ }
+
+ natChains := bytes.NewBuffer(nil)
+ natRules := bytes.NewBuffer(nil)
+ writeLine(natChains, "*nat")
+
+ existingChains, existingRules, err := getExistingHostportIPTablesRules(hm.iptables)
+ if err != nil {
+ // clean up opened host port if encounter any error
+ return utilerrors.NewAggregate([]error{err, hm.closeHostports(hostportMappings)})
+ }
+
+ newChains := []utiliptables.Chain{}
+ for _, pm := range hostportMappings {
+ protocol := strings.ToLower(string(pm.Protocol))
+ chain := getHostportChain(id, pm)
+ newChains = append(newChains, chain)
+
+ // Add new hostport chain
+ writeLine(natChains, utiliptables.MakeChainLine(chain))
+
+ // Prepend the new chain to KUBE-HOSTPORTS
+ // This avoids any leaking iptables rule that takes up the same port
+ writeLine(natRules, "-I", string(kubeHostportsChain),
+ "-m", "comment", "--comment", fmt.Sprintf(`"%s hostport %d"`, podFullName, pm.HostPort),
+ "-m", protocol, "-p", protocol, "--dport", fmt.Sprintf("%d", pm.HostPort),
+ "-j", string(chain),
+ )
+
+ // SNAT if the traffic comes from the pod itself
+ writeLine(natRules, "-A", string(chain),
+ "-m", "comment", "--comment", fmt.Sprintf(`"%s hostport %d"`, podFullName, pm.HostPort),
+ "-s", podIP,
+ "-j", string(iptablesproxy.KubeMarkMasqChain))
+
+ // DNAT to the podIP:containerPort
+ writeLine(natRules, "-A", string(chain),
+ "-m", "comment", "--comment", fmt.Sprintf(`"%s hostport %d"`, podFullName, pm.HostPort),
+ "-m", protocol, "-p", protocol,
+ "-j", "DNAT", fmt.Sprintf("--to-destination=%s:%d", podIP, pm.ContainerPort))
+ }
+
+ // getHostportChain should be able to provide unique hostport chain name using hash
+ // if there is a chain conflict or multiple Adds have been triggered for a single pod,
+ // filtering should be able to avoid further problem
+ filterChains(existingChains, newChains)
+ existingRules = filterRules(existingRules, newChains)
+
+ for _, chain := range existingChains {
+ writeLine(natChains, chain)
+ }
+ for _, rule := range existingRules {
+ writeLine(natRules, rule)
+ }
+ writeLine(natRules, "COMMIT")
+
+ if err = hm.syncIPTables(append(natChains.Bytes(), natRules.Bytes()...)); err != nil {
+ // clean up opened host port if encounter any error
+ return utilerrors.NewAggregate([]error{err, hm.closeHostports(hostportMappings)})
+ }
+ return nil
+}
+
+func (hm *hostportManager) Remove(id string, podPortMapping *PodPortMapping) (err error) {
+ if podPortMapping == nil || podPortMapping.HostNetwork {
+ return nil
+ }
+
+ hostportMappings := gatherHostportMappings(podPortMapping)
+ if len(hostportMappings) <= 0 {
+ return nil
+ }
+
+ // Ensure atomicity for port closing and iptables operations
+ hm.mu.Lock()
+ defer hm.mu.Unlock()
+
+ var existingChains map[utiliptables.Chain]string
+ var existingRules []string
+ existingChains, existingRules, err = getExistingHostportIPTablesRules(hm.iptables)
+ if err != nil {
+ return err
+ }
+
+ // Gather target hostport chains for removal
+ chainsToRemove := []utiliptables.Chain{}
+ for _, pm := range hostportMappings {
+ chainsToRemove = append(chainsToRemove, getHostportChain(id, pm))
+
+ // To preserve backward compatibility for k8s 1.5 or earlier.
+ // Need to remove hostport chains added by hostportSyncer if there is any
+ // TODO: remove this in 1.7
+ chainsToRemove = append(chainsToRemove, hostportChainName(pm, getPodFullName(podPortMapping)))
+ }
+
+ // remove rules that consists of target chains
+ remainingRules := filterRules(existingRules, chainsToRemove)
+
+ // gather target hostport chains that exists in iptables-save result
+ existingChainsToRemove := []utiliptables.Chain{}
+ for _, chain := range chainsToRemove {
+ if _, ok := existingChains[chain]; ok {
+ existingChainsToRemove = append(existingChainsToRemove, chain)
+ }
+ }
+
+ natChains := bytes.NewBuffer(nil)
+ natRules := bytes.NewBuffer(nil)
+ writeLine(natChains, "*nat")
+ for _, chain := range existingChains {
+ writeLine(natChains, chain)
+ }
+ for _, rule := range remainingRules {
+ writeLine(natRules, rule)
+ }
+ for _, chain := range existingChainsToRemove {
+ writeLine(natRules, "-X", string(chain))
+ }
+ writeLine(natRules, "COMMIT")
+
+ if err = hm.syncIPTables(append(natChains.Bytes(), natRules.Bytes()...)); err != nil {
+ return err
+ }
+
+ // clean up opened pod host ports
+ return hm.closeHostports(hostportMappings)
+}
+
+// syncIPTables executes iptables-restore with given lines
+func (hm *hostportManager) syncIPTables(lines []byte) error {
+ glog.V(3).Infof("Restoring iptables rules: %s", lines)
+ err := hm.iptables.RestoreAll(lines, utiliptables.NoFlushTables, utiliptables.RestoreCounters)
+ if err != nil {
+ return fmt.Errorf("Failed to execute iptables-restore: %v", err)
+ }
+ return nil
+}
+
+// closeHostports tries to close all the listed host ports
+// TODO: move closeHostports and openHostports into a common struct
+func (hm *hostportManager) closeHostports(hostportMappings []*PortMapping) error {
+ errList := []error{}
+ for _, pm := range hostportMappings {
+ hp := portMappingToHostport(pm)
+ if socket, ok := hm.hostPortMap[hp]; ok {
+ glog.V(2).Infof("Closing host port %s", hp.String())
+ if err := socket.Close(); err != nil {
+ errList = append(errList, fmt.Errorf("failed to close host port %s: %v", hp.String(), err))
+ continue
+ }
+ delete(hm.hostPortMap, hp)
+ }
+ }
+ return utilerrors.NewAggregate(errList)
+}
+
+// getHostportChain takes id, hostport and protocol for a pod and returns associated iptables chain.
+// This is computed by hashing (sha256) then encoding to base32 and truncating with the prefix
+// "KUBE-HP-". We do this because IPTables Chain Names must be <= 28 chars long, and the longer
+// they are the harder they are to read.
+// WARNING: Please do not change this function. Otherwise, HostportManager may not be able to
+// identify existing iptables chains.
+func getHostportChain(id string, pm *PortMapping) utiliptables.Chain {
+ hash := sha256.Sum256([]byte(id + string(pm.HostPort) + string(pm.Protocol)))
+ encoded := base32.StdEncoding.EncodeToString(hash[:])
+ return utiliptables.Chain(kubeHostportChainPrefix + encoded[:16])
+}
+
+// gatherHostportMappings returns all the PortMappings which has hostport for a pod
+func gatherHostportMappings(podPortMapping *PodPortMapping) []*PortMapping {
+ mappings := []*PortMapping{}
+ for _, pm := range podPortMapping.PortMappings {
+ if pm.HostPort <= 0 {
+ continue
+ }
+ mappings = append(mappings, pm)
+ }
+ return mappings
+}
+
+// getExistingHostportIPTablesRules retrieves raw data from iptables-save, parse it,
+// return all the hostport related chains and rules
+func getExistingHostportIPTablesRules(iptables utiliptables.Interface) (map[utiliptables.Chain]string, []string, error) {
+ iptablesData := bytes.NewBuffer(nil)
+ err := iptables.SaveInto(utiliptables.TableNAT, iptablesData)
+ if err != nil { // if we failed to get any rules
+ return nil, nil, fmt.Errorf("failed to execute iptables-save: %v", err)
+ }
+ existingNATChains := utiliptables.GetChainLines(utiliptables.TableNAT, iptablesData.Bytes())
+
+ existingHostportChains := make(map[utiliptables.Chain]string)
+ existingHostportRules := []string{}
+
+ for chain := range existingNATChains {
+ if strings.HasPrefix(string(chain), string(kubeHostportsChain)) || strings.HasPrefix(string(chain), kubeHostportChainPrefix) {
+ existingHostportChains[chain] = existingNATChains[chain]
+ }
+ }
+
+ for _, line := range strings.Split(string(iptablesData.Bytes()), "\n") {
+ if strings.HasPrefix(line, fmt.Sprintf("-A %s", kubeHostportChainPrefix)) ||
+ strings.HasPrefix(line, fmt.Sprintf("-A %s", string(kubeHostportsChain))) {
+ existingHostportRules = append(existingHostportRules, line)
+ }
+ }
+ return existingHostportChains, existingHostportRules, nil
+}
+
+// filterRules filters input rules with input chains. Rules that did not involve any filter chain will be returned.
+// The order of the input rules is important and is preserved.
+func filterRules(rules []string, filters []utiliptables.Chain) []string {
+ filtered := []string{}
+ for _, rule := range rules {
+ skip := false
+ for _, filter := range filters {
+ if strings.Contains(rule, string(filter)) {
+ skip = true
+ break
+ }
+ }
+ if !skip {
+ filtered = append(filtered, rule)
+ }
+ }
+ return filtered
+}
+
+// filterChains deletes all entries of filter chains from chain map
+func filterChains(chains map[utiliptables.Chain]string, filterChains []utiliptables.Chain) {
+ for _, chain := range filterChains {
+ if _, ok := chains[chain]; ok {
+ delete(chains, chain)
+ }
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/network/hostport/hostport_syncer.go b/vendor/k8s.io/kubernetes/pkg/kubelet/network/hostport/hostport_syncer.go
new file mode 100644
index 000000000..d1c577dbd
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/network/hostport/hostport_syncer.go
@@ -0,0 +1,306 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package hostport
+
+import (
+ "bytes"
+ "crypto/sha256"
+ "encoding/base32"
+ "fmt"
+ "strings"
+ "time"
+
+ "github.com/golang/glog"
+
+ iptablesproxy "k8s.io/kubernetes/pkg/proxy/iptables"
+ utildbus "k8s.io/kubernetes/pkg/util/dbus"
+ utilexec "k8s.io/kubernetes/pkg/util/exec"
+ utiliptables "k8s.io/kubernetes/pkg/util/iptables"
+)
+
+// HostportSyncer takes a list of PodPortMappings and implements hostport all at once
+type HostportSyncer interface {
+ // SyncHostports gathers all hostports on node and setup iptables rules to enable them.
+ // On each invocation existing ports are synced and stale rules are deleted.
+ SyncHostports(natInterfaceName string, activePodPortMappings []*PodPortMapping) error
+ // OpenPodHostportsAndSync opens hostports for a new PodPortMapping, gathers all hostports on
+ // node, sets up iptables rules enable them. On each invocation existing ports are synced and stale rules are deleted.
+ // 'newPortMapping' must also be present in 'activePodPortMappings'.
+ OpenPodHostportsAndSync(newPortMapping *PodPortMapping, natInterfaceName string, activePodPortMappings []*PodPortMapping) error
+}
+
+type hostportSyncer struct {
+ hostPortMap map[hostport]closeable
+ iptables utiliptables.Interface
+ portOpener hostportOpener
+}
+
+func NewHostportSyncer() HostportSyncer {
+ iptInterface := utiliptables.New(utilexec.New(), utildbus.New(), utiliptables.ProtocolIpv4)
+ return &hostportSyncer{
+ hostPortMap: make(map[hostport]closeable),
+ iptables: iptInterface,
+ portOpener: openLocalPort,
+ }
+}
+
+type targetPod struct {
+ podFullName string
+ podIP string
+}
+
+func (hp *hostport) String() string {
+ return fmt.Sprintf("%s:%d", hp.protocol, hp.port)
+}
+
+//openPodHostports opens all hostport for pod and returns the map of hostport and socket
+func (h *hostportSyncer) openHostports(podHostportMapping *PodPortMapping) error {
+ var retErr error
+ ports := make(map[hostport]closeable)
+ for _, port := range podHostportMapping.PortMappings {
+ if port.HostPort <= 0 {
+ // Assume hostport is not specified in this portmapping. So skip
+ continue
+ }
+ hp := hostport{
+ port: port.HostPort,
+ protocol: strings.ToLower(string(port.Protocol)),
+ }
+ socket, err := h.portOpener(&hp)
+ if err != nil {
+ retErr = fmt.Errorf("cannot open hostport %d for pod %s: %v", port.HostPort, getPodFullName(podHostportMapping), err)
+ break
+ }
+ ports[hp] = socket
+ }
+
+ // If encounter any error, close all hostports that just got opened.
+ if retErr != nil {
+ for hp, socket := range ports {
+ if err := socket.Close(); err != nil {
+ glog.Errorf("Cannot clean up hostport %d for pod %s: %v", hp.port, getPodFullName(podHostportMapping), err)
+ }
+ }
+ return retErr
+ }
+
+ for hostPort, socket := range ports {
+ h.hostPortMap[hostPort] = socket
+ }
+
+ return nil
+}
+
+func getPodFullName(pod *PodPortMapping) string {
+ // Use underscore as the delimiter because it is not allowed in pod name
+ // (DNS subdomain format), while allowed in the container name format.
+ return pod.Name + "_" + pod.Namespace
+}
+
+// gatherAllHostports returns all hostports that should be presented on node,
+// given the list of pods running on that node and ignoring host network
+// pods (which don't need hostport <-> container port mapping).
+func gatherAllHostports(activePodPortMappings []*PodPortMapping) (map[*PortMapping]targetPod, error) {
+ podHostportMap := make(map[*PortMapping]targetPod)
+ for _, pm := range activePodPortMappings {
+ if pm.IP.To4() == nil {
+ return nil, fmt.Errorf("Invalid or missing pod %s IP", getPodFullName(pm))
+ }
+ // should not handle hostports for hostnetwork pods
+ if pm.HostNetwork {
+ continue
+ }
+
+ for _, port := range pm.PortMappings {
+ if port.HostPort != 0 {
+ podHostportMap[port] = targetPod{podFullName: getPodFullName(pm), podIP: pm.IP.String()}
+ }
+ }
+ }
+ return podHostportMap, nil
+}
+
+// Join all words with spaces, terminate with newline and write to buf.
+func writeLine(buf *bytes.Buffer, words ...string) {
+ buf.WriteString(strings.Join(words, " ") + "\n")
+}
+
+//hostportChainName takes containerPort for a pod and returns associated iptables chain.
+// This is computed by hashing (sha256)
+// then encoding to base32 and truncating with the prefix "KUBE-SVC-". We do
+// this because IPTables Chain Names must be <= 28 chars long, and the longer
+// they are the harder they are to read.
+func hostportChainName(pm *PortMapping, podFullName string) utiliptables.Chain {
+ hash := sha256.Sum256([]byte(string(pm.HostPort) + string(pm.Protocol) + podFullName))
+ encoded := base32.StdEncoding.EncodeToString(hash[:])
+ return utiliptables.Chain(kubeHostportChainPrefix + encoded[:16])
+}
+
+// OpenPodHostportsAndSync opens hostports for a new PodPortMapping, gathers all hostports on
+// node, sets up iptables rules enable them. And finally clean up stale hostports.
+// 'newPortMapping' must also be present in 'activePodPortMappings'.
+func (h *hostportSyncer) OpenPodHostportsAndSync(newPortMapping *PodPortMapping, natInterfaceName string, activePodPortMappings []*PodPortMapping) error {
+ // try to open pod host port if specified
+ if err := h.openHostports(newPortMapping); err != nil {
+ return err
+ }
+
+ // Add the new pod to active pods if it's not present.
+ var found bool
+ for _, pm := range activePodPortMappings {
+ if pm.Namespace == newPortMapping.Namespace && pm.Name == newPortMapping.Name {
+ found = true
+ break
+ }
+ }
+ if !found {
+ activePodPortMappings = append(activePodPortMappings, newPortMapping)
+ }
+
+ return h.SyncHostports(natInterfaceName, activePodPortMappings)
+}
+
+// SyncHostports gathers all hostports on node and setup iptables rules enable them. And finally clean up stale hostports
+func (h *hostportSyncer) SyncHostports(natInterfaceName string, activePodPortMappings []*PodPortMapping) error {
+ start := time.Now()
+ defer func() {
+ glog.V(4).Infof("syncHostportsRules took %v", time.Since(start))
+ }()
+
+ hostportPodMap, err := gatherAllHostports(activePodPortMappings)
+ if err != nil {
+ return err
+ }
+
+ // Ensure KUBE-HOSTPORTS chains
+ ensureKubeHostportChains(h.iptables, natInterfaceName)
+
+ // Get iptables-save output so we can check for existing chains and rules.
+ // This will be a map of chain name to chain with rules as stored in iptables-save/iptables-restore
+ existingNATChains := make(map[utiliptables.Chain]string)
+ iptablesData := bytes.NewBuffer(nil)
+ err = h.iptables.SaveInto(utiliptables.TableNAT, iptablesData)
+ if err != nil { // if we failed to get any rules
+ glog.Errorf("Failed to execute iptables-save, syncing all rules: %v", err)
+ } else { // otherwise parse the output
+ existingNATChains = utiliptables.GetChainLines(utiliptables.TableNAT, iptablesData.Bytes())
+ }
+
+ natChains := bytes.NewBuffer(nil)
+ natRules := bytes.NewBuffer(nil)
+ writeLine(natChains, "*nat")
+ // Make sure we keep stats for the top-level chains, if they existed
+ // (which most should have because we created them above).
+ if chain, ok := existingNATChains[kubeHostportsChain]; ok {
+ writeLine(natChains, chain)
+ } else {
+ writeLine(natChains, utiliptables.MakeChainLine(kubeHostportsChain))
+ }
+
+ // Accumulate NAT chains to keep.
+ activeNATChains := map[utiliptables.Chain]bool{} // use a map as a set
+
+ for port, target := range hostportPodMap {
+ protocol := strings.ToLower(string(port.Protocol))
+ hostportChain := hostportChainName(port, target.podFullName)
+ if chain, ok := existingNATChains[hostportChain]; ok {
+ writeLine(natChains, chain)
+ } else {
+ writeLine(natChains, utiliptables.MakeChainLine(hostportChain))
+ }
+
+ activeNATChains[hostportChain] = true
+
+ // Redirect to hostport chain
+ args := []string{
+ "-A", string(kubeHostportsChain),
+ "-m", "comment", "--comment", fmt.Sprintf(`"%s hostport %d"`, target.podFullName, port.HostPort),
+ "-m", protocol, "-p", protocol,
+ "--dport", fmt.Sprintf("%d", port.HostPort),
+ "-j", string(hostportChain),
+ }
+ writeLine(natRules, args...)
+
+ // Assuming kubelet is syncing iptables KUBE-MARK-MASQ chain
+ // If the request comes from the pod that is serving the hostport, then SNAT
+ args = []string{
+ "-A", string(hostportChain),
+ "-m", "comment", "--comment", fmt.Sprintf(`"%s hostport %d"`, target.podFullName, port.HostPort),
+ "-s", target.podIP, "-j", string(iptablesproxy.KubeMarkMasqChain),
+ }
+ writeLine(natRules, args...)
+
+ // Create hostport chain to DNAT traffic to final destination
+ // IPTables will maintained the stats for this chain
+ args = []string{
+ "-A", string(hostportChain),
+ "-m", "comment", "--comment", fmt.Sprintf(`"%s hostport %d"`, target.podFullName, port.HostPort),
+ "-m", protocol, "-p", protocol,
+ "-j", "DNAT", fmt.Sprintf("--to-destination=%s:%d", target.podIP, port.ContainerPort),
+ }
+ writeLine(natRules, args...)
+ }
+
+ // Delete chains no longer in use.
+ for chain := range existingNATChains {
+ if !activeNATChains[chain] {
+ chainString := string(chain)
+ if !strings.HasPrefix(chainString, kubeHostportChainPrefix) {
+ // Ignore chains that aren't ours.
+ continue
+ }
+ // We must (as per iptables) write a chain-line for it, which has
+ // the nice effect of flushing the chain. Then we can remove the
+ // chain.
+ writeLine(natChains, existingNATChains[chain])
+ writeLine(natRules, "-X", chainString)
+ }
+ }
+ writeLine(natRules, "COMMIT")
+
+ natLines := append(natChains.Bytes(), natRules.Bytes()...)
+ glog.V(3).Infof("Restoring iptables rules: %s", natLines)
+ err = h.iptables.RestoreAll(natLines, utiliptables.NoFlushTables, utiliptables.RestoreCounters)
+ if err != nil {
+ return fmt.Errorf("Failed to execute iptables-restore: %v", err)
+ }
+
+ h.cleanupHostportMap(hostportPodMap)
+ return nil
+}
+
+// cleanupHostportMap closes obsolete hostports
+func (h *hostportSyncer) cleanupHostportMap(containerPortMap map[*PortMapping]targetPod) {
+ // compute hostports that are supposed to be open
+ currentHostports := make(map[hostport]bool)
+ for containerPort := range containerPortMap {
+ hp := hostport{
+ port: containerPort.HostPort,
+ protocol: strings.ToLower(string(containerPort.Protocol)),
+ }
+ currentHostports[hp] = true
+ }
+
+ // close and delete obsolete hostports
+ for hp, socket := range h.hostPortMap {
+ if _, ok := currentHostports[hp]; !ok {
+ socket.Close()
+ glog.V(3).Infof("Closed local port %s", hp.String())
+ delete(h.hostPortMap, hp)
+ }
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/constants.go b/vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/constants.go
new file mode 100644
index 000000000..e7ccd58ae
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/constants.go
@@ -0,0 +1,23 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// package portforward contains server-side logic for handling port forwarding requests.
+package portforward
+
+// The subprotocol "portforward.k8s.io" is used for port forwarding.
+const ProtocolV1Name = "portforward.k8s.io"
+
+var SupportedProtocols = []string{ProtocolV1Name}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/httpstream.go b/vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/httpstream.go
new file mode 100644
index 000000000..5f872c820
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/httpstream.go
@@ -0,0 +1,309 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package portforward
+
+import (
+ "errors"
+ "fmt"
+ "net/http"
+ "strconv"
+ "sync"
+ "time"
+
+ "k8s.io/apimachinery/pkg/types"
+ "k8s.io/apimachinery/pkg/util/httpstream"
+ "k8s.io/apimachinery/pkg/util/httpstream/spdy"
+ utilruntime "k8s.io/apimachinery/pkg/util/runtime"
+ "k8s.io/kubernetes/pkg/api"
+
+ "github.com/golang/glog"
+)
+
+func handleHttpStreams(req *http.Request, w http.ResponseWriter, portForwarder PortForwarder, podName string, uid types.UID, supportedPortForwardProtocols []string, idleTimeout, streamCreationTimeout time.Duration) error {
+ _, err := httpstream.Handshake(req, w, supportedPortForwardProtocols)
+ // negotiated protocol isn't currently used server side, but could be in the future
+ if err != nil {
+ // Handshake writes the error to the client
+ return err
+ }
+ streamChan := make(chan httpstream.Stream, 1)
+
+ glog.V(5).Infof("Upgrading port forward response")
+ upgrader := spdy.NewResponseUpgrader()
+ conn := upgrader.UpgradeResponse(w, req, httpStreamReceived(streamChan))
+ if conn == nil {
+ return errors.New("Unable to upgrade websocket connection")
+ }
+ defer conn.Close()
+
+ glog.V(5).Infof("(conn=%p) setting port forwarding streaming connection idle timeout to %v", conn, idleTimeout)
+ conn.SetIdleTimeout(idleTimeout)
+
+ h := &httpStreamHandler{
+ conn: conn,
+ streamChan: streamChan,
+ streamPairs: make(map[string]*httpStreamPair),
+ streamCreationTimeout: streamCreationTimeout,
+ pod: podName,
+ uid: uid,
+ forwarder: portForwarder,
+ }
+ h.run()
+
+ return nil
+}
+
+// httpStreamReceived is the httpstream.NewStreamHandler for port
+// forward streams. It checks each stream's port and stream type headers,
+// rejecting any streams that with missing or invalid values. Each valid
+// stream is sent to the streams channel.
+func httpStreamReceived(streams chan httpstream.Stream) func(httpstream.Stream, <-chan struct{}) error {
+ return func(stream httpstream.Stream, replySent <-chan struct{}) error {
+ // make sure it has a valid port header
+ portString := stream.Headers().Get(api.PortHeader)
+ if len(portString) == 0 {
+ return fmt.Errorf("%q header is required", api.PortHeader)
+ }
+ port, err := strconv.ParseUint(portString, 10, 16)
+ if err != nil {
+ return fmt.Errorf("unable to parse %q as a port: %v", portString, err)
+ }
+ if port < 1 {
+ return fmt.Errorf("port %q must be > 0", portString)
+ }
+
+ // make sure it has a valid stream type header
+ streamType := stream.Headers().Get(api.StreamType)
+ if len(streamType) == 0 {
+ return fmt.Errorf("%q header is required", api.StreamType)
+ }
+ if streamType != api.StreamTypeError && streamType != api.StreamTypeData {
+ return fmt.Errorf("invalid stream type %q", streamType)
+ }
+
+ streams <- stream
+ return nil
+ }
+}
+
+// httpStreamHandler is capable of processing multiple port forward
+// requests over a single httpstream.Connection.
+type httpStreamHandler struct {
+ conn httpstream.Connection
+ streamChan chan httpstream.Stream
+ streamPairsLock sync.RWMutex
+ streamPairs map[string]*httpStreamPair
+ streamCreationTimeout time.Duration
+ pod string
+ uid types.UID
+ forwarder PortForwarder
+}
+
+// getStreamPair returns a httpStreamPair for requestID. This creates a
+// new pair if one does not yet exist for the requestID. The returned bool is
+// true if the pair was created.
+func (h *httpStreamHandler) getStreamPair(requestID string) (*httpStreamPair, bool) {
+ h.streamPairsLock.Lock()
+ defer h.streamPairsLock.Unlock()
+
+ if p, ok := h.streamPairs[requestID]; ok {
+ glog.V(5).Infof("(conn=%p, request=%s) found existing stream pair", h.conn, requestID)
+ return p, false
+ }
+
+ glog.V(5).Infof("(conn=%p, request=%s) creating new stream pair", h.conn, requestID)
+
+ p := newPortForwardPair(requestID)
+ h.streamPairs[requestID] = p
+
+ return p, true
+}
+
+// monitorStreamPair waits for the pair to receive both its error and data
+// streams, or for the timeout to expire (whichever happens first), and then
+// removes the pair.
+func (h *httpStreamHandler) monitorStreamPair(p *httpStreamPair, timeout <-chan time.Time) {
+ select {
+ case <-timeout:
+ err := fmt.Errorf("(conn=%v, request=%s) timed out waiting for streams", h.conn, p.requestID)
+ utilruntime.HandleError(err)
+ p.printError(err.Error())
+ case <-p.complete:
+ glog.V(5).Infof("(conn=%v, request=%s) successfully received error and data streams", h.conn, p.requestID)
+ }
+ h.removeStreamPair(p.requestID)
+}
+
+// hasStreamPair returns a bool indicating if a stream pair for requestID
+// exists.
+func (h *httpStreamHandler) hasStreamPair(requestID string) bool {
+ h.streamPairsLock.RLock()
+ defer h.streamPairsLock.RUnlock()
+
+ _, ok := h.streamPairs[requestID]
+ return ok
+}
+
+// removeStreamPair removes the stream pair identified by requestID from streamPairs.
+func (h *httpStreamHandler) removeStreamPair(requestID string) {
+ h.streamPairsLock.Lock()
+ defer h.streamPairsLock.Unlock()
+
+ delete(h.streamPairs, requestID)
+}
+
+// requestID returns the request id for stream.
+func (h *httpStreamHandler) requestID(stream httpstream.Stream) string {
+ requestID := stream.Headers().Get(api.PortForwardRequestIDHeader)
+ if len(requestID) == 0 {
+ glog.V(5).Infof("(conn=%p) stream received without %s header", h.conn, api.PortForwardRequestIDHeader)
+ // If we get here, it's because the connection came from an older client
+ // that isn't generating the request id header
+ // (https://github.com/kubernetes/kubernetes/blob/843134885e7e0b360eb5441e85b1410a8b1a7a0c/pkg/client/unversioned/portforward/portforward.go#L258-L287)
+ //
+ // This is a best-effort attempt at supporting older clients.
+ //
+ // When there aren't concurrent new forwarded connections, each connection
+ // will have a pair of streams (data, error), and the stream IDs will be
+ // consecutive odd numbers, e.g. 1 and 3 for the first connection. Convert
+ // the stream ID into a pseudo-request id by taking the stream type and
+ // using id = stream.Identifier() when the stream type is error,
+ // and id = stream.Identifier() - 2 when it's data.
+ //
+ // NOTE: this only works when there are not concurrent new streams from
+ // multiple forwarded connections; it's a best-effort attempt at supporting
+ // old clients that don't generate request ids. If there are concurrent
+ // new connections, it's possible that 1 connection gets streams whose IDs
+ // are not consecutive (e.g. 5 and 9 instead of 5 and 7).
+ streamType := stream.Headers().Get(api.StreamType)
+ switch streamType {
+ case api.StreamTypeError:
+ requestID = strconv.Itoa(int(stream.Identifier()))
+ case api.StreamTypeData:
+ requestID = strconv.Itoa(int(stream.Identifier()) - 2)
+ }
+
+ glog.V(5).Infof("(conn=%p) automatically assigning request ID=%q from stream type=%s, stream ID=%d", h.conn, requestID, streamType, stream.Identifier())
+ }
+ return requestID
+}
+
+// run is the main loop for the httpStreamHandler. It processes new
+// streams, invoking portForward for each complete stream pair. The loop exits
+// when the httpstream.Connection is closed.
+func (h *httpStreamHandler) run() {
+ glog.V(5).Infof("(conn=%p) waiting for port forward streams", h.conn)
+Loop:
+ for {
+ select {
+ case <-h.conn.CloseChan():
+ glog.V(5).Infof("(conn=%p) upgraded connection closed", h.conn)
+ break Loop
+ case stream := <-h.streamChan:
+ requestID := h.requestID(stream)
+ streamType := stream.Headers().Get(api.StreamType)
+ glog.V(5).Infof("(conn=%p, request=%s) received new stream of type %s", h.conn, requestID, streamType)
+
+ p, created := h.getStreamPair(requestID)
+ if created {
+ go h.monitorStreamPair(p, time.After(h.streamCreationTimeout))
+ }
+ if complete, err := p.add(stream); err != nil {
+ msg := fmt.Sprintf("error processing stream for request %s: %v", requestID, err)
+ utilruntime.HandleError(errors.New(msg))
+ p.printError(msg)
+ } else if complete {
+ go h.portForward(p)
+ }
+ }
+ }
+}
+
+// portForward invokes the httpStreamHandler's forwarder.PortForward
+// function for the given stream pair.
+func (h *httpStreamHandler) portForward(p *httpStreamPair) {
+ defer p.dataStream.Close()
+ defer p.errorStream.Close()
+
+ portString := p.dataStream.Headers().Get(api.PortHeader)
+ port, _ := strconv.ParseInt(portString, 10, 32)
+
+ glog.V(5).Infof("(conn=%p, request=%s) invoking forwarder.PortForward for port %s", h.conn, p.requestID, portString)
+ err := h.forwarder.PortForward(h.pod, h.uid, int32(port), p.dataStream)
+ glog.V(5).Infof("(conn=%p, request=%s) done invoking forwarder.PortForward for port %s", h.conn, p.requestID, portString)
+
+ if err != nil {
+ msg := fmt.Errorf("error forwarding port %d to pod %s, uid %v: %v", port, h.pod, h.uid, err)
+ utilruntime.HandleError(msg)
+ fmt.Fprint(p.errorStream, msg.Error())
+ }
+}
+
+// httpStreamPair represents the error and data streams for a port
+// forwarding request.
+type httpStreamPair struct {
+ lock sync.RWMutex
+ requestID string
+ dataStream httpstream.Stream
+ errorStream httpstream.Stream
+ complete chan struct{}
+}
+
+// newPortForwardPair creates a new httpStreamPair.
+func newPortForwardPair(requestID string) *httpStreamPair {
+ return &httpStreamPair{
+ requestID: requestID,
+ complete: make(chan struct{}),
+ }
+}
+
+// add adds the stream to the httpStreamPair. If the pair already
+// contains a stream for the new stream's type, an error is returned. add
+// returns true if both the data and error streams for this pair have been
+// received.
+func (p *httpStreamPair) add(stream httpstream.Stream) (bool, error) {
+ p.lock.Lock()
+ defer p.lock.Unlock()
+
+ switch stream.Headers().Get(api.StreamType) {
+ case api.StreamTypeError:
+ if p.errorStream != nil {
+ return false, errors.New("error stream already assigned")
+ }
+ p.errorStream = stream
+ case api.StreamTypeData:
+ if p.dataStream != nil {
+ return false, errors.New("data stream already assigned")
+ }
+ p.dataStream = stream
+ }
+
+ complete := p.errorStream != nil && p.dataStream != nil
+ if complete {
+ close(p.complete)
+ }
+ return complete, nil
+}
+
+// printError writes s to p.errorStream if p.errorStream has been set.
+func (p *httpStreamPair) printError(s string) {
+ p.lock.RLock()
+ defer p.lock.RUnlock()
+ if p.errorStream != nil {
+ fmt.Fprint(p.errorStream, s)
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/portforward.go b/vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/portforward.go
new file mode 100644
index 000000000..60a96e51a
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/portforward.go
@@ -0,0 +1,53 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package portforward
+
+import (
+ "io"
+ "net/http"
+ "time"
+
+ "k8s.io/apimachinery/pkg/types"
+ "k8s.io/apimachinery/pkg/util/runtime"
+ "k8s.io/apiserver/pkg/util/wsstream"
+)
+
+// PortForwarder knows how to forward content from a data stream to/from a port
+// in a pod.
+type PortForwarder interface {
+ // PortForwarder copies data between a data stream and a port in a pod.
+ PortForward(name string, uid types.UID, port int32, stream io.ReadWriteCloser) error
+}
+
+// ServePortForward handles a port forwarding request. A single request is
+// kept alive as long as the client is still alive and the connection has not
+// been timed out due to idleness. This function handles multiple forwarded
+// connections; i.e., multiple `curl http://localhost:8888/` requests will be
+// handled by a single invocation of ServePortForward.
+func ServePortForward(w http.ResponseWriter, req *http.Request, portForwarder PortForwarder, podName string, uid types.UID, portForwardOptions *V4Options, idleTimeout time.Duration, streamCreationTimeout time.Duration, supportedProtocols []string) {
+ var err error
+ if wsstream.IsWebSocketRequest(req) {
+ err = handleWebSocketStreams(req, w, portForwarder, podName, uid, portForwardOptions, supportedProtocols, idleTimeout, streamCreationTimeout)
+ } else {
+ err = handleHttpStreams(req, w, portForwarder, podName, uid, supportedProtocols, idleTimeout, streamCreationTimeout)
+ }
+
+ if err != nil {
+ runtime.HandleError(err)
+ return
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/websocket.go b/vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/websocket.go
new file mode 100644
index 000000000..22d5add06
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/portforward/websocket.go
@@ -0,0 +1,198 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package portforward
+
+import (
+ "encoding/binary"
+ "fmt"
+ "io"
+ "net/http"
+ "strconv"
+ "strings"
+ "sync"
+ "time"
+
+ "github.com/golang/glog"
+
+ "k8s.io/apimachinery/pkg/types"
+ "k8s.io/apimachinery/pkg/util/runtime"
+ "k8s.io/apiserver/pkg/server/httplog"
+ "k8s.io/apiserver/pkg/util/wsstream"
+ "k8s.io/kubernetes/pkg/api"
+)
+
+const (
+ dataChannel = iota
+ errorChannel
+
+ v4BinaryWebsocketProtocol = "v4." + wsstream.ChannelWebSocketProtocol
+ v4Base64WebsocketProtocol = "v4." + wsstream.Base64ChannelWebSocketProtocol
+)
+
+// options contains details about which streams are required for
+// port forwarding.
+// All fields incldued in V4Options need to be expressed explicilty in the
+// CRI (pkg/kubelet/apis/cri/{version}/api.proto) PortForwardRequest.
+type V4Options struct {
+ Ports []int32
+}
+
+// newOptions creates a new options from the Request.
+func NewV4Options(req *http.Request) (*V4Options, error) {
+ if !wsstream.IsWebSocketRequest(req) {
+ return &V4Options{}, nil
+ }
+
+ portStrings := req.URL.Query()[api.PortHeader]
+ if len(portStrings) == 0 {
+ return nil, fmt.Errorf("query parameter %q is required", api.PortHeader)
+ }
+
+ ports := make([]int32, 0, len(portStrings))
+ for _, portString := range portStrings {
+ if len(portString) == 0 {
+ return nil, fmt.Errorf("query parameter %q cannot be empty", api.PortHeader)
+ }
+ for _, p := range strings.Split(portString, ",") {
+ port, err := strconv.ParseUint(p, 10, 16)
+ if err != nil {
+ return nil, fmt.Errorf("unable to parse %q as a port: %v", portString, err)
+ }
+ if port < 1 {
+ return nil, fmt.Errorf("port %q must be > 0", portString)
+ }
+ ports = append(ports, int32(port))
+ }
+ }
+
+ return &V4Options{
+ Ports: ports,
+ }, nil
+}
+
+// BuildV4Options returns a V4Options based on the given information.
+func BuildV4Options(ports []int32) (*V4Options, error) {
+ return &V4Options{Ports: ports}, nil
+}
+
+// handleWebSocketStreams handles requests to forward ports to a pod via
+// a PortForwarder. A pair of streams are created per port (DATA n,
+// ERROR n+1). The associated port is written to each stream as a unsigned 16
+// bit integer in little endian format.
+func handleWebSocketStreams(req *http.Request, w http.ResponseWriter, portForwarder PortForwarder, podName string, uid types.UID, opts *V4Options, supportedPortForwardProtocols []string, idleTimeout, streamCreationTimeout time.Duration) error {
+ channels := make([]wsstream.ChannelType, 0, len(opts.Ports)*2)
+ for i := 0; i < len(opts.Ports); i++ {
+ channels = append(channels, wsstream.ReadWriteChannel, wsstream.WriteChannel)
+ }
+ conn := wsstream.NewConn(map[string]wsstream.ChannelProtocolConfig{
+ "": {
+ Binary: true,
+ Channels: channels,
+ },
+ v4BinaryWebsocketProtocol: {
+ Binary: true,
+ Channels: channels,
+ },
+ v4Base64WebsocketProtocol: {
+ Binary: false,
+ Channels: channels,
+ },
+ })
+ conn.SetIdleTimeout(idleTimeout)
+ _, streams, err := conn.Open(httplog.Unlogged(w), req)
+ if err != nil {
+ err = fmt.Errorf("Unable to upgrade websocket connection: %v", err)
+ return err
+ }
+ defer conn.Close()
+ streamPairs := make([]*websocketStreamPair, len(opts.Ports))
+ for i := range streamPairs {
+ streamPair := websocketStreamPair{
+ port: opts.Ports[i],
+ dataStream: streams[i*2+dataChannel],
+ errorStream: streams[i*2+errorChannel],
+ }
+ streamPairs[i] = &streamPair
+
+ portBytes := make([]byte, 2)
+ // port is always positive so conversion is allowable
+ binary.LittleEndian.PutUint16(portBytes, uint16(streamPair.port))
+ streamPair.dataStream.Write(portBytes)
+ streamPair.errorStream.Write(portBytes)
+ }
+ h := &websocketStreamHandler{
+ conn: conn,
+ streamPairs: streamPairs,
+ pod: podName,
+ uid: uid,
+ forwarder: portForwarder,
+ }
+ h.run()
+
+ return nil
+}
+
+// websocketStreamPair represents the error and data streams for a port
+// forwarding request.
+type websocketStreamPair struct {
+ port int32
+ dataStream io.ReadWriteCloser
+ errorStream io.WriteCloser
+}
+
+// websocketStreamHandler is capable of processing a single port forward
+// request over a websocket connection
+type websocketStreamHandler struct {
+ conn *wsstream.Conn
+ ports []int32
+ streamPairs []*websocketStreamPair
+ pod string
+ uid types.UID
+ forwarder PortForwarder
+}
+
+// run invokes the websocketStreamHandler's forwarder.PortForward
+// function for the given stream pair.
+func (h *websocketStreamHandler) run() {
+ wg := sync.WaitGroup{}
+ wg.Add(len(h.streamPairs))
+
+ for _, pair := range h.streamPairs {
+ p := pair
+ go func() {
+ defer wg.Done()
+ h.portForward(p)
+ }()
+ }
+
+ wg.Wait()
+}
+
+func (h *websocketStreamHandler) portForward(p *websocketStreamPair) {
+ defer p.dataStream.Close()
+ defer p.errorStream.Close()
+
+ glog.V(5).Infof("(conn=%p) invoking forwarder.PortForward for port %d", h.conn, p.port)
+ err := h.forwarder.PortForward(h.pod, h.uid, p.port, p.dataStream)
+ glog.V(5).Infof("(conn=%p) done invoking forwarder.PortForward for port %d", h.conn, p.port)
+
+ if err != nil {
+ msg := fmt.Errorf("error forwarding port %d to pod %s, uid %v: %v", p.port, h.pod, h.uid, err)
+ runtime.HandleError(msg)
+ fmt.Fprint(p.errorStream, msg.Error())
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/attach.go b/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/attach.go
new file mode 100644
index 000000000..e266f34fe
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/attach.go
@@ -0,0 +1,59 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package remotecommand
+
+import (
+ "fmt"
+ "io"
+ "net/http"
+ "time"
+
+ apierrors "k8s.io/apimachinery/pkg/api/errors"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/types"
+ "k8s.io/apimachinery/pkg/util/runtime"
+ "k8s.io/client-go/tools/remotecommand"
+)
+
+// Attacher knows how to attach to a running container in a pod.
+type Attacher interface {
+ // AttachContainer attaches to the running container in the pod, copying data between in/out/err
+ // and the container's stdin/stdout/stderr.
+ AttachContainer(name string, uid types.UID, container string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) error
+}
+
+// ServeAttach handles requests to attach to a container. After creating/receiving the required
+// streams, it delegates the actual attaching to attacher.
+func ServeAttach(w http.ResponseWriter, req *http.Request, attacher Attacher, podName string, uid types.UID, container string, streamOpts *Options, idleTimeout, streamCreationTimeout time.Duration, supportedProtocols []string) {
+ ctx, ok := createStreams(req, w, streamOpts, supportedProtocols, idleTimeout, streamCreationTimeout)
+ if !ok {
+ // error is handled by createStreams
+ return
+ }
+ defer ctx.conn.Close()
+
+ err := attacher.AttachContainer(podName, uid, container, ctx.stdinStream, ctx.stdoutStream, ctx.stderrStream, ctx.tty, ctx.resizeChan)
+ if err != nil {
+ err = fmt.Errorf("error attaching to container: %v", err)
+ runtime.HandleError(err)
+ ctx.writeStatus(apierrors.NewInternalError(err))
+ } else {
+ ctx.writeStatus(&apierrors.StatusError{ErrStatus: metav1.Status{
+ Status: metav1.StatusSuccess,
+ }})
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/doc.go b/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/doc.go
new file mode 100644
index 000000000..24f9393ab
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// package remotecommand contains functions related to executing commands in and attaching to pods.
+package remotecommand // import "k8s.io/kubernetes/pkg/kubelet/server/remotecommand"
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/exec.go b/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/exec.go
new file mode 100644
index 000000000..8d14a937a
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/exec.go
@@ -0,0 +1,79 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package remotecommand
+
+import (
+ "fmt"
+ "io"
+ "net/http"
+ "time"
+
+ apierrors "k8s.io/apimachinery/pkg/api/errors"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/types"
+ remotecommandconsts "k8s.io/apimachinery/pkg/util/remotecommand"
+ "k8s.io/apimachinery/pkg/util/runtime"
+ "k8s.io/client-go/tools/remotecommand"
+ utilexec "k8s.io/kubernetes/pkg/util/exec"
+)
+
+// Executor knows how to execute a command in a container in a pod.
+type Executor interface {
+ // ExecInContainer executes a command in a container in the pod, copying data
+ // between in/out/err and the container's stdin/stdout/stderr.
+ ExecInContainer(name string, uid types.UID, container string, cmd []string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize, timeout time.Duration) error
+}
+
+// ServeExec handles requests to execute a command in a container. After
+// creating/receiving the required streams, it delegates the actual execution
+// to the executor.
+func ServeExec(w http.ResponseWriter, req *http.Request, executor Executor, podName string, uid types.UID, container string, cmd []string, streamOpts *Options, idleTimeout, streamCreationTimeout time.Duration, supportedProtocols []string) {
+ ctx, ok := createStreams(req, w, streamOpts, supportedProtocols, idleTimeout, streamCreationTimeout)
+ if !ok {
+ // error is handled by createStreams
+ return
+ }
+ defer ctx.conn.Close()
+
+ err := executor.ExecInContainer(podName, uid, container, cmd, ctx.stdinStream, ctx.stdoutStream, ctx.stderrStream, ctx.tty, ctx.resizeChan, 0)
+ if err != nil {
+ if exitErr, ok := err.(utilexec.ExitError); ok && exitErr.Exited() {
+ rc := exitErr.ExitStatus()
+ ctx.writeStatus(&apierrors.StatusError{ErrStatus: metav1.Status{
+ Status: metav1.StatusFailure,
+ Reason: remotecommandconsts.NonZeroExitCodeReason,
+ Details: &metav1.StatusDetails{
+ Causes: []metav1.StatusCause{
+ {
+ Type: remotecommandconsts.ExitCodeCauseType,
+ Message: fmt.Sprintf("%d", rc),
+ },
+ },
+ },
+ Message: fmt.Sprintf("command terminated with non-zero exit code: %v", exitErr),
+ }})
+ } else {
+ err = fmt.Errorf("error executing command in container: %v", err)
+ runtime.HandleError(err)
+ ctx.writeStatus(apierrors.NewInternalError(err))
+ }
+ } else {
+ ctx.writeStatus(&apierrors.StatusError{ErrStatus: metav1.Status{
+ Status: metav1.StatusSuccess,
+ }})
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/httpstream.go b/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/httpstream.go
new file mode 100644
index 000000000..f09b5e400
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/httpstream.go
@@ -0,0 +1,447 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package remotecommand
+
+import (
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+ "net/http"
+ "time"
+
+ apierrors "k8s.io/apimachinery/pkg/api/errors"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/util/httpstream"
+ "k8s.io/apimachinery/pkg/util/httpstream/spdy"
+ remotecommandconsts "k8s.io/apimachinery/pkg/util/remotecommand"
+ "k8s.io/apimachinery/pkg/util/runtime"
+ "k8s.io/apiserver/pkg/util/wsstream"
+ "k8s.io/client-go/tools/remotecommand"
+ "k8s.io/kubernetes/pkg/api"
+
+ "github.com/golang/glog"
+)
+
+// Options contains details about which streams are required for
+// remote command execution.
+type Options struct {
+ Stdin bool
+ Stdout bool
+ Stderr bool
+ TTY bool
+}
+
+// NewOptions creates a new Options from the Request.
+func NewOptions(req *http.Request) (*Options, error) {
+ tty := req.FormValue(api.ExecTTYParam) == "1"
+ stdin := req.FormValue(api.ExecStdinParam) == "1"
+ stdout := req.FormValue(api.ExecStdoutParam) == "1"
+ stderr := req.FormValue(api.ExecStderrParam) == "1"
+ if tty && stderr {
+ // TODO: make this an error before we reach this method
+ glog.V(4).Infof("Access to exec with tty and stderr is not supported, bypassing stderr")
+ stderr = false
+ }
+
+ if !stdin && !stdout && !stderr {
+ return nil, fmt.Errorf("you must specify at least 1 of stdin, stdout, stderr")
+ }
+
+ return &Options{
+ Stdin: stdin,
+ Stdout: stdout,
+ Stderr: stderr,
+ TTY: tty,
+ }, nil
+}
+
+// context contains the connection and streams used when
+// forwarding an attach or execute session into a container.
+type context struct {
+ conn io.Closer
+ stdinStream io.ReadCloser
+ stdoutStream io.WriteCloser
+ stderrStream io.WriteCloser
+ writeStatus func(status *apierrors.StatusError) error
+ resizeStream io.ReadCloser
+ resizeChan chan remotecommand.TerminalSize
+ tty bool
+}
+
+// streamAndReply holds both a Stream and a channel that is closed when the stream's reply frame is
+// enqueued. Consumers can wait for replySent to be closed prior to proceeding, to ensure that the
+// replyFrame is enqueued before the connection's goaway frame is sent (e.g. if a stream was
+// received and right after, the connection gets closed).
+type streamAndReply struct {
+ httpstream.Stream
+ replySent <-chan struct{}
+}
+
+// waitStreamReply waits until either replySent or stop is closed. If replySent is closed, it sends
+// an empty struct to the notify channel.
+func waitStreamReply(replySent <-chan struct{}, notify chan<- struct{}, stop <-chan struct{}) {
+ select {
+ case <-replySent:
+ notify <- struct{}{}
+ case <-stop:
+ }
+}
+
+func createStreams(req *http.Request, w http.ResponseWriter, opts *Options, supportedStreamProtocols []string, idleTimeout, streamCreationTimeout time.Duration) (*context, bool) {
+ var ctx *context
+ var ok bool
+ if wsstream.IsWebSocketRequest(req) {
+ ctx, ok = createWebSocketStreams(req, w, opts, idleTimeout)
+ } else {
+ ctx, ok = createHttpStreamStreams(req, w, opts, supportedStreamProtocols, idleTimeout, streamCreationTimeout)
+ }
+ if !ok {
+ return nil, false
+ }
+
+ if ctx.resizeStream != nil {
+ ctx.resizeChan = make(chan remotecommand.TerminalSize)
+ go handleResizeEvents(ctx.resizeStream, ctx.resizeChan)
+ }
+
+ return ctx, true
+}
+
+func createHttpStreamStreams(req *http.Request, w http.ResponseWriter, opts *Options, supportedStreamProtocols []string, idleTimeout, streamCreationTimeout time.Duration) (*context, bool) {
+ protocol, err := httpstream.Handshake(req, w, supportedStreamProtocols)
+ if err != nil {
+ w.WriteHeader(http.StatusBadRequest)
+ fmt.Fprint(w, err.Error())
+ return nil, false
+ }
+
+ streamCh := make(chan streamAndReply)
+
+ upgrader := spdy.NewResponseUpgrader()
+ conn := upgrader.UpgradeResponse(w, req, func(stream httpstream.Stream, replySent <-chan struct{}) error {
+ streamCh <- streamAndReply{Stream: stream, replySent: replySent}
+ return nil
+ })
+ // from this point on, we can no longer call methods on response
+ if conn == nil {
+ // The upgrader is responsible for notifying the client of any errors that
+ // occurred during upgrading. All we can do is return here at this point
+ // if we weren't successful in upgrading.
+ return nil, false
+ }
+
+ conn.SetIdleTimeout(idleTimeout)
+
+ var handler protocolHandler
+ switch protocol {
+ case remotecommandconsts.StreamProtocolV4Name:
+ handler = &v4ProtocolHandler{}
+ case remotecommandconsts.StreamProtocolV3Name:
+ handler = &v3ProtocolHandler{}
+ case remotecommandconsts.StreamProtocolV2Name:
+ handler = &v2ProtocolHandler{}
+ case "":
+ glog.V(4).Infof("Client did not request protocol negotiaion. Falling back to %q", remotecommandconsts.StreamProtocolV1Name)
+ fallthrough
+ case remotecommandconsts.StreamProtocolV1Name:
+ handler = &v1ProtocolHandler{}
+ }
+
+ // count the streams client asked for, starting with 1
+ expectedStreams := 1
+ if opts.Stdin {
+ expectedStreams++
+ }
+ if opts.Stdout {
+ expectedStreams++
+ }
+ if opts.Stderr {
+ expectedStreams++
+ }
+ if opts.TTY && handler.supportsTerminalResizing() {
+ expectedStreams++
+ }
+
+ expired := time.NewTimer(streamCreationTimeout)
+ defer expired.Stop()
+
+ ctx, err := handler.waitForStreams(streamCh, expectedStreams, expired.C)
+ if err != nil {
+ runtime.HandleError(err)
+ return nil, false
+ }
+
+ ctx.conn = conn
+ ctx.tty = opts.TTY
+
+ return ctx, true
+}
+
+type protocolHandler interface {
+ // waitForStreams waits for the expected streams or a timeout, returning a
+ // remoteCommandContext if all the streams were received, or an error if not.
+ waitForStreams(streams <-chan streamAndReply, expectedStreams int, expired <-chan time.Time) (*context, error)
+ // supportsTerminalResizing returns true if the protocol handler supports terminal resizing
+ supportsTerminalResizing() bool
+}
+
+// v4ProtocolHandler implements the V4 protocol version for streaming command execution. It only differs
+// in from v3 in the error stream format using an json-marshaled metav1.Status which carries
+// the process' exit code.
+type v4ProtocolHandler struct{}
+
+func (*v4ProtocolHandler) waitForStreams(streams <-chan streamAndReply, expectedStreams int, expired <-chan time.Time) (*context, error) {
+ ctx := &context{}
+ receivedStreams := 0
+ replyChan := make(chan struct{})
+ stop := make(chan struct{})
+ defer close(stop)
+WaitForStreams:
+ for {
+ select {
+ case stream := <-streams:
+ streamType := stream.Headers().Get(api.StreamType)
+ switch streamType {
+ case api.StreamTypeError:
+ ctx.writeStatus = v4WriteStatusFunc(stream) // write json errors
+ go waitStreamReply(stream.replySent, replyChan, stop)
+ case api.StreamTypeStdin:
+ ctx.stdinStream = stream
+ go waitStreamReply(stream.replySent, replyChan, stop)
+ case api.StreamTypeStdout:
+ ctx.stdoutStream = stream
+ go waitStreamReply(stream.replySent, replyChan, stop)
+ case api.StreamTypeStderr:
+ ctx.stderrStream = stream
+ go waitStreamReply(stream.replySent, replyChan, stop)
+ case api.StreamTypeResize:
+ ctx.resizeStream = stream
+ go waitStreamReply(stream.replySent, replyChan, stop)
+ default:
+ runtime.HandleError(fmt.Errorf("Unexpected stream type: %q", streamType))
+ }
+ case <-replyChan:
+ receivedStreams++
+ if receivedStreams == expectedStreams {
+ break WaitForStreams
+ }
+ case <-expired:
+ // TODO find a way to return the error to the user. Maybe use a separate
+ // stream to report errors?
+ return nil, errors.New("timed out waiting for client to create streams")
+ }
+ }
+
+ return ctx, nil
+}
+
+// supportsTerminalResizing returns true because v4ProtocolHandler supports it
+func (*v4ProtocolHandler) supportsTerminalResizing() bool { return true }
+
+// v3ProtocolHandler implements the V3 protocol version for streaming command execution.
+type v3ProtocolHandler struct{}
+
+func (*v3ProtocolHandler) waitForStreams(streams <-chan streamAndReply, expectedStreams int, expired <-chan time.Time) (*context, error) {
+ ctx := &context{}
+ receivedStreams := 0
+ replyChan := make(chan struct{})
+ stop := make(chan struct{})
+ defer close(stop)
+WaitForStreams:
+ for {
+ select {
+ case stream := <-streams:
+ streamType := stream.Headers().Get(api.StreamType)
+ switch streamType {
+ case api.StreamTypeError:
+ ctx.writeStatus = v1WriteStatusFunc(stream)
+ go waitStreamReply(stream.replySent, replyChan, stop)
+ case api.StreamTypeStdin:
+ ctx.stdinStream = stream
+ go waitStreamReply(stream.replySent, replyChan, stop)
+ case api.StreamTypeStdout:
+ ctx.stdoutStream = stream
+ go waitStreamReply(stream.replySent, replyChan, stop)
+ case api.StreamTypeStderr:
+ ctx.stderrStream = stream
+ go waitStreamReply(stream.replySent, replyChan, stop)
+ case api.StreamTypeResize:
+ ctx.resizeStream = stream
+ go waitStreamReply(stream.replySent, replyChan, stop)
+ default:
+ runtime.HandleError(fmt.Errorf("Unexpected stream type: %q", streamType))
+ }
+ case <-replyChan:
+ receivedStreams++
+ if receivedStreams == expectedStreams {
+ break WaitForStreams
+ }
+ case <-expired:
+ // TODO find a way to return the error to the user. Maybe use a separate
+ // stream to report errors?
+ return nil, errors.New("timed out waiting for client to create streams")
+ }
+ }
+
+ return ctx, nil
+}
+
+// supportsTerminalResizing returns true because v3ProtocolHandler supports it
+func (*v3ProtocolHandler) supportsTerminalResizing() bool { return true }
+
+// v2ProtocolHandler implements the V2 protocol version for streaming command execution.
+type v2ProtocolHandler struct{}
+
+func (*v2ProtocolHandler) waitForStreams(streams <-chan streamAndReply, expectedStreams int, expired <-chan time.Time) (*context, error) {
+ ctx := &context{}
+ receivedStreams := 0
+ replyChan := make(chan struct{})
+ stop := make(chan struct{})
+ defer close(stop)
+WaitForStreams:
+ for {
+ select {
+ case stream := <-streams:
+ streamType := stream.Headers().Get(api.StreamType)
+ switch streamType {
+ case api.StreamTypeError:
+ ctx.writeStatus = v1WriteStatusFunc(stream)
+ go waitStreamReply(stream.replySent, replyChan, stop)
+ case api.StreamTypeStdin:
+ ctx.stdinStream = stream
+ go waitStreamReply(stream.replySent, replyChan, stop)
+ case api.StreamTypeStdout:
+ ctx.stdoutStream = stream
+ go waitStreamReply(stream.replySent, replyChan, stop)
+ case api.StreamTypeStderr:
+ ctx.stderrStream = stream
+ go waitStreamReply(stream.replySent, replyChan, stop)
+ default:
+ runtime.HandleError(fmt.Errorf("Unexpected stream type: %q", streamType))
+ }
+ case <-replyChan:
+ receivedStreams++
+ if receivedStreams == expectedStreams {
+ break WaitForStreams
+ }
+ case <-expired:
+ // TODO find a way to return the error to the user. Maybe use a separate
+ // stream to report errors?
+ return nil, errors.New("timed out waiting for client to create streams")
+ }
+ }
+
+ return ctx, nil
+}
+
+// supportsTerminalResizing returns false because v2ProtocolHandler doesn't support it.
+func (*v2ProtocolHandler) supportsTerminalResizing() bool { return false }
+
+// v1ProtocolHandler implements the V1 protocol version for streaming command execution.
+type v1ProtocolHandler struct{}
+
+func (*v1ProtocolHandler) waitForStreams(streams <-chan streamAndReply, expectedStreams int, expired <-chan time.Time) (*context, error) {
+ ctx := &context{}
+ receivedStreams := 0
+ replyChan := make(chan struct{})
+ stop := make(chan struct{})
+ defer close(stop)
+WaitForStreams:
+ for {
+ select {
+ case stream := <-streams:
+ streamType := stream.Headers().Get(api.StreamType)
+ switch streamType {
+ case api.StreamTypeError:
+ ctx.writeStatus = v1WriteStatusFunc(stream)
+
+ // This defer statement shouldn't be here, but due to previous refactoring, it ended up in
+ // here. This is what 1.0.x kubelets do, so we're retaining that behavior. This is fixed in
+ // the v2ProtocolHandler.
+ defer stream.Reset()
+
+ go waitStreamReply(stream.replySent, replyChan, stop)
+ case api.StreamTypeStdin:
+ ctx.stdinStream = stream
+ go waitStreamReply(stream.replySent, replyChan, stop)
+ case api.StreamTypeStdout:
+ ctx.stdoutStream = stream
+ go waitStreamReply(stream.replySent, replyChan, stop)
+ case api.StreamTypeStderr:
+ ctx.stderrStream = stream
+ go waitStreamReply(stream.replySent, replyChan, stop)
+ default:
+ runtime.HandleError(fmt.Errorf("Unexpected stream type: %q", streamType))
+ }
+ case <-replyChan:
+ receivedStreams++
+ if receivedStreams == expectedStreams {
+ break WaitForStreams
+ }
+ case <-expired:
+ // TODO find a way to return the error to the user. Maybe use a separate
+ // stream to report errors?
+ return nil, errors.New("timed out waiting for client to create streams")
+ }
+ }
+
+ if ctx.stdinStream != nil {
+ ctx.stdinStream.Close()
+ }
+
+ return ctx, nil
+}
+
+// supportsTerminalResizing returns false because v1ProtocolHandler doesn't support it.
+func (*v1ProtocolHandler) supportsTerminalResizing() bool { return false }
+
+func handleResizeEvents(stream io.Reader, channel chan<- remotecommand.TerminalSize) {
+ defer runtime.HandleCrash()
+
+ decoder := json.NewDecoder(stream)
+ for {
+ size := remotecommand.TerminalSize{}
+ if err := decoder.Decode(&size); err != nil {
+ break
+ }
+ channel <- size
+ }
+}
+
+func v1WriteStatusFunc(stream io.WriteCloser) func(status *apierrors.StatusError) error {
+ return func(status *apierrors.StatusError) error {
+ if status.Status().Status == metav1.StatusSuccess {
+ return nil // send error messages
+ }
+ _, err := stream.Write([]byte(status.Error()))
+ return err
+ }
+}
+
+// v4WriteStatusFunc returns a WriteStatusFunc that marshals a given api Status
+// as json in the error channel.
+func v4WriteStatusFunc(stream io.WriteCloser) func(status *apierrors.StatusError) error {
+ return func(status *apierrors.StatusError) error {
+ bs, err := json.Marshal(status.Status())
+ if err != nil {
+ return err
+ }
+ _, err = stream.Write(bs)
+ return err
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/websocket.go b/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/websocket.go
new file mode 100644
index 000000000..c60012b21
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/websocket.go
@@ -0,0 +1,132 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package remotecommand
+
+import (
+ "fmt"
+ "net/http"
+ "time"
+
+ "k8s.io/apimachinery/pkg/util/runtime"
+ "k8s.io/apiserver/pkg/server/httplog"
+ "k8s.io/apiserver/pkg/util/wsstream"
+)
+
+const (
+ stdinChannel = iota
+ stdoutChannel
+ stderrChannel
+ errorChannel
+ resizeChannel
+
+ preV4BinaryWebsocketProtocol = wsstream.ChannelWebSocketProtocol
+ preV4Base64WebsocketProtocol = wsstream.Base64ChannelWebSocketProtocol
+ v4BinaryWebsocketProtocol = "v4." + wsstream.ChannelWebSocketProtocol
+ v4Base64WebsocketProtocol = "v4." + wsstream.Base64ChannelWebSocketProtocol
+)
+
+// createChannels returns the standard channel types for a shell connection (STDIN 0, STDOUT 1, STDERR 2)
+// along with the approximate duplex value. It also creates the error (3) and resize (4) channels.
+func createChannels(opts *Options) []wsstream.ChannelType {
+ // open the requested channels, and always open the error channel
+ channels := make([]wsstream.ChannelType, 5)
+ channels[stdinChannel] = readChannel(opts.Stdin)
+ channels[stdoutChannel] = writeChannel(opts.Stdout)
+ channels[stderrChannel] = writeChannel(opts.Stderr)
+ channels[errorChannel] = wsstream.WriteChannel
+ channels[resizeChannel] = wsstream.ReadChannel
+ return channels
+}
+
+// readChannel returns wsstream.ReadChannel if real is true, or wsstream.IgnoreChannel.
+func readChannel(real bool) wsstream.ChannelType {
+ if real {
+ return wsstream.ReadChannel
+ }
+ return wsstream.IgnoreChannel
+}
+
+// writeChannel returns wsstream.WriteChannel if real is true, or wsstream.IgnoreChannel.
+func writeChannel(real bool) wsstream.ChannelType {
+ if real {
+ return wsstream.WriteChannel
+ }
+ return wsstream.IgnoreChannel
+}
+
+// createWebSocketStreams returns a context containing the websocket connection and
+// streams needed to perform an exec or an attach.
+func createWebSocketStreams(req *http.Request, w http.ResponseWriter, opts *Options, idleTimeout time.Duration) (*context, bool) {
+ channels := createChannels(opts)
+ conn := wsstream.NewConn(map[string]wsstream.ChannelProtocolConfig{
+ "": {
+ Binary: true,
+ Channels: channels,
+ },
+ preV4BinaryWebsocketProtocol: {
+ Binary: true,
+ Channels: channels,
+ },
+ preV4Base64WebsocketProtocol: {
+ Binary: false,
+ Channels: channels,
+ },
+ v4BinaryWebsocketProtocol: {
+ Binary: true,
+ Channels: channels,
+ },
+ v4Base64WebsocketProtocol: {
+ Binary: false,
+ Channels: channels,
+ },
+ })
+ conn.SetIdleTimeout(idleTimeout)
+ negotiatedProtocol, streams, err := conn.Open(httplog.Unlogged(w), req)
+ if err != nil {
+ runtime.HandleError(fmt.Errorf("Unable to upgrade websocket connection: %v", err))
+ return nil, false
+ }
+
+ // Send an empty message to the lowest writable channel to notify the client the connection is established
+ // TODO: make generic to SPDY and WebSockets and do it outside of this method?
+ switch {
+ case opts.Stdout:
+ streams[stdoutChannel].Write([]byte{})
+ case opts.Stderr:
+ streams[stderrChannel].Write([]byte{})
+ default:
+ streams[errorChannel].Write([]byte{})
+ }
+
+ ctx := &context{
+ conn: conn,
+ stdinStream: streams[stdinChannel],
+ stdoutStream: streams[stdoutChannel],
+ stderrStream: streams[stderrChannel],
+ tty: opts.TTY,
+ resizeStream: streams[resizeChannel],
+ }
+
+ switch negotiatedProtocol {
+ case v4BinaryWebsocketProtocol, v4Base64WebsocketProtocol:
+ ctx.writeStatus = v4WriteStatusFunc(streams[errorChannel])
+ default:
+ ctx.writeStatus = v1WriteStatusFunc(streams[errorChannel])
+ }
+
+ return ctx, true
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/errors.go b/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/errors.go
new file mode 100644
index 000000000..9f16b4eb2
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/errors.go
@@ -0,0 +1,55 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package streaming
+
+import (
+ "fmt"
+ "net/http"
+ "strconv"
+
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+)
+
+func ErrorStreamingDisabled(method string) error {
+ return grpc.Errorf(codes.NotFound, fmt.Sprintf("streaming method %s disabled", method))
+}
+
+// The error returned when the maximum number of in-flight requests is exceeded.
+func ErrorTooManyInFlight() error {
+ return grpc.Errorf(codes.ResourceExhausted, "maximum number of in-flight requests exceeded")
+}
+
+// Translates a CRI streaming error into an appropriate HTTP response.
+func WriteError(err error, w http.ResponseWriter) error {
+ var status int
+ switch grpc.Code(err) {
+ case codes.NotFound:
+ status = http.StatusNotFound
+ case codes.ResourceExhausted:
+ // We only expect to hit this if there is a DoS, so we just wait the full TTL.
+ // If this is ever hit in steady-state operations, consider increasing the MaxInFlight requests,
+ // or plumbing through the time to next expiration.
+ w.Header().Set("Retry-After", strconv.Itoa(int(CacheTTL.Seconds())))
+ status = http.StatusTooManyRequests
+ default:
+ status = http.StatusInternalServerError
+ }
+ w.WriteHeader(status)
+ _, writeErr := w.Write([]byte(err.Error()))
+ return writeErr
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/request_cache.go b/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/request_cache.go
new file mode 100644
index 000000000..f68f640be
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/request_cache.go
@@ -0,0 +1,146 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package streaming
+
+import (
+ "container/list"
+ "crypto/rand"
+ "encoding/base64"
+ "fmt"
+ "math"
+ "sync"
+ "time"
+
+ "k8s.io/apimachinery/pkg/util/clock"
+)
+
+var (
+ // Timeout after which tokens become invalid.
+ CacheTTL = 1 * time.Minute
+ // The maximum number of in-flight requests to allow.
+ MaxInFlight = 1000
+ // Length of the random base64 encoded token identifying the request.
+ TokenLen = 8
+)
+
+// requestCache caches streaming (exec/attach/port-forward) requests and generates a single-use
+// random token for their retrieval. The requestCache is used for building streaming URLs without
+// the need to encode every request parameter in the URL.
+type requestCache struct {
+ // clock is used to obtain the current time
+ clock clock.Clock
+
+ // tokens maps the generate token to the request for fast retrieval.
+ tokens map[string]*list.Element
+ // ll maintains an age-ordered request list for faster garbage collection of expired requests.
+ ll *list.List
+
+ lock sync.Mutex
+}
+
+// Type representing an *ExecRequest, *AttachRequest, or *PortForwardRequest.
+type request interface{}
+
+type cacheEntry struct {
+ token string
+ req request
+ expireTime time.Time
+}
+
+func newRequestCache() *requestCache {
+ return &requestCache{
+ clock: clock.RealClock{},
+ ll: list.New(),
+ tokens: make(map[string]*list.Element),
+ }
+}
+
+// Insert the given request into the cache and returns the token used for fetching it out.
+func (c *requestCache) Insert(req request) (token string, err error) {
+ c.lock.Lock()
+ defer c.lock.Unlock()
+
+ // Remove expired entries.
+ c.gc()
+ // If the cache is full, reject the request.
+ if c.ll.Len() == MaxInFlight {
+ return "", ErrorTooManyInFlight()
+ }
+ token, err = c.uniqueToken()
+ if err != nil {
+ return "", err
+ }
+ ele := c.ll.PushFront(&cacheEntry{token, req, c.clock.Now().Add(CacheTTL)})
+
+ c.tokens[token] = ele
+ return token, nil
+}
+
+// Consume the token (remove it from the cache) and return the cached request, if found.
+func (c *requestCache) Consume(token string) (req request, found bool) {
+ c.lock.Lock()
+ defer c.lock.Unlock()
+ ele, ok := c.tokens[token]
+ if !ok {
+ return nil, false
+ }
+ c.ll.Remove(ele)
+ delete(c.tokens, token)
+
+ entry := ele.Value.(*cacheEntry)
+ if c.clock.Now().After(entry.expireTime) {
+ // Entry already expired.
+ return nil, false
+ }
+ return entry.req, true
+}
+
+// uniqueToken generates a random URL-safe token and ensures uniqueness.
+func (c *requestCache) uniqueToken() (string, error) {
+ const maxTries = 10
+ // Number of bytes to be TokenLen when base64 encoded.
+ tokenSize := math.Ceil(float64(TokenLen) * 6 / 8)
+ rawToken := make([]byte, int(tokenSize))
+ for i := 0; i < maxTries; i++ {
+ if _, err := rand.Read(rawToken); err != nil {
+ return "", err
+ }
+ encoded := base64.RawURLEncoding.EncodeToString(rawToken)
+ token := encoded[:TokenLen]
+ // If it's unique, return it. Otherwise retry.
+ if _, exists := c.tokens[encoded]; !exists {
+ return token, nil
+ }
+ }
+ return "", fmt.Errorf("failed to generate unique token")
+}
+
+// Must be write-locked prior to calling.
+func (c *requestCache) gc() {
+ now := c.clock.Now()
+ for c.ll.Len() > 0 {
+ oldest := c.ll.Back()
+ entry := oldest.Value.(*cacheEntry)
+ if !now.After(entry.expireTime) {
+ return
+ }
+
+ // Oldest value is expired; remove it.
+ c.ll.Remove(oldest)
+ delete(c.tokens, entry.token)
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/server.go b/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/server.go
new file mode 100644
index 000000000..875e44462
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/server.go
@@ -0,0 +1,344 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package streaming
+
+import (
+ "crypto/tls"
+ "errors"
+ "io"
+ "net/http"
+ "net/url"
+ "path"
+ "time"
+
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+
+ restful "github.com/emicklei/go-restful"
+
+ "k8s.io/apimachinery/pkg/types"
+ remotecommandconsts "k8s.io/apimachinery/pkg/util/remotecommand"
+ "k8s.io/client-go/tools/remotecommand"
+ runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
+ "k8s.io/kubernetes/pkg/kubelet/server/portforward"
+ remotecommandserver "k8s.io/kubernetes/pkg/kubelet/server/remotecommand"
+)
+
+// The library interface to serve the stream requests.
+type Server interface {
+ http.Handler
+
+ // Get the serving URL for the requests.
+ // Requests must not be nil. Responses may be nil iff an error is returned.
+ GetExec(*runtimeapi.ExecRequest) (*runtimeapi.ExecResponse, error)
+ GetAttach(req *runtimeapi.AttachRequest) (*runtimeapi.AttachResponse, error)
+ GetPortForward(*runtimeapi.PortForwardRequest) (*runtimeapi.PortForwardResponse, error)
+
+ // Start the server.
+ // addr is the address to serve on (address:port) stayUp indicates whether the server should
+ // listen until Stop() is called, or automatically stop after all expected connections are
+ // closed. Calling Get{Exec,Attach,PortForward} increments the expected connection count.
+ // Function does not return until the server is stopped.
+ Start(stayUp bool) error
+ // Stop the server, and terminate any open connections.
+ Stop() error
+}
+
+// The interface to execute the commands and provide the streams.
+type Runtime interface {
+ Exec(containerID string, cmd []string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) error
+ Attach(containerID string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) error
+ PortForward(podSandboxID string, port int32, stream io.ReadWriteCloser) error
+}
+
+// Config defines the options used for running the stream server.
+type Config struct {
+ // The host:port address the server will listen on.
+ Addr string
+ // The optional base URL for constructing streaming URLs. If empty, the baseURL will be
+ // constructed from the serve address.
+ BaseURL *url.URL
+
+ // How long to leave idle connections open for.
+ StreamIdleTimeout time.Duration
+ // How long to wait for clients to create streams. Only used for SPDY streaming.
+ StreamCreationTimeout time.Duration
+
+ // The streaming protocols the server supports (understands and permits). See
+ // k8s.io/kubernetes/pkg/kubelet/server/remotecommand/constants.go for available protocols.
+ // Only used for SPDY streaming.
+ SupportedRemoteCommandProtocols []string
+
+ // The streaming protocols the server supports (understands and permits). See
+ // k8s.io/kubernetes/pkg/kubelet/server/portforward/constants.go for available protocols.
+ // Only used for SPDY streaming.
+ SupportedPortForwardProtocols []string
+
+ // The config for serving over TLS. If nil, TLS will not be used.
+ TLSConfig *tls.Config
+}
+
+// DefaultConfig provides default values for server Config. The DefaultConfig is partial, so
+// some fields like Addr must still be provided.
+var DefaultConfig = Config{
+ StreamIdleTimeout: 4 * time.Hour,
+ StreamCreationTimeout: remotecommandconsts.DefaultStreamCreationTimeout,
+ SupportedRemoteCommandProtocols: remotecommandconsts.SupportedStreamingProtocols,
+ SupportedPortForwardProtocols: portforward.SupportedProtocols,
+}
+
+// TODO(timstclair): Add auth(n/z) interface & handling.
+func NewServer(config Config, runtime Runtime) (Server, error) {
+ s := &server{
+ config: config,
+ runtime: &criAdapter{runtime},
+ cache: newRequestCache(),
+ }
+
+ if s.config.BaseURL == nil {
+ s.config.BaseURL = &url.URL{
+ Scheme: "http",
+ Host: s.config.Addr,
+ }
+ if s.config.TLSConfig != nil {
+ s.config.BaseURL.Scheme = "https"
+ }
+ }
+
+ ws := &restful.WebService{}
+ endpoints := []struct {
+ path string
+ handler restful.RouteFunction
+ }{
+ {"/exec/{token}", s.serveExec},
+ {"/attach/{token}", s.serveAttach},
+ {"/portforward/{token}", s.servePortForward},
+ }
+ // If serving relative to a base path, set that here.
+ pathPrefix := path.Dir(s.config.BaseURL.Path)
+ for _, e := range endpoints {
+ for _, method := range []string{"GET", "POST"} {
+ ws.Route(ws.
+ Method(method).
+ Path(path.Join(pathPrefix, e.path)).
+ To(e.handler))
+ }
+ }
+ handler := restful.NewContainer()
+ handler.Add(ws)
+ s.handler = handler
+
+ return s, nil
+}
+
+type server struct {
+ config Config
+ runtime *criAdapter
+ handler http.Handler
+ cache *requestCache
+}
+
+func (s *server) GetExec(req *runtimeapi.ExecRequest) (*runtimeapi.ExecResponse, error) {
+ if req.ContainerId == "" {
+ return nil, grpc.Errorf(codes.InvalidArgument, "missing required container_id")
+ }
+ token, err := s.cache.Insert(req)
+ if err != nil {
+ return nil, err
+ }
+ return &runtimeapi.ExecResponse{
+ Url: s.buildURL("exec", token),
+ }, nil
+}
+
+func (s *server) GetAttach(req *runtimeapi.AttachRequest) (*runtimeapi.AttachResponse, error) {
+ if req.ContainerId == "" {
+ return nil, grpc.Errorf(codes.InvalidArgument, "missing required container_id")
+ }
+ token, err := s.cache.Insert(req)
+ if err != nil {
+ return nil, err
+ }
+ return &runtimeapi.AttachResponse{
+ Url: s.buildURL("attach", token),
+ }, nil
+}
+
+func (s *server) GetPortForward(req *runtimeapi.PortForwardRequest) (*runtimeapi.PortForwardResponse, error) {
+ if req.PodSandboxId == "" {
+ return nil, grpc.Errorf(codes.InvalidArgument, "missing required pod_sandbox_id")
+ }
+ token, err := s.cache.Insert(req)
+ if err != nil {
+ return nil, err
+ }
+ return &runtimeapi.PortForwardResponse{
+ Url: s.buildURL("portforward", token),
+ }, nil
+}
+
+func (s *server) Start(stayUp bool) error {
+ if !stayUp {
+ // TODO(timstclair): Implement this.
+ return errors.New("stayUp=false is not yet implemented")
+ }
+
+ server := &http.Server{
+ Addr: s.config.Addr,
+ Handler: s.handler,
+ TLSConfig: s.config.TLSConfig,
+ }
+ if s.config.TLSConfig != nil {
+ return server.ListenAndServeTLS("", "") // Use certs from TLSConfig.
+ } else {
+ return server.ListenAndServe()
+ }
+}
+
+func (s *server) Stop() error {
+ // TODO(timstclair): Implement this.
+ return errors.New("not yet implemented")
+}
+
+func (s *server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
+ s.handler.ServeHTTP(w, r)
+}
+
+func (s *server) buildURL(method, token string) string {
+ return s.config.BaseURL.ResolveReference(&url.URL{
+ Path: path.Join(method, token),
+ }).String()
+}
+
+func (s *server) serveExec(req *restful.Request, resp *restful.Response) {
+ token := req.PathParameter("token")
+ cachedRequest, ok := s.cache.Consume(token)
+ if !ok {
+ http.NotFound(resp.ResponseWriter, req.Request)
+ return
+ }
+ exec, ok := cachedRequest.(*runtimeapi.ExecRequest)
+ if !ok {
+ http.NotFound(resp.ResponseWriter, req.Request)
+ return
+ }
+
+ streamOpts := &remotecommandserver.Options{
+ Stdin: exec.Stdin,
+ Stdout: true,
+ Stderr: !exec.Tty,
+ TTY: exec.Tty,
+ }
+
+ remotecommandserver.ServeExec(
+ resp.ResponseWriter,
+ req.Request,
+ s.runtime,
+ "", // unused: podName
+ "", // unusued: podUID
+ exec.ContainerId,
+ exec.Cmd,
+ streamOpts,
+ s.config.StreamIdleTimeout,
+ s.config.StreamCreationTimeout,
+ s.config.SupportedRemoteCommandProtocols)
+}
+
+func (s *server) serveAttach(req *restful.Request, resp *restful.Response) {
+ token := req.PathParameter("token")
+ cachedRequest, ok := s.cache.Consume(token)
+ if !ok {
+ http.NotFound(resp.ResponseWriter, req.Request)
+ return
+ }
+ attach, ok := cachedRequest.(*runtimeapi.AttachRequest)
+ if !ok {
+ http.NotFound(resp.ResponseWriter, req.Request)
+ return
+ }
+
+ streamOpts := &remotecommandserver.Options{
+ Stdin: attach.Stdin,
+ Stdout: true,
+ Stderr: !attach.Tty,
+ TTY: attach.Tty,
+ }
+ remotecommandserver.ServeAttach(
+ resp.ResponseWriter,
+ req.Request,
+ s.runtime,
+ "", // unused: podName
+ "", // unusued: podUID
+ attach.ContainerId,
+ streamOpts,
+ s.config.StreamIdleTimeout,
+ s.config.StreamCreationTimeout,
+ s.config.SupportedRemoteCommandProtocols)
+}
+
+func (s *server) servePortForward(req *restful.Request, resp *restful.Response) {
+ token := req.PathParameter("token")
+ cachedRequest, ok := s.cache.Consume(token)
+ if !ok {
+ http.NotFound(resp.ResponseWriter, req.Request)
+ return
+ }
+ pf, ok := cachedRequest.(*runtimeapi.PortForwardRequest)
+ if !ok {
+ http.NotFound(resp.ResponseWriter, req.Request)
+ return
+ }
+
+ portForwardOptions, err := portforward.BuildV4Options(pf.Port)
+ if err != nil {
+ resp.WriteError(http.StatusBadRequest, err)
+ return
+ }
+
+ portforward.ServePortForward(
+ resp.ResponseWriter,
+ req.Request,
+ s.runtime,
+ pf.PodSandboxId,
+ "", // unused: podUID
+ portForwardOptions,
+ s.config.StreamIdleTimeout,
+ s.config.StreamCreationTimeout,
+ s.config.SupportedPortForwardProtocols)
+}
+
+// criAdapter wraps the Runtime functions to conform to the remotecommand interfaces.
+// The adapter binds the container ID to the container name argument, and the pod sandbox ID to the pod name.
+type criAdapter struct {
+ Runtime
+}
+
+var _ remotecommandserver.Executor = &criAdapter{}
+var _ remotecommandserver.Attacher = &criAdapter{}
+var _ portforward.PortForwarder = &criAdapter{}
+
+func (a *criAdapter) ExecInContainer(podName string, podUID types.UID, container string, cmd []string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize, timeout time.Duration) error {
+ return a.Exec(container, cmd, in, out, err, tty, resize)
+}
+
+func (a *criAdapter) AttachContainer(podName string, podUID types.UID, container string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) error {
+ return a.Attach(container, in, out, err, tty, resize)
+}
+
+func (a *criAdapter) PortForward(podName string, podUID types.UID, port int32, stream io.ReadWriteCloser) error {
+ return a.Runtime.PortForward(podName, port, stream)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/types/constants.go b/vendor/k8s.io/kubernetes/pkg/kubelet/types/constants.go
new file mode 100644
index 000000000..eeabba017
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/types/constants.go
@@ -0,0 +1,22 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package types
+
+const (
+ // system default DNS resolver configuration
+ ResolvConfDefault = "/etc/resolv.conf"
+)
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/types/doc.go b/vendor/k8s.io/kubernetes/pkg/kubelet/types/doc.go
new file mode 100644
index 000000000..88e345636
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/types/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Common types in the Kubelet.
+package types // import "k8s.io/kubernetes/pkg/kubelet/types"
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/types/labels.go b/vendor/k8s.io/kubernetes/pkg/kubelet/types/labels.go
new file mode 100644
index 000000000..c4dad6302
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/types/labels.go
@@ -0,0 +1,40 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package types
+
+const (
+ KubernetesPodNameLabel = "io.kubernetes.pod.name"
+ KubernetesPodNamespaceLabel = "io.kubernetes.pod.namespace"
+ KubernetesPodUIDLabel = "io.kubernetes.pod.uid"
+ KubernetesContainerNameLabel = "io.kubernetes.container.name"
+)
+
+func GetContainerName(labels map[string]string) string {
+ return labels[KubernetesContainerNameLabel]
+}
+
+func GetPodName(labels map[string]string) string {
+ return labels[KubernetesPodNameLabel]
+}
+
+func GetPodUID(labels map[string]string) string {
+ return labels[KubernetesPodUIDLabel]
+}
+
+func GetPodNamespace(labels map[string]string) string {
+ return labels[KubernetesPodNamespaceLabel]
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/types/pod_update.go b/vendor/k8s.io/kubernetes/pkg/kubelet/types/pod_update.go
new file mode 100644
index 000000000..2c2dbb8a0
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/types/pod_update.go
@@ -0,0 +1,153 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package types
+
+import (
+ "fmt"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ kubeapi "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/v1"
+)
+
+const (
+ ConfigSourceAnnotationKey = "kubernetes.io/config.source"
+ ConfigMirrorAnnotationKey = v1.MirrorPodAnnotationKey
+ ConfigFirstSeenAnnotationKey = "kubernetes.io/config.seen"
+ ConfigHashAnnotationKey = "kubernetes.io/config.hash"
+ CriticalPodAnnotationKey = "scheduler.alpha.kubernetes.io/critical-pod"
+)
+
+// PodOperation defines what changes will be made on a pod configuration.
+type PodOperation int
+
+const (
+ // This is the current pod configuration
+ SET PodOperation = iota
+ // Pods with the given ids are new to this source
+ ADD
+ // Pods with the given ids are gracefully deleted from this source
+ DELETE
+ // Pods with the given ids have been removed from this source
+ REMOVE
+ // Pods with the given ids have been updated in this source
+ UPDATE
+ // Pods with the given ids have unexpected status in this source,
+ // kubelet should reconcile status with this source
+ RECONCILE
+
+ // These constants identify the sources of pods
+ // Updates from a file
+ FileSource = "file"
+ // Updates from querying a web page
+ HTTPSource = "http"
+ // Updates from Kubernetes API Server
+ ApiserverSource = "api"
+ // Updates from all sources
+ AllSource = "*"
+
+ NamespaceDefault = metav1.NamespaceDefault
+)
+
+// PodUpdate defines an operation sent on the channel. You can add or remove single services by
+// sending an array of size one and Op == ADD|REMOVE (with REMOVE, only the ID is required).
+// For setting the state of the system to a given state for this source configuration, set
+// Pods as desired and Op to SET, which will reset the system state to that specified in this
+// operation for this source channel. To remove all pods, set Pods to empty object and Op to SET.
+//
+// Additionally, Pods should never be nil - it should always point to an empty slice. While
+// functionally similar, this helps our unit tests properly check that the correct PodUpdates
+// are generated.
+type PodUpdate struct {
+ Pods []*v1.Pod
+ Op PodOperation
+ Source string
+}
+
+// Gets all validated sources from the specified sources.
+func GetValidatedSources(sources []string) ([]string, error) {
+ validated := make([]string, 0, len(sources))
+ for _, source := range sources {
+ switch source {
+ case AllSource:
+ return []string{FileSource, HTTPSource, ApiserverSource}, nil
+ case FileSource, HTTPSource, ApiserverSource:
+ validated = append(validated, source)
+ break
+ case "":
+ break
+ default:
+ return []string{}, fmt.Errorf("unknown pod source %q", source)
+ }
+ }
+ return validated, nil
+}
+
+// GetPodSource returns the source of the pod based on the annotation.
+func GetPodSource(pod *v1.Pod) (string, error) {
+ if pod.Annotations != nil {
+ if source, ok := pod.Annotations[ConfigSourceAnnotationKey]; ok {
+ return source, nil
+ }
+ }
+ return "", fmt.Errorf("cannot get source of pod %q", pod.UID)
+}
+
+// SyncPodType classifies pod updates, eg: create, update.
+type SyncPodType int
+
+const (
+ // SyncPodSync is when the pod is synced to ensure desired state
+ SyncPodSync SyncPodType = iota
+ // SyncPodUpdate is when the pod is updated from source
+ SyncPodUpdate
+ // SyncPodCreate is when the pod is created from source
+ SyncPodCreate
+ // SyncPodKill is when the pod is killed based on a trigger internal to the kubelet for eviction.
+ // If a SyncPodKill request is made to pod workers, the request is never dropped, and will always be processed.
+ SyncPodKill
+)
+
+func (sp SyncPodType) String() string {
+ switch sp {
+ case SyncPodCreate:
+ return "create"
+ case SyncPodUpdate:
+ return "update"
+ case SyncPodSync:
+ return "sync"
+ case SyncPodKill:
+ return "kill"
+ default:
+ return "unknown"
+ }
+}
+
+// IsCriticalPod returns true if the pod bears the critical pod annotation
+// key. Both the rescheduler and the kubelet use this key to make admission
+// and scheduling decisions.
+func IsCriticalPod(pod *v1.Pod) bool {
+ // Critical pods are restricted to "kube-system" namespace as of now.
+ if pod.Namespace != kubeapi.NamespaceSystem {
+ return false
+ }
+ val, ok := pod.Annotations[CriticalPodAnnotationKey]
+ if ok && val == "" {
+ return true
+ }
+ return false
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/types/types.go b/vendor/k8s.io/kubernetes/pkg/kubelet/types/types.go
new file mode 100644
index 000000000..35359c7aa
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/types/types.go
@@ -0,0 +1,93 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package types
+
+import (
+ "net/http"
+ "time"
+
+ "k8s.io/kubernetes/pkg/api/v1"
+)
+
+// TODO: Reconcile custom types in kubelet/types and this subpackage
+
+type HttpGetter interface {
+ Get(url string) (*http.Response, error)
+}
+
+// Timestamp wraps around time.Time and offers utilities to format and parse
+// the time using RFC3339Nano
+type Timestamp struct {
+ time time.Time
+}
+
+// NewTimestamp returns a Timestamp object using the current time.
+func NewTimestamp() *Timestamp {
+ return &Timestamp{time.Now()}
+}
+
+// ConvertToTimestamp takes a string, parses it using the RFC3339Nano layout,
+// and converts it to a Timestamp object.
+func ConvertToTimestamp(timeString string) *Timestamp {
+ parsed, _ := time.Parse(time.RFC3339Nano, timeString)
+ return &Timestamp{parsed}
+}
+
+// Get returns the time as time.Time.
+func (t *Timestamp) Get() time.Time {
+ return t.time
+}
+
+// GetString returns the time in the string format using the RFC3339Nano
+// layout.
+func (t *Timestamp) GetString() string {
+ return t.time.Format(time.RFC3339Nano)
+}
+
+// A type to help sort container statuses based on container names.
+type SortedContainerStatuses []v1.ContainerStatus
+
+func (s SortedContainerStatuses) Len() int { return len(s) }
+func (s SortedContainerStatuses) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
+
+func (s SortedContainerStatuses) Less(i, j int) bool {
+ return s[i].Name < s[j].Name
+}
+
+// SortInitContainerStatuses ensures that statuses are in the order that their
+// init container appears in the pod spec
+func SortInitContainerStatuses(p *v1.Pod, statuses []v1.ContainerStatus) {
+ containers := p.Spec.InitContainers
+ current := 0
+ for _, container := range containers {
+ for j := current; j < len(statuses); j++ {
+ if container.Name == statuses[j].Name {
+ statuses[current], statuses[j] = statuses[j], statuses[current]
+ current++
+ break
+ }
+ }
+ }
+}
+
+// Reservation represents reserved resources for non-pod components.
+type Reservation struct {
+ // System represents resources reserved for non-kubernetes components.
+ System v1.ResourceList
+ // Kubernetes represents resources reserved for kubernetes system components.
+ Kubernetes v1.ResourceList
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/format/pod.go b/vendor/k8s.io/kubernetes/pkg/kubelet/util/format/pod.go
new file mode 100644
index 000000000..da20d42e8
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/format/pod.go
@@ -0,0 +1,72 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package format
+
+import (
+ "fmt"
+ "strings"
+ "time"
+
+ "k8s.io/apimachinery/pkg/types"
+ "k8s.io/kubernetes/pkg/api/v1"
+)
+
+type podHandler func(*v1.Pod) string
+
+// Pod returns a string representing a pod in a consistent human readable format,
+// with pod UID as part of the string.
+func Pod(pod *v1.Pod) string {
+ return PodDesc(pod.Name, pod.Namespace, pod.UID)
+}
+
+// PodDesc returns a string representing a pod in a consistent human readable format,
+// with pod UID as part of the string.
+func PodDesc(podName, podNamespace string, podUID types.UID) string {
+ // Use underscore as the delimiter because it is not allowed in pod name
+ // (DNS subdomain format), while allowed in the container name format.
+ return fmt.Sprintf("%s_%s(%s)", podName, podNamespace, podUID)
+}
+
+// PodWithDeletionTimestamp is the same as Pod. In addition, it prints the
+// deletion timestamp of the pod if it's not nil.
+func PodWithDeletionTimestamp(pod *v1.Pod) string {
+ var deletionTimestamp string
+ if pod.DeletionTimestamp != nil {
+ deletionTimestamp = ":DeletionTimestamp=" + pod.DeletionTimestamp.UTC().Format(time.RFC3339)
+ }
+ return Pod(pod) + deletionTimestamp
+}
+
+// Pods returns a string representating a list of pods in a human
+// readable format.
+func Pods(pods []*v1.Pod) string {
+ return aggregatePods(pods, Pod)
+}
+
+// PodsWithDeletiontimestamps is the same as Pods. In addition, it prints the
+// deletion timestamps of the pods if they are not nil.
+func PodsWithDeletiontimestamps(pods []*v1.Pod) string {
+ return aggregatePods(pods, PodWithDeletionTimestamp)
+}
+
+func aggregatePods(pods []*v1.Pod, handler podHandler) string {
+ podStrings := make([]string, 0, len(pods))
+ for _, pod := range pods {
+ podStrings = append(podStrings, handler(pod))
+ }
+ return fmt.Sprintf(strings.Join(podStrings, ", "))
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/format/resources.go b/vendor/k8s.io/kubernetes/pkg/kubelet/util/format/resources.go
new file mode 100644
index 000000000..bc50bc9c6
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/format/resources.go
@@ -0,0 +1,36 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package format
+
+import (
+ "fmt"
+ "sort"
+ "strings"
+
+ "k8s.io/kubernetes/pkg/api/v1"
+)
+
+// ResourceList returns a string representation of a resource list in a human readable format.
+func ResourceList(resources v1.ResourceList) string {
+ resourceStrings := make([]string, 0, len(resources))
+ for key, value := range resources {
+ resourceStrings = append(resourceStrings, fmt.Sprintf("%v=%v", key, value.String()))
+ }
+ // sort the results for consistent log output
+ sort.Strings(resourceStrings)
+ return strings.Join(resourceStrings, ",")
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/ioutils/ioutils.go b/vendor/k8s.io/kubernetes/pkg/kubelet/util/ioutils/ioutils.go
new file mode 100644
index 000000000..42f1998c7
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/ioutils/ioutils.go
@@ -0,0 +1,37 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package ioutils
+
+import "io"
+
+// writeCloserWrapper represents a WriteCloser whose closer operation is noop.
+type writeCloserWrapper struct {
+ Writer io.Writer
+}
+
+func (w *writeCloserWrapper) Write(buf []byte) (int, error) {
+ return w.Writer.Write(buf)
+}
+
+func (w *writeCloserWrapper) Close() error {
+ return nil
+}
+
+// WriteCloserWrapper returns a writeCloserWrapper.
+func WriteCloserWrapper(w io.Writer) io.WriteCloser {
+ return &writeCloserWrapper{w}
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/doc.go b/vendor/k8s.io/kubernetes/pkg/proxy/doc.go
new file mode 100644
index 000000000..3bed0fa39
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/proxy/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package proxy implements the layer-3 network proxy.
+package proxy // import "k8s.io/kubernetes/pkg/proxy"
diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/healthcheck/doc.go b/vendor/k8s.io/kubernetes/pkg/proxy/healthcheck/doc.go
new file mode 100644
index 000000000..0a9ea0944
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/proxy/healthcheck/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package healthcheck provides tools for serving kube-proxy healthchecks.
+package healthcheck // import "k8s.io/kubernetes/pkg/proxy/healthcheck"
diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/healthcheck/healthcheck.go b/vendor/k8s.io/kubernetes/pkg/proxy/healthcheck/healthcheck.go
new file mode 100644
index 000000000..39f10f71a
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/proxy/healthcheck/healthcheck.go
@@ -0,0 +1,333 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package healthcheck
+
+import (
+ "fmt"
+ "net"
+ "net/http"
+ "strings"
+ "sync"
+ "sync/atomic"
+ "time"
+
+ "github.com/golang/glog"
+ "github.com/renstrom/dedent"
+
+ "k8s.io/apimachinery/pkg/types"
+ "k8s.io/apimachinery/pkg/util/clock"
+ clientv1 "k8s.io/client-go/pkg/api/v1"
+ "k8s.io/client-go/tools/record"
+ "k8s.io/kubernetes/pkg/api"
+)
+
+// Server serves HTTP endpoints for each service name, with results
+// based on the endpoints. If there are 0 endpoints for a service, it returns a
+// 503 "Service Unavailable" error (telling LBs not to use this node). If there
+// are 1 or more endpoints, it returns a 200 "OK".
+type Server interface {
+ // Make the new set of services be active. Services that were open before
+ // will be closed. Services that are new will be opened. Service that
+ // existed and are in the new set will be left alone. The value of the map
+ // is the healthcheck-port to listen on.
+ SyncServices(newServices map[types.NamespacedName]uint16) error
+ // Make the new set of endpoints be active. Endpoints for services that do
+ // not exist will be dropped. The value of the map is the number of
+ // endpoints the service has on this node.
+ SyncEndpoints(newEndpoints map[types.NamespacedName]int) error
+}
+
+// Listener allows for testing of Server. If the Listener argument
+// to NewServer() is nil, the real net.Listen function will be used.
+type Listener interface {
+ // Listen is very much like net.Listen, except the first arg (network) is
+ // fixed to be "tcp".
+ Listen(addr string) (net.Listener, error)
+}
+
+// HTTPServerFactory allows for testing of Server. If the
+// HTTPServerFactory argument to NewServer() is nil, the real
+// http.Server type will be used.
+type HTTPServerFactory interface {
+ // New creates an instance of a type satisfying HTTPServer. This is
+ // designed to include http.Server.
+ New(addr string, handler http.Handler) HTTPServer
+}
+
+// HTTPServer allows for testing of Server.
+type HTTPServer interface {
+ // Server is designed so that http.Server satifies this interface,
+ Serve(listener net.Listener) error
+}
+
+// NewServer allocates a new healthcheck server manager. If either
+// of the injected arguments are nil, defaults will be used.
+func NewServer(hostname string, recorder record.EventRecorder, listener Listener, httpServerFactory HTTPServerFactory) Server {
+ if listener == nil {
+ listener = stdNetListener{}
+ }
+ if httpServerFactory == nil {
+ httpServerFactory = stdHTTPServerFactory{}
+ }
+ return &server{
+ hostname: hostname,
+ recorder: recorder,
+ listener: listener,
+ httpFactory: httpServerFactory,
+ services: map[types.NamespacedName]*hcInstance{},
+ }
+}
+
+// Implement Listener in terms of net.Listen.
+type stdNetListener struct{}
+
+func (stdNetListener) Listen(addr string) (net.Listener, error) {
+ return net.Listen("tcp", addr)
+}
+
+var _ Listener = stdNetListener{}
+
+// Implement HTTPServerFactory in terms of http.Server.
+type stdHTTPServerFactory struct{}
+
+func (stdHTTPServerFactory) New(addr string, handler http.Handler) HTTPServer {
+ return &http.Server{
+ Addr: addr,
+ Handler: handler,
+ }
+}
+
+var _ HTTPServerFactory = stdHTTPServerFactory{}
+
+type server struct {
+ hostname string
+ recorder record.EventRecorder // can be nil
+ listener Listener
+ httpFactory HTTPServerFactory
+
+ lock sync.Mutex
+ services map[types.NamespacedName]*hcInstance
+}
+
+func (hcs *server) SyncServices(newServices map[types.NamespacedName]uint16) error {
+ hcs.lock.Lock()
+ defer hcs.lock.Unlock()
+
+ // Remove any that are not needed any more.
+ for nsn, svc := range hcs.services {
+ if port, found := newServices[nsn]; !found || port != svc.port {
+ glog.V(2).Infof("Closing healthcheck %q on port %d", nsn.String(), svc.port)
+ if err := svc.listener.Close(); err != nil {
+ glog.Errorf("Close(%v): %v", svc.listener.Addr(), err)
+ }
+ delete(hcs.services, nsn)
+ }
+ }
+
+ // Add any that are needed.
+ for nsn, port := range newServices {
+ if hcs.services[nsn] != nil {
+ glog.V(3).Infof("Existing healthcheck %q on port %d", nsn.String(), port)
+ continue
+ }
+
+ glog.V(2).Infof("Opening healthcheck %q on port %d", nsn.String(), port)
+ svc := &hcInstance{port: port}
+ addr := fmt.Sprintf(":%d", port)
+ svc.server = hcs.httpFactory.New(addr, hcHandler{name: nsn, hcs: hcs})
+ var err error
+ svc.listener, err = hcs.listener.Listen(addr)
+ if err != nil {
+ msg := fmt.Sprintf("node %s failed to start healthcheck %q on port %d: %v", hcs.hostname, nsn.String(), port, err)
+
+ if hcs.recorder != nil {
+ hcs.recorder.Eventf(
+ &clientv1.ObjectReference{
+ Kind: "Service",
+ Namespace: nsn.Namespace,
+ Name: nsn.Name,
+ UID: types.UID(nsn.String()),
+ }, api.EventTypeWarning, "FailedToStartHealthcheck", msg)
+ }
+ glog.Error(msg)
+ continue
+ }
+ hcs.services[nsn] = svc
+
+ go func(nsn types.NamespacedName, svc *hcInstance) {
+ // Serve() will exit when the listener is closed.
+ glog.V(3).Infof("Starting goroutine for healthcheck %q on port %d", nsn.String(), svc.port)
+ if err := svc.server.Serve(svc.listener); err != nil {
+ glog.V(3).Infof("Healthcheck %q closed: %v", nsn.String(), err)
+ return
+ }
+ glog.V(3).Infof("Healthcheck %q closed", nsn.String())
+ }(nsn, svc)
+ }
+ return nil
+}
+
+type hcInstance struct {
+ port uint16
+ listener net.Listener
+ server HTTPServer
+ endpoints int // number of local endpoints for a service
+}
+
+type hcHandler struct {
+ name types.NamespacedName
+ hcs *server
+}
+
+var _ http.Handler = hcHandler{}
+
+func (h hcHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request) {
+ h.hcs.lock.Lock()
+ svc, ok := h.hcs.services[h.name]
+ if !ok || svc == nil {
+ h.hcs.lock.Unlock()
+ glog.Errorf("Received request for closed healthcheck %q", h.name.String())
+ return
+ }
+ count := svc.endpoints
+ h.hcs.lock.Unlock()
+
+ resp.Header().Set("Content-Type", "application/json")
+ if count == 0 {
+ resp.WriteHeader(http.StatusServiceUnavailable)
+ } else {
+ resp.WriteHeader(http.StatusOK)
+ }
+ fmt.Fprintf(resp, strings.Trim(dedent.Dedent(fmt.Sprintf(`
+ {
+ "service": {
+ "namespace": %q,
+ "name": %q
+ },
+ "localEndpoints": %d
+ }
+ `, h.name.Namespace, h.name.Name, count)), "\n"))
+}
+
+func (hcs *server) SyncEndpoints(newEndpoints map[types.NamespacedName]int) error {
+ hcs.lock.Lock()
+ defer hcs.lock.Unlock()
+
+ for nsn, count := range newEndpoints {
+ if hcs.services[nsn] == nil {
+ glog.V(3).Infof("Not saving endpoints for unknown healthcheck %q", nsn.String())
+ continue
+ }
+ glog.V(3).Infof("Reporting %d endpoints for healthcheck %q", count, nsn.String())
+ hcs.services[nsn].endpoints = count
+ }
+ for nsn, hci := range hcs.services {
+ if _, found := newEndpoints[nsn]; !found {
+ hci.endpoints = 0
+ }
+ }
+ return nil
+}
+
+// HealthzUpdater allows callers to update healthz timestamp only.
+type HealthzUpdater interface {
+ UpdateTimestamp()
+}
+
+// HealthzServer returns 200 "OK" by default. Once timestamp has been
+// updated, it verifies we don't exceed max no respond duration since
+// last update.
+type HealthzServer struct {
+ listener Listener
+ httpFactory HTTPServerFactory
+ clock clock.Clock
+
+ addr string
+ port int32
+ healthTimeout time.Duration
+
+ lastUpdated atomic.Value
+}
+
+// NewDefaultHealthzServer returns a default healthz http server.
+func NewDefaultHealthzServer(addr string, healthTimeout time.Duration) *HealthzServer {
+ return newHealthzServer(nil, nil, nil, addr, healthTimeout)
+}
+
+func newHealthzServer(listener Listener, httpServerFactory HTTPServerFactory, c clock.Clock, addr string, healthTimeout time.Duration) *HealthzServer {
+ if listener == nil {
+ listener = stdNetListener{}
+ }
+ if httpServerFactory == nil {
+ httpServerFactory = stdHTTPServerFactory{}
+ }
+ if c == nil {
+ c = clock.RealClock{}
+ }
+ return &HealthzServer{
+ listener: listener,
+ httpFactory: httpServerFactory,
+ clock: c,
+ addr: addr,
+ healthTimeout: healthTimeout,
+ }
+}
+
+// UpdateTimestamp updates the lastUpdated timestamp.
+func (hs *HealthzServer) UpdateTimestamp() {
+ hs.lastUpdated.Store(hs.clock.Now())
+}
+
+// Run starts the healthz http server and returns.
+func (hs *HealthzServer) Run() {
+ serveMux := http.NewServeMux()
+ serveMux.Handle("/healthz", healthzHandler{hs: hs})
+ server := hs.httpFactory.New(hs.addr, serveMux)
+ listener, err := hs.listener.Listen(hs.addr)
+ if err != nil {
+ glog.Errorf("Failed to start healthz on %s: %v", hs.addr, err)
+ return
+ }
+ go func() {
+ glog.V(3).Infof("Starting goroutine for healthz on %s", hs.addr)
+ if err := server.Serve(listener); err != nil {
+ glog.Errorf("Healhz closed: %v", err)
+ return
+ }
+ glog.Errorf("Unexpected healhz closed.")
+ }()
+}
+
+type healthzHandler struct {
+ hs *HealthzServer
+}
+
+func (h healthzHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request) {
+ lastUpdated := time.Time{}
+ if val := h.hs.lastUpdated.Load(); val != nil {
+ lastUpdated = val.(time.Time)
+ }
+ currentTime := h.hs.clock.Now()
+
+ resp.Header().Set("Content-Type", "application/json")
+ if !lastUpdated.IsZero() && currentTime.After(lastUpdated.Add(h.hs.healthTimeout)) {
+ resp.WriteHeader(http.StatusServiceUnavailable)
+ } else {
+ resp.WriteHeader(http.StatusOK)
+ }
+ fmt.Fprintf(resp, fmt.Sprintf(`{"lastUpdated": %q,"currentTime": %q}`, lastUpdated, currentTime))
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/iptables/metrics.go b/vendor/k8s.io/kubernetes/pkg/proxy/iptables/metrics.go
new file mode 100644
index 000000000..fabe6a595
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/proxy/iptables/metrics.go
@@ -0,0 +1,50 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package iptables
+
+import (
+ "sync"
+ "time"
+
+ "github.com/prometheus/client_golang/prometheus"
+)
+
+const kubeProxySubsystem = "kubeproxy"
+
+var (
+ SyncProxyRulesLatency = prometheus.NewHistogram(
+ prometheus.HistogramOpts{
+ Subsystem: kubeProxySubsystem,
+ Name: "sync_proxy_rules_latency_microseconds",
+ Help: "SyncProxyRules latency",
+ Buckets: prometheus.ExponentialBuckets(1000, 2, 15),
+ },
+ )
+)
+
+var registerMetricsOnce sync.Once
+
+func RegisterMetrics() {
+ registerMetricsOnce.Do(func() {
+ prometheus.MustRegister(SyncProxyRulesLatency)
+ })
+}
+
+// Gets the time since the specified start in microseconds.
+func sinceInMicroseconds(start time.Time) float64 {
+ return float64(time.Since(start).Nanoseconds() / time.Microsecond.Nanoseconds())
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/iptables/proxier.go b/vendor/k8s.io/kubernetes/pkg/proxy/iptables/proxier.go
new file mode 100644
index 000000000..9d29d7b42
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/proxy/iptables/proxier.go
@@ -0,0 +1,1732 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package iptables
+
+//
+// NOTE: this needs to be tested in e2e since it uses iptables for everything.
+//
+
+import (
+ "bytes"
+ "crypto/sha256"
+ "encoding/base32"
+ "fmt"
+ "net"
+ "reflect"
+ "strconv"
+ "strings"
+ "sync"
+ "sync/atomic"
+ "time"
+
+ "github.com/golang/glog"
+
+ "k8s.io/apimachinery/pkg/types"
+ "k8s.io/apimachinery/pkg/util/sets"
+ "k8s.io/apimachinery/pkg/util/wait"
+ utilfeature "k8s.io/apiserver/pkg/util/feature"
+ clientv1 "k8s.io/client-go/pkg/api/v1"
+ "k8s.io/client-go/tools/record"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/helper"
+ apiservice "k8s.io/kubernetes/pkg/api/service"
+ "k8s.io/kubernetes/pkg/features"
+ "k8s.io/kubernetes/pkg/proxy"
+ "k8s.io/kubernetes/pkg/proxy/healthcheck"
+ utilproxy "k8s.io/kubernetes/pkg/proxy/util"
+ "k8s.io/kubernetes/pkg/util/async"
+ utilexec "k8s.io/kubernetes/pkg/util/exec"
+ utiliptables "k8s.io/kubernetes/pkg/util/iptables"
+ utilsysctl "k8s.io/kubernetes/pkg/util/sysctl"
+ utilversion "k8s.io/kubernetes/pkg/util/version"
+)
+
+const (
+ // iptablesMinVersion is the minimum version of iptables for which we will use the Proxier
+ // from this package instead of the userspace Proxier. While most of the
+ // features we need were available earlier, the '-C' flag was added more
+ // recently. We use that indirectly in Ensure* functions, and if we don't
+ // have it, we have to be extra careful about the exact args we feed in being
+ // the same as the args we read back (iptables itself normalizes some args).
+ // This is the "new" Proxier, so we require "new" versions of tools.
+ iptablesMinVersion = utiliptables.MinCheckVersion
+
+ // the services chain
+ kubeServicesChain utiliptables.Chain = "KUBE-SERVICES"
+
+ // the nodeports chain
+ kubeNodePortsChain utiliptables.Chain = "KUBE-NODEPORTS"
+
+ // the kubernetes postrouting chain
+ kubePostroutingChain utiliptables.Chain = "KUBE-POSTROUTING"
+
+ // the mark-for-masquerade chain
+ KubeMarkMasqChain utiliptables.Chain = "KUBE-MARK-MASQ"
+
+ // the mark-for-drop chain
+ KubeMarkDropChain utiliptables.Chain = "KUBE-MARK-DROP"
+)
+
+// IPTablesVersioner can query the current iptables version.
+type IPTablesVersioner interface {
+ // returns "X.Y.Z"
+ GetVersion() (string, error)
+}
+
+// KernelCompatTester tests whether the required kernel capabilities are
+// present to run the iptables proxier.
+type KernelCompatTester interface {
+ IsCompatible() error
+}
+
+// CanUseIPTablesProxier returns true if we should use the iptables Proxier
+// instead of the "classic" userspace Proxier. This is determined by checking
+// the iptables version and for the existence of kernel features. It may return
+// an error if it fails to get the iptables version without error, in which
+// case it will also return false.
+func CanUseIPTablesProxier(iptver IPTablesVersioner, kcompat KernelCompatTester) (bool, error) {
+ minVersion, err := utilversion.ParseGeneric(iptablesMinVersion)
+ if err != nil {
+ return false, err
+ }
+ versionString, err := iptver.GetVersion()
+ if err != nil {
+ return false, err
+ }
+ version, err := utilversion.ParseGeneric(versionString)
+ if err != nil {
+ return false, err
+ }
+ if version.LessThan(minVersion) {
+ return false, nil
+ }
+
+ // Check that the kernel supports what we need.
+ if err := kcompat.IsCompatible(); err != nil {
+ return false, err
+ }
+ return true, nil
+}
+
+type LinuxKernelCompatTester struct{}
+
+func (lkct LinuxKernelCompatTester) IsCompatible() error {
+ // Check for the required sysctls. We don't care about the value, just
+ // that it exists. If this Proxier is chosen, we'll initialize it as we
+ // need.
+ _, err := utilsysctl.New().GetSysctl(sysctlRouteLocalnet)
+ return err
+}
+
+const sysctlRouteLocalnet = "net/ipv4/conf/all/route_localnet"
+const sysctlBridgeCallIPTables = "net/bridge/bridge-nf-call-iptables"
+
+// internal struct for string service information
+type serviceInfo struct {
+ clusterIP net.IP
+ port int
+ protocol api.Protocol
+ nodePort int
+ loadBalancerStatus api.LoadBalancerStatus
+ sessionAffinityType api.ServiceAffinity
+ stickyMaxAgeMinutes int
+ externalIPs []string
+ loadBalancerSourceRanges []string
+ onlyNodeLocalEndpoints bool
+ healthCheckNodePort int
+ // The following fields are computed and stored for performance reasons.
+ serviceNameString string
+ servicePortChainName utiliptables.Chain
+ serviceFirewallChainName utiliptables.Chain
+ serviceLBChainName utiliptables.Chain
+}
+
+// internal struct for endpoints information
+type endpointsInfo struct {
+ endpoint string // TODO: should be an endpointString type
+ isLocal bool
+ // The following fields we lazily compute and store here for performance
+ // reasons. If the protocol is the same as you expect it to be, then the
+ // chainName can be reused, otherwise it should be recomputed.
+ protocol string
+ chainName utiliptables.Chain
+}
+
+// Returns just the IP part of the endpoint.
+func (e *endpointsInfo) IPPart() string {
+ if index := strings.Index(e.endpoint, ":"); index != -1 {
+ return e.endpoint[0:index]
+ }
+ return e.endpoint
+}
+
+// Returns the endpoint chain name for a given endpointsInfo.
+func (e *endpointsInfo) endpointChain(svcNameString, protocol string) utiliptables.Chain {
+ if e.protocol != protocol {
+ e.protocol = protocol
+ e.chainName = servicePortEndpointChainName(svcNameString, protocol, e.endpoint)
+ }
+ return e.chainName
+}
+
+func (e *endpointsInfo) String() string {
+ return fmt.Sprintf("%v", *e)
+}
+
+// returns a new serviceInfo struct
+func newServiceInfo(svcPortName proxy.ServicePortName, port *api.ServicePort, service *api.Service) *serviceInfo {
+ onlyNodeLocalEndpoints := false
+ if utilfeature.DefaultFeatureGate.Enabled(features.ExternalTrafficLocalOnly) &&
+ apiservice.RequestsOnlyLocalTraffic(service) {
+ onlyNodeLocalEndpoints = true
+ }
+ info := &serviceInfo{
+ clusterIP: net.ParseIP(service.Spec.ClusterIP),
+ port: int(port.Port),
+ protocol: port.Protocol,
+ nodePort: int(port.NodePort),
+ // Deep-copy in case the service instance changes
+ loadBalancerStatus: *helper.LoadBalancerStatusDeepCopy(&service.Status.LoadBalancer),
+ sessionAffinityType: service.Spec.SessionAffinity,
+ stickyMaxAgeMinutes: 180, // TODO: paramaterize this in the API.
+ externalIPs: make([]string, len(service.Spec.ExternalIPs)),
+ loadBalancerSourceRanges: make([]string, len(service.Spec.LoadBalancerSourceRanges)),
+ onlyNodeLocalEndpoints: onlyNodeLocalEndpoints,
+ }
+ copy(info.loadBalancerSourceRanges, service.Spec.LoadBalancerSourceRanges)
+ copy(info.externalIPs, service.Spec.ExternalIPs)
+
+ if apiservice.NeedsHealthCheck(service) {
+ p := apiservice.GetServiceHealthCheckNodePort(service)
+ if p == 0 {
+ glog.Errorf("Service %q has no healthcheck nodeport", svcPortName.NamespacedName.String())
+ } else {
+ info.healthCheckNodePort = int(p)
+ }
+ }
+
+ // Store the following for performance reasons.
+ protocol := strings.ToLower(string(info.protocol))
+ info.serviceNameString = svcPortName.String()
+ info.servicePortChainName = servicePortChainName(info.serviceNameString, protocol)
+ info.serviceFirewallChainName = serviceFirewallChainName(info.serviceNameString, protocol)
+ info.serviceLBChainName = serviceLBChainName(info.serviceNameString, protocol)
+
+ return info
+}
+
+type endpointsChange struct {
+ previous proxyEndpointsMap
+ current proxyEndpointsMap
+}
+
+type endpointsChangeMap struct {
+ lock sync.Mutex
+ hostname string
+ items map[types.NamespacedName]*endpointsChange
+}
+
+type serviceChange struct {
+ previous proxyServiceMap
+ current proxyServiceMap
+}
+
+type serviceChangeMap struct {
+ lock sync.Mutex
+ items map[types.NamespacedName]*serviceChange
+}
+
+type updateEndpointMapResult struct {
+ hcEndpoints map[types.NamespacedName]int
+ staleEndpoints map[endpointServicePair]bool
+ staleServiceNames map[proxy.ServicePortName]bool
+}
+
+type updateServiceMapResult struct {
+ hcServices map[types.NamespacedName]uint16
+ staleServices sets.String
+}
+
+type proxyServiceMap map[proxy.ServicePortName]*serviceInfo
+type proxyEndpointsMap map[proxy.ServicePortName][]*endpointsInfo
+
+func newEndpointsChangeMap(hostname string) endpointsChangeMap {
+ return endpointsChangeMap{
+ hostname: hostname,
+ items: make(map[types.NamespacedName]*endpointsChange),
+ }
+}
+
+func (ecm *endpointsChangeMap) update(namespacedName *types.NamespacedName, previous, current *api.Endpoints) bool {
+ ecm.lock.Lock()
+ defer ecm.lock.Unlock()
+
+ change, exists := ecm.items[*namespacedName]
+ if !exists {
+ change = &endpointsChange{}
+ change.previous = endpointsToEndpointsMap(previous, ecm.hostname)
+ ecm.items[*namespacedName] = change
+ }
+ change.current = endpointsToEndpointsMap(current, ecm.hostname)
+ if reflect.DeepEqual(change.previous, change.current) {
+ delete(ecm.items, *namespacedName)
+ }
+ return len(ecm.items) > 0
+}
+
+func newServiceChangeMap() serviceChangeMap {
+ return serviceChangeMap{
+ items: make(map[types.NamespacedName]*serviceChange),
+ }
+}
+
+func (scm *serviceChangeMap) update(namespacedName *types.NamespacedName, previous, current *api.Service) bool {
+ scm.lock.Lock()
+ defer scm.lock.Unlock()
+
+ change, exists := scm.items[*namespacedName]
+ if !exists {
+ change = &serviceChange{}
+ change.previous = serviceToServiceMap(previous)
+ scm.items[*namespacedName] = change
+ }
+ change.current = serviceToServiceMap(current)
+ if reflect.DeepEqual(change.previous, change.current) {
+ delete(scm.items, *namespacedName)
+ }
+ return len(scm.items) > 0
+}
+
+func (sm *proxyServiceMap) merge(other proxyServiceMap) sets.String {
+ existingPorts := sets.NewString()
+ for svcPortName, info := range other {
+ existingPorts.Insert(svcPortName.Port)
+ _, exists := (*sm)[svcPortName]
+ if !exists {
+ glog.V(1).Infof("Adding new service port %q at %s:%d/%s", svcPortName, info.clusterIP, info.port, info.protocol)
+ } else {
+ glog.V(1).Infof("Updating existing service port %q at %s:%d/%s", svcPortName, info.clusterIP, info.port, info.protocol)
+ }
+ (*sm)[svcPortName] = info
+ }
+ return existingPorts
+}
+
+func (sm *proxyServiceMap) unmerge(other proxyServiceMap, existingPorts, staleServices sets.String) {
+ for svcPortName := range other {
+ if existingPorts.Has(svcPortName.Port) {
+ continue
+ }
+ info, exists := (*sm)[svcPortName]
+ if exists {
+ glog.V(1).Infof("Removing service port %q", svcPortName)
+ if info.protocol == api.ProtocolUDP {
+ staleServices.Insert(info.clusterIP.String())
+ }
+ delete(*sm, svcPortName)
+ } else {
+ glog.Errorf("Service port %q removed, but doesn't exists", svcPortName)
+ }
+ }
+}
+
+func (em proxyEndpointsMap) merge(other proxyEndpointsMap) {
+ for svcPortName := range other {
+ em[svcPortName] = other[svcPortName]
+ }
+}
+
+func (em proxyEndpointsMap) unmerge(other proxyEndpointsMap) {
+ for svcPortName := range other {
+ delete(em, svcPortName)
+ }
+}
+
+// Proxier is an iptables based proxy for connections between a localhost:lport
+// and services that provide the actual backends.
+type Proxier struct {
+ // endpointsChanges and serviceChanges contains all changes to endpoints and
+ // services that happened since iptables was synced. For a single object,
+ // changes are accumulated, i.e. previous is state from before all of them,
+ // current is state after applying all of those.
+ endpointsChanges endpointsChangeMap
+ serviceChanges serviceChangeMap
+
+ mu sync.Mutex // protects the following fields
+ serviceMap proxyServiceMap
+ endpointsMap proxyEndpointsMap
+ portsMap map[localPort]closeable
+ // endpointsSynced and servicesSynced are set to true when corresponding
+ // objects are synced after startup. This is used to avoid updating iptables
+ // with some partial data after kube-proxy restart.
+ endpointsSynced bool
+ servicesSynced bool
+ initialized int32
+ syncRunner *async.BoundedFrequencyRunner // governs calls to syncProxyRules
+
+ // These are effectively const and do not need the mutex to be held.
+ iptables utiliptables.Interface
+ masqueradeAll bool
+ masqueradeMark string
+ exec utilexec.Interface
+ clusterCIDR string
+ hostname string
+ nodeIP net.IP
+ portMapper portOpener
+ recorder record.EventRecorder
+ healthChecker healthcheck.Server
+ healthzServer healthcheck.HealthzUpdater
+
+ // Since converting probabilities (floats) to strings is expensive
+ // and we are using only probabilities in the format of 1/n, we are
+ // precomputing some number of those and cache for future reuse.
+ precomputedProbabilities []string
+
+ // The following buffers are used to reuse memory and avoid allocations
+ // that are significantly impacting performance.
+ iptablesData *bytes.Buffer
+ filterChains *bytes.Buffer
+ filterRules *bytes.Buffer
+ natChains *bytes.Buffer
+ natRules *bytes.Buffer
+}
+
+type localPort struct {
+ desc string
+ ip string
+ port int
+ protocol string
+}
+
+func (lp *localPort) String() string {
+ return fmt.Sprintf("%q (%s:%d/%s)", lp.desc, lp.ip, lp.port, lp.protocol)
+}
+
+type closeable interface {
+ Close() error
+}
+
+// portOpener is an interface around port opening/closing.
+// Abstracted out for testing.
+type portOpener interface {
+ OpenLocalPort(lp *localPort) (closeable, error)
+}
+
+// listenPortOpener opens ports by calling bind() and listen().
+type listenPortOpener struct{}
+
+// OpenLocalPort holds the given local port open.
+func (l *listenPortOpener) OpenLocalPort(lp *localPort) (closeable, error) {
+ return openLocalPort(lp)
+}
+
+// Proxier implements ProxyProvider
+var _ proxy.ProxyProvider = &Proxier{}
+
+// NewProxier returns a new Proxier given an iptables Interface instance.
+// Because of the iptables logic, it is assumed that there is only a single Proxier active on a machine.
+// An error will be returned if iptables fails to update or acquire the initial lock.
+// Once a proxier is created, it will keep iptables up to date in the background and
+// will not terminate if a particular iptables call fails.
+func NewProxier(ipt utiliptables.Interface,
+ sysctl utilsysctl.Interface,
+ exec utilexec.Interface,
+ syncPeriod time.Duration,
+ minSyncPeriod time.Duration,
+ masqueradeAll bool,
+ masqueradeBit int,
+ clusterCIDR string,
+ hostname string,
+ nodeIP net.IP,
+ recorder record.EventRecorder,
+ healthzServer healthcheck.HealthzUpdater,
+) (*Proxier, error) {
+ // check valid user input
+ if minSyncPeriod > syncPeriod {
+ return nil, fmt.Errorf("minSyncPeriod (%v) must be <= syncPeriod (%v)", minSyncPeriod, syncPeriod)
+ }
+
+ // Set the route_localnet sysctl we need for
+ if err := sysctl.SetSysctl(sysctlRouteLocalnet, 1); err != nil {
+ return nil, fmt.Errorf("can't set sysctl %s: %v", sysctlRouteLocalnet, err)
+ }
+
+ // Proxy needs br_netfilter and bridge-nf-call-iptables=1 when containers
+ // are connected to a Linux bridge (but not SDN bridges). Until most
+ // plugins handle this, log when config is missing
+ if val, err := sysctl.GetSysctl(sysctlBridgeCallIPTables); err == nil && val != 1 {
+ glog.Warningf("missing br-netfilter module or unset sysctl br-nf-call-iptables; proxy may not work as intended")
+ }
+
+ // Generate the masquerade mark to use for SNAT rules.
+ if masqueradeBit < 0 || masqueradeBit > 31 {
+ return nil, fmt.Errorf("invalid iptables-masquerade-bit %v not in [0, 31]", masqueradeBit)
+ }
+ masqueradeValue := 1 << uint(masqueradeBit)
+ masqueradeMark := fmt.Sprintf("%#08x/%#08x", masqueradeValue, masqueradeValue)
+
+ if nodeIP == nil {
+ glog.Warningf("invalid nodeIP, initializing kube-proxy with 127.0.0.1 as nodeIP")
+ nodeIP = net.ParseIP("127.0.0.1")
+ }
+
+ if len(clusterCIDR) == 0 {
+ glog.Warningf("clusterCIDR not specified, unable to distinguish between internal and external traffic")
+ }
+
+ healthChecker := healthcheck.NewServer(hostname, recorder, nil, nil) // use default implementations of deps
+
+ proxier := &Proxier{
+ portsMap: make(map[localPort]closeable),
+ serviceMap: make(proxyServiceMap),
+ serviceChanges: newServiceChangeMap(),
+ endpointsMap: make(proxyEndpointsMap),
+ endpointsChanges: newEndpointsChangeMap(hostname),
+ iptables: ipt,
+ masqueradeAll: masqueradeAll,
+ masqueradeMark: masqueradeMark,
+ exec: exec,
+ clusterCIDR: clusterCIDR,
+ hostname: hostname,
+ nodeIP: nodeIP,
+ portMapper: &listenPortOpener{},
+ recorder: recorder,
+ healthChecker: healthChecker,
+ healthzServer: healthzServer,
+ precomputedProbabilities: make([]string, 0, 1001),
+ iptablesData: bytes.NewBuffer(nil),
+ filterChains: bytes.NewBuffer(nil),
+ filterRules: bytes.NewBuffer(nil),
+ natChains: bytes.NewBuffer(nil),
+ natRules: bytes.NewBuffer(nil),
+ }
+ burstSyncs := 2
+ glog.V(3).Infof("minSyncPeriod: %v, syncPeriod: %v, burstSyncs: %d", minSyncPeriod, syncPeriod, burstSyncs)
+ proxier.syncRunner = async.NewBoundedFrequencyRunner("sync-runner", proxier.syncProxyRules, minSyncPeriod, syncPeriod, burstSyncs)
+ return proxier, nil
+}
+
+// CleanupLeftovers removes all iptables rules and chains created by the Proxier
+// It returns true if an error was encountered. Errors are logged.
+func CleanupLeftovers(ipt utiliptables.Interface) (encounteredError bool) {
+ // Unlink the services chain.
+ args := []string{
+ "-m", "comment", "--comment", "kubernetes service portals",
+ "-j", string(kubeServicesChain),
+ }
+ tableChainsWithJumpServices := []struct {
+ table utiliptables.Table
+ chain utiliptables.Chain
+ }{
+ {utiliptables.TableFilter, utiliptables.ChainInput},
+ {utiliptables.TableFilter, utiliptables.ChainOutput},
+ {utiliptables.TableNAT, utiliptables.ChainOutput},
+ {utiliptables.TableNAT, utiliptables.ChainPrerouting},
+ }
+ for _, tc := range tableChainsWithJumpServices {
+ if err := ipt.DeleteRule(tc.table, tc.chain, args...); err != nil {
+ if !utiliptables.IsNotFoundError(err) {
+ glog.Errorf("Error removing pure-iptables proxy rule: %v", err)
+ encounteredError = true
+ }
+ }
+ }
+
+ // Unlink the postrouting chain.
+ args = []string{
+ "-m", "comment", "--comment", "kubernetes postrouting rules",
+ "-j", string(kubePostroutingChain),
+ }
+ if err := ipt.DeleteRule(utiliptables.TableNAT, utiliptables.ChainPostrouting, args...); err != nil {
+ if !utiliptables.IsNotFoundError(err) {
+ glog.Errorf("Error removing pure-iptables proxy rule: %v", err)
+ encounteredError = true
+ }
+ }
+
+ // Flush and remove all of our chains.
+ iptablesData := bytes.NewBuffer(nil)
+ if err := ipt.SaveInto(utiliptables.TableNAT, iptablesData); err != nil {
+ glog.Errorf("Failed to execute iptables-save for %s: %v", utiliptables.TableNAT, err)
+ encounteredError = true
+ } else {
+ existingNATChains := utiliptables.GetChainLines(utiliptables.TableNAT, iptablesData.Bytes())
+ natChains := bytes.NewBuffer(nil)
+ natRules := bytes.NewBuffer(nil)
+ writeLine(natChains, "*nat")
+ // Start with chains we know we need to remove.
+ for _, chain := range []utiliptables.Chain{kubeServicesChain, kubeNodePortsChain, kubePostroutingChain, KubeMarkMasqChain} {
+ if _, found := existingNATChains[chain]; found {
+ chainString := string(chain)
+ writeLine(natChains, existingNATChains[chain]) // flush
+ writeLine(natRules, "-X", chainString) // delete
+ }
+ }
+ // Hunt for service and endpoint chains.
+ for chain := range existingNATChains {
+ chainString := string(chain)
+ if strings.HasPrefix(chainString, "KUBE-SVC-") || strings.HasPrefix(chainString, "KUBE-SEP-") || strings.HasPrefix(chainString, "KUBE-FW-") || strings.HasPrefix(chainString, "KUBE-XLB-") {
+ writeLine(natChains, existingNATChains[chain]) // flush
+ writeLine(natRules, "-X", chainString) // delete
+ }
+ }
+ writeLine(natRules, "COMMIT")
+ natLines := append(natChains.Bytes(), natRules.Bytes()...)
+ // Write it.
+ err = ipt.Restore(utiliptables.TableNAT, natLines, utiliptables.NoFlushTables, utiliptables.RestoreCounters)
+ if err != nil {
+ glog.Errorf("Failed to execute iptables-restore for %s: %v", utiliptables.TableNAT, err)
+ encounteredError = true
+ }
+ }
+ {
+ filterBuf := bytes.NewBuffer(nil)
+ writeLine(filterBuf, "*filter")
+ writeLine(filterBuf, fmt.Sprintf(":%s - [0:0]", kubeServicesChain))
+ writeLine(filterBuf, fmt.Sprintf("-X %s", kubeServicesChain))
+ writeLine(filterBuf, "COMMIT")
+ // Write it.
+ if err := ipt.Restore(utiliptables.TableFilter, filterBuf.Bytes(), utiliptables.NoFlushTables, utiliptables.RestoreCounters); err != nil {
+ glog.Errorf("Failed to execute iptables-restore for %s: %v", utiliptables.TableFilter, err)
+ encounteredError = true
+ }
+ }
+ return encounteredError
+}
+
+func computeProbability(n int) string {
+ return fmt.Sprintf("%0.5f", 1.0/float64(n))
+}
+
+// This assumes proxier.mu is held
+func (proxier *Proxier) precomputeProbabilities(numberOfPrecomputed int) {
+ if len(proxier.precomputedProbabilities) == 0 {
+ proxier.precomputedProbabilities = append(proxier.precomputedProbabilities, "<bad value>")
+ }
+ for i := len(proxier.precomputedProbabilities); i <= numberOfPrecomputed; i++ {
+ proxier.precomputedProbabilities = append(proxier.precomputedProbabilities, computeProbability(i))
+ }
+}
+
+// This assumes proxier.mu is held
+func (proxier *Proxier) probability(n int) string {
+ if n >= len(proxier.precomputedProbabilities) {
+ proxier.precomputeProbabilities(n)
+ }
+ return proxier.precomputedProbabilities[n]
+}
+
+// Sync is called to synchronize the proxier state to iptables as soon as possible.
+func (proxier *Proxier) Sync() {
+ proxier.syncRunner.Run()
+}
+
+// SyncLoop runs periodic work. This is expected to run as a goroutine or as the main loop of the app. It does not return.
+func (proxier *Proxier) SyncLoop() {
+ // Update healthz timestamp at beginning in case Sync() never succeeds.
+ if proxier.healthzServer != nil {
+ proxier.healthzServer.UpdateTimestamp()
+ }
+ proxier.syncRunner.Loop(wait.NeverStop)
+}
+
+func (proxier *Proxier) setInitialized(value bool) {
+ var initialized int32
+ if value {
+ initialized = 1
+ }
+ atomic.StoreInt32(&proxier.initialized, initialized)
+}
+
+func (proxier *Proxier) isInitialized() bool {
+ return atomic.LoadInt32(&proxier.initialized) > 0
+}
+
+func (proxier *Proxier) OnServiceAdd(service *api.Service) {
+ namespacedName := types.NamespacedName{Namespace: service.Namespace, Name: service.Name}
+ if proxier.serviceChanges.update(&namespacedName, nil, service) && proxier.isInitialized() {
+ proxier.syncRunner.Run()
+ }
+}
+
+func (proxier *Proxier) OnServiceUpdate(oldService, service *api.Service) {
+ namespacedName := types.NamespacedName{Namespace: service.Namespace, Name: service.Name}
+ if proxier.serviceChanges.update(&namespacedName, oldService, service) && proxier.isInitialized() {
+ proxier.syncRunner.Run()
+ }
+}
+
+func (proxier *Proxier) OnServiceDelete(service *api.Service) {
+ namespacedName := types.NamespacedName{Namespace: service.Namespace, Name: service.Name}
+ if proxier.serviceChanges.update(&namespacedName, service, nil) && proxier.isInitialized() {
+ proxier.syncRunner.Run()
+ }
+}
+
+func (proxier *Proxier) OnServiceSynced() {
+ proxier.mu.Lock()
+ proxier.servicesSynced = true
+ proxier.setInitialized(proxier.servicesSynced && proxier.endpointsSynced)
+ proxier.mu.Unlock()
+
+ // Sync unconditionally - this is called once per lifetime.
+ proxier.syncProxyRules()
+}
+
+func shouldSkipService(svcName types.NamespacedName, service *api.Service) bool {
+ // if ClusterIP is "None" or empty, skip proxying
+ if !helper.IsServiceIPSet(service) {
+ glog.V(3).Infof("Skipping service %s due to clusterIP = %q", svcName, service.Spec.ClusterIP)
+ return true
+ }
+ // Even if ClusterIP is set, ServiceTypeExternalName services don't get proxied
+ if service.Spec.Type == api.ServiceTypeExternalName {
+ glog.V(3).Infof("Skipping service %s due to Type=ExternalName", svcName)
+ return true
+ }
+ return false
+}
+
+// <serviceMap> is updated by this function (based on the given changes).
+// <changes> map is cleared after applying them.
+func updateServiceMap(
+ serviceMap proxyServiceMap,
+ changes *serviceChangeMap) (result updateServiceMapResult) {
+ result.staleServices = sets.NewString()
+
+ func() {
+ changes.lock.Lock()
+ defer changes.lock.Unlock()
+ for _, change := range changes.items {
+ existingPorts := serviceMap.merge(change.current)
+ serviceMap.unmerge(change.previous, existingPorts, result.staleServices)
+ }
+ changes.items = make(map[types.NamespacedName]*serviceChange)
+ }()
+
+ // TODO: If this will appear to be computationally expensive, consider
+ // computing this incrementally similarly to serviceMap.
+ result.hcServices = make(map[types.NamespacedName]uint16)
+ for svcPortName, info := range serviceMap {
+ if info.healthCheckNodePort != 0 {
+ result.hcServices[svcPortName.NamespacedName] = uint16(info.healthCheckNodePort)
+ }
+ }
+
+ return result
+}
+
+func (proxier *Proxier) OnEndpointsAdd(endpoints *api.Endpoints) {
+ namespacedName := types.NamespacedName{Namespace: endpoints.Namespace, Name: endpoints.Name}
+ if proxier.endpointsChanges.update(&namespacedName, nil, endpoints) && proxier.isInitialized() {
+ proxier.syncRunner.Run()
+ }
+}
+
+func (proxier *Proxier) OnEndpointsUpdate(oldEndpoints, endpoints *api.Endpoints) {
+ namespacedName := types.NamespacedName{Namespace: endpoints.Namespace, Name: endpoints.Name}
+ if proxier.endpointsChanges.update(&namespacedName, oldEndpoints, endpoints) && proxier.isInitialized() {
+ proxier.syncRunner.Run()
+ }
+}
+
+func (proxier *Proxier) OnEndpointsDelete(endpoints *api.Endpoints) {
+ namespacedName := types.NamespacedName{Namespace: endpoints.Namespace, Name: endpoints.Name}
+ if proxier.endpointsChanges.update(&namespacedName, endpoints, nil) && proxier.isInitialized() {
+ proxier.syncRunner.Run()
+ }
+}
+
+func (proxier *Proxier) OnEndpointsSynced() {
+ proxier.mu.Lock()
+ proxier.endpointsSynced = true
+ proxier.setInitialized(proxier.servicesSynced && proxier.endpointsSynced)
+ proxier.mu.Unlock()
+
+ // Sync unconditionally - this is called once per lifetime.
+ proxier.syncProxyRules()
+}
+
+// <endpointsMap> is updated by this function (based on the given changes).
+// <changes> map is cleared after applying them.
+func updateEndpointsMap(
+ endpointsMap proxyEndpointsMap,
+ changes *endpointsChangeMap,
+ hostname string) (result updateEndpointMapResult) {
+ result.staleEndpoints = make(map[endpointServicePair]bool)
+ result.staleServiceNames = make(map[proxy.ServicePortName]bool)
+
+ func() {
+ changes.lock.Lock()
+ defer changes.lock.Unlock()
+ for _, change := range changes.items {
+ endpointsMap.unmerge(change.previous)
+ endpointsMap.merge(change.current)
+ detectStaleConnections(change.previous, change.current, result.staleEndpoints, result.staleServiceNames)
+ }
+ changes.items = make(map[types.NamespacedName]*endpointsChange)
+ }()
+
+ if !utilfeature.DefaultFeatureGate.Enabled(features.ExternalTrafficLocalOnly) {
+ return
+ }
+
+ // TODO: If this will appear to be computationally expensive, consider
+ // computing this incrementally similarly to endpointsMap.
+ result.hcEndpoints = make(map[types.NamespacedName]int)
+ localIPs := getLocalIPs(endpointsMap)
+ for nsn, ips := range localIPs {
+ result.hcEndpoints[nsn] = len(ips)
+ }
+
+ return result
+}
+
+// <staleEndpoints> and <staleServices> are modified by this function with detected stale connections.
+func detectStaleConnections(oldEndpointsMap, newEndpointsMap proxyEndpointsMap, staleEndpoints map[endpointServicePair]bool, staleServiceNames map[proxy.ServicePortName]bool) {
+ for svcPortName, epList := range oldEndpointsMap {
+ for _, ep := range epList {
+ stale := true
+ for i := range newEndpointsMap[svcPortName] {
+ if *newEndpointsMap[svcPortName][i] == *ep {
+ stale = false
+ break
+ }
+ }
+ if stale {
+ glog.V(4).Infof("Stale endpoint %v -> %v", svcPortName, ep.endpoint)
+ staleEndpoints[endpointServicePair{endpoint: ep.endpoint, servicePortName: svcPortName}] = true
+ }
+ }
+ }
+
+ for svcPortName, epList := range newEndpointsMap {
+ // For udp service, if its backend changes from 0 to non-0. There may exist a conntrack entry that could blackhole traffic to the service.
+ if len(epList) > 0 && len(oldEndpointsMap[svcPortName]) == 0 {
+ staleServiceNames[svcPortName] = true
+ }
+ }
+}
+
+func getLocalIPs(endpointsMap proxyEndpointsMap) map[types.NamespacedName]sets.String {
+ localIPs := make(map[types.NamespacedName]sets.String)
+ for svcPortName := range endpointsMap {
+ for _, ep := range endpointsMap[svcPortName] {
+ if ep.isLocal {
+ nsn := svcPortName.NamespacedName
+ if localIPs[nsn] == nil {
+ localIPs[nsn] = sets.NewString()
+ }
+ localIPs[nsn].Insert(ep.IPPart()) // just the IP part
+ }
+ }
+ }
+ return localIPs
+}
+
+// Translates single Endpoints object to proxyEndpointsMap.
+// This function is used for incremental updated of endpointsMap.
+//
+// NOTE: endpoints object should NOT be modified.
+func endpointsToEndpointsMap(endpoints *api.Endpoints, hostname string) proxyEndpointsMap {
+ if endpoints == nil {
+ return nil
+ }
+
+ endpointsMap := make(proxyEndpointsMap)
+ // We need to build a map of portname -> all ip:ports for that
+ // portname. Explode Endpoints.Subsets[*] into this structure.
+ for i := range endpoints.Subsets {
+ ss := &endpoints.Subsets[i]
+ for i := range ss.Ports {
+ port := &ss.Ports[i]
+ if port.Port == 0 {
+ glog.Warningf("ignoring invalid endpoint port %s", port.Name)
+ continue
+ }
+ svcPortName := proxy.ServicePortName{
+ NamespacedName: types.NamespacedName{Namespace: endpoints.Namespace, Name: endpoints.Name},
+ Port: port.Name,
+ }
+ for i := range ss.Addresses {
+ addr := &ss.Addresses[i]
+ if addr.IP == "" {
+ glog.Warningf("ignoring invalid endpoint port %s with empty host", port.Name)
+ continue
+ }
+ epInfo := &endpointsInfo{
+ endpoint: net.JoinHostPort(addr.IP, strconv.Itoa(int(port.Port))),
+ isLocal: addr.NodeName != nil && *addr.NodeName == hostname,
+ }
+ endpointsMap[svcPortName] = append(endpointsMap[svcPortName], epInfo)
+ }
+ if glog.V(3) {
+ newEPList := []string{}
+ for _, ep := range endpointsMap[svcPortName] {
+ newEPList = append(newEPList, ep.endpoint)
+ }
+ glog.Infof("Setting endpoints for %q to %+v", svcPortName, newEPList)
+ }
+ }
+ }
+ return endpointsMap
+}
+
+// Translates single Service object to proxyServiceMap.
+//
+// NOTE: service object should NOT be modified.
+func serviceToServiceMap(service *api.Service) proxyServiceMap {
+ if service == nil {
+ return nil
+ }
+ svcName := types.NamespacedName{Namespace: service.Namespace, Name: service.Name}
+ if shouldSkipService(svcName, service) {
+ return nil
+ }
+
+ serviceMap := make(proxyServiceMap)
+ for i := range service.Spec.Ports {
+ servicePort := &service.Spec.Ports[i]
+ svcPortName := proxy.ServicePortName{NamespacedName: svcName, Port: servicePort.Name}
+ serviceMap[svcPortName] = newServiceInfo(svcPortName, servicePort, service)
+ }
+ return serviceMap
+}
+
+// portProtoHash takes the ServicePortName and protocol for a service
+// returns the associated 16 character hash. This is computed by hashing (sha256)
+// then encoding to base32 and truncating to 16 chars. We do this because IPTables
+// Chain Names must be <= 28 chars long, and the longer they are the harder they are to read.
+func portProtoHash(servicePortName string, protocol string) string {
+ hash := sha256.Sum256([]byte(servicePortName + protocol))
+ encoded := base32.StdEncoding.EncodeToString(hash[:])
+ return encoded[:16]
+}
+
+// servicePortChainName takes the ServicePortName for a service and
+// returns the associated iptables chain. This is computed by hashing (sha256)
+// then encoding to base32 and truncating with the prefix "KUBE-SVC-".
+func servicePortChainName(servicePortName string, protocol string) utiliptables.Chain {
+ return utiliptables.Chain("KUBE-SVC-" + portProtoHash(servicePortName, protocol))
+}
+
+// serviceFirewallChainName takes the ServicePortName for a service and
+// returns the associated iptables chain. This is computed by hashing (sha256)
+// then encoding to base32 and truncating with the prefix "KUBE-FW-".
+func serviceFirewallChainName(servicePortName string, protocol string) utiliptables.Chain {
+ return utiliptables.Chain("KUBE-FW-" + portProtoHash(servicePortName, protocol))
+}
+
+// serviceLBPortChainName takes the ServicePortName for a service and
+// returns the associated iptables chain. This is computed by hashing (sha256)
+// then encoding to base32 and truncating with the prefix "KUBE-XLB-". We do
+// this because IPTables Chain Names must be <= 28 chars long, and the longer
+// they are the harder they are to read.
+func serviceLBChainName(servicePortName string, protocol string) utiliptables.Chain {
+ return utiliptables.Chain("KUBE-XLB-" + portProtoHash(servicePortName, protocol))
+}
+
+// This is the same as servicePortChainName but with the endpoint included.
+func servicePortEndpointChainName(servicePortName string, protocol string, endpoint string) utiliptables.Chain {
+ hash := sha256.Sum256([]byte(servicePortName + protocol + endpoint))
+ encoded := base32.StdEncoding.EncodeToString(hash[:])
+ return utiliptables.Chain("KUBE-SEP-" + encoded[:16])
+}
+
+type endpointServicePair struct {
+ endpoint string
+ servicePortName proxy.ServicePortName
+}
+
+func (esp *endpointServicePair) IPPart() string {
+ if index := strings.Index(esp.endpoint, ":"); index != -1 {
+ return esp.endpoint[0:index]
+ }
+ return esp.endpoint
+}
+
+const noConnectionToDelete = "0 flow entries have been deleted"
+
+// After a UDP endpoint has been removed, we must flush any pending conntrack entries to it, or else we
+// risk sending more traffic to it, all of which will be lost (because UDP).
+// This assumes the proxier mutex is held
+func (proxier *Proxier) deleteEndpointConnections(connectionMap map[endpointServicePair]bool) {
+ for epSvcPair := range connectionMap {
+ if svcInfo, ok := proxier.serviceMap[epSvcPair.servicePortName]; ok && svcInfo.protocol == api.ProtocolUDP {
+ endpointIP := epSvcPair.endpoint[0:strings.Index(epSvcPair.endpoint, ":")]
+ glog.V(2).Infof("Deleting connection tracking state for service IP %s, endpoint IP %s", svcInfo.clusterIP.String(), endpointIP)
+ err := utilproxy.ExecConntrackTool(proxier.exec, "-D", "--orig-dst", svcInfo.clusterIP.String(), "--dst-nat", endpointIP, "-p", "udp")
+ if err != nil && !strings.Contains(err.Error(), noConnectionToDelete) {
+ // TODO: Better handling for deletion failure. When failure occur, stale udp connection may not get flushed.
+ // These stale udp connection will keep black hole traffic. Making this a best effort operation for now, since it
+ // is expensive to baby sit all udp connections to kubernetes services.
+ glog.Errorf("conntrack return with error: %v", err)
+ }
+ }
+ }
+}
+
+// This is where all of the iptables-save/restore calls happen.
+// The only other iptables rules are those that are setup in iptablesInit()
+// This assumes proxier.mu is NOT held
+func (proxier *Proxier) syncProxyRules() {
+ proxier.mu.Lock()
+ defer proxier.mu.Unlock()
+
+ start := time.Now()
+ defer func() {
+ SyncProxyRulesLatency.Observe(sinceInMicroseconds(start))
+ glog.V(4).Infof("syncProxyRules took %v", time.Since(start))
+ }()
+ // don't sync rules till we've received services and endpoints
+ if !proxier.endpointsSynced || !proxier.servicesSynced {
+ glog.V(2).Info("Not syncing iptables until Services and Endpoints have been received from master")
+ return
+ }
+
+ // We assume that if this was called, we really want to sync them,
+ // even if nothing changed in the meantime. In other words, callers are
+ // responsible for detecting no-op changes and not calling this function.
+ serviceUpdateResult := updateServiceMap(
+ proxier.serviceMap, &proxier.serviceChanges)
+ endpointUpdateResult := updateEndpointsMap(
+ proxier.endpointsMap, &proxier.endpointsChanges, proxier.hostname)
+
+ staleServices := serviceUpdateResult.staleServices
+ // merge stale services gathered from updateEndpointsMap
+ for svcPortName := range endpointUpdateResult.staleServiceNames {
+ if svcInfo, ok := proxier.serviceMap[svcPortName]; ok && svcInfo != nil && svcInfo.protocol == api.ProtocolUDP {
+ glog.V(2).Infof("Stale udp service %v -> %s", svcPortName, svcInfo.clusterIP.String())
+ staleServices.Insert(svcInfo.clusterIP.String())
+ }
+ }
+
+ glog.V(3).Infof("Syncing iptables rules")
+
+ // Create and link the kube services chain.
+ {
+ tablesNeedServicesChain := []utiliptables.Table{utiliptables.TableFilter, utiliptables.TableNAT}
+ for _, table := range tablesNeedServicesChain {
+ if _, err := proxier.iptables.EnsureChain(table, kubeServicesChain); err != nil {
+ glog.Errorf("Failed to ensure that %s chain %s exists: %v", table, kubeServicesChain, err)
+ return
+ }
+ }
+
+ tableChainsNeedJumpServices := []struct {
+ table utiliptables.Table
+ chain utiliptables.Chain
+ }{
+ {utiliptables.TableFilter, utiliptables.ChainInput},
+ {utiliptables.TableFilter, utiliptables.ChainOutput},
+ {utiliptables.TableNAT, utiliptables.ChainOutput},
+ {utiliptables.TableNAT, utiliptables.ChainPrerouting},
+ }
+ comment := "kubernetes service portals"
+ args := []string{"-m", "comment", "--comment", comment, "-j", string(kubeServicesChain)}
+ for _, tc := range tableChainsNeedJumpServices {
+ if _, err := proxier.iptables.EnsureRule(utiliptables.Prepend, tc.table, tc.chain, args...); err != nil {
+ glog.Errorf("Failed to ensure that %s chain %s jumps to %s: %v", tc.table, tc.chain, kubeServicesChain, err)
+ return
+ }
+ }
+ }
+
+ // Create and link the kube postrouting chain.
+ {
+ if _, err := proxier.iptables.EnsureChain(utiliptables.TableNAT, kubePostroutingChain); err != nil {
+ glog.Errorf("Failed to ensure that %s chain %s exists: %v", utiliptables.TableNAT, kubePostroutingChain, err)
+ return
+ }
+
+ comment := "kubernetes postrouting rules"
+ args := []string{"-m", "comment", "--comment", comment, "-j", string(kubePostroutingChain)}
+ if _, err := proxier.iptables.EnsureRule(utiliptables.Prepend, utiliptables.TableNAT, utiliptables.ChainPostrouting, args...); err != nil {
+ glog.Errorf("Failed to ensure that %s chain %s jumps to %s: %v", utiliptables.TableNAT, utiliptables.ChainPostrouting, kubePostroutingChain, err)
+ return
+ }
+ }
+
+ //
+ // Below this point we will not return until we try to write the iptables rules.
+ //
+
+ // Get iptables-save output so we can check for existing chains and rules.
+ // This will be a map of chain name to chain with rules as stored in iptables-save/iptables-restore
+ existingFilterChains := make(map[utiliptables.Chain]string)
+ proxier.iptablesData.Reset()
+ err := proxier.iptables.SaveInto(utiliptables.TableFilter, proxier.iptablesData)
+ if err != nil { // if we failed to get any rules
+ glog.Errorf("Failed to execute iptables-save, syncing all rules: %v", err)
+ } else { // otherwise parse the output
+ existingFilterChains = utiliptables.GetChainLines(utiliptables.TableFilter, proxier.iptablesData.Bytes())
+ }
+
+ existingNATChains := make(map[utiliptables.Chain]string)
+ proxier.iptablesData.Reset()
+ err = proxier.iptables.SaveInto(utiliptables.TableNAT, proxier.iptablesData)
+ if err != nil { // if we failed to get any rules
+ glog.Errorf("Failed to execute iptables-save, syncing all rules: %v", err)
+ } else { // otherwise parse the output
+ existingNATChains = utiliptables.GetChainLines(utiliptables.TableNAT, proxier.iptablesData.Bytes())
+ }
+
+ // Reset all buffers used later.
+ // This is to avoid memory reallocations and thus improve performance.
+ proxier.filterChains.Reset()
+ proxier.filterRules.Reset()
+ proxier.natChains.Reset()
+ proxier.natRules.Reset()
+
+ // Write table headers.
+ writeLine(proxier.filterChains, "*filter")
+ writeLine(proxier.natChains, "*nat")
+
+ // Make sure we keep stats for the top-level chains, if they existed
+ // (which most should have because we created them above).
+ if chain, ok := existingFilterChains[kubeServicesChain]; ok {
+ writeLine(proxier.filterChains, chain)
+ } else {
+ writeLine(proxier.filterChains, utiliptables.MakeChainLine(kubeServicesChain))
+ }
+ if chain, ok := existingNATChains[kubeServicesChain]; ok {
+ writeLine(proxier.natChains, chain)
+ } else {
+ writeLine(proxier.natChains, utiliptables.MakeChainLine(kubeServicesChain))
+ }
+ if chain, ok := existingNATChains[kubeNodePortsChain]; ok {
+ writeLine(proxier.natChains, chain)
+ } else {
+ writeLine(proxier.natChains, utiliptables.MakeChainLine(kubeNodePortsChain))
+ }
+ if chain, ok := existingNATChains[kubePostroutingChain]; ok {
+ writeLine(proxier.natChains, chain)
+ } else {
+ writeLine(proxier.natChains, utiliptables.MakeChainLine(kubePostroutingChain))
+ }
+ if chain, ok := existingNATChains[KubeMarkMasqChain]; ok {
+ writeLine(proxier.natChains, chain)
+ } else {
+ writeLine(proxier.natChains, utiliptables.MakeChainLine(KubeMarkMasqChain))
+ }
+
+ // Install the kubernetes-specific postrouting rules. We use a whole chain for
+ // this so that it is easier to flush and change, for example if the mark
+ // value should ever change.
+ writeLine(proxier.natRules, []string{
+ "-A", string(kubePostroutingChain),
+ "-m", "comment", "--comment", `"kubernetes service traffic requiring SNAT"`,
+ "-m", "mark", "--mark", proxier.masqueradeMark,
+ "-j", "MASQUERADE",
+ }...)
+
+ // Install the kubernetes-specific masquerade mark rule. We use a whole chain for
+ // this so that it is easier to flush and change, for example if the mark
+ // value should ever change.
+ writeLine(proxier.natRules, []string{
+ "-A", string(KubeMarkMasqChain),
+ "-j", "MARK", "--set-xmark", proxier.masqueradeMark,
+ }...)
+
+ // Accumulate NAT chains to keep.
+ activeNATChains := map[utiliptables.Chain]bool{} // use a map as a set
+
+ // Accumulate the set of local ports that we will be holding open once this update is complete
+ replacementPortsMap := map[localPort]closeable{}
+
+ // We are creating those slices ones here to avoid memory reallocations
+ // in every loop. Note that reuse the memory, instead of doing:
+ // slice = <some new slice>
+ // you should always do one of the below:
+ // slice = slice[:0] // and then append to it
+ // slice = append(slice[:0], ...)
+ endpoints := make([]*endpointsInfo, 0)
+ endpointChains := make([]utiliptables.Chain, 0)
+ // To avoid growing this slice, we arbitrarily set its size to 64,
+ // there is never more than that many arguments for a single line.
+ // Note that even if we go over 64, it will still be correct - it
+ // is just for efficiency, not correctness.
+ args := make([]string, 64)
+
+ // Build rules for each service.
+ var svcNameString string
+ for svcName, svcInfo := range proxier.serviceMap {
+ protocol := strings.ToLower(string(svcInfo.protocol))
+ svcNameString = svcInfo.serviceNameString
+
+ // Create the per-service chain, retaining counters if possible.
+ svcChain := svcInfo.servicePortChainName
+ if chain, ok := existingNATChains[svcChain]; ok {
+ writeLine(proxier.natChains, chain)
+ } else {
+ writeLine(proxier.natChains, utiliptables.MakeChainLine(svcChain))
+ }
+ activeNATChains[svcChain] = true
+
+ svcXlbChain := svcInfo.serviceLBChainName
+ if svcInfo.onlyNodeLocalEndpoints {
+ // Only for services request OnlyLocal traffic
+ // create the per-service LB chain, retaining counters if possible.
+ if lbChain, ok := existingNATChains[svcXlbChain]; ok {
+ writeLine(proxier.natChains, lbChain)
+ } else {
+ writeLine(proxier.natChains, utiliptables.MakeChainLine(svcXlbChain))
+ }
+ activeNATChains[svcXlbChain] = true
+ } else if activeNATChains[svcXlbChain] {
+ // Cleanup the previously created XLB chain for this service
+ delete(activeNATChains, svcXlbChain)
+ }
+
+ // Capture the clusterIP.
+ args = append(args[:0],
+ "-A", string(kubeServicesChain),
+ "-m", "comment", "--comment", fmt.Sprintf(`"%s cluster IP"`, svcNameString),
+ "-m", protocol, "-p", protocol,
+ "-d", fmt.Sprintf("%s/32", svcInfo.clusterIP.String()),
+ "--dport", strconv.Itoa(svcInfo.port),
+ )
+ if proxier.masqueradeAll {
+ writeLine(proxier.natRules, append(args, "-j", string(KubeMarkMasqChain))...)
+ } else if len(proxier.clusterCIDR) > 0 {
+ // This masquerades off-cluster traffic to a service VIP. The idea
+ // is that you can establish a static route for your Service range,
+ // routing to any node, and that node will bridge into the Service
+ // for you. Since that might bounce off-node, we masquerade here.
+ // If/when we support "Local" policy for VIPs, we should update this.
+ writeLine(proxier.natRules, append(args, "! -s", proxier.clusterCIDR, "-j", string(KubeMarkMasqChain))...)
+ }
+ writeLine(proxier.natRules, append(args, "-j", string(svcChain))...)
+
+ // Capture externalIPs.
+ for _, externalIP := range svcInfo.externalIPs {
+ // If the "external" IP happens to be an IP that is local to this
+ // machine, hold the local port open so no other process can open it
+ // (because the socket might open but it would never work).
+ if local, err := isLocalIP(externalIP); err != nil {
+ glog.Errorf("can't determine if IP is local, assuming not: %v", err)
+ } else if local {
+ lp := localPort{
+ desc: "externalIP for " + svcNameString,
+ ip: externalIP,
+ port: svcInfo.port,
+ protocol: protocol,
+ }
+ if proxier.portsMap[lp] != nil {
+ glog.V(4).Infof("Port %s was open before and is still needed", lp.String())
+ replacementPortsMap[lp] = proxier.portsMap[lp]
+ } else {
+ socket, err := proxier.portMapper.OpenLocalPort(&lp)
+ if err != nil {
+ msg := fmt.Sprintf("can't open %s, skipping this externalIP: %v", lp.String(), err)
+
+ proxier.recorder.Eventf(
+ &clientv1.ObjectReference{
+ Kind: "Node",
+ Name: proxier.hostname,
+ UID: types.UID(proxier.hostname),
+ Namespace: "",
+ }, api.EventTypeWarning, err.Error(), msg)
+ glog.Error(msg)
+ continue
+ }
+ replacementPortsMap[lp] = socket
+ }
+ } // We're holding the port, so it's OK to install iptables rules.
+ args = append(args[:0],
+ "-A", string(kubeServicesChain),
+ "-m", "comment", "--comment", fmt.Sprintf(`"%s external IP"`, svcNameString),
+ "-m", protocol, "-p", protocol,
+ "-d", fmt.Sprintf("%s/32", externalIP),
+ "--dport", strconv.Itoa(svcInfo.port),
+ )
+ // We have to SNAT packets to external IPs.
+ writeLine(proxier.natRules, append(args, "-j", string(KubeMarkMasqChain))...)
+
+ // Allow traffic for external IPs that does not come from a bridge (i.e. not from a container)
+ // nor from a local process to be forwarded to the service.
+ // This rule roughly translates to "all traffic from off-machine".
+ // This is imperfect in the face of network plugins that might not use a bridge, but we can revisit that later.
+ externalTrafficOnlyArgs := append(args,
+ "-m", "physdev", "!", "--physdev-is-in",
+ "-m", "addrtype", "!", "--src-type", "LOCAL")
+ writeLine(proxier.natRules, append(externalTrafficOnlyArgs, "-j", string(svcChain))...)
+ dstLocalOnlyArgs := append(args, "-m", "addrtype", "--dst-type", "LOCAL")
+ // Allow traffic bound for external IPs that happen to be recognized as local IPs to stay local.
+ // This covers cases like GCE load-balancers which get added to the local routing table.
+ writeLine(proxier.natRules, append(dstLocalOnlyArgs, "-j", string(svcChain))...)
+
+ // If the service has no endpoints then reject packets coming via externalIP
+ // Install ICMP Reject rule in filter table for destination=externalIP and dport=svcport
+ if len(proxier.endpointsMap[svcName]) == 0 {
+ writeLine(proxier.filterRules,
+ "-A", string(kubeServicesChain),
+ "-m", "comment", "--comment", fmt.Sprintf(`"%s has no endpoints"`, svcNameString),
+ "-m", protocol, "-p", protocol,
+ "-d", fmt.Sprintf("%s/32", externalIP),
+ "--dport", strconv.Itoa(svcInfo.port),
+ "-j", "REJECT",
+ )
+ }
+ }
+
+ // Capture load-balancer ingress.
+ fwChain := svcInfo.serviceFirewallChainName
+ for _, ingress := range svcInfo.loadBalancerStatus.Ingress {
+ if ingress.IP != "" {
+ // create service firewall chain
+ if chain, ok := existingNATChains[fwChain]; ok {
+ writeLine(proxier.natChains, chain)
+ } else {
+ writeLine(proxier.natChains, utiliptables.MakeChainLine(fwChain))
+ }
+ activeNATChains[fwChain] = true
+ // The service firewall rules are created based on ServiceSpec.loadBalancerSourceRanges field.
+ // This currently works for loadbalancers that preserves source ips.
+ // For loadbalancers which direct traffic to service NodePort, the firewall rules will not apply.
+
+ args = append(args[:0],
+ "-A", string(kubeServicesChain),
+ "-m", "comment", "--comment", fmt.Sprintf(`"%s loadbalancer IP"`, svcNameString),
+ "-m", protocol, "-p", protocol,
+ "-d", fmt.Sprintf("%s/32", ingress.IP),
+ "--dport", strconv.Itoa(svcInfo.port),
+ )
+ // jump to service firewall chain
+ writeLine(proxier.natRules, append(args, "-j", string(fwChain))...)
+
+ args = append(args[:0],
+ "-A", string(fwChain),
+ "-m", "comment", "--comment", fmt.Sprintf(`"%s loadbalancer IP"`, svcNameString),
+ )
+
+ // Each source match rule in the FW chain may jump to either the SVC or the XLB chain
+ chosenChain := svcXlbChain
+ // If we are proxying globally, we need to masquerade in case we cross nodes.
+ // If we are proxying only locally, we can retain the source IP.
+ if !svcInfo.onlyNodeLocalEndpoints {
+ writeLine(proxier.natRules, append(args, "-j", string(KubeMarkMasqChain))...)
+ chosenChain = svcChain
+ }
+
+ if len(svcInfo.loadBalancerSourceRanges) == 0 {
+ // allow all sources, so jump directly to the KUBE-SVC or KUBE-XLB chain
+ writeLine(proxier.natRules, append(args, "-j", string(chosenChain))...)
+ } else {
+ // firewall filter based on each source range
+ allowFromNode := false
+ for _, src := range svcInfo.loadBalancerSourceRanges {
+ writeLine(proxier.natRules, append(args, "-s", src, "-j", string(chosenChain))...)
+ // ignore error because it has been validated
+ _, cidr, _ := net.ParseCIDR(src)
+ if cidr.Contains(proxier.nodeIP) {
+ allowFromNode = true
+ }
+ }
+ // generally, ip route rule was added to intercept request to loadbalancer vip from the
+ // loadbalancer's backend hosts. In this case, request will not hit the loadbalancer but loop back directly.
+ // Need to add the following rule to allow request on host.
+ if allowFromNode {
+ writeLine(proxier.natRules, append(args, "-s", fmt.Sprintf("%s/32", ingress.IP), "-j", string(chosenChain))...)
+ }
+ }
+
+ // If the packet was able to reach the end of firewall chain, then it did not get DNATed.
+ // It means the packet cannot go thru the firewall, then mark it for DROP
+ writeLine(proxier.natRules, append(args, "-j", string(KubeMarkDropChain))...)
+ }
+ }
+
+ // Capture nodeports. If we had more than 2 rules it might be
+ // worthwhile to make a new per-service chain for nodeport rules, but
+ // with just 2 rules it ends up being a waste and a cognitive burden.
+ if svcInfo.nodePort != 0 {
+ // Hold the local port open so no other process can open it
+ // (because the socket might open but it would never work).
+ lp := localPort{
+ desc: "nodePort for " + svcNameString,
+ ip: "",
+ port: svcInfo.nodePort,
+ protocol: protocol,
+ }
+ if proxier.portsMap[lp] != nil {
+ glog.V(4).Infof("Port %s was open before and is still needed", lp.String())
+ replacementPortsMap[lp] = proxier.portsMap[lp]
+ } else {
+ socket, err := proxier.portMapper.OpenLocalPort(&lp)
+ if err != nil {
+ glog.Errorf("can't open %s, skipping this nodePort: %v", lp.String(), err)
+ continue
+ }
+ if lp.protocol == "udp" {
+ proxier.clearUDPConntrackForPort(lp.port)
+ }
+ replacementPortsMap[lp] = socket
+ } // We're holding the port, so it's OK to install iptables rules.
+
+ args = append(args[:0],
+ "-A", string(kubeNodePortsChain),
+ "-m", "comment", "--comment", svcNameString,
+ "-m", protocol, "-p", protocol,
+ "--dport", strconv.Itoa(svcInfo.nodePort),
+ )
+ if !svcInfo.onlyNodeLocalEndpoints {
+ // Nodeports need SNAT, unless they're local.
+ writeLine(proxier.natRules, append(args, "-j", string(KubeMarkMasqChain))...)
+ // Jump to the service chain.
+ writeLine(proxier.natRules, append(args, "-j", string(svcChain))...)
+ } else {
+ // TODO: Make all nodePorts jump to the firewall chain.
+ // Currently we only create it for loadbalancers (#33586).
+ writeLine(proxier.natRules, append(args, "-j", string(svcXlbChain))...)
+ }
+
+ // If the service has no endpoints then reject packets. The filter
+ // table doesn't currently have the same per-service structure that
+ // the nat table does, so we just stick this into the kube-services
+ // chain.
+ if len(proxier.endpointsMap[svcName]) == 0 {
+ writeLine(proxier.filterRules,
+ "-A", string(kubeServicesChain),
+ "-m", "comment", "--comment", fmt.Sprintf(`"%s has no endpoints"`, svcNameString),
+ "-m", "addrtype", "--dst-type", "LOCAL",
+ "-m", protocol, "-p", protocol,
+ "--dport", strconv.Itoa(svcInfo.nodePort),
+ "-j", "REJECT",
+ )
+ }
+ }
+
+ // If the service has no endpoints then reject packets.
+ if len(proxier.endpointsMap[svcName]) == 0 {
+ writeLine(proxier.filterRules,
+ "-A", string(kubeServicesChain),
+ "-m", "comment", "--comment", fmt.Sprintf(`"%s has no endpoints"`, svcNameString),
+ "-m", protocol, "-p", protocol,
+ "-d", fmt.Sprintf("%s/32", svcInfo.clusterIP.String()),
+ "--dport", strconv.Itoa(svcInfo.port),
+ "-j", "REJECT",
+ )
+ continue
+ }
+
+ // From here on, we assume there are active endpoints.
+
+ // Generate the per-endpoint chains. We do this in multiple passes so we
+ // can group rules together.
+ // These two slices parallel each other - keep in sync
+ endpoints = endpoints[:0]
+ endpointChains = endpointChains[:0]
+ var endpointChain utiliptables.Chain
+ for _, ep := range proxier.endpointsMap[svcName] {
+ endpoints = append(endpoints, ep)
+ endpointChain = ep.endpointChain(svcNameString, protocol)
+ endpointChains = append(endpointChains, endpointChain)
+
+ // Create the endpoint chain, retaining counters if possible.
+ if chain, ok := existingNATChains[utiliptables.Chain(endpointChain)]; ok {
+ writeLine(proxier.natChains, chain)
+ } else {
+ writeLine(proxier.natChains, utiliptables.MakeChainLine(endpointChain))
+ }
+ activeNATChains[endpointChain] = true
+ }
+
+ // First write session affinity rules, if applicable.
+ if svcInfo.sessionAffinityType == api.ServiceAffinityClientIP {
+ for _, endpointChain := range endpointChains {
+ writeLine(proxier.natRules,
+ "-A", string(svcChain),
+ "-m", "comment", "--comment", svcNameString,
+ "-m", "recent", "--name", string(endpointChain),
+ "--rcheck", "--seconds", strconv.Itoa(svcInfo.stickyMaxAgeMinutes*60), "--reap",
+ "-j", string(endpointChain))
+ }
+ }
+
+ // Now write loadbalancing & DNAT rules.
+ n := len(endpointChains)
+ for i, endpointChain := range endpointChains {
+ // Balancing rules in the per-service chain.
+ args = append(args[:0], []string{
+ "-A", string(svcChain),
+ "-m", "comment", "--comment", svcNameString,
+ }...)
+ if i < (n - 1) {
+ // Each rule is a probabilistic match.
+ args = append(args,
+ "-m", "statistic",
+ "--mode", "random",
+ "--probability", proxier.probability(n-i))
+ }
+ // The final (or only if n == 1) rule is a guaranteed match.
+ args = append(args, "-j", string(endpointChain))
+ writeLine(proxier.natRules, args...)
+
+ // Rules in the per-endpoint chain.
+ args = append(args[:0],
+ "-A", string(endpointChain),
+ "-m", "comment", "--comment", svcNameString,
+ )
+ // Handle traffic that loops back to the originator with SNAT.
+ writeLine(proxier.natRules, append(args,
+ "-s", fmt.Sprintf("%s/32", endpoints[i].IPPart()),
+ "-j", string(KubeMarkMasqChain))...)
+ // Update client-affinity lists.
+ if svcInfo.sessionAffinityType == api.ServiceAffinityClientIP {
+ args = append(args, "-m", "recent", "--name", string(endpointChain), "--set")
+ }
+ // DNAT to final destination.
+ args = append(args, "-m", protocol, "-p", protocol, "-j", "DNAT", "--to-destination", endpoints[i].endpoint)
+ writeLine(proxier.natRules, args...)
+ }
+
+ // The logic below this applies only if this service is marked as OnlyLocal
+ if !svcInfo.onlyNodeLocalEndpoints {
+ continue
+ }
+
+ // Now write ingress loadbalancing & DNAT rules only for services that request OnlyLocal traffic.
+ // TODO - This logic may be combinable with the block above that creates the svc balancer chain
+ localEndpoints := make([]*endpointsInfo, 0)
+ localEndpointChains := make([]utiliptables.Chain, 0)
+ for i := range endpointChains {
+ if endpoints[i].isLocal {
+ // These slices parallel each other; must be kept in sync
+ localEndpoints = append(localEndpoints, endpoints[i])
+ localEndpointChains = append(localEndpointChains, endpointChains[i])
+ }
+ }
+ // First rule in the chain redirects all pod -> external VIP traffic to the
+ // Service's ClusterIP instead. This happens whether or not we have local
+ // endpoints; only if clusterCIDR is specified
+ if len(proxier.clusterCIDR) > 0 {
+ args = append(args[:0],
+ "-A", string(svcXlbChain),
+ "-m", "comment", "--comment",
+ `"Redirect pods trying to reach external loadbalancer VIP to clusterIP"`,
+ "-s", proxier.clusterCIDR,
+ "-j", string(svcChain),
+ )
+ writeLine(proxier.natRules, args...)
+ }
+
+ numLocalEndpoints := len(localEndpointChains)
+ if numLocalEndpoints == 0 {
+ // Blackhole all traffic since there are no local endpoints
+ args = append(args[:0],
+ "-A", string(svcXlbChain),
+ "-m", "comment", "--comment",
+ fmt.Sprintf(`"%s has no local endpoints"`, svcNameString),
+ "-j",
+ string(KubeMarkDropChain),
+ )
+ writeLine(proxier.natRules, args...)
+ } else {
+ // Setup probability filter rules only over local endpoints
+ for i, endpointChain := range localEndpointChains {
+ // Balancing rules in the per-service chain.
+ args = append(args[:0],
+ "-A", string(svcXlbChain),
+ "-m", "comment", "--comment",
+ fmt.Sprintf(`"Balancing rule %d for %s"`, i, svcNameString),
+ )
+ if i < (numLocalEndpoints - 1) {
+ // Each rule is a probabilistic match.
+ args = append(args,
+ "-m", "statistic",
+ "--mode", "random",
+ "--probability", proxier.probability(numLocalEndpoints-i))
+ }
+ // The final (or only if n == 1) rule is a guaranteed match.
+ args = append(args, "-j", string(endpointChain))
+ writeLine(proxier.natRules, args...)
+ }
+ }
+ }
+
+ // Delete chains no longer in use.
+ for chain := range existingNATChains {
+ if !activeNATChains[chain] {
+ chainString := string(chain)
+ if !strings.HasPrefix(chainString, "KUBE-SVC-") && !strings.HasPrefix(chainString, "KUBE-SEP-") && !strings.HasPrefix(chainString, "KUBE-FW-") && !strings.HasPrefix(chainString, "KUBE-XLB-") {
+ // Ignore chains that aren't ours.
+ continue
+ }
+ // We must (as per iptables) write a chain-line for it, which has
+ // the nice effect of flushing the chain. Then we can remove the
+ // chain.
+ writeLine(proxier.natChains, existingNATChains[chain])
+ writeLine(proxier.natRules, "-X", chainString)
+ }
+ }
+
+ // Finally, tail-call to the nodeports chain. This needs to be after all
+ // other service portal rules.
+ writeLine(proxier.natRules,
+ "-A", string(kubeServicesChain),
+ "-m", "comment", "--comment", `"kubernetes service nodeports; NOTE: this must be the last rule in this chain"`,
+ "-m", "addrtype", "--dst-type", "LOCAL",
+ "-j", string(kubeNodePortsChain))
+
+ // Write the end-of-table markers.
+ writeLine(proxier.filterRules, "COMMIT")
+ writeLine(proxier.natRules, "COMMIT")
+
+ // Sync rules.
+ // NOTE: NoFlushTables is used so we don't flush non-kubernetes chains in the table
+ proxier.iptablesData.Reset()
+ proxier.iptablesData.Write(proxier.filterChains.Bytes())
+ proxier.iptablesData.Write(proxier.filterRules.Bytes())
+ proxier.iptablesData.Write(proxier.natChains.Bytes())
+ proxier.iptablesData.Write(proxier.natRules.Bytes())
+
+ glog.V(5).Infof("Restoring iptables rules: %s", proxier.iptablesData.Bytes())
+ err = proxier.iptables.RestoreAll(proxier.iptablesData.Bytes(), utiliptables.NoFlushTables, utiliptables.RestoreCounters)
+ if err != nil {
+ glog.Errorf("Failed to execute iptables-restore: %v", err)
+ glog.V(2).Infof("Rules:\n%s", proxier.iptablesData.Bytes())
+ // Revert new local ports.
+ revertPorts(replacementPortsMap, proxier.portsMap)
+ return
+ }
+
+ // Close old local ports and save new ones.
+ for k, v := range proxier.portsMap {
+ if replacementPortsMap[k] == nil {
+ v.Close()
+ }
+ }
+ proxier.portsMap = replacementPortsMap
+
+ // Update healthz timestamp.
+ if proxier.healthzServer != nil {
+ proxier.healthzServer.UpdateTimestamp()
+ }
+
+ // Update healthchecks. The endpoints list might include services that are
+ // not "OnlyLocal", but the services list will not, and the healthChecker
+ // will just drop those endpoints.
+ if err := proxier.healthChecker.SyncServices(serviceUpdateResult.hcServices); err != nil {
+ glog.Errorf("Error syncing healtcheck services: %v", err)
+ }
+ if err := proxier.healthChecker.SyncEndpoints(endpointUpdateResult.hcEndpoints); err != nil {
+ glog.Errorf("Error syncing healthcheck endoints: %v", err)
+ }
+
+ // Finish housekeeping.
+ // TODO: these and clearUDPConntrackForPort() could be made more consistent.
+ utilproxy.DeleteServiceConnections(proxier.exec, staleServices.List())
+ proxier.deleteEndpointConnections(endpointUpdateResult.staleEndpoints)
+}
+
+// Clear UDP conntrack for port or all conntrack entries when port equal zero.
+// When a packet arrives, it will not go through NAT table again, because it is not "the first" packet.
+// The solution is clearing the conntrack. Known issus:
+// https://github.com/docker/docker/issues/8795
+// https://github.com/kubernetes/kubernetes/issues/31983
+func (proxier *Proxier) clearUDPConntrackForPort(port int) {
+ glog.V(2).Infof("Deleting conntrack entries for udp connections")
+ if port > 0 {
+ err := utilproxy.ExecConntrackTool(proxier.exec, "-D", "-p", "udp", "--dport", strconv.Itoa(port))
+ if err != nil && !strings.Contains(err.Error(), noConnectionToDelete) {
+ glog.Errorf("conntrack return with error: %v", err)
+ }
+ } else {
+ glog.Errorf("Wrong port number. The port number must be greater than zero")
+ }
+}
+
+// Join all words with spaces, terminate with newline and write to buf.
+func writeLine(buf *bytes.Buffer, words ...string) {
+ // We avoid strings.Join for performance reasons.
+ for i := range words {
+ buf.WriteString(words[i])
+ if i < len(words)-1 {
+ buf.WriteByte(' ')
+ } else {
+ buf.WriteByte('\n')
+ }
+ }
+}
+
+func isLocalIP(ip string) (bool, error) {
+ addrs, err := net.InterfaceAddrs()
+ if err != nil {
+ return false, err
+ }
+ for i := range addrs {
+ intf, _, err := net.ParseCIDR(addrs[i].String())
+ if err != nil {
+ return false, err
+ }
+ if net.ParseIP(ip).Equal(intf) {
+ return true, nil
+ }
+ }
+ return false, nil
+}
+
+func openLocalPort(lp *localPort) (closeable, error) {
+ // For ports on node IPs, open the actual port and hold it, even though we
+ // use iptables to redirect traffic.
+ // This ensures a) that it's safe to use that port and b) that (a) stays
+ // true. The risk is that some process on the node (e.g. sshd or kubelet)
+ // is using a port and we give that same port out to a Service. That would
+ // be bad because iptables would silently claim the traffic but the process
+ // would never know.
+ // NOTE: We should not need to have a real listen()ing socket - bind()
+ // should be enough, but I can't figure out a way to e2e test without
+ // it. Tools like 'ss' and 'netstat' do not show sockets that are
+ // bind()ed but not listen()ed, and at least the default debian netcat
+ // has no way to avoid about 10 seconds of retries.
+ var socket closeable
+ switch lp.protocol {
+ case "tcp":
+ listener, err := net.Listen("tcp", net.JoinHostPort(lp.ip, strconv.Itoa(lp.port)))
+ if err != nil {
+ return nil, err
+ }
+ socket = listener
+ case "udp":
+ addr, err := net.ResolveUDPAddr("udp", net.JoinHostPort(lp.ip, strconv.Itoa(lp.port)))
+ if err != nil {
+ return nil, err
+ }
+ conn, err := net.ListenUDP("udp", addr)
+ if err != nil {
+ return nil, err
+ }
+ socket = conn
+ default:
+ return nil, fmt.Errorf("unknown protocol %q", lp.protocol)
+ }
+ glog.V(2).Infof("Opened local port %s", lp.String())
+ return socket, nil
+}
+
+// revertPorts is closing ports in replacementPortsMap but not in originalPortsMap. In other words, it only
+// closes the ports opened in this sync.
+func revertPorts(replacementPortsMap, originalPortsMap map[localPort]closeable) {
+ for k, v := range replacementPortsMap {
+ // Only close newly opened local ports - leave ones that were open before this update
+ if originalPortsMap[k] == nil {
+ glog.V(2).Infof("Closing local port %s after iptables-restore failure", k.String())
+ v.Close()
+ }
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/types.go b/vendor/k8s.io/kubernetes/pkg/proxy/types.go
new file mode 100644
index 000000000..578baff69
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/proxy/types.go
@@ -0,0 +1,44 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package proxy
+
+import (
+ "fmt"
+
+ "k8s.io/apimachinery/pkg/types"
+)
+
+// ProxyProvider is the interface provided by proxier implementations.
+type ProxyProvider interface {
+ // Sync immediately synchronizes the ProxyProvider's current state to iptables.
+ Sync()
+ // SyncLoop runs periodic work.
+ // This is expected to run as a goroutine or as the main loop of the app.
+ // It does not return.
+ SyncLoop()
+}
+
+// ServicePortName carries a namespace + name + portname. This is the unique
+// identfier for a load-balanced service.
+type ServicePortName struct {
+ types.NamespacedName
+ Port string
+}
+
+func (spn ServicePortName) String() string {
+ return fmt.Sprintf("%s:%s", spn.NamespacedName.String(), spn.Port)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/util/conntrack.go b/vendor/k8s.io/kubernetes/pkg/proxy/util/conntrack.go
new file mode 100644
index 000000000..436045ecb
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/proxy/util/conntrack.go
@@ -0,0 +1,58 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package util
+
+import (
+ "fmt"
+ "strings"
+
+ "k8s.io/kubernetes/pkg/util/exec"
+
+ "github.com/golang/glog"
+)
+
+// Utilities for dealing with conntrack
+
+const noConnectionToDelete = "0 flow entries have been deleted"
+
+// DeleteServiceConnection uses the conntrack tool to delete the conntrack entries
+// for the UDP connections specified by the given service IPs
+func DeleteServiceConnections(execer exec.Interface, svcIPs []string) {
+ for _, ip := range svcIPs {
+ glog.V(2).Infof("Deleting connection tracking state for service IP %s", ip)
+ err := ExecConntrackTool(execer, "-D", "--orig-dst", ip, "-p", "udp")
+ if err != nil && !strings.Contains(err.Error(), noConnectionToDelete) {
+ // TODO: Better handling for deletion failure. When failure occur, stale udp connection may not get flushed.
+ // These stale udp connection will keep black hole traffic. Making this a best effort operation for now, since it
+ // is expensive to baby-sit all udp connections to kubernetes services.
+ glog.Errorf("conntrack returned error: %v", err)
+ }
+ }
+}
+
+// ExecConntrackTool executes the conntrack tool using the given parameters
+func ExecConntrackTool(execer exec.Interface, parameters ...string) error {
+ conntrackPath, err := execer.LookPath("conntrack")
+ if err != nil {
+ return fmt.Errorf("error looking for path of conntrack: %v", err)
+ }
+ output, err := execer.Command(conntrackPath, parameters...).CombinedOutput()
+ if err != nil {
+ return fmt.Errorf("conntrack command returned: %q, error message: %s", string(output), err)
+ }
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/security/apparmor/helpers.go b/vendor/k8s.io/kubernetes/pkg/security/apparmor/helpers.go
new file mode 100644
index 000000000..4412d2a9a
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/security/apparmor/helpers.go
@@ -0,0 +1,77 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package apparmor
+
+import (
+ "strings"
+
+ "k8s.io/kubernetes/pkg/api/v1"
+)
+
+// TODO: Move these values into the API package.
+const (
+ // The prefix to an annotation key specifying a container profile.
+ ContainerAnnotationKeyPrefix = "container.apparmor.security.beta.kubernetes.io/"
+ // The annotation key specifying the default AppArmor profile.
+ DefaultProfileAnnotationKey = "apparmor.security.beta.kubernetes.io/defaultProfileName"
+ // The annotation key specifying the allowed AppArmor profiles.
+ AllowedProfilesAnnotationKey = "apparmor.security.beta.kubernetes.io/allowedProfileNames"
+
+ // The profile specifying the runtime default.
+ ProfileRuntimeDefault = "runtime/default"
+ // The prefix for specifying profiles loaded on the node.
+ ProfileNamePrefix = "localhost/"
+)
+
+// Checks whether app armor is required for pod to be run.
+func isRequired(pod *v1.Pod) bool {
+ for key := range pod.Annotations {
+ if strings.HasPrefix(key, ContainerAnnotationKeyPrefix) {
+ return true
+ }
+ }
+ return false
+}
+
+// Returns the name of the profile to use with the container.
+func GetProfileName(pod *v1.Pod, containerName string) string {
+ return GetProfileNameFromPodAnnotations(pod.Annotations, containerName)
+}
+
+// GetProfileNameFromPodAnnotations gets the name of the profile to use with container from
+// pod annotations
+func GetProfileNameFromPodAnnotations(annotations map[string]string, containerName string) string {
+ return annotations[ContainerAnnotationKeyPrefix+containerName]
+}
+
+// Sets the name of the profile to use with the container.
+func SetProfileName(pod *v1.Pod, containerName, profileName string) error {
+ if pod.Annotations == nil {
+ pod.Annotations = map[string]string{}
+ }
+ pod.Annotations[ContainerAnnotationKeyPrefix+containerName] = profileName
+ return nil
+}
+
+// Sets the name of the profile to use with the container.
+func SetProfileNameFromPodAnnotations(annotations map[string]string, containerName, profileName string) error {
+ if annotations == nil {
+ return nil
+ }
+ annotations[ContainerAnnotationKeyPrefix+containerName] = profileName
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/security/apparmor/validate.go b/vendor/k8s.io/kubernetes/pkg/security/apparmor/validate.go
new file mode 100644
index 000000000..cf12df3c1
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/security/apparmor/validate.go
@@ -0,0 +1,228 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package apparmor
+
+import (
+ "bufio"
+ "errors"
+ "fmt"
+ "io/ioutil"
+ "os"
+ "path"
+ "strings"
+
+ utilfeature "k8s.io/apiserver/pkg/util/feature"
+ "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/features"
+ "k8s.io/kubernetes/pkg/util"
+)
+
+// Whether AppArmor should be disabled by default.
+// Set to true if the wrong build tags are set (see validate_disabled.go).
+var isDisabledBuild bool
+
+// Interface for validating that a pod with with an AppArmor profile can be run by a Node.
+type Validator interface {
+ Validate(pod *v1.Pod) error
+ ValidateHost() error
+}
+
+func NewValidator(runtime string) Validator {
+ if err := validateHost(runtime); err != nil {
+ return &validator{validateHostErr: err}
+ }
+ appArmorFS, err := getAppArmorFS()
+ if err != nil {
+ return &validator{
+ validateHostErr: fmt.Errorf("error finding AppArmor FS: %v", err),
+ }
+ }
+ return &validator{
+ appArmorFS: appArmorFS,
+ }
+}
+
+type validator struct {
+ validateHostErr error
+ appArmorFS string
+}
+
+func (v *validator) Validate(pod *v1.Pod) error {
+ if !isRequired(pod) {
+ return nil
+ }
+
+ if v.ValidateHost() != nil {
+ return v.validateHostErr
+ }
+
+ loadedProfiles, err := v.getLoadedProfiles()
+ if err != nil {
+ return fmt.Errorf("could not read loaded profiles: %v", err)
+ }
+
+ for _, container := range pod.Spec.InitContainers {
+ if err := validateProfile(GetProfileName(pod, container.Name), loadedProfiles); err != nil {
+ return err
+ }
+ }
+ for _, container := range pod.Spec.Containers {
+ if err := validateProfile(GetProfileName(pod, container.Name), loadedProfiles); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (v *validator) ValidateHost() error {
+ return v.validateHostErr
+}
+
+// Verify that the host and runtime is capable of enforcing AppArmor profiles.
+func validateHost(runtime string) error {
+ // Check feature-gates
+ if !utilfeature.DefaultFeatureGate.Enabled(features.AppArmor) {
+ return errors.New("AppArmor disabled by feature-gate")
+ }
+
+ // Check build support.
+ if isDisabledBuild {
+ return errors.New("Binary not compiled for linux")
+ }
+
+ // Check kernel support.
+ if !IsAppArmorEnabled() {
+ return errors.New("AppArmor is not enabled on the host")
+ }
+
+ // Check runtime support. Currently only Docker is supported.
+ if runtime != "docker" {
+ return fmt.Errorf("AppArmor is only enabled for 'docker' runtime. Found: %q.", runtime)
+ }
+
+ return nil
+}
+
+// Verify that the profile is valid and loaded.
+func validateProfile(profile string, loadedProfiles map[string]bool) error {
+ if err := ValidateProfileFormat(profile); err != nil {
+ return err
+ }
+
+ if strings.HasPrefix(profile, ProfileNamePrefix) {
+ profileName := strings.TrimPrefix(profile, ProfileNamePrefix)
+ if !loadedProfiles[profileName] {
+ return fmt.Errorf("profile %q is not loaded", profileName)
+ }
+ }
+
+ return nil
+}
+
+func ValidateProfileFormat(profile string) error {
+ if profile == "" || profile == ProfileRuntimeDefault {
+ return nil
+ }
+ if !strings.HasPrefix(profile, ProfileNamePrefix) {
+ return fmt.Errorf("invalid AppArmor profile name: %q", profile)
+ }
+ return nil
+}
+
+func (v *validator) getLoadedProfiles() (map[string]bool, error) {
+ profilesPath := path.Join(v.appArmorFS, "profiles")
+ profilesFile, err := os.Open(profilesPath)
+ if err != nil {
+ return nil, fmt.Errorf("failed to open %s: %v", profilesPath, err)
+ }
+ defer profilesFile.Close()
+
+ profiles := map[string]bool{}
+ scanner := bufio.NewScanner(profilesFile)
+ for scanner.Scan() {
+ profileName := parseProfileName(scanner.Text())
+ if profileName == "" {
+ // Unknown line format; skip it.
+ continue
+ }
+ profiles[profileName] = true
+ }
+ return profiles, nil
+}
+
+// The profiles file is formatted with one profile per line, matching a form:
+// namespace://profile-name (mode)
+// profile-name (mode)
+// Where mode is {enforce, complain, kill}. The "namespace://" is only included for namespaced
+// profiles. For the purposes of Kubernetes, we consider the namespace part of the profile name.
+func parseProfileName(profileLine string) string {
+ modeIndex := strings.IndexRune(profileLine, '(')
+ if modeIndex < 0 {
+ return ""
+ }
+ return strings.TrimSpace(profileLine[:modeIndex])
+}
+
+func getAppArmorFS() (string, error) {
+ mountsFile, err := os.Open("/proc/mounts")
+ if err != nil {
+ return "", fmt.Errorf("could not open /proc/mounts: %v", err)
+ }
+ defer mountsFile.Close()
+
+ scanner := bufio.NewScanner(mountsFile)
+ for scanner.Scan() {
+ fields := strings.Fields(scanner.Text())
+ if len(fields) < 3 {
+ // Unknown line format; skip it.
+ continue
+ }
+ if fields[2] == "securityfs" {
+ appArmorFS := path.Join(fields[1], "apparmor")
+ if ok, err := util.FileExists(appArmorFS); !ok {
+ msg := fmt.Sprintf("path %s does not exist", appArmorFS)
+ if err != nil {
+ return "", fmt.Errorf("%s: %v", msg, err)
+ } else {
+ return "", errors.New(msg)
+ }
+ } else {
+ return appArmorFS, nil
+ }
+ }
+ }
+ if err := scanner.Err(); err != nil {
+ return "", fmt.Errorf("error scanning mounts: %v", err)
+ }
+
+ return "", errors.New("securityfs not found")
+}
+
+// IsAppArmorEnabled returns true if apparmor is enabled for the host.
+// This function is forked from
+// https://github.com/opencontainers/runc/blob/1a81e9ab1f138c091fe5c86d0883f87716088527/libcontainer/apparmor/apparmor.go
+// to avoid the libapparmor dependency.
+func IsAppArmorEnabled() bool {
+ if _, err := os.Stat("/sys/kernel/security/apparmor"); err == nil && os.Getenv("container") == "" {
+ if _, err = os.Stat("/sbin/apparmor_parser"); err == nil {
+ buf, err := ioutil.ReadFile("/sys/module/apparmor/parameters/enabled")
+ return err == nil && len(buf) > 1 && buf[0] == 'Y'
+ }
+ }
+ return false
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/security/apparmor/validate_disabled.go b/vendor/k8s.io/kubernetes/pkg/security/apparmor/validate_disabled.go
new file mode 100644
index 000000000..875054a94
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/security/apparmor/validate_disabled.go
@@ -0,0 +1,24 @@
+// +build !linux
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package apparmor
+
+func init() {
+ // If Kubernetes was not built for linux, apparmor is always disabled.
+ isDisabledBuild = true
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/serviceaccount/jwt.go b/vendor/k8s.io/kubernetes/pkg/serviceaccount/jwt.go
new file mode 100644
index 000000000..38c063253
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/serviceaccount/jwt.go
@@ -0,0 +1,314 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package serviceaccount
+
+import (
+ "bytes"
+ "crypto/ecdsa"
+ "crypto/elliptic"
+ "crypto/rsa"
+ "encoding/pem"
+ "errors"
+ "fmt"
+ "io/ioutil"
+
+ "k8s.io/apiserver/pkg/authentication/authenticator"
+ apiserverserviceaccount "k8s.io/apiserver/pkg/authentication/serviceaccount"
+ "k8s.io/apiserver/pkg/authentication/user"
+ "k8s.io/client-go/util/cert"
+ "k8s.io/kubernetes/pkg/api/v1"
+
+ jwt "github.com/dgrijalva/jwt-go"
+ "github.com/golang/glog"
+)
+
+const (
+ Issuer = "kubernetes/serviceaccount"
+
+ SubjectClaim = "sub"
+ IssuerClaim = "iss"
+ ServiceAccountNameClaim = "kubernetes.io/serviceaccount/service-account.name"
+ ServiceAccountUIDClaim = "kubernetes.io/serviceaccount/service-account.uid"
+ SecretNameClaim = "kubernetes.io/serviceaccount/secret.name"
+ NamespaceClaim = "kubernetes.io/serviceaccount/namespace"
+)
+
+// ServiceAccountTokenGetter defines functions to retrieve a named service account and secret
+type ServiceAccountTokenGetter interface {
+ GetServiceAccount(namespace, name string) (*v1.ServiceAccount, error)
+ GetSecret(namespace, name string) (*v1.Secret, error)
+}
+
+type TokenGenerator interface {
+ // GenerateToken generates a token which will identify the given ServiceAccount.
+ // The returned token will be stored in the given (and yet-unpersisted) Secret.
+ GenerateToken(serviceAccount v1.ServiceAccount, secret v1.Secret) (string, error)
+}
+
+// ReadPrivateKey is a helper function for reading a private key from a PEM-encoded file
+func ReadPrivateKey(file string) (interface{}, error) {
+ data, err := ioutil.ReadFile(file)
+ if err != nil {
+ return nil, err
+ }
+ key, err := cert.ParsePrivateKeyPEM(data)
+ if err != nil {
+ return nil, fmt.Errorf("error reading private key file %s: %v", file, err)
+ }
+ return key, nil
+}
+
+// ReadPublicKeys is a helper function for reading an array of rsa.PublicKey or ecdsa.PublicKey from a PEM-encoded file.
+// Reads public keys from both public and private key files.
+func ReadPublicKeys(file string) ([]interface{}, error) {
+ data, err := ioutil.ReadFile(file)
+ if err != nil {
+ return nil, err
+ }
+ keys, err := ReadPublicKeysFromPEM(data)
+ if err != nil {
+ return nil, fmt.Errorf("error reading public key file %s: %v", file, err)
+ }
+ return keys, nil
+}
+
+// ReadPublicKeysFromPEM is a helper function for reading an array of rsa.PublicKey or ecdsa.PublicKey from a PEM-encoded byte array.
+// Reads public keys from both public and private key files.
+func ReadPublicKeysFromPEM(data []byte) ([]interface{}, error) {
+ var block *pem.Block
+ keys := []interface{}{}
+ for {
+ // read the next block
+ block, data = pem.Decode(data)
+ if block == nil {
+ break
+ }
+
+ // get PEM bytes for just this block
+ blockData := pem.EncodeToMemory(block)
+ if privateKey, err := jwt.ParseRSAPrivateKeyFromPEM(blockData); err == nil {
+ keys = append(keys, &privateKey.PublicKey)
+ continue
+ }
+ if publicKey, err := jwt.ParseRSAPublicKeyFromPEM(blockData); err == nil {
+ keys = append(keys, publicKey)
+ continue
+ }
+
+ if privateKey, err := jwt.ParseECPrivateKeyFromPEM(blockData); err == nil {
+ keys = append(keys, &privateKey.PublicKey)
+ continue
+ }
+ if publicKey, err := jwt.ParseECPublicKeyFromPEM(blockData); err == nil {
+ keys = append(keys, publicKey)
+ continue
+ }
+
+ // tolerate non-key PEM blocks for backwards compatibility
+ // originally, only the first PEM block was parsed and expected to be a key block
+ }
+
+ if len(keys) == 0 {
+ return nil, fmt.Errorf("data does not contain a valid RSA or ECDSA key")
+ }
+ return keys, nil
+}
+
+// JWTTokenGenerator returns a TokenGenerator that generates signed JWT tokens, using the given privateKey.
+// privateKey is a PEM-encoded byte array of a private RSA key.
+// JWTTokenAuthenticator()
+func JWTTokenGenerator(privateKey interface{}) TokenGenerator {
+ return &jwtTokenGenerator{privateKey}
+}
+
+type jwtTokenGenerator struct {
+ privateKey interface{}
+}
+
+func (j *jwtTokenGenerator) GenerateToken(serviceAccount v1.ServiceAccount, secret v1.Secret) (string, error) {
+ var method jwt.SigningMethod
+ switch privateKey := j.privateKey.(type) {
+ case *rsa.PrivateKey:
+ method = jwt.SigningMethodRS256
+ case *ecdsa.PrivateKey:
+ switch privateKey.Curve {
+ case elliptic.P256():
+ method = jwt.SigningMethodES256
+ case elliptic.P384():
+ method = jwt.SigningMethodES384
+ case elliptic.P521():
+ method = jwt.SigningMethodES512
+ default:
+ return "", fmt.Errorf("unknown private key curve, must be 256, 384, or 521")
+ }
+ default:
+ return "", fmt.Errorf("unknown private key type %T, must be *rsa.PrivateKey or *ecdsa.PrivateKey", j.privateKey)
+ }
+
+ token := jwt.New(method)
+
+ claims, _ := token.Claims.(jwt.MapClaims)
+
+ // Identify the issuer
+ claims[IssuerClaim] = Issuer
+
+ // Username
+ claims[SubjectClaim] = apiserverserviceaccount.MakeUsername(serviceAccount.Namespace, serviceAccount.Name)
+
+ // Persist enough structured info for the authenticator to be able to look up the service account and secret
+ claims[NamespaceClaim] = serviceAccount.Namespace
+ claims[ServiceAccountNameClaim] = serviceAccount.Name
+ claims[ServiceAccountUIDClaim] = serviceAccount.UID
+ claims[SecretNameClaim] = secret.Name
+
+ // Sign and get the complete encoded token as a string
+ return token.SignedString(j.privateKey)
+}
+
+// JWTTokenAuthenticator authenticates tokens as JWT tokens produced by JWTTokenGenerator
+// Token signatures are verified using each of the given public keys until one works (allowing key rotation)
+// If lookup is true, the service account and secret referenced as claims inside the token are retrieved and verified with the provided ServiceAccountTokenGetter
+func JWTTokenAuthenticator(keys []interface{}, lookup bool, getter ServiceAccountTokenGetter) authenticator.Token {
+ return &jwtTokenAuthenticator{keys, lookup, getter}
+}
+
+type jwtTokenAuthenticator struct {
+ keys []interface{}
+ lookup bool
+ getter ServiceAccountTokenGetter
+}
+
+var errMismatchedSigningMethod = errors.New("invalid signing method")
+
+func (j *jwtTokenAuthenticator) AuthenticateToken(token string) (user.Info, bool, error) {
+ var validationError error
+
+ for i, key := range j.keys {
+ // Attempt to verify with each key until we find one that works
+ parsedToken, err := jwt.Parse(token, func(token *jwt.Token) (interface{}, error) {
+ switch token.Method.(type) {
+ case *jwt.SigningMethodRSA:
+ if _, ok := key.(*rsa.PublicKey); ok {
+ return key, nil
+ }
+ return nil, errMismatchedSigningMethod
+ case *jwt.SigningMethodECDSA:
+ if _, ok := key.(*ecdsa.PublicKey); ok {
+ return key, nil
+ }
+ return nil, errMismatchedSigningMethod
+ default:
+ return nil, fmt.Errorf("Unexpected signing method: %v", token.Header["alg"])
+ }
+ })
+
+ if err != nil {
+ switch err := err.(type) {
+ case *jwt.ValidationError:
+ if (err.Errors & jwt.ValidationErrorMalformed) != 0 {
+ // Not a JWT, no point in continuing
+ return nil, false, nil
+ }
+
+ if (err.Errors & jwt.ValidationErrorSignatureInvalid) != 0 {
+ // Signature error, perhaps one of the other keys will verify the signature
+ // If not, we want to return this error
+ glog.V(4).Infof("Signature error (key %d): %v", i, err)
+ validationError = err
+ continue
+ }
+
+ // This key doesn't apply to the given signature type
+ // Perhaps one of the other keys will verify the signature
+ // If not, we want to return this error
+ if err.Inner == errMismatchedSigningMethod {
+ glog.V(4).Infof("Mismatched key type (key %d): %v", i, err)
+ validationError = err
+ continue
+ }
+ }
+
+ // Other errors should just return as errors
+ return nil, false, err
+ }
+
+ // If we get here, we have a token with a recognized signature
+
+ claims, _ := parsedToken.Claims.(jwt.MapClaims)
+
+ // Make sure we issued the token
+ iss, _ := claims[IssuerClaim].(string)
+ if iss != Issuer {
+ return nil, false, nil
+ }
+
+ // Make sure the claims we need exist
+ sub, _ := claims[SubjectClaim].(string)
+ if len(sub) == 0 {
+ return nil, false, errors.New("sub claim is missing")
+ }
+ namespace, _ := claims[NamespaceClaim].(string)
+ if len(namespace) == 0 {
+ return nil, false, errors.New("namespace claim is missing")
+ }
+ secretName, _ := claims[SecretNameClaim].(string)
+ if len(namespace) == 0 {
+ return nil, false, errors.New("secretName claim is missing")
+ }
+ serviceAccountName, _ := claims[ServiceAccountNameClaim].(string)
+ if len(serviceAccountName) == 0 {
+ return nil, false, errors.New("serviceAccountName claim is missing")
+ }
+ serviceAccountUID, _ := claims[ServiceAccountUIDClaim].(string)
+ if len(serviceAccountUID) == 0 {
+ return nil, false, errors.New("serviceAccountUID claim is missing")
+ }
+
+ subjectNamespace, subjectName, err := apiserverserviceaccount.SplitUsername(sub)
+ if err != nil || subjectNamespace != namespace || subjectName != serviceAccountName {
+ return nil, false, errors.New("sub claim is invalid")
+ }
+
+ if j.lookup {
+ // Make sure token hasn't been invalidated by deletion of the secret
+ secret, err := j.getter.GetSecret(namespace, secretName)
+ if err != nil {
+ glog.V(4).Infof("Could not retrieve token %s/%s for service account %s/%s: %v", namespace, secretName, namespace, serviceAccountName, err)
+ return nil, false, errors.New("Token has been invalidated")
+ }
+ if bytes.Compare(secret.Data[v1.ServiceAccountTokenKey], []byte(token)) != 0 {
+ glog.V(4).Infof("Token contents no longer matches %s/%s for service account %s/%s", namespace, secretName, namespace, serviceAccountName)
+ return nil, false, errors.New("Token does not match server's copy")
+ }
+
+ // Make sure service account still exists (name and UID)
+ serviceAccount, err := j.getter.GetServiceAccount(namespace, serviceAccountName)
+ if err != nil {
+ glog.V(4).Infof("Could not retrieve service account %s/%s: %v", namespace, serviceAccountName, err)
+ return nil, false, err
+ }
+ if string(serviceAccount.UID) != serviceAccountUID {
+ glog.V(4).Infof("Service account UID no longer matches %s/%s: %q != %q", namespace, serviceAccountName, string(serviceAccount.UID), serviceAccountUID)
+ return nil, false, fmt.Errorf("ServiceAccount UID (%s) does not match claim (%s)", serviceAccount.UID, serviceAccountUID)
+ }
+ }
+
+ return UserInfo(namespace, serviceAccountName, serviceAccountUID), true, nil
+ }
+
+ return nil, false, validationError
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/serviceaccount/util.go b/vendor/k8s.io/kubernetes/pkg/serviceaccount/util.go
new file mode 100644
index 000000000..1fd5bd899
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/serviceaccount/util.go
@@ -0,0 +1,74 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package serviceaccount
+
+import (
+ apiserverserviceaccount "k8s.io/apiserver/pkg/authentication/serviceaccount"
+ "k8s.io/apiserver/pkg/authentication/user"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/v1"
+)
+
+// UserInfo returns a user.Info interface for the given namespace, service account name and UID
+func UserInfo(namespace, name, uid string) user.Info {
+ return &user.DefaultInfo{
+ Name: apiserverserviceaccount.MakeUsername(namespace, name),
+ UID: uid,
+ Groups: apiserverserviceaccount.MakeGroupNames(namespace, name),
+ }
+}
+
+// IsServiceAccountToken returns true if the secret is a valid api token for the service account
+func IsServiceAccountToken(secret *v1.Secret, sa *v1.ServiceAccount) bool {
+ if secret.Type != v1.SecretTypeServiceAccountToken {
+ return false
+ }
+
+ name := secret.Annotations[v1.ServiceAccountNameKey]
+ uid := secret.Annotations[v1.ServiceAccountUIDKey]
+ if name != sa.Name {
+ // Name must match
+ return false
+ }
+ if len(uid) > 0 && uid != string(sa.UID) {
+ // If UID is specified, it must match
+ return false
+ }
+
+ return true
+}
+
+// TODO: remove the duplicate code
+// InternalIsServiceAccountToken returns true if the secret is a valid api token for the service account
+func InternalIsServiceAccountToken(secret *api.Secret, sa *api.ServiceAccount) bool {
+ if secret.Type != api.SecretTypeServiceAccountToken {
+ return false
+ }
+
+ name := secret.Annotations[api.ServiceAccountNameKey]
+ uid := secret.Annotations[api.ServiceAccountUIDKey]
+ if name != sa.Name {
+ // Name must match
+ return false
+ }
+ if len(uid) > 0 && uid != string(sa.UID) {
+ // If UID is specified, it must match
+ return false
+ }
+
+ return true
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/async/bounded_frequency_runner.go b/vendor/k8s.io/kubernetes/pkg/util/async/bounded_frequency_runner.go
new file mode 100644
index 000000000..da6fc2a4f
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/async/bounded_frequency_runner.go
@@ -0,0 +1,239 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package async
+
+import (
+ "fmt"
+ "sync"
+ "time"
+
+ "k8s.io/client-go/util/flowcontrol"
+
+ "github.com/golang/glog"
+)
+
+// BoundedFrequencyRunner manages runs of a user-provided function.
+// See NewBoundedFrequencyRunner for examples.
+type BoundedFrequencyRunner struct {
+ name string // the name of this instance
+ minInterval time.Duration // the min time between runs, modulo bursts
+ maxInterval time.Duration // the max time between runs
+
+ run chan struct{} // try an async run
+
+ mu sync.Mutex // guards runs of fn and all mutations
+ fn func() // function to run
+ lastRun time.Time // time of last run
+ timer timer // timer for deferred runs
+ limiter rateLimiter // rate limiter for on-demand runs
+}
+
+// designed so that flowcontrol.RateLimiter satisfies
+type rateLimiter interface {
+ TryAccept() bool
+ Stop()
+}
+
+type nullLimiter struct{}
+
+func (nullLimiter) TryAccept() bool {
+ return true
+}
+
+func (nullLimiter) Stop() {}
+
+var _ rateLimiter = nullLimiter{}
+
+// for testing
+type timer interface {
+ // C returns the timer's selectable channel.
+ C() <-chan time.Time
+
+ // See time.Timer.Reset.
+ Reset(d time.Duration) bool
+
+ // See time.Timer.Stop.
+ Stop() bool
+
+ // See time.Now.
+ Now() time.Time
+
+ // See time.Since.
+ Since(t time.Time) time.Duration
+
+ // See time.Sleep.
+ Sleep(d time.Duration)
+}
+
+// implement our timer in terms of std time.Timer.
+type realTimer struct {
+ *time.Timer
+}
+
+func (rt realTimer) C() <-chan time.Time {
+ return rt.Timer.C
+}
+
+func (rt realTimer) Now() time.Time {
+ return time.Now()
+}
+
+func (rt realTimer) Since(t time.Time) time.Duration {
+ return time.Since(t)
+}
+
+func (rt realTimer) Sleep(d time.Duration) {
+ time.Sleep(d)
+}
+
+var _ timer = realTimer{}
+
+// NewBoundedFrequencyRunner creates a new BoundedFrequencyRunner instance,
+// which will manage runs of the specified function.
+//
+// All runs will be async to the caller of BoundedFrequencyRunner.Run, but
+// multiple runs are serialized. If the function needs to hold locks, it must
+// take them internally.
+//
+// Runs of the funtion will have at least minInterval between them (from
+// completion to next start), except that up to bursts may be allowed. Burst
+// runs are "accumulated" over time, one per minInterval up to burstRuns total.
+// This can be used, for example, to mitigate the impact of expensive operations
+// being called in response to user-initiated operations. Run requests that
+// would violate the minInterval are coallesced and run at the next opportunity.
+//
+// The function will be run at least once per maxInterval. For example, this can
+// force periodic refreshes of state in the absence of anyone calling Run.
+//
+// Examples:
+//
+// NewBoundedFrequencyRunner("name", fn, time.Second, 5*time.Second, 1)
+// - fn will have at least 1 second between runs
+// - fn will have no more than 5 seconds between runs
+//
+// NewBoundedFrequencyRunner("name", fn, 3*time.Second, 10*time.Second, 3)
+// - fn will have at least 3 seconds between runs, with up to 3 burst runs
+// - fn will have no more than 10 seconds between runs
+//
+// The maxInterval must be greater than or equal to the minInterval, If the
+// caller passes a maxInterval less than minInterval, this function will panic.
+func NewBoundedFrequencyRunner(name string, fn func(), minInterval, maxInterval time.Duration, burstRuns int) *BoundedFrequencyRunner {
+ timer := realTimer{Timer: time.NewTimer(0)} // will tick immediately
+ <-timer.C() // consume the first tick
+ return construct(name, fn, minInterval, maxInterval, burstRuns, timer)
+}
+
+// Make an instance with dependencies injected.
+func construct(name string, fn func(), minInterval, maxInterval time.Duration, burstRuns int, timer timer) *BoundedFrequencyRunner {
+ if maxInterval < minInterval {
+ panic(fmt.Sprintf("%s: maxInterval (%v) must be >= minInterval (%v)", name, minInterval, maxInterval))
+ }
+ if timer == nil {
+ panic(fmt.Sprintf("%s: timer must be non-nil", name))
+ }
+
+ bfr := &BoundedFrequencyRunner{
+ name: name,
+ fn: fn,
+ minInterval: minInterval,
+ maxInterval: maxInterval,
+ run: make(chan struct{}, 1),
+ timer: timer,
+ }
+ if minInterval == 0 {
+ bfr.limiter = nullLimiter{}
+ } else {
+ // allow burst updates in short succession
+ qps := float32(time.Second) / float32(minInterval)
+ bfr.limiter = flowcontrol.NewTokenBucketRateLimiterWithClock(qps, burstRuns, timer)
+ }
+ return bfr
+}
+
+// Loop handles the periodic timer and run requests. This is expected to be
+// called as a goroutine.
+func (bfr *BoundedFrequencyRunner) Loop(stop <-chan struct{}) {
+ glog.V(3).Infof("%s Loop running", bfr.name)
+ bfr.timer.Reset(bfr.maxInterval)
+ for {
+ select {
+ case <-stop:
+ bfr.stop()
+ glog.V(3).Infof("%s Loop stopping", bfr.name)
+ return
+ case <-bfr.timer.C():
+ bfr.tryRun()
+ case <-bfr.run:
+ bfr.tryRun()
+ }
+ }
+}
+
+// Run the function as soon as possible. If this is called while Loop is not
+// running, the call may be deferred indefinitely.
+// If there is already a queued request to call the underlying function, it
+// may be dropped - it is just guaranteed that we will try calling the
+// underlying function as soon as possible starting from now.
+func (bfr *BoundedFrequencyRunner) Run() {
+ // If it takes a lot of time to run the underlying function, noone is really
+ // processing elements from <run> channel. So to avoid blocking here on the
+ // putting element to it, we simply skip it if there is already an element
+ // in it.
+ select {
+ case bfr.run <- struct{}{}:
+ default:
+ }
+}
+
+// assumes the lock is not held
+func (bfr *BoundedFrequencyRunner) stop() {
+ bfr.mu.Lock()
+ defer bfr.mu.Unlock()
+ bfr.limiter.Stop()
+ bfr.timer.Stop()
+}
+
+// assumes the lock is not held
+func (bfr *BoundedFrequencyRunner) tryRun() {
+ bfr.mu.Lock()
+ defer bfr.mu.Unlock()
+
+ if bfr.limiter.TryAccept() {
+ // We're allowed to run the function right now.
+ bfr.fn()
+ bfr.lastRun = bfr.timer.Now()
+ bfr.timer.Stop()
+ bfr.timer.Reset(bfr.maxInterval)
+ glog.V(3).Infof("%s: ran, next possible in %v, periodic in %v", bfr.name, bfr.minInterval, bfr.maxInterval)
+ return
+ }
+
+ // It can't run right now, figure out when it can run next.
+
+ elapsed := bfr.timer.Since(bfr.lastRun) // how long since last run
+ nextPossible := bfr.minInterval - elapsed // time to next possible run
+ nextScheduled := bfr.maxInterval - elapsed // time to next periodic run
+ glog.V(4).Infof("%s: %v since last run, possible in %v, scheduled in %v", bfr.name, elapsed, nextPossible, nextScheduled)
+
+ if nextPossible < nextScheduled {
+ // Set the timer for ASAP, but don't drain here. Assuming Loop is running,
+ // it might get a delivery in the mean time, but that is OK.
+ bfr.timer.Stop()
+ bfr.timer.Reset(nextPossible)
+ glog.V(3).Infof("%s: throttled, scheduling run in %v", bfr.name, nextPossible)
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/async/runner.go b/vendor/k8s.io/kubernetes/pkg/util/async/runner.go
new file mode 100644
index 000000000..924f1d168
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/async/runner.go
@@ -0,0 +1,58 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package async
+
+import (
+ "sync"
+)
+
+// Runner is an abstraction to make it easy to start and stop groups of things that can be
+// described by a single function which waits on a channel close to exit.
+type Runner struct {
+ lock sync.Mutex
+ loopFuncs []func(stop chan struct{})
+ stop *chan struct{}
+}
+
+// NewRunner makes a runner for the given function(s). The function(s) should loop until
+// the channel is closed.
+func NewRunner(f ...func(stop chan struct{})) *Runner {
+ return &Runner{loopFuncs: f}
+}
+
+// Start begins running.
+func (r *Runner) Start() {
+ r.lock.Lock()
+ defer r.lock.Unlock()
+ if r.stop == nil {
+ c := make(chan struct{})
+ r.stop = &c
+ for i := range r.loopFuncs {
+ go r.loopFuncs[i](*r.stop)
+ }
+ }
+}
+
+// Stop stops running.
+func (r *Runner) Stop() {
+ r.lock.Lock()
+ defer r.lock.Unlock()
+ if r.stop != nil {
+ close(*r.stop)
+ r.stop = nil
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/dbus/dbus.go b/vendor/k8s.io/kubernetes/pkg/util/dbus/dbus.go
new file mode 100644
index 000000000..702d16e5d
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/dbus/dbus.go
@@ -0,0 +1,133 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package dbus
+
+import (
+ godbus "github.com/godbus/dbus"
+)
+
+// Interface is an interface that presents a subset of the godbus/dbus API. Use this
+// when you want to inject fakeable/mockable D-Bus behavior.
+type Interface interface {
+ // SystemBus returns a connection to the system bus, connecting to it
+ // first if necessary
+ SystemBus() (Connection, error)
+ // SessionBus returns a connection to the session bus, connecting to it
+ // first if necessary
+ SessionBus() (Connection, error)
+}
+
+// Connection represents a D-Bus connection
+type Connection interface {
+ // Returns an Object representing the bus itself
+ BusObject() Object
+
+ // Object creates a representation of a remote D-Bus object
+ Object(name, path string) Object
+
+ // Signal registers or unregisters a channel to receive D-Bus signals
+ Signal(ch chan<- *godbus.Signal)
+}
+
+// Object represents a remote D-Bus object
+type Object interface {
+ // Call synchronously calls a D-Bus method
+ Call(method string, flags godbus.Flags, args ...interface{}) Call
+}
+
+// Call represents a pending or completed D-Bus method call
+type Call interface {
+ // Store returns a completed call's return values, or an error
+ Store(retvalues ...interface{}) error
+}
+
+// Implements Interface in terms of actually talking to D-Bus
+type dbusImpl struct {
+ systemBus *connImpl
+ sessionBus *connImpl
+}
+
+// Implements Connection as a godbus.Conn
+type connImpl struct {
+ conn *godbus.Conn
+}
+
+// Implements Object as a godbus.Object
+type objectImpl struct {
+ object godbus.BusObject
+}
+
+// Implements Call as a godbus.Call
+type callImpl struct {
+ call *godbus.Call
+}
+
+// New returns a new Interface which will use godbus to talk to D-Bus
+func New() Interface {
+ return &dbusImpl{}
+}
+
+// SystemBus is part of Interface
+func (db *dbusImpl) SystemBus() (Connection, error) {
+ if db.systemBus == nil {
+ bus, err := godbus.SystemBus()
+ if err != nil {
+ return nil, err
+ }
+ db.systemBus = &connImpl{bus}
+ }
+
+ return db.systemBus, nil
+}
+
+// SessionBus is part of Interface
+func (db *dbusImpl) SessionBus() (Connection, error) {
+ if db.sessionBus == nil {
+ bus, err := godbus.SessionBus()
+ if err != nil {
+ return nil, err
+ }
+ db.sessionBus = &connImpl{bus}
+ }
+
+ return db.sessionBus, nil
+}
+
+// BusObject is part of the Connection interface
+func (conn *connImpl) BusObject() Object {
+ return &objectImpl{conn.conn.BusObject()}
+}
+
+// Object is part of the Connection interface
+func (conn *connImpl) Object(name, path string) Object {
+ return &objectImpl{conn.conn.Object(name, godbus.ObjectPath(path))}
+}
+
+// Signal is part of the Connection interface
+func (conn *connImpl) Signal(ch chan<- *godbus.Signal) {
+ conn.conn.Signal(ch)
+}
+
+// Call is part of the Object interface
+func (obj *objectImpl) Call(method string, flags godbus.Flags, args ...interface{}) Call {
+ return &callImpl{obj.object.Call(method, flags, args...)}
+}
+
+// Store is part of the Call interface
+func (call *callImpl) Store(retvalues ...interface{}) error {
+ return call.call.Store(retvalues...)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/dbus/doc.go b/vendor/k8s.io/kubernetes/pkg/util/dbus/doc.go
new file mode 100644
index 000000000..b07da628d
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/dbus/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package dbus provides an injectable interface and implementations for D-Bus communication
+package dbus // import "k8s.io/kubernetes/pkg/util/dbus"
diff --git a/vendor/k8s.io/kubernetes/pkg/util/dbus/fake_dbus.go b/vendor/k8s.io/kubernetes/pkg/util/dbus/fake_dbus.go
new file mode 100644
index 000000000..44131272e
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/dbus/fake_dbus.go
@@ -0,0 +1,135 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package dbus
+
+import (
+ "fmt"
+
+ godbus "github.com/godbus/dbus"
+)
+
+// DBusFake is a simple fake Interface type.
+type DBusFake struct {
+ systemBus *DBusFakeConnection
+ sessionBus *DBusFakeConnection
+}
+
+// DBusFakeConnection represents a fake D-Bus connection
+type DBusFakeConnection struct {
+ busObject *fakeObject
+ objects map[string]*fakeObject
+ signalHandlers []chan<- *godbus.Signal
+}
+
+// DBusFakeHandler is used to handle fake D-Bus method calls
+type DBusFakeHandler func(method string, args ...interface{}) ([]interface{}, error)
+
+type fakeObject struct {
+ handler DBusFakeHandler
+}
+
+type fakeCall struct {
+ ret []interface{}
+ err error
+}
+
+// NewFake returns a new Interface which will fake talking to D-Bus
+func NewFake(systemBus *DBusFakeConnection, sessionBus *DBusFakeConnection) *DBusFake {
+ return &DBusFake{systemBus, sessionBus}
+}
+
+func NewFakeConnection() *DBusFakeConnection {
+ return &DBusFakeConnection{
+ objects: make(map[string]*fakeObject),
+ }
+}
+
+// SystemBus is part of Interface
+func (db *DBusFake) SystemBus() (Connection, error) {
+ if db.systemBus != nil {
+ return db.systemBus, nil
+ } else {
+ return nil, fmt.Errorf("DBus is not running")
+ }
+}
+
+// SessionBus is part of Interface
+func (db *DBusFake) SessionBus() (Connection, error) {
+ if db.sessionBus != nil {
+ return db.sessionBus, nil
+ } else {
+ return nil, fmt.Errorf("DBus is not running")
+ }
+}
+
+// BusObject is part of the Connection interface
+func (conn *DBusFakeConnection) BusObject() Object {
+ return conn.busObject
+}
+
+// Object is part of the Connection interface
+func (conn *DBusFakeConnection) Object(name, path string) Object {
+ return conn.objects[name+path]
+}
+
+// Signal is part of the Connection interface
+func (conn *DBusFakeConnection) Signal(ch chan<- *godbus.Signal) {
+ for i := range conn.signalHandlers {
+ if conn.signalHandlers[i] == ch {
+ conn.signalHandlers = append(conn.signalHandlers[:i], conn.signalHandlers[i+1:]...)
+ return
+ }
+ }
+ conn.signalHandlers = append(conn.signalHandlers, ch)
+}
+
+// SetBusObject sets the handler for the BusObject of conn
+func (conn *DBusFakeConnection) SetBusObject(handler DBusFakeHandler) {
+ conn.busObject = &fakeObject{handler}
+}
+
+// AddObject adds a handler for the Object at name and path
+func (conn *DBusFakeConnection) AddObject(name, path string, handler DBusFakeHandler) {
+ conn.objects[name+path] = &fakeObject{handler}
+}
+
+// EmitSignal emits a signal on conn
+func (conn *DBusFakeConnection) EmitSignal(name, path, iface, signal string, args ...interface{}) {
+ sig := &godbus.Signal{
+ Sender: name,
+ Path: godbus.ObjectPath(path),
+ Name: iface + "." + signal,
+ Body: args,
+ }
+ for _, ch := range conn.signalHandlers {
+ ch <- sig
+ }
+}
+
+// Call is part of the Object interface
+func (obj *fakeObject) Call(method string, flags godbus.Flags, args ...interface{}) Call {
+ ret, err := obj.handler(method, args...)
+ return &fakeCall{ret, err}
+}
+
+// Store is part of the Call interface
+func (call *fakeCall) Store(retvalues ...interface{}) error {
+ if call.err != nil {
+ return call.err
+ }
+ return godbus.Store(call.ret, retvalues...)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/doc.go b/vendor/k8s.io/kubernetes/pkg/util/doc.go
new file mode 100644
index 000000000..f7e214f31
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/doc.go
@@ -0,0 +1,20 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package util implements various utility functions used in both testing and implementation
+// of Kubernetes. Package util may not depend on any other package in the Kubernetes
+// package tree.
+package util // import "k8s.io/kubernetes/pkg/util"
diff --git a/vendor/k8s.io/kubernetes/pkg/util/exec/doc.go b/vendor/k8s.io/kubernetes/pkg/util/exec/doc.go
new file mode 100644
index 000000000..de7301c8d
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/exec/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package exec provides an injectable interface and implementations for running commands.
+package exec // import "k8s.io/kubernetes/pkg/util/exec"
diff --git a/vendor/k8s.io/kubernetes/pkg/util/exec/exec.go b/vendor/k8s.io/kubernetes/pkg/util/exec/exec.go
new file mode 100644
index 000000000..f43bfa7a1
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/exec/exec.go
@@ -0,0 +1,200 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package exec
+
+import (
+ "io"
+ osexec "os/exec"
+ "syscall"
+ "time"
+)
+
+// ErrExecutableNotFound is returned if the executable is not found.
+var ErrExecutableNotFound = osexec.ErrNotFound
+
+// Interface is an interface that presents a subset of the os/exec API. Use this
+// when you want to inject fakeable/mockable exec behavior.
+type Interface interface {
+ // Command returns a Cmd instance which can be used to run a single command.
+ // This follows the pattern of package os/exec.
+ Command(cmd string, args ...string) Cmd
+
+ // LookPath wraps os/exec.LookPath
+ LookPath(file string) (string, error)
+}
+
+// Cmd is an interface that presents an API that is very similar to Cmd from os/exec.
+// As more functionality is needed, this can grow. Since Cmd is a struct, we will have
+// to replace fields with get/set method pairs.
+type Cmd interface {
+ // Run runs the command to the completion.
+ Run() error
+ // CombinedOutput runs the command and returns its combined standard output
+ // and standard error. This follows the pattern of package os/exec.
+ CombinedOutput() ([]byte, error)
+ // Output runs the command and returns standard output, but not standard err
+ Output() ([]byte, error)
+ SetDir(dir string)
+ SetStdin(in io.Reader)
+ SetStdout(out io.Writer)
+ SetStderr(out io.Writer)
+ // Stops the command by sending SIGTERM. It is not guaranteed the
+ // process will stop before this function returns. If the process is not
+ // responding, an internal timer function will send a SIGKILL to force
+ // terminate after 10 seconds.
+ Stop()
+}
+
+// ExitError is an interface that presents an API similar to os.ProcessState, which is
+// what ExitError from os/exec is. This is designed to make testing a bit easier and
+// probably loses some of the cross-platform properties of the underlying library.
+type ExitError interface {
+ String() string
+ Error() string
+ Exited() bool
+ ExitStatus() int
+}
+
+// Implements Interface in terms of really exec()ing.
+type executor struct{}
+
+// New returns a new Interface which will os/exec to run commands.
+func New() Interface {
+ return &executor{}
+}
+
+// Command is part of the Interface interface.
+func (executor *executor) Command(cmd string, args ...string) Cmd {
+ return (*cmdWrapper)(osexec.Command(cmd, args...))
+}
+
+// LookPath is part of the Interface interface
+func (executor *executor) LookPath(file string) (string, error) {
+ return osexec.LookPath(file)
+}
+
+// Wraps exec.Cmd so we can capture errors.
+type cmdWrapper osexec.Cmd
+
+func (cmd *cmdWrapper) SetDir(dir string) {
+ cmd.Dir = dir
+}
+
+func (cmd *cmdWrapper) SetStdin(in io.Reader) {
+ cmd.Stdin = in
+}
+
+func (cmd *cmdWrapper) SetStdout(out io.Writer) {
+ cmd.Stdout = out
+}
+
+func (cmd *cmdWrapper) SetStderr(out io.Writer) {
+ cmd.Stderr = out
+}
+
+// Run is part of the Cmd interface.
+func (cmd *cmdWrapper) Run() error {
+ return (*osexec.Cmd)(cmd).Run()
+}
+
+// CombinedOutput is part of the Cmd interface.
+func (cmd *cmdWrapper) CombinedOutput() ([]byte, error) {
+ out, err := (*osexec.Cmd)(cmd).CombinedOutput()
+ if err != nil {
+ return out, handleError(err)
+ }
+ return out, nil
+}
+
+func (cmd *cmdWrapper) Output() ([]byte, error) {
+ out, err := (*osexec.Cmd)(cmd).Output()
+ if err != nil {
+ return out, handleError(err)
+ }
+ return out, nil
+}
+
+// Stop is part of the Cmd interface.
+func (cmd *cmdWrapper) Stop() {
+ c := (*osexec.Cmd)(cmd)
+ if c.ProcessState.Exited() {
+ return
+ }
+ c.Process.Signal(syscall.SIGTERM)
+ time.AfterFunc(10*time.Second, func() {
+ if c.ProcessState.Exited() {
+ return
+ }
+ c.Process.Signal(syscall.SIGKILL)
+ })
+}
+
+func handleError(err error) error {
+ if ee, ok := err.(*osexec.ExitError); ok {
+ // Force a compile fail if exitErrorWrapper can't convert to ExitError.
+ var x ExitError = &ExitErrorWrapper{ee}
+ return x
+ }
+ if ee, ok := err.(*osexec.Error); ok {
+ if ee.Err == osexec.ErrNotFound {
+ return ErrExecutableNotFound
+ }
+ }
+ return err
+}
+
+// ExitErrorWrapper is an implementation of ExitError in terms of os/exec ExitError.
+// Note: standard exec.ExitError is type *os.ProcessState, which already implements Exited().
+type ExitErrorWrapper struct {
+ *osexec.ExitError
+}
+
+var _ ExitError = ExitErrorWrapper{}
+
+// ExitStatus is part of the ExitError interface.
+func (eew ExitErrorWrapper) ExitStatus() int {
+ ws, ok := eew.Sys().(syscall.WaitStatus)
+ if !ok {
+ panic("can't call ExitStatus() on a non-WaitStatus exitErrorWrapper")
+ }
+ return ws.ExitStatus()
+}
+
+// CodeExitError is an implementation of ExitError consisting of an error object
+// and an exit code (the upper bits of os.exec.ExitStatus).
+type CodeExitError struct {
+ Err error
+ Code int
+}
+
+var _ ExitError = CodeExitError{}
+
+func (e CodeExitError) Error() string {
+ return e.Err.Error()
+}
+
+func (e CodeExitError) String() string {
+ return e.Err.Error()
+}
+
+func (e CodeExitError) Exited() bool {
+ return true
+}
+
+func (e CodeExitError) ExitStatus() int {
+ return e.Code
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/exec/fake_exec.go b/vendor/k8s.io/kubernetes/pkg/util/exec/fake_exec.go
new file mode 100644
index 000000000..c7fcd6cec
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/exec/fake_exec.go
@@ -0,0 +1,145 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package exec
+
+import (
+ "fmt"
+ "io"
+)
+
+// A simple scripted Interface type.
+type FakeExec struct {
+ CommandScript []FakeCommandAction
+ CommandCalls int
+ LookPathFunc func(string) (string, error)
+}
+
+type FakeCommandAction func(cmd string, args ...string) Cmd
+
+func (fake *FakeExec) Command(cmd string, args ...string) Cmd {
+ if fake.CommandCalls > len(fake.CommandScript)-1 {
+ panic(fmt.Sprintf("ran out of Command() actions. Could not handle command [%d]: %s args: %v", fake.CommandCalls, cmd, args))
+ }
+ i := fake.CommandCalls
+ fake.CommandCalls++
+ return fake.CommandScript[i](cmd, args...)
+}
+
+func (fake *FakeExec) LookPath(file string) (string, error) {
+ return fake.LookPathFunc(file)
+}
+
+// A simple scripted Cmd type.
+type FakeCmd struct {
+ Argv []string
+ CombinedOutputScript []FakeCombinedOutputAction
+ CombinedOutputCalls int
+ CombinedOutputLog [][]string
+ RunScript []FakeRunAction
+ RunCalls int
+ RunLog [][]string
+ Dirs []string
+ Stdin io.Reader
+ Stdout io.Writer
+ Stderr io.Writer
+}
+
+func InitFakeCmd(fake *FakeCmd, cmd string, args ...string) Cmd {
+ fake.Argv = append([]string{cmd}, args...)
+ return fake
+}
+
+type FakeCombinedOutputAction func() ([]byte, error)
+type FakeRunAction func() ([]byte, []byte, error)
+
+func (fake *FakeCmd) SetDir(dir string) {
+ fake.Dirs = append(fake.Dirs, dir)
+}
+
+func (fake *FakeCmd) SetStdin(in io.Reader) {
+ fake.Stdin = in
+}
+
+func (fake *FakeCmd) SetStdout(out io.Writer) {
+ fake.Stdout = out
+}
+
+func (fake *FakeCmd) SetStderr(out io.Writer) {
+ fake.Stderr = out
+}
+
+func (fake *FakeCmd) Run() error {
+ if fake.RunCalls > len(fake.RunScript)-1 {
+ panic("ran out of Run() actions")
+ }
+ if fake.RunLog == nil {
+ fake.RunLog = [][]string{}
+ }
+ i := fake.RunCalls
+ fake.RunLog = append(fake.RunLog, append([]string{}, fake.Argv...))
+ fake.RunCalls++
+ stdout, stderr, err := fake.RunScript[i]()
+ if stdout != nil {
+ fake.Stdout.Write(stdout)
+ }
+ if stderr != nil {
+ fake.Stderr.Write(stderr)
+ }
+ return err
+}
+
+func (fake *FakeCmd) CombinedOutput() ([]byte, error) {
+ if fake.CombinedOutputCalls > len(fake.CombinedOutputScript)-1 {
+ panic("ran out of CombinedOutput() actions")
+ }
+ if fake.CombinedOutputLog == nil {
+ fake.CombinedOutputLog = [][]string{}
+ }
+ i := fake.CombinedOutputCalls
+ fake.CombinedOutputLog = append(fake.CombinedOutputLog, append([]string{}, fake.Argv...))
+ fake.CombinedOutputCalls++
+ return fake.CombinedOutputScript[i]()
+}
+
+func (fake *FakeCmd) Output() ([]byte, error) {
+ return nil, fmt.Errorf("unimplemented")
+}
+
+func (fake *FakeCmd) Stop() {
+ // no-op
+}
+
+// A simple fake ExitError type.
+type FakeExitError struct {
+ Status int
+}
+
+func (fake *FakeExitError) String() string {
+ return fmt.Sprintf("exit %d", fake.Status)
+}
+
+func (fake *FakeExitError) Error() string {
+ return fake.String()
+}
+
+func (fake *FakeExitError) Exited() bool {
+ return true
+}
+
+func (fake *FakeExitError) ExitStatus() int {
+ return fake.Status
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/hash/hash.go b/vendor/k8s.io/kubernetes/pkg/util/hash/hash.go
new file mode 100644
index 000000000..803f066a4
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/hash/hash.go
@@ -0,0 +1,37 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package hash
+
+import (
+ "hash"
+
+ "github.com/davecgh/go-spew/spew"
+)
+
+// DeepHashObject writes specified object to hash using the spew library
+// which follows pointers and prints actual values of the nested objects
+// ensuring the hash does not change when a pointer changes.
+func DeepHashObject(hasher hash.Hash, objectToWrite interface{}) {
+ hasher.Reset()
+ printer := spew.ConfigState{
+ Indent: " ",
+ SortKeys: true,
+ DisableMethods: true,
+ SpewKeys: true,
+ }
+ printer.Fprintf(hasher, "%#v", objectToWrite)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/interrupt/interrupt.go b/vendor/k8s.io/kubernetes/pkg/util/interrupt/interrupt.go
new file mode 100644
index 000000000..0265b9fb1
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/interrupt/interrupt.go
@@ -0,0 +1,104 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package interrupt
+
+import (
+ "os"
+ "os/signal"
+ "sync"
+ "syscall"
+)
+
+// terminationSignals are signals that cause the program to exit in the
+// supported platforms (linux, darwin, windows).
+var terminationSignals = []os.Signal{syscall.SIGHUP, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT}
+
+// Handler guarantees execution of notifications after a critical section (the function passed
+// to a Run method), even in the presence of process termination. It guarantees exactly once
+// invocation of the provided notify functions.
+type Handler struct {
+ notify []func()
+ final func(os.Signal)
+ once sync.Once
+}
+
+// Chain creates a new handler that invokes all notify functions when the critical section exits
+// and then invokes the optional handler's notifications. This allows critical sections to be
+// nested without losing exactly once invocations. Notify functions can invoke any cleanup needed
+// but should not exit (which is the responsibility of the parent handler).
+func Chain(handler *Handler, notify ...func()) *Handler {
+ if handler == nil {
+ return New(nil, notify...)
+ }
+ return New(handler.Signal, append(notify, handler.Close)...)
+}
+
+// New creates a new handler that guarantees all notify functions are run after the critical
+// section exits (or is interrupted by the OS), then invokes the final handler. If no final
+// handler is specified, the default final is `os.Exit(1)`. A handler can only be used for
+// one critical section.
+func New(final func(os.Signal), notify ...func()) *Handler {
+ return &Handler{
+ final: final,
+ notify: notify,
+ }
+}
+
+// Close executes all the notification handlers if they have not yet been executed.
+func (h *Handler) Close() {
+ h.once.Do(func() {
+ for _, fn := range h.notify {
+ fn()
+ }
+ })
+}
+
+// Signal is called when an os.Signal is received, and guarantees that all notifications
+// are executed, then the final handler is executed. This function should only be called once
+// per Handler instance.
+func (h *Handler) Signal(s os.Signal) {
+ h.once.Do(func() {
+ for _, fn := range h.notify {
+ fn()
+ }
+ if h.final == nil {
+ os.Exit(1)
+ }
+ h.final(s)
+ })
+}
+
+// Run ensures that any notifications are invoked after the provided fn exits (even if the
+// process is interrupted by an OS termination signal). Notifications are only invoked once
+// per Handler instance, so calling Run more than once will not behave as the user expects.
+func (h *Handler) Run(fn func() error) error {
+ ch := make(chan os.Signal, 1)
+ signal.Notify(ch, terminationSignals...)
+ defer func() {
+ signal.Stop(ch)
+ close(ch)
+ }()
+ go func() {
+ sig, ok := <-ch
+ if !ok {
+ return
+ }
+ h.Signal(sig)
+ }()
+ defer h.Close()
+ return fn()
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/io/io.go b/vendor/k8s.io/kubernetes/pkg/util/io/io.go
new file mode 100644
index 000000000..0be8e1272
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/io/io.go
@@ -0,0 +1,61 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package io
+
+import (
+ "fmt"
+ "io/ioutil"
+ "os"
+
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/kubernetes/pkg/api"
+ "k8s.io/kubernetes/pkg/api/v1"
+)
+
+// LoadPodFromFile will read, decode, and return a Pod from a file.
+func LoadPodFromFile(filePath string) (*v1.Pod, error) {
+ if filePath == "" {
+ return nil, fmt.Errorf("file path not specified")
+ }
+ podDef, err := ioutil.ReadFile(filePath)
+ if err != nil {
+ return nil, fmt.Errorf("failed to read file path %s: %+v", filePath, err)
+ }
+ if len(podDef) == 0 {
+ return nil, fmt.Errorf("file was empty: %s", filePath)
+ }
+ pod := &v1.Pod{}
+
+ codec := api.Codecs.LegacyCodec(api.Registry.GroupOrDie(v1.GroupName).GroupVersion)
+ if err := runtime.DecodeInto(codec, podDef, pod); err != nil {
+ return nil, fmt.Errorf("failed decoding file: %v", err)
+ }
+ return pod, nil
+}
+
+// SavePodToFile will encode and save a pod to a given path & permissions
+func SavePodToFile(pod *v1.Pod, filePath string, perm os.FileMode) error {
+ if filePath == "" {
+ return fmt.Errorf("file path not specified")
+ }
+ codec := api.Codecs.LegacyCodec(api.Registry.GroupOrDie(v1.GroupName).GroupVersion)
+ data, err := runtime.Encode(codec, pod)
+ if err != nil {
+ return fmt.Errorf("failed encoding pod: %v", err)
+ }
+ return ioutil.WriteFile(filePath, data, perm)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/io/writer.go b/vendor/k8s.io/kubernetes/pkg/util/io/writer.go
new file mode 100644
index 000000000..086508c90
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/io/writer.go
@@ -0,0 +1,80 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package io
+
+import (
+ "bytes"
+ "fmt"
+ "io/ioutil"
+ "os"
+ "os/exec"
+
+ "github.com/golang/glog"
+)
+
+// Writer is an interface which allows to write data to a file.
+type Writer interface {
+ WriteFile(filename string, data []byte, perm os.FileMode) error
+}
+
+// StdWriter implements Writer interface and uses standard libraries
+// for writing data to files.
+type StdWriter struct {
+}
+
+func (writer *StdWriter) WriteFile(filename string, data []byte, perm os.FileMode) error {
+ return ioutil.WriteFile(filename, data, perm)
+}
+
+// Alternative implementation of Writer interface that allows writing data to file
+// using nsenter command.
+// If a program (e.g. kubelet) runs in a container it may want to write data to
+// a mounted device. Since in Docker, mount propagation mode is set to private,
+// it will not see the mounted device in its own namespace. To work around this
+// limitaion one has to first enter hosts namespace (by using 'nsenter') and only
+// then write data.
+type NsenterWriter struct {
+}
+
+// TODO: should take a writer, not []byte
+func (writer *NsenterWriter) WriteFile(filename string, data []byte, perm os.FileMode) error {
+ cmd := "nsenter"
+ base_args := []string{
+ "--mount=/rootfs/proc/1/ns/mnt",
+ "--",
+ }
+
+ echo_args := append(base_args, "sh", "-c", fmt.Sprintf("cat > %s", filename))
+ glog.V(5).Infof("Command to write data to file: %v %v", cmd, echo_args)
+ command := exec.Command(cmd, echo_args...)
+ command.Stdin = bytes.NewBuffer(data)
+ outputBytes, err := command.CombinedOutput()
+ if err != nil {
+ glog.Errorf("Output from writing to %q: %v", filename, string(outputBytes))
+ return err
+ }
+
+ chmod_args := append(base_args, "chmod", fmt.Sprintf("%o", perm), filename)
+ glog.V(5).Infof("Command to change permissions to file: %v %v", cmd, chmod_args)
+ outputBytes, err = exec.Command(cmd, chmod_args...).CombinedOutput()
+ if err != nil {
+ glog.Errorf("Output from chmod command: %v", string(outputBytes))
+ return err
+ }
+
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/iptables/doc.go b/vendor/k8s.io/kubernetes/pkg/util/iptables/doc.go
new file mode 100644
index 000000000..f26498293
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/iptables/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package iptables provides an interface and implementations for running iptables commands.
+package iptables // import "k8s.io/kubernetes/pkg/util/iptables"
diff --git a/vendor/k8s.io/kubernetes/pkg/util/iptables/iptables.go b/vendor/k8s.io/kubernetes/pkg/util/iptables/iptables.go
new file mode 100644
index 000000000..b6c08fa37
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/iptables/iptables.go
@@ -0,0 +1,652 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package iptables
+
+import (
+ "bytes"
+ "fmt"
+ "regexp"
+ "strings"
+ "sync"
+
+ godbus "github.com/godbus/dbus"
+ "github.com/golang/glog"
+ "k8s.io/apimachinery/pkg/util/sets"
+ utildbus "k8s.io/kubernetes/pkg/util/dbus"
+ utilexec "k8s.io/kubernetes/pkg/util/exec"
+ utilversion "k8s.io/kubernetes/pkg/util/version"
+)
+
+type RulePosition string
+
+const (
+ Prepend RulePosition = "-I"
+ Append RulePosition = "-A"
+)
+
+// An injectable interface for running iptables commands. Implementations must be goroutine-safe.
+type Interface interface {
+ // GetVersion returns the "X.Y.Z" version string for iptables.
+ GetVersion() (string, error)
+ // EnsureChain checks if the specified chain exists and, if not, creates it. If the chain existed, return true.
+ EnsureChain(table Table, chain Chain) (bool, error)
+ // FlushChain clears the specified chain. If the chain did not exist, return error.
+ FlushChain(table Table, chain Chain) error
+ // DeleteChain deletes the specified chain. If the chain did not exist, return error.
+ DeleteChain(table Table, chain Chain) error
+ // EnsureRule checks if the specified rule is present and, if not, creates it. If the rule existed, return true.
+ EnsureRule(position RulePosition, table Table, chain Chain, args ...string) (bool, error)
+ // DeleteRule checks if the specified rule is present and, if so, deletes it.
+ DeleteRule(table Table, chain Chain, args ...string) error
+ // IsIpv6 returns true if this is managing ipv6 tables
+ IsIpv6() bool
+ // SaveInto calls `iptables-save` for table and stores result in a given buffer.
+ SaveInto(table Table, buffer *bytes.Buffer) error
+ // Restore runs `iptables-restore` passing data through []byte.
+ // table is the Table to restore
+ // data should be formatted like the output of SaveInto()
+ // flush sets the presence of the "--noflush" flag. see: FlushFlag
+ // counters sets the "--counters" flag. see: RestoreCountersFlag
+ Restore(table Table, data []byte, flush FlushFlag, counters RestoreCountersFlag) error
+ // RestoreAll is the same as Restore except that no table is specified.
+ RestoreAll(data []byte, flush FlushFlag, counters RestoreCountersFlag) error
+ // AddReloadFunc adds a function to call on iptables reload
+ AddReloadFunc(reloadFunc func())
+ // Destroy cleans up resources used by the Interface
+ Destroy()
+}
+
+type Protocol byte
+
+const (
+ ProtocolIpv4 Protocol = iota + 1
+ ProtocolIpv6
+)
+
+type Table string
+
+const (
+ TableNAT Table = "nat"
+ TableFilter Table = "filter"
+)
+
+type Chain string
+
+const (
+ ChainPostrouting Chain = "POSTROUTING"
+ ChainPrerouting Chain = "PREROUTING"
+ ChainOutput Chain = "OUTPUT"
+ ChainInput Chain = "INPUT"
+)
+
+const (
+ cmdIPTablesSave string = "iptables-save"
+ cmdIPTablesRestore string = "iptables-restore"
+ cmdIPTables string = "iptables"
+ cmdIp6tables string = "ip6tables"
+)
+
+// Option flag for Restore
+type RestoreCountersFlag bool
+
+const RestoreCounters RestoreCountersFlag = true
+const NoRestoreCounters RestoreCountersFlag = false
+
+// Option flag for Flush
+type FlushFlag bool
+
+const FlushTables FlushFlag = true
+const NoFlushTables FlushFlag = false
+
+// Versions of iptables less than this do not support the -C / --check flag
+// (test whether a rule exists).
+const MinCheckVersion = "1.4.11"
+
+// Minimum iptables versions supporting the -w and -w2 flags
+const MinWaitVersion = "1.4.20"
+const MinWait2Version = "1.4.22"
+
+const LockfilePath16x = "/run/xtables.lock"
+
+// runner implements Interface in terms of exec("iptables").
+type runner struct {
+ mu sync.Mutex
+ exec utilexec.Interface
+ dbus utildbus.Interface
+ protocol Protocol
+ hasCheck bool
+ waitFlag []string
+ restoreWaitFlag []string
+ lockfilePath string
+
+ reloadFuncs []func()
+ signal chan *godbus.Signal
+}
+
+// newInternal returns a new Interface which will exec iptables, and allows the
+// caller to change the iptables-restore lockfile path
+func newInternal(exec utilexec.Interface, dbus utildbus.Interface, protocol Protocol, lockfilePath string) Interface {
+ vstring, err := getIPTablesVersionString(exec)
+ if err != nil {
+ glog.Warningf("Error checking iptables version, assuming version at least %s: %v", MinCheckVersion, err)
+ vstring = MinCheckVersion
+ }
+
+ if lockfilePath == "" {
+ lockfilePath = LockfilePath16x
+ }
+
+ runner := &runner{
+ exec: exec,
+ dbus: dbus,
+ protocol: protocol,
+ hasCheck: getIPTablesHasCheckCommand(vstring),
+ waitFlag: getIPTablesWaitFlag(vstring),
+ restoreWaitFlag: getIPTablesRestoreWaitFlag(exec),
+ lockfilePath: lockfilePath,
+ }
+ // TODO this needs to be moved to a separate Start() or Run() function so that New() has zero side
+ // effects.
+ runner.connectToFirewallD()
+ return runner
+}
+
+// New returns a new Interface which will exec iptables.
+func New(exec utilexec.Interface, dbus utildbus.Interface, protocol Protocol) Interface {
+ return newInternal(exec, dbus, protocol, "")
+}
+
+// Destroy is part of Interface.
+func (runner *runner) Destroy() {
+ if runner.signal != nil {
+ runner.signal <- nil
+ }
+}
+
+const (
+ firewalldName = "org.fedoraproject.FirewallD1"
+ firewalldPath = "/org/fedoraproject/FirewallD1"
+ firewalldInterface = "org.fedoraproject.FirewallD1"
+)
+
+// Connects to D-Bus and listens for FirewallD start/restart. (On non-FirewallD-using
+// systems, this is effectively a no-op; we listen for the signals, but they will never be
+// emitted, so reload() will never be called.)
+func (runner *runner) connectToFirewallD() {
+ bus, err := runner.dbus.SystemBus()
+ if err != nil {
+ glog.V(1).Infof("Could not connect to D-Bus system bus: %s", err)
+ return
+ }
+
+ rule := fmt.Sprintf("type='signal',sender='%s',path='%s',interface='%s',member='Reloaded'", firewalldName, firewalldPath, firewalldInterface)
+ bus.BusObject().Call("org.freedesktop.DBus.AddMatch", 0, rule)
+
+ rule = fmt.Sprintf("type='signal',interface='org.freedesktop.DBus',member='NameOwnerChanged',path='/org/freedesktop/DBus',sender='org.freedesktop.DBus',arg0='%s'", firewalldName)
+ bus.BusObject().Call("org.freedesktop.DBus.AddMatch", 0, rule)
+
+ runner.signal = make(chan *godbus.Signal, 10)
+ bus.Signal(runner.signal)
+
+ go runner.dbusSignalHandler(bus)
+}
+
+// GetVersion returns the version string.
+func (runner *runner) GetVersion() (string, error) {
+ return getIPTablesVersionString(runner.exec)
+}
+
+// EnsureChain is part of Interface.
+func (runner *runner) EnsureChain(table Table, chain Chain) (bool, error) {
+ fullArgs := makeFullArgs(table, chain)
+
+ runner.mu.Lock()
+ defer runner.mu.Unlock()
+
+ out, err := runner.run(opCreateChain, fullArgs)
+ if err != nil {
+ if ee, ok := err.(utilexec.ExitError); ok {
+ if ee.Exited() && ee.ExitStatus() == 1 {
+ return true, nil
+ }
+ }
+ return false, fmt.Errorf("error creating chain %q: %v: %s", chain, err, out)
+ }
+ return false, nil
+}
+
+// FlushChain is part of Interface.
+func (runner *runner) FlushChain(table Table, chain Chain) error {
+ fullArgs := makeFullArgs(table, chain)
+
+ runner.mu.Lock()
+ defer runner.mu.Unlock()
+
+ out, err := runner.run(opFlushChain, fullArgs)
+ if err != nil {
+ return fmt.Errorf("error flushing chain %q: %v: %s", chain, err, out)
+ }
+ return nil
+}
+
+// DeleteChain is part of Interface.
+func (runner *runner) DeleteChain(table Table, chain Chain) error {
+ fullArgs := makeFullArgs(table, chain)
+
+ runner.mu.Lock()
+ defer runner.mu.Unlock()
+
+ // TODO: we could call iptables -S first, ignore the output and check for non-zero return (more like DeleteRule)
+ out, err := runner.run(opDeleteChain, fullArgs)
+ if err != nil {
+ return fmt.Errorf("error deleting chain %q: %v: %s", chain, err, out)
+ }
+ return nil
+}
+
+// EnsureRule is part of Interface.
+func (runner *runner) EnsureRule(position RulePosition, table Table, chain Chain, args ...string) (bool, error) {
+ fullArgs := makeFullArgs(table, chain, args...)
+
+ runner.mu.Lock()
+ defer runner.mu.Unlock()
+
+ exists, err := runner.checkRule(table, chain, args...)
+ if err != nil {
+ return false, err
+ }
+ if exists {
+ return true, nil
+ }
+ out, err := runner.run(operation(position), fullArgs)
+ if err != nil {
+ return false, fmt.Errorf("error appending rule: %v: %s", err, out)
+ }
+ return false, nil
+}
+
+// DeleteRule is part of Interface.
+func (runner *runner) DeleteRule(table Table, chain Chain, args ...string) error {
+ fullArgs := makeFullArgs(table, chain, args...)
+
+ runner.mu.Lock()
+ defer runner.mu.Unlock()
+
+ exists, err := runner.checkRule(table, chain, args...)
+ if err != nil {
+ return err
+ }
+ if !exists {
+ return nil
+ }
+ out, err := runner.run(opDeleteRule, fullArgs)
+ if err != nil {
+ return fmt.Errorf("error deleting rule: %v: %s", err, out)
+ }
+ return nil
+}
+
+func (runner *runner) IsIpv6() bool {
+ return runner.protocol == ProtocolIpv6
+}
+
+// SaveInto is part of Interface.
+func (runner *runner) SaveInto(table Table, buffer *bytes.Buffer) error {
+ runner.mu.Lock()
+ defer runner.mu.Unlock()
+
+ // run and return
+ args := []string{"-t", string(table)}
+ glog.V(4).Infof("running iptables-save %v", args)
+ cmd := runner.exec.Command(cmdIPTablesSave, args...)
+ // Since CombinedOutput() doesn't support redirecting it to a buffer,
+ // we need to workaround it by redirecting stdout and stderr to buffer
+ // and explicitly calling Run() [CombinedOutput() underneath itself
+ // creates a new buffer, redirects stdout and stderr to it and also
+ // calls Run()].
+ cmd.SetStdout(buffer)
+ cmd.SetStderr(buffer)
+ return cmd.Run()
+}
+
+// Restore is part of Interface.
+func (runner *runner) Restore(table Table, data []byte, flush FlushFlag, counters RestoreCountersFlag) error {
+ // setup args
+ args := []string{"-T", string(table)}
+ return runner.restoreInternal(args, data, flush, counters)
+}
+
+// RestoreAll is part of Interface.
+func (runner *runner) RestoreAll(data []byte, flush FlushFlag, counters RestoreCountersFlag) error {
+ // setup args
+ args := make([]string, 0)
+ return runner.restoreInternal(args, data, flush, counters)
+}
+
+type iptablesLocker interface {
+ Close()
+}
+
+// restoreInternal is the shared part of Restore/RestoreAll
+func (runner *runner) restoreInternal(args []string, data []byte, flush FlushFlag, counters RestoreCountersFlag) error {
+ runner.mu.Lock()
+ defer runner.mu.Unlock()
+
+ if !flush {
+ args = append(args, "--noflush")
+ }
+ if counters {
+ args = append(args, "--counters")
+ }
+
+ // Grab the iptables lock to prevent iptables-restore and iptables
+ // from stepping on each other. iptables-restore 1.6.2 will have
+ // a --wait option like iptables itself, but that's not widely deployed.
+ if len(runner.restoreWaitFlag) == 0 {
+ locker, err := grabIptablesLocks(runner.lockfilePath)
+ if err != nil {
+ return err
+ }
+ defer locker.Close()
+ }
+
+ // run the command and return the output or an error including the output and error
+ fullArgs := append(runner.restoreWaitFlag, args...)
+ glog.V(4).Infof("running iptables-restore %v", fullArgs)
+ cmd := runner.exec.Command(cmdIPTablesRestore, fullArgs...)
+ cmd.SetStdin(bytes.NewBuffer(data))
+ b, err := cmd.CombinedOutput()
+ if err != nil {
+ return fmt.Errorf("%v (%s)", err, b)
+ }
+ return nil
+}
+
+func (runner *runner) iptablesCommand() string {
+ if runner.IsIpv6() {
+ return cmdIp6tables
+ } else {
+ return cmdIPTables
+ }
+}
+
+func (runner *runner) run(op operation, args []string) ([]byte, error) {
+ iptablesCmd := runner.iptablesCommand()
+
+ fullArgs := append(runner.waitFlag, string(op))
+ fullArgs = append(fullArgs, args...)
+ glog.V(5).Infof("running iptables %s %v", string(op), args)
+ return runner.exec.Command(iptablesCmd, fullArgs...).CombinedOutput()
+ // Don't log err here - callers might not think it is an error.
+}
+
+// Returns (bool, nil) if it was able to check the existence of the rule, or
+// (<undefined>, error) if the process of checking failed.
+func (runner *runner) checkRule(table Table, chain Chain, args ...string) (bool, error) {
+ if runner.hasCheck {
+ return runner.checkRuleUsingCheck(makeFullArgs(table, chain, args...))
+ } else {
+ return runner.checkRuleWithoutCheck(table, chain, args...)
+ }
+}
+
+var hexnumRE = regexp.MustCompile("0x0+([0-9])")
+
+func trimhex(s string) string {
+ return hexnumRE.ReplaceAllString(s, "0x$1")
+}
+
+// Executes the rule check without using the "-C" flag, instead parsing iptables-save.
+// Present for compatibility with <1.4.11 versions of iptables. This is full
+// of hack and half-measures. We should nix this ASAP.
+func (runner *runner) checkRuleWithoutCheck(table Table, chain Chain, args ...string) (bool, error) {
+ glog.V(1).Infof("running iptables-save -t %s", string(table))
+ out, err := runner.exec.Command(cmdIPTablesSave, "-t", string(table)).CombinedOutput()
+ if err != nil {
+ return false, fmt.Errorf("error checking rule: %v", err)
+ }
+
+ // Sadly, iptables has inconsistent quoting rules for comments. Just remove all quotes.
+ // Also, quoted multi-word comments (which are counted as a single arg)
+ // will be unpacked into multiple args,
+ // in order to compare against iptables-save output (which will be split at whitespace boundary)
+ // e.g. a single arg('"this must be before the NodePort rules"') will be unquoted and unpacked into 7 args.
+ var argsCopy []string
+ for i := range args {
+ tmpField := strings.Trim(args[i], "\"")
+ tmpField = trimhex(tmpField)
+ argsCopy = append(argsCopy, strings.Fields(tmpField)...)
+ }
+ argset := sets.NewString(argsCopy...)
+
+ for _, line := range strings.Split(string(out), "\n") {
+ var fields = strings.Fields(line)
+
+ // Check that this is a rule for the correct chain, and that it has
+ // the correct number of argument (+2 for "-A <chain name>")
+ if !strings.HasPrefix(line, fmt.Sprintf("-A %s", string(chain))) || len(fields) != len(argsCopy)+2 {
+ continue
+ }
+
+ // Sadly, iptables has inconsistent quoting rules for comments.
+ // Just remove all quotes.
+ for i := range fields {
+ fields[i] = strings.Trim(fields[i], "\"")
+ fields[i] = trimhex(fields[i])
+ }
+
+ // TODO: This misses reorderings e.g. "-x foo ! -y bar" will match "! -x foo -y bar"
+ if sets.NewString(fields...).IsSuperset(argset) {
+ return true, nil
+ }
+ glog.V(5).Infof("DBG: fields is not a superset of args: fields=%v args=%v", fields, args)
+ }
+
+ return false, nil
+}
+
+// Executes the rule check using the "-C" flag
+func (runner *runner) checkRuleUsingCheck(args []string) (bool, error) {
+ out, err := runner.run(opCheckRule, args)
+ if err == nil {
+ return true, nil
+ }
+ if ee, ok := err.(utilexec.ExitError); ok {
+ // iptables uses exit(1) to indicate a failure of the operation,
+ // as compared to a malformed commandline, for example.
+ if ee.Exited() && ee.ExitStatus() == 1 {
+ return false, nil
+ }
+ }
+ return false, fmt.Errorf("error checking rule: %v: %s", err, out)
+}
+
+type operation string
+
+const (
+ opCreateChain operation = "-N"
+ opFlushChain operation = "-F"
+ opDeleteChain operation = "-X"
+ opAppendRule operation = "-A"
+ opCheckRule operation = "-C"
+ opDeleteRule operation = "-D"
+)
+
+func makeFullArgs(table Table, chain Chain, args ...string) []string {
+ return append([]string{string(chain), "-t", string(table)}, args...)
+}
+
+// Checks if iptables has the "-C" flag
+func getIPTablesHasCheckCommand(vstring string) bool {
+ minVersion, err := utilversion.ParseGeneric(MinCheckVersion)
+ if err != nil {
+ glog.Errorf("MinCheckVersion (%s) is not a valid version string: %v", MinCheckVersion, err)
+ return true
+ }
+ version, err := utilversion.ParseGeneric(vstring)
+ if err != nil {
+ glog.Errorf("vstring (%s) is not a valid version string: %v", vstring, err)
+ return true
+ }
+ return version.AtLeast(minVersion)
+}
+
+// Checks if iptables version has a "wait" flag
+func getIPTablesWaitFlag(vstring string) []string {
+ version, err := utilversion.ParseGeneric(vstring)
+ if err != nil {
+ glog.Errorf("vstring (%s) is not a valid version string: %v", vstring, err)
+ return nil
+ }
+
+ minVersion, err := utilversion.ParseGeneric(MinWaitVersion)
+ if err != nil {
+ glog.Errorf("MinWaitVersion (%s) is not a valid version string: %v", MinWaitVersion, err)
+ return nil
+ }
+ if version.LessThan(minVersion) {
+ return nil
+ }
+
+ minVersion, err = utilversion.ParseGeneric(MinWait2Version)
+ if err != nil {
+ glog.Errorf("MinWait2Version (%s) is not a valid version string: %v", MinWait2Version, err)
+ return nil
+ }
+ if version.LessThan(minVersion) {
+ return []string{"-w"}
+ } else {
+ return []string{"-w2"}
+ }
+}
+
+// getIPTablesVersionString runs "iptables --version" to get the version string
+// in the form "X.X.X"
+func getIPTablesVersionString(exec utilexec.Interface) (string, error) {
+ // this doesn't access mutable state so we don't need to use the interface / runner
+ bytes, err := exec.Command(cmdIPTables, "--version").CombinedOutput()
+ if err != nil {
+ return "", err
+ }
+ versionMatcher := regexp.MustCompile("v([0-9]+(\\.[0-9]+)+)")
+ match := versionMatcher.FindStringSubmatch(string(bytes))
+ if match == nil {
+ return "", fmt.Errorf("no iptables version found in string: %s", bytes)
+ }
+ return match[1], nil
+}
+
+// Checks if iptables-restore has a "wait" flag
+// --wait support landed in v1.6.1+ right before --version support, so
+// any version of iptables-restore that supports --version will also
+// support --wait
+func getIPTablesRestoreWaitFlag(exec utilexec.Interface) []string {
+ vstring, err := getIPTablesRestoreVersionString(exec)
+ if err != nil || vstring == "" {
+ glog.V(3).Infof("couldn't get iptables-restore version; assuming it doesn't support --wait")
+ return nil
+ }
+ if _, err := utilversion.ParseGeneric(vstring); err != nil {
+ glog.V(3).Infof("couldn't parse iptables-restore version; assuming it doesn't support --wait")
+ return nil
+ }
+
+ return []string{"--wait=2"}
+}
+
+// getIPTablesRestoreVersionString runs "iptables-restore --version" to get the version string
+// in the form "X.X.X"
+func getIPTablesRestoreVersionString(exec utilexec.Interface) (string, error) {
+ // this doesn't access mutable state so we don't need to use the interface / runner
+
+ // iptables-restore hasn't always had --version, and worse complains
+ // about unrecognized commands but doesn't exit when it gets them.
+ // Work around that by setting stdin to nothing so it exits immediately.
+ cmd := exec.Command(cmdIPTablesRestore, "--version")
+ cmd.SetStdin(bytes.NewReader([]byte{}))
+ bytes, err := cmd.CombinedOutput()
+ if err != nil {
+ return "", err
+ }
+ versionMatcher := regexp.MustCompile("v([0-9]+(\\.[0-9]+)+)")
+ match := versionMatcher.FindStringSubmatch(string(bytes))
+ if match == nil {
+ return "", fmt.Errorf("no iptables version found in string: %s", bytes)
+ }
+ return match[1], nil
+}
+
+// goroutine to listen for D-Bus signals
+func (runner *runner) dbusSignalHandler(bus utildbus.Connection) {
+ firewalld := bus.Object(firewalldName, firewalldPath)
+
+ for s := range runner.signal {
+ if s == nil {
+ // Unregister
+ bus.Signal(runner.signal)
+ return
+ }
+
+ switch s.Name {
+ case "org.freedesktop.DBus.NameOwnerChanged":
+ name := s.Body[0].(string)
+ new_owner := s.Body[2].(string)
+
+ if name != firewalldName || len(new_owner) == 0 {
+ continue
+ }
+
+ // FirewallD startup (specifically the part where it deletes
+ // all existing iptables rules) may not yet be complete when
+ // we get this signal, so make a dummy request to it to
+ // synchronize.
+ firewalld.Call(firewalldInterface+".getDefaultZone", 0)
+
+ runner.reload()
+ case firewalldInterface + ".Reloaded":
+ runner.reload()
+ }
+ }
+}
+
+// AddReloadFunc is part of Interface
+func (runner *runner) AddReloadFunc(reloadFunc func()) {
+ runner.reloadFuncs = append(runner.reloadFuncs, reloadFunc)
+}
+
+// runs all reload funcs to re-sync iptables rules
+func (runner *runner) reload() {
+ glog.V(1).Infof("reloading iptables rules")
+
+ for _, f := range runner.reloadFuncs {
+ f()
+ }
+}
+
+// IsNotFoundError returns true if the error indicates "not found". It parses
+// the error string looking for known values, which is imperfect but works in
+// practice.
+func IsNotFoundError(err error) bool {
+ es := err.Error()
+ if strings.Contains(es, "No such file or directory") {
+ return true
+ }
+ if strings.Contains(es, "No chain/target/match by that name") {
+ return true
+ }
+ return false
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/iptables/iptables_linux.go b/vendor/k8s.io/kubernetes/pkg/util/iptables/iptables_linux.go
new file mode 100644
index 000000000..4f614cb52
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/iptables/iptables_linux.go
@@ -0,0 +1,93 @@
+// +build linux
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package iptables
+
+import (
+ "fmt"
+ "net"
+ "os"
+ "time"
+
+ "golang.org/x/sys/unix"
+ "k8s.io/apimachinery/pkg/util/wait"
+)
+
+type locker struct {
+ lock16 *os.File
+ lock14 *net.UnixListener
+}
+
+func (l *locker) Close() {
+ if l.lock16 != nil {
+ l.lock16.Close()
+ }
+ if l.lock14 != nil {
+ l.lock14.Close()
+ }
+}
+
+func grabIptablesLocks(lockfilePath string) (iptablesLocker, error) {
+ var err error
+ var success bool
+
+ l := &locker{}
+ defer func(l *locker) {
+ // Clean up immediately on failure
+ if !success {
+ l.Close()
+ }
+ }(l)
+
+ // Grab both 1.6.x and 1.4.x-style locks; we don't know what the
+ // iptables-restore version is if it doesn't support --wait, so we
+ // can't assume which lock method it'll use.
+
+ // Roughly duplicate iptables 1.6.x xtables_lock() function.
+ l.lock16, err = os.OpenFile(lockfilePath, os.O_CREATE, 0600)
+ if err != nil {
+ return nil, fmt.Errorf("failed to open iptables lock %s: %v", lockfilePath, err)
+ }
+
+ if err := wait.PollImmediate(200*time.Millisecond, 2*time.Second, func() (bool, error) {
+ if err := grabIptablesFileLock(l.lock16); err != nil {
+ return false, nil
+ }
+ return true, nil
+ }); err != nil {
+ return nil, fmt.Errorf("failed to acquire new iptables lock: %v", err)
+ }
+
+ // Roughly duplicate iptables 1.4.x xtables_lock() function.
+ if err := wait.PollImmediate(200*time.Millisecond, 2*time.Second, func() (bool, error) {
+ l.lock14, err = net.ListenUnix("unix", &net.UnixAddr{Name: "@xtables", Net: "unix"})
+ if err != nil {
+ return false, nil
+ }
+ return true, nil
+ }); err != nil {
+ return nil, fmt.Errorf("failed to acquire old iptables lock: %v", err)
+ }
+
+ success = true
+ return l, nil
+}
+
+func grabIptablesFileLock(f *os.File) error {
+ return unix.Flock(int(f.Fd()), unix.LOCK_EX|unix.LOCK_NB)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/iptables/iptables_unsupported.go b/vendor/k8s.io/kubernetes/pkg/util/iptables/iptables_unsupported.go
new file mode 100644
index 000000000..c6a5f0d7d
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/iptables/iptables_unsupported.go
@@ -0,0 +1,32 @@
+// +build !linux
+
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package iptables
+
+import (
+ "fmt"
+ "os"
+)
+
+func grabIptablesLocks(lockfilePath string) (iptablesLocker, error) {
+ return nil, fmt.Errorf("iptables unsupported on this platform")
+}
+
+func grabIptablesFileLock(f *os.File) error {
+ return fmt.Errorf("iptables unsupported on this platform")
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/iptables/save_restore.go b/vendor/k8s.io/kubernetes/pkg/util/iptables/save_restore.go
new file mode 100644
index 000000000..6f4eacaca
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/iptables/save_restore.go
@@ -0,0 +1,110 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package iptables
+
+import (
+ "fmt"
+ "strings"
+)
+
+// MakeChainLine return an iptables-save/restore formatted chain line given a Chain
+func MakeChainLine(chain Chain) string {
+ return fmt.Sprintf(":%s - [0:0]", chain)
+}
+
+// GetChainLines parses a table's iptables-save data to find chains in the table.
+// It returns a map of iptables.Chain to string where the string is the chain line from the save (with counters etc).
+func GetChainLines(table Table, save []byte) map[Chain]string {
+ chainsMap := make(map[Chain]string)
+ tablePrefix := "*" + string(table)
+ readIndex := 0
+ // find beginning of table
+ for readIndex < len(save) {
+ line, n := ReadLine(readIndex, save)
+ readIndex = n
+ if strings.HasPrefix(line, tablePrefix) {
+ break
+ }
+ }
+ // parse table lines
+ for readIndex < len(save) {
+ line, n := ReadLine(readIndex, save)
+ readIndex = n
+ if len(line) == 0 {
+ continue
+ }
+ if strings.HasPrefix(line, "COMMIT") || strings.HasPrefix(line, "*") {
+ break
+ } else if strings.HasPrefix(line, "#") {
+ continue
+ } else if strings.HasPrefix(line, ":") && len(line) > 1 {
+ // We assume that the <line> contains space - chain lines have 3 fields,
+ // space delimited. If there is no space, this line will panic.
+ chain := Chain(line[1:strings.Index(line, " ")])
+ chainsMap[chain] = line
+ }
+ }
+ return chainsMap
+}
+
+func ReadLine(readIndex int, byteArray []byte) (string, int) {
+ currentReadIndex := readIndex
+
+ // consume left spaces
+ for currentReadIndex < len(byteArray) {
+ if byteArray[currentReadIndex] == ' ' {
+ currentReadIndex++
+ } else {
+ break
+ }
+ }
+
+ // leftTrimIndex stores the left index of the line after the line is left-trimmed
+ leftTrimIndex := currentReadIndex
+
+ // rightTrimIndex stores the right index of the line after the line is right-trimmed
+ // it is set to -1 since the correct value has not yet been determined.
+ rightTrimIndex := -1
+
+ for ; currentReadIndex < len(byteArray); currentReadIndex++ {
+ if byteArray[currentReadIndex] == ' ' {
+ // set rightTrimIndex
+ if rightTrimIndex == -1 {
+ rightTrimIndex = currentReadIndex
+ }
+ } else if (byteArray[currentReadIndex] == '\n') || (currentReadIndex == (len(byteArray) - 1)) {
+ // end of line or byte buffer is reached
+ if currentReadIndex <= leftTrimIndex {
+ return "", currentReadIndex + 1
+ }
+ // set the rightTrimIndex
+ if rightTrimIndex == -1 {
+ rightTrimIndex = currentReadIndex
+ if currentReadIndex == (len(byteArray)-1) && (byteArray[currentReadIndex] != '\n') {
+ // ensure that the last character is part of the returned string,
+ // unless the last character is '\n'
+ rightTrimIndex = currentReadIndex + 1
+ }
+ }
+ return string(byteArray[leftTrimIndex:rightTrimIndex]), currentReadIndex + 1
+ } else {
+ // unset rightTrimIndex
+ rightTrimIndex = -1
+ }
+ }
+ return "", currentReadIndex
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/mount/doc.go b/vendor/k8s.io/kubernetes/pkg/util/mount/doc.go
new file mode 100644
index 000000000..15179e53f
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/mount/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package mount defines an interface to mounting filesystems.
+package mount // import "k8s.io/kubernetes/pkg/util/mount"
diff --git a/vendor/k8s.io/kubernetes/pkg/util/mount/fake.go b/vendor/k8s.io/kubernetes/pkg/util/mount/fake.go
new file mode 100644
index 000000000..2b71fa0a7
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/mount/fake.go
@@ -0,0 +1,173 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package mount
+
+import (
+ "path/filepath"
+ "sync"
+
+ "github.com/golang/glog"
+)
+
+// FakeMounter implements mount.Interface for tests.
+type FakeMounter struct {
+ MountPoints []MountPoint
+ Log []FakeAction
+ // Some tests run things in parallel, make sure the mounter does not produce
+ // any golang's DATA RACE warnings.
+ mutex sync.Mutex
+}
+
+var _ Interface = &FakeMounter{}
+
+// Values for FakeAction.Action
+const FakeActionMount = "mount"
+const FakeActionUnmount = "unmount"
+
+// FakeAction objects are logged every time a fake mount or unmount is called.
+type FakeAction struct {
+ Action string // "mount" or "unmount"
+ Target string // applies to both mount and unmount actions
+ Source string // applies only to "mount" actions
+ FSType string // applies only to "mount" actions
+}
+
+func (f *FakeMounter) ResetLog() {
+ f.mutex.Lock()
+ defer f.mutex.Unlock()
+
+ f.Log = []FakeAction{}
+}
+
+func (f *FakeMounter) Mount(source string, target string, fstype string, options []string) error {
+ f.mutex.Lock()
+ defer f.mutex.Unlock()
+
+ // find 'bind' option
+ for _, option := range options {
+ if option == "bind" {
+ // This is a bind-mount. In order to mimic linux behaviour, we must
+ // use the original device of the bind-mount as the real source.
+ // E.g. when mounted /dev/sda like this:
+ // $ mount /dev/sda /mnt/test
+ // $ mount -o bind /mnt/test /mnt/bound
+ // then /proc/mount contains:
+ // /dev/sda /mnt/test
+ // /dev/sda /mnt/bound
+ // (and not /mnt/test /mnt/bound)
+ // I.e. we must use /dev/sda as source instead of /mnt/test in the
+ // bind mount.
+ for _, mnt := range f.MountPoints {
+ if source == mnt.Path {
+ source = mnt.Device
+ break
+ }
+ }
+ break
+ }
+ }
+
+ // If target is a symlink, get its absolute path
+ absTarget, err := filepath.EvalSymlinks(target)
+ if err != nil {
+ absTarget = target
+ }
+
+ f.MountPoints = append(f.MountPoints, MountPoint{Device: source, Path: absTarget, Type: fstype})
+ glog.V(5).Infof("Fake mounter: mounted %s to %s", source, absTarget)
+ f.Log = append(f.Log, FakeAction{Action: FakeActionMount, Target: absTarget, Source: source, FSType: fstype})
+ return nil
+}
+
+func (f *FakeMounter) Unmount(target string) error {
+ f.mutex.Lock()
+ defer f.mutex.Unlock()
+
+ // If target is a symlink, get its absolute path
+ absTarget, err := filepath.EvalSymlinks(target)
+ if err != nil {
+ absTarget = target
+ }
+
+ newMountpoints := []MountPoint{}
+ for _, mp := range f.MountPoints {
+ if mp.Path == absTarget {
+ glog.V(5).Infof("Fake mounter: unmounted %s from %s", mp.Device, absTarget)
+ // Don't copy it to newMountpoints
+ continue
+ }
+ newMountpoints = append(newMountpoints, MountPoint{Device: mp.Device, Path: mp.Path, Type: mp.Type})
+ }
+ f.MountPoints = newMountpoints
+ f.Log = append(f.Log, FakeAction{Action: FakeActionUnmount, Target: absTarget})
+ return nil
+}
+
+func (f *FakeMounter) List() ([]MountPoint, error) {
+ f.mutex.Lock()
+ defer f.mutex.Unlock()
+
+ return f.MountPoints, nil
+}
+
+func (f *FakeMounter) IsMountPointMatch(mp MountPoint, dir string) bool {
+ return (mp.Path == dir)
+}
+
+func (f *FakeMounter) IsNotMountPoint(dir string) (bool, error) {
+ return IsNotMountPoint(f, dir)
+}
+
+func (f *FakeMounter) IsLikelyNotMountPoint(file string) (bool, error) {
+ f.mutex.Lock()
+ defer f.mutex.Unlock()
+
+ // If file is a symlink, get its absolute path
+ absFile, err := filepath.EvalSymlinks(file)
+ if err != nil {
+ absFile = file
+ }
+
+ for _, mp := range f.MountPoints {
+ if mp.Path == absFile {
+ glog.V(5).Infof("isLikelyNotMountPoint for %s: mounted %s, false", file, mp.Path)
+ return false, nil
+ }
+ }
+ glog.V(5).Infof("isLikelyNotMountPoint for %s: true", file)
+ return true, nil
+}
+
+func (f *FakeMounter) DeviceOpened(pathname string) (bool, error) {
+ f.mutex.Lock()
+ defer f.mutex.Unlock()
+
+ for _, mp := range f.MountPoints {
+ if mp.Device == pathname {
+ return true, nil
+ }
+ }
+ return false, nil
+}
+
+func (f *FakeMounter) PathIsDevice(pathname string) (bool, error) {
+ return true, nil
+}
+
+func (f *FakeMounter) GetDeviceNameFromMount(mountPath, pluginDir string) (string, error) {
+ return getDeviceNameFromMount(f, mountPath, pluginDir)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/mount/mount.go b/vendor/k8s.io/kubernetes/pkg/util/mount/mount.go
new file mode 100644
index 000000000..0c458d64b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/mount/mount.go
@@ -0,0 +1,245 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// TODO(thockin): This whole pkg is pretty linux-centric. As soon as we have
+// an alternate platform, we will need to abstract further.
+package mount
+
+import (
+ "fmt"
+ "path"
+ "path/filepath"
+ "strings"
+
+ "github.com/golang/glog"
+ "k8s.io/kubernetes/pkg/util/exec"
+)
+
+const (
+ // Default mount command if mounter path is not specified
+ defaultMountCommand = "mount"
+ MountsInGlobalPDPath = "mounts"
+)
+
+type Interface interface {
+ // Mount mounts source to target as fstype with given options.
+ Mount(source string, target string, fstype string, options []string) error
+ // Unmount unmounts given target.
+ Unmount(target string) error
+ // List returns a list of all mounted filesystems. This can be large.
+ // On some platforms, reading mounts is not guaranteed consistent (i.e.
+ // it could change between chunked reads). This is guaranteed to be
+ // consistent.
+ List() ([]MountPoint, error)
+ // IsMountPointMatch determines if the mountpoint matches the dir
+ IsMountPointMatch(mp MountPoint, dir string) bool
+ // IsNotMountPoint determines if a directory is a mountpoint.
+ // It should return ErrNotExist when the directory does not exist.
+ // IsNotMountPoint is more expensive than IsLikelyNotMountPoint.
+ // IsNotMountPoint detects bind mounts in linux.
+ // IsNotMountPoint enumerates all the mountpoints using List() and
+ // the list of mountpoints may be large, then it uses
+ // IsMountPointMatch to evaluate whether the directory is a mountpoint
+ IsNotMountPoint(file string) (bool, error)
+ // IsLikelyNotMountPoint uses heuristics to determine if a directory
+ // is a mountpoint.
+ // It should return ErrNotExist when the directory does not exist.
+ // IsLikelyNotMountPoint does NOT properly detect all mountpoint types
+ // most notably linux bind mounts.
+ IsLikelyNotMountPoint(file string) (bool, error)
+ // DeviceOpened determines if the device is in use elsewhere
+ // on the system, i.e. still mounted.
+ DeviceOpened(pathname string) (bool, error)
+ // PathIsDevice determines if a path is a device.
+ PathIsDevice(pathname string) (bool, error)
+ // GetDeviceNameFromMount finds the device name by checking the mount path
+ // to get the global mount path which matches its plugin directory
+ GetDeviceNameFromMount(mountPath, pluginDir string) (string, error)
+}
+
+// Compile-time check to ensure all Mounter implementations satisfy
+// the mount interface
+var _ Interface = &Mounter{}
+
+// This represents a single line in /proc/mounts or /etc/fstab.
+type MountPoint struct {
+ Device string
+ Path string
+ Type string
+ Opts []string
+ Freq int
+ Pass int
+}
+
+// SafeFormatAndMount probes a device to see if it is formatted.
+// Namely it checks to see if a file system is present. If so it
+// mounts it otherwise the device is formatted first then mounted.
+type SafeFormatAndMount struct {
+ Interface
+ Runner exec.Interface
+}
+
+// FormatAndMount formats the given disk, if needed, and mounts it.
+// That is if the disk is not formatted and it is not being mounted as
+// read-only it will format it first then mount it. Otherwise, if the
+// disk is already formatted or it is being mounted as read-only, it
+// will be mounted without formatting.
+func (mounter *SafeFormatAndMount) FormatAndMount(source string, target string, fstype string, options []string) error {
+ // Don't attempt to format if mounting as readonly. Go straight to mounting.
+ for _, option := range options {
+ if option == "ro" {
+ return mounter.Interface.Mount(source, target, fstype, options)
+ }
+ }
+ return mounter.formatAndMount(source, target, fstype, options)
+}
+
+// New returns a mount.Interface for the current system.
+// It provides options to override the default mounter behavior.
+// mounterPath allows using an alternative to `/bin/mount` for mounting.
+func New(mounterPath string) Interface {
+ return &Mounter{
+ mounterPath: mounterPath,
+ }
+}
+
+// GetMountRefs finds all other references to the device referenced
+// by mountPath; returns a list of paths.
+func GetMountRefs(mounter Interface, mountPath string) ([]string, error) {
+ mps, err := mounter.List()
+ if err != nil {
+ return nil, err
+ }
+
+ // Find the device name.
+ deviceName := ""
+ // If mountPath is symlink, need get its target path.
+ slTarget, err := filepath.EvalSymlinks(mountPath)
+ if err != nil {
+ slTarget = mountPath
+ }
+ for i := range mps {
+ if mps[i].Path == slTarget {
+ deviceName = mps[i].Device
+ break
+ }
+ }
+
+ // Find all references to the device.
+ var refs []string
+ if deviceName == "" {
+ glog.Warningf("could not determine device for path: %q", mountPath)
+ } else {
+ for i := range mps {
+ if mps[i].Device == deviceName && mps[i].Path != slTarget {
+ refs = append(refs, mps[i].Path)
+ }
+ }
+ }
+ return refs, nil
+}
+
+// GetDeviceNameFromMount: given a mnt point, find the device from /proc/mounts
+// returns the device name, reference count, and error code
+func GetDeviceNameFromMount(mounter Interface, mountPath string) (string, int, error) {
+ mps, err := mounter.List()
+ if err != nil {
+ return "", 0, err
+ }
+
+ // Find the device name.
+ // FIXME if multiple devices mounted on the same mount path, only the first one is returned
+ device := ""
+ // If mountPath is symlink, need get its target path.
+ slTarget, err := filepath.EvalSymlinks(mountPath)
+ if err != nil {
+ slTarget = mountPath
+ }
+ for i := range mps {
+ if mps[i].Path == slTarget {
+ device = mps[i].Device
+ break
+ }
+ }
+
+ // Find all references to the device.
+ refCount := 0
+ for i := range mps {
+ if mps[i].Device == device {
+ refCount++
+ }
+ }
+ return device, refCount, nil
+}
+
+// getDeviceNameFromMount find the device name from /proc/mounts in which
+// the mount path reference should match the given plugin directory. In case no mount path reference
+// matches, returns the volume name taken from its given mountPath
+func getDeviceNameFromMount(mounter Interface, mountPath, pluginDir string) (string, error) {
+ refs, err := GetMountRefs(mounter, mountPath)
+ if err != nil {
+ glog.V(4).Infof("GetMountRefs failed for mount path %q: %v", mountPath, err)
+ return "", err
+ }
+ if len(refs) == 0 {
+ glog.V(4).Infof("Directory %s is not mounted", mountPath)
+ return "", fmt.Errorf("directory %s is not mounted", mountPath)
+ }
+ basemountPath := path.Join(pluginDir, MountsInGlobalPDPath)
+ for _, ref := range refs {
+ if strings.HasPrefix(ref, basemountPath) {
+ volumeID, err := filepath.Rel(basemountPath, ref)
+ if err != nil {
+ glog.Errorf("Failed to get volume id from mount %s - %v", mountPath, err)
+ return "", err
+ }
+ return volumeID, nil
+ }
+ }
+
+ return path.Base(mountPath), nil
+}
+
+// IsNotMountPoint determines if a directory is a mountpoint.
+// It should return ErrNotExist when the directory does not exist.
+// This method uses the List() of all mountpoints
+// It is more extensive than IsLikelyNotMountPoint
+// and it detects bind mounts in linux
+func IsNotMountPoint(mounter Interface, file string) (bool, error) {
+ // IsLikelyNotMountPoint provides a quick check
+ // to determine whether file IS A mountpoint
+ notMnt, notMntErr := mounter.IsLikelyNotMountPoint(file)
+ if notMntErr != nil {
+ return notMnt, notMntErr
+ }
+ // identified as mountpoint, so return this fact
+ if notMnt == false {
+ return notMnt, nil
+ }
+ // check all mountpoints since IsLikelyNotMountPoint
+ // is not reliable for some mountpoint types
+ mountPoints, mountPointsErr := mounter.List()
+ if mountPointsErr != nil {
+ return notMnt, mountPointsErr
+ }
+ for _, mp := range mountPoints {
+ if mounter.IsMountPointMatch(mp, file) {
+ notMnt = false
+ break
+ }
+ }
+ return notMnt, nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/mount/mount_linux.go b/vendor/k8s.io/kubernetes/pkg/util/mount/mount_linux.go
new file mode 100644
index 000000000..4c141ad5b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/mount/mount_linux.go
@@ -0,0 +1,432 @@
+// +build linux
+
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package mount
+
+import (
+ "bufio"
+ "fmt"
+ "hash/fnv"
+ "io"
+ "os"
+ "os/exec"
+ "strconv"
+ "strings"
+ "syscall"
+
+ "github.com/golang/glog"
+ "k8s.io/apimachinery/pkg/util/sets"
+ utilexec "k8s.io/kubernetes/pkg/util/exec"
+)
+
+const (
+ // How many times to retry for a consistent read of /proc/mounts.
+ maxListTries = 3
+ // Number of fields per line in /proc/mounts as per the fstab man page.
+ expectedNumFieldsPerLine = 6
+ // Location of the mount file to use
+ procMountsPath = "/proc/mounts"
+)
+
+const (
+ // 'fsck' found errors and corrected them
+ fsckErrorsCorrected = 1
+ // 'fsck' found errors but exited without correcting them
+ fsckErrorsUncorrected = 4
+)
+
+// Mounter provides the default implementation of mount.Interface
+// for the linux platform. This implementation assumes that the
+// kubelet is running in the host's root mount namespace.
+type Mounter struct {
+ mounterPath string
+}
+
+// Mount mounts source to target as fstype with given options. 'source' and 'fstype' must
+// be an emtpy string in case it's not required, e.g. for remount, or for auto filesystem
+// type, where kernel handles fs type for you. The mount 'options' is a list of options,
+// currently come from mount(8), e.g. "ro", "remount", "bind", etc. If no more option is
+// required, call Mount with an empty string list or nil.
+func (mounter *Mounter) Mount(source string, target string, fstype string, options []string) error {
+ // Path to mounter binary if containerized mounter is needed. Otherwise, it is set to empty.
+ // All Linux distros are expected to be shipped with a mount utility that an support bind mounts.
+ mounterPath := ""
+ bind, bindRemountOpts := isBind(options)
+ if bind {
+ err := doMount(mounterPath, defaultMountCommand, source, target, fstype, []string{"bind"})
+ if err != nil {
+ return err
+ }
+ return doMount(mounterPath, defaultMountCommand, source, target, fstype, bindRemountOpts)
+ }
+ // The list of filesystems that require containerized mounter on GCI image cluster
+ fsTypesNeedMounter := sets.NewString("nfs", "glusterfs", "ceph", "cifs")
+ if fsTypesNeedMounter.Has(fstype) {
+ mounterPath = mounter.mounterPath
+ }
+ return doMount(mounterPath, defaultMountCommand, source, target, fstype, options)
+}
+
+// isBind detects whether a bind mount is being requested and makes the remount options to
+// use in case of bind mount, due to the fact that bind mount doesn't respect mount options.
+// The list equals:
+// options - 'bind' + 'remount' (no duplicate)
+func isBind(options []string) (bool, []string) {
+ bindRemountOpts := []string{"remount"}
+ bind := false
+
+ if len(options) != 0 {
+ for _, option := range options {
+ switch option {
+ case "bind":
+ bind = true
+ break
+ case "remount":
+ break
+ default:
+ bindRemountOpts = append(bindRemountOpts, option)
+ }
+ }
+ }
+
+ return bind, bindRemountOpts
+}
+
+// doMount runs the mount command. mounterPath is the path to mounter binary if containerized mounter is used.
+func doMount(mounterPath string, mountCmd string, source string, target string, fstype string, options []string) error {
+ mountArgs := makeMountArgs(source, target, fstype, options)
+ if len(mounterPath) > 0 {
+ mountArgs = append([]string{mountCmd}, mountArgs...)
+ mountCmd = mounterPath
+ }
+
+ glog.V(4).Infof("Mounting cmd (%s) with arguments (%s)", mountCmd, mountArgs)
+ command := exec.Command(mountCmd, mountArgs...)
+ output, err := command.CombinedOutput()
+ if err != nil {
+ glog.Errorf("Mount failed: %v\nMounting command: %s\nMounting arguments: %s %s %s %v\nOutput: %s\n", err, mountCmd, source, target, fstype, options, string(output))
+ return fmt.Errorf("mount failed: %v\nMounting command: %s\nMounting arguments: %s %s %s %v\nOutput: %s\n",
+ err, mountCmd, source, target, fstype, options, string(output))
+ }
+ return err
+}
+
+// makeMountArgs makes the arguments to the mount(8) command.
+func makeMountArgs(source, target, fstype string, options []string) []string {
+ // Build mount command as follows:
+ // mount [-t $fstype] [-o $options] [$source] $target
+ mountArgs := []string{}
+ if len(fstype) > 0 {
+ mountArgs = append(mountArgs, "-t", fstype)
+ }
+ if len(options) > 0 {
+ mountArgs = append(mountArgs, "-o", strings.Join(options, ","))
+ }
+ if len(source) > 0 {
+ mountArgs = append(mountArgs, source)
+ }
+ mountArgs = append(mountArgs, target)
+
+ return mountArgs
+}
+
+// Unmount unmounts the target.
+func (mounter *Mounter) Unmount(target string) error {
+ glog.V(4).Infof("Unmounting %s", target)
+ command := exec.Command("umount", target)
+ output, err := command.CombinedOutput()
+ if err != nil {
+ return fmt.Errorf("Unmount failed: %v\nUnmounting arguments: %s\nOutput: %s\n", err, target, string(output))
+ }
+ return nil
+}
+
+// List returns a list of all mounted filesystems.
+func (*Mounter) List() ([]MountPoint, error) {
+ return listProcMounts(procMountsPath)
+}
+
+func (mounter *Mounter) IsMountPointMatch(mp MountPoint, dir string) bool {
+ deletedDir := fmt.Sprintf("%s\\040(deleted)", dir)
+ return ((mp.Path == dir) || (mp.Path == deletedDir))
+}
+
+func (mounter *Mounter) IsNotMountPoint(dir string) (bool, error) {
+ return IsNotMountPoint(mounter, dir)
+}
+
+// IsLikelyNotMountPoint determines if a directory is not a mountpoint.
+// It is fast but not necessarily ALWAYS correct. If the path is in fact
+// a bind mount from one part of a mount to another it will not be detected.
+// mkdir /tmp/a /tmp/b; mount --bin /tmp/a /tmp/b; IsLikelyNotMountPoint("/tmp/b")
+// will return true. When in fact /tmp/b is a mount point. If this situation
+// if of interest to you, don't use this function...
+func (mounter *Mounter) IsLikelyNotMountPoint(file string) (bool, error) {
+ stat, err := os.Stat(file)
+ if err != nil {
+ return true, err
+ }
+ rootStat, err := os.Lstat(file + "/..")
+ if err != nil {
+ return true, err
+ }
+ // If the directory has a different device as parent, then it is a mountpoint.
+ if stat.Sys().(*syscall.Stat_t).Dev != rootStat.Sys().(*syscall.Stat_t).Dev {
+ return false, nil
+ }
+
+ return true, nil
+}
+
+// DeviceOpened checks if block device in use by calling Open with O_EXCL flag.
+// If pathname is not a device, log and return false with nil error.
+// If open returns errno EBUSY, return true with nil error.
+// If open returns nil, return false with nil error.
+// Otherwise, return false with error
+func (mounter *Mounter) DeviceOpened(pathname string) (bool, error) {
+ return exclusiveOpenFailsOnDevice(pathname)
+}
+
+// PathIsDevice uses FileInfo returned from os.Stat to check if path refers
+// to a device.
+func (mounter *Mounter) PathIsDevice(pathname string) (bool, error) {
+ return pathIsDevice(pathname)
+}
+
+func exclusiveOpenFailsOnDevice(pathname string) (bool, error) {
+ isDevice, err := pathIsDevice(pathname)
+ if err != nil {
+ return false, fmt.Errorf(
+ "PathIsDevice failed for path %q: %v",
+ pathname,
+ err)
+ }
+ if !isDevice {
+ glog.Errorf("Path %q is not refering to a device.", pathname)
+ return false, nil
+ }
+ fd, errno := syscall.Open(pathname, syscall.O_RDONLY|syscall.O_EXCL, 0)
+ // If the device is in use, open will return an invalid fd.
+ // When this happens, it is expected that Close will fail and throw an error.
+ defer syscall.Close(fd)
+ if errno == nil {
+ // device not in use
+ return false, nil
+ } else if errno == syscall.EBUSY {
+ // device is in use
+ return true, nil
+ }
+ // error during call to Open
+ return false, errno
+}
+
+func pathIsDevice(pathname string) (bool, error) {
+ finfo, err := os.Stat(pathname)
+ if os.IsNotExist(err) {
+ return false, nil
+ }
+ // err in call to os.Stat
+ if err != nil {
+ return false, err
+ }
+ // path refers to a device
+ if finfo.Mode()&os.ModeDevice != 0 {
+ return true, nil
+ }
+ // path does not refer to device
+ return false, nil
+}
+
+//GetDeviceNameFromMount: given a mount point, find the device name from its global mount point
+func (mounter *Mounter) GetDeviceNameFromMount(mountPath, pluginDir string) (string, error) {
+ return getDeviceNameFromMount(mounter, mountPath, pluginDir)
+}
+
+func listProcMounts(mountFilePath string) ([]MountPoint, error) {
+ hash1, err := readProcMounts(mountFilePath, nil)
+ if err != nil {
+ return nil, err
+ }
+
+ for i := 0; i < maxListTries; i++ {
+ mps := []MountPoint{}
+ hash2, err := readProcMounts(mountFilePath, &mps)
+ if err != nil {
+ return nil, err
+ }
+ if hash1 == hash2 {
+ // Success
+ return mps, nil
+ }
+ hash1 = hash2
+ }
+ return nil, fmt.Errorf("failed to get a consistent snapshot of %v after %d tries", mountFilePath, maxListTries)
+}
+
+// readProcMounts reads the given mountFilePath (normally /proc/mounts) and produces a hash
+// of the contents. If the out argument is not nil, this fills it with MountPoint structs.
+func readProcMounts(mountFilePath string, out *[]MountPoint) (uint32, error) {
+ file, err := os.Open(mountFilePath)
+ if err != nil {
+ return 0, err
+ }
+ defer file.Close()
+ return readProcMountsFrom(file, out)
+}
+
+func readProcMountsFrom(file io.Reader, out *[]MountPoint) (uint32, error) {
+ hash := fnv.New32a()
+ scanner := bufio.NewReader(file)
+ for {
+ line, err := scanner.ReadString('\n')
+ if err == io.EOF {
+ break
+ }
+ fields := strings.Fields(line)
+ if len(fields) != expectedNumFieldsPerLine {
+ return 0, fmt.Errorf("wrong number of fields (expected %d, got %d): %s", expectedNumFieldsPerLine, len(fields), line)
+ }
+
+ fmt.Fprintf(hash, "%s", line)
+
+ if out != nil {
+ mp := MountPoint{
+ Device: fields[0],
+ Path: fields[1],
+ Type: fields[2],
+ Opts: strings.Split(fields[3], ","),
+ }
+
+ freq, err := strconv.Atoi(fields[4])
+ if err != nil {
+ return 0, err
+ }
+ mp.Freq = freq
+
+ pass, err := strconv.Atoi(fields[5])
+ if err != nil {
+ return 0, err
+ }
+ mp.Pass = pass
+
+ *out = append(*out, mp)
+ }
+ }
+ return hash.Sum32(), nil
+}
+
+// formatAndMount uses unix utils to format and mount the given disk
+func (mounter *SafeFormatAndMount) formatAndMount(source string, target string, fstype string, options []string) error {
+ options = append(options, "defaults")
+
+ // Run fsck on the disk to fix repairable issues
+ glog.V(4).Infof("Checking for issues with fsck on disk: %s", source)
+ args := []string{"-a", source}
+ cmd := mounter.Runner.Command("fsck", args...)
+ out, err := cmd.CombinedOutput()
+ if err != nil {
+ ee, isExitError := err.(utilexec.ExitError)
+ switch {
+ case err == utilexec.ErrExecutableNotFound:
+ glog.Warningf("'fsck' not found on system; continuing mount without running 'fsck'.")
+ case isExitError && ee.ExitStatus() == fsckErrorsCorrected:
+ glog.Infof("Device %s has errors which were corrected by fsck.", source)
+ case isExitError && ee.ExitStatus() == fsckErrorsUncorrected:
+ return fmt.Errorf("'fsck' found errors on device %s but could not correct them: %s.", source, string(out))
+ case isExitError && ee.ExitStatus() > fsckErrorsUncorrected:
+ glog.Infof("`fsck` error %s", string(out))
+ }
+ }
+
+ // Try to mount the disk
+ glog.V(4).Infof("Attempting to mount disk: %s %s %s", fstype, source, target)
+ mountErr := mounter.Interface.Mount(source, target, fstype, options)
+ if mountErr != nil {
+ // Mount failed. This indicates either that the disk is unformatted or
+ // it contains an unexpected filesystem.
+ existingFormat, err := mounter.getDiskFormat(source)
+ if err != nil {
+ return err
+ }
+ if existingFormat == "" {
+ // Disk is unformatted so format it.
+ args = []string{source}
+ // Use 'ext4' as the default
+ if len(fstype) == 0 {
+ fstype = "ext4"
+ }
+
+ if fstype == "ext4" || fstype == "ext3" {
+ args = []string{"-F", source}
+ }
+ glog.Infof("Disk %q appears to be unformatted, attempting to format as type: %q with options: %v", source, fstype, args)
+ cmd := mounter.Runner.Command("mkfs."+fstype, args...)
+ _, err := cmd.CombinedOutput()
+ if err == nil {
+ // the disk has been formatted successfully try to mount it again.
+ glog.Infof("Disk successfully formatted (mkfs): %s - %s %s", fstype, source, target)
+ return mounter.Interface.Mount(source, target, fstype, options)
+ }
+ glog.Errorf("format of disk %q failed: type:(%q) target:(%q) options:(%q)error:(%v)", source, fstype, target, options, err)
+ return err
+ } else {
+ // Disk is already formatted and failed to mount
+ if len(fstype) == 0 || fstype == existingFormat {
+ // This is mount error
+ return mountErr
+ } else {
+ // Block device is formatted with unexpected filesystem, let the user know
+ return fmt.Errorf("failed to mount the volume as %q, it already contains %s. Mount error: %v", fstype, existingFormat, mountErr)
+ }
+ }
+ }
+ return mountErr
+}
+
+// diskLooksUnformatted uses 'lsblk' to see if the given disk is unformated
+func (mounter *SafeFormatAndMount) getDiskFormat(disk string) (string, error) {
+ args := []string{"-n", "-o", "FSTYPE", disk}
+ cmd := mounter.Runner.Command("lsblk", args...)
+ glog.V(4).Infof("Attempting to determine if disk %q is formatted using lsblk with args: (%v)", disk, args)
+ dataOut, err := cmd.CombinedOutput()
+ output := string(dataOut)
+ glog.V(4).Infof("Output: %q", output)
+
+ if err != nil {
+ glog.Errorf("Could not determine if disk %q is formatted (%v)", disk, err)
+ return "", err
+ }
+
+ // Split lsblk output into lines. Unformatted devices should contain only
+ // "\n". Beware of "\n\n", that's a device with one empty partition.
+ output = strings.TrimSuffix(output, "\n") // Avoid last empty line
+ lines := strings.Split(output, "\n")
+ if lines[0] != "" {
+ // The device is formatted
+ return lines[0], nil
+ }
+
+ if len(lines) == 1 {
+ // The device is unformatted and has no dependent devices
+ return "", nil
+ }
+
+ // The device has dependent devices, most probably partitions (LVM, LUKS
+ // and MD RAID are reported as FSTYPE and caught above).
+ return "unknown data, probably partitions", nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/mount/mount_unsupported.go b/vendor/k8s.io/kubernetes/pkg/util/mount/mount_unsupported.go
new file mode 100644
index 000000000..632ad0606
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/mount/mount_unsupported.go
@@ -0,0 +1,67 @@
+// +build !linux
+
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package mount
+
+type Mounter struct {
+ mounterPath string
+}
+
+func (mounter *Mounter) Mount(source string, target string, fstype string, options []string) error {
+ return nil
+}
+
+func (mounter *Mounter) Unmount(target string) error {
+ return nil
+}
+
+func (mounter *Mounter) List() ([]MountPoint, error) {
+ return []MountPoint{}, nil
+}
+
+func (mounter *Mounter) IsMountPointMatch(mp MountPoint, dir string) bool {
+ return (mp.Path == dir)
+}
+
+func (mounter *Mounter) IsNotMountPoint(dir string) (bool, error) {
+ return IsNotMountPoint(mounter, dir)
+}
+
+func (mounter *Mounter) IsLikelyNotMountPoint(file string) (bool, error) {
+ return true, nil
+}
+
+func (mounter *Mounter) GetDeviceNameFromMount(mountPath, pluginDir string) (string, error) {
+ return "", nil
+}
+
+func (mounter *Mounter) DeviceOpened(pathname string) (bool, error) {
+ return false, nil
+}
+
+func (mounter *Mounter) PathIsDevice(pathname string) (bool, error) {
+ return true, nil
+}
+
+func (mounter *SafeFormatAndMount) formatAndMount(source string, target string, fstype string, options []string) error {
+ return nil
+}
+
+func (mounter *SafeFormatAndMount) diskLooksUnformatted(disk string) (bool, error) {
+ return true, nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/mount/nsenter_mount.go b/vendor/k8s.io/kubernetes/pkg/util/mount/nsenter_mount.go
new file mode 100644
index 000000000..4af8ef0d8
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/mount/nsenter_mount.go
@@ -0,0 +1,241 @@
+// +build linux
+
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package mount
+
+import (
+ "fmt"
+ "os"
+ "path/filepath"
+ "strings"
+
+ "github.com/golang/glog"
+ "k8s.io/kubernetes/pkg/util/exec"
+)
+
+// NsenterMounter is part of experimental support for running the kubelet
+// in a container. Currently, all docker containers receive their own mount
+// namespaces. NsenterMounter works by executing nsenter to run commands in
+// the host's mount namespace.
+//
+// NsenterMounter requires:
+//
+// 1. Docker >= 1.6 due to the dependency on the slave propagation mode
+// of the bind-mount of the kubelet root directory in the container.
+// Docker 1.5 used a private propagation mode for bind-mounts, so mounts
+// performed in the host's mount namespace do not propagate out to the
+// bind-mount in this docker version.
+// 2. The host's root filesystem must be available at /rootfs
+// 3. The nsenter binary must be on the Kubelet process' PATH in the container's
+// filesystem.
+// 4. The Kubelet process must have CAP_SYS_ADMIN (required by nsenter); at
+// the present, this effectively means that the kubelet is running in a
+// privileged container.
+// 5. The volume path used by the Kubelet must be the same inside and outside
+// the container and be writable by the container (to initialize volume)
+// contents. TODO: remove this requirement.
+// 6. The host image must have mount, findmnt, and umount binaries in /bin,
+// /usr/sbin, or /usr/bin
+//
+// For more information about mount propagation modes, see:
+// https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt
+type NsenterMounter struct {
+ // a map of commands to their paths on the host filesystem
+ paths map[string]string
+}
+
+func NewNsenterMounter() *NsenterMounter {
+ m := &NsenterMounter{
+ paths: map[string]string{
+ "mount": "",
+ "findmnt": "",
+ "umount": "",
+ },
+ }
+ // search for the mount command in other locations besides /usr/bin
+ for binary := range m.paths {
+ // default to root
+ m.paths[binary] = filepath.Join("/", binary)
+ for _, path := range []string{"/bin", "/usr/sbin", "/usr/bin"} {
+ binPath := filepath.Join(path, binary)
+ if _, err := os.Stat(filepath.Join(hostRootFsPath, binPath)); err != nil {
+ continue
+ }
+ m.paths[binary] = binPath
+ break
+ }
+ // TODO: error, so that the kubelet can stop if the mounts don't exist
+ }
+ return m
+}
+
+// NsenterMounter implements mount.Interface
+var _ = Interface(&NsenterMounter{})
+
+const (
+ hostRootFsPath = "/rootfs"
+ hostProcMountsPath = "/rootfs/proc/1/mounts"
+ nsenterPath = "nsenter"
+)
+
+// Mount runs mount(8) in the host's root mount namespace. Aside from this
+// aspect, Mount has the same semantics as the mounter returned by mount.New()
+func (n *NsenterMounter) Mount(source string, target string, fstype string, options []string) error {
+ bind, bindRemountOpts := isBind(options)
+
+ if bind {
+ err := n.doNsenterMount(source, target, fstype, []string{"bind"})
+ if err != nil {
+ return err
+ }
+ return n.doNsenterMount(source, target, fstype, bindRemountOpts)
+ }
+
+ return n.doNsenterMount(source, target, fstype, options)
+}
+
+// doNsenterMount nsenters the host's mount namespace and performs the
+// requested mount.
+func (n *NsenterMounter) doNsenterMount(source, target, fstype string, options []string) error {
+ glog.V(5).Infof("nsenter Mounting %s %s %s %v", source, target, fstype, options)
+ args := n.makeNsenterArgs(source, target, fstype, options)
+
+ glog.V(5).Infof("Mount command: %v %v", nsenterPath, args)
+ exec := exec.New()
+ outputBytes, err := exec.Command(nsenterPath, args...).CombinedOutput()
+ if len(outputBytes) != 0 {
+ glog.V(5).Infof("Output of mounting %s to %s: %v", source, target, string(outputBytes))
+ }
+
+ return err
+}
+
+// makeNsenterArgs makes a list of argument to nsenter in order to do the
+// requested mount.
+func (n *NsenterMounter) makeNsenterArgs(source, target, fstype string, options []string) []string {
+ nsenterArgs := []string{
+ "--mount=/rootfs/proc/1/ns/mnt",
+ "--",
+ n.absHostPath("mount"),
+ }
+
+ args := makeMountArgs(source, target, fstype, options)
+
+ return append(nsenterArgs, args...)
+}
+
+// Unmount runs umount(8) in the host's mount namespace.
+func (n *NsenterMounter) Unmount(target string) error {
+ args := []string{
+ "--mount=/rootfs/proc/1/ns/mnt",
+ "--",
+ n.absHostPath("umount"),
+ target,
+ }
+
+ glog.V(5).Infof("Unmount command: %v %v", nsenterPath, args)
+ exec := exec.New()
+ outputBytes, err := exec.Command(nsenterPath, args...).CombinedOutput()
+ if len(outputBytes) != 0 {
+ glog.V(5).Infof("Output of unmounting %s: %v", target, string(outputBytes))
+ }
+
+ return err
+}
+
+// List returns a list of all mounted filesystems in the host's mount namespace.
+func (*NsenterMounter) List() ([]MountPoint, error) {
+ return listProcMounts(hostProcMountsPath)
+}
+
+func (m *NsenterMounter) IsNotMountPoint(dir string) (bool, error) {
+ return IsNotMountPoint(m, dir)
+}
+
+func (*NsenterMounter) IsMountPointMatch(mp MountPoint, dir string) bool {
+ deletedDir := fmt.Sprintf("%s\\040(deleted)", dir)
+ return ((mp.Path == dir) || (mp.Path == deletedDir))
+}
+
+// IsLikelyNotMountPoint determines whether a path is a mountpoint by calling findmnt
+// in the host's root mount namespace.
+func (n *NsenterMounter) IsLikelyNotMountPoint(file string) (bool, error) {
+ file, err := filepath.Abs(file)
+ if err != nil {
+ return true, err
+ }
+
+ // Check the directory exists
+ if _, err = os.Stat(file); os.IsNotExist(err) {
+ glog.V(5).Infof("findmnt: directory %s does not exist", file)
+ return true, err
+ }
+ // Add --first-only option: since we are testing for the absence of a mountpoint, it is sufficient to get only
+ // the first of multiple possible mountpoints using --first-only.
+ // Also add fstype output to make sure that the output of target file will give the full path
+ // TODO: Need more refactoring for this function. Track the solution with issue #26996
+ args := []string{"--mount=/rootfs/proc/1/ns/mnt", "--", n.absHostPath("findmnt"), "-o", "target,fstype", "--noheadings", "--first-only", "--target", file}
+ glog.V(5).Infof("findmnt command: %v %v", nsenterPath, args)
+
+ exec := exec.New()
+ out, err := exec.Command(nsenterPath, args...).CombinedOutput()
+ if err != nil {
+ glog.V(2).Infof("Failed findmnt command for path %s: %v", file, err)
+ // Different operating systems behave differently for paths which are not mount points.
+ // On older versions (e.g. 2.20.1) we'd get error, on newer ones (e.g. 2.26.2) we'd get "/".
+ // It's safer to assume that it's not a mount point.
+ return true, nil
+ }
+ mountTarget := strings.Split(string(out), " ")[0]
+ mountTarget = strings.TrimSuffix(mountTarget, "\n")
+ glog.V(5).Infof("IsLikelyNotMountPoint findmnt output for path %s: %v:", file, mountTarget)
+
+ if mountTarget == file {
+ glog.V(5).Infof("IsLikelyNotMountPoint: %s is a mount point", file)
+ return false, nil
+ }
+ glog.V(5).Infof("IsLikelyNotMountPoint: %s is not a mount point", file)
+ return true, nil
+}
+
+// DeviceOpened checks if block device in use by calling Open with O_EXCL flag.
+// Returns true if open returns errno EBUSY, and false if errno is nil.
+// Returns an error if errno is any error other than EBUSY.
+// Returns with error if pathname is not a device.
+func (n *NsenterMounter) DeviceOpened(pathname string) (bool, error) {
+ return exclusiveOpenFailsOnDevice(pathname)
+}
+
+// PathIsDevice uses FileInfo returned from os.Stat to check if path refers
+// to a device.
+func (n *NsenterMounter) PathIsDevice(pathname string) (bool, error) {
+ return pathIsDevice(pathname)
+}
+
+//GetDeviceNameFromMount given a mount point, find the volume id from checking /proc/mounts
+func (n *NsenterMounter) GetDeviceNameFromMount(mountPath, pluginDir string) (string, error) {
+ return getDeviceNameFromMount(n, mountPath, pluginDir)
+}
+
+func (n *NsenterMounter) absHostPath(command string) string {
+ path, ok := n.paths[command]
+ if !ok {
+ return command
+ }
+ return path
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/mount/nsenter_mount_unsupported.go b/vendor/k8s.io/kubernetes/pkg/util/mount/nsenter_mount_unsupported.go
new file mode 100644
index 000000000..e955e1b78
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/mount/nsenter_mount_unsupported.go
@@ -0,0 +1,63 @@
+// +build !linux
+
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package mount
+
+type NsenterMounter struct{}
+
+func NewNsenterMounter() *NsenterMounter {
+ return &NsenterMounter{}
+}
+
+var _ = Interface(&NsenterMounter{})
+
+func (*NsenterMounter) Mount(source string, target string, fstype string, options []string) error {
+ return nil
+}
+
+func (*NsenterMounter) Unmount(target string) error {
+ return nil
+}
+
+func (*NsenterMounter) List() ([]MountPoint, error) {
+ return []MountPoint{}, nil
+}
+
+func (m *NsenterMounter) IsNotMountPoint(dir string) (bool, error) {
+ return IsNotMountPoint(m, dir)
+}
+
+func (*NsenterMounter) IsMountPointMatch(mp MountPoint, dir string) bool {
+ return (mp.Path == dir)
+}
+
+func (*NsenterMounter) IsLikelyNotMountPoint(file string) (bool, error) {
+ return true, nil
+}
+
+func (*NsenterMounter) DeviceOpened(pathname string) (bool, error) {
+ return false, nil
+}
+
+func (*NsenterMounter) PathIsDevice(pathname string) (bool, error) {
+ return true, nil
+}
+
+func (*NsenterMounter) GetDeviceNameFromMount(mountPath, pluginDir string) (string, error) {
+ return "", nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/net/sets/doc.go b/vendor/k8s.io/kubernetes/pkg/util/net/sets/doc.go
new file mode 100644
index 000000000..8414f74ac
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/net/sets/doc.go
@@ -0,0 +1,28 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// This package contains hand-coded set implementations that should be similar
+// to the autogenerated ones in pkg/util/sets.
+// We can't simply use net.IPNet as a map-key in Go (because it contains a
+// []byte).
+// We could use the same workaround we use here (a string representation as the
+// key) to autogenerate sets. If we do that, or decide on an alternate
+// approach, we should replace the implementations in this package with the
+// autogenerated versions.
+// It is expected that callers will alias this import as "netsets" i.e. import
+// netsets "k8s.io/kubernetes/pkg/util/net/sets"
+
+package sets
diff --git a/vendor/k8s.io/kubernetes/pkg/util/net/sets/ipnet.go b/vendor/k8s.io/kubernetes/pkg/util/net/sets/ipnet.go
new file mode 100644
index 000000000..5b6fe933f
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/net/sets/ipnet.go
@@ -0,0 +1,119 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package sets
+
+import (
+ "net"
+ "strings"
+)
+
+type IPNet map[string]*net.IPNet
+
+func ParseIPNets(specs ...string) (IPNet, error) {
+ ipnetset := make(IPNet)
+ for _, spec := range specs {
+ spec = strings.TrimSpace(spec)
+ _, ipnet, err := net.ParseCIDR(spec)
+ if err != nil {
+ return nil, err
+ }
+ k := ipnet.String() // In case of normalization
+ ipnetset[k] = ipnet
+ }
+ return ipnetset, nil
+}
+
+// Insert adds items to the set.
+func (s IPNet) Insert(items ...*net.IPNet) {
+ for _, item := range items {
+ s[item.String()] = item
+ }
+}
+
+// Delete removes all items from the set.
+func (s IPNet) Delete(items ...*net.IPNet) {
+ for _, item := range items {
+ delete(s, item.String())
+ }
+}
+
+// Has returns true if and only if item is contained in the set.
+func (s IPNet) Has(item *net.IPNet) bool {
+ _, contained := s[item.String()]
+ return contained
+}
+
+// HasAll returns true if and only if all items are contained in the set.
+func (s IPNet) HasAll(items ...*net.IPNet) bool {
+ for _, item := range items {
+ if !s.Has(item) {
+ return false
+ }
+ }
+ return true
+}
+
+// Difference returns a set of objects that are not in s2
+// For example:
+// s1 = {a1, a2, a3}
+// s2 = {a1, a2, a4, a5}
+// s1.Difference(s2) = {a3}
+// s2.Difference(s1) = {a4, a5}
+func (s IPNet) Difference(s2 IPNet) IPNet {
+ result := make(IPNet)
+ for k, i := range s {
+ _, found := s2[k]
+ if found {
+ continue
+ }
+ result[k] = i
+ }
+ return result
+}
+
+// StringSlice returns a []string with the String representation of each element in the set.
+// Order is undefined.
+func (s IPNet) StringSlice() []string {
+ a := make([]string, 0, len(s))
+ for k := range s {
+ a = append(a, k)
+ }
+ return a
+}
+
+// IsSuperset returns true if and only if s1 is a superset of s2.
+func (s1 IPNet) IsSuperset(s2 IPNet) bool {
+ for k := range s2 {
+ _, found := s1[k]
+ if !found {
+ return false
+ }
+ }
+ return true
+}
+
+// Equal returns true if and only if s1 is equal (as a set) to s2.
+// Two sets are equal if their membership is identical.
+// (In practice, this means same elements, order doesn't matter)
+func (s1 IPNet) Equal(s2 IPNet) bool {
+ return len(s1) == len(s2) && s1.IsSuperset(s2)
+}
+
+// Len returns the size of the set.
+func (s IPNet) Len() int {
+ return len(s)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/parsers/parsers.go b/vendor/k8s.io/kubernetes/pkg/util/parsers/parsers.go
new file mode 100644
index 000000000..4e70cc682
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/parsers/parsers.go
@@ -0,0 +1,54 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package parsers
+
+import (
+ "fmt"
+
+ dockerref "github.com/docker/distribution/reference"
+)
+
+const (
+ DefaultImageTag = "latest"
+)
+
+// ParseImageName parses a docker image string into three parts: repo, tag and digest.
+// If both tag and digest are empty, a default image tag will be returned.
+func ParseImageName(image string) (string, string, string, error) {
+ named, err := dockerref.ParseNamed(image)
+ if err != nil {
+ return "", "", "", fmt.Errorf("couldn't parse image name: %v", err)
+ }
+
+ repoToPull := named.Name()
+ var tag, digest string
+
+ tagged, ok := named.(dockerref.Tagged)
+ if ok {
+ tag = tagged.Tag()
+ }
+
+ digested, ok := named.(dockerref.Digested)
+ if ok {
+ digest = digested.Digest().String()
+ }
+ // If no tag was specified, use the default "latest".
+ if len(tag) == 0 && len(digest) == 0 {
+ tag = DefaultImageTag
+ }
+ return repoToPull, tag, digest, nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/sysctl/sysctl.go b/vendor/k8s.io/kubernetes/pkg/util/sysctl/sysctl.go
new file mode 100644
index 000000000..5c01dd88e
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/sysctl/sysctl.go
@@ -0,0 +1,78 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package sysctl
+
+import (
+ "io/ioutil"
+ "path"
+ "strconv"
+ "strings"
+)
+
+const (
+ sysctlBase = "/proc/sys"
+ VmOvercommitMemory = "vm/overcommit_memory"
+ VmPanicOnOOM = "vm/panic_on_oom"
+ KernelPanic = "kernel/panic"
+ KernelPanicOnOops = "kernel/panic_on_oops"
+ RootMaxKeys = "kernel/keys/root_maxkeys"
+ RootMaxBytes = "kernel/keys/root_maxbytes"
+
+ VmOvercommitMemoryAlways = 1 // kernel performs no memory over-commit handling
+ VmPanicOnOOMInvokeOOMKiller = 0 // kernel calls the oom_killer function when OOM occurs
+
+ KernelPanicOnOopsAlways = 1 // kernel panics on kernel oops
+ KernelPanicRebootTimeout = 10 // seconds after a panic for the kernel to reboot
+
+ RootMaxKeysSetting = 1000000 // Needed since docker creates a new key per container
+ RootMaxBytesSetting = RootMaxKeysSetting * 25 // allocate 25 bytes per key * number of MaxKeys
+)
+
+// An injectable interface for running sysctl commands.
+type Interface interface {
+ // GetSysctl returns the value for the specified sysctl setting
+ GetSysctl(sysctl string) (int, error)
+ // SetSysctl modifies the specified sysctl flag to the new value
+ SetSysctl(sysctl string, newVal int) error
+}
+
+// New returns a new Interface for accessing sysctl
+func New() Interface {
+ return &procSysctl{}
+}
+
+// procSysctl implements Interface by reading and writing files under /proc/sys
+type procSysctl struct {
+}
+
+// GetSysctl returns the value for the specified sysctl setting
+func (_ *procSysctl) GetSysctl(sysctl string) (int, error) {
+ data, err := ioutil.ReadFile(path.Join(sysctlBase, sysctl))
+ if err != nil {
+ return -1, err
+ }
+ val, err := strconv.Atoi(strings.Trim(string(data), " \n"))
+ if err != nil {
+ return -1, err
+ }
+ return val, nil
+}
+
+// SetSysctl modifies the specified sysctl flag to the new value
+func (_ *procSysctl) SetSysctl(sysctl string, newVal int) error {
+ return ioutil.WriteFile(path.Join(sysctlBase, sysctl), []byte(strconv.Itoa(newVal)), 0640)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/template.go b/vendor/k8s.io/kubernetes/pkg/util/template.go
new file mode 100644
index 000000000..d09d7dc86
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/template.go
@@ -0,0 +1,48 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package util
+
+import (
+ "bytes"
+ "go/doc"
+ "io"
+ "strings"
+ "text/template"
+)
+
+func wrap(indent string, s string) string {
+ var buf bytes.Buffer
+ doc.ToText(&buf, s, indent, indent+" ", 80-len(indent))
+ return buf.String()
+}
+
+// ExecuteTemplate executes templateText with data and output written to w.
+func ExecuteTemplate(w io.Writer, templateText string, data interface{}) error {
+ t := template.New("top")
+ t.Funcs(template.FuncMap{
+ "trim": strings.TrimSpace,
+ "wrap": wrap,
+ })
+ template.Must(t.Parse(templateText))
+ return t.Execute(w, data)
+}
+
+func ExecuteTemplateToString(templateText string, data interface{}) (string, error) {
+ b := bytes.Buffer{}
+ err := ExecuteTemplate(&b, templateText, data)
+ return b.String(), err
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/term/resize.go b/vendor/k8s.io/kubernetes/pkg/util/term/resize.go
new file mode 100644
index 000000000..7ca09a858
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/term/resize.go
@@ -0,0 +1,132 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package term
+
+import (
+ "fmt"
+
+ "github.com/docker/docker/pkg/term"
+ "k8s.io/apimachinery/pkg/util/runtime"
+ "k8s.io/client-go/tools/remotecommand"
+)
+
+// GetSize returns the current size of the user's terminal. If it isn't a terminal,
+// nil is returned.
+func (t TTY) GetSize() *remotecommand.TerminalSize {
+ outFd, isTerminal := term.GetFdInfo(t.Out)
+ if !isTerminal {
+ return nil
+ }
+ return GetSize(outFd)
+}
+
+// GetSize returns the current size of the terminal associated with fd.
+func GetSize(fd uintptr) *remotecommand.TerminalSize {
+ winsize, err := term.GetWinsize(fd)
+ if err != nil {
+ runtime.HandleError(fmt.Errorf("unable to get terminal size: %v", err))
+ return nil
+ }
+
+ return &remotecommand.TerminalSize{Width: winsize.Width, Height: winsize.Height}
+}
+
+// MonitorSize monitors the terminal's size. It returns a TerminalSizeQueue primed with
+// initialSizes, or nil if there's no TTY present.
+func (t *TTY) MonitorSize(initialSizes ...*remotecommand.TerminalSize) remotecommand.TerminalSizeQueue {
+ outFd, isTerminal := term.GetFdInfo(t.Out)
+ if !isTerminal {
+ return nil
+ }
+
+ t.sizeQueue = &sizeQueue{
+ t: *t,
+ // make it buffered so we can send the initial terminal sizes without blocking, prior to starting
+ // the streaming below
+ resizeChan: make(chan remotecommand.TerminalSize, len(initialSizes)),
+ stopResizing: make(chan struct{}),
+ }
+
+ t.sizeQueue.monitorSize(outFd, initialSizes...)
+
+ return t.sizeQueue
+}
+
+// sizeQueue implements remotecommand.TerminalSizeQueue
+type sizeQueue struct {
+ t TTY
+ // resizeChan receives a Size each time the user's terminal is resized.
+ resizeChan chan remotecommand.TerminalSize
+ stopResizing chan struct{}
+}
+
+// make sure sizeQueue implements the resize.TerminalSizeQueue interface
+var _ remotecommand.TerminalSizeQueue = &sizeQueue{}
+
+// monitorSize primes resizeChan with initialSizes and then monitors for resize events. With each
+// new event, it sends the current terminal size to resizeChan.
+func (s *sizeQueue) monitorSize(outFd uintptr, initialSizes ...*remotecommand.TerminalSize) {
+ // send the initial sizes
+ for i := range initialSizes {
+ if initialSizes[i] != nil {
+ s.resizeChan <- *initialSizes[i]
+ }
+ }
+
+ resizeEvents := make(chan remotecommand.TerminalSize, 1)
+
+ monitorResizeEvents(outFd, resizeEvents, s.stopResizing)
+
+ // listen for resize events in the background
+ go func() {
+ defer runtime.HandleCrash()
+
+ for {
+ select {
+ case size, ok := <-resizeEvents:
+ if !ok {
+ return
+ }
+
+ select {
+ // try to send the size to resizeChan, but don't block
+ case s.resizeChan <- size:
+ // send successful
+ default:
+ // unable to send / no-op
+ }
+ case <-s.stopResizing:
+ return
+ }
+ }
+ }()
+}
+
+// Next returns the new terminal size after the terminal has been resized. It returns nil when
+// monitoring has been stopped.
+func (s *sizeQueue) Next() *remotecommand.TerminalSize {
+ size, ok := <-s.resizeChan
+ if !ok {
+ return nil
+ }
+ return &size
+}
+
+// stop stops the background goroutine that is monitoring for terminal resizes.
+func (s *sizeQueue) stop() {
+ close(s.stopResizing)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/term/resizeevents.go b/vendor/k8s.io/kubernetes/pkg/util/term/resizeevents.go
new file mode 100644
index 000000000..75e9690df
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/term/resizeevents.go
@@ -0,0 +1,61 @@
+// +build !windows
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package term
+
+import (
+ "os"
+ "os/signal"
+ "syscall"
+
+ "k8s.io/apimachinery/pkg/util/runtime"
+ "k8s.io/client-go/tools/remotecommand"
+)
+
+// monitorResizeEvents spawns a goroutine that waits for SIGWINCH signals (these indicate the
+// terminal has resized). After receiving a SIGWINCH, this gets the terminal size and tries to send
+// it to the resizeEvents channel. The goroutine stops when the stop channel is closed.
+func monitorResizeEvents(fd uintptr, resizeEvents chan<- remotecommand.TerminalSize, stop chan struct{}) {
+ go func() {
+ defer runtime.HandleCrash()
+
+ winch := make(chan os.Signal, 1)
+ signal.Notify(winch, syscall.SIGWINCH)
+ defer signal.Stop(winch)
+
+ for {
+ select {
+ case <-winch:
+ size := GetSize(fd)
+ if size == nil {
+ return
+ }
+
+ // try to send size
+ select {
+ case resizeEvents <- *size:
+ // success
+ default:
+ // not sent
+ }
+ case <-stop:
+ return
+ }
+ }
+ }()
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/term/resizeevents_windows.go b/vendor/k8s.io/kubernetes/pkg/util/term/resizeevents_windows.go
new file mode 100644
index 000000000..adccf8734
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/term/resizeevents_windows.go
@@ -0,0 +1,62 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package term
+
+import (
+ "time"
+
+ "k8s.io/apimachinery/pkg/util/runtime"
+ "k8s.io/client-go/tools/remotecommand"
+)
+
+// monitorResizeEvents spawns a goroutine that periodically gets the terminal size and tries to send
+// it to the resizeEvents channel if the size has changed. The goroutine stops when the stop channel
+// is closed.
+func monitorResizeEvents(fd uintptr, resizeEvents chan<- remotecommand.TerminalSize, stop chan struct{}) {
+ go func() {
+ defer runtime.HandleCrash()
+
+ size := GetSize(fd)
+ if size == nil {
+ return
+ }
+ lastSize := *size
+
+ for {
+ // see if we need to stop running
+ select {
+ case <-stop:
+ return
+ default:
+ }
+
+ size := GetSize(fd)
+ if size == nil {
+ return
+ }
+
+ if size.Height != lastSize.Height || size.Width != lastSize.Width {
+ lastSize.Height = size.Height
+ lastSize.Width = size.Width
+ resizeEvents <- *size
+ }
+
+ // sleep to avoid hot looping
+ time.Sleep(250 * time.Millisecond)
+ }
+ }()
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/term/setsize.go b/vendor/k8s.io/kubernetes/pkg/util/term/setsize.go
new file mode 100644
index 000000000..8cccd431a
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/term/setsize.go
@@ -0,0 +1,29 @@
+// +build !windows
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package term
+
+import (
+ "github.com/docker/docker/pkg/term"
+ "k8s.io/client-go/tools/remotecommand"
+)
+
+// SetSize sets the terminal size associated with fd.
+func SetSize(fd uintptr, size remotecommand.TerminalSize) error {
+ return term.SetWinsize(fd, &term.Winsize{Height: size.Height, Width: size.Width})
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/term/setsize_unsupported.go b/vendor/k8s.io/kubernetes/pkg/util/term/setsize_unsupported.go
new file mode 100644
index 000000000..82220217a
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/term/setsize_unsupported.go
@@ -0,0 +1,28 @@
+// +build windows
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package term
+
+import (
+ "k8s.io/client-go/tools/remotecommand"
+)
+
+func SetSize(fd uintptr, size remotecommand.TerminalSize) error {
+ // NOP
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/term/term.go b/vendor/k8s.io/kubernetes/pkg/util/term/term.go
new file mode 100644
index 000000000..58baee831
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/term/term.go
@@ -0,0 +1,110 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package term
+
+import (
+ "io"
+ "os"
+
+ "github.com/docker/docker/pkg/term"
+
+ "k8s.io/kubernetes/pkg/util/interrupt"
+)
+
+// SafeFunc is a function to be invoked by TTY.
+type SafeFunc func() error
+
+// TTY helps invoke a function and preserve the state of the terminal, even if the process is
+// terminated during execution. It also provides support for terminal resizing for remote command
+// execution/attachment.
+type TTY struct {
+ // In is a reader representing stdin. It is a required field.
+ In io.Reader
+ // Out is a writer representing stdout. It must be set to support terminal resizing. It is an
+ // optional field.
+ Out io.Writer
+ // Raw is true if the terminal should be set raw.
+ Raw bool
+ // TryDev indicates the TTY should try to open /dev/tty if the provided input
+ // is not a file descriptor.
+ TryDev bool
+ // Parent is an optional interrupt handler provided to this function - if provided
+ // it will be invoked after the terminal state is restored. If it is not provided,
+ // a signal received during the TTY will result in os.Exit(0) being invoked.
+ Parent *interrupt.Handler
+
+ // sizeQueue is set after a call to MonitorSize() and is used to monitor SIGWINCH signals when the
+ // user's terminal resizes.
+ sizeQueue *sizeQueue
+}
+
+// IsTerminalIn returns true if t.In is a terminal. Does not check /dev/tty
+// even if TryDev is set.
+func (t TTY) IsTerminalIn() bool {
+ return IsTerminal(t.In)
+}
+
+// IsTerminalOut returns true if t.Out is a terminal. Does not check /dev/tty
+// even if TryDev is set.
+func (t TTY) IsTerminalOut() bool {
+ return IsTerminal(t.Out)
+}
+
+// IsTerminal returns whether the passed object is a terminal or not
+func IsTerminal(i interface{}) bool {
+ _, terminal := term.GetFdInfo(i)
+ return terminal
+}
+
+// Safe invokes the provided function and will attempt to ensure that when the
+// function returns (or a termination signal is sent) that the terminal state
+// is reset to the condition it was in prior to the function being invoked. If
+// t.Raw is true the terminal will be put into raw mode prior to calling the function.
+// If the input file descriptor is not a TTY and TryDev is true, the /dev/tty file
+// will be opened (if available).
+func (t TTY) Safe(fn SafeFunc) error {
+ inFd, isTerminal := term.GetFdInfo(t.In)
+
+ if !isTerminal && t.TryDev {
+ if f, err := os.Open("/dev/tty"); err == nil {
+ defer f.Close()
+ inFd = f.Fd()
+ isTerminal = term.IsTerminal(inFd)
+ }
+ }
+ if !isTerminal {
+ return fn()
+ }
+
+ var state *term.State
+ var err error
+ if t.Raw {
+ state, err = term.MakeRaw(inFd)
+ } else {
+ state, err = term.SaveState(inFd)
+ }
+ if err != nil {
+ return err
+ }
+ return interrupt.Chain(t.Parent, func() {
+ if t.sizeQueue != nil {
+ t.sizeQueue.stop()
+ }
+
+ term.RestoreTerminal(inFd, state)
+ }).Run(fn)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/term/term_writer.go b/vendor/k8s.io/kubernetes/pkg/util/term/term_writer.go
new file mode 100644
index 000000000..2d72d1e45
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/term/term_writer.go
@@ -0,0 +1,124 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package term
+
+import (
+ "io"
+ "os"
+
+ "github.com/docker/docker/pkg/term"
+ wordwrap "github.com/mitchellh/go-wordwrap"
+)
+
+type wordWrapWriter struct {
+ limit uint
+ writer io.Writer
+}
+
+// NewResponsiveWriter creates a Writer that detects the column width of the
+// terminal we are in, and adjusts every line width to fit and use recommended
+// terminal sizes for better readability. Does proper word wrapping automatically.
+// if terminal width >= 120 columns use 120 columns
+// if terminal width >= 100 columns use 100 columns
+// if terminal width >= 80 columns use 80 columns
+// In case we're not in a terminal or if it's smaller than 80 columns width,
+// doesn't do any wrapping.
+func NewResponsiveWriter(w io.Writer) io.Writer {
+ file, ok := w.(*os.File)
+ if !ok {
+ return w
+ }
+ fd := file.Fd()
+ if !term.IsTerminal(fd) {
+ return w
+ }
+
+ terminalSize := GetSize(fd)
+ if terminalSize == nil {
+ return w
+ }
+
+ var limit uint
+ switch {
+ case terminalSize.Width >= 120:
+ limit = 120
+ case terminalSize.Width >= 100:
+ limit = 100
+ case terminalSize.Width >= 80:
+ limit = 80
+ }
+
+ return NewWordWrapWriter(w, limit)
+}
+
+// NewWordWrapWriter is a Writer that supports a limit of characters on every line
+// and does auto word wrapping that respects that limit.
+func NewWordWrapWriter(w io.Writer, limit uint) io.Writer {
+ return &wordWrapWriter{
+ limit: limit,
+ writer: w,
+ }
+}
+
+func (w wordWrapWriter) Write(p []byte) (nn int, err error) {
+ if w.limit == 0 {
+ return w.writer.Write(p)
+ }
+ original := string(p)
+ wrapped := wordwrap.WrapString(original, w.limit)
+ return w.writer.Write([]byte(wrapped))
+}
+
+// NewPunchCardWriter is a NewWordWrapWriter that limits the line width to 80 columns.
+func NewPunchCardWriter(w io.Writer) io.Writer {
+ return NewWordWrapWriter(w, 80)
+}
+
+type maxWidthWriter struct {
+ maxWidth uint
+ currentWidth uint
+ written uint
+ writer io.Writer
+}
+
+// NewMaxWidthWriter is a Writer that supports a limit of characters on every
+// line, but doesn't do any word wrapping automatically.
+func NewMaxWidthWriter(w io.Writer, maxWidth uint) io.Writer {
+ return &maxWidthWriter{
+ maxWidth: maxWidth,
+ writer: w,
+ }
+}
+
+func (m maxWidthWriter) Write(p []byte) (nn int, err error) {
+ for _, b := range p {
+ if m.currentWidth == m.maxWidth {
+ m.writer.Write([]byte{'\n'})
+ m.currentWidth = 0
+ }
+ if b == '\n' {
+ m.currentWidth = 0
+ }
+ _, err := m.writer.Write([]byte{b})
+ if err != nil {
+ return int(m.written), err
+ }
+ m.written++
+ m.currentWidth++
+ }
+ return len(p), nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/umask.go b/vendor/k8s.io/kubernetes/pkg/util/umask.go
new file mode 100644
index 000000000..35ccce50b
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/umask.go
@@ -0,0 +1,27 @@
+// +build !windows
+
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package util
+
+import (
+ "syscall"
+)
+
+func Umask(mask int) (old int, err error) {
+ return syscall.Umask(mask), nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/umask_windows.go b/vendor/k8s.io/kubernetes/pkg/util/umask_windows.go
new file mode 100644
index 000000000..7a1ba1538
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/umask_windows.go
@@ -0,0 +1,27 @@
+// +build windows
+
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package util
+
+import (
+ "errors"
+)
+
+func Umask(mask int) (int, error) {
+ return 0, errors.New("platform and architecture is not supported")
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/util.go b/vendor/k8s.io/kubernetes/pkg/util/util.go
new file mode 100644
index 000000000..389e145e8
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/util.go
@@ -0,0 +1,140 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package util
+
+import (
+ "fmt"
+ "os"
+ "reflect"
+ "regexp"
+)
+
+// Takes a list of strings and compiles them into a list of regular expressions
+func CompileRegexps(regexpStrings []string) ([]*regexp.Regexp, error) {
+ regexps := []*regexp.Regexp{}
+ for _, regexpStr := range regexpStrings {
+ r, err := regexp.Compile(regexpStr)
+ if err != nil {
+ return []*regexp.Regexp{}, err
+ }
+ regexps = append(regexps, r)
+ }
+ return regexps, nil
+}
+
+// Detects if using systemd as the init system
+// Please note that simply reading /proc/1/cmdline can be misleading because
+// some installation of various init programs can automatically make /sbin/init
+// a symlink or even a renamed version of their main program.
+// TODO(dchen1107): realiably detects the init system using on the system:
+// systemd, upstart, initd, etc.
+func UsingSystemdInitSystem() bool {
+ if _, err := os.Stat("/run/systemd/system"); err == nil {
+ return true
+ }
+
+ return false
+}
+
+// Tests whether all pointer fields in a struct are nil. This is useful when,
+// for example, an API struct is handled by plugins which need to distinguish
+// "no plugin accepted this spec" from "this spec is empty".
+//
+// This function is only valid for structs and pointers to structs. Any other
+// type will cause a panic. Passing a typed nil pointer will return true.
+func AllPtrFieldsNil(obj interface{}) bool {
+ v := reflect.ValueOf(obj)
+ if !v.IsValid() {
+ panic(fmt.Sprintf("reflect.ValueOf() produced a non-valid Value for %#v", obj))
+ }
+ if v.Kind() == reflect.Ptr {
+ if v.IsNil() {
+ return true
+ }
+ v = v.Elem()
+ }
+ for i := 0; i < v.NumField(); i++ {
+ if v.Field(i).Kind() == reflect.Ptr && !v.Field(i).IsNil() {
+ return false
+ }
+ }
+ return true
+}
+
+func FileExists(filename string) (bool, error) {
+ if _, err := os.Stat(filename); os.IsNotExist(err) {
+ return false, nil
+ } else if err != nil {
+ return false, err
+ }
+ return true, nil
+}
+
+func FileOrSymlinkExists(filename string) (bool, error) {
+ if _, err := os.Lstat(filename); os.IsNotExist(err) {
+ return false, nil
+ } else if err != nil {
+ return false, err
+ }
+ return true, nil
+}
+
+// ReadDirNoStat returns a string of files/directories contained
+// in dirname without calling lstat on them.
+func ReadDirNoStat(dirname string) ([]string, error) {
+ if dirname == "" {
+ dirname = "."
+ }
+
+ f, err := os.Open(dirname)
+ if err != nil {
+ return nil, err
+ }
+ defer f.Close()
+
+ return f.Readdirnames(-1)
+}
+
+// IntPtr returns a pointer to an int
+func IntPtr(i int) *int {
+ o := i
+ return &o
+}
+
+// Int32Ptr returns a pointer to an int32
+func Int32Ptr(i int32) *int32 {
+ o := i
+ return &o
+}
+
+// IntPtrDerefOr dereference the int ptr and returns it i not nil,
+// else returns def.
+func IntPtrDerefOr(ptr *int, def int) int {
+ if ptr != nil {
+ return *ptr
+ }
+ return def
+}
+
+// Int32PtrDerefOr dereference the int32 ptr and returns it i not nil,
+// else returns def.
+func Int32PtrDerefOr(ptr *int32, def int32) int32 {
+ if ptr != nil {
+ return *ptr
+ }
+ return def
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/util/version/doc.go b/vendor/k8s.io/kubernetes/pkg/util/version/doc.go
new file mode 100644
index 000000000..ebe43152e
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/version/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package version provides utilities for version number comparisons
+package version // import "k8s.io/kubernetes/pkg/util/version"
diff --git a/vendor/k8s.io/kubernetes/pkg/util/version/version.go b/vendor/k8s.io/kubernetes/pkg/util/version/version.go
new file mode 100644
index 000000000..327f2e67f
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/util/version/version.go
@@ -0,0 +1,236 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package version
+
+import (
+ "bytes"
+ "fmt"
+ "regexp"
+ "strconv"
+ "strings"
+)
+
+// Version is an opqaue representation of a version number
+type Version struct {
+ components []uint
+ semver bool
+ preRelease string
+ buildMetadata string
+}
+
+var (
+ // versionMatchRE splits a version string into numeric and "extra" parts
+ versionMatchRE = regexp.MustCompile(`^\s*v?([0-9]+(?:\.[0-9]+)*)(.*)*$`)
+ // extraMatchRE splits the "extra" part of versionMatchRE into semver pre-release and build metadata; it does not validate the "no leading zeroes" constraint for pre-release
+ extraMatchRE = regexp.MustCompile(`^(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?\s*$`)
+)
+
+func parse(str string, semver bool) (*Version, error) {
+ parts := versionMatchRE.FindStringSubmatch(str)
+ if parts == nil {
+ return nil, fmt.Errorf("could not parse %q as version", str)
+ }
+ numbers, extra := parts[1], parts[2]
+
+ components := strings.Split(numbers, ".")
+ if (semver && len(components) != 3) || (!semver && len(components) < 2) {
+ return nil, fmt.Errorf("illegal version string %q", str)
+ }
+
+ v := &Version{
+ components: make([]uint, len(components)),
+ semver: semver,
+ }
+ for i, comp := range components {
+ if (i == 0 || semver) && strings.HasPrefix(comp, "0") && comp != "0" {
+ return nil, fmt.Errorf("illegal zero-prefixed version component %q in %q", comp, str)
+ }
+ num, err := strconv.ParseUint(comp, 10, 0)
+ if err != nil {
+ return nil, fmt.Errorf("illegal non-numeric version component %q in %q: %v", comp, str, err)
+ }
+ v.components[i] = uint(num)
+ }
+
+ if semver && extra != "" {
+ extraParts := extraMatchRE.FindStringSubmatch(extra)
+ if extraParts == nil {
+ return nil, fmt.Errorf("could not parse pre-release/metadata (%s) in version %q", extra, str)
+ }
+ v.preRelease, v.buildMetadata = extraParts[1], extraParts[2]
+
+ for _, comp := range strings.Split(v.preRelease, ".") {
+ if _, err := strconv.ParseUint(comp, 10, 0); err == nil {
+ if strings.HasPrefix(comp, "0") && comp != "0" {
+ return nil, fmt.Errorf("illegal zero-prefixed version component %q in %q", comp, str)
+ }
+ }
+ }
+ }
+
+ return v, nil
+}
+
+// ParseGeneric parses a "generic" version string. The version string must consist of two
+// or more dot-separated numeric fields (the first of which can't have leading zeroes),
+// followed by arbitrary uninterpreted data (which need not be separated from the final
+// numeric field by punctuation). For convenience, leading and trailing whitespace is
+// ignored, and the version can be preceded by the letter "v". See also ParseSemantic.
+func ParseGeneric(str string) (*Version, error) {
+ return parse(str, false)
+}
+
+// MustParseGeneric is like ParseGeneric except that it panics on error
+func MustParseGeneric(str string) *Version {
+ v, err := ParseGeneric(str)
+ if err != nil {
+ panic(err)
+ }
+ return v
+}
+
+// ParseSemantic parses a version string that exactly obeys the syntax and semantics of
+// the "Semantic Versioning" specification (http://semver.org/) (although it ignores
+// leading and trailing whitespace, and allows the version to be preceded by "v"). For
+// version strings that are not guaranteed to obey the Semantic Versioning syntax, use
+// ParseGeneric.
+func ParseSemantic(str string) (*Version, error) {
+ return parse(str, true)
+}
+
+// MustParseSemantic is like ParseSemantic except that it panics on error
+func MustParseSemantic(str string) *Version {
+ v, err := ParseSemantic(str)
+ if err != nil {
+ panic(err)
+ }
+ return v
+}
+
+// BuildMetadata returns the build metadata, if v is a Semantic Version, or ""
+func (v *Version) BuildMetadata() string {
+ return v.buildMetadata
+}
+
+// String converts a Version back to a string; note that for versions parsed with
+// ParseGeneric, this will not include the trailing uninterpreted portion of the version
+// number.
+func (v *Version) String() string {
+ var buffer bytes.Buffer
+
+ for i, comp := range v.components {
+ if i > 0 {
+ buffer.WriteString(".")
+ }
+ buffer.WriteString(fmt.Sprintf("%d", comp))
+ }
+ if v.preRelease != "" {
+ buffer.WriteString("-")
+ buffer.WriteString(v.preRelease)
+ }
+ if v.buildMetadata != "" {
+ buffer.WriteString("+")
+ buffer.WriteString(v.buildMetadata)
+ }
+
+ return buffer.String()
+}
+
+// compareInternal returns -1 if v is less than other, 1 if it is greater than other, or 0
+// if they are equal
+func (v *Version) compareInternal(other *Version) int {
+ for i := range v.components {
+ switch {
+ case i >= len(other.components):
+ if v.components[i] != 0 {
+ return 1
+ }
+ case other.components[i] < v.components[i]:
+ return 1
+ case other.components[i] > v.components[i]:
+ return -1
+ }
+ }
+
+ if !v.semver || !other.semver {
+ return 0
+ }
+
+ switch {
+ case v.preRelease == "" && other.preRelease != "":
+ return 1
+ case v.preRelease != "" && other.preRelease == "":
+ return -1
+ case v.preRelease == other.preRelease: // includes case where both are ""
+ return 0
+ }
+
+ vPR := strings.Split(v.preRelease, ".")
+ oPR := strings.Split(other.preRelease, ".")
+ for i := range vPR {
+ if i >= len(oPR) {
+ return 1
+ }
+ vNum, err := strconv.ParseUint(vPR[i], 10, 0)
+ if err == nil {
+ oNum, err := strconv.ParseUint(oPR[i], 10, 0)
+ if err == nil {
+ switch {
+ case oNum < vNum:
+ return 1
+ case oNum > vNum:
+ return -1
+ default:
+ continue
+ }
+ }
+ }
+ if oPR[i] < vPR[i] {
+ return 1
+ } else if oPR[i] > vPR[i] {
+ return -1
+ }
+ }
+
+ return 0
+}
+
+// AtLeast tests if a version is at least equal to a given minimum version. If both
+// Versions are Semantic Versions, this will use the Semantic Version comparison
+// algorithm. Otherwise, it will compare only the numeric components, with non-present
+// components being considered "0" (ie, "1.4" is equal to "1.4.0").
+func (v *Version) AtLeast(min *Version) bool {
+ return v.compareInternal(min) != -1
+}
+
+// LessThan tests if a version is less than a given version. (It is exactly the opposite
+// of AtLeast, for situations where asking "is v too old?" makes more sense than asking
+// "is v new enough?".)
+func (v *Version) LessThan(other *Version) bool {
+ return v.compareInternal(other) == -1
+}
+
+// Compare compares v against a version string (which will be parsed as either Semantic
+// or non-Semantic depending on v). On success it returns -1 if v is less than other, 1 if
+// it is greater than other, or 0 if they are equal.
+func (v *Version) Compare(other string) (int, error) {
+ ov, err := parse(other, v.semver)
+ if err != nil {
+ return 0, err
+ }
+ return v.compareInternal(ov), nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/volume/doc.go b/vendor/k8s.io/kubernetes/pkg/volume/doc.go
new file mode 100644
index 000000000..c98a5a153
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/volume/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package volume includes internal representations of external volume types
+// as well as utility methods required to mount/unmount volumes to kubelets.
+package volume // import "k8s.io/kubernetes/pkg/volume"
diff --git a/vendor/k8s.io/kubernetes/pkg/volume/metrics_cached.go b/vendor/k8s.io/kubernetes/pkg/volume/metrics_cached.go
new file mode 100644
index 000000000..ac0dc9b7a
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/volume/metrics_cached.go
@@ -0,0 +1,74 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package volume
+
+import (
+ "sync"
+ "sync/atomic"
+)
+
+var _ MetricsProvider = &cachedMetrics{}
+
+// cachedMetrics represents a MetricsProvider that wraps another provider and
+// caches the result.
+type cachedMetrics struct {
+ wrapped MetricsProvider
+ resultError error
+ resultMetrics *Metrics
+ once cacheOnce
+}
+
+// NewCachedMetrics creates a new cachedMetrics wrapping another
+// MetricsProvider and caching the results.
+func NewCachedMetrics(provider MetricsProvider) MetricsProvider {
+ return &cachedMetrics{wrapped: provider}
+}
+
+// GetMetrics runs the wrapped metrics provider's GetMetrics methd once and
+// caches the result. Will not cache result if there is an error.
+// See MetricsProvider.GetMetrics
+func (md *cachedMetrics) GetMetrics() (*Metrics, error) {
+ md.once.cache(func() error {
+ md.resultMetrics, md.resultError = md.wrapped.GetMetrics()
+ return md.resultError
+ })
+ return md.resultMetrics, md.resultError
+}
+
+// Copied from sync.Once but we don't want to cache the results if there is an
+// error
+type cacheOnce struct {
+ m sync.Mutex
+ done uint32
+}
+
+// Copied from sync.Once but we don't want to cache the results if there is an
+// error
+func (o *cacheOnce) cache(f func() error) {
+ if atomic.LoadUint32(&o.done) == 1 {
+ return
+ }
+ // Slow-path.
+ o.m.Lock()
+ defer o.m.Unlock()
+ if o.done == 0 {
+ err := f()
+ if err == nil {
+ atomic.StoreUint32(&o.done, 1)
+ }
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/volume/metrics_du.go b/vendor/k8s.io/kubernetes/pkg/volume/metrics_du.go
new file mode 100644
index 000000000..19a29cbbc
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/volume/metrics_du.go
@@ -0,0 +1,99 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package volume
+
+import (
+ "k8s.io/apimachinery/pkg/api/resource"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/kubernetes/pkg/volume/util"
+)
+
+var _ MetricsProvider = &metricsDu{}
+
+// metricsDu represents a MetricsProvider that calculates the used and
+// available Volume space by executing the "du" command and gathering
+// filesystem info for the Volume path.
+type metricsDu struct {
+ // the directory path the volume is mounted to.
+ path string
+}
+
+// NewMetricsDu creates a new metricsDu with the Volume path.
+func NewMetricsDu(path string) MetricsProvider {
+ return &metricsDu{path}
+}
+
+// GetMetrics calculates the volume usage and device free space by executing "du"
+// and gathering filesystem info for the Volume path.
+// See MetricsProvider.GetMetrics
+func (md *metricsDu) GetMetrics() (*Metrics, error) {
+ metrics := &Metrics{Time: metav1.Now()}
+ if md.path == "" {
+ return metrics, NewNoPathDefinedError()
+ }
+
+ err := md.runDu(metrics)
+ if err != nil {
+ return metrics, err
+ }
+
+ err = md.runFind(metrics)
+ if err != nil {
+ return metrics, err
+ }
+
+ err = md.getFsInfo(metrics)
+ if err != nil {
+ return metrics, err
+ }
+
+ return metrics, nil
+}
+
+// runDu executes the "du" command and writes the results to metrics.Used
+func (md *metricsDu) runDu(metrics *Metrics) error {
+ used, err := util.Du(md.path)
+ if err != nil {
+ return err
+ }
+ metrics.Used = used
+ return nil
+}
+
+// runFind executes the "find" command and writes the results to metrics.InodesUsed
+func (md *metricsDu) runFind(metrics *Metrics) error {
+ inodesUsed, err := util.Find(md.path)
+ if err != nil {
+ return err
+ }
+ metrics.InodesUsed = resource.NewQuantity(inodesUsed, resource.BinarySI)
+ return nil
+}
+
+// getFsInfo writes metrics.Capacity and metrics.Available from the filesystem
+// info
+func (md *metricsDu) getFsInfo(metrics *Metrics) error {
+ available, capacity, _, inodes, inodesFree, _, err := util.FsInfo(md.path)
+ if err != nil {
+ return NewFsInfoFailedError(err)
+ }
+ metrics.Available = resource.NewQuantity(available, resource.BinarySI)
+ metrics.Capacity = resource.NewQuantity(capacity, resource.BinarySI)
+ metrics.Inodes = resource.NewQuantity(inodes, resource.BinarySI)
+ metrics.InodesFree = resource.NewQuantity(inodesFree, resource.BinarySI)
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/volume/metrics_errors.go b/vendor/k8s.io/kubernetes/pkg/volume/metrics_errors.go
new file mode 100644
index 000000000..50e7c2a21
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/volume/metrics_errors.go
@@ -0,0 +1,77 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package volume
+
+import (
+ "fmt"
+)
+
+const (
+ // ErrCodeNotSupported code for NotSupported Errors.
+ ErrCodeNotSupported int = iota + 1
+ ErrCodeNoPathDefined
+ ErrCodeFsInfoFailed
+)
+
+// NewNotSupportedError creates a new MetricsError with code NotSupported.
+func NewNotSupportedError() *MetricsError {
+ return &MetricsError{
+ Code: ErrCodeNotSupported,
+ Msg: "metrics are not supported for MetricsNil Volumes",
+ }
+}
+
+// NewNoPathDefined creates a new MetricsError with code NoPathDefined.
+func NewNoPathDefinedError() *MetricsError {
+ return &MetricsError{
+ Code: ErrCodeNoPathDefined,
+ Msg: "no path defined for disk usage metrics.",
+ }
+}
+
+// NewFsInfoFailedError creates a new MetricsError with code FsInfoFailed.
+func NewFsInfoFailedError(err error) *MetricsError {
+ return &MetricsError{
+ Code: ErrCodeFsInfoFailed,
+ Msg: fmt.Sprintf("Failed to get FsInfo due to error %v", err),
+ }
+}
+
+// MetricsError to distinguish different Metrics Errors.
+type MetricsError struct {
+ Code int
+ Msg string
+}
+
+func (e *MetricsError) Error() string {
+ return fmt.Sprintf("%s", e.Msg)
+}
+
+// IsNotSupported returns true if and only if err is "key" not found error.
+func IsNotSupported(err error) bool {
+ return isErrCode(err, ErrCodeNotSupported)
+}
+
+func isErrCode(err error, code int) bool {
+ if err == nil {
+ return false
+ }
+ if e, ok := err.(*MetricsError); ok {
+ return e.Code == code
+ }
+ return false
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/volume/metrics_nil.go b/vendor/k8s.io/kubernetes/pkg/volume/metrics_nil.go
new file mode 100644
index 000000000..5438dc3de
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/volume/metrics_nil.go
@@ -0,0 +1,30 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package volume
+
+var _ MetricsProvider = &MetricsNil{}
+
+// MetricsNil represents a MetricsProvider that does not support returning
+// Metrics. It serves as a placeholder for Volumes that do not yet support
+// metrics.
+type MetricsNil struct{}
+
+// GetMetrics returns an empty Metrics and an error.
+// See MetricsProvider.GetMetrics
+func (*MetricsNil) GetMetrics() (*Metrics, error) {
+ return &Metrics{}, NewNotSupportedError()
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/volume/metrics_statfs.go b/vendor/k8s.io/kubernetes/pkg/volume/metrics_statfs.go
new file mode 100644
index 000000000..ede4f6ef8
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/volume/metrics_statfs.go
@@ -0,0 +1,69 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package volume
+
+import (
+ "k8s.io/apimachinery/pkg/api/resource"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/kubernetes/pkg/volume/util"
+)
+
+var _ MetricsProvider = &metricsStatFS{}
+
+// metricsStatFS represents a MetricsProvider that calculates the used and available
+// Volume space by stat'ing and gathering filesystem info for the Volume path.
+type metricsStatFS struct {
+ // the directory path the volume is mounted to.
+ path string
+}
+
+// NewMetricsStatfs creates a new metricsStatFS with the Volume path.
+func NewMetricsStatFS(path string) MetricsProvider {
+ return &metricsStatFS{path}
+}
+
+// See MetricsProvider.GetMetrics
+// GetMetrics calculates the volume usage and device free space by executing "du"
+// and gathering filesystem info for the Volume path.
+func (md *metricsStatFS) GetMetrics() (*Metrics, error) {
+ metrics := &Metrics{Time: metav1.Now()}
+ if md.path == "" {
+ return metrics, NewNoPathDefinedError()
+ }
+
+ err := md.getFsInfo(metrics)
+ if err != nil {
+ return metrics, err
+ }
+
+ return metrics, nil
+}
+
+// getFsInfo writes metrics.Capacity, metrics.Used and metrics.Available from the filesystem info
+func (md *metricsStatFS) getFsInfo(metrics *Metrics) error {
+ available, capacity, usage, inodes, inodesFree, inodesUsed, err := util.FsInfo(md.path)
+ if err != nil {
+ return NewFsInfoFailedError(err)
+ }
+ metrics.Available = resource.NewQuantity(available, resource.BinarySI)
+ metrics.Capacity = resource.NewQuantity(capacity, resource.BinarySI)
+ metrics.Used = resource.NewQuantity(usage, resource.BinarySI)
+ metrics.Inodes = resource.NewQuantity(inodes, resource.BinarySI)
+ metrics.InodesFree = resource.NewQuantity(inodesFree, resource.BinarySI)
+ metrics.InodesUsed = resource.NewQuantity(inodesUsed, resource.BinarySI)
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/volume/plugins.go b/vendor/k8s.io/kubernetes/pkg/volume/plugins.go
new file mode 100644
index 000000000..41721d1ee
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/volume/plugins.go
@@ -0,0 +1,603 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package volume
+
+import (
+ "fmt"
+ "net"
+ "strings"
+ "sync"
+
+ "github.com/golang/glog"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/types"
+ utilerrors "k8s.io/apimachinery/pkg/util/errors"
+ "k8s.io/apimachinery/pkg/util/validation"
+ "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/clientset"
+ "k8s.io/kubernetes/pkg/cloudprovider"
+ "k8s.io/kubernetes/pkg/util/io"
+ "k8s.io/kubernetes/pkg/util/mount"
+)
+
+// VolumeOptions contains option information about a volume.
+type VolumeOptions struct {
+ // The attributes below are required by volume.Provisioner
+ // TODO: refactor all of this out of volumes when an admin can configure
+ // many kinds of provisioners.
+
+ // Reclamation policy for a persistent volume
+ PersistentVolumeReclaimPolicy v1.PersistentVolumeReclaimPolicy
+ // Suggested PV.Name of the PersistentVolume to provision.
+ // This is a generated name guaranteed to be unique in Kubernetes cluster.
+ // If you choose not to use it as volume name, ensure uniqueness by either
+ // combining it with your value or create unique values of your own.
+ PVName string
+ // PVC is reference to the claim that lead to provisioning of a new PV.
+ // Provisioners *must* create a PV that would be matched by this PVC,
+ // i.e. with required capacity, accessMode, labels matching PVC.Selector and
+ // so on.
+ PVC *v1.PersistentVolumeClaim
+ // Unique name of Kubernetes cluster.
+ ClusterName string
+ // Tags to attach to the real volume in the cloud provider - e.g. AWS EBS
+ CloudTags *map[string]string
+ // Volume provisioning parameters from StorageClass
+ Parameters map[string]string
+}
+
+// VolumePlugin is an interface to volume plugins that can be used on a
+// kubernetes node (e.g. by kubelet) to instantiate and manage volumes.
+type VolumePlugin interface {
+ // Init initializes the plugin. This will be called exactly once
+ // before any New* calls are made - implementations of plugins may
+ // depend on this.
+ Init(host VolumeHost) error
+
+ // Name returns the plugin's name. Plugins must use namespaced names
+ // such as "example.com/volume" and contain exactly one '/' character.
+ // The "kubernetes.io" namespace is reserved for plugins which are
+ // bundled with kubernetes.
+ GetPluginName() string
+
+ // GetVolumeName returns the name/ID to uniquely identifying the actual
+ // backing device, directory, path, etc. referenced by the specified volume
+ // spec.
+ // For Attachable volumes, this value must be able to be passed back to
+ // volume Detach methods to identify the device to act on.
+ // If the plugin does not support the given spec, this returns an error.
+ GetVolumeName(spec *Spec) (string, error)
+
+ // CanSupport tests whether the plugin supports a given volume
+ // specification from the API. The spec pointer should be considered
+ // const.
+ CanSupport(spec *Spec) bool
+
+ // RequiresRemount returns true if this plugin requires mount calls to be
+ // reexecuted. Atomically updating volumes, like Downward API, depend on
+ // this to update the contents of the volume.
+ RequiresRemount() bool
+
+ // NewMounter creates a new volume.Mounter from an API specification.
+ // Ownership of the spec pointer in *not* transferred.
+ // - spec: The v1.Volume spec
+ // - pod: The enclosing pod
+ NewMounter(spec *Spec, podRef *v1.Pod, opts VolumeOptions) (Mounter, error)
+
+ // NewUnmounter creates a new volume.Unmounter from recoverable state.
+ // - name: The volume name, as per the v1.Volume spec.
+ // - podUID: The UID of the enclosing pod
+ NewUnmounter(name string, podUID types.UID) (Unmounter, error)
+
+ // ConstructVolumeSpec constructs a volume spec based on the given volume name
+ // and mountPath. The spec may have incomplete information due to limited
+ // information from input. This function is used by volume manager to reconstruct
+ // volume spec by reading the volume directories from disk
+ ConstructVolumeSpec(volumeName, mountPath string) (*Spec, error)
+
+ // SupportsMountOption returns true if volume plugins supports Mount options
+ // Specifying mount options in a volume plugin that doesn't support
+ // user specified mount options will result in error creating persistent volumes
+ SupportsMountOption() bool
+
+ // SupportsBulkVolumeVerification checks if volume plugin type is capable
+ // of enabling bulk polling of all nodes. This can speed up verification of
+ // attached volumes by quite a bit, but underlying pluging must support it.
+ SupportsBulkVolumeVerification() bool
+}
+
+// PersistentVolumePlugin is an extended interface of VolumePlugin and is used
+// by volumes that want to provide long term persistence of data
+type PersistentVolumePlugin interface {
+ VolumePlugin
+ // GetAccessModes describes the ways a given volume can be accessed/mounted.
+ GetAccessModes() []v1.PersistentVolumeAccessMode
+}
+
+// RecyclableVolumePlugin is an extended interface of VolumePlugin and is used
+// by persistent volumes that want to be recycled before being made available
+// again to new claims
+type RecyclableVolumePlugin interface {
+ VolumePlugin
+
+ // Recycle knows how to reclaim this
+ // resource after the volume's release from a PersistentVolumeClaim.
+ // Recycle will use the provided recorder to write any events that might be
+ // interesting to user. It's expected that caller will pass these events to
+ // the PV being recycled.
+ Recycle(pvName string, spec *Spec, eventRecorder RecycleEventRecorder) error
+}
+
+// DeletableVolumePlugin is an extended interface of VolumePlugin and is used
+// by persistent volumes that want to be deleted from the cluster after their
+// release from a PersistentVolumeClaim.
+type DeletableVolumePlugin interface {
+ VolumePlugin
+ // NewDeleter creates a new volume.Deleter which knows how to delete this
+ // resource in accordance with the underlying storage provider after the
+ // volume's release from a claim
+ NewDeleter(spec *Spec) (Deleter, error)
+}
+
+const (
+ // Name of a volume in external cloud that is being provisioned and thus
+ // should be ignored by rest of Kubernetes.
+ ProvisionedVolumeName = "placeholder-for-provisioning"
+)
+
+// ProvisionableVolumePlugin is an extended interface of VolumePlugin and is
+// used to create volumes for the cluster.
+type ProvisionableVolumePlugin interface {
+ VolumePlugin
+ // NewProvisioner creates a new volume.Provisioner which knows how to
+ // create PersistentVolumes in accordance with the plugin's underlying
+ // storage provider
+ NewProvisioner(options VolumeOptions) (Provisioner, error)
+}
+
+// AttachableVolumePlugin is an extended interface of VolumePlugin and is used for volumes that require attachment
+// to a node before mounting.
+type AttachableVolumePlugin interface {
+ VolumePlugin
+ NewAttacher() (Attacher, error)
+ NewDetacher() (Detacher, error)
+ GetDeviceMountRefs(deviceMountPath string) ([]string, error)
+}
+
+// VolumeHost is an interface that plugins can use to access the kubelet.
+type VolumeHost interface {
+ // GetPluginDir returns the absolute path to a directory under which
+ // a given plugin may store data. This directory might not actually
+ // exist on disk yet. For plugin data that is per-pod, see
+ // GetPodPluginDir().
+ GetPluginDir(pluginName string) string
+
+ // GetPodVolumeDir returns the absolute path a directory which
+ // represents the named volume under the named plugin for the given
+ // pod. If the specified pod does not exist, the result of this call
+ // might not exist.
+ GetPodVolumeDir(podUID types.UID, pluginName string, volumeName string) string
+
+ // GetPodPluginDir returns the absolute path to a directory under which
+ // a given plugin may store data for a given pod. If the specified pod
+ // does not exist, the result of this call might not exist. This
+ // directory might not actually exist on disk yet.
+ GetPodPluginDir(podUID types.UID, pluginName string) string
+
+ // GetKubeClient returns a client interface
+ GetKubeClient() clientset.Interface
+
+ // NewWrapperMounter finds an appropriate plugin with which to handle
+ // the provided spec. This is used to implement volume plugins which
+ // "wrap" other plugins. For example, the "secret" volume is
+ // implemented in terms of the "emptyDir" volume.
+ NewWrapperMounter(volName string, spec Spec, pod *v1.Pod, opts VolumeOptions) (Mounter, error)
+
+ // NewWrapperUnmounter finds an appropriate plugin with which to handle
+ // the provided spec. See comments on NewWrapperMounter for more
+ // context.
+ NewWrapperUnmounter(volName string, spec Spec, podUID types.UID) (Unmounter, error)
+
+ // Get cloud provider from kubelet.
+ GetCloudProvider() cloudprovider.Interface
+
+ // Get mounter interface.
+ GetMounter() mount.Interface
+
+ // Get writer interface for writing data to disk.
+ GetWriter() io.Writer
+
+ // Returns the hostname of the host kubelet is running on
+ GetHostName() string
+
+ // Returns host IP or nil in the case of error.
+ GetHostIP() (net.IP, error)
+
+ // Returns node allocatable.
+ GetNodeAllocatable() (v1.ResourceList, error)
+
+ // Returns a function that returns a secret.
+ GetSecretFunc() func(namespace, name string) (*v1.Secret, error)
+
+ // Returns a function that returns a configmap.
+ GetConfigMapFunc() func(namespace, name string) (*v1.ConfigMap, error)
+
+ // Returns the labels on the node
+ GetNodeLabels() (map[string]string, error)
+}
+
+// VolumePluginMgr tracks registered plugins.
+type VolumePluginMgr struct {
+ mutex sync.Mutex
+ plugins map[string]VolumePlugin
+ Host VolumeHost
+}
+
+// Spec is an internal representation of a volume. All API volume types translate to Spec.
+type Spec struct {
+ Volume *v1.Volume
+ PersistentVolume *v1.PersistentVolume
+ ReadOnly bool
+}
+
+// Name returns the name of either Volume or PersistentVolume, one of which must not be nil.
+func (spec *Spec) Name() string {
+ switch {
+ case spec.Volume != nil:
+ return spec.Volume.Name
+ case spec.PersistentVolume != nil:
+ return spec.PersistentVolume.Name
+ default:
+ return ""
+ }
+}
+
+// VolumeConfig is how volume plugins receive configuration. An instance
+// specific to the plugin will be passed to the plugin's
+// ProbeVolumePlugins(config) func. Reasonable defaults will be provided by
+// the binary hosting the plugins while allowing override of those default
+// values. Those config values are then set to an instance of VolumeConfig
+// and passed to the plugin.
+//
+// Values in VolumeConfig are intended to be relevant to several plugins, but
+// not necessarily all plugins. The preference is to leverage strong typing
+// in this struct. All config items must have a descriptive but non-specific
+// name (i.e, RecyclerMinimumTimeout is OK but RecyclerMinimumTimeoutForNFS is
+// !OK). An instance of config will be given directly to the plugin, so
+// config names specific to plugins are unneeded and wrongly expose plugins in
+// this VolumeConfig struct.
+//
+// OtherAttributes is a map of string values intended for one-off
+// configuration of a plugin or config that is only relevant to a single
+// plugin. All values are passed by string and require interpretation by the
+// plugin. Passing config as strings is the least desirable option but can be
+// used for truly one-off configuration. The binary should still use strong
+// typing for this value when binding CLI values before they are passed as
+// strings in OtherAttributes.
+type VolumeConfig struct {
+ // RecyclerPodTemplate is pod template that understands how to scrub clean
+ // a persistent volume after its release. The template is used by plugins
+ // which override specific properties of the pod in accordance with that
+ // plugin. See NewPersistentVolumeRecyclerPodTemplate for the properties
+ // that are expected to be overridden.
+ RecyclerPodTemplate *v1.Pod
+
+ // RecyclerMinimumTimeout is the minimum amount of time in seconds for the
+ // recycler pod's ActiveDeadlineSeconds attribute. Added to the minimum
+ // timeout is the increment per Gi of capacity.
+ RecyclerMinimumTimeout int
+
+ // RecyclerTimeoutIncrement is the number of seconds added to the recycler
+ // pod's ActiveDeadlineSeconds for each Gi of capacity in the persistent
+ // volume. Example: 5Gi volume x 30s increment = 150s + 30s minimum = 180s
+ // ActiveDeadlineSeconds for recycler pod
+ RecyclerTimeoutIncrement int
+
+ // PVName is name of the PersistentVolume instance that is being recycled.
+ // It is used to generate unique recycler pod name.
+ PVName string
+
+ // OtherAttributes stores config as strings. These strings are opaque to
+ // the system and only understood by the binary hosting the plugin and the
+ // plugin itself.
+ OtherAttributes map[string]string
+
+ // ProvisioningEnabled configures whether provisioning of this plugin is
+ // enabled or not. Currently used only in host_path plugin.
+ ProvisioningEnabled bool
+}
+
+// NewSpecFromVolume creates an Spec from an v1.Volume
+func NewSpecFromVolume(vs *v1.Volume) *Spec {
+ return &Spec{
+ Volume: vs,
+ }
+}
+
+// NewSpecFromPersistentVolume creates an Spec from an v1.PersistentVolume
+func NewSpecFromPersistentVolume(pv *v1.PersistentVolume, readOnly bool) *Spec {
+ return &Spec{
+ PersistentVolume: pv,
+ ReadOnly: readOnly,
+ }
+}
+
+// InitPlugins initializes each plugin. All plugins must have unique names.
+// This must be called exactly once before any New* methods are called on any
+// plugins.
+func (pm *VolumePluginMgr) InitPlugins(plugins []VolumePlugin, host VolumeHost) error {
+ pm.mutex.Lock()
+ defer pm.mutex.Unlock()
+
+ pm.Host = host
+ if pm.plugins == nil {
+ pm.plugins = map[string]VolumePlugin{}
+ }
+
+ allErrs := []error{}
+ for _, plugin := range plugins {
+ name := plugin.GetPluginName()
+ if errs := validation.IsQualifiedName(name); len(errs) != 0 {
+ allErrs = append(allErrs, fmt.Errorf("volume plugin has invalid name: %q: %s", name, strings.Join(errs, ";")))
+ continue
+ }
+
+ if _, found := pm.plugins[name]; found {
+ allErrs = append(allErrs, fmt.Errorf("volume plugin %q was registered more than once", name))
+ continue
+ }
+ err := plugin.Init(host)
+ if err != nil {
+ glog.Errorf("Failed to load volume plugin %s, error: %s", plugin, err.Error())
+ allErrs = append(allErrs, err)
+ continue
+ }
+ pm.plugins[name] = plugin
+ glog.V(1).Infof("Loaded volume plugin %q", name)
+ }
+ return utilerrors.NewAggregate(allErrs)
+}
+
+// FindPluginBySpec looks for a plugin that can support a given volume
+// specification. If no plugins can support or more than one plugin can
+// support it, return error.
+func (pm *VolumePluginMgr) FindPluginBySpec(spec *Spec) (VolumePlugin, error) {
+ pm.mutex.Lock()
+ defer pm.mutex.Unlock()
+
+ matches := []string{}
+ for k, v := range pm.plugins {
+ if v.CanSupport(spec) {
+ matches = append(matches, k)
+ }
+ }
+ if len(matches) == 0 {
+ return nil, fmt.Errorf("no volume plugin matched")
+ }
+ if len(matches) > 1 {
+ return nil, fmt.Errorf("multiple volume plugins matched: %s", strings.Join(matches, ","))
+ }
+ return pm.plugins[matches[0]], nil
+}
+
+// FindPluginByName fetches a plugin by name or by legacy name. If no plugin
+// is found, returns error.
+func (pm *VolumePluginMgr) FindPluginByName(name string) (VolumePlugin, error) {
+ pm.mutex.Lock()
+ defer pm.mutex.Unlock()
+
+ // Once we can get rid of legacy names we can reduce this to a map lookup.
+ matches := []string{}
+ for k, v := range pm.plugins {
+ if v.GetPluginName() == name {
+ matches = append(matches, k)
+ }
+ }
+ if len(matches) == 0 {
+ return nil, fmt.Errorf("no volume plugin matched")
+ }
+ if len(matches) > 1 {
+ return nil, fmt.Errorf("multiple volume plugins matched: %s", strings.Join(matches, ","))
+ }
+ return pm.plugins[matches[0]], nil
+}
+
+// FindPersistentPluginBySpec looks for a persistent volume plugin that can
+// support a given volume specification. If no plugin is found, return an
+// error
+func (pm *VolumePluginMgr) FindPersistentPluginBySpec(spec *Spec) (PersistentVolumePlugin, error) {
+ volumePlugin, err := pm.FindPluginBySpec(spec)
+ if err != nil {
+ return nil, fmt.Errorf("Could not find volume plugin for spec: %#v", spec)
+ }
+ if persistentVolumePlugin, ok := volumePlugin.(PersistentVolumePlugin); ok {
+ return persistentVolumePlugin, nil
+ }
+ return nil, fmt.Errorf("no persistent volume plugin matched")
+}
+
+// FindPersistentPluginByName fetches a persistent volume plugin by name. If
+// no plugin is found, returns error.
+func (pm *VolumePluginMgr) FindPersistentPluginByName(name string) (PersistentVolumePlugin, error) {
+ volumePlugin, err := pm.FindPluginByName(name)
+ if err != nil {
+ return nil, err
+ }
+ if persistentVolumePlugin, ok := volumePlugin.(PersistentVolumePlugin); ok {
+ return persistentVolumePlugin, nil
+ }
+ return nil, fmt.Errorf("no persistent volume plugin matched")
+}
+
+// FindRecyclablePluginByName fetches a persistent volume plugin by name. If
+// no plugin is found, returns error.
+func (pm *VolumePluginMgr) FindRecyclablePluginBySpec(spec *Spec) (RecyclableVolumePlugin, error) {
+ volumePlugin, err := pm.FindPluginBySpec(spec)
+ if err != nil {
+ return nil, err
+ }
+ if recyclableVolumePlugin, ok := volumePlugin.(RecyclableVolumePlugin); ok {
+ return recyclableVolumePlugin, nil
+ }
+ return nil, fmt.Errorf("no recyclable volume plugin matched")
+}
+
+// FindProvisionablePluginByName fetches a persistent volume plugin by name. If
+// no plugin is found, returns error.
+func (pm *VolumePluginMgr) FindProvisionablePluginByName(name string) (ProvisionableVolumePlugin, error) {
+ volumePlugin, err := pm.FindPluginByName(name)
+ if err != nil {
+ return nil, err
+ }
+ if provisionableVolumePlugin, ok := volumePlugin.(ProvisionableVolumePlugin); ok {
+ return provisionableVolumePlugin, nil
+ }
+ return nil, fmt.Errorf("no provisionable volume plugin matched")
+}
+
+// FindDeletablePluginBySppec fetches a persistent volume plugin by spec. If
+// no plugin is found, returns error.
+func (pm *VolumePluginMgr) FindDeletablePluginBySpec(spec *Spec) (DeletableVolumePlugin, error) {
+ volumePlugin, err := pm.FindPluginBySpec(spec)
+ if err != nil {
+ return nil, err
+ }
+ if deletableVolumePlugin, ok := volumePlugin.(DeletableVolumePlugin); ok {
+ return deletableVolumePlugin, nil
+ }
+ return nil, fmt.Errorf("no deletable volume plugin matched")
+}
+
+// FindDeletablePluginByName fetches a persistent volume plugin by name. If
+// no plugin is found, returns error.
+func (pm *VolumePluginMgr) FindDeletablePluginByName(name string) (DeletableVolumePlugin, error) {
+ volumePlugin, err := pm.FindPluginByName(name)
+ if err != nil {
+ return nil, err
+ }
+ if deletableVolumePlugin, ok := volumePlugin.(DeletableVolumePlugin); ok {
+ return deletableVolumePlugin, nil
+ }
+ return nil, fmt.Errorf("no deletable volume plugin matched")
+}
+
+// FindCreatablePluginBySpec fetches a persistent volume plugin by name. If
+// no plugin is found, returns error.
+func (pm *VolumePluginMgr) FindCreatablePluginBySpec(spec *Spec) (ProvisionableVolumePlugin, error) {
+ volumePlugin, err := pm.FindPluginBySpec(spec)
+ if err != nil {
+ return nil, err
+ }
+ if provisionableVolumePlugin, ok := volumePlugin.(ProvisionableVolumePlugin); ok {
+ return provisionableVolumePlugin, nil
+ }
+ return nil, fmt.Errorf("no creatable volume plugin matched")
+}
+
+// FindAttachablePluginBySpec fetches a persistent volume plugin by name.
+// Unlike the other "FindPlugin" methods, this does not return error if no
+// plugin is found. All volumes require a mounter and unmounter, but not
+// every volume will have an attacher/detacher.
+func (pm *VolumePluginMgr) FindAttachablePluginBySpec(spec *Spec) (AttachableVolumePlugin, error) {
+ volumePlugin, err := pm.FindPluginBySpec(spec)
+ if err != nil {
+ return nil, err
+ }
+ if attachableVolumePlugin, ok := volumePlugin.(AttachableVolumePlugin); ok {
+ return attachableVolumePlugin, nil
+ }
+ return nil, nil
+}
+
+// FindAttachablePluginByName fetches an attachable volume plugin by name.
+// Unlike the other "FindPlugin" methods, this does not return error if no
+// plugin is found. All volumes require a mounter and unmounter, but not
+// every volume will have an attacher/detacher.
+func (pm *VolumePluginMgr) FindAttachablePluginByName(name string) (AttachableVolumePlugin, error) {
+ volumePlugin, err := pm.FindPluginByName(name)
+ if err != nil {
+ return nil, err
+ }
+ if attachablePlugin, ok := volumePlugin.(AttachableVolumePlugin); ok {
+ return attachablePlugin, nil
+ }
+ return nil, nil
+}
+
+// NewPersistentVolumeRecyclerPodTemplate creates a template for a recycler
+// pod. By default, a recycler pod simply runs "rm -rf" on a volume and tests
+// for emptiness. Most attributes of the template will be correct for most
+// plugin implementations. The following attributes can be overridden per
+// plugin via configuration:
+//
+// 1. pod.Spec.Volumes[0].VolumeSource must be overridden. Recycler
+// implementations without a valid VolumeSource will fail.
+// 2. pod.GenerateName helps distinguish recycler pods by name. Recommended.
+// Default is "pv-recycler-".
+// 3. pod.Spec.ActiveDeadlineSeconds gives the recycler pod a maximum timeout
+// before failing. Recommended. Default is 60 seconds.
+//
+// See HostPath and NFS for working recycler examples
+func NewPersistentVolumeRecyclerPodTemplate() *v1.Pod {
+ timeout := int64(60)
+ pod := &v1.Pod{
+ ObjectMeta: metav1.ObjectMeta{
+ GenerateName: "pv-recycler-",
+ Namespace: metav1.NamespaceDefault,
+ },
+ Spec: v1.PodSpec{
+ ActiveDeadlineSeconds: &timeout,
+ RestartPolicy: v1.RestartPolicyNever,
+ Volumes: []v1.Volume{
+ {
+ Name: "vol",
+ // IMPORTANT! All plugins using this template MUST
+ // override pod.Spec.Volumes[0].VolumeSource Recycler
+ // implementations without a valid VolumeSource will fail.
+ VolumeSource: v1.VolumeSource{},
+ },
+ },
+ Containers: []v1.Container{
+ {
+ Name: "pv-recycler",
+ Image: "gcr.io/google_containers/busybox",
+ Command: []string{"/bin/sh"},
+ Args: []string{"-c", "test -e /scrub && rm -rf /scrub/..?* /scrub/.[!.]* /scrub/* && test -z \"$(ls -A /scrub)\" || exit 1"},
+ VolumeMounts: []v1.VolumeMount{
+ {
+ Name: "vol",
+ MountPath: "/scrub",
+ },
+ },
+ },
+ },
+ },
+ }
+ return pod
+}
+
+// Check validity of recycle pod template
+// List of checks:
+// - at least one volume is defined in the recycle pod template
+// If successful, returns nil
+// if unsuccessful, returns an error.
+func ValidateRecyclerPodTemplate(pod *v1.Pod) error {
+ if len(pod.Spec.Volumes) < 1 {
+ return fmt.Errorf("does not contain any volume(s)")
+ }
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util.go b/vendor/k8s.io/kubernetes/pkg/volume/util.go
new file mode 100644
index 000000000..2e5610362
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/volume/util.go
@@ -0,0 +1,456 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package volume
+
+import (
+ "fmt"
+ "reflect"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/fields"
+ "k8s.io/apimachinery/pkg/watch"
+ "k8s.io/kubernetes/pkg/api/v1"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/clientset"
+
+ "hash/fnv"
+ "math/rand"
+ "strconv"
+ "strings"
+
+ "github.com/golang/glog"
+ "k8s.io/apimachinery/pkg/api/errors"
+ "k8s.io/apimachinery/pkg/api/resource"
+ "k8s.io/apimachinery/pkg/types"
+ "k8s.io/apimachinery/pkg/util/sets"
+ volutil "k8s.io/kubernetes/pkg/volume/util"
+)
+
+type RecycleEventRecorder func(eventtype, message string)
+
+// RecycleVolumeByWatchingPodUntilCompletion is intended for use with volume
+// Recyclers. This function will save the given Pod to the API and watch it
+// until it completes, fails, or the pod's ActiveDeadlineSeconds is exceeded,
+// whichever comes first. An attempt to delete a recycler pod is always
+// attempted before returning.
+//
+// In case there is a pod with the same namespace+name already running, this
+// function assumes it's an older instance of the recycler pod and watches
+// this old pod instead of starting a new one.
+//
+// pod - the pod designed by a volume plugin to recycle the volume. pod.Name
+// will be overwritten with unique name based on PV.Name.
+// client - kube client for API operations.
+func RecycleVolumeByWatchingPodUntilCompletion(pvName string, pod *v1.Pod, kubeClient clientset.Interface, recorder RecycleEventRecorder) error {
+ return internalRecycleVolumeByWatchingPodUntilCompletion(pvName, pod, newRecyclerClient(kubeClient, recorder))
+}
+
+// same as above func comments, except 'recyclerClient' is a narrower pod API
+// interface to ease testing
+func internalRecycleVolumeByWatchingPodUntilCompletion(pvName string, pod *v1.Pod, recyclerClient recyclerClient) error {
+ glog.V(5).Infof("creating recycler pod for volume %s\n", pod.Name)
+
+ // Generate unique name for the recycler pod - we need to get "already
+ // exists" error when a previous controller has already started recycling
+ // the volume. Here we assume that pv.Name is already unique.
+ pod.Name = "recycler-for-" + pvName
+ pod.GenerateName = ""
+
+ stopChannel := make(chan struct{})
+ defer close(stopChannel)
+ podCh, err := recyclerClient.WatchPod(pod.Name, pod.Namespace, stopChannel)
+ if err != nil {
+ glog.V(4).Infof("cannot start watcher for pod %s/%s: %v", pod.Namespace, pod.Name, err)
+ return err
+ }
+
+ // Start the pod
+ _, err = recyclerClient.CreatePod(pod)
+ if err != nil {
+ if errors.IsAlreadyExists(err) {
+ glog.V(5).Infof("old recycler pod %q found for volume", pod.Name)
+ } else {
+ return fmt.Errorf("unexpected error creating recycler pod: %+v\n", err)
+ }
+ }
+ defer func(pod *v1.Pod) {
+ glog.V(2).Infof("deleting recycler pod %s/%s", pod.Namespace, pod.Name)
+ if err := recyclerClient.DeletePod(pod.Name, pod.Namespace); err != nil {
+ glog.Errorf("failed to delete recycler pod %s/%s: %v", pod.Namespace, pod.Name, err)
+ }
+ }(pod)
+
+ // Now only the old pod or the new pod run. Watch it until it finishes
+ // and send all events on the pod to the PV
+ for {
+ event, ok := <-podCh
+ if !ok {
+ return fmt.Errorf("recycler pod %q watch channel had been closed", pod.Name)
+ }
+ switch event.Object.(type) {
+ case *v1.Pod:
+ // POD changed
+ pod := event.Object.(*v1.Pod)
+ glog.V(4).Infof("recycler pod update received: %s %s/%s %s", event.Type, pod.Namespace, pod.Name, pod.Status.Phase)
+ switch event.Type {
+ case watch.Added, watch.Modified:
+ if pod.Status.Phase == v1.PodSucceeded {
+ // Recycle succeeded.
+ return nil
+ }
+ if pod.Status.Phase == v1.PodFailed {
+ if pod.Status.Message != "" {
+ return fmt.Errorf(pod.Status.Message)
+ } else {
+ return fmt.Errorf("pod failed, pod.Status.Message unknown.")
+ }
+ }
+
+ case watch.Deleted:
+ return fmt.Errorf("recycler pod was deleted")
+
+ case watch.Error:
+ return fmt.Errorf("recycler pod watcher failed")
+ }
+
+ case *v1.Event:
+ // Event received
+ podEvent := event.Object.(*v1.Event)
+ glog.V(4).Infof("recycler event received: %s %s/%s %s/%s %s", event.Type, podEvent.Namespace, podEvent.Name, podEvent.InvolvedObject.Namespace, podEvent.InvolvedObject.Name, podEvent.Message)
+ if event.Type == watch.Added {
+ recyclerClient.Event(podEvent.Type, podEvent.Message)
+ }
+ }
+ }
+}
+
+// recyclerClient abstracts access to a Pod by providing a narrower interface.
+// This makes it easier to mock a client for testing.
+type recyclerClient interface {
+ CreatePod(pod *v1.Pod) (*v1.Pod, error)
+ GetPod(name, namespace string) (*v1.Pod, error)
+ DeletePod(name, namespace string) error
+ // WatchPod returns a ListWatch for watching a pod. The stopChannel is used
+ // to close the reflector backing the watch. The caller is responsible for
+ // derring a close on the channel to stop the reflector.
+ WatchPod(name, namespace string, stopChannel chan struct{}) (<-chan watch.Event, error)
+ // Event sends an event to the volume that is being recycled.
+ Event(eventtype, message string)
+}
+
+func newRecyclerClient(client clientset.Interface, recorder RecycleEventRecorder) recyclerClient {
+ return &realRecyclerClient{
+ client,
+ recorder,
+ }
+}
+
+type realRecyclerClient struct {
+ client clientset.Interface
+ recorder RecycleEventRecorder
+}
+
+func (c *realRecyclerClient) CreatePod(pod *v1.Pod) (*v1.Pod, error) {
+ return c.client.Core().Pods(pod.Namespace).Create(pod)
+}
+
+func (c *realRecyclerClient) GetPod(name, namespace string) (*v1.Pod, error) {
+ return c.client.Core().Pods(namespace).Get(name, metav1.GetOptions{})
+}
+
+func (c *realRecyclerClient) DeletePod(name, namespace string) error {
+ return c.client.Core().Pods(namespace).Delete(name, nil)
+}
+
+func (c *realRecyclerClient) Event(eventtype, message string) {
+ c.recorder(eventtype, message)
+}
+
+func (c *realRecyclerClient) WatchPod(name, namespace string, stopChannel chan struct{}) (<-chan watch.Event, error) {
+ podSelector, _ := fields.ParseSelector("metadata.name=" + name)
+ options := metav1.ListOptions{
+ FieldSelector: podSelector.String(),
+ Watch: true,
+ }
+
+ podWatch, err := c.client.Core().Pods(namespace).Watch(options)
+ if err != nil {
+ return nil, err
+ }
+
+ eventSelector, _ := fields.ParseSelector("involvedObject.name=" + name)
+ eventWatch, err := c.client.Core().Events(namespace).Watch(metav1.ListOptions{
+ FieldSelector: eventSelector.String(),
+ Watch: true,
+ })
+ if err != nil {
+ podWatch.Stop()
+ return nil, err
+ }
+
+ eventCh := make(chan watch.Event, 30)
+
+ go func() {
+ defer eventWatch.Stop()
+ defer podWatch.Stop()
+ defer close(eventCh)
+ var podWatchChannelClosed bool
+ var eventWatchChannelClosed bool
+ for {
+ select {
+ case _ = <-stopChannel:
+ return
+
+ case podEvent, ok := <-podWatch.ResultChan():
+ if !ok {
+ podWatchChannelClosed = true
+ } else {
+ eventCh <- podEvent
+ }
+ case eventEvent, ok := <-eventWatch.ResultChan():
+ if !ok {
+ eventWatchChannelClosed = true
+ } else {
+ eventCh <- eventEvent
+ }
+ }
+ if podWatchChannelClosed && eventWatchChannelClosed {
+ break
+ }
+ }
+ }()
+
+ return eventCh, nil
+}
+
+// CalculateTimeoutForVolume calculates time for a Recycler pod to complete a
+// recycle operation. The calculation and return value is either the
+// minimumTimeout or the timeoutIncrement per Gi of storage size, whichever is
+// greater.
+func CalculateTimeoutForVolume(minimumTimeout, timeoutIncrement int, pv *v1.PersistentVolume) int64 {
+ giQty := resource.MustParse("1Gi")
+ pvQty := pv.Spec.Capacity[v1.ResourceStorage]
+ giSize := giQty.Value()
+ pvSize := pvQty.Value()
+ timeout := (pvSize / giSize) * int64(timeoutIncrement)
+ if timeout < int64(minimumTimeout) {
+ return int64(minimumTimeout)
+ } else {
+ return timeout
+ }
+}
+
+// RoundUpSize calculates how many allocation units are needed to accommodate
+// a volume of given size. E.g. when user wants 1500MiB volume, while AWS EBS
+// allocates volumes in gibibyte-sized chunks,
+// RoundUpSize(1500 * 1024*1024, 1024*1024*1024) returns '2'
+// (2 GiB is the smallest allocatable volume that can hold 1500MiB)
+func RoundUpSize(volumeSizeBytes int64, allocationUnitBytes int64) int64 {
+ return (volumeSizeBytes + allocationUnitBytes - 1) / allocationUnitBytes
+}
+
+// GenerateVolumeName returns a PV name with clusterName prefix. The function
+// should be used to generate a name of GCE PD or Cinder volume. It basically
+// adds "<clusterName>-dynamic-" before the PV name, making sure the resulting
+// string fits given length and cuts "dynamic" if not.
+func GenerateVolumeName(clusterName, pvName string, maxLength int) string {
+ prefix := clusterName + "-dynamic"
+ pvLen := len(pvName)
+
+ // cut the "<clusterName>-dynamic" to fit full pvName into maxLength
+ // +1 for the '-' dash
+ if pvLen+1+len(prefix) > maxLength {
+ prefix = prefix[:maxLength-pvLen-1]
+ }
+ return prefix + "-" + pvName
+}
+
+// Check if the path from the mounter is empty.
+func GetPath(mounter Mounter) (string, error) {
+ path := mounter.GetPath()
+ if path == "" {
+ return "", fmt.Errorf("Path is empty %s", reflect.TypeOf(mounter).String())
+ }
+ return path, nil
+}
+
+// ChooseZone implements our heuristics for choosing a zone for volume creation based on the volume name
+// Volumes are generally round-robin-ed across all active zones, using the hash of the PVC Name.
+// However, if the PVCName ends with `-<integer>`, we will hash the prefix, and then add the integer to the hash.
+// This means that a StatefulSet's volumes (`claimname-statefulsetname-id`) will spread across available zones,
+// assuming the id values are consecutive.
+func ChooseZoneForVolume(zones sets.String, pvcName string) string {
+ // We create the volume in a zone determined by the name
+ // Eventually the scheduler will coordinate placement into an available zone
+ var hash uint32
+ var index uint32
+
+ if pvcName == "" {
+ // We should always be called with a name; this shouldn't happen
+ glog.Warningf("No name defined during volume create; choosing random zone")
+
+ hash = rand.Uint32()
+ } else {
+ hashString := pvcName
+
+ // Heuristic to make sure that volumes in a StatefulSet are spread across zones
+ // StatefulSet PVCs are (currently) named ClaimName-StatefulSetName-Id,
+ // where Id is an integer index.
+ // Note though that if a StatefulSet pod has multiple claims, we need them to be
+ // in the same zone, because otherwise the pod will be unable to mount both volumes,
+ // and will be unschedulable. So we hash _only_ the "StatefulSetName" portion when
+ // it looks like `ClaimName-StatefulSetName-Id`.
+ // We continue to round-robin volume names that look like `Name-Id` also; this is a useful
+ // feature for users that are creating statefulset-like functionality without using statefulsets.
+ lastDash := strings.LastIndexByte(pvcName, '-')
+ if lastDash != -1 {
+ statefulsetIDString := pvcName[lastDash+1:]
+ statefulsetID, err := strconv.ParseUint(statefulsetIDString, 10, 32)
+ if err == nil {
+ // Offset by the statefulsetID, so we round-robin across zones
+ index = uint32(statefulsetID)
+ // We still hash the volume name, but only the prefix
+ hashString = pvcName[:lastDash]
+
+ // In the special case where it looks like `ClaimName-StatefulSetName-Id`,
+ // hash only the StatefulSetName, so that different claims on the same StatefulSet
+ // member end up in the same zone.
+ // Note that StatefulSetName (and ClaimName) might themselves both have dashes.
+ // We actually just take the portion after the final - of ClaimName-StatefulSetName.
+ // For our purposes it doesn't much matter (just suboptimal spreading).
+ lastDash := strings.LastIndexByte(hashString, '-')
+ if lastDash != -1 {
+ hashString = hashString[lastDash+1:]
+ }
+
+ glog.V(2).Infof("Detected StatefulSet-style volume name %q; index=%d", pvcName, index)
+ }
+ }
+
+ // We hash the (base) volume name, so we don't bias towards the first N zones
+ h := fnv.New32()
+ h.Write([]byte(hashString))
+ hash = h.Sum32()
+ }
+
+ // Zones.List returns zones in a consistent order (sorted)
+ // We do have a potential failure case where volumes will not be properly spread,
+ // if the set of zones changes during StatefulSet volume creation. However, this is
+ // probably relatively unlikely because we expect the set of zones to be essentially
+ // static for clusters.
+ // Hopefully we can address this problem if/when we do full scheduler integration of
+ // PVC placement (which could also e.g. avoid putting volumes in overloaded or
+ // unhealthy zones)
+ zoneSlice := zones.List()
+ zone := zoneSlice[(hash+index)%uint32(len(zoneSlice))]
+
+ glog.V(2).Infof("Creating volume for PVC %q; chose zone=%q from zones=%q", pvcName, zone, zoneSlice)
+ return zone
+}
+
+// UnmountViaEmptyDir delegates the tear down operation for secret, configmap, git_repo and downwardapi
+// to empty_dir
+func UnmountViaEmptyDir(dir string, host VolumeHost, volName string, volSpec Spec, podUID types.UID) error {
+ glog.V(3).Infof("Tearing down volume %v for pod %v at %v", volName, podUID, dir)
+
+ if pathExists, pathErr := volutil.PathExists(dir); pathErr != nil {
+ return fmt.Errorf("Error checking if path exists: %v", pathErr)
+ } else if !pathExists {
+ glog.Warningf("Warning: Unmount skipped because path does not exist: %v", dir)
+ return nil
+ }
+
+ // Wrap EmptyDir, let it do the teardown.
+ wrapped, err := host.NewWrapperUnmounter(volName, volSpec, podUID)
+ if err != nil {
+ return err
+ }
+ return wrapped.TearDownAt(dir)
+}
+
+// MountOptionFromSpec extracts and joins mount options from volume spec with supplied options
+func MountOptionFromSpec(spec *Spec, options ...string) []string {
+ pv := spec.PersistentVolume
+
+ if pv != nil {
+ if mo, ok := pv.Annotations[v1.MountOptionAnnotation]; ok {
+ moList := strings.Split(mo, ",")
+ return JoinMountOptions(moList, options)
+ }
+
+ }
+ return options
+}
+
+// JoinMountOptions joins mount options eliminating duplicates
+func JoinMountOptions(userOptions []string, systemOptions []string) []string {
+ allMountOptions := sets.NewString()
+
+ for _, mountOption := range userOptions {
+ if len(mountOption) > 0 {
+ allMountOptions.Insert(mountOption)
+ }
+ }
+
+ for _, mountOption := range systemOptions {
+ allMountOptions.Insert(mountOption)
+ }
+ return allMountOptions.UnsortedList()
+}
+
+// ZonesToSet converts a string containing a comma separated list of zones to set
+func ZonesToSet(zonesString string) (sets.String, error) {
+ zonesSlice := strings.Split(zonesString, ",")
+ zonesSet := make(sets.String)
+ for _, zone := range zonesSlice {
+ trimmedZone := strings.TrimSpace(zone)
+ if trimmedZone == "" {
+ return make(sets.String), fmt.Errorf("comma separated list of zones (%q) must not contain an empty zone", zonesString)
+ }
+ zonesSet.Insert(trimmedZone)
+ }
+ return zonesSet, nil
+}
+
+// ValidateZone returns:
+// - an error in case zone is an empty string or contains only any combination of spaces and tab characters
+// - nil otherwise
+func ValidateZone(zone string) error {
+ if strings.TrimSpace(zone) == "" {
+ return fmt.Errorf("the provided %q zone is not valid, it's an empty string or contains only spaces and tab characters", zone)
+ }
+ return nil
+}
+
+// AccessModesContains returns whether the requested mode is contained by modes
+func AccessModesContains(modes []v1.PersistentVolumeAccessMode, mode v1.PersistentVolumeAccessMode) bool {
+ for _, m := range modes {
+ if m == mode {
+ return true
+ }
+ }
+ return false
+}
+
+// AccessModesContainedInAll returns whether all of the requested modes are contained by modes
+func AccessModesContainedInAll(indexedModes []v1.PersistentVolumeAccessMode, requestedModes []v1.PersistentVolumeAccessMode) bool {
+ for _, mode := range requestedModes {
+ if !AccessModesContains(indexedModes, mode) {
+ return false
+ }
+ }
+ return true
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/atomic_writer.go b/vendor/k8s.io/kubernetes/pkg/volume/util/atomic_writer.go
new file mode 100644
index 000000000..5eef55b45
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/volume/util/atomic_writer.go
@@ -0,0 +1,462 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package util
+
+import (
+ "bytes"
+ "fmt"
+ "io/ioutil"
+ "os"
+ "path"
+ "path/filepath"
+ "runtime"
+ "strings"
+ "time"
+
+ "github.com/golang/glog"
+
+ "k8s.io/apimachinery/pkg/util/sets"
+)
+
+const (
+ maxFileNameLength = 255
+ maxPathLength = 4096
+)
+
+// AtomicWriter handles atomically projecting content for a set of files into
+// a target directory.
+//
+// Note:
+//
+// 1. AtomicWriter reserves the set of pathnames starting with `..`.
+// 2. AtomicWriter offers no concurrency guarantees and must be synchronized
+// by the caller.
+//
+// The visible files in this volume are symlinks to files in the writer's data
+// directory. Actual files are stored in a hidden timestamped directory which
+// is symlinked to by the data directory. The timestamped directory and
+// data directory symlink are created in the writer's target dir.  This scheme
+// allows the files to be atomically updated by changing the target of the
+// data directory symlink.
+//
+// Consumers of the target directory can monitor the ..data symlink using
+// inotify or fanotify to receive events when the content in the volume is
+// updated.
+type AtomicWriter struct {
+ targetDir string
+ logContext string
+}
+
+type FileProjection struct {
+ Data []byte
+ Mode int32
+}
+
+// NewAtomicWriter creates a new AtomicWriter configured to write to the given
+// target directory, or returns an error if the target directory does not exist.
+func NewAtomicWriter(targetDir string, logContext string) (*AtomicWriter, error) {
+ _, err := os.Stat(targetDir)
+ if os.IsNotExist(err) {
+ return nil, err
+ }
+
+ return &AtomicWriter{targetDir: targetDir, logContext: logContext}, nil
+}
+
+const (
+ dataDirName = "..data"
+ newDataDirName = "..data_tmp"
+)
+
+// Write does an atomic projection of the given payload into the writer's target
+// directory. Input paths must not begin with '..'.
+//
+// The Write algorithm is:
+//
+// 1. The payload is validated; if the payload is invalid, the function returns
+// 2. The user-visible portion of the volume is walked to determine whether any
+// portion of the payload was deleted and is still present on disk.
+// If the payload is already present on disk and there are no deleted files,
+// the function returns
+// 3. A check is made to determine whether data present in the payload has changed
+// 4.  A new timestamped dir is created
+// 5. The payload is written to the new timestamped directory
+// 6.  Symlinks and directory for new user-visible files are created (if needed).
+//
+// For example, consider the files:
+// <target-dir>/podName
+// <target-dir>/user/labels
+// <target-dir>/k8s/annotations
+//
+// The user visible files are symbolic links into the internal data directory:
+// <target-dir>/podName -> ..data/podName
+// <target-dir>/usr/labels -> ../..data/usr/labels
+// <target-dir>/k8s/annotations -> ../..data/k8s/annotations
+//
+// Relative links are created into the data directory for files in subdirectories.
+//
+// The data directory itself is a link to a timestamped directory with
+// the real data:
+// <target-dir>/..data -> ..2016_02_01_15_04_05.12345678/
+// 7.  The current timestamped directory is detected by reading the data directory
+// symlink
+// 8.  A symlink to the new timestamped directory ..data_tmp is created that will
+// become the new data directory
+// 9.  The new data directory symlink is renamed to the data directory; rename is atomic
+// 10. Old paths are removed from the user-visible portion of the target directory
+// 11.  The previous timestamped directory is removed, if it exists
+func (w *AtomicWriter) Write(payload map[string]FileProjection) error {
+ // (1)
+ cleanPayload, err := validatePayload(payload)
+ if err != nil {
+ glog.Errorf("%s: invalid payload: %v", w.logContext, err)
+ return err
+ }
+
+ // (2)
+ pathsToRemove, err := w.pathsToRemove(cleanPayload)
+ if err != nil {
+ glog.Errorf("%s: error determining user-visible files to remove: %v", w.logContext, err)
+ return err
+ }
+
+ // (3)
+ if should, err := w.shouldWritePayload(cleanPayload); err != nil {
+ glog.Errorf("%s: error determining whether payload should be written to disk: %v", w.logContext, err)
+ return err
+ } else if !should && len(pathsToRemove) == 0 {
+ glog.V(4).Infof("%s: no update required for target directory %v", w.logContext, w.targetDir)
+ return nil
+ } else {
+ glog.V(4).Infof("%s: write required for target directory %v", w.logContext, w.targetDir)
+ }
+
+ // (4)
+ tsDir, err := w.newTimestampDir()
+ if err != nil {
+ glog.V(4).Infof("%s: error creating new ts data directory: %v", w.logContext, err)
+ return err
+ }
+
+ // (5)
+ if err = w.writePayloadToDir(cleanPayload, tsDir); err != nil {
+ glog.Errorf("%s: error writing payload to ts data directory %s: %v", w.logContext, tsDir, err)
+ return err
+ } else {
+ glog.V(4).Infof("%s: performed write of new data to ts data directory: %s", w.logContext, tsDir)
+ }
+
+ // (6)
+ if err = w.createUserVisibleFiles(cleanPayload); err != nil {
+ glog.Errorf("%s: error creating visible symlinks in %s: %v", w.logContext, w.targetDir, err)
+ return err
+ }
+
+ // (7)
+ _, tsDirName := filepath.Split(tsDir)
+ dataDirPath := path.Join(w.targetDir, dataDirName)
+ oldTsDir, err := os.Readlink(dataDirPath)
+ if err != nil && !os.IsNotExist(err) {
+ glog.Errorf("%s: error reading link for data directory: %v", w.logContext, err)
+ return err
+ }
+
+ // (8)
+ newDataDirPath := path.Join(w.targetDir, newDataDirName)
+ if err = os.Symlink(tsDirName, newDataDirPath); err != nil {
+ os.RemoveAll(tsDir)
+ glog.Errorf("%s: error creating symbolic link for atomic update: %v", w.logContext, err)
+ return err
+ }
+
+ // (9)
+ if runtime.GOOS == "windows" {
+ os.Remove(dataDirPath)
+ err = os.Symlink(tsDirName, dataDirPath)
+ os.Remove(newDataDirPath)
+ } else {
+ err = os.Rename(newDataDirPath, dataDirPath)
+ }
+ if err != nil {
+ os.Remove(newDataDirPath)
+ os.RemoveAll(tsDir)
+ glog.Errorf("%s: error renaming symbolic link for data directory %s: %v", w.logContext, newDataDirPath, err)
+ return err
+ }
+
+ // (10)
+ if err = w.removeUserVisiblePaths(pathsToRemove); err != nil {
+ glog.Errorf("%s: error removing old visible symlinks: %v", w.logContext, err)
+ return err
+ }
+
+ // (11)
+ if len(oldTsDir) > 0 {
+ if err = os.RemoveAll(path.Join(w.targetDir, oldTsDir)); err != nil {
+ glog.Errorf("%s: error removing old data directory %s: %v", w.logContext, oldTsDir, err)
+ return err
+ }
+ }
+
+ return nil
+}
+
+// validatePayload returns an error if any path in the payload returns a copy of the payload with the paths cleaned.
+func validatePayload(payload map[string]FileProjection) (map[string]FileProjection, error) {
+ cleanPayload := make(map[string]FileProjection)
+ for k, content := range payload {
+ if err := validatePath(k); err != nil {
+ return nil, err
+ }
+
+ cleanPayload[path.Clean(k)] = content
+ }
+
+ return cleanPayload, nil
+}
+
+// validatePath validates a single path, returning an error if the path is
+// invalid. paths may not:
+//
+// 1. be absolute
+// 2. contain '..' as an element
+// 3. start with '..'
+// 4. contain filenames larger than 255 characters
+// 5. be longer than 4096 characters
+func validatePath(targetPath string) error {
+ // TODO: somehow unify this with the similar api validation,
+ // validateVolumeSourcePath; the error semantics are just different enough
+ // from this that it was time-prohibitive trying to find the right
+ // refactoring to re-use.
+ if targetPath == "" {
+ return fmt.Errorf("invalid path: must not be empty: %q", targetPath)
+ }
+ if path.IsAbs(targetPath) {
+ return fmt.Errorf("invalid path: must be relative path: %s", targetPath)
+ }
+
+ if len(targetPath) > maxPathLength {
+ return fmt.Errorf("invalid path: must be less than %d characters", maxPathLength)
+ }
+
+ items := strings.Split(targetPath, string(os.PathSeparator))
+ for _, item := range items {
+ if item == ".." {
+ return fmt.Errorf("invalid path: must not contain '..': %s", targetPath)
+ }
+ if len(item) > maxFileNameLength {
+ return fmt.Errorf("invalid path: filenames must be less than %d characters", maxFileNameLength)
+ }
+ }
+ if strings.HasPrefix(items[0], "..") && len(items[0]) > 2 {
+ return fmt.Errorf("invalid path: must not start with '..': %s", targetPath)
+ }
+
+ return nil
+}
+
+// shouldWritePayload returns whether the payload should be written to disk.
+func (w *AtomicWriter) shouldWritePayload(payload map[string]FileProjection) (bool, error) {
+ for userVisiblePath, fileProjection := range payload {
+ shouldWrite, err := w.shouldWriteFile(path.Join(w.targetDir, userVisiblePath), fileProjection.Data)
+ if err != nil {
+ return false, err
+ }
+
+ if shouldWrite {
+ return true, nil
+ }
+ }
+
+ return false, nil
+}
+
+// shouldWriteFile returns whether a new version of a file should be written to disk.
+func (w *AtomicWriter) shouldWriteFile(path string, content []byte) (bool, error) {
+ _, err := os.Lstat(path)
+ if os.IsNotExist(err) {
+ return true, nil
+ }
+
+ contentOnFs, err := ioutil.ReadFile(path)
+ if err != nil {
+ return false, err
+ }
+
+ return (bytes.Compare(content, contentOnFs) != 0), nil
+}
+
+// pathsToRemove walks the user-visible portion of the target directory and
+// determines which paths should be removed (if any) after the payload is
+// written to the target directory.
+func (w *AtomicWriter) pathsToRemove(payload map[string]FileProjection) (sets.String, error) {
+ paths := sets.NewString()
+ visitor := func(path string, info os.FileInfo, err error) error {
+ if path == w.targetDir {
+ return nil
+ }
+
+ relativePath := strings.TrimPrefix(path, w.targetDir)
+ if runtime.GOOS == "windows" {
+ relativePath = strings.TrimPrefix(relativePath, "\\")
+ } else {
+ relativePath = strings.TrimPrefix(relativePath, "/")
+ }
+ if strings.HasPrefix(relativePath, "..") {
+ return nil
+ }
+
+ paths.Insert(relativePath)
+ return nil
+ }
+
+ err := filepath.Walk(w.targetDir, visitor)
+ if os.IsNotExist(err) {
+ return nil, nil
+ } else if err != nil {
+ return nil, err
+ }
+ glog.V(5).Infof("%s: current paths: %+v", w.targetDir, paths.List())
+
+ newPaths := sets.NewString()
+ for file := range payload {
+ // add all subpaths for the payload to the set of new paths
+ // to avoid attempting to remove non-empty dirs
+ for subPath := file; subPath != ""; {
+ newPaths.Insert(subPath)
+ subPath, _ = filepath.Split(subPath)
+ subPath = strings.TrimSuffix(subPath, "/")
+ }
+ }
+ glog.V(5).Infof("%s: new paths: %+v", w.targetDir, newPaths.List())
+
+ result := paths.Difference(newPaths)
+ glog.V(5).Infof("%s: paths to remove: %+v", w.targetDir, result)
+
+ return result, nil
+}
+
+// newTimestampDir creates a new timestamp directory
+func (w *AtomicWriter) newTimestampDir() (string, error) {
+ tsDir, err := ioutil.TempDir(w.targetDir, fmt.Sprintf("..%s.", time.Now().Format("1981_02_01_15_04_05")))
+ if err != nil {
+ glog.Errorf("%s: unable to create new temp directory: %v", w.logContext, err)
+ return "", err
+ }
+
+ // 0755 permissions are needed to allow 'group' and 'other' to recurse the
+ // directory tree. do a chmod here to ensure that permissions are set correctly
+ // regardless of the process' umask.
+ err = os.Chmod(tsDir, 0755)
+ if err != nil {
+ glog.Errorf("%s: unable to set mode on new temp directory: %v", w.logContext, err)
+ return "", err
+ }
+
+ return tsDir, nil
+}
+
+// writePayloadToDir writes the given payload to the given directory. The
+// directory must exist.
+func (w *AtomicWriter) writePayloadToDir(payload map[string]FileProjection, dir string) error {
+ for userVisiblePath, fileProjection := range payload {
+ content := fileProjection.Data
+ mode := os.FileMode(fileProjection.Mode)
+ fullPath := path.Join(dir, userVisiblePath)
+ baseDir, _ := filepath.Split(fullPath)
+
+ err := os.MkdirAll(baseDir, os.ModePerm)
+ if err != nil {
+ glog.Errorf("%s: unable to create directory %s: %v", w.logContext, baseDir, err)
+ return err
+ }
+
+ err = ioutil.WriteFile(fullPath, content, mode)
+ if err != nil {
+ glog.Errorf("%s: unable to write file %s with mode %v: %v", w.logContext, fullPath, mode, err)
+ return err
+ }
+ // Chmod is needed because ioutil.WriteFile() ends up calling
+ // open(2) to create the file, so the final mode used is "mode &
+ // ~umask". But we want to make sure the specified mode is used
+ // in the file no matter what the umask is.
+ err = os.Chmod(fullPath, mode)
+ if err != nil {
+ glog.Errorf("%s: unable to write file %s with mode %v: %v", w.logContext, fullPath, mode, err)
+ }
+ }
+
+ return nil
+}
+
+// createUserVisibleFiles creates the relative symlinks for all the
+// files configured in the payload. If the directory in a file path does not
+// exist, it is created.
+//
+// Viz:
+// For files: "bar", "foo/bar", "baz/bar", "foo/baz/blah"
+// the following symlinks and subdirectories are created:
+// bar -> ..data/bar
+// foo/bar -> ../..data/foo/bar
+// baz/bar -> ../..data/baz/bar
+// foo/baz/blah -> ../../..data/foo/baz/blah
+func (w *AtomicWriter) createUserVisibleFiles(payload map[string]FileProjection) error {
+ for userVisiblePath := range payload {
+ dir, _ := filepath.Split(userVisiblePath)
+ subDirs := 0
+ if len(dir) > 0 {
+ // If dir is not empty, the projection path contains at least one
+ // subdirectory (example: userVisiblePath := "foo/bar").
+ // Since filepath.Split leaves a trailing path separator, in this
+ // example, dir = "foo/". In order to calculate the number of
+ // subdirectories, we must subtract 1 from the number returned by split.
+ subDirs = len(strings.Split(dir, "/")) - 1
+ err := os.MkdirAll(path.Join(w.targetDir, dir), os.ModePerm)
+ if err != nil {
+ return err
+ }
+ }
+ _, err := os.Readlink(path.Join(w.targetDir, userVisiblePath))
+ if err != nil && os.IsNotExist(err) {
+ // The link into the data directory for this path doesn't exist; create it,
+ // respecting the number of subdirectories necessary to link
+ // correctly back into the data directory.
+ visibleFile := path.Join(w.targetDir, userVisiblePath)
+ dataDirFile := path.Join(strings.Repeat("../", subDirs), dataDirName, userVisiblePath)
+
+ err = os.Symlink(dataDirFile, visibleFile)
+ if err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
+// removeUserVisiblePaths removes the set of paths from the user-visible
+// portion of the writer's target directory.
+func (w *AtomicWriter) removeUserVisiblePaths(paths sets.String) error {
+ orderedPaths := paths.List()
+ for ii := len(orderedPaths) - 1; ii >= 0; ii-- {
+ if err := os.Remove(path.Join(w.targetDir, orderedPaths[ii])); err != nil {
+ glog.Errorf("%s: error pruning old user-visible path %s: %v", w.logContext, orderedPaths[ii], err)
+ return err
+ }
+ }
+
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/device_util.go b/vendor/k8s.io/kubernetes/pkg/volume/util/device_util.go
new file mode 100644
index 000000000..9098d7b85
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/volume/util/device_util.go
@@ -0,0 +1,31 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package util
+
+//DeviceUtil is a util for common device methods
+type DeviceUtil interface {
+ FindMultipathDeviceForDevice(disk string) string
+}
+
+type deviceHandler struct {
+ get_io IoUtil
+}
+
+//NewDeviceHandler Create a new IoHandler implementation
+func NewDeviceHandler(io IoUtil) DeviceUtil {
+ return &deviceHandler{get_io: io}
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/device_util_linux.go b/vendor/k8s.io/kubernetes/pkg/volume/util/device_util_linux.go
new file mode 100644
index 000000000..0d9851140
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/volume/util/device_util_linux.go
@@ -0,0 +1,61 @@
+// +build linux
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package util
+
+import (
+ "errors"
+ "strings"
+)
+
+// FindMultipathDeviceForDevice given a device name like /dev/sdx, find the devicemapper parent
+func (handler *deviceHandler) FindMultipathDeviceForDevice(device string) string {
+ io := handler.get_io
+ disk, err := findDeviceForPath(device, io)
+ if err != nil {
+ return ""
+ }
+ sysPath := "/sys/block/"
+ if dirs, err := io.ReadDir(sysPath); err == nil {
+ for _, f := range dirs {
+ name := f.Name()
+ if strings.HasPrefix(name, "dm-") {
+ if _, err1 := io.Lstat(sysPath + name + "/slaves/" + disk); err1 == nil {
+ return "/dev/" + name
+ }
+ }
+ }
+ }
+ return ""
+}
+
+// findDeviceForPath Find the underlaying disk for a linked path such as /dev/disk/by-path/XXXX or /dev/mapper/XXXX
+// will return sdX or hdX etc, if /dev/sdX is passed in then sdX will be returned
+func findDeviceForPath(path string, io IoUtil) (string, error) {
+ devicePath, err := io.EvalSymlinks(path)
+ if err != nil {
+ return "", err
+ }
+ // if path /dev/hdX split into "", "dev", "hdX" then we will
+ // return just the last part
+ parts := strings.Split(devicePath, "/")
+ if len(parts) == 3 && strings.HasPrefix(parts[1], "dev") {
+ return parts[2], nil
+ }
+ return "", errors.New("Illegal path for device " + devicePath)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/device_util_unsupported.go b/vendor/k8s.io/kubernetes/pkg/volume/util/device_util_unsupported.go
new file mode 100644
index 000000000..6afb1f139
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/volume/util/device_util_unsupported.go
@@ -0,0 +1,24 @@
+// +build !linux
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package util
+
+// FindMultipathDeviceForDevice unsupported returns ""
+func (handler *deviceHandler) FindMultipathDeviceForDevice(device string) string {
+ return ""
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/doc.go b/vendor/k8s.io/kubernetes/pkg/volume/util/doc.go
new file mode 100644
index 000000000..620add69d
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/volume/util/doc.go
@@ -0,0 +1,18 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Contains utility code for use by volume plugins.
+package util // import "k8s.io/kubernetes/pkg/volume/util"
diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/fs.go b/vendor/k8s.io/kubernetes/pkg/volume/util/fs.go
new file mode 100644
index 000000000..cfa7e30b4
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/volume/util/fs.go
@@ -0,0 +1,96 @@
+// +build linux darwin
+
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package util
+
+import (
+ "bytes"
+ "fmt"
+ "os/exec"
+ "strings"
+ "syscall"
+
+ "k8s.io/apimachinery/pkg/api/resource"
+)
+
+// FSInfo linux returns (available bytes, byte capacity, byte usage, total inodes, inodes free, inode usage, error)
+// for the filesystem that path resides upon.
+func FsInfo(path string) (int64, int64, int64, int64, int64, int64, error) {
+ statfs := &syscall.Statfs_t{}
+ err := syscall.Statfs(path, statfs)
+ if err != nil {
+ return 0, 0, 0, 0, 0, 0, err
+ }
+
+ // Available is blocks available * fragment size
+ available := int64(statfs.Bavail) * int64(statfs.Bsize)
+
+ // Capacity is total block count * fragment size
+ capacity := int64(statfs.Blocks) * int64(statfs.Bsize)
+
+ // Usage is block being used * fragment size (aka block size).
+ usage := (int64(statfs.Blocks) - int64(statfs.Bfree)) * int64(statfs.Bsize)
+
+ inodes := int64(statfs.Files)
+ inodesFree := int64(statfs.Ffree)
+ inodesUsed := inodes - inodesFree
+
+ return available, capacity, usage, inodes, inodesFree, inodesUsed, nil
+}
+
+func Du(path string) (*resource.Quantity, error) {
+ // Uses the same niceness level as cadvisor.fs does when running du
+ // Uses -B 1 to always scale to a blocksize of 1 byte
+ out, err := exec.Command("nice", "-n", "19", "du", "-s", "-B", "1", path).CombinedOutput()
+ if err != nil {
+ return nil, fmt.Errorf("failed command 'du' ($ nice -n 19 du -s -B 1) on path %s with error %v", path, err)
+ }
+ used, err := resource.ParseQuantity(strings.Fields(string(out))[0])
+ if err != nil {
+ return nil, fmt.Errorf("failed to parse 'du' output %s due to error %v", out, err)
+ }
+ used.Format = resource.BinarySI
+ return &used, nil
+}
+
+// Find uses the equivalent of the command `find <path> -dev -printf '.' | wc -c` to count files and directories.
+// While this is not an exact measure of inodes used, it is a very good approximation.
+func Find(path string) (int64, error) {
+ if path == "" {
+ return 0, fmt.Errorf("invalid directory")
+ }
+ var counter byteCounter
+ var stderr bytes.Buffer
+ findCmd := exec.Command("find", path, "-xdev", "-printf", ".")
+ findCmd.Stdout, findCmd.Stderr = &counter, &stderr
+ if err := findCmd.Start(); err != nil {
+ return 0, fmt.Errorf("failed to exec cmd %v - %v; stderr: %v", findCmd.Args, err, stderr.String())
+ }
+ if err := findCmd.Wait(); err != nil {
+ return 0, fmt.Errorf("cmd %v failed. stderr: %s; err: %v", findCmd.Args, stderr.String(), err)
+ }
+ return counter.bytesWritten, nil
+}
+
+// Simple io.Writer implementation that counts how many bytes were written.
+type byteCounter struct{ bytesWritten int64 }
+
+func (b *byteCounter) Write(p []byte) (int, error) {
+ b.bytesWritten += int64(len(p))
+ return len(p), nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/fs_unsupported.go b/vendor/k8s.io/kubernetes/pkg/volume/util/fs_unsupported.go
new file mode 100644
index 000000000..8d35d5dae
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/volume/util/fs_unsupported.go
@@ -0,0 +1,38 @@
+// +build !linux,!darwin
+
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package util
+
+import (
+ "fmt"
+
+ "k8s.io/apimachinery/pkg/api/resource"
+)
+
+// FSInfo unsupported returns 0 values for available and capacity and an error.
+func FsInfo(path string) (int64, int64, int64, int64, int64, int64, error) {
+ return 0, 0, 0, 0, 0, 0, fmt.Errorf("FsInfo not supported for this build.")
+}
+
+func Du(path string) (*resource.Quantity, error) {
+ return nil, fmt.Errorf("Du not supported for this build.")
+}
+
+func Find(path string) (int64, error) {
+ return 0, fmt.Errorf("Find not supported for this build.")
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/io_util.go b/vendor/k8s.io/kubernetes/pkg/volume/util/io_util.go
new file mode 100644
index 000000000..e1f30f5c3
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/volume/util/io_util.go
@@ -0,0 +1,47 @@
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package util
+
+import (
+ "io/ioutil"
+ "os"
+ "path/filepath"
+)
+
+// IoUtil is a mockable util for common IO operations
+type IoUtil interface {
+ ReadDir(dirname string) ([]os.FileInfo, error)
+ Lstat(name string) (os.FileInfo, error)
+ EvalSymlinks(path string) (string, error)
+}
+
+type osIOHandler struct{}
+
+//NewIOHandler Create a new IoHandler implementation
+func NewIOHandler() IoUtil {
+ return &osIOHandler{}
+}
+
+func (handler *osIOHandler) ReadDir(dirname string) ([]os.FileInfo, error) {
+ return ioutil.ReadDir(dirname)
+}
+func (handler *osIOHandler) Lstat(name string) (os.FileInfo, error) {
+ return os.Lstat(name)
+}
+func (handler *osIOHandler) EvalSymlinks(path string) (string, error) {
+ return filepath.EvalSymlinks(path)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/util.go b/vendor/k8s.io/kubernetes/pkg/volume/util/util.go
new file mode 100644
index 000000000..660c3c9db
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/volume/util/util.go
@@ -0,0 +1,213 @@
+/*
+Copyright 2015 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package util
+
+import (
+ "fmt"
+ "os"
+ "path"
+
+ "github.com/golang/glog"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/labels"
+ "k8s.io/kubernetes/pkg/api/v1"
+ v1helper "k8s.io/kubernetes/pkg/api/v1/helper"
+ storage "k8s.io/kubernetes/pkg/apis/storage/v1"
+ "k8s.io/kubernetes/pkg/client/clientset_generated/clientset"
+ "k8s.io/kubernetes/pkg/util/mount"
+)
+
+const readyFileName = "ready"
+
+// IsReady checks for the existence of a regular file
+// called 'ready' in the given directory and returns
+// true if that file exists.
+func IsReady(dir string) bool {
+ readyFile := path.Join(dir, readyFileName)
+ s, err := os.Stat(readyFile)
+ if err != nil {
+ return false
+ }
+
+ if !s.Mode().IsRegular() {
+ glog.Errorf("ready-file is not a file: %s", readyFile)
+ return false
+ }
+
+ return true
+}
+
+// SetReady creates a file called 'ready' in the given
+// directory. It logs an error if the file cannot be
+// created.
+func SetReady(dir string) {
+ if err := os.MkdirAll(dir, 0750); err != nil && !os.IsExist(err) {
+ glog.Errorf("Can't mkdir %s: %v", dir, err)
+ return
+ }
+
+ readyFile := path.Join(dir, readyFileName)
+ file, err := os.Create(readyFile)
+ if err != nil {
+ glog.Errorf("Can't touch %s: %v", readyFile, err)
+ return
+ }
+ file.Close()
+}
+
+// UnmountPath is a common unmount routine that unmounts the given path and
+// deletes the remaining directory if successful.
+func UnmountPath(mountPath string, mounter mount.Interface) error {
+ return UnmountMountPoint(mountPath, mounter, false /* extensiveMountPointCheck */)
+}
+
+// UnmountMountPoint is a common unmount routine that unmounts the given path and
+// deletes the remaining directory if successful.
+// if extensiveMountPointCheck is true
+// IsNotMountPoint will be called instead of IsLikelyNotMountPoint.
+// IsNotMountPoint is more expensive but properly handles bind mounts.
+func UnmountMountPoint(mountPath string, mounter mount.Interface, extensiveMountPointCheck bool) error {
+ if pathExists, pathErr := PathExists(mountPath); pathErr != nil {
+ return fmt.Errorf("Error checking if path exists: %v", pathErr)
+ } else if !pathExists {
+ glog.Warningf("Warning: Unmount skipped because path does not exist: %v", mountPath)
+ return nil
+ }
+
+ var notMnt bool
+ var err error
+
+ if extensiveMountPointCheck {
+ notMnt, err = mount.IsNotMountPoint(mounter, mountPath)
+ } else {
+ notMnt, err = mounter.IsLikelyNotMountPoint(mountPath)
+ }
+
+ if err != nil {
+ return err
+ }
+
+ if notMnt {
+ glog.Warningf("Warning: %q is not a mountpoint, deleting", mountPath)
+ return os.Remove(mountPath)
+ }
+
+ // Unmount the mount path
+ glog.V(4).Infof("%q is a mountpoint, unmounting", mountPath)
+ if err := mounter.Unmount(mountPath); err != nil {
+ return err
+ }
+ notMnt, mntErr := mounter.IsLikelyNotMountPoint(mountPath)
+ if mntErr != nil {
+ return err
+ }
+ if notMnt {
+ glog.V(4).Infof("%q is unmounted, deleting the directory", mountPath)
+ return os.Remove(mountPath)
+ }
+ return fmt.Errorf("Failed to unmount path %v", mountPath)
+}
+
+// PathExists returns true if the specified path exists.
+func PathExists(path string) (bool, error) {
+ _, err := os.Stat(path)
+ if err == nil {
+ return true, nil
+ } else if os.IsNotExist(err) {
+ return false, nil
+ } else {
+ return false, err
+ }
+}
+
+// GetSecretForPod locates secret by name in the pod's namespace and returns secret map
+func GetSecretForPod(pod *v1.Pod, secretName string, kubeClient clientset.Interface) (map[string]string, error) {
+ secret := make(map[string]string)
+ if kubeClient == nil {
+ return secret, fmt.Errorf("Cannot get kube client")
+ }
+ secrets, err := kubeClient.Core().Secrets(pod.Namespace).Get(secretName, metav1.GetOptions{})
+ if err != nil {
+ return secret, err
+ }
+ for name, data := range secrets.Data {
+ secret[name] = string(data)
+ }
+ return secret, nil
+}
+
+// GetSecretForPV locates secret by name and namespace, verifies the secret type, and returns secret map
+func GetSecretForPV(secretNamespace, secretName, volumePluginName string, kubeClient clientset.Interface) (map[string]string, error) {
+ secret := make(map[string]string)
+ if kubeClient == nil {
+ return secret, fmt.Errorf("Cannot get kube client")
+ }
+ secrets, err := kubeClient.Core().Secrets(secretNamespace).Get(secretName, metav1.GetOptions{})
+ if err != nil {
+ return secret, err
+ }
+ if secrets.Type != v1.SecretType(volumePluginName) {
+ return secret, fmt.Errorf("Cannot get secret of type %s", volumePluginName)
+ }
+ for name, data := range secrets.Data {
+ secret[name] = string(data)
+ }
+ return secret, nil
+}
+
+func GetClassForVolume(kubeClient clientset.Interface, pv *v1.PersistentVolume) (*storage.StorageClass, error) {
+ if kubeClient == nil {
+ return nil, fmt.Errorf("Cannot get kube client")
+ }
+ className := v1helper.GetPersistentVolumeClass(pv)
+ if className == "" {
+ return nil, fmt.Errorf("Volume has no storage class")
+ }
+
+ class, err := kubeClient.StorageV1().StorageClasses().Get(className, metav1.GetOptions{})
+ if err != nil {
+ return nil, err
+ }
+ return class, nil
+}
+
+// CheckNodeAffinity looks at the PV node affinity, and checks if the node has the same corresponding labels
+// This ensures that we don't mount a volume that doesn't belong to this node
+func CheckNodeAffinity(pv *v1.PersistentVolume, nodeLabels map[string]string) error {
+ affinity, err := v1helper.GetStorageNodeAffinityFromAnnotation(pv.Annotations)
+ if err != nil {
+ return fmt.Errorf("Error getting storage node affinity: %v", err)
+ }
+ if affinity == nil {
+ return nil
+ }
+
+ if affinity.RequiredDuringSchedulingIgnoredDuringExecution != nil {
+ terms := affinity.RequiredDuringSchedulingIgnoredDuringExecution.NodeSelectorTerms
+ glog.V(10).Infof("Match for RequiredDuringSchedulingIgnoredDuringExecution node selector terms %+v", terms)
+ for _, term := range terms {
+ selector, err := v1helper.NodeSelectorRequirementsAsSelector(term.MatchExpressions)
+ if err != nil {
+ return fmt.Errorf("Failed to parse MatchExpressions: %v", err)
+ }
+ if !selector.Matches(labels.Set(nodeLabels)) {
+ return fmt.Errorf("NodeSelectorTerm %+v does not match node labels", term.MatchExpressions)
+ }
+ }
+ }
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/volume/volume.go b/vendor/k8s.io/kubernetes/pkg/volume/volume.go
new file mode 100644
index 000000000..76c96d2e2
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/volume/volume.go
@@ -0,0 +1,230 @@
+/*
+Copyright 2014 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package volume
+
+import (
+ "time"
+
+ "k8s.io/apimachinery/pkg/api/resource"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/types"
+ "k8s.io/kubernetes/pkg/api/v1"
+)
+
+// Volume represents a directory used by pods or hosts on a node. All method
+// implementations of methods in the volume interface must be idempotent.
+type Volume interface {
+ // GetPath returns the path to which the volume should be mounted for the
+ // pod.
+ GetPath() string
+
+ // MetricsProvider embeds methods for exposing metrics (e.g.
+ // used, available space).
+ MetricsProvider
+}
+
+// MetricsProvider exposes metrics (e.g. used,available space) related to a
+// Volume.
+type MetricsProvider interface {
+ // GetMetrics returns the Metrics for the Volume. Maybe expensive for
+ // some implementations.
+ GetMetrics() (*Metrics, error)
+}
+
+// Metrics represents the used and available bytes of the Volume.
+type Metrics struct {
+ // The time at which these stats were updated.
+ Time metav1.Time
+
+ // Used represents the total bytes used by the Volume.
+ // Note: For block devices this maybe more than the total size of the files.
+ Used *resource.Quantity
+
+ // Capacity represents the total capacity (bytes) of the volume's
+ // underlying storage. For Volumes that share a filesystem with the host
+ // (e.g. emptydir, hostpath) this is the size of the underlying storage,
+ // and will not equal Used + Available as the fs is shared.
+ Capacity *resource.Quantity
+
+ // Available represents the storage space available (bytes) for the
+ // Volume. For Volumes that share a filesystem with the host (e.g.
+ // emptydir, hostpath), this is the available space on the underlying
+ // storage, and is shared with host processes and other Volumes.
+ Available *resource.Quantity
+
+ // InodesUsed represents the total inodes used by the Volume.
+ InodesUsed *resource.Quantity
+
+ // Inodes represents the total number of inodes available in the volume.
+ // For volumes that share a filesystem with the host (e.g. emptydir, hostpath),
+ // this is the inodes available in the underlying storage,
+ // and will not equal InodesUsed + InodesFree as the fs is shared.
+ Inodes *resource.Quantity
+
+ // InodesFree represent the inodes available for the volume. For Volumes that share
+ // a filesystem with the host (e.g. emptydir, hostpath), this is the free inodes
+ // on the underlying storage, and is shared with host processes and other volumes
+ InodesFree *resource.Quantity
+}
+
+// Attributes represents the attributes of this mounter.
+type Attributes struct {
+ ReadOnly bool
+ Managed bool
+ SupportsSELinux bool
+}
+
+// Mounter interface provides methods to set up/mount the volume.
+type Mounter interface {
+ // Uses Interface to provide the path for Docker binds.
+ Volume
+
+ // CanMount is called immediately prior to Setup to check if
+ // the required components (binaries, etc.) are available on
+ // the underlying node to complete the subsequent SetUp (mount)
+ // operation. If CanMount returns error, the mount operation is
+ // aborted and an event is generated indicating that the node
+ // does not have the required binaries to complete the mount.
+ // If CanMount succeeds, the mount operation continues
+ // normally. The CanMount check can be enabled or disabled
+ // using the experimental-check-mount-binaries binary flag
+ CanMount() error
+
+ // SetUp prepares and mounts/unpacks the volume to a
+ // self-determined directory path. The mount point and its
+ // content should be owned by 'fsGroup' so that it can be
+ // accessed by the pod. This may be called more than once, so
+ // implementations must be idempotent.
+ SetUp(fsGroup *int64) error
+ // SetUpAt prepares and mounts/unpacks the volume to the
+ // specified directory path, which may or may not exist yet.
+ // The mount point and its content should be owned by
+ // 'fsGroup' so that it can be accessed by the pod. This may
+ // be called more than once, so implementations must be
+ // idempotent.
+ SetUpAt(dir string, fsGroup *int64) error
+ // GetAttributes returns the attributes of the mounter.
+ GetAttributes() Attributes
+}
+
+// Unmounter interface provides methods to cleanup/unmount the volumes.
+type Unmounter interface {
+ Volume
+ // TearDown unmounts the volume from a self-determined directory and
+ // removes traces of the SetUp procedure.
+ TearDown() error
+ // TearDown unmounts the volume from the specified directory and
+ // removes traces of the SetUp procedure.
+ TearDownAt(dir string) error
+}
+
+// Provisioner is an interface that creates templates for PersistentVolumes
+// and can create the volume as a new resource in the infrastructure provider.
+type Provisioner interface {
+ // Provision creates the resource by allocating the underlying volume in a
+ // storage system. This method should block until completion and returns
+ // PersistentVolume representing the created storage resource.
+ Provision() (*v1.PersistentVolume, error)
+}
+
+// Deleter removes the resource from the underlying storage provider. Calls
+// to this method should block until the deletion is complete. Any error
+// returned indicates the volume has failed to be reclaimed. A nil return
+// indicates success.
+type Deleter interface {
+ Volume
+ // This method should block until completion.
+ // deletedVolumeInUseError returned from this function will not be reported
+ // as error and it will be sent as "Info" event to the PV being deleted. The
+ // volume controller will retry deleting the volume in the next periodic
+ // sync. This can be used to postpone deletion of a volume that is being
+ // detached from a node. Deletion of such volume would fail anyway and such
+ // error would confuse users.
+ Delete() error
+}
+
+// Attacher can attach a volume to a node.
+type Attacher interface {
+ // Attaches the volume specified by the given spec to the node with the given Name.
+ // On success, returns the device path where the device was attached on the
+ // node.
+ Attach(spec *Spec, nodeName types.NodeName) (string, error)
+
+ // VolumesAreAttached checks whether the list of volumes still attached to the specified
+ // node. It returns a map which maps from the volume spec to the checking result.
+ // If an error is occurred during checking, the error will be returned
+ VolumesAreAttached(specs []*Spec, nodeName types.NodeName) (map[*Spec]bool, error)
+
+ // WaitForAttach blocks until the device is attached to this
+ // node. If it successfully attaches, the path to the device
+ // is returned. Otherwise, if the device does not attach after
+ // the given timeout period, an error will be returned.
+ WaitForAttach(spec *Spec, devicePath string, timeout time.Duration) (string, error)
+
+ // GetDeviceMountPath returns a path where the device should
+ // be mounted after it is attached. This is a global mount
+ // point which should be bind mounted for individual volumes.
+ GetDeviceMountPath(spec *Spec) (string, error)
+
+ // MountDevice mounts the disk to a global path which
+ // individual pods can then bind mount
+ MountDevice(spec *Spec, devicePath string, deviceMountPath string) error
+}
+
+type BulkVolumeVerifier interface {
+ // BulkVerifyVolumes checks whether the list of volumes still attached to the
+ // the clusters in the node. It returns a map which maps from the volume spec to the checking result.
+ // If an error occurs during check - error should be returned and volume on nodes
+ // should be assumed as still attached.
+ BulkVerifyVolumes(volumesByNode map[types.NodeName][]*Spec) (map[types.NodeName]map[*Spec]bool, error)
+}
+
+// Detacher can detach a volume from a node.
+type Detacher interface {
+ // Detach the given device from the node with the given Name.
+ Detach(deviceName string, nodeName types.NodeName) error
+
+ // UnmountDevice unmounts the global mount of the disk. This
+ // should only be called once all bind mounts have been
+ // unmounted.
+ UnmountDevice(deviceMountPath string) error
+}
+
+// NewDeletedVolumeInUseError returns a new instance of DeletedVolumeInUseError
+// error.
+func NewDeletedVolumeInUseError(message string) error {
+ return deletedVolumeInUseError(message)
+}
+
+type deletedVolumeInUseError string
+
+var _ error = deletedVolumeInUseError("")
+
+// IsDeletedVolumeInUse returns true if an error returned from Delete() is
+// deletedVolumeInUseError
+func IsDeletedVolumeInUse(err error) bool {
+ switch err.(type) {
+ case deletedVolumeInUseError:
+ return true
+ default:
+ return false
+ }
+}
+
+func (err deletedVolumeInUseError) Error() string {
+ return string(err)
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/volume/volume_linux.go b/vendor/k8s.io/kubernetes/pkg/volume/volume_linux.go
new file mode 100644
index 000000000..ef1f45208
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/volume/volume_linux.go
@@ -0,0 +1,91 @@
+// +build linux
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package volume
+
+import (
+ "path/filepath"
+ "syscall"
+
+ "os"
+
+ "github.com/golang/glog"
+)
+
+const (
+ rwMask = os.FileMode(0660)
+ roMask = os.FileMode(0440)
+)
+
+// SetVolumeOwnership modifies the given volume to be owned by
+// fsGroup, and sets SetGid so that newly created files are owned by
+// fsGroup. If fsGroup is nil nothing is done.
+func SetVolumeOwnership(mounter Mounter, fsGroup *int64) error {
+
+ if fsGroup == nil {
+ return nil
+ }
+
+ return filepath.Walk(mounter.GetPath(), func(path string, info os.FileInfo, err error) error {
+ if err != nil {
+ return err
+ }
+
+ // chown and chmod pass through to the underlying file for symlinks.
+ // Symlinks have a mode of 777 but this really doesn't mean anything.
+ // The permissions of the underlying file are what matter.
+ // However, if one reads the mode of a symlink then chmods the symlink
+ // with that mode, it changes the mode of the underlying file, overridden
+ // the defaultMode and permissions initialized by the volume plugin, which
+ // is not what we want; thus, we skip chown/chmod for symlinks.
+ if info.Mode()&os.ModeSymlink != 0 {
+ return nil
+ }
+
+ stat, ok := info.Sys().(*syscall.Stat_t)
+ if !ok {
+ return nil
+ }
+
+ if stat == nil {
+ glog.Errorf("Got nil stat_t for path %v while setting ownership of volume", path)
+ return nil
+ }
+
+ err = os.Chown(path, int(stat.Uid), int(*fsGroup))
+ if err != nil {
+ glog.Errorf("Chown failed on %v: %v", path, err)
+ }
+
+ mask := rwMask
+ if mounter.GetAttributes().ReadOnly {
+ mask = roMask
+ }
+
+ if info.IsDir() {
+ mask |= os.ModeSetgid
+ }
+
+ err = os.Chmod(path, info.Mode()|mask)
+ if err != nil {
+ glog.Errorf("Chmod failed on %v: %v", path, err)
+ }
+
+ return nil
+ })
+}
diff --git a/vendor/k8s.io/kubernetes/pkg/volume/volume_unsupported.go b/vendor/k8s.io/kubernetes/pkg/volume/volume_unsupported.go
new file mode 100644
index 000000000..45a6cc5ca
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/pkg/volume/volume_unsupported.go
@@ -0,0 +1,23 @@
+// +build !linux
+
+/*
+Copyright 2016 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package volume
+
+func SetVolumeOwnership(mounter Mounter, fsGroup *int64) error {
+ return nil
+}
diff --git a/vendor/k8s.io/kubernetes/third_party/forked/golang/LICENSE b/vendor/k8s.io/kubernetes/third_party/forked/golang/LICENSE
new file mode 100644
index 000000000..744875676
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/third_party/forked/golang/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) 2012 The Go Authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/k8s.io/kubernetes/third_party/forked/golang/PATENTS b/vendor/k8s.io/kubernetes/third_party/forked/golang/PATENTS
new file mode 100644
index 000000000..733099041
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/third_party/forked/golang/PATENTS
@@ -0,0 +1,22 @@
+Additional IP Rights Grant (Patents)
+
+"This implementation" means the copyrightable works distributed by
+Google as part of the Go project.
+
+Google hereby grants to You a perpetual, worldwide, non-exclusive,
+no-charge, royalty-free, irrevocable (except as stated in this section)
+patent license to make, have made, use, offer to sell, sell, import,
+transfer and otherwise run, modify and propagate the contents of this
+implementation of Go, where such license applies only to those patent
+claims, both currently owned or controlled by Google and acquired in
+the future, licensable by Google that are necessarily infringed by this
+implementation of Go. This grant does not include claims that would be
+infringed only as a consequence of further modification of this
+implementation. If you or your agent or exclusive licensee institute or
+order or agree to the institution of patent litigation against any
+entity (including a cross-claim or counterclaim in a lawsuit) alleging
+that this implementation of Go or any code incorporated within this
+implementation of Go constitutes direct or contributory patent
+infringement, or inducement of patent infringement, then any patent
+rights granted to you under this License for this implementation of Go
+shall terminate as of the date such litigation is filed.
diff --git a/vendor/k8s.io/kubernetes/third_party/forked/golang/expansion/expand.go b/vendor/k8s.io/kubernetes/third_party/forked/golang/expansion/expand.go
new file mode 100644
index 000000000..6bf0ea8ce
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/third_party/forked/golang/expansion/expand.go
@@ -0,0 +1,102 @@
+package expansion
+
+import (
+ "bytes"
+)
+
+const (
+ operator = '$'
+ referenceOpener = '('
+ referenceCloser = ')'
+)
+
+// syntaxWrap returns the input string wrapped by the expansion syntax.
+func syntaxWrap(input string) string {
+ return string(operator) + string(referenceOpener) + input + string(referenceCloser)
+}
+
+// MappingFuncFor returns a mapping function for use with Expand that
+// implements the expansion semantics defined in the expansion spec; it
+// returns the input string wrapped in the expansion syntax if no mapping
+// for the input is found.
+func MappingFuncFor(context ...map[string]string) func(string) string {
+ return func(input string) string {
+ for _, vars := range context {
+ val, ok := vars[input]
+ if ok {
+ return val
+ }
+ }
+
+ return syntaxWrap(input)
+ }
+}
+
+// Expand replaces variable references in the input string according to
+// the expansion spec using the given mapping function to resolve the
+// values of variables.
+func Expand(input string, mapping func(string) string) string {
+ var buf bytes.Buffer
+ checkpoint := 0
+ for cursor := 0; cursor < len(input); cursor++ {
+ if input[cursor] == operator && cursor+1 < len(input) {
+ // Copy the portion of the input string since the last
+ // checkpoint into the buffer
+ buf.WriteString(input[checkpoint:cursor])
+
+ // Attempt to read the variable name as defined by the
+ // syntax from the input string
+ read, isVar, advance := tryReadVariableName(input[cursor+1:])
+
+ if isVar {
+ // We were able to read a variable name correctly;
+ // apply the mapping to the variable name and copy the
+ // bytes into the buffer
+ buf.WriteString(mapping(read))
+ } else {
+ // Not a variable name; copy the read bytes into the buffer
+ buf.WriteString(read)
+ }
+
+ // Advance the cursor in the input string to account for
+ // bytes consumed to read the variable name expression
+ cursor += advance
+
+ // Advance the checkpoint in the input string
+ checkpoint = cursor + 1
+ }
+ }
+
+ // Return the buffer and any remaining unwritten bytes in the
+ // input string.
+ return buf.String() + input[checkpoint:]
+}
+
+// tryReadVariableName attempts to read a variable name from the input
+// string and returns the content read from the input, whether that content
+// represents a variable name to perform mapping on, and the number of bytes
+// consumed in the input string.
+//
+// The input string is assumed not to contain the initial operator.
+func tryReadVariableName(input string) (string, bool, int) {
+ switch input[0] {
+ case operator:
+ // Escaped operator; return it.
+ return input[0:1], false, 1
+ case referenceOpener:
+ // Scan to expression closer
+ for i := 1; i < len(input); i++ {
+ if input[i] == referenceCloser {
+ return input[1:i], true, i + 1
+ }
+ }
+
+ // Incomplete reference; return it.
+ return string(operator) + string(referenceOpener), false, 1
+ default:
+ // Not the beginning of an expression, ie, an operator
+ // that doesn't begin an expression. Return the operator
+ // and the first rune in the string.
+ return (string(operator) + string(input[0])), false, 1
+ }
+}
diff --git a/vendor/k8s.io/kubernetes/third_party/protobuf/google/protobuf/compiler/plugin.proto b/vendor/k8s.io/kubernetes/third_party/protobuf/google/protobuf/compiler/plugin.proto
new file mode 100644
index 000000000..5116167e0
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/third_party/protobuf/google/protobuf/compiler/plugin.proto
@@ -0,0 +1,150 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Author: kenton@google.com (Kenton Varda)
+//
+// WARNING: The plugin interface is currently EXPERIMENTAL and is subject to
+// change.
+//
+// protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is
+// just a program that reads a CodeGeneratorRequest from stdin and writes a
+// CodeGeneratorResponse to stdout.
+//
+// Plugins written using C++ can use google/protobuf/compiler/plugin.h instead
+// of dealing with the raw protocol defined here.
+//
+// A plugin executable needs only to be placed somewhere in the path. The
+// plugin should be named "protoc-gen-$NAME", and will then be used when the
+// flag "--${NAME}_out" is passed to protoc.
+
+syntax = "proto2";
+package google.protobuf.compiler;
+option java_package = "com.google.protobuf.compiler";
+option java_outer_classname = "PluginProtos";
+
+option go_package = "plugin_go";
+
+import "google/protobuf/descriptor.proto";
+
+// An encoded CodeGeneratorRequest is written to the plugin's stdin.
+message CodeGeneratorRequest {
+ // The .proto files that were explicitly listed on the command-line. The
+ // code generator should generate code only for these files. Each file's
+ // descriptor will be included in proto_file, below.
+ repeated string file_to_generate = 1;
+
+ // The generator parameter passed on the command-line.
+ optional string parameter = 2;
+
+ // FileDescriptorProtos for all files in files_to_generate and everything
+ // they import. The files will appear in topological order, so each file
+ // appears before any file that imports it.
+ //
+ // protoc guarantees that all proto_files will be written after
+ // the fields above, even though this is not technically guaranteed by the
+ // protobuf wire format. This theoretically could allow a plugin to stream
+ // in the FileDescriptorProtos and handle them one by one rather than read
+ // the entire set into memory at once. However, as of this writing, this
+ // is not similarly optimized on protoc's end -- it will store all fields in
+ // memory at once before sending them to the plugin.
+ repeated FileDescriptorProto proto_file = 15;
+}
+
+// The plugin writes an encoded CodeGeneratorResponse to stdout.
+message CodeGeneratorResponse {
+ // Error message. If non-empty, code generation failed. The plugin process
+ // should exit with status code zero even if it reports an error in this way.
+ //
+ // This should be used to indicate errors in .proto files which prevent the
+ // code generator from generating correct code. Errors which indicate a
+ // problem in protoc itself -- such as the input CodeGeneratorRequest being
+ // unparseable -- should be reported by writing a message to stderr and
+ // exiting with a non-zero status code.
+ optional string error = 1;
+
+ // Represents a single generated file.
+ message File {
+ // The file name, relative to the output directory. The name must not
+ // contain "." or ".." components and must be relative, not be absolute (so,
+ // the file cannot lie outside the output directory). "/" must be used as
+ // the path separator, not "\".
+ //
+ // If the name is omitted, the content will be appended to the previous
+ // file. This allows the generator to break large files into small chunks,
+ // and allows the generated text to be streamed back to protoc so that large
+ // files need not reside completely in memory at one time. Note that as of
+ // this writing protoc does not optimize for this -- it will read the entire
+ // CodeGeneratorResponse before writing files to disk.
+ optional string name = 1;
+
+ // If non-empty, indicates that the named file should already exist, and the
+ // content here is to be inserted into that file at a defined insertion
+ // point. This feature allows a code generator to extend the output
+ // produced by another code generator. The original generator may provide
+ // insertion points by placing special annotations in the file that look
+ // like:
+ // @@protoc_insertion_point(NAME)
+ // The annotation can have arbitrary text before and after it on the line,
+ // which allows it to be placed in a comment. NAME should be replaced with
+ // an identifier naming the point -- this is what other generators will use
+ // as the insertion_point. Code inserted at this point will be placed
+ // immediately above the line containing the insertion point (thus multiple
+ // insertions to the same point will come out in the order they were added).
+ // The double-@ is intended to make it unlikely that the generated code
+ // could contain things that look like insertion points by accident.
+ //
+ // For example, the C++ code generator places the following line in the
+ // .pb.h files that it generates:
+ // // @@protoc_insertion_point(namespace_scope)
+ // This line appears within the scope of the file's package namespace, but
+ // outside of any particular class. Another plugin can then specify the
+ // insertion_point "namespace_scope" to generate additional classes or
+ // other declarations that should be placed in this scope.
+ //
+ // Note that if the line containing the insertion point begins with
+ // whitespace, the same whitespace will be added to every line of the
+ // inserted text. This is useful for languages like Python, where
+ // indentation matters. In these languages, the insertion point comment
+ // should be indented the same amount as any inserted code will need to be
+ // in order to work correctly in that context.
+ //
+ // The code generator that generates the initial file and the one which
+ // inserts into it must both run as part of a single invocation of protoc.
+ // Code generators are executed in the order in which they appear on the
+ // command line.
+ //
+ // If |insertion_point| is present, |name| must also be present.
+ optional string insertion_point = 2;
+
+ // The file contents.
+ optional string content = 15;
+ }
+ repeated File file = 15;
+} \ No newline at end of file
diff --git a/vendor/k8s.io/kubernetes/third_party/protobuf/google/protobuf/descriptor.proto b/vendor/k8s.io/kubernetes/third_party/protobuf/google/protobuf/descriptor.proto
new file mode 100644
index 000000000..14594a8c6
--- /dev/null
+++ b/vendor/k8s.io/kubernetes/third_party/protobuf/google/protobuf/descriptor.proto
@@ -0,0 +1,779 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Author: kenton@google.com (Kenton Varda)
+// Based on original Protocol Buffers design by
+// Sanjay Ghemawat, Jeff Dean, and others.
+//
+// The messages in this file describe the definitions found in .proto files.
+// A valid .proto file can be translated directly to a FileDescriptorProto
+// without any other information (e.g. without reading its imports).
+
+
+syntax = "proto2";
+
+package google.protobuf;
+option go_package = "descriptor";
+option java_package = "com.google.protobuf";
+option java_outer_classname = "DescriptorProtos";
+option csharp_namespace = "Google.Protobuf.Reflection";
+option objc_class_prefix = "GPB";
+
+// descriptor.proto must be optimized for speed because reflection-based
+// algorithms don't work during bootstrapping.
+option optimize_for = SPEED;
+
+// The protocol compiler can output a FileDescriptorSet containing the .proto
+// files it parses.
+message FileDescriptorSet {
+ repeated FileDescriptorProto file = 1;
+}
+
+// Describes a complete .proto file.
+message FileDescriptorProto {
+ optional string name = 1; // file name, relative to root of source tree
+ optional string package = 2; // e.g. "foo", "foo.bar", etc.
+
+ // Names of files imported by this file.
+ repeated string dependency = 3;
+ // Indexes of the public imported files in the dependency list above.
+ repeated int32 public_dependency = 10;
+ // Indexes of the weak imported files in the dependency list.
+ // For Google-internal migration only. Do not use.
+ repeated int32 weak_dependency = 11;
+
+ // All top-level definitions in this file.
+ repeated DescriptorProto message_type = 4;
+ repeated EnumDescriptorProto enum_type = 5;
+ repeated ServiceDescriptorProto service = 6;
+ repeated FieldDescriptorProto extension = 7;
+
+ optional FileOptions options = 8;
+
+ // This field contains optional information about the original source code.
+ // You may safely remove this entire field without harming runtime
+ // functionality of the descriptors -- the information is needed only by
+ // development tools.
+ optional SourceCodeInfo source_code_info = 9;
+
+ // The syntax of the proto file.
+ // The supported values are "proto2" and "proto3".
+ optional string syntax = 12;
+}
+
+// Describes a message type.
+message DescriptorProto {
+ optional string name = 1;
+
+ repeated FieldDescriptorProto field = 2;
+ repeated FieldDescriptorProto extension = 6;
+
+ repeated DescriptorProto nested_type = 3;
+ repeated EnumDescriptorProto enum_type = 4;
+
+ message ExtensionRange {
+ optional int32 start = 1;
+ optional int32 end = 2;
+ }
+ repeated ExtensionRange extension_range = 5;
+
+ repeated OneofDescriptorProto oneof_decl = 8;
+
+ optional MessageOptions options = 7;
+
+ // Range of reserved tag numbers. Reserved tag numbers may not be used by
+ // fields or extension ranges in the same message. Reserved ranges may
+ // not overlap.
+ message ReservedRange {
+ optional int32 start = 1; // Inclusive.
+ optional int32 end = 2; // Exclusive.
+ }
+ repeated ReservedRange reserved_range = 9;
+ // Reserved field names, which may not be used by fields in the same message.
+ // A given name may only be reserved once.
+ repeated string reserved_name = 10;
+}
+
+// Describes a field within a message.
+message FieldDescriptorProto {
+ enum Type {
+ // 0 is reserved for errors.
+ // Order is weird for historical reasons.
+ TYPE_DOUBLE = 1;
+ TYPE_FLOAT = 2;
+ // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
+ // negative values are likely.
+ TYPE_INT64 = 3;
+ TYPE_UINT64 = 4;
+ // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
+ // negative values are likely.
+ TYPE_INT32 = 5;
+ TYPE_FIXED64 = 6;
+ TYPE_FIXED32 = 7;
+ TYPE_BOOL = 8;
+ TYPE_STRING = 9;
+ TYPE_GROUP = 10; // Tag-delimited aggregate.
+ TYPE_MESSAGE = 11; // Length-delimited aggregate.
+
+ // New in version 2.
+ TYPE_BYTES = 12;
+ TYPE_UINT32 = 13;
+ TYPE_ENUM = 14;
+ TYPE_SFIXED32 = 15;
+ TYPE_SFIXED64 = 16;
+ TYPE_SINT32 = 17; // Uses ZigZag encoding.
+ TYPE_SINT64 = 18; // Uses ZigZag encoding.
+ };
+
+ enum Label {
+ // 0 is reserved for errors
+ LABEL_OPTIONAL = 1;
+ LABEL_REQUIRED = 2;
+ LABEL_REPEATED = 3;
+ // TODO(sanjay): Should we add LABEL_MAP?
+ };
+
+ optional string name = 1;
+ optional int32 number = 3;
+ optional Label label = 4;
+
+ // If type_name is set, this need not be set. If both this and type_name
+ // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
+ optional Type type = 5;
+
+ // For message and enum types, this is the name of the type. If the name
+ // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
+ // rules are used to find the type (i.e. first the nested types within this
+ // message are searched, then within the parent, on up to the root
+ // namespace).
+ optional string type_name = 6;
+
+ // For extensions, this is the name of the type being extended. It is
+ // resolved in the same manner as type_name.
+ optional string extendee = 2;
+
+ // For numeric types, contains the original text representation of the value.
+ // For booleans, "true" or "false".
+ // For strings, contains the default text contents (not escaped in any way).
+ // For bytes, contains the C escaped value. All bytes >= 128 are escaped.
+ // TODO(kenton): Base-64 encode?
+ optional string default_value = 7;
+
+ // If set, gives the index of a oneof in the containing type's oneof_decl
+ // list. This field is a member of that oneof.
+ optional int32 oneof_index = 9;
+
+ // JSON name of this field. The value is set by protocol compiler. If the
+ // user has set a "json_name" option on this field, that option's value
+ // will be used. Otherwise, it's deduced from the field's name by converting
+ // it to camelCase.
+ optional string json_name = 10;
+
+ optional FieldOptions options = 8;
+}
+
+// Describes a oneof.
+message OneofDescriptorProto {
+ optional string name = 1;
+}
+
+// Describes an enum type.
+message EnumDescriptorProto {
+ optional string name = 1;
+
+ repeated EnumValueDescriptorProto value = 2;
+
+ optional EnumOptions options = 3;
+}
+
+// Describes a value within an enum.
+message EnumValueDescriptorProto {
+ optional string name = 1;
+ optional int32 number = 2;
+
+ optional EnumValueOptions options = 3;
+}
+
+// Describes a service.
+message ServiceDescriptorProto {
+ optional string name = 1;
+ repeated MethodDescriptorProto method = 2;
+
+ optional ServiceOptions options = 3;
+}
+
+// Describes a method of a service.
+message MethodDescriptorProto {
+ optional string name = 1;
+
+ // Input and output type names. These are resolved in the same way as
+ // FieldDescriptorProto.type_name, but must refer to a message type.
+ optional string input_type = 2;
+ optional string output_type = 3;
+
+ optional MethodOptions options = 4;
+
+ // Identifies if client streams multiple client messages
+ optional bool client_streaming = 5 [default=false];
+ // Identifies if server streams multiple server messages
+ optional bool server_streaming = 6 [default=false];
+}
+
+
+// ===================================================================
+// Options
+
+// Each of the definitions above may have "options" attached. These are
+// just annotations which may cause code to be generated slightly differently
+// or may contain hints for code that manipulates protocol messages.
+//
+// Clients may define custom options as extensions of the *Options messages.
+// These extensions may not yet be known at parsing time, so the parser cannot
+// store the values in them. Instead it stores them in a field in the *Options
+// message called uninterpreted_option. This field must have the same name
+// across all *Options messages. We then use this field to populate the
+// extensions when we build a descriptor, at which point all protos have been
+// parsed and so all extensions are known.
+//
+// Extension numbers for custom options may be chosen as follows:
+// * For options which will only be used within a single application or
+// organization, or for experimental options, use field numbers 50000
+// through 99999. It is up to you to ensure that you do not use the
+// same number for multiple options.
+// * For options which will be published and used publicly by multiple
+// independent entities, e-mail protobuf-global-extension-registry@google.com
+// to reserve extension numbers. Simply provide your project name (e.g.
+// Objective-C plugin) and your project website (if available) -- there's no
+// need to explain how you intend to use them. Usually you only need one
+// extension number. You can declare multiple options with only one extension
+// number by putting them in a sub-message. See the Custom Options section of
+// the docs for examples:
+// https://developers.google.com/protocol-buffers/docs/proto#options
+// If this turns out to be popular, a web service will be set up
+// to automatically assign option numbers.
+
+
+message FileOptions {
+
+ // Sets the Java package where classes generated from this .proto will be
+ // placed. By default, the proto package is used, but this is often
+ // inappropriate because proto packages do not normally start with backwards
+ // domain names.
+ optional string java_package = 1;
+
+
+ // If set, all the classes from the .proto file are wrapped in a single
+ // outer class with the given name. This applies to both Proto1
+ // (equivalent to the old "--one_java_file" option) and Proto2 (where
+ // a .proto always translates to a single class, but you may want to
+ // explicitly choose the class name).
+ optional string java_outer_classname = 8;
+
+ // If set true, then the Java code generator will generate a separate .java
+ // file for each top-level message, enum, and service defined in the .proto
+ // file. Thus, these types will *not* be nested inside the outer class
+ // named by java_outer_classname. However, the outer class will still be
+ // generated to contain the file's getDescriptor() method as well as any
+ // top-level extensions defined in the file.
+ optional bool java_multiple_files = 10 [default=false];
+
+ // If set true, then the Java code generator will generate equals() and
+ // hashCode() methods for all messages defined in the .proto file.
+ // This increases generated code size, potentially substantially for large
+ // protos, which may harm a memory-constrained application.
+ // - In the full runtime this is a speed optimization, as the
+ // AbstractMessage base class includes reflection-based implementations of
+ // these methods.
+ // - In the lite runtime, setting this option changes the semantics of
+ // equals() and hashCode() to more closely match those of the full runtime;
+ // the generated methods compute their results based on field values rather
+ // than object identity. (Implementations should not assume that hashcodes
+ // will be consistent across runtimes or versions of the protocol compiler.)
+ optional bool java_generate_equals_and_hash = 20 [default=false];
+
+ // If set true, then the Java2 code generator will generate code that
+ // throws an exception whenever an attempt is made to assign a non-UTF-8
+ // byte sequence to a string field.
+ // Message reflection will do the same.
+ // However, an extension field still accepts non-UTF-8 byte sequences.
+ // This option has no effect on when used with the lite runtime.
+ optional bool java_string_check_utf8 = 27 [default=false];
+
+
+ // Generated classes can be optimized for speed or code size.
+ enum OptimizeMode {
+ SPEED = 1; // Generate complete code for parsing, serialization,
+ // etc.
+ CODE_SIZE = 2; // Use ReflectionOps to implement these methods.
+ LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime.
+ }
+ optional OptimizeMode optimize_for = 9 [default=SPEED];
+
+ // Sets the Go package where structs generated from this .proto will be
+ // placed. If omitted, the Go package will be derived from the following:
+ // - The basename of the package import path, if provided.
+ // - Otherwise, the package statement in the .proto file, if present.
+ // - Otherwise, the basename of the .proto file, without extension.
+ optional string go_package = 11;
+
+
+
+ // Should generic services be generated in each language? "Generic" services
+ // are not specific to any particular RPC system. They are generated by the
+ // main code generators in each language (without additional plugins).
+ // Generic services were the only kind of service generation supported by
+ // early versions of google.protobuf.
+ //
+ // Generic services are now considered deprecated in favor of using plugins
+ // that generate code specific to your particular RPC system. Therefore,
+ // these default to false. Old code which depends on generic services should
+ // explicitly set them to true.
+ optional bool cc_generic_services = 16 [default=false];
+ optional bool java_generic_services = 17 [default=false];
+ optional bool py_generic_services = 18 [default=false];
+
+ // Is this file deprecated?
+ // Depending on the target platform, this can emit Deprecated annotations
+ // for everything in the file, or it will be completely ignored; in the very
+ // least, this is a formalization for deprecating files.
+ optional bool deprecated = 23 [default=false];
+
+ // Enables the use of arenas for the proto messages in this file. This applies
+ // only to generated classes for C++.
+ optional bool cc_enable_arenas = 31 [default=false];
+
+
+ // Sets the objective c class prefix which is prepended to all objective c
+ // generated classes from this .proto. There is no default.
+ optional string objc_class_prefix = 36;
+
+ // Namespace for generated classes; defaults to the package.
+ optional string csharp_namespace = 37;
+
+ // Whether the nano proto compiler should generate in the deprecated non-nano
+ // suffixed package.
+ optional bool javanano_use_deprecated_package = 38;
+
+ // The parser stores options it doesn't recognize here. See above.
+ repeated UninterpretedOption uninterpreted_option = 999;
+
+ // Clients can define custom options in extensions of this message. See above.
+ extensions 1000 to max;
+}
+
+message MessageOptions {
+ // Set true to use the old proto1 MessageSet wire format for extensions.
+ // This is provided for backwards-compatibility with the MessageSet wire
+ // format. You should not use this for any other reason: It's less
+ // efficient, has fewer features, and is more complicated.
+ //
+ // The message must be defined exactly as follows:
+ // message Foo {
+ // option message_set_wire_format = true;
+ // extensions 4 to max;
+ // }
+ // Note that the message cannot have any defined fields; MessageSets only
+ // have extensions.
+ //
+ // All extensions of your type must be singular messages; e.g. they cannot
+ // be int32s, enums, or repeated messages.
+ //
+ // Because this is an option, the above two restrictions are not enforced by
+ // the protocol compiler.
+ optional bool message_set_wire_format = 1 [default=false];
+
+ // Disables the generation of the standard "descriptor()" accessor, which can
+ // conflict with a field of the same name. This is meant to make migration
+ // from proto1 easier; new code should avoid fields named "descriptor".
+ optional bool no_standard_descriptor_accessor = 2 [default=false];
+
+ // Is this message deprecated?
+ // Depending on the target platform, this can emit Deprecated annotations
+ // for the message, or it will be completely ignored; in the very least,
+ // this is a formalization for deprecating messages.
+ optional bool deprecated = 3 [default=false];
+
+ // Whether the message is an automatically generated map entry type for the
+ // maps field.
+ //
+ // For maps fields:
+ // map<KeyType, ValueType> map_field = 1;
+ // The parsed descriptor looks like:
+ // message MapFieldEntry {
+ // option map_entry = true;
+ // optional KeyType key = 1;
+ // optional ValueType value = 2;
+ // }
+ // repeated MapFieldEntry map_field = 1;
+ //
+ // Implementations may choose not to generate the map_entry=true message, but
+ // use a native map in the target language to hold the keys and values.
+ // The reflection APIs in such implementions still need to work as
+ // if the field is a repeated message field.
+ //
+ // NOTE: Do not set the option in .proto files. Always use the maps syntax
+ // instead. The option should only be implicitly set by the proto compiler
+ // parser.
+ optional bool map_entry = 7;
+
+ // The parser stores options it doesn't recognize here. See above.
+ repeated UninterpretedOption uninterpreted_option = 999;
+
+ // Clients can define custom options in extensions of this message. See above.
+ extensions 1000 to max;
+}
+
+message FieldOptions {
+ // The ctype option instructs the C++ code generator to use a different
+ // representation of the field than it normally would. See the specific
+ // options below. This option is not yet implemented in the open source
+ // release -- sorry, we'll try to include it in a future version!
+ optional CType ctype = 1 [default = STRING];
+ enum CType {
+ // Default mode.
+ STRING = 0;
+
+ CORD = 1;
+
+ STRING_PIECE = 2;
+ }
+ // The packed option can be enabled for repeated primitive fields to enable
+ // a more efficient representation on the wire. Rather than repeatedly
+ // writing the tag and type for each element, the entire array is encoded as
+ // a single length-delimited blob. In proto3, only explicit setting it to
+ // false will avoid using packed encoding.
+ optional bool packed = 2;
+
+
+ // The jstype option determines the JavaScript type used for values of the
+ // field. The option is permitted only for 64 bit integral and fixed types
+ // (int64, uint64, sint64, fixed64, sfixed64). By default these types are
+ // represented as JavaScript strings. This avoids loss of precision that can
+ // happen when a large value is converted to a floating point JavaScript
+ // numbers. Specifying JS_NUMBER for the jstype causes the generated
+ // JavaScript code to use the JavaScript "number" type instead of strings.
+ // This option is an enum to permit additional types to be added,
+ // e.g. goog.math.Integer.
+ optional JSType jstype = 6 [default = JS_NORMAL];
+ enum JSType {
+ // Use the default type.
+ JS_NORMAL = 0;
+
+ // Use JavaScript strings.
+ JS_STRING = 1;
+
+ // Use JavaScript numbers.
+ JS_NUMBER = 2;
+ }
+
+ // Should this field be parsed lazily? Lazy applies only to message-type
+ // fields. It means that when the outer message is initially parsed, the
+ // inner message's contents will not be parsed but instead stored in encoded
+ // form. The inner message will actually be parsed when it is first accessed.
+ //
+ // This is only a hint. Implementations are free to choose whether to use
+ // eager or lazy parsing regardless of the value of this option. However,
+ // setting this option true suggests that the protocol author believes that
+ // using lazy parsing on this field is worth the additional bookkeeping
+ // overhead typically needed to implement it.
+ //
+ // This option does not affect the public interface of any generated code;
+ // all method signatures remain the same. Furthermore, thread-safety of the
+ // interface is not affected by this option; const methods remain safe to
+ // call from multiple threads concurrently, while non-const methods continue
+ // to require exclusive access.
+ //
+ //
+ // Note that implementations may choose not to check required fields within
+ // a lazy sub-message. That is, calling IsInitialized() on the outher message
+ // may return true even if the inner message has missing required fields.
+ // This is necessary because otherwise the inner message would have to be
+ // parsed in order to perform the check, defeating the purpose of lazy
+ // parsing. An implementation which chooses not to check required fields
+ // must be consistent about it. That is, for any particular sub-message, the
+ // implementation must either *always* check its required fields, or *never*
+ // check its required fields, regardless of whether or not the message has
+ // been parsed.
+ optional bool lazy = 5 [default=false];
+
+ // Is this field deprecated?
+ // Depending on the target platform, this can emit Deprecated annotations
+ // for accessors, or it will be completely ignored; in the very least, this
+ // is a formalization for deprecating fields.
+ optional bool deprecated = 3 [default=false];
+
+ // For Google-internal migration only. Do not use.
+ optional bool weak = 10 [default=false];
+
+
+ // The parser stores options it doesn't recognize here. See above.
+ repeated UninterpretedOption uninterpreted_option = 999;
+
+ // Clients can define custom options in extensions of this message. See above.
+ extensions 1000 to max;
+}
+
+message EnumOptions {
+
+ // Set this option to true to allow mapping different tag names to the same
+ // value.
+ optional bool allow_alias = 2;
+
+ // Is this enum deprecated?
+ // Depending on the target platform, this can emit Deprecated annotations
+ // for the enum, or it will be completely ignored; in the very least, this
+ // is a formalization for deprecating enums.
+ optional bool deprecated = 3 [default=false];
+
+ // The parser stores options it doesn't recognize here. See above.
+ repeated UninterpretedOption uninterpreted_option = 999;
+
+ // Clients can define custom options in extensions of this message. See above.
+ extensions 1000 to max;
+}
+
+message EnumValueOptions {
+ // Is this enum value deprecated?
+ // Depending on the target platform, this can emit Deprecated annotations
+ // for the enum value, or it will be completely ignored; in the very least,
+ // this is a formalization for deprecating enum values.
+ optional bool deprecated = 1 [default=false];
+
+ // The parser stores options it doesn't recognize here. See above.
+ repeated UninterpretedOption uninterpreted_option = 999;
+
+ // Clients can define custom options in extensions of this message. See above.
+ extensions 1000 to max;
+}
+
+message ServiceOptions {
+
+ // Note: Field numbers 1 through 32 are reserved for Google's internal RPC
+ // framework. We apologize for hoarding these numbers to ourselves, but
+ // we were already using them long before we decided to release Protocol
+ // Buffers.
+
+ // Is this service deprecated?
+ // Depending on the target platform, this can emit Deprecated annotations
+ // for the service, or it will be completely ignored; in the very least,
+ // this is a formalization for deprecating services.
+ optional bool deprecated = 33 [default=false];
+
+ // The parser stores options it doesn't recognize here. See above.
+ repeated UninterpretedOption uninterpreted_option = 999;
+
+ // Clients can define custom options in extensions of this message. See above.
+ extensions 1000 to max;
+}
+
+message MethodOptions {
+
+ // Note: Field numbers 1 through 32 are reserved for Google's internal RPC
+ // framework. We apologize for hoarding these numbers to ourselves, but
+ // we were already using them long before we decided to release Protocol
+ // Buffers.
+
+ // Is this method deprecated?
+ // Depending on the target platform, this can emit Deprecated annotations
+ // for the method, or it will be completely ignored; in the very least,
+ // this is a formalization for deprecating methods.
+ optional bool deprecated = 33 [default=false];
+
+ // The parser stores options it doesn't recognize here. See above.
+ repeated UninterpretedOption uninterpreted_option = 999;
+
+ // Clients can define custom options in extensions of this message. See above.
+ extensions 1000 to max;
+}
+
+
+// A message representing a option the parser does not recognize. This only
+// appears in options protos created by the compiler::Parser class.
+// DescriptorPool resolves these when building Descriptor objects. Therefore,
+// options protos in descriptor objects (e.g. returned by Descriptor::options(),
+// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
+// in them.
+message UninterpretedOption {
+ // The name of the uninterpreted option. Each string represents a segment in
+ // a dot-separated name. is_extension is true iff a segment represents an
+ // extension (denoted with parentheses in options specs in .proto files).
+ // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
+ // "foo.(bar.baz).qux".
+ message NamePart {
+ required string name_part = 1;
+ required bool is_extension = 2;
+ }
+ repeated NamePart name = 2;
+
+ // The value of the uninterpreted option, in whatever type the tokenizer
+ // identified it as during parsing. Exactly one of these should be set.
+ optional string identifier_value = 3;
+ optional uint64 positive_int_value = 4;
+ optional int64 negative_int_value = 5;
+ optional double double_value = 6;
+ optional bytes string_value = 7;
+ optional string aggregate_value = 8;
+}
+
+// ===================================================================
+// Optional source code info
+
+// Encapsulates information about the original source file from which a
+// FileDescriptorProto was generated.
+message SourceCodeInfo {
+ // A Location identifies a piece of source code in a .proto file which
+ // corresponds to a particular definition. This information is intended
+ // to be useful to IDEs, code indexers, documentation generators, and similar
+ // tools.
+ //
+ // For example, say we have a file like:
+ // message Foo {
+ // optional string foo = 1;
+ // }
+ // Let's look at just the field definition:
+ // optional string foo = 1;
+ // ^ ^^ ^^ ^ ^^^
+ // a bc de f ghi
+ // We have the following locations:
+ // span path represents
+ // [a,i) [ 4, 0, 2, 0 ] The whole field definition.
+ // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
+ // [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
+ // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
+ // [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
+ //
+ // Notes:
+ // - A location may refer to a repeated field itself (i.e. not to any
+ // particular index within it). This is used whenever a set of elements are
+ // logically enclosed in a single code segment. For example, an entire
+ // extend block (possibly containing multiple extension definitions) will
+ // have an outer location whose path refers to the "extensions" repeated
+ // field without an index.
+ // - Multiple locations may have the same path. This happens when a single
+ // logical declaration is spread out across multiple places. The most
+ // obvious example is the "extend" block again -- there may be multiple
+ // extend blocks in the same scope, each of which will have the same path.
+ // - A location's span is not always a subset of its parent's span. For
+ // example, the "extendee" of an extension declaration appears at the
+ // beginning of the "extend" block and is shared by all extensions within
+ // the block.
+ // - Just because a location's span is a subset of some other location's span
+ // does not mean that it is a descendent. For example, a "group" defines
+ // both a type and a field in a single declaration. Thus, the locations
+ // corresponding to the type and field and their components will overlap.
+ // - Code which tries to interpret locations should probably be designed to
+ // ignore those that it doesn't understand, as more types of locations could
+ // be recorded in the future.
+ repeated Location location = 1;
+ message Location {
+ // Identifies which part of the FileDescriptorProto was defined at this
+ // location.
+ //
+ // Each element is a field number or an index. They form a path from
+ // the root FileDescriptorProto to the place where the definition. For
+ // example, this path:
+ // [ 4, 3, 2, 7, 1 ]
+ // refers to:
+ // file.message_type(3) // 4, 3
+ // .field(7) // 2, 7
+ // .name() // 1
+ // This is because FileDescriptorProto.message_type has field number 4:
+ // repeated DescriptorProto message_type = 4;
+ // and DescriptorProto.field has field number 2:
+ // repeated FieldDescriptorProto field = 2;
+ // and FieldDescriptorProto.name has field number 1:
+ // optional string name = 1;
+ //
+ // Thus, the above path gives the location of a field name. If we removed
+ // the last element:
+ // [ 4, 3, 2, 7 ]
+ // this path refers to the whole field declaration (from the beginning
+ // of the label to the terminating semicolon).
+ repeated int32 path = 1 [packed=true];
+
+ // Always has exactly three or four elements: start line, start column,
+ // end line (optional, otherwise assumed same as start line), end column.
+ // These are packed into a single field for efficiency. Note that line
+ // and column numbers are zero-based -- typically you will want to add
+ // 1 to each before displaying to a user.
+ repeated int32 span = 2 [packed=true];
+
+ // If this SourceCodeInfo represents a complete declaration, these are any
+ // comments appearing before and after the declaration which appear to be
+ // attached to the declaration.
+ //
+ // A series of line comments appearing on consecutive lines, with no other
+ // tokens appearing on those lines, will be treated as a single comment.
+ //
+ // leading_detached_comments will keep paragraphs of comments that appear
+ // before (but not connected to) the current element. Each paragraph,
+ // separated by empty lines, will be one comment element in the repeated
+ // field.
+ //
+ // Only the comment content is provided; comment markers (e.g. //) are
+ // stripped out. For block comments, leading whitespace and an asterisk
+ // will be stripped from the beginning of each line other than the first.
+ // Newlines are included in the output.
+ //
+ // Examples:
+ //
+ // optional int32 foo = 1; // Comment attached to foo.
+ // // Comment attached to bar.
+ // optional int32 bar = 2;
+ //
+ // optional string baz = 3;
+ // // Comment attached to baz.
+ // // Another line attached to baz.
+ //
+ // // Comment attached to qux.
+ // //
+ // // Another line attached to qux.
+ // optional double qux = 4;
+ //
+ // // Detached comment for corge. This is not leading or trailing comments
+ // // to qux or corge because there are blank lines separating it from
+ // // both.
+ //
+ // // Detached comment for corge paragraph 2.
+ //
+ // optional string corge = 5;
+ // /* Block comment attached
+ // * to corge. Leading asterisks
+ // * will be removed. */
+ // /* Block comment attached to
+ // * grault. */
+ // optional int32 grault = 6;
+ //
+ // // ignored detached comments.
+ optional string leading_comments = 3;
+ optional string trailing_comments = 4;
+ repeated string leading_detached_comments = 6;
+ }
+} \ No newline at end of file